From 7f37ad826d90e349be51f7fc864b4a8b06b061f9 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 14:58:00 +0530 Subject: [PATCH 01/15] Add Python SDK compliance adapter --- tests/compliance/python/Dockerfile | 13 ++ tests/compliance/python/README.md | 44 +++++ tests/compliance/python/adapter.py | 298 +++++++++++++++++++++++++++++ 3 files changed, 355 insertions(+) create mode 100644 tests/compliance/python/Dockerfile create mode 100644 tests/compliance/python/README.md create mode 100644 tests/compliance/python/adapter.py diff --git a/tests/compliance/python/Dockerfile b/tests/compliance/python/Dockerfile new file mode 100644 index 0000000..13fef9b --- /dev/null +++ b/tests/compliance/python/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.11-slim + +WORKDIR /workspace + +COPY python /workspace/python +COPY tests/compliance/python /workspace/tests/compliance/python + +RUN pip install --no-cache-dir -e /workspace/python + +ENV PYTHONPATH=/workspace/python +ENV PORT=8080 + +CMD ["python", "/workspace/tests/compliance/python/adapter.py"] diff --git a/tests/compliance/python/README.md b/tests/compliance/python/README.md new file mode 100644 index 0000000..ca58bd4 --- /dev/null +++ b/tests/compliance/python/README.md @@ -0,0 +1,44 @@ +# Future AGI SDK Compliance Adapter + +Thin HTTP adapter used by `futureagi-sdk-test-harness`. + +It wraps the Python `futureagi` SDK and exposes the adapter contract expected by +the shared harness: + +- `GET /health` +- `POST /init` +- `POST /reset` +- `GET /state` +- `POST /raw-request` +- `POST /annotation/log` +- `POST /annotation-queue/lifecycle` + +## Local Run + +From the `futureagi-sdk` repo root: + +```bash +uv venv --python 3.11 .venv-compliance +. .venv-compliance/bin/activate +uv pip install -e python +PYTHONPATH=python PORT=8080 python tests/compliance/python/adapter.py +``` + +Then run the harness from `../futureagi-sdk-test-harness`: + +```bash +futureagi-sdk-test-harness run --adapter-url http://127.0.0.1:8080 +``` + +Current passing suites: + +- `auth_raw_request` +- `annotation_bulk_log` +- `annotation_queue_lifecycle_e2e` + +## Docker + +```bash +docker build -f tests/compliance/python/Dockerfile -t futureagi-sdk-python-adapter . +docker run --rm -p 8080:8080 futureagi-sdk-python-adapter +``` diff --git a/tests/compliance/python/adapter.py b/tests/compliance/python/adapter.py new file mode 100644 index 0000000..cdf21ba --- /dev/null +++ b/tests/compliance/python/adapter.py @@ -0,0 +1,298 @@ +from __future__ import annotations + +import json +import os +from dataclasses import dataclass, field +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from typing import Any +from urllib.parse import urlparse + +import pandas as pd + +from fi.annotations import Annotation +from fi.api.auth import APIKeyAuth +from fi.api.types import HttpMethod, RequestConfig +from fi.queues import AnnotationQueue + + +@dataclass +class AdapterState: + api_key: str | None = None + secret_key: str | None = None + base_url: str | None = None + timeout: int | None = None + calls: list[dict[str, Any]] = field(default_factory=list) + + +STATE = AdapterState() + + +def main() -> None: + port = int(os.environ.get("PORT", "8080")) + server = ThreadingHTTPServer(("0.0.0.0", port), Handler) + print(f"futureagi-sdk Python compliance adapter listening on :{port}", flush=True) + server.serve_forever() + + +class Handler(BaseHTTPRequestHandler): + def do_GET(self) -> None: # noqa: N802 + if self.path == "/health": + self._write_json( + { + "sdk_name": "futureagi-sdk-python", + "sdk_version": _sdk_version(), + "adapter_version": "0.1.0", + "language": "python", + "capabilities": [ + "auth_api_key", + "raw_request", + "annotation_bulk_log", + "annotation_queue_lifecycle", + ], + } + ) + return + + if self.path == "/state": + self._write_json( + { + "initialized": STATE.base_url is not None, + "base_url": STATE.base_url, + "calls": STATE.calls, + } + ) + return + + self._write_json({"error": "not found"}, status=404) + + def do_POST(self) -> None: # noqa: N802 + parsed = urlparse(self.path) + payload = self._read_json() + + if parsed.path == "/reset": + STATE.api_key = None + STATE.secret_key = None + STATE.base_url = None + STATE.timeout = None + STATE.calls.clear() + self._write_json({"success": True}) + return + + if parsed.path == "/init": + STATE.api_key = _required(payload, "api_key") + STATE.secret_key = _required(payload, "secret_key") + STATE.base_url = _required(payload, "base_url").rstrip("/") + STATE.timeout = int(payload.get("timeout") or 30) + STATE.calls.append({"operation": "init", "base_url": STATE.base_url}) + self._write_json({"success": True}) + return + + if parsed.path == "/raw-request": + self._handle_raw_request(payload) + return + + if parsed.path == "/annotation/log": + self._handle_annotation_log(payload) + return + + if parsed.path == "/annotation-queue/lifecycle": + self._handle_annotation_queue_lifecycle(payload) + return + + self._write_json({"error": "not found"}, status=404) + + def log_message(self, format: str, *args: Any) -> None: # noqa: A002 + return + + def _handle_raw_request(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + client = APIKeyAuth( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + path = _required(payload, "path").lstrip("/") + method = HttpMethod[_required(payload, "method").upper()] + response = client.request( + RequestConfig( + method=method, + url=f"{STATE.base_url}/{path}", + params=payload.get("params"), + json=payload.get("json"), + data=payload.get("data"), + timeout=payload.get("timeout") or STATE.timeout, + ) + ) + STATE.calls.append({"operation": "raw-request", "path": path, "method": method.value}) + self._write_json(_response_payload(response)) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_annotation_log(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + records = payload.get("records") + if not isinstance(records, list): + raise ValueError("records must be a list") + + client = Annotation( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + result = client.log_annotations( + pd.DataFrame(records), + project_name=payload.get("project_name"), + timeout=payload.get("timeout") or STATE.timeout, + ) + STATE.calls.append({"operation": "annotation/log", "records": len(records)}) + self._write_json({"success": True, "result": _jsonable(result)}) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_annotation_queue_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + queue_payload = payload.get("queue") or {} + item_payload = payload.get("item") or {} + label_id = _required(payload, "label_id") + item_id = _required(item_payload, "id") + source_type = _required(item_payload, "source_type") + source_id = _required(item_payload, "source_id") + annotations = payload.get("annotations") + if not isinstance(annotations, list): + raise ValueError("annotations must be a list") + + client = AnnotationQueue( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + queue = client.create( + name=_required(queue_payload, "name"), + description=queue_payload.get("description"), + instructions=queue_payload.get("instructions"), + assignment_strategy=queue_payload.get("assignment_strategy"), + annotations_required=queue_payload.get("annotations_required"), + requires_review=queue_payload.get("requires_review"), + timeout=payload.get("timeout") or STATE.timeout, + ) + add_label = client.add_label( + queue_id=queue.id, + label_id=label_id, + timeout=payload.get("timeout") or STATE.timeout, + ) + added_items = client.add_items( + queue_id=queue.id, + items=[{"source_type": source_type, "source_id": source_id}], + timeout=payload.get("timeout") or STATE.timeout, + ) + submitted = client.submit_annotations( + queue_id=queue.id, + item_id=item_id, + annotations=annotations, + notes=payload.get("notes"), + timeout=payload.get("timeout") or STATE.timeout, + ) + completed = client.complete_item( + queue_id=queue.id, + item_id=item_id, + timeout=payload.get("timeout") or STATE.timeout, + ) + progress = client.get_progress( + queue_id=queue.id, + timeout=payload.get("timeout") or STATE.timeout, + ) + exported = client.export( + queue_id=queue.id, + export_format="json", + status="completed", + timeout=payload.get("timeout") or STATE.timeout, + ) + STATE.calls.append({"operation": "annotation-queue/lifecycle", "queue_id": queue.id}) + self._write_json( + { + "success": True, + "result": _jsonable( + { + "queue": queue, + "add_label": add_label, + "added_items": added_items, + "submitted": submitted, + "completed": completed, + "progress": progress, + "exported": exported, + } + ), + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _read_json(self) -> dict[str, Any]: + length = int(self.headers.get("content-length", "0") or "0") + if length == 0: + return {} + raw = self.rfile.read(length).decode("utf-8") + return json.loads(raw) if raw else {} + + def _write_json(self, payload: Any, status: int = 200) -> None: + raw = json.dumps(payload, default=str).encode("utf-8") + self.send_response(status) + self.send_header("content-type", "application/json") + self.send_header("content-length", str(len(raw))) + self.end_headers() + self.wfile.write(raw) + + +def _ensure_initialized() -> None: + if not STATE.api_key or not STATE.secret_key or not STATE.base_url: + raise RuntimeError("adapter is not initialized") + + +def _required(payload: dict[str, Any], key: str) -> str: + value = payload.get(key) + if not value: + raise ValueError(f"{key} is required") + return str(value) + + +def _response_payload(response: Any) -> dict[str, Any]: + try: + body = response.json() + except Exception: + body = getattr(response, "text", "") + return { + "success": 200 <= int(response.status_code) < 300, + "status_code": int(response.status_code), + "body": body, + } + + +def _jsonable(value: Any) -> Any: + if hasattr(value, "model_dump"): + return value.model_dump() + if hasattr(value, "dict"): + return value.dict() + if isinstance(value, dict): + return {key: _jsonable(item) for key, item in value.items()} + if isinstance(value, list): + return [_jsonable(item) for item in value] + return value + + +def _sdk_version() -> str: + try: + from fi import __version__ + + return str(__version__) + except Exception: + return "unknown" + + +if __name__ == "__main__": + main() From 5532c9e688408c95e3b2686c73eda5bd7708a54c Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 15:01:38 +0530 Subject: [PATCH 02/15] Fix Python SDK version metadata --- python/fi/__init__.py | 9 ++++++++- python/fi/utils/__init__.py | 7 ++++++- python/tests/test_version.py | 7 +++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 python/tests/test_version.py diff --git a/python/fi/__init__.py b/python/fi/__init__.py index 7e996b7..a69e472 100644 --- a/python/fi/__init__.py +++ b/python/fi/__init__.py @@ -1,4 +1,11 @@ -__version__ = "0.0.1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("futureagi") +except PackageNotFoundError: + # Source-tree fallback for environments that import `fi` before installing + # the package metadata. Keep this in sync with python/pyproject.toml. + __version__ = "0.6.13" # Allow sibling `fi.*` packages (notably `fi.evals` shipped from the # ai-evaluation repo) to extend this namespace when both are installed. diff --git a/python/fi/utils/__init__.py b/python/fi/utils/__init__.py index f102a9c..e6a3fbd 100644 --- a/python/fi/utils/__init__.py +++ b/python/fi/utils/__init__.py @@ -1 +1,6 @@ -__version__ = "0.0.1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("futureagi") +except PackageNotFoundError: + __version__ = "0.6.13" diff --git a/python/tests/test_version.py b/python/tests/test_version.py new file mode 100644 index 0000000..23c00fa --- /dev/null +++ b/python/tests/test_version.py @@ -0,0 +1,7 @@ +from importlib.metadata import version + +import fi + + +def test_public_version_matches_package_metadata(): + assert fi.__version__ == version("futureagi") From 1443e28630611d352057850e480f9dc75f6d35a3 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 15:49:33 +0530 Subject: [PATCH 03/15] Add SDK compliance workflow --- .github/workflows/sdk-compliance.yml | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/sdk-compliance.yml diff --git a/.github/workflows/sdk-compliance.yml b/.github/workflows/sdk-compliance.yml new file mode 100644 index 0000000..ba55182 --- /dev/null +++ b/.github/workflows/sdk-compliance.yml @@ -0,0 +1,55 @@ +name: SDK Compliance + +on: + pull_request: + paths: + - ".github/workflows/sdk-compliance.yml" + - "python/**" + - "tests/compliance/**" + push: + branches: + - dev + - main + paths: + - ".github/workflows/sdk-compliance.yml" + - "python/**" + - "tests/compliance/**" + workflow_dispatch: + +permissions: + contents: read + pull-requests: write + +jobs: + python-tests: + name: Python SDK tests + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + cache-dependency-path: python/pyproject.toml + + - name: Install Python SDK + run: | + python -m pip install --upgrade pip + python -m pip install -e ./python pytest + + - name: Run Python tests + run: | + PYTHONPATH=python pytest -q python/tests + + python-compliance: + name: Python SDK compliance + needs: python-tests + uses: future-agi/futureagi-sdk-test-harness/.github/workflows/test-sdk.yml@main + with: + adapter-dockerfile: tests/compliance/python/Dockerfile + adapter-context: "." + report-name: futureagi-sdk-python-compliance-report From 6d45e75e649cd1c4e0bd34e2403fc9262cd42e92 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 18:35:25 +0530 Subject: [PATCH 04/15] Add general SDK compliance adapter flows --- python/fi/__init__.py | 2 + python/fi/utils/__init__.py | 1 + python/tests/test_version.py | 4 + tests/compliance/python/README.md | 6 ++ tests/compliance/python/adapter.py | 134 +++++++++++++++++++++++++++++ 5 files changed, 147 insertions(+) diff --git a/python/fi/__init__.py b/python/fi/__init__.py index a69e472..5cdc19f 100644 --- a/python/fi/__init__.py +++ b/python/fi/__init__.py @@ -6,6 +6,7 @@ # Source-tree fallback for environments that import `fi` before installing # the package metadata. Keep this in sync with python/pyproject.toml. __version__ = "0.6.13" +__versions__ = __version__ # Allow sibling `fi.*` packages (notably `fi.evals` shipped from the # ai-evaluation repo) to extend this namespace when both are installed. @@ -30,6 +31,7 @@ __all__ = [ "__version__", + "__versions__", "AnnotationQueue", "AnnotationLabel", "QueueDetail", diff --git a/python/fi/utils/__init__.py b/python/fi/utils/__init__.py index e6a3fbd..8fc5692 100644 --- a/python/fi/utils/__init__.py +++ b/python/fi/utils/__init__.py @@ -4,3 +4,4 @@ __version__ = version("futureagi") except PackageNotFoundError: __version__ = "0.6.13" +__versions__ = __version__ diff --git a/python/tests/test_version.py b/python/tests/test_version.py index 23c00fa..c9916a9 100644 --- a/python/tests/test_version.py +++ b/python/tests/test_version.py @@ -5,3 +5,7 @@ def test_public_version_matches_package_metadata(): assert fi.__version__ == version("futureagi") + + +def test_public_versions_alias_matches_package_metadata(): + assert fi.__versions__ == version("futureagi") diff --git a/tests/compliance/python/README.md b/tests/compliance/python/README.md index ca58bd4..791e5d0 100644 --- a/tests/compliance/python/README.md +++ b/tests/compliance/python/README.md @@ -12,6 +12,9 @@ the shared harness: - `POST /raw-request` - `POST /annotation/log` - `POST /annotation-queue/lifecycle` +- `POST /annotation-score/lifecycle` +- `POST /dataset/lifecycle` +- `POST /model/log` ## Local Run @@ -35,6 +38,9 @@ Current passing suites: - `auth_raw_request` - `annotation_bulk_log` - `annotation_queue_lifecycle_e2e` +- `annotation_score_lifecycle_e2e` +- `dataset_lifecycle_e2e` +- `model_log_lifecycle_e2e` ## Docker diff --git a/tests/compliance/python/adapter.py b/tests/compliance/python/adapter.py index cdf21ba..8e60785 100644 --- a/tests/compliance/python/adapter.py +++ b/tests/compliance/python/adapter.py @@ -12,7 +12,11 @@ from fi.annotations import Annotation from fi.api.auth import APIKeyAuth from fi.api.types import HttpMethod, RequestConfig +from fi.client import Client +from fi.datasets import Dataset, DatasetConfig +from fi.datasets.types import DataTypeChoices from fi.queues import AnnotationQueue +from fi.utils.types import Environments, ModelTypes @dataclass @@ -48,6 +52,9 @@ def do_GET(self) -> None: # noqa: N802 "raw_request", "annotation_bulk_log", "annotation_queue_lifecycle", + "annotation_score_lifecycle", + "dataset_lifecycle", + "model_log_lifecycle", ], } ) @@ -99,6 +106,18 @@ def do_POST(self) -> None: # noqa: N802 self._handle_annotation_queue_lifecycle(payload) return + if parsed.path == "/annotation-score/lifecycle": + self._handle_annotation_score_lifecycle(payload) + return + + if parsed.path == "/dataset/lifecycle": + self._handle_dataset_lifecycle(payload) + return + + if parsed.path == "/model/log": + self._handle_model_log(payload) + return + self._write_json({"error": "not found"}, status=404) def log_message(self, format: str, *args: Any) -> None: # noqa: A002 @@ -130,6 +149,121 @@ def _handle_raw_request(self, payload: dict[str, Any]) -> None: except Exception as exc: self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_annotation_score_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + client = AnnotationQueue( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + source_type = _required(payload, "source_type") + source_id = _required(payload, "source_id") + created = client.create_score( + source_type=source_type, + source_id=source_id, + label_id=_required(payload, "label_id"), + value=payload.get("value"), + notes=payload.get("notes"), + timeout=payload.get("timeout") or STATE.timeout, + ) + bulk = client.create_scores( + source_type=source_type, + source_id=source_id, + scores=payload.get("bulk_scores") or [], + timeout=payload.get("timeout") or STATE.timeout, + ) + fetched = client.get_scores( + source_type=source_type, + source_id=source_id, + timeout=payload.get("timeout") or STATE.timeout, + ) + STATE.calls.append({"operation": "annotation-score/lifecycle", "source_id": source_id}) + self._write_json( + { + "success": True, + "result": _jsonable( + { + "created": created, + "bulk": bulk, + "fetched": fetched, + } + ), + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_dataset_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + columns = payload.get("columns") + rows = payload.get("rows") + if not isinstance(columns, list) or not columns: + raise ValueError("columns must be a non-empty list") + if not isinstance(rows, list) or not rows: + raise ValueError("rows must be a non-empty list") + + dataset = Dataset( + dataset_config=DatasetConfig( + name=_required(payload, "name"), + model_type=ModelTypes[_required(payload, "model_type")], + ), + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + dataset.create() + dataset.add_columns( + [ + { + "name": _required(column, "name"), + "data_type": DataTypeChoices[_required(column, "data_type")], + } + for column in columns + ] + ) + dataset.add_rows(rows) + STATE.calls.append({"operation": "dataset/lifecycle", "dataset_id": str(dataset.dataset_config.id)}) + self._write_json( + { + "success": True, + "result": { + "dataset": _jsonable(dataset.dataset_config), + "columns_added": len(columns), + "rows_added": len(rows), + }, + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_model_log(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + client = Client( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + result = client.log( + model_id=_required(payload, "model_id"), + model_type=ModelTypes[_required(payload, "model_type")], + environment=Environments[_required(payload, "environment")], + model_version=payload.get("model_version"), + prediction_timestamp=payload.get("prediction_timestamp"), + conversation=payload.get("conversation"), + tags=payload.get("tags"), + timeout=payload.get("timeout") or STATE.timeout, + ) + STATE.calls.append({"operation": "model/log", "model_id": payload.get("model_id")}) + self._write_json({"success": True, "body": _jsonable(result)}) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_annotation_log(self, payload: dict[str, Any]) -> None: try: _ensure_initialized() From bc7610cf5f273daeebfdf83b091a7f73b2bef9aa Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 20:14:29 +0530 Subject: [PATCH 05/15] Expand Python SDK compliance coverage --- python/fi/kb/client.py | 8 +- tests/compliance/python/README.md | 12 + tests/compliance/python/adapter.py | 345 ++++++++++++++++++++++++++++- 3 files changed, 358 insertions(+), 7 deletions(-) diff --git a/python/fi/kb/client.py b/python/fi/kb/client.py index 317d99c..1b9b5d9 100644 --- a/python/fi/kb/client.py +++ b/python/fi/kb/client.py @@ -107,6 +107,7 @@ def __init__( # Internal cache of the current KB (instance of KnowledgeBaseConfig) self.kb: Optional[KnowledgeBaseConfig] = None + self._valid_file_paths: List[str] = [] if kb_name: try: @@ -263,7 +264,7 @@ def delete_files_from_kb( "kb_id": str(self.kb.id) } - response = self.request( + self.request( config=RequestConfig( method=method, url=url, @@ -338,7 +339,7 @@ def delete_kb( url = self._base_url + "/" + Routes.knowledge_base.value json_payload = {"kb_ids": resolved_ids} - response = self.request( + self.request( config=RequestConfig( method=method, url=url, @@ -376,7 +377,6 @@ def create_kb(self, name: Optional[str] = None, file_paths: Optional[Union[str, try: data = {"name": final_kb_name} - method = HttpMethod.POST url = self._base_url + "/" + Routes.knowledge_base.value files = [] @@ -529,4 +529,4 @@ def _get_kb_from_name(self, kb_name): data = response["result"].get("table_data") if not data: raise SDKException(f"Knowledge Base with name '{kb_name}' not found.") - return KnowledgeBaseConfig(id=data[0].get("id"), name=data[0].get("name")) \ No newline at end of file + return KnowledgeBaseConfig(id=data[0].get("id"), name=data[0].get("name")) diff --git a/tests/compliance/python/README.md b/tests/compliance/python/README.md index 791e5d0..f38d83e 100644 --- a/tests/compliance/python/README.md +++ b/tests/compliance/python/README.md @@ -11,10 +11,16 @@ the shared harness: - `GET /state` - `POST /raw-request` - `POST /annotation/log` +- `POST /annotation/metadata` - `POST /annotation-queue/lifecycle` +- `POST /annotation-queue/management` - `POST /annotation-score/lifecycle` - `POST /dataset/lifecycle` +- `POST /dataset/management` +- `POST /knowledge-base/lifecycle` - `POST /model/log` +- `POST /prompt/lifecycle` +- `POST /provider-api-key/lifecycle` ## Local Run @@ -37,10 +43,16 @@ Current passing suites: - `auth_raw_request` - `annotation_bulk_log` +- `annotation_metadata_lifecycle_e2e` - `annotation_queue_lifecycle_e2e` +- `annotation_queue_management_lifecycle_e2e` - `annotation_score_lifecycle_e2e` - `dataset_lifecycle_e2e` +- `dataset_management_lifecycle_e2e` +- `knowledge_base_lifecycle_e2e` - `model_log_lifecycle_e2e` +- `prompt_lifecycle_e2e` +- `provider_api_key_lifecycle_e2e` ## Docker diff --git a/tests/compliance/python/adapter.py b/tests/compliance/python/adapter.py index 8e60785..5b75745 100644 --- a/tests/compliance/python/adapter.py +++ b/tests/compliance/python/adapter.py @@ -3,6 +3,7 @@ import json import os from dataclasses import dataclass, field +from enum import Enum from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from typing import Any from urllib.parse import urlparse @@ -11,10 +12,13 @@ from fi.annotations import Annotation from fi.api.auth import APIKeyAuth -from fi.api.types import HttpMethod, RequestConfig +from fi.api.apikeys import ProviderAPIKeyClient +from fi.api.types import ApiKey, HttpMethod, ModelProvider, RequestConfig from fi.client import Client from fi.datasets import Dataset, DatasetConfig from fi.datasets.types import DataTypeChoices +from fi.kb import KnowledgeBase +from fi.prompt import ModelConfig, Prompt, PromptTemplate, UserMessage from fi.queues import AnnotationQueue from fi.utils.types import Environments, ModelTypes @@ -53,8 +57,14 @@ def do_GET(self) -> None: # noqa: N802 "annotation_bulk_log", "annotation_queue_lifecycle", "annotation_score_lifecycle", + "annotation_metadata_lifecycle", + "annotation_queue_management_lifecycle", "dataset_lifecycle", + "dataset_management_lifecycle", + "knowledge_base_lifecycle", "model_log_lifecycle", + "prompt_lifecycle", + "provider_api_key_lifecycle", ], } ) @@ -110,14 +120,38 @@ def do_POST(self) -> None: # noqa: N802 self._handle_annotation_score_lifecycle(payload) return + if parsed.path == "/annotation/metadata": + self._handle_annotation_metadata(payload) + return + + if parsed.path == "/annotation-queue/management": + self._handle_annotation_queue_management(payload) + return + if parsed.path == "/dataset/lifecycle": self._handle_dataset_lifecycle(payload) return + if parsed.path == "/dataset/management": + self._handle_dataset_management(payload) + return + + if parsed.path == "/knowledge-base/lifecycle": + self._handle_knowledge_base_lifecycle(payload) + return + if parsed.path == "/model/log": self._handle_model_log(payload) return + if parsed.path == "/prompt/lifecycle": + self._handle_prompt_lifecycle(payload) + return + + if parsed.path == "/provider-api-key/lifecycle": + self._handle_provider_api_key_lifecycle(payload) + return + self._write_json({"error": "not found"}, status=404) def log_message(self, format: str, *args: Any) -> None: # noqa: A002 @@ -195,6 +229,199 @@ def _handle_annotation_score_lifecycle(self, payload: dict[str, Any]) -> None: except Exception as exc: self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_provider_api_key_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + provider = ModelProvider[_required(payload, "provider")] + api_key = ApiKey(provider=provider, key=_required(payload, "provider_key")) + ProviderAPIKeyClient.set_api_key( + api_key, + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + ) + listed = ProviderAPIKeyClient.list_api_keys( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + ) + fetched = ProviderAPIKeyClient.get_api_key( + provider, + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + ) + STATE.calls.append({"operation": "provider-api-key/lifecycle", "provider": provider.value}) + self._write_json( + { + "success": True, + "result": { + "listed": _jsonable(listed), + "fetched": _jsonable(fetched), + }, + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_annotation_metadata(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + client = Annotation( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + labels = client.get_labels( + project_id=payload.get("project_id"), + timeout=payload.get("timeout") or STATE.timeout, + ) + projects = client.list_projects( + project_type=payload.get("project_type"), + name=payload.get("project_name"), + timeout=payload.get("timeout") or STATE.timeout, + ) + STATE.calls.append({"operation": "annotation/metadata", "labels": len(labels)}) + self._write_json( + { + "success": True, + "result": { + "labels": _jsonable(labels), + "projects": _jsonable(projects), + }, + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_annotation_queue_management(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + client = AnnotationQueue( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + label_payload = payload.get("label") or {} + queue_payload = payload.get("queue") or {} + item_payload = payload.get("item") or {} + user_id = payload.get("user_id") + label = client.create_label( + name=_required(label_payload, "name"), + type=_required(label_payload, "type"), + settings=label_payload.get("settings"), + description=label_payload.get("description"), + timeout=payload.get("timeout") or STATE.timeout, + ) + labels = client.list_labels(timeout=payload.get("timeout") or STATE.timeout) + fetched_label = client.get_label(label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) + queue = client.create( + name=_required(queue_payload, "name"), + description=queue_payload.get("description"), + instructions=queue_payload.get("instructions"), + requires_review=queue_payload.get("requires_review"), + annotations_required=queue_payload.get("annotations_required"), + timeout=payload.get("timeout") or STATE.timeout, + ) + queues = client.list_queues( + status=queue_payload.get("status"), + search=queue.name, + timeout=payload.get("timeout") or STATE.timeout, + ) + fetched_queue = client.get(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + updated_queue = client.update( + queue_id=queue.id, + description=queue_payload.get("updated_description"), + timeout=payload.get("timeout") or STATE.timeout, + ) + activated_queue = client.activate(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + add_label = client.add_label(queue_id=queue.id, label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) + added_items = client.add_items( + queue_id=queue.id, + items=[{"source_type": _required(item_payload, "source_type"), "source_id": _required(item_payload, "source_id")}], + timeout=payload.get("timeout") or STATE.timeout, + ) + items = client.list_items( + queue_id=queue.id, + status=item_payload.get("status"), + assigned_to=user_id, + timeout=payload.get("timeout") or STATE.timeout, + ) + item_id = _required(item_payload, "id") + assigned = client.assign_items( + queue_id=queue.id, + item_ids=[item_id], + user_id=user_id, + timeout=payload.get("timeout") or STATE.timeout, + ) + imported = client.import_annotations( + queue_id=queue.id, + item_id=item_id, + annotations=payload.get("annotations") or [], + annotator_id=user_id, + timeout=payload.get("timeout") or STATE.timeout, + ) + annotations = client.get_annotations( + queue_id=queue.id, + item_id=item_id, + timeout=payload.get("timeout") or STATE.timeout, + ) + skipped = client.skip_item(queue_id=queue.id, item_id=item_id, timeout=payload.get("timeout") or STATE.timeout) + removed_items = client.remove_items( + queue_id=queue.id, + item_ids=[item_id], + timeout=payload.get("timeout") or STATE.timeout, + ) + remove_label = client.remove_label(queue_id=queue.id, label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) + analytics = client.get_analytics(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + agreement = client.get_agreement(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + export_to_dataset = client.export_to_dataset( + queue_id=queue.id, + dataset_name=payload.get("dataset_name"), + status_filter=payload.get("status_filter"), + timeout=payload.get("timeout") or STATE.timeout, + ) + completed_queue = client.complete_queue(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + deleted_label = client.delete_label(label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) + deleted_queue = client.delete(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + STATE.calls.append({"operation": "annotation-queue/management", "queue_id": queue.id}) + self._write_json( + { + "success": True, + "result": _jsonable( + { + "label": label, + "labels": labels, + "fetched_label": fetched_label, + "queue": queue, + "queues": queues, + "fetched_queue": fetched_queue, + "updated_queue": updated_queue, + "activated_queue": activated_queue, + "add_label": add_label, + "added_items": added_items, + "items": items, + "assigned": assigned, + "imported": imported, + "annotations": annotations, + "skipped": skipped, + "removed_items": removed_items, + "remove_label": remove_label, + "analytics": analytics, + "agreement": agreement, + "export_to_dataset": export_to_dataset, + "completed_queue": completed_queue, + "deleted_label": deleted_label, + "deleted_queue": deleted_queue, + } + ), + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_dataset_lifecycle(self, payload: dict[str, Any]) -> None: try: _ensure_initialized() @@ -240,6 +467,62 @@ def _handle_dataset_lifecycle(self, payload: dict[str, Any]) -> None: except Exception as exc: self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_dataset_management(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + dataset = Dataset.get_dataset_config( + _required(payload, "name"), + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + column_id = dataset.get_column_id(_required(payload, "lookup_column")) + dataset.add_run_prompt( + name=_required(payload, "run_prompt_name"), + model=_required(payload, "model"), + messages=payload.get("messages") or [], + ) + eval_stats = dataset.get_eval_stats() + dataset.add_optimization( + optimization_name=_required(payload, "optimization_name"), + prompt_column_name=_required(payload, "lookup_column"), + ) + dataset.delete() + STATE.calls.append({"operation": "dataset/management", "dataset_id": str(dataset.dataset_config) if dataset.dataset_config else None}) + self._write_json( + { + "success": True, + "result": { + "column_id": column_id, + "eval_stats": _jsonable(eval_stats), + "deleted": True, + }, + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_knowledge_base_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + client = KnowledgeBase( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + name = _required(payload, "name") + updated_name = payload.get("updated_name") or name + client.create_kb(name=name) + client.update_kb(kb_name=name, new_name=updated_name) + client.delete_files_from_kb(file_names=payload.get("file_names") or [], kb_name=updated_name) + client.delete_kb(kb_names=updated_name) + STATE.calls.append({"operation": "knowledge-base/lifecycle", "name": name}) + self._write_json({"success": True, "result": {"deleted": True}}) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_model_log(self, payload: dict[str, Any]) -> None: try: _ensure_initialized() @@ -264,6 +547,60 @@ def _handle_model_log(self, payload: dict[str, Any]) -> None: except Exception as exc: self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_prompt_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + template = PromptTemplate( + name=_required(payload, "name"), + messages=[UserMessage(content=_required(payload, "message"))], + model_configuration=ModelConfig(model_name=_required(payload, "model")), + ) + prompt = Prompt( + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + timeout=STATE.timeout, + ) + prompt.template = template + prompt.generate(_required(payload, "generate_requirements")) + prompt.improve(_required(payload, "improve_requirements")) + compiled = prompt.compile(**(payload.get("variables") or {})) + prompt.create(label=payload.get("label")) + prompt.commit_current_version( + message=payload.get("commit_message") or "", + set_default=bool(payload.get("set_default")), + ) + fetched = Prompt.get_template_by_name( + _required(payload, "name"), + label=payload.get("label"), + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + ) + labels = prompt.list_labels() + template_labels = Prompt.get_template_labels( + template_name=_required(payload, "name"), + fi_api_key=STATE.api_key, + fi_secret_key=STATE.secret_key, + fi_base_url=STATE.base_url, + ) + prompt.delete() + STATE.calls.append({"operation": "prompt/lifecycle", "template": payload.get("name")}) + self._write_json( + { + "success": True, + "result": { + "compiled": _jsonable(compiled), + "fetched_template": _jsonable(fetched.template), + "labels": _jsonable(labels), + "template_labels": _jsonable(template_labels), + "deleted": True, + }, + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_annotation_log(self, payload: dict[str, Any]) -> None: try: _ensure_initialized() @@ -408,10 +745,12 @@ def _response_payload(response: Any) -> dict[str, Any]: def _jsonable(value: Any) -> Any: + if isinstance(value, Enum): + return value.value if hasattr(value, "model_dump"): - return value.model_dump() + return _jsonable(value.model_dump()) if hasattr(value, "dict"): - return value.dict() + return _jsonable(value.dict()) if isinstance(value, dict): return {key: _jsonable(item) for key, item in value.items()} if isinstance(value, list): From 9b3030fe85ce761ce174acf918a002d345c6007c Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 21:10:12 +0530 Subject: [PATCH 06/15] Add TypeScript SDK compliance coverage --- .dockerignore | 9 + .github/workflows/sdk-compliance.yml | 38 ++ typescript/futureagi/.dockerignore | 6 + .../annotations/__tests__/annotation.test.ts | 23 +- .../futureagi/src/annotations/annotation.ts | 3 +- typescript/futureagi/src/api/apikeys.ts | 3 +- typescript/futureagi/src/api/auth.ts | 3 +- typescript/futureagi/src/datasets/dataset.ts | 96 +++- typescript/futureagi/src/datasets/index.ts | 1 + typescript/futureagi/src/datasets/types.ts | 4 +- .../src/kb/__tests__/knowledgeBase.test.ts | 8 +- typescript/futureagi/src/kb/client.ts | 8 +- typescript/futureagi/src/prompt/client.ts | 139 +++-- typescript/futureagi/src/prompt/labels.ts | 7 +- typescript/futureagi/src/queues/client.ts | 6 +- typescript/futureagi/src/utils/routes.ts | 4 +- .../futureagi/tests/compliance/Dockerfile | 15 + .../futureagi/tests/compliance/README.md | 47 ++ .../futureagi/tests/compliance/adapter.ts | 508 ++++++++++++++++++ 19 files changed, 857 insertions(+), 71 deletions(-) create mode 100644 .dockerignore create mode 100644 typescript/futureagi/.dockerignore create mode 100644 typescript/futureagi/tests/compliance/Dockerfile create mode 100644 typescript/futureagi/tests/compliance/README.md create mode 100644 typescript/futureagi/tests/compliance/adapter.ts diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a58e6c0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.git +**/node_modules +**/dist +**/coverage +**/.pytest_cache +**/__pycache__ +**/*.pyc +**/*.tsbuildinfo +*.log diff --git a/.github/workflows/sdk-compliance.yml b/.github/workflows/sdk-compliance.yml index ba55182..5d09d21 100644 --- a/.github/workflows/sdk-compliance.yml +++ b/.github/workflows/sdk-compliance.yml @@ -5,6 +5,7 @@ on: paths: - ".github/workflows/sdk-compliance.yml" - "python/**" + - "typescript/futureagi/**" - "tests/compliance/**" push: branches: @@ -13,6 +14,7 @@ on: paths: - ".github/workflows/sdk-compliance.yml" - "python/**" + - "typescript/futureagi/**" - "tests/compliance/**" workflow_dispatch: @@ -53,3 +55,39 @@ jobs: adapter-dockerfile: tests/compliance/python/Dockerfile adapter-context: "." report-name: futureagi-sdk-python-compliance-report + + typescript-tests: + name: TypeScript SDK tests + runs-on: ubuntu-latest + timeout-minutes: 15 + defaults: + run: + working-directory: typescript/futureagi + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: npm + cache-dependency-path: typescript/futureagi/package-lock.json + + - name: Install TypeScript SDK + run: npm ci + + - name: Type check + run: npm run typecheck + + - name: Run TypeScript tests + run: npm test -- --runInBand + + typescript-compliance: + name: TypeScript SDK compliance + needs: typescript-tests + uses: future-agi/futureagi-sdk-test-harness/.github/workflows/test-sdk.yml@main + with: + adapter-dockerfile: typescript/futureagi/tests/compliance/Dockerfile + adapter-context: "." + report-name: futureagi-sdk-typescript-compliance-report diff --git a/typescript/futureagi/.dockerignore b/typescript/futureagi/.dockerignore new file mode 100644 index 0000000..84227d4 --- /dev/null +++ b/typescript/futureagi/.dockerignore @@ -0,0 +1,6 @@ +node_modules +dist +coverage +.npm +*.log +*.tsbuildinfo diff --git a/typescript/futureagi/src/annotations/__tests__/annotation.test.ts b/typescript/futureagi/src/annotations/__tests__/annotation.test.ts index 5bfd461..d1e7c43 100644 --- a/typescript/futureagi/src/annotations/__tests__/annotation.test.ts +++ b/typescript/futureagi/src/annotations/__tests__/annotation.test.ts @@ -2,9 +2,6 @@ import { describe, it, expect, beforeEach, jest } from '@jest/globals'; import { Annotation } from '../annotation'; import { AnnotationRecord, BulkAnnotationResponse } from '../types'; -// Mock the auth and request functionality -jest.mock('../../api/auth'); - describe('Annotation', () => { let annotationClient: Annotation; let mockRequest: jest.MockedFunction; @@ -51,7 +48,8 @@ describe('Annotation', () => { mockRequest .mockResolvedValueOnce({ data: mockProjects }) // listProjects .mockResolvedValueOnce({ data: { result: mockLabels } }) // getLabels - .mockResolvedValueOnce({ data: mockLabels }) // getLabels again for second annotation + .mockResolvedValueOnce({ data: mockProjects }) // listProjects again for second annotation + .mockResolvedValueOnce({ data: { result: mockLabels } }) // getLabels again for second annotation .mockResolvedValueOnce({ data: { result: mockResponse } }); // logAnnotations const records: AnnotationRecord[] = [ @@ -68,10 +66,10 @@ describe('Annotation', () => { }); expect(result).toEqual(mockResponse); - expect(mockRequest).toHaveBeenCalledTimes(4); + expect(mockRequest).toHaveBeenCalledTimes(5); // Verify the final request to bulk annotation endpoint - const finalCall = mockRequest.mock.calls[3]; + const finalCall = mockRequest.mock.calls[4]; expect(finalCall[0].url).toContain('tracer/bulk-annotation/'); expect(finalCall[0].data.records).toHaveLength(1); expect(finalCall[0].data.records[0]).toEqual({ @@ -102,6 +100,7 @@ describe('Annotation', () => { mockRequest .mockResolvedValueOnce({ data: mockProjects }) .mockResolvedValueOnce({ data: { result: mockLabels } }) + .mockResolvedValueOnce({ data: mockProjects }) .mockResolvedValueOnce({ data: { result: mockLabels } }) .mockResolvedValueOnce({ data: { @@ -135,7 +134,7 @@ describe('Annotation', () => { expect(result.annotations_created).toBe(2); // Verify backend format - const finalCall = mockRequest.mock.calls[3]; + const finalCall = mockRequest.mock.calls[4]; expect(finalCall[0].data.records).toHaveLength(2); }); @@ -151,9 +150,13 @@ describe('Annotation', () => { mockRequest .mockResolvedValueOnce({ data: [{ id: 'proj-1', name: 'Test' }] }) .mockResolvedValueOnce({ data: mockLabels }) + .mockResolvedValueOnce({ data: [{ id: 'proj-1', name: 'Test' }] }) .mockResolvedValueOnce({ data: mockLabels }) + .mockResolvedValueOnce({ data: [{ id: 'proj-1', name: 'Test' }] }) .mockResolvedValueOnce({ data: mockLabels }) + .mockResolvedValueOnce({ data: [{ id: 'proj-1', name: 'Test' }] }) .mockResolvedValueOnce({ data: mockLabels }) + .mockResolvedValueOnce({ data: [{ id: 'proj-1', name: 'Test' }] }) .mockResolvedValueOnce({ data: mockLabels }) .mockResolvedValueOnce({ data: { @@ -180,7 +183,7 @@ describe('Annotation', () => { await annotationClient.logAnnotations(records, { projectName: 'Test' }); - const finalCall = mockRequest.mock.calls[6]; + const finalCall = mockRequest.mock.calls[10]; const backendRecord = finalCall[0].data.records[0]; expect(backendRecord.annotations).toHaveLength(5); @@ -352,7 +355,7 @@ describe('Annotation', () => { mockRequest.mockRejectedValueOnce(authError); - await expect(annotationClient.getLabels()).rejects.toThrow('Invalid authentication'); + await expect(annotationClient.getLabels()).rejects.toThrow('Invalid FI Client Authentication'); }); it('should handle general API errors', async () => { @@ -367,4 +370,4 @@ describe('Annotation', () => { await expect(annotationClient.getLabels()).rejects.toThrow('Failed to fetch annotation labels'); }); }); -}); \ No newline at end of file +}); diff --git a/typescript/futureagi/src/annotations/annotation.ts b/typescript/futureagi/src/annotations/annotation.ts index 452aa75..51cd804 100644 --- a/typescript/futureagi/src/annotations/annotation.ts +++ b/typescript/futureagi/src/annotations/annotation.ts @@ -1,5 +1,6 @@ import { APIKeyAuth } from '../api/auth'; -import { HttpMethod, RequestConfig } from '../api/types'; +import { HttpMethod } from '../api/types'; +import type { RequestConfig } from '../api/types'; import { Routes } from '../utils/routes'; import { SDKException, InvalidAuthError } from '../utils/errors'; import { diff --git a/typescript/futureagi/src/api/apikeys.ts b/typescript/futureagi/src/api/apikeys.ts index 64e840a..c6deb2a 100644 --- a/typescript/futureagi/src/api/apikeys.ts +++ b/typescript/futureagi/src/api/apikeys.ts @@ -1,6 +1,7 @@ import { APIKeyAuth, ResponseHandler } from './auth'; import { AUTH_ENVVAR_NAME, get_base_url } from '../utils/constants'; -import { ModelProvider, ApiKey, RequestConfig, HttpMethod } from './types'; +import { ModelProvider, HttpMethod } from './types'; +import type { ApiKey, RequestConfig } from './types'; import { Routes } from '../utils/routes'; import { AxiosResponse } from 'axios'; diff --git a/typescript/futureagi/src/api/auth.ts b/typescript/futureagi/src/api/auth.ts index 000a02e..b28c10a 100644 --- a/typescript/futureagi/src/api/auth.ts +++ b/typescript/futureagi/src/api/auth.ts @@ -13,7 +13,8 @@ import { DEFAULT_SETTINGS, get_base_url } from '../utils/constants'; -import { RequestConfig, HttpMethod, ModelProvider } from './types'; +import { HttpMethod } from './types'; +import type { RequestConfig } from './types'; /** * Generic response handler for parsing and validating HTTP responses diff --git a/typescript/futureagi/src/datasets/dataset.ts b/typescript/futureagi/src/datasets/dataset.ts index 73f4493..59506f2 100644 --- a/typescript/futureagi/src/datasets/dataset.ts +++ b/typescript/futureagi/src/datasets/dataset.ts @@ -3,8 +3,10 @@ import { v4 as uuidv4 } from 'uuid'; import * as fs from 'fs'; import * as path from 'path'; import FormData from 'form-data'; -import { APIKeyAuth, APIKeyAuthConfig, ResponseHandler } from '../api/auth'; -import { HttpMethod, RequestConfig } from '../api/types'; +import { APIKeyAuth, ResponseHandler } from '../api/auth'; +import type { APIKeyAuthConfig } from '../api/auth'; +import { HttpMethod } from '../api/types'; +import type { RequestConfig } from '../api/types'; import { Routes } from '../utils/routes'; import { DEFAULT_SETTINGS } from '../utils/constants'; import { @@ -17,12 +19,6 @@ import { ServiceUnavailableError, } from '../utils/errors'; import { - DatasetConfig, - DatasetTable, - HuggingfaceDatasetConfig, - Column, - Row, - Cell, createColumn, createRow, createCell, @@ -31,6 +27,14 @@ import { SourceChoices, ModelTypes, } from './types'; +import type { + DatasetConfig, + DatasetTable, + HuggingfaceDatasetConfig, + Column, + Row, + Cell, +} from './types'; const DEFAULT_API_TIMEOUT = 30000; // 30 seconds in milliseconds @@ -739,17 +743,83 @@ export class Dataset extends APIKeyAuth { throw new DatasetValidationError("Prompt column name cannot be empty."); } + const validOptimizeTypes = ["PROMPT_TEMPLATE", "MODEL_PARAMETERS", "HYBRID"]; + if (!validOptimizeTypes.includes(optimizeType)) { + throw new DatasetValidationError( + `Invalid optimizeType: '${optimizeType}'. Must be one of: ${validOptimizeTypes.join(", ")}` + ); + } + + const columnId = await this.getColumnId(promptColumnName); + if (!columnId) { + throw new DatasetError( + `Prompt column '${promptColumnName}' not found in dataset '${this._datasetConfig.name}'` + ); + } + + let evalTemplateIds: string[] = []; + try { + class MetricsByColumnResponseHandler extends ResponseHandler { + static _parseSuccess(response: AxiosResponse): any { + return response.data; + } + } + + const metricsResponse = await this.request( + { + method: HttpMethod.GET, + url: `${this._baseUrl}/model-hub/metrics/by-column/`, + params: { column_id: columnId }, + timeout: DEFAULT_API_TIMEOUT, + }, + MetricsByColumnResponseHandler + ) as Record; + const metrics = metricsResponse?.result ?? []; + if (Array.isArray(metrics)) { + evalTemplateIds = metrics + .map((metric: Record) => metric.id) + .filter((id: unknown): id is string => typeof id === "string" && id.length > 0); + } + } catch { + evalTemplateIds = []; + } + + if (evalTemplateIds.length === 0) { + const evalStats = await this.getEvalStats(); + const stats = Array.isArray(evalStats?.result) + ? evalStats.result + : Array.isArray(evalStats) + ? evalStats + : []; + evalTemplateIds = stats + .map((metric: Record) => metric.id) + .filter((id: unknown): id is string => typeof id === "string" && id.length > 0); + } + + if (evalTemplateIds.length === 0) { + throw new DatasetError( + `No evaluation templates found for optimization in dataset '${this._datasetConfig.name}'.` + ); + } + + const userEvalTemplateMapping = Object.fromEntries( + evalTemplateIds.map((id) => [String(id), String(id)]) + ); + const url = `${this._baseUrl}/${Routes.dataset_optimization_create}`; await this.request( { method: HttpMethod.POST, url, json: { - dataset_id: this._datasetConfig.id, - optimization_name: optimizationName, - prompt_column_name: promptColumnName, + name: optimizationName, + column_id: columnId, optimize_type: optimizeType, - model_config: modelConfig, + user_eval_template_ids: evalTemplateIds, + dataset_id: this._datasetConfig.id, + model_config: modelConfig || {}, + messages: [], + user_eval_template_mapping: userEvalTemplateMapping, }, timeout: DEFAULT_API_TIMEOUT, }, @@ -1037,4 +1107,4 @@ export class Dataset extends APIKeyAuth { throw err; } } -} \ No newline at end of file +} diff --git a/typescript/futureagi/src/datasets/index.ts b/typescript/futureagi/src/datasets/index.ts index 22b26fd..eaaf9c1 100644 --- a/typescript/futureagi/src/datasets/index.ts +++ b/typescript/futureagi/src/datasets/index.ts @@ -5,6 +5,7 @@ export { Dataset, DatasetResponseHandler } from './dataset'; export { DataTypeChoices, SourceChoices, + ModelTypes, DataTypeUtils, createColumn, createRow, diff --git a/typescript/futureagi/src/datasets/types.ts b/typescript/futureagi/src/datasets/types.ts index 8b04fec..e744464 100644 --- a/typescript/futureagi/src/datasets/types.ts +++ b/typescript/futureagi/src/datasets/types.ts @@ -108,7 +108,7 @@ export interface Row { export interface DatasetConfig { id?: string; name: string; - model_type?: ModelTypes.GENERATIVE_LLM; + model_type?: ModelTypes; column_order?: string[]; } @@ -298,4 +298,4 @@ export type { DatasetConfig as DatasetConfigType, HuggingfaceDatasetConfig as HuggingfaceDatasetConfigType, DatasetTable as DatasetTableType, -}; \ No newline at end of file +}; diff --git a/typescript/futureagi/src/kb/__tests__/knowledgeBase.test.ts b/typescript/futureagi/src/kb/__tests__/knowledgeBase.test.ts index dfc51ca..b700915 100644 --- a/typescript/futureagi/src/kb/__tests__/knowledgeBase.test.ts +++ b/typescript/futureagi/src/kb/__tests__/knowledgeBase.test.ts @@ -85,7 +85,11 @@ describe('KnowledgeBase SDK – happy path', () => { }); it('creates a knowledge base', async () => { - kb = new KnowledgeBase(); + kb = new KnowledgeBase(undefined, { + fiApiKey: 'test-api-key', + fiSecretKey: 'test-secret-key', + fiBaseUrl: 'http://localhost:8000', + }); await kb.createKb(TEST_KB_NAME, [TEST_FILE_1, TEST_FILE_3]); expect(kb).toBeDefined(); @@ -112,4 +116,4 @@ describe('KnowledgeBase SDK – happy path', () => { await kb.deleteKb({ kbIds: kb.kb?.id }); expect(kb.kb).toBeUndefined(); }); -}); \ No newline at end of file +}); diff --git a/typescript/futureagi/src/kb/client.ts b/typescript/futureagi/src/kb/client.ts index 2d9ce42..876bc2a 100644 --- a/typescript/futureagi/src/kb/client.ts +++ b/typescript/futureagi/src/kb/client.ts @@ -1,5 +1,6 @@ import { APIKeyAuth, ResponseHandler } from '../api/auth'; -import { RequestConfig, HttpMethod } from '../api/types'; +import { HttpMethod } from '../api/types'; +import type { RequestConfig } from '../api/types'; import { Routes } from '../utils/routes'; import { KnowledgeBaseConfig, @@ -360,7 +361,8 @@ export class KnowledgeBase extends APIKeyAuth { // Handle optional files const files: Record = {}; - if (filePaths) { + const hasFilePaths = Array.isArray(filePaths) ? filePaths.length > 0 : Boolean(filePaths); + if (hasFilePaths) { await this._checkFilePaths(filePaths); this._validFilePaths.forEach((filePath, idx) => { @@ -560,4 +562,4 @@ export class KnowledgeBase extends APIKeyAuth { } } -export default KnowledgeBase; \ No newline at end of file +export default KnowledgeBase; diff --git a/typescript/futureagi/src/prompt/client.ts b/typescript/futureagi/src/prompt/client.ts index 15e3b07..dcd0f8d 100644 --- a/typescript/futureagi/src/prompt/client.ts +++ b/typescript/futureagi/src/prompt/client.ts @@ -1,12 +1,14 @@ import { AxiosResponse } from 'axios'; import { APIKeyAuth, - APIKeyAuthConfig, ResponseHandler, } from '../api/auth'; -import { HttpMethod, RequestConfig } from '../api/types'; +import type { APIKeyAuthConfig } from '../api/auth'; +import { HttpMethod } from '../api/types'; +import type { RequestConfig } from '../api/types'; import { Routes } from '../utils/routes'; -import { ModelConfig, PromptTemplate, MessageBase, Variables } from './types'; +import { ModelConfig, PromptTemplate, MessageBase } from './types'; +import type { Variables } from './types'; import { PromptLabels, setDefaultVersion as labelsSetDefaultVersion, getTemplateLabels as labelsGetTemplateLabels, assignLabelToTemplateVersion as labelsAssign, removeLabelFromTemplateVersion as labelsRemove } from './labels'; import { InvalidAuthError, @@ -90,6 +92,7 @@ class PromptResponseHandler extends ResponseHandler< public static _parseSuccess(response: AxiosResponse): any { const { data } = response; + const payload = data?.result ?? data; const url = response.config.url ?? ''; const method = response.config.method?.toUpperCase() ?? 'GET'; @@ -102,20 +105,23 @@ class PromptResponseHandler extends ResponseHandler< throw new SDKException(`No template found with the given name: ${name}`); } - // GET template by ID endpoint - if (method === HttpMethod.GET && !url.endsWith('/')) { + // GET template by ID endpoint. + if (method === HttpMethod.GET && url.includes('/prompt-templates/') && !url.includes('prompt-labels')) { // Heuristic: treat as single-template retrieval by ID - return this._toPromptTemplate(data); + return this._toPromptTemplate(payload); } // GET template by name endpoint – keep parity with Python SDK behaviour - if (method === HttpMethod.GET && url.includes(Routes.get_template_by_name)) { - return this._toPromptTemplate(data); + if ( + method === HttpMethod.GET && + (url.includes(Routes.get_template_by_name) || url.includes(Routes.prompt_label_get_by_name)) + ) { + return this._toPromptTemplate(payload); } // POST create template endpoint returns { result: {...} } if (method === HttpMethod.POST && url.endsWith(Routes.create_template)) { - return data.result ?? data; + return payload; } // Fallback to raw payload @@ -331,35 +337,74 @@ export class Prompt extends APIKeyAuth { } /** - * Create a new draft prompt template. + * Generate prompt text from requirements and update the last message. */ - async open(): Promise { + async generate(requirements: string): Promise { if (!this.template) { - throw new SDKException('template must be set'); + throw new SDKException('No template configured'); } - // If template already has an ID it's already created – just return the client. - if (this.template.id) { - return this; + const response = await this.request( + { + method: HttpMethod.POST, + url: `${this.baseUrl}/${Routes.generate_prompt}`, + json: { statement: requirements }, + } as RequestConfig, + PromptResponseHandler, + ) as Record; + + if (this.template.messages.length === 0) { + this.template.messages.push(new MessageBase('user', response?.result?.prompt ?? response?.prompt ?? '')); + } else { + this.template.messages[this.template.messages.length - 1].content = response?.result?.prompt ?? response?.prompt ?? ''; } - // Attempt to fetch existing template by name; propagate any errors. - if (this.template.name) { - try { - const remote = await Prompt.getTemplateByName(this.template.name, { - fiApiKey: this.fiApiKey, - fiSecretKey: this.fiSecretKey, - fiBaseUrl: this.baseUrl, - }); + return this; + } - // Found existing template – adopt it and return immediately - this.template = remote; - return this; - } catch (err) { - // In production, treat any error during lookup as "not found" and proceed to create - // This handles cases where the lookup endpoint is unstable but create works - // Template truly does not exist – proceed to create below - } + /** + * Improve the current prompt text from requirements and update the last message. + */ + async improve(requirements: string): Promise { + if (!this.template) { + throw new SDKException('No template configured'); + } + + const existingPrompt = this.template.messages.length + ? this.template.messages[this.template.messages.length - 1].content + : ''; + + const response = await this.request( + { + method: HttpMethod.POST, + url: `${this.baseUrl}/${Routes.improve_prompt}`, + json: { + existing_prompt: existingPrompt, + improvement_requirements: requirements, + }, + } as RequestConfig, + PromptResponseHandler, + ) as Record; + + if (this.template.messages.length === 0) { + this.template.messages.push(new MessageBase('user', response?.result?.prompt ?? response?.prompt ?? '')); + } else { + this.template.messages[this.template.messages.length - 1].content = response?.result?.prompt ?? response?.prompt ?? ''; + } + + return this; + } + + /** + * Create a new draft prompt template. + */ + async create(options: { label?: string } = {}): Promise { + if (!this.template) { + throw new SDKException('template must be set'); + } + + if (this.template.id) { + throw new TemplateAlreadyExists(this.template.name ?? ''); } // Transform messages into backend-friendly format @@ -405,10 +450,42 @@ export class Prompt extends APIKeyAuth { this.template.id = response.id; this.template.name = response.name; this.template.version = response.template_version ?? response.created_version ?? 'v1'; + if (options.label != null) { + this._pendingLabel = options.label; + } return this; } + /** + * Open an existing template by name if it exists; otherwise create a new draft. + */ + async open(): Promise { + if (!this.template) { + throw new SDKException('template must be set'); + } + + if (this.template.id) { + return this; + } + + if (this.template.name) { + try { + const remote = await Prompt.getTemplateByName(this.template.name, { + fiApiKey: this.fiApiKey, + fiSecretKey: this.fiSecretKey, + fiBaseUrl: this.baseUrl, + }); + this.template = remote; + return this; + } catch { + // Missing remote template falls through to draft creation. + } + } + + return this.create(); + } + private async _createNewDraft(): Promise { if (!this.template || !this.template.id) { throw new SDKException('Template must be created before creating a new version.'); diff --git a/typescript/futureagi/src/prompt/labels.ts b/typescript/futureagi/src/prompt/labels.ts index d08b0da..dde9ccb 100644 --- a/typescript/futureagi/src/prompt/labels.ts +++ b/typescript/futureagi/src/prompt/labels.ts @@ -1,7 +1,9 @@ import type { AxiosResponse } from 'axios'; import type { Prompt } from './client'; -import { APIKeyAuth, APIKeyAuthConfig } from '../api/auth'; -import { HttpMethod, RequestConfig } from '../api/types'; +import { APIKeyAuth } from '../api/auth'; +import type { APIKeyAuthConfig } from '../api/auth'; +import { HttpMethod } from '../api/types'; +import type { RequestConfig } from '../api/types'; import { Routes } from '../utils/routes'; import { SDKException } from '../utils/errors'; @@ -258,4 +260,3 @@ export async function removeLabelFromTemplateVersion( } } - diff --git a/typescript/futureagi/src/queues/client.ts b/typescript/futureagi/src/queues/client.ts index 8de1e0a..c570072 100644 --- a/typescript/futureagi/src/queues/client.ts +++ b/typescript/futureagi/src/queues/client.ts @@ -14,8 +14,10 @@ * ``` */ -import { APIKeyAuth, APIKeyAuthConfig, ResponseHandler } from '../api/auth'; -import { HttpMethod, RequestConfig } from '../api/types'; +import { APIKeyAuth, ResponseHandler } from '../api/auth'; +import type { APIKeyAuthConfig } from '../api/auth'; +import { HttpMethod } from '../api/types'; +import type { RequestConfig } from '../api/types'; import { SDKException } from '../utils/errors'; import { Routes } from '../utils/routes'; import type { AnnotationLabel } from '../annotations/types'; diff --git a/typescript/futureagi/src/utils/routes.ts b/typescript/futureagi/src/utils/routes.ts index 9e3a802..9abb52b 100644 --- a/typescript/futureagi/src/utils/routes.ts +++ b/typescript/futureagi/src/utils/routes.ts @@ -50,8 +50,8 @@ export const Routes = { improve_prompt: "model-hub/prompt-templates/improve-prompt/", run_template: "model-hub/prompt-templates/{template_id}/run_template/", create_template: "model-hub/prompt-templates/create-draft/", - delete_template: "model-hub/prompt-templates/{template_id}", - get_template_by_id: "model-hub/prompt-templates/{template_id}", + delete_template: "model-hub/prompt-templates/{template_id}/", + get_template_by_id: "model-hub/prompt-templates/{template_id}/", get_template_id_by_name: "model-hub/prompt-templates/", list_templates: "model-hub/prompt-templates/", get_template_by_name: "model-hub/prompt-templates/get-template-by-name/", diff --git a/typescript/futureagi/tests/compliance/Dockerfile b/typescript/futureagi/tests/compliance/Dockerfile new file mode 100644 index 0000000..e94d1eb --- /dev/null +++ b/typescript/futureagi/tests/compliance/Dockerfile @@ -0,0 +1,15 @@ +FROM node:20-slim + +WORKDIR /workspace/typescript/futureagi + +COPY typescript/futureagi/package.json typescript/futureagi/package-lock.json ./ +RUN npm ci --ignore-scripts + +COPY typescript/tsconfig.base*.json /workspace/typescript/ +COPY typescript/futureagi/tsconfig*.json ./ +COPY typescript/futureagi/src ./src +COPY typescript/futureagi/tests/compliance ./tests/compliance + +ENV PORT=8080 + +CMD ["npx", "tsx", "tests/compliance/adapter.ts"] diff --git a/typescript/futureagi/tests/compliance/README.md b/typescript/futureagi/tests/compliance/README.md new file mode 100644 index 0000000..ab62f3a --- /dev/null +++ b/typescript/futureagi/tests/compliance/README.md @@ -0,0 +1,47 @@ +# Future AGI TypeScript SDK Compliance Adapter + +Thin HTTP adapter used by `futureagi-sdk-test-harness`. + +It wraps the TypeScript `@future-agi/sdk` package and exposes the shared adapter contract: + +- `GET /health` +- `POST /init` +- `POST /reset` +- `GET /state` +- `POST /raw-request` +- `POST /annotation/log` +- `POST /annotation/metadata` +- `POST /annotation-queue/lifecycle` +- `POST /annotation-queue/management` +- `POST /annotation-score/lifecycle` +- `POST /dataset/lifecycle` +- `POST /dataset/management` +- `POST /knowledge-base/lifecycle` +- `POST /prompt/lifecycle` +- `POST /provider-api-key/lifecycle` + +`model_log_lifecycle_e2e` is intentionally not claimed yet because this TypeScript package does not expose the model logging client that exists in the Python SDK. + +## Local Run + +From `typescript/futureagi`: + +```bash +npm ci +PORT=8080 npx tsx tests/compliance/adapter.ts +``` + +Then run the harness from `../futureagi-sdk-test-harness`: + +```bash +uv run futureagi-sdk-test-harness run --adapter-url http://127.0.0.1:8080 +``` + +## Docker + +From the `futureagi-sdk` repo root: + +```bash +docker build -f typescript/futureagi/tests/compliance/Dockerfile -t futureagi-sdk-typescript-adapter . +docker run --rm -p 8080:8080 futureagi-sdk-typescript-adapter +``` diff --git a/typescript/futureagi/tests/compliance/adapter.ts b/typescript/futureagi/tests/compliance/adapter.ts new file mode 100644 index 0000000..5eadb64 --- /dev/null +++ b/typescript/futureagi/tests/compliance/adapter.ts @@ -0,0 +1,508 @@ +import http from 'node:http'; +import { URL } from 'node:url'; +import { + Annotation, + AnnotationQueue, + APIKeyAuth, + DataTypeChoices, + Dataset, + HttpMethod, + KnowledgeBase, + ModelConfig, + ModelProvider, + ModelTypes, + Prompt, + PromptTemplate, + ProviderAPIKeyClient, + UserMessage, +} from '../../src'; +import type { RequestConfig } from '../../src'; + +type JsonRecord = Record; + +interface AdapterState { + apiKey?: string; + secretKey?: string; + baseUrl?: string; + timeout?: number; + calls: JsonRecord[]; +} + +const state: AdapterState = { calls: [] }; + +const capabilities = [ + 'auth_api_key', + 'raw_request', + 'annotation_bulk_log', + 'annotation_metadata_lifecycle', + 'annotation_queue_lifecycle', + 'annotation_queue_management_lifecycle', + 'annotation_score_lifecycle', + 'dataset_lifecycle', + 'dataset_management_lifecycle', + 'knowledge_base_lifecycle', + 'prompt_lifecycle', + 'provider_api_key_lifecycle', +]; + +const server = http.createServer(async (req, res) => { + const url = new URL(req.url ?? '/', 'http://127.0.0.1'); + try { + if (req.method === 'GET' && url.pathname === '/health') { + writeJson(res, 200, { + sdk_name: 'futureagi-sdk-typescript', + sdk_version: process.env.npm_package_version ?? '0.1.2', + adapter_version: '0.1.0', + language: 'typescript', + capabilities, + }); + return; + } + + if (req.method === 'GET' && url.pathname === '/state') { + writeJson(res, 200, { + initialized: state.baseUrl != null, + base_url: state.baseUrl, + calls: state.calls, + }); + return; + } + + const payload = await readJson(req); + + if (req.method === 'POST' && url.pathname === '/reset') { + state.apiKey = undefined; + state.secretKey = undefined; + state.baseUrl = undefined; + state.timeout = undefined; + state.calls = []; + writeJson(res, 200, { success: true }); + return; + } + + if (req.method === 'POST' && url.pathname === '/init') { + state.apiKey = required(payload, 'api_key'); + state.secretKey = required(payload, 'secret_key'); + state.baseUrl = String(required(payload, 'base_url')).replace(/\/$/, ''); + state.timeout = Number(payload.timeout ?? 30); + state.calls.push({ operation: 'init', base_url: state.baseUrl }); + writeJson(res, 200, { success: true }); + return; + } + + const handlers: Record Promise> = { + '/raw-request': handleRawRequest, + '/annotation/log': handleAnnotationLog, + '/annotation/metadata': handleAnnotationMetadata, + '/annotation-queue/lifecycle': handleAnnotationQueueLifecycle, + '/annotation-queue/management': handleAnnotationQueueManagement, + '/annotation-score/lifecycle': handleAnnotationScoreLifecycle, + '/dataset/lifecycle': handleDatasetLifecycle, + '/dataset/management': handleDatasetManagement, + '/knowledge-base/lifecycle': handleKnowledgeBaseLifecycle, + '/prompt/lifecycle': handlePromptLifecycle, + '/provider-api-key/lifecycle': handleProviderApiKeyLifecycle, + }; + + const handler = handlers[url.pathname]; + if (req.method === 'POST' && handler) { + writeJson(res, 200, await handler(payload)); + return; + } + + writeJson(res, 404, { error: 'not found' }); + } catch (error: any) { + writeJson(res, 500, { + success: false, + error: error?.message ?? String(error), + }); + } +}); + +const port = Number(process.env.PORT ?? 8080); +server.listen(port, '0.0.0.0', () => { + console.log(`futureagi-sdk TypeScript compliance adapter listening on :${port}`); +}); + +async function handleRawRequest(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new APIKeyAuth(authOptions()); + const path = String(required(payload, 'path')).replace(/^\//, ''); + const method = HttpMethod[String(required(payload, 'method')).toUpperCase() as keyof typeof HttpMethod]; + const response = await client.request({ + method, + url: `${state.baseUrl}/${path}`, + params: payload.params, + json: payload.json, + data: payload.data, + timeout: payload.timeout ?? state.timeout, + } as RequestConfig); + await client.close(); + state.calls.push({ operation: 'raw-request', path, method }); + return responsePayload(response); +} + +async function handleAnnotationLog(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new Annotation(authOptions()); + const records = payload.records; + if (!Array.isArray(records)) { + throw new Error('records must be a list'); + } + const result = await client.logAnnotations(records, { + projectName: payload.project_name, + timeout: payload.timeout ?? state.timeout, + }); + await client.close(); + state.calls.push({ operation: 'annotation/log', count: records.length }); + return { success: true, result }; +} + +async function handleAnnotationMetadata(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new Annotation(authOptions()); + const labels = await client.getLabels({ + projectId: payload.project_id, + timeout: payload.timeout ?? state.timeout, + }); + const projects = await client.listProjects({ + projectType: payload.project_type, + name: payload.project_name, + timeout: payload.timeout ?? state.timeout, + }); + await client.close(); + state.calls.push({ operation: 'annotation/metadata', labels: labels.length }); + return { success: true, result: { labels, projects } }; +} + +async function handleAnnotationQueueLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new AnnotationQueue(authOptions()); + const queuePayload = payload.queue ?? {}; + const itemPayload = payload.item ?? {}; + const queue = await client.create({ + name: required(queuePayload, 'name'), + description: queuePayload.description, + requiresReview: queuePayload.requires_review, + annotationsRequired: queuePayload.annotations_required, + }); + const addLabel = await client.addLabel({ queueId: queue.id, labelId: required(payload, 'label_id') }); + const addedItems = await client.addItems(queue.id, [ + { + sourceType: required(itemPayload, 'source_type'), + sourceId: required(itemPayload, 'source_id'), + }, + ]); + const itemId = required(itemPayload, 'id'); + const annotations = annotationInputs(payload.annotations ?? []); + const submitted = await client.submitAnnotations(queue.id, itemId, annotations, { notes: payload.notes }); + const completed = await client.completeItem(queue.id, itemId); + const progress = await client.getProgress(queue.id); + const exported = await client.export(queue.id, { format: 'json', status: 'completed' }); + await client.close(); + state.calls.push({ operation: 'annotation-queue/lifecycle', queue_id: queue.id }); + return { + success: true, + result: { queue, add_label: addLabel, added_items: addedItems, submitted, completed, progress, exported }, + }; +} + +async function handleAnnotationScoreLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new AnnotationQueue(authOptions()); + const sourceType = required(payload, 'source_type'); + const sourceId = required(payload, 'source_id'); + const created = await client.createScore({ + sourceType, + sourceId, + labelId: required(payload, 'label_id'), + value: payload.value, + notes: payload.notes, + }); + const bulk = await client.createScores({ + sourceType, + sourceId, + scores: scoreInputs(payload.bulk_scores ?? []), + }); + const fetched = await client.getScores(sourceType, sourceId); + await client.close(); + state.calls.push({ operation: 'annotation-score/lifecycle', source_id: sourceId }); + return { success: true, result: { created, bulk, fetched } }; +} + +async function handleAnnotationQueueManagement(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new AnnotationQueue(authOptions()); + const labelPayload = payload.label ?? {}; + const queuePayload = payload.queue ?? {}; + const itemPayload = payload.item ?? {}; + const userId = payload.user_id; + + const label = await client.createLabel({ + name: required(labelPayload, 'name'), + type: required(labelPayload, 'type'), + settings: labelPayload.settings, + description: labelPayload.description, + }); + const labels = await client.listLabels(); + const fetchedLabel = await client.getLabel({ labelId: label.id }); + const queue = await client.create({ + name: required(queuePayload, 'name'), + description: queuePayload.description, + instructions: queuePayload.instructions, + requiresReview: queuePayload.requires_review, + annotationsRequired: queuePayload.annotations_required, + }); + const queues = await client.list({ status: queuePayload.status, search: queue.name }); + const fetchedQueue = await client.get(queue.id); + const updatedQueue = await client.update(queue.id, { description: queuePayload.updated_description }); + const activatedQueue = await client.activate(queue.id); + const addLabel = await client.addLabel({ queueId: queue.id, labelId: label.id }); + const addedItems = await client.addItems(queue.id, [ + { + sourceType: required(itemPayload, 'source_type'), + sourceId: required(itemPayload, 'source_id'), + }, + ]); + const items = await client.listItems(queue.id, { status: itemPayload.status, assignedTo: userId }); + const itemId = required(itemPayload, 'id'); + const assigned = await client.assignItems(queue.id, [itemId], userId); + const imported = await client.importAnnotations(queue.id, itemId, annotationInputs(payload.annotations ?? []), { + annotatorId: userId, + }); + const annotations = await client.getAnnotations(queue.id, itemId); + const skipped = await client.skipItem(queue.id, itemId); + const removedItems = await client.removeItems(queue.id, [itemId]); + const removeLabel = await client.removeLabel({ queueId: queue.id, labelId: label.id }); + const analytics = await client.getAnalytics(queue.id); + const agreement = await client.getAgreement(queue.id); + const exportToDataset = await client.exportToDataset(queue.id, { + datasetName: payload.dataset_name, + statusFilter: payload.status_filter, + }); + const completedQueue = await client.completeQueue(queue.id); + const deletedLabel = await client.deleteLabel({ labelId: label.id }); + const deletedQueue = await client.delete(queue.id); + await client.close(); + state.calls.push({ operation: 'annotation-queue/management', queue_id: queue.id }); + return { + success: true, + result: { + label, + labels, + fetched_label: fetchedLabel, + queue, + queues, + fetched_queue: fetchedQueue, + updated_queue: updatedQueue, + activated_queue: activatedQueue, + add_label: addLabel, + added_items: addedItems, + items, + assigned, + imported, + annotations, + skipped, + removed_items: removedItems, + remove_label: removeLabel, + analytics, + agreement, + export_to_dataset: exportToDataset, + completed_queue: completedQueue, + deleted_label: deletedLabel, + deleted_queue: deletedQueue, + }, + }; +} + +async function handleDatasetLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const columns = payload.columns; + const rows = payload.rows; + if (!Array.isArray(columns) || columns.length === 0) { + throw new Error('columns must be a non-empty list'); + } + if (!Array.isArray(rows) || rows.length === 0) { + throw new Error('rows must be a non-empty list'); + } + + const dataset = new Dataset({ + ...authOptions(), + datasetConfig: { + name: required(payload, 'name'), + model_type: ModelTypes[String(required(payload, 'model_type')) as keyof typeof ModelTypes], + }, + }); + await dataset.create(); + await dataset.addColumns(columns.map((column) => ({ + name: required(column, 'name'), + data_type: DataTypeChoices[String(required(column, 'data_type')) as keyof typeof DataTypeChoices], + }))); + await dataset.addRows(rows); + await dataset.close(); + const datasetConfig = dataset.getConfig(); + state.calls.push({ operation: 'dataset/lifecycle', dataset_id: datasetConfig.id }); + return { + success: true, + result: { + dataset: datasetConfig, + columns_added: columns.length, + rows_added: rows.length, + }, + }; +} + +async function handleDatasetManagement(payload: JsonRecord): Promise { + ensureInitialized(); + const datasetConfig = await Dataset.getDatasetConfig(required(payload, 'name'), authOptions()); + const dataset = new Dataset({ ...authOptions(), datasetConfig }); + const columnId = await dataset.getColumnId(required(payload, 'lookup_column')); + await dataset.addRunPrompt({ + name: required(payload, 'run_prompt_name'), + model: required(payload, 'model'), + messages: payload.messages ?? [], + }); + const evalStats = await dataset.getEvalStats(); + await dataset.addOptimization({ + optimizationName: required(payload, 'optimization_name'), + promptColumnName: required(payload, 'lookup_column'), + }); + await dataset.delete(); + await dataset.close(); + state.calls.push({ operation: 'dataset/management', dataset_id: datasetConfig.id }); + return { success: true, result: { column_id: columnId, eval_stats: evalStats, deleted: true } }; +} + +async function handleKnowledgeBaseLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new KnowledgeBase(undefined, authOptions()); + const name = required(payload, 'name'); + const updatedName = payload.updated_name ?? name; + await client.createKb(name); + await client.updateKb({ kbName: name, newName: updatedName }); + const listed = await client.listKbs(updatedName); + await client.deleteFilesFromKb({ kbName: updatedName, fileNames: payload.file_names ?? [] }); + await client.deleteKb({ kbNames: updatedName }); + await client.close(); + state.calls.push({ operation: 'knowledge-base/lifecycle', name }); + return { success: true, result: { listed, deleted: true } }; +} + +async function handlePromptLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const prompt = new Prompt( + new PromptTemplate({ + name: required(payload, 'name'), + messages: [new UserMessage(required(payload, 'message'))], + model_configuration: new ModelConfig({ model_name: required(payload, 'model') }), + }), + authOptions(), + ); + await prompt.generate(required(payload, 'generate_requirements')); + await prompt.improve(required(payload, 'improve_requirements')); + const compiled = prompt.compile(payload.variables ?? {}); + await prompt.create({ label: payload.label }); + await prompt.commitCurrentVersion(payload.commit_message ?? '', Boolean(payload.set_default)); + const fetchedTemplate = await Prompt.getTemplateByName(required(payload, 'name'), { + ...authOptions(), + label: payload.label, + }); + const labels = await prompt.labels().list(); + const templateLabels = await Prompt.getTemplateLabels({ + ...authOptions(), + template_name: required(payload, 'name'), + }); + await prompt.delete(); + await prompt.close(); + state.calls.push({ operation: 'prompt/lifecycle', template: payload.name }); + return { + success: true, + result: { + compiled, + fetched_template: fetchedTemplate, + labels, + template_labels: templateLabels, + deleted: true, + }, + }; +} + +async function handleProviderApiKeyLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const provider = ModelProvider[String(required(payload, 'provider')) as keyof typeof ModelProvider]; + await ProviderAPIKeyClient.setApiKey({ provider, key: required(payload, 'provider_key') }, authOptions()); + const listed = await ProviderAPIKeyClient.listApiKeys(authOptions()); + const fetched = await ProviderAPIKeyClient.getApiKey(provider, authOptions()); + state.calls.push({ operation: 'provider-api-key/lifecycle', provider }); + return { success: true, result: { listed, fetched } }; +} + +function annotationInputs(items: JsonRecord[]): Array<{ labelId: string; value: any; scoreSource?: string }> { + return items.map((item) => ({ + labelId: required(item, 'label_id'), + value: item.value, + scoreSource: item.score_source, + })); +} + +function scoreInputs(items: JsonRecord[]): Array<{ labelId: string; value: any; scoreSource?: string }> { + return annotationInputs(items); +} + +function authOptions() { + return { + fiApiKey: state.apiKey, + fiSecretKey: state.secretKey, + fiBaseUrl: state.baseUrl, + timeout: state.timeout, + }; +} + +function ensureInitialized(): void { + if (!state.apiKey || !state.secretKey || !state.baseUrl) { + throw new Error('adapter is not initialized'); + } +} + +function required(source: JsonRecord, key: string): any { + const value = source[key]; + if (value === undefined || value === null || value === '') { + throw new Error(`missing required field: ${key}`); + } + return value; +} + +function responsePayload(response: any): JsonRecord { + if (response && typeof response === 'object' && 'data' in response) { + return { success: true, status_code: response.status, body: response.data }; + } + return { success: true, body: response }; +} + +function readJson(req: http.IncomingMessage): Promise { + return new Promise((resolve, reject) => { + const chunks: Buffer[] = []; + req.on('data', (chunk) => chunks.push(Buffer.from(chunk))); + req.on('error', reject); + req.on('end', () => { + if (chunks.length === 0) { + resolve({}); + return; + } + try { + resolve(JSON.parse(Buffer.concat(chunks).toString('utf8'))); + } catch (error) { + reject(error); + } + }); + }); +} + +function writeJson(res: http.ServerResponse, status: number, payload: JsonRecord): void { + const body = Buffer.from(JSON.stringify(payload)); + res.writeHead(status, { + 'content-type': 'application/json', + 'content-length': body.length, + }); + res.end(body); +} From 891fd19e6a3330983dc87c37d0b4eb921ec8a65a Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 21:12:48 +0530 Subject: [PATCH 07/15] Fix TypeScript SDK CI install --- .github/workflows/sdk-compliance.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdk-compliance.yml b/.github/workflows/sdk-compliance.yml index 5d09d21..b39c46e 100644 --- a/.github/workflows/sdk-compliance.yml +++ b/.github/workflows/sdk-compliance.yml @@ -74,8 +74,13 @@ jobs: cache: npm cache-dependency-path: typescript/futureagi/package-lock.json + - name: Enable pnpm for package scripts + run: | + corepack enable + corepack prepare pnpm@8.15.0 --activate + - name: Install TypeScript SDK - run: npm ci + run: npm ci --ignore-scripts - name: Type check run: npm run typecheck @@ -83,6 +88,9 @@ jobs: - name: Run TypeScript tests run: npm test -- --runInBand + - name: Build TypeScript SDK + run: npm run build + typescript-compliance: name: TypeScript SDK compliance needs: typescript-tests From 1e918e1d133c64c1229067fc489899f52438af7a Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 20 May 2026 22:29:38 +0530 Subject: [PATCH 08/15] Add TypeScript model logging compliance --- typescript/futureagi/src/client.test.ts | 64 +++++ typescript/futureagi/src/client.ts | 243 ++++++++++++++++++ typescript/futureagi/src/index.ts | 1 + .../futureagi/tests/compliance/adapter.ts | 22 ++ 4 files changed, 330 insertions(+) create mode 100644 typescript/futureagi/src/client.test.ts create mode 100644 typescript/futureagi/src/client.ts diff --git a/typescript/futureagi/src/client.test.ts b/typescript/futureagi/src/client.test.ts new file mode 100644 index 0000000..71675a7 --- /dev/null +++ b/typescript/futureagi/src/client.test.ts @@ -0,0 +1,64 @@ +import { Client, Environments, ModelTypes } from './'; + +describe('Client', () => { + it('logs model conversations with canonical backend payload', async () => { + const client = new Client({ + fiApiKey: 'test-api-key', + fiSecretKey: 'test-secret-key', + fiBaseUrl: 'http://localhost:8000', + }); + const requestMock = jest.spyOn(client as any, 'request').mockResolvedValue({ + status: 'success', + result: { log_id: 'log-123' }, + }); + + const result = await client.log({ + modelId: 'model-e2e', + modelType: ModelTypes.GENERATIVE_LLM, + environment: Environments.PRODUCTION, + modelVersion: 'v1', + predictionTimestamp: 1767225600, + conversation: { + chat_history: [ + { role: 'user', content: 'hello' }, + { role: 'assistant', content: 'hi there' }, + ], + }, + tags: { sdk_compliance: true }, + }); + + expect(result.result.log_id).toBe('log-123'); + expect(requestMock).toHaveBeenCalledWith( + expect.objectContaining({ + method: 'POST', + url: 'http://localhost:8000/sdk/api/v1/log/model/', + json: expect.objectContaining({ + model_id: 'model-e2e', + model_type: 'GenerativeLLM', + environment: 3, + model_version: 'v1', + prediction_timestamp: 1767225600, + tags: { sdk_compliance: true }, + }), + }), + expect.anything(), + ); + }); + + it('validates chat history shape before logging', async () => { + const client = new Client({ + fiApiKey: 'test-api-key', + fiSecretKey: 'test-secret-key', + fiBaseUrl: 'http://localhost:8000', + }); + + await expect( + client.log({ + modelId: 'model-e2e', + modelType: ModelTypes.GENERATIVE_LLM, + environment: Environments.PRODUCTION, + conversation: { chat_history: [{ role: 'user' }] }, + }), + ).rejects.toThrow("Missing required key 'content'"); + }); +}); diff --git a/typescript/futureagi/src/client.ts b/typescript/futureagi/src/client.ts new file mode 100644 index 0000000..b3e89bf --- /dev/null +++ b/typescript/futureagi/src/client.ts @@ -0,0 +1,243 @@ +import type { AxiosResponse } from 'axios'; +import { APIKeyAuth, ResponseHandler } from './api/auth'; +import type { APIKeyAuthConfig } from './api/auth'; +import { HttpMethod } from './api/types'; +import type { RequestConfig } from './api/types'; +import { ModelTypes } from './datasets/types'; +import { + InvalidSupportedType, + InvalidValueType, + MissingRequiredKey, +} from './utils/errors'; +import { + MAX_FUTURE_YEARS_FROM_CURRENT_TIME, + MAX_PAST_YEARS_FROM_CURRENT_TIME, +} from './utils/constants'; +import { Routes } from './utils/routes'; + +export enum Environments { + TRAINING = 1, + VALIDATION = 2, + PRODUCTION = 3, + CORPUS = 4, +} + +type PrimitiveTagValue = string | boolean | number; +type ConversationPayload = Record; + +export interface ModelLogOptions { + modelId: string; + modelType: ModelTypes; + environment: Environments; + modelVersion?: string; + predictionTimestamp?: number; + conversation?: ConversationPayload; + tags?: Record; + timeout?: number; +} + +class ClientResponseHandler extends ResponseHandler, never> { + public static _parseSuccess(response: AxiosResponse): Record { + const data = response.data ?? {}; + if (!('status' in data)) { + return { ...data, status: response.status >= 200 && response.status < 300 ? 'success' : 'error' }; + } + return data; + } +} + +export class Client extends APIKeyAuth { + constructor(options: APIKeyAuthConfig = {}) { + super(options); + } + + async log({ + modelId, + modelType, + environment, + modelVersion, + predictionTimestamp, + conversation, + tags, + timeout, + }: ModelLogOptions): Promise> { + this._validateParams({ + modelId, + modelType, + environment, + modelVersion, + predictionTimestamp, + conversation, + tags, + }); + + return this.request( + { + method: HttpMethod.POST, + url: `${this.baseUrl}/${Routes.log_model}`, + json: { + model_id: modelId, + model_type: modelType, + environment, + model_version: modelVersion, + prediction_timestamp: predictionTimestamp, + conversation, + tags, + }, + timeout, + } as RequestConfig, + ClientResponseHandler, + ) as Promise>; + } + + private _validateParams({ + modelId, + modelType, + environment, + modelVersion, + predictionTimestamp, + conversation, + tags, + }: Omit): void { + if (typeof modelId !== 'string') { + throw new InvalidValueType('model_id', modelId, 'string'); + } + + if (!Object.values(ModelTypes).includes(modelType)) { + throw new InvalidValueType('model_type', modelType, 'ModelTypes'); + } + + if (![ModelTypes.GENERATIVE_LLM, ModelTypes.GENERATIVE_IMAGE].includes(modelType)) { + throw new InvalidSupportedType( + 'model_type', + modelType, + 'ModelTypes.GENERATIVE_LLM, ModelTypes.GENERATIVE_IMAGE', + ); + } + + if (!Object.values(Environments).includes(environment)) { + throw new InvalidValueType('environment', environment, 'Environments'); + } + + if (modelVersion != null && typeof modelVersion !== 'string') { + throw new InvalidValueType('model_version', modelVersion, 'string'); + } + + this._validateConversation(conversation); + this._validateTags(tags); + this._validateTimestamp(predictionTimestamp); + } + + private _validateConversation(conversation?: ConversationPayload): void { + if (conversation == null) return; + if (typeof conversation !== 'object' || Array.isArray(conversation)) { + throw new InvalidValueType('conversation', conversation, 'object'); + } + if (!('chat_history' in conversation) && !('chat_graph' in conversation)) { + throw new MissingRequiredKey('conversation', '[chat_history, chat_graph]'); + } + if ('chat_history' in conversation) { + this._validateChatHistory(conversation.chat_history); + } + if ('chat_graph' in conversation) { + this._validateChatGraph(conversation.chat_graph); + } + } + + private _validateChatHistory(chatHistory: any): void { + if (!Array.isArray(chatHistory)) { + throw new InvalidValueType("conversation['chat_history']", chatHistory, 'array'); + } + for (const item of chatHistory) { + if (typeof item !== 'object' || item == null || Array.isArray(item)) { + throw new InvalidValueType('chat_history item', item, 'object'); + } + for (const key of ['role', 'content']) { + if (!(key in item)) { + throw new MissingRequiredKey('chat_history item', key); + } + } + if (typeof item.role !== 'string') { + throw new InvalidValueType('chat_history role', item.role, 'string'); + } + if (typeof item.content !== 'string') { + throw new InvalidValueType('chat_history content', item.content, 'string'); + } + } + } + + private _validateChatGraph(chatGraph: any): void { + if (typeof chatGraph !== 'object' || chatGraph == null || Array.isArray(chatGraph)) { + throw new InvalidValueType("conversation['chat_graph']", chatGraph, 'object'); + } + for (const key of ['conversation_id', 'nodes']) { + if (!(key in chatGraph)) { + throw new MissingRequiredKey('chat_graph', key); + } + } + if (!Array.isArray(chatGraph.nodes)) { + throw new InvalidValueType("chat_graph['nodes']", chatGraph.nodes, 'array'); + } + for (const node of chatGraph.nodes) { + if (!node?.message) { + throw new MissingRequiredKey('chat_graph node', 'message'); + } + const message = node.message; + for (const key of ['id', 'author', 'content', 'context']) { + if (!(key in message)) { + throw new MissingRequiredKey('message', key); + } + } + for (const key of ['role', 'metadata']) { + if (!(key in message.author)) { + throw new MissingRequiredKey('author', key); + } + } + if (!['assistant', 'user', 'system'].includes(message.author.role)) { + throw new InvalidValueType('author role', message.author.role, 'one of: assistant, user, system'); + } + for (const key of ['content_type', 'parts']) { + if (!(key in message.content)) { + throw new MissingRequiredKey('content', key); + } + } + if (!Array.isArray(message.content.parts)) { + throw new InvalidValueType('content parts', message.content.parts, 'array'); + } + } + } + + private _validateTags(tags?: Record): void { + if (tags == null) return; + if (typeof tags !== 'object' || Array.isArray(tags)) { + throw new InvalidValueType('tags', tags, 'object'); + } + for (const [key, value] of Object.entries(tags)) { + if (typeof key !== 'string') { + throw new InvalidValueType(`tags key '${key}'`, key, 'string'); + } + if (!['string', 'boolean', 'number'].includes(typeof value)) { + throw new InvalidValueType(`tags value for key '${key}'`, value, 'string, boolean, or number'); + } + } + } + + private _validateTimestamp(predictionTimestamp?: number): void { + if (predictionTimestamp == null) return; + if (!Number.isInteger(predictionTimestamp)) { + throw new InvalidValueType('prediction_timestamp', predictionTimestamp, 'integer'); + } + const nowSeconds = Math.floor(Date.now() / 1000); + const minSeconds = nowSeconds - MAX_PAST_YEARS_FROM_CURRENT_TIME * 365 * 24 * 60 * 60; + const maxSeconds = nowSeconds + MAX_FUTURE_YEARS_FROM_CURRENT_TIME * 365 * 24 * 60 * 60; + if (predictionTimestamp < minSeconds || predictionTimestamp > maxSeconds) { + throw new Error( + `prediction_timestamp: ${predictionTimestamp} is out of range. Must be within ` + + `${MAX_FUTURE_YEARS_FROM_CURRENT_TIME} year in the future and ` + + `${MAX_PAST_YEARS_FROM_CURRENT_TIME} years in the past from current time.`, + ); + } + } +} + +export default Client; diff --git a/typescript/futureagi/src/index.ts b/typescript/futureagi/src/index.ts index 70ad681..9dc38e6 100644 --- a/typescript/futureagi/src/index.ts +++ b/typescript/futureagi/src/index.ts @@ -1,4 +1,5 @@ export * from './api'; +export * from './client'; export * from './datasets'; export * from './kb'; export * from './prompt'; diff --git a/typescript/futureagi/tests/compliance/adapter.ts b/typescript/futureagi/tests/compliance/adapter.ts index 5eadb64..e22f7ca 100644 --- a/typescript/futureagi/tests/compliance/adapter.ts +++ b/typescript/futureagi/tests/compliance/adapter.ts @@ -4,8 +4,10 @@ import { Annotation, AnnotationQueue, APIKeyAuth, + Client, DataTypeChoices, Dataset, + Environments, HttpMethod, KnowledgeBase, ModelConfig, @@ -41,6 +43,7 @@ const capabilities = [ 'dataset_lifecycle', 'dataset_management_lifecycle', 'knowledge_base_lifecycle', + 'model_log_lifecycle', 'prompt_lifecycle', 'provider_api_key_lifecycle', ]; @@ -100,6 +103,7 @@ const server = http.createServer(async (req, res) => { '/dataset/lifecycle': handleDatasetLifecycle, '/dataset/management': handleDatasetManagement, '/knowledge-base/lifecycle': handleKnowledgeBaseLifecycle, + '/model/log': handleModelLog, '/prompt/lifecycle': handlePromptLifecycle, '/provider-api-key/lifecycle': handleProviderApiKeyLifecycle, }; @@ -388,6 +392,24 @@ async function handleKnowledgeBaseLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const client = new Client(authOptions()); + const result = await client.log({ + modelId: required(payload, 'model_id'), + modelType: ModelTypes[String(required(payload, 'model_type')) as keyof typeof ModelTypes], + environment: Environments[String(required(payload, 'environment')) as keyof typeof Environments], + modelVersion: payload.model_version, + predictionTimestamp: payload.prediction_timestamp, + conversation: payload.conversation, + tags: payload.tags, + timeout: payload.timeout ?? state.timeout, + }); + await client.close(); + state.calls.push({ operation: 'model/log', model_id: payload.model_id }); + return { success: true, body: result }; +} + async function handlePromptLifecycle(payload: JsonRecord): Promise { ensureInitialized(); const prompt = new Prompt( From 4cd38a363c46d53e04955991b7c9d1d2d0a46830 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Thu, 21 May 2026 01:09:16 +0530 Subject: [PATCH 09/15] Fix SDK live backend drift --- python/fi/kb/client.py | 74 ++++-- python/fi/queues/client.py | 3 +- python/tests/test_annotation_queues.py | 2 + python/tests/test_knowledge_base.py | 102 ++++++++ python/tests/test_live_smoke.py | 143 +++++++++++ tests/compliance/python/README.md | 5 +- tests/compliance/python/adapter.py | 32 +-- typescript/futureagi/package.json | 1 + typescript/futureagi/src/client.test.ts | 64 ----- typescript/futureagi/src/client.ts | 243 ------------------ typescript/futureagi/src/index.ts | 1 - .../src/queues/__tests__/client.test.ts | 2 + typescript/futureagi/src/queues/client.ts | 2 - typescript/futureagi/src/utils/routes.ts | 3 - .../futureagi/tests/compliance/README.md | 3 +- .../futureagi/tests/compliance/adapter.ts | 22 -- typescript/futureagi/tests/live/smoke.ts | 96 +++++++ 17 files changed, 401 insertions(+), 397 deletions(-) create mode 100644 python/tests/test_knowledge_base.py create mode 100644 python/tests/test_live_smoke.py delete mode 100644 typescript/futureagi/src/client.test.ts delete mode 100644 typescript/futureagi/src/client.ts create mode 100644 typescript/futureagi/tests/live/smoke.ts diff --git a/python/fi/kb/client.py b/python/fi/kb/client.py index 1b9b5d9..0110f98 100644 --- a/python/fi/kb/client.py +++ b/python/fi/kb/client.py @@ -2,7 +2,7 @@ from fi.api.auth import APIKeyAuth, ResponseHandler from fi.api.types import HttpMethod, RequestConfig -from fi.kb.types import KnowledgeBaseConfig +from fi.kb.types import KnowledgeBaseConfig, StatusType from fi.utils.errors import InvalidAuthError from fi.utils.routes import Routes @@ -188,13 +188,17 @@ def update_kb( 'X-Secret-Key': self._fi_secret_key, } - response = requests.patch( - url=url, - data=data, - files=files, - headers=headers, - timeout=300 - ) + request_kwargs = { + "url": url, + "headers": headers, + "timeout": 300, + } + if files: + request_kwargs.update({"data": data, "files": files}) + else: + request_kwargs["json"] = data + + response = requests.patch(**request_kwargs) KBResponseHandler._handle_error(response) parsed_result_data = KBResponseHandler._parse_success(response) @@ -406,13 +410,17 @@ def create_kb(self, name: Optional[str] = None, file_paths: Optional[Union[str, 'X-Secret-Key': self._fi_secret_key, } - response = requests.post( - url=url, - data=data, - files=files, - headers=headers, - timeout=300 - ) + request_kwargs = { + "url": url, + "headers": headers, + "timeout": 300, + } + if files: + request_kwargs.update({"data": data, "files": files}) + else: + request_kwargs["json"] = data + + response = requests.post(**request_kwargs) KBResponseHandler._handle_error(response) parsed_result_data = KBResponseHandler._parse_success(response) @@ -439,6 +447,28 @@ def create_kb(self, name: Optional[str] = None, file_paths: Optional[Union[str, fh.close() raise SDKException("Failed to create the Knowledge Base due to an unexpected error.", cause=e) + def list_kbs(self, search: Optional[str] = None) -> List[KnowledgeBaseConfig]: + """List knowledge bases visible to the authenticated user.""" + params = {"search": search} if search else {} + response = self.request( + config=RequestConfig( + method=HttpMethod.GET, + url=self._base_url + "/" + Routes.knowledge_base_list.value, + params=params, + ), + response_handler=KBResponseHandler, + ) + table_data = response["result"].get("table_data") or [] + return [ + KnowledgeBaseConfig( + id=item.get("id"), + name=item.get("name"), + files=item.get("files") or [], + status=item.get("status") or StatusType.PROCESSING.value, + ) + for item in table_data + ] + def _check_file_paths(self, file_paths: Union[str, List[str]]) -> bool: """ Validates the given file paths or directory path. @@ -518,15 +548,7 @@ def _get_kb_from_name(self, kb_name): Returns: Knowledge BaseConfig: Knowledge Base Config object """ - response = self.request( - config=RequestConfig( - method=HttpMethod.GET, - url=self._base_url + "/" + Routes.knowledge_base_list.value, - params={"search": kb_name}, - ), - response_handler=KBResponseHandler, - ) - data = response["result"].get("table_data") - if not data: + matches = self.list_kbs(kb_name) + if not matches: raise SDKException(f"Knowledge Base with name '{kb_name}' not found.") - return KnowledgeBaseConfig(id=data[0].get("id"), name=data[0].get("name")) + return matches[0] diff --git a/python/fi/queues/client.py b/python/fi/queues/client.py index 77c9122..1ea9785 100644 --- a/python/fi/queues/client.py +++ b/python/fi/queues/client.py @@ -324,11 +324,10 @@ def list_queues( search: Optional[str] = None, include_counts: bool = True, page: int = 1, - page_size: int = 20, timeout: Optional[int] = None, ) -> List[QueueDetail]: """List annotation queues.""" - params: Dict[str, Any] = {"page": page, "page_size": page_size} + params: Dict[str, Any] = {"page": page} if status: params["status"] = status if search: diff --git a/python/tests/test_annotation_queues.py b/python/tests/test_annotation_queues.py index 92e3a48..fb9ca4f 100644 --- a/python/tests/test_annotation_queues.py +++ b/python/tests/test_annotation_queues.py @@ -262,6 +262,8 @@ def test_list_queues(self, client, mock_request): assert config.method == HttpMethod.GET assert config.params["status"] == "active" assert config.params["search"] == "test" + assert config.params["page"] == 1 + assert "page_size" not in config.params assert len(result) == 1 def test_get(self, client, mock_request): diff --git a/python/tests/test_knowledge_base.py b/python/tests/test_knowledge_base.py new file mode 100644 index 0000000..cf22da9 --- /dev/null +++ b/python/tests/test_knowledge_base.py @@ -0,0 +1,102 @@ +from unittest.mock import MagicMock, patch + +from fi.kb.client import KnowledgeBase +from fi.kb.types import KnowledgeBaseConfig + + +def _response(method: str, url: str, result: dict): + response = MagicMock() + response.status_code = 200 + response.url = url + response.request.method = method + response.json.return_value = {"status": True, "result": result} + return response + + +def test_create_kb_without_files_uses_json_body(): + client = KnowledgeBase( + fi_api_key="api-key", + fi_secret_key="secret-key", + fi_base_url="http://example.test", + ) + + with patch("requests.post") as post: + post.return_value = _response( + "POST", + "http://example.test/model-hub/knowledge-base/", + { + "kb_id": "00000000-0000-0000-0000-000000000001", + "kb_name": "Empty KB", + "file_ids": [], + }, + ) + + client.create_kb("Empty KB") + + kwargs = post.call_args.kwargs + assert kwargs["json"] == {"name": "Empty KB"} + assert "data" not in kwargs + assert "files" not in kwargs + + +def test_update_kb_without_files_uses_json_body(): + client = KnowledgeBase( + fi_api_key="api-key", + fi_secret_key="secret-key", + fi_base_url="http://example.test", + ) + client.kb = KnowledgeBaseConfig( + id="00000000-0000-0000-0000-000000000001", + name="Old KB", + files=[], + ) + + with patch("requests.patch") as patch_request: + patch_request.return_value = _response( + "PATCH", + "http://example.test/model-hub/knowledge-base/", + {"id": "00000000-0000-0000-0000-000000000001", "name": "New KB", "files": []}, + ) + + client.update_kb("Old KB", new_name="New KB") + + kwargs = patch_request.call_args.kwargs + assert kwargs["json"] == { + "kb_id": "00000000-0000-0000-0000-000000000001", + "name": "New KB", + } + assert "data" not in kwargs + assert "files" not in kwargs + + +def test_list_kbs_returns_configs(): + client = KnowledgeBase( + fi_api_key="api-key", + fi_secret_key="secret-key", + fi_base_url="http://example.test", + ) + response = MagicMock() + response.status_code = 200 + response.url = "http://example.test/model-hub/knowledge-base/list/" + response.request.method = "GET" + response.json.return_value = { + "status": True, + "result": { + "table_data": [ + { + "id": "00000000-0000-0000-0000-000000000001", + "name": "KB", + "status": "Completed", + "files": [], + } + ] + }, + } + + with patch.object(client, "request", return_value=response.json.return_value) as request: + result = client.list_kbs("KB") + + config = request.call_args.kwargs["config"] + assert config.params == {"search": "KB"} + assert result[0].name == "KB" + assert result[0].status == "Completed" diff --git a/python/tests/test_live_smoke.py b/python/tests/test_live_smoke.py new file mode 100644 index 0000000..7909186 --- /dev/null +++ b/python/tests/test_live_smoke.py @@ -0,0 +1,143 @@ +import os +import time +from uuid import uuid4 + +import pytest + +from fi.annotations import Annotation +from fi.api.auth import APIKeyAuth +from fi.api.types import HttpMethod, RequestConfig +from fi.datasets import Dataset, DatasetConfig +from fi.datasets.types import DataTypeChoices +from fi.kb import KnowledgeBase +from fi.queues import AnnotationQueue +from fi.utils.types import ModelTypes + + +def _live_options(): + api_key = os.environ.get("FI_API_KEY") + secret_key = os.environ.get("FI_SECRET_KEY") + base_url = os.environ.get("FI_BASE_URL") + if not api_key or not secret_key or not base_url: + pytest.skip("FI_API_KEY, FI_SECRET_KEY, and FI_BASE_URL are required for live SDK smoke tests") + return { + "fi_api_key": api_key, + "fi_secret_key": secret_key, + "fi_base_url": base_url.rstrip("/"), + "timeout": int(os.environ.get("FI_LIVE_TIMEOUT", "20")), + } + + +def _first_dataset_name(client: APIKeyAuth, base_url: str) -> str | None: + response = client.request( + RequestConfig( + method=HttpMethod.GET, + url=f"{base_url}/model-hub/develops/get-datasets-names/", + timeout=20, + ) + ) + body = response.json() + datasets = ((body or {}).get("result") or {}).get("datasets") or [] + return datasets[0]["name"] if datasets else None + + +def test_live_read_surfaces_against_real_backend(): + opts = _live_options() + base_url = opts["fi_base_url"] + + raw = APIKeyAuth(**opts) + health = raw.request( + RequestConfig(method=HttpMethod.GET, url=f"{base_url}/health/", timeout=10) + ) + assert health.status_code == 200 + + annotation = Annotation(**opts) + assert isinstance(annotation.get_labels(), list) + assert isinstance(annotation.list_projects(page_size=5), list) + + queue = AnnotationQueue(**opts) + assert isinstance(queue.list_labels(), list) + assert isinstance(queue.list_queues(), list) + + dataset_name = os.environ.get("FI_LIVE_DATASET_NAME") or _first_dataset_name(raw, base_url) + if dataset_name: + dataset = Dataset.get_dataset_config(dataset_name, **opts) + config = dataset.get_config() + assert config.id + assert config.name == dataset_name + + +def test_live_knowledge_base_write_flow_against_real_backend(): + if os.environ.get("FI_LIVE_KB_WRITE") != "1": + pytest.skip("Set FI_LIVE_KB_WRITE=1 to run the mutating KB live smoke test") + + opts = _live_options() + name = f"sdk-live-kb-{uuid4().hex[:8]}" + updated_name = f"{name}-renamed" + kb = KnowledgeBase(**opts) + + try: + kb.create_kb(name) + kb.update_kb(name, new_name=updated_name) + listed = kb.list_kbs(updated_name) + assert any(item.name == updated_name for item in listed) + finally: + try: + kb.delete_kb(kb_names=updated_name) + except Exception: + if name != updated_name: + kb.delete_kb(kb_names=name) + + +def test_live_dataset_write_flow_against_real_backend(): + if os.environ.get("FI_LIVE_DATASET_WRITE") != "1": + pytest.skip("Set FI_LIVE_DATASET_WRITE=1 to run the mutating dataset live smoke test") + + opts = _live_options() + dataset = Dataset( + dataset_config=DatasetConfig( + name=f"sdk-live-dataset-{int(time.time())}-{uuid4().hex[:6]}", + model_type=ModelTypes.GENERATIVE_LLM, + ), + **opts, + ) + created = False + try: + dataset.create() + created = True + dataset.add_columns( + [ + {"name": "input", "data_type": DataTypeChoices.TEXT}, + {"name": "score", "data_type": DataTypeChoices.FLOAT}, + ] + ) + dataset.add_rows( + [ + { + "cells": [ + {"column_name": "input", "value": "hello"}, + {"column_name": "score", "value": 0.7}, + ] + } + ] + ) + assert dataset.get_column_id("input") + finally: + if created: + dataset.delete() + + +def test_live_model_log_route_is_not_currently_exposed(): + opts = _live_options() + base_url = opts["fi_base_url"] + raw = APIKeyAuth(**opts) + for path in ("sdk/api/v1/log/model/", "log/model/"): + response = raw.request( + RequestConfig( + method=HttpMethod.POST, + url=f"{base_url}/{path}", + json={}, + timeout=10, + ) + ) + assert response.status_code == 404 diff --git a/tests/compliance/python/README.md b/tests/compliance/python/README.md index f38d83e..0934cc3 100644 --- a/tests/compliance/python/README.md +++ b/tests/compliance/python/README.md @@ -18,10 +18,12 @@ the shared harness: - `POST /dataset/lifecycle` - `POST /dataset/management` - `POST /knowledge-base/lifecycle` -- `POST /model/log` - `POST /prompt/lifecycle` - `POST /provider-api-key/lifecycle` +Model logging is not currently claimed by this adapter because the current +backend does not expose `/sdk/api/v1/log/model/` or `/log/model/`. + ## Local Run From the `futureagi-sdk` repo root: @@ -50,7 +52,6 @@ Current passing suites: - `dataset_lifecycle_e2e` - `dataset_management_lifecycle_e2e` - `knowledge_base_lifecycle_e2e` -- `model_log_lifecycle_e2e` - `prompt_lifecycle_e2e` - `provider_api_key_lifecycle_e2e` diff --git a/tests/compliance/python/adapter.py b/tests/compliance/python/adapter.py index 5b75745..ebcabb5 100644 --- a/tests/compliance/python/adapter.py +++ b/tests/compliance/python/adapter.py @@ -14,13 +14,12 @@ from fi.api.auth import APIKeyAuth from fi.api.apikeys import ProviderAPIKeyClient from fi.api.types import ApiKey, HttpMethod, ModelProvider, RequestConfig -from fi.client import Client from fi.datasets import Dataset, DatasetConfig from fi.datasets.types import DataTypeChoices from fi.kb import KnowledgeBase from fi.prompt import ModelConfig, Prompt, PromptTemplate, UserMessage from fi.queues import AnnotationQueue -from fi.utils.types import Environments, ModelTypes +from fi.utils.types import ModelTypes @dataclass @@ -62,7 +61,6 @@ def do_GET(self) -> None: # noqa: N802 "dataset_lifecycle", "dataset_management_lifecycle", "knowledge_base_lifecycle", - "model_log_lifecycle", "prompt_lifecycle", "provider_api_key_lifecycle", ], @@ -140,10 +138,6 @@ def do_POST(self) -> None: # noqa: N802 self._handle_knowledge_base_lifecycle(payload) return - if parsed.path == "/model/log": - self._handle_model_log(payload) - return - if parsed.path == "/prompt/lifecycle": self._handle_prompt_lifecycle(payload) return @@ -523,30 +517,6 @@ def _handle_knowledge_base_lifecycle(self, payload: dict[str, Any]) -> None: except Exception as exc: self._write_json({"success": False, "error": str(exc)}, status=500) - def _handle_model_log(self, payload: dict[str, Any]) -> None: - try: - _ensure_initialized() - client = Client( - fi_api_key=STATE.api_key, - fi_secret_key=STATE.secret_key, - fi_base_url=STATE.base_url, - timeout=STATE.timeout, - ) - result = client.log( - model_id=_required(payload, "model_id"), - model_type=ModelTypes[_required(payload, "model_type")], - environment=Environments[_required(payload, "environment")], - model_version=payload.get("model_version"), - prediction_timestamp=payload.get("prediction_timestamp"), - conversation=payload.get("conversation"), - tags=payload.get("tags"), - timeout=payload.get("timeout") or STATE.timeout, - ) - STATE.calls.append({"operation": "model/log", "model_id": payload.get("model_id")}) - self._write_json({"success": True, "body": _jsonable(result)}) - except Exception as exc: - self._write_json({"success": False, "error": str(exc)}, status=500) - def _handle_prompt_lifecycle(self, payload: dict[str, Any]) -> None: try: _ensure_initialized() diff --git a/typescript/futureagi/package.json b/typescript/futureagi/package.json index bcfe23a..8a97925 100644 --- a/typescript/futureagi/package.json +++ b/typescript/futureagi/package.json @@ -22,6 +22,7 @@ "postbuild": "echo '{\"type\": \"module\"}' > ./dist/esm/package.json", "build:watch": "tsc --build --watch tsconfig.json", "test": "jest", + "test:live": "tsx tests/live/smoke.ts", "test:watch": "jest --watch", "test:coverage": "jest --coverage", "lint": "eslint . --ext .ts", diff --git a/typescript/futureagi/src/client.test.ts b/typescript/futureagi/src/client.test.ts deleted file mode 100644 index 71675a7..0000000 --- a/typescript/futureagi/src/client.test.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Client, Environments, ModelTypes } from './'; - -describe('Client', () => { - it('logs model conversations with canonical backend payload', async () => { - const client = new Client({ - fiApiKey: 'test-api-key', - fiSecretKey: 'test-secret-key', - fiBaseUrl: 'http://localhost:8000', - }); - const requestMock = jest.spyOn(client as any, 'request').mockResolvedValue({ - status: 'success', - result: { log_id: 'log-123' }, - }); - - const result = await client.log({ - modelId: 'model-e2e', - modelType: ModelTypes.GENERATIVE_LLM, - environment: Environments.PRODUCTION, - modelVersion: 'v1', - predictionTimestamp: 1767225600, - conversation: { - chat_history: [ - { role: 'user', content: 'hello' }, - { role: 'assistant', content: 'hi there' }, - ], - }, - tags: { sdk_compliance: true }, - }); - - expect(result.result.log_id).toBe('log-123'); - expect(requestMock).toHaveBeenCalledWith( - expect.objectContaining({ - method: 'POST', - url: 'http://localhost:8000/sdk/api/v1/log/model/', - json: expect.objectContaining({ - model_id: 'model-e2e', - model_type: 'GenerativeLLM', - environment: 3, - model_version: 'v1', - prediction_timestamp: 1767225600, - tags: { sdk_compliance: true }, - }), - }), - expect.anything(), - ); - }); - - it('validates chat history shape before logging', async () => { - const client = new Client({ - fiApiKey: 'test-api-key', - fiSecretKey: 'test-secret-key', - fiBaseUrl: 'http://localhost:8000', - }); - - await expect( - client.log({ - modelId: 'model-e2e', - modelType: ModelTypes.GENERATIVE_LLM, - environment: Environments.PRODUCTION, - conversation: { chat_history: [{ role: 'user' }] }, - }), - ).rejects.toThrow("Missing required key 'content'"); - }); -}); diff --git a/typescript/futureagi/src/client.ts b/typescript/futureagi/src/client.ts deleted file mode 100644 index b3e89bf..0000000 --- a/typescript/futureagi/src/client.ts +++ /dev/null @@ -1,243 +0,0 @@ -import type { AxiosResponse } from 'axios'; -import { APIKeyAuth, ResponseHandler } from './api/auth'; -import type { APIKeyAuthConfig } from './api/auth'; -import { HttpMethod } from './api/types'; -import type { RequestConfig } from './api/types'; -import { ModelTypes } from './datasets/types'; -import { - InvalidSupportedType, - InvalidValueType, - MissingRequiredKey, -} from './utils/errors'; -import { - MAX_FUTURE_YEARS_FROM_CURRENT_TIME, - MAX_PAST_YEARS_FROM_CURRENT_TIME, -} from './utils/constants'; -import { Routes } from './utils/routes'; - -export enum Environments { - TRAINING = 1, - VALIDATION = 2, - PRODUCTION = 3, - CORPUS = 4, -} - -type PrimitiveTagValue = string | boolean | number; -type ConversationPayload = Record; - -export interface ModelLogOptions { - modelId: string; - modelType: ModelTypes; - environment: Environments; - modelVersion?: string; - predictionTimestamp?: number; - conversation?: ConversationPayload; - tags?: Record; - timeout?: number; -} - -class ClientResponseHandler extends ResponseHandler, never> { - public static _parseSuccess(response: AxiosResponse): Record { - const data = response.data ?? {}; - if (!('status' in data)) { - return { ...data, status: response.status >= 200 && response.status < 300 ? 'success' : 'error' }; - } - return data; - } -} - -export class Client extends APIKeyAuth { - constructor(options: APIKeyAuthConfig = {}) { - super(options); - } - - async log({ - modelId, - modelType, - environment, - modelVersion, - predictionTimestamp, - conversation, - tags, - timeout, - }: ModelLogOptions): Promise> { - this._validateParams({ - modelId, - modelType, - environment, - modelVersion, - predictionTimestamp, - conversation, - tags, - }); - - return this.request( - { - method: HttpMethod.POST, - url: `${this.baseUrl}/${Routes.log_model}`, - json: { - model_id: modelId, - model_type: modelType, - environment, - model_version: modelVersion, - prediction_timestamp: predictionTimestamp, - conversation, - tags, - }, - timeout, - } as RequestConfig, - ClientResponseHandler, - ) as Promise>; - } - - private _validateParams({ - modelId, - modelType, - environment, - modelVersion, - predictionTimestamp, - conversation, - tags, - }: Omit): void { - if (typeof modelId !== 'string') { - throw new InvalidValueType('model_id', modelId, 'string'); - } - - if (!Object.values(ModelTypes).includes(modelType)) { - throw new InvalidValueType('model_type', modelType, 'ModelTypes'); - } - - if (![ModelTypes.GENERATIVE_LLM, ModelTypes.GENERATIVE_IMAGE].includes(modelType)) { - throw new InvalidSupportedType( - 'model_type', - modelType, - 'ModelTypes.GENERATIVE_LLM, ModelTypes.GENERATIVE_IMAGE', - ); - } - - if (!Object.values(Environments).includes(environment)) { - throw new InvalidValueType('environment', environment, 'Environments'); - } - - if (modelVersion != null && typeof modelVersion !== 'string') { - throw new InvalidValueType('model_version', modelVersion, 'string'); - } - - this._validateConversation(conversation); - this._validateTags(tags); - this._validateTimestamp(predictionTimestamp); - } - - private _validateConversation(conversation?: ConversationPayload): void { - if (conversation == null) return; - if (typeof conversation !== 'object' || Array.isArray(conversation)) { - throw new InvalidValueType('conversation', conversation, 'object'); - } - if (!('chat_history' in conversation) && !('chat_graph' in conversation)) { - throw new MissingRequiredKey('conversation', '[chat_history, chat_graph]'); - } - if ('chat_history' in conversation) { - this._validateChatHistory(conversation.chat_history); - } - if ('chat_graph' in conversation) { - this._validateChatGraph(conversation.chat_graph); - } - } - - private _validateChatHistory(chatHistory: any): void { - if (!Array.isArray(chatHistory)) { - throw new InvalidValueType("conversation['chat_history']", chatHistory, 'array'); - } - for (const item of chatHistory) { - if (typeof item !== 'object' || item == null || Array.isArray(item)) { - throw new InvalidValueType('chat_history item', item, 'object'); - } - for (const key of ['role', 'content']) { - if (!(key in item)) { - throw new MissingRequiredKey('chat_history item', key); - } - } - if (typeof item.role !== 'string') { - throw new InvalidValueType('chat_history role', item.role, 'string'); - } - if (typeof item.content !== 'string') { - throw new InvalidValueType('chat_history content', item.content, 'string'); - } - } - } - - private _validateChatGraph(chatGraph: any): void { - if (typeof chatGraph !== 'object' || chatGraph == null || Array.isArray(chatGraph)) { - throw new InvalidValueType("conversation['chat_graph']", chatGraph, 'object'); - } - for (const key of ['conversation_id', 'nodes']) { - if (!(key in chatGraph)) { - throw new MissingRequiredKey('chat_graph', key); - } - } - if (!Array.isArray(chatGraph.nodes)) { - throw new InvalidValueType("chat_graph['nodes']", chatGraph.nodes, 'array'); - } - for (const node of chatGraph.nodes) { - if (!node?.message) { - throw new MissingRequiredKey('chat_graph node', 'message'); - } - const message = node.message; - for (const key of ['id', 'author', 'content', 'context']) { - if (!(key in message)) { - throw new MissingRequiredKey('message', key); - } - } - for (const key of ['role', 'metadata']) { - if (!(key in message.author)) { - throw new MissingRequiredKey('author', key); - } - } - if (!['assistant', 'user', 'system'].includes(message.author.role)) { - throw new InvalidValueType('author role', message.author.role, 'one of: assistant, user, system'); - } - for (const key of ['content_type', 'parts']) { - if (!(key in message.content)) { - throw new MissingRequiredKey('content', key); - } - } - if (!Array.isArray(message.content.parts)) { - throw new InvalidValueType('content parts', message.content.parts, 'array'); - } - } - } - - private _validateTags(tags?: Record): void { - if (tags == null) return; - if (typeof tags !== 'object' || Array.isArray(tags)) { - throw new InvalidValueType('tags', tags, 'object'); - } - for (const [key, value] of Object.entries(tags)) { - if (typeof key !== 'string') { - throw new InvalidValueType(`tags key '${key}'`, key, 'string'); - } - if (!['string', 'boolean', 'number'].includes(typeof value)) { - throw new InvalidValueType(`tags value for key '${key}'`, value, 'string, boolean, or number'); - } - } - } - - private _validateTimestamp(predictionTimestamp?: number): void { - if (predictionTimestamp == null) return; - if (!Number.isInteger(predictionTimestamp)) { - throw new InvalidValueType('prediction_timestamp', predictionTimestamp, 'integer'); - } - const nowSeconds = Math.floor(Date.now() / 1000); - const minSeconds = nowSeconds - MAX_PAST_YEARS_FROM_CURRENT_TIME * 365 * 24 * 60 * 60; - const maxSeconds = nowSeconds + MAX_FUTURE_YEARS_FROM_CURRENT_TIME * 365 * 24 * 60 * 60; - if (predictionTimestamp < minSeconds || predictionTimestamp > maxSeconds) { - throw new Error( - `prediction_timestamp: ${predictionTimestamp} is out of range. Must be within ` + - `${MAX_FUTURE_YEARS_FROM_CURRENT_TIME} year in the future and ` + - `${MAX_PAST_YEARS_FROM_CURRENT_TIME} years in the past from current time.`, - ); - } - } -} - -export default Client; diff --git a/typescript/futureagi/src/index.ts b/typescript/futureagi/src/index.ts index 9dc38e6..70ad681 100644 --- a/typescript/futureagi/src/index.ts +++ b/typescript/futureagi/src/index.ts @@ -1,5 +1,4 @@ export * from './api'; -export * from './client'; export * from './datasets'; export * from './kb'; export * from './prompt'; diff --git a/typescript/futureagi/src/queues/__tests__/client.test.ts b/typescript/futureagi/src/queues/__tests__/client.test.ts index 0dc0d71..1925c80 100644 --- a/typescript/futureagi/src/queues/__tests__/client.test.ts +++ b/typescript/futureagi/src/queues/__tests__/client.test.ts @@ -78,6 +78,8 @@ describe('AnnotationQueue', () => { expect(config.params.status).toBe('active'); expect(config.params.search).toBe('test'); expect(config.params.include_counts).toBe('true'); + expect(config.params.page).toBe(1); + expect(config.params).not.toHaveProperty('page_size'); expect(result).toHaveLength(1); }); }); diff --git a/typescript/futureagi/src/queues/client.ts b/typescript/futureagi/src/queues/client.ts index c570072..597a1ea 100644 --- a/typescript/futureagi/src/queues/client.ts +++ b/typescript/futureagi/src/queues/client.ts @@ -233,12 +233,10 @@ export class AnnotationQueue extends APIKeyAuth { search?: string; includeCounts?: boolean; page?: number; - pageSize?: number; timeout?: number; }): Promise { const params: Record = { page: options?.page ?? 1, - page_size: options?.pageSize ?? 20, }; if (options?.status) params.status = options.status; if (options?.search) params.search = options.search; diff --git a/typescript/futureagi/src/utils/routes.ts b/typescript/futureagi/src/utils/routes.ts index 9abb52b..024293b 100644 --- a/typescript/futureagi/src/utils/routes.ts +++ b/typescript/futureagi/src/utils/routes.ts @@ -5,9 +5,6 @@ export const Routes = { // Healthcheck healthcheck: "healthcheck", - // Logging - log_model: "sdk/api/v1/log/model/", - // Evaluation evaluate: "sdk/api/v1/eval/", evaluatev2: "sdk/api/v1/new-eval/", diff --git a/typescript/futureagi/tests/compliance/README.md b/typescript/futureagi/tests/compliance/README.md index ab62f3a..83fef30 100644 --- a/typescript/futureagi/tests/compliance/README.md +++ b/typescript/futureagi/tests/compliance/README.md @@ -20,7 +20,8 @@ It wraps the TypeScript `@future-agi/sdk` package and exposes the shared adapter - `POST /prompt/lifecycle` - `POST /provider-api-key/lifecycle` -`model_log_lifecycle_e2e` is intentionally not claimed yet because this TypeScript package does not expose the model logging client that exists in the Python SDK. +Model logging is not currently claimed by this adapter because the current +backend does not expose `/sdk/api/v1/log/model/` or `/log/model/`. ## Local Run diff --git a/typescript/futureagi/tests/compliance/adapter.ts b/typescript/futureagi/tests/compliance/adapter.ts index e22f7ca..5eadb64 100644 --- a/typescript/futureagi/tests/compliance/adapter.ts +++ b/typescript/futureagi/tests/compliance/adapter.ts @@ -4,10 +4,8 @@ import { Annotation, AnnotationQueue, APIKeyAuth, - Client, DataTypeChoices, Dataset, - Environments, HttpMethod, KnowledgeBase, ModelConfig, @@ -43,7 +41,6 @@ const capabilities = [ 'dataset_lifecycle', 'dataset_management_lifecycle', 'knowledge_base_lifecycle', - 'model_log_lifecycle', 'prompt_lifecycle', 'provider_api_key_lifecycle', ]; @@ -103,7 +100,6 @@ const server = http.createServer(async (req, res) => { '/dataset/lifecycle': handleDatasetLifecycle, '/dataset/management': handleDatasetManagement, '/knowledge-base/lifecycle': handleKnowledgeBaseLifecycle, - '/model/log': handleModelLog, '/prompt/lifecycle': handlePromptLifecycle, '/provider-api-key/lifecycle': handleProviderApiKeyLifecycle, }; @@ -392,24 +388,6 @@ async function handleKnowledgeBaseLifecycle(payload: JsonRecord): Promise { - ensureInitialized(); - const client = new Client(authOptions()); - const result = await client.log({ - modelId: required(payload, 'model_id'), - modelType: ModelTypes[String(required(payload, 'model_type')) as keyof typeof ModelTypes], - environment: Environments[String(required(payload, 'environment')) as keyof typeof Environments], - modelVersion: payload.model_version, - predictionTimestamp: payload.prediction_timestamp, - conversation: payload.conversation, - tags: payload.tags, - timeout: payload.timeout ?? state.timeout, - }); - await client.close(); - state.calls.push({ operation: 'model/log', model_id: payload.model_id }); - return { success: true, body: result }; -} - async function handlePromptLifecycle(payload: JsonRecord): Promise { ensureInitialized(); const prompt = new Prompt( diff --git a/typescript/futureagi/tests/live/smoke.ts b/typescript/futureagi/tests/live/smoke.ts new file mode 100644 index 0000000..f7e14e8 --- /dev/null +++ b/typescript/futureagi/tests/live/smoke.ts @@ -0,0 +1,96 @@ +import { + Annotation, + AnnotationQueue, + APIKeyAuth, + Dataset, + HttpMethod, +} from '../../src'; +import type { RequestConfig } from '../../src'; + +function requiredEnv(name: string): string { + const value = process.env[name]; + if (!value) { + throw new Error(`${name} is required for the live SDK smoke test`); + } + return value; +} + +async function firstDatasetName(client: APIKeyAuth, baseUrl: string): Promise { + const response = await client.request({ + method: HttpMethod.GET, + url: `${baseUrl}/model-hub/develops/get-datasets-names/`, + timeout: 20_000, + } as RequestConfig) as any; + const datasets = response?.data?.result?.datasets ?? []; + return datasets[0]?.name; +} + +async function main(): Promise { + const baseUrl = requiredEnv('FI_BASE_URL').replace(/\/$/, ''); + const auth = { + fiApiKey: requiredEnv('FI_API_KEY'), + fiSecretKey: requiredEnv('FI_SECRET_KEY'), + fiBaseUrl: baseUrl, + timeout: Number(process.env.FI_LIVE_TIMEOUT ?? 20) * 1000, + }; + + const raw = new APIKeyAuth(auth); + const health = await raw.request({ + method: HttpMethod.GET, + url: `${baseUrl}/health/`, + timeout: 10_000, + } as RequestConfig) as any; + if (health.status !== 200) { + throw new Error(`health check failed with ${health.status}`); + } + + const annotation = new Annotation(auth); + const labels = await annotation.getLabels(); + const projects = await annotation.listProjects({ pageSize: 5 }); + + const queue = new AnnotationQueue(auth); + const queueLabels = await queue.listLabels(); + const queues = await queue.list(); + + const datasetName = process.env.FI_LIVE_DATASET_NAME ?? await firstDatasetName(raw, baseUrl); + let datasetId: string | undefined; + if (datasetName) { + const dataset = await Dataset.getDatasetConfig(datasetName, auth); + datasetId = dataset.id; + } + + const routeStatuses: Record = {}; + for (const path of ['sdk/api/v1/log/model/', 'log/model/']) { + const response = await fetch(`${baseUrl}/${path}`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Api-Key': auth.fiApiKey, + 'X-Secret-Key': auth.fiSecretKey, + }, + body: '{}', + signal: AbortSignal.timeout(10_000), + }); + routeStatuses[path] = response.status; + } + if (Object.values(routeStatuses).some((status) => status !== 404)) { + throw new Error(`model logging route status changed: ${JSON.stringify(routeStatuses)}`); + } + + await Promise.all([raw.close(), annotation.close(), queue.close()]); + + console.log(JSON.stringify({ + ok: true, + labels: labels.length, + projects: projects.length, + queue_labels: queueLabels.length, + queues: queues.length, + dataset_id_present: Boolean(datasetId), + model_log_route_statuses: routeStatuses, + }, null, 2)); +} + +main().catch((error) => { + console.error(error); + process.exit(1); +}); From a1caa991058ae825515c56acd8e6816b71fc0bb5 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Wed, 27 May 2026 18:38:37 +0530 Subject: [PATCH 10/15] wip --- .dockerignore | 22 + .gitignore | 25 +- go/futureagi/.gitignore | 46 + go/futureagi/README.md | 1348 + go/futureagi/api/openapi.yaml | 56767 ++++++++++++++ go/futureagi/api_accounts.go | 1045 + go/futureagi/api_alerts.go | 2224 + .../api_annotation_queue_discussion.go | 1071 + go/futureagi/api_annotation_queue_items.go | 2614 + go/futureagi/api_annotation_queue_review.go | 234 + go/futureagi/api_annotation_queues.go | 2586 + go/futureagi/api_datasets.go | 3923 + go/futureagi/api_experiments.go | 2742 + go/futureagi/api_model_hub.go | 36472 +++++++++ go/futureagi/api_run_tests_eval_configs.go | 757 + go/futureagi/api_run_tests_eval_summary.go | 383 + go/futureagi/api_scenarios.go | 785 + go/futureagi/api_sdk.go | 1345 + go/futureagi/api_simulate.go | 10070 +++ .../api_simulation_agent_definitions.go | 932 + go/futureagi/api_simulation_personas.go | 889 + go/futureagi/api_simulation_run_tests.go | 1765 + go/futureagi/api_simulation_scenarios.go | 910 + .../api_simulation_test_executions.go | 1259 + go/futureagi/api_simulations.go | 645 + go/futureagi/api_tracer.go | 7175 ++ go/futureagi/api_tracing.go | 3080 + go/futureagi/api_users.go | 1174 + go/futureagi/client.go | 722 + go/futureagi/configuration.go | 218 + go/futureagi/docs/AccountsAPI.md | 355 + go/futureagi/docs/AlertsAPI.md | 1049 + .../docs/AnnotationQueueDiscussionAPI.md | 395 + go/futureagi/docs/AnnotationQueueItemsAPI.md | 943 + go/futureagi/docs/AnnotationQueueReviewAPI.md | 84 + go/futureagi/docs/AnnotationQueuesAPI.md | 1014 + go/futureagi/docs/DatasetsAPI.md | 1421 + go/futureagi/docs/ExperimentsAPI.md | 1000 + go/futureagi/docs/ModelHubAPI.md | 14046 ++++ go/futureagi/docs/RunTestsEvalConfigsAPI.md | 304 + go/futureagi/docs/RunTestsEvalSummaryAPI.md | 154 + go/futureagi/docs/ScenariosAPI.md | 302 + go/futureagi/docs/SdkAPI.md | 545 + go/futureagi/docs/SimulateAPI.md | 4170 + .../docs/SimulationAgentDefinitionsAPI.md | 365 + go/futureagi/docs/SimulationPersonasAPI.md | 357 + go/futureagi/docs/SimulationRunTestsAPI.md | 722 + go/futureagi/docs/SimulationScenariosAPI.md | 365 + .../docs/SimulationTestExecutionsAPI.md | 510 + go/futureagi/docs/SimulationsAPI.md | 227 + go/futureagi/docs/TracerAPI.md | 3133 + go/futureagi/docs/TracingAPI.md | 1239 + go/futureagi/docs/UsersAPI.md | 370 + go/futureagi/go.mod | 6 + go/futureagi/go.sum | 11 + go/futureagi/model_accounts_error_response.go | 494 + go/futureagi/model_add_api_column_request.go | 225 + .../model_add_as_new_dataset_request.go | 229 + .../model_add_eval_configs_request.go | 158 + .../model_add_eval_configs_response.go | 250 + go/futureagi/model_add_items.go | 161 + go/futureagi/model_add_queue_item.go | 185 + .../model_add_rows_from_file_request.go | 229 + go/futureagi/model_add_run_prompt.go | 221 + ...el_agent_definition_bulk_delete_request.go | 158 + ...l_agent_definition_bulk_delete_response.go | 197 + .../model_agent_definition_create_request.go | 1184 + .../model_agent_definition_create_response.go | 161 + .../model_agent_definition_delete_response.go | 125 + .../model_agent_definition_edit_request.go | 1047 + .../model_agent_definition_edit_response.go | 161 + .../model_agent_definition_list_response.go | 947 + .../model_agent_definition_response.go | 1197 + go/futureagi/model_agent_flow_graph.go | 185 + .../model_agent_version_activate_response.go | 161 + .../model_agent_version_create_request.go | 989 + .../model_agent_version_create_response.go | 161 + .../model_agent_version_delete_response.go | 125 + .../model_agent_version_list_response.go | 646 + go/futureagi/model_agent_version_response.go | 841 + .../model_agent_version_restore_response.go | 197 + go/futureagi/model_all_active_tests.go | 185 + .../model_annotation_label_response.go | 296 + ...model_annotation_label_restore_response.go | 197 + go/futureagi/model_annotation_queue.go | 1233 + .../model_annotation_summary_header.go | 230 + .../model_annotation_summary_response.go | 197 + .../model_annotation_summary_result.go | 197 + go/futureagi/model_annotations_labels.go | 521 + go/futureagi/model_api_error_response.go | 494 + .../model_api_error_with_details_response.go | 494 + go/futureagi/model_api_key.go | 359 + .../model_api_selection_too_large_detail.go | 241 + .../model_api_selection_too_large_error.go | 384 + go/futureagi/model_api_text_error_response.go | 494 + go/futureagi/model_assign_items.go | 233 + go/futureagi/model_automation_rule.go | 604 + .../model_automation_rule_conditions.go | 237 + ...automation_rule_conditions_filter_inner.go | 297 + ...e_conditions_filter_inner_filter_config.go | 262 + ...omation_rule_evaluate_accepted_response.go | 213 + ...model_automation_rule_evaluate_response.go | 197 + .../model_automation_rule_evaluate_result.go | 285 + go/futureagi/model_automation_rule_scope.go | 233 + go/futureagi/model_base_columns_response.go | 185 + .../model_base_columns_response_result.go | 157 + ...odel_bulk_annotation_annotation_request.go | 301 + .../model_bulk_annotation_note_request.go | 157 + .../model_bulk_annotation_record_request.go | 229 + go/futureagi/model_bulk_annotation_request.go | 157 + .../model_bulk_annotation_response.go | 197 + .../model_bulk_annotation_response_result.go | 399 + go/futureagi/model_bulk_create_score_item.go | 265 + go/futureagi/model_bulk_create_scores.go | 394 + .../model_bulk_create_scores_response.go | 197 + .../model_bulk_create_scores_result.go | 185 + go/futureagi/model_bulk_remove_items.go | 157 + .../model_call_branch_analysis_response.go | 292 + ...l_call_branch_deviation_create_response.go | 233 + go/futureagi/model_call_execution.go | 1958 + .../model_call_execution_delete_response.go | 125 + go/futureagi/model_call_execution_detail.go | 2447 + ...xecution_error_localizer_tasks_response.go | 197 + .../model_call_execution_error_response.go | 494 + .../model_call_execution_logs_response.go | 197 + go/futureagi/model_call_execution_rerun.go | 236 + .../model_call_execution_status_update.go | 204 + go/futureagi/model_call_log_entry_response.go | 432 + go/futureagi/model_call_transcript.go | 451 + .../model_call_transcript_response.go | 280 + .../model_cancel_test_execution_response.go | 215 + go/futureagi/model_chat_message_contract.go | 371 + go/futureagi/model_chat_sdk_code_response.go | 197 + go/futureagi/model_chat_sdk_code_result.go | 241 + .../model_chat_send_message_response.go | 197 + .../model_chat_send_message_result.go | 271 + go/futureagi/model_chat_tool_call.go | 213 + go/futureagi/model_chat_tool_call_function.go | 185 + go/futureagi/model_cicd_evaluation_item.go | 268 + go/futureagi/model_cicd_job.go | 213 + go/futureagi/model_classify_column_request.go | 301 + go/futureagi/model_clone_dataset_request.go | 125 + go/futureagi/model_co_occurring_issue.go | 297 + go/futureagi/model_column.go | 343 + go/futureagi/model_column_definition.go | 213 + go/futureagi/model_column_order.go | 213 + .../model_column_type_conversion_response.go | 185 + .../model_column_type_conversion_result.go | 341 + go/futureagi/model_compare_dataset.go | 384 + .../model_compare_dataset_delete_response.go | 185 + .../model_compare_dataset_delete_result.go | 157 + .../model_compare_dataset_metadata.go | 213 + .../model_compare_dataset_response.go | 185 + go/futureagi/model_compare_dataset_result.go | 197 + .../model_compare_dataset_row_response.go | 185 + .../model_compare_dataset_row_result.go | 251 + .../model_compare_dataset_stats_request.go | 225 + .../model_compare_dataset_stats_response.go | 185 + .../model_compare_eval_list_response.go | 185 + .../model_compare_eval_list_result.go | 157 + .../model_compare_evals_list_request.go | 225 + .../model_compare_experiment_eval_request.go | 549 + .../model_compare_preview_run_eval_request.go | 329 + .../model_compare_start_evals_request.go | 193 + go/futureagi/model_composite_child_item.go | 415 + go/futureagi/model_composite_child_result.go | 584 + ...el_composite_eval_adhoc_execute_request.go | 720 + .../model_composite_eval_create_request.go | 424 + .../model_composite_eval_create_response.go | 185 + ...l_composite_eval_create_response_result.go | 341 + .../model_composite_eval_detail_response.go | 185 + ...l_composite_eval_detail_response_result.go | 543 + .../model_composite_eval_execute_request.go | 496 + .../model_composite_eval_execute_response.go | 185 + ..._composite_eval_execute_response_result.go | 615 + .../model_composite_eval_update_request.go | 434 + .../model_conditional_column_request.go | 225 + go/futureagi/model_configure_evaluations.go | 268 + ..._create_dataset_from_experiment_request.go | 161 + ..._create_dataset_from_local_file_request.go | 233 + .../model_create_empty_dataset_request.go | 269 + go/futureagi/model_create_linear_issue.go | 269 + .../model_create_linear_issue_response.go | 197 + .../model_create_linear_issue_result.go | 266 + .../model_create_prompt_simulation_request.go | 364 + go/futureagi/model_create_run_test_.go | 495 + go/futureagi/model_create_score.go | 368 + go/futureagi/model_dataset.go | 340 + .../model_dataset_add_columns_request.go | 157 + ...model_dataset_add_empty_columns_request.go | 129 + .../model_dataset_add_empty_rows_request.go | 129 + ..._dataset_add_rows_from_existing_request.go | 185 + .../model_dataset_add_rows_request.go | 157 + .../model_dataset_behavior_request.go | 233 + .../model_dataset_cell_data_request.go | 185 + .../model_dataset_cell_data_response.go | 185 + go/futureagi/model_dataset_cell_value.go | 244 + .../model_dataset_column_detail_item.go | 232 + .../model_dataset_column_detail_response.go | 185 + .../model_dataset_column_detail_result.go | 157 + ...model_dataset_columns_mutation_response.go | 185 + .../model_dataset_columns_mutation_result.go | 193 + go/futureagi/model_dataset_copy_response.go | 185 + go/futureagi/model_dataset_copy_result.go | 213 + .../model_dataset_create_started_response.go | 185 + .../model_dataset_create_started_result.go | 260 + ...odel_dataset_creation_progress_response.go | 185 + .../model_dataset_creation_progress_result.go | 673 + ...odel_dataset_derived_variables_response.go | 185 + .../model_dataset_derived_variables_result.go | 157 + go/futureagi/model_dataset_eval_stats_item.go | 432 + .../model_dataset_eval_stats_metric.go | 268 + .../model_dataset_eval_stats_response.go | 185 + ...el_dataset_explanation_summary_response.go | 185 + ...set_explanation_summary_response_result.go | 272 + .../model_dataset_json_schema_response.go | 185 + go/futureagi/model_dataset_list_item.go | 353 + go/futureagi/model_dataset_list_response.go | 185 + go/futureagi/model_dataset_list_result.go | 213 + ...dataset_multiple_static_columns_request.go | 157 + go/futureagi/model_dataset_name_item.go | 221 + go/futureagi/model_dataset_names_response.go | 185 + go/futureagi/model_dataset_names_result.go | 157 + .../model_dataset_row_data_request.go | 229 + ...del_dataset_row_data_request_sort_inner.go | 193 + .../model_dataset_row_data_response.go | 185 + go/futureagi/model_dataset_row_data_result.go | 185 + .../model_dataset_row_diff_request.go | 241 + go/futureagi/model_dataset_row_navigation.go | 125 + ...el_dataset_rows_import_message_response.go | 185 + ...odel_dataset_rows_import_message_result.go | 157 + .../model_dataset_rows_imported_response.go | 185 + .../model_dataset_rows_imported_result.go | 185 + .../model_dataset_run_prompt_stats_prompt.go | 269 + ...model_dataset_run_prompt_stats_response.go | 185 + .../model_dataset_run_prompt_stats_result.go | 241 + go/futureagi/model_dataset_sdk_rows_code.go | 297 + .../model_dataset_sdk_rows_request.go | 172 + .../model_dataset_sdk_rows_response.go | 185 + go/futureagi/model_dataset_sdk_rows_result.go | 213 + .../model_dataset_static_column_request.go | 221 + go/futureagi/model_dataset_table_metadata.go | 312 + go/futureagi/model_dataset_table_response.go | 185 + go/futureagi/model_dataset_table_result.go | 420 + ...model_dataset_update_cell_value_request.go | 233 + ...odel_dataset_update_column_name_request.go | 157 + ...odel_dataset_update_column_type_request.go | 237 + .../model_deep_analysis_api_response.go | 197 + go/futureagi/model_deep_analysis_body.go | 197 + ...del_deep_analysis_dispatch_api_response.go | 197 + .../model_deep_analysis_dispatch_response.go | 185 + go/futureagi/model_deep_analysis_response.go | 271 + .../model_delete_eval_config_response.go | 157 + go/futureagi/model_delete_eval_template.go | 157 + go/futureagi/model_derived_variable_detail.go | 269 + .../model_derived_variable_detail_response.go | 185 + .../model_derived_variable_extract_request.go | 273 + .../model_derived_variable_preview_request.go | 197 + .../model_develop_dataset_message_response.go | 185 + .../model_discussion_comment_request.go | 269 + .../model_discussion_reaction_request.go | 125 + .../model_discussion_thread_status_request.go | 125 + .../model_duplicate_dataset_request.go | 233 + .../model_duplicate_dataset_response.go | 185 + .../model_duplicate_dataset_result.go | 269 + go/futureagi/model_duplicate_rows_request.go | 205 + go/futureagi/model_duplicate_rows_response.go | 185 + go/futureagi/model_duplicate_rows_result.go | 269 + .../model_dynamic_column_create_response.go | 185 + .../model_dynamic_column_create_result.go | 213 + .../model_dynamic_column_message_response.go | 185 + .../model_dynamic_column_message_result.go | 157 + go/futureagi/model_edit_run_prompt_column.go | 268 + .../model_error_localizer_task_response.go | 765 + go/futureagi/model_error_name.go | 185 + go/futureagi/model_error_response.go | 494 + go/futureagi/model_eval_config_definition.go | 491 + go/futureagi/model_eval_config_response.go | 471 + go/futureagi/model_eval_config_structure.go | 955 + .../model_eval_config_structure_response.go | 197 + .../model_eval_config_structure_result.go | 157 + .../model_eval_config_update_request.go | 422 + .../model_eval_config_update_response.go | 354 + go/futureagi/model_eval_error_response.go | 494 + .../model_eval_explanation_cluster.go | 377 + ...al_explanation_summary_refresh_response.go | 197 + ...eval_explanation_summary_refresh_result.go | 157 + ...model_eval_explanation_summary_response.go | 197 + .../model_eval_explanation_summary_result.go | 216 + go/futureagi/model_eval_feedback_list_item.go | 353 + .../model_eval_feedback_list_response.go | 185 + ...odel_eval_feedback_list_response_result.go | 269 + .../model_eval_function_list_response.go | 185 + .../model_eval_function_list_result.go | 157 + go/futureagi/model_eval_list_filters.go | 305 + go/futureagi/model_eval_list_request.go | 372 + go/futureagi/model_eval_list_response.go | 185 + go/futureagi/model_eval_list_result.go | 193 + go/futureagi/model_eval_metric_entry.go | 423 + go/futureagi/model_eval_preview_response.go | 185 + go/futureagi/model_eval_preview_result.go | 157 + go/futureagi/model_eval_structure.go | 1088 + go/futureagi/model_eval_structure_response.go | 185 + go/futureagi/model_eval_structure_result.go | 157 + .../model_eval_summary_comparison_response.go | 197 + go/futureagi/model_eval_summary_response.go | 197 + ...model_eval_template_bulk_delete_request.go | 157 + ...odel_eval_template_bulk_delete_response.go | 185 + ...al_template_bulk_delete_response_result.go | 157 + .../model_eval_template_chart_point.go | 185 + .../model_eval_template_create_response.go | 185 + ...el_eval_template_create_response_result.go | 213 + .../model_eval_template_create_v2_request.go | 956 + .../model_eval_template_detail_response.go | 185 + ...el_eval_template_detail_response_result.go | 1068 + .../model_eval_template_list_charts_item.go | 213 + ...model_eval_template_list_charts_request.go | 157 + ...odel_eval_template_list_charts_response.go | 185 + ...al_template_list_charts_response_result.go | 157 + go/futureagi/model_eval_template_list_item.go | 521 + .../model_eval_template_list_response.go | 185 + ...odel_eval_template_list_response_result.go | 241 + go/futureagi/model_eval_template_summary.go | 241 + .../model_eval_template_update_response.go | 185 + ...el_eval_template_update_response_result.go | 213 + .../model_eval_template_update_v2_request.go | 1086 + ...el_eval_template_version_create_request.go | 219 + .../model_eval_template_version_item.go | 393 + ...del_eval_template_version_list_response.go | 185 + ...l_template_version_list_response_result.go | 213 + .../model_eval_template_version_response.go | 185 + ...l_eval_template_version_response_result.go | 213 + ..._eval_template_version_restore_response.go | 185 + ...emplate_version_restore_response_result.go | 241 + go/futureagi/model_eval_usage_chart_point.go | 348 + go/futureagi/model_eval_usage_feedback.go | 337 + go/futureagi/model_eval_usage_log_item.go | 543 + go/futureagi/model_eval_usage_logs.go | 241 + go/futureagi/model_eval_usage_stats.go | 269 + .../model_eval_usage_stats_response.go | 185 + .../model_eval_usage_stats_response_result.go | 269 + go/futureagi/model_evaluation_result.go | 273 + go/futureagi/model_events_over_time_point.go | 241 + ...model_execute_prompt_simulation_request.go | 165 + ...odel_execute_prompt_simulation_response.go | 197 + .../model_execute_prompt_simulation_result.go | 373 + go/futureagi/model_execute_run_test_.go | 212 + go/futureagi/model_execution_metrics.go | 427 + go/futureagi/model_execution_runs.go | 427 + ...del_experiment_comparison_column_metric.go | 305 + ...el_experiment_comparison_dataset_metric.go | 583 + .../model_experiment_comparison_detail.go | 398 + ..._experiment_comparison_details_response.go | 185 + ...el_experiment_comparison_details_result.go | 213 + .../model_experiment_comparison_metrics.go | 185 + ...xperiment_comparison_normalized_metrics.go | 277 + ...model_experiment_comparison_raw_metrics.go | 277 + .../model_experiment_comparison_weights.go | 266 + ...l_experiment_comparison_weights_request.go | 161 + go/futureagi/model_experiment_create_v2.go | 328 + ..._experiment_dataset_comparison_response.go | 185 + ...el_experiment_dataset_comparison_result.go | 277 + ...l_experiment_derived_variables_response.go | 185 + ...del_experiment_derived_variables_result.go | 161 + go/futureagi/model_experiment_detail_v2.go | 541 + ...odel_experiment_evaluation_column_stats.go | 333 + ...el_experiment_evaluation_stats_response.go | 185 + ...odel_experiment_evaluation_stats_result.go | 353 + ...model_experiment_evaluation_token_usage.go | 241 + ...del_experiment_feedback_create_response.go | 185 + ...model_experiment_feedback_create_result.go | 157 + .../model_experiment_feedback_detail_item.go | 316 + ...el_experiment_feedback_details_response.go | 185 + ...odel_experiment_feedback_details_result.go | 185 + ...odel_experiment_feedback_submit_request.go | 285 + ...del_experiment_feedback_submit_response.go | 185 + ...model_experiment_feedback_submit_result.go | 249 + ...l_experiment_feedback_template_response.go | 185 + ...del_experiment_feedback_template_result.go | 351 + .../model_experiment_json_schema_response.go | 185 + go/futureagi/model_experiment_list_v2.go | 439 + ...del_experiment_name_suggestion_response.go | 185 + ...model_experiment_name_suggestion_result.go | 157 + ...del_experiment_name_validation_response.go | 185 + ...model_experiment_name_validation_result.go | 193 + go/futureagi/model_experiment_rerun_cells.go | 237 + .../model_experiment_rerun_request.go | 233 + .../model_experiment_row_diff_cell.go | 233 + .../model_experiment_row_diff_response.go | 185 + .../model_experiment_stats_column_config.go | 323 + .../model_experiment_stats_metadata.go | 157 + .../model_experiment_stats_response.go | 185 + go/futureagi/model_experiment_stats_result.go | 213 + .../model_experiment_stop_response.go | 185 + go/futureagi/model_experiment_stop_result.go | 213 + ...del_experiment_stop_workflows_cancelled.go | 185 + ...model_experiment_string_result_response.go | 185 + ...del_experiment_table_rows_column_config.go | 675 + .../model_experiment_table_rows_metadata.go | 316 + .../model_experiment_table_rows_response.go | 185 + .../model_experiment_table_rows_result.go | 337 + go/futureagi/model_experiment_update_v2.go | 208 + .../model_experiment_v2_detail_response.go | 185 + .../model_experiment_workflow_response.go | 185 + .../model_experiment_workflow_result.go | 193 + .../model_extract_entities_request.go | 301 + .../model_extract_json_column_request.go | 261 + go/futureagi/model_failed_rerun_item.go | 185 + .../model_feed_detail_api_response.go | 197 + go/futureagi/model_feed_detail_core.go | 243 + go/futureagi/model_feed_list_api_response.go | 197 + go/futureagi/model_feed_list_response.go | 241 + go/futureagi/model_feed_list_row.go | 798 + go/futureagi/model_feed_sidebar.go | 241 + .../model_feed_sidebar_api_response.go | 197 + go/futureagi/model_feed_stats.go | 297 + go/futureagi/model_feed_stats_api_response.go | 197 + go/futureagi/model_feed_update_body.go | 244 + go/futureagi/model_feedback.go | 531 + .../model_get_annotation_labels_response.go | 197 + go/futureagi/model_get_trace_annotation.go | 257 + ...el_get_trace_annotation_values_response.go | 197 + ...odel_get_trace_annotation_values_result.go | 185 + go/futureagi/model_ground_truth_config.go | 316 + .../model_ground_truth_config_request.go | 328 + .../model_ground_truth_config_response.go | 185 + ...del_ground_truth_config_response_result.go | 157 + go/futureagi/model_ground_truth_item.go | 529 + .../model_ground_truth_list_response.go | 185 + ...model_ground_truth_list_response_result.go | 213 + .../model_ground_truth_upload_request.go | 385 + .../model_ground_truth_upload_response.go | 185 + ...del_ground_truth_upload_response_result.go | 269 + go/futureagi/model_heatmap_cell.go | 213 + .../model_hugging_face_add_rows_request.go | 249 + ...del_hugging_face_dataset_config_request.go | 157 + ...el_hugging_face_dataset_config_response.go | 185 + ...odel_hugging_face_dataset_config_result.go | 185 + ...del_hugging_face_dataset_create_request.go | 337 + .../model_hugging_face_dataset_detail.go | 344 + ...del_hugging_face_dataset_detail_request.go | 157 + ...el_hugging_face_dataset_detail_response.go | 185 + ...ing_face_dataset_detail_response_result.go | 185 + .../model_hugging_face_dataset_list_item.go | 288 + ...model_hugging_face_dataset_list_request.go | 165 + ...odel_hugging_face_dataset_list_response.go | 185 + ...gging_face_dataset_list_response_result.go | 213 + go/futureagi/model_import_annotation_entry.go | 257 + go/futureagi/model_import_annotations.go | 193 + .../model_json_column_schema_entry.go | 301 + go/futureagi/model_key_moment.go | 185 + ...l_legacy_knowledge_base_create_response.go | 185 + ...del_legacy_knowledge_base_create_result.go | 241 + .../model_legacy_knowledge_base_file_row.go | 347 + ...del_legacy_knowledge_base_files_request.go | 320 + ...el_legacy_knowledge_base_files_response.go | 185 + ...odel_legacy_knowledge_base_files_result.go | 270 + ...del_legacy_knowledge_base_list_response.go | 185 + ...model_legacy_knowledge_base_list_result.go | 157 + ..._legacy_knowledge_base_mutation_request.go | 197 + ...legacy_knowledge_base_mutation_response.go | 185 + ...l_legacy_knowledge_base_mutation_result.go | 358 + .../model_legacy_knowledge_base_option.go | 185 + ...legacy_knowledge_base_sdk_code_response.go | 185 + ...l_legacy_knowledge_base_sdk_code_result.go | 157 + ...odel_legacy_knowledge_base_table_column.go | 185 + ...el_legacy_knowledge_base_table_response.go | 185 + ...odel_legacy_knowledge_base_table_result.go | 197 + .../model_legacy_knowledge_base_table_row.go | 347 + .../model_list_alert_logs_200_response.go | 279 + .../model_list_alerts_200_response.go | 279 + ...ist_annotation_queue_items_200_response.go | 279 + ...del_list_annotation_queues_200_response.go | 279 + .../model_list_experiments_200_response.go | 279 + .../model_list_personas_200_response.go | 279 + .../model_list_trace_projects_200_response.go | 279 + ...al_file_dataset_create_started_response.go | 185 + ...ocal_file_dataset_create_started_result.go | 344 + .../model_management_api_error_response.go | 494 + .../model_manual_dataset_create_request.go | 237 + .../model_manual_dataset_create_response.go | 185 + .../model_manual_dataset_create_result.go | 241 + go/futureagi/model_member_list_item.go | 557 + go/futureagi/model_member_list_response.go | 185 + go/futureagi/model_member_list_result.go | 241 + go/futureagi/model_member_remove.go | 157 + go/futureagi/model_member_role_update.go | 336 + .../model_member_role_update_response.go | 185 + .../model_member_role_update_result.go | 185 + .../model_member_user_mutation_response.go | 185 + .../model_member_user_mutation_result.go | 185 + go/futureagi/model_member_workspace_access.go | 277 + go/futureagi/model_merge_dataset_request.go | 233 + go/futureagi/model_merge_dataset_response.go | 185 + go/futureagi/model_merge_dataset_result.go | 241 + ...eues_automation_rules_list_200_response.go | 279 + ...el_model_hub_api_keys_list_200_response.go | 279 + .../model_model_hub_error_response.go | 490 + .../model_model_hub_paginated_response.go | 279 + ...pt_history_executions_list_200_response.go | 279 + ...del_hub_prompt_labels_list_200_response.go | 279 + ..._hub_prompt_templates_list_200_response.go | 279 + ...odel_model_hub_scores_list_200_response.go | 279 + .../model_model_hub_string_result_response.go | 185 + .../model_model_hub_text_error_response.go | 494 + .../model_observe_graph_data_point.go | 234 + .../model_observe_graph_data_request.go | 301 + .../model_observe_graph_data_response.go | 197 + .../model_observe_graph_data_result.go | 185 + ...del_optimiser_analysis_refresh_response.go | 197 + ...model_optimiser_analysis_refresh_result.go | 185 + .../model_optimiser_analysis_response.go | 197 + ...model_optimiser_analysis_result_payload.go | 258 + go/futureagi/model_organization.go | 493 + go/futureagi/model_overview_api_response.go | 197 + go/futureagi/model_overview_response.go | 213 + go/futureagi/model_pattern_insight.go | 185 + go/futureagi/model_pattern_summary.go | 185 + go/futureagi/model_performance_summary.go | 187 + go/futureagi/model_persona.go | 1544 + go/futureagi/model_persona_create.go | 1211 + .../model_persona_duplicate_request.go | 157 + .../model_persona_duplicate_response.go | 165 + go/futureagi/model_persona_field_options.go | 665 + go/futureagi/model_persona_list.go | 1401 + ...model_preview_dataset_operation_request.go | 341 + ...odel_preview_dataset_operation_response.go | 185 + .../model_preview_dataset_operation_result.go | 213 + ...l_preview_dataset_operation_result_item.go | 265 + .../model_preview_run_eval_request.go | 333 + go/futureagi/model_preview_run_prompt.go | 294 + go/futureagi/model_project.go | 588 + go/futureagi/model_prompt_config.go | 657 + go/futureagi/model_prompt_config_entry.go | 591 + ...model_prompt_derived_variables_response.go | 185 + .../model_prompt_derived_variables_result.go | 185 + .../model_prompt_history_execution.go | 803 + go/futureagi/model_prompt_label.go | 366 + .../model_prompt_simulation_list_response.go | 197 + .../model_prompt_simulation_list_result.go | 269 + .../model_prompt_simulation_run_response.go | 197 + .../model_prompt_simulation_scenario_item.go | 317 + ...el_prompt_simulation_scenarios_response.go | 197 + ...odel_prompt_simulation_scenarios_result.go | 233 + ...odel_prompt_simulation_template_summary.go | 161 + .../model_prompt_simulation_update_request.go | 269 + go/futureagi/model_prompt_template.go | 453 + go/futureagi/model_provider_status_item.go | 382 + .../model_provider_status_response.go | 185 + go/futureagi/model_provider_status_result.go | 157 + .../model_queue_add_items_response.go | 197 + go/futureagi/model_queue_add_items_result.go | 277 + .../model_queue_add_label_response.go | 197 + go/futureagi/model_queue_add_label_result.go | 241 + .../model_queue_agreement_annotator_pair.go | 241 + go/futureagi/model_queue_agreement_label.go | 305 + .../model_queue_agreement_response.go | 197 + go/futureagi/model_queue_agreement_result.go | 215 + ...l_queue_analytics_annotator_performance.go | 299 + .../model_queue_analytics_response.go | 197 + go/futureagi/model_queue_analytics_result.go | 269 + .../model_queue_analytics_throughput.go | 213 + .../model_queue_analytics_throughput_daily.go | 185 + .../model_queue_annotate_detail_response.go | 197 + .../model_queue_annotate_detail_result.go | 522 + go/futureagi/model_queue_annotator_nested.go | 341 + .../model_queue_assign_items_response.go | 197 + .../model_queue_assign_items_result.go | 157 + .../model_queue_bulk_remove_items_response.go | 197 + .../model_queue_bulk_remove_items_result.go | 157 + go/futureagi/model_queue_default_queue.go | 313 + go/futureagi/model_queue_default_request.go | 197 + go/futureagi/model_queue_default_response.go | 197 + go/futureagi/model_queue_default_result.go | 241 + .../model_queue_discussion_response.go | 197 + go/futureagi/model_queue_discussion_result.go | 257 + ...model_queue_export_annotations_response.go | 197 + .../model_queue_export_column_mapping.go | 237 + .../model_queue_export_default_mapping.go | 213 + go/futureagi/model_queue_export_field.go | 549 + .../model_queue_export_fields_response.go | 197 + .../model_queue_export_fields_result.go | 185 + .../model_queue_export_to_dataset_request.go | 237 + .../model_queue_export_to_dataset_response.go | 197 + .../model_queue_export_to_dataset_result.go | 241 + go/futureagi/model_queue_for_source_entry.go | 372 + go/futureagi/model_queue_for_source_item.go | 243 + go/futureagi/model_queue_for_source_queue.go | 241 + .../model_queue_for_source_response.go | 197 + .../model_queue_hard_delete_request.go | 185 + .../model_queue_hard_delete_response.go | 197 + .../model_queue_hard_delete_result.go | 257 + ...model_queue_import_annotations_response.go | 197 + .../model_queue_import_annotations_result.go | 157 + go/futureagi/model_queue_item.go | 1027 + .../model_queue_item_annotations_response.go | 197 + .../model_queue_item_navigation_request.go | 201 + go/futureagi/model_queue_label_nested.go | 337 + go/futureagi/model_queue_label_request.go | 197 + go/futureagi/model_queue_label_result.go | 361 + .../model_queue_navigation_response.go | 197 + go/futureagi/model_queue_navigation_result.go | 229 + .../model_queue_next_item_response.go | 197 + go/futureagi/model_queue_next_item_result.go | 157 + .../model_queue_progress_annotator_stat.go | 344 + go/futureagi/model_queue_progress_response.go | 197 + go/futureagi/model_queue_progress_result.go | 381 + .../model_queue_progress_user_progress.go | 325 + ...odel_queue_release_reservation_response.go | 197 + .../model_queue_release_reservation_result.go | 157 + .../model_queue_remove_label_response.go | 197 + .../model_queue_remove_label_result.go | 157 + .../model_queue_review_item_response.go | 197 + .../model_queue_review_item_result.go | 269 + go/futureagi/model_queue_status_request.go | 157 + go/futureagi/model_queue_status_response.go | 197 + ...model_queue_submit_annotations_response.go | 197 + .../model_queue_submit_annotations_result.go | 157 + go/futureagi/model_recommendation.go | 359 + go/futureagi/model_representative_trace.go | 384 + go/futureagi/model_req_data_config.go | 403 + go/futureagi/model_rerun_calls_response.go | 353 + go/futureagi/model_rerun_cell_entry.go | 185 + go/futureagi/model_review_item_request.go | 229 + .../model_review_label_comment_request.go | 197 + go/futureagi/model_root_cause.go | 213 + go/futureagi/model_rules_inner.go | 235 + .../model_run_new_evals_on_test_execution.go | 273 + go/futureagi/model_run_new_evals_response.go | 213 + .../model_run_prompt_choice_option.go | 185 + ...model_run_prompt_column_config_response.go | 185 + .../model_run_prompt_column_config_result.go | 157 + ...odel_run_prompt_column_preview_response.go | 185 + .../model_run_prompt_column_preview_result.go | 213 + .../model_run_prompt_options_response.go | 185 + .../model_run_prompt_options_result.go | 269 + go/futureagi/model_run_prompt_tool_option.go | 362 + go/futureagi/model_run_test_analytics.go | 282 + ...model_run_test_call_executions_response.go | 327 + .../model_run_test_chat_execution_response.go | 197 + .../model_run_test_chat_execution_result.go | 269 + .../model_run_test_components_update.go | 269 + go/futureagi/model_run_test_error_response.go | 494 + .../model_run_test_execution_response.go | 341 + go/futureagi/model_run_test_kpis_response.go | 1108 + .../model_run_test_message_response.go | 125 + go/futureagi/model_run_test_name_response.go | 197 + go/futureagi/model_run_test_name_result.go | 185 + go/futureagi/model_run_test_response.go | 1161 + .../model_run_test_scenario_item_response.go | 197 + .../model_scenario_add_columns_request.go | 157 + .../model_scenario_add_columns_response.go | 233 + .../model_scenario_add_rows_request.go | 193 + .../model_scenario_add_rows_response.go | 233 + go/futureagi/model_scenario_create_request.go | 1265 + .../model_scenario_create_response.go | 197 + .../model_scenario_delete_response.go | 125 + .../model_scenario_detail_response.go | 757 + .../model_scenario_edit_prompts_request.go | 157 + go/futureagi/model_scenario_edit_request.go | 233 + go/futureagi/model_scenario_edit_response.go | 161 + go/futureagi/model_scenario_error_response.go | 494 + go/futureagi/model_scenario_list_response.go | 255 + go/futureagi/model_scenario_prompt_item.go | 161 + .../model_scenario_prompts_update_response.go | 161 + go/futureagi/model_scenario_response.go | 1043 + go/futureagi/model_score.go | 795 + go/futureagi/model_score_delete_response.go | 197 + .../model_score_for_source_response.go | 233 + go/futureagi/model_score_response.go | 197 + go/futureagi/model_score_trend.go | 241 + ...model_sdk_configure_evaluations_request.go | 244 + ...odel_sdk_configure_evaluations_response.go | 185 + go/futureagi/model_sdk_error_response.go | 287 + go/futureagi/model_sdk_eval_template.go | 496 + .../model_sdk_eval_template_response.go | 185 + go/futureagi/model_sdk_get_evals_response.go | 185 + go/futureagi/model_sdk_message_result.go | 157 + ...model_sdk_simulation_analytics_response.go | 185 + .../model_sdk_simulation_analytics_result.go | 432 + .../model_sdk_simulation_metrics_response.go | 185 + .../model_sdk_simulation_metrics_result.go | 771 + .../model_sdk_simulation_runs_response.go | 185 + .../model_sdk_simulation_runs_result.go | 1020 + .../model_sdk_standalone_eval_input.go | 191 + .../model_sdk_standalone_eval_request.go | 225 + .../model_sdk_standalone_eval_response.go | 185 + .../model_sdk_standalone_eval_result_item.go | 157 + .../model_sdk_standalone_eval_v2_request.go | 482 + .../model_sdk_standalone_eval_v2_response.go | 185 + .../model_sdk_standalone_eval_v2_result.go | 185 + .../model_sdkcicd_evaluation_run_accepted.go | 241 + ...dkcicd_evaluation_run_accepted_response.go | 185 + .../model_sdkcicd_evaluation_run_summary.go | 241 + .../model_sdkcicd_evaluation_runs_response.go | 185 + .../model_sdkcicd_evaluation_runs_result.go | 221 + go/futureagi/model_selection.go | 365 + go/futureagi/model_send_chat_request.go | 202 + .../model_session_comparison_response.go | 197 + .../model_session_comparison_result.go | 197 + go/futureagi/model_sidebar_ai_metadata.go | 279 + go/futureagi/model_sidebar_timeline.go | 220 + ...api_personas_field_options_200_response.go | 279 + ...i_personas_system_personas_200_response.go | 279 + .../model_simulate_eval_config_response.go | 504 + go/futureagi/model_simulator_agent.go | 798 + .../model_simulator_agent_delete_response.go | 125 + .../model_simulator_agent_list_response.go | 327 + .../model_start_evals_process_request.go | 233 + go/futureagi/model_stop_user_eval_request.go | 125 + go/futureagi/model_submit_annotation_entry.go | 221 + go/futureagi/model_submit_annotations.go | 244 + go/futureagi/model_switch_workspace.go | 157 + .../model_switch_workspace_response.go | 185 + go/futureagi/model_switch_workspace_result.go | 269 + go/futureagi/model_synthetic_data.go | 289 + .../model_synthetic_dataset_config.go | 300 + .../model_synthetic_dataset_config_payload.go | 244 + ...model_synthetic_dataset_config_response.go | 185 + .../model_synthetic_dataset_config_result.go | 185 + ...nthetic_dataset_create_started_response.go | 185 + ...synthetic_dataset_create_started_result.go | 185 + .../model_synthetic_dataset_creation.go | 249 + .../model_synthetic_dataset_update_data.go | 257 + ...model_synthetic_dataset_update_response.go | 185 + .../model_synthetic_dataset_update_result.go | 185 + go/futureagi/model_test_execution.go | 1018 + .../model_test_execution_analytics.go | 216 + .../model_test_execution_bulk_delete.go | 167 + ...del_test_execution_bulk_delete_response.go | 233 + ...odel_test_execution_chat_batch_response.go | 197 + .../model_test_execution_chat_batch_result.go | 213 + .../model_test_execution_column_order.go | 157 + ...el_test_execution_column_order_response.go | 161 + .../model_test_execution_detail_response.go | 508 + .../model_test_execution_item_response.go | 759 + go/futureagi/model_test_execution_rerun.go | 236 + .../model_test_execution_rerun_response.go | 341 + .../model_test_execution_rerun_result.go | 341 + .../model_test_execution_status_summary.go | 470 + .../model_test_execution_transcript_call.go | 327 + ...del_test_execution_transcripts_response.go | 233 + go/futureagi/model_trace.go | 539 + .../model_trace_annotation_note_response.go | 298 + .../model_trace_annotation_value_response.go | 494 + go/futureagi/model_trace_evidence.go | 245 + go/futureagi/model_trace_preview.go | 217 + go/futureagi/model_trace_session.go | 313 + .../model_trace_session_graph_data_request.go | 301 + go/futureagi/model_trace_summary.go | 309 + go/futureagi/model_trace_tags_update.go | 157 + ...acer_trace_annotation_list_200_response.go | 279 + .../model_tracer_trace_list_200_response.go | 279 + ..._tracer_trace_session_list_200_response.go | 279 + go/futureagi/model_traces_aggregates.go | 325 + go/futureagi/model_traces_list_row.go | 368 + go/futureagi/model_traces_tab_api_response.go | 197 + go/futureagi/model_traces_tab_response.go | 213 + go/futureagi/model_trend_metric.go | 241 + go/futureagi/model_trend_point.go | 214 + go/futureagi/model_trends_tab_api_response.go | 197 + go/futureagi/model_trends_tab_response.go | 241 + go/futureagi/model_update_run_test_.go | 305 + go/futureagi/model_user.go | 462 + go/futureagi/model_user_alert_monitor.go | 1179 + .../model_user_alert_monitor_duplicate.go | 185 + ...l_user_alert_monitor_duplicate_response.go | 197 + ...del_user_alert_monitor_duplicate_result.go | 185 + go/futureagi/model_user_alert_monitor_log.go | 518 + .../model_user_alert_monitor_metric_option.go | 233 + ...r_alert_monitor_metric_options_response.go | 165 + .../model_user_code_example_response.go | 197 + .../model_user_eval_mutation_request.go | 513 + .../model_user_eval_update_request.go | 529 + go/futureagi/model_user_info_organization.go | 249 + go/futureagi/model_user_info_response.go | 898 + .../model_user_info_two_factor_methods.go | 185 + go/futureagi/model_users_response.go | 197 + go/futureagi/model_users_result.go | 213 + .../model_vector_db_column_request.go | 685 + go/futureagi/model_workspace_access_input.go | 193 + go/futureagi/model_workspace_admin_summary.go | 187 + .../model_workspace_list_item_response.go | 451 + ...model_workspace_list_paginated_response.go | 301 + go/futureagi/model_workspace_member_remove.go | 157 + .../model_workspace_member_role_update.go | 185 + ...l_workspace_member_role_update_response.go | 185 + ...del_workspace_member_role_update_result.go | 241 + go/futureagi/model_workspace_summary.go | 285 + go/futureagi/response.go | 48 + go/futureagi/utils.go | 362 + java/futureagi/.gitignore | 43 + java/futureagi/README.md | 1802 + java/futureagi/api/openapi.yaml | 57920 ++++++++++++++ java/futureagi/build.gradle | 107 + java/futureagi/build.sbt | 1 + java/futureagi/docs/AccountsApi.md | 886 + java/futureagi/docs/AlertsApi.md | 2492 + .../docs/AnnotationQueueDiscussionApi.md | 926 + .../futureagi/docs/AnnotationQueueItemsApi.md | 2234 + .../docs/AnnotationQueueReviewApi.md | 190 + java/futureagi/docs/AnnotationQueuesApi.md | 2436 + java/futureagi/docs/DatasetsApi.md | 3504 + java/futureagi/docs/ExperimentsApi.md | 2454 + java/futureagi/docs/ModelHubApi.md | 34286 +++++++++ java/futureagi/docs/RunTestsEvalConfigsApi.md | 716 + java/futureagi/docs/RunTestsEvalSummaryApi.md | 358 + java/futureagi/docs/ScenariosApi.md | 714 + java/futureagi/docs/SdkApi.md | 1346 + java/futureagi/docs/SimulateApi.md | 9942 +++ .../docs/SimulationAgentDefinitionsApi.md | 874 + java/futureagi/docs/SimulationPersonasApi.md | 860 + java/futureagi/docs/SimulationRunTestsApi.md | 1716 + java/futureagi/docs/SimulationScenariosApi.md | 870 + .../docs/SimulationTestExecutionsApi.md | 1206 + java/futureagi/docs/SimulationsApi.md | 554 + java/futureagi/docs/TracerApi.md | 7482 ++ java/futureagi/docs/TracingApi.md | 2984 + java/futureagi/docs/UsersApi.md | 926 + java/futureagi/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43453 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + java/futureagi/gradlew | 249 + java/futureagi/gradlew.bat | 92 + java/futureagi/pom.xml | 258 + java/futureagi/settings.gradle | 1 + java/futureagi/src/main/AndroidManifest.xml | 3 + .../java/com/futureagi/sdk/ApiClient.java | 456 + .../java/com/futureagi/sdk/ApiException.java | 92 + .../java/com/futureagi/sdk/ApiResponse.java | 60 + .../java/com/futureagi/sdk/Configuration.java | 41 + .../src/main/java/com/futureagi/sdk/JSON.java | 264 + .../src/main/java/com/futureagi/sdk/Pair.java | 57 + .../com/futureagi/sdk/RFC3339DateFormat.java | 58 + .../futureagi/sdk/ServerConfiguration.java | 72 + .../com/futureagi/sdk/ServerVariable.java | 37 + .../com/futureagi/sdk/api/AccountsApi.java | 552 + .../java/com/futureagi/sdk/api/AlertsApi.java | 1431 + .../sdk/api/AnnotationQueueDiscussionApi.java | 615 + .../sdk/api/AnnotationQueueItemsApi.java | 1389 + .../sdk/api/AnnotationQueueReviewApi.java | 192 + .../sdk/api/AnnotationQueuesApi.java | 1381 + .../com/futureagi/sdk/api/DatasetsApi.java | 1903 + .../com/futureagi/sdk/api/ExperimentsApi.java | 1348 + .../com/futureagi/sdk/api/ModelHubApi.java | 18391 +++++ .../sdk/api/RunTestsEvalConfigsApi.java | 479 + .../sdk/api/RunTestsEvalSummaryApi.java | 295 + .../com/futureagi/sdk/api/ScenariosApi.java | 492 + .../java/com/futureagi/sdk/api/SdkApi.java | 819 + .../com/futureagi/sdk/api/SimulateApi.java | 5452 ++ .../api/SimulationAgentDefinitionsApi.java | 557 + .../sdk/api/SimulationPersonasApi.java | 532 + .../sdk/api/SimulationRunTestsApi.java | 994 + .../sdk/api/SimulationScenariosApi.java | 557 + .../sdk/api/SimulationTestExecutionsApi.java | 724 + .../com/futureagi/sdk/api/SimulationsApi.java | 408 + .../java/com/futureagi/sdk/api/TracerApi.java | 4301 ++ .../com/futureagi/sdk/api/TracingApi.java | 1823 + .../java/com/futureagi/sdk/api/UsersApi.java | 598 + .../sdk/model/AbstractOpenApiSchema.java | 147 + .../sdk/model/AccountsErrorResponse.java | 575 + .../sdk/model/AddApiColumnRequest.java | 237 + .../sdk/model/AddAsNewDatasetRequest.java | 238 + .../sdk/model/AddEvalConfigsRequest.java | 167 + .../sdk/model/AddEvalConfigsResponse.java | 288 + .../com/futureagi/sdk/model/AddItems.java | 204 + .../com/futureagi/sdk/model/AddQueueItem.java | 230 + .../sdk/model/AddRowsFromFileRequest.java | 223 + .../com/futureagi/sdk/model/AddRunPrompt.java | 225 + .../AgentDefinitionBulkDeleteRequest.java | 168 + .../AgentDefinitionBulkDeleteResponse.java | 205 + .../model/AgentDefinitionCreateRequest.java | 1269 + .../model/AgentDefinitionCreateResponse.java | 186 + .../model/AgentDefinitionDeleteResponse.java | 149 + .../sdk/model/AgentDefinitionEditRequest.java | 1161 + .../model/AgentDefinitionEditResponse.java | 186 + .../model/AgentDefinitionListResponse.java | 1073 + .../sdk/model/AgentDefinitionResponse.java | 1313 + .../futureagi/sdk/model/AgentFlowGraph.java | 214 + .../model/AgentVersionActivateResponse.java | 186 + .../sdk/model/AgentVersionCreateRequest.java | 1106 + .../sdk/model/AgentVersionCreateResponse.java | 186 + .../sdk/model/AgentVersionDeleteResponse.java | 149 + .../sdk/model/AgentVersionListResponse.java | 622 + .../sdk/model/AgentVersionResponse.java | 781 + .../model/AgentVersionRestoreResponse.java | 220 + .../futureagi/sdk/model/AllActiveTests.java | 201 + .../sdk/model/AnnotationLabelResponse.java | 332 + .../model/AnnotationLabelRestoreResponse.java | 188 + .../futureagi/sdk/model/AnnotationQueue.java | 1240 + .../sdk/model/AnnotationSummaryHeader.java | 260 + .../sdk/model/AnnotationSummaryResponse.java | 188 + .../sdk/model/AnnotationSummaryResult.java | 251 + .../sdk/model/AnnotationsLabels.java | 556 + .../futureagi/sdk/model/ApiErrorResponse.java | 575 + .../model/ApiErrorWithDetailsResponse.java | 575 + .../java/com/futureagi/sdk/model/ApiKey.java | 363 + .../sdk/model/ApiSelectionTooLargeDetail.java | 292 + .../sdk/model/ApiSelectionTooLargeError.java | 423 + .../sdk/model/ApiTextErrorResponse.java | 575 + .../com/futureagi/sdk/model/AssignItems.java | 291 + .../futureagi/sdk/model/AutomationRule.java | 653 + .../sdk/model/AutomationRuleConditions.java | 323 + .../AutomationRuleConditionsFilterInner.java | 296 + ...RuleConditionsFilterInnerFilterConfig.java | 281 + ...utomationRuleEvaluateAcceptedResponse.java | 223 + .../model/AutomationRuleEvaluateResponse.java | 188 + .../model/AutomationRuleEvaluateResult.java | 295 + .../sdk/model/AutomationRuleScope.java | 260 + .../sdk/model/BaseColumnsResponse.java | 188 + .../sdk/model/BaseColumnsResponseResult.java | 165 + .../BulkAnnotationAnnotationRequest.java | 311 + .../sdk/model/BulkAnnotationNoteRequest.java | 151 + .../model/BulkAnnotationRecordRequest.java | 253 + .../sdk/model/BulkAnnotationRequest.java | 167 + .../sdk/model/BulkAnnotationResponse.java | 188 + .../model/BulkAnnotationResponseResult.java | 503 + .../sdk/model/BulkCreateScoreItem.java | 313 + .../futureagi/sdk/model/BulkCreateScores.java | 463 + .../sdk/model/BulkCreateScoresResponse.java | 188 + .../sdk/model/BulkCreateScoresResult.java | 215 + .../futureagi/sdk/model/BulkRemoveItems.java | 168 + .../sdk/model/CICDEvaluationItem.java | 307 + .../java/com/futureagi/sdk/model/CICDJob.java | 239 + .../sdk/model/CallBranchAnalysisResponse.java | 310 + .../CallBranchDeviationCreateResponse.java | 240 + .../futureagi/sdk/model/CallExecution.java | 1947 + .../model/CallExecutionDeleteResponse.java | 149 + .../sdk/model/CallExecutionDetail.java | 2232 + ...lExecutionErrorLocalizerTasksResponse.java | 214 + .../sdk/model/CallExecutionErrorResponse.java | 575 + .../sdk/model/CallExecutionLogsResponse.java | 213 + .../sdk/model/CallExecutionRerun.java | 275 + .../sdk/model/CallExecutionStatusUpdate.java | 254 + .../sdk/model/CallLogEntryResponse.java | 435 + .../futureagi/sdk/model/CallTranscript.java | 463 + .../sdk/model/CallTranscriptResponse.java | 298 + .../model/CancelTestExecutionResponse.java | 224 + .../sdk/model/ChatMessageContract.java | 445 + .../sdk/model/ChatSDKCodeResponse.java | 188 + .../sdk/model/ChatSDKCodeResult.java | 260 + .../sdk/model/ChatSendMessageResponse.java | 188 + .../sdk/model/ChatSendMessageResult.java | 338 + .../com/futureagi/sdk/model/ChatToolCall.java | 224 + .../sdk/model/ChatToolCallFunction.java | 187 + .../sdk/model/ClassifyColumnRequest.java | 310 + .../sdk/model/CloneDatasetRequest.java | 151 + .../futureagi/sdk/model/CoOccurringIssue.java | 332 + .../java/com/futureagi/sdk/model/Column.java | 487 + .../futureagi/sdk/model/ColumnDefinition.java | 280 + .../com/futureagi/sdk/model/ColumnOrder.java | 223 + .../model/ColumnTypeConversionResponse.java | 188 + .../sdk/model/ColumnTypeConversionResult.java | 396 + .../futureagi/sdk/model/CompareDataset.java | 432 + .../model/CompareDatasetDeleteResponse.java | 188 + .../sdk/model/CompareDatasetDeleteResult.java | 151 + .../sdk/model/CompareDatasetMetadata.java | 224 + .../sdk/model/CompareDatasetResponse.java | 188 + .../sdk/model/CompareDatasetResult.java | 251 + .../sdk/model/CompareDatasetRowResponse.java | 188 + .../sdk/model/CompareDatasetRowResult.java | 268 + .../sdk/model/CompareDatasetStatsRequest.java | 275 + .../model/CompareDatasetStatsResponse.java | 202 + .../sdk/model/CompareEvalListResponse.java | 188 + .../sdk/model/CompareEvalListResult.java | 166 + .../sdk/model/CompareEvalsListRequest.java | 273 + .../model/CompareExperimentEvalRequest.java | 590 + .../model/ComparePreviewRunEvalRequest.java | 374 + .../sdk/model/CompareStartEvalsRequest.java | 216 + .../sdk/model/CompositeChildItem.java | 448 + .../sdk/model/CompositeChildResult.java | 625 + .../CompositeEvalAdhocExecuteRequest.java | 923 + .../sdk/model/CompositeEvalCreateRequest.java | 550 + .../model/CompositeEvalCreateResponse.java | 188 + .../CompositeEvalCreateResponseResult.java | 384 + .../model/CompositeEvalDetailResponse.java | 188 + .../CompositeEvalDetailResponseResult.java | 605 + .../model/CompositeEvalExecuteRequest.java | 595 + .../model/CompositeEvalExecuteResponse.java | 188 + .../CompositeEvalExecuteResponseResult.java | 671 + .../sdk/model/CompositeEvalUpdateRequest.java | 600 + .../sdk/model/ConditionalColumnRequest.java | 238 + .../sdk/model/ConfigureEvaluations.java | 307 + .../CreateDatasetFromExperimentRequest.java | 187 + .../CreateDatasetFromLocalFileRequest.java | 258 + .../sdk/model/CreateEmptyDatasetRequest.java | 260 + .../sdk/model/CreateLinearIssue.java | 259 + .../sdk/model/CreateLinearIssueResponse.java | 188 + .../sdk/model/CreateLinearIssueResult.java | 295 + .../model/CreatePromptSimulationRequest.java | 410 + .../futureagi/sdk/model/CreateRunTest.java | 561 + .../com/futureagi/sdk/model/CreateScore.java | 486 + .../java/com/futureagi/sdk/model/Dataset.java | 456 + .../sdk/model/DatasetAddColumnsRequest.java | 166 + .../model/DatasetAddEmptyColumnsRequest.java | 152 + .../sdk/model/DatasetAddEmptyRowsRequest.java | 152 + .../DatasetAddRowsFromExistingRequest.java | 202 + .../sdk/model/DatasetAddRowsRequest.java | 166 + .../sdk/model/DatasetBehaviorRequest.java | 302 + .../sdk/model/DatasetCellDataRequest.java | 218 + .../sdk/model/DatasetCellDataResponse.java | 202 + .../futureagi/sdk/model/DatasetCellValue.java | 319 + .../sdk/model/DatasetColumnDetailItem.java | 246 + .../model/DatasetColumnDetailResponse.java | 188 + .../sdk/model/DatasetColumnDetailResult.java | 167 + .../model/DatasetColumnsMutationResponse.java | 188 + .../model/DatasetColumnsMutationResult.java | 203 + .../sdk/model/DatasetCopyResponse.java | 188 + .../sdk/model/DatasetCopyResult.java | 224 + .../model/DatasetCreateStartedResponse.java | 188 + .../sdk/model/DatasetCreateStartedResult.java | 282 + .../DatasetCreationProgressResponse.java | 188 + .../model/DatasetCreationProgressResult.java | 691 + .../DatasetDerivedVariablesResponse.java | 188 + .../model/DatasetDerivedVariablesResult.java | 167 + .../sdk/model/DatasetEvalStatsItem.java | 505 + .../sdk/model/DatasetEvalStatsMetric.java | 296 + .../sdk/model/DatasetEvalStatsResponse.java | 203 + .../DatasetExplanationSummaryResponse.java | 188 + ...tasetExplanationSummaryResponseResult.java | 310 + .../sdk/model/DatasetJsonSchemaResponse.java | 203 + .../futureagi/sdk/model/DatasetListItem.java | 404 + .../sdk/model/DatasetListResponse.java | 188 + .../sdk/model/DatasetListResult.java | 239 + .../DatasetMultipleStaticColumnsRequest.java | 166 + .../futureagi/sdk/model/DatasetNameItem.java | 224 + .../sdk/model/DatasetNamesResponse.java | 188 + .../sdk/model/DatasetNamesResult.java | 167 + .../sdk/model/DatasetRowDataRequest.java | 254 + .../model/DatasetRowDataRequestSortInner.java | 222 + .../sdk/model/DatasetRowDataResponse.java | 188 + .../sdk/model/DatasetRowDataResult.java | 202 + .../sdk/model/DatasetRowDiffRequest.java | 304 + .../sdk/model/DatasetRowNavigation.java | 168 + .../DatasetRowsImportMessageResponse.java | 188 + .../model/DatasetRowsImportMessageResult.java | 151 + .../model/DatasetRowsImportedResponse.java | 188 + .../sdk/model/DatasetRowsImportedResult.java | 187 + .../model/DatasetRunPromptStatsPrompt.java | 297 + .../model/DatasetRunPromptStatsResponse.java | 188 + .../model/DatasetRunPromptStatsResult.java | 276 + .../sdk/model/DatasetSdkRowsCode.java | 331 + .../sdk/model/DatasetSdkRowsRequest.java | 210 + .../sdk/model/DatasetSdkRowsResponse.java | 188 + .../sdk/model/DatasetSdkRowsResult.java | 239 + .../sdk/model/DatasetStaticColumnRequest.java | 223 + .../sdk/model/DatasetTableMetadata.java | 331 + .../sdk/model/DatasetTableResponse.java | 188 + .../sdk/model/DatasetTableResult.java | 467 + .../model/DatasetUpdateCellValueRequest.java | 246 + .../model/DatasetUpdateColumnNameRequest.java | 151 + .../model/DatasetUpdateColumnTypeRequest.java | 223 + .../sdk/model/DeepAnalysisApiResponse.java | 188 + .../futureagi/sdk/model/DeepAnalysisBody.java | 187 + .../DeepAnalysisDispatchApiResponse.java | 188 + .../model/DeepAnalysisDispatchResponse.java | 187 + .../sdk/model/DeepAnalysisResponse.java | 325 + .../sdk/model/DeleteEvalConfigResponse.java | 151 + .../sdk/model/DeleteEvalTemplate.java | 152 + .../sdk/model/DerivedVariableDetail.java | 347 + .../model/DerivedVariableDetailResponse.java | 188 + .../model/DerivedVariableExtractRequest.java | 259 + .../model/DerivedVariablePreviewRequest.java | 201 + .../model/DevelopDatasetMessageResponse.java | 187 + .../sdk/model/DiscussionCommentRequest.java | 310 + .../sdk/model/DiscussionReactionRequest.java | 151 + .../model/DiscussionThreadStatusRequest.java | 151 + .../sdk/model/DuplicateDatasetRequest.java | 240 + .../sdk/model/DuplicateDatasetResponse.java | 188 + .../sdk/model/DuplicateDatasetResult.java | 296 + .../sdk/model/DuplicateRowsRequest.java | 241 + .../sdk/model/DuplicateRowsResponse.java | 188 + .../sdk/model/DuplicateRowsResult.java | 312 + .../model/DynamicColumnCreateResponse.java | 188 + .../sdk/model/DynamicColumnCreateResult.java | 224 + .../model/DynamicColumnMessageResponse.java | 188 + .../sdk/model/DynamicColumnMessageResult.java | 151 + .../sdk/model/EditRunPromptColumn.java | 283 + .../sdk/model/ErrorLocalizerTaskResponse.java | 725 + .../com/futureagi/sdk/model/ErrorName.java | 187 + .../futureagi/sdk/model/ErrorResponse.java | 575 + .../sdk/model/EvalConfigDefinition.java | 518 + .../sdk/model/EvalConfigResponse.java | 631 + .../sdk/model/EvalConfigStructure.java | 907 + .../model/EvalConfigStructureResponse.java | 188 + .../sdk/model/EvalConfigStructureResult.java | 152 + .../sdk/model/EvalConfigUpdateRequest.java | 466 + .../sdk/model/EvalConfigUpdateResponse.java | 368 + .../sdk/model/EvalErrorResponse.java | 575 + .../sdk/model/EvalExplanationCluster.java | 346 + ...EvalExplanationSummaryRefreshResponse.java | 188 + .../EvalExplanationSummaryRefreshResult.java | 151 + .../model/EvalExplanationSummaryResponse.java | 188 + .../model/EvalExplanationSummaryResult.java | 240 + .../sdk/model/EvalFeedbackListItem.java | 404 + .../sdk/model/EvalFeedbackListResponse.java | 188 + .../model/EvalFeedbackListResponseResult.java | 312 + .../sdk/model/EvalFunctionListResponse.java | 188 + .../sdk/model/EvalFunctionListResult.java | 166 + .../futureagi/sdk/model/EvalListFilters.java | 514 + .../futureagi/sdk/model/EvalListRequest.java | 502 + .../futureagi/sdk/model/EvalListResponse.java | 188 + .../futureagi/sdk/model/EvalListResult.java | 214 + .../futureagi/sdk/model/EvalMetricEntry.java | 459 + .../sdk/model/EvalPreviewResponse.java | 188 + .../sdk/model/EvalPreviewResult.java | 166 + .../futureagi/sdk/model/EvalStructure.java | 1282 + .../sdk/model/EvalStructureResponse.java | 188 + .../sdk/model/EvalStructureResult.java | 152 + .../model/EvalSummaryComparisonResponse.java | 203 + .../sdk/model/EvalSummaryResponse.java | 203 + .../model/EvalTemplateBulkDeleteRequest.java | 168 + .../model/EvalTemplateBulkDeleteResponse.java | 188 + .../EvalTemplateBulkDeleteResponseResult.java | 151 + .../sdk/model/EvalTemplateChartPoint.java | 188 + .../sdk/model/EvalTemplateCreateResponse.java | 188 + .../EvalTemplateCreateResponseResult.java | 224 + .../model/EvalTemplateCreateV2Request.java | 1267 + .../sdk/model/EvalTemplateDetailResponse.java | 188 + .../EvalTemplateDetailResponseResult.java | 1275 + .../sdk/model/EvalTemplateListChartsItem.java | 252 + .../model/EvalTemplateListChartsRequest.java | 168 + .../model/EvalTemplateListChartsResponse.java | 188 + .../EvalTemplateListChartsResponseResult.java | 167 + .../sdk/model/EvalTemplateListItem.java | 661 + .../sdk/model/EvalTemplateListResponse.java | 188 + .../model/EvalTemplateListResponseResult.java | 275 + .../sdk/model/EvalTemplateSummary.java | 273 + .../sdk/model/EvalTemplateUpdateResponse.java | 188 + .../EvalTemplateUpdateResponseResult.java | 224 + .../model/EvalTemplateUpdateV2Request.java | 1391 + .../EvalTemplateVersionCreateRequest.java | 266 + .../sdk/model/EvalTemplateVersionItem.java | 418 + .../EvalTemplateVersionListResponse.java | 188 + ...EvalTemplateVersionListResponseResult.java | 240 + .../model/EvalTemplateVersionResponse.java | 188 + .../EvalTemplateVersionResponseResult.java | 224 + .../EvalTemplateVersionRestoreResponse.java | 188 + ...lTemplateVersionRestoreResponseResult.java | 260 + .../sdk/model/EvalUsageChartPoint.java | 354 + .../sdk/model/EvalUsageFeedback.java | 346 + .../futureagi/sdk/model/EvalUsageLogItem.java | 593 + .../futureagi/sdk/model/EvalUsageLogs.java | 275 + .../futureagi/sdk/model/EvalUsageStats.java | 296 + .../sdk/model/EvalUsageStatsResponse.java | 188 + .../model/EvalUsageStatsResponseResult.java | 314 + .../futureagi/sdk/model/EvaluationResult.java | 296 + .../sdk/model/EventsOverTimePoint.java | 259 + .../model/ExecutePromptSimulationRequest.java | 204 + .../ExecutePromptSimulationResponse.java | 188 + .../model/ExecutePromptSimulationResult.java | 342 + .../futureagi/sdk/model/ExecuteRunTest.java | 262 + .../futureagi/sdk/model/ExecutionMetrics.java | 428 + .../futureagi/sdk/model/ExecutionRuns.java | 428 + .../ExperimentComparisonColumnMetric.java | 347 + .../ExperimentComparisonDatasetMetric.java | 600 + .../sdk/model/ExperimentComparisonDetail.java | 421 + .../ExperimentComparisonDetailsResponse.java | 188 + .../ExperimentComparisonDetailsResult.java | 240 + .../model/ExperimentComparisonMetrics.java | 189 + ...ExperimentComparisonNormalizedMetrics.java | 303 + .../model/ExperimentComparisonRawMetrics.java | 303 + .../model/ExperimentComparisonWeights.java | 310 + .../ExperimentComparisonWeightsRequest.java | 218 + .../sdk/model/ExperimentCreateV2.java | 423 + .../ExperimentDatasetComparisonResponse.java | 188 + .../ExperimentDatasetComparisonResult.java | 326 + .../ExperimentDerivedVariablesResponse.java | 188 + .../ExperimentDerivedVariablesResult.java | 202 + .../sdk/model/ExperimentDetailV2.java | 600 + .../ExperimentEvaluationColumnStats.java | 384 + .../ExperimentEvaluationStatsResponse.java | 188 + .../ExperimentEvaluationStatsResult.java | 420 + .../model/ExperimentEvaluationTokenUsage.java | 260 + .../ExperimentFeedbackCreateResponse.java | 188 + .../model/ExperimentFeedbackCreateResult.java | 152 + .../model/ExperimentFeedbackDetailItem.java | 340 + .../ExperimentFeedbackDetailsResponse.java | 188 + .../ExperimentFeedbackDetailsResult.java | 203 + .../ExperimentFeedbackSubmitRequest.java | 349 + .../ExperimentFeedbackSubmitResponse.java | 188 + .../model/ExperimentFeedbackSubmitResult.java | 260 + .../ExperimentFeedbackTemplateResponse.java | 188 + .../ExperimentFeedbackTemplateResult.java | 374 + .../model/ExperimentJsonSchemaResponse.java | 203 + .../futureagi/sdk/model/ExperimentListV2.java | 511 + .../ExperimentNameSuggestionResponse.java | 188 + .../model/ExperimentNameSuggestionResult.java | 151 + .../ExperimentNameValidationResponse.java | 188 + .../model/ExperimentNameValidationResult.java | 187 + .../sdk/model/ExperimentRerunCells.java | 304 + .../sdk/model/ExperimentRerunRequest.java | 241 + .../sdk/model/ExperimentRowDiffCell.java | 297 + .../sdk/model/ExperimentRowDiffResponse.java | 202 + .../model/ExperimentStatsColumnConfig.java | 324 + .../sdk/model/ExperimentStatsMetadata.java | 151 + .../sdk/model/ExperimentStatsResponse.java | 188 + .../sdk/model/ExperimentStatsResult.java | 253 + .../sdk/model/ExperimentStopResponse.java | 188 + .../sdk/model/ExperimentStopResult.java | 225 + .../ExperimentStopWorkflowsCancelled.java | 187 + .../model/ExperimentStringResultResponse.java | 187 + .../ExperimentTableRowsColumnConfig.java | 722 + .../model/ExperimentTableRowsMetadata.java | 367 + .../model/ExperimentTableRowsResponse.java | 188 + .../sdk/model/ExperimentTableRowsResult.java | 376 + .../sdk/model/ExperimentUpdateV2.java | 276 + .../sdk/model/ExperimentV2DetailResponse.java | 188 + .../sdk/model/ExperimentWorkflowResponse.java | 188 + .../sdk/model/ExperimentWorkflowResult.java | 187 + .../sdk/model/ExtractEntitiesRequest.java | 296 + .../sdk/model/ExtractJsonColumnRequest.java | 260 + .../futureagi/sdk/model/FailedRerunItem.java | 188 + .../sdk/model/FeedDetailApiResponse.java | 188 + .../futureagi/sdk/model/FeedDetailCore.java | 261 + .../sdk/model/FeedListApiResponse.java | 188 + .../futureagi/sdk/model/FeedListResponse.java | 275 + .../com/futureagi/sdk/model/FeedListRow.java | 974 + .../com/futureagi/sdk/model/FeedSidebar.java | 291 + .../sdk/model/FeedSidebarApiResponse.java | 188 + .../com/futureagi/sdk/model/FeedStats.java | 331 + .../sdk/model/FeedStatsApiResponse.java | 188 + .../futureagi/sdk/model/FeedUpdateBody.java | 360 + .../com/futureagi/sdk/model/Feedback.java | 576 + .../model/GetAnnotationLabelsResponse.java | 203 + .../sdk/model/GetTraceAnnotation.java | 289 + .../GetTraceAnnotationValuesResponse.java | 188 + .../model/GetTraceAnnotationValuesResult.java | 217 + .../sdk/model/GroundTruthConfig.java | 355 + .../sdk/model/GroundTruthConfigRequest.java | 433 + .../sdk/model/GroundTruthConfigResponse.java | 188 + .../GroundTruthConfigResponseResult.java | 152 + .../futureagi/sdk/model/GroundTruthItem.java | 588 + .../sdk/model/GroundTruthListResponse.java | 188 + .../model/GroundTruthListResponseResult.java | 240 + .../sdk/model/GroundTruthUploadRequest.java | 454 + .../sdk/model/GroundTruthUploadResponse.java | 188 + .../GroundTruthUploadResponseResult.java | 310 + .../com/futureagi/sdk/model/HeatmapCell.java | 223 + .../sdk/model/HuggingFaceAddRowsRequest.java | 260 + .../HuggingFaceDatasetConfigRequest.java | 151 + .../HuggingFaceDatasetConfigResponse.java | 188 + .../model/HuggingFaceDatasetConfigResult.java | 201 + .../HuggingFaceDatasetCreateRequest.java | 332 + .../sdk/model/HuggingFaceDatasetDetail.java | 403 + .../HuggingFaceDatasetDetailRequest.java | 151 + .../HuggingFaceDatasetDetailResponse.java | 188 + ...uggingFaceDatasetDetailResponseResult.java | 188 + .../sdk/model/HuggingFaceDatasetListItem.java | 317 + .../model/HuggingFaceDatasetListRequest.java | 201 + .../model/HuggingFaceDatasetListResponse.java | 188 + .../HuggingFaceDatasetListResponseResult.java | 239 + .../sdk/model/ImportAnnotationEntry.java | 274 + .../sdk/model/ImportAnnotations.java | 204 + .../sdk/model/JsonColumnSchemaEntry.java | 323 + .../com/futureagi/sdk/model/KeyMoment.java | 187 + .../LegacyKnowledgeBaseCreateResponse.java | 188 + .../LegacyKnowledgeBaseCreateResult.java | 276 + .../sdk/model/LegacyKnowledgeBaseFileRow.java | 391 + .../LegacyKnowledgeBaseFilesRequest.java | 333 + .../LegacyKnowledgeBaseFilesResponse.java | 188 + .../model/LegacyKnowledgeBaseFilesResult.java | 312 + .../LegacyKnowledgeBaseListResponse.java | 188 + .../model/LegacyKnowledgeBaseListResult.java | 167 + .../LegacyKnowledgeBaseMutationRequest.java | 240 + .../LegacyKnowledgeBaseMutationResponse.java | 188 + .../LegacyKnowledgeBaseMutationResult.java | 421 + .../sdk/model/LegacyKnowledgeBaseOption.java | 188 + .../LegacyKnowledgeBaseSdkCodeResponse.java | 188 + .../LegacyKnowledgeBaseSdkCodeResult.java | 151 + .../model/LegacyKnowledgeBaseTableColumn.java | 187 + .../LegacyKnowledgeBaseTableResponse.java | 188 + .../model/LegacyKnowledgeBaseTableResult.java | 253 + .../model/LegacyKnowledgeBaseTableRow.java | 391 + .../sdk/model/ListAlertLogs200Response.java | 305 + .../sdk/model/ListAlerts200Response.java | 305 + .../ListAnnotationQueueItems200Response.java | 305 + .../ListAnnotationQueues200Response.java | 305 + .../sdk/model/ListExperiments200Response.java | 305 + .../sdk/model/ListPersonas200Response.java | 305 + .../model/ListTraceProjects200Response.java | 305 + ...LocalFileDatasetCreateStartedResponse.java | 188 + .../LocalFileDatasetCreateStartedResult.java | 390 + .../sdk/model/ManagementAPIErrorResponse.java | 575 + .../sdk/model/ManualDatasetCreateRequest.java | 225 + .../model/ManualDatasetCreateResponse.java | 188 + .../sdk/model/ManualDatasetCreateResult.java | 260 + .../futureagi/sdk/model/MemberListItem.java | 642 + .../sdk/model/MemberListResponse.java | 188 + .../futureagi/sdk/model/MemberListResult.java | 275 + .../com/futureagi/sdk/model/MemberRemove.java | 152 + .../futureagi/sdk/model/MemberRoleUpdate.java | 424 + .../sdk/model/MemberRoleUpdateResponse.java | 188 + .../sdk/model/MemberRoleUpdateResult.java | 201 + .../sdk/model/MemberUserMutationResponse.java | 188 + .../sdk/model/MemberUserMutationResult.java | 188 + .../sdk/model/MemberWorkspaceAccess.java | 296 + .../sdk/model/MergeDatasetRequest.java | 240 + .../sdk/model/MergeDatasetResponse.java | 188 + .../sdk/model/MergeDatasetResult.java | 259 + ...nQueuesAutomationRulesList200Response.java | 305 + .../model/ModelHubApiKeysList200Response.java | 305 + .../sdk/model/ModelHubErrorResponse.java | 575 + .../sdk/model/ModelHubPaginatedResponse.java | 303 + ...romptHistoryExecutionsList200Response.java | 305 + .../ModelHubPromptLabelsList200Response.java | 305 + ...odelHubPromptTemplatesList200Response.java | 305 + .../model/ModelHubScoresList200Response.java | 305 + .../model/ModelHubStringResultResponse.java | 187 + .../sdk/model/ModelHubTextErrorResponse.java | 575 + .../sdk/model/ObserveGraphDataPoint.java | 246 + .../sdk/model/ObserveGraphDataRequest.java | 352 + .../sdk/model/ObserveGraphDataResponse.java | 188 + .../sdk/model/ObserveGraphDataResult.java | 203 + .../OptimiserAnalysisRefreshResponse.java | 188 + .../model/OptimiserAnalysisRefreshResult.java | 187 + .../sdk/model/OptimiserAnalysisResponse.java | 188 + .../model/OptimiserAnalysisResultPayload.java | 274 + .../com/futureagi/sdk/model/Organization.java | 491 + .../sdk/model/OverviewApiResponse.java | 188 + .../futureagi/sdk/model/OverviewResponse.java | 254 + .../futureagi/sdk/model/PatternInsight.java | 187 + .../futureagi/sdk/model/PatternSummary.java | 217 + .../sdk/model/PerformanceSummary.java | 216 + .../java/com/futureagi/sdk/model/Persona.java | 1989 + .../futureagi/sdk/model/PersonaCreate.java | 1428 + .../sdk/model/PersonaDuplicateRequest.java | 151 + .../sdk/model/PersonaDuplicateResponse.java | 188 + .../sdk/model/PersonaFieldOptions.java | 569 + .../com/futureagi/sdk/model/PersonaList.java | 1548 + .../model/PreviewDatasetOperationRequest.java | 396 + .../PreviewDatasetOperationResponse.java | 188 + .../model/PreviewDatasetOperationResult.java | 239 + .../PreviewDatasetOperationResultItem.java | 298 + .../sdk/model/PreviewRunEvalRequest.java | 346 + .../futureagi/sdk/model/PreviewRunPrompt.java | 312 + .../java/com/futureagi/sdk/model/Project.java | 758 + .../com/futureagi/sdk/model/PromptConfig.java | 808 + .../sdk/model/PromptConfigEntry.java | 657 + .../model/PromptDerivedVariablesResponse.java | 188 + .../model/PromptDerivedVariablesResult.java | 202 + .../sdk/model/PromptHistoryExecution.java | 797 + .../com/futureagi/sdk/model/PromptLabel.java | 392 + .../model/PromptSimulationListResponse.java | 188 + .../sdk/model/PromptSimulationListResult.java | 278 + .../model/PromptSimulationRunResponse.java | 188 + .../model/PromptSimulationScenarioItem.java | 319 + .../PromptSimulationScenariosResponse.java | 188 + .../PromptSimulationScenariosResult.java | 241 + .../PromptSimulationTemplateSummary.java | 178 + .../model/PromptSimulationUpdateRequest.java | 312 + .../futureagi/sdk/model/PromptTemplate.java | 471 + .../sdk/model/ProviderStatusItem.java | 404 + .../sdk/model/ProviderStatusResponse.java | 188 + .../sdk/model/ProviderStatusResult.java | 167 + .../sdk/model/QueueAddItemsResponse.java | 188 + .../sdk/model/QueueAddItemsResult.java | 309 + .../sdk/model/QueueAddLabelResponse.java | 188 + .../sdk/model/QueueAddLabelResult.java | 260 + .../model/QueueAgreementAnnotatorPair.java | 260 + .../sdk/model/QueueAgreementLabel.java | 346 + .../sdk/model/QueueAgreementResponse.java | 188 + .../sdk/model/QueueAgreementResult.java | 256 + .../QueueAnalyticsAnnotatorPerformance.java | 296 + .../sdk/model/QueueAnalyticsResponse.java | 188 + .../sdk/model/QueueAnalyticsResult.java | 338 + .../sdk/model/QueueAnalyticsThroughput.java | 240 + .../model/QueueAnalyticsThroughputDaily.java | 187 + .../model/QueueAnnotateDetailResponse.java | 188 + .../sdk/model/QueueAnnotateDetailResult.java | 683 + .../sdk/model/QueueAnnotatorNested.java | 306 + .../sdk/model/QueueAssignItemsResponse.java | 188 + .../sdk/model/QueueAssignItemsResult.java | 151 + .../model/QueueBulkRemoveItemsResponse.java | 188 + .../sdk/model/QueueBulkRemoveItemsResult.java | 151 + .../sdk/model/QueueDefaultQueue.java | 332 + .../sdk/model/QueueDefaultRequest.java | 224 + .../sdk/model/QueueDefaultResponse.java | 188 + .../sdk/model/QueueDefaultResult.java | 313 + .../sdk/model/QueueDiscussionResponse.java | 188 + .../sdk/model/QueueDiscussionResult.java | 311 + .../model/QueueExportAnnotationsResponse.java | 202 + .../sdk/model/QueueExportColumnMapping.java | 259 + .../sdk/model/QueueExportDefaultMapping.java | 223 + .../futureagi/sdk/model/QueueExportField.java | 598 + .../sdk/model/QueueExportFieldsResponse.java | 188 + .../sdk/model/QueueExportFieldsResult.java | 217 + .../model/QueueExportToDatasetRequest.java | 276 + .../model/QueueExportToDatasetResponse.java | 188 + .../sdk/model/QueueExportToDatasetResult.java | 274 + .../sdk/model/QueueForSourceEntry.java | 481 + .../sdk/model/QueueForSourceItem.java | 260 + .../sdk/model/QueueForSourceQueue.java | 260 + .../sdk/model/QueueForSourceResponse.java | 203 + .../sdk/model/QueueHardDeleteRequest.java | 187 + .../sdk/model/QueueHardDeleteResponse.java | 188 + .../sdk/model/QueueHardDeleteResult.java | 260 + .../model/QueueImportAnnotationsResponse.java | 188 + .../model/QueueImportAnnotationsResult.java | 151 + .../com/futureagi/sdk/model/QueueItem.java | 1035 + .../model/QueueItemAnnotationsResponse.java | 203 + .../sdk/model/QueueItemNavigationRequest.java | 237 + .../futureagi/sdk/model/QueueLabelNested.java | 316 + .../sdk/model/QueueLabelRequest.java | 188 + .../futureagi/sdk/model/QueueLabelResult.java | 418 + .../sdk/model/QueueNavigationResponse.java | 188 + .../sdk/model/QueueNavigationResult.java | 238 + .../sdk/model/QueueNextItemResponse.java | 188 + .../sdk/model/QueueNextItemResult.java | 165 + .../sdk/model/QueueProgressAnnotatorStat.java | 390 + .../sdk/model/QueueProgressResponse.java | 188 + .../sdk/model/QueueProgressResult.java | 457 + .../sdk/model/QueueProgressUserProgress.java | 368 + .../QueueReleaseReservationResponse.java | 188 + .../model/QueueReleaseReservationResult.java | 151 + .../sdk/model/QueueRemoveLabelResponse.java | 188 + .../sdk/model/QueueRemoveLabelResult.java | 151 + .../sdk/model/QueueReviewItemResponse.java | 188 + .../sdk/model/QueueReviewItemResult.java | 336 + .../sdk/model/QueueStatusRequest.java | 190 + .../sdk/model/QueueStatusResponse.java | 188 + .../model/QueueSubmitAnnotationsResponse.java | 188 + .../model/QueueSubmitAnnotationsResult.java | 151 + .../futureagi/sdk/model/Recommendation.java | 417 + .../sdk/model/RepresentativeTrace.java | 483 + .../futureagi/sdk/model/ReqDataConfig.java | 483 + .../sdk/model/RerunCallsResponse.java | 434 + .../futureagi/sdk/model/RerunCellEntry.java | 188 + .../sdk/model/ReviewItemRequest.java | 278 + .../sdk/model/ReviewLabelCommentRequest.java | 224 + .../com/futureagi/sdk/model/RootCause.java | 223 + .../com/futureagi/sdk/model/RulesInner.java | 245 + .../sdk/model/RunNewEvalsOnTestExecution.java | 290 + .../sdk/model/RunNewEvalsResponse.java | 224 + .../sdk/model/RunPromptChoiceOption.java | 201 + .../model/RunPromptColumnConfigResponse.java | 188 + .../model/RunPromptColumnConfigResult.java | 165 + .../model/RunPromptColumnPreviewResponse.java | 188 + .../model/RunPromptColumnPreviewResult.java | 263 + .../sdk/model/RunPromptOptionsResponse.java | 188 + .../sdk/model/RunPromptOptionsResult.java | 364 + .../sdk/model/RunPromptToolOption.java | 381 + .../futureagi/sdk/model/RunTestAnalytics.java | 359 + .../model/RunTestCallExecutionsResponse.java | 337 + .../model/RunTestChatExecutionResponse.java | 188 + .../sdk/model/RunTestChatExecutionResult.java | 312 + .../sdk/model/RunTestComponentsUpdate.java | 312 + .../sdk/model/RunTestErrorResponse.java | 575 + .../sdk/model/RunTestExecutionResponse.java | 326 + .../sdk/model/RunTestKPIsResponse.java | 940 + .../sdk/model/RunTestMessageResponse.java | 149 + .../sdk/model/RunTestNameResponse.java | 188 + .../sdk/model/RunTestNameResult.java | 188 + .../futureagi/sdk/model/RunTestResponse.java | 1095 + .../model/RunTestScenarioItemResponse.java | 205 + .../model/SDKCICDEvaluationRunAccepted.java | 260 + .../SDKCICDEvaluationRunAcceptedResponse.java | 188 + .../model/SDKCICDEvaluationRunSummary.java | 274 + .../model/SDKCICDEvaluationRunsResponse.java | 188 + .../model/SDKCICDEvaluationRunsResult.java | 274 + .../model/SDKConfigureEvaluationsRequest.java | 299 + .../SDKConfigureEvaluationsResponse.java | 188 + .../futureagi/sdk/model/SDKErrorResponse.java | 303 + .../futureagi/sdk/model/SDKEvalTemplate.java | 583 + .../sdk/model/SDKEvalTemplateResponse.java | 188 + .../sdk/model/SDKGetEvalsResponse.java | 203 + .../futureagi/sdk/model/SDKMessageResult.java | 151 + .../model/SDKSimulationAnalyticsResponse.java | 188 + .../model/SDKSimulationAnalyticsResult.java | 514 + .../model/SDKSimulationMetricsResponse.java | 188 + .../sdk/model/SDKSimulationMetricsResult.java | 880 + .../sdk/model/SDKSimulationRunsResponse.java | 188 + .../sdk/model/SDKSimulationRunsResult.java | 1129 + .../sdk/model/SDKStandaloneEvalInput.java | 241 + .../sdk/model/SDKStandaloneEvalRequest.java | 254 + .../sdk/model/SDKStandaloneEvalResponse.java | 203 + .../model/SDKStandaloneEvalResultItem.java | 166 + .../sdk/model/SDKStandaloneEvalV2Request.java | 501 + .../model/SDKStandaloneEvalV2Response.java | 188 + .../sdk/model/SDKStandaloneEvalV2Result.java | 201 + .../sdk/model/ScenarioAddColumnsRequest.java | 167 + .../sdk/model/ScenarioAddColumnsResponse.java | 240 + .../sdk/model/ScenarioAddRowsRequest.java | 189 + .../sdk/model/ScenarioAddRowsResponse.java | 234 + .../sdk/model/ScenarioCreateRequest.java | 1323 + .../sdk/model/ScenarioCreateResponse.java | 247 + .../sdk/model/ScenarioDeleteResponse.java | 149 + .../sdk/model/ScenarioDetailResponse.java | 795 + .../sdk/model/ScenarioEditPromptsRequest.java | 151 + .../sdk/model/ScenarioEditRequest.java | 273 + .../sdk/model/ScenarioEditResponse.java | 186 + .../sdk/model/ScenarioErrorResponse.java | 575 + .../sdk/model/ScenarioListResponse.java | 282 + .../sdk/model/ScenarioPromptItem.java | 214 + .../model/ScenarioPromptsUpdateResponse.java | 177 + .../futureagi/sdk/model/ScenarioResponse.java | 1060 + .../java/com/futureagi/sdk/model/Score.java | 807 + .../sdk/model/ScoreDeleteResponse.java | 201 + .../sdk/model/ScoreForSourceResponse.java | 252 + .../futureagi/sdk/model/ScoreResponse.java | 188 + .../com/futureagi/sdk/model/ScoreTrend.java | 276 + .../com/futureagi/sdk/model/Selection.java | 468 + .../futureagi/sdk/model/SendChatRequest.java | 279 + .../sdk/model/SessionComparisonResponse.java | 188 + .../sdk/model/SessionComparisonResult.java | 219 + .../sdk/model/SidebarAIMetadata.java | 296 + .../futureagi/sdk/model/SidebarTimeline.java | 224 + ...ateApiPersonasFieldOptions200Response.java | 305 + ...eApiPersonasSystemPersonas200Response.java | 305 + .../sdk/model/SimulateEvalConfigResponse.java | 500 + .../futureagi/sdk/model/SimulatorAgent.java | 792 + .../model/SimulatorAgentDeleteResponse.java | 149 + .../sdk/model/SimulatorAgentListResponse.java | 338 + .../sdk/model/StartEvalsProcessRequest.java | 240 + .../sdk/model/StopUserEvalRequest.java | 152 + .../sdk/model/SubmitAnnotationEntry.java | 238 + .../sdk/model/SubmitAnnotations.java | 261 + .../futureagi/sdk/model/SwitchWorkspace.java | 152 + .../sdk/model/SwitchWorkspaceResponse.java | 188 + .../sdk/model/SwitchWorkspaceResult.java | 296 + .../futureagi/sdk/model/SyntheticData.java | 324 + .../sdk/model/SyntheticDatasetConfig.java | 346 + .../model/SyntheticDatasetConfigPayload.java | 310 + .../model/SyntheticDatasetConfigResponse.java | 188 + .../model/SyntheticDatasetConfigResult.java | 188 + ...SyntheticDatasetCreateStartedResponse.java | 188 + .../SyntheticDatasetCreateStartedResult.java | 188 + .../sdk/model/SyntheticDatasetCreation.java | 288 + .../sdk/model/SyntheticDatasetUpdateData.java | 260 + .../model/SyntheticDatasetUpdateResponse.java | 188 + .../model/SyntheticDatasetUpdateResult.java | 188 + .../futureagi/sdk/model/TestExecution.java | 999 + .../sdk/model/TestExecutionAnalytics.java | 261 + .../sdk/model/TestExecutionBulkDelete.java | 204 + .../TestExecutionBulkDeleteResponse.java | 242 + .../model/TestExecutionChatBatchResponse.java | 188 + .../model/TestExecutionChatBatchResult.java | 254 + .../sdk/model/TestExecutionColumnOrder.java | 167 + .../TestExecutionColumnOrderResponse.java | 185 + .../model/TestExecutionDetailResponse.java | 485 + .../sdk/model/TestExecutionItemResponse.java | 667 + .../sdk/model/TestExecutionRerun.java | 275 + .../sdk/model/TestExecutionRerunResponse.java | 326 + .../sdk/model/TestExecutionRerunResult.java | 331 + .../sdk/model/TestExecutionStatusSummary.java | 564 + .../model/TestExecutionTranscriptCall.java | 339 + .../TestExecutionTranscriptsResponse.java | 242 + .../java/com/futureagi/sdk/model/Trace.java | 601 + .../model/TraceAnnotationNoteResponse.java | 333 + .../model/TraceAnnotationValueResponse.java | 546 + .../futureagi/sdk/model/TraceEvidence.java | 286 + .../com/futureagi/sdk/model/TracePreview.java | 223 + .../com/futureagi/sdk/model/TraceSession.java | 309 + .../model/TraceSessionGraphDataRequest.java | 352 + .../com/futureagi/sdk/model/TraceSummary.java | 332 + .../futureagi/sdk/model/TraceTagsUpdate.java | 165 + .../TracerTraceAnnotationList200Response.java | 305 + .../sdk/model/TracerTraceList200Response.java | 305 + .../TracerTraceSessionList200Response.java | 305 + .../futureagi/sdk/model/TracesAggregates.java | 368 + .../futureagi/sdk/model/TracesListRow.java | 405 + .../sdk/model/TracesTabApiResponse.java | 188 + .../sdk/model/TracesTabResponse.java | 240 + .../com/futureagi/sdk/model/TrendMetric.java | 260 + .../com/futureagi/sdk/model/TrendPoint.java | 224 + .../sdk/model/TrendsTabApiResponse.java | 188 + .../sdk/model/TrendsTabResponse.java | 318 + .../futureagi/sdk/model/UpdateRunTest.java | 374 + .../java/com/futureagi/sdk/model/User.java | 512 + .../futureagi/sdk/model/UserAlertMonitor.java | 1330 + .../sdk/model/UserAlertMonitorDuplicate.java | 188 + .../UserAlertMonitorDuplicateResponse.java | 188 + .../UserAlertMonitorDuplicateResult.java | 188 + .../sdk/model/UserAlertMonitorLog.java | 547 + .../model/UserAlertMonitorMetricOption.java | 233 + ...UserAlertMonitorMetricOptionsResponse.java | 193 + .../sdk/model/UserCodeExampleResponse.java | 187 + .../sdk/model/UserEvalMutationRequest.java | 538 + .../sdk/model/UserEvalUpdateRequest.java | 538 + .../sdk/model/UserInfoOrganization.java | 260 + .../futureagi/sdk/model/UserInfoResponse.java | 1033 + .../sdk/model/UserInfoTwoFactorMethods.java | 187 + .../futureagi/sdk/model/UsersResponse.java | 188 + .../com/futureagi/sdk/model/UsersResult.java | 238 + .../sdk/model/VectorDBColumnRequest.java | 706 + .../sdk/model/WorkspaceAccessInput.java | 225 + .../sdk/model/WorkspaceAdminSummary.java | 188 + .../sdk/model/WorkspaceListItemResponse.java | 485 + .../model/WorkspaceListPaginatedResponse.java | 347 + .../sdk/model/WorkspaceMemberRemove.java | 152 + .../sdk/model/WorkspaceMemberRoleUpdate.java | 225 + .../WorkspaceMemberRoleUpdateResponse.java | 188 + .../WorkspaceMemberRoleUpdateResult.java | 260 + .../futureagi/sdk/model/WorkspaceSummary.java | 296 + .../sdk/generated/futureagi-sdk.openapi.json | 62626 ++++++++++++++++ .../generated/futureagi-sdk.operations.txt | 461 + openapi/sdk/operation-aliases.json | 554 + openapi/sdk/wrapper-map.json | 170 + plans/openapi-generated-sdk.md | 92 + python/README.md | 54 +- python/fi/__init__.py | 3 + python/fi/futureagi_client.py | 1041 + python/fi/generated/__init__.py | 1 + .../fi/generated/openapi_client/__init__.py | 8 + .../generated/openapi_client/api/__init__.py | 1 + .../openapi_client/api/accounts/__init__.py | 1 + ..._organization_members_reactivate_create.py | 217 + ...unts_organization_members_remove_delete.py | 213 + ...counts_organization_members_role_create.py | 203 + ...ccounts_workspace_members_remove_delete.py | 225 + .../accounts_workspace_members_role_create.py | 237 + .../openapi_client/api/alerts/__init__.py | 1 + .../api/alerts/bulk_mute_alerts.py | 154 + .../openapi_client/api/alerts/create_alert.py | 154 + .../openapi_client/api/alerts/delete_alert.py | 148 + .../openapi_client/api/alerts/get_alert.py | 150 + .../api/alerts/get_alert_details.py | 150 + .../api/alerts/get_alert_graph.py | 166 + .../api/alerts/get_alert_log.py | 150 + .../api/alerts/list_alert_logs.py | 170 + .../api/alerts/list_alert_logs_for_alert.py | 150 + .../api/alerts/list_alert_metric_options.py | 214 + .../openapi_client/api/alerts/list_alerts.py | 170 + .../api/alerts/list_all_alert_logs.py | 170 + .../api/alerts/preview_alert_graph.py | 162 + .../api/alerts/resolve_alert_logs.py | 154 + .../openapi_client/api/alerts/update_alert.py | 170 + .../annotation_queue_discussion/__init__.py | 1 + .../create_annotation_queue_item_comment.py | 222 + .../list_annotation_queue_item_discussion.py | 201 + .../reopen_annotation_queue_item_thread.py | 232 + .../resolve_annotation_queue_item_thread.py | 232 + ..._annotation_queue_item_comment_reaction.py | 236 + .../api/annotation_queue_items/__init__.py | 1 + .../add_annotation_queue_items.py | 220 + .../assign_annotation_queue_items.py | 211 + .../complete_annotation_queue_item.py | 222 + .../get_annotation_queue_item_detail.py | 325 + .../get_next_annotation_queue_item.py | 359 + ...mport_annotation_queue_item_annotations.py | 232 + .../list_annotation_queue_item_annotations.py | 211 + .../list_annotation_queue_items.py | 278 + .../release_annotation_queue_item.py | 234 + .../remove_annotation_queue_items.py | 213 + .../skip_annotation_queue_item.py | 222 + ...ubmit_annotation_queue_item_annotations.py | 232 + .../api/annotation_queue_review/__init__.py | 1 + .../review_annotation_queue_item.py | 222 + .../api/annotation_queues/__init__.py | 1 + .../add_annotation_queue_label.py | 216 + .../archive_annotation_queue.py | 185 + .../create_annotation_queue.py | 154 + .../export_annotation_queue.py | 240 + .../export_annotation_queue_to_dataset.py | 218 + .../annotation_queues/get_annotation_queue.py | 151 + .../get_annotation_queue_agreement.py | 187 + .../get_annotation_queue_analytics.py | 187 + .../get_annotation_queue_progress.py | 183 + .../list_annotation_queue_export_fields.py | 191 + .../list_annotation_queues.py | 217 + .../remove_annotation_queue_label.py | 212 + .../update_annotation_queue.py | 171 + .../update_annotation_queue_status.py | 198 + .../openapi_client/api/datasets/__init__.py | 1 + .../api/datasets/add_dataset_columns.py | 215 + .../api/datasets/add_dataset_rows.py | 213 + .../create_dataset_from_local_file.py | 211 + .../api/datasets/create_dataset_manually.py | 197 + .../api/datasets/create_empty_dataset.py | 197 + .../api/datasets/delete_dataset_column.py | 162 + .../api/datasets/delete_dataset_row.py | 148 + .../api/datasets/download_dataset.py | 176 + .../api/datasets/duplicate_dataset.py | 207 + .../get_dataset_annotation_summary.py | 176 + .../api/datasets/get_dataset_columns.py | 192 + .../api/datasets/get_dataset_eval_stats.py | 186 + .../api/datasets/get_dataset_json_schema.py | 204 + .../api/datasets/get_dataset_row.py | 203 + .../api/datasets/get_dataset_table.py | 278 + .../api/datasets/list_dataset_base_columns.py | 149 + .../list_dataset_derived_variables.py | 226 + .../api/datasets/list_dataset_names.py | 155 + .../api/datasets/list_datasets.py | 226 + .../api/datasets/update_dataset_cell.py | 213 + .../api/experiments/__init__.py | 1 + .../api/experiments/compare_experiments.py | 231 + .../api/experiments/create_experiment.py | 199 + .../api/experiments/delete_experiments.py | 125 + .../api/experiments/download_experiment.py | 176 + .../api/experiments/get_experiment.py | 192 + .../experiments/get_experiment_json_schema.py | 200 + .../api/experiments/get_experiment_row.py | 206 + .../api/experiments/get_experiment_stats.py | 190 + .../list_experiment_comparisons.py | 204 + .../api/experiments/list_experiment_rows.py | 192 + .../api/experiments/list_experiments.py | 249 + .../api/experiments/rerun_experiment.py | 219 + .../api/experiments/stop_experiment.py | 227 + .../api/experiments/update_experiment.py | 245 + .../openapi_client/api/model_hub/__init__.py | 1 + ...notation_queues_automation_rules_create.py | 170 + ...notation_queues_automation_rules_delete.py | 163 + ...tation_queues_automation_rules_evaluate.py | 300 + ...annotation_queues_automation_rules_list.py | 206 + ..._queues_automation_rules_partial_update.py | 185 + ...otation_queues_automation_rules_preview.py | 211 + ...annotation_queues_automation_rules_read.py | 165 + ...notation_queues_automation_rules_update.py | 185 + .../model_hub_annotation_queues_for_source.py | 286 + ...annotation_queues_get_or_create_default.py | 209 + ...model_hub_annotation_queues_hard_delete.py | 232 + ...odel_hub_annotation_queues_items_create.py | 170 + ...odel_hub_annotation_queues_items_delete.py | 163 + ..._annotation_queues_items_partial_update.py | 185 + .../model_hub_annotation_queues_items_read.py | 165 + ...odel_hub_annotation_queues_items_update.py | 185 + .../model_hub_annotation_queues_restore.py | 198 + .../model_hub_annotation_queues_update.py | 175 + .../model_hub_annotations_labels_create.py | 158 + .../model_hub_annotations_labels_delete.py | 148 + .../model_hub_annotations_labels_list.py | 301 + ...l_hub_annotations_labels_partial_update.py | 170 + .../model_hub_annotations_labels_read.py | 150 + .../model_hub_annotations_labels_restore.py | 207 + .../model_hub_annotations_labels_update.py | 170 + .../model_hub/model_hub_api_keys_create.py | 154 + .../model_hub/model_hub_api_keys_delete.py | 172 + .../api/model_hub/model_hub_api_keys_list.py | 172 + .../model_hub_api_keys_partial_update.py | 170 + .../api/model_hub/model_hub_api_keys_read.py | 150 + .../model_hub/model_hub_api_keys_update.py | 170 + .../model_hub_api_models_list_list.py | 165 + ...model_hub_dataset_run_prompt_stats_list.py | 192 + ...odel_hub_datasets_add_api_column_create.py | 213 + ...ub_datasets_add_vector_db_column_create.py | 213 + ...del_hub_datasets_classify_column_create.py | 213 + ...tasets_compare_datasets_add_eval_create.py | 213 + ...el_hub_datasets_compare_datasets_create.py | 203 + ...tasets_compare_datasets_download_create.py | 197 + ...sets_compare_datasets_start_eval_create.py | 213 + ..._datasets_compare_get_evals_list_create.py | 191 + ...atasets_compare_preview_run_eval_create.py | 181 + ...model_hub_datasets_compare_stats_create.py | 213 + ..._hub_datasets_conditional_column_create.py | 213 + ...odel_hub_datasets_delete_compare_delete.py | 192 + .../model_hub_datasets_delete_compare_read.py | 192 + ...odel_hub_datasets_duplicate_rows_create.py | 203 + ...l_hub_datasets_explanation_summary_read.py | 204 + ...sets_explanation_summary_refresh_create.py | 225 + ...el_hub_datasets_extract_entities_create.py | 213 + ...del_hub_datasets_get_compare_row_delete.py | 206 + ...model_hub_datasets_get_compare_row_read.py | 206 + ..._hub_datasets_huggingface_detail_create.py | 211 + ...el_hub_datasets_huggingface_list_create.py | 199 + .../model_hub_datasets_merge_create.py | 203 + .../model_hub_datasets_preview_create.py | 229 + .../model_hub_delete_eval_template_create.py | 197 + .../model_hub_develops_add_as_new_create.py | 181 + ...l_hub_develops_add_empty_columns_create.py | 215 + ...odel_hub_develops_add_empty_rows_create.py | 213 + ...lops_add_multiple_static_columns_create.py | 283 + ...s_add_rows_from_existing_dataset_create.py | 215 + ..._hub_develops_add_rows_from_file_create.py | 197 + ...velops_add_rows_from_huggingface_create.py | 225 + .../model_hub_develops_add_rows_sdk_create.py | 187 + ...b_develops_add_run_prompt_column_create.py | 197 + ...l_hub_develops_add_static_column_create.py | 213 + ..._hub_develops_add_synthetic_data_create.py | 213 + ...model_hub_develops_add_user_eval_create.py | 213 + ...model_hub_develops_clone_dataset_create.py | 197 + ...odel_hub_develops_create_dataset_create.py | 215 + ..._create_dataset_from_huggingface_create.py | 199 + ...evelops_create_synthetic_dataset_create.py | 209 + ...develops_dataset_creation_progress_read.py | 198 + ...odel_hub_develops_delete_dataset_delete.py | 121 + ...ub_develops_delete_template_eval_delete.py | 162 + ...el_hub_develops_delete_user_eval_delete.py | 162 + ..._develops_edit_and_run_user_eval_create.py | 227 + ...b_develops_edit_dataset_behavior_update.py | 213 + ..._develops_edit_run_prompt_column_create.py | 197 + ...hub_develops_extract_json_column_create.py | 213 + ...model_hub_develops_get_cell_data_create.py | 191 + ..._hub_develops_get_derived_datasets_read.py | 204 + ...el_hub_develops_get_eval_structure_read.py | 221 + .../model_hub_develops_get_evals_list_list.py | 176 + ...elops_get_experiment_dataset_table_list.py | 182 + ...del_hub_develops_get_function_list_list.py | 159 + ...s_get_huggingface_dataset_config_create.py | 211 + .../model_hub_develops_get_row_diff_create.py | 197 + ...el_hub_develops_preview_run_eval_create.py | 197 + ...velops_preview_run_prompt_column_create.py | 199 + ...model_hub_develops_provider_status_list.py | 155 + ..._retrieve_run_prompt_column_config_list.py | 165 + ...velops_retrieve_run_prompt_options_list.py | 159 + ...hub_develops_start_evals_process_create.py | 213 + ...odel_hub_develops_stop_user_eval_create.py | 255 + ...odel_hub_develops_synthetic_config_list.py | 194 + ..._hub_develops_update_column_name_update.py | 227 + ..._hub_develops_update_column_type_update.py | 227 + ...develops_update_synthetic_config_update.py | 215 + ...l_hub_eval_templates_bulk_delete_create.py | 211 + ...emplates_composite_execute_adhoc_create.py | 227 + ...eval_templates_composite_execute_create.py | 237 + ...model_hub_eval_templates_composite_list.py | 204 + ...eval_templates_composite_partial_update.py | 241 + ..._eval_templates_create_composite_create.py | 209 + ...del_hub_eval_templates_create_v2_create.py | 213 + .../model_hub_eval_templates_detail_list.py | 204 + ...l_hub_eval_templates_feedback_list_list.py | 202 + ...eval_templates_ground_truth_config_list.py | 204 + ...al_templates_ground_truth_config_update.py | 225 + ...el_hub_eval_templates_ground_truth_list.py | 190 + ...al_templates_ground_truth_upload_create.py | 233 + ...l_hub_eval_templates_list_charts_create.py | 219 + .../model_hub_eval_templates_list_create.py | 207 + .../model_hub_eval_templates_update_update.py | 225 + .../model_hub_eval_templates_usage_list.py | 198 + ...b_eval_templates_versions_create_create.py | 227 + .../model_hub_eval_templates_versions_list.py | 208 + ..._eval_templates_versions_restore_create.py | 255 + ...l_templates_versions_set_default_update.py | 239 + ...b_experiments_v2_derived_variables_list.py | 212 + ...b_experiments_v2_evaluations_stats_list.py | 218 + ...odel_hub_experiments_v2_feedback_create.py | 229 + ...s_v2_feedback_get_feedback_details_list.py | 208 + ...periments_v2_feedback_get_template_list.py | 208 + ...ents_v2_feedback_submit_feedback_create.py | 229 + ...l_hub_experiments_v2_rerun_cells_create.py | 237 + ...odel_hub_experiments_v2_row_diff_create.py | 197 + ...el_hub_experiments_v2_suggest_name_read.py | 208 + ...l_hub_experiments_v2_validate_name_list.py | 181 + .../model_hub_knowledge_base_create.py | 211 + .../model_hub_knowledge_base_delete.py | 121 + .../model_hub_knowledge_base_files_create.py | 211 + .../model_hub_knowledge_base_files_delete.py | 121 + .../model_hub_knowledge_base_get_list.py | 177 + .../model_hub_knowledge_base_list.py | 177 + .../model_hub_knowledge_base_list_list.py | 169 + ...model_hub_knowledge_base_partial_update.py | 211 + ...istory_executions_get_execution_details.py | 291 + ...odel_hub_prompt_history_executions_list.py | 255 + ...odel_hub_prompt_history_executions_read.py | 151 + ...el_hub_prompt_labels_assign_label_by_id.py | 214 + ...ub_prompt_labels_assign_multiple_labels.py | 180 + .../model_hub_prompt_labels_create.py | 180 + ..._hub_prompt_labels_create_system_labels.py | 184 + .../model_hub_prompt_labels_delete.py | 174 + .../model_hub_prompt_labels_get_by_name.py | 250 + .../model_hub/model_hub_prompt_labels_list.py | 224 + .../model_hub_prompt_labels_partial_update.py | 196 + .../model_hub/model_hub_prompt_labels_read.py | 176 + ...prompt_labels_remove_label_from_version.py | 184 + .../model_hub_prompt_labels_set_default.py | 184 + ...model_hub_prompt_labels_template_labels.py | 230 + .../model_hub_prompt_labels_update.py | 196 + ...odel_hub_prompt_templates_add_new_draft.py | 175 + ...del_hub_prompt_templates_analyze_prompt.py | 154 + .../model_hub_prompt_templates_bulk_delete.py | 158 + .../model_hub_prompt_templates_commit.py | 171 + ...l_hub_prompt_templates_compare_versions.py | 175 + .../model_hub_prompt_templates_create.py | 154 + ...model_hub_prompt_templates_create_draft.py | 158 + .../model_hub_prompt_templates_delete.py | 149 + ...ompt_templates_delete_evaluation_config.py | 165 + ...plates_derived_variables_extract_create.py | 253 + ...prompt_templates_derived_variables_list.py | 222 + ...plates_derived_variables_preview_create.py | 225 + ...templates_derived_variables_schema_list.py | 246 + ...el_hub_prompt_templates_generate_prompt.py | 154 + ...hub_prompt_templates_generate_variables.py | 194 + ..._hub_prompt_templates_get_all_variables.py | 155 + ...prompt_templates_get_evaluation_configs.py | 155 + ...l_hub_prompt_templates_get_next_version.py | 155 + ...del_hub_prompt_templates_get_run_status.py | 155 + ...model_hub_prompt_templates_get_sdk_code.py | 173 + ...b_prompt_templates_get_template_by_name.py | 275 + ...del_hub_prompt_templates_improve_prompt.py | 154 + .../model_hub_prompt_templates_list.py | 247 + ...del_hub_prompt_templates_partial_update.py | 171 + .../model_hub_prompt_templates_read.py | 159 + ...b_prompt_templates_retrieve_evaluations.py | 151 + ...emplates_run_evals_on_multiple_versions.py | 171 + ...model_hub_prompt_templates_run_template.py | 175 + .../model_hub_prompt_templates_save_name.py | 175 + ...hub_prompt_templates_save_prompt_folder.py | 171 + .../model_hub_prompt_templates_set_default.py | 175 + ...del_hub_prompt_templates_stop_streaming.py | 151 + .../model_hub_prompt_templates_update.py | 171 + ...mpt_templates_update_evaluation_configs.py | 191 + .../model_hub_prompt_templates_versions.py | 151 + .../model_hub/model_hub_scores_bulk_create.py | 195 + .../api/model_hub/model_hub_scores_create.py | 185 + .../api/model_hub/model_hub_scores_delete.py | 192 + .../model_hub/model_hub_scores_for_source.py | 244 + .../api/model_hub/model_hub_scores_list.py | 266 + .../model_hub_scores_partial_update.py | 194 + .../api/model_hub/model_hub_scores_read.py | 174 + .../api/model_hub/model_hub_scores_update.py | 194 + .../api/run_tests_eval_configs/__init__.py | 1 + .../simulate_run_tests_eval_configs_create.py | 213 + .../simulate_run_tests_eval_configs_delete.py | 214 + ...te_run_tests_eval_configs_update_create.py | 239 + ...simulate_run_tests_run_new_evals_create.py | 213 + .../api/run_tests_eval_summary/__init__.py | 1 + ..._run_tests_eval_summary_comparison_list.py | 223 + .../simulate_run_tests_eval_summary_list.py | 208 + .../openapi_client/api/scenarios/__init__.py | 1 + .../simulate_scenarios_add_columns_create.py | 215 + .../simulate_scenarios_add_rows_create.py | 209 + .../simulate_scenarios_get_columns_list.py | 248 + .../simulate_scenarios_prompts_update.py | 215 + .../openapi_client/api/sdk/__init__.py | 1 + ...sdk_api_v1_configure_evaluations_create.py | 182 + .../api/sdk/sdk_api_v1_eval_create.py | 172 + .../api/sdk/sdk_api_v1_eval_read.py | 161 + .../sdk_api_v1_evaluate_pipeline_create.py | 186 + .../sdk/sdk_api_v1_evaluate_pipeline_list.py | 191 + .../api/sdk/sdk_api_v1_get_evals_list.py | 129 + .../api/sdk/sdk_api_v1_new_eval_create.py | 172 + .../api/sdk/sdk_api_v1_new_eval_list.py | 174 + .../openapi_client/api/simulate/__init__.py | 1 + .../simulate_agent_definitions_delete.py | 200 + ...nt_definitions_versions_activate_create.py | 226 + ...finitions_versions_call_executions_list.py | 200 + ...gent_definitions_versions_create_create.py | 217 + ...gent_definitions_versions_delete_delete.py | 210 + ..._definitions_versions_eval_summary_list.py | 179 + ...imulate_agent_definitions_versions_list.py | 198 + ...imulate_agent_definitions_versions_read.py | 195 + ...ent_definitions_versions_restore_create.py | 231 + .../simulate_api_call_executions_list.py | 273 + .../simulate_api_personas_duplicate.py | 209 + .../simulate_api_personas_duplicate_create.py | 191 + .../simulate_api_personas_field_options.py | 210 + .../simulate_api_personas_system_personas.py | 210 + .../simulate/simulate_api_personas_update.py | 195 + ...imulate_api_personas_workspace_personas.py | 215 + .../simulate/simulate_api_run_tests_list.py | 268 + ..._call_executions_branch_analysis_create.py | 204 + ...te_call_executions_branch_analysis_list.py | 165 + ...all_executions_chat_send_message_create.py | 192 + .../simulate_call_executions_delete_delete.py | 191 + ...l_executions_error_localizer_tasks_list.py | 195 + .../simulate_call_executions_logs_list.py | 183 + ...simulate_call_executions_partial_update.py | 191 + .../simulate/simulate_call_executions_read.py | 175 + ...call_executions_session_comparison_list.py | 183 + ...mulate_call_executions_transcripts_list.py | 165 + .../api/simulate/simulate_export_read.py | 239 + ...ulate_prompt_simulations_scenarios_list.py | 186 + ...ate_prompt_templates_simulations_create.py | 243 + ...ate_prompt_templates_simulations_delete.py | 177 + ...pt_templates_simulations_execute_create.py | 239 + ...ulate_prompt_templates_simulations_list.py | 206 + ...pt_templates_simulations_partial_update.py | 221 + ...ulate_prompt_templates_simulations_read.py | 195 + .../simulate_run_tests_active_list.py | 138 + .../simulate_run_tests_chat_execute_create.py | 207 + ...ate_run_tests_components_partial_update.py | 191 + .../simulate_run_tests_delete_delete.py | 169 + ...run_tests_delete_test_executions_create.py | 226 + ...n_tests_eval_configs_get_structure_list.py | 189 + .../simulate_run_tests_get_id_by_name_read.py | 165 + ..._run_tests_rerun_test_executions_create.py | 228 + .../simulate_run_tests_scenarios_list.py | 214 + .../simulate_run_tests_sdk_code_list.py | 165 + ...simulate_simulator_agents_create_create.py | 184 + ...simulate_simulator_agents_delete_delete.py | 191 + .../simulate_simulator_agents_edit_update.py | 200 + .../simulate_simulator_agents_list.py | 164 + .../simulate_simulator_agents_read.py | 171 + ...tions_chat_call_executions_batch_create.py | 242 + ...ate_test_executions_column_order_update.py | 226 + .../simulate_test_executions_delete_delete.py | 169 + ...xecutions_eval_explanation_summary_list.py | 175 + ...eval_explanation_summary_refresh_create.py | 218 + ...test_executions_optimiser_analysis_list.py | 179 + ...tions_optimiser_analysis_refresh_create.py | 211 + ...late_test_executions_rerun_calls_create.py | 191 + .../simulation_agent_definitions/__init__.py | 1 + .../create_agent_definition.py | 201 + .../delete_agent_definition.py | 191 + .../get_agent_definition.py | 181 + .../list_agent_definitions.py | 277 + .../update_agent_definition.py | 217 + .../api/simulation_personas/__init__.py | 1 + .../api/simulation_personas/create_persona.py | 169 + .../api/simulation_personas/delete_persona.py | 168 + .../api/simulation_personas/get_persona.py | 165 + .../api/simulation_personas/list_personas.py | 201 + .../api/simulation_personas/update_persona.py | 195 + .../api/simulation_run_tests/__init__.py | 1 + .../simulation_run_tests/create_run_test.py | 175 + .../simulation_run_tests/delete_run_test.py | 171 + .../simulation_run_tests/execute_run_test.py | 201 + .../api/simulation_run_tests/get_run_test.py | 165 + .../get_run_test_analytics.py | 165 + .../get_run_test_status.py | 165 + .../list_run_test_call_executions.py | 211 + .../list_run_test_executions.py | 210 + .../simulation_run_tests/list_run_tests.py | 277 + .../simulation_run_tests/update_run_test.py | 191 + .../api/simulation_scenarios/__init__.py | 1 + .../simulation_scenarios/create_scenario.py | 184 + .../simulation_scenarios/delete_scenario.py | 179 + .../api/simulation_scenarios/get_scenario.py | 179 + .../simulation_scenarios/list_scenarios.py | 248 + .../simulation_scenarios/update_scenario.py | 205 + .../simulation_test_executions/__init__.py | 1 + .../cancel_test_execution.py | 191 + .../get_test_execution.py | 285 + .../get_test_execution_analytics.py | 165 + .../get_test_execution_kpis.py | 165 + .../get_test_execution_performance_summary.py | 165 + .../get_test_execution_transcripts.py | 177 + .../list_test_executions.py | 163 + .../api/simulations/__init__.py | 1 + .../simulations/get_simulation_analytics.py | 252 + .../simulations/list_simulation_metrics.py | 230 + .../api/simulations/list_simulation_runs.py | 256 + .../openapi_client/api/tracer/__init__.py | 1 + ..._feed_issues_create_linear_issue_create.py | 202 + ...tracer_feed_issues_deep_analysis_create.py | 214 + .../tracer_feed_issues_overview_list.py | 175 + .../tracer_feed_issues_partial_update.py | 196 + .../tracer_feed_issues_root_cause_list.py | 216 + .../tracer/tracer_feed_issues_sidebar_list.py | 216 + .../tracer/tracer_feed_issues_traces_list.py | 211 + .../tracer/tracer_feed_issues_trends_list.py | 196 + .../api/tracer/tracer_trace_agent_graph.py | 220 + .../tracer/tracer_trace_annotation_create.py | 154 + .../tracer/tracer_trace_annotation_delete.py | 148 + ..._trace_annotation_get_annotation_values.py | 263 + .../tracer/tracer_trace_annotation_list.py | 172 + .../tracer_trace_annotation_partial_update.py | 170 + .../tracer/tracer_trace_annotation_read.py | 150 + .../tracer/tracer_trace_annotation_update.py | 170 + .../api/tracer/tracer_trace_bulk_create.py | 154 + .../api/tracer/tracer_trace_compare_traces.py | 158 + .../api/tracer/tracer_trace_create.py | 154 + .../api/tracer/tracer_trace_delete.py | 148 + .../api/tracer/tracer_trace_get_eval_names.py | 176 + .../tracer_trace_get_trace_export_data.py | 182 + .../tracer_trace_get_trace_id_by_index.py | 226 + ...cer_trace_get_trace_id_by_index_observe.py | 232 + .../api/tracer/tracer_trace_list.py | 170 + .../tracer_trace_list_traces_of_session.py | 293 + .../api/tracer/tracer_trace_partial_update.py | 170 + .../api/tracer/tracer_trace_session_create.py | 154 + .../api/tracer/tracer_trace_session_delete.py | 148 + .../tracer/tracer_trace_session_eval_logs.py | 186 + ...trace_session_get_session_filter_values.py | 228 + ...e_session_get_trace_session_export_data.py | 194 + .../api/tracer/tracer_trace_session_list.py | 172 + .../tracer_trace_session_partial_update.py | 170 + .../api/tracer/tracer_trace_session_update.py | 170 + .../api/tracer/tracer_trace_update.py | 170 + .../tracer/tracer_user_alert_logs_create.py | 154 + .../tracer/tracer_user_alert_logs_delete.py | 148 + .../tracer_user_alert_logs_partial_update.py | 170 + .../tracer/tracer_user_alert_logs_update.py | 170 + .../tracer/tracer_user_alerts_duplicate.py | 189 + .../tracer_user_alerts_list_monitors.py | 174 + .../api/tracer/tracer_user_alerts_update.py | 170 + .../tracer_users_get_code_example_list.py | 134 + .../openapi_client/api/tracing/__init__.py | 1 + .../tracing/create_bulk_trace_annotation.py | 166 + .../api/tracing/get_error_feed_issue.py | 200 + .../api/tracing/get_error_feed_issue_stats.py | 199 + .../openapi_client/api/tracing/get_trace.py | 154 + .../api/tracing/get_trace_graph_methods.py | 159 + .../api/tracing/get_trace_session.py | 150 + .../tracing/get_trace_session_graph_data.py | 190 + .../api/tracing/get_voice_call_detail.py | 186 + .../api/tracing/list_error_feed_issues.py | 358 + .../tracing/list_trace_annotation_labels.py | 176 + .../api/tracing/list_trace_projects.py | 186 + .../api/tracing/list_trace_properties.py | 174 + .../api/tracing/list_trace_sessions.py | 298 + .../api/tracing/list_trace_users.py | 249 + .../openapi_client/api/tracing/list_traces.py | 266 + .../api/tracing/list_voice_calls.py | 198 + .../api/tracing/update_trace_tags.py | 174 + .../openapi_client/api/users/__init__.py | 1 + .../api/users/get_current_user.py | 149 + .../api/users/list_organization_members.py | 295 + .../api/users/list_workspace_members.py | 307 + .../api/users/list_workspaces.py | 248 + .../api/users/switch_workspace.py | 195 + python/fi/generated/openapi_client/client.py | 282 + python/fi/generated/openapi_client/errors.py | 16 + .../openapi_client/models/__init__.py | 3171 + .../models/accounts_error_response.py | 222 + .../models/accounts_error_response_details.py | 54 + .../models/accounts_error_response_type.py | 20 + .../models/add_api_column_request.py | 86 + .../models/add_api_column_request_config.py | 47 + .../models/add_as_new_dataset_request.py | 99 + .../add_as_new_dataset_request_columns.py | 47 + .../models/add_eval_configs_request.py | 78 + .../models/add_eval_configs_response.py | 107 + .../openapi_client/models/add_items.py | 97 + .../openapi_client/models/add_queue_item.py | 71 + .../models/add_queue_item_source_type.py | 13 + .../models/add_rows_from_file_request.py | 82 + .../openapi_client/models/add_run_prompt.py | 94 + .../agent_definition_bulk_delete_request.py | 70 + .../agent_definition_bulk_delete_response.py | 79 + .../models/agent_definition_create_request.py | 548 + ...nt_definition_create_request_agent_type.py | 9 + ...on_create_request_authentication_method.py | 8 + ...tion_create_request_livekit_config_json.py | 47 + ...definition_create_request_model_details.py | 47 + ...nition_create_request_websocket_headers.py | 47 + .../agent_definition_create_response.py | 83 + .../agent_definition_delete_response.py | 61 + .../models/agent_definition_edit_request.py | 516 + ...gent_definition_edit_request_agent_type.py | 9 + ...tion_edit_request_authentication_method.py | 8 + ...nition_edit_request_livekit_config_json.py | 47 + ...t_definition_edit_request_model_details.py | 47 + ...finition_edit_request_websocket_headers.py | 47 + .../models/agent_definition_edit_response.py | 83 + .../models/agent_definition_list_response.py | 461 + ...ent_definition_list_response_agent_type.py | 9 + ...agent_definition_list_response_language.py | 36 + ...gent_definition_list_response_languages.py | 36 + ..._definition_list_response_model_details.py | 47 + ...inition_list_response_websocket_headers.py | 47 + .../models/agent_definition_response.py | 558 + .../agent_definition_response_agent_type.py | 9 + ...finition_response_authentication_method.py | 8 + .../agent_definition_response_language.py | 36 + .../agent_definition_response_languages.py | 36 + ...agent_definition_response_model_details.py | 47 + ...t_definition_response_websocket_headers.py | 47 + .../openapi_client/models/agent_flow_graph.py | 93 + .../models/agent_flow_graph_edges_item.py | 62 + .../models/agent_flow_graph_nodes_item.py | 62 + .../models/agent_version_activate_response.py | 83 + .../models/agent_version_create_request.py | 427 + ...agent_version_create_request_agent_type.py | 9 + ...on_create_request_authentication_method.py | 8 + ...sion_create_request_livekit_config_json.py | 47 + ...nt_version_create_request_model_details.py | 47 + .../models/agent_version_create_response.py | 83 + .../models/agent_version_delete_response.py | 61 + .../models/agent_version_list_response.py | 247 + .../agent_version_list_response_status.py | 11 + .../models/agent_version_response.py | 346 + ...version_response_configuration_snapshot.py | 47 + .../models/agent_version_response_status.py | 11 + .../models/agent_version_restore_response.py | 105 + .../agent_version_restore_response_agent.py | 64 + .../openapi_client/models/all_active_tests.py | 75 + .../models/all_active_tests_active_tests.py | 62 + .../models/annotation_label_response.py | 126 + .../annotation_label_response_settings.py | 47 + .../annotation_label_restore_response.py | 78 + .../openapi_client/models/annotation_queue.py | 532 + .../annotation_queue_annotator_roles.py | 70 + ...eue_annotator_roles_additional_property.py | 47 + .../annotation_queue_assignment_strategy.py | 10 + .../models/annotation_queue_status.py | 11 + .../models/annotation_summary_header.py | 113 + .../models/annotation_summary_response.py | 78 + .../models/annotation_summary_result.py | 132 + ...notation_summary_result_annotators_item.py | 47 + .../annotation_summary_result_labels_item.py | 47 + .../models/annotations_labels.py | 208 + .../models/annotations_labels_settings.py | 47 + .../models/annotations_labels_type.py | 12 + .../models/api_error_response.py | 220 + .../models/api_error_response_details.py | 54 + .../models/api_error_response_type.py | 20 + .../models/api_error_with_details_response.py | 226 + ...api_error_with_details_response_details.py | 56 + .../api_error_with_details_response_type.py | 20 + .../openapi_client/models/api_key.py | 161 + .../models/api_key_config_json.py | 47 + .../models/api_selection_too_large_detail.py | 87 + .../api_selection_too_large_detail_type.py | 8 + .../models/api_selection_too_large_error.py | 141 + .../api_selection_too_large_error_type.py | 8 + .../models/api_text_error_response.py | 220 + .../models/api_text_error_response_details.py | 54 + .../models/api_text_error_response_type.py | 20 + .../openapi_client/models/assign_items.py | 110 + .../models/assign_items_action.py | 10 + .../openapi_client/models/automation_rule.py | 265 + .../models/automation_rule_conditions.py | 153 + .../automation_rule_conditions_filter_item.py | 92 + ...le_conditions_filter_item_filter_config.py | 72 + .../automation_rule_conditions_operator.py | 8 + .../automation_rule_conditions_rules_item.py | 63 + ...omation_rule_evaluate_accepted_response.py | 77 + .../automation_rule_evaluate_response.py | 80 + .../models/automation_rule_evaluate_result.py | 97 + .../models/automation_rule_scope.py | 103 + .../models/automation_rule_source_type.py | 13 + .../automation_rule_trigger_frequency.py | 12 + .../models/base_columns_response.py | 75 + .../models/base_columns_response_result.py | 61 + .../bulk_annotation_annotation_request.py | 102 + .../models/bulk_annotation_note_request.py | 61 + .../models/bulk_annotation_record_request.py | 119 + .../models/bulk_annotation_request.py | 75 + .../models/bulk_annotation_response.py | 80 + .../models/bulk_annotation_response_result.py | 221 + ...tion_response_result_errors_type_0_item.py | 47 + ...on_response_result_warnings_type_0_item.py | 47 + .../models/bulk_create_score_item.py | 106 + .../bulk_create_score_item_score_source.py | 11 + .../models/bulk_create_score_item_value.py | 47 + .../models/bulk_create_scores.py | 176 + .../models/bulk_create_scores_response.py | 78 + .../models/bulk_create_scores_result.py | 83 + .../models/bulk_create_scores_source_type.py | 13 + .../models/bulk_remove_items.py | 70 + .../models/call_branch_analysis_response.py | 163 + .../call_branch_analysis_response_analysis.py | 64 + .../call_branch_deviation_create_response.py | 122 + ...eviation_create_response_deviation_data.py | 64 + .../openapi_client/models/call_execution.py | 841 + .../models/call_execution_analysis_data.py | 47 + .../models/call_execution_call_metadata.py | 47 + .../models/call_execution_delete_response.py | 61 + .../models/call_execution_detail.py | 890 + ...xecution_detail_customer_cost_breakdown.py | 47 + ...ecution_detail_customer_latency_metrics.py | 47 + ...l_execution_detail_simulation_call_type.py | 9 + .../models/call_execution_detail_status.py | 14 + .../call_execution_detail_tool_outputs.py | 47 + ...xecution_error_localizer_tasks_response.py | 107 + .../models/call_execution_error_response.py | 224 + .../call_execution_error_response_details.py | 56 + .../call_execution_error_response_type.py | 20 + .../models/call_execution_eval_outputs.py | 47 + .../models/call_execution_evaluation_data.py | 47 + .../models/call_execution_logs_response.py | 97 + .../call_execution_provider_call_data.py | 50 + .../models/call_execution_rerun.py | 95 + .../models/call_execution_rerun_rerun_type.py | 9 + .../call_execution_simulation_call_type.py | 9 + .../models/call_execution_status.py | 14 + .../models/call_execution_status_update.py | 84 + .../call_execution_status_update_status.py | 14 + .../models/call_log_entry_response.py | 205 + .../call_log_entry_response_attributes.py | 62 + .../models/call_log_entry_response_payload.py | 62 + .../openapi_client/models/call_transcript.py | 160 + .../models/call_transcript_response.py | 134 + .../models/call_transcript_speaker_role.py | 13 + .../models/cancel_test_execution_response.py | 95 + .../models/chat_message_contract.py | 189 + .../models/chat_message_contract_metadata.py | 62 + .../models/chat_message_contract_role.py | 10 + .../models/chat_sdk_code_response.py | 78 + .../models/chat_sdk_code_result.py | 86 + .../models/chat_send_message_response.py | 78 + .../models/chat_send_message_result.py | 174 + .../openapi_client/models/chat_tool_call.py | 83 + .../models/chat_tool_call_function.py | 69 + .../models/cicd_evaluation_item.py | 115 + .../models/cicd_evaluation_item_config.py | 62 + .../models/cicd_evaluation_item_inputs.py | 62 + .../openapi_client/models/cicd_job.py | 91 + .../models/classify_column_request.py | 99 + .../models/clone_dataset_request.py | 61 + .../models/co_occurring_issue.py | 101 + .../generated/openapi_client/models/column.py | 148 + .../openapi_client/models/column_data_type.py | 20 + .../models/column_definition.py | 79 + .../models/column_definition_data_type.py | 20 + .../openapi_client/models/column_order.py | 77 + .../openapi_client/models/column_source.py | 27 + .../models/column_type_conversion_response.py | 75 + .../models/column_type_conversion_result.py | 172 + ...e_conversion_result_invalid_values_item.py | 47 + ...version_result_valid_conversion_samples.py | 47 + .../openapi_client/models/compare_dataset.py | 161 + .../models/compare_dataset_dataset_info.py | 47 + .../models/compare_dataset_delete_response.py | 75 + .../models/compare_dataset_delete_result.py | 61 + .../models/compare_dataset_metadata.py | 78 + .../models/compare_dataset_response.py | 75 + .../models/compare_dataset_result.py | 128 + ...mpare_dataset_result_column_config_item.py | 47 + .../compare_dataset_result_table_item.py | 47 + .../models/compare_dataset_row_response.py | 75 + .../models/compare_dataset_row_result.py | 142 + .../compare_dataset_row_result_table_item.py | 47 + .../models/compare_dataset_stats_request.py | 101 + ...compare_dataset_stats_request_stat_type.py | 9 + .../models/compare_dataset_stats_response.py | 79 + .../compare_dataset_stats_response_result.py | 86 + ...esponse_result_additional_property_item.py | 47 + .../models/compare_eval_list_response.py | 75 + .../models/compare_eval_list_result.py | 79 + .../compare_eval_list_result_evals_item.py | 47 + .../models/compare_evals_list_request.py | 92 + .../compare_evals_list_request_eval_type.py | 8 + .../models/compare_experiment_eval_request.py | 218 + ...eval_request_composite_weight_overrides.py | 47 + .../compare_experiment_eval_request_config.py | 47 + .../compare_preview_run_eval_request.py | 140 + ...compare_preview_run_eval_request_config.py | 47 + ...e_preview_run_eval_request_dataset_info.py | 47 + .../models/compare_start_evals_request.py | 85 + .../models/composite_child_item.py | 161 + .../models/composite_child_result.py | 243 + ...ite_child_result_error_localizer_result.py | 47 + .../models/composite_child_result_output.py | 47 + .../composite_eval_adhoc_execute_request.py | 377 + ...oc_execute_request_aggregation_function.py | 12 + ...eval_adhoc_execute_request_call_context.py | 47 + ...val_adhoc_execute_request_child_weights.py | 47 + ...oc_execute_request_composite_child_axis.py | 12 + ...osite_eval_adhoc_execute_request_config.py | 47 + ..._adhoc_execute_request_input_data_types.py | 47 + ...site_eval_adhoc_execute_request_mapping.py | 47 + ..._eval_adhoc_execute_request_row_context.py | 47 + ...l_adhoc_execute_request_session_context.py | 47 + ...eval_adhoc_execute_request_span_context.py | 47 + ...val_adhoc_execute_request_trace_context.py | 47 + .../models/composite_eval_create_request.py | 196 + ...val_create_request_aggregation_function.py | 12 + ...osite_eval_create_request_child_weights.py | 47 + ...val_create_request_composite_child_axis.py | 12 + .../models/composite_eval_create_response.py | 79 + .../composite_eval_create_response_result.py | 128 + .../models/composite_eval_detail_response.py | 79 + .../composite_eval_detail_response_result.py | 197 + .../models/composite_eval_execute_request.py | 266 + ...osite_eval_execute_request_call_context.py | 47 + .../composite_eval_execute_request_config.py | 47 + ...e_eval_execute_request_input_data_types.py | 47 + .../composite_eval_execute_request_mapping.py | 47 + ...posite_eval_execute_request_row_context.py | 47 + ...te_eval_execute_request_session_context.py | 47 + ...osite_eval_execute_request_span_context.py | 47 + ...site_eval_execute_request_trace_context.py | 47 + .../models/composite_eval_execute_response.py | 79 + .../composite_eval_execute_response_result.py | 269 + ...response_result_error_localizer_results.py | 47 + .../models/composite_eval_update_request.py | 262 + ...val_update_request_aggregation_function.py | 12 + ...osite_eval_update_request_child_weights.py | 47 + ...val_update_request_composite_child_axis.py | 12 + .../models/conditional_column_request.py | 98 + .../conditional_column_request_config_item.py | 47 + .../models/configure_evaluations.py | 115 + .../models/configure_evaluations_config.py | 62 + .../models/configure_evaluations_inputs.py | 62 + .../create_dataset_from_experiment_request.py | 70 + .../create_dataset_from_local_file_request.py | 88 + .../models/create_empty_dataset_request.py | 90 + .../models/create_linear_issue.py | 90 + .../models/create_linear_issue_response.py | 78 + .../models/create_linear_issue_result.py | 121 + .../create_prompt_simulation_request.py | 146 + .../openapi_client/models/create_run_test.py | 227 + .../openapi_client/models/create_score.py | 151 + .../models/create_score_score_source.py | 11 + .../models/create_score_source_type.py | 13 + .../models/create_score_value.py | 47 + .../openapi_client/models/dataset.py | 152 + .../models/dataset_add_columns_request.py | 83 + ...d_columns_request_new_columns_data_item.py | 47 + .../dataset_add_empty_columns_request.py | 61 + .../models/dataset_add_empty_rows_request.py | 61 + .../dataset_add_rows_from_existing_request.py | 82 + ...ws_from_existing_request_column_mapping.py | 57 + .../models/dataset_add_rows_request.py | 79 + .../dataset_add_rows_request_rows_item.py | 47 + .../models/dataset_behavior_request.py | 133 + .../dataset_behavior_request_column_config.py | 47 + ...dataset_behavior_request_dataset_config.py | 47 + .../models/dataset_cell_data_request.py | 86 + .../models/dataset_cell_data_response.py | 77 + .../dataset_cell_data_response_result.py | 70 + ...ata_response_result_additional_property.py | 64 + .../models/dataset_cell_value.py | 132 + .../models/dataset_cell_value_cell_value.py | 47 + .../dataset_cell_value_feedback_info.py | 47 + .../models/dataset_cell_value_value_infos.py | 47 + .../models/dataset_column_detail_item.py | 92 + .../models/dataset_column_detail_response.py | 75 + .../models/dataset_column_detail_result.py | 75 + .../dataset_columns_mutation_response.py | 77 + .../models/dataset_columns_mutation_result.py | 90 + .../models/dataset_copy_response.py | 75 + .../models/dataset_copy_result.py | 78 + .../models/dataset_create_started_response.py | 75 + .../models/dataset_create_started_result.py | 102 + .../dataset_creation_progress_response.py | 77 + .../dataset_creation_progress_result.py | 264 + .../dataset_derived_variables_response.py | 77 + .../dataset_derived_variables_result.py | 73 + ...ived_variables_result_derived_variables.py | 64 + .../models/dataset_eval_stats_item.py | 184 + .../dataset_eval_stats_item_total_avg.py | 47 + ...taset_eval_stats_item_total_choices_avg.py | 47 + .../models/dataset_eval_stats_metric.py | 116 + .../dataset_eval_stats_metric_output.py | 47 + .../models/dataset_eval_stats_response.py | 83 + .../dataset_explanation_summary_response.py | 79 + ...set_explanation_summary_response_result.py | 124 + ...nation_summary_response_result_response.py | 47 + .../models/dataset_json_schema_response.py | 79 + .../dataset_json_schema_response_result.py | 64 + .../models/dataset_list_item.py | 118 + .../models/dataset_list_response.py | 75 + .../models/dataset_list_result.py | 91 + .../models/dataset_model_type.py | 20 + ...dataset_multiple_static_columns_request.py | 81 + ...ple_static_columns_request_columns_item.py | 47 + .../models/dataset_name_item.py | 81 + .../models/dataset_names_response.py | 75 + .../models/dataset_names_result.py | 75 + .../models/dataset_row_data_request.py | 124 + .../dataset_row_data_request_filters_item.py | 92 + ...data_request_filters_item_filter_config.py | 72 + .../dataset_row_data_request_sort_item.py | 63 + ...dataset_row_data_request_sort_item_type.py | 9 + .../models/dataset_row_data_response.py | 75 + .../models/dataset_row_data_result.py | 77 + .../models/dataset_row_data_result_current.py | 47 + .../models/dataset_row_diff_request.py | 110 + .../models/dataset_row_navigation.py | 74 + .../dataset_rows_import_message_response.py | 79 + .../dataset_rows_import_message_result.py | 61 + .../models/dataset_rows_imported_response.py | 75 + .../models/dataset_rows_imported_result.py | 69 + .../models/dataset_run_prompt_stats_prompt.py | 94 + .../dataset_run_prompt_stats_response.py | 75 + .../models/dataset_run_prompt_stats_result.py | 99 + .../models/dataset_sdk_rows_code.py | 101 + .../models/dataset_sdk_rows_request.py | 92 + .../models/dataset_sdk_rows_response.py | 75 + .../models/dataset_sdk_rows_result.py | 89 + .../dataset_sdk_rows_result_api_keys.py | 47 + .../openapi_client/models/dataset_source.py | 15 + .../models/dataset_static_column_request.py | 80 + .../models/dataset_table_metadata.py | 112 + .../models/dataset_table_response.py | 75 + .../models/dataset_table_result.py | 195 + ...dataset_table_result_column_config_item.py | 47 + .../dataset_table_result_dataset_config.py | 47 + .../models/dataset_table_result_table_item.py | 47 + .../dataset_update_cell_value_request.py | 92 + .../dataset_update_column_name_request.py | 61 + .../dataset_update_column_type_request.py | 81 + .../models/deep_analysis_api_response.py | 78 + .../models/deep_analysis_body.py | 72 + .../deep_analysis_dispatch_api_response.py | 80 + .../models/deep_analysis_dispatch_response.py | 69 + .../models/deep_analysis_response.py | 123 + .../models/delete_eval_config_response.py | 61 + .../models/delete_eval_template.py | 62 + .../models/derived_variable_detail.py | 127 + .../derived_variable_detail_raw_sample.py | 47 + .../derived_variable_detail_response.py | 75 + .../models/derived_variable_detail_schema.py | 47 + .../derived_variable_extract_request.py | 90 + .../derived_variable_preview_request.py | 82 + ...erived_variable_preview_request_content.py | 47 + .../develop_dataset_message_response.py | 69 + .../models/discussion_comment_request.py | 121 + .../models/discussion_reaction_request.py | 61 + .../discussion_thread_status_request.py | 61 + .../models/duplicate_dataset_request.py | 94 + .../models/duplicate_dataset_response.py | 75 + .../models/duplicate_dataset_result.py | 94 + .../models/duplicate_rows_request.py | 92 + .../models/duplicate_rows_response.py | 75 + .../models/duplicate_rows_result.py | 102 + .../models/dynamic_column_create_response.py | 75 + .../models/dynamic_column_create_result.py | 78 + .../models/dynamic_column_message_response.py | 75 + .../models/dynamic_column_message_result.py | 61 + .../models/edit_run_prompt_column.py | 114 + .../openapi_client/models/empty_request.py | 25 + .../models/error_localizer_task_response.py | 410 + ..._localizer_task_response_error_analysis.py | 47 + ...ror_localizer_task_response_eval_result.py | 47 + ...rror_localizer_task_response_input_data.py | 47 + ...rror_localizer_task_response_input_keys.py | 47 + ...ror_localizer_task_response_input_types.py | 47 + .../openapi_client/models/error_name.py | 69 + .../openapi_client/models/error_response.py | 220 + .../models/error_response_details.py | 54 + .../models/error_response_type.py | 20 + .../models/eval_config_definition.py | 233 + .../models/eval_config_definition_config.py | 47 + .../eval_config_definition_filters_item.py | 92 + ...g_definition_filters_item_filter_config.py | 72 + .../models/eval_config_definition_mapping.py | 47 + .../models/eval_config_response.py | 215 + .../models/eval_config_response_config.py | 47 + .../models/eval_config_response_filters.py | 47 + .../models/eval_config_response_mapping.py | 47 + .../models/eval_config_response_model.py | 12 + .../models/eval_config_response_status.py | 24 + .../models/eval_config_structure.py | 409 + .../models/eval_config_structure_config.py | 62 + ...val_config_structure_config_params_desc.py | 64 + ...l_config_structure_config_params_option.py | 64 + .../models/eval_config_structure_eval_tags.py | 47 + ...config_structure_function_params_schema.py | 47 + .../models/eval_config_structure_mapping.py | 62 + .../models/eval_config_structure_models.py | 47 + .../models/eval_config_structure_output.py | 47 + .../models/eval_config_structure_params.py | 47 + .../models/eval_config_structure_response.py | 78 + .../models/eval_config_structure_result.py | 67 + .../models/eval_config_update_request.py | 206 + .../eval_config_update_request_config.py | 47 + .../eval_config_update_request_mapping.py | 47 + .../models/eval_config_update_response.py | 152 + .../models/eval_error_response.py | 220 + .../models/eval_error_response_details.py | 54 + .../models/eval_error_response_type.py | 20 + .../models/eval_explanation_cluster.py | 139 + ...al_explanation_summary_refresh_response.py | 82 + ...eval_explanation_summary_refresh_result.py | 61 + .../eval_explanation_summary_response.py | 80 + .../models/eval_explanation_summary_result.py | 106 + ...val_explanation_summary_result_response.py | 74 + .../models/eval_feedback_list_item.py | 118 + .../models/eval_feedback_list_response.py | 79 + .../eval_feedback_list_response_result.py | 108 + .../models/eval_function_list_response.py | 75 + .../models/eval_function_list_result.py | 81 + ...val_function_list_result_functions_item.py | 47 + .../models/eval_list_filters.py | 155 + .../eval_list_filters_eval_type_item.py | 10 + .../eval_list_filters_output_type_item.py | 10 + .../eval_list_filters_template_type_item.py | 9 + .../models/eval_list_request.py | 163 + .../models/eval_list_request_owner_filter.py | 10 + .../models/eval_list_request_sort_by.py | 10 + .../models/eval_list_request_sort_order.py | 9 + .../models/eval_list_response.py | 75 + .../openapi_client/models/eval_list_result.py | 88 + .../models/eval_list_result_evals_item.py | 47 + .../models/eval_metric_entry.py | 190 + ...metric_entry_composite_weight_overrides.py | 47 + .../models/eval_metric_entry_config.py | 47 + .../models/eval_preview_response.py | 75 + .../models/eval_preview_result.py | 81 + .../eval_preview_result_responses_item.py | 47 + .../openapi_client/models/eval_structure.py | 435 + .../models/eval_structure_choices.py | 47 + .../models/eval_structure_config.py | 47 + .../eval_structure_config_params_desc.py | 47 + .../eval_structure_config_params_option.py | 47 + .../eval_structure_function_params_schema.py | 47 + .../models/eval_structure_mapping.py | 47 + .../models/eval_structure_models.py | 47 + .../models/eval_structure_output.py | 47 + .../models/eval_structure_params.py | 47 + .../models/eval_structure_response.py | 75 + .../models/eval_structure_result.py | 67 + .../models/eval_structure_run_config.py | 47 + .../eval_summary_comparison_response.py | 82 + ...eval_summary_comparison_response_result.py | 74 + .../models/eval_summary_response.py | 86 + .../eval_template_bulk_delete_request.py | 70 + .../eval_template_bulk_delete_response.py | 79 + ...al_template_bulk_delete_response_result.py | 61 + .../models/eval_template_chart_point.py | 69 + .../models/eval_template_create_response.py | 79 + .../eval_template_create_response_result.py | 78 + .../models/eval_template_create_v2_request.py | 511 + ...emplate_create_v2_request_choice_scores.py | 47 + ...emplate_create_v2_request_code_language.py | 9 + ...mplate_create_v2_request_data_injection.py | 47 + ...al_template_create_v2_request_eval_type.py | 10 + ...2_request_few_shot_examples_type_0_item.py | 47 + ..._create_v2_request_messages_type_0_item.py | 47 + .../eval_template_create_v2_request_mode.py | 10 + ..._template_create_v2_request_output_type.py | 10 + ...eval_template_create_v2_request_summary.py | 47 + ...plate_create_v2_request_template_format.py | 9 + .../eval_template_create_v2_request_tools.py | 47 + .../models/eval_template_detail_response.py | 79 + .../eval_template_detail_response_result.py | 397 + ...te_detail_response_result_choice_scores.py | 47 + ...template_detail_response_result_choices.py | 47 + ..._template_detail_response_result_config.py | 47 + .../models/eval_template_list_charts_item.py | 99 + .../eval_template_list_charts_request.py | 70 + .../eval_template_list_charts_response.py | 79 + ...al_template_list_charts_response_result.py | 71 + ...late_list_charts_response_result_charts.py | 64 + .../models/eval_template_list_item.py | 192 + .../models/eval_template_list_response.py | 79 + .../eval_template_list_response_result.py | 99 + .../models/eval_template_summary.py | 91 + .../models/eval_template_summary_output.py | 47 + .../models/eval_template_update_response.py | 79 + .../eval_template_update_response_result.py | 78 + .../models/eval_template_update_v2_request.py | 623 + ...emplate_update_v2_request_choice_scores.py | 47 + ...emplate_update_v2_request_code_language.py | 9 + ...mplate_update_v2_request_data_injection.py | 47 + ...al_template_update_v2_request_eval_type.py | 10 + ...2_request_few_shot_examples_type_0_item.py | 47 + ..._update_v2_request_messages_type_0_item.py | 47 + .../eval_template_update_v2_request_mode.py | 10 + ..._template_update_v2_request_output_type.py | 10 + ...eval_template_update_v2_request_summary.py | 47 + ...plate_update_v2_request_template_format.py | 9 + .../eval_template_update_v2_request_tools.py | 47 + .../eval_template_version_create_request.py | 121 + ..._version_create_request_config_snapshot.py | 47 + .../models/eval_template_version_item.py | 144 + ...l_template_version_item_config_snapshot.py | 47 + .../eval_template_version_list_response.py | 79 + ...l_template_version_list_response_result.py | 92 + .../models/eval_template_version_response.py | 79 + .../eval_template_version_response_result.py | 78 + .../eval_template_version_restore_response.py | 79 + ...emplate_version_restore_response_result.py | 86 + .../models/eval_usage_chart_point.py | 119 + .../models/eval_usage_feedback.py | 122 + .../models/eval_usage_feedback_value.py | 47 + .../models/eval_usage_log_item.py | 196 + .../models/eval_usage_log_item_detail.py | 47 + .../openapi_client/models/eval_usage_logs.py | 99 + .../openapi_client/models/eval_usage_stats.py | 93 + .../models/eval_usage_stats_response.py | 77 + .../eval_usage_stats_response_result.py | 112 + .../models/evaluation_result.py | 105 + .../models/events_over_time_point.py | 85 + .../execute_prompt_simulation_request.py | 83 + .../execute_prompt_simulation_response.py | 80 + .../execute_prompt_simulation_result.py | 140 + .../openapi_client/models/execute_run_test.py | 113 + .../models/execution_metrics.py | 165 + .../models/execution_metrics_status.py | 14 + .../openapi_client/models/execution_runs.py | 165 + .../models/execution_runs_status.py | 14 + .../experiment_comparison_column_metric.py | 122 + ...ment_comparison_column_metric_avg_score.py | 47 + .../experiment_comparison_dataset_metric.py | 263 + ...arison_dataset_metric_normalized_scores.py | 47 + .../models/experiment_comparison_detail.py | 185 + ...eriment_comparison_detail_scores_weight.py | 47 + .../experiment_comparison_details_response.py | 79 + .../experiment_comparison_details_result.py | 94 + .../models/experiment_comparison_metrics.py | 87 + ...xperiment_comparison_normalized_metrics.py | 133 + .../experiment_comparison_raw_metrics.py | 135 + .../models/experiment_comparison_weights.py | 139 + .../experiment_comparison_weights_request.py | 100 + ...ment_comparison_weights_request_weights.py | 47 + .../experiment_comparison_weights_scores.py | 47 + .../models/experiment_create_v2.py | 165 + .../experiment_create_v2_experiment_type.py | 11 + .../experiment_dataset_comparison_response.py | 79 + .../experiment_dataset_comparison_result.py | 132 + ...taset_comparison_result_weights_applied.py | 47 + .../experiment_derived_variables_response.py | 79 + .../experiment_derived_variables_result.py | 91 + ...ived_variables_result_derived_variables.py | 56 + .../models/experiment_detail_v2.py | 240 + .../experiment_detail_v2_experiment_type.py | 11 + .../models/experiment_detail_v2_status.py | 24 + .../experiment_evaluation_column_stats.py | 136 + ...iment_evaluation_column_stats_avg_score.py | 47 + .../experiment_evaluation_stats_response.py | 79 + .../experiment_evaluation_stats_result.py | 138 + .../experiment_evaluation_token_usage.py | 85 + .../experiment_feedback_create_response.py | 79 + .../experiment_feedback_create_result.py | 62 + .../models/experiment_feedback_detail_item.py | 140 + .../experiment_feedback_detail_item_value.py | 47 + .../experiment_feedback_details_response.py | 79 + .../experiment_feedback_details_result.py | 85 + .../experiment_feedback_submit_request.py | 118 + ...ent_feedback_submit_request_action_type.py | 11 + ...xperiment_feedback_submit_request_value.py | 47 + .../experiment_feedback_submit_response.py | 79 + .../experiment_feedback_submit_result.py | 89 + .../experiment_feedback_template_response.py | 79 + .../experiment_feedback_template_result.py | 131 + .../models/experiment_json_schema_response.py | 79 + .../experiment_json_schema_response_result.py | 64 + .../models/experiment_list_v2.py | 168 + .../experiment_list_v2_experiment_type.py | 11 + .../models/experiment_list_v2_status.py | 24 + .../experiment_name_suggestion_response.py | 79 + .../experiment_name_suggestion_result.py | 61 + .../experiment_name_validation_response.py | 79 + .../experiment_name_validation_result.py | 72 + .../models/experiment_rerun_cells.py | 131 + .../models/experiment_rerun_request.py | 90 + .../models/experiment_row_diff_cell.py | 133 + ...xperiment_row_diff_cell_cell_diff_value.py | 47 + .../experiment_row_diff_cell_cell_value.py | 47 + .../experiment_row_diff_cell_value_infos.py | 47 + .../models/experiment_row_diff_response.py | 79 + .../experiment_row_diff_response_result.py | 74 + ...iff_response_result_additional_property.py | 62 + .../models/experiment_stats_column_config.py | 121 + .../models/experiment_stats_metadata.py | 61 + .../models/experiment_stats_response.py | 75 + .../models/experiment_stats_result.py | 111 + ...experiment_stats_result_table_data_item.py | 47 + .../models/experiment_stop_response.py | 75 + .../models/experiment_stop_result.py | 90 + .../experiment_stop_workflows_cancelled.py | 69 + .../experiment_string_result_response.py | 69 + .../experiment_table_rows_column_config.py | 257 + ..._table_rows_column_config_average_score.py | 47 + ...nt_table_rows_column_config_choices_map.py | 47 + ...periment_table_rows_column_config_group.py | 47 + .../models/experiment_table_rows_metadata.py | 134 + ...eriment_table_rows_metadata_description.py | 47 + .../models/experiment_table_rows_response.py | 75 + .../models/experiment_table_rows_result.py | 170 + ...experiment_table_rows_result_table_item.py | 47 + .../models/experiment_update_v2.py | 138 + .../models/experiment_v2_detail_response.py | 75 + .../models/experiment_workflow_response.py | 75 + .../models/experiment_workflow_result.py | 72 + .../export_annotation_queue_export_format.py | 9 + .../models/extract_entities_request.py | 99 + .../models/extract_json_column_request.py | 90 + .../models/failed_rerun_item.py | 70 + .../models/feed_detail_api_response.py | 78 + .../openapi_client/models/feed_detail_core.py | 99 + .../models/feed_list_api_response.py | 78 + .../models/feed_list_response.py | 99 + .../openapi_client/models/feed_list_row.py | 349 + .../openapi_client/models/feed_sidebar.py | 115 + .../models/feed_sidebar_api_response.py | 78 + .../openapi_client/models/feed_stats.py | 101 + .../models/feed_stats_api_response.py | 78 + .../openapi_client/models/feed_update_body.py | 123 + .../models/feed_update_body_severity.py | 11 + .../models/feed_update_body_status.py | 11 + .../openapi_client/models/feedback.py | 241 + .../openapi_client/models/feedback_source.py | 14 + .../models/get_annotation_labels_response.py | 86 + .../models/get_trace_annotation.py | 124 + .../get_trace_annotation_values_response.py | 82 + .../get_trace_annotation_values_result.py | 97 + .../get_voice_call_detail_response_200.py | 125 + .../models/ground_truth_config.py | 128 + .../models/ground_truth_config_request.py | 151 + ...d_truth_config_request_injection_format.py | 10 + .../ground_truth_config_request_mode.py | 10 + .../models/ground_truth_config_response.py | 79 + .../ground_truth_config_response_result.py | 67 + .../models/ground_truth_item.py | 188 + .../models/ground_truth_item_role_mapping.py | 47 + .../ground_truth_item_variable_mapping.py | 47 + .../models/ground_truth_list_response.py | 77 + .../ground_truth_list_response_result.py | 92 + .../models/ground_truth_upload_request.py | 176 + .../ground_truth_upload_request_data_item.py | 47 + ...round_truth_upload_request_role_mapping.py | 47 + ...d_truth_upload_request_variable_mapping.py | 47 + .../models/ground_truth_upload_response.py | 79 + .../ground_truth_upload_response_result.py | 94 + .../openapi_client/models/heatmap_cell.py | 77 + .../models/hugging_face_add_rows_request.py | 88 + .../hugging_face_dataset_config_request.py | 61 + .../hugging_face_dataset_config_response.py | 79 + .../hugging_face_dataset_config_result.py | 81 + ...face_dataset_config_result_dataset_info.py | 47 + .../hugging_face_dataset_create_request.py | 107 + .../models/hugging_face_dataset_detail.py | 123 + .../hugging_face_dataset_detail_request.py | 61 + .../hugging_face_dataset_detail_response.py | 79 + ...ing_face_dataset_detail_response_result.py | 75 + .../models/hugging_face_dataset_list_item.py | 107 + .../hugging_face_dataset_list_request.py | 89 + ...face_dataset_list_request_filter_params.py | 47 + .../hugging_face_dataset_list_response.py | 79 + ...gging_face_dataset_list_response_result.py | 91 + .../models/import_annotation_entry.py | 96 + .../models/import_annotation_entry_value.py | 47 + .../models/import_annotations.py | 94 + .../models/json_column_schema_entry.py | 114 + .../models/json_column_schema_entry_sample.py | 47 + .../openapi_client/models/key_moment.py | 69 + .../legacy_knowledge_base_create_response.py | 79 + .../legacy_knowledge_base_create_result.py | 94 + .../models/legacy_knowledge_base_file_row.py | 132 + .../legacy_knowledge_base_files_request.py | 135 + ..._knowledge_base_files_request_sort_item.py | 47 + .../legacy_knowledge_base_files_response.py | 79 + .../legacy_knowledge_base_files_result.py | 109 + .../legacy_knowledge_base_list_response.py | 77 + .../legacy_knowledge_base_list_result.py | 75 + .../legacy_knowledge_base_mutation_request.py | 99 + ...legacy_knowledge_base_mutation_response.py | 79 + .../legacy_knowledge_base_mutation_result.py | 140 + .../models/legacy_knowledge_base_option.py | 70 + ...legacy_knowledge_base_sdk_code_response.py | 79 + .../legacy_knowledge_base_sdk_code_result.py | 61 + .../legacy_knowledge_base_table_column.py | 69 + .../legacy_knowledge_base_table_response.py | 79 + .../legacy_knowledge_base_table_result.py | 119 + .../models/legacy_knowledge_base_table_row.py | 132 + .../list_agent_definitions_agent_type.py | 9 + .../models/list_alert_logs_response_200.py | 125 + .../models/list_alerts_response_200.py | 125 + .../list_all_alert_logs_response_200.py | 125 + .../list_annotation_queue_items_ordering.py | 9 + ...ist_annotation_queue_items_response_200.py | 125 + .../list_annotation_queues_response_200.py | 125 + .../models/list_error_feed_issues_sort_by.py | 11 + .../models/list_error_feed_issues_sort_dir.py | 9 + .../models/list_error_feed_issues_source.py | 9 + .../models/list_error_feed_issues_status.py | 11 + .../models/list_experiments_response_200.py | 125 + ...organization_members_filter_status_item.py | 11 + .../models/list_organization_members_sort.py | 21 + .../models/list_personas_response_200.py | 125 + .../models/list_run_tests_simulation_type.py | 9 + .../list_trace_projects_response_200.py | 125 + .../list_trace_properties_response_200.py | 125 + .../list_trace_sessions_response_200.py | 125 + .../models/list_traces_response_200.py | 125 + .../models/list_voice_calls_response_200.py | 125 + ...st_workspace_members_filter_status_item.py | 10 + .../models/list_workspace_members_sort.py | 21 + ...al_file_dataset_create_started_response.py | 79 + ...ocal_file_dataset_create_started_result.py | 126 + .../models/management_api_error_response.py | 224 + .../management_api_error_response_details.py | 56 + .../management_api_error_response_type.py | 20 + .../models/manual_dataset_create_request.py | 81 + .../models/manual_dataset_create_response.py | 75 + .../models/manual_dataset_create_result.py | 86 + .../openapi_client/models/member_list_item.py | 221 + .../models/member_list_item_type.py | 9 + .../models/member_list_response.py | 75 + .../models/member_list_result.py | 99 + .../openapi_client/models/member_remove.py | 62 + .../models/member_role_update.py | 158 + .../models/member_role_update_org_level.py | 11 + .../models/member_role_update_response.py | 75 + .../models/member_role_update_result.py | 77 + .../member_role_update_result_changes.py | 47 + .../models/member_role_update_ws_level.py | 10 + .../models/member_user_mutation_response.py | 75 + .../models/member_user_mutation_result.py | 70 + .../models/member_workspace_access.py | 97 + .../models/merge_dataset_request.py | 94 + .../models/merge_dataset_response.py | 75 + .../models/merge_dataset_result.py | 85 + ...eues_automation_rules_list_response_200.py | 125 + ...nnotation_queues_for_source_source_type.py | 13 + .../model_hub_annotations_labels_list_type.py | 12 + .../model_hub_api_keys_list_response_200.py | 125 + ...elops_get_eval_structure_read_eval_type.py | 10 + .../models/model_hub_empty_request.py | 47 + .../models/model_hub_error_response.py | 222 + .../model_hub_error_response_details.py | 54 + .../models/model_hub_error_response_type.py | 20 + .../models/model_hub_paginated_response.py | 131 + ...del_hub_paginated_response_results_item.py | 47 + ...ions_get_execution_details_response_200.py | 125 + ...pt_history_executions_list_response_200.py | 125 + ..._prompt_labels_get_by_name_response_200.py | 125 + ...del_hub_prompt_labels_list_response_200.py | 125 + ...mpt_labels_template_labels_response_200.py | 125 + ...lates_get_template_by_name_response_200.py | 125 + ..._hub_prompt_templates_list_response_200.py | 125 + ...model_hub_scores_for_source_source_type.py | 13 + .../model_hub_scores_list_response_200.py | 125 + .../model_hub_scores_list_source_type.py | 13 + .../model_hub_string_result_response.py | 69 + .../models/model_hub_text_error_response.py | 224 + .../model_hub_text_error_response_details.py | 56 + .../model_hub_text_error_response_type.py | 20 + .../models/observe_graph_data_point.py | 97 + .../models/observe_graph_data_request.py | 141 + ...observe_graph_data_request_filters_item.py | 92 + ...data_request_filters_item_filter_config.py | 72 + .../observe_graph_data_request_interval.py | 11 + ...erve_graph_data_request_req_data_config.py | 111 + ...graph_data_request_req_data_config_type.py | 10 + .../models/observe_graph_data_response.py | 78 + .../models/observe_graph_data_result.py | 83 + .../optimiser_analysis_refresh_response.py | 82 + .../optimiser_analysis_refresh_result.py | 69 + .../models/optimiser_analysis_response.py | 82 + .../optimiser_analysis_result_payload.py | 108 + ...imiser_analysis_result_payload_response.py | 76 + ...lt_payload_response_additional_property.py | 47 + .../openapi_client/models/organization.py | 186 + .../models/overview_api_response.py | 78 + .../models/overview_response.py | 107 + .../openapi_client/models/pattern_insight.py | 69 + .../openapi_client/models/pattern_summary.py | 93 + .../models/performance_summary.py | 102 + ...ce_summary_test_run_performance_metrics.py | 47 + ...e_summary_top_performing_scenarios_item.py | 47 + .../openapi_client/models/persona.py | 715 + .../openapi_client/models/persona_accent.py | 47 + .../models/persona_age_group.py | 47 + .../models/persona_communication_style.py | 47 + .../models/persona_conversation_speed.py | 47 + .../openapi_client/models/persona_create.py | 690 + .../persona_create_custom_properties.py | 47 + .../models/persona_custom_properties.py | 47 + .../models/persona_duplicate_request.py | 61 + .../models/persona_duplicate_response.py | 83 + .../models/persona_emoji_usage.py | 11 + .../models/persona_field_options.py | 196 + .../persona_finished_speaking_sensitivity.py | 47 + .../openapi_client/models/persona_gender.py | 47 + .../models/persona_interrupt_sensitivity.py | 47 + .../openapi_client/models/persona_keywords.py | 47 + .../models/persona_languages.py | 47 + .../openapi_client/models/persona_list.py | 637 + .../models/persona_list_accent.py | 47 + .../models/persona_list_age_group.py | 47 + .../persona_list_communication_style.py | 47 + .../models/persona_list_conversation_speed.py | 47 + .../models/persona_list_emoji_usage.py | 11 + ...sona_list_finished_speaking_sensitivity.py | 47 + .../models/persona_list_gender.py | 47 + .../persona_list_interrupt_sensitivity.py | 47 + .../models/persona_list_keywords.py | 47 + .../models/persona_list_languages.py | 47 + .../models/persona_list_location.py | 47 + .../models/persona_list_metadata.py | 47 + .../models/persona_list_occupation.py | 47 + .../models/persona_list_persona_type.py | 9 + .../models/persona_list_personality.py | 47 + .../models/persona_list_punctuation.py | 11 + .../models/persona_list_regional_mix.py | 11 + .../models/persona_list_slang_usage.py | 11 + .../models/persona_list_tone.py | 10 + .../models/persona_list_typos_frequency.py | 11 + .../models/persona_list_verbosity.py | 10 + .../openapi_client/models/persona_location.py | 47 + .../openapi_client/models/persona_metadata.py | 47 + .../models/persona_occupation.py | 47 + .../models/persona_persona_type.py | 9 + .../models/persona_personality.py | 47 + .../models/persona_punctuation.py | 11 + .../models/persona_regional_mix.py | 11 + .../models/persona_simulation_type.py | 9 + .../models/persona_slang_usage.py | 11 + .../openapi_client/models/persona_tone.py | 10 + .../models/persona_typos_frequency.py | 11 + .../models/persona_verbosity.py | 10 + .../preview_dataset_operation_request.py | 142 + ...review_dataset_operation_request_config.py | 47 + .../preview_dataset_operation_response.py | 77 + .../preview_dataset_operation_result.py | 97 + .../preview_dataset_operation_result_item.py | 134 + ...w_dataset_operation_result_item_details.py | 47 + ...iew_dataset_operation_result_item_input.py | 47 + ...ew_dataset_operation_result_item_output.py | 47 + .../models/preview_run_eval_request.py | 114 + .../models/preview_run_eval_request_config.py | 47 + .../models/preview_run_prompt.py | 114 + .../openapi_client/models/project.py | 271 + .../openapi_client/models/project_config.py | 47 + .../openapi_client/models/project_metadata.py | 47 + .../models/project_model_type.py | 20 + .../models/project_session_config.py | 47 + .../openapi_client/models/project_source.py | 10 + .../openapi_client/models/project_tags.py | 47 + .../models/project_trace_type.py | 9 + .../openapi_client/models/prompt_config.py | 341 + .../models/prompt_config_entry.py | 345 + .../prompt_config_entry_configuration.py | 62 + .../prompt_config_entry_messages_item.py | 62 + .../models/prompt_config_entry_model.py | 47 + .../prompt_config_entry_model_params.py | 62 + .../models/prompt_config_messages_item.py | 62 + .../models/prompt_config_output_format.py | 13 + .../models/prompt_config_response_format.py | 47 + .../models/prompt_config_run_prompt_config.py | 62 + .../models/prompt_config_tool_choice.py | 9 + .../models/prompt_config_tools_type_0_item.py | 62 + .../prompt_derived_variables_response.py | 77 + .../models/prompt_derived_variables_result.py | 81 + ...ived_variables_result_derived_variables.py | 56 + .../models/prompt_history_execution.py | 366 + ...pt_history_execution_evaluation_configs.py | 47 + ...pt_history_execution_evaluation_results.py | 47 + .../prompt_history_execution_metadata.py | 47 + .../models/prompt_history_execution_output.py | 47 + .../prompt_history_execution_placeholders.py | 47 + .../openapi_client/models/prompt_label.py | 161 + .../models/prompt_label_metadata.py | 47 + .../models/prompt_label_type.py | 9 + .../models/prompt_simulation_list_response.py | 78 + .../models/prompt_simulation_list_result.py | 130 + .../models/prompt_simulation_run_response.py | 78 + .../models/prompt_simulation_scenario_item.py | 144 + .../prompt_simulation_scenarios_response.py | 82 + .../prompt_simulation_scenarios_result.py | 108 + .../prompt_simulation_template_summary.py | 78 + .../prompt_simulation_update_request.py | 110 + .../openapi_client/models/prompt_template.py | 230 + .../models/prompt_template_placeholders.py | 47 + .../models/prompt_template_variable_names.py | 47 + .../models/provider_status_item.py | 158 + .../models/provider_status_response.py | 75 + .../models/provider_status_result.py | 75 + .../models/queue_add_items_response.py | 78 + .../models/queue_add_items_result.py | 96 + .../models/queue_add_label_response.py | 78 + .../models/queue_add_label_result.py | 91 + .../models/queue_agreement_annotator_pair.py | 85 + .../models/queue_agreement_label.py | 126 + .../models/queue_agreement_response.py | 78 + .../models/queue_agreement_result.py | 102 + .../models/queue_agreement_result_labels.py | 62 + .../queue_analytics_annotator_performance.py | 135 + .../models/queue_analytics_response.py | 78 + .../models/queue_analytics_result.py | 131 + ...eue_analytics_result_label_distribution.py | 76 + ..._label_distribution_additional_property.py | 47 + ...queue_analytics_result_status_breakdown.py | 47 + .../models/queue_analytics_throughput.py | 93 + .../queue_analytics_throughput_daily.py | 69 + .../models/queue_annotate_detail_response.py | 78 + .../models/queue_annotate_detail_result.py | 291 + ...annotate_detail_result_annotations_item.py | 47 + .../queue_annotate_detail_result_item.py | 47 + ...ueue_annotate_detail_result_labels_item.py | 47 + .../queue_annotate_detail_result_progress.py | 47 + .../queue_annotate_detail_result_queue.py | 47 + ...tate_detail_result_review_comments_item.py | 47 + ...otate_detail_result_review_threads_item.py | 47 + ..._annotate_detail_result_span_notes_item.py | 47 + .../models/queue_annotator_nested.py | 116 + .../models/queue_assign_items_response.py | 78 + .../models/queue_assign_items_result.py | 61 + .../queue_bulk_remove_items_response.py | 78 + .../models/queue_bulk_remove_items_result.py | 61 + .../models/queue_default_queue.py | 106 + .../models/queue_default_request.py | 101 + .../models/queue_default_response.py | 78 + .../models/queue_default_result.py | 103 + .../models/queue_default_result_action.py | 10 + .../models/queue_discussion_response.py | 78 + .../models/queue_discussion_result.py | 145 + .../models/queue_discussion_result_comment.py | 47 + ..._discussion_result_review_comments_item.py | 47 + ...e_discussion_result_review_threads_item.py | 47 + .../models/queue_discussion_result_thread.py | 47 + .../queue_export_annotations_response.py | 92 + ...export_annotations_response_result_item.py | 47 + .../models/queue_export_column_mapping.py | 88 + .../models/queue_export_default_mapping.py | 77 + .../models/queue_export_field.py | 176 + .../models/queue_export_fields_response.py | 78 + .../models/queue_export_fields_result.py | 95 + .../models/queue_export_to_dataset_request.py | 116 + .../queue_export_to_dataset_response.py | 78 + .../models/queue_export_to_dataset_result.py | 86 + .../models/queue_for_source_entry.py | 183 + ...e_for_source_entry_existing_label_notes.py | 47 + .../queue_for_source_entry_existing_scores.py | 74 + ...try_existing_scores_additional_property.py | 47 + .../queue_for_source_entry_span_notes_item.py | 47 + .../models/queue_for_source_item.py | 92 + .../models/queue_for_source_queue.py | 86 + .../models/queue_for_source_response.py | 86 + .../models/queue_hard_delete_request.py | 69 + .../models/queue_hard_delete_response.py | 78 + .../models/queue_hard_delete_result.py | 90 + .../queue_import_annotations_response.py | 80 + .../models/queue_import_annotations_result.py | 61 + .../openapi_client/models/queue_item.py | 438 + .../models/queue_item_annotations_response.py | 86 + .../models/queue_item_metadata.py | 47 + .../models/queue_item_navigation_request.py | 81 + .../models/queue_item_source_type.py | 13 + .../models/queue_item_status.py | 11 + .../models/queue_label_nested.py | 116 + .../models/queue_label_request.py | 73 + .../models/queue_label_result.py | 127 + .../models/queue_label_result_settings.py | 47 + .../models/queue_navigation_response.py | 78 + .../models/queue_navigation_result.py | 104 + .../queue_navigation_result_next_item.py | 47 + .../models/queue_next_item_response.py | 78 + .../models/queue_next_item_result.py | 67 + .../models/queue_next_item_result_item.py | 47 + .../models/queue_progress_annotator_stat.py | 124 + .../models/queue_progress_response.py | 78 + .../models/queue_progress_result.py | 143 + .../models/queue_progress_user_progress.py | 109 + .../queue_release_reservation_response.py | 80 + .../queue_release_reservation_result.py | 61 + .../models/queue_remove_label_response.py | 78 + .../models/queue_remove_label_result.py | 61 + .../models/queue_review_item_response.py | 78 + .../models/queue_review_item_result.py | 136 + .../queue_review_item_result_next_item.py | 47 + ...review_item_result_review_comments_item.py | 47 + ..._review_item_result_review_threads_item.py | 47 + .../models/queue_status_request.py | 63 + .../models/queue_status_request_status.py | 11 + .../models/queue_status_response.py | 78 + .../queue_submit_annotations_response.py | 80 + .../models/queue_submit_annotations_result.py | 61 + .../openapi_client/models/recommendation.py | 135 + .../models/representative_trace.py | 192 + ...presentative_trace_recommendations_item.py | 64 + .../representative_trace_root_causes_item.py | 64 + .../representative_trace_what_changed.py | 62 + .../models/rerun_calls_response.py | 140 + .../openapi_client/models/rerun_cell_entry.py | 70 + .../models/review_item_request.py | 102 + .../models/review_item_request_action.py | 11 + .../models/review_label_comment_request.py | 94 + .../openapi_client/models/root_cause.py | 77 + .../models/run_new_evals_on_test_execution.py | 112 + .../models/run_new_evals_response.py | 78 + .../models/run_prompt_choice_option.py | 75 + .../models/run_prompt_choice_option_value.py | 47 + .../run_prompt_column_config_response.py | 75 + .../models/run_prompt_column_config_result.py | 71 + .../run_prompt_column_config_result_config.py | 47 + .../run_prompt_column_preview_response.py | 77 + .../run_prompt_column_preview_result.py | 111 + .../run_prompt_column_preview_result_cost.py | 47 + ...pt_column_preview_result_responses_item.py | 47 + ...rompt_column_preview_result_token_usage.py | 47 + .../models/run_prompt_options_response.py | 75 + .../models/run_prompt_options_result.py | 149 + .../run_prompt_options_result_models_item.py | 47 + .../run_prompt_options_result_tool_config.py | 47 + .../models/run_prompt_tool_option.py | 153 + .../models/run_prompt_tool_option_config.py | 47 + .../models/run_test_analytics.py | 167 + ..._analytics_evaluation_score_trends_item.py | 64 + ...un_test_analytics_fail_rate_trends_item.py | 64 + ...t_analytics_performance_comparison_item.py | 64 + .../run_test_analytics_run_test_info.py | 62 + .../run_test_analytics_summary_stats.py | 62 + .../run_test_call_executions_response.py | 152 + ...t_call_executions_response_results_item.py | 64 + .../run_test_chat_execution_response.py | 78 + .../models/run_test_chat_execution_result.py | 102 + .../models/run_test_components_update.py | 131 + .../models/run_test_error_response.py | 220 + .../models/run_test_error_response_details.py | 54 + .../models/run_test_error_response_type.py | 20 + .../models/run_test_execution_response.py | 142 + .../models/run_test_kp_is_response.py | 338 + ...run_test_kp_is_response_scenario_graphs.py | 74 + ...nse_scenario_graphs_additional_property.py | 74 + ...additional_property_additional_property.py | 49 + .../models/run_test_message_response.py | 61 + .../models/run_test_name_response.py | 78 + .../models/run_test_name_result.py | 70 + .../models/run_test_response.py | 639 + ...n_test_response_agent_definition_detail.py | 64 + .../models/run_test_response_agent_version.py | 62 + ...un_test_response_prompt_template_detail.py | 64 + ...run_test_response_prompt_version_detail.py | 64 + ...run_test_response_scenarios_detail_item.py | 64 + ...un_test_response_simulator_agent_detail.py | 64 + .../models/run_test_response_source_type.py | 9 + .../models/run_test_scenario_item_response.py | 79 + .../models/scenario_add_columns_request.py | 75 + .../models/scenario_add_columns_response.py | 105 + .../models/scenario_add_rows_request.py | 72 + .../models/scenario_add_rows_response.py | 103 + .../models/scenario_create_request.py | 468 + .../models/scenario_create_request_graph.py | 47 + .../models/scenario_create_request_kind.py | 10 + .../scenario_create_request_source_type.py | 9 + .../models/scenario_create_response.py | 100 + .../models/scenario_create_response_status.py | 8 + .../models/scenario_delete_response.py | 61 + .../models/scenario_detail_response.py | 366 + .../models/scenario_detail_response_graph.py | 62 + .../scenario_detail_response_scenario_type.py | 10 + .../models/scenario_detail_response_status.py | 24 + .../models/scenario_edit_prompts_request.py | 61 + .../models/scenario_edit_request.py | 101 + .../models/scenario_edit_request_graph.py | 47 + .../models/scenario_edit_response.py | 83 + .../models/scenario_error_response.py | 222 + .../models/scenario_error_response_details.py | 54 + .../models/scenario_error_response_type.py | 20 + .../models/scenario_list_response.py | 128 + .../models/scenario_prompt_item.py | 78 + .../models/scenario_prompt_item_role.py | 10 + .../scenario_prompts_update_response.py | 70 + .../models/scenario_response.py | 420 + .../models/scenario_response_scenario_type.py | 10 + .../models/scenario_response_source_type.py | 9 + .../models/scenario_response_status.py | 24 + .../generated/openapi_client/models/score.py | 323 + .../models/score_delete_response.py | 78 + .../models/score_delete_response_result.py | 47 + .../models/score_for_source_response.py | 115 + ...ore_for_source_response_span_notes_item.py | 47 + .../models/score_label_settings.py | 47 + .../openapi_client/models/score_response.py | 78 + .../models/score_score_source.py | 11 + .../models/score_source_type.py | 13 + .../openapi_client/models/score_trend.py | 85 + .../openapi_client/models/score_value.py | 47 + .../sdk_configure_evaluations_request.py | 117 + ...evaluations_request_additional_property.py | 47 + .../sdk_configure_evaluations_response.py | 75 + .../models/sdk_error_response.py | 125 + .../models/sdk_error_response_errors.py | 54 + .../models/sdk_eval_template.py | 223 + .../models/sdk_eval_template_choices.py | 47 + .../models/sdk_eval_template_config.py | 47 + .../models/sdk_eval_template_criteria.py | 47 + .../models/sdk_eval_template_eval_tags.py | 47 + .../models/sdk_eval_template_response.py | 75 + .../models/sdk_get_evals_response.py | 83 + .../models/sdk_message_result.py | 61 + .../sdk_simulation_analytics_response.py | 77 + .../models/sdk_simulation_analytics_result.py | 212 + ...mulation_analytics_result_eval_averages.py | 47 + ...alytics_result_eval_explanation_summary.py | 47 + ...tion_analytics_result_eval_results_item.py | 47 + ...ulation_analytics_result_system_summary.py | 47 + .../models/sdk_simulation_metrics_response.py | 75 + .../models/sdk_simulation_metrics_result.py | 371 + ..._simulation_metrics_result_chat_metrics.py | 47 + ..._simulation_metrics_result_conversation.py | 47 + .../sdk_simulation_metrics_result_cost.py | 47 + .../sdk_simulation_metrics_result_latency.py | 47 + .../sdk_simulation_metrics_result_metrics.py | 47 + .../models/sdk_simulation_runs_response.py | 75 + .../models/sdk_simulation_runs_result.py | 487 + ...sdk_simulation_runs_result_call_results.py | 47 + .../models/sdk_simulation_runs_result_cost.py | 47 + ...on_runs_result_eval_explanation_summary.py | 47 + ...sdk_simulation_runs_result_eval_outputs.py | 47 + ...imulation_runs_result_eval_results_item.py | 47 + .../sdk_simulation_runs_result_latency.py | 47 + .../models/sdk_standalone_eval_input.py | 94 + ...andalone_eval_input_additional_property.py | 47 + .../models/sdk_standalone_eval_request.py | 100 + .../sdk_standalone_eval_request_config.py | 62 + .../models/sdk_standalone_eval_response.py | 83 + .../models/sdk_standalone_eval_result_item.py | 81 + ...alone_eval_result_item_evaluations_item.py | 47 + .../models/sdk_standalone_eval_v2_request.py | 190 + .../sdk_standalone_eval_v2_request_config.py | 64 + .../sdk_standalone_eval_v2_request_inputs.py | 64 + .../models/sdk_standalone_eval_v2_response.py | 75 + .../models/sdk_standalone_eval_v2_result.py | 79 + .../sdk_standalone_eval_v2_result_result.py | 47 + .../models/sdkcicd_evaluation_run_accepted.py | 86 + ...dkcicd_evaluation_run_accepted_response.py | 77 + .../models/sdkcicd_evaluation_run_summary.py | 98 + ..._evaluation_run_summary_results_summary.py | 64 + .../sdkcicd_evaluation_runs_response.py | 75 + .../models/sdkcicd_evaluation_runs_result.py | 103 + .../sdkcicd_evaluation_runs_result_status.py | 9 + .../openapi_client/models/selection.py | 138 + .../models/selection_filter_item.py | 92 + .../selection_filter_item_filter_config.py | 72 + .../openapi_client/models/selection_mode.py | 8 + .../models/selection_source_type.py | 11 + .../models/send_chat_request.py | 127 + .../models/send_chat_request_metrics.py | 62 + .../models/session_comparison_response.py | 78 + .../models/session_comparison_result.py | 132 + ...on_comparison_result_comparison_metrics.py | 47 + ...comparison_result_comparison_recordings.py | 47 + ...omparison_result_comparison_transcripts.py | 47 + .../models/sidebar_ai_metadata.py | 124 + .../openapi_client/models/sidebar_timeline.py | 120 + ...api_personas_field_options_response_200.py | 125 + ...i_personas_system_personas_response_200.py | 125 + ...ersonas_workspace_personas_response_200.py | 125 + ...late_api_run_tests_list_simulation_type.py | 9 + .../models/simulate_eval_config_response.py | 265 + .../simulate_eval_config_response_config.py | 47 + ...ulate_eval_config_response_filters_item.py | 92 + ...fig_response_filters_item_filter_config.py | 72 + .../simulate_eval_config_response_mapping.py | 47 + .../models/simulate_export_read_type.py | 9 + .../openapi_client/models/simulator_agent.py | 273 + .../models/simulator_agent_delete_response.py | 61 + .../models/simulator_agent_list_response.py | 146 + ...mulator_agent_validation_error_response.py | 56 + .../models/start_evals_process_request.py | 97 + .../models/stop_user_eval_request.py | 69 + .../models/submit_annotation_entry.py | 87 + .../models/submit_annotation_entry_value.py | 47 + .../models/submit_annotations.py | 106 + .../openapi_client/models/switch_workspace.py | 62 + .../models/switch_workspace_response.py | 75 + .../models/switch_workspace_result.py | 99 + .../openapi_client/models/synthetic_data.py | 126 + .../models/synthetic_data_dataset.py | 47 + .../models/synthetic_dataset_config.py | 142 + .../synthetic_dataset_config_dataset.py | 47 + .../synthetic_dataset_config_payload.py | 147 + ...tic_dataset_config_payload_columns_item.py | 47 + ...ynthetic_dataset_config_payload_dataset.py | 47 + .../synthetic_dataset_config_response.py | 77 + .../models/synthetic_dataset_config_result.py | 77 + ...nthetic_dataset_create_started_response.py | 79 + ...synthetic_dataset_create_started_result.py | 75 + .../models/synthetic_dataset_creation.py | 121 + .../synthetic_dataset_creation_dataset.py | 47 + .../models/synthetic_dataset_update_data.py | 90 + .../synthetic_dataset_update_response.py | 77 + .../models/synthetic_dataset_update_result.py | 75 + .../openapi_client/models/test_execution.py | 390 + .../models/test_execution_analytics.py | 110 + ...cs_evaluation_categories_over_test_runs.py | 62 + ...tion_analytics_fail_rate_over_test_runs.py | 64 + .../test_execution_analytics_metadata.py | 62 + .../models/test_execution_bulk_delete.py | 83 + .../test_execution_bulk_delete_response.py | 108 + .../test_execution_chat_batch_response.py | 80 + .../test_execution_chat_batch_result.py | 94 + .../models/test_execution_column_order.py | 75 + .../test_execution_column_order_response.py | 88 + .../models/test_execution_detail_response.py | 222 + ...ution_detail_response_column_order_item.py | 64 + ..._execution_detail_response_results_item.py | 64 + .../test_execution_execution_metadata.py | 47 + .../models/test_execution_item_response.py | 240 + .../models/test_execution_rerun.py | 95 + .../models/test_execution_rerun_rerun_type.py | 9 + .../models/test_execution_rerun_response.py | 141 + .../models/test_execution_rerun_result.py | 159 + ...ecution_rerun_result_failed_reruns_item.py | 64 + .../models/test_execution_scenario_ids.py | 47 + .../models/test_execution_status.py | 14 + .../models/test_execution_status_summary.py | 194 + ...execution_status_summary_scenarios_item.py | 64 + .../models/test_execution_transcript_call.py | 154 + .../test_execution_transcripts_response.py | 114 + .../generated/openapi_client/models/trace.py | 246 + .../models/trace_annotation_note_response.py | 104 + .../models/trace_annotation_value_response.py | 232 + ...otation_value_response_annotation_value.py | 47 + ...race_annotation_value_response_settings.py | 47 + .../openapi_client/models/trace_error.py | 47 + .../openapi_client/models/trace_evidence.py | 122 + .../models/trace_evidence_fail_reel_item.py | 62 + .../models/trace_evidence_pass_reel_item.py | 62 + .../openapi_client/models/trace_input.py | 47 + .../openapi_client/models/trace_metadata.py | 47 + .../openapi_client/models/trace_output.py | 47 + .../openapi_client/models/trace_preview.py | 89 + .../openapi_client/models/trace_session.py | 127 + .../trace_session_graph_data_request.py | 143 + ...session_graph_data_request_filters_item.py | 92 + ...data_request_filters_item_filter_config.py | 72 + ...ace_session_graph_data_request_interval.py | 11 + ...sion_graph_data_request_req_data_config.py | 111 + ...graph_data_request_req_data_config_type.py | 10 + .../openapi_client/models/trace_summary.py | 138 + .../openapi_client/models/trace_tags.py | 47 + .../models/trace_tags_update.py | 61 + .../tracer_trace_agent_graph_response_200.py | 125 + ...acer_trace_annotation_list_response_200.py | 125 + ...racer_trace_get_eval_names_response_200.py | 125 + ...race_get_trace_export_data_response_200.py | 125 + ..._trace_id_by_index_observe_response_200.py | 125 + ...race_get_trace_id_by_index_response_200.py | 125 + .../models/tracer_trace_list_response_200.py | 125 + ...ace_list_traces_of_session_response_200.py | 125 + ..._get_session_filter_values_response_200.py | 125 + ..._trace_session_export_data_response_200.py | 125 + .../tracer_trace_session_list_response_200.py | 125 + ..._user_alerts_list_monitors_response_200.py | 125 + .../models/traces_aggregates.py | 109 + .../openapi_client/models/traces_list_row.py | 172 + .../models/traces_tab_api_response.py | 78 + .../models/traces_tab_response.py | 93 + .../openapi_client/models/trend_metric.py | 85 + .../openapi_client/models/trend_point.py | 79 + .../models/trends_tab_api_response.py | 78 + .../models/trends_tab_response.py | 142 + .../openapi_client/models/update_run_test.py | 140 + .../generated/openapi_client/models/user.py | 192 + .../models/user_alert_monitor.py | 539 + .../models/user_alert_monitor_duplicate.py | 70 + .../user_alert_monitor_duplicate_response.py | 82 + .../user_alert_monitor_duplicate_result.py | 70 + .../models/user_alert_monitor_filters.py | 47 + .../models/user_alert_monitor_log.py | 248 + .../models/user_alert_monitor_log_type.py | 9 + .../models/user_alert_monitor_logs.py | 47 + .../user_alert_monitor_metric_option.py | 88 + ...r_alert_monitor_metric_options_response.py | 90 + .../models/user_alert_monitor_metric_type.py | 18 + .../user_alert_monitor_threshold_operator.py | 9 + .../user_alert_monitor_threshold_type.py | 9 + .../models/user_code_example_response.py | 72 + .../models/user_eval_mutation_request.py | 195 + ...tion_request_composite_weight_overrides.py | 47 + .../user_eval_mutation_request_config.py | 47 + .../models/user_eval_update_request.py | 195 + ...date_request_composite_weight_overrides.py | 47 + .../models/user_eval_update_request_config.py | 47 + .../openapi_client/models/user_goals.py | 47 + .../models/user_info_organization.py | 89 + .../models/user_info_response.py | 367 + .../models/user_info_two_factor_methods.py | 69 + .../models/user_organization_role.py | 14 + .../openapi_client/models/users_response.py | 78 + .../openapi_client/models/users_result.py | 91 + .../models/users_result_table_item.py | 47 + .../models/vector_db_column_request.py | 216 + ...ctor_db_column_request_embedding_config.py | 47 + .../models/workspace_access_input.py | 82 + .../models/workspace_access_input_level.py | 10 + .../models/workspace_admin_summary.py | 77 + .../models/workspace_list_item_response.py | 176 + .../workspace_list_paginated_response.py | 127 + .../models/workspace_member_remove.py | 62 + .../models/workspace_member_role_update.py | 74 + .../workspace_member_role_update_response.py | 79 + .../workspace_member_role_update_result.py | 86 + .../workspace_member_role_update_ws_level.py | 10 + .../models/workspace_summary.py | 98 + python/fi/generated/openapi_client/types.py | 54 + python/pyproject.toml | 2 + python/tests/test_futureagi_client.py | 110 + scripts/build-sdk-openapi.sh | 202 + scripts/generate-go-java-sdk.sh | 52 + scripts/generate-oss-sdk.sh | 25 + scripts/prune-openapi-components.mjs | 72 + typescript/futureagi/.dockerignore | 22 + typescript/futureagi/README.md | 127 +- .../src/__tests__/futureagi-client.test.ts | 106 + typescript/futureagi/src/fetch-globals.d.ts | 1 + typescript/futureagi/src/futureagi-client.ts | 1099 + .../src/generated/openapi/client.gen.ts | 16 + .../generated/openapi/client/client.gen.ts | 277 + .../src/generated/openapi/client/index.ts | 25 + .../src/generated/openapi/client/types.gen.ts | 217 + .../src/generated/openapi/client/utils.gen.ts | 316 + .../src/generated/openapi/core/auth.gen.ts | 41 + .../openapi/core/bodySerializer.gen.ts | 82 + .../src/generated/openapi/core/params.gen.ts | 169 + .../openapi/core/pathSerializer.gen.ts | 171 + .../openapi/core/queryKeySerializer.gen.ts | 117 + .../openapi/core/serverSentEvents.gen.ts | 242 + .../src/generated/openapi/core/types.gen.ts | 104 + .../src/generated/openapi/core/utils.gen.ts | 140 + .../futureagi/src/generated/openapi/index.ts | 4 + .../src/generated/openapi/sdk.gen.ts | 4910 ++ .../src/generated/openapi/types.gen.ts | 36702 +++++++++ typescript/futureagi/src/index.ts | 1 + 3462 files changed, 1132323 insertions(+), 65 deletions(-) create mode 100644 go/futureagi/.gitignore create mode 100644 go/futureagi/README.md create mode 100644 go/futureagi/api/openapi.yaml create mode 100644 go/futureagi/api_accounts.go create mode 100644 go/futureagi/api_alerts.go create mode 100644 go/futureagi/api_annotation_queue_discussion.go create mode 100644 go/futureagi/api_annotation_queue_items.go create mode 100644 go/futureagi/api_annotation_queue_review.go create mode 100644 go/futureagi/api_annotation_queues.go create mode 100644 go/futureagi/api_datasets.go create mode 100644 go/futureagi/api_experiments.go create mode 100644 go/futureagi/api_model_hub.go create mode 100644 go/futureagi/api_run_tests_eval_configs.go create mode 100644 go/futureagi/api_run_tests_eval_summary.go create mode 100644 go/futureagi/api_scenarios.go create mode 100644 go/futureagi/api_sdk.go create mode 100644 go/futureagi/api_simulate.go create mode 100644 go/futureagi/api_simulation_agent_definitions.go create mode 100644 go/futureagi/api_simulation_personas.go create mode 100644 go/futureagi/api_simulation_run_tests.go create mode 100644 go/futureagi/api_simulation_scenarios.go create mode 100644 go/futureagi/api_simulation_test_executions.go create mode 100644 go/futureagi/api_simulations.go create mode 100644 go/futureagi/api_tracer.go create mode 100644 go/futureagi/api_tracing.go create mode 100644 go/futureagi/api_users.go create mode 100644 go/futureagi/client.go create mode 100644 go/futureagi/configuration.go create mode 100644 go/futureagi/docs/AccountsAPI.md create mode 100644 go/futureagi/docs/AlertsAPI.md create mode 100644 go/futureagi/docs/AnnotationQueueDiscussionAPI.md create mode 100644 go/futureagi/docs/AnnotationQueueItemsAPI.md create mode 100644 go/futureagi/docs/AnnotationQueueReviewAPI.md create mode 100644 go/futureagi/docs/AnnotationQueuesAPI.md create mode 100644 go/futureagi/docs/DatasetsAPI.md create mode 100644 go/futureagi/docs/ExperimentsAPI.md create mode 100644 go/futureagi/docs/ModelHubAPI.md create mode 100644 go/futureagi/docs/RunTestsEvalConfigsAPI.md create mode 100644 go/futureagi/docs/RunTestsEvalSummaryAPI.md create mode 100644 go/futureagi/docs/ScenariosAPI.md create mode 100644 go/futureagi/docs/SdkAPI.md create mode 100644 go/futureagi/docs/SimulateAPI.md create mode 100644 go/futureagi/docs/SimulationAgentDefinitionsAPI.md create mode 100644 go/futureagi/docs/SimulationPersonasAPI.md create mode 100644 go/futureagi/docs/SimulationRunTestsAPI.md create mode 100644 go/futureagi/docs/SimulationScenariosAPI.md create mode 100644 go/futureagi/docs/SimulationTestExecutionsAPI.md create mode 100644 go/futureagi/docs/SimulationsAPI.md create mode 100644 go/futureagi/docs/TracerAPI.md create mode 100644 go/futureagi/docs/TracingAPI.md create mode 100644 go/futureagi/docs/UsersAPI.md create mode 100644 go/futureagi/go.mod create mode 100644 go/futureagi/go.sum create mode 100644 go/futureagi/model_accounts_error_response.go create mode 100644 go/futureagi/model_add_api_column_request.go create mode 100644 go/futureagi/model_add_as_new_dataset_request.go create mode 100644 go/futureagi/model_add_eval_configs_request.go create mode 100644 go/futureagi/model_add_eval_configs_response.go create mode 100644 go/futureagi/model_add_items.go create mode 100644 go/futureagi/model_add_queue_item.go create mode 100644 go/futureagi/model_add_rows_from_file_request.go create mode 100644 go/futureagi/model_add_run_prompt.go create mode 100644 go/futureagi/model_agent_definition_bulk_delete_request.go create mode 100644 go/futureagi/model_agent_definition_bulk_delete_response.go create mode 100644 go/futureagi/model_agent_definition_create_request.go create mode 100644 go/futureagi/model_agent_definition_create_response.go create mode 100644 go/futureagi/model_agent_definition_delete_response.go create mode 100644 go/futureagi/model_agent_definition_edit_request.go create mode 100644 go/futureagi/model_agent_definition_edit_response.go create mode 100644 go/futureagi/model_agent_definition_list_response.go create mode 100644 go/futureagi/model_agent_definition_response.go create mode 100644 go/futureagi/model_agent_flow_graph.go create mode 100644 go/futureagi/model_agent_version_activate_response.go create mode 100644 go/futureagi/model_agent_version_create_request.go create mode 100644 go/futureagi/model_agent_version_create_response.go create mode 100644 go/futureagi/model_agent_version_delete_response.go create mode 100644 go/futureagi/model_agent_version_list_response.go create mode 100644 go/futureagi/model_agent_version_response.go create mode 100644 go/futureagi/model_agent_version_restore_response.go create mode 100644 go/futureagi/model_all_active_tests.go create mode 100644 go/futureagi/model_annotation_label_response.go create mode 100644 go/futureagi/model_annotation_label_restore_response.go create mode 100644 go/futureagi/model_annotation_queue.go create mode 100644 go/futureagi/model_annotation_summary_header.go create mode 100644 go/futureagi/model_annotation_summary_response.go create mode 100644 go/futureagi/model_annotation_summary_result.go create mode 100644 go/futureagi/model_annotations_labels.go create mode 100644 go/futureagi/model_api_error_response.go create mode 100644 go/futureagi/model_api_error_with_details_response.go create mode 100644 go/futureagi/model_api_key.go create mode 100644 go/futureagi/model_api_selection_too_large_detail.go create mode 100644 go/futureagi/model_api_selection_too_large_error.go create mode 100644 go/futureagi/model_api_text_error_response.go create mode 100644 go/futureagi/model_assign_items.go create mode 100644 go/futureagi/model_automation_rule.go create mode 100644 go/futureagi/model_automation_rule_conditions.go create mode 100644 go/futureagi/model_automation_rule_conditions_filter_inner.go create mode 100644 go/futureagi/model_automation_rule_conditions_filter_inner_filter_config.go create mode 100644 go/futureagi/model_automation_rule_evaluate_accepted_response.go create mode 100644 go/futureagi/model_automation_rule_evaluate_response.go create mode 100644 go/futureagi/model_automation_rule_evaluate_result.go create mode 100644 go/futureagi/model_automation_rule_scope.go create mode 100644 go/futureagi/model_base_columns_response.go create mode 100644 go/futureagi/model_base_columns_response_result.go create mode 100644 go/futureagi/model_bulk_annotation_annotation_request.go create mode 100644 go/futureagi/model_bulk_annotation_note_request.go create mode 100644 go/futureagi/model_bulk_annotation_record_request.go create mode 100644 go/futureagi/model_bulk_annotation_request.go create mode 100644 go/futureagi/model_bulk_annotation_response.go create mode 100644 go/futureagi/model_bulk_annotation_response_result.go create mode 100644 go/futureagi/model_bulk_create_score_item.go create mode 100644 go/futureagi/model_bulk_create_scores.go create mode 100644 go/futureagi/model_bulk_create_scores_response.go create mode 100644 go/futureagi/model_bulk_create_scores_result.go create mode 100644 go/futureagi/model_bulk_remove_items.go create mode 100644 go/futureagi/model_call_branch_analysis_response.go create mode 100644 go/futureagi/model_call_branch_deviation_create_response.go create mode 100644 go/futureagi/model_call_execution.go create mode 100644 go/futureagi/model_call_execution_delete_response.go create mode 100644 go/futureagi/model_call_execution_detail.go create mode 100644 go/futureagi/model_call_execution_error_localizer_tasks_response.go create mode 100644 go/futureagi/model_call_execution_error_response.go create mode 100644 go/futureagi/model_call_execution_logs_response.go create mode 100644 go/futureagi/model_call_execution_rerun.go create mode 100644 go/futureagi/model_call_execution_status_update.go create mode 100644 go/futureagi/model_call_log_entry_response.go create mode 100644 go/futureagi/model_call_transcript.go create mode 100644 go/futureagi/model_call_transcript_response.go create mode 100644 go/futureagi/model_cancel_test_execution_response.go create mode 100644 go/futureagi/model_chat_message_contract.go create mode 100644 go/futureagi/model_chat_sdk_code_response.go create mode 100644 go/futureagi/model_chat_sdk_code_result.go create mode 100644 go/futureagi/model_chat_send_message_response.go create mode 100644 go/futureagi/model_chat_send_message_result.go create mode 100644 go/futureagi/model_chat_tool_call.go create mode 100644 go/futureagi/model_chat_tool_call_function.go create mode 100644 go/futureagi/model_cicd_evaluation_item.go create mode 100644 go/futureagi/model_cicd_job.go create mode 100644 go/futureagi/model_classify_column_request.go create mode 100644 go/futureagi/model_clone_dataset_request.go create mode 100644 go/futureagi/model_co_occurring_issue.go create mode 100644 go/futureagi/model_column.go create mode 100644 go/futureagi/model_column_definition.go create mode 100644 go/futureagi/model_column_order.go create mode 100644 go/futureagi/model_column_type_conversion_response.go create mode 100644 go/futureagi/model_column_type_conversion_result.go create mode 100644 go/futureagi/model_compare_dataset.go create mode 100644 go/futureagi/model_compare_dataset_delete_response.go create mode 100644 go/futureagi/model_compare_dataset_delete_result.go create mode 100644 go/futureagi/model_compare_dataset_metadata.go create mode 100644 go/futureagi/model_compare_dataset_response.go create mode 100644 go/futureagi/model_compare_dataset_result.go create mode 100644 go/futureagi/model_compare_dataset_row_response.go create mode 100644 go/futureagi/model_compare_dataset_row_result.go create mode 100644 go/futureagi/model_compare_dataset_stats_request.go create mode 100644 go/futureagi/model_compare_dataset_stats_response.go create mode 100644 go/futureagi/model_compare_eval_list_response.go create mode 100644 go/futureagi/model_compare_eval_list_result.go create mode 100644 go/futureagi/model_compare_evals_list_request.go create mode 100644 go/futureagi/model_compare_experiment_eval_request.go create mode 100644 go/futureagi/model_compare_preview_run_eval_request.go create mode 100644 go/futureagi/model_compare_start_evals_request.go create mode 100644 go/futureagi/model_composite_child_item.go create mode 100644 go/futureagi/model_composite_child_result.go create mode 100644 go/futureagi/model_composite_eval_adhoc_execute_request.go create mode 100644 go/futureagi/model_composite_eval_create_request.go create mode 100644 go/futureagi/model_composite_eval_create_response.go create mode 100644 go/futureagi/model_composite_eval_create_response_result.go create mode 100644 go/futureagi/model_composite_eval_detail_response.go create mode 100644 go/futureagi/model_composite_eval_detail_response_result.go create mode 100644 go/futureagi/model_composite_eval_execute_request.go create mode 100644 go/futureagi/model_composite_eval_execute_response.go create mode 100644 go/futureagi/model_composite_eval_execute_response_result.go create mode 100644 go/futureagi/model_composite_eval_update_request.go create mode 100644 go/futureagi/model_conditional_column_request.go create mode 100644 go/futureagi/model_configure_evaluations.go create mode 100644 go/futureagi/model_create_dataset_from_experiment_request.go create mode 100644 go/futureagi/model_create_dataset_from_local_file_request.go create mode 100644 go/futureagi/model_create_empty_dataset_request.go create mode 100644 go/futureagi/model_create_linear_issue.go create mode 100644 go/futureagi/model_create_linear_issue_response.go create mode 100644 go/futureagi/model_create_linear_issue_result.go create mode 100644 go/futureagi/model_create_prompt_simulation_request.go create mode 100644 go/futureagi/model_create_run_test_.go create mode 100644 go/futureagi/model_create_score.go create mode 100644 go/futureagi/model_dataset.go create mode 100644 go/futureagi/model_dataset_add_columns_request.go create mode 100644 go/futureagi/model_dataset_add_empty_columns_request.go create mode 100644 go/futureagi/model_dataset_add_empty_rows_request.go create mode 100644 go/futureagi/model_dataset_add_rows_from_existing_request.go create mode 100644 go/futureagi/model_dataset_add_rows_request.go create mode 100644 go/futureagi/model_dataset_behavior_request.go create mode 100644 go/futureagi/model_dataset_cell_data_request.go create mode 100644 go/futureagi/model_dataset_cell_data_response.go create mode 100644 go/futureagi/model_dataset_cell_value.go create mode 100644 go/futureagi/model_dataset_column_detail_item.go create mode 100644 go/futureagi/model_dataset_column_detail_response.go create mode 100644 go/futureagi/model_dataset_column_detail_result.go create mode 100644 go/futureagi/model_dataset_columns_mutation_response.go create mode 100644 go/futureagi/model_dataset_columns_mutation_result.go create mode 100644 go/futureagi/model_dataset_copy_response.go create mode 100644 go/futureagi/model_dataset_copy_result.go create mode 100644 go/futureagi/model_dataset_create_started_response.go create mode 100644 go/futureagi/model_dataset_create_started_result.go create mode 100644 go/futureagi/model_dataset_creation_progress_response.go create mode 100644 go/futureagi/model_dataset_creation_progress_result.go create mode 100644 go/futureagi/model_dataset_derived_variables_response.go create mode 100644 go/futureagi/model_dataset_derived_variables_result.go create mode 100644 go/futureagi/model_dataset_eval_stats_item.go create mode 100644 go/futureagi/model_dataset_eval_stats_metric.go create mode 100644 go/futureagi/model_dataset_eval_stats_response.go create mode 100644 go/futureagi/model_dataset_explanation_summary_response.go create mode 100644 go/futureagi/model_dataset_explanation_summary_response_result.go create mode 100644 go/futureagi/model_dataset_json_schema_response.go create mode 100644 go/futureagi/model_dataset_list_item.go create mode 100644 go/futureagi/model_dataset_list_response.go create mode 100644 go/futureagi/model_dataset_list_result.go create mode 100644 go/futureagi/model_dataset_multiple_static_columns_request.go create mode 100644 go/futureagi/model_dataset_name_item.go create mode 100644 go/futureagi/model_dataset_names_response.go create mode 100644 go/futureagi/model_dataset_names_result.go create mode 100644 go/futureagi/model_dataset_row_data_request.go create mode 100644 go/futureagi/model_dataset_row_data_request_sort_inner.go create mode 100644 go/futureagi/model_dataset_row_data_response.go create mode 100644 go/futureagi/model_dataset_row_data_result.go create mode 100644 go/futureagi/model_dataset_row_diff_request.go create mode 100644 go/futureagi/model_dataset_row_navigation.go create mode 100644 go/futureagi/model_dataset_rows_import_message_response.go create mode 100644 go/futureagi/model_dataset_rows_import_message_result.go create mode 100644 go/futureagi/model_dataset_rows_imported_response.go create mode 100644 go/futureagi/model_dataset_rows_imported_result.go create mode 100644 go/futureagi/model_dataset_run_prompt_stats_prompt.go create mode 100644 go/futureagi/model_dataset_run_prompt_stats_response.go create mode 100644 go/futureagi/model_dataset_run_prompt_stats_result.go create mode 100644 go/futureagi/model_dataset_sdk_rows_code.go create mode 100644 go/futureagi/model_dataset_sdk_rows_request.go create mode 100644 go/futureagi/model_dataset_sdk_rows_response.go create mode 100644 go/futureagi/model_dataset_sdk_rows_result.go create mode 100644 go/futureagi/model_dataset_static_column_request.go create mode 100644 go/futureagi/model_dataset_table_metadata.go create mode 100644 go/futureagi/model_dataset_table_response.go create mode 100644 go/futureagi/model_dataset_table_result.go create mode 100644 go/futureagi/model_dataset_update_cell_value_request.go create mode 100644 go/futureagi/model_dataset_update_column_name_request.go create mode 100644 go/futureagi/model_dataset_update_column_type_request.go create mode 100644 go/futureagi/model_deep_analysis_api_response.go create mode 100644 go/futureagi/model_deep_analysis_body.go create mode 100644 go/futureagi/model_deep_analysis_dispatch_api_response.go create mode 100644 go/futureagi/model_deep_analysis_dispatch_response.go create mode 100644 go/futureagi/model_deep_analysis_response.go create mode 100644 go/futureagi/model_delete_eval_config_response.go create mode 100644 go/futureagi/model_delete_eval_template.go create mode 100644 go/futureagi/model_derived_variable_detail.go create mode 100644 go/futureagi/model_derived_variable_detail_response.go create mode 100644 go/futureagi/model_derived_variable_extract_request.go create mode 100644 go/futureagi/model_derived_variable_preview_request.go create mode 100644 go/futureagi/model_develop_dataset_message_response.go create mode 100644 go/futureagi/model_discussion_comment_request.go create mode 100644 go/futureagi/model_discussion_reaction_request.go create mode 100644 go/futureagi/model_discussion_thread_status_request.go create mode 100644 go/futureagi/model_duplicate_dataset_request.go create mode 100644 go/futureagi/model_duplicate_dataset_response.go create mode 100644 go/futureagi/model_duplicate_dataset_result.go create mode 100644 go/futureagi/model_duplicate_rows_request.go create mode 100644 go/futureagi/model_duplicate_rows_response.go create mode 100644 go/futureagi/model_duplicate_rows_result.go create mode 100644 go/futureagi/model_dynamic_column_create_response.go create mode 100644 go/futureagi/model_dynamic_column_create_result.go create mode 100644 go/futureagi/model_dynamic_column_message_response.go create mode 100644 go/futureagi/model_dynamic_column_message_result.go create mode 100644 go/futureagi/model_edit_run_prompt_column.go create mode 100644 go/futureagi/model_error_localizer_task_response.go create mode 100644 go/futureagi/model_error_name.go create mode 100644 go/futureagi/model_error_response.go create mode 100644 go/futureagi/model_eval_config_definition.go create mode 100644 go/futureagi/model_eval_config_response.go create mode 100644 go/futureagi/model_eval_config_structure.go create mode 100644 go/futureagi/model_eval_config_structure_response.go create mode 100644 go/futureagi/model_eval_config_structure_result.go create mode 100644 go/futureagi/model_eval_config_update_request.go create mode 100644 go/futureagi/model_eval_config_update_response.go create mode 100644 go/futureagi/model_eval_error_response.go create mode 100644 go/futureagi/model_eval_explanation_cluster.go create mode 100644 go/futureagi/model_eval_explanation_summary_refresh_response.go create mode 100644 go/futureagi/model_eval_explanation_summary_refresh_result.go create mode 100644 go/futureagi/model_eval_explanation_summary_response.go create mode 100644 go/futureagi/model_eval_explanation_summary_result.go create mode 100644 go/futureagi/model_eval_feedback_list_item.go create mode 100644 go/futureagi/model_eval_feedback_list_response.go create mode 100644 go/futureagi/model_eval_feedback_list_response_result.go create mode 100644 go/futureagi/model_eval_function_list_response.go create mode 100644 go/futureagi/model_eval_function_list_result.go create mode 100644 go/futureagi/model_eval_list_filters.go create mode 100644 go/futureagi/model_eval_list_request.go create mode 100644 go/futureagi/model_eval_list_response.go create mode 100644 go/futureagi/model_eval_list_result.go create mode 100644 go/futureagi/model_eval_metric_entry.go create mode 100644 go/futureagi/model_eval_preview_response.go create mode 100644 go/futureagi/model_eval_preview_result.go create mode 100644 go/futureagi/model_eval_structure.go create mode 100644 go/futureagi/model_eval_structure_response.go create mode 100644 go/futureagi/model_eval_structure_result.go create mode 100644 go/futureagi/model_eval_summary_comparison_response.go create mode 100644 go/futureagi/model_eval_summary_response.go create mode 100644 go/futureagi/model_eval_template_bulk_delete_request.go create mode 100644 go/futureagi/model_eval_template_bulk_delete_response.go create mode 100644 go/futureagi/model_eval_template_bulk_delete_response_result.go create mode 100644 go/futureagi/model_eval_template_chart_point.go create mode 100644 go/futureagi/model_eval_template_create_response.go create mode 100644 go/futureagi/model_eval_template_create_response_result.go create mode 100644 go/futureagi/model_eval_template_create_v2_request.go create mode 100644 go/futureagi/model_eval_template_detail_response.go create mode 100644 go/futureagi/model_eval_template_detail_response_result.go create mode 100644 go/futureagi/model_eval_template_list_charts_item.go create mode 100644 go/futureagi/model_eval_template_list_charts_request.go create mode 100644 go/futureagi/model_eval_template_list_charts_response.go create mode 100644 go/futureagi/model_eval_template_list_charts_response_result.go create mode 100644 go/futureagi/model_eval_template_list_item.go create mode 100644 go/futureagi/model_eval_template_list_response.go create mode 100644 go/futureagi/model_eval_template_list_response_result.go create mode 100644 go/futureagi/model_eval_template_summary.go create mode 100644 go/futureagi/model_eval_template_update_response.go create mode 100644 go/futureagi/model_eval_template_update_response_result.go create mode 100644 go/futureagi/model_eval_template_update_v2_request.go create mode 100644 go/futureagi/model_eval_template_version_create_request.go create mode 100644 go/futureagi/model_eval_template_version_item.go create mode 100644 go/futureagi/model_eval_template_version_list_response.go create mode 100644 go/futureagi/model_eval_template_version_list_response_result.go create mode 100644 go/futureagi/model_eval_template_version_response.go create mode 100644 go/futureagi/model_eval_template_version_response_result.go create mode 100644 go/futureagi/model_eval_template_version_restore_response.go create mode 100644 go/futureagi/model_eval_template_version_restore_response_result.go create mode 100644 go/futureagi/model_eval_usage_chart_point.go create mode 100644 go/futureagi/model_eval_usage_feedback.go create mode 100644 go/futureagi/model_eval_usage_log_item.go create mode 100644 go/futureagi/model_eval_usage_logs.go create mode 100644 go/futureagi/model_eval_usage_stats.go create mode 100644 go/futureagi/model_eval_usage_stats_response.go create mode 100644 go/futureagi/model_eval_usage_stats_response_result.go create mode 100644 go/futureagi/model_evaluation_result.go create mode 100644 go/futureagi/model_events_over_time_point.go create mode 100644 go/futureagi/model_execute_prompt_simulation_request.go create mode 100644 go/futureagi/model_execute_prompt_simulation_response.go create mode 100644 go/futureagi/model_execute_prompt_simulation_result.go create mode 100644 go/futureagi/model_execute_run_test_.go create mode 100644 go/futureagi/model_execution_metrics.go create mode 100644 go/futureagi/model_execution_runs.go create mode 100644 go/futureagi/model_experiment_comparison_column_metric.go create mode 100644 go/futureagi/model_experiment_comparison_dataset_metric.go create mode 100644 go/futureagi/model_experiment_comparison_detail.go create mode 100644 go/futureagi/model_experiment_comparison_details_response.go create mode 100644 go/futureagi/model_experiment_comparison_details_result.go create mode 100644 go/futureagi/model_experiment_comparison_metrics.go create mode 100644 go/futureagi/model_experiment_comparison_normalized_metrics.go create mode 100644 go/futureagi/model_experiment_comparison_raw_metrics.go create mode 100644 go/futureagi/model_experiment_comparison_weights.go create mode 100644 go/futureagi/model_experiment_comparison_weights_request.go create mode 100644 go/futureagi/model_experiment_create_v2.go create mode 100644 go/futureagi/model_experiment_dataset_comparison_response.go create mode 100644 go/futureagi/model_experiment_dataset_comparison_result.go create mode 100644 go/futureagi/model_experiment_derived_variables_response.go create mode 100644 go/futureagi/model_experiment_derived_variables_result.go create mode 100644 go/futureagi/model_experiment_detail_v2.go create mode 100644 go/futureagi/model_experiment_evaluation_column_stats.go create mode 100644 go/futureagi/model_experiment_evaluation_stats_response.go create mode 100644 go/futureagi/model_experiment_evaluation_stats_result.go create mode 100644 go/futureagi/model_experiment_evaluation_token_usage.go create mode 100644 go/futureagi/model_experiment_feedback_create_response.go create mode 100644 go/futureagi/model_experiment_feedback_create_result.go create mode 100644 go/futureagi/model_experiment_feedback_detail_item.go create mode 100644 go/futureagi/model_experiment_feedback_details_response.go create mode 100644 go/futureagi/model_experiment_feedback_details_result.go create mode 100644 go/futureagi/model_experiment_feedback_submit_request.go create mode 100644 go/futureagi/model_experiment_feedback_submit_response.go create mode 100644 go/futureagi/model_experiment_feedback_submit_result.go create mode 100644 go/futureagi/model_experiment_feedback_template_response.go create mode 100644 go/futureagi/model_experiment_feedback_template_result.go create mode 100644 go/futureagi/model_experiment_json_schema_response.go create mode 100644 go/futureagi/model_experiment_list_v2.go create mode 100644 go/futureagi/model_experiment_name_suggestion_response.go create mode 100644 go/futureagi/model_experiment_name_suggestion_result.go create mode 100644 go/futureagi/model_experiment_name_validation_response.go create mode 100644 go/futureagi/model_experiment_name_validation_result.go create mode 100644 go/futureagi/model_experiment_rerun_cells.go create mode 100644 go/futureagi/model_experiment_rerun_request.go create mode 100644 go/futureagi/model_experiment_row_diff_cell.go create mode 100644 go/futureagi/model_experiment_row_diff_response.go create mode 100644 go/futureagi/model_experiment_stats_column_config.go create mode 100644 go/futureagi/model_experiment_stats_metadata.go create mode 100644 go/futureagi/model_experiment_stats_response.go create mode 100644 go/futureagi/model_experiment_stats_result.go create mode 100644 go/futureagi/model_experiment_stop_response.go create mode 100644 go/futureagi/model_experiment_stop_result.go create mode 100644 go/futureagi/model_experiment_stop_workflows_cancelled.go create mode 100644 go/futureagi/model_experiment_string_result_response.go create mode 100644 go/futureagi/model_experiment_table_rows_column_config.go create mode 100644 go/futureagi/model_experiment_table_rows_metadata.go create mode 100644 go/futureagi/model_experiment_table_rows_response.go create mode 100644 go/futureagi/model_experiment_table_rows_result.go create mode 100644 go/futureagi/model_experiment_update_v2.go create mode 100644 go/futureagi/model_experiment_v2_detail_response.go create mode 100644 go/futureagi/model_experiment_workflow_response.go create mode 100644 go/futureagi/model_experiment_workflow_result.go create mode 100644 go/futureagi/model_extract_entities_request.go create mode 100644 go/futureagi/model_extract_json_column_request.go create mode 100644 go/futureagi/model_failed_rerun_item.go create mode 100644 go/futureagi/model_feed_detail_api_response.go create mode 100644 go/futureagi/model_feed_detail_core.go create mode 100644 go/futureagi/model_feed_list_api_response.go create mode 100644 go/futureagi/model_feed_list_response.go create mode 100644 go/futureagi/model_feed_list_row.go create mode 100644 go/futureagi/model_feed_sidebar.go create mode 100644 go/futureagi/model_feed_sidebar_api_response.go create mode 100644 go/futureagi/model_feed_stats.go create mode 100644 go/futureagi/model_feed_stats_api_response.go create mode 100644 go/futureagi/model_feed_update_body.go create mode 100644 go/futureagi/model_feedback.go create mode 100644 go/futureagi/model_get_annotation_labels_response.go create mode 100644 go/futureagi/model_get_trace_annotation.go create mode 100644 go/futureagi/model_get_trace_annotation_values_response.go create mode 100644 go/futureagi/model_get_trace_annotation_values_result.go create mode 100644 go/futureagi/model_ground_truth_config.go create mode 100644 go/futureagi/model_ground_truth_config_request.go create mode 100644 go/futureagi/model_ground_truth_config_response.go create mode 100644 go/futureagi/model_ground_truth_config_response_result.go create mode 100644 go/futureagi/model_ground_truth_item.go create mode 100644 go/futureagi/model_ground_truth_list_response.go create mode 100644 go/futureagi/model_ground_truth_list_response_result.go create mode 100644 go/futureagi/model_ground_truth_upload_request.go create mode 100644 go/futureagi/model_ground_truth_upload_response.go create mode 100644 go/futureagi/model_ground_truth_upload_response_result.go create mode 100644 go/futureagi/model_heatmap_cell.go create mode 100644 go/futureagi/model_hugging_face_add_rows_request.go create mode 100644 go/futureagi/model_hugging_face_dataset_config_request.go create mode 100644 go/futureagi/model_hugging_face_dataset_config_response.go create mode 100644 go/futureagi/model_hugging_face_dataset_config_result.go create mode 100644 go/futureagi/model_hugging_face_dataset_create_request.go create mode 100644 go/futureagi/model_hugging_face_dataset_detail.go create mode 100644 go/futureagi/model_hugging_face_dataset_detail_request.go create mode 100644 go/futureagi/model_hugging_face_dataset_detail_response.go create mode 100644 go/futureagi/model_hugging_face_dataset_detail_response_result.go create mode 100644 go/futureagi/model_hugging_face_dataset_list_item.go create mode 100644 go/futureagi/model_hugging_face_dataset_list_request.go create mode 100644 go/futureagi/model_hugging_face_dataset_list_response.go create mode 100644 go/futureagi/model_hugging_face_dataset_list_response_result.go create mode 100644 go/futureagi/model_import_annotation_entry.go create mode 100644 go/futureagi/model_import_annotations.go create mode 100644 go/futureagi/model_json_column_schema_entry.go create mode 100644 go/futureagi/model_key_moment.go create mode 100644 go/futureagi/model_legacy_knowledge_base_create_response.go create mode 100644 go/futureagi/model_legacy_knowledge_base_create_result.go create mode 100644 go/futureagi/model_legacy_knowledge_base_file_row.go create mode 100644 go/futureagi/model_legacy_knowledge_base_files_request.go create mode 100644 go/futureagi/model_legacy_knowledge_base_files_response.go create mode 100644 go/futureagi/model_legacy_knowledge_base_files_result.go create mode 100644 go/futureagi/model_legacy_knowledge_base_list_response.go create mode 100644 go/futureagi/model_legacy_knowledge_base_list_result.go create mode 100644 go/futureagi/model_legacy_knowledge_base_mutation_request.go create mode 100644 go/futureagi/model_legacy_knowledge_base_mutation_response.go create mode 100644 go/futureagi/model_legacy_knowledge_base_mutation_result.go create mode 100644 go/futureagi/model_legacy_knowledge_base_option.go create mode 100644 go/futureagi/model_legacy_knowledge_base_sdk_code_response.go create mode 100644 go/futureagi/model_legacy_knowledge_base_sdk_code_result.go create mode 100644 go/futureagi/model_legacy_knowledge_base_table_column.go create mode 100644 go/futureagi/model_legacy_knowledge_base_table_response.go create mode 100644 go/futureagi/model_legacy_knowledge_base_table_result.go create mode 100644 go/futureagi/model_legacy_knowledge_base_table_row.go create mode 100644 go/futureagi/model_list_alert_logs_200_response.go create mode 100644 go/futureagi/model_list_alerts_200_response.go create mode 100644 go/futureagi/model_list_annotation_queue_items_200_response.go create mode 100644 go/futureagi/model_list_annotation_queues_200_response.go create mode 100644 go/futureagi/model_list_experiments_200_response.go create mode 100644 go/futureagi/model_list_personas_200_response.go create mode 100644 go/futureagi/model_list_trace_projects_200_response.go create mode 100644 go/futureagi/model_local_file_dataset_create_started_response.go create mode 100644 go/futureagi/model_local_file_dataset_create_started_result.go create mode 100644 go/futureagi/model_management_api_error_response.go create mode 100644 go/futureagi/model_manual_dataset_create_request.go create mode 100644 go/futureagi/model_manual_dataset_create_response.go create mode 100644 go/futureagi/model_manual_dataset_create_result.go create mode 100644 go/futureagi/model_member_list_item.go create mode 100644 go/futureagi/model_member_list_response.go create mode 100644 go/futureagi/model_member_list_result.go create mode 100644 go/futureagi/model_member_remove.go create mode 100644 go/futureagi/model_member_role_update.go create mode 100644 go/futureagi/model_member_role_update_response.go create mode 100644 go/futureagi/model_member_role_update_result.go create mode 100644 go/futureagi/model_member_user_mutation_response.go create mode 100644 go/futureagi/model_member_user_mutation_result.go create mode 100644 go/futureagi/model_member_workspace_access.go create mode 100644 go/futureagi/model_merge_dataset_request.go create mode 100644 go/futureagi/model_merge_dataset_response.go create mode 100644 go/futureagi/model_merge_dataset_result.go create mode 100644 go/futureagi/model_model_hub_annotation_queues_automation_rules_list_200_response.go create mode 100644 go/futureagi/model_model_hub_api_keys_list_200_response.go create mode 100644 go/futureagi/model_model_hub_error_response.go create mode 100644 go/futureagi/model_model_hub_paginated_response.go create mode 100644 go/futureagi/model_model_hub_prompt_history_executions_list_200_response.go create mode 100644 go/futureagi/model_model_hub_prompt_labels_list_200_response.go create mode 100644 go/futureagi/model_model_hub_prompt_templates_list_200_response.go create mode 100644 go/futureagi/model_model_hub_scores_list_200_response.go create mode 100644 go/futureagi/model_model_hub_string_result_response.go create mode 100644 go/futureagi/model_model_hub_text_error_response.go create mode 100644 go/futureagi/model_observe_graph_data_point.go create mode 100644 go/futureagi/model_observe_graph_data_request.go create mode 100644 go/futureagi/model_observe_graph_data_response.go create mode 100644 go/futureagi/model_observe_graph_data_result.go create mode 100644 go/futureagi/model_optimiser_analysis_refresh_response.go create mode 100644 go/futureagi/model_optimiser_analysis_refresh_result.go create mode 100644 go/futureagi/model_optimiser_analysis_response.go create mode 100644 go/futureagi/model_optimiser_analysis_result_payload.go create mode 100644 go/futureagi/model_organization.go create mode 100644 go/futureagi/model_overview_api_response.go create mode 100644 go/futureagi/model_overview_response.go create mode 100644 go/futureagi/model_pattern_insight.go create mode 100644 go/futureagi/model_pattern_summary.go create mode 100644 go/futureagi/model_performance_summary.go create mode 100644 go/futureagi/model_persona.go create mode 100644 go/futureagi/model_persona_create.go create mode 100644 go/futureagi/model_persona_duplicate_request.go create mode 100644 go/futureagi/model_persona_duplicate_response.go create mode 100644 go/futureagi/model_persona_field_options.go create mode 100644 go/futureagi/model_persona_list.go create mode 100644 go/futureagi/model_preview_dataset_operation_request.go create mode 100644 go/futureagi/model_preview_dataset_operation_response.go create mode 100644 go/futureagi/model_preview_dataset_operation_result.go create mode 100644 go/futureagi/model_preview_dataset_operation_result_item.go create mode 100644 go/futureagi/model_preview_run_eval_request.go create mode 100644 go/futureagi/model_preview_run_prompt.go create mode 100644 go/futureagi/model_project.go create mode 100644 go/futureagi/model_prompt_config.go create mode 100644 go/futureagi/model_prompt_config_entry.go create mode 100644 go/futureagi/model_prompt_derived_variables_response.go create mode 100644 go/futureagi/model_prompt_derived_variables_result.go create mode 100644 go/futureagi/model_prompt_history_execution.go create mode 100644 go/futureagi/model_prompt_label.go create mode 100644 go/futureagi/model_prompt_simulation_list_response.go create mode 100644 go/futureagi/model_prompt_simulation_list_result.go create mode 100644 go/futureagi/model_prompt_simulation_run_response.go create mode 100644 go/futureagi/model_prompt_simulation_scenario_item.go create mode 100644 go/futureagi/model_prompt_simulation_scenarios_response.go create mode 100644 go/futureagi/model_prompt_simulation_scenarios_result.go create mode 100644 go/futureagi/model_prompt_simulation_template_summary.go create mode 100644 go/futureagi/model_prompt_simulation_update_request.go create mode 100644 go/futureagi/model_prompt_template.go create mode 100644 go/futureagi/model_provider_status_item.go create mode 100644 go/futureagi/model_provider_status_response.go create mode 100644 go/futureagi/model_provider_status_result.go create mode 100644 go/futureagi/model_queue_add_items_response.go create mode 100644 go/futureagi/model_queue_add_items_result.go create mode 100644 go/futureagi/model_queue_add_label_response.go create mode 100644 go/futureagi/model_queue_add_label_result.go create mode 100644 go/futureagi/model_queue_agreement_annotator_pair.go create mode 100644 go/futureagi/model_queue_agreement_label.go create mode 100644 go/futureagi/model_queue_agreement_response.go create mode 100644 go/futureagi/model_queue_agreement_result.go create mode 100644 go/futureagi/model_queue_analytics_annotator_performance.go create mode 100644 go/futureagi/model_queue_analytics_response.go create mode 100644 go/futureagi/model_queue_analytics_result.go create mode 100644 go/futureagi/model_queue_analytics_throughput.go create mode 100644 go/futureagi/model_queue_analytics_throughput_daily.go create mode 100644 go/futureagi/model_queue_annotate_detail_response.go create mode 100644 go/futureagi/model_queue_annotate_detail_result.go create mode 100644 go/futureagi/model_queue_annotator_nested.go create mode 100644 go/futureagi/model_queue_assign_items_response.go create mode 100644 go/futureagi/model_queue_assign_items_result.go create mode 100644 go/futureagi/model_queue_bulk_remove_items_response.go create mode 100644 go/futureagi/model_queue_bulk_remove_items_result.go create mode 100644 go/futureagi/model_queue_default_queue.go create mode 100644 go/futureagi/model_queue_default_request.go create mode 100644 go/futureagi/model_queue_default_response.go create mode 100644 go/futureagi/model_queue_default_result.go create mode 100644 go/futureagi/model_queue_discussion_response.go create mode 100644 go/futureagi/model_queue_discussion_result.go create mode 100644 go/futureagi/model_queue_export_annotations_response.go create mode 100644 go/futureagi/model_queue_export_column_mapping.go create mode 100644 go/futureagi/model_queue_export_default_mapping.go create mode 100644 go/futureagi/model_queue_export_field.go create mode 100644 go/futureagi/model_queue_export_fields_response.go create mode 100644 go/futureagi/model_queue_export_fields_result.go create mode 100644 go/futureagi/model_queue_export_to_dataset_request.go create mode 100644 go/futureagi/model_queue_export_to_dataset_response.go create mode 100644 go/futureagi/model_queue_export_to_dataset_result.go create mode 100644 go/futureagi/model_queue_for_source_entry.go create mode 100644 go/futureagi/model_queue_for_source_item.go create mode 100644 go/futureagi/model_queue_for_source_queue.go create mode 100644 go/futureagi/model_queue_for_source_response.go create mode 100644 go/futureagi/model_queue_hard_delete_request.go create mode 100644 go/futureagi/model_queue_hard_delete_response.go create mode 100644 go/futureagi/model_queue_hard_delete_result.go create mode 100644 go/futureagi/model_queue_import_annotations_response.go create mode 100644 go/futureagi/model_queue_import_annotations_result.go create mode 100644 go/futureagi/model_queue_item.go create mode 100644 go/futureagi/model_queue_item_annotations_response.go create mode 100644 go/futureagi/model_queue_item_navigation_request.go create mode 100644 go/futureagi/model_queue_label_nested.go create mode 100644 go/futureagi/model_queue_label_request.go create mode 100644 go/futureagi/model_queue_label_result.go create mode 100644 go/futureagi/model_queue_navigation_response.go create mode 100644 go/futureagi/model_queue_navigation_result.go create mode 100644 go/futureagi/model_queue_next_item_response.go create mode 100644 go/futureagi/model_queue_next_item_result.go create mode 100644 go/futureagi/model_queue_progress_annotator_stat.go create mode 100644 go/futureagi/model_queue_progress_response.go create mode 100644 go/futureagi/model_queue_progress_result.go create mode 100644 go/futureagi/model_queue_progress_user_progress.go create mode 100644 go/futureagi/model_queue_release_reservation_response.go create mode 100644 go/futureagi/model_queue_release_reservation_result.go create mode 100644 go/futureagi/model_queue_remove_label_response.go create mode 100644 go/futureagi/model_queue_remove_label_result.go create mode 100644 go/futureagi/model_queue_review_item_response.go create mode 100644 go/futureagi/model_queue_review_item_result.go create mode 100644 go/futureagi/model_queue_status_request.go create mode 100644 go/futureagi/model_queue_status_response.go create mode 100644 go/futureagi/model_queue_submit_annotations_response.go create mode 100644 go/futureagi/model_queue_submit_annotations_result.go create mode 100644 go/futureagi/model_recommendation.go create mode 100644 go/futureagi/model_representative_trace.go create mode 100644 go/futureagi/model_req_data_config.go create mode 100644 go/futureagi/model_rerun_calls_response.go create mode 100644 go/futureagi/model_rerun_cell_entry.go create mode 100644 go/futureagi/model_review_item_request.go create mode 100644 go/futureagi/model_review_label_comment_request.go create mode 100644 go/futureagi/model_root_cause.go create mode 100644 go/futureagi/model_rules_inner.go create mode 100644 go/futureagi/model_run_new_evals_on_test_execution.go create mode 100644 go/futureagi/model_run_new_evals_response.go create mode 100644 go/futureagi/model_run_prompt_choice_option.go create mode 100644 go/futureagi/model_run_prompt_column_config_response.go create mode 100644 go/futureagi/model_run_prompt_column_config_result.go create mode 100644 go/futureagi/model_run_prompt_column_preview_response.go create mode 100644 go/futureagi/model_run_prompt_column_preview_result.go create mode 100644 go/futureagi/model_run_prompt_options_response.go create mode 100644 go/futureagi/model_run_prompt_options_result.go create mode 100644 go/futureagi/model_run_prompt_tool_option.go create mode 100644 go/futureagi/model_run_test_analytics.go create mode 100644 go/futureagi/model_run_test_call_executions_response.go create mode 100644 go/futureagi/model_run_test_chat_execution_response.go create mode 100644 go/futureagi/model_run_test_chat_execution_result.go create mode 100644 go/futureagi/model_run_test_components_update.go create mode 100644 go/futureagi/model_run_test_error_response.go create mode 100644 go/futureagi/model_run_test_execution_response.go create mode 100644 go/futureagi/model_run_test_kpis_response.go create mode 100644 go/futureagi/model_run_test_message_response.go create mode 100644 go/futureagi/model_run_test_name_response.go create mode 100644 go/futureagi/model_run_test_name_result.go create mode 100644 go/futureagi/model_run_test_response.go create mode 100644 go/futureagi/model_run_test_scenario_item_response.go create mode 100644 go/futureagi/model_scenario_add_columns_request.go create mode 100644 go/futureagi/model_scenario_add_columns_response.go create mode 100644 go/futureagi/model_scenario_add_rows_request.go create mode 100644 go/futureagi/model_scenario_add_rows_response.go create mode 100644 go/futureagi/model_scenario_create_request.go create mode 100644 go/futureagi/model_scenario_create_response.go create mode 100644 go/futureagi/model_scenario_delete_response.go create mode 100644 go/futureagi/model_scenario_detail_response.go create mode 100644 go/futureagi/model_scenario_edit_prompts_request.go create mode 100644 go/futureagi/model_scenario_edit_request.go create mode 100644 go/futureagi/model_scenario_edit_response.go create mode 100644 go/futureagi/model_scenario_error_response.go create mode 100644 go/futureagi/model_scenario_list_response.go create mode 100644 go/futureagi/model_scenario_prompt_item.go create mode 100644 go/futureagi/model_scenario_prompts_update_response.go create mode 100644 go/futureagi/model_scenario_response.go create mode 100644 go/futureagi/model_score.go create mode 100644 go/futureagi/model_score_delete_response.go create mode 100644 go/futureagi/model_score_for_source_response.go create mode 100644 go/futureagi/model_score_response.go create mode 100644 go/futureagi/model_score_trend.go create mode 100644 go/futureagi/model_sdk_configure_evaluations_request.go create mode 100644 go/futureagi/model_sdk_configure_evaluations_response.go create mode 100644 go/futureagi/model_sdk_error_response.go create mode 100644 go/futureagi/model_sdk_eval_template.go create mode 100644 go/futureagi/model_sdk_eval_template_response.go create mode 100644 go/futureagi/model_sdk_get_evals_response.go create mode 100644 go/futureagi/model_sdk_message_result.go create mode 100644 go/futureagi/model_sdk_simulation_analytics_response.go create mode 100644 go/futureagi/model_sdk_simulation_analytics_result.go create mode 100644 go/futureagi/model_sdk_simulation_metrics_response.go create mode 100644 go/futureagi/model_sdk_simulation_metrics_result.go create mode 100644 go/futureagi/model_sdk_simulation_runs_response.go create mode 100644 go/futureagi/model_sdk_simulation_runs_result.go create mode 100644 go/futureagi/model_sdk_standalone_eval_input.go create mode 100644 go/futureagi/model_sdk_standalone_eval_request.go create mode 100644 go/futureagi/model_sdk_standalone_eval_response.go create mode 100644 go/futureagi/model_sdk_standalone_eval_result_item.go create mode 100644 go/futureagi/model_sdk_standalone_eval_v2_request.go create mode 100644 go/futureagi/model_sdk_standalone_eval_v2_response.go create mode 100644 go/futureagi/model_sdk_standalone_eval_v2_result.go create mode 100644 go/futureagi/model_sdkcicd_evaluation_run_accepted.go create mode 100644 go/futureagi/model_sdkcicd_evaluation_run_accepted_response.go create mode 100644 go/futureagi/model_sdkcicd_evaluation_run_summary.go create mode 100644 go/futureagi/model_sdkcicd_evaluation_runs_response.go create mode 100644 go/futureagi/model_sdkcicd_evaluation_runs_result.go create mode 100644 go/futureagi/model_selection.go create mode 100644 go/futureagi/model_send_chat_request.go create mode 100644 go/futureagi/model_session_comparison_response.go create mode 100644 go/futureagi/model_session_comparison_result.go create mode 100644 go/futureagi/model_sidebar_ai_metadata.go create mode 100644 go/futureagi/model_sidebar_timeline.go create mode 100644 go/futureagi/model_simulate_api_personas_field_options_200_response.go create mode 100644 go/futureagi/model_simulate_api_personas_system_personas_200_response.go create mode 100644 go/futureagi/model_simulate_eval_config_response.go create mode 100644 go/futureagi/model_simulator_agent.go create mode 100644 go/futureagi/model_simulator_agent_delete_response.go create mode 100644 go/futureagi/model_simulator_agent_list_response.go create mode 100644 go/futureagi/model_start_evals_process_request.go create mode 100644 go/futureagi/model_stop_user_eval_request.go create mode 100644 go/futureagi/model_submit_annotation_entry.go create mode 100644 go/futureagi/model_submit_annotations.go create mode 100644 go/futureagi/model_switch_workspace.go create mode 100644 go/futureagi/model_switch_workspace_response.go create mode 100644 go/futureagi/model_switch_workspace_result.go create mode 100644 go/futureagi/model_synthetic_data.go create mode 100644 go/futureagi/model_synthetic_dataset_config.go create mode 100644 go/futureagi/model_synthetic_dataset_config_payload.go create mode 100644 go/futureagi/model_synthetic_dataset_config_response.go create mode 100644 go/futureagi/model_synthetic_dataset_config_result.go create mode 100644 go/futureagi/model_synthetic_dataset_create_started_response.go create mode 100644 go/futureagi/model_synthetic_dataset_create_started_result.go create mode 100644 go/futureagi/model_synthetic_dataset_creation.go create mode 100644 go/futureagi/model_synthetic_dataset_update_data.go create mode 100644 go/futureagi/model_synthetic_dataset_update_response.go create mode 100644 go/futureagi/model_synthetic_dataset_update_result.go create mode 100644 go/futureagi/model_test_execution.go create mode 100644 go/futureagi/model_test_execution_analytics.go create mode 100644 go/futureagi/model_test_execution_bulk_delete.go create mode 100644 go/futureagi/model_test_execution_bulk_delete_response.go create mode 100644 go/futureagi/model_test_execution_chat_batch_response.go create mode 100644 go/futureagi/model_test_execution_chat_batch_result.go create mode 100644 go/futureagi/model_test_execution_column_order.go create mode 100644 go/futureagi/model_test_execution_column_order_response.go create mode 100644 go/futureagi/model_test_execution_detail_response.go create mode 100644 go/futureagi/model_test_execution_item_response.go create mode 100644 go/futureagi/model_test_execution_rerun.go create mode 100644 go/futureagi/model_test_execution_rerun_response.go create mode 100644 go/futureagi/model_test_execution_rerun_result.go create mode 100644 go/futureagi/model_test_execution_status_summary.go create mode 100644 go/futureagi/model_test_execution_transcript_call.go create mode 100644 go/futureagi/model_test_execution_transcripts_response.go create mode 100644 go/futureagi/model_trace.go create mode 100644 go/futureagi/model_trace_annotation_note_response.go create mode 100644 go/futureagi/model_trace_annotation_value_response.go create mode 100644 go/futureagi/model_trace_evidence.go create mode 100644 go/futureagi/model_trace_preview.go create mode 100644 go/futureagi/model_trace_session.go create mode 100644 go/futureagi/model_trace_session_graph_data_request.go create mode 100644 go/futureagi/model_trace_summary.go create mode 100644 go/futureagi/model_trace_tags_update.go create mode 100644 go/futureagi/model_tracer_trace_annotation_list_200_response.go create mode 100644 go/futureagi/model_tracer_trace_list_200_response.go create mode 100644 go/futureagi/model_tracer_trace_session_list_200_response.go create mode 100644 go/futureagi/model_traces_aggregates.go create mode 100644 go/futureagi/model_traces_list_row.go create mode 100644 go/futureagi/model_traces_tab_api_response.go create mode 100644 go/futureagi/model_traces_tab_response.go create mode 100644 go/futureagi/model_trend_metric.go create mode 100644 go/futureagi/model_trend_point.go create mode 100644 go/futureagi/model_trends_tab_api_response.go create mode 100644 go/futureagi/model_trends_tab_response.go create mode 100644 go/futureagi/model_update_run_test_.go create mode 100644 go/futureagi/model_user.go create mode 100644 go/futureagi/model_user_alert_monitor.go create mode 100644 go/futureagi/model_user_alert_monitor_duplicate.go create mode 100644 go/futureagi/model_user_alert_monitor_duplicate_response.go create mode 100644 go/futureagi/model_user_alert_monitor_duplicate_result.go create mode 100644 go/futureagi/model_user_alert_monitor_log.go create mode 100644 go/futureagi/model_user_alert_monitor_metric_option.go create mode 100644 go/futureagi/model_user_alert_monitor_metric_options_response.go create mode 100644 go/futureagi/model_user_code_example_response.go create mode 100644 go/futureagi/model_user_eval_mutation_request.go create mode 100644 go/futureagi/model_user_eval_update_request.go create mode 100644 go/futureagi/model_user_info_organization.go create mode 100644 go/futureagi/model_user_info_response.go create mode 100644 go/futureagi/model_user_info_two_factor_methods.go create mode 100644 go/futureagi/model_users_response.go create mode 100644 go/futureagi/model_users_result.go create mode 100644 go/futureagi/model_vector_db_column_request.go create mode 100644 go/futureagi/model_workspace_access_input.go create mode 100644 go/futureagi/model_workspace_admin_summary.go create mode 100644 go/futureagi/model_workspace_list_item_response.go create mode 100644 go/futureagi/model_workspace_list_paginated_response.go create mode 100644 go/futureagi/model_workspace_member_remove.go create mode 100644 go/futureagi/model_workspace_member_role_update.go create mode 100644 go/futureagi/model_workspace_member_role_update_response.go create mode 100644 go/futureagi/model_workspace_member_role_update_result.go create mode 100644 go/futureagi/model_workspace_summary.go create mode 100644 go/futureagi/response.go create mode 100644 go/futureagi/utils.go create mode 100644 java/futureagi/.gitignore create mode 100644 java/futureagi/README.md create mode 100644 java/futureagi/api/openapi.yaml create mode 100644 java/futureagi/build.gradle create mode 100644 java/futureagi/build.sbt create mode 100644 java/futureagi/docs/AccountsApi.md create mode 100644 java/futureagi/docs/AlertsApi.md create mode 100644 java/futureagi/docs/AnnotationQueueDiscussionApi.md create mode 100644 java/futureagi/docs/AnnotationQueueItemsApi.md create mode 100644 java/futureagi/docs/AnnotationQueueReviewApi.md create mode 100644 java/futureagi/docs/AnnotationQueuesApi.md create mode 100644 java/futureagi/docs/DatasetsApi.md create mode 100644 java/futureagi/docs/ExperimentsApi.md create mode 100644 java/futureagi/docs/ModelHubApi.md create mode 100644 java/futureagi/docs/RunTestsEvalConfigsApi.md create mode 100644 java/futureagi/docs/RunTestsEvalSummaryApi.md create mode 100644 java/futureagi/docs/ScenariosApi.md create mode 100644 java/futureagi/docs/SdkApi.md create mode 100644 java/futureagi/docs/SimulateApi.md create mode 100644 java/futureagi/docs/SimulationAgentDefinitionsApi.md create mode 100644 java/futureagi/docs/SimulationPersonasApi.md create mode 100644 java/futureagi/docs/SimulationRunTestsApi.md create mode 100644 java/futureagi/docs/SimulationScenariosApi.md create mode 100644 java/futureagi/docs/SimulationTestExecutionsApi.md create mode 100644 java/futureagi/docs/SimulationsApi.md create mode 100644 java/futureagi/docs/TracerApi.md create mode 100644 java/futureagi/docs/TracingApi.md create mode 100644 java/futureagi/docs/UsersApi.md create mode 100644 java/futureagi/gradle.properties create mode 100644 java/futureagi/gradle/wrapper/gradle-wrapper.jar create mode 100644 java/futureagi/gradle/wrapper/gradle-wrapper.properties create mode 100644 java/futureagi/gradlew create mode 100644 java/futureagi/gradlew.bat create mode 100644 java/futureagi/pom.xml create mode 100644 java/futureagi/settings.gradle create mode 100644 java/futureagi/src/main/AndroidManifest.xml create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/ApiClient.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/ApiException.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/ApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/Configuration.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/JSON.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/Pair.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/RFC3339DateFormat.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/ServerConfiguration.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/ServerVariable.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/AccountsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/AlertsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueDiscussionApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueItemsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueReviewApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueuesApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/DatasetsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/ExperimentsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/ModelHubApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalConfigsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalSummaryApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/ScenariosApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SdkApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SimulateApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationAgentDefinitionsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationPersonasApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationRunTestsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationScenariosApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationTestExecutionsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationsApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/TracerApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/TracingApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/api/UsersApi.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AbstractOpenApiSchema.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AccountsErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddApiColumnRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddAsNewDatasetRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddItems.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddQueueItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddRowsFromFileRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AddRunPrompt.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentFlowGraph.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionActivateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionRestoreResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AllActiveTests.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelRestoreResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationQueue.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryHeader.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationsLabels.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorWithDetailsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ApiKey.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeDetail.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeError.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ApiTextErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AssignItems.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRule.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditions.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInner.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInnerFilterConfig.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateAcceptedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleScope.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationAnnotationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationNoteRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRecordRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoreItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScores.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/BulkRemoveItems.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CICDEvaluationItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CICDJob.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchAnalysisResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchDeviationCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecution.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDetail.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorLocalizerTasksResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionLogsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionRerun.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionStatusUpdate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallLogEntryResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscript.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscriptResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CancelTestExecutionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ChatMessageContract.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCall.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCallFunction.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ClassifyColumnRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CloneDatasetRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CoOccurringIssue.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Column.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnDefinition.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnOrder.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDataset.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetMetadata.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalsListRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareExperimentEvalRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ComparePreviewRunEvalRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompareStartEvalsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalAdhocExecuteRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalUpdateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ConditionalColumnRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ConfigureEvaluations.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromExperimentRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromLocalFileRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateEmptyDatasetRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssue.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreatePromptSimulationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateRunTest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/CreateScore.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Dataset.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddColumnsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyColumnsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyRowsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsFromExistingRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetBehaviorRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellValue.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsMetric.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetJsonSchemaResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetMultipleStaticColumnsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNameItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequestSortInner.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDiffRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowNavigation.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsPrompt.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsCode.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetStaticColumnRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableMetadata.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateCellValueRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnNameRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnTypeRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisBody.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalConfigResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalTemplate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetail.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableExtractRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariablePreviewRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DevelopDatasetMessageResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionCommentRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionReactionRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionThreadStatusRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EditRunPromptColumn.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorLocalizerTaskResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorName.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigDefinition.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructure.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationCluster.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListFilters.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalMetricEntry.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructure.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryComparisonResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateChartPoint.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateV2Request.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateV2Request.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionCreateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageChartPoint.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageFeedback.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogs.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStats.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EvaluationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/EventsOverTimePoint.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExecuteRunTest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionMetrics.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionRuns.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonColumnMetric.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDatasetMetric.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetail.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonMetrics.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonNormalizedMetrics.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonRawMetrics.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeights.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeightsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentCreateV2.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDetailV2.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationColumnStats.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationTokenUsage.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentJsonSchemaResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentListV2.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunCells.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffCell.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsColumnConfig.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsMetadata.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopWorkflowsCancelled.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStringResultResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsColumnConfig.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsMetadata.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentUpdateV2.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentV2DetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractEntitiesRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractJsonColumnRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FailedRerunItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailCore.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListRow.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebar.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebarApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStats.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStatsApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/FeedUpdateBody.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Feedback.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GetAnnotationLabelsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotation.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfig.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HeatmapCell.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceAddRowsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetCreateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetail.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponseResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotationEntry.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotations.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/JsonColumnSchemaEntry.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/KeyMoment.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFileRow.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseOption.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableColumn.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableRow.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlertLogs200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlerts200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueueItems200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueues200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ListExperiments200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ListPersonas200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ListTraceProjects200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ManagementAPIErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRemove.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MemberWorkspaceAccess.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubAnnotationQueuesAutomationRulesList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubApiKeysList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPaginatedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptHistoryExecutionsList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptLabelsList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptTemplatesList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubScoresList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubStringResultResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubTextErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataPoint.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResultPayload.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Organization.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PatternInsight.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PatternSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PerformanceSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Persona.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaCreate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaFieldOptions.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaList.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResultItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunEvalRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunPrompt.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Project.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfig.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfigEntry.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptHistoryExecution.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptLabel.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationRunResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenarioItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationTemplateSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationUpdateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/PromptTemplate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementAnnotatorPair.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementLabel.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsAnnotatorPerformance.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughput.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughputDaily.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotatorNested.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultQueue.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportAnnotationsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportColumnMapping.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportDefaultMapping.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportField.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceEntry.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceQueue.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemAnnotationsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemNavigationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelNested.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressAnnotatorStat.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressUserProgress.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Recommendation.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RepresentativeTrace.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ReqDataConfig.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCallsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCellEntry.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewItemRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewLabelCommentRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RootCause.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RulesInner.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsOnTestExecution.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptChoiceOption.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptToolOption.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestAnalytics.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestCallExecutionsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestComponentsUpdate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestExecutionResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestKPIsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestMessageResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestScenarioItemResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAccepted.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAcceptedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKGetEvalsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKMessageResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalInput.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResultItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Request.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Result.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditPromptsRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioErrorResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptItem.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptsUpdateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Score.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreForSourceResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreTrend.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Selection.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SendChatRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarAIMetadata.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarTimeline.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasFieldOptions200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasSystemPersonas200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateEvalConfigResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgent.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentListResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/StartEvalsProcessRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/StopUserEvalRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotationEntry.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotations.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspace.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticData.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfig.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigPayload.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreation.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateData.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecution.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionAnalytics.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDelete.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDeleteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrder.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrderResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionDetailResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionItemResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerun.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionStatusSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptCall.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/Trace.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationNoteResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationValueResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TraceEvidence.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracePreview.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSession.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSessionGraphDataRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TraceTagsUpdate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceAnnotationList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceSessionList200Response.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracesAggregates.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracesListRow.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TrendMetric.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TrendPoint.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabApiResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UpdateRunTest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/User.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitor.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorLog.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOption.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOptionsResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserCodeExampleResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalMutationRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalUpdateRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoOrganization.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoTwoFactorMethods.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/VectorDBColumnRequest.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAccessInput.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAdminSummary.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListItemResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListPaginatedResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRemove.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdate.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResponse.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResult.java create mode 100644 java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceSummary.java create mode 100644 openapi/sdk/generated/futureagi-sdk.openapi.json create mode 100644 openapi/sdk/generated/futureagi-sdk.operations.txt create mode 100644 openapi/sdk/operation-aliases.json create mode 100644 openapi/sdk/wrapper-map.json create mode 100644 plans/openapi-generated-sdk.md create mode 100644 python/fi/futureagi_client.py create mode 100644 python/fi/generated/__init__.py create mode 100644 python/fi/generated/openapi_client/__init__.py create mode 100644 python/fi/generated/openapi_client/api/__init__.py create mode 100644 python/fi/generated/openapi_client/api/accounts/__init__.py create mode 100644 python/fi/generated/openapi_client/api/accounts/accounts_organization_members_reactivate_create.py create mode 100644 python/fi/generated/openapi_client/api/accounts/accounts_organization_members_remove_delete.py create mode 100644 python/fi/generated/openapi_client/api/accounts/accounts_organization_members_role_create.py create mode 100644 python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_remove_delete.py create mode 100644 python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_role_create.py create mode 100644 python/fi/generated/openapi_client/api/alerts/__init__.py create mode 100644 python/fi/generated/openapi_client/api/alerts/bulk_mute_alerts.py create mode 100644 python/fi/generated/openapi_client/api/alerts/create_alert.py create mode 100644 python/fi/generated/openapi_client/api/alerts/delete_alert.py create mode 100644 python/fi/generated/openapi_client/api/alerts/get_alert.py create mode 100644 python/fi/generated/openapi_client/api/alerts/get_alert_details.py create mode 100644 python/fi/generated/openapi_client/api/alerts/get_alert_graph.py create mode 100644 python/fi/generated/openapi_client/api/alerts/get_alert_log.py create mode 100644 python/fi/generated/openapi_client/api/alerts/list_alert_logs.py create mode 100644 python/fi/generated/openapi_client/api/alerts/list_alert_logs_for_alert.py create mode 100644 python/fi/generated/openapi_client/api/alerts/list_alert_metric_options.py create mode 100644 python/fi/generated/openapi_client/api/alerts/list_alerts.py create mode 100644 python/fi/generated/openapi_client/api/alerts/list_all_alert_logs.py create mode 100644 python/fi/generated/openapi_client/api/alerts/preview_alert_graph.py create mode 100644 python/fi/generated/openapi_client/api/alerts/resolve_alert_logs.py create mode 100644 python/fi/generated/openapi_client/api/alerts/update_alert.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_discussion/__init__.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_discussion/create_annotation_queue_item_comment.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_discussion/list_annotation_queue_item_discussion.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_discussion/reopen_annotation_queue_item_thread.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_discussion/resolve_annotation_queue_item_thread.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_discussion/toggle_annotation_queue_item_comment_reaction.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/__init__.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/add_annotation_queue_items.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/assign_annotation_queue_items.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/complete_annotation_queue_item.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/get_annotation_queue_item_detail.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/get_next_annotation_queue_item.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/import_annotation_queue_item_annotations.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_item_annotations.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_items.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/release_annotation_queue_item.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/remove_annotation_queue_items.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/skip_annotation_queue_item.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_items/submit_annotation_queue_item_annotations.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_review/__init__.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queue_review/review_annotation_queue_item.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/__init__.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/add_annotation_queue_label.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/archive_annotation_queue.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/create_annotation_queue.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue_to_dataset.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_agreement.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_analytics.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_progress.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queue_export_fields.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queues.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/remove_annotation_queue_label.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue.py create mode 100644 python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue_status.py create mode 100644 python/fi/generated/openapi_client/api/datasets/__init__.py create mode 100644 python/fi/generated/openapi_client/api/datasets/add_dataset_columns.py create mode 100644 python/fi/generated/openapi_client/api/datasets/add_dataset_rows.py create mode 100644 python/fi/generated/openapi_client/api/datasets/create_dataset_from_local_file.py create mode 100644 python/fi/generated/openapi_client/api/datasets/create_dataset_manually.py create mode 100644 python/fi/generated/openapi_client/api/datasets/create_empty_dataset.py create mode 100644 python/fi/generated/openapi_client/api/datasets/delete_dataset_column.py create mode 100644 python/fi/generated/openapi_client/api/datasets/delete_dataset_row.py create mode 100644 python/fi/generated/openapi_client/api/datasets/download_dataset.py create mode 100644 python/fi/generated/openapi_client/api/datasets/duplicate_dataset.py create mode 100644 python/fi/generated/openapi_client/api/datasets/get_dataset_annotation_summary.py create mode 100644 python/fi/generated/openapi_client/api/datasets/get_dataset_columns.py create mode 100644 python/fi/generated/openapi_client/api/datasets/get_dataset_eval_stats.py create mode 100644 python/fi/generated/openapi_client/api/datasets/get_dataset_json_schema.py create mode 100644 python/fi/generated/openapi_client/api/datasets/get_dataset_row.py create mode 100644 python/fi/generated/openapi_client/api/datasets/get_dataset_table.py create mode 100644 python/fi/generated/openapi_client/api/datasets/list_dataset_base_columns.py create mode 100644 python/fi/generated/openapi_client/api/datasets/list_dataset_derived_variables.py create mode 100644 python/fi/generated/openapi_client/api/datasets/list_dataset_names.py create mode 100644 python/fi/generated/openapi_client/api/datasets/list_datasets.py create mode 100644 python/fi/generated/openapi_client/api/datasets/update_dataset_cell.py create mode 100644 python/fi/generated/openapi_client/api/experiments/__init__.py create mode 100644 python/fi/generated/openapi_client/api/experiments/compare_experiments.py create mode 100644 python/fi/generated/openapi_client/api/experiments/create_experiment.py create mode 100644 python/fi/generated/openapi_client/api/experiments/delete_experiments.py create mode 100644 python/fi/generated/openapi_client/api/experiments/download_experiment.py create mode 100644 python/fi/generated/openapi_client/api/experiments/get_experiment.py create mode 100644 python/fi/generated/openapi_client/api/experiments/get_experiment_json_schema.py create mode 100644 python/fi/generated/openapi_client/api/experiments/get_experiment_row.py create mode 100644 python/fi/generated/openapi_client/api/experiments/get_experiment_stats.py create mode 100644 python/fi/generated/openapi_client/api/experiments/list_experiment_comparisons.py create mode 100644 python/fi/generated/openapi_client/api/experiments/list_experiment_rows.py create mode 100644 python/fi/generated/openapi_client/api/experiments/list_experiments.py create mode 100644 python/fi/generated/openapi_client/api/experiments/rerun_experiment.py create mode 100644 python/fi/generated/openapi_client/api/experiments/stop_experiment.py create mode 100644 python/fi/generated/openapi_client/api/experiments/update_experiment.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/__init__.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_evaluate.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_preview.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_for_source.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_get_or_create_default.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_hard_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_restore.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_restore.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_api_models_list_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_dataset_run_prompt_stats_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_api_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_vector_db_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_classify_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_add_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_download_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_start_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_get_evals_list_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_preview_run_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_stats_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_conditional_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_duplicate_rows_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_refresh_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_extract_entities_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_detail_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_list_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_merge_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_preview_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_delete_eval_template_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_as_new_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_columns_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_rows_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_multiple_static_columns_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_existing_dataset_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_file_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_huggingface_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_sdk_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_run_prompt_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_static_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_synthetic_data_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_user_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_clone_dataset_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_from_huggingface_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_synthetic_dataset_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_dataset_creation_progress_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_dataset_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_template_eval_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_user_eval_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_and_run_user_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_dataset_behavior_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_run_prompt_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_extract_json_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_cell_data_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_derived_datasets_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_eval_structure_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_evals_list_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_experiment_dataset_table_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_function_list_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_huggingface_dataset_config_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_row_diff_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_prompt_column_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_provider_status_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_column_config_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_options_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_start_evals_process_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_stop_user_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_synthetic_config_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_name_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_type_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_synthetic_config_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_bulk_delete_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_adhoc_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_composite_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_v2_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_detail_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_feedback_list_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_upload_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_charts_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_update_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_usage_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_create_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_restore_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_set_default_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_derived_variables_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_evaluations_stats_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_feedback_details_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_template_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_submit_feedback_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_rerun_cells_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_row_diff_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_suggest_name_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_validate_name_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_get_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_get_execution_details.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_label_by_id.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_multiple_labels.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create_system_labels.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_get_by_name.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_remove_label_from_version.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_set_default.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_template_labels.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_add_new_draft.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_analyze_prompt.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_bulk_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_commit.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_compare_versions.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create_draft.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete_evaluation_config.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_extract_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_preview_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_schema_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_prompt.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_variables.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_all_variables.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_evaluation_configs.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_next_version.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_run_status.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_sdk_code.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_template_by_name.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_improve_prompt.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_retrieve_evaluations.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_evals_on_multiple_versions.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_template.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_name.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_prompt_folder.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_set_default.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_stop_streaming.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update_evaluation_configs.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_versions.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_bulk_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_create.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_delete.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_for_source.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_list.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_read.py create mode 100644 python/fi/generated/openapi_client/api/model_hub/model_hub_scores_update.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_configs/__init__.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_create.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_delete.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_update_create.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_run_new_evals_create.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_summary/__init__.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_comparison_list.py create mode 100644 python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_list.py create mode 100644 python/fi/generated/openapi_client/api/scenarios/__init__.py create mode 100644 python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_columns_create.py create mode 100644 python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_rows_create.py create mode 100644 python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_get_columns_list.py create mode 100644 python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_prompts_update.py create mode 100644 python/fi/generated/openapi_client/api/sdk/__init__.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_configure_evaluations_create.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_read.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_create.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_list.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_get_evals_list.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_create.py create mode 100644 python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/__init__.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_delete.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_activate_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_call_executions_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_create_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_delete_delete.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_eval_summary_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_read.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_restore_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_call_executions_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_personas_field_options.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_personas_system_personas.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_personas_update.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_personas_workspace_personas.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_api_run_tests_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_chat_send_message_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_delete_delete.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_error_localizer_tasks_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_logs_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_read.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_session_comparison_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_call_executions_transcripts_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_export_read.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_prompt_simulations_scenarios_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_delete.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_execute_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_read.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_active_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_chat_execute_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_components_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_delete.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_test_executions_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_eval_configs_get_structure_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_get_id_by_name_read.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_rerun_test_executions_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_scenarios_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_run_tests_sdk_code_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_create_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_delete_delete.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_edit_update.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_read.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_chat_call_executions_batch_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_column_order_update.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_delete_delete.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_refresh_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_list.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_refresh_create.py create mode 100644 python/fi/generated/openapi_client/api/simulate/simulate_test_executions_rerun_calls_create.py create mode 100644 python/fi/generated/openapi_client/api/simulation_agent_definitions/__init__.py create mode 100644 python/fi/generated/openapi_client/api/simulation_agent_definitions/create_agent_definition.py create mode 100644 python/fi/generated/openapi_client/api/simulation_agent_definitions/delete_agent_definition.py create mode 100644 python/fi/generated/openapi_client/api/simulation_agent_definitions/get_agent_definition.py create mode 100644 python/fi/generated/openapi_client/api/simulation_agent_definitions/list_agent_definitions.py create mode 100644 python/fi/generated/openapi_client/api/simulation_agent_definitions/update_agent_definition.py create mode 100644 python/fi/generated/openapi_client/api/simulation_personas/__init__.py create mode 100644 python/fi/generated/openapi_client/api/simulation_personas/create_persona.py create mode 100644 python/fi/generated/openapi_client/api/simulation_personas/delete_persona.py create mode 100644 python/fi/generated/openapi_client/api/simulation_personas/get_persona.py create mode 100644 python/fi/generated/openapi_client/api/simulation_personas/list_personas.py create mode 100644 python/fi/generated/openapi_client/api/simulation_personas/update_persona.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/__init__.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/create_run_test.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/delete_run_test.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/execute_run_test.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_analytics.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_status.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_call_executions.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_executions.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/list_run_tests.py create mode 100644 python/fi/generated/openapi_client/api/simulation_run_tests/update_run_test.py create mode 100644 python/fi/generated/openapi_client/api/simulation_scenarios/__init__.py create mode 100644 python/fi/generated/openapi_client/api/simulation_scenarios/create_scenario.py create mode 100644 python/fi/generated/openapi_client/api/simulation_scenarios/delete_scenario.py create mode 100644 python/fi/generated/openapi_client/api/simulation_scenarios/get_scenario.py create mode 100644 python/fi/generated/openapi_client/api/simulation_scenarios/list_scenarios.py create mode 100644 python/fi/generated/openapi_client/api/simulation_scenarios/update_scenario.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/__init__.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/cancel_test_execution.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_analytics.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_kpis.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_performance_summary.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_transcripts.py create mode 100644 python/fi/generated/openapi_client/api/simulation_test_executions/list_test_executions.py create mode 100644 python/fi/generated/openapi_client/api/simulations/__init__.py create mode 100644 python/fi/generated/openapi_client/api/simulations/get_simulation_analytics.py create mode 100644 python/fi/generated/openapi_client/api/simulations/list_simulation_metrics.py create mode 100644 python/fi/generated/openapi_client/api/simulations/list_simulation_runs.py create mode 100644 python/fi/generated/openapi_client/api/tracer/__init__.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_create_linear_issue_create.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_deep_analysis_create.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_overview_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_root_cause_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_sidebar_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_traces_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_trends_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_agent_graph.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_create.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_delete.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_get_annotation_values.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_read.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_bulk_create.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_compare_traces.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_create.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_delete.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_get_eval_names.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_export_data.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index_observe.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_list_traces_of_session.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_create.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_delete.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_eval_logs.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_session_filter_values.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_trace_session_export_data.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_list.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_session_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_trace_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_create.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_delete.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_partial_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_duplicate.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_list_monitors.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_update.py create mode 100644 python/fi/generated/openapi_client/api/tracer/tracer_users_get_code_example_list.py create mode 100644 python/fi/generated/openapi_client/api/tracing/__init__.py create mode 100644 python/fi/generated/openapi_client/api/tracing/create_bulk_trace_annotation.py create mode 100644 python/fi/generated/openapi_client/api/tracing/get_error_feed_issue.py create mode 100644 python/fi/generated/openapi_client/api/tracing/get_error_feed_issue_stats.py create mode 100644 python/fi/generated/openapi_client/api/tracing/get_trace.py create mode 100644 python/fi/generated/openapi_client/api/tracing/get_trace_graph_methods.py create mode 100644 python/fi/generated/openapi_client/api/tracing/get_trace_session.py create mode 100644 python/fi/generated/openapi_client/api/tracing/get_trace_session_graph_data.py create mode 100644 python/fi/generated/openapi_client/api/tracing/get_voice_call_detail.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_error_feed_issues.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_trace_annotation_labels.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_trace_projects.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_trace_properties.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_trace_sessions.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_trace_users.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_traces.py create mode 100644 python/fi/generated/openapi_client/api/tracing/list_voice_calls.py create mode 100644 python/fi/generated/openapi_client/api/tracing/update_trace_tags.py create mode 100644 python/fi/generated/openapi_client/api/users/__init__.py create mode 100644 python/fi/generated/openapi_client/api/users/get_current_user.py create mode 100644 python/fi/generated/openapi_client/api/users/list_organization_members.py create mode 100644 python/fi/generated/openapi_client/api/users/list_workspace_members.py create mode 100644 python/fi/generated/openapi_client/api/users/list_workspaces.py create mode 100644 python/fi/generated/openapi_client/api/users/switch_workspace.py create mode 100644 python/fi/generated/openapi_client/client.py create mode 100644 python/fi/generated/openapi_client/errors.py create mode 100644 python/fi/generated/openapi_client/models/__init__.py create mode 100644 python/fi/generated/openapi_client/models/accounts_error_response.py create mode 100644 python/fi/generated/openapi_client/models/accounts_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/accounts_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/add_api_column_request.py create mode 100644 python/fi/generated/openapi_client/models/add_api_column_request_config.py create mode 100644 python/fi/generated/openapi_client/models/add_as_new_dataset_request.py create mode 100644 python/fi/generated/openapi_client/models/add_as_new_dataset_request_columns.py create mode 100644 python/fi/generated/openapi_client/models/add_eval_configs_request.py create mode 100644 python/fi/generated/openapi_client/models/add_eval_configs_response.py create mode 100644 python/fi/generated/openapi_client/models/add_items.py create mode 100644 python/fi/generated/openapi_client/models/add_queue_item.py create mode 100644 python/fi/generated/openapi_client/models/add_queue_item_source_type.py create mode 100644 python/fi/generated/openapi_client/models/add_rows_from_file_request.py create mode 100644 python/fi/generated/openapi_client/models/add_run_prompt.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_bulk_delete_request.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_bulk_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_create_request.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_create_request_agent_type.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_create_request_authentication_method.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_create_request_livekit_config_json.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_create_request_model_details.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_create_request_websocket_headers.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_create_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_edit_request.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_edit_request_agent_type.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_edit_request_authentication_method.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_edit_request_livekit_config_json.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_edit_request_model_details.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_edit_request_websocket_headers.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_edit_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_list_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_list_response_agent_type.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_list_response_language.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_list_response_languages.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_list_response_model_details.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_list_response_websocket_headers.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_response_agent_type.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_response_authentication_method.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_response_language.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_response_languages.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_response_model_details.py create mode 100644 python/fi/generated/openapi_client/models/agent_definition_response_websocket_headers.py create mode 100644 python/fi/generated/openapi_client/models/agent_flow_graph.py create mode 100644 python/fi/generated/openapi_client/models/agent_flow_graph_edges_item.py create mode 100644 python/fi/generated/openapi_client/models/agent_flow_graph_nodes_item.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_activate_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_create_request.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_create_request_agent_type.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_create_request_authentication_method.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_create_request_livekit_config_json.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_create_request_model_details.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_create_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_list_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_list_response_status.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_response_configuration_snapshot.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_response_status.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_restore_response.py create mode 100644 python/fi/generated/openapi_client/models/agent_version_restore_response_agent.py create mode 100644 python/fi/generated/openapi_client/models/all_active_tests.py create mode 100644 python/fi/generated/openapi_client/models/all_active_tests_active_tests.py create mode 100644 python/fi/generated/openapi_client/models/annotation_label_response.py create mode 100644 python/fi/generated/openapi_client/models/annotation_label_response_settings.py create mode 100644 python/fi/generated/openapi_client/models/annotation_label_restore_response.py create mode 100644 python/fi/generated/openapi_client/models/annotation_queue.py create mode 100644 python/fi/generated/openapi_client/models/annotation_queue_annotator_roles.py create mode 100644 python/fi/generated/openapi_client/models/annotation_queue_annotator_roles_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/annotation_queue_assignment_strategy.py create mode 100644 python/fi/generated/openapi_client/models/annotation_queue_status.py create mode 100644 python/fi/generated/openapi_client/models/annotation_summary_header.py create mode 100644 python/fi/generated/openapi_client/models/annotation_summary_response.py create mode 100644 python/fi/generated/openapi_client/models/annotation_summary_result.py create mode 100644 python/fi/generated/openapi_client/models/annotation_summary_result_annotators_item.py create mode 100644 python/fi/generated/openapi_client/models/annotation_summary_result_labels_item.py create mode 100644 python/fi/generated/openapi_client/models/annotations_labels.py create mode 100644 python/fi/generated/openapi_client/models/annotations_labels_settings.py create mode 100644 python/fi/generated/openapi_client/models/annotations_labels_type.py create mode 100644 python/fi/generated/openapi_client/models/api_error_response.py create mode 100644 python/fi/generated/openapi_client/models/api_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/api_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/api_error_with_details_response.py create mode 100644 python/fi/generated/openapi_client/models/api_error_with_details_response_details.py create mode 100644 python/fi/generated/openapi_client/models/api_error_with_details_response_type.py create mode 100644 python/fi/generated/openapi_client/models/api_key.py create mode 100644 python/fi/generated/openapi_client/models/api_key_config_json.py create mode 100644 python/fi/generated/openapi_client/models/api_selection_too_large_detail.py create mode 100644 python/fi/generated/openapi_client/models/api_selection_too_large_detail_type.py create mode 100644 python/fi/generated/openapi_client/models/api_selection_too_large_error.py create mode 100644 python/fi/generated/openapi_client/models/api_selection_too_large_error_type.py create mode 100644 python/fi/generated/openapi_client/models/api_text_error_response.py create mode 100644 python/fi/generated/openapi_client/models/api_text_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/api_text_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/assign_items.py create mode 100644 python/fi/generated/openapi_client/models/assign_items_action.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_conditions.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item_filter_config.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_conditions_operator.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_conditions_rules_item.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_evaluate_accepted_response.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_evaluate_response.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_evaluate_result.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_scope.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_source_type.py create mode 100644 python/fi/generated/openapi_client/models/automation_rule_trigger_frequency.py create mode 100644 python/fi/generated/openapi_client/models/base_columns_response.py create mode 100644 python/fi/generated/openapi_client/models/base_columns_response_result.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_annotation_request.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_note_request.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_record_request.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_request.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_response.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_response_result.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_response_result_errors_type_0_item.py create mode 100644 python/fi/generated/openapi_client/models/bulk_annotation_response_result_warnings_type_0_item.py create mode 100644 python/fi/generated/openapi_client/models/bulk_create_score_item.py create mode 100644 python/fi/generated/openapi_client/models/bulk_create_score_item_score_source.py create mode 100644 python/fi/generated/openapi_client/models/bulk_create_score_item_value.py create mode 100644 python/fi/generated/openapi_client/models/bulk_create_scores.py create mode 100644 python/fi/generated/openapi_client/models/bulk_create_scores_response.py create mode 100644 python/fi/generated/openapi_client/models/bulk_create_scores_result.py create mode 100644 python/fi/generated/openapi_client/models/bulk_create_scores_source_type.py create mode 100644 python/fi/generated/openapi_client/models/bulk_remove_items.py create mode 100644 python/fi/generated/openapi_client/models/call_branch_analysis_response.py create mode 100644 python/fi/generated/openapi_client/models/call_branch_analysis_response_analysis.py create mode 100644 python/fi/generated/openapi_client/models/call_branch_deviation_create_response.py create mode 100644 python/fi/generated/openapi_client/models/call_branch_deviation_create_response_deviation_data.py create mode 100644 python/fi/generated/openapi_client/models/call_execution.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_analysis_data.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_call_metadata.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_detail.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_detail_customer_cost_breakdown.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_detail_customer_latency_metrics.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_detail_simulation_call_type.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_detail_status.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_detail_tool_outputs.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_error_localizer_tasks_response.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_error_response.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_eval_outputs.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_evaluation_data.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_logs_response.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_provider_call_data.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_rerun.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_rerun_rerun_type.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_simulation_call_type.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_status.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_status_update.py create mode 100644 python/fi/generated/openapi_client/models/call_execution_status_update_status.py create mode 100644 python/fi/generated/openapi_client/models/call_log_entry_response.py create mode 100644 python/fi/generated/openapi_client/models/call_log_entry_response_attributes.py create mode 100644 python/fi/generated/openapi_client/models/call_log_entry_response_payload.py create mode 100644 python/fi/generated/openapi_client/models/call_transcript.py create mode 100644 python/fi/generated/openapi_client/models/call_transcript_response.py create mode 100644 python/fi/generated/openapi_client/models/call_transcript_speaker_role.py create mode 100644 python/fi/generated/openapi_client/models/cancel_test_execution_response.py create mode 100644 python/fi/generated/openapi_client/models/chat_message_contract.py create mode 100644 python/fi/generated/openapi_client/models/chat_message_contract_metadata.py create mode 100644 python/fi/generated/openapi_client/models/chat_message_contract_role.py create mode 100644 python/fi/generated/openapi_client/models/chat_sdk_code_response.py create mode 100644 python/fi/generated/openapi_client/models/chat_sdk_code_result.py create mode 100644 python/fi/generated/openapi_client/models/chat_send_message_response.py create mode 100644 python/fi/generated/openapi_client/models/chat_send_message_result.py create mode 100644 python/fi/generated/openapi_client/models/chat_tool_call.py create mode 100644 python/fi/generated/openapi_client/models/chat_tool_call_function.py create mode 100644 python/fi/generated/openapi_client/models/cicd_evaluation_item.py create mode 100644 python/fi/generated/openapi_client/models/cicd_evaluation_item_config.py create mode 100644 python/fi/generated/openapi_client/models/cicd_evaluation_item_inputs.py create mode 100644 python/fi/generated/openapi_client/models/cicd_job.py create mode 100644 python/fi/generated/openapi_client/models/classify_column_request.py create mode 100644 python/fi/generated/openapi_client/models/clone_dataset_request.py create mode 100644 python/fi/generated/openapi_client/models/co_occurring_issue.py create mode 100644 python/fi/generated/openapi_client/models/column.py create mode 100644 python/fi/generated/openapi_client/models/column_data_type.py create mode 100644 python/fi/generated/openapi_client/models/column_definition.py create mode 100644 python/fi/generated/openapi_client/models/column_definition_data_type.py create mode 100644 python/fi/generated/openapi_client/models/column_order.py create mode 100644 python/fi/generated/openapi_client/models/column_source.py create mode 100644 python/fi/generated/openapi_client/models/column_type_conversion_response.py create mode 100644 python/fi/generated/openapi_client/models/column_type_conversion_result.py create mode 100644 python/fi/generated/openapi_client/models/column_type_conversion_result_invalid_values_item.py create mode 100644 python/fi/generated/openapi_client/models/column_type_conversion_result_valid_conversion_samples.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_dataset_info.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_delete_result.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_metadata.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_response.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_result.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_result_column_config_item.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_result_table_item.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_row_response.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_row_result.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_row_result_table_item.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_stats_request.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_stats_request_stat_type.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_stats_response.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_stats_response_result.py create mode 100644 python/fi/generated/openapi_client/models/compare_dataset_stats_response_result_additional_property_item.py create mode 100644 python/fi/generated/openapi_client/models/compare_eval_list_response.py create mode 100644 python/fi/generated/openapi_client/models/compare_eval_list_result.py create mode 100644 python/fi/generated/openapi_client/models/compare_eval_list_result_evals_item.py create mode 100644 python/fi/generated/openapi_client/models/compare_evals_list_request.py create mode 100644 python/fi/generated/openapi_client/models/compare_evals_list_request_eval_type.py create mode 100644 python/fi/generated/openapi_client/models/compare_experiment_eval_request.py create mode 100644 python/fi/generated/openapi_client/models/compare_experiment_eval_request_composite_weight_overrides.py create mode 100644 python/fi/generated/openapi_client/models/compare_experiment_eval_request_config.py create mode 100644 python/fi/generated/openapi_client/models/compare_preview_run_eval_request.py create mode 100644 python/fi/generated/openapi_client/models/compare_preview_run_eval_request_config.py create mode 100644 python/fi/generated/openapi_client/models/compare_preview_run_eval_request_dataset_info.py create mode 100644 python/fi/generated/openapi_client/models/compare_start_evals_request.py create mode 100644 python/fi/generated/openapi_client/models/composite_child_item.py create mode 100644 python/fi/generated/openapi_client/models/composite_child_result.py create mode 100644 python/fi/generated/openapi_client/models/composite_child_result_error_localizer_result.py create mode 100644 python/fi/generated/openapi_client/models/composite_child_result_output.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_aggregation_function.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_call_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_child_weights.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_composite_child_axis.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_config.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_input_data_types.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_mapping.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_row_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_session_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_span_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_trace_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_create_request.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_create_request_aggregation_function.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_create_request_child_weights.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_create_request_composite_child_axis.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_create_response.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_create_response_result.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_detail_response_result.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_call_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_config.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_input_data_types.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_mapping.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_row_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_session_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_span_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_request_trace_context.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_response.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_response_result.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_execute_response_result_error_localizer_results.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_update_request.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_update_request_aggregation_function.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_update_request_child_weights.py create mode 100644 python/fi/generated/openapi_client/models/composite_eval_update_request_composite_child_axis.py create mode 100644 python/fi/generated/openapi_client/models/conditional_column_request.py create mode 100644 python/fi/generated/openapi_client/models/conditional_column_request_config_item.py create mode 100644 python/fi/generated/openapi_client/models/configure_evaluations.py create mode 100644 python/fi/generated/openapi_client/models/configure_evaluations_config.py create mode 100644 python/fi/generated/openapi_client/models/configure_evaluations_inputs.py create mode 100644 python/fi/generated/openapi_client/models/create_dataset_from_experiment_request.py create mode 100644 python/fi/generated/openapi_client/models/create_dataset_from_local_file_request.py create mode 100644 python/fi/generated/openapi_client/models/create_empty_dataset_request.py create mode 100644 python/fi/generated/openapi_client/models/create_linear_issue.py create mode 100644 python/fi/generated/openapi_client/models/create_linear_issue_response.py create mode 100644 python/fi/generated/openapi_client/models/create_linear_issue_result.py create mode 100644 python/fi/generated/openapi_client/models/create_prompt_simulation_request.py create mode 100644 python/fi/generated/openapi_client/models/create_run_test.py create mode 100644 python/fi/generated/openapi_client/models/create_score.py create mode 100644 python/fi/generated/openapi_client/models/create_score_score_source.py create mode 100644 python/fi/generated/openapi_client/models/create_score_source_type.py create mode 100644 python/fi/generated/openapi_client/models/create_score_value.py create mode 100644 python/fi/generated/openapi_client/models/dataset.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_columns_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_columns_request_new_columns_data_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_empty_columns_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_empty_rows_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request_column_mapping.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_rows_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_add_rows_request_rows_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_behavior_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_behavior_request_column_config.py create mode 100644 python/fi/generated/openapi_client/models/dataset_behavior_request_dataset_config.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_data_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_data_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_data_response_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_data_response_result_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_value.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_value_cell_value.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_value_feedback_info.py create mode 100644 python/fi/generated/openapi_client/models/dataset_cell_value_value_infos.py create mode 100644 python/fi/generated/openapi_client/models/dataset_column_detail_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_column_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_column_detail_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_columns_mutation_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_columns_mutation_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_copy_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_copy_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_create_started_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_create_started_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_creation_progress_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_creation_progress_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_derived_variables_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_derived_variables_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_derived_variables_result_derived_variables.py create mode 100644 python/fi/generated/openapi_client/models/dataset_eval_stats_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_avg.py create mode 100644 python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_choices_avg.py create mode 100644 python/fi/generated/openapi_client/models/dataset_eval_stats_metric.py create mode 100644 python/fi/generated/openapi_client/models/dataset_eval_stats_metric_output.py create mode 100644 python/fi/generated/openapi_client/models/dataset_eval_stats_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_explanation_summary_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_json_schema_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_json_schema_response_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_list_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_list_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_list_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_model_type.py create mode 100644 python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request_columns_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_name_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_names_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_names_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item_filter_config.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item_type.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_data_result_current.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_diff_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_row_navigation.py create mode 100644 python/fi/generated/openapi_client/models/dataset_rows_import_message_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_rows_import_message_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_rows_imported_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_rows_imported_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_run_prompt_stats_prompt.py create mode 100644 python/fi/generated/openapi_client/models/dataset_run_prompt_stats_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_run_prompt_stats_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_sdk_rows_code.py create mode 100644 python/fi/generated/openapi_client/models/dataset_sdk_rows_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_sdk_rows_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_sdk_rows_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_sdk_rows_result_api_keys.py create mode 100644 python/fi/generated/openapi_client/models/dataset_source.py create mode 100644 python/fi/generated/openapi_client/models/dataset_static_column_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_table_metadata.py create mode 100644 python/fi/generated/openapi_client/models/dataset_table_response.py create mode 100644 python/fi/generated/openapi_client/models/dataset_table_result.py create mode 100644 python/fi/generated/openapi_client/models/dataset_table_result_column_config_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_table_result_dataset_config.py create mode 100644 python/fi/generated/openapi_client/models/dataset_table_result_table_item.py create mode 100644 python/fi/generated/openapi_client/models/dataset_update_cell_value_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_update_column_name_request.py create mode 100644 python/fi/generated/openapi_client/models/dataset_update_column_type_request.py create mode 100644 python/fi/generated/openapi_client/models/deep_analysis_api_response.py create mode 100644 python/fi/generated/openapi_client/models/deep_analysis_body.py create mode 100644 python/fi/generated/openapi_client/models/deep_analysis_dispatch_api_response.py create mode 100644 python/fi/generated/openapi_client/models/deep_analysis_dispatch_response.py create mode 100644 python/fi/generated/openapi_client/models/deep_analysis_response.py create mode 100644 python/fi/generated/openapi_client/models/delete_eval_config_response.py create mode 100644 python/fi/generated/openapi_client/models/delete_eval_template.py create mode 100644 python/fi/generated/openapi_client/models/derived_variable_detail.py create mode 100644 python/fi/generated/openapi_client/models/derived_variable_detail_raw_sample.py create mode 100644 python/fi/generated/openapi_client/models/derived_variable_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/derived_variable_detail_schema.py create mode 100644 python/fi/generated/openapi_client/models/derived_variable_extract_request.py create mode 100644 python/fi/generated/openapi_client/models/derived_variable_preview_request.py create mode 100644 python/fi/generated/openapi_client/models/derived_variable_preview_request_content.py create mode 100644 python/fi/generated/openapi_client/models/develop_dataset_message_response.py create mode 100644 python/fi/generated/openapi_client/models/discussion_comment_request.py create mode 100644 python/fi/generated/openapi_client/models/discussion_reaction_request.py create mode 100644 python/fi/generated/openapi_client/models/discussion_thread_status_request.py create mode 100644 python/fi/generated/openapi_client/models/duplicate_dataset_request.py create mode 100644 python/fi/generated/openapi_client/models/duplicate_dataset_response.py create mode 100644 python/fi/generated/openapi_client/models/duplicate_dataset_result.py create mode 100644 python/fi/generated/openapi_client/models/duplicate_rows_request.py create mode 100644 python/fi/generated/openapi_client/models/duplicate_rows_response.py create mode 100644 python/fi/generated/openapi_client/models/duplicate_rows_result.py create mode 100644 python/fi/generated/openapi_client/models/dynamic_column_create_response.py create mode 100644 python/fi/generated/openapi_client/models/dynamic_column_create_result.py create mode 100644 python/fi/generated/openapi_client/models/dynamic_column_message_response.py create mode 100644 python/fi/generated/openapi_client/models/dynamic_column_message_result.py create mode 100644 python/fi/generated/openapi_client/models/edit_run_prompt_column.py create mode 100644 python/fi/generated/openapi_client/models/empty_request.py create mode 100644 python/fi/generated/openapi_client/models/error_localizer_task_response.py create mode 100644 python/fi/generated/openapi_client/models/error_localizer_task_response_error_analysis.py create mode 100644 python/fi/generated/openapi_client/models/error_localizer_task_response_eval_result.py create mode 100644 python/fi/generated/openapi_client/models/error_localizer_task_response_input_data.py create mode 100644 python/fi/generated/openapi_client/models/error_localizer_task_response_input_keys.py create mode 100644 python/fi/generated/openapi_client/models/error_localizer_task_response_input_types.py create mode 100644 python/fi/generated/openapi_client/models/error_name.py create mode 100644 python/fi/generated/openapi_client/models/error_response.py create mode 100644 python/fi/generated/openapi_client/models/error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_definition.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_definition_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_definition_filters_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_definition_filters_item_filter_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_definition_mapping.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_response_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_response_filters.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_response_mapping.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_response_model.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_response_status.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_config_params_desc.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_config_params_option.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_eval_tags.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_function_params_schema.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_mapping.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_models.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_output.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_params.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_structure_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_update_request.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_update_request_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_update_request_mapping.py create mode 100644 python/fi/generated/openapi_client/models/eval_config_update_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_error_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/eval_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/eval_explanation_cluster.py create mode 100644 python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_explanation_summary_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_explanation_summary_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_explanation_summary_result_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_feedback_list_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_feedback_list_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_feedback_list_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_function_list_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_function_list_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_function_list_result_functions_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_filters.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_filters_eval_type_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_filters_output_type_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_filters_template_type_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_request.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_request_owner_filter.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_request_sort_by.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_request_sort_order.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_list_result_evals_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_metric_entry.py create mode 100644 python/fi/generated/openapi_client/models/eval_metric_entry_composite_weight_overrides.py create mode 100644 python/fi/generated/openapi_client/models/eval_metric_entry_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_preview_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_preview_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_preview_result_responses_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_choices.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_config_params_desc.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_config_params_option.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_function_params_schema.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_mapping.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_models.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_output.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_params.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_structure_run_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_summary_comparison_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_summary_comparison_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_summary_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_bulk_delete_request.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_bulk_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_bulk_delete_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_chart_point.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_choice_scores.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_code_language.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_data_injection.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_eval_type.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_few_shot_examples_type_0_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_messages_type_0_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_mode.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_output_type.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_summary.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_template_format.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_create_v2_request_tools.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_detail_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_detail_response_result_choice_scores.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_detail_response_result_choices.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_detail_response_result_config.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_charts_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_charts_request.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_charts_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_charts_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_charts_response_result_charts.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_list_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_summary.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_summary_output.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_choice_scores.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_code_language.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_data_injection.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_eval_type.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_few_shot_examples_type_0_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_messages_type_0_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_mode.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_output_type.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_summary.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_template_format.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_update_v2_request_tools.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_create_request.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_create_request_config_snapshot.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_item_config_snapshot.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_list_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_list_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_restore_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_template_version_restore_response_result.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_chart_point.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_feedback.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_feedback_value.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_log_item.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_log_item_detail.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_logs.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_stats.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_stats_response.py create mode 100644 python/fi/generated/openapi_client/models/eval_usage_stats_response_result.py create mode 100644 python/fi/generated/openapi_client/models/evaluation_result.py create mode 100644 python/fi/generated/openapi_client/models/events_over_time_point.py create mode 100644 python/fi/generated/openapi_client/models/execute_prompt_simulation_request.py create mode 100644 python/fi/generated/openapi_client/models/execute_prompt_simulation_response.py create mode 100644 python/fi/generated/openapi_client/models/execute_prompt_simulation_result.py create mode 100644 python/fi/generated/openapi_client/models/execute_run_test.py create mode 100644 python/fi/generated/openapi_client/models/execution_metrics.py create mode 100644 python/fi/generated/openapi_client/models/execution_metrics_status.py create mode 100644 python/fi/generated/openapi_client/models/execution_runs.py create mode 100644 python/fi/generated/openapi_client/models/execution_runs_status.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_column_metric.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_column_metric_avg_score.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric_normalized_scores.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_detail.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_detail_scores_weight.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_details_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_details_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_metrics.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_normalized_metrics.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_raw_metrics.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_weights.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_weights_request.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_weights_request_weights.py create mode 100644 python/fi/generated/openapi_client/models/experiment_comparison_weights_scores.py create mode 100644 python/fi/generated/openapi_client/models/experiment_create_v2.py create mode 100644 python/fi/generated/openapi_client/models/experiment_create_v2_experiment_type.py create mode 100644 python/fi/generated/openapi_client/models/experiment_dataset_comparison_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_dataset_comparison_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_dataset_comparison_result_weights_applied.py create mode 100644 python/fi/generated/openapi_client/models/experiment_derived_variables_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_derived_variables_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_derived_variables_result_derived_variables.py create mode 100644 python/fi/generated/openapi_client/models/experiment_detail_v2.py create mode 100644 python/fi/generated/openapi_client/models/experiment_detail_v2_experiment_type.py create mode 100644 python/fi/generated/openapi_client/models/experiment_detail_v2_status.py create mode 100644 python/fi/generated/openapi_client/models/experiment_evaluation_column_stats.py create mode 100644 python/fi/generated/openapi_client/models/experiment_evaluation_column_stats_avg_score.py create mode 100644 python/fi/generated/openapi_client/models/experiment_evaluation_stats_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_evaluation_stats_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_evaluation_token_usage.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_create_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_create_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_detail_item.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_detail_item_value.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_details_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_details_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_submit_request.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_submit_request_action_type.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_submit_request_value.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_submit_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_submit_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_template_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_feedback_template_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_json_schema_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_json_schema_response_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_list_v2.py create mode 100644 python/fi/generated/openapi_client/models/experiment_list_v2_experiment_type.py create mode 100644 python/fi/generated/openapi_client/models/experiment_list_v2_status.py create mode 100644 python/fi/generated/openapi_client/models/experiment_name_suggestion_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_name_suggestion_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_name_validation_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_name_validation_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_rerun_cells.py create mode 100644 python/fi/generated/openapi_client/models/experiment_rerun_request.py create mode 100644 python/fi/generated/openapi_client/models/experiment_row_diff_cell.py create mode 100644 python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_diff_value.py create mode 100644 python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_value.py create mode 100644 python/fi/generated/openapi_client/models/experiment_row_diff_cell_value_infos.py create mode 100644 python/fi/generated/openapi_client/models/experiment_row_diff_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_row_diff_response_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_row_diff_response_result_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stats_column_config.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stats_metadata.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stats_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stats_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stats_result_table_data_item.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stop_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stop_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_stop_workflows_cancelled.py create mode 100644 python/fi/generated/openapi_client/models/experiment_string_result_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_column_config.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_column_config_average_score.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_column_config_choices_map.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_column_config_group.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_metadata.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_metadata_description.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_result.py create mode 100644 python/fi/generated/openapi_client/models/experiment_table_rows_result_table_item.py create mode 100644 python/fi/generated/openapi_client/models/experiment_update_v2.py create mode 100644 python/fi/generated/openapi_client/models/experiment_v2_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_workflow_response.py create mode 100644 python/fi/generated/openapi_client/models/experiment_workflow_result.py create mode 100644 python/fi/generated/openapi_client/models/export_annotation_queue_export_format.py create mode 100644 python/fi/generated/openapi_client/models/extract_entities_request.py create mode 100644 python/fi/generated/openapi_client/models/extract_json_column_request.py create mode 100644 python/fi/generated/openapi_client/models/failed_rerun_item.py create mode 100644 python/fi/generated/openapi_client/models/feed_detail_api_response.py create mode 100644 python/fi/generated/openapi_client/models/feed_detail_core.py create mode 100644 python/fi/generated/openapi_client/models/feed_list_api_response.py create mode 100644 python/fi/generated/openapi_client/models/feed_list_response.py create mode 100644 python/fi/generated/openapi_client/models/feed_list_row.py create mode 100644 python/fi/generated/openapi_client/models/feed_sidebar.py create mode 100644 python/fi/generated/openapi_client/models/feed_sidebar_api_response.py create mode 100644 python/fi/generated/openapi_client/models/feed_stats.py create mode 100644 python/fi/generated/openapi_client/models/feed_stats_api_response.py create mode 100644 python/fi/generated/openapi_client/models/feed_update_body.py create mode 100644 python/fi/generated/openapi_client/models/feed_update_body_severity.py create mode 100644 python/fi/generated/openapi_client/models/feed_update_body_status.py create mode 100644 python/fi/generated/openapi_client/models/feedback.py create mode 100644 python/fi/generated/openapi_client/models/feedback_source.py create mode 100644 python/fi/generated/openapi_client/models/get_annotation_labels_response.py create mode 100644 python/fi/generated/openapi_client/models/get_trace_annotation.py create mode 100644 python/fi/generated/openapi_client/models/get_trace_annotation_values_response.py create mode 100644 python/fi/generated/openapi_client/models/get_trace_annotation_values_result.py create mode 100644 python/fi/generated/openapi_client/models/get_voice_call_detail_response_200.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_config.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_config_request.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_config_request_injection_format.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_config_request_mode.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_config_response.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_config_response_result.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_item.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_item_role_mapping.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_item_variable_mapping.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_list_response.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_list_response_result.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_upload_request.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_upload_request_data_item.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_upload_request_role_mapping.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_upload_request_variable_mapping.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_upload_response.py create mode 100644 python/fi/generated/openapi_client/models/ground_truth_upload_response_result.py create mode 100644 python/fi/generated/openapi_client/models/heatmap_cell.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_add_rows_request.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_config_request.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_config_response.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_config_result.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_config_result_dataset_info.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_create_request.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_detail.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_detail_request.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response_result.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_list_item.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_list_request.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_list_request_filter_params.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_list_response.py create mode 100644 python/fi/generated/openapi_client/models/hugging_face_dataset_list_response_result.py create mode 100644 python/fi/generated/openapi_client/models/import_annotation_entry.py create mode 100644 python/fi/generated/openapi_client/models/import_annotation_entry_value.py create mode 100644 python/fi/generated/openapi_client/models/import_annotations.py create mode 100644 python/fi/generated/openapi_client/models/json_column_schema_entry.py create mode 100644 python/fi/generated/openapi_client/models/json_column_schema_entry_sample.py create mode 100644 python/fi/generated/openapi_client/models/key_moment.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_create_response.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_create_result.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_file_row.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request_sort_item.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_files_response.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_files_result.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_list_response.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_list_result.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_request.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_response.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_result.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_option.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_response.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_result.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_table_column.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_table_response.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_table_result.py create mode 100644 python/fi/generated/openapi_client/models/legacy_knowledge_base_table_row.py create mode 100644 python/fi/generated/openapi_client/models/list_agent_definitions_agent_type.py create mode 100644 python/fi/generated/openapi_client/models/list_alert_logs_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_alerts_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_all_alert_logs_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_annotation_queue_items_ordering.py create mode 100644 python/fi/generated/openapi_client/models/list_annotation_queue_items_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_annotation_queues_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_error_feed_issues_sort_by.py create mode 100644 python/fi/generated/openapi_client/models/list_error_feed_issues_sort_dir.py create mode 100644 python/fi/generated/openapi_client/models/list_error_feed_issues_source.py create mode 100644 python/fi/generated/openapi_client/models/list_error_feed_issues_status.py create mode 100644 python/fi/generated/openapi_client/models/list_experiments_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_organization_members_filter_status_item.py create mode 100644 python/fi/generated/openapi_client/models/list_organization_members_sort.py create mode 100644 python/fi/generated/openapi_client/models/list_personas_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_run_tests_simulation_type.py create mode 100644 python/fi/generated/openapi_client/models/list_trace_projects_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_trace_properties_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_trace_sessions_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_traces_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_voice_calls_response_200.py create mode 100644 python/fi/generated/openapi_client/models/list_workspace_members_filter_status_item.py create mode 100644 python/fi/generated/openapi_client/models/list_workspace_members_sort.py create mode 100644 python/fi/generated/openapi_client/models/local_file_dataset_create_started_response.py create mode 100644 python/fi/generated/openapi_client/models/local_file_dataset_create_started_result.py create mode 100644 python/fi/generated/openapi_client/models/management_api_error_response.py create mode 100644 python/fi/generated/openapi_client/models/management_api_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/management_api_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/manual_dataset_create_request.py create mode 100644 python/fi/generated/openapi_client/models/manual_dataset_create_response.py create mode 100644 python/fi/generated/openapi_client/models/manual_dataset_create_result.py create mode 100644 python/fi/generated/openapi_client/models/member_list_item.py create mode 100644 python/fi/generated/openapi_client/models/member_list_item_type.py create mode 100644 python/fi/generated/openapi_client/models/member_list_response.py create mode 100644 python/fi/generated/openapi_client/models/member_list_result.py create mode 100644 python/fi/generated/openapi_client/models/member_remove.py create mode 100644 python/fi/generated/openapi_client/models/member_role_update.py create mode 100644 python/fi/generated/openapi_client/models/member_role_update_org_level.py create mode 100644 python/fi/generated/openapi_client/models/member_role_update_response.py create mode 100644 python/fi/generated/openapi_client/models/member_role_update_result.py create mode 100644 python/fi/generated/openapi_client/models/member_role_update_result_changes.py create mode 100644 python/fi/generated/openapi_client/models/member_role_update_ws_level.py create mode 100644 python/fi/generated/openapi_client/models/member_user_mutation_response.py create mode 100644 python/fi/generated/openapi_client/models/member_user_mutation_result.py create mode 100644 python/fi/generated/openapi_client/models/member_workspace_access.py create mode 100644 python/fi/generated/openapi_client/models/merge_dataset_request.py create mode 100644 python/fi/generated/openapi_client/models/merge_dataset_response.py create mode 100644 python/fi/generated/openapi_client/models/merge_dataset_result.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_annotation_queues_automation_rules_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_annotation_queues_for_source_source_type.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_annotations_labels_list_type.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_api_keys_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_develops_get_eval_structure_read_eval_type.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_empty_request.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_error_response.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_paginated_response.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_paginated_response_results_item.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_get_execution_details_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_prompt_labels_get_by_name_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_prompt_labels_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_prompt_labels_template_labels_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_prompt_templates_get_template_by_name_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_prompt_templates_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_scores_for_source_source_type.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_scores_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_scores_list_source_type.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_string_result_response.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_text_error_response.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_text_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/model_hub_text_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_point.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_request.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item_filter_config.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_request_interval.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config_type.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_response.py create mode 100644 python/fi/generated/openapi_client/models/observe_graph_data_result.py create mode 100644 python/fi/generated/openapi_client/models/optimiser_analysis_refresh_response.py create mode 100644 python/fi/generated/openapi_client/models/optimiser_analysis_refresh_result.py create mode 100644 python/fi/generated/openapi_client/models/optimiser_analysis_response.py create mode 100644 python/fi/generated/openapi_client/models/optimiser_analysis_result_payload.py create mode 100644 python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response.py create mode 100644 python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/organization.py create mode 100644 python/fi/generated/openapi_client/models/overview_api_response.py create mode 100644 python/fi/generated/openapi_client/models/overview_response.py create mode 100644 python/fi/generated/openapi_client/models/pattern_insight.py create mode 100644 python/fi/generated/openapi_client/models/pattern_summary.py create mode 100644 python/fi/generated/openapi_client/models/performance_summary.py create mode 100644 python/fi/generated/openapi_client/models/performance_summary_test_run_performance_metrics.py create mode 100644 python/fi/generated/openapi_client/models/performance_summary_top_performing_scenarios_item.py create mode 100644 python/fi/generated/openapi_client/models/persona.py create mode 100644 python/fi/generated/openapi_client/models/persona_accent.py create mode 100644 python/fi/generated/openapi_client/models/persona_age_group.py create mode 100644 python/fi/generated/openapi_client/models/persona_communication_style.py create mode 100644 python/fi/generated/openapi_client/models/persona_conversation_speed.py create mode 100644 python/fi/generated/openapi_client/models/persona_create.py create mode 100644 python/fi/generated/openapi_client/models/persona_create_custom_properties.py create mode 100644 python/fi/generated/openapi_client/models/persona_custom_properties.py create mode 100644 python/fi/generated/openapi_client/models/persona_duplicate_request.py create mode 100644 python/fi/generated/openapi_client/models/persona_duplicate_response.py create mode 100644 python/fi/generated/openapi_client/models/persona_emoji_usage.py create mode 100644 python/fi/generated/openapi_client/models/persona_field_options.py create mode 100644 python/fi/generated/openapi_client/models/persona_finished_speaking_sensitivity.py create mode 100644 python/fi/generated/openapi_client/models/persona_gender.py create mode 100644 python/fi/generated/openapi_client/models/persona_interrupt_sensitivity.py create mode 100644 python/fi/generated/openapi_client/models/persona_keywords.py create mode 100644 python/fi/generated/openapi_client/models/persona_languages.py create mode 100644 python/fi/generated/openapi_client/models/persona_list.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_accent.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_age_group.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_communication_style.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_conversation_speed.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_emoji_usage.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_finished_speaking_sensitivity.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_gender.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_interrupt_sensitivity.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_keywords.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_languages.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_location.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_metadata.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_occupation.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_persona_type.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_personality.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_punctuation.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_regional_mix.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_slang_usage.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_tone.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_typos_frequency.py create mode 100644 python/fi/generated/openapi_client/models/persona_list_verbosity.py create mode 100644 python/fi/generated/openapi_client/models/persona_location.py create mode 100644 python/fi/generated/openapi_client/models/persona_metadata.py create mode 100644 python/fi/generated/openapi_client/models/persona_occupation.py create mode 100644 python/fi/generated/openapi_client/models/persona_persona_type.py create mode 100644 python/fi/generated/openapi_client/models/persona_personality.py create mode 100644 python/fi/generated/openapi_client/models/persona_punctuation.py create mode 100644 python/fi/generated/openapi_client/models/persona_regional_mix.py create mode 100644 python/fi/generated/openapi_client/models/persona_simulation_type.py create mode 100644 python/fi/generated/openapi_client/models/persona_slang_usage.py create mode 100644 python/fi/generated/openapi_client/models/persona_tone.py create mode 100644 python/fi/generated/openapi_client/models/persona_typos_frequency.py create mode 100644 python/fi/generated/openapi_client/models/persona_verbosity.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_request.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_request_config.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_response.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_result.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_result_item.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_details.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_input.py create mode 100644 python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_output.py create mode 100644 python/fi/generated/openapi_client/models/preview_run_eval_request.py create mode 100644 python/fi/generated/openapi_client/models/preview_run_eval_request_config.py create mode 100644 python/fi/generated/openapi_client/models/preview_run_prompt.py create mode 100644 python/fi/generated/openapi_client/models/project.py create mode 100644 python/fi/generated/openapi_client/models/project_config.py create mode 100644 python/fi/generated/openapi_client/models/project_metadata.py create mode 100644 python/fi/generated/openapi_client/models/project_model_type.py create mode 100644 python/fi/generated/openapi_client/models/project_session_config.py create mode 100644 python/fi/generated/openapi_client/models/project_source.py create mode 100644 python/fi/generated/openapi_client/models/project_tags.py create mode 100644 python/fi/generated/openapi_client/models/project_trace_type.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_entry.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_entry_configuration.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_entry_messages_item.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_entry_model.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_entry_model_params.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_messages_item.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_output_format.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_response_format.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_run_prompt_config.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_tool_choice.py create mode 100644 python/fi/generated/openapi_client/models/prompt_config_tools_type_0_item.py create mode 100644 python/fi/generated/openapi_client/models/prompt_derived_variables_response.py create mode 100644 python/fi/generated/openapi_client/models/prompt_derived_variables_result.py create mode 100644 python/fi/generated/openapi_client/models/prompt_derived_variables_result_derived_variables.py create mode 100644 python/fi/generated/openapi_client/models/prompt_history_execution.py create mode 100644 python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_configs.py create mode 100644 python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_results.py create mode 100644 python/fi/generated/openapi_client/models/prompt_history_execution_metadata.py create mode 100644 python/fi/generated/openapi_client/models/prompt_history_execution_output.py create mode 100644 python/fi/generated/openapi_client/models/prompt_history_execution_placeholders.py create mode 100644 python/fi/generated/openapi_client/models/prompt_label.py create mode 100644 python/fi/generated/openapi_client/models/prompt_label_metadata.py create mode 100644 python/fi/generated/openapi_client/models/prompt_label_type.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_list_response.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_list_result.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_run_response.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_scenario_item.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_scenarios_response.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_scenarios_result.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_template_summary.py create mode 100644 python/fi/generated/openapi_client/models/prompt_simulation_update_request.py create mode 100644 python/fi/generated/openapi_client/models/prompt_template.py create mode 100644 python/fi/generated/openapi_client/models/prompt_template_placeholders.py create mode 100644 python/fi/generated/openapi_client/models/prompt_template_variable_names.py create mode 100644 python/fi/generated/openapi_client/models/provider_status_item.py create mode 100644 python/fi/generated/openapi_client/models/provider_status_response.py create mode 100644 python/fi/generated/openapi_client/models/provider_status_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_add_items_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_add_items_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_add_label_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_add_label_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_agreement_annotator_pair.py create mode 100644 python/fi/generated/openapi_client/models/queue_agreement_label.py create mode 100644 python/fi/generated/openapi_client/models/queue_agreement_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_agreement_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_agreement_result_labels.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_annotator_performance.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_result_status_breakdown.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_throughput.py create mode 100644 python/fi/generated/openapi_client/models/queue_analytics_throughput_daily.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_annotations_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_labels_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_progress.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_queue.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_comments_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_threads_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotate_detail_result_span_notes_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_annotator_nested.py create mode 100644 python/fi/generated/openapi_client/models/queue_assign_items_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_assign_items_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_bulk_remove_items_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_bulk_remove_items_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_default_queue.py create mode 100644 python/fi/generated/openapi_client/models/queue_default_request.py create mode 100644 python/fi/generated/openapi_client/models/queue_default_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_default_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_default_result_action.py create mode 100644 python/fi/generated/openapi_client/models/queue_discussion_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_discussion_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_discussion_result_comment.py create mode 100644 python/fi/generated/openapi_client/models/queue_discussion_result_review_comments_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_discussion_result_review_threads_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_discussion_result_thread.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_annotations_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_annotations_response_result_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_column_mapping.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_default_mapping.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_field.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_fields_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_fields_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_to_dataset_request.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_to_dataset_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_export_to_dataset_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_entry.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_entry_existing_label_notes.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_entry_span_notes_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_queue.py create mode 100644 python/fi/generated/openapi_client/models/queue_for_source_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_hard_delete_request.py create mode 100644 python/fi/generated/openapi_client/models/queue_hard_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_hard_delete_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_import_annotations_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_import_annotations_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_item_annotations_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_item_metadata.py create mode 100644 python/fi/generated/openapi_client/models/queue_item_navigation_request.py create mode 100644 python/fi/generated/openapi_client/models/queue_item_source_type.py create mode 100644 python/fi/generated/openapi_client/models/queue_item_status.py create mode 100644 python/fi/generated/openapi_client/models/queue_label_nested.py create mode 100644 python/fi/generated/openapi_client/models/queue_label_request.py create mode 100644 python/fi/generated/openapi_client/models/queue_label_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_label_result_settings.py create mode 100644 python/fi/generated/openapi_client/models/queue_navigation_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_navigation_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_navigation_result_next_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_next_item_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_next_item_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_next_item_result_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_progress_annotator_stat.py create mode 100644 python/fi/generated/openapi_client/models/queue_progress_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_progress_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_progress_user_progress.py create mode 100644 python/fi/generated/openapi_client/models/queue_release_reservation_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_release_reservation_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_remove_label_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_remove_label_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_review_item_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_review_item_result.py create mode 100644 python/fi/generated/openapi_client/models/queue_review_item_result_next_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_review_item_result_review_comments_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_review_item_result_review_threads_item.py create mode 100644 python/fi/generated/openapi_client/models/queue_status_request.py create mode 100644 python/fi/generated/openapi_client/models/queue_status_request_status.py create mode 100644 python/fi/generated/openapi_client/models/queue_status_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_submit_annotations_response.py create mode 100644 python/fi/generated/openapi_client/models/queue_submit_annotations_result.py create mode 100644 python/fi/generated/openapi_client/models/recommendation.py create mode 100644 python/fi/generated/openapi_client/models/representative_trace.py create mode 100644 python/fi/generated/openapi_client/models/representative_trace_recommendations_item.py create mode 100644 python/fi/generated/openapi_client/models/representative_trace_root_causes_item.py create mode 100644 python/fi/generated/openapi_client/models/representative_trace_what_changed.py create mode 100644 python/fi/generated/openapi_client/models/rerun_calls_response.py create mode 100644 python/fi/generated/openapi_client/models/rerun_cell_entry.py create mode 100644 python/fi/generated/openapi_client/models/review_item_request.py create mode 100644 python/fi/generated/openapi_client/models/review_item_request_action.py create mode 100644 python/fi/generated/openapi_client/models/review_label_comment_request.py create mode 100644 python/fi/generated/openapi_client/models/root_cause.py create mode 100644 python/fi/generated/openapi_client/models/run_new_evals_on_test_execution.py create mode 100644 python/fi/generated/openapi_client/models/run_new_evals_response.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_choice_option.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_choice_option_value.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_config_response.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_config_result.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_config_result_config.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_preview_response.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_preview_result.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_preview_result_cost.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_preview_result_responses_item.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_column_preview_result_token_usage.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_options_response.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_options_result.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_options_result_models_item.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_options_result_tool_config.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_tool_option.py create mode 100644 python/fi/generated/openapi_client/models/run_prompt_tool_option_config.py create mode 100644 python/fi/generated/openapi_client/models/run_test_analytics.py create mode 100644 python/fi/generated/openapi_client/models/run_test_analytics_evaluation_score_trends_item.py create mode 100644 python/fi/generated/openapi_client/models/run_test_analytics_fail_rate_trends_item.py create mode 100644 python/fi/generated/openapi_client/models/run_test_analytics_performance_comparison_item.py create mode 100644 python/fi/generated/openapi_client/models/run_test_analytics_run_test_info.py create mode 100644 python/fi/generated/openapi_client/models/run_test_analytics_summary_stats.py create mode 100644 python/fi/generated/openapi_client/models/run_test_call_executions_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_call_executions_response_results_item.py create mode 100644 python/fi/generated/openapi_client/models/run_test_chat_execution_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_chat_execution_result.py create mode 100644 python/fi/generated/openapi_client/models/run_test_components_update.py create mode 100644 python/fi/generated/openapi_client/models/run_test_error_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/run_test_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/run_test_execution_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_kp_is_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs.py create mode 100644 python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/run_test_message_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_name_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_name_result.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response_agent_definition_detail.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response_agent_version.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response_prompt_template_detail.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response_prompt_version_detail.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response_scenarios_detail_item.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response_simulator_agent_detail.py create mode 100644 python/fi/generated/openapi_client/models/run_test_response_source_type.py create mode 100644 python/fi/generated/openapi_client/models/run_test_scenario_item_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_add_columns_request.py create mode 100644 python/fi/generated/openapi_client/models/scenario_add_columns_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_add_rows_request.py create mode 100644 python/fi/generated/openapi_client/models/scenario_add_rows_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_create_request.py create mode 100644 python/fi/generated/openapi_client/models/scenario_create_request_graph.py create mode 100644 python/fi/generated/openapi_client/models/scenario_create_request_kind.py create mode 100644 python/fi/generated/openapi_client/models/scenario_create_request_source_type.py create mode 100644 python/fi/generated/openapi_client/models/scenario_create_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_create_response_status.py create mode 100644 python/fi/generated/openapi_client/models/scenario_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_detail_response_graph.py create mode 100644 python/fi/generated/openapi_client/models/scenario_detail_response_scenario_type.py create mode 100644 python/fi/generated/openapi_client/models/scenario_detail_response_status.py create mode 100644 python/fi/generated/openapi_client/models/scenario_edit_prompts_request.py create mode 100644 python/fi/generated/openapi_client/models/scenario_edit_request.py create mode 100644 python/fi/generated/openapi_client/models/scenario_edit_request_graph.py create mode 100644 python/fi/generated/openapi_client/models/scenario_edit_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_error_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_error_response_details.py create mode 100644 python/fi/generated/openapi_client/models/scenario_error_response_type.py create mode 100644 python/fi/generated/openapi_client/models/scenario_list_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_prompt_item.py create mode 100644 python/fi/generated/openapi_client/models/scenario_prompt_item_role.py create mode 100644 python/fi/generated/openapi_client/models/scenario_prompts_update_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_response.py create mode 100644 python/fi/generated/openapi_client/models/scenario_response_scenario_type.py create mode 100644 python/fi/generated/openapi_client/models/scenario_response_source_type.py create mode 100644 python/fi/generated/openapi_client/models/scenario_response_status.py create mode 100644 python/fi/generated/openapi_client/models/score.py create mode 100644 python/fi/generated/openapi_client/models/score_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/score_delete_response_result.py create mode 100644 python/fi/generated/openapi_client/models/score_for_source_response.py create mode 100644 python/fi/generated/openapi_client/models/score_for_source_response_span_notes_item.py create mode 100644 python/fi/generated/openapi_client/models/score_label_settings.py create mode 100644 python/fi/generated/openapi_client/models/score_response.py create mode 100644 python/fi/generated/openapi_client/models/score_score_source.py create mode 100644 python/fi/generated/openapi_client/models/score_source_type.py create mode 100644 python/fi/generated/openapi_client/models/score_trend.py create mode 100644 python/fi/generated/openapi_client/models/score_value.py create mode 100644 python/fi/generated/openapi_client/models/sdk_configure_evaluations_request.py create mode 100644 python/fi/generated/openapi_client/models/sdk_configure_evaluations_request_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/sdk_configure_evaluations_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_error_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_error_response_errors.py create mode 100644 python/fi/generated/openapi_client/models/sdk_eval_template.py create mode 100644 python/fi/generated/openapi_client/models/sdk_eval_template_choices.py create mode 100644 python/fi/generated/openapi_client/models/sdk_eval_template_config.py create mode 100644 python/fi/generated/openapi_client/models/sdk_eval_template_criteria.py create mode 100644 python/fi/generated/openapi_client/models/sdk_eval_template_eval_tags.py create mode 100644 python/fi/generated/openapi_client/models/sdk_eval_template_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_get_evals_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_message_result.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_analytics_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_analytics_result.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_averages.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_explanation_summary.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_results_item.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_system_summary.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_metrics_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_metrics_result.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_chat_metrics.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_conversation.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_cost.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_latency.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_metrics.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_result.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_result_call_results.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_result_cost.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_explanation_summary.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_outputs.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_results_item.py create mode 100644 python/fi/generated/openapi_client/models/sdk_simulation_runs_result_latency.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_input.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_input_additional_property.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_request.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_request_config.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item_evaluations_item.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_config.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_inputs.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_response.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result.py create mode 100644 python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result_result.py create mode 100644 python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted.py create mode 100644 python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted_response.py create mode 100644 python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary.py create mode 100644 python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary_results_summary.py create mode 100644 python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_response.py create mode 100644 python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result.py create mode 100644 python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result_status.py create mode 100644 python/fi/generated/openapi_client/models/selection.py create mode 100644 python/fi/generated/openapi_client/models/selection_filter_item.py create mode 100644 python/fi/generated/openapi_client/models/selection_filter_item_filter_config.py create mode 100644 python/fi/generated/openapi_client/models/selection_mode.py create mode 100644 python/fi/generated/openapi_client/models/selection_source_type.py create mode 100644 python/fi/generated/openapi_client/models/send_chat_request.py create mode 100644 python/fi/generated/openapi_client/models/send_chat_request_metrics.py create mode 100644 python/fi/generated/openapi_client/models/session_comparison_response.py create mode 100644 python/fi/generated/openapi_client/models/session_comparison_result.py create mode 100644 python/fi/generated/openapi_client/models/session_comparison_result_comparison_metrics.py create mode 100644 python/fi/generated/openapi_client/models/session_comparison_result_comparison_recordings.py create mode 100644 python/fi/generated/openapi_client/models/session_comparison_result_comparison_transcripts.py create mode 100644 python/fi/generated/openapi_client/models/sidebar_ai_metadata.py create mode 100644 python/fi/generated/openapi_client/models/sidebar_timeline.py create mode 100644 python/fi/generated/openapi_client/models/simulate_api_personas_field_options_response_200.py create mode 100644 python/fi/generated/openapi_client/models/simulate_api_personas_system_personas_response_200.py create mode 100644 python/fi/generated/openapi_client/models/simulate_api_personas_workspace_personas_response_200.py create mode 100644 python/fi/generated/openapi_client/models/simulate_api_run_tests_list_simulation_type.py create mode 100644 python/fi/generated/openapi_client/models/simulate_eval_config_response.py create mode 100644 python/fi/generated/openapi_client/models/simulate_eval_config_response_config.py create mode 100644 python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item.py create mode 100644 python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item_filter_config.py create mode 100644 python/fi/generated/openapi_client/models/simulate_eval_config_response_mapping.py create mode 100644 python/fi/generated/openapi_client/models/simulate_export_read_type.py create mode 100644 python/fi/generated/openapi_client/models/simulator_agent.py create mode 100644 python/fi/generated/openapi_client/models/simulator_agent_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/simulator_agent_list_response.py create mode 100644 python/fi/generated/openapi_client/models/simulator_agent_validation_error_response.py create mode 100644 python/fi/generated/openapi_client/models/start_evals_process_request.py create mode 100644 python/fi/generated/openapi_client/models/stop_user_eval_request.py create mode 100644 python/fi/generated/openapi_client/models/submit_annotation_entry.py create mode 100644 python/fi/generated/openapi_client/models/submit_annotation_entry_value.py create mode 100644 python/fi/generated/openapi_client/models/submit_annotations.py create mode 100644 python/fi/generated/openapi_client/models/switch_workspace.py create mode 100644 python/fi/generated/openapi_client/models/switch_workspace_response.py create mode 100644 python/fi/generated/openapi_client/models/switch_workspace_result.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_data.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_data_dataset.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_config.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_config_dataset.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_config_payload.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_columns_item.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_dataset.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_config_response.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_config_result.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_create_started_response.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_create_started_result.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_creation.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_creation_dataset.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_update_data.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_update_response.py create mode 100644 python/fi/generated/openapi_client/models/synthetic_dataset_update_result.py create mode 100644 python/fi/generated/openapi_client/models/test_execution.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_analytics.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_analytics_evaluation_categories_over_test_runs.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_analytics_fail_rate_over_test_runs.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_analytics_metadata.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_bulk_delete.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_bulk_delete_response.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_chat_batch_response.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_chat_batch_result.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_column_order.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_column_order_response.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_detail_response.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_detail_response_column_order_item.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_detail_response_results_item.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_execution_metadata.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_item_response.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_rerun.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_rerun_rerun_type.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_rerun_response.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_rerun_result.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_rerun_result_failed_reruns_item.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_scenario_ids.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_status.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_status_summary.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_status_summary_scenarios_item.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_transcript_call.py create mode 100644 python/fi/generated/openapi_client/models/test_execution_transcripts_response.py create mode 100644 python/fi/generated/openapi_client/models/trace.py create mode 100644 python/fi/generated/openapi_client/models/trace_annotation_note_response.py create mode 100644 python/fi/generated/openapi_client/models/trace_annotation_value_response.py create mode 100644 python/fi/generated/openapi_client/models/trace_annotation_value_response_annotation_value.py create mode 100644 python/fi/generated/openapi_client/models/trace_annotation_value_response_settings.py create mode 100644 python/fi/generated/openapi_client/models/trace_error.py create mode 100644 python/fi/generated/openapi_client/models/trace_evidence.py create mode 100644 python/fi/generated/openapi_client/models/trace_evidence_fail_reel_item.py create mode 100644 python/fi/generated/openapi_client/models/trace_evidence_pass_reel_item.py create mode 100644 python/fi/generated/openapi_client/models/trace_input.py create mode 100644 python/fi/generated/openapi_client/models/trace_metadata.py create mode 100644 python/fi/generated/openapi_client/models/trace_output.py create mode 100644 python/fi/generated/openapi_client/models/trace_preview.py create mode 100644 python/fi/generated/openapi_client/models/trace_session.py create mode 100644 python/fi/generated/openapi_client/models/trace_session_graph_data_request.py create mode 100644 python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item.py create mode 100644 python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item_filter_config.py create mode 100644 python/fi/generated/openapi_client/models/trace_session_graph_data_request_interval.py create mode 100644 python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config.py create mode 100644 python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config_type.py create mode 100644 python/fi/generated/openapi_client/models/trace_summary.py create mode 100644 python/fi/generated/openapi_client/models/trace_tags.py create mode 100644 python/fi/generated/openapi_client/models/trace_tags_update.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_agent_graph_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_annotation_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_get_eval_names_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_get_trace_export_data_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_observe_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_list_traces_of_session_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_session_get_session_filter_values_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_session_get_trace_session_export_data_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_trace_session_list_response_200.py create mode 100644 python/fi/generated/openapi_client/models/tracer_user_alerts_list_monitors_response_200.py create mode 100644 python/fi/generated/openapi_client/models/traces_aggregates.py create mode 100644 python/fi/generated/openapi_client/models/traces_list_row.py create mode 100644 python/fi/generated/openapi_client/models/traces_tab_api_response.py create mode 100644 python/fi/generated/openapi_client/models/traces_tab_response.py create mode 100644 python/fi/generated/openapi_client/models/trend_metric.py create mode 100644 python/fi/generated/openapi_client/models/trend_point.py create mode 100644 python/fi/generated/openapi_client/models/trends_tab_api_response.py create mode 100644 python/fi/generated/openapi_client/models/trends_tab_response.py create mode 100644 python/fi/generated/openapi_client/models/update_run_test.py create mode 100644 python/fi/generated/openapi_client/models/user.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_duplicate.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_response.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_result.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_filters.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_log.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_log_type.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_logs.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_metric_option.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_metric_options_response.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_metric_type.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_threshold_operator.py create mode 100644 python/fi/generated/openapi_client/models/user_alert_monitor_threshold_type.py create mode 100644 python/fi/generated/openapi_client/models/user_code_example_response.py create mode 100644 python/fi/generated/openapi_client/models/user_eval_mutation_request.py create mode 100644 python/fi/generated/openapi_client/models/user_eval_mutation_request_composite_weight_overrides.py create mode 100644 python/fi/generated/openapi_client/models/user_eval_mutation_request_config.py create mode 100644 python/fi/generated/openapi_client/models/user_eval_update_request.py create mode 100644 python/fi/generated/openapi_client/models/user_eval_update_request_composite_weight_overrides.py create mode 100644 python/fi/generated/openapi_client/models/user_eval_update_request_config.py create mode 100644 python/fi/generated/openapi_client/models/user_goals.py create mode 100644 python/fi/generated/openapi_client/models/user_info_organization.py create mode 100644 python/fi/generated/openapi_client/models/user_info_response.py create mode 100644 python/fi/generated/openapi_client/models/user_info_two_factor_methods.py create mode 100644 python/fi/generated/openapi_client/models/user_organization_role.py create mode 100644 python/fi/generated/openapi_client/models/users_response.py create mode 100644 python/fi/generated/openapi_client/models/users_result.py create mode 100644 python/fi/generated/openapi_client/models/users_result_table_item.py create mode 100644 python/fi/generated/openapi_client/models/vector_db_column_request.py create mode 100644 python/fi/generated/openapi_client/models/vector_db_column_request_embedding_config.py create mode 100644 python/fi/generated/openapi_client/models/workspace_access_input.py create mode 100644 python/fi/generated/openapi_client/models/workspace_access_input_level.py create mode 100644 python/fi/generated/openapi_client/models/workspace_admin_summary.py create mode 100644 python/fi/generated/openapi_client/models/workspace_list_item_response.py create mode 100644 python/fi/generated/openapi_client/models/workspace_list_paginated_response.py create mode 100644 python/fi/generated/openapi_client/models/workspace_member_remove.py create mode 100644 python/fi/generated/openapi_client/models/workspace_member_role_update.py create mode 100644 python/fi/generated/openapi_client/models/workspace_member_role_update_response.py create mode 100644 python/fi/generated/openapi_client/models/workspace_member_role_update_result.py create mode 100644 python/fi/generated/openapi_client/models/workspace_member_role_update_ws_level.py create mode 100644 python/fi/generated/openapi_client/models/workspace_summary.py create mode 100644 python/fi/generated/openapi_client/types.py create mode 100644 python/tests/test_futureagi_client.py create mode 100755 scripts/build-sdk-openapi.sh create mode 100755 scripts/generate-go-java-sdk.sh create mode 100755 scripts/generate-oss-sdk.sh create mode 100644 scripts/prune-openapi-components.mjs create mode 100644 typescript/futureagi/src/__tests__/futureagi-client.test.ts create mode 100644 typescript/futureagi/src/fetch-globals.d.ts create mode 100644 typescript/futureagi/src/futureagi-client.ts create mode 100644 typescript/futureagi/src/generated/openapi/client.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/client/client.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/client/index.ts create mode 100644 typescript/futureagi/src/generated/openapi/client/types.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/client/utils.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/auth.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/bodySerializer.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/params.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/pathSerializer.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/queryKeySerializer.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/serverSentEvents.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/types.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/core/utils.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/index.ts create mode 100644 typescript/futureagi/src/generated/openapi/sdk.gen.ts create mode 100644 typescript/futureagi/src/generated/openapi/types.gen.ts diff --git a/.dockerignore b/.dockerignore index a58e6c0..3983404 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,3 +7,25 @@ **/*.pyc **/*.tsbuildinfo *.log + +# === Python virtualenvs + caches (added by setup) === +.venv +.venv/ +.venv*/ +**/.venv +**/.venv/ +**/.venv*/ +venv +venv/ +**/venv +**/venv/ +__pycache__/ +**/__pycache__/ +*.pyc +*.pyo +.pytest_cache/ +**/.pytest_cache/ +.ruff_cache/ +**/.ruff_cache/ +.mypy_cache/ +**/.mypy_cache/ diff --git a/.gitignore b/.gitignore index 44acdac..751aa34 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ output/ **.joblib **/__pycache__ +**/.ruff_cache/ #Excel files *.xlsx @@ -59,4 +60,26 @@ output/ *.pdf # node_modules -node_modules/ \ No newline at end of file +node_modules/ + +# === Python virtualenvs + caches (added by setup) === +.venv +.venv/ +.venv*/ +**/.venv +**/.venv/ +**/.venv*/ +venv +venv/ +**/venv +**/venv/ +__pycache__/ +**/__pycache__/ +*.pyc +*.pyo +.pytest_cache/ +**/.pytest_cache/ +.ruff_cache/ +**/.ruff_cache/ +.mypy_cache/ +**/.mypy_cache/ diff --git a/go/futureagi/.gitignore b/go/futureagi/.gitignore new file mode 100644 index 0000000..4c5307e --- /dev/null +++ b/go/futureagi/.gitignore @@ -0,0 +1,46 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +# === Python virtualenvs + caches (added by setup) === +.venv +.venv/ +.venv*/ +**/.venv +**/.venv/ +**/.venv*/ +venv +venv/ +**/venv +**/venv/ +__pycache__/ +**/__pycache__/ +*.pyc +*.pyo +.pytest_cache/ +**/.pytest_cache/ +.ruff_cache/ +**/.ruff_cache/ +.mypy_cache/ +**/.mypy_cache/ diff --git a/go/futureagi/README.md b/go/futureagi/README.md new file mode 100644 index 0000000..36f5144 --- /dev/null +++ b/go/futureagi/README.md @@ -0,0 +1,1348 @@ +# Go API client for futureagi + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 0.1.0 +- Package version: 0.1.0 +- Generator version: 7.12.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```sh +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```go +import futureagi "github.com/future-agi/futureagi-sdk/go/futureagi" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `futureagi.ContextServerIndex` of type `int`. + +```go +ctx := context.WithValue(context.Background(), futureagi.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `futureagi.ContextServerVariables` of type `map[string]string`. + +```go +ctx := context.WithValue(context.Background(), futureagi.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `futureagi.ContextOperationServerIndices` and `futureagi.ContextOperationServerVariables` context maps. + +```go +ctx := context.WithValue(context.Background(), futureagi.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), futureagi.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.futureagi.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountsAPI* | [**AccountsOrganizationMembersReactivateCreate**](docs/AccountsAPI.md#accountsorganizationmembersreactivatecreate) | **Post** /accounts/organization/members/reactivate/ | POST /accounts/organization/members/reactivate/ +*AccountsAPI* | [**AccountsOrganizationMembersRemoveDelete**](docs/AccountsAPI.md#accountsorganizationmembersremovedelete) | **Delete** /accounts/organization/members/remove/ | DELETE /accounts/organization/members/remove/ +*AccountsAPI* | [**AccountsOrganizationMembersRoleCreate**](docs/AccountsAPI.md#accountsorganizationmembersrolecreate) | **Post** /accounts/organization/members/role/ | POST /accounts/organization/members/role/ +*AccountsAPI* | [**AccountsWorkspaceMembersRemoveDelete**](docs/AccountsAPI.md#accountsworkspacemembersremovedelete) | **Delete** /accounts/workspace/{workspace_id}/members/remove/ | DELETE /accounts/workspace/<workspace_id>/members/remove/ +*AccountsAPI* | [**AccountsWorkspaceMembersRoleCreate**](docs/AccountsAPI.md#accountsworkspacemembersrolecreate) | **Post** /accounts/workspace/{workspace_id}/members/role/ | POST /accounts/workspace/<workspace_id>/members/role/ +*AlertsAPI* | [**BulkMuteAlerts**](docs/AlertsAPI.md#bulkmutealerts) | **Post** /tracer/user-alerts/bulk-mute/ | +*AlertsAPI* | [**CreateAlert**](docs/AlertsAPI.md#createalert) | **Post** /tracer/user-alerts/ | +*AlertsAPI* | [**DeleteAlert**](docs/AlertsAPI.md#deletealert) | **Delete** /tracer/user-alerts/{id}/ | +*AlertsAPI* | [**GetAlert**](docs/AlertsAPI.md#getalert) | **Get** /tracer/user-alerts/{id}/ | +*AlertsAPI* | [**GetAlertDetails**](docs/AlertsAPI.md#getalertdetails) | **Get** /tracer/user-alerts/{id}/details/ | +*AlertsAPI* | [**GetAlertGraph**](docs/AlertsAPI.md#getalertgraph) | **Get** /tracer/user-alerts/{id}/graph/ | Returns time-series data for a monitor's metric, suitable for graphing. +*AlertsAPI* | [**GetAlertLog**](docs/AlertsAPI.md#getalertlog) | **Get** /tracer/user-alert-logs/{id}/ | +*AlertsAPI* | [**ListAlertLogs**](docs/AlertsAPI.md#listalertlogs) | **Get** /tracer/user-alert-logs/ | +*AlertsAPI* | [**ListAlertLogsForAlert**](docs/AlertsAPI.md#listalertlogsforalert) | **Get** /tracer/user-alert-logs/{id}/list/ | +*AlertsAPI* | [**ListAlertMetricOptions**](docs/AlertsAPI.md#listalertmetricoptions) | **Get** /tracer/user-alerts/metric-options/ | +*AlertsAPI* | [**ListAlerts**](docs/AlertsAPI.md#listalerts) | **Get** /tracer/user-alerts/ | +*AlertsAPI* | [**ListAllAlertLogs**](docs/AlertsAPI.md#listallalertlogs) | **Get** /tracer/user-alert-logs/all/ | +*AlertsAPI* | [**PreviewAlertGraph**](docs/AlertsAPI.md#previewalertgraph) | **Post** /tracer/user-alerts/preview-graph/ | +*AlertsAPI* | [**ResolveAlertLogs**](docs/AlertsAPI.md#resolvealertlogs) | **Post** /tracer/user-alert-logs/resolve/ | +*AlertsAPI* | [**UpdateAlert**](docs/AlertsAPI.md#updatealert) | **Patch** /tracer/user-alerts/{id}/ | +*AnnotationQueueDiscussionAPI* | [**CreateAnnotationQueueItemComment**](docs/AnnotationQueueDiscussionAPI.md#createannotationqueueitemcomment) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +*AnnotationQueueDiscussionAPI* | [**ListAnnotationQueueItemDiscussion**](docs/AnnotationQueueDiscussionAPI.md#listannotationqueueitemdiscussion) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +*AnnotationQueueDiscussionAPI* | [**ReopenAnnotationQueueItemThread**](docs/AnnotationQueueDiscussionAPI.md#reopenannotationqueueitemthread) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/ | +*AnnotationQueueDiscussionAPI* | [**ResolveAnnotationQueueItemThread**](docs/AnnotationQueueDiscussionAPI.md#resolveannotationqueueitemthread) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/ | +*AnnotationQueueDiscussionAPI* | [**ToggleAnnotationQueueItemCommentReaction**](docs/AnnotationQueueDiscussionAPI.md#toggleannotationqueueitemcommentreaction) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/ | +*AnnotationQueueItemsAPI* | [**AddAnnotationQueueItems**](docs/AnnotationQueueItemsAPI.md#addannotationqueueitems) | **Post** /model-hub/annotation-queues/{queue_id}/items/add-items/ | +*AnnotationQueueItemsAPI* | [**AssignAnnotationQueueItems**](docs/AnnotationQueueItemsAPI.md#assignannotationqueueitems) | **Post** /model-hub/annotation-queues/{queue_id}/items/assign/ | +*AnnotationQueueItemsAPI* | [**CompleteAnnotationQueueItem**](docs/AnnotationQueueItemsAPI.md#completeannotationqueueitem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/complete/ | +*AnnotationQueueItemsAPI* | [**GetAnnotationQueueItemDetail**](docs/AnnotationQueueItemsAPI.md#getannotationqueueitemdetail) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/ | +*AnnotationQueueItemsAPI* | [**GetNextAnnotationQueueItem**](docs/AnnotationQueueItemsAPI.md#getnextannotationqueueitem) | **Get** /model-hub/annotation-queues/{queue_id}/items/next-item/ | Get the next or previous item in the queue. +*AnnotationQueueItemsAPI* | [**ImportAnnotationQueueItemAnnotations**](docs/AnnotationQueueItemsAPI.md#importannotationqueueitemannotations) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/ | +*AnnotationQueueItemsAPI* | [**ListAnnotationQueueItemAnnotations**](docs/AnnotationQueueItemsAPI.md#listannotationqueueitemannotations) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/ | +*AnnotationQueueItemsAPI* | [**ListAnnotationQueueItems**](docs/AnnotationQueueItemsAPI.md#listannotationqueueitems) | **Get** /model-hub/annotation-queues/{queue_id}/items/ | +*AnnotationQueueItemsAPI* | [**ReleaseAnnotationQueueItem**](docs/AnnotationQueueItemsAPI.md#releaseannotationqueueitem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/release/ | +*AnnotationQueueItemsAPI* | [**RemoveAnnotationQueueItems**](docs/AnnotationQueueItemsAPI.md#removeannotationqueueitems) | **Post** /model-hub/annotation-queues/{queue_id}/items/bulk-remove/ | +*AnnotationQueueItemsAPI* | [**SkipAnnotationQueueItem**](docs/AnnotationQueueItemsAPI.md#skipannotationqueueitem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/skip/ | +*AnnotationQueueItemsAPI* | [**SubmitAnnotationQueueItemAnnotations**](docs/AnnotationQueueItemsAPI.md#submitannotationqueueitemannotations) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/ | +*AnnotationQueueReviewAPI* | [**ReviewAnnotationQueueItem**](docs/AnnotationQueueReviewAPI.md#reviewannotationqueueitem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/review/ | +*AnnotationQueuesAPI* | [**AddAnnotationQueueLabel**](docs/AnnotationQueuesAPI.md#addannotationqueuelabel) | **Post** /model-hub/annotation-queues/{id}/add-label/ | +*AnnotationQueuesAPI* | [**ArchiveAnnotationQueue**](docs/AnnotationQueuesAPI.md#archiveannotationqueue) | **Delete** /model-hub/annotation-queues/{id}/ | Archive a queue (soft delete). +*AnnotationQueuesAPI* | [**CreateAnnotationQueue**](docs/AnnotationQueuesAPI.md#createannotationqueue) | **Post** /model-hub/annotation-queues/ | +*AnnotationQueuesAPI* | [**ExportAnnotationQueue**](docs/AnnotationQueuesAPI.md#exportannotationqueue) | **Get** /model-hub/annotation-queues/{id}/export/ | +*AnnotationQueuesAPI* | [**ExportAnnotationQueueToDataset**](docs/AnnotationQueuesAPI.md#exportannotationqueuetodataset) | **Post** /model-hub/annotation-queues/{id}/export-to-dataset/ | +*AnnotationQueuesAPI* | [**GetAnnotationQueue**](docs/AnnotationQueuesAPI.md#getannotationqueue) | **Get** /model-hub/annotation-queues/{id}/ | +*AnnotationQueuesAPI* | [**GetAnnotationQueueAgreement**](docs/AnnotationQueuesAPI.md#getannotationqueueagreement) | **Get** /model-hub/annotation-queues/{id}/agreement/ | +*AnnotationQueuesAPI* | [**GetAnnotationQueueAnalytics**](docs/AnnotationQueuesAPI.md#getannotationqueueanalytics) | **Get** /model-hub/annotation-queues/{id}/analytics/ | +*AnnotationQueuesAPI* | [**GetAnnotationQueueProgress**](docs/AnnotationQueuesAPI.md#getannotationqueueprogress) | **Get** /model-hub/annotation-queues/{id}/progress/ | +*AnnotationQueuesAPI* | [**ListAnnotationQueueExportFields**](docs/AnnotationQueuesAPI.md#listannotationqueueexportfields) | **Get** /model-hub/annotation-queues/{id}/export-fields/ | +*AnnotationQueuesAPI* | [**ListAnnotationQueues**](docs/AnnotationQueuesAPI.md#listannotationqueues) | **Get** /model-hub/annotation-queues/ | +*AnnotationQueuesAPI* | [**RemoveAnnotationQueueLabel**](docs/AnnotationQueuesAPI.md#removeannotationqueuelabel) | **Post** /model-hub/annotation-queues/{id}/remove-label/ | +*AnnotationQueuesAPI* | [**UpdateAnnotationQueue**](docs/AnnotationQueuesAPI.md#updateannotationqueue) | **Patch** /model-hub/annotation-queues/{id}/ | +*AnnotationQueuesAPI* | [**UpdateAnnotationQueueStatus**](docs/AnnotationQueuesAPI.md#updateannotationqueuestatus) | **Post** /model-hub/annotation-queues/{id}/update-status/ | +*DatasetsAPI* | [**AddDatasetColumns**](docs/DatasetsAPI.md#adddatasetcolumns) | **Post** /model-hub/develops/{dataset_id}/add_columns/ | +*DatasetsAPI* | [**AddDatasetRows**](docs/DatasetsAPI.md#adddatasetrows) | **Post** /model-hub/develops/{dataset_id}/add_rows/ | +*DatasetsAPI* | [**CreateDatasetFromLocalFile**](docs/DatasetsAPI.md#createdatasetfromlocalfile) | **Post** /model-hub/develops/create-dataset-from-local-file/ | +*DatasetsAPI* | [**CreateDatasetManually**](docs/DatasetsAPI.md#createdatasetmanually) | **Post** /model-hub/develops/create-dataset-manually/ | +*DatasetsAPI* | [**CreateEmptyDataset**](docs/DatasetsAPI.md#createemptydataset) | **Post** /model-hub/develops/create-empty-dataset/ | +*DatasetsAPI* | [**DeleteDatasetColumn**](docs/DatasetsAPI.md#deletedatasetcolumn) | **Delete** /model-hub/develops/{dataset_id}/delete_column/{column_id}/ | +*DatasetsAPI* | [**DeleteDatasetRow**](docs/DatasetsAPI.md#deletedatasetrow) | **Delete** /model-hub/develops/{dataset_id}/delete_row/ | +*DatasetsAPI* | [**DownloadDataset**](docs/DatasetsAPI.md#downloaddataset) | **Get** /model-hub/develops/{dataset_id}/download_dataset/ | +*DatasetsAPI* | [**DuplicateDataset**](docs/DatasetsAPI.md#duplicatedataset) | **Post** /model-hub/datasets/{dataset_id}/duplicate/ | +*DatasetsAPI* | [**GetDatasetAnnotationSummary**](docs/DatasetsAPI.md#getdatasetannotationsummary) | **Get** /model-hub/dataset/{dataset_id}/annotation-summary/ | +*DatasetsAPI* | [**GetDatasetColumns**](docs/DatasetsAPI.md#getdatasetcolumns) | **Get** /model-hub/dataset/columns/{dataset_id}/ | +*DatasetsAPI* | [**GetDatasetEvalStats**](docs/DatasetsAPI.md#getdatasetevalstats) | **Get** /model-hub/dataset/{dataset_id}/eval-stats/ | +*DatasetsAPI* | [**GetDatasetJsonSchema**](docs/DatasetsAPI.md#getdatasetjsonschema) | **Get** /model-hub/dataset/{dataset_id}/json-schema/ | +*DatasetsAPI* | [**GetDatasetRow**](docs/DatasetsAPI.md#getdatasetrow) | **Post** /model-hub/develops/{dataset_id}/get-row-data/ | +*DatasetsAPI* | [**GetDatasetTable**](docs/DatasetsAPI.md#getdatasettable) | **Get** /model-hub/develops/{dataset_id}/get-dataset-table/ | +*DatasetsAPI* | [**ListDatasetBaseColumns**](docs/DatasetsAPI.md#listdatasetbasecolumns) | **Get** /model-hub/datasets/get-base-columns/ | +*DatasetsAPI* | [**ListDatasetDerivedVariables**](docs/DatasetsAPI.md#listdatasetderivedvariables) | **Get** /model-hub/datasets/{dataset_id}/derived-variables/ | Get all derived variables from all run prompt columns in a dataset. +*DatasetsAPI* | [**ListDatasetNames**](docs/DatasetsAPI.md#listdatasetnames) | **Get** /model-hub/develops/get-datasets-names/ | +*DatasetsAPI* | [**ListDatasets**](docs/DatasetsAPI.md#listdatasets) | **Get** /model-hub/develops/get-datasets/ | +*DatasetsAPI* | [**UpdateDatasetCell**](docs/DatasetsAPI.md#updatedatasetcell) | **Post** /model-hub/develops/{dataset_id}/update_cell_value/ | +*ExperimentsAPI* | [**CompareExperiments**](docs/ExperimentsAPI.md#compareexperiments) | **Post** /model-hub/experiments/v2/{experiment_id}/compare-experiments/ | +*ExperimentsAPI* | [**CreateExperiment**](docs/ExperimentsAPI.md#createexperiment) | **Post** /model-hub/experiments/v2/ | +*ExperimentsAPI* | [**DeleteExperiments**](docs/ExperimentsAPI.md#deleteexperiments) | **Delete** /model-hub/experiments/v2/delete/ | +*ExperimentsAPI* | [**DownloadExperiment**](docs/ExperimentsAPI.md#downloadexperiment) | **Get** /model-hub/experiments/v2/{experiment_id}/download/ | +*ExperimentsAPI* | [**GetExperiment**](docs/ExperimentsAPI.md#getexperiment) | **Get** /model-hub/experiments/v2/{experiment_id}/ | +*ExperimentsAPI* | [**GetExperimentJsonSchema**](docs/ExperimentsAPI.md#getexperimentjsonschema) | **Get** /model-hub/experiments/v2/{experiment_id}/json-schema/ | +*ExperimentsAPI* | [**GetExperimentRow**](docs/ExperimentsAPI.md#getexperimentrow) | **Get** /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/ | +*ExperimentsAPI* | [**GetExperimentStats**](docs/ExperimentsAPI.md#getexperimentstats) | **Get** /model-hub/experiments/v2/{experiment_id}/stats/ | +*ExperimentsAPI* | [**ListExperimentComparisons**](docs/ExperimentsAPI.md#listexperimentcomparisons) | **Get** /model-hub/experiments/v2/{experiment_id}/comparisons/ | +*ExperimentsAPI* | [**ListExperimentRows**](docs/ExperimentsAPI.md#listexperimentrows) | **Get** /model-hub/experiments/v2/{experiment_id}/rows/ | +*ExperimentsAPI* | [**ListExperiments**](docs/ExperimentsAPI.md#listexperiments) | **Get** /model-hub/experiments/v2/list/ | +*ExperimentsAPI* | [**RerunExperiment**](docs/ExperimentsAPI.md#rerunexperiment) | **Post** /model-hub/experiments/v2/re-run/ | V2 re-run: org-scoped, uses V2 Temporal workflow. +*ExperimentsAPI* | [**StopExperiment**](docs/ExperimentsAPI.md#stopexperiment) | **Post** /model-hub/experiments/v2/{experiment_id}/stop/ | Stop a running V2 experiment. +*ExperimentsAPI* | [**UpdateExperiment**](docs/ExperimentsAPI.md#updateexperiment) | **Put** /model-hub/experiments/v2/{experiment_id}/ | Update a V2 experiment with diff-based selective re-run. +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesCreate**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationrulescreate) | **Post** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesDelete**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationrulesdelete) | **Delete** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesEvaluate**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationrulesevaluate) | **Post** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/ | Trigger a manual rule run with a sync-or-async branch. +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesList**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationruleslist) | **Get** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesPartialUpdate**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationrulespartialupdate) | **Patch** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesPreview**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationrulespreview) | **Get** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesRead**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationrulesread) | **Get** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesAutomationRulesUpdate**](docs/ModelHubAPI.md#modelhubannotationqueuesautomationrulesupdate) | **Put** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesForSource**](docs/ModelHubAPI.md#modelhubannotationqueuesforsource) | **Get** /model-hub/annotation-queues/for-source/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesGetOrCreateDefault**](docs/ModelHubAPI.md#modelhubannotationqueuesgetorcreatedefault) | **Post** /model-hub/annotation-queues/get-or-create-default/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesHardDelete**](docs/ModelHubAPI.md#modelhubannotationqueuesharddelete) | **Post** /model-hub/annotation-queues/{id}/hard-delete/ | Permanently remove a queue + everything attached. +*ModelHubAPI* | [**ModelHubAnnotationQueuesItemsCreate**](docs/ModelHubAPI.md#modelhubannotationqueuesitemscreate) | **Post** /model-hub/annotation-queues/{queue_id}/items/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesItemsDelete**](docs/ModelHubAPI.md#modelhubannotationqueuesitemsdelete) | **Delete** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesItemsPartialUpdate**](docs/ModelHubAPI.md#modelhubannotationqueuesitemspartialupdate) | **Patch** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesItemsRead**](docs/ModelHubAPI.md#modelhubannotationqueuesitemsread) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesItemsUpdate**](docs/ModelHubAPI.md#modelhubannotationqueuesitemsupdate) | **Put** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesRestore**](docs/ModelHubAPI.md#modelhubannotationqueuesrestore) | **Post** /model-hub/annotation-queues/{id}/restore/ | +*ModelHubAPI* | [**ModelHubAnnotationQueuesUpdate**](docs/ModelHubAPI.md#modelhubannotationqueuesupdate) | **Put** /model-hub/annotation-queues/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationsLabelsCreate**](docs/ModelHubAPI.md#modelhubannotationslabelscreate) | **Post** /model-hub/annotations-labels/ | +*ModelHubAPI* | [**ModelHubAnnotationsLabelsDelete**](docs/ModelHubAPI.md#modelhubannotationslabelsdelete) | **Delete** /model-hub/annotations-labels/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationsLabelsList**](docs/ModelHubAPI.md#modelhubannotationslabelslist) | **Get** /model-hub/annotations-labels/ | +*ModelHubAPI* | [**ModelHubAnnotationsLabelsPartialUpdate**](docs/ModelHubAPI.md#modelhubannotationslabelspartialupdate) | **Patch** /model-hub/annotations-labels/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationsLabelsRead**](docs/ModelHubAPI.md#modelhubannotationslabelsread) | **Get** /model-hub/annotations-labels/{id}/ | +*ModelHubAPI* | [**ModelHubAnnotationsLabelsRestore**](docs/ModelHubAPI.md#modelhubannotationslabelsrestore) | **Post** /model-hub/annotations-labels/{id}/restore/ | +*ModelHubAPI* | [**ModelHubAnnotationsLabelsUpdate**](docs/ModelHubAPI.md#modelhubannotationslabelsupdate) | **Put** /model-hub/annotations-labels/{id}/ | +*ModelHubAPI* | [**ModelHubApiKeysCreate**](docs/ModelHubAPI.md#modelhubapikeyscreate) | **Post** /model-hub/api-keys/ | +*ModelHubAPI* | [**ModelHubApiKeysDelete**](docs/ModelHubAPI.md#modelhubapikeysdelete) | **Delete** /model-hub/api-keys/{id}/ | Soft-delete an API key. +*ModelHubAPI* | [**ModelHubApiKeysList**](docs/ModelHubAPI.md#modelhubapikeyslist) | **Get** /model-hub/api-keys/ | +*ModelHubAPI* | [**ModelHubApiKeysPartialUpdate**](docs/ModelHubAPI.md#modelhubapikeyspartialupdate) | **Patch** /model-hub/api-keys/{id}/ | +*ModelHubAPI* | [**ModelHubApiKeysRead**](docs/ModelHubAPI.md#modelhubapikeysread) | **Get** /model-hub/api-keys/{id}/ | +*ModelHubAPI* | [**ModelHubApiKeysUpdate**](docs/ModelHubAPI.md#modelhubapikeysupdate) | **Put** /model-hub/api-keys/{id}/ | +*ModelHubAPI* | [**ModelHubApiModelsListList**](docs/ModelHubAPI.md#modelhubapimodelslistlist) | **Get** /model-hub/api/models_list/ | +*ModelHubAPI* | [**ModelHubDatasetRunPromptStatsList**](docs/ModelHubAPI.md#modelhubdatasetrunpromptstatslist) | **Get** /model-hub/dataset/{dataset_id}/run-prompt-stats/ | +*ModelHubAPI* | [**ModelHubDatasetsAddApiColumnCreate**](docs/ModelHubAPI.md#modelhubdatasetsaddapicolumncreate) | **Post** /model-hub/datasets/{dataset_id}/add-api-column/ | +*ModelHubAPI* | [**ModelHubDatasetsAddVectorDbColumnCreate**](docs/ModelHubAPI.md#modelhubdatasetsaddvectordbcolumncreate) | **Post** /model-hub/datasets/{dataset_id}/add_vector_db_column/ | +*ModelHubAPI* | [**ModelHubDatasetsClassifyColumnCreate**](docs/ModelHubAPI.md#modelhubdatasetsclassifycolumncreate) | **Post** /model-hub/datasets/{dataset_id}/classify-column/ | +*ModelHubAPI* | [**ModelHubDatasetsCompareDatasetsAddEvalCreate**](docs/ModelHubAPI.md#modelhubdatasetscomparedatasetsaddevalcreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/ | +*ModelHubAPI* | [**ModelHubDatasetsCompareDatasetsCreate**](docs/ModelHubAPI.md#modelhubdatasetscomparedatasetscreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/ | +*ModelHubAPI* | [**ModelHubDatasetsCompareDatasetsDownloadCreate**](docs/ModelHubAPI.md#modelhubdatasetscomparedatasetsdownloadcreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/download/ | +*ModelHubAPI* | [**ModelHubDatasetsCompareDatasetsStartEvalCreate**](docs/ModelHubAPI.md#modelhubdatasetscomparedatasetsstartevalcreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/ | +*ModelHubAPI* | [**ModelHubDatasetsCompareGetEvalsListCreate**](docs/ModelHubAPI.md#modelhubdatasetscomparegetevalslistcreate) | **Post** /model-hub/datasets/compare/get-evals-list/ | +*ModelHubAPI* | [**ModelHubDatasetsComparePreviewRunEvalCreate**](docs/ModelHubAPI.md#modelhubdatasetscomparepreviewrunevalcreate) | **Post** /model-hub/datasets/compare/preview-run-eval/ | +*ModelHubAPI* | [**ModelHubDatasetsCompareStatsCreate**](docs/ModelHubAPI.md#modelhubdatasetscomparestatscreate) | **Post** /model-hub/datasets/{dataset_id}/compare-stats/ | +*ModelHubAPI* | [**ModelHubDatasetsConditionalColumnCreate**](docs/ModelHubAPI.md#modelhubdatasetsconditionalcolumncreate) | **Post** /model-hub/datasets/{dataset_id}/conditional-column/ | +*ModelHubAPI* | [**ModelHubDatasetsDeleteCompareDelete**](docs/ModelHubAPI.md#modelhubdatasetsdeletecomparedelete) | **Delete** /model-hub/datasets/delete-compare/{compare_id}/ | +*ModelHubAPI* | [**ModelHubDatasetsDeleteCompareRead**](docs/ModelHubAPI.md#modelhubdatasetsdeletecompareread) | **Get** /model-hub/datasets/delete-compare/{compare_id}/ | +*ModelHubAPI* | [**ModelHubDatasetsDuplicateRowsCreate**](docs/ModelHubAPI.md#modelhubdatasetsduplicaterowscreate) | **Post** /model-hub/datasets/{dataset_id}/duplicate-rows/ | +*ModelHubAPI* | [**ModelHubDatasetsExplanationSummaryRead**](docs/ModelHubAPI.md#modelhubdatasetsexplanationsummaryread) | **Get** /model-hub/datasets/explanation-summary/{dataset_id}/ | +*ModelHubAPI* | [**ModelHubDatasetsExplanationSummaryRefreshCreate**](docs/ModelHubAPI.md#modelhubdatasetsexplanationsummaryrefreshcreate) | **Post** /model-hub/datasets/explanation-summary/{dataset_id}/refresh/ | +*ModelHubAPI* | [**ModelHubDatasetsExtractEntitiesCreate**](docs/ModelHubAPI.md#modelhubdatasetsextractentitiescreate) | **Post** /model-hub/datasets/{dataset_id}/extract-entities/ | +*ModelHubAPI* | [**ModelHubDatasetsGetCompareRowDelete**](docs/ModelHubAPI.md#modelhubdatasetsgetcomparerowdelete) | **Delete** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +*ModelHubAPI* | [**ModelHubDatasetsGetCompareRowRead**](docs/ModelHubAPI.md#modelhubdatasetsgetcomparerowread) | **Get** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +*ModelHubAPI* | [**ModelHubDatasetsHuggingfaceDetailCreate**](docs/ModelHubAPI.md#modelhubdatasetshuggingfacedetailcreate) | **Post** /model-hub/datasets/huggingface/detail/ | +*ModelHubAPI* | [**ModelHubDatasetsHuggingfaceListCreate**](docs/ModelHubAPI.md#modelhubdatasetshuggingfacelistcreate) | **Post** /model-hub/datasets/huggingface/list/ | +*ModelHubAPI* | [**ModelHubDatasetsMergeCreate**](docs/ModelHubAPI.md#modelhubdatasetsmergecreate) | **Post** /model-hub/datasets/{dataset_id}/merge/ | +*ModelHubAPI* | [**ModelHubDatasetsPreviewCreate**](docs/ModelHubAPI.md#modelhubdatasetspreviewcreate) | **Post** /model-hub/datasets/{dataset_id}/preview/{operation_type}/ | +*ModelHubAPI* | [**ModelHubDeleteEvalTemplateCreate**](docs/ModelHubAPI.md#modelhubdeleteevaltemplatecreate) | **Post** /model-hub/delete-eval-template/ | +*ModelHubAPI* | [**ModelHubDevelopsAddAsNewCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddasnewcreate) | **Post** /model-hub/develops/add-as-new/ | +*ModelHubAPI* | [**ModelHubDevelopsAddEmptyColumnsCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddemptycolumnscreate) | **Post** /model-hub/develops/{dataset_id}/add_empty_columns/ | +*ModelHubAPI* | [**ModelHubDevelopsAddEmptyRowsCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddemptyrowscreate) | **Post** /model-hub/develops/{dataset_id}/add_empty_rows/ | +*ModelHubAPI* | [**ModelHubDevelopsAddMultipleStaticColumnsCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddmultiplestaticcolumnscreate) | **Post** /model-hub/develops/{dataset_id}/add_multiple_static_columns/ | Add multiple static columns to a dataset at once. +*ModelHubAPI* | [**ModelHubDevelopsAddRowsFromExistingDatasetCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddrowsfromexistingdatasetcreate) | **Post** /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/ | +*ModelHubAPI* | [**ModelHubDevelopsAddRowsFromFileCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddrowsfromfilecreate) | **Post** /model-hub/develops/add_rows_from_file/ | +*ModelHubAPI* | [**ModelHubDevelopsAddRowsFromHuggingfaceCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddrowsfromhuggingfacecreate) | **Post** /model-hub/develops/{dataset_id}/add_rows_from_huggingface/ | +*ModelHubAPI* | [**ModelHubDevelopsAddRowsSdkCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddrowssdkcreate) | **Post** /model-hub/develops/add_rows_sdk/ | +*ModelHubAPI* | [**ModelHubDevelopsAddRunPromptColumnCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddrunpromptcolumncreate) | **Post** /model-hub/develops/add_run_prompt_column/ | +*ModelHubAPI* | [**ModelHubDevelopsAddStaticColumnCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddstaticcolumncreate) | **Post** /model-hub/develops/{dataset_id}/add_static_column/ | +*ModelHubAPI* | [**ModelHubDevelopsAddSyntheticDataCreate**](docs/ModelHubAPI.md#modelhubdevelopsaddsyntheticdatacreate) | **Post** /model-hub/develops/{dataset_id}/add_synthetic_data/ | +*ModelHubAPI* | [**ModelHubDevelopsAddUserEvalCreate**](docs/ModelHubAPI.md#modelhubdevelopsadduserevalcreate) | **Post** /model-hub/develops/{dataset_id}/add_user_eval/ | +*ModelHubAPI* | [**ModelHubDevelopsCloneDatasetCreate**](docs/ModelHubAPI.md#modelhubdevelopsclonedatasetcreate) | **Post** /model-hub/develops/clone-dataset/{dataset_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsCreateDatasetCreate**](docs/ModelHubAPI.md#modelhubdevelopscreatedatasetcreate) | **Post** /model-hub/develops/{exp_dataset_id}/create-dataset/ | +*ModelHubAPI* | [**ModelHubDevelopsCreateDatasetFromHuggingfaceCreate**](docs/ModelHubAPI.md#modelhubdevelopscreatedatasetfromhuggingfacecreate) | **Post** /model-hub/develops/create-dataset-from-huggingface/ | +*ModelHubAPI* | [**ModelHubDevelopsCreateSyntheticDatasetCreate**](docs/ModelHubAPI.md#modelhubdevelopscreatesyntheticdatasetcreate) | **Post** /model-hub/develops/create-synthetic-dataset/ | +*ModelHubAPI* | [**ModelHubDevelopsDatasetCreationProgressRead**](docs/ModelHubAPI.md#modelhubdevelopsdatasetcreationprogressread) | **Get** /model-hub/develops/dataset-creation-progress/{dataset_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsDeleteDatasetDelete**](docs/ModelHubAPI.md#modelhubdevelopsdeletedatasetdelete) | **Delete** /model-hub/develops/delete_dataset/ | +*ModelHubAPI* | [**ModelHubDevelopsDeleteTemplateEvalDelete**](docs/ModelHubAPI.md#modelhubdevelopsdeletetemplateevaldelete) | **Delete** /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsDeleteUserEvalDelete**](docs/ModelHubAPI.md#modelhubdevelopsdeleteuserevaldelete) | **Delete** /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsEditAndRunUserEvalCreate**](docs/ModelHubAPI.md#modelhubdevelopseditandrunuserevalcreate) | **Post** /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsEditDatasetBehaviorUpdate**](docs/ModelHubAPI.md#modelhubdevelopseditdatasetbehaviorupdate) | **Put** /model-hub/develops/{dataset_id}/edit_dataset_behavior/ | +*ModelHubAPI* | [**ModelHubDevelopsEditRunPromptColumnCreate**](docs/ModelHubAPI.md#modelhubdevelopseditrunpromptcolumncreate) | **Post** /model-hub/develops/edit_run_prompt_column/ | +*ModelHubAPI* | [**ModelHubDevelopsExtractJsonColumnCreate**](docs/ModelHubAPI.md#modelhubdevelopsextractjsoncolumncreate) | **Post** /model-hub/develops/{dataset_id}/extract-json-column/ | +*ModelHubAPI* | [**ModelHubDevelopsGetCellDataCreate**](docs/ModelHubAPI.md#modelhubdevelopsgetcelldatacreate) | **Post** /model-hub/develops/get-cell-data/ | +*ModelHubAPI* | [**ModelHubDevelopsGetDerivedDatasetsRead**](docs/ModelHubAPI.md#modelhubdevelopsgetderiveddatasetsread) | **Get** /model-hub/develops/get-derived-datasets/{dataset_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsGetEvalStructureRead**](docs/ModelHubAPI.md#modelhubdevelopsgetevalstructureread) | **Get** /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsGetEvalsListList**](docs/ModelHubAPI.md#modelhubdevelopsgetevalslistlist) | **Get** /model-hub/develops/{dataset_id}/get_evals_list/ | +*ModelHubAPI* | [**ModelHubDevelopsGetExperimentDatasetTableList**](docs/ModelHubAPI.md#modelhubdevelopsgetexperimentdatasettablelist) | **Get** /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/ | +*ModelHubAPI* | [**ModelHubDevelopsGetFunctionListList**](docs/ModelHubAPI.md#modelhubdevelopsgetfunctionlistlist) | **Get** /model-hub/develops/get_function_list/ | +*ModelHubAPI* | [**ModelHubDevelopsGetHuggingfaceDatasetConfigCreate**](docs/ModelHubAPI.md#modelhubdevelopsgethuggingfacedatasetconfigcreate) | **Post** /model-hub/develops/get-huggingface-dataset-config/ | +*ModelHubAPI* | [**ModelHubDevelopsGetRowDiffCreate**](docs/ModelHubAPI.md#modelhubdevelopsgetrowdiffcreate) | **Post** /model-hub/develops/get-row-diff/ | +*ModelHubAPI* | [**ModelHubDevelopsPreviewRunEvalCreate**](docs/ModelHubAPI.md#modelhubdevelopspreviewrunevalcreate) | **Post** /model-hub/develops/{dataset_id}/preview_run_eval/ | +*ModelHubAPI* | [**ModelHubDevelopsPreviewRunPromptColumnCreate**](docs/ModelHubAPI.md#modelhubdevelopspreviewrunpromptcolumncreate) | **Post** /model-hub/develops/preview_run_prompt_column/ | +*ModelHubAPI* | [**ModelHubDevelopsProviderStatusList**](docs/ModelHubAPI.md#modelhubdevelopsproviderstatuslist) | **Get** /model-hub/develops/provider-status/ | +*ModelHubAPI* | [**ModelHubDevelopsRetrieveRunPromptColumnConfigList**](docs/ModelHubAPI.md#modelhubdevelopsretrieverunpromptcolumnconfiglist) | **Get** /model-hub/develops/retrieve_run_prompt_column_config/ | +*ModelHubAPI* | [**ModelHubDevelopsRetrieveRunPromptOptionsList**](docs/ModelHubAPI.md#modelhubdevelopsretrieverunpromptoptionslist) | **Get** /model-hub/develops/retrieve_run_prompt_options/ | +*ModelHubAPI* | [**ModelHubDevelopsStartEvalsProcessCreate**](docs/ModelHubAPI.md#modelhubdevelopsstartevalsprocesscreate) | **Post** /model-hub/develops/{dataset_id}/start_evals_process/ | +*ModelHubAPI* | [**ModelHubDevelopsStopUserEvalCreate**](docs/ModelHubAPI.md#modelhubdevelopsstopuserevalcreate) | **Post** /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/ | POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. +*ModelHubAPI* | [**ModelHubDevelopsSyntheticConfigList**](docs/ModelHubAPI.md#modelhubdevelopssyntheticconfiglist) | **Get** /model-hub/develops/{dataset_id}/synthetic-config/ | +*ModelHubAPI* | [**ModelHubDevelopsUpdateColumnNameUpdate**](docs/ModelHubAPI.md#modelhubdevelopsupdatecolumnnameupdate) | **Put** /model-hub/develops/{dataset_id}/update_column_name/{column_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsUpdateColumnTypeUpdate**](docs/ModelHubAPI.md#modelhubdevelopsupdatecolumntypeupdate) | **Put** /model-hub/develops/{dataset_id}/update_column_type/{column_id}/ | +*ModelHubAPI* | [**ModelHubDevelopsUpdateSyntheticConfigUpdate**](docs/ModelHubAPI.md#modelhubdevelopsupdatesyntheticconfigupdate) | **Put** /model-hub/develops/{dataset_id}/update-synthetic-config/ | +*ModelHubAPI* | [**ModelHubEvalTemplatesBulkDeleteCreate**](docs/ModelHubAPI.md#modelhubevaltemplatesbulkdeletecreate) | **Post** /model-hub/eval-templates/bulk-delete/ | POST /model-hub/eval-templates/bulk-delete/ +*ModelHubAPI* | [**ModelHubEvalTemplatesCompositeExecuteAdhocCreate**](docs/ModelHubAPI.md#modelhubevaltemplatescompositeexecuteadhoccreate) | **Post** /model-hub/eval-templates/composite/execute-adhoc/ | POST /model-hub/eval-templates/composite/execute-adhoc/ +*ModelHubAPI* | [**ModelHubEvalTemplatesCompositeExecuteCreate**](docs/ModelHubAPI.md#modelhubevaltemplatescompositeexecutecreate) | **Post** /model-hub/eval-templates/{template_id}/composite/execute/ | POST /model-hub/eval-templates/<template_id>/composite/execute/ +*ModelHubAPI* | [**ModelHubEvalTemplatesCompositeList**](docs/ModelHubAPI.md#modelhubevaltemplatescompositelist) | **Get** /model-hub/eval-templates/{template_id}/composite/ | GET /model-hub/eval-templates/<id>/composite/ +*ModelHubAPI* | [**ModelHubEvalTemplatesCompositePartialUpdate**](docs/ModelHubAPI.md#modelhubevaltemplatescompositepartialupdate) | **Patch** /model-hub/eval-templates/{template_id}/composite/ | PATCH — partial update of a composite eval. +*ModelHubAPI* | [**ModelHubEvalTemplatesCreateCompositeCreate**](docs/ModelHubAPI.md#modelhubevaltemplatescreatecompositecreate) | **Post** /model-hub/eval-templates/create-composite/ | POST /model-hub/eval-templates/create-composite/ +*ModelHubAPI* | [**ModelHubEvalTemplatesCreateV2Create**](docs/ModelHubAPI.md#modelhubevaltemplatescreatev2create) | **Post** /model-hub/eval-templates/create-v2/ | POST /model-hub/eval-templates/create-v2/ +*ModelHubAPI* | [**ModelHubEvalTemplatesDetailList**](docs/ModelHubAPI.md#modelhubevaltemplatesdetaillist) | **Get** /model-hub/eval-templates/{template_id}/detail/ | GET /model-hub/eval-templates/<id>/detail/ +*ModelHubAPI* | [**ModelHubEvalTemplatesFeedbackListList**](docs/ModelHubAPI.md#modelhubevaltemplatesfeedbacklistlist) | **Get** /model-hub/eval-templates/{template_id}/feedback-list/ | GET /model-hub/eval-templates/<id>/feedback-list/ +*ModelHubAPI* | [**ModelHubEvalTemplatesGroundTruthConfigList**](docs/ModelHubAPI.md#modelhubevaltemplatesgroundtruthconfiglist) | **Get** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +*ModelHubAPI* | [**ModelHubEvalTemplatesGroundTruthConfigUpdate**](docs/ModelHubAPI.md#modelhubevaltemplatesgroundtruthconfigupdate) | **Put** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +*ModelHubAPI* | [**ModelHubEvalTemplatesGroundTruthList**](docs/ModelHubAPI.md#modelhubevaltemplatesgroundtruthlist) | **Get** /model-hub/eval-templates/{template_id}/ground-truth/ | +*ModelHubAPI* | [**ModelHubEvalTemplatesGroundTruthUploadCreate**](docs/ModelHubAPI.md#modelhubevaltemplatesgroundtruthuploadcreate) | **Post** /model-hub/eval-templates/{template_id}/ground-truth/upload/ | POST /model-hub/eval-templates/<id>/ground-truth/upload/ +*ModelHubAPI* | [**ModelHubEvalTemplatesListChartsCreate**](docs/ModelHubAPI.md#modelhubevaltemplateslistchartscreate) | **Post** /model-hub/eval-templates/list-charts/ | POST /model-hub/eval-templates/list-charts/ +*ModelHubAPI* | [**ModelHubEvalTemplatesListCreate**](docs/ModelHubAPI.md#modelhubevaltemplateslistcreate) | **Post** /model-hub/eval-templates/list/ | POST /model-hub/eval-templates/list/ +*ModelHubAPI* | [**ModelHubEvalTemplatesUpdateUpdate**](docs/ModelHubAPI.md#modelhubevaltemplatesupdateupdate) | **Put** /model-hub/eval-templates/{template_id}/update/ | PUT /model-hub/eval-templates/<id>/update/ +*ModelHubAPI* | [**ModelHubEvalTemplatesUsageList**](docs/ModelHubAPI.md#modelhubevaltemplatesusagelist) | **Get** /model-hub/eval-templates/{template_id}/usage/ | GET /model-hub/eval-templates/<id>/usage/ +*ModelHubAPI* | [**ModelHubEvalTemplatesVersionsCreateCreate**](docs/ModelHubAPI.md#modelhubevaltemplatesversionscreatecreate) | **Post** /model-hub/eval-templates/{template_id}/versions/create/ | POST /model-hub/eval-templates/<id>/versions/create/ +*ModelHubAPI* | [**ModelHubEvalTemplatesVersionsList**](docs/ModelHubAPI.md#modelhubevaltemplatesversionslist) | **Get** /model-hub/eval-templates/{template_id}/versions/ | GET /model-hub/eval-templates/<id>/versions/ +*ModelHubAPI* | [**ModelHubEvalTemplatesVersionsRestoreCreate**](docs/ModelHubAPI.md#modelhubevaltemplatesversionsrestorecreate) | **Post** /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/ | POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ +*ModelHubAPI* | [**ModelHubEvalTemplatesVersionsSetDefaultUpdate**](docs/ModelHubAPI.md#modelhubevaltemplatesversionssetdefaultupdate) | **Put** /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/ | PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ +*ModelHubAPI* | [**ModelHubExperimentsV2DerivedVariablesList**](docs/ModelHubAPI.md#modelhubexperimentsv2derivedvariableslist) | **Get** /model-hub/experiments/v2/{experiment_id}/derived-variables/ | +*ModelHubAPI* | [**ModelHubExperimentsV2EvaluationsStatsList**](docs/ModelHubAPI.md#modelhubexperimentsv2evaluationsstatslist) | **Get** /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/ | +*ModelHubAPI* | [**ModelHubExperimentsV2FeedbackCreate**](docs/ModelHubAPI.md#modelhubexperimentsv2feedbackcreate) | **Post** /model-hub/experiments/v2/{experiment_id}/feedback/ | +*ModelHubAPI* | [**ModelHubExperimentsV2FeedbackGetFeedbackDetailsList**](docs/ModelHubAPI.md#modelhubexperimentsv2feedbackgetfeedbackdetailslist) | **Get** /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/ | +*ModelHubAPI* | [**ModelHubExperimentsV2FeedbackGetTemplateList**](docs/ModelHubAPI.md#modelhubexperimentsv2feedbackgettemplatelist) | **Get** /model-hub/experiments/v2/{experiment_id}/feedback/get-template/ | +*ModelHubAPI* | [**ModelHubExperimentsV2FeedbackSubmitFeedbackCreate**](docs/ModelHubAPI.md#modelhubexperimentsv2feedbacksubmitfeedbackcreate) | **Post** /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/ | +*ModelHubAPI* | [**ModelHubExperimentsV2RerunCellsCreate**](docs/ModelHubAPI.md#modelhubexperimentsv2reruncellscreate) | **Post** /model-hub/experiments/v2/{experiment_id}/rerun-cells/ | Rerun specific cells or columns in a V2 experiment. +*ModelHubAPI* | [**ModelHubExperimentsV2RowDiffCreate**](docs/ModelHubAPI.md#modelhubexperimentsv2rowdiffcreate) | **Post** /model-hub/experiments/v2/row-diff/ | +*ModelHubAPI* | [**ModelHubExperimentsV2SuggestNameRead**](docs/ModelHubAPI.md#modelhubexperimentsv2suggestnameread) | **Get** /model-hub/experiments/v2/suggest-name/{dataset_id}/ | +*ModelHubAPI* | [**ModelHubExperimentsV2ValidateNameList**](docs/ModelHubAPI.md#modelhubexperimentsv2validatenamelist) | **Get** /model-hub/experiments/v2/validate-name/ | +*ModelHubAPI* | [**ModelHubKnowledgeBaseCreate**](docs/ModelHubAPI.md#modelhubknowledgebasecreate) | **Post** /model-hub/knowledge-base/ | +*ModelHubAPI* | [**ModelHubKnowledgeBaseDelete**](docs/ModelHubAPI.md#modelhubknowledgebasedelete) | **Delete** /model-hub/knowledge-base/ | +*ModelHubAPI* | [**ModelHubKnowledgeBaseFilesCreate**](docs/ModelHubAPI.md#modelhubknowledgebasefilescreate) | **Post** /model-hub/knowledge-base/files/ | +*ModelHubAPI* | [**ModelHubKnowledgeBaseFilesDelete**](docs/ModelHubAPI.md#modelhubknowledgebasefilesdelete) | **Delete** /model-hub/knowledge-base/files/ | +*ModelHubAPI* | [**ModelHubKnowledgeBaseGetList**](docs/ModelHubAPI.md#modelhubknowledgebasegetlist) | **Get** /model-hub/knowledge-base/get/ | +*ModelHubAPI* | [**ModelHubKnowledgeBaseList**](docs/ModelHubAPI.md#modelhubknowledgebaselist) | **Get** /model-hub/knowledge-base/ | +*ModelHubAPI* | [**ModelHubKnowledgeBaseListList**](docs/ModelHubAPI.md#modelhubknowledgebaselistlist) | **Get** /model-hub/knowledge-base/list/ | +*ModelHubAPI* | [**ModelHubKnowledgeBasePartialUpdate**](docs/ModelHubAPI.md#modelhubknowledgebasepartialupdate) | **Patch** /model-hub/knowledge-base/ | +*ModelHubAPI* | [**ModelHubPromptHistoryExecutionsGetExecutionDetails**](docs/ModelHubAPI.md#modelhubprompthistoryexecutionsgetexecutiondetails) | **Get** /model-hub/prompt-history-executions/execution-details/{execution_id}/ | +*ModelHubAPI* | [**ModelHubPromptHistoryExecutionsList**](docs/ModelHubAPI.md#modelhubprompthistoryexecutionslist) | **Get** /model-hub/prompt-history-executions/ | +*ModelHubAPI* | [**ModelHubPromptHistoryExecutionsRead**](docs/ModelHubAPI.md#modelhubprompthistoryexecutionsread) | **Get** /model-hub/prompt-history-executions/{id}/ | +*ModelHubAPI* | [**ModelHubPromptLabelsAssignLabelById**](docs/ModelHubAPI.md#modelhubpromptlabelsassignlabelbyid) | **Post** /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/ | +*ModelHubAPI* | [**ModelHubPromptLabelsAssignMultipleLabels**](docs/ModelHubAPI.md#modelhubpromptlabelsassignmultiplelabels) | **Post** /model-hub/prompt-labels/assign-multiple-labels/ | +*ModelHubAPI* | [**ModelHubPromptLabelsCreate**](docs/ModelHubAPI.md#modelhubpromptlabelscreate) | **Post** /model-hub/prompt-labels/ | +*ModelHubAPI* | [**ModelHubPromptLabelsCreateSystemLabels**](docs/ModelHubAPI.md#modelhubpromptlabelscreatesystemlabels) | **Post** /model-hub/prompt-labels/create-system-labels/ | +*ModelHubAPI* | [**ModelHubPromptLabelsDelete**](docs/ModelHubAPI.md#modelhubpromptlabelsdelete) | **Delete** /model-hub/prompt-labels/{id}/ | +*ModelHubAPI* | [**ModelHubPromptLabelsGetByName**](docs/ModelHubAPI.md#modelhubpromptlabelsgetbyname) | **Get** /model-hub/prompt-labels/get-by-name/ | Fetch a prompt version by template name and either explicit version or label. +*ModelHubAPI* | [**ModelHubPromptLabelsList**](docs/ModelHubAPI.md#modelhubpromptlabelslist) | **Get** /model-hub/prompt-labels/ | +*ModelHubAPI* | [**ModelHubPromptLabelsPartialUpdate**](docs/ModelHubAPI.md#modelhubpromptlabelspartialupdate) | **Patch** /model-hub/prompt-labels/{id}/ | +*ModelHubAPI* | [**ModelHubPromptLabelsRead**](docs/ModelHubAPI.md#modelhubpromptlabelsread) | **Get** /model-hub/prompt-labels/{id}/ | +*ModelHubAPI* | [**ModelHubPromptLabelsRemoveLabelFromVersion**](docs/ModelHubAPI.md#modelhubpromptlabelsremovelabelfromversion) | **Post** /model-hub/prompt-labels/remove/ | +*ModelHubAPI* | [**ModelHubPromptLabelsSetDefault**](docs/ModelHubAPI.md#modelhubpromptlabelssetdefault) | **Post** /model-hub/prompt-labels/set-default/ | +*ModelHubAPI* | [**ModelHubPromptLabelsTemplateLabels**](docs/ModelHubAPI.md#modelhubpromptlabelstemplatelabels) | **Get** /model-hub/prompt-labels/template-labels/ | +*ModelHubAPI* | [**ModelHubPromptLabelsUpdate**](docs/ModelHubAPI.md#modelhubpromptlabelsupdate) | **Put** /model-hub/prompt-labels/{id}/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesAddNewDraft**](docs/ModelHubAPI.md#modelhubprompttemplatesaddnewdraft) | **Post** /model-hub/prompt-templates/{id}/add-new-draft/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesAnalyzePrompt**](docs/ModelHubAPI.md#modelhubprompttemplatesanalyzeprompt) | **Post** /model-hub/prompt-templates/analyze-prompt/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesBulkDelete**](docs/ModelHubAPI.md#modelhubprompttemplatesbulkdelete) | **Post** /model-hub/prompt-templates/bulk-delete/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesCommit**](docs/ModelHubAPI.md#modelhubprompttemplatescommit) | **Post** /model-hub/prompt-templates/{id}/commit/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesCompareVersions**](docs/ModelHubAPI.md#modelhubprompttemplatescompareversions) | **Post** /model-hub/prompt-templates/{id}/compare-versions/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesCreate**](docs/ModelHubAPI.md#modelhubprompttemplatescreate) | **Post** /model-hub/prompt-templates/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesCreateDraft**](docs/ModelHubAPI.md#modelhubprompttemplatescreatedraft) | **Post** /model-hub/prompt-templates/create-draft/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesDelete**](docs/ModelHubAPI.md#modelhubprompttemplatesdelete) | **Delete** /model-hub/prompt-templates/{id}/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesDeleteEvaluationConfig**](docs/ModelHubAPI.md#modelhubprompttemplatesdeleteevaluationconfig) | **Delete** /model-hub/prompt-templates/{id}/delete-evaluation-config/ | Delete an evaluation configuration by name from a PromptTemplate. +*ModelHubAPI* | [**ModelHubPromptTemplatesDerivedVariablesExtractCreate**](docs/ModelHubAPI.md#modelhubprompttemplatesderivedvariablesextractcreate) | **Post** /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/ | Manually trigger extraction of derived variables from outputs. +*ModelHubAPI* | [**ModelHubPromptTemplatesDerivedVariablesList**](docs/ModelHubAPI.md#modelhubprompttemplatesderivedvariableslist) | **Get** /model-hub/prompt-templates/{prompt_id}/derived-variables/ | Get all derived variables for a prompt template. +*ModelHubAPI* | [**ModelHubPromptTemplatesDerivedVariablesPreviewCreate**](docs/ModelHubAPI.md#modelhubprompttemplatesderivedvariablespreviewcreate) | **Post** /model-hub/prompt-templates/derived-variables/preview/ | Preview derived variables from JSON content without saving. +*ModelHubAPI* | [**ModelHubPromptTemplatesDerivedVariablesSchemaList**](docs/ModelHubAPI.md#modelhubprompttemplatesderivedvariablesschemalist) | **Get** /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/ | Get the schema for derived variables of a specific column. +*ModelHubAPI* | [**ModelHubPromptTemplatesGeneratePrompt**](docs/ModelHubAPI.md#modelhubprompttemplatesgenerateprompt) | **Post** /model-hub/prompt-templates/generate-prompt/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesGenerateVariables**](docs/ModelHubAPI.md#modelhubprompttemplatesgeneratevariables) | **Post** /model-hub/prompt-templates/generate-variables/ | Generate synthetic data for prompt variables using the SyntheticDataAgent. +*ModelHubAPI* | [**ModelHubPromptTemplatesGetAllVariables**](docs/ModelHubAPI.md#modelhubprompttemplatesgetallvariables) | **Get** /model-hub/prompt-templates/{id}/all-variables/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesGetEvaluationConfigs**](docs/ModelHubAPI.md#modelhubprompttemplatesgetevaluationconfigs) | **Get** /model-hub/prompt-templates/{id}/evaluation-configs/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesGetNextVersion**](docs/ModelHubAPI.md#modelhubprompttemplatesgetnextversion) | **Get** /model-hub/prompt-templates/{id}/get-next-version/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesGetRunStatus**](docs/ModelHubAPI.md#modelhubprompttemplatesgetrunstatus) | **Get** /model-hub/prompt-templates/{id}/get-run-status/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesGetSdkCode**](docs/ModelHubAPI.md#modelhubprompttemplatesgetsdkcode) | **Get** /model-hub/prompt-templates/{id}/get-sdk-code/{language}/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesGetTemplateByName**](docs/ModelHubAPI.md#modelhubprompttemplatesgettemplatebyname) | **Get** /model-hub/prompt-templates/get-template-by-name/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesImprovePrompt**](docs/ModelHubAPI.md#modelhubprompttemplatesimproveprompt) | **Post** /model-hub/prompt-templates/improve-prompt/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesList**](docs/ModelHubAPI.md#modelhubprompttemplateslist) | **Get** /model-hub/prompt-templates/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesPartialUpdate**](docs/ModelHubAPI.md#modelhubprompttemplatespartialupdate) | **Patch** /model-hub/prompt-templates/{id}/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesRead**](docs/ModelHubAPI.md#modelhubprompttemplatesread) | **Get** /model-hub/prompt-templates/{id}/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesRetrieveEvaluations**](docs/ModelHubAPI.md#modelhubprompttemplatesretrieveevaluations) | **Get** /model-hub/prompt-templates/{id}/evaluations/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesRunEvalsOnMultipleVersions**](docs/ModelHubAPI.md#modelhubprompttemplatesrunevalsonmultipleversions) | **Post** /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesRunTemplate**](docs/ModelHubAPI.md#modelhubprompttemplatesruntemplate) | **Post** /model-hub/prompt-templates/{id}/run_template/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesSaveName**](docs/ModelHubAPI.md#modelhubprompttemplatessavename) | **Post** /model-hub/prompt-templates/{id}/save-name/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesSavePromptFolder**](docs/ModelHubAPI.md#modelhubprompttemplatessavepromptfolder) | **Post** /model-hub/prompt-templates/{id}/save-prompt-folder/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesSetDefault**](docs/ModelHubAPI.md#modelhubprompttemplatessetdefault) | **Post** /model-hub/prompt-templates/{id}/set_default/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesStopStreaming**](docs/ModelHubAPI.md#modelhubprompttemplatesstopstreaming) | **Get** /model-hub/prompt-templates/{id}/stop-streaming/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesUpdate**](docs/ModelHubAPI.md#modelhubprompttemplatesupdate) | **Put** /model-hub/prompt-templates/{id}/ | +*ModelHubAPI* | [**ModelHubPromptTemplatesUpdateEvaluationConfigs**](docs/ModelHubAPI.md#modelhubprompttemplatesupdateevaluationconfigs) | **Post** /model-hub/prompt-templates/{id}/update-evaluation-configs/ | Add or update evaluation configurations for a PromptTemplate. +*ModelHubAPI* | [**ModelHubPromptTemplatesVersions**](docs/ModelHubAPI.md#modelhubprompttemplatesversions) | **Get** /model-hub/prompt-templates/{id}/versions/ | +*ModelHubAPI* | [**ModelHubScoresBulkCreate**](docs/ModelHubAPI.md#modelhubscoresbulkcreate) | **Post** /model-hub/scores/bulk/ | +*ModelHubAPI* | [**ModelHubScoresCreate**](docs/ModelHubAPI.md#modelhubscorescreate) | **Post** /model-hub/scores/ | +*ModelHubAPI* | [**ModelHubScoresDelete**](docs/ModelHubAPI.md#modelhubscoresdelete) | **Delete** /model-hub/scores/{id}/ | Soft-delete a score. +*ModelHubAPI* | [**ModelHubScoresForSource**](docs/ModelHubAPI.md#modelhubscoresforsource) | **Get** /model-hub/scores/for-source/ | +*ModelHubAPI* | [**ModelHubScoresList**](docs/ModelHubAPI.md#modelhubscoreslist) | **Get** /model-hub/scores/ | Universal Score CRUD. +*ModelHubAPI* | [**ModelHubScoresPartialUpdate**](docs/ModelHubAPI.md#modelhubscorespartialupdate) | **Patch** /model-hub/scores/{id}/ | Universal Score CRUD. +*ModelHubAPI* | [**ModelHubScoresRead**](docs/ModelHubAPI.md#modelhubscoresread) | **Get** /model-hub/scores/{id}/ | Universal Score CRUD. +*ModelHubAPI* | [**ModelHubScoresUpdate**](docs/ModelHubAPI.md#modelhubscoresupdate) | **Put** /model-hub/scores/{id}/ | Universal Score CRUD. +*RunTestsEvalConfigsAPI* | [**SimulateRunTestsEvalConfigsCreate**](docs/RunTestsEvalConfigsAPI.md#simulateruntestsevalconfigscreate) | **Post** /simulate/run-tests/{run_test_id}/eval-configs/ | Add evaluation configurations +*RunTestsEvalConfigsAPI* | [**SimulateRunTestsEvalConfigsDelete**](docs/RunTestsEvalConfigsAPI.md#simulateruntestsevalconfigsdelete) | **Delete** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/ | Delete evaluation configuration +*RunTestsEvalConfigsAPI* | [**SimulateRunTestsEvalConfigsUpdateCreate**](docs/RunTestsEvalConfigsAPI.md#simulateruntestsevalconfigsupdatecreate) | **Post** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/ | Update evaluation configuration +*RunTestsEvalConfigsAPI* | [**SimulateRunTestsRunNewEvalsCreate**](docs/RunTestsEvalConfigsAPI.md#simulateruntestsrunnewevalscreate) | **Post** /simulate/run-tests/{run_test_id}/run-new-evals/ | Run new evaluations on test executions +*RunTestsEvalSummaryAPI* | [**SimulateRunTestsEvalSummaryComparisonList**](docs/RunTestsEvalSummaryAPI.md#simulateruntestsevalsummarycomparisonlist) | **Get** /simulate/run-tests/{run_test_id}/eval-summary-comparison/ | Compare evaluation summaries +*RunTestsEvalSummaryAPI* | [**SimulateRunTestsEvalSummaryList**](docs/RunTestsEvalSummaryAPI.md#simulateruntestsevalsummarylist) | **Get** /simulate/run-tests/{run_test_id}/eval-summary/ | Get evaluation summary +*ScenariosAPI* | [**SimulateScenariosAddColumnsCreate**](docs/ScenariosAPI.md#simulatescenariosaddcolumnscreate) | **Post** /simulate/scenarios/{scenario_id}/add-columns/ | Add columns to scenario +*ScenariosAPI* | [**SimulateScenariosAddRowsCreate**](docs/ScenariosAPI.md#simulatescenariosaddrowscreate) | **Post** /simulate/scenarios/{scenario_id}/add-rows/ | Add rows to scenario +*ScenariosAPI* | [**SimulateScenariosGetColumnsList**](docs/ScenariosAPI.md#simulatescenariosgetcolumnslist) | **Get** /simulate/scenarios/get-columns/ | List scenarios +*ScenariosAPI* | [**SimulateScenariosPromptsUpdate**](docs/ScenariosAPI.md#simulatescenariospromptsupdate) | **Put** /simulate/scenarios/{scenario_id}/prompts/ | Edit scenario prompts +*SdkAPI* | [**SdkApiV1ConfigureEvaluationsCreate**](docs/SdkAPI.md#sdkapiv1configureevaluationscreate) | **Post** /sdk/api/v1/configure-evaluations/ | +*SdkAPI* | [**SdkApiV1EvalCreate**](docs/SdkAPI.md#sdkapiv1evalcreate) | **Post** /sdk/api/v1/eval/ | +*SdkAPI* | [**SdkApiV1EvalRead**](docs/SdkAPI.md#sdkapiv1evalread) | **Get** /sdk/api/v1/eval/{eval_id}/ | +*SdkAPI* | [**SdkApiV1EvaluatePipelineCreate**](docs/SdkAPI.md#sdkapiv1evaluatepipelinecreate) | **Post** /sdk/api/v1/evaluate-pipeline/ | +*SdkAPI* | [**SdkApiV1EvaluatePipelineList**](docs/SdkAPI.md#sdkapiv1evaluatepipelinelist) | **Get** /sdk/api/v1/evaluate-pipeline/ | +*SdkAPI* | [**SdkApiV1GetEvalsList**](docs/SdkAPI.md#sdkapiv1getevalslist) | **Get** /sdk/api/v1/get-evals/ | +*SdkAPI* | [**SdkApiV1NewEvalCreate**](docs/SdkAPI.md#sdkapiv1newevalcreate) | **Post** /sdk/api/v1/new-eval/ | +*SdkAPI* | [**SdkApiV1NewEvalList**](docs/SdkAPI.md#sdkapiv1newevallist) | **Get** /sdk/api/v1/new-eval/ | +*SimulateAPI* | [**SimulateAgentDefinitionsDelete**](docs/SimulateAPI.md#simulateagentdefinitionsdelete) | **Delete** /simulate/agent-definitions/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsActivateCreate**](docs/SimulateAPI.md#simulateagentdefinitionsversionsactivatecreate) | **Post** /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsCallExecutionsList**](docs/SimulateAPI.md#simulateagentdefinitionsversionscallexecutionslist) | **Get** /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsCreateCreate**](docs/SimulateAPI.md#simulateagentdefinitionsversionscreatecreate) | **Post** /simulate/agent-definitions/{agent_id}/versions/create/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsDeleteDelete**](docs/SimulateAPI.md#simulateagentdefinitionsversionsdeletedelete) | **Delete** /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsEvalSummaryList**](docs/SimulateAPI.md#simulateagentdefinitionsversionsevalsummarylist) | **Get** /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsList**](docs/SimulateAPI.md#simulateagentdefinitionsversionslist) | **Get** /simulate/agent-definitions/{agent_id}/versions/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsRead**](docs/SimulateAPI.md#simulateagentdefinitionsversionsread) | **Get** /simulate/agent-definitions/{agent_id}/versions/{version_id}/ | +*SimulateAPI* | [**SimulateAgentDefinitionsVersionsRestoreCreate**](docs/SimulateAPI.md#simulateagentdefinitionsversionsrestorecreate) | **Post** /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/ | +*SimulateAPI* | [**SimulateApiCallExecutionsList**](docs/SimulateAPI.md#simulateapicallexecutionslist) | **Get** /simulate/api/call-executions/ | +*SimulateAPI* | [**SimulateApiPersonasDuplicate**](docs/SimulateAPI.md#simulateapipersonasduplicate) | **Post** /simulate/api/personas/{id}/duplicate/ | +*SimulateAPI* | [**SimulateApiPersonasDuplicateCreate**](docs/SimulateAPI.md#simulateapipersonasduplicatecreate) | **Post** /simulate/api/personas/duplicate/{persona_id}/ | +*SimulateAPI* | [**SimulateApiPersonasFieldOptions**](docs/SimulateAPI.md#simulateapipersonasfieldoptions) | **Get** /simulate/api/personas/field-options/ | +*SimulateAPI* | [**SimulateApiPersonasSystemPersonas**](docs/SimulateAPI.md#simulateapipersonassystempersonas) | **Get** /simulate/api/personas/system/ | +*SimulateAPI* | [**SimulateApiPersonasUpdate**](docs/SimulateAPI.md#simulateapipersonasupdate) | **Put** /simulate/api/personas/{id}/ | +*SimulateAPI* | [**SimulateApiPersonasWorkspacePersonas**](docs/SimulateAPI.md#simulateapipersonasworkspacepersonas) | **Get** /simulate/api/personas/workspace/ | +*SimulateAPI* | [**SimulateApiRunTestsList**](docs/SimulateAPI.md#simulateapiruntestslist) | **Get** /simulate/api/run-tests/ | +*SimulateAPI* | [**SimulateCallExecutionsBranchAnalysisCreate**](docs/SimulateAPI.md#simulatecallexecutionsbranchanalysiscreate) | **Post** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +*SimulateAPI* | [**SimulateCallExecutionsBranchAnalysisList**](docs/SimulateAPI.md#simulatecallexecutionsbranchanalysislist) | **Get** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +*SimulateAPI* | [**SimulateCallExecutionsChatSendMessageCreate**](docs/SimulateAPI.md#simulatecallexecutionschatsendmessagecreate) | **Post** /simulate/call-executions/{call_execution_id}/chat/send-message/ | +*SimulateAPI* | [**SimulateCallExecutionsDeleteDelete**](docs/SimulateAPI.md#simulatecallexecutionsdeletedelete) | **Delete** /simulate/call-executions/{call_execution_id}/delete/ | +*SimulateAPI* | [**SimulateCallExecutionsErrorLocalizerTasksList**](docs/SimulateAPI.md#simulatecallexecutionserrorlocalizertaskslist) | **Get** /simulate/call-executions/{call_execution_id}/error-localizer-tasks/ | +*SimulateAPI* | [**SimulateCallExecutionsLogsList**](docs/SimulateAPI.md#simulatecallexecutionslogslist) | **Get** /simulate/call-executions/{call_execution_id}/logs/ | +*SimulateAPI* | [**SimulateCallExecutionsPartialUpdate**](docs/SimulateAPI.md#simulatecallexecutionspartialupdate) | **Patch** /simulate/call-executions/{call_execution_id}/ | +*SimulateAPI* | [**SimulateCallExecutionsRead**](docs/SimulateAPI.md#simulatecallexecutionsread) | **Get** /simulate/call-executions/{call_execution_id}/ | +*SimulateAPI* | [**SimulateCallExecutionsSessionComparisonList**](docs/SimulateAPI.md#simulatecallexecutionssessioncomparisonlist) | **Get** /simulate/call-executions/{call_execution_id}/session-comparison/ | +*SimulateAPI* | [**SimulateCallExecutionsTranscriptsList**](docs/SimulateAPI.md#simulatecallexecutionstranscriptslist) | **Get** /simulate/call-executions/{call_execution_id}/transcripts/ | +*SimulateAPI* | [**SimulateExportRead**](docs/SimulateAPI.md#simulateexportread) | **Get** /simulate/export/{item_id}/ | +*SimulateAPI* | [**SimulatePromptSimulationsScenariosList**](docs/SimulateAPI.md#simulatepromptsimulationsscenarioslist) | **Get** /simulate/prompt-simulations/scenarios/ | Get list of scenarios available for prompt simulations. +*SimulateAPI* | [**SimulatePromptTemplatesSimulationsCreate**](docs/SimulateAPI.md#simulateprompttemplatessimulationscreate) | **Post** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Create a new prompt-based simulation run. +*SimulateAPI* | [**SimulatePromptTemplatesSimulationsDelete**](docs/SimulateAPI.md#simulateprompttemplatessimulationsdelete) | **Delete** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateAPI* | [**SimulatePromptTemplatesSimulationsExecuteCreate**](docs/SimulateAPI.md#simulateprompttemplatessimulationsexecutecreate) | **Post** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/ | Execute a prompt-based simulation run. +*SimulateAPI* | [**SimulatePromptTemplatesSimulationsList**](docs/SimulateAPI.md#simulateprompttemplatessimulationslist) | **Get** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Get paginated list of simulation runs for a specific prompt template. +*SimulateAPI* | [**SimulatePromptTemplatesSimulationsPartialUpdate**](docs/SimulateAPI.md#simulateprompttemplatessimulationspartialupdate) | **Patch** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateAPI* | [**SimulatePromptTemplatesSimulationsRead**](docs/SimulateAPI.md#simulateprompttemplatessimulationsread) | **Get** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateAPI* | [**SimulateRunTestsActiveList**](docs/SimulateAPI.md#simulateruntestsactivelist) | **Get** /simulate/run-tests/active/ | +*SimulateAPI* | [**SimulateRunTestsChatExecuteCreate**](docs/SimulateAPI.md#simulateruntestschatexecutecreate) | **Post** /simulate/run-tests/{run_test_id}/chat-execute/ | +*SimulateAPI* | [**SimulateRunTestsComponentsPartialUpdate**](docs/SimulateAPI.md#simulateruntestscomponentspartialupdate) | **Patch** /simulate/run-tests/{run_test_id}/components/ | +*SimulateAPI* | [**SimulateRunTestsDeleteDelete**](docs/SimulateAPI.md#simulateruntestsdeletedelete) | **Delete** /simulate/run-tests/{run_test_id}/delete/ | +*SimulateAPI* | [**SimulateRunTestsDeleteTestExecutionsCreate**](docs/SimulateAPI.md#simulateruntestsdeletetestexecutionscreate) | **Post** /simulate/run-tests/{run_test_id}/delete-test-executions/ | +*SimulateAPI* | [**SimulateRunTestsEvalConfigsGetStructureList**](docs/SimulateAPI.md#simulateruntestsevalconfigsgetstructurelist) | **Get** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/ | +*SimulateAPI* | [**SimulateRunTestsGetIdByNameRead**](docs/SimulateAPI.md#simulateruntestsgetidbynameread) | **Get** /simulate/run-tests/get-id-by-name/{run_test_name}/ | +*SimulateAPI* | [**SimulateRunTestsRerunTestExecutionsCreate**](docs/SimulateAPI.md#simulateruntestsreruntestexecutionscreate) | **Post** /simulate/run-tests/{run_test_id}/rerun-test-executions/ | +*SimulateAPI* | [**SimulateRunTestsScenariosList**](docs/SimulateAPI.md#simulateruntestsscenarioslist) | **Get** /simulate/run-tests/{run_test_id}/scenarios/ | +*SimulateAPI* | [**SimulateRunTestsSdkCodeList**](docs/SimulateAPI.md#simulateruntestssdkcodelist) | **Get** /simulate/run-tests/{run_test_id}/sdk-code/ | +*SimulateAPI* | [**SimulateSimulatorAgentsCreateCreate**](docs/SimulateAPI.md#simulatesimulatoragentscreatecreate) | **Post** /simulate/simulator-agents/create/ | +*SimulateAPI* | [**SimulateSimulatorAgentsDeleteDelete**](docs/SimulateAPI.md#simulatesimulatoragentsdeletedelete) | **Delete** /simulate/simulator-agents/{agent_id}/delete/ | +*SimulateAPI* | [**SimulateSimulatorAgentsEditUpdate**](docs/SimulateAPI.md#simulatesimulatoragentseditupdate) | **Put** /simulate/simulator-agents/{agent_id}/edit/ | +*SimulateAPI* | [**SimulateSimulatorAgentsList**](docs/SimulateAPI.md#simulatesimulatoragentslist) | **Get** /simulate/simulator-agents/ | +*SimulateAPI* | [**SimulateSimulatorAgentsRead**](docs/SimulateAPI.md#simulatesimulatoragentsread) | **Get** /simulate/simulator-agents/{agent_id}/ | +*SimulateAPI* | [**SimulateTestExecutionsChatCallExecutionsBatchCreate**](docs/SimulateAPI.md#simulatetestexecutionschatcallexecutionsbatchcreate) | **Post** /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/ | Create a batch of CallExecution records for chat execution (exactly 10 per API call). +*SimulateAPI* | [**SimulateTestExecutionsColumnOrderUpdate**](docs/SimulateAPI.md#simulatetestexecutionscolumnorderupdate) | **Put** /simulate/test-executions/{test_execution_id}/column-order/ | +*SimulateAPI* | [**SimulateTestExecutionsDeleteDelete**](docs/SimulateAPI.md#simulatetestexecutionsdeletedelete) | **Delete** /simulate/test-executions/{test_execution_id}/delete/ | +*SimulateAPI* | [**SimulateTestExecutionsEvalExplanationSummaryList**](docs/SimulateAPI.md#simulatetestexecutionsevalexplanationsummarylist) | **Get** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/ | +*SimulateAPI* | [**SimulateTestExecutionsEvalExplanationSummaryRefreshCreate**](docs/SimulateAPI.md#simulatetestexecutionsevalexplanationsummaryrefreshcreate) | **Post** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/ | +*SimulateAPI* | [**SimulateTestExecutionsOptimiserAnalysisList**](docs/SimulateAPI.md#simulatetestexecutionsoptimiseranalysislist) | **Get** /simulate/test-executions/{test_execution_id}/optimiser-analysis/ | +*SimulateAPI* | [**SimulateTestExecutionsOptimiserAnalysisRefreshCreate**](docs/SimulateAPI.md#simulatetestexecutionsoptimiseranalysisrefreshcreate) | **Post** /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/ | +*SimulateAPI* | [**SimulateTestExecutionsRerunCallsCreate**](docs/SimulateAPI.md#simulatetestexecutionsreruncallscreate) | **Post** /simulate/test-executions/{test_execution_id}/rerun-calls/ | +*SimulationAgentDefinitionsAPI* | [**CreateAgentDefinition**](docs/SimulationAgentDefinitionsAPI.md#createagentdefinition) | **Post** /simulate/agent-definitions/create/ | +*SimulationAgentDefinitionsAPI* | [**DeleteAgentDefinition**](docs/SimulationAgentDefinitionsAPI.md#deleteagentdefinition) | **Delete** /simulate/agent-definitions/{agent_id}/delete/ | +*SimulationAgentDefinitionsAPI* | [**GetAgentDefinition**](docs/SimulationAgentDefinitionsAPI.md#getagentdefinition) | **Get** /simulate/agent-definitions/{agent_id}/ | +*SimulationAgentDefinitionsAPI* | [**ListAgentDefinitions**](docs/SimulationAgentDefinitionsAPI.md#listagentdefinitions) | **Get** /simulate/agent-definitions/ | +*SimulationAgentDefinitionsAPI* | [**UpdateAgentDefinition**](docs/SimulationAgentDefinitionsAPI.md#updateagentdefinition) | **Put** /simulate/agent-definitions/{agent_id}/edit/ | +*SimulationPersonasAPI* | [**CreatePersona**](docs/SimulationPersonasAPI.md#createpersona) | **Post** /simulate/api/personas/ | +*SimulationPersonasAPI* | [**DeletePersona**](docs/SimulationPersonasAPI.md#deletepersona) | **Delete** /simulate/api/personas/{id}/ | +*SimulationPersonasAPI* | [**GetPersona**](docs/SimulationPersonasAPI.md#getpersona) | **Get** /simulate/api/personas/{id}/ | +*SimulationPersonasAPI* | [**ListPersonas**](docs/SimulationPersonasAPI.md#listpersonas) | **Get** /simulate/api/personas/ | +*SimulationPersonasAPI* | [**UpdatePersona**](docs/SimulationPersonasAPI.md#updatepersona) | **Patch** /simulate/api/personas/{id}/ | +*SimulationRunTestsAPI* | [**CreateRunTest**](docs/SimulationRunTestsAPI.md#createruntest) | **Post** /simulate/run-tests/create/ | +*SimulationRunTestsAPI* | [**DeleteRunTest**](docs/SimulationRunTestsAPI.md#deleteruntest) | **Delete** /simulate/run-tests/{run_test_id}/ | +*SimulationRunTestsAPI* | [**ExecuteRunTest**](docs/SimulationRunTestsAPI.md#executeruntest) | **Post** /simulate/run-tests/{run_test_id}/execute/ | +*SimulationRunTestsAPI* | [**GetRunTest**](docs/SimulationRunTestsAPI.md#getruntest) | **Get** /simulate/run-tests/{run_test_id}/ | +*SimulationRunTestsAPI* | [**GetRunTestAnalytics**](docs/SimulationRunTestsAPI.md#getruntestanalytics) | **Get** /simulate/run-tests/{run_test_id}/analytics/ | +*SimulationRunTestsAPI* | [**GetRunTestStatus**](docs/SimulationRunTestsAPI.md#getrunteststatus) | **Get** /simulate/run-tests/{run_test_id}/status/ | +*SimulationRunTestsAPI* | [**ListRunTestCallExecutions**](docs/SimulationRunTestsAPI.md#listruntestcallexecutions) | **Get** /simulate/run-tests/{run_test_id}/call-executions/ | +*SimulationRunTestsAPI* | [**ListRunTestExecutions**](docs/SimulationRunTestsAPI.md#listruntestexecutions) | **Get** /simulate/run-tests/{run_test_id}/executions/ | +*SimulationRunTestsAPI* | [**ListRunTests**](docs/SimulationRunTestsAPI.md#listruntests) | **Get** /simulate/run-tests/ | +*SimulationRunTestsAPI* | [**UpdateRunTest**](docs/SimulationRunTestsAPI.md#updateruntest) | **Patch** /simulate/run-tests/{run_test_id}/ | +*SimulationScenariosAPI* | [**CreateScenario**](docs/SimulationScenariosAPI.md#createscenario) | **Post** /simulate/scenarios/create/ | Create scenario +*SimulationScenariosAPI* | [**DeleteScenario**](docs/SimulationScenariosAPI.md#deletescenario) | **Delete** /simulate/scenarios/{scenario_id}/delete/ | Delete scenario +*SimulationScenariosAPI* | [**GetScenario**](docs/SimulationScenariosAPI.md#getscenario) | **Get** /simulate/scenarios/{scenario_id}/ | Get scenario detail +*SimulationScenariosAPI* | [**ListScenarios**](docs/SimulationScenariosAPI.md#listscenarios) | **Get** /simulate/scenarios/ | List scenarios +*SimulationScenariosAPI* | [**UpdateScenario**](docs/SimulationScenariosAPI.md#updatescenario) | **Put** /simulate/scenarios/{scenario_id}/edit/ | Edit scenario +*SimulationTestExecutionsAPI* | [**CancelTestExecution**](docs/SimulationTestExecutionsAPI.md#canceltestexecution) | **Post** /simulate/test-executions/{test_execution_id}/cancel/ | +*SimulationTestExecutionsAPI* | [**GetTestExecution**](docs/SimulationTestExecutionsAPI.md#gettestexecution) | **Get** /simulate/test-executions/{test_execution_id}/ | +*SimulationTestExecutionsAPI* | [**GetTestExecutionAnalytics**](docs/SimulationTestExecutionsAPI.md#gettestexecutionanalytics) | **Get** /simulate/test-executions/{test_execution_id}/analytics/ | +*SimulationTestExecutionsAPI* | [**GetTestExecutionKpis**](docs/SimulationTestExecutionsAPI.md#gettestexecutionkpis) | **Get** /simulate/test-executions/{test_execution_id}/kpis/ | +*SimulationTestExecutionsAPI* | [**GetTestExecutionPerformanceSummary**](docs/SimulationTestExecutionsAPI.md#gettestexecutionperformancesummary) | **Get** /simulate/test-executions/{test_execution_id}/performance-summary/ | +*SimulationTestExecutionsAPI* | [**GetTestExecutionTranscripts**](docs/SimulationTestExecutionsAPI.md#gettestexecutiontranscripts) | **Get** /simulate/test-executions/{test_execution_id}/transcripts/ | +*SimulationTestExecutionsAPI* | [**ListTestExecutions**](docs/SimulationTestExecutionsAPI.md#listtestexecutions) | **Get** /simulate/api/test-executions/ | +*SimulationsAPI* | [**GetSimulationAnalytics**](docs/SimulationsAPI.md#getsimulationanalytics) | **Get** /sdk/api/v1/simulation/analytics/ | GET /simulation/analytics/ +*SimulationsAPI* | [**ListSimulationMetrics**](docs/SimulationsAPI.md#listsimulationmetrics) | **Get** /sdk/api/v1/simulation/metrics/ | GET /simulation/metrics/ +*SimulationsAPI* | [**ListSimulationRuns**](docs/SimulationsAPI.md#listsimulationruns) | **Get** /sdk/api/v1/simulation/runs/ | GET /simulation/runs/ +*TracerAPI* | [**TracerFeedIssuesCreateLinearIssueCreate**](docs/TracerAPI.md#tracerfeedissuescreatelinearissuecreate) | **Post** /tracer/feed/issues/{cluster_id}/create-linear-issue/ | +*TracerAPI* | [**TracerFeedIssuesDeepAnalysisCreate**](docs/TracerAPI.md#tracerfeedissuesdeepanalysiscreate) | **Post** /tracer/feed/issues/{cluster_id}/deep-analysis/ | +*TracerAPI* | [**TracerFeedIssuesOverviewList**](docs/TracerAPI.md#tracerfeedissuesoverviewlist) | **Get** /tracer/feed/issues/{cluster_id}/overview/ | +*TracerAPI* | [**TracerFeedIssuesPartialUpdate**](docs/TracerAPI.md#tracerfeedissuespartialupdate) | **Patch** /tracer/feed/issues/{cluster_id}/ | +*TracerAPI* | [**TracerFeedIssuesRootCauseList**](docs/TracerAPI.md#tracerfeedissuesrootcauselist) | **Get** /tracer/feed/issues/{cluster_id}/root-cause/ | GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X +*TracerAPI* | [**TracerFeedIssuesSidebarList**](docs/TracerAPI.md#tracerfeedissuessidebarlist) | **Get** /tracer/feed/issues/{cluster_id}/sidebar/ | GET /tracer/feed/issues/{cluster_id}/sidebar/ +*TracerAPI* | [**TracerFeedIssuesTracesList**](docs/TracerAPI.md#tracerfeedissuestraceslist) | **Get** /tracer/feed/issues/{cluster_id}/traces/ | +*TracerAPI* | [**TracerFeedIssuesTrendsList**](docs/TracerAPI.md#tracerfeedissuestrendslist) | **Get** /tracer/feed/issues/{cluster_id}/trends/ | +*TracerAPI* | [**TracerTraceAgentGraph**](docs/TracerAPI.md#tracertraceagentgraph) | **Get** /tracer/trace/agent_graph/ | Return the aggregate agent graph for a project. +*TracerAPI* | [**TracerTraceAnnotationCreate**](docs/TracerAPI.md#tracertraceannotationcreate) | **Post** /tracer/trace-annotation/ | +*TracerAPI* | [**TracerTraceAnnotationDelete**](docs/TracerAPI.md#tracertraceannotationdelete) | **Delete** /tracer/trace-annotation/{id}/ | +*TracerAPI* | [**TracerTraceAnnotationGetAnnotationValues**](docs/TracerAPI.md#tracertraceannotationgetannotationvalues) | **Get** /tracer/trace-annotation/get_annotation_values/ | +*TracerAPI* | [**TracerTraceAnnotationList**](docs/TracerAPI.md#tracertraceannotationlist) | **Get** /tracer/trace-annotation/ | +*TracerAPI* | [**TracerTraceAnnotationPartialUpdate**](docs/TracerAPI.md#tracertraceannotationpartialupdate) | **Patch** /tracer/trace-annotation/{id}/ | +*TracerAPI* | [**TracerTraceAnnotationRead**](docs/TracerAPI.md#tracertraceannotationread) | **Get** /tracer/trace-annotation/{id}/ | +*TracerAPI* | [**TracerTraceAnnotationUpdate**](docs/TracerAPI.md#tracertraceannotationupdate) | **Put** /tracer/trace-annotation/{id}/ | +*TracerAPI* | [**TracerTraceBulkCreate**](docs/TracerAPI.md#tracertracebulkcreate) | **Post** /tracer/trace/bulk_create/ | +*TracerAPI* | [**TracerTraceCompareTraces**](docs/TracerAPI.md#tracertracecomparetraces) | **Post** /tracer/trace/compare_traces/ | +*TracerAPI* | [**TracerTraceCreate**](docs/TracerAPI.md#tracertracecreate) | **Post** /tracer/trace/ | +*TracerAPI* | [**TracerTraceDelete**](docs/TracerAPI.md#tracertracedelete) | **Delete** /tracer/trace/{id}/ | +*TracerAPI* | [**TracerTraceGetEvalNames**](docs/TracerAPI.md#tracertracegetevalnames) | **Get** /tracer/trace/get_eval_names/ | +*TracerAPI* | [**TracerTraceGetTraceExportData**](docs/TracerAPI.md#tracertracegettraceexportdata) | **Get** /tracer/trace/get_trace_export_data/ | +*TracerAPI* | [**TracerTraceGetTraceIdByIndex**](docs/TracerAPI.md#tracertracegettraceidbyindex) | **Get** /tracer/trace/get_trace_id_by_index/ | +*TracerAPI* | [**TracerTraceGetTraceIdByIndexObserve**](docs/TracerAPI.md#tracertracegettraceidbyindexobserve) | **Get** /tracer/trace/get_trace_id_by_index_observe/ | +*TracerAPI* | [**TracerTraceList**](docs/TracerAPI.md#tracertracelist) | **Get** /tracer/trace/ | +*TracerAPI* | [**TracerTraceListTracesOfSession**](docs/TracerAPI.md#tracertracelisttracesofsession) | **Get** /tracer/trace/list_traces_of_session/ | +*TracerAPI* | [**TracerTracePartialUpdate**](docs/TracerAPI.md#tracertracepartialupdate) | **Patch** /tracer/trace/{id}/ | +*TracerAPI* | [**TracerTraceSessionCreate**](docs/TracerAPI.md#tracertracesessioncreate) | **Post** /tracer/trace-session/ | +*TracerAPI* | [**TracerTraceSessionDelete**](docs/TracerAPI.md#tracertracesessiondelete) | **Delete** /tracer/trace-session/{id}/ | +*TracerAPI* | [**TracerTraceSessionEvalLogs**](docs/TracerAPI.md#tracertracesessionevallogs) | **Get** /tracer/trace-session/{id}/eval_logs/ | Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. +*TracerAPI* | [**TracerTraceSessionGetSessionFilterValues**](docs/TracerAPI.md#tracertracesessiongetsessionfiltervalues) | **Get** /tracer/trace-session/get_session_filter_values/ | +*TracerAPI* | [**TracerTraceSessionGetTraceSessionExportData**](docs/TracerAPI.md#tracertracesessiongettracesessionexportdata) | **Get** /tracer/trace-session/get_trace_session_export_data/ | +*TracerAPI* | [**TracerTraceSessionList**](docs/TracerAPI.md#tracertracesessionlist) | **Get** /tracer/trace-session/ | +*TracerAPI* | [**TracerTraceSessionPartialUpdate**](docs/TracerAPI.md#tracertracesessionpartialupdate) | **Patch** /tracer/trace-session/{id}/ | +*TracerAPI* | [**TracerTraceSessionUpdate**](docs/TracerAPI.md#tracertracesessionupdate) | **Put** /tracer/trace-session/{id}/ | +*TracerAPI* | [**TracerTraceUpdate**](docs/TracerAPI.md#tracertraceupdate) | **Put** /tracer/trace/{id}/ | +*TracerAPI* | [**TracerUserAlertLogsCreate**](docs/TracerAPI.md#traceruseralertlogscreate) | **Post** /tracer/user-alert-logs/ | +*TracerAPI* | [**TracerUserAlertLogsDelete**](docs/TracerAPI.md#traceruseralertlogsdelete) | **Delete** /tracer/user-alert-logs/{id}/ | +*TracerAPI* | [**TracerUserAlertLogsPartialUpdate**](docs/TracerAPI.md#traceruseralertlogspartialupdate) | **Patch** /tracer/user-alert-logs/{id}/ | +*TracerAPI* | [**TracerUserAlertLogsUpdate**](docs/TracerAPI.md#traceruseralertlogsupdate) | **Put** /tracer/user-alert-logs/{id}/ | +*TracerAPI* | [**TracerUserAlertsDuplicate**](docs/TracerAPI.md#traceruseralertsduplicate) | **Post** /tracer/user-alerts/duplicate/ | +*TracerAPI* | [**TracerUserAlertsListMonitors**](docs/TracerAPI.md#traceruseralertslistmonitors) | **Get** /tracer/user-alerts/list_monitors/ | +*TracerAPI* | [**TracerUserAlertsUpdate**](docs/TracerAPI.md#traceruseralertsupdate) | **Put** /tracer/user-alerts/{id}/ | +*TracerAPI* | [**TracerUsersGetCodeExampleList**](docs/TracerAPI.md#tracerusersgetcodeexamplelist) | **Get** /tracer/users/get_code_example/ | +*TracingAPI* | [**CreateBulkTraceAnnotation**](docs/TracingAPI.md#createbulktraceannotation) | **Post** /tracer/bulk-annotation/ | +*TracingAPI* | [**GetErrorFeedIssue**](docs/TracingAPI.md#geterrorfeedissue) | **Get** /tracer/feed/issues/{cluster_id}/ | +*TracingAPI* | [**GetErrorFeedIssueStats**](docs/TracingAPI.md#geterrorfeedissuestats) | **Get** /tracer/feed/issues/stats/ | +*TracingAPI* | [**GetTrace**](docs/TracingAPI.md#gettrace) | **Get** /tracer/trace/{id}/ | +*TracingAPI* | [**GetTraceGraphMethods**](docs/TracingAPI.md#gettracegraphmethods) | **Post** /tracer/trace/get_graph_methods/ | +*TracingAPI* | [**GetTraceSession**](docs/TracingAPI.md#gettracesession) | **Get** /tracer/trace-session/{id}/ | +*TracingAPI* | [**GetTraceSessionGraphData**](docs/TracingAPI.md#gettracesessiongraphdata) | **Post** /tracer/trace-session/get_session_graph_data/ | Fetch time-series session metrics for the observe graph. +*TracingAPI* | [**GetVoiceCallDetail**](docs/TracingAPI.md#getvoicecalldetail) | **Get** /tracer/trace/voice_call_detail/ | Return the heavy / detail-only fields for a single voice call. +*TracingAPI* | [**ListErrorFeedIssues**](docs/TracingAPI.md#listerrorfeedissues) | **Get** /tracer/feed/issues/ | +*TracingAPI* | [**ListTraceAnnotationLabels**](docs/TracingAPI.md#listtraceannotationlabels) | **Get** /tracer/get-annotation-labels/ | +*TracingAPI* | [**ListTraceProjects**](docs/TracingAPI.md#listtraceprojects) | **Get** /tracer/project/list_projects/ | List projects filtered by organization ID. +*TracingAPI* | [**ListTraceProperties**](docs/TracingAPI.md#listtraceproperties) | **Get** /tracer/trace/get_properties/ | +*TracingAPI* | [**ListTraceSessions**](docs/TracingAPI.md#listtracesessions) | **Get** /tracer/trace-session/list_sessions/ | +*TracingAPI* | [**ListTraceUsers**](docs/TracingAPI.md#listtraceusers) | **Get** /tracer/users/ | +*TracingAPI* | [**ListTraces**](docs/TracingAPI.md#listtraces) | **Get** /tracer/trace/list_traces/ | +*TracingAPI* | [**ListVoiceCalls**](docs/TracingAPI.md#listvoicecalls) | **Get** /tracer/trace/list_voice_calls/ | +*TracingAPI* | [**UpdateTraceTags**](docs/TracingAPI.md#updatetracetags) | **Patch** /tracer/trace/{id}/tags/ | +*UsersAPI* | [**GetCurrentUser**](docs/UsersAPI.md#getcurrentuser) | **Get** /accounts/user-info/ | +*UsersAPI* | [**ListOrganizationMembers**](docs/UsersAPI.md#listorganizationmembers) | **Get** /accounts/organization/members/ | GET /accounts/organization/members/ +*UsersAPI* | [**ListWorkspaceMembers**](docs/UsersAPI.md#listworkspacemembers) | **Get** /accounts/workspace/{workspace_id}/members/ | GET /accounts/workspace/<workspace_id>/members/ +*UsersAPI* | [**ListWorkspaces**](docs/UsersAPI.md#listworkspaces) | **Get** /accounts/workspace/list/ | +*UsersAPI* | [**SwitchWorkspace**](docs/UsersAPI.md#switchworkspace) | **Post** /accounts/workspace/switch/ | + + +## Documentation For Models + + - [AccountsErrorResponse](docs/AccountsErrorResponse.md) + - [AddApiColumnRequest](docs/AddApiColumnRequest.md) + - [AddAsNewDatasetRequest](docs/AddAsNewDatasetRequest.md) + - [AddEvalConfigsRequest](docs/AddEvalConfigsRequest.md) + - [AddEvalConfigsResponse](docs/AddEvalConfigsResponse.md) + - [AddItems](docs/AddItems.md) + - [AddQueueItem](docs/AddQueueItem.md) + - [AddRowsFromFileRequest](docs/AddRowsFromFileRequest.md) + - [AddRunPrompt](docs/AddRunPrompt.md) + - [AgentDefinitionBulkDeleteRequest](docs/AgentDefinitionBulkDeleteRequest.md) + - [AgentDefinitionBulkDeleteResponse](docs/AgentDefinitionBulkDeleteResponse.md) + - [AgentDefinitionCreateRequest](docs/AgentDefinitionCreateRequest.md) + - [AgentDefinitionCreateResponse](docs/AgentDefinitionCreateResponse.md) + - [AgentDefinitionDeleteResponse](docs/AgentDefinitionDeleteResponse.md) + - [AgentDefinitionEditRequest](docs/AgentDefinitionEditRequest.md) + - [AgentDefinitionEditResponse](docs/AgentDefinitionEditResponse.md) + - [AgentDefinitionListResponse](docs/AgentDefinitionListResponse.md) + - [AgentDefinitionResponse](docs/AgentDefinitionResponse.md) + - [AgentFlowGraph](docs/AgentFlowGraph.md) + - [AgentVersionActivateResponse](docs/AgentVersionActivateResponse.md) + - [AgentVersionCreateRequest](docs/AgentVersionCreateRequest.md) + - [AgentVersionCreateResponse](docs/AgentVersionCreateResponse.md) + - [AgentVersionDeleteResponse](docs/AgentVersionDeleteResponse.md) + - [AgentVersionListResponse](docs/AgentVersionListResponse.md) + - [AgentVersionResponse](docs/AgentVersionResponse.md) + - [AgentVersionRestoreResponse](docs/AgentVersionRestoreResponse.md) + - [AllActiveTests](docs/AllActiveTests.md) + - [AnnotationLabelResponse](docs/AnnotationLabelResponse.md) + - [AnnotationLabelRestoreResponse](docs/AnnotationLabelRestoreResponse.md) + - [AnnotationQueue](docs/AnnotationQueue.md) + - [AnnotationSummaryHeader](docs/AnnotationSummaryHeader.md) + - [AnnotationSummaryResponse](docs/AnnotationSummaryResponse.md) + - [AnnotationSummaryResult](docs/AnnotationSummaryResult.md) + - [AnnotationsLabels](docs/AnnotationsLabels.md) + - [ApiErrorResponse](docs/ApiErrorResponse.md) + - [ApiErrorWithDetailsResponse](docs/ApiErrorWithDetailsResponse.md) + - [ApiKey](docs/ApiKey.md) + - [ApiSelectionTooLargeDetail](docs/ApiSelectionTooLargeDetail.md) + - [ApiSelectionTooLargeError](docs/ApiSelectionTooLargeError.md) + - [ApiTextErrorResponse](docs/ApiTextErrorResponse.md) + - [AssignItems](docs/AssignItems.md) + - [AutomationRule](docs/AutomationRule.md) + - [AutomationRuleConditions](docs/AutomationRuleConditions.md) + - [AutomationRuleConditionsFilterInner](docs/AutomationRuleConditionsFilterInner.md) + - [AutomationRuleConditionsFilterInnerFilterConfig](docs/AutomationRuleConditionsFilterInnerFilterConfig.md) + - [AutomationRuleEvaluateAcceptedResponse](docs/AutomationRuleEvaluateAcceptedResponse.md) + - [AutomationRuleEvaluateResponse](docs/AutomationRuleEvaluateResponse.md) + - [AutomationRuleEvaluateResult](docs/AutomationRuleEvaluateResult.md) + - [AutomationRuleScope](docs/AutomationRuleScope.md) + - [BaseColumnsResponse](docs/BaseColumnsResponse.md) + - [BaseColumnsResponseResult](docs/BaseColumnsResponseResult.md) + - [BulkAnnotationAnnotationRequest](docs/BulkAnnotationAnnotationRequest.md) + - [BulkAnnotationNoteRequest](docs/BulkAnnotationNoteRequest.md) + - [BulkAnnotationRecordRequest](docs/BulkAnnotationRecordRequest.md) + - [BulkAnnotationRequest](docs/BulkAnnotationRequest.md) + - [BulkAnnotationResponse](docs/BulkAnnotationResponse.md) + - [BulkAnnotationResponseResult](docs/BulkAnnotationResponseResult.md) + - [BulkCreateScoreItem](docs/BulkCreateScoreItem.md) + - [BulkCreateScores](docs/BulkCreateScores.md) + - [BulkCreateScoresResponse](docs/BulkCreateScoresResponse.md) + - [BulkCreateScoresResult](docs/BulkCreateScoresResult.md) + - [BulkRemoveItems](docs/BulkRemoveItems.md) + - [CICDEvaluationItem](docs/CICDEvaluationItem.md) + - [CICDJob](docs/CICDJob.md) + - [CallBranchAnalysisResponse](docs/CallBranchAnalysisResponse.md) + - [CallBranchDeviationCreateResponse](docs/CallBranchDeviationCreateResponse.md) + - [CallExecution](docs/CallExecution.md) + - [CallExecutionDeleteResponse](docs/CallExecutionDeleteResponse.md) + - [CallExecutionDetail](docs/CallExecutionDetail.md) + - [CallExecutionErrorLocalizerTasksResponse](docs/CallExecutionErrorLocalizerTasksResponse.md) + - [CallExecutionErrorResponse](docs/CallExecutionErrorResponse.md) + - [CallExecutionLogsResponse](docs/CallExecutionLogsResponse.md) + - [CallExecutionRerun](docs/CallExecutionRerun.md) + - [CallExecutionStatusUpdate](docs/CallExecutionStatusUpdate.md) + - [CallLogEntryResponse](docs/CallLogEntryResponse.md) + - [CallTranscript](docs/CallTranscript.md) + - [CallTranscriptResponse](docs/CallTranscriptResponse.md) + - [CancelTestExecutionResponse](docs/CancelTestExecutionResponse.md) + - [ChatMessageContract](docs/ChatMessageContract.md) + - [ChatSDKCodeResponse](docs/ChatSDKCodeResponse.md) + - [ChatSDKCodeResult](docs/ChatSDKCodeResult.md) + - [ChatSendMessageResponse](docs/ChatSendMessageResponse.md) + - [ChatSendMessageResult](docs/ChatSendMessageResult.md) + - [ChatToolCall](docs/ChatToolCall.md) + - [ChatToolCallFunction](docs/ChatToolCallFunction.md) + - [ClassifyColumnRequest](docs/ClassifyColumnRequest.md) + - [CloneDatasetRequest](docs/CloneDatasetRequest.md) + - [CoOccurringIssue](docs/CoOccurringIssue.md) + - [Column](docs/Column.md) + - [ColumnDefinition](docs/ColumnDefinition.md) + - [ColumnOrder](docs/ColumnOrder.md) + - [ColumnTypeConversionResponse](docs/ColumnTypeConversionResponse.md) + - [ColumnTypeConversionResult](docs/ColumnTypeConversionResult.md) + - [CompareDataset](docs/CompareDataset.md) + - [CompareDatasetDeleteResponse](docs/CompareDatasetDeleteResponse.md) + - [CompareDatasetDeleteResult](docs/CompareDatasetDeleteResult.md) + - [CompareDatasetMetadata](docs/CompareDatasetMetadata.md) + - [CompareDatasetResponse](docs/CompareDatasetResponse.md) + - [CompareDatasetResult](docs/CompareDatasetResult.md) + - [CompareDatasetRowResponse](docs/CompareDatasetRowResponse.md) + - [CompareDatasetRowResult](docs/CompareDatasetRowResult.md) + - [CompareDatasetStatsRequest](docs/CompareDatasetStatsRequest.md) + - [CompareDatasetStatsResponse](docs/CompareDatasetStatsResponse.md) + - [CompareEvalListResponse](docs/CompareEvalListResponse.md) + - [CompareEvalListResult](docs/CompareEvalListResult.md) + - [CompareEvalsListRequest](docs/CompareEvalsListRequest.md) + - [CompareExperimentEvalRequest](docs/CompareExperimentEvalRequest.md) + - [ComparePreviewRunEvalRequest](docs/ComparePreviewRunEvalRequest.md) + - [CompareStartEvalsRequest](docs/CompareStartEvalsRequest.md) + - [CompositeChildItem](docs/CompositeChildItem.md) + - [CompositeChildResult](docs/CompositeChildResult.md) + - [CompositeEvalAdhocExecuteRequest](docs/CompositeEvalAdhocExecuteRequest.md) + - [CompositeEvalCreateRequest](docs/CompositeEvalCreateRequest.md) + - [CompositeEvalCreateResponse](docs/CompositeEvalCreateResponse.md) + - [CompositeEvalCreateResponseResult](docs/CompositeEvalCreateResponseResult.md) + - [CompositeEvalDetailResponse](docs/CompositeEvalDetailResponse.md) + - [CompositeEvalDetailResponseResult](docs/CompositeEvalDetailResponseResult.md) + - [CompositeEvalExecuteRequest](docs/CompositeEvalExecuteRequest.md) + - [CompositeEvalExecuteResponse](docs/CompositeEvalExecuteResponse.md) + - [CompositeEvalExecuteResponseResult](docs/CompositeEvalExecuteResponseResult.md) + - [CompositeEvalUpdateRequest](docs/CompositeEvalUpdateRequest.md) + - [ConditionalColumnRequest](docs/ConditionalColumnRequest.md) + - [ConfigureEvaluations](docs/ConfigureEvaluations.md) + - [CreateDatasetFromExperimentRequest](docs/CreateDatasetFromExperimentRequest.md) + - [CreateDatasetFromLocalFileRequest](docs/CreateDatasetFromLocalFileRequest.md) + - [CreateEmptyDatasetRequest](docs/CreateEmptyDatasetRequest.md) + - [CreateLinearIssue](docs/CreateLinearIssue.md) + - [CreateLinearIssueResponse](docs/CreateLinearIssueResponse.md) + - [CreateLinearIssueResult](docs/CreateLinearIssueResult.md) + - [CreatePromptSimulationRequest](docs/CreatePromptSimulationRequest.md) + - [CreateRunTest](docs/CreateRunTest.md) + - [CreateScore](docs/CreateScore.md) + - [Dataset](docs/Dataset.md) + - [DatasetAddColumnsRequest](docs/DatasetAddColumnsRequest.md) + - [DatasetAddEmptyColumnsRequest](docs/DatasetAddEmptyColumnsRequest.md) + - [DatasetAddEmptyRowsRequest](docs/DatasetAddEmptyRowsRequest.md) + - [DatasetAddRowsFromExistingRequest](docs/DatasetAddRowsFromExistingRequest.md) + - [DatasetAddRowsRequest](docs/DatasetAddRowsRequest.md) + - [DatasetBehaviorRequest](docs/DatasetBehaviorRequest.md) + - [DatasetCellDataRequest](docs/DatasetCellDataRequest.md) + - [DatasetCellDataResponse](docs/DatasetCellDataResponse.md) + - [DatasetCellValue](docs/DatasetCellValue.md) + - [DatasetColumnDetailItem](docs/DatasetColumnDetailItem.md) + - [DatasetColumnDetailResponse](docs/DatasetColumnDetailResponse.md) + - [DatasetColumnDetailResult](docs/DatasetColumnDetailResult.md) + - [DatasetColumnsMutationResponse](docs/DatasetColumnsMutationResponse.md) + - [DatasetColumnsMutationResult](docs/DatasetColumnsMutationResult.md) + - [DatasetCopyResponse](docs/DatasetCopyResponse.md) + - [DatasetCopyResult](docs/DatasetCopyResult.md) + - [DatasetCreateStartedResponse](docs/DatasetCreateStartedResponse.md) + - [DatasetCreateStartedResult](docs/DatasetCreateStartedResult.md) + - [DatasetCreationProgressResponse](docs/DatasetCreationProgressResponse.md) + - [DatasetCreationProgressResult](docs/DatasetCreationProgressResult.md) + - [DatasetDerivedVariablesResponse](docs/DatasetDerivedVariablesResponse.md) + - [DatasetDerivedVariablesResult](docs/DatasetDerivedVariablesResult.md) + - [DatasetEvalStatsItem](docs/DatasetEvalStatsItem.md) + - [DatasetEvalStatsMetric](docs/DatasetEvalStatsMetric.md) + - [DatasetEvalStatsResponse](docs/DatasetEvalStatsResponse.md) + - [DatasetExplanationSummaryResponse](docs/DatasetExplanationSummaryResponse.md) + - [DatasetExplanationSummaryResponseResult](docs/DatasetExplanationSummaryResponseResult.md) + - [DatasetJsonSchemaResponse](docs/DatasetJsonSchemaResponse.md) + - [DatasetListItem](docs/DatasetListItem.md) + - [DatasetListResponse](docs/DatasetListResponse.md) + - [DatasetListResult](docs/DatasetListResult.md) + - [DatasetMultipleStaticColumnsRequest](docs/DatasetMultipleStaticColumnsRequest.md) + - [DatasetNameItem](docs/DatasetNameItem.md) + - [DatasetNamesResponse](docs/DatasetNamesResponse.md) + - [DatasetNamesResult](docs/DatasetNamesResult.md) + - [DatasetRowDataRequest](docs/DatasetRowDataRequest.md) + - [DatasetRowDataRequestSortInner](docs/DatasetRowDataRequestSortInner.md) + - [DatasetRowDataResponse](docs/DatasetRowDataResponse.md) + - [DatasetRowDataResult](docs/DatasetRowDataResult.md) + - [DatasetRowDiffRequest](docs/DatasetRowDiffRequest.md) + - [DatasetRowNavigation](docs/DatasetRowNavigation.md) + - [DatasetRowsImportMessageResponse](docs/DatasetRowsImportMessageResponse.md) + - [DatasetRowsImportMessageResult](docs/DatasetRowsImportMessageResult.md) + - [DatasetRowsImportedResponse](docs/DatasetRowsImportedResponse.md) + - [DatasetRowsImportedResult](docs/DatasetRowsImportedResult.md) + - [DatasetRunPromptStatsPrompt](docs/DatasetRunPromptStatsPrompt.md) + - [DatasetRunPromptStatsResponse](docs/DatasetRunPromptStatsResponse.md) + - [DatasetRunPromptStatsResult](docs/DatasetRunPromptStatsResult.md) + - [DatasetSdkRowsCode](docs/DatasetSdkRowsCode.md) + - [DatasetSdkRowsRequest](docs/DatasetSdkRowsRequest.md) + - [DatasetSdkRowsResponse](docs/DatasetSdkRowsResponse.md) + - [DatasetSdkRowsResult](docs/DatasetSdkRowsResult.md) + - [DatasetStaticColumnRequest](docs/DatasetStaticColumnRequest.md) + - [DatasetTableMetadata](docs/DatasetTableMetadata.md) + - [DatasetTableResponse](docs/DatasetTableResponse.md) + - [DatasetTableResult](docs/DatasetTableResult.md) + - [DatasetUpdateCellValueRequest](docs/DatasetUpdateCellValueRequest.md) + - [DatasetUpdateColumnNameRequest](docs/DatasetUpdateColumnNameRequest.md) + - [DatasetUpdateColumnTypeRequest](docs/DatasetUpdateColumnTypeRequest.md) + - [DeepAnalysisApiResponse](docs/DeepAnalysisApiResponse.md) + - [DeepAnalysisBody](docs/DeepAnalysisBody.md) + - [DeepAnalysisDispatchApiResponse](docs/DeepAnalysisDispatchApiResponse.md) + - [DeepAnalysisDispatchResponse](docs/DeepAnalysisDispatchResponse.md) + - [DeepAnalysisResponse](docs/DeepAnalysisResponse.md) + - [DeleteEvalConfigResponse](docs/DeleteEvalConfigResponse.md) + - [DeleteEvalTemplate](docs/DeleteEvalTemplate.md) + - [DerivedVariableDetail](docs/DerivedVariableDetail.md) + - [DerivedVariableDetailResponse](docs/DerivedVariableDetailResponse.md) + - [DerivedVariableExtractRequest](docs/DerivedVariableExtractRequest.md) + - [DerivedVariablePreviewRequest](docs/DerivedVariablePreviewRequest.md) + - [DevelopDatasetMessageResponse](docs/DevelopDatasetMessageResponse.md) + - [DiscussionCommentRequest](docs/DiscussionCommentRequest.md) + - [DiscussionReactionRequest](docs/DiscussionReactionRequest.md) + - [DiscussionThreadStatusRequest](docs/DiscussionThreadStatusRequest.md) + - [DuplicateDatasetRequest](docs/DuplicateDatasetRequest.md) + - [DuplicateDatasetResponse](docs/DuplicateDatasetResponse.md) + - [DuplicateDatasetResult](docs/DuplicateDatasetResult.md) + - [DuplicateRowsRequest](docs/DuplicateRowsRequest.md) + - [DuplicateRowsResponse](docs/DuplicateRowsResponse.md) + - [DuplicateRowsResult](docs/DuplicateRowsResult.md) + - [DynamicColumnCreateResponse](docs/DynamicColumnCreateResponse.md) + - [DynamicColumnCreateResult](docs/DynamicColumnCreateResult.md) + - [DynamicColumnMessageResponse](docs/DynamicColumnMessageResponse.md) + - [DynamicColumnMessageResult](docs/DynamicColumnMessageResult.md) + - [EditRunPromptColumn](docs/EditRunPromptColumn.md) + - [ErrorLocalizerTaskResponse](docs/ErrorLocalizerTaskResponse.md) + - [ErrorName](docs/ErrorName.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [EvalConfigDefinition](docs/EvalConfigDefinition.md) + - [EvalConfigResponse](docs/EvalConfigResponse.md) + - [EvalConfigStructure](docs/EvalConfigStructure.md) + - [EvalConfigStructureResponse](docs/EvalConfigStructureResponse.md) + - [EvalConfigStructureResult](docs/EvalConfigStructureResult.md) + - [EvalConfigUpdateRequest](docs/EvalConfigUpdateRequest.md) + - [EvalConfigUpdateResponse](docs/EvalConfigUpdateResponse.md) + - [EvalErrorResponse](docs/EvalErrorResponse.md) + - [EvalExplanationCluster](docs/EvalExplanationCluster.md) + - [EvalExplanationSummaryRefreshResponse](docs/EvalExplanationSummaryRefreshResponse.md) + - [EvalExplanationSummaryRefreshResult](docs/EvalExplanationSummaryRefreshResult.md) + - [EvalExplanationSummaryResponse](docs/EvalExplanationSummaryResponse.md) + - [EvalExplanationSummaryResult](docs/EvalExplanationSummaryResult.md) + - [EvalFeedbackListItem](docs/EvalFeedbackListItem.md) + - [EvalFeedbackListResponse](docs/EvalFeedbackListResponse.md) + - [EvalFeedbackListResponseResult](docs/EvalFeedbackListResponseResult.md) + - [EvalFunctionListResponse](docs/EvalFunctionListResponse.md) + - [EvalFunctionListResult](docs/EvalFunctionListResult.md) + - [EvalListFilters](docs/EvalListFilters.md) + - [EvalListRequest](docs/EvalListRequest.md) + - [EvalListResponse](docs/EvalListResponse.md) + - [EvalListResult](docs/EvalListResult.md) + - [EvalMetricEntry](docs/EvalMetricEntry.md) + - [EvalPreviewResponse](docs/EvalPreviewResponse.md) + - [EvalPreviewResult](docs/EvalPreviewResult.md) + - [EvalStructure](docs/EvalStructure.md) + - [EvalStructureResponse](docs/EvalStructureResponse.md) + - [EvalStructureResult](docs/EvalStructureResult.md) + - [EvalSummaryComparisonResponse](docs/EvalSummaryComparisonResponse.md) + - [EvalSummaryResponse](docs/EvalSummaryResponse.md) + - [EvalTemplateBulkDeleteRequest](docs/EvalTemplateBulkDeleteRequest.md) + - [EvalTemplateBulkDeleteResponse](docs/EvalTemplateBulkDeleteResponse.md) + - [EvalTemplateBulkDeleteResponseResult](docs/EvalTemplateBulkDeleteResponseResult.md) + - [EvalTemplateChartPoint](docs/EvalTemplateChartPoint.md) + - [EvalTemplateCreateResponse](docs/EvalTemplateCreateResponse.md) + - [EvalTemplateCreateResponseResult](docs/EvalTemplateCreateResponseResult.md) + - [EvalTemplateCreateV2Request](docs/EvalTemplateCreateV2Request.md) + - [EvalTemplateDetailResponse](docs/EvalTemplateDetailResponse.md) + - [EvalTemplateDetailResponseResult](docs/EvalTemplateDetailResponseResult.md) + - [EvalTemplateListChartsItem](docs/EvalTemplateListChartsItem.md) + - [EvalTemplateListChartsRequest](docs/EvalTemplateListChartsRequest.md) + - [EvalTemplateListChartsResponse](docs/EvalTemplateListChartsResponse.md) + - [EvalTemplateListChartsResponseResult](docs/EvalTemplateListChartsResponseResult.md) + - [EvalTemplateListItem](docs/EvalTemplateListItem.md) + - [EvalTemplateListResponse](docs/EvalTemplateListResponse.md) + - [EvalTemplateListResponseResult](docs/EvalTemplateListResponseResult.md) + - [EvalTemplateSummary](docs/EvalTemplateSummary.md) + - [EvalTemplateUpdateResponse](docs/EvalTemplateUpdateResponse.md) + - [EvalTemplateUpdateResponseResult](docs/EvalTemplateUpdateResponseResult.md) + - [EvalTemplateUpdateV2Request](docs/EvalTemplateUpdateV2Request.md) + - [EvalTemplateVersionCreateRequest](docs/EvalTemplateVersionCreateRequest.md) + - [EvalTemplateVersionItem](docs/EvalTemplateVersionItem.md) + - [EvalTemplateVersionListResponse](docs/EvalTemplateVersionListResponse.md) + - [EvalTemplateVersionListResponseResult](docs/EvalTemplateVersionListResponseResult.md) + - [EvalTemplateVersionResponse](docs/EvalTemplateVersionResponse.md) + - [EvalTemplateVersionResponseResult](docs/EvalTemplateVersionResponseResult.md) + - [EvalTemplateVersionRestoreResponse](docs/EvalTemplateVersionRestoreResponse.md) + - [EvalTemplateVersionRestoreResponseResult](docs/EvalTemplateVersionRestoreResponseResult.md) + - [EvalUsageChartPoint](docs/EvalUsageChartPoint.md) + - [EvalUsageFeedback](docs/EvalUsageFeedback.md) + - [EvalUsageLogItem](docs/EvalUsageLogItem.md) + - [EvalUsageLogs](docs/EvalUsageLogs.md) + - [EvalUsageStats](docs/EvalUsageStats.md) + - [EvalUsageStatsResponse](docs/EvalUsageStatsResponse.md) + - [EvalUsageStatsResponseResult](docs/EvalUsageStatsResponseResult.md) + - [EvaluationResult](docs/EvaluationResult.md) + - [EventsOverTimePoint](docs/EventsOverTimePoint.md) + - [ExecutePromptSimulationRequest](docs/ExecutePromptSimulationRequest.md) + - [ExecutePromptSimulationResponse](docs/ExecutePromptSimulationResponse.md) + - [ExecutePromptSimulationResult](docs/ExecutePromptSimulationResult.md) + - [ExecuteRunTest](docs/ExecuteRunTest.md) + - [ExecutionMetrics](docs/ExecutionMetrics.md) + - [ExecutionRuns](docs/ExecutionRuns.md) + - [ExperimentComparisonColumnMetric](docs/ExperimentComparisonColumnMetric.md) + - [ExperimentComparisonDatasetMetric](docs/ExperimentComparisonDatasetMetric.md) + - [ExperimentComparisonDetail](docs/ExperimentComparisonDetail.md) + - [ExperimentComparisonDetailsResponse](docs/ExperimentComparisonDetailsResponse.md) + - [ExperimentComparisonDetailsResult](docs/ExperimentComparisonDetailsResult.md) + - [ExperimentComparisonMetrics](docs/ExperimentComparisonMetrics.md) + - [ExperimentComparisonNormalizedMetrics](docs/ExperimentComparisonNormalizedMetrics.md) + - [ExperimentComparisonRawMetrics](docs/ExperimentComparisonRawMetrics.md) + - [ExperimentComparisonWeights](docs/ExperimentComparisonWeights.md) + - [ExperimentComparisonWeightsRequest](docs/ExperimentComparisonWeightsRequest.md) + - [ExperimentCreateV2](docs/ExperimentCreateV2.md) + - [ExperimentDatasetComparisonResponse](docs/ExperimentDatasetComparisonResponse.md) + - [ExperimentDatasetComparisonResult](docs/ExperimentDatasetComparisonResult.md) + - [ExperimentDerivedVariablesResponse](docs/ExperimentDerivedVariablesResponse.md) + - [ExperimentDerivedVariablesResult](docs/ExperimentDerivedVariablesResult.md) + - [ExperimentDetailV2](docs/ExperimentDetailV2.md) + - [ExperimentEvaluationColumnStats](docs/ExperimentEvaluationColumnStats.md) + - [ExperimentEvaluationStatsResponse](docs/ExperimentEvaluationStatsResponse.md) + - [ExperimentEvaluationStatsResult](docs/ExperimentEvaluationStatsResult.md) + - [ExperimentEvaluationTokenUsage](docs/ExperimentEvaluationTokenUsage.md) + - [ExperimentFeedbackCreateResponse](docs/ExperimentFeedbackCreateResponse.md) + - [ExperimentFeedbackCreateResult](docs/ExperimentFeedbackCreateResult.md) + - [ExperimentFeedbackDetailItem](docs/ExperimentFeedbackDetailItem.md) + - [ExperimentFeedbackDetailsResponse](docs/ExperimentFeedbackDetailsResponse.md) + - [ExperimentFeedbackDetailsResult](docs/ExperimentFeedbackDetailsResult.md) + - [ExperimentFeedbackSubmitRequest](docs/ExperimentFeedbackSubmitRequest.md) + - [ExperimentFeedbackSubmitResponse](docs/ExperimentFeedbackSubmitResponse.md) + - [ExperimentFeedbackSubmitResult](docs/ExperimentFeedbackSubmitResult.md) + - [ExperimentFeedbackTemplateResponse](docs/ExperimentFeedbackTemplateResponse.md) + - [ExperimentFeedbackTemplateResult](docs/ExperimentFeedbackTemplateResult.md) + - [ExperimentJsonSchemaResponse](docs/ExperimentJsonSchemaResponse.md) + - [ExperimentListV2](docs/ExperimentListV2.md) + - [ExperimentNameSuggestionResponse](docs/ExperimentNameSuggestionResponse.md) + - [ExperimentNameSuggestionResult](docs/ExperimentNameSuggestionResult.md) + - [ExperimentNameValidationResponse](docs/ExperimentNameValidationResponse.md) + - [ExperimentNameValidationResult](docs/ExperimentNameValidationResult.md) + - [ExperimentRerunCells](docs/ExperimentRerunCells.md) + - [ExperimentRerunRequest](docs/ExperimentRerunRequest.md) + - [ExperimentRowDiffCell](docs/ExperimentRowDiffCell.md) + - [ExperimentRowDiffResponse](docs/ExperimentRowDiffResponse.md) + - [ExperimentStatsColumnConfig](docs/ExperimentStatsColumnConfig.md) + - [ExperimentStatsMetadata](docs/ExperimentStatsMetadata.md) + - [ExperimentStatsResponse](docs/ExperimentStatsResponse.md) + - [ExperimentStatsResult](docs/ExperimentStatsResult.md) + - [ExperimentStopResponse](docs/ExperimentStopResponse.md) + - [ExperimentStopResult](docs/ExperimentStopResult.md) + - [ExperimentStopWorkflowsCancelled](docs/ExperimentStopWorkflowsCancelled.md) + - [ExperimentStringResultResponse](docs/ExperimentStringResultResponse.md) + - [ExperimentTableRowsColumnConfig](docs/ExperimentTableRowsColumnConfig.md) + - [ExperimentTableRowsMetadata](docs/ExperimentTableRowsMetadata.md) + - [ExperimentTableRowsResponse](docs/ExperimentTableRowsResponse.md) + - [ExperimentTableRowsResult](docs/ExperimentTableRowsResult.md) + - [ExperimentUpdateV2](docs/ExperimentUpdateV2.md) + - [ExperimentV2DetailResponse](docs/ExperimentV2DetailResponse.md) + - [ExperimentWorkflowResponse](docs/ExperimentWorkflowResponse.md) + - [ExperimentWorkflowResult](docs/ExperimentWorkflowResult.md) + - [ExtractEntitiesRequest](docs/ExtractEntitiesRequest.md) + - [ExtractJsonColumnRequest](docs/ExtractJsonColumnRequest.md) + - [FailedRerunItem](docs/FailedRerunItem.md) + - [FeedDetailApiResponse](docs/FeedDetailApiResponse.md) + - [FeedDetailCore](docs/FeedDetailCore.md) + - [FeedListApiResponse](docs/FeedListApiResponse.md) + - [FeedListResponse](docs/FeedListResponse.md) + - [FeedListRow](docs/FeedListRow.md) + - [FeedSidebar](docs/FeedSidebar.md) + - [FeedSidebarApiResponse](docs/FeedSidebarApiResponse.md) + - [FeedStats](docs/FeedStats.md) + - [FeedStatsApiResponse](docs/FeedStatsApiResponse.md) + - [FeedUpdateBody](docs/FeedUpdateBody.md) + - [Feedback](docs/Feedback.md) + - [GetAnnotationLabelsResponse](docs/GetAnnotationLabelsResponse.md) + - [GetTraceAnnotation](docs/GetTraceAnnotation.md) + - [GetTraceAnnotationValuesResponse](docs/GetTraceAnnotationValuesResponse.md) + - [GetTraceAnnotationValuesResult](docs/GetTraceAnnotationValuesResult.md) + - [GroundTruthConfig](docs/GroundTruthConfig.md) + - [GroundTruthConfigRequest](docs/GroundTruthConfigRequest.md) + - [GroundTruthConfigResponse](docs/GroundTruthConfigResponse.md) + - [GroundTruthConfigResponseResult](docs/GroundTruthConfigResponseResult.md) + - [GroundTruthItem](docs/GroundTruthItem.md) + - [GroundTruthListResponse](docs/GroundTruthListResponse.md) + - [GroundTruthListResponseResult](docs/GroundTruthListResponseResult.md) + - [GroundTruthUploadRequest](docs/GroundTruthUploadRequest.md) + - [GroundTruthUploadResponse](docs/GroundTruthUploadResponse.md) + - [GroundTruthUploadResponseResult](docs/GroundTruthUploadResponseResult.md) + - [HeatmapCell](docs/HeatmapCell.md) + - [HuggingFaceAddRowsRequest](docs/HuggingFaceAddRowsRequest.md) + - [HuggingFaceDatasetConfigRequest](docs/HuggingFaceDatasetConfigRequest.md) + - [HuggingFaceDatasetConfigResponse](docs/HuggingFaceDatasetConfigResponse.md) + - [HuggingFaceDatasetConfigResult](docs/HuggingFaceDatasetConfigResult.md) + - [HuggingFaceDatasetCreateRequest](docs/HuggingFaceDatasetCreateRequest.md) + - [HuggingFaceDatasetDetail](docs/HuggingFaceDatasetDetail.md) + - [HuggingFaceDatasetDetailRequest](docs/HuggingFaceDatasetDetailRequest.md) + - [HuggingFaceDatasetDetailResponse](docs/HuggingFaceDatasetDetailResponse.md) + - [HuggingFaceDatasetDetailResponseResult](docs/HuggingFaceDatasetDetailResponseResult.md) + - [HuggingFaceDatasetListItem](docs/HuggingFaceDatasetListItem.md) + - [HuggingFaceDatasetListRequest](docs/HuggingFaceDatasetListRequest.md) + - [HuggingFaceDatasetListResponse](docs/HuggingFaceDatasetListResponse.md) + - [HuggingFaceDatasetListResponseResult](docs/HuggingFaceDatasetListResponseResult.md) + - [ImportAnnotationEntry](docs/ImportAnnotationEntry.md) + - [ImportAnnotations](docs/ImportAnnotations.md) + - [JsonColumnSchemaEntry](docs/JsonColumnSchemaEntry.md) + - [KeyMoment](docs/KeyMoment.md) + - [LegacyKnowledgeBaseCreateResponse](docs/LegacyKnowledgeBaseCreateResponse.md) + - [LegacyKnowledgeBaseCreateResult](docs/LegacyKnowledgeBaseCreateResult.md) + - [LegacyKnowledgeBaseFileRow](docs/LegacyKnowledgeBaseFileRow.md) + - [LegacyKnowledgeBaseFilesRequest](docs/LegacyKnowledgeBaseFilesRequest.md) + - [LegacyKnowledgeBaseFilesResponse](docs/LegacyKnowledgeBaseFilesResponse.md) + - [LegacyKnowledgeBaseFilesResult](docs/LegacyKnowledgeBaseFilesResult.md) + - [LegacyKnowledgeBaseListResponse](docs/LegacyKnowledgeBaseListResponse.md) + - [LegacyKnowledgeBaseListResult](docs/LegacyKnowledgeBaseListResult.md) + - [LegacyKnowledgeBaseMutationRequest](docs/LegacyKnowledgeBaseMutationRequest.md) + - [LegacyKnowledgeBaseMutationResponse](docs/LegacyKnowledgeBaseMutationResponse.md) + - [LegacyKnowledgeBaseMutationResult](docs/LegacyKnowledgeBaseMutationResult.md) + - [LegacyKnowledgeBaseOption](docs/LegacyKnowledgeBaseOption.md) + - [LegacyKnowledgeBaseSdkCodeResponse](docs/LegacyKnowledgeBaseSdkCodeResponse.md) + - [LegacyKnowledgeBaseSdkCodeResult](docs/LegacyKnowledgeBaseSdkCodeResult.md) + - [LegacyKnowledgeBaseTableColumn](docs/LegacyKnowledgeBaseTableColumn.md) + - [LegacyKnowledgeBaseTableResponse](docs/LegacyKnowledgeBaseTableResponse.md) + - [LegacyKnowledgeBaseTableResult](docs/LegacyKnowledgeBaseTableResult.md) + - [LegacyKnowledgeBaseTableRow](docs/LegacyKnowledgeBaseTableRow.md) + - [ListAlertLogs200Response](docs/ListAlertLogs200Response.md) + - [ListAlerts200Response](docs/ListAlerts200Response.md) + - [ListAnnotationQueueItems200Response](docs/ListAnnotationQueueItems200Response.md) + - [ListAnnotationQueues200Response](docs/ListAnnotationQueues200Response.md) + - [ListExperiments200Response](docs/ListExperiments200Response.md) + - [ListPersonas200Response](docs/ListPersonas200Response.md) + - [ListTraceProjects200Response](docs/ListTraceProjects200Response.md) + - [LocalFileDatasetCreateStartedResponse](docs/LocalFileDatasetCreateStartedResponse.md) + - [LocalFileDatasetCreateStartedResult](docs/LocalFileDatasetCreateStartedResult.md) + - [ManagementAPIErrorResponse](docs/ManagementAPIErrorResponse.md) + - [ManualDatasetCreateRequest](docs/ManualDatasetCreateRequest.md) + - [ManualDatasetCreateResponse](docs/ManualDatasetCreateResponse.md) + - [ManualDatasetCreateResult](docs/ManualDatasetCreateResult.md) + - [MemberListItem](docs/MemberListItem.md) + - [MemberListResponse](docs/MemberListResponse.md) + - [MemberListResult](docs/MemberListResult.md) + - [MemberRemove](docs/MemberRemove.md) + - [MemberRoleUpdate](docs/MemberRoleUpdate.md) + - [MemberRoleUpdateResponse](docs/MemberRoleUpdateResponse.md) + - [MemberRoleUpdateResult](docs/MemberRoleUpdateResult.md) + - [MemberUserMutationResponse](docs/MemberUserMutationResponse.md) + - [MemberUserMutationResult](docs/MemberUserMutationResult.md) + - [MemberWorkspaceAccess](docs/MemberWorkspaceAccess.md) + - [MergeDatasetRequest](docs/MergeDatasetRequest.md) + - [MergeDatasetResponse](docs/MergeDatasetResponse.md) + - [MergeDatasetResult](docs/MergeDatasetResult.md) + - [ModelHubAnnotationQueuesAutomationRulesList200Response](docs/ModelHubAnnotationQueuesAutomationRulesList200Response.md) + - [ModelHubApiKeysList200Response](docs/ModelHubApiKeysList200Response.md) + - [ModelHubErrorResponse](docs/ModelHubErrorResponse.md) + - [ModelHubPaginatedResponse](docs/ModelHubPaginatedResponse.md) + - [ModelHubPromptHistoryExecutionsList200Response](docs/ModelHubPromptHistoryExecutionsList200Response.md) + - [ModelHubPromptLabelsList200Response](docs/ModelHubPromptLabelsList200Response.md) + - [ModelHubPromptTemplatesList200Response](docs/ModelHubPromptTemplatesList200Response.md) + - [ModelHubScoresList200Response](docs/ModelHubScoresList200Response.md) + - [ModelHubStringResultResponse](docs/ModelHubStringResultResponse.md) + - [ModelHubTextErrorResponse](docs/ModelHubTextErrorResponse.md) + - [ObserveGraphDataPoint](docs/ObserveGraphDataPoint.md) + - [ObserveGraphDataRequest](docs/ObserveGraphDataRequest.md) + - [ObserveGraphDataResponse](docs/ObserveGraphDataResponse.md) + - [ObserveGraphDataResult](docs/ObserveGraphDataResult.md) + - [OptimiserAnalysisRefreshResponse](docs/OptimiserAnalysisRefreshResponse.md) + - [OptimiserAnalysisRefreshResult](docs/OptimiserAnalysisRefreshResult.md) + - [OptimiserAnalysisResponse](docs/OptimiserAnalysisResponse.md) + - [OptimiserAnalysisResultPayload](docs/OptimiserAnalysisResultPayload.md) + - [Organization](docs/Organization.md) + - [OverviewApiResponse](docs/OverviewApiResponse.md) + - [OverviewResponse](docs/OverviewResponse.md) + - [PatternInsight](docs/PatternInsight.md) + - [PatternSummary](docs/PatternSummary.md) + - [PerformanceSummary](docs/PerformanceSummary.md) + - [Persona](docs/Persona.md) + - [PersonaCreate](docs/PersonaCreate.md) + - [PersonaDuplicateRequest](docs/PersonaDuplicateRequest.md) + - [PersonaDuplicateResponse](docs/PersonaDuplicateResponse.md) + - [PersonaFieldOptions](docs/PersonaFieldOptions.md) + - [PersonaList](docs/PersonaList.md) + - [PreviewDatasetOperationRequest](docs/PreviewDatasetOperationRequest.md) + - [PreviewDatasetOperationResponse](docs/PreviewDatasetOperationResponse.md) + - [PreviewDatasetOperationResult](docs/PreviewDatasetOperationResult.md) + - [PreviewDatasetOperationResultItem](docs/PreviewDatasetOperationResultItem.md) + - [PreviewRunEvalRequest](docs/PreviewRunEvalRequest.md) + - [PreviewRunPrompt](docs/PreviewRunPrompt.md) + - [Project](docs/Project.md) + - [PromptConfig](docs/PromptConfig.md) + - [PromptConfigEntry](docs/PromptConfigEntry.md) + - [PromptDerivedVariablesResponse](docs/PromptDerivedVariablesResponse.md) + - [PromptDerivedVariablesResult](docs/PromptDerivedVariablesResult.md) + - [PromptHistoryExecution](docs/PromptHistoryExecution.md) + - [PromptLabel](docs/PromptLabel.md) + - [PromptSimulationListResponse](docs/PromptSimulationListResponse.md) + - [PromptSimulationListResult](docs/PromptSimulationListResult.md) + - [PromptSimulationRunResponse](docs/PromptSimulationRunResponse.md) + - [PromptSimulationScenarioItem](docs/PromptSimulationScenarioItem.md) + - [PromptSimulationScenariosResponse](docs/PromptSimulationScenariosResponse.md) + - [PromptSimulationScenariosResult](docs/PromptSimulationScenariosResult.md) + - [PromptSimulationTemplateSummary](docs/PromptSimulationTemplateSummary.md) + - [PromptSimulationUpdateRequest](docs/PromptSimulationUpdateRequest.md) + - [PromptTemplate](docs/PromptTemplate.md) + - [ProviderStatusItem](docs/ProviderStatusItem.md) + - [ProviderStatusResponse](docs/ProviderStatusResponse.md) + - [ProviderStatusResult](docs/ProviderStatusResult.md) + - [QueueAddItemsResponse](docs/QueueAddItemsResponse.md) + - [QueueAddItemsResult](docs/QueueAddItemsResult.md) + - [QueueAddLabelResponse](docs/QueueAddLabelResponse.md) + - [QueueAddLabelResult](docs/QueueAddLabelResult.md) + - [QueueAgreementAnnotatorPair](docs/QueueAgreementAnnotatorPair.md) + - [QueueAgreementLabel](docs/QueueAgreementLabel.md) + - [QueueAgreementResponse](docs/QueueAgreementResponse.md) + - [QueueAgreementResult](docs/QueueAgreementResult.md) + - [QueueAnalyticsAnnotatorPerformance](docs/QueueAnalyticsAnnotatorPerformance.md) + - [QueueAnalyticsResponse](docs/QueueAnalyticsResponse.md) + - [QueueAnalyticsResult](docs/QueueAnalyticsResult.md) + - [QueueAnalyticsThroughput](docs/QueueAnalyticsThroughput.md) + - [QueueAnalyticsThroughputDaily](docs/QueueAnalyticsThroughputDaily.md) + - [QueueAnnotateDetailResponse](docs/QueueAnnotateDetailResponse.md) + - [QueueAnnotateDetailResult](docs/QueueAnnotateDetailResult.md) + - [QueueAnnotatorNested](docs/QueueAnnotatorNested.md) + - [QueueAssignItemsResponse](docs/QueueAssignItemsResponse.md) + - [QueueAssignItemsResult](docs/QueueAssignItemsResult.md) + - [QueueBulkRemoveItemsResponse](docs/QueueBulkRemoveItemsResponse.md) + - [QueueBulkRemoveItemsResult](docs/QueueBulkRemoveItemsResult.md) + - [QueueDefaultQueue](docs/QueueDefaultQueue.md) + - [QueueDefaultRequest](docs/QueueDefaultRequest.md) + - [QueueDefaultResponse](docs/QueueDefaultResponse.md) + - [QueueDefaultResult](docs/QueueDefaultResult.md) + - [QueueDiscussionResponse](docs/QueueDiscussionResponse.md) + - [QueueDiscussionResult](docs/QueueDiscussionResult.md) + - [QueueExportAnnotationsResponse](docs/QueueExportAnnotationsResponse.md) + - [QueueExportColumnMapping](docs/QueueExportColumnMapping.md) + - [QueueExportDefaultMapping](docs/QueueExportDefaultMapping.md) + - [QueueExportField](docs/QueueExportField.md) + - [QueueExportFieldsResponse](docs/QueueExportFieldsResponse.md) + - [QueueExportFieldsResult](docs/QueueExportFieldsResult.md) + - [QueueExportToDatasetRequest](docs/QueueExportToDatasetRequest.md) + - [QueueExportToDatasetResponse](docs/QueueExportToDatasetResponse.md) + - [QueueExportToDatasetResult](docs/QueueExportToDatasetResult.md) + - [QueueForSourceEntry](docs/QueueForSourceEntry.md) + - [QueueForSourceItem](docs/QueueForSourceItem.md) + - [QueueForSourceQueue](docs/QueueForSourceQueue.md) + - [QueueForSourceResponse](docs/QueueForSourceResponse.md) + - [QueueHardDeleteRequest](docs/QueueHardDeleteRequest.md) + - [QueueHardDeleteResponse](docs/QueueHardDeleteResponse.md) + - [QueueHardDeleteResult](docs/QueueHardDeleteResult.md) + - [QueueImportAnnotationsResponse](docs/QueueImportAnnotationsResponse.md) + - [QueueImportAnnotationsResult](docs/QueueImportAnnotationsResult.md) + - [QueueItem](docs/QueueItem.md) + - [QueueItemAnnotationsResponse](docs/QueueItemAnnotationsResponse.md) + - [QueueItemNavigationRequest](docs/QueueItemNavigationRequest.md) + - [QueueLabelNested](docs/QueueLabelNested.md) + - [QueueLabelRequest](docs/QueueLabelRequest.md) + - [QueueLabelResult](docs/QueueLabelResult.md) + - [QueueNavigationResponse](docs/QueueNavigationResponse.md) + - [QueueNavigationResult](docs/QueueNavigationResult.md) + - [QueueNextItemResponse](docs/QueueNextItemResponse.md) + - [QueueNextItemResult](docs/QueueNextItemResult.md) + - [QueueProgressAnnotatorStat](docs/QueueProgressAnnotatorStat.md) + - [QueueProgressResponse](docs/QueueProgressResponse.md) + - [QueueProgressResult](docs/QueueProgressResult.md) + - [QueueProgressUserProgress](docs/QueueProgressUserProgress.md) + - [QueueReleaseReservationResponse](docs/QueueReleaseReservationResponse.md) + - [QueueReleaseReservationResult](docs/QueueReleaseReservationResult.md) + - [QueueRemoveLabelResponse](docs/QueueRemoveLabelResponse.md) + - [QueueRemoveLabelResult](docs/QueueRemoveLabelResult.md) + - [QueueReviewItemResponse](docs/QueueReviewItemResponse.md) + - [QueueReviewItemResult](docs/QueueReviewItemResult.md) + - [QueueStatusRequest](docs/QueueStatusRequest.md) + - [QueueStatusResponse](docs/QueueStatusResponse.md) + - [QueueSubmitAnnotationsResponse](docs/QueueSubmitAnnotationsResponse.md) + - [QueueSubmitAnnotationsResult](docs/QueueSubmitAnnotationsResult.md) + - [Recommendation](docs/Recommendation.md) + - [RepresentativeTrace](docs/RepresentativeTrace.md) + - [ReqDataConfig](docs/ReqDataConfig.md) + - [RerunCallsResponse](docs/RerunCallsResponse.md) + - [RerunCellEntry](docs/RerunCellEntry.md) + - [ReviewItemRequest](docs/ReviewItemRequest.md) + - [ReviewLabelCommentRequest](docs/ReviewLabelCommentRequest.md) + - [RootCause](docs/RootCause.md) + - [RulesInner](docs/RulesInner.md) + - [RunNewEvalsOnTestExecution](docs/RunNewEvalsOnTestExecution.md) + - [RunNewEvalsResponse](docs/RunNewEvalsResponse.md) + - [RunPromptChoiceOption](docs/RunPromptChoiceOption.md) + - [RunPromptColumnConfigResponse](docs/RunPromptColumnConfigResponse.md) + - [RunPromptColumnConfigResult](docs/RunPromptColumnConfigResult.md) + - [RunPromptColumnPreviewResponse](docs/RunPromptColumnPreviewResponse.md) + - [RunPromptColumnPreviewResult](docs/RunPromptColumnPreviewResult.md) + - [RunPromptOptionsResponse](docs/RunPromptOptionsResponse.md) + - [RunPromptOptionsResult](docs/RunPromptOptionsResult.md) + - [RunPromptToolOption](docs/RunPromptToolOption.md) + - [RunTestAnalytics](docs/RunTestAnalytics.md) + - [RunTestCallExecutionsResponse](docs/RunTestCallExecutionsResponse.md) + - [RunTestChatExecutionResponse](docs/RunTestChatExecutionResponse.md) + - [RunTestChatExecutionResult](docs/RunTestChatExecutionResult.md) + - [RunTestComponentsUpdate](docs/RunTestComponentsUpdate.md) + - [RunTestErrorResponse](docs/RunTestErrorResponse.md) + - [RunTestExecutionResponse](docs/RunTestExecutionResponse.md) + - [RunTestKPIsResponse](docs/RunTestKPIsResponse.md) + - [RunTestMessageResponse](docs/RunTestMessageResponse.md) + - [RunTestNameResponse](docs/RunTestNameResponse.md) + - [RunTestNameResult](docs/RunTestNameResult.md) + - [RunTestResponse](docs/RunTestResponse.md) + - [RunTestScenarioItemResponse](docs/RunTestScenarioItemResponse.md) + - [SDKCICDEvaluationRunAccepted](docs/SDKCICDEvaluationRunAccepted.md) + - [SDKCICDEvaluationRunAcceptedResponse](docs/SDKCICDEvaluationRunAcceptedResponse.md) + - [SDKCICDEvaluationRunSummary](docs/SDKCICDEvaluationRunSummary.md) + - [SDKCICDEvaluationRunsResponse](docs/SDKCICDEvaluationRunsResponse.md) + - [SDKCICDEvaluationRunsResult](docs/SDKCICDEvaluationRunsResult.md) + - [SDKConfigureEvaluationsRequest](docs/SDKConfigureEvaluationsRequest.md) + - [SDKConfigureEvaluationsResponse](docs/SDKConfigureEvaluationsResponse.md) + - [SDKErrorResponse](docs/SDKErrorResponse.md) + - [SDKEvalTemplate](docs/SDKEvalTemplate.md) + - [SDKEvalTemplateResponse](docs/SDKEvalTemplateResponse.md) + - [SDKGetEvalsResponse](docs/SDKGetEvalsResponse.md) + - [SDKMessageResult](docs/SDKMessageResult.md) + - [SDKSimulationAnalyticsResponse](docs/SDKSimulationAnalyticsResponse.md) + - [SDKSimulationAnalyticsResult](docs/SDKSimulationAnalyticsResult.md) + - [SDKSimulationMetricsResponse](docs/SDKSimulationMetricsResponse.md) + - [SDKSimulationMetricsResult](docs/SDKSimulationMetricsResult.md) + - [SDKSimulationRunsResponse](docs/SDKSimulationRunsResponse.md) + - [SDKSimulationRunsResult](docs/SDKSimulationRunsResult.md) + - [SDKStandaloneEvalInput](docs/SDKStandaloneEvalInput.md) + - [SDKStandaloneEvalRequest](docs/SDKStandaloneEvalRequest.md) + - [SDKStandaloneEvalResponse](docs/SDKStandaloneEvalResponse.md) + - [SDKStandaloneEvalResultItem](docs/SDKStandaloneEvalResultItem.md) + - [SDKStandaloneEvalV2Request](docs/SDKStandaloneEvalV2Request.md) + - [SDKStandaloneEvalV2Response](docs/SDKStandaloneEvalV2Response.md) + - [SDKStandaloneEvalV2Result](docs/SDKStandaloneEvalV2Result.md) + - [ScenarioAddColumnsRequest](docs/ScenarioAddColumnsRequest.md) + - [ScenarioAddColumnsResponse](docs/ScenarioAddColumnsResponse.md) + - [ScenarioAddRowsRequest](docs/ScenarioAddRowsRequest.md) + - [ScenarioAddRowsResponse](docs/ScenarioAddRowsResponse.md) + - [ScenarioCreateRequest](docs/ScenarioCreateRequest.md) + - [ScenarioCreateResponse](docs/ScenarioCreateResponse.md) + - [ScenarioDeleteResponse](docs/ScenarioDeleteResponse.md) + - [ScenarioDetailResponse](docs/ScenarioDetailResponse.md) + - [ScenarioEditPromptsRequest](docs/ScenarioEditPromptsRequest.md) + - [ScenarioEditRequest](docs/ScenarioEditRequest.md) + - [ScenarioEditResponse](docs/ScenarioEditResponse.md) + - [ScenarioErrorResponse](docs/ScenarioErrorResponse.md) + - [ScenarioListResponse](docs/ScenarioListResponse.md) + - [ScenarioPromptItem](docs/ScenarioPromptItem.md) + - [ScenarioPromptsUpdateResponse](docs/ScenarioPromptsUpdateResponse.md) + - [ScenarioResponse](docs/ScenarioResponse.md) + - [Score](docs/Score.md) + - [ScoreDeleteResponse](docs/ScoreDeleteResponse.md) + - [ScoreForSourceResponse](docs/ScoreForSourceResponse.md) + - [ScoreResponse](docs/ScoreResponse.md) + - [ScoreTrend](docs/ScoreTrend.md) + - [Selection](docs/Selection.md) + - [SendChatRequest](docs/SendChatRequest.md) + - [SessionComparisonResponse](docs/SessionComparisonResponse.md) + - [SessionComparisonResult](docs/SessionComparisonResult.md) + - [SidebarAIMetadata](docs/SidebarAIMetadata.md) + - [SidebarTimeline](docs/SidebarTimeline.md) + - [SimulateApiPersonasFieldOptions200Response](docs/SimulateApiPersonasFieldOptions200Response.md) + - [SimulateApiPersonasSystemPersonas200Response](docs/SimulateApiPersonasSystemPersonas200Response.md) + - [SimulateEvalConfigResponse](docs/SimulateEvalConfigResponse.md) + - [SimulatorAgent](docs/SimulatorAgent.md) + - [SimulatorAgentDeleteResponse](docs/SimulatorAgentDeleteResponse.md) + - [SimulatorAgentListResponse](docs/SimulatorAgentListResponse.md) + - [StartEvalsProcessRequest](docs/StartEvalsProcessRequest.md) + - [StopUserEvalRequest](docs/StopUserEvalRequest.md) + - [SubmitAnnotationEntry](docs/SubmitAnnotationEntry.md) + - [SubmitAnnotations](docs/SubmitAnnotations.md) + - [SwitchWorkspace](docs/SwitchWorkspace.md) + - [SwitchWorkspaceResponse](docs/SwitchWorkspaceResponse.md) + - [SwitchWorkspaceResult](docs/SwitchWorkspaceResult.md) + - [SyntheticData](docs/SyntheticData.md) + - [SyntheticDatasetConfig](docs/SyntheticDatasetConfig.md) + - [SyntheticDatasetConfigPayload](docs/SyntheticDatasetConfigPayload.md) + - [SyntheticDatasetConfigResponse](docs/SyntheticDatasetConfigResponse.md) + - [SyntheticDatasetConfigResult](docs/SyntheticDatasetConfigResult.md) + - [SyntheticDatasetCreateStartedResponse](docs/SyntheticDatasetCreateStartedResponse.md) + - [SyntheticDatasetCreateStartedResult](docs/SyntheticDatasetCreateStartedResult.md) + - [SyntheticDatasetCreation](docs/SyntheticDatasetCreation.md) + - [SyntheticDatasetUpdateData](docs/SyntheticDatasetUpdateData.md) + - [SyntheticDatasetUpdateResponse](docs/SyntheticDatasetUpdateResponse.md) + - [SyntheticDatasetUpdateResult](docs/SyntheticDatasetUpdateResult.md) + - [TestExecution](docs/TestExecution.md) + - [TestExecutionAnalytics](docs/TestExecutionAnalytics.md) + - [TestExecutionBulkDelete](docs/TestExecutionBulkDelete.md) + - [TestExecutionBulkDeleteResponse](docs/TestExecutionBulkDeleteResponse.md) + - [TestExecutionChatBatchResponse](docs/TestExecutionChatBatchResponse.md) + - [TestExecutionChatBatchResult](docs/TestExecutionChatBatchResult.md) + - [TestExecutionColumnOrder](docs/TestExecutionColumnOrder.md) + - [TestExecutionColumnOrderResponse](docs/TestExecutionColumnOrderResponse.md) + - [TestExecutionDetailResponse](docs/TestExecutionDetailResponse.md) + - [TestExecutionItemResponse](docs/TestExecutionItemResponse.md) + - [TestExecutionRerun](docs/TestExecutionRerun.md) + - [TestExecutionRerunResponse](docs/TestExecutionRerunResponse.md) + - [TestExecutionRerunResult](docs/TestExecutionRerunResult.md) + - [TestExecutionStatusSummary](docs/TestExecutionStatusSummary.md) + - [TestExecutionTranscriptCall](docs/TestExecutionTranscriptCall.md) + - [TestExecutionTranscriptsResponse](docs/TestExecutionTranscriptsResponse.md) + - [Trace](docs/Trace.md) + - [TraceAnnotationNoteResponse](docs/TraceAnnotationNoteResponse.md) + - [TraceAnnotationValueResponse](docs/TraceAnnotationValueResponse.md) + - [TraceEvidence](docs/TraceEvidence.md) + - [TracePreview](docs/TracePreview.md) + - [TraceSession](docs/TraceSession.md) + - [TraceSessionGraphDataRequest](docs/TraceSessionGraphDataRequest.md) + - [TraceSummary](docs/TraceSummary.md) + - [TraceTagsUpdate](docs/TraceTagsUpdate.md) + - [TracerTraceAnnotationList200Response](docs/TracerTraceAnnotationList200Response.md) + - [TracerTraceList200Response](docs/TracerTraceList200Response.md) + - [TracerTraceSessionList200Response](docs/TracerTraceSessionList200Response.md) + - [TracesAggregates](docs/TracesAggregates.md) + - [TracesListRow](docs/TracesListRow.md) + - [TracesTabApiResponse](docs/TracesTabApiResponse.md) + - [TracesTabResponse](docs/TracesTabResponse.md) + - [TrendMetric](docs/TrendMetric.md) + - [TrendPoint](docs/TrendPoint.md) + - [TrendsTabApiResponse](docs/TrendsTabApiResponse.md) + - [TrendsTabResponse](docs/TrendsTabResponse.md) + - [UpdateRunTest](docs/UpdateRunTest.md) + - [User](docs/User.md) + - [UserAlertMonitor](docs/UserAlertMonitor.md) + - [UserAlertMonitorDuplicate](docs/UserAlertMonitorDuplicate.md) + - [UserAlertMonitorDuplicateResponse](docs/UserAlertMonitorDuplicateResponse.md) + - [UserAlertMonitorDuplicateResult](docs/UserAlertMonitorDuplicateResult.md) + - [UserAlertMonitorLog](docs/UserAlertMonitorLog.md) + - [UserAlertMonitorMetricOption](docs/UserAlertMonitorMetricOption.md) + - [UserAlertMonitorMetricOptionsResponse](docs/UserAlertMonitorMetricOptionsResponse.md) + - [UserCodeExampleResponse](docs/UserCodeExampleResponse.md) + - [UserEvalMutationRequest](docs/UserEvalMutationRequest.md) + - [UserEvalUpdateRequest](docs/UserEvalUpdateRequest.md) + - [UserInfoOrganization](docs/UserInfoOrganization.md) + - [UserInfoResponse](docs/UserInfoResponse.md) + - [UserInfoTwoFactorMethods](docs/UserInfoTwoFactorMethods.md) + - [UsersResponse](docs/UsersResponse.md) + - [UsersResult](docs/UsersResult.md) + - [VectorDBColumnRequest](docs/VectorDBColumnRequest.md) + - [WorkspaceAccessInput](docs/WorkspaceAccessInput.md) + - [WorkspaceAdminSummary](docs/WorkspaceAdminSummary.md) + - [WorkspaceListItemResponse](docs/WorkspaceListItemResponse.md) + - [WorkspaceListPaginatedResponse](docs/WorkspaceListPaginatedResponse.md) + - [WorkspaceMemberRemove](docs/WorkspaceMemberRemove.md) + - [WorkspaceMemberRoleUpdate](docs/WorkspaceMemberRoleUpdate.md) + - [WorkspaceMemberRoleUpdateResponse](docs/WorkspaceMemberRoleUpdateResponse.md) + - [WorkspaceMemberRoleUpdateResult](docs/WorkspaceMemberRoleUpdateResult.md) + - [WorkspaceSummary](docs/WorkspaceSummary.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### X-Api-Key + +- **Type**: API key +- **API key parameter name**: X-Api-Key +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Api-Key and passed in as the auth context for each request. + +Example + +```go +auth := context.WithValue( + context.Background(), + futureagi.ContextAPIKeys, + map[string]futureagi.APIKey{ + "X-Api-Key": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + +### X-Secret-Key + +- **Type**: API key +- **API key parameter name**: X-Secret-Key +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Secret-Key and passed in as the auth context for each request. + +Example + +```go +auth := context.WithValue( + context.Background(), + futureagi.ContextAPIKeys, + map[string]futureagi.APIKey{ + "X-Secret-Key": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +help@futureagi.com + diff --git a/go/futureagi/api/openapi.yaml b/go/futureagi/api/openapi.yaml new file mode 100644 index 0000000..2b3593d --- /dev/null +++ b/go/futureagi/api/openapi.yaml @@ -0,0 +1,56767 @@ +openapi: 3.0.3 +info: + contact: + email: help@futureagi.com + description: The endpoints defined below allow users to programmatically carry out + various actions on the Future AGI platform. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + termsOfService: https://futureagi.com/legal + title: Future AGI Public SDK API + version: 0.1.0 +servers: +- url: https://api.futureagi.com +security: +- X-Api-Key: [] +- X-Secret-Key: [] +tags: +- name: Alerts +- name: Annotation Queue Discussion +- name: Annotation Queue Items +- name: Annotation Queue Review +- name: Annotation Queues +- name: Datasets +- name: Experiments +- name: Run Tests - Eval Configs +- name: Run Tests - Eval Summary +- name: Scenarios +- name: Simulation Agent Definitions +- name: Simulation Personas +- name: Simulation Run Tests +- name: Simulation Scenarios +- name: Simulation Test Executions +- name: Simulations +- name: Tracing +- name: Users +- name: accounts +- name: model-hub +- name: sdk +- name: simulate +- name: tracer +paths: + /accounts/organization/members/: + get: + description: |- + Returns UNION of active members + pending/expired invites. + Status is derived at query time (Active / Pending / Expired). + operationId: listOrganizationMembers + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: false + in: query + name: filter_status + required: false + schema: + items: + enum: + - Active + - Pending + - Expired + - Deactivated + type: string + type: array + style: form + - explode: false + in: query + name: filter_role + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: -created_at + enum: + - name + - -name + - email + - -email + - status + - -status + - type + - -type + - date_joined + - -date_joined + - created_at + - -created_at + - org_level + - -org_level + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /accounts/organization/members/ + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/organization/members/reactivate/: + post: + description: |- + Re-activates a deactivated org membership and restores workspace + memberships that were soft-deactivated during removal. If no prior + workspace memberships exist, the user is added to the default workspace. + operationId: accounts_organization_members_reactivate_create + requestBody: + $ref: '#/components/requestBodies/MemberRemove' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberUserMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /accounts/organization/members/reactivate/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/organization/members/remove/: + delete: + description: |- + Soft-deactivates OrganizationMembership and cascades to workspace + memberships. Signals handle Redis clear + audit log. + operationId: accounts_organization_members_remove_delete + requestBody: + $ref: '#/components/requestBodies/MemberRemove' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberUserMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: DELETE /accounts/organization/members/remove/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/organization/members/role/: + post: + description: Update a member's org level and/or workspace level. + operationId: accounts_organization_members_role_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MemberRoleUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberRoleUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /accounts/organization/members/role/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/user-info/: + get: + description: "" + operationId: getCurrentUser + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfoResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Users + /accounts/workspace/list/: + get: + description: Get paginated list of workspaces + operationId: listWorkspaces + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: "" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceListPaginatedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/workspace/switch/: + post: + description: Switch to a different workspace with proper validation + operationId: switchWorkspace + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SwitchWorkspace' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SwitchWorkspaceResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/workspace/{workspace_id}/members/: + get: + description: |- + Returns members of a specific workspace. + Org Admin+ users who auto-access are included with derived WS Admin role. + operationId: listWorkspaceMembers + parameters: + - explode: false + in: path + name: workspace_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: false + in: query + name: filter_status + required: false + schema: + items: + enum: + - Active + - Pending + - Expired + type: string + type: array + style: form + - explode: false + in: query + name: filter_role + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: -created_at + enum: + - name + - -name + - email + - -email + - status + - -status + - type + - -type + - date_joined + - -date_joined + - created_at + - -created_at + - ws_level + - -ws_level + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /accounts/workspace//members/ + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/workspace/{workspace_id}/members/remove/: + delete: + description: Remove a member from a workspace only (keeps org membership). + operationId: accounts_workspace_members_remove_delete + parameters: + - explode: false + in: path + name: workspace_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceMemberRemove' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberUserMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: DELETE /accounts/workspace//members/remove/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + /accounts/workspace/{workspace_id}/members/role/: + post: + description: Update a member's workspace role. + operationId: accounts_workspace_members_role_create + parameters: + - explode: false + in: path + name: workspace_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceMemberRoleUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceMemberRoleUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /accounts/workspace//members/role/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/: + get: + description: "" + operationId: listAnnotationQueues + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_counts + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAnnotationQueues_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + post: + description: "" + operationId: createAnnotationQueue + requestBody: + $ref: '#/components/requestBodies/AnnotationQueue' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + /model-hub/annotation-queues/for-source/: + get: + description: |- + Find annotation queues for a given source that the current user can annotate. + Includes queues where: + - The source is a queue item AND the user is an annotator in that queue + (regardless of whether the item is explicitly assigned to them) + + Query params: + - source_type, source_id (single source) + - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + operationId: model-hub_annotation-queues_for_source + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: source_type + required: false + schema: + enum: + - call_execution + - dataset_row + - observation_span + - prototype_run + - trace + - trace_session + type: string + style: form + - explode: true + in: query + name: source_id + required: false + schema: + type: string + style: form + - explode: true + in: query + name: sources + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueForSourceResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/get-or-create-default/: + post: + description: |- + Get or create the default annotation queue for a project, dataset, or agent definition. + Default queues are open to all org members (no annotator restriction). + + Body params (one of): + - project_id + - dataset_id + - agent_definition_id + operationId: model-hub_annotation-queues_get_or_create_default + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDefaultRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDefaultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{id}/: + delete: + description: |- + ``BaseModel.delete()`` flips ``deleted=True`` instead of removing + the row. Attached automation rules go dormant (the scheduler + filters ``queue__deleted=False``), items stay invisible but + recoverable, label bindings preserved. + + For truly destructive removal, use the ``hard-delete`` action + below. + operationId: archiveAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Archive a queue (soft delete). + tags: + - Annotation Queues + get: + description: "" + operationId: getAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + patch: + description: "" + operationId: updateAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationQueue' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + put: + description: Only managers of the queue may update queue settings. + operationId: model-hub_annotation-queues_update + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationQueue' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotation-queues/{id}/add-label/: + post: + description: |- + Add a label to an annotation queue. + Labels apply to all sources in the queue's project (for default queues). + Queue items are created lazily when someone actually annotates. + operationId: addAnnotationQueueLabel + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueLabelRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAddLabelResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{id}/agreement/: + get: + description: Calculate inter-annotator agreement metrics. + operationId: getAnnotationQueueAgreement + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAgreementResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + /model-hub/annotation-queues/{id}/analytics/: + get: + description: "Queue analytics: throughput, annotator performance, label distribution." + operationId: getAnnotationQueueAnalytics + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAnalyticsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + /model-hub/annotation-queues/{id}/export-fields/: + get: + description: Return source/label/attribute fields available for dataset export. + operationId: listAnnotationQueueExportFields + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportFieldsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + /model-hub/annotation-queues/{id}/export-to-dataset/: + post: + description: Export queue items to a dataset using a user-editable column mapping. + operationId: exportAnnotationQueueToDataset + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportToDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportToDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{id}/export/: + get: + description: Export all items with their annotations. + operationId: exportAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: true + in: query + name: export_format + required: false + schema: + enum: + - json + - csv + type: string + style: form + - explode: true + in: query + name: status + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{id}/hard-delete/: + post: + description: |- + Hard delete cascades through the FK graph (rules, items, + assignments, scores) via ``on_delete=CASCADE``. There is no + recovery — callers must pass ``force=true`` AND the queue's + exact name as ``confirm_name`` so the action can't fire from + a typo'd request. + operationId: model-hub_annotation-queues_hard_delete + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueHardDeleteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueHardDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Permanently remove a queue + everything attached. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{id}/progress/: + get: + description: "" + operationId: getAnnotationQueueProgress + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueProgressResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + /model-hub/annotation-queues/{id}/remove-label/: + post: + description: Remove a label from an annotation queue. + operationId: removeAnnotationQueueLabel + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueLabelRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueRemoveLabelResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{id}/restore/: + post: + description: "" + operationId: model-hub_annotation-queues_restore + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueStatusResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{id}/update-status/: + post: + description: "" + operationId: updateAnnotationQueueStatus + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueStatusRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueStatusResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/automation-rules/: + get: + description: "" + operationId: model-hub_annotation-queues_automation-rules_list + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_annotation_queues_automation_rules_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + post: + description: "" + operationId: model-hub_annotation-queues_automation-rules_create + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AutomationRule' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/: + delete: + description: "" + operationId: model-hub_annotation-queues_automation-rules_delete + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: "" + operationId: model-hub_annotation-queues_automation-rules_read + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + patch: + description: "" + operationId: model-hub_annotation-queues_automation-rules_partial_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AutomationRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + put: + description: "" + operationId: model-hub_annotation-queues_automation-rules_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AutomationRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/: + post: + description: |- + Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish + in the HTTP request and return 200 with the result — fast feedback + for the common case. Large runs (mostly first-ever runs on backlogs + or rules with wide filters) hand the work to a Temporal activity and + return 202 immediately. The activity emails creator + queue managers + on completion. + + The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- + 100ms even on 10M+ row trace tables — so this branch costs little + even when it ends up taking the sync path. + operationId: model-hub_annotation-queues_automation-rules_evaluate + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluateResponse' + description: Response + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluateAcceptedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Trigger a manual rule run with a sync-or-async branch. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/: + get: + description: Preview how many items match a rule (dry run). + operationId: model-hub_annotation-queues_automation-rules_preview + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotation-queues/{queue_id}/items/: + get: + description: "" + operationId: listAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: false + in: query + name: status + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: false + in: query + name: source_type + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: true + in: query + name: assigned_to + required: false + schema: + type: string + style: form + - explode: true + in: query + name: review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: ordering + required: false + schema: + enum: + - created_at + - -created_at + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAnnotationQueueItems_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + post: + description: "" + operationId: model-hub_annotation-queues_items_create + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItem' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotation-queues/{queue_id}/items/add-items/: + post: + description: "" + operationId: addAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddItems' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAddItemsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiSelectionTooLargeError' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/assign/: + post: + description: Assign items to one or more annotators. + operationId: assignAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssignItems' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAssignItemsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/bulk-remove/: + post: + description: "" + operationId: removeAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkRemoveItems' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueBulkRemoveItemsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/next-item/: + get: + description: |- + Query params: + exclude: comma-separated item IDs to skip + before: item ID — returns the item immediately before this one in order + review_status: optional review status filter (for reviewer queues) + exclude_review_status: optional review status to omit (for annotator queues) + include_completed: when true, navigation can visit completed items too + operationId: getNextAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: exclude + required: false + schema: + type: string + style: form + - explode: true + in: query + name: before + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: exclude_review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_completed + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: view_mode + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_all_annotations + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueNextItemResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get the next or previous item in the queue. + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/: + delete: + description: "" + operationId: model-hub_annotation-queues_items_delete + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: "" + operationId: model-hub_annotation-queues_items_read + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + patch: + description: "" + operationId: model-hub_annotation-queues_items_partial_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItem' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + put: + description: "" + operationId: model-hub_annotation-queues_items_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItem' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/: + get: + description: Get full annotation workspace data for an item. + operationId: getAnnotationQueueItemDetail + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: true + in: query + name: annotator_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: include_completed + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: view_mode + required: false + schema: + type: string + style: form + - explode: true + in: query + name: review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: exclude_review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_all_annotations + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: reserve + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAnnotateDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/: + get: + description: List all annotations for a queue item (across all annotators). + operationId: listAnnotationQueueItemAnnotations + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItemAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/: + post: + description: Import annotations from external sources. + operationId: importAnnotationQueueItemAnnotations + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportAnnotations' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueImportAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/: + post: + description: Submit or update annotations for a queue item. + operationId: submitAnnotationQueueItemAnnotations + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubmitAnnotations' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueSubmitAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/complete/: + post: + description: Mark item as completed and return next pending item. + operationId: completeAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItemNavigationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueNavigationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/: + get: + description: List or create non-blocking discussion comments for a queue item. + operationId: listAnnotationQueueItemDiscussion + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + post: + description: List or create non-blocking discussion comments for a queue item. + operationId: createAnnotationQueueItemComment + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DiscussionCommentRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/: + post: + description: Toggle the current user's reaction on a discussion comment. + operationId: toggleAnnotationQueueItemCommentReaction + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: comment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DiscussionReactionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/: + post: + description: "" + operationId: reopenAnnotationQueueItemThread + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: thread_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/DiscussionThreadStatusRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/: + post: + description: "" + operationId: resolveAnnotationQueueItemThread + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: thread_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/DiscussionThreadStatusRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/release/: + post: + description: Release reservation on an item. + operationId: releaseAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueReleaseReservationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/review/: + post: + description: "Approve, request changes, or leave reviewer feedback on an item." + operationId: reviewAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReviewItemRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueReviewItemResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Review + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotation-queues/{queue_id}/items/{id}/skip/: + post: + description: Mark item as skipped and return next pending item. + operationId: skipAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItemNavigationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueNavigationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/annotations-labels/: + get: + description: "" + operationId: model-hub_annotations-labels_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: dataset + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: type + required: false + schema: + enum: + - text + - numeric + - categorical + - star + - thumbs_up_down + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_usage_count + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: include_archived + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AnnotationsLabels' + type: array + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + post: + description: Custom create to provide clearer error responses in GM format. + operationId: model-hub_annotations-labels_create + requestBody: + $ref: '#/components/requestBodies/AnnotationsLabels' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotations-labels/{id}/: + delete: + description: "" + operationId: model-hub_annotations-labels_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: "" + operationId: model-hub_annotations-labels_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + patch: + description: "" + operationId: model-hub_annotations-labels_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationsLabels' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + put: + description: "" + operationId: model-hub_annotations-labels_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationsLabels' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/annotations-labels/{id}/restore/: + post: + description: Restore a soft-deleted (archived) annotation label. + operationId: model-hub_annotations-labels_restore + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationLabelRestoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/api-keys/: + get: + description: "" + operationId: model-hub_api-keys_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_api_keys_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + post: + description: "" + operationId: model-hub_api-keys_create + requestBody: + $ref: '#/components/requestBodies/ApiKey' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/api-keys/{id}/: + delete: + description: |- + ApiKey inherits from BaseModel, so `instance.delete()` sets: + - deleted=True + - deleted_at= + and excludes it from the default manager (`objects`) queries. + operationId: model-hub_api-keys_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Soft-delete an API key. + tags: + - model-hub + get: + description: "" + operationId: model-hub_api-keys_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + patch: + description: "" + operationId: model-hub_api-keys_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ApiKey' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + put: + description: "" + operationId: model-hub_api-keys_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ApiKey' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/api/models_list/: + get: + description: "" + operationId: model-hub_api_models_list_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubPaginatedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/dataset/columns/{dataset_id}/: + get: + description: "" + operationId: getDatasetColumns + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetColumnDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/dataset/{dataset_id}/annotation-summary/: + get: + description: "" + operationId: getDatasetAnnotationSummary + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/dataset/{dataset_id}/eval-stats/: + get: + description: "" + operationId: getDatasetEvalStats + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetEvalStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/dataset/{dataset_id}/json-schema/: + get: + description: |- + API endpoint to get JSON schemas and images metadata for columns in a dataset. + Used by frontend for autocomplete suggestions when accessing JSON properties + and for indexed access to images columns. + operationId: getDatasetJsonSchema + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetJsonSchemaResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/dataset/{dataset_id}/run-prompt-stats/: + get: + description: "" + operationId: model-hub_dataset_run-prompt-stats_list + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRunPromptStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/datasets/compare/get-evals-list/: + post: + description: "" + operationId: model-hub_datasets_compare_get-evals-list_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareEvalsListRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareEvalListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/compare/preview-run-eval/: + post: + description: "" + operationId: model-hub_datasets_compare_preview-run-eval_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComparePreviewRunEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalPreviewResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/delete-compare/{compare_id}/: + delete: + description: "" + operationId: model-hub_datasets_delete-compare_delete + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: "" + operationId: model-hub_datasets_delete-compare_read + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetRowResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/datasets/explanation-summary/{dataset_id}/: + get: + description: "" + operationId: model-hub_datasets_explanation-summary_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetExplanationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/datasets/explanation-summary/{dataset_id}/refresh/: + post: + description: "" + operationId: model-hub_datasets_explanation-summary_refresh_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetExplanationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/get-base-columns/: + get: + description: "" + operationId: listDatasetBaseColumns + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BaseColumnsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/: + delete: + description: "" + operationId: model-hub_datasets_get-compare-row_delete + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: row_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: "" + operationId: model-hub_datasets_get-compare-row_read + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: row_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetRowResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/datasets/huggingface/detail/: + post: + description: "" + operationId: model-hub_datasets_huggingface_detail_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetDetailRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/huggingface/list/: + post: + description: "" + operationId: model-hub_datasets_huggingface_list_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetListRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/add-api-column/: + post: + description: "" + operationId: model-hub_datasets_add-api-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddApiColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/add_vector_db_column/: + post: + description: "" + operationId: model-hub_datasets_add_vector_db_column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorDBColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/classify-column/: + post: + description: "" + operationId: model-hub_datasets_classify-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClassifyColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/compare-datasets/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/CompareDataset' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_add-eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareExperimentEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/compare-datasets/download/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_download_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/CompareDataset' + responses: + "200": + content: + application/json: + schema: + format: binary + type: string + description: CSV export + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_start-eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareStartEvalsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/compare-stats/: + post: + description: "" + operationId: model-hub_datasets_compare-stats_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetStatsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/conditional-column/: + post: + description: "" + operationId: model-hub_datasets_conditional-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConditionalColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/derived-variables/: + get: + description: |- + This aggregates derived variables from run prompt columns that + produce JSON outputs, making them available for use in other + prompts, evals, and experiments. + + Path params: + - dataset_id: UUID of the dataset + operationId: listDatasetDerivedVariables + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetDerivedVariablesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get all derived variables from all run prompt columns in a dataset. + tags: + - Datasets + /model-hub/datasets/{dataset_id}/duplicate-rows/: + post: + description: "" + operationId: model-hub_datasets_duplicate-rows_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/duplicate/: + post: + description: "" + operationId: duplicateDataset + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/extract-entities/: + post: + description: "" + operationId: model-hub_datasets_extract-entities_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExtractEntitiesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/merge/: + post: + description: "" + operationId: model-hub_datasets_merge_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MergeDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MergeDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/datasets/{dataset_id}/preview/{operation_type}/: + post: + description: "" + operationId: model-hub_datasets_preview_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: operation_type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewDatasetOperationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewDatasetOperationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/delete-eval-template/: + post: + description: "" + operationId: model-hub_delete-eval-template_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteEvalTemplate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubStringResultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/add-as-new/: + post: + description: "" + operationId: model-hub_develops_add-as-new_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddAsNewDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCopyResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/add_rows_from_file/: + post: + description: "" + operationId: model-hub_develops_add_rows_from_file_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddRowsFromFileRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/add_rows_sdk/: + post: + description: "" + operationId: model-hub_develops_add_rows_sdk_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetSdkRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetSdkRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/add_run_prompt_column/: + post: + description: "" + operationId: model-hub_develops_add_run_prompt_column_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddRunPrompt' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/clone-dataset/{dataset_id}/: + post: + description: "" + operationId: model-hub_develops_clone-dataset_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CloneDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCopyResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/create-dataset-from-huggingface/: + post: + description: "" + operationId: model-hub_develops_create-dataset-from-huggingface_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/create-dataset-from-local-file/: + post: + description: "" + operationId: createDatasetFromLocalFile + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatasetFromLocalFileRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LocalFileDatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/create-dataset-manually/: + post: + description: "" + operationId: createDatasetManually + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ManualDatasetCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ManualDatasetCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/create-empty-dataset/: + post: + description: "" + operationId: createEmptyDataset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEmptyDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/create-synthetic-dataset/: + post: + description: "" + operationId: model-hub_develops_create-synthetic-dataset_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetCreation' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/dataset-creation-progress/{dataset_id}/: + get: + description: API endpoint to check the progress of dataset creation from file + upload + operationId: model-hub_develops_dataset-creation-progress_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCreationProgressResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/delete_dataset/: + delete: + description: "" + operationId: model-hub_develops_delete_dataset_delete + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/edit_run_prompt_column/: + post: + description: "" + operationId: model-hub_develops_edit_run_prompt_column_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EditRunPromptColumn' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/get-cell-data/: + post: + description: "" + operationId: model-hub_develops_get-cell-data_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCellDataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCellDataResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/get-datasets-names/: + get: + description: "" + operationId: listDatasetNames + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetNamesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/develops/get-datasets/: + get: + description: "" + operationId: listDatasets + parameters: + - explode: true + in: query + name: search_text + required: false + schema: + default: "" + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: sort + required: false + schema: + type: string + style: form + x-nullable: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/get-derived-datasets/{dataset_id}/: + get: + description: "" + operationId: model-hub_develops_get-derived-datasets_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetExplanationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/get-huggingface-dataset-config/: + post: + description: "" + operationId: model-hub_develops_get-huggingface-dataset-config_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/get-row-diff/: + post: + description: "" + operationId: model-hub_develops_get-row-diff_create + requestBody: + $ref: '#/components/requestBodies/DatasetRowDiffRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRowDiffResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/get_function_list/: + get: + description: "" + operationId: model-hub_develops_get_function_list_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalFunctionListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/preview_run_prompt_column/: + post: + description: "" + operationId: model-hub_develops_preview_run_prompt_column_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewRunPrompt' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunPromptColumnPreviewResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/provider-status/: + get: + description: "" + operationId: model-hub_develops_provider-status_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderStatusResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/retrieve_run_prompt_column_config/: + get: + description: "" + operationId: model-hub_develops_retrieve_run_prompt_column_config_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunPromptColumnConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/retrieve_run_prompt_options/: + get: + description: "" + operationId: model-hub_develops_retrieve_run_prompt_options_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunPromptOptionsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/{dataset_id}/add_columns/: + post: + description: "" + operationId: addDatasetColumns + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddColumnsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetColumnsMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_empty_columns/: + post: + description: "" + operationId: model-hub_develops_add_empty_columns_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddEmptyColumnsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetColumnsMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_empty_rows/: + post: + description: "" + operationId: model-hub_develops_add_empty_rows_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddEmptyRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_multiple_static_columns/: + post: + description: |- + Expected request data: + { + "columns": [ + { + "new_column_name": "column1", + "column_type": "string", + "source": "OTHERS" # optional + }, + { + "new_column_name": "column2", + "column_type": "number", + "source": "OTHERS" # optional + } + ] + } + operationId: model-hub_develops_add_multiple_static_columns_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetMultipleStaticColumnsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add multiple static columns to a dataset at once. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_rows/: + post: + description: "" + operationId: addDatasetRows + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/: + post: + description: "" + operationId: model-hub_develops_add_rows_from_existing_dataset_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddRowsFromExistingRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowsImportedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_rows_from_huggingface/: + post: + description: "" + operationId: model-hub_develops_add_rows_from_huggingface_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceAddRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowsImportMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_static_column/: + post: + description: "" + operationId: model-hub_develops_add_static_column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetStaticColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_synthetic_data/: + post: + description: "" + operationId: model-hub_develops_add_synthetic_data_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticData' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/add_user_eval/: + post: + description: "" + operationId: model-hub_develops_add_user_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserEvalMutationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/delete_column/{column_id}/: + delete: + description: "" + operationId: deleteDatasetColumn + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/develops/{dataset_id}/delete_row/: + delete: + description: "" + operationId: deleteDatasetRow + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/: + delete: + description: "" + operationId: model-hub_develops_delete_template_eval_delete + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/: + delete: + description: "" + operationId: model-hub_develops_delete_user_eval_delete + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/{dataset_id}/download_dataset/: + get: + description: "" + operationId: downloadDataset + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + format: binary + type: string + description: CSV export + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/: + post: + description: "" + operationId: model-hub_develops_edit_and_run_user_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserEvalUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/edit_dataset_behavior/: + put: + description: "" + operationId: model-hub_develops_edit_dataset_behavior_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetBehaviorRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/extract-json-column/: + post: + description: "" + operationId: model-hub_develops_extract-json-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExtractJsonColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/get-dataset-table/: + get: + description: "" + operationId: getDatasetTable + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 10 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: current_page_index + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: column_config_only + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetTableResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/get-row-data/: + post: + description: "" + operationId: getDatasetRow + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowDataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowDataResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/: + get: + description: "" + operationId: model-hub_develops_get_eval_structure_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: eval_type + required: true + schema: + enum: + - preset + - user + - previously_configured + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalStructureResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/get_evals_list/: + get: + description: "" + operationId: model-hub_develops_get_evals_list_list + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/{dataset_id}/preview_run_eval/: + post: + description: "" + operationId: model-hub_develops_preview_run_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewRunEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalPreviewResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/start_evals_process/: + post: + description: "" + operationId: model-hub_develops_start_evals_process_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StartEvalsProcessRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/: + post: + description: |- + Accepts optional experiment_id in the body. When present, the eval is + looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) + and cells are updated across both base columns (source_id=eval_id) and + per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + operationId: model-hub_develops_stop_user_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StopUserEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: |- + POST /develops//stop_user_eval// + Stops a running evaluation by setting its status to Completed. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/synthetic-config/: + get: + description: "" + operationId: model-hub_develops_synthetic-config_list + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/develops/{dataset_id}/update-synthetic-config/: + put: + description: "" + operationId: model-hub_develops_update-synthetic-config_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetConfig' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/update_cell_value/: + post: + description: "" + operationId: updateDatasetCell + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetUpdateCellValueRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/update_column_name/{column_id}/: + put: + description: "" + operationId: model-hub_develops_update_column_name_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetUpdateColumnNameRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{dataset_id}/update_column_type/{column_id}/: + put: + description: "" + operationId: model-hub_develops_update_column_type_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetUpdateColumnTypeRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ColumnTypeConversionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{exp_dataset_id}/create-dataset/: + post: + description: "" + operationId: model-hub_develops_create-dataset_create + parameters: + - explode: false + in: path + name: exp_dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatasetFromExperimentRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/: + get: + description: "" + operationId: model-hub_develops_get-experiment-dataset-table_list + parameters: + - explode: false + in: path + name: experiment_dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetTableResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/eval-templates/bulk-delete/: + post: + description: Soft-delete multiple eval templates. Only user-owned templates + can be deleted. + operationId: model-hub_eval-templates_bulk-delete_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateBulkDeleteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateBulkDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/bulk-delete/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/composite/execute-adhoc/: + post: + description: |- + Execute a composite eval configuration without persisting it. Used by + the eval create page so users can test a composite (selected children + + aggregation settings) before clicking Save. Builds an unsaved parent + template and unsaved child links in memory and reuses + `execute_composite_children_sync` so semantics match the persisted path. + operationId: model-hub_eval-templates_composite_execute-adhoc_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalAdhocExecuteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalExecuteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/composite/execute-adhoc/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/create-composite/: + post: + description: Create a composite eval from a list of existing eval template IDs. + operationId: model-hub_eval-templates_create-composite_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/create-composite/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/create-v2/: + post: + description: |- + Create a single eval template with the revamped schema. + Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + operationId: model-hub_eval-templates_create-v2_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateCreateV2Request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/create-v2/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/list-charts/: + post: + description: |- + Returns 30-day chart data (run counts + error rates) for a list of template IDs. + Uses ClickHouse for fast analytics. Called separately from the list API so the + table renders instantly while charts load async. + operationId: model-hub_eval-templates_list-charts_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateListChartsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateListChartsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/list-charts/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/list/: + post: + description: |- + Returns paginated eval template list with filtering, search, and 30-day metrics. + All inputs and outputs are validated with Pydantic schemas. + operationId: model-hub_eval-templates_list_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalListRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/list/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/composite/: + get: + description: Get composite eval detail with its children. + operationId: model-hub_eval-templates_composite_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//composite/ + tags: + - model-hub + patch: + description: |- + Supported fields (all optional): + name, description, tags, + aggregation_enabled, aggregation_function, + child_template_ids (replaces the child list), + child_weights (map of child_id -> weight). + operationId: model-hub_eval-templates_composite_partial_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: PATCH — partial update of a composite eval. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/composite/execute/: + post: + description: |- + Execute all child evals in a composite and optionally aggregate results. + Thin wrapper around `execute_composite_children_sync` — the same helper + the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation + semantics stay consistent across surfaces. + operationId: model-hub_eval-templates_composite_execute_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalExecuteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalExecuteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//composite/execute/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/detail/: + get: + description: Fetch a single eval template with all revamped fields. + operationId: model-hub_eval-templates_detail_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//detail/ + tags: + - model-hub + /model-hub/eval-templates/{template_id}/feedback-list/: + get: + description: |- + Paginated feedback list with user info. + Query params: page (0-based), page_size + operationId: model-hub_eval-templates_feedback-list_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalFeedbackListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//feedback-list/ + tags: + - model-hub + /model-hub/eval-templates/{template_id}/ground-truth-config/: + get: + description: Manages ground truth configuration on the eval template's config + JSONField. + operationId: model-hub_eval-templates_ground-truth-config_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET/PUT /model-hub/eval-templates//ground-truth-config/ + tags: + - model-hub + put: + description: Manages ground truth configuration on the eval template's config + JSONField. + operationId: model-hub_eval-templates_ground-truth-config_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET/PUT /model-hub/eval-templates//ground-truth-config/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/ground-truth/: + get: + description: GET /model-hub/eval-templates//ground-truth/ + operationId: model-hub_eval-templates_ground-truth_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/eval-templates/{template_id}/ground-truth/upload/: + post: + description: |- + Supports two modes: + 1. JSON body: { name, columns, data, ... } + 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + operationId: model-hub_eval-templates_ground-truth_upload_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthUploadRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthUploadResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//ground-truth/upload/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/update/: + put: + description: Update an eval template. Only user-owned templates can be updated. + operationId: model-hub_eval-templates_update_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateUpdateV2Request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: PUT /model-hub/eval-templates//update/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/usage/: + get: + description: |- + Returns usage stats, chart data, and paginated eval logs. + Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + operationId: model-hub_eval-templates_usage_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalUsageStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//usage/ + tags: + - model-hub + /model-hub/eval-templates/{template_id}/versions/: + get: + description: List all versions for an eval template. + operationId: model-hub_eval-templates_versions_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//versions/ + tags: + - model-hub + /model-hub/eval-templates/{template_id}/versions/create/: + post: + description: Create a new version snapshot from the current template state. + operationId: model-hub_eval-templates_versions_create_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//versions/create/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/: + post: + description: |- + Restore a version by creating a new version with the old version's config. + Does NOT modify the old version — creates a new one on top. + operationId: model-hub_eval-templates_versions_restore_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionRestoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//versions//restore/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/: + put: + description: Set a specific version as the default (active) version. + operationId: model-hub_eval-templates_versions_set-default_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: PUT /model-hub/eval-templates//versions//set-default/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/: + post: + description: "" + operationId: createExperiment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentCreateV2' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStringResultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/delete/: + delete: + description: "V2 delete: org-scoped, cancels workflows, cleans up columns &\ + \ EDTs." + operationId: deleteExperiments + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/list/: + get: + description: "V2 experiment list with filtering, search, and pagination." + operationId: listExperiments + parameters: + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: dataset_id + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listExperiments_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/re-run/: + post: + description: |- + No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID + reuse policy automatically cancels any running workflow with the same ID. + Cell reset is handled by the workflow itself (cleanup + setup activities). + operationId: rerunExperiment + requestBody: + $ref: '#/components/requestBodies/ExperimentRerunRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStringResultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "V2 re-run: org-scoped, uses V2 Temporal workflow." + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/row-diff/: + post: + description: "" + operationId: model-hub_experiments_v2_row-diff_create + requestBody: + $ref: '#/components/requestBodies/DatasetRowDiffRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRowDiffResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/suggest-name/{dataset_id}/: + get: + description: Generate a suggested experiment name for a dataset. + operationId: model-hub_experiments_v2_suggest-name_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentNameSuggestionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/experiments/v2/validate-name/: + get: + description: Validate that an experiment name is unique within a dataset. + operationId: model-hub_experiments_v2_validate-name_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentNameValidationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/experiments/v2/{experiment_id}/: + get: + description: "" + operationId: getExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentV2DetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + put: + description: |- + Editable fields: column_id, prompt_config, user_eval_metrics. + Re-run triggers (determined by fingerprint diffs, not field presence): + - prompt_config has new/modified entries → re-run those configs + ALL dependent evals + - user_eval_metrics has new/modified entries → re-run only those evals + - column_id changed → delete old base eval columns, re-run base evals + - If FE sends unchanged data, diffs return empty → no re-run + operationId: updateExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentUpdateV2' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentV2DetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Update a V2 experiment with diff-based selective re-run. + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/{experiment_id}/compare-experiments/: + post: + description: "V2 compare view: reads from experiment_datasets FK + snapshot_dataset." + operationId: compareExperiments + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ExperimentComparisonWeightsRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentDatasetComparisonResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/{experiment_id}/comparisons/: + get: + description: "" + operationId: listExperimentComparisons + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentComparisonDetailsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/{experiment_id}/derived-variables/: + get: + description: |- + Get derived variables from run prompt columns in an experiment's snapshot dataset. + Delegates to the existing get_dataset_derived_variables() service function. + operationId: model-hub_experiments_v2_derived-variables_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentDerivedVariablesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/experiments/v2/{experiment_id}/download/: + get: + description: "" + operationId: downloadExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + description: CSV file download. + format: binary + type: string + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/: + get: + description: "" + operationId: model-hub_experiments_v2_evaluations_stats_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: evaluation_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentEvaluationStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/experiments/v2/{experiment_id}/feedback/: + post: + description: Create a feedback record scoped to an experiment. + operationId: model-hub_experiments_v2_feedback_create + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Feedback' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/: + get: + description: Get previous feedback details for a metric+row in an experiment. + operationId: model-hub_experiments_v2_feedback_get-feedback-details_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackDetailsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/experiments/v2/{experiment_id}/feedback/get-template/: + get: + description: Get evaluation template details for rendering the feedback form. + operationId: model-hub_experiments_v2_feedback_get-template_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackTemplateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/: + post: + description: Submit feedback action — triggers temporal eval rerun for experiments. + operationId: model-hub_experiments_v2_feedback_submit-feedback_create + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackSubmitRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackSubmitResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/{experiment_id}/json-schema/: + get: + description: |- + Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. + Delegates to the shared get_json_column_schemas() function. + operationId: getExperimentJsonSchema + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentJsonSchemaResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/{experiment_id}/rerun-cells/: + post: + description: |- + Accepts source_ids (EDT IDs for full column rerun) and/or + cells ({source_id, row_id} pairs for individual cell rerun). + Resets affected output cells and dependent eval cells to RUNNING, + then starts a RerunCellsV2Workflow. + operationId: model-hub_experiments_v2_rerun-cells_create + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRerunCells' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentWorkflowResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Rerun specific cells or columns in a V2 experiment. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/experiments/v2/{experiment_id}/rows/: + get: + description: "" + operationId: listExperimentRows + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentTableRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/: + get: + description: "" + operationId: getExperimentRow + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: row_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentTableRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/{experiment_id}/stats/: + get: + description: Stats view for V2 experiments that read from snapshot_dataset. + operationId: getExperimentStats + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + /model-hub/experiments/v2/{experiment_id}/stop/: + post: + description: |- + Cancels all Temporal workflows (main + reruns). DB cleanup (marking + RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) + is handled by each workflow's CancelledError handler via the + stop_experiment_cleanup_activity. + operationId: stopExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStopResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Stop a running V2 experiment. + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/knowledge-base/: + delete: + description: "" + operationId: model-hub_knowledge-base_delete + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: "" + operationId: model-hub_knowledge-base_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseSdkCodeResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + patch: + description: "" + operationId: model-hub_knowledge-base_partial_update + requestBody: + $ref: '#/components/requestBodies/LegacyKnowledgeBaseMutationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + post: + description: "" + operationId: model-hub_knowledge-base_create + requestBody: + $ref: '#/components/requestBodies/LegacyKnowledgeBaseMutationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/knowledge-base/files/: + delete: + description: "" + operationId: model-hub_knowledge-base_files_delete + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + post: + description: "" + operationId: model-hub_knowledge-base_files_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseFilesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseFilesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/knowledge-base/get/: + get: + description: "" + operationId: model-hub_knowledge-base_get_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/knowledge-base/list/: + get: + description: "" + operationId: model-hub_knowledge-base_list_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-history-executions/: + get: + description: "" + operationId: model-hub_prompt-history-executions_list + parameters: + - description: "" + explode: true + in: query + name: template_name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: template_version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_history_executions_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-history-executions/execution-details/{execution_id}/: + get: + description: Get detailed information about a specific PromptVersion + operationId: model-hub_prompt-history-executions_get_execution_details + parameters: + - explode: false + in: path + name: execution_id + required: true + schema: + type: string + style: simple + - description: "" + explode: true + in: query + name: template_name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: template_version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_history_executions_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-history-executions/{id}/: + get: + description: "" + operationId: model-hub_prompt-history-executions_read + parameters: + - description: A UUID string identifying this prompt version. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptHistoryExecution' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/: + get: + description: "" + operationId: model-hub_prompt-labels_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_labels_list_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + post: + description: "" + operationId: model-hub_prompt-labels_create + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/assign-multiple-labels/: + post: + description: "" + operationId: model-hub_prompt-labels_assign_multiple_labels + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/create-system-labels/: + post: + description: "Create (idempotently) Production, Staging, Development system\ + \ labels for the caller's org." + operationId: model-hub_prompt-labels_create_system_labels + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/get-by-name/: + get: + description: |- + Query params: + - name: template name (required) + - version: version name like v1 (optional) + - label: label name like Production/Staging/Development or custom (optional) + operationId: model-hub_prompt-labels_get_by_name + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_labels_list_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Fetch a prompt version by template name and either explicit version + or label. + tags: + - model-hub + /model-hub/prompt-labels/remove/: + post: + description: Detach label from a prompt version. + operationId: model-hub_prompt-labels_remove_label_from_version + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/set-default/: + post: + description: Set default version for a template by name and version. + operationId: model-hub_prompt-labels_set_default + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/template-labels/: + get: + description: List versions with labels for a template by name or id. + operationId: model-hub_prompt-labels_template_labels + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_labels_list_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/{id}/: + delete: + description: "" + operationId: model-hub_prompt-labels_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: "" + operationId: model-hub_prompt-labels_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + patch: + description: "" + operationId: model-hub_prompt-labels_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + put: + description: "" + operationId: model-hub_prompt-labels_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/: + post: + description: Assign a label to a specific version by template name and version + name. + operationId: model-hub_prompt-labels_assign_label_by_id + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: label_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/: + get: + description: "" + operationId: model-hub_prompt-templates_list + parameters: + - description: "" + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_templates_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + post: + description: "" + operationId: model-hub_prompt-templates_create + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/analyze-prompt/: + post: + description: "" + operationId: model-hub_prompt-templates_analyze_prompt + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/bulk-delete/: + post: + description: Bulk delete prompt templates + operationId: model-hub_prompt-templates_bulk_delete + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/create-draft/: + post: + description: Create a draft version of the PromptTemplate and return its details. + operationId: model-hub_prompt-templates_create_draft + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/derived-variables/preview/: + post: + description: |- + Useful for showing what variables would be extracted before running. + + Request body: + - content: JSON string or object to analyze + - column_name: Name for the variable prefix + operationId: model-hub_prompt-templates_derived-variables_preview_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariablePreviewRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Preview derived variables from JSON content without saving. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/prompt-templates/generate-prompt/: + post: + description: "" + operationId: model-hub_prompt-templates_generate_prompt + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/generate-variables/: + post: + description: |- + Expected payload: + { + "prompt_name": "string", + "prompt_instructions": "list/array" , + "variable_names": ["string"], + "variable_count": "int", + "generation_type": "prompt" + } + operationId: model-hub_prompt-templates_generate_variables + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Generate synthetic data for prompt variables using the SyntheticDataAgent. + tags: + - model-hub + /model-hub/prompt-templates/get-template-by-name/: + get: + description: |- + Retrieve a prompt template by name. + If no version is specified, returns the default version (is_default=True). + If a version is specified, returns that specific version. + operationId: model-hub_prompt-templates_get_template_by_name + parameters: + - description: "" + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_templates_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/improve-prompt/: + post: + description: "" + operationId: model-hub_prompt-templates_improve_prompt + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/: + delete: + description: "" + operationId: model-hub_prompt-templates_delete + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + get: + description: |- + Retrieve a prompt template with version history and execution data. + Handles caching and error cases. + operationId: model-hub_prompt-templates_read + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + patch: + description: "" + operationId: model-hub_prompt-templates_partial_update + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + put: + description: "" + operationId: model-hub_prompt-templates_update + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/add-new-draft/: + post: + description: Create a new draft version of the PromptTemplate and return its + details. + operationId: model-hub_prompt-templates_add_new_draft + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/all-variables/: + get: + description: Get all variables from template and its executions + operationId: model-hub_prompt-templates_get_all_variables + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/commit/: + post: + description: "" + operationId: model-hub_prompt-templates_commit + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/compare-versions/: + post: + description: Compare different versions of the PromptTemplate. + operationId: model-hub_prompt-templates_compare_versions + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/delete-evaluation-config/: + delete: + description: |- + This endpoint allows removing an evaluation configuration from a PromptTemplate + based on its unique name. + operationId: model-hub_prompt-templates_delete_evaluation_config + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Delete an evaluation configuration by name from a PromptTemplate. + tags: + - model-hub + /model-hub/prompt-templates/{id}/evaluation-configs/: + get: + description: Get the evaluation configurations for a specific prompt template. + operationId: model-hub_prompt-templates_get_evaluation_configs + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/evaluations/: + get: + description: "" + operationId: model-hub_prompt-templates_retrieve_evaluations + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/get-next-version/: + get: + description: Get the next version of the PromptTemplate + operationId: model-hub_prompt-templates_get_next_version + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/get-run-status/: + get: + description: Get the current status and results of a template run + operationId: model-hub_prompt-templates_get_run_status + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/get-sdk-code/{language}/: + get: + description: |- + Get the prompt code in the requested format. If no format is specified, returns all formats. + Supported languages: python, typescript, curl, langchain, nodejs, go + operationId: model-hub_prompt-templates_get_sdk_code + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: language + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/: + post: + description: "" + operationId: model-hub_prompt-templates_run_evals_on_multiple_versions + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/run_template/: + post: + description: Run a prompt template with the given configuration. + operationId: model-hub_prompt-templates_run_template + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/save-name/: + post: + description: Save/update the name for a template. + operationId: model-hub_prompt-templates_save_name + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/save-prompt-folder/: + post: + description: "" + operationId: model-hub_prompt-templates_save_prompt_folder + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/set_default/: + post: + description: Set a specific version of a prompt template as default + operationId: model-hub_prompt-templates_set_default + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/stop-streaming/: + get: + description: "" + operationId: model-hub_prompt-templates_stop_streaming + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{id}/update-evaluation-configs/: + post: + description: |- + This endpoint allows adding new evaluation configurations or updating + existing ones in a PromptTemplate. If is_run is true, it will also + run evaluations on specified versions (or latest version if none specified). + operationId: model-hub_prompt-templates_update_evaluation_configs + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add or update evaluation configurations for a PromptTemplate. + tags: + - model-hub + /model-hub/prompt-templates/{id}/versions/: + get: + description: "" + operationId: model-hub_prompt-templates_versions + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + /model-hub/prompt-templates/{prompt_id}/derived-variables/: + get: + description: |- + Returns derived variables from JSON outputs across all versions. + + Query params: + - version: Optional version filter + - column_name: Optional column name filter + operationId: model-hub_prompt-templates_derived-variables_list + parameters: + - explode: false + in: path + name: prompt_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptDerivedVariablesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get all derived variables for a prompt template. + tags: + - model-hub + /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/: + post: + description: |- + This is useful when you want to re-extract variables or extract from + existing outputs that weren't processed. + + Request body: + - version: Version to extract from + - column_name: Name for the output column + - output_index: Optional specific output index (default: 0) + - response_format_type: Optional response format hint + operationId: model-hub_prompt-templates_derived-variables_extract_create + parameters: + - explode: false + in: path + name: prompt_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableExtractRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Manually trigger extraction of derived variables from outputs. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/: + get: + description: |- + Returns detailed schema information including types and sample values. + + Path params: + - prompt_id: UUID of the prompt template + - column_name: Name of the column + + Query params: + - version: Optional version filter + operationId: model-hub_prompt-templates_derived-variables_schema_list + parameters: + - explode: false + in: path + name: prompt_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get the schema for derived variables of a specific column. + tags: + - model-hub + /model-hub/scores/: + get: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: source_type + required: false + schema: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + type: string + style: form + - explode: true + in: query + name: source_id + required: false + schema: + type: string + style: form + - explode: true + in: query + name: label_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: annotator_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_scores_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + x-runtime-request-validation: true + post: + description: Create a single score. + operationId: model-hub_scores_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateScore' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/scores/bulk/: + post: + description: Create multiple scores on a single source (e.g. from inline annotator). + operationId: model-hub_scores_bulk_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkCreateScores' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BulkCreateScoresResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/scores/for-source/: + get: + description: |- + Get all scores for a specific source. + GET /model-hub/scores/for-source/?source_type=trace&source_id= + operationId: model-hub_scores_for_source + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: source_type + required: true + schema: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + type: string + style: form + - explode: true + in: query + name: source_id + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreForSourceResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + /model-hub/scores/{id}/: + delete: + description: |- + Only the annotator who created the score or an org Owner/Admin may + delete it. + operationId: model-hub_scores_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Soft-delete a score. + tags: + - model-hub + get: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + patch: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Score' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + put: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Score' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + /sdk/api/v1/configure-evaluations/: + post: + description: "" + operationId: sdk_api_v1_configure-evaluations_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SDKConfigureEvaluationsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKConfigureEvaluationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + /sdk/api/v1/eval/: + post: + description: "" + operationId: sdk_api_v1_eval_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + /sdk/api/v1/eval/{eval_id}/: + get: + description: "" + operationId: sdk_api_v1_eval_read + parameters: + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKEvalTemplateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + /sdk/api/v1/evaluate-pipeline/: + get: + description: "" + operationId: sdk_api_v1_evaluate-pipeline_list + parameters: + - explode: true + in: query + name: project_name + required: true + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: versions + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKCICDEvaluationRunsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + post: + description: "" + operationId: sdk_api_v1_evaluate-pipeline_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CICDJob' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKCICDEvaluationRunAcceptedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + /sdk/api/v1/get-evals/: + get: + description: "" + operationId: sdk_api_v1_get-evals_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKGetEvalsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + /sdk/api/v1/new-eval/: + get: + description: "" + operationId: sdk_api_v1_new-eval_list + parameters: + - explode: true + in: query + name: eval_id + required: true + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalV2Response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + post: + description: "" + operationId: sdk_api_v1_new-eval_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalV2Request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + /sdk/api/v1/simulation/analytics/: + get: + description: |- + Aggregated analytics view: eval scores (radar chart data), critical issues, + FMA suggestions. Corresponds to the Analytics tab in the UI. + operationId: getSimulationAnalytics + parameters: + - explode: true + in: query + name: run_test_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: eval_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: summary + required: false + schema: + default: true + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKSimulationAnalyticsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /simulation/analytics/ + tags: + - Simulations + x-runtime-request-validation: true + x-runtime-response-validation: true + /sdk/api/v1/simulation/metrics/: + get: + description: "Aggregated system metrics: latency (by subsystem), cost, conversation\ + \ metrics." + operationId: listSimulationMetrics + parameters: + - explode: true + in: query + name: run_test_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: call_execution_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKSimulationMetricsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /simulation/metrics/ + tags: + - Simulations + x-runtime-request-validation: true + x-runtime-response-validation: true + /sdk/api/v1/simulation/runs/: + get: + description: "Run-level records with eval scores, scenario metadata, call details." + operationId: listSimulationRuns + parameters: + - explode: true + in: query + name: run_test_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: call_execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: eval_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: summary + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKSimulationRunsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /simulation/runs/ + tags: + - Simulations + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/agent-definitions/: + delete: + description: Bulk soft-delete agent definitions. + operationId: simulate_agent-definitions_delete + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionBulkDeleteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionBulkDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + get: + description: Get paginated list of agent definitions for the user's organization. + operationId: listAgentDefinitions + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: agent_type + required: false + schema: + enum: + - voice + - text + type: string + style: form + x-nullable: true + - explode: true + in: query + name: agent_definition_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AgentDefinitionListResponse' + type: array + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/agent-definitions/create/: + post: + description: Create a new agent definition with its first version. + operationId: createAgentDefinition + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionCreateRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/agent-definitions/{agent_id}/: + get: + description: Get details of a specific agent definition with version information. + operationId: getAgentDefinition + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + /simulate/agent-definitions/{agent_id}/delete/: + delete: + description: Soft delete an agent definition. + operationId: deleteAgentDefinition + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + /simulate/agent-definitions/{agent_id}/edit/: + put: + description: Update an existing agent definition. + operationId: updateAgentDefinition + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionEditRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionEditResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/agent-definitions/{agent_id}/versions/: + get: + description: Get all versions of a specific agent definition. + operationId: simulate_agent-definitions_versions_list + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AgentVersionListResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/agent-definitions/{agent_id}/versions/create/: + post: + description: Create a new version of an agent definition. + operationId: simulate_agent-definitions_versions_create_create + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionCreateRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/agent-definitions/{agent_id}/versions/{version_id}/: + get: + description: Get details of a specific agent version. + operationId: simulate_agent-definitions_versions_read + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/: + post: + description: Activate a specific agent version. + operationId: simulate_agent-definitions_versions_activate_create + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionActivateResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/: + get: + description: Get the call executions of an agent version. + operationId: simulate_agent-definitions_versions_call-executions_list + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CallExecution' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/: + delete: + description: Soft delete an agent version. + operationId: simulate_agent-definitions_versions_delete_delete + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/: + get: + description: Get the eval summary of an agent version. + operationId: simulate_agent-definitions_versions_eval-summary_list + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalSummaryResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/: + post: + description: Restore agent definition from a specific version. + operationId: simulate_agent-definitions_versions_restore_create + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionRestoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/api/call-executions/: + get: + description: |- + Get paginated list of call executions for the user's organization + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call status + - test_execution_id: filter by specific test execution + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: simulate_api_call-executions_list + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: status + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: test_execution_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CallExecution' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/api/personas/: + get: + description: List personas with pagination + operationId: listPersonas + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listPersonas_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + post: + description: Create a new workspace-level persona + operationId: createPersona + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaCreate' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaCreate' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + /simulate/api/personas/duplicate/{persona_id}/: + post: + description: Duplicate a persona by ID + operationId: simulate_api_personas_duplicate_create + parameters: + - explode: false + in: path + name: persona_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PersonaDuplicateRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaDuplicateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/api/personas/field-options/: + get: + description: Get field options/choices for persona creation + operationId: simulate_api_personas_field_options + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/simulate_api_personas_field_options_200_response' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/api/personas/system/: + get: + description: Get only system-level personas + operationId: simulate_api_personas_system_personas + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/simulate_api_personas_system_personas_200_response' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/api/personas/workspace/: + get: + description: Get only workspace-level personas + operationId: simulate_api_personas_workspace_personas + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/simulate_api_personas_system_personas_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/api/personas/{id}/: + delete: + description: Delete a persona (workspace-level only) + operationId: deletePersona + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + get: + description: Retrieve a specific persona + operationId: getPersona + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + patch: + description: ViewSet for managing Personas. + operationId: updatePersona + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Persona' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + put: + description: Update a persona (workspace-level only) + operationId: simulate_api_personas_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Persona' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/api/personas/{id}/duplicate/: + post: + description: Duplicate a persona (creates a workspace-level copy) + operationId: simulate_api_personas_duplicate + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PersonaDuplicateRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaDuplicateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/api/run-tests/: + get: + description: |- + Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: simulate_api_run-tests_list + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: simulation_type + required: false + schema: + enum: + - agent_definition + - prompt + type: string + style: form + - explode: true + in: query + name: prompt_template_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RunTestResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/api/test-executions/: + get: + description: |- + Get paginated list of test executions for the user's organization + Query Parameters: + - search: search string to filter test executions by run test name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: listTestExecutions + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TestExecution' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + /simulate/call-executions/{call_execution_id}/: + get: + description: Get a specific call execution with all its details + operationId: simulate_call-executions_read + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionDetail' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + patch: + description: Update the status of a specific call execution + operationId: simulate_call-executions_partial_update + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionStatusUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecution' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/call-executions/{call_execution_id}/branch-analysis/: + get: + description: Analyze a call execution against graph branches and identify deviations + operationId: simulate_call-executions_branch-analysis_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallBranchAnalysisResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + post: + description: Create deviation nodes and edges for a call execution + operationId: simulate_call-executions_branch-analysis_create + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallBranchDeviationCreateResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/call-executions/{call_execution_id}/chat/send-message/: + post: + description: Send a message to a chat execution + operationId: simulate_call-executions_chat_send-message_create + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendChatRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ChatSendMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/call-executions/{call_execution_id}/delete/: + delete: + description: Delete a specific call execution + operationId: simulate_call-executions_delete_delete + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "204": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/call-executions/{call_execution_id}/error-localizer-tasks/: + get: + description: Get error localizer tasks for a specific call execution + operationId: simulate_call-executions_error-localizer-tasks_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorLocalizerTasksResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/call-executions/{call_execution_id}/logs/: + get: + description: Paginated API to retrieve stored log entries for a call execution. + operationId: simulate_call-executions_logs_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionLogsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/call-executions/{call_execution_id}/session-comparison/: + get: + description: API View to compare session chat simulations + operationId: simulate_call-executions_session-comparison_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SessionComparisonResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/call-executions/{call_execution_id}/transcripts/: + get: + description: Get transcripts for a specific call execution + operationId: simulate_call-executions_transcripts_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallTranscriptResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/export/{item_id}/: + get: + description: |- + Export data as CSV based on type parameter + Query Parameters: + - type: 'runtest' or 'testexecution' (required) + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + operationId: simulate_export_read + parameters: + - explode: false + in: path + name: item_id + required: true + schema: + type: string + style: simple + - description: Export source type. + explode: true + in: query + name: type + required: true + schema: + enum: + - runtest + - testexecution + type: string + style: form + - description: Optional call-execution search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Optional call-execution status filter. + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + format: binary + type: string + description: CSV export + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/prompt-simulations/scenarios/: + get: + description: |- + Query Parameters: + - limit: number of items per page (default: 20) + - page: page number (default: 1) + - search: search string to filter scenarios by name + operationId: simulate_prompt-simulations_scenarios_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationScenariosResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get list of scenarios available for prompt simulations. + tags: + - simulate + /simulate/prompt-templates/{prompt_template_id}/simulations/: + get: + description: |- + Query Parameters: + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - version_id: filter by specific prompt version + operationId: simulate_prompt-templates_simulations_list + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get paginated list of simulation runs for a specific prompt template. + tags: + - simulate + post: + description: |- + Request Body: + - name: Name of the simulation run + - description: Optional description + - prompt_version_id: The prompt version to use + - scenario_ids: List of scenario IDs to run + - dataset_row_ids: Optional list of specific row IDs + - evaluations_config: Optional evaluation configurations + - enable_tool_evaluation: Optional boolean to enable tool evaluation + operationId: simulate_prompt-templates_simulations_create + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePromptSimulationRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationRunResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Create a new prompt-based simulation run. + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/: + delete: + description: Soft delete a prompt simulation run. + operationId: simulate_prompt-templates_simulations_delete + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + get: + description: Retrieve a specific prompt simulation run. + operationId: simulate_prompt-templates_simulations_read + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationRunResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + patch: + description: "Update a prompt simulation run (version, scenarios, etc.)." + operationId: simulate_prompt-templates_simulations_partial_update + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationRunResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/: + post: + description: |- + Request Body (optional): + - scenario_ids: List of specific scenario IDs to run (default: all scenarios) + - select_all: If true, run all scenarios except ones in scenario_ids + operationId: simulate_prompt-templates_simulations_execute_create + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExecutePromptSimulationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExecutePromptSimulationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Execute a prompt-based simulation run. + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/: + get: + description: |- + Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - simulation_type: filter by source type (RunTest.SourceTypes values: + 'agent_definition' or 'prompt') + - prompt_template_id: filter by prompt template ID (used when + simulation_type is 'prompt') + operationId: listRunTests + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: simulation_type + required: false + schema: + enum: + - agent_definition + - prompt + type: string + style: form + - explode: true + in: query + name: prompt_template_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RunTestResponse' + type: array + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/active/: + get: + description: Get all active tests + operationId: simulate_run-tests_active_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AllActiveTests' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/run-tests/create/: + post: + description: Create a new RunTest + operationId: createRunTest + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRunTest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/get-id-by-name/{run_test_name}/: + get: + description: API View to get the id of a run test by name + operationId: simulate_run-tests_get-id-by-name_read + parameters: + - explode: false + in: path + name: run_test_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestNameResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/run-tests/{run_test_id}/: + delete: + description: Delete a specific RunTest (soft delete) + operationId: deleteRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestMessageResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + get: + description: Retrieve a specific RunTest + operationId: getRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + patch: + description: Update a specific RunTest + operationId: updateRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRunTest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/analytics/: + get: + description: Get analytics data for a specific run test across multiple test + executions + operationId: getRunTestAnalytics + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestAnalytics' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + /simulate/run-tests/{run_test_id}/call-executions/: + get: + description: |- + Get all call executions for a specific run test with pagination and search + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + - limit: number of call executions per page (default: 10) + - page: page number for call executions (default: 1) + operationId: listRunTestCallExecutions + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestCallExecutionsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + /simulate/run-tests/{run_test_id}/chat-execute/: + post: + description: Execute a test run + operationId: simulate_run-tests_chat-execute_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestChatExecutionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/components/: + patch: + description: Update components of a specific RunTest + operationId: simulate_run-tests_components_partial_update + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestComponentsUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/delete-test-executions/: + post: + description: Delete multiple test executions within a run test. + operationId: simulate_run-tests_delete-test-executions_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionBulkDelete' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionBulkDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/delete/: + delete: + description: Delete a specific run test + operationId: simulate_run-tests_delete_delete + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/run-tests/{run_test_id}/eval-configs/: + post: + description: Adds evaluation configurations to a test run. Returns 201 with + the created configs. + operationId: simulate_run-tests_eval-configs_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddEvalConfigsRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AddEvalConfigsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add evaluation configurations + tags: + - Run Tests - Eval Configs + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/: + delete: + description: Soft-deletes an evaluation configuration. Cannot delete the last + remaining config in the test run. + operationId: simulate_run-tests_eval-configs_delete + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_config_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteEvalConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Delete evaluation configuration + tags: + - Run Tests - Eval Configs + /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/: + get: + description: Get the structure of an evaluation config + operationId: simulate_run-tests_eval-configs_get-structure_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_config_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalConfigStructureResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/: + post: + description: "Updates an evaluation configuration and optionally triggers a\ + \ rerun. When run=true, test_execution_id is required." + operationId: simulate_run-tests_eval-configs_update_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_config_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalConfigUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalConfigUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Update evaluation configuration + tags: + - Run Tests - Eval Configs + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/eval-summary-comparison/: + get: + description: Compares evaluation summary statistics across multiple test executions. + operationId: simulate_run-tests_eval-summary-comparison_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - description: "JSON-encoded array of test execution UUIDs to compare. Example:\ + \ [\"uuid1\",\"uuid2\"]. Must be URL-encoded." + explode: true + in: query + name: execution_ids + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalSummaryComparisonResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Compare evaluation summaries + tags: + - Run Tests - Eval Summary + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/eval-summary/: + get: + description: "Returns evaluation summary statistics for a test run, optionally\ + \ scoped to a single execution." + operationId: simulate_run-tests_eval-summary_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - description: "UUID of a specific test execution to scope the summary to. If\ + \ omitted, aggregates across all executions." + explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalSummaryResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get evaluation summary + tags: + - Run Tests - Eval Summary + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/execute/: + post: + description: Execute a test run + operationId: executeRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExecuteRunTest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestExecutionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/executions/: + get: + description: |- + Get test execution data for a specific run test + Query Parameters: + - search: search string to filter test executions by status or scenario name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: listRunTestExecutions + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TestExecutionItemResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + /simulate/run-tests/{run_test_id}/rerun-test-executions/: + post: + description: |- + Rerun multiple test executions (either evaluation only or call + evaluation). + All call executions within each test execution are rerun. + operationId: simulate_run-tests_rerun-test-executions_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionRerun' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionRerunResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/run-new-evals/: + post: + description: Runs new evaluations on completed test executions. Either test_execution_ids + or select_all=true must be provided. + operationId: simulate_run-tests_run-new-evals_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunNewEvalsOnTestExecution' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunNewEvalsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Run new evaluations on test executions + tags: + - Run Tests - Eval Configs + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/run-tests/{run_test_id}/scenarios/: + get: + description: |- + Get paginated list of scenarios for a specific run test + Query Parameters: + - search: search string to filter scenarios by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: simulate_run-tests_scenarios_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RunTestScenarioItemResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/run-tests/{run_test_id}/sdk-code/: + get: + description: Get the SDK code with placeholders filled + operationId: simulate_run-tests_sdk-code_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ChatSDKCodeResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/run-tests/{run_test_id}/status/: + get: + description: Get test execution status + operationId: getRunTestStatus + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionStatusSummary' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + /simulate/scenarios/: + get: + description: Returns a paginated list of scenarios for the user's organization. + operationId: listScenarios + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: agent_definition_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: agent_type + required: false + schema: + minLength: 1 + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioListResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: List scenarios + tags: + - Simulation Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/scenarios/create/: + post: + description: "Creates a new scenario (dataset, script, or graph kind). Returns\ + \ 202 with processing status." + operationId: createScenario + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioCreateRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Create scenario + tags: + - Simulation Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/scenarios/get-columns/: + get: + description: Returns a paginated list of scenarios for the user's organization. + operationId: simulate_scenarios_get-columns_list + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: agent_definition_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: agent_type + required: false + schema: + minLength: 1 + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioListResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: List scenarios + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/scenarios/{scenario_id}/: + get: + description: Returns full detail of a specific scenario including graph data + and prompts. + operationId: getScenario + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioDetailResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get scenario detail + tags: + - Simulation Scenarios + /simulate/scenarios/{scenario_id}/add-columns/: + post: + description: Adds new columns to a scenario's dataset via Temporal workflow. + Returns 202 Accepted. + operationId: simulate_scenarios_add-columns_create + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddColumnsRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddColumnsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add columns to scenario + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/scenarios/{scenario_id}/add-rows/: + post: + description: Adds new rows to a scenario's dataset via Temporal workflow. Returns + 202 Accepted. + operationId: simulate_scenarios_add-rows_create + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddRowsRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add rows to scenario + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/scenarios/{scenario_id}/delete/: + delete: + description: Soft-deletes a scenario by setting deleted=True. + operationId: deleteScenario + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Delete scenario + tags: + - Simulation Scenarios + /simulate/scenarios/{scenario_id}/edit/: + put: + description: "Updates scenario name, description, graph, or prompt." + operationId: updateScenario + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioEditRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioEditResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Edit scenario + tags: + - Simulation Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/scenarios/{scenario_id}/prompts/: + put: + description: Updates the simulator agent prompt for a scenario. + operationId: simulate_scenarios_prompts_update + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioEditPromptsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioPromptsUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Edit scenario prompts + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/simulator-agents/: + get: + description: List simulator agents with pagination and search + operationId: simulate_simulator-agents_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/simulator-agents/create/: + post: + description: Create a new simulator agent + operationId: simulate_simulator-agents_create_create + requestBody: + $ref: '#/components/requestBodies/SimulatorAgent' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentValidationErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/simulator-agents/{agent_id}/: + get: + description: Get details of a specific simulator agent + operationId: simulate_simulator-agents_read + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/simulator-agents/{agent_id}/delete/: + delete: + description: Soft delete a simulator agent + operationId: simulate_simulator-agents_delete_delete + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/simulator-agents/{agent_id}/edit/: + put: + description: Edit an existing simulator agent + operationId: simulate_simulator-agents_edit_update + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/SimulatorAgent' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentValidationErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/: + get: + description: |- + Get a specific test execution with all its details and paginated call executions + Query Parameters: + - search: search string to filter call executions + - page: page number for call executions (default: 1) + - filters: JSON array of filter objects + - row_groups: JSON array of column IDs to group by + - group_keys: JSON array of group keys + operationId: getTestExecution + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: row_groups + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: group_keys + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 30 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionDetailResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/analytics/: + get: + description: Get analytics data for a specific test execution + operationId: getTestExecutionAnalytics + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionAnalytics' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + /simulate/test-executions/{test_execution_id}/cancel/: + post: + description: Cancel a test execution + operationId: cancelTestExecution + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CancelTestExecutionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/: + post: + description: |- + This follows the same flow as inbound/outbound calls: + 1. Resolve SimulatorAgent (scenario > run_test > fallback) + 2. Extract base_prompt from SimulatorAgent + 3. Handle dataset scenarios (create one CallExecution per row) + 4. Enhance prompt with row data if applicable + 5. Store proper metadata in CallExecution + + Returns exactly 10 CallExecution objects per API call. + hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + operationId: simulate_test-executions_chat_call-executions_batch_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionChatBatchResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Create a batch of CallExecution records for chat execution (exactly + 10 per API call). + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/column-order/: + put: + description: Update column order for a test execution + operationId: simulate_test-executions_column-order_update + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionColumnOrder' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionColumnOrderResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/delete/: + delete: + description: Delete a specific test execution + operationId: simulate_test-executions_delete_delete + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/test-executions/{test_execution_id}/eval-explanation-summary/: + get: + description: |- + Fetch the evaluation explanation summary from the database. + If not present, trigger async calculation and return empty response. + operationId: simulate_test-executions_eval-explanation-summary_list + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalExplanationSummaryResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/: + post: + description: |- + Refresh the evaluation explanation summary by recalculating it. + This endpoint triggers the summary calculation task again. + operationId: simulate_test-executions_eval-explanation-summary_refresh_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalExplanationSummaryRefreshResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/kpis/: + get: + description: Get combined KPI values for a specific run test + operationId: getTestExecutionKpis + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestKPIsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + /simulate/test-executions/{test_execution_id}/optimiser-analysis/: + get: + description: |- + Fetch the agent optimiser analysis for a test execution. + If not present or pending, returns status information. + operationId: simulate_test-executions_optimiser-analysis_list + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OptimiserAnalysisResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/: + post: + description: Trigger a new agent optimiser analysis run. + operationId: simulate_test-executions_optimiser-analysis_refresh_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OptimiserAnalysisRefreshResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/performance-summary/: + get: + description: Get performance summary data for a specific test execution + operationId: getTestExecutionPerformanceSummary + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PerformanceSummary' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + /simulate/test-executions/{test_execution_id}/rerun-calls/: + post: + description: Rerun multiple call executions (either evaluation only or call + + evaluation) + operationId: simulate_test-executions_rerun-calls_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionRerun' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RerunCallsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + /simulate/test-executions/{test_execution_id}/transcripts/: + get: + description: Get all transcripts for a test execution + operationId: getTestExecutionTranscripts + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionTranscriptsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + /tracer/bulk-annotation/: + post: + description: "" + operationId: createBulkTraceAnnotation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkAnnotationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BulkAnnotationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/: + get: + description: GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + operationId: listErrorFeedIssues + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: status + required: false + schema: + enum: + - escalating + - for_review + - acknowledged + - resolved + type: string + style: form + - explode: true + in: query + name: fix_layer + required: false + schema: + type: string + style: form + - explode: true + in: query + name: source + required: false + schema: + enum: + - scanner + - eval + type: string + style: form + - explode: true + in: query + name: issue_group + required: false + schema: + type: string + style: form + - explode: true + in: query + name: time_range_days + required: false + schema: + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: sort_by + required: false + schema: + default: last_seen + enum: + - last_seen + - first_seen + - error_count + - unique_traces + type: string + style: form + - explode: true + in: query + name: sort_dir + required: false + schema: + default: desc + enum: + - asc + - desc + type: string + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 25 + maximum: 200 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedListApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/stats/: + get: + description: GET /tracer/feed/issues/stats/ — top stats bar totals. + operationId: getErrorFeedIssueStats + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: time_range_days + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedStatsApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/: + get: + description: "GET + PATCH /tracer/feed/issues/{cluster_id}/" + operationId: getErrorFeedIssue + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedDetailApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + patch: + description: "GET + PATCH /tracer/feed/issues/{cluster_id}/" + operationId: tracer_feed_issues_partial_update + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeedUpdateBody' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedDetailApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/create-linear-issue/: + post: + description: "POST /tracer/feed/issues/{cluster_id}/create-linear-issue/" + operationId: tracer_feed_issues_create-linear-issue_create + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLinearIssue' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLinearIssueResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/deep-analysis/: + post: + description: "POST /tracer/feed/issues/{cluster_id}/deep-analysis/" + operationId: tracer_feed_issues_deep-analysis_create + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeepAnalysisBody' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeepAnalysisDispatchApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/overview/: + get: + description: "GET /tracer/feed/issues/{cluster_id}/overview/" + operationId: tracer_feed_issues_overview_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OverviewApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/root-cause/: + get: + description: |- + Read cached deep-analysis results for a single trace within the + cluster. The frontend hits this on mount (to show existing results) + and polls it after a POST to /deep-analysis/ until ``status`` flips + from ``running`` to ``done`` or ``failed``. + operationId: tracer_feed_issues_root-cause_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: trace_id + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeepAnalysisApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X" + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/sidebar/: + get: + description: |- + Accepts an optional ``?trace_id=`` query param. When present, the + trace-level sections (AI Metadata + Evaluations) are computed for + that trace instead of the cluster's latest, keeping the sidebar in + sync with the Overview tab's trace selection. + operationId: tracer_feed_issues_sidebar_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: trace_id + required: false + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedSidebarApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "GET /tracer/feed/issues/{cluster_id}/sidebar/" + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/traces/: + get: + description: "GET /tracer/feed/issues/{cluster_id}/traces/" + operationId: tracer_feed_issues_traces_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: limit + required: false + schema: + default: 50 + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TracesTabApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/feed/issues/{cluster_id}/trends/: + get: + description: "GET /tracer/feed/issues/{cluster_id}/trends/" + operationId: tracer_feed_issues_trends_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: days + required: false + schema: + default: 14 + maximum: 90 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TrendsTabApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/get-annotation-labels/: + get: + description: "" + operationId: listTraceAnnotationLabels + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetAnnotationLabelsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/project/list_projects/: + get: + description: |- + Volume counts come from ClickHouse (fast) instead of a PG + JOIN on observation_spans (was 12+ seconds). + operationId: listTraceProjects + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listTraceProjects_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: List projects filtered by organization ID. + tags: + - Tracing + /tracer/trace-annotation/: + get: + description: "" + operationId: tracer_trace-annotation_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_annotation_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + post: + description: "" + operationId: tracer_trace-annotation_create + requestBody: + $ref: '#/components/requestBodies/GetTraceAnnotation' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace-annotation/get_annotation_values/: + get: + description: "" + operationId: tracer_trace-annotation_get_annotation_values + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: observation_span_id + required: false + schema: + maxLength: 255 + minLength: 1 + type: string + style: form + x-nullable: true + - explode: true + in: query + name: trace_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: annotators + required: false + schema: + type: string + style: form + - explode: true + in: query + name: exclude_annotators + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotationValuesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/trace-annotation/{id}/: + delete: + description: "" + operationId: tracer_trace-annotation_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + get: + description: "" + operationId: tracer_trace-annotation_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + patch: + description: "" + operationId: tracer_trace-annotation_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/GetTraceAnnotation' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + put: + description: "" + operationId: tracer_trace-annotation_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/GetTraceAnnotation' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace-session/: + get: + description: "" + operationId: tracer_trace-session_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + post: + description: "" + operationId: tracer_trace-session_create + requestBody: + $ref: '#/components/requestBodies/TraceSession' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace-session/get_session_filter_values/: + get: + description: |- + Return distinct values for a session-level column. + Used by the filter panel's value picker for session-specific fields + (session_id, user_id, first_message, etc.). + + Query params: + project_id: required + column: canonical session column name, e.g. "session_id" + search: optional search substring + page: page number (0-based), default 0 + page_size: default 50 + operationId: tracer_trace-session_get_session_filter_values + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace-session/get_session_graph_data/: + post: + description: |- + Supports the same metric types as the trace graph endpoint: + - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + avg_duration, avg_traces_per_session — all aggregated at session level + - EVAL: eval scores averaged across sessions + - ANNOTATION: annotation scores averaged across sessions + + Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + operationId: getTraceSessionGraphData + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSessionGraphDataRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSessionGraphDataRequest' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Fetch time-series session metrics for the observe graph. + tags: + - Tracing + x-runtime-request-validation: true + /tracer/trace-session/get_trace_session_export_data/: + get: + description: Export traces filtered by project ID and project version ID with + optimized queries. + operationId: tracer_trace-session_get_trace_session_export_data + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace-session/list_sessions/: + get: + description: List traces filtered by project ID and project version ID with + optimized queries. + operationId: listTraceSessions + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: user_id + required: false + schema: + type: string + style: form + - explode: true + in: query + name: bookmarked + required: false + schema: + type: boolean + style: form + x-nullable: true + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: sort_params + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page_number + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 30 + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: interval + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + /tracer/trace-session/{id}/: + delete: + description: "" + operationId: tracer_trace-session_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + get: + description: "" + operationId: getTraceSession + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + patch: + description: "" + operationId: tracer_trace-session_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/TraceSession' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + put: + description: "" + operationId: tracer_trace-session_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/TraceSession' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace-session/{id}/eval_logs/: + get: + description: |- + Session-level eval results are walled off from span/trace surfaces + by ``target_type='session'`` — this endpoint is the only place + they appear. + + Query params: + page (int, 0-indexed, default 0) + page_size (int, default 25, max 100) + operationId: tracer_trace-session_eval_logs + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Session-scoped eval log feed for TracesDrawer's "Evals" tab. + tags: + - tracer + /tracer/trace/: + get: + description: "" + operationId: tracer_trace_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + post: + description: "" + operationId: tracer_trace_create + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace/agent_graph/: + get: + description: |- + Computes nodes (distinct span types/names) and edges (parent→child + transitions) across all traces in the given time window. + operationId: tracer_trace_agent_graph + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Return the aggregate agent graph for a project. + tags: + - tracer + x-runtime-request-validation: true + /tracer/trace/bulk_create/: + post: + description: "" + operationId: tracer_trace_bulk_create + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace/compare_traces/: + post: + description: Compare traces across project versions with optimized queries. + operationId: tracer_trace_compare_traces + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace/get_eval_names/: + get: + description: Fetch all evaluation template names. + operationId: tracer_trace_get_eval_names + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace/get_graph_methods/: + post: + description: Fetch data for the observe graph with optimized queries + operationId: getTraceGraphMethods + requestBody: + $ref: '#/components/requestBodies/ObserveGraphDataRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ObserveGraphDataResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/trace/get_properties/: + get: + description: Fetch all properties for graphing. + operationId: listTraceProperties + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + /tracer/trace/get_trace_export_data/: + get: + description: |- + Export traces filtered by project ID with optimized queries. + Auto-detects voice/conversation projects and exports voice-specific fields. + operationId: tracer_trace_get_trace_export_data + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace/get_trace_id_by_index/: + get: + description: Get the previous and next trace id by index using efficient database + queries. + operationId: tracer_trace_get_trace_id_by_index + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: trace_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_version_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + /tracer/trace/get_trace_id_by_index_observe/: + get: + description: Get the previous and next trace id by index. + operationId: tracer_trace_get_trace_id_by_index_observe + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: trace_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + /tracer/trace/list_traces/: + get: + description: List traces filtered by project ID and project version ID with + optimized queries. + operationId: listTraces + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_version_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: trace_ids + required: false + schema: + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: sort_params + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page_number + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 30 + maximum: 500 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + /tracer/trace/list_traces_of_session/: + get: + description: List traces filtered by project ID with optimized queries. + operationId: tracer_trace_list_traces_of_session + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_version_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: session_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page_number + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 30 + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: interval + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + /tracer/trace/list_voice_calls/: + get: + description: |- + List voice/conversation traces for a project in an optimized way and + return a response similar to the provided call object schema. + + Query params: + - project_id (required) + - page (1-based, optional, default 1) + - page_size (optional, default 30) + operationId: listVoiceCalls + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + /tracer/trace/voice_call_detail/: + get: + description: |- + Query params: + - trace_id (required) — UUID of the voice call trace. + operationId: getVoiceCallDetail + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Return the heavy / detail-only fields for a single voice call. + tags: + - Tracing + /tracer/trace/{id}/: + delete: + description: "" + operationId: tracer_trace_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + get: + description: Retrieve a trace by its ID. + operationId: getTrace + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + patch: + description: "" + operationId: tracer_trace_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + put: + description: "" + operationId: tracer_trace_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/trace/{id}/tags/: + patch: + description: Update tags for a trace. + operationId: updateTraceTags + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TraceTagsUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceTagsUpdate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + /tracer/user-alert-logs/: + get: + description: "" + operationId: listAlertLogs + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlertLogs_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + post: + description: "" + operationId: tracer_user-alert-logs_create + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/user-alert-logs/all/: + get: + description: "" + operationId: listAllAlertLogs + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlertLogs_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alert-logs/resolve/: + post: + description: "" + operationId: resolveAlertLogs + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alert-logs/{id}/: + delete: + description: "" + operationId: tracer_user-alert-logs_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + get: + description: "" + operationId: getAlertLog + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + patch: + description: "" + operationId: tracer_user-alert-logs_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + put: + description: "" + operationId: tracer_user-alert-logs_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/user-alert-logs/{id}/list/: + get: + description: "" + operationId: listAlertLogsForAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alerts/: + get: + description: "" + operationId: listAlerts + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlerts_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + post: + description: "" + operationId: createAlert + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alerts/bulk-mute/: + post: + description: "" + operationId: bulkMuteAlerts + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alerts/duplicate/: + post: + description: "" + operationId: tracer_user-alerts_duplicate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorDuplicate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorDuplicateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/user-alerts/list_monitors/: + get: + description: "" + operationId: tracer_user-alerts_list_monitors + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlerts_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/user-alerts/metric-options/: + get: + description: "" + operationId: listAlertMetricOptions + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorMetricOptionsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alerts/preview-graph/: + post: + description: |- + Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. + Accepts monitor configuration in the request body. + operationId: previewAlertGraph + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alerts/{id}/: + delete: + description: "" + operationId: deleteAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + get: + description: "" + operationId: getAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + patch: + description: "" + operationId: updateAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + put: + description: "" + operationId: tracer_user-alerts_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + /tracer/user-alerts/{id}/details/: + get: + description: "" + operationId: getAlertDetails + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + /tracer/user-alerts/{id}/graph/: + get: + description: |- + Accepts `start_date` and `end_date` query parameters (ISO 8601 format). + If not provided, it defaults to the last 7 days. + operationId: getAlertGraph + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "Returns time-series data for a monitor's metric, suitable for graphing." + tags: + - Alerts + /tracer/users/: + get: + description: List traces filtered by project ID with optimized queries. + operationId: listTraceUsers + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: page_size + required: false + schema: + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: current_page_index + required: false + schema: + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: sort_params + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + /tracer/users/get_code_example/: + get: + description: "" + operationId: tracer_users_get_code_example_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserCodeExampleResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer +components: + requestBodies: + AnnotationQueue: + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + required: true + SimulatorAgent: + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + required: true + MemberRemove: + content: + application/json: + schema: + $ref: '#/components/schemas/MemberRemove' + required: true + QueueItemNavigationRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItemNavigationRequest' + required: true + ObserveGraphDataRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ObserveGraphDataRequest' + required: true + UserAlertMonitorLog: + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + required: true + PromptLabel: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + required: true + PromptTemplate: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + required: true + Score: + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + required: true + DatasetRowDiffRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowDiffRequest' + required: true + CompareDataset: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDataset' + required: true + PersonaDuplicateRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaDuplicateRequest' + required: true + ApiKey: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + required: true + UserAlertMonitor: + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + required: true + EmptyRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/EmptyRequest' + required: true + LegacyKnowledgeBaseMutationRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseMutationRequest' + required: true + AutomationRule: + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + required: true + QueueItem: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + required: true + Feedback: + content: + application/json: + schema: + $ref: '#/components/schemas/Feedback' + required: true + TraceSession: + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + required: true + QueueLabelRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueLabelRequest' + required: true + DiscussionThreadStatusRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/DiscussionThreadStatusRequest' + required: true + AnnotationsLabels: + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + required: true + ModelHubEmptyRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubEmptyRequest' + required: true + UserEvalMutationRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/UserEvalMutationRequest' + required: true + ExperimentRerunRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRerunRequest' + required: true + ExperimentComparisonWeightsRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentComparisonWeightsRequest' + required: true + Persona: + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + required: true + GetTraceAnnotation: + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + required: true + Trace: + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + required: true + schemas: + AccountsErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ManagementAPIErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + WorkspaceAccessInput: + description: "List of {\"workspace_id\": \"\", \"level\": }." + example: + workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + level: 1 + properties: + workspace_id: + format: uuid + title: Workspace id + type: string + level: + enum: + - 8 + - 3 + - 1 + title: Level + type: integer + required: + - workspace_id + type: object + MemberWorkspaceAccess: + example: + workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + properties: + workspace_id: + format: uuid + title: Workspace id + type: string + workspace_name: + minLength: 1 + title: Workspace name + type: string + ws_level: + title: Ws level + type: integer + ws_role: + minLength: 1 + title: Ws role + type: string + auto_access: + title: Auto access + type: boolean + required: + - workspace_id + - workspace_name + - ws_level + - ws_role + type: object + MemberListItem: + example: + auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + title: Name + type: string + email: + format: email + minLength: 1 + title: Email + type: string + org_level: + nullable: true + title: Org level + type: integer + org_role: + minLength: 1 + nullable: true + title: Org role + type: string + ws_level: + nullable: true + title: Ws level + type: integer + ws_role: + minLength: 1 + nullable: true + title: Ws role + type: string + workspaces: + items: + $ref: '#/components/schemas/MemberWorkspaceAccess' + type: array + status: + minLength: 1 + title: Status + type: string + created_at: + title: Created at + type: string + type: + enum: + - member + - invite + title: Type + type: string + auto_access: + title: Auto access + type: boolean + required: + - created_at + - email + - id + - name + - status + - type + type: object + MemberListResult: + example: + total: 5 + limit: 2 + page: 5 + results: + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + properties: + results: + items: + $ref: '#/components/schemas/MemberListItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + limit: + title: Limit + type: integer + required: + - limit + - page + - results + - total + type: object + MemberListResponse: + example: + result: + total: 5 + limit: 2 + page: 5 + results: + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MemberListResult' + required: + - result + - status + type: object + MemberRemove: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + user_id: + format: uuid + title: User id + type: string + required: + - user_id + type: object + MemberUserMutationResult: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + user_id: + format: uuid + title: User id + type: string + required: + - message + - user_id + type: object + MemberUserMutationResponse: + example: + result: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MemberUserMutationResult' + required: + - result + - status + type: object + MemberRoleUpdate: + example: + workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspace_access: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + level: 1 + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + level: 1 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 6 + org_level: 0 + properties: + user_id: + format: uuid + title: User id + type: string + org_level: + enum: + - 15 + - 8 + - 3 + - 1 + nullable: true + title: Org level + type: integer + ws_level: + enum: + - 8 + - 3 + - 1 + nullable: true + title: Ws level + type: integer + workspace_id: + description: Required when updating ws_level. + format: uuid + nullable: true + title: Workspace id + type: string + workspace_access: + description: "List of {workspace_id, level} for explicit workspace grants\ + \ on demotion." + items: + $ref: '#/components/schemas/WorkspaceAccessInput' + type: array + required: + - user_id + type: object + MemberRoleUpdateResult: + example: + changes: + key: "" + message: message + properties: + message: + minLength: 1 + title: Message + type: string + changes: + additionalProperties: true + title: Changes + type: object + required: + - changes + - message + type: object + MemberRoleUpdateResponse: + example: + result: + changes: + key: "" + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MemberRoleUpdateResult' + required: + - result + - status + type: object + WorkspaceSummary: + example: + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + is_default: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + display_name: + title: Display name + type: string + description: + title: Description + type: string + is_default: + title: Is default + type: boolean + required: + - display_name + - id + - name + type: object + UserInfoOrganization: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + ws_enabled: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + display_name: + title: Display name + type: string + ws_enabled: + title: Ws enabled + type: boolean + required: + - display_name + - id + - name + type: object + UserInfoTwoFactorMethods: + example: + totp: true + passkey: true + properties: + totp: + title: Totp + type: boolean + passkey: + title: Passkey + type: boolean + required: + - passkey + - totp + type: object + UserInfoResponse: + example: + role: role + org_2fa_required: true + created_at: 2000-01-23T04:56:07.000+00:00 + effective_level: 1 + onboarding_completed: true + get_started_completed: true + default_workspace_name: default_workspace_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + remember_me: true + email: email + ws_enabled: true + default_workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + goals: + - goals + - goals + org_2fa_grace_ends_at: 2000-01-23T04:56:07.000+00:00 + requires_org_setup: true + organization: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + ws_enabled: true + default_workspace_role: default_workspace_role + ws_level: 6 + name: name + org_level: 0 + default_workspace_display_name: default_workspace_display_name + has_2fa_enabled: true + organization_role: organization_role + two_factor_methods: + totp: true + passkey: true + status: status + properties: + id: + format: uuid + title: Id + type: string + email: + format: email + minLength: 1 + title: Email + type: string + name: + nullable: true + title: Name + type: string + organization_role: + nullable: true + title: Organization role + type: string + organization: + $ref: '#/components/schemas/UserInfoOrganization' + created_at: + format: date-time + title: Created at + type: string + status: + minLength: 1 + title: Status + type: string + role: + nullable: true + title: Role + type: string + goals: + items: + minLength: 1 + type: string + type: array + remember_me: + title: Remember me + type: boolean + get_started_completed: + title: Get started completed + type: boolean + onboarding_completed: + title: Onboarding completed + type: boolean + ws_enabled: + title: Ws enabled + type: boolean + requires_org_setup: + title: Requires org setup + type: boolean + default_workspace_id: + format: uuid + nullable: true + title: Default workspace id + type: string + default_workspace_name: + nullable: true + title: Default workspace name + type: string + default_workspace_display_name: + nullable: true + title: Default workspace display name + type: string + default_workspace_role: + nullable: true + title: Default workspace role + type: string + org_level: + nullable: true + title: Org level + type: integer + ws_level: + nullable: true + title: Ws level + type: integer + effective_level: + nullable: true + title: Effective level + type: integer + has_2fa_enabled: + title: Has 2fa enabled + type: boolean + two_factor_methods: + $ref: '#/components/schemas/UserInfoTwoFactorMethods' + org_2fa_required: + title: Org 2fa required + type: boolean + org_2fa_grace_ends_at: + format: date-time + title: Org 2fa grace ends at + type: string + required: + - created_at + - default_workspace_display_name + - default_workspace_id + - default_workspace_name + - default_workspace_role + - effective_level + - email + - get_started_completed + - id + - name + - onboarding_completed + - org_level + - organization + - organization_role + - remember_me + - role + - status + - ws_enabled + - ws_level + type: object + WorkspaceAdminSummary: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + name: + nullable: true + title: Name + type: string + id: + format: uuid + title: Id + type: string + required: + - id + - name + type: object + WorkspaceListItemResponse: + example: + start_data: start_data + admin_names: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_ws_role: user_ws_role + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + invite_link: invite_link + user_ws_level: 6 + last_update_date: last_update_date + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + display_name: + title: Display name + type: string + admin_names: + items: + $ref: '#/components/schemas/WorkspaceAdminSummary' + type: array + start_data: + title: Start data + type: string + last_update_date: + title: Last update date + type: string + invite_link: + title: Invite link + type: string + user_ws_level: + nullable: true + title: User ws level + type: integer + user_ws_role: + minLength: 1 + nullable: true + title: User ws role + type: string + required: + - display_name + - id + - name + type: object + WorkspaceListPaginatedResponse: + example: + next: next + previous: previous + count: 0 + total_pages: 1 + results: + - start_data: start_data + admin_names: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_ws_role: user_ws_role + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + invite_link: invite_link + user_ws_level: 6 + last_update_date: last_update_date + - start_data: start_data + admin_names: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_ws_role: user_ws_role + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + invite_link: invite_link + user_ws_level: 6 + last_update_date: last_update_date + current_page: 5 + properties: + count: + title: Count + type: integer + next: + minLength: 1 + nullable: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + title: Previous + type: string + results: + items: + $ref: '#/components/schemas/WorkspaceListItemResponse' + type: array + total_pages: + title: Total pages + type: integer + current_page: + title: Current page + type: integer + required: + - count + - current_page + - next + - previous + - results + - total_pages + type: object + SwitchWorkspace: + example: + new_workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + new_workspace_id: + format: uuid + title: New workspace id + type: string + required: + - new_workspace_id + type: object + SwitchWorkspaceResult: + example: + user_role: user_role + workspace: + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + is_default: true + access_type: access_type + organization: organization + message: message + properties: + message: + minLength: 1 + title: Message + type: string + workspace: + $ref: '#/components/schemas/WorkspaceSummary' + user_role: + minLength: 1 + title: User role + type: string + access_type: + minLength: 1 + title: Access type + type: string + organization: + minLength: 1 + title: Organization + type: string + required: + - access_type + - message + - organization + - user_role + - workspace + type: object + SwitchWorkspaceResponse: + example: + result: + user_role: user_role + workspace: + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + is_default: true + access_type: access_type + organization: organization + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SwitchWorkspaceResult' + required: + - result + - status + type: object + WorkspaceMemberRemove: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + user_id: + format: uuid + title: User id + type: string + required: + - user_id + type: object + WorkspaceMemberRoleUpdate: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 0 + properties: + user_id: + format: uuid + title: User id + type: string + ws_level: + enum: + - 8 + - 3 + - 1 + title: Ws level + type: integer + required: + - user_id + - ws_level + type: object + WorkspaceMemberRoleUpdateResult: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 0 + ws_role: ws_role + message: message + properties: + message: + minLength: 1 + title: Message + type: string + user_id: + format: uuid + title: User id + type: string + ws_level: + title: Ws level + type: integer + ws_role: + minLength: 1 + title: Ws role + type: string + required: + - message + - user_id + - ws_level + - ws_role + type: object + WorkspaceMemberRoleUpdateResponse: + example: + result: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 0 + ws_role: ws_role + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/WorkspaceMemberRoleUpdateResult' + required: + - result + - status + type: object + ApiTextErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ModelHubErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: true + properties: + status: + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + QueueLabelNested: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + label_id: + format: uuid + title: Label id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + type: + minLength: 1 + readOnly: true + title: Type + type: string + required: + title: Required + type: boolean + order: + maximum: 2147483647 + minimum: -2147483648 + title: Order + type: integer + required: + - label_id + type: object + QueueAnnotatorNested: + example: + role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + user_id: + format: uuid + title: User id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + email: + format: email + minLength: 1 + readOnly: true + title: Email + type: string + role: + default: annotator + minLength: 1 + title: Role + type: string + roles: + readOnly: true + title: Roles + type: string + required: + - user_id + type: object + AnnotationQueue: + example: + viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + instructions: + nullable: true + title: Instructions + type: string + status: + enum: + - draft + - active + - paused + - completed + readOnly: true + title: Status + type: string + assignment_strategy: + enum: + - manual + - round_robin + - load_balanced + title: Assignment strategy + type: string + annotations_required: + maximum: 2147483647 + minimum: -2147483648 + title: Annotations required + type: integer + reservation_timeout_minutes: + maximum: 2147483647 + minimum: -2147483648 + title: Reservation timeout minutes + type: integer + requires_review: + title: Requires review + type: boolean + auto_assign: + description: "When enabled, all queue members can annotate any item without\ + \ explicit assignment." + title: Auto assign + type: boolean + organization: + format: uuid + readOnly: true + title: Organization + type: string + project: + format: uuid + nullable: true + readOnly: true + title: Project + type: string + dataset: + format: uuid + nullable: true + readOnly: true + title: Dataset + type: string + agent_definition: + format: uuid + nullable: true + readOnly: true + title: Agent definition + type: string + is_default: + readOnly: true + title: Is default + type: boolean + labels: + items: + $ref: '#/components/schemas/QueueLabelNested' + readOnly: true + type: array + annotators: + items: + $ref: '#/components/schemas/QueueAnnotatorNested' + readOnly: true + type: array + label_ids: + items: + format: uuid + type: string + type: array + annotator_ids: + items: + format: uuid + type: string + type: array + annotator_roles: + additionalProperties: + additionalProperties: true + type: object + title: Annotator roles + type: object + label_count: + readOnly: true + title: Label count + type: integer + annotator_count: + readOnly: true + title: Annotator count + type: integer + item_count: + readOnly: true + title: Item count + type: integer + completed_count: + readOnly: true + title: Completed count + type: integer + created_by: + format: uuid + nullable: true + readOnly: true + title: Created by + type: string + created_by_name: + minLength: 1 + readOnly: true + title: Created by name + type: string + viewer_role: + readOnly: true + title: Viewer role + type: string + viewer_roles: + readOnly: true + title: Viewer roles + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - name + type: object + QueueForSourceQueue: + example: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + instructions: + title: Instructions + type: string + is_default: + title: Is default + type: boolean + required: + - id + - instructions + - is_default + - name + type: object + QueueForSourceItem: + example: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + properties: + id: + format: uuid + title: Id + type: string + status: + minLength: 1 + title: Status + type: string + source_type: + minLength: 1 + title: Source type + type: string + source_id: + minLength: 1 + nullable: true + title: Source id + type: string + required: + - id + - source_id + - source_type + - status + type: object + QueueLabelResult: + example: + settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + type: + minLength: 1 + title: Type + type: string + settings: + additionalProperties: true + title: Settings + type: object + description: + title: Description + type: string + allow_notes: + title: Allow notes + type: boolean + required: + title: Required + type: boolean + order: + title: Order + type: integer + required: + - allow_notes + - id + - name + - order + - required + - settings + - type + type: object + QueueForSourceEntry: + example: + span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + existing_notes: existing_notes + existing_label_notes: + key: existing_label_notes + existing_scores: + key: + key: "" + queue: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + queue: + $ref: '#/components/schemas/QueueForSourceQueue' + item: + $ref: '#/components/schemas/QueueForSourceItem' + labels: + items: + $ref: '#/components/schemas/QueueLabelResult' + type: array + existing_scores: + additionalProperties: + additionalProperties: true + type: object + title: Existing scores + type: object + existing_notes: + title: Existing notes + type: string + existing_label_notes: + additionalProperties: + minLength: 1 + type: string + title: Existing label notes + type: object + span_notes: + items: + additionalProperties: true + type: object + type: array + span_notes_source_id: + minLength: 1 + nullable: true + title: Span notes source id + type: string + required: + - existing_label_notes + - existing_notes + - existing_scores + - item + - labels + - queue + - span_notes + type: object + QueueForSourceResponse: + example: + result: + - span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + existing_notes: existing_notes + existing_label_notes: + key: existing_label_notes + existing_scores: + key: + key: "" + queue: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + existing_notes: existing_notes + existing_label_notes: + key: existing_label_notes + existing_scores: + key: + key: "" + queue: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/QueueForSourceEntry' + type: array + required: + - result + type: object + QueueDefaultRequest: + example: + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + project_id: + format: uuid + title: Project id + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + type: object + QueueDefaultQueue: + example: + instructions: instructions + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + instructions: + title: Instructions + type: string + status: + minLength: 1 + title: Status + type: string + is_default: + title: Is default + type: boolean + required: + - id + - is_default + - name + - status + type: object + QueueDefaultResult: + example: + created: true + action: created + queue: + instructions: instructions + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: status + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + queue: + $ref: '#/components/schemas/QueueDefaultQueue' + labels: + items: + $ref: '#/components/schemas/QueueLabelResult' + type: array + created: + title: Created + type: boolean + action: + enum: + - created + - restored + - fetched + title: Action + type: string + required: + - action + - created + - labels + - queue + type: object + QueueDefaultResponse: + example: + result: + created: true + action: created + queue: + instructions: instructions + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: status + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueDefaultResult' + required: + - result + type: object + QueueLabelRequest: + example: + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + properties: + label_id: + format: uuid + title: Label id + type: string + required: + default: true + title: Required + type: boolean + required: + - label_id + type: object + QueueAddLabelResult: + example: + queue_status: queue_status + created: true + reopened_items: 0 + label: + settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + label: + $ref: '#/components/schemas/QueueLabelResult' + created: + title: Created + type: boolean + reopened_items: + title: Reopened items + type: integer + queue_status: + minLength: 1 + title: Queue status + type: string + required: + - created + - label + - queue_status + - reopened_items + type: object + QueueAddLabelResponse: + example: + result: + queue_status: queue_status + created: true + reopened_items: 0 + label: + settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAddLabelResult' + required: + - result + type: object + QueueAgreementLabel: + example: + cohens_kappa: 1.4658129805029452 + agreement_pct: 6.027456183070403 + disagreement_items: + - disagreement_items + - disagreement_items + disagreement_count: 5 + label_type: label_type + label_name: label_name + properties: + label_name: + nullable: true + title: Label name + type: string + label_type: + nullable: true + title: Label type + type: string + agreement_pct: + nullable: true + title: Agreement pct + type: number + cohens_kappa: + nullable: true + title: Cohens kappa + type: number + disagreement_count: + title: Disagreement count + type: integer + disagreement_items: + items: + minLength: 1 + type: string + type: array + required: + - agreement_pct + - cohens_kappa + - disagreement_count + - disagreement_items + - label_name + - label_type + type: object + QueueAgreementAnnotatorPair: + example: + agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + properties: + annotator_1_id: + minLength: 1 + title: Annotator 1 id + type: string + annotator_2_id: + minLength: 1 + title: Annotator 2 id + type: string + agreement_pct: + title: Agreement pct + type: number + total_comparisons: + title: Total comparisons + type: integer + required: + - agreement_pct + - annotator_1_id + - annotator_2_id + - total_comparisons + type: object + QueueAgreementResult: + example: + annotator_pairs: + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + overall_agreement: 0.8008281904610115 + labels: + key: + cohens_kappa: 1.4658129805029452 + agreement_pct: 6.027456183070403 + disagreement_items: + - disagreement_items + - disagreement_items + disagreement_count: 5 + label_type: label_type + label_name: label_name + properties: + overall_agreement: + nullable: true + title: Overall agreement + type: number + labels: + additionalProperties: + $ref: '#/components/schemas/QueueAgreementLabel' + title: Labels + type: object + annotator_pairs: + items: + $ref: '#/components/schemas/QueueAgreementAnnotatorPair' + type: array + required: + - annotator_pairs + - labels + - overall_agreement + type: object + QueueAgreementResponse: + example: + result: + annotator_pairs: + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + overall_agreement: 0.8008281904610115 + labels: + key: + cohens_kappa: 1.4658129805029452 + agreement_pct: 6.027456183070403 + disagreement_items: + - disagreement_items + - disagreement_items + disagreement_count: 5 + label_type: label_type + label_name: label_name + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAgreementResult' + required: + - result + type: object + QueueAnalyticsThroughputDaily: + example: + date: date + count: 0 + properties: + date: + minLength: 1 + title: Date + type: string + count: + title: Count + type: integer + required: + - count + - date + type: object + QueueAnalyticsThroughput: + example: + total_completed: 6 + daily: + - date: date + count: 0 + - date: date + count: 0 + avg_per_day: 1.4658129805029452 + properties: + daily: + items: + $ref: '#/components/schemas/QueueAnalyticsThroughputDaily' + type: array + total_completed: + title: Total completed + type: integer + avg_per_day: + title: Avg per day + type: number + required: + - avg_per_day + - daily + - total_completed + type: object + QueueAnalyticsAnnotatorPerformance: + example: + user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + properties: + user_id: + minLength: 1 + nullable: true + title: User id + type: string + name: + nullable: true + title: Name + type: string + completed: + title: Completed + type: integer + last_active: + format: date-time + nullable: true + title: Last active + type: string + required: + - completed + type: object + QueueAnalyticsResult: + example: + total: 2 + label_distribution: + key: + key: "" + throughput: + total_completed: 6 + daily: + - date: date + count: 0 + - date: date + count: 0 + avg_per_day: 1.4658129805029452 + status_breakdown: + key: 5 + annotator_performance: + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + properties: + throughput: + $ref: '#/components/schemas/QueueAnalyticsThroughput' + annotator_performance: + items: + $ref: '#/components/schemas/QueueAnalyticsAnnotatorPerformance' + type: array + label_distribution: + additionalProperties: + additionalProperties: true + type: object + title: Label distribution + type: object + status_breakdown: + additionalProperties: + type: integer + title: Status breakdown + type: object + total: + title: Total + type: integer + required: + - annotator_performance + - label_distribution + - status_breakdown + - throughput + - total + type: object + QueueAnalyticsResponse: + example: + result: + total: 2 + label_distribution: + key: + key: "" + throughput: + total_completed: 6 + daily: + - date: date + count: 0 + - date: date + count: 0 + avg_per_day: 1.4658129805029452 + status_breakdown: + key: 5 + annotator_performance: + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAnalyticsResult' + required: + - result + type: object + QueueExportField: + example: + kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + properties: + id: + minLength: 1 + title: Id + type: string + label: + minLength: 1 + title: Label + type: string + column: + minLength: 1 + title: Column + type: string + data_type: + minLength: 1 + title: Data type + type: string + group: + minLength: 1 + title: Group + type: string + default: + title: Default + type: boolean + path: + title: Path + type: string + source_type: + title: Source type + type: string + kind: + title: Kind + type: string + label_id: + format: uuid + title: Label id + type: string + slot: + title: Slot + type: integer + eval_key: + title: Eval key + type: string + expand_fields: + items: + minLength: 1 + type: string + type: array + required: + - column + - data_type + - default + - group + - id + - label + type: object + QueueExportDefaultMapping: + example: + field: field + column: column + enabled: true + properties: + field: + minLength: 1 + title: Field + type: string + column: + minLength: 1 + title: Column + type: string + enabled: + title: Enabled + type: boolean + required: + - column + - enabled + - field + type: object + QueueExportFieldsResult: + example: + default_mapping: + - field: field + column: column + enabled: true + - field: field + column: column + enabled: true + fields: + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + properties: + fields: + items: + $ref: '#/components/schemas/QueueExportField' + type: array + default_mapping: + items: + $ref: '#/components/schemas/QueueExportDefaultMapping' + type: array + required: + - default_mapping + - fields + type: object + QueueExportFieldsResponse: + example: + result: + default_mapping: + - field: field + column: column + enabled: true + - field: field + column: column + enabled: true + fields: + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueExportFieldsResult' + required: + - result + type: object + QueueExportColumnMapping: + example: + field: field + column: column + id: id + enabled: true + properties: + field: + title: Field + type: string + id: + title: Id + type: string + column: + title: Column + type: string + enabled: + default: true + title: Enabled + type: boolean + type: object + QueueExportToDatasetRequest: + example: + column_mapping: + - field: field + column: column + id: id + enabled: true + - field: field + column: column + id: id + enabled: true + status_filter: completed + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + title: Dataset name + type: string + status_filter: + default: completed + title: Status filter + type: string + column_mapping: + items: + $ref: '#/components/schemas/QueueExportColumnMapping' + type: array + type: object + QueueExportToDatasetResult: + example: + rows_created: 0 + columns: + - columns + - columns + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + rows_created: + title: Rows created + type: integer + columns: + items: + minLength: 1 + type: string + type: array + required: + - columns + - dataset_id + - dataset_name + - rows_created + type: object + QueueExportToDatasetResponse: + example: + result: + rows_created: 0 + columns: + - columns + - columns + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueExportToDatasetResult' + required: + - result + type: object + QueueExportAnnotationsResponse: + example: + result: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + additionalProperties: true + type: object + type: array + required: + - result + type: object + QueueHardDeleteRequest: + example: + confirm_name: confirm_name + force: true + properties: + force: + title: Force + type: boolean + confirm_name: + minLength: 1 + title: Confirm name + type: string + required: + - confirm_name + - force + type: object + QueueHardDeleteResult: + example: + archived: true + deleted: true + hard_deleted: true + queue_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + deleted: + title: Deleted + type: boolean + hard_deleted: + title: Hard deleted + type: boolean + archived: + title: Archived + type: boolean + queue_id: + format: uuid + title: Queue id + type: string + required: + - deleted + - queue_id + type: object + QueueHardDeleteResponse: + example: + result: + archived: true + deleted: true + hard_deleted: true + queue_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueHardDeleteResult' + required: + - result + type: object + QueueProgressAnnotatorStat: + example: + in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + properties: + user_id: + format: uuid + title: User id + type: string + name: + minLength: 1 + nullable: true + title: Name + type: string + completed: + title: Completed + type: integer + pending: + title: Pending + type: integer + in_progress: + title: In progress + type: integer + in_review: + title: In review + type: integer + annotations_count: + title: Annotations count + type: integer + required: + - annotations_count + - completed + - in_progress + - in_review + - pending + - user_id + type: object + QueueProgressUserProgress: + example: + total: 1 + in_progress: 6 + in_review: 7 + progress_pct: 4.965218492984954 + pending: 1 + completed: 1 + skipped: 1 + properties: + total: + title: Total + type: integer + completed: + title: Completed + type: integer + pending: + title: Pending + type: integer + in_progress: + title: In progress + type: integer + in_review: + title: In review + type: integer + skipped: + title: Skipped + type: integer + progress_pct: + title: Progress pct + type: number + required: + - completed + - in_progress + - in_review + - pending + - progress_pct + - skipped + - total + type: object + QueueProgressResult: + example: + total: 0 + in_progress: 1 + in_review: 5 + progress_pct: 7.061401241503109 + annotator_stats: + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + pending: 6 + user_progress: + total: 1 + in_progress: 6 + in_review: 7 + progress_pct: 4.965218492984954 + pending: 1 + completed: 1 + skipped: 1 + completed: 5 + skipped: 2 + properties: + total: + title: Total + type: integer + pending: + title: Pending + type: integer + in_progress: + title: In progress + type: integer + in_review: + title: In review + type: integer + completed: + title: Completed + type: integer + skipped: + title: Skipped + type: integer + progress_pct: + title: Progress pct + type: number + annotator_stats: + items: + $ref: '#/components/schemas/QueueProgressAnnotatorStat' + type: array + user_progress: + $ref: '#/components/schemas/QueueProgressUserProgress' + required: + - annotator_stats + - completed + - in_progress + - in_review + - pending + - progress_pct + - skipped + - total + - user_progress + type: object + QueueProgressResponse: + example: + result: + total: 0 + in_progress: 1 + in_review: 5 + progress_pct: 7.061401241503109 + annotator_stats: + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + pending: 6 + user_progress: + total: 1 + in_progress: 6 + in_review: 7 + progress_pct: 4.965218492984954 + pending: 1 + completed: 1 + skipped: 1 + completed: 5 + skipped: 2 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueProgressResult' + required: + - result + type: object + QueueRemoveLabelResult: + example: + removed: true + properties: + removed: + title: Removed + type: boolean + required: + - removed + type: object + QueueRemoveLabelResponse: + example: + result: + removed: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueRemoveLabelResult' + required: + - result + type: object + EmptyRequest: + additionalProperties: false + properties: {} + type: object + QueueStatusResponse: + example: + result: + viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AnnotationQueue' + required: + - result + type: object + QueueStatusRequest: + example: + status: draft + properties: + status: + enum: + - draft + - active + - paused + - completed + title: Status + type: string + required: + - status + type: object + AutomationRuleScope: + example: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + project_id: + format: uuid + title: Project id + type: string + is_voice_call: + title: Is voice call + type: boolean + remove_simulation_calls: + title: Remove simulation calls + type: boolean + type: object + AutomationRuleConditions: + example: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + properties: + operator: + default: and + enum: + - and + title: Operator + type: string + filter: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + scope: + $ref: '#/components/schemas/AutomationRuleScope' + rules: + items: + $ref: '#/components/schemas/Rules_inner' + title: Rules + type: array + type: object + AutomationRule: + example: + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + created_by_name: created_by_name + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enabled: true + last_triggered_at: 2000-01-23T04:56:07.000+00:00 + trigger_count: 6 + trigger_frequency: manual + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + conditions: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + queue: + format: uuid + readOnly: true + title: Queue + type: string + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + conditions: + $ref: '#/components/schemas/AutomationRuleConditions' + enabled: + title: Enabled + type: boolean + trigger_frequency: + enum: + - manual + - hourly + - daily + - weekly + - monthly + title: Trigger frequency + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + created_by: + format: uuid + nullable: true + readOnly: true + title: Created by + type: string + created_by_name: + minLength: 1 + readOnly: true + title: Created by name + type: string + last_triggered_at: + format: date-time + nullable: true + readOnly: true + title: Last triggered at + type: string + trigger_count: + readOnly: true + title: Trigger count + type: integer + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - name + - source_type + type: object + AutomationRuleEvaluateResult: + example: + duplicates: 1 + added: 6 + truncated: true + matched: 0 + error: error + properties: + matched: + title: Matched + type: integer + added: + title: Added + type: integer + duplicates: + title: Duplicates + type: integer + truncated: + title: Truncated + type: boolean + error: + title: Error + type: string + required: + - added + - duplicates + - matched + type: object + AutomationRuleEvaluateResponse: + example: + result: + duplicates: 1 + added: 6 + truncated: true + matched: 0 + error: error + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AutomationRuleEvaluateResult' + required: + - result + type: object + AutomationRuleEvaluateAcceptedResponse: + example: + workflow_id: workflow_id + message: message + status: status + properties: + status: + minLength: 1 + title: Status + type: string + workflow_id: + minLength: 1 + title: Workflow id + type: string + message: + minLength: 1 + title: Message + type: string + required: + - message + - status + - workflow_id + type: object + QueueItem: + example: + workflow_status: workflow_status + metadata: + key: "" + reviewed_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + review_notes: review_notes + reviewed_at: 2000-01-23T04:56:07.000+00:00 + reserved_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + assigned_users: assigned_users + priority: 441289069 + workflow_status_label: workflow_status_label + reserved_by_name: reserved_by_name + reviewed_by_name: reviewed_by_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + review_status: review_status + source_preview: source_preview + assigned_to_name: assigned_to_name + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: pending + order: -1517921766 + assigned_to: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + reservation_expires_at: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + queue: + format: uuid + readOnly: true + title: Queue + type: string + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + status: + enum: + - pending + - in_progress + - completed + - skipped + title: Status + type: string + workflow_status: + readOnly: true + title: Workflow status + type: string + workflow_status_label: + readOnly: true + title: Workflow status label + type: string + priority: + maximum: 2147483647 + minimum: -2147483648 + title: Priority + type: integer + order: + maximum: 2147483647 + minimum: -2147483648 + title: Order + type: integer + metadata: + additionalProperties: true + title: Metadata + type: object + assigned_to: + format: uuid + nullable: true + title: Assigned to + type: string + assigned_to_name: + minLength: 1 + readOnly: true + title: Assigned to name + type: string + assigned_users: + readOnly: true + title: Assigned users + type: string + reserved_by: + format: uuid + nullable: true + title: Reserved by + type: string + reserved_by_name: + minLength: 1 + readOnly: true + title: Reserved by name + type: string + reservation_expires_at: + format: date-time + nullable: true + title: Reservation expires at + type: string + review_status: + maxLength: 20 + nullable: true + title: Review status + type: string + reviewed_by: + format: uuid + nullable: true + title: Reviewed by + type: string + reviewed_by_name: + minLength: 1 + readOnly: true + title: Reviewed by name + type: string + reviewed_at: + format: date-time + nullable: true + title: Reviewed at + type: string + review_notes: + nullable: true + title: Review notes + type: string + source_preview: + readOnly: true + title: Source preview + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - source_type + type: object + AddQueueItem: + example: + source_type: call_execution + source_id: source_id + properties: + source_type: + enum: + - call_execution + - dataset_row + - observation_span + - prototype_run + - trace + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + required: + - source_id + - source_type + type: object + Selection: + example: + mode: filter + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + remove_simulation_calls: false + exclude_ids: + - exclude_ids + - exclude_ids + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: false + source_type: call_execution + properties: + mode: + enum: + - filter + title: Mode + type: string + source_type: + enum: + - call_execution + - observation_span + - trace + - trace_session + title: Source type + type: string + project_id: + format: uuid + title: Project id + type: string + filter: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + exclude_ids: + items: + minLength: 1 + type: string + type: array + remove_simulation_calls: + default: false + title: Remove simulation calls + type: boolean + is_voice_call: + default: false + title: Is voice call + type: boolean + required: + - mode + - project_id + - source_type + type: object + AddItems: + example: + selection: + mode: filter + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + remove_simulation_calls: false + exclude_ids: + - exclude_ids + - exclude_ids + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: false + source_type: call_execution + items: + - source_type: call_execution + source_id: source_id + - source_type: call_execution + source_id: source_id + properties: + items: + items: + $ref: '#/components/schemas/AddQueueItem' + type: array + selection: + $ref: '#/components/schemas/Selection' + type: object + QueueAddItemsResult: + example: + duplicates: 6 + total_matching: 1 + queue_status: queue_status + added: 0 + errors: + - errors + - errors + properties: + added: + title: Added + type: integer + duplicates: + title: Duplicates + type: integer + errors: + items: + minLength: 1 + type: string + type: array + queue_status: + minLength: 1 + title: Queue status + type: string + total_matching: + title: Total matching + type: integer + required: + - added + - duplicates + - errors + - queue_status + type: object + QueueAddItemsResponse: + example: + result: + duplicates: 6 + total_matching: 1 + queue_status: queue_status + added: 0 + errors: + - errors + - errors + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAddItemsResult' + required: + - result + type: object + ApiSelectionTooLargeDetail: + example: + total_matching: 5 + cap: 5 + type: selection_too_large + message: message + properties: + type: + enum: + - selection_too_large + title: Type + type: string + message: + minLength: 1 + title: Message + type: string + total_matching: + title: Total matching + type: integer + cap: + title: Cap + type: integer + required: + - cap + - message + - total_matching + - type + type: object + ApiSelectionTooLargeError: + example: + result: result + code: selection_too_large + detail: detail + type: selection_too_large + message: message + error: + total_matching: 5 + cap: 5 + type: selection_too_large + message: message + status: false + properties: + status: + default: false + title: Status + type: boolean + result: + minLength: 1 + nullable: true + title: Result + type: string + type: + enum: + - selection_too_large + title: Type + type: string + code: + default: selection_too_large + minLength: 1 + title: Code + type: string + detail: + minLength: 1 + title: Detail + type: string + message: + minLength: 1 + title: Message + type: string + error: + $ref: '#/components/schemas/ApiSelectionTooLargeDetail' + required: + - error + - message + type: object + AssignItems: + example: + user_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + item_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action: add + properties: + item_ids: + items: + format: uuid + type: string + minItems: 1 + type: array + user_ids: + items: + format: uuid + type: string + type: array + action: + default: add + enum: + - add + - set + - remove + title: Action + type: string + required: + - item_ids + type: object + QueueAssignItemsResult: + example: + assigned: 0 + properties: + assigned: + title: Assigned + type: integer + required: + - assigned + type: object + QueueAssignItemsResponse: + example: + result: + assigned: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAssignItemsResult' + required: + - result + type: object + BulkRemoveItems: + example: + item_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + item_ids: + items: + format: uuid + type: string + minItems: 1 + type: array + required: + - item_ids + type: object + QueueBulkRemoveItemsResult: + example: + removed: 0 + properties: + removed: + title: Removed + type: integer + required: + - removed + type: object + QueueBulkRemoveItemsResponse: + example: + result: + removed: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueBulkRemoveItemsResult' + required: + - result + type: object + QueueNextItemResult: + example: + item: + key: "" + properties: + item: + additionalProperties: true + title: Item + type: object + required: + - item + type: object + QueueNextItemResponse: + example: + result: + item: + key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueNextItemResult' + required: + - result + type: object + QueueAnnotateDetailResult: + example: + span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + key: "" + existing_notes: existing_notes + annotations: + - key: "" + - key: "" + review_comments: + - key: "" + - key: "" + progress: + key: "" + next_item_id: next_item_id + review_threads: + - key: "" + - key: "" + prev_item_id: prev_item_id + queue: + key: "" + labels: + - key: "" + - key: "" + properties: + item: + additionalProperties: true + title: Item + type: object + queue: + additionalProperties: true + title: Queue + type: object + labels: + items: + additionalProperties: true + type: object + type: array + annotations: + items: + additionalProperties: true + type: object + type: array + review_comments: + items: + additionalProperties: true + type: object + type: array + review_threads: + items: + additionalProperties: true + type: object + type: array + existing_notes: + title: Existing notes + type: string + span_notes: + items: + additionalProperties: true + type: object + type: array + span_notes_source_id: + minLength: 1 + nullable: true + title: Span notes source id + type: string + progress: + additionalProperties: true + title: Progress + type: object + next_item_id: + minLength: 1 + nullable: true + title: Next item id + type: string + prev_item_id: + minLength: 1 + nullable: true + title: Prev item id + type: string + required: + - annotations + - existing_notes + - item + - labels + - progress + - queue + - review_comments + - review_threads + - span_notes + type: object + QueueAnnotateDetailResponse: + example: + result: + span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + key: "" + existing_notes: existing_notes + annotations: + - key: "" + - key: "" + review_comments: + - key: "" + - key: "" + progress: + key: "" + next_item_id: next_item_id + review_threads: + - key: "" + - key: "" + prev_item_id: prev_item_id + queue: + key: "" + labels: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAnnotateDetailResult' + required: + - result + type: object + Score: + example: + notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + readOnly: true + title: Source id + type: string + label_id: + format: uuid + readOnly: true + title: Label id + type: string + label_name: + minLength: 1 + readOnly: true + title: Label name + type: string + label_type: + minLength: 1 + readOnly: true + title: Label type + type: string + label_settings: + additionalProperties: true + readOnly: true + title: Label settings + type: object + label_allow_notes: + readOnly: true + title: Label allow notes + type: boolean + value: + additionalProperties: true + title: Value + type: object + score_source: + enum: + - human + - api + - auto + - imported + title: Score source + type: string + notes: + nullable: true + title: Notes + type: string + annotator: + format: uuid + nullable: true + readOnly: true + title: Annotator + type: string + annotator_name: + minLength: 1 + readOnly: true + title: Annotator name + type: string + annotator_email: + minLength: 1 + readOnly: true + title: Annotator email + type: string + queue_item: + format: uuid + nullable: true + readOnly: true + title: Queue item + type: string + queue_id: + readOnly: true + title: Queue id + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + required: + - source_type + - value + type: object + QueueItemAnnotationsResponse: + example: + result: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/Score' + type: array + required: + - result + type: object + ImportAnnotationEntry: + example: + notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: score_source + properties: + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + title: Notes + type: string + score_source: + title: Score source + type: string + required: + - label_id + - value + type: object + ImportAnnotations: + example: + annotations: + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: score_source + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: score_source + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + annotations: + items: + $ref: '#/components/schemas/ImportAnnotationEntry' + type: array + annotator_id: + format: uuid + title: Annotator id + type: string + required: + - annotations + type: object + QueueImportAnnotationsResult: + example: + imported: 0 + properties: + imported: + title: Imported + type: integer + required: + - imported + type: object + QueueImportAnnotationsResponse: + example: + result: + imported: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueImportAnnotationsResult' + required: + - result + type: object + SubmitAnnotationEntry: + example: + notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + title: Notes + type: string + required: + - label_id + - value + type: object + SubmitAnnotations: + example: + notes: "" + annotations: + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + item_notes: item_notes + properties: + annotations: + items: + $ref: '#/components/schemas/SubmitAnnotationEntry' + type: array + notes: + default: "" + title: Notes + type: string + item_notes: + nullable: true + title: Item notes + type: string + required: + - annotations + type: object + QueueSubmitAnnotationsResult: + example: + submitted: 0 + properties: + submitted: + title: Submitted + type: integer + required: + - submitted + type: object + QueueSubmitAnnotationsResponse: + example: + result: + submitted: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueSubmitAnnotationsResult' + required: + - result + type: object + QueueItemNavigationRequest: + example: + include_completed: false + exclude_review_status: exclude_review_status + exclude: + - exclude + - exclude + properties: + exclude: + items: + type: string + type: array + exclude_review_status: + title: Exclude review status + type: string + include_completed: + default: false + title: Include completed + type: boolean + type: object + QueueNavigationResult: + example: + skipped_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + completed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + completed_item_id: + format: uuid + title: Completed item id + type: string + skipped_item_id: + format: uuid + title: Skipped item id + type: string + next_item: + additionalProperties: true + title: Next item + type: object + required: + - next_item + type: object + QueueNavigationResponse: + example: + result: + skipped_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + completed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueNavigationResult' + required: + - result + type: object + QueueDiscussionResult: + example: + review_comments: + - key: "" + - key: "" + comment: + key: "" + thread: + key: "" + review_threads: + - key: "" + - key: "" + properties: + review_comments: + items: + additionalProperties: true + type: object + type: array + review_threads: + items: + additionalProperties: true + type: object + type: array + comment: + additionalProperties: true + title: Comment + type: object + thread: + additionalProperties: true + title: Thread + type: object + required: + - review_comments + - review_threads + type: object + QueueDiscussionResponse: + example: + result: + review_comments: + - key: "" + - key: "" + comment: + key: "" + thread: + key: "" + review_threads: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueDiscussionResult' + required: + - result + type: object + DiscussionCommentRequest: + example: + mentioned_user_ids: + - mentioned_user_ids + - mentioned_user_ids + thread_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + comment: + title: Comment + type: string + label_id: + format: uuid + title: Label id + type: string + target_annotator_id: + format: uuid + title: Target annotator id + type: string + thread_id: + format: uuid + title: Thread id + type: string + mentioned_user_ids: + items: + minLength: 1 + type: string + type: array + type: object + DiscussionReactionRequest: + example: + emoji: emoji + properties: + emoji: + maxLength: 16 + title: Emoji + type: string + type: object + DiscussionThreadStatusRequest: + example: + comment: comment + properties: + comment: + title: Comment + type: string + type: object + QueueReleaseReservationResult: + example: + released: true + properties: + released: + title: Released + type: boolean + required: + - released + type: object + QueueReleaseReservationResponse: + example: + result: + released: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueReleaseReservationResult' + required: + - result + type: object + ReviewLabelCommentRequest: + example: + comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + label_id: + format: uuid + title: Label id + type: string + target_annotator_id: + format: uuid + title: Target annotator id + type: string + comment: + title: Comment + type: string + type: object + ReviewItemRequest: + example: + notes: notes + label_comments: + - comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action: approve + properties: + action: + enum: + - approve + - request_changes + - reject + - comment + title: Action + type: string + notes: + title: Notes + type: string + label_comments: + items: + $ref: '#/components/schemas/ReviewLabelCommentRequest' + type: array + required: + - action + type: object + QueueReviewItemResult: + example: + reviewed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + action: action + review_comments: + - key: "" + - key: "" + review_threads: + - key: "" + - key: "" + properties: + reviewed_item_id: + format: uuid + title: Reviewed item id + type: string + action: + minLength: 1 + title: Action + type: string + next_item: + additionalProperties: true + title: Next item + type: object + review_comments: + items: + additionalProperties: true + type: object + type: array + review_threads: + items: + additionalProperties: true + type: object + type: array + required: + - action + - next_item + - review_comments + - review_threads + - reviewed_item_id + type: object + QueueReviewItemResponse: + example: + result: + reviewed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + action: action + review_comments: + - key: "" + - key: "" + review_threads: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueReviewItemResult' + required: + - result + type: object + Organization: + example: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + display_name: + maxLength: 255 + title: Display name + type: string + is_new: + title: Is new + type: boolean + ws_enabled: + title: Ws enabled + type: boolean + region: + maxLength: 16 + minLength: 1 + title: Region + type: string + require_2fa: + title: Require 2fa + type: boolean + require_2fa_grace_period_days: + maximum: 32767 + minimum: 0 + title: Require 2fa grace period days + type: integer + require_2fa_enforced_at: + format: date-time + nullable: true + title: Require 2fa enforced at + type: string + required: + - name + type: object + User: + example: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + email: + format: email + maxLength: 254 + minLength: 1 + title: Email + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + organization_role: + enum: + - Owner + - Admin + - Member + - Viewer + - workspace_admin + - workspace_member + - workspace_viewer + nullable: true + title: Organization role + type: string + organization: + $ref: '#/components/schemas/Organization' + created_at: + format: date-time + readOnly: true + title: Created at + type: string + status: + readOnly: true + title: Status + type: string + role: + description: "User's job role (e.g., Data Scientist, ML Engineer, or custom\ + \ role)" + maxLength: 255 + nullable: true + title: Role + type: string + goals: + additionalProperties: true + description: List of user's goals for using the platform + title: Goals + type: object + required: + - email + - name + type: object + AnnotationsLabels: + example: + settings: + key: "" + allow_notes: true + annotation_count: 6 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: text + trace_annotations_count: 0 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + type: + enum: + - text + - numeric + - categorical + - star + - thumbs_up_down + title: Type + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + settings: + additionalProperties: true + title: Settings + type: object + project: + format: uuid + title: Project + type: string + description: + nullable: true + title: Description + type: string + allow_notes: + title: Allow notes + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + trace_annotations_count: + readOnly: true + title: Trace annotations count + type: integer + annotation_count: + readOnly: true + title: Annotation count + type: integer + required: + - name + - type + type: object + AnnotationLabelRestoreResponse: + example: + result: + settings: + key: "" + allow_notes: true + annotation_count: 6 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: text + trace_annotations_count: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AnnotationsLabels' + required: + - result + type: object + ApiKey: + example: + masked_actual_key: masked_actual_key + config_json: + key: "" + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + key: key + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + provider: + maxLength: 50 + minLength: 1 + title: Provider + type: string + key: + maxLength: 2500 + nullable: true + title: Key + type: string + organization: + format: uuid + nullable: true + readOnly: true + title: Organization + type: string + masked_actual_key: + readOnly: true + title: Masked actual key + type: string + config_json: + additionalProperties: true + title: Config json + type: object + required: + - provider + type: object + ModelHubPaginatedResponse: + example: + next: next + previous: previous + count: 0 + results: + - key: "" + - key: "" + properties: + count: + title: Count + type: integer + next: + nullable: true + title: Next + type: string + previous: + nullable: true + title: Previous + type: string + results: + items: + additionalProperties: true + type: object + type: array + required: + - count + - results + type: object + ModelHubEmptyRequest: + properties: {} + type: object + ModelHubStringResultResponse: + example: + result: result + status: true + properties: + status: + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + - status + type: object + DatasetColumnDetailItem: + example: + name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + data_type: + nullable: true + title: Data type + type: string + required: + - id + - name + type: object + DatasetColumnDetailResult: + example: + columns: + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + columns: + items: + $ref: '#/components/schemas/DatasetColumnDetailItem' + type: array + required: + - columns + type: object + DatasetColumnDetailResponse: + example: + result: + columns: + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetColumnDetailResult' + required: + - result + - status + type: object + AnnotationSummaryHeader: + example: + dataset_coverage: 0.8008281904610115 + completion_eta: 6.027456183070403 + overall_agreement: 1.4658129805029452 + properties: + dataset_coverage: + nullable: true + title: Dataset coverage + type: number + completion_eta: + nullable: true + title: Completion eta + type: number + overall_agreement: + nullable: true + title: Overall agreement + type: number + type: object + AnnotationSummaryResult: + example: + annotators: + - key: "" + - key: "" + header: + dataset_coverage: 0.8008281904610115 + completion_eta: 6.027456183070403 + overall_agreement: 1.4658129805029452 + labels: + - key: "" + - key: "" + properties: + labels: + items: + additionalProperties: true + type: object + type: array + annotators: + items: + additionalProperties: true + type: object + type: array + header: + $ref: '#/components/schemas/AnnotationSummaryHeader' + type: object + AnnotationSummaryResponse: + example: + result: + annotators: + - key: "" + - key: "" + header: + dataset_coverage: 0.8008281904610115 + completion_eta: 6.027456183070403 + overall_agreement: 1.4658129805029452 + labels: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AnnotationSummaryResult' + required: + - result + type: object + DatasetEvalStatsMetric: + example: + output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + total_cells: + nullable: true + title: Total cells + type: integer + output: + additionalProperties: true + title: Output + type: object + required: + - name + - output + type: object + DatasetEvalStatsItem: + example: + result: + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + output_type: output_type + name: name + total_choices_avg: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_avg: + key: "" + total_pass_rate: 6.027456183070403 + is_numeric_eval: true + is_numeric_eval_percentage: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + output_type: + minLength: 1 + title: Output type + type: string + result: + items: + $ref: '#/components/schemas/DatasetEvalStatsMetric' + type: array + total_pass_rate: + nullable: true + title: Total pass rate + type: number + total_avg: + additionalProperties: true + title: Total avg + type: object + total_choices_avg: + additionalProperties: true + title: Total choices avg + type: object + is_numeric_eval: + title: Is numeric eval + type: boolean + is_numeric_eval_percentage: + title: Is numeric eval percentage + type: boolean + required: + - id + - name + - output_type + - result + type: object + DatasetEvalStatsResponse: + example: + result: + - result: + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + output_type: output_type + name: name + total_choices_avg: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_avg: + key: "" + total_pass_rate: 6.027456183070403 + is_numeric_eval: true + is_numeric_eval_percentage: true + - result: + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + output_type: output_type + name: name + total_choices_avg: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_avg: + key: "" + total_pass_rate: 6.027456183070403 + is_numeric_eval: true + is_numeric_eval_percentage: true + status: true + properties: + status: + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/DatasetEvalStatsItem' + type: array + required: + - result + - status + type: object + JsonColumnSchemaEntry: + example: + max_array_count: 0 + keys: + - keys + - keys + max_images_count: 6 + name: name + sample: + key: "" + properties: + name: + minLength: 1 + title: Name + type: string + keys: + items: + minLength: 1 + type: string + type: array + sample: + additionalProperties: true + title: Sample + type: object + max_array_count: + title: Max array count + type: integer + max_images_count: + title: Max images count + type: integer + required: + - name + type: object + DatasetJsonSchemaResponse: + example: + result: + key: + max_array_count: 0 + keys: + - keys + - keys + max_images_count: 6 + name: name + sample: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + $ref: '#/components/schemas/JsonColumnSchemaEntry' + title: Result + type: object + required: + - result + - status + type: object + DatasetRunPromptStatsPrompt: + example: + name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + input_token: + title: Input token + type: number + output_token: + title: Output token + type: number + total_token: + title: Total token + type: number + required: + - id + - input_token + - name + - output_token + - total_token + type: object + DatasetRunPromptStatsResult: + example: + avg_cost: 6.027456183070403 + prompts: + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + avg_tokens: 0.8008281904610115 + avg_time: 1.4658129805029452 + properties: + avg_tokens: + title: Avg tokens + type: number + avg_cost: + title: Avg cost + type: number + avg_time: + title: Avg time + type: number + prompts: + items: + $ref: '#/components/schemas/DatasetRunPromptStatsPrompt' + type: array + required: + - avg_cost + - avg_time + - avg_tokens + - prompts + type: object + DatasetRunPromptStatsResponse: + example: + result: + avg_cost: 6.027456183070403 + prompts: + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + avg_tokens: 0.8008281904610115 + avg_time: 1.4658129805029452 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRunPromptStatsResult' + required: + - result + - status + type: object + CompareEvalsListRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_type: user + search_text: "" + properties: + search_text: + default: "" + title: Search text + type: string + eval_type: + enum: + - user + title: Eval type + type: string + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - dataset_ids + - eval_type + type: object + CompareEvalListResult: + example: + evals: + - key: "" + - key: "" + properties: + evals: + items: + additionalProperties: true + type: object + type: array + required: + - evals + type: object + CompareEvalListResponse: + example: + result: + evals: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareEvalListResult' + required: + - result + - status + type: object + ComparePreviewRunEvalRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_info: + key: "" + model: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: dataset_evaluation + config: + key: "" + properties: + config: + additionalProperties: true + title: Config + type: object + model: + default: "" + title: Model + type: string + template_id: + format: uuid + title: Template id + type: string + dataset_ids: + items: + format: uuid + type: string + type: array + dataset_info: + additionalProperties: true + title: Dataset info + type: object + source: + default: dataset_evaluation + title: Source + type: string + required: + - config + - dataset_ids + - template_id + type: object + EvalPreviewResult: + example: + responses: + - key: "" + - key: "" + properties: + responses: + items: + additionalProperties: true + description: Response + type: object + type: array + required: + - responses + type: object + EvalPreviewResponse: + example: + result: + responses: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalPreviewResult' + required: + - result + - status + type: object + CompareDatasetRowResult: + example: + prev_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + table: + - key: "" + - key: "" + properties: + prev_row_id: + format: uuid + nullable: true + title: Prev row id + type: string + next_row_id: + format: uuid + nullable: true + title: Next row id + type: string + table: + items: + additionalProperties: true + type: object + type: array + required: + - table + type: object + CompareDatasetRowResponse: + example: + result: + prev_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + table: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareDatasetRowResult' + required: + - result + - status + type: object + CompareDatasetDeleteResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + CompareDatasetDeleteResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareDatasetDeleteResult' + required: + - result + - status + type: object + DatasetExplanationSummaryResponseResult: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: "" + min_rows_required: 6 + status: status + row_count: 0 + properties: + response: + additionalProperties: true + title: Response + type: object + last_updated: + format: date-time + nullable: true + title: Last updated + type: string + status: + minLength: 1 + title: Status + type: string + row_count: + title: Row count + type: integer + min_rows_required: + title: Min rows required + type: integer + required: + - last_updated + - min_rows_required + - response + - row_count + - status + type: object + DatasetExplanationSummaryResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: "" + min_rows_required: 6 + status: status + row_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetExplanationSummaryResponseResult' + required: + - result + - status + type: object + BaseColumnsResponseResult: + example: + base_columns: + - base_columns + - base_columns + properties: + base_columns: + items: + minLength: 1 + type: string + type: array + required: + - base_columns + type: object + BaseColumnsResponse: + example: + result: + base_columns: + - base_columns + - base_columns + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/BaseColumnsResponseResult' + required: + - result + - status + type: object + HuggingFaceDatasetDetailRequest: + example: + dataset_id: dataset_id + properties: + dataset_id: + minLength: 1 + title: Dataset id + type: string + required: + - dataset_id + type: object + HuggingFaceDatasetDetail: + example: + downloads: 0 + author: author + name: name + description: description + id: id + likes: 6 + tags: + - tags + - tags + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + downloads: + title: Downloads + type: integer + likes: + title: Likes + type: integer + tags: + items: + minLength: 1 + type: string + type: array + author: + minLength: 1 + nullable: true + title: Author + type: string + required: + - description + - downloads + - id + - likes + - name + - tags + type: object + HuggingFaceDatasetDetailResponseResult: + example: + message: message + dataset: + downloads: 0 + author: author + name: name + description: description + id: id + likes: 6 + tags: + - tags + - tags + properties: + message: + minLength: 1 + title: Message + type: string + dataset: + $ref: '#/components/schemas/HuggingFaceDatasetDetail' + required: + - dataset + - message + type: object + HuggingFaceDatasetDetailResponse: + example: + result: + message: message + dataset: + downloads: 0 + author: author + name: name + description: description + id: id + likes: 6 + tags: + - tags + - tags + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/HuggingFaceDatasetDetailResponseResult' + required: + - result + - status + type: object + HuggingFaceDatasetListRequest: + example: + filter_params: + key: "" + search_query: "" + properties: + search_query: + default: "" + title: Search query + type: string + filter_params: + additionalProperties: true + title: Filter params + type: object + type: object + HuggingFaceDatasetListItem: + example: + downloads: 6 + author: author + name: name + id: id + likes: 1 + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + downloads: + title: Downloads + type: integer + likes: + title: Likes + type: integer + author: + minLength: 1 + nullable: true + title: Author + type: string + required: + - downloads + - id + - likes + - name + type: object + HuggingFaceDatasetListResponseResult: + example: + total_datasets: 0 + datasets: + - downloads: 6 + author: author + name: name + id: id + likes: 1 + - downloads: 6 + author: author + name: name + id: id + likes: 1 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + total_datasets: + title: Total datasets + type: integer + datasets: + items: + $ref: '#/components/schemas/HuggingFaceDatasetListItem' + type: array + required: + - datasets + - message + - total_datasets + type: object + HuggingFaceDatasetListResponse: + example: + result: + total_datasets: 0 + datasets: + - downloads: 6 + author: author + name: name + id: id + likes: 1 + - downloads: 6 + author: author + name: name + id: id + likes: 1 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/HuggingFaceDatasetListResponseResult' + required: + - result + - status + type: object + AddApiColumnRequest: + example: + column_name: column_name + config: + key: "" + concurrency: 0 + properties: + column_name: + minLength: 1 + title: Column name + type: string + config: + additionalProperties: true + title: Config + type: object + concurrency: + default: 5 + title: Concurrency + type: integer + required: + - column_name + - config + type: object + DynamicColumnCreateResult: + example: + new_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + new_column_name: new_column_name + properties: + message: + minLength: 1 + title: Message + type: string + new_column_id: + format: uuid + title: New column id + type: string + new_column_name: + minLength: 1 + title: New column name + type: string + required: + - message + - new_column_id + - new_column_name + type: object + DynamicColumnCreateResponse: + example: + result: + new_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + new_column_name: new_column_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DynamicColumnCreateResult' + required: + - result + - status + type: object + VectorDBColumnRequest: + example: + vector_length: 5 + new_column_name: new_column_name + search_type: search_type + url: url + concurrency: 1 + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + embedding_config: + key: "" + sub_type: sub_type + api_key: api_key + top_k: 6 + limit: 0 + namespace: namespace + query_key: query_key + index_name: index_name + collection_name: collection_name + key: key + properties: + column_id: + format: uuid + title: Column id + type: string + new_column_name: + title: New column name + type: string + sub_type: + minLength: 1 + title: Sub type + type: string + api_key: + minLength: 1 + title: Api key + type: string + collection_name: + title: Collection name + type: string + url: + title: Url + type: string + search_type: + title: Search type + type: string + key: + title: Key + type: string + limit: + title: Limit + type: integer + index_name: + title: Index name + type: string + top_k: + title: Top k + type: integer + namespace: + title: Namespace + type: string + embedding_config: + additionalProperties: true + title: Embedding config + type: object + concurrency: + default: 5 + title: Concurrency + type: integer + query_key: + title: Query key + type: string + vector_length: + title: Vector length + type: integer + required: + - api_key + - column_id + - sub_type + type: object + ClassifyColumnRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + language_model_id: gpt-4o + new_column_name: new_column_name + labels: + - labels + - labels + concurrency: 0 + properties: + column_id: + format: uuid + title: Column id + type: string + labels: + items: + minLength: 1 + type: string + type: array + language_model_id: + default: gpt-4o + minLength: 1 + title: Language model id + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + new_column_name: + title: New column name + type: string + required: + - column_id + - labels + type: object + CompareDataset: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + base_column_name: base_column_name + common_column_names: + - common_column_names + - common_column_names + dataset_info: + key: "" + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + page_size: 0 + current_page_index: 6 + properties: + compare_id: + format: uuid + nullable: true + title: Compare id + type: string + page_size: + default: 10 + title: Page size + type: integer + current_page_index: + default: 0 + title: Current page index + type: integer + base_column_name: + minLength: 1 + title: Base column name + type: string + dataset_info: + additionalProperties: true + title: Dataset info + type: object + common_column_names: + items: + minLength: 1 + type: string + type: array + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - base_column_name + - dataset_ids + type: object + CompareDatasetMetadata: + example: + total_rows: 0 + total_pages: 6 + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + compare_id: + format: uuid + title: Compare id + type: string + total_rows: + title: Total rows + type: integer + total_pages: + title: Total pages + type: integer + required: + - compare_id + - total_pages + - total_rows + type: object + CompareDatasetResult: + example: + metadata: + total_rows: 0 + total_pages: 6 + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_config: + - key: "" + - key: "" + table: + - key: "" + - key: "" + properties: + metadata: + $ref: '#/components/schemas/CompareDatasetMetadata' + column_config: + items: + additionalProperties: true + type: object + type: array + table: + items: + additionalProperties: true + type: object + type: array + type: object + CompareDatasetResponse: + example: + result: + metadata: + total_rows: 0 + total_pages: 6 + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_config: + - key: "" + - key: "" + table: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareDatasetResult' + required: + - result + - status + type: object + CompareExperimentEvalRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: false + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: template_id + model: model + run: false + config: + key: "" + save_as_template: false + eval_type: eval_type + properties: + name: + maxLength: 50 + minLength: 1 + title: Name + type: string + template_id: + maxLength: 500 + minLength: 1 + title: Template id + type: string + config: + additionalProperties: true + title: Config + type: object + kb_id: + format: uuid + title: Kb id + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + model: + maxLength: 100 + title: Model + type: string + eval_type: + title: Eval type + type: string + run: + default: false + title: Run + type: boolean + save_as_template: + default: false + title: Save as template + type: boolean + experiment_id: + format: uuid + title: Experiment id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - config + - name + - template_id + type: object + DevelopDatasetMessageResponse: + example: + result: result + status: true + properties: + status: + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + - status + type: object + CompareStartEvalsRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_names: + - user_eval_names + - user_eval_names + properties: + user_eval_names: + items: + minLength: 1 + type: string + type: array + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - user_eval_names + type: object + CompareDatasetStatsRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + base_column_name: base_column_name + stat_type: evaluation + properties: + base_column_name: + minLength: 1 + title: Base column name + type: string + dataset_ids: + items: + format: uuid + type: string + type: array + stat_type: + default: evaluation + enum: + - evaluation + - run_prompt + title: Stat type + type: string + required: + - base_column_name + - dataset_ids + type: object + CompareDatasetStatsResponse: + example: + result: + key: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + items: + additionalProperties: true + type: object + type: array + title: Result + type: object + required: + - result + - status + type: object + ConditionalColumnRequest: + example: + config: + - key: "" + - key: "" + new_column_name: new_column_name + concurrency: 0 + properties: + config: + items: + additionalProperties: true + type: object + type: array + new_column_name: + minLength: 1 + title: New column name + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + required: + - config + - new_column_name + type: object + DerivedVariableDetail: + example: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + properties: + paths: + items: + minLength: 1 + type: string + type: array + schema: + additionalProperties: true + title: Schema + type: object + full_variables: + items: + minLength: 1 + type: string + type: array + raw_sample: + additionalProperties: true + title: Raw sample + type: object + is_json: + title: Is json + type: boolean + type: object + DatasetDerivedVariablesResult: + example: + derived_variables: + key: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + properties: + derived_variables: + additionalProperties: + $ref: '#/components/schemas/DerivedVariableDetail' + title: Derived variables + type: object + required: + - derived_variables + type: object + DatasetDerivedVariablesResponse: + example: + result: + derived_variables: + key: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetDerivedVariablesResult' + required: + - result + - status + type: object + DuplicateRowsRequest: + example: + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_copies: 1 + selected_all_rows: false + properties: + row_ids: + items: + format: uuid + type: string + type: array + selected_all_rows: + default: false + title: Selected all rows + type: boolean + num_copies: + default: 1 + minimum: 1 + title: Num copies + type: integer + type: object + DuplicateRowsResult: + example: + new_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + copies_per_row: 6 + message: message + total_new_rows: 1 + source_rows: 0 + properties: + message: + minLength: 1 + title: Message + type: string + source_rows: + title: Source rows + type: integer + copies_per_row: + title: Copies per row + type: integer + total_new_rows: + title: Total new rows + type: integer + new_row_ids: + items: + format: uuid + type: string + type: array + required: + - copies_per_row + - message + - new_row_ids + - source_rows + - total_new_rows + type: object + DuplicateRowsResponse: + example: + result: + new_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + copies_per_row: 6 + message: message + total_new_rows: 1 + source_rows: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DuplicateRowsResult' + required: + - result + - status + type: object + DuplicateDatasetRequest: + example: + name: name + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_all_rows: false + properties: + row_ids: + items: + format: uuid + type: string + type: array + selected_all_rows: + default: false + title: Selected all rows + type: boolean + name: + minLength: 1 + title: Name + type: string + required: + - name + type: object + DuplicateDatasetResult: + example: + new_dataset_name: new_dataset_name + columns_copied: 0 + new_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + rows_copied: 6 + properties: + message: + minLength: 1 + title: Message + type: string + new_dataset_id: + format: uuid + title: New dataset id + type: string + new_dataset_name: + minLength: 1 + title: New dataset name + type: string + columns_copied: + title: Columns copied + type: integer + rows_copied: + title: Rows copied + type: integer + required: + - columns_copied + - message + - new_dataset_id + - new_dataset_name + - rows_copied + type: object + DuplicateDatasetResponse: + example: + result: + new_dataset_name: new_dataset_name + columns_copied: 0 + new_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + rows_copied: 6 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DuplicateDatasetResult' + required: + - result + - status + type: object + ExtractEntitiesRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + instruction: instruction + language_model_id: gpt-4 + new_column_name: new_column_name + concurrency: 0 + properties: + column_id: + format: uuid + title: Column id + type: string + instruction: + minLength: 1 + title: Instruction + type: string + language_model_id: + default: gpt-4 + minLength: 1 + title: Language model id + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + new_column_name: + title: New column name + type: string + required: + - column_id + - instruction + type: object + DynamicColumnMessageResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + DynamicColumnMessageResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DynamicColumnMessageResult' + required: + - result + - status + type: object + MergeDatasetRequest: + example: + target_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_all_rows: false + properties: + row_ids: + items: + format: uuid + type: string + type: array + selected_all_rows: + default: false + title: Selected all rows + type: boolean + target_dataset_id: + format: uuid + title: Target dataset id + type: string + required: + - target_dataset_id + type: object + MergeDatasetResult: + example: + rows_added: 0 + new_columns_created: 6 + columns_mapped: 1 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + rows_added: + title: Rows added + type: integer + new_columns_created: + title: New columns created + type: integer + columns_mapped: + title: Columns mapped + type: integer + required: + - columns_mapped + - message + - new_columns_created + - rows_added + type: object + MergeDatasetResponse: + example: + result: + rows_added: 0 + new_columns_created: 6 + columns_mapped: 1 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MergeDatasetResult' + required: + - result + - status + type: object + PreviewDatasetOperationRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + code: code + json_key: json_key + instruction: instruction + language_model_id: language_model_id + config: + key: "" + labels: + - labels + - labels + properties: + column_id: + format: uuid + title: Column id + type: string + json_key: + title: Json key + type: string + labels: + items: + minLength: 1 + type: string + type: array + instruction: + title: Instruction + type: string + language_model_id: + title: Language model id + type: string + config: + additionalProperties: true + title: Config + type: object + code: + title: Code + type: string + type: object + PreviewDatasetOperationResultItem: + example: + output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + row_id: + format: uuid + title: Row id + type: string + input: + additionalProperties: true + title: Input + type: object + output: + additionalProperties: true + title: Output + type: object + details: + additionalProperties: true + title: Details + type: object + required: + - row_id + type: object + PreviewDatasetOperationResult: + example: + sample_size: 0 + preview_results: + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + preview_results: + items: + $ref: '#/components/schemas/PreviewDatasetOperationResultItem' + type: array + sample_size: + title: Sample size + type: integer + required: + - message + - preview_results + - sample_size + type: object + PreviewDatasetOperationResponse: + example: + result: + sample_size: 0 + preview_results: + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/PreviewDatasetOperationResult' + required: + - result + - status + type: object + DeleteEvalTemplate: + example: + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + eval_template_id: + format: uuid + title: Eval template id + type: string + required: + - eval_template_id + type: object + AddAsNewDatasetRequest: + example: + columns: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + title: Name + type: string + columns: + additionalProperties: true + title: Columns + type: object + required: + - dataset_id + type: object + DatasetCopyResult: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + dataset_name: dataset_name + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + required: + - dataset_id + - dataset_name + - message + type: object + DatasetCopyResponse: + example: + result: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + dataset_name: dataset_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetCopyResult' + required: + - result + - status + type: object + AddRowsFromFileRequest: + example: + file: https://openapi-generator.tech + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: model_type + properties: + file: + format: uri + readOnly: true + title: File + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + model_type: + title: Model type + type: string + required: + - dataset_id + type: object + DatasetSdkRowsRequest: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + properties: + dataset_name: + title: Dataset name + type: string + dataset_id: + format: uuid + nullable: true + title: Dataset id + type: string + type: object + Dataset: + example: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + organization: + format: uuid + title: Organization + type: string + model_type: + enum: + - Numeric + - ScoreCategorical + - Ranking + - BinaryClassification + - Regression + - ObjectDetection + - Segmentation + - GenerativeLLM + - GenerativeImage + - GenerativeVideo + - TTS + - STT + - MultiModal + title: Model type + type: string + source: + enum: + - demo + - build + - sdk + - observe + - knowledge_base + - scenario + - experiment_snapshot + - graph + title: Source + type: string + user: + format: uuid + nullable: true + title: User + type: string + required: + - name + - organization + type: object + DatasetSdkRowsCode: + example: + python_add_col: python_add_col + curl_add_row: curl_add_row + python_add_row: python_add_row + curl_add_col: curl_add_col + typescript_add_col: typescript_add_col + typescript_add_row: typescript_add_row + properties: + python_add_row: + minLength: 1 + title: Python add row + type: string + python_add_col: + minLength: 1 + title: Python add col + type: string + typescript_add_col: + minLength: 1 + title: Typescript add col + type: string + typescript_add_row: + minLength: 1 + title: Typescript add row + type: string + curl_add_col: + minLength: 1 + title: Curl add col + type: string + curl_add_row: + minLength: 1 + title: Curl add row + type: string + required: + - curl_add_col + - curl_add_row + - python_add_col + - python_add_row + - typescript_add_col + - typescript_add_row + type: object + DatasetSdkRowsResult: + example: + code: + python_add_col: python_add_col + curl_add_row: curl_add_row + python_add_row: python_add_row + curl_add_col: curl_add_col + typescript_add_col: typescript_add_col + typescript_add_row: typescript_add_row + api_keys: + key: "" + dataset: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + api_keys: + additionalProperties: true + title: Api keys + type: object + dataset: + $ref: '#/components/schemas/Dataset' + code: + $ref: '#/components/schemas/DatasetSdkRowsCode' + required: + - api_keys + - code + - dataset + type: object + DatasetSdkRowsResponse: + example: + result: + code: + python_add_col: python_add_col + curl_add_row: curl_add_row + python_add_row: python_add_row + curl_add_col: curl_add_col + typescript_add_col: typescript_add_col + typescript_add_row: typescript_add_row + api_keys: + key: "" + dataset: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetSdkRowsResult' + required: + - result + - status + type: object + PromptConfig: + example: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + model: + maxLength: 255 + title: Model + type: string + run_prompt_config: + additionalProperties: + nullable: true + type: string + title: Run prompt config + type: object + messages: + description: "List of messages with format [{'role': 'user/assistant', 'content':\ + \ 'text'}]" + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + temperature: + description: Controls the randomness. Value between 0 and 2. + maximum: 2 + minimum: 0 + nullable: true + title: Temperature + type: number + frequency_penalty: + description: Penalty for word repetition. Value between -2 and 2. + maximum: 2 + minimum: -2 + nullable: true + title: Frequency penalty + type: number + presence_penalty: + description: Penalty for new word usage. Value between -2 and 2. + maximum: 2 + minimum: -2 + nullable: true + title: Presence penalty + type: number + max_tokens: + description: Maximum number of tokens to generate. Null = use provider default. + maximum: 65536 + minimum: 1 + nullable: true + title: Max tokens + type: integer + top_p: + description: Controls diversity via nucleus sampling. Value between 0 and + 1. + maximum: 1 + minimum: 0 + nullable: true + title: Top p + type: number + response_format: + additionalProperties: true + description: JSON schema for response format if required. Can be a JSON + object or string. Defaults to None. + title: Response format + type: object + tool_choice: + description: "Tool selection mode: 'auto' or 'required'." + enum: + - auto + - required + - null + nullable: true + title: Tool choice + type: string + tools: + description: List of tools with tool properties if available. + items: + additionalProperties: + nullable: true + type: string + type: object + nullable: true + type: array + output_format: + description: Output format type. + enum: + - array + - string + - number + - object + - audio + - image + nullable: true + title: Output format + type: string + concurrency: + description: Number of concurrent operations allowed. Maximum 10. + maximum: 10 + minimum: 1 + nullable: true + title: Concurrency + type: integer + type: object + AddRunPrompt: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + config: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + minLength: 1 + title: Name + type: string + config: + $ref: '#/components/schemas/PromptConfig' + required: + - dataset_id + - name + type: object + CloneDatasetRequest: + example: + new_dataset_name: new_dataset_name + properties: + new_dataset_name: + title: New dataset name + type: string + type: object + HuggingFaceDatasetCreateRequest: + example: + huggingface_dataset_name: huggingface_dataset_name + huggingface_dataset_split: huggingface_dataset_split + name: "" + model_type: "" + num_rows: 0 + huggingface_dataset_config: huggingface_dataset_config + properties: + name: + default: "" + title: Name + type: string + model_type: + default: "" + title: Model type + type: string + num_rows: + minimum: 0 + title: Num rows + type: integer + huggingface_dataset_name: + minLength: 1 + title: Huggingface dataset name + type: string + huggingface_dataset_config: + title: Huggingface dataset config + type: string + huggingface_dataset_split: + minLength: 1 + title: Huggingface dataset split + type: string + required: + - huggingface_dataset_name + - huggingface_dataset_split + type: object + DatasetCreateStartedResult: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + message: message + dataset_name: dataset_name + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + dataset_model_type: + nullable: true + title: Dataset model type + type: string + required: + - dataset_id + - dataset_name + - message + type: object + DatasetCreateStartedResponse: + example: + result: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + message: message + dataset_name: dataset_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetCreateStartedResult' + required: + - result + - status + type: object + CreateDatasetFromLocalFileRequest: + example: + file: https://openapi-generator.tech + new_dataset_name: new_dataset_name + model_type: model_type + source: source + properties: + file: + format: uri + readOnly: true + title: File + type: string + new_dataset_name: + title: New dataset name + type: string + model_type: + title: Model type + type: string + source: + title: Source + type: string + type: object + LocalFileDatasetCreateStartedResult: + example: + estimated_rows: 0 + estimated_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + processing_status: processing_status + message: message + dataset_name: dataset_name + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + dataset_model_type: + nullable: true + title: Dataset model type + type: string + processing_status: + minLength: 1 + title: Processing status + type: string + estimated_rows: + title: Estimated rows + type: integer + estimated_columns: + title: Estimated columns + type: integer + required: + - dataset_id + - dataset_name + - estimated_columns + - estimated_rows + - message + - processing_status + type: object + LocalFileDatasetCreateStartedResponse: + example: + result: + estimated_rows: 0 + estimated_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + processing_status: processing_status + message: message + dataset_name: dataset_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LocalFileDatasetCreateStartedResult' + required: + - result + - status + type: object + ManualDatasetCreateRequest: + example: + number_of_columns: 1 + number_of_rows: 1 + dataset_name: dataset_name + properties: + dataset_name: + minLength: 1 + title: Dataset name + type: string + number_of_rows: + default: 1 + minimum: 1 + title: Number of rows + type: integer + number_of_columns: + default: 1 + minimum: 1 + title: Number of columns + type: integer + required: + - dataset_name + type: object + ManualDatasetCreateResult: + example: + columns_created: 6 + rows_created: 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + rows_created: + title: Rows created + type: integer + columns_created: + title: Columns created + type: integer + required: + - columns_created + - dataset_id + - message + - rows_created + type: object + ManualDatasetCreateResponse: + example: + result: + columns_created: 6 + rows_created: 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ManualDatasetCreateResult' + required: + - result + - status + type: object + CreateEmptyDatasetRequest: + example: + new_dataset_name: new_dataset_name + model_type: model_type + is_sdk: false + row: 0 + properties: + new_dataset_name: + minLength: 1 + title: New dataset name + type: string + model_type: + title: Model type + type: string + is_sdk: + default: false + title: Is sdk + type: boolean + row: + minimum: 0 + title: Row + type: integer + required: + - new_dataset_name + type: object + SyntheticDatasetCreation: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - columns + - columns + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + nullable: true + type: string + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + title: Kb id + type: string + required: + - columns + - dataset + - num_rows + type: object + SyntheticDatasetCreateStartedResult: + example: + data: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + $ref: '#/components/schemas/Dataset' + required: + - data + - message + type: object + SyntheticDatasetCreateStartedResponse: + example: + result: + data: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SyntheticDatasetCreateStartedResult' + required: + - result + - status + type: object + DatasetCreationProgressResult: + example: + error_message: error_message + queued_at: queued_at + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + is_completed: true + is_failed: true + completed_at: completed_at + estimated_rows: 0 + original_filename: original_filename + estimated_columns: 6 + processing_status: processing_status + started_at: started_at + is_processing: true + failed_at: failed_at + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + processing_status: + minLength: 1 + title: Processing status + type: string + is_processing: + title: Is processing + type: boolean + is_completed: + title: Is completed + type: boolean + is_failed: + title: Is failed + type: boolean + original_filename: + nullable: true + title: Original filename + type: string + estimated_rows: + nullable: true + title: Estimated rows + type: integer + estimated_columns: + nullable: true + title: Estimated columns + type: integer + queued_at: + nullable: true + title: Queued at + type: string + started_at: + nullable: true + title: Started at + type: string + completed_at: + nullable: true + title: Completed at + type: string + failed_at: + nullable: true + title: Failed at + type: string + error_message: + nullable: true + title: Error message + type: string + required: + - dataset_id + - dataset_name + - is_completed + - is_failed + - is_processing + - processing_status + type: object + DatasetCreationProgressResponse: + example: + result: + error_message: error_message + queued_at: queued_at + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + is_completed: true + is_failed: true + completed_at: completed_at + estimated_rows: 0 + original_filename: original_filename + estimated_columns: 6 + processing_status: processing_status + started_at: started_at + is_processing: true + failed_at: failed_at + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetCreationProgressResult' + required: + - result + - status + type: object + EditRunPromptColumn: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + config: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + column_id: + format: uuid + title: Column id + type: string + name: + minLength: 1 + nullable: true + title: Name + type: string + config: + $ref: '#/components/schemas/PromptConfig' + required: + - column_id + - dataset_id + type: object + DatasetCellDataRequest: + example: + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + row_ids: + items: + format: uuid + type: string + type: array + column_ids: + items: + format: uuid + type: string + type: array + required: + - column_ids + - row_ids + type: object + DatasetCellValue: + example: + value_infos: + key: "" + cell_value: + key: "" + feedback_info: + key: "" + status: status + properties: + cell_value: + additionalProperties: true + title: Cell value + type: object + status: + nullable: true + title: Status + type: string + value_infos: + additionalProperties: true + title: Value infos + type: object + feedback_info: + additionalProperties: true + title: Feedback info + type: object + type: object + DatasetCellDataResponse: + example: + result: + key: + key: + value_infos: + key: "" + cell_value: + key: "" + feedback_info: + key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/DatasetCellValue' + type: object + title: Result + type: object + required: + - result + - status + type: object + DatasetNameItem: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + minLength: 1 + title: Name + type: string + model_type: + title: Model type + type: string + required: + - dataset_id + - name + type: object + DatasetNamesResult: + example: + datasets: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + properties: + datasets: + items: + $ref: '#/components/schemas/DatasetNameItem' + type: array + required: + - datasets + type: object + DatasetNamesResponse: + example: + result: + datasets: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetNamesResult' + required: + - result + - status + type: object + DatasetListItem: + example: + dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + number_of_datapoints: + title: Number of datapoints + type: integer + number_of_experiments: + title: Number of experiments + type: integer + number_of_optimisations: + title: Number of optimisations + type: integer + derived_datasets: + title: Derived datasets + type: integer + created_at: + minLength: 1 + title: Created at + type: string + dataset_type: + minLength: 1 + title: Dataset type + type: string + required: + - created_at + - dataset_type + - derived_datasets + - id + - name + - number_of_datapoints + - number_of_experiments + - number_of_optimisations + type: object + DatasetListResult: + example: + total_count: 2 + datasets: + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + total_pages: 5 + properties: + datasets: + items: + $ref: '#/components/schemas/DatasetListItem' + type: array + total_pages: + title: Total pages + type: integer + total_count: + title: Total count + type: integer + required: + - datasets + - total_count + - total_pages + type: object + DatasetListResponse: + example: + result: + total_count: 2 + datasets: + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + total_pages: 5 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetListResult' + required: + - result + - status + type: object + HuggingFaceDatasetConfigRequest: + example: + dataset_path: dataset_path + properties: + dataset_path: + minLength: 1 + title: Dataset path + type: string + required: + - dataset_path + type: object + HuggingFaceDatasetConfigResult: + example: + dataset_info: + key: "" + message: message + properties: + message: + minLength: 1 + title: Message + type: string + dataset_info: + additionalProperties: true + title: Dataset info + type: object + required: + - dataset_info + - message + type: object + HuggingFaceDatasetConfigResponse: + example: + result: + dataset_info: + key: "" + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/HuggingFaceDatasetConfigResult' + required: + - result + - status + type: object + DatasetRowDiffRequest: + example: + compare_column_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + column_ids: + items: + format: uuid + type: string + type: array + row_ids: + items: + format: uuid + type: string + type: array + compare_column_ids: + items: + format: uuid + type: string + type: array + required: + - column_ids + - compare_column_ids + - experiment_id + - row_ids + type: object + ExperimentRowDiffCell: + example: + value_infos: + key: "" + cell_value: + key: "" + cell_diff_value: + key: "" + status: status + properties: + cell_value: + additionalProperties: true + title: Cell value + type: object + cell_diff_value: + additionalProperties: true + title: Cell diff value + type: object + status: + title: Status + type: string + value_infos: + additionalProperties: true + title: Value infos + type: object + type: object + ExperimentRowDiffResponse: + example: + result: + key: + key: + value_infos: + key: "" + cell_value: + key: "" + cell_diff_value: + key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/ExperimentRowDiffCell' + type: object + title: Result + type: object + required: + - result + - status + type: object + EvalFunctionListResult: + example: + functions: + - key: "" + - key: "" + properties: + functions: + items: + additionalProperties: true + type: object + type: array + required: + - functions + type: object + EvalFunctionListResponse: + example: + result: + functions: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalFunctionListResult' + required: + - result + - status + type: object + PreviewRunPrompt: + example: + row_indices: + - 0 + - 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + first_n_rows: 1 + config: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + minLength: 1 + title: Name + type: string + config: + $ref: '#/components/schemas/PromptConfig' + first_n_rows: + minimum: 1 + title: First n rows + type: integer + row_indices: + description: List of row indices to preview. Must contain at least one integer. + items: + minimum: 0 + type: integer + type: array + required: + - dataset_id + - name + type: object + RunPromptColumnPreviewResult: + example: + token_usage: + key: "" + cost: + key: "" + responses: + - key: "" + - key: "" + properties: + responses: + items: + additionalProperties: true + description: Response + type: object + type: array + token_usage: + additionalProperties: true + title: Token usage + type: object + cost: + additionalProperties: true + title: Cost + type: object + required: + - cost + - responses + - token_usage + type: object + RunPromptColumnPreviewResponse: + example: + result: + token_usage: + key: "" + cost: + key: "" + responses: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunPromptColumnPreviewResult' + required: + - result + - status + type: object + ProviderStatusItem: + example: + provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + properties: + provider: + minLength: 1 + title: Provider + type: string + display_name: + minLength: 1 + title: Display name + type: string + has_key: + title: Has key + type: boolean + masked_key: + nullable: true + title: Masked key + type: string + logo_url: + nullable: true + title: Logo url + type: string + type: + minLength: 1 + title: Type + type: string + id: + format: uuid + nullable: true + title: Id + type: string + required: + - display_name + - has_key + - provider + - type + type: object + ProviderStatusResult: + example: + providers: + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + properties: + providers: + items: + $ref: '#/components/schemas/ProviderStatusItem' + type: array + required: + - providers + type: object + ProviderStatusResponse: + example: + result: + providers: + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ProviderStatusResult' + required: + - result + - status + type: object + RunPromptColumnConfigResult: + example: + config: + key: "" + properties: + config: + additionalProperties: true + title: Config + type: object + required: + - config + type: object + RunPromptColumnConfigResponse: + example: + result: + config: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunPromptColumnConfigResult' + required: + - result + - status + type: object + RunPromptToolOption: + example: + yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + yaml_config: + nullable: true + title: Yaml config + type: string + config: + additionalProperties: true + title: Config + type: object + config_type: + nullable: true + title: Config type + type: string + description: + nullable: true + title: Description + type: string + required: + - id + - name + type: object + RunPromptChoiceOption: + example: + label: label + value: + key: "" + properties: + value: + additionalProperties: true + title: Value + type: object + label: + minLength: 1 + title: Label + type: string + required: + - label + - value + type: object + RunPromptOptionsResult: + example: + models: + - key: "" + - key: "" + output_formats: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_choices: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_config: + key: "" + available_tools: + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + properties: + models: + items: + additionalProperties: true + type: object + type: array + tool_config: + additionalProperties: true + title: Tool config + type: object + available_tools: + items: + $ref: '#/components/schemas/RunPromptToolOption' + type: array + output_formats: + items: + $ref: '#/components/schemas/RunPromptChoiceOption' + type: array + tool_choices: + items: + $ref: '#/components/schemas/RunPromptChoiceOption' + type: array + required: + - available_tools + - models + - output_formats + - tool_choices + - tool_config + type: object + RunPromptOptionsResponse: + example: + result: + models: + - key: "" + - key: "" + output_formats: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_choices: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_config: + key: "" + available_tools: + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunPromptOptionsResult' + required: + - result + - status + type: object + DatasetAddColumnsRequest: + example: + new_columns_data: + - key: "" + - key: "" + properties: + new_columns_data: + items: + additionalProperties: true + type: object + type: array + required: + - new_columns_data + type: object + Column: + example: + name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + data_type: + enum: + - text + - boolean + - integer + - float + - json + - array + - image + - images + - datetime + - audio + - document + - others + - persona + title: Data type + type: string + dataset: + format: uuid + nullable: true + title: Dataset + type: string + source: + enum: + - evaluation + - evaluation_tags + - evaluation_reason + - run_prompt + - experiment + - optimisation + - experiment_evaluation + - experiment_evaluation_tags + - optimisation_evaluation + - annotation_label + - optimisation_evaluation_tags + - extracted_json + - classification + - extracted_entities + - api_call + - python_code + - vector_db + - conditional + - eval_playground + - OTHERS + title: Source + type: string + source_id: + maxLength: 2000 + nullable: true + title: Source id + type: string + required: + - data_type + - name + - source + type: object + DatasetColumnsMutationResult: + example: + data: + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + items: + $ref: '#/components/schemas/Column' + type: array + required: + - message + type: object + DatasetColumnsMutationResponse: + example: + result: + data: + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetColumnsMutationResult' + required: + - result + - status + type: object + DatasetAddEmptyColumnsRequest: + example: + num_cols: 0 + properties: + num_cols: + default: 0 + minimum: 0 + title: Num cols + type: integer + type: object + DatasetAddEmptyRowsRequest: + example: + num_rows: 1 + properties: + num_rows: + default: 1 + minimum: 1 + title: Num rows + type: integer + type: object + DatasetMultipleStaticColumnsRequest: + example: + columns: + - key: "" + - key: "" + properties: + columns: + items: + additionalProperties: true + type: object + type: array + required: + - columns + type: object + DatasetAddRowsRequest: + example: + rows: + - key: "" + - key: "" + properties: + rows: + items: + additionalProperties: true + type: object + type: array + required: + - rows + type: object + DatasetAddRowsFromExistingRequest: + example: + column_mapping: + key: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + source_dataset_id: + format: uuid + title: Source dataset id + type: string + column_mapping: + additionalProperties: + format: uuid + type: string + title: Column mapping + type: object + required: + - column_mapping + - source_dataset_id + type: object + DatasetRowsImportedResult: + example: + rows_added: 0 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + rows_added: + title: Rows added + type: integer + required: + - message + - rows_added + type: object + DatasetRowsImportedResponse: + example: + result: + rows_added: 0 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRowsImportedResult' + required: + - result + - status + type: object + HuggingFaceAddRowsRequest: + example: + huggingface_dataset_name: huggingface_dataset_name + huggingface_dataset_split: huggingface_dataset_split + num_rows: 0 + huggingface_dataset_config: huggingface_dataset_config + properties: + num_rows: + minimum: 0 + title: Num rows + type: integer + huggingface_dataset_name: + minLength: 1 + title: Huggingface dataset name + type: string + huggingface_dataset_config: + minLength: 1 + title: Huggingface dataset config + type: string + huggingface_dataset_split: + minLength: 1 + title: Huggingface dataset split + type: string + required: + - huggingface_dataset_config + - huggingface_dataset_name + - huggingface_dataset_split + type: object + DatasetRowsImportMessageResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + DatasetRowsImportMessageResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRowsImportMessageResult' + required: + - result + - status + type: object + DatasetStaticColumnRequest: + example: + source: source + column_type: column_type + new_column_name: new_column_name + properties: + new_column_name: + minLength: 1 + title: New column name + type: string + column_type: + minLength: 1 + title: Column type + type: string + source: + title: Source + type: string + required: + - column_type + - new_column_name + type: object + SyntheticData: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fill_existing_rows: false + columns: + - columns + - columns + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + nullable: true + type: string + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + title: Kb id + type: string + fill_existing_rows: + default: false + title: Fill existing rows + type: boolean + required: + - columns + - dataset + - num_rows + type: object + UserEvalMutationRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: false + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: template_id + model: model + run: false + config: + key: "" + save_as_template: false + eval_type: eval_type + properties: + name: + maxLength: 50 + minLength: 1 + title: Name + type: string + template_id: + maxLength: 500 + minLength: 1 + title: Template id + type: string + config: + additionalProperties: true + title: Config + type: object + kb_id: + format: uuid + title: Kb id + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + model: + maxLength: 100 + title: Model + type: string + eval_type: + title: Eval type + type: string + run: + default: false + title: Run + type: boolean + save_as_template: + default: false + title: Save as template + type: boolean + experiment_id: + format: uuid + title: Experiment id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + required: + - config + - name + - template_id + type: object + UserEvalUpdateRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: false + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: template_id + model: model + run: false + config: + key: "" + save_as_template: false + eval_type: eval_type + properties: + name: + maxLength: 50 + title: Name + type: string + template_id: + maxLength: 500 + title: Template id + type: string + config: + additionalProperties: true + title: Config + type: object + kb_id: + format: uuid + title: Kb id + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + model: + maxLength: 100 + title: Model + type: string + eval_type: + title: Eval type + type: string + run: + default: false + title: Run + type: boolean + save_as_template: + default: false + title: Save as template + type: boolean + experiment_id: + format: uuid + title: Experiment id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + required: + - config + type: object + DatasetBehaviorRequest: + example: + column_config: + key: "" + dataset_name: dataset_name + dataset_config: + key: "" + column_order: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + dataset_name: + title: Dataset name + type: string + column_order: + items: + format: uuid + type: string + type: array + column_config: + additionalProperties: true + title: Column config + type: object + dataset_config: + additionalProperties: true + title: Dataset config + type: object + type: object + ExtractJsonColumnRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + json_key: json_key + new_column_name: new_column_name + concurrency: 0 + properties: + column_id: + format: uuid + title: Column id + type: string + json_key: + minLength: 1 + title: Json key + type: string + new_column_name: + title: New column name + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + required: + - column_id + - json_key + type: object + DatasetTableMetadata: + example: + total_rows: 0 + total_pages: 6 + dataset_name: dataset_name + error_messages: + - error_messages + - error_messages + status: status + properties: + dataset_name: + minLength: 1 + title: Dataset name + type: string + total_rows: + title: Total rows + type: integer + total_pages: + title: Total pages + type: integer + error_messages: + items: + minLength: 1 + type: string + type: array + status: + nullable: true + title: Status + type: string + required: + - dataset_name + type: object + DatasetTableResult: + example: + metadata: + total_rows: 0 + total_pages: 6 + dataset_name: dataset_name + error_messages: + - error_messages + - error_messages + status: status + synthetic_regenerate: true + synthetic_dataset_percentage: 1.4658129805029452 + is_processing_data: true + column_config: + - key: "" + - key: "" + synthetic_dataset: true + dataset_config: + key: "" + table: + - key: "" + - key: "" + properties: + metadata: + $ref: '#/components/schemas/DatasetTableMetadata' + column_config: + items: + additionalProperties: true + type: object + type: array + table: + items: + additionalProperties: true + type: object + type: array + dataset_config: + additionalProperties: true + title: Dataset config + type: object + synthetic_dataset: + title: Synthetic dataset + type: boolean + synthetic_dataset_percentage: + nullable: true + title: Synthetic dataset percentage + type: number + synthetic_regenerate: + title: Synthetic regenerate + type: boolean + is_processing_data: + title: Is processing data + type: boolean + required: + - column_config + type: object + DatasetTableResponse: + example: + result: + metadata: + total_rows: 0 + total_pages: 6 + dataset_name: dataset_name + error_messages: + - error_messages + - error_messages + status: status + synthetic_regenerate: true + synthetic_dataset_percentage: 1.4658129805029452 + is_processing_data: true + column_config: + - key: "" + - key: "" + synthetic_dataset: true + dataset_config: + key: "" + table: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetTableResult' + required: + - result + - status + type: object + DatasetRowDataRequest: + example: + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + sort: + - column_id: column_id + type: ascending + - column_id: column_id + type: ascending + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + sort: + items: + $ref: '#/components/schemas/DatasetRowDataRequest_sort_inner' + type: array + row_id: + format: uuid + title: Row id + type: string + required: + - row_id + type: object + DatasetRowNavigation: + example: + row_id: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + row_id: + items: + format: uuid + type: string + type: array + type: object + DatasetRowDataResult: + example: + next: + row_id: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current: + key: "" + properties: + next: + $ref: '#/components/schemas/DatasetRowNavigation' + current: + additionalProperties: true + title: Current + type: object + required: + - current + - next + type: object + DatasetRowDataResponse: + example: + result: + next: + row_id: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRowDataResult' + required: + - result + - status + type: object + EvalStructure: + example: + reason_column: true + config_params_option: + key: "" + description: description + config_params_desc: + key: "" + output: + key: "" + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: true + optional_keys: + - optional_keys + - optional_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_config: + key: "" + eval_tags: + - eval_tags + - eval_tags + models: + key: "" + mapping: + key: "" + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + api_key_available: true + params: + key: "" + function_params_schema: + key: "" + template_name: template_name + run_prompt_column: true + eval_type_id: eval_type_id + name: name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + choices: + key: "" + config: + key: "" + eval_type: eval_type + properties: + id: + format: uuid + title: Id + type: string + template_id: + format: uuid + title: Template id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + eval_tags: + items: + minLength: 1 + type: string + type: array + template_name: + minLength: 1 + title: Template name + type: string + required_keys: + items: + minLength: 1 + type: string + type: array + optional_keys: + items: + minLength: 1 + type: string + type: array + variable_keys: + items: + minLength: 1 + type: string + type: array + run_prompt_column: + title: Run prompt column + type: boolean + mapping: + additionalProperties: true + title: Mapping + type: object + config: + additionalProperties: true + title: Config + type: object + params: + additionalProperties: true + title: Params + type: object + function_params_schema: + additionalProperties: true + title: Function params schema + type: object + eval_type_id: + title: Eval type id + type: string + eval_type: + title: Eval type + type: string + reason_column: + title: Reason column + type: boolean + models: + additionalProperties: true + title: Models + type: object + selected_model: + title: Selected model + type: string + output: + additionalProperties: true + title: Output + type: object + config_params_desc: + additionalProperties: true + title: Config params desc + type: object + config_params_option: + additionalProperties: true + title: Config params option + type: object + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + error_localizer: + title: Error localizer + type: boolean + choices: + additionalProperties: true + title: Choices + type: object + api_key_available: + title: Api key available + type: boolean + run_config: + additionalProperties: true + title: Run config + type: object + required: + - id + - name + - template_id + type: object + EvalStructureResult: + example: + eval: + reason_column: true + config_params_option: + key: "" + description: description + config_params_desc: + key: "" + output: + key: "" + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: true + optional_keys: + - optional_keys + - optional_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_config: + key: "" + eval_tags: + - eval_tags + - eval_tags + models: + key: "" + mapping: + key: "" + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + api_key_available: true + params: + key: "" + function_params_schema: + key: "" + template_name: template_name + run_prompt_column: true + eval_type_id: eval_type_id + name: name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + choices: + key: "" + config: + key: "" + eval_type: eval_type + properties: + eval: + $ref: '#/components/schemas/EvalStructure' + required: + - eval + type: object + EvalStructureResponse: + example: + result: + eval: + reason_column: true + config_params_option: + key: "" + description: description + config_params_desc: + key: "" + output: + key: "" + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: true + optional_keys: + - optional_keys + - optional_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_config: + key: "" + eval_tags: + - eval_tags + - eval_tags + models: + key: "" + mapping: + key: "" + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + api_key_available: true + params: + key: "" + function_params_schema: + key: "" + template_name: template_name + run_prompt_column: true + eval_type_id: eval_type_id + name: name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + choices: + key: "" + config: + key: "" + eval_type: eval_type + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalStructureResult' + required: + - result + - status + type: object + EvalListResult: + example: + evals: + - key: "" + - key: "" + eval_recommendations: + - eval_recommendations + - eval_recommendations + properties: + evals: + items: + additionalProperties: true + type: object + type: array + eval_recommendations: + items: + minLength: 1 + type: string + type: array + required: + - evals + type: object + EvalListResponse: + example: + result: + evals: + - key: "" + - key: "" + eval_recommendations: + - eval_recommendations + - eval_recommendations + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalListResult' + required: + - result + - status + type: object + PreviewRunEvalRequest: + example: + protect_flash: false + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + source: source + config: + key: "" + sdk_uuid: sdk_uuid + properties: + config: + additionalProperties: true + title: Config + type: object + template_id: + format: uuid + title: Template id + type: string + model: + title: Model + type: string + sdk_uuid: + title: Sdk uuid + type: string + source: + title: Source + type: string + protect_flash: + default: false + title: Protect flash + type: boolean + required: + - config + - template_id + type: object + StartEvalsProcessRequest: + example: + failed_only: false + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + user_eval_ids: + items: + format: uuid + type: string + type: array + experiment_id: + format: uuid + title: Experiment id + type: string + failed_only: + default: false + title: Failed only + type: boolean + required: + - user_eval_ids + type: object + StopUserEvalRequest: + example: + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + type: object + SyntheticDatasetConfigPayload: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - key: "" + - key: "" + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + additionalProperties: true + type: object + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + type: object + SyntheticDatasetConfigResult: + example: + data: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - key: "" + - key: "" + num_rows: 0 + dataset: + key: "" + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + $ref: '#/components/schemas/SyntheticDatasetConfigPayload' + required: + - data + - message + type: object + SyntheticDatasetConfigResponse: + example: + result: + data: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - key: "" + - key: "" + num_rows: 0 + dataset: + key: "" + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SyntheticDatasetConfigResult' + required: + - result + - status + type: object + SyntheticDatasetConfig: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + regenerate: false + columns: + - columns + - columns + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + nullable: true + type: string + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + regenerate: + default: false + title: Regenerate + type: boolean + required: + - columns + - dataset + - num_rows + type: object + SyntheticDatasetUpdateData: + example: + num_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + dataset_name: dataset_name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + num_rows: + title: Num rows + type: integer + num_columns: + title: Num columns + type: integer + required: + - dataset_id + - dataset_name + type: object + SyntheticDatasetUpdateResult: + example: + data: + num_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + dataset_name: dataset_name + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + $ref: '#/components/schemas/SyntheticDatasetUpdateData' + required: + - data + - message + type: object + SyntheticDatasetUpdateResponse: + example: + result: + data: + num_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + dataset_name: dataset_name + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SyntheticDatasetUpdateResult' + required: + - result + - status + type: object + DatasetUpdateCellValueRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + new_value: new_value + properties: + row_id: + format: uuid + title: Row id + type: string + column_id: + format: uuid + title: Column id + type: string + new_value: + description: New cell value. Accepts JSON primitives or multipart file uploads. + nullable: true + title: New value + type: string + required: + - column_id + - row_id + type: object + DatasetUpdateColumnNameRequest: + example: + new_column_name: new_column_name + properties: + new_column_name: + minLength: 1 + title: New column name + type: string + required: + - new_column_name + type: object + DatasetUpdateColumnTypeRequest: + example: + preview: true + force_update: false + new_column_type: new_column_type + properties: + new_column_type: + minLength: 1 + title: New column type + type: string + preview: + default: true + title: Preview + type: boolean + force_update: + default: false + title: Force update + type: boolean + required: + - new_column_type + type: object + ColumnTypeConversionResult: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + invalid_count: 0 + new_data_type: new_data_type + valid_conversion_samples: + key: "" + message: message + invalid_values: + - key: "" + - key: "" + status: status + properties: + message: + minLength: 1 + title: Message + type: string + column_id: + format: uuid + title: Column id + type: string + new_data_type: + minLength: 1 + title: New data type + type: string + status: + minLength: 1 + title: Status + type: string + invalid_count: + title: Invalid count + type: integer + invalid_values: + items: + additionalProperties: true + type: object + type: array + valid_conversion_samples: + additionalProperties: true + title: Valid conversion samples + type: object + type: object + ColumnTypeConversionResponse: + example: + result: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + invalid_count: 0 + new_data_type: new_data_type + valid_conversion_samples: + key: "" + message: message + invalid_values: + - key: "" + - key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ColumnTypeConversionResult' + required: + - result + - status + type: object + CreateDatasetFromExperimentRequest: + example: + name: name + model_type: model_type + properties: + name: + title: Name + type: string + model_type: + title: Model type + type: string + type: object + EvalTemplateBulkDeleteRequest: + example: + template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + template_ids: + items: + format: uuid + type: string + type: array + required: + - template_ids + type: object + EvalTemplateBulkDeleteResponseResult: + example: + deleted_count: 0 + properties: + deleted_count: + title: Deleted count + type: integer + required: + - deleted_count + type: object + EvalTemplateBulkDeleteResponse: + example: + result: + deleted_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateBulkDeleteResponseResult' + required: + - result + - status + type: object + CompositeEvalAdhocExecuteRequest: + example: + composite_child_axis: "" + mapping: + key: "" + input_data_types: + key: "" + span_context: + key: "" + pass_threshold: 0.8008281904610115 + session_context: + key: "" + aggregation_function: weighted_avg + row_context: + key: "" + aggregation_enabled: true + error_localizer: false + call_context: + key: "" + child_weights: + key: "" + model: model + trace_context: + key: "" + child_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + mapping: + additionalProperties: true + title: Mapping + type: object + model: + nullable: true + title: Model + type: string + config: + additionalProperties: true + title: Config + type: object + error_localizer: + default: false + title: Error localizer + type: boolean + input_data_types: + additionalProperties: true + title: Input data types + type: object + span_context: + additionalProperties: true + title: Span context + type: object + trace_context: + additionalProperties: true + title: Trace context + type: object + session_context: + additionalProperties: true + title: Session context + type: object + call_context: + additionalProperties: true + title: Call context + type: object + row_context: + additionalProperties: true + title: Row context + type: object + child_template_ids: + items: + format: uuid + type: string + type: array + aggregation_enabled: + default: true + title: Aggregation enabled + type: boolean + aggregation_function: + default: weighted_avg + enum: + - weighted_avg + - avg + - min + - max + - pass_rate + title: Aggregation function + type: string + composite_child_axis: + default: "" + enum: + - "" + - pass_fail + - percentage + - choices + - code + title: Composite child axis + type: string + child_weights: + additionalProperties: true + title: Child weights + type: object + pass_threshold: + default: 0.5 + title: Pass threshold + type: number + required: + - child_template_ids + - mapping + type: object + CompositeChildResult: + example: + output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + properties: + child_id: + format: uuid + title: Child id + type: string + child_name: + minLength: 1 + title: Child name + type: string + order: + title: Order + type: integer + score: + nullable: true + title: Score + type: number + output: + additionalProperties: true + title: Output + type: object + reason: + nullable: true + title: Reason + type: string + output_type: + nullable: true + title: Output type + type: string + status: + minLength: 1 + title: Status + type: string + error: + nullable: true + title: Error + type: string + log_id: + nullable: true + title: Log id + type: string + weight: + title: Weight + type: number + error_localizer_result: + additionalProperties: true + title: Error localizer result + type: object + required: + - child_id + - child_name + - order + - status + type: object + CompositeEvalExecuteResponseResult: + example: + summary: summary + evaluation_id: evaluation_id + aggregation_function: aggregation_function + error_localizer_results: + key: "" + aggregation_enabled: true + aggregate_pass: true + composite_name: composite_name + composite_id: composite_id + completed_children: 2 + children: + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + aggregate_score: 0.8008281904610115 + total_children: 5 + failed_children: 7 + properties: + composite_id: + nullable: true + title: Composite id + type: string + composite_name: + minLength: 1 + title: Composite name + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + nullable: true + title: Aggregation function + type: string + aggregate_score: + nullable: true + title: Aggregate score + type: number + aggregate_pass: + nullable: true + title: Aggregate pass + type: boolean + children: + items: + $ref: '#/components/schemas/CompositeChildResult' + type: array + summary: + nullable: true + title: Summary + type: string + error_localizer_results: + additionalProperties: true + title: Error localizer results + type: object + total_children: + title: Total children + type: integer + completed_children: + title: Completed children + type: integer + failed_children: + title: Failed children + type: integer + evaluation_id: + nullable: true + title: Evaluation id + type: string + required: + - aggregation_enabled + - children + - completed_children + - composite_name + - failed_children + - total_children + type: object + CompositeEvalExecuteResponse: + example: + result: + summary: summary + evaluation_id: evaluation_id + aggregation_function: aggregation_function + error_localizer_results: + key: "" + aggregation_enabled: true + aggregate_pass: true + composite_name: composite_name + composite_id: composite_id + completed_children: 2 + children: + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + aggregate_score: 0.8008281904610115 + total_children: 5 + failed_children: 7 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompositeEvalExecuteResponseResult' + required: + - result + - status + type: object + CompositeEvalCreateRequest: + example: + composite_child_axis: "" + name: name + description: description + aggregation_function: weighted_avg + child_weights: + key: "" + child_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tags: + - tags + - tags + aggregation_enabled: true + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + type: array + child_template_ids: + items: + format: uuid + type: string + type: array + aggregation_enabled: + default: true + title: Aggregation enabled + type: boolean + aggregation_function: + default: weighted_avg + enum: + - weighted_avg + - avg + - min + - max + - pass_rate + title: Aggregation function + type: string + child_weights: + additionalProperties: true + title: Child weights + type: object + composite_child_axis: + default: "" + enum: + - "" + - pass_fail + - percentage + - choices + - code + title: Composite child axis + type: string + required: + - child_template_ids + - name + type: object + CompositeChildItem: + example: + pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + child_id: + format: uuid + title: Child id + type: string + child_name: + minLength: 1 + title: Child name + type: string + order: + title: Order + type: integer + eval_type: + minLength: 1 + title: Eval type + type: string + pinned_version_id: + format: uuid + nullable: true + title: Pinned version id + type: string + pinned_version_number: + nullable: true + title: Pinned version number + type: integer + weight: + title: Weight + type: number + required_keys: + items: + minLength: 1 + type: string + type: array + required: + - child_id + - child_name + - order + type: object + CompositeEvalCreateResponseResult: + example: + composite_child_axis: composite_child_axis + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + template_type: template_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + template_type: + minLength: 1 + title: Template type + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + minLength: 1 + title: Aggregation function + type: string + composite_child_axis: + title: Composite child axis + type: string + children: + items: + $ref: '#/components/schemas/CompositeChildItem' + type: array + required: + - aggregation_enabled + - aggregation_function + - children + - id + - name + type: object + CompositeEvalCreateResponse: + example: + result: + composite_child_axis: composite_child_axis + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + template_type: template_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompositeEvalCreateResponseResult' + required: + - result + - status + type: object + EvalTemplateCreateV2Request: + example: + summary: + key: "" + instructions: instructions + code: code + output_type: pass_fail + check_internet: false + few_shot_examples: + - key: "" + - key: "" + pass_threshold: 0.08008281904610115 + description: description + tools: + key: "" + tags: + - tags + - tags + mode: auto + knowledge_bases: + - knowledge_bases + - knowledge_bases + code_language: python + is_draft: false + name: name + data_injection: + key: "" + messages: + - key: "" + - key: "" + model: turing_large + template_format: mustache + error_localizer_enabled: false + eval_type: llm + choice_scores: + key: "" + properties: + name: + maxLength: 255 + title: Name + type: string + is_draft: + default: false + title: Is draft + type: boolean + eval_type: + default: llm + enum: + - llm + - code + - agent + title: Eval type + type: string + instructions: + maxLength: 100000 + title: Instructions + type: string + model: + default: turing_large + minLength: 1 + title: Model + type: string + output_type: + default: pass_fail + enum: + - pass_fail + - percentage + - deterministic + title: Output type + type: string + pass_threshold: + maximum: 1 + minimum: 0 + title: Pass threshold + type: number + choice_scores: + additionalProperties: true + title: Choice scores + type: object + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + type: array + check_internet: + default: false + title: Check internet + type: boolean + code: + maxLength: 100000 + nullable: true + title: Code + type: string + code_language: + enum: + - python + - javascript + nullable: true + title: Code language + type: string + messages: + items: + additionalProperties: true + type: object + nullable: true + type: array + few_shot_examples: + items: + additionalProperties: true + type: object + nullable: true + type: array + mode: + enum: + - auto + - agent + - quick + nullable: true + title: Mode + type: string + tools: + additionalProperties: true + title: Tools + type: object + knowledge_bases: + items: + minLength: 1 + type: string + nullable: true + type: array + data_injection: + additionalProperties: true + title: Data injection + type: object + summary: + additionalProperties: true + title: Summary + type: object + error_localizer_enabled: + default: false + title: Error localizer enabled + type: boolean + template_format: + default: mustache + enum: + - mustache + - jinja + title: Template format + type: string + type: object + EvalTemplateCreateResponseResult: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + version: + minLength: 1 + title: Version + type: string + required: + - id + - name + - version + type: object + EvalTemplateCreateResponse: + example: + result: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateCreateResponseResult' + required: + - result + - status + type: object + EvalTemplateListChartsRequest: + example: + template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + template_ids: + items: + format: uuid + type: string + type: array + required: + - template_ids + type: object + EvalTemplateChartPoint: + example: + value: 0.8008281904610115 + timestamp: timestamp + properties: + timestamp: + minLength: 1 + title: Timestamp + type: string + value: + title: Value + type: number + required: + - timestamp + - value + type: object + EvalTemplateListChartsItem: + example: + error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + run_count: 6 + properties: + chart: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + error_rate: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + run_count: + title: Run count + type: integer + required: + - chart + - error_rate + - run_count + type: object + EvalTemplateListChartsResponseResult: + example: + charts: + key: + error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + run_count: 6 + properties: + charts: + additionalProperties: + $ref: '#/components/schemas/EvalTemplateListChartsItem' + title: Charts + type: object + required: + - charts + type: object + EvalTemplateListChartsResponse: + example: + result: + charts: + key: + error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + run_count: 6 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateListChartsResponseResult' + required: + - result + - status + type: object + EvalListFilters: + example: + names: + - names + - names + output_type: + - pass_fail + - pass_fail + template_type: + - single + - single + created_by: + - created_by + - created_by + eval_type: + - llm + - llm + tags: + - tags + - tags + properties: + eval_type: + items: + enum: + - llm + - code + - agent + type: string + type: array + output_type: + items: + enum: + - pass_fail + - percentage + - deterministic + type: string + type: array + template_type: + items: + enum: + - single + - composite + type: string + type: array + tags: + items: + minLength: 1 + type: string + type: array + created_by: + items: + minLength: 1 + type: string + type: array + names: + items: + minLength: 1 + type: string + type: array + type: object + EvalListRequest: + example: + search: search + owner_filter: all + page: 0 + filters: + names: + - names + - names + output_type: + - pass_fail + - pass_fail + template_type: + - single + - single + created_by: + - created_by + - created_by + eval_type: + - llm + - llm + tags: + - tags + - tags + sort_by: updated_at + sort_order: desc + page_size: 60 + properties: + page: + default: 0 + minimum: 0 + title: Page + type: integer + page_size: + default: 25 + maximum: 100 + minimum: 1 + title: Page size + type: integer + search: + nullable: true + title: Search + type: string + owner_filter: + default: all + enum: + - all + - user + - system + title: Owner filter + type: string + filters: + $ref: '#/components/schemas/EvalListFilters' + sort_by: + default: updated_at + enum: + - name + - updated_at + - created_at + title: Sort by + type: string + sort_order: + default: desc + enum: + - asc + - desc + title: Sort order + type: string + type: object + EvalTemplateListItem: + example: + owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + template_type: + minLength: 1 + title: Template type + type: string + eval_type: + minLength: 1 + title: Eval type + type: string + output_type: + minLength: 1 + title: Output type + type: string + owner: + minLength: 1 + title: Owner + type: string + created_by_name: + minLength: 1 + title: Created by name + type: string + version_count: + title: Version count + type: integer + current_version: + minLength: 1 + title: Current version + type: string + last_updated: + minLength: 1 + title: Last updated + type: string + thirty_day_chart: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + thirty_day_error_rate: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + thirty_day_run_count: + title: Thirty day run count + type: integer + tags: + items: + minLength: 1 + type: string + type: array + required: + - created_by_name + - current_version + - eval_type + - id + - last_updated + - name + - output_type + - owner + - tags + - template_type + - thirty_day_chart + - thirty_day_error_rate + - thirty_day_run_count + - version_count + type: object + EvalTemplateListResponseResult: + example: + total: 1 + page: 5 + items: + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + page_size: 5 + properties: + items: + items: + $ref: '#/components/schemas/EvalTemplateListItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + page_size: + title: Page size + type: integer + required: + - items + - page + - page_size + - total + type: object + EvalTemplateListResponse: + example: + result: + total: 1 + page: 5 + items: + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + page_size: 5 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateListResponseResult' + required: + - result + - status + type: object + CompositeEvalDetailResponseResult: + example: + composite_child_axis: composite_child_axis + updated_at: updated_at + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + description: description + created_at: created_at + template_type: template_type + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + tags: + - tags + - tags + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + template_type: + minLength: 1 + title: Template type + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + minLength: 1 + title: Aggregation function + type: string + composite_child_axis: + title: Composite child axis + type: string + children: + items: + $ref: '#/components/schemas/CompositeChildItem' + type: array + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + type: array + created_at: + title: Created at + type: string + updated_at: + title: Updated at + type: string + version_number: + nullable: true + title: Version number + type: integer + required: + - aggregation_enabled + - aggregation_function + - children + - id + - name + type: object + CompositeEvalDetailResponse: + example: + result: + composite_child_axis: composite_child_axis + updated_at: updated_at + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + description: description + created_at: created_at + template_type: template_type + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + tags: + - tags + - tags + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompositeEvalDetailResponseResult' + required: + - result + - status + type: object + CompositeEvalUpdateRequest: + example: + composite_child_axis: "" + name: name + description: description + aggregation_function: weighted_avg + child_weights: + key: "" + child_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tags: + - tags + - tags + aggregation_enabled: true + properties: + name: + maxLength: 255 + minLength: 1 + nullable: true + title: Name + type: string + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + nullable: true + type: array + aggregation_enabled: + nullable: true + title: Aggregation enabled + type: boolean + aggregation_function: + enum: + - weighted_avg + - avg + - min + - max + - pass_rate + nullable: true + title: Aggregation function + type: string + child_template_ids: + items: + format: uuid + type: string + nullable: true + type: array + child_weights: + additionalProperties: true + title: Child weights + type: object + composite_child_axis: + enum: + - "" + - pass_fail + - percentage + - choices + - code + nullable: true + title: Composite child axis + type: string + type: object + CompositeEvalExecuteRequest: + example: + mapping: + key: "" + error_localizer: false + call_context: + key: "" + input_data_types: + key: "" + span_context: + key: "" + session_context: + key: "" + model: model + trace_context: + key: "" + row_context: + key: "" + config: + key: "" + properties: + mapping: + additionalProperties: true + title: Mapping + type: object + model: + nullable: true + title: Model + type: string + config: + additionalProperties: true + title: Config + type: object + error_localizer: + default: false + title: Error localizer + type: boolean + input_data_types: + additionalProperties: true + title: Input data types + type: object + span_context: + additionalProperties: true + title: Span context + type: object + trace_context: + additionalProperties: true + title: Trace context + type: object + session_context: + additionalProperties: true + title: Session context + type: object + call_context: + additionalProperties: true + title: Call context + type: object + row_context: + additionalProperties: true + title: Row context + type: object + required: + - mapping + type: object + EvalTemplateDetailResponseResult: + example: + instructions: instructions + code: code + check_internet: true + description: description + created_at: created_at + created_by_name: created_by_name + aggregation_enabled: true + code_language: code_language + updated_at: updated_at + template_type: template_type + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 6 + owner: owner + composite_child_axis: composite_child_axis + output_type: output_type + required_keys: + - required_keys + - required_keys + pass_threshold: 0.8008281904610115 + multi_choice: true + current_version: current_version + aggregation_function: aggregation_function + tags: + - tags + - tags + name: name + template_format: template_format + choices: + key: "" + error_localizer_enabled: true + config: + key: "" + eval_type: eval_type + choice_scores: + key: "" + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + template_type: + minLength: 1 + title: Template type + type: string + eval_type: + minLength: 1 + title: Eval type + type: string + instructions: + nullable: true + title: Instructions + type: string + model: + nullable: true + title: Model + type: string + output_type: + minLength: 1 + title: Output type + type: string + pass_threshold: + title: Pass threshold + type: number + choice_scores: + additionalProperties: true + title: Choice scores + type: object + choices: + additionalProperties: true + title: Choices + type: object + multi_choice: + title: Multi choice + type: boolean + code: + nullable: true + title: Code + type: string + code_language: + nullable: true + title: Code language + type: string + required_keys: + items: + minLength: 1 + type: string + type: array + owner: + minLength: 1 + title: Owner + type: string + created_by_name: + minLength: 1 + title: Created by name + type: string + version_count: + title: Version count + type: integer + current_version: + minLength: 1 + title: Current version + type: string + tags: + items: + minLength: 1 + type: string + type: array + check_internet: + title: Check internet + type: boolean + error_localizer_enabled: + title: Error localizer enabled + type: boolean + template_format: + minLength: 1 + title: Template format + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + minLength: 1 + title: Aggregation function + type: string + composite_child_axis: + title: Composite child axis + type: string + config: + additionalProperties: true + title: Config + type: object + created_at: + minLength: 1 + title: Created at + type: string + updated_at: + minLength: 1 + title: Updated at + type: string + required: + - aggregation_enabled + - aggregation_function + - check_internet + - created_at + - created_by_name + - current_version + - error_localizer_enabled + - eval_type + - id + - multi_choice + - name + - output_type + - owner + - pass_threshold + - required_keys + - tags + - template_format + - template_type + - updated_at + - version_count + type: object + EvalTemplateDetailResponse: + example: + result: + instructions: instructions + code: code + check_internet: true + description: description + created_at: created_at + created_by_name: created_by_name + aggregation_enabled: true + code_language: code_language + updated_at: updated_at + template_type: template_type + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 6 + owner: owner + composite_child_axis: composite_child_axis + output_type: output_type + required_keys: + - required_keys + - required_keys + pass_threshold: 0.8008281904610115 + multi_choice: true + current_version: current_version + aggregation_function: aggregation_function + tags: + - tags + - tags + name: name + template_format: template_format + choices: + key: "" + error_localizer_enabled: true + config: + key: "" + eval_type: eval_type + choice_scores: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateDetailResponseResult' + required: + - result + - status + type: object + EvalFeedbackListItem: + example: + action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + properties: + id: + format: uuid + title: Id + type: string + value: + title: Value + type: string + explanation: + title: Explanation + type: string + source: + title: Source + type: string + source_id: + title: Source id + type: string + action_type: + title: Action type + type: string + user_name: + title: User name + type: string + created_at: + minLength: 1 + title: Created at + type: string + required: + - action_type + - created_at + - explanation + - id + - source + - source_id + - user_name + - value + type: object + EvalFeedbackListResponseResult: + example: + total: 0 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + page: 6 + items: + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + page_size: 1 + properties: + template_id: + format: uuid + title: Template id + type: string + items: + items: + $ref: '#/components/schemas/EvalFeedbackListItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + page_size: + title: Page size + type: integer + required: + - items + - page + - page_size + - template_id + - total + type: object + EvalFeedbackListResponse: + example: + result: + total: 0 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + page: 6 + items: + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + page_size: 1 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalFeedbackListResponseResult' + required: + - result + - status + type: object + GroundTruthConfig: + example: + mode: mode + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 6.027456183070403 + injection_format: injection_format + enabled: true + max_examples: 0 + properties: + enabled: + title: Enabled + type: boolean + ground_truth_id: + format: uuid + nullable: true + title: Ground truth id + type: string + mode: + minLength: 1 + title: Mode + type: string + max_examples: + title: Max examples + type: integer + similarity_threshold: + title: Similarity threshold + type: number + injection_format: + minLength: 1 + title: Injection format + type: string + type: object + GroundTruthConfigResponseResult: + example: + ground_truth: + mode: mode + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 6.027456183070403 + injection_format: injection_format + enabled: true + max_examples: 0 + properties: + ground_truth: + $ref: '#/components/schemas/GroundTruthConfig' + required: + - ground_truth + type: object + GroundTruthConfigResponse: + example: + result: + ground_truth: + mode: mode + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 6.027456183070403 + injection_format: injection_format + enabled: true + max_examples: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/GroundTruthConfigResponseResult' + required: + - result + - status + type: object + GroundTruthConfigRequest: + example: + mode: auto + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 0.6027456183070403 + injection_format: structured + enabled: true + max_examples: 1 + properties: + enabled: + default: true + title: Enabled + type: boolean + ground_truth_id: + format: uuid + nullable: true + title: Ground truth id + type: string + mode: + default: auto + enum: + - auto + - manual + - disabled + title: Mode + type: string + max_examples: + maximum: 10 + minimum: 1 + title: Max examples + type: integer + similarity_threshold: + maximum: 1 + minimum: 0 + title: Similarity threshold + type: number + injection_format: + default: structured + enum: + - structured + - conversational + - xml + title: Injection format + type: string + type: object + GroundTruthItem: + example: + storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + file_name: + title: File name + type: string + columns: + items: + minLength: 1 + type: string + type: array + row_count: + title: Row count + type: integer + variable_mapping: + additionalProperties: true + title: Variable mapping + type: object + role_mapping: + additionalProperties: true + title: Role mapping + type: object + embedding_status: + minLength: 1 + title: Embedding status + type: string + embedded_row_count: + title: Embedded row count + type: integer + storage_type: + minLength: 1 + title: Storage type + type: string + created_at: + title: Created at + type: string + required: + - columns + - id + - name + - row_count + type: object + GroundTruthListResponseResult: + example: + total: 1 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + items: + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + properties: + template_id: + format: uuid + title: Template id + type: string + items: + items: + $ref: '#/components/schemas/GroundTruthItem' + type: array + total: + title: Total + type: integer + required: + - items + - template_id + - total + type: object + GroundTruthListResponse: + example: + result: + total: 1 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + items: + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/GroundTruthListResponseResult' + required: + - result + - status + type: object + GroundTruthUploadRequest: + example: + file: https://openapi-generator.tech + data: + - key: "" + - key: "" + file_name: "" + columns: + - columns + - columns + name: name + description: "" + role_mapping: + key: "" + variable_mapping: + key: "" + properties: + file: + format: uri + readOnly: true + title: File + type: string + name: + maxLength: 255 + title: Name + type: string + description: + default: "" + title: Description + type: string + file_name: + default: "" + title: File name + type: string + columns: + items: + minLength: 1 + type: string + type: array + data: + items: + additionalProperties: true + type: object + type: array + variable_mapping: + additionalProperties: true + title: Variable mapping + type: object + role_mapping: + additionalProperties: true + title: Role mapping + type: object + type: object + GroundTruthUploadResponseResult: + example: + embedding_status: embedding_status + columns: + - columns + - columns + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + row_count: + title: Row count + type: integer + columns: + items: + minLength: 1 + type: string + type: array + embedding_status: + minLength: 1 + title: Embedding status + type: string + required: + - columns + - embedding_status + - id + - name + - row_count + type: object + GroundTruthUploadResponse: + example: + result: + embedding_status: embedding_status + columns: + - columns + - columns + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/GroundTruthUploadResponseResult' + required: + - result + - status + type: object + EvalTemplateUpdateV2Request: + example: + summary: + key: "" + instructions: instructions + code: code + output_type: pass_fail + check_internet: true + few_shot_examples: + - key: "" + - key: "" + pass_threshold: 0.08008281904610115 + multi_choice: true + description: description + tools: + key: "" + tags: + - tags + - tags + mode: auto + knowledge_bases: + - knowledge_bases + - knowledge_bases + code_language: python + publish: true + name: name + data_injection: + key: "" + messages: + - key: "" + - key: "" + model: model + template_format: mustache + error_localizer_enabled: true + eval_type: llm + choice_scores: + key: "" + properties: + name: + maxLength: 255 + minLength: 1 + nullable: true + title: Name + type: string + eval_type: + enum: + - llm + - code + - agent + nullable: true + title: Eval type + type: string + instructions: + minLength: 1 + nullable: true + title: Instructions + type: string + model: + minLength: 1 + nullable: true + title: Model + type: string + output_type: + enum: + - pass_fail + - percentage + - deterministic + nullable: true + title: Output type + type: string + pass_threshold: + maximum: 1 + minimum: 0 + nullable: true + title: Pass threshold + type: number + choice_scores: + additionalProperties: true + title: Choice scores + type: object + multi_choice: + nullable: true + title: Multi choice + type: boolean + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + nullable: true + type: array + check_internet: + nullable: true + title: Check internet + type: boolean + code: + nullable: true + title: Code + type: string + code_language: + enum: + - python + - javascript + nullable: true + title: Code language + type: string + messages: + items: + additionalProperties: true + type: object + nullable: true + type: array + few_shot_examples: + items: + additionalProperties: true + type: object + nullable: true + type: array + mode: + enum: + - auto + - agent + - quick + nullable: true + title: Mode + type: string + tools: + additionalProperties: true + title: Tools + type: object + knowledge_bases: + items: + minLength: 1 + type: string + nullable: true + type: array + data_injection: + additionalProperties: true + title: Data injection + type: object + summary: + additionalProperties: true + title: Summary + type: object + error_localizer_enabled: + nullable: true + title: Error localizer enabled + type: boolean + publish: + nullable: true + title: Publish + type: boolean + template_format: + enum: + - mustache + - jinja + nullable: true + title: Template format + type: string + type: object + EvalTemplateUpdateResponseResult: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + updated: + title: Updated + type: boolean + required: + - id + - name + - updated + type: object + EvalTemplateUpdateResponse: + example: + result: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateUpdateResponseResult' + required: + - result + - status + type: object + EvalUsageStats: + example: + total_runs: 0 + runs_period: 6 + pass_rate: 5.637376656633329 + success_count: 1 + error_count: 5 + properties: + total_runs: + title: Total runs + type: integer + runs_period: + title: Runs period + type: integer + success_count: + title: Success count + type: integer + error_count: + title: Error count + type: integer + pass_rate: + title: Pass rate + type: number + required: + - error_count + - pass_rate + - runs_period + - success_count + - total_runs + type: object + EvalUsageChartPoint: + example: + calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + properties: + timestamp: + minLength: 1 + title: Timestamp + type: string + calls: + title: Calls + type: integer + avg_latency_ms: + title: Avg latency ms + type: integer + avg_score: + nullable: true + title: Avg score + type: number + pass_count: + title: Pass count + type: integer + fail_count: + title: Fail count + type: integer + required: + - timestamp + type: object + EvalUsageFeedback: + example: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + properties: + id: + format: uuid + title: Id + type: string + value: + additionalProperties: true + title: Value + type: object + explanation: + title: Explanation + type: string + action_type: + title: Action type + type: string + created_at: + title: Created at + type: string + user: + title: User + type: string + required: + - id + type: object + EvalUsageLogItem: + example: + result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + properties: + id: + format: uuid + title: Id + type: string + input: + title: Input + type: string + result: + title: Result + type: string + score: + nullable: true + title: Score + type: number + reason: + title: Reason + type: string + status: + minLength: 1 + title: Status + type: string + source: + title: Source + type: string + created_at: + minLength: 1 + title: Created at + type: string + detail: + additionalProperties: true + title: Detail + type: object + feedback: + $ref: '#/components/schemas/EvalUsageFeedback' + composite: + title: Composite + type: boolean + aggregate_pass: + nullable: true + title: Aggregate pass + type: boolean + required: + - created_at + - detail + - id + - input + - status + type: object + EvalUsageLogs: + example: + total: 7 + page: 1 + items: + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + page_size: 1 + properties: + items: + items: + $ref: '#/components/schemas/EvalUsageLogItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + page_size: + title: Page size + type: integer + required: + - items + - page + - page_size + - total + type: object + EvalUsageStatsResponseResult: + example: + stats: + total_runs: 0 + runs_period: 6 + pass_rate: 5.637376656633329 + success_count: 1 + error_count: 5 + is_composite: true + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + chart: + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + logs: + total: 7 + page: 1 + items: + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + page_size: 1 + properties: + template_id: + format: uuid + title: Template id + type: string + is_composite: + title: Is composite + type: boolean + stats: + $ref: '#/components/schemas/EvalUsageStats' + chart: + items: + $ref: '#/components/schemas/EvalUsageChartPoint' + type: array + logs: + $ref: '#/components/schemas/EvalUsageLogs' + required: + - chart + - is_composite + - logs + - stats + - template_id + type: object + EvalUsageStatsResponse: + example: + result: + stats: + total_runs: 0 + runs_period: 6 + pass_rate: 5.637376656633329 + success_count: 1 + error_count: 5 + is_composite: true + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + chart: + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + logs: + total: 7 + page: 1 + items: + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + page_size: 1 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalUsageStatsResponseResult' + required: + - result + - status + type: object + EvalTemplateVersionItem: + example: + config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + properties: + id: + format: uuid + title: Id + type: string + version_number: + title: Version number + type: integer + is_default: + title: Is default + type: boolean + criteria: + title: Criteria + type: string + model: + title: Model + type: string + config_snapshot: + additionalProperties: true + title: Config snapshot + type: object + created_by_name: + title: Created by name + type: string + created_at: + title: Created at + type: string + required: + - id + - is_default + - version_number + type: object + EvalTemplateVersionListResponseResult: + example: + total: 6 + versions: + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + template_id: + format: uuid + title: Template id + type: string + versions: + items: + $ref: '#/components/schemas/EvalTemplateVersionItem' + type: array + total: + title: Total + type: integer + required: + - template_id + - total + - versions + type: object + EvalTemplateVersionListResponse: + example: + result: + total: 6 + versions: + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateVersionListResponseResult' + required: + - result + - status + type: object + EvalTemplateVersionCreateRequest: + example: + config_snapshot: + key: "" + criteria: criteria + model: model + properties: + criteria: + nullable: true + title: Criteria + type: string + model: + nullable: true + title: Model + type: string + config_snapshot: + additionalProperties: true + title: Config snapshot + type: object + type: object + EvalTemplateVersionResponseResult: + example: + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + properties: + id: + format: uuid + title: Id + type: string + version_number: + title: Version number + type: integer + is_default: + title: Is default + type: boolean + required: + - id + - is_default + - version_number + type: object + EvalTemplateVersionResponse: + example: + result: + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateVersionResponseResult' + required: + - result + - status + type: object + EvalTemplateVersionRestoreResponseResult: + example: + version_number: 0 + restored_from: 6 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + properties: + id: + format: uuid + title: Id + type: string + version_number: + title: Version number + type: integer + is_default: + title: Is default + type: boolean + restored_from: + title: Restored from + type: integer + required: + - id + - is_default + - restored_from + - version_number + type: object + EvalTemplateVersionRestoreResponse: + example: + result: + version_number: 0 + restored_from: 6 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateVersionRestoreResponseResult' + required: + - result + - status + type: object + ExperimentStringResultResponse: + example: + result: result + status: true + properties: + status: + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + - status + type: object + ExperimentRerunRequest: + example: + use_temporal: true + max_concurrent_rows: 1 + experiment_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_ids: + items: + format: uuid + type: string + type: array + use_temporal: + default: true + title: Use temporal + type: boolean + max_concurrent_rows: + minimum: 1 + title: Max concurrent rows + type: integer + required: + - experiment_ids + type: object + PromptConfigEntry: + example: + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + nullable: true + title: Id + type: string + name: + title: Name + type: string + prompt_id: + format: uuid + nullable: true + title: Prompt id + type: string + prompt_version: + format: uuid + nullable: true + title: Prompt version + type: string + agent_id: + format: uuid + nullable: true + title: Agent id + type: string + agent_version: + format: uuid + nullable: true + title: Agent version + type: string + model: + additionalProperties: true + title: Model + type: object + model_params: + additionalProperties: + nullable: true + type: string + title: Model params + type: object + configuration: + additionalProperties: + nullable: true + type: string + title: Configuration + type: object + output_format: + default: string + minLength: 1 + title: Output format + type: string + messages: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + voice_input_column_id: + format: uuid + nullable: true + title: Voice input column id + type: string + type: object + EvalMetricEntry: + example: + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + id: + format: uuid + nullable: true + title: Id + type: string + template_id: + format: uuid + title: Template id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + config: + additionalProperties: true + title: Config + type: object + model: + default: "" + maxLength: 255 + title: Model + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + required: + - config + - name + - template_id + type: object + ExperimentCreateV2: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + prompt_config: + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + experiment_type: llm + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + column_id: + format: uuid + nullable: true + title: Column id + type: string + experiment_type: + default: llm + enum: + - llm + - tts + - stt + - image + title: Experiment type + type: string + prompt_config: + items: + $ref: '#/components/schemas/PromptConfigEntry' + type: array + user_eval_metrics: + items: + $ref: '#/components/schemas/EvalMetricEntry' + type: array + required: + - dataset_id + - name + - prompt_config + - user_eval_metrics + type: object + ExperimentListV2: + example: + agents_count: agents_count + models_count: models_count + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_templates_count: eval_templates_count + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_type: llm + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + experiment_type: + description: "Determines how the experiment executes: llm, tts, stt, or\ + \ image." + enum: + - llm + - tts + - stt + - image + title: Experiment type + type: string + eval_templates_count: + readOnly: true + title: Eval templates count + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + models_count: + readOnly: true + title: Models count + type: string + agents_count: + readOnly: true + title: Agents count + type: string + dataset: + format: uuid + title: Dataset + type: string + required: + - dataset + - name + type: object + ExperimentNameSuggestionResult: + example: + suggested_name: suggested_name + properties: + suggested_name: + minLength: 1 + title: Suggested name + type: string + required: + - suggested_name + type: object + ExperimentNameSuggestionResponse: + example: + result: + suggested_name: suggested_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentNameSuggestionResult' + required: + - result + - status + type: object + ExperimentNameValidationResult: + example: + is_valid: true + message: message + properties: + is_valid: + title: Is valid + type: boolean + message: + title: Message + type: string + required: + - is_valid + type: object + ExperimentNameValidationResponse: + example: + result: + is_valid: true + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentNameValidationResult' + required: + - result + - status + type: object + ExperimentDetailV2: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + snapshot_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + prompt_configs: prompt_configs + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: user_eval_metrics + agent_configs: agent_configs + experiment_type: llm + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + dataset_id: + format: uuid + readOnly: true + title: Dataset id + type: string + column_id: + format: uuid + nullable: true + readOnly: true + title: Column id + type: string + experiment_type: + description: "Determines how the experiment executes: llm, tts, stt, or\ + \ image." + enum: + - llm + - tts + - stt + - image + title: Experiment type + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + snapshot_dataset_id: + format: uuid + nullable: true + readOnly: true + title: Snapshot dataset id + type: string + prompt_configs: + readOnly: true + title: Prompt configs + type: string + agent_configs: + readOnly: true + title: Agent configs + type: string + user_eval_metrics: + readOnly: true + title: User eval metrics + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - name + type: object + ExperimentV2DetailResponse: + example: + result: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + snapshot_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + prompt_configs: prompt_configs + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: user_eval_metrics + agent_configs: agent_configs + experiment_type: llm + status: NotStarted + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentDetailV2' + required: + - result + - status + type: object + ExperimentUpdateV2: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_config: + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + column_id: + format: uuid + nullable: true + title: Column id + type: string + prompt_config: + items: + $ref: '#/components/schemas/PromptConfigEntry' + type: array + user_eval_metrics: + items: + $ref: '#/components/schemas/EvalMetricEntry' + type: array + type: object + ExperimentComparisonWeightsRequest: + example: + eval_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + weights: + key: "" + properties: + eval_template_ids: + items: + format: uuid + type: string + type: array + weights: + additionalProperties: true + title: Weights + type: object + type: object + ExperimentComparisonColumnMetric: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + properties: + column_id: + format: uuid + title: Column id + type: string + column_name: + minLength: 1 + title: Column name + type: string + avg_completion_tokens: + title: Avg completion tokens + type: number + avg_total_tokens: + title: Avg total tokens + type: number + avg_response_time: + title: Avg response time + type: number + avg_score: + additionalProperties: true + title: Avg score + type: object + required: + - avg_completion_tokens + - avg_response_time + - avg_total_tokens + - column_id + - column_name + type: object + ExperimentComparisonDatasetMetric: + example: + total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + avg_completion_tokens: + nullable: true + title: Avg completion tokens + type: number + avg_total_tokens: + nullable: true + title: Avg total tokens + type: number + avg_response_time: + nullable: true + title: Avg response time + type: number + avg_score: + nullable: true + title: Avg score + type: number + columns: + items: + $ref: '#/components/schemas/ExperimentComparisonColumnMetric' + type: array + normalized_scores: + additionalProperties: true + title: Normalized scores + type: object + overall_rating: + nullable: true + title: Overall rating + type: number + rank: + nullable: true + title: Rank + type: integer + rank_suffix: + title: Rank suffix + type: string + total_datasets: + title: Total datasets + type: integer + required: + - dataset_id + type: object + ExperimentDatasetComparisonResult: + example: + total_datasets: 0 + experiment_name: experiment_name + weights_applied: + key: "" + dataset_comparisons: + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + experiment_name: + minLength: 1 + title: Experiment name + type: string + total_datasets: + title: Total datasets + type: integer + weights_applied: + additionalProperties: true + title: Weights applied + type: object + dataset_comparisons: + items: + $ref: '#/components/schemas/ExperimentComparisonDatasetMetric' + type: array + required: + - dataset_comparisons + - experiment_id + - experiment_name + - total_datasets + type: object + ExperimentDatasetComparisonResponse: + example: + result: + total_datasets: 0 + experiment_name: experiment_name + weights_applied: + key: "" + dataset_comparisons: + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentDatasetComparisonResult' + required: + - result + - status + type: object + ExperimentComparisonRawMetrics: + example: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + properties: + avg_completion_tokens: + nullable: true + title: Avg completion tokens + type: number + avg_total_tokens: + nullable: true + title: Avg total tokens + type: number + avg_response_time: + nullable: true + title: Avg response time + type: number + avg_score: + nullable: true + title: Avg score + type: number + type: object + ExperimentComparisonNormalizedMetrics: + example: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + properties: + completion_tokens: + nullable: true + title: Completion tokens + type: number + total_tokens: + nullable: true + title: Total tokens + type: number + response_time: + nullable: true + title: Response time + type: number + score: + nullable: true + title: Score + type: number + type: object + ExperimentComparisonMetrics: + example: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + properties: + raw: + $ref: '#/components/schemas/ExperimentComparisonRawMetrics' + normalized: + $ref: '#/components/schemas/ExperimentComparisonNormalizedMetrics' + required: + - normalized + - raw + type: object + ExperimentComparisonWeights: + example: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + properties: + response_time: + nullable: true + title: Response time + type: number + scores: + additionalProperties: true + title: Scores + type: object + total_tokens: + nullable: true + title: Total tokens + type: number + completion_tokens: + nullable: true + title: Completion tokens + type: number + type: object + ExperimentComparisonDetail: + example: + scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + properties: + scores_weight: + additionalProperties: true + title: Scores weight + type: object + experiment_dataset_id: + format: uuid + nullable: true + title: Experiment dataset id + type: string + rank: + nullable: true + title: Rank + type: integer + rank_suffix: + title: Rank suffix + type: string + metrics: + $ref: '#/components/schemas/ExperimentComparisonMetrics' + weights: + $ref: '#/components/schemas/ExperimentComparisonWeights' + overall_rating: + nullable: true + title: Overall rating + type: number + required: + - metrics + - weights + type: object + ExperimentComparisonDetailsResult: + example: + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comparisons: + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + total_comparisons: 0 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + total_comparisons: + title: Total comparisons + type: integer + comparisons: + items: + $ref: '#/components/schemas/ExperimentComparisonDetail' + type: array + required: + - comparisons + - experiment_id + - total_comparisons + type: object + ExperimentComparisonDetailsResponse: + example: + result: + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comparisons: + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + total_comparisons: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentComparisonDetailsResult' + required: + - result + - status + type: object + ExperimentDerivedVariablesResult: + example: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + properties: + version: + title: Version + type: string + derived_variables: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Derived variables + type: object + type: object + ExperimentDerivedVariablesResponse: + example: + result: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentDerivedVariablesResult' + required: + - result + - status + type: object + ExperimentEvaluationTokenUsage: + example: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + properties: + avg_completion_tokens: + title: Avg completion tokens + type: number + avg_prompt_tokens: + title: Avg prompt tokens + type: number + avg_total_tokens: + title: Avg total tokens + type: number + total_tokens: + title: Total tokens + type: integer + required: + - avg_completion_tokens + - avg_prompt_tokens + - avg_total_tokens + - total_tokens + type: object + ExperimentEvaluationColumnStats: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + properties: + column_name: + minLength: 1 + title: Column name + type: string + column_id: + format: uuid + title: Column id + type: string + total_rows: + title: Total rows + type: integer + success_rate: + title: Success rate + type: number + avg_response_time: + title: Avg response time + type: number + token_usage: + $ref: '#/components/schemas/ExperimentEvaluationTokenUsage' + avg_score: + additionalProperties: true + title: Avg score + type: object + required: + - avg_response_time + - column_id + - column_name + - success_rate + - token_usage + - total_rows + type: object + ExperimentEvaluationStatsResult: + example: + evaluation_columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + evaluation_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_name: experiment_name + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evaluation_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + evaluation_name: evaluation_name + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + experiment_name: + minLength: 1 + title: Experiment name + type: string + evaluation_id: + format: uuid + title: Evaluation id + type: string + evaluation_name: + minLength: 1 + title: Evaluation name + type: string + evaluation_template_id: + format: uuid + title: Evaluation template id + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + evaluation_columns: + items: + $ref: '#/components/schemas/ExperimentEvaluationColumnStats' + type: array + required: + - dataset_id + - dataset_name + - evaluation_columns + - evaluation_id + - evaluation_name + - evaluation_template_id + - experiment_id + - experiment_name + type: object + ExperimentEvaluationStatsResponse: + example: + result: + evaluation_columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + evaluation_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_name: experiment_name + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evaluation_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + evaluation_name: evaluation_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentEvaluationStatsResult' + required: + - result + - status + type: object + Feedback: + example: + custom_eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action_type: action_type + user_eval_metric: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + source: dataset + feedback_improvement: feedback_improvement + explanation: explanation + row_id: row_id + value: value + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + source_id: + maxLength: 255 + minLength: 1 + title: Source id + type: string + source: + enum: + - dataset + - prompt + - sdk + - trace + - experiment + - observe + - eval_playground + title: Source + type: string + user_eval_metric: + format: uuid + nullable: true + title: User eval metric + type: string + value: + minLength: 1 + title: Value + type: string + explanation: + nullable: true + title: Explanation + type: string + row_id: + maxLength: 255 + nullable: true + title: Row id + type: string + custom_eval_config_id: + format: uuid + nullable: true + title: Custom eval config id + type: string + feedback_improvement: + nullable: true + title: Feedback improvement + type: string + action_type: + maxLength: 255 + nullable: true + title: Action type + type: string + required: + - source + - source_id + - value + type: object + ExperimentFeedbackCreateResult: + example: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + required: + - id + type: object + ExperimentFeedbackCreateResponse: + example: + result: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackCreateResult' + required: + - result + - status + type: object + ExperimentFeedbackDetailItem: + example: + action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + properties: + id: + format: uuid + title: Id + type: string + value: + additionalProperties: true + title: Value + type: object + comment: + nullable: true + title: Comment + type: string + created_at: + format: date-time + title: Created at + type: string + action_type: + nullable: true + title: Action type + type: string + required: + - created_at + - id + type: object + ExperimentFeedbackDetailsResult: + example: + feedback: + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + total_count: 0 + properties: + feedback: + items: + $ref: '#/components/schemas/ExperimentFeedbackDetailItem' + type: array + total_count: + title: Total count + type: integer + required: + - feedback + - total_count + type: object + ExperimentFeedbackDetailsResponse: + example: + result: + feedback: + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + total_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackDetailsResult' + required: + - result + - status + type: object + ExperimentFeedbackTemplateResult: + example: + user_eval_name: user_eval_name + output_type: output_type + eval_description: eval_description + multi_choice: true + choices: + - choices + - choices + eval_name: eval_name + properties: + output_type: + minLength: 1 + nullable: true + title: Output type + type: string + eval_description: + nullable: true + title: Eval description + type: string + eval_name: + minLength: 1 + title: Eval name + type: string + user_eval_name: + minLength: 1 + title: User eval name + type: string + choices: + items: + type: string + type: array + multi_choice: + title: Multi choice + type: boolean + required: + - eval_name + - user_eval_name + type: object + ExperimentFeedbackTemplateResponse: + example: + result: + user_eval_name: user_eval_name + output_type: output_type + eval_description: eval_description + multi_choice: true + choices: + - choices + - choices + eval_name: eval_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackTemplateResult' + required: + - result + - status + type: object + ExperimentFeedbackSubmitRequest: + example: + user_eval_metric_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action_type: retune + feedback_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + properties: + action_type: + enum: + - retune + - recalculate_row + - recalculate_dataset + - retune_recalculate + title: Action type + type: string + feedback_id: + format: uuid + title: Feedback id + type: string + user_eval_metric_id: + format: uuid + title: User eval metric id + type: string + value: + additionalProperties: true + title: Value + type: object + explanation: + title: Explanation + type: string + required: + - action_type + - feedback_id + - user_eval_metric_id + type: object + ExperimentFeedbackSubmitResult: + example: + user_eval_metric_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workflow_id: workflow_id + action_type: action_type + message: message + properties: + message: + minLength: 1 + title: Message + type: string + action_type: + minLength: 1 + title: Action type + type: string + user_eval_metric_id: + format: uuid + title: User eval metric id + type: string + workflow_id: + title: Workflow id + type: string + required: + - action_type + - message + - user_eval_metric_id + type: object + ExperimentFeedbackSubmitResponse: + example: + result: + user_eval_metric_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workflow_id: workflow_id + action_type: action_type + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackSubmitResult' + required: + - result + - status + type: object + ExperimentJsonSchemaResponse: + example: + result: + key: + max_array_count: 0 + keys: + - keys + - keys + max_images_count: 6 + name: name + sample: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + $ref: '#/components/schemas/JsonColumnSchemaEntry' + title: Result + type: object + required: + - result + - status + type: object + RerunCellEntry: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + column_id: + format: uuid + title: Column id + type: string + row_id: + format: uuid + title: Row id + type: string + required: + - column_id + - row_id + type: object + ExperimentRerunCells: + example: + source_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + failed_only: false + cells: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metric_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + source_ids: + items: + format: uuid + type: string + type: array + cells: + items: + $ref: '#/components/schemas/RerunCellEntry' + type: array + user_eval_metric_ids: + items: + format: uuid + type: string + type: array + failed_only: + default: false + title: Failed only + type: boolean + type: object + ExperimentWorkflowResult: + example: + workflow_id: workflow_id + message: message + properties: + message: + minLength: 1 + title: Message + type: string + workflow_id: + title: Workflow id + type: string + required: + - message + type: object + ExperimentWorkflowResponse: + example: + result: + workflow_id: workflow_id + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentWorkflowResult' + required: + - result + - status + type: object + ExperimentTableRowsColumnConfig: + example: + average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + origin_type: + title: Origin type + type: string + data_type: + title: Data type + type: string + status: + title: Status + type: string + group: + additionalProperties: true + title: Group + type: object + average_score: + additionalProperties: true + title: Average score + type: object + dataset_id: + title: Dataset id + type: string + choices_map: + additionalProperties: true + title: Choices map + type: object + is_base_column: + title: Is base column + type: boolean + output_type: + nullable: true + title: Output type + type: string + eval_template_id: + nullable: true + title: Eval template id + type: string + source_id: + title: Source id + type: string + is_agent: + title: Is agent + type: boolean + is_final: + title: Is final + type: boolean + required: + - id + - name + type: object + ExperimentTableRowsMetadata: + example: + total_rows: 0 + column: column + description: + key: description + total_pages: 6 + dataset_name: dataset_name + dataset: dataset + properties: + total_rows: + title: Total rows + type: integer + dataset: + title: Dataset + type: string + dataset_name: + title: Dataset name + type: string + column: + nullable: true + title: Column + type: string + total_pages: + title: Total pages + type: integer + description: + additionalProperties: + type: string + title: Description + type: object + type: object + ExperimentTableRowsResult: + example: + metadata: + total_rows: 0 + column: column + description: + key: description + total_pages: 6 + dataset_name: dataset_name + dataset: dataset + output_format: output_format + column_config: + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + table: + - key: "" + - key: "" + status: status + next_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + column_config: + items: + $ref: '#/components/schemas/ExperimentTableRowsColumnConfig' + type: array + table: + items: + additionalProperties: true + type: object + type: array + metadata: + $ref: '#/components/schemas/ExperimentTableRowsMetadata' + output_format: + title: Output format + type: string + status: + title: Status + type: string + next_row_ids: + items: + format: uuid + type: string + type: array + required: + - column_config + type: object + ExperimentTableRowsResponse: + example: + result: + metadata: + total_rows: 0 + column: column + description: + key: description + total_pages: 6 + dataset_name: dataset_name + dataset: dataset + output_format: output_format + column_config: + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + table: + - key: "" + - key: "" + status: status + next_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentTableRowsResult' + required: + - result + - status + type: object + ExperimentStatsColumnConfig: + example: + reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + properties: + status: + title: Status + type: string + name: + minLength: 1 + title: Name + type: string + reverse_output: + title: Reverse output + type: boolean + output_type: + nullable: true + title: Output type + type: string + eval_template_id: + nullable: true + title: Eval template id + type: string + required: + - name + type: object + ExperimentStatsMetadata: + example: + is_winner_chosen: true + properties: + is_winner_chosen: + title: Is winner chosen + type: boolean + required: + - is_winner_chosen + type: object + ExperimentStatsResult: + example: + metadata: + is_winner_chosen: true + table_data: + - key: "" + - key: "" + column_config: + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + properties: + column_config: + items: + $ref: '#/components/schemas/ExperimentStatsColumnConfig' + type: array + table_data: + items: + additionalProperties: true + type: object + type: array + metadata: + $ref: '#/components/schemas/ExperimentStatsMetadata' + required: + - column_config + - metadata + - table_data + type: object + ExperimentStatsResponse: + example: + result: + metadata: + is_winner_chosen: true + table_data: + - key: "" + - key: "" + column_config: + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentStatsResult' + required: + - result + - status + type: object + ExperimentStopWorkflowsCancelled: + example: + reruns: true + main: true + properties: + main: + title: Main + type: boolean + reruns: + title: Reruns + type: boolean + required: + - main + - reruns + type: object + ExperimentStopResult: + example: + workflows_cancelled: + reruns: true + main: true + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + experiment_id: + format: uuid + title: Experiment id + type: string + workflows_cancelled: + $ref: '#/components/schemas/ExperimentStopWorkflowsCancelled' + required: + - experiment_id + - message + - workflows_cancelled + type: object + ExperimentStopResponse: + example: + result: + workflows_cancelled: + reruns: true + main: true + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentStopResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseSdkCodeResult: + example: + code: code + properties: + code: + minLength: 1 + title: Code + type: string + required: + - code + type: object + LegacyKnowledgeBaseSdkCodeResponse: + example: + result: + code: code + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseSdkCodeResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseMutationRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + files: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + name: + title: Name + type: string + kb_id: + format: uuid + title: Kb id + type: string + files: + items: + format: uuid + type: string + type: array + type: object + LegacyKnowledgeBaseCreateResult: + example: + kb_name: kb_name + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + file_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + detail: detail + properties: + detail: + minLength: 1 + title: Detail + type: string + kb_id: + format: uuid + title: Kb id + type: string + kb_name: + minLength: 1 + title: Kb name + type: string + file_ids: + items: + format: uuid + type: string + type: array + required: + - detail + - file_ids + - kb_id + - kb_name + type: object + LegacyKnowledgeBaseCreateResponse: + example: + result: + kb_name: kb_name + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + file_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + detail: detail + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseCreateResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseMutationResult: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + files: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_error: last_error + created_by: created_by + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + organization: + format: uuid + title: Organization + type: string + status: + minLength: 1 + title: Status + type: string + files: + items: + format: uuid + type: string + type: array + updated_at: + format: date-time + title: Updated at + type: string + created_by: + nullable: true + title: Created by + type: string + last_error: + nullable: true + title: Last error + type: string + required: + - created_by + - files + - id + - last_error + - name + - organization + - status + - updated_at + type: object + LegacyKnowledgeBaseMutationResponse: + example: + result: + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + files: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_error: last_error + created_by: created_by + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseMutationResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseFilesRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + search: search + page_number: 0 + sort: + - key: "" + - key: "" + page_size: 6 + properties: + kb_id: + format: uuid + title: Kb id + type: string + search: + nullable: true + title: Search + type: string + sort: + items: + additionalProperties: true + type: object + type: array + page_number: + default: 0 + title: Page number + type: integer + page_size: + default: 10 + title: Page size + type: integer + required: + - kb_id + type: object + LegacyKnowledgeBaseFileRow: + example: + name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + file_size: + title: File size + type: integer + status: + minLength: 1 + title: Status + type: string + updated: + format: date-time + title: Updated + type: string + updated_by: + nullable: true + title: Updated by + type: string + error: + nullable: true + title: Error + type: string + required: + - file_size + - id + - name + - status + - updated + - updated_by + type: object + LegacyKnowledgeBaseFilesResult: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + table_data: + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + total_rows: 1 + status_count: 6 + status: status + properties: + table_data: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseFileRow' + type: array + last_updated: + format: date-time + title: Last updated + type: string + status: + minLength: 1 + title: Status + type: string + status_count: + title: Status count + type: integer + total_rows: + title: Total rows + type: integer + required: + - last_updated + - status + - status_count + - table_data + - total_rows + type: object + LegacyKnowledgeBaseFilesResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + table_data: + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + total_rows: 1 + status_count: 6 + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseFilesResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseTableColumn: + example: + name: name + id: id + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + required: + - id + - name + type: object + LegacyKnowledgeBaseTableRow: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + files_uploaded: + title: Files uploaded + type: integer + status: + minLength: 1 + title: Status + type: string + error: + nullable: true + title: Error + type: string + updated_at: + format: date-time + title: Updated at + type: string + created_by: + nullable: true + title: Created by + type: string + required: + - created_by + - files_uploaded + - id + - name + - status + - updated_at + type: object + LegacyKnowledgeBaseTableResult: + example: + table_data: + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + total_rows: 6 + column_config: + - name: name + id: id + - name: name + id: id + properties: + column_config: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableColumn' + type: array + table_data: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableRow' + type: array + total_rows: + title: Total rows + type: integer + type: object + LegacyKnowledgeBaseTableResponse: + example: + result: + table_data: + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + total_rows: 6 + column_config: + - name: name + id: id + - name: name + id: id + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseOption: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + required: + - id + - name + type: object + LegacyKnowledgeBaseListResult: + example: + table_data: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + table_data: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseOption' + type: array + required: + - table_data + type: object + LegacyKnowledgeBaseListResponse: + example: + result: + table_data: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseListResult' + required: + - result + - status + type: object + PromptHistoryExecution: + example: + metadata: + key: "" + template_version: template_version + original_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + placeholders: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + evaluation_results: + key: "" + commit_message: commit_message + is_default: true + labels: labels + output: + key: "" + prompt_config_snapshot: prompt_config_snapshot + evaluation_configs: + key: "" + template_name: template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_draft: true + prompt_base_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + variable_names: variable_names + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + template_version: + maxLength: 50 + minLength: 1 + title: Template version + type: string + output: + additionalProperties: true + readOnly: true + title: Output + type: object + prompt_config_snapshot: + readOnly: true + title: Prompt config snapshot + type: string + template_name: + readOnly: true + title: Template name + type: string + original_template: + format: uuid + nullable: true + title: Original template + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + variable_names: + readOnly: true + title: Variable names + type: string + evaluation_results: + additionalProperties: true + title: Evaluation results + type: object + evaluation_configs: + additionalProperties: true + title: Evaluation configs + type: object + created_at: + format: date-time + readOnly: true + title: Created at + type: string + is_default: + title: Is default + type: boolean + commit_message: + nullable: true + title: Commit message + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + is_draft: + title: Is draft + type: boolean + labels: + readOnly: true + title: Labels + type: string + placeholders: + additionalProperties: true + title: Placeholders + type: object + prompt_base_template: + format: uuid + nullable: true + title: Prompt base template + type: string + required: + - template_version + type: object + PromptLabel: + example: + metadata: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: system + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + type: + enum: + - system + - custom + title: Type + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + required: + - name + - type + type: object + ModelHubTextErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + PromptTemplate: + example: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + placeholders: + key: "" + description: description + variable_names: + key: "" + prompt_folder: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + variable_names: + additionalProperties: true + title: Variable names + type: object + organization: + format: uuid + nullable: true + title: Organization + type: string + prompt_folder: + format: uuid + nullable: true + title: Prompt folder + type: string + placeholders: + additionalProperties: true + title: Placeholders + type: object + created_by: + format: uuid + nullable: true + title: Created by + type: string + required: + - name + type: object + DerivedVariablePreviewRequest: + example: + column_name: output + content: + key: "" + properties: + content: + additionalProperties: true + title: Content + type: object + column_name: + default: output + minLength: 1 + title: Column name + type: string + required: + - content + type: object + DerivedVariableDetailResponse: + example: + result: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DerivedVariableDetail' + required: + - result + - status + type: object + PromptDerivedVariablesResult: + example: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + properties: + version: + minLength: 1 + title: Version + type: string + derived_variables: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Derived variables + type: object + required: + - derived_variables + - version + type: object + PromptDerivedVariablesResponse: + example: + result: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/PromptDerivedVariablesResult' + required: + - result + - status + type: object + DerivedVariableExtractRequest: + example: + column_name: output + output_index: 0 + version: version + response_format_type: response_format_type + properties: + version: + minLength: 1 + title: Version + type: string + column_name: + default: output + minLength: 1 + title: Column name + type: string + output_index: + default: 0 + title: Output index + type: integer + response_format_type: + title: Response format type + type: string + required: + - version + type: object + CreateScore: + example: + notes: "" + source_type: dataset_row + queue_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + properties: + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + default: "" + title: Notes + type: string + score_source: + default: human + enum: + - human + - api + - auto + - imported + title: Score source + type: string + queue_item_id: + format: uuid + nullable: true + title: Queue item id + type: string + required: + - label_id + - source_id + - source_type + - value + type: object + ScoreResponse: + example: + result: + notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/Score' + required: + - result + type: object + BulkCreateScoreItem: + example: + notes: "" + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + properties: + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + default: "" + title: Notes + type: string + score_source: + default: human + enum: + - human + - api + - auto + - imported + title: Score source + type: string + required: + - label_id + - value + type: object + BulkCreateScores: + example: + span_notes: span_notes + span_notes_source_id: span_notes_source_id + notes: "" + scores: + - notes: "" + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + - notes: "" + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + source_type: dataset_row + queue_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + properties: + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + scores: + items: + $ref: '#/components/schemas/BulkCreateScoreItem' + type: array + notes: + default: "" + title: Notes + type: string + span_notes: + nullable: true + title: Span notes + type: string + span_notes_source_id: + nullable: true + title: Span notes source id + type: string + queue_item_id: + format: uuid + nullable: true + title: Queue item id + type: string + required: + - scores + - source_id + - source_type + type: object + BulkCreateScoresResult: + example: + scores: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + errors: + - errors + - errors + properties: + scores: + items: + $ref: '#/components/schemas/Score' + type: array + errors: + items: + minLength: 1 + type: string + type: array + required: + - errors + - scores + type: object + BulkCreateScoresResponse: + example: + result: + scores: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + errors: + - errors + - errors + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/BulkCreateScoresResult' + required: + - result + type: object + ScoreForSourceResponse: + example: + result: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + span_notes: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/Score' + type: array + span_notes: + items: + additionalProperties: true + type: object + type: array + required: + - result + type: object + ScoreDeleteResponse: + example: + result: + key: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + additionalProperties: + type: boolean + title: Result + type: object + required: + - result + type: object + ConfigureEvaluations: + example: + model_name: model_name + eval_templates: eval_templates + inputs: + key: inputs + config: + key: config + properties: + eval_templates: + minLength: 1 + title: Eval templates + type: string + inputs: + additionalProperties: + nullable: true + type: string + title: Inputs + type: object + model_name: + nullable: true + title: Model name + type: string + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + required: + - eval_templates + - inputs + type: object + SDKConfigureEvaluationsRequest: + additionalProperties: + additionalProperties: true + description: Provider-specific credential fields accepted at top level. + type: object + example: + eval_config: + model_name: model_name + eval_templates: eval_templates + inputs: + key: inputs + config: + key: config + custom_eval_name: custom_eval_name + platform: platform + properties: + eval_config: + $ref: '#/components/schemas/ConfigureEvaluations' + platform: + minLength: 1 + title: Platform + type: string + custom_eval_name: + nullable: true + title: Custom eval name + type: string + required: + - eval_config + - platform + type: object + SDKMessageResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + SDKConfigureEvaluationsResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKMessageResult' + required: + - result + - status + type: object + SDKErrorResponse: + example: + result: result + message: message + errors: + key: + - errors + - errors + status: true + properties: + status: + title: Status + type: boolean + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + errors: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Errors + type: object + required: + - status + type: object + SDKStandaloneEvalInput: + additionalProperties: + additionalProperties: true + type: object + example: + input: input + max_tokens: 1 + properties: + input: + title: Input + type: string + max_tokens: + minimum: 1 + title: Max tokens + type: integer + type: object + SDKStandaloneEvalRequest: + example: + protect_flash: false + inputs: + - input: input + max_tokens: 1 + - input: input + max_tokens: 1 + config: + key: config + properties: + inputs: + items: + $ref: '#/components/schemas/SDKStandaloneEvalInput' + type: array + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + protect_flash: + default: false + title: Protect flash + type: boolean + required: + - config + - inputs + type: object + SDKStandaloneEvalResultItem: + example: + evaluations: + - key: "" + - key: "" + properties: + evaluations: + items: + additionalProperties: true + type: object + type: array + required: + - evaluations + type: object + SDKStandaloneEvalResponse: + example: + result: + - evaluations: + - key: "" + - key: "" + - evaluations: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/SDKStandaloneEvalResultItem' + type: array + required: + - result + - status + type: object + SDKEvalTemplate: + example: + owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + organization: + nullable: true + title: Organization + type: string + owner: + nullable: true + title: Owner + type: string + eval_tags: + additionalProperties: true + title: Eval tags + type: object + config: + additionalProperties: true + title: Config + type: object + eval_id: + nullable: true + title: Eval id + type: string + criteria: + additionalProperties: true + title: Criteria + type: object + choices: + additionalProperties: true + title: Choices + type: object + multi_choice: + nullable: true + title: Multi choice + type: boolean + required: + - description + - eval_id + - id + - name + - organization + - owner + type: object + SDKEvalTemplateResponse: + example: + result: + owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKEvalTemplate' + required: + - result + - status + type: object + SDKCICDEvaluationRunSummary: + example: + results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + properties: + id: + format: uuid + title: Id + type: string + project: + minLength: 1 + title: Project + type: string + version: + minLength: 1 + title: Version + type: string + results_summary: + additionalProperties: + nullable: true + type: string + title: Results summary + type: object + required: + - id + - project + - results_summary + - version + type: object + SDKCICDEvaluationRunsResult: + example: + evaluation_runs: + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + message: message + status: processing + properties: + message: + minLength: 1 + title: Message + type: string + status: + enum: + - processing + - completed + title: Status + type: string + evaluation_runs: + items: + $ref: '#/components/schemas/SDKCICDEvaluationRunSummary' + type: array + required: + - message + - status + type: object + SDKCICDEvaluationRunsResponse: + example: + result: + evaluation_runs: + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + message: message + status: processing + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKCICDEvaluationRunsResult' + required: + - result + - status + type: object + CICDEvaluationItem: + example: + model_name: model_name + inputs: + key: inputs + eval_template: eval_template + config: + key: config + properties: + eval_template: + minLength: 1 + title: Eval template + type: string + inputs: + additionalProperties: + nullable: true + type: string + title: Inputs + type: object + model_name: + nullable: true + title: Model name + type: string + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + required: + - eval_template + - inputs + type: object + CICDJob: + example: + eval_data: + - model_name: model_name + inputs: + key: inputs + eval_template: eval_template + config: + key: config + - model_name: model_name + inputs: + key: inputs + eval_template: eval_template + config: + key: config + project_name: project_name + version: version + properties: + project_name: + minLength: 1 + title: Project name + type: string + version: + minLength: 1 + title: Version + type: string + eval_data: + items: + $ref: '#/components/schemas/CICDEvaluationItem' + type: array + required: + - eval_data + - project_name + - version + type: object + SDKCICDEvaluationRunAccepted: + example: + evaluation_run_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + project_name: project_name + version: version + properties: + message: + minLength: 1 + title: Message + type: string + project_name: + minLength: 1 + title: Project name + type: string + version: + minLength: 1 + title: Version + type: string + evaluation_run_id: + format: uuid + title: Evaluation run id + type: string + required: + - evaluation_run_id + - message + - project_name + - version + type: object + SDKCICDEvaluationRunAcceptedResponse: + example: + result: + evaluation_run_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + project_name: project_name + version: version + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKCICDEvaluationRunAccepted' + required: + - result + - status + type: object + SDKGetEvalsResponse: + example: + result: + - owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + - owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/SDKEvalTemplate' + type: array + required: + - result + - status + type: object + SDKStandaloneEvalV2Result: + example: + result: + key: "" + eval_status: eval_status + properties: + eval_status: + minLength: 1 + title: Eval status + type: string + result: + additionalProperties: true + title: Result + type: object + required: + - eval_status + - result + type: object + SDKStandaloneEvalV2Response: + example: + result: + result: + key: "" + eval_status: eval_status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKStandaloneEvalV2Result' + required: + - result + - status + type: object + SDKStandaloneEvalV2Request: + example: + error_localizer: false + span_id: span_id + inputs: + key: inputs + is_async: false + custom_eval_name: custom_eval_name + trace_eval: false + model: model + config: + key: config + eval_name: eval_name + properties: + eval_name: + minLength: 1 + title: Eval name + type: string + inputs: + additionalProperties: + nullable: true + type: string + title: Inputs + type: object + model: + nullable: true + title: Model + type: string + span_id: + nullable: true + title: Span id + type: string + custom_eval_name: + nullable: true + title: Custom eval name + type: string + trace_eval: + default: false + title: Trace eval + type: boolean + is_async: + default: false + title: Is async + type: boolean + error_localizer: + default: false + title: Error localizer + type: boolean + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + required: + - eval_name + - inputs + type: object + SDKSimulationAnalyticsResult: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_name: run_test_name + eval_averages: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + eval_explanation_summary: + key: "" + system_summary: + key: "" + message: message + eval_results: + - key: "" + - key: "" + status: status + properties: + execution_id: + format: uuid + title: Execution id + type: string + run_test_name: + minLength: 1 + title: Run test name + type: string + status: + minLength: 1 + title: Status + type: string + message: + minLength: 1 + title: Message + type: string + eval_results: + items: + additionalProperties: true + type: object + type: array + eval_averages: + additionalProperties: true + title: Eval averages + type: object + system_summary: + additionalProperties: true + title: System summary + type: object + eval_explanation_summary: + additionalProperties: true + title: Eval explanation summary + type: object + eval_explanation_summary_status: + nullable: true + title: Eval explanation summary status + type: string + required: + - eval_averages + - eval_results + - run_test_name + - system_summary + type: object + SDKSimulationAnalyticsResponse: + example: + result: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_name: run_test_name + eval_averages: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + eval_explanation_summary: + key: "" + system_summary: + key: "" + message: message + eval_results: + - key: "" + - key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKSimulationAnalyticsResult' + required: + - result + - status + type: object + ExecutionMetrics: + example: + completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + properties: + execution_id: + format: uuid + title: Execution id + type: string + status: + description: Current status of the test execution + enum: + - pending + - running + - completed + - failed + - cancelled + - cancelling + - evaluating + readOnly: true + title: Status + type: string + started_at: + description: When the test execution started + format: date-time + readOnly: true + title: Started at + type: string + completed_at: + description: When the test execution completed + format: date-time + nullable: true + readOnly: true + title: Completed at + type: string + total_calls: + description: Total number of calls to be made + readOnly: true + title: Total calls + type: integer + completed_calls: + description: Number of successfully completed calls + readOnly: true + title: Completed calls + type: integer + failed_calls: + description: Number of failed calls + readOnly: true + title: Failed calls + type: integer + metrics: + readOnly: true + title: Metrics + type: string + required: + - execution_id + type: object + SDKSimulationMetricsResult: + example: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + chat_metrics: + key: "" + latency: + key: "" + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: + key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + conversation: + key: "" + current_page: 2 + status: status + properties: + call_execution_id: + format: uuid + title: Call execution id + type: string + execution_id: + format: uuid + title: Execution id + type: string + status: + minLength: 1 + title: Status + type: string + duration_seconds: + nullable: true + title: Duration seconds + type: number + started_at: + format: date-time + nullable: true + title: Started at + type: string + completed_at: + format: date-time + nullable: true + title: Completed at + type: string + total_calls: + title: Total calls + type: integer + completed_calls: + title: Completed calls + type: integer + failed_calls: + title: Failed calls + type: integer + latency: + additionalProperties: true + title: Latency + type: object + cost: + additionalProperties: true + title: Cost + type: object + conversation: + additionalProperties: true + title: Conversation + type: object + chat_metrics: + additionalProperties: true + title: Chat metrics + type: object + metrics: + additionalProperties: true + title: Metrics + type: object + total_pages: + title: Total pages + type: integer + current_page: + title: Current page + type: integer + count: + title: Count + type: integer + results: + items: + $ref: '#/components/schemas/ExecutionMetrics' + type: array + type: object + SDKSimulationMetricsResponse: + example: + result: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + chat_metrics: + key: "" + latency: + key: "" + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: + key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + conversation: + key: "" + current_page: 2 + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKSimulationMetricsResult' + required: + - result + - status + type: object + ExecutionRuns: + example: + completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + properties: + execution_id: + format: uuid + title: Execution id + type: string + status: + description: Current status of the test execution + enum: + - pending + - running + - completed + - failed + - cancelled + - cancelling + - evaluating + readOnly: true + title: Status + type: string + started_at: + description: When the test execution started + format: date-time + readOnly: true + title: Started at + type: string + completed_at: + description: When the test execution completed + format: date-time + nullable: true + readOnly: true + title: Completed at + type: string + total_calls: + description: Total number of calls to be made + readOnly: true + title: Total calls + type: integer + completed_calls: + description: Number of successfully completed calls + readOnly: true + title: Completed calls + type: integer + failed_calls: + description: Number of failed calls + readOnly: true + title: Failed calls + type: integer + eval_results: + readOnly: true + title: Eval results + type: string + required: + - execution_id + type: object + SDKSimulationRunsResult: + example: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + call_results: + key: "" + latency: + key: "" + scenario_name: scenario_name + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_summary: call_summary + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + eval_explanation_summary: + key: "" + started_at: 2000-01-23T04:56:07.000+00:00 + eval_outputs: + key: "" + eval_results: + - key: "" + - key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + current_page: 2 + status: status + ended_reason: ended_reason + properties: + call_execution_id: + format: uuid + title: Call execution id + type: string + execution_id: + format: uuid + title: Execution id + type: string + scenario_id: + format: uuid + title: Scenario id + type: string + scenario_name: + title: Scenario name + type: string + status: + minLength: 1 + title: Status + type: string + started_at: + format: date-time + nullable: true + title: Started at + type: string + completed_at: + format: date-time + nullable: true + title: Completed at + type: string + duration_seconds: + nullable: true + title: Duration seconds + type: number + ended_reason: + nullable: true + title: Ended reason + type: string + call_summary: + nullable: true + title: Call summary + type: string + total_calls: + title: Total calls + type: integer + completed_calls: + title: Completed calls + type: integer + failed_calls: + title: Failed calls + type: integer + eval_outputs: + additionalProperties: true + title: Eval outputs + type: object + eval_results: + items: + additionalProperties: true + type: object + type: array + latency: + additionalProperties: true + title: Latency + type: object + cost: + additionalProperties: true + title: Cost + type: object + call_results: + additionalProperties: true + title: Call results + type: object + eval_explanation_summary: + additionalProperties: true + title: Eval explanation summary + type: object + eval_explanation_summary_status: + nullable: true + title: Eval explanation summary status + type: string + total_pages: + title: Total pages + type: integer + current_page: + title: Current page + type: integer + count: + title: Count + type: integer + results: + items: + $ref: '#/components/schemas/ExecutionRuns' + type: array + type: object + SDKSimulationRunsResponse: + example: + result: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + call_results: + key: "" + latency: + key: "" + scenario_name: scenario_name + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_summary: call_summary + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + eval_explanation_summary: + key: "" + started_at: 2000-01-23T04:56:07.000+00:00 + eval_outputs: + key: "" + eval_results: + - key: "" + - key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + current_page: 2 + status: status + ended_reason: ended_reason + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKSimulationRunsResult' + required: + - result + - status + type: object + AgentDefinitionListResponse: + example: + websocket_headers: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + languages: + - ar + - ar + inbound: true + latest_version_id: latest_version_id + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + contact_number: contact_number + agent_type: voice + updated_at: 2000-01-23T04:56:07.000+00:00 + latest_version: latest_version + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + agent_name: + description: Name of the AI agent + minLength: 1 + readOnly: true + title: Agent name + type: string + agent_type: + enum: + - voice + - text + readOnly: true + title: Agent type + type: string + contact_number: + description: Phone number associated with the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Contact number + type: string + inbound: + description: Whether the agent handles inbound calls + readOnly: true + title: Inbound + type: boolean + description: + description: Detailed description of the AI agent's purpose and capabilities + minLength: 1 + readOnly: true + title: Description + type: string + assistant_id: + description: External identifier for the assistant + minLength: 1 + nullable: true + readOnly: true + title: Assistant id + type: string + provider: + description: Provider of the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Provider + type: string + language: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + nullable: true + readOnly: true + title: Language + type: string + languages: + items: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + title: Languages + type: string + nullable: true + readOnly: true + type: array + websocket_url: + description: WebSocket URL for real-time communication with the agent + format: uri + minLength: 1 + nullable: true + readOnly: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + description: Headers to be sent to the websocket server + readOnly: true + title: Websocket headers + type: object + workspace: + format: uuid + nullable: true + readOnly: true + title: Workspace + type: string + knowledge_base: + format: uuid + nullable: true + readOnly: true + title: Knowledge base + type: string + organization: + description: Organization this agent definition belongs to + format: uuid + readOnly: true + title: Organization + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + latest_version: + readOnly: true + title: Latest version + type: string + latest_version_id: + readOnly: true + title: Latest version id + type: string + model_details: + additionalProperties: true + description: Details of the model + readOnly: true + title: Model details + type: object + model: + description: Model of the agent + minLength: 1 + nullable: true + readOnly: true + title: Model + type: string + type: object + ApiErrorWithDetailsResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + AgentDefinitionBulkDeleteRequest: + example: + agent_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + agent_ids: + description: List of agent definition UUIDs to delete. + items: + format: uuid + type: string + minItems: 1 + type: array + required: + - agent_ids + type: object + AgentDefinitionBulkDeleteResponse: + example: + versions_updated: 6 + message: message + agents_updated: 0 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agents_updated: + readOnly: true + title: Agents updated + type: integer + versions_updated: + readOnly: true + title: Versions updated + type: integer + type: object + AgentDefinitionCreateRequest: + example: + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: "" + language: language + commit_message: commit_message + model_details: + key: "" + authentication_method: api_key + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - languages + - languages + observability_enabled: false + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: 1 + api_key: api_key + replay_session_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_secret: livekit_api_secret + livekit_api_key: livekit_api_key + livekit_config_json: + key: "" + properties: + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_type: + description: "The type of agent. One of: voice, text." + enum: + - voice + - text + title: Agent type + type: string + commit_message: + minLength: 1 + title: Commit message + type: string + inbound: + default: true + title: Inbound + type: boolean + description: + default: "" + title: Description + type: string + provider: + nullable: true + title: Provider + type: string + api_key: + nullable: true + title: Api key + type: string + assistant_id: + nullable: true + title: Assistant id + type: string + authentication_method: + enum: + - api_key + nullable: true + title: Authentication method + type: string + language: + nullable: true + title: Language + type: string + languages: + items: + minLength: 1 + type: string + nullable: true + type: array + contact_number: + nullable: true + title: Contact number + type: string + knowledge_base: + format: uuid + nullable: true + title: Knowledge base + type: string + observability_enabled: + default: false + title: Observability enabled + type: boolean + model: + nullable: true + title: Model + type: string + model_details: + additionalProperties: true + title: Model details + type: object + websocket_url: + format: uri + nullable: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + title: Websocket headers + type: object + replay_session_id: + format: uuid + nullable: true + title: Replay session id + type: string + livekit_url: + maxLength: 500 + nullable: true + title: Livekit url + type: string + livekit_api_key: + nullable: true + title: Livekit api key + type: string + livekit_api_secret: + nullable: true + title: Livekit api secret + type: string + livekit_agent_name: + nullable: true + title: Livekit agent name + type: string + livekit_config_json: + additionalProperties: true + title: Livekit config json + type: object + livekit_max_concurrency: + minimum: 1 + nullable: true + title: Livekit max concurrency + type: integer + required: + - agent_name + - agent_type + - commit_message + type: object + AgentDefinitionResponse: + example: + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + authentication_method: api_key + updated_at: 2000-01-23T04:56:07.000+00:00 + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - ar + - ar + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: livekit_max_concurrency + api_key: api_key + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + observability_provider: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_key: livekit_api_key + livekit_config_json: livekit_config_json + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + agent_name: + description: Name of the AI agent + minLength: 1 + readOnly: true + title: Agent name + type: string + agent_type: + enum: + - voice + - text + readOnly: true + title: Agent type + type: string + contact_number: + description: Phone number associated with the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Contact number + type: string + inbound: + description: Whether the agent handles inbound calls + readOnly: true + title: Inbound + type: boolean + description: + description: Detailed description of the AI agent's purpose and capabilities + minLength: 1 + readOnly: true + title: Description + type: string + assistant_id: + description: External identifier for the assistant + minLength: 1 + nullable: true + readOnly: true + title: Assistant id + type: string + provider: + description: Provider of the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Provider + type: string + language: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + nullable: true + readOnly: true + title: Language + type: string + languages: + items: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + title: Languages + type: string + nullable: true + readOnly: true + type: array + authentication_method: + enum: + - api_key + nullable: true + readOnly: true + title: Authentication method + type: string + websocket_url: + description: WebSocket URL for real-time communication with the agent + format: uri + minLength: 1 + nullable: true + readOnly: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + description: Headers to be sent to the websocket server + readOnly: true + title: Websocket headers + type: object + workspace: + format: uuid + nullable: true + readOnly: true + title: Workspace + type: string + knowledge_base: + format: uuid + nullable: true + readOnly: true + title: Knowledge base + type: string + organization: + description: Organization this agent definition belongs to + format: uuid + readOnly: true + title: Organization + type: string + api_key: + description: API key for the agent + minLength: 1 + nullable: true + readOnly: true + title: Api key + type: string + observability_provider: + format: uuid + nullable: true + readOnly: true + title: Observability provider + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + model: + description: Model of the agent + minLength: 1 + nullable: true + readOnly: true + title: Model + type: string + model_details: + additionalProperties: true + description: Details of the model + readOnly: true + title: Model details + type: object + livekit_url: + readOnly: true + title: Livekit url + type: string + livekit_api_key: + readOnly: true + title: Livekit api key + type: string + livekit_agent_name: + readOnly: true + title: Livekit agent name + type: string + livekit_config_json: + readOnly: true + title: Livekit config json + type: string + livekit_max_concurrency: + readOnly: true + title: Livekit max concurrency + type: string + type: object + AgentDefinitionCreateResponse: + example: + agent: + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + authentication_method: api_key + updated_at: 2000-01-23T04:56:07.000+00:00 + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - ar + - ar + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: livekit_max_concurrency + api_key: api_key + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + observability_provider: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_key: livekit_api_key + livekit_config_json: livekit_config_json + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agent: + $ref: '#/components/schemas/AgentDefinitionResponse' + type: object + AgentDefinitionDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + AgentDefinitionEditRequest: + example: + websocket_headers: + key: "" + assistant_id: assistant_id + agent_name: agent_name + languages: + - languages + - languages + inbound: true + description: description + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + language: language + model_details: + key: "" + contact_number: contact_number + agent_type: voice + authentication_method: api_key + livekit_max_concurrency: 1 + provider: provider + api_key: api_key + livekit_api_secret: livekit_api_secret + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + websocket_url: https://openapi-generator.tech + livekit_api_key: livekit_api_key + livekit_config_json: + key: "" + properties: + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_type: + enum: + - voice + - text + title: Agent type + type: string + description: + nullable: true + title: Description + type: string + provider: + nullable: true + title: Provider + type: string + api_key: + nullable: true + title: Api key + type: string + assistant_id: + nullable: true + title: Assistant id + type: string + authentication_method: + enum: + - api_key + nullable: true + title: Authentication method + type: string + language: + nullable: true + title: Language + type: string + languages: + items: + minLength: 1 + type: string + nullable: true + type: array + contact_number: + nullable: true + title: Contact number + type: string + inbound: + title: Inbound + type: boolean + knowledge_base: + format: uuid + nullable: true + title: Knowledge base + type: string + model: + nullable: true + title: Model + type: string + model_details: + additionalProperties: true + title: Model details + type: object + websocket_url: + format: uri + nullable: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + title: Websocket headers + type: object + livekit_url: + maxLength: 500 + nullable: true + title: Livekit url + type: string + livekit_api_key: + nullable: true + title: Livekit api key + type: string + livekit_api_secret: + nullable: true + title: Livekit api secret + type: string + livekit_agent_name: + nullable: true + title: Livekit agent name + type: string + livekit_config_json: + additionalProperties: true + title: Livekit config json + type: object + livekit_max_concurrency: + minimum: 1 + nullable: true + title: Livekit max concurrency + type: integer + type: object + AgentDefinitionEditResponse: + example: + agent: + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + authentication_method: api_key + updated_at: 2000-01-23T04:56:07.000+00:00 + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - ar + - ar + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: livekit_max_concurrency + api_key: api_key + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + observability_provider: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_key: livekit_api_key + livekit_config_json: livekit_config_json + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agent: + $ref: '#/components/schemas/AgentDefinitionResponse' + type: object + AgentVersionListResponse: + example: + status_display: status_display + is_active: is_active + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + score: score + pass_rate: pass_rate + version_name: version_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + version_number: + description: Version number of the agent + readOnly: true + title: Version number + type: integer + version_name: + description: "Human-readable version name (e.g., 'v1.2.3')" + minLength: 1 + nullable: true + readOnly: true + title: Version name + type: string + version_name_display: + readOnly: true + title: Version name display + type: string + status: + description: Current status of this version + enum: + - draft + - active + - archived + - deprecated + readOnly: true + title: Status + type: string + status_display: + minLength: 1 + readOnly: true + title: Status display + type: string + score: + description: Performance score (0.0 to 10.0) + format: decimal + nullable: true + readOnly: true + title: Score + type: string + test_count: + description: Number of tests run for this version + readOnly: true + title: Test count + type: integer + pass_rate: + description: Test pass rate percentage + format: decimal + nullable: true + readOnly: true + title: Pass rate + type: string + description: + description: Description of changes in this version + minLength: 1 + readOnly: true + title: Description + type: string + commit_message: + description: Commit message for the agent version + minLength: 1 + nullable: true + readOnly: true + title: Commit message + type: string + is_active: + readOnly: true + title: Is active + type: string + is_latest: + readOnly: true + title: Is latest + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + type: object + AgentVersionCreateRequest: + example: + assistant_id: assistant_id + agent_name: agent_name + languages: + - languages + - languages + inbound: true + observability_enabled: false + description: description + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + language: language + model_details: + key: "" + commit_message: "" + contact_number: contact_number + agent_type: voice + authentication_method: api_key + livekit_max_concurrency: 1 + provider: provider + api_key: api_key + livekit_api_secret: livekit_api_secret + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + livekit_api_key: livekit_api_key + livekit_config_json: + key: "" + properties: + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_type: + enum: + - voice + - text + title: Agent type + type: string + description: + nullable: true + title: Description + type: string + provider: + nullable: true + title: Provider + type: string + api_key: + nullable: true + title: Api key + type: string + assistant_id: + nullable: true + title: Assistant id + type: string + authentication_method: + enum: + - api_key + nullable: true + title: Authentication method + type: string + language: + nullable: true + title: Language + type: string + languages: + items: + minLength: 1 + type: string + nullable: true + type: array + contact_number: + nullable: true + title: Contact number + type: string + inbound: + title: Inbound + type: boolean + knowledge_base: + format: uuid + nullable: true + title: Knowledge base + type: string + model: + nullable: true + title: Model + type: string + model_details: + additionalProperties: true + title: Model details + type: object + livekit_url: + maxLength: 500 + title: Livekit url + type: string + livekit_api_key: + maxLength: 255 + title: Livekit api key + type: string + livekit_api_secret: + maxLength: 500 + title: Livekit api secret + type: string + livekit_agent_name: + maxLength: 255 + title: Livekit agent name + type: string + livekit_config_json: + additionalProperties: true + title: Livekit config json + type: object + livekit_max_concurrency: + minimum: 1 + title: Livekit max concurrency + type: integer + commit_message: + default: "" + title: Commit message + type: string + observability_enabled: + default: false + title: Observability enabled + type: boolean + type: object + AgentVersionResponse: + example: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + version_number: + description: Version number of the agent + readOnly: true + title: Version number + type: integer + version_name: + description: "Human-readable version name (e.g., 'v1.2.3')" + minLength: 1 + nullable: true + readOnly: true + title: Version name + type: string + version_name_display: + readOnly: true + title: Version name display + type: string + status: + description: Current status of this version + enum: + - draft + - active + - archived + - deprecated + readOnly: true + title: Status + type: string + status_display: + minLength: 1 + readOnly: true + title: Status display + type: string + score: + description: Performance score (0.0 to 10.0) + format: decimal + nullable: true + readOnly: true + title: Score + type: string + test_count: + description: Number of tests run for this version + readOnly: true + title: Test count + type: integer + pass_rate: + description: Test pass rate percentage + format: decimal + nullable: true + readOnly: true + title: Pass rate + type: string + description: + description: Description of changes in this version + minLength: 1 + readOnly: true + title: Description + type: string + commit_message: + description: Commit message for the agent version + minLength: 1 + nullable: true + readOnly: true + title: Commit message + type: string + release_notes: + description: Detailed release notes for this version + minLength: 1 + nullable: true + readOnly: true + title: Release notes + type: string + agent_definition: + description: Parent agent definition + format: uuid + readOnly: true + title: Agent definition + type: string + organization: + description: Organization this version belongs to + format: uuid + readOnly: true + title: Organization + type: string + configuration_snapshot: + additionalProperties: true + description: Snapshot of agent configuration at this version + readOnly: true + title: Configuration snapshot + type: object + is_active: + readOnly: true + title: Is active + type: string + is_latest: + readOnly: true + title: Is latest + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + type: object + AgentVersionCreateResponse: + example: + message: message + version: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + version: + $ref: '#/components/schemas/AgentVersionResponse' + type: object + AgentVersionActivateResponse: + example: + message: message + version: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + version: + $ref: '#/components/schemas/AgentVersionResponse' + type: object + CallExecution: + example: + evaluation_data: + key: "" + recording_url: https://openapi-generator.tech + assistant_id: assistant_id + customer_number: customer_number + cost_breakdown: cost_breakdown + scenario_name: scenario_name + created_at: 2000-01-23T04:56:07.000+00:00 + stt_cost_cents: -1517921766 + llm_cost_cents: 413233370 + call_summary: call_summary + system_metrics: system_metrics + cost_cents: 441289069 + provider_call_data: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + customer_cost_cents: -594390510 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + response_time_ms: 885365090 + call_type: call_type + ended_reason: ended_reason + analysis_data: + key: "" + duration_seconds: -1803530559 + error_message: error_message + stereo_recording_url: https://openapi-generator.tech + processing_skip_reason: processing_skip_reason + transcripts: transcripts + error_localizer_tasks: error_localizer_tasks + processing_skipped: processing_skipped + response_time_seconds: response_time_seconds + message_count: 1847456234 + overall_score: 2.3021358869347655 + tts_cost_cents: 273751188 + completed_at: 2000-01-23T04:56:07.000+00:00 + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_call_type: voice + call_metadata: + key: "" + recording_available: true + service_provider_call_id: service_provider_call_id + transcript_available: true + customer_call_id: customer_call_id + started_at: 2000-01-23T04:56:07.000+00:00 + phone_number: phone_number + eval_outputs: + key: "" + ended_at: 2000-01-23T04:56:07.000+00:00 + status: pending + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + phone_number: + description: Phone number called (null for TEXT/chat simulations) + maxLength: 20 + nullable: true + title: Phone number + type: string + service_provider_call_id: + minLength: 1 + readOnly: true + title: Service provider call id + type: string + status: + description: Current status of the call + enum: + - pending + - queued + - ongoing + - completed + - failed + - analyzing + - cancelled + title: Status + type: string + started_at: + description: When the call started + format: date-time + nullable: true + title: Started at + type: string + completed_at: + description: When the call completed + format: date-time + nullable: true + title: Completed at + type: string + duration_seconds: + description: Duration of the call in seconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Duration seconds + type: integer + recording_url: + description: URL to the call recording + format: uri + maxLength: 500 + nullable: true + title: Recording url + type: string + cost_cents: + description: Cost of the call in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Cost cents + type: integer + call_metadata: + additionalProperties: true + description: Additional metadata about the call + title: Call metadata + type: object + error_message: + description: Error message if the call failed + nullable: true + title: Error message + type: string + scenario_name: + minLength: 1 + readOnly: true + title: Scenario name + type: string + transcripts: + readOnly: true + title: Transcripts + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + provider_call_data: + additionalProperties: true + description: "Complete call data from the provider. Format: dict[provider_name,\ + \ data] where provider_name must be from SupportedProviders" + title: Provider call data + type: object + stereo_recording_url: + description: Stereo recording URL from Vapi + format: uri + maxLength: 500 + nullable: true + title: Stereo recording url + type: string + ended_reason: + description: Reason why the call ended + maxLength: 10000 + nullable: true + title: Ended reason + type: string + stt_cost_cents: + description: STT cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Stt cost cents + type: integer + llm_cost_cents: + description: LLM cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Llm cost cents + type: integer + tts_cost_cents: + description: TTS cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Tts cost cents + type: integer + overall_score: + description: Overall call performance score + nullable: true + title: Overall score + type: number + response_time_ms: + description: Average response time in milliseconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Response time ms + type: integer + response_time_seconds: + readOnly: true + title: Response time seconds + type: string + assistant_id: + description: Assistant ID used for the call (system side) + maxLength: 255 + nullable: true + title: Assistant id + type: string + customer_number: + description: Customer phone number (E.164 format) + maxLength: 20 + nullable: true + title: Customer number + type: string + call_type: + description: "Type of call (e.g., outboundPhoneCall)" + maxLength: 50 + nullable: true + title: Call type + type: string + ended_at: + description: When the call ended + format: date-time + nullable: true + title: Ended at + type: string + analysis_data: + additionalProperties: true + description: Call analysis data from the service provider + title: Analysis data + type: object + evaluation_data: + additionalProperties: true + description: Call evaluation data from the service provider + title: Evaluation data + type: object + message_count: + description: Number of messages in the call + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Message count + type: integer + transcript_available: + description: Whether transcript is available + title: Transcript available + type: boolean + recording_available: + description: Whether recording is available + title: Recording available + type: boolean + eval_outputs: + additionalProperties: true + description: Evaluation output + title: Eval outputs + type: object + error_localizer_tasks: + readOnly: true + title: Error localizer tasks + type: string + call_summary: + description: Call summary from the service + nullable: true + title: Call summary + type: string + agent_version: + format: uuid + nullable: true + title: Agent version + type: string + customer_cost_cents: + description: Total customer-reported cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Customer cost cents + type: integer + system_metrics: + readOnly: true + title: System metrics + type: string + cost_breakdown: + readOnly: true + title: Cost breakdown + type: string + customer_call_id: + description: Customer call ID if available + maxLength: 255 + nullable: true + title: Customer call id + type: string + simulation_call_type: + description: Type of simulation call + enum: + - voice + - text + title: Simulation call type + type: string + processing_skipped: + readOnly: true + title: Processing skipped + type: string + processing_skip_reason: + readOnly: true + title: Processing skip reason + type: string + type: object + AgentVersionDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + EvalTemplateSummary: + example: + output: + key: "" + name: name + id: id + total_cells: 0 + properties: + name: + minLength: 1 + title: Name + type: string + id: + minLength: 1 + title: Id + type: string + total_cells: + title: Total cells + type: integer + output: + additionalProperties: true + title: Output + type: object + required: + - id + - name + - output + - total_cells + type: object + EvalSummaryResponse: + example: + result: + - output: + key: "" + name: name + id: id + total_cells: 0 + - output: + key: "" + name: name + id: id + total_cells: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/EvalTemplateSummary' + type: array + required: + - result + type: object + EvalErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + AgentVersionRestoreResponse: + example: + agent: + key: agent + message: message + version: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agent: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Agent + type: object + version: + $ref: '#/components/schemas/AgentVersionResponse' + type: object + CallExecutionErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + PersonaList: + example: + persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: simulation_type + multilingual: true + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + persona_type: + description: Type of persona (system or workspace-level) + enum: + - system + - workspace + readOnly: true + title: Persona type + type: string + persona_type_display: + minLength: 1 + readOnly: true + title: Persona type display + type: string + name: + description: Name of the persona + minLength: 1 + readOnly: true + title: Name + type: string + description: + description: Description of the persona + minLength: 1 + nullable: true + readOnly: true + title: Description + type: string + gender: + additionalProperties: true + description: "List of genders for the persona (e.g., ['male'], ['female'])" + readOnly: true + title: Gender + type: object + age_group: + additionalProperties: true + description: "List of age groups for the persona (e.g., ['18-25'], ['25-32'])" + readOnly: true + title: Age group + type: object + occupation: + additionalProperties: true + description: "List of occupations/professions for the persona (e.g., ['Engineer'],\ + \ ['Teacher'])" + readOnly: true + title: Occupation + type: object + location: + additionalProperties: true + description: "List of locations for the persona (e.g., ['United States'],\ + \ ['Canada'])" + readOnly: true + title: Location + type: object + personality: + additionalProperties: true + description: "List of personality types for the persona (e.g., ['Friendly\ + \ and cooperative'])" + readOnly: true + title: Personality + type: object + communication_style: + additionalProperties: true + description: "List of communication styles for the persona (e.g., ['Direct\ + \ and concise'])" + readOnly: true + title: Communication style + type: object + multilingual: + description: Whether the persona supports multiple languages + nullable: true + readOnly: true + title: Multilingual + type: boolean + languages: + additionalProperties: true + description: "List of languages the persona speaks (e.g., ['English', 'Hindi'])" + readOnly: true + title: Languages + type: object + accent: + additionalProperties: true + description: "List of accents for the persona (e.g., ['American'], ['Australian'])" + readOnly: true + title: Accent + type: object + conversation_speed: + additionalProperties: true + description: "List of conversation speeds (e.g., ['1.0'], ['1.25'])" + readOnly: true + title: Conversation speed + type: object + background_sound: + description: "Whether background sound is enabled (null=not specified, True/False\ + \ for enabled/disabled)" + nullable: true + readOnly: true + title: Background sound + type: boolean + finished_speaking_sensitivity: + additionalProperties: true + description: "List of sensitivities for detecting when persona finished\ + \ speaking (e.g., ['5'], ['6'])" + readOnly: true + title: Finished speaking sensitivity + type: object + interrupt_sensitivity: + additionalProperties: true + description: "List of sensitivities for allowing interruptions (e.g., ['5'],\ + \ ['6'])" + readOnly: true + title: Interrupt sensitivity + type: object + keywords: + additionalProperties: true + description: "List of keywords/tags describing the persona (e.g., ['Knowledgeable',\ + \ 'Patient', 'Helpful'])" + readOnly: true + title: Keywords + type: object + metadata: + additionalProperties: true + description: "Additional metadata for the persona (speech clarity, base\ + \ emotion, etc.)" + readOnly: true + title: Metadata + type: object + additional_instruction: + description: Additional instructions for how this persona should behave + minLength: 1 + nullable: true + readOnly: true + title: Additional instruction + type: string + is_default: + description: Whether this is a default/recommended persona + nullable: true + readOnly: true + title: Is default + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + simulation_type: + readOnly: true + title: Simulation type + type: string + punctuation: + description: Punctuation style for the persona + enum: + - clean + - minimal + - expressive + - erratic + nullable: true + readOnly: true + title: Punctuation + type: string + slang_usage: + description: Slang usage for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + readOnly: true + title: Slang usage + type: string + typos_frequency: + description: Typos frequency for the persona + enum: + - none + - rare + - occasional + - frequent + nullable: true + readOnly: true + title: Typos frequency + type: string + regional_mix: + description: Regional mix for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + readOnly: true + title: Regional mix + type: string + emoji_usage: + description: Emoji usage for the persona + enum: + - never + - light + - regular + - heavy + nullable: true + readOnly: true + title: Emoji usage + type: string + tone: + description: Tone for the persona + enum: + - formal + - casual + - neutral + nullable: true + readOnly: true + title: Tone + type: string + verbosity: + description: Verbosity for the persona + enum: + - brief + - balanced + - detailed + nullable: true + readOnly: true + title: Verbosity + type: string + type: object + PersonaCreate: + example: + gender: + - gender + - gender + keywords: + - keywords + - keywords + tone: casual + description: description + language: + - language + - language + custom_properties: + key: "" + slang_usage: light + personality: + - personality + - personality + regional_mix: light + communication_style: + - communication_style + - communication_style + simulation_type: voice + multilingual: false + profession: + - profession + - profession + interrupt_sensitivity: + - interrupt_sensitivity + - interrupt_sensitivity + age_group: + - age_group + - age_group + typos_frequency: rare + accent: + - accent + - accent + emoji_usage: light + conversation_speed: + - conversation_speed + - conversation_speed + background_sound: true + name: name + punctuation: clean + location: + - location + - location + finished_speaking_sensitivity: + - finished_speaking_sensitivity + - finished_speaking_sensitivity + additional_instruction: "" + verbosity: balanced + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + minLength: 1 + title: Description + type: string + gender: + items: + minLength: 1 + type: string + nullable: true + type: array + age_group: + items: + minLength: 1 + type: string + nullable: true + type: array + location: + items: + minLength: 1 + type: string + nullable: true + type: array + profession: + items: + minLength: 1 + type: string + nullable: true + type: array + personality: + items: + minLength: 1 + type: string + nullable: true + type: array + communication_style: + items: + minLength: 1 + type: string + nullable: true + type: array + accent: + items: + minLength: 1 + type: string + nullable: true + type: array + multilingual: + default: false + title: Multilingual + type: boolean + language: + items: + minLength: 1 + type: string + nullable: true + type: array + conversation_speed: + items: + minLength: 1 + type: string + nullable: true + type: array + background_sound: + nullable: true + title: Background sound + type: boolean + finished_speaking_sensitivity: + items: + minLength: 1 + type: string + nullable: true + type: array + interrupt_sensitivity: + items: + minLength: 1 + type: string + nullable: true + type: array + keywords: + items: + minLength: 1 + type: string + nullable: true + type: array + custom_properties: + additionalProperties: true + title: Custom properties + type: object + additional_instruction: + default: "" + nullable: true + title: Additional instruction + type: string + simulation_type: + default: voice + nullable: true + title: Simulation type + type: string + tone: + default: casual + nullable: true + title: Tone + type: string + punctuation: + default: clean + nullable: true + title: Punctuation + type: string + slang_usage: + default: light + nullable: true + title: Slang usage + type: string + typos_frequency: + default: rare + nullable: true + title: Typos frequency + type: string + regional_mix: + default: light + nullable: true + title: Regional mix + type: string + emoji_usage: + default: light + nullable: true + title: Emoji usage + type: string + verbosity: + default: balanced + nullable: true + title: Verbosity + type: string + required: + - description + - name + type: object + PersonaDuplicateRequest: + example: + name: name + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + required: + - name + type: object + Persona: + example: + persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + persona_type: + description: Type of persona (system or workspace-level) + enum: + - system + - workspace + readOnly: true + title: Persona type + type: string + persona_type_display: + minLength: 1 + readOnly: true + title: Persona type display + type: string + name: + description: Name of the persona + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + description: Description of the persona + nullable: true + title: Description + type: string + gender: + additionalProperties: true + description: "List of genders for the persona (e.g., ['male'], ['female'])" + title: Gender + type: object + age_group: + additionalProperties: true + description: "List of age groups for the persona (e.g., ['18-25'], ['25-32'])" + title: Age group + type: object + occupation: + additionalProperties: true + description: "List of occupations/professions for the persona (e.g., ['Engineer'],\ + \ ['Teacher'])" + title: Occupation + type: object + location: + additionalProperties: true + description: "List of locations for the persona (e.g., ['United States'],\ + \ ['Canada'])" + title: Location + type: object + personality: + additionalProperties: true + description: "List of personality types for the persona (e.g., ['Friendly\ + \ and cooperative'])" + title: Personality + type: object + communication_style: + additionalProperties: true + description: "List of communication styles for the persona (e.g., ['Direct\ + \ and concise'])" + title: Communication style + type: object + multilingual: + description: Whether the persona supports multiple languages + nullable: true + title: Multilingual + type: boolean + languages: + additionalProperties: true + description: "List of languages the persona speaks (e.g., ['English', 'Hindi'])" + title: Languages + type: object + accent: + additionalProperties: true + description: "List of accents for the persona (e.g., ['American'], ['Australian'])" + title: Accent + type: object + conversation_speed: + additionalProperties: true + description: "List of conversation speeds (e.g., ['1.0'], ['1.25'])" + title: Conversation speed + type: object + background_sound: + description: "Whether background sound is enabled (null=not specified, True/False\ + \ for enabled/disabled)" + nullable: true + title: Background sound + type: boolean + finished_speaking_sensitivity: + additionalProperties: true + description: "List of sensitivities for detecting when persona finished\ + \ speaking (e.g., ['5'], ['6'])" + title: Finished speaking sensitivity + type: object + interrupt_sensitivity: + additionalProperties: true + description: "List of sensitivities for allowing interruptions (e.g., ['5'],\ + \ ['6'])" + title: Interrupt sensitivity + type: object + keywords: + additionalProperties: true + description: "List of keywords/tags describing the persona (e.g., ['Knowledgeable',\ + \ 'Patient', 'Helpful'])" + title: Keywords + type: object + metadata: + additionalProperties: true + description: "Additional metadata for the persona (speech clarity, base\ + \ emotion, etc.)" + title: Metadata + type: object + additional_instruction: + description: Additional instructions for how this persona should behave + nullable: true + title: Additional instruction + type: string + is_default: + description: Whether this is a default/recommended persona + nullable: true + readOnly: true + title: Is default + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + profession: + items: + minLength: 1 + type: string + nullable: true + type: array + language: + items: + minLength: 1 + type: string + nullable: true + type: array + custom_properties: + additionalProperties: true + title: Custom properties + type: object + simulation_type: + description: Type of simulation for the persona + enum: + - voice + - text + readOnly: true + title: Simulation type + type: string + punctuation: + description: Punctuation style for the persona + enum: + - clean + - minimal + - expressive + - erratic + nullable: true + title: Punctuation + type: string + slang_usage: + description: Slang usage for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + title: Slang usage + type: string + typos_frequency: + description: Typos frequency for the persona + enum: + - none + - rare + - occasional + - frequent + nullable: true + title: Typos frequency + type: string + regional_mix: + description: Regional mix for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + title: Regional mix + type: string + emoji_usage: + description: Emoji usage for the persona + enum: + - never + - light + - regular + - heavy + nullable: true + title: Emoji usage + type: string + tone: + description: Tone for the persona + enum: + - formal + - casual + - neutral + nullable: true + title: Tone + type: string + verbosity: + description: Verbosity for the persona + enum: + - brief + - balanced + - detailed + nullable: true + title: Verbosity + type: string + required: + - name + type: object + PersonaDuplicateResponse: + example: + result: + persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/Persona' + type: object + PersonaFieldOptions: + example: + slang_usage_choices: slang_usage_choices + communication_style_choices: communication_style_choices + verbosity_choices: verbosity_choices + location_choices: location_choices + emoji_usage_choices: emoji_usage_choices + accent_choices: accent_choices + tone_choices: tone_choices + regional_mix_choices: regional_mix_choices + profession_choices: profession_choices + personality_choices: personality_choices + language_choices: language_choices + typos_frequency_choices: typos_frequency_choices + age_group_choices: age_group_choices + punctuation_choices: punctuation_choices + gender_choices: gender_choices + conversation_speed_choices: conversation_speed_choices + properties: + gender_choices: + readOnly: true + title: Gender choices + type: string + age_group_choices: + readOnly: true + title: Age group choices + type: string + location_choices: + readOnly: true + title: Location choices + type: string + profession_choices: + readOnly: true + title: Profession choices + type: string + personality_choices: + readOnly: true + title: Personality choices + type: string + communication_style_choices: + readOnly: true + title: Communication style choices + type: string + accent_choices: + readOnly: true + title: Accent choices + type: string + language_choices: + readOnly: true + title: Language choices + type: string + conversation_speed_choices: + readOnly: true + title: Conversation speed choices + type: string + tone_choices: + readOnly: true + title: Tone choices + type: string + verbosity_choices: + readOnly: true + title: Verbosity choices + type: string + punctuation_choices: + readOnly: true + title: Punctuation choices + type: string + emoji_usage_choices: + readOnly: true + title: Emoji usage choices + type: string + slang_usage_choices: + readOnly: true + title: Slang usage choices + type: string + typos_frequency_choices: + readOnly: true + title: Typos frequency choices + type: string + regional_mix_choices: + readOnly: true + title: Regional mix choices + type: string + type: object + SimulateEvalConfigResponse: + example: + mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + nullable: true + readOnly: true + title: Name + type: string + config: + additionalProperties: true + readOnly: true + title: Config + type: object + mapping: + additionalProperties: true + readOnly: true + title: Mapping + type: object + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + readOnly: true + type: array + error_localizer: + readOnly: true + title: Error localizer + type: boolean + model: + minLength: 1 + nullable: true + readOnly: true + title: Model + type: string + status: + minLength: 1 + nullable: true + readOnly: true + title: Status + type: string + eval_group: + minLength: 1 + nullable: true + readOnly: true + title: Eval group + type: string + template_id: + format: uuid + nullable: true + readOnly: true + title: Template id + type: string + type: object + RunTestResponse: + example: + last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + description: Name of the test run + minLength: 1 + readOnly: true + title: Name + type: string + description: + description: Description of the test run + minLength: 1 + nullable: true + readOnly: true + title: Description + type: string + agent_definition: + description: Agent definition for this test run + format: uuid + nullable: true + readOnly: true + title: Agent definition + type: string + agent_version: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Agent version + type: object + agent_definition_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Agent definition detail + type: object + source_type: + description: "Source type for the test run: agent_definition or prompt" + enum: + - agent_definition + - prompt + readOnly: true + title: Source type + type: string + source_type_display: + minLength: 1 + nullable: true + readOnly: true + title: Source type display + type: string + prompt_template: + description: Prompt template for this test run (only for prompt source type) + format: uuid + nullable: true + readOnly: true + title: Prompt template + type: string + prompt_template_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Prompt template detail + type: object + prompt_version: + description: Prompt version for this test run (only for prompt source type) + format: uuid + nullable: true + readOnly: true + title: Prompt version + type: string + prompt_version_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Prompt version detail + type: object + scenarios: + description: Scenarios to run in this test + items: + description: Scenarios to run in this test + format: uuid + type: string + readOnly: true + type: array + uniqueItems: true + scenarios_detail: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + dataset_row_ids: + description: IDs of dataset rows to run evaluations on + items: + maxLength: 255 + minLength: 1 + title: Dataset row ids + type: string + readOnly: true + type: array + simulator_agent: + description: Simulator agent for this test run (derived from scenarios) + format: uuid + nullable: true + readOnly: true + title: Simulator agent + type: string + simulator_agent_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Simulator agent detail + type: object + simulate_eval_configs: + items: + format: uuid + type: string + readOnly: true + type: array + uniqueItems: true + simulate_eval_configs_detail: + items: + $ref: '#/components/schemas/SimulateEvalConfigResponse' + readOnly: true + type: array + evals_detail: + items: + $ref: '#/components/schemas/SimulateEvalConfigResponse' + readOnly: true + type: array + organization: + description: Organization this test run belongs to + format: uuid + readOnly: true + title: Organization + type: string + enable_tool_evaluation: + description: Enable automatic tool evaluation for this test run + readOnly: true + title: Enable tool evaluation + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + last_run_at: + format: date-time + nullable: true + readOnly: true + title: Last run at + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + type: object + RunTestErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + TestExecution: + example: + completed_calls: -1517921766 + duration_seconds: duration_seconds + total_scenarios: -1803530559 + run_test: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + failed_calls: 413233370 + agent_definition_used_name: agent_definition_used_name + scenario_ids: + key: "" + agent_definition_used_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition_name: agent_definition_name + created_at: 2000-01-23T04:56:07.000+00:00 + simulator_agent_name: simulator_agent_name + execution_metadata: + key: "" + run_test_name: run_test_name + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 441289069 + simulator_agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_reason: error_reason + calls_attempted: calls_attempted + calls_connected_percentage: calls_connected_percentage + calls: + - evaluation_data: + key: "" + recording_url: https://openapi-generator.tech + assistant_id: assistant_id + customer_number: customer_number + cost_breakdown: cost_breakdown + scenario_name: scenario_name + created_at: 2000-01-23T04:56:07.000+00:00 + stt_cost_cents: -1517921766 + llm_cost_cents: 413233370 + call_summary: call_summary + system_metrics: system_metrics + cost_cents: 441289069 + provider_call_data: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + customer_cost_cents: -594390510 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + response_time_ms: 885365090 + call_type: call_type + ended_reason: ended_reason + analysis_data: + key: "" + duration_seconds: -1803530559 + error_message: error_message + stereo_recording_url: https://openapi-generator.tech + processing_skip_reason: processing_skip_reason + transcripts: transcripts + error_localizer_tasks: error_localizer_tasks + processing_skipped: processing_skipped + response_time_seconds: response_time_seconds + message_count: 1847456234 + overall_score: 2.3021358869347655 + tts_cost_cents: 273751188 + completed_at: 2000-01-23T04:56:07.000+00:00 + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_call_type: voice + call_metadata: + key: "" + recording_available: true + service_provider_call_id: service_provider_call_id + transcript_available: true + customer_call_id: customer_call_id + started_at: 2000-01-23T04:56:07.000+00:00 + phone_number: phone_number + eval_outputs: + key: "" + ended_at: 2000-01-23T04:56:07.000+00:00 + status: pending + - evaluation_data: + key: "" + recording_url: https://openapi-generator.tech + assistant_id: assistant_id + customer_number: customer_number + cost_breakdown: cost_breakdown + scenario_name: scenario_name + created_at: 2000-01-23T04:56:07.000+00:00 + stt_cost_cents: -1517921766 + llm_cost_cents: 413233370 + call_summary: call_summary + system_metrics: system_metrics + cost_cents: 441289069 + provider_call_data: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + customer_cost_cents: -594390510 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + response_time_ms: 885365090 + call_type: call_type + ended_reason: ended_reason + analysis_data: + key: "" + duration_seconds: -1803530559 + error_message: error_message + stereo_recording_url: https://openapi-generator.tech + processing_skip_reason: processing_skip_reason + transcripts: transcripts + error_localizer_tasks: error_localizer_tasks + processing_skipped: processing_skipped + response_time_seconds: response_time_seconds + message_count: 1847456234 + overall_score: 2.3021358869347655 + tts_cost_cents: 273751188 + completed_at: 2000-01-23T04:56:07.000+00:00 + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_call_type: voice + call_metadata: + key: "" + recording_available: true + service_provider_call_id: service_provider_call_id + transcript_available: true + customer_call_id: customer_call_id + started_at: 2000-01-23T04:56:07.000+00:00 + phone_number: phone_number + eval_outputs: + key: "" + ended_at: 2000-01-23T04:56:07.000+00:00 + status: pending + started_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_rate: success_rate + status: pending + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + run_test: + description: The run test being executed + format: uuid + title: Run test + type: string + run_test_name: + minLength: 1 + readOnly: true + title: Run test name + type: string + agent_definition_name: + minLength: 1 + readOnly: true + title: Agent definition name + type: string + status: + description: Current status of the test execution + enum: + - pending + - running + - completed + - failed + - cancelled + - cancelling + - evaluating + title: Status + type: string + error_reason: + nullable: true + title: Error reason + type: string + started_at: + description: When the test execution started + format: date-time + title: Started at + type: string + completed_at: + description: When the test execution completed + format: date-time + nullable: true + title: Completed at + type: string + total_scenarios: + description: Total number of scenarios in this execution + maximum: 2147483647 + minimum: -2147483648 + title: Total scenarios + type: integer + total_calls: + description: Total number of calls to be made + maximum: 2147483647 + minimum: -2147483648 + title: Total calls + type: integer + completed_calls: + description: Number of successfully completed calls + maximum: 2147483647 + minimum: -2147483648 + title: Completed calls + type: integer + failed_calls: + description: Number of failed calls + maximum: 2147483647 + minimum: -2147483648 + title: Failed calls + type: integer + execution_metadata: + additionalProperties: true + description: Additional metadata about the execution + title: Execution metadata + type: object + duration_seconds: + readOnly: true + title: Duration seconds + type: string + success_rate: + readOnly: true + title: Success rate + type: string + calls: + items: + $ref: '#/components/schemas/CallExecution' + readOnly: true + type: array + created_at: + format: date-time + readOnly: true + title: Created at + type: string + scenario_ids: + additionalProperties: true + description: List of scenario IDs that were executed in this run + title: Scenario ids + type: object + simulator_agent_name: + minLength: 1 + readOnly: true + title: Simulator agent name + type: string + simulator_agent_id: + format: uuid + readOnly: true + title: Simulator agent id + type: string + agent_definition_used_name: + minLength: 1 + readOnly: true + title: Agent definition used name + type: string + agent_definition_used_id: + format: uuid + readOnly: true + title: Agent definition used id + type: string + calls_attempted: + readOnly: true + title: Calls attempted + type: string + calls_connected_percentage: + readOnly: true + title: Calls connected percentage + type: string + required: + - run_test + type: object + CallExecutionDetail: + example: + avg_stop_time_after_interruption: 7 + snapshot_timestamp: snapshot_timestamp + rerun_snapshots: rerun_snapshots + scenario_id: scenario_id + is_snapshot: is_snapshot + cost_cents: -1618552611 + ai_interruption_count: -1276840939 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_metrics: eval_metrics + original_call_execution_id: original_call_execution_id + csat_score: csat_score + bot_wpm: 9.301444243932576 + processing_skipped: processing_skipped + agent_talk_percentage: agent_talk_percentage + start_time: start_time + simulation_call_type: voice + service_provider_call_id: service_provider_call_id + avg_agent_latency_ms: 413233370 + audio_url: https://openapi-generator.tech + eval_outputs: eval_outputs + phone_number: phone_number + status: pending + agent_definition_used_name: agent_definition_used_name + talk_ratio: 3.616076749251911 + turn_count: turn_count + ai_interruption_rate: 4.145608029883936 + call_summary: call_summary + user_interruption_rate: 2.3021358869347655 + duration: duration + simulator_agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + transcript: transcript + scenario: scenario + provider: provider + customer_cost_breakdown: + key: "" + output_tokens: output_tokens + customer_cost_cents: -1707401670 + response_time_ms: 441289069 + call_type: call_type + timestamp: 2000-01-23T04:56:07.000+00:00 + ended_reason: ended_reason + duration_seconds: -1803530559 + scenario_columns: scenario_columns + processing_skip_reason: processing_skip_reason + user_wpm: 7.061401241503109 + agent_definition_used_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + session_id: session_id + tool_outputs: + key: "" + simulator_agent_name: simulator_agent_name + input_tokens: input_tokens + overall_score: overall_score + customer_latency_metrics: + key: "" + user_interruption_count: 273751188 + recordings: recordings + avg_agent_latency: 1 + customer_call_id: customer_call_id + total_tokens: total_tokens + rerun_type: rerun_type + response_time: response_time + avg_latency_ms: avg_latency_ms + customer_name: customer_name + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + service_provider_call_id: + minLength: 1 + readOnly: true + title: Service provider call id + type: string + session_id: + readOnly: true + title: Session id + type: string + timestamp: + format: date-time + readOnly: true + title: Timestamp + type: string + call_type: + readOnly: true + title: Call type + type: string + status: + description: Current status of the call + enum: + - pending + - queued + - ongoing + - completed + - failed + - analyzing + - cancelled + title: Status + type: string + duration: + readOnly: true + title: Duration + type: string + duration_seconds: + description: Duration of the call in seconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Duration seconds + type: integer + start_time: + readOnly: true + title: Start time + type: string + transcript: + readOnly: true + title: Transcript + type: string + scenario: + minLength: 1 + readOnly: true + title: Scenario + type: string + overall_score: + readOnly: true + title: Overall score + type: string + response_time: + readOnly: true + title: Response time + type: string + response_time_ms: + description: Average response time in milliseconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Response time ms + type: integer + audio_url: + format: uri + minLength: 1 + readOnly: true + title: Audio url + type: string + customer_name: + minLength: 1 + readOnly: true + title: Customer name + type: string + eval_outputs: + readOnly: true + title: Eval outputs + type: string + eval_metrics: + readOnly: true + title: Eval metrics + type: string + scenario_columns: + readOnly: true + title: Scenario columns + type: string + ended_reason: + description: Reason why the call ended + maxLength: 10000 + nullable: true + title: Ended reason + type: string + simulator_agent_name: + minLength: 1 + readOnly: true + title: Simulator agent name + type: string + simulator_agent_id: + format: uuid + readOnly: true + title: Simulator agent id + type: string + agent_definition_used_name: + minLength: 1 + readOnly: true + title: Agent definition used name + type: string + agent_definition_used_id: + format: uuid + readOnly: true + title: Agent definition used id + type: string + call_summary: + description: Call summary from the service + nullable: true + title: Call summary + type: string + recordings: + readOnly: true + title: Recordings + type: string + scenario_id: + readOnly: true + title: Scenario id + type: string + avg_agent_latency: + readOnly: true + title: Avg agent latency + type: integer + avg_agent_latency_ms: + description: Average agent latency in milliseconds (time taken by agent + to respond after user's pause) + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Avg agent latency ms + type: integer + user_interruption_count: + description: Number of times user interrupted the AI + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: User interruption count + type: integer + user_interruption_rate: + description: Rate of user interruptions (interruptions per minute) + nullable: true + title: User interruption rate + type: number + user_wpm: + description: User's words per minute + nullable: true + title: User wpm + type: number + bot_wpm: + description: Bot's words per minute + nullable: true + title: Bot wpm + type: number + talk_ratio: + description: Ratio of bot speaking time to user speaking time + nullable: true + title: Talk ratio + type: number + ai_interruption_count: + description: Number of times AI interrupted the user + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Ai interruption count + type: integer + ai_interruption_rate: + description: Rate of AI interruptions (interruptions per minute) + nullable: true + title: Ai interruption rate + type: number + avg_stop_time_after_interruption: + readOnly: true + title: Avg stop time after interruption + type: integer + total_tokens: + readOnly: true + title: Total tokens + type: string + input_tokens: + readOnly: true + title: Input tokens + type: string + output_tokens: + readOnly: true + title: Output tokens + type: string + avg_latency_ms: + readOnly: true + title: Avg latency ms + type: string + turn_count: + readOnly: true + title: Turn count + type: string + agent_talk_percentage: + readOnly: true + title: Agent talk percentage + type: string + csat_score: + readOnly: true + title: Csat score + type: string + processing_skipped: + readOnly: true + title: Processing skipped + type: string + processing_skip_reason: + readOnly: true + title: Processing skip reason + type: string + rerun_snapshots: + readOnly: true + title: Rerun snapshots + type: string + is_snapshot: + readOnly: true + title: Is snapshot + type: string + snapshot_timestamp: + readOnly: true + title: Snapshot timestamp + type: string + rerun_type: + readOnly: true + title: Rerun type + type: string + original_call_execution_id: + readOnly: true + title: Original call execution id + type: string + tool_outputs: + additionalProperties: true + description: Tool evaluation output - separate from standard evaluations + title: Tool outputs + type: object + cost_cents: + description: Cost of the call in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Cost cents + type: integer + customer_cost_cents: + description: Total customer-reported cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Customer cost cents + type: integer + customer_cost_breakdown: + additionalProperties: true + description: Detailed cost breakdown from customer call data + title: Customer cost breakdown + type: object + customer_latency_metrics: + additionalProperties: true + description: Latency metrics from customer call data + title: Customer latency metrics + type: object + customer_call_id: + description: Customer call ID if available + maxLength: 255 + nullable: true + title: Customer call id + type: string + simulation_call_type: + description: Type of simulation call + enum: + - voice + - text + title: Simulation call type + type: string + provider: + readOnly: true + title: Provider + type: string + phone_number: + description: Phone number called (null for TEXT/chat simulations) + maxLength: 20 + nullable: true + title: Phone number + type: string + type: object + CallExecutionStatusUpdate: + example: + status: pending + ended_reason: ended_reason + properties: + status: + enum: + - pending + - queued + - ongoing + - completed + - failed + - analyzing + - cancelled + title: Status + type: string + ended_reason: + nullable: true + title: Ended reason + type: string + required: + - status + type: object + CallBranchAnalysisResponse: + example: + scenario_name: scenario_name + analyzed_at: 2000-01-23T04:56:07.000+00:00 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + analysis: + key: analysis + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + scenario_id: + format: uuid + nullable: true + readOnly: true + title: Scenario id + type: string + scenario_name: + minLength: 1 + nullable: true + readOnly: true + title: Scenario name + type: string + analysis: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Analysis + type: object + analyzed_at: + format: date-time + readOnly: true + title: Analyzed at + type: string + type: object + ErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + CallBranchDeviationCreateResponse: + example: + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_graph_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + deviation_data: + key: deviation_data + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + scenario_graph_id: + format: uuid + readOnly: true + title: Scenario graph id + type: string + deviation_data: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Deviation data + type: object + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + ChatToolCallFunction: + example: + name: name + arguments: arguments + properties: + name: + minLength: 1 + title: Name + type: string + arguments: + minLength: 1 + title: Arguments + type: string + required: + - arguments + - name + type: object + ChatToolCall: + example: + function: + name: name + arguments: arguments + id: id + type: type + properties: + id: + minLength: 1 + title: Id + type: string + type: + minLength: 1 + title: Type + type: string + function: + $ref: '#/components/schemas/ChatToolCallFunction' + required: + - function + - id + - type + type: object + ChatMessageContract: + example: + metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + properties: + role: + enum: + - user + - assistant + - tool + title: Role + type: string + content: + nullable: true + title: Content + type: string + tool_call_id: + nullable: true + title: Tool call id + type: string + name: + nullable: true + title: Name + type: string + metadata: + additionalProperties: + nullable: true + type: string + title: Metadata + type: object + tool_calls: + items: + $ref: '#/components/schemas/ChatToolCall' + nullable: true + type: array + required: + - role + type: object + SendChatRequest: + example: + messages: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + metrics: + key: metrics + initiate_chat: false + properties: + messages: + items: + $ref: '#/components/schemas/ChatMessageContract' + nullable: true + type: array + metrics: + additionalProperties: + nullable: true + type: string + title: Metrics + type: object + initiate_chat: + default: false + title: Initiate chat + type: boolean + type: object + ChatSendMessageResult: + example: + chat_ended: false + message_history: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + input_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + output_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + properties: + input_message: + items: + $ref: '#/components/schemas/ChatMessageContract' + nullable: true + type: array + output_message: + items: + $ref: '#/components/schemas/ChatMessageContract' + nullable: true + type: array + message_history: + items: + $ref: '#/components/schemas/ChatMessageContract' + type: array + chat_ended: + default: false + title: Chat ended + type: boolean + required: + - message_history + type: object + ChatSendMessageResponse: + example: + result: + chat_ended: false + message_history: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + input_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + output_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ChatSendMessageResult' + required: + - result + type: object + CallExecutionDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + ErrorLocalizerTaskResponse: + example: + input_data: + key: "" + rule_prompt: rule_prompt + error_message: error_message + input_types: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: eval_config_id + input_keys: + key: "" + eval_template_name: eval_template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + eval_explanation: eval_explanation + error_analysis: + key: "" + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_input_key: selected_input_key + status: status + eval_result: + key: "" + properties: + task_id: + format: uuid + readOnly: true + title: Task id + type: string + eval_config_id: + minLength: 1 + nullable: true + readOnly: true + title: Eval config id + type: string + status: + readOnly: true + title: Status + type: string + eval_result: + additionalProperties: true + readOnly: true + title: Eval result + type: object + eval_explanation: + minLength: 1 + nullable: true + readOnly: true + title: Eval explanation + type: string + input_data: + additionalProperties: true + readOnly: true + title: Input data + type: object + input_keys: + additionalProperties: true + readOnly: true + title: Input keys + type: object + input_types: + additionalProperties: true + readOnly: true + title: Input types + type: object + rule_prompt: + minLength: 1 + nullable: true + readOnly: true + title: Rule prompt + type: string + error_analysis: + additionalProperties: true + readOnly: true + title: Error analysis + type: object + selected_input_key: + minLength: 1 + nullable: true + readOnly: true + title: Selected input key + type: string + error_message: + minLength: 1 + nullable: true + readOnly: true + title: Error message + type: string + created_at: + format: date-time + nullable: true + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + nullable: true + readOnly: true + title: Updated at + type: string + eval_template_name: + minLength: 1 + nullable: true + readOnly: true + title: Eval template name + type: string + eval_template_id: + format: uuid + nullable: true + readOnly: true + title: Eval template id + type: string + type: object + CallExecutionErrorLocalizerTasksResponse: + example: + error_localizer_tasks: + - input_data: + key: "" + rule_prompt: rule_prompt + error_message: error_message + input_types: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: eval_config_id + input_keys: + key: "" + eval_template_name: eval_template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + eval_explanation: eval_explanation + error_analysis: + key: "" + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_input_key: selected_input_key + status: status + eval_result: + key: "" + - input_data: + key: "" + rule_prompt: rule_prompt + error_message: error_message + input_types: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: eval_config_id + input_keys: + key: "" + eval_template_name: eval_template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + eval_explanation: eval_explanation + error_analysis: + key: "" + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_input_key: selected_input_key + status: status + eval_result: + key: "" + total_tasks: 0 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + error_localizer_tasks: + items: + $ref: '#/components/schemas/ErrorLocalizerTaskResponse' + readOnly: true + type: array + total_tasks: + readOnly: true + title: Total tasks + type: integer + type: object + CallLogEntryResponse: + example: + logged_at: logged_at + level: level + payload: + key: payload + severity_text: severity_text + attributes: + key: attributes + id: id + category: category + body: body + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + logged_at: + minLength: 1 + nullable: true + readOnly: true + title: Logged at + type: string + level: + minLength: 1 + nullable: true + readOnly: true + title: Level + type: string + severity_text: + minLength: 1 + nullable: true + readOnly: true + title: Severity text + type: string + category: + minLength: 1 + nullable: true + readOnly: true + title: Category + type: string + body: + minLength: 1 + nullable: true + readOnly: true + title: Body + type: string + attributes: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Attributes + type: object + payload: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Payload + type: object + type: object + CallExecutionLogsResponse: + example: + ingestion_pending: true + source: source + results: + - logged_at: logged_at + level: level + payload: + key: payload + severity_text: severity_text + attributes: + key: attributes + id: id + category: category + body: body + - logged_at: logged_at + level: level + payload: + key: payload + severity_text: severity_text + attributes: + key: attributes + id: id + category: category + body: body + properties: + results: + items: + $ref: '#/components/schemas/CallLogEntryResponse' + readOnly: true + type: array + source: + minLength: 1 + readOnly: true + title: Source + type: string + ingestion_pending: + readOnly: true + title: Ingestion pending + type: boolean + type: object + SessionComparisonResult: + example: + comparison_metrics: + key: "" + comparison_recordings: + key: "" + comparison_transcripts: + key: "" + properties: + comparison_metrics: + additionalProperties: true + readOnly: true + title: Comparison metrics + type: object + comparison_transcripts: + additionalProperties: true + readOnly: true + title: Comparison transcripts + type: object + comparison_recordings: + additionalProperties: true + readOnly: true + title: Comparison recordings + type: object + type: object + SessionComparisonResponse: + example: + result: + comparison_metrics: + key: "" + comparison_recordings: + key: "" + comparison_transcripts: + key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/SessionComparisonResult' + required: + - result + type: object + CallTranscript: + example: + start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + speaker_role: + description: Role of the speaker (user or assistant) + enum: + - user + - assistant + - system + - tool_calls + - tool_call_result + - unknown + title: Speaker role + type: string + content: + description: Transcript content + minLength: 1 + title: Content + type: string + start_time_ms: + description: Start time of this transcript segment in milliseconds + maximum: 9223372036854776000 + minimum: -9223372036854776000 + title: Start time ms + type: integer + start_time_seconds: + readOnly: true + title: Start time seconds + type: string + end_time_ms: + description: End time of this transcript segment in milliseconds + maximum: 9223372036854776000 + minimum: -9223372036854776000 + title: End time ms + type: integer + end_time_seconds: + readOnly: true + title: End time seconds + type: string + confidence_score: + description: Confidence score for this transcript segment + title: Confidence score + type: number + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - content + type: object + CallTranscriptResponse: + example: + transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 5 + status: status + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + phone_number: + minLength: 1 + nullable: true + readOnly: true + title: Phone number + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + transcripts: + items: + $ref: '#/components/schemas/CallTranscript' + readOnly: true + type: array + total_transcripts: + readOnly: true + title: Total transcripts + type: integer + type: object + PromptSimulationScenarioItem: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + description: + readOnly: true + title: Description + type: string + scenario_type: + minLength: 1 + readOnly: true + title: Scenario type + type: string + dataset_id: + format: uuid + nullable: true + readOnly: true + title: Dataset id + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + type: object + PromptSimulationScenariosResult: + example: + count: 0 + limit: 1 + page: 6 + results: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + properties: + count: + readOnly: true + title: Count + type: integer + page: + readOnly: true + title: Page + type: integer + limit: + readOnly: true + title: Limit + type: integer + results: + items: + $ref: '#/components/schemas/PromptSimulationScenarioItem' + readOnly: true + type: array + type: object + PromptSimulationScenariosResponse: + example: + result: + count: 0 + limit: 1 + page: 6 + results: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/PromptSimulationScenariosResult' + required: + - result + type: object + PromptSimulationTemplateSummary: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + type: object + PromptSimulationListResult: + example: + count: 0 + limit: 1 + page: 6 + results: + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + prompt_template: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + readOnly: true + title: Count + type: integer + page: + readOnly: true + title: Page + type: integer + limit: + readOnly: true + title: Limit + type: integer + results: + items: + $ref: '#/components/schemas/RunTestResponse' + readOnly: true + type: array + prompt_template: + $ref: '#/components/schemas/PromptSimulationTemplateSummary' + type: object + PromptSimulationListResponse: + example: + result: + count: 0 + limit: 1 + page: 6 + results: + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + prompt_template: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/PromptSimulationListResult' + required: + - result + type: object + EvalConfigDefinition: + example: + mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + template_id: + description: UUID of the evaluation template to use. + format: uuid + title: Template id + type: string + name: + description: Name for this evaluation configuration. Defaults to 'Eval-' + if omitted. + title: Name + type: string + config: + additionalProperties: true + description: Template-specific configuration parameters. + title: Config + type: object + mapping: + additionalProperties: true + description: Maps test execution data fields to the evaluation template's + expected inputs. + title: Mapping + type: object + filters: + description: Canonical filter list to restrict which test results are evaluated. + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + error_localizer: + default: false + description: Enables granular error localization on evaluation failures. + title: Error localizer + type: boolean + model: + description: Model to use for running this evaluation. + minLength: 1 + nullable: true + title: Model + type: string + kb_id: + description: Knowledge base file to use for this evaluation. + format: uuid + nullable: true + title: Kb id + type: string + eval_group: + description: Eval group that created this evaluation config. + format: uuid + nullable: true + title: Eval group + type: string + required: + - template_id + type: object + CreatePromptSimulationRequest: + example: + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + enable_tool_evaluation: false + prompt_version_id: prompt_version_id + evaluations_config: + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + prompt_version_id: + description: Prompt version ID (UUID) or template_version string + maxLength: 255 + minLength: 1 + title: Prompt version id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + dataset_row_ids: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + evaluations_config: + description: Evaluation configurations to create + items: + $ref: '#/components/schemas/EvalConfigDefinition' + type: array + enable_tool_evaluation: + default: false + description: Enable automatic tool evaluation for this simulation run + title: Enable tool evaluation + type: boolean + required: + - name + - prompt_version_id + - scenario_ids + type: object + PromptSimulationRunResponse: + example: + result: + last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunTestResponse' + required: + - result + type: object + PromptSimulationUpdateRequest: + example: + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + enable_tool_evaluation: true + prompt_version_id: prompt_version_id + properties: + prompt_version_id: + maxLength: 255 + minLength: 1 + title: Prompt version id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + enable_tool_evaluation: + title: Enable tool evaluation + type: boolean + type: object + ExecutePromptSimulationRequest: + example: + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + scenario_ids: + items: + format: uuid + type: string + type: array + select_all: + default: false + title: Select all + type: boolean + type: object + ExecutePromptSimulationResult: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_calls: 6 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: 0 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + execution_id: + format: uuid + readOnly: true + title: Execution id + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + total_scenarios: + readOnly: true + title: Total scenarios + type: integer + total_calls: + readOnly: true + title: Total calls + type: integer + scenario_ids: + items: + format: uuid + type: string + type: array + required: + - scenario_ids + type: object + ExecutePromptSimulationResponse: + example: + result: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_calls: 6 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: 0 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExecutePromptSimulationResult' + required: + - result + type: object + AllActiveTests: + example: + active_tests: + key: active_tests + total_active: 0 + properties: + active_tests: + additionalProperties: + nullable: true + type: string + title: Active tests + type: object + total_active: + title: Total active + type: integer + required: + - active_tests + - total_active + type: object + CreateRunTest: + example: + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + replay_session_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_config_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + enable_tool_evaluation: false + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evaluations_config: + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + dataset_row_ids: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + eval_config_ids: + items: + format: uuid + type: string + type: array + evaluations_config: + description: Evaluation configurations to create + items: + $ref: '#/components/schemas/EvalConfigDefinition' + type: array + enable_tool_evaluation: + default: false + description: Enable automatic tool evaluation for this test run + title: Enable tool evaluation + type: boolean + replay_session_id: + description: Optional replay session ID to mark as completed after run test + creation + format: uuid + nullable: true + title: Replay session id + type: string + agent_version: + description: Optional agent version to bind to this test run + format: uuid + nullable: true + title: Agent version + type: string + required: + - agent_definition_id + - name + - scenario_ids + type: object + RunTestNameResult: + example: + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + run_test_id: + format: uuid + title: Run test id + type: string + run_test_name: + minLength: 1 + title: Run test name + type: string + required: + - run_test_id + - run_test_name + type: object + RunTestNameResponse: + example: + result: + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunTestNameResult' + required: + - result + type: object + UpdateRunTest: + example: + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_config_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + dataset_row_ids: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + eval_config_ids: + items: + format: uuid + type: string + type: array + type: object + RunTestMessageResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + RunTestAnalytics: + example: + performance_comparison: + - key: performance_comparison + - key: performance_comparison + run_test_info: + key: run_test_info + evaluation_score_trends: + - key: evaluation_score_trends + - key: evaluation_score_trends + summary_stats: + key: summary_stats + fail_rate_trends: + - key: fail_rate_trends + - key: fail_rate_trends + properties: + run_test_info: + additionalProperties: + nullable: true + type: string + description: Run test metadata + title: Run test info + type: object + fail_rate_trends: + description: Fail-rate trend points + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + evaluation_score_trends: + description: Evaluation score trend points + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + performance_comparison: + description: Per-execution performance rows + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + summary_stats: + additionalProperties: + nullable: true + type: string + description: Aggregate performance summary + title: Summary stats + type: object + required: + - evaluation_score_trends + - fail_rate_trends + - performance_comparison + - run_test_info + type: object + RunTestCallExecutionsResponse: + example: + next: next + previous: previous + count: 0 + total_pages: 6 + results: + - key: results + - key: results + current_page: 1 + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + total_pages: + readOnly: true + title: Total pages + type: integer + current_page: + readOnly: true + title: Current page + type: integer + type: object + RunTestChatExecutionResult: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + properties: + message: + minLength: 1 + title: Message + type: string + execution_id: + format: uuid + title: Execution id + type: string + run_test_id: + format: uuid + title: Run test id + type: string + status: + minLength: 1 + title: Status + type: string + total_scenarios: + items: + format: uuid + type: string + type: array + required: + - execution_id + - message + - run_test_id + - status + - total_scenarios + type: object + RunTestChatExecutionResponse: + example: + result: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunTestChatExecutionResult' + required: + - result + type: object + RunTestComponentsUpdate: + example: + simulator_agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + agent_definition_id: + format: uuid + title: Agent definition id + type: string + version: + format: uuid + title: Version + type: string + simulator_agent_id: + format: uuid + title: Simulator agent id + type: string + scenarios: + items: + format: uuid + type: string + type: array + enable_tool_evaluation: + title: Enable tool evaluation + type: boolean + type: object + TestExecutionBulkDelete: + example: + test_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + test_execution_ids: + description: List of specific test execution IDs to delete + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to delete all test executions in the run test + title: Select all + type: boolean + type: object + TestExecutionBulkDeleteResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + deleted_count: 0 + deleted_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + deleted_count: + readOnly: true + title: Deleted count + type: integer + deleted_ids: + items: + format: uuid + type: string + readOnly: true + type: array + type: object + AddEvalConfigsRequest: + example: + evaluations_config: + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + evaluations_config: + description: Array of evaluation configuration objects to add. At least + one required. + items: + $ref: '#/components/schemas/EvalConfigDefinition' + minItems: 1 + type: array + required: + - evaluations_config + type: object + EvalConfigResponse: + example: + mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: turing_large + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + key: "" + config: + key: "" + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + nullable: true + title: Name + type: string + config: + additionalProperties: true + title: Config + type: object + mapping: + additionalProperties: true + title: Mapping + type: object + filters: + additionalProperties: true + title: Filters + type: object + error_localizer: + title: Error localizer + type: boolean + model: + enum: + - turing_large + - turing_small + - protect + - protect_flash + - turing_flash + nullable: true + title: Model + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + eval_group: + readOnly: true + title: Eval group + type: string + template_id: + format: uuid + readOnly: true + title: Template id + type: string + type: object + AddEvalConfigsResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_eval_configs: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: turing_large + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + key: "" + config: + key: "" + status: NotStarted + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: turing_large + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + key: "" + config: + key: "" + status: NotStarted + warnings: + - warnings + - warnings + message: message + properties: + message: + minLength: 1 + title: Message + type: string + created_eval_configs: + items: + $ref: '#/components/schemas/EvalConfigResponse' + type: array + run_test_id: + format: uuid + title: Run test id + type: string + warnings: + description: Non-fatal issues encountered while processing individual configs. + items: + minLength: 1 + type: string + type: array + required: + - created_eval_configs + - message + - run_test_id + type: object + DeleteEvalConfigResponse: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + EvalConfigStructure: + example: + reason_column: true + models: + key: "" + config_params_option: + key: config_params_option + mapping: + key: mapping + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + description: description + api_key_available: true + params: + key: "" + config_params_desc: + key: config_params_desc + function_params_schema: + key: "" + output: + key: "" + template_name: template_name + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_prompt_column: true + name: name + optional_keys: + - optional_keys + - optional_keys + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + config: + key: config + eval_tags: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + template_id: + format: uuid + readOnly: true + title: Template id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + reason_column: + readOnly: true + title: Reason column + type: boolean + eval_tags: + additionalProperties: true + readOnly: true + title: Eval tags + type: object + description: + readOnly: true + title: Description + type: string + required_keys: + items: + minLength: 1 + type: string + type: array + optional_keys: + items: + minLength: 1 + type: string + type: array + variable_keys: + items: + minLength: 1 + type: string + type: array + run_prompt_column: + readOnly: true + title: Run prompt column + type: boolean + template_name: + minLength: 1 + readOnly: true + title: Template name + type: string + mapping: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Mapping + type: object + config: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Config + type: object + params: + additionalProperties: true + readOnly: true + title: Params + type: object + function_params_schema: + additionalProperties: true + readOnly: true + title: Function params schema + type: object + models: + additionalProperties: true + readOnly: true + title: Models + type: object + selected_model: + minLength: 1 + nullable: true + readOnly: true + title: Selected model + type: string + error_localizer: + readOnly: true + title: Error localizer + type: boolean + kb_id: + format: uuid + nullable: true + readOnly: true + title: Kb id + type: string + output: + additionalProperties: true + readOnly: true + title: Output + type: object + config_params_desc: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Config params desc + type: object + config_params_option: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Config params option + type: object + api_key_available: + readOnly: true + title: Api key available + type: boolean + required: + - optional_keys + - required_keys + - variable_keys + type: object + EvalConfigStructureResult: + example: + eval: + reason_column: true + models: + key: "" + config_params_option: + key: config_params_option + mapping: + key: mapping + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + description: description + api_key_available: true + params: + key: "" + config_params_desc: + key: config_params_desc + function_params_schema: + key: "" + output: + key: "" + template_name: template_name + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_prompt_column: true + name: name + optional_keys: + - optional_keys + - optional_keys + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + config: + key: config + eval_tags: + key: "" + properties: + eval: + $ref: '#/components/schemas/EvalConfigStructure' + required: + - eval + type: object + EvalConfigStructureResponse: + example: + result: + eval: + reason_column: true + models: + key: "" + config_params_option: + key: config_params_option + mapping: + key: mapping + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + description: description + api_key_available: true + params: + key: "" + config_params_desc: + key: config_params_desc + function_params_schema: + key: "" + output: + key: "" + template_name: template_name + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_prompt_column: true + name: name + optional_keys: + - optional_keys + - optional_keys + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + config: + key: config + eval_tags: + key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalConfigStructureResult' + required: + - result + type: object + EvalConfigUpdateRequest: + example: + mapping: + key: "" + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + run: false + config: + key: "" + properties: + config: + additionalProperties: true + description: Updated evaluation configuration parameters. + title: Config + type: object + mapping: + additionalProperties: true + description: Updated field mapping between test data and evaluation inputs. + title: Mapping + type: object + model: + description: Model to use for evaluations. + minLength: 1 + nullable: true + title: Model + type: string + error_localizer: + description: Enable granular error localization in evaluation results. + title: Error localizer + type: boolean + kb_id: + description: UUID of a knowledge base to use for grounding. Pass null to + clear. + format: uuid + nullable: true + title: Kb id + type: string + name: + description: Updated name for the evaluation configuration. + minLength: 1 + title: Name + type: string + run: + default: false + description: "When true, triggers an immediate rerun after updating. Defaults\ + \ to false." + title: Run + type: boolean + test_execution_id: + description: UUID of the test execution to rerun against. Required when + run is true. + format: uuid + nullable: true + title: Test execution id + type: string + type: object + EvalConfigUpdateResponse: + example: + note: note + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + call_execution_count: 0 + properties: + message: + minLength: 1 + title: Message + type: string + eval_config_id: + format: uuid + title: Eval config id + type: string + run_test_id: + format: uuid + title: Run test id + type: string + test_execution_id: + format: uuid + nullable: true + title: Test execution id + type: string + call_execution_count: + nullable: true + title: Call execution count + type: integer + note: + minLength: 1 + nullable: true + title: Note + type: string + required: + - eval_config_id + - message + - run_test_id + type: object + EvalSummaryComparisonResponse: + example: + result: + key: + - output: + key: "" + name: name + id: id + total_cells: 0 + - output: + key: "" + name: name + id: id + total_cells: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + additionalProperties: + items: + $ref: '#/components/schemas/EvalTemplateSummary' + type: array + title: Result + type: object + required: + - result + type: object + ExecuteRunTest: + example: + simulator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + scenario_ids: + items: + format: uuid + type: string + type: array + simulator_id: + format: uuid + nullable: true + title: Simulator id + type: string + select_all: + default: false + title: Select all + type: boolean + type: object + RunTestExecutionResponse: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_calls: 6 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: 0 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + execution_id: + format: uuid + readOnly: true + title: Execution id + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + total_scenarios: + readOnly: true + title: Total scenarios + type: integer + total_calls: + readOnly: true + title: Total calls + type: integer + scenario_ids: + items: + format: uuid + type: string + readOnly: true + type: array + type: object + TestExecutionItemResponse: + example: + total_number_of_fagi_agent_turns: 3 + source_type: source_type + scenarios: scenarios + agent_definition: agent_definition + total_chats: 9 + duration: 0 + agent_type: agent_type + start_time: start_time + agent_version: agent_version + error_reason: error_reason + calls_attempted: 5 + connected_calls: 2 + calls_connected_percentage: 7.061401241503109 + calls: 5 + id: id + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + status: status + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + scenarios: + minLength: 1 + readOnly: true + title: Scenarios + type: string + start_time: + minLength: 1 + nullable: true + readOnly: true + title: Start time + type: string + duration: + readOnly: true + title: Duration + type: integer + error_reason: + minLength: 1 + nullable: true + readOnly: true + title: Error reason + type: string + success_rate: + readOnly: true + title: Success rate + type: number + avg_response_time: + readOnly: true + title: Avg response time + type: number + calls: + readOnly: true + title: Calls + type: integer + calls_attempted: + readOnly: true + title: Calls attempted + type: integer + connected_calls: + readOnly: true + title: Connected calls + type: integer + agent_version: + minLength: 1 + readOnly: true + title: Agent version + type: string + agent_definition: + minLength: 1 + readOnly: true + title: Agent definition + type: string + calls_connected_percentage: + readOnly: true + title: Calls connected percentage + type: number + total_chats: + readOnly: true + title: Total chats + type: integer + agent_type: + minLength: 1 + readOnly: true + title: Agent type + type: string + total_number_of_fagi_agent_turns: + readOnly: true + title: Total number of fagi agent turns + type: integer + source_type: + minLength: 1 + readOnly: true + title: Source type + type: string + type: object + TestExecutionRerun: + example: + rerun_type: eval_only + test_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + rerun_type: + description: "Type of rerun: evaluation only or call plus evaluation" + enum: + - eval_only + - call_and_eval + title: Rerun type + type: string + test_execution_ids: + description: List of specific test execution IDs to rerun + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to rerun all test executions in the run test + title: Select all + type: boolean + required: + - rerun_type + type: object + TestExecutionRerunResult: + example: + reason: reason + failed_reruns: + - key: failed_reruns + - key: failed_reruns + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_count: 6 + failure_count: 1 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + skipped: true + properties: + test_execution_id: + format: uuid + readOnly: true + title: Test execution id + type: string + success_count: + readOnly: true + title: Success count + type: integer + failure_count: + readOnly: true + title: Failure count + type: integer + successful_reruns: + items: + format: uuid + type: string + readOnly: true + type: array + failed_reruns: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + skipped: + readOnly: true + title: Skipped + type: boolean + reason: + minLength: 1 + readOnly: true + title: Reason + type: string + type: object + TestExecutionRerunResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_test_executions: 0 + rerun_type: rerun_type + overall_success_count: 5 + overall_failure_count: 5 + message: message + results: + - reason: reason + failed_reruns: + - key: failed_reruns + - key: failed_reruns + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_count: 6 + failure_count: 1 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + skipped: true + - reason: reason + failed_reruns: + - key: failed_reruns + - key: failed_reruns + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_count: 6 + failure_count: 1 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + skipped: true + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + rerun_type: + minLength: 1 + readOnly: true + title: Rerun type + type: string + total_test_executions: + readOnly: true + title: Total test executions + type: integer + results: + items: + $ref: '#/components/schemas/TestExecutionRerunResult' + readOnly: true + type: array + overall_success_count: + readOnly: true + title: Overall success count + type: integer + overall_failure_count: + readOnly: true + title: Overall failure count + type: integer + type: object + RunNewEvalsOnTestExecution: + example: + eval_config_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + test_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + test_execution_ids: + description: List of specific test execution IDs to run evaluations on + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to run evaluations on all test executions in the run + test + title: Select all + type: boolean + eval_config_ids: + description: List of SimulateEvalConfig IDs to run on the test executions + items: + format: uuid + type: string + type: array + enable_tool_evaluation: + description: "Whether to enable tool evaluation for this run (if not provided,\ + \ uses the run test's current setting)" + title: Enable tool evaluation + type: boolean + required: + - eval_config_ids + type: object + RunNewEvalsResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + call_execution_count: 0 + properties: + message: + minLength: 1 + title: Message + type: string + run_test_id: + format: uuid + title: Run test id + type: string + call_execution_count: + title: Call execution count + type: integer + required: + - call_execution_count + - message + - run_test_id + type: object + RunTestScenarioItemResponse: + example: + name: name + id: id + row_count: 0 + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + row_count: + readOnly: true + title: Row count + type: integer + type: object + ChatSDKCodeResult: + example: + installation_guide: installation_guide + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sdk_code: sdk_code + properties: + installation_guide: + minLength: 1 + title: Installation guide + type: string + sdk_code: + minLength: 1 + title: Sdk code + type: string + run_test_id: + format: uuid + title: Run test id + type: string + run_test_name: + minLength: 1 + title: Run test name + type: string + required: + - installation_guide + - run_test_id + - run_test_name + - sdk_code + type: object + ChatSDKCodeResponse: + example: + result: + installation_guide: installation_guide + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sdk_code: sdk_code + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ChatSDKCodeResult' + required: + - result + type: object + ScenarioResponse: + example: + dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + description: Name of the scenario + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + description: Optional description of the scenario + nullable: true + title: Description + type: string + source: + description: Source content or reference for the scenario + minLength: 1 + title: Source + type: string + scenario_type: + description: "Type of scenario (graph, script, or dataset)" + enum: + - graph + - script + - dataset + title: Scenario type + type: string + scenario_type_display: + minLength: 1 + readOnly: true + title: Scenario type display + type: string + source_type: + description: "Source type for the scenario: agent_definition or prompt" + enum: + - agent_definition + - prompt + title: Source type + type: string + source_type_display: + minLength: 1 + readOnly: true + title: Source type display + type: string + organization: + description: Organization this scenario belongs to + format: uuid + readOnly: true + title: Organization + type: string + dataset: + description: Dataset associated with this scenario (only for dataset type + scenarios) + format: uuid + nullable: true + title: Dataset + type: string + dataset_rows: + readOnly: true + title: Dataset rows + type: string + dataset_column_config: + readOnly: true + title: Dataset column config + type: string + graph: + readOnly: true + title: Graph + type: string + agent: + readOnly: true + title: Agent + type: string + prompt_template: + description: Prompt template associated with this scenario (only for prompt + source type) + format: uuid + nullable: true + title: Prompt template + type: string + prompt_template_detail: + readOnly: true + title: Prompt template detail + type: string + prompt_version: + description: Prompt version associated with this scenario (only for prompt + source type) + format: uuid + nullable: true + title: Prompt version + type: string + prompt_version_detail: + readOnly: true + title: Prompt version detail + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + status: + description: Status of the scenario + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + agent_type: + readOnly: true + title: Agent type + type: string + required: + - name + - source + type: object + ScenarioListResponse: + example: + next: next + previous: previous + count: 0 + results: + - dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + - dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + items: + $ref: '#/components/schemas/ScenarioResponse' + readOnly: true + type: array + type: object + ScenarioErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ColumnDefinition: + example: + name: name + data_type: text + description: description + properties: + name: + maxLength: 50 + minLength: 1 + title: Name + type: string + data_type: + enum: + - text + - boolean + - integer + - float + - json + - array + - image + - images + - datetime + - audio + - document + - others + - persona + title: Data type + type: string + description: + maxLength: 200 + minLength: 1 + title: Description + type: string + required: + - data_type + - description + - name + type: object + ScenarioCreateRequest: + example: + agent_name: agent_name + voice_provider: elevenlabs + initial_message_delay: 7 + description: description + voice_name: marissa + prompt_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + initial_message: initial_message + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_prompt: agent_prompt + custom_instruction: custom_instruction + agent_definition_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: gpt-4 + no_of_rows: 1610 + interrupt_sensitivity: 5.962133916683182 + kind: dataset + llm_temperature: 6.027456183070403 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type: agent_definition + script_url: https://openapi-generator.tech + personas: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + graph: + key: "" + max_call_duration_in_minutes: 1 + add_persona_automatically: false + custom_columns: + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + conversation_speed: 5.637376656633329 + name: name + generate_graph: false + finished_speaking_sensitivity: 2.3021358869347655 + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + kind: + default: dataset + enum: + - graph + - script + - dataset + title: Kind + type: string + script_url: + format: uri + minLength: 1 + nullable: true + title: Script url + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + agent_definition_version_id: + format: uuid + nullable: true + title: Agent definition version id + type: string + custom_instruction: + title: Custom instruction + type: string + no_of_rows: + default: 20 + maximum: 20000 + minimum: 10 + title: No of rows + type: integer + generate_graph: + default: false + title: Generate graph + type: boolean + graph: + additionalProperties: true + title: Graph + type: object + source_type: + default: agent_definition + enum: + - agent_definition + - prompt + title: Source type + type: string + prompt_template_id: + format: uuid + nullable: true + title: Prompt template id + type: string + prompt_version_id: + format: uuid + nullable: true + title: Prompt version id + type: string + add_persona_automatically: + default: false + title: Add persona automatically + type: boolean + personas: + items: + format: uuid + type: string + type: array + custom_columns: + items: + $ref: '#/components/schemas/ColumnDefinition' + maxItems: 10 + type: array + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_prompt: + title: Agent prompt + type: string + voice_provider: + default: elevenlabs + maxLength: 100 + minLength: 1 + title: Voice provider + type: string + voice_name: + default: marissa + maxLength: 100 + minLength: 1 + title: Voice name + type: string + model: + default: gpt-4 + maxLength: 100 + minLength: 1 + title: Model + type: string + llm_temperature: + default: 0.7 + title: Llm temperature + type: number + initial_message: + title: Initial message + type: string + max_call_duration_in_minutes: + default: 30 + title: Max call duration in minutes + type: integer + interrupt_sensitivity: + default: 0.5 + title: Interrupt sensitivity + type: number + conversation_speed: + default: 1 + title: Conversation speed + type: number + finished_speaking_sensitivity: + default: 0.5 + title: Finished speaking sensitivity + type: number + initial_message_delay: + default: 0 + title: Initial message delay + type: integer + required: + - name + type: object + ScenarioCreateResponse: + example: + scenario: + dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + message: message + status: processing + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario: + $ref: '#/components/schemas/ScenarioResponse' + status: + enum: + - processing + readOnly: true + title: Status + type: string + type: object + ScenarioPromptItem: + example: + role: system + content: content + properties: + role: + enum: + - system + - user + - assistant + readOnly: true + title: Role + type: string + content: + minLength: 1 + readOnly: true + title: Content + type: string + type: object + ScenarioDetailResponse: + example: + dataset_rows: 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source: source + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: + key: graph + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompts: + - role: system + content: content + - role: system + content: content + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + description: + minLength: 1 + nullable: true + readOnly: true + title: Description + type: string + source: + minLength: 1 + readOnly: true + title: Source + type: string + scenario_type: + enum: + - graph + - script + - dataset + readOnly: true + title: Scenario type + type: string + dataset_id: + format: uuid + nullable: true + readOnly: true + title: Dataset id + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + dataset: + format: uuid + nullable: true + readOnly: true + title: Dataset + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + readOnly: true + title: Status + type: string + agent_type: + minLength: 1 + nullable: true + readOnly: true + title: Agent type + type: string + graph: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Graph + type: object + prompts: + items: + $ref: '#/components/schemas/ScenarioPromptItem' + readOnly: true + type: array + dataset_rows: + readOnly: true + title: Dataset rows + type: integer + type: object + ScenarioAddColumnsRequest: + example: + columns: + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + properties: + columns: + items: + $ref: '#/components/schemas/ColumnDefinition' + type: array + required: + - columns + type: object + ScenarioAddColumnsResponse: + example: + columns: + - columns + - columns + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario_id: + format: uuid + readOnly: true + title: Scenario id + type: string + dataset_id: + format: uuid + readOnly: true + title: Dataset id + type: string + columns: + items: + minLength: 1 + type: string + readOnly: true + type: array + type: object + ScenarioAddRowsRequest: + example: + num_rows: 1610 + description: description + properties: + num_rows: + maximum: 20000 + minimum: 10 + title: Num rows + type: integer + description: + title: Description + type: string + required: + - num_rows + type: object + ScenarioAddRowsResponse: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + message: message + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario_id: + format: uuid + readOnly: true + title: Scenario id + type: string + dataset_id: + format: uuid + readOnly: true + title: Dataset id + type: string + num_rows: + readOnly: true + title: Num rows + type: integer + type: object + ScenarioDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + ScenarioEditRequest: + example: + name: name + description: description + prompt: prompt + graph: + key: "" + properties: + name: + maxLength: 255 + title: Name + type: string + description: + title: Description + type: string + graph: + additionalProperties: true + title: Graph + type: object + prompt: + title: Prompt + type: string + type: object + ScenarioEditResponse: + example: + scenario: + dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario: + $ref: '#/components/schemas/ScenarioResponse' + type: object + ScenarioEditPromptsRequest: + example: + prompts: prompts + properties: + prompts: + maxLength: 10000 + minLength: 1 + title: Prompts + type: string + required: + - prompts + type: object + ScenarioPromptsUpdateResponse: + example: + message: message + prompts: prompts + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + prompts: + minLength: 1 + readOnly: true + title: Prompts + type: string + type: object + SimulatorAgent: + example: + interrupt_sensitivity: 6.630201801377444 + voice_provider: voice_provider + logo_url: logo_url + llm_temperature: 1.1274753313266657 + initial_message_delay: 42 + created_at: 2000-01-23T04:56:07.000+00:00 + voice_name: voice_name + deleted_at: 2000-01-23T04:56:07.000+00:00 + max_call_duration_in_minutes: 41 + initial_message: initial_message + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + conversation_speed: 0.37850446629555956 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt: prompt + finished_speaking_sensitivity: 6.5583473083515 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + description: Name of the simulator agent + maxLength: 255 + minLength: 1 + title: Name + type: string + prompt: + description: System prompt for the agent + minLength: 1 + title: Prompt + type: string + voice_provider: + description: Voice service provider + maxLength: 100 + minLength: 1 + title: Voice provider + type: string + voice_name: + description: Specific voice to use + maxLength: 100 + minLength: 1 + title: Voice name + type: string + interrupt_sensitivity: + description: Sensitivity for interruption detection (0-1) + maximum: 11 + minimum: 0 + title: Interrupt sensitivity + type: number + conversation_speed: + description: Speed of conversation (0.1-3.0) + maximum: 2 + minimum: 0.1 + title: Conversation speed + type: number + finished_speaking_sensitivity: + description: Sensitivity for detecting when speaker has finished (0-1) + maximum: 11 + minimum: 0 + title: Finished speaking sensitivity + type: number + model: + description: LLM model to use + maxLength: 100 + minLength: 1 + title: Model + type: string + llm_temperature: + description: Temperature setting for LLM (0-2) + maximum: 2 + minimum: 0 + title: Llm temperature + type: number + max_call_duration_in_minutes: + description: Maximum call duration in minutes (1-180) + maximum: 180 + minimum: 0 + title: Max call duration in minutes + type: integer + initial_message_delay: + description: Delay before initial message in seconds (0-60) + maximum: 60 + minimum: 0 + title: Initial message delay + type: integer + initial_message: + description: Initial message to send when conversation starts + title: Initial message + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + organization: + description: Organization this simulator agent belongs to + format: uuid + readOnly: true + title: Organization + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + logo_url: + readOnly: true + title: Logo url + type: string + required: + - model + - name + - prompt + - voice_name + - voice_provider + type: object + SimulatorAgentListResponse: + example: + next: next + previous: previous + count: 0 + total_pages: 9 + results: + - interrupt_sensitivity: 6.630201801377444 + voice_provider: voice_provider + logo_url: logo_url + llm_temperature: 1.1274753313266657 + initial_message_delay: 42 + created_at: 2000-01-23T04:56:07.000+00:00 + voice_name: voice_name + deleted_at: 2000-01-23T04:56:07.000+00:00 + max_call_duration_in_minutes: 41 + initial_message: initial_message + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + conversation_speed: 0.37850446629555956 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt: prompt + finished_speaking_sensitivity: 6.5583473083515 + - interrupt_sensitivity: 6.630201801377444 + voice_provider: voice_provider + logo_url: logo_url + llm_temperature: 1.1274753313266657 + initial_message_delay: 42 + created_at: 2000-01-23T04:56:07.000+00:00 + voice_name: voice_name + deleted_at: 2000-01-23T04:56:07.000+00:00 + max_call_duration_in_minutes: 41 + initial_message: initial_message + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + conversation_speed: 0.37850446629555956 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt: prompt + finished_speaking_sensitivity: 6.5583473083515 + current_page: 3 + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + items: + $ref: '#/components/schemas/SimulatorAgent' + readOnly: true + type: array + total_pages: + readOnly: true + title: Total pages + type: integer + current_page: + readOnly: true + title: Current page + type: integer + type: object + SimulatorAgentValidationErrorResponse: + additionalProperties: + items: + type: string + type: array + properties: {} + type: object + SimulatorAgentDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + TestExecutionDetailResponse: + example: + next: next + agent_type: agent_type + previous: previous + provider: provider + count: 0 + total_pages: 6 + results: + - key: results + - key: results + current_page: 1 + error_messages: + - error_messages + - error_messages + column_order: + - key: column_order + - key: column_order + status: status + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + description: Call execution rows may include dynamic eval/scenario columns. + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + total_pages: + readOnly: true + title: Total pages + type: integer + current_page: + readOnly: true + title: Current page + type: integer + column_order: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + error_messages: + items: + minLength: 1 + type: string + readOnly: true + type: array + status: + minLength: 1 + readOnly: true + title: Status + type: string + provider: + minLength: 1 + readOnly: true + title: Provider + type: string + agent_type: + minLength: 1 + readOnly: true + title: Agent type + type: string + type: object + TestExecutionAnalytics: + example: + metadata: + key: metadata + evaluation_categories_over_test_runs: + key: evaluation_categories_over_test_runs + fail_rate_over_test_runs: + key: fail_rate_over_test_runs + properties: + fail_rate_over_test_runs: + additionalProperties: + nullable: true + type: string + description: Fail rate data for scatter plot chart + title: Fail rate over test runs + type: object + evaluation_categories_over_test_runs: + additionalProperties: + nullable: true + type: string + description: Evaluation categories data for line graph chart + title: Evaluation categories over test runs + type: object + metadata: + additionalProperties: + nullable: true + type: string + description: Metadata about the analytics data + title: Metadata + type: object + required: + - evaluation_categories_over_test_runs + - fail_rate_over_test_runs + - metadata + type: object + CancelTestExecutionResponse: + example: + success: true + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + success: + title: Success + type: boolean + message: + minLength: 1 + title: Message + type: string + test_execution_id: + format: uuid + nullable: true + title: Test execution id + type: string + required: + - message + - success + - test_execution_id + type: object + TestExecutionChatBatchResult: + example: + batched_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + has_more: true + properties: + call_execution_ids: + items: + format: uuid + type: string + type: array + has_more: + title: Has more + type: boolean + batched_scenarios: + items: + format: uuid + type: string + type: array + required: + - batched_scenarios + - call_execution_ids + - has_more + type: object + TestExecutionChatBatchResponse: + example: + result: + batched_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + has_more: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/TestExecutionChatBatchResult' + required: + - result + type: object + ColumnOrder: + example: + visible: true + column_name: column_name + id: id + properties: + column_name: + minLength: 1 + title: Column name + type: string + id: + minLength: 1 + title: Id + type: string + visible: + title: Visible + type: boolean + required: + - column_name + - id + - visible + type: object + TestExecutionColumnOrder: + example: + column_order: + - visible: true + column_name: column_name + id: id + - visible: true + column_name: column_name + id: id + properties: + column_order: + items: + $ref: '#/components/schemas/ColumnOrder' + type: array + required: + - column_order + type: object + TestExecutionColumnOrderResponse: + example: + message: message + column_order: + - visible: true + column_name: column_name + id: id + - visible: true + column_name: column_name + id: id + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + column_order: + items: + $ref: '#/components/schemas/ColumnOrder' + readOnly: true + type: array + type: object + EvalExplanationCluster: + example: + guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + properties: + kind: + minLength: 1 + readOnly: true + title: Kind + type: string + confidence: + minLength: 1 + readOnly: true + title: Confidence + type: string + theme: + minLength: 1 + readOnly: true + title: Theme + type: string + guidance: + minLength: 1 + readOnly: true + title: Guidance + type: string + evidenceSummary: + minLength: 1 + readOnly: true + title: Evidencesummary + type: string + eval_config_id: + format: uuid + readOnly: true + title: Eval config id + type: string + eval_template_id: + format: uuid + readOnly: true + title: Eval template id + type: string + eval_name: + minLength: 1 + readOnly: true + title: Eval name + type: string + type: object + EvalExplanationSummaryResult: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + status: status + properties: + response: + additionalProperties: + items: + $ref: '#/components/schemas/EvalExplanationCluster' + type: array + title: Response + type: object + last_updated: + format: date-time + nullable: true + title: Last updated + type: string + status: + minLength: 1 + title: Status + type: string + required: + - last_updated + - response + - status + type: object + EvalExplanationSummaryResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalExplanationSummaryResult' + required: + - result + type: object + EvalExplanationSummaryRefreshResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + EvalExplanationSummaryRefreshResponse: + example: + result: + message: message + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalExplanationSummaryRefreshResult' + required: + - result + type: object + RunTestKPIsResponse: + example: + avg_talk_ratio: 7.386281948385884 + avg_stop_time_after_interruption: 1.4894159098541704 + avg_user_wpm: 2.027123023002322 + avg_ai_interruption_rate: 1.0246457001441578 + avg_chat_latency_ms: 9.965781217890562 + is_inbound: true + avg_user_interruption_count: 9.301444243932576 + avg_turn_count: 9.369310271410669 + avg_total_tokens: 1.1730742509559433 + connected_calls: 5 + avg_output_tokens: 5.025004791520295 + avg_score: 6.027456183070403 + failed_calls: 8 + scenario_graphs: + key: + key: + key: "" + avg_response: 1.4658129805029452 + avg_csat_score: 6.683562403749608 + agent_talk_percentage: 6.84685269835264 + agent_type: agent_type + customer_talk_percentage: 7.457744773683766 + total_calls: 0 + avg_ai_interruption_count: 1.2315135367772556 + calls_attempted: 5 + calls_connected_percentage: 2.3021358869347655 + total_duration: 9.018348186070783 + avg_agent_latency: 7.061401241503109 + avg_bot_wpm: 4.145608029883936 + avg_input_tokens: 4.965218492984954 + avg_user_interruption_rate: 3.616076749251911 + properties: + total_calls: + readOnly: true + title: Total calls + type: integer + avg_score: + readOnly: true + title: Avg score + type: number + avg_response: + readOnly: true + title: Avg response + type: number + calls_attempted: + readOnly: true + title: Calls attempted + type: integer + connected_calls: + readOnly: true + title: Connected calls + type: integer + calls_connected_percentage: + readOnly: true + title: Calls connected percentage + type: number + scenario_graphs: + additionalProperties: + additionalProperties: + additionalProperties: true + type: object + type: object + readOnly: true + title: Scenario graphs + type: object + agent_type: + minLength: 1 + readOnly: true + title: Agent type + type: string + is_inbound: + nullable: true + readOnly: true + title: Is inbound + type: boolean + avg_agent_latency: + readOnly: true + title: Avg agent latency + type: number + avg_user_interruption_count: + readOnly: true + title: Avg user interruption count + type: number + avg_user_interruption_rate: + readOnly: true + title: Avg user interruption rate + type: number + avg_user_wpm: + readOnly: true + title: Avg user wpm + type: number + avg_bot_wpm: + readOnly: true + title: Avg bot wpm + type: number + avg_talk_ratio: + readOnly: true + title: Avg talk ratio + type: number + avg_ai_interruption_count: + readOnly: true + title: Avg ai interruption count + type: number + avg_ai_interruption_rate: + readOnly: true + title: Avg ai interruption rate + type: number + avg_stop_time_after_interruption: + readOnly: true + title: Avg stop time after interruption + type: number + agent_talk_percentage: + readOnly: true + title: Agent talk percentage + type: number + customer_talk_percentage: + readOnly: true + title: Customer talk percentage + type: number + avg_total_tokens: + readOnly: true + title: Avg total tokens + type: number + avg_input_tokens: + readOnly: true + title: Avg input tokens + type: number + avg_output_tokens: + readOnly: true + title: Avg output tokens + type: number + avg_chat_latency_ms: + readOnly: true + title: Avg chat latency ms + type: number + avg_turn_count: + readOnly: true + title: Avg turn count + type: number + avg_csat_score: + readOnly: true + title: Avg csat score + type: number + failed_calls: + readOnly: true + title: Failed calls + type: integer + total_duration: + readOnly: true + title: Total duration + type: number + type: object + OptimiserAnalysisResultPayload: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + key: "" + message: message + status: status + properties: + response: + additionalProperties: + additionalProperties: true + type: object + title: Response + type: object + status: + minLength: 1 + title: Status + type: string + last_updated: + format: date-time + title: Last updated + type: string + message: + title: Message + type: string + required: + - response + - status + type: object + OptimiserAnalysisResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + key: "" + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/OptimiserAnalysisResultPayload' + required: + - result + type: object + OptimiserAnalysisRefreshResult: + example: + message: message + status: status + properties: + message: + minLength: 1 + title: Message + type: string + status: + minLength: 1 + title: Status + type: string + required: + - message + - status + type: object + OptimiserAnalysisRefreshResponse: + example: + result: + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/OptimiserAnalysisRefreshResult' + required: + - result + type: object + PerformanceSummary: + example: + test_run_performance_metrics: + key: 0.8008281904610115 + top_performing_scenarios: + - key: top_performing_scenarios + - key: top_performing_scenarios + properties: + test_run_performance_metrics: + additionalProperties: + type: number + description: "Performance metrics including pass rate, total test runs,\ + \ and latest fail rate" + title: Test run performance metrics + type: object + top_performing_scenarios: + description: List of top performing scenarios + items: + additionalProperties: + minLength: 1 + type: string + description: List of top performing scenarios with their performance scores + type: object + type: array + required: + - test_run_performance_metrics + - top_performing_scenarios + type: object + CallExecutionRerun: + example: + rerun_type: eval_only + call_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + rerun_type: + description: "Type of rerun: evaluation only or call plus evaluation" + enum: + - eval_only + - call_and_eval + title: Rerun type + type: string + call_execution_ids: + description: List of specific call execution IDs to rerun + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to rerun all call executions in the test execution + title: Select all + type: boolean + required: + - rerun_type + type: object + FailedRerunItem: + example: + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + properties: + call_execution_id: + format: uuid + title: Call execution id + type: string + error: + minLength: 1 + title: Error + type: string + required: + - call_execution_id + - error + type: object + RerunCallsResponse: + example: + failed_reruns: + - call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + - call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + total_processed: 0 + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rerun_type: rerun_type + success_count: 6 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + failure_count: 1 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + test_execution_id: + format: uuid + title: Test execution id + type: string + rerun_type: + minLength: 1 + title: Rerun type + type: string + total_processed: + title: Total processed + type: integer + successful_reruns: + items: + format: uuid + type: string + type: array + failed_reruns: + items: + $ref: '#/components/schemas/FailedRerunItem' + type: array + success_count: + title: Success count + type: integer + failure_count: + title: Failure count + type: integer + required: + - failed_reruns + - failure_count + - message + - rerun_type + - success_count + - successful_reruns + - test_execution_id + - total_processed + type: object + TestExecutionTranscriptCall: + example: + transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + scenario_name: scenario_name + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 0 + status: status + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + phone_number: + minLength: 1 + nullable: true + readOnly: true + title: Phone number + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + transcripts: + items: + $ref: '#/components/schemas/CallTranscript' + readOnly: true + type: array + total_transcripts: + readOnly: true + title: Total transcripts + type: integer + scenario_name: + minLength: 1 + nullable: true + readOnly: true + title: Scenario name + type: string + type: object + TestExecutionTranscriptsResponse: + example: + total_calls: 6 + calls: + - transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + scenario_name: scenario_name + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 0 + status: status + - transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + scenario_name: scenario_name + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 0 + status: status + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_transcripts: 1 + properties: + test_execution_id: + format: uuid + readOnly: true + title: Test execution id + type: string + calls: + items: + $ref: '#/components/schemas/TestExecutionTranscriptCall' + readOnly: true + type: array + total_calls: + readOnly: true + title: Total calls + type: integer + total_transcripts: + readOnly: true + title: Total transcripts + type: integer + type: object + BulkAnnotationAnnotationRequest: + example: + value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + properties: + annotation_label_id: + format: uuid + title: Annotation label id + type: string + value: + title: Value + type: string + value_float: + title: Value float + type: number + value_bool: + title: Value bool + type: boolean + value_str_list: + items: + minLength: 1 + type: string + type: array + required: + - annotation_label_id + type: object + BulkAnnotationNoteRequest: + example: + text: text + properties: + text: + minLength: 1 + title: Text + type: string + required: + - text + type: object + BulkAnnotationRecordRequest: + example: + notes: + - text: text + - text: text + observation_span_id: observation_span_id + annotations: + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + properties: + observation_span_id: + minLength: 1 + title: Observation span id + type: string + annotations: + items: + $ref: '#/components/schemas/BulkAnnotationAnnotationRequest' + type: array + notes: + items: + $ref: '#/components/schemas/BulkAnnotationNoteRequest' + type: array + required: + - observation_span_id + type: object + BulkAnnotationRequest: + example: + records: + - notes: + - text: text + - text: text + observation_span_id: observation_span_id + annotations: + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - notes: + - text: text + - text: text + observation_span_id: observation_span_id + annotations: + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + properties: + records: + items: + $ref: '#/components/schemas/BulkAnnotationRecordRequest' + type: array + required: + - records + type: object + BulkAnnotationResponseResult: + example: + notes_created: 1 + succeeded_count: 5 + warnings: + - key: "" + - key: "" + annotations_updated: 6 + warnings_count: 2 + message: message + annotations_created: 0 + errors: + - key: "" + - key: "" + errors_count: 5 + properties: + message: + minLength: 1 + title: Message + type: string + annotations_created: + title: Annotations created + type: integer + annotations_updated: + title: Annotations updated + type: integer + notes_created: + title: Notes created + type: integer + succeeded_count: + title: Succeeded count + type: integer + errors_count: + title: Errors count + type: integer + warnings_count: + title: Warnings count + type: integer + warnings: + items: + additionalProperties: true + type: object + nullable: true + type: array + errors: + items: + additionalProperties: true + type: object + nullable: true + type: array + required: + - annotations_created + - annotations_updated + - errors_count + - message + - notes_created + - succeeded_count + - warnings_count + type: object + BulkAnnotationResponse: + example: + result: + notes_created: 1 + succeeded_count: 5 + warnings: + - key: "" + - key: "" + annotations_updated: 6 + warnings_count: 2 + message: message + annotations_created: 0 + errors: + - key: "" + - key: "" + errors_count: 5 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/BulkAnnotationResponseResult' + required: + - result + type: object + ApiErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ErrorName: + example: + name: name + type: type + properties: + name: + minLength: 1 + title: Name + type: string + type: + title: Type + type: string + required: + - name + - type + type: object + TrendPoint: + example: + value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: integer + users: + title: Users + type: integer + required: + - timestamp + - users + - value + type: object + FeedListRow: + example: + severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + properties: + cluster_id: + minLength: 1 + title: Cluster id + type: string + source: + minLength: 1 + title: Source + type: string + error: + $ref: '#/components/schemas/ErrorName' + status: + minLength: 1 + title: Status + type: string + severity: + minLength: 1 + title: Severity + type: string + occurrences: + title: Occurrences + type: integer + trace_count: + title: Trace count + type: integer + fix_layer: + minLength: 1 + nullable: true + title: Fix layer + type: string + users_affected: + title: Users affected + type: integer + sessions: + title: Sessions + type: integer + first_seen: + format: date-time + nullable: true + title: First seen + type: string + last_seen: + format: date-time + nullable: true + title: Last seen + type: string + trends: + items: + $ref: '#/components/schemas/TrendPoint' + type: array + assignees: + items: + minLength: 1 + type: string + type: array + model: + minLength: 1 + nullable: true + title: Model + type: string + model_version: + minLength: 1 + nullable: true + title: Model version + type: string + project: + minLength: 1 + nullable: true + title: Project + type: string + project_id: + minLength: 1 + nullable: true + title: Project id + type: string + environment: + minLength: 1 + nullable: true + title: Environment + type: string + eval_score: + nullable: true + title: Eval score + type: number + trace_id: + minLength: 1 + nullable: true + title: Trace id + type: string + external_issue_url: + minLength: 1 + nullable: true + title: External issue url + type: string + external_issue_id: + minLength: 1 + nullable: true + title: External issue id + type: string + required: + - assignees + - cluster_id + - environment + - error + - eval_score + - external_issue_id + - external_issue_url + - first_seen + - fix_layer + - last_seen + - model + - model_version + - occurrences + - project + - project_id + - sessions + - severity + - source + - status + - trace_count + - trace_id + - trends + - users_affected + type: object + FeedListResponse: + example: + total: 9 + data: + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + offset: 2 + limit: 3 + properties: + data: + items: + $ref: '#/components/schemas/FeedListRow' + type: array + total: + title: Total + type: integer + limit: + title: Limit + type: integer + offset: + title: Offset + type: integer + required: + - data + - limit + - offset + - total + type: object + FeedListApiResponse: + example: + result: + total: 9 + data: + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + offset: 2 + limit: 3 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedListResponse' + required: + - result + type: object + FeedStats: + example: + total_errors: 0 + acknowledged: 5 + for_review: 1 + escalating: 6 + resolved: 5 + affected_users: 2 + properties: + total_errors: + title: Total errors + type: integer + escalating: + title: Escalating + type: integer + for_review: + title: For review + type: integer + acknowledged: + title: Acknowledged + type: integer + resolved: + title: Resolved + type: integer + affected_users: + title: Affected users + type: integer + required: + - acknowledged + - affected_users + - escalating + - for_review + - resolved + - total_errors + type: object + FeedStatsApiResponse: + example: + result: + total_errors: 0 + acknowledged: 5 + for_review: 1 + escalating: 6 + resolved: 5 + affected_users: 2 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedStats' + required: + - result + type: object + TracePreview: + example: + output: output + input: input + trace_id: trace_id + properties: + trace_id: + minLength: 1 + title: Trace id + type: string + input: + minLength: 1 + nullable: true + title: Input + type: string + output: + minLength: 1 + nullable: true + title: Output + type: string + required: + - input + - output + - trace_id + type: object + FeedDetailCore: + example: + representative_trace: + output: output + input: input + trace_id: trace_id + success_trace: + output: output + input: input + trace_id: trace_id + description: description + row: + severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + properties: + row: + $ref: '#/components/schemas/FeedListRow' + description: + minLength: 1 + nullable: true + title: Description + type: string + success_trace: + $ref: '#/components/schemas/TracePreview' + representative_trace: + $ref: '#/components/schemas/TracePreview' + required: + - description + - representative_trace + - row + - success_trace + type: object + FeedDetailApiResponse: + example: + result: + representative_trace: + output: output + input: input + trace_id: trace_id + success_trace: + output: output + input: input + trace_id: trace_id + description: description + row: + severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedDetailCore' + required: + - result + type: object + FeedUpdateBody: + example: + severity: critical + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assignee: assignee + status: escalating + properties: + project_id: + format: uuid + title: Project id + type: string + status: + enum: + - escalating + - for_review + - acknowledged + - resolved + title: Status + type: string + severity: + enum: + - critical + - high + - medium + - low + title: Severity + type: string + assignee: + format: email + minLength: 1 + nullable: true + title: Assignee + type: string + type: object + CreateLinearIssue: + example: + description: description + team_id: team_id + title: title + priority: 0 + properties: + team_id: + minLength: 1 + title: Team id + type: string + title: + title: Title + type: string + description: + title: Description + type: string + priority: + default: 0 + title: Priority + type: integer + required: + - team_id + type: object + CreateLinearIssueResult: + example: + issue_url: issue_url + issue_id: issue_id + already_linked: true + issue_title: issue_title + properties: + already_linked: + title: Already linked + type: boolean + issue_id: + minLength: 1 + nullable: true + title: Issue id + type: string + issue_url: + minLength: 1 + nullable: true + title: Issue url + type: string + issue_title: + minLength: 1 + nullable: true + title: Issue title + type: string + type: object + CreateLinearIssueResponse: + example: + result: + issue_url: issue_url + issue_id: issue_id + already_linked: true + issue_title: issue_title + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/CreateLinearIssueResult' + required: + - result + type: object + DeepAnalysisBody: + example: + trace_id: trace_id + force: false + properties: + trace_id: + minLength: 1 + title: Trace id + type: string + force: + default: false + title: Force + type: boolean + required: + - trace_id + type: object + DeepAnalysisDispatchResponse: + example: + trace_id: trace_id + status: status + properties: + status: + minLength: 1 + title: Status + type: string + trace_id: + minLength: 1 + title: Trace id + type: string + required: + - status + - trace_id + type: object + DeepAnalysisDispatchApiResponse: + example: + result: + trace_id: trace_id + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/DeepAnalysisDispatchResponse' + required: + - result + type: object + EventsOverTimePoint: + example: + date: date + passing: 6 + errors: 0 + users: 1 + properties: + date: + minLength: 1 + title: Date + type: string + errors: + title: Errors + type: integer + passing: + title: Passing + type: integer + users: + title: Users + type: integer + required: + - date + - errors + - passing + - users + type: object + PatternInsight: + example: + caption: caption + value: value + properties: + value: + minLength: 1 + title: Value + type: string + caption: + minLength: 1 + title: Caption + type: string + required: + - caption + - value + type: object + KeyMoment: + example: + kevinified: kevinified + verbatim: verbatim + properties: + kevinified: + minLength: 1 + title: Kevinified + type: string + verbatim: + title: Verbatim + type: string + required: + - kevinified + - verbatim + type: object + PatternSummary: + example: + insights: + - caption: caption + value: value + - caption: caption + value: value + key_moments: + - kevinified: kevinified + verbatim: verbatim + - kevinified: kevinified + verbatim: verbatim + properties: + insights: + items: + $ref: '#/components/schemas/PatternInsight' + type: array + key_moments: + items: + $ref: '#/components/schemas/KeyMoment' + type: array + required: + - insights + - key_moments + type: object + TraceSummary: + example: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + properties: + eval_score: + nullable: true + title: Eval score + type: number + latency_ms: + nullable: true + title: Latency ms + type: integer + turns: + nullable: true + title: Turns + type: integer + model: + minLength: 1 + nullable: true + title: Model + type: string + input_tokens: + nullable: true + title: Input tokens + type: integer + output_tokens: + nullable: true + title: Output tokens + type: integer + required: + - eval_score + - input_tokens + - latency_ms + - model + - output_tokens + - turns + type: object + TraceEvidence: + example: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + properties: + input: + minLength: 1 + nullable: true + title: Input + type: string + output: + minLength: 1 + nullable: true + title: Output + type: string + fail_reel: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + pass_reel: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + required: + - fail_reel + - input + - output + - pass_reel + type: object + AgentFlowGraph: + example: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + properties: + nodes: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + edges: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + required: + - edges + - nodes + type: object + RepresentativeTrace: + example: + summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + id: + minLength: 1 + title: Id + type: string + status: + minLength: 1 + title: Status + type: string + timestamp: + format: date-time + nullable: true + title: Timestamp + type: string + summary: + $ref: '#/components/schemas/TraceSummary' + evidence: + $ref: '#/components/schemas/TraceEvidence' + agent_flow: + $ref: '#/components/schemas/AgentFlowGraph' + root_causes: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + recommendations: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + what_changed: + additionalProperties: + nullable: true + type: string + title: What changed + type: object + required: + - agent_flow + - evidence + - id + - recommendations + - root_causes + - status + - summary + - timestamp + - what_changed + type: object + OverviewResponse: + example: + pattern_summary: + insights: + - caption: caption + value: value + - caption: caption + value: value + key_moments: + - kevinified: kevinified + verbatim: verbatim + - kevinified: kevinified + verbatim: verbatim + representative_traces: + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + properties: + events_over_time: + items: + $ref: '#/components/schemas/EventsOverTimePoint' + type: array + pattern_summary: + $ref: '#/components/schemas/PatternSummary' + representative_traces: + items: + $ref: '#/components/schemas/RepresentativeTrace' + type: array + required: + - events_over_time + - pattern_summary + - representative_traces + type: object + OverviewApiResponse: + example: + result: + pattern_summary: + insights: + - caption: caption + value: value + - caption: caption + value: value + key_moments: + - kevinified: kevinified + verbatim: verbatim + - kevinified: kevinified + verbatim: verbatim + representative_traces: + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/OverviewResponse' + required: + - result + type: object + RootCause: + example: + rank: 0 + description: description + title: title + properties: + rank: + title: Rank + type: integer + title: + minLength: 1 + title: Title + type: string + description: + minLength: 1 + title: Description + type: string + required: + - description + - rank + - title + type: object + Recommendation: + example: + root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + properties: + id: + minLength: 1 + title: Id + type: string + title: + minLength: 1 + title: Title + type: string + description: + title: Description + type: string + priority: + minLength: 1 + title: Priority + type: string + root_cause_link: + nullable: true + title: Root cause link + type: integer + immediate_fix: + minLength: 1 + nullable: true + title: Immediate fix + type: string + insights: + minLength: 1 + nullable: true + title: Insights + type: string + evidence: + items: + minLength: 1 + type: string + type: array + required: + - description + - evidence + - id + - immediate_fix + - insights + - priority + - root_cause_link + - title + type: object + DeepAnalysisResponse: + example: + trace_id: trace_id + root_causes: + - rank: 0 + description: description + title: title + - rank: 0 + description: description + title: title + immediate_fix: immediate_fix + recommendations: + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + status: status + properties: + status: + minLength: 1 + title: Status + type: string + trace_id: + minLength: 1 + title: Trace id + type: string + root_causes: + items: + $ref: '#/components/schemas/RootCause' + type: array + recommendations: + items: + $ref: '#/components/schemas/Recommendation' + type: array + immediate_fix: + minLength: 1 + nullable: true + title: Immediate fix + type: string + required: + - immediate_fix + - recommendations + - root_causes + - status + - trace_id + type: object + DeepAnalysisApiResponse: + example: + result: + trace_id: trace_id + root_causes: + - rank: 0 + description: description + title: title + - rank: 0 + description: description + title: title + immediate_fix: immediate_fix + recommendations: + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/DeepAnalysisResponse' + required: + - result + type: object + SidebarTimeline: + example: + age_days: 0 + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + properties: + first_seen: + format: date-time + nullable: true + title: First seen + type: string + last_seen: + format: date-time + nullable: true + title: Last seen + type: string + age_days: + nullable: true + title: Age days + type: integer + required: + - age_days + - first_seen + - last_seen + type: object + SidebarAIMetadata: + example: + model_version: model_version + trace_id: trace_id + eval_score: 6.027456183070403 + project: project + model: model + properties: + model: + minLength: 1 + nullable: true + title: Model + type: string + model_version: + minLength: 1 + nullable: true + title: Model version + type: string + project: + minLength: 1 + nullable: true + title: Project + type: string + eval_score: + nullable: true + title: Eval score + type: number + trace_id: + minLength: 1 + nullable: true + title: Trace id + type: string + required: + - eval_score + - model + - model_version + - project + - trace_id + type: object + EvaluationResult: + example: + result: result + score: 1.4658129805029452 + label: label + type: type + value: value + properties: + label: + minLength: 1 + title: Label + type: string + type: + minLength: 1 + title: Type + type: string + result: + minLength: 1 + title: Result + type: string + score: + nullable: true + title: Score + type: number + value: + minLength: 1 + nullable: true + title: Value + type: string + required: + - label + - result + - score + - type + - value + type: object + CoOccurringIssue: + example: + severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + properties: + id: + minLength: 1 + title: Id + type: string + title: + minLength: 1 + title: Title + type: string + type: + title: Type + type: string + co_occurrence: + title: Co occurrence + type: number + count: + title: Count + type: integer + severity: + minLength: 1 + title: Severity + type: string + required: + - co_occurrence + - count + - id + - severity + - title + - type + type: object + FeedSidebar: + example: + evaluations: + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + timeline: + age_days: 0 + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + co_occurring_issues: + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + ai_metadata: + model_version: model_version + trace_id: trace_id + eval_score: 6.027456183070403 + project: project + model: model + properties: + timeline: + $ref: '#/components/schemas/SidebarTimeline' + ai_metadata: + $ref: '#/components/schemas/SidebarAIMetadata' + evaluations: + items: + $ref: '#/components/schemas/EvaluationResult' + type: array + co_occurring_issues: + items: + $ref: '#/components/schemas/CoOccurringIssue' + type: array + required: + - ai_metadata + - co_occurring_issues + - evaluations + - timeline + type: object + FeedSidebarApiResponse: + example: + result: + evaluations: + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + timeline: + age_days: 0 + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + co_occurring_issues: + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + ai_metadata: + model_version: model_version + trace_id: trace_id + eval_score: 6.027456183070403 + project: project + model: model + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedSidebar' + required: + - result + type: object + TracesAggregates: + example: + passing_traces: 1 + p95_latency: 2 + avg_turns: 7.061401241503109 + p50_latency: 5 + total_traces: 0 + failing_traces: 6 + avg_score: 5.962133916683182 + properties: + total_traces: + title: Total traces + type: integer + failing_traces: + title: Failing traces + type: integer + passing_traces: + title: Passing traces + type: integer + avg_score: + title: Avg score + type: number + p50_latency: + title: P50 latency + type: integer + p95_latency: + title: P95 latency + type: integer + avg_turns: + title: Avg turns + type: number + required: + - avg_score + - avg_turns + - failing_traces + - p50_latency + - p95_latency + - passing_traces + - total_traces + type: object + TracesListRow: + example: + input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + properties: + id: + minLength: 1 + title: Id + type: string + input: + minLength: 1 + nullable: true + title: Input + type: string + timestamp: + format: date-time + nullable: true + title: Timestamp + type: string + latency_ms: + nullable: true + title: Latency ms + type: integer + tokens: + nullable: true + title: Tokens + type: integer + cost: + nullable: true + title: Cost + type: number + score: + nullable: true + title: Score + type: number + turns: + nullable: true + title: Turns + type: integer + required: + - cost + - id + - input + - latency_ms + - score + - timestamp + - tokens + - turns + type: object + TracesTabResponse: + example: + total: 1 + traces: + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + aggregates: + passing_traces: 1 + p95_latency: 2 + avg_turns: 7.061401241503109 + p50_latency: 5 + total_traces: 0 + failing_traces: 6 + avg_score: 5.962133916683182 + properties: + aggregates: + $ref: '#/components/schemas/TracesAggregates' + traces: + items: + $ref: '#/components/schemas/TracesListRow' + type: array + total: + title: Total + type: integer + required: + - aggregates + - total + - traces + type: object + TracesTabApiResponse: + example: + result: + total: 1 + traces: + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + aggregates: + passing_traces: 1 + p95_latency: 2 + avg_turns: 7.061401241503109 + p50_latency: 5 + total_traces: 0 + failing_traces: 6 + avg_score: 5.962133916683182 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/TracesTabResponse' + required: + - result + type: object + TrendMetric: + example: + unit: unit + delta: 0.8008281904610115 + label: label + value: value + properties: + label: + minLength: 1 + title: Label + type: string + value: + minLength: 1 + title: Value + type: string + delta: + title: Delta + type: number + unit: + title: Unit + type: string + required: + - delta + - label + - unit + - value + type: object + ScoreTrend: + example: + current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + properties: + label: + minLength: 1 + title: Label + type: string + current: + title: Current + type: number + prev: + title: Prev + type: number + sparkline: + items: + type: number + type: array + required: + - current + - label + - prev + - sparkline + type: object + HeatmapCell: + example: + hour: 2 + day: 5 + value: 7 + properties: + day: + title: Day + type: integer + hour: + title: Hour + type: integer + value: + title: Value + type: integer + required: + - day + - hour + - value + type: object + TrendsTabResponse: + example: + activity_heatmap: + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + metrics: + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + score_trends: + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + properties: + metrics: + items: + $ref: '#/components/schemas/TrendMetric' + type: array + events_over_time: + items: + $ref: '#/components/schemas/EventsOverTimePoint' + type: array + score_trends: + items: + $ref: '#/components/schemas/ScoreTrend' + type: array + activity_heatmap: + items: + items: + $ref: '#/components/schemas/HeatmapCell' + type: array + type: array + required: + - activity_heatmap + - events_over_time + - metrics + - score_trends + type: object + TrendsTabApiResponse: + example: + result: + activity_heatmap: + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + metrics: + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + score_trends: + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/TrendsTabResponse' + required: + - result + type: object + AnnotationLabelResponse: + example: + settings: + key: "" + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + type: + minLength: 1 + title: Type + type: string + description: + nullable: true + title: Description + type: string + settings: + additionalProperties: true + title: Settings + type: object + required: + - id + - name + - type + type: object + GetAnnotationLabelsResponse: + example: + result: + - settings: + key: "" + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + - settings: + key: "" + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/AnnotationLabelResponse' + type: array + required: + - result + type: object + ObserveGraphDataRequest: + example: + req_data_config: + filter_value: "" + output_type: output_type + id: id + type: SYSTEM_METRIC + choices: + - choices + - choices + eval_output_type: eval_output_type + value: "" + filter_op: filter_op + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + property: average + interval: day + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + properties: + project_id: + format: uuid + title: Project id + type: string + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + interval: + default: day + enum: + - hour + - day + - week + - month + title: Interval + type: string + property: + default: average + title: Property + type: string + req_data_config: + $ref: '#/components/schemas/Req_data_config' + required: + - project_id + - req_data_config + type: object + ObserveGraphDataPoint: + example: + primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + properties: + timestamp: + minLength: 1 + title: Timestamp + type: string + value: + nullable: true + title: Value + type: number + primary_traffic: + nullable: true + title: Primary traffic + type: number + required: + - timestamp + - value + type: object + ObserveGraphDataResult: + example: + metric_name: metric_name + data: + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + properties: + metric_name: + title: Metric name + type: string + data: + items: + $ref: '#/components/schemas/ObserveGraphDataPoint' + type: array + required: + - data + - metric_name + type: object + ObserveGraphDataResponse: + example: + result: + metric_name: metric_name + data: + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ObserveGraphDataResult' + required: + - result + type: object + Project: + example: + metadata: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: Numeric + created_at: 2000-01-23T04:56:07.000+00:00 + source: demo + tags: + key: "" + trace_type: experiment + session_config: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + model_type: + enum: + - Numeric + - ScoreCategorical + - Ranking + - BinaryClassification + - Regression + - ObjectDetection + - Segmentation + - GenerativeLLM + - GenerativeImage + - GenerativeVideo + - TTS + - STT + - MultiModal + title: Model type + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + trace_type: + enum: + - experiment + - observe + title: Trace type + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + organization: + format: uuid + readOnly: true + title: Organization + type: string + workspace: + format: uuid + nullable: true + readOnly: true + title: Workspace + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + config: + additionalProperties: true + description: Any valid JSON value. + title: Config + type: object + x-json-value: true + source: + enum: + - demo + - prototype + - simulator + title: Source + type: string + session_config: + additionalProperties: true + description: Any valid JSON value. + title: Session config + type: object + x-json-value: true + tags: + additionalProperties: true + description: Any valid JSON value. + title: Tags + type: object + x-json-value: true + required: + - model_type + - name + - trace_type + type: object + GetTraceAnnotation: + example: + trace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + exclude_annotators: exclude_annotators + observation_span_id: observation_span_id + annotators: annotators + properties: + observation_span_id: + maxLength: 255 + minLength: 1 + nullable: true + title: Observation span id + type: string + trace_id: + format: uuid + nullable: true + title: Trace id + type: string + annotators: + description: JSON-encoded UUID list. + title: Annotators + type: string + exclude_annotators: + description: JSON-encoded UUID list. + title: Exclude annotators + type: string + type: object + TraceAnnotationValueResponse: + example: + annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + properties: + id: + format: uuid + title: Id + type: string + annotation_label_name: + minLength: 1 + title: Annotation label name + type: string + annotation_value: + additionalProperties: true + title: Annotation value + type: object + annotation_label_id: + format: uuid + title: Annotation label id + type: string + annotator: + minLength: 1 + nullable: true + title: Annotator + type: string + annotator_id: + format: uuid + nullable: true + title: Annotator id + type: string + updated_by: + minLength: 1 + nullable: true + title: Updated by + type: string + updated_at: + format: date-time + nullable: true + title: Updated at + type: string + annotation_type: + minLength: 1 + title: Annotation type + type: string + settings: + additionalProperties: true + title: Settings + type: object + required: + - annotation_label_id + - annotation_label_name + - annotation_type + - annotation_value + - id + type: object + TraceAnnotationNoteResponse: + example: + notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + properties: + id: + format: uuid + title: Id + type: string + notes: + title: Notes + type: string + created_by_annotator: + minLength: 1 + title: Created by annotator + type: string + created_by_user: + minLength: 1 + title: Created by user + type: string + created_by_user_id: + format: uuid + title: Created by user id + type: string + updated_at: + format: date-time + title: Updated at + type: string + required: + - created_by_annotator + - created_by_user + - created_by_user_id + - id + - notes + - updated_at + type: object + GetTraceAnnotationValuesResult: + example: + notes: + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + annotations: + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + properties: + annotations: + items: + $ref: '#/components/schemas/TraceAnnotationValueResponse' + type: array + notes: + items: + $ref: '#/components/schemas/TraceAnnotationNoteResponse' + type: array + required: + - annotations + - notes + type: object + GetTraceAnnotationValuesResponse: + example: + result: + notes: + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + annotations: + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/GetTraceAnnotationValuesResult' + required: + - result + type: object + TraceSession: + example: + bookmarked: true + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + project: + format: uuid + title: Project + type: string + bookmarked: + title: Bookmarked + type: boolean + name: + maxLength: 255 + nullable: true + title: Name + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - project + type: object + TraceSessionGraphDataRequest: + example: + req_data_config: + filter_value: "" + output_type: output_type + id: id + type: SYSTEM_METRIC + choices: + - choices + - choices + eval_output_type: eval_output_type + value: "" + filter_op: filter_op + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + property: average + interval: day + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + properties: + project_id: + format: uuid + title: Project id + type: string + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + interval: + default: day + enum: + - hour + - day + - week + - month + title: Interval + type: string + property: + default: average + title: Property + type: string + req_data_config: + $ref: '#/components/schemas/Req_data_config' + required: + - project_id + - req_data_config + type: object + Trace: + example: + output: + key: "" + input: + key: "" + metadata: + key: "" + session: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + external_id: external_id + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: + key: "" + tags: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + project: + format: uuid + title: Project + type: string + project_version: + format: uuid + title: Project version + type: string + name: + maxLength: 2000 + nullable: true + title: Name + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + input: + additionalProperties: true + title: Input + type: object + output: + additionalProperties: true + title: Output + type: object + error: + additionalProperties: true + title: Error + type: object + session: + format: uuid + title: Session + type: string + external_id: + maxLength: 255 + nullable: true + title: External id + type: string + tags: + additionalProperties: true + title: Tags + type: object + required: + - project + type: object + TraceTagsUpdate: + example: + tags: + - tags + - tags + properties: + tags: + items: + minLength: 1 + type: string + type: array + required: + - tags + type: object + UserAlertMonitorLog: + example: + resolved_by: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + time_window_end: 2000-01-23T04:56:07.000+00:00 + resolved_at: 2000-01-23T04:56:07.000+00:00 + time_window_start: 2000-01-23T04:56:07.000+00:00 + link: https://openapi-generator.tech + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: critical + message: message + resolved: true + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + resolved_by: + $ref: '#/components/schemas/User' + created_at: + format: date-time + readOnly: true + title: Created at + type: string + type: + enum: + - critical + - warning + title: Type + type: string + message: + minLength: 1 + title: Message + type: string + resolved: + title: Resolved + type: boolean + resolved_at: + format: date-time + nullable: true + title: Resolved at + type: string + link: + format: uri + maxLength: 200 + nullable: true + title: Link + type: string + time_window_start: + format: date-time + nullable: true + title: Time window start + type: string + time_window_end: + format: date-time + nullable: true + title: Time window end + type: string + required: + - message + - type + type: object + UserAlertMonitor: + example: + slack_notes: slack_notes + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + slack_webhook_url: https://openapi-generator.tech + alert_frequency: 1280358510 + metric_name: metric_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_mute: true + metric_type: count_of_errors + threshold_metric_value: threshold_metric_value + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + logs: + - key: "" + - key: "" + critical_threshold_value: 0.6027456183070403 + auto_threshold_time_window: 1210617418 + filters: + key: "" + warning_threshold_value: 0.14658129805029452 + notification_emails: + - notification_emails + - notification_emails + deleted_at: 2000-01-23T04:56:07.000+00:00 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_checked_at: 2000-01-23T04:56:07.000+00:00 + deleted: true + metric: metric + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + threshold_operator: greater_than + threshold_type: static + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + project: + format: uuid + title: Project + type: string + name: + minLength: 1 + title: Name + type: string + metric_name: + readOnly: true + title: Metric name + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + deleted: + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + title: Deleted at + type: string + metric_type: + enum: + - count_of_errors + - error_rates_for_function_calling + - error_free_session_rates + - service_provider_error_rates + - llm_api_failure_rates + - span_response_time + - llm_response_time + - token_usage + - daily_tokens_spent + - monthly_tokens_spent + - evaluation_metrics + title: Metric type + type: string + metric: + description: Id of the evaluation template. + maxLength: 2556 + nullable: true + title: Metric + type: string + threshold_operator: + enum: + - greater_than + - less_than + title: Threshold operator + type: string + threshold_type: + description: Method to set the threshold for the monitor (Static or Percentage + change). + enum: + - static + - percentage_change + title: Threshold type + type: string + threshold_metric_value: + description: "For choice and pass/fail evals, the specific metric value\ + \ to monitor." + maxLength: 255 + nullable: true + title: Threshold metric value + type: string + critical_threshold_value: + minimum: 0 + nullable: true + title: Critical threshold value + type: number + warning_threshold_value: + minimum: 0 + nullable: true + title: Warning threshold value + type: number + alert_frequency: + description: Frequency of alert checks in minutes. + maximum: 2147483647 + minimum: 5 + title: Alert frequency + type: integer + auto_threshold_time_window: + description: For auto-thresholding. The time window in minutes to calculate + the historical mean + maximum: 2147483647 + minimum: 0 + title: Auto threshold time window + type: integer + last_checked_at: + description: The last time the monitor was checked for alerts. + format: date-time + nullable: true + title: Last checked at + type: string + notification_emails: + items: + format: email + maxLength: 254 + minLength: 1 + title: Notification emails + type: string + type: array + slack_webhook_url: + format: uri + maxLength: 200 + nullable: true + title: Slack webhook url + type: string + slack_notes: + nullable: true + title: Slack notes + type: string + is_mute: + title: Is mute + type: boolean + filters: + additionalProperties: true + title: Filters + type: object + logs: + items: + additionalProperties: true + title: Logs + type: object + nullable: true + type: array + organization: + format: uuid + title: Organization + type: string + workspace: + format: uuid + nullable: true + title: Workspace + type: string + created_by: + format: uuid + nullable: true + title: Created by + type: string + required: + - metric_type + - name + - organization + - project + - threshold_operator + type: object + UserAlertMonitorDuplicate: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + required: + - id + - name + type: object + UserAlertMonitorDuplicateResult: + example: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + id: + format: uuid + title: Id + type: string + message: + minLength: 1 + title: Message + type: string + required: + - id + - message + type: object + UserAlertMonitorDuplicateResponse: + example: + result: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/UserAlertMonitorDuplicateResult' + required: + - result + type: object + UserAlertMonitorMetricOption: + example: + output_type: output_type + name: name + metric_type: metric_type + id: id + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + metric_type: + minLength: 1 + readOnly: true + title: Metric type + type: string + output_type: + readOnly: true + title: Output type + type: string + type: object + UserAlertMonitorMetricOptionsResponse: + example: + result: + - output_type: output_type + name: name + metric_type: metric_type + id: id + - output_type: output_type + name: name + metric_type: metric_type + id: id + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/UserAlertMonitorMetricOption' + readOnly: true + type: array + type: object + UsersResult: + example: + total_count: 0 + total_pages: 6 + table: + - key: "" + - key: "" + properties: + table: + items: + additionalProperties: true + type: object + type: array + total_count: + title: Total count + type: integer + total_pages: + title: Total pages + type: integer + required: + - table + - total_count + - total_pages + type: object + UsersResponse: + example: + result: + total_count: 0 + total_pages: 6 + table: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/UsersResult' + required: + - result + type: object + UserCodeExampleResponse: + example: + result: result + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + type: object + TestExecutionStatusSummary: + example: + completed_calls: 1 + execution_id: execution_id + total_calls: 6 + start_time: 2000-01-23T04:56:07.000+00:00 + run_test_id: run_test_id + total_scenarios: 0 + failed_calls: 5 + end_time: 2000-01-23T04:56:07.000+00:00 + scenarios: + - key: scenarios + - key: scenarios + error: error + success_rate: 5.637376656633329 + status: status + properties: + run_test_id: + minLength: 1 + title: Run test id + type: string + execution_id: + minLength: 1 + title: Execution id + type: string + status: + minLength: 1 + title: Status + type: string + total_scenarios: + title: Total scenarios + type: integer + total_calls: + title: Total calls + type: integer + completed_calls: + title: Completed calls + type: integer + failed_calls: + title: Failed calls + type: integer + success_rate: + title: Success rate + type: number + start_time: + format: date-time + title: Start time + type: string + end_time: + format: date-time + nullable: true + title: End time + type: string + scenarios: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + error: + minLength: 1 + nullable: true + title: Error + type: string + required: + - completed_calls + - end_time + - error + - execution_id + - failed_calls + - run_test_id + - scenarios + - start_time + - status + - success_rate + - total_calls + - total_scenarios + type: object + listAnnotationQueues_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + - viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/AnnotationQueue' + type: array + required: + - count + - results + type: object + model_hub_annotation_queues_automation_rules_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + created_by_name: created_by_name + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enabled: true + last_triggered_at: 2000-01-23T04:56:07.000+00:00 + trigger_count: 6 + trigger_frequency: manual + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + conditions: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + created_by_name: created_by_name + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enabled: true + last_triggered_at: 2000-01-23T04:56:07.000+00:00 + trigger_count: 6 + trigger_frequency: manual + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + conditions: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/AutomationRule' + type: array + required: + - count + - results + type: object + listAnnotationQueueItems_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - workflow_status: workflow_status + metadata: + key: "" + reviewed_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + review_notes: review_notes + reviewed_at: 2000-01-23T04:56:07.000+00:00 + reserved_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + assigned_users: assigned_users + priority: 441289069 + workflow_status_label: workflow_status_label + reserved_by_name: reserved_by_name + reviewed_by_name: reviewed_by_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + review_status: review_status + source_preview: source_preview + assigned_to_name: assigned_to_name + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: pending + order: -1517921766 + assigned_to: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + reservation_expires_at: 2000-01-23T04:56:07.000+00:00 + - workflow_status: workflow_status + metadata: + key: "" + reviewed_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + review_notes: review_notes + reviewed_at: 2000-01-23T04:56:07.000+00:00 + reserved_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + assigned_users: assigned_users + priority: 441289069 + workflow_status_label: workflow_status_label + reserved_by_name: reserved_by_name + reviewed_by_name: reviewed_by_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + review_status: review_status + source_preview: source_preview + assigned_to_name: assigned_to_name + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: pending + order: -1517921766 + assigned_to: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + reservation_expires_at: 2000-01-23T04:56:07.000+00:00 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/QueueItem' + type: array + required: + - count + - results + type: object + model_hub_api_keys_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - masked_actual_key: masked_actual_key + config_json: + key: "" + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + key: key + - masked_actual_key: masked_actual_key + config_json: + key: "" + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + key: key + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/ApiKey' + type: array + required: + - count + - results + type: object + listExperiments_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - agents_count: agents_count + models_count: models_count + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_templates_count: eval_templates_count + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_type: llm + status: NotStarted + - agents_count: agents_count + models_count: models_count + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_templates_count: eval_templates_count + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_type: llm + status: NotStarted + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/ExperimentListV2' + type: array + required: + - count + - results + type: object + model_hub_prompt_history_executions_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - metadata: + key: "" + template_version: template_version + original_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + placeholders: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + evaluation_results: + key: "" + commit_message: commit_message + is_default: true + labels: labels + output: + key: "" + prompt_config_snapshot: prompt_config_snapshot + evaluation_configs: + key: "" + template_name: template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_draft: true + prompt_base_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + variable_names: variable_names + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - metadata: + key: "" + template_version: template_version + original_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + placeholders: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + evaluation_results: + key: "" + commit_message: commit_message + is_default: true + labels: labels + output: + key: "" + prompt_config_snapshot: prompt_config_snapshot + evaluation_configs: + key: "" + template_name: template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_draft: true + prompt_base_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + variable_names: variable_names + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PromptHistoryExecution' + type: array + required: + - count + - results + type: object + model_hub_prompt_labels_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - metadata: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: system + - metadata: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: system + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PromptLabel' + type: array + required: + - count + - results + type: object + model_hub_prompt_templates_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + placeholders: + key: "" + description: description + variable_names: + key: "" + prompt_folder: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + placeholders: + key: "" + description: description + variable_names: + key: "" + prompt_folder: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PromptTemplate' + type: array + required: + - count + - results + type: object + model_hub_scores_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Score' + type: array + required: + - count + - results + type: object + listPersonas_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: simulation_type + multilingual: true + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: simulation_type + multilingual: true + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PersonaList' + type: array + required: + - count + - results + type: object + simulate_api_personas_field_options_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - slang_usage_choices: slang_usage_choices + communication_style_choices: communication_style_choices + verbosity_choices: verbosity_choices + location_choices: location_choices + emoji_usage_choices: emoji_usage_choices + accent_choices: accent_choices + tone_choices: tone_choices + regional_mix_choices: regional_mix_choices + profession_choices: profession_choices + personality_choices: personality_choices + language_choices: language_choices + typos_frequency_choices: typos_frequency_choices + age_group_choices: age_group_choices + punctuation_choices: punctuation_choices + gender_choices: gender_choices + conversation_speed_choices: conversation_speed_choices + - slang_usage_choices: slang_usage_choices + communication_style_choices: communication_style_choices + verbosity_choices: verbosity_choices + location_choices: location_choices + emoji_usage_choices: emoji_usage_choices + accent_choices: accent_choices + tone_choices: tone_choices + regional_mix_choices: regional_mix_choices + profession_choices: profession_choices + personality_choices: personality_choices + language_choices: language_choices + typos_frequency_choices: typos_frequency_choices + age_group_choices: age_group_choices + punctuation_choices: punctuation_choices + gender_choices: gender_choices + conversation_speed_choices: conversation_speed_choices + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PersonaFieldOptions' + type: array + required: + - count + - results + type: object + simulate_api_personas_system_personas_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Persona' + type: array + required: + - count + - results + type: object + listTraceProjects_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - metadata: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: Numeric + created_at: 2000-01-23T04:56:07.000+00:00 + source: demo + tags: + key: "" + trace_type: experiment + session_config: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + - metadata: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: Numeric + created_at: 2000-01-23T04:56:07.000+00:00 + source: demo + tags: + key: "" + trace_type: experiment + session_config: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Project' + type: array + required: + - count + - results + type: object + tracer_trace_annotation_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - trace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + exclude_annotators: exclude_annotators + observation_span_id: observation_span_id + annotators: annotators + - trace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + exclude_annotators: exclude_annotators + observation_span_id: observation_span_id + annotators: annotators + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/GetTraceAnnotation' + type: array + required: + - count + - results + type: object + tracer_trace_session_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - bookmarked: true + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - bookmarked: true + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/TraceSession' + type: array + required: + - count + - results + type: object + tracer_trace_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - output: + key: "" + input: + key: "" + metadata: + key: "" + session: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + external_id: external_id + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: + key: "" + tags: + key: "" + - output: + key: "" + input: + key: "" + metadata: + key: "" + session: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + external_id: external_id + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: + key: "" + tags: + key: "" + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Trace' + type: array + required: + - count + - results + type: object + listAlertLogs_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - resolved_by: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + time_window_end: 2000-01-23T04:56:07.000+00:00 + resolved_at: 2000-01-23T04:56:07.000+00:00 + time_window_start: 2000-01-23T04:56:07.000+00:00 + link: https://openapi-generator.tech + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: critical + message: message + resolved: true + - resolved_by: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + time_window_end: 2000-01-23T04:56:07.000+00:00 + resolved_at: 2000-01-23T04:56:07.000+00:00 + time_window_start: 2000-01-23T04:56:07.000+00:00 + link: https://openapi-generator.tech + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: critical + message: message + resolved: true + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/UserAlertMonitorLog' + type: array + required: + - count + - results + type: object + listAlerts_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - slack_notes: slack_notes + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + slack_webhook_url: https://openapi-generator.tech + alert_frequency: 1280358510 + metric_name: metric_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_mute: true + metric_type: count_of_errors + threshold_metric_value: threshold_metric_value + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + logs: + - key: "" + - key: "" + critical_threshold_value: 0.6027456183070403 + auto_threshold_time_window: 1210617418 + filters: + key: "" + warning_threshold_value: 0.14658129805029452 + notification_emails: + - notification_emails + - notification_emails + deleted_at: 2000-01-23T04:56:07.000+00:00 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_checked_at: 2000-01-23T04:56:07.000+00:00 + deleted: true + metric: metric + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + threshold_operator: greater_than + threshold_type: static + - slack_notes: slack_notes + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + slack_webhook_url: https://openapi-generator.tech + alert_frequency: 1280358510 + metric_name: metric_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_mute: true + metric_type: count_of_errors + threshold_metric_value: threshold_metric_value + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + logs: + - key: "" + - key: "" + critical_threshold_value: 0.6027456183070403 + auto_threshold_time_window: 1210617418 + filters: + key: "" + warning_threshold_value: 0.14658129805029452 + notification_emails: + - notification_emails + - notification_emails + deleted_at: 2000-01-23T04:56:07.000+00:00 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_checked_at: 2000-01-23T04:56:07.000+00:00 + deleted: true + metric: metric + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + threshold_operator: greater_than + threshold_type: static + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/UserAlertMonitor' + type: array + required: + - count + - results + type: object + AutomationRuleConditions_filter_inner_filter_config: + additionalProperties: false + example: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + properties: + filter_type: + description: "Canonical field type, for example text, number, boolean, datetime,\ + \ categorical, thumbs, annotator, or array." + type: string + filter_op: + description: "Canonical operator from api_contracts/filter_contract.json,\ + \ for example equals, not_equals, in, not_in, between, not_between, is_null,\ + \ or is_not_null." + type: string + filter_value: + description: "Scalar, list, range tuple, boolean, or null depending on filter_op\ + \ and filter_type." + col_type: + description: "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC,\ + \ ANNOTATION, or NORMAL." + type: string + required: + - filter_op + - filter_type + type: object + AutomationRuleConditions_filter_inner: + additionalProperties: false + example: + column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + properties: + column_id: + description: Column or attribute id to filter on. + type: string + display_name: + description: Optional UI label for chips and saved views. + type: string + source: + description: "Optional source surface for mixed-source filters, for example\ + \ traces, datasets, or simulation." + type: string + output_type: + description: Optional metric output type metadata used by eval and annotation + filters. + type: string + filter_config: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner_filter_config' + required: + - column_id + - filter_config + type: object + Rules_inner: + additionalProperties: false + example: + op: eq + field: field + value: "" + properties: + field: + minLength: 1 + type: string + op: + default: eq + minLength: 1 + type: string + value: + description: "Rule comparison value. Can be a scalar, list, object, boolean,\ + \ or null depending on the operator." + required: + - field + type: object + DatasetRowDataRequest_sort_inner: + additionalProperties: false + example: + column_id: column_id + type: ascending + properties: + column_id: + type: string + type: + enum: + - ascending + - descending + type: string + required: + - column_id + type: object + Req_data_config: + additionalProperties: false + example: + filter_value: "" + output_type: output_type + id: id + type: SYSTEM_METRIC + choices: + - choices + - choices + eval_output_type: eval_output_type + value: "" + filter_op: filter_op + properties: + id: + type: string + type: + enum: + - SYSTEM_METRIC + - EVAL + - ANNOTATION + type: string + output_type: + type: string + eval_output_type: + type: string + choices: + items: + type: string + type: array + value: {} + filter_op: + type: string + filter_value: {} + required: + - id + - type + title: Req data config + type: object + securitySchemes: + X-Api-Key: + in: header + name: X-Api-Key + type: apiKey + X-Secret-Key: + in: header + name: X-Secret-Key + type: apiKey diff --git a/go/futureagi/api_accounts.go b/go/futureagi/api_accounts.go new file mode 100644 index 0000000..0de5723 --- /dev/null +++ b/go/futureagi/api_accounts.go @@ -0,0 +1,1045 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// AccountsAPIService AccountsAPI service +type AccountsAPIService service + +type ApiAccountsOrganizationMembersReactivateCreateRequest struct { + ctx context.Context + ApiService *AccountsAPIService + memberRemove *MemberRemove +} + +func (r ApiAccountsOrganizationMembersReactivateCreateRequest) MemberRemove(memberRemove MemberRemove) ApiAccountsOrganizationMembersReactivateCreateRequest { + r.memberRemove = &memberRemove + return r +} + +func (r ApiAccountsOrganizationMembersReactivateCreateRequest) Execute() (*MemberUserMutationResponse, *http.Response, error) { + return r.ApiService.AccountsOrganizationMembersReactivateCreateExecute(r) +} + +/* +AccountsOrganizationMembersReactivateCreate POST /accounts/organization/members/reactivate/ + +Re-activates a deactivated org membership and restores workspace +memberships that were soft-deactivated during removal. If no prior +workspace memberships exist, the user is added to the default workspace. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAccountsOrganizationMembersReactivateCreateRequest +*/ +func (a *AccountsAPIService) AccountsOrganizationMembersReactivateCreate(ctx context.Context) ApiAccountsOrganizationMembersReactivateCreateRequest { + return ApiAccountsOrganizationMembersReactivateCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return MemberUserMutationResponse +func (a *AccountsAPIService) AccountsOrganizationMembersReactivateCreateExecute(r ApiAccountsOrganizationMembersReactivateCreateRequest) (*MemberUserMutationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MemberUserMutationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsAPIService.AccountsOrganizationMembersReactivateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/organization/members/reactivate/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.memberRemove == nil { + return localVarReturnValue, nil, reportError("memberRemove is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.memberRemove + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAccountsOrganizationMembersRemoveDeleteRequest struct { + ctx context.Context + ApiService *AccountsAPIService + memberRemove *MemberRemove +} + +func (r ApiAccountsOrganizationMembersRemoveDeleteRequest) MemberRemove(memberRemove MemberRemove) ApiAccountsOrganizationMembersRemoveDeleteRequest { + r.memberRemove = &memberRemove + return r +} + +func (r ApiAccountsOrganizationMembersRemoveDeleteRequest) Execute() (*MemberUserMutationResponse, *http.Response, error) { + return r.ApiService.AccountsOrganizationMembersRemoveDeleteExecute(r) +} + +/* +AccountsOrganizationMembersRemoveDelete DELETE /accounts/organization/members/remove/ + +Soft-deactivates OrganizationMembership and cascades to workspace +memberships. Signals handle Redis clear + audit log. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAccountsOrganizationMembersRemoveDeleteRequest +*/ +func (a *AccountsAPIService) AccountsOrganizationMembersRemoveDelete(ctx context.Context) ApiAccountsOrganizationMembersRemoveDeleteRequest { + return ApiAccountsOrganizationMembersRemoveDeleteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return MemberUserMutationResponse +func (a *AccountsAPIService) AccountsOrganizationMembersRemoveDeleteExecute(r ApiAccountsOrganizationMembersRemoveDeleteRequest) (*MemberUserMutationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MemberUserMutationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsAPIService.AccountsOrganizationMembersRemoveDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/organization/members/remove/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.memberRemove == nil { + return localVarReturnValue, nil, reportError("memberRemove is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.memberRemove + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAccountsOrganizationMembersRoleCreateRequest struct { + ctx context.Context + ApiService *AccountsAPIService + memberRoleUpdate *MemberRoleUpdate +} + +func (r ApiAccountsOrganizationMembersRoleCreateRequest) MemberRoleUpdate(memberRoleUpdate MemberRoleUpdate) ApiAccountsOrganizationMembersRoleCreateRequest { + r.memberRoleUpdate = &memberRoleUpdate + return r +} + +func (r ApiAccountsOrganizationMembersRoleCreateRequest) Execute() (*MemberRoleUpdateResponse, *http.Response, error) { + return r.ApiService.AccountsOrganizationMembersRoleCreateExecute(r) +} + +/* +AccountsOrganizationMembersRoleCreate POST /accounts/organization/members/role/ + +Update a member's org level and/or workspace level. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAccountsOrganizationMembersRoleCreateRequest +*/ +func (a *AccountsAPIService) AccountsOrganizationMembersRoleCreate(ctx context.Context) ApiAccountsOrganizationMembersRoleCreateRequest { + return ApiAccountsOrganizationMembersRoleCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return MemberRoleUpdateResponse +func (a *AccountsAPIService) AccountsOrganizationMembersRoleCreateExecute(r ApiAccountsOrganizationMembersRoleCreateRequest) (*MemberRoleUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MemberRoleUpdateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsAPIService.AccountsOrganizationMembersRoleCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/organization/members/role/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.memberRoleUpdate == nil { + return localVarReturnValue, nil, reportError("memberRoleUpdate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.memberRoleUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAccountsWorkspaceMembersRemoveDeleteRequest struct { + ctx context.Context + ApiService *AccountsAPIService + workspaceId string + workspaceMemberRemove *WorkspaceMemberRemove +} + +func (r ApiAccountsWorkspaceMembersRemoveDeleteRequest) WorkspaceMemberRemove(workspaceMemberRemove WorkspaceMemberRemove) ApiAccountsWorkspaceMembersRemoveDeleteRequest { + r.workspaceMemberRemove = &workspaceMemberRemove + return r +} + +func (r ApiAccountsWorkspaceMembersRemoveDeleteRequest) Execute() (*MemberUserMutationResponse, *http.Response, error) { + return r.ApiService.AccountsWorkspaceMembersRemoveDeleteExecute(r) +} + +/* +AccountsWorkspaceMembersRemoveDelete DELETE /accounts/workspace//members/remove/ + +Remove a member from a workspace only (keeps org membership). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workspaceId + @return ApiAccountsWorkspaceMembersRemoveDeleteRequest +*/ +func (a *AccountsAPIService) AccountsWorkspaceMembersRemoveDelete(ctx context.Context, workspaceId string) ApiAccountsWorkspaceMembersRemoveDeleteRequest { + return ApiAccountsWorkspaceMembersRemoveDeleteRequest{ + ApiService: a, + ctx: ctx, + workspaceId: workspaceId, + } +} + +// Execute executes the request +// +// @return MemberUserMutationResponse +func (a *AccountsAPIService) AccountsWorkspaceMembersRemoveDeleteExecute(r ApiAccountsWorkspaceMembersRemoveDeleteRequest) (*MemberUserMutationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MemberUserMutationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsAPIService.AccountsWorkspaceMembersRemoveDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/workspace/{workspace_id}/members/remove/" + localVarPath = strings.Replace(localVarPath, "{"+"workspace_id"+"}", url.PathEscape(parameterValueToString(r.workspaceId, "workspaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.workspaceMemberRemove == nil { + return localVarReturnValue, nil, reportError("workspaceMemberRemove is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workspaceMemberRemove + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAccountsWorkspaceMembersRoleCreateRequest struct { + ctx context.Context + ApiService *AccountsAPIService + workspaceId string + workspaceMemberRoleUpdate *WorkspaceMemberRoleUpdate +} + +func (r ApiAccountsWorkspaceMembersRoleCreateRequest) WorkspaceMemberRoleUpdate(workspaceMemberRoleUpdate WorkspaceMemberRoleUpdate) ApiAccountsWorkspaceMembersRoleCreateRequest { + r.workspaceMemberRoleUpdate = &workspaceMemberRoleUpdate + return r +} + +func (r ApiAccountsWorkspaceMembersRoleCreateRequest) Execute() (*WorkspaceMemberRoleUpdateResponse, *http.Response, error) { + return r.ApiService.AccountsWorkspaceMembersRoleCreateExecute(r) +} + +/* +AccountsWorkspaceMembersRoleCreate POST /accounts/workspace//members/role/ + +Update a member's workspace role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workspaceId + @return ApiAccountsWorkspaceMembersRoleCreateRequest +*/ +func (a *AccountsAPIService) AccountsWorkspaceMembersRoleCreate(ctx context.Context, workspaceId string) ApiAccountsWorkspaceMembersRoleCreateRequest { + return ApiAccountsWorkspaceMembersRoleCreateRequest{ + ApiService: a, + ctx: ctx, + workspaceId: workspaceId, + } +} + +// Execute executes the request +// +// @return WorkspaceMemberRoleUpdateResponse +func (a *AccountsAPIService) AccountsWorkspaceMembersRoleCreateExecute(r ApiAccountsWorkspaceMembersRoleCreateRequest) (*WorkspaceMemberRoleUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkspaceMemberRoleUpdateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsAPIService.AccountsWorkspaceMembersRoleCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/workspace/{workspace_id}/members/role/" + localVarPath = strings.Replace(localVarPath, "{"+"workspace_id"+"}", url.PathEscape(parameterValueToString(r.workspaceId, "workspaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.workspaceMemberRoleUpdate == nil { + return localVarReturnValue, nil, reportError("workspaceMemberRoleUpdate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workspaceMemberRoleUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_alerts.go b/go/futureagi/api_alerts.go new file mode 100644 index 0000000..93fdd7e --- /dev/null +++ b/go/futureagi/api_alerts.go @@ -0,0 +1,2224 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// AlertsAPIService AlertsAPI service +type AlertsAPIService service + +type ApiBulkMuteAlertsRequest struct { + ctx context.Context + ApiService *AlertsAPIService + userAlertMonitor *UserAlertMonitor +} + +func (r ApiBulkMuteAlertsRequest) UserAlertMonitor(userAlertMonitor UserAlertMonitor) ApiBulkMuteAlertsRequest { + r.userAlertMonitor = &userAlertMonitor + return r +} + +func (r ApiBulkMuteAlertsRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.BulkMuteAlertsExecute(r) +} + +/* +BulkMuteAlerts Method for BulkMuteAlerts + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiBulkMuteAlertsRequest +*/ +func (a *AlertsAPIService) BulkMuteAlerts(ctx context.Context) ApiBulkMuteAlertsRequest { + return ApiBulkMuteAlertsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *AlertsAPIService) BulkMuteAlertsExecute(r ApiBulkMuteAlertsRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.BulkMuteAlerts") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/bulk-mute/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitor == nil { + return localVarReturnValue, nil, reportError("userAlertMonitor is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitor + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAlertRequest struct { + ctx context.Context + ApiService *AlertsAPIService + userAlertMonitor *UserAlertMonitor +} + +func (r ApiCreateAlertRequest) UserAlertMonitor(userAlertMonitor UserAlertMonitor) ApiCreateAlertRequest { + r.userAlertMonitor = &userAlertMonitor + return r +} + +func (r ApiCreateAlertRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.CreateAlertExecute(r) +} + +/* +CreateAlert Method for CreateAlert + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAlertRequest +*/ +func (a *AlertsAPIService) CreateAlert(ctx context.Context) ApiCreateAlertRequest { + return ApiCreateAlertRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *AlertsAPIService) CreateAlertExecute(r ApiCreateAlertRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.CreateAlert") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitor == nil { + return localVarReturnValue, nil, reportError("userAlertMonitor is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitor + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAlertRequest struct { + ctx context.Context + ApiService *AlertsAPIService + id string +} + +func (r ApiDeleteAlertRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAlertExecute(r) +} + +/* +DeleteAlert Method for DeleteAlert + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiDeleteAlertRequest +*/ +func (a *AlertsAPIService) DeleteAlert(ctx context.Context, id string) ApiDeleteAlertRequest { + return ApiDeleteAlertRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *AlertsAPIService) DeleteAlertExecute(r ApiDeleteAlertRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.DeleteAlert") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAlertRequest struct { + ctx context.Context + ApiService *AlertsAPIService + id string +} + +func (r ApiGetAlertRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.GetAlertExecute(r) +} + +/* +GetAlert Method for GetAlert + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetAlertRequest +*/ +func (a *AlertsAPIService) GetAlert(ctx context.Context, id string) ApiGetAlertRequest { + return ApiGetAlertRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *AlertsAPIService) GetAlertExecute(r ApiGetAlertRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.GetAlert") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAlertDetailsRequest struct { + ctx context.Context + ApiService *AlertsAPIService + id string +} + +func (r ApiGetAlertDetailsRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.GetAlertDetailsExecute(r) +} + +/* +GetAlertDetails Method for GetAlertDetails + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetAlertDetailsRequest +*/ +func (a *AlertsAPIService) GetAlertDetails(ctx context.Context, id string) ApiGetAlertDetailsRequest { + return ApiGetAlertDetailsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *AlertsAPIService) GetAlertDetailsExecute(r ApiGetAlertDetailsRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.GetAlertDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/{id}/details/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAlertGraphRequest struct { + ctx context.Context + ApiService *AlertsAPIService + id string +} + +func (r ApiGetAlertGraphRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.GetAlertGraphExecute(r) +} + +/* +GetAlertGraph Returns time-series data for a monitor's metric, suitable for graphing. + +Accepts `start_date` and `end_date` query parameters (ISO 8601 format). +If not provided, it defaults to the last 7 days. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetAlertGraphRequest +*/ +func (a *AlertsAPIService) GetAlertGraph(ctx context.Context, id string) ApiGetAlertGraphRequest { + return ApiGetAlertGraphRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *AlertsAPIService) GetAlertGraphExecute(r ApiGetAlertGraphRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.GetAlertGraph") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/{id}/graph/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAlertLogRequest struct { + ctx context.Context + ApiService *AlertsAPIService + id string +} + +func (r ApiGetAlertLogRequest) Execute() (*UserAlertMonitorLog, *http.Response, error) { + return r.ApiService.GetAlertLogExecute(r) +} + +/* +GetAlertLog Method for GetAlertLog + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetAlertLogRequest +*/ +func (a *AlertsAPIService) GetAlertLog(ctx context.Context, id string) ApiGetAlertLogRequest { + return ApiGetAlertLogRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorLog +func (a *AlertsAPIService) GetAlertLogExecute(r ApiGetAlertLogRequest) (*UserAlertMonitorLog, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.GetAlertLog") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAlertLogsRequest struct { + ctx context.Context + ApiService *AlertsAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListAlertLogsRequest) Page(page int32) ApiListAlertLogsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListAlertLogsRequest) Limit(limit int32) ApiListAlertLogsRequest { + r.limit = &limit + return r +} + +func (r ApiListAlertLogsRequest) Execute() (*ListAlertLogs200Response, *http.Response, error) { + return r.ApiService.ListAlertLogsExecute(r) +} + +/* +ListAlertLogs Method for ListAlertLogs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAlertLogsRequest +*/ +func (a *AlertsAPIService) ListAlertLogs(ctx context.Context) ApiListAlertLogsRequest { + return ApiListAlertLogsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListAlertLogs200Response +func (a *AlertsAPIService) ListAlertLogsExecute(r ApiListAlertLogsRequest) (*ListAlertLogs200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAlertLogs200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.ListAlertLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAlertLogsForAlertRequest struct { + ctx context.Context + ApiService *AlertsAPIService + id string +} + +func (r ApiListAlertLogsForAlertRequest) Execute() (*UserAlertMonitorLog, *http.Response, error) { + return r.ApiService.ListAlertLogsForAlertExecute(r) +} + +/* +ListAlertLogsForAlert Method for ListAlertLogsForAlert + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiListAlertLogsForAlertRequest +*/ +func (a *AlertsAPIService) ListAlertLogsForAlert(ctx context.Context, id string) ApiListAlertLogsForAlertRequest { + return ApiListAlertLogsForAlertRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorLog +func (a *AlertsAPIService) ListAlertLogsForAlertExecute(r ApiListAlertLogsForAlertRequest) (*UserAlertMonitorLog, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.ListAlertLogsForAlert") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/{id}/list/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAlertMetricOptionsRequest struct { + ctx context.Context + ApiService *AlertsAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListAlertMetricOptionsRequest) Page(page int32) ApiListAlertMetricOptionsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListAlertMetricOptionsRequest) Limit(limit int32) ApiListAlertMetricOptionsRequest { + r.limit = &limit + return r +} + +func (r ApiListAlertMetricOptionsRequest) Execute() (*UserAlertMonitorMetricOptionsResponse, *http.Response, error) { + return r.ApiService.ListAlertMetricOptionsExecute(r) +} + +/* +ListAlertMetricOptions Method for ListAlertMetricOptions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAlertMetricOptionsRequest +*/ +func (a *AlertsAPIService) ListAlertMetricOptions(ctx context.Context) ApiListAlertMetricOptionsRequest { + return ApiListAlertMetricOptionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorMetricOptionsResponse +func (a *AlertsAPIService) ListAlertMetricOptionsExecute(r ApiListAlertMetricOptionsRequest) (*UserAlertMonitorMetricOptionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorMetricOptionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.ListAlertMetricOptions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/metric-options/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAlertsRequest struct { + ctx context.Context + ApiService *AlertsAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListAlertsRequest) Page(page int32) ApiListAlertsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListAlertsRequest) Limit(limit int32) ApiListAlertsRequest { + r.limit = &limit + return r +} + +func (r ApiListAlertsRequest) Execute() (*ListAlerts200Response, *http.Response, error) { + return r.ApiService.ListAlertsExecute(r) +} + +/* +ListAlerts Method for ListAlerts + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAlertsRequest +*/ +func (a *AlertsAPIService) ListAlerts(ctx context.Context) ApiListAlertsRequest { + return ApiListAlertsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListAlerts200Response +func (a *AlertsAPIService) ListAlertsExecute(r ApiListAlertsRequest) (*ListAlerts200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAlerts200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.ListAlerts") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAllAlertLogsRequest struct { + ctx context.Context + ApiService *AlertsAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListAllAlertLogsRequest) Page(page int32) ApiListAllAlertLogsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListAllAlertLogsRequest) Limit(limit int32) ApiListAllAlertLogsRequest { + r.limit = &limit + return r +} + +func (r ApiListAllAlertLogsRequest) Execute() (*ListAlertLogs200Response, *http.Response, error) { + return r.ApiService.ListAllAlertLogsExecute(r) +} + +/* +ListAllAlertLogs Method for ListAllAlertLogs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAllAlertLogsRequest +*/ +func (a *AlertsAPIService) ListAllAlertLogs(ctx context.Context) ApiListAllAlertLogsRequest { + return ApiListAllAlertLogsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListAlertLogs200Response +func (a *AlertsAPIService) ListAllAlertLogsExecute(r ApiListAllAlertLogsRequest) (*ListAlertLogs200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAlertLogs200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.ListAllAlertLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/all/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPreviewAlertGraphRequest struct { + ctx context.Context + ApiService *AlertsAPIService + userAlertMonitor *UserAlertMonitor +} + +func (r ApiPreviewAlertGraphRequest) UserAlertMonitor(userAlertMonitor UserAlertMonitor) ApiPreviewAlertGraphRequest { + r.userAlertMonitor = &userAlertMonitor + return r +} + +func (r ApiPreviewAlertGraphRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.PreviewAlertGraphExecute(r) +} + +/* +PreviewAlertGraph Method for PreviewAlertGraph + +Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. +Accepts monitor configuration in the request body. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiPreviewAlertGraphRequest +*/ +func (a *AlertsAPIService) PreviewAlertGraph(ctx context.Context) ApiPreviewAlertGraphRequest { + return ApiPreviewAlertGraphRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *AlertsAPIService) PreviewAlertGraphExecute(r ApiPreviewAlertGraphRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.PreviewAlertGraph") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/preview-graph/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitor == nil { + return localVarReturnValue, nil, reportError("userAlertMonitor is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitor + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiResolveAlertLogsRequest struct { + ctx context.Context + ApiService *AlertsAPIService + userAlertMonitorLog *UserAlertMonitorLog +} + +func (r ApiResolveAlertLogsRequest) UserAlertMonitorLog(userAlertMonitorLog UserAlertMonitorLog) ApiResolveAlertLogsRequest { + r.userAlertMonitorLog = &userAlertMonitorLog + return r +} + +func (r ApiResolveAlertLogsRequest) Execute() (*UserAlertMonitorLog, *http.Response, error) { + return r.ApiService.ResolveAlertLogsExecute(r) +} + +/* +ResolveAlertLogs Method for ResolveAlertLogs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiResolveAlertLogsRequest +*/ +func (a *AlertsAPIService) ResolveAlertLogs(ctx context.Context) ApiResolveAlertLogsRequest { + return ApiResolveAlertLogsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorLog +func (a *AlertsAPIService) ResolveAlertLogsExecute(r ApiResolveAlertLogsRequest) (*UserAlertMonitorLog, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.ResolveAlertLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/resolve/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitorLog == nil { + return localVarReturnValue, nil, reportError("userAlertMonitorLog is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitorLog + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAlertRequest struct { + ctx context.Context + ApiService *AlertsAPIService + id string + userAlertMonitor *UserAlertMonitor +} + +func (r ApiUpdateAlertRequest) UserAlertMonitor(userAlertMonitor UserAlertMonitor) ApiUpdateAlertRequest { + r.userAlertMonitor = &userAlertMonitor + return r +} + +func (r ApiUpdateAlertRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.UpdateAlertExecute(r) +} + +/* +UpdateAlert Method for UpdateAlert + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiUpdateAlertRequest +*/ +func (a *AlertsAPIService) UpdateAlert(ctx context.Context, id string) ApiUpdateAlertRequest { + return ApiUpdateAlertRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *AlertsAPIService) UpdateAlertExecute(r ApiUpdateAlertRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertsAPIService.UpdateAlert") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitor == nil { + return localVarReturnValue, nil, reportError("userAlertMonitor is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitor + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_annotation_queue_discussion.go b/go/futureagi/api_annotation_queue_discussion.go new file mode 100644 index 0000000..879b193 --- /dev/null +++ b/go/futureagi/api_annotation_queue_discussion.go @@ -0,0 +1,1071 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// AnnotationQueueDiscussionAPIService AnnotationQueueDiscussionAPI service +type AnnotationQueueDiscussionAPIService service + +type ApiCreateAnnotationQueueItemCommentRequest struct { + ctx context.Context + ApiService *AnnotationQueueDiscussionAPIService + queueId string + id string + discussionCommentRequest *DiscussionCommentRequest +} + +func (r ApiCreateAnnotationQueueItemCommentRequest) DiscussionCommentRequest(discussionCommentRequest DiscussionCommentRequest) ApiCreateAnnotationQueueItemCommentRequest { + r.discussionCommentRequest = &discussionCommentRequest + return r +} + +func (r ApiCreateAnnotationQueueItemCommentRequest) Execute() (*QueueDiscussionResponse, *http.Response, error) { + return r.ApiService.CreateAnnotationQueueItemCommentExecute(r) +} + +/* +CreateAnnotationQueueItemComment Method for CreateAnnotationQueueItemComment + +List or create non-blocking discussion comments for a queue item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiCreateAnnotationQueueItemCommentRequest +*/ +func (a *AnnotationQueueDiscussionAPIService) CreateAnnotationQueueItemComment(ctx context.Context, queueId string, id string) ApiCreateAnnotationQueueItemCommentRequest { + return ApiCreateAnnotationQueueItemCommentRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueDiscussionResponse +func (a *AnnotationQueueDiscussionAPIService) CreateAnnotationQueueItemCommentExecute(r ApiCreateAnnotationQueueItemCommentRequest) (*QueueDiscussionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueDiscussionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueDiscussionAPIService.CreateAnnotationQueueItemComment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.discussionCommentRequest == nil { + return localVarReturnValue, nil, reportError("discussionCommentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.discussionCommentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAnnotationQueueItemDiscussionRequest struct { + ctx context.Context + ApiService *AnnotationQueueDiscussionAPIService + queueId string + id string +} + +func (r ApiListAnnotationQueueItemDiscussionRequest) Execute() (*QueueDiscussionResponse, *http.Response, error) { + return r.ApiService.ListAnnotationQueueItemDiscussionExecute(r) +} + +/* +ListAnnotationQueueItemDiscussion Method for ListAnnotationQueueItemDiscussion + +List or create non-blocking discussion comments for a queue item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiListAnnotationQueueItemDiscussionRequest +*/ +func (a *AnnotationQueueDiscussionAPIService) ListAnnotationQueueItemDiscussion(ctx context.Context, queueId string, id string) ApiListAnnotationQueueItemDiscussionRequest { + return ApiListAnnotationQueueItemDiscussionRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueDiscussionResponse +func (a *AnnotationQueueDiscussionAPIService) ListAnnotationQueueItemDiscussionExecute(r ApiListAnnotationQueueItemDiscussionRequest) (*QueueDiscussionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueDiscussionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueDiscussionAPIService.ListAnnotationQueueItemDiscussion") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiReopenAnnotationQueueItemThreadRequest struct { + ctx context.Context + ApiService *AnnotationQueueDiscussionAPIService + queueId string + id string + threadId string + discussionThreadStatusRequest *DiscussionThreadStatusRequest +} + +func (r ApiReopenAnnotationQueueItemThreadRequest) DiscussionThreadStatusRequest(discussionThreadStatusRequest DiscussionThreadStatusRequest) ApiReopenAnnotationQueueItemThreadRequest { + r.discussionThreadStatusRequest = &discussionThreadStatusRequest + return r +} + +func (r ApiReopenAnnotationQueueItemThreadRequest) Execute() (*QueueDiscussionResponse, *http.Response, error) { + return r.ApiService.ReopenAnnotationQueueItemThreadExecute(r) +} + +/* +ReopenAnnotationQueueItemThread Method for ReopenAnnotationQueueItemThread + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @param threadId + @return ApiReopenAnnotationQueueItemThreadRequest +*/ +func (a *AnnotationQueueDiscussionAPIService) ReopenAnnotationQueueItemThread(ctx context.Context, queueId string, id string, threadId string) ApiReopenAnnotationQueueItemThreadRequest { + return ApiReopenAnnotationQueueItemThreadRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + threadId: threadId, + } +} + +// Execute executes the request +// +// @return QueueDiscussionResponse +func (a *AnnotationQueueDiscussionAPIService) ReopenAnnotationQueueItemThreadExecute(r ApiReopenAnnotationQueueItemThreadRequest) (*QueueDiscussionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueDiscussionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueDiscussionAPIService.ReopenAnnotationQueueItemThread") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.discussionThreadStatusRequest == nil { + return localVarReturnValue, nil, reportError("discussionThreadStatusRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.discussionThreadStatusRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiResolveAnnotationQueueItemThreadRequest struct { + ctx context.Context + ApiService *AnnotationQueueDiscussionAPIService + queueId string + id string + threadId string + discussionThreadStatusRequest *DiscussionThreadStatusRequest +} + +func (r ApiResolveAnnotationQueueItemThreadRequest) DiscussionThreadStatusRequest(discussionThreadStatusRequest DiscussionThreadStatusRequest) ApiResolveAnnotationQueueItemThreadRequest { + r.discussionThreadStatusRequest = &discussionThreadStatusRequest + return r +} + +func (r ApiResolveAnnotationQueueItemThreadRequest) Execute() (*QueueDiscussionResponse, *http.Response, error) { + return r.ApiService.ResolveAnnotationQueueItemThreadExecute(r) +} + +/* +ResolveAnnotationQueueItemThread Method for ResolveAnnotationQueueItemThread + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @param threadId + @return ApiResolveAnnotationQueueItemThreadRequest +*/ +func (a *AnnotationQueueDiscussionAPIService) ResolveAnnotationQueueItemThread(ctx context.Context, queueId string, id string, threadId string) ApiResolveAnnotationQueueItemThreadRequest { + return ApiResolveAnnotationQueueItemThreadRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + threadId: threadId, + } +} + +// Execute executes the request +// +// @return QueueDiscussionResponse +func (a *AnnotationQueueDiscussionAPIService) ResolveAnnotationQueueItemThreadExecute(r ApiResolveAnnotationQueueItemThreadRequest) (*QueueDiscussionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueDiscussionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueDiscussionAPIService.ResolveAnnotationQueueItemThread") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.discussionThreadStatusRequest == nil { + return localVarReturnValue, nil, reportError("discussionThreadStatusRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.discussionThreadStatusRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiToggleAnnotationQueueItemCommentReactionRequest struct { + ctx context.Context + ApiService *AnnotationQueueDiscussionAPIService + queueId string + id string + commentId string + discussionReactionRequest *DiscussionReactionRequest +} + +func (r ApiToggleAnnotationQueueItemCommentReactionRequest) DiscussionReactionRequest(discussionReactionRequest DiscussionReactionRequest) ApiToggleAnnotationQueueItemCommentReactionRequest { + r.discussionReactionRequest = &discussionReactionRequest + return r +} + +func (r ApiToggleAnnotationQueueItemCommentReactionRequest) Execute() (*QueueDiscussionResponse, *http.Response, error) { + return r.ApiService.ToggleAnnotationQueueItemCommentReactionExecute(r) +} + +/* +ToggleAnnotationQueueItemCommentReaction Method for ToggleAnnotationQueueItemCommentReaction + +Toggle the current user's reaction on a discussion comment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @param commentId + @return ApiToggleAnnotationQueueItemCommentReactionRequest +*/ +func (a *AnnotationQueueDiscussionAPIService) ToggleAnnotationQueueItemCommentReaction(ctx context.Context, queueId string, id string, commentId string) ApiToggleAnnotationQueueItemCommentReactionRequest { + return ApiToggleAnnotationQueueItemCommentReactionRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + commentId: commentId, + } +} + +// Execute executes the request +// +// @return QueueDiscussionResponse +func (a *AnnotationQueueDiscussionAPIService) ToggleAnnotationQueueItemCommentReactionExecute(r ApiToggleAnnotationQueueItemCommentReactionRequest) (*QueueDiscussionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueDiscussionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueDiscussionAPIService.ToggleAnnotationQueueItemCommentReaction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"comment_id"+"}", url.PathEscape(parameterValueToString(r.commentId, "commentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.discussionReactionRequest == nil { + return localVarReturnValue, nil, reportError("discussionReactionRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.discussionReactionRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_annotation_queue_items.go b/go/futureagi/api_annotation_queue_items.go new file mode 100644 index 0000000..25d87e7 --- /dev/null +++ b/go/futureagi/api_annotation_queue_items.go @@ -0,0 +1,2614 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// AnnotationQueueItemsAPIService AnnotationQueueItemsAPI service +type AnnotationQueueItemsAPIService service + +type ApiAddAnnotationQueueItemsRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + addItems *AddItems +} + +func (r ApiAddAnnotationQueueItemsRequest) AddItems(addItems AddItems) ApiAddAnnotationQueueItemsRequest { + r.addItems = &addItems + return r +} + +func (r ApiAddAnnotationQueueItemsRequest) Execute() (*QueueAddItemsResponse, *http.Response, error) { + return r.ApiService.AddAnnotationQueueItemsExecute(r) +} + +/* +AddAnnotationQueueItems Method for AddAnnotationQueueItems + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiAddAnnotationQueueItemsRequest +*/ +func (a *AnnotationQueueItemsAPIService) AddAnnotationQueueItems(ctx context.Context, queueId string) ApiAddAnnotationQueueItemsRequest { + return ApiAddAnnotationQueueItemsRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return QueueAddItemsResponse +func (a *AnnotationQueueItemsAPIService) AddAnnotationQueueItemsExecute(r ApiAddAnnotationQueueItemsRequest) (*QueueAddItemsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueAddItemsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.AddAnnotationQueueItems") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/add-items/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addItems == nil { + return localVarReturnValue, nil, reportError("addItems is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addItems + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiSelectionTooLargeError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAssignAnnotationQueueItemsRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + assignItems *AssignItems +} + +func (r ApiAssignAnnotationQueueItemsRequest) AssignItems(assignItems AssignItems) ApiAssignAnnotationQueueItemsRequest { + r.assignItems = &assignItems + return r +} + +func (r ApiAssignAnnotationQueueItemsRequest) Execute() (*QueueAssignItemsResponse, *http.Response, error) { + return r.ApiService.AssignAnnotationQueueItemsExecute(r) +} + +/* +AssignAnnotationQueueItems Method for AssignAnnotationQueueItems + +Assign items to one or more annotators. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiAssignAnnotationQueueItemsRequest +*/ +func (a *AnnotationQueueItemsAPIService) AssignAnnotationQueueItems(ctx context.Context, queueId string) ApiAssignAnnotationQueueItemsRequest { + return ApiAssignAnnotationQueueItemsRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return QueueAssignItemsResponse +func (a *AnnotationQueueItemsAPIService) AssignAnnotationQueueItemsExecute(r ApiAssignAnnotationQueueItemsRequest) (*QueueAssignItemsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueAssignItemsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.AssignAnnotationQueueItems") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/assign/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.assignItems == nil { + return localVarReturnValue, nil, reportError("assignItems is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assignItems + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCompleteAnnotationQueueItemRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + id string + queueItemNavigationRequest *QueueItemNavigationRequest +} + +func (r ApiCompleteAnnotationQueueItemRequest) QueueItemNavigationRequest(queueItemNavigationRequest QueueItemNavigationRequest) ApiCompleteAnnotationQueueItemRequest { + r.queueItemNavigationRequest = &queueItemNavigationRequest + return r +} + +func (r ApiCompleteAnnotationQueueItemRequest) Execute() (*QueueNavigationResponse, *http.Response, error) { + return r.ApiService.CompleteAnnotationQueueItemExecute(r) +} + +/* +CompleteAnnotationQueueItem Method for CompleteAnnotationQueueItem + +Mark item as completed and return next pending item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiCompleteAnnotationQueueItemRequest +*/ +func (a *AnnotationQueueItemsAPIService) CompleteAnnotationQueueItem(ctx context.Context, queueId string, id string) ApiCompleteAnnotationQueueItemRequest { + return ApiCompleteAnnotationQueueItemRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueNavigationResponse +func (a *AnnotationQueueItemsAPIService) CompleteAnnotationQueueItemExecute(r ApiCompleteAnnotationQueueItemRequest) (*QueueNavigationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueNavigationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.CompleteAnnotationQueueItem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/complete/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueItemNavigationRequest == nil { + return localVarReturnValue, nil, reportError("queueItemNavigationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueItemNavigationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAnnotationQueueItemDetailRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + id string + annotatorId *string + includeCompleted *bool + viewMode *string + reviewStatus *string + excludeReviewStatus *string + includeAllAnnotations *bool + reserve *bool +} + +func (r ApiGetAnnotationQueueItemDetailRequest) AnnotatorId(annotatorId string) ApiGetAnnotationQueueItemDetailRequest { + r.annotatorId = &annotatorId + return r +} + +func (r ApiGetAnnotationQueueItemDetailRequest) IncludeCompleted(includeCompleted bool) ApiGetAnnotationQueueItemDetailRequest { + r.includeCompleted = &includeCompleted + return r +} + +func (r ApiGetAnnotationQueueItemDetailRequest) ViewMode(viewMode string) ApiGetAnnotationQueueItemDetailRequest { + r.viewMode = &viewMode + return r +} + +func (r ApiGetAnnotationQueueItemDetailRequest) ReviewStatus(reviewStatus string) ApiGetAnnotationQueueItemDetailRequest { + r.reviewStatus = &reviewStatus + return r +} + +func (r ApiGetAnnotationQueueItemDetailRequest) ExcludeReviewStatus(excludeReviewStatus string) ApiGetAnnotationQueueItemDetailRequest { + r.excludeReviewStatus = &excludeReviewStatus + return r +} + +func (r ApiGetAnnotationQueueItemDetailRequest) IncludeAllAnnotations(includeAllAnnotations bool) ApiGetAnnotationQueueItemDetailRequest { + r.includeAllAnnotations = &includeAllAnnotations + return r +} + +func (r ApiGetAnnotationQueueItemDetailRequest) Reserve(reserve bool) ApiGetAnnotationQueueItemDetailRequest { + r.reserve = &reserve + return r +} + +func (r ApiGetAnnotationQueueItemDetailRequest) Execute() (*QueueAnnotateDetailResponse, *http.Response, error) { + return r.ApiService.GetAnnotationQueueItemDetailExecute(r) +} + +/* +GetAnnotationQueueItemDetail Method for GetAnnotationQueueItemDetail + +Get full annotation workspace data for an item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiGetAnnotationQueueItemDetailRequest +*/ +func (a *AnnotationQueueItemsAPIService) GetAnnotationQueueItemDetail(ctx context.Context, queueId string, id string) ApiGetAnnotationQueueItemDetailRequest { + return ApiGetAnnotationQueueItemDetailRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueAnnotateDetailResponse +func (a *AnnotationQueueItemsAPIService) GetAnnotationQueueItemDetailExecute(r ApiGetAnnotationQueueItemDetailRequest) (*QueueAnnotateDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueAnnotateDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.GetAnnotationQueueItemDetail") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.annotatorId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "annotator_id", r.annotatorId, "form", "") + } + if r.includeCompleted != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include_completed", r.includeCompleted, "form", "") + } + if r.viewMode != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "view_mode", r.viewMode, "form", "") + } + if r.reviewStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "review_status", r.reviewStatus, "form", "") + } + if r.excludeReviewStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_review_status", r.excludeReviewStatus, "form", "") + } + if r.includeAllAnnotations != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include_all_annotations", r.includeAllAnnotations, "form", "") + } + if r.reserve != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "reserve", r.reserve, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetNextAnnotationQueueItemRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + page *int32 + limit *int32 + exclude *string + before *string + reviewStatus *string + excludeReviewStatus *string + includeCompleted *bool + viewMode *string + includeAllAnnotations *bool +} + +// A page number within the paginated result set. +func (r ApiGetNextAnnotationQueueItemRequest) Page(page int32) ApiGetNextAnnotationQueueItemRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiGetNextAnnotationQueueItemRequest) Limit(limit int32) ApiGetNextAnnotationQueueItemRequest { + r.limit = &limit + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) Exclude(exclude string) ApiGetNextAnnotationQueueItemRequest { + r.exclude = &exclude + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) Before(before string) ApiGetNextAnnotationQueueItemRequest { + r.before = &before + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) ReviewStatus(reviewStatus string) ApiGetNextAnnotationQueueItemRequest { + r.reviewStatus = &reviewStatus + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) ExcludeReviewStatus(excludeReviewStatus string) ApiGetNextAnnotationQueueItemRequest { + r.excludeReviewStatus = &excludeReviewStatus + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) IncludeCompleted(includeCompleted bool) ApiGetNextAnnotationQueueItemRequest { + r.includeCompleted = &includeCompleted + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) ViewMode(viewMode string) ApiGetNextAnnotationQueueItemRequest { + r.viewMode = &viewMode + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) IncludeAllAnnotations(includeAllAnnotations bool) ApiGetNextAnnotationQueueItemRequest { + r.includeAllAnnotations = &includeAllAnnotations + return r +} + +func (r ApiGetNextAnnotationQueueItemRequest) Execute() (*QueueNextItemResponse, *http.Response, error) { + return r.ApiService.GetNextAnnotationQueueItemExecute(r) +} + +/* +GetNextAnnotationQueueItem Get the next or previous item in the queue. + +Query params: + + exclude: comma-separated item IDs to skip + before: item ID — returns the item immediately before this one in order + review_status: optional review status filter (for reviewer queues) + exclude_review_status: optional review status to omit (for annotator queues) + include_completed: when true, navigation can visit completed items too + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiGetNextAnnotationQueueItemRequest +*/ +func (a *AnnotationQueueItemsAPIService) GetNextAnnotationQueueItem(ctx context.Context, queueId string) ApiGetNextAnnotationQueueItemRequest { + return ApiGetNextAnnotationQueueItemRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return QueueNextItemResponse +func (a *AnnotationQueueItemsAPIService) GetNextAnnotationQueueItemExecute(r ApiGetNextAnnotationQueueItemRequest) (*QueueNextItemResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueNextItemResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.GetNextAnnotationQueueItem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/next-item/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.exclude != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "form", "") + } + if r.before != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "before", r.before, "form", "") + } + if r.reviewStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "review_status", r.reviewStatus, "form", "") + } + if r.excludeReviewStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_review_status", r.excludeReviewStatus, "form", "") + } + if r.includeCompleted != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include_completed", r.includeCompleted, "form", "") + } + if r.viewMode != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "view_mode", r.viewMode, "form", "") + } + if r.includeAllAnnotations != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include_all_annotations", r.includeAllAnnotations, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiImportAnnotationQueueItemAnnotationsRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + id string + importAnnotations *ImportAnnotations +} + +func (r ApiImportAnnotationQueueItemAnnotationsRequest) ImportAnnotations(importAnnotations ImportAnnotations) ApiImportAnnotationQueueItemAnnotationsRequest { + r.importAnnotations = &importAnnotations + return r +} + +func (r ApiImportAnnotationQueueItemAnnotationsRequest) Execute() (*QueueImportAnnotationsResponse, *http.Response, error) { + return r.ApiService.ImportAnnotationQueueItemAnnotationsExecute(r) +} + +/* +ImportAnnotationQueueItemAnnotations Method for ImportAnnotationQueueItemAnnotations + +Import annotations from external sources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiImportAnnotationQueueItemAnnotationsRequest +*/ +func (a *AnnotationQueueItemsAPIService) ImportAnnotationQueueItemAnnotations(ctx context.Context, queueId string, id string) ApiImportAnnotationQueueItemAnnotationsRequest { + return ApiImportAnnotationQueueItemAnnotationsRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueImportAnnotationsResponse +func (a *AnnotationQueueItemsAPIService) ImportAnnotationQueueItemAnnotationsExecute(r ApiImportAnnotationQueueItemAnnotationsRequest) (*QueueImportAnnotationsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueImportAnnotationsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.ImportAnnotationQueueItemAnnotations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.importAnnotations == nil { + return localVarReturnValue, nil, reportError("importAnnotations is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.importAnnotations + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAnnotationQueueItemAnnotationsRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + id string +} + +func (r ApiListAnnotationQueueItemAnnotationsRequest) Execute() (*QueueItemAnnotationsResponse, *http.Response, error) { + return r.ApiService.ListAnnotationQueueItemAnnotationsExecute(r) +} + +/* +ListAnnotationQueueItemAnnotations Method for ListAnnotationQueueItemAnnotations + +List all annotations for a queue item (across all annotators). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiListAnnotationQueueItemAnnotationsRequest +*/ +func (a *AnnotationQueueItemsAPIService) ListAnnotationQueueItemAnnotations(ctx context.Context, queueId string, id string) ApiListAnnotationQueueItemAnnotationsRequest { + return ApiListAnnotationQueueItemAnnotationsRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueItemAnnotationsResponse +func (a *AnnotationQueueItemsAPIService) ListAnnotationQueueItemAnnotationsExecute(r ApiListAnnotationQueueItemAnnotationsRequest) (*QueueItemAnnotationsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueItemAnnotationsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.ListAnnotationQueueItemAnnotations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAnnotationQueueItemsRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + page *int32 + limit *int32 + status *[]string + sourceType *[]string + assignedTo *string + reviewStatus *string + ordering *string +} + +// A page number within the paginated result set. +func (r ApiListAnnotationQueueItemsRequest) Page(page int32) ApiListAnnotationQueueItemsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListAnnotationQueueItemsRequest) Limit(limit int32) ApiListAnnotationQueueItemsRequest { + r.limit = &limit + return r +} + +func (r ApiListAnnotationQueueItemsRequest) Status(status []string) ApiListAnnotationQueueItemsRequest { + r.status = &status + return r +} + +func (r ApiListAnnotationQueueItemsRequest) SourceType(sourceType []string) ApiListAnnotationQueueItemsRequest { + r.sourceType = &sourceType + return r +} + +func (r ApiListAnnotationQueueItemsRequest) AssignedTo(assignedTo string) ApiListAnnotationQueueItemsRequest { + r.assignedTo = &assignedTo + return r +} + +func (r ApiListAnnotationQueueItemsRequest) ReviewStatus(reviewStatus string) ApiListAnnotationQueueItemsRequest { + r.reviewStatus = &reviewStatus + return r +} + +func (r ApiListAnnotationQueueItemsRequest) Ordering(ordering string) ApiListAnnotationQueueItemsRequest { + r.ordering = &ordering + return r +} + +func (r ApiListAnnotationQueueItemsRequest) Execute() (*ListAnnotationQueueItems200Response, *http.Response, error) { + return r.ApiService.ListAnnotationQueueItemsExecute(r) +} + +/* +ListAnnotationQueueItems Method for ListAnnotationQueueItems + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiListAnnotationQueueItemsRequest +*/ +func (a *AnnotationQueueItemsAPIService) ListAnnotationQueueItems(ctx context.Context, queueId string) ApiListAnnotationQueueItemsRequest { + return ApiListAnnotationQueueItemsRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return ListAnnotationQueueItems200Response +func (a *AnnotationQueueItemsAPIService) ListAnnotationQueueItemsExecute(r ApiListAnnotationQueueItemsRequest) (*ListAnnotationQueueItems200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAnnotationQueueItems200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.ListAnnotationQueueItems") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "csv") + } + if r.sourceType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source_type", r.sourceType, "form", "csv") + } + if r.assignedTo != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "assigned_to", r.assignedTo, "form", "") + } + if r.reviewStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "review_status", r.reviewStatus, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiReleaseAnnotationQueueItemRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + id string + body *map[string]interface{} +} + +func (r ApiReleaseAnnotationQueueItemRequest) Body(body map[string]interface{}) ApiReleaseAnnotationQueueItemRequest { + r.body = &body + return r +} + +func (r ApiReleaseAnnotationQueueItemRequest) Execute() (*QueueReleaseReservationResponse, *http.Response, error) { + return r.ApiService.ReleaseAnnotationQueueItemExecute(r) +} + +/* +ReleaseAnnotationQueueItem Method for ReleaseAnnotationQueueItem + +Release reservation on an item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiReleaseAnnotationQueueItemRequest +*/ +func (a *AnnotationQueueItemsAPIService) ReleaseAnnotationQueueItem(ctx context.Context, queueId string, id string) ApiReleaseAnnotationQueueItemRequest { + return ApiReleaseAnnotationQueueItemRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueReleaseReservationResponse +func (a *AnnotationQueueItemsAPIService) ReleaseAnnotationQueueItemExecute(r ApiReleaseAnnotationQueueItemRequest) (*QueueReleaseReservationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueReleaseReservationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.ReleaseAnnotationQueueItem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/release/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveAnnotationQueueItemsRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + bulkRemoveItems *BulkRemoveItems +} + +func (r ApiRemoveAnnotationQueueItemsRequest) BulkRemoveItems(bulkRemoveItems BulkRemoveItems) ApiRemoveAnnotationQueueItemsRequest { + r.bulkRemoveItems = &bulkRemoveItems + return r +} + +func (r ApiRemoveAnnotationQueueItemsRequest) Execute() (*QueueBulkRemoveItemsResponse, *http.Response, error) { + return r.ApiService.RemoveAnnotationQueueItemsExecute(r) +} + +/* +RemoveAnnotationQueueItems Method for RemoveAnnotationQueueItems + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiRemoveAnnotationQueueItemsRequest +*/ +func (a *AnnotationQueueItemsAPIService) RemoveAnnotationQueueItems(ctx context.Context, queueId string) ApiRemoveAnnotationQueueItemsRequest { + return ApiRemoveAnnotationQueueItemsRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return QueueBulkRemoveItemsResponse +func (a *AnnotationQueueItemsAPIService) RemoveAnnotationQueueItemsExecute(r ApiRemoveAnnotationQueueItemsRequest) (*QueueBulkRemoveItemsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueBulkRemoveItemsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.RemoveAnnotationQueueItems") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/bulk-remove/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.bulkRemoveItems == nil { + return localVarReturnValue, nil, reportError("bulkRemoveItems is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.bulkRemoveItems + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSkipAnnotationQueueItemRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + id string + queueItemNavigationRequest *QueueItemNavigationRequest +} + +func (r ApiSkipAnnotationQueueItemRequest) QueueItemNavigationRequest(queueItemNavigationRequest QueueItemNavigationRequest) ApiSkipAnnotationQueueItemRequest { + r.queueItemNavigationRequest = &queueItemNavigationRequest + return r +} + +func (r ApiSkipAnnotationQueueItemRequest) Execute() (*QueueNavigationResponse, *http.Response, error) { + return r.ApiService.SkipAnnotationQueueItemExecute(r) +} + +/* +SkipAnnotationQueueItem Method for SkipAnnotationQueueItem + +Mark item as skipped and return next pending item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiSkipAnnotationQueueItemRequest +*/ +func (a *AnnotationQueueItemsAPIService) SkipAnnotationQueueItem(ctx context.Context, queueId string, id string) ApiSkipAnnotationQueueItemRequest { + return ApiSkipAnnotationQueueItemRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueNavigationResponse +func (a *AnnotationQueueItemsAPIService) SkipAnnotationQueueItemExecute(r ApiSkipAnnotationQueueItemRequest) (*QueueNavigationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueNavigationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.SkipAnnotationQueueItem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/skip/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueItemNavigationRequest == nil { + return localVarReturnValue, nil, reportError("queueItemNavigationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueItemNavigationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSubmitAnnotationQueueItemAnnotationsRequest struct { + ctx context.Context + ApiService *AnnotationQueueItemsAPIService + queueId string + id string + submitAnnotations *SubmitAnnotations +} + +func (r ApiSubmitAnnotationQueueItemAnnotationsRequest) SubmitAnnotations(submitAnnotations SubmitAnnotations) ApiSubmitAnnotationQueueItemAnnotationsRequest { + r.submitAnnotations = &submitAnnotations + return r +} + +func (r ApiSubmitAnnotationQueueItemAnnotationsRequest) Execute() (*QueueSubmitAnnotationsResponse, *http.Response, error) { + return r.ApiService.SubmitAnnotationQueueItemAnnotationsExecute(r) +} + +/* +SubmitAnnotationQueueItemAnnotations Method for SubmitAnnotationQueueItemAnnotations + +Submit or update annotations for a queue item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiSubmitAnnotationQueueItemAnnotationsRequest +*/ +func (a *AnnotationQueueItemsAPIService) SubmitAnnotationQueueItemAnnotations(ctx context.Context, queueId string, id string) ApiSubmitAnnotationQueueItemAnnotationsRequest { + return ApiSubmitAnnotationQueueItemAnnotationsRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueSubmitAnnotationsResponse +func (a *AnnotationQueueItemsAPIService) SubmitAnnotationQueueItemAnnotationsExecute(r ApiSubmitAnnotationQueueItemAnnotationsRequest) (*QueueSubmitAnnotationsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueSubmitAnnotationsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueItemsAPIService.SubmitAnnotationQueueItemAnnotations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.submitAnnotations == nil { + return localVarReturnValue, nil, reportError("submitAnnotations is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.submitAnnotations + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_annotation_queue_review.go b/go/futureagi/api_annotation_queue_review.go new file mode 100644 index 0000000..7c1e821 --- /dev/null +++ b/go/futureagi/api_annotation_queue_review.go @@ -0,0 +1,234 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// AnnotationQueueReviewAPIService AnnotationQueueReviewAPI service +type AnnotationQueueReviewAPIService service + +type ApiReviewAnnotationQueueItemRequest struct { + ctx context.Context + ApiService *AnnotationQueueReviewAPIService + queueId string + id string + reviewItemRequest *ReviewItemRequest +} + +func (r ApiReviewAnnotationQueueItemRequest) ReviewItemRequest(reviewItemRequest ReviewItemRequest) ApiReviewAnnotationQueueItemRequest { + r.reviewItemRequest = &reviewItemRequest + return r +} + +func (r ApiReviewAnnotationQueueItemRequest) Execute() (*QueueReviewItemResponse, *http.Response, error) { + return r.ApiService.ReviewAnnotationQueueItemExecute(r) +} + +/* +ReviewAnnotationQueueItem Method for ReviewAnnotationQueueItem + +Approve, request changes, or leave reviewer feedback on an item. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiReviewAnnotationQueueItemRequest +*/ +func (a *AnnotationQueueReviewAPIService) ReviewAnnotationQueueItem(ctx context.Context, queueId string, id string) ApiReviewAnnotationQueueItemRequest { + return ApiReviewAnnotationQueueItemRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueReviewItemResponse +func (a *AnnotationQueueReviewAPIService) ReviewAnnotationQueueItemExecute(r ApiReviewAnnotationQueueItemRequest) (*QueueReviewItemResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueReviewItemResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueueReviewAPIService.ReviewAnnotationQueueItem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/review/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.reviewItemRequest == nil { + return localVarReturnValue, nil, reportError("reviewItemRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.reviewItemRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_annotation_queues.go b/go/futureagi/api_annotation_queues.go new file mode 100644 index 0000000..de3b300 --- /dev/null +++ b/go/futureagi/api_annotation_queues.go @@ -0,0 +1,2586 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// AnnotationQueuesAPIService AnnotationQueuesAPI service +type AnnotationQueuesAPIService service + +type ApiAddAnnotationQueueLabelRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string + queueLabelRequest *QueueLabelRequest +} + +func (r ApiAddAnnotationQueueLabelRequest) QueueLabelRequest(queueLabelRequest QueueLabelRequest) ApiAddAnnotationQueueLabelRequest { + r.queueLabelRequest = &queueLabelRequest + return r +} + +func (r ApiAddAnnotationQueueLabelRequest) Execute() (*QueueAddLabelResponse, *http.Response, error) { + return r.ApiService.AddAnnotationQueueLabelExecute(r) +} + +/* +AddAnnotationQueueLabel Method for AddAnnotationQueueLabel + +Add a label to an annotation queue. +Labels apply to all sources in the queue's project (for default queues). +Queue items are created lazily when someone actually annotates. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiAddAnnotationQueueLabelRequest +*/ +func (a *AnnotationQueuesAPIService) AddAnnotationQueueLabel(ctx context.Context, id string) ApiAddAnnotationQueueLabelRequest { + return ApiAddAnnotationQueueLabelRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueAddLabelResponse +func (a *AnnotationQueuesAPIService) AddAnnotationQueueLabelExecute(r ApiAddAnnotationQueueLabelRequest) (*QueueAddLabelResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueAddLabelResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.AddAnnotationQueueLabel") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/add-label/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueLabelRequest == nil { + return localVarReturnValue, nil, reportError("queueLabelRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueLabelRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArchiveAnnotationQueueRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string +} + +func (r ApiArchiveAnnotationQueueRequest) Execute() (*http.Response, error) { + return r.ApiService.ArchiveAnnotationQueueExecute(r) +} + +/* +ArchiveAnnotationQueue Archive a queue (soft delete). + +“BaseModel.delete()“ flips “deleted=True“ instead of removing +the row. Attached automation rules go dormant (the scheduler +filters “queue__deleted=False“), items stay invisible but +recoverable, label bindings preserved. + +For truly destructive removal, use the “hard-delete“ action +below. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiArchiveAnnotationQueueRequest +*/ +func (a *AnnotationQueuesAPIService) ArchiveAnnotationQueue(ctx context.Context, id string) ApiArchiveAnnotationQueueRequest { + return ApiArchiveAnnotationQueueRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *AnnotationQueuesAPIService) ArchiveAnnotationQueueExecute(r ApiArchiveAnnotationQueueRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.ArchiveAnnotationQueue") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateAnnotationQueueRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + annotationQueue *AnnotationQueue +} + +func (r ApiCreateAnnotationQueueRequest) AnnotationQueue(annotationQueue AnnotationQueue) ApiCreateAnnotationQueueRequest { + r.annotationQueue = &annotationQueue + return r +} + +func (r ApiCreateAnnotationQueueRequest) Execute() (*AnnotationQueue, *http.Response, error) { + return r.ApiService.CreateAnnotationQueueExecute(r) +} + +/* +CreateAnnotationQueue Method for CreateAnnotationQueue + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAnnotationQueueRequest +*/ +func (a *AnnotationQueuesAPIService) CreateAnnotationQueue(ctx context.Context) ApiCreateAnnotationQueueRequest { + return ApiCreateAnnotationQueueRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AnnotationQueue +func (a *AnnotationQueuesAPIService) CreateAnnotationQueueExecute(r ApiCreateAnnotationQueueRequest) (*AnnotationQueue, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationQueue + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.CreateAnnotationQueue") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.annotationQueue == nil { + return localVarReturnValue, nil, reportError("annotationQueue is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.annotationQueue + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAnnotationQueueRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string + exportFormat *string + status *string +} + +func (r ApiExportAnnotationQueueRequest) ExportFormat(exportFormat string) ApiExportAnnotationQueueRequest { + r.exportFormat = &exportFormat + return r +} + +func (r ApiExportAnnotationQueueRequest) Status(status string) ApiExportAnnotationQueueRequest { + r.status = &status + return r +} + +func (r ApiExportAnnotationQueueRequest) Execute() (*QueueExportAnnotationsResponse, *http.Response, error) { + return r.ApiService.ExportAnnotationQueueExecute(r) +} + +/* +ExportAnnotationQueue Method for ExportAnnotationQueue + +Export all items with their annotations. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiExportAnnotationQueueRequest +*/ +func (a *AnnotationQueuesAPIService) ExportAnnotationQueue(ctx context.Context, id string) ApiExportAnnotationQueueRequest { + return ApiExportAnnotationQueueRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueExportAnnotationsResponse +func (a *AnnotationQueuesAPIService) ExportAnnotationQueueExecute(r ApiExportAnnotationQueueRequest) (*QueueExportAnnotationsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueExportAnnotationsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.ExportAnnotationQueue") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/export/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.exportFormat != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "export_format", r.exportFormat, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExportAnnotationQueueToDatasetRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string + queueExportToDatasetRequest *QueueExportToDatasetRequest +} + +func (r ApiExportAnnotationQueueToDatasetRequest) QueueExportToDatasetRequest(queueExportToDatasetRequest QueueExportToDatasetRequest) ApiExportAnnotationQueueToDatasetRequest { + r.queueExportToDatasetRequest = &queueExportToDatasetRequest + return r +} + +func (r ApiExportAnnotationQueueToDatasetRequest) Execute() (*QueueExportToDatasetResponse, *http.Response, error) { + return r.ApiService.ExportAnnotationQueueToDatasetExecute(r) +} + +/* +ExportAnnotationQueueToDataset Method for ExportAnnotationQueueToDataset + +Export queue items to a dataset using a user-editable column mapping. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiExportAnnotationQueueToDatasetRequest +*/ +func (a *AnnotationQueuesAPIService) ExportAnnotationQueueToDataset(ctx context.Context, id string) ApiExportAnnotationQueueToDatasetRequest { + return ApiExportAnnotationQueueToDatasetRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueExportToDatasetResponse +func (a *AnnotationQueuesAPIService) ExportAnnotationQueueToDatasetExecute(r ApiExportAnnotationQueueToDatasetRequest) (*QueueExportToDatasetResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueExportToDatasetResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.ExportAnnotationQueueToDataset") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/export-to-dataset/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueExportToDatasetRequest == nil { + return localVarReturnValue, nil, reportError("queueExportToDatasetRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueExportToDatasetRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAnnotationQueueRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string +} + +func (r ApiGetAnnotationQueueRequest) Execute() (*AnnotationQueue, *http.Response, error) { + return r.ApiService.GetAnnotationQueueExecute(r) +} + +/* +GetAnnotationQueue Method for GetAnnotationQueue + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiGetAnnotationQueueRequest +*/ +func (a *AnnotationQueuesAPIService) GetAnnotationQueue(ctx context.Context, id string) ApiGetAnnotationQueueRequest { + return ApiGetAnnotationQueueRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AnnotationQueue +func (a *AnnotationQueuesAPIService) GetAnnotationQueueExecute(r ApiGetAnnotationQueueRequest) (*AnnotationQueue, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationQueue + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.GetAnnotationQueue") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAnnotationQueueAgreementRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string +} + +func (r ApiGetAnnotationQueueAgreementRequest) Execute() (*QueueAgreementResponse, *http.Response, error) { + return r.ApiService.GetAnnotationQueueAgreementExecute(r) +} + +/* +GetAnnotationQueueAgreement Method for GetAnnotationQueueAgreement + +Calculate inter-annotator agreement metrics. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiGetAnnotationQueueAgreementRequest +*/ +func (a *AnnotationQueuesAPIService) GetAnnotationQueueAgreement(ctx context.Context, id string) ApiGetAnnotationQueueAgreementRequest { + return ApiGetAnnotationQueueAgreementRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueAgreementResponse +func (a *AnnotationQueuesAPIService) GetAnnotationQueueAgreementExecute(r ApiGetAnnotationQueueAgreementRequest) (*QueueAgreementResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueAgreementResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.GetAnnotationQueueAgreement") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/agreement/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAnnotationQueueAnalyticsRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string +} + +func (r ApiGetAnnotationQueueAnalyticsRequest) Execute() (*QueueAnalyticsResponse, *http.Response, error) { + return r.ApiService.GetAnnotationQueueAnalyticsExecute(r) +} + +/* +GetAnnotationQueueAnalytics Method for GetAnnotationQueueAnalytics + +Queue analytics: throughput, annotator performance, label distribution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiGetAnnotationQueueAnalyticsRequest +*/ +func (a *AnnotationQueuesAPIService) GetAnnotationQueueAnalytics(ctx context.Context, id string) ApiGetAnnotationQueueAnalyticsRequest { + return ApiGetAnnotationQueueAnalyticsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueAnalyticsResponse +func (a *AnnotationQueuesAPIService) GetAnnotationQueueAnalyticsExecute(r ApiGetAnnotationQueueAnalyticsRequest) (*QueueAnalyticsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueAnalyticsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.GetAnnotationQueueAnalytics") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/analytics/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAnnotationQueueProgressRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string +} + +func (r ApiGetAnnotationQueueProgressRequest) Execute() (*QueueProgressResponse, *http.Response, error) { + return r.ApiService.GetAnnotationQueueProgressExecute(r) +} + +/* +GetAnnotationQueueProgress Method for GetAnnotationQueueProgress + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiGetAnnotationQueueProgressRequest +*/ +func (a *AnnotationQueuesAPIService) GetAnnotationQueueProgress(ctx context.Context, id string) ApiGetAnnotationQueueProgressRequest { + return ApiGetAnnotationQueueProgressRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueProgressResponse +func (a *AnnotationQueuesAPIService) GetAnnotationQueueProgressExecute(r ApiGetAnnotationQueueProgressRequest) (*QueueProgressResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueProgressResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.GetAnnotationQueueProgress") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/progress/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAnnotationQueueExportFieldsRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string +} + +func (r ApiListAnnotationQueueExportFieldsRequest) Execute() (*QueueExportFieldsResponse, *http.Response, error) { + return r.ApiService.ListAnnotationQueueExportFieldsExecute(r) +} + +/* +ListAnnotationQueueExportFields Method for ListAnnotationQueueExportFields + +Return source/label/attribute fields available for dataset export. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiListAnnotationQueueExportFieldsRequest +*/ +func (a *AnnotationQueuesAPIService) ListAnnotationQueueExportFields(ctx context.Context, id string) ApiListAnnotationQueueExportFieldsRequest { + return ApiListAnnotationQueueExportFieldsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueExportFieldsResponse +func (a *AnnotationQueuesAPIService) ListAnnotationQueueExportFieldsExecute(r ApiListAnnotationQueueExportFieldsRequest) (*QueueExportFieldsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueExportFieldsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.ListAnnotationQueueExportFields") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/export-fields/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAnnotationQueuesRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + page *int32 + limit *int32 + status *string + search *string + includeCounts *bool +} + +// A page number within the paginated result set. +func (r ApiListAnnotationQueuesRequest) Page(page int32) ApiListAnnotationQueuesRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListAnnotationQueuesRequest) Limit(limit int32) ApiListAnnotationQueuesRequest { + r.limit = &limit + return r +} + +func (r ApiListAnnotationQueuesRequest) Status(status string) ApiListAnnotationQueuesRequest { + r.status = &status + return r +} + +func (r ApiListAnnotationQueuesRequest) Search(search string) ApiListAnnotationQueuesRequest { + r.search = &search + return r +} + +func (r ApiListAnnotationQueuesRequest) IncludeCounts(includeCounts bool) ApiListAnnotationQueuesRequest { + r.includeCounts = &includeCounts + return r +} + +func (r ApiListAnnotationQueuesRequest) Execute() (*ListAnnotationQueues200Response, *http.Response, error) { + return r.ApiService.ListAnnotationQueuesExecute(r) +} + +/* +ListAnnotationQueues Method for ListAnnotationQueues + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAnnotationQueuesRequest +*/ +func (a *AnnotationQueuesAPIService) ListAnnotationQueues(ctx context.Context) ApiListAnnotationQueuesRequest { + return ApiListAnnotationQueuesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListAnnotationQueues200Response +func (a *AnnotationQueuesAPIService) ListAnnotationQueuesExecute(r ApiListAnnotationQueuesRequest) (*ListAnnotationQueues200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAnnotationQueues200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.ListAnnotationQueues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.includeCounts != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include_counts", r.includeCounts, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveAnnotationQueueLabelRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string + queueLabelRequest *QueueLabelRequest +} + +func (r ApiRemoveAnnotationQueueLabelRequest) QueueLabelRequest(queueLabelRequest QueueLabelRequest) ApiRemoveAnnotationQueueLabelRequest { + r.queueLabelRequest = &queueLabelRequest + return r +} + +func (r ApiRemoveAnnotationQueueLabelRequest) Execute() (*QueueRemoveLabelResponse, *http.Response, error) { + return r.ApiService.RemoveAnnotationQueueLabelExecute(r) +} + +/* +RemoveAnnotationQueueLabel Method for RemoveAnnotationQueueLabel + +Remove a label from an annotation queue. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiRemoveAnnotationQueueLabelRequest +*/ +func (a *AnnotationQueuesAPIService) RemoveAnnotationQueueLabel(ctx context.Context, id string) ApiRemoveAnnotationQueueLabelRequest { + return ApiRemoveAnnotationQueueLabelRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueRemoveLabelResponse +func (a *AnnotationQueuesAPIService) RemoveAnnotationQueueLabelExecute(r ApiRemoveAnnotationQueueLabelRequest) (*QueueRemoveLabelResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueRemoveLabelResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.RemoveAnnotationQueueLabel") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/remove-label/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueLabelRequest == nil { + return localVarReturnValue, nil, reportError("queueLabelRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueLabelRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAnnotationQueueRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string + annotationQueue *AnnotationQueue +} + +func (r ApiUpdateAnnotationQueueRequest) AnnotationQueue(annotationQueue AnnotationQueue) ApiUpdateAnnotationQueueRequest { + r.annotationQueue = &annotationQueue + return r +} + +func (r ApiUpdateAnnotationQueueRequest) Execute() (*AnnotationQueue, *http.Response, error) { + return r.ApiService.UpdateAnnotationQueueExecute(r) +} + +/* +UpdateAnnotationQueue Method for UpdateAnnotationQueue + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiUpdateAnnotationQueueRequest +*/ +func (a *AnnotationQueuesAPIService) UpdateAnnotationQueue(ctx context.Context, id string) ApiUpdateAnnotationQueueRequest { + return ApiUpdateAnnotationQueueRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AnnotationQueue +func (a *AnnotationQueuesAPIService) UpdateAnnotationQueueExecute(r ApiUpdateAnnotationQueueRequest) (*AnnotationQueue, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationQueue + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.UpdateAnnotationQueue") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.annotationQueue == nil { + return localVarReturnValue, nil, reportError("annotationQueue is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.annotationQueue + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAnnotationQueueStatusRequest struct { + ctx context.Context + ApiService *AnnotationQueuesAPIService + id string + queueStatusRequest *QueueStatusRequest +} + +func (r ApiUpdateAnnotationQueueStatusRequest) QueueStatusRequest(queueStatusRequest QueueStatusRequest) ApiUpdateAnnotationQueueStatusRequest { + r.queueStatusRequest = &queueStatusRequest + return r +} + +func (r ApiUpdateAnnotationQueueStatusRequest) Execute() (*QueueStatusResponse, *http.Response, error) { + return r.ApiService.UpdateAnnotationQueueStatusExecute(r) +} + +/* +UpdateAnnotationQueueStatus Method for UpdateAnnotationQueueStatus + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiUpdateAnnotationQueueStatusRequest +*/ +func (a *AnnotationQueuesAPIService) UpdateAnnotationQueueStatus(ctx context.Context, id string) ApiUpdateAnnotationQueueStatusRequest { + return ApiUpdateAnnotationQueueStatusRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueStatusResponse +func (a *AnnotationQueuesAPIService) UpdateAnnotationQueueStatusExecute(r ApiUpdateAnnotationQueueStatusRequest) (*QueueStatusResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueStatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnnotationQueuesAPIService.UpdateAnnotationQueueStatus") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/update-status/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueStatusRequest == nil { + return localVarReturnValue, nil, reportError("queueStatusRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueStatusRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_datasets.go b/go/futureagi/api_datasets.go new file mode 100644 index 0000000..d7108d7 --- /dev/null +++ b/go/futureagi/api_datasets.go @@ -0,0 +1,3923 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" + "strings" +) + +// DatasetsAPIService DatasetsAPI service +type DatasetsAPIService service + +type ApiAddDatasetColumnsRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string + datasetAddColumnsRequest *DatasetAddColumnsRequest +} + +func (r ApiAddDatasetColumnsRequest) DatasetAddColumnsRequest(datasetAddColumnsRequest DatasetAddColumnsRequest) ApiAddDatasetColumnsRequest { + r.datasetAddColumnsRequest = &datasetAddColumnsRequest + return r +} + +func (r ApiAddDatasetColumnsRequest) Execute() (*DatasetColumnsMutationResponse, *http.Response, error) { + return r.ApiService.AddDatasetColumnsExecute(r) +} + +/* +AddDatasetColumns Method for AddDatasetColumns + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiAddDatasetColumnsRequest +*/ +func (a *DatasetsAPIService) AddDatasetColumns(ctx context.Context, datasetId string) ApiAddDatasetColumnsRequest { + return ApiAddDatasetColumnsRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetColumnsMutationResponse +func (a *DatasetsAPIService) AddDatasetColumnsExecute(r ApiAddDatasetColumnsRequest) (*DatasetColumnsMutationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetColumnsMutationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.AddDatasetColumns") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_columns/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetAddColumnsRequest == nil { + return localVarReturnValue, nil, reportError("datasetAddColumnsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetAddColumnsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAddDatasetRowsRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string + datasetAddRowsRequest *DatasetAddRowsRequest +} + +func (r ApiAddDatasetRowsRequest) DatasetAddRowsRequest(datasetAddRowsRequest DatasetAddRowsRequest) ApiAddDatasetRowsRequest { + r.datasetAddRowsRequest = &datasetAddRowsRequest + return r +} + +func (r ApiAddDatasetRowsRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.AddDatasetRowsExecute(r) +} + +/* +AddDatasetRows Method for AddDatasetRows + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiAddDatasetRowsRequest +*/ +func (a *DatasetsAPIService) AddDatasetRows(ctx context.Context, datasetId string) ApiAddDatasetRowsRequest { + return ApiAddDatasetRowsRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *DatasetsAPIService) AddDatasetRowsExecute(r ApiAddDatasetRowsRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.AddDatasetRows") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_rows/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetAddRowsRequest == nil { + return localVarReturnValue, nil, reportError("datasetAddRowsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetAddRowsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateDatasetFromLocalFileRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + createDatasetFromLocalFileRequest *CreateDatasetFromLocalFileRequest +} + +func (r ApiCreateDatasetFromLocalFileRequest) CreateDatasetFromLocalFileRequest(createDatasetFromLocalFileRequest CreateDatasetFromLocalFileRequest) ApiCreateDatasetFromLocalFileRequest { + r.createDatasetFromLocalFileRequest = &createDatasetFromLocalFileRequest + return r +} + +func (r ApiCreateDatasetFromLocalFileRequest) Execute() (*LocalFileDatasetCreateStartedResponse, *http.Response, error) { + return r.ApiService.CreateDatasetFromLocalFileExecute(r) +} + +/* +CreateDatasetFromLocalFile Method for CreateDatasetFromLocalFile + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDatasetFromLocalFileRequest +*/ +func (a *DatasetsAPIService) CreateDatasetFromLocalFile(ctx context.Context) ApiCreateDatasetFromLocalFileRequest { + return ApiCreateDatasetFromLocalFileRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return LocalFileDatasetCreateStartedResponse +func (a *DatasetsAPIService) CreateDatasetFromLocalFileExecute(r ApiCreateDatasetFromLocalFileRequest) (*LocalFileDatasetCreateStartedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LocalFileDatasetCreateStartedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.CreateDatasetFromLocalFile") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/create-dataset-from-local-file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createDatasetFromLocalFileRequest == nil { + return localVarReturnValue, nil, reportError("createDatasetFromLocalFileRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createDatasetFromLocalFileRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateDatasetManuallyRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + manualDatasetCreateRequest *ManualDatasetCreateRequest +} + +func (r ApiCreateDatasetManuallyRequest) ManualDatasetCreateRequest(manualDatasetCreateRequest ManualDatasetCreateRequest) ApiCreateDatasetManuallyRequest { + r.manualDatasetCreateRequest = &manualDatasetCreateRequest + return r +} + +func (r ApiCreateDatasetManuallyRequest) Execute() (*ManualDatasetCreateResponse, *http.Response, error) { + return r.ApiService.CreateDatasetManuallyExecute(r) +} + +/* +CreateDatasetManually Method for CreateDatasetManually + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDatasetManuallyRequest +*/ +func (a *DatasetsAPIService) CreateDatasetManually(ctx context.Context) ApiCreateDatasetManuallyRequest { + return ApiCreateDatasetManuallyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ManualDatasetCreateResponse +func (a *DatasetsAPIService) CreateDatasetManuallyExecute(r ApiCreateDatasetManuallyRequest) (*ManualDatasetCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ManualDatasetCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.CreateDatasetManually") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/create-dataset-manually/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.manualDatasetCreateRequest == nil { + return localVarReturnValue, nil, reportError("manualDatasetCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.manualDatasetCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateEmptyDatasetRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + createEmptyDatasetRequest *CreateEmptyDatasetRequest +} + +func (r ApiCreateEmptyDatasetRequest) CreateEmptyDatasetRequest(createEmptyDatasetRequest CreateEmptyDatasetRequest) ApiCreateEmptyDatasetRequest { + r.createEmptyDatasetRequest = &createEmptyDatasetRequest + return r +} + +func (r ApiCreateEmptyDatasetRequest) Execute() (*DatasetCreateStartedResponse, *http.Response, error) { + return r.ApiService.CreateEmptyDatasetExecute(r) +} + +/* +CreateEmptyDataset Method for CreateEmptyDataset + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateEmptyDatasetRequest +*/ +func (a *DatasetsAPIService) CreateEmptyDataset(ctx context.Context) ApiCreateEmptyDatasetRequest { + return ApiCreateEmptyDatasetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DatasetCreateStartedResponse +func (a *DatasetsAPIService) CreateEmptyDatasetExecute(r ApiCreateEmptyDatasetRequest) (*DatasetCreateStartedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetCreateStartedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.CreateEmptyDataset") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/create-empty-dataset/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createEmptyDatasetRequest == nil { + return localVarReturnValue, nil, reportError("createEmptyDatasetRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createEmptyDatasetRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDatasetColumnRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string + columnId string +} + +func (r ApiDeleteDatasetColumnRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteDatasetColumnExecute(r) +} + +/* +DeleteDatasetColumn Method for DeleteDatasetColumn + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param columnId + @return ApiDeleteDatasetColumnRequest +*/ +func (a *DatasetsAPIService) DeleteDatasetColumn(ctx context.Context, datasetId string, columnId string) ApiDeleteDatasetColumnRequest { + return ApiDeleteDatasetColumnRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + columnId: columnId, + } +} + +// Execute executes the request +func (a *DatasetsAPIService) DeleteDatasetColumnExecute(r ApiDeleteDatasetColumnRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.DeleteDatasetColumn") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/delete_column/{column_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"column_id"+"}", url.PathEscape(parameterValueToString(r.columnId, "columnId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteDatasetRowRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string +} + +func (r ApiDeleteDatasetRowRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteDatasetRowExecute(r) +} + +/* +DeleteDatasetRow Method for DeleteDatasetRow + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiDeleteDatasetRowRequest +*/ +func (a *DatasetsAPIService) DeleteDatasetRow(ctx context.Context, datasetId string) ApiDeleteDatasetRowRequest { + return ApiDeleteDatasetRowRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +func (a *DatasetsAPIService) DeleteDatasetRowExecute(r ApiDeleteDatasetRowRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.DeleteDatasetRow") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/delete_row/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDownloadDatasetRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string +} + +func (r ApiDownloadDatasetRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.DownloadDatasetExecute(r) +} + +/* +DownloadDataset Method for DownloadDataset + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiDownloadDatasetRequest +*/ +func (a *DatasetsAPIService) DownloadDataset(ctx context.Context, datasetId string) ApiDownloadDatasetRequest { + return ApiDownloadDatasetRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return *os.File +func (a *DatasetsAPIService) DownloadDatasetExecute(r ApiDownloadDatasetRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.DownloadDataset") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/download_dataset/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDuplicateDatasetRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string + duplicateDatasetRequest *DuplicateDatasetRequest +} + +func (r ApiDuplicateDatasetRequest) DuplicateDatasetRequest(duplicateDatasetRequest DuplicateDatasetRequest) ApiDuplicateDatasetRequest { + r.duplicateDatasetRequest = &duplicateDatasetRequest + return r +} + +func (r ApiDuplicateDatasetRequest) Execute() (*DuplicateDatasetResponse, *http.Response, error) { + return r.ApiService.DuplicateDatasetExecute(r) +} + +/* +DuplicateDataset Method for DuplicateDataset + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiDuplicateDatasetRequest +*/ +func (a *DatasetsAPIService) DuplicateDataset(ctx context.Context, datasetId string) ApiDuplicateDatasetRequest { + return ApiDuplicateDatasetRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DuplicateDatasetResponse +func (a *DatasetsAPIService) DuplicateDatasetExecute(r ApiDuplicateDatasetRequest) (*DuplicateDatasetResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DuplicateDatasetResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.DuplicateDataset") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/duplicate/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.duplicateDatasetRequest == nil { + return localVarReturnValue, nil, reportError("duplicateDatasetRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.duplicateDatasetRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDatasetAnnotationSummaryRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string +} + +func (r ApiGetDatasetAnnotationSummaryRequest) Execute() (*AnnotationSummaryResponse, *http.Response, error) { + return r.ApiService.GetDatasetAnnotationSummaryExecute(r) +} + +/* +GetDatasetAnnotationSummary Method for GetDatasetAnnotationSummary + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiGetDatasetAnnotationSummaryRequest +*/ +func (a *DatasetsAPIService) GetDatasetAnnotationSummary(ctx context.Context, datasetId string) ApiGetDatasetAnnotationSummaryRequest { + return ApiGetDatasetAnnotationSummaryRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return AnnotationSummaryResponse +func (a *DatasetsAPIService) GetDatasetAnnotationSummaryExecute(r ApiGetDatasetAnnotationSummaryRequest) (*AnnotationSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.GetDatasetAnnotationSummary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/dataset/{dataset_id}/annotation-summary/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDatasetColumnsRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string +} + +func (r ApiGetDatasetColumnsRequest) Execute() (*DatasetColumnDetailResponse, *http.Response, error) { + return r.ApiService.GetDatasetColumnsExecute(r) +} + +/* +GetDatasetColumns Method for GetDatasetColumns + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiGetDatasetColumnsRequest +*/ +func (a *DatasetsAPIService) GetDatasetColumns(ctx context.Context, datasetId string) ApiGetDatasetColumnsRequest { + return ApiGetDatasetColumnsRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetColumnDetailResponse +func (a *DatasetsAPIService) GetDatasetColumnsExecute(r ApiGetDatasetColumnsRequest) (*DatasetColumnDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetColumnDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.GetDatasetColumns") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/dataset/columns/{dataset_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDatasetEvalStatsRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string +} + +func (r ApiGetDatasetEvalStatsRequest) Execute() (*DatasetEvalStatsResponse, *http.Response, error) { + return r.ApiService.GetDatasetEvalStatsExecute(r) +} + +/* +GetDatasetEvalStats Method for GetDatasetEvalStats + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiGetDatasetEvalStatsRequest +*/ +func (a *DatasetsAPIService) GetDatasetEvalStats(ctx context.Context, datasetId string) ApiGetDatasetEvalStatsRequest { + return ApiGetDatasetEvalStatsRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetEvalStatsResponse +func (a *DatasetsAPIService) GetDatasetEvalStatsExecute(r ApiGetDatasetEvalStatsRequest) (*DatasetEvalStatsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetEvalStatsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.GetDatasetEvalStats") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/dataset/{dataset_id}/eval-stats/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDatasetJsonSchemaRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string +} + +func (r ApiGetDatasetJsonSchemaRequest) Execute() (*DatasetJsonSchemaResponse, *http.Response, error) { + return r.ApiService.GetDatasetJsonSchemaExecute(r) +} + +/* +GetDatasetJsonSchema Method for GetDatasetJsonSchema + +API endpoint to get JSON schemas and images metadata for columns in a dataset. +Used by frontend for autocomplete suggestions when accessing JSON properties +and for indexed access to images columns. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiGetDatasetJsonSchemaRequest +*/ +func (a *DatasetsAPIService) GetDatasetJsonSchema(ctx context.Context, datasetId string) ApiGetDatasetJsonSchemaRequest { + return ApiGetDatasetJsonSchemaRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetJsonSchemaResponse +func (a *DatasetsAPIService) GetDatasetJsonSchemaExecute(r ApiGetDatasetJsonSchemaRequest) (*DatasetJsonSchemaResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetJsonSchemaResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.GetDatasetJsonSchema") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/dataset/{dataset_id}/json-schema/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDatasetRowRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string + datasetRowDataRequest *DatasetRowDataRequest +} + +func (r ApiGetDatasetRowRequest) DatasetRowDataRequest(datasetRowDataRequest DatasetRowDataRequest) ApiGetDatasetRowRequest { + r.datasetRowDataRequest = &datasetRowDataRequest + return r +} + +func (r ApiGetDatasetRowRequest) Execute() (*DatasetRowDataResponse, *http.Response, error) { + return r.ApiService.GetDatasetRowExecute(r) +} + +/* +GetDatasetRow Method for GetDatasetRow + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiGetDatasetRowRequest +*/ +func (a *DatasetsAPIService) GetDatasetRow(ctx context.Context, datasetId string) ApiGetDatasetRowRequest { + return ApiGetDatasetRowRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetRowDataResponse +func (a *DatasetsAPIService) GetDatasetRowExecute(r ApiGetDatasetRowRequest) (*DatasetRowDataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetRowDataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.GetDatasetRow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/get-row-data/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetRowDataRequest == nil { + return localVarReturnValue, nil, reportError("datasetRowDataRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetRowDataRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDatasetTableRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string + filters *string + sort *string + search *string + pageSize *int32 + currentPageIndex *int32 + columnConfigOnly *bool +} + +func (r ApiGetDatasetTableRequest) Filters(filters string) ApiGetDatasetTableRequest { + r.filters = &filters + return r +} + +func (r ApiGetDatasetTableRequest) Sort(sort string) ApiGetDatasetTableRequest { + r.sort = &sort + return r +} + +func (r ApiGetDatasetTableRequest) Search(search string) ApiGetDatasetTableRequest { + r.search = &search + return r +} + +func (r ApiGetDatasetTableRequest) PageSize(pageSize int32) ApiGetDatasetTableRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiGetDatasetTableRequest) CurrentPageIndex(currentPageIndex int32) ApiGetDatasetTableRequest { + r.currentPageIndex = ¤tPageIndex + return r +} + +func (r ApiGetDatasetTableRequest) ColumnConfigOnly(columnConfigOnly bool) ApiGetDatasetTableRequest { + r.columnConfigOnly = &columnConfigOnly + return r +} + +func (r ApiGetDatasetTableRequest) Execute() (*DatasetTableResponse, *http.Response, error) { + return r.ApiService.GetDatasetTableExecute(r) +} + +/* +GetDatasetTable Method for GetDatasetTable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiGetDatasetTableRequest +*/ +func (a *DatasetsAPIService) GetDatasetTable(ctx context.Context, datasetId string) ApiGetDatasetTableRequest { + return ApiGetDatasetTableRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetTableResponse +func (a *DatasetsAPIService) GetDatasetTableExecute(r ApiGetDatasetTableRequest) (*DatasetTableResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetTableResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.GetDatasetTable") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/get-dataset-table/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") + } else { + var defaultValue string = "[]" + r.sort = &defaultValue + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } else { + var defaultValue int32 = 10 + r.pageSize = &defaultValue + } + if r.currentPageIndex != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "current_page_index", r.currentPageIndex, "form", "") + } else { + var defaultValue int32 = 0 + r.currentPageIndex = &defaultValue + } + if r.columnConfigOnly != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "column_config_only", r.columnConfigOnly, "form", "") + } else { + var defaultValue bool = false + r.columnConfigOnly = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDatasetBaseColumnsRequest struct { + ctx context.Context + ApiService *DatasetsAPIService +} + +func (r ApiListDatasetBaseColumnsRequest) Execute() (*BaseColumnsResponse, *http.Response, error) { + return r.ApiService.ListDatasetBaseColumnsExecute(r) +} + +/* +ListDatasetBaseColumns Method for ListDatasetBaseColumns + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDatasetBaseColumnsRequest +*/ +func (a *DatasetsAPIService) ListDatasetBaseColumns(ctx context.Context) ApiListDatasetBaseColumnsRequest { + return ApiListDatasetBaseColumnsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return BaseColumnsResponse +func (a *DatasetsAPIService) ListDatasetBaseColumnsExecute(r ApiListDatasetBaseColumnsRequest) (*BaseColumnsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BaseColumnsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.ListDatasetBaseColumns") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/get-base-columns/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDatasetDerivedVariablesRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string +} + +func (r ApiListDatasetDerivedVariablesRequest) Execute() (*DatasetDerivedVariablesResponse, *http.Response, error) { + return r.ApiService.ListDatasetDerivedVariablesExecute(r) +} + +/* +ListDatasetDerivedVariables Get all derived variables from all run prompt columns in a dataset. + +This aggregates derived variables from run prompt columns that +produce JSON outputs, making them available for use in other +prompts, evals, and experiments. + +Path params: + + - dataset_id: UUID of the dataset + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiListDatasetDerivedVariablesRequest +*/ +func (a *DatasetsAPIService) ListDatasetDerivedVariables(ctx context.Context, datasetId string) ApiListDatasetDerivedVariablesRequest { + return ApiListDatasetDerivedVariablesRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetDerivedVariablesResponse +func (a *DatasetsAPIService) ListDatasetDerivedVariablesExecute(r ApiListDatasetDerivedVariablesRequest) (*DatasetDerivedVariablesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetDerivedVariablesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.ListDatasetDerivedVariables") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/derived-variables/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDatasetNamesRequest struct { + ctx context.Context + ApiService *DatasetsAPIService +} + +func (r ApiListDatasetNamesRequest) Execute() (*DatasetNamesResponse, *http.Response, error) { + return r.ApiService.ListDatasetNamesExecute(r) +} + +/* +ListDatasetNames Method for ListDatasetNames + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDatasetNamesRequest +*/ +func (a *DatasetsAPIService) ListDatasetNames(ctx context.Context) ApiListDatasetNamesRequest { + return ApiListDatasetNamesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DatasetNamesResponse +func (a *DatasetsAPIService) ListDatasetNamesExecute(r ApiListDatasetNamesRequest) (*DatasetNamesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetNamesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.ListDatasetNames") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/get-datasets-names/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDatasetsRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + searchText *string + page *int32 + pageSize *int32 + sort *string +} + +func (r ApiListDatasetsRequest) SearchText(searchText string) ApiListDatasetsRequest { + r.searchText = &searchText + return r +} + +func (r ApiListDatasetsRequest) Page(page int32) ApiListDatasetsRequest { + r.page = &page + return r +} + +func (r ApiListDatasetsRequest) PageSize(pageSize int32) ApiListDatasetsRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiListDatasetsRequest) Sort(sort string) ApiListDatasetsRequest { + r.sort = &sort + return r +} + +func (r ApiListDatasetsRequest) Execute() (*DatasetListResponse, *http.Response, error) { + return r.ApiService.ListDatasetsExecute(r) +} + +/* +ListDatasets Method for ListDatasets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDatasetsRequest +*/ +func (a *DatasetsAPIService) ListDatasets(ctx context.Context) ApiListDatasetsRequest { + return ApiListDatasetsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DatasetListResponse +func (a *DatasetsAPIService) ListDatasetsExecute(r ApiListDatasetsRequest) (*DatasetListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.ListDatasets") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/get-datasets/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.searchText != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search_text", r.searchText, "form", "") + } else { + var defaultValue string = "" + r.searchText = &defaultValue + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 0 + r.page = &defaultValue + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } else { + var defaultValue int32 = 10 + r.pageSize = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDatasetCellRequest struct { + ctx context.Context + ApiService *DatasetsAPIService + datasetId string + datasetUpdateCellValueRequest *DatasetUpdateCellValueRequest +} + +func (r ApiUpdateDatasetCellRequest) DatasetUpdateCellValueRequest(datasetUpdateCellValueRequest DatasetUpdateCellValueRequest) ApiUpdateDatasetCellRequest { + r.datasetUpdateCellValueRequest = &datasetUpdateCellValueRequest + return r +} + +func (r ApiUpdateDatasetCellRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.UpdateDatasetCellExecute(r) +} + +/* +UpdateDatasetCell Method for UpdateDatasetCell + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiUpdateDatasetCellRequest +*/ +func (a *DatasetsAPIService) UpdateDatasetCell(ctx context.Context, datasetId string) ApiUpdateDatasetCellRequest { + return ApiUpdateDatasetCellRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *DatasetsAPIService) UpdateDatasetCellExecute(r ApiUpdateDatasetCellRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DatasetsAPIService.UpdateDatasetCell") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/update_cell_value/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetUpdateCellValueRequest == nil { + return localVarReturnValue, nil, reportError("datasetUpdateCellValueRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetUpdateCellValueRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_experiments.go b/go/futureagi/api_experiments.go new file mode 100644 index 0000000..822438f --- /dev/null +++ b/go/futureagi/api_experiments.go @@ -0,0 +1,2742 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" + "strings" +) + +// ExperimentsAPIService ExperimentsAPI service +type ExperimentsAPIService service + +type ApiCompareExperimentsRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string + experimentComparisonWeightsRequest *ExperimentComparisonWeightsRequest +} + +func (r ApiCompareExperimentsRequest) ExperimentComparisonWeightsRequest(experimentComparisonWeightsRequest ExperimentComparisonWeightsRequest) ApiCompareExperimentsRequest { + r.experimentComparisonWeightsRequest = &experimentComparisonWeightsRequest + return r +} + +func (r ApiCompareExperimentsRequest) Execute() (*ExperimentDatasetComparisonResponse, *http.Response, error) { + return r.ApiService.CompareExperimentsExecute(r) +} + +/* +CompareExperiments Method for CompareExperiments + +V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiCompareExperimentsRequest +*/ +func (a *ExperimentsAPIService) CompareExperiments(ctx context.Context, experimentId string) ApiCompareExperimentsRequest { + return ApiCompareExperimentsRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentDatasetComparisonResponse +func (a *ExperimentsAPIService) CompareExperimentsExecute(r ApiCompareExperimentsRequest) (*ExperimentDatasetComparisonResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentDatasetComparisonResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.CompareExperiments") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/compare-experiments/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.experimentComparisonWeightsRequest == nil { + return localVarReturnValue, nil, reportError("experimentComparisonWeightsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.experimentComparisonWeightsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateExperimentRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentCreateV2 *ExperimentCreateV2 +} + +func (r ApiCreateExperimentRequest) ExperimentCreateV2(experimentCreateV2 ExperimentCreateV2) ApiCreateExperimentRequest { + r.experimentCreateV2 = &experimentCreateV2 + return r +} + +func (r ApiCreateExperimentRequest) Execute() (*ExperimentStringResultResponse, *http.Response, error) { + return r.ApiService.CreateExperimentExecute(r) +} + +/* +CreateExperiment Method for CreateExperiment + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateExperimentRequest +*/ +func (a *ExperimentsAPIService) CreateExperiment(ctx context.Context) ApiCreateExperimentRequest { + return ApiCreateExperimentRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ExperimentStringResultResponse +func (a *ExperimentsAPIService) CreateExperimentExecute(r ApiCreateExperimentRequest) (*ExperimentStringResultResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentStringResultResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.CreateExperiment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.experimentCreateV2 == nil { + return localVarReturnValue, nil, reportError("experimentCreateV2 is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.experimentCreateV2 + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteExperimentsRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService +} + +func (r ApiDeleteExperimentsRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteExperimentsExecute(r) +} + +/* +DeleteExperiments Method for DeleteExperiments + +V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDeleteExperimentsRequest +*/ +func (a *ExperimentsAPIService) DeleteExperiments(ctx context.Context) ApiDeleteExperimentsRequest { + return ApiDeleteExperimentsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *ExperimentsAPIService) DeleteExperimentsExecute(r ApiDeleteExperimentsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.DeleteExperiments") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/delete/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDownloadExperimentRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string +} + +func (r ApiDownloadExperimentRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.DownloadExperimentExecute(r) +} + +/* +DownloadExperiment Method for DownloadExperiment + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiDownloadExperimentRequest +*/ +func (a *ExperimentsAPIService) DownloadExperiment(ctx context.Context, experimentId string) ApiDownloadExperimentRequest { + return ApiDownloadExperimentRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return *os.File +func (a *ExperimentsAPIService) DownloadExperimentExecute(r ApiDownloadExperimentRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.DownloadExperiment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/download/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetExperimentRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string +} + +func (r ApiGetExperimentRequest) Execute() (*ExperimentV2DetailResponse, *http.Response, error) { + return r.ApiService.GetExperimentExecute(r) +} + +/* +GetExperiment Method for GetExperiment + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiGetExperimentRequest +*/ +func (a *ExperimentsAPIService) GetExperiment(ctx context.Context, experimentId string) ApiGetExperimentRequest { + return ApiGetExperimentRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentV2DetailResponse +func (a *ExperimentsAPIService) GetExperimentExecute(r ApiGetExperimentRequest) (*ExperimentV2DetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentV2DetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.GetExperiment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetExperimentJsonSchemaRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string +} + +func (r ApiGetExperimentJsonSchemaRequest) Execute() (*ExperimentJsonSchemaResponse, *http.Response, error) { + return r.ApiService.GetExperimentJsonSchemaExecute(r) +} + +/* +GetExperimentJsonSchema Method for GetExperimentJsonSchema + +Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. +Delegates to the shared get_json_column_schemas() function. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiGetExperimentJsonSchemaRequest +*/ +func (a *ExperimentsAPIService) GetExperimentJsonSchema(ctx context.Context, experimentId string) ApiGetExperimentJsonSchemaRequest { + return ApiGetExperimentJsonSchemaRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentJsonSchemaResponse +func (a *ExperimentsAPIService) GetExperimentJsonSchemaExecute(r ApiGetExperimentJsonSchemaRequest) (*ExperimentJsonSchemaResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentJsonSchemaResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.GetExperimentJsonSchema") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/json-schema/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetExperimentRowRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string + rowId string +} + +func (r ApiGetExperimentRowRequest) Execute() (*ExperimentTableRowsResponse, *http.Response, error) { + return r.ApiService.GetExperimentRowExecute(r) +} + +/* +GetExperimentRow Method for GetExperimentRow + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @param rowId + @return ApiGetExperimentRowRequest +*/ +func (a *ExperimentsAPIService) GetExperimentRow(ctx context.Context, experimentId string, rowId string) ApiGetExperimentRowRequest { + return ApiGetExperimentRowRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + rowId: rowId, + } +} + +// Execute executes the request +// +// @return ExperimentTableRowsResponse +func (a *ExperimentsAPIService) GetExperimentRowExecute(r ApiGetExperimentRowRequest) (*ExperimentTableRowsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentTableRowsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.GetExperimentRow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/rows/{row_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetExperimentStatsRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string +} + +func (r ApiGetExperimentStatsRequest) Execute() (*ExperimentStatsResponse, *http.Response, error) { + return r.ApiService.GetExperimentStatsExecute(r) +} + +/* +GetExperimentStats Method for GetExperimentStats + +Stats view for V2 experiments that read from snapshot_dataset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiGetExperimentStatsRequest +*/ +func (a *ExperimentsAPIService) GetExperimentStats(ctx context.Context, experimentId string) ApiGetExperimentStatsRequest { + return ApiGetExperimentStatsRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentStatsResponse +func (a *ExperimentsAPIService) GetExperimentStatsExecute(r ApiGetExperimentStatsRequest) (*ExperimentStatsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentStatsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.GetExperimentStats") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/stats/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListExperimentComparisonsRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string +} + +func (r ApiListExperimentComparisonsRequest) Execute() (*ExperimentComparisonDetailsResponse, *http.Response, error) { + return r.ApiService.ListExperimentComparisonsExecute(r) +} + +/* +ListExperimentComparisons Method for ListExperimentComparisons + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiListExperimentComparisonsRequest +*/ +func (a *ExperimentsAPIService) ListExperimentComparisons(ctx context.Context, experimentId string) ApiListExperimentComparisonsRequest { + return ApiListExperimentComparisonsRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentComparisonDetailsResponse +func (a *ExperimentsAPIService) ListExperimentComparisonsExecute(r ApiListExperimentComparisonsRequest) (*ExperimentComparisonDetailsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentComparisonDetailsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.ListExperimentComparisons") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/comparisons/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListExperimentRowsRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string +} + +func (r ApiListExperimentRowsRequest) Execute() (*ExperimentTableRowsResponse, *http.Response, error) { + return r.ApiService.ListExperimentRowsExecute(r) +} + +/* +ListExperimentRows Method for ListExperimentRows + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiListExperimentRowsRequest +*/ +func (a *ExperimentsAPIService) ListExperimentRows(ctx context.Context, experimentId string) ApiListExperimentRowsRequest { + return ApiListExperimentRowsRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentTableRowsResponse +func (a *ExperimentsAPIService) ListExperimentRowsExecute(r ApiListExperimentRowsRequest) (*ExperimentTableRowsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentTableRowsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.ListExperimentRows") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/rows/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListExperimentsRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + createdAt *string + status *string + datasetId *string + search *string + ordering *string + page *int32 + limit *int32 +} + +func (r ApiListExperimentsRequest) CreatedAt(createdAt string) ApiListExperimentsRequest { + r.createdAt = &createdAt + return r +} + +func (r ApiListExperimentsRequest) Status(status string) ApiListExperimentsRequest { + r.status = &status + return r +} + +func (r ApiListExperimentsRequest) DatasetId(datasetId string) ApiListExperimentsRequest { + r.datasetId = &datasetId + return r +} + +// A search term. +func (r ApiListExperimentsRequest) Search(search string) ApiListExperimentsRequest { + r.search = &search + return r +} + +// Which field to use when ordering the results. +func (r ApiListExperimentsRequest) Ordering(ordering string) ApiListExperimentsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListExperimentsRequest) Page(page int32) ApiListExperimentsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListExperimentsRequest) Limit(limit int32) ApiListExperimentsRequest { + r.limit = &limit + return r +} + +func (r ApiListExperimentsRequest) Execute() (*ListExperiments200Response, *http.Response, error) { + return r.ApiService.ListExperimentsExecute(r) +} + +/* +ListExperiments Method for ListExperiments + +V2 experiment list with filtering, search, and pagination. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListExperimentsRequest +*/ +func (a *ExperimentsAPIService) ListExperiments(ctx context.Context) ApiListExperimentsRequest { + return ApiListExperimentsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListExperiments200Response +func (a *ExperimentsAPIService) ListExperimentsExecute(r ApiListExperimentsRequest) (*ListExperiments200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListExperiments200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.ListExperiments") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.createdAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at", r.createdAt, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.datasetId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataset_id", r.datasetId, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRerunExperimentRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentRerunRequest *ExperimentRerunRequest +} + +func (r ApiRerunExperimentRequest) ExperimentRerunRequest(experimentRerunRequest ExperimentRerunRequest) ApiRerunExperimentRequest { + r.experimentRerunRequest = &experimentRerunRequest + return r +} + +func (r ApiRerunExperimentRequest) Execute() (*ExperimentStringResultResponse, *http.Response, error) { + return r.ApiService.RerunExperimentExecute(r) +} + +/* +RerunExperiment V2 re-run: org-scoped, uses V2 Temporal workflow. + +No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID +reuse policy automatically cancels any running workflow with the same ID. +Cell reset is handled by the workflow itself (cleanup + setup activities). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRerunExperimentRequest +*/ +func (a *ExperimentsAPIService) RerunExperiment(ctx context.Context) ApiRerunExperimentRequest { + return ApiRerunExperimentRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ExperimentStringResultResponse +func (a *ExperimentsAPIService) RerunExperimentExecute(r ApiRerunExperimentRequest) (*ExperimentStringResultResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentStringResultResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.RerunExperiment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/re-run/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.experimentRerunRequest == nil { + return localVarReturnValue, nil, reportError("experimentRerunRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.experimentRerunRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiStopExperimentRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string + body *map[string]interface{} +} + +func (r ApiStopExperimentRequest) Body(body map[string]interface{}) ApiStopExperimentRequest { + r.body = &body + return r +} + +func (r ApiStopExperimentRequest) Execute() (*ExperimentStopResponse, *http.Response, error) { + return r.ApiService.StopExperimentExecute(r) +} + +/* +StopExperiment Stop a running V2 experiment. + +Cancels all Temporal workflows (main + reruns). DB cleanup (marking +RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) +is handled by each workflow's CancelledError handler via the +stop_experiment_cleanup_activity. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiStopExperimentRequest +*/ +func (a *ExperimentsAPIService) StopExperiment(ctx context.Context, experimentId string) ApiStopExperimentRequest { + return ApiStopExperimentRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentStopResponse +func (a *ExperimentsAPIService) StopExperimentExecute(r ApiStopExperimentRequest) (*ExperimentStopResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentStopResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.StopExperiment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/stop/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateExperimentRequest struct { + ctx context.Context + ApiService *ExperimentsAPIService + experimentId string + experimentUpdateV2 *ExperimentUpdateV2 +} + +func (r ApiUpdateExperimentRequest) ExperimentUpdateV2(experimentUpdateV2 ExperimentUpdateV2) ApiUpdateExperimentRequest { + r.experimentUpdateV2 = &experimentUpdateV2 + return r +} + +func (r ApiUpdateExperimentRequest) Execute() (*ExperimentV2DetailResponse, *http.Response, error) { + return r.ApiService.UpdateExperimentExecute(r) +} + +/* +UpdateExperiment Update a V2 experiment with diff-based selective re-run. + +Editable fields: column_id, prompt_config, user_eval_metrics. +Re-run triggers (determined by fingerprint diffs, not field presence): +- prompt_config has new/modified entries → re-run those configs + ALL dependent evals +- user_eval_metrics has new/modified entries → re-run only those evals +- column_id changed → delete old base eval columns, re-run base evals +- If FE sends unchanged data, diffs return empty → no re-run + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiUpdateExperimentRequest +*/ +func (a *ExperimentsAPIService) UpdateExperiment(ctx context.Context, experimentId string) ApiUpdateExperimentRequest { + return ApiUpdateExperimentRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentV2DetailResponse +func (a *ExperimentsAPIService) UpdateExperimentExecute(r ApiUpdateExperimentRequest) (*ExperimentV2DetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentV2DetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExperimentsAPIService.UpdateExperiment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.experimentUpdateV2 == nil { + return localVarReturnValue, nil, reportError("experimentUpdateV2 is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.experimentUpdateV2 + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_model_hub.go b/go/futureagi/api_model_hub.go new file mode 100644 index 0000000..faf48e0 --- /dev/null +++ b/go/futureagi/api_model_hub.go @@ -0,0 +1,36472 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" + "strings" +) + +// ModelHubAPIService ModelHubAPI service +type ModelHubAPIService service + +type ApiModelHubAnnotationQueuesAutomationRulesCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + automationRule *AutomationRule +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesCreateRequest) AutomationRule(automationRule AutomationRule) ApiModelHubAnnotationQueuesAutomationRulesCreateRequest { + r.automationRule = &automationRule + return r +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesCreateRequest) Execute() (*AutomationRule, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesCreateExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesCreate Method for ModelHubAnnotationQueuesAutomationRulesCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiModelHubAnnotationQueuesAutomationRulesCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesCreate(ctx context.Context, queueId string) ApiModelHubAnnotationQueuesAutomationRulesCreateRequest { + return ApiModelHubAnnotationQueuesAutomationRulesCreateRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return AutomationRule +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesCreateExecute(r ApiModelHubAnnotationQueuesAutomationRulesCreateRequest) (*AutomationRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AutomationRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.automationRule == nil { + return localVarReturnValue, nil, reportError("automationRule is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.automationRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesAutomationRulesDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesDeleteExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesDelete Method for ModelHubAnnotationQueuesAutomationRulesDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this automation rule. + @return ApiModelHubAnnotationQueuesAutomationRulesDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesDelete(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesAutomationRulesDeleteRequest { + return ApiModelHubAnnotationQueuesAutomationRulesDeleteRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesDeleteExecute(r ApiModelHubAnnotationQueuesAutomationRulesDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string + body *map[string]interface{} +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest) Body(body map[string]interface{}) ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest { + r.body = &body + return r +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest) Execute() (*AutomationRuleEvaluateResponse, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesEvaluateExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesEvaluate Trigger a manual rule run with a sync-or-async branch. + +Small runs (filter resolves to ≤ “RULE_RUN_SYNC_THRESHOLD“) finish +in the HTTP request and return 200 with the result — fast feedback +for the common case. Large runs (mostly first-ever runs on backlogs +or rules with wide filters) hand the work to a Temporal activity and +return 202 immediately. The activity emails creator + queue managers +on completion. + +The peek is a cheap dry-run (“[:cap+1]“ LIMIT, no COUNT(*)) — sub- +100ms even on 10M+ row trace tables — so this branch costs little +even when it ends up taking the sync path. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this automation rule. + @return ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesEvaluate(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest { + return ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return AutomationRuleEvaluateResponse +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesEvaluateExecute(r ApiModelHubAnnotationQueuesAutomationRulesEvaluateRequest) (*AutomationRuleEvaluateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AutomationRuleEvaluateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesEvaluate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesAutomationRulesListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiModelHubAnnotationQueuesAutomationRulesListRequest) Page(page int32) ApiModelHubAnnotationQueuesAutomationRulesListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubAnnotationQueuesAutomationRulesListRequest) Limit(limit int32) ApiModelHubAnnotationQueuesAutomationRulesListRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesListRequest) Execute() (*ModelHubAnnotationQueuesAutomationRulesList200Response, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesListExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesList Method for ModelHubAnnotationQueuesAutomationRulesList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiModelHubAnnotationQueuesAutomationRulesListRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesList(ctx context.Context, queueId string) ApiModelHubAnnotationQueuesAutomationRulesListRequest { + return ApiModelHubAnnotationQueuesAutomationRulesListRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return ModelHubAnnotationQueuesAutomationRulesList200Response +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesListExecute(r ApiModelHubAnnotationQueuesAutomationRulesListRequest) (*ModelHubAnnotationQueuesAutomationRulesList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubAnnotationQueuesAutomationRulesList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string + automationRule *AutomationRule +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest) AutomationRule(automationRule AutomationRule) ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest { + r.automationRule = &automationRule + return r +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest) Execute() (*AutomationRule, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesPartialUpdateExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesPartialUpdate Method for ModelHubAnnotationQueuesAutomationRulesPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this automation rule. + @return ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesPartialUpdate(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest { + return ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return AutomationRule +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesPartialUpdateExecute(r ApiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest) (*AutomationRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AutomationRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.automationRule == nil { + return localVarReturnValue, nil, reportError("automationRule is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.automationRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesAutomationRulesPreviewRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesPreviewRequest) Execute() (*AutomationRuleEvaluateResponse, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesPreviewExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesPreview Method for ModelHubAnnotationQueuesAutomationRulesPreview + +Preview how many items match a rule (dry run). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this automation rule. + @return ApiModelHubAnnotationQueuesAutomationRulesPreviewRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesPreview(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesAutomationRulesPreviewRequest { + return ApiModelHubAnnotationQueuesAutomationRulesPreviewRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return AutomationRuleEvaluateResponse +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesPreviewExecute(r ApiModelHubAnnotationQueuesAutomationRulesPreviewRequest) (*AutomationRuleEvaluateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AutomationRuleEvaluateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesPreview") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesAutomationRulesReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesReadRequest) Execute() (*AutomationRule, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesReadExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesRead Method for ModelHubAnnotationQueuesAutomationRulesRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this automation rule. + @return ApiModelHubAnnotationQueuesAutomationRulesReadRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesRead(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesAutomationRulesReadRequest { + return ApiModelHubAnnotationQueuesAutomationRulesReadRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return AutomationRule +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesReadExecute(r ApiModelHubAnnotationQueuesAutomationRulesReadRequest) (*AutomationRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AutomationRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string + automationRule *AutomationRule +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest) AutomationRule(automationRule AutomationRule) ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest { + r.automationRule = &automationRule + return r +} + +func (r ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest) Execute() (*AutomationRule, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesAutomationRulesUpdateExecute(r) +} + +/* +ModelHubAnnotationQueuesAutomationRulesUpdate Method for ModelHubAnnotationQueuesAutomationRulesUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this automation rule. + @return ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesUpdate(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest { + return ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return AutomationRule +func (a *ModelHubAPIService) ModelHubAnnotationQueuesAutomationRulesUpdateExecute(r ApiModelHubAnnotationQueuesAutomationRulesUpdateRequest) (*AutomationRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AutomationRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesAutomationRulesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.automationRule == nil { + return localVarReturnValue, nil, reportError("automationRule is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.automationRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesForSourceRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + page *int32 + limit *int32 + sourceType *string + sourceId *string + sources *string +} + +// A page number within the paginated result set. +func (r ApiModelHubAnnotationQueuesForSourceRequest) Page(page int32) ApiModelHubAnnotationQueuesForSourceRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubAnnotationQueuesForSourceRequest) Limit(limit int32) ApiModelHubAnnotationQueuesForSourceRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubAnnotationQueuesForSourceRequest) SourceType(sourceType string) ApiModelHubAnnotationQueuesForSourceRequest { + r.sourceType = &sourceType + return r +} + +func (r ApiModelHubAnnotationQueuesForSourceRequest) SourceId(sourceId string) ApiModelHubAnnotationQueuesForSourceRequest { + r.sourceId = &sourceId + return r +} + +func (r ApiModelHubAnnotationQueuesForSourceRequest) Sources(sources string) ApiModelHubAnnotationQueuesForSourceRequest { + r.sources = &sources + return r +} + +func (r ApiModelHubAnnotationQueuesForSourceRequest) Execute() (*QueueForSourceResponse, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesForSourceExecute(r) +} + +/* +ModelHubAnnotationQueuesForSource Method for ModelHubAnnotationQueuesForSource + +Find annotation queues for a given source that the current user can annotate. +Includes queues where: + - The source is a queue item AND the user is an annotator in that queue + (regardless of whether the item is explicitly assigned to them) + +Query params: + + - source_type, source_id (single source) + + - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubAnnotationQueuesForSourceRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesForSource(ctx context.Context) ApiModelHubAnnotationQueuesForSourceRequest { + return ApiModelHubAnnotationQueuesForSourceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return QueueForSourceResponse +func (a *ModelHubAPIService) ModelHubAnnotationQueuesForSourceExecute(r ApiModelHubAnnotationQueuesForSourceRequest) (*QueueForSourceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueForSourceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesForSource") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/for-source/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.sourceType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source_type", r.sourceType, "form", "") + } + if r.sourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source_id", r.sourceId, "form", "") + } + if r.sources != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sources", r.sources, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueDefaultRequest *QueueDefaultRequest +} + +func (r ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest) QueueDefaultRequest(queueDefaultRequest QueueDefaultRequest) ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest { + r.queueDefaultRequest = &queueDefaultRequest + return r +} + +func (r ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest) Execute() (*QueueDefaultResponse, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesGetOrCreateDefaultExecute(r) +} + +/* +ModelHubAnnotationQueuesGetOrCreateDefault Method for ModelHubAnnotationQueuesGetOrCreateDefault + +Get or create the default annotation queue for a project, dataset, or agent definition. +Default queues are open to all org members (no annotator restriction). + +Body params (one of): + + - project_id + + - dataset_id + + - agent_definition_id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesGetOrCreateDefault(ctx context.Context) ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest { + return ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return QueueDefaultResponse +func (a *ModelHubAPIService) ModelHubAnnotationQueuesGetOrCreateDefaultExecute(r ApiModelHubAnnotationQueuesGetOrCreateDefaultRequest) (*QueueDefaultResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueDefaultResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesGetOrCreateDefault") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/get-or-create-default/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueDefaultRequest == nil { + return localVarReturnValue, nil, reportError("queueDefaultRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueDefaultRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesHardDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + queueHardDeleteRequest *QueueHardDeleteRequest +} + +func (r ApiModelHubAnnotationQueuesHardDeleteRequest) QueueHardDeleteRequest(queueHardDeleteRequest QueueHardDeleteRequest) ApiModelHubAnnotationQueuesHardDeleteRequest { + r.queueHardDeleteRequest = &queueHardDeleteRequest + return r +} + +func (r ApiModelHubAnnotationQueuesHardDeleteRequest) Execute() (*QueueHardDeleteResponse, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesHardDeleteExecute(r) +} + +/* +ModelHubAnnotationQueuesHardDelete Permanently remove a queue + everything attached. + +Hard delete cascades through the FK graph (rules, items, +assignments, scores) via “on_delete=CASCADE“. There is no +recovery — callers must pass “force=true“ AND the queue's +exact name as “confirm_name“ so the action can't fire from +a typo'd request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiModelHubAnnotationQueuesHardDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesHardDelete(ctx context.Context, id string) ApiModelHubAnnotationQueuesHardDeleteRequest { + return ApiModelHubAnnotationQueuesHardDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueHardDeleteResponse +func (a *ModelHubAPIService) ModelHubAnnotationQueuesHardDeleteExecute(r ApiModelHubAnnotationQueuesHardDeleteRequest) (*QueueHardDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueHardDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesHardDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/hard-delete/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueHardDeleteRequest == nil { + return localVarReturnValue, nil, reportError("queueHardDeleteRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueHardDeleteRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesItemsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + queueItem *QueueItem +} + +func (r ApiModelHubAnnotationQueuesItemsCreateRequest) QueueItem(queueItem QueueItem) ApiModelHubAnnotationQueuesItemsCreateRequest { + r.queueItem = &queueItem + return r +} + +func (r ApiModelHubAnnotationQueuesItemsCreateRequest) Execute() (*QueueItem, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesItemsCreateExecute(r) +} + +/* +ModelHubAnnotationQueuesItemsCreate Method for ModelHubAnnotationQueuesItemsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @return ApiModelHubAnnotationQueuesItemsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsCreate(ctx context.Context, queueId string) ApiModelHubAnnotationQueuesItemsCreateRequest { + return ApiModelHubAnnotationQueuesItemsCreateRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + } +} + +// Execute executes the request +// +// @return QueueItem +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsCreateExecute(r ApiModelHubAnnotationQueuesItemsCreateRequest) (*QueueItem, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueItem + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesItemsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueItem == nil { + return localVarReturnValue, nil, reportError("queueItem is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueItem + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesItemsDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string +} + +func (r ApiModelHubAnnotationQueuesItemsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesItemsDeleteExecute(r) +} + +/* +ModelHubAnnotationQueuesItemsDelete Method for ModelHubAnnotationQueuesItemsDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiModelHubAnnotationQueuesItemsDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsDelete(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesItemsDeleteRequest { + return ApiModelHubAnnotationQueuesItemsDeleteRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsDeleteExecute(r ApiModelHubAnnotationQueuesItemsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesItemsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesItemsPartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string + queueItem *QueueItem +} + +func (r ApiModelHubAnnotationQueuesItemsPartialUpdateRequest) QueueItem(queueItem QueueItem) ApiModelHubAnnotationQueuesItemsPartialUpdateRequest { + r.queueItem = &queueItem + return r +} + +func (r ApiModelHubAnnotationQueuesItemsPartialUpdateRequest) Execute() (*QueueItem, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesItemsPartialUpdateExecute(r) +} + +/* +ModelHubAnnotationQueuesItemsPartialUpdate Method for ModelHubAnnotationQueuesItemsPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiModelHubAnnotationQueuesItemsPartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsPartialUpdate(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesItemsPartialUpdateRequest { + return ApiModelHubAnnotationQueuesItemsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueItem +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsPartialUpdateExecute(r ApiModelHubAnnotationQueuesItemsPartialUpdateRequest) (*QueueItem, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueItem + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesItemsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueItem == nil { + return localVarReturnValue, nil, reportError("queueItem is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueItem + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesItemsReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string +} + +func (r ApiModelHubAnnotationQueuesItemsReadRequest) Execute() (*QueueItem, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesItemsReadExecute(r) +} + +/* +ModelHubAnnotationQueuesItemsRead Method for ModelHubAnnotationQueuesItemsRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiModelHubAnnotationQueuesItemsReadRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsRead(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesItemsReadRequest { + return ApiModelHubAnnotationQueuesItemsReadRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueItem +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsReadExecute(r ApiModelHubAnnotationQueuesItemsReadRequest) (*QueueItem, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueItem + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesItemsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesItemsUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + queueId string + id string + queueItem *QueueItem +} + +func (r ApiModelHubAnnotationQueuesItemsUpdateRequest) QueueItem(queueItem QueueItem) ApiModelHubAnnotationQueuesItemsUpdateRequest { + r.queueItem = &queueItem + return r +} + +func (r ApiModelHubAnnotationQueuesItemsUpdateRequest) Execute() (*QueueItem, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesItemsUpdateExecute(r) +} + +/* +ModelHubAnnotationQueuesItemsUpdate Method for ModelHubAnnotationQueuesItemsUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param queueId + @param id A UUID string identifying this queue item. + @return ApiModelHubAnnotationQueuesItemsUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsUpdate(ctx context.Context, queueId string, id string) ApiModelHubAnnotationQueuesItemsUpdateRequest { + return ApiModelHubAnnotationQueuesItemsUpdateRequest{ + ApiService: a, + ctx: ctx, + queueId: queueId, + id: id, + } +} + +// Execute executes the request +// +// @return QueueItem +func (a *ModelHubAPIService) ModelHubAnnotationQueuesItemsUpdateExecute(r ApiModelHubAnnotationQueuesItemsUpdateRequest) (*QueueItem, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueItem + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesItemsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{queue_id}/items/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"queue_id"+"}", url.PathEscape(parameterValueToString(r.queueId, "queueId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queueItem == nil { + return localVarReturnValue, nil, reportError("queueItem is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queueItem + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesRestoreRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + body *map[string]interface{} +} + +func (r ApiModelHubAnnotationQueuesRestoreRequest) Body(body map[string]interface{}) ApiModelHubAnnotationQueuesRestoreRequest { + r.body = &body + return r +} + +func (r ApiModelHubAnnotationQueuesRestoreRequest) Execute() (*QueueStatusResponse, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesRestoreExecute(r) +} + +/* +ModelHubAnnotationQueuesRestore Method for ModelHubAnnotationQueuesRestore + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiModelHubAnnotationQueuesRestoreRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesRestore(ctx context.Context, id string) ApiModelHubAnnotationQueuesRestoreRequest { + return ApiModelHubAnnotationQueuesRestoreRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return QueueStatusResponse +func (a *ModelHubAPIService) ModelHubAnnotationQueuesRestoreExecute(r ApiModelHubAnnotationQueuesRestoreRequest) (*QueueStatusResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *QueueStatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesRestore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/restore/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationQueuesUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + annotationQueue *AnnotationQueue +} + +func (r ApiModelHubAnnotationQueuesUpdateRequest) AnnotationQueue(annotationQueue AnnotationQueue) ApiModelHubAnnotationQueuesUpdateRequest { + r.annotationQueue = &annotationQueue + return r +} + +func (r ApiModelHubAnnotationQueuesUpdateRequest) Execute() (*AnnotationQueue, *http.Response, error) { + return r.ApiService.ModelHubAnnotationQueuesUpdateExecute(r) +} + +/* +ModelHubAnnotationQueuesUpdate Method for ModelHubAnnotationQueuesUpdate + +Only managers of the queue may update queue settings. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this annotation queue. + @return ApiModelHubAnnotationQueuesUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationQueuesUpdate(ctx context.Context, id string) ApiModelHubAnnotationQueuesUpdateRequest { + return ApiModelHubAnnotationQueuesUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AnnotationQueue +func (a *ModelHubAPIService) ModelHubAnnotationQueuesUpdateExecute(r ApiModelHubAnnotationQueuesUpdateRequest) (*AnnotationQueue, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationQueue + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationQueuesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotation-queues/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.annotationQueue == nil { + return localVarReturnValue, nil, reportError("annotationQueue is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.annotationQueue + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationsLabelsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + annotationsLabels *AnnotationsLabels +} + +func (r ApiModelHubAnnotationsLabelsCreateRequest) AnnotationsLabels(annotationsLabels AnnotationsLabels) ApiModelHubAnnotationsLabelsCreateRequest { + r.annotationsLabels = &annotationsLabels + return r +} + +func (r ApiModelHubAnnotationsLabelsCreateRequest) Execute() (*AnnotationsLabels, *http.Response, error) { + return r.ApiService.ModelHubAnnotationsLabelsCreateExecute(r) +} + +/* +ModelHubAnnotationsLabelsCreate Method for ModelHubAnnotationsLabelsCreate + +Custom create to provide clearer error responses in GM format. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubAnnotationsLabelsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsCreate(ctx context.Context) ApiModelHubAnnotationsLabelsCreateRequest { + return ApiModelHubAnnotationsLabelsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AnnotationsLabels +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsCreateExecute(r ApiModelHubAnnotationsLabelsCreateRequest) (*AnnotationsLabels, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationsLabels + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationsLabelsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotations-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.annotationsLabels == nil { + return localVarReturnValue, nil, reportError("annotationsLabels is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.annotationsLabels + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationsLabelsDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubAnnotationsLabelsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubAnnotationsLabelsDeleteExecute(r) +} + +/* +ModelHubAnnotationsLabelsDelete Method for ModelHubAnnotationsLabelsDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubAnnotationsLabelsDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsDelete(ctx context.Context, id string) ApiModelHubAnnotationsLabelsDeleteRequest { + return ApiModelHubAnnotationsLabelsDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsDeleteExecute(r ApiModelHubAnnotationsLabelsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationsLabelsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotations-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationsLabelsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + page *int32 + limit *int32 + dataset *string + projectId *string + type_ *string + search *string + includeUsageCount *bool + includeArchived *bool +} + +// A page number within the paginated result set. +func (r ApiModelHubAnnotationsLabelsListRequest) Page(page int32) ApiModelHubAnnotationsLabelsListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubAnnotationsLabelsListRequest) Limit(limit int32) ApiModelHubAnnotationsLabelsListRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubAnnotationsLabelsListRequest) Dataset(dataset string) ApiModelHubAnnotationsLabelsListRequest { + r.dataset = &dataset + return r +} + +func (r ApiModelHubAnnotationsLabelsListRequest) ProjectId(projectId string) ApiModelHubAnnotationsLabelsListRequest { + r.projectId = &projectId + return r +} + +func (r ApiModelHubAnnotationsLabelsListRequest) Type_(type_ string) ApiModelHubAnnotationsLabelsListRequest { + r.type_ = &type_ + return r +} + +func (r ApiModelHubAnnotationsLabelsListRequest) Search(search string) ApiModelHubAnnotationsLabelsListRequest { + r.search = &search + return r +} + +func (r ApiModelHubAnnotationsLabelsListRequest) IncludeUsageCount(includeUsageCount bool) ApiModelHubAnnotationsLabelsListRequest { + r.includeUsageCount = &includeUsageCount + return r +} + +func (r ApiModelHubAnnotationsLabelsListRequest) IncludeArchived(includeArchived bool) ApiModelHubAnnotationsLabelsListRequest { + r.includeArchived = &includeArchived + return r +} + +func (r ApiModelHubAnnotationsLabelsListRequest) Execute() ([]AnnotationsLabels, *http.Response, error) { + return r.ApiService.ModelHubAnnotationsLabelsListExecute(r) +} + +/* +ModelHubAnnotationsLabelsList Method for ModelHubAnnotationsLabelsList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubAnnotationsLabelsListRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsList(ctx context.Context) ApiModelHubAnnotationsLabelsListRequest { + return ApiModelHubAnnotationsLabelsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []AnnotationsLabels +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsListExecute(r ApiModelHubAnnotationsLabelsListRequest) ([]AnnotationsLabels, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AnnotationsLabels + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationsLabelsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotations-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.dataset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "dataset", r.dataset, "form", "") + } + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.includeUsageCount != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include_usage_count", r.includeUsageCount, "form", "") + } + if r.includeArchived != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include_archived", r.includeArchived, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationsLabelsPartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + annotationsLabels *AnnotationsLabels +} + +func (r ApiModelHubAnnotationsLabelsPartialUpdateRequest) AnnotationsLabels(annotationsLabels AnnotationsLabels) ApiModelHubAnnotationsLabelsPartialUpdateRequest { + r.annotationsLabels = &annotationsLabels + return r +} + +func (r ApiModelHubAnnotationsLabelsPartialUpdateRequest) Execute() (*AnnotationsLabels, *http.Response, error) { + return r.ApiService.ModelHubAnnotationsLabelsPartialUpdateExecute(r) +} + +/* +ModelHubAnnotationsLabelsPartialUpdate Method for ModelHubAnnotationsLabelsPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubAnnotationsLabelsPartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsPartialUpdate(ctx context.Context, id string) ApiModelHubAnnotationsLabelsPartialUpdateRequest { + return ApiModelHubAnnotationsLabelsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AnnotationsLabels +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsPartialUpdateExecute(r ApiModelHubAnnotationsLabelsPartialUpdateRequest) (*AnnotationsLabels, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationsLabels + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationsLabelsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotations-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.annotationsLabels == nil { + return localVarReturnValue, nil, reportError("annotationsLabels is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.annotationsLabels + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationsLabelsReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubAnnotationsLabelsReadRequest) Execute() (*AnnotationsLabels, *http.Response, error) { + return r.ApiService.ModelHubAnnotationsLabelsReadExecute(r) +} + +/* +ModelHubAnnotationsLabelsRead Method for ModelHubAnnotationsLabelsRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubAnnotationsLabelsReadRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsRead(ctx context.Context, id string) ApiModelHubAnnotationsLabelsReadRequest { + return ApiModelHubAnnotationsLabelsReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AnnotationsLabels +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsReadExecute(r ApiModelHubAnnotationsLabelsReadRequest) (*AnnotationsLabels, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationsLabels + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationsLabelsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotations-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationsLabelsRestoreRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + body *map[string]interface{} +} + +func (r ApiModelHubAnnotationsLabelsRestoreRequest) Body(body map[string]interface{}) ApiModelHubAnnotationsLabelsRestoreRequest { + r.body = &body + return r +} + +func (r ApiModelHubAnnotationsLabelsRestoreRequest) Execute() (*AnnotationLabelRestoreResponse, *http.Response, error) { + return r.ApiService.ModelHubAnnotationsLabelsRestoreExecute(r) +} + +/* +ModelHubAnnotationsLabelsRestore Method for ModelHubAnnotationsLabelsRestore + +Restore a soft-deleted (archived) annotation label. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubAnnotationsLabelsRestoreRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsRestore(ctx context.Context, id string) ApiModelHubAnnotationsLabelsRestoreRequest { + return ApiModelHubAnnotationsLabelsRestoreRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AnnotationLabelRestoreResponse +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsRestoreExecute(r ApiModelHubAnnotationsLabelsRestoreRequest) (*AnnotationLabelRestoreResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationLabelRestoreResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationsLabelsRestore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotations-labels/{id}/restore/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubAnnotationsLabelsUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + annotationsLabels *AnnotationsLabels +} + +func (r ApiModelHubAnnotationsLabelsUpdateRequest) AnnotationsLabels(annotationsLabels AnnotationsLabels) ApiModelHubAnnotationsLabelsUpdateRequest { + r.annotationsLabels = &annotationsLabels + return r +} + +func (r ApiModelHubAnnotationsLabelsUpdateRequest) Execute() (*AnnotationsLabels, *http.Response, error) { + return r.ApiService.ModelHubAnnotationsLabelsUpdateExecute(r) +} + +/* +ModelHubAnnotationsLabelsUpdate Method for ModelHubAnnotationsLabelsUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubAnnotationsLabelsUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsUpdate(ctx context.Context, id string) ApiModelHubAnnotationsLabelsUpdateRequest { + return ApiModelHubAnnotationsLabelsUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return AnnotationsLabels +func (a *ModelHubAPIService) ModelHubAnnotationsLabelsUpdateExecute(r ApiModelHubAnnotationsLabelsUpdateRequest) (*AnnotationsLabels, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnnotationsLabels + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubAnnotationsLabelsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/annotations-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.annotationsLabels == nil { + return localVarReturnValue, nil, reportError("annotationsLabels is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.annotationsLabels + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubApiKeysCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + apiKey *ApiKey +} + +func (r ApiModelHubApiKeysCreateRequest) ApiKey(apiKey ApiKey) ApiModelHubApiKeysCreateRequest { + r.apiKey = &apiKey + return r +} + +func (r ApiModelHubApiKeysCreateRequest) Execute() (*ApiKey, *http.Response, error) { + return r.ApiService.ModelHubApiKeysCreateExecute(r) +} + +/* +ModelHubApiKeysCreate Method for ModelHubApiKeysCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubApiKeysCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubApiKeysCreate(ctx context.Context) ApiModelHubApiKeysCreateRequest { + return ApiModelHubApiKeysCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ApiKey +func (a *ModelHubAPIService) ModelHubApiKeysCreateExecute(r ApiModelHubApiKeysCreateRequest) (*ApiKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubApiKeysCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/api-keys/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.apiKey == nil { + return localVarReturnValue, nil, reportError("apiKey is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.apiKey + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubApiKeysDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubApiKeysDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubApiKeysDeleteExecute(r) +} + +/* +ModelHubApiKeysDelete Soft-delete an API key. + +ApiKey inherits from BaseModel, so `instance.delete()` sets: +- deleted=True +- deleted_at= +and excludes it from the default manager (`objects`) queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubApiKeysDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubApiKeysDelete(ctx context.Context, id string) ApiModelHubApiKeysDeleteRequest { + return ApiModelHubApiKeysDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubApiKeysDeleteExecute(r ApiModelHubApiKeysDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubApiKeysDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/api-keys/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubApiKeysListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiModelHubApiKeysListRequest) Page(page int32) ApiModelHubApiKeysListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubApiKeysListRequest) Limit(limit int32) ApiModelHubApiKeysListRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubApiKeysListRequest) Execute() (*ModelHubApiKeysList200Response, *http.Response, error) { + return r.ApiService.ModelHubApiKeysListExecute(r) +} + +/* +ModelHubApiKeysList Method for ModelHubApiKeysList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubApiKeysListRequest +*/ +func (a *ModelHubAPIService) ModelHubApiKeysList(ctx context.Context) ApiModelHubApiKeysListRequest { + return ApiModelHubApiKeysListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubApiKeysList200Response +func (a *ModelHubAPIService) ModelHubApiKeysListExecute(r ApiModelHubApiKeysListRequest) (*ModelHubApiKeysList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubApiKeysList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubApiKeysList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/api-keys/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubApiKeysPartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + apiKey *ApiKey +} + +func (r ApiModelHubApiKeysPartialUpdateRequest) ApiKey(apiKey ApiKey) ApiModelHubApiKeysPartialUpdateRequest { + r.apiKey = &apiKey + return r +} + +func (r ApiModelHubApiKeysPartialUpdateRequest) Execute() (*ApiKey, *http.Response, error) { + return r.ApiService.ModelHubApiKeysPartialUpdateExecute(r) +} + +/* +ModelHubApiKeysPartialUpdate Method for ModelHubApiKeysPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubApiKeysPartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubApiKeysPartialUpdate(ctx context.Context, id string) ApiModelHubApiKeysPartialUpdateRequest { + return ApiModelHubApiKeysPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ApiKey +func (a *ModelHubAPIService) ModelHubApiKeysPartialUpdateExecute(r ApiModelHubApiKeysPartialUpdateRequest) (*ApiKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubApiKeysPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/api-keys/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.apiKey == nil { + return localVarReturnValue, nil, reportError("apiKey is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.apiKey + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubApiKeysReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubApiKeysReadRequest) Execute() (*ApiKey, *http.Response, error) { + return r.ApiService.ModelHubApiKeysReadExecute(r) +} + +/* +ModelHubApiKeysRead Method for ModelHubApiKeysRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubApiKeysReadRequest +*/ +func (a *ModelHubAPIService) ModelHubApiKeysRead(ctx context.Context, id string) ApiModelHubApiKeysReadRequest { + return ApiModelHubApiKeysReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ApiKey +func (a *ModelHubAPIService) ModelHubApiKeysReadExecute(r ApiModelHubApiKeysReadRequest) (*ApiKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubApiKeysRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/api-keys/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubApiKeysUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + apiKey *ApiKey +} + +func (r ApiModelHubApiKeysUpdateRequest) ApiKey(apiKey ApiKey) ApiModelHubApiKeysUpdateRequest { + r.apiKey = &apiKey + return r +} + +func (r ApiModelHubApiKeysUpdateRequest) Execute() (*ApiKey, *http.Response, error) { + return r.ApiService.ModelHubApiKeysUpdateExecute(r) +} + +/* +ModelHubApiKeysUpdate Method for ModelHubApiKeysUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubApiKeysUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubApiKeysUpdate(ctx context.Context, id string) ApiModelHubApiKeysUpdateRequest { + return ApiModelHubApiKeysUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ApiKey +func (a *ModelHubAPIService) ModelHubApiKeysUpdateExecute(r ApiModelHubApiKeysUpdateRequest) (*ApiKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubApiKeysUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/api-keys/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.apiKey == nil { + return localVarReturnValue, nil, reportError("apiKey is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.apiKey + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubApiModelsListListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubApiModelsListListRequest) Execute() (*ModelHubPaginatedResponse, *http.Response, error) { + return r.ApiService.ModelHubApiModelsListListExecute(r) +} + +/* +ModelHubApiModelsListList Method for ModelHubApiModelsListList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubApiModelsListListRequest +*/ +func (a *ModelHubAPIService) ModelHubApiModelsListList(ctx context.Context) ApiModelHubApiModelsListListRequest { + return ApiModelHubApiModelsListListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubPaginatedResponse +func (a *ModelHubAPIService) ModelHubApiModelsListListExecute(r ApiModelHubApiModelsListListRequest) (*ModelHubPaginatedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPaginatedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubApiModelsListList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/api/models_list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetRunPromptStatsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string +} + +func (r ApiModelHubDatasetRunPromptStatsListRequest) Execute() (*DatasetRunPromptStatsResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetRunPromptStatsListExecute(r) +} + +/* +ModelHubDatasetRunPromptStatsList Method for ModelHubDatasetRunPromptStatsList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetRunPromptStatsListRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetRunPromptStatsList(ctx context.Context, datasetId string) ApiModelHubDatasetRunPromptStatsListRequest { + return ApiModelHubDatasetRunPromptStatsListRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetRunPromptStatsResponse +func (a *ModelHubAPIService) ModelHubDatasetRunPromptStatsListExecute(r ApiModelHubDatasetRunPromptStatsListRequest) (*DatasetRunPromptStatsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetRunPromptStatsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetRunPromptStatsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/dataset/{dataset_id}/run-prompt-stats/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsAddApiColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + addApiColumnRequest *AddApiColumnRequest +} + +func (r ApiModelHubDatasetsAddApiColumnCreateRequest) AddApiColumnRequest(addApiColumnRequest AddApiColumnRequest) ApiModelHubDatasetsAddApiColumnCreateRequest { + r.addApiColumnRequest = &addApiColumnRequest + return r +} + +func (r ApiModelHubDatasetsAddApiColumnCreateRequest) Execute() (*DynamicColumnCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsAddApiColumnCreateExecute(r) +} + +/* +ModelHubDatasetsAddApiColumnCreate Method for ModelHubDatasetsAddApiColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsAddApiColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsAddApiColumnCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsAddApiColumnCreateRequest { + return ApiModelHubDatasetsAddApiColumnCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DynamicColumnCreateResponse +func (a *ModelHubAPIService) ModelHubDatasetsAddApiColumnCreateExecute(r ApiModelHubDatasetsAddApiColumnCreateRequest) (*DynamicColumnCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicColumnCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsAddApiColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/add-api-column/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addApiColumnRequest == nil { + return localVarReturnValue, nil, reportError("addApiColumnRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addApiColumnRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsAddVectorDbColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + vectorDBColumnRequest *VectorDBColumnRequest +} + +func (r ApiModelHubDatasetsAddVectorDbColumnCreateRequest) VectorDBColumnRequest(vectorDBColumnRequest VectorDBColumnRequest) ApiModelHubDatasetsAddVectorDbColumnCreateRequest { + r.vectorDBColumnRequest = &vectorDBColumnRequest + return r +} + +func (r ApiModelHubDatasetsAddVectorDbColumnCreateRequest) Execute() (*DynamicColumnCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsAddVectorDbColumnCreateExecute(r) +} + +/* +ModelHubDatasetsAddVectorDbColumnCreate Method for ModelHubDatasetsAddVectorDbColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsAddVectorDbColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsAddVectorDbColumnCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsAddVectorDbColumnCreateRequest { + return ApiModelHubDatasetsAddVectorDbColumnCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DynamicColumnCreateResponse +func (a *ModelHubAPIService) ModelHubDatasetsAddVectorDbColumnCreateExecute(r ApiModelHubDatasetsAddVectorDbColumnCreateRequest) (*DynamicColumnCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicColumnCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsAddVectorDbColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/add_vector_db_column/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.vectorDBColumnRequest == nil { + return localVarReturnValue, nil, reportError("vectorDBColumnRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.vectorDBColumnRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsClassifyColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + classifyColumnRequest *ClassifyColumnRequest +} + +func (r ApiModelHubDatasetsClassifyColumnCreateRequest) ClassifyColumnRequest(classifyColumnRequest ClassifyColumnRequest) ApiModelHubDatasetsClassifyColumnCreateRequest { + r.classifyColumnRequest = &classifyColumnRequest + return r +} + +func (r ApiModelHubDatasetsClassifyColumnCreateRequest) Execute() (*DynamicColumnCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsClassifyColumnCreateExecute(r) +} + +/* +ModelHubDatasetsClassifyColumnCreate Method for ModelHubDatasetsClassifyColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsClassifyColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsClassifyColumnCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsClassifyColumnCreateRequest { + return ApiModelHubDatasetsClassifyColumnCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DynamicColumnCreateResponse +func (a *ModelHubAPIService) ModelHubDatasetsClassifyColumnCreateExecute(r ApiModelHubDatasetsClassifyColumnCreateRequest) (*DynamicColumnCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicColumnCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsClassifyColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/classify-column/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.classifyColumnRequest == nil { + return localVarReturnValue, nil, reportError("classifyColumnRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.classifyColumnRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + compareExperimentEvalRequest *CompareExperimentEvalRequest +} + +func (r ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest) CompareExperimentEvalRequest(compareExperimentEvalRequest CompareExperimentEvalRequest) ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest { + r.compareExperimentEvalRequest = &compareExperimentEvalRequest + return r +} + +func (r ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsCompareDatasetsAddEvalCreateExecute(r) +} + +/* +ModelHubDatasetsCompareDatasetsAddEvalCreate Method for ModelHubDatasetsCompareDatasetsAddEvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsAddEvalCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest { + return ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsAddEvalCreateExecute(r ApiModelHubDatasetsCompareDatasetsAddEvalCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsCompareDatasetsAddEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/compare-datasets/add-eval/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compareExperimentEvalRequest == nil { + return localVarReturnValue, nil, reportError("compareExperimentEvalRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compareExperimentEvalRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsCompareDatasetsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + compareDataset *CompareDataset +} + +func (r ApiModelHubDatasetsCompareDatasetsCreateRequest) CompareDataset(compareDataset CompareDataset) ApiModelHubDatasetsCompareDatasetsCreateRequest { + r.compareDataset = &compareDataset + return r +} + +func (r ApiModelHubDatasetsCompareDatasetsCreateRequest) Execute() (*CompareDatasetResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsCompareDatasetsCreateExecute(r) +} + +/* +ModelHubDatasetsCompareDatasetsCreate Method for ModelHubDatasetsCompareDatasetsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsCompareDatasetsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsCompareDatasetsCreateRequest { + return ApiModelHubDatasetsCompareDatasetsCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return CompareDatasetResponse +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsCreateExecute(r ApiModelHubDatasetsCompareDatasetsCreateRequest) (*CompareDatasetResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompareDatasetResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsCompareDatasetsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/compare-datasets/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compareDataset == nil { + return localVarReturnValue, nil, reportError("compareDataset is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compareDataset + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + compareDataset *CompareDataset +} + +func (r ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest) CompareDataset(compareDataset CompareDataset) ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest { + r.compareDataset = &compareDataset + return r +} + +func (r ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ModelHubDatasetsCompareDatasetsDownloadCreateExecute(r) +} + +/* +ModelHubDatasetsCompareDatasetsDownloadCreate Method for ModelHubDatasetsCompareDatasetsDownloadCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsDownloadCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest { + return ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return *os.File +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsDownloadCreateExecute(r ApiModelHubDatasetsCompareDatasetsDownloadCreateRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsCompareDatasetsDownloadCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/compare-datasets/download/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compareDataset == nil { + return localVarReturnValue, nil, reportError("compareDataset is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compareDataset + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + compareStartEvalsRequest *CompareStartEvalsRequest +} + +func (r ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest) CompareStartEvalsRequest(compareStartEvalsRequest CompareStartEvalsRequest) ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest { + r.compareStartEvalsRequest = &compareStartEvalsRequest + return r +} + +func (r ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsCompareDatasetsStartEvalCreateExecute(r) +} + +/* +ModelHubDatasetsCompareDatasetsStartEvalCreate Method for ModelHubDatasetsCompareDatasetsStartEvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsStartEvalCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest { + return ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDatasetsCompareDatasetsStartEvalCreateExecute(r ApiModelHubDatasetsCompareDatasetsStartEvalCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsCompareDatasetsStartEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/compare-datasets/start-eval/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compareStartEvalsRequest == nil { + return localVarReturnValue, nil, reportError("compareStartEvalsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compareStartEvalsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsCompareGetEvalsListCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + compareEvalsListRequest *CompareEvalsListRequest +} + +func (r ApiModelHubDatasetsCompareGetEvalsListCreateRequest) CompareEvalsListRequest(compareEvalsListRequest CompareEvalsListRequest) ApiModelHubDatasetsCompareGetEvalsListCreateRequest { + r.compareEvalsListRequest = &compareEvalsListRequest + return r +} + +func (r ApiModelHubDatasetsCompareGetEvalsListCreateRequest) Execute() (*CompareEvalListResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsCompareGetEvalsListCreateExecute(r) +} + +/* +ModelHubDatasetsCompareGetEvalsListCreate Method for ModelHubDatasetsCompareGetEvalsListCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDatasetsCompareGetEvalsListCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsCompareGetEvalsListCreate(ctx context.Context) ApiModelHubDatasetsCompareGetEvalsListCreateRequest { + return ApiModelHubDatasetsCompareGetEvalsListCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CompareEvalListResponse +func (a *ModelHubAPIService) ModelHubDatasetsCompareGetEvalsListCreateExecute(r ApiModelHubDatasetsCompareGetEvalsListCreateRequest) (*CompareEvalListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompareEvalListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsCompareGetEvalsListCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/compare/get-evals-list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compareEvalsListRequest == nil { + return localVarReturnValue, nil, reportError("compareEvalsListRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compareEvalsListRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsComparePreviewRunEvalCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + comparePreviewRunEvalRequest *ComparePreviewRunEvalRequest +} + +func (r ApiModelHubDatasetsComparePreviewRunEvalCreateRequest) ComparePreviewRunEvalRequest(comparePreviewRunEvalRequest ComparePreviewRunEvalRequest) ApiModelHubDatasetsComparePreviewRunEvalCreateRequest { + r.comparePreviewRunEvalRequest = &comparePreviewRunEvalRequest + return r +} + +func (r ApiModelHubDatasetsComparePreviewRunEvalCreateRequest) Execute() (*EvalPreviewResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsComparePreviewRunEvalCreateExecute(r) +} + +/* +ModelHubDatasetsComparePreviewRunEvalCreate Method for ModelHubDatasetsComparePreviewRunEvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDatasetsComparePreviewRunEvalCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsComparePreviewRunEvalCreate(ctx context.Context) ApiModelHubDatasetsComparePreviewRunEvalCreateRequest { + return ApiModelHubDatasetsComparePreviewRunEvalCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EvalPreviewResponse +func (a *ModelHubAPIService) ModelHubDatasetsComparePreviewRunEvalCreateExecute(r ApiModelHubDatasetsComparePreviewRunEvalCreateRequest) (*EvalPreviewResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalPreviewResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsComparePreviewRunEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/compare/preview-run-eval/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.comparePreviewRunEvalRequest == nil { + return localVarReturnValue, nil, reportError("comparePreviewRunEvalRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.comparePreviewRunEvalRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsCompareStatsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + compareDatasetStatsRequest *CompareDatasetStatsRequest +} + +func (r ApiModelHubDatasetsCompareStatsCreateRequest) CompareDatasetStatsRequest(compareDatasetStatsRequest CompareDatasetStatsRequest) ApiModelHubDatasetsCompareStatsCreateRequest { + r.compareDatasetStatsRequest = &compareDatasetStatsRequest + return r +} + +func (r ApiModelHubDatasetsCompareStatsCreateRequest) Execute() (*CompareDatasetStatsResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsCompareStatsCreateExecute(r) +} + +/* +ModelHubDatasetsCompareStatsCreate Method for ModelHubDatasetsCompareStatsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsCompareStatsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsCompareStatsCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsCompareStatsCreateRequest { + return ApiModelHubDatasetsCompareStatsCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return CompareDatasetStatsResponse +func (a *ModelHubAPIService) ModelHubDatasetsCompareStatsCreateExecute(r ApiModelHubDatasetsCompareStatsCreateRequest) (*CompareDatasetStatsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompareDatasetStatsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsCompareStatsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/compare-stats/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compareDatasetStatsRequest == nil { + return localVarReturnValue, nil, reportError("compareDatasetStatsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compareDatasetStatsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsConditionalColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + conditionalColumnRequest *ConditionalColumnRequest +} + +func (r ApiModelHubDatasetsConditionalColumnCreateRequest) ConditionalColumnRequest(conditionalColumnRequest ConditionalColumnRequest) ApiModelHubDatasetsConditionalColumnCreateRequest { + r.conditionalColumnRequest = &conditionalColumnRequest + return r +} + +func (r ApiModelHubDatasetsConditionalColumnCreateRequest) Execute() (*DynamicColumnCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsConditionalColumnCreateExecute(r) +} + +/* +ModelHubDatasetsConditionalColumnCreate Method for ModelHubDatasetsConditionalColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsConditionalColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsConditionalColumnCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsConditionalColumnCreateRequest { + return ApiModelHubDatasetsConditionalColumnCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DynamicColumnCreateResponse +func (a *ModelHubAPIService) ModelHubDatasetsConditionalColumnCreateExecute(r ApiModelHubDatasetsConditionalColumnCreateRequest) (*DynamicColumnCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicColumnCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsConditionalColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/conditional-column/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.conditionalColumnRequest == nil { + return localVarReturnValue, nil, reportError("conditionalColumnRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.conditionalColumnRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsDeleteCompareDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + compareId string +} + +func (r ApiModelHubDatasetsDeleteCompareDeleteRequest) Execute() (*CompareDatasetDeleteResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsDeleteCompareDeleteExecute(r) +} + +/* +ModelHubDatasetsDeleteCompareDelete Method for ModelHubDatasetsDeleteCompareDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compareId + @return ApiModelHubDatasetsDeleteCompareDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsDeleteCompareDelete(ctx context.Context, compareId string) ApiModelHubDatasetsDeleteCompareDeleteRequest { + return ApiModelHubDatasetsDeleteCompareDeleteRequest{ + ApiService: a, + ctx: ctx, + compareId: compareId, + } +} + +// Execute executes the request +// +// @return CompareDatasetDeleteResponse +func (a *ModelHubAPIService) ModelHubDatasetsDeleteCompareDeleteExecute(r ApiModelHubDatasetsDeleteCompareDeleteRequest) (*CompareDatasetDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompareDatasetDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsDeleteCompareDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/delete-compare/{compare_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"compare_id"+"}", url.PathEscape(parameterValueToString(r.compareId, "compareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsDeleteCompareReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + compareId string +} + +func (r ApiModelHubDatasetsDeleteCompareReadRequest) Execute() (*CompareDatasetRowResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsDeleteCompareReadExecute(r) +} + +/* +ModelHubDatasetsDeleteCompareRead Method for ModelHubDatasetsDeleteCompareRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compareId + @return ApiModelHubDatasetsDeleteCompareReadRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsDeleteCompareRead(ctx context.Context, compareId string) ApiModelHubDatasetsDeleteCompareReadRequest { + return ApiModelHubDatasetsDeleteCompareReadRequest{ + ApiService: a, + ctx: ctx, + compareId: compareId, + } +} + +// Execute executes the request +// +// @return CompareDatasetRowResponse +func (a *ModelHubAPIService) ModelHubDatasetsDeleteCompareReadExecute(r ApiModelHubDatasetsDeleteCompareReadRequest) (*CompareDatasetRowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompareDatasetRowResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsDeleteCompareRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/delete-compare/{compare_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"compare_id"+"}", url.PathEscape(parameterValueToString(r.compareId, "compareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsDuplicateRowsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + duplicateRowsRequest *DuplicateRowsRequest +} + +func (r ApiModelHubDatasetsDuplicateRowsCreateRequest) DuplicateRowsRequest(duplicateRowsRequest DuplicateRowsRequest) ApiModelHubDatasetsDuplicateRowsCreateRequest { + r.duplicateRowsRequest = &duplicateRowsRequest + return r +} + +func (r ApiModelHubDatasetsDuplicateRowsCreateRequest) Execute() (*DuplicateRowsResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsDuplicateRowsCreateExecute(r) +} + +/* +ModelHubDatasetsDuplicateRowsCreate Method for ModelHubDatasetsDuplicateRowsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsDuplicateRowsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsDuplicateRowsCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsDuplicateRowsCreateRequest { + return ApiModelHubDatasetsDuplicateRowsCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DuplicateRowsResponse +func (a *ModelHubAPIService) ModelHubDatasetsDuplicateRowsCreateExecute(r ApiModelHubDatasetsDuplicateRowsCreateRequest) (*DuplicateRowsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DuplicateRowsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsDuplicateRowsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/duplicate-rows/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.duplicateRowsRequest == nil { + return localVarReturnValue, nil, reportError("duplicateRowsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.duplicateRowsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsExplanationSummaryReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string +} + +func (r ApiModelHubDatasetsExplanationSummaryReadRequest) Execute() (*DatasetExplanationSummaryResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsExplanationSummaryReadExecute(r) +} + +/* +ModelHubDatasetsExplanationSummaryRead Method for ModelHubDatasetsExplanationSummaryRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsExplanationSummaryReadRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsExplanationSummaryRead(ctx context.Context, datasetId string) ApiModelHubDatasetsExplanationSummaryReadRequest { + return ApiModelHubDatasetsExplanationSummaryReadRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetExplanationSummaryResponse +func (a *ModelHubAPIService) ModelHubDatasetsExplanationSummaryReadExecute(r ApiModelHubDatasetsExplanationSummaryReadRequest) (*DatasetExplanationSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetExplanationSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsExplanationSummaryRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/explanation-summary/{dataset_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + body *map[string]interface{} +} + +func (r ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest) Body(body map[string]interface{}) ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest { + r.body = &body + return r +} + +func (r ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest) Execute() (*DatasetExplanationSummaryResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsExplanationSummaryRefreshCreateExecute(r) +} + +/* +ModelHubDatasetsExplanationSummaryRefreshCreate Method for ModelHubDatasetsExplanationSummaryRefreshCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsExplanationSummaryRefreshCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest { + return ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetExplanationSummaryResponse +func (a *ModelHubAPIService) ModelHubDatasetsExplanationSummaryRefreshCreateExecute(r ApiModelHubDatasetsExplanationSummaryRefreshCreateRequest) (*DatasetExplanationSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetExplanationSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsExplanationSummaryRefreshCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/explanation-summary/{dataset_id}/refresh/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsExtractEntitiesCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + extractEntitiesRequest *ExtractEntitiesRequest +} + +func (r ApiModelHubDatasetsExtractEntitiesCreateRequest) ExtractEntitiesRequest(extractEntitiesRequest ExtractEntitiesRequest) ApiModelHubDatasetsExtractEntitiesCreateRequest { + r.extractEntitiesRequest = &extractEntitiesRequest + return r +} + +func (r ApiModelHubDatasetsExtractEntitiesCreateRequest) Execute() (*DynamicColumnMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsExtractEntitiesCreateExecute(r) +} + +/* +ModelHubDatasetsExtractEntitiesCreate Method for ModelHubDatasetsExtractEntitiesCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsExtractEntitiesCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsExtractEntitiesCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsExtractEntitiesCreateRequest { + return ApiModelHubDatasetsExtractEntitiesCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DynamicColumnMessageResponse +func (a *ModelHubAPIService) ModelHubDatasetsExtractEntitiesCreateExecute(r ApiModelHubDatasetsExtractEntitiesCreateRequest) (*DynamicColumnMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicColumnMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsExtractEntitiesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/extract-entities/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.extractEntitiesRequest == nil { + return localVarReturnValue, nil, reportError("extractEntitiesRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.extractEntitiesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsGetCompareRowDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + compareId string + rowId string +} + +func (r ApiModelHubDatasetsGetCompareRowDeleteRequest) Execute() (*CompareDatasetDeleteResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsGetCompareRowDeleteExecute(r) +} + +/* +ModelHubDatasetsGetCompareRowDelete Method for ModelHubDatasetsGetCompareRowDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compareId + @param rowId + @return ApiModelHubDatasetsGetCompareRowDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsGetCompareRowDelete(ctx context.Context, compareId string, rowId string) ApiModelHubDatasetsGetCompareRowDeleteRequest { + return ApiModelHubDatasetsGetCompareRowDeleteRequest{ + ApiService: a, + ctx: ctx, + compareId: compareId, + rowId: rowId, + } +} + +// Execute executes the request +// +// @return CompareDatasetDeleteResponse +func (a *ModelHubAPIService) ModelHubDatasetsGetCompareRowDeleteExecute(r ApiModelHubDatasetsGetCompareRowDeleteRequest) (*CompareDatasetDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompareDatasetDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsGetCompareRowDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"compare_id"+"}", url.PathEscape(parameterValueToString(r.compareId, "compareId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsGetCompareRowReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + compareId string + rowId string +} + +func (r ApiModelHubDatasetsGetCompareRowReadRequest) Execute() (*CompareDatasetRowResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsGetCompareRowReadExecute(r) +} + +/* +ModelHubDatasetsGetCompareRowRead Method for ModelHubDatasetsGetCompareRowRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param compareId + @param rowId + @return ApiModelHubDatasetsGetCompareRowReadRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsGetCompareRowRead(ctx context.Context, compareId string, rowId string) ApiModelHubDatasetsGetCompareRowReadRequest { + return ApiModelHubDatasetsGetCompareRowReadRequest{ + ApiService: a, + ctx: ctx, + compareId: compareId, + rowId: rowId, + } +} + +// Execute executes the request +// +// @return CompareDatasetRowResponse +func (a *ModelHubAPIService) ModelHubDatasetsGetCompareRowReadExecute(r ApiModelHubDatasetsGetCompareRowReadRequest) (*CompareDatasetRowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompareDatasetRowResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsGetCompareRowRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"compare_id"+"}", url.PathEscape(parameterValueToString(r.compareId, "compareId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsHuggingfaceDetailCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + huggingFaceDatasetDetailRequest *HuggingFaceDatasetDetailRequest +} + +func (r ApiModelHubDatasetsHuggingfaceDetailCreateRequest) HuggingFaceDatasetDetailRequest(huggingFaceDatasetDetailRequest HuggingFaceDatasetDetailRequest) ApiModelHubDatasetsHuggingfaceDetailCreateRequest { + r.huggingFaceDatasetDetailRequest = &huggingFaceDatasetDetailRequest + return r +} + +func (r ApiModelHubDatasetsHuggingfaceDetailCreateRequest) Execute() (*HuggingFaceDatasetDetailResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsHuggingfaceDetailCreateExecute(r) +} + +/* +ModelHubDatasetsHuggingfaceDetailCreate Method for ModelHubDatasetsHuggingfaceDetailCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDatasetsHuggingfaceDetailCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsHuggingfaceDetailCreate(ctx context.Context) ApiModelHubDatasetsHuggingfaceDetailCreateRequest { + return ApiModelHubDatasetsHuggingfaceDetailCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return HuggingFaceDatasetDetailResponse +func (a *ModelHubAPIService) ModelHubDatasetsHuggingfaceDetailCreateExecute(r ApiModelHubDatasetsHuggingfaceDetailCreateRequest) (*HuggingFaceDatasetDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HuggingFaceDatasetDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsHuggingfaceDetailCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/huggingface/detail/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.huggingFaceDatasetDetailRequest == nil { + return localVarReturnValue, nil, reportError("huggingFaceDatasetDetailRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.huggingFaceDatasetDetailRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsHuggingfaceListCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + huggingFaceDatasetListRequest *HuggingFaceDatasetListRequest +} + +func (r ApiModelHubDatasetsHuggingfaceListCreateRequest) HuggingFaceDatasetListRequest(huggingFaceDatasetListRequest HuggingFaceDatasetListRequest) ApiModelHubDatasetsHuggingfaceListCreateRequest { + r.huggingFaceDatasetListRequest = &huggingFaceDatasetListRequest + return r +} + +func (r ApiModelHubDatasetsHuggingfaceListCreateRequest) Execute() (*HuggingFaceDatasetListResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsHuggingfaceListCreateExecute(r) +} + +/* +ModelHubDatasetsHuggingfaceListCreate Method for ModelHubDatasetsHuggingfaceListCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDatasetsHuggingfaceListCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsHuggingfaceListCreate(ctx context.Context) ApiModelHubDatasetsHuggingfaceListCreateRequest { + return ApiModelHubDatasetsHuggingfaceListCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return HuggingFaceDatasetListResponse +func (a *ModelHubAPIService) ModelHubDatasetsHuggingfaceListCreateExecute(r ApiModelHubDatasetsHuggingfaceListCreateRequest) (*HuggingFaceDatasetListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HuggingFaceDatasetListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsHuggingfaceListCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/huggingface/list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.huggingFaceDatasetListRequest == nil { + return localVarReturnValue, nil, reportError("huggingFaceDatasetListRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.huggingFaceDatasetListRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsMergeCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + mergeDatasetRequest *MergeDatasetRequest +} + +func (r ApiModelHubDatasetsMergeCreateRequest) MergeDatasetRequest(mergeDatasetRequest MergeDatasetRequest) ApiModelHubDatasetsMergeCreateRequest { + r.mergeDatasetRequest = &mergeDatasetRequest + return r +} + +func (r ApiModelHubDatasetsMergeCreateRequest) Execute() (*MergeDatasetResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsMergeCreateExecute(r) +} + +/* +ModelHubDatasetsMergeCreate Method for ModelHubDatasetsMergeCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDatasetsMergeCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsMergeCreate(ctx context.Context, datasetId string) ApiModelHubDatasetsMergeCreateRequest { + return ApiModelHubDatasetsMergeCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return MergeDatasetResponse +func (a *ModelHubAPIService) ModelHubDatasetsMergeCreateExecute(r ApiModelHubDatasetsMergeCreateRequest) (*MergeDatasetResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MergeDatasetResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsMergeCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/merge/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mergeDatasetRequest == nil { + return localVarReturnValue, nil, reportError("mergeDatasetRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mergeDatasetRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDatasetsPreviewCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + operationType string + previewDatasetOperationRequest *PreviewDatasetOperationRequest +} + +func (r ApiModelHubDatasetsPreviewCreateRequest) PreviewDatasetOperationRequest(previewDatasetOperationRequest PreviewDatasetOperationRequest) ApiModelHubDatasetsPreviewCreateRequest { + r.previewDatasetOperationRequest = &previewDatasetOperationRequest + return r +} + +func (r ApiModelHubDatasetsPreviewCreateRequest) Execute() (*PreviewDatasetOperationResponse, *http.Response, error) { + return r.ApiService.ModelHubDatasetsPreviewCreateExecute(r) +} + +/* +ModelHubDatasetsPreviewCreate Method for ModelHubDatasetsPreviewCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param operationType + @return ApiModelHubDatasetsPreviewCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDatasetsPreviewCreate(ctx context.Context, datasetId string, operationType string) ApiModelHubDatasetsPreviewCreateRequest { + return ApiModelHubDatasetsPreviewCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + operationType: operationType, + } +} + +// Execute executes the request +// +// @return PreviewDatasetOperationResponse +func (a *ModelHubAPIService) ModelHubDatasetsPreviewCreateExecute(r ApiModelHubDatasetsPreviewCreateRequest) (*PreviewDatasetOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PreviewDatasetOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDatasetsPreviewCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/datasets/{dataset_id}/preview/{operation_type}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"operation_type"+"}", url.PathEscape(parameterValueToString(r.operationType, "operationType")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.previewDatasetOperationRequest == nil { + return localVarReturnValue, nil, reportError("previewDatasetOperationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.previewDatasetOperationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDeleteEvalTemplateCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + deleteEvalTemplate *DeleteEvalTemplate +} + +func (r ApiModelHubDeleteEvalTemplateCreateRequest) DeleteEvalTemplate(deleteEvalTemplate DeleteEvalTemplate) ApiModelHubDeleteEvalTemplateCreateRequest { + r.deleteEvalTemplate = &deleteEvalTemplate + return r +} + +func (r ApiModelHubDeleteEvalTemplateCreateRequest) Execute() (*ModelHubStringResultResponse, *http.Response, error) { + return r.ApiService.ModelHubDeleteEvalTemplateCreateExecute(r) +} + +/* +ModelHubDeleteEvalTemplateCreate Method for ModelHubDeleteEvalTemplateCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDeleteEvalTemplateCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDeleteEvalTemplateCreate(ctx context.Context) ApiModelHubDeleteEvalTemplateCreateRequest { + return ApiModelHubDeleteEvalTemplateCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubStringResultResponse +func (a *ModelHubAPIService) ModelHubDeleteEvalTemplateCreateExecute(r ApiModelHubDeleteEvalTemplateCreateRequest) (*ModelHubStringResultResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubStringResultResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDeleteEvalTemplateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/delete-eval-template/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deleteEvalTemplate == nil { + return localVarReturnValue, nil, reportError("deleteEvalTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deleteEvalTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddAsNewCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + addAsNewDatasetRequest *AddAsNewDatasetRequest +} + +func (r ApiModelHubDevelopsAddAsNewCreateRequest) AddAsNewDatasetRequest(addAsNewDatasetRequest AddAsNewDatasetRequest) ApiModelHubDevelopsAddAsNewCreateRequest { + r.addAsNewDatasetRequest = &addAsNewDatasetRequest + return r +} + +func (r ApiModelHubDevelopsAddAsNewCreateRequest) Execute() (*DatasetCopyResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddAsNewCreateExecute(r) +} + +/* +ModelHubDevelopsAddAsNewCreate Method for ModelHubDevelopsAddAsNewCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsAddAsNewCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddAsNewCreate(ctx context.Context) ApiModelHubDevelopsAddAsNewCreateRequest { + return ApiModelHubDevelopsAddAsNewCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DatasetCopyResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddAsNewCreateExecute(r ApiModelHubDevelopsAddAsNewCreateRequest) (*DatasetCopyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetCopyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddAsNewCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/add-as-new/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addAsNewDatasetRequest == nil { + return localVarReturnValue, nil, reportError("addAsNewDatasetRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addAsNewDatasetRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddEmptyColumnsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + datasetAddEmptyColumnsRequest *DatasetAddEmptyColumnsRequest +} + +func (r ApiModelHubDevelopsAddEmptyColumnsCreateRequest) DatasetAddEmptyColumnsRequest(datasetAddEmptyColumnsRequest DatasetAddEmptyColumnsRequest) ApiModelHubDevelopsAddEmptyColumnsCreateRequest { + r.datasetAddEmptyColumnsRequest = &datasetAddEmptyColumnsRequest + return r +} + +func (r ApiModelHubDevelopsAddEmptyColumnsCreateRequest) Execute() (*DatasetColumnsMutationResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddEmptyColumnsCreateExecute(r) +} + +/* +ModelHubDevelopsAddEmptyColumnsCreate Method for ModelHubDevelopsAddEmptyColumnsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddEmptyColumnsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddEmptyColumnsCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddEmptyColumnsCreateRequest { + return ApiModelHubDevelopsAddEmptyColumnsCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetColumnsMutationResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddEmptyColumnsCreateExecute(r ApiModelHubDevelopsAddEmptyColumnsCreateRequest) (*DatasetColumnsMutationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetColumnsMutationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddEmptyColumnsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_empty_columns/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetAddEmptyColumnsRequest == nil { + return localVarReturnValue, nil, reportError("datasetAddEmptyColumnsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetAddEmptyColumnsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddEmptyRowsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + datasetAddEmptyRowsRequest *DatasetAddEmptyRowsRequest +} + +func (r ApiModelHubDevelopsAddEmptyRowsCreateRequest) DatasetAddEmptyRowsRequest(datasetAddEmptyRowsRequest DatasetAddEmptyRowsRequest) ApiModelHubDevelopsAddEmptyRowsCreateRequest { + r.datasetAddEmptyRowsRequest = &datasetAddEmptyRowsRequest + return r +} + +func (r ApiModelHubDevelopsAddEmptyRowsCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddEmptyRowsCreateExecute(r) +} + +/* +ModelHubDevelopsAddEmptyRowsCreate Method for ModelHubDevelopsAddEmptyRowsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddEmptyRowsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddEmptyRowsCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddEmptyRowsCreateRequest { + return ApiModelHubDevelopsAddEmptyRowsCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddEmptyRowsCreateExecute(r ApiModelHubDevelopsAddEmptyRowsCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddEmptyRowsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_empty_rows/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetAddEmptyRowsRequest == nil { + return localVarReturnValue, nil, reportError("datasetAddEmptyRowsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetAddEmptyRowsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + datasetMultipleStaticColumnsRequest *DatasetMultipleStaticColumnsRequest +} + +func (r ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest) DatasetMultipleStaticColumnsRequest(datasetMultipleStaticColumnsRequest DatasetMultipleStaticColumnsRequest) ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest { + r.datasetMultipleStaticColumnsRequest = &datasetMultipleStaticColumnsRequest + return r +} + +func (r ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddMultipleStaticColumnsCreateExecute(r) +} + +/* +ModelHubDevelopsAddMultipleStaticColumnsCreate Add multiple static columns to a dataset at once. + +Expected request data: + + { + "columns": [ + { + "new_column_name": "column1", + "column_type": "string", + "source": "OTHERS" # optional + }, + { + "new_column_name": "column2", + "column_type": "number", + "source": "OTHERS" # optional + } + ] + } + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddMultipleStaticColumnsCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest { + return ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddMultipleStaticColumnsCreateExecute(r ApiModelHubDevelopsAddMultipleStaticColumnsCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddMultipleStaticColumnsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_multiple_static_columns/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetMultipleStaticColumnsRequest == nil { + return localVarReturnValue, nil, reportError("datasetMultipleStaticColumnsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetMultipleStaticColumnsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + datasetAddRowsFromExistingRequest *DatasetAddRowsFromExistingRequest +} + +func (r ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest) DatasetAddRowsFromExistingRequest(datasetAddRowsFromExistingRequest DatasetAddRowsFromExistingRequest) ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest { + r.datasetAddRowsFromExistingRequest = &datasetAddRowsFromExistingRequest + return r +} + +func (r ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest) Execute() (*DatasetRowsImportedResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddRowsFromExistingDatasetCreateExecute(r) +} + +/* +ModelHubDevelopsAddRowsFromExistingDatasetCreate Method for ModelHubDevelopsAddRowsFromExistingDatasetCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsFromExistingDatasetCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest { + return ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetRowsImportedResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsFromExistingDatasetCreateExecute(r ApiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest) (*DatasetRowsImportedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetRowsImportedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddRowsFromExistingDatasetCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetAddRowsFromExistingRequest == nil { + return localVarReturnValue, nil, reportError("datasetAddRowsFromExistingRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetAddRowsFromExistingRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddRowsFromFileCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + addRowsFromFileRequest *AddRowsFromFileRequest +} + +func (r ApiModelHubDevelopsAddRowsFromFileCreateRequest) AddRowsFromFileRequest(addRowsFromFileRequest AddRowsFromFileRequest) ApiModelHubDevelopsAddRowsFromFileCreateRequest { + r.addRowsFromFileRequest = &addRowsFromFileRequest + return r +} + +func (r ApiModelHubDevelopsAddRowsFromFileCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddRowsFromFileCreateExecute(r) +} + +/* +ModelHubDevelopsAddRowsFromFileCreate Method for ModelHubDevelopsAddRowsFromFileCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsAddRowsFromFileCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsFromFileCreate(ctx context.Context) ApiModelHubDevelopsAddRowsFromFileCreateRequest { + return ApiModelHubDevelopsAddRowsFromFileCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsFromFileCreateExecute(r ApiModelHubDevelopsAddRowsFromFileCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddRowsFromFileCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/add_rows_from_file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addRowsFromFileRequest == nil { + return localVarReturnValue, nil, reportError("addRowsFromFileRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addRowsFromFileRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + huggingFaceAddRowsRequest *HuggingFaceAddRowsRequest +} + +func (r ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest) HuggingFaceAddRowsRequest(huggingFaceAddRowsRequest HuggingFaceAddRowsRequest) ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest { + r.huggingFaceAddRowsRequest = &huggingFaceAddRowsRequest + return r +} + +func (r ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest) Execute() (*DatasetRowsImportMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddRowsFromHuggingfaceCreateExecute(r) +} + +/* +ModelHubDevelopsAddRowsFromHuggingfaceCreate Method for ModelHubDevelopsAddRowsFromHuggingfaceCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsFromHuggingfaceCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest { + return ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetRowsImportMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsFromHuggingfaceCreateExecute(r ApiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest) (*DatasetRowsImportMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetRowsImportMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddRowsFromHuggingfaceCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_rows_from_huggingface/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.huggingFaceAddRowsRequest == nil { + return localVarReturnValue, nil, reportError("huggingFaceAddRowsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.huggingFaceAddRowsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddRowsSdkCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetSdkRowsRequest *DatasetSdkRowsRequest +} + +func (r ApiModelHubDevelopsAddRowsSdkCreateRequest) DatasetSdkRowsRequest(datasetSdkRowsRequest DatasetSdkRowsRequest) ApiModelHubDevelopsAddRowsSdkCreateRequest { + r.datasetSdkRowsRequest = &datasetSdkRowsRequest + return r +} + +func (r ApiModelHubDevelopsAddRowsSdkCreateRequest) Execute() (*DatasetSdkRowsResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddRowsSdkCreateExecute(r) +} + +/* +ModelHubDevelopsAddRowsSdkCreate Method for ModelHubDevelopsAddRowsSdkCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsAddRowsSdkCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsSdkCreate(ctx context.Context) ApiModelHubDevelopsAddRowsSdkCreateRequest { + return ApiModelHubDevelopsAddRowsSdkCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DatasetSdkRowsResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddRowsSdkCreateExecute(r ApiModelHubDevelopsAddRowsSdkCreateRequest) (*DatasetSdkRowsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetSdkRowsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddRowsSdkCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/add_rows_sdk/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetSdkRowsRequest == nil { + return localVarReturnValue, nil, reportError("datasetSdkRowsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetSdkRowsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddRunPromptColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + addRunPrompt *AddRunPrompt +} + +func (r ApiModelHubDevelopsAddRunPromptColumnCreateRequest) AddRunPrompt(addRunPrompt AddRunPrompt) ApiModelHubDevelopsAddRunPromptColumnCreateRequest { + r.addRunPrompt = &addRunPrompt + return r +} + +func (r ApiModelHubDevelopsAddRunPromptColumnCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddRunPromptColumnCreateExecute(r) +} + +/* +ModelHubDevelopsAddRunPromptColumnCreate Method for ModelHubDevelopsAddRunPromptColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsAddRunPromptColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddRunPromptColumnCreate(ctx context.Context) ApiModelHubDevelopsAddRunPromptColumnCreateRequest { + return ApiModelHubDevelopsAddRunPromptColumnCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddRunPromptColumnCreateExecute(r ApiModelHubDevelopsAddRunPromptColumnCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddRunPromptColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/add_run_prompt_column/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addRunPrompt == nil { + return localVarReturnValue, nil, reportError("addRunPrompt is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addRunPrompt + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddStaticColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + datasetStaticColumnRequest *DatasetStaticColumnRequest +} + +func (r ApiModelHubDevelopsAddStaticColumnCreateRequest) DatasetStaticColumnRequest(datasetStaticColumnRequest DatasetStaticColumnRequest) ApiModelHubDevelopsAddStaticColumnCreateRequest { + r.datasetStaticColumnRequest = &datasetStaticColumnRequest + return r +} + +func (r ApiModelHubDevelopsAddStaticColumnCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddStaticColumnCreateExecute(r) +} + +/* +ModelHubDevelopsAddStaticColumnCreate Method for ModelHubDevelopsAddStaticColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddStaticColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddStaticColumnCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddStaticColumnCreateRequest { + return ApiModelHubDevelopsAddStaticColumnCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddStaticColumnCreateExecute(r ApiModelHubDevelopsAddStaticColumnCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddStaticColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_static_column/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetStaticColumnRequest == nil { + return localVarReturnValue, nil, reportError("datasetStaticColumnRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetStaticColumnRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddSyntheticDataCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + syntheticData *SyntheticData +} + +func (r ApiModelHubDevelopsAddSyntheticDataCreateRequest) SyntheticData(syntheticData SyntheticData) ApiModelHubDevelopsAddSyntheticDataCreateRequest { + r.syntheticData = &syntheticData + return r +} + +func (r ApiModelHubDevelopsAddSyntheticDataCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddSyntheticDataCreateExecute(r) +} + +/* +ModelHubDevelopsAddSyntheticDataCreate Method for ModelHubDevelopsAddSyntheticDataCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddSyntheticDataCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddSyntheticDataCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddSyntheticDataCreateRequest { + return ApiModelHubDevelopsAddSyntheticDataCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddSyntheticDataCreateExecute(r ApiModelHubDevelopsAddSyntheticDataCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddSyntheticDataCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_synthetic_data/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.syntheticData == nil { + return localVarReturnValue, nil, reportError("syntheticData is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.syntheticData + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsAddUserEvalCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + userEvalMutationRequest *UserEvalMutationRequest +} + +func (r ApiModelHubDevelopsAddUserEvalCreateRequest) UserEvalMutationRequest(userEvalMutationRequest UserEvalMutationRequest) ApiModelHubDevelopsAddUserEvalCreateRequest { + r.userEvalMutationRequest = &userEvalMutationRequest + return r +} + +func (r ApiModelHubDevelopsAddUserEvalCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsAddUserEvalCreateExecute(r) +} + +/* +ModelHubDevelopsAddUserEvalCreate Method for ModelHubDevelopsAddUserEvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsAddUserEvalCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsAddUserEvalCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsAddUserEvalCreateRequest { + return ApiModelHubDevelopsAddUserEvalCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsAddUserEvalCreateExecute(r ApiModelHubDevelopsAddUserEvalCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsAddUserEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/add_user_eval/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userEvalMutationRequest == nil { + return localVarReturnValue, nil, reportError("userEvalMutationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userEvalMutationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsCloneDatasetCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + cloneDatasetRequest *CloneDatasetRequest +} + +func (r ApiModelHubDevelopsCloneDatasetCreateRequest) CloneDatasetRequest(cloneDatasetRequest CloneDatasetRequest) ApiModelHubDevelopsCloneDatasetCreateRequest { + r.cloneDatasetRequest = &cloneDatasetRequest + return r +} + +func (r ApiModelHubDevelopsCloneDatasetCreateRequest) Execute() (*DatasetCopyResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsCloneDatasetCreateExecute(r) +} + +/* +ModelHubDevelopsCloneDatasetCreate Method for ModelHubDevelopsCloneDatasetCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsCloneDatasetCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsCloneDatasetCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsCloneDatasetCreateRequest { + return ApiModelHubDevelopsCloneDatasetCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetCopyResponse +func (a *ModelHubAPIService) ModelHubDevelopsCloneDatasetCreateExecute(r ApiModelHubDevelopsCloneDatasetCreateRequest) (*DatasetCopyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetCopyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsCloneDatasetCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/clone-dataset/{dataset_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cloneDatasetRequest == nil { + return localVarReturnValue, nil, reportError("cloneDatasetRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cloneDatasetRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsCreateDatasetCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + expDatasetId string + createDatasetFromExperimentRequest *CreateDatasetFromExperimentRequest +} + +func (r ApiModelHubDevelopsCreateDatasetCreateRequest) CreateDatasetFromExperimentRequest(createDatasetFromExperimentRequest CreateDatasetFromExperimentRequest) ApiModelHubDevelopsCreateDatasetCreateRequest { + r.createDatasetFromExperimentRequest = &createDatasetFromExperimentRequest + return r +} + +func (r ApiModelHubDevelopsCreateDatasetCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsCreateDatasetCreateExecute(r) +} + +/* +ModelHubDevelopsCreateDatasetCreate Method for ModelHubDevelopsCreateDatasetCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param expDatasetId + @return ApiModelHubDevelopsCreateDatasetCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsCreateDatasetCreate(ctx context.Context, expDatasetId string) ApiModelHubDevelopsCreateDatasetCreateRequest { + return ApiModelHubDevelopsCreateDatasetCreateRequest{ + ApiService: a, + ctx: ctx, + expDatasetId: expDatasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsCreateDatasetCreateExecute(r ApiModelHubDevelopsCreateDatasetCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsCreateDatasetCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{exp_dataset_id}/create-dataset/" + localVarPath = strings.Replace(localVarPath, "{"+"exp_dataset_id"+"}", url.PathEscape(parameterValueToString(r.expDatasetId, "expDatasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createDatasetFromExperimentRequest == nil { + return localVarReturnValue, nil, reportError("createDatasetFromExperimentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createDatasetFromExperimentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + huggingFaceDatasetCreateRequest *HuggingFaceDatasetCreateRequest +} + +func (r ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest) HuggingFaceDatasetCreateRequest(huggingFaceDatasetCreateRequest HuggingFaceDatasetCreateRequest) ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest { + r.huggingFaceDatasetCreateRequest = &huggingFaceDatasetCreateRequest + return r +} + +func (r ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest) Execute() (*DatasetCreateStartedResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsCreateDatasetFromHuggingfaceCreateExecute(r) +} + +/* +ModelHubDevelopsCreateDatasetFromHuggingfaceCreate Method for ModelHubDevelopsCreateDatasetFromHuggingfaceCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsCreateDatasetFromHuggingfaceCreate(ctx context.Context) ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest { + return ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DatasetCreateStartedResponse +func (a *ModelHubAPIService) ModelHubDevelopsCreateDatasetFromHuggingfaceCreateExecute(r ApiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest) (*DatasetCreateStartedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetCreateStartedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsCreateDatasetFromHuggingfaceCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/create-dataset-from-huggingface/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.huggingFaceDatasetCreateRequest == nil { + return localVarReturnValue, nil, reportError("huggingFaceDatasetCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.huggingFaceDatasetCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + syntheticDatasetCreation *SyntheticDatasetCreation +} + +func (r ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest) SyntheticDatasetCreation(syntheticDatasetCreation SyntheticDatasetCreation) ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest { + r.syntheticDatasetCreation = &syntheticDatasetCreation + return r +} + +func (r ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest) Execute() (*SyntheticDatasetCreateStartedResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsCreateSyntheticDatasetCreateExecute(r) +} + +/* +ModelHubDevelopsCreateSyntheticDatasetCreate Method for ModelHubDevelopsCreateSyntheticDatasetCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsCreateSyntheticDatasetCreate(ctx context.Context) ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest { + return ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SyntheticDatasetCreateStartedResponse +func (a *ModelHubAPIService) ModelHubDevelopsCreateSyntheticDatasetCreateExecute(r ApiModelHubDevelopsCreateSyntheticDatasetCreateRequest) (*SyntheticDatasetCreateStartedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SyntheticDatasetCreateStartedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsCreateSyntheticDatasetCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/create-synthetic-dataset/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.syntheticDatasetCreation == nil { + return localVarReturnValue, nil, reportError("syntheticDatasetCreation is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.syntheticDatasetCreation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsDatasetCreationProgressReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string +} + +func (r ApiModelHubDevelopsDatasetCreationProgressReadRequest) Execute() (*DatasetCreationProgressResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsDatasetCreationProgressReadExecute(r) +} + +/* +ModelHubDevelopsDatasetCreationProgressRead Method for ModelHubDevelopsDatasetCreationProgressRead + +API endpoint to check the progress of dataset creation from file upload + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsDatasetCreationProgressReadRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsDatasetCreationProgressRead(ctx context.Context, datasetId string) ApiModelHubDevelopsDatasetCreationProgressReadRequest { + return ApiModelHubDevelopsDatasetCreationProgressReadRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetCreationProgressResponse +func (a *ModelHubAPIService) ModelHubDevelopsDatasetCreationProgressReadExecute(r ApiModelHubDevelopsDatasetCreationProgressReadRequest) (*DatasetCreationProgressResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetCreationProgressResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsDatasetCreationProgressRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/dataset-creation-progress/{dataset_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsDeleteDatasetDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubDevelopsDeleteDatasetDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubDevelopsDeleteDatasetDeleteExecute(r) +} + +/* +ModelHubDevelopsDeleteDatasetDelete Method for ModelHubDevelopsDeleteDatasetDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsDeleteDatasetDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsDeleteDatasetDelete(ctx context.Context) ApiModelHubDevelopsDeleteDatasetDeleteRequest { + return ApiModelHubDevelopsDeleteDatasetDeleteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubDevelopsDeleteDatasetDeleteExecute(r ApiModelHubDevelopsDeleteDatasetDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsDeleteDatasetDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/delete_dataset/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsDeleteTemplateEvalDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + evalId string +} + +func (r ApiModelHubDevelopsDeleteTemplateEvalDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubDevelopsDeleteTemplateEvalDeleteExecute(r) +} + +/* +ModelHubDevelopsDeleteTemplateEvalDelete Method for ModelHubDevelopsDeleteTemplateEvalDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param evalId + @return ApiModelHubDevelopsDeleteTemplateEvalDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsDeleteTemplateEvalDelete(ctx context.Context, datasetId string, evalId string) ApiModelHubDevelopsDeleteTemplateEvalDeleteRequest { + return ApiModelHubDevelopsDeleteTemplateEvalDeleteRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + evalId: evalId, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubDevelopsDeleteTemplateEvalDeleteExecute(r ApiModelHubDevelopsDeleteTemplateEvalDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsDeleteTemplateEvalDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_id"+"}", url.PathEscape(parameterValueToString(r.evalId, "evalId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsDeleteUserEvalDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + evalId string +} + +func (r ApiModelHubDevelopsDeleteUserEvalDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubDevelopsDeleteUserEvalDeleteExecute(r) +} + +/* +ModelHubDevelopsDeleteUserEvalDelete Method for ModelHubDevelopsDeleteUserEvalDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param evalId + @return ApiModelHubDevelopsDeleteUserEvalDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsDeleteUserEvalDelete(ctx context.Context, datasetId string, evalId string) ApiModelHubDevelopsDeleteUserEvalDeleteRequest { + return ApiModelHubDevelopsDeleteUserEvalDeleteRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + evalId: evalId, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubDevelopsDeleteUserEvalDeleteExecute(r ApiModelHubDevelopsDeleteUserEvalDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsDeleteUserEvalDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_id"+"}", url.PathEscape(parameterValueToString(r.evalId, "evalId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsEditAndRunUserEvalCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + evalId string + userEvalUpdateRequest *UserEvalUpdateRequest +} + +func (r ApiModelHubDevelopsEditAndRunUserEvalCreateRequest) UserEvalUpdateRequest(userEvalUpdateRequest UserEvalUpdateRequest) ApiModelHubDevelopsEditAndRunUserEvalCreateRequest { + r.userEvalUpdateRequest = &userEvalUpdateRequest + return r +} + +func (r ApiModelHubDevelopsEditAndRunUserEvalCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsEditAndRunUserEvalCreateExecute(r) +} + +/* +ModelHubDevelopsEditAndRunUserEvalCreate Method for ModelHubDevelopsEditAndRunUserEvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param evalId + @return ApiModelHubDevelopsEditAndRunUserEvalCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsEditAndRunUserEvalCreate(ctx context.Context, datasetId string, evalId string) ApiModelHubDevelopsEditAndRunUserEvalCreateRequest { + return ApiModelHubDevelopsEditAndRunUserEvalCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + evalId: evalId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsEditAndRunUserEvalCreateExecute(r ApiModelHubDevelopsEditAndRunUserEvalCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsEditAndRunUserEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_id"+"}", url.PathEscape(parameterValueToString(r.evalId, "evalId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userEvalUpdateRequest == nil { + return localVarReturnValue, nil, reportError("userEvalUpdateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userEvalUpdateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + datasetBehaviorRequest *DatasetBehaviorRequest +} + +func (r ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest) DatasetBehaviorRequest(datasetBehaviorRequest DatasetBehaviorRequest) ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest { + r.datasetBehaviorRequest = &datasetBehaviorRequest + return r +} + +func (r ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsEditDatasetBehaviorUpdateExecute(r) +} + +/* +ModelHubDevelopsEditDatasetBehaviorUpdate Method for ModelHubDevelopsEditDatasetBehaviorUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsEditDatasetBehaviorUpdate(ctx context.Context, datasetId string) ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest { + return ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsEditDatasetBehaviorUpdateExecute(r ApiModelHubDevelopsEditDatasetBehaviorUpdateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsEditDatasetBehaviorUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/edit_dataset_behavior/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetBehaviorRequest == nil { + return localVarReturnValue, nil, reportError("datasetBehaviorRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetBehaviorRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsEditRunPromptColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + editRunPromptColumn *EditRunPromptColumn +} + +func (r ApiModelHubDevelopsEditRunPromptColumnCreateRequest) EditRunPromptColumn(editRunPromptColumn EditRunPromptColumn) ApiModelHubDevelopsEditRunPromptColumnCreateRequest { + r.editRunPromptColumn = &editRunPromptColumn + return r +} + +func (r ApiModelHubDevelopsEditRunPromptColumnCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsEditRunPromptColumnCreateExecute(r) +} + +/* +ModelHubDevelopsEditRunPromptColumnCreate Method for ModelHubDevelopsEditRunPromptColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsEditRunPromptColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsEditRunPromptColumnCreate(ctx context.Context) ApiModelHubDevelopsEditRunPromptColumnCreateRequest { + return ApiModelHubDevelopsEditRunPromptColumnCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsEditRunPromptColumnCreateExecute(r ApiModelHubDevelopsEditRunPromptColumnCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsEditRunPromptColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/edit_run_prompt_column/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.editRunPromptColumn == nil { + return localVarReturnValue, nil, reportError("editRunPromptColumn is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.editRunPromptColumn + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsExtractJsonColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + extractJsonColumnRequest *ExtractJsonColumnRequest +} + +func (r ApiModelHubDevelopsExtractJsonColumnCreateRequest) ExtractJsonColumnRequest(extractJsonColumnRequest ExtractJsonColumnRequest) ApiModelHubDevelopsExtractJsonColumnCreateRequest { + r.extractJsonColumnRequest = &extractJsonColumnRequest + return r +} + +func (r ApiModelHubDevelopsExtractJsonColumnCreateRequest) Execute() (*DynamicColumnCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsExtractJsonColumnCreateExecute(r) +} + +/* +ModelHubDevelopsExtractJsonColumnCreate Method for ModelHubDevelopsExtractJsonColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsExtractJsonColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsExtractJsonColumnCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsExtractJsonColumnCreateRequest { + return ApiModelHubDevelopsExtractJsonColumnCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DynamicColumnCreateResponse +func (a *ModelHubAPIService) ModelHubDevelopsExtractJsonColumnCreateExecute(r ApiModelHubDevelopsExtractJsonColumnCreateRequest) (*DynamicColumnCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicColumnCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsExtractJsonColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/extract-json-column/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.extractJsonColumnRequest == nil { + return localVarReturnValue, nil, reportError("extractJsonColumnRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.extractJsonColumnRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetCellDataCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetCellDataRequest *DatasetCellDataRequest +} + +func (r ApiModelHubDevelopsGetCellDataCreateRequest) DatasetCellDataRequest(datasetCellDataRequest DatasetCellDataRequest) ApiModelHubDevelopsGetCellDataCreateRequest { + r.datasetCellDataRequest = &datasetCellDataRequest + return r +} + +func (r ApiModelHubDevelopsGetCellDataCreateRequest) Execute() (*DatasetCellDataResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetCellDataCreateExecute(r) +} + +/* +ModelHubDevelopsGetCellDataCreate Method for ModelHubDevelopsGetCellDataCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsGetCellDataCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetCellDataCreate(ctx context.Context) ApiModelHubDevelopsGetCellDataCreateRequest { + return ApiModelHubDevelopsGetCellDataCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DatasetCellDataResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetCellDataCreateExecute(r ApiModelHubDevelopsGetCellDataCreateRequest) (*DatasetCellDataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetCellDataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetCellDataCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/get-cell-data/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetCellDataRequest == nil { + return localVarReturnValue, nil, reportError("datasetCellDataRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetCellDataRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetDerivedDatasetsReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string +} + +func (r ApiModelHubDevelopsGetDerivedDatasetsReadRequest) Execute() (*DatasetExplanationSummaryResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetDerivedDatasetsReadExecute(r) +} + +/* +ModelHubDevelopsGetDerivedDatasetsRead Method for ModelHubDevelopsGetDerivedDatasetsRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsGetDerivedDatasetsReadRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetDerivedDatasetsRead(ctx context.Context, datasetId string) ApiModelHubDevelopsGetDerivedDatasetsReadRequest { + return ApiModelHubDevelopsGetDerivedDatasetsReadRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DatasetExplanationSummaryResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetDerivedDatasetsReadExecute(r ApiModelHubDevelopsGetDerivedDatasetsReadRequest) (*DatasetExplanationSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetExplanationSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetDerivedDatasetsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/get-derived-datasets/{dataset_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetEvalStructureReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + evalId string + evalType *string +} + +func (r ApiModelHubDevelopsGetEvalStructureReadRequest) EvalType(evalType string) ApiModelHubDevelopsGetEvalStructureReadRequest { + r.evalType = &evalType + return r +} + +func (r ApiModelHubDevelopsGetEvalStructureReadRequest) Execute() (*EvalStructureResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetEvalStructureReadExecute(r) +} + +/* +ModelHubDevelopsGetEvalStructureRead Method for ModelHubDevelopsGetEvalStructureRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param evalId + @return ApiModelHubDevelopsGetEvalStructureReadRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetEvalStructureRead(ctx context.Context, datasetId string, evalId string) ApiModelHubDevelopsGetEvalStructureReadRequest { + return ApiModelHubDevelopsGetEvalStructureReadRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + evalId: evalId, + } +} + +// Execute executes the request +// +// @return EvalStructureResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetEvalStructureReadExecute(r ApiModelHubDevelopsGetEvalStructureReadRequest) (*EvalStructureResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalStructureResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetEvalStructureRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_id"+"}", url.PathEscape(parameterValueToString(r.evalId, "evalId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalType == nil { + return localVarReturnValue, nil, reportError("evalType is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "eval_type", r.evalType, "form", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetEvalsListListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string +} + +func (r ApiModelHubDevelopsGetEvalsListListRequest) Execute() (*EvalListResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetEvalsListListExecute(r) +} + +/* +ModelHubDevelopsGetEvalsListList Method for ModelHubDevelopsGetEvalsListList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsGetEvalsListListRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetEvalsListList(ctx context.Context, datasetId string) ApiModelHubDevelopsGetEvalsListListRequest { + return ApiModelHubDevelopsGetEvalsListListRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return EvalListResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetEvalsListListExecute(r ApiModelHubDevelopsGetEvalsListListRequest) (*EvalListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetEvalsListList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/get_evals_list/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetExperimentDatasetTableListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentDatasetId string +} + +func (r ApiModelHubDevelopsGetExperimentDatasetTableListRequest) Execute() (*DatasetTableResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetExperimentDatasetTableListExecute(r) +} + +/* +ModelHubDevelopsGetExperimentDatasetTableList Method for ModelHubDevelopsGetExperimentDatasetTableList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentDatasetId + @return ApiModelHubDevelopsGetExperimentDatasetTableListRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetExperimentDatasetTableList(ctx context.Context, experimentDatasetId string) ApiModelHubDevelopsGetExperimentDatasetTableListRequest { + return ApiModelHubDevelopsGetExperimentDatasetTableListRequest{ + ApiService: a, + ctx: ctx, + experimentDatasetId: experimentDatasetId, + } +} + +// Execute executes the request +// +// @return DatasetTableResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetExperimentDatasetTableListExecute(r ApiModelHubDevelopsGetExperimentDatasetTableListRequest) (*DatasetTableResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatasetTableResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetExperimentDatasetTableList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_dataset_id"+"}", url.PathEscape(parameterValueToString(r.experimentDatasetId, "experimentDatasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetFunctionListListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubDevelopsGetFunctionListListRequest) Execute() (*EvalFunctionListResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetFunctionListListExecute(r) +} + +/* +ModelHubDevelopsGetFunctionListList Method for ModelHubDevelopsGetFunctionListList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsGetFunctionListListRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetFunctionListList(ctx context.Context) ApiModelHubDevelopsGetFunctionListListRequest { + return ApiModelHubDevelopsGetFunctionListListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EvalFunctionListResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetFunctionListListExecute(r ApiModelHubDevelopsGetFunctionListListRequest) (*EvalFunctionListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalFunctionListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetFunctionListList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/get_function_list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + huggingFaceDatasetConfigRequest *HuggingFaceDatasetConfigRequest +} + +func (r ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest) HuggingFaceDatasetConfigRequest(huggingFaceDatasetConfigRequest HuggingFaceDatasetConfigRequest) ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest { + r.huggingFaceDatasetConfigRequest = &huggingFaceDatasetConfigRequest + return r +} + +func (r ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest) Execute() (*HuggingFaceDatasetConfigResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetHuggingfaceDatasetConfigCreateExecute(r) +} + +/* +ModelHubDevelopsGetHuggingfaceDatasetConfigCreate Method for ModelHubDevelopsGetHuggingfaceDatasetConfigCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetHuggingfaceDatasetConfigCreate(ctx context.Context) ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest { + return ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return HuggingFaceDatasetConfigResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetHuggingfaceDatasetConfigCreateExecute(r ApiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest) (*HuggingFaceDatasetConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HuggingFaceDatasetConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetHuggingfaceDatasetConfigCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/get-huggingface-dataset-config/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.huggingFaceDatasetConfigRequest == nil { + return localVarReturnValue, nil, reportError("huggingFaceDatasetConfigRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.huggingFaceDatasetConfigRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsGetRowDiffCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetRowDiffRequest *DatasetRowDiffRequest +} + +func (r ApiModelHubDevelopsGetRowDiffCreateRequest) DatasetRowDiffRequest(datasetRowDiffRequest DatasetRowDiffRequest) ApiModelHubDevelopsGetRowDiffCreateRequest { + r.datasetRowDiffRequest = &datasetRowDiffRequest + return r +} + +func (r ApiModelHubDevelopsGetRowDiffCreateRequest) Execute() (*ExperimentRowDiffResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsGetRowDiffCreateExecute(r) +} + +/* +ModelHubDevelopsGetRowDiffCreate Method for ModelHubDevelopsGetRowDiffCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsGetRowDiffCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsGetRowDiffCreate(ctx context.Context) ApiModelHubDevelopsGetRowDiffCreateRequest { + return ApiModelHubDevelopsGetRowDiffCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ExperimentRowDiffResponse +func (a *ModelHubAPIService) ModelHubDevelopsGetRowDiffCreateExecute(r ApiModelHubDevelopsGetRowDiffCreateRequest) (*ExperimentRowDiffResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentRowDiffResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsGetRowDiffCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/get-row-diff/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetRowDiffRequest == nil { + return localVarReturnValue, nil, reportError("datasetRowDiffRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetRowDiffRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsPreviewRunEvalCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + previewRunEvalRequest *PreviewRunEvalRequest +} + +func (r ApiModelHubDevelopsPreviewRunEvalCreateRequest) PreviewRunEvalRequest(previewRunEvalRequest PreviewRunEvalRequest) ApiModelHubDevelopsPreviewRunEvalCreateRequest { + r.previewRunEvalRequest = &previewRunEvalRequest + return r +} + +func (r ApiModelHubDevelopsPreviewRunEvalCreateRequest) Execute() (*EvalPreviewResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsPreviewRunEvalCreateExecute(r) +} + +/* +ModelHubDevelopsPreviewRunEvalCreate Method for ModelHubDevelopsPreviewRunEvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsPreviewRunEvalCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsPreviewRunEvalCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsPreviewRunEvalCreateRequest { + return ApiModelHubDevelopsPreviewRunEvalCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return EvalPreviewResponse +func (a *ModelHubAPIService) ModelHubDevelopsPreviewRunEvalCreateExecute(r ApiModelHubDevelopsPreviewRunEvalCreateRequest) (*EvalPreviewResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalPreviewResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsPreviewRunEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/preview_run_eval/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.previewRunEvalRequest == nil { + return localVarReturnValue, nil, reportError("previewRunEvalRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.previewRunEvalRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + previewRunPrompt *PreviewRunPrompt +} + +func (r ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest) PreviewRunPrompt(previewRunPrompt PreviewRunPrompt) ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest { + r.previewRunPrompt = &previewRunPrompt + return r +} + +func (r ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest) Execute() (*RunPromptColumnPreviewResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsPreviewRunPromptColumnCreateExecute(r) +} + +/* +ModelHubDevelopsPreviewRunPromptColumnCreate Method for ModelHubDevelopsPreviewRunPromptColumnCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsPreviewRunPromptColumnCreate(ctx context.Context) ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest { + return ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return RunPromptColumnPreviewResponse +func (a *ModelHubAPIService) ModelHubDevelopsPreviewRunPromptColumnCreateExecute(r ApiModelHubDevelopsPreviewRunPromptColumnCreateRequest) (*RunPromptColumnPreviewResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunPromptColumnPreviewResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsPreviewRunPromptColumnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/preview_run_prompt_column/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.previewRunPrompt == nil { + return localVarReturnValue, nil, reportError("previewRunPrompt is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.previewRunPrompt + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsProviderStatusListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubDevelopsProviderStatusListRequest) Execute() (*ProviderStatusResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsProviderStatusListExecute(r) +} + +/* +ModelHubDevelopsProviderStatusList Method for ModelHubDevelopsProviderStatusList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsProviderStatusListRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsProviderStatusList(ctx context.Context) ApiModelHubDevelopsProviderStatusListRequest { + return ApiModelHubDevelopsProviderStatusListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ProviderStatusResponse +func (a *ModelHubAPIService) ModelHubDevelopsProviderStatusListExecute(r ApiModelHubDevelopsProviderStatusListRequest) (*ProviderStatusResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProviderStatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsProviderStatusList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/provider-status/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsRetrieveRunPromptColumnConfigListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubDevelopsRetrieveRunPromptColumnConfigListRequest) Execute() (*RunPromptColumnConfigResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsRetrieveRunPromptColumnConfigListExecute(r) +} + +/* +ModelHubDevelopsRetrieveRunPromptColumnConfigList Method for ModelHubDevelopsRetrieveRunPromptColumnConfigList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsRetrieveRunPromptColumnConfigListRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsRetrieveRunPromptColumnConfigList(ctx context.Context) ApiModelHubDevelopsRetrieveRunPromptColumnConfigListRequest { + return ApiModelHubDevelopsRetrieveRunPromptColumnConfigListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return RunPromptColumnConfigResponse +func (a *ModelHubAPIService) ModelHubDevelopsRetrieveRunPromptColumnConfigListExecute(r ApiModelHubDevelopsRetrieveRunPromptColumnConfigListRequest) (*RunPromptColumnConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunPromptColumnConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsRetrieveRunPromptColumnConfigList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/retrieve_run_prompt_column_config/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsRetrieveRunPromptOptionsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubDevelopsRetrieveRunPromptOptionsListRequest) Execute() (*RunPromptOptionsResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsRetrieveRunPromptOptionsListExecute(r) +} + +/* +ModelHubDevelopsRetrieveRunPromptOptionsList Method for ModelHubDevelopsRetrieveRunPromptOptionsList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubDevelopsRetrieveRunPromptOptionsListRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsRetrieveRunPromptOptionsList(ctx context.Context) ApiModelHubDevelopsRetrieveRunPromptOptionsListRequest { + return ApiModelHubDevelopsRetrieveRunPromptOptionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return RunPromptOptionsResponse +func (a *ModelHubAPIService) ModelHubDevelopsRetrieveRunPromptOptionsListExecute(r ApiModelHubDevelopsRetrieveRunPromptOptionsListRequest) (*RunPromptOptionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunPromptOptionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsRetrieveRunPromptOptionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/retrieve_run_prompt_options/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsStartEvalsProcessCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + startEvalsProcessRequest *StartEvalsProcessRequest +} + +func (r ApiModelHubDevelopsStartEvalsProcessCreateRequest) StartEvalsProcessRequest(startEvalsProcessRequest StartEvalsProcessRequest) ApiModelHubDevelopsStartEvalsProcessCreateRequest { + r.startEvalsProcessRequest = &startEvalsProcessRequest + return r +} + +func (r ApiModelHubDevelopsStartEvalsProcessCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsStartEvalsProcessCreateExecute(r) +} + +/* +ModelHubDevelopsStartEvalsProcessCreate Method for ModelHubDevelopsStartEvalsProcessCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsStartEvalsProcessCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsStartEvalsProcessCreate(ctx context.Context, datasetId string) ApiModelHubDevelopsStartEvalsProcessCreateRequest { + return ApiModelHubDevelopsStartEvalsProcessCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsStartEvalsProcessCreateExecute(r ApiModelHubDevelopsStartEvalsProcessCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsStartEvalsProcessCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/start_evals_process/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.startEvalsProcessRequest == nil { + return localVarReturnValue, nil, reportError("startEvalsProcessRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.startEvalsProcessRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsStopUserEvalCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + evalId string + stopUserEvalRequest *StopUserEvalRequest +} + +func (r ApiModelHubDevelopsStopUserEvalCreateRequest) StopUserEvalRequest(stopUserEvalRequest StopUserEvalRequest) ApiModelHubDevelopsStopUserEvalCreateRequest { + r.stopUserEvalRequest = &stopUserEvalRequest + return r +} + +func (r ApiModelHubDevelopsStopUserEvalCreateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsStopUserEvalCreateExecute(r) +} + +/* +ModelHubDevelopsStopUserEvalCreate POST /develops//stop_user_eval// Stops a running evaluation by setting its status to Completed. + +Accepts optional experiment_id in the body. When present, the eval is +looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) +and cells are updated across both base columns (source_id=eval_id) and +per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param evalId + @return ApiModelHubDevelopsStopUserEvalCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsStopUserEvalCreate(ctx context.Context, datasetId string, evalId string) ApiModelHubDevelopsStopUserEvalCreateRequest { + return ApiModelHubDevelopsStopUserEvalCreateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + evalId: evalId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsStopUserEvalCreateExecute(r ApiModelHubDevelopsStopUserEvalCreateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsStopUserEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_id"+"}", url.PathEscape(parameterValueToString(r.evalId, "evalId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.stopUserEvalRequest == nil { + return localVarReturnValue, nil, reportError("stopUserEvalRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.stopUserEvalRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsSyntheticConfigListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string +} + +func (r ApiModelHubDevelopsSyntheticConfigListRequest) Execute() (*SyntheticDatasetConfigResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsSyntheticConfigListExecute(r) +} + +/* +ModelHubDevelopsSyntheticConfigList Method for ModelHubDevelopsSyntheticConfigList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsSyntheticConfigListRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsSyntheticConfigList(ctx context.Context, datasetId string) ApiModelHubDevelopsSyntheticConfigListRequest { + return ApiModelHubDevelopsSyntheticConfigListRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return SyntheticDatasetConfigResponse +func (a *ModelHubAPIService) ModelHubDevelopsSyntheticConfigListExecute(r ApiModelHubDevelopsSyntheticConfigListRequest) (*SyntheticDatasetConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SyntheticDatasetConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsSyntheticConfigList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/synthetic-config/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsUpdateColumnNameUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + columnId string + datasetUpdateColumnNameRequest *DatasetUpdateColumnNameRequest +} + +func (r ApiModelHubDevelopsUpdateColumnNameUpdateRequest) DatasetUpdateColumnNameRequest(datasetUpdateColumnNameRequest DatasetUpdateColumnNameRequest) ApiModelHubDevelopsUpdateColumnNameUpdateRequest { + r.datasetUpdateColumnNameRequest = &datasetUpdateColumnNameRequest + return r +} + +func (r ApiModelHubDevelopsUpdateColumnNameUpdateRequest) Execute() (*DevelopDatasetMessageResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsUpdateColumnNameUpdateExecute(r) +} + +/* +ModelHubDevelopsUpdateColumnNameUpdate Method for ModelHubDevelopsUpdateColumnNameUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param columnId + @return ApiModelHubDevelopsUpdateColumnNameUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsUpdateColumnNameUpdate(ctx context.Context, datasetId string, columnId string) ApiModelHubDevelopsUpdateColumnNameUpdateRequest { + return ApiModelHubDevelopsUpdateColumnNameUpdateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + columnId: columnId, + } +} + +// Execute executes the request +// +// @return DevelopDatasetMessageResponse +func (a *ModelHubAPIService) ModelHubDevelopsUpdateColumnNameUpdateExecute(r ApiModelHubDevelopsUpdateColumnNameUpdateRequest) (*DevelopDatasetMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DevelopDatasetMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsUpdateColumnNameUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/update_column_name/{column_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"column_id"+"}", url.PathEscape(parameterValueToString(r.columnId, "columnId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetUpdateColumnNameRequest == nil { + return localVarReturnValue, nil, reportError("datasetUpdateColumnNameRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetUpdateColumnNameRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsUpdateColumnTypeUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + columnId string + datasetUpdateColumnTypeRequest *DatasetUpdateColumnTypeRequest +} + +func (r ApiModelHubDevelopsUpdateColumnTypeUpdateRequest) DatasetUpdateColumnTypeRequest(datasetUpdateColumnTypeRequest DatasetUpdateColumnTypeRequest) ApiModelHubDevelopsUpdateColumnTypeUpdateRequest { + r.datasetUpdateColumnTypeRequest = &datasetUpdateColumnTypeRequest + return r +} + +func (r ApiModelHubDevelopsUpdateColumnTypeUpdateRequest) Execute() (*ColumnTypeConversionResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsUpdateColumnTypeUpdateExecute(r) +} + +/* +ModelHubDevelopsUpdateColumnTypeUpdate Method for ModelHubDevelopsUpdateColumnTypeUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @param columnId + @return ApiModelHubDevelopsUpdateColumnTypeUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsUpdateColumnTypeUpdate(ctx context.Context, datasetId string, columnId string) ApiModelHubDevelopsUpdateColumnTypeUpdateRequest { + return ApiModelHubDevelopsUpdateColumnTypeUpdateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + columnId: columnId, + } +} + +// Execute executes the request +// +// @return ColumnTypeConversionResponse +func (a *ModelHubAPIService) ModelHubDevelopsUpdateColumnTypeUpdateExecute(r ApiModelHubDevelopsUpdateColumnTypeUpdateRequest) (*ColumnTypeConversionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ColumnTypeConversionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsUpdateColumnTypeUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/update_column_type/{column_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"column_id"+"}", url.PathEscape(parameterValueToString(r.columnId, "columnId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetUpdateColumnTypeRequest == nil { + return localVarReturnValue, nil, reportError("datasetUpdateColumnTypeRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetUpdateColumnTypeRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string + syntheticDatasetConfig *SyntheticDatasetConfig +} + +func (r ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest) SyntheticDatasetConfig(syntheticDatasetConfig SyntheticDatasetConfig) ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest { + r.syntheticDatasetConfig = &syntheticDatasetConfig + return r +} + +func (r ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest) Execute() (*SyntheticDatasetUpdateResponse, *http.Response, error) { + return r.ApiService.ModelHubDevelopsUpdateSyntheticConfigUpdateExecute(r) +} + +/* +ModelHubDevelopsUpdateSyntheticConfigUpdate Method for ModelHubDevelopsUpdateSyntheticConfigUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubDevelopsUpdateSyntheticConfigUpdate(ctx context.Context, datasetId string) ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest { + return ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return SyntheticDatasetUpdateResponse +func (a *ModelHubAPIService) ModelHubDevelopsUpdateSyntheticConfigUpdateExecute(r ApiModelHubDevelopsUpdateSyntheticConfigUpdateRequest) (*SyntheticDatasetUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SyntheticDatasetUpdateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubDevelopsUpdateSyntheticConfigUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/develops/{dataset_id}/update-synthetic-config/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.syntheticDatasetConfig == nil { + return localVarReturnValue, nil, reportError("syntheticDatasetConfig is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.syntheticDatasetConfig + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesBulkDeleteCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + evalTemplateBulkDeleteRequest *EvalTemplateBulkDeleteRequest +} + +func (r ApiModelHubEvalTemplatesBulkDeleteCreateRequest) EvalTemplateBulkDeleteRequest(evalTemplateBulkDeleteRequest EvalTemplateBulkDeleteRequest) ApiModelHubEvalTemplatesBulkDeleteCreateRequest { + r.evalTemplateBulkDeleteRequest = &evalTemplateBulkDeleteRequest + return r +} + +func (r ApiModelHubEvalTemplatesBulkDeleteCreateRequest) Execute() (*EvalTemplateBulkDeleteResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesBulkDeleteCreateExecute(r) +} + +/* +ModelHubEvalTemplatesBulkDeleteCreate POST /model-hub/eval-templates/bulk-delete/ + +Soft-delete multiple eval templates. Only user-owned templates can be deleted. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubEvalTemplatesBulkDeleteCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesBulkDeleteCreate(ctx context.Context) ApiModelHubEvalTemplatesBulkDeleteCreateRequest { + return ApiModelHubEvalTemplatesBulkDeleteCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EvalTemplateBulkDeleteResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesBulkDeleteCreateExecute(r ApiModelHubEvalTemplatesBulkDeleteCreateRequest) (*EvalTemplateBulkDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateBulkDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesBulkDeleteCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/bulk-delete/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalTemplateBulkDeleteRequest == nil { + return localVarReturnValue, nil, reportError("evalTemplateBulkDeleteRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.evalTemplateBulkDeleteRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + compositeEvalAdhocExecuteRequest *CompositeEvalAdhocExecuteRequest +} + +func (r ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest) CompositeEvalAdhocExecuteRequest(compositeEvalAdhocExecuteRequest CompositeEvalAdhocExecuteRequest) ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest { + r.compositeEvalAdhocExecuteRequest = &compositeEvalAdhocExecuteRequest + return r +} + +func (r ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest) Execute() (*CompositeEvalExecuteResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesCompositeExecuteAdhocCreateExecute(r) +} + +/* +ModelHubEvalTemplatesCompositeExecuteAdhocCreate POST /model-hub/eval-templates/composite/execute-adhoc/ + +Execute a composite eval configuration without persisting it. Used by +the eval create page so users can test a composite (selected children + +aggregation settings) before clicking Save. Builds an unsaved parent +template and unsaved child links in memory and reuses +`execute_composite_children_sync` so semantics match the persisted path. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositeExecuteAdhocCreate(ctx context.Context) ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest { + return ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CompositeEvalExecuteResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositeExecuteAdhocCreateExecute(r ApiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest) (*CompositeEvalExecuteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeEvalExecuteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesCompositeExecuteAdhocCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/composite/execute-adhoc/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compositeEvalAdhocExecuteRequest == nil { + return localVarReturnValue, nil, reportError("compositeEvalAdhocExecuteRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compositeEvalAdhocExecuteRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesCompositeExecuteCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + compositeEvalExecuteRequest *CompositeEvalExecuteRequest +} + +func (r ApiModelHubEvalTemplatesCompositeExecuteCreateRequest) CompositeEvalExecuteRequest(compositeEvalExecuteRequest CompositeEvalExecuteRequest) ApiModelHubEvalTemplatesCompositeExecuteCreateRequest { + r.compositeEvalExecuteRequest = &compositeEvalExecuteRequest + return r +} + +func (r ApiModelHubEvalTemplatesCompositeExecuteCreateRequest) Execute() (*CompositeEvalExecuteResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesCompositeExecuteCreateExecute(r) +} + +/* +ModelHubEvalTemplatesCompositeExecuteCreate POST /model-hub/eval-templates//composite/execute/ + +Execute all child evals in a composite and optionally aggregate results. +Thin wrapper around `execute_composite_children_sync` — the same helper +the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation +semantics stay consistent across surfaces. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesCompositeExecuteCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositeExecuteCreate(ctx context.Context, templateId string) ApiModelHubEvalTemplatesCompositeExecuteCreateRequest { + return ApiModelHubEvalTemplatesCompositeExecuteCreateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return CompositeEvalExecuteResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositeExecuteCreateExecute(r ApiModelHubEvalTemplatesCompositeExecuteCreateRequest) (*CompositeEvalExecuteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeEvalExecuteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesCompositeExecuteCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/composite/execute/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compositeEvalExecuteRequest == nil { + return localVarReturnValue, nil, reportError("compositeEvalExecuteRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compositeEvalExecuteRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesCompositeListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string +} + +func (r ApiModelHubEvalTemplatesCompositeListRequest) Execute() (*CompositeEvalDetailResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesCompositeListExecute(r) +} + +/* +ModelHubEvalTemplatesCompositeList GET /model-hub/eval-templates//composite/ + +Get composite eval detail with its children. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesCompositeListRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositeList(ctx context.Context, templateId string) ApiModelHubEvalTemplatesCompositeListRequest { + return ApiModelHubEvalTemplatesCompositeListRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return CompositeEvalDetailResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositeListExecute(r ApiModelHubEvalTemplatesCompositeListRequest) (*CompositeEvalDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeEvalDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesCompositeList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/composite/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesCompositePartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + compositeEvalUpdateRequest *CompositeEvalUpdateRequest +} + +func (r ApiModelHubEvalTemplatesCompositePartialUpdateRequest) CompositeEvalUpdateRequest(compositeEvalUpdateRequest CompositeEvalUpdateRequest) ApiModelHubEvalTemplatesCompositePartialUpdateRequest { + r.compositeEvalUpdateRequest = &compositeEvalUpdateRequest + return r +} + +func (r ApiModelHubEvalTemplatesCompositePartialUpdateRequest) Execute() (*CompositeEvalDetailResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesCompositePartialUpdateExecute(r) +} + +/* +ModelHubEvalTemplatesCompositePartialUpdate PATCH — partial update of a composite eval. + +Supported fields (all optional): + + name, description, tags, + aggregation_enabled, aggregation_function, + child_template_ids (replaces the child list), + child_weights (map of child_id -> weight). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesCompositePartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositePartialUpdate(ctx context.Context, templateId string) ApiModelHubEvalTemplatesCompositePartialUpdateRequest { + return ApiModelHubEvalTemplatesCompositePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return CompositeEvalDetailResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesCompositePartialUpdateExecute(r ApiModelHubEvalTemplatesCompositePartialUpdateRequest) (*CompositeEvalDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeEvalDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesCompositePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/composite/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compositeEvalUpdateRequest == nil { + return localVarReturnValue, nil, reportError("compositeEvalUpdateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compositeEvalUpdateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesCreateCompositeCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + compositeEvalCreateRequest *CompositeEvalCreateRequest +} + +func (r ApiModelHubEvalTemplatesCreateCompositeCreateRequest) CompositeEvalCreateRequest(compositeEvalCreateRequest CompositeEvalCreateRequest) ApiModelHubEvalTemplatesCreateCompositeCreateRequest { + r.compositeEvalCreateRequest = &compositeEvalCreateRequest + return r +} + +func (r ApiModelHubEvalTemplatesCreateCompositeCreateRequest) Execute() (*CompositeEvalCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesCreateCompositeCreateExecute(r) +} + +/* +ModelHubEvalTemplatesCreateCompositeCreate POST /model-hub/eval-templates/create-composite/ + +Create a composite eval from a list of existing eval template IDs. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubEvalTemplatesCreateCompositeCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesCreateCompositeCreate(ctx context.Context) ApiModelHubEvalTemplatesCreateCompositeCreateRequest { + return ApiModelHubEvalTemplatesCreateCompositeCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return CompositeEvalCreateResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesCreateCompositeCreateExecute(r ApiModelHubEvalTemplatesCreateCompositeCreateRequest) (*CompositeEvalCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CompositeEvalCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesCreateCompositeCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/create-composite/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.compositeEvalCreateRequest == nil { + return localVarReturnValue, nil, reportError("compositeEvalCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.compositeEvalCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesCreateV2CreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + evalTemplateCreateV2Request *EvalTemplateCreateV2Request +} + +func (r ApiModelHubEvalTemplatesCreateV2CreateRequest) EvalTemplateCreateV2Request(evalTemplateCreateV2Request EvalTemplateCreateV2Request) ApiModelHubEvalTemplatesCreateV2CreateRequest { + r.evalTemplateCreateV2Request = &evalTemplateCreateV2Request + return r +} + +func (r ApiModelHubEvalTemplatesCreateV2CreateRequest) Execute() (*EvalTemplateCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesCreateV2CreateExecute(r) +} + +/* +ModelHubEvalTemplatesCreateV2Create POST /model-hub/eval-templates/create-v2/ + +Create a single eval template with the revamped schema. +Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubEvalTemplatesCreateV2CreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesCreateV2Create(ctx context.Context) ApiModelHubEvalTemplatesCreateV2CreateRequest { + return ApiModelHubEvalTemplatesCreateV2CreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EvalTemplateCreateResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesCreateV2CreateExecute(r ApiModelHubEvalTemplatesCreateV2CreateRequest) (*EvalTemplateCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesCreateV2Create") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/create-v2/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalTemplateCreateV2Request == nil { + return localVarReturnValue, nil, reportError("evalTemplateCreateV2Request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.evalTemplateCreateV2Request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesDetailListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string +} + +func (r ApiModelHubEvalTemplatesDetailListRequest) Execute() (*EvalTemplateDetailResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesDetailListExecute(r) +} + +/* +ModelHubEvalTemplatesDetailList GET /model-hub/eval-templates//detail/ + +Fetch a single eval template with all revamped fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesDetailListRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesDetailList(ctx context.Context, templateId string) ApiModelHubEvalTemplatesDetailListRequest { + return ApiModelHubEvalTemplatesDetailListRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return EvalTemplateDetailResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesDetailListExecute(r ApiModelHubEvalTemplatesDetailListRequest) (*EvalTemplateDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesDetailList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/detail/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesFeedbackListListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string +} + +func (r ApiModelHubEvalTemplatesFeedbackListListRequest) Execute() (*EvalFeedbackListResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesFeedbackListListExecute(r) +} + +/* +ModelHubEvalTemplatesFeedbackListList GET /model-hub/eval-templates//feedback-list/ + +Paginated feedback list with user info. +Query params: page (0-based), page_size + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesFeedbackListListRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesFeedbackListList(ctx context.Context, templateId string) ApiModelHubEvalTemplatesFeedbackListListRequest { + return ApiModelHubEvalTemplatesFeedbackListListRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return EvalFeedbackListResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesFeedbackListListExecute(r ApiModelHubEvalTemplatesFeedbackListListRequest) (*EvalFeedbackListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalFeedbackListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesFeedbackListList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/feedback-list/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesGroundTruthConfigListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string +} + +func (r ApiModelHubEvalTemplatesGroundTruthConfigListRequest) Execute() (*GroundTruthConfigResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesGroundTruthConfigListExecute(r) +} + +/* +ModelHubEvalTemplatesGroundTruthConfigList GET/PUT /model-hub/eval-templates//ground-truth-config/ + +Manages ground truth configuration on the eval template's config JSONField. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesGroundTruthConfigListRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthConfigList(ctx context.Context, templateId string) ApiModelHubEvalTemplatesGroundTruthConfigListRequest { + return ApiModelHubEvalTemplatesGroundTruthConfigListRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return GroundTruthConfigResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthConfigListExecute(r ApiModelHubEvalTemplatesGroundTruthConfigListRequest) (*GroundTruthConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroundTruthConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesGroundTruthConfigList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/ground-truth-config/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + groundTruthConfigRequest *GroundTruthConfigRequest +} + +func (r ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest) GroundTruthConfigRequest(groundTruthConfigRequest GroundTruthConfigRequest) ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest { + r.groundTruthConfigRequest = &groundTruthConfigRequest + return r +} + +func (r ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest) Execute() (*GroundTruthConfigResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesGroundTruthConfigUpdateExecute(r) +} + +/* +ModelHubEvalTemplatesGroundTruthConfigUpdate GET/PUT /model-hub/eval-templates//ground-truth-config/ + +Manages ground truth configuration on the eval template's config JSONField. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthConfigUpdate(ctx context.Context, templateId string) ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest { + return ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return GroundTruthConfigResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthConfigUpdateExecute(r ApiModelHubEvalTemplatesGroundTruthConfigUpdateRequest) (*GroundTruthConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroundTruthConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesGroundTruthConfigUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/ground-truth-config/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groundTruthConfigRequest == nil { + return localVarReturnValue, nil, reportError("groundTruthConfigRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groundTruthConfigRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesGroundTruthListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string +} + +func (r ApiModelHubEvalTemplatesGroundTruthListRequest) Execute() (*GroundTruthListResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesGroundTruthListExecute(r) +} + +/* +ModelHubEvalTemplatesGroundTruthList Method for ModelHubEvalTemplatesGroundTruthList + +GET /model-hub/eval-templates//ground-truth/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesGroundTruthListRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthList(ctx context.Context, templateId string) ApiModelHubEvalTemplatesGroundTruthListRequest { + return ApiModelHubEvalTemplatesGroundTruthListRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return GroundTruthListResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthListExecute(r ApiModelHubEvalTemplatesGroundTruthListRequest) (*GroundTruthListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroundTruthListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesGroundTruthList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/ground-truth/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + groundTruthUploadRequest *GroundTruthUploadRequest +} + +func (r ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest) GroundTruthUploadRequest(groundTruthUploadRequest GroundTruthUploadRequest) ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest { + r.groundTruthUploadRequest = &groundTruthUploadRequest + return r +} + +func (r ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest) Execute() (*GroundTruthUploadResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesGroundTruthUploadCreateExecute(r) +} + +/* +ModelHubEvalTemplatesGroundTruthUploadCreate POST /model-hub/eval-templates//ground-truth/upload/ + +Supports two modes: +1. JSON body: { name, columns, data, ... } +2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthUploadCreate(ctx context.Context, templateId string) ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest { + return ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return GroundTruthUploadResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesGroundTruthUploadCreateExecute(r ApiModelHubEvalTemplatesGroundTruthUploadCreateRequest) (*GroundTruthUploadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroundTruthUploadResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesGroundTruthUploadCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/ground-truth/upload/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groundTruthUploadRequest == nil { + return localVarReturnValue, nil, reportError("groundTruthUploadRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groundTruthUploadRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesListChartsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + evalTemplateListChartsRequest *EvalTemplateListChartsRequest +} + +func (r ApiModelHubEvalTemplatesListChartsCreateRequest) EvalTemplateListChartsRequest(evalTemplateListChartsRequest EvalTemplateListChartsRequest) ApiModelHubEvalTemplatesListChartsCreateRequest { + r.evalTemplateListChartsRequest = &evalTemplateListChartsRequest + return r +} + +func (r ApiModelHubEvalTemplatesListChartsCreateRequest) Execute() (*EvalTemplateListChartsResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesListChartsCreateExecute(r) +} + +/* +ModelHubEvalTemplatesListChartsCreate POST /model-hub/eval-templates/list-charts/ + +Returns 30-day chart data (run counts + error rates) for a list of template IDs. +Uses ClickHouse for fast analytics. Called separately from the list API so the +table renders instantly while charts load async. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubEvalTemplatesListChartsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesListChartsCreate(ctx context.Context) ApiModelHubEvalTemplatesListChartsCreateRequest { + return ApiModelHubEvalTemplatesListChartsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EvalTemplateListChartsResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesListChartsCreateExecute(r ApiModelHubEvalTemplatesListChartsCreateRequest) (*EvalTemplateListChartsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateListChartsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesListChartsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/list-charts/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalTemplateListChartsRequest == nil { + return localVarReturnValue, nil, reportError("evalTemplateListChartsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.evalTemplateListChartsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesListCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + evalListRequest *EvalListRequest +} + +func (r ApiModelHubEvalTemplatesListCreateRequest) EvalListRequest(evalListRequest EvalListRequest) ApiModelHubEvalTemplatesListCreateRequest { + r.evalListRequest = &evalListRequest + return r +} + +func (r ApiModelHubEvalTemplatesListCreateRequest) Execute() (*EvalTemplateListResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesListCreateExecute(r) +} + +/* +ModelHubEvalTemplatesListCreate POST /model-hub/eval-templates/list/ + +Returns paginated eval template list with filtering, search, and 30-day metrics. +All inputs and outputs are validated with Pydantic schemas. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubEvalTemplatesListCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesListCreate(ctx context.Context) ApiModelHubEvalTemplatesListCreateRequest { + return ApiModelHubEvalTemplatesListCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return EvalTemplateListResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesListCreateExecute(r ApiModelHubEvalTemplatesListCreateRequest) (*EvalTemplateListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesListCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalListRequest == nil { + return localVarReturnValue, nil, reportError("evalListRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.evalListRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesUpdateUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + evalTemplateUpdateV2Request *EvalTemplateUpdateV2Request +} + +func (r ApiModelHubEvalTemplatesUpdateUpdateRequest) EvalTemplateUpdateV2Request(evalTemplateUpdateV2Request EvalTemplateUpdateV2Request) ApiModelHubEvalTemplatesUpdateUpdateRequest { + r.evalTemplateUpdateV2Request = &evalTemplateUpdateV2Request + return r +} + +func (r ApiModelHubEvalTemplatesUpdateUpdateRequest) Execute() (*EvalTemplateUpdateResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesUpdateUpdateExecute(r) +} + +/* +ModelHubEvalTemplatesUpdateUpdate PUT /model-hub/eval-templates//update/ + +Update an eval template. Only user-owned templates can be updated. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesUpdateUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesUpdateUpdate(ctx context.Context, templateId string) ApiModelHubEvalTemplatesUpdateUpdateRequest { + return ApiModelHubEvalTemplatesUpdateUpdateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return EvalTemplateUpdateResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesUpdateUpdateExecute(r ApiModelHubEvalTemplatesUpdateUpdateRequest) (*EvalTemplateUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateUpdateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesUpdateUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/update/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalTemplateUpdateV2Request == nil { + return localVarReturnValue, nil, reportError("evalTemplateUpdateV2Request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.evalTemplateUpdateV2Request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesUsageListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string +} + +func (r ApiModelHubEvalTemplatesUsageListRequest) Execute() (*EvalUsageStatsResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesUsageListExecute(r) +} + +/* +ModelHubEvalTemplatesUsageList GET /model-hub/eval-templates//usage/ + +Returns usage stats, chart data, and paginated eval logs. +Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesUsageListRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesUsageList(ctx context.Context, templateId string) ApiModelHubEvalTemplatesUsageListRequest { + return ApiModelHubEvalTemplatesUsageListRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return EvalUsageStatsResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesUsageListExecute(r ApiModelHubEvalTemplatesUsageListRequest) (*EvalUsageStatsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalUsageStatsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesUsageList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/usage/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesVersionsCreateCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + evalTemplateVersionCreateRequest *EvalTemplateVersionCreateRequest +} + +func (r ApiModelHubEvalTemplatesVersionsCreateCreateRequest) EvalTemplateVersionCreateRequest(evalTemplateVersionCreateRequest EvalTemplateVersionCreateRequest) ApiModelHubEvalTemplatesVersionsCreateCreateRequest { + r.evalTemplateVersionCreateRequest = &evalTemplateVersionCreateRequest + return r +} + +func (r ApiModelHubEvalTemplatesVersionsCreateCreateRequest) Execute() (*EvalTemplateVersionResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesVersionsCreateCreateExecute(r) +} + +/* +ModelHubEvalTemplatesVersionsCreateCreate POST /model-hub/eval-templates//versions/create/ + +Create a new version snapshot from the current template state. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesVersionsCreateCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsCreateCreate(ctx context.Context, templateId string) ApiModelHubEvalTemplatesVersionsCreateCreateRequest { + return ApiModelHubEvalTemplatesVersionsCreateCreateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return EvalTemplateVersionResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsCreateCreateExecute(r ApiModelHubEvalTemplatesVersionsCreateCreateRequest) (*EvalTemplateVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesVersionsCreateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/versions/create/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalTemplateVersionCreateRequest == nil { + return localVarReturnValue, nil, reportError("evalTemplateVersionCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.evalTemplateVersionCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesVersionsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string +} + +func (r ApiModelHubEvalTemplatesVersionsListRequest) Execute() (*EvalTemplateVersionListResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesVersionsListExecute(r) +} + +/* +ModelHubEvalTemplatesVersionsList GET /model-hub/eval-templates//versions/ + +List all versions for an eval template. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @return ApiModelHubEvalTemplatesVersionsListRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsList(ctx context.Context, templateId string) ApiModelHubEvalTemplatesVersionsListRequest { + return ApiModelHubEvalTemplatesVersionsListRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// +// @return EvalTemplateVersionListResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsListExecute(r ApiModelHubEvalTemplatesVersionsListRequest) (*EvalTemplateVersionListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateVersionListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/versions/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesVersionsRestoreCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + versionId string + body *map[string]interface{} +} + +func (r ApiModelHubEvalTemplatesVersionsRestoreCreateRequest) Body(body map[string]interface{}) ApiModelHubEvalTemplatesVersionsRestoreCreateRequest { + r.body = &body + return r +} + +func (r ApiModelHubEvalTemplatesVersionsRestoreCreateRequest) Execute() (*EvalTemplateVersionRestoreResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesVersionsRestoreCreateExecute(r) +} + +/* +ModelHubEvalTemplatesVersionsRestoreCreate POST /model-hub/eval-templates//versions//restore/ + +Restore a version by creating a new version with the old version's config. +Does NOT modify the old version — creates a new one on top. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @param versionId + @return ApiModelHubEvalTemplatesVersionsRestoreCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsRestoreCreate(ctx context.Context, templateId string, versionId string) ApiModelHubEvalTemplatesVersionsRestoreCreateRequest { + return ApiModelHubEvalTemplatesVersionsRestoreCreateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return EvalTemplateVersionRestoreResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsRestoreCreateExecute(r ApiModelHubEvalTemplatesVersionsRestoreCreateRequest) (*EvalTemplateVersionRestoreResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateVersionRestoreResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesVersionsRestoreCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/versions/{version_id}/restore/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + versionId string + body *map[string]interface{} +} + +func (r ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest) Body(body map[string]interface{}) ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest { + r.body = &body + return r +} + +func (r ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest) Execute() (*EvalTemplateVersionResponse, *http.Response, error) { + return r.ApiService.ModelHubEvalTemplatesVersionsSetDefaultUpdateExecute(r) +} + +/* +ModelHubEvalTemplatesVersionsSetDefaultUpdate PUT /model-hub/eval-templates//versions//set-default/ + +Set a specific version as the default (active) version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @param versionId + @return ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsSetDefaultUpdate(ctx context.Context, templateId string, versionId string) ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest { + return ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return EvalTemplateVersionResponse +func (a *ModelHubAPIService) ModelHubEvalTemplatesVersionsSetDefaultUpdateExecute(r ApiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest) (*EvalTemplateVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalTemplateVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubEvalTemplatesVersionsSetDefaultUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2DerivedVariablesListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentId string +} + +func (r ApiModelHubExperimentsV2DerivedVariablesListRequest) Execute() (*ExperimentDerivedVariablesResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2DerivedVariablesListExecute(r) +} + +/* +ModelHubExperimentsV2DerivedVariablesList Method for ModelHubExperimentsV2DerivedVariablesList + +Get derived variables from run prompt columns in an experiment's snapshot dataset. +Delegates to the existing get_dataset_derived_variables() service function. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiModelHubExperimentsV2DerivedVariablesListRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2DerivedVariablesList(ctx context.Context, experimentId string) ApiModelHubExperimentsV2DerivedVariablesListRequest { + return ApiModelHubExperimentsV2DerivedVariablesListRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentDerivedVariablesResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2DerivedVariablesListExecute(r ApiModelHubExperimentsV2DerivedVariablesListRequest) (*ExperimentDerivedVariablesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentDerivedVariablesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2DerivedVariablesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/derived-variables/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2EvaluationsStatsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentId string + evaluationId string +} + +func (r ApiModelHubExperimentsV2EvaluationsStatsListRequest) Execute() (*ExperimentEvaluationStatsResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2EvaluationsStatsListExecute(r) +} + +/* +ModelHubExperimentsV2EvaluationsStatsList Method for ModelHubExperimentsV2EvaluationsStatsList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @param evaluationId + @return ApiModelHubExperimentsV2EvaluationsStatsListRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2EvaluationsStatsList(ctx context.Context, experimentId string, evaluationId string) ApiModelHubExperimentsV2EvaluationsStatsListRequest { + return ApiModelHubExperimentsV2EvaluationsStatsListRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + evaluationId: evaluationId, + } +} + +// Execute executes the request +// +// @return ExperimentEvaluationStatsResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2EvaluationsStatsListExecute(r ApiModelHubExperimentsV2EvaluationsStatsListRequest) (*ExperimentEvaluationStatsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentEvaluationStatsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2EvaluationsStatsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"evaluation_id"+"}", url.PathEscape(parameterValueToString(r.evaluationId, "evaluationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2FeedbackCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentId string + feedback *Feedback +} + +func (r ApiModelHubExperimentsV2FeedbackCreateRequest) Feedback(feedback Feedback) ApiModelHubExperimentsV2FeedbackCreateRequest { + r.feedback = &feedback + return r +} + +func (r ApiModelHubExperimentsV2FeedbackCreateRequest) Execute() (*ExperimentFeedbackCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2FeedbackCreateExecute(r) +} + +/* +ModelHubExperimentsV2FeedbackCreate Method for ModelHubExperimentsV2FeedbackCreate + +Create a feedback record scoped to an experiment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiModelHubExperimentsV2FeedbackCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackCreate(ctx context.Context, experimentId string) ApiModelHubExperimentsV2FeedbackCreateRequest { + return ApiModelHubExperimentsV2FeedbackCreateRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentFeedbackCreateResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackCreateExecute(r ApiModelHubExperimentsV2FeedbackCreateRequest) (*ExperimentFeedbackCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentFeedbackCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2FeedbackCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/feedback/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.feedback == nil { + return localVarReturnValue, nil, reportError("feedback is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.feedback + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2FeedbackGetFeedbackDetailsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentId string +} + +func (r ApiModelHubExperimentsV2FeedbackGetFeedbackDetailsListRequest) Execute() (*ExperimentFeedbackDetailsResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2FeedbackGetFeedbackDetailsListExecute(r) +} + +/* +ModelHubExperimentsV2FeedbackGetFeedbackDetailsList Method for ModelHubExperimentsV2FeedbackGetFeedbackDetailsList + +Get previous feedback details for a metric+row in an experiment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiModelHubExperimentsV2FeedbackGetFeedbackDetailsListRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackGetFeedbackDetailsList(ctx context.Context, experimentId string) ApiModelHubExperimentsV2FeedbackGetFeedbackDetailsListRequest { + return ApiModelHubExperimentsV2FeedbackGetFeedbackDetailsListRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentFeedbackDetailsResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackGetFeedbackDetailsListExecute(r ApiModelHubExperimentsV2FeedbackGetFeedbackDetailsListRequest) (*ExperimentFeedbackDetailsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentFeedbackDetailsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2FeedbackGetFeedbackDetailsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2FeedbackGetTemplateListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentId string +} + +func (r ApiModelHubExperimentsV2FeedbackGetTemplateListRequest) Execute() (*ExperimentFeedbackTemplateResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2FeedbackGetTemplateListExecute(r) +} + +/* +ModelHubExperimentsV2FeedbackGetTemplateList Method for ModelHubExperimentsV2FeedbackGetTemplateList + +Get evaluation template details for rendering the feedback form. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiModelHubExperimentsV2FeedbackGetTemplateListRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackGetTemplateList(ctx context.Context, experimentId string) ApiModelHubExperimentsV2FeedbackGetTemplateListRequest { + return ApiModelHubExperimentsV2FeedbackGetTemplateListRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentFeedbackTemplateResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackGetTemplateListExecute(r ApiModelHubExperimentsV2FeedbackGetTemplateListRequest) (*ExperimentFeedbackTemplateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentFeedbackTemplateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2FeedbackGetTemplateList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/feedback/get-template/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentId string + experimentFeedbackSubmitRequest *ExperimentFeedbackSubmitRequest +} + +func (r ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest) ExperimentFeedbackSubmitRequest(experimentFeedbackSubmitRequest ExperimentFeedbackSubmitRequest) ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest { + r.experimentFeedbackSubmitRequest = &experimentFeedbackSubmitRequest + return r +} + +func (r ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest) Execute() (*ExperimentFeedbackSubmitResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2FeedbackSubmitFeedbackCreateExecute(r) +} + +/* +ModelHubExperimentsV2FeedbackSubmitFeedbackCreate Method for ModelHubExperimentsV2FeedbackSubmitFeedbackCreate + +Submit feedback action — triggers temporal eval rerun for experiments. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackSubmitFeedbackCreate(ctx context.Context, experimentId string) ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest { + return ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentFeedbackSubmitResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2FeedbackSubmitFeedbackCreateExecute(r ApiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest) (*ExperimentFeedbackSubmitResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentFeedbackSubmitResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2FeedbackSubmitFeedbackCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.experimentFeedbackSubmitRequest == nil { + return localVarReturnValue, nil, reportError("experimentFeedbackSubmitRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.experimentFeedbackSubmitRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2RerunCellsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + experimentId string + experimentRerunCells *ExperimentRerunCells +} + +func (r ApiModelHubExperimentsV2RerunCellsCreateRequest) ExperimentRerunCells(experimentRerunCells ExperimentRerunCells) ApiModelHubExperimentsV2RerunCellsCreateRequest { + r.experimentRerunCells = &experimentRerunCells + return r +} + +func (r ApiModelHubExperimentsV2RerunCellsCreateRequest) Execute() (*ExperimentWorkflowResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2RerunCellsCreateExecute(r) +} + +/* +ModelHubExperimentsV2RerunCellsCreate Rerun specific cells or columns in a V2 experiment. + +Accepts source_ids (EDT IDs for full column rerun) and/or +cells ({source_id, row_id} pairs for individual cell rerun). +Resets affected output cells and dependent eval cells to RUNNING, +then starts a RerunCellsV2Workflow. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param experimentId + @return ApiModelHubExperimentsV2RerunCellsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2RerunCellsCreate(ctx context.Context, experimentId string) ApiModelHubExperimentsV2RerunCellsCreateRequest { + return ApiModelHubExperimentsV2RerunCellsCreateRequest{ + ApiService: a, + ctx: ctx, + experimentId: experimentId, + } +} + +// Execute executes the request +// +// @return ExperimentWorkflowResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2RerunCellsCreateExecute(r ApiModelHubExperimentsV2RerunCellsCreateRequest) (*ExperimentWorkflowResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentWorkflowResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2RerunCellsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/{experiment_id}/rerun-cells/" + localVarPath = strings.Replace(localVarPath, "{"+"experiment_id"+"}", url.PathEscape(parameterValueToString(r.experimentId, "experimentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.experimentRerunCells == nil { + return localVarReturnValue, nil, reportError("experimentRerunCells is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.experimentRerunCells + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2RowDiffCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetRowDiffRequest *DatasetRowDiffRequest +} + +func (r ApiModelHubExperimentsV2RowDiffCreateRequest) DatasetRowDiffRequest(datasetRowDiffRequest DatasetRowDiffRequest) ApiModelHubExperimentsV2RowDiffCreateRequest { + r.datasetRowDiffRequest = &datasetRowDiffRequest + return r +} + +func (r ApiModelHubExperimentsV2RowDiffCreateRequest) Execute() (*ExperimentRowDiffResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2RowDiffCreateExecute(r) +} + +/* +ModelHubExperimentsV2RowDiffCreate Method for ModelHubExperimentsV2RowDiffCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubExperimentsV2RowDiffCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2RowDiffCreate(ctx context.Context) ApiModelHubExperimentsV2RowDiffCreateRequest { + return ApiModelHubExperimentsV2RowDiffCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ExperimentRowDiffResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2RowDiffCreateExecute(r ApiModelHubExperimentsV2RowDiffCreateRequest) (*ExperimentRowDiffResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentRowDiffResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2RowDiffCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/row-diff/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.datasetRowDiffRequest == nil { + return localVarReturnValue, nil, reportError("datasetRowDiffRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.datasetRowDiffRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2SuggestNameReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + datasetId string +} + +func (r ApiModelHubExperimentsV2SuggestNameReadRequest) Execute() (*ExperimentNameSuggestionResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2SuggestNameReadExecute(r) +} + +/* +ModelHubExperimentsV2SuggestNameRead Method for ModelHubExperimentsV2SuggestNameRead + +Generate a suggested experiment name for a dataset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param datasetId + @return ApiModelHubExperimentsV2SuggestNameReadRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2SuggestNameRead(ctx context.Context, datasetId string) ApiModelHubExperimentsV2SuggestNameReadRequest { + return ApiModelHubExperimentsV2SuggestNameReadRequest{ + ApiService: a, + ctx: ctx, + datasetId: datasetId, + } +} + +// Execute executes the request +// +// @return ExperimentNameSuggestionResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2SuggestNameReadExecute(r ApiModelHubExperimentsV2SuggestNameReadRequest) (*ExperimentNameSuggestionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentNameSuggestionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2SuggestNameRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/suggest-name/{dataset_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"dataset_id"+"}", url.PathEscape(parameterValueToString(r.datasetId, "datasetId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubExperimentsV2ValidateNameListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubExperimentsV2ValidateNameListRequest) Execute() (*ExperimentNameValidationResponse, *http.Response, error) { + return r.ApiService.ModelHubExperimentsV2ValidateNameListExecute(r) +} + +/* +ModelHubExperimentsV2ValidateNameList Method for ModelHubExperimentsV2ValidateNameList + +Validate that an experiment name is unique within a dataset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubExperimentsV2ValidateNameListRequest +*/ +func (a *ModelHubAPIService) ModelHubExperimentsV2ValidateNameList(ctx context.Context) ApiModelHubExperimentsV2ValidateNameListRequest { + return ApiModelHubExperimentsV2ValidateNameListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ExperimentNameValidationResponse +func (a *ModelHubAPIService) ModelHubExperimentsV2ValidateNameListExecute(r ApiModelHubExperimentsV2ValidateNameListRequest) (*ExperimentNameValidationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExperimentNameValidationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubExperimentsV2ValidateNameList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/experiments/v2/validate-name/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBaseCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + legacyKnowledgeBaseMutationRequest *LegacyKnowledgeBaseMutationRequest +} + +func (r ApiModelHubKnowledgeBaseCreateRequest) LegacyKnowledgeBaseMutationRequest(legacyKnowledgeBaseMutationRequest LegacyKnowledgeBaseMutationRequest) ApiModelHubKnowledgeBaseCreateRequest { + r.legacyKnowledgeBaseMutationRequest = &legacyKnowledgeBaseMutationRequest + return r +} + +func (r ApiModelHubKnowledgeBaseCreateRequest) Execute() (*LegacyKnowledgeBaseCreateResponse, *http.Response, error) { + return r.ApiService.ModelHubKnowledgeBaseCreateExecute(r) +} + +/* +ModelHubKnowledgeBaseCreate Method for ModelHubKnowledgeBaseCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBaseCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBaseCreate(ctx context.Context) ApiModelHubKnowledgeBaseCreateRequest { + return ApiModelHubKnowledgeBaseCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return LegacyKnowledgeBaseCreateResponse +func (a *ModelHubAPIService) ModelHubKnowledgeBaseCreateExecute(r ApiModelHubKnowledgeBaseCreateRequest) (*LegacyKnowledgeBaseCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LegacyKnowledgeBaseCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBaseCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.legacyKnowledgeBaseMutationRequest == nil { + return localVarReturnValue, nil, reportError("legacyKnowledgeBaseMutationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.legacyKnowledgeBaseMutationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBaseDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubKnowledgeBaseDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubKnowledgeBaseDeleteExecute(r) +} + +/* +ModelHubKnowledgeBaseDelete Method for ModelHubKnowledgeBaseDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBaseDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBaseDelete(ctx context.Context) ApiModelHubKnowledgeBaseDeleteRequest { + return ApiModelHubKnowledgeBaseDeleteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubKnowledgeBaseDeleteExecute(r ApiModelHubKnowledgeBaseDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBaseDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBaseFilesCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + legacyKnowledgeBaseFilesRequest *LegacyKnowledgeBaseFilesRequest +} + +func (r ApiModelHubKnowledgeBaseFilesCreateRequest) LegacyKnowledgeBaseFilesRequest(legacyKnowledgeBaseFilesRequest LegacyKnowledgeBaseFilesRequest) ApiModelHubKnowledgeBaseFilesCreateRequest { + r.legacyKnowledgeBaseFilesRequest = &legacyKnowledgeBaseFilesRequest + return r +} + +func (r ApiModelHubKnowledgeBaseFilesCreateRequest) Execute() (*LegacyKnowledgeBaseFilesResponse, *http.Response, error) { + return r.ApiService.ModelHubKnowledgeBaseFilesCreateExecute(r) +} + +/* +ModelHubKnowledgeBaseFilesCreate Method for ModelHubKnowledgeBaseFilesCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBaseFilesCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBaseFilesCreate(ctx context.Context) ApiModelHubKnowledgeBaseFilesCreateRequest { + return ApiModelHubKnowledgeBaseFilesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return LegacyKnowledgeBaseFilesResponse +func (a *ModelHubAPIService) ModelHubKnowledgeBaseFilesCreateExecute(r ApiModelHubKnowledgeBaseFilesCreateRequest) (*LegacyKnowledgeBaseFilesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LegacyKnowledgeBaseFilesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBaseFilesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/files/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.legacyKnowledgeBaseFilesRequest == nil { + return localVarReturnValue, nil, reportError("legacyKnowledgeBaseFilesRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.legacyKnowledgeBaseFilesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBaseFilesDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubKnowledgeBaseFilesDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubKnowledgeBaseFilesDeleteExecute(r) +} + +/* +ModelHubKnowledgeBaseFilesDelete Method for ModelHubKnowledgeBaseFilesDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBaseFilesDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBaseFilesDelete(ctx context.Context) ApiModelHubKnowledgeBaseFilesDeleteRequest { + return ApiModelHubKnowledgeBaseFilesDeleteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubKnowledgeBaseFilesDeleteExecute(r ApiModelHubKnowledgeBaseFilesDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBaseFilesDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/files/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBaseGetListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubKnowledgeBaseGetListRequest) Execute() (*LegacyKnowledgeBaseTableResponse, *http.Response, error) { + return r.ApiService.ModelHubKnowledgeBaseGetListExecute(r) +} + +/* +ModelHubKnowledgeBaseGetList Method for ModelHubKnowledgeBaseGetList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBaseGetListRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBaseGetList(ctx context.Context) ApiModelHubKnowledgeBaseGetListRequest { + return ApiModelHubKnowledgeBaseGetListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return LegacyKnowledgeBaseTableResponse +func (a *ModelHubAPIService) ModelHubKnowledgeBaseGetListExecute(r ApiModelHubKnowledgeBaseGetListRequest) (*LegacyKnowledgeBaseTableResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LegacyKnowledgeBaseTableResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBaseGetList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/get/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBaseListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubKnowledgeBaseListRequest) Execute() (*LegacyKnowledgeBaseSdkCodeResponse, *http.Response, error) { + return r.ApiService.ModelHubKnowledgeBaseListExecute(r) +} + +/* +ModelHubKnowledgeBaseList Method for ModelHubKnowledgeBaseList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBaseListRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBaseList(ctx context.Context) ApiModelHubKnowledgeBaseListRequest { + return ApiModelHubKnowledgeBaseListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return LegacyKnowledgeBaseSdkCodeResponse +func (a *ModelHubAPIService) ModelHubKnowledgeBaseListExecute(r ApiModelHubKnowledgeBaseListRequest) (*LegacyKnowledgeBaseSdkCodeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LegacyKnowledgeBaseSdkCodeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBaseList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBaseListListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService +} + +func (r ApiModelHubKnowledgeBaseListListRequest) Execute() (*LegacyKnowledgeBaseListResponse, *http.Response, error) { + return r.ApiService.ModelHubKnowledgeBaseListListExecute(r) +} + +/* +ModelHubKnowledgeBaseListList Method for ModelHubKnowledgeBaseListList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBaseListListRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBaseListList(ctx context.Context) ApiModelHubKnowledgeBaseListListRequest { + return ApiModelHubKnowledgeBaseListListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return LegacyKnowledgeBaseListResponse +func (a *ModelHubAPIService) ModelHubKnowledgeBaseListListExecute(r ApiModelHubKnowledgeBaseListListRequest) (*LegacyKnowledgeBaseListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LegacyKnowledgeBaseListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBaseListList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubKnowledgeBasePartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + legacyKnowledgeBaseMutationRequest *LegacyKnowledgeBaseMutationRequest +} + +func (r ApiModelHubKnowledgeBasePartialUpdateRequest) LegacyKnowledgeBaseMutationRequest(legacyKnowledgeBaseMutationRequest LegacyKnowledgeBaseMutationRequest) ApiModelHubKnowledgeBasePartialUpdateRequest { + r.legacyKnowledgeBaseMutationRequest = &legacyKnowledgeBaseMutationRequest + return r +} + +func (r ApiModelHubKnowledgeBasePartialUpdateRequest) Execute() (*LegacyKnowledgeBaseMutationResponse, *http.Response, error) { + return r.ApiService.ModelHubKnowledgeBasePartialUpdateExecute(r) +} + +/* +ModelHubKnowledgeBasePartialUpdate Method for ModelHubKnowledgeBasePartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubKnowledgeBasePartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubKnowledgeBasePartialUpdate(ctx context.Context) ApiModelHubKnowledgeBasePartialUpdateRequest { + return ApiModelHubKnowledgeBasePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return LegacyKnowledgeBaseMutationResponse +func (a *ModelHubAPIService) ModelHubKnowledgeBasePartialUpdateExecute(r ApiModelHubKnowledgeBasePartialUpdateRequest) (*LegacyKnowledgeBaseMutationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LegacyKnowledgeBaseMutationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubKnowledgeBasePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/knowledge-base/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.legacyKnowledgeBaseMutationRequest == nil { + return localVarReturnValue, nil, reportError("legacyKnowledgeBaseMutationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.legacyKnowledgeBaseMutationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + executionId string + templateName *string + templateVersion *string + createdAt *string + search *string + ordering *string + page *int32 + limit *int32 +} + +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) TemplateName(templateName string) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + r.templateName = &templateName + return r +} + +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) TemplateVersion(templateVersion string) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + r.templateVersion = &templateVersion + return r +} + +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) CreatedAt(createdAt string) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + r.createdAt = &createdAt + return r +} + +// A search term. +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) Search(search string) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + r.search = &search + return r +} + +// Which field to use when ordering the results. +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) Ordering(ordering string) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) Page(page int32) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) Limit(limit int32) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) Execute() (*ModelHubPromptHistoryExecutionsList200Response, *http.Response, error) { + return r.ApiService.ModelHubPromptHistoryExecutionsGetExecutionDetailsExecute(r) +} + +/* +ModelHubPromptHistoryExecutionsGetExecutionDetails Method for ModelHubPromptHistoryExecutionsGetExecutionDetails + +Get detailed information about a specific PromptVersion + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param executionId + @return ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptHistoryExecutionsGetExecutionDetails(ctx context.Context, executionId string) ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest { + return ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest{ + ApiService: a, + ctx: ctx, + executionId: executionId, + } +} + +// Execute executes the request +// +// @return ModelHubPromptHistoryExecutionsList200Response +func (a *ModelHubAPIService) ModelHubPromptHistoryExecutionsGetExecutionDetailsExecute(r ApiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest) (*ModelHubPromptHistoryExecutionsList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPromptHistoryExecutionsList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptHistoryExecutionsGetExecutionDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-history-executions/execution-details/{execution_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"execution_id"+"}", url.PathEscape(parameterValueToString(r.executionId, "executionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.templateName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "template_name", r.templateName, "form", "") + } + if r.templateVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "template_version", r.templateVersion, "form", "") + } + if r.createdAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at", r.createdAt, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptHistoryExecutionsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateName *string + templateVersion *string + createdAt *string + search *string + ordering *string + page *int32 + limit *int32 +} + +func (r ApiModelHubPromptHistoryExecutionsListRequest) TemplateName(templateName string) ApiModelHubPromptHistoryExecutionsListRequest { + r.templateName = &templateName + return r +} + +func (r ApiModelHubPromptHistoryExecutionsListRequest) TemplateVersion(templateVersion string) ApiModelHubPromptHistoryExecutionsListRequest { + r.templateVersion = &templateVersion + return r +} + +func (r ApiModelHubPromptHistoryExecutionsListRequest) CreatedAt(createdAt string) ApiModelHubPromptHistoryExecutionsListRequest { + r.createdAt = &createdAt + return r +} + +// A search term. +func (r ApiModelHubPromptHistoryExecutionsListRequest) Search(search string) ApiModelHubPromptHistoryExecutionsListRequest { + r.search = &search + return r +} + +// Which field to use when ordering the results. +func (r ApiModelHubPromptHistoryExecutionsListRequest) Ordering(ordering string) ApiModelHubPromptHistoryExecutionsListRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiModelHubPromptHistoryExecutionsListRequest) Page(page int32) ApiModelHubPromptHistoryExecutionsListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubPromptHistoryExecutionsListRequest) Limit(limit int32) ApiModelHubPromptHistoryExecutionsListRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubPromptHistoryExecutionsListRequest) Execute() (*ModelHubPromptHistoryExecutionsList200Response, *http.Response, error) { + return r.ApiService.ModelHubPromptHistoryExecutionsListExecute(r) +} + +/* +ModelHubPromptHistoryExecutionsList Method for ModelHubPromptHistoryExecutionsList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptHistoryExecutionsListRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptHistoryExecutionsList(ctx context.Context) ApiModelHubPromptHistoryExecutionsListRequest { + return ApiModelHubPromptHistoryExecutionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubPromptHistoryExecutionsList200Response +func (a *ModelHubAPIService) ModelHubPromptHistoryExecutionsListExecute(r ApiModelHubPromptHistoryExecutionsListRequest) (*ModelHubPromptHistoryExecutionsList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPromptHistoryExecutionsList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptHistoryExecutionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-history-executions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.templateName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "template_name", r.templateName, "form", "") + } + if r.templateVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "template_version", r.templateVersion, "form", "") + } + if r.createdAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at", r.createdAt, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptHistoryExecutionsReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptHistoryExecutionsReadRequest) Execute() (*PromptHistoryExecution, *http.Response, error) { + return r.ApiService.ModelHubPromptHistoryExecutionsReadExecute(r) +} + +/* +ModelHubPromptHistoryExecutionsRead Method for ModelHubPromptHistoryExecutionsRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt version. + @return ApiModelHubPromptHistoryExecutionsReadRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptHistoryExecutionsRead(ctx context.Context, id string) ApiModelHubPromptHistoryExecutionsReadRequest { + return ApiModelHubPromptHistoryExecutionsReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptHistoryExecution +func (a *ModelHubAPIService) ModelHubPromptHistoryExecutionsReadExecute(r ApiModelHubPromptHistoryExecutionsReadRequest) (*PromptHistoryExecution, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptHistoryExecution + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptHistoryExecutionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-history-executions/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsAssignLabelByIdRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + templateId string + labelId string + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsAssignLabelByIdRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsAssignLabelByIdRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsAssignLabelByIdRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsAssignLabelByIdExecute(r) +} + +/* +ModelHubPromptLabelsAssignLabelById Method for ModelHubPromptLabelsAssignLabelById + +Assign a label to a specific version by template name and version name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId + @param labelId + @return ApiModelHubPromptLabelsAssignLabelByIdRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsAssignLabelById(ctx context.Context, templateId string, labelId string) ApiModelHubPromptLabelsAssignLabelByIdRequest { + return ApiModelHubPromptLabelsAssignLabelByIdRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + labelId: labelId, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsAssignLabelByIdExecute(r ApiModelHubPromptLabelsAssignLabelByIdRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsAssignLabelById") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"label_id"+"}", url.PathEscape(parameterValueToString(r.labelId, "labelId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsAssignMultipleLabelsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsAssignMultipleLabelsRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsAssignMultipleLabelsRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsAssignMultipleLabelsRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsAssignMultipleLabelsExecute(r) +} + +/* +ModelHubPromptLabelsAssignMultipleLabels Method for ModelHubPromptLabelsAssignMultipleLabels + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsAssignMultipleLabelsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsAssignMultipleLabels(ctx context.Context) ApiModelHubPromptLabelsAssignMultipleLabelsRequest { + return ApiModelHubPromptLabelsAssignMultipleLabelsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsAssignMultipleLabelsExecute(r ApiModelHubPromptLabelsAssignMultipleLabelsRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsAssignMultipleLabels") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/assign-multiple-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsCreateRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsCreateRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsCreateRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsCreateExecute(r) +} + +/* +ModelHubPromptLabelsCreate Method for ModelHubPromptLabelsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsCreate(ctx context.Context) ApiModelHubPromptLabelsCreateRequest { + return ApiModelHubPromptLabelsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsCreateExecute(r ApiModelHubPromptLabelsCreateRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsCreateSystemLabelsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsCreateSystemLabelsRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsCreateSystemLabelsRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsCreateSystemLabelsRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsCreateSystemLabelsExecute(r) +} + +/* +ModelHubPromptLabelsCreateSystemLabels Method for ModelHubPromptLabelsCreateSystemLabels + +Create (idempotently) Production, Staging, Development system labels for the caller's org. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsCreateSystemLabelsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsCreateSystemLabels(ctx context.Context) ApiModelHubPromptLabelsCreateSystemLabelsRequest { + return ApiModelHubPromptLabelsCreateSystemLabelsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsCreateSystemLabelsExecute(r ApiModelHubPromptLabelsCreateSystemLabelsRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsCreateSystemLabels") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/create-system-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptLabelsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubPromptLabelsDeleteExecute(r) +} + +/* +ModelHubPromptLabelsDelete Method for ModelHubPromptLabelsDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubPromptLabelsDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsDelete(ctx context.Context, id string) ApiModelHubPromptLabelsDeleteRequest { + return ApiModelHubPromptLabelsDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubPromptLabelsDeleteExecute(r ApiModelHubPromptLabelsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsGetByNameRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiModelHubPromptLabelsGetByNameRequest) Page(page int32) ApiModelHubPromptLabelsGetByNameRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubPromptLabelsGetByNameRequest) Limit(limit int32) ApiModelHubPromptLabelsGetByNameRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubPromptLabelsGetByNameRequest) Execute() (*ModelHubPromptLabelsList200Response, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsGetByNameExecute(r) +} + +/* +ModelHubPromptLabelsGetByName Fetch a prompt version by template name and either explicit version or label. + +Query params: + + - name: template name (required) + + - version: version name like v1 (optional) + + - label: label name like Production/Staging/Development or custom (optional) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsGetByNameRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsGetByName(ctx context.Context) ApiModelHubPromptLabelsGetByNameRequest { + return ApiModelHubPromptLabelsGetByNameRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubPromptLabelsList200Response +func (a *ModelHubAPIService) ModelHubPromptLabelsGetByNameExecute(r ApiModelHubPromptLabelsGetByNameRequest) (*ModelHubPromptLabelsList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPromptLabelsList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsGetByName") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/get-by-name/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiModelHubPromptLabelsListRequest) Page(page int32) ApiModelHubPromptLabelsListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubPromptLabelsListRequest) Limit(limit int32) ApiModelHubPromptLabelsListRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubPromptLabelsListRequest) Execute() (*ModelHubPromptLabelsList200Response, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsListExecute(r) +} + +/* +ModelHubPromptLabelsList Method for ModelHubPromptLabelsList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsListRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsList(ctx context.Context) ApiModelHubPromptLabelsListRequest { + return ApiModelHubPromptLabelsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubPromptLabelsList200Response +func (a *ModelHubAPIService) ModelHubPromptLabelsListExecute(r ApiModelHubPromptLabelsListRequest) (*ModelHubPromptLabelsList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPromptLabelsList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsPartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsPartialUpdateRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsPartialUpdateRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsPartialUpdateRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsPartialUpdateExecute(r) +} + +/* +ModelHubPromptLabelsPartialUpdate Method for ModelHubPromptLabelsPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubPromptLabelsPartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsPartialUpdate(ctx context.Context, id string) ApiModelHubPromptLabelsPartialUpdateRequest { + return ApiModelHubPromptLabelsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsPartialUpdateExecute(r ApiModelHubPromptLabelsPartialUpdateRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptLabelsReadRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsReadExecute(r) +} + +/* +ModelHubPromptLabelsRead Method for ModelHubPromptLabelsRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubPromptLabelsReadRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsRead(ctx context.Context, id string) ApiModelHubPromptLabelsReadRequest { + return ApiModelHubPromptLabelsReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsReadExecute(r ApiModelHubPromptLabelsReadRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsRemoveLabelFromVersionRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsRemoveLabelFromVersionRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsRemoveLabelFromVersionRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsRemoveLabelFromVersionRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsRemoveLabelFromVersionExecute(r) +} + +/* +ModelHubPromptLabelsRemoveLabelFromVersion Method for ModelHubPromptLabelsRemoveLabelFromVersion + +Detach label from a prompt version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsRemoveLabelFromVersionRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsRemoveLabelFromVersion(ctx context.Context) ApiModelHubPromptLabelsRemoveLabelFromVersionRequest { + return ApiModelHubPromptLabelsRemoveLabelFromVersionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsRemoveLabelFromVersionExecute(r ApiModelHubPromptLabelsRemoveLabelFromVersionRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsRemoveLabelFromVersion") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/remove/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsSetDefaultRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsSetDefaultRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsSetDefaultRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsSetDefaultRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsSetDefaultExecute(r) +} + +/* +ModelHubPromptLabelsSetDefault Method for ModelHubPromptLabelsSetDefault + +Set default version for a template by name and version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsSetDefaultRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsSetDefault(ctx context.Context) ApiModelHubPromptLabelsSetDefaultRequest { + return ApiModelHubPromptLabelsSetDefaultRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsSetDefaultExecute(r ApiModelHubPromptLabelsSetDefaultRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsSetDefault") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/set-default/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsTemplateLabelsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiModelHubPromptLabelsTemplateLabelsRequest) Page(page int32) ApiModelHubPromptLabelsTemplateLabelsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubPromptLabelsTemplateLabelsRequest) Limit(limit int32) ApiModelHubPromptLabelsTemplateLabelsRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubPromptLabelsTemplateLabelsRequest) Execute() (*ModelHubPromptLabelsList200Response, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsTemplateLabelsExecute(r) +} + +/* +ModelHubPromptLabelsTemplateLabels Method for ModelHubPromptLabelsTemplateLabels + +List versions with labels for a template by name or id. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptLabelsTemplateLabelsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsTemplateLabels(ctx context.Context) ApiModelHubPromptLabelsTemplateLabelsRequest { + return ApiModelHubPromptLabelsTemplateLabelsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubPromptLabelsList200Response +func (a *ModelHubAPIService) ModelHubPromptLabelsTemplateLabelsExecute(r ApiModelHubPromptLabelsTemplateLabelsRequest) (*ModelHubPromptLabelsList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPromptLabelsList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsTemplateLabels") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/template-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptLabelsUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptLabel *PromptLabel +} + +func (r ApiModelHubPromptLabelsUpdateRequest) PromptLabel(promptLabel PromptLabel) ApiModelHubPromptLabelsUpdateRequest { + r.promptLabel = &promptLabel + return r +} + +func (r ApiModelHubPromptLabelsUpdateRequest) Execute() (*PromptLabel, *http.Response, error) { + return r.ApiService.ModelHubPromptLabelsUpdateExecute(r) +} + +/* +ModelHubPromptLabelsUpdate Method for ModelHubPromptLabelsUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubPromptLabelsUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptLabelsUpdate(ctx context.Context, id string) ApiModelHubPromptLabelsUpdateRequest { + return ApiModelHubPromptLabelsUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptLabel +func (a *ModelHubAPIService) ModelHubPromptLabelsUpdateExecute(r ApiModelHubPromptLabelsUpdateRequest) (*PromptLabel, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptLabel + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptLabelsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-labels/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptLabel == nil { + return localVarReturnValue, nil, reportError("promptLabel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptLabel + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesAddNewDraftRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesAddNewDraftRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesAddNewDraftRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesAddNewDraftRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesAddNewDraftExecute(r) +} + +/* +ModelHubPromptTemplatesAddNewDraft Method for ModelHubPromptTemplatesAddNewDraft + +Create a new draft version of the PromptTemplate and return its details. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesAddNewDraftRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesAddNewDraft(ctx context.Context, id string) ApiModelHubPromptTemplatesAddNewDraftRequest { + return ApiModelHubPromptTemplatesAddNewDraftRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesAddNewDraftExecute(r ApiModelHubPromptTemplatesAddNewDraftRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesAddNewDraft") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/add-new-draft/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesAnalyzePromptRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesAnalyzePromptRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesAnalyzePromptRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesAnalyzePromptRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesAnalyzePromptExecute(r) +} + +/* +ModelHubPromptTemplatesAnalyzePrompt Method for ModelHubPromptTemplatesAnalyzePrompt + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesAnalyzePromptRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesAnalyzePrompt(ctx context.Context) ApiModelHubPromptTemplatesAnalyzePromptRequest { + return ApiModelHubPromptTemplatesAnalyzePromptRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesAnalyzePromptExecute(r ApiModelHubPromptTemplatesAnalyzePromptRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesAnalyzePrompt") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/analyze-prompt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesBulkDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesBulkDeleteRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesBulkDeleteRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesBulkDeleteRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesBulkDeleteExecute(r) +} + +/* +ModelHubPromptTemplatesBulkDelete Method for ModelHubPromptTemplatesBulkDelete + +Bulk delete prompt templates + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesBulkDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesBulkDelete(ctx context.Context) ApiModelHubPromptTemplatesBulkDeleteRequest { + return ApiModelHubPromptTemplatesBulkDeleteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesBulkDeleteExecute(r ApiModelHubPromptTemplatesBulkDeleteRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesBulkDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/bulk-delete/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesCommitRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesCommitRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesCommitRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesCommitRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesCommitExecute(r) +} + +/* +ModelHubPromptTemplatesCommit Method for ModelHubPromptTemplatesCommit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesCommitRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesCommit(ctx context.Context, id string) ApiModelHubPromptTemplatesCommitRequest { + return ApiModelHubPromptTemplatesCommitRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesCommitExecute(r ApiModelHubPromptTemplatesCommitRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesCommit") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/commit/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesCompareVersionsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesCompareVersionsRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesCompareVersionsRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesCompareVersionsRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesCompareVersionsExecute(r) +} + +/* +ModelHubPromptTemplatesCompareVersions Method for ModelHubPromptTemplatesCompareVersions + +Compare different versions of the PromptTemplate. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesCompareVersionsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesCompareVersions(ctx context.Context, id string) ApiModelHubPromptTemplatesCompareVersionsRequest { + return ApiModelHubPromptTemplatesCompareVersionsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesCompareVersionsExecute(r ApiModelHubPromptTemplatesCompareVersionsRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesCompareVersions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/compare-versions/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesCreateRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesCreateRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesCreateRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesCreateExecute(r) +} + +/* +ModelHubPromptTemplatesCreate Method for ModelHubPromptTemplatesCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesCreate(ctx context.Context) ApiModelHubPromptTemplatesCreateRequest { + return ApiModelHubPromptTemplatesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesCreateExecute(r ApiModelHubPromptTemplatesCreateRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesCreateDraftRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesCreateDraftRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesCreateDraftRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesCreateDraftRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesCreateDraftExecute(r) +} + +/* +ModelHubPromptTemplatesCreateDraft Method for ModelHubPromptTemplatesCreateDraft + +Create a draft version of the PromptTemplate and return its details. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesCreateDraftRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesCreateDraft(ctx context.Context) ApiModelHubPromptTemplatesCreateDraftRequest { + return ApiModelHubPromptTemplatesCreateDraftRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesCreateDraftExecute(r ApiModelHubPromptTemplatesCreateDraftRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesCreateDraft") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/create-draft/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesDeleteExecute(r) +} + +/* +ModelHubPromptTemplatesDelete Method for ModelHubPromptTemplatesDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesDelete(ctx context.Context, id string) ApiModelHubPromptTemplatesDeleteRequest { + return ApiModelHubPromptTemplatesDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubPromptTemplatesDeleteExecute(r ApiModelHubPromptTemplatesDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesDeleteEvaluationConfigRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesDeleteEvaluationConfigRequest) Execute() (*http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesDeleteEvaluationConfigExecute(r) +} + +/* +ModelHubPromptTemplatesDeleteEvaluationConfig Delete an evaluation configuration by name from a PromptTemplate. + +This endpoint allows removing an evaluation configuration from a PromptTemplate +based on its unique name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesDeleteEvaluationConfigRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesDeleteEvaluationConfig(ctx context.Context, id string) ApiModelHubPromptTemplatesDeleteEvaluationConfigRequest { + return ApiModelHubPromptTemplatesDeleteEvaluationConfigRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *ModelHubAPIService) ModelHubPromptTemplatesDeleteEvaluationConfigExecute(r ApiModelHubPromptTemplatesDeleteEvaluationConfigRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesDeleteEvaluationConfig") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/delete-evaluation-config/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptId string + derivedVariableExtractRequest *DerivedVariableExtractRequest +} + +func (r ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest) DerivedVariableExtractRequest(derivedVariableExtractRequest DerivedVariableExtractRequest) ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest { + r.derivedVariableExtractRequest = &derivedVariableExtractRequest + return r +} + +func (r ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest) Execute() (*DerivedVariableDetailResponse, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesDerivedVariablesExtractCreateExecute(r) +} + +/* +ModelHubPromptTemplatesDerivedVariablesExtractCreate Manually trigger extraction of derived variables from outputs. + +This is useful when you want to re-extract variables or extract from +existing outputs that weren't processed. + +Request body: + + - version: Version to extract from + + - column_name: Name for the output column + + - output_index: Optional specific output index (default: 0) + + - response_format_type: Optional response format hint + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptId + @return ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesExtractCreate(ctx context.Context, promptId string) ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest { + return ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest{ + ApiService: a, + ctx: ctx, + promptId: promptId, + } +} + +// Execute executes the request +// +// @return DerivedVariableDetailResponse +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesExtractCreateExecute(r ApiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest) (*DerivedVariableDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DerivedVariableDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesDerivedVariablesExtractCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_id"+"}", url.PathEscape(parameterValueToString(r.promptId, "promptId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.derivedVariableExtractRequest == nil { + return localVarReturnValue, nil, reportError("derivedVariableExtractRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.derivedVariableExtractRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesDerivedVariablesListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptId string +} + +func (r ApiModelHubPromptTemplatesDerivedVariablesListRequest) Execute() (*PromptDerivedVariablesResponse, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesDerivedVariablesListExecute(r) +} + +/* +ModelHubPromptTemplatesDerivedVariablesList Get all derived variables for a prompt template. + +Returns derived variables from JSON outputs across all versions. + +Query params: + + - version: Optional version filter + + - column_name: Optional column name filter + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptId + @return ApiModelHubPromptTemplatesDerivedVariablesListRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesList(ctx context.Context, promptId string) ApiModelHubPromptTemplatesDerivedVariablesListRequest { + return ApiModelHubPromptTemplatesDerivedVariablesListRequest{ + ApiService: a, + ctx: ctx, + promptId: promptId, + } +} + +// Execute executes the request +// +// @return PromptDerivedVariablesResponse +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesListExecute(r ApiModelHubPromptTemplatesDerivedVariablesListRequest) (*PromptDerivedVariablesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptDerivedVariablesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesDerivedVariablesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{prompt_id}/derived-variables/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_id"+"}", url.PathEscape(parameterValueToString(r.promptId, "promptId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + derivedVariablePreviewRequest *DerivedVariablePreviewRequest +} + +func (r ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest) DerivedVariablePreviewRequest(derivedVariablePreviewRequest DerivedVariablePreviewRequest) ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest { + r.derivedVariablePreviewRequest = &derivedVariablePreviewRequest + return r +} + +func (r ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest) Execute() (*DerivedVariableDetailResponse, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesDerivedVariablesPreviewCreateExecute(r) +} + +/* +ModelHubPromptTemplatesDerivedVariablesPreviewCreate Preview derived variables from JSON content without saving. + +Useful for showing what variables would be extracted before running. + +Request body: + + - content: JSON string or object to analyze + + - column_name: Name for the variable prefix + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesPreviewCreate(ctx context.Context) ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest { + return ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DerivedVariableDetailResponse +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesPreviewCreateExecute(r ApiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest) (*DerivedVariableDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DerivedVariableDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesDerivedVariablesPreviewCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/derived-variables/preview/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.derivedVariablePreviewRequest == nil { + return localVarReturnValue, nil, reportError("derivedVariablePreviewRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.derivedVariablePreviewRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesDerivedVariablesSchemaListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptId string + columnName string +} + +func (r ApiModelHubPromptTemplatesDerivedVariablesSchemaListRequest) Execute() (*DerivedVariableDetailResponse, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesDerivedVariablesSchemaListExecute(r) +} + +/* +ModelHubPromptTemplatesDerivedVariablesSchemaList Get the schema for derived variables of a specific column. + +Returns detailed schema information including types and sample values. + +Path params: + - prompt_id: UUID of the prompt template + - column_name: Name of the column + +Query params: + + - version: Optional version filter + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptId + @param columnName + @return ApiModelHubPromptTemplatesDerivedVariablesSchemaListRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesSchemaList(ctx context.Context, promptId string, columnName string) ApiModelHubPromptTemplatesDerivedVariablesSchemaListRequest { + return ApiModelHubPromptTemplatesDerivedVariablesSchemaListRequest{ + ApiService: a, + ctx: ctx, + promptId: promptId, + columnName: columnName, + } +} + +// Execute executes the request +// +// @return DerivedVariableDetailResponse +func (a *ModelHubAPIService) ModelHubPromptTemplatesDerivedVariablesSchemaListExecute(r ApiModelHubPromptTemplatesDerivedVariablesSchemaListRequest) (*DerivedVariableDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DerivedVariableDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesDerivedVariablesSchemaList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_id"+"}", url.PathEscape(parameterValueToString(r.promptId, "promptId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"column_name"+"}", url.PathEscape(parameterValueToString(r.columnName, "columnName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelHubErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGeneratePromptRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesGeneratePromptRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesGeneratePromptRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesGeneratePromptRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGeneratePromptExecute(r) +} + +/* +ModelHubPromptTemplatesGeneratePrompt Method for ModelHubPromptTemplatesGeneratePrompt + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesGeneratePromptRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGeneratePrompt(ctx context.Context) ApiModelHubPromptTemplatesGeneratePromptRequest { + return ApiModelHubPromptTemplatesGeneratePromptRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesGeneratePromptExecute(r ApiModelHubPromptTemplatesGeneratePromptRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGeneratePrompt") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/generate-prompt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGenerateVariablesRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesGenerateVariablesRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesGenerateVariablesRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesGenerateVariablesRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGenerateVariablesExecute(r) +} + +/* +ModelHubPromptTemplatesGenerateVariables Generate synthetic data for prompt variables using the SyntheticDataAgent. + +Expected payload: + + { + "prompt_name": "string", + "prompt_instructions": "list/array" , + "variable_names": ["string"], + "variable_count": "int", + "generation_type": "prompt" + } + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesGenerateVariablesRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGenerateVariables(ctx context.Context) ApiModelHubPromptTemplatesGenerateVariablesRequest { + return ApiModelHubPromptTemplatesGenerateVariablesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesGenerateVariablesExecute(r ApiModelHubPromptTemplatesGenerateVariablesRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGenerateVariables") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/generate-variables/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGetAllVariablesRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesGetAllVariablesRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGetAllVariablesExecute(r) +} + +/* +ModelHubPromptTemplatesGetAllVariables Method for ModelHubPromptTemplatesGetAllVariables + +Get all variables from template and its executions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesGetAllVariablesRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetAllVariables(ctx context.Context, id string) ApiModelHubPromptTemplatesGetAllVariablesRequest { + return ApiModelHubPromptTemplatesGetAllVariablesRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetAllVariablesExecute(r ApiModelHubPromptTemplatesGetAllVariablesRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGetAllVariables") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/all-variables/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGetEvaluationConfigsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesGetEvaluationConfigsRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGetEvaluationConfigsExecute(r) +} + +/* +ModelHubPromptTemplatesGetEvaluationConfigs Method for ModelHubPromptTemplatesGetEvaluationConfigs + +Get the evaluation configurations for a specific prompt template. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesGetEvaluationConfigsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetEvaluationConfigs(ctx context.Context, id string) ApiModelHubPromptTemplatesGetEvaluationConfigsRequest { + return ApiModelHubPromptTemplatesGetEvaluationConfigsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetEvaluationConfigsExecute(r ApiModelHubPromptTemplatesGetEvaluationConfigsRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGetEvaluationConfigs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/evaluation-configs/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGetNextVersionRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesGetNextVersionRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGetNextVersionExecute(r) +} + +/* +ModelHubPromptTemplatesGetNextVersion Method for ModelHubPromptTemplatesGetNextVersion + +Get the next version of the PromptTemplate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesGetNextVersionRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetNextVersion(ctx context.Context, id string) ApiModelHubPromptTemplatesGetNextVersionRequest { + return ApiModelHubPromptTemplatesGetNextVersionRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetNextVersionExecute(r ApiModelHubPromptTemplatesGetNextVersionRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGetNextVersion") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/get-next-version/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGetRunStatusRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesGetRunStatusRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGetRunStatusExecute(r) +} + +/* +ModelHubPromptTemplatesGetRunStatus Method for ModelHubPromptTemplatesGetRunStatus + +Get the current status and results of a template run + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesGetRunStatusRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetRunStatus(ctx context.Context, id string) ApiModelHubPromptTemplatesGetRunStatusRequest { + return ApiModelHubPromptTemplatesGetRunStatusRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetRunStatusExecute(r ApiModelHubPromptTemplatesGetRunStatusRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGetRunStatus") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/get-run-status/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGetSdkCodeRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + language string +} + +func (r ApiModelHubPromptTemplatesGetSdkCodeRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGetSdkCodeExecute(r) +} + +/* +ModelHubPromptTemplatesGetSdkCode Method for ModelHubPromptTemplatesGetSdkCode + +Get the prompt code in the requested format. If no format is specified, returns all formats. +Supported languages: python, typescript, curl, langchain, nodejs, go + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @param language + @return ApiModelHubPromptTemplatesGetSdkCodeRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetSdkCode(ctx context.Context, id string, language string) ApiModelHubPromptTemplatesGetSdkCodeRequest { + return ApiModelHubPromptTemplatesGetSdkCodeRequest{ + ApiService: a, + ctx: ctx, + id: id, + language: language, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetSdkCodeExecute(r ApiModelHubPromptTemplatesGetSdkCodeRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGetSdkCode") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/get-sdk-code/{language}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"language"+"}", url.PathEscape(parameterValueToString(r.language, "language")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesGetTemplateByNameRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + name *string + version *string + createdAt *string + search *string + ordering *string + page *int32 + limit *int32 +} + +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) Name(name string) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + r.name = &name + return r +} + +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) Version(version string) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + r.version = &version + return r +} + +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) CreatedAt(createdAt string) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + r.createdAt = &createdAt + return r +} + +// A search term. +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) Search(search string) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + r.search = &search + return r +} + +// Which field to use when ordering the results. +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) Ordering(ordering string) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) Page(page int32) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) Limit(limit int32) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubPromptTemplatesGetTemplateByNameRequest) Execute() (*ModelHubPromptTemplatesList200Response, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesGetTemplateByNameExecute(r) +} + +/* +ModelHubPromptTemplatesGetTemplateByName Method for ModelHubPromptTemplatesGetTemplateByName + +Retrieve a prompt template by name. +If no version is specified, returns the default version (is_default=True). +If a version is specified, returns that specific version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesGetTemplateByNameRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetTemplateByName(ctx context.Context) ApiModelHubPromptTemplatesGetTemplateByNameRequest { + return ApiModelHubPromptTemplatesGetTemplateByNameRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubPromptTemplatesList200Response +func (a *ModelHubAPIService) ModelHubPromptTemplatesGetTemplateByNameExecute(r ApiModelHubPromptTemplatesGetTemplateByNameRequest) (*ModelHubPromptTemplatesList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPromptTemplatesList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesGetTemplateByName") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/get-template-by-name/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "form", "") + } + if r.createdAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at", r.createdAt, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesImprovePromptRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesImprovePromptRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesImprovePromptRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesImprovePromptRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesImprovePromptExecute(r) +} + +/* +ModelHubPromptTemplatesImprovePrompt Method for ModelHubPromptTemplatesImprovePrompt + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesImprovePromptRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesImprovePrompt(ctx context.Context) ApiModelHubPromptTemplatesImprovePromptRequest { + return ApiModelHubPromptTemplatesImprovePromptRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesImprovePromptExecute(r ApiModelHubPromptTemplatesImprovePromptRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesImprovePrompt") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/improve-prompt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + name *string + version *string + createdAt *string + search *string + ordering *string + page *int32 + limit *int32 +} + +func (r ApiModelHubPromptTemplatesListRequest) Name(name string) ApiModelHubPromptTemplatesListRequest { + r.name = &name + return r +} + +func (r ApiModelHubPromptTemplatesListRequest) Version(version string) ApiModelHubPromptTemplatesListRequest { + r.version = &version + return r +} + +func (r ApiModelHubPromptTemplatesListRequest) CreatedAt(createdAt string) ApiModelHubPromptTemplatesListRequest { + r.createdAt = &createdAt + return r +} + +// A search term. +func (r ApiModelHubPromptTemplatesListRequest) Search(search string) ApiModelHubPromptTemplatesListRequest { + r.search = &search + return r +} + +// Which field to use when ordering the results. +func (r ApiModelHubPromptTemplatesListRequest) Ordering(ordering string) ApiModelHubPromptTemplatesListRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiModelHubPromptTemplatesListRequest) Page(page int32) ApiModelHubPromptTemplatesListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubPromptTemplatesListRequest) Limit(limit int32) ApiModelHubPromptTemplatesListRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubPromptTemplatesListRequest) Execute() (*ModelHubPromptTemplatesList200Response, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesListExecute(r) +} + +/* +ModelHubPromptTemplatesList Method for ModelHubPromptTemplatesList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubPromptTemplatesListRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesList(ctx context.Context) ApiModelHubPromptTemplatesListRequest { + return ApiModelHubPromptTemplatesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubPromptTemplatesList200Response +func (a *ModelHubAPIService) ModelHubPromptTemplatesListExecute(r ApiModelHubPromptTemplatesListRequest) (*ModelHubPromptTemplatesList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubPromptTemplatesList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "form", "") + } + if r.createdAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at", r.createdAt, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesPartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesPartialUpdateRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesPartialUpdateRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesPartialUpdateRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesPartialUpdateExecute(r) +} + +/* +ModelHubPromptTemplatesPartialUpdate Method for ModelHubPromptTemplatesPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesPartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesPartialUpdate(ctx context.Context, id string) ApiModelHubPromptTemplatesPartialUpdateRequest { + return ApiModelHubPromptTemplatesPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesPartialUpdateExecute(r ApiModelHubPromptTemplatesPartialUpdateRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesReadRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesReadExecute(r) +} + +/* +ModelHubPromptTemplatesRead Method for ModelHubPromptTemplatesRead + +Retrieve a prompt template with version history and execution data. +Handles caching and error cases. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesReadRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesRead(ctx context.Context, id string) ApiModelHubPromptTemplatesReadRequest { + return ApiModelHubPromptTemplatesReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesReadExecute(r ApiModelHubPromptTemplatesReadRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesRetrieveEvaluationsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesRetrieveEvaluationsRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesRetrieveEvaluationsExecute(r) +} + +/* +ModelHubPromptTemplatesRetrieveEvaluations Method for ModelHubPromptTemplatesRetrieveEvaluations + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesRetrieveEvaluationsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesRetrieveEvaluations(ctx context.Context, id string) ApiModelHubPromptTemplatesRetrieveEvaluationsRequest { + return ApiModelHubPromptTemplatesRetrieveEvaluationsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesRetrieveEvaluationsExecute(r ApiModelHubPromptTemplatesRetrieveEvaluationsRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesRetrieveEvaluations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/evaluations/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesRunEvalsOnMultipleVersionsExecute(r) +} + +/* +ModelHubPromptTemplatesRunEvalsOnMultipleVersions Method for ModelHubPromptTemplatesRunEvalsOnMultipleVersions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesRunEvalsOnMultipleVersions(ctx context.Context, id string) ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest { + return ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesRunEvalsOnMultipleVersionsExecute(r ApiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesRunEvalsOnMultipleVersions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesRunTemplateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesRunTemplateRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesRunTemplateRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesRunTemplateRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesRunTemplateExecute(r) +} + +/* +ModelHubPromptTemplatesRunTemplate Method for ModelHubPromptTemplatesRunTemplate + +Run a prompt template with the given configuration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesRunTemplateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesRunTemplate(ctx context.Context, id string) ApiModelHubPromptTemplatesRunTemplateRequest { + return ApiModelHubPromptTemplatesRunTemplateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesRunTemplateExecute(r ApiModelHubPromptTemplatesRunTemplateRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesRunTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/run_template/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesSaveNameRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesSaveNameRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesSaveNameRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesSaveNameRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesSaveNameExecute(r) +} + +/* +ModelHubPromptTemplatesSaveName Method for ModelHubPromptTemplatesSaveName + +Save/update the name for a template. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesSaveNameRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesSaveName(ctx context.Context, id string) ApiModelHubPromptTemplatesSaveNameRequest { + return ApiModelHubPromptTemplatesSaveNameRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesSaveNameExecute(r ApiModelHubPromptTemplatesSaveNameRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesSaveName") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/save-name/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesSavePromptFolderRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesSavePromptFolderRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesSavePromptFolderRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesSavePromptFolderRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesSavePromptFolderExecute(r) +} + +/* +ModelHubPromptTemplatesSavePromptFolder Method for ModelHubPromptTemplatesSavePromptFolder + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesSavePromptFolderRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesSavePromptFolder(ctx context.Context, id string) ApiModelHubPromptTemplatesSavePromptFolderRequest { + return ApiModelHubPromptTemplatesSavePromptFolderRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesSavePromptFolderExecute(r ApiModelHubPromptTemplatesSavePromptFolderRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesSavePromptFolder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/save-prompt-folder/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesSetDefaultRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesSetDefaultRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesSetDefaultRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesSetDefaultRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesSetDefaultExecute(r) +} + +/* +ModelHubPromptTemplatesSetDefault Method for ModelHubPromptTemplatesSetDefault + +Set a specific version of a prompt template as default + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesSetDefaultRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesSetDefault(ctx context.Context, id string) ApiModelHubPromptTemplatesSetDefaultRequest { + return ApiModelHubPromptTemplatesSetDefaultRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesSetDefaultExecute(r ApiModelHubPromptTemplatesSetDefaultRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesSetDefault") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/set_default/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesStopStreamingRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesStopStreamingRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesStopStreamingExecute(r) +} + +/* +ModelHubPromptTemplatesStopStreaming Method for ModelHubPromptTemplatesStopStreaming + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesStopStreamingRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesStopStreaming(ctx context.Context, id string) ApiModelHubPromptTemplatesStopStreamingRequest { + return ApiModelHubPromptTemplatesStopStreamingRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesStopStreamingExecute(r ApiModelHubPromptTemplatesStopStreamingRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesStopStreaming") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/stop-streaming/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesUpdateRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesUpdateRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesUpdateRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesUpdateExecute(r) +} + +/* +ModelHubPromptTemplatesUpdate Method for ModelHubPromptTemplatesUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesUpdate(ctx context.Context, id string) ApiModelHubPromptTemplatesUpdateRequest { + return ApiModelHubPromptTemplatesUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesUpdateExecute(r ApiModelHubPromptTemplatesUpdateRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + promptTemplate *PromptTemplate +} + +func (r ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest) PromptTemplate(promptTemplate PromptTemplate) ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest { + r.promptTemplate = &promptTemplate + return r +} + +func (r ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesUpdateEvaluationConfigsExecute(r) +} + +/* +ModelHubPromptTemplatesUpdateEvaluationConfigs Add or update evaluation configurations for a PromptTemplate. + +This endpoint allows adding new evaluation configurations or updating +existing ones in a PromptTemplate. If is_run is true, it will also +run evaluations on specified versions (or latest version if none specified). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesUpdateEvaluationConfigs(ctx context.Context, id string) ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest { + return ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesUpdateEvaluationConfigsExecute(r ApiModelHubPromptTemplatesUpdateEvaluationConfigsRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesUpdateEvaluationConfigs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/update-evaluation-configs/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptTemplate == nil { + return localVarReturnValue, nil, reportError("promptTemplate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptTemplate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubPromptTemplatesVersionsRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubPromptTemplatesVersionsRequest) Execute() (*PromptTemplate, *http.Response, error) { + return r.ApiService.ModelHubPromptTemplatesVersionsExecute(r) +} + +/* +ModelHubPromptTemplatesVersions Method for ModelHubPromptTemplatesVersions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id A UUID string identifying this prompt template. + @return ApiModelHubPromptTemplatesVersionsRequest +*/ +func (a *ModelHubAPIService) ModelHubPromptTemplatesVersions(ctx context.Context, id string) ApiModelHubPromptTemplatesVersionsRequest { + return ApiModelHubPromptTemplatesVersionsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PromptTemplate +func (a *ModelHubAPIService) ModelHubPromptTemplatesVersionsExecute(r ApiModelHubPromptTemplatesVersionsRequest) (*PromptTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubPromptTemplatesVersions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/prompt-templates/{id}/versions/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresBulkCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + bulkCreateScores *BulkCreateScores +} + +func (r ApiModelHubScoresBulkCreateRequest) BulkCreateScores(bulkCreateScores BulkCreateScores) ApiModelHubScoresBulkCreateRequest { + r.bulkCreateScores = &bulkCreateScores + return r +} + +func (r ApiModelHubScoresBulkCreateRequest) Execute() (*BulkCreateScoresResponse, *http.Response, error) { + return r.ApiService.ModelHubScoresBulkCreateExecute(r) +} + +/* +ModelHubScoresBulkCreate Method for ModelHubScoresBulkCreate + +Create multiple scores on a single source (e.g. from inline annotator). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubScoresBulkCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresBulkCreate(ctx context.Context) ApiModelHubScoresBulkCreateRequest { + return ApiModelHubScoresBulkCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return BulkCreateScoresResponse +func (a *ModelHubAPIService) ModelHubScoresBulkCreateExecute(r ApiModelHubScoresBulkCreateRequest) (*BulkCreateScoresResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BulkCreateScoresResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresBulkCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/bulk/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.bulkCreateScores == nil { + return localVarReturnValue, nil, reportError("bulkCreateScores is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.bulkCreateScores + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresCreateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + createScore *CreateScore +} + +func (r ApiModelHubScoresCreateRequest) CreateScore(createScore CreateScore) ApiModelHubScoresCreateRequest { + r.createScore = &createScore + return r +} + +func (r ApiModelHubScoresCreateRequest) Execute() (*ScoreResponse, *http.Response, error) { + return r.ApiService.ModelHubScoresCreateExecute(r) +} + +/* +ModelHubScoresCreate Method for ModelHubScoresCreate + +Create a single score. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubScoresCreateRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresCreate(ctx context.Context) ApiModelHubScoresCreateRequest { + return ApiModelHubScoresCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ScoreResponse +func (a *ModelHubAPIService) ModelHubScoresCreateExecute(r ApiModelHubScoresCreateRequest) (*ScoreResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScoreResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createScore == nil { + return localVarReturnValue, nil, reportError("createScore is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createScore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresDeleteRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubScoresDeleteRequest) Execute() (*ScoreDeleteResponse, *http.Response, error) { + return r.ApiService.ModelHubScoresDeleteExecute(r) +} + +/* +ModelHubScoresDelete Soft-delete a score. + +Only the annotator who created the score or an org Owner/Admin may +delete it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubScoresDeleteRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresDelete(ctx context.Context, id string) ApiModelHubScoresDeleteRequest { + return ApiModelHubScoresDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return ScoreDeleteResponse +func (a *ModelHubAPIService) ModelHubScoresDeleteExecute(r ApiModelHubScoresDeleteRequest) (*ScoreDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScoreDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresForSourceRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + sourceType *string + sourceId *string + page *int32 + limit *int32 +} + +func (r ApiModelHubScoresForSourceRequest) SourceType(sourceType string) ApiModelHubScoresForSourceRequest { + r.sourceType = &sourceType + return r +} + +func (r ApiModelHubScoresForSourceRequest) SourceId(sourceId string) ApiModelHubScoresForSourceRequest { + r.sourceId = &sourceId + return r +} + +// A page number within the paginated result set. +func (r ApiModelHubScoresForSourceRequest) Page(page int32) ApiModelHubScoresForSourceRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubScoresForSourceRequest) Limit(limit int32) ApiModelHubScoresForSourceRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubScoresForSourceRequest) Execute() (*ScoreForSourceResponse, *http.Response, error) { + return r.ApiService.ModelHubScoresForSourceExecute(r) +} + +/* +ModelHubScoresForSource Method for ModelHubScoresForSource + +Get all scores for a specific source. +GET /model-hub/scores/for-source/?source_type=trace&source_id= + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubScoresForSourceRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresForSource(ctx context.Context) ApiModelHubScoresForSourceRequest { + return ApiModelHubScoresForSourceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ScoreForSourceResponse +func (a *ModelHubAPIService) ModelHubScoresForSourceExecute(r ApiModelHubScoresForSourceRequest) (*ScoreForSourceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScoreForSourceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresForSource") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/for-source/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sourceType == nil { + return localVarReturnValue, nil, reportError("sourceType is required and must be specified") + } + if r.sourceId == nil { + return localVarReturnValue, nil, reportError("sourceId is required and must be specified") + } + if strlen(*r.sourceId) < 1 { + return localVarReturnValue, nil, reportError("sourceId must have at least 1 elements") + } + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "source_type", r.sourceType, "form", "") + parameterAddToHeaderOrQuery(localVarQueryParams, "source_id", r.sourceId, "form", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresListRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + page *int32 + limit *int32 + sourceType *string + sourceId *string + labelId *string + annotatorId *string +} + +// A page number within the paginated result set. +func (r ApiModelHubScoresListRequest) Page(page int32) ApiModelHubScoresListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiModelHubScoresListRequest) Limit(limit int32) ApiModelHubScoresListRequest { + r.limit = &limit + return r +} + +func (r ApiModelHubScoresListRequest) SourceType(sourceType string) ApiModelHubScoresListRequest { + r.sourceType = &sourceType + return r +} + +func (r ApiModelHubScoresListRequest) SourceId(sourceId string) ApiModelHubScoresListRequest { + r.sourceId = &sourceId + return r +} + +func (r ApiModelHubScoresListRequest) LabelId(labelId string) ApiModelHubScoresListRequest { + r.labelId = &labelId + return r +} + +func (r ApiModelHubScoresListRequest) AnnotatorId(annotatorId string) ApiModelHubScoresListRequest { + r.annotatorId = &annotatorId + return r +} + +func (r ApiModelHubScoresListRequest) Execute() (*ModelHubScoresList200Response, *http.Response, error) { + return r.ApiService.ModelHubScoresListExecute(r) +} + +/* +ModelHubScoresList Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id= +POST /model-hub/scores/ (single score) +POST /model-hub/scores/bulk/ (multiple scores on one source) +DELETE /model-hub/scores// + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiModelHubScoresListRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresList(ctx context.Context) ApiModelHubScoresListRequest { + return ApiModelHubScoresListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ModelHubScoresList200Response +func (a *ModelHubAPIService) ModelHubScoresListExecute(r ApiModelHubScoresListRequest) (*ModelHubScoresList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ModelHubScoresList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.sourceType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source_type", r.sourceType, "form", "") + } + if r.sourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source_id", r.sourceId, "form", "") + } + if r.labelId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "label_id", r.labelId, "form", "") + } + if r.annotatorId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "annotator_id", r.annotatorId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresPartialUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + score *Score +} + +func (r ApiModelHubScoresPartialUpdateRequest) Score(score Score) ApiModelHubScoresPartialUpdateRequest { + r.score = &score + return r +} + +func (r ApiModelHubScoresPartialUpdateRequest) Execute() (*Score, *http.Response, error) { + return r.ApiService.ModelHubScoresPartialUpdateExecute(r) +} + +/* +ModelHubScoresPartialUpdate Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id= +POST /model-hub/scores/ (single score) +POST /model-hub/scores/bulk/ (multiple scores on one source) +DELETE /model-hub/scores// + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubScoresPartialUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresPartialUpdate(ctx context.Context, id string) ApiModelHubScoresPartialUpdateRequest { + return ApiModelHubScoresPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Score +func (a *ModelHubAPIService) ModelHubScoresPartialUpdateExecute(r ApiModelHubScoresPartialUpdateRequest) (*Score, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Score + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.score == nil { + return localVarReturnValue, nil, reportError("score is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.score + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresReadRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string +} + +func (r ApiModelHubScoresReadRequest) Execute() (*Score, *http.Response, error) { + return r.ApiService.ModelHubScoresReadExecute(r) +} + +/* +ModelHubScoresRead Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id= +POST /model-hub/scores/ (single score) +POST /model-hub/scores/bulk/ (multiple scores on one source) +DELETE /model-hub/scores// + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubScoresReadRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresRead(ctx context.Context, id string) ApiModelHubScoresReadRequest { + return ApiModelHubScoresReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Score +func (a *ModelHubAPIService) ModelHubScoresReadExecute(r ApiModelHubScoresReadRequest) (*Score, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Score + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiModelHubScoresUpdateRequest struct { + ctx context.Context + ApiService *ModelHubAPIService + id string + score *Score +} + +func (r ApiModelHubScoresUpdateRequest) Score(score Score) ApiModelHubScoresUpdateRequest { + r.score = &score + return r +} + +func (r ApiModelHubScoresUpdateRequest) Execute() (*Score, *http.Response, error) { + return r.ApiService.ModelHubScoresUpdateExecute(r) +} + +/* +ModelHubScoresUpdate Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id= +POST /model-hub/scores/ (single score) +POST /model-hub/scores/bulk/ (multiple scores on one source) +DELETE /model-hub/scores// + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiModelHubScoresUpdateRequest +*/ +func (a *ModelHubAPIService) ModelHubScoresUpdate(ctx context.Context, id string) ApiModelHubScoresUpdateRequest { + return ApiModelHubScoresUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Score +func (a *ModelHubAPIService) ModelHubScoresUpdateExecute(r ApiModelHubScoresUpdateRequest) (*Score, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Score + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ModelHubAPIService.ModelHubScoresUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/model-hub/scores/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.score == nil { + return localVarReturnValue, nil, reportError("score is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.score + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_run_tests_eval_configs.go b/go/futureagi/api_run_tests_eval_configs.go new file mode 100644 index 0000000..96af69b --- /dev/null +++ b/go/futureagi/api_run_tests_eval_configs.go @@ -0,0 +1,757 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RunTestsEvalConfigsAPIService RunTestsEvalConfigsAPI service +type RunTestsEvalConfigsAPIService service + +type ApiSimulateRunTestsEvalConfigsCreateRequest struct { + ctx context.Context + ApiService *RunTestsEvalConfigsAPIService + runTestId string + addEvalConfigsRequest *AddEvalConfigsRequest +} + +func (r ApiSimulateRunTestsEvalConfigsCreateRequest) AddEvalConfigsRequest(addEvalConfigsRequest AddEvalConfigsRequest) ApiSimulateRunTestsEvalConfigsCreateRequest { + r.addEvalConfigsRequest = &addEvalConfigsRequest + return r +} + +func (r ApiSimulateRunTestsEvalConfigsCreateRequest) Execute() (*AddEvalConfigsResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsEvalConfigsCreateExecute(r) +} + +/* +SimulateRunTestsEvalConfigsCreate Add evaluation configurations + +Adds evaluation configurations to a test run. Returns 201 with the created configs. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsEvalConfigsCreateRequest +*/ +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsEvalConfigsCreate(ctx context.Context, runTestId string) ApiSimulateRunTestsEvalConfigsCreateRequest { + return ApiSimulateRunTestsEvalConfigsCreateRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return AddEvalConfigsResponse +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsEvalConfigsCreateExecute(r ApiSimulateRunTestsEvalConfigsCreateRequest) (*AddEvalConfigsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AddEvalConfigsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RunTestsEvalConfigsAPIService.SimulateRunTestsEvalConfigsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/eval-configs/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.addEvalConfigsRequest == nil { + return localVarReturnValue, nil, reportError("addEvalConfigsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addEvalConfigsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsEvalConfigsDeleteRequest struct { + ctx context.Context + ApiService *RunTestsEvalConfigsAPIService + runTestId string + evalConfigId string +} + +func (r ApiSimulateRunTestsEvalConfigsDeleteRequest) Execute() (*DeleteEvalConfigResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsEvalConfigsDeleteExecute(r) +} + +/* +SimulateRunTestsEvalConfigsDelete Delete evaluation configuration + +Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @param evalConfigId + @return ApiSimulateRunTestsEvalConfigsDeleteRequest +*/ +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsEvalConfigsDelete(ctx context.Context, runTestId string, evalConfigId string) ApiSimulateRunTestsEvalConfigsDeleteRequest { + return ApiSimulateRunTestsEvalConfigsDeleteRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + evalConfigId: evalConfigId, + } +} + +// Execute executes the request +// +// @return DeleteEvalConfigResponse +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsEvalConfigsDeleteExecute(r ApiSimulateRunTestsEvalConfigsDeleteRequest) (*DeleteEvalConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteEvalConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RunTestsEvalConfigsAPIService.SimulateRunTestsEvalConfigsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_config_id"+"}", url.PathEscape(parameterValueToString(r.evalConfigId, "evalConfigId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsEvalConfigsUpdateCreateRequest struct { + ctx context.Context + ApiService *RunTestsEvalConfigsAPIService + runTestId string + evalConfigId string + evalConfigUpdateRequest *EvalConfigUpdateRequest +} + +func (r ApiSimulateRunTestsEvalConfigsUpdateCreateRequest) EvalConfigUpdateRequest(evalConfigUpdateRequest EvalConfigUpdateRequest) ApiSimulateRunTestsEvalConfigsUpdateCreateRequest { + r.evalConfigUpdateRequest = &evalConfigUpdateRequest + return r +} + +func (r ApiSimulateRunTestsEvalConfigsUpdateCreateRequest) Execute() (*EvalConfigUpdateResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsEvalConfigsUpdateCreateExecute(r) +} + +/* +SimulateRunTestsEvalConfigsUpdateCreate Update evaluation configuration + +Updates an evaluation configuration and optionally triggers a rerun. When run=true, test_execution_id is required. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @param evalConfigId + @return ApiSimulateRunTestsEvalConfigsUpdateCreateRequest +*/ +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsEvalConfigsUpdateCreate(ctx context.Context, runTestId string, evalConfigId string) ApiSimulateRunTestsEvalConfigsUpdateCreateRequest { + return ApiSimulateRunTestsEvalConfigsUpdateCreateRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + evalConfigId: evalConfigId, + } +} + +// Execute executes the request +// +// @return EvalConfigUpdateResponse +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsEvalConfigsUpdateCreateExecute(r ApiSimulateRunTestsEvalConfigsUpdateCreateRequest) (*EvalConfigUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalConfigUpdateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RunTestsEvalConfigsAPIService.SimulateRunTestsEvalConfigsUpdateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_config_id"+"}", url.PathEscape(parameterValueToString(r.evalConfigId, "evalConfigId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalConfigUpdateRequest == nil { + return localVarReturnValue, nil, reportError("evalConfigUpdateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.evalConfigUpdateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsRunNewEvalsCreateRequest struct { + ctx context.Context + ApiService *RunTestsEvalConfigsAPIService + runTestId string + runNewEvalsOnTestExecution *RunNewEvalsOnTestExecution +} + +func (r ApiSimulateRunTestsRunNewEvalsCreateRequest) RunNewEvalsOnTestExecution(runNewEvalsOnTestExecution RunNewEvalsOnTestExecution) ApiSimulateRunTestsRunNewEvalsCreateRequest { + r.runNewEvalsOnTestExecution = &runNewEvalsOnTestExecution + return r +} + +func (r ApiSimulateRunTestsRunNewEvalsCreateRequest) Execute() (*RunNewEvalsResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsRunNewEvalsCreateExecute(r) +} + +/* +SimulateRunTestsRunNewEvalsCreate Run new evaluations on test executions + +Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must be provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsRunNewEvalsCreateRequest +*/ +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsRunNewEvalsCreate(ctx context.Context, runTestId string) ApiSimulateRunTestsRunNewEvalsCreateRequest { + return ApiSimulateRunTestsRunNewEvalsCreateRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunNewEvalsResponse +func (a *RunTestsEvalConfigsAPIService) SimulateRunTestsRunNewEvalsCreateExecute(r ApiSimulateRunTestsRunNewEvalsCreateRequest) (*RunNewEvalsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunNewEvalsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RunTestsEvalConfigsAPIService.SimulateRunTestsRunNewEvalsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/run-new-evals/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.runNewEvalsOnTestExecution == nil { + return localVarReturnValue, nil, reportError("runNewEvalsOnTestExecution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.runNewEvalsOnTestExecution + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_run_tests_eval_summary.go b/go/futureagi/api_run_tests_eval_summary.go new file mode 100644 index 0000000..310b22a --- /dev/null +++ b/go/futureagi/api_run_tests_eval_summary.go @@ -0,0 +1,383 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RunTestsEvalSummaryAPIService RunTestsEvalSummaryAPI service +type RunTestsEvalSummaryAPIService service + +type ApiSimulateRunTestsEvalSummaryComparisonListRequest struct { + ctx context.Context + ApiService *RunTestsEvalSummaryAPIService + runTestId string + executionIds *string +} + +// JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. +func (r ApiSimulateRunTestsEvalSummaryComparisonListRequest) ExecutionIds(executionIds string) ApiSimulateRunTestsEvalSummaryComparisonListRequest { + r.executionIds = &executionIds + return r +} + +func (r ApiSimulateRunTestsEvalSummaryComparisonListRequest) Execute() (*EvalSummaryComparisonResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsEvalSummaryComparisonListExecute(r) +} + +/* +SimulateRunTestsEvalSummaryComparisonList Compare evaluation summaries + +Compares evaluation summary statistics across multiple test executions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsEvalSummaryComparisonListRequest +*/ +func (a *RunTestsEvalSummaryAPIService) SimulateRunTestsEvalSummaryComparisonList(ctx context.Context, runTestId string) ApiSimulateRunTestsEvalSummaryComparisonListRequest { + return ApiSimulateRunTestsEvalSummaryComparisonListRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return EvalSummaryComparisonResponse +func (a *RunTestsEvalSummaryAPIService) SimulateRunTestsEvalSummaryComparisonListExecute(r ApiSimulateRunTestsEvalSummaryComparisonListRequest) (*EvalSummaryComparisonResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalSummaryComparisonResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RunTestsEvalSummaryAPIService.SimulateRunTestsEvalSummaryComparisonList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/eval-summary-comparison/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.executionIds == nil { + return localVarReturnValue, nil, reportError("executionIds is required and must be specified") + } + if strlen(*r.executionIds) < 1 { + return localVarReturnValue, nil, reportError("executionIds must have at least 1 elements") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_ids", r.executionIds, "form", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsEvalSummaryListRequest struct { + ctx context.Context + ApiService *RunTestsEvalSummaryAPIService + runTestId string + executionId *string +} + +// UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. +func (r ApiSimulateRunTestsEvalSummaryListRequest) ExecutionId(executionId string) ApiSimulateRunTestsEvalSummaryListRequest { + r.executionId = &executionId + return r +} + +func (r ApiSimulateRunTestsEvalSummaryListRequest) Execute() (*EvalSummaryResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsEvalSummaryListExecute(r) +} + +/* +SimulateRunTestsEvalSummaryList Get evaluation summary + +Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsEvalSummaryListRequest +*/ +func (a *RunTestsEvalSummaryAPIService) SimulateRunTestsEvalSummaryList(ctx context.Context, runTestId string) ApiSimulateRunTestsEvalSummaryListRequest { + return ApiSimulateRunTestsEvalSummaryListRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return EvalSummaryResponse +func (a *RunTestsEvalSummaryAPIService) SimulateRunTestsEvalSummaryListExecute(r ApiSimulateRunTestsEvalSummaryListRequest) (*EvalSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RunTestsEvalSummaryAPIService.SimulateRunTestsEvalSummaryList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/eval-summary/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.executionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_id", r.executionId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_scenarios.go b/go/futureagi/api_scenarios.go new file mode 100644 index 0000000..a100ae6 --- /dev/null +++ b/go/futureagi/api_scenarios.go @@ -0,0 +1,785 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ScenariosAPIService ScenariosAPI service +type ScenariosAPIService service + +type ApiSimulateScenariosAddColumnsCreateRequest struct { + ctx context.Context + ApiService *ScenariosAPIService + scenarioId string + scenarioAddColumnsRequest *ScenarioAddColumnsRequest +} + +func (r ApiSimulateScenariosAddColumnsCreateRequest) ScenarioAddColumnsRequest(scenarioAddColumnsRequest ScenarioAddColumnsRequest) ApiSimulateScenariosAddColumnsCreateRequest { + r.scenarioAddColumnsRequest = &scenarioAddColumnsRequest + return r +} + +func (r ApiSimulateScenariosAddColumnsCreateRequest) Execute() (*ScenarioAddColumnsResponse, *http.Response, error) { + return r.ApiService.SimulateScenariosAddColumnsCreateExecute(r) +} + +/* +SimulateScenariosAddColumnsCreate Add columns to scenario + +Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scenarioId + @return ApiSimulateScenariosAddColumnsCreateRequest +*/ +func (a *ScenariosAPIService) SimulateScenariosAddColumnsCreate(ctx context.Context, scenarioId string) ApiSimulateScenariosAddColumnsCreateRequest { + return ApiSimulateScenariosAddColumnsCreateRequest{ + ApiService: a, + ctx: ctx, + scenarioId: scenarioId, + } +} + +// Execute executes the request +// +// @return ScenarioAddColumnsResponse +func (a *ScenariosAPIService) SimulateScenariosAddColumnsCreateExecute(r ApiSimulateScenariosAddColumnsCreateRequest) (*ScenarioAddColumnsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioAddColumnsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ScenariosAPIService.SimulateScenariosAddColumnsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/{scenario_id}/add-columns/" + localVarPath = strings.Replace(localVarPath, "{"+"scenario_id"+"}", url.PathEscape(parameterValueToString(r.scenarioId, "scenarioId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scenarioAddColumnsRequest == nil { + return localVarReturnValue, nil, reportError("scenarioAddColumnsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.scenarioAddColumnsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateScenariosAddRowsCreateRequest struct { + ctx context.Context + ApiService *ScenariosAPIService + scenarioId string + scenarioAddRowsRequest *ScenarioAddRowsRequest +} + +func (r ApiSimulateScenariosAddRowsCreateRequest) ScenarioAddRowsRequest(scenarioAddRowsRequest ScenarioAddRowsRequest) ApiSimulateScenariosAddRowsCreateRequest { + r.scenarioAddRowsRequest = &scenarioAddRowsRequest + return r +} + +func (r ApiSimulateScenariosAddRowsCreateRequest) Execute() (*ScenarioAddRowsResponse, *http.Response, error) { + return r.ApiService.SimulateScenariosAddRowsCreateExecute(r) +} + +/* +SimulateScenariosAddRowsCreate Add rows to scenario + +Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scenarioId + @return ApiSimulateScenariosAddRowsCreateRequest +*/ +func (a *ScenariosAPIService) SimulateScenariosAddRowsCreate(ctx context.Context, scenarioId string) ApiSimulateScenariosAddRowsCreateRequest { + return ApiSimulateScenariosAddRowsCreateRequest{ + ApiService: a, + ctx: ctx, + scenarioId: scenarioId, + } +} + +// Execute executes the request +// +// @return ScenarioAddRowsResponse +func (a *ScenariosAPIService) SimulateScenariosAddRowsCreateExecute(r ApiSimulateScenariosAddRowsCreateRequest) (*ScenarioAddRowsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioAddRowsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ScenariosAPIService.SimulateScenariosAddRowsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/{scenario_id}/add-rows/" + localVarPath = strings.Replace(localVarPath, "{"+"scenario_id"+"}", url.PathEscape(parameterValueToString(r.scenarioId, "scenarioId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scenarioAddRowsRequest == nil { + return localVarReturnValue, nil, reportError("scenarioAddRowsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.scenarioAddRowsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateScenariosGetColumnsListRequest struct { + ctx context.Context + ApiService *ScenariosAPIService + search *string + agentDefinitionId *string + agentType *string + page *int32 + limit *int32 +} + +func (r ApiSimulateScenariosGetColumnsListRequest) Search(search string) ApiSimulateScenariosGetColumnsListRequest { + r.search = &search + return r +} + +func (r ApiSimulateScenariosGetColumnsListRequest) AgentDefinitionId(agentDefinitionId string) ApiSimulateScenariosGetColumnsListRequest { + r.agentDefinitionId = &agentDefinitionId + return r +} + +func (r ApiSimulateScenariosGetColumnsListRequest) AgentType(agentType string) ApiSimulateScenariosGetColumnsListRequest { + r.agentType = &agentType + return r +} + +func (r ApiSimulateScenariosGetColumnsListRequest) Page(page int32) ApiSimulateScenariosGetColumnsListRequest { + r.page = &page + return r +} + +func (r ApiSimulateScenariosGetColumnsListRequest) Limit(limit int32) ApiSimulateScenariosGetColumnsListRequest { + r.limit = &limit + return r +} + +func (r ApiSimulateScenariosGetColumnsListRequest) Execute() (*ScenarioListResponse, *http.Response, error) { + return r.ApiService.SimulateScenariosGetColumnsListExecute(r) +} + +/* +SimulateScenariosGetColumnsList List scenarios + +Returns a paginated list of scenarios for the user's organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateScenariosGetColumnsListRequest +*/ +func (a *ScenariosAPIService) SimulateScenariosGetColumnsList(ctx context.Context) ApiSimulateScenariosGetColumnsListRequest { + return ApiSimulateScenariosGetColumnsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ScenarioListResponse +func (a *ScenariosAPIService) SimulateScenariosGetColumnsListExecute(r ApiSimulateScenariosGetColumnsListRequest) (*ScenarioListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ScenariosAPIService.SimulateScenariosGetColumnsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/get-columns/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.agentDefinitionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "agent_definition_id", r.agentDefinitionId, "form", "") + } + if r.agentType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "agent_type", r.agentType, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateScenariosPromptsUpdateRequest struct { + ctx context.Context + ApiService *ScenariosAPIService + scenarioId string + scenarioEditPromptsRequest *ScenarioEditPromptsRequest +} + +func (r ApiSimulateScenariosPromptsUpdateRequest) ScenarioEditPromptsRequest(scenarioEditPromptsRequest ScenarioEditPromptsRequest) ApiSimulateScenariosPromptsUpdateRequest { + r.scenarioEditPromptsRequest = &scenarioEditPromptsRequest + return r +} + +func (r ApiSimulateScenariosPromptsUpdateRequest) Execute() (*ScenarioPromptsUpdateResponse, *http.Response, error) { + return r.ApiService.SimulateScenariosPromptsUpdateExecute(r) +} + +/* +SimulateScenariosPromptsUpdate Edit scenario prompts + +Updates the simulator agent prompt for a scenario. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scenarioId + @return ApiSimulateScenariosPromptsUpdateRequest +*/ +func (a *ScenariosAPIService) SimulateScenariosPromptsUpdate(ctx context.Context, scenarioId string) ApiSimulateScenariosPromptsUpdateRequest { + return ApiSimulateScenariosPromptsUpdateRequest{ + ApiService: a, + ctx: ctx, + scenarioId: scenarioId, + } +} + +// Execute executes the request +// +// @return ScenarioPromptsUpdateResponse +func (a *ScenariosAPIService) SimulateScenariosPromptsUpdateExecute(r ApiSimulateScenariosPromptsUpdateRequest) (*ScenarioPromptsUpdateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioPromptsUpdateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ScenariosAPIService.SimulateScenariosPromptsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/{scenario_id}/prompts/" + localVarPath = strings.Replace(localVarPath, "{"+"scenario_id"+"}", url.PathEscape(parameterValueToString(r.scenarioId, "scenarioId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scenarioEditPromptsRequest == nil { + return localVarReturnValue, nil, reportError("scenarioEditPromptsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.scenarioEditPromptsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_sdk.go b/go/futureagi/api_sdk.go new file mode 100644 index 0000000..d928e82 --- /dev/null +++ b/go/futureagi/api_sdk.go @@ -0,0 +1,1345 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SdkAPIService SdkAPI service +type SdkAPIService service + +type ApiSdkApiV1ConfigureEvaluationsCreateRequest struct { + ctx context.Context + ApiService *SdkAPIService + sDKConfigureEvaluationsRequest *SDKConfigureEvaluationsRequest +} + +func (r ApiSdkApiV1ConfigureEvaluationsCreateRequest) SDKConfigureEvaluationsRequest(sDKConfigureEvaluationsRequest SDKConfigureEvaluationsRequest) ApiSdkApiV1ConfigureEvaluationsCreateRequest { + r.sDKConfigureEvaluationsRequest = &sDKConfigureEvaluationsRequest + return r +} + +func (r ApiSdkApiV1ConfigureEvaluationsCreateRequest) Execute() (*SDKConfigureEvaluationsResponse, *http.Response, error) { + return r.ApiService.SdkApiV1ConfigureEvaluationsCreateExecute(r) +} + +/* +SdkApiV1ConfigureEvaluationsCreate Method for SdkApiV1ConfigureEvaluationsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSdkApiV1ConfigureEvaluationsCreateRequest +*/ +func (a *SdkAPIService) SdkApiV1ConfigureEvaluationsCreate(ctx context.Context) ApiSdkApiV1ConfigureEvaluationsCreateRequest { + return ApiSdkApiV1ConfigureEvaluationsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKConfigureEvaluationsResponse +func (a *SdkAPIService) SdkApiV1ConfigureEvaluationsCreateExecute(r ApiSdkApiV1ConfigureEvaluationsCreateRequest) (*SDKConfigureEvaluationsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKConfigureEvaluationsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1ConfigureEvaluationsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/configure-evaluations/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sDKConfigureEvaluationsRequest == nil { + return localVarReturnValue, nil, reportError("sDKConfigureEvaluationsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.sDKConfigureEvaluationsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSdkApiV1EvalCreateRequest struct { + ctx context.Context + ApiService *SdkAPIService + sDKStandaloneEvalRequest *SDKStandaloneEvalRequest +} + +func (r ApiSdkApiV1EvalCreateRequest) SDKStandaloneEvalRequest(sDKStandaloneEvalRequest SDKStandaloneEvalRequest) ApiSdkApiV1EvalCreateRequest { + r.sDKStandaloneEvalRequest = &sDKStandaloneEvalRequest + return r +} + +func (r ApiSdkApiV1EvalCreateRequest) Execute() (*SDKStandaloneEvalResponse, *http.Response, error) { + return r.ApiService.SdkApiV1EvalCreateExecute(r) +} + +/* +SdkApiV1EvalCreate Method for SdkApiV1EvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSdkApiV1EvalCreateRequest +*/ +func (a *SdkAPIService) SdkApiV1EvalCreate(ctx context.Context) ApiSdkApiV1EvalCreateRequest { + return ApiSdkApiV1EvalCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKStandaloneEvalResponse +func (a *SdkAPIService) SdkApiV1EvalCreateExecute(r ApiSdkApiV1EvalCreateRequest) (*SDKStandaloneEvalResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKStandaloneEvalResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1EvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/eval/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sDKStandaloneEvalRequest == nil { + return localVarReturnValue, nil, reportError("sDKStandaloneEvalRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.sDKStandaloneEvalRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSdkApiV1EvalReadRequest struct { + ctx context.Context + ApiService *SdkAPIService + evalId string +} + +func (r ApiSdkApiV1EvalReadRequest) Execute() (*SDKEvalTemplateResponse, *http.Response, error) { + return r.ApiService.SdkApiV1EvalReadExecute(r) +} + +/* +SdkApiV1EvalRead Method for SdkApiV1EvalRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param evalId + @return ApiSdkApiV1EvalReadRequest +*/ +func (a *SdkAPIService) SdkApiV1EvalRead(ctx context.Context, evalId string) ApiSdkApiV1EvalReadRequest { + return ApiSdkApiV1EvalReadRequest{ + ApiService: a, + ctx: ctx, + evalId: evalId, + } +} + +// Execute executes the request +// +// @return SDKEvalTemplateResponse +func (a *SdkAPIService) SdkApiV1EvalReadExecute(r ApiSdkApiV1EvalReadRequest) (*SDKEvalTemplateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKEvalTemplateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1EvalRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/eval/{eval_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"eval_id"+"}", url.PathEscape(parameterValueToString(r.evalId, "evalId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSdkApiV1EvaluatePipelineCreateRequest struct { + ctx context.Context + ApiService *SdkAPIService + cICDJob *CICDJob +} + +func (r ApiSdkApiV1EvaluatePipelineCreateRequest) CICDJob(cICDJob CICDJob) ApiSdkApiV1EvaluatePipelineCreateRequest { + r.cICDJob = &cICDJob + return r +} + +func (r ApiSdkApiV1EvaluatePipelineCreateRequest) Execute() (*SDKCICDEvaluationRunAcceptedResponse, *http.Response, error) { + return r.ApiService.SdkApiV1EvaluatePipelineCreateExecute(r) +} + +/* +SdkApiV1EvaluatePipelineCreate Method for SdkApiV1EvaluatePipelineCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSdkApiV1EvaluatePipelineCreateRequest +*/ +func (a *SdkAPIService) SdkApiV1EvaluatePipelineCreate(ctx context.Context) ApiSdkApiV1EvaluatePipelineCreateRequest { + return ApiSdkApiV1EvaluatePipelineCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKCICDEvaluationRunAcceptedResponse +func (a *SdkAPIService) SdkApiV1EvaluatePipelineCreateExecute(r ApiSdkApiV1EvaluatePipelineCreateRequest) (*SDKCICDEvaluationRunAcceptedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKCICDEvaluationRunAcceptedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1EvaluatePipelineCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/evaluate-pipeline/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cICDJob == nil { + return localVarReturnValue, nil, reportError("cICDJob is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cICDJob + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSdkApiV1EvaluatePipelineListRequest struct { + ctx context.Context + ApiService *SdkAPIService + projectName *string + versions *string +} + +func (r ApiSdkApiV1EvaluatePipelineListRequest) ProjectName(projectName string) ApiSdkApiV1EvaluatePipelineListRequest { + r.projectName = &projectName + return r +} + +func (r ApiSdkApiV1EvaluatePipelineListRequest) Versions(versions string) ApiSdkApiV1EvaluatePipelineListRequest { + r.versions = &versions + return r +} + +func (r ApiSdkApiV1EvaluatePipelineListRequest) Execute() (*SDKCICDEvaluationRunsResponse, *http.Response, error) { + return r.ApiService.SdkApiV1EvaluatePipelineListExecute(r) +} + +/* +SdkApiV1EvaluatePipelineList Method for SdkApiV1EvaluatePipelineList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSdkApiV1EvaluatePipelineListRequest +*/ +func (a *SdkAPIService) SdkApiV1EvaluatePipelineList(ctx context.Context) ApiSdkApiV1EvaluatePipelineListRequest { + return ApiSdkApiV1EvaluatePipelineListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKCICDEvaluationRunsResponse +func (a *SdkAPIService) SdkApiV1EvaluatePipelineListExecute(r ApiSdkApiV1EvaluatePipelineListRequest) (*SDKCICDEvaluationRunsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKCICDEvaluationRunsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1EvaluatePipelineList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/evaluate-pipeline/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectName == nil { + return localVarReturnValue, nil, reportError("projectName is required and must be specified") + } + if strlen(*r.projectName) < 1 { + return localVarReturnValue, nil, reportError("projectName must have at least 1 elements") + } + if r.versions == nil { + return localVarReturnValue, nil, reportError("versions is required and must be specified") + } + if strlen(*r.versions) < 1 { + return localVarReturnValue, nil, reportError("versions must have at least 1 elements") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "project_name", r.projectName, "form", "") + parameterAddToHeaderOrQuery(localVarQueryParams, "versions", r.versions, "form", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSdkApiV1GetEvalsListRequest struct { + ctx context.Context + ApiService *SdkAPIService +} + +func (r ApiSdkApiV1GetEvalsListRequest) Execute() (*SDKGetEvalsResponse, *http.Response, error) { + return r.ApiService.SdkApiV1GetEvalsListExecute(r) +} + +/* +SdkApiV1GetEvalsList Method for SdkApiV1GetEvalsList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSdkApiV1GetEvalsListRequest +*/ +func (a *SdkAPIService) SdkApiV1GetEvalsList(ctx context.Context) ApiSdkApiV1GetEvalsListRequest { + return ApiSdkApiV1GetEvalsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKGetEvalsResponse +func (a *SdkAPIService) SdkApiV1GetEvalsListExecute(r ApiSdkApiV1GetEvalsListRequest) (*SDKGetEvalsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKGetEvalsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1GetEvalsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/get-evals/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSdkApiV1NewEvalCreateRequest struct { + ctx context.Context + ApiService *SdkAPIService + sDKStandaloneEvalV2Request *SDKStandaloneEvalV2Request +} + +func (r ApiSdkApiV1NewEvalCreateRequest) SDKStandaloneEvalV2Request(sDKStandaloneEvalV2Request SDKStandaloneEvalV2Request) ApiSdkApiV1NewEvalCreateRequest { + r.sDKStandaloneEvalV2Request = &sDKStandaloneEvalV2Request + return r +} + +func (r ApiSdkApiV1NewEvalCreateRequest) Execute() (*SDKStandaloneEvalResponse, *http.Response, error) { + return r.ApiService.SdkApiV1NewEvalCreateExecute(r) +} + +/* +SdkApiV1NewEvalCreate Method for SdkApiV1NewEvalCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSdkApiV1NewEvalCreateRequest +*/ +func (a *SdkAPIService) SdkApiV1NewEvalCreate(ctx context.Context) ApiSdkApiV1NewEvalCreateRequest { + return ApiSdkApiV1NewEvalCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKStandaloneEvalResponse +func (a *SdkAPIService) SdkApiV1NewEvalCreateExecute(r ApiSdkApiV1NewEvalCreateRequest) (*SDKStandaloneEvalResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKStandaloneEvalResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1NewEvalCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/new-eval/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sDKStandaloneEvalV2Request == nil { + return localVarReturnValue, nil, reportError("sDKStandaloneEvalV2Request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.sDKStandaloneEvalV2Request + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSdkApiV1NewEvalListRequest struct { + ctx context.Context + ApiService *SdkAPIService + evalId *string +} + +func (r ApiSdkApiV1NewEvalListRequest) EvalId(evalId string) ApiSdkApiV1NewEvalListRequest { + r.evalId = &evalId + return r +} + +func (r ApiSdkApiV1NewEvalListRequest) Execute() (*SDKStandaloneEvalV2Response, *http.Response, error) { + return r.ApiService.SdkApiV1NewEvalListExecute(r) +} + +/* +SdkApiV1NewEvalList Method for SdkApiV1NewEvalList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSdkApiV1NewEvalListRequest +*/ +func (a *SdkAPIService) SdkApiV1NewEvalList(ctx context.Context) ApiSdkApiV1NewEvalListRequest { + return ApiSdkApiV1NewEvalListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKStandaloneEvalV2Response +func (a *SdkAPIService) SdkApiV1NewEvalListExecute(r ApiSdkApiV1NewEvalListRequest) (*SDKStandaloneEvalV2Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKStandaloneEvalV2Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SdkAPIService.SdkApiV1NewEvalList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/new-eval/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.evalId == nil { + return localVarReturnValue, nil, reportError("evalId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "eval_id", r.evalId, "form", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_simulate.go b/go/futureagi/api_simulate.go new file mode 100644 index 0000000..175a96c --- /dev/null +++ b/go/futureagi/api_simulate.go @@ -0,0 +1,10070 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" + "strings" +) + +// SimulateAPIService SimulateAPI service +type SimulateAPIService service + +type ApiSimulateAgentDefinitionsDeleteRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentDefinitionBulkDeleteRequest *AgentDefinitionBulkDeleteRequest +} + +func (r ApiSimulateAgentDefinitionsDeleteRequest) AgentDefinitionBulkDeleteRequest(agentDefinitionBulkDeleteRequest AgentDefinitionBulkDeleteRequest) ApiSimulateAgentDefinitionsDeleteRequest { + r.agentDefinitionBulkDeleteRequest = &agentDefinitionBulkDeleteRequest + return r +} + +func (r ApiSimulateAgentDefinitionsDeleteRequest) Execute() (*AgentDefinitionBulkDeleteResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsDeleteExecute(r) +} + +/* +SimulateAgentDefinitionsDelete Method for SimulateAgentDefinitionsDelete + +Bulk soft-delete agent definitions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateAgentDefinitionsDeleteRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsDelete(ctx context.Context) ApiSimulateAgentDefinitionsDeleteRequest { + return ApiSimulateAgentDefinitionsDeleteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AgentDefinitionBulkDeleteResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsDeleteExecute(r ApiSimulateAgentDefinitionsDeleteRequest) (*AgentDefinitionBulkDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentDefinitionBulkDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.agentDefinitionBulkDeleteRequest == nil { + return localVarReturnValue, nil, reportError("agentDefinitionBulkDeleteRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.agentDefinitionBulkDeleteRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsActivateCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + versionId string + body *map[string]interface{} +} + +func (r ApiSimulateAgentDefinitionsVersionsActivateCreateRequest) Body(body map[string]interface{}) ApiSimulateAgentDefinitionsVersionsActivateCreateRequest { + r.body = &body + return r +} + +func (r ApiSimulateAgentDefinitionsVersionsActivateCreateRequest) Execute() (*AgentVersionActivateResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsActivateCreateExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsActivateCreate Method for SimulateAgentDefinitionsVersionsActivateCreate + +Activate a specific agent version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @param versionId + @return ApiSimulateAgentDefinitionsVersionsActivateCreateRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsActivateCreate(ctx context.Context, agentId string, versionId string) ApiSimulateAgentDefinitionsVersionsActivateCreateRequest { + return ApiSimulateAgentDefinitionsVersionsActivateCreateRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return AgentVersionActivateResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsActivateCreateExecute(r ApiSimulateAgentDefinitionsVersionsActivateCreateRequest) (*AgentVersionActivateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentVersionActivateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsActivateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsCallExecutionsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + versionId string +} + +func (r ApiSimulateAgentDefinitionsVersionsCallExecutionsListRequest) Execute() ([]CallExecution, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsCallExecutionsListExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsCallExecutionsList Method for SimulateAgentDefinitionsVersionsCallExecutionsList + +Get the call executions of an agent version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @param versionId + @return ApiSimulateAgentDefinitionsVersionsCallExecutionsListRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsCallExecutionsList(ctx context.Context, agentId string, versionId string) ApiSimulateAgentDefinitionsVersionsCallExecutionsListRequest { + return ApiSimulateAgentDefinitionsVersionsCallExecutionsListRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return []CallExecution +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsCallExecutionsListExecute(r ApiSimulateAgentDefinitionsVersionsCallExecutionsListRequest) ([]CallExecution, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CallExecution + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsCallExecutionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsCreateCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + agentVersionCreateRequest *AgentVersionCreateRequest +} + +func (r ApiSimulateAgentDefinitionsVersionsCreateCreateRequest) AgentVersionCreateRequest(agentVersionCreateRequest AgentVersionCreateRequest) ApiSimulateAgentDefinitionsVersionsCreateCreateRequest { + r.agentVersionCreateRequest = &agentVersionCreateRequest + return r +} + +func (r ApiSimulateAgentDefinitionsVersionsCreateCreateRequest) Execute() (*AgentVersionCreateResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsCreateCreateExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsCreateCreate Method for SimulateAgentDefinitionsVersionsCreateCreate + +Create a new version of an agent definition. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiSimulateAgentDefinitionsVersionsCreateCreateRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsCreateCreate(ctx context.Context, agentId string) ApiSimulateAgentDefinitionsVersionsCreateCreateRequest { + return ApiSimulateAgentDefinitionsVersionsCreateCreateRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return AgentVersionCreateResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsCreateCreateExecute(r ApiSimulateAgentDefinitionsVersionsCreateCreateRequest) (*AgentVersionCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentVersionCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsCreateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/create/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.agentVersionCreateRequest == nil { + return localVarReturnValue, nil, reportError("agentVersionCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.agentVersionCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsDeleteDeleteRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + versionId string +} + +func (r ApiSimulateAgentDefinitionsVersionsDeleteDeleteRequest) Execute() (*AgentVersionDeleteResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsDeleteDeleteExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsDeleteDelete Method for SimulateAgentDefinitionsVersionsDeleteDelete + +Soft delete an agent version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @param versionId + @return ApiSimulateAgentDefinitionsVersionsDeleteDeleteRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsDeleteDelete(ctx context.Context, agentId string, versionId string) ApiSimulateAgentDefinitionsVersionsDeleteDeleteRequest { + return ApiSimulateAgentDefinitionsVersionsDeleteDeleteRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return AgentVersionDeleteResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsDeleteDeleteExecute(r ApiSimulateAgentDefinitionsVersionsDeleteDeleteRequest) (*AgentVersionDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentVersionDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsDeleteDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsEvalSummaryListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + versionId string +} + +func (r ApiSimulateAgentDefinitionsVersionsEvalSummaryListRequest) Execute() (*EvalSummaryResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsEvalSummaryListExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsEvalSummaryList Method for SimulateAgentDefinitionsVersionsEvalSummaryList + +Get the eval summary of an agent version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @param versionId + @return ApiSimulateAgentDefinitionsVersionsEvalSummaryListRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsEvalSummaryList(ctx context.Context, agentId string, versionId string) ApiSimulateAgentDefinitionsVersionsEvalSummaryListRequest { + return ApiSimulateAgentDefinitionsVersionsEvalSummaryListRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return EvalSummaryResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsEvalSummaryListExecute(r ApiSimulateAgentDefinitionsVersionsEvalSummaryListRequest) (*EvalSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsEvalSummaryList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string +} + +func (r ApiSimulateAgentDefinitionsVersionsListRequest) Execute() ([]AgentVersionListResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsListExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsList Method for SimulateAgentDefinitionsVersionsList + +Get all versions of a specific agent definition. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiSimulateAgentDefinitionsVersionsListRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsList(ctx context.Context, agentId string) ApiSimulateAgentDefinitionsVersionsListRequest { + return ApiSimulateAgentDefinitionsVersionsListRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return []AgentVersionListResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsListExecute(r ApiSimulateAgentDefinitionsVersionsListRequest) ([]AgentVersionListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AgentVersionListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsReadRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + versionId string +} + +func (r ApiSimulateAgentDefinitionsVersionsReadRequest) Execute() (*AgentVersionResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsReadExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsRead Method for SimulateAgentDefinitionsVersionsRead + +Get details of a specific agent version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @param versionId + @return ApiSimulateAgentDefinitionsVersionsReadRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsRead(ctx context.Context, agentId string, versionId string) ApiSimulateAgentDefinitionsVersionsReadRequest { + return ApiSimulateAgentDefinitionsVersionsReadRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return AgentVersionResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsReadExecute(r ApiSimulateAgentDefinitionsVersionsReadRequest) (*AgentVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + versionId string + body *map[string]interface{} +} + +func (r ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest) Body(body map[string]interface{}) ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest { + r.body = &body + return r +} + +func (r ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest) Execute() (*AgentVersionRestoreResponse, *http.Response, error) { + return r.ApiService.SimulateAgentDefinitionsVersionsRestoreCreateExecute(r) +} + +/* +SimulateAgentDefinitionsVersionsRestoreCreate Method for SimulateAgentDefinitionsVersionsRestoreCreate + +Restore agent definition from a specific version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @param versionId + @return ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest +*/ +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsRestoreCreate(ctx context.Context, agentId string, versionId string) ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest { + return ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + versionId: versionId, + } +} + +// Execute executes the request +// +// @return AgentVersionRestoreResponse +func (a *SimulateAPIService) SimulateAgentDefinitionsVersionsRestoreCreateExecute(r ApiSimulateAgentDefinitionsVersionsRestoreCreateRequest) (*AgentVersionRestoreResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentVersionRestoreResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateAgentDefinitionsVersionsRestoreCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiCallExecutionsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + search *string + status *string + testExecutionId *string + page *int32 + limit *int32 +} + +func (r ApiSimulateApiCallExecutionsListRequest) Search(search string) ApiSimulateApiCallExecutionsListRequest { + r.search = &search + return r +} + +func (r ApiSimulateApiCallExecutionsListRequest) Status(status string) ApiSimulateApiCallExecutionsListRequest { + r.status = &status + return r +} + +func (r ApiSimulateApiCallExecutionsListRequest) TestExecutionId(testExecutionId string) ApiSimulateApiCallExecutionsListRequest { + r.testExecutionId = &testExecutionId + return r +} + +func (r ApiSimulateApiCallExecutionsListRequest) Page(page int32) ApiSimulateApiCallExecutionsListRequest { + r.page = &page + return r +} + +func (r ApiSimulateApiCallExecutionsListRequest) Limit(limit int32) ApiSimulateApiCallExecutionsListRequest { + r.limit = &limit + return r +} + +func (r ApiSimulateApiCallExecutionsListRequest) Execute() ([]CallExecution, *http.Response, error) { + return r.ApiService.SimulateApiCallExecutionsListExecute(r) +} + +/* +SimulateApiCallExecutionsList Method for SimulateApiCallExecutionsList + +Get paginated list of call executions for the user's organization +Query Parameters: +- search: search string to filter call executions by phone number or scenario name +- status: filter by call status +- test_execution_id: filter by specific test execution +- limit: number of items per page (default: 10) +- page: page number (default: 1) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateApiCallExecutionsListRequest +*/ +func (a *SimulateAPIService) SimulateApiCallExecutionsList(ctx context.Context) ApiSimulateApiCallExecutionsListRequest { + return ApiSimulateApiCallExecutionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []CallExecution +func (a *SimulateAPIService) SimulateApiCallExecutionsListExecute(r ApiSimulateApiCallExecutionsListRequest) ([]CallExecution, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CallExecution + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiCallExecutionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/call-executions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } else { + var defaultValue string = "" + r.status = &defaultValue + } + if r.testExecutionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "test_execution_id", r.testExecutionId, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiPersonasDuplicateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + id string + personaDuplicateRequest *PersonaDuplicateRequest +} + +func (r ApiSimulateApiPersonasDuplicateRequest) PersonaDuplicateRequest(personaDuplicateRequest PersonaDuplicateRequest) ApiSimulateApiPersonasDuplicateRequest { + r.personaDuplicateRequest = &personaDuplicateRequest + return r +} + +func (r ApiSimulateApiPersonasDuplicateRequest) Execute() (*PersonaDuplicateResponse, *http.Response, error) { + return r.ApiService.SimulateApiPersonasDuplicateExecute(r) +} + +/* +SimulateApiPersonasDuplicate Method for SimulateApiPersonasDuplicate + +Duplicate a persona (creates a workspace-level copy) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiSimulateApiPersonasDuplicateRequest +*/ +func (a *SimulateAPIService) SimulateApiPersonasDuplicate(ctx context.Context, id string) ApiSimulateApiPersonasDuplicateRequest { + return ApiSimulateApiPersonasDuplicateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return PersonaDuplicateResponse +func (a *SimulateAPIService) SimulateApiPersonasDuplicateExecute(r ApiSimulateApiPersonasDuplicateRequest) (*PersonaDuplicateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PersonaDuplicateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiPersonasDuplicate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/{id}/duplicate/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.personaDuplicateRequest == nil { + return localVarReturnValue, nil, reportError("personaDuplicateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.personaDuplicateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiPersonasDuplicateCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + personaId string + personaDuplicateRequest *PersonaDuplicateRequest +} + +func (r ApiSimulateApiPersonasDuplicateCreateRequest) PersonaDuplicateRequest(personaDuplicateRequest PersonaDuplicateRequest) ApiSimulateApiPersonasDuplicateCreateRequest { + r.personaDuplicateRequest = &personaDuplicateRequest + return r +} + +func (r ApiSimulateApiPersonasDuplicateCreateRequest) Execute() (*PersonaDuplicateResponse, *http.Response, error) { + return r.ApiService.SimulateApiPersonasDuplicateCreateExecute(r) +} + +/* +SimulateApiPersonasDuplicateCreate Method for SimulateApiPersonasDuplicateCreate + +Duplicate a persona by ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param personaId + @return ApiSimulateApiPersonasDuplicateCreateRequest +*/ +func (a *SimulateAPIService) SimulateApiPersonasDuplicateCreate(ctx context.Context, personaId string) ApiSimulateApiPersonasDuplicateCreateRequest { + return ApiSimulateApiPersonasDuplicateCreateRequest{ + ApiService: a, + ctx: ctx, + personaId: personaId, + } +} + +// Execute executes the request +// +// @return PersonaDuplicateResponse +func (a *SimulateAPIService) SimulateApiPersonasDuplicateCreateExecute(r ApiSimulateApiPersonasDuplicateCreateRequest) (*PersonaDuplicateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PersonaDuplicateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiPersonasDuplicateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/duplicate/{persona_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"persona_id"+"}", url.PathEscape(parameterValueToString(r.personaId, "personaId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.personaDuplicateRequest == nil { + return localVarReturnValue, nil, reportError("personaDuplicateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.personaDuplicateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiPersonasFieldOptionsRequest struct { + ctx context.Context + ApiService *SimulateAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiSimulateApiPersonasFieldOptionsRequest) Page(page int32) ApiSimulateApiPersonasFieldOptionsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiSimulateApiPersonasFieldOptionsRequest) Limit(limit int32) ApiSimulateApiPersonasFieldOptionsRequest { + r.limit = &limit + return r +} + +func (r ApiSimulateApiPersonasFieldOptionsRequest) Execute() (*SimulateApiPersonasFieldOptions200Response, *http.Response, error) { + return r.ApiService.SimulateApiPersonasFieldOptionsExecute(r) +} + +/* +SimulateApiPersonasFieldOptions Method for SimulateApiPersonasFieldOptions + +Get field options/choices for persona creation + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateApiPersonasFieldOptionsRequest +*/ +func (a *SimulateAPIService) SimulateApiPersonasFieldOptions(ctx context.Context) ApiSimulateApiPersonasFieldOptionsRequest { + return ApiSimulateApiPersonasFieldOptionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SimulateApiPersonasFieldOptions200Response +func (a *SimulateAPIService) SimulateApiPersonasFieldOptionsExecute(r ApiSimulateApiPersonasFieldOptionsRequest) (*SimulateApiPersonasFieldOptions200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulateApiPersonasFieldOptions200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiPersonasFieldOptions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/field-options/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiPersonasSystemPersonasRequest struct { + ctx context.Context + ApiService *SimulateAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiSimulateApiPersonasSystemPersonasRequest) Page(page int32) ApiSimulateApiPersonasSystemPersonasRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiSimulateApiPersonasSystemPersonasRequest) Limit(limit int32) ApiSimulateApiPersonasSystemPersonasRequest { + r.limit = &limit + return r +} + +func (r ApiSimulateApiPersonasSystemPersonasRequest) Execute() (*SimulateApiPersonasSystemPersonas200Response, *http.Response, error) { + return r.ApiService.SimulateApiPersonasSystemPersonasExecute(r) +} + +/* +SimulateApiPersonasSystemPersonas Method for SimulateApiPersonasSystemPersonas + +Get only system-level personas + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateApiPersonasSystemPersonasRequest +*/ +func (a *SimulateAPIService) SimulateApiPersonasSystemPersonas(ctx context.Context) ApiSimulateApiPersonasSystemPersonasRequest { + return ApiSimulateApiPersonasSystemPersonasRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SimulateApiPersonasSystemPersonas200Response +func (a *SimulateAPIService) SimulateApiPersonasSystemPersonasExecute(r ApiSimulateApiPersonasSystemPersonasRequest) (*SimulateApiPersonasSystemPersonas200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulateApiPersonasSystemPersonas200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiPersonasSystemPersonas") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/system/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiPersonasUpdateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + id string + persona *Persona +} + +func (r ApiSimulateApiPersonasUpdateRequest) Persona(persona Persona) ApiSimulateApiPersonasUpdateRequest { + r.persona = &persona + return r +} + +func (r ApiSimulateApiPersonasUpdateRequest) Execute() (*Persona, *http.Response, error) { + return r.ApiService.SimulateApiPersonasUpdateExecute(r) +} + +/* +SimulateApiPersonasUpdate Method for SimulateApiPersonasUpdate + +Update a persona (workspace-level only) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiSimulateApiPersonasUpdateRequest +*/ +func (a *SimulateAPIService) SimulateApiPersonasUpdate(ctx context.Context, id string) ApiSimulateApiPersonasUpdateRequest { + return ApiSimulateApiPersonasUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Persona +func (a *SimulateAPIService) SimulateApiPersonasUpdateExecute(r ApiSimulateApiPersonasUpdateRequest) (*Persona, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Persona + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiPersonasUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.persona == nil { + return localVarReturnValue, nil, reportError("persona is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.persona + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiPersonasWorkspacePersonasRequest struct { + ctx context.Context + ApiService *SimulateAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiSimulateApiPersonasWorkspacePersonasRequest) Page(page int32) ApiSimulateApiPersonasWorkspacePersonasRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiSimulateApiPersonasWorkspacePersonasRequest) Limit(limit int32) ApiSimulateApiPersonasWorkspacePersonasRequest { + r.limit = &limit + return r +} + +func (r ApiSimulateApiPersonasWorkspacePersonasRequest) Execute() (*SimulateApiPersonasSystemPersonas200Response, *http.Response, error) { + return r.ApiService.SimulateApiPersonasWorkspacePersonasExecute(r) +} + +/* +SimulateApiPersonasWorkspacePersonas Method for SimulateApiPersonasWorkspacePersonas + +Get only workspace-level personas + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateApiPersonasWorkspacePersonasRequest +*/ +func (a *SimulateAPIService) SimulateApiPersonasWorkspacePersonas(ctx context.Context) ApiSimulateApiPersonasWorkspacePersonasRequest { + return ApiSimulateApiPersonasWorkspacePersonasRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SimulateApiPersonasSystemPersonas200Response +func (a *SimulateAPIService) SimulateApiPersonasWorkspacePersonasExecute(r ApiSimulateApiPersonasWorkspacePersonasRequest) (*SimulateApiPersonasSystemPersonas200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulateApiPersonasSystemPersonas200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiPersonasWorkspacePersonas") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/workspace/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateApiRunTestsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + search *string + simulationType *string + promptTemplateId *string + page *int32 + limit *int32 +} + +func (r ApiSimulateApiRunTestsListRequest) Search(search string) ApiSimulateApiRunTestsListRequest { + r.search = &search + return r +} + +func (r ApiSimulateApiRunTestsListRequest) SimulationType(simulationType string) ApiSimulateApiRunTestsListRequest { + r.simulationType = &simulationType + return r +} + +func (r ApiSimulateApiRunTestsListRequest) PromptTemplateId(promptTemplateId string) ApiSimulateApiRunTestsListRequest { + r.promptTemplateId = &promptTemplateId + return r +} + +func (r ApiSimulateApiRunTestsListRequest) Page(page int32) ApiSimulateApiRunTestsListRequest { + r.page = &page + return r +} + +func (r ApiSimulateApiRunTestsListRequest) Limit(limit int32) ApiSimulateApiRunTestsListRequest { + r.limit = &limit + return r +} + +func (r ApiSimulateApiRunTestsListRequest) Execute() ([]RunTestResponse, *http.Response, error) { + return r.ApiService.SimulateApiRunTestsListExecute(r) +} + +/* +SimulateApiRunTestsList Method for SimulateApiRunTestsList + +Get paginated list of run tests for the user's organization +Query Parameters: +- search: search string to filter run tests by name +- limit: number of items per page (default: 10) +- page: page number (default: 1) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateApiRunTestsListRequest +*/ +func (a *SimulateAPIService) SimulateApiRunTestsList(ctx context.Context) ApiSimulateApiRunTestsListRequest { + return ApiSimulateApiRunTestsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []RunTestResponse +func (a *SimulateAPIService) SimulateApiRunTestsListExecute(r ApiSimulateApiRunTestsListRequest) ([]RunTestResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RunTestResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateApiRunTestsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/run-tests/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.simulationType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "simulation_type", r.simulationType, "form", "") + } + if r.promptTemplateId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "prompt_template_id", r.promptTemplateId, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsBranchAnalysisCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string + body *map[string]interface{} +} + +func (r ApiSimulateCallExecutionsBranchAnalysisCreateRequest) Body(body map[string]interface{}) ApiSimulateCallExecutionsBranchAnalysisCreateRequest { + r.body = &body + return r +} + +func (r ApiSimulateCallExecutionsBranchAnalysisCreateRequest) Execute() (*CallBranchDeviationCreateResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsBranchAnalysisCreateExecute(r) +} + +/* +SimulateCallExecutionsBranchAnalysisCreate Method for SimulateCallExecutionsBranchAnalysisCreate + +Create deviation nodes and edges for a call execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsBranchAnalysisCreateRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsBranchAnalysisCreate(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsBranchAnalysisCreateRequest { + return ApiSimulateCallExecutionsBranchAnalysisCreateRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallBranchDeviationCreateResponse +func (a *SimulateAPIService) SimulateCallExecutionsBranchAnalysisCreateExecute(r ApiSimulateCallExecutionsBranchAnalysisCreateRequest) (*CallBranchDeviationCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallBranchDeviationCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsBranchAnalysisCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/branch-analysis/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsBranchAnalysisListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string +} + +func (r ApiSimulateCallExecutionsBranchAnalysisListRequest) Execute() (*CallBranchAnalysisResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsBranchAnalysisListExecute(r) +} + +/* +SimulateCallExecutionsBranchAnalysisList Method for SimulateCallExecutionsBranchAnalysisList + +Analyze a call execution against graph branches and identify deviations + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsBranchAnalysisListRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsBranchAnalysisList(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsBranchAnalysisListRequest { + return ApiSimulateCallExecutionsBranchAnalysisListRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallBranchAnalysisResponse +func (a *SimulateAPIService) SimulateCallExecutionsBranchAnalysisListExecute(r ApiSimulateCallExecutionsBranchAnalysisListRequest) (*CallBranchAnalysisResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallBranchAnalysisResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsBranchAnalysisList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/branch-analysis/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsChatSendMessageCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string + sendChatRequest *SendChatRequest +} + +func (r ApiSimulateCallExecutionsChatSendMessageCreateRequest) SendChatRequest(sendChatRequest SendChatRequest) ApiSimulateCallExecutionsChatSendMessageCreateRequest { + r.sendChatRequest = &sendChatRequest + return r +} + +func (r ApiSimulateCallExecutionsChatSendMessageCreateRequest) Execute() (*ChatSendMessageResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsChatSendMessageCreateExecute(r) +} + +/* +SimulateCallExecutionsChatSendMessageCreate Method for SimulateCallExecutionsChatSendMessageCreate + +Send a message to a chat execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsChatSendMessageCreateRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsChatSendMessageCreate(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsChatSendMessageCreateRequest { + return ApiSimulateCallExecutionsChatSendMessageCreateRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return ChatSendMessageResponse +func (a *SimulateAPIService) SimulateCallExecutionsChatSendMessageCreateExecute(r ApiSimulateCallExecutionsChatSendMessageCreateRequest) (*ChatSendMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ChatSendMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsChatSendMessageCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/chat/send-message/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sendChatRequest == nil { + return localVarReturnValue, nil, reportError("sendChatRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.sendChatRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsDeleteDeleteRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string +} + +func (r ApiSimulateCallExecutionsDeleteDeleteRequest) Execute() (*CallExecutionDeleteResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsDeleteDeleteExecute(r) +} + +/* +SimulateCallExecutionsDeleteDelete Method for SimulateCallExecutionsDeleteDelete + +Delete a specific call execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsDeleteDeleteRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsDeleteDelete(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsDeleteDeleteRequest { + return ApiSimulateCallExecutionsDeleteDeleteRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallExecutionDeleteResponse +func (a *SimulateAPIService) SimulateCallExecutionsDeleteDeleteExecute(r ApiSimulateCallExecutionsDeleteDeleteRequest) (*CallExecutionDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallExecutionDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsDeleteDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/delete/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsErrorLocalizerTasksListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string +} + +func (r ApiSimulateCallExecutionsErrorLocalizerTasksListRequest) Execute() (*CallExecutionErrorLocalizerTasksResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsErrorLocalizerTasksListExecute(r) +} + +/* +SimulateCallExecutionsErrorLocalizerTasksList Method for SimulateCallExecutionsErrorLocalizerTasksList + +Get error localizer tasks for a specific call execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsErrorLocalizerTasksListRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsErrorLocalizerTasksList(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsErrorLocalizerTasksListRequest { + return ApiSimulateCallExecutionsErrorLocalizerTasksListRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallExecutionErrorLocalizerTasksResponse +func (a *SimulateAPIService) SimulateCallExecutionsErrorLocalizerTasksListExecute(r ApiSimulateCallExecutionsErrorLocalizerTasksListRequest) (*CallExecutionErrorLocalizerTasksResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallExecutionErrorLocalizerTasksResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsErrorLocalizerTasksList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/error-localizer-tasks/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsLogsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string +} + +func (r ApiSimulateCallExecutionsLogsListRequest) Execute() (*CallExecutionLogsResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsLogsListExecute(r) +} + +/* +SimulateCallExecutionsLogsList Method for SimulateCallExecutionsLogsList + +Paginated API to retrieve stored log entries for a call execution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsLogsListRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsLogsList(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsLogsListRequest { + return ApiSimulateCallExecutionsLogsListRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallExecutionLogsResponse +func (a *SimulateAPIService) SimulateCallExecutionsLogsListExecute(r ApiSimulateCallExecutionsLogsListRequest) (*CallExecutionLogsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallExecutionLogsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsLogsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/logs/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsPartialUpdateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string + callExecutionStatusUpdate *CallExecutionStatusUpdate +} + +func (r ApiSimulateCallExecutionsPartialUpdateRequest) CallExecutionStatusUpdate(callExecutionStatusUpdate CallExecutionStatusUpdate) ApiSimulateCallExecutionsPartialUpdateRequest { + r.callExecutionStatusUpdate = &callExecutionStatusUpdate + return r +} + +func (r ApiSimulateCallExecutionsPartialUpdateRequest) Execute() (*CallExecution, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsPartialUpdateExecute(r) +} + +/* +SimulateCallExecutionsPartialUpdate Method for SimulateCallExecutionsPartialUpdate + +Update the status of a specific call execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsPartialUpdateRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsPartialUpdate(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsPartialUpdateRequest { + return ApiSimulateCallExecutionsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallExecution +func (a *SimulateAPIService) SimulateCallExecutionsPartialUpdateExecute(r ApiSimulateCallExecutionsPartialUpdateRequest) (*CallExecution, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallExecution + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.callExecutionStatusUpdate == nil { + return localVarReturnValue, nil, reportError("callExecutionStatusUpdate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.callExecutionStatusUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsReadRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string +} + +func (r ApiSimulateCallExecutionsReadRequest) Execute() (*CallExecutionDetail, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsReadExecute(r) +} + +/* +SimulateCallExecutionsRead Method for SimulateCallExecutionsRead + +Get a specific call execution with all its details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsReadRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsRead(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsReadRequest { + return ApiSimulateCallExecutionsReadRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallExecutionDetail +func (a *SimulateAPIService) SimulateCallExecutionsReadExecute(r ApiSimulateCallExecutionsReadRequest) (*CallExecutionDetail, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallExecutionDetail + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsSessionComparisonListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string +} + +func (r ApiSimulateCallExecutionsSessionComparisonListRequest) Execute() (*SessionComparisonResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsSessionComparisonListExecute(r) +} + +/* +SimulateCallExecutionsSessionComparisonList Method for SimulateCallExecutionsSessionComparisonList + +API View to compare session chat simulations + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsSessionComparisonListRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsSessionComparisonList(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsSessionComparisonListRequest { + return ApiSimulateCallExecutionsSessionComparisonListRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return SessionComparisonResponse +func (a *SimulateAPIService) SimulateCallExecutionsSessionComparisonListExecute(r ApiSimulateCallExecutionsSessionComparisonListRequest) (*SessionComparisonResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SessionComparisonResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsSessionComparisonList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/session-comparison/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateCallExecutionsTranscriptsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + callExecutionId string +} + +func (r ApiSimulateCallExecutionsTranscriptsListRequest) Execute() (*CallTranscriptResponse, *http.Response, error) { + return r.ApiService.SimulateCallExecutionsTranscriptsListExecute(r) +} + +/* +SimulateCallExecutionsTranscriptsList Method for SimulateCallExecutionsTranscriptsList + +Get transcripts for a specific call execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param callExecutionId + @return ApiSimulateCallExecutionsTranscriptsListRequest +*/ +func (a *SimulateAPIService) SimulateCallExecutionsTranscriptsList(ctx context.Context, callExecutionId string) ApiSimulateCallExecutionsTranscriptsListRequest { + return ApiSimulateCallExecutionsTranscriptsListRequest{ + ApiService: a, + ctx: ctx, + callExecutionId: callExecutionId, + } +} + +// Execute executes the request +// +// @return CallTranscriptResponse +func (a *SimulateAPIService) SimulateCallExecutionsTranscriptsListExecute(r ApiSimulateCallExecutionsTranscriptsListRequest) (*CallTranscriptResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CallTranscriptResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateCallExecutionsTranscriptsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/call-executions/{call_execution_id}/transcripts/" + localVarPath = strings.Replace(localVarPath, "{"+"call_execution_id"+"}", url.PathEscape(parameterValueToString(r.callExecutionId, "callExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateExportReadRequest struct { + ctx context.Context + ApiService *SimulateAPIService + itemId string + type_ *string + search *string + status *string +} + +// Export source type. +func (r ApiSimulateExportReadRequest) Type_(type_ string) ApiSimulateExportReadRequest { + r.type_ = &type_ + return r +} + +// Optional call-execution search term. +func (r ApiSimulateExportReadRequest) Search(search string) ApiSimulateExportReadRequest { + r.search = &search + return r +} + +// Optional call-execution status filter. +func (r ApiSimulateExportReadRequest) Status(status string) ApiSimulateExportReadRequest { + r.status = &status + return r +} + +func (r ApiSimulateExportReadRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.SimulateExportReadExecute(r) +} + +/* +SimulateExportRead Method for SimulateExportRead + +Export data as CSV based on type parameter +Query Parameters: +- type: 'runtest' or 'testexecution' (required) +- search: search string to filter call executions by phone number or scenario name +- status: filter by call execution status + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param itemId + @return ApiSimulateExportReadRequest +*/ +func (a *SimulateAPIService) SimulateExportRead(ctx context.Context, itemId string) ApiSimulateExportReadRequest { + return ApiSimulateExportReadRequest{ + ApiService: a, + ctx: ctx, + itemId: itemId, + } +} + +// Execute executes the request +// +// @return *os.File +func (a *SimulateAPIService) SimulateExportReadExecute(r ApiSimulateExportReadRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateExportRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/export/{item_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"item_id"+"}", url.PathEscape(parameterValueToString(r.itemId, "itemId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.type_ == nil { + return localVarReturnValue, nil, reportError("type_ is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulatePromptSimulationsScenariosListRequest struct { + ctx context.Context + ApiService *SimulateAPIService +} + +func (r ApiSimulatePromptSimulationsScenariosListRequest) Execute() (*PromptSimulationScenariosResponse, *http.Response, error) { + return r.ApiService.SimulatePromptSimulationsScenariosListExecute(r) +} + +/* +SimulatePromptSimulationsScenariosList Get list of scenarios available for prompt simulations. + +Query Parameters: +- limit: number of items per page (default: 20) +- page: page number (default: 1) +- search: search string to filter scenarios by name + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulatePromptSimulationsScenariosListRequest +*/ +func (a *SimulateAPIService) SimulatePromptSimulationsScenariosList(ctx context.Context) ApiSimulatePromptSimulationsScenariosListRequest { + return ApiSimulatePromptSimulationsScenariosListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PromptSimulationScenariosResponse +func (a *SimulateAPIService) SimulatePromptSimulationsScenariosListExecute(r ApiSimulatePromptSimulationsScenariosListRequest) (*PromptSimulationScenariosResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptSimulationScenariosResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulatePromptSimulationsScenariosList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/prompt-simulations/scenarios/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulatePromptTemplatesSimulationsCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + promptTemplateId string + createPromptSimulationRequest *CreatePromptSimulationRequest +} + +func (r ApiSimulatePromptTemplatesSimulationsCreateRequest) CreatePromptSimulationRequest(createPromptSimulationRequest CreatePromptSimulationRequest) ApiSimulatePromptTemplatesSimulationsCreateRequest { + r.createPromptSimulationRequest = &createPromptSimulationRequest + return r +} + +func (r ApiSimulatePromptTemplatesSimulationsCreateRequest) Execute() (*PromptSimulationRunResponse, *http.Response, error) { + return r.ApiService.SimulatePromptTemplatesSimulationsCreateExecute(r) +} + +/* +SimulatePromptTemplatesSimulationsCreate Create a new prompt-based simulation run. + +Request Body: +- name: Name of the simulation run +- description: Optional description +- prompt_version_id: The prompt version to use +- scenario_ids: List of scenario IDs to run +- dataset_row_ids: Optional list of specific row IDs +- evaluations_config: Optional evaluation configurations +- enable_tool_evaluation: Optional boolean to enable tool evaluation + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptTemplateId + @return ApiSimulatePromptTemplatesSimulationsCreateRequest +*/ +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsCreate(ctx context.Context, promptTemplateId string) ApiSimulatePromptTemplatesSimulationsCreateRequest { + return ApiSimulatePromptTemplatesSimulationsCreateRequest{ + ApiService: a, + ctx: ctx, + promptTemplateId: promptTemplateId, + } +} + +// Execute executes the request +// +// @return PromptSimulationRunResponse +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsCreateExecute(r ApiSimulatePromptTemplatesSimulationsCreateRequest) (*PromptSimulationRunResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptSimulationRunResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulatePromptTemplatesSimulationsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/prompt-templates/{prompt_template_id}/simulations/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_template_id"+"}", url.PathEscape(parameterValueToString(r.promptTemplateId, "promptTemplateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createPromptSimulationRequest == nil { + return localVarReturnValue, nil, reportError("createPromptSimulationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createPromptSimulationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulatePromptTemplatesSimulationsDeleteRequest struct { + ctx context.Context + ApiService *SimulateAPIService + promptTemplateId string + runTestId string +} + +func (r ApiSimulatePromptTemplatesSimulationsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.SimulatePromptTemplatesSimulationsDeleteExecute(r) +} + +/* +SimulatePromptTemplatesSimulationsDelete Method for SimulatePromptTemplatesSimulationsDelete + +Soft delete a prompt simulation run. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptTemplateId + @param runTestId + @return ApiSimulatePromptTemplatesSimulationsDeleteRequest +*/ +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsDelete(ctx context.Context, promptTemplateId string, runTestId string) ApiSimulatePromptTemplatesSimulationsDeleteRequest { + return ApiSimulatePromptTemplatesSimulationsDeleteRequest{ + ApiService: a, + ctx: ctx, + promptTemplateId: promptTemplateId, + runTestId: runTestId, + } +} + +// Execute executes the request +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsDeleteExecute(r ApiSimulatePromptTemplatesSimulationsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulatePromptTemplatesSimulationsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_template_id"+"}", url.PathEscape(parameterValueToString(r.promptTemplateId, "promptTemplateId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + promptTemplateId string + runTestId string + executePromptSimulationRequest *ExecutePromptSimulationRequest +} + +func (r ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest) ExecutePromptSimulationRequest(executePromptSimulationRequest ExecutePromptSimulationRequest) ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest { + r.executePromptSimulationRequest = &executePromptSimulationRequest + return r +} + +func (r ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest) Execute() (*ExecutePromptSimulationResponse, *http.Response, error) { + return r.ApiService.SimulatePromptTemplatesSimulationsExecuteCreateExecute(r) +} + +/* +SimulatePromptTemplatesSimulationsExecuteCreate Execute a prompt-based simulation run. + +Request Body (optional): +- scenario_ids: List of specific scenario IDs to run (default: all scenarios) +- select_all: If true, run all scenarios except ones in scenario_ids + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptTemplateId + @param runTestId + @return ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest +*/ +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsExecuteCreate(ctx context.Context, promptTemplateId string, runTestId string) ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest { + return ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest{ + ApiService: a, + ctx: ctx, + promptTemplateId: promptTemplateId, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return ExecutePromptSimulationResponse +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsExecuteCreateExecute(r ApiSimulatePromptTemplatesSimulationsExecuteCreateRequest) (*ExecutePromptSimulationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ExecutePromptSimulationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulatePromptTemplatesSimulationsExecuteCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_template_id"+"}", url.PathEscape(parameterValueToString(r.promptTemplateId, "promptTemplateId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.executePromptSimulationRequest == nil { + return localVarReturnValue, nil, reportError("executePromptSimulationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.executePromptSimulationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulatePromptTemplatesSimulationsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + promptTemplateId string +} + +func (r ApiSimulatePromptTemplatesSimulationsListRequest) Execute() (*PromptSimulationListResponse, *http.Response, error) { + return r.ApiService.SimulatePromptTemplatesSimulationsListExecute(r) +} + +/* +SimulatePromptTemplatesSimulationsList Get paginated list of simulation runs for a specific prompt template. + +Query Parameters: +- limit: number of items per page (default: 10) +- page: page number (default: 1) +- version_id: filter by specific prompt version + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptTemplateId + @return ApiSimulatePromptTemplatesSimulationsListRequest +*/ +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsList(ctx context.Context, promptTemplateId string) ApiSimulatePromptTemplatesSimulationsListRequest { + return ApiSimulatePromptTemplatesSimulationsListRequest{ + ApiService: a, + ctx: ctx, + promptTemplateId: promptTemplateId, + } +} + +// Execute executes the request +// +// @return PromptSimulationListResponse +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsListExecute(r ApiSimulatePromptTemplatesSimulationsListRequest) (*PromptSimulationListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptSimulationListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulatePromptTemplatesSimulationsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/prompt-templates/{prompt_template_id}/simulations/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_template_id"+"}", url.PathEscape(parameterValueToString(r.promptTemplateId, "promptTemplateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + promptTemplateId string + runTestId string + promptSimulationUpdateRequest *PromptSimulationUpdateRequest +} + +func (r ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest) PromptSimulationUpdateRequest(promptSimulationUpdateRequest PromptSimulationUpdateRequest) ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest { + r.promptSimulationUpdateRequest = &promptSimulationUpdateRequest + return r +} + +func (r ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest) Execute() (*PromptSimulationRunResponse, *http.Response, error) { + return r.ApiService.SimulatePromptTemplatesSimulationsPartialUpdateExecute(r) +} + +/* +SimulatePromptTemplatesSimulationsPartialUpdate Method for SimulatePromptTemplatesSimulationsPartialUpdate + +Update a prompt simulation run (version, scenarios, etc.). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptTemplateId + @param runTestId + @return ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest +*/ +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsPartialUpdate(ctx context.Context, promptTemplateId string, runTestId string) ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest { + return ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + promptTemplateId: promptTemplateId, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return PromptSimulationRunResponse +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsPartialUpdateExecute(r ApiSimulatePromptTemplatesSimulationsPartialUpdateRequest) (*PromptSimulationRunResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptSimulationRunResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulatePromptTemplatesSimulationsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_template_id"+"}", url.PathEscape(parameterValueToString(r.promptTemplateId, "promptTemplateId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.promptSimulationUpdateRequest == nil { + return localVarReturnValue, nil, reportError("promptSimulationUpdateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.promptSimulationUpdateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulatePromptTemplatesSimulationsReadRequest struct { + ctx context.Context + ApiService *SimulateAPIService + promptTemplateId string + runTestId string +} + +func (r ApiSimulatePromptTemplatesSimulationsReadRequest) Execute() (*PromptSimulationRunResponse, *http.Response, error) { + return r.ApiService.SimulatePromptTemplatesSimulationsReadExecute(r) +} + +/* +SimulatePromptTemplatesSimulationsRead Method for SimulatePromptTemplatesSimulationsRead + +Retrieve a specific prompt simulation run. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param promptTemplateId + @param runTestId + @return ApiSimulatePromptTemplatesSimulationsReadRequest +*/ +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsRead(ctx context.Context, promptTemplateId string, runTestId string) ApiSimulatePromptTemplatesSimulationsReadRequest { + return ApiSimulatePromptTemplatesSimulationsReadRequest{ + ApiService: a, + ctx: ctx, + promptTemplateId: promptTemplateId, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return PromptSimulationRunResponse +func (a *SimulateAPIService) SimulatePromptTemplatesSimulationsReadExecute(r ApiSimulatePromptTemplatesSimulationsReadRequest) (*PromptSimulationRunResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PromptSimulationRunResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulatePromptTemplatesSimulationsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"prompt_template_id"+"}", url.PathEscape(parameterValueToString(r.promptTemplateId, "promptTemplateId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsActiveListRequest struct { + ctx context.Context + ApiService *SimulateAPIService +} + +func (r ApiSimulateRunTestsActiveListRequest) Execute() (*AllActiveTests, *http.Response, error) { + return r.ApiService.SimulateRunTestsActiveListExecute(r) +} + +/* +SimulateRunTestsActiveList Method for SimulateRunTestsActiveList + +Get all active tests + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateRunTestsActiveListRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsActiveList(ctx context.Context) ApiSimulateRunTestsActiveListRequest { + return ApiSimulateRunTestsActiveListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AllActiveTests +func (a *SimulateAPIService) SimulateRunTestsActiveListExecute(r ApiSimulateRunTestsActiveListRequest) (*AllActiveTests, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AllActiveTests + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsActiveList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/active/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsChatExecuteCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string + body *map[string]interface{} +} + +func (r ApiSimulateRunTestsChatExecuteCreateRequest) Body(body map[string]interface{}) ApiSimulateRunTestsChatExecuteCreateRequest { + r.body = &body + return r +} + +func (r ApiSimulateRunTestsChatExecuteCreateRequest) Execute() (*RunTestChatExecutionResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsChatExecuteCreateExecute(r) +} + +/* +SimulateRunTestsChatExecuteCreate Method for SimulateRunTestsChatExecuteCreate + +Execute a test run + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsChatExecuteCreateRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsChatExecuteCreate(ctx context.Context, runTestId string) ApiSimulateRunTestsChatExecuteCreateRequest { + return ApiSimulateRunTestsChatExecuteCreateRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestChatExecutionResponse +func (a *SimulateAPIService) SimulateRunTestsChatExecuteCreateExecute(r ApiSimulateRunTestsChatExecuteCreateRequest) (*RunTestChatExecutionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestChatExecutionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsChatExecuteCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/chat-execute/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsComponentsPartialUpdateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string + runTestComponentsUpdate *RunTestComponentsUpdate +} + +func (r ApiSimulateRunTestsComponentsPartialUpdateRequest) RunTestComponentsUpdate(runTestComponentsUpdate RunTestComponentsUpdate) ApiSimulateRunTestsComponentsPartialUpdateRequest { + r.runTestComponentsUpdate = &runTestComponentsUpdate + return r +} + +func (r ApiSimulateRunTestsComponentsPartialUpdateRequest) Execute() (*RunTestResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsComponentsPartialUpdateExecute(r) +} + +/* +SimulateRunTestsComponentsPartialUpdate Method for SimulateRunTestsComponentsPartialUpdate + +Update components of a specific RunTest + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsComponentsPartialUpdateRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsComponentsPartialUpdate(ctx context.Context, runTestId string) ApiSimulateRunTestsComponentsPartialUpdateRequest { + return ApiSimulateRunTestsComponentsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestResponse +func (a *SimulateAPIService) SimulateRunTestsComponentsPartialUpdateExecute(r ApiSimulateRunTestsComponentsPartialUpdateRequest) (*RunTestResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsComponentsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/components/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.runTestComponentsUpdate == nil { + return localVarReturnValue, nil, reportError("runTestComponentsUpdate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.runTestComponentsUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsDeleteDeleteRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string +} + +func (r ApiSimulateRunTestsDeleteDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.SimulateRunTestsDeleteDeleteExecute(r) +} + +/* +SimulateRunTestsDeleteDelete Method for SimulateRunTestsDeleteDelete + +Delete a specific run test + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsDeleteDeleteRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsDeleteDelete(ctx context.Context, runTestId string) ApiSimulateRunTestsDeleteDeleteRequest { + return ApiSimulateRunTestsDeleteDeleteRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +func (a *SimulateAPIService) SimulateRunTestsDeleteDeleteExecute(r ApiSimulateRunTestsDeleteDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsDeleteDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/delete/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsDeleteTestExecutionsCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string + testExecutionBulkDelete *TestExecutionBulkDelete +} + +func (r ApiSimulateRunTestsDeleteTestExecutionsCreateRequest) TestExecutionBulkDelete(testExecutionBulkDelete TestExecutionBulkDelete) ApiSimulateRunTestsDeleteTestExecutionsCreateRequest { + r.testExecutionBulkDelete = &testExecutionBulkDelete + return r +} + +func (r ApiSimulateRunTestsDeleteTestExecutionsCreateRequest) Execute() (*TestExecutionBulkDeleteResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsDeleteTestExecutionsCreateExecute(r) +} + +/* +SimulateRunTestsDeleteTestExecutionsCreate Method for SimulateRunTestsDeleteTestExecutionsCreate + +Delete multiple test executions within a run test. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsDeleteTestExecutionsCreateRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsDeleteTestExecutionsCreate(ctx context.Context, runTestId string) ApiSimulateRunTestsDeleteTestExecutionsCreateRequest { + return ApiSimulateRunTestsDeleteTestExecutionsCreateRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return TestExecutionBulkDeleteResponse +func (a *SimulateAPIService) SimulateRunTestsDeleteTestExecutionsCreateExecute(r ApiSimulateRunTestsDeleteTestExecutionsCreateRequest) (*TestExecutionBulkDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionBulkDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsDeleteTestExecutionsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/delete-test-executions/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.testExecutionBulkDelete == nil { + return localVarReturnValue, nil, reportError("testExecutionBulkDelete is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.testExecutionBulkDelete + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsEvalConfigsGetStructureListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string + evalConfigId string +} + +func (r ApiSimulateRunTestsEvalConfigsGetStructureListRequest) Execute() (*EvalConfigStructureResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsEvalConfigsGetStructureListExecute(r) +} + +/* +SimulateRunTestsEvalConfigsGetStructureList Method for SimulateRunTestsEvalConfigsGetStructureList + +Get the structure of an evaluation config + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @param evalConfigId + @return ApiSimulateRunTestsEvalConfigsGetStructureListRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsEvalConfigsGetStructureList(ctx context.Context, runTestId string, evalConfigId string) ApiSimulateRunTestsEvalConfigsGetStructureListRequest { + return ApiSimulateRunTestsEvalConfigsGetStructureListRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + evalConfigId: evalConfigId, + } +} + +// Execute executes the request +// +// @return EvalConfigStructureResponse +func (a *SimulateAPIService) SimulateRunTestsEvalConfigsGetStructureListExecute(r ApiSimulateRunTestsEvalConfigsGetStructureListRequest) (*EvalConfigStructureResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalConfigStructureResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsEvalConfigsGetStructureList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"eval_config_id"+"}", url.PathEscape(parameterValueToString(r.evalConfigId, "evalConfigId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v EvalErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsGetIdByNameReadRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestName string +} + +func (r ApiSimulateRunTestsGetIdByNameReadRequest) Execute() (*RunTestNameResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsGetIdByNameReadExecute(r) +} + +/* +SimulateRunTestsGetIdByNameRead Method for SimulateRunTestsGetIdByNameRead + +API View to get the id of a run test by name + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestName + @return ApiSimulateRunTestsGetIdByNameReadRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsGetIdByNameRead(ctx context.Context, runTestName string) ApiSimulateRunTestsGetIdByNameReadRequest { + return ApiSimulateRunTestsGetIdByNameReadRequest{ + ApiService: a, + ctx: ctx, + runTestName: runTestName, + } +} + +// Execute executes the request +// +// @return RunTestNameResponse +func (a *SimulateAPIService) SimulateRunTestsGetIdByNameReadExecute(r ApiSimulateRunTestsGetIdByNameReadRequest) (*RunTestNameResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestNameResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsGetIdByNameRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/get-id-by-name/{run_test_name}/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_name"+"}", url.PathEscape(parameterValueToString(r.runTestName, "runTestName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsRerunTestExecutionsCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string + testExecutionRerun *TestExecutionRerun +} + +func (r ApiSimulateRunTestsRerunTestExecutionsCreateRequest) TestExecutionRerun(testExecutionRerun TestExecutionRerun) ApiSimulateRunTestsRerunTestExecutionsCreateRequest { + r.testExecutionRerun = &testExecutionRerun + return r +} + +func (r ApiSimulateRunTestsRerunTestExecutionsCreateRequest) Execute() (*TestExecutionRerunResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsRerunTestExecutionsCreateExecute(r) +} + +/* +SimulateRunTestsRerunTestExecutionsCreate Method for SimulateRunTestsRerunTestExecutionsCreate + +Rerun multiple test executions (either evaluation only or call + evaluation). +All call executions within each test execution are rerun. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsRerunTestExecutionsCreateRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsRerunTestExecutionsCreate(ctx context.Context, runTestId string) ApiSimulateRunTestsRerunTestExecutionsCreateRequest { + return ApiSimulateRunTestsRerunTestExecutionsCreateRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return TestExecutionRerunResponse +func (a *SimulateAPIService) SimulateRunTestsRerunTestExecutionsCreateExecute(r ApiSimulateRunTestsRerunTestExecutionsCreateRequest) (*TestExecutionRerunResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionRerunResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsRerunTestExecutionsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/rerun-test-executions/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.testExecutionRerun == nil { + return localVarReturnValue, nil, reportError("testExecutionRerun is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.testExecutionRerun + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsScenariosListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string +} + +func (r ApiSimulateRunTestsScenariosListRequest) Execute() ([]RunTestScenarioItemResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsScenariosListExecute(r) +} + +/* +SimulateRunTestsScenariosList Method for SimulateRunTestsScenariosList + +Get paginated list of scenarios for a specific run test +Query Parameters: +- search: search string to filter scenarios by name +- limit: number of items per page (default: 10) +- page: page number (default: 1) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsScenariosListRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsScenariosList(ctx context.Context, runTestId string) ApiSimulateRunTestsScenariosListRequest { + return ApiSimulateRunTestsScenariosListRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return []RunTestScenarioItemResponse +func (a *SimulateAPIService) SimulateRunTestsScenariosListExecute(r ApiSimulateRunTestsScenariosListRequest) ([]RunTestScenarioItemResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RunTestScenarioItemResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsScenariosList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/scenarios/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateRunTestsSdkCodeListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + runTestId string +} + +func (r ApiSimulateRunTestsSdkCodeListRequest) Execute() (*ChatSDKCodeResponse, *http.Response, error) { + return r.ApiService.SimulateRunTestsSdkCodeListExecute(r) +} + +/* +SimulateRunTestsSdkCodeList Method for SimulateRunTestsSdkCodeList + +Get the SDK code with placeholders filled + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiSimulateRunTestsSdkCodeListRequest +*/ +func (a *SimulateAPIService) SimulateRunTestsSdkCodeList(ctx context.Context, runTestId string) ApiSimulateRunTestsSdkCodeListRequest { + return ApiSimulateRunTestsSdkCodeListRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return ChatSDKCodeResponse +func (a *SimulateAPIService) SimulateRunTestsSdkCodeListExecute(r ApiSimulateRunTestsSdkCodeListRequest) (*ChatSDKCodeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ChatSDKCodeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateRunTestsSdkCodeList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/sdk-code/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateSimulatorAgentsCreateCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + simulatorAgent *SimulatorAgent +} + +func (r ApiSimulateSimulatorAgentsCreateCreateRequest) SimulatorAgent(simulatorAgent SimulatorAgent) ApiSimulateSimulatorAgentsCreateCreateRequest { + r.simulatorAgent = &simulatorAgent + return r +} + +func (r ApiSimulateSimulatorAgentsCreateCreateRequest) Execute() (*SimulatorAgent, *http.Response, error) { + return r.ApiService.SimulateSimulatorAgentsCreateCreateExecute(r) +} + +/* +SimulateSimulatorAgentsCreateCreate Method for SimulateSimulatorAgentsCreateCreate + +Create a new simulator agent + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateSimulatorAgentsCreateCreateRequest +*/ +func (a *SimulateAPIService) SimulateSimulatorAgentsCreateCreate(ctx context.Context) ApiSimulateSimulatorAgentsCreateCreateRequest { + return ApiSimulateSimulatorAgentsCreateCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SimulatorAgent +func (a *SimulateAPIService) SimulateSimulatorAgentsCreateCreateExecute(r ApiSimulateSimulatorAgentsCreateCreateRequest) (*SimulatorAgent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulatorAgent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateSimulatorAgentsCreateCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/simulator-agents/create/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.simulatorAgent == nil { + return localVarReturnValue, nil, reportError("simulatorAgent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.simulatorAgent + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string][]string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateSimulatorAgentsDeleteDeleteRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string +} + +func (r ApiSimulateSimulatorAgentsDeleteDeleteRequest) Execute() (*SimulatorAgentDeleteResponse, *http.Response, error) { + return r.ApiService.SimulateSimulatorAgentsDeleteDeleteExecute(r) +} + +/* +SimulateSimulatorAgentsDeleteDelete Method for SimulateSimulatorAgentsDeleteDelete + +Soft delete a simulator agent + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiSimulateSimulatorAgentsDeleteDeleteRequest +*/ +func (a *SimulateAPIService) SimulateSimulatorAgentsDeleteDelete(ctx context.Context, agentId string) ApiSimulateSimulatorAgentsDeleteDeleteRequest { + return ApiSimulateSimulatorAgentsDeleteDeleteRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return SimulatorAgentDeleteResponse +func (a *SimulateAPIService) SimulateSimulatorAgentsDeleteDeleteExecute(r ApiSimulateSimulatorAgentsDeleteDeleteRequest) (*SimulatorAgentDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulatorAgentDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateSimulatorAgentsDeleteDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/simulator-agents/{agent_id}/delete/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateSimulatorAgentsEditUpdateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string + simulatorAgent *SimulatorAgent +} + +func (r ApiSimulateSimulatorAgentsEditUpdateRequest) SimulatorAgent(simulatorAgent SimulatorAgent) ApiSimulateSimulatorAgentsEditUpdateRequest { + r.simulatorAgent = &simulatorAgent + return r +} + +func (r ApiSimulateSimulatorAgentsEditUpdateRequest) Execute() (*SimulatorAgent, *http.Response, error) { + return r.ApiService.SimulateSimulatorAgentsEditUpdateExecute(r) +} + +/* +SimulateSimulatorAgentsEditUpdate Method for SimulateSimulatorAgentsEditUpdate + +Edit an existing simulator agent + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiSimulateSimulatorAgentsEditUpdateRequest +*/ +func (a *SimulateAPIService) SimulateSimulatorAgentsEditUpdate(ctx context.Context, agentId string) ApiSimulateSimulatorAgentsEditUpdateRequest { + return ApiSimulateSimulatorAgentsEditUpdateRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return SimulatorAgent +func (a *SimulateAPIService) SimulateSimulatorAgentsEditUpdateExecute(r ApiSimulateSimulatorAgentsEditUpdateRequest) (*SimulatorAgent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulatorAgent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateSimulatorAgentsEditUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/simulator-agents/{agent_id}/edit/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.simulatorAgent == nil { + return localVarReturnValue, nil, reportError("simulatorAgent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.simulatorAgent + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v map[string][]string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateSimulatorAgentsListRequest struct { + ctx context.Context + ApiService *SimulateAPIService +} + +func (r ApiSimulateSimulatorAgentsListRequest) Execute() (*SimulatorAgentListResponse, *http.Response, error) { + return r.ApiService.SimulateSimulatorAgentsListExecute(r) +} + +/* +SimulateSimulatorAgentsList Method for SimulateSimulatorAgentsList + +List simulator agents with pagination and search + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSimulateSimulatorAgentsListRequest +*/ +func (a *SimulateAPIService) SimulateSimulatorAgentsList(ctx context.Context) ApiSimulateSimulatorAgentsListRequest { + return ApiSimulateSimulatorAgentsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SimulatorAgentListResponse +func (a *SimulateAPIService) SimulateSimulatorAgentsListExecute(r ApiSimulateSimulatorAgentsListRequest) (*SimulatorAgentListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulatorAgentListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateSimulatorAgentsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/simulator-agents/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateSimulatorAgentsReadRequest struct { + ctx context.Context + ApiService *SimulateAPIService + agentId string +} + +func (r ApiSimulateSimulatorAgentsReadRequest) Execute() (*SimulatorAgent, *http.Response, error) { + return r.ApiService.SimulateSimulatorAgentsReadExecute(r) +} + +/* +SimulateSimulatorAgentsRead Method for SimulateSimulatorAgentsRead + +Get details of a specific simulator agent + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiSimulateSimulatorAgentsReadRequest +*/ +func (a *SimulateAPIService) SimulateSimulatorAgentsRead(ctx context.Context, agentId string) ApiSimulateSimulatorAgentsReadRequest { + return ApiSimulateSimulatorAgentsReadRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return SimulatorAgent +func (a *SimulateAPIService) SimulateSimulatorAgentsReadExecute(r ApiSimulateSimulatorAgentsReadRequest) (*SimulatorAgent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SimulatorAgent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateSimulatorAgentsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/simulator-agents/{agent_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string + body *map[string]interface{} +} + +func (r ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest) Body(body map[string]interface{}) ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest { + r.body = &body + return r +} + +func (r ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest) Execute() (*TestExecutionChatBatchResponse, *http.Response, error) { + return r.ApiService.SimulateTestExecutionsChatCallExecutionsBatchCreateExecute(r) +} + +/* +SimulateTestExecutionsChatCallExecutionsBatchCreate Create a batch of CallExecution records for chat execution (exactly 10 per API call). + +This follows the same flow as inbound/outbound calls: +1. Resolve SimulatorAgent (scenario > run_test > fallback) +2. Extract base_prompt from SimulatorAgent +3. Handle dataset scenarios (create one CallExecution per row) +4. Enhance prompt with row data if applicable +5. Store proper metadata in CallExecution + +Returns exactly 10 CallExecution objects per API call. +hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsChatCallExecutionsBatchCreate(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest { + return ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return TestExecutionChatBatchResponse +func (a *SimulateAPIService) SimulateTestExecutionsChatCallExecutionsBatchCreateExecute(r ApiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest) (*TestExecutionChatBatchResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionChatBatchResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsChatCallExecutionsBatchCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/chat/call-executions/batch/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsColumnOrderUpdateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string + testExecutionColumnOrder *TestExecutionColumnOrder +} + +func (r ApiSimulateTestExecutionsColumnOrderUpdateRequest) TestExecutionColumnOrder(testExecutionColumnOrder TestExecutionColumnOrder) ApiSimulateTestExecutionsColumnOrderUpdateRequest { + r.testExecutionColumnOrder = &testExecutionColumnOrder + return r +} + +func (r ApiSimulateTestExecutionsColumnOrderUpdateRequest) Execute() (*TestExecutionColumnOrderResponse, *http.Response, error) { + return r.ApiService.SimulateTestExecutionsColumnOrderUpdateExecute(r) +} + +/* +SimulateTestExecutionsColumnOrderUpdate Method for SimulateTestExecutionsColumnOrderUpdate + +Update column order for a test execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsColumnOrderUpdateRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsColumnOrderUpdate(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsColumnOrderUpdateRequest { + return ApiSimulateTestExecutionsColumnOrderUpdateRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return TestExecutionColumnOrderResponse +func (a *SimulateAPIService) SimulateTestExecutionsColumnOrderUpdateExecute(r ApiSimulateTestExecutionsColumnOrderUpdateRequest) (*TestExecutionColumnOrderResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionColumnOrderResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsColumnOrderUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/column-order/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.testExecutionColumnOrder == nil { + return localVarReturnValue, nil, reportError("testExecutionColumnOrder is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.testExecutionColumnOrder + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsDeleteDeleteRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string +} + +func (r ApiSimulateTestExecutionsDeleteDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.SimulateTestExecutionsDeleteDeleteExecute(r) +} + +/* +SimulateTestExecutionsDeleteDelete Method for SimulateTestExecutionsDeleteDelete + +Delete a specific test execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsDeleteDeleteRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsDeleteDelete(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsDeleteDeleteRequest { + return ApiSimulateTestExecutionsDeleteDeleteRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +func (a *SimulateAPIService) SimulateTestExecutionsDeleteDeleteExecute(r ApiSimulateTestExecutionsDeleteDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsDeleteDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/delete/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsEvalExplanationSummaryListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string +} + +func (r ApiSimulateTestExecutionsEvalExplanationSummaryListRequest) Execute() (*EvalExplanationSummaryResponse, *http.Response, error) { + return r.ApiService.SimulateTestExecutionsEvalExplanationSummaryListExecute(r) +} + +/* +SimulateTestExecutionsEvalExplanationSummaryList Method for SimulateTestExecutionsEvalExplanationSummaryList + +Fetch the evaluation explanation summary from the database. +If not present, trigger async calculation and return empty response. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsEvalExplanationSummaryListRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsEvalExplanationSummaryList(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsEvalExplanationSummaryListRequest { + return ApiSimulateTestExecutionsEvalExplanationSummaryListRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return EvalExplanationSummaryResponse +func (a *SimulateAPIService) SimulateTestExecutionsEvalExplanationSummaryListExecute(r ApiSimulateTestExecutionsEvalExplanationSummaryListRequest) (*EvalExplanationSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalExplanationSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsEvalExplanationSummaryList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string + body *map[string]interface{} +} + +func (r ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest) Body(body map[string]interface{}) ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest { + r.body = &body + return r +} + +func (r ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest) Execute() (*EvalExplanationSummaryRefreshResponse, *http.Response, error) { + return r.ApiService.SimulateTestExecutionsEvalExplanationSummaryRefreshCreateExecute(r) +} + +/* +SimulateTestExecutionsEvalExplanationSummaryRefreshCreate Method for SimulateTestExecutionsEvalExplanationSummaryRefreshCreate + +Refresh the evaluation explanation summary by recalculating it. +This endpoint triggers the summary calculation task again. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsEvalExplanationSummaryRefreshCreate(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest { + return ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return EvalExplanationSummaryRefreshResponse +func (a *SimulateAPIService) SimulateTestExecutionsEvalExplanationSummaryRefreshCreateExecute(r ApiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest) (*EvalExplanationSummaryRefreshResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EvalExplanationSummaryRefreshResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsEvalExplanationSummaryRefreshCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsOptimiserAnalysisListRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string +} + +func (r ApiSimulateTestExecutionsOptimiserAnalysisListRequest) Execute() (*OptimiserAnalysisResponse, *http.Response, error) { + return r.ApiService.SimulateTestExecutionsOptimiserAnalysisListExecute(r) +} + +/* +SimulateTestExecutionsOptimiserAnalysisList Method for SimulateTestExecutionsOptimiserAnalysisList + +Fetch the agent optimiser analysis for a test execution. +If not present or pending, returns status information. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsOptimiserAnalysisListRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsOptimiserAnalysisList(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsOptimiserAnalysisListRequest { + return ApiSimulateTestExecutionsOptimiserAnalysisListRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return OptimiserAnalysisResponse +func (a *SimulateAPIService) SimulateTestExecutionsOptimiserAnalysisListExecute(r ApiSimulateTestExecutionsOptimiserAnalysisListRequest) (*OptimiserAnalysisResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OptimiserAnalysisResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsOptimiserAnalysisList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/optimiser-analysis/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string + body *map[string]interface{} +} + +func (r ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest) Body(body map[string]interface{}) ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest { + r.body = &body + return r +} + +func (r ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest) Execute() (*OptimiserAnalysisRefreshResponse, *http.Response, error) { + return r.ApiService.SimulateTestExecutionsOptimiserAnalysisRefreshCreateExecute(r) +} + +/* +SimulateTestExecutionsOptimiserAnalysisRefreshCreate Method for SimulateTestExecutionsOptimiserAnalysisRefreshCreate + +Trigger a new agent optimiser analysis run. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsOptimiserAnalysisRefreshCreate(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest { + return ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return OptimiserAnalysisRefreshResponse +func (a *SimulateAPIService) SimulateTestExecutionsOptimiserAnalysisRefreshCreateExecute(r ApiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest) (*OptimiserAnalysisRefreshResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OptimiserAnalysisRefreshResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsOptimiserAnalysisRefreshCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiTextErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSimulateTestExecutionsRerunCallsCreateRequest struct { + ctx context.Context + ApiService *SimulateAPIService + testExecutionId string + callExecutionRerun *CallExecutionRerun +} + +func (r ApiSimulateTestExecutionsRerunCallsCreateRequest) CallExecutionRerun(callExecutionRerun CallExecutionRerun) ApiSimulateTestExecutionsRerunCallsCreateRequest { + r.callExecutionRerun = &callExecutionRerun + return r +} + +func (r ApiSimulateTestExecutionsRerunCallsCreateRequest) Execute() (*RerunCallsResponse, *http.Response, error) { + return r.ApiService.SimulateTestExecutionsRerunCallsCreateExecute(r) +} + +/* +SimulateTestExecutionsRerunCallsCreate Method for SimulateTestExecutionsRerunCallsCreate + +Rerun multiple call executions (either evaluation only or call + evaluation) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiSimulateTestExecutionsRerunCallsCreateRequest +*/ +func (a *SimulateAPIService) SimulateTestExecutionsRerunCallsCreate(ctx context.Context, testExecutionId string) ApiSimulateTestExecutionsRerunCallsCreateRequest { + return ApiSimulateTestExecutionsRerunCallsCreateRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return RerunCallsResponse +func (a *SimulateAPIService) SimulateTestExecutionsRerunCallsCreateExecute(r ApiSimulateTestExecutionsRerunCallsCreateRequest) (*RerunCallsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RerunCallsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulateAPIService.SimulateTestExecutionsRerunCallsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/rerun-calls/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.callExecutionRerun == nil { + return localVarReturnValue, nil, reportError("callExecutionRerun is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.callExecutionRerun + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_simulation_agent_definitions.go b/go/futureagi/api_simulation_agent_definitions.go new file mode 100644 index 0000000..b89eceb --- /dev/null +++ b/go/futureagi/api_simulation_agent_definitions.go @@ -0,0 +1,932 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SimulationAgentDefinitionsAPIService SimulationAgentDefinitionsAPI service +type SimulationAgentDefinitionsAPIService service + +type ApiCreateAgentDefinitionRequest struct { + ctx context.Context + ApiService *SimulationAgentDefinitionsAPIService + agentDefinitionCreateRequest *AgentDefinitionCreateRequest +} + +func (r ApiCreateAgentDefinitionRequest) AgentDefinitionCreateRequest(agentDefinitionCreateRequest AgentDefinitionCreateRequest) ApiCreateAgentDefinitionRequest { + r.agentDefinitionCreateRequest = &agentDefinitionCreateRequest + return r +} + +func (r ApiCreateAgentDefinitionRequest) Execute() (*AgentDefinitionCreateResponse, *http.Response, error) { + return r.ApiService.CreateAgentDefinitionExecute(r) +} + +/* +CreateAgentDefinition Method for CreateAgentDefinition + +Create a new agent definition with its first version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAgentDefinitionRequest +*/ +func (a *SimulationAgentDefinitionsAPIService) CreateAgentDefinition(ctx context.Context) ApiCreateAgentDefinitionRequest { + return ApiCreateAgentDefinitionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AgentDefinitionCreateResponse +func (a *SimulationAgentDefinitionsAPIService) CreateAgentDefinitionExecute(r ApiCreateAgentDefinitionRequest) (*AgentDefinitionCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentDefinitionCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationAgentDefinitionsAPIService.CreateAgentDefinition") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/create/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.agentDefinitionCreateRequest == nil { + return localVarReturnValue, nil, reportError("agentDefinitionCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.agentDefinitionCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAgentDefinitionRequest struct { + ctx context.Context + ApiService *SimulationAgentDefinitionsAPIService + agentId string +} + +func (r ApiDeleteAgentDefinitionRequest) Execute() (*AgentDefinitionDeleteResponse, *http.Response, error) { + return r.ApiService.DeleteAgentDefinitionExecute(r) +} + +/* +DeleteAgentDefinition Method for DeleteAgentDefinition + +Soft delete an agent definition. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiDeleteAgentDefinitionRequest +*/ +func (a *SimulationAgentDefinitionsAPIService) DeleteAgentDefinition(ctx context.Context, agentId string) ApiDeleteAgentDefinitionRequest { + return ApiDeleteAgentDefinitionRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return AgentDefinitionDeleteResponse +func (a *SimulationAgentDefinitionsAPIService) DeleteAgentDefinitionExecute(r ApiDeleteAgentDefinitionRequest) (*AgentDefinitionDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentDefinitionDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationAgentDefinitionsAPIService.DeleteAgentDefinition") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/delete/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAgentDefinitionRequest struct { + ctx context.Context + ApiService *SimulationAgentDefinitionsAPIService + agentId string +} + +func (r ApiGetAgentDefinitionRequest) Execute() (*AgentDefinitionResponse, *http.Response, error) { + return r.ApiService.GetAgentDefinitionExecute(r) +} + +/* +GetAgentDefinition Method for GetAgentDefinition + +Get details of a specific agent definition with version information. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiGetAgentDefinitionRequest +*/ +func (a *SimulationAgentDefinitionsAPIService) GetAgentDefinition(ctx context.Context, agentId string) ApiGetAgentDefinitionRequest { + return ApiGetAgentDefinitionRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return AgentDefinitionResponse +func (a *SimulationAgentDefinitionsAPIService) GetAgentDefinitionExecute(r ApiGetAgentDefinitionRequest) (*AgentDefinitionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentDefinitionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationAgentDefinitionsAPIService.GetAgentDefinition") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAgentDefinitionsRequest struct { + ctx context.Context + ApiService *SimulationAgentDefinitionsAPIService + search *string + agentType *string + agentDefinitionId *string + page *int32 + limit *int32 +} + +func (r ApiListAgentDefinitionsRequest) Search(search string) ApiListAgentDefinitionsRequest { + r.search = &search + return r +} + +func (r ApiListAgentDefinitionsRequest) AgentType(agentType string) ApiListAgentDefinitionsRequest { + r.agentType = &agentType + return r +} + +func (r ApiListAgentDefinitionsRequest) AgentDefinitionId(agentDefinitionId string) ApiListAgentDefinitionsRequest { + r.agentDefinitionId = &agentDefinitionId + return r +} + +func (r ApiListAgentDefinitionsRequest) Page(page int32) ApiListAgentDefinitionsRequest { + r.page = &page + return r +} + +func (r ApiListAgentDefinitionsRequest) Limit(limit int32) ApiListAgentDefinitionsRequest { + r.limit = &limit + return r +} + +func (r ApiListAgentDefinitionsRequest) Execute() ([]AgentDefinitionListResponse, *http.Response, error) { + return r.ApiService.ListAgentDefinitionsExecute(r) +} + +/* +ListAgentDefinitions Method for ListAgentDefinitions + +Get paginated list of agent definitions for the user's organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAgentDefinitionsRequest +*/ +func (a *SimulationAgentDefinitionsAPIService) ListAgentDefinitions(ctx context.Context) ApiListAgentDefinitionsRequest { + return ApiListAgentDefinitionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []AgentDefinitionListResponse +func (a *SimulationAgentDefinitionsAPIService) ListAgentDefinitionsExecute(r ApiListAgentDefinitionsRequest) ([]AgentDefinitionListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AgentDefinitionListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationAgentDefinitionsAPIService.ListAgentDefinitions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.agentType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "agent_type", r.agentType, "form", "") + } + if r.agentDefinitionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "agent_definition_id", r.agentDefinitionId, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAgentDefinitionRequest struct { + ctx context.Context + ApiService *SimulationAgentDefinitionsAPIService + agentId string + agentDefinitionEditRequest *AgentDefinitionEditRequest +} + +func (r ApiUpdateAgentDefinitionRequest) AgentDefinitionEditRequest(agentDefinitionEditRequest AgentDefinitionEditRequest) ApiUpdateAgentDefinitionRequest { + r.agentDefinitionEditRequest = &agentDefinitionEditRequest + return r +} + +func (r ApiUpdateAgentDefinitionRequest) Execute() (*AgentDefinitionEditResponse, *http.Response, error) { + return r.ApiService.UpdateAgentDefinitionExecute(r) +} + +/* +UpdateAgentDefinition Method for UpdateAgentDefinition + +Update an existing agent definition. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param agentId + @return ApiUpdateAgentDefinitionRequest +*/ +func (a *SimulationAgentDefinitionsAPIService) UpdateAgentDefinition(ctx context.Context, agentId string) ApiUpdateAgentDefinitionRequest { + return ApiUpdateAgentDefinitionRequest{ + ApiService: a, + ctx: ctx, + agentId: agentId, + } +} + +// Execute executes the request +// +// @return AgentDefinitionEditResponse +func (a *SimulationAgentDefinitionsAPIService) UpdateAgentDefinitionExecute(r ApiUpdateAgentDefinitionRequest) (*AgentDefinitionEditResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentDefinitionEditResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationAgentDefinitionsAPIService.UpdateAgentDefinition") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/agent-definitions/{agent_id}/edit/" + localVarPath = strings.Replace(localVarPath, "{"+"agent_id"+"}", url.PathEscape(parameterValueToString(r.agentId, "agentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.agentDefinitionEditRequest == nil { + return localVarReturnValue, nil, reportError("agentDefinitionEditRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.agentDefinitionEditRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_simulation_personas.go b/go/futureagi/api_simulation_personas.go new file mode 100644 index 0000000..b65c542 --- /dev/null +++ b/go/futureagi/api_simulation_personas.go @@ -0,0 +1,889 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SimulationPersonasAPIService SimulationPersonasAPI service +type SimulationPersonasAPIService service + +type ApiCreatePersonaRequest struct { + ctx context.Context + ApiService *SimulationPersonasAPIService + personaCreate *PersonaCreate +} + +func (r ApiCreatePersonaRequest) PersonaCreate(personaCreate PersonaCreate) ApiCreatePersonaRequest { + r.personaCreate = &personaCreate + return r +} + +func (r ApiCreatePersonaRequest) Execute() (*PersonaCreate, *http.Response, error) { + return r.ApiService.CreatePersonaExecute(r) +} + +/* +CreatePersona Method for CreatePersona + +Create a new workspace-level persona + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatePersonaRequest +*/ +func (a *SimulationPersonasAPIService) CreatePersona(ctx context.Context) ApiCreatePersonaRequest { + return ApiCreatePersonaRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return PersonaCreate +func (a *SimulationPersonasAPIService) CreatePersonaExecute(r ApiCreatePersonaRequest) (*PersonaCreate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PersonaCreate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationPersonasAPIService.CreatePersona") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.personaCreate == nil { + return localVarReturnValue, nil, reportError("personaCreate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.personaCreate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletePersonaRequest struct { + ctx context.Context + ApiService *SimulationPersonasAPIService + id string +} + +func (r ApiDeletePersonaRequest) Execute() (*http.Response, error) { + return r.ApiService.DeletePersonaExecute(r) +} + +/* +DeletePersona Method for DeletePersona + +Delete a persona (workspace-level only) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiDeletePersonaRequest +*/ +func (a *SimulationPersonasAPIService) DeletePersona(ctx context.Context, id string) ApiDeletePersonaRequest { + return ApiDeletePersonaRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *SimulationPersonasAPIService) DeletePersonaExecute(r ApiDeletePersonaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationPersonasAPIService.DeletePersona") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetPersonaRequest struct { + ctx context.Context + ApiService *SimulationPersonasAPIService + id string +} + +func (r ApiGetPersonaRequest) Execute() (*Persona, *http.Response, error) { + return r.ApiService.GetPersonaExecute(r) +} + +/* +GetPersona Method for GetPersona + +Retrieve a specific persona + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetPersonaRequest +*/ +func (a *SimulationPersonasAPIService) GetPersona(ctx context.Context, id string) ApiGetPersonaRequest { + return ApiGetPersonaRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Persona +func (a *SimulationPersonasAPIService) GetPersonaExecute(r ApiGetPersonaRequest) (*Persona, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Persona + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationPersonasAPIService.GetPersona") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListPersonasRequest struct { + ctx context.Context + ApiService *SimulationPersonasAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListPersonasRequest) Page(page int32) ApiListPersonasRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListPersonasRequest) Limit(limit int32) ApiListPersonasRequest { + r.limit = &limit + return r +} + +func (r ApiListPersonasRequest) Execute() (*ListPersonas200Response, *http.Response, error) { + return r.ApiService.ListPersonasExecute(r) +} + +/* +ListPersonas Method for ListPersonas + +List personas with pagination + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPersonasRequest +*/ +func (a *SimulationPersonasAPIService) ListPersonas(ctx context.Context) ApiListPersonasRequest { + return ApiListPersonasRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListPersonas200Response +func (a *SimulationPersonasAPIService) ListPersonasExecute(r ApiListPersonasRequest) (*ListPersonas200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListPersonas200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationPersonasAPIService.ListPersonas") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatePersonaRequest struct { + ctx context.Context + ApiService *SimulationPersonasAPIService + id string + persona *Persona +} + +func (r ApiUpdatePersonaRequest) Persona(persona Persona) ApiUpdatePersonaRequest { + r.persona = &persona + return r +} + +func (r ApiUpdatePersonaRequest) Execute() (*Persona, *http.Response, error) { + return r.ApiService.UpdatePersonaExecute(r) +} + +/* +UpdatePersona Method for UpdatePersona + +ViewSet for managing Personas. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiUpdatePersonaRequest +*/ +func (a *SimulationPersonasAPIService) UpdatePersona(ctx context.Context, id string) ApiUpdatePersonaRequest { + return ApiUpdatePersonaRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Persona +func (a *SimulationPersonasAPIService) UpdatePersonaExecute(r ApiUpdatePersonaRequest) (*Persona, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Persona + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationPersonasAPIService.UpdatePersona") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/personas/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.persona == nil { + return localVarReturnValue, nil, reportError("persona is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.persona + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorWithDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_simulation_run_tests.go b/go/futureagi/api_simulation_run_tests.go new file mode 100644 index 0000000..671eead --- /dev/null +++ b/go/futureagi/api_simulation_run_tests.go @@ -0,0 +1,1765 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SimulationRunTestsAPIService SimulationRunTestsAPI service +type SimulationRunTestsAPIService service + +type ApiCreateRunTestRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + createRunTest *CreateRunTest +} + +func (r ApiCreateRunTestRequest) CreateRunTest(createRunTest CreateRunTest) ApiCreateRunTestRequest { + r.createRunTest = &createRunTest + return r +} + +func (r ApiCreateRunTestRequest) Execute() (*RunTestResponse, *http.Response, error) { + return r.ApiService.CreateRunTestExecute(r) +} + +/* +CreateRunTest Method for CreateRunTest + +Create a new RunTest + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateRunTestRequest +*/ +func (a *SimulationRunTestsAPIService) CreateRunTest(ctx context.Context) ApiCreateRunTestRequest { + return ApiCreateRunTestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return RunTestResponse +func (a *SimulationRunTestsAPIService) CreateRunTestExecute(r ApiCreateRunTestRequest) (*RunTestResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.CreateRunTest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/create/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createRunTest == nil { + return localVarReturnValue, nil, reportError("createRunTest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createRunTest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRunTestRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string +} + +func (r ApiDeleteRunTestRequest) Execute() (*RunTestMessageResponse, *http.Response, error) { + return r.ApiService.DeleteRunTestExecute(r) +} + +/* +DeleteRunTest Method for DeleteRunTest + +Delete a specific RunTest (soft delete) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiDeleteRunTestRequest +*/ +func (a *SimulationRunTestsAPIService) DeleteRunTest(ctx context.Context, runTestId string) ApiDeleteRunTestRequest { + return ApiDeleteRunTestRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestMessageResponse +func (a *SimulationRunTestsAPIService) DeleteRunTestExecute(r ApiDeleteRunTestRequest) (*RunTestMessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestMessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.DeleteRunTest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExecuteRunTestRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string + executeRunTest *ExecuteRunTest +} + +func (r ApiExecuteRunTestRequest) ExecuteRunTest(executeRunTest ExecuteRunTest) ApiExecuteRunTestRequest { + r.executeRunTest = &executeRunTest + return r +} + +func (r ApiExecuteRunTestRequest) Execute() (*RunTestExecutionResponse, *http.Response, error) { + return r.ApiService.ExecuteRunTestExecute(r) +} + +/* +ExecuteRunTest Method for ExecuteRunTest + +Execute a test run + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiExecuteRunTestRequest +*/ +func (a *SimulationRunTestsAPIService) ExecuteRunTest(ctx context.Context, runTestId string) ApiExecuteRunTestRequest { + return ApiExecuteRunTestRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestExecutionResponse +func (a *SimulationRunTestsAPIService) ExecuteRunTestExecute(r ApiExecuteRunTestRequest) (*RunTestExecutionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestExecutionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.ExecuteRunTest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/execute/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.executeRunTest == nil { + return localVarReturnValue, nil, reportError("executeRunTest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.executeRunTest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRunTestRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string +} + +func (r ApiGetRunTestRequest) Execute() (*RunTestResponse, *http.Response, error) { + return r.ApiService.GetRunTestExecute(r) +} + +/* +GetRunTest Method for GetRunTest + +Retrieve a specific RunTest + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiGetRunTestRequest +*/ +func (a *SimulationRunTestsAPIService) GetRunTest(ctx context.Context, runTestId string) ApiGetRunTestRequest { + return ApiGetRunTestRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestResponse +func (a *SimulationRunTestsAPIService) GetRunTestExecute(r ApiGetRunTestRequest) (*RunTestResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.GetRunTest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRunTestAnalyticsRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string +} + +func (r ApiGetRunTestAnalyticsRequest) Execute() (*RunTestAnalytics, *http.Response, error) { + return r.ApiService.GetRunTestAnalyticsExecute(r) +} + +/* +GetRunTestAnalytics Method for GetRunTestAnalytics + +Get analytics data for a specific run test across multiple test executions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiGetRunTestAnalyticsRequest +*/ +func (a *SimulationRunTestsAPIService) GetRunTestAnalytics(ctx context.Context, runTestId string) ApiGetRunTestAnalyticsRequest { + return ApiGetRunTestAnalyticsRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestAnalytics +func (a *SimulationRunTestsAPIService) GetRunTestAnalyticsExecute(r ApiGetRunTestAnalyticsRequest) (*RunTestAnalytics, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestAnalytics + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.GetRunTestAnalytics") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/analytics/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRunTestStatusRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string +} + +func (r ApiGetRunTestStatusRequest) Execute() (*TestExecutionStatusSummary, *http.Response, error) { + return r.ApiService.GetRunTestStatusExecute(r) +} + +/* +GetRunTestStatus Method for GetRunTestStatus + +Get test execution status + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiGetRunTestStatusRequest +*/ +func (a *SimulationRunTestsAPIService) GetRunTestStatus(ctx context.Context, runTestId string) ApiGetRunTestStatusRequest { + return ApiGetRunTestStatusRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return TestExecutionStatusSummary +func (a *SimulationRunTestsAPIService) GetRunTestStatusExecute(r ApiGetRunTestStatusRequest) (*TestExecutionStatusSummary, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionStatusSummary + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.GetRunTestStatus") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/status/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRunTestCallExecutionsRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string +} + +func (r ApiListRunTestCallExecutionsRequest) Execute() (*RunTestCallExecutionsResponse, *http.Response, error) { + return r.ApiService.ListRunTestCallExecutionsExecute(r) +} + +/* +ListRunTestCallExecutions Method for ListRunTestCallExecutions + +Get all call executions for a specific run test with pagination and search +Query Parameters: +- search: search string to filter call executions by phone number or scenario name +- status: filter by call execution status +- limit: number of call executions per page (default: 10) +- page: page number for call executions (default: 1) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiListRunTestCallExecutionsRequest +*/ +func (a *SimulationRunTestsAPIService) ListRunTestCallExecutions(ctx context.Context, runTestId string) ApiListRunTestCallExecutionsRequest { + return ApiListRunTestCallExecutionsRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestCallExecutionsResponse +func (a *SimulationRunTestsAPIService) ListRunTestCallExecutionsExecute(r ApiListRunTestCallExecutionsRequest) (*RunTestCallExecutionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestCallExecutionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.ListRunTestCallExecutions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/call-executions/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v CallExecutionErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRunTestExecutionsRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string +} + +func (r ApiListRunTestExecutionsRequest) Execute() ([]TestExecutionItemResponse, *http.Response, error) { + return r.ApiService.ListRunTestExecutionsExecute(r) +} + +/* +ListRunTestExecutions Method for ListRunTestExecutions + +Get test execution data for a specific run test +Query Parameters: +- search: search string to filter test executions by status or scenario name +- status: filter by execution status +- limit: number of items per page (default: 10) +- page: page number (default: 1) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiListRunTestExecutionsRequest +*/ +func (a *SimulationRunTestsAPIService) ListRunTestExecutions(ctx context.Context, runTestId string) ApiListRunTestExecutionsRequest { + return ApiListRunTestExecutionsRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return []TestExecutionItemResponse +func (a *SimulationRunTestsAPIService) ListRunTestExecutionsExecute(r ApiListRunTestExecutionsRequest) ([]TestExecutionItemResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TestExecutionItemResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.ListRunTestExecutions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/executions/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRunTestsRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + search *string + simulationType *string + promptTemplateId *string + page *int32 + limit *int32 +} + +func (r ApiListRunTestsRequest) Search(search string) ApiListRunTestsRequest { + r.search = &search + return r +} + +func (r ApiListRunTestsRequest) SimulationType(simulationType string) ApiListRunTestsRequest { + r.simulationType = &simulationType + return r +} + +func (r ApiListRunTestsRequest) PromptTemplateId(promptTemplateId string) ApiListRunTestsRequest { + r.promptTemplateId = &promptTemplateId + return r +} + +func (r ApiListRunTestsRequest) Page(page int32) ApiListRunTestsRequest { + r.page = &page + return r +} + +func (r ApiListRunTestsRequest) Limit(limit int32) ApiListRunTestsRequest { + r.limit = &limit + return r +} + +func (r ApiListRunTestsRequest) Execute() ([]RunTestResponse, *http.Response, error) { + return r.ApiService.ListRunTestsExecute(r) +} + +/* +ListRunTests Method for ListRunTests + +Get paginated list of run tests for the user's organization +Query Parameters: + + - search: search string to filter run tests by name + + - limit: number of items per page (default: 10) + + - page: page number (default: 1) + + - simulation_type: filter by source type (RunTest.SourceTypes values: + 'agent_definition' or 'prompt') + + - prompt_template_id: filter by prompt template ID (used when + simulation_type is 'prompt') + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRunTestsRequest +*/ +func (a *SimulationRunTestsAPIService) ListRunTests(ctx context.Context) ApiListRunTestsRequest { + return ApiListRunTestsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []RunTestResponse +func (a *SimulationRunTestsAPIService) ListRunTestsExecute(r ApiListRunTestsRequest) ([]RunTestResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RunTestResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.ListRunTests") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.simulationType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "simulation_type", r.simulationType, "form", "") + } + if r.promptTemplateId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "prompt_template_id", r.promptTemplateId, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateRunTestRequest struct { + ctx context.Context + ApiService *SimulationRunTestsAPIService + runTestId string + updateRunTest *UpdateRunTest +} + +func (r ApiUpdateRunTestRequest) UpdateRunTest(updateRunTest UpdateRunTest) ApiUpdateRunTestRequest { + r.updateRunTest = &updateRunTest + return r +} + +func (r ApiUpdateRunTestRequest) Execute() (*RunTestResponse, *http.Response, error) { + return r.ApiService.UpdateRunTestExecute(r) +} + +/* +UpdateRunTest Method for UpdateRunTest + +Update a specific RunTest + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param runTestId + @return ApiUpdateRunTestRequest +*/ +func (a *SimulationRunTestsAPIService) UpdateRunTest(ctx context.Context, runTestId string) ApiUpdateRunTestRequest { + return ApiUpdateRunTestRequest{ + ApiService: a, + ctx: ctx, + runTestId: runTestId, + } +} + +// Execute executes the request +// +// @return RunTestResponse +func (a *SimulationRunTestsAPIService) UpdateRunTestExecute(r ApiUpdateRunTestRequest) (*RunTestResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationRunTestsAPIService.UpdateRunTest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/run-tests/{run_test_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"run_test_id"+"}", url.PathEscape(parameterValueToString(r.runTestId, "runTestId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateRunTest == nil { + return localVarReturnValue, nil, reportError("updateRunTest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateRunTest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_simulation_scenarios.go b/go/futureagi/api_simulation_scenarios.go new file mode 100644 index 0000000..e644cff --- /dev/null +++ b/go/futureagi/api_simulation_scenarios.go @@ -0,0 +1,910 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SimulationScenariosAPIService SimulationScenariosAPI service +type SimulationScenariosAPIService service + +type ApiCreateScenarioRequest struct { + ctx context.Context + ApiService *SimulationScenariosAPIService + scenarioCreateRequest *ScenarioCreateRequest +} + +func (r ApiCreateScenarioRequest) ScenarioCreateRequest(scenarioCreateRequest ScenarioCreateRequest) ApiCreateScenarioRequest { + r.scenarioCreateRequest = &scenarioCreateRequest + return r +} + +func (r ApiCreateScenarioRequest) Execute() (*ScenarioCreateResponse, *http.Response, error) { + return r.ApiService.CreateScenarioExecute(r) +} + +/* +CreateScenario Create scenario + +Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateScenarioRequest +*/ +func (a *SimulationScenariosAPIService) CreateScenario(ctx context.Context) ApiCreateScenarioRequest { + return ApiCreateScenarioRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ScenarioCreateResponse +func (a *SimulationScenariosAPIService) CreateScenarioExecute(r ApiCreateScenarioRequest) (*ScenarioCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationScenariosAPIService.CreateScenario") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/create/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scenarioCreateRequest == nil { + return localVarReturnValue, nil, reportError("scenarioCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.scenarioCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteScenarioRequest struct { + ctx context.Context + ApiService *SimulationScenariosAPIService + scenarioId string +} + +func (r ApiDeleteScenarioRequest) Execute() (*ScenarioDeleteResponse, *http.Response, error) { + return r.ApiService.DeleteScenarioExecute(r) +} + +/* +DeleteScenario Delete scenario + +Soft-deletes a scenario by setting deleted=True. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scenarioId + @return ApiDeleteScenarioRequest +*/ +func (a *SimulationScenariosAPIService) DeleteScenario(ctx context.Context, scenarioId string) ApiDeleteScenarioRequest { + return ApiDeleteScenarioRequest{ + ApiService: a, + ctx: ctx, + scenarioId: scenarioId, + } +} + +// Execute executes the request +// +// @return ScenarioDeleteResponse +func (a *SimulationScenariosAPIService) DeleteScenarioExecute(r ApiDeleteScenarioRequest) (*ScenarioDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationScenariosAPIService.DeleteScenario") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/{scenario_id}/delete/" + localVarPath = strings.Replace(localVarPath, "{"+"scenario_id"+"}", url.PathEscape(parameterValueToString(r.scenarioId, "scenarioId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetScenarioRequest struct { + ctx context.Context + ApiService *SimulationScenariosAPIService + scenarioId string +} + +func (r ApiGetScenarioRequest) Execute() (*ScenarioDetailResponse, *http.Response, error) { + return r.ApiService.GetScenarioExecute(r) +} + +/* +GetScenario Get scenario detail + +Returns full detail of a specific scenario including graph data and prompts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scenarioId + @return ApiGetScenarioRequest +*/ +func (a *SimulationScenariosAPIService) GetScenario(ctx context.Context, scenarioId string) ApiGetScenarioRequest { + return ApiGetScenarioRequest{ + ApiService: a, + ctx: ctx, + scenarioId: scenarioId, + } +} + +// Execute executes the request +// +// @return ScenarioDetailResponse +func (a *SimulationScenariosAPIService) GetScenarioExecute(r ApiGetScenarioRequest) (*ScenarioDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationScenariosAPIService.GetScenario") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/{scenario_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"scenario_id"+"}", url.PathEscape(parameterValueToString(r.scenarioId, "scenarioId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListScenariosRequest struct { + ctx context.Context + ApiService *SimulationScenariosAPIService + search *string + agentDefinitionId *string + agentType *string + page *int32 + limit *int32 +} + +func (r ApiListScenariosRequest) Search(search string) ApiListScenariosRequest { + r.search = &search + return r +} + +func (r ApiListScenariosRequest) AgentDefinitionId(agentDefinitionId string) ApiListScenariosRequest { + r.agentDefinitionId = &agentDefinitionId + return r +} + +func (r ApiListScenariosRequest) AgentType(agentType string) ApiListScenariosRequest { + r.agentType = &agentType + return r +} + +func (r ApiListScenariosRequest) Page(page int32) ApiListScenariosRequest { + r.page = &page + return r +} + +func (r ApiListScenariosRequest) Limit(limit int32) ApiListScenariosRequest { + r.limit = &limit + return r +} + +func (r ApiListScenariosRequest) Execute() (*ScenarioListResponse, *http.Response, error) { + return r.ApiService.ListScenariosExecute(r) +} + +/* +ListScenarios List scenarios + +Returns a paginated list of scenarios for the user's organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListScenariosRequest +*/ +func (a *SimulationScenariosAPIService) ListScenarios(ctx context.Context) ApiListScenariosRequest { + return ApiListScenariosRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ScenarioListResponse +func (a *SimulationScenariosAPIService) ListScenariosExecute(r ApiListScenariosRequest) (*ScenarioListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationScenariosAPIService.ListScenarios") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.agentDefinitionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "agent_definition_id", r.agentDefinitionId, "form", "") + } + if r.agentType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "agent_type", r.agentType, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateScenarioRequest struct { + ctx context.Context + ApiService *SimulationScenariosAPIService + scenarioId string + scenarioEditRequest *ScenarioEditRequest +} + +func (r ApiUpdateScenarioRequest) ScenarioEditRequest(scenarioEditRequest ScenarioEditRequest) ApiUpdateScenarioRequest { + r.scenarioEditRequest = &scenarioEditRequest + return r +} + +func (r ApiUpdateScenarioRequest) Execute() (*ScenarioEditResponse, *http.Response, error) { + return r.ApiService.UpdateScenarioExecute(r) +} + +/* +UpdateScenario Edit scenario + +Updates scenario name, description, graph, or prompt. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param scenarioId + @return ApiUpdateScenarioRequest +*/ +func (a *SimulationScenariosAPIService) UpdateScenario(ctx context.Context, scenarioId string) ApiUpdateScenarioRequest { + return ApiUpdateScenarioRequest{ + ApiService: a, + ctx: ctx, + scenarioId: scenarioId, + } +} + +// Execute executes the request +// +// @return ScenarioEditResponse +func (a *SimulationScenariosAPIService) UpdateScenarioExecute(r ApiUpdateScenarioRequest) (*ScenarioEditResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ScenarioEditResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationScenariosAPIService.UpdateScenario") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/scenarios/{scenario_id}/edit/" + localVarPath = strings.Replace(localVarPath, "{"+"scenario_id"+"}", url.PathEscape(parameterValueToString(r.scenarioId, "scenarioId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.scenarioEditRequest == nil { + return localVarReturnValue, nil, reportError("scenarioEditRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.scenarioEditRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ScenarioErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_simulation_test_executions.go b/go/futureagi/api_simulation_test_executions.go new file mode 100644 index 0000000..de562ce --- /dev/null +++ b/go/futureagi/api_simulation_test_executions.go @@ -0,0 +1,1259 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SimulationTestExecutionsAPIService SimulationTestExecutionsAPI service +type SimulationTestExecutionsAPIService service + +type ApiCancelTestExecutionRequest struct { + ctx context.Context + ApiService *SimulationTestExecutionsAPIService + testExecutionId string + body *map[string]interface{} +} + +func (r ApiCancelTestExecutionRequest) Body(body map[string]interface{}) ApiCancelTestExecutionRequest { + r.body = &body + return r +} + +func (r ApiCancelTestExecutionRequest) Execute() (*CancelTestExecutionResponse, *http.Response, error) { + return r.ApiService.CancelTestExecutionExecute(r) +} + +/* +CancelTestExecution Method for CancelTestExecution + +Cancel a test execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiCancelTestExecutionRequest +*/ +func (a *SimulationTestExecutionsAPIService) CancelTestExecution(ctx context.Context, testExecutionId string) ApiCancelTestExecutionRequest { + return ApiCancelTestExecutionRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return CancelTestExecutionResponse +func (a *SimulationTestExecutionsAPIService) CancelTestExecutionExecute(r ApiCancelTestExecutionRequest) (*CancelTestExecutionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CancelTestExecutionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationTestExecutionsAPIService.CancelTestExecution") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/cancel/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTestExecutionRequest struct { + ctx context.Context + ApiService *SimulationTestExecutionsAPIService + testExecutionId string + search *string + filters *string + rowGroups *string + groupKeys *string + page *int32 + limit *int32 +} + +func (r ApiGetTestExecutionRequest) Search(search string) ApiGetTestExecutionRequest { + r.search = &search + return r +} + +func (r ApiGetTestExecutionRequest) Filters(filters string) ApiGetTestExecutionRequest { + r.filters = &filters + return r +} + +func (r ApiGetTestExecutionRequest) RowGroups(rowGroups string) ApiGetTestExecutionRequest { + r.rowGroups = &rowGroups + return r +} + +func (r ApiGetTestExecutionRequest) GroupKeys(groupKeys string) ApiGetTestExecutionRequest { + r.groupKeys = &groupKeys + return r +} + +func (r ApiGetTestExecutionRequest) Page(page int32) ApiGetTestExecutionRequest { + r.page = &page + return r +} + +func (r ApiGetTestExecutionRequest) Limit(limit int32) ApiGetTestExecutionRequest { + r.limit = &limit + return r +} + +func (r ApiGetTestExecutionRequest) Execute() (*TestExecutionDetailResponse, *http.Response, error) { + return r.ApiService.GetTestExecutionExecute(r) +} + +/* +GetTestExecution Method for GetTestExecution + +Get a specific test execution with all its details and paginated call executions +Query Parameters: +- search: search string to filter call executions +- page: page number for call executions (default: 1) +- filters: JSON array of filter objects +- row_groups: JSON array of column IDs to group by +- group_keys: JSON array of group keys + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiGetTestExecutionRequest +*/ +func (a *SimulationTestExecutionsAPIService) GetTestExecution(ctx context.Context, testExecutionId string) ApiGetTestExecutionRequest { + return ApiGetTestExecutionRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return TestExecutionDetailResponse +func (a *SimulationTestExecutionsAPIService) GetTestExecutionExecute(r ApiGetTestExecutionRequest) (*TestExecutionDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationTestExecutionsAPIService.GetTestExecution") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + if r.rowGroups != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "row_groups", r.rowGroups, "form", "") + } else { + var defaultValue string = "[]" + r.rowGroups = &defaultValue + } + if r.groupKeys != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "group_keys", r.groupKeys, "form", "") + } else { + var defaultValue string = "[]" + r.groupKeys = &defaultValue + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 30 + r.limit = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTestExecutionAnalyticsRequest struct { + ctx context.Context + ApiService *SimulationTestExecutionsAPIService + testExecutionId string +} + +func (r ApiGetTestExecutionAnalyticsRequest) Execute() (*TestExecutionAnalytics, *http.Response, error) { + return r.ApiService.GetTestExecutionAnalyticsExecute(r) +} + +/* +GetTestExecutionAnalytics Method for GetTestExecutionAnalytics + +Get analytics data for a specific test execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiGetTestExecutionAnalyticsRequest +*/ +func (a *SimulationTestExecutionsAPIService) GetTestExecutionAnalytics(ctx context.Context, testExecutionId string) ApiGetTestExecutionAnalyticsRequest { + return ApiGetTestExecutionAnalyticsRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return TestExecutionAnalytics +func (a *SimulationTestExecutionsAPIService) GetTestExecutionAnalyticsExecute(r ApiGetTestExecutionAnalyticsRequest) (*TestExecutionAnalytics, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionAnalytics + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationTestExecutionsAPIService.GetTestExecutionAnalytics") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/analytics/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTestExecutionKpisRequest struct { + ctx context.Context + ApiService *SimulationTestExecutionsAPIService + testExecutionId string +} + +func (r ApiGetTestExecutionKpisRequest) Execute() (*RunTestKPIsResponse, *http.Response, error) { + return r.ApiService.GetTestExecutionKpisExecute(r) +} + +/* +GetTestExecutionKpis Method for GetTestExecutionKpis + +Get combined KPI values for a specific run test + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiGetTestExecutionKpisRequest +*/ +func (a *SimulationTestExecutionsAPIService) GetTestExecutionKpis(ctx context.Context, testExecutionId string) ApiGetTestExecutionKpisRequest { + return ApiGetTestExecutionKpisRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return RunTestKPIsResponse +func (a *SimulationTestExecutionsAPIService) GetTestExecutionKpisExecute(r ApiGetTestExecutionKpisRequest) (*RunTestKPIsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunTestKPIsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationTestExecutionsAPIService.GetTestExecutionKpis") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/kpis/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTestExecutionPerformanceSummaryRequest struct { + ctx context.Context + ApiService *SimulationTestExecutionsAPIService + testExecutionId string +} + +func (r ApiGetTestExecutionPerformanceSummaryRequest) Execute() (*PerformanceSummary, *http.Response, error) { + return r.ApiService.GetTestExecutionPerformanceSummaryExecute(r) +} + +/* +GetTestExecutionPerformanceSummary Method for GetTestExecutionPerformanceSummary + +Get performance summary data for a specific test execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiGetTestExecutionPerformanceSummaryRequest +*/ +func (a *SimulationTestExecutionsAPIService) GetTestExecutionPerformanceSummary(ctx context.Context, testExecutionId string) ApiGetTestExecutionPerformanceSummaryRequest { + return ApiGetTestExecutionPerformanceSummaryRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return PerformanceSummary +func (a *SimulationTestExecutionsAPIService) GetTestExecutionPerformanceSummaryExecute(r ApiGetTestExecutionPerformanceSummaryRequest) (*PerformanceSummary, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PerformanceSummary + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationTestExecutionsAPIService.GetTestExecutionPerformanceSummary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/performance-summary/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTestExecutionTranscriptsRequest struct { + ctx context.Context + ApiService *SimulationTestExecutionsAPIService + testExecutionId string +} + +func (r ApiGetTestExecutionTranscriptsRequest) Execute() (*TestExecutionTranscriptsResponse, *http.Response, error) { + return r.ApiService.GetTestExecutionTranscriptsExecute(r) +} + +/* +GetTestExecutionTranscripts Method for GetTestExecutionTranscripts + +Get all transcripts for a test execution + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param testExecutionId + @return ApiGetTestExecutionTranscriptsRequest +*/ +func (a *SimulationTestExecutionsAPIService) GetTestExecutionTranscripts(ctx context.Context, testExecutionId string) ApiGetTestExecutionTranscriptsRequest { + return ApiGetTestExecutionTranscriptsRequest{ + ApiService: a, + ctx: ctx, + testExecutionId: testExecutionId, + } +} + +// Execute executes the request +// +// @return TestExecutionTranscriptsResponse +func (a *SimulationTestExecutionsAPIService) GetTestExecutionTranscriptsExecute(r ApiGetTestExecutionTranscriptsRequest) (*TestExecutionTranscriptsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TestExecutionTranscriptsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationTestExecutionsAPIService.GetTestExecutionTranscripts") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/test-executions/{test_execution_id}/transcripts/" + localVarPath = strings.Replace(localVarPath, "{"+"test_execution_id"+"}", url.PathEscape(parameterValueToString(r.testExecutionId, "testExecutionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTestExecutionsRequest struct { + ctx context.Context + ApiService *SimulationTestExecutionsAPIService +} + +func (r ApiListTestExecutionsRequest) Execute() ([]TestExecution, *http.Response, error) { + return r.ApiService.ListTestExecutionsExecute(r) +} + +/* +ListTestExecutions Method for ListTestExecutions + +Get paginated list of test executions for the user's organization +Query Parameters: +- search: search string to filter test executions by run test name +- status: filter by execution status +- limit: number of items per page (default: 10) +- page: page number (default: 1) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTestExecutionsRequest +*/ +func (a *SimulationTestExecutionsAPIService) ListTestExecutions(ctx context.Context) ApiListTestExecutionsRequest { + return ApiListTestExecutionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return []TestExecution +func (a *SimulationTestExecutionsAPIService) ListTestExecutionsExecute(r ApiListTestExecutionsRequest) ([]TestExecution, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TestExecution + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationTestExecutionsAPIService.ListTestExecutions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/simulate/api/test-executions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v RunTestErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_simulations.go b/go/futureagi/api_simulations.go new file mode 100644 index 0000000..242ea4e --- /dev/null +++ b/go/futureagi/api_simulations.go @@ -0,0 +1,645 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + +// SimulationsAPIService SimulationsAPI service +type SimulationsAPIService service + +type ApiGetSimulationAnalyticsRequest struct { + ctx context.Context + ApiService *SimulationsAPIService + runTestName *string + executionId *string + evalName *string + summary *bool +} + +func (r ApiGetSimulationAnalyticsRequest) RunTestName(runTestName string) ApiGetSimulationAnalyticsRequest { + r.runTestName = &runTestName + return r +} + +func (r ApiGetSimulationAnalyticsRequest) ExecutionId(executionId string) ApiGetSimulationAnalyticsRequest { + r.executionId = &executionId + return r +} + +func (r ApiGetSimulationAnalyticsRequest) EvalName(evalName string) ApiGetSimulationAnalyticsRequest { + r.evalName = &evalName + return r +} + +func (r ApiGetSimulationAnalyticsRequest) Summary(summary bool) ApiGetSimulationAnalyticsRequest { + r.summary = &summary + return r +} + +func (r ApiGetSimulationAnalyticsRequest) Execute() (*SDKSimulationAnalyticsResponse, *http.Response, error) { + return r.ApiService.GetSimulationAnalyticsExecute(r) +} + +/* +GetSimulationAnalytics GET /simulation/analytics/ + +Aggregated analytics view: eval scores (radar chart data), critical issues, +FMA suggestions. Corresponds to the Analytics tab in the UI. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetSimulationAnalyticsRequest +*/ +func (a *SimulationsAPIService) GetSimulationAnalytics(ctx context.Context) ApiGetSimulationAnalyticsRequest { + return ApiGetSimulationAnalyticsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKSimulationAnalyticsResponse +func (a *SimulationsAPIService) GetSimulationAnalyticsExecute(r ApiGetSimulationAnalyticsRequest) (*SDKSimulationAnalyticsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKSimulationAnalyticsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationsAPIService.GetSimulationAnalytics") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/simulation/analytics/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.runTestName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "run_test_name", r.runTestName, "form", "") + } + if r.executionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_id", r.executionId, "form", "") + } + if r.evalName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "eval_name", r.evalName, "form", "") + } + if r.summary != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "summary", r.summary, "form", "") + } else { + var defaultValue bool = true + r.summary = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListSimulationMetricsRequest struct { + ctx context.Context + ApiService *SimulationsAPIService + runTestName *string + executionId *string + callExecutionId *string +} + +func (r ApiListSimulationMetricsRequest) RunTestName(runTestName string) ApiListSimulationMetricsRequest { + r.runTestName = &runTestName + return r +} + +func (r ApiListSimulationMetricsRequest) ExecutionId(executionId string) ApiListSimulationMetricsRequest { + r.executionId = &executionId + return r +} + +func (r ApiListSimulationMetricsRequest) CallExecutionId(callExecutionId string) ApiListSimulationMetricsRequest { + r.callExecutionId = &callExecutionId + return r +} + +func (r ApiListSimulationMetricsRequest) Execute() (*SDKSimulationMetricsResponse, *http.Response, error) { + return r.ApiService.ListSimulationMetricsExecute(r) +} + +/* +ListSimulationMetrics GET /simulation/metrics/ + +Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListSimulationMetricsRequest +*/ +func (a *SimulationsAPIService) ListSimulationMetrics(ctx context.Context) ApiListSimulationMetricsRequest { + return ApiListSimulationMetricsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKSimulationMetricsResponse +func (a *SimulationsAPIService) ListSimulationMetricsExecute(r ApiListSimulationMetricsRequest) (*SDKSimulationMetricsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKSimulationMetricsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationsAPIService.ListSimulationMetrics") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/simulation/metrics/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.runTestName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "run_test_name", r.runTestName, "form", "") + } + if r.executionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_id", r.executionId, "form", "") + } + if r.callExecutionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "call_execution_id", r.callExecutionId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListSimulationRunsRequest struct { + ctx context.Context + ApiService *SimulationsAPIService + runTestName *string + executionId *string + callExecutionId *string + evalName *string + summary *bool +} + +func (r ApiListSimulationRunsRequest) RunTestName(runTestName string) ApiListSimulationRunsRequest { + r.runTestName = &runTestName + return r +} + +func (r ApiListSimulationRunsRequest) ExecutionId(executionId string) ApiListSimulationRunsRequest { + r.executionId = &executionId + return r +} + +func (r ApiListSimulationRunsRequest) CallExecutionId(callExecutionId string) ApiListSimulationRunsRequest { + r.callExecutionId = &callExecutionId + return r +} + +func (r ApiListSimulationRunsRequest) EvalName(evalName string) ApiListSimulationRunsRequest { + r.evalName = &evalName + return r +} + +func (r ApiListSimulationRunsRequest) Summary(summary bool) ApiListSimulationRunsRequest { + r.summary = &summary + return r +} + +func (r ApiListSimulationRunsRequest) Execute() (*SDKSimulationRunsResponse, *http.Response, error) { + return r.ApiService.ListSimulationRunsExecute(r) +} + +/* +ListSimulationRuns GET /simulation/runs/ + +Run-level records with eval scores, scenario metadata, call details. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListSimulationRunsRequest +*/ +func (a *SimulationsAPIService) ListSimulationRuns(ctx context.Context) ApiListSimulationRunsRequest { + return ApiListSimulationRunsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SDKSimulationRunsResponse +func (a *SimulationsAPIService) ListSimulationRunsExecute(r ApiListSimulationRunsRequest) (*SDKSimulationRunsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SDKSimulationRunsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SimulationsAPIService.ListSimulationRuns") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/sdk/api/v1/simulation/runs/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.runTestName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "run_test_name", r.runTestName, "form", "") + } + if r.executionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "execution_id", r.executionId, "form", "") + } + if r.callExecutionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "call_execution_id", r.callExecutionId, "form", "") + } + if r.evalName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "eval_name", r.evalName, "form", "") + } + if r.summary != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "summary", r.summary, "form", "") + } else { + var defaultValue bool = false + r.summary = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v SDKErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_tracer.go b/go/futureagi/api_tracer.go new file mode 100644 index 0000000..ef5a684 --- /dev/null +++ b/go/futureagi/api_tracer.go @@ -0,0 +1,7175 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// TracerAPIService TracerAPI service +type TracerAPIService service + +type ApiTracerFeedIssuesCreateLinearIssueCreateRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string + createLinearIssue *CreateLinearIssue +} + +func (r ApiTracerFeedIssuesCreateLinearIssueCreateRequest) CreateLinearIssue(createLinearIssue CreateLinearIssue) ApiTracerFeedIssuesCreateLinearIssueCreateRequest { + r.createLinearIssue = &createLinearIssue + return r +} + +func (r ApiTracerFeedIssuesCreateLinearIssueCreateRequest) Execute() (*CreateLinearIssueResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesCreateLinearIssueCreateExecute(r) +} + +/* +TracerFeedIssuesCreateLinearIssueCreate Method for TracerFeedIssuesCreateLinearIssueCreate + +POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesCreateLinearIssueCreateRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesCreateLinearIssueCreate(ctx context.Context, clusterId string) ApiTracerFeedIssuesCreateLinearIssueCreateRequest { + return ApiTracerFeedIssuesCreateLinearIssueCreateRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return CreateLinearIssueResponse +func (a *TracerAPIService) TracerFeedIssuesCreateLinearIssueCreateExecute(r ApiTracerFeedIssuesCreateLinearIssueCreateRequest) (*CreateLinearIssueResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateLinearIssueResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesCreateLinearIssueCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/create-linear-issue/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createLinearIssue == nil { + return localVarReturnValue, nil, reportError("createLinearIssue is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createLinearIssue + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerFeedIssuesDeepAnalysisCreateRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string + deepAnalysisBody *DeepAnalysisBody +} + +func (r ApiTracerFeedIssuesDeepAnalysisCreateRequest) DeepAnalysisBody(deepAnalysisBody DeepAnalysisBody) ApiTracerFeedIssuesDeepAnalysisCreateRequest { + r.deepAnalysisBody = &deepAnalysisBody + return r +} + +func (r ApiTracerFeedIssuesDeepAnalysisCreateRequest) Execute() (*DeepAnalysisDispatchApiResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesDeepAnalysisCreateExecute(r) +} + +/* +TracerFeedIssuesDeepAnalysisCreate Method for TracerFeedIssuesDeepAnalysisCreate + +POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesDeepAnalysisCreateRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesDeepAnalysisCreate(ctx context.Context, clusterId string) ApiTracerFeedIssuesDeepAnalysisCreateRequest { + return ApiTracerFeedIssuesDeepAnalysisCreateRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return DeepAnalysisDispatchApiResponse +func (a *TracerAPIService) TracerFeedIssuesDeepAnalysisCreateExecute(r ApiTracerFeedIssuesDeepAnalysisCreateRequest) (*DeepAnalysisDispatchApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeepAnalysisDispatchApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesDeepAnalysisCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/deep-analysis/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deepAnalysisBody == nil { + return localVarReturnValue, nil, reportError("deepAnalysisBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deepAnalysisBody + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerFeedIssuesOverviewListRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string +} + +func (r ApiTracerFeedIssuesOverviewListRequest) Execute() (*OverviewApiResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesOverviewListExecute(r) +} + +/* +TracerFeedIssuesOverviewList Method for TracerFeedIssuesOverviewList + +GET /tracer/feed/issues/{cluster_id}/overview/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesOverviewListRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesOverviewList(ctx context.Context, clusterId string) ApiTracerFeedIssuesOverviewListRequest { + return ApiTracerFeedIssuesOverviewListRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return OverviewApiResponse +func (a *TracerAPIService) TracerFeedIssuesOverviewListExecute(r ApiTracerFeedIssuesOverviewListRequest) (*OverviewApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OverviewApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesOverviewList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/overview/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerFeedIssuesPartialUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string + feedUpdateBody *FeedUpdateBody +} + +func (r ApiTracerFeedIssuesPartialUpdateRequest) FeedUpdateBody(feedUpdateBody FeedUpdateBody) ApiTracerFeedIssuesPartialUpdateRequest { + r.feedUpdateBody = &feedUpdateBody + return r +} + +func (r ApiTracerFeedIssuesPartialUpdateRequest) Execute() (*FeedDetailApiResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesPartialUpdateExecute(r) +} + +/* +TracerFeedIssuesPartialUpdate Method for TracerFeedIssuesPartialUpdate + +GET + PATCH /tracer/feed/issues/{cluster_id}/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesPartialUpdateRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesPartialUpdate(ctx context.Context, clusterId string) ApiTracerFeedIssuesPartialUpdateRequest { + return ApiTracerFeedIssuesPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return FeedDetailApiResponse +func (a *TracerAPIService) TracerFeedIssuesPartialUpdateExecute(r ApiTracerFeedIssuesPartialUpdateRequest) (*FeedDetailApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FeedDetailApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.feedUpdateBody == nil { + return localVarReturnValue, nil, reportError("feedUpdateBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.feedUpdateBody + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerFeedIssuesRootCauseListRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string + traceId *string +} + +func (r ApiTracerFeedIssuesRootCauseListRequest) TraceId(traceId string) ApiTracerFeedIssuesRootCauseListRequest { + r.traceId = &traceId + return r +} + +func (r ApiTracerFeedIssuesRootCauseListRequest) Execute() (*DeepAnalysisApiResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesRootCauseListExecute(r) +} + +/* +TracerFeedIssuesRootCauseList GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + +Read cached deep-analysis results for a single trace within the +cluster. The frontend hits this on mount (to show existing results) +and polls it after a POST to /deep-analysis/ until “status“ flips +from “running“ to “done“ or “failed“. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesRootCauseListRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesRootCauseList(ctx context.Context, clusterId string) ApiTracerFeedIssuesRootCauseListRequest { + return ApiTracerFeedIssuesRootCauseListRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return DeepAnalysisApiResponse +func (a *TracerAPIService) TracerFeedIssuesRootCauseListExecute(r ApiTracerFeedIssuesRootCauseListRequest) (*DeepAnalysisApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeepAnalysisApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesRootCauseList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/root-cause/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceId == nil { + return localVarReturnValue, nil, reportError("traceId is required and must be specified") + } + if strlen(*r.traceId) < 1 { + return localVarReturnValue, nil, reportError("traceId must have at least 1 elements") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "trace_id", r.traceId, "form", "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerFeedIssuesSidebarListRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string + traceId *string +} + +func (r ApiTracerFeedIssuesSidebarListRequest) TraceId(traceId string) ApiTracerFeedIssuesSidebarListRequest { + r.traceId = &traceId + return r +} + +func (r ApiTracerFeedIssuesSidebarListRequest) Execute() (*FeedSidebarApiResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesSidebarListExecute(r) +} + +/* +TracerFeedIssuesSidebarList GET /tracer/feed/issues/{cluster_id}/sidebar/ + +Accepts an optional “?trace_id=“ query param. When present, the +trace-level sections (AI Metadata + Evaluations) are computed for +that trace instead of the cluster's latest, keeping the sidebar in +sync with the Overview tab's trace selection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesSidebarListRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesSidebarList(ctx context.Context, clusterId string) ApiTracerFeedIssuesSidebarListRequest { + return ApiTracerFeedIssuesSidebarListRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return FeedSidebarApiResponse +func (a *TracerAPIService) TracerFeedIssuesSidebarListExecute(r ApiTracerFeedIssuesSidebarListRequest) (*FeedSidebarApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FeedSidebarApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesSidebarList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/sidebar/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.traceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "trace_id", r.traceId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerFeedIssuesTracesListRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string + limit *int32 + offset *int32 +} + +func (r ApiTracerFeedIssuesTracesListRequest) Limit(limit int32) ApiTracerFeedIssuesTracesListRequest { + r.limit = &limit + return r +} + +func (r ApiTracerFeedIssuesTracesListRequest) Offset(offset int32) ApiTracerFeedIssuesTracesListRequest { + r.offset = &offset + return r +} + +func (r ApiTracerFeedIssuesTracesListRequest) Execute() (*TracesTabApiResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesTracesListExecute(r) +} + +/* +TracerFeedIssuesTracesList Method for TracerFeedIssuesTracesList + +GET /tracer/feed/issues/{cluster_id}/traces/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesTracesListRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesTracesList(ctx context.Context, clusterId string) ApiTracerFeedIssuesTracesListRequest { + return ApiTracerFeedIssuesTracesListRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return TracesTabApiResponse +func (a *TracerAPIService) TracerFeedIssuesTracesListExecute(r ApiTracerFeedIssuesTracesListRequest) (*TracesTabApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracesTabApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesTracesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/traces/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 50 + r.limit = &defaultValue + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerFeedIssuesTrendsListRequest struct { + ctx context.Context + ApiService *TracerAPIService + clusterId string + days *int32 +} + +func (r ApiTracerFeedIssuesTrendsListRequest) Days(days int32) ApiTracerFeedIssuesTrendsListRequest { + r.days = &days + return r +} + +func (r ApiTracerFeedIssuesTrendsListRequest) Execute() (*TrendsTabApiResponse, *http.Response, error) { + return r.ApiService.TracerFeedIssuesTrendsListExecute(r) +} + +/* +TracerFeedIssuesTrendsList Method for TracerFeedIssuesTrendsList + +GET /tracer/feed/issues/{cluster_id}/trends/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiTracerFeedIssuesTrendsListRequest +*/ +func (a *TracerAPIService) TracerFeedIssuesTrendsList(ctx context.Context, clusterId string) ApiTracerFeedIssuesTrendsListRequest { + return ApiTracerFeedIssuesTrendsListRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return TrendsTabApiResponse +func (a *TracerAPIService) TracerFeedIssuesTrendsListExecute(r ApiTracerFeedIssuesTrendsListRequest) (*TrendsTabApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TrendsTabApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerFeedIssuesTrendsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/trends/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.days != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "days", r.days, "form", "") + } else { + var defaultValue int32 = 14 + r.days = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceAgentGraphRequest struct { + ctx context.Context + ApiService *TracerAPIService + projectId *string + page *int32 + limit *int32 + filters *string +} + +func (r ApiTracerTraceAgentGraphRequest) ProjectId(projectId string) ApiTracerTraceAgentGraphRequest { + r.projectId = &projectId + return r +} + +// A page number within the paginated result set. +func (r ApiTracerTraceAgentGraphRequest) Page(page int32) ApiTracerTraceAgentGraphRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceAgentGraphRequest) Limit(limit int32) ApiTracerTraceAgentGraphRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceAgentGraphRequest) Filters(filters string) ApiTracerTraceAgentGraphRequest { + r.filters = &filters + return r +} + +func (r ApiTracerTraceAgentGraphRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.TracerTraceAgentGraphExecute(r) +} + +/* +TracerTraceAgentGraph Return the aggregate agent graph for a project. + +Computes nodes (distinct span types/names) and edges (parent→child +transitions) across all traces in the given time window. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceAgentGraphRequest +*/ +func (a *TracerAPIService) TracerTraceAgentGraph(ctx context.Context) ApiTracerTraceAgentGraphRequest { + return ApiTracerTraceAgentGraphRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracerAPIService) TracerTraceAgentGraphExecute(r ApiTracerTraceAgentGraphRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAgentGraph") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/agent_graph/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectId == nil { + return localVarReturnValue, nil, reportError("projectId is required and must be specified") + } + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceAnnotationCreateRequest struct { + ctx context.Context + ApiService *TracerAPIService + getTraceAnnotation *GetTraceAnnotation +} + +func (r ApiTracerTraceAnnotationCreateRequest) GetTraceAnnotation(getTraceAnnotation GetTraceAnnotation) ApiTracerTraceAnnotationCreateRequest { + r.getTraceAnnotation = &getTraceAnnotation + return r +} + +func (r ApiTracerTraceAnnotationCreateRequest) Execute() (*GetTraceAnnotation, *http.Response, error) { + return r.ApiService.TracerTraceAnnotationCreateExecute(r) +} + +/* +TracerTraceAnnotationCreate Method for TracerTraceAnnotationCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceAnnotationCreateRequest +*/ +func (a *TracerAPIService) TracerTraceAnnotationCreate(ctx context.Context) ApiTracerTraceAnnotationCreateRequest { + return ApiTracerTraceAnnotationCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GetTraceAnnotation +func (a *TracerAPIService) TracerTraceAnnotationCreateExecute(r ApiTracerTraceAnnotationCreateRequest) (*GetTraceAnnotation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetTraceAnnotation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAnnotationCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-annotation/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.getTraceAnnotation == nil { + return localVarReturnValue, nil, reportError("getTraceAnnotation is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.getTraceAnnotation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceAnnotationDeleteRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string +} + +func (r ApiTracerTraceAnnotationDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.TracerTraceAnnotationDeleteExecute(r) +} + +/* +TracerTraceAnnotationDelete Method for TracerTraceAnnotationDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceAnnotationDeleteRequest +*/ +func (a *TracerAPIService) TracerTraceAnnotationDelete(ctx context.Context, id string) ApiTracerTraceAnnotationDeleteRequest { + return ApiTracerTraceAnnotationDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TracerAPIService) TracerTraceAnnotationDeleteExecute(r ApiTracerTraceAnnotationDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAnnotationDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-annotation/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiTracerTraceAnnotationGetAnnotationValuesRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 + observationSpanId *string + traceId *string + annotators *string + excludeAnnotators *string +} + +// A page number within the paginated result set. +func (r ApiTracerTraceAnnotationGetAnnotationValuesRequest) Page(page int32) ApiTracerTraceAnnotationGetAnnotationValuesRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceAnnotationGetAnnotationValuesRequest) Limit(limit int32) ApiTracerTraceAnnotationGetAnnotationValuesRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceAnnotationGetAnnotationValuesRequest) ObservationSpanId(observationSpanId string) ApiTracerTraceAnnotationGetAnnotationValuesRequest { + r.observationSpanId = &observationSpanId + return r +} + +func (r ApiTracerTraceAnnotationGetAnnotationValuesRequest) TraceId(traceId string) ApiTracerTraceAnnotationGetAnnotationValuesRequest { + r.traceId = &traceId + return r +} + +func (r ApiTracerTraceAnnotationGetAnnotationValuesRequest) Annotators(annotators string) ApiTracerTraceAnnotationGetAnnotationValuesRequest { + r.annotators = &annotators + return r +} + +func (r ApiTracerTraceAnnotationGetAnnotationValuesRequest) ExcludeAnnotators(excludeAnnotators string) ApiTracerTraceAnnotationGetAnnotationValuesRequest { + r.excludeAnnotators = &excludeAnnotators + return r +} + +func (r ApiTracerTraceAnnotationGetAnnotationValuesRequest) Execute() (*GetTraceAnnotationValuesResponse, *http.Response, error) { + return r.ApiService.TracerTraceAnnotationGetAnnotationValuesExecute(r) +} + +/* +TracerTraceAnnotationGetAnnotationValues Method for TracerTraceAnnotationGetAnnotationValues + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceAnnotationGetAnnotationValuesRequest +*/ +func (a *TracerAPIService) TracerTraceAnnotationGetAnnotationValues(ctx context.Context) ApiTracerTraceAnnotationGetAnnotationValuesRequest { + return ApiTracerTraceAnnotationGetAnnotationValuesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GetTraceAnnotationValuesResponse +func (a *TracerAPIService) TracerTraceAnnotationGetAnnotationValuesExecute(r ApiTracerTraceAnnotationGetAnnotationValuesRequest) (*GetTraceAnnotationValuesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetTraceAnnotationValuesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAnnotationGetAnnotationValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-annotation/get_annotation_values/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.observationSpanId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "observation_span_id", r.observationSpanId, "form", "") + } + if r.traceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "trace_id", r.traceId, "form", "") + } + if r.annotators != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "annotators", r.annotators, "form", "") + } + if r.excludeAnnotators != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_annotators", r.excludeAnnotators, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceAnnotationListRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerTraceAnnotationListRequest) Page(page int32) ApiTracerTraceAnnotationListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceAnnotationListRequest) Limit(limit int32) ApiTracerTraceAnnotationListRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceAnnotationListRequest) Execute() (*TracerTraceAnnotationList200Response, *http.Response, error) { + return r.ApiService.TracerTraceAnnotationListExecute(r) +} + +/* +TracerTraceAnnotationList Method for TracerTraceAnnotationList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceAnnotationListRequest +*/ +func (a *TracerAPIService) TracerTraceAnnotationList(ctx context.Context) ApiTracerTraceAnnotationListRequest { + return ApiTracerTraceAnnotationListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceAnnotationList200Response +func (a *TracerAPIService) TracerTraceAnnotationListExecute(r ApiTracerTraceAnnotationListRequest) (*TracerTraceAnnotationList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceAnnotationList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAnnotationList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-annotation/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceAnnotationPartialUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + getTraceAnnotation *GetTraceAnnotation +} + +func (r ApiTracerTraceAnnotationPartialUpdateRequest) GetTraceAnnotation(getTraceAnnotation GetTraceAnnotation) ApiTracerTraceAnnotationPartialUpdateRequest { + r.getTraceAnnotation = &getTraceAnnotation + return r +} + +func (r ApiTracerTraceAnnotationPartialUpdateRequest) Execute() (*GetTraceAnnotation, *http.Response, error) { + return r.ApiService.TracerTraceAnnotationPartialUpdateExecute(r) +} + +/* +TracerTraceAnnotationPartialUpdate Method for TracerTraceAnnotationPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceAnnotationPartialUpdateRequest +*/ +func (a *TracerAPIService) TracerTraceAnnotationPartialUpdate(ctx context.Context, id string) ApiTracerTraceAnnotationPartialUpdateRequest { + return ApiTracerTraceAnnotationPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GetTraceAnnotation +func (a *TracerAPIService) TracerTraceAnnotationPartialUpdateExecute(r ApiTracerTraceAnnotationPartialUpdateRequest) (*GetTraceAnnotation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetTraceAnnotation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAnnotationPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-annotation/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.getTraceAnnotation == nil { + return localVarReturnValue, nil, reportError("getTraceAnnotation is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.getTraceAnnotation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceAnnotationReadRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string +} + +func (r ApiTracerTraceAnnotationReadRequest) Execute() (*GetTraceAnnotation, *http.Response, error) { + return r.ApiService.TracerTraceAnnotationReadExecute(r) +} + +/* +TracerTraceAnnotationRead Method for TracerTraceAnnotationRead + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceAnnotationReadRequest +*/ +func (a *TracerAPIService) TracerTraceAnnotationRead(ctx context.Context, id string) ApiTracerTraceAnnotationReadRequest { + return ApiTracerTraceAnnotationReadRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GetTraceAnnotation +func (a *TracerAPIService) TracerTraceAnnotationReadExecute(r ApiTracerTraceAnnotationReadRequest) (*GetTraceAnnotation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetTraceAnnotation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAnnotationRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-annotation/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceAnnotationUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + getTraceAnnotation *GetTraceAnnotation +} + +func (r ApiTracerTraceAnnotationUpdateRequest) GetTraceAnnotation(getTraceAnnotation GetTraceAnnotation) ApiTracerTraceAnnotationUpdateRequest { + r.getTraceAnnotation = &getTraceAnnotation + return r +} + +func (r ApiTracerTraceAnnotationUpdateRequest) Execute() (*GetTraceAnnotation, *http.Response, error) { + return r.ApiService.TracerTraceAnnotationUpdateExecute(r) +} + +/* +TracerTraceAnnotationUpdate Method for TracerTraceAnnotationUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceAnnotationUpdateRequest +*/ +func (a *TracerAPIService) TracerTraceAnnotationUpdate(ctx context.Context, id string) ApiTracerTraceAnnotationUpdateRequest { + return ApiTracerTraceAnnotationUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GetTraceAnnotation +func (a *TracerAPIService) TracerTraceAnnotationUpdateExecute(r ApiTracerTraceAnnotationUpdateRequest) (*GetTraceAnnotation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetTraceAnnotation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceAnnotationUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-annotation/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.getTraceAnnotation == nil { + return localVarReturnValue, nil, reportError("getTraceAnnotation is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.getTraceAnnotation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceBulkCreateRequest struct { + ctx context.Context + ApiService *TracerAPIService + trace *Trace +} + +func (r ApiTracerTraceBulkCreateRequest) Trace(trace Trace) ApiTracerTraceBulkCreateRequest { + r.trace = &trace + return r +} + +func (r ApiTracerTraceBulkCreateRequest) Execute() (*Trace, *http.Response, error) { + return r.ApiService.TracerTraceBulkCreateExecute(r) +} + +/* +TracerTraceBulkCreate Method for TracerTraceBulkCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceBulkCreateRequest +*/ +func (a *TracerAPIService) TracerTraceBulkCreate(ctx context.Context) ApiTracerTraceBulkCreateRequest { + return ApiTracerTraceBulkCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Trace +func (a *TracerAPIService) TracerTraceBulkCreateExecute(r ApiTracerTraceBulkCreateRequest) (*Trace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Trace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceBulkCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/bulk_create/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.trace == nil { + return localVarReturnValue, nil, reportError("trace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.trace + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceCompareTracesRequest struct { + ctx context.Context + ApiService *TracerAPIService + trace *Trace +} + +func (r ApiTracerTraceCompareTracesRequest) Trace(trace Trace) ApiTracerTraceCompareTracesRequest { + r.trace = &trace + return r +} + +func (r ApiTracerTraceCompareTracesRequest) Execute() (*Trace, *http.Response, error) { + return r.ApiService.TracerTraceCompareTracesExecute(r) +} + +/* +TracerTraceCompareTraces Method for TracerTraceCompareTraces + +Compare traces across project versions with optimized queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceCompareTracesRequest +*/ +func (a *TracerAPIService) TracerTraceCompareTraces(ctx context.Context) ApiTracerTraceCompareTracesRequest { + return ApiTracerTraceCompareTracesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Trace +func (a *TracerAPIService) TracerTraceCompareTracesExecute(r ApiTracerTraceCompareTracesRequest) (*Trace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Trace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceCompareTraces") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/compare_traces/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.trace == nil { + return localVarReturnValue, nil, reportError("trace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.trace + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceCreateRequest struct { + ctx context.Context + ApiService *TracerAPIService + trace *Trace +} + +func (r ApiTracerTraceCreateRequest) Trace(trace Trace) ApiTracerTraceCreateRequest { + r.trace = &trace + return r +} + +func (r ApiTracerTraceCreateRequest) Execute() (*Trace, *http.Response, error) { + return r.ApiService.TracerTraceCreateExecute(r) +} + +/* +TracerTraceCreate Method for TracerTraceCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceCreateRequest +*/ +func (a *TracerAPIService) TracerTraceCreate(ctx context.Context) ApiTracerTraceCreateRequest { + return ApiTracerTraceCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return Trace +func (a *TracerAPIService) TracerTraceCreateExecute(r ApiTracerTraceCreateRequest) (*Trace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Trace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.trace == nil { + return localVarReturnValue, nil, reportError("trace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.trace + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceDeleteRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string +} + +func (r ApiTracerTraceDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.TracerTraceDeleteExecute(r) +} + +/* +TracerTraceDelete Method for TracerTraceDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceDeleteRequest +*/ +func (a *TracerAPIService) TracerTraceDelete(ctx context.Context, id string) ApiTracerTraceDeleteRequest { + return ApiTracerTraceDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TracerAPIService) TracerTraceDeleteExecute(r ApiTracerTraceDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiTracerTraceGetEvalNamesRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerTraceGetEvalNamesRequest) Page(page int32) ApiTracerTraceGetEvalNamesRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceGetEvalNamesRequest) Limit(limit int32) ApiTracerTraceGetEvalNamesRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceGetEvalNamesRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.TracerTraceGetEvalNamesExecute(r) +} + +/* +TracerTraceGetEvalNames Method for TracerTraceGetEvalNames + +Fetch all evaluation template names. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceGetEvalNamesRequest +*/ +func (a *TracerAPIService) TracerTraceGetEvalNames(ctx context.Context) ApiTracerTraceGetEvalNamesRequest { + return ApiTracerTraceGetEvalNamesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracerAPIService) TracerTraceGetEvalNamesExecute(r ApiTracerTraceGetEvalNamesRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceGetEvalNames") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/get_eval_names/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceGetTraceExportDataRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerTraceGetTraceExportDataRequest) Page(page int32) ApiTracerTraceGetTraceExportDataRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceGetTraceExportDataRequest) Limit(limit int32) ApiTracerTraceGetTraceExportDataRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceGetTraceExportDataRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.TracerTraceGetTraceExportDataExecute(r) +} + +/* +TracerTraceGetTraceExportData Method for TracerTraceGetTraceExportData + +Export traces filtered by project ID with optimized queries. +Auto-detects voice/conversation projects and exports voice-specific fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceGetTraceExportDataRequest +*/ +func (a *TracerAPIService) TracerTraceGetTraceExportData(ctx context.Context) ApiTracerTraceGetTraceExportDataRequest { + return ApiTracerTraceGetTraceExportDataRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracerAPIService) TracerTraceGetTraceExportDataExecute(r ApiTracerTraceGetTraceExportDataRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceGetTraceExportData") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/get_trace_export_data/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceGetTraceIdByIndexRequest struct { + ctx context.Context + ApiService *TracerAPIService + traceId *string + projectVersionId *string + page *int32 + limit *int32 + filters *string +} + +func (r ApiTracerTraceGetTraceIdByIndexRequest) TraceId(traceId string) ApiTracerTraceGetTraceIdByIndexRequest { + r.traceId = &traceId + return r +} + +func (r ApiTracerTraceGetTraceIdByIndexRequest) ProjectVersionId(projectVersionId string) ApiTracerTraceGetTraceIdByIndexRequest { + r.projectVersionId = &projectVersionId + return r +} + +// A page number within the paginated result set. +func (r ApiTracerTraceGetTraceIdByIndexRequest) Page(page int32) ApiTracerTraceGetTraceIdByIndexRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceGetTraceIdByIndexRequest) Limit(limit int32) ApiTracerTraceGetTraceIdByIndexRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceGetTraceIdByIndexRequest) Filters(filters string) ApiTracerTraceGetTraceIdByIndexRequest { + r.filters = &filters + return r +} + +func (r ApiTracerTraceGetTraceIdByIndexRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.TracerTraceGetTraceIdByIndexExecute(r) +} + +/* +TracerTraceGetTraceIdByIndex Method for TracerTraceGetTraceIdByIndex + +Get the previous and next trace id by index using efficient database queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceGetTraceIdByIndexRequest +*/ +func (a *TracerAPIService) TracerTraceGetTraceIdByIndex(ctx context.Context) ApiTracerTraceGetTraceIdByIndexRequest { + return ApiTracerTraceGetTraceIdByIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracerAPIService) TracerTraceGetTraceIdByIndexExecute(r ApiTracerTraceGetTraceIdByIndexRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceGetTraceIdByIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/get_trace_id_by_index/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceId == nil { + return localVarReturnValue, nil, reportError("traceId is required and must be specified") + } + if r.projectVersionId == nil { + return localVarReturnValue, nil, reportError("projectVersionId is required and must be specified") + } + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "trace_id", r.traceId, "form", "") + parameterAddToHeaderOrQuery(localVarQueryParams, "project_version_id", r.projectVersionId, "form", "") + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceGetTraceIdByIndexObserveRequest struct { + ctx context.Context + ApiService *TracerAPIService + traceId *string + projectId *string + page *int32 + limit *int32 + filters *string +} + +func (r ApiTracerTraceGetTraceIdByIndexObserveRequest) TraceId(traceId string) ApiTracerTraceGetTraceIdByIndexObserveRequest { + r.traceId = &traceId + return r +} + +func (r ApiTracerTraceGetTraceIdByIndexObserveRequest) ProjectId(projectId string) ApiTracerTraceGetTraceIdByIndexObserveRequest { + r.projectId = &projectId + return r +} + +// A page number within the paginated result set. +func (r ApiTracerTraceGetTraceIdByIndexObserveRequest) Page(page int32) ApiTracerTraceGetTraceIdByIndexObserveRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceGetTraceIdByIndexObserveRequest) Limit(limit int32) ApiTracerTraceGetTraceIdByIndexObserveRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceGetTraceIdByIndexObserveRequest) Filters(filters string) ApiTracerTraceGetTraceIdByIndexObserveRequest { + r.filters = &filters + return r +} + +func (r ApiTracerTraceGetTraceIdByIndexObserveRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.TracerTraceGetTraceIdByIndexObserveExecute(r) +} + +/* +TracerTraceGetTraceIdByIndexObserve Method for TracerTraceGetTraceIdByIndexObserve + +Get the previous and next trace id by index. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceGetTraceIdByIndexObserveRequest +*/ +func (a *TracerAPIService) TracerTraceGetTraceIdByIndexObserve(ctx context.Context) ApiTracerTraceGetTraceIdByIndexObserveRequest { + return ApiTracerTraceGetTraceIdByIndexObserveRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracerAPIService) TracerTraceGetTraceIdByIndexObserveExecute(r ApiTracerTraceGetTraceIdByIndexObserveRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceGetTraceIdByIndexObserve") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/get_trace_id_by_index_observe/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceId == nil { + return localVarReturnValue, nil, reportError("traceId is required and must be specified") + } + if r.projectId == nil { + return localVarReturnValue, nil, reportError("projectId is required and must be specified") + } + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "trace_id", r.traceId, "form", "") + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceListRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerTraceListRequest) Page(page int32) ApiTracerTraceListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceListRequest) Limit(limit int32) ApiTracerTraceListRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceListRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.TracerTraceListExecute(r) +} + +/* +TracerTraceList Method for TracerTraceList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceListRequest +*/ +func (a *TracerAPIService) TracerTraceList(ctx context.Context) ApiTracerTraceListRequest { + return ApiTracerTraceListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracerAPIService) TracerTraceListExecute(r ApiTracerTraceListRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceListTracesOfSessionRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 + projectId *string + projectVersionId *string + sessionId *string + filters *string + pageNumber *int32 + pageSize *int32 + interval *string +} + +// A page number within the paginated result set. +func (r ApiTracerTraceListTracesOfSessionRequest) Page(page int32) ApiTracerTraceListTracesOfSessionRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceListTracesOfSessionRequest) Limit(limit int32) ApiTracerTraceListTracesOfSessionRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) ProjectId(projectId string) ApiTracerTraceListTracesOfSessionRequest { + r.projectId = &projectId + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) ProjectVersionId(projectVersionId string) ApiTracerTraceListTracesOfSessionRequest { + r.projectVersionId = &projectVersionId + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) SessionId(sessionId string) ApiTracerTraceListTracesOfSessionRequest { + r.sessionId = &sessionId + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) Filters(filters string) ApiTracerTraceListTracesOfSessionRequest { + r.filters = &filters + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) PageNumber(pageNumber int32) ApiTracerTraceListTracesOfSessionRequest { + r.pageNumber = &pageNumber + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) PageSize(pageSize int32) ApiTracerTraceListTracesOfSessionRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) Interval(interval string) ApiTracerTraceListTracesOfSessionRequest { + r.interval = &interval + return r +} + +func (r ApiTracerTraceListTracesOfSessionRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.TracerTraceListTracesOfSessionExecute(r) +} + +/* +TracerTraceListTracesOfSession Method for TracerTraceListTracesOfSession + +List traces filtered by project ID with optimized queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceListTracesOfSessionRequest +*/ +func (a *TracerAPIService) TracerTraceListTracesOfSession(ctx context.Context) ApiTracerTraceListTracesOfSessionRequest { + return ApiTracerTraceListTracesOfSessionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracerAPIService) TracerTraceListTracesOfSessionExecute(r ApiTracerTraceListTracesOfSessionRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceListTracesOfSession") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/list_traces_of_session/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + if r.projectVersionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_version_id", r.projectVersionId, "form", "") + } + if r.sessionId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "session_id", r.sessionId, "form", "") + } + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + if r.pageNumber != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_number", r.pageNumber, "form", "") + } else { + var defaultValue int32 = 0 + r.pageNumber = &defaultValue + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } else { + var defaultValue int32 = 30 + r.pageSize = &defaultValue + } + if r.interval != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "interval", r.interval, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTracePartialUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + trace *Trace +} + +func (r ApiTracerTracePartialUpdateRequest) Trace(trace Trace) ApiTracerTracePartialUpdateRequest { + r.trace = &trace + return r +} + +func (r ApiTracerTracePartialUpdateRequest) Execute() (*Trace, *http.Response, error) { + return r.ApiService.TracerTracePartialUpdateExecute(r) +} + +/* +TracerTracePartialUpdate Method for TracerTracePartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTracePartialUpdateRequest +*/ +func (a *TracerAPIService) TracerTracePartialUpdate(ctx context.Context, id string) ApiTracerTracePartialUpdateRequest { + return ApiTracerTracePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Trace +func (a *TracerAPIService) TracerTracePartialUpdateExecute(r ApiTracerTracePartialUpdateRequest) (*Trace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Trace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTracePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.trace == nil { + return localVarReturnValue, nil, reportError("trace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.trace + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionCreateRequest struct { + ctx context.Context + ApiService *TracerAPIService + traceSession *TraceSession +} + +func (r ApiTracerTraceSessionCreateRequest) TraceSession(traceSession TraceSession) ApiTracerTraceSessionCreateRequest { + r.traceSession = &traceSession + return r +} + +func (r ApiTracerTraceSessionCreateRequest) Execute() (*TraceSession, *http.Response, error) { + return r.ApiService.TracerTraceSessionCreateExecute(r) +} + +/* +TracerTraceSessionCreate Method for TracerTraceSessionCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceSessionCreateRequest +*/ +func (a *TracerAPIService) TracerTraceSessionCreate(ctx context.Context) ApiTracerTraceSessionCreateRequest { + return ApiTracerTraceSessionCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TraceSession +func (a *TracerAPIService) TracerTraceSessionCreateExecute(r ApiTracerTraceSessionCreateRequest) (*TraceSession, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TraceSession + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceSession == nil { + return localVarReturnValue, nil, reportError("traceSession is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.traceSession + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionDeleteRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string +} + +func (r ApiTracerTraceSessionDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.TracerTraceSessionDeleteExecute(r) +} + +/* +TracerTraceSessionDelete Method for TracerTraceSessionDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceSessionDeleteRequest +*/ +func (a *TracerAPIService) TracerTraceSessionDelete(ctx context.Context, id string) ApiTracerTraceSessionDeleteRequest { + return ApiTracerTraceSessionDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TracerAPIService) TracerTraceSessionDeleteExecute(r ApiTracerTraceSessionDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionEvalLogsRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string +} + +func (r ApiTracerTraceSessionEvalLogsRequest) Execute() (*TraceSession, *http.Response, error) { + return r.ApiService.TracerTraceSessionEvalLogsExecute(r) +} + +/* +TracerTraceSessionEvalLogs Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + +Session-level eval results are walled off from span/trace surfaces +by “target_type='session'“ — this endpoint is the only place +they appear. + +Query params: + + page (int, 0-indexed, default 0) + page_size (int, default 25, max 100) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceSessionEvalLogsRequest +*/ +func (a *TracerAPIService) TracerTraceSessionEvalLogs(ctx context.Context, id string) ApiTracerTraceSessionEvalLogsRequest { + return ApiTracerTraceSessionEvalLogsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TraceSession +func (a *TracerAPIService) TracerTraceSessionEvalLogsExecute(r ApiTracerTraceSessionEvalLogsRequest) (*TraceSession, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TraceSession + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionEvalLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/{id}/eval_logs/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionGetSessionFilterValuesRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerTraceSessionGetSessionFilterValuesRequest) Page(page int32) ApiTracerTraceSessionGetSessionFilterValuesRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceSessionGetSessionFilterValuesRequest) Limit(limit int32) ApiTracerTraceSessionGetSessionFilterValuesRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceSessionGetSessionFilterValuesRequest) Execute() (*TracerTraceSessionList200Response, *http.Response, error) { + return r.ApiService.TracerTraceSessionGetSessionFilterValuesExecute(r) +} + +/* +TracerTraceSessionGetSessionFilterValues Method for TracerTraceSessionGetSessionFilterValues + +Return distinct values for a session-level column. +Used by the filter panel's value picker for session-specific fields +(session_id, user_id, first_message, etc.). + +Query params: + + project_id: required + column: canonical session column name, e.g. "session_id" + search: optional search substring + page: page number (0-based), default 0 + page_size: default 50 + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceSessionGetSessionFilterValuesRequest +*/ +func (a *TracerAPIService) TracerTraceSessionGetSessionFilterValues(ctx context.Context) ApiTracerTraceSessionGetSessionFilterValuesRequest { + return ApiTracerTraceSessionGetSessionFilterValuesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceSessionList200Response +func (a *TracerAPIService) TracerTraceSessionGetSessionFilterValuesExecute(r ApiTracerTraceSessionGetSessionFilterValuesRequest) (*TracerTraceSessionList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceSessionList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionGetSessionFilterValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/get_session_filter_values/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionGetTraceSessionExportDataRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerTraceSessionGetTraceSessionExportDataRequest) Page(page int32) ApiTracerTraceSessionGetTraceSessionExportDataRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceSessionGetTraceSessionExportDataRequest) Limit(limit int32) ApiTracerTraceSessionGetTraceSessionExportDataRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceSessionGetTraceSessionExportDataRequest) Execute() (*TracerTraceSessionList200Response, *http.Response, error) { + return r.ApiService.TracerTraceSessionGetTraceSessionExportDataExecute(r) +} + +/* +TracerTraceSessionGetTraceSessionExportData Method for TracerTraceSessionGetTraceSessionExportData + +Export traces filtered by project ID and project version ID with optimized queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceSessionGetTraceSessionExportDataRequest +*/ +func (a *TracerAPIService) TracerTraceSessionGetTraceSessionExportData(ctx context.Context) ApiTracerTraceSessionGetTraceSessionExportDataRequest { + return ApiTracerTraceSessionGetTraceSessionExportDataRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceSessionList200Response +func (a *TracerAPIService) TracerTraceSessionGetTraceSessionExportDataExecute(r ApiTracerTraceSessionGetTraceSessionExportDataRequest) (*TracerTraceSessionList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceSessionList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionGetTraceSessionExportData") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/get_trace_session_export_data/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionListRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerTraceSessionListRequest) Page(page int32) ApiTracerTraceSessionListRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerTraceSessionListRequest) Limit(limit int32) ApiTracerTraceSessionListRequest { + r.limit = &limit + return r +} + +func (r ApiTracerTraceSessionListRequest) Execute() (*TracerTraceSessionList200Response, *http.Response, error) { + return r.ApiService.TracerTraceSessionListExecute(r) +} + +/* +TracerTraceSessionList Method for TracerTraceSessionList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerTraceSessionListRequest +*/ +func (a *TracerAPIService) TracerTraceSessionList(ctx context.Context) ApiTracerTraceSessionListRequest { + return ApiTracerTraceSessionListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceSessionList200Response +func (a *TracerAPIService) TracerTraceSessionListExecute(r ApiTracerTraceSessionListRequest) (*TracerTraceSessionList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceSessionList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionPartialUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + traceSession *TraceSession +} + +func (r ApiTracerTraceSessionPartialUpdateRequest) TraceSession(traceSession TraceSession) ApiTracerTraceSessionPartialUpdateRequest { + r.traceSession = &traceSession + return r +} + +func (r ApiTracerTraceSessionPartialUpdateRequest) Execute() (*TraceSession, *http.Response, error) { + return r.ApiService.TracerTraceSessionPartialUpdateExecute(r) +} + +/* +TracerTraceSessionPartialUpdate Method for TracerTraceSessionPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceSessionPartialUpdateRequest +*/ +func (a *TracerAPIService) TracerTraceSessionPartialUpdate(ctx context.Context, id string) ApiTracerTraceSessionPartialUpdateRequest { + return ApiTracerTraceSessionPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TraceSession +func (a *TracerAPIService) TracerTraceSessionPartialUpdateExecute(r ApiTracerTraceSessionPartialUpdateRequest) (*TraceSession, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TraceSession + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceSession == nil { + return localVarReturnValue, nil, reportError("traceSession is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.traceSession + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceSessionUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + traceSession *TraceSession +} + +func (r ApiTracerTraceSessionUpdateRequest) TraceSession(traceSession TraceSession) ApiTracerTraceSessionUpdateRequest { + r.traceSession = &traceSession + return r +} + +func (r ApiTracerTraceSessionUpdateRequest) Execute() (*TraceSession, *http.Response, error) { + return r.ApiService.TracerTraceSessionUpdateExecute(r) +} + +/* +TracerTraceSessionUpdate Method for TracerTraceSessionUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceSessionUpdateRequest +*/ +func (a *TracerAPIService) TracerTraceSessionUpdate(ctx context.Context, id string) ApiTracerTraceSessionUpdateRequest { + return ApiTracerTraceSessionUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TraceSession +func (a *TracerAPIService) TracerTraceSessionUpdateExecute(r ApiTracerTraceSessionUpdateRequest) (*TraceSession, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TraceSession + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceSessionUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceSession == nil { + return localVarReturnValue, nil, reportError("traceSession is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.traceSession + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerTraceUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + trace *Trace +} + +func (r ApiTracerTraceUpdateRequest) Trace(trace Trace) ApiTracerTraceUpdateRequest { + r.trace = &trace + return r +} + +func (r ApiTracerTraceUpdateRequest) Execute() (*Trace, *http.Response, error) { + return r.ApiService.TracerTraceUpdateExecute(r) +} + +/* +TracerTraceUpdate Method for TracerTraceUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerTraceUpdateRequest +*/ +func (a *TracerAPIService) TracerTraceUpdate(ctx context.Context, id string) ApiTracerTraceUpdateRequest { + return ApiTracerTraceUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Trace +func (a *TracerAPIService) TracerTraceUpdateExecute(r ApiTracerTraceUpdateRequest) (*Trace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Trace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerTraceUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.trace == nil { + return localVarReturnValue, nil, reportError("trace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.trace + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerUserAlertLogsCreateRequest struct { + ctx context.Context + ApiService *TracerAPIService + userAlertMonitorLog *UserAlertMonitorLog +} + +func (r ApiTracerUserAlertLogsCreateRequest) UserAlertMonitorLog(userAlertMonitorLog UserAlertMonitorLog) ApiTracerUserAlertLogsCreateRequest { + r.userAlertMonitorLog = &userAlertMonitorLog + return r +} + +func (r ApiTracerUserAlertLogsCreateRequest) Execute() (*UserAlertMonitorLog, *http.Response, error) { + return r.ApiService.TracerUserAlertLogsCreateExecute(r) +} + +/* +TracerUserAlertLogsCreate Method for TracerUserAlertLogsCreate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerUserAlertLogsCreateRequest +*/ +func (a *TracerAPIService) TracerUserAlertLogsCreate(ctx context.Context) ApiTracerUserAlertLogsCreateRequest { + return ApiTracerUserAlertLogsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorLog +func (a *TracerAPIService) TracerUserAlertLogsCreateExecute(r ApiTracerUserAlertLogsCreateRequest) (*UserAlertMonitorLog, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUserAlertLogsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitorLog == nil { + return localVarReturnValue, nil, reportError("userAlertMonitorLog is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitorLog + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerUserAlertLogsDeleteRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string +} + +func (r ApiTracerUserAlertLogsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.TracerUserAlertLogsDeleteExecute(r) +} + +/* +TracerUserAlertLogsDelete Method for TracerUserAlertLogsDelete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerUserAlertLogsDeleteRequest +*/ +func (a *TracerAPIService) TracerUserAlertLogsDelete(ctx context.Context, id string) ApiTracerUserAlertLogsDeleteRequest { + return ApiTracerUserAlertLogsDeleteRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *TracerAPIService) TracerUserAlertLogsDeleteExecute(r ApiTracerUserAlertLogsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUserAlertLogsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiTracerUserAlertLogsPartialUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + userAlertMonitorLog *UserAlertMonitorLog +} + +func (r ApiTracerUserAlertLogsPartialUpdateRequest) UserAlertMonitorLog(userAlertMonitorLog UserAlertMonitorLog) ApiTracerUserAlertLogsPartialUpdateRequest { + r.userAlertMonitorLog = &userAlertMonitorLog + return r +} + +func (r ApiTracerUserAlertLogsPartialUpdateRequest) Execute() (*UserAlertMonitorLog, *http.Response, error) { + return r.ApiService.TracerUserAlertLogsPartialUpdateExecute(r) +} + +/* +TracerUserAlertLogsPartialUpdate Method for TracerUserAlertLogsPartialUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerUserAlertLogsPartialUpdateRequest +*/ +func (a *TracerAPIService) TracerUserAlertLogsPartialUpdate(ctx context.Context, id string) ApiTracerUserAlertLogsPartialUpdateRequest { + return ApiTracerUserAlertLogsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorLog +func (a *TracerAPIService) TracerUserAlertLogsPartialUpdateExecute(r ApiTracerUserAlertLogsPartialUpdateRequest) (*UserAlertMonitorLog, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUserAlertLogsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitorLog == nil { + return localVarReturnValue, nil, reportError("userAlertMonitorLog is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitorLog + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerUserAlertLogsUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + userAlertMonitorLog *UserAlertMonitorLog +} + +func (r ApiTracerUserAlertLogsUpdateRequest) UserAlertMonitorLog(userAlertMonitorLog UserAlertMonitorLog) ApiTracerUserAlertLogsUpdateRequest { + r.userAlertMonitorLog = &userAlertMonitorLog + return r +} + +func (r ApiTracerUserAlertLogsUpdateRequest) Execute() (*UserAlertMonitorLog, *http.Response, error) { + return r.ApiService.TracerUserAlertLogsUpdateExecute(r) +} + +/* +TracerUserAlertLogsUpdate Method for TracerUserAlertLogsUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerUserAlertLogsUpdateRequest +*/ +func (a *TracerAPIService) TracerUserAlertLogsUpdate(ctx context.Context, id string) ApiTracerUserAlertLogsUpdateRequest { + return ApiTracerUserAlertLogsUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorLog +func (a *TracerAPIService) TracerUserAlertLogsUpdateExecute(r ApiTracerUserAlertLogsUpdateRequest) (*UserAlertMonitorLog, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUserAlertLogsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alert-logs/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitorLog == nil { + return localVarReturnValue, nil, reportError("userAlertMonitorLog is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitorLog + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerUserAlertsDuplicateRequest struct { + ctx context.Context + ApiService *TracerAPIService + userAlertMonitorDuplicate *UserAlertMonitorDuplicate +} + +func (r ApiTracerUserAlertsDuplicateRequest) UserAlertMonitorDuplicate(userAlertMonitorDuplicate UserAlertMonitorDuplicate) ApiTracerUserAlertsDuplicateRequest { + r.userAlertMonitorDuplicate = &userAlertMonitorDuplicate + return r +} + +func (r ApiTracerUserAlertsDuplicateRequest) Execute() (*UserAlertMonitorDuplicateResponse, *http.Response, error) { + return r.ApiService.TracerUserAlertsDuplicateExecute(r) +} + +/* +TracerUserAlertsDuplicate Method for TracerUserAlertsDuplicate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerUserAlertsDuplicateRequest +*/ +func (a *TracerAPIService) TracerUserAlertsDuplicate(ctx context.Context) ApiTracerUserAlertsDuplicateRequest { + return ApiTracerUserAlertsDuplicateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserAlertMonitorDuplicateResponse +func (a *TracerAPIService) TracerUserAlertsDuplicateExecute(r ApiTracerUserAlertsDuplicateRequest) (*UserAlertMonitorDuplicateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitorDuplicateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUserAlertsDuplicate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/duplicate/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitorDuplicate == nil { + return localVarReturnValue, nil, reportError("userAlertMonitorDuplicate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitorDuplicate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerUserAlertsListMonitorsRequest struct { + ctx context.Context + ApiService *TracerAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiTracerUserAlertsListMonitorsRequest) Page(page int32) ApiTracerUserAlertsListMonitorsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiTracerUserAlertsListMonitorsRequest) Limit(limit int32) ApiTracerUserAlertsListMonitorsRequest { + r.limit = &limit + return r +} + +func (r ApiTracerUserAlertsListMonitorsRequest) Execute() (*ListAlerts200Response, *http.Response, error) { + return r.ApiService.TracerUserAlertsListMonitorsExecute(r) +} + +/* +TracerUserAlertsListMonitors Method for TracerUserAlertsListMonitors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerUserAlertsListMonitorsRequest +*/ +func (a *TracerAPIService) TracerUserAlertsListMonitors(ctx context.Context) ApiTracerUserAlertsListMonitorsRequest { + return ApiTracerUserAlertsListMonitorsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListAlerts200Response +func (a *TracerAPIService) TracerUserAlertsListMonitorsExecute(r ApiTracerUserAlertsListMonitorsRequest) (*ListAlerts200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAlerts200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUserAlertsListMonitors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/list_monitors/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerUserAlertsUpdateRequest struct { + ctx context.Context + ApiService *TracerAPIService + id string + userAlertMonitor *UserAlertMonitor +} + +func (r ApiTracerUserAlertsUpdateRequest) UserAlertMonitor(userAlertMonitor UserAlertMonitor) ApiTracerUserAlertsUpdateRequest { + r.userAlertMonitor = &userAlertMonitor + return r +} + +func (r ApiTracerUserAlertsUpdateRequest) Execute() (*UserAlertMonitor, *http.Response, error) { + return r.ApiService.TracerUserAlertsUpdateExecute(r) +} + +/* +TracerUserAlertsUpdate Method for TracerUserAlertsUpdate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiTracerUserAlertsUpdateRequest +*/ +func (a *TracerAPIService) TracerUserAlertsUpdate(ctx context.Context, id string) ApiTracerUserAlertsUpdateRequest { + return ApiTracerUserAlertsUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return UserAlertMonitor +func (a *TracerAPIService) TracerUserAlertsUpdateExecute(r ApiTracerUserAlertsUpdateRequest) (*UserAlertMonitor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserAlertMonitor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUserAlertsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/user-alerts/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userAlertMonitor == nil { + return localVarReturnValue, nil, reportError("userAlertMonitor is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userAlertMonitor + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTracerUsersGetCodeExampleListRequest struct { + ctx context.Context + ApiService *TracerAPIService +} + +func (r ApiTracerUsersGetCodeExampleListRequest) Execute() (*UserCodeExampleResponse, *http.Response, error) { + return r.ApiService.TracerUsersGetCodeExampleListExecute(r) +} + +/* +TracerUsersGetCodeExampleList Method for TracerUsersGetCodeExampleList + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTracerUsersGetCodeExampleListRequest +*/ +func (a *TracerAPIService) TracerUsersGetCodeExampleList(ctx context.Context) ApiTracerUsersGetCodeExampleListRequest { + return ApiTracerUsersGetCodeExampleListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserCodeExampleResponse +func (a *TracerAPIService) TracerUsersGetCodeExampleListExecute(r ApiTracerUsersGetCodeExampleListRequest) (*UserCodeExampleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserCodeExampleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracerAPIService.TracerUsersGetCodeExampleList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/users/get_code_example/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_tracing.go b/go/futureagi/api_tracing.go new file mode 100644 index 0000000..598dc8b --- /dev/null +++ b/go/futureagi/api_tracing.go @@ -0,0 +1,3080 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// TracingAPIService TracingAPI service +type TracingAPIService service + +type ApiCreateBulkTraceAnnotationRequest struct { + ctx context.Context + ApiService *TracingAPIService + bulkAnnotationRequest *BulkAnnotationRequest +} + +func (r ApiCreateBulkTraceAnnotationRequest) BulkAnnotationRequest(bulkAnnotationRequest BulkAnnotationRequest) ApiCreateBulkTraceAnnotationRequest { + r.bulkAnnotationRequest = &bulkAnnotationRequest + return r +} + +func (r ApiCreateBulkTraceAnnotationRequest) Execute() (*BulkAnnotationResponse, *http.Response, error) { + return r.ApiService.CreateBulkTraceAnnotationExecute(r) +} + +/* +CreateBulkTraceAnnotation Method for CreateBulkTraceAnnotation + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateBulkTraceAnnotationRequest +*/ +func (a *TracingAPIService) CreateBulkTraceAnnotation(ctx context.Context) ApiCreateBulkTraceAnnotationRequest { + return ApiCreateBulkTraceAnnotationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return BulkAnnotationResponse +func (a *TracingAPIService) CreateBulkTraceAnnotationExecute(r ApiCreateBulkTraceAnnotationRequest) (*BulkAnnotationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BulkAnnotationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.CreateBulkTraceAnnotation") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/bulk-annotation/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.bulkAnnotationRequest == nil { + return localVarReturnValue, nil, reportError("bulkAnnotationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.bulkAnnotationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetErrorFeedIssueRequest struct { + ctx context.Context + ApiService *TracingAPIService + clusterId string + projectId *string +} + +func (r ApiGetErrorFeedIssueRequest) ProjectId(projectId string) ApiGetErrorFeedIssueRequest { + r.projectId = &projectId + return r +} + +func (r ApiGetErrorFeedIssueRequest) Execute() (*FeedDetailApiResponse, *http.Response, error) { + return r.ApiService.GetErrorFeedIssueExecute(r) +} + +/* +GetErrorFeedIssue Method for GetErrorFeedIssue + +GET + PATCH /tracer/feed/issues/{cluster_id}/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clusterId + @return ApiGetErrorFeedIssueRequest +*/ +func (a *TracingAPIService) GetErrorFeedIssue(ctx context.Context, clusterId string) ApiGetErrorFeedIssueRequest { + return ApiGetErrorFeedIssueRequest{ + ApiService: a, + ctx: ctx, + clusterId: clusterId, + } +} + +// Execute executes the request +// +// @return FeedDetailApiResponse +func (a *TracingAPIService) GetErrorFeedIssueExecute(r ApiGetErrorFeedIssueRequest) (*FeedDetailApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FeedDetailApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.GetErrorFeedIssue") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/{cluster_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"cluster_id"+"}", url.PathEscape(parameterValueToString(r.clusterId, "clusterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetErrorFeedIssueStatsRequest struct { + ctx context.Context + ApiService *TracingAPIService + projectId *string + timeRangeDays *int32 +} + +func (r ApiGetErrorFeedIssueStatsRequest) ProjectId(projectId string) ApiGetErrorFeedIssueStatsRequest { + r.projectId = &projectId + return r +} + +func (r ApiGetErrorFeedIssueStatsRequest) TimeRangeDays(timeRangeDays int32) ApiGetErrorFeedIssueStatsRequest { + r.timeRangeDays = &timeRangeDays + return r +} + +func (r ApiGetErrorFeedIssueStatsRequest) Execute() (*FeedStatsApiResponse, *http.Response, error) { + return r.ApiService.GetErrorFeedIssueStatsExecute(r) +} + +/* +GetErrorFeedIssueStats Method for GetErrorFeedIssueStats + +GET /tracer/feed/issues/stats/ — top stats bar totals. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetErrorFeedIssueStatsRequest +*/ +func (a *TracingAPIService) GetErrorFeedIssueStats(ctx context.Context) ApiGetErrorFeedIssueStatsRequest { + return ApiGetErrorFeedIssueStatsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return FeedStatsApiResponse +func (a *TracingAPIService) GetErrorFeedIssueStatsExecute(r ApiGetErrorFeedIssueStatsRequest) (*FeedStatsApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FeedStatsApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.GetErrorFeedIssueStats") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/stats/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + if r.timeRangeDays != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "time_range_days", r.timeRangeDays, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTraceRequest struct { + ctx context.Context + ApiService *TracingAPIService + id string +} + +func (r ApiGetTraceRequest) Execute() (*Trace, *http.Response, error) { + return r.ApiService.GetTraceExecute(r) +} + +/* +GetTrace Method for GetTrace + +Retrieve a trace by its ID. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetTraceRequest +*/ +func (a *TracingAPIService) GetTrace(ctx context.Context, id string) ApiGetTraceRequest { + return ApiGetTraceRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Trace +func (a *TracingAPIService) GetTraceExecute(r ApiGetTraceRequest) (*Trace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Trace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.GetTrace") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTraceGraphMethodsRequest struct { + ctx context.Context + ApiService *TracingAPIService + observeGraphDataRequest *ObserveGraphDataRequest +} + +func (r ApiGetTraceGraphMethodsRequest) ObserveGraphDataRequest(observeGraphDataRequest ObserveGraphDataRequest) ApiGetTraceGraphMethodsRequest { + r.observeGraphDataRequest = &observeGraphDataRequest + return r +} + +func (r ApiGetTraceGraphMethodsRequest) Execute() (*ObserveGraphDataResponse, *http.Response, error) { + return r.ApiService.GetTraceGraphMethodsExecute(r) +} + +/* +GetTraceGraphMethods Method for GetTraceGraphMethods + +Fetch data for the observe graph with optimized queries + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetTraceGraphMethodsRequest +*/ +func (a *TracingAPIService) GetTraceGraphMethods(ctx context.Context) ApiGetTraceGraphMethodsRequest { + return ApiGetTraceGraphMethodsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ObserveGraphDataResponse +func (a *TracingAPIService) GetTraceGraphMethodsExecute(r ApiGetTraceGraphMethodsRequest) (*ObserveGraphDataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObserveGraphDataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.GetTraceGraphMethods") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/get_graph_methods/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.observeGraphDataRequest == nil { + return localVarReturnValue, nil, reportError("observeGraphDataRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.observeGraphDataRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTraceSessionRequest struct { + ctx context.Context + ApiService *TracingAPIService + id string +} + +func (r ApiGetTraceSessionRequest) Execute() (*TraceSession, *http.Response, error) { + return r.ApiService.GetTraceSessionExecute(r) +} + +/* +GetTraceSession Method for GetTraceSession + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetTraceSessionRequest +*/ +func (a *TracingAPIService) GetTraceSession(ctx context.Context, id string) ApiGetTraceSessionRequest { + return ApiGetTraceSessionRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TraceSession +func (a *TracingAPIService) GetTraceSessionExecute(r ApiGetTraceSessionRequest) (*TraceSession, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TraceSession + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.GetTraceSession") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/{id}/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTraceSessionGraphDataRequest struct { + ctx context.Context + ApiService *TracingAPIService + traceSessionGraphDataRequest *TraceSessionGraphDataRequest +} + +func (r ApiGetTraceSessionGraphDataRequest) TraceSessionGraphDataRequest(traceSessionGraphDataRequest TraceSessionGraphDataRequest) ApiGetTraceSessionGraphDataRequest { + r.traceSessionGraphDataRequest = &traceSessionGraphDataRequest + return r +} + +func (r ApiGetTraceSessionGraphDataRequest) Execute() (*TraceSessionGraphDataRequest, *http.Response, error) { + return r.ApiService.GetTraceSessionGraphDataExecute(r) +} + +/* +GetTraceSessionGraphData Fetch time-series session metrics for the observe graph. + +Supports the same metric types as the trace graph endpoint: + - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + avg_duration, avg_traces_per_session — all aggregated at session level + - EVAL: eval scores averaged across sessions + - ANNOTATION: annotation scores averaged across sessions + +Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetTraceSessionGraphDataRequest +*/ +func (a *TracingAPIService) GetTraceSessionGraphData(ctx context.Context) ApiGetTraceSessionGraphDataRequest { + return ApiGetTraceSessionGraphDataRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TraceSessionGraphDataRequest +func (a *TracingAPIService) GetTraceSessionGraphDataExecute(r ApiGetTraceSessionGraphDataRequest) (*TraceSessionGraphDataRequest, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TraceSessionGraphDataRequest + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.GetTraceSessionGraphData") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/get_session_graph_data/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceSessionGraphDataRequest == nil { + return localVarReturnValue, nil, reportError("traceSessionGraphDataRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.traceSessionGraphDataRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetVoiceCallDetailRequest struct { + ctx context.Context + ApiService *TracingAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiGetVoiceCallDetailRequest) Page(page int32) ApiGetVoiceCallDetailRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiGetVoiceCallDetailRequest) Limit(limit int32) ApiGetVoiceCallDetailRequest { + r.limit = &limit + return r +} + +func (r ApiGetVoiceCallDetailRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.GetVoiceCallDetailExecute(r) +} + +/* +GetVoiceCallDetail Return the heavy / detail-only fields for a single voice call. + +Query params: +- trace_id (required) — UUID of the voice call trace. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetVoiceCallDetailRequest +*/ +func (a *TracingAPIService) GetVoiceCallDetail(ctx context.Context) ApiGetVoiceCallDetailRequest { + return ApiGetVoiceCallDetailRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracingAPIService) GetVoiceCallDetailExecute(r ApiGetVoiceCallDetailRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.GetVoiceCallDetail") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/voice_call_detail/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListErrorFeedIssuesRequest struct { + ctx context.Context + ApiService *TracingAPIService + projectId *string + search *string + status *string + fixLayer *string + source *string + issueGroup *string + timeRangeDays *int32 + sortBy *string + sortDir *string + limit *int32 + offset *int32 +} + +func (r ApiListErrorFeedIssuesRequest) ProjectId(projectId string) ApiListErrorFeedIssuesRequest { + r.projectId = &projectId + return r +} + +func (r ApiListErrorFeedIssuesRequest) Search(search string) ApiListErrorFeedIssuesRequest { + r.search = &search + return r +} + +func (r ApiListErrorFeedIssuesRequest) Status(status string) ApiListErrorFeedIssuesRequest { + r.status = &status + return r +} + +func (r ApiListErrorFeedIssuesRequest) FixLayer(fixLayer string) ApiListErrorFeedIssuesRequest { + r.fixLayer = &fixLayer + return r +} + +func (r ApiListErrorFeedIssuesRequest) Source(source string) ApiListErrorFeedIssuesRequest { + r.source = &source + return r +} + +func (r ApiListErrorFeedIssuesRequest) IssueGroup(issueGroup string) ApiListErrorFeedIssuesRequest { + r.issueGroup = &issueGroup + return r +} + +func (r ApiListErrorFeedIssuesRequest) TimeRangeDays(timeRangeDays int32) ApiListErrorFeedIssuesRequest { + r.timeRangeDays = &timeRangeDays + return r +} + +func (r ApiListErrorFeedIssuesRequest) SortBy(sortBy string) ApiListErrorFeedIssuesRequest { + r.sortBy = &sortBy + return r +} + +func (r ApiListErrorFeedIssuesRequest) SortDir(sortDir string) ApiListErrorFeedIssuesRequest { + r.sortDir = &sortDir + return r +} + +func (r ApiListErrorFeedIssuesRequest) Limit(limit int32) ApiListErrorFeedIssuesRequest { + r.limit = &limit + return r +} + +func (r ApiListErrorFeedIssuesRequest) Offset(offset int32) ApiListErrorFeedIssuesRequest { + r.offset = &offset + return r +} + +func (r ApiListErrorFeedIssuesRequest) Execute() (*FeedListApiResponse, *http.Response, error) { + return r.ApiService.ListErrorFeedIssuesExecute(r) +} + +/* +ListErrorFeedIssues Method for ListErrorFeedIssues + +GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListErrorFeedIssuesRequest +*/ +func (a *TracingAPIService) ListErrorFeedIssues(ctx context.Context) ApiListErrorFeedIssuesRequest { + return ApiListErrorFeedIssuesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return FeedListApiResponse +func (a *TracingAPIService) ListErrorFeedIssuesExecute(r ApiListErrorFeedIssuesRequest) (*FeedListApiResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FeedListApiResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListErrorFeedIssues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/feed/issues/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.fixLayer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fix_layer", r.fixLayer, "form", "") + } + if r.source != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source", r.source, "form", "") + } + if r.issueGroup != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "issue_group", r.issueGroup, "form", "") + } + if r.timeRangeDays != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "time_range_days", r.timeRangeDays, "form", "") + } + if r.sortBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort_by", r.sortBy, "form", "") + } else { + var defaultValue string = "last_seen" + r.sortBy = &defaultValue + } + if r.sortDir != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort_dir", r.sortDir, "form", "") + } else { + var defaultValue string = "desc" + r.sortDir = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 25 + r.limit = &defaultValue + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTraceAnnotationLabelsRequest struct { + ctx context.Context + ApiService *TracingAPIService + projectId *string +} + +func (r ApiListTraceAnnotationLabelsRequest) ProjectId(projectId string) ApiListTraceAnnotationLabelsRequest { + r.projectId = &projectId + return r +} + +func (r ApiListTraceAnnotationLabelsRequest) Execute() (*GetAnnotationLabelsResponse, *http.Response, error) { + return r.ApiService.ListTraceAnnotationLabelsExecute(r) +} + +/* +ListTraceAnnotationLabels Method for ListTraceAnnotationLabels + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTraceAnnotationLabelsRequest +*/ +func (a *TracingAPIService) ListTraceAnnotationLabels(ctx context.Context) ApiListTraceAnnotationLabelsRequest { + return ApiListTraceAnnotationLabelsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GetAnnotationLabelsResponse +func (a *TracingAPIService) ListTraceAnnotationLabelsExecute(r ApiListTraceAnnotationLabelsRequest) (*GetAnnotationLabelsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetAnnotationLabelsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListTraceAnnotationLabels") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/get-annotation-labels/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTraceProjectsRequest struct { + ctx context.Context + ApiService *TracingAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListTraceProjectsRequest) Page(page int32) ApiListTraceProjectsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListTraceProjectsRequest) Limit(limit int32) ApiListTraceProjectsRequest { + r.limit = &limit + return r +} + +func (r ApiListTraceProjectsRequest) Execute() (*ListTraceProjects200Response, *http.Response, error) { + return r.ApiService.ListTraceProjectsExecute(r) +} + +/* +ListTraceProjects List projects filtered by organization ID. + +Volume counts come from ClickHouse (fast) instead of a PG +JOIN on observation_spans (was 12+ seconds). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTraceProjectsRequest +*/ +func (a *TracingAPIService) ListTraceProjects(ctx context.Context) ApiListTraceProjectsRequest { + return ApiListTraceProjectsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListTraceProjects200Response +func (a *TracingAPIService) ListTraceProjectsExecute(r ApiListTraceProjectsRequest) (*ListTraceProjects200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListTraceProjects200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListTraceProjects") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/project/list_projects/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTracePropertiesRequest struct { + ctx context.Context + ApiService *TracingAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListTracePropertiesRequest) Page(page int32) ApiListTracePropertiesRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListTracePropertiesRequest) Limit(limit int32) ApiListTracePropertiesRequest { + r.limit = &limit + return r +} + +func (r ApiListTracePropertiesRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.ListTracePropertiesExecute(r) +} + +/* +ListTraceProperties Method for ListTraceProperties + +Fetch all properties for graphing. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTracePropertiesRequest +*/ +func (a *TracingAPIService) ListTraceProperties(ctx context.Context) ApiListTracePropertiesRequest { + return ApiListTracePropertiesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracingAPIService) ListTracePropertiesExecute(r ApiListTracePropertiesRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListTraceProperties") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/get_properties/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTraceSessionsRequest struct { + ctx context.Context + ApiService *TracingAPIService + page *int32 + limit *int32 + projectId *string + userId *string + bookmarked *bool + filters *string + sortParams *string + pageNumber *int32 + pageSize *int32 + interval *string +} + +// A page number within the paginated result set. +func (r ApiListTraceSessionsRequest) Page(page int32) ApiListTraceSessionsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListTraceSessionsRequest) Limit(limit int32) ApiListTraceSessionsRequest { + r.limit = &limit + return r +} + +func (r ApiListTraceSessionsRequest) ProjectId(projectId string) ApiListTraceSessionsRequest { + r.projectId = &projectId + return r +} + +func (r ApiListTraceSessionsRequest) UserId(userId string) ApiListTraceSessionsRequest { + r.userId = &userId + return r +} + +func (r ApiListTraceSessionsRequest) Bookmarked(bookmarked bool) ApiListTraceSessionsRequest { + r.bookmarked = &bookmarked + return r +} + +func (r ApiListTraceSessionsRequest) Filters(filters string) ApiListTraceSessionsRequest { + r.filters = &filters + return r +} + +func (r ApiListTraceSessionsRequest) SortParams(sortParams string) ApiListTraceSessionsRequest { + r.sortParams = &sortParams + return r +} + +func (r ApiListTraceSessionsRequest) PageNumber(pageNumber int32) ApiListTraceSessionsRequest { + r.pageNumber = &pageNumber + return r +} + +func (r ApiListTraceSessionsRequest) PageSize(pageSize int32) ApiListTraceSessionsRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiListTraceSessionsRequest) Interval(interval string) ApiListTraceSessionsRequest { + r.interval = &interval + return r +} + +func (r ApiListTraceSessionsRequest) Execute() (*TracerTraceSessionList200Response, *http.Response, error) { + return r.ApiService.ListTraceSessionsExecute(r) +} + +/* +ListTraceSessions Method for ListTraceSessions + +List traces filtered by project ID and project version ID with optimized queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTraceSessionsRequest +*/ +func (a *TracingAPIService) ListTraceSessions(ctx context.Context) ApiListTraceSessionsRequest { + return ApiListTraceSessionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceSessionList200Response +func (a *TracingAPIService) ListTraceSessionsExecute(r ApiListTraceSessionsRequest) (*TracerTraceSessionList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceSessionList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListTraceSessions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace-session/list_sessions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + if r.userId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "user_id", r.userId, "form", "") + } + if r.bookmarked != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "bookmarked", r.bookmarked, "form", "") + } + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + if r.sortParams != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort_params", r.sortParams, "form", "") + } else { + var defaultValue string = "[]" + r.sortParams = &defaultValue + } + if r.pageNumber != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_number", r.pageNumber, "form", "") + } else { + var defaultValue int32 = 0 + r.pageNumber = &defaultValue + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } else { + var defaultValue int32 = 30 + r.pageSize = &defaultValue + } + if r.interval != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "interval", r.interval, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTraceUsersRequest struct { + ctx context.Context + ApiService *TracingAPIService + projectId *string + search *string + pageSize *int32 + currentPageIndex *int32 + sortParams *string + filters *string +} + +func (r ApiListTraceUsersRequest) ProjectId(projectId string) ApiListTraceUsersRequest { + r.projectId = &projectId + return r +} + +func (r ApiListTraceUsersRequest) Search(search string) ApiListTraceUsersRequest { + r.search = &search + return r +} + +func (r ApiListTraceUsersRequest) PageSize(pageSize int32) ApiListTraceUsersRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiListTraceUsersRequest) CurrentPageIndex(currentPageIndex int32) ApiListTraceUsersRequest { + r.currentPageIndex = ¤tPageIndex + return r +} + +func (r ApiListTraceUsersRequest) SortParams(sortParams string) ApiListTraceUsersRequest { + r.sortParams = &sortParams + return r +} + +func (r ApiListTraceUsersRequest) Filters(filters string) ApiListTraceUsersRequest { + r.filters = &filters + return r +} + +func (r ApiListTraceUsersRequest) Execute() (*UsersResponse, *http.Response, error) { + return r.ApiService.ListTraceUsersExecute(r) +} + +/* +ListTraceUsers Method for ListTraceUsers + +List traces filtered by project ID with optimized queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTraceUsersRequest +*/ +func (a *TracingAPIService) ListTraceUsers(ctx context.Context) ApiListTraceUsersRequest { + return ApiListTraceUsersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UsersResponse +func (a *TracingAPIService) ListTraceUsersExecute(r ApiListTraceUsersRequest) (*UsersResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UsersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListTraceUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/users/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.projectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project_id", r.projectId, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.currentPageIndex != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "current_page_index", r.currentPageIndex, "form", "") + } + if r.sortParams != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort_params", r.sortParams, "form", "") + } else { + var defaultValue string = "[]" + r.sortParams = &defaultValue + } + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTracesRequest struct { + ctx context.Context + ApiService *TracingAPIService + projectVersionId *string + page *int32 + limit *int32 + traceIds *string + filters *string + sortParams *string + pageNumber *int32 + pageSize *int32 +} + +func (r ApiListTracesRequest) ProjectVersionId(projectVersionId string) ApiListTracesRequest { + r.projectVersionId = &projectVersionId + return r +} + +// A page number within the paginated result set. +func (r ApiListTracesRequest) Page(page int32) ApiListTracesRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListTracesRequest) Limit(limit int32) ApiListTracesRequest { + r.limit = &limit + return r +} + +func (r ApiListTracesRequest) TraceIds(traceIds string) ApiListTracesRequest { + r.traceIds = &traceIds + return r +} + +func (r ApiListTracesRequest) Filters(filters string) ApiListTracesRequest { + r.filters = &filters + return r +} + +func (r ApiListTracesRequest) SortParams(sortParams string) ApiListTracesRequest { + r.sortParams = &sortParams + return r +} + +func (r ApiListTracesRequest) PageNumber(pageNumber int32) ApiListTracesRequest { + r.pageNumber = &pageNumber + return r +} + +func (r ApiListTracesRequest) PageSize(pageSize int32) ApiListTracesRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiListTracesRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.ListTracesExecute(r) +} + +/* +ListTraces Method for ListTraces + +List traces filtered by project ID and project version ID with optimized queries. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTracesRequest +*/ +func (a *TracingAPIService) ListTraces(ctx context.Context) ApiListTracesRequest { + return ApiListTracesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracingAPIService) ListTracesExecute(r ApiListTracesRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListTraces") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/list_traces/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.projectVersionId == nil { + return localVarReturnValue, nil, reportError("projectVersionId is required and must be specified") + } + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "project_version_id", r.projectVersionId, "form", "") + if r.traceIds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "trace_ids", r.traceIds, "form", "") + } + if r.filters != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filters", r.filters, "form", "") + } else { + var defaultValue string = "[]" + r.filters = &defaultValue + } + if r.sortParams != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort_params", r.sortParams, "form", "") + } else { + var defaultValue string = "[]" + r.sortParams = &defaultValue + } + if r.pageNumber != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_number", r.pageNumber, "form", "") + } else { + var defaultValue int32 = 0 + r.pageNumber = &defaultValue + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } else { + var defaultValue int32 = 30 + r.pageSize = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListVoiceCallsRequest struct { + ctx context.Context + ApiService *TracingAPIService + page *int32 + limit *int32 +} + +// A page number within the paginated result set. +func (r ApiListVoiceCallsRequest) Page(page int32) ApiListVoiceCallsRequest { + r.page = &page + return r +} + +// Number of results to return per page. +func (r ApiListVoiceCallsRequest) Limit(limit int32) ApiListVoiceCallsRequest { + r.limit = &limit + return r +} + +func (r ApiListVoiceCallsRequest) Execute() (*TracerTraceList200Response, *http.Response, error) { + return r.ApiService.ListVoiceCallsExecute(r) +} + +/* +ListVoiceCalls Method for ListVoiceCalls + +List voice/conversation traces for a project in an optimized way and +return a response similar to the provided call object schema. + +Query params: +- project_id (required) +- page (1-based, optional, default 1) +- page_size (optional, default 30) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListVoiceCallsRequest +*/ +func (a *TracingAPIService) ListVoiceCalls(ctx context.Context) ApiListVoiceCallsRequest { + return ApiListVoiceCallsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return TracerTraceList200Response +func (a *TracingAPIService) ListVoiceCallsExecute(r ApiListVoiceCallsRequest) (*TracerTraceList200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TracerTraceList200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.ListVoiceCalls") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/list_voice_calls/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateTraceTagsRequest struct { + ctx context.Context + ApiService *TracingAPIService + id string + traceTagsUpdate *TraceTagsUpdate +} + +func (r ApiUpdateTraceTagsRequest) TraceTagsUpdate(traceTagsUpdate TraceTagsUpdate) ApiUpdateTraceTagsRequest { + r.traceTagsUpdate = &traceTagsUpdate + return r +} + +func (r ApiUpdateTraceTagsRequest) Execute() (*TraceTagsUpdate, *http.Response, error) { + return r.ApiService.UpdateTraceTagsExecute(r) +} + +/* +UpdateTraceTags Method for UpdateTraceTags + +Update tags for a trace. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiUpdateTraceTagsRequest +*/ +func (a *TracingAPIService) UpdateTraceTags(ctx context.Context, id string) ApiUpdateTraceTagsRequest { + return ApiUpdateTraceTagsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return TraceTagsUpdate +func (a *TracingAPIService) UpdateTraceTagsExecute(r ApiUpdateTraceTagsRequest) (*TraceTagsUpdate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TraceTagsUpdate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracingAPIService.UpdateTraceTags") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tracer/trace/{id}/tags/" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.traceTagsUpdate == nil { + return localVarReturnValue, nil, reportError("traceTagsUpdate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.traceTagsUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/api_users.go b/go/futureagi/api_users.go new file mode 100644 index 0000000..334049c --- /dev/null +++ b/go/futureagi/api_users.go @@ -0,0 +1,1174 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// UsersAPIService UsersAPI service +type UsersAPIService service + +type ApiGetCurrentUserRequest struct { + ctx context.Context + ApiService *UsersAPIService +} + +func (r ApiGetCurrentUserRequest) Execute() (*UserInfoResponse, *http.Response, error) { + return r.ApiService.GetCurrentUserExecute(r) +} + +/* +GetCurrentUser Method for GetCurrentUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetCurrentUserRequest +*/ +func (a *UsersAPIService) GetCurrentUser(ctx context.Context) ApiGetCurrentUserRequest { + return ApiGetCurrentUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserInfoResponse +func (a *UsersAPIService) GetCurrentUserExecute(r ApiGetCurrentUserRequest) (*UserInfoResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserInfoResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.GetCurrentUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/user-info/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListOrganizationMembersRequest struct { + ctx context.Context + ApiService *UsersAPIService + page *int32 + limit *int32 + search *string + filterStatus *[]string + filterRole *[]string + sort *string +} + +func (r ApiListOrganizationMembersRequest) Page(page int32) ApiListOrganizationMembersRequest { + r.page = &page + return r +} + +func (r ApiListOrganizationMembersRequest) Limit(limit int32) ApiListOrganizationMembersRequest { + r.limit = &limit + return r +} + +func (r ApiListOrganizationMembersRequest) Search(search string) ApiListOrganizationMembersRequest { + r.search = &search + return r +} + +func (r ApiListOrganizationMembersRequest) FilterStatus(filterStatus []string) ApiListOrganizationMembersRequest { + r.filterStatus = &filterStatus + return r +} + +func (r ApiListOrganizationMembersRequest) FilterRole(filterRole []string) ApiListOrganizationMembersRequest { + r.filterRole = &filterRole + return r +} + +func (r ApiListOrganizationMembersRequest) Sort(sort string) ApiListOrganizationMembersRequest { + r.sort = &sort + return r +} + +func (r ApiListOrganizationMembersRequest) Execute() (*MemberListResponse, *http.Response, error) { + return r.ApiService.ListOrganizationMembersExecute(r) +} + +/* +ListOrganizationMembers GET /accounts/organization/members/ + +Returns UNION of active members + pending/expired invites. +Status is derived at query time (Active / Pending / Expired). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListOrganizationMembersRequest +*/ +func (a *UsersAPIService) ListOrganizationMembers(ctx context.Context) ApiListOrganizationMembersRequest { + return ApiListOrganizationMembersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return MemberListResponse +func (a *UsersAPIService) ListOrganizationMembersExecute(r ApiListOrganizationMembersRequest) (*MemberListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MemberListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.ListOrganizationMembers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/organization/members/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.filterStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter_status", r.filterStatus, "form", "csv") + } + if r.filterRole != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter_role", r.filterRole, "form", "csv") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") + } else { + var defaultValue string = "-created_at" + r.sort = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListWorkspaceMembersRequest struct { + ctx context.Context + ApiService *UsersAPIService + workspaceId string + page *int32 + limit *int32 + search *string + filterStatus *[]string + filterRole *[]string + sort *string +} + +func (r ApiListWorkspaceMembersRequest) Page(page int32) ApiListWorkspaceMembersRequest { + r.page = &page + return r +} + +func (r ApiListWorkspaceMembersRequest) Limit(limit int32) ApiListWorkspaceMembersRequest { + r.limit = &limit + return r +} + +func (r ApiListWorkspaceMembersRequest) Search(search string) ApiListWorkspaceMembersRequest { + r.search = &search + return r +} + +func (r ApiListWorkspaceMembersRequest) FilterStatus(filterStatus []string) ApiListWorkspaceMembersRequest { + r.filterStatus = &filterStatus + return r +} + +func (r ApiListWorkspaceMembersRequest) FilterRole(filterRole []string) ApiListWorkspaceMembersRequest { + r.filterRole = &filterRole + return r +} + +func (r ApiListWorkspaceMembersRequest) Sort(sort string) ApiListWorkspaceMembersRequest { + r.sort = &sort + return r +} + +func (r ApiListWorkspaceMembersRequest) Execute() (*MemberListResponse, *http.Response, error) { + return r.ApiService.ListWorkspaceMembersExecute(r) +} + +/* +ListWorkspaceMembers GET /accounts/workspace//members/ + +Returns members of a specific workspace. +Org Admin+ users who auto-access are included with derived WS Admin role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workspaceId + @return ApiListWorkspaceMembersRequest +*/ +func (a *UsersAPIService) ListWorkspaceMembers(ctx context.Context, workspaceId string) ApiListWorkspaceMembersRequest { + return ApiListWorkspaceMembersRequest{ + ApiService: a, + ctx: ctx, + workspaceId: workspaceId, + } +} + +// Execute executes the request +// +// @return MemberListResponse +func (a *UsersAPIService) ListWorkspaceMembersExecute(r ApiListWorkspaceMembersRequest) (*MemberListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MemberListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.ListWorkspaceMembers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/workspace/{workspace_id}/members/" + localVarPath = strings.Replace(localVarPath, "{"+"workspace_id"+"}", url.PathEscape(parameterValueToString(r.workspaceId, "workspaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.filterStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter_status", r.filterStatus, "form", "csv") + } + if r.filterRole != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter_role", r.filterRole, "form", "csv") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") + } else { + var defaultValue string = "-created_at" + r.sort = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListWorkspacesRequest struct { + ctx context.Context + ApiService *UsersAPIService + page *int32 + limit *int32 + search *string + sort *string +} + +func (r ApiListWorkspacesRequest) Page(page int32) ApiListWorkspacesRequest { + r.page = &page + return r +} + +func (r ApiListWorkspacesRequest) Limit(limit int32) ApiListWorkspacesRequest { + r.limit = &limit + return r +} + +func (r ApiListWorkspacesRequest) Search(search string) ApiListWorkspacesRequest { + r.search = &search + return r +} + +func (r ApiListWorkspacesRequest) Sort(sort string) ApiListWorkspacesRequest { + r.sort = &sort + return r +} + +func (r ApiListWorkspacesRequest) Execute() (*WorkspaceListPaginatedResponse, *http.Response, error) { + return r.ApiService.ListWorkspacesExecute(r) +} + +/* +ListWorkspaces Method for ListWorkspaces + +Get paginated list of workspaces + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListWorkspacesRequest +*/ +func (a *UsersAPIService) ListWorkspaces(ctx context.Context) ApiListWorkspacesRequest { + return ApiListWorkspacesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return WorkspaceListPaginatedResponse +func (a *UsersAPIService) ListWorkspacesExecute(r ApiListWorkspacesRequest) (*WorkspaceListPaginatedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkspaceListPaginatedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.ListWorkspaces") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/workspace/list/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int32 = 1 + r.page = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 10 + r.limit = &defaultValue + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } else { + var defaultValue string = "" + r.search = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") + } else { + var defaultValue string = "" + r.sort = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSwitchWorkspaceRequest struct { + ctx context.Context + ApiService *UsersAPIService + switchWorkspace *SwitchWorkspace +} + +func (r ApiSwitchWorkspaceRequest) SwitchWorkspace(switchWorkspace SwitchWorkspace) ApiSwitchWorkspaceRequest { + r.switchWorkspace = &switchWorkspace + return r +} + +func (r ApiSwitchWorkspaceRequest) Execute() (*SwitchWorkspaceResponse, *http.Response, error) { + return r.ApiService.SwitchWorkspaceExecute(r) +} + +/* +SwitchWorkspace Method for SwitchWorkspace + +Switch to a different workspace with proper validation + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSwitchWorkspaceRequest +*/ +func (a *UsersAPIService) SwitchWorkspace(ctx context.Context) ApiSwitchWorkspaceRequest { + return ApiSwitchWorkspaceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SwitchWorkspaceResponse +func (a *UsersAPIService) SwitchWorkspaceExecute(r ApiSwitchWorkspaceRequest) (*SwitchWorkspaceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SwitchWorkspaceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.SwitchWorkspace") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/accounts/workspace/switch/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.switchWorkspace == nil { + return localVarReturnValue, nil, reportError("switchWorkspace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.switchWorkspace + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Secret-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Secret-Key"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Api-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Api-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v AccountsErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ManagementAPIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/futureagi/client.go b/go/futureagi/client.go new file mode 100644 index 0000000..039fbfd --- /dev/null +++ b/go/futureagi/client.go @@ -0,0 +1,722 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the Future AGI Public SDK API API v0.1.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AccountsAPI *AccountsAPIService + + AlertsAPI *AlertsAPIService + + AnnotationQueueDiscussionAPI *AnnotationQueueDiscussionAPIService + + AnnotationQueueItemsAPI *AnnotationQueueItemsAPIService + + AnnotationQueueReviewAPI *AnnotationQueueReviewAPIService + + AnnotationQueuesAPI *AnnotationQueuesAPIService + + DatasetsAPI *DatasetsAPIService + + ExperimentsAPI *ExperimentsAPIService + + ModelHubAPI *ModelHubAPIService + + RunTestsEvalConfigsAPI *RunTestsEvalConfigsAPIService + + RunTestsEvalSummaryAPI *RunTestsEvalSummaryAPIService + + ScenariosAPI *ScenariosAPIService + + SdkAPI *SdkAPIService + + SimulateAPI *SimulateAPIService + + SimulationAgentDefinitionsAPI *SimulationAgentDefinitionsAPIService + + SimulationPersonasAPI *SimulationPersonasAPIService + + SimulationRunTestsAPI *SimulationRunTestsAPIService + + SimulationScenariosAPI *SimulationScenariosAPIService + + SimulationTestExecutionsAPI *SimulationTestExecutionsAPIService + + SimulationsAPI *SimulationsAPIService + + TracerAPI *TracerAPIService + + TracingAPI *TracingAPIService + + UsersAPI *UsersAPIService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AccountsAPI = (*AccountsAPIService)(&c.common) + c.AlertsAPI = (*AlertsAPIService)(&c.common) + c.AnnotationQueueDiscussionAPI = (*AnnotationQueueDiscussionAPIService)(&c.common) + c.AnnotationQueueItemsAPI = (*AnnotationQueueItemsAPIService)(&c.common) + c.AnnotationQueueReviewAPI = (*AnnotationQueueReviewAPIService)(&c.common) + c.AnnotationQueuesAPI = (*AnnotationQueuesAPIService)(&c.common) + c.DatasetsAPI = (*DatasetsAPIService)(&c.common) + c.ExperimentsAPI = (*ExperimentsAPIService)(&c.common) + c.ModelHubAPI = (*ModelHubAPIService)(&c.common) + c.RunTestsEvalConfigsAPI = (*RunTestsEvalConfigsAPIService)(&c.common) + c.RunTestsEvalSummaryAPI = (*RunTestsEvalSummaryAPIService)(&c.common) + c.ScenariosAPI = (*ScenariosAPIService)(&c.common) + c.SdkAPI = (*SdkAPIService)(&c.common) + c.SimulateAPI = (*SimulateAPIService)(&c.common) + c.SimulationAgentDefinitionsAPI = (*SimulationAgentDefinitionsAPIService)(&c.common) + c.SimulationPersonasAPI = (*SimulationPersonasAPIService)(&c.common) + c.SimulationRunTestsAPI = (*SimulationRunTestsAPIService)(&c.common) + c.SimulationScenariosAPI = (*SimulationScenariosAPIService)(&c.common) + c.SimulationTestExecutionsAPI = (*SimulationTestExecutionsAPIService)(&c.common) + c.SimulationsAPI = (*SimulationsAPIService)(&c.common) + c.TracerAPI = (*TracerAPIService)(&c.common) + c.TracingAPI = (*TracingAPIService)(&c.common) + c.UsersAPI = (*UsersAPIService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/go/futureagi/configuration.go b/go/futureagi/configuration.go new file mode 100644 index 0000000..086aa37 --- /dev/null +++ b/go/futureagi/configuration.go @@ -0,0 +1,218 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/0.1.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://api.futureagi.com", + Description: "No description provided", + }, + }, + OperationServers: map[string]ServerConfigurations{}, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/go/futureagi/docs/AccountsAPI.md b/go/futureagi/docs/AccountsAPI.md new file mode 100644 index 0000000..41195d2 --- /dev/null +++ b/go/futureagi/docs/AccountsAPI.md @@ -0,0 +1,355 @@ +# \AccountsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AccountsOrganizationMembersReactivateCreate**](AccountsAPI.md#AccountsOrganizationMembersReactivateCreate) | **Post** /accounts/organization/members/reactivate/ | POST /accounts/organization/members/reactivate/ +[**AccountsOrganizationMembersRemoveDelete**](AccountsAPI.md#AccountsOrganizationMembersRemoveDelete) | **Delete** /accounts/organization/members/remove/ | DELETE /accounts/organization/members/remove/ +[**AccountsOrganizationMembersRoleCreate**](AccountsAPI.md#AccountsOrganizationMembersRoleCreate) | **Post** /accounts/organization/members/role/ | POST /accounts/organization/members/role/ +[**AccountsWorkspaceMembersRemoveDelete**](AccountsAPI.md#AccountsWorkspaceMembersRemoveDelete) | **Delete** /accounts/workspace/{workspace_id}/members/remove/ | DELETE /accounts/workspace/<workspace_id>/members/remove/ +[**AccountsWorkspaceMembersRoleCreate**](AccountsAPI.md#AccountsWorkspaceMembersRoleCreate) | **Post** /accounts/workspace/{workspace_id}/members/role/ | POST /accounts/workspace/<workspace_id>/members/role/ + + + +## AccountsOrganizationMembersReactivateCreate + +> MemberUserMutationResponse AccountsOrganizationMembersReactivateCreate(ctx).MemberRemove(memberRemove).Execute() + +POST /accounts/organization/members/reactivate/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + memberRemove := *openapiclient.NewMemberRemove("UserId_example") // MemberRemove | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsAPI.AccountsOrganizationMembersReactivateCreate(context.Background()).MemberRemove(memberRemove).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.AccountsOrganizationMembersReactivateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AccountsOrganizationMembersReactivateCreate`: MemberUserMutationResponse + fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.AccountsOrganizationMembersReactivateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAccountsOrganizationMembersReactivateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberRemove** | [**MemberRemove**](MemberRemove.md) | | + +### Return type + +[**MemberUserMutationResponse**](MemberUserMutationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AccountsOrganizationMembersRemoveDelete + +> MemberUserMutationResponse AccountsOrganizationMembersRemoveDelete(ctx).MemberRemove(memberRemove).Execute() + +DELETE /accounts/organization/members/remove/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + memberRemove := *openapiclient.NewMemberRemove("UserId_example") // MemberRemove | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsAPI.AccountsOrganizationMembersRemoveDelete(context.Background()).MemberRemove(memberRemove).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.AccountsOrganizationMembersRemoveDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AccountsOrganizationMembersRemoveDelete`: MemberUserMutationResponse + fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.AccountsOrganizationMembersRemoveDelete`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAccountsOrganizationMembersRemoveDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberRemove** | [**MemberRemove**](MemberRemove.md) | | + +### Return type + +[**MemberUserMutationResponse**](MemberUserMutationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AccountsOrganizationMembersRoleCreate + +> MemberRoleUpdateResponse AccountsOrganizationMembersRoleCreate(ctx).MemberRoleUpdate(memberRoleUpdate).Execute() + +POST /accounts/organization/members/role/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + memberRoleUpdate := *openapiclient.NewMemberRoleUpdate("UserId_example") // MemberRoleUpdate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsAPI.AccountsOrganizationMembersRoleCreate(context.Background()).MemberRoleUpdate(memberRoleUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.AccountsOrganizationMembersRoleCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AccountsOrganizationMembersRoleCreate`: MemberRoleUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.AccountsOrganizationMembersRoleCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAccountsOrganizationMembersRoleCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberRoleUpdate** | [**MemberRoleUpdate**](MemberRoleUpdate.md) | | + +### Return type + +[**MemberRoleUpdateResponse**](MemberRoleUpdateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AccountsWorkspaceMembersRemoveDelete + +> MemberUserMutationResponse AccountsWorkspaceMembersRemoveDelete(ctx, workspaceId).WorkspaceMemberRemove(workspaceMemberRemove).Execute() + +DELETE /accounts/workspace//members/remove/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + workspaceId := "workspaceId_example" // string | + workspaceMemberRemove := *openapiclient.NewWorkspaceMemberRemove("UserId_example") // WorkspaceMemberRemove | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsAPI.AccountsWorkspaceMembersRemoveDelete(context.Background(), workspaceId).WorkspaceMemberRemove(workspaceMemberRemove).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.AccountsWorkspaceMembersRemoveDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AccountsWorkspaceMembersRemoveDelete`: MemberUserMutationResponse + fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.AccountsWorkspaceMembersRemoveDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workspaceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAccountsWorkspaceMembersRemoveDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **workspaceMemberRemove** | [**WorkspaceMemberRemove**](WorkspaceMemberRemove.md) | | + +### Return type + +[**MemberUserMutationResponse**](MemberUserMutationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AccountsWorkspaceMembersRoleCreate + +> WorkspaceMemberRoleUpdateResponse AccountsWorkspaceMembersRoleCreate(ctx, workspaceId).WorkspaceMemberRoleUpdate(workspaceMemberRoleUpdate).Execute() + +POST /accounts/workspace//members/role/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + workspaceId := "workspaceId_example" // string | + workspaceMemberRoleUpdate := *openapiclient.NewWorkspaceMemberRoleUpdate("UserId_example", int32(123)) // WorkspaceMemberRoleUpdate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsAPI.AccountsWorkspaceMembersRoleCreate(context.Background(), workspaceId).WorkspaceMemberRoleUpdate(workspaceMemberRoleUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.AccountsWorkspaceMembersRoleCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AccountsWorkspaceMembersRoleCreate`: WorkspaceMemberRoleUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.AccountsWorkspaceMembersRoleCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workspaceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAccountsWorkspaceMembersRoleCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **workspaceMemberRoleUpdate** | [**WorkspaceMemberRoleUpdate**](WorkspaceMemberRoleUpdate.md) | | + +### Return type + +[**WorkspaceMemberRoleUpdateResponse**](WorkspaceMemberRoleUpdateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/AlertsAPI.md b/go/futureagi/docs/AlertsAPI.md new file mode 100644 index 0000000..506e829 --- /dev/null +++ b/go/futureagi/docs/AlertsAPI.md @@ -0,0 +1,1049 @@ +# \AlertsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**BulkMuteAlerts**](AlertsAPI.md#BulkMuteAlerts) | **Post** /tracer/user-alerts/bulk-mute/ | +[**CreateAlert**](AlertsAPI.md#CreateAlert) | **Post** /tracer/user-alerts/ | +[**DeleteAlert**](AlertsAPI.md#DeleteAlert) | **Delete** /tracer/user-alerts/{id}/ | +[**GetAlert**](AlertsAPI.md#GetAlert) | **Get** /tracer/user-alerts/{id}/ | +[**GetAlertDetails**](AlertsAPI.md#GetAlertDetails) | **Get** /tracer/user-alerts/{id}/details/ | +[**GetAlertGraph**](AlertsAPI.md#GetAlertGraph) | **Get** /tracer/user-alerts/{id}/graph/ | Returns time-series data for a monitor's metric, suitable for graphing. +[**GetAlertLog**](AlertsAPI.md#GetAlertLog) | **Get** /tracer/user-alert-logs/{id}/ | +[**ListAlertLogs**](AlertsAPI.md#ListAlertLogs) | **Get** /tracer/user-alert-logs/ | +[**ListAlertLogsForAlert**](AlertsAPI.md#ListAlertLogsForAlert) | **Get** /tracer/user-alert-logs/{id}/list/ | +[**ListAlertMetricOptions**](AlertsAPI.md#ListAlertMetricOptions) | **Get** /tracer/user-alerts/metric-options/ | +[**ListAlerts**](AlertsAPI.md#ListAlerts) | **Get** /tracer/user-alerts/ | +[**ListAllAlertLogs**](AlertsAPI.md#ListAllAlertLogs) | **Get** /tracer/user-alert-logs/all/ | +[**PreviewAlertGraph**](AlertsAPI.md#PreviewAlertGraph) | **Post** /tracer/user-alerts/preview-graph/ | +[**ResolveAlertLogs**](AlertsAPI.md#ResolveAlertLogs) | **Post** /tracer/user-alert-logs/resolve/ | +[**UpdateAlert**](AlertsAPI.md#UpdateAlert) | **Patch** /tracer/user-alerts/{id}/ | + + + +## BulkMuteAlerts + +> UserAlertMonitor BulkMuteAlerts(ctx).UserAlertMonitor(userAlertMonitor).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + userAlertMonitor := *openapiclient.NewUserAlertMonitor("Project_example", "Name_example", "MetricType_example", "ThresholdOperator_example", "Organization_example") // UserAlertMonitor | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.BulkMuteAlerts(context.Background()).UserAlertMonitor(userAlertMonitor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.BulkMuteAlerts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkMuteAlerts`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.BulkMuteAlerts`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkMuteAlertsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md) | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAlert + +> UserAlertMonitor CreateAlert(ctx).UserAlertMonitor(userAlertMonitor).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + userAlertMonitor := *openapiclient.NewUserAlertMonitor("Project_example", "Name_example", "MetricType_example", "ThresholdOperator_example", "Organization_example") // UserAlertMonitor | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.CreateAlert(context.Background()).UserAlertMonitor(userAlertMonitor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.CreateAlert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAlert`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.CreateAlert`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAlertRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md) | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAlert + +> DeleteAlert(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AlertsAPI.DeleteAlert(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.DeleteAlert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAlertRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAlert + +> UserAlertMonitor GetAlert(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.GetAlert(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.GetAlert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAlert`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.GetAlert`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAlertRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAlertDetails + +> UserAlertMonitor GetAlertDetails(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.GetAlertDetails(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.GetAlertDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAlertDetails`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.GetAlertDetails`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAlertDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAlertGraph + +> UserAlertMonitor GetAlertGraph(ctx, id).Execute() + +Returns time-series data for a monitor's metric, suitable for graphing. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.GetAlertGraph(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.GetAlertGraph``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAlertGraph`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.GetAlertGraph`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAlertGraphRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAlertLog + +> UserAlertMonitorLog GetAlertLog(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.GetAlertLog(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.GetAlertLog``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAlertLog`: UserAlertMonitorLog + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.GetAlertLog`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAlertLogRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAlertLogs + +> ListAlertLogs200Response ListAlertLogs(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.ListAlertLogs(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListAlertLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAlertLogs`: ListAlertLogs200Response + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListAlertLogs`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAlertLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ListAlertLogs200Response**](ListAlertLogs200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAlertLogsForAlert + +> UserAlertMonitorLog ListAlertLogsForAlert(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.ListAlertLogsForAlert(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListAlertLogsForAlert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAlertLogsForAlert`: UserAlertMonitorLog + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListAlertLogsForAlert`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAlertLogsForAlertRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAlertMetricOptions + +> UserAlertMonitorMetricOptionsResponse ListAlertMetricOptions(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.ListAlertMetricOptions(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListAlertMetricOptions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAlertMetricOptions`: UserAlertMonitorMetricOptionsResponse + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListAlertMetricOptions`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAlertMetricOptionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**UserAlertMonitorMetricOptionsResponse**](UserAlertMonitorMetricOptionsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAlerts + +> ListAlerts200Response ListAlerts(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.ListAlerts(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListAlerts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAlerts`: ListAlerts200Response + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListAlerts`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAlertsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ListAlerts200Response**](ListAlerts200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAllAlertLogs + +> ListAlertLogs200Response ListAllAlertLogs(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.ListAllAlertLogs(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListAllAlertLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAllAlertLogs`: ListAlertLogs200Response + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListAllAlertLogs`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAllAlertLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ListAlertLogs200Response**](ListAlertLogs200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PreviewAlertGraph + +> UserAlertMonitor PreviewAlertGraph(ctx).UserAlertMonitor(userAlertMonitor).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + userAlertMonitor := *openapiclient.NewUserAlertMonitor("Project_example", "Name_example", "MetricType_example", "ThresholdOperator_example", "Organization_example") // UserAlertMonitor | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.PreviewAlertGraph(context.Background()).UserAlertMonitor(userAlertMonitor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.PreviewAlertGraph``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PreviewAlertGraph`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.PreviewAlertGraph`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPreviewAlertGraphRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md) | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ResolveAlertLogs + +> UserAlertMonitorLog ResolveAlertLogs(ctx).UserAlertMonitorLog(userAlertMonitorLog).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + userAlertMonitorLog := *openapiclient.NewUserAlertMonitorLog("Type_example", "Message_example") // UserAlertMonitorLog | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.ResolveAlertLogs(context.Background()).UserAlertMonitorLog(userAlertMonitorLog).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ResolveAlertLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResolveAlertLogs`: UserAlertMonitorLog + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ResolveAlertLogs`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiResolveAlertLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md) | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAlert + +> UserAlertMonitor UpdateAlert(ctx, id).UserAlertMonitor(userAlertMonitor).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + userAlertMonitor := *openapiclient.NewUserAlertMonitor("Project_example", "Name_example", "MetricType_example", "ThresholdOperator_example", "Organization_example") // UserAlertMonitor | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertsAPI.UpdateAlert(context.Background(), id).UserAlertMonitor(userAlertMonitor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.UpdateAlert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAlert`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.UpdateAlert`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAlertRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md) | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/AnnotationQueueDiscussionAPI.md b/go/futureagi/docs/AnnotationQueueDiscussionAPI.md new file mode 100644 index 0000000..b8679c3 --- /dev/null +++ b/go/futureagi/docs/AnnotationQueueDiscussionAPI.md @@ -0,0 +1,395 @@ +# \AnnotationQueueDiscussionAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAnnotationQueueItemComment**](AnnotationQueueDiscussionAPI.md#CreateAnnotationQueueItemComment) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +[**ListAnnotationQueueItemDiscussion**](AnnotationQueueDiscussionAPI.md#ListAnnotationQueueItemDiscussion) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +[**ReopenAnnotationQueueItemThread**](AnnotationQueueDiscussionAPI.md#ReopenAnnotationQueueItemThread) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/ | +[**ResolveAnnotationQueueItemThread**](AnnotationQueueDiscussionAPI.md#ResolveAnnotationQueueItemThread) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/ | +[**ToggleAnnotationQueueItemCommentReaction**](AnnotationQueueDiscussionAPI.md#ToggleAnnotationQueueItemCommentReaction) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/ | + + + +## CreateAnnotationQueueItemComment + +> QueueDiscussionResponse CreateAnnotationQueueItemComment(ctx, queueId, id).DiscussionCommentRequest(discussionCommentRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + discussionCommentRequest := *openapiclient.NewDiscussionCommentRequest() // DiscussionCommentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueDiscussionAPI.CreateAnnotationQueueItemComment(context.Background(), queueId, id).DiscussionCommentRequest(discussionCommentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueDiscussionAPI.CreateAnnotationQueueItemComment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAnnotationQueueItemComment`: QueueDiscussionResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueDiscussionAPI.CreateAnnotationQueueItemComment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAnnotationQueueItemCommentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **discussionCommentRequest** | [**DiscussionCommentRequest**](DiscussionCommentRequest.md) | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAnnotationQueueItemDiscussion + +> QueueDiscussionResponse ListAnnotationQueueItemDiscussion(ctx, queueId, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueDiscussionAPI.ListAnnotationQueueItemDiscussion(context.Background(), queueId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueDiscussionAPI.ListAnnotationQueueItemDiscussion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAnnotationQueueItemDiscussion`: QueueDiscussionResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueDiscussionAPI.ListAnnotationQueueItemDiscussion`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAnnotationQueueItemDiscussionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ReopenAnnotationQueueItemThread + +> QueueDiscussionResponse ReopenAnnotationQueueItemThread(ctx, queueId, id, threadId).DiscussionThreadStatusRequest(discussionThreadStatusRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + threadId := "threadId_example" // string | + discussionThreadStatusRequest := *openapiclient.NewDiscussionThreadStatusRequest() // DiscussionThreadStatusRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueDiscussionAPI.ReopenAnnotationQueueItemThread(context.Background(), queueId, id, threadId).DiscussionThreadStatusRequest(discussionThreadStatusRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueDiscussionAPI.ReopenAnnotationQueueItemThread``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReopenAnnotationQueueItemThread`: QueueDiscussionResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueDiscussionAPI.ReopenAnnotationQueueItemThread`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | +**threadId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReopenAnnotationQueueItemThreadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **discussionThreadStatusRequest** | [**DiscussionThreadStatusRequest**](DiscussionThreadStatusRequest.md) | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ResolveAnnotationQueueItemThread + +> QueueDiscussionResponse ResolveAnnotationQueueItemThread(ctx, queueId, id, threadId).DiscussionThreadStatusRequest(discussionThreadStatusRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + threadId := "threadId_example" // string | + discussionThreadStatusRequest := *openapiclient.NewDiscussionThreadStatusRequest() // DiscussionThreadStatusRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueDiscussionAPI.ResolveAnnotationQueueItemThread(context.Background(), queueId, id, threadId).DiscussionThreadStatusRequest(discussionThreadStatusRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueDiscussionAPI.ResolveAnnotationQueueItemThread``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResolveAnnotationQueueItemThread`: QueueDiscussionResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueDiscussionAPI.ResolveAnnotationQueueItemThread`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | +**threadId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiResolveAnnotationQueueItemThreadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **discussionThreadStatusRequest** | [**DiscussionThreadStatusRequest**](DiscussionThreadStatusRequest.md) | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ToggleAnnotationQueueItemCommentReaction + +> QueueDiscussionResponse ToggleAnnotationQueueItemCommentReaction(ctx, queueId, id, commentId).DiscussionReactionRequest(discussionReactionRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + commentId := "commentId_example" // string | + discussionReactionRequest := *openapiclient.NewDiscussionReactionRequest() // DiscussionReactionRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueDiscussionAPI.ToggleAnnotationQueueItemCommentReaction(context.Background(), queueId, id, commentId).DiscussionReactionRequest(discussionReactionRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueDiscussionAPI.ToggleAnnotationQueueItemCommentReaction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ToggleAnnotationQueueItemCommentReaction`: QueueDiscussionResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueDiscussionAPI.ToggleAnnotationQueueItemCommentReaction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | +**commentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiToggleAnnotationQueueItemCommentReactionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **discussionReactionRequest** | [**DiscussionReactionRequest**](DiscussionReactionRequest.md) | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/AnnotationQueueItemsAPI.md b/go/futureagi/docs/AnnotationQueueItemsAPI.md new file mode 100644 index 0000000..cb2478a --- /dev/null +++ b/go/futureagi/docs/AnnotationQueueItemsAPI.md @@ -0,0 +1,943 @@ +# \AnnotationQueueItemsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddAnnotationQueueItems**](AnnotationQueueItemsAPI.md#AddAnnotationQueueItems) | **Post** /model-hub/annotation-queues/{queue_id}/items/add-items/ | +[**AssignAnnotationQueueItems**](AnnotationQueueItemsAPI.md#AssignAnnotationQueueItems) | **Post** /model-hub/annotation-queues/{queue_id}/items/assign/ | +[**CompleteAnnotationQueueItem**](AnnotationQueueItemsAPI.md#CompleteAnnotationQueueItem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/complete/ | +[**GetAnnotationQueueItemDetail**](AnnotationQueueItemsAPI.md#GetAnnotationQueueItemDetail) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/ | +[**GetNextAnnotationQueueItem**](AnnotationQueueItemsAPI.md#GetNextAnnotationQueueItem) | **Get** /model-hub/annotation-queues/{queue_id}/items/next-item/ | Get the next or previous item in the queue. +[**ImportAnnotationQueueItemAnnotations**](AnnotationQueueItemsAPI.md#ImportAnnotationQueueItemAnnotations) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/ | +[**ListAnnotationQueueItemAnnotations**](AnnotationQueueItemsAPI.md#ListAnnotationQueueItemAnnotations) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/ | +[**ListAnnotationQueueItems**](AnnotationQueueItemsAPI.md#ListAnnotationQueueItems) | **Get** /model-hub/annotation-queues/{queue_id}/items/ | +[**ReleaseAnnotationQueueItem**](AnnotationQueueItemsAPI.md#ReleaseAnnotationQueueItem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/release/ | +[**RemoveAnnotationQueueItems**](AnnotationQueueItemsAPI.md#RemoveAnnotationQueueItems) | **Post** /model-hub/annotation-queues/{queue_id}/items/bulk-remove/ | +[**SkipAnnotationQueueItem**](AnnotationQueueItemsAPI.md#SkipAnnotationQueueItem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/skip/ | +[**SubmitAnnotationQueueItemAnnotations**](AnnotationQueueItemsAPI.md#SubmitAnnotationQueueItemAnnotations) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/ | + + + +## AddAnnotationQueueItems + +> QueueAddItemsResponse AddAnnotationQueueItems(ctx, queueId).AddItems(addItems).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + addItems := *openapiclient.NewAddItems() // AddItems | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.AddAnnotationQueueItems(context.Background(), queueId).AddItems(addItems).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.AddAnnotationQueueItems``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddAnnotationQueueItems`: QueueAddItemsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.AddAnnotationQueueItems`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddAnnotationQueueItemsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **addItems** | [**AddItems**](AddItems.md) | | + +### Return type + +[**QueueAddItemsResponse**](QueueAddItemsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AssignAnnotationQueueItems + +> QueueAssignItemsResponse AssignAnnotationQueueItems(ctx, queueId).AssignItems(assignItems).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + assignItems := *openapiclient.NewAssignItems([]string{"ItemIds_example"}) // AssignItems | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.AssignAnnotationQueueItems(context.Background(), queueId).AssignItems(assignItems).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.AssignAnnotationQueueItems``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AssignAnnotationQueueItems`: QueueAssignItemsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.AssignAnnotationQueueItems`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAssignAnnotationQueueItemsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **assignItems** | [**AssignItems**](AssignItems.md) | | + +### Return type + +[**QueueAssignItemsResponse**](QueueAssignItemsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CompleteAnnotationQueueItem + +> QueueNavigationResponse CompleteAnnotationQueueItem(ctx, queueId, id).QueueItemNavigationRequest(queueItemNavigationRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + queueItemNavigationRequest := *openapiclient.NewQueueItemNavigationRequest() // QueueItemNavigationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.CompleteAnnotationQueueItem(context.Background(), queueId, id).QueueItemNavigationRequest(queueItemNavigationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.CompleteAnnotationQueueItem``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CompleteAnnotationQueueItem`: QueueNavigationResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.CompleteAnnotationQueueItem`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCompleteAnnotationQueueItemRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **queueItemNavigationRequest** | [**QueueItemNavigationRequest**](QueueItemNavigationRequest.md) | | + +### Return type + +[**QueueNavigationResponse**](QueueNavigationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAnnotationQueueItemDetail + +> QueueAnnotateDetailResponse GetAnnotationQueueItemDetail(ctx, queueId, id).AnnotatorId(annotatorId).IncludeCompleted(includeCompleted).ViewMode(viewMode).ReviewStatus(reviewStatus).ExcludeReviewStatus(excludeReviewStatus).IncludeAllAnnotations(includeAllAnnotations).Reserve(reserve).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + annotatorId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + includeCompleted := true // bool | (optional) + viewMode := "viewMode_example" // string | (optional) + reviewStatus := "reviewStatus_example" // string | (optional) + excludeReviewStatus := "excludeReviewStatus_example" // string | (optional) + includeAllAnnotations := true // bool | (optional) + reserve := true // bool | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.GetAnnotationQueueItemDetail(context.Background(), queueId, id).AnnotatorId(annotatorId).IncludeCompleted(includeCompleted).ViewMode(viewMode).ReviewStatus(reviewStatus).ExcludeReviewStatus(excludeReviewStatus).IncludeAllAnnotations(includeAllAnnotations).Reserve(reserve).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.GetAnnotationQueueItemDetail``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAnnotationQueueItemDetail`: QueueAnnotateDetailResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.GetAnnotationQueueItemDetail`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAnnotationQueueItemDetailRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **annotatorId** | **string** | | + **includeCompleted** | **bool** | | + **viewMode** | **string** | | + **reviewStatus** | **string** | | + **excludeReviewStatus** | **string** | | + **includeAllAnnotations** | **bool** | | + **reserve** | **bool** | | + +### Return type + +[**QueueAnnotateDetailResponse**](QueueAnnotateDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetNextAnnotationQueueItem + +> QueueNextItemResponse GetNextAnnotationQueueItem(ctx, queueId).Page(page).Limit(limit).Exclude(exclude).Before(before).ReviewStatus(reviewStatus).ExcludeReviewStatus(excludeReviewStatus).IncludeCompleted(includeCompleted).ViewMode(viewMode).IncludeAllAnnotations(includeAllAnnotations).Execute() + +Get the next or previous item in the queue. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + exclude := "exclude_example" // string | (optional) + before := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + reviewStatus := "reviewStatus_example" // string | (optional) + excludeReviewStatus := "excludeReviewStatus_example" // string | (optional) + includeCompleted := true // bool | (optional) + viewMode := "viewMode_example" // string | (optional) + includeAllAnnotations := true // bool | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.GetNextAnnotationQueueItem(context.Background(), queueId).Page(page).Limit(limit).Exclude(exclude).Before(before).ReviewStatus(reviewStatus).ExcludeReviewStatus(excludeReviewStatus).IncludeCompleted(includeCompleted).ViewMode(viewMode).IncludeAllAnnotations(includeAllAnnotations).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.GetNextAnnotationQueueItem``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetNextAnnotationQueueItem`: QueueNextItemResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.GetNextAnnotationQueueItem`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetNextAnnotationQueueItemRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **exclude** | **string** | | + **before** | **string** | | + **reviewStatus** | **string** | | + **excludeReviewStatus** | **string** | | + **includeCompleted** | **bool** | | + **viewMode** | **string** | | + **includeAllAnnotations** | **bool** | | + +### Return type + +[**QueueNextItemResponse**](QueueNextItemResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ImportAnnotationQueueItemAnnotations + +> QueueImportAnnotationsResponse ImportAnnotationQueueItemAnnotations(ctx, queueId, id).ImportAnnotations(importAnnotations).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + importAnnotations := *openapiclient.NewImportAnnotations([]openapiclient.ImportAnnotationEntry{*openapiclient.NewImportAnnotationEntry("LabelId_example", map[string]interface{}{"key": interface{}(123)})}) // ImportAnnotations | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.ImportAnnotationQueueItemAnnotations(context.Background(), queueId, id).ImportAnnotations(importAnnotations).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.ImportAnnotationQueueItemAnnotations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImportAnnotationQueueItemAnnotations`: QueueImportAnnotationsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.ImportAnnotationQueueItemAnnotations`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiImportAnnotationQueueItemAnnotationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **importAnnotations** | [**ImportAnnotations**](ImportAnnotations.md) | | + +### Return type + +[**QueueImportAnnotationsResponse**](QueueImportAnnotationsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAnnotationQueueItemAnnotations + +> QueueItemAnnotationsResponse ListAnnotationQueueItemAnnotations(ctx, queueId, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.ListAnnotationQueueItemAnnotations(context.Background(), queueId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.ListAnnotationQueueItemAnnotations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAnnotationQueueItemAnnotations`: QueueItemAnnotationsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.ListAnnotationQueueItemAnnotations`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAnnotationQueueItemAnnotationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**QueueItemAnnotationsResponse**](QueueItemAnnotationsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAnnotationQueueItems + +> ListAnnotationQueueItems200Response ListAnnotationQueueItems(ctx, queueId).Page(page).Limit(limit).Status(status).SourceType(sourceType).AssignedTo(assignedTo).ReviewStatus(reviewStatus).Ordering(ordering).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + status := []string{"Inner_example"} // []string | (optional) + sourceType := []string{"Inner_example"} // []string | (optional) + assignedTo := "assignedTo_example" // string | (optional) + reviewStatus := "reviewStatus_example" // string | (optional) + ordering := "ordering_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.ListAnnotationQueueItems(context.Background(), queueId).Page(page).Limit(limit).Status(status).SourceType(sourceType).AssignedTo(assignedTo).ReviewStatus(reviewStatus).Ordering(ordering).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.ListAnnotationQueueItems``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAnnotationQueueItems`: ListAnnotationQueueItems200Response + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.ListAnnotationQueueItems`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAnnotationQueueItemsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **status** | **[]string** | | + **sourceType** | **[]string** | | + **assignedTo** | **string** | | + **reviewStatus** | **string** | | + **ordering** | **string** | | + +### Return type + +[**ListAnnotationQueueItems200Response**](ListAnnotationQueueItems200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ReleaseAnnotationQueueItem + +> QueueReleaseReservationResponse ReleaseAnnotationQueueItem(ctx, queueId, id).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.ReleaseAnnotationQueueItem(context.Background(), queueId, id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.ReleaseAnnotationQueueItem``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReleaseAnnotationQueueItem`: QueueReleaseReservationResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.ReleaseAnnotationQueueItem`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReleaseAnnotationQueueItemRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | | + +### Return type + +[**QueueReleaseReservationResponse**](QueueReleaseReservationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAnnotationQueueItems + +> QueueBulkRemoveItemsResponse RemoveAnnotationQueueItems(ctx, queueId).BulkRemoveItems(bulkRemoveItems).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + bulkRemoveItems := *openapiclient.NewBulkRemoveItems([]string{"ItemIds_example"}) // BulkRemoveItems | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.RemoveAnnotationQueueItems(context.Background(), queueId).BulkRemoveItems(bulkRemoveItems).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.RemoveAnnotationQueueItems``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RemoveAnnotationQueueItems`: QueueBulkRemoveItemsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.RemoveAnnotationQueueItems`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAnnotationQueueItemsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **bulkRemoveItems** | [**BulkRemoveItems**](BulkRemoveItems.md) | | + +### Return type + +[**QueueBulkRemoveItemsResponse**](QueueBulkRemoveItemsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SkipAnnotationQueueItem + +> QueueNavigationResponse SkipAnnotationQueueItem(ctx, queueId, id).QueueItemNavigationRequest(queueItemNavigationRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + queueItemNavigationRequest := *openapiclient.NewQueueItemNavigationRequest() // QueueItemNavigationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.SkipAnnotationQueueItem(context.Background(), queueId, id).QueueItemNavigationRequest(queueItemNavigationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.SkipAnnotationQueueItem``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SkipAnnotationQueueItem`: QueueNavigationResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.SkipAnnotationQueueItem`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSkipAnnotationQueueItemRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **queueItemNavigationRequest** | [**QueueItemNavigationRequest**](QueueItemNavigationRequest.md) | | + +### Return type + +[**QueueNavigationResponse**](QueueNavigationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SubmitAnnotationQueueItemAnnotations + +> QueueSubmitAnnotationsResponse SubmitAnnotationQueueItemAnnotations(ctx, queueId, id).SubmitAnnotations(submitAnnotations).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + submitAnnotations := *openapiclient.NewSubmitAnnotations([]openapiclient.SubmitAnnotationEntry{*openapiclient.NewSubmitAnnotationEntry("LabelId_example", map[string]interface{}{"key": interface{}(123)})}) // SubmitAnnotations | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueItemsAPI.SubmitAnnotationQueueItemAnnotations(context.Background(), queueId, id).SubmitAnnotations(submitAnnotations).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueItemsAPI.SubmitAnnotationQueueItemAnnotations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubmitAnnotationQueueItemAnnotations`: QueueSubmitAnnotationsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueItemsAPI.SubmitAnnotationQueueItemAnnotations`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSubmitAnnotationQueueItemAnnotationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **submitAnnotations** | [**SubmitAnnotations**](SubmitAnnotations.md) | | + +### Return type + +[**QueueSubmitAnnotationsResponse**](QueueSubmitAnnotationsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/AnnotationQueueReviewAPI.md b/go/futureagi/docs/AnnotationQueueReviewAPI.md new file mode 100644 index 0000000..9b53841 --- /dev/null +++ b/go/futureagi/docs/AnnotationQueueReviewAPI.md @@ -0,0 +1,84 @@ +# \AnnotationQueueReviewAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ReviewAnnotationQueueItem**](AnnotationQueueReviewAPI.md#ReviewAnnotationQueueItem) | **Post** /model-hub/annotation-queues/{queue_id}/items/{id}/review/ | + + + +## ReviewAnnotationQueueItem + +> QueueReviewItemResponse ReviewAnnotationQueueItem(ctx, queueId, id).ReviewItemRequest(reviewItemRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + reviewItemRequest := *openapiclient.NewReviewItemRequest("Action_example") // ReviewItemRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueueReviewAPI.ReviewAnnotationQueueItem(context.Background(), queueId, id).ReviewItemRequest(reviewItemRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueueReviewAPI.ReviewAnnotationQueueItem``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReviewAnnotationQueueItem`: QueueReviewItemResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueueReviewAPI.ReviewAnnotationQueueItem`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReviewAnnotationQueueItemRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **reviewItemRequest** | [**ReviewItemRequest**](ReviewItemRequest.md) | | + +### Return type + +[**QueueReviewItemResponse**](QueueReviewItemResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/AnnotationQueuesAPI.md b/go/futureagi/docs/AnnotationQueuesAPI.md new file mode 100644 index 0000000..bb1a5b3 --- /dev/null +++ b/go/futureagi/docs/AnnotationQueuesAPI.md @@ -0,0 +1,1014 @@ +# \AnnotationQueuesAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddAnnotationQueueLabel**](AnnotationQueuesAPI.md#AddAnnotationQueueLabel) | **Post** /model-hub/annotation-queues/{id}/add-label/ | +[**ArchiveAnnotationQueue**](AnnotationQueuesAPI.md#ArchiveAnnotationQueue) | **Delete** /model-hub/annotation-queues/{id}/ | Archive a queue (soft delete). +[**CreateAnnotationQueue**](AnnotationQueuesAPI.md#CreateAnnotationQueue) | **Post** /model-hub/annotation-queues/ | +[**ExportAnnotationQueue**](AnnotationQueuesAPI.md#ExportAnnotationQueue) | **Get** /model-hub/annotation-queues/{id}/export/ | +[**ExportAnnotationQueueToDataset**](AnnotationQueuesAPI.md#ExportAnnotationQueueToDataset) | **Post** /model-hub/annotation-queues/{id}/export-to-dataset/ | +[**GetAnnotationQueue**](AnnotationQueuesAPI.md#GetAnnotationQueue) | **Get** /model-hub/annotation-queues/{id}/ | +[**GetAnnotationQueueAgreement**](AnnotationQueuesAPI.md#GetAnnotationQueueAgreement) | **Get** /model-hub/annotation-queues/{id}/agreement/ | +[**GetAnnotationQueueAnalytics**](AnnotationQueuesAPI.md#GetAnnotationQueueAnalytics) | **Get** /model-hub/annotation-queues/{id}/analytics/ | +[**GetAnnotationQueueProgress**](AnnotationQueuesAPI.md#GetAnnotationQueueProgress) | **Get** /model-hub/annotation-queues/{id}/progress/ | +[**ListAnnotationQueueExportFields**](AnnotationQueuesAPI.md#ListAnnotationQueueExportFields) | **Get** /model-hub/annotation-queues/{id}/export-fields/ | +[**ListAnnotationQueues**](AnnotationQueuesAPI.md#ListAnnotationQueues) | **Get** /model-hub/annotation-queues/ | +[**RemoveAnnotationQueueLabel**](AnnotationQueuesAPI.md#RemoveAnnotationQueueLabel) | **Post** /model-hub/annotation-queues/{id}/remove-label/ | +[**UpdateAnnotationQueue**](AnnotationQueuesAPI.md#UpdateAnnotationQueue) | **Patch** /model-hub/annotation-queues/{id}/ | +[**UpdateAnnotationQueueStatus**](AnnotationQueuesAPI.md#UpdateAnnotationQueueStatus) | **Post** /model-hub/annotation-queues/{id}/update-status/ | + + + +## AddAnnotationQueueLabel + +> QueueAddLabelResponse AddAnnotationQueueLabel(ctx, id).QueueLabelRequest(queueLabelRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + queueLabelRequest := *openapiclient.NewQueueLabelRequest("LabelId_example") // QueueLabelRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.AddAnnotationQueueLabel(context.Background(), id).QueueLabelRequest(queueLabelRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.AddAnnotationQueueLabel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddAnnotationQueueLabel`: QueueAddLabelResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.AddAnnotationQueueLabel`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddAnnotationQueueLabelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **queueLabelRequest** | [**QueueLabelRequest**](QueueLabelRequest.md) | | + +### Return type + +[**QueueAddLabelResponse**](QueueAddLabelResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ArchiveAnnotationQueue + +> ArchiveAnnotationQueue(ctx, id).Execute() + +Archive a queue (soft delete). + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AnnotationQueuesAPI.ArchiveAnnotationQueue(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.ArchiveAnnotationQueue``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArchiveAnnotationQueueRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAnnotationQueue + +> AnnotationQueue CreateAnnotationQueue(ctx).AnnotationQueue(annotationQueue).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + annotationQueue := *openapiclient.NewAnnotationQueue("Name_example") // AnnotationQueue | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.CreateAnnotationQueue(context.Background()).AnnotationQueue(annotationQueue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.CreateAnnotationQueue``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAnnotationQueue`: AnnotationQueue + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.CreateAnnotationQueue`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAnnotationQueueRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md) | | + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportAnnotationQueue + +> QueueExportAnnotationsResponse ExportAnnotationQueue(ctx, id).ExportFormat(exportFormat).Status(status).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + exportFormat := "exportFormat_example" // string | (optional) + status := "status_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.ExportAnnotationQueue(context.Background(), id).ExportFormat(exportFormat).Status(status).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.ExportAnnotationQueue``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAnnotationQueue`: QueueExportAnnotationsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.ExportAnnotationQueue`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAnnotationQueueRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **exportFormat** | **string** | | + **status** | **string** | | + +### Return type + +[**QueueExportAnnotationsResponse**](QueueExportAnnotationsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportAnnotationQueueToDataset + +> QueueExportToDatasetResponse ExportAnnotationQueueToDataset(ctx, id).QueueExportToDatasetRequest(queueExportToDatasetRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + queueExportToDatasetRequest := *openapiclient.NewQueueExportToDatasetRequest() // QueueExportToDatasetRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.ExportAnnotationQueueToDataset(context.Background(), id).QueueExportToDatasetRequest(queueExportToDatasetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.ExportAnnotationQueueToDataset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExportAnnotationQueueToDataset`: QueueExportToDatasetResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.ExportAnnotationQueueToDataset`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAnnotationQueueToDatasetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **queueExportToDatasetRequest** | [**QueueExportToDatasetRequest**](QueueExportToDatasetRequest.md) | | + +### Return type + +[**QueueExportToDatasetResponse**](QueueExportToDatasetResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAnnotationQueue + +> AnnotationQueue GetAnnotationQueue(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.GetAnnotationQueue(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.GetAnnotationQueue``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAnnotationQueue`: AnnotationQueue + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.GetAnnotationQueue`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAnnotationQueueRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAnnotationQueueAgreement + +> QueueAgreementResponse GetAnnotationQueueAgreement(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.GetAnnotationQueueAgreement(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.GetAnnotationQueueAgreement``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAnnotationQueueAgreement`: QueueAgreementResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.GetAnnotationQueueAgreement`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAnnotationQueueAgreementRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**QueueAgreementResponse**](QueueAgreementResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAnnotationQueueAnalytics + +> QueueAnalyticsResponse GetAnnotationQueueAnalytics(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.GetAnnotationQueueAnalytics(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.GetAnnotationQueueAnalytics``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAnnotationQueueAnalytics`: QueueAnalyticsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.GetAnnotationQueueAnalytics`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAnnotationQueueAnalyticsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**QueueAnalyticsResponse**](QueueAnalyticsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAnnotationQueueProgress + +> QueueProgressResponse GetAnnotationQueueProgress(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.GetAnnotationQueueProgress(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.GetAnnotationQueueProgress``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAnnotationQueueProgress`: QueueProgressResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.GetAnnotationQueueProgress`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAnnotationQueueProgressRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**QueueProgressResponse**](QueueProgressResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAnnotationQueueExportFields + +> QueueExportFieldsResponse ListAnnotationQueueExportFields(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.ListAnnotationQueueExportFields(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.ListAnnotationQueueExportFields``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAnnotationQueueExportFields`: QueueExportFieldsResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.ListAnnotationQueueExportFields`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAnnotationQueueExportFieldsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**QueueExportFieldsResponse**](QueueExportFieldsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAnnotationQueues + +> ListAnnotationQueues200Response ListAnnotationQueues(ctx).Page(page).Limit(limit).Status(status).Search(search).IncludeCounts(includeCounts).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + status := "status_example" // string | (optional) + search := "search_example" // string | (optional) + includeCounts := true // bool | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.ListAnnotationQueues(context.Background()).Page(page).Limit(limit).Status(status).Search(search).IncludeCounts(includeCounts).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.ListAnnotationQueues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAnnotationQueues`: ListAnnotationQueues200Response + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.ListAnnotationQueues`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAnnotationQueuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **status** | **string** | | + **search** | **string** | | + **includeCounts** | **bool** | | + +### Return type + +[**ListAnnotationQueues200Response**](ListAnnotationQueues200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveAnnotationQueueLabel + +> QueueRemoveLabelResponse RemoveAnnotationQueueLabel(ctx, id).QueueLabelRequest(queueLabelRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + queueLabelRequest := *openapiclient.NewQueueLabelRequest("LabelId_example") // QueueLabelRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.RemoveAnnotationQueueLabel(context.Background(), id).QueueLabelRequest(queueLabelRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.RemoveAnnotationQueueLabel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RemoveAnnotationQueueLabel`: QueueRemoveLabelResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.RemoveAnnotationQueueLabel`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveAnnotationQueueLabelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **queueLabelRequest** | [**QueueLabelRequest**](QueueLabelRequest.md) | | + +### Return type + +[**QueueRemoveLabelResponse**](QueueRemoveLabelResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAnnotationQueue + +> AnnotationQueue UpdateAnnotationQueue(ctx, id).AnnotationQueue(annotationQueue).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + annotationQueue := *openapiclient.NewAnnotationQueue("Name_example") // AnnotationQueue | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.UpdateAnnotationQueue(context.Background(), id).AnnotationQueue(annotationQueue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.UpdateAnnotationQueue``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAnnotationQueue`: AnnotationQueue + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.UpdateAnnotationQueue`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAnnotationQueueRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md) | | + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAnnotationQueueStatus + +> QueueStatusResponse UpdateAnnotationQueueStatus(ctx, id).QueueStatusRequest(queueStatusRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + queueStatusRequest := *openapiclient.NewQueueStatusRequest("Status_example") // QueueStatusRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AnnotationQueuesAPI.UpdateAnnotationQueueStatus(context.Background(), id).QueueStatusRequest(queueStatusRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AnnotationQueuesAPI.UpdateAnnotationQueueStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAnnotationQueueStatus`: QueueStatusResponse + fmt.Fprintf(os.Stdout, "Response from `AnnotationQueuesAPI.UpdateAnnotationQueueStatus`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAnnotationQueueStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **queueStatusRequest** | [**QueueStatusRequest**](QueueStatusRequest.md) | | + +### Return type + +[**QueueStatusResponse**](QueueStatusResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/DatasetsAPI.md b/go/futureagi/docs/DatasetsAPI.md new file mode 100644 index 0000000..fc9bf94 --- /dev/null +++ b/go/futureagi/docs/DatasetsAPI.md @@ -0,0 +1,1421 @@ +# \DatasetsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddDatasetColumns**](DatasetsAPI.md#AddDatasetColumns) | **Post** /model-hub/develops/{dataset_id}/add_columns/ | +[**AddDatasetRows**](DatasetsAPI.md#AddDatasetRows) | **Post** /model-hub/develops/{dataset_id}/add_rows/ | +[**CreateDatasetFromLocalFile**](DatasetsAPI.md#CreateDatasetFromLocalFile) | **Post** /model-hub/develops/create-dataset-from-local-file/ | +[**CreateDatasetManually**](DatasetsAPI.md#CreateDatasetManually) | **Post** /model-hub/develops/create-dataset-manually/ | +[**CreateEmptyDataset**](DatasetsAPI.md#CreateEmptyDataset) | **Post** /model-hub/develops/create-empty-dataset/ | +[**DeleteDatasetColumn**](DatasetsAPI.md#DeleteDatasetColumn) | **Delete** /model-hub/develops/{dataset_id}/delete_column/{column_id}/ | +[**DeleteDatasetRow**](DatasetsAPI.md#DeleteDatasetRow) | **Delete** /model-hub/develops/{dataset_id}/delete_row/ | +[**DownloadDataset**](DatasetsAPI.md#DownloadDataset) | **Get** /model-hub/develops/{dataset_id}/download_dataset/ | +[**DuplicateDataset**](DatasetsAPI.md#DuplicateDataset) | **Post** /model-hub/datasets/{dataset_id}/duplicate/ | +[**GetDatasetAnnotationSummary**](DatasetsAPI.md#GetDatasetAnnotationSummary) | **Get** /model-hub/dataset/{dataset_id}/annotation-summary/ | +[**GetDatasetColumns**](DatasetsAPI.md#GetDatasetColumns) | **Get** /model-hub/dataset/columns/{dataset_id}/ | +[**GetDatasetEvalStats**](DatasetsAPI.md#GetDatasetEvalStats) | **Get** /model-hub/dataset/{dataset_id}/eval-stats/ | +[**GetDatasetJsonSchema**](DatasetsAPI.md#GetDatasetJsonSchema) | **Get** /model-hub/dataset/{dataset_id}/json-schema/ | +[**GetDatasetRow**](DatasetsAPI.md#GetDatasetRow) | **Post** /model-hub/develops/{dataset_id}/get-row-data/ | +[**GetDatasetTable**](DatasetsAPI.md#GetDatasetTable) | **Get** /model-hub/develops/{dataset_id}/get-dataset-table/ | +[**ListDatasetBaseColumns**](DatasetsAPI.md#ListDatasetBaseColumns) | **Get** /model-hub/datasets/get-base-columns/ | +[**ListDatasetDerivedVariables**](DatasetsAPI.md#ListDatasetDerivedVariables) | **Get** /model-hub/datasets/{dataset_id}/derived-variables/ | Get all derived variables from all run prompt columns in a dataset. +[**ListDatasetNames**](DatasetsAPI.md#ListDatasetNames) | **Get** /model-hub/develops/get-datasets-names/ | +[**ListDatasets**](DatasetsAPI.md#ListDatasets) | **Get** /model-hub/develops/get-datasets/ | +[**UpdateDatasetCell**](DatasetsAPI.md#UpdateDatasetCell) | **Post** /model-hub/develops/{dataset_id}/update_cell_value/ | + + + +## AddDatasetColumns + +> DatasetColumnsMutationResponse AddDatasetColumns(ctx, datasetId).DatasetAddColumnsRequest(datasetAddColumnsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetAddColumnsRequest := *openapiclient.NewDatasetAddColumnsRequest([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}}) // DatasetAddColumnsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.AddDatasetColumns(context.Background(), datasetId).DatasetAddColumnsRequest(datasetAddColumnsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.AddDatasetColumns``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddDatasetColumns`: DatasetColumnsMutationResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.AddDatasetColumns`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddDatasetColumnsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetAddColumnsRequest** | [**DatasetAddColumnsRequest**](DatasetAddColumnsRequest.md) | | + +### Return type + +[**DatasetColumnsMutationResponse**](DatasetColumnsMutationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddDatasetRows + +> DevelopDatasetMessageResponse AddDatasetRows(ctx, datasetId).DatasetAddRowsRequest(datasetAddRowsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetAddRowsRequest := *openapiclient.NewDatasetAddRowsRequest([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}}) // DatasetAddRowsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.AddDatasetRows(context.Background(), datasetId).DatasetAddRowsRequest(datasetAddRowsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.AddDatasetRows``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddDatasetRows`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.AddDatasetRows`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddDatasetRowsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetAddRowsRequest** | [**DatasetAddRowsRequest**](DatasetAddRowsRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDatasetFromLocalFile + +> LocalFileDatasetCreateStartedResponse CreateDatasetFromLocalFile(ctx).CreateDatasetFromLocalFileRequest(createDatasetFromLocalFileRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + createDatasetFromLocalFileRequest := *openapiclient.NewCreateDatasetFromLocalFileRequest() // CreateDatasetFromLocalFileRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.CreateDatasetFromLocalFile(context.Background()).CreateDatasetFromLocalFileRequest(createDatasetFromLocalFileRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.CreateDatasetFromLocalFile``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDatasetFromLocalFile`: LocalFileDatasetCreateStartedResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.CreateDatasetFromLocalFile`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDatasetFromLocalFileRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createDatasetFromLocalFileRequest** | [**CreateDatasetFromLocalFileRequest**](CreateDatasetFromLocalFileRequest.md) | | + +### Return type + +[**LocalFileDatasetCreateStartedResponse**](LocalFileDatasetCreateStartedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDatasetManually + +> ManualDatasetCreateResponse CreateDatasetManually(ctx).ManualDatasetCreateRequest(manualDatasetCreateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + manualDatasetCreateRequest := *openapiclient.NewManualDatasetCreateRequest("DatasetName_example") // ManualDatasetCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.CreateDatasetManually(context.Background()).ManualDatasetCreateRequest(manualDatasetCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.CreateDatasetManually``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDatasetManually`: ManualDatasetCreateResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.CreateDatasetManually`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDatasetManuallyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **manualDatasetCreateRequest** | [**ManualDatasetCreateRequest**](ManualDatasetCreateRequest.md) | | + +### Return type + +[**ManualDatasetCreateResponse**](ManualDatasetCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateEmptyDataset + +> DatasetCreateStartedResponse CreateEmptyDataset(ctx).CreateEmptyDatasetRequest(createEmptyDatasetRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + createEmptyDatasetRequest := *openapiclient.NewCreateEmptyDatasetRequest("NewDatasetName_example") // CreateEmptyDatasetRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.CreateEmptyDataset(context.Background()).CreateEmptyDatasetRequest(createEmptyDatasetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.CreateEmptyDataset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateEmptyDataset`: DatasetCreateStartedResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.CreateEmptyDataset`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateEmptyDatasetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createEmptyDatasetRequest** | [**CreateEmptyDatasetRequest**](CreateEmptyDatasetRequest.md) | | + +### Return type + +[**DatasetCreateStartedResponse**](DatasetCreateStartedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDatasetColumn + +> DeleteDatasetColumn(ctx, datasetId, columnId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + columnId := "columnId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DatasetsAPI.DeleteDatasetColumn(context.Background(), datasetId, columnId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.DeleteDatasetColumn``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**columnId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDatasetColumnRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDatasetRow + +> DeleteDatasetRow(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DatasetsAPI.DeleteDatasetRow(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.DeleteDatasetRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDatasetRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DownloadDataset + +> *os.File DownloadDataset(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.DownloadDataset(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.DownloadDataset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DownloadDataset`: *os.File + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.DownloadDataset`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDownloadDatasetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DuplicateDataset + +> DuplicateDatasetResponse DuplicateDataset(ctx, datasetId).DuplicateDatasetRequest(duplicateDatasetRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + duplicateDatasetRequest := *openapiclient.NewDuplicateDatasetRequest("Name_example") // DuplicateDatasetRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.DuplicateDataset(context.Background(), datasetId).DuplicateDatasetRequest(duplicateDatasetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.DuplicateDataset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DuplicateDataset`: DuplicateDatasetResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.DuplicateDataset`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDuplicateDatasetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **duplicateDatasetRequest** | [**DuplicateDatasetRequest**](DuplicateDatasetRequest.md) | | + +### Return type + +[**DuplicateDatasetResponse**](DuplicateDatasetResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDatasetAnnotationSummary + +> AnnotationSummaryResponse GetDatasetAnnotationSummary(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.GetDatasetAnnotationSummary(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.GetDatasetAnnotationSummary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDatasetAnnotationSummary`: AnnotationSummaryResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.GetDatasetAnnotationSummary`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDatasetAnnotationSummaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AnnotationSummaryResponse**](AnnotationSummaryResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDatasetColumns + +> DatasetColumnDetailResponse GetDatasetColumns(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.GetDatasetColumns(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.GetDatasetColumns``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDatasetColumns`: DatasetColumnDetailResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.GetDatasetColumns`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDatasetColumnsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetColumnDetailResponse**](DatasetColumnDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDatasetEvalStats + +> DatasetEvalStatsResponse GetDatasetEvalStats(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.GetDatasetEvalStats(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.GetDatasetEvalStats``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDatasetEvalStats`: DatasetEvalStatsResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.GetDatasetEvalStats`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDatasetEvalStatsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetEvalStatsResponse**](DatasetEvalStatsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDatasetJsonSchema + +> DatasetJsonSchemaResponse GetDatasetJsonSchema(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.GetDatasetJsonSchema(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.GetDatasetJsonSchema``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDatasetJsonSchema`: DatasetJsonSchemaResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.GetDatasetJsonSchema`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDatasetJsonSchemaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetJsonSchemaResponse**](DatasetJsonSchemaResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDatasetRow + +> DatasetRowDataResponse GetDatasetRow(ctx, datasetId).DatasetRowDataRequest(datasetRowDataRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetRowDataRequest := *openapiclient.NewDatasetRowDataRequest("RowId_example") // DatasetRowDataRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.GetDatasetRow(context.Background(), datasetId).DatasetRowDataRequest(datasetRowDataRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.GetDatasetRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDatasetRow`: DatasetRowDataResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.GetDatasetRow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDatasetRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetRowDataRequest** | [**DatasetRowDataRequest**](DatasetRowDataRequest.md) | | + +### Return type + +[**DatasetRowDataResponse**](DatasetRowDataResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDatasetTable + +> DatasetTableResponse GetDatasetTable(ctx, datasetId).Filters(filters).Sort(sort).Search(search).PageSize(pageSize).CurrentPageIndex(currentPageIndex).ColumnConfigOnly(columnConfigOnly).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + filters := "filters_example" // string | (optional) (default to "[]") + sort := "sort_example" // string | (optional) (default to "[]") + search := "search_example" // string | (optional) + pageSize := int32(56) // int32 | (optional) (default to 10) + currentPageIndex := int32(56) // int32 | (optional) (default to 0) + columnConfigOnly := true // bool | (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.GetDatasetTable(context.Background(), datasetId).Filters(filters).Sort(sort).Search(search).PageSize(pageSize).CurrentPageIndex(currentPageIndex).ColumnConfigOnly(columnConfigOnly).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.GetDatasetTable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDatasetTable`: DatasetTableResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.GetDatasetTable`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDatasetTableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **filters** | **string** | | [default to "[]"] + **sort** | **string** | | [default to "[]"] + **search** | **string** | | + **pageSize** | **int32** | | [default to 10] + **currentPageIndex** | **int32** | | [default to 0] + **columnConfigOnly** | **bool** | | [default to false] + +### Return type + +[**DatasetTableResponse**](DatasetTableResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDatasetBaseColumns + +> BaseColumnsResponse ListDatasetBaseColumns(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.ListDatasetBaseColumns(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ListDatasetBaseColumns``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDatasetBaseColumns`: BaseColumnsResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ListDatasetBaseColumns`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDatasetBaseColumnsRequest struct via the builder pattern + + +### Return type + +[**BaseColumnsResponse**](BaseColumnsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDatasetDerivedVariables + +> DatasetDerivedVariablesResponse ListDatasetDerivedVariables(ctx, datasetId).Execute() + +Get all derived variables from all run prompt columns in a dataset. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.ListDatasetDerivedVariables(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ListDatasetDerivedVariables``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDatasetDerivedVariables`: DatasetDerivedVariablesResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ListDatasetDerivedVariables`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDatasetDerivedVariablesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetDerivedVariablesResponse**](DatasetDerivedVariablesResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDatasetNames + +> DatasetNamesResponse ListDatasetNames(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.ListDatasetNames(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ListDatasetNames``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDatasetNames`: DatasetNamesResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ListDatasetNames`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDatasetNamesRequest struct via the builder pattern + + +### Return type + +[**DatasetNamesResponse**](DatasetNamesResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDatasets + +> DatasetListResponse ListDatasets(ctx).SearchText(searchText).Page(page).PageSize(pageSize).Sort(sort).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + searchText := "searchText_example" // string | (optional) (default to "") + page := int32(56) // int32 | (optional) (default to 0) + pageSize := int32(56) // int32 | (optional) (default to 10) + sort := "sort_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.ListDatasets(context.Background()).SearchText(searchText).Page(page).PageSize(pageSize).Sort(sort).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ListDatasets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDatasets`: DatasetListResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ListDatasets`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDatasetsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchText** | **string** | | [default to ""] + **page** | **int32** | | [default to 0] + **pageSize** | **int32** | | [default to 10] + **sort** | **string** | | + +### Return type + +[**DatasetListResponse**](DatasetListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDatasetCell + +> DevelopDatasetMessageResponse UpdateDatasetCell(ctx, datasetId).DatasetUpdateCellValueRequest(datasetUpdateCellValueRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetUpdateCellValueRequest := *openapiclient.NewDatasetUpdateCellValueRequest("RowId_example", "ColumnId_example") // DatasetUpdateCellValueRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DatasetsAPI.UpdateDatasetCell(context.Background(), datasetId).DatasetUpdateCellValueRequest(datasetUpdateCellValueRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.UpdateDatasetCell``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDatasetCell`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.UpdateDatasetCell`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDatasetCellRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetUpdateCellValueRequest** | [**DatasetUpdateCellValueRequest**](DatasetUpdateCellValueRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/ExperimentsAPI.md b/go/futureagi/docs/ExperimentsAPI.md new file mode 100644 index 0000000..ff05274 --- /dev/null +++ b/go/futureagi/docs/ExperimentsAPI.md @@ -0,0 +1,1000 @@ +# \ExperimentsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CompareExperiments**](ExperimentsAPI.md#CompareExperiments) | **Post** /model-hub/experiments/v2/{experiment_id}/compare-experiments/ | +[**CreateExperiment**](ExperimentsAPI.md#CreateExperiment) | **Post** /model-hub/experiments/v2/ | +[**DeleteExperiments**](ExperimentsAPI.md#DeleteExperiments) | **Delete** /model-hub/experiments/v2/delete/ | +[**DownloadExperiment**](ExperimentsAPI.md#DownloadExperiment) | **Get** /model-hub/experiments/v2/{experiment_id}/download/ | +[**GetExperiment**](ExperimentsAPI.md#GetExperiment) | **Get** /model-hub/experiments/v2/{experiment_id}/ | +[**GetExperimentJsonSchema**](ExperimentsAPI.md#GetExperimentJsonSchema) | **Get** /model-hub/experiments/v2/{experiment_id}/json-schema/ | +[**GetExperimentRow**](ExperimentsAPI.md#GetExperimentRow) | **Get** /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/ | +[**GetExperimentStats**](ExperimentsAPI.md#GetExperimentStats) | **Get** /model-hub/experiments/v2/{experiment_id}/stats/ | +[**ListExperimentComparisons**](ExperimentsAPI.md#ListExperimentComparisons) | **Get** /model-hub/experiments/v2/{experiment_id}/comparisons/ | +[**ListExperimentRows**](ExperimentsAPI.md#ListExperimentRows) | **Get** /model-hub/experiments/v2/{experiment_id}/rows/ | +[**ListExperiments**](ExperimentsAPI.md#ListExperiments) | **Get** /model-hub/experiments/v2/list/ | +[**RerunExperiment**](ExperimentsAPI.md#RerunExperiment) | **Post** /model-hub/experiments/v2/re-run/ | V2 re-run: org-scoped, uses V2 Temporal workflow. +[**StopExperiment**](ExperimentsAPI.md#StopExperiment) | **Post** /model-hub/experiments/v2/{experiment_id}/stop/ | Stop a running V2 experiment. +[**UpdateExperiment**](ExperimentsAPI.md#UpdateExperiment) | **Put** /model-hub/experiments/v2/{experiment_id}/ | Update a V2 experiment with diff-based selective re-run. + + + +## CompareExperiments + +> ExperimentDatasetComparisonResponse CompareExperiments(ctx, experimentId).ExperimentComparisonWeightsRequest(experimentComparisonWeightsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + experimentComparisonWeightsRequest := *openapiclient.NewExperimentComparisonWeightsRequest() // ExperimentComparisonWeightsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.CompareExperiments(context.Background(), experimentId).ExperimentComparisonWeightsRequest(experimentComparisonWeightsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.CompareExperiments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CompareExperiments`: ExperimentDatasetComparisonResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.CompareExperiments`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCompareExperimentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **experimentComparisonWeightsRequest** | [**ExperimentComparisonWeightsRequest**](ExperimentComparisonWeightsRequest.md) | | + +### Return type + +[**ExperimentDatasetComparisonResponse**](ExperimentDatasetComparisonResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateExperiment + +> ExperimentStringResultResponse CreateExperiment(ctx).ExperimentCreateV2(experimentCreateV2).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentCreateV2 := *openapiclient.NewExperimentCreateV2("Name_example", "DatasetId_example", []openapiclient.PromptConfigEntry{*openapiclient.NewPromptConfigEntry()}, []openapiclient.EvalMetricEntry{*openapiclient.NewEvalMetricEntry("TemplateId_example", "Name_example", map[string]interface{}{"key": interface{}(123)})}) // ExperimentCreateV2 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.CreateExperiment(context.Background()).ExperimentCreateV2(experimentCreateV2).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.CreateExperiment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateExperiment`: ExperimentStringResultResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.CreateExperiment`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateExperimentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **experimentCreateV2** | [**ExperimentCreateV2**](ExperimentCreateV2.md) | | + +### Return type + +[**ExperimentStringResultResponse**](ExperimentStringResultResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteExperiments + +> DeleteExperiments(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ExperimentsAPI.DeleteExperiments(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.DeleteExperiments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteExperimentsRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DownloadExperiment + +> *os.File DownloadExperiment(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.DownloadExperiment(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.DownloadExperiment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DownloadExperiment`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.DownloadExperiment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDownloadExperimentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetExperiment + +> ExperimentV2DetailResponse GetExperiment(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.GetExperiment(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.GetExperiment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetExperiment`: ExperimentV2DetailResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.GetExperiment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetExperimentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentV2DetailResponse**](ExperimentV2DetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetExperimentJsonSchema + +> ExperimentJsonSchemaResponse GetExperimentJsonSchema(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.GetExperimentJsonSchema(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.GetExperimentJsonSchema``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetExperimentJsonSchema`: ExperimentJsonSchemaResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.GetExperimentJsonSchema`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetExperimentJsonSchemaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentJsonSchemaResponse**](ExperimentJsonSchemaResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetExperimentRow + +> ExperimentTableRowsResponse GetExperimentRow(ctx, experimentId, rowId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + rowId := "rowId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.GetExperimentRow(context.Background(), experimentId, rowId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.GetExperimentRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetExperimentRow`: ExperimentTableRowsResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.GetExperimentRow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | +**rowId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetExperimentRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ExperimentTableRowsResponse**](ExperimentTableRowsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetExperimentStats + +> ExperimentStatsResponse GetExperimentStats(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.GetExperimentStats(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.GetExperimentStats``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetExperimentStats`: ExperimentStatsResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.GetExperimentStats`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetExperimentStatsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentStatsResponse**](ExperimentStatsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExperimentComparisons + +> ExperimentComparisonDetailsResponse ListExperimentComparisons(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.ListExperimentComparisons(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.ListExperimentComparisons``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListExperimentComparisons`: ExperimentComparisonDetailsResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.ListExperimentComparisons`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListExperimentComparisonsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentComparisonDetailsResponse**](ExperimentComparisonDetailsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExperimentRows + +> ExperimentTableRowsResponse ListExperimentRows(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.ListExperimentRows(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.ListExperimentRows``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListExperimentRows`: ExperimentTableRowsResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.ListExperimentRows`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListExperimentRowsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentTableRowsResponse**](ExperimentTableRowsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExperiments + +> ListExperiments200Response ListExperiments(ctx).CreatedAt(createdAt).Status(status).DatasetId(datasetId).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + createdAt := "createdAt_example" // string | (optional) + status := "status_example" // string | (optional) + datasetId := "datasetId_example" // string | (optional) + search := "search_example" // string | A search term. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.ListExperiments(context.Background()).CreatedAt(createdAt).Status(status).DatasetId(datasetId).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.ListExperiments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListExperiments`: ListExperiments200Response + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.ListExperiments`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListExperimentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createdAt** | **string** | | + **status** | **string** | | + **datasetId** | **string** | | + **search** | **string** | A search term. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ListExperiments200Response**](ListExperiments200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RerunExperiment + +> ExperimentStringResultResponse RerunExperiment(ctx).ExperimentRerunRequest(experimentRerunRequest).Execute() + +V2 re-run: org-scoped, uses V2 Temporal workflow. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentRerunRequest := *openapiclient.NewExperimentRerunRequest([]string{"ExperimentIds_example"}) // ExperimentRerunRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.RerunExperiment(context.Background()).ExperimentRerunRequest(experimentRerunRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.RerunExperiment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RerunExperiment`: ExperimentStringResultResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.RerunExperiment`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRerunExperimentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **experimentRerunRequest** | [**ExperimentRerunRequest**](ExperimentRerunRequest.md) | | + +### Return type + +[**ExperimentStringResultResponse**](ExperimentStringResultResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## StopExperiment + +> ExperimentStopResponse StopExperiment(ctx, experimentId).Body(body).Execute() + +Stop a running V2 experiment. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.StopExperiment(context.Background(), experimentId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.StopExperiment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `StopExperiment`: ExperimentStopResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.StopExperiment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiStopExperimentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**ExperimentStopResponse**](ExperimentStopResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateExperiment + +> ExperimentV2DetailResponse UpdateExperiment(ctx, experimentId).ExperimentUpdateV2(experimentUpdateV2).Execute() + +Update a V2 experiment with diff-based selective re-run. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + experimentUpdateV2 := *openapiclient.NewExperimentUpdateV2() // ExperimentUpdateV2 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ExperimentsAPI.UpdateExperiment(context.Background(), experimentId).ExperimentUpdateV2(experimentUpdateV2).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsAPI.UpdateExperiment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateExperiment`: ExperimentV2DetailResponse + fmt.Fprintf(os.Stdout, "Response from `ExperimentsAPI.UpdateExperiment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateExperimentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **experimentUpdateV2** | [**ExperimentUpdateV2**](ExperimentUpdateV2.md) | | + +### Return type + +[**ExperimentV2DetailResponse**](ExperimentV2DetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/ModelHubAPI.md b/go/futureagi/docs/ModelHubAPI.md new file mode 100644 index 0000000..992b49c --- /dev/null +++ b/go/futureagi/docs/ModelHubAPI.md @@ -0,0 +1,14046 @@ +# \ModelHubAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ModelHubAnnotationQueuesAutomationRulesCreate**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesCreate) | **Post** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +[**ModelHubAnnotationQueuesAutomationRulesDelete**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesDelete) | **Delete** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +[**ModelHubAnnotationQueuesAutomationRulesEvaluate**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesEvaluate) | **Post** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/ | Trigger a manual rule run with a sync-or-async branch. +[**ModelHubAnnotationQueuesAutomationRulesList**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesList) | **Get** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +[**ModelHubAnnotationQueuesAutomationRulesPartialUpdate**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesPartialUpdate) | **Patch** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +[**ModelHubAnnotationQueuesAutomationRulesPreview**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesPreview) | **Get** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/ | +[**ModelHubAnnotationQueuesAutomationRulesRead**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesRead) | **Get** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +[**ModelHubAnnotationQueuesAutomationRulesUpdate**](ModelHubAPI.md#ModelHubAnnotationQueuesAutomationRulesUpdate) | **Put** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +[**ModelHubAnnotationQueuesForSource**](ModelHubAPI.md#ModelHubAnnotationQueuesForSource) | **Get** /model-hub/annotation-queues/for-source/ | +[**ModelHubAnnotationQueuesGetOrCreateDefault**](ModelHubAPI.md#ModelHubAnnotationQueuesGetOrCreateDefault) | **Post** /model-hub/annotation-queues/get-or-create-default/ | +[**ModelHubAnnotationQueuesHardDelete**](ModelHubAPI.md#ModelHubAnnotationQueuesHardDelete) | **Post** /model-hub/annotation-queues/{id}/hard-delete/ | Permanently remove a queue + everything attached. +[**ModelHubAnnotationQueuesItemsCreate**](ModelHubAPI.md#ModelHubAnnotationQueuesItemsCreate) | **Post** /model-hub/annotation-queues/{queue_id}/items/ | +[**ModelHubAnnotationQueuesItemsDelete**](ModelHubAPI.md#ModelHubAnnotationQueuesItemsDelete) | **Delete** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +[**ModelHubAnnotationQueuesItemsPartialUpdate**](ModelHubAPI.md#ModelHubAnnotationQueuesItemsPartialUpdate) | **Patch** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +[**ModelHubAnnotationQueuesItemsRead**](ModelHubAPI.md#ModelHubAnnotationQueuesItemsRead) | **Get** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +[**ModelHubAnnotationQueuesItemsUpdate**](ModelHubAPI.md#ModelHubAnnotationQueuesItemsUpdate) | **Put** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +[**ModelHubAnnotationQueuesRestore**](ModelHubAPI.md#ModelHubAnnotationQueuesRestore) | **Post** /model-hub/annotation-queues/{id}/restore/ | +[**ModelHubAnnotationQueuesUpdate**](ModelHubAPI.md#ModelHubAnnotationQueuesUpdate) | **Put** /model-hub/annotation-queues/{id}/ | +[**ModelHubAnnotationsLabelsCreate**](ModelHubAPI.md#ModelHubAnnotationsLabelsCreate) | **Post** /model-hub/annotations-labels/ | +[**ModelHubAnnotationsLabelsDelete**](ModelHubAPI.md#ModelHubAnnotationsLabelsDelete) | **Delete** /model-hub/annotations-labels/{id}/ | +[**ModelHubAnnotationsLabelsList**](ModelHubAPI.md#ModelHubAnnotationsLabelsList) | **Get** /model-hub/annotations-labels/ | +[**ModelHubAnnotationsLabelsPartialUpdate**](ModelHubAPI.md#ModelHubAnnotationsLabelsPartialUpdate) | **Patch** /model-hub/annotations-labels/{id}/ | +[**ModelHubAnnotationsLabelsRead**](ModelHubAPI.md#ModelHubAnnotationsLabelsRead) | **Get** /model-hub/annotations-labels/{id}/ | +[**ModelHubAnnotationsLabelsRestore**](ModelHubAPI.md#ModelHubAnnotationsLabelsRestore) | **Post** /model-hub/annotations-labels/{id}/restore/ | +[**ModelHubAnnotationsLabelsUpdate**](ModelHubAPI.md#ModelHubAnnotationsLabelsUpdate) | **Put** /model-hub/annotations-labels/{id}/ | +[**ModelHubApiKeysCreate**](ModelHubAPI.md#ModelHubApiKeysCreate) | **Post** /model-hub/api-keys/ | +[**ModelHubApiKeysDelete**](ModelHubAPI.md#ModelHubApiKeysDelete) | **Delete** /model-hub/api-keys/{id}/ | Soft-delete an API key. +[**ModelHubApiKeysList**](ModelHubAPI.md#ModelHubApiKeysList) | **Get** /model-hub/api-keys/ | +[**ModelHubApiKeysPartialUpdate**](ModelHubAPI.md#ModelHubApiKeysPartialUpdate) | **Patch** /model-hub/api-keys/{id}/ | +[**ModelHubApiKeysRead**](ModelHubAPI.md#ModelHubApiKeysRead) | **Get** /model-hub/api-keys/{id}/ | +[**ModelHubApiKeysUpdate**](ModelHubAPI.md#ModelHubApiKeysUpdate) | **Put** /model-hub/api-keys/{id}/ | +[**ModelHubApiModelsListList**](ModelHubAPI.md#ModelHubApiModelsListList) | **Get** /model-hub/api/models_list/ | +[**ModelHubDatasetRunPromptStatsList**](ModelHubAPI.md#ModelHubDatasetRunPromptStatsList) | **Get** /model-hub/dataset/{dataset_id}/run-prompt-stats/ | +[**ModelHubDatasetsAddApiColumnCreate**](ModelHubAPI.md#ModelHubDatasetsAddApiColumnCreate) | **Post** /model-hub/datasets/{dataset_id}/add-api-column/ | +[**ModelHubDatasetsAddVectorDbColumnCreate**](ModelHubAPI.md#ModelHubDatasetsAddVectorDbColumnCreate) | **Post** /model-hub/datasets/{dataset_id}/add_vector_db_column/ | +[**ModelHubDatasetsClassifyColumnCreate**](ModelHubAPI.md#ModelHubDatasetsClassifyColumnCreate) | **Post** /model-hub/datasets/{dataset_id}/classify-column/ | +[**ModelHubDatasetsCompareDatasetsAddEvalCreate**](ModelHubAPI.md#ModelHubDatasetsCompareDatasetsAddEvalCreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/ | +[**ModelHubDatasetsCompareDatasetsCreate**](ModelHubAPI.md#ModelHubDatasetsCompareDatasetsCreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/ | +[**ModelHubDatasetsCompareDatasetsDownloadCreate**](ModelHubAPI.md#ModelHubDatasetsCompareDatasetsDownloadCreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/download/ | +[**ModelHubDatasetsCompareDatasetsStartEvalCreate**](ModelHubAPI.md#ModelHubDatasetsCompareDatasetsStartEvalCreate) | **Post** /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/ | +[**ModelHubDatasetsCompareGetEvalsListCreate**](ModelHubAPI.md#ModelHubDatasetsCompareGetEvalsListCreate) | **Post** /model-hub/datasets/compare/get-evals-list/ | +[**ModelHubDatasetsComparePreviewRunEvalCreate**](ModelHubAPI.md#ModelHubDatasetsComparePreviewRunEvalCreate) | **Post** /model-hub/datasets/compare/preview-run-eval/ | +[**ModelHubDatasetsCompareStatsCreate**](ModelHubAPI.md#ModelHubDatasetsCompareStatsCreate) | **Post** /model-hub/datasets/{dataset_id}/compare-stats/ | +[**ModelHubDatasetsConditionalColumnCreate**](ModelHubAPI.md#ModelHubDatasetsConditionalColumnCreate) | **Post** /model-hub/datasets/{dataset_id}/conditional-column/ | +[**ModelHubDatasetsDeleteCompareDelete**](ModelHubAPI.md#ModelHubDatasetsDeleteCompareDelete) | **Delete** /model-hub/datasets/delete-compare/{compare_id}/ | +[**ModelHubDatasetsDeleteCompareRead**](ModelHubAPI.md#ModelHubDatasetsDeleteCompareRead) | **Get** /model-hub/datasets/delete-compare/{compare_id}/ | +[**ModelHubDatasetsDuplicateRowsCreate**](ModelHubAPI.md#ModelHubDatasetsDuplicateRowsCreate) | **Post** /model-hub/datasets/{dataset_id}/duplicate-rows/ | +[**ModelHubDatasetsExplanationSummaryRead**](ModelHubAPI.md#ModelHubDatasetsExplanationSummaryRead) | **Get** /model-hub/datasets/explanation-summary/{dataset_id}/ | +[**ModelHubDatasetsExplanationSummaryRefreshCreate**](ModelHubAPI.md#ModelHubDatasetsExplanationSummaryRefreshCreate) | **Post** /model-hub/datasets/explanation-summary/{dataset_id}/refresh/ | +[**ModelHubDatasetsExtractEntitiesCreate**](ModelHubAPI.md#ModelHubDatasetsExtractEntitiesCreate) | **Post** /model-hub/datasets/{dataset_id}/extract-entities/ | +[**ModelHubDatasetsGetCompareRowDelete**](ModelHubAPI.md#ModelHubDatasetsGetCompareRowDelete) | **Delete** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +[**ModelHubDatasetsGetCompareRowRead**](ModelHubAPI.md#ModelHubDatasetsGetCompareRowRead) | **Get** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +[**ModelHubDatasetsHuggingfaceDetailCreate**](ModelHubAPI.md#ModelHubDatasetsHuggingfaceDetailCreate) | **Post** /model-hub/datasets/huggingface/detail/ | +[**ModelHubDatasetsHuggingfaceListCreate**](ModelHubAPI.md#ModelHubDatasetsHuggingfaceListCreate) | **Post** /model-hub/datasets/huggingface/list/ | +[**ModelHubDatasetsMergeCreate**](ModelHubAPI.md#ModelHubDatasetsMergeCreate) | **Post** /model-hub/datasets/{dataset_id}/merge/ | +[**ModelHubDatasetsPreviewCreate**](ModelHubAPI.md#ModelHubDatasetsPreviewCreate) | **Post** /model-hub/datasets/{dataset_id}/preview/{operation_type}/ | +[**ModelHubDeleteEvalTemplateCreate**](ModelHubAPI.md#ModelHubDeleteEvalTemplateCreate) | **Post** /model-hub/delete-eval-template/ | +[**ModelHubDevelopsAddAsNewCreate**](ModelHubAPI.md#ModelHubDevelopsAddAsNewCreate) | **Post** /model-hub/develops/add-as-new/ | +[**ModelHubDevelopsAddEmptyColumnsCreate**](ModelHubAPI.md#ModelHubDevelopsAddEmptyColumnsCreate) | **Post** /model-hub/develops/{dataset_id}/add_empty_columns/ | +[**ModelHubDevelopsAddEmptyRowsCreate**](ModelHubAPI.md#ModelHubDevelopsAddEmptyRowsCreate) | **Post** /model-hub/develops/{dataset_id}/add_empty_rows/ | +[**ModelHubDevelopsAddMultipleStaticColumnsCreate**](ModelHubAPI.md#ModelHubDevelopsAddMultipleStaticColumnsCreate) | **Post** /model-hub/develops/{dataset_id}/add_multiple_static_columns/ | Add multiple static columns to a dataset at once. +[**ModelHubDevelopsAddRowsFromExistingDatasetCreate**](ModelHubAPI.md#ModelHubDevelopsAddRowsFromExistingDatasetCreate) | **Post** /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/ | +[**ModelHubDevelopsAddRowsFromFileCreate**](ModelHubAPI.md#ModelHubDevelopsAddRowsFromFileCreate) | **Post** /model-hub/develops/add_rows_from_file/ | +[**ModelHubDevelopsAddRowsFromHuggingfaceCreate**](ModelHubAPI.md#ModelHubDevelopsAddRowsFromHuggingfaceCreate) | **Post** /model-hub/develops/{dataset_id}/add_rows_from_huggingface/ | +[**ModelHubDevelopsAddRowsSdkCreate**](ModelHubAPI.md#ModelHubDevelopsAddRowsSdkCreate) | **Post** /model-hub/develops/add_rows_sdk/ | +[**ModelHubDevelopsAddRunPromptColumnCreate**](ModelHubAPI.md#ModelHubDevelopsAddRunPromptColumnCreate) | **Post** /model-hub/develops/add_run_prompt_column/ | +[**ModelHubDevelopsAddStaticColumnCreate**](ModelHubAPI.md#ModelHubDevelopsAddStaticColumnCreate) | **Post** /model-hub/develops/{dataset_id}/add_static_column/ | +[**ModelHubDevelopsAddSyntheticDataCreate**](ModelHubAPI.md#ModelHubDevelopsAddSyntheticDataCreate) | **Post** /model-hub/develops/{dataset_id}/add_synthetic_data/ | +[**ModelHubDevelopsAddUserEvalCreate**](ModelHubAPI.md#ModelHubDevelopsAddUserEvalCreate) | **Post** /model-hub/develops/{dataset_id}/add_user_eval/ | +[**ModelHubDevelopsCloneDatasetCreate**](ModelHubAPI.md#ModelHubDevelopsCloneDatasetCreate) | **Post** /model-hub/develops/clone-dataset/{dataset_id}/ | +[**ModelHubDevelopsCreateDatasetCreate**](ModelHubAPI.md#ModelHubDevelopsCreateDatasetCreate) | **Post** /model-hub/develops/{exp_dataset_id}/create-dataset/ | +[**ModelHubDevelopsCreateDatasetFromHuggingfaceCreate**](ModelHubAPI.md#ModelHubDevelopsCreateDatasetFromHuggingfaceCreate) | **Post** /model-hub/develops/create-dataset-from-huggingface/ | +[**ModelHubDevelopsCreateSyntheticDatasetCreate**](ModelHubAPI.md#ModelHubDevelopsCreateSyntheticDatasetCreate) | **Post** /model-hub/develops/create-synthetic-dataset/ | +[**ModelHubDevelopsDatasetCreationProgressRead**](ModelHubAPI.md#ModelHubDevelopsDatasetCreationProgressRead) | **Get** /model-hub/develops/dataset-creation-progress/{dataset_id}/ | +[**ModelHubDevelopsDeleteDatasetDelete**](ModelHubAPI.md#ModelHubDevelopsDeleteDatasetDelete) | **Delete** /model-hub/develops/delete_dataset/ | +[**ModelHubDevelopsDeleteTemplateEvalDelete**](ModelHubAPI.md#ModelHubDevelopsDeleteTemplateEvalDelete) | **Delete** /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/ | +[**ModelHubDevelopsDeleteUserEvalDelete**](ModelHubAPI.md#ModelHubDevelopsDeleteUserEvalDelete) | **Delete** /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/ | +[**ModelHubDevelopsEditAndRunUserEvalCreate**](ModelHubAPI.md#ModelHubDevelopsEditAndRunUserEvalCreate) | **Post** /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/ | +[**ModelHubDevelopsEditDatasetBehaviorUpdate**](ModelHubAPI.md#ModelHubDevelopsEditDatasetBehaviorUpdate) | **Put** /model-hub/develops/{dataset_id}/edit_dataset_behavior/ | +[**ModelHubDevelopsEditRunPromptColumnCreate**](ModelHubAPI.md#ModelHubDevelopsEditRunPromptColumnCreate) | **Post** /model-hub/develops/edit_run_prompt_column/ | +[**ModelHubDevelopsExtractJsonColumnCreate**](ModelHubAPI.md#ModelHubDevelopsExtractJsonColumnCreate) | **Post** /model-hub/develops/{dataset_id}/extract-json-column/ | +[**ModelHubDevelopsGetCellDataCreate**](ModelHubAPI.md#ModelHubDevelopsGetCellDataCreate) | **Post** /model-hub/develops/get-cell-data/ | +[**ModelHubDevelopsGetDerivedDatasetsRead**](ModelHubAPI.md#ModelHubDevelopsGetDerivedDatasetsRead) | **Get** /model-hub/develops/get-derived-datasets/{dataset_id}/ | +[**ModelHubDevelopsGetEvalStructureRead**](ModelHubAPI.md#ModelHubDevelopsGetEvalStructureRead) | **Get** /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/ | +[**ModelHubDevelopsGetEvalsListList**](ModelHubAPI.md#ModelHubDevelopsGetEvalsListList) | **Get** /model-hub/develops/{dataset_id}/get_evals_list/ | +[**ModelHubDevelopsGetExperimentDatasetTableList**](ModelHubAPI.md#ModelHubDevelopsGetExperimentDatasetTableList) | **Get** /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/ | +[**ModelHubDevelopsGetFunctionListList**](ModelHubAPI.md#ModelHubDevelopsGetFunctionListList) | **Get** /model-hub/develops/get_function_list/ | +[**ModelHubDevelopsGetHuggingfaceDatasetConfigCreate**](ModelHubAPI.md#ModelHubDevelopsGetHuggingfaceDatasetConfigCreate) | **Post** /model-hub/develops/get-huggingface-dataset-config/ | +[**ModelHubDevelopsGetRowDiffCreate**](ModelHubAPI.md#ModelHubDevelopsGetRowDiffCreate) | **Post** /model-hub/develops/get-row-diff/ | +[**ModelHubDevelopsPreviewRunEvalCreate**](ModelHubAPI.md#ModelHubDevelopsPreviewRunEvalCreate) | **Post** /model-hub/develops/{dataset_id}/preview_run_eval/ | +[**ModelHubDevelopsPreviewRunPromptColumnCreate**](ModelHubAPI.md#ModelHubDevelopsPreviewRunPromptColumnCreate) | **Post** /model-hub/develops/preview_run_prompt_column/ | +[**ModelHubDevelopsProviderStatusList**](ModelHubAPI.md#ModelHubDevelopsProviderStatusList) | **Get** /model-hub/develops/provider-status/ | +[**ModelHubDevelopsRetrieveRunPromptColumnConfigList**](ModelHubAPI.md#ModelHubDevelopsRetrieveRunPromptColumnConfigList) | **Get** /model-hub/develops/retrieve_run_prompt_column_config/ | +[**ModelHubDevelopsRetrieveRunPromptOptionsList**](ModelHubAPI.md#ModelHubDevelopsRetrieveRunPromptOptionsList) | **Get** /model-hub/develops/retrieve_run_prompt_options/ | +[**ModelHubDevelopsStartEvalsProcessCreate**](ModelHubAPI.md#ModelHubDevelopsStartEvalsProcessCreate) | **Post** /model-hub/develops/{dataset_id}/start_evals_process/ | +[**ModelHubDevelopsStopUserEvalCreate**](ModelHubAPI.md#ModelHubDevelopsStopUserEvalCreate) | **Post** /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/ | POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. +[**ModelHubDevelopsSyntheticConfigList**](ModelHubAPI.md#ModelHubDevelopsSyntheticConfigList) | **Get** /model-hub/develops/{dataset_id}/synthetic-config/ | +[**ModelHubDevelopsUpdateColumnNameUpdate**](ModelHubAPI.md#ModelHubDevelopsUpdateColumnNameUpdate) | **Put** /model-hub/develops/{dataset_id}/update_column_name/{column_id}/ | +[**ModelHubDevelopsUpdateColumnTypeUpdate**](ModelHubAPI.md#ModelHubDevelopsUpdateColumnTypeUpdate) | **Put** /model-hub/develops/{dataset_id}/update_column_type/{column_id}/ | +[**ModelHubDevelopsUpdateSyntheticConfigUpdate**](ModelHubAPI.md#ModelHubDevelopsUpdateSyntheticConfigUpdate) | **Put** /model-hub/develops/{dataset_id}/update-synthetic-config/ | +[**ModelHubEvalTemplatesBulkDeleteCreate**](ModelHubAPI.md#ModelHubEvalTemplatesBulkDeleteCreate) | **Post** /model-hub/eval-templates/bulk-delete/ | POST /model-hub/eval-templates/bulk-delete/ +[**ModelHubEvalTemplatesCompositeExecuteAdhocCreate**](ModelHubAPI.md#ModelHubEvalTemplatesCompositeExecuteAdhocCreate) | **Post** /model-hub/eval-templates/composite/execute-adhoc/ | POST /model-hub/eval-templates/composite/execute-adhoc/ +[**ModelHubEvalTemplatesCompositeExecuteCreate**](ModelHubAPI.md#ModelHubEvalTemplatesCompositeExecuteCreate) | **Post** /model-hub/eval-templates/{template_id}/composite/execute/ | POST /model-hub/eval-templates/<template_id>/composite/execute/ +[**ModelHubEvalTemplatesCompositeList**](ModelHubAPI.md#ModelHubEvalTemplatesCompositeList) | **Get** /model-hub/eval-templates/{template_id}/composite/ | GET /model-hub/eval-templates/<id>/composite/ +[**ModelHubEvalTemplatesCompositePartialUpdate**](ModelHubAPI.md#ModelHubEvalTemplatesCompositePartialUpdate) | **Patch** /model-hub/eval-templates/{template_id}/composite/ | PATCH — partial update of a composite eval. +[**ModelHubEvalTemplatesCreateCompositeCreate**](ModelHubAPI.md#ModelHubEvalTemplatesCreateCompositeCreate) | **Post** /model-hub/eval-templates/create-composite/ | POST /model-hub/eval-templates/create-composite/ +[**ModelHubEvalTemplatesCreateV2Create**](ModelHubAPI.md#ModelHubEvalTemplatesCreateV2Create) | **Post** /model-hub/eval-templates/create-v2/ | POST /model-hub/eval-templates/create-v2/ +[**ModelHubEvalTemplatesDetailList**](ModelHubAPI.md#ModelHubEvalTemplatesDetailList) | **Get** /model-hub/eval-templates/{template_id}/detail/ | GET /model-hub/eval-templates/<id>/detail/ +[**ModelHubEvalTemplatesFeedbackListList**](ModelHubAPI.md#ModelHubEvalTemplatesFeedbackListList) | **Get** /model-hub/eval-templates/{template_id}/feedback-list/ | GET /model-hub/eval-templates/<id>/feedback-list/ +[**ModelHubEvalTemplatesGroundTruthConfigList**](ModelHubAPI.md#ModelHubEvalTemplatesGroundTruthConfigList) | **Get** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +[**ModelHubEvalTemplatesGroundTruthConfigUpdate**](ModelHubAPI.md#ModelHubEvalTemplatesGroundTruthConfigUpdate) | **Put** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +[**ModelHubEvalTemplatesGroundTruthList**](ModelHubAPI.md#ModelHubEvalTemplatesGroundTruthList) | **Get** /model-hub/eval-templates/{template_id}/ground-truth/ | +[**ModelHubEvalTemplatesGroundTruthUploadCreate**](ModelHubAPI.md#ModelHubEvalTemplatesGroundTruthUploadCreate) | **Post** /model-hub/eval-templates/{template_id}/ground-truth/upload/ | POST /model-hub/eval-templates/<id>/ground-truth/upload/ +[**ModelHubEvalTemplatesListChartsCreate**](ModelHubAPI.md#ModelHubEvalTemplatesListChartsCreate) | **Post** /model-hub/eval-templates/list-charts/ | POST /model-hub/eval-templates/list-charts/ +[**ModelHubEvalTemplatesListCreate**](ModelHubAPI.md#ModelHubEvalTemplatesListCreate) | **Post** /model-hub/eval-templates/list/ | POST /model-hub/eval-templates/list/ +[**ModelHubEvalTemplatesUpdateUpdate**](ModelHubAPI.md#ModelHubEvalTemplatesUpdateUpdate) | **Put** /model-hub/eval-templates/{template_id}/update/ | PUT /model-hub/eval-templates/<id>/update/ +[**ModelHubEvalTemplatesUsageList**](ModelHubAPI.md#ModelHubEvalTemplatesUsageList) | **Get** /model-hub/eval-templates/{template_id}/usage/ | GET /model-hub/eval-templates/<id>/usage/ +[**ModelHubEvalTemplatesVersionsCreateCreate**](ModelHubAPI.md#ModelHubEvalTemplatesVersionsCreateCreate) | **Post** /model-hub/eval-templates/{template_id}/versions/create/ | POST /model-hub/eval-templates/<id>/versions/create/ +[**ModelHubEvalTemplatesVersionsList**](ModelHubAPI.md#ModelHubEvalTemplatesVersionsList) | **Get** /model-hub/eval-templates/{template_id}/versions/ | GET /model-hub/eval-templates/<id>/versions/ +[**ModelHubEvalTemplatesVersionsRestoreCreate**](ModelHubAPI.md#ModelHubEvalTemplatesVersionsRestoreCreate) | **Post** /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/ | POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ +[**ModelHubEvalTemplatesVersionsSetDefaultUpdate**](ModelHubAPI.md#ModelHubEvalTemplatesVersionsSetDefaultUpdate) | **Put** /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/ | PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ +[**ModelHubExperimentsV2DerivedVariablesList**](ModelHubAPI.md#ModelHubExperimentsV2DerivedVariablesList) | **Get** /model-hub/experiments/v2/{experiment_id}/derived-variables/ | +[**ModelHubExperimentsV2EvaluationsStatsList**](ModelHubAPI.md#ModelHubExperimentsV2EvaluationsStatsList) | **Get** /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/ | +[**ModelHubExperimentsV2FeedbackCreate**](ModelHubAPI.md#ModelHubExperimentsV2FeedbackCreate) | **Post** /model-hub/experiments/v2/{experiment_id}/feedback/ | +[**ModelHubExperimentsV2FeedbackGetFeedbackDetailsList**](ModelHubAPI.md#ModelHubExperimentsV2FeedbackGetFeedbackDetailsList) | **Get** /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/ | +[**ModelHubExperimentsV2FeedbackGetTemplateList**](ModelHubAPI.md#ModelHubExperimentsV2FeedbackGetTemplateList) | **Get** /model-hub/experiments/v2/{experiment_id}/feedback/get-template/ | +[**ModelHubExperimentsV2FeedbackSubmitFeedbackCreate**](ModelHubAPI.md#ModelHubExperimentsV2FeedbackSubmitFeedbackCreate) | **Post** /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/ | +[**ModelHubExperimentsV2RerunCellsCreate**](ModelHubAPI.md#ModelHubExperimentsV2RerunCellsCreate) | **Post** /model-hub/experiments/v2/{experiment_id}/rerun-cells/ | Rerun specific cells or columns in a V2 experiment. +[**ModelHubExperimentsV2RowDiffCreate**](ModelHubAPI.md#ModelHubExperimentsV2RowDiffCreate) | **Post** /model-hub/experiments/v2/row-diff/ | +[**ModelHubExperimentsV2SuggestNameRead**](ModelHubAPI.md#ModelHubExperimentsV2SuggestNameRead) | **Get** /model-hub/experiments/v2/suggest-name/{dataset_id}/ | +[**ModelHubExperimentsV2ValidateNameList**](ModelHubAPI.md#ModelHubExperimentsV2ValidateNameList) | **Get** /model-hub/experiments/v2/validate-name/ | +[**ModelHubKnowledgeBaseCreate**](ModelHubAPI.md#ModelHubKnowledgeBaseCreate) | **Post** /model-hub/knowledge-base/ | +[**ModelHubKnowledgeBaseDelete**](ModelHubAPI.md#ModelHubKnowledgeBaseDelete) | **Delete** /model-hub/knowledge-base/ | +[**ModelHubKnowledgeBaseFilesCreate**](ModelHubAPI.md#ModelHubKnowledgeBaseFilesCreate) | **Post** /model-hub/knowledge-base/files/ | +[**ModelHubKnowledgeBaseFilesDelete**](ModelHubAPI.md#ModelHubKnowledgeBaseFilesDelete) | **Delete** /model-hub/knowledge-base/files/ | +[**ModelHubKnowledgeBaseGetList**](ModelHubAPI.md#ModelHubKnowledgeBaseGetList) | **Get** /model-hub/knowledge-base/get/ | +[**ModelHubKnowledgeBaseList**](ModelHubAPI.md#ModelHubKnowledgeBaseList) | **Get** /model-hub/knowledge-base/ | +[**ModelHubKnowledgeBaseListList**](ModelHubAPI.md#ModelHubKnowledgeBaseListList) | **Get** /model-hub/knowledge-base/list/ | +[**ModelHubKnowledgeBasePartialUpdate**](ModelHubAPI.md#ModelHubKnowledgeBasePartialUpdate) | **Patch** /model-hub/knowledge-base/ | +[**ModelHubPromptHistoryExecutionsGetExecutionDetails**](ModelHubAPI.md#ModelHubPromptHistoryExecutionsGetExecutionDetails) | **Get** /model-hub/prompt-history-executions/execution-details/{execution_id}/ | +[**ModelHubPromptHistoryExecutionsList**](ModelHubAPI.md#ModelHubPromptHistoryExecutionsList) | **Get** /model-hub/prompt-history-executions/ | +[**ModelHubPromptHistoryExecutionsRead**](ModelHubAPI.md#ModelHubPromptHistoryExecutionsRead) | **Get** /model-hub/prompt-history-executions/{id}/ | +[**ModelHubPromptLabelsAssignLabelById**](ModelHubAPI.md#ModelHubPromptLabelsAssignLabelById) | **Post** /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/ | +[**ModelHubPromptLabelsAssignMultipleLabels**](ModelHubAPI.md#ModelHubPromptLabelsAssignMultipleLabels) | **Post** /model-hub/prompt-labels/assign-multiple-labels/ | +[**ModelHubPromptLabelsCreate**](ModelHubAPI.md#ModelHubPromptLabelsCreate) | **Post** /model-hub/prompt-labels/ | +[**ModelHubPromptLabelsCreateSystemLabels**](ModelHubAPI.md#ModelHubPromptLabelsCreateSystemLabels) | **Post** /model-hub/prompt-labels/create-system-labels/ | +[**ModelHubPromptLabelsDelete**](ModelHubAPI.md#ModelHubPromptLabelsDelete) | **Delete** /model-hub/prompt-labels/{id}/ | +[**ModelHubPromptLabelsGetByName**](ModelHubAPI.md#ModelHubPromptLabelsGetByName) | **Get** /model-hub/prompt-labels/get-by-name/ | Fetch a prompt version by template name and either explicit version or label. +[**ModelHubPromptLabelsList**](ModelHubAPI.md#ModelHubPromptLabelsList) | **Get** /model-hub/prompt-labels/ | +[**ModelHubPromptLabelsPartialUpdate**](ModelHubAPI.md#ModelHubPromptLabelsPartialUpdate) | **Patch** /model-hub/prompt-labels/{id}/ | +[**ModelHubPromptLabelsRead**](ModelHubAPI.md#ModelHubPromptLabelsRead) | **Get** /model-hub/prompt-labels/{id}/ | +[**ModelHubPromptLabelsRemoveLabelFromVersion**](ModelHubAPI.md#ModelHubPromptLabelsRemoveLabelFromVersion) | **Post** /model-hub/prompt-labels/remove/ | +[**ModelHubPromptLabelsSetDefault**](ModelHubAPI.md#ModelHubPromptLabelsSetDefault) | **Post** /model-hub/prompt-labels/set-default/ | +[**ModelHubPromptLabelsTemplateLabels**](ModelHubAPI.md#ModelHubPromptLabelsTemplateLabels) | **Get** /model-hub/prompt-labels/template-labels/ | +[**ModelHubPromptLabelsUpdate**](ModelHubAPI.md#ModelHubPromptLabelsUpdate) | **Put** /model-hub/prompt-labels/{id}/ | +[**ModelHubPromptTemplatesAddNewDraft**](ModelHubAPI.md#ModelHubPromptTemplatesAddNewDraft) | **Post** /model-hub/prompt-templates/{id}/add-new-draft/ | +[**ModelHubPromptTemplatesAnalyzePrompt**](ModelHubAPI.md#ModelHubPromptTemplatesAnalyzePrompt) | **Post** /model-hub/prompt-templates/analyze-prompt/ | +[**ModelHubPromptTemplatesBulkDelete**](ModelHubAPI.md#ModelHubPromptTemplatesBulkDelete) | **Post** /model-hub/prompt-templates/bulk-delete/ | +[**ModelHubPromptTemplatesCommit**](ModelHubAPI.md#ModelHubPromptTemplatesCommit) | **Post** /model-hub/prompt-templates/{id}/commit/ | +[**ModelHubPromptTemplatesCompareVersions**](ModelHubAPI.md#ModelHubPromptTemplatesCompareVersions) | **Post** /model-hub/prompt-templates/{id}/compare-versions/ | +[**ModelHubPromptTemplatesCreate**](ModelHubAPI.md#ModelHubPromptTemplatesCreate) | **Post** /model-hub/prompt-templates/ | +[**ModelHubPromptTemplatesCreateDraft**](ModelHubAPI.md#ModelHubPromptTemplatesCreateDraft) | **Post** /model-hub/prompt-templates/create-draft/ | +[**ModelHubPromptTemplatesDelete**](ModelHubAPI.md#ModelHubPromptTemplatesDelete) | **Delete** /model-hub/prompt-templates/{id}/ | +[**ModelHubPromptTemplatesDeleteEvaluationConfig**](ModelHubAPI.md#ModelHubPromptTemplatesDeleteEvaluationConfig) | **Delete** /model-hub/prompt-templates/{id}/delete-evaluation-config/ | Delete an evaluation configuration by name from a PromptTemplate. +[**ModelHubPromptTemplatesDerivedVariablesExtractCreate**](ModelHubAPI.md#ModelHubPromptTemplatesDerivedVariablesExtractCreate) | **Post** /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/ | Manually trigger extraction of derived variables from outputs. +[**ModelHubPromptTemplatesDerivedVariablesList**](ModelHubAPI.md#ModelHubPromptTemplatesDerivedVariablesList) | **Get** /model-hub/prompt-templates/{prompt_id}/derived-variables/ | Get all derived variables for a prompt template. +[**ModelHubPromptTemplatesDerivedVariablesPreviewCreate**](ModelHubAPI.md#ModelHubPromptTemplatesDerivedVariablesPreviewCreate) | **Post** /model-hub/prompt-templates/derived-variables/preview/ | Preview derived variables from JSON content without saving. +[**ModelHubPromptTemplatesDerivedVariablesSchemaList**](ModelHubAPI.md#ModelHubPromptTemplatesDerivedVariablesSchemaList) | **Get** /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/ | Get the schema for derived variables of a specific column. +[**ModelHubPromptTemplatesGeneratePrompt**](ModelHubAPI.md#ModelHubPromptTemplatesGeneratePrompt) | **Post** /model-hub/prompt-templates/generate-prompt/ | +[**ModelHubPromptTemplatesGenerateVariables**](ModelHubAPI.md#ModelHubPromptTemplatesGenerateVariables) | **Post** /model-hub/prompt-templates/generate-variables/ | Generate synthetic data for prompt variables using the SyntheticDataAgent. +[**ModelHubPromptTemplatesGetAllVariables**](ModelHubAPI.md#ModelHubPromptTemplatesGetAllVariables) | **Get** /model-hub/prompt-templates/{id}/all-variables/ | +[**ModelHubPromptTemplatesGetEvaluationConfigs**](ModelHubAPI.md#ModelHubPromptTemplatesGetEvaluationConfigs) | **Get** /model-hub/prompt-templates/{id}/evaluation-configs/ | +[**ModelHubPromptTemplatesGetNextVersion**](ModelHubAPI.md#ModelHubPromptTemplatesGetNextVersion) | **Get** /model-hub/prompt-templates/{id}/get-next-version/ | +[**ModelHubPromptTemplatesGetRunStatus**](ModelHubAPI.md#ModelHubPromptTemplatesGetRunStatus) | **Get** /model-hub/prompt-templates/{id}/get-run-status/ | +[**ModelHubPromptTemplatesGetSdkCode**](ModelHubAPI.md#ModelHubPromptTemplatesGetSdkCode) | **Get** /model-hub/prompt-templates/{id}/get-sdk-code/{language}/ | +[**ModelHubPromptTemplatesGetTemplateByName**](ModelHubAPI.md#ModelHubPromptTemplatesGetTemplateByName) | **Get** /model-hub/prompt-templates/get-template-by-name/ | +[**ModelHubPromptTemplatesImprovePrompt**](ModelHubAPI.md#ModelHubPromptTemplatesImprovePrompt) | **Post** /model-hub/prompt-templates/improve-prompt/ | +[**ModelHubPromptTemplatesList**](ModelHubAPI.md#ModelHubPromptTemplatesList) | **Get** /model-hub/prompt-templates/ | +[**ModelHubPromptTemplatesPartialUpdate**](ModelHubAPI.md#ModelHubPromptTemplatesPartialUpdate) | **Patch** /model-hub/prompt-templates/{id}/ | +[**ModelHubPromptTemplatesRead**](ModelHubAPI.md#ModelHubPromptTemplatesRead) | **Get** /model-hub/prompt-templates/{id}/ | +[**ModelHubPromptTemplatesRetrieveEvaluations**](ModelHubAPI.md#ModelHubPromptTemplatesRetrieveEvaluations) | **Get** /model-hub/prompt-templates/{id}/evaluations/ | +[**ModelHubPromptTemplatesRunEvalsOnMultipleVersions**](ModelHubAPI.md#ModelHubPromptTemplatesRunEvalsOnMultipleVersions) | **Post** /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/ | +[**ModelHubPromptTemplatesRunTemplate**](ModelHubAPI.md#ModelHubPromptTemplatesRunTemplate) | **Post** /model-hub/prompt-templates/{id}/run_template/ | +[**ModelHubPromptTemplatesSaveName**](ModelHubAPI.md#ModelHubPromptTemplatesSaveName) | **Post** /model-hub/prompt-templates/{id}/save-name/ | +[**ModelHubPromptTemplatesSavePromptFolder**](ModelHubAPI.md#ModelHubPromptTemplatesSavePromptFolder) | **Post** /model-hub/prompt-templates/{id}/save-prompt-folder/ | +[**ModelHubPromptTemplatesSetDefault**](ModelHubAPI.md#ModelHubPromptTemplatesSetDefault) | **Post** /model-hub/prompt-templates/{id}/set_default/ | +[**ModelHubPromptTemplatesStopStreaming**](ModelHubAPI.md#ModelHubPromptTemplatesStopStreaming) | **Get** /model-hub/prompt-templates/{id}/stop-streaming/ | +[**ModelHubPromptTemplatesUpdate**](ModelHubAPI.md#ModelHubPromptTemplatesUpdate) | **Put** /model-hub/prompt-templates/{id}/ | +[**ModelHubPromptTemplatesUpdateEvaluationConfigs**](ModelHubAPI.md#ModelHubPromptTemplatesUpdateEvaluationConfigs) | **Post** /model-hub/prompt-templates/{id}/update-evaluation-configs/ | Add or update evaluation configurations for a PromptTemplate. +[**ModelHubPromptTemplatesVersions**](ModelHubAPI.md#ModelHubPromptTemplatesVersions) | **Get** /model-hub/prompt-templates/{id}/versions/ | +[**ModelHubScoresBulkCreate**](ModelHubAPI.md#ModelHubScoresBulkCreate) | **Post** /model-hub/scores/bulk/ | +[**ModelHubScoresCreate**](ModelHubAPI.md#ModelHubScoresCreate) | **Post** /model-hub/scores/ | +[**ModelHubScoresDelete**](ModelHubAPI.md#ModelHubScoresDelete) | **Delete** /model-hub/scores/{id}/ | Soft-delete a score. +[**ModelHubScoresForSource**](ModelHubAPI.md#ModelHubScoresForSource) | **Get** /model-hub/scores/for-source/ | +[**ModelHubScoresList**](ModelHubAPI.md#ModelHubScoresList) | **Get** /model-hub/scores/ | Universal Score CRUD. +[**ModelHubScoresPartialUpdate**](ModelHubAPI.md#ModelHubScoresPartialUpdate) | **Patch** /model-hub/scores/{id}/ | Universal Score CRUD. +[**ModelHubScoresRead**](ModelHubAPI.md#ModelHubScoresRead) | **Get** /model-hub/scores/{id}/ | Universal Score CRUD. +[**ModelHubScoresUpdate**](ModelHubAPI.md#ModelHubScoresUpdate) | **Put** /model-hub/scores/{id}/ | Universal Score CRUD. + + + +## ModelHubAnnotationQueuesAutomationRulesCreate + +> AutomationRule ModelHubAnnotationQueuesAutomationRulesCreate(ctx, queueId).AutomationRule(automationRule).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + automationRule := *openapiclient.NewAutomationRule("Name_example", "SourceType_example") // AutomationRule | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesCreate(context.Background(), queueId).AutomationRule(automationRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesAutomationRulesCreate`: AutomationRule + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **automationRule** | [**AutomationRule**](AutomationRule.md) | | + +### Return type + +[**AutomationRule**](AutomationRule.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesAutomationRulesDelete + +> ModelHubAnnotationQueuesAutomationRulesDelete(ctx, queueId, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this automation rule. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesDelete(context.Background(), queueId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this automation rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesAutomationRulesEvaluate + +> AutomationRuleEvaluateResponse ModelHubAnnotationQueuesAutomationRulesEvaluate(ctx, queueId, id).Body(body).Execute() + +Trigger a manual rule run with a sync-or-async branch. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this automation rule. + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesEvaluate(context.Background(), queueId, id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesEvaluate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesAutomationRulesEvaluate`: AutomationRuleEvaluateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesEvaluate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this automation rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesEvaluateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | | + +### Return type + +[**AutomationRuleEvaluateResponse**](AutomationRuleEvaluateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesAutomationRulesList + +> ModelHubAnnotationQueuesAutomationRulesList200Response ModelHubAnnotationQueuesAutomationRulesList(ctx, queueId).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesList(context.Background(), queueId).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesAutomationRulesList`: ModelHubAnnotationQueuesAutomationRulesList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubAnnotationQueuesAutomationRulesList200Response**](ModelHubAnnotationQueuesAutomationRulesList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesAutomationRulesPartialUpdate + +> AutomationRule ModelHubAnnotationQueuesAutomationRulesPartialUpdate(ctx, queueId, id).AutomationRule(automationRule).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this automation rule. + automationRule := *openapiclient.NewAutomationRule("Name_example", "SourceType_example") // AutomationRule | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesPartialUpdate(context.Background(), queueId, id).AutomationRule(automationRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesAutomationRulesPartialUpdate`: AutomationRule + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this automation rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **automationRule** | [**AutomationRule**](AutomationRule.md) | | + +### Return type + +[**AutomationRule**](AutomationRule.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesAutomationRulesPreview + +> AutomationRuleEvaluateResponse ModelHubAnnotationQueuesAutomationRulesPreview(ctx, queueId, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this automation rule. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesPreview(context.Background(), queueId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesPreview``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesAutomationRulesPreview`: AutomationRuleEvaluateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesPreview`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this automation rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesPreviewRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**AutomationRuleEvaluateResponse**](AutomationRuleEvaluateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesAutomationRulesRead + +> AutomationRule ModelHubAnnotationQueuesAutomationRulesRead(ctx, queueId, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this automation rule. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesRead(context.Background(), queueId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesAutomationRulesRead`: AutomationRule + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this automation rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**AutomationRule**](AutomationRule.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesAutomationRulesUpdate + +> AutomationRule ModelHubAnnotationQueuesAutomationRulesUpdate(ctx, queueId, id).AutomationRule(automationRule).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this automation rule. + automationRule := *openapiclient.NewAutomationRule("Name_example", "SourceType_example") // AutomationRule | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesUpdate(context.Background(), queueId, id).AutomationRule(automationRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesAutomationRulesUpdate`: AutomationRule + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesAutomationRulesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this automation rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesAutomationRulesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **automationRule** | [**AutomationRule**](AutomationRule.md) | | + +### Return type + +[**AutomationRule**](AutomationRule.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesForSource + +> QueueForSourceResponse ModelHubAnnotationQueuesForSource(ctx).Page(page).Limit(limit).SourceType(sourceType).SourceId(sourceId).Sources(sources).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + sourceType := "sourceType_example" // string | (optional) + sourceId := "sourceId_example" // string | (optional) + sources := "sources_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesForSource(context.Background()).Page(page).Limit(limit).SourceType(sourceType).SourceId(sourceId).Sources(sources).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesForSource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesForSource`: QueueForSourceResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesForSource`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesForSourceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **sourceType** | **string** | | + **sourceId** | **string** | | + **sources** | **string** | | + +### Return type + +[**QueueForSourceResponse**](QueueForSourceResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesGetOrCreateDefault + +> QueueDefaultResponse ModelHubAnnotationQueuesGetOrCreateDefault(ctx).QueueDefaultRequest(queueDefaultRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueDefaultRequest := *openapiclient.NewQueueDefaultRequest() // QueueDefaultRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesGetOrCreateDefault(context.Background()).QueueDefaultRequest(queueDefaultRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesGetOrCreateDefault``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesGetOrCreateDefault`: QueueDefaultResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesGetOrCreateDefault`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesGetOrCreateDefaultRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queueDefaultRequest** | [**QueueDefaultRequest**](QueueDefaultRequest.md) | | + +### Return type + +[**QueueDefaultResponse**](QueueDefaultResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesHardDelete + +> QueueHardDeleteResponse ModelHubAnnotationQueuesHardDelete(ctx, id).QueueHardDeleteRequest(queueHardDeleteRequest).Execute() + +Permanently remove a queue + everything attached. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + queueHardDeleteRequest := *openapiclient.NewQueueHardDeleteRequest(false, "ConfirmName_example") // QueueHardDeleteRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesHardDelete(context.Background(), id).QueueHardDeleteRequest(queueHardDeleteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesHardDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesHardDelete`: QueueHardDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesHardDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesHardDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **queueHardDeleteRequest** | [**QueueHardDeleteRequest**](QueueHardDeleteRequest.md) | | + +### Return type + +[**QueueHardDeleteResponse**](QueueHardDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesItemsCreate + +> QueueItem ModelHubAnnotationQueuesItemsCreate(ctx, queueId).QueueItem(queueItem).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + queueItem := *openapiclient.NewQueueItem("SourceType_example") // QueueItem | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesItemsCreate(context.Background(), queueId).QueueItem(queueItem).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesItemsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesItemsCreate`: QueueItem + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesItemsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesItemsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **queueItem** | [**QueueItem**](QueueItem.md) | | + +### Return type + +[**QueueItem**](QueueItem.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesItemsDelete + +> ModelHubAnnotationQueuesItemsDelete(ctx, queueId, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesItemsDelete(context.Background(), queueId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesItemsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesItemsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesItemsPartialUpdate + +> QueueItem ModelHubAnnotationQueuesItemsPartialUpdate(ctx, queueId, id).QueueItem(queueItem).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + queueItem := *openapiclient.NewQueueItem("SourceType_example") // QueueItem | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesItemsPartialUpdate(context.Background(), queueId, id).QueueItem(queueItem).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesItemsPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesItemsPartialUpdate`: QueueItem + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesItemsPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesItemsPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **queueItem** | [**QueueItem**](QueueItem.md) | | + +### Return type + +[**QueueItem**](QueueItem.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesItemsRead + +> QueueItem ModelHubAnnotationQueuesItemsRead(ctx, queueId, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesItemsRead(context.Background(), queueId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesItemsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesItemsRead`: QueueItem + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesItemsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesItemsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**QueueItem**](QueueItem.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesItemsUpdate + +> QueueItem ModelHubAnnotationQueuesItemsUpdate(ctx, queueId, id).QueueItem(queueItem).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + queueId := "queueId_example" // string | + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this queue item. + queueItem := *openapiclient.NewQueueItem("SourceType_example") // QueueItem | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesItemsUpdate(context.Background(), queueId, id).QueueItem(queueItem).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesItemsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesItemsUpdate`: QueueItem + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesItemsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**queueId** | **string** | | +**id** | **string** | A UUID string identifying this queue item. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesItemsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **queueItem** | [**QueueItem**](QueueItem.md) | | + +### Return type + +[**QueueItem**](QueueItem.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesRestore + +> QueueStatusResponse ModelHubAnnotationQueuesRestore(ctx, id).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesRestore(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesRestore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesRestore`: QueueStatusResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesRestore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesRestoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**QueueStatusResponse**](QueueStatusResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationQueuesUpdate + +> AnnotationQueue ModelHubAnnotationQueuesUpdate(ctx, id).AnnotationQueue(annotationQueue).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this annotation queue. + annotationQueue := *openapiclient.NewAnnotationQueue("Name_example") // AnnotationQueue | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationQueuesUpdate(context.Background(), id).AnnotationQueue(annotationQueue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationQueuesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationQueuesUpdate`: AnnotationQueue + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationQueuesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this annotation queue. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationQueuesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md) | | + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationsLabelsCreate + +> AnnotationsLabels ModelHubAnnotationsLabelsCreate(ctx).AnnotationsLabels(annotationsLabels).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + annotationsLabels := *openapiclient.NewAnnotationsLabels("Name_example", "Type_example") // AnnotationsLabels | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationsLabelsCreate(context.Background()).AnnotationsLabels(annotationsLabels).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationsLabelsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationsLabelsCreate`: AnnotationsLabels + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationsLabelsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationsLabelsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md) | | + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationsLabelsDelete + +> ModelHubAnnotationsLabelsDelete(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubAnnotationsLabelsDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationsLabelsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationsLabelsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationsLabelsList + +> []AnnotationsLabels ModelHubAnnotationsLabelsList(ctx).Page(page).Limit(limit).Dataset(dataset).ProjectId(projectId).Type_(type_).Search(search).IncludeUsageCount(includeUsageCount).IncludeArchived(includeArchived).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + dataset := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + type_ := "type__example" // string | (optional) + search := "search_example" // string | (optional) + includeUsageCount := true // bool | (optional) + includeArchived := true // bool | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationsLabelsList(context.Background()).Page(page).Limit(limit).Dataset(dataset).ProjectId(projectId).Type_(type_).Search(search).IncludeUsageCount(includeUsageCount).IncludeArchived(includeArchived).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationsLabelsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationsLabelsList`: []AnnotationsLabels + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationsLabelsList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationsLabelsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **dataset** | **string** | | + **projectId** | **string** | | + **type_** | **string** | | + **search** | **string** | | + **includeUsageCount** | **bool** | | + **includeArchived** | **bool** | | + +### Return type + +[**[]AnnotationsLabels**](AnnotationsLabels.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationsLabelsPartialUpdate + +> AnnotationsLabels ModelHubAnnotationsLabelsPartialUpdate(ctx, id).AnnotationsLabels(annotationsLabels).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + annotationsLabels := *openapiclient.NewAnnotationsLabels("Name_example", "Type_example") // AnnotationsLabels | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationsLabelsPartialUpdate(context.Background(), id).AnnotationsLabels(annotationsLabels).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationsLabelsPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationsLabelsPartialUpdate`: AnnotationsLabels + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationsLabelsPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationsLabelsPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md) | | + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationsLabelsRead + +> AnnotationsLabels ModelHubAnnotationsLabelsRead(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationsLabelsRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationsLabelsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationsLabelsRead`: AnnotationsLabels + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationsLabelsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationsLabelsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationsLabelsRestore + +> AnnotationLabelRestoreResponse ModelHubAnnotationsLabelsRestore(ctx, id).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationsLabelsRestore(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationsLabelsRestore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationsLabelsRestore`: AnnotationLabelRestoreResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationsLabelsRestore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationsLabelsRestoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**AnnotationLabelRestoreResponse**](AnnotationLabelRestoreResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubAnnotationsLabelsUpdate + +> AnnotationsLabels ModelHubAnnotationsLabelsUpdate(ctx, id).AnnotationsLabels(annotationsLabels).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + annotationsLabels := *openapiclient.NewAnnotationsLabels("Name_example", "Type_example") // AnnotationsLabels | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubAnnotationsLabelsUpdate(context.Background(), id).AnnotationsLabels(annotationsLabels).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubAnnotationsLabelsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubAnnotationsLabelsUpdate`: AnnotationsLabels + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubAnnotationsLabelsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubAnnotationsLabelsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md) | | + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubApiKeysCreate + +> ApiKey ModelHubApiKeysCreate(ctx).ApiKey(apiKey).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + apiKey := *openapiclient.NewApiKey("Provider_example") // ApiKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubApiKeysCreate(context.Background()).ApiKey(apiKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubApiKeysCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubApiKeysCreate`: ApiKey + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubApiKeysCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubApiKeysCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **apiKey** | [**ApiKey**](ApiKey.md) | | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubApiKeysDelete + +> ModelHubApiKeysDelete(ctx, id).Execute() + +Soft-delete an API key. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubApiKeysDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubApiKeysDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubApiKeysDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubApiKeysList + +> ModelHubApiKeysList200Response ModelHubApiKeysList(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubApiKeysList(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubApiKeysList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubApiKeysList`: ModelHubApiKeysList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubApiKeysList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubApiKeysListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubApiKeysList200Response**](ModelHubApiKeysList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubApiKeysPartialUpdate + +> ApiKey ModelHubApiKeysPartialUpdate(ctx, id).ApiKey(apiKey).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + apiKey := *openapiclient.NewApiKey("Provider_example") // ApiKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubApiKeysPartialUpdate(context.Background(), id).ApiKey(apiKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubApiKeysPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubApiKeysPartialUpdate`: ApiKey + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubApiKeysPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubApiKeysPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **apiKey** | [**ApiKey**](ApiKey.md) | | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubApiKeysRead + +> ApiKey ModelHubApiKeysRead(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubApiKeysRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubApiKeysRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubApiKeysRead`: ApiKey + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubApiKeysRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubApiKeysReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubApiKeysUpdate + +> ApiKey ModelHubApiKeysUpdate(ctx, id).ApiKey(apiKey).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + apiKey := *openapiclient.NewApiKey("Provider_example") // ApiKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubApiKeysUpdate(context.Background(), id).ApiKey(apiKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubApiKeysUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubApiKeysUpdate`: ApiKey + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubApiKeysUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubApiKeysUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **apiKey** | [**ApiKey**](ApiKey.md) | | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubApiModelsListList + +> ModelHubPaginatedResponse ModelHubApiModelsListList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubApiModelsListList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubApiModelsListList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubApiModelsListList`: ModelHubPaginatedResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubApiModelsListList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubApiModelsListListRequest struct via the builder pattern + + +### Return type + +[**ModelHubPaginatedResponse**](ModelHubPaginatedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetRunPromptStatsList + +> DatasetRunPromptStatsResponse ModelHubDatasetRunPromptStatsList(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetRunPromptStatsList(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetRunPromptStatsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetRunPromptStatsList`: DatasetRunPromptStatsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetRunPromptStatsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetRunPromptStatsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetRunPromptStatsResponse**](DatasetRunPromptStatsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsAddApiColumnCreate + +> DynamicColumnCreateResponse ModelHubDatasetsAddApiColumnCreate(ctx, datasetId).AddApiColumnRequest(addApiColumnRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + addApiColumnRequest := *openapiclient.NewAddApiColumnRequest("ColumnName_example", map[string]interface{}{"key": interface{}(123)}) // AddApiColumnRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsAddApiColumnCreate(context.Background(), datasetId).AddApiColumnRequest(addApiColumnRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsAddApiColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsAddApiColumnCreate`: DynamicColumnCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsAddApiColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsAddApiColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **addApiColumnRequest** | [**AddApiColumnRequest**](AddApiColumnRequest.md) | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsAddVectorDbColumnCreate + +> DynamicColumnCreateResponse ModelHubDatasetsAddVectorDbColumnCreate(ctx, datasetId).VectorDBColumnRequest(vectorDBColumnRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + vectorDBColumnRequest := *openapiclient.NewVectorDBColumnRequest("ColumnId_example", "SubType_example", "ApiKey_example") // VectorDBColumnRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsAddVectorDbColumnCreate(context.Background(), datasetId).VectorDBColumnRequest(vectorDBColumnRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsAddVectorDbColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsAddVectorDbColumnCreate`: DynamicColumnCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsAddVectorDbColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsAddVectorDbColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **vectorDBColumnRequest** | [**VectorDBColumnRequest**](VectorDBColumnRequest.md) | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsClassifyColumnCreate + +> DynamicColumnCreateResponse ModelHubDatasetsClassifyColumnCreate(ctx, datasetId).ClassifyColumnRequest(classifyColumnRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + classifyColumnRequest := *openapiclient.NewClassifyColumnRequest("ColumnId_example", []string{"Labels_example"}) // ClassifyColumnRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsClassifyColumnCreate(context.Background(), datasetId).ClassifyColumnRequest(classifyColumnRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsClassifyColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsClassifyColumnCreate`: DynamicColumnCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsClassifyColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsClassifyColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **classifyColumnRequest** | [**ClassifyColumnRequest**](ClassifyColumnRequest.md) | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsCompareDatasetsAddEvalCreate + +> DevelopDatasetMessageResponse ModelHubDatasetsCompareDatasetsAddEvalCreate(ctx, datasetId).CompareExperimentEvalRequest(compareExperimentEvalRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + compareExperimentEvalRequest := *openapiclient.NewCompareExperimentEvalRequest("Name_example", "TemplateId_example", map[string]interface{}{"key": interface{}(123)}) // CompareExperimentEvalRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsCompareDatasetsAddEvalCreate(context.Background(), datasetId).CompareExperimentEvalRequest(compareExperimentEvalRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsCompareDatasetsAddEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsCompareDatasetsAddEvalCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsCompareDatasetsAddEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsCompareDatasetsAddEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compareExperimentEvalRequest** | [**CompareExperimentEvalRequest**](CompareExperimentEvalRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsCompareDatasetsCreate + +> CompareDatasetResponse ModelHubDatasetsCompareDatasetsCreate(ctx, datasetId).CompareDataset(compareDataset).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + compareDataset := *openapiclient.NewCompareDataset("BaseColumnName_example", []string{"DatasetIds_example"}) // CompareDataset | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsCompareDatasetsCreate(context.Background(), datasetId).CompareDataset(compareDataset).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsCompareDatasetsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsCompareDatasetsCreate`: CompareDatasetResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsCompareDatasetsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsCompareDatasetsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compareDataset** | [**CompareDataset**](CompareDataset.md) | | + +### Return type + +[**CompareDatasetResponse**](CompareDatasetResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsCompareDatasetsDownloadCreate + +> *os.File ModelHubDatasetsCompareDatasetsDownloadCreate(ctx, datasetId).CompareDataset(compareDataset).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + compareDataset := *openapiclient.NewCompareDataset("BaseColumnName_example", []string{"DatasetIds_example"}) // CompareDataset | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsCompareDatasetsDownloadCreate(context.Background(), datasetId).CompareDataset(compareDataset).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsCompareDatasetsDownloadCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsCompareDatasetsDownloadCreate`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsCompareDatasetsDownloadCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsCompareDatasetsDownloadCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compareDataset** | [**CompareDataset**](CompareDataset.md) | | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsCompareDatasetsStartEvalCreate + +> DevelopDatasetMessageResponse ModelHubDatasetsCompareDatasetsStartEvalCreate(ctx, datasetId).CompareStartEvalsRequest(compareStartEvalsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + compareStartEvalsRequest := *openapiclient.NewCompareStartEvalsRequest([]string{"UserEvalNames_example"}) // CompareStartEvalsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsCompareDatasetsStartEvalCreate(context.Background(), datasetId).CompareStartEvalsRequest(compareStartEvalsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsCompareDatasetsStartEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsCompareDatasetsStartEvalCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsCompareDatasetsStartEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsCompareDatasetsStartEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compareStartEvalsRequest** | [**CompareStartEvalsRequest**](CompareStartEvalsRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsCompareGetEvalsListCreate + +> CompareEvalListResponse ModelHubDatasetsCompareGetEvalsListCreate(ctx).CompareEvalsListRequest(compareEvalsListRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + compareEvalsListRequest := *openapiclient.NewCompareEvalsListRequest("EvalType_example", []string{"DatasetIds_example"}) // CompareEvalsListRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsCompareGetEvalsListCreate(context.Background()).CompareEvalsListRequest(compareEvalsListRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsCompareGetEvalsListCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsCompareGetEvalsListCreate`: CompareEvalListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsCompareGetEvalsListCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsCompareGetEvalsListCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **compareEvalsListRequest** | [**CompareEvalsListRequest**](CompareEvalsListRequest.md) | | + +### Return type + +[**CompareEvalListResponse**](CompareEvalListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsComparePreviewRunEvalCreate + +> EvalPreviewResponse ModelHubDatasetsComparePreviewRunEvalCreate(ctx).ComparePreviewRunEvalRequest(comparePreviewRunEvalRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + comparePreviewRunEvalRequest := *openapiclient.NewComparePreviewRunEvalRequest(map[string]interface{}{"key": interface{}(123)}, "TemplateId_example", []string{"DatasetIds_example"}) // ComparePreviewRunEvalRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsComparePreviewRunEvalCreate(context.Background()).ComparePreviewRunEvalRequest(comparePreviewRunEvalRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsComparePreviewRunEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsComparePreviewRunEvalCreate`: EvalPreviewResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsComparePreviewRunEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsComparePreviewRunEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comparePreviewRunEvalRequest** | [**ComparePreviewRunEvalRequest**](ComparePreviewRunEvalRequest.md) | | + +### Return type + +[**EvalPreviewResponse**](EvalPreviewResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsCompareStatsCreate + +> CompareDatasetStatsResponse ModelHubDatasetsCompareStatsCreate(ctx, datasetId).CompareDatasetStatsRequest(compareDatasetStatsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + compareDatasetStatsRequest := *openapiclient.NewCompareDatasetStatsRequest("BaseColumnName_example", []string{"DatasetIds_example"}) // CompareDatasetStatsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsCompareStatsCreate(context.Background(), datasetId).CompareDatasetStatsRequest(compareDatasetStatsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsCompareStatsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsCompareStatsCreate`: CompareDatasetStatsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsCompareStatsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsCompareStatsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compareDatasetStatsRequest** | [**CompareDatasetStatsRequest**](CompareDatasetStatsRequest.md) | | + +### Return type + +[**CompareDatasetStatsResponse**](CompareDatasetStatsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsConditionalColumnCreate + +> DynamicColumnCreateResponse ModelHubDatasetsConditionalColumnCreate(ctx, datasetId).ConditionalColumnRequest(conditionalColumnRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + conditionalColumnRequest := *openapiclient.NewConditionalColumnRequest([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}}, "NewColumnName_example") // ConditionalColumnRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsConditionalColumnCreate(context.Background(), datasetId).ConditionalColumnRequest(conditionalColumnRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsConditionalColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsConditionalColumnCreate`: DynamicColumnCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsConditionalColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsConditionalColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **conditionalColumnRequest** | [**ConditionalColumnRequest**](ConditionalColumnRequest.md) | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsDeleteCompareDelete + +> CompareDatasetDeleteResponse ModelHubDatasetsDeleteCompareDelete(ctx, compareId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + compareId := "compareId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsDeleteCompareDelete(context.Background(), compareId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsDeleteCompareDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsDeleteCompareDelete`: CompareDatasetDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsDeleteCompareDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compareId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsDeleteCompareDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CompareDatasetDeleteResponse**](CompareDatasetDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsDeleteCompareRead + +> CompareDatasetRowResponse ModelHubDatasetsDeleteCompareRead(ctx, compareId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + compareId := "compareId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsDeleteCompareRead(context.Background(), compareId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsDeleteCompareRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsDeleteCompareRead`: CompareDatasetRowResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsDeleteCompareRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compareId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsDeleteCompareReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CompareDatasetRowResponse**](CompareDatasetRowResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsDuplicateRowsCreate + +> DuplicateRowsResponse ModelHubDatasetsDuplicateRowsCreate(ctx, datasetId).DuplicateRowsRequest(duplicateRowsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + duplicateRowsRequest := *openapiclient.NewDuplicateRowsRequest() // DuplicateRowsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsDuplicateRowsCreate(context.Background(), datasetId).DuplicateRowsRequest(duplicateRowsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsDuplicateRowsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsDuplicateRowsCreate`: DuplicateRowsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsDuplicateRowsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsDuplicateRowsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **duplicateRowsRequest** | [**DuplicateRowsRequest**](DuplicateRowsRequest.md) | | + +### Return type + +[**DuplicateRowsResponse**](DuplicateRowsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsExplanationSummaryRead + +> DatasetExplanationSummaryResponse ModelHubDatasetsExplanationSummaryRead(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsExplanationSummaryRead(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsExplanationSummaryRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsExplanationSummaryRead`: DatasetExplanationSummaryResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsExplanationSummaryRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsExplanationSummaryReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsExplanationSummaryRefreshCreate + +> DatasetExplanationSummaryResponse ModelHubDatasetsExplanationSummaryRefreshCreate(ctx, datasetId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsExplanationSummaryRefreshCreate(context.Background(), datasetId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsExplanationSummaryRefreshCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsExplanationSummaryRefreshCreate`: DatasetExplanationSummaryResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsExplanationSummaryRefreshCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsExplanationSummaryRefreshCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsExtractEntitiesCreate + +> DynamicColumnMessageResponse ModelHubDatasetsExtractEntitiesCreate(ctx, datasetId).ExtractEntitiesRequest(extractEntitiesRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + extractEntitiesRequest := *openapiclient.NewExtractEntitiesRequest("ColumnId_example", "Instruction_example") // ExtractEntitiesRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsExtractEntitiesCreate(context.Background(), datasetId).ExtractEntitiesRequest(extractEntitiesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsExtractEntitiesCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsExtractEntitiesCreate`: DynamicColumnMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsExtractEntitiesCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsExtractEntitiesCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **extractEntitiesRequest** | [**ExtractEntitiesRequest**](ExtractEntitiesRequest.md) | | + +### Return type + +[**DynamicColumnMessageResponse**](DynamicColumnMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsGetCompareRowDelete + +> CompareDatasetDeleteResponse ModelHubDatasetsGetCompareRowDelete(ctx, compareId, rowId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + compareId := "compareId_example" // string | + rowId := "rowId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsGetCompareRowDelete(context.Background(), compareId, rowId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsGetCompareRowDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsGetCompareRowDelete`: CompareDatasetDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsGetCompareRowDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compareId** | **string** | | +**rowId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsGetCompareRowDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**CompareDatasetDeleteResponse**](CompareDatasetDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsGetCompareRowRead + +> CompareDatasetRowResponse ModelHubDatasetsGetCompareRowRead(ctx, compareId, rowId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + compareId := "compareId_example" // string | + rowId := "rowId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsGetCompareRowRead(context.Background(), compareId, rowId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsGetCompareRowRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsGetCompareRowRead`: CompareDatasetRowResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsGetCompareRowRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**compareId** | **string** | | +**rowId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsGetCompareRowReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**CompareDatasetRowResponse**](CompareDatasetRowResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsHuggingfaceDetailCreate + +> HuggingFaceDatasetDetailResponse ModelHubDatasetsHuggingfaceDetailCreate(ctx).HuggingFaceDatasetDetailRequest(huggingFaceDatasetDetailRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + huggingFaceDatasetDetailRequest := *openapiclient.NewHuggingFaceDatasetDetailRequest("DatasetId_example") // HuggingFaceDatasetDetailRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsHuggingfaceDetailCreate(context.Background()).HuggingFaceDatasetDetailRequest(huggingFaceDatasetDetailRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsHuggingfaceDetailCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsHuggingfaceDetailCreate`: HuggingFaceDatasetDetailResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsHuggingfaceDetailCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsHuggingfaceDetailCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **huggingFaceDatasetDetailRequest** | [**HuggingFaceDatasetDetailRequest**](HuggingFaceDatasetDetailRequest.md) | | + +### Return type + +[**HuggingFaceDatasetDetailResponse**](HuggingFaceDatasetDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsHuggingfaceListCreate + +> HuggingFaceDatasetListResponse ModelHubDatasetsHuggingfaceListCreate(ctx).HuggingFaceDatasetListRequest(huggingFaceDatasetListRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + huggingFaceDatasetListRequest := *openapiclient.NewHuggingFaceDatasetListRequest() // HuggingFaceDatasetListRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsHuggingfaceListCreate(context.Background()).HuggingFaceDatasetListRequest(huggingFaceDatasetListRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsHuggingfaceListCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsHuggingfaceListCreate`: HuggingFaceDatasetListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsHuggingfaceListCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsHuggingfaceListCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **huggingFaceDatasetListRequest** | [**HuggingFaceDatasetListRequest**](HuggingFaceDatasetListRequest.md) | | + +### Return type + +[**HuggingFaceDatasetListResponse**](HuggingFaceDatasetListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsMergeCreate + +> MergeDatasetResponse ModelHubDatasetsMergeCreate(ctx, datasetId).MergeDatasetRequest(mergeDatasetRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + mergeDatasetRequest := *openapiclient.NewMergeDatasetRequest("TargetDatasetId_example") // MergeDatasetRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsMergeCreate(context.Background(), datasetId).MergeDatasetRequest(mergeDatasetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsMergeCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsMergeCreate`: MergeDatasetResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsMergeCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsMergeCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **mergeDatasetRequest** | [**MergeDatasetRequest**](MergeDatasetRequest.md) | | + +### Return type + +[**MergeDatasetResponse**](MergeDatasetResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDatasetsPreviewCreate + +> PreviewDatasetOperationResponse ModelHubDatasetsPreviewCreate(ctx, datasetId, operationType).PreviewDatasetOperationRequest(previewDatasetOperationRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + operationType := "operationType_example" // string | + previewDatasetOperationRequest := *openapiclient.NewPreviewDatasetOperationRequest() // PreviewDatasetOperationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDatasetsPreviewCreate(context.Background(), datasetId, operationType).PreviewDatasetOperationRequest(previewDatasetOperationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDatasetsPreviewCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDatasetsPreviewCreate`: PreviewDatasetOperationResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDatasetsPreviewCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**operationType** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDatasetsPreviewCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **previewDatasetOperationRequest** | [**PreviewDatasetOperationRequest**](PreviewDatasetOperationRequest.md) | | + +### Return type + +[**PreviewDatasetOperationResponse**](PreviewDatasetOperationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDeleteEvalTemplateCreate + +> ModelHubStringResultResponse ModelHubDeleteEvalTemplateCreate(ctx).DeleteEvalTemplate(deleteEvalTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + deleteEvalTemplate := *openapiclient.NewDeleteEvalTemplate("EvalTemplateId_example") // DeleteEvalTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDeleteEvalTemplateCreate(context.Background()).DeleteEvalTemplate(deleteEvalTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDeleteEvalTemplateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDeleteEvalTemplateCreate`: ModelHubStringResultResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDeleteEvalTemplateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDeleteEvalTemplateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteEvalTemplate** | [**DeleteEvalTemplate**](DeleteEvalTemplate.md) | | + +### Return type + +[**ModelHubStringResultResponse**](ModelHubStringResultResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddAsNewCreate + +> DatasetCopyResponse ModelHubDevelopsAddAsNewCreate(ctx).AddAsNewDatasetRequest(addAsNewDatasetRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + addAsNewDatasetRequest := *openapiclient.NewAddAsNewDatasetRequest("DatasetId_example") // AddAsNewDatasetRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddAsNewCreate(context.Background()).AddAsNewDatasetRequest(addAsNewDatasetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddAsNewCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddAsNewCreate`: DatasetCopyResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddAsNewCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddAsNewCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **addAsNewDatasetRequest** | [**AddAsNewDatasetRequest**](AddAsNewDatasetRequest.md) | | + +### Return type + +[**DatasetCopyResponse**](DatasetCopyResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddEmptyColumnsCreate + +> DatasetColumnsMutationResponse ModelHubDevelopsAddEmptyColumnsCreate(ctx, datasetId).DatasetAddEmptyColumnsRequest(datasetAddEmptyColumnsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetAddEmptyColumnsRequest := *openapiclient.NewDatasetAddEmptyColumnsRequest() // DatasetAddEmptyColumnsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddEmptyColumnsCreate(context.Background(), datasetId).DatasetAddEmptyColumnsRequest(datasetAddEmptyColumnsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddEmptyColumnsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddEmptyColumnsCreate`: DatasetColumnsMutationResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddEmptyColumnsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddEmptyColumnsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetAddEmptyColumnsRequest** | [**DatasetAddEmptyColumnsRequest**](DatasetAddEmptyColumnsRequest.md) | | + +### Return type + +[**DatasetColumnsMutationResponse**](DatasetColumnsMutationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddEmptyRowsCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsAddEmptyRowsCreate(ctx, datasetId).DatasetAddEmptyRowsRequest(datasetAddEmptyRowsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetAddEmptyRowsRequest := *openapiclient.NewDatasetAddEmptyRowsRequest() // DatasetAddEmptyRowsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddEmptyRowsCreate(context.Background(), datasetId).DatasetAddEmptyRowsRequest(datasetAddEmptyRowsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddEmptyRowsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddEmptyRowsCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddEmptyRowsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddEmptyRowsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetAddEmptyRowsRequest** | [**DatasetAddEmptyRowsRequest**](DatasetAddEmptyRowsRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddMultipleStaticColumnsCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsAddMultipleStaticColumnsCreate(ctx, datasetId).DatasetMultipleStaticColumnsRequest(datasetMultipleStaticColumnsRequest).Execute() + +Add multiple static columns to a dataset at once. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetMultipleStaticColumnsRequest := *openapiclient.NewDatasetMultipleStaticColumnsRequest([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}}) // DatasetMultipleStaticColumnsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddMultipleStaticColumnsCreate(context.Background(), datasetId).DatasetMultipleStaticColumnsRequest(datasetMultipleStaticColumnsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddMultipleStaticColumnsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddMultipleStaticColumnsCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddMultipleStaticColumnsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddMultipleStaticColumnsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetMultipleStaticColumnsRequest** | [**DatasetMultipleStaticColumnsRequest**](DatasetMultipleStaticColumnsRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddRowsFromExistingDatasetCreate + +> DatasetRowsImportedResponse ModelHubDevelopsAddRowsFromExistingDatasetCreate(ctx, datasetId).DatasetAddRowsFromExistingRequest(datasetAddRowsFromExistingRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetAddRowsFromExistingRequest := *openapiclient.NewDatasetAddRowsFromExistingRequest("SourceDatasetId_example", map[string]string{"key": "Inner_example"}) // DatasetAddRowsFromExistingRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddRowsFromExistingDatasetCreate(context.Background(), datasetId).DatasetAddRowsFromExistingRequest(datasetAddRowsFromExistingRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddRowsFromExistingDatasetCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddRowsFromExistingDatasetCreate`: DatasetRowsImportedResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddRowsFromExistingDatasetCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddRowsFromExistingDatasetCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetAddRowsFromExistingRequest** | [**DatasetAddRowsFromExistingRequest**](DatasetAddRowsFromExistingRequest.md) | | + +### Return type + +[**DatasetRowsImportedResponse**](DatasetRowsImportedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddRowsFromFileCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsAddRowsFromFileCreate(ctx).AddRowsFromFileRequest(addRowsFromFileRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + addRowsFromFileRequest := *openapiclient.NewAddRowsFromFileRequest("DatasetId_example") // AddRowsFromFileRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddRowsFromFileCreate(context.Background()).AddRowsFromFileRequest(addRowsFromFileRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddRowsFromFileCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddRowsFromFileCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddRowsFromFileCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddRowsFromFileCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **addRowsFromFileRequest** | [**AddRowsFromFileRequest**](AddRowsFromFileRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddRowsFromHuggingfaceCreate + +> DatasetRowsImportMessageResponse ModelHubDevelopsAddRowsFromHuggingfaceCreate(ctx, datasetId).HuggingFaceAddRowsRequest(huggingFaceAddRowsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + huggingFaceAddRowsRequest := *openapiclient.NewHuggingFaceAddRowsRequest("HuggingfaceDatasetName_example", "HuggingfaceDatasetConfig_example", "HuggingfaceDatasetSplit_example") // HuggingFaceAddRowsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddRowsFromHuggingfaceCreate(context.Background(), datasetId).HuggingFaceAddRowsRequest(huggingFaceAddRowsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddRowsFromHuggingfaceCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddRowsFromHuggingfaceCreate`: DatasetRowsImportMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddRowsFromHuggingfaceCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddRowsFromHuggingfaceCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **huggingFaceAddRowsRequest** | [**HuggingFaceAddRowsRequest**](HuggingFaceAddRowsRequest.md) | | + +### Return type + +[**DatasetRowsImportMessageResponse**](DatasetRowsImportMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddRowsSdkCreate + +> DatasetSdkRowsResponse ModelHubDevelopsAddRowsSdkCreate(ctx).DatasetSdkRowsRequest(datasetSdkRowsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetSdkRowsRequest := *openapiclient.NewDatasetSdkRowsRequest() // DatasetSdkRowsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddRowsSdkCreate(context.Background()).DatasetSdkRowsRequest(datasetSdkRowsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddRowsSdkCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddRowsSdkCreate`: DatasetSdkRowsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddRowsSdkCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddRowsSdkCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **datasetSdkRowsRequest** | [**DatasetSdkRowsRequest**](DatasetSdkRowsRequest.md) | | + +### Return type + +[**DatasetSdkRowsResponse**](DatasetSdkRowsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddRunPromptColumnCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsAddRunPromptColumnCreate(ctx).AddRunPrompt(addRunPrompt).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + addRunPrompt := *openapiclient.NewAddRunPrompt("DatasetId_example", "Name_example") // AddRunPrompt | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddRunPromptColumnCreate(context.Background()).AddRunPrompt(addRunPrompt).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddRunPromptColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddRunPromptColumnCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddRunPromptColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddRunPromptColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **addRunPrompt** | [**AddRunPrompt**](AddRunPrompt.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddStaticColumnCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsAddStaticColumnCreate(ctx, datasetId).DatasetStaticColumnRequest(datasetStaticColumnRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetStaticColumnRequest := *openapiclient.NewDatasetStaticColumnRequest("NewColumnName_example", "ColumnType_example") // DatasetStaticColumnRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddStaticColumnCreate(context.Background(), datasetId).DatasetStaticColumnRequest(datasetStaticColumnRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddStaticColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddStaticColumnCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddStaticColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddStaticColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetStaticColumnRequest** | [**DatasetStaticColumnRequest**](DatasetStaticColumnRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddSyntheticDataCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsAddSyntheticDataCreate(ctx, datasetId).SyntheticData(syntheticData).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + syntheticData := *openapiclient.NewSyntheticData(int32(123), []*string{nil}, map[string]interface{}{"key": interface{}(123)}) // SyntheticData | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddSyntheticDataCreate(context.Background(), datasetId).SyntheticData(syntheticData).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddSyntheticDataCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddSyntheticDataCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddSyntheticDataCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddSyntheticDataCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **syntheticData** | [**SyntheticData**](SyntheticData.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsAddUserEvalCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsAddUserEvalCreate(ctx, datasetId).UserEvalMutationRequest(userEvalMutationRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + userEvalMutationRequest := *openapiclient.NewUserEvalMutationRequest("Name_example", "TemplateId_example", map[string]interface{}{"key": interface{}(123)}) // UserEvalMutationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsAddUserEvalCreate(context.Background(), datasetId).UserEvalMutationRequest(userEvalMutationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsAddUserEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsAddUserEvalCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsAddUserEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsAddUserEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **userEvalMutationRequest** | [**UserEvalMutationRequest**](UserEvalMutationRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsCloneDatasetCreate + +> DatasetCopyResponse ModelHubDevelopsCloneDatasetCreate(ctx, datasetId).CloneDatasetRequest(cloneDatasetRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + cloneDatasetRequest := *openapiclient.NewCloneDatasetRequest() // CloneDatasetRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsCloneDatasetCreate(context.Background(), datasetId).CloneDatasetRequest(cloneDatasetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsCloneDatasetCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsCloneDatasetCreate`: DatasetCopyResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsCloneDatasetCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsCloneDatasetCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cloneDatasetRequest** | [**CloneDatasetRequest**](CloneDatasetRequest.md) | | + +### Return type + +[**DatasetCopyResponse**](DatasetCopyResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsCreateDatasetCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsCreateDatasetCreate(ctx, expDatasetId).CreateDatasetFromExperimentRequest(createDatasetFromExperimentRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + expDatasetId := "expDatasetId_example" // string | + createDatasetFromExperimentRequest := *openapiclient.NewCreateDatasetFromExperimentRequest() // CreateDatasetFromExperimentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsCreateDatasetCreate(context.Background(), expDatasetId).CreateDatasetFromExperimentRequest(createDatasetFromExperimentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsCreateDatasetCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsCreateDatasetCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsCreateDatasetCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**expDatasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsCreateDatasetCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createDatasetFromExperimentRequest** | [**CreateDatasetFromExperimentRequest**](CreateDatasetFromExperimentRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsCreateDatasetFromHuggingfaceCreate + +> DatasetCreateStartedResponse ModelHubDevelopsCreateDatasetFromHuggingfaceCreate(ctx).HuggingFaceDatasetCreateRequest(huggingFaceDatasetCreateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + huggingFaceDatasetCreateRequest := *openapiclient.NewHuggingFaceDatasetCreateRequest("HuggingfaceDatasetName_example", "HuggingfaceDatasetSplit_example") // HuggingFaceDatasetCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsCreateDatasetFromHuggingfaceCreate(context.Background()).HuggingFaceDatasetCreateRequest(huggingFaceDatasetCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsCreateDatasetFromHuggingfaceCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsCreateDatasetFromHuggingfaceCreate`: DatasetCreateStartedResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsCreateDatasetFromHuggingfaceCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsCreateDatasetFromHuggingfaceCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **huggingFaceDatasetCreateRequest** | [**HuggingFaceDatasetCreateRequest**](HuggingFaceDatasetCreateRequest.md) | | + +### Return type + +[**DatasetCreateStartedResponse**](DatasetCreateStartedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsCreateSyntheticDatasetCreate + +> SyntheticDatasetCreateStartedResponse ModelHubDevelopsCreateSyntheticDatasetCreate(ctx).SyntheticDatasetCreation(syntheticDatasetCreation).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + syntheticDatasetCreation := *openapiclient.NewSyntheticDatasetCreation(int32(123), []*string{nil}, map[string]interface{}{"key": interface{}(123)}) // SyntheticDatasetCreation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsCreateSyntheticDatasetCreate(context.Background()).SyntheticDatasetCreation(syntheticDatasetCreation).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsCreateSyntheticDatasetCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsCreateSyntheticDatasetCreate`: SyntheticDatasetCreateStartedResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsCreateSyntheticDatasetCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsCreateSyntheticDatasetCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **syntheticDatasetCreation** | [**SyntheticDatasetCreation**](SyntheticDatasetCreation.md) | | + +### Return type + +[**SyntheticDatasetCreateStartedResponse**](SyntheticDatasetCreateStartedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsDatasetCreationProgressRead + +> DatasetCreationProgressResponse ModelHubDevelopsDatasetCreationProgressRead(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsDatasetCreationProgressRead(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsDatasetCreationProgressRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsDatasetCreationProgressRead`: DatasetCreationProgressResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsDatasetCreationProgressRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsDatasetCreationProgressReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetCreationProgressResponse**](DatasetCreationProgressResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsDeleteDatasetDelete + +> ModelHubDevelopsDeleteDatasetDelete(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubDevelopsDeleteDatasetDelete(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsDeleteDatasetDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsDeleteDatasetDeleteRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsDeleteTemplateEvalDelete + +> ModelHubDevelopsDeleteTemplateEvalDelete(ctx, datasetId, evalId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + evalId := "evalId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubDevelopsDeleteTemplateEvalDelete(context.Background(), datasetId, evalId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsDeleteTemplateEvalDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**evalId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsDeleteTemplateEvalDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsDeleteUserEvalDelete + +> ModelHubDevelopsDeleteUserEvalDelete(ctx, datasetId, evalId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + evalId := "evalId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubDevelopsDeleteUserEvalDelete(context.Background(), datasetId, evalId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsDeleteUserEvalDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**evalId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsDeleteUserEvalDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsEditAndRunUserEvalCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsEditAndRunUserEvalCreate(ctx, datasetId, evalId).UserEvalUpdateRequest(userEvalUpdateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + evalId := "evalId_example" // string | + userEvalUpdateRequest := *openapiclient.NewUserEvalUpdateRequest(map[string]interface{}{"key": interface{}(123)}) // UserEvalUpdateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsEditAndRunUserEvalCreate(context.Background(), datasetId, evalId).UserEvalUpdateRequest(userEvalUpdateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsEditAndRunUserEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsEditAndRunUserEvalCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsEditAndRunUserEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**evalId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsEditAndRunUserEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **userEvalUpdateRequest** | [**UserEvalUpdateRequest**](UserEvalUpdateRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsEditDatasetBehaviorUpdate + +> DevelopDatasetMessageResponse ModelHubDevelopsEditDatasetBehaviorUpdate(ctx, datasetId).DatasetBehaviorRequest(datasetBehaviorRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + datasetBehaviorRequest := *openapiclient.NewDatasetBehaviorRequest() // DatasetBehaviorRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsEditDatasetBehaviorUpdate(context.Background(), datasetId).DatasetBehaviorRequest(datasetBehaviorRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsEditDatasetBehaviorUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsEditDatasetBehaviorUpdate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsEditDatasetBehaviorUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsEditDatasetBehaviorUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **datasetBehaviorRequest** | [**DatasetBehaviorRequest**](DatasetBehaviorRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsEditRunPromptColumnCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsEditRunPromptColumnCreate(ctx).EditRunPromptColumn(editRunPromptColumn).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + editRunPromptColumn := *openapiclient.NewEditRunPromptColumn("DatasetId_example", "ColumnId_example") // EditRunPromptColumn | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsEditRunPromptColumnCreate(context.Background()).EditRunPromptColumn(editRunPromptColumn).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsEditRunPromptColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsEditRunPromptColumnCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsEditRunPromptColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsEditRunPromptColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **editRunPromptColumn** | [**EditRunPromptColumn**](EditRunPromptColumn.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsExtractJsonColumnCreate + +> DynamicColumnCreateResponse ModelHubDevelopsExtractJsonColumnCreate(ctx, datasetId).ExtractJsonColumnRequest(extractJsonColumnRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + extractJsonColumnRequest := *openapiclient.NewExtractJsonColumnRequest("ColumnId_example", "JsonKey_example") // ExtractJsonColumnRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsExtractJsonColumnCreate(context.Background(), datasetId).ExtractJsonColumnRequest(extractJsonColumnRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsExtractJsonColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsExtractJsonColumnCreate`: DynamicColumnCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsExtractJsonColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsExtractJsonColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **extractJsonColumnRequest** | [**ExtractJsonColumnRequest**](ExtractJsonColumnRequest.md) | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetCellDataCreate + +> DatasetCellDataResponse ModelHubDevelopsGetCellDataCreate(ctx).DatasetCellDataRequest(datasetCellDataRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetCellDataRequest := *openapiclient.NewDatasetCellDataRequest([]string{"RowIds_example"}, []string{"ColumnIds_example"}) // DatasetCellDataRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetCellDataCreate(context.Background()).DatasetCellDataRequest(datasetCellDataRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetCellDataCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetCellDataCreate`: DatasetCellDataResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetCellDataCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetCellDataCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **datasetCellDataRequest** | [**DatasetCellDataRequest**](DatasetCellDataRequest.md) | | + +### Return type + +[**DatasetCellDataResponse**](DatasetCellDataResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetDerivedDatasetsRead + +> DatasetExplanationSummaryResponse ModelHubDevelopsGetDerivedDatasetsRead(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetDerivedDatasetsRead(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetDerivedDatasetsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetDerivedDatasetsRead`: DatasetExplanationSummaryResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetDerivedDatasetsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetDerivedDatasetsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetEvalStructureRead + +> EvalStructureResponse ModelHubDevelopsGetEvalStructureRead(ctx, datasetId, evalId).EvalType(evalType).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + evalId := "evalId_example" // string | + evalType := "evalType_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetEvalStructureRead(context.Background(), datasetId, evalId).EvalType(evalType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetEvalStructureRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetEvalStructureRead`: EvalStructureResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetEvalStructureRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**evalId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetEvalStructureReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **evalType** | **string** | | + +### Return type + +[**EvalStructureResponse**](EvalStructureResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetEvalsListList + +> EvalListResponse ModelHubDevelopsGetEvalsListList(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetEvalsListList(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetEvalsListList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetEvalsListList`: EvalListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetEvalsListList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetEvalsListListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**EvalListResponse**](EvalListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetExperimentDatasetTableList + +> DatasetTableResponse ModelHubDevelopsGetExperimentDatasetTableList(ctx, experimentDatasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentDatasetId := "experimentDatasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetExperimentDatasetTableList(context.Background(), experimentDatasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetExperimentDatasetTableList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetExperimentDatasetTableList`: DatasetTableResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetExperimentDatasetTableList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentDatasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetExperimentDatasetTableListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DatasetTableResponse**](DatasetTableResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetFunctionListList + +> EvalFunctionListResponse ModelHubDevelopsGetFunctionListList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetFunctionListList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetFunctionListList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetFunctionListList`: EvalFunctionListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetFunctionListList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetFunctionListListRequest struct via the builder pattern + + +### Return type + +[**EvalFunctionListResponse**](EvalFunctionListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetHuggingfaceDatasetConfigCreate + +> HuggingFaceDatasetConfigResponse ModelHubDevelopsGetHuggingfaceDatasetConfigCreate(ctx).HuggingFaceDatasetConfigRequest(huggingFaceDatasetConfigRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + huggingFaceDatasetConfigRequest := *openapiclient.NewHuggingFaceDatasetConfigRequest("DatasetPath_example") // HuggingFaceDatasetConfigRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetHuggingfaceDatasetConfigCreate(context.Background()).HuggingFaceDatasetConfigRequest(huggingFaceDatasetConfigRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetHuggingfaceDatasetConfigCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetHuggingfaceDatasetConfigCreate`: HuggingFaceDatasetConfigResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetHuggingfaceDatasetConfigCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetHuggingfaceDatasetConfigCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **huggingFaceDatasetConfigRequest** | [**HuggingFaceDatasetConfigRequest**](HuggingFaceDatasetConfigRequest.md) | | + +### Return type + +[**HuggingFaceDatasetConfigResponse**](HuggingFaceDatasetConfigResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsGetRowDiffCreate + +> ExperimentRowDiffResponse ModelHubDevelopsGetRowDiffCreate(ctx).DatasetRowDiffRequest(datasetRowDiffRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetRowDiffRequest := *openapiclient.NewDatasetRowDiffRequest("ExperimentId_example", []string{"ColumnIds_example"}, []string{"RowIds_example"}, []string{"CompareColumnIds_example"}) // DatasetRowDiffRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsGetRowDiffCreate(context.Background()).DatasetRowDiffRequest(datasetRowDiffRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsGetRowDiffCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsGetRowDiffCreate`: ExperimentRowDiffResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsGetRowDiffCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsGetRowDiffCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **datasetRowDiffRequest** | [**DatasetRowDiffRequest**](DatasetRowDiffRequest.md) | | + +### Return type + +[**ExperimentRowDiffResponse**](ExperimentRowDiffResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsPreviewRunEvalCreate + +> EvalPreviewResponse ModelHubDevelopsPreviewRunEvalCreate(ctx, datasetId).PreviewRunEvalRequest(previewRunEvalRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + previewRunEvalRequest := *openapiclient.NewPreviewRunEvalRequest(map[string]interface{}{"key": interface{}(123)}, "TemplateId_example") // PreviewRunEvalRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsPreviewRunEvalCreate(context.Background(), datasetId).PreviewRunEvalRequest(previewRunEvalRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsPreviewRunEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsPreviewRunEvalCreate`: EvalPreviewResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsPreviewRunEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsPreviewRunEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **previewRunEvalRequest** | [**PreviewRunEvalRequest**](PreviewRunEvalRequest.md) | | + +### Return type + +[**EvalPreviewResponse**](EvalPreviewResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsPreviewRunPromptColumnCreate + +> RunPromptColumnPreviewResponse ModelHubDevelopsPreviewRunPromptColumnCreate(ctx).PreviewRunPrompt(previewRunPrompt).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + previewRunPrompt := *openapiclient.NewPreviewRunPrompt("DatasetId_example", "Name_example") // PreviewRunPrompt | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsPreviewRunPromptColumnCreate(context.Background()).PreviewRunPrompt(previewRunPrompt).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsPreviewRunPromptColumnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsPreviewRunPromptColumnCreate`: RunPromptColumnPreviewResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsPreviewRunPromptColumnCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsPreviewRunPromptColumnCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **previewRunPrompt** | [**PreviewRunPrompt**](PreviewRunPrompt.md) | | + +### Return type + +[**RunPromptColumnPreviewResponse**](RunPromptColumnPreviewResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsProviderStatusList + +> ProviderStatusResponse ModelHubDevelopsProviderStatusList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsProviderStatusList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsProviderStatusList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsProviderStatusList`: ProviderStatusResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsProviderStatusList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsProviderStatusListRequest struct via the builder pattern + + +### Return type + +[**ProviderStatusResponse**](ProviderStatusResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsRetrieveRunPromptColumnConfigList + +> RunPromptColumnConfigResponse ModelHubDevelopsRetrieveRunPromptColumnConfigList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsRetrieveRunPromptColumnConfigList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsRetrieveRunPromptColumnConfigList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsRetrieveRunPromptColumnConfigList`: RunPromptColumnConfigResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsRetrieveRunPromptColumnConfigList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsRetrieveRunPromptColumnConfigListRequest struct via the builder pattern + + +### Return type + +[**RunPromptColumnConfigResponse**](RunPromptColumnConfigResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsRetrieveRunPromptOptionsList + +> RunPromptOptionsResponse ModelHubDevelopsRetrieveRunPromptOptionsList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsRetrieveRunPromptOptionsList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsRetrieveRunPromptOptionsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsRetrieveRunPromptOptionsList`: RunPromptOptionsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsRetrieveRunPromptOptionsList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsRetrieveRunPromptOptionsListRequest struct via the builder pattern + + +### Return type + +[**RunPromptOptionsResponse**](RunPromptOptionsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsStartEvalsProcessCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsStartEvalsProcessCreate(ctx, datasetId).StartEvalsProcessRequest(startEvalsProcessRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + startEvalsProcessRequest := *openapiclient.NewStartEvalsProcessRequest([]string{"UserEvalIds_example"}) // StartEvalsProcessRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsStartEvalsProcessCreate(context.Background(), datasetId).StartEvalsProcessRequest(startEvalsProcessRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsStartEvalsProcessCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsStartEvalsProcessCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsStartEvalsProcessCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsStartEvalsProcessCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **startEvalsProcessRequest** | [**StartEvalsProcessRequest**](StartEvalsProcessRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsStopUserEvalCreate + +> DevelopDatasetMessageResponse ModelHubDevelopsStopUserEvalCreate(ctx, datasetId, evalId).StopUserEvalRequest(stopUserEvalRequest).Execute() + +POST /develops//stop_user_eval// Stops a running evaluation by setting its status to Completed. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + evalId := "evalId_example" // string | + stopUserEvalRequest := *openapiclient.NewStopUserEvalRequest() // StopUserEvalRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsStopUserEvalCreate(context.Background(), datasetId, evalId).StopUserEvalRequest(stopUserEvalRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsStopUserEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsStopUserEvalCreate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsStopUserEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**evalId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsStopUserEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **stopUserEvalRequest** | [**StopUserEvalRequest**](StopUserEvalRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsSyntheticConfigList + +> SyntheticDatasetConfigResponse ModelHubDevelopsSyntheticConfigList(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsSyntheticConfigList(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsSyntheticConfigList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsSyntheticConfigList`: SyntheticDatasetConfigResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsSyntheticConfigList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsSyntheticConfigListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**SyntheticDatasetConfigResponse**](SyntheticDatasetConfigResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsUpdateColumnNameUpdate + +> DevelopDatasetMessageResponse ModelHubDevelopsUpdateColumnNameUpdate(ctx, datasetId, columnId).DatasetUpdateColumnNameRequest(datasetUpdateColumnNameRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + columnId := "columnId_example" // string | + datasetUpdateColumnNameRequest := *openapiclient.NewDatasetUpdateColumnNameRequest("NewColumnName_example") // DatasetUpdateColumnNameRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsUpdateColumnNameUpdate(context.Background(), datasetId, columnId).DatasetUpdateColumnNameRequest(datasetUpdateColumnNameRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsUpdateColumnNameUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsUpdateColumnNameUpdate`: DevelopDatasetMessageResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsUpdateColumnNameUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**columnId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsUpdateColumnNameUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **datasetUpdateColumnNameRequest** | [**DatasetUpdateColumnNameRequest**](DatasetUpdateColumnNameRequest.md) | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsUpdateColumnTypeUpdate + +> ColumnTypeConversionResponse ModelHubDevelopsUpdateColumnTypeUpdate(ctx, datasetId, columnId).DatasetUpdateColumnTypeRequest(datasetUpdateColumnTypeRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + columnId := "columnId_example" // string | + datasetUpdateColumnTypeRequest := *openapiclient.NewDatasetUpdateColumnTypeRequest("NewColumnType_example") // DatasetUpdateColumnTypeRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsUpdateColumnTypeUpdate(context.Background(), datasetId, columnId).DatasetUpdateColumnTypeRequest(datasetUpdateColumnTypeRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsUpdateColumnTypeUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsUpdateColumnTypeUpdate`: ColumnTypeConversionResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsUpdateColumnTypeUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | +**columnId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsUpdateColumnTypeUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **datasetUpdateColumnTypeRequest** | [**DatasetUpdateColumnTypeRequest**](DatasetUpdateColumnTypeRequest.md) | | + +### Return type + +[**ColumnTypeConversionResponse**](ColumnTypeConversionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubDevelopsUpdateSyntheticConfigUpdate + +> SyntheticDatasetUpdateResponse ModelHubDevelopsUpdateSyntheticConfigUpdate(ctx, datasetId).SyntheticDatasetConfig(syntheticDatasetConfig).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + syntheticDatasetConfig := *openapiclient.NewSyntheticDatasetConfig(int32(123), []*string{nil}, map[string]interface{}{"key": interface{}(123)}) // SyntheticDatasetConfig | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubDevelopsUpdateSyntheticConfigUpdate(context.Background(), datasetId).SyntheticDatasetConfig(syntheticDatasetConfig).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubDevelopsUpdateSyntheticConfigUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubDevelopsUpdateSyntheticConfigUpdate`: SyntheticDatasetUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubDevelopsUpdateSyntheticConfigUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubDevelopsUpdateSyntheticConfigUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **syntheticDatasetConfig** | [**SyntheticDatasetConfig**](SyntheticDatasetConfig.md) | | + +### Return type + +[**SyntheticDatasetUpdateResponse**](SyntheticDatasetUpdateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesBulkDeleteCreate + +> EvalTemplateBulkDeleteResponse ModelHubEvalTemplatesBulkDeleteCreate(ctx).EvalTemplateBulkDeleteRequest(evalTemplateBulkDeleteRequest).Execute() + +POST /model-hub/eval-templates/bulk-delete/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + evalTemplateBulkDeleteRequest := *openapiclient.NewEvalTemplateBulkDeleteRequest([]string{"TemplateIds_example"}) // EvalTemplateBulkDeleteRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesBulkDeleteCreate(context.Background()).EvalTemplateBulkDeleteRequest(evalTemplateBulkDeleteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesBulkDeleteCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesBulkDeleteCreate`: EvalTemplateBulkDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesBulkDeleteCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesBulkDeleteCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **evalTemplateBulkDeleteRequest** | [**EvalTemplateBulkDeleteRequest**](EvalTemplateBulkDeleteRequest.md) | | + +### Return type + +[**EvalTemplateBulkDeleteResponse**](EvalTemplateBulkDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesCompositeExecuteAdhocCreate + +> CompositeEvalExecuteResponse ModelHubEvalTemplatesCompositeExecuteAdhocCreate(ctx).CompositeEvalAdhocExecuteRequest(compositeEvalAdhocExecuteRequest).Execute() + +POST /model-hub/eval-templates/composite/execute-adhoc/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + compositeEvalAdhocExecuteRequest := *openapiclient.NewCompositeEvalAdhocExecuteRequest(map[string]interface{}{"key": interface{}(123)}, []string{"ChildTemplateIds_example"}) // CompositeEvalAdhocExecuteRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesCompositeExecuteAdhocCreate(context.Background()).CompositeEvalAdhocExecuteRequest(compositeEvalAdhocExecuteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesCompositeExecuteAdhocCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesCompositeExecuteAdhocCreate`: CompositeEvalExecuteResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesCompositeExecuteAdhocCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesCompositeExecuteAdhocCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **compositeEvalAdhocExecuteRequest** | [**CompositeEvalAdhocExecuteRequest**](CompositeEvalAdhocExecuteRequest.md) | | + +### Return type + +[**CompositeEvalExecuteResponse**](CompositeEvalExecuteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesCompositeExecuteCreate + +> CompositeEvalExecuteResponse ModelHubEvalTemplatesCompositeExecuteCreate(ctx, templateId).CompositeEvalExecuteRequest(compositeEvalExecuteRequest).Execute() + +POST /model-hub/eval-templates//composite/execute/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + compositeEvalExecuteRequest := *openapiclient.NewCompositeEvalExecuteRequest(map[string]interface{}{"key": interface{}(123)}) // CompositeEvalExecuteRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesCompositeExecuteCreate(context.Background(), templateId).CompositeEvalExecuteRequest(compositeEvalExecuteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesCompositeExecuteCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesCompositeExecuteCreate`: CompositeEvalExecuteResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesCompositeExecuteCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesCompositeExecuteCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compositeEvalExecuteRequest** | [**CompositeEvalExecuteRequest**](CompositeEvalExecuteRequest.md) | | + +### Return type + +[**CompositeEvalExecuteResponse**](CompositeEvalExecuteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesCompositeList + +> CompositeEvalDetailResponse ModelHubEvalTemplatesCompositeList(ctx, templateId).Execute() + +GET /model-hub/eval-templates//composite/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesCompositeList(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesCompositeList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesCompositeList`: CompositeEvalDetailResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesCompositeList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesCompositeListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CompositeEvalDetailResponse**](CompositeEvalDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesCompositePartialUpdate + +> CompositeEvalDetailResponse ModelHubEvalTemplatesCompositePartialUpdate(ctx, templateId).CompositeEvalUpdateRequest(compositeEvalUpdateRequest).Execute() + +PATCH — partial update of a composite eval. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + compositeEvalUpdateRequest := *openapiclient.NewCompositeEvalUpdateRequest() // CompositeEvalUpdateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesCompositePartialUpdate(context.Background(), templateId).CompositeEvalUpdateRequest(compositeEvalUpdateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesCompositePartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesCompositePartialUpdate`: CompositeEvalDetailResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesCompositePartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesCompositePartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **compositeEvalUpdateRequest** | [**CompositeEvalUpdateRequest**](CompositeEvalUpdateRequest.md) | | + +### Return type + +[**CompositeEvalDetailResponse**](CompositeEvalDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesCreateCompositeCreate + +> CompositeEvalCreateResponse ModelHubEvalTemplatesCreateCompositeCreate(ctx).CompositeEvalCreateRequest(compositeEvalCreateRequest).Execute() + +POST /model-hub/eval-templates/create-composite/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + compositeEvalCreateRequest := *openapiclient.NewCompositeEvalCreateRequest("Name_example", []string{"ChildTemplateIds_example"}) // CompositeEvalCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesCreateCompositeCreate(context.Background()).CompositeEvalCreateRequest(compositeEvalCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesCreateCompositeCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesCreateCompositeCreate`: CompositeEvalCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesCreateCompositeCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesCreateCompositeCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **compositeEvalCreateRequest** | [**CompositeEvalCreateRequest**](CompositeEvalCreateRequest.md) | | + +### Return type + +[**CompositeEvalCreateResponse**](CompositeEvalCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesCreateV2Create + +> EvalTemplateCreateResponse ModelHubEvalTemplatesCreateV2Create(ctx).EvalTemplateCreateV2Request(evalTemplateCreateV2Request).Execute() + +POST /model-hub/eval-templates/create-v2/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + evalTemplateCreateV2Request := *openapiclient.NewEvalTemplateCreateV2Request() // EvalTemplateCreateV2Request | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesCreateV2Create(context.Background()).EvalTemplateCreateV2Request(evalTemplateCreateV2Request).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesCreateV2Create``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesCreateV2Create`: EvalTemplateCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesCreateV2Create`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesCreateV2CreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **evalTemplateCreateV2Request** | [**EvalTemplateCreateV2Request**](EvalTemplateCreateV2Request.md) | | + +### Return type + +[**EvalTemplateCreateResponse**](EvalTemplateCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesDetailList + +> EvalTemplateDetailResponse ModelHubEvalTemplatesDetailList(ctx, templateId).Execute() + +GET /model-hub/eval-templates//detail/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesDetailList(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesDetailList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesDetailList`: EvalTemplateDetailResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesDetailList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesDetailListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**EvalTemplateDetailResponse**](EvalTemplateDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesFeedbackListList + +> EvalFeedbackListResponse ModelHubEvalTemplatesFeedbackListList(ctx, templateId).Execute() + +GET /model-hub/eval-templates//feedback-list/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesFeedbackListList(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesFeedbackListList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesFeedbackListList`: EvalFeedbackListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesFeedbackListList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesFeedbackListListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**EvalFeedbackListResponse**](EvalFeedbackListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesGroundTruthConfigList + +> GroundTruthConfigResponse ModelHubEvalTemplatesGroundTruthConfigList(ctx, templateId).Execute() + +GET/PUT /model-hub/eval-templates//ground-truth-config/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesGroundTruthConfigList(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesGroundTruthConfigList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesGroundTruthConfigList`: GroundTruthConfigResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesGroundTruthConfigList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesGroundTruthConfigListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GroundTruthConfigResponse**](GroundTruthConfigResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesGroundTruthConfigUpdate + +> GroundTruthConfigResponse ModelHubEvalTemplatesGroundTruthConfigUpdate(ctx, templateId).GroundTruthConfigRequest(groundTruthConfigRequest).Execute() + +GET/PUT /model-hub/eval-templates//ground-truth-config/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + groundTruthConfigRequest := *openapiclient.NewGroundTruthConfigRequest() // GroundTruthConfigRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesGroundTruthConfigUpdate(context.Background(), templateId).GroundTruthConfigRequest(groundTruthConfigRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesGroundTruthConfigUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesGroundTruthConfigUpdate`: GroundTruthConfigResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesGroundTruthConfigUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesGroundTruthConfigUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **groundTruthConfigRequest** | [**GroundTruthConfigRequest**](GroundTruthConfigRequest.md) | | + +### Return type + +[**GroundTruthConfigResponse**](GroundTruthConfigResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesGroundTruthList + +> GroundTruthListResponse ModelHubEvalTemplatesGroundTruthList(ctx, templateId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesGroundTruthList(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesGroundTruthList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesGroundTruthList`: GroundTruthListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesGroundTruthList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesGroundTruthListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GroundTruthListResponse**](GroundTruthListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesGroundTruthUploadCreate + +> GroundTruthUploadResponse ModelHubEvalTemplatesGroundTruthUploadCreate(ctx, templateId).GroundTruthUploadRequest(groundTruthUploadRequest).Execute() + +POST /model-hub/eval-templates//ground-truth/upload/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + groundTruthUploadRequest := *openapiclient.NewGroundTruthUploadRequest() // GroundTruthUploadRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesGroundTruthUploadCreate(context.Background(), templateId).GroundTruthUploadRequest(groundTruthUploadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesGroundTruthUploadCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesGroundTruthUploadCreate`: GroundTruthUploadResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesGroundTruthUploadCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesGroundTruthUploadCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **groundTruthUploadRequest** | [**GroundTruthUploadRequest**](GroundTruthUploadRequest.md) | | + +### Return type + +[**GroundTruthUploadResponse**](GroundTruthUploadResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesListChartsCreate + +> EvalTemplateListChartsResponse ModelHubEvalTemplatesListChartsCreate(ctx).EvalTemplateListChartsRequest(evalTemplateListChartsRequest).Execute() + +POST /model-hub/eval-templates/list-charts/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + evalTemplateListChartsRequest := *openapiclient.NewEvalTemplateListChartsRequest([]string{"TemplateIds_example"}) // EvalTemplateListChartsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesListChartsCreate(context.Background()).EvalTemplateListChartsRequest(evalTemplateListChartsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesListChartsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesListChartsCreate`: EvalTemplateListChartsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesListChartsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesListChartsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **evalTemplateListChartsRequest** | [**EvalTemplateListChartsRequest**](EvalTemplateListChartsRequest.md) | | + +### Return type + +[**EvalTemplateListChartsResponse**](EvalTemplateListChartsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesListCreate + +> EvalTemplateListResponse ModelHubEvalTemplatesListCreate(ctx).EvalListRequest(evalListRequest).Execute() + +POST /model-hub/eval-templates/list/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + evalListRequest := *openapiclient.NewEvalListRequest() // EvalListRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesListCreate(context.Background()).EvalListRequest(evalListRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesListCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesListCreate`: EvalTemplateListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesListCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesListCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **evalListRequest** | [**EvalListRequest**](EvalListRequest.md) | | + +### Return type + +[**EvalTemplateListResponse**](EvalTemplateListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesUpdateUpdate + +> EvalTemplateUpdateResponse ModelHubEvalTemplatesUpdateUpdate(ctx, templateId).EvalTemplateUpdateV2Request(evalTemplateUpdateV2Request).Execute() + +PUT /model-hub/eval-templates//update/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + evalTemplateUpdateV2Request := *openapiclient.NewEvalTemplateUpdateV2Request() // EvalTemplateUpdateV2Request | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesUpdateUpdate(context.Background(), templateId).EvalTemplateUpdateV2Request(evalTemplateUpdateV2Request).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesUpdateUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesUpdateUpdate`: EvalTemplateUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesUpdateUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesUpdateUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **evalTemplateUpdateV2Request** | [**EvalTemplateUpdateV2Request**](EvalTemplateUpdateV2Request.md) | | + +### Return type + +[**EvalTemplateUpdateResponse**](EvalTemplateUpdateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesUsageList + +> EvalUsageStatsResponse ModelHubEvalTemplatesUsageList(ctx, templateId).Execute() + +GET /model-hub/eval-templates//usage/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesUsageList(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesUsageList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesUsageList`: EvalUsageStatsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesUsageList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesUsageListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**EvalUsageStatsResponse**](EvalUsageStatsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesVersionsCreateCreate + +> EvalTemplateVersionResponse ModelHubEvalTemplatesVersionsCreateCreate(ctx, templateId).EvalTemplateVersionCreateRequest(evalTemplateVersionCreateRequest).Execute() + +POST /model-hub/eval-templates//versions/create/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + evalTemplateVersionCreateRequest := *openapiclient.NewEvalTemplateVersionCreateRequest() // EvalTemplateVersionCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesVersionsCreateCreate(context.Background(), templateId).EvalTemplateVersionCreateRequest(evalTemplateVersionCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesVersionsCreateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesVersionsCreateCreate`: EvalTemplateVersionResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesVersionsCreateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesVersionsCreateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **evalTemplateVersionCreateRequest** | [**EvalTemplateVersionCreateRequest**](EvalTemplateVersionCreateRequest.md) | | + +### Return type + +[**EvalTemplateVersionResponse**](EvalTemplateVersionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesVersionsList + +> EvalTemplateVersionListResponse ModelHubEvalTemplatesVersionsList(ctx, templateId).Execute() + +GET /model-hub/eval-templates//versions/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesVersionsList(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesVersionsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesVersionsList`: EvalTemplateVersionListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesVersionsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesVersionsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**EvalTemplateVersionListResponse**](EvalTemplateVersionListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesVersionsRestoreCreate + +> EvalTemplateVersionRestoreResponse ModelHubEvalTemplatesVersionsRestoreCreate(ctx, templateId, versionId).Body(body).Execute() + +POST /model-hub/eval-templates//versions//restore/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + versionId := "versionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesVersionsRestoreCreate(context.Background(), templateId, versionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesVersionsRestoreCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesVersionsRestoreCreate`: EvalTemplateVersionRestoreResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesVersionsRestoreCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesVersionsRestoreCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | | + +### Return type + +[**EvalTemplateVersionRestoreResponse**](EvalTemplateVersionRestoreResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubEvalTemplatesVersionsSetDefaultUpdate + +> EvalTemplateVersionResponse ModelHubEvalTemplatesVersionsSetDefaultUpdate(ctx, templateId, versionId).Body(body).Execute() + +PUT /model-hub/eval-templates//versions//set-default/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + versionId := "versionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubEvalTemplatesVersionsSetDefaultUpdate(context.Background(), templateId, versionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubEvalTemplatesVersionsSetDefaultUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubEvalTemplatesVersionsSetDefaultUpdate`: EvalTemplateVersionResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubEvalTemplatesVersionsSetDefaultUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubEvalTemplatesVersionsSetDefaultUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | | + +### Return type + +[**EvalTemplateVersionResponse**](EvalTemplateVersionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2DerivedVariablesList + +> ExperimentDerivedVariablesResponse ModelHubExperimentsV2DerivedVariablesList(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2DerivedVariablesList(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2DerivedVariablesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2DerivedVariablesList`: ExperimentDerivedVariablesResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2DerivedVariablesList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2DerivedVariablesListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentDerivedVariablesResponse**](ExperimentDerivedVariablesResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2EvaluationsStatsList + +> ExperimentEvaluationStatsResponse ModelHubExperimentsV2EvaluationsStatsList(ctx, experimentId, evaluationId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + evaluationId := "evaluationId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2EvaluationsStatsList(context.Background(), experimentId, evaluationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2EvaluationsStatsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2EvaluationsStatsList`: ExperimentEvaluationStatsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2EvaluationsStatsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | +**evaluationId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2EvaluationsStatsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ExperimentEvaluationStatsResponse**](ExperimentEvaluationStatsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2FeedbackCreate + +> ExperimentFeedbackCreateResponse ModelHubExperimentsV2FeedbackCreate(ctx, experimentId).Feedback(feedback).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + feedback := *openapiclient.NewFeedback("SourceId_example", "Source_example", "Value_example") // Feedback | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2FeedbackCreate(context.Background(), experimentId).Feedback(feedback).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2FeedbackCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2FeedbackCreate`: ExperimentFeedbackCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2FeedbackCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2FeedbackCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **feedback** | [**Feedback**](Feedback.md) | | + +### Return type + +[**ExperimentFeedbackCreateResponse**](ExperimentFeedbackCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2FeedbackGetFeedbackDetailsList + +> ExperimentFeedbackDetailsResponse ModelHubExperimentsV2FeedbackGetFeedbackDetailsList(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2FeedbackGetFeedbackDetailsList(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2FeedbackGetFeedbackDetailsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2FeedbackGetFeedbackDetailsList`: ExperimentFeedbackDetailsResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2FeedbackGetFeedbackDetailsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2FeedbackGetFeedbackDetailsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentFeedbackDetailsResponse**](ExperimentFeedbackDetailsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2FeedbackGetTemplateList + +> ExperimentFeedbackTemplateResponse ModelHubExperimentsV2FeedbackGetTemplateList(ctx, experimentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2FeedbackGetTemplateList(context.Background(), experimentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2FeedbackGetTemplateList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2FeedbackGetTemplateList`: ExperimentFeedbackTemplateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2FeedbackGetTemplateList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2FeedbackGetTemplateListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentFeedbackTemplateResponse**](ExperimentFeedbackTemplateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2FeedbackSubmitFeedbackCreate + +> ExperimentFeedbackSubmitResponse ModelHubExperimentsV2FeedbackSubmitFeedbackCreate(ctx, experimentId).ExperimentFeedbackSubmitRequest(experimentFeedbackSubmitRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + experimentFeedbackSubmitRequest := *openapiclient.NewExperimentFeedbackSubmitRequest("ActionType_example", "FeedbackId_example", "UserEvalMetricId_example") // ExperimentFeedbackSubmitRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2FeedbackSubmitFeedbackCreate(context.Background(), experimentId).ExperimentFeedbackSubmitRequest(experimentFeedbackSubmitRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2FeedbackSubmitFeedbackCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2FeedbackSubmitFeedbackCreate`: ExperimentFeedbackSubmitResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2FeedbackSubmitFeedbackCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2FeedbackSubmitFeedbackCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **experimentFeedbackSubmitRequest** | [**ExperimentFeedbackSubmitRequest**](ExperimentFeedbackSubmitRequest.md) | | + +### Return type + +[**ExperimentFeedbackSubmitResponse**](ExperimentFeedbackSubmitResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2RerunCellsCreate + +> ExperimentWorkflowResponse ModelHubExperimentsV2RerunCellsCreate(ctx, experimentId).ExperimentRerunCells(experimentRerunCells).Execute() + +Rerun specific cells or columns in a V2 experiment. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + experimentId := "experimentId_example" // string | + experimentRerunCells := *openapiclient.NewExperimentRerunCells() // ExperimentRerunCells | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2RerunCellsCreate(context.Background(), experimentId).ExperimentRerunCells(experimentRerunCells).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2RerunCellsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2RerunCellsCreate`: ExperimentWorkflowResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2RerunCellsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**experimentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2RerunCellsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **experimentRerunCells** | [**ExperimentRerunCells**](ExperimentRerunCells.md) | | + +### Return type + +[**ExperimentWorkflowResponse**](ExperimentWorkflowResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2RowDiffCreate + +> ExperimentRowDiffResponse ModelHubExperimentsV2RowDiffCreate(ctx).DatasetRowDiffRequest(datasetRowDiffRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetRowDiffRequest := *openapiclient.NewDatasetRowDiffRequest("ExperimentId_example", []string{"ColumnIds_example"}, []string{"RowIds_example"}, []string{"CompareColumnIds_example"}) // DatasetRowDiffRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2RowDiffCreate(context.Background()).DatasetRowDiffRequest(datasetRowDiffRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2RowDiffCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2RowDiffCreate`: ExperimentRowDiffResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2RowDiffCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2RowDiffCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **datasetRowDiffRequest** | [**DatasetRowDiffRequest**](DatasetRowDiffRequest.md) | | + +### Return type + +[**ExperimentRowDiffResponse**](ExperimentRowDiffResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2SuggestNameRead + +> ExperimentNameSuggestionResponse ModelHubExperimentsV2SuggestNameRead(ctx, datasetId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + datasetId := "datasetId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2SuggestNameRead(context.Background(), datasetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2SuggestNameRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2SuggestNameRead`: ExperimentNameSuggestionResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2SuggestNameRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**datasetId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2SuggestNameReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ExperimentNameSuggestionResponse**](ExperimentNameSuggestionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubExperimentsV2ValidateNameList + +> ExperimentNameValidationResponse ModelHubExperimentsV2ValidateNameList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubExperimentsV2ValidateNameList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubExperimentsV2ValidateNameList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubExperimentsV2ValidateNameList`: ExperimentNameValidationResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubExperimentsV2ValidateNameList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubExperimentsV2ValidateNameListRequest struct via the builder pattern + + +### Return type + +[**ExperimentNameValidationResponse**](ExperimentNameValidationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBaseCreate + +> LegacyKnowledgeBaseCreateResponse ModelHubKnowledgeBaseCreate(ctx).LegacyKnowledgeBaseMutationRequest(legacyKnowledgeBaseMutationRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + legacyKnowledgeBaseMutationRequest := *openapiclient.NewLegacyKnowledgeBaseMutationRequest() // LegacyKnowledgeBaseMutationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBaseCreate(context.Background()).LegacyKnowledgeBaseMutationRequest(legacyKnowledgeBaseMutationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBaseCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubKnowledgeBaseCreate`: LegacyKnowledgeBaseCreateResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubKnowledgeBaseCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBaseCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **legacyKnowledgeBaseMutationRequest** | [**LegacyKnowledgeBaseMutationRequest**](LegacyKnowledgeBaseMutationRequest.md) | | + +### Return type + +[**LegacyKnowledgeBaseCreateResponse**](LegacyKnowledgeBaseCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBaseDelete + +> ModelHubKnowledgeBaseDelete(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBaseDelete(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBaseDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBaseDeleteRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBaseFilesCreate + +> LegacyKnowledgeBaseFilesResponse ModelHubKnowledgeBaseFilesCreate(ctx).LegacyKnowledgeBaseFilesRequest(legacyKnowledgeBaseFilesRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + legacyKnowledgeBaseFilesRequest := *openapiclient.NewLegacyKnowledgeBaseFilesRequest("KbId_example") // LegacyKnowledgeBaseFilesRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBaseFilesCreate(context.Background()).LegacyKnowledgeBaseFilesRequest(legacyKnowledgeBaseFilesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBaseFilesCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubKnowledgeBaseFilesCreate`: LegacyKnowledgeBaseFilesResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubKnowledgeBaseFilesCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBaseFilesCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **legacyKnowledgeBaseFilesRequest** | [**LegacyKnowledgeBaseFilesRequest**](LegacyKnowledgeBaseFilesRequest.md) | | + +### Return type + +[**LegacyKnowledgeBaseFilesResponse**](LegacyKnowledgeBaseFilesResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBaseFilesDelete + +> ModelHubKnowledgeBaseFilesDelete(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBaseFilesDelete(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBaseFilesDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBaseFilesDeleteRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBaseGetList + +> LegacyKnowledgeBaseTableResponse ModelHubKnowledgeBaseGetList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBaseGetList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBaseGetList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubKnowledgeBaseGetList`: LegacyKnowledgeBaseTableResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubKnowledgeBaseGetList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBaseGetListRequest struct via the builder pattern + + +### Return type + +[**LegacyKnowledgeBaseTableResponse**](LegacyKnowledgeBaseTableResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBaseList + +> LegacyKnowledgeBaseSdkCodeResponse ModelHubKnowledgeBaseList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBaseList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBaseList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubKnowledgeBaseList`: LegacyKnowledgeBaseSdkCodeResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubKnowledgeBaseList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBaseListRequest struct via the builder pattern + + +### Return type + +[**LegacyKnowledgeBaseSdkCodeResponse**](LegacyKnowledgeBaseSdkCodeResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBaseListList + +> LegacyKnowledgeBaseListResponse ModelHubKnowledgeBaseListList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBaseListList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBaseListList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubKnowledgeBaseListList`: LegacyKnowledgeBaseListResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubKnowledgeBaseListList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBaseListListRequest struct via the builder pattern + + +### Return type + +[**LegacyKnowledgeBaseListResponse**](LegacyKnowledgeBaseListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubKnowledgeBasePartialUpdate + +> LegacyKnowledgeBaseMutationResponse ModelHubKnowledgeBasePartialUpdate(ctx).LegacyKnowledgeBaseMutationRequest(legacyKnowledgeBaseMutationRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + legacyKnowledgeBaseMutationRequest := *openapiclient.NewLegacyKnowledgeBaseMutationRequest() // LegacyKnowledgeBaseMutationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubKnowledgeBasePartialUpdate(context.Background()).LegacyKnowledgeBaseMutationRequest(legacyKnowledgeBaseMutationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubKnowledgeBasePartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubKnowledgeBasePartialUpdate`: LegacyKnowledgeBaseMutationResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubKnowledgeBasePartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubKnowledgeBasePartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **legacyKnowledgeBaseMutationRequest** | [**LegacyKnowledgeBaseMutationRequest**](LegacyKnowledgeBaseMutationRequest.md) | | + +### Return type + +[**LegacyKnowledgeBaseMutationResponse**](LegacyKnowledgeBaseMutationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptHistoryExecutionsGetExecutionDetails + +> ModelHubPromptHistoryExecutionsList200Response ModelHubPromptHistoryExecutionsGetExecutionDetails(ctx, executionId).TemplateName(templateName).TemplateVersion(templateVersion).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + executionId := "executionId_example" // string | + templateName := "templateName_example" // string | (optional) + templateVersion := "templateVersion_example" // string | (optional) + createdAt := "createdAt_example" // string | (optional) + search := "search_example" // string | A search term. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptHistoryExecutionsGetExecutionDetails(context.Background(), executionId).TemplateName(templateName).TemplateVersion(templateVersion).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptHistoryExecutionsGetExecutionDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptHistoryExecutionsGetExecutionDetails`: ModelHubPromptHistoryExecutionsList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptHistoryExecutionsGetExecutionDetails`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**executionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptHistoryExecutionsGetExecutionDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **templateName** | **string** | | + **templateVersion** | **string** | | + **createdAt** | **string** | | + **search** | **string** | A search term. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubPromptHistoryExecutionsList200Response**](ModelHubPromptHistoryExecutionsList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptHistoryExecutionsList + +> ModelHubPromptHistoryExecutionsList200Response ModelHubPromptHistoryExecutionsList(ctx).TemplateName(templateName).TemplateVersion(templateVersion).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateName := "templateName_example" // string | (optional) + templateVersion := "templateVersion_example" // string | (optional) + createdAt := "createdAt_example" // string | (optional) + search := "search_example" // string | A search term. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptHistoryExecutionsList(context.Background()).TemplateName(templateName).TemplateVersion(templateVersion).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptHistoryExecutionsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptHistoryExecutionsList`: ModelHubPromptHistoryExecutionsList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptHistoryExecutionsList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptHistoryExecutionsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateName** | **string** | | + **templateVersion** | **string** | | + **createdAt** | **string** | | + **search** | **string** | A search term. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubPromptHistoryExecutionsList200Response**](ModelHubPromptHistoryExecutionsList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptHistoryExecutionsRead + +> PromptHistoryExecution ModelHubPromptHistoryExecutionsRead(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt version. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptHistoryExecutionsRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptHistoryExecutionsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptHistoryExecutionsRead`: PromptHistoryExecution + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptHistoryExecutionsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt version. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptHistoryExecutionsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptHistoryExecution**](PromptHistoryExecution.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsAssignLabelById + +> PromptLabel ModelHubPromptLabelsAssignLabelById(ctx, templateId, labelId).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + templateId := "templateId_example" // string | + labelId := "labelId_example" // string | + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsAssignLabelById(context.Background(), templateId, labelId).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsAssignLabelById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsAssignLabelById`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsAssignLabelById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **string** | | +**labelId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsAssignLabelByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsAssignMultipleLabels + +> PromptLabel ModelHubPromptLabelsAssignMultipleLabels(ctx).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsAssignMultipleLabels(context.Background()).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsAssignMultipleLabels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsAssignMultipleLabels`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsAssignMultipleLabels`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsAssignMultipleLabelsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsCreate + +> PromptLabel ModelHubPromptLabelsCreate(ctx).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsCreate(context.Background()).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsCreate`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsCreateSystemLabels + +> PromptLabel ModelHubPromptLabelsCreateSystemLabels(ctx).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsCreateSystemLabels(context.Background()).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsCreateSystemLabels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsCreateSystemLabels`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsCreateSystemLabels`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsCreateSystemLabelsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsDelete + +> ModelHubPromptLabelsDelete(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsGetByName + +> ModelHubPromptLabelsList200Response ModelHubPromptLabelsGetByName(ctx).Page(page).Limit(limit).Execute() + +Fetch a prompt version by template name and either explicit version or label. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsGetByName(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsGetByName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsGetByName`: ModelHubPromptLabelsList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsGetByName`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsGetByNameRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsList + +> ModelHubPromptLabelsList200Response ModelHubPromptLabelsList(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsList(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsList`: ModelHubPromptLabelsList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsPartialUpdate + +> PromptLabel ModelHubPromptLabelsPartialUpdate(ctx, id).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsPartialUpdate(context.Background(), id).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsPartialUpdate`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsRead + +> PromptLabel ModelHubPromptLabelsRead(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsRead`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsRemoveLabelFromVersion + +> PromptLabel ModelHubPromptLabelsRemoveLabelFromVersion(ctx).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsRemoveLabelFromVersion(context.Background()).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsRemoveLabelFromVersion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsRemoveLabelFromVersion`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsRemoveLabelFromVersion`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsRemoveLabelFromVersionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsSetDefault + +> PromptLabel ModelHubPromptLabelsSetDefault(ctx).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsSetDefault(context.Background()).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsSetDefault``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsSetDefault`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsSetDefault`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsSetDefaultRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsTemplateLabels + +> ModelHubPromptLabelsList200Response ModelHubPromptLabelsTemplateLabels(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsTemplateLabels(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsTemplateLabels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsTemplateLabels`: ModelHubPromptLabelsList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsTemplateLabels`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsTemplateLabelsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptLabelsUpdate + +> PromptLabel ModelHubPromptLabelsUpdate(ctx, id).PromptLabel(promptLabel).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + promptLabel := *openapiclient.NewPromptLabel("Name_example", "Type_example") // PromptLabel | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptLabelsUpdate(context.Background(), id).PromptLabel(promptLabel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptLabelsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptLabelsUpdate`: PromptLabel + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptLabelsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptLabelsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptLabel** | [**PromptLabel**](PromptLabel.md) | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesAddNewDraft + +> PromptTemplate ModelHubPromptTemplatesAddNewDraft(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesAddNewDraft(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesAddNewDraft``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesAddNewDraft`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesAddNewDraft`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesAddNewDraftRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesAnalyzePrompt + +> PromptTemplate ModelHubPromptTemplatesAnalyzePrompt(ctx).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesAnalyzePrompt(context.Background()).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesAnalyzePrompt``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesAnalyzePrompt`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesAnalyzePrompt`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesAnalyzePromptRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesBulkDelete + +> PromptTemplate ModelHubPromptTemplatesBulkDelete(ctx).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesBulkDelete(context.Background()).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesBulkDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesBulkDelete`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesBulkDelete`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesBulkDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesCommit + +> PromptTemplate ModelHubPromptTemplatesCommit(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesCommit(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesCommit``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesCommit`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesCommit`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesCommitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesCompareVersions + +> PromptTemplate ModelHubPromptTemplatesCompareVersions(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesCompareVersions(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesCompareVersions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesCompareVersions`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesCompareVersions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesCompareVersionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesCreate + +> PromptTemplate ModelHubPromptTemplatesCreate(ctx).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesCreate(context.Background()).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesCreate`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesCreateDraft + +> PromptTemplate ModelHubPromptTemplatesCreateDraft(ctx).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesCreateDraft(context.Background()).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesCreateDraft``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesCreateDraft`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesCreateDraft`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesCreateDraftRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesDelete + +> ModelHubPromptTemplatesDelete(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesDeleteEvaluationConfig + +> ModelHubPromptTemplatesDeleteEvaluationConfig(ctx, id).Execute() + +Delete an evaluation configuration by name from a PromptTemplate. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesDeleteEvaluationConfig(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesDeleteEvaluationConfig``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesDeleteEvaluationConfigRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesDerivedVariablesExtractCreate + +> DerivedVariableDetailResponse ModelHubPromptTemplatesDerivedVariablesExtractCreate(ctx, promptId).DerivedVariableExtractRequest(derivedVariableExtractRequest).Execute() + +Manually trigger extraction of derived variables from outputs. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptId := "promptId_example" // string | + derivedVariableExtractRequest := *openapiclient.NewDerivedVariableExtractRequest("Version_example") // DerivedVariableExtractRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesExtractCreate(context.Background(), promptId).DerivedVariableExtractRequest(derivedVariableExtractRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesExtractCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesDerivedVariablesExtractCreate`: DerivedVariableDetailResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesExtractCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesDerivedVariablesExtractCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **derivedVariableExtractRequest** | [**DerivedVariableExtractRequest**](DerivedVariableExtractRequest.md) | | + +### Return type + +[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesDerivedVariablesList + +> PromptDerivedVariablesResponse ModelHubPromptTemplatesDerivedVariablesList(ctx, promptId).Execute() + +Get all derived variables for a prompt template. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptId := "promptId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesList(context.Background(), promptId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesDerivedVariablesList`: PromptDerivedVariablesResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesDerivedVariablesListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptDerivedVariablesResponse**](PromptDerivedVariablesResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesDerivedVariablesPreviewCreate + +> DerivedVariableDetailResponse ModelHubPromptTemplatesDerivedVariablesPreviewCreate(ctx).DerivedVariablePreviewRequest(derivedVariablePreviewRequest).Execute() + +Preview derived variables from JSON content without saving. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + derivedVariablePreviewRequest := *openapiclient.NewDerivedVariablePreviewRequest(map[string]interface{}{"key": interface{}(123)}) // DerivedVariablePreviewRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesPreviewCreate(context.Background()).DerivedVariablePreviewRequest(derivedVariablePreviewRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesPreviewCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesDerivedVariablesPreviewCreate`: DerivedVariableDetailResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesPreviewCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesDerivedVariablesPreviewCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **derivedVariablePreviewRequest** | [**DerivedVariablePreviewRequest**](DerivedVariablePreviewRequest.md) | | + +### Return type + +[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesDerivedVariablesSchemaList + +> DerivedVariableDetailResponse ModelHubPromptTemplatesDerivedVariablesSchemaList(ctx, promptId, columnName).Execute() + +Get the schema for derived variables of a specific column. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptId := "promptId_example" // string | + columnName := "columnName_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesSchemaList(context.Background(), promptId, columnName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesSchemaList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesDerivedVariablesSchemaList`: DerivedVariableDetailResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesDerivedVariablesSchemaList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptId** | **string** | | +**columnName** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesDerivedVariablesSchemaListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGeneratePrompt + +> PromptTemplate ModelHubPromptTemplatesGeneratePrompt(ctx).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGeneratePrompt(context.Background()).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGeneratePrompt``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGeneratePrompt`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGeneratePrompt`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGeneratePromptRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGenerateVariables + +> PromptTemplate ModelHubPromptTemplatesGenerateVariables(ctx).PromptTemplate(promptTemplate).Execute() + +Generate synthetic data for prompt variables using the SyntheticDataAgent. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGenerateVariables(context.Background()).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGenerateVariables``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGenerateVariables`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGenerateVariables`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGenerateVariablesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGetAllVariables + +> PromptTemplate ModelHubPromptTemplatesGetAllVariables(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGetAllVariables(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGetAllVariables``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGetAllVariables`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGetAllVariables`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGetAllVariablesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGetEvaluationConfigs + +> PromptTemplate ModelHubPromptTemplatesGetEvaluationConfigs(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGetEvaluationConfigs(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGetEvaluationConfigs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGetEvaluationConfigs`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGetEvaluationConfigs`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGetEvaluationConfigsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGetNextVersion + +> PromptTemplate ModelHubPromptTemplatesGetNextVersion(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGetNextVersion(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGetNextVersion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGetNextVersion`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGetNextVersion`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGetNextVersionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGetRunStatus + +> PromptTemplate ModelHubPromptTemplatesGetRunStatus(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGetRunStatus(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGetRunStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGetRunStatus`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGetRunStatus`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGetRunStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGetSdkCode + +> PromptTemplate ModelHubPromptTemplatesGetSdkCode(ctx, id, language).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + language := "language_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGetSdkCode(context.Background(), id, language).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGetSdkCode``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGetSdkCode`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGetSdkCode`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | +**language** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGetSdkCodeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesGetTemplateByName + +> ModelHubPromptTemplatesList200Response ModelHubPromptTemplatesGetTemplateByName(ctx).Name(name).Version(version).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + name := "name_example" // string | (optional) + version := "version_example" // string | (optional) + createdAt := "createdAt_example" // string | (optional) + search := "search_example" // string | A search term. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesGetTemplateByName(context.Background()).Name(name).Version(version).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesGetTemplateByName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesGetTemplateByName`: ModelHubPromptTemplatesList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesGetTemplateByName`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesGetTemplateByNameRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string** | | + **version** | **string** | | + **createdAt** | **string** | | + **search** | **string** | A search term. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubPromptTemplatesList200Response**](ModelHubPromptTemplatesList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesImprovePrompt + +> PromptTemplate ModelHubPromptTemplatesImprovePrompt(ctx).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesImprovePrompt(context.Background()).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesImprovePrompt``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesImprovePrompt`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesImprovePrompt`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesImprovePromptRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesList + +> ModelHubPromptTemplatesList200Response ModelHubPromptTemplatesList(ctx).Name(name).Version(version).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + name := "name_example" // string | (optional) + version := "version_example" // string | (optional) + createdAt := "createdAt_example" // string | (optional) + search := "search_example" // string | A search term. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesList(context.Background()).Name(name).Version(version).CreatedAt(createdAt).Search(search).Ordering(ordering).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesList`: ModelHubPromptTemplatesList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string** | | + **version** | **string** | | + **createdAt** | **string** | | + **search** | **string** | A search term. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ModelHubPromptTemplatesList200Response**](ModelHubPromptTemplatesList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesPartialUpdate + +> PromptTemplate ModelHubPromptTemplatesPartialUpdate(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesPartialUpdate(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesPartialUpdate`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesRead + +> PromptTemplate ModelHubPromptTemplatesRead(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesRead`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesRetrieveEvaluations + +> PromptTemplate ModelHubPromptTemplatesRetrieveEvaluations(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesRetrieveEvaluations(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesRetrieveEvaluations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesRetrieveEvaluations`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesRetrieveEvaluations`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesRetrieveEvaluationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesRunEvalsOnMultipleVersions + +> PromptTemplate ModelHubPromptTemplatesRunEvalsOnMultipleVersions(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesRunEvalsOnMultipleVersions(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesRunEvalsOnMultipleVersions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesRunEvalsOnMultipleVersions`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesRunEvalsOnMultipleVersions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesRunEvalsOnMultipleVersionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesRunTemplate + +> PromptTemplate ModelHubPromptTemplatesRunTemplate(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesRunTemplate(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesRunTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesRunTemplate`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesRunTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesRunTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesSaveName + +> PromptTemplate ModelHubPromptTemplatesSaveName(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesSaveName(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesSaveName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesSaveName`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesSaveName`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesSaveNameRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesSavePromptFolder + +> PromptTemplate ModelHubPromptTemplatesSavePromptFolder(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesSavePromptFolder(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesSavePromptFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesSavePromptFolder`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesSavePromptFolder`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesSavePromptFolderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesSetDefault + +> PromptTemplate ModelHubPromptTemplatesSetDefault(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesSetDefault(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesSetDefault``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesSetDefault`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesSetDefault`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesSetDefaultRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesStopStreaming + +> PromptTemplate ModelHubPromptTemplatesStopStreaming(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesStopStreaming(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesStopStreaming``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesStopStreaming`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesStopStreaming`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesStopStreamingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesUpdate + +> PromptTemplate ModelHubPromptTemplatesUpdate(ctx, id).PromptTemplate(promptTemplate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesUpdate(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesUpdate`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesUpdateEvaluationConfigs + +> PromptTemplate ModelHubPromptTemplatesUpdateEvaluationConfigs(ctx, id).PromptTemplate(promptTemplate).Execute() + +Add or update evaluation configurations for a PromptTemplate. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + promptTemplate := *openapiclient.NewPromptTemplate("Name_example") // PromptTemplate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesUpdateEvaluationConfigs(context.Background(), id).PromptTemplate(promptTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesUpdateEvaluationConfigs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesUpdateEvaluationConfigs`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesUpdateEvaluationConfigs`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesUpdateEvaluationConfigsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **promptTemplate** | [**PromptTemplate**](PromptTemplate.md) | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubPromptTemplatesVersions + +> PromptTemplate ModelHubPromptTemplatesVersions(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | A UUID string identifying this prompt template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubPromptTemplatesVersions(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubPromptTemplatesVersions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubPromptTemplatesVersions`: PromptTemplate + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubPromptTemplatesVersions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | A UUID string identifying this prompt template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubPromptTemplatesVersionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresBulkCreate + +> BulkCreateScoresResponse ModelHubScoresBulkCreate(ctx).BulkCreateScores(bulkCreateScores).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + bulkCreateScores := *openapiclient.NewBulkCreateScores("SourceType_example", "SourceId_example", []openapiclient.BulkCreateScoreItem{*openapiclient.NewBulkCreateScoreItem("LabelId_example", map[string]interface{}{"key": interface{}(123)})}) // BulkCreateScores | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresBulkCreate(context.Background()).BulkCreateScores(bulkCreateScores).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresBulkCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresBulkCreate`: BulkCreateScoresResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresBulkCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresBulkCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bulkCreateScores** | [**BulkCreateScores**](BulkCreateScores.md) | | + +### Return type + +[**BulkCreateScoresResponse**](BulkCreateScoresResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresCreate + +> ScoreResponse ModelHubScoresCreate(ctx).CreateScore(createScore).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + createScore := *openapiclient.NewCreateScore("SourceType_example", "SourceId_example", "LabelId_example", map[string]interface{}{"key": interface{}(123)}) // CreateScore | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresCreate(context.Background()).CreateScore(createScore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresCreate`: ScoreResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createScore** | [**CreateScore**](CreateScore.md) | | + +### Return type + +[**ScoreResponse**](ScoreResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresDelete + +> ScoreDeleteResponse ModelHubScoresDelete(ctx, id).Execute() + +Soft-delete a score. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresDelete`: ScoreDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ScoreDeleteResponse**](ScoreDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresForSource + +> ScoreForSourceResponse ModelHubScoresForSource(ctx).SourceType(sourceType).SourceId(sourceId).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + sourceType := "sourceType_example" // string | + sourceId := "sourceId_example" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresForSource(context.Background()).SourceType(sourceType).SourceId(sourceId).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresForSource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresForSource`: ScoreForSourceResponse + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresForSource`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresForSourceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sourceType** | **string** | | + **sourceId** | **string** | | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ScoreForSourceResponse**](ScoreForSourceResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresList + +> ModelHubScoresList200Response ModelHubScoresList(ctx).Page(page).Limit(limit).SourceType(sourceType).SourceId(sourceId).LabelId(labelId).AnnotatorId(annotatorId).Execute() + +Universal Score CRUD. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + sourceType := "sourceType_example" // string | (optional) + sourceId := "sourceId_example" // string | (optional) + labelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + annotatorId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresList(context.Background()).Page(page).Limit(limit).SourceType(sourceType).SourceId(sourceId).LabelId(labelId).AnnotatorId(annotatorId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresList`: ModelHubScoresList200Response + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **sourceType** | **string** | | + **sourceId** | **string** | | + **labelId** | **string** | | + **annotatorId** | **string** | | + +### Return type + +[**ModelHubScoresList200Response**](ModelHubScoresList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresPartialUpdate + +> Score ModelHubScoresPartialUpdate(ctx, id).Score(score).Execute() + +Universal Score CRUD. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + score := *openapiclient.NewScore("SourceType_example", map[string]interface{}{"key": interface{}(123)}) // Score | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresPartialUpdate(context.Background(), id).Score(score).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresPartialUpdate`: Score + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **score** | [**Score**](Score.md) | | + +### Return type + +[**Score**](Score.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresRead + +> Score ModelHubScoresRead(ctx, id).Execute() + +Universal Score CRUD. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresRead`: Score + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Score**](Score.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ModelHubScoresUpdate + +> Score ModelHubScoresUpdate(ctx, id).Score(score).Execute() + +Universal Score CRUD. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + score := *openapiclient.NewScore("SourceType_example", map[string]interface{}{"key": interface{}(123)}) // Score | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ModelHubAPI.ModelHubScoresUpdate(context.Background(), id).Score(score).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ModelHubAPI.ModelHubScoresUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ModelHubScoresUpdate`: Score + fmt.Fprintf(os.Stdout, "Response from `ModelHubAPI.ModelHubScoresUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiModelHubScoresUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **score** | [**Score**](Score.md) | | + +### Return type + +[**Score**](Score.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/RunTestsEvalConfigsAPI.md b/go/futureagi/docs/RunTestsEvalConfigsAPI.md new file mode 100644 index 0000000..6f3e443 --- /dev/null +++ b/go/futureagi/docs/RunTestsEvalConfigsAPI.md @@ -0,0 +1,304 @@ +# \RunTestsEvalConfigsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SimulateRunTestsEvalConfigsCreate**](RunTestsEvalConfigsAPI.md#SimulateRunTestsEvalConfigsCreate) | **Post** /simulate/run-tests/{run_test_id}/eval-configs/ | Add evaluation configurations +[**SimulateRunTestsEvalConfigsDelete**](RunTestsEvalConfigsAPI.md#SimulateRunTestsEvalConfigsDelete) | **Delete** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/ | Delete evaluation configuration +[**SimulateRunTestsEvalConfigsUpdateCreate**](RunTestsEvalConfigsAPI.md#SimulateRunTestsEvalConfigsUpdateCreate) | **Post** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/ | Update evaluation configuration +[**SimulateRunTestsRunNewEvalsCreate**](RunTestsEvalConfigsAPI.md#SimulateRunTestsRunNewEvalsCreate) | **Post** /simulate/run-tests/{run_test_id}/run-new-evals/ | Run new evaluations on test executions + + + +## SimulateRunTestsEvalConfigsCreate + +> AddEvalConfigsResponse SimulateRunTestsEvalConfigsCreate(ctx, runTestId).AddEvalConfigsRequest(addEvalConfigsRequest).Execute() + +Add evaluation configurations + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + addEvalConfigsRequest := *openapiclient.NewAddEvalConfigsRequest([]openapiclient.EvalConfigDefinition{*openapiclient.NewEvalConfigDefinition("TemplateId_example")}) // AddEvalConfigsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsCreate(context.Background(), runTestId).AddEvalConfigsRequest(addEvalConfigsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsEvalConfigsCreate`: AddEvalConfigsResponse + fmt.Fprintf(os.Stdout, "Response from `RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsEvalConfigsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **addEvalConfigsRequest** | [**AddEvalConfigsRequest**](AddEvalConfigsRequest.md) | | + +### Return type + +[**AddEvalConfigsResponse**](AddEvalConfigsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsEvalConfigsDelete + +> DeleteEvalConfigResponse SimulateRunTestsEvalConfigsDelete(ctx, runTestId, evalConfigId).Execute() + +Delete evaluation configuration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + evalConfigId := "evalConfigId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsDelete(context.Background(), runTestId, evalConfigId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsEvalConfigsDelete`: DeleteEvalConfigResponse + fmt.Fprintf(os.Stdout, "Response from `RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | +**evalConfigId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsEvalConfigsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteEvalConfigResponse**](DeleteEvalConfigResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsEvalConfigsUpdateCreate + +> EvalConfigUpdateResponse SimulateRunTestsEvalConfigsUpdateCreate(ctx, runTestId, evalConfigId).EvalConfigUpdateRequest(evalConfigUpdateRequest).Execute() + +Update evaluation configuration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + evalConfigId := "evalConfigId_example" // string | + evalConfigUpdateRequest := *openapiclient.NewEvalConfigUpdateRequest() // EvalConfigUpdateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsUpdateCreate(context.Background(), runTestId, evalConfigId).EvalConfigUpdateRequest(evalConfigUpdateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsUpdateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsEvalConfigsUpdateCreate`: EvalConfigUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `RunTestsEvalConfigsAPI.SimulateRunTestsEvalConfigsUpdateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | +**evalConfigId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsEvalConfigsUpdateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **evalConfigUpdateRequest** | [**EvalConfigUpdateRequest**](EvalConfigUpdateRequest.md) | | + +### Return type + +[**EvalConfigUpdateResponse**](EvalConfigUpdateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsRunNewEvalsCreate + +> RunNewEvalsResponse SimulateRunTestsRunNewEvalsCreate(ctx, runTestId).RunNewEvalsOnTestExecution(runNewEvalsOnTestExecution).Execute() + +Run new evaluations on test executions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + runNewEvalsOnTestExecution := *openapiclient.NewRunNewEvalsOnTestExecution([]string{"EvalConfigIds_example"}) // RunNewEvalsOnTestExecution | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RunTestsEvalConfigsAPI.SimulateRunTestsRunNewEvalsCreate(context.Background(), runTestId).RunNewEvalsOnTestExecution(runNewEvalsOnTestExecution).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RunTestsEvalConfigsAPI.SimulateRunTestsRunNewEvalsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsRunNewEvalsCreate`: RunNewEvalsResponse + fmt.Fprintf(os.Stdout, "Response from `RunTestsEvalConfigsAPI.SimulateRunTestsRunNewEvalsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsRunNewEvalsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **runNewEvalsOnTestExecution** | [**RunNewEvalsOnTestExecution**](RunNewEvalsOnTestExecution.md) | | + +### Return type + +[**RunNewEvalsResponse**](RunNewEvalsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/RunTestsEvalSummaryAPI.md b/go/futureagi/docs/RunTestsEvalSummaryAPI.md new file mode 100644 index 0000000..e788fc4 --- /dev/null +++ b/go/futureagi/docs/RunTestsEvalSummaryAPI.md @@ -0,0 +1,154 @@ +# \RunTestsEvalSummaryAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SimulateRunTestsEvalSummaryComparisonList**](RunTestsEvalSummaryAPI.md#SimulateRunTestsEvalSummaryComparisonList) | **Get** /simulate/run-tests/{run_test_id}/eval-summary-comparison/ | Compare evaluation summaries +[**SimulateRunTestsEvalSummaryList**](RunTestsEvalSummaryAPI.md#SimulateRunTestsEvalSummaryList) | **Get** /simulate/run-tests/{run_test_id}/eval-summary/ | Get evaluation summary + + + +## SimulateRunTestsEvalSummaryComparisonList + +> EvalSummaryComparisonResponse SimulateRunTestsEvalSummaryComparisonList(ctx, runTestId).ExecutionIds(executionIds).Execute() + +Compare evaluation summaries + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + executionIds := "executionIds_example" // string | JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RunTestsEvalSummaryAPI.SimulateRunTestsEvalSummaryComparisonList(context.Background(), runTestId).ExecutionIds(executionIds).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RunTestsEvalSummaryAPI.SimulateRunTestsEvalSummaryComparisonList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsEvalSummaryComparisonList`: EvalSummaryComparisonResponse + fmt.Fprintf(os.Stdout, "Response from `RunTestsEvalSummaryAPI.SimulateRunTestsEvalSummaryComparisonList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsEvalSummaryComparisonListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **executionIds** | **string** | JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. | + +### Return type + +[**EvalSummaryComparisonResponse**](EvalSummaryComparisonResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsEvalSummaryList + +> EvalSummaryResponse SimulateRunTestsEvalSummaryList(ctx, runTestId).ExecutionId(executionId).Execute() + +Get evaluation summary + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + executionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RunTestsEvalSummaryAPI.SimulateRunTestsEvalSummaryList(context.Background(), runTestId).ExecutionId(executionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RunTestsEvalSummaryAPI.SimulateRunTestsEvalSummaryList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsEvalSummaryList`: EvalSummaryResponse + fmt.Fprintf(os.Stdout, "Response from `RunTestsEvalSummaryAPI.SimulateRunTestsEvalSummaryList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsEvalSummaryListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **executionId** | **string** | UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. | + +### Return type + +[**EvalSummaryResponse**](EvalSummaryResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/ScenariosAPI.md b/go/futureagi/docs/ScenariosAPI.md new file mode 100644 index 0000000..e5077f5 --- /dev/null +++ b/go/futureagi/docs/ScenariosAPI.md @@ -0,0 +1,302 @@ +# \ScenariosAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SimulateScenariosAddColumnsCreate**](ScenariosAPI.md#SimulateScenariosAddColumnsCreate) | **Post** /simulate/scenarios/{scenario_id}/add-columns/ | Add columns to scenario +[**SimulateScenariosAddRowsCreate**](ScenariosAPI.md#SimulateScenariosAddRowsCreate) | **Post** /simulate/scenarios/{scenario_id}/add-rows/ | Add rows to scenario +[**SimulateScenariosGetColumnsList**](ScenariosAPI.md#SimulateScenariosGetColumnsList) | **Get** /simulate/scenarios/get-columns/ | List scenarios +[**SimulateScenariosPromptsUpdate**](ScenariosAPI.md#SimulateScenariosPromptsUpdate) | **Put** /simulate/scenarios/{scenario_id}/prompts/ | Edit scenario prompts + + + +## SimulateScenariosAddColumnsCreate + +> ScenarioAddColumnsResponse SimulateScenariosAddColumnsCreate(ctx, scenarioId).ScenarioAddColumnsRequest(scenarioAddColumnsRequest).Execute() + +Add columns to scenario + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + scenarioId := "scenarioId_example" // string | + scenarioAddColumnsRequest := *openapiclient.NewScenarioAddColumnsRequest([]openapiclient.ColumnDefinition{*openapiclient.NewColumnDefinition("Name_example", "DataType_example", "Description_example")}) // ScenarioAddColumnsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ScenariosAPI.SimulateScenariosAddColumnsCreate(context.Background(), scenarioId).ScenarioAddColumnsRequest(scenarioAddColumnsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ScenariosAPI.SimulateScenariosAddColumnsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateScenariosAddColumnsCreate`: ScenarioAddColumnsResponse + fmt.Fprintf(os.Stdout, "Response from `ScenariosAPI.SimulateScenariosAddColumnsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scenarioId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateScenariosAddColumnsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **scenarioAddColumnsRequest** | [**ScenarioAddColumnsRequest**](ScenarioAddColumnsRequest.md) | | + +### Return type + +[**ScenarioAddColumnsResponse**](ScenarioAddColumnsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateScenariosAddRowsCreate + +> ScenarioAddRowsResponse SimulateScenariosAddRowsCreate(ctx, scenarioId).ScenarioAddRowsRequest(scenarioAddRowsRequest).Execute() + +Add rows to scenario + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + scenarioId := "scenarioId_example" // string | + scenarioAddRowsRequest := *openapiclient.NewScenarioAddRowsRequest(int32(123)) // ScenarioAddRowsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ScenariosAPI.SimulateScenariosAddRowsCreate(context.Background(), scenarioId).ScenarioAddRowsRequest(scenarioAddRowsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ScenariosAPI.SimulateScenariosAddRowsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateScenariosAddRowsCreate`: ScenarioAddRowsResponse + fmt.Fprintf(os.Stdout, "Response from `ScenariosAPI.SimulateScenariosAddRowsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scenarioId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateScenariosAddRowsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **scenarioAddRowsRequest** | [**ScenarioAddRowsRequest**](ScenarioAddRowsRequest.md) | | + +### Return type + +[**ScenarioAddRowsResponse**](ScenarioAddRowsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateScenariosGetColumnsList + +> ScenarioListResponse SimulateScenariosGetColumnsList(ctx).Search(search).AgentDefinitionId(agentDefinitionId).AgentType(agentType).Page(page).Limit(limit).Execute() + +List scenarios + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + search := "search_example" // string | (optional) (default to "") + agentDefinitionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + agentType := "agentType_example" // string | (optional) + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ScenariosAPI.SimulateScenariosGetColumnsList(context.Background()).Search(search).AgentDefinitionId(agentDefinitionId).AgentType(agentType).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ScenariosAPI.SimulateScenariosGetColumnsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateScenariosGetColumnsList`: ScenarioListResponse + fmt.Fprintf(os.Stdout, "Response from `ScenariosAPI.SimulateScenariosGetColumnsList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateScenariosGetColumnsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | | [default to ""] + **agentDefinitionId** | **string** | | + **agentType** | **string** | | + **page** | **int32** | | [default to 1] + **limit** | **int32** | | + +### Return type + +[**ScenarioListResponse**](ScenarioListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateScenariosPromptsUpdate + +> ScenarioPromptsUpdateResponse SimulateScenariosPromptsUpdate(ctx, scenarioId).ScenarioEditPromptsRequest(scenarioEditPromptsRequest).Execute() + +Edit scenario prompts + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + scenarioId := "scenarioId_example" // string | + scenarioEditPromptsRequest := *openapiclient.NewScenarioEditPromptsRequest("Prompts_example") // ScenarioEditPromptsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ScenariosAPI.SimulateScenariosPromptsUpdate(context.Background(), scenarioId).ScenarioEditPromptsRequest(scenarioEditPromptsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ScenariosAPI.SimulateScenariosPromptsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateScenariosPromptsUpdate`: ScenarioPromptsUpdateResponse + fmt.Fprintf(os.Stdout, "Response from `ScenariosAPI.SimulateScenariosPromptsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scenarioId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateScenariosPromptsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **scenarioEditPromptsRequest** | [**ScenarioEditPromptsRequest**](ScenarioEditPromptsRequest.md) | | + +### Return type + +[**ScenarioPromptsUpdateResponse**](ScenarioPromptsUpdateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SdkAPI.md b/go/futureagi/docs/SdkAPI.md new file mode 100644 index 0000000..a79debd --- /dev/null +++ b/go/futureagi/docs/SdkAPI.md @@ -0,0 +1,545 @@ +# \SdkAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SdkApiV1ConfigureEvaluationsCreate**](SdkAPI.md#SdkApiV1ConfigureEvaluationsCreate) | **Post** /sdk/api/v1/configure-evaluations/ | +[**SdkApiV1EvalCreate**](SdkAPI.md#SdkApiV1EvalCreate) | **Post** /sdk/api/v1/eval/ | +[**SdkApiV1EvalRead**](SdkAPI.md#SdkApiV1EvalRead) | **Get** /sdk/api/v1/eval/{eval_id}/ | +[**SdkApiV1EvaluatePipelineCreate**](SdkAPI.md#SdkApiV1EvaluatePipelineCreate) | **Post** /sdk/api/v1/evaluate-pipeline/ | +[**SdkApiV1EvaluatePipelineList**](SdkAPI.md#SdkApiV1EvaluatePipelineList) | **Get** /sdk/api/v1/evaluate-pipeline/ | +[**SdkApiV1GetEvalsList**](SdkAPI.md#SdkApiV1GetEvalsList) | **Get** /sdk/api/v1/get-evals/ | +[**SdkApiV1NewEvalCreate**](SdkAPI.md#SdkApiV1NewEvalCreate) | **Post** /sdk/api/v1/new-eval/ | +[**SdkApiV1NewEvalList**](SdkAPI.md#SdkApiV1NewEvalList) | **Get** /sdk/api/v1/new-eval/ | + + + +## SdkApiV1ConfigureEvaluationsCreate + +> SDKConfigureEvaluationsResponse SdkApiV1ConfigureEvaluationsCreate(ctx).SDKConfigureEvaluationsRequest(sDKConfigureEvaluationsRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + sDKConfigureEvaluationsRequest := *openapiclient.NewSDKConfigureEvaluationsRequest(*openapiclient.NewConfigureEvaluations("EvalTemplates_example", map[string]string{"key": "Inner_example"}), "Platform_example") // SDKConfigureEvaluationsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1ConfigureEvaluationsCreate(context.Background()).SDKConfigureEvaluationsRequest(sDKConfigureEvaluationsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1ConfigureEvaluationsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1ConfigureEvaluationsCreate`: SDKConfigureEvaluationsResponse + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1ConfigureEvaluationsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1ConfigureEvaluationsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sDKConfigureEvaluationsRequest** | [**SDKConfigureEvaluationsRequest**](SDKConfigureEvaluationsRequest.md) | | + +### Return type + +[**SDKConfigureEvaluationsResponse**](SDKConfigureEvaluationsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SdkApiV1EvalCreate + +> SDKStandaloneEvalResponse SdkApiV1EvalCreate(ctx).SDKStandaloneEvalRequest(sDKStandaloneEvalRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + sDKStandaloneEvalRequest := *openapiclient.NewSDKStandaloneEvalRequest([]openapiclient.SDKStandaloneEvalInput{*openapiclient.NewSDKStandaloneEvalInput()}, map[string]string{"key": "Inner_example"}) // SDKStandaloneEvalRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1EvalCreate(context.Background()).SDKStandaloneEvalRequest(sDKStandaloneEvalRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1EvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1EvalCreate`: SDKStandaloneEvalResponse + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1EvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1EvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sDKStandaloneEvalRequest** | [**SDKStandaloneEvalRequest**](SDKStandaloneEvalRequest.md) | | + +### Return type + +[**SDKStandaloneEvalResponse**](SDKStandaloneEvalResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SdkApiV1EvalRead + +> SDKEvalTemplateResponse SdkApiV1EvalRead(ctx, evalId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + evalId := "evalId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1EvalRead(context.Background(), evalId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1EvalRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1EvalRead`: SDKEvalTemplateResponse + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1EvalRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**evalId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1EvalReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**SDKEvalTemplateResponse**](SDKEvalTemplateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SdkApiV1EvaluatePipelineCreate + +> SDKCICDEvaluationRunAcceptedResponse SdkApiV1EvaluatePipelineCreate(ctx).CICDJob(cICDJob).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + cICDJob := *openapiclient.NewCICDJob("ProjectName_example", "Version_example", []openapiclient.CICDEvaluationItem{*openapiclient.NewCICDEvaluationItem("EvalTemplate_example", map[string]string{"key": "Inner_example"})}) // CICDJob | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1EvaluatePipelineCreate(context.Background()).CICDJob(cICDJob).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1EvaluatePipelineCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1EvaluatePipelineCreate`: SDKCICDEvaluationRunAcceptedResponse + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1EvaluatePipelineCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1EvaluatePipelineCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cICDJob** | [**CICDJob**](CICDJob.md) | | + +### Return type + +[**SDKCICDEvaluationRunAcceptedResponse**](SDKCICDEvaluationRunAcceptedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SdkApiV1EvaluatePipelineList + +> SDKCICDEvaluationRunsResponse SdkApiV1EvaluatePipelineList(ctx).ProjectName(projectName).Versions(versions).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + projectName := "projectName_example" // string | + versions := "versions_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1EvaluatePipelineList(context.Background()).ProjectName(projectName).Versions(versions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1EvaluatePipelineList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1EvaluatePipelineList`: SDKCICDEvaluationRunsResponse + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1EvaluatePipelineList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1EvaluatePipelineListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectName** | **string** | | + **versions** | **string** | | + +### Return type + +[**SDKCICDEvaluationRunsResponse**](SDKCICDEvaluationRunsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SdkApiV1GetEvalsList + +> SDKGetEvalsResponse SdkApiV1GetEvalsList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1GetEvalsList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1GetEvalsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1GetEvalsList`: SDKGetEvalsResponse + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1GetEvalsList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1GetEvalsListRequest struct via the builder pattern + + +### Return type + +[**SDKGetEvalsResponse**](SDKGetEvalsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SdkApiV1NewEvalCreate + +> SDKStandaloneEvalResponse SdkApiV1NewEvalCreate(ctx).SDKStandaloneEvalV2Request(sDKStandaloneEvalV2Request).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + sDKStandaloneEvalV2Request := *openapiclient.NewSDKStandaloneEvalV2Request("EvalName_example", map[string]string{"key": "Inner_example"}) // SDKStandaloneEvalV2Request | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1NewEvalCreate(context.Background()).SDKStandaloneEvalV2Request(sDKStandaloneEvalV2Request).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1NewEvalCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1NewEvalCreate`: SDKStandaloneEvalResponse + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1NewEvalCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1NewEvalCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sDKStandaloneEvalV2Request** | [**SDKStandaloneEvalV2Request**](SDKStandaloneEvalV2Request.md) | | + +### Return type + +[**SDKStandaloneEvalResponse**](SDKStandaloneEvalResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SdkApiV1NewEvalList + +> SDKStandaloneEvalV2Response SdkApiV1NewEvalList(ctx).EvalId(evalId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + evalId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SdkAPI.SdkApiV1NewEvalList(context.Background()).EvalId(evalId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SdkAPI.SdkApiV1NewEvalList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SdkApiV1NewEvalList`: SDKStandaloneEvalV2Response + fmt.Fprintf(os.Stdout, "Response from `SdkAPI.SdkApiV1NewEvalList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSdkApiV1NewEvalListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **evalId** | **string** | | + +### Return type + +[**SDKStandaloneEvalV2Response**](SDKStandaloneEvalV2Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SimulateAPI.md b/go/futureagi/docs/SimulateAPI.md new file mode 100644 index 0000000..f4b2ffc --- /dev/null +++ b/go/futureagi/docs/SimulateAPI.md @@ -0,0 +1,4170 @@ +# \SimulateAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SimulateAgentDefinitionsDelete**](SimulateAPI.md#SimulateAgentDefinitionsDelete) | **Delete** /simulate/agent-definitions/ | +[**SimulateAgentDefinitionsVersionsActivateCreate**](SimulateAPI.md#SimulateAgentDefinitionsVersionsActivateCreate) | **Post** /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/ | +[**SimulateAgentDefinitionsVersionsCallExecutionsList**](SimulateAPI.md#SimulateAgentDefinitionsVersionsCallExecutionsList) | **Get** /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/ | +[**SimulateAgentDefinitionsVersionsCreateCreate**](SimulateAPI.md#SimulateAgentDefinitionsVersionsCreateCreate) | **Post** /simulate/agent-definitions/{agent_id}/versions/create/ | +[**SimulateAgentDefinitionsVersionsDeleteDelete**](SimulateAPI.md#SimulateAgentDefinitionsVersionsDeleteDelete) | **Delete** /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/ | +[**SimulateAgentDefinitionsVersionsEvalSummaryList**](SimulateAPI.md#SimulateAgentDefinitionsVersionsEvalSummaryList) | **Get** /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/ | +[**SimulateAgentDefinitionsVersionsList**](SimulateAPI.md#SimulateAgentDefinitionsVersionsList) | **Get** /simulate/agent-definitions/{agent_id}/versions/ | +[**SimulateAgentDefinitionsVersionsRead**](SimulateAPI.md#SimulateAgentDefinitionsVersionsRead) | **Get** /simulate/agent-definitions/{agent_id}/versions/{version_id}/ | +[**SimulateAgentDefinitionsVersionsRestoreCreate**](SimulateAPI.md#SimulateAgentDefinitionsVersionsRestoreCreate) | **Post** /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/ | +[**SimulateApiCallExecutionsList**](SimulateAPI.md#SimulateApiCallExecutionsList) | **Get** /simulate/api/call-executions/ | +[**SimulateApiPersonasDuplicate**](SimulateAPI.md#SimulateApiPersonasDuplicate) | **Post** /simulate/api/personas/{id}/duplicate/ | +[**SimulateApiPersonasDuplicateCreate**](SimulateAPI.md#SimulateApiPersonasDuplicateCreate) | **Post** /simulate/api/personas/duplicate/{persona_id}/ | +[**SimulateApiPersonasFieldOptions**](SimulateAPI.md#SimulateApiPersonasFieldOptions) | **Get** /simulate/api/personas/field-options/ | +[**SimulateApiPersonasSystemPersonas**](SimulateAPI.md#SimulateApiPersonasSystemPersonas) | **Get** /simulate/api/personas/system/ | +[**SimulateApiPersonasUpdate**](SimulateAPI.md#SimulateApiPersonasUpdate) | **Put** /simulate/api/personas/{id}/ | +[**SimulateApiPersonasWorkspacePersonas**](SimulateAPI.md#SimulateApiPersonasWorkspacePersonas) | **Get** /simulate/api/personas/workspace/ | +[**SimulateApiRunTestsList**](SimulateAPI.md#SimulateApiRunTestsList) | **Get** /simulate/api/run-tests/ | +[**SimulateCallExecutionsBranchAnalysisCreate**](SimulateAPI.md#SimulateCallExecutionsBranchAnalysisCreate) | **Post** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +[**SimulateCallExecutionsBranchAnalysisList**](SimulateAPI.md#SimulateCallExecutionsBranchAnalysisList) | **Get** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +[**SimulateCallExecutionsChatSendMessageCreate**](SimulateAPI.md#SimulateCallExecutionsChatSendMessageCreate) | **Post** /simulate/call-executions/{call_execution_id}/chat/send-message/ | +[**SimulateCallExecutionsDeleteDelete**](SimulateAPI.md#SimulateCallExecutionsDeleteDelete) | **Delete** /simulate/call-executions/{call_execution_id}/delete/ | +[**SimulateCallExecutionsErrorLocalizerTasksList**](SimulateAPI.md#SimulateCallExecutionsErrorLocalizerTasksList) | **Get** /simulate/call-executions/{call_execution_id}/error-localizer-tasks/ | +[**SimulateCallExecutionsLogsList**](SimulateAPI.md#SimulateCallExecutionsLogsList) | **Get** /simulate/call-executions/{call_execution_id}/logs/ | +[**SimulateCallExecutionsPartialUpdate**](SimulateAPI.md#SimulateCallExecutionsPartialUpdate) | **Patch** /simulate/call-executions/{call_execution_id}/ | +[**SimulateCallExecutionsRead**](SimulateAPI.md#SimulateCallExecutionsRead) | **Get** /simulate/call-executions/{call_execution_id}/ | +[**SimulateCallExecutionsSessionComparisonList**](SimulateAPI.md#SimulateCallExecutionsSessionComparisonList) | **Get** /simulate/call-executions/{call_execution_id}/session-comparison/ | +[**SimulateCallExecutionsTranscriptsList**](SimulateAPI.md#SimulateCallExecutionsTranscriptsList) | **Get** /simulate/call-executions/{call_execution_id}/transcripts/ | +[**SimulateExportRead**](SimulateAPI.md#SimulateExportRead) | **Get** /simulate/export/{item_id}/ | +[**SimulatePromptSimulationsScenariosList**](SimulateAPI.md#SimulatePromptSimulationsScenariosList) | **Get** /simulate/prompt-simulations/scenarios/ | Get list of scenarios available for prompt simulations. +[**SimulatePromptTemplatesSimulationsCreate**](SimulateAPI.md#SimulatePromptTemplatesSimulationsCreate) | **Post** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Create a new prompt-based simulation run. +[**SimulatePromptTemplatesSimulationsDelete**](SimulateAPI.md#SimulatePromptTemplatesSimulationsDelete) | **Delete** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +[**SimulatePromptTemplatesSimulationsExecuteCreate**](SimulateAPI.md#SimulatePromptTemplatesSimulationsExecuteCreate) | **Post** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/ | Execute a prompt-based simulation run. +[**SimulatePromptTemplatesSimulationsList**](SimulateAPI.md#SimulatePromptTemplatesSimulationsList) | **Get** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Get paginated list of simulation runs for a specific prompt template. +[**SimulatePromptTemplatesSimulationsPartialUpdate**](SimulateAPI.md#SimulatePromptTemplatesSimulationsPartialUpdate) | **Patch** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +[**SimulatePromptTemplatesSimulationsRead**](SimulateAPI.md#SimulatePromptTemplatesSimulationsRead) | **Get** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +[**SimulateRunTestsActiveList**](SimulateAPI.md#SimulateRunTestsActiveList) | **Get** /simulate/run-tests/active/ | +[**SimulateRunTestsChatExecuteCreate**](SimulateAPI.md#SimulateRunTestsChatExecuteCreate) | **Post** /simulate/run-tests/{run_test_id}/chat-execute/ | +[**SimulateRunTestsComponentsPartialUpdate**](SimulateAPI.md#SimulateRunTestsComponentsPartialUpdate) | **Patch** /simulate/run-tests/{run_test_id}/components/ | +[**SimulateRunTestsDeleteDelete**](SimulateAPI.md#SimulateRunTestsDeleteDelete) | **Delete** /simulate/run-tests/{run_test_id}/delete/ | +[**SimulateRunTestsDeleteTestExecutionsCreate**](SimulateAPI.md#SimulateRunTestsDeleteTestExecutionsCreate) | **Post** /simulate/run-tests/{run_test_id}/delete-test-executions/ | +[**SimulateRunTestsEvalConfigsGetStructureList**](SimulateAPI.md#SimulateRunTestsEvalConfigsGetStructureList) | **Get** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/ | +[**SimulateRunTestsGetIdByNameRead**](SimulateAPI.md#SimulateRunTestsGetIdByNameRead) | **Get** /simulate/run-tests/get-id-by-name/{run_test_name}/ | +[**SimulateRunTestsRerunTestExecutionsCreate**](SimulateAPI.md#SimulateRunTestsRerunTestExecutionsCreate) | **Post** /simulate/run-tests/{run_test_id}/rerun-test-executions/ | +[**SimulateRunTestsScenariosList**](SimulateAPI.md#SimulateRunTestsScenariosList) | **Get** /simulate/run-tests/{run_test_id}/scenarios/ | +[**SimulateRunTestsSdkCodeList**](SimulateAPI.md#SimulateRunTestsSdkCodeList) | **Get** /simulate/run-tests/{run_test_id}/sdk-code/ | +[**SimulateSimulatorAgentsCreateCreate**](SimulateAPI.md#SimulateSimulatorAgentsCreateCreate) | **Post** /simulate/simulator-agents/create/ | +[**SimulateSimulatorAgentsDeleteDelete**](SimulateAPI.md#SimulateSimulatorAgentsDeleteDelete) | **Delete** /simulate/simulator-agents/{agent_id}/delete/ | +[**SimulateSimulatorAgentsEditUpdate**](SimulateAPI.md#SimulateSimulatorAgentsEditUpdate) | **Put** /simulate/simulator-agents/{agent_id}/edit/ | +[**SimulateSimulatorAgentsList**](SimulateAPI.md#SimulateSimulatorAgentsList) | **Get** /simulate/simulator-agents/ | +[**SimulateSimulatorAgentsRead**](SimulateAPI.md#SimulateSimulatorAgentsRead) | **Get** /simulate/simulator-agents/{agent_id}/ | +[**SimulateTestExecutionsChatCallExecutionsBatchCreate**](SimulateAPI.md#SimulateTestExecutionsChatCallExecutionsBatchCreate) | **Post** /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/ | Create a batch of CallExecution records for chat execution (exactly 10 per API call). +[**SimulateTestExecutionsColumnOrderUpdate**](SimulateAPI.md#SimulateTestExecutionsColumnOrderUpdate) | **Put** /simulate/test-executions/{test_execution_id}/column-order/ | +[**SimulateTestExecutionsDeleteDelete**](SimulateAPI.md#SimulateTestExecutionsDeleteDelete) | **Delete** /simulate/test-executions/{test_execution_id}/delete/ | +[**SimulateTestExecutionsEvalExplanationSummaryList**](SimulateAPI.md#SimulateTestExecutionsEvalExplanationSummaryList) | **Get** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/ | +[**SimulateTestExecutionsEvalExplanationSummaryRefreshCreate**](SimulateAPI.md#SimulateTestExecutionsEvalExplanationSummaryRefreshCreate) | **Post** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/ | +[**SimulateTestExecutionsOptimiserAnalysisList**](SimulateAPI.md#SimulateTestExecutionsOptimiserAnalysisList) | **Get** /simulate/test-executions/{test_execution_id}/optimiser-analysis/ | +[**SimulateTestExecutionsOptimiserAnalysisRefreshCreate**](SimulateAPI.md#SimulateTestExecutionsOptimiserAnalysisRefreshCreate) | **Post** /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/ | +[**SimulateTestExecutionsRerunCallsCreate**](SimulateAPI.md#SimulateTestExecutionsRerunCallsCreate) | **Post** /simulate/test-executions/{test_execution_id}/rerun-calls/ | + + + +## SimulateAgentDefinitionsDelete + +> AgentDefinitionBulkDeleteResponse SimulateAgentDefinitionsDelete(ctx).AgentDefinitionBulkDeleteRequest(agentDefinitionBulkDeleteRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentDefinitionBulkDeleteRequest := *openapiclient.NewAgentDefinitionBulkDeleteRequest([]string{"AgentIds_example"}) // AgentDefinitionBulkDeleteRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsDelete(context.Background()).AgentDefinitionBulkDeleteRequest(agentDefinitionBulkDeleteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsDelete`: AgentDefinitionBulkDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsDelete`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **agentDefinitionBulkDeleteRequest** | [**AgentDefinitionBulkDeleteRequest**](AgentDefinitionBulkDeleteRequest.md) | | + +### Return type + +[**AgentDefinitionBulkDeleteResponse**](AgentDefinitionBulkDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsActivateCreate + +> AgentVersionActivateResponse SimulateAgentDefinitionsVersionsActivateCreate(ctx, agentId, versionId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + versionId := "versionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsActivateCreate(context.Background(), agentId, versionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsActivateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsActivateCreate`: AgentVersionActivateResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsActivateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsActivateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | | + +### Return type + +[**AgentVersionActivateResponse**](AgentVersionActivateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsCallExecutionsList + +> []CallExecution SimulateAgentDefinitionsVersionsCallExecutionsList(ctx, agentId, versionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + versionId := "versionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsCallExecutionsList(context.Background(), agentId, versionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsCallExecutionsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsCallExecutionsList`: []CallExecution + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsCallExecutionsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsCallExecutionsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**[]CallExecution**](CallExecution.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsCreateCreate + +> AgentVersionCreateResponse SimulateAgentDefinitionsVersionsCreateCreate(ctx, agentId).AgentVersionCreateRequest(agentVersionCreateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + agentVersionCreateRequest := *openapiclient.NewAgentVersionCreateRequest() // AgentVersionCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsCreateCreate(context.Background(), agentId).AgentVersionCreateRequest(agentVersionCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsCreateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsCreateCreate`: AgentVersionCreateResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsCreateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsCreateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **agentVersionCreateRequest** | [**AgentVersionCreateRequest**](AgentVersionCreateRequest.md) | | + +### Return type + +[**AgentVersionCreateResponse**](AgentVersionCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsDeleteDelete + +> AgentVersionDeleteResponse SimulateAgentDefinitionsVersionsDeleteDelete(ctx, agentId, versionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + versionId := "versionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsDeleteDelete(context.Background(), agentId, versionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsDeleteDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsDeleteDelete`: AgentVersionDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsDeleteDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsDeleteDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**AgentVersionDeleteResponse**](AgentVersionDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsEvalSummaryList + +> EvalSummaryResponse SimulateAgentDefinitionsVersionsEvalSummaryList(ctx, agentId, versionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + versionId := "versionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsEvalSummaryList(context.Background(), agentId, versionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsEvalSummaryList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsEvalSummaryList`: EvalSummaryResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsEvalSummaryList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsEvalSummaryListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**EvalSummaryResponse**](EvalSummaryResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsList + +> []AgentVersionListResponse SimulateAgentDefinitionsVersionsList(ctx, agentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsList(context.Background(), agentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsList`: []AgentVersionListResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]AgentVersionListResponse**](AgentVersionListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsRead + +> AgentVersionResponse SimulateAgentDefinitionsVersionsRead(ctx, agentId, versionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + versionId := "versionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsRead(context.Background(), agentId, versionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsRead`: AgentVersionResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**AgentVersionResponse**](AgentVersionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateAgentDefinitionsVersionsRestoreCreate + +> AgentVersionRestoreResponse SimulateAgentDefinitionsVersionsRestoreCreate(ctx, agentId, versionId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + versionId := "versionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateAgentDefinitionsVersionsRestoreCreate(context.Background(), agentId, versionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateAgentDefinitionsVersionsRestoreCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateAgentDefinitionsVersionsRestoreCreate`: AgentVersionRestoreResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateAgentDefinitionsVersionsRestoreCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateAgentDefinitionsVersionsRestoreCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | | + +### Return type + +[**AgentVersionRestoreResponse**](AgentVersionRestoreResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiCallExecutionsList + +> []CallExecution SimulateApiCallExecutionsList(ctx).Search(search).Status(status).TestExecutionId(testExecutionId).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + search := "search_example" // string | (optional) (default to "") + status := "status_example" // string | (optional) (default to "") + testExecutionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiCallExecutionsList(context.Background()).Search(search).Status(status).TestExecutionId(testExecutionId).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiCallExecutionsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiCallExecutionsList`: []CallExecution + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiCallExecutionsList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiCallExecutionsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | | [default to ""] + **status** | **string** | | [default to ""] + **testExecutionId** | **string** | | + **page** | **int32** | | [default to 1] + **limit** | **int32** | | + +### Return type + +[**[]CallExecution**](CallExecution.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiPersonasDuplicate + +> PersonaDuplicateResponse SimulateApiPersonasDuplicate(ctx, id).PersonaDuplicateRequest(personaDuplicateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + personaDuplicateRequest := *openapiclient.NewPersonaDuplicateRequest("Name_example") // PersonaDuplicateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiPersonasDuplicate(context.Background(), id).PersonaDuplicateRequest(personaDuplicateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiPersonasDuplicate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiPersonasDuplicate`: PersonaDuplicateResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiPersonasDuplicate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiPersonasDuplicateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **personaDuplicateRequest** | [**PersonaDuplicateRequest**](PersonaDuplicateRequest.md) | | + +### Return type + +[**PersonaDuplicateResponse**](PersonaDuplicateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiPersonasDuplicateCreate + +> PersonaDuplicateResponse SimulateApiPersonasDuplicateCreate(ctx, personaId).PersonaDuplicateRequest(personaDuplicateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + personaId := "personaId_example" // string | + personaDuplicateRequest := *openapiclient.NewPersonaDuplicateRequest("Name_example") // PersonaDuplicateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiPersonasDuplicateCreate(context.Background(), personaId).PersonaDuplicateRequest(personaDuplicateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiPersonasDuplicateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiPersonasDuplicateCreate`: PersonaDuplicateResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiPersonasDuplicateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**personaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiPersonasDuplicateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **personaDuplicateRequest** | [**PersonaDuplicateRequest**](PersonaDuplicateRequest.md) | | + +### Return type + +[**PersonaDuplicateResponse**](PersonaDuplicateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiPersonasFieldOptions + +> SimulateApiPersonasFieldOptions200Response SimulateApiPersonasFieldOptions(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiPersonasFieldOptions(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiPersonasFieldOptions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiPersonasFieldOptions`: SimulateApiPersonasFieldOptions200Response + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiPersonasFieldOptions`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiPersonasFieldOptionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**SimulateApiPersonasFieldOptions200Response**](SimulateApiPersonasFieldOptions200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiPersonasSystemPersonas + +> SimulateApiPersonasSystemPersonas200Response SimulateApiPersonasSystemPersonas(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiPersonasSystemPersonas(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiPersonasSystemPersonas``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiPersonasSystemPersonas`: SimulateApiPersonasSystemPersonas200Response + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiPersonasSystemPersonas`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiPersonasSystemPersonasRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**SimulateApiPersonasSystemPersonas200Response**](SimulateApiPersonasSystemPersonas200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiPersonasUpdate + +> Persona SimulateApiPersonasUpdate(ctx, id).Persona(persona).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + persona := *openapiclient.NewPersona("Name_example") // Persona | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiPersonasUpdate(context.Background(), id).Persona(persona).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiPersonasUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiPersonasUpdate`: Persona + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiPersonasUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiPersonasUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **persona** | [**Persona**](Persona.md) | | + +### Return type + +[**Persona**](Persona.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiPersonasWorkspacePersonas + +> SimulateApiPersonasSystemPersonas200Response SimulateApiPersonasWorkspacePersonas(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiPersonasWorkspacePersonas(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiPersonasWorkspacePersonas``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiPersonasWorkspacePersonas`: SimulateApiPersonasSystemPersonas200Response + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiPersonasWorkspacePersonas`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiPersonasWorkspacePersonasRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**SimulateApiPersonasSystemPersonas200Response**](SimulateApiPersonasSystemPersonas200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateApiRunTestsList + +> []RunTestResponse SimulateApiRunTestsList(ctx).Search(search).SimulationType(simulationType).PromptTemplateId(promptTemplateId).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + search := "search_example" // string | (optional) (default to "") + simulationType := "simulationType_example" // string | (optional) + promptTemplateId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateApiRunTestsList(context.Background()).Search(search).SimulationType(simulationType).PromptTemplateId(promptTemplateId).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateApiRunTestsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateApiRunTestsList`: []RunTestResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateApiRunTestsList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateApiRunTestsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | | [default to ""] + **simulationType** | **string** | | + **promptTemplateId** | **string** | | + **page** | **int32** | | [default to 1] + **limit** | **int32** | | + +### Return type + +[**[]RunTestResponse**](RunTestResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsBranchAnalysisCreate + +> CallBranchDeviationCreateResponse SimulateCallExecutionsBranchAnalysisCreate(ctx, callExecutionId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsBranchAnalysisCreate(context.Background(), callExecutionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsBranchAnalysisCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsBranchAnalysisCreate`: CallBranchDeviationCreateResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsBranchAnalysisCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsBranchAnalysisCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**CallBranchDeviationCreateResponse**](CallBranchDeviationCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsBranchAnalysisList + +> CallBranchAnalysisResponse SimulateCallExecutionsBranchAnalysisList(ctx, callExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsBranchAnalysisList(context.Background(), callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsBranchAnalysisList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsBranchAnalysisList`: CallBranchAnalysisResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsBranchAnalysisList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsBranchAnalysisListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CallBranchAnalysisResponse**](CallBranchAnalysisResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsChatSendMessageCreate + +> ChatSendMessageResponse SimulateCallExecutionsChatSendMessageCreate(ctx, callExecutionId).SendChatRequest(sendChatRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + sendChatRequest := *openapiclient.NewSendChatRequest() // SendChatRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsChatSendMessageCreate(context.Background(), callExecutionId).SendChatRequest(sendChatRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsChatSendMessageCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsChatSendMessageCreate`: ChatSendMessageResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsChatSendMessageCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsChatSendMessageCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **sendChatRequest** | [**SendChatRequest**](SendChatRequest.md) | | + +### Return type + +[**ChatSendMessageResponse**](ChatSendMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsDeleteDelete + +> CallExecutionDeleteResponse SimulateCallExecutionsDeleteDelete(ctx, callExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsDeleteDelete(context.Background(), callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsDeleteDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsDeleteDelete`: CallExecutionDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsDeleteDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsDeleteDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CallExecutionDeleteResponse**](CallExecutionDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsErrorLocalizerTasksList + +> CallExecutionErrorLocalizerTasksResponse SimulateCallExecutionsErrorLocalizerTasksList(ctx, callExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsErrorLocalizerTasksList(context.Background(), callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsErrorLocalizerTasksList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsErrorLocalizerTasksList`: CallExecutionErrorLocalizerTasksResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsErrorLocalizerTasksList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsErrorLocalizerTasksListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CallExecutionErrorLocalizerTasksResponse**](CallExecutionErrorLocalizerTasksResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsLogsList + +> CallExecutionLogsResponse SimulateCallExecutionsLogsList(ctx, callExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsLogsList(context.Background(), callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsLogsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsLogsList`: CallExecutionLogsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsLogsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsLogsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CallExecutionLogsResponse**](CallExecutionLogsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsPartialUpdate + +> CallExecution SimulateCallExecutionsPartialUpdate(ctx, callExecutionId).CallExecutionStatusUpdate(callExecutionStatusUpdate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + callExecutionStatusUpdate := *openapiclient.NewCallExecutionStatusUpdate("Status_example") // CallExecutionStatusUpdate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsPartialUpdate(context.Background(), callExecutionId).CallExecutionStatusUpdate(callExecutionStatusUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsPartialUpdate`: CallExecution + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **callExecutionStatusUpdate** | [**CallExecutionStatusUpdate**](CallExecutionStatusUpdate.md) | | + +### Return type + +[**CallExecution**](CallExecution.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsRead + +> CallExecutionDetail SimulateCallExecutionsRead(ctx, callExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsRead(context.Background(), callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsRead`: CallExecutionDetail + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CallExecutionDetail**](CallExecutionDetail.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsSessionComparisonList + +> SessionComparisonResponse SimulateCallExecutionsSessionComparisonList(ctx, callExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsSessionComparisonList(context.Background(), callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsSessionComparisonList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsSessionComparisonList`: SessionComparisonResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsSessionComparisonList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsSessionComparisonListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**SessionComparisonResponse**](SessionComparisonResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateCallExecutionsTranscriptsList + +> CallTranscriptResponse SimulateCallExecutionsTranscriptsList(ctx, callExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + callExecutionId := "callExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateCallExecutionsTranscriptsList(context.Background(), callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateCallExecutionsTranscriptsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateCallExecutionsTranscriptsList`: CallTranscriptResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateCallExecutionsTranscriptsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**callExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateCallExecutionsTranscriptsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CallTranscriptResponse**](CallTranscriptResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateExportRead + +> *os.File SimulateExportRead(ctx, itemId).Type_(type_).Search(search).Status(status).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + itemId := "itemId_example" // string | + type_ := "type__example" // string | Export source type. + search := "search_example" // string | Optional call-execution search term. (optional) + status := "status_example" // string | Optional call-execution status filter. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateExportRead(context.Background(), itemId).Type_(type_).Search(search).Status(status).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateExportRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateExportRead`: *os.File + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateExportRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**itemId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateExportReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **type_** | **string** | Export source type. | + **search** | **string** | Optional call-execution search term. | + **status** | **string** | Optional call-execution status filter. | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulatePromptSimulationsScenariosList + +> PromptSimulationScenariosResponse SimulatePromptSimulationsScenariosList(ctx).Execute() + +Get list of scenarios available for prompt simulations. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulatePromptSimulationsScenariosList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulatePromptSimulationsScenariosList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulatePromptSimulationsScenariosList`: PromptSimulationScenariosResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulatePromptSimulationsScenariosList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulatePromptSimulationsScenariosListRequest struct via the builder pattern + + +### Return type + +[**PromptSimulationScenariosResponse**](PromptSimulationScenariosResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulatePromptTemplatesSimulationsCreate + +> PromptSimulationRunResponse SimulatePromptTemplatesSimulationsCreate(ctx, promptTemplateId).CreatePromptSimulationRequest(createPromptSimulationRequest).Execute() + +Create a new prompt-based simulation run. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplateId := "promptTemplateId_example" // string | + createPromptSimulationRequest := *openapiclient.NewCreatePromptSimulationRequest("Name_example", "PromptVersionId_example", []string{"ScenarioIds_example"}) // CreatePromptSimulationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulatePromptTemplatesSimulationsCreate(context.Background(), promptTemplateId).CreatePromptSimulationRequest(createPromptSimulationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulatePromptTemplatesSimulationsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulatePromptTemplatesSimulationsCreate`: PromptSimulationRunResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulatePromptTemplatesSimulationsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptTemplateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulatePromptTemplatesSimulationsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createPromptSimulationRequest** | [**CreatePromptSimulationRequest**](CreatePromptSimulationRequest.md) | | + +### Return type + +[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulatePromptTemplatesSimulationsDelete + +> SimulatePromptTemplatesSimulationsDelete(ctx, promptTemplateId, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplateId := "promptTemplateId_example" // string | + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SimulateAPI.SimulatePromptTemplatesSimulationsDelete(context.Background(), promptTemplateId, runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulatePromptTemplatesSimulationsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptTemplateId** | **string** | | +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulatePromptTemplatesSimulationsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulatePromptTemplatesSimulationsExecuteCreate + +> ExecutePromptSimulationResponse SimulatePromptTemplatesSimulationsExecuteCreate(ctx, promptTemplateId, runTestId).ExecutePromptSimulationRequest(executePromptSimulationRequest).Execute() + +Execute a prompt-based simulation run. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplateId := "promptTemplateId_example" // string | + runTestId := "runTestId_example" // string | + executePromptSimulationRequest := *openapiclient.NewExecutePromptSimulationRequest() // ExecutePromptSimulationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulatePromptTemplatesSimulationsExecuteCreate(context.Background(), promptTemplateId, runTestId).ExecutePromptSimulationRequest(executePromptSimulationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulatePromptTemplatesSimulationsExecuteCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulatePromptTemplatesSimulationsExecuteCreate`: ExecutePromptSimulationResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulatePromptTemplatesSimulationsExecuteCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptTemplateId** | **string** | | +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulatePromptTemplatesSimulationsExecuteCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **executePromptSimulationRequest** | [**ExecutePromptSimulationRequest**](ExecutePromptSimulationRequest.md) | | + +### Return type + +[**ExecutePromptSimulationResponse**](ExecutePromptSimulationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulatePromptTemplatesSimulationsList + +> PromptSimulationListResponse SimulatePromptTemplatesSimulationsList(ctx, promptTemplateId).Execute() + +Get paginated list of simulation runs for a specific prompt template. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplateId := "promptTemplateId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulatePromptTemplatesSimulationsList(context.Background(), promptTemplateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulatePromptTemplatesSimulationsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulatePromptTemplatesSimulationsList`: PromptSimulationListResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulatePromptTemplatesSimulationsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptTemplateId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulatePromptTemplatesSimulationsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PromptSimulationListResponse**](PromptSimulationListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulatePromptTemplatesSimulationsPartialUpdate + +> PromptSimulationRunResponse SimulatePromptTemplatesSimulationsPartialUpdate(ctx, promptTemplateId, runTestId).PromptSimulationUpdateRequest(promptSimulationUpdateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplateId := "promptTemplateId_example" // string | + runTestId := "runTestId_example" // string | + promptSimulationUpdateRequest := *openapiclient.NewPromptSimulationUpdateRequest() // PromptSimulationUpdateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulatePromptTemplatesSimulationsPartialUpdate(context.Background(), promptTemplateId, runTestId).PromptSimulationUpdateRequest(promptSimulationUpdateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulatePromptTemplatesSimulationsPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulatePromptTemplatesSimulationsPartialUpdate`: PromptSimulationRunResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulatePromptTemplatesSimulationsPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptTemplateId** | **string** | | +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulatePromptTemplatesSimulationsPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **promptSimulationUpdateRequest** | [**PromptSimulationUpdateRequest**](PromptSimulationUpdateRequest.md) | | + +### Return type + +[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulatePromptTemplatesSimulationsRead + +> PromptSimulationRunResponse SimulatePromptTemplatesSimulationsRead(ctx, promptTemplateId, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + promptTemplateId := "promptTemplateId_example" // string | + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulatePromptTemplatesSimulationsRead(context.Background(), promptTemplateId, runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulatePromptTemplatesSimulationsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulatePromptTemplatesSimulationsRead`: PromptSimulationRunResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulatePromptTemplatesSimulationsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**promptTemplateId** | **string** | | +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulatePromptTemplatesSimulationsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsActiveList + +> AllActiveTests SimulateRunTestsActiveList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsActiveList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsActiveList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsActiveList`: AllActiveTests + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsActiveList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsActiveListRequest struct via the builder pattern + + +### Return type + +[**AllActiveTests**](AllActiveTests.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsChatExecuteCreate + +> RunTestChatExecutionResponse SimulateRunTestsChatExecuteCreate(ctx, runTestId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsChatExecuteCreate(context.Background(), runTestId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsChatExecuteCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsChatExecuteCreate`: RunTestChatExecutionResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsChatExecuteCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsChatExecuteCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**RunTestChatExecutionResponse**](RunTestChatExecutionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsComponentsPartialUpdate + +> RunTestResponse SimulateRunTestsComponentsPartialUpdate(ctx, runTestId).RunTestComponentsUpdate(runTestComponentsUpdate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + runTestComponentsUpdate := *openapiclient.NewRunTestComponentsUpdate() // RunTestComponentsUpdate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsComponentsPartialUpdate(context.Background(), runTestId).RunTestComponentsUpdate(runTestComponentsUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsComponentsPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsComponentsPartialUpdate`: RunTestResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsComponentsPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsComponentsPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **runTestComponentsUpdate** | [**RunTestComponentsUpdate**](RunTestComponentsUpdate.md) | | + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsDeleteDelete + +> SimulateRunTestsDeleteDelete(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SimulateAPI.SimulateRunTestsDeleteDelete(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsDeleteDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsDeleteDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsDeleteTestExecutionsCreate + +> TestExecutionBulkDeleteResponse SimulateRunTestsDeleteTestExecutionsCreate(ctx, runTestId).TestExecutionBulkDelete(testExecutionBulkDelete).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + testExecutionBulkDelete := *openapiclient.NewTestExecutionBulkDelete() // TestExecutionBulkDelete | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsDeleteTestExecutionsCreate(context.Background(), runTestId).TestExecutionBulkDelete(testExecutionBulkDelete).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsDeleteTestExecutionsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsDeleteTestExecutionsCreate`: TestExecutionBulkDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsDeleteTestExecutionsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsDeleteTestExecutionsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **testExecutionBulkDelete** | [**TestExecutionBulkDelete**](TestExecutionBulkDelete.md) | | + +### Return type + +[**TestExecutionBulkDeleteResponse**](TestExecutionBulkDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsEvalConfigsGetStructureList + +> EvalConfigStructureResponse SimulateRunTestsEvalConfigsGetStructureList(ctx, runTestId, evalConfigId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + evalConfigId := "evalConfigId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsEvalConfigsGetStructureList(context.Background(), runTestId, evalConfigId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsEvalConfigsGetStructureList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsEvalConfigsGetStructureList`: EvalConfigStructureResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsEvalConfigsGetStructureList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | +**evalConfigId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsEvalConfigsGetStructureListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**EvalConfigStructureResponse**](EvalConfigStructureResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsGetIdByNameRead + +> RunTestNameResponse SimulateRunTestsGetIdByNameRead(ctx, runTestName).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestName := "runTestName_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsGetIdByNameRead(context.Background(), runTestName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsGetIdByNameRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsGetIdByNameRead`: RunTestNameResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsGetIdByNameRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestName** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsGetIdByNameReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RunTestNameResponse**](RunTestNameResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsRerunTestExecutionsCreate + +> TestExecutionRerunResponse SimulateRunTestsRerunTestExecutionsCreate(ctx, runTestId).TestExecutionRerun(testExecutionRerun).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + testExecutionRerun := *openapiclient.NewTestExecutionRerun("RerunType_example") // TestExecutionRerun | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsRerunTestExecutionsCreate(context.Background(), runTestId).TestExecutionRerun(testExecutionRerun).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsRerunTestExecutionsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsRerunTestExecutionsCreate`: TestExecutionRerunResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsRerunTestExecutionsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsRerunTestExecutionsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **testExecutionRerun** | [**TestExecutionRerun**](TestExecutionRerun.md) | | + +### Return type + +[**TestExecutionRerunResponse**](TestExecutionRerunResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsScenariosList + +> []RunTestScenarioItemResponse SimulateRunTestsScenariosList(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsScenariosList(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsScenariosList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsScenariosList`: []RunTestScenarioItemResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsScenariosList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsScenariosListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]RunTestScenarioItemResponse**](RunTestScenarioItemResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateRunTestsSdkCodeList + +> ChatSDKCodeResponse SimulateRunTestsSdkCodeList(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateRunTestsSdkCodeList(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateRunTestsSdkCodeList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateRunTestsSdkCodeList`: ChatSDKCodeResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateRunTestsSdkCodeList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateRunTestsSdkCodeListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ChatSDKCodeResponse**](ChatSDKCodeResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateSimulatorAgentsCreateCreate + +> SimulatorAgent SimulateSimulatorAgentsCreateCreate(ctx).SimulatorAgent(simulatorAgent).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + simulatorAgent := *openapiclient.NewSimulatorAgent("Name_example", "Prompt_example", "VoiceProvider_example", "VoiceName_example", "Model_example") // SimulatorAgent | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateSimulatorAgentsCreateCreate(context.Background()).SimulatorAgent(simulatorAgent).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateSimulatorAgentsCreateCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateSimulatorAgentsCreateCreate`: SimulatorAgent + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateSimulatorAgentsCreateCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateSimulatorAgentsCreateCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **simulatorAgent** | [**SimulatorAgent**](SimulatorAgent.md) | | + +### Return type + +[**SimulatorAgent**](SimulatorAgent.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateSimulatorAgentsDeleteDelete + +> SimulatorAgentDeleteResponse SimulateSimulatorAgentsDeleteDelete(ctx, agentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateSimulatorAgentsDeleteDelete(context.Background(), agentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateSimulatorAgentsDeleteDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateSimulatorAgentsDeleteDelete`: SimulatorAgentDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateSimulatorAgentsDeleteDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateSimulatorAgentsDeleteDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**SimulatorAgentDeleteResponse**](SimulatorAgentDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateSimulatorAgentsEditUpdate + +> SimulatorAgent SimulateSimulatorAgentsEditUpdate(ctx, agentId).SimulatorAgent(simulatorAgent).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + simulatorAgent := *openapiclient.NewSimulatorAgent("Name_example", "Prompt_example", "VoiceProvider_example", "VoiceName_example", "Model_example") // SimulatorAgent | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateSimulatorAgentsEditUpdate(context.Background(), agentId).SimulatorAgent(simulatorAgent).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateSimulatorAgentsEditUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateSimulatorAgentsEditUpdate`: SimulatorAgent + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateSimulatorAgentsEditUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateSimulatorAgentsEditUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **simulatorAgent** | [**SimulatorAgent**](SimulatorAgent.md) | | + +### Return type + +[**SimulatorAgent**](SimulatorAgent.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateSimulatorAgentsList + +> SimulatorAgentListResponse SimulateSimulatorAgentsList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateSimulatorAgentsList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateSimulatorAgentsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateSimulatorAgentsList`: SimulatorAgentListResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateSimulatorAgentsList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateSimulatorAgentsListRequest struct via the builder pattern + + +### Return type + +[**SimulatorAgentListResponse**](SimulatorAgentListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateSimulatorAgentsRead + +> SimulatorAgent SimulateSimulatorAgentsRead(ctx, agentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateSimulatorAgentsRead(context.Background(), agentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateSimulatorAgentsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateSimulatorAgentsRead`: SimulatorAgent + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateSimulatorAgentsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateSimulatorAgentsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**SimulatorAgent**](SimulatorAgent.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsChatCallExecutionsBatchCreate + +> TestExecutionChatBatchResponse SimulateTestExecutionsChatCallExecutionsBatchCreate(ctx, testExecutionId).Body(body).Execute() + +Create a batch of CallExecution records for chat execution (exactly 10 per API call). + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateTestExecutionsChatCallExecutionsBatchCreate(context.Background(), testExecutionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsChatCallExecutionsBatchCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateTestExecutionsChatCallExecutionsBatchCreate`: TestExecutionChatBatchResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateTestExecutionsChatCallExecutionsBatchCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsChatCallExecutionsBatchCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**TestExecutionChatBatchResponse**](TestExecutionChatBatchResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsColumnOrderUpdate + +> TestExecutionColumnOrderResponse SimulateTestExecutionsColumnOrderUpdate(ctx, testExecutionId).TestExecutionColumnOrder(testExecutionColumnOrder).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + testExecutionColumnOrder := *openapiclient.NewTestExecutionColumnOrder([]openapiclient.ColumnOrder{*openapiclient.NewColumnOrder("ColumnName_example", "Id_example", false)}) // TestExecutionColumnOrder | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateTestExecutionsColumnOrderUpdate(context.Background(), testExecutionId).TestExecutionColumnOrder(testExecutionColumnOrder).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsColumnOrderUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateTestExecutionsColumnOrderUpdate`: TestExecutionColumnOrderResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateTestExecutionsColumnOrderUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsColumnOrderUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **testExecutionColumnOrder** | [**TestExecutionColumnOrder**](TestExecutionColumnOrder.md) | | + +### Return type + +[**TestExecutionColumnOrderResponse**](TestExecutionColumnOrderResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsDeleteDelete + +> SimulateTestExecutionsDeleteDelete(ctx, testExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SimulateAPI.SimulateTestExecutionsDeleteDelete(context.Background(), testExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsDeleteDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsDeleteDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsEvalExplanationSummaryList + +> EvalExplanationSummaryResponse SimulateTestExecutionsEvalExplanationSummaryList(ctx, testExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateTestExecutionsEvalExplanationSummaryList(context.Background(), testExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsEvalExplanationSummaryList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateTestExecutionsEvalExplanationSummaryList`: EvalExplanationSummaryResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateTestExecutionsEvalExplanationSummaryList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsEvalExplanationSummaryListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**EvalExplanationSummaryResponse**](EvalExplanationSummaryResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsEvalExplanationSummaryRefreshCreate + +> EvalExplanationSummaryRefreshResponse SimulateTestExecutionsEvalExplanationSummaryRefreshCreate(ctx, testExecutionId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateTestExecutionsEvalExplanationSummaryRefreshCreate(context.Background(), testExecutionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsEvalExplanationSummaryRefreshCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateTestExecutionsEvalExplanationSummaryRefreshCreate`: EvalExplanationSummaryRefreshResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateTestExecutionsEvalExplanationSummaryRefreshCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsEvalExplanationSummaryRefreshCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**EvalExplanationSummaryRefreshResponse**](EvalExplanationSummaryRefreshResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsOptimiserAnalysisList + +> OptimiserAnalysisResponse SimulateTestExecutionsOptimiserAnalysisList(ctx, testExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateTestExecutionsOptimiserAnalysisList(context.Background(), testExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsOptimiserAnalysisList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateTestExecutionsOptimiserAnalysisList`: OptimiserAnalysisResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateTestExecutionsOptimiserAnalysisList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsOptimiserAnalysisListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**OptimiserAnalysisResponse**](OptimiserAnalysisResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsOptimiserAnalysisRefreshCreate + +> OptimiserAnalysisRefreshResponse SimulateTestExecutionsOptimiserAnalysisRefreshCreate(ctx, testExecutionId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateTestExecutionsOptimiserAnalysisRefreshCreate(context.Background(), testExecutionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsOptimiserAnalysisRefreshCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateTestExecutionsOptimiserAnalysisRefreshCreate`: OptimiserAnalysisRefreshResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateTestExecutionsOptimiserAnalysisRefreshCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsOptimiserAnalysisRefreshCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**OptimiserAnalysisRefreshResponse**](OptimiserAnalysisRefreshResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SimulateTestExecutionsRerunCallsCreate + +> RerunCallsResponse SimulateTestExecutionsRerunCallsCreate(ctx, testExecutionId).CallExecutionRerun(callExecutionRerun).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + callExecutionRerun := *openapiclient.NewCallExecutionRerun("RerunType_example") // CallExecutionRerun | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulateAPI.SimulateTestExecutionsRerunCallsCreate(context.Background(), testExecutionId).CallExecutionRerun(callExecutionRerun).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulateAPI.SimulateTestExecutionsRerunCallsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SimulateTestExecutionsRerunCallsCreate`: RerunCallsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulateAPI.SimulateTestExecutionsRerunCallsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSimulateTestExecutionsRerunCallsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **callExecutionRerun** | [**CallExecutionRerun**](CallExecutionRerun.md) | | + +### Return type + +[**RerunCallsResponse**](RerunCallsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SimulationAgentDefinitionsAPI.md b/go/futureagi/docs/SimulationAgentDefinitionsAPI.md new file mode 100644 index 0000000..41d983e --- /dev/null +++ b/go/futureagi/docs/SimulationAgentDefinitionsAPI.md @@ -0,0 +1,365 @@ +# \SimulationAgentDefinitionsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAgentDefinition**](SimulationAgentDefinitionsAPI.md#CreateAgentDefinition) | **Post** /simulate/agent-definitions/create/ | +[**DeleteAgentDefinition**](SimulationAgentDefinitionsAPI.md#DeleteAgentDefinition) | **Delete** /simulate/agent-definitions/{agent_id}/delete/ | +[**GetAgentDefinition**](SimulationAgentDefinitionsAPI.md#GetAgentDefinition) | **Get** /simulate/agent-definitions/{agent_id}/ | +[**ListAgentDefinitions**](SimulationAgentDefinitionsAPI.md#ListAgentDefinitions) | **Get** /simulate/agent-definitions/ | +[**UpdateAgentDefinition**](SimulationAgentDefinitionsAPI.md#UpdateAgentDefinition) | **Put** /simulate/agent-definitions/{agent_id}/edit/ | + + + +## CreateAgentDefinition + +> AgentDefinitionCreateResponse CreateAgentDefinition(ctx).AgentDefinitionCreateRequest(agentDefinitionCreateRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentDefinitionCreateRequest := *openapiclient.NewAgentDefinitionCreateRequest("AgentName_example", "AgentType_example", "CommitMessage_example") // AgentDefinitionCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationAgentDefinitionsAPI.CreateAgentDefinition(context.Background()).AgentDefinitionCreateRequest(agentDefinitionCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationAgentDefinitionsAPI.CreateAgentDefinition``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAgentDefinition`: AgentDefinitionCreateResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationAgentDefinitionsAPI.CreateAgentDefinition`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAgentDefinitionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **agentDefinitionCreateRequest** | [**AgentDefinitionCreateRequest**](AgentDefinitionCreateRequest.md) | | + +### Return type + +[**AgentDefinitionCreateResponse**](AgentDefinitionCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAgentDefinition + +> AgentDefinitionDeleteResponse DeleteAgentDefinition(ctx, agentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationAgentDefinitionsAPI.DeleteAgentDefinition(context.Background(), agentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationAgentDefinitionsAPI.DeleteAgentDefinition``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteAgentDefinition`: AgentDefinitionDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationAgentDefinitionsAPI.DeleteAgentDefinition`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAgentDefinitionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AgentDefinitionDeleteResponse**](AgentDefinitionDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAgentDefinition + +> AgentDefinitionResponse GetAgentDefinition(ctx, agentId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationAgentDefinitionsAPI.GetAgentDefinition(context.Background(), agentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationAgentDefinitionsAPI.GetAgentDefinition``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAgentDefinition`: AgentDefinitionResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationAgentDefinitionsAPI.GetAgentDefinition`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAgentDefinitionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AgentDefinitionResponse**](AgentDefinitionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAgentDefinitions + +> []AgentDefinitionListResponse ListAgentDefinitions(ctx).Search(search).AgentType(agentType).AgentDefinitionId(agentDefinitionId).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + search := "search_example" // string | (optional) (default to "") + agentType := "agentType_example" // string | (optional) + agentDefinitionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationAgentDefinitionsAPI.ListAgentDefinitions(context.Background()).Search(search).AgentType(agentType).AgentDefinitionId(agentDefinitionId).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationAgentDefinitionsAPI.ListAgentDefinitions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAgentDefinitions`: []AgentDefinitionListResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationAgentDefinitionsAPI.ListAgentDefinitions`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAgentDefinitionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | | [default to ""] + **agentType** | **string** | | + **agentDefinitionId** | **string** | | + **page** | **int32** | | [default to 1] + **limit** | **int32** | | + +### Return type + +[**[]AgentDefinitionListResponse**](AgentDefinitionListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAgentDefinition + +> AgentDefinitionEditResponse UpdateAgentDefinition(ctx, agentId).AgentDefinitionEditRequest(agentDefinitionEditRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + agentId := "agentId_example" // string | + agentDefinitionEditRequest := *openapiclient.NewAgentDefinitionEditRequest() // AgentDefinitionEditRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationAgentDefinitionsAPI.UpdateAgentDefinition(context.Background(), agentId).AgentDefinitionEditRequest(agentDefinitionEditRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationAgentDefinitionsAPI.UpdateAgentDefinition``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAgentDefinition`: AgentDefinitionEditResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationAgentDefinitionsAPI.UpdateAgentDefinition`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**agentId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAgentDefinitionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **agentDefinitionEditRequest** | [**AgentDefinitionEditRequest**](AgentDefinitionEditRequest.md) | | + +### Return type + +[**AgentDefinitionEditResponse**](AgentDefinitionEditResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SimulationPersonasAPI.md b/go/futureagi/docs/SimulationPersonasAPI.md new file mode 100644 index 0000000..d3483bc --- /dev/null +++ b/go/futureagi/docs/SimulationPersonasAPI.md @@ -0,0 +1,357 @@ +# \SimulationPersonasAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatePersona**](SimulationPersonasAPI.md#CreatePersona) | **Post** /simulate/api/personas/ | +[**DeletePersona**](SimulationPersonasAPI.md#DeletePersona) | **Delete** /simulate/api/personas/{id}/ | +[**GetPersona**](SimulationPersonasAPI.md#GetPersona) | **Get** /simulate/api/personas/{id}/ | +[**ListPersonas**](SimulationPersonasAPI.md#ListPersonas) | **Get** /simulate/api/personas/ | +[**UpdatePersona**](SimulationPersonasAPI.md#UpdatePersona) | **Patch** /simulate/api/personas/{id}/ | + + + +## CreatePersona + +> PersonaCreate CreatePersona(ctx).PersonaCreate(personaCreate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + personaCreate := *openapiclient.NewPersonaCreate("Name_example", "Description_example") // PersonaCreate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationPersonasAPI.CreatePersona(context.Background()).PersonaCreate(personaCreate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationPersonasAPI.CreatePersona``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreatePersona`: PersonaCreate + fmt.Fprintf(os.Stdout, "Response from `SimulationPersonasAPI.CreatePersona`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreatePersonaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **personaCreate** | [**PersonaCreate**](PersonaCreate.md) | | + +### Return type + +[**PersonaCreate**](PersonaCreate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePersona + +> DeletePersona(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SimulationPersonasAPI.DeletePersona(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationPersonasAPI.DeletePersona``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeletePersonaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetPersona + +> Persona GetPersona(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationPersonasAPI.GetPersona(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationPersonasAPI.GetPersona``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetPersona`: Persona + fmt.Fprintf(os.Stdout, "Response from `SimulationPersonasAPI.GetPersona`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetPersonaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Persona**](Persona.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPersonas + +> ListPersonas200Response ListPersonas(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationPersonasAPI.ListPersonas(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationPersonasAPI.ListPersonas``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListPersonas`: ListPersonas200Response + fmt.Fprintf(os.Stdout, "Response from `SimulationPersonasAPI.ListPersonas`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListPersonasRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ListPersonas200Response**](ListPersonas200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePersona + +> Persona UpdatePersona(ctx, id).Persona(persona).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + persona := *openapiclient.NewPersona("Name_example") // Persona | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationPersonasAPI.UpdatePersona(context.Background(), id).Persona(persona).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationPersonasAPI.UpdatePersona``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdatePersona`: Persona + fmt.Fprintf(os.Stdout, "Response from `SimulationPersonasAPI.UpdatePersona`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePersonaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **persona** | [**Persona**](Persona.md) | | + +### Return type + +[**Persona**](Persona.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SimulationRunTestsAPI.md b/go/futureagi/docs/SimulationRunTestsAPI.md new file mode 100644 index 0000000..be3d445 --- /dev/null +++ b/go/futureagi/docs/SimulationRunTestsAPI.md @@ -0,0 +1,722 @@ +# \SimulationRunTestsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRunTest**](SimulationRunTestsAPI.md#CreateRunTest) | **Post** /simulate/run-tests/create/ | +[**DeleteRunTest**](SimulationRunTestsAPI.md#DeleteRunTest) | **Delete** /simulate/run-tests/{run_test_id}/ | +[**ExecuteRunTest**](SimulationRunTestsAPI.md#ExecuteRunTest) | **Post** /simulate/run-tests/{run_test_id}/execute/ | +[**GetRunTest**](SimulationRunTestsAPI.md#GetRunTest) | **Get** /simulate/run-tests/{run_test_id}/ | +[**GetRunTestAnalytics**](SimulationRunTestsAPI.md#GetRunTestAnalytics) | **Get** /simulate/run-tests/{run_test_id}/analytics/ | +[**GetRunTestStatus**](SimulationRunTestsAPI.md#GetRunTestStatus) | **Get** /simulate/run-tests/{run_test_id}/status/ | +[**ListRunTestCallExecutions**](SimulationRunTestsAPI.md#ListRunTestCallExecutions) | **Get** /simulate/run-tests/{run_test_id}/call-executions/ | +[**ListRunTestExecutions**](SimulationRunTestsAPI.md#ListRunTestExecutions) | **Get** /simulate/run-tests/{run_test_id}/executions/ | +[**ListRunTests**](SimulationRunTestsAPI.md#ListRunTests) | **Get** /simulate/run-tests/ | +[**UpdateRunTest**](SimulationRunTestsAPI.md#UpdateRunTest) | **Patch** /simulate/run-tests/{run_test_id}/ | + + + +## CreateRunTest + +> RunTestResponse CreateRunTest(ctx).CreateRunTest(createRunTest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + createRunTest := *openapiclient.NewCreateRunTest("Name_example", "AgentDefinitionId_example", []string{"ScenarioIds_example"}) // CreateRunTest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.CreateRunTest(context.Background()).CreateRunTest(createRunTest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.CreateRunTest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateRunTest`: RunTestResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.CreateRunTest`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRunTestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createRunTest** | [**CreateRunTest**](CreateRunTest.md) | | + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRunTest + +> RunTestMessageResponse DeleteRunTest(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.DeleteRunTest(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.DeleteRunTest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteRunTest`: RunTestMessageResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.DeleteRunTest`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRunTestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RunTestMessageResponse**](RunTestMessageResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExecuteRunTest + +> RunTestExecutionResponse ExecuteRunTest(ctx, runTestId).ExecuteRunTest(executeRunTest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + executeRunTest := *openapiclient.NewExecuteRunTest() // ExecuteRunTest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.ExecuteRunTest(context.Background(), runTestId).ExecuteRunTest(executeRunTest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.ExecuteRunTest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExecuteRunTest`: RunTestExecutionResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.ExecuteRunTest`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExecuteRunTestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **executeRunTest** | [**ExecuteRunTest**](ExecuteRunTest.md) | | + +### Return type + +[**RunTestExecutionResponse**](RunTestExecutionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRunTest + +> RunTestResponse GetRunTest(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.GetRunTest(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.GetRunTest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRunTest`: RunTestResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.GetRunTest`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRunTestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRunTestAnalytics + +> RunTestAnalytics GetRunTestAnalytics(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.GetRunTestAnalytics(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.GetRunTestAnalytics``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRunTestAnalytics`: RunTestAnalytics + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.GetRunTestAnalytics`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRunTestAnalyticsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RunTestAnalytics**](RunTestAnalytics.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRunTestStatus + +> TestExecutionStatusSummary GetRunTestStatus(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.GetRunTestStatus(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.GetRunTestStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRunTestStatus`: TestExecutionStatusSummary + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.GetRunTestStatus`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRunTestStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TestExecutionStatusSummary**](TestExecutionStatusSummary.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRunTestCallExecutions + +> RunTestCallExecutionsResponse ListRunTestCallExecutions(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.ListRunTestCallExecutions(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.ListRunTestCallExecutions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRunTestCallExecutions`: RunTestCallExecutionsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.ListRunTestCallExecutions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRunTestCallExecutionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RunTestCallExecutionsResponse**](RunTestCallExecutionsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRunTestExecutions + +> []TestExecutionItemResponse ListRunTestExecutions(ctx, runTestId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.ListRunTestExecutions(context.Background(), runTestId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.ListRunTestExecutions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRunTestExecutions`: []TestExecutionItemResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.ListRunTestExecutions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRunTestExecutionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]TestExecutionItemResponse**](TestExecutionItemResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRunTests + +> []RunTestResponse ListRunTests(ctx).Search(search).SimulationType(simulationType).PromptTemplateId(promptTemplateId).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + search := "search_example" // string | (optional) (default to "") + simulationType := "simulationType_example" // string | (optional) + promptTemplateId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.ListRunTests(context.Background()).Search(search).SimulationType(simulationType).PromptTemplateId(promptTemplateId).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.ListRunTests``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRunTests`: []RunTestResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.ListRunTests`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRunTestsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | | [default to ""] + **simulationType** | **string** | | + **promptTemplateId** | **string** | | + **page** | **int32** | | [default to 1] + **limit** | **int32** | | + +### Return type + +[**[]RunTestResponse**](RunTestResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRunTest + +> RunTestResponse UpdateRunTest(ctx, runTestId).UpdateRunTest(updateRunTest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestId := "runTestId_example" // string | + updateRunTest := *openapiclient.NewUpdateRunTest() // UpdateRunTest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationRunTestsAPI.UpdateRunTest(context.Background(), runTestId).UpdateRunTest(updateRunTest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationRunTestsAPI.UpdateRunTest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRunTest`: RunTestResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationRunTestsAPI.UpdateRunTest`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**runTestId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRunTestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateRunTest** | [**UpdateRunTest**](UpdateRunTest.md) | | + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SimulationScenariosAPI.md b/go/futureagi/docs/SimulationScenariosAPI.md new file mode 100644 index 0000000..59101be --- /dev/null +++ b/go/futureagi/docs/SimulationScenariosAPI.md @@ -0,0 +1,365 @@ +# \SimulationScenariosAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateScenario**](SimulationScenariosAPI.md#CreateScenario) | **Post** /simulate/scenarios/create/ | Create scenario +[**DeleteScenario**](SimulationScenariosAPI.md#DeleteScenario) | **Delete** /simulate/scenarios/{scenario_id}/delete/ | Delete scenario +[**GetScenario**](SimulationScenariosAPI.md#GetScenario) | **Get** /simulate/scenarios/{scenario_id}/ | Get scenario detail +[**ListScenarios**](SimulationScenariosAPI.md#ListScenarios) | **Get** /simulate/scenarios/ | List scenarios +[**UpdateScenario**](SimulationScenariosAPI.md#UpdateScenario) | **Put** /simulate/scenarios/{scenario_id}/edit/ | Edit scenario + + + +## CreateScenario + +> ScenarioCreateResponse CreateScenario(ctx).ScenarioCreateRequest(scenarioCreateRequest).Execute() + +Create scenario + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + scenarioCreateRequest := *openapiclient.NewScenarioCreateRequest("Name_example") // ScenarioCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationScenariosAPI.CreateScenario(context.Background()).ScenarioCreateRequest(scenarioCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationScenariosAPI.CreateScenario``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateScenario`: ScenarioCreateResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationScenariosAPI.CreateScenario`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateScenarioRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **scenarioCreateRequest** | [**ScenarioCreateRequest**](ScenarioCreateRequest.md) | | + +### Return type + +[**ScenarioCreateResponse**](ScenarioCreateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteScenario + +> ScenarioDeleteResponse DeleteScenario(ctx, scenarioId).Execute() + +Delete scenario + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + scenarioId := "scenarioId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationScenariosAPI.DeleteScenario(context.Background(), scenarioId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationScenariosAPI.DeleteScenario``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteScenario`: ScenarioDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationScenariosAPI.DeleteScenario`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scenarioId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteScenarioRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ScenarioDeleteResponse**](ScenarioDeleteResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetScenario + +> ScenarioDetailResponse GetScenario(ctx, scenarioId).Execute() + +Get scenario detail + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + scenarioId := "scenarioId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationScenariosAPI.GetScenario(context.Background(), scenarioId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationScenariosAPI.GetScenario``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetScenario`: ScenarioDetailResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationScenariosAPI.GetScenario`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scenarioId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetScenarioRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ScenarioDetailResponse**](ScenarioDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListScenarios + +> ScenarioListResponse ListScenarios(ctx).Search(search).AgentDefinitionId(agentDefinitionId).AgentType(agentType).Page(page).Limit(limit).Execute() + +List scenarios + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + search := "search_example" // string | (optional) (default to "") + agentDefinitionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + agentType := "agentType_example" // string | (optional) + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationScenariosAPI.ListScenarios(context.Background()).Search(search).AgentDefinitionId(agentDefinitionId).AgentType(agentType).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationScenariosAPI.ListScenarios``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListScenarios`: ScenarioListResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationScenariosAPI.ListScenarios`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListScenariosRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | | [default to ""] + **agentDefinitionId** | **string** | | + **agentType** | **string** | | + **page** | **int32** | | [default to 1] + **limit** | **int32** | | + +### Return type + +[**ScenarioListResponse**](ScenarioListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateScenario + +> ScenarioEditResponse UpdateScenario(ctx, scenarioId).ScenarioEditRequest(scenarioEditRequest).Execute() + +Edit scenario + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + scenarioId := "scenarioId_example" // string | + scenarioEditRequest := *openapiclient.NewScenarioEditRequest() // ScenarioEditRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationScenariosAPI.UpdateScenario(context.Background(), scenarioId).ScenarioEditRequest(scenarioEditRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationScenariosAPI.UpdateScenario``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateScenario`: ScenarioEditResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationScenariosAPI.UpdateScenario`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**scenarioId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateScenarioRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **scenarioEditRequest** | [**ScenarioEditRequest**](ScenarioEditRequest.md) | | + +### Return type + +[**ScenarioEditResponse**](ScenarioEditResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SimulationTestExecutionsAPI.md b/go/futureagi/docs/SimulationTestExecutionsAPI.md new file mode 100644 index 0000000..16ca78c --- /dev/null +++ b/go/futureagi/docs/SimulationTestExecutionsAPI.md @@ -0,0 +1,510 @@ +# \SimulationTestExecutionsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CancelTestExecution**](SimulationTestExecutionsAPI.md#CancelTestExecution) | **Post** /simulate/test-executions/{test_execution_id}/cancel/ | +[**GetTestExecution**](SimulationTestExecutionsAPI.md#GetTestExecution) | **Get** /simulate/test-executions/{test_execution_id}/ | +[**GetTestExecutionAnalytics**](SimulationTestExecutionsAPI.md#GetTestExecutionAnalytics) | **Get** /simulate/test-executions/{test_execution_id}/analytics/ | +[**GetTestExecutionKpis**](SimulationTestExecutionsAPI.md#GetTestExecutionKpis) | **Get** /simulate/test-executions/{test_execution_id}/kpis/ | +[**GetTestExecutionPerformanceSummary**](SimulationTestExecutionsAPI.md#GetTestExecutionPerformanceSummary) | **Get** /simulate/test-executions/{test_execution_id}/performance-summary/ | +[**GetTestExecutionTranscripts**](SimulationTestExecutionsAPI.md#GetTestExecutionTranscripts) | **Get** /simulate/test-executions/{test_execution_id}/transcripts/ | +[**ListTestExecutions**](SimulationTestExecutionsAPI.md#ListTestExecutions) | **Get** /simulate/api/test-executions/ | + + + +## CancelTestExecution + +> CancelTestExecutionResponse CancelTestExecution(ctx, testExecutionId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationTestExecutionsAPI.CancelTestExecution(context.Background(), testExecutionId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationTestExecutionsAPI.CancelTestExecution``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CancelTestExecution`: CancelTestExecutionResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationTestExecutionsAPI.CancelTestExecution`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCancelTestExecutionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**CancelTestExecutionResponse**](CancelTestExecutionResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTestExecution + +> TestExecutionDetailResponse GetTestExecution(ctx, testExecutionId).Search(search).Filters(filters).RowGroups(rowGroups).GroupKeys(groupKeys).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + search := "search_example" // string | (optional) (default to "") + filters := "filters_example" // string | (optional) (default to "[]") + rowGroups := "rowGroups_example" // string | (optional) (default to "[]") + groupKeys := "groupKeys_example" // string | (optional) (default to "[]") + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 30) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationTestExecutionsAPI.GetTestExecution(context.Background(), testExecutionId).Search(search).Filters(filters).RowGroups(rowGroups).GroupKeys(groupKeys).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationTestExecutionsAPI.GetTestExecution``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTestExecution`: TestExecutionDetailResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationTestExecutionsAPI.GetTestExecution`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTestExecutionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **search** | **string** | | [default to ""] + **filters** | **string** | | [default to "[]"] + **rowGroups** | **string** | | [default to "[]"] + **groupKeys** | **string** | | [default to "[]"] + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 30] + +### Return type + +[**TestExecutionDetailResponse**](TestExecutionDetailResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTestExecutionAnalytics + +> TestExecutionAnalytics GetTestExecutionAnalytics(ctx, testExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationTestExecutionsAPI.GetTestExecutionAnalytics(context.Background(), testExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationTestExecutionsAPI.GetTestExecutionAnalytics``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTestExecutionAnalytics`: TestExecutionAnalytics + fmt.Fprintf(os.Stdout, "Response from `SimulationTestExecutionsAPI.GetTestExecutionAnalytics`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTestExecutionAnalyticsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TestExecutionAnalytics**](TestExecutionAnalytics.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTestExecutionKpis + +> RunTestKPIsResponse GetTestExecutionKpis(ctx, testExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationTestExecutionsAPI.GetTestExecutionKpis(context.Background(), testExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationTestExecutionsAPI.GetTestExecutionKpis``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTestExecutionKpis`: RunTestKPIsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationTestExecutionsAPI.GetTestExecutionKpis`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTestExecutionKpisRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RunTestKPIsResponse**](RunTestKPIsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTestExecutionPerformanceSummary + +> PerformanceSummary GetTestExecutionPerformanceSummary(ctx, testExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationTestExecutionsAPI.GetTestExecutionPerformanceSummary(context.Background(), testExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationTestExecutionsAPI.GetTestExecutionPerformanceSummary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTestExecutionPerformanceSummary`: PerformanceSummary + fmt.Fprintf(os.Stdout, "Response from `SimulationTestExecutionsAPI.GetTestExecutionPerformanceSummary`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTestExecutionPerformanceSummaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PerformanceSummary**](PerformanceSummary.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTestExecutionTranscripts + +> TestExecutionTranscriptsResponse GetTestExecutionTranscripts(ctx, testExecutionId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + testExecutionId := "testExecutionId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationTestExecutionsAPI.GetTestExecutionTranscripts(context.Background(), testExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationTestExecutionsAPI.GetTestExecutionTranscripts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTestExecutionTranscripts`: TestExecutionTranscriptsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationTestExecutionsAPI.GetTestExecutionTranscripts`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**testExecutionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTestExecutionTranscriptsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TestExecutionTranscriptsResponse**](TestExecutionTranscriptsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTestExecutions + +> []TestExecution ListTestExecutions(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationTestExecutionsAPI.ListTestExecutions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationTestExecutionsAPI.ListTestExecutions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTestExecutions`: []TestExecution + fmt.Fprintf(os.Stdout, "Response from `SimulationTestExecutionsAPI.ListTestExecutions`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTestExecutionsRequest struct via the builder pattern + + +### Return type + +[**[]TestExecution**](TestExecution.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/SimulationsAPI.md b/go/futureagi/docs/SimulationsAPI.md new file mode 100644 index 0000000..b85e54c --- /dev/null +++ b/go/futureagi/docs/SimulationsAPI.md @@ -0,0 +1,227 @@ +# \SimulationsAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSimulationAnalytics**](SimulationsAPI.md#GetSimulationAnalytics) | **Get** /sdk/api/v1/simulation/analytics/ | GET /simulation/analytics/ +[**ListSimulationMetrics**](SimulationsAPI.md#ListSimulationMetrics) | **Get** /sdk/api/v1/simulation/metrics/ | GET /simulation/metrics/ +[**ListSimulationRuns**](SimulationsAPI.md#ListSimulationRuns) | **Get** /sdk/api/v1/simulation/runs/ | GET /simulation/runs/ + + + +## GetSimulationAnalytics + +> SDKSimulationAnalyticsResponse GetSimulationAnalytics(ctx).RunTestName(runTestName).ExecutionId(executionId).EvalName(evalName).Summary(summary).Execute() + +GET /simulation/analytics/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestName := "runTestName_example" // string | (optional) + executionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + evalName := "evalName_example" // string | (optional) + summary := true // bool | (optional) (default to true) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationsAPI.GetSimulationAnalytics(context.Background()).RunTestName(runTestName).ExecutionId(executionId).EvalName(evalName).Summary(summary).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationsAPI.GetSimulationAnalytics``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetSimulationAnalytics`: SDKSimulationAnalyticsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationsAPI.GetSimulationAnalytics`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetSimulationAnalyticsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **runTestName** | **string** | | + **executionId** | **string** | | + **evalName** | **string** | | + **summary** | **bool** | | [default to true] + +### Return type + +[**SDKSimulationAnalyticsResponse**](SDKSimulationAnalyticsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSimulationMetrics + +> SDKSimulationMetricsResponse ListSimulationMetrics(ctx).RunTestName(runTestName).ExecutionId(executionId).CallExecutionId(callExecutionId).Execute() + +GET /simulation/metrics/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestName := "runTestName_example" // string | (optional) + executionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + callExecutionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationsAPI.ListSimulationMetrics(context.Background()).RunTestName(runTestName).ExecutionId(executionId).CallExecutionId(callExecutionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationsAPI.ListSimulationMetrics``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListSimulationMetrics`: SDKSimulationMetricsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationsAPI.ListSimulationMetrics`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListSimulationMetricsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **runTestName** | **string** | | + **executionId** | **string** | | + **callExecutionId** | **string** | | + +### Return type + +[**SDKSimulationMetricsResponse**](SDKSimulationMetricsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSimulationRuns + +> SDKSimulationRunsResponse ListSimulationRuns(ctx).RunTestName(runTestName).ExecutionId(executionId).CallExecutionId(callExecutionId).EvalName(evalName).Summary(summary).Execute() + +GET /simulation/runs/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + runTestName := "runTestName_example" // string | (optional) + executionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + callExecutionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + evalName := "evalName_example" // string | (optional) + summary := true // bool | (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SimulationsAPI.ListSimulationRuns(context.Background()).RunTestName(runTestName).ExecutionId(executionId).CallExecutionId(callExecutionId).EvalName(evalName).Summary(summary).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SimulationsAPI.ListSimulationRuns``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListSimulationRuns`: SDKSimulationRunsResponse + fmt.Fprintf(os.Stdout, "Response from `SimulationsAPI.ListSimulationRuns`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListSimulationRunsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **runTestName** | **string** | | + **executionId** | **string** | | + **callExecutionId** | **string** | | + **evalName** | **string** | | + **summary** | **bool** | | [default to false] + +### Return type + +[**SDKSimulationRunsResponse**](SDKSimulationRunsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/TracerAPI.md b/go/futureagi/docs/TracerAPI.md new file mode 100644 index 0000000..f38d491 --- /dev/null +++ b/go/futureagi/docs/TracerAPI.md @@ -0,0 +1,3133 @@ +# \TracerAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TracerFeedIssuesCreateLinearIssueCreate**](TracerAPI.md#TracerFeedIssuesCreateLinearIssueCreate) | **Post** /tracer/feed/issues/{cluster_id}/create-linear-issue/ | +[**TracerFeedIssuesDeepAnalysisCreate**](TracerAPI.md#TracerFeedIssuesDeepAnalysisCreate) | **Post** /tracer/feed/issues/{cluster_id}/deep-analysis/ | +[**TracerFeedIssuesOverviewList**](TracerAPI.md#TracerFeedIssuesOverviewList) | **Get** /tracer/feed/issues/{cluster_id}/overview/ | +[**TracerFeedIssuesPartialUpdate**](TracerAPI.md#TracerFeedIssuesPartialUpdate) | **Patch** /tracer/feed/issues/{cluster_id}/ | +[**TracerFeedIssuesRootCauseList**](TracerAPI.md#TracerFeedIssuesRootCauseList) | **Get** /tracer/feed/issues/{cluster_id}/root-cause/ | GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X +[**TracerFeedIssuesSidebarList**](TracerAPI.md#TracerFeedIssuesSidebarList) | **Get** /tracer/feed/issues/{cluster_id}/sidebar/ | GET /tracer/feed/issues/{cluster_id}/sidebar/ +[**TracerFeedIssuesTracesList**](TracerAPI.md#TracerFeedIssuesTracesList) | **Get** /tracer/feed/issues/{cluster_id}/traces/ | +[**TracerFeedIssuesTrendsList**](TracerAPI.md#TracerFeedIssuesTrendsList) | **Get** /tracer/feed/issues/{cluster_id}/trends/ | +[**TracerTraceAgentGraph**](TracerAPI.md#TracerTraceAgentGraph) | **Get** /tracer/trace/agent_graph/ | Return the aggregate agent graph for a project. +[**TracerTraceAnnotationCreate**](TracerAPI.md#TracerTraceAnnotationCreate) | **Post** /tracer/trace-annotation/ | +[**TracerTraceAnnotationDelete**](TracerAPI.md#TracerTraceAnnotationDelete) | **Delete** /tracer/trace-annotation/{id}/ | +[**TracerTraceAnnotationGetAnnotationValues**](TracerAPI.md#TracerTraceAnnotationGetAnnotationValues) | **Get** /tracer/trace-annotation/get_annotation_values/ | +[**TracerTraceAnnotationList**](TracerAPI.md#TracerTraceAnnotationList) | **Get** /tracer/trace-annotation/ | +[**TracerTraceAnnotationPartialUpdate**](TracerAPI.md#TracerTraceAnnotationPartialUpdate) | **Patch** /tracer/trace-annotation/{id}/ | +[**TracerTraceAnnotationRead**](TracerAPI.md#TracerTraceAnnotationRead) | **Get** /tracer/trace-annotation/{id}/ | +[**TracerTraceAnnotationUpdate**](TracerAPI.md#TracerTraceAnnotationUpdate) | **Put** /tracer/trace-annotation/{id}/ | +[**TracerTraceBulkCreate**](TracerAPI.md#TracerTraceBulkCreate) | **Post** /tracer/trace/bulk_create/ | +[**TracerTraceCompareTraces**](TracerAPI.md#TracerTraceCompareTraces) | **Post** /tracer/trace/compare_traces/ | +[**TracerTraceCreate**](TracerAPI.md#TracerTraceCreate) | **Post** /tracer/trace/ | +[**TracerTraceDelete**](TracerAPI.md#TracerTraceDelete) | **Delete** /tracer/trace/{id}/ | +[**TracerTraceGetEvalNames**](TracerAPI.md#TracerTraceGetEvalNames) | **Get** /tracer/trace/get_eval_names/ | +[**TracerTraceGetTraceExportData**](TracerAPI.md#TracerTraceGetTraceExportData) | **Get** /tracer/trace/get_trace_export_data/ | +[**TracerTraceGetTraceIdByIndex**](TracerAPI.md#TracerTraceGetTraceIdByIndex) | **Get** /tracer/trace/get_trace_id_by_index/ | +[**TracerTraceGetTraceIdByIndexObserve**](TracerAPI.md#TracerTraceGetTraceIdByIndexObserve) | **Get** /tracer/trace/get_trace_id_by_index_observe/ | +[**TracerTraceList**](TracerAPI.md#TracerTraceList) | **Get** /tracer/trace/ | +[**TracerTraceListTracesOfSession**](TracerAPI.md#TracerTraceListTracesOfSession) | **Get** /tracer/trace/list_traces_of_session/ | +[**TracerTracePartialUpdate**](TracerAPI.md#TracerTracePartialUpdate) | **Patch** /tracer/trace/{id}/ | +[**TracerTraceSessionCreate**](TracerAPI.md#TracerTraceSessionCreate) | **Post** /tracer/trace-session/ | +[**TracerTraceSessionDelete**](TracerAPI.md#TracerTraceSessionDelete) | **Delete** /tracer/trace-session/{id}/ | +[**TracerTraceSessionEvalLogs**](TracerAPI.md#TracerTraceSessionEvalLogs) | **Get** /tracer/trace-session/{id}/eval_logs/ | Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. +[**TracerTraceSessionGetSessionFilterValues**](TracerAPI.md#TracerTraceSessionGetSessionFilterValues) | **Get** /tracer/trace-session/get_session_filter_values/ | +[**TracerTraceSessionGetTraceSessionExportData**](TracerAPI.md#TracerTraceSessionGetTraceSessionExportData) | **Get** /tracer/trace-session/get_trace_session_export_data/ | +[**TracerTraceSessionList**](TracerAPI.md#TracerTraceSessionList) | **Get** /tracer/trace-session/ | +[**TracerTraceSessionPartialUpdate**](TracerAPI.md#TracerTraceSessionPartialUpdate) | **Patch** /tracer/trace-session/{id}/ | +[**TracerTraceSessionUpdate**](TracerAPI.md#TracerTraceSessionUpdate) | **Put** /tracer/trace-session/{id}/ | +[**TracerTraceUpdate**](TracerAPI.md#TracerTraceUpdate) | **Put** /tracer/trace/{id}/ | +[**TracerUserAlertLogsCreate**](TracerAPI.md#TracerUserAlertLogsCreate) | **Post** /tracer/user-alert-logs/ | +[**TracerUserAlertLogsDelete**](TracerAPI.md#TracerUserAlertLogsDelete) | **Delete** /tracer/user-alert-logs/{id}/ | +[**TracerUserAlertLogsPartialUpdate**](TracerAPI.md#TracerUserAlertLogsPartialUpdate) | **Patch** /tracer/user-alert-logs/{id}/ | +[**TracerUserAlertLogsUpdate**](TracerAPI.md#TracerUserAlertLogsUpdate) | **Put** /tracer/user-alert-logs/{id}/ | +[**TracerUserAlertsDuplicate**](TracerAPI.md#TracerUserAlertsDuplicate) | **Post** /tracer/user-alerts/duplicate/ | +[**TracerUserAlertsListMonitors**](TracerAPI.md#TracerUserAlertsListMonitors) | **Get** /tracer/user-alerts/list_monitors/ | +[**TracerUserAlertsUpdate**](TracerAPI.md#TracerUserAlertsUpdate) | **Put** /tracer/user-alerts/{id}/ | +[**TracerUsersGetCodeExampleList**](TracerAPI.md#TracerUsersGetCodeExampleList) | **Get** /tracer/users/get_code_example/ | + + + +## TracerFeedIssuesCreateLinearIssueCreate + +> CreateLinearIssueResponse TracerFeedIssuesCreateLinearIssueCreate(ctx, clusterId).CreateLinearIssue(createLinearIssue).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + createLinearIssue := *openapiclient.NewCreateLinearIssue("TeamId_example") // CreateLinearIssue | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesCreateLinearIssueCreate(context.Background(), clusterId).CreateLinearIssue(createLinearIssue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesCreateLinearIssueCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesCreateLinearIssueCreate`: CreateLinearIssueResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesCreateLinearIssueCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesCreateLinearIssueCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createLinearIssue** | [**CreateLinearIssue**](CreateLinearIssue.md) | | + +### Return type + +[**CreateLinearIssueResponse**](CreateLinearIssueResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerFeedIssuesDeepAnalysisCreate + +> DeepAnalysisDispatchApiResponse TracerFeedIssuesDeepAnalysisCreate(ctx, clusterId).DeepAnalysisBody(deepAnalysisBody).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + deepAnalysisBody := *openapiclient.NewDeepAnalysisBody("TraceId_example") // DeepAnalysisBody | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesDeepAnalysisCreate(context.Background(), clusterId).DeepAnalysisBody(deepAnalysisBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesDeepAnalysisCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesDeepAnalysisCreate`: DeepAnalysisDispatchApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesDeepAnalysisCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesDeepAnalysisCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **deepAnalysisBody** | [**DeepAnalysisBody**](DeepAnalysisBody.md) | | + +### Return type + +[**DeepAnalysisDispatchApiResponse**](DeepAnalysisDispatchApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerFeedIssuesOverviewList + +> OverviewApiResponse TracerFeedIssuesOverviewList(ctx, clusterId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesOverviewList(context.Background(), clusterId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesOverviewList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesOverviewList`: OverviewApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesOverviewList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesOverviewListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**OverviewApiResponse**](OverviewApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerFeedIssuesPartialUpdate + +> FeedDetailApiResponse TracerFeedIssuesPartialUpdate(ctx, clusterId).FeedUpdateBody(feedUpdateBody).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + feedUpdateBody := *openapiclient.NewFeedUpdateBody() // FeedUpdateBody | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesPartialUpdate(context.Background(), clusterId).FeedUpdateBody(feedUpdateBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesPartialUpdate`: FeedDetailApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **feedUpdateBody** | [**FeedUpdateBody**](FeedUpdateBody.md) | | + +### Return type + +[**FeedDetailApiResponse**](FeedDetailApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerFeedIssuesRootCauseList + +> DeepAnalysisApiResponse TracerFeedIssuesRootCauseList(ctx, clusterId).TraceId(traceId).Execute() + +GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + traceId := "traceId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesRootCauseList(context.Background(), clusterId).TraceId(traceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesRootCauseList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesRootCauseList`: DeepAnalysisApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesRootCauseList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesRootCauseListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **traceId** | **string** | | + +### Return type + +[**DeepAnalysisApiResponse**](DeepAnalysisApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerFeedIssuesSidebarList + +> FeedSidebarApiResponse TracerFeedIssuesSidebarList(ctx, clusterId).TraceId(traceId).Execute() + +GET /tracer/feed/issues/{cluster_id}/sidebar/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + traceId := "traceId_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesSidebarList(context.Background(), clusterId).TraceId(traceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesSidebarList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesSidebarList`: FeedSidebarApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesSidebarList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesSidebarListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **traceId** | **string** | | + +### Return type + +[**FeedSidebarApiResponse**](FeedSidebarApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerFeedIssuesTracesList + +> TracesTabApiResponse TracerFeedIssuesTracesList(ctx, clusterId).Limit(limit).Offset(offset).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + limit := int32(56) // int32 | (optional) (default to 50) + offset := int32(56) // int32 | (optional) (default to 0) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesTracesList(context.Background(), clusterId).Limit(limit).Offset(offset).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesTracesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesTracesList`: TracesTabApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesTracesList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesTracesListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | | [default to 50] + **offset** | **int32** | | [default to 0] + +### Return type + +[**TracesTabApiResponse**](TracesTabApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerFeedIssuesTrendsList + +> TrendsTabApiResponse TracerFeedIssuesTrendsList(ctx, clusterId).Days(days).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + days := int32(56) // int32 | (optional) (default to 14) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerFeedIssuesTrendsList(context.Background(), clusterId).Days(days).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerFeedIssuesTrendsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerFeedIssuesTrendsList`: TrendsTabApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerFeedIssuesTrendsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerFeedIssuesTrendsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **days** | **int32** | | [default to 14] + +### Return type + +[**TrendsTabApiResponse**](TrendsTabApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAgentGraph + +> TracerTraceList200Response TracerTraceAgentGraph(ctx).ProjectId(projectId).Page(page).Limit(limit).Filters(filters).Execute() + +Return the aggregate agent graph for a project. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + filters := "filters_example" // string | (optional) (default to "[]") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceAgentGraph(context.Background()).ProjectId(projectId).Page(page).Limit(limit).Filters(filters).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAgentGraph``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceAgentGraph`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceAgentGraph`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAgentGraphRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | **string** | | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **filters** | **string** | | [default to "[]"] + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAnnotationCreate + +> GetTraceAnnotation TracerTraceAnnotationCreate(ctx).GetTraceAnnotation(getTraceAnnotation).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + getTraceAnnotation := *openapiclient.NewGetTraceAnnotation() // GetTraceAnnotation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceAnnotationCreate(context.Background()).GetTraceAnnotation(getTraceAnnotation).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAnnotationCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceAnnotationCreate`: GetTraceAnnotation + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceAnnotationCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAnnotationCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md) | | + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAnnotationDelete + +> TracerTraceAnnotationDelete(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TracerAPI.TracerTraceAnnotationDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAnnotationDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAnnotationDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAnnotationGetAnnotationValues + +> GetTraceAnnotationValuesResponse TracerTraceAnnotationGetAnnotationValues(ctx).Page(page).Limit(limit).ObservationSpanId(observationSpanId).TraceId(traceId).Annotators(annotators).ExcludeAnnotators(excludeAnnotators).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + observationSpanId := "observationSpanId_example" // string | (optional) + traceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + annotators := "annotators_example" // string | (optional) + excludeAnnotators := "excludeAnnotators_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceAnnotationGetAnnotationValues(context.Background()).Page(page).Limit(limit).ObservationSpanId(observationSpanId).TraceId(traceId).Annotators(annotators).ExcludeAnnotators(excludeAnnotators).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAnnotationGetAnnotationValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceAnnotationGetAnnotationValues`: GetTraceAnnotationValuesResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceAnnotationGetAnnotationValues`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAnnotationGetAnnotationValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **observationSpanId** | **string** | | + **traceId** | **string** | | + **annotators** | **string** | | + **excludeAnnotators** | **string** | | + +### Return type + +[**GetTraceAnnotationValuesResponse**](GetTraceAnnotationValuesResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAnnotationList + +> TracerTraceAnnotationList200Response TracerTraceAnnotationList(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceAnnotationList(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAnnotationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceAnnotationList`: TracerTraceAnnotationList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceAnnotationList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAnnotationListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceAnnotationList200Response**](TracerTraceAnnotationList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAnnotationPartialUpdate + +> GetTraceAnnotation TracerTraceAnnotationPartialUpdate(ctx, id).GetTraceAnnotation(getTraceAnnotation).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + getTraceAnnotation := *openapiclient.NewGetTraceAnnotation() // GetTraceAnnotation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceAnnotationPartialUpdate(context.Background(), id).GetTraceAnnotation(getTraceAnnotation).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAnnotationPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceAnnotationPartialUpdate`: GetTraceAnnotation + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceAnnotationPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAnnotationPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md) | | + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAnnotationRead + +> GetTraceAnnotation TracerTraceAnnotationRead(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceAnnotationRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAnnotationRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceAnnotationRead`: GetTraceAnnotation + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceAnnotationRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAnnotationReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceAnnotationUpdate + +> GetTraceAnnotation TracerTraceAnnotationUpdate(ctx, id).GetTraceAnnotation(getTraceAnnotation).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + getTraceAnnotation := *openapiclient.NewGetTraceAnnotation() // GetTraceAnnotation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceAnnotationUpdate(context.Background(), id).GetTraceAnnotation(getTraceAnnotation).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceAnnotationUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceAnnotationUpdate`: GetTraceAnnotation + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceAnnotationUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceAnnotationUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md) | | + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceBulkCreate + +> Trace TracerTraceBulkCreate(ctx).Trace(trace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + trace := *openapiclient.NewTrace("Project_example") // Trace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceBulkCreate(context.Background()).Trace(trace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceBulkCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceBulkCreate`: Trace + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceBulkCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceBulkCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trace** | [**Trace**](Trace.md) | | + +### Return type + +[**Trace**](Trace.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceCompareTraces + +> Trace TracerTraceCompareTraces(ctx).Trace(trace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + trace := *openapiclient.NewTrace("Project_example") // Trace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceCompareTraces(context.Background()).Trace(trace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceCompareTraces``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceCompareTraces`: Trace + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceCompareTraces`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceCompareTracesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trace** | [**Trace**](Trace.md) | | + +### Return type + +[**Trace**](Trace.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceCreate + +> Trace TracerTraceCreate(ctx).Trace(trace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + trace := *openapiclient.NewTrace("Project_example") // Trace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceCreate(context.Background()).Trace(trace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceCreate`: Trace + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trace** | [**Trace**](Trace.md) | | + +### Return type + +[**Trace**](Trace.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceDelete + +> TracerTraceDelete(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TracerAPI.TracerTraceDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceGetEvalNames + +> TracerTraceList200Response TracerTraceGetEvalNames(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceGetEvalNames(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceGetEvalNames``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceGetEvalNames`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceGetEvalNames`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceGetEvalNamesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceGetTraceExportData + +> TracerTraceList200Response TracerTraceGetTraceExportData(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceGetTraceExportData(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceGetTraceExportData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceGetTraceExportData`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceGetTraceExportData`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceGetTraceExportDataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceGetTraceIdByIndex + +> TracerTraceList200Response TracerTraceGetTraceIdByIndex(ctx).TraceId(traceId).ProjectVersionId(projectVersionId).Page(page).Limit(limit).Filters(filters).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + traceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + projectVersionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + filters := "filters_example" // string | (optional) (default to "[]") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceGetTraceIdByIndex(context.Background()).TraceId(traceId).ProjectVersionId(projectVersionId).Page(page).Limit(limit).Filters(filters).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceGetTraceIdByIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceGetTraceIdByIndex`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceGetTraceIdByIndex`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceGetTraceIdByIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **traceId** | **string** | | + **projectVersionId** | **string** | | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **filters** | **string** | | [default to "[]"] + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceGetTraceIdByIndexObserve + +> TracerTraceList200Response TracerTraceGetTraceIdByIndexObserve(ctx).TraceId(traceId).ProjectId(projectId).Page(page).Limit(limit).Filters(filters).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + traceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + filters := "filters_example" // string | (optional) (default to "[]") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceGetTraceIdByIndexObserve(context.Background()).TraceId(traceId).ProjectId(projectId).Page(page).Limit(limit).Filters(filters).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceGetTraceIdByIndexObserve``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceGetTraceIdByIndexObserve`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceGetTraceIdByIndexObserve`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceGetTraceIdByIndexObserveRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **traceId** | **string** | | + **projectId** | **string** | | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **filters** | **string** | | [default to "[]"] + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceList + +> TracerTraceList200Response TracerTraceList(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceList(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceList`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceListTracesOfSession + +> TracerTraceList200Response TracerTraceListTracesOfSession(ctx).Page(page).Limit(limit).ProjectId(projectId).ProjectVersionId(projectVersionId).SessionId(sessionId).Filters(filters).PageNumber(pageNumber).PageSize(pageSize).Interval(interval).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + projectVersionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + sessionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + filters := "filters_example" // string | (optional) (default to "[]") + pageNumber := int32(56) // int32 | (optional) (default to 0) + pageSize := int32(56) // int32 | (optional) (default to 30) + interval := "interval_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceListTracesOfSession(context.Background()).Page(page).Limit(limit).ProjectId(projectId).ProjectVersionId(projectVersionId).SessionId(sessionId).Filters(filters).PageNumber(pageNumber).PageSize(pageSize).Interval(interval).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceListTracesOfSession``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceListTracesOfSession`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceListTracesOfSession`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceListTracesOfSessionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **projectId** | **string** | | + **projectVersionId** | **string** | | + **sessionId** | **string** | | + **filters** | **string** | | [default to "[]"] + **pageNumber** | **int32** | | [default to 0] + **pageSize** | **int32** | | [default to 30] + **interval** | **string** | | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTracePartialUpdate + +> Trace TracerTracePartialUpdate(ctx, id).Trace(trace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + trace := *openapiclient.NewTrace("Project_example") // Trace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTracePartialUpdate(context.Background(), id).Trace(trace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTracePartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTracePartialUpdate`: Trace + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTracePartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTracePartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **trace** | [**Trace**](Trace.md) | | + +### Return type + +[**Trace**](Trace.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionCreate + +> TraceSession TracerTraceSessionCreate(ctx).TraceSession(traceSession).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + traceSession := *openapiclient.NewTraceSession("Project_example") // TraceSession | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceSessionCreate(context.Background()).TraceSession(traceSession).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceSessionCreate`: TraceSession + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceSessionCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **traceSession** | [**TraceSession**](TraceSession.md) | | + +### Return type + +[**TraceSession**](TraceSession.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionDelete + +> TracerTraceSessionDelete(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TracerAPI.TracerTraceSessionDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionEvalLogs + +> TraceSession TracerTraceSessionEvalLogs(ctx, id).Execute() + +Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceSessionEvalLogs(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionEvalLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceSessionEvalLogs`: TraceSession + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceSessionEvalLogs`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionEvalLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TraceSession**](TraceSession.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionGetSessionFilterValues + +> TracerTraceSessionList200Response TracerTraceSessionGetSessionFilterValues(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceSessionGetSessionFilterValues(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionGetSessionFilterValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceSessionGetSessionFilterValues`: TracerTraceSessionList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceSessionGetSessionFilterValues`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionGetSessionFilterValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionGetTraceSessionExportData + +> TracerTraceSessionList200Response TracerTraceSessionGetTraceSessionExportData(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceSessionGetTraceSessionExportData(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionGetTraceSessionExportData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceSessionGetTraceSessionExportData`: TracerTraceSessionList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceSessionGetTraceSessionExportData`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionGetTraceSessionExportDataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionList + +> TracerTraceSessionList200Response TracerTraceSessionList(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceSessionList(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceSessionList`: TracerTraceSessionList200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceSessionList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionPartialUpdate + +> TraceSession TracerTraceSessionPartialUpdate(ctx, id).TraceSession(traceSession).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + traceSession := *openapiclient.NewTraceSession("Project_example") // TraceSession | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceSessionPartialUpdate(context.Background(), id).TraceSession(traceSession).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceSessionPartialUpdate`: TraceSession + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceSessionPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **traceSession** | [**TraceSession**](TraceSession.md) | | + +### Return type + +[**TraceSession**](TraceSession.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceSessionUpdate + +> TraceSession TracerTraceSessionUpdate(ctx, id).TraceSession(traceSession).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + traceSession := *openapiclient.NewTraceSession("Project_example") // TraceSession | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceSessionUpdate(context.Background(), id).TraceSession(traceSession).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceSessionUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceSessionUpdate`: TraceSession + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceSessionUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceSessionUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **traceSession** | [**TraceSession**](TraceSession.md) | | + +### Return type + +[**TraceSession**](TraceSession.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerTraceUpdate + +> Trace TracerTraceUpdate(ctx, id).Trace(trace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + trace := *openapiclient.NewTrace("Project_example") // Trace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerTraceUpdate(context.Background(), id).Trace(trace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerTraceUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerTraceUpdate`: Trace + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerTraceUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerTraceUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **trace** | [**Trace**](Trace.md) | | + +### Return type + +[**Trace**](Trace.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUserAlertLogsCreate + +> UserAlertMonitorLog TracerUserAlertLogsCreate(ctx).UserAlertMonitorLog(userAlertMonitorLog).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + userAlertMonitorLog := *openapiclient.NewUserAlertMonitorLog("Type_example", "Message_example") // UserAlertMonitorLog | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerUserAlertLogsCreate(context.Background()).UserAlertMonitorLog(userAlertMonitorLog).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUserAlertLogsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerUserAlertLogsCreate`: UserAlertMonitorLog + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerUserAlertLogsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUserAlertLogsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md) | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUserAlertLogsDelete + +> TracerUserAlertLogsDelete(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TracerAPI.TracerUserAlertLogsDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUserAlertLogsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUserAlertLogsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUserAlertLogsPartialUpdate + +> UserAlertMonitorLog TracerUserAlertLogsPartialUpdate(ctx, id).UserAlertMonitorLog(userAlertMonitorLog).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + userAlertMonitorLog := *openapiclient.NewUserAlertMonitorLog("Type_example", "Message_example") // UserAlertMonitorLog | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerUserAlertLogsPartialUpdate(context.Background(), id).UserAlertMonitorLog(userAlertMonitorLog).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUserAlertLogsPartialUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerUserAlertLogsPartialUpdate`: UserAlertMonitorLog + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerUserAlertLogsPartialUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUserAlertLogsPartialUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md) | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUserAlertLogsUpdate + +> UserAlertMonitorLog TracerUserAlertLogsUpdate(ctx, id).UserAlertMonitorLog(userAlertMonitorLog).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + userAlertMonitorLog := *openapiclient.NewUserAlertMonitorLog("Type_example", "Message_example") // UserAlertMonitorLog | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerUserAlertLogsUpdate(context.Background(), id).UserAlertMonitorLog(userAlertMonitorLog).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUserAlertLogsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerUserAlertLogsUpdate`: UserAlertMonitorLog + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerUserAlertLogsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUserAlertLogsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md) | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUserAlertsDuplicate + +> UserAlertMonitorDuplicateResponse TracerUserAlertsDuplicate(ctx).UserAlertMonitorDuplicate(userAlertMonitorDuplicate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + userAlertMonitorDuplicate := *openapiclient.NewUserAlertMonitorDuplicate("Id_example", "Name_example") // UserAlertMonitorDuplicate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerUserAlertsDuplicate(context.Background()).UserAlertMonitorDuplicate(userAlertMonitorDuplicate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUserAlertsDuplicate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerUserAlertsDuplicate`: UserAlertMonitorDuplicateResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerUserAlertsDuplicate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUserAlertsDuplicateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userAlertMonitorDuplicate** | [**UserAlertMonitorDuplicate**](UserAlertMonitorDuplicate.md) | | + +### Return type + +[**UserAlertMonitorDuplicateResponse**](UserAlertMonitorDuplicateResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUserAlertsListMonitors + +> ListAlerts200Response TracerUserAlertsListMonitors(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerUserAlertsListMonitors(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUserAlertsListMonitors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerUserAlertsListMonitors`: ListAlerts200Response + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerUserAlertsListMonitors`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUserAlertsListMonitorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ListAlerts200Response**](ListAlerts200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUserAlertsUpdate + +> UserAlertMonitor TracerUserAlertsUpdate(ctx, id).UserAlertMonitor(userAlertMonitor).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + userAlertMonitor := *openapiclient.NewUserAlertMonitor("Project_example", "Name_example", "MetricType_example", "ThresholdOperator_example", "Organization_example") // UserAlertMonitor | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerUserAlertsUpdate(context.Background(), id).UserAlertMonitor(userAlertMonitor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUserAlertsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerUserAlertsUpdate`: UserAlertMonitor + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerUserAlertsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUserAlertsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md) | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TracerUsersGetCodeExampleList + +> UserCodeExampleResponse TracerUsersGetCodeExampleList(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracerAPI.TracerUsersGetCodeExampleList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracerAPI.TracerUsersGetCodeExampleList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TracerUsersGetCodeExampleList`: UserCodeExampleResponse + fmt.Fprintf(os.Stdout, "Response from `TracerAPI.TracerUsersGetCodeExampleList`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiTracerUsersGetCodeExampleListRequest struct via the builder pattern + + +### Return type + +[**UserCodeExampleResponse**](UserCodeExampleResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/TracingAPI.md b/go/futureagi/docs/TracingAPI.md new file mode 100644 index 0000000..80118f3 --- /dev/null +++ b/go/futureagi/docs/TracingAPI.md @@ -0,0 +1,1239 @@ +# \TracingAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateBulkTraceAnnotation**](TracingAPI.md#CreateBulkTraceAnnotation) | **Post** /tracer/bulk-annotation/ | +[**GetErrorFeedIssue**](TracingAPI.md#GetErrorFeedIssue) | **Get** /tracer/feed/issues/{cluster_id}/ | +[**GetErrorFeedIssueStats**](TracingAPI.md#GetErrorFeedIssueStats) | **Get** /tracer/feed/issues/stats/ | +[**GetTrace**](TracingAPI.md#GetTrace) | **Get** /tracer/trace/{id}/ | +[**GetTraceGraphMethods**](TracingAPI.md#GetTraceGraphMethods) | **Post** /tracer/trace/get_graph_methods/ | +[**GetTraceSession**](TracingAPI.md#GetTraceSession) | **Get** /tracer/trace-session/{id}/ | +[**GetTraceSessionGraphData**](TracingAPI.md#GetTraceSessionGraphData) | **Post** /tracer/trace-session/get_session_graph_data/ | Fetch time-series session metrics for the observe graph. +[**GetVoiceCallDetail**](TracingAPI.md#GetVoiceCallDetail) | **Get** /tracer/trace/voice_call_detail/ | Return the heavy / detail-only fields for a single voice call. +[**ListErrorFeedIssues**](TracingAPI.md#ListErrorFeedIssues) | **Get** /tracer/feed/issues/ | +[**ListTraceAnnotationLabels**](TracingAPI.md#ListTraceAnnotationLabels) | **Get** /tracer/get-annotation-labels/ | +[**ListTraceProjects**](TracingAPI.md#ListTraceProjects) | **Get** /tracer/project/list_projects/ | List projects filtered by organization ID. +[**ListTraceProperties**](TracingAPI.md#ListTraceProperties) | **Get** /tracer/trace/get_properties/ | +[**ListTraceSessions**](TracingAPI.md#ListTraceSessions) | **Get** /tracer/trace-session/list_sessions/ | +[**ListTraceUsers**](TracingAPI.md#ListTraceUsers) | **Get** /tracer/users/ | +[**ListTraces**](TracingAPI.md#ListTraces) | **Get** /tracer/trace/list_traces/ | +[**ListVoiceCalls**](TracingAPI.md#ListVoiceCalls) | **Get** /tracer/trace/list_voice_calls/ | +[**UpdateTraceTags**](TracingAPI.md#UpdateTraceTags) | **Patch** /tracer/trace/{id}/tags/ | + + + +## CreateBulkTraceAnnotation + +> BulkAnnotationResponse CreateBulkTraceAnnotation(ctx).BulkAnnotationRequest(bulkAnnotationRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + bulkAnnotationRequest := *openapiclient.NewBulkAnnotationRequest([]openapiclient.BulkAnnotationRecordRequest{*openapiclient.NewBulkAnnotationRecordRequest("ObservationSpanId_example")}) // BulkAnnotationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.CreateBulkTraceAnnotation(context.Background()).BulkAnnotationRequest(bulkAnnotationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.CreateBulkTraceAnnotation``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateBulkTraceAnnotation`: BulkAnnotationResponse + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.CreateBulkTraceAnnotation`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateBulkTraceAnnotationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bulkAnnotationRequest** | [**BulkAnnotationRequest**](BulkAnnotationRequest.md) | | + +### Return type + +[**BulkAnnotationResponse**](BulkAnnotationResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetErrorFeedIssue + +> FeedDetailApiResponse GetErrorFeedIssue(ctx, clusterId).ProjectId(projectId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + clusterId := "clusterId_example" // string | + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.GetErrorFeedIssue(context.Background(), clusterId).ProjectId(projectId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.GetErrorFeedIssue``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetErrorFeedIssue`: FeedDetailApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.GetErrorFeedIssue`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**clusterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetErrorFeedIssueRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **projectId** | **string** | | + +### Return type + +[**FeedDetailApiResponse**](FeedDetailApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetErrorFeedIssueStats + +> FeedStatsApiResponse GetErrorFeedIssueStats(ctx).ProjectId(projectId).TimeRangeDays(timeRangeDays).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + timeRangeDays := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.GetErrorFeedIssueStats(context.Background()).ProjectId(projectId).TimeRangeDays(timeRangeDays).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.GetErrorFeedIssueStats``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetErrorFeedIssueStats`: FeedStatsApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.GetErrorFeedIssueStats`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetErrorFeedIssueStatsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | **string** | | + **timeRangeDays** | **int32** | | + +### Return type + +[**FeedStatsApiResponse**](FeedStatsApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTrace + +> Trace GetTrace(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.GetTrace(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.GetTrace``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTrace`: Trace + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.GetTrace`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTraceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Trace**](Trace.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTraceGraphMethods + +> ObserveGraphDataResponse GetTraceGraphMethods(ctx).ObserveGraphDataRequest(observeGraphDataRequest).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + observeGraphDataRequest := *openapiclient.NewObserveGraphDataRequest("ProjectId_example", *openapiclient.NewReqDataConfig("Id_example", "Type_example")) // ObserveGraphDataRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.GetTraceGraphMethods(context.Background()).ObserveGraphDataRequest(observeGraphDataRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.GetTraceGraphMethods``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTraceGraphMethods`: ObserveGraphDataResponse + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.GetTraceGraphMethods`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTraceGraphMethodsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **observeGraphDataRequest** | [**ObserveGraphDataRequest**](ObserveGraphDataRequest.md) | | + +### Return type + +[**ObserveGraphDataResponse**](ObserveGraphDataResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTraceSession + +> TraceSession GetTraceSession(ctx, id).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.GetTraceSession(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.GetTraceSession``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTraceSession`: TraceSession + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.GetTraceSession`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTraceSessionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TraceSession**](TraceSession.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTraceSessionGraphData + +> TraceSessionGraphDataRequest GetTraceSessionGraphData(ctx).TraceSessionGraphDataRequest(traceSessionGraphDataRequest).Execute() + +Fetch time-series session metrics for the observe graph. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + traceSessionGraphDataRequest := *openapiclient.NewTraceSessionGraphDataRequest("ProjectId_example", *openapiclient.NewReqDataConfig("Id_example", "Type_example")) // TraceSessionGraphDataRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.GetTraceSessionGraphData(context.Background()).TraceSessionGraphDataRequest(traceSessionGraphDataRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.GetTraceSessionGraphData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTraceSessionGraphData`: TraceSessionGraphDataRequest + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.GetTraceSessionGraphData`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTraceSessionGraphDataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **traceSessionGraphDataRequest** | [**TraceSessionGraphDataRequest**](TraceSessionGraphDataRequest.md) | | + +### Return type + +[**TraceSessionGraphDataRequest**](TraceSessionGraphDataRequest.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetVoiceCallDetail + +> TracerTraceList200Response GetVoiceCallDetail(ctx).Page(page).Limit(limit).Execute() + +Return the heavy / detail-only fields for a single voice call. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.GetVoiceCallDetail(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.GetVoiceCallDetail``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetVoiceCallDetail`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.GetVoiceCallDetail`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetVoiceCallDetailRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListErrorFeedIssues + +> FeedListApiResponse ListErrorFeedIssues(ctx).ProjectId(projectId).Search(search).Status(status).FixLayer(fixLayer).Source(source).IssueGroup(issueGroup).TimeRangeDays(timeRangeDays).SortBy(sortBy).SortDir(sortDir).Limit(limit).Offset(offset).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + search := "search_example" // string | (optional) + status := "status_example" // string | (optional) + fixLayer := "fixLayer_example" // string | (optional) + source := "source_example" // string | (optional) + issueGroup := "issueGroup_example" // string | (optional) + timeRangeDays := int32(56) // int32 | (optional) + sortBy := "sortBy_example" // string | (optional) (default to "last_seen") + sortDir := "sortDir_example" // string | (optional) (default to "desc") + limit := int32(56) // int32 | (optional) (default to 25) + offset := int32(56) // int32 | (optional) (default to 0) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListErrorFeedIssues(context.Background()).ProjectId(projectId).Search(search).Status(status).FixLayer(fixLayer).Source(source).IssueGroup(issueGroup).TimeRangeDays(timeRangeDays).SortBy(sortBy).SortDir(sortDir).Limit(limit).Offset(offset).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListErrorFeedIssues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListErrorFeedIssues`: FeedListApiResponse + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListErrorFeedIssues`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListErrorFeedIssuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | **string** | | + **search** | **string** | | + **status** | **string** | | + **fixLayer** | **string** | | + **source** | **string** | | + **issueGroup** | **string** | | + **timeRangeDays** | **int32** | | + **sortBy** | **string** | | [default to "last_seen"] + **sortDir** | **string** | | [default to "desc"] + **limit** | **int32** | | [default to 25] + **offset** | **int32** | | [default to 0] + +### Return type + +[**FeedListApiResponse**](FeedListApiResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTraceAnnotationLabels + +> GetAnnotationLabelsResponse ListTraceAnnotationLabels(ctx).ProjectId(projectId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListTraceAnnotationLabels(context.Background()).ProjectId(projectId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListTraceAnnotationLabels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTraceAnnotationLabels`: GetAnnotationLabelsResponse + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListTraceAnnotationLabels`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTraceAnnotationLabelsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | **string** | | + +### Return type + +[**GetAnnotationLabelsResponse**](GetAnnotationLabelsResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTraceProjects + +> ListTraceProjects200Response ListTraceProjects(ctx).Page(page).Limit(limit).Execute() + +List projects filtered by organization ID. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListTraceProjects(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListTraceProjects``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTraceProjects`: ListTraceProjects200Response + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListTraceProjects`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTraceProjectsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**ListTraceProjects200Response**](ListTraceProjects200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTraceProperties + +> TracerTraceList200Response ListTraceProperties(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListTraceProperties(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListTraceProperties``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTraceProperties`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListTraceProperties`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTracePropertiesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTraceSessions + +> TracerTraceSessionList200Response ListTraceSessions(ctx).Page(page).Limit(limit).ProjectId(projectId).UserId(userId).Bookmarked(bookmarked).Filters(filters).SortParams(sortParams).PageNumber(pageNumber).PageSize(pageSize).Interval(interval).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + userId := "userId_example" // string | (optional) + bookmarked := true // bool | (optional) + filters := "filters_example" // string | (optional) (default to "[]") + sortParams := "sortParams_example" // string | (optional) (default to "[]") + pageNumber := int32(56) // int32 | (optional) (default to 0) + pageSize := int32(56) // int32 | (optional) (default to 30) + interval := "interval_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListTraceSessions(context.Background()).Page(page).Limit(limit).ProjectId(projectId).UserId(userId).Bookmarked(bookmarked).Filters(filters).SortParams(sortParams).PageNumber(pageNumber).PageSize(pageSize).Interval(interval).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListTraceSessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTraceSessions`: TracerTraceSessionList200Response + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListTraceSessions`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTraceSessionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **projectId** | **string** | | + **userId** | **string** | | + **bookmarked** | **bool** | | + **filters** | **string** | | [default to "[]"] + **sortParams** | **string** | | [default to "[]"] + **pageNumber** | **int32** | | [default to 0] + **pageSize** | **int32** | | [default to 30] + **interval** | **string** | | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTraceUsers + +> UsersResponse ListTraceUsers(ctx).ProjectId(projectId).Search(search).PageSize(pageSize).CurrentPageIndex(currentPageIndex).SortParams(sortParams).Filters(filters).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + projectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional) + search := "search_example" // string | (optional) + pageSize := int32(56) // int32 | (optional) + currentPageIndex := int32(56) // int32 | (optional) + sortParams := "sortParams_example" // string | (optional) (default to "[]") + filters := "filters_example" // string | (optional) (default to "[]") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListTraceUsers(context.Background()).ProjectId(projectId).Search(search).PageSize(pageSize).CurrentPageIndex(currentPageIndex).SortParams(sortParams).Filters(filters).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListTraceUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTraceUsers`: UsersResponse + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListTraceUsers`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTraceUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | **string** | | + **search** | **string** | | + **pageSize** | **int32** | | + **currentPageIndex** | **int32** | | + **sortParams** | **string** | | [default to "[]"] + **filters** | **string** | | [default to "[]"] + +### Return type + +[**UsersResponse**](UsersResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTraces + +> TracerTraceList200Response ListTraces(ctx).ProjectVersionId(projectVersionId).Page(page).Limit(limit).TraceIds(traceIds).Filters(filters).SortParams(sortParams).PageNumber(pageNumber).PageSize(pageSize).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + projectVersionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + traceIds := "traceIds_example" // string | (optional) + filters := "filters_example" // string | (optional) (default to "[]") + sortParams := "sortParams_example" // string | (optional) (default to "[]") + pageNumber := int32(56) // int32 | (optional) (default to 0) + pageSize := int32(56) // int32 | (optional) (default to 30) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListTraces(context.Background()).ProjectVersionId(projectVersionId).Page(page).Limit(limit).TraceIds(traceIds).Filters(filters).SortParams(sortParams).PageNumber(pageNumber).PageSize(pageSize).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListTraces``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTraces`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListTraces`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTracesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectVersionId** | **string** | | + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + **traceIds** | **string** | | + **filters** | **string** | | [default to "[]"] + **sortParams** | **string** | | [default to "[]"] + **pageNumber** | **int32** | | [default to 0] + **pageSize** | **int32** | | [default to 30] + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVoiceCalls + +> TracerTraceList200Response ListVoiceCalls(ctx).Page(page).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | A page number within the paginated result set. (optional) + limit := int32(56) // int32 | Number of results to return per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.ListVoiceCalls(context.Background()).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.ListVoiceCalls``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListVoiceCalls`: TracerTraceList200Response + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.ListVoiceCalls`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListVoiceCallsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | A page number within the paginated result set. | + **limit** | **int32** | Number of results to return per page. | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTraceTags + +> TraceTagsUpdate UpdateTraceTags(ctx, id).TraceTagsUpdate(traceTagsUpdate).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + id := "id_example" // string | + traceTagsUpdate := *openapiclient.NewTraceTagsUpdate([]string{"Tags_example"}) // TraceTagsUpdate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TracingAPI.UpdateTraceTags(context.Background(), id).TraceTagsUpdate(traceTagsUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TracingAPI.UpdateTraceTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateTraceTags`: TraceTagsUpdate + fmt.Fprintf(os.Stdout, "Response from `TracingAPI.UpdateTraceTags`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateTraceTagsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **traceTagsUpdate** | [**TraceTagsUpdate**](TraceTagsUpdate.md) | | + +### Return type + +[**TraceTagsUpdate**](TraceTagsUpdate.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/docs/UsersAPI.md b/go/futureagi/docs/UsersAPI.md new file mode 100644 index 0000000..d17568c --- /dev/null +++ b/go/futureagi/docs/UsersAPI.md @@ -0,0 +1,370 @@ +# \UsersAPI + +All URIs are relative to *https://api.futureagi.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetCurrentUser**](UsersAPI.md#GetCurrentUser) | **Get** /accounts/user-info/ | +[**ListOrganizationMembers**](UsersAPI.md#ListOrganizationMembers) | **Get** /accounts/organization/members/ | GET /accounts/organization/members/ +[**ListWorkspaceMembers**](UsersAPI.md#ListWorkspaceMembers) | **Get** /accounts/workspace/{workspace_id}/members/ | GET /accounts/workspace/<workspace_id>/members/ +[**ListWorkspaces**](UsersAPI.md#ListWorkspaces) | **Get** /accounts/workspace/list/ | +[**SwitchWorkspace**](UsersAPI.md#SwitchWorkspace) | **Post** /accounts/workspace/switch/ | + + + +## GetCurrentUser + +> UserInfoResponse GetCurrentUser(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.GetCurrentUser(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetCurrentUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetCurrentUser`: UserInfoResponse + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetCurrentUser`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetCurrentUserRequest struct via the builder pattern + + +### Return type + +[**UserInfoResponse**](UserInfoResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListOrganizationMembers + +> MemberListResponse ListOrganizationMembers(ctx).Page(page).Limit(limit).Search(search).FilterStatus(filterStatus).FilterRole(filterRole).Sort(sort).Execute() + +GET /accounts/organization/members/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 20) + search := "search_example" // string | (optional) (default to "") + filterStatus := []string{"FilterStatus_example"} // []string | (optional) + filterRole := []string{"Inner_example"} // []string | (optional) + sort := "sort_example" // string | (optional) (default to "-created_at") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.ListOrganizationMembers(context.Background()).Page(page).Limit(limit).Search(search).FilterStatus(filterStatus).FilterRole(filterRole).Sort(sort).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ListOrganizationMembers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListOrganizationMembers`: MemberListResponse + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ListOrganizationMembers`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOrganizationMembersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 20] + **search** | **string** | | [default to ""] + **filterStatus** | **[]string** | | + **filterRole** | **[]string** | | + **sort** | **string** | | [default to "-created_at"] + +### Return type + +[**MemberListResponse**](MemberListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkspaceMembers + +> MemberListResponse ListWorkspaceMembers(ctx, workspaceId).Page(page).Limit(limit).Search(search).FilterStatus(filterStatus).FilterRole(filterRole).Sort(sort).Execute() + +GET /accounts/workspace//members/ + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + workspaceId := "workspaceId_example" // string | + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 20) + search := "search_example" // string | (optional) (default to "") + filterStatus := []string{"FilterStatus_example"} // []string | (optional) + filterRole := []string{"Inner_example"} // []string | (optional) + sort := "sort_example" // string | (optional) (default to "-created_at") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.ListWorkspaceMembers(context.Background(), workspaceId).Page(page).Limit(limit).Search(search).FilterStatus(filterStatus).FilterRole(filterRole).Sort(sort).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ListWorkspaceMembers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListWorkspaceMembers`: MemberListResponse + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ListWorkspaceMembers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workspaceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListWorkspaceMembersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 20] + **search** | **string** | | [default to ""] + **filterStatus** | **[]string** | | + **filterRole** | **[]string** | | + **sort** | **string** | | [default to "-created_at"] + +### Return type + +[**MemberListResponse**](MemberListResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkspaces + +> WorkspaceListPaginatedResponse ListWorkspaces(ctx).Page(page).Limit(limit).Search(search).Sort(sort).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 10) + search := "search_example" // string | (optional) (default to "") + sort := "sort_example" // string | (optional) (default to "") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.ListWorkspaces(context.Background()).Page(page).Limit(limit).Search(search).Sort(sort).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.ListWorkspaces``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListWorkspaces`: WorkspaceListPaginatedResponse + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.ListWorkspaces`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListWorkspacesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 10] + **search** | **string** | | [default to ""] + **sort** | **string** | | [default to ""] + +### Return type + +[**WorkspaceListPaginatedResponse**](WorkspaceListPaginatedResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SwitchWorkspace + +> SwitchWorkspaceResponse SwitchWorkspace(ctx).SwitchWorkspace(switchWorkspace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/future-agi/futureagi-sdk/go/futureagi" +) + +func main() { + switchWorkspace := *openapiclient.NewSwitchWorkspace("NewWorkspaceId_example") // SwitchWorkspace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersAPI.SwitchWorkspace(context.Background()).SwitchWorkspace(switchWorkspace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.SwitchWorkspace``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SwitchWorkspace`: SwitchWorkspaceResponse + fmt.Fprintf(os.Stdout, "Response from `UsersAPI.SwitchWorkspace`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSwitchWorkspaceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **switchWorkspace** | [**SwitchWorkspace**](SwitchWorkspace.md) | | + +### Return type + +[**SwitchWorkspaceResponse**](SwitchWorkspaceResponse.md) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go/futureagi/go.mod b/go/futureagi/go.mod new file mode 100644 index 0000000..8286ccd --- /dev/null +++ b/go/futureagi/go.mod @@ -0,0 +1,6 @@ +module github.com/future-agi/futureagi-sdk/go/futureagi + +go 1.18 + +require ( +) diff --git a/go/futureagi/go.sum b/go/futureagi/go.sum new file mode 100644 index 0000000..c966c8d --- /dev/null +++ b/go/futureagi/go.sum @@ -0,0 +1,11 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/go/futureagi/model_accounts_error_response.go b/go/futureagi/model_accounts_error_response.go new file mode 100644 index 0000000..5e12e4d --- /dev/null +++ b/go/futureagi/model_accounts_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AccountsErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccountsErrorResponse{} + +// AccountsErrorResponse struct for AccountsErrorResponse +type AccountsErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewAccountsErrorResponse instantiates a new AccountsErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccountsErrorResponse() *AccountsErrorResponse { + this := AccountsErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewAccountsErrorResponseWithDefaults instantiates a new AccountsErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccountsErrorResponseWithDefaults() *AccountsErrorResponse { + this := AccountsErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AccountsErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountsErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *AccountsErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountsErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountsErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *AccountsErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *AccountsErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *AccountsErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountsErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountsErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *AccountsErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *AccountsErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *AccountsErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountsErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountsErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *AccountsErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *AccountsErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *AccountsErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountsErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountsErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *AccountsErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *AccountsErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *AccountsErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountsErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountsErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *AccountsErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *AccountsErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *AccountsErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountsErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountsErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *AccountsErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *AccountsErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *AccountsErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountsErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountsErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *AccountsErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *AccountsErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *AccountsErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *AccountsErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountsErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *AccountsErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *AccountsErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o AccountsErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountsErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableAccountsErrorResponse struct { + value *AccountsErrorResponse + isSet bool +} + +func (v NullableAccountsErrorResponse) Get() *AccountsErrorResponse { + return v.value +} + +func (v *NullableAccountsErrorResponse) Set(val *AccountsErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAccountsErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountsErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountsErrorResponse(val *AccountsErrorResponse) *NullableAccountsErrorResponse { + return &NullableAccountsErrorResponse{value: val, isSet: true} +} + +func (v NullableAccountsErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountsErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_api_column_request.go b/go/futureagi/model_add_api_column_request.go new file mode 100644 index 0000000..04dd054 --- /dev/null +++ b/go/futureagi/model_add_api_column_request.go @@ -0,0 +1,225 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddApiColumnRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddApiColumnRequest{} + +// AddApiColumnRequest struct for AddApiColumnRequest +type AddApiColumnRequest struct { + ColumnName string `json:"column_name"` + Config map[string]interface{} `json:"config"` + Concurrency *int32 `json:"concurrency,omitempty"` +} + +type _AddApiColumnRequest AddApiColumnRequest + +// NewAddApiColumnRequest instantiates a new AddApiColumnRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddApiColumnRequest(columnName string, config map[string]interface{}) *AddApiColumnRequest { + this := AddApiColumnRequest{} + this.ColumnName = columnName + this.Config = config + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// NewAddApiColumnRequestWithDefaults instantiates a new AddApiColumnRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddApiColumnRequestWithDefaults() *AddApiColumnRequest { + this := AddApiColumnRequest{} + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// GetColumnName returns the ColumnName field value +func (o *AddApiColumnRequest) GetColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnName +} + +// GetColumnNameOk returns a tuple with the ColumnName field value +// and a boolean to check if the value has been set. +func (o *AddApiColumnRequest) GetColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnName, true +} + +// SetColumnName sets field value +func (o *AddApiColumnRequest) SetColumnName(v string) { + o.ColumnName = v +} + +// GetConfig returns the Config field value +func (o *AddApiColumnRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *AddApiColumnRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *AddApiColumnRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConcurrency returns the Concurrency field value if set, zero value otherwise. +func (o *AddApiColumnRequest) GetConcurrency() int32 { + if o == nil || IsNil(o.Concurrency) { + var ret int32 + return ret + } + return *o.Concurrency +} + +// GetConcurrencyOk returns a tuple with the Concurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddApiColumnRequest) GetConcurrencyOk() (*int32, bool) { + if o == nil || IsNil(o.Concurrency) { + return nil, false + } + return o.Concurrency, true +} + +// HasConcurrency returns a boolean if a field has been set. +func (o *AddApiColumnRequest) HasConcurrency() bool { + if o != nil && !IsNil(o.Concurrency) { + return true + } + + return false +} + +// SetConcurrency gets a reference to the given int32 and assigns it to the Concurrency field. +func (o *AddApiColumnRequest) SetConcurrency(v int32) { + o.Concurrency = &v +} + +func (o AddApiColumnRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddApiColumnRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_name"] = o.ColumnName + toSerialize["config"] = o.Config + if !IsNil(o.Concurrency) { + toSerialize["concurrency"] = o.Concurrency + } + return toSerialize, nil +} + +func (o *AddApiColumnRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_name", + "config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddApiColumnRequest := _AddApiColumnRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddApiColumnRequest) + + if err != nil { + return err + } + + *o = AddApiColumnRequest(varAddApiColumnRequest) + + return err +} + +type NullableAddApiColumnRequest struct { + value *AddApiColumnRequest + isSet bool +} + +func (v NullableAddApiColumnRequest) Get() *AddApiColumnRequest { + return v.value +} + +func (v *NullableAddApiColumnRequest) Set(val *AddApiColumnRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddApiColumnRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddApiColumnRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddApiColumnRequest(val *AddApiColumnRequest) *NullableAddApiColumnRequest { + return &NullableAddApiColumnRequest{value: val, isSet: true} +} + +func (v NullableAddApiColumnRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddApiColumnRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_as_new_dataset_request.go b/go/futureagi/model_add_as_new_dataset_request.go new file mode 100644 index 0000000..8003548 --- /dev/null +++ b/go/futureagi/model_add_as_new_dataset_request.go @@ -0,0 +1,229 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddAsNewDatasetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddAsNewDatasetRequest{} + +// AddAsNewDatasetRequest struct for AddAsNewDatasetRequest +type AddAsNewDatasetRequest struct { + DatasetId string `json:"dataset_id"` + Name *string `json:"name,omitempty"` + Columns map[string]interface{} `json:"columns,omitempty"` +} + +type _AddAsNewDatasetRequest AddAsNewDatasetRequest + +// NewAddAsNewDatasetRequest instantiates a new AddAsNewDatasetRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddAsNewDatasetRequest(datasetId string) *AddAsNewDatasetRequest { + this := AddAsNewDatasetRequest{} + this.DatasetId = datasetId + return &this +} + +// NewAddAsNewDatasetRequestWithDefaults instantiates a new AddAsNewDatasetRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddAsNewDatasetRequestWithDefaults() *AddAsNewDatasetRequest { + this := AddAsNewDatasetRequest{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *AddAsNewDatasetRequest) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *AddAsNewDatasetRequest) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *AddAsNewDatasetRequest) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AddAsNewDatasetRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddAsNewDatasetRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AddAsNewDatasetRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AddAsNewDatasetRequest) SetName(v string) { + o.Name = &v +} + +// GetColumns returns the Columns field value if set, zero value otherwise. +func (o *AddAsNewDatasetRequest) GetColumns() map[string]interface{} { + if o == nil || IsNil(o.Columns) { + var ret map[string]interface{} + return ret + } + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddAsNewDatasetRequest) GetColumnsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Columns) { + return map[string]interface{}{}, false + } + return o.Columns, true +} + +// HasColumns returns a boolean if a field has been set. +func (o *AddAsNewDatasetRequest) HasColumns() bool { + if o != nil && !IsNil(o.Columns) { + return true + } + + return false +} + +// SetColumns gets a reference to the given map[string]interface{} and assigns it to the Columns field. +func (o *AddAsNewDatasetRequest) SetColumns(v map[string]interface{}) { + o.Columns = v +} + +func (o AddAsNewDatasetRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddAsNewDatasetRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Columns) { + toSerialize["columns"] = o.Columns + } + return toSerialize, nil +} + +func (o *AddAsNewDatasetRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddAsNewDatasetRequest := _AddAsNewDatasetRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddAsNewDatasetRequest) + + if err != nil { + return err + } + + *o = AddAsNewDatasetRequest(varAddAsNewDatasetRequest) + + return err +} + +type NullableAddAsNewDatasetRequest struct { + value *AddAsNewDatasetRequest + isSet bool +} + +func (v NullableAddAsNewDatasetRequest) Get() *AddAsNewDatasetRequest { + return v.value +} + +func (v *NullableAddAsNewDatasetRequest) Set(val *AddAsNewDatasetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddAsNewDatasetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddAsNewDatasetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddAsNewDatasetRequest(val *AddAsNewDatasetRequest) *NullableAddAsNewDatasetRequest { + return &NullableAddAsNewDatasetRequest{value: val, isSet: true} +} + +func (v NullableAddAsNewDatasetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddAsNewDatasetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_eval_configs_request.go b/go/futureagi/model_add_eval_configs_request.go new file mode 100644 index 0000000..c7873fd --- /dev/null +++ b/go/futureagi/model_add_eval_configs_request.go @@ -0,0 +1,158 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddEvalConfigsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddEvalConfigsRequest{} + +// AddEvalConfigsRequest struct for AddEvalConfigsRequest +type AddEvalConfigsRequest struct { + // Array of evaluation configuration objects to add. At least one required. + EvaluationsConfig []EvalConfigDefinition `json:"evaluations_config"` +} + +type _AddEvalConfigsRequest AddEvalConfigsRequest + +// NewAddEvalConfigsRequest instantiates a new AddEvalConfigsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddEvalConfigsRequest(evaluationsConfig []EvalConfigDefinition) *AddEvalConfigsRequest { + this := AddEvalConfigsRequest{} + this.EvaluationsConfig = evaluationsConfig + return &this +} + +// NewAddEvalConfigsRequestWithDefaults instantiates a new AddEvalConfigsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddEvalConfigsRequestWithDefaults() *AddEvalConfigsRequest { + this := AddEvalConfigsRequest{} + return &this +} + +// GetEvaluationsConfig returns the EvaluationsConfig field value +func (o *AddEvalConfigsRequest) GetEvaluationsConfig() []EvalConfigDefinition { + if o == nil { + var ret []EvalConfigDefinition + return ret + } + + return o.EvaluationsConfig +} + +// GetEvaluationsConfigOk returns a tuple with the EvaluationsConfig field value +// and a boolean to check if the value has been set. +func (o *AddEvalConfigsRequest) GetEvaluationsConfigOk() ([]EvalConfigDefinition, bool) { + if o == nil { + return nil, false + } + return o.EvaluationsConfig, true +} + +// SetEvaluationsConfig sets field value +func (o *AddEvalConfigsRequest) SetEvaluationsConfig(v []EvalConfigDefinition) { + o.EvaluationsConfig = v +} + +func (o AddEvalConfigsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddEvalConfigsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["evaluations_config"] = o.EvaluationsConfig + return toSerialize, nil +} + +func (o *AddEvalConfigsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "evaluations_config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddEvalConfigsRequest := _AddEvalConfigsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddEvalConfigsRequest) + + if err != nil { + return err + } + + *o = AddEvalConfigsRequest(varAddEvalConfigsRequest) + + return err +} + +type NullableAddEvalConfigsRequest struct { + value *AddEvalConfigsRequest + isSet bool +} + +func (v NullableAddEvalConfigsRequest) Get() *AddEvalConfigsRequest { + return v.value +} + +func (v *NullableAddEvalConfigsRequest) Set(val *AddEvalConfigsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddEvalConfigsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddEvalConfigsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddEvalConfigsRequest(val *AddEvalConfigsRequest) *NullableAddEvalConfigsRequest { + return &NullableAddEvalConfigsRequest{value: val, isSet: true} +} + +func (v NullableAddEvalConfigsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddEvalConfigsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_eval_configs_response.go b/go/futureagi/model_add_eval_configs_response.go new file mode 100644 index 0000000..21f700b --- /dev/null +++ b/go/futureagi/model_add_eval_configs_response.go @@ -0,0 +1,250 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddEvalConfigsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddEvalConfigsResponse{} + +// AddEvalConfigsResponse struct for AddEvalConfigsResponse +type AddEvalConfigsResponse struct { + Message string `json:"message"` + CreatedEvalConfigs []EvalConfigResponse `json:"created_eval_configs"` + RunTestId string `json:"run_test_id"` + // Non-fatal issues encountered while processing individual configs. + Warnings []string `json:"warnings,omitempty"` +} + +type _AddEvalConfigsResponse AddEvalConfigsResponse + +// NewAddEvalConfigsResponse instantiates a new AddEvalConfigsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddEvalConfigsResponse(message string, createdEvalConfigs []EvalConfigResponse, runTestId string) *AddEvalConfigsResponse { + this := AddEvalConfigsResponse{} + this.Message = message + this.CreatedEvalConfigs = createdEvalConfigs + this.RunTestId = runTestId + return &this +} + +// NewAddEvalConfigsResponseWithDefaults instantiates a new AddEvalConfigsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddEvalConfigsResponseWithDefaults() *AddEvalConfigsResponse { + this := AddEvalConfigsResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *AddEvalConfigsResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *AddEvalConfigsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *AddEvalConfigsResponse) SetMessage(v string) { + o.Message = v +} + +// GetCreatedEvalConfigs returns the CreatedEvalConfigs field value +func (o *AddEvalConfigsResponse) GetCreatedEvalConfigs() []EvalConfigResponse { + if o == nil { + var ret []EvalConfigResponse + return ret + } + + return o.CreatedEvalConfigs +} + +// GetCreatedEvalConfigsOk returns a tuple with the CreatedEvalConfigs field value +// and a boolean to check if the value has been set. +func (o *AddEvalConfigsResponse) GetCreatedEvalConfigsOk() ([]EvalConfigResponse, bool) { + if o == nil { + return nil, false + } + return o.CreatedEvalConfigs, true +} + +// SetCreatedEvalConfigs sets field value +func (o *AddEvalConfigsResponse) SetCreatedEvalConfigs(v []EvalConfigResponse) { + o.CreatedEvalConfigs = v +} + +// GetRunTestId returns the RunTestId field value +func (o *AddEvalConfigsResponse) GetRunTestId() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value +// and a boolean to check if the value has been set. +func (o *AddEvalConfigsResponse) GetRunTestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestId, true +} + +// SetRunTestId sets field value +func (o *AddEvalConfigsResponse) SetRunTestId(v string) { + o.RunTestId = v +} + +// GetWarnings returns the Warnings field value if set, zero value otherwise. +func (o *AddEvalConfigsResponse) GetWarnings() []string { + if o == nil || IsNil(o.Warnings) { + var ret []string + return ret + } + return o.Warnings +} + +// GetWarningsOk returns a tuple with the Warnings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddEvalConfigsResponse) GetWarningsOk() ([]string, bool) { + if o == nil || IsNil(o.Warnings) { + return nil, false + } + return o.Warnings, true +} + +// HasWarnings returns a boolean if a field has been set. +func (o *AddEvalConfigsResponse) HasWarnings() bool { + if o != nil && !IsNil(o.Warnings) { + return true + } + + return false +} + +// SetWarnings gets a reference to the given []string and assigns it to the Warnings field. +func (o *AddEvalConfigsResponse) SetWarnings(v []string) { + o.Warnings = v +} + +func (o AddEvalConfigsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddEvalConfigsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["created_eval_configs"] = o.CreatedEvalConfigs + toSerialize["run_test_id"] = o.RunTestId + if !IsNil(o.Warnings) { + toSerialize["warnings"] = o.Warnings + } + return toSerialize, nil +} + +func (o *AddEvalConfigsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "created_eval_configs", + "run_test_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddEvalConfigsResponse := _AddEvalConfigsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddEvalConfigsResponse) + + if err != nil { + return err + } + + *o = AddEvalConfigsResponse(varAddEvalConfigsResponse) + + return err +} + +type NullableAddEvalConfigsResponse struct { + value *AddEvalConfigsResponse + isSet bool +} + +func (v NullableAddEvalConfigsResponse) Get() *AddEvalConfigsResponse { + return v.value +} + +func (v *NullableAddEvalConfigsResponse) Set(val *AddEvalConfigsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAddEvalConfigsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAddEvalConfigsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddEvalConfigsResponse(val *AddEvalConfigsResponse) *NullableAddEvalConfigsResponse { + return &NullableAddEvalConfigsResponse{value: val, isSet: true} +} + +func (v NullableAddEvalConfigsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddEvalConfigsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_items.go b/go/futureagi/model_add_items.go new file mode 100644 index 0000000..c7a720c --- /dev/null +++ b/go/futureagi/model_add_items.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AddItems type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddItems{} + +// AddItems struct for AddItems +type AddItems struct { + Items []AddQueueItem `json:"items,omitempty"` + Selection *Selection `json:"selection,omitempty"` +} + +// NewAddItems instantiates a new AddItems object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddItems() *AddItems { + this := AddItems{} + return &this +} + +// NewAddItemsWithDefaults instantiates a new AddItems object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddItemsWithDefaults() *AddItems { + this := AddItems{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *AddItems) GetItems() []AddQueueItem { + if o == nil || IsNil(o.Items) { + var ret []AddQueueItem + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddItems) GetItemsOk() ([]AddQueueItem, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *AddItems) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []AddQueueItem and assigns it to the Items field. +func (o *AddItems) SetItems(v []AddQueueItem) { + o.Items = v +} + +// GetSelection returns the Selection field value if set, zero value otherwise. +func (o *AddItems) GetSelection() Selection { + if o == nil || IsNil(o.Selection) { + var ret Selection + return ret + } + return *o.Selection +} + +// GetSelectionOk returns a tuple with the Selection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddItems) GetSelectionOk() (*Selection, bool) { + if o == nil || IsNil(o.Selection) { + return nil, false + } + return o.Selection, true +} + +// HasSelection returns a boolean if a field has been set. +func (o *AddItems) HasSelection() bool { + if o != nil && !IsNil(o.Selection) { + return true + } + + return false +} + +// SetSelection gets a reference to the given Selection and assigns it to the Selection field. +func (o *AddItems) SetSelection(v Selection) { + o.Selection = &v +} + +func (o AddItems) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddItems) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + if !IsNil(o.Selection) { + toSerialize["selection"] = o.Selection + } + return toSerialize, nil +} + +type NullableAddItems struct { + value *AddItems + isSet bool +} + +func (v NullableAddItems) Get() *AddItems { + return v.value +} + +func (v *NullableAddItems) Set(val *AddItems) { + v.value = val + v.isSet = true +} + +func (v NullableAddItems) IsSet() bool { + return v.isSet +} + +func (v *NullableAddItems) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddItems(val *AddItems) *NullableAddItems { + return &NullableAddItems{value: val, isSet: true} +} + +func (v NullableAddItems) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddItems) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_queue_item.go b/go/futureagi/model_add_queue_item.go new file mode 100644 index 0000000..1b209f8 --- /dev/null +++ b/go/futureagi/model_add_queue_item.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddQueueItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddQueueItem{} + +// AddQueueItem struct for AddQueueItem +type AddQueueItem struct { + SourceType string `json:"source_type"` + SourceId string `json:"source_id"` +} + +type _AddQueueItem AddQueueItem + +// NewAddQueueItem instantiates a new AddQueueItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddQueueItem(sourceType string, sourceId string) *AddQueueItem { + this := AddQueueItem{} + this.SourceType = sourceType + this.SourceId = sourceId + return &this +} + +// NewAddQueueItemWithDefaults instantiates a new AddQueueItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddQueueItemWithDefaults() *AddQueueItem { + this := AddQueueItem{} + return &this +} + +// GetSourceType returns the SourceType field value +func (o *AddQueueItem) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *AddQueueItem) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *AddQueueItem) SetSourceType(v string) { + o.SourceType = v +} + +// GetSourceId returns the SourceId field value +func (o *AddQueueItem) GetSourceId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value +// and a boolean to check if the value has been set. +func (o *AddQueueItem) GetSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceId, true +} + +// SetSourceId sets field value +func (o *AddQueueItem) SetSourceId(v string) { + o.SourceId = v +} + +func (o AddQueueItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddQueueItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source_type"] = o.SourceType + toSerialize["source_id"] = o.SourceId + return toSerialize, nil +} + +func (o *AddQueueItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source_type", + "source_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddQueueItem := _AddQueueItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddQueueItem) + + if err != nil { + return err + } + + *o = AddQueueItem(varAddQueueItem) + + return err +} + +type NullableAddQueueItem struct { + value *AddQueueItem + isSet bool +} + +func (v NullableAddQueueItem) Get() *AddQueueItem { + return v.value +} + +func (v *NullableAddQueueItem) Set(val *AddQueueItem) { + v.value = val + v.isSet = true +} + +func (v NullableAddQueueItem) IsSet() bool { + return v.isSet +} + +func (v *NullableAddQueueItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddQueueItem(val *AddQueueItem) *NullableAddQueueItem { + return &NullableAddQueueItem{value: val, isSet: true} +} + +func (v NullableAddQueueItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddQueueItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_rows_from_file_request.go b/go/futureagi/model_add_rows_from_file_request.go new file mode 100644 index 0000000..8c0a5b1 --- /dev/null +++ b/go/futureagi/model_add_rows_from_file_request.go @@ -0,0 +1,229 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddRowsFromFileRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddRowsFromFileRequest{} + +// AddRowsFromFileRequest struct for AddRowsFromFileRequest +type AddRowsFromFileRequest struct { + File *string `json:"file,omitempty"` + DatasetId string `json:"dataset_id"` + ModelType *string `json:"model_type,omitempty"` +} + +type _AddRowsFromFileRequest AddRowsFromFileRequest + +// NewAddRowsFromFileRequest instantiates a new AddRowsFromFileRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddRowsFromFileRequest(datasetId string) *AddRowsFromFileRequest { + this := AddRowsFromFileRequest{} + this.DatasetId = datasetId + return &this +} + +// NewAddRowsFromFileRequestWithDefaults instantiates a new AddRowsFromFileRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddRowsFromFileRequestWithDefaults() *AddRowsFromFileRequest { + this := AddRowsFromFileRequest{} + return &this +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *AddRowsFromFileRequest) GetFile() string { + if o == nil || IsNil(o.File) { + var ret string + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddRowsFromFileRequest) GetFileOk() (*string, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *AddRowsFromFileRequest) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given string and assigns it to the File field. +func (o *AddRowsFromFileRequest) SetFile(v string) { + o.File = &v +} + +// GetDatasetId returns the DatasetId field value +func (o *AddRowsFromFileRequest) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *AddRowsFromFileRequest) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *AddRowsFromFileRequest) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetModelType returns the ModelType field value if set, zero value otherwise. +func (o *AddRowsFromFileRequest) GetModelType() string { + if o == nil || IsNil(o.ModelType) { + var ret string + return ret + } + return *o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddRowsFromFileRequest) GetModelTypeOk() (*string, bool) { + if o == nil || IsNil(o.ModelType) { + return nil, false + } + return o.ModelType, true +} + +// HasModelType returns a boolean if a field has been set. +func (o *AddRowsFromFileRequest) HasModelType() bool { + if o != nil && !IsNil(o.ModelType) { + return true + } + + return false +} + +// SetModelType gets a reference to the given string and assigns it to the ModelType field. +func (o *AddRowsFromFileRequest) SetModelType(v string) { + o.ModelType = &v +} + +func (o AddRowsFromFileRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddRowsFromFileRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + toSerialize["dataset_id"] = o.DatasetId + if !IsNil(o.ModelType) { + toSerialize["model_type"] = o.ModelType + } + return toSerialize, nil +} + +func (o *AddRowsFromFileRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddRowsFromFileRequest := _AddRowsFromFileRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddRowsFromFileRequest) + + if err != nil { + return err + } + + *o = AddRowsFromFileRequest(varAddRowsFromFileRequest) + + return err +} + +type NullableAddRowsFromFileRequest struct { + value *AddRowsFromFileRequest + isSet bool +} + +func (v NullableAddRowsFromFileRequest) Get() *AddRowsFromFileRequest { + return v.value +} + +func (v *NullableAddRowsFromFileRequest) Set(val *AddRowsFromFileRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddRowsFromFileRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddRowsFromFileRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddRowsFromFileRequest(val *AddRowsFromFileRequest) *NullableAddRowsFromFileRequest { + return &NullableAddRowsFromFileRequest{value: val, isSet: true} +} + +func (v NullableAddRowsFromFileRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddRowsFromFileRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_add_run_prompt.go b/go/futureagi/model_add_run_prompt.go new file mode 100644 index 0000000..d19b500 --- /dev/null +++ b/go/futureagi/model_add_run_prompt.go @@ -0,0 +1,221 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddRunPrompt type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddRunPrompt{} + +// AddRunPrompt struct for AddRunPrompt +type AddRunPrompt struct { + DatasetId string `json:"dataset_id"` + Name string `json:"name"` + Config *PromptConfig `json:"config,omitempty"` +} + +type _AddRunPrompt AddRunPrompt + +// NewAddRunPrompt instantiates a new AddRunPrompt object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddRunPrompt(datasetId string, name string) *AddRunPrompt { + this := AddRunPrompt{} + this.DatasetId = datasetId + this.Name = name + return &this +} + +// NewAddRunPromptWithDefaults instantiates a new AddRunPrompt object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddRunPromptWithDefaults() *AddRunPrompt { + this := AddRunPrompt{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *AddRunPrompt) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *AddRunPrompt) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *AddRunPrompt) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetName returns the Name field value +func (o *AddRunPrompt) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AddRunPrompt) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AddRunPrompt) SetName(v string) { + o.Name = v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *AddRunPrompt) GetConfig() PromptConfig { + if o == nil || IsNil(o.Config) { + var ret PromptConfig + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddRunPrompt) GetConfigOk() (*PromptConfig, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *AddRunPrompt) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given PromptConfig and assigns it to the Config field. +func (o *AddRunPrompt) SetConfig(v PromptConfig) { + o.Config = &v +} + +func (o AddRunPrompt) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddRunPrompt) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["name"] = o.Name + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + return toSerialize, nil +} + +func (o *AddRunPrompt) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddRunPrompt := _AddRunPrompt{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddRunPrompt) + + if err != nil { + return err + } + + *o = AddRunPrompt(varAddRunPrompt) + + return err +} + +type NullableAddRunPrompt struct { + value *AddRunPrompt + isSet bool +} + +func (v NullableAddRunPrompt) Get() *AddRunPrompt { + return v.value +} + +func (v *NullableAddRunPrompt) Set(val *AddRunPrompt) { + v.value = val + v.isSet = true +} + +func (v NullableAddRunPrompt) IsSet() bool { + return v.isSet +} + +func (v *NullableAddRunPrompt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddRunPrompt(val *AddRunPrompt) *NullableAddRunPrompt { + return &NullableAddRunPrompt{value: val, isSet: true} +} + +func (v NullableAddRunPrompt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddRunPrompt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_bulk_delete_request.go b/go/futureagi/model_agent_definition_bulk_delete_request.go new file mode 100644 index 0000000..35713f3 --- /dev/null +++ b/go/futureagi/model_agent_definition_bulk_delete_request.go @@ -0,0 +1,158 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AgentDefinitionBulkDeleteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionBulkDeleteRequest{} + +// AgentDefinitionBulkDeleteRequest struct for AgentDefinitionBulkDeleteRequest +type AgentDefinitionBulkDeleteRequest struct { + // List of agent definition UUIDs to delete. + AgentIds []string `json:"agent_ids"` +} + +type _AgentDefinitionBulkDeleteRequest AgentDefinitionBulkDeleteRequest + +// NewAgentDefinitionBulkDeleteRequest instantiates a new AgentDefinitionBulkDeleteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionBulkDeleteRequest(agentIds []string) *AgentDefinitionBulkDeleteRequest { + this := AgentDefinitionBulkDeleteRequest{} + this.AgentIds = agentIds + return &this +} + +// NewAgentDefinitionBulkDeleteRequestWithDefaults instantiates a new AgentDefinitionBulkDeleteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionBulkDeleteRequestWithDefaults() *AgentDefinitionBulkDeleteRequest { + this := AgentDefinitionBulkDeleteRequest{} + return &this +} + +// GetAgentIds returns the AgentIds field value +func (o *AgentDefinitionBulkDeleteRequest) GetAgentIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.AgentIds +} + +// GetAgentIdsOk returns a tuple with the AgentIds field value +// and a boolean to check if the value has been set. +func (o *AgentDefinitionBulkDeleteRequest) GetAgentIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.AgentIds, true +} + +// SetAgentIds sets field value +func (o *AgentDefinitionBulkDeleteRequest) SetAgentIds(v []string) { + o.AgentIds = v +} + +func (o AgentDefinitionBulkDeleteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionBulkDeleteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["agent_ids"] = o.AgentIds + return toSerialize, nil +} + +func (o *AgentDefinitionBulkDeleteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "agent_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAgentDefinitionBulkDeleteRequest := _AgentDefinitionBulkDeleteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAgentDefinitionBulkDeleteRequest) + + if err != nil { + return err + } + + *o = AgentDefinitionBulkDeleteRequest(varAgentDefinitionBulkDeleteRequest) + + return err +} + +type NullableAgentDefinitionBulkDeleteRequest struct { + value *AgentDefinitionBulkDeleteRequest + isSet bool +} + +func (v NullableAgentDefinitionBulkDeleteRequest) Get() *AgentDefinitionBulkDeleteRequest { + return v.value +} + +func (v *NullableAgentDefinitionBulkDeleteRequest) Set(val *AgentDefinitionBulkDeleteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionBulkDeleteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionBulkDeleteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionBulkDeleteRequest(val *AgentDefinitionBulkDeleteRequest) *NullableAgentDefinitionBulkDeleteRequest { + return &NullableAgentDefinitionBulkDeleteRequest{value: val, isSet: true} +} + +func (v NullableAgentDefinitionBulkDeleteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionBulkDeleteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_bulk_delete_response.go b/go/futureagi/model_agent_definition_bulk_delete_response.go new file mode 100644 index 0000000..39a9dc5 --- /dev/null +++ b/go/futureagi/model_agent_definition_bulk_delete_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentDefinitionBulkDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionBulkDeleteResponse{} + +// AgentDefinitionBulkDeleteResponse struct for AgentDefinitionBulkDeleteResponse +type AgentDefinitionBulkDeleteResponse struct { + Message *string `json:"message,omitempty"` + AgentsUpdated *int32 `json:"agents_updated,omitempty"` + VersionsUpdated *int32 `json:"versions_updated,omitempty"` +} + +// NewAgentDefinitionBulkDeleteResponse instantiates a new AgentDefinitionBulkDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionBulkDeleteResponse() *AgentDefinitionBulkDeleteResponse { + this := AgentDefinitionBulkDeleteResponse{} + return &this +} + +// NewAgentDefinitionBulkDeleteResponseWithDefaults instantiates a new AgentDefinitionBulkDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionBulkDeleteResponseWithDefaults() *AgentDefinitionBulkDeleteResponse { + this := AgentDefinitionBulkDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentDefinitionBulkDeleteResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionBulkDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentDefinitionBulkDeleteResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentDefinitionBulkDeleteResponse) SetMessage(v string) { + o.Message = &v +} + +// GetAgentsUpdated returns the AgentsUpdated field value if set, zero value otherwise. +func (o *AgentDefinitionBulkDeleteResponse) GetAgentsUpdated() int32 { + if o == nil || IsNil(o.AgentsUpdated) { + var ret int32 + return ret + } + return *o.AgentsUpdated +} + +// GetAgentsUpdatedOk returns a tuple with the AgentsUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionBulkDeleteResponse) GetAgentsUpdatedOk() (*int32, bool) { + if o == nil || IsNil(o.AgentsUpdated) { + return nil, false + } + return o.AgentsUpdated, true +} + +// HasAgentsUpdated returns a boolean if a field has been set. +func (o *AgentDefinitionBulkDeleteResponse) HasAgentsUpdated() bool { + if o != nil && !IsNil(o.AgentsUpdated) { + return true + } + + return false +} + +// SetAgentsUpdated gets a reference to the given int32 and assigns it to the AgentsUpdated field. +func (o *AgentDefinitionBulkDeleteResponse) SetAgentsUpdated(v int32) { + o.AgentsUpdated = &v +} + +// GetVersionsUpdated returns the VersionsUpdated field value if set, zero value otherwise. +func (o *AgentDefinitionBulkDeleteResponse) GetVersionsUpdated() int32 { + if o == nil || IsNil(o.VersionsUpdated) { + var ret int32 + return ret + } + return *o.VersionsUpdated +} + +// GetVersionsUpdatedOk returns a tuple with the VersionsUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionBulkDeleteResponse) GetVersionsUpdatedOk() (*int32, bool) { + if o == nil || IsNil(o.VersionsUpdated) { + return nil, false + } + return o.VersionsUpdated, true +} + +// HasVersionsUpdated returns a boolean if a field has been set. +func (o *AgentDefinitionBulkDeleteResponse) HasVersionsUpdated() bool { + if o != nil && !IsNil(o.VersionsUpdated) { + return true + } + + return false +} + +// SetVersionsUpdated gets a reference to the given int32 and assigns it to the VersionsUpdated field. +func (o *AgentDefinitionBulkDeleteResponse) SetVersionsUpdated(v int32) { + o.VersionsUpdated = &v +} + +func (o AgentDefinitionBulkDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionBulkDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.AgentsUpdated) { + toSerialize["agents_updated"] = o.AgentsUpdated + } + if !IsNil(o.VersionsUpdated) { + toSerialize["versions_updated"] = o.VersionsUpdated + } + return toSerialize, nil +} + +type NullableAgentDefinitionBulkDeleteResponse struct { + value *AgentDefinitionBulkDeleteResponse + isSet bool +} + +func (v NullableAgentDefinitionBulkDeleteResponse) Get() *AgentDefinitionBulkDeleteResponse { + return v.value +} + +func (v *NullableAgentDefinitionBulkDeleteResponse) Set(val *AgentDefinitionBulkDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionBulkDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionBulkDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionBulkDeleteResponse(val *AgentDefinitionBulkDeleteResponse) *NullableAgentDefinitionBulkDeleteResponse { + return &NullableAgentDefinitionBulkDeleteResponse{value: val, isSet: true} +} + +func (v NullableAgentDefinitionBulkDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionBulkDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_create_request.go b/go/futureagi/model_agent_definition_create_request.go new file mode 100644 index 0000000..989c5d4 --- /dev/null +++ b/go/futureagi/model_agent_definition_create_request.go @@ -0,0 +1,1184 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AgentDefinitionCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionCreateRequest{} + +// AgentDefinitionCreateRequest struct for AgentDefinitionCreateRequest +type AgentDefinitionCreateRequest struct { + AgentName string `json:"agent_name"` + // The type of agent. One of: voice, text. + AgentType string `json:"agent_type"` + CommitMessage string `json:"commit_message"` + Inbound *bool `json:"inbound,omitempty"` + Description *string `json:"description,omitempty"` + Provider NullableString `json:"provider,omitempty"` + ApiKey NullableString `json:"api_key,omitempty"` + AssistantId NullableString `json:"assistant_id,omitempty"` + AuthenticationMethod NullableString `json:"authentication_method,omitempty"` + Language NullableString `json:"language,omitempty"` + Languages []string `json:"languages,omitempty"` + ContactNumber NullableString `json:"contact_number,omitempty"` + KnowledgeBase NullableString `json:"knowledge_base,omitempty"` + ObservabilityEnabled *bool `json:"observability_enabled,omitempty"` + Model NullableString `json:"model,omitempty"` + ModelDetails map[string]interface{} `json:"model_details,omitempty"` + WebsocketUrl NullableString `json:"websocket_url,omitempty"` + WebsocketHeaders map[string]interface{} `json:"websocket_headers,omitempty"` + ReplaySessionId NullableString `json:"replay_session_id,omitempty"` + LivekitUrl NullableString `json:"livekit_url,omitempty"` + LivekitApiKey NullableString `json:"livekit_api_key,omitempty"` + LivekitApiSecret NullableString `json:"livekit_api_secret,omitempty"` + LivekitAgentName NullableString `json:"livekit_agent_name,omitempty"` + LivekitConfigJson map[string]interface{} `json:"livekit_config_json,omitempty"` + LivekitMaxConcurrency NullableInt32 `json:"livekit_max_concurrency,omitempty"` +} + +type _AgentDefinitionCreateRequest AgentDefinitionCreateRequest + +// NewAgentDefinitionCreateRequest instantiates a new AgentDefinitionCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionCreateRequest(agentName string, agentType string, commitMessage string) *AgentDefinitionCreateRequest { + this := AgentDefinitionCreateRequest{} + this.AgentName = agentName + this.AgentType = agentType + this.CommitMessage = commitMessage + var inbound bool = true + this.Inbound = &inbound + var description string = "" + this.Description = &description + var observabilityEnabled bool = false + this.ObservabilityEnabled = &observabilityEnabled + return &this +} + +// NewAgentDefinitionCreateRequestWithDefaults instantiates a new AgentDefinitionCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionCreateRequestWithDefaults() *AgentDefinitionCreateRequest { + this := AgentDefinitionCreateRequest{} + var inbound bool = true + this.Inbound = &inbound + var description string = "" + this.Description = &description + var observabilityEnabled bool = false + this.ObservabilityEnabled = &observabilityEnabled + return &this +} + +// GetAgentName returns the AgentName field value +func (o *AgentDefinitionCreateRequest) GetAgentName() string { + if o == nil { + var ret string + return ret + } + + return o.AgentName +} + +// GetAgentNameOk returns a tuple with the AgentName field value +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetAgentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AgentName, true +} + +// SetAgentName sets field value +func (o *AgentDefinitionCreateRequest) SetAgentName(v string) { + o.AgentName = v +} + +// GetAgentType returns the AgentType field value +func (o *AgentDefinitionCreateRequest) GetAgentType() string { + if o == nil { + var ret string + return ret + } + + return o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetAgentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AgentType, true +} + +// SetAgentType sets field value +func (o *AgentDefinitionCreateRequest) SetAgentType(v string) { + o.AgentType = v +} + +// GetCommitMessage returns the CommitMessage field value +func (o *AgentDefinitionCreateRequest) GetCommitMessage() string { + if o == nil { + var ret string + return ret + } + + return o.CommitMessage +} + +// GetCommitMessageOk returns a tuple with the CommitMessage field value +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetCommitMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommitMessage, true +} + +// SetCommitMessage sets field value +func (o *AgentDefinitionCreateRequest) SetCommitMessage(v string) { + o.CommitMessage = v +} + +// GetInbound returns the Inbound field value if set, zero value otherwise. +func (o *AgentDefinitionCreateRequest) GetInbound() bool { + if o == nil || IsNil(o.Inbound) { + var ret bool + return ret + } + return *o.Inbound +} + +// GetInboundOk returns a tuple with the Inbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetInboundOk() (*bool, bool) { + if o == nil || IsNil(o.Inbound) { + return nil, false + } + return o.Inbound, true +} + +// HasInbound returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasInbound() bool { + if o != nil && !IsNil(o.Inbound) { + return true + } + + return false +} + +// SetInbound gets a reference to the given bool and assigns it to the Inbound field. +func (o *AgentDefinitionCreateRequest) SetInbound(v bool) { + o.Inbound = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AgentDefinitionCreateRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AgentDefinitionCreateRequest) SetDescription(v string) { + o.Description = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *AgentDefinitionCreateRequest) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetProvider() { + o.Provider.Unset() +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetApiKey() string { + if o == nil || IsNil(o.ApiKey.Get()) { + var ret string + return ret + } + return *o.ApiKey.Get() +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApiKey.Get(), o.ApiKey.IsSet() +} + +// HasApiKey returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasApiKey() bool { + if o != nil && o.ApiKey.IsSet() { + return true + } + + return false +} + +// SetApiKey gets a reference to the given NullableString and assigns it to the ApiKey field. +func (o *AgentDefinitionCreateRequest) SetApiKey(v string) { + o.ApiKey.Set(&v) +} + +// SetApiKeyNil sets the value for ApiKey to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetApiKeyNil() { + o.ApiKey.Set(nil) +} + +// UnsetApiKey ensures that no value is present for ApiKey, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetApiKey() { + o.ApiKey.Unset() +} + +// GetAssistantId returns the AssistantId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetAssistantId() string { + if o == nil || IsNil(o.AssistantId.Get()) { + var ret string + return ret + } + return *o.AssistantId.Get() +} + +// GetAssistantIdOk returns a tuple with the AssistantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetAssistantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AssistantId.Get(), o.AssistantId.IsSet() +} + +// HasAssistantId returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasAssistantId() bool { + if o != nil && o.AssistantId.IsSet() { + return true + } + + return false +} + +// SetAssistantId gets a reference to the given NullableString and assigns it to the AssistantId field. +func (o *AgentDefinitionCreateRequest) SetAssistantId(v string) { + o.AssistantId.Set(&v) +} + +// SetAssistantIdNil sets the value for AssistantId to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetAssistantIdNil() { + o.AssistantId.Set(nil) +} + +// UnsetAssistantId ensures that no value is present for AssistantId, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetAssistantId() { + o.AssistantId.Unset() +} + +// GetAuthenticationMethod returns the AuthenticationMethod field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetAuthenticationMethod() string { + if o == nil || IsNil(o.AuthenticationMethod.Get()) { + var ret string + return ret + } + return *o.AuthenticationMethod.Get() +} + +// GetAuthenticationMethodOk returns a tuple with the AuthenticationMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetAuthenticationMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthenticationMethod.Get(), o.AuthenticationMethod.IsSet() +} + +// HasAuthenticationMethod returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasAuthenticationMethod() bool { + if o != nil && o.AuthenticationMethod.IsSet() { + return true + } + + return false +} + +// SetAuthenticationMethod gets a reference to the given NullableString and assigns it to the AuthenticationMethod field. +func (o *AgentDefinitionCreateRequest) SetAuthenticationMethod(v string) { + o.AuthenticationMethod.Set(&v) +} + +// SetAuthenticationMethodNil sets the value for AuthenticationMethod to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetAuthenticationMethodNil() { + o.AuthenticationMethod.Set(nil) +} + +// UnsetAuthenticationMethod ensures that no value is present for AuthenticationMethod, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetAuthenticationMethod() { + o.AuthenticationMethod.Unset() +} + +// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetLanguage() string { + if o == nil || IsNil(o.Language.Get()) { + var ret string + return ret + } + return *o.Language.Get() +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Language.Get(), o.Language.IsSet() +} + +// HasLanguage returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLanguage() bool { + if o != nil && o.Language.IsSet() { + return true + } + + return false +} + +// SetLanguage gets a reference to the given NullableString and assigns it to the Language field. +func (o *AgentDefinitionCreateRequest) SetLanguage(v string) { + o.Language.Set(&v) +} + +// SetLanguageNil sets the value for Language to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetLanguageNil() { + o.Language.Set(nil) +} + +// UnsetLanguage ensures that no value is present for Language, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetLanguage() { + o.Language.Unset() +} + +// GetLanguages returns the Languages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetLanguages() []string { + if o == nil { + var ret []string + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetLanguagesOk() ([]string, bool) { + if o == nil || IsNil(o.Languages) { + return nil, false + } + return o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLanguages() bool { + if o != nil && !IsNil(o.Languages) { + return true + } + + return false +} + +// SetLanguages gets a reference to the given []string and assigns it to the Languages field. +func (o *AgentDefinitionCreateRequest) SetLanguages(v []string) { + o.Languages = v +} + +// GetContactNumber returns the ContactNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetContactNumber() string { + if o == nil || IsNil(o.ContactNumber.Get()) { + var ret string + return ret + } + return *o.ContactNumber.Get() +} + +// GetContactNumberOk returns a tuple with the ContactNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetContactNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContactNumber.Get(), o.ContactNumber.IsSet() +} + +// HasContactNumber returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasContactNumber() bool { + if o != nil && o.ContactNumber.IsSet() { + return true + } + + return false +} + +// SetContactNumber gets a reference to the given NullableString and assigns it to the ContactNumber field. +func (o *AgentDefinitionCreateRequest) SetContactNumber(v string) { + o.ContactNumber.Set(&v) +} + +// SetContactNumberNil sets the value for ContactNumber to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetContactNumberNil() { + o.ContactNumber.Set(nil) +} + +// UnsetContactNumber ensures that no value is present for ContactNumber, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetContactNumber() { + o.ContactNumber.Unset() +} + +// GetKnowledgeBase returns the KnowledgeBase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetKnowledgeBase() string { + if o == nil || IsNil(o.KnowledgeBase.Get()) { + var ret string + return ret + } + return *o.KnowledgeBase.Get() +} + +// GetKnowledgeBaseOk returns a tuple with the KnowledgeBase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetKnowledgeBaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KnowledgeBase.Get(), o.KnowledgeBase.IsSet() +} + +// HasKnowledgeBase returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasKnowledgeBase() bool { + if o != nil && o.KnowledgeBase.IsSet() { + return true + } + + return false +} + +// SetKnowledgeBase gets a reference to the given NullableString and assigns it to the KnowledgeBase field. +func (o *AgentDefinitionCreateRequest) SetKnowledgeBase(v string) { + o.KnowledgeBase.Set(&v) +} + +// SetKnowledgeBaseNil sets the value for KnowledgeBase to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetKnowledgeBaseNil() { + o.KnowledgeBase.Set(nil) +} + +// UnsetKnowledgeBase ensures that no value is present for KnowledgeBase, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetKnowledgeBase() { + o.KnowledgeBase.Unset() +} + +// GetObservabilityEnabled returns the ObservabilityEnabled field value if set, zero value otherwise. +func (o *AgentDefinitionCreateRequest) GetObservabilityEnabled() bool { + if o == nil || IsNil(o.ObservabilityEnabled) { + var ret bool + return ret + } + return *o.ObservabilityEnabled +} + +// GetObservabilityEnabledOk returns a tuple with the ObservabilityEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetObservabilityEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.ObservabilityEnabled) { + return nil, false + } + return o.ObservabilityEnabled, true +} + +// HasObservabilityEnabled returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasObservabilityEnabled() bool { + if o != nil && !IsNil(o.ObservabilityEnabled) { + return true + } + + return false +} + +// SetObservabilityEnabled gets a reference to the given bool and assigns it to the ObservabilityEnabled field. +func (o *AgentDefinitionCreateRequest) SetObservabilityEnabled(v bool) { + o.ObservabilityEnabled = &v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *AgentDefinitionCreateRequest) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetModel() { + o.Model.Unset() +} + +// GetModelDetails returns the ModelDetails field value if set, zero value otherwise. +func (o *AgentDefinitionCreateRequest) GetModelDetails() map[string]interface{} { + if o == nil || IsNil(o.ModelDetails) { + var ret map[string]interface{} + return ret + } + return o.ModelDetails +} + +// GetModelDetailsOk returns a tuple with the ModelDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetModelDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ModelDetails) { + return map[string]interface{}{}, false + } + return o.ModelDetails, true +} + +// HasModelDetails returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasModelDetails() bool { + if o != nil && !IsNil(o.ModelDetails) { + return true + } + + return false +} + +// SetModelDetails gets a reference to the given map[string]interface{} and assigns it to the ModelDetails field. +func (o *AgentDefinitionCreateRequest) SetModelDetails(v map[string]interface{}) { + o.ModelDetails = v +} + +// GetWebsocketUrl returns the WebsocketUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetWebsocketUrl() string { + if o == nil || IsNil(o.WebsocketUrl.Get()) { + var ret string + return ret + } + return *o.WebsocketUrl.Get() +} + +// GetWebsocketUrlOk returns a tuple with the WebsocketUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetWebsocketUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WebsocketUrl.Get(), o.WebsocketUrl.IsSet() +} + +// HasWebsocketUrl returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasWebsocketUrl() bool { + if o != nil && o.WebsocketUrl.IsSet() { + return true + } + + return false +} + +// SetWebsocketUrl gets a reference to the given NullableString and assigns it to the WebsocketUrl field. +func (o *AgentDefinitionCreateRequest) SetWebsocketUrl(v string) { + o.WebsocketUrl.Set(&v) +} + +// SetWebsocketUrlNil sets the value for WebsocketUrl to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetWebsocketUrlNil() { + o.WebsocketUrl.Set(nil) +} + +// UnsetWebsocketUrl ensures that no value is present for WebsocketUrl, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetWebsocketUrl() { + o.WebsocketUrl.Unset() +} + +// GetWebsocketHeaders returns the WebsocketHeaders field value if set, zero value otherwise. +func (o *AgentDefinitionCreateRequest) GetWebsocketHeaders() map[string]interface{} { + if o == nil || IsNil(o.WebsocketHeaders) { + var ret map[string]interface{} + return ret + } + return o.WebsocketHeaders +} + +// GetWebsocketHeadersOk returns a tuple with the WebsocketHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetWebsocketHeadersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.WebsocketHeaders) { + return map[string]interface{}{}, false + } + return o.WebsocketHeaders, true +} + +// HasWebsocketHeaders returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasWebsocketHeaders() bool { + if o != nil && !IsNil(o.WebsocketHeaders) { + return true + } + + return false +} + +// SetWebsocketHeaders gets a reference to the given map[string]interface{} and assigns it to the WebsocketHeaders field. +func (o *AgentDefinitionCreateRequest) SetWebsocketHeaders(v map[string]interface{}) { + o.WebsocketHeaders = v +} + +// GetReplaySessionId returns the ReplaySessionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetReplaySessionId() string { + if o == nil || IsNil(o.ReplaySessionId.Get()) { + var ret string + return ret + } + return *o.ReplaySessionId.Get() +} + +// GetReplaySessionIdOk returns a tuple with the ReplaySessionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetReplaySessionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReplaySessionId.Get(), o.ReplaySessionId.IsSet() +} + +// HasReplaySessionId returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasReplaySessionId() bool { + if o != nil && o.ReplaySessionId.IsSet() { + return true + } + + return false +} + +// SetReplaySessionId gets a reference to the given NullableString and assigns it to the ReplaySessionId field. +func (o *AgentDefinitionCreateRequest) SetReplaySessionId(v string) { + o.ReplaySessionId.Set(&v) +} + +// SetReplaySessionIdNil sets the value for ReplaySessionId to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetReplaySessionIdNil() { + o.ReplaySessionId.Set(nil) +} + +// UnsetReplaySessionId ensures that no value is present for ReplaySessionId, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetReplaySessionId() { + o.ReplaySessionId.Unset() +} + +// GetLivekitUrl returns the LivekitUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetLivekitUrl() string { + if o == nil || IsNil(o.LivekitUrl.Get()) { + var ret string + return ret + } + return *o.LivekitUrl.Get() +} + +// GetLivekitUrlOk returns a tuple with the LivekitUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetLivekitUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitUrl.Get(), o.LivekitUrl.IsSet() +} + +// HasLivekitUrl returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLivekitUrl() bool { + if o != nil && o.LivekitUrl.IsSet() { + return true + } + + return false +} + +// SetLivekitUrl gets a reference to the given NullableString and assigns it to the LivekitUrl field. +func (o *AgentDefinitionCreateRequest) SetLivekitUrl(v string) { + o.LivekitUrl.Set(&v) +} + +// SetLivekitUrlNil sets the value for LivekitUrl to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetLivekitUrlNil() { + o.LivekitUrl.Set(nil) +} + +// UnsetLivekitUrl ensures that no value is present for LivekitUrl, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetLivekitUrl() { + o.LivekitUrl.Unset() +} + +// GetLivekitApiKey returns the LivekitApiKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetLivekitApiKey() string { + if o == nil || IsNil(o.LivekitApiKey.Get()) { + var ret string + return ret + } + return *o.LivekitApiKey.Get() +} + +// GetLivekitApiKeyOk returns a tuple with the LivekitApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetLivekitApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitApiKey.Get(), o.LivekitApiKey.IsSet() +} + +// HasLivekitApiKey returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLivekitApiKey() bool { + if o != nil && o.LivekitApiKey.IsSet() { + return true + } + + return false +} + +// SetLivekitApiKey gets a reference to the given NullableString and assigns it to the LivekitApiKey field. +func (o *AgentDefinitionCreateRequest) SetLivekitApiKey(v string) { + o.LivekitApiKey.Set(&v) +} + +// SetLivekitApiKeyNil sets the value for LivekitApiKey to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetLivekitApiKeyNil() { + o.LivekitApiKey.Set(nil) +} + +// UnsetLivekitApiKey ensures that no value is present for LivekitApiKey, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetLivekitApiKey() { + o.LivekitApiKey.Unset() +} + +// GetLivekitApiSecret returns the LivekitApiSecret field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetLivekitApiSecret() string { + if o == nil || IsNil(o.LivekitApiSecret.Get()) { + var ret string + return ret + } + return *o.LivekitApiSecret.Get() +} + +// GetLivekitApiSecretOk returns a tuple with the LivekitApiSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetLivekitApiSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitApiSecret.Get(), o.LivekitApiSecret.IsSet() +} + +// HasLivekitApiSecret returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLivekitApiSecret() bool { + if o != nil && o.LivekitApiSecret.IsSet() { + return true + } + + return false +} + +// SetLivekitApiSecret gets a reference to the given NullableString and assigns it to the LivekitApiSecret field. +func (o *AgentDefinitionCreateRequest) SetLivekitApiSecret(v string) { + o.LivekitApiSecret.Set(&v) +} + +// SetLivekitApiSecretNil sets the value for LivekitApiSecret to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetLivekitApiSecretNil() { + o.LivekitApiSecret.Set(nil) +} + +// UnsetLivekitApiSecret ensures that no value is present for LivekitApiSecret, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetLivekitApiSecret() { + o.LivekitApiSecret.Unset() +} + +// GetLivekitAgentName returns the LivekitAgentName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetLivekitAgentName() string { + if o == nil || IsNil(o.LivekitAgentName.Get()) { + var ret string + return ret + } + return *o.LivekitAgentName.Get() +} + +// GetLivekitAgentNameOk returns a tuple with the LivekitAgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetLivekitAgentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitAgentName.Get(), o.LivekitAgentName.IsSet() +} + +// HasLivekitAgentName returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLivekitAgentName() bool { + if o != nil && o.LivekitAgentName.IsSet() { + return true + } + + return false +} + +// SetLivekitAgentName gets a reference to the given NullableString and assigns it to the LivekitAgentName field. +func (o *AgentDefinitionCreateRequest) SetLivekitAgentName(v string) { + o.LivekitAgentName.Set(&v) +} + +// SetLivekitAgentNameNil sets the value for LivekitAgentName to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetLivekitAgentNameNil() { + o.LivekitAgentName.Set(nil) +} + +// UnsetLivekitAgentName ensures that no value is present for LivekitAgentName, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetLivekitAgentName() { + o.LivekitAgentName.Unset() +} + +// GetLivekitConfigJson returns the LivekitConfigJson field value if set, zero value otherwise. +func (o *AgentDefinitionCreateRequest) GetLivekitConfigJson() map[string]interface{} { + if o == nil || IsNil(o.LivekitConfigJson) { + var ret map[string]interface{} + return ret + } + return o.LivekitConfigJson +} + +// GetLivekitConfigJsonOk returns a tuple with the LivekitConfigJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateRequest) GetLivekitConfigJsonOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.LivekitConfigJson) { + return map[string]interface{}{}, false + } + return o.LivekitConfigJson, true +} + +// HasLivekitConfigJson returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLivekitConfigJson() bool { + if o != nil && !IsNil(o.LivekitConfigJson) { + return true + } + + return false +} + +// SetLivekitConfigJson gets a reference to the given map[string]interface{} and assigns it to the LivekitConfigJson field. +func (o *AgentDefinitionCreateRequest) SetLivekitConfigJson(v map[string]interface{}) { + o.LivekitConfigJson = v +} + +// GetLivekitMaxConcurrency returns the LivekitMaxConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionCreateRequest) GetLivekitMaxConcurrency() int32 { + if o == nil || IsNil(o.LivekitMaxConcurrency.Get()) { + var ret int32 + return ret + } + return *o.LivekitMaxConcurrency.Get() +} + +// GetLivekitMaxConcurrencyOk returns a tuple with the LivekitMaxConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionCreateRequest) GetLivekitMaxConcurrencyOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.LivekitMaxConcurrency.Get(), o.LivekitMaxConcurrency.IsSet() +} + +// HasLivekitMaxConcurrency returns a boolean if a field has been set. +func (o *AgentDefinitionCreateRequest) HasLivekitMaxConcurrency() bool { + if o != nil && o.LivekitMaxConcurrency.IsSet() { + return true + } + + return false +} + +// SetLivekitMaxConcurrency gets a reference to the given NullableInt32 and assigns it to the LivekitMaxConcurrency field. +func (o *AgentDefinitionCreateRequest) SetLivekitMaxConcurrency(v int32) { + o.LivekitMaxConcurrency.Set(&v) +} + +// SetLivekitMaxConcurrencyNil sets the value for LivekitMaxConcurrency to be an explicit nil +func (o *AgentDefinitionCreateRequest) SetLivekitMaxConcurrencyNil() { + o.LivekitMaxConcurrency.Set(nil) +} + +// UnsetLivekitMaxConcurrency ensures that no value is present for LivekitMaxConcurrency, not even an explicit nil +func (o *AgentDefinitionCreateRequest) UnsetLivekitMaxConcurrency() { + o.LivekitMaxConcurrency.Unset() +} + +func (o AgentDefinitionCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["agent_name"] = o.AgentName + toSerialize["agent_type"] = o.AgentType + toSerialize["commit_message"] = o.CommitMessage + if !IsNil(o.Inbound) { + toSerialize["inbound"] = o.Inbound + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if o.ApiKey.IsSet() { + toSerialize["api_key"] = o.ApiKey.Get() + } + if o.AssistantId.IsSet() { + toSerialize["assistant_id"] = o.AssistantId.Get() + } + if o.AuthenticationMethod.IsSet() { + toSerialize["authentication_method"] = o.AuthenticationMethod.Get() + } + if o.Language.IsSet() { + toSerialize["language"] = o.Language.Get() + } + if o.Languages != nil { + toSerialize["languages"] = o.Languages + } + if o.ContactNumber.IsSet() { + toSerialize["contact_number"] = o.ContactNumber.Get() + } + if o.KnowledgeBase.IsSet() { + toSerialize["knowledge_base"] = o.KnowledgeBase.Get() + } + if !IsNil(o.ObservabilityEnabled) { + toSerialize["observability_enabled"] = o.ObservabilityEnabled + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.ModelDetails) { + toSerialize["model_details"] = o.ModelDetails + } + if o.WebsocketUrl.IsSet() { + toSerialize["websocket_url"] = o.WebsocketUrl.Get() + } + if !IsNil(o.WebsocketHeaders) { + toSerialize["websocket_headers"] = o.WebsocketHeaders + } + if o.ReplaySessionId.IsSet() { + toSerialize["replay_session_id"] = o.ReplaySessionId.Get() + } + if o.LivekitUrl.IsSet() { + toSerialize["livekit_url"] = o.LivekitUrl.Get() + } + if o.LivekitApiKey.IsSet() { + toSerialize["livekit_api_key"] = o.LivekitApiKey.Get() + } + if o.LivekitApiSecret.IsSet() { + toSerialize["livekit_api_secret"] = o.LivekitApiSecret.Get() + } + if o.LivekitAgentName.IsSet() { + toSerialize["livekit_agent_name"] = o.LivekitAgentName.Get() + } + if !IsNil(o.LivekitConfigJson) { + toSerialize["livekit_config_json"] = o.LivekitConfigJson + } + if o.LivekitMaxConcurrency.IsSet() { + toSerialize["livekit_max_concurrency"] = o.LivekitMaxConcurrency.Get() + } + return toSerialize, nil +} + +func (o *AgentDefinitionCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "agent_name", + "agent_type", + "commit_message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAgentDefinitionCreateRequest := _AgentDefinitionCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAgentDefinitionCreateRequest) + + if err != nil { + return err + } + + *o = AgentDefinitionCreateRequest(varAgentDefinitionCreateRequest) + + return err +} + +type NullableAgentDefinitionCreateRequest struct { + value *AgentDefinitionCreateRequest + isSet bool +} + +func (v NullableAgentDefinitionCreateRequest) Get() *AgentDefinitionCreateRequest { + return v.value +} + +func (v *NullableAgentDefinitionCreateRequest) Set(val *AgentDefinitionCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionCreateRequest(val *AgentDefinitionCreateRequest) *NullableAgentDefinitionCreateRequest { + return &NullableAgentDefinitionCreateRequest{value: val, isSet: true} +} + +func (v NullableAgentDefinitionCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_create_response.go b/go/futureagi/model_agent_definition_create_response.go new file mode 100644 index 0000000..55c77d8 --- /dev/null +++ b/go/futureagi/model_agent_definition_create_response.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentDefinitionCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionCreateResponse{} + +// AgentDefinitionCreateResponse struct for AgentDefinitionCreateResponse +type AgentDefinitionCreateResponse struct { + Message *string `json:"message,omitempty"` + Agent *AgentDefinitionResponse `json:"agent,omitempty"` +} + +// NewAgentDefinitionCreateResponse instantiates a new AgentDefinitionCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionCreateResponse() *AgentDefinitionCreateResponse { + this := AgentDefinitionCreateResponse{} + return &this +} + +// NewAgentDefinitionCreateResponseWithDefaults instantiates a new AgentDefinitionCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionCreateResponseWithDefaults() *AgentDefinitionCreateResponse { + this := AgentDefinitionCreateResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentDefinitionCreateResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentDefinitionCreateResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentDefinitionCreateResponse) SetMessage(v string) { + o.Message = &v +} + +// GetAgent returns the Agent field value if set, zero value otherwise. +func (o *AgentDefinitionCreateResponse) GetAgent() AgentDefinitionResponse { + if o == nil || IsNil(o.Agent) { + var ret AgentDefinitionResponse + return ret + } + return *o.Agent +} + +// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionCreateResponse) GetAgentOk() (*AgentDefinitionResponse, bool) { + if o == nil || IsNil(o.Agent) { + return nil, false + } + return o.Agent, true +} + +// HasAgent returns a boolean if a field has been set. +func (o *AgentDefinitionCreateResponse) HasAgent() bool { + if o != nil && !IsNil(o.Agent) { + return true + } + + return false +} + +// SetAgent gets a reference to the given AgentDefinitionResponse and assigns it to the Agent field. +func (o *AgentDefinitionCreateResponse) SetAgent(v AgentDefinitionResponse) { + o.Agent = &v +} + +func (o AgentDefinitionCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Agent) { + toSerialize["agent"] = o.Agent + } + return toSerialize, nil +} + +type NullableAgentDefinitionCreateResponse struct { + value *AgentDefinitionCreateResponse + isSet bool +} + +func (v NullableAgentDefinitionCreateResponse) Get() *AgentDefinitionCreateResponse { + return v.value +} + +func (v *NullableAgentDefinitionCreateResponse) Set(val *AgentDefinitionCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionCreateResponse(val *AgentDefinitionCreateResponse) *NullableAgentDefinitionCreateResponse { + return &NullableAgentDefinitionCreateResponse{value: val, isSet: true} +} + +func (v NullableAgentDefinitionCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_delete_response.go b/go/futureagi/model_agent_definition_delete_response.go new file mode 100644 index 0000000..75bbaa8 --- /dev/null +++ b/go/futureagi/model_agent_definition_delete_response.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentDefinitionDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionDeleteResponse{} + +// AgentDefinitionDeleteResponse struct for AgentDefinitionDeleteResponse +type AgentDefinitionDeleteResponse struct { + Message *string `json:"message,omitempty"` +} + +// NewAgentDefinitionDeleteResponse instantiates a new AgentDefinitionDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionDeleteResponse() *AgentDefinitionDeleteResponse { + this := AgentDefinitionDeleteResponse{} + return &this +} + +// NewAgentDefinitionDeleteResponseWithDefaults instantiates a new AgentDefinitionDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionDeleteResponseWithDefaults() *AgentDefinitionDeleteResponse { + this := AgentDefinitionDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentDefinitionDeleteResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentDefinitionDeleteResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentDefinitionDeleteResponse) SetMessage(v string) { + o.Message = &v +} + +func (o AgentDefinitionDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableAgentDefinitionDeleteResponse struct { + value *AgentDefinitionDeleteResponse + isSet bool +} + +func (v NullableAgentDefinitionDeleteResponse) Get() *AgentDefinitionDeleteResponse { + return v.value +} + +func (v *NullableAgentDefinitionDeleteResponse) Set(val *AgentDefinitionDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionDeleteResponse(val *AgentDefinitionDeleteResponse) *NullableAgentDefinitionDeleteResponse { + return &NullableAgentDefinitionDeleteResponse{value: val, isSet: true} +} + +func (v NullableAgentDefinitionDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_edit_request.go b/go/futureagi/model_agent_definition_edit_request.go new file mode 100644 index 0000000..8ce8492 --- /dev/null +++ b/go/futureagi/model_agent_definition_edit_request.go @@ -0,0 +1,1047 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentDefinitionEditRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionEditRequest{} + +// AgentDefinitionEditRequest struct for AgentDefinitionEditRequest +type AgentDefinitionEditRequest struct { + AgentName *string `json:"agent_name,omitempty"` + AgentType *string `json:"agent_type,omitempty"` + Description NullableString `json:"description,omitempty"` + Provider NullableString `json:"provider,omitempty"` + ApiKey NullableString `json:"api_key,omitempty"` + AssistantId NullableString `json:"assistant_id,omitempty"` + AuthenticationMethod NullableString `json:"authentication_method,omitempty"` + Language NullableString `json:"language,omitempty"` + Languages []string `json:"languages,omitempty"` + ContactNumber NullableString `json:"contact_number,omitempty"` + Inbound *bool `json:"inbound,omitempty"` + KnowledgeBase NullableString `json:"knowledge_base,omitempty"` + Model NullableString `json:"model,omitempty"` + ModelDetails map[string]interface{} `json:"model_details,omitempty"` + WebsocketUrl NullableString `json:"websocket_url,omitempty"` + WebsocketHeaders map[string]interface{} `json:"websocket_headers,omitempty"` + LivekitUrl NullableString `json:"livekit_url,omitempty"` + LivekitApiKey NullableString `json:"livekit_api_key,omitempty"` + LivekitApiSecret NullableString `json:"livekit_api_secret,omitempty"` + LivekitAgentName NullableString `json:"livekit_agent_name,omitempty"` + LivekitConfigJson map[string]interface{} `json:"livekit_config_json,omitempty"` + LivekitMaxConcurrency NullableInt32 `json:"livekit_max_concurrency,omitempty"` +} + +// NewAgentDefinitionEditRequest instantiates a new AgentDefinitionEditRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionEditRequest() *AgentDefinitionEditRequest { + this := AgentDefinitionEditRequest{} + return &this +} + +// NewAgentDefinitionEditRequestWithDefaults instantiates a new AgentDefinitionEditRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionEditRequestWithDefaults() *AgentDefinitionEditRequest { + this := AgentDefinitionEditRequest{} + return &this +} + +// GetAgentName returns the AgentName field value if set, zero value otherwise. +func (o *AgentDefinitionEditRequest) GetAgentName() string { + if o == nil || IsNil(o.AgentName) { + var ret string + return ret + } + return *o.AgentName +} + +// GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditRequest) GetAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentName) { + return nil, false + } + return o.AgentName, true +} + +// HasAgentName returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasAgentName() bool { + if o != nil && !IsNil(o.AgentName) { + return true + } + + return false +} + +// SetAgentName gets a reference to the given string and assigns it to the AgentName field. +func (o *AgentDefinitionEditRequest) SetAgentName(v string) { + o.AgentName = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *AgentDefinitionEditRequest) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditRequest) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *AgentDefinitionEditRequest) SetAgentType(v string) { + o.AgentType = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *AgentDefinitionEditRequest) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *AgentDefinitionEditRequest) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetDescription() { + o.Description.Unset() +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *AgentDefinitionEditRequest) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *AgentDefinitionEditRequest) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetProvider() { + o.Provider.Unset() +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetApiKey() string { + if o == nil || IsNil(o.ApiKey.Get()) { + var ret string + return ret + } + return *o.ApiKey.Get() +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApiKey.Get(), o.ApiKey.IsSet() +} + +// HasApiKey returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasApiKey() bool { + if o != nil && o.ApiKey.IsSet() { + return true + } + + return false +} + +// SetApiKey gets a reference to the given NullableString and assigns it to the ApiKey field. +func (o *AgentDefinitionEditRequest) SetApiKey(v string) { + o.ApiKey.Set(&v) +} + +// SetApiKeyNil sets the value for ApiKey to be an explicit nil +func (o *AgentDefinitionEditRequest) SetApiKeyNil() { + o.ApiKey.Set(nil) +} + +// UnsetApiKey ensures that no value is present for ApiKey, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetApiKey() { + o.ApiKey.Unset() +} + +// GetAssistantId returns the AssistantId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetAssistantId() string { + if o == nil || IsNil(o.AssistantId.Get()) { + var ret string + return ret + } + return *o.AssistantId.Get() +} + +// GetAssistantIdOk returns a tuple with the AssistantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetAssistantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AssistantId.Get(), o.AssistantId.IsSet() +} + +// HasAssistantId returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasAssistantId() bool { + if o != nil && o.AssistantId.IsSet() { + return true + } + + return false +} + +// SetAssistantId gets a reference to the given NullableString and assigns it to the AssistantId field. +func (o *AgentDefinitionEditRequest) SetAssistantId(v string) { + o.AssistantId.Set(&v) +} + +// SetAssistantIdNil sets the value for AssistantId to be an explicit nil +func (o *AgentDefinitionEditRequest) SetAssistantIdNil() { + o.AssistantId.Set(nil) +} + +// UnsetAssistantId ensures that no value is present for AssistantId, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetAssistantId() { + o.AssistantId.Unset() +} + +// GetAuthenticationMethod returns the AuthenticationMethod field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetAuthenticationMethod() string { + if o == nil || IsNil(o.AuthenticationMethod.Get()) { + var ret string + return ret + } + return *o.AuthenticationMethod.Get() +} + +// GetAuthenticationMethodOk returns a tuple with the AuthenticationMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetAuthenticationMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthenticationMethod.Get(), o.AuthenticationMethod.IsSet() +} + +// HasAuthenticationMethod returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasAuthenticationMethod() bool { + if o != nil && o.AuthenticationMethod.IsSet() { + return true + } + + return false +} + +// SetAuthenticationMethod gets a reference to the given NullableString and assigns it to the AuthenticationMethod field. +func (o *AgentDefinitionEditRequest) SetAuthenticationMethod(v string) { + o.AuthenticationMethod.Set(&v) +} + +// SetAuthenticationMethodNil sets the value for AuthenticationMethod to be an explicit nil +func (o *AgentDefinitionEditRequest) SetAuthenticationMethodNil() { + o.AuthenticationMethod.Set(nil) +} + +// UnsetAuthenticationMethod ensures that no value is present for AuthenticationMethod, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetAuthenticationMethod() { + o.AuthenticationMethod.Unset() +} + +// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetLanguage() string { + if o == nil || IsNil(o.Language.Get()) { + var ret string + return ret + } + return *o.Language.Get() +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Language.Get(), o.Language.IsSet() +} + +// HasLanguage returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLanguage() bool { + if o != nil && o.Language.IsSet() { + return true + } + + return false +} + +// SetLanguage gets a reference to the given NullableString and assigns it to the Language field. +func (o *AgentDefinitionEditRequest) SetLanguage(v string) { + o.Language.Set(&v) +} + +// SetLanguageNil sets the value for Language to be an explicit nil +func (o *AgentDefinitionEditRequest) SetLanguageNil() { + o.Language.Set(nil) +} + +// UnsetLanguage ensures that no value is present for Language, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetLanguage() { + o.Language.Unset() +} + +// GetLanguages returns the Languages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetLanguages() []string { + if o == nil { + var ret []string + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetLanguagesOk() ([]string, bool) { + if o == nil || IsNil(o.Languages) { + return nil, false + } + return o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLanguages() bool { + if o != nil && !IsNil(o.Languages) { + return true + } + + return false +} + +// SetLanguages gets a reference to the given []string and assigns it to the Languages field. +func (o *AgentDefinitionEditRequest) SetLanguages(v []string) { + o.Languages = v +} + +// GetContactNumber returns the ContactNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetContactNumber() string { + if o == nil || IsNil(o.ContactNumber.Get()) { + var ret string + return ret + } + return *o.ContactNumber.Get() +} + +// GetContactNumberOk returns a tuple with the ContactNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetContactNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContactNumber.Get(), o.ContactNumber.IsSet() +} + +// HasContactNumber returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasContactNumber() bool { + if o != nil && o.ContactNumber.IsSet() { + return true + } + + return false +} + +// SetContactNumber gets a reference to the given NullableString and assigns it to the ContactNumber field. +func (o *AgentDefinitionEditRequest) SetContactNumber(v string) { + o.ContactNumber.Set(&v) +} + +// SetContactNumberNil sets the value for ContactNumber to be an explicit nil +func (o *AgentDefinitionEditRequest) SetContactNumberNil() { + o.ContactNumber.Set(nil) +} + +// UnsetContactNumber ensures that no value is present for ContactNumber, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetContactNumber() { + o.ContactNumber.Unset() +} + +// GetInbound returns the Inbound field value if set, zero value otherwise. +func (o *AgentDefinitionEditRequest) GetInbound() bool { + if o == nil || IsNil(o.Inbound) { + var ret bool + return ret + } + return *o.Inbound +} + +// GetInboundOk returns a tuple with the Inbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditRequest) GetInboundOk() (*bool, bool) { + if o == nil || IsNil(o.Inbound) { + return nil, false + } + return o.Inbound, true +} + +// HasInbound returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasInbound() bool { + if o != nil && !IsNil(o.Inbound) { + return true + } + + return false +} + +// SetInbound gets a reference to the given bool and assigns it to the Inbound field. +func (o *AgentDefinitionEditRequest) SetInbound(v bool) { + o.Inbound = &v +} + +// GetKnowledgeBase returns the KnowledgeBase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetKnowledgeBase() string { + if o == nil || IsNil(o.KnowledgeBase.Get()) { + var ret string + return ret + } + return *o.KnowledgeBase.Get() +} + +// GetKnowledgeBaseOk returns a tuple with the KnowledgeBase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetKnowledgeBaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KnowledgeBase.Get(), o.KnowledgeBase.IsSet() +} + +// HasKnowledgeBase returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasKnowledgeBase() bool { + if o != nil && o.KnowledgeBase.IsSet() { + return true + } + + return false +} + +// SetKnowledgeBase gets a reference to the given NullableString and assigns it to the KnowledgeBase field. +func (o *AgentDefinitionEditRequest) SetKnowledgeBase(v string) { + o.KnowledgeBase.Set(&v) +} + +// SetKnowledgeBaseNil sets the value for KnowledgeBase to be an explicit nil +func (o *AgentDefinitionEditRequest) SetKnowledgeBaseNil() { + o.KnowledgeBase.Set(nil) +} + +// UnsetKnowledgeBase ensures that no value is present for KnowledgeBase, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetKnowledgeBase() { + o.KnowledgeBase.Unset() +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *AgentDefinitionEditRequest) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *AgentDefinitionEditRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetModel() { + o.Model.Unset() +} + +// GetModelDetails returns the ModelDetails field value if set, zero value otherwise. +func (o *AgentDefinitionEditRequest) GetModelDetails() map[string]interface{} { + if o == nil || IsNil(o.ModelDetails) { + var ret map[string]interface{} + return ret + } + return o.ModelDetails +} + +// GetModelDetailsOk returns a tuple with the ModelDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditRequest) GetModelDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ModelDetails) { + return map[string]interface{}{}, false + } + return o.ModelDetails, true +} + +// HasModelDetails returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasModelDetails() bool { + if o != nil && !IsNil(o.ModelDetails) { + return true + } + + return false +} + +// SetModelDetails gets a reference to the given map[string]interface{} and assigns it to the ModelDetails field. +func (o *AgentDefinitionEditRequest) SetModelDetails(v map[string]interface{}) { + o.ModelDetails = v +} + +// GetWebsocketUrl returns the WebsocketUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetWebsocketUrl() string { + if o == nil || IsNil(o.WebsocketUrl.Get()) { + var ret string + return ret + } + return *o.WebsocketUrl.Get() +} + +// GetWebsocketUrlOk returns a tuple with the WebsocketUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetWebsocketUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WebsocketUrl.Get(), o.WebsocketUrl.IsSet() +} + +// HasWebsocketUrl returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasWebsocketUrl() bool { + if o != nil && o.WebsocketUrl.IsSet() { + return true + } + + return false +} + +// SetWebsocketUrl gets a reference to the given NullableString and assigns it to the WebsocketUrl field. +func (o *AgentDefinitionEditRequest) SetWebsocketUrl(v string) { + o.WebsocketUrl.Set(&v) +} + +// SetWebsocketUrlNil sets the value for WebsocketUrl to be an explicit nil +func (o *AgentDefinitionEditRequest) SetWebsocketUrlNil() { + o.WebsocketUrl.Set(nil) +} + +// UnsetWebsocketUrl ensures that no value is present for WebsocketUrl, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetWebsocketUrl() { + o.WebsocketUrl.Unset() +} + +// GetWebsocketHeaders returns the WebsocketHeaders field value if set, zero value otherwise. +func (o *AgentDefinitionEditRequest) GetWebsocketHeaders() map[string]interface{} { + if o == nil || IsNil(o.WebsocketHeaders) { + var ret map[string]interface{} + return ret + } + return o.WebsocketHeaders +} + +// GetWebsocketHeadersOk returns a tuple with the WebsocketHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditRequest) GetWebsocketHeadersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.WebsocketHeaders) { + return map[string]interface{}{}, false + } + return o.WebsocketHeaders, true +} + +// HasWebsocketHeaders returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasWebsocketHeaders() bool { + if o != nil && !IsNil(o.WebsocketHeaders) { + return true + } + + return false +} + +// SetWebsocketHeaders gets a reference to the given map[string]interface{} and assigns it to the WebsocketHeaders field. +func (o *AgentDefinitionEditRequest) SetWebsocketHeaders(v map[string]interface{}) { + o.WebsocketHeaders = v +} + +// GetLivekitUrl returns the LivekitUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetLivekitUrl() string { + if o == nil || IsNil(o.LivekitUrl.Get()) { + var ret string + return ret + } + return *o.LivekitUrl.Get() +} + +// GetLivekitUrlOk returns a tuple with the LivekitUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetLivekitUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitUrl.Get(), o.LivekitUrl.IsSet() +} + +// HasLivekitUrl returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLivekitUrl() bool { + if o != nil && o.LivekitUrl.IsSet() { + return true + } + + return false +} + +// SetLivekitUrl gets a reference to the given NullableString and assigns it to the LivekitUrl field. +func (o *AgentDefinitionEditRequest) SetLivekitUrl(v string) { + o.LivekitUrl.Set(&v) +} + +// SetLivekitUrlNil sets the value for LivekitUrl to be an explicit nil +func (o *AgentDefinitionEditRequest) SetLivekitUrlNil() { + o.LivekitUrl.Set(nil) +} + +// UnsetLivekitUrl ensures that no value is present for LivekitUrl, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetLivekitUrl() { + o.LivekitUrl.Unset() +} + +// GetLivekitApiKey returns the LivekitApiKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetLivekitApiKey() string { + if o == nil || IsNil(o.LivekitApiKey.Get()) { + var ret string + return ret + } + return *o.LivekitApiKey.Get() +} + +// GetLivekitApiKeyOk returns a tuple with the LivekitApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetLivekitApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitApiKey.Get(), o.LivekitApiKey.IsSet() +} + +// HasLivekitApiKey returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLivekitApiKey() bool { + if o != nil && o.LivekitApiKey.IsSet() { + return true + } + + return false +} + +// SetLivekitApiKey gets a reference to the given NullableString and assigns it to the LivekitApiKey field. +func (o *AgentDefinitionEditRequest) SetLivekitApiKey(v string) { + o.LivekitApiKey.Set(&v) +} + +// SetLivekitApiKeyNil sets the value for LivekitApiKey to be an explicit nil +func (o *AgentDefinitionEditRequest) SetLivekitApiKeyNil() { + o.LivekitApiKey.Set(nil) +} + +// UnsetLivekitApiKey ensures that no value is present for LivekitApiKey, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetLivekitApiKey() { + o.LivekitApiKey.Unset() +} + +// GetLivekitApiSecret returns the LivekitApiSecret field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetLivekitApiSecret() string { + if o == nil || IsNil(o.LivekitApiSecret.Get()) { + var ret string + return ret + } + return *o.LivekitApiSecret.Get() +} + +// GetLivekitApiSecretOk returns a tuple with the LivekitApiSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetLivekitApiSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitApiSecret.Get(), o.LivekitApiSecret.IsSet() +} + +// HasLivekitApiSecret returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLivekitApiSecret() bool { + if o != nil && o.LivekitApiSecret.IsSet() { + return true + } + + return false +} + +// SetLivekitApiSecret gets a reference to the given NullableString and assigns it to the LivekitApiSecret field. +func (o *AgentDefinitionEditRequest) SetLivekitApiSecret(v string) { + o.LivekitApiSecret.Set(&v) +} + +// SetLivekitApiSecretNil sets the value for LivekitApiSecret to be an explicit nil +func (o *AgentDefinitionEditRequest) SetLivekitApiSecretNil() { + o.LivekitApiSecret.Set(nil) +} + +// UnsetLivekitApiSecret ensures that no value is present for LivekitApiSecret, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetLivekitApiSecret() { + o.LivekitApiSecret.Unset() +} + +// GetLivekitAgentName returns the LivekitAgentName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetLivekitAgentName() string { + if o == nil || IsNil(o.LivekitAgentName.Get()) { + var ret string + return ret + } + return *o.LivekitAgentName.Get() +} + +// GetLivekitAgentNameOk returns a tuple with the LivekitAgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetLivekitAgentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LivekitAgentName.Get(), o.LivekitAgentName.IsSet() +} + +// HasLivekitAgentName returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLivekitAgentName() bool { + if o != nil && o.LivekitAgentName.IsSet() { + return true + } + + return false +} + +// SetLivekitAgentName gets a reference to the given NullableString and assigns it to the LivekitAgentName field. +func (o *AgentDefinitionEditRequest) SetLivekitAgentName(v string) { + o.LivekitAgentName.Set(&v) +} + +// SetLivekitAgentNameNil sets the value for LivekitAgentName to be an explicit nil +func (o *AgentDefinitionEditRequest) SetLivekitAgentNameNil() { + o.LivekitAgentName.Set(nil) +} + +// UnsetLivekitAgentName ensures that no value is present for LivekitAgentName, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetLivekitAgentName() { + o.LivekitAgentName.Unset() +} + +// GetLivekitConfigJson returns the LivekitConfigJson field value if set, zero value otherwise. +func (o *AgentDefinitionEditRequest) GetLivekitConfigJson() map[string]interface{} { + if o == nil || IsNil(o.LivekitConfigJson) { + var ret map[string]interface{} + return ret + } + return o.LivekitConfigJson +} + +// GetLivekitConfigJsonOk returns a tuple with the LivekitConfigJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditRequest) GetLivekitConfigJsonOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.LivekitConfigJson) { + return map[string]interface{}{}, false + } + return o.LivekitConfigJson, true +} + +// HasLivekitConfigJson returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLivekitConfigJson() bool { + if o != nil && !IsNil(o.LivekitConfigJson) { + return true + } + + return false +} + +// SetLivekitConfigJson gets a reference to the given map[string]interface{} and assigns it to the LivekitConfigJson field. +func (o *AgentDefinitionEditRequest) SetLivekitConfigJson(v map[string]interface{}) { + o.LivekitConfigJson = v +} + +// GetLivekitMaxConcurrency returns the LivekitMaxConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionEditRequest) GetLivekitMaxConcurrency() int32 { + if o == nil || IsNil(o.LivekitMaxConcurrency.Get()) { + var ret int32 + return ret + } + return *o.LivekitMaxConcurrency.Get() +} + +// GetLivekitMaxConcurrencyOk returns a tuple with the LivekitMaxConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionEditRequest) GetLivekitMaxConcurrencyOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.LivekitMaxConcurrency.Get(), o.LivekitMaxConcurrency.IsSet() +} + +// HasLivekitMaxConcurrency returns a boolean if a field has been set. +func (o *AgentDefinitionEditRequest) HasLivekitMaxConcurrency() bool { + if o != nil && o.LivekitMaxConcurrency.IsSet() { + return true + } + + return false +} + +// SetLivekitMaxConcurrency gets a reference to the given NullableInt32 and assigns it to the LivekitMaxConcurrency field. +func (o *AgentDefinitionEditRequest) SetLivekitMaxConcurrency(v int32) { + o.LivekitMaxConcurrency.Set(&v) +} + +// SetLivekitMaxConcurrencyNil sets the value for LivekitMaxConcurrency to be an explicit nil +func (o *AgentDefinitionEditRequest) SetLivekitMaxConcurrencyNil() { + o.LivekitMaxConcurrency.Set(nil) +} + +// UnsetLivekitMaxConcurrency ensures that no value is present for LivekitMaxConcurrency, not even an explicit nil +func (o *AgentDefinitionEditRequest) UnsetLivekitMaxConcurrency() { + o.LivekitMaxConcurrency.Unset() +} + +func (o AgentDefinitionEditRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionEditRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AgentName) { + toSerialize["agent_name"] = o.AgentName + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if o.ApiKey.IsSet() { + toSerialize["api_key"] = o.ApiKey.Get() + } + if o.AssistantId.IsSet() { + toSerialize["assistant_id"] = o.AssistantId.Get() + } + if o.AuthenticationMethod.IsSet() { + toSerialize["authentication_method"] = o.AuthenticationMethod.Get() + } + if o.Language.IsSet() { + toSerialize["language"] = o.Language.Get() + } + if o.Languages != nil { + toSerialize["languages"] = o.Languages + } + if o.ContactNumber.IsSet() { + toSerialize["contact_number"] = o.ContactNumber.Get() + } + if !IsNil(o.Inbound) { + toSerialize["inbound"] = o.Inbound + } + if o.KnowledgeBase.IsSet() { + toSerialize["knowledge_base"] = o.KnowledgeBase.Get() + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.ModelDetails) { + toSerialize["model_details"] = o.ModelDetails + } + if o.WebsocketUrl.IsSet() { + toSerialize["websocket_url"] = o.WebsocketUrl.Get() + } + if !IsNil(o.WebsocketHeaders) { + toSerialize["websocket_headers"] = o.WebsocketHeaders + } + if o.LivekitUrl.IsSet() { + toSerialize["livekit_url"] = o.LivekitUrl.Get() + } + if o.LivekitApiKey.IsSet() { + toSerialize["livekit_api_key"] = o.LivekitApiKey.Get() + } + if o.LivekitApiSecret.IsSet() { + toSerialize["livekit_api_secret"] = o.LivekitApiSecret.Get() + } + if o.LivekitAgentName.IsSet() { + toSerialize["livekit_agent_name"] = o.LivekitAgentName.Get() + } + if !IsNil(o.LivekitConfigJson) { + toSerialize["livekit_config_json"] = o.LivekitConfigJson + } + if o.LivekitMaxConcurrency.IsSet() { + toSerialize["livekit_max_concurrency"] = o.LivekitMaxConcurrency.Get() + } + return toSerialize, nil +} + +type NullableAgentDefinitionEditRequest struct { + value *AgentDefinitionEditRequest + isSet bool +} + +func (v NullableAgentDefinitionEditRequest) Get() *AgentDefinitionEditRequest { + return v.value +} + +func (v *NullableAgentDefinitionEditRequest) Set(val *AgentDefinitionEditRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionEditRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionEditRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionEditRequest(val *AgentDefinitionEditRequest) *NullableAgentDefinitionEditRequest { + return &NullableAgentDefinitionEditRequest{value: val, isSet: true} +} + +func (v NullableAgentDefinitionEditRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionEditRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_edit_response.go b/go/futureagi/model_agent_definition_edit_response.go new file mode 100644 index 0000000..a02848e --- /dev/null +++ b/go/futureagi/model_agent_definition_edit_response.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentDefinitionEditResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionEditResponse{} + +// AgentDefinitionEditResponse struct for AgentDefinitionEditResponse +type AgentDefinitionEditResponse struct { + Message *string `json:"message,omitempty"` + Agent *AgentDefinitionResponse `json:"agent,omitempty"` +} + +// NewAgentDefinitionEditResponse instantiates a new AgentDefinitionEditResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionEditResponse() *AgentDefinitionEditResponse { + this := AgentDefinitionEditResponse{} + return &this +} + +// NewAgentDefinitionEditResponseWithDefaults instantiates a new AgentDefinitionEditResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionEditResponseWithDefaults() *AgentDefinitionEditResponse { + this := AgentDefinitionEditResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentDefinitionEditResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentDefinitionEditResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentDefinitionEditResponse) SetMessage(v string) { + o.Message = &v +} + +// GetAgent returns the Agent field value if set, zero value otherwise. +func (o *AgentDefinitionEditResponse) GetAgent() AgentDefinitionResponse { + if o == nil || IsNil(o.Agent) { + var ret AgentDefinitionResponse + return ret + } + return *o.Agent +} + +// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionEditResponse) GetAgentOk() (*AgentDefinitionResponse, bool) { + if o == nil || IsNil(o.Agent) { + return nil, false + } + return o.Agent, true +} + +// HasAgent returns a boolean if a field has been set. +func (o *AgentDefinitionEditResponse) HasAgent() bool { + if o != nil && !IsNil(o.Agent) { + return true + } + + return false +} + +// SetAgent gets a reference to the given AgentDefinitionResponse and assigns it to the Agent field. +func (o *AgentDefinitionEditResponse) SetAgent(v AgentDefinitionResponse) { + o.Agent = &v +} + +func (o AgentDefinitionEditResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionEditResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Agent) { + toSerialize["agent"] = o.Agent + } + return toSerialize, nil +} + +type NullableAgentDefinitionEditResponse struct { + value *AgentDefinitionEditResponse + isSet bool +} + +func (v NullableAgentDefinitionEditResponse) Get() *AgentDefinitionEditResponse { + return v.value +} + +func (v *NullableAgentDefinitionEditResponse) Set(val *AgentDefinitionEditResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionEditResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionEditResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionEditResponse(val *AgentDefinitionEditResponse) *NullableAgentDefinitionEditResponse { + return &NullableAgentDefinitionEditResponse{value: val, isSet: true} +} + +func (v NullableAgentDefinitionEditResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionEditResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_list_response.go b/go/futureagi/model_agent_definition_list_response.go new file mode 100644 index 0000000..93743ea --- /dev/null +++ b/go/futureagi/model_agent_definition_list_response.go @@ -0,0 +1,947 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the AgentDefinitionListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionListResponse{} + +// AgentDefinitionListResponse struct for AgentDefinitionListResponse +type AgentDefinitionListResponse struct { + Id *string `json:"id,omitempty"` + // Name of the AI agent + AgentName *string `json:"agent_name,omitempty"` + AgentType *string `json:"agent_type,omitempty"` + // Phone number associated with the AI agent + ContactNumber NullableString `json:"contact_number,omitempty"` + // Whether the agent handles inbound calls + Inbound *bool `json:"inbound,omitempty"` + // Detailed description of the AI agent's purpose and capabilities + Description *string `json:"description,omitempty"` + // External identifier for the assistant + AssistantId NullableString `json:"assistant_id,omitempty"` + // Provider of the AI agent + Provider NullableString `json:"provider,omitempty"` + // Language of the agent + Language NullableString `json:"language,omitempty"` + Languages []string `json:"languages,omitempty"` + // WebSocket URL for real-time communication with the agent + WebsocketUrl NullableString `json:"websocket_url,omitempty"` + // Headers to be sent to the websocket server + WebsocketHeaders map[string]interface{} `json:"websocket_headers,omitempty"` + Workspace NullableString `json:"workspace,omitempty"` + KnowledgeBase NullableString `json:"knowledge_base,omitempty"` + // Organization this agent definition belongs to + Organization *string `json:"organization,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + LatestVersion *string `json:"latest_version,omitempty"` + LatestVersionId *string `json:"latest_version_id,omitempty"` + // Details of the model + ModelDetails map[string]interface{} `json:"model_details,omitempty"` + // Model of the agent + Model NullableString `json:"model,omitempty"` +} + +// NewAgentDefinitionListResponse instantiates a new AgentDefinitionListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionListResponse() *AgentDefinitionListResponse { + this := AgentDefinitionListResponse{} + return &this +} + +// NewAgentDefinitionListResponseWithDefaults instantiates a new AgentDefinitionListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionListResponseWithDefaults() *AgentDefinitionListResponse { + this := AgentDefinitionListResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AgentDefinitionListResponse) SetId(v string) { + o.Id = &v +} + +// GetAgentName returns the AgentName field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetAgentName() string { + if o == nil || IsNil(o.AgentName) { + var ret string + return ret + } + return *o.AgentName +} + +// GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentName) { + return nil, false + } + return o.AgentName, true +} + +// HasAgentName returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasAgentName() bool { + if o != nil && !IsNil(o.AgentName) { + return true + } + + return false +} + +// SetAgentName gets a reference to the given string and assigns it to the AgentName field. +func (o *AgentDefinitionListResponse) SetAgentName(v string) { + o.AgentName = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *AgentDefinitionListResponse) SetAgentType(v string) { + o.AgentType = &v +} + +// GetContactNumber returns the ContactNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetContactNumber() string { + if o == nil || IsNil(o.ContactNumber.Get()) { + var ret string + return ret + } + return *o.ContactNumber.Get() +} + +// GetContactNumberOk returns a tuple with the ContactNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetContactNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContactNumber.Get(), o.ContactNumber.IsSet() +} + +// HasContactNumber returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasContactNumber() bool { + if o != nil && o.ContactNumber.IsSet() { + return true + } + + return false +} + +// SetContactNumber gets a reference to the given NullableString and assigns it to the ContactNumber field. +func (o *AgentDefinitionListResponse) SetContactNumber(v string) { + o.ContactNumber.Set(&v) +} + +// SetContactNumberNil sets the value for ContactNumber to be an explicit nil +func (o *AgentDefinitionListResponse) SetContactNumberNil() { + o.ContactNumber.Set(nil) +} + +// UnsetContactNumber ensures that no value is present for ContactNumber, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetContactNumber() { + o.ContactNumber.Unset() +} + +// GetInbound returns the Inbound field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetInbound() bool { + if o == nil || IsNil(o.Inbound) { + var ret bool + return ret + } + return *o.Inbound +} + +// GetInboundOk returns a tuple with the Inbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetInboundOk() (*bool, bool) { + if o == nil || IsNil(o.Inbound) { + return nil, false + } + return o.Inbound, true +} + +// HasInbound returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasInbound() bool { + if o != nil && !IsNil(o.Inbound) { + return true + } + + return false +} + +// SetInbound gets a reference to the given bool and assigns it to the Inbound field. +func (o *AgentDefinitionListResponse) SetInbound(v bool) { + o.Inbound = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AgentDefinitionListResponse) SetDescription(v string) { + o.Description = &v +} + +// GetAssistantId returns the AssistantId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetAssistantId() string { + if o == nil || IsNil(o.AssistantId.Get()) { + var ret string + return ret + } + return *o.AssistantId.Get() +} + +// GetAssistantIdOk returns a tuple with the AssistantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetAssistantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AssistantId.Get(), o.AssistantId.IsSet() +} + +// HasAssistantId returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasAssistantId() bool { + if o != nil && o.AssistantId.IsSet() { + return true + } + + return false +} + +// SetAssistantId gets a reference to the given NullableString and assigns it to the AssistantId field. +func (o *AgentDefinitionListResponse) SetAssistantId(v string) { + o.AssistantId.Set(&v) +} + +// SetAssistantIdNil sets the value for AssistantId to be an explicit nil +func (o *AgentDefinitionListResponse) SetAssistantIdNil() { + o.AssistantId.Set(nil) +} + +// UnsetAssistantId ensures that no value is present for AssistantId, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetAssistantId() { + o.AssistantId.Unset() +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *AgentDefinitionListResponse) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *AgentDefinitionListResponse) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetProvider() { + o.Provider.Unset() +} + +// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetLanguage() string { + if o == nil || IsNil(o.Language.Get()) { + var ret string + return ret + } + return *o.Language.Get() +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Language.Get(), o.Language.IsSet() +} + +// HasLanguage returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasLanguage() bool { + if o != nil && o.Language.IsSet() { + return true + } + + return false +} + +// SetLanguage gets a reference to the given NullableString and assigns it to the Language field. +func (o *AgentDefinitionListResponse) SetLanguage(v string) { + o.Language.Set(&v) +} + +// SetLanguageNil sets the value for Language to be an explicit nil +func (o *AgentDefinitionListResponse) SetLanguageNil() { + o.Language.Set(nil) +} + +// UnsetLanguage ensures that no value is present for Language, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetLanguage() { + o.Language.Unset() +} + +// GetLanguages returns the Languages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetLanguages() []string { + if o == nil { + var ret []string + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetLanguagesOk() ([]string, bool) { + if o == nil || IsNil(o.Languages) { + return nil, false + } + return o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasLanguages() bool { + if o != nil && !IsNil(o.Languages) { + return true + } + + return false +} + +// SetLanguages gets a reference to the given []string and assigns it to the Languages field. +func (o *AgentDefinitionListResponse) SetLanguages(v []string) { + o.Languages = v +} + +// GetWebsocketUrl returns the WebsocketUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetWebsocketUrl() string { + if o == nil || IsNil(o.WebsocketUrl.Get()) { + var ret string + return ret + } + return *o.WebsocketUrl.Get() +} + +// GetWebsocketUrlOk returns a tuple with the WebsocketUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetWebsocketUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WebsocketUrl.Get(), o.WebsocketUrl.IsSet() +} + +// HasWebsocketUrl returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasWebsocketUrl() bool { + if o != nil && o.WebsocketUrl.IsSet() { + return true + } + + return false +} + +// SetWebsocketUrl gets a reference to the given NullableString and assigns it to the WebsocketUrl field. +func (o *AgentDefinitionListResponse) SetWebsocketUrl(v string) { + o.WebsocketUrl.Set(&v) +} + +// SetWebsocketUrlNil sets the value for WebsocketUrl to be an explicit nil +func (o *AgentDefinitionListResponse) SetWebsocketUrlNil() { + o.WebsocketUrl.Set(nil) +} + +// UnsetWebsocketUrl ensures that no value is present for WebsocketUrl, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetWebsocketUrl() { + o.WebsocketUrl.Unset() +} + +// GetWebsocketHeaders returns the WebsocketHeaders field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetWebsocketHeaders() map[string]interface{} { + if o == nil || IsNil(o.WebsocketHeaders) { + var ret map[string]interface{} + return ret + } + return o.WebsocketHeaders +} + +// GetWebsocketHeadersOk returns a tuple with the WebsocketHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetWebsocketHeadersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.WebsocketHeaders) { + return map[string]interface{}{}, false + } + return o.WebsocketHeaders, true +} + +// HasWebsocketHeaders returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasWebsocketHeaders() bool { + if o != nil && !IsNil(o.WebsocketHeaders) { + return true + } + + return false +} + +// SetWebsocketHeaders gets a reference to the given map[string]interface{} and assigns it to the WebsocketHeaders field. +func (o *AgentDefinitionListResponse) SetWebsocketHeaders(v map[string]interface{}) { + o.WebsocketHeaders = v +} + +// GetWorkspace returns the Workspace field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetWorkspace() string { + if o == nil || IsNil(o.Workspace.Get()) { + var ret string + return ret + } + return *o.Workspace.Get() +} + +// GetWorkspaceOk returns a tuple with the Workspace field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetWorkspaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Workspace.Get(), o.Workspace.IsSet() +} + +// HasWorkspace returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasWorkspace() bool { + if o != nil && o.Workspace.IsSet() { + return true + } + + return false +} + +// SetWorkspace gets a reference to the given NullableString and assigns it to the Workspace field. +func (o *AgentDefinitionListResponse) SetWorkspace(v string) { + o.Workspace.Set(&v) +} + +// SetWorkspaceNil sets the value for Workspace to be an explicit nil +func (o *AgentDefinitionListResponse) SetWorkspaceNil() { + o.Workspace.Set(nil) +} + +// UnsetWorkspace ensures that no value is present for Workspace, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetWorkspace() { + o.Workspace.Unset() +} + +// GetKnowledgeBase returns the KnowledgeBase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetKnowledgeBase() string { + if o == nil || IsNil(o.KnowledgeBase.Get()) { + var ret string + return ret + } + return *o.KnowledgeBase.Get() +} + +// GetKnowledgeBaseOk returns a tuple with the KnowledgeBase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetKnowledgeBaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KnowledgeBase.Get(), o.KnowledgeBase.IsSet() +} + +// HasKnowledgeBase returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasKnowledgeBase() bool { + if o != nil && o.KnowledgeBase.IsSet() { + return true + } + + return false +} + +// SetKnowledgeBase gets a reference to the given NullableString and assigns it to the KnowledgeBase field. +func (o *AgentDefinitionListResponse) SetKnowledgeBase(v string) { + o.KnowledgeBase.Set(&v) +} + +// SetKnowledgeBaseNil sets the value for KnowledgeBase to be an explicit nil +func (o *AgentDefinitionListResponse) SetKnowledgeBaseNil() { + o.KnowledgeBase.Set(nil) +} + +// UnsetKnowledgeBase ensures that no value is present for KnowledgeBase, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetKnowledgeBase() { + o.KnowledgeBase.Unset() +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *AgentDefinitionListResponse) SetOrganization(v string) { + o.Organization = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AgentDefinitionListResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AgentDefinitionListResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetLatestVersion returns the LatestVersion field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetLatestVersion() string { + if o == nil || IsNil(o.LatestVersion) { + var ret string + return ret + } + return *o.LatestVersion +} + +// GetLatestVersionOk returns a tuple with the LatestVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetLatestVersionOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersion) { + return nil, false + } + return o.LatestVersion, true +} + +// HasLatestVersion returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasLatestVersion() bool { + if o != nil && !IsNil(o.LatestVersion) { + return true + } + + return false +} + +// SetLatestVersion gets a reference to the given string and assigns it to the LatestVersion field. +func (o *AgentDefinitionListResponse) SetLatestVersion(v string) { + o.LatestVersion = &v +} + +// GetLatestVersionId returns the LatestVersionId field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetLatestVersionId() string { + if o == nil || IsNil(o.LatestVersionId) { + var ret string + return ret + } + return *o.LatestVersionId +} + +// GetLatestVersionIdOk returns a tuple with the LatestVersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetLatestVersionIdOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionId) { + return nil, false + } + return o.LatestVersionId, true +} + +// HasLatestVersionId returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasLatestVersionId() bool { + if o != nil && !IsNil(o.LatestVersionId) { + return true + } + + return false +} + +// SetLatestVersionId gets a reference to the given string and assigns it to the LatestVersionId field. +func (o *AgentDefinitionListResponse) SetLatestVersionId(v string) { + o.LatestVersionId = &v +} + +// GetModelDetails returns the ModelDetails field value if set, zero value otherwise. +func (o *AgentDefinitionListResponse) GetModelDetails() map[string]interface{} { + if o == nil || IsNil(o.ModelDetails) { + var ret map[string]interface{} + return ret + } + return o.ModelDetails +} + +// GetModelDetailsOk returns a tuple with the ModelDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionListResponse) GetModelDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ModelDetails) { + return map[string]interface{}{}, false + } + return o.ModelDetails, true +} + +// HasModelDetails returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasModelDetails() bool { + if o != nil && !IsNil(o.ModelDetails) { + return true + } + + return false +} + +// SetModelDetails gets a reference to the given map[string]interface{} and assigns it to the ModelDetails field. +func (o *AgentDefinitionListResponse) SetModelDetails(v map[string]interface{}) { + o.ModelDetails = v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionListResponse) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionListResponse) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *AgentDefinitionListResponse) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *AgentDefinitionListResponse) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *AgentDefinitionListResponse) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *AgentDefinitionListResponse) UnsetModel() { + o.Model.Unset() +} + +func (o AgentDefinitionListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.AgentName) { + toSerialize["agent_name"] = o.AgentName + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + if o.ContactNumber.IsSet() { + toSerialize["contact_number"] = o.ContactNumber.Get() + } + if !IsNil(o.Inbound) { + toSerialize["inbound"] = o.Inbound + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.AssistantId.IsSet() { + toSerialize["assistant_id"] = o.AssistantId.Get() + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if o.Language.IsSet() { + toSerialize["language"] = o.Language.Get() + } + if o.Languages != nil { + toSerialize["languages"] = o.Languages + } + if o.WebsocketUrl.IsSet() { + toSerialize["websocket_url"] = o.WebsocketUrl.Get() + } + if !IsNil(o.WebsocketHeaders) { + toSerialize["websocket_headers"] = o.WebsocketHeaders + } + if o.Workspace.IsSet() { + toSerialize["workspace"] = o.Workspace.Get() + } + if o.KnowledgeBase.IsSet() { + toSerialize["knowledge_base"] = o.KnowledgeBase.Get() + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.LatestVersion) { + toSerialize["latest_version"] = o.LatestVersion + } + if !IsNil(o.LatestVersionId) { + toSerialize["latest_version_id"] = o.LatestVersionId + } + if !IsNil(o.ModelDetails) { + toSerialize["model_details"] = o.ModelDetails + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + return toSerialize, nil +} + +type NullableAgentDefinitionListResponse struct { + value *AgentDefinitionListResponse + isSet bool +} + +func (v NullableAgentDefinitionListResponse) Get() *AgentDefinitionListResponse { + return v.value +} + +func (v *NullableAgentDefinitionListResponse) Set(val *AgentDefinitionListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionListResponse(val *AgentDefinitionListResponse) *NullableAgentDefinitionListResponse { + return &NullableAgentDefinitionListResponse{value: val, isSet: true} +} + +func (v NullableAgentDefinitionListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_definition_response.go b/go/futureagi/model_agent_definition_response.go new file mode 100644 index 0000000..e5b923d --- /dev/null +++ b/go/futureagi/model_agent_definition_response.go @@ -0,0 +1,1197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the AgentDefinitionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentDefinitionResponse{} + +// AgentDefinitionResponse struct for AgentDefinitionResponse +type AgentDefinitionResponse struct { + Id *string `json:"id,omitempty"` + // Name of the AI agent + AgentName *string `json:"agent_name,omitempty"` + AgentType *string `json:"agent_type,omitempty"` + // Phone number associated with the AI agent + ContactNumber NullableString `json:"contact_number,omitempty"` + // Whether the agent handles inbound calls + Inbound *bool `json:"inbound,omitempty"` + // Detailed description of the AI agent's purpose and capabilities + Description *string `json:"description,omitempty"` + // External identifier for the assistant + AssistantId NullableString `json:"assistant_id,omitempty"` + // Provider of the AI agent + Provider NullableString `json:"provider,omitempty"` + // Language of the agent + Language NullableString `json:"language,omitempty"` + Languages []string `json:"languages,omitempty"` + AuthenticationMethod NullableString `json:"authentication_method,omitempty"` + // WebSocket URL for real-time communication with the agent + WebsocketUrl NullableString `json:"websocket_url,omitempty"` + // Headers to be sent to the websocket server + WebsocketHeaders map[string]interface{} `json:"websocket_headers,omitempty"` + Workspace NullableString `json:"workspace,omitempty"` + KnowledgeBase NullableString `json:"knowledge_base,omitempty"` + // Organization this agent definition belongs to + Organization *string `json:"organization,omitempty"` + // API key for the agent + ApiKey NullableString `json:"api_key,omitempty"` + ObservabilityProvider NullableString `json:"observability_provider,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // Model of the agent + Model NullableString `json:"model,omitempty"` + // Details of the model + ModelDetails map[string]interface{} `json:"model_details,omitempty"` + LivekitUrl *string `json:"livekit_url,omitempty"` + LivekitApiKey *string `json:"livekit_api_key,omitempty"` + LivekitAgentName *string `json:"livekit_agent_name,omitempty"` + LivekitConfigJson *string `json:"livekit_config_json,omitempty"` + LivekitMaxConcurrency *string `json:"livekit_max_concurrency,omitempty"` +} + +// NewAgentDefinitionResponse instantiates a new AgentDefinitionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentDefinitionResponse() *AgentDefinitionResponse { + this := AgentDefinitionResponse{} + return &this +} + +// NewAgentDefinitionResponseWithDefaults instantiates a new AgentDefinitionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentDefinitionResponseWithDefaults() *AgentDefinitionResponse { + this := AgentDefinitionResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AgentDefinitionResponse) SetId(v string) { + o.Id = &v +} + +// GetAgentName returns the AgentName field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetAgentName() string { + if o == nil || IsNil(o.AgentName) { + var ret string + return ret + } + return *o.AgentName +} + +// GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentName) { + return nil, false + } + return o.AgentName, true +} + +// HasAgentName returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasAgentName() bool { + if o != nil && !IsNil(o.AgentName) { + return true + } + + return false +} + +// SetAgentName gets a reference to the given string and assigns it to the AgentName field. +func (o *AgentDefinitionResponse) SetAgentName(v string) { + o.AgentName = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *AgentDefinitionResponse) SetAgentType(v string) { + o.AgentType = &v +} + +// GetContactNumber returns the ContactNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetContactNumber() string { + if o == nil || IsNil(o.ContactNumber.Get()) { + var ret string + return ret + } + return *o.ContactNumber.Get() +} + +// GetContactNumberOk returns a tuple with the ContactNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetContactNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContactNumber.Get(), o.ContactNumber.IsSet() +} + +// HasContactNumber returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasContactNumber() bool { + if o != nil && o.ContactNumber.IsSet() { + return true + } + + return false +} + +// SetContactNumber gets a reference to the given NullableString and assigns it to the ContactNumber field. +func (o *AgentDefinitionResponse) SetContactNumber(v string) { + o.ContactNumber.Set(&v) +} + +// SetContactNumberNil sets the value for ContactNumber to be an explicit nil +func (o *AgentDefinitionResponse) SetContactNumberNil() { + o.ContactNumber.Set(nil) +} + +// UnsetContactNumber ensures that no value is present for ContactNumber, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetContactNumber() { + o.ContactNumber.Unset() +} + +// GetInbound returns the Inbound field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetInbound() bool { + if o == nil || IsNil(o.Inbound) { + var ret bool + return ret + } + return *o.Inbound +} + +// GetInboundOk returns a tuple with the Inbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetInboundOk() (*bool, bool) { + if o == nil || IsNil(o.Inbound) { + return nil, false + } + return o.Inbound, true +} + +// HasInbound returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasInbound() bool { + if o != nil && !IsNil(o.Inbound) { + return true + } + + return false +} + +// SetInbound gets a reference to the given bool and assigns it to the Inbound field. +func (o *AgentDefinitionResponse) SetInbound(v bool) { + o.Inbound = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AgentDefinitionResponse) SetDescription(v string) { + o.Description = &v +} + +// GetAssistantId returns the AssistantId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetAssistantId() string { + if o == nil || IsNil(o.AssistantId.Get()) { + var ret string + return ret + } + return *o.AssistantId.Get() +} + +// GetAssistantIdOk returns a tuple with the AssistantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetAssistantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AssistantId.Get(), o.AssistantId.IsSet() +} + +// HasAssistantId returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasAssistantId() bool { + if o != nil && o.AssistantId.IsSet() { + return true + } + + return false +} + +// SetAssistantId gets a reference to the given NullableString and assigns it to the AssistantId field. +func (o *AgentDefinitionResponse) SetAssistantId(v string) { + o.AssistantId.Set(&v) +} + +// SetAssistantIdNil sets the value for AssistantId to be an explicit nil +func (o *AgentDefinitionResponse) SetAssistantIdNil() { + o.AssistantId.Set(nil) +} + +// UnsetAssistantId ensures that no value is present for AssistantId, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetAssistantId() { + o.AssistantId.Unset() +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *AgentDefinitionResponse) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *AgentDefinitionResponse) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetProvider() { + o.Provider.Unset() +} + +// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetLanguage() string { + if o == nil || IsNil(o.Language.Get()) { + var ret string + return ret + } + return *o.Language.Get() +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Language.Get(), o.Language.IsSet() +} + +// HasLanguage returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasLanguage() bool { + if o != nil && o.Language.IsSet() { + return true + } + + return false +} + +// SetLanguage gets a reference to the given NullableString and assigns it to the Language field. +func (o *AgentDefinitionResponse) SetLanguage(v string) { + o.Language.Set(&v) +} + +// SetLanguageNil sets the value for Language to be an explicit nil +func (o *AgentDefinitionResponse) SetLanguageNil() { + o.Language.Set(nil) +} + +// UnsetLanguage ensures that no value is present for Language, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetLanguage() { + o.Language.Unset() +} + +// GetLanguages returns the Languages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetLanguages() []string { + if o == nil { + var ret []string + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetLanguagesOk() ([]string, bool) { + if o == nil || IsNil(o.Languages) { + return nil, false + } + return o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasLanguages() bool { + if o != nil && !IsNil(o.Languages) { + return true + } + + return false +} + +// SetLanguages gets a reference to the given []string and assigns it to the Languages field. +func (o *AgentDefinitionResponse) SetLanguages(v []string) { + o.Languages = v +} + +// GetAuthenticationMethod returns the AuthenticationMethod field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetAuthenticationMethod() string { + if o == nil || IsNil(o.AuthenticationMethod.Get()) { + var ret string + return ret + } + return *o.AuthenticationMethod.Get() +} + +// GetAuthenticationMethodOk returns a tuple with the AuthenticationMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetAuthenticationMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthenticationMethod.Get(), o.AuthenticationMethod.IsSet() +} + +// HasAuthenticationMethod returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasAuthenticationMethod() bool { + if o != nil && o.AuthenticationMethod.IsSet() { + return true + } + + return false +} + +// SetAuthenticationMethod gets a reference to the given NullableString and assigns it to the AuthenticationMethod field. +func (o *AgentDefinitionResponse) SetAuthenticationMethod(v string) { + o.AuthenticationMethod.Set(&v) +} + +// SetAuthenticationMethodNil sets the value for AuthenticationMethod to be an explicit nil +func (o *AgentDefinitionResponse) SetAuthenticationMethodNil() { + o.AuthenticationMethod.Set(nil) +} + +// UnsetAuthenticationMethod ensures that no value is present for AuthenticationMethod, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetAuthenticationMethod() { + o.AuthenticationMethod.Unset() +} + +// GetWebsocketUrl returns the WebsocketUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetWebsocketUrl() string { + if o == nil || IsNil(o.WebsocketUrl.Get()) { + var ret string + return ret + } + return *o.WebsocketUrl.Get() +} + +// GetWebsocketUrlOk returns a tuple with the WebsocketUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetWebsocketUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WebsocketUrl.Get(), o.WebsocketUrl.IsSet() +} + +// HasWebsocketUrl returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasWebsocketUrl() bool { + if o != nil && o.WebsocketUrl.IsSet() { + return true + } + + return false +} + +// SetWebsocketUrl gets a reference to the given NullableString and assigns it to the WebsocketUrl field. +func (o *AgentDefinitionResponse) SetWebsocketUrl(v string) { + o.WebsocketUrl.Set(&v) +} + +// SetWebsocketUrlNil sets the value for WebsocketUrl to be an explicit nil +func (o *AgentDefinitionResponse) SetWebsocketUrlNil() { + o.WebsocketUrl.Set(nil) +} + +// UnsetWebsocketUrl ensures that no value is present for WebsocketUrl, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetWebsocketUrl() { + o.WebsocketUrl.Unset() +} + +// GetWebsocketHeaders returns the WebsocketHeaders field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetWebsocketHeaders() map[string]interface{} { + if o == nil || IsNil(o.WebsocketHeaders) { + var ret map[string]interface{} + return ret + } + return o.WebsocketHeaders +} + +// GetWebsocketHeadersOk returns a tuple with the WebsocketHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetWebsocketHeadersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.WebsocketHeaders) { + return map[string]interface{}{}, false + } + return o.WebsocketHeaders, true +} + +// HasWebsocketHeaders returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasWebsocketHeaders() bool { + if o != nil && !IsNil(o.WebsocketHeaders) { + return true + } + + return false +} + +// SetWebsocketHeaders gets a reference to the given map[string]interface{} and assigns it to the WebsocketHeaders field. +func (o *AgentDefinitionResponse) SetWebsocketHeaders(v map[string]interface{}) { + o.WebsocketHeaders = v +} + +// GetWorkspace returns the Workspace field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetWorkspace() string { + if o == nil || IsNil(o.Workspace.Get()) { + var ret string + return ret + } + return *o.Workspace.Get() +} + +// GetWorkspaceOk returns a tuple with the Workspace field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetWorkspaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Workspace.Get(), o.Workspace.IsSet() +} + +// HasWorkspace returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasWorkspace() bool { + if o != nil && o.Workspace.IsSet() { + return true + } + + return false +} + +// SetWorkspace gets a reference to the given NullableString and assigns it to the Workspace field. +func (o *AgentDefinitionResponse) SetWorkspace(v string) { + o.Workspace.Set(&v) +} + +// SetWorkspaceNil sets the value for Workspace to be an explicit nil +func (o *AgentDefinitionResponse) SetWorkspaceNil() { + o.Workspace.Set(nil) +} + +// UnsetWorkspace ensures that no value is present for Workspace, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetWorkspace() { + o.Workspace.Unset() +} + +// GetKnowledgeBase returns the KnowledgeBase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetKnowledgeBase() string { + if o == nil || IsNil(o.KnowledgeBase.Get()) { + var ret string + return ret + } + return *o.KnowledgeBase.Get() +} + +// GetKnowledgeBaseOk returns a tuple with the KnowledgeBase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetKnowledgeBaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KnowledgeBase.Get(), o.KnowledgeBase.IsSet() +} + +// HasKnowledgeBase returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasKnowledgeBase() bool { + if o != nil && o.KnowledgeBase.IsSet() { + return true + } + + return false +} + +// SetKnowledgeBase gets a reference to the given NullableString and assigns it to the KnowledgeBase field. +func (o *AgentDefinitionResponse) SetKnowledgeBase(v string) { + o.KnowledgeBase.Set(&v) +} + +// SetKnowledgeBaseNil sets the value for KnowledgeBase to be an explicit nil +func (o *AgentDefinitionResponse) SetKnowledgeBaseNil() { + o.KnowledgeBase.Set(nil) +} + +// UnsetKnowledgeBase ensures that no value is present for KnowledgeBase, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetKnowledgeBase() { + o.KnowledgeBase.Unset() +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *AgentDefinitionResponse) SetOrganization(v string) { + o.Organization = &v +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetApiKey() string { + if o == nil || IsNil(o.ApiKey.Get()) { + var ret string + return ret + } + return *o.ApiKey.Get() +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApiKey.Get(), o.ApiKey.IsSet() +} + +// HasApiKey returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasApiKey() bool { + if o != nil && o.ApiKey.IsSet() { + return true + } + + return false +} + +// SetApiKey gets a reference to the given NullableString and assigns it to the ApiKey field. +func (o *AgentDefinitionResponse) SetApiKey(v string) { + o.ApiKey.Set(&v) +} + +// SetApiKeyNil sets the value for ApiKey to be an explicit nil +func (o *AgentDefinitionResponse) SetApiKeyNil() { + o.ApiKey.Set(nil) +} + +// UnsetApiKey ensures that no value is present for ApiKey, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetApiKey() { + o.ApiKey.Unset() +} + +// GetObservabilityProvider returns the ObservabilityProvider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetObservabilityProvider() string { + if o == nil || IsNil(o.ObservabilityProvider.Get()) { + var ret string + return ret + } + return *o.ObservabilityProvider.Get() +} + +// GetObservabilityProviderOk returns a tuple with the ObservabilityProvider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetObservabilityProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObservabilityProvider.Get(), o.ObservabilityProvider.IsSet() +} + +// HasObservabilityProvider returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasObservabilityProvider() bool { + if o != nil && o.ObservabilityProvider.IsSet() { + return true + } + + return false +} + +// SetObservabilityProvider gets a reference to the given NullableString and assigns it to the ObservabilityProvider field. +func (o *AgentDefinitionResponse) SetObservabilityProvider(v string) { + o.ObservabilityProvider.Set(&v) +} + +// SetObservabilityProviderNil sets the value for ObservabilityProvider to be an explicit nil +func (o *AgentDefinitionResponse) SetObservabilityProviderNil() { + o.ObservabilityProvider.Set(nil) +} + +// UnsetObservabilityProvider ensures that no value is present for ObservabilityProvider, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetObservabilityProvider() { + o.ObservabilityProvider.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AgentDefinitionResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AgentDefinitionResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentDefinitionResponse) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentDefinitionResponse) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *AgentDefinitionResponse) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *AgentDefinitionResponse) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *AgentDefinitionResponse) UnsetModel() { + o.Model.Unset() +} + +// GetModelDetails returns the ModelDetails field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetModelDetails() map[string]interface{} { + if o == nil || IsNil(o.ModelDetails) { + var ret map[string]interface{} + return ret + } + return o.ModelDetails +} + +// GetModelDetailsOk returns a tuple with the ModelDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetModelDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ModelDetails) { + return map[string]interface{}{}, false + } + return o.ModelDetails, true +} + +// HasModelDetails returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasModelDetails() bool { + if o != nil && !IsNil(o.ModelDetails) { + return true + } + + return false +} + +// SetModelDetails gets a reference to the given map[string]interface{} and assigns it to the ModelDetails field. +func (o *AgentDefinitionResponse) SetModelDetails(v map[string]interface{}) { + o.ModelDetails = v +} + +// GetLivekitUrl returns the LivekitUrl field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetLivekitUrl() string { + if o == nil || IsNil(o.LivekitUrl) { + var ret string + return ret + } + return *o.LivekitUrl +} + +// GetLivekitUrlOk returns a tuple with the LivekitUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetLivekitUrlOk() (*string, bool) { + if o == nil || IsNil(o.LivekitUrl) { + return nil, false + } + return o.LivekitUrl, true +} + +// HasLivekitUrl returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasLivekitUrl() bool { + if o != nil && !IsNil(o.LivekitUrl) { + return true + } + + return false +} + +// SetLivekitUrl gets a reference to the given string and assigns it to the LivekitUrl field. +func (o *AgentDefinitionResponse) SetLivekitUrl(v string) { + o.LivekitUrl = &v +} + +// GetLivekitApiKey returns the LivekitApiKey field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetLivekitApiKey() string { + if o == nil || IsNil(o.LivekitApiKey) { + var ret string + return ret + } + return *o.LivekitApiKey +} + +// GetLivekitApiKeyOk returns a tuple with the LivekitApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetLivekitApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.LivekitApiKey) { + return nil, false + } + return o.LivekitApiKey, true +} + +// HasLivekitApiKey returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasLivekitApiKey() bool { + if o != nil && !IsNil(o.LivekitApiKey) { + return true + } + + return false +} + +// SetLivekitApiKey gets a reference to the given string and assigns it to the LivekitApiKey field. +func (o *AgentDefinitionResponse) SetLivekitApiKey(v string) { + o.LivekitApiKey = &v +} + +// GetLivekitAgentName returns the LivekitAgentName field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetLivekitAgentName() string { + if o == nil || IsNil(o.LivekitAgentName) { + var ret string + return ret + } + return *o.LivekitAgentName +} + +// GetLivekitAgentNameOk returns a tuple with the LivekitAgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetLivekitAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.LivekitAgentName) { + return nil, false + } + return o.LivekitAgentName, true +} + +// HasLivekitAgentName returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasLivekitAgentName() bool { + if o != nil && !IsNil(o.LivekitAgentName) { + return true + } + + return false +} + +// SetLivekitAgentName gets a reference to the given string and assigns it to the LivekitAgentName field. +func (o *AgentDefinitionResponse) SetLivekitAgentName(v string) { + o.LivekitAgentName = &v +} + +// GetLivekitConfigJson returns the LivekitConfigJson field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetLivekitConfigJson() string { + if o == nil || IsNil(o.LivekitConfigJson) { + var ret string + return ret + } + return *o.LivekitConfigJson +} + +// GetLivekitConfigJsonOk returns a tuple with the LivekitConfigJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetLivekitConfigJsonOk() (*string, bool) { + if o == nil || IsNil(o.LivekitConfigJson) { + return nil, false + } + return o.LivekitConfigJson, true +} + +// HasLivekitConfigJson returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasLivekitConfigJson() bool { + if o != nil && !IsNil(o.LivekitConfigJson) { + return true + } + + return false +} + +// SetLivekitConfigJson gets a reference to the given string and assigns it to the LivekitConfigJson field. +func (o *AgentDefinitionResponse) SetLivekitConfigJson(v string) { + o.LivekitConfigJson = &v +} + +// GetLivekitMaxConcurrency returns the LivekitMaxConcurrency field value if set, zero value otherwise. +func (o *AgentDefinitionResponse) GetLivekitMaxConcurrency() string { + if o == nil || IsNil(o.LivekitMaxConcurrency) { + var ret string + return ret + } + return *o.LivekitMaxConcurrency +} + +// GetLivekitMaxConcurrencyOk returns a tuple with the LivekitMaxConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentDefinitionResponse) GetLivekitMaxConcurrencyOk() (*string, bool) { + if o == nil || IsNil(o.LivekitMaxConcurrency) { + return nil, false + } + return o.LivekitMaxConcurrency, true +} + +// HasLivekitMaxConcurrency returns a boolean if a field has been set. +func (o *AgentDefinitionResponse) HasLivekitMaxConcurrency() bool { + if o != nil && !IsNil(o.LivekitMaxConcurrency) { + return true + } + + return false +} + +// SetLivekitMaxConcurrency gets a reference to the given string and assigns it to the LivekitMaxConcurrency field. +func (o *AgentDefinitionResponse) SetLivekitMaxConcurrency(v string) { + o.LivekitMaxConcurrency = &v +} + +func (o AgentDefinitionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentDefinitionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.AgentName) { + toSerialize["agent_name"] = o.AgentName + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + if o.ContactNumber.IsSet() { + toSerialize["contact_number"] = o.ContactNumber.Get() + } + if !IsNil(o.Inbound) { + toSerialize["inbound"] = o.Inbound + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.AssistantId.IsSet() { + toSerialize["assistant_id"] = o.AssistantId.Get() + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if o.Language.IsSet() { + toSerialize["language"] = o.Language.Get() + } + if o.Languages != nil { + toSerialize["languages"] = o.Languages + } + if o.AuthenticationMethod.IsSet() { + toSerialize["authentication_method"] = o.AuthenticationMethod.Get() + } + if o.WebsocketUrl.IsSet() { + toSerialize["websocket_url"] = o.WebsocketUrl.Get() + } + if !IsNil(o.WebsocketHeaders) { + toSerialize["websocket_headers"] = o.WebsocketHeaders + } + if o.Workspace.IsSet() { + toSerialize["workspace"] = o.Workspace.Get() + } + if o.KnowledgeBase.IsSet() { + toSerialize["knowledge_base"] = o.KnowledgeBase.Get() + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if o.ApiKey.IsSet() { + toSerialize["api_key"] = o.ApiKey.Get() + } + if o.ObservabilityProvider.IsSet() { + toSerialize["observability_provider"] = o.ObservabilityProvider.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.ModelDetails) { + toSerialize["model_details"] = o.ModelDetails + } + if !IsNil(o.LivekitUrl) { + toSerialize["livekit_url"] = o.LivekitUrl + } + if !IsNil(o.LivekitApiKey) { + toSerialize["livekit_api_key"] = o.LivekitApiKey + } + if !IsNil(o.LivekitAgentName) { + toSerialize["livekit_agent_name"] = o.LivekitAgentName + } + if !IsNil(o.LivekitConfigJson) { + toSerialize["livekit_config_json"] = o.LivekitConfigJson + } + if !IsNil(o.LivekitMaxConcurrency) { + toSerialize["livekit_max_concurrency"] = o.LivekitMaxConcurrency + } + return toSerialize, nil +} + +type NullableAgentDefinitionResponse struct { + value *AgentDefinitionResponse + isSet bool +} + +func (v NullableAgentDefinitionResponse) Get() *AgentDefinitionResponse { + return v.value +} + +func (v *NullableAgentDefinitionResponse) Set(val *AgentDefinitionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentDefinitionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentDefinitionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentDefinitionResponse(val *AgentDefinitionResponse) *NullableAgentDefinitionResponse { + return &NullableAgentDefinitionResponse{value: val, isSet: true} +} + +func (v NullableAgentDefinitionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentDefinitionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_flow_graph.go b/go/futureagi/model_agent_flow_graph.go new file mode 100644 index 0000000..d57c4e5 --- /dev/null +++ b/go/futureagi/model_agent_flow_graph.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AgentFlowGraph type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentFlowGraph{} + +// AgentFlowGraph struct for AgentFlowGraph +type AgentFlowGraph struct { + Nodes []map[string]string `json:"nodes"` + Edges []map[string]string `json:"edges"` +} + +type _AgentFlowGraph AgentFlowGraph + +// NewAgentFlowGraph instantiates a new AgentFlowGraph object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentFlowGraph(nodes []map[string]string, edges []map[string]string) *AgentFlowGraph { + this := AgentFlowGraph{} + this.Nodes = nodes + this.Edges = edges + return &this +} + +// NewAgentFlowGraphWithDefaults instantiates a new AgentFlowGraph object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentFlowGraphWithDefaults() *AgentFlowGraph { + this := AgentFlowGraph{} + return &this +} + +// GetNodes returns the Nodes field value +func (o *AgentFlowGraph) GetNodes() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.Nodes +} + +// GetNodesOk returns a tuple with the Nodes field value +// and a boolean to check if the value has been set. +func (o *AgentFlowGraph) GetNodesOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.Nodes, true +} + +// SetNodes sets field value +func (o *AgentFlowGraph) SetNodes(v []map[string]string) { + o.Nodes = v +} + +// GetEdges returns the Edges field value +func (o *AgentFlowGraph) GetEdges() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.Edges +} + +// GetEdgesOk returns a tuple with the Edges field value +// and a boolean to check if the value has been set. +func (o *AgentFlowGraph) GetEdgesOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.Edges, true +} + +// SetEdges sets field value +func (o *AgentFlowGraph) SetEdges(v []map[string]string) { + o.Edges = v +} + +func (o AgentFlowGraph) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentFlowGraph) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["nodes"] = o.Nodes + toSerialize["edges"] = o.Edges + return toSerialize, nil +} + +func (o *AgentFlowGraph) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "nodes", + "edges", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAgentFlowGraph := _AgentFlowGraph{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAgentFlowGraph) + + if err != nil { + return err + } + + *o = AgentFlowGraph(varAgentFlowGraph) + + return err +} + +type NullableAgentFlowGraph struct { + value *AgentFlowGraph + isSet bool +} + +func (v NullableAgentFlowGraph) Get() *AgentFlowGraph { + return v.value +} + +func (v *NullableAgentFlowGraph) Set(val *AgentFlowGraph) { + v.value = val + v.isSet = true +} + +func (v NullableAgentFlowGraph) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentFlowGraph) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentFlowGraph(val *AgentFlowGraph) *NullableAgentFlowGraph { + return &NullableAgentFlowGraph{value: val, isSet: true} +} + +func (v NullableAgentFlowGraph) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentFlowGraph) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_version_activate_response.go b/go/futureagi/model_agent_version_activate_response.go new file mode 100644 index 0000000..1a9573a --- /dev/null +++ b/go/futureagi/model_agent_version_activate_response.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentVersionActivateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentVersionActivateResponse{} + +// AgentVersionActivateResponse struct for AgentVersionActivateResponse +type AgentVersionActivateResponse struct { + Message *string `json:"message,omitempty"` + Version *AgentVersionResponse `json:"version,omitempty"` +} + +// NewAgentVersionActivateResponse instantiates a new AgentVersionActivateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentVersionActivateResponse() *AgentVersionActivateResponse { + this := AgentVersionActivateResponse{} + return &this +} + +// NewAgentVersionActivateResponseWithDefaults instantiates a new AgentVersionActivateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentVersionActivateResponseWithDefaults() *AgentVersionActivateResponse { + this := AgentVersionActivateResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentVersionActivateResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionActivateResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentVersionActivateResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentVersionActivateResponse) SetMessage(v string) { + o.Message = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *AgentVersionActivateResponse) GetVersion() AgentVersionResponse { + if o == nil || IsNil(o.Version) { + var ret AgentVersionResponse + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionActivateResponse) GetVersionOk() (*AgentVersionResponse, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *AgentVersionActivateResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given AgentVersionResponse and assigns it to the Version field. +func (o *AgentVersionActivateResponse) SetVersion(v AgentVersionResponse) { + o.Version = &v +} + +func (o AgentVersionActivateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentVersionActivateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableAgentVersionActivateResponse struct { + value *AgentVersionActivateResponse + isSet bool +} + +func (v NullableAgentVersionActivateResponse) Get() *AgentVersionActivateResponse { + return v.value +} + +func (v *NullableAgentVersionActivateResponse) Set(val *AgentVersionActivateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentVersionActivateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentVersionActivateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentVersionActivateResponse(val *AgentVersionActivateResponse) *NullableAgentVersionActivateResponse { + return &NullableAgentVersionActivateResponse{value: val, isSet: true} +} + +func (v NullableAgentVersionActivateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentVersionActivateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_version_create_request.go b/go/futureagi/model_agent_version_create_request.go new file mode 100644 index 0000000..8f396a9 --- /dev/null +++ b/go/futureagi/model_agent_version_create_request.go @@ -0,0 +1,989 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentVersionCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentVersionCreateRequest{} + +// AgentVersionCreateRequest struct for AgentVersionCreateRequest +type AgentVersionCreateRequest struct { + AgentName *string `json:"agent_name,omitempty"` + AgentType *string `json:"agent_type,omitempty"` + Description NullableString `json:"description,omitempty"` + Provider NullableString `json:"provider,omitempty"` + ApiKey NullableString `json:"api_key,omitempty"` + AssistantId NullableString `json:"assistant_id,omitempty"` + AuthenticationMethod NullableString `json:"authentication_method,omitempty"` + Language NullableString `json:"language,omitempty"` + Languages []string `json:"languages,omitempty"` + ContactNumber NullableString `json:"contact_number,omitempty"` + Inbound *bool `json:"inbound,omitempty"` + KnowledgeBase NullableString `json:"knowledge_base,omitempty"` + Model NullableString `json:"model,omitempty"` + ModelDetails map[string]interface{} `json:"model_details,omitempty"` + LivekitUrl *string `json:"livekit_url,omitempty"` + LivekitApiKey *string `json:"livekit_api_key,omitempty"` + LivekitApiSecret *string `json:"livekit_api_secret,omitempty"` + LivekitAgentName *string `json:"livekit_agent_name,omitempty"` + LivekitConfigJson map[string]interface{} `json:"livekit_config_json,omitempty"` + LivekitMaxConcurrency *int32 `json:"livekit_max_concurrency,omitempty"` + CommitMessage *string `json:"commit_message,omitempty"` + ObservabilityEnabled *bool `json:"observability_enabled,omitempty"` +} + +// NewAgentVersionCreateRequest instantiates a new AgentVersionCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentVersionCreateRequest() *AgentVersionCreateRequest { + this := AgentVersionCreateRequest{} + var commitMessage string = "" + this.CommitMessage = &commitMessage + var observabilityEnabled bool = false + this.ObservabilityEnabled = &observabilityEnabled + return &this +} + +// NewAgentVersionCreateRequestWithDefaults instantiates a new AgentVersionCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentVersionCreateRequestWithDefaults() *AgentVersionCreateRequest { + this := AgentVersionCreateRequest{} + var commitMessage string = "" + this.CommitMessage = &commitMessage + var observabilityEnabled bool = false + this.ObservabilityEnabled = &observabilityEnabled + return &this +} + +// GetAgentName returns the AgentName field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetAgentName() string { + if o == nil || IsNil(o.AgentName) { + var ret string + return ret + } + return *o.AgentName +} + +// GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentName) { + return nil, false + } + return o.AgentName, true +} + +// HasAgentName returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasAgentName() bool { + if o != nil && !IsNil(o.AgentName) { + return true + } + + return false +} + +// SetAgentName gets a reference to the given string and assigns it to the AgentName field. +func (o *AgentVersionCreateRequest) SetAgentName(v string) { + o.AgentName = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *AgentVersionCreateRequest) SetAgentType(v string) { + o.AgentType = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *AgentVersionCreateRequest) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *AgentVersionCreateRequest) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetDescription() { + o.Description.Unset() +} + +// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetProvider() string { + if o == nil || IsNil(o.Provider.Get()) { + var ret string + return ret + } + return *o.Provider.Get() +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Provider.Get(), o.Provider.IsSet() +} + +// HasProvider returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasProvider() bool { + if o != nil && o.Provider.IsSet() { + return true + } + + return false +} + +// SetProvider gets a reference to the given NullableString and assigns it to the Provider field. +func (o *AgentVersionCreateRequest) SetProvider(v string) { + o.Provider.Set(&v) +} + +// SetProviderNil sets the value for Provider to be an explicit nil +func (o *AgentVersionCreateRequest) SetProviderNil() { + o.Provider.Set(nil) +} + +// UnsetProvider ensures that no value is present for Provider, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetProvider() { + o.Provider.Unset() +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetApiKey() string { + if o == nil || IsNil(o.ApiKey.Get()) { + var ret string + return ret + } + return *o.ApiKey.Get() +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ApiKey.Get(), o.ApiKey.IsSet() +} + +// HasApiKey returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasApiKey() bool { + if o != nil && o.ApiKey.IsSet() { + return true + } + + return false +} + +// SetApiKey gets a reference to the given NullableString and assigns it to the ApiKey field. +func (o *AgentVersionCreateRequest) SetApiKey(v string) { + o.ApiKey.Set(&v) +} + +// SetApiKeyNil sets the value for ApiKey to be an explicit nil +func (o *AgentVersionCreateRequest) SetApiKeyNil() { + o.ApiKey.Set(nil) +} + +// UnsetApiKey ensures that no value is present for ApiKey, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetApiKey() { + o.ApiKey.Unset() +} + +// GetAssistantId returns the AssistantId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetAssistantId() string { + if o == nil || IsNil(o.AssistantId.Get()) { + var ret string + return ret + } + return *o.AssistantId.Get() +} + +// GetAssistantIdOk returns a tuple with the AssistantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetAssistantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AssistantId.Get(), o.AssistantId.IsSet() +} + +// HasAssistantId returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasAssistantId() bool { + if o != nil && o.AssistantId.IsSet() { + return true + } + + return false +} + +// SetAssistantId gets a reference to the given NullableString and assigns it to the AssistantId field. +func (o *AgentVersionCreateRequest) SetAssistantId(v string) { + o.AssistantId.Set(&v) +} + +// SetAssistantIdNil sets the value for AssistantId to be an explicit nil +func (o *AgentVersionCreateRequest) SetAssistantIdNil() { + o.AssistantId.Set(nil) +} + +// UnsetAssistantId ensures that no value is present for AssistantId, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetAssistantId() { + o.AssistantId.Unset() +} + +// GetAuthenticationMethod returns the AuthenticationMethod field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetAuthenticationMethod() string { + if o == nil || IsNil(o.AuthenticationMethod.Get()) { + var ret string + return ret + } + return *o.AuthenticationMethod.Get() +} + +// GetAuthenticationMethodOk returns a tuple with the AuthenticationMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetAuthenticationMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthenticationMethod.Get(), o.AuthenticationMethod.IsSet() +} + +// HasAuthenticationMethod returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasAuthenticationMethod() bool { + if o != nil && o.AuthenticationMethod.IsSet() { + return true + } + + return false +} + +// SetAuthenticationMethod gets a reference to the given NullableString and assigns it to the AuthenticationMethod field. +func (o *AgentVersionCreateRequest) SetAuthenticationMethod(v string) { + o.AuthenticationMethod.Set(&v) +} + +// SetAuthenticationMethodNil sets the value for AuthenticationMethod to be an explicit nil +func (o *AgentVersionCreateRequest) SetAuthenticationMethodNil() { + o.AuthenticationMethod.Set(nil) +} + +// UnsetAuthenticationMethod ensures that no value is present for AuthenticationMethod, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetAuthenticationMethod() { + o.AuthenticationMethod.Unset() +} + +// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetLanguage() string { + if o == nil || IsNil(o.Language.Get()) { + var ret string + return ret + } + return *o.Language.Get() +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Language.Get(), o.Language.IsSet() +} + +// HasLanguage returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLanguage() bool { + if o != nil && o.Language.IsSet() { + return true + } + + return false +} + +// SetLanguage gets a reference to the given NullableString and assigns it to the Language field. +func (o *AgentVersionCreateRequest) SetLanguage(v string) { + o.Language.Set(&v) +} + +// SetLanguageNil sets the value for Language to be an explicit nil +func (o *AgentVersionCreateRequest) SetLanguageNil() { + o.Language.Set(nil) +} + +// UnsetLanguage ensures that no value is present for Language, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetLanguage() { + o.Language.Unset() +} + +// GetLanguages returns the Languages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetLanguages() []string { + if o == nil { + var ret []string + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetLanguagesOk() ([]string, bool) { + if o == nil || IsNil(o.Languages) { + return nil, false + } + return o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLanguages() bool { + if o != nil && !IsNil(o.Languages) { + return true + } + + return false +} + +// SetLanguages gets a reference to the given []string and assigns it to the Languages field. +func (o *AgentVersionCreateRequest) SetLanguages(v []string) { + o.Languages = v +} + +// GetContactNumber returns the ContactNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetContactNumber() string { + if o == nil || IsNil(o.ContactNumber.Get()) { + var ret string + return ret + } + return *o.ContactNumber.Get() +} + +// GetContactNumberOk returns a tuple with the ContactNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetContactNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContactNumber.Get(), o.ContactNumber.IsSet() +} + +// HasContactNumber returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasContactNumber() bool { + if o != nil && o.ContactNumber.IsSet() { + return true + } + + return false +} + +// SetContactNumber gets a reference to the given NullableString and assigns it to the ContactNumber field. +func (o *AgentVersionCreateRequest) SetContactNumber(v string) { + o.ContactNumber.Set(&v) +} + +// SetContactNumberNil sets the value for ContactNumber to be an explicit nil +func (o *AgentVersionCreateRequest) SetContactNumberNil() { + o.ContactNumber.Set(nil) +} + +// UnsetContactNumber ensures that no value is present for ContactNumber, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetContactNumber() { + o.ContactNumber.Unset() +} + +// GetInbound returns the Inbound field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetInbound() bool { + if o == nil || IsNil(o.Inbound) { + var ret bool + return ret + } + return *o.Inbound +} + +// GetInboundOk returns a tuple with the Inbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetInboundOk() (*bool, bool) { + if o == nil || IsNil(o.Inbound) { + return nil, false + } + return o.Inbound, true +} + +// HasInbound returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasInbound() bool { + if o != nil && !IsNil(o.Inbound) { + return true + } + + return false +} + +// SetInbound gets a reference to the given bool and assigns it to the Inbound field. +func (o *AgentVersionCreateRequest) SetInbound(v bool) { + o.Inbound = &v +} + +// GetKnowledgeBase returns the KnowledgeBase field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetKnowledgeBase() string { + if o == nil || IsNil(o.KnowledgeBase.Get()) { + var ret string + return ret + } + return *o.KnowledgeBase.Get() +} + +// GetKnowledgeBaseOk returns a tuple with the KnowledgeBase field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetKnowledgeBaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KnowledgeBase.Get(), o.KnowledgeBase.IsSet() +} + +// HasKnowledgeBase returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasKnowledgeBase() bool { + if o != nil && o.KnowledgeBase.IsSet() { + return true + } + + return false +} + +// SetKnowledgeBase gets a reference to the given NullableString and assigns it to the KnowledgeBase field. +func (o *AgentVersionCreateRequest) SetKnowledgeBase(v string) { + o.KnowledgeBase.Set(&v) +} + +// SetKnowledgeBaseNil sets the value for KnowledgeBase to be an explicit nil +func (o *AgentVersionCreateRequest) SetKnowledgeBaseNil() { + o.KnowledgeBase.Set(nil) +} + +// UnsetKnowledgeBase ensures that no value is present for KnowledgeBase, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetKnowledgeBase() { + o.KnowledgeBase.Unset() +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionCreateRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionCreateRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *AgentVersionCreateRequest) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *AgentVersionCreateRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *AgentVersionCreateRequest) UnsetModel() { + o.Model.Unset() +} + +// GetModelDetails returns the ModelDetails field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetModelDetails() map[string]interface{} { + if o == nil || IsNil(o.ModelDetails) { + var ret map[string]interface{} + return ret + } + return o.ModelDetails +} + +// GetModelDetailsOk returns a tuple with the ModelDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetModelDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ModelDetails) { + return map[string]interface{}{}, false + } + return o.ModelDetails, true +} + +// HasModelDetails returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasModelDetails() bool { + if o != nil && !IsNil(o.ModelDetails) { + return true + } + + return false +} + +// SetModelDetails gets a reference to the given map[string]interface{} and assigns it to the ModelDetails field. +func (o *AgentVersionCreateRequest) SetModelDetails(v map[string]interface{}) { + o.ModelDetails = v +} + +// GetLivekitUrl returns the LivekitUrl field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetLivekitUrl() string { + if o == nil || IsNil(o.LivekitUrl) { + var ret string + return ret + } + return *o.LivekitUrl +} + +// GetLivekitUrlOk returns a tuple with the LivekitUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetLivekitUrlOk() (*string, bool) { + if o == nil || IsNil(o.LivekitUrl) { + return nil, false + } + return o.LivekitUrl, true +} + +// HasLivekitUrl returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLivekitUrl() bool { + if o != nil && !IsNil(o.LivekitUrl) { + return true + } + + return false +} + +// SetLivekitUrl gets a reference to the given string and assigns it to the LivekitUrl field. +func (o *AgentVersionCreateRequest) SetLivekitUrl(v string) { + o.LivekitUrl = &v +} + +// GetLivekitApiKey returns the LivekitApiKey field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetLivekitApiKey() string { + if o == nil || IsNil(o.LivekitApiKey) { + var ret string + return ret + } + return *o.LivekitApiKey +} + +// GetLivekitApiKeyOk returns a tuple with the LivekitApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetLivekitApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.LivekitApiKey) { + return nil, false + } + return o.LivekitApiKey, true +} + +// HasLivekitApiKey returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLivekitApiKey() bool { + if o != nil && !IsNil(o.LivekitApiKey) { + return true + } + + return false +} + +// SetLivekitApiKey gets a reference to the given string and assigns it to the LivekitApiKey field. +func (o *AgentVersionCreateRequest) SetLivekitApiKey(v string) { + o.LivekitApiKey = &v +} + +// GetLivekitApiSecret returns the LivekitApiSecret field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetLivekitApiSecret() string { + if o == nil || IsNil(o.LivekitApiSecret) { + var ret string + return ret + } + return *o.LivekitApiSecret +} + +// GetLivekitApiSecretOk returns a tuple with the LivekitApiSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetLivekitApiSecretOk() (*string, bool) { + if o == nil || IsNil(o.LivekitApiSecret) { + return nil, false + } + return o.LivekitApiSecret, true +} + +// HasLivekitApiSecret returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLivekitApiSecret() bool { + if o != nil && !IsNil(o.LivekitApiSecret) { + return true + } + + return false +} + +// SetLivekitApiSecret gets a reference to the given string and assigns it to the LivekitApiSecret field. +func (o *AgentVersionCreateRequest) SetLivekitApiSecret(v string) { + o.LivekitApiSecret = &v +} + +// GetLivekitAgentName returns the LivekitAgentName field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetLivekitAgentName() string { + if o == nil || IsNil(o.LivekitAgentName) { + var ret string + return ret + } + return *o.LivekitAgentName +} + +// GetLivekitAgentNameOk returns a tuple with the LivekitAgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetLivekitAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.LivekitAgentName) { + return nil, false + } + return o.LivekitAgentName, true +} + +// HasLivekitAgentName returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLivekitAgentName() bool { + if o != nil && !IsNil(o.LivekitAgentName) { + return true + } + + return false +} + +// SetLivekitAgentName gets a reference to the given string and assigns it to the LivekitAgentName field. +func (o *AgentVersionCreateRequest) SetLivekitAgentName(v string) { + o.LivekitAgentName = &v +} + +// GetLivekitConfigJson returns the LivekitConfigJson field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetLivekitConfigJson() map[string]interface{} { + if o == nil || IsNil(o.LivekitConfigJson) { + var ret map[string]interface{} + return ret + } + return o.LivekitConfigJson +} + +// GetLivekitConfigJsonOk returns a tuple with the LivekitConfigJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetLivekitConfigJsonOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.LivekitConfigJson) { + return map[string]interface{}{}, false + } + return o.LivekitConfigJson, true +} + +// HasLivekitConfigJson returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLivekitConfigJson() bool { + if o != nil && !IsNil(o.LivekitConfigJson) { + return true + } + + return false +} + +// SetLivekitConfigJson gets a reference to the given map[string]interface{} and assigns it to the LivekitConfigJson field. +func (o *AgentVersionCreateRequest) SetLivekitConfigJson(v map[string]interface{}) { + o.LivekitConfigJson = v +} + +// GetLivekitMaxConcurrency returns the LivekitMaxConcurrency field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetLivekitMaxConcurrency() int32 { + if o == nil || IsNil(o.LivekitMaxConcurrency) { + var ret int32 + return ret + } + return *o.LivekitMaxConcurrency +} + +// GetLivekitMaxConcurrencyOk returns a tuple with the LivekitMaxConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetLivekitMaxConcurrencyOk() (*int32, bool) { + if o == nil || IsNil(o.LivekitMaxConcurrency) { + return nil, false + } + return o.LivekitMaxConcurrency, true +} + +// HasLivekitMaxConcurrency returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasLivekitMaxConcurrency() bool { + if o != nil && !IsNil(o.LivekitMaxConcurrency) { + return true + } + + return false +} + +// SetLivekitMaxConcurrency gets a reference to the given int32 and assigns it to the LivekitMaxConcurrency field. +func (o *AgentVersionCreateRequest) SetLivekitMaxConcurrency(v int32) { + o.LivekitMaxConcurrency = &v +} + +// GetCommitMessage returns the CommitMessage field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetCommitMessage() string { + if o == nil || IsNil(o.CommitMessage) { + var ret string + return ret + } + return *o.CommitMessage +} + +// GetCommitMessageOk returns a tuple with the CommitMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetCommitMessageOk() (*string, bool) { + if o == nil || IsNil(o.CommitMessage) { + return nil, false + } + return o.CommitMessage, true +} + +// HasCommitMessage returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasCommitMessage() bool { + if o != nil && !IsNil(o.CommitMessage) { + return true + } + + return false +} + +// SetCommitMessage gets a reference to the given string and assigns it to the CommitMessage field. +func (o *AgentVersionCreateRequest) SetCommitMessage(v string) { + o.CommitMessage = &v +} + +// GetObservabilityEnabled returns the ObservabilityEnabled field value if set, zero value otherwise. +func (o *AgentVersionCreateRequest) GetObservabilityEnabled() bool { + if o == nil || IsNil(o.ObservabilityEnabled) { + var ret bool + return ret + } + return *o.ObservabilityEnabled +} + +// GetObservabilityEnabledOk returns a tuple with the ObservabilityEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateRequest) GetObservabilityEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.ObservabilityEnabled) { + return nil, false + } + return o.ObservabilityEnabled, true +} + +// HasObservabilityEnabled returns a boolean if a field has been set. +func (o *AgentVersionCreateRequest) HasObservabilityEnabled() bool { + if o != nil && !IsNil(o.ObservabilityEnabled) { + return true + } + + return false +} + +// SetObservabilityEnabled gets a reference to the given bool and assigns it to the ObservabilityEnabled field. +func (o *AgentVersionCreateRequest) SetObservabilityEnabled(v bool) { + o.ObservabilityEnabled = &v +} + +func (o AgentVersionCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentVersionCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AgentName) { + toSerialize["agent_name"] = o.AgentName + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.Provider.IsSet() { + toSerialize["provider"] = o.Provider.Get() + } + if o.ApiKey.IsSet() { + toSerialize["api_key"] = o.ApiKey.Get() + } + if o.AssistantId.IsSet() { + toSerialize["assistant_id"] = o.AssistantId.Get() + } + if o.AuthenticationMethod.IsSet() { + toSerialize["authentication_method"] = o.AuthenticationMethod.Get() + } + if o.Language.IsSet() { + toSerialize["language"] = o.Language.Get() + } + if o.Languages != nil { + toSerialize["languages"] = o.Languages + } + if o.ContactNumber.IsSet() { + toSerialize["contact_number"] = o.ContactNumber.Get() + } + if !IsNil(o.Inbound) { + toSerialize["inbound"] = o.Inbound + } + if o.KnowledgeBase.IsSet() { + toSerialize["knowledge_base"] = o.KnowledgeBase.Get() + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.ModelDetails) { + toSerialize["model_details"] = o.ModelDetails + } + if !IsNil(o.LivekitUrl) { + toSerialize["livekit_url"] = o.LivekitUrl + } + if !IsNil(o.LivekitApiKey) { + toSerialize["livekit_api_key"] = o.LivekitApiKey + } + if !IsNil(o.LivekitApiSecret) { + toSerialize["livekit_api_secret"] = o.LivekitApiSecret + } + if !IsNil(o.LivekitAgentName) { + toSerialize["livekit_agent_name"] = o.LivekitAgentName + } + if !IsNil(o.LivekitConfigJson) { + toSerialize["livekit_config_json"] = o.LivekitConfigJson + } + if !IsNil(o.LivekitMaxConcurrency) { + toSerialize["livekit_max_concurrency"] = o.LivekitMaxConcurrency + } + if !IsNil(o.CommitMessage) { + toSerialize["commit_message"] = o.CommitMessage + } + if !IsNil(o.ObservabilityEnabled) { + toSerialize["observability_enabled"] = o.ObservabilityEnabled + } + return toSerialize, nil +} + +type NullableAgentVersionCreateRequest struct { + value *AgentVersionCreateRequest + isSet bool +} + +func (v NullableAgentVersionCreateRequest) Get() *AgentVersionCreateRequest { + return v.value +} + +func (v *NullableAgentVersionCreateRequest) Set(val *AgentVersionCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAgentVersionCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentVersionCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentVersionCreateRequest(val *AgentVersionCreateRequest) *NullableAgentVersionCreateRequest { + return &NullableAgentVersionCreateRequest{value: val, isSet: true} +} + +func (v NullableAgentVersionCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentVersionCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_version_create_response.go b/go/futureagi/model_agent_version_create_response.go new file mode 100644 index 0000000..cbb5fb1 --- /dev/null +++ b/go/futureagi/model_agent_version_create_response.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentVersionCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentVersionCreateResponse{} + +// AgentVersionCreateResponse struct for AgentVersionCreateResponse +type AgentVersionCreateResponse struct { + Message *string `json:"message,omitempty"` + Version *AgentVersionResponse `json:"version,omitempty"` +} + +// NewAgentVersionCreateResponse instantiates a new AgentVersionCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentVersionCreateResponse() *AgentVersionCreateResponse { + this := AgentVersionCreateResponse{} + return &this +} + +// NewAgentVersionCreateResponseWithDefaults instantiates a new AgentVersionCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentVersionCreateResponseWithDefaults() *AgentVersionCreateResponse { + this := AgentVersionCreateResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentVersionCreateResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentVersionCreateResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentVersionCreateResponse) SetMessage(v string) { + o.Message = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *AgentVersionCreateResponse) GetVersion() AgentVersionResponse { + if o == nil || IsNil(o.Version) { + var ret AgentVersionResponse + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionCreateResponse) GetVersionOk() (*AgentVersionResponse, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *AgentVersionCreateResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given AgentVersionResponse and assigns it to the Version field. +func (o *AgentVersionCreateResponse) SetVersion(v AgentVersionResponse) { + o.Version = &v +} + +func (o AgentVersionCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentVersionCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableAgentVersionCreateResponse struct { + value *AgentVersionCreateResponse + isSet bool +} + +func (v NullableAgentVersionCreateResponse) Get() *AgentVersionCreateResponse { + return v.value +} + +func (v *NullableAgentVersionCreateResponse) Set(val *AgentVersionCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentVersionCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentVersionCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentVersionCreateResponse(val *AgentVersionCreateResponse) *NullableAgentVersionCreateResponse { + return &NullableAgentVersionCreateResponse{value: val, isSet: true} +} + +func (v NullableAgentVersionCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentVersionCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_version_delete_response.go b/go/futureagi/model_agent_version_delete_response.go new file mode 100644 index 0000000..8d6901c --- /dev/null +++ b/go/futureagi/model_agent_version_delete_response.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentVersionDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentVersionDeleteResponse{} + +// AgentVersionDeleteResponse struct for AgentVersionDeleteResponse +type AgentVersionDeleteResponse struct { + Message *string `json:"message,omitempty"` +} + +// NewAgentVersionDeleteResponse instantiates a new AgentVersionDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentVersionDeleteResponse() *AgentVersionDeleteResponse { + this := AgentVersionDeleteResponse{} + return &this +} + +// NewAgentVersionDeleteResponseWithDefaults instantiates a new AgentVersionDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentVersionDeleteResponseWithDefaults() *AgentVersionDeleteResponse { + this := AgentVersionDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentVersionDeleteResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentVersionDeleteResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentVersionDeleteResponse) SetMessage(v string) { + o.Message = &v +} + +func (o AgentVersionDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentVersionDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableAgentVersionDeleteResponse struct { + value *AgentVersionDeleteResponse + isSet bool +} + +func (v NullableAgentVersionDeleteResponse) Get() *AgentVersionDeleteResponse { + return v.value +} + +func (v *NullableAgentVersionDeleteResponse) Set(val *AgentVersionDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentVersionDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentVersionDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentVersionDeleteResponse(val *AgentVersionDeleteResponse) *NullableAgentVersionDeleteResponse { + return &NullableAgentVersionDeleteResponse{value: val, isSet: true} +} + +func (v NullableAgentVersionDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentVersionDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_version_list_response.go b/go/futureagi/model_agent_version_list_response.go new file mode 100644 index 0000000..07c92c8 --- /dev/null +++ b/go/futureagi/model_agent_version_list_response.go @@ -0,0 +1,646 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the AgentVersionListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentVersionListResponse{} + +// AgentVersionListResponse struct for AgentVersionListResponse +type AgentVersionListResponse struct { + Id *string `json:"id,omitempty"` + // Version number of the agent + VersionNumber *int32 `json:"version_number,omitempty"` + // Human-readable version name (e.g., 'v1.2.3') + VersionName NullableString `json:"version_name,omitempty"` + VersionNameDisplay *string `json:"version_name_display,omitempty"` + // Current status of this version + Status *string `json:"status,omitempty"` + StatusDisplay *string `json:"status_display,omitempty"` + // Performance score (0.0 to 10.0) + Score NullableFloat64 `json:"score,omitempty"` + // Number of tests run for this version + TestCount *int32 `json:"test_count,omitempty"` + // Test pass rate percentage + PassRate NullableFloat64 `json:"pass_rate,omitempty"` + // Description of changes in this version + Description *string `json:"description,omitempty"` + // Commit message for the agent version + CommitMessage NullableString `json:"commit_message,omitempty"` + IsActive *string `json:"is_active,omitempty"` + IsLatest *string `json:"is_latest,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +// NewAgentVersionListResponse instantiates a new AgentVersionListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentVersionListResponse() *AgentVersionListResponse { + this := AgentVersionListResponse{} + return &this +} + +// NewAgentVersionListResponseWithDefaults instantiates a new AgentVersionListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentVersionListResponseWithDefaults() *AgentVersionListResponse { + this := AgentVersionListResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AgentVersionListResponse) SetId(v string) { + o.Id = &v +} + +// GetVersionNumber returns the VersionNumber field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetVersionNumber() int32 { + if o == nil || IsNil(o.VersionNumber) { + var ret int32 + return ret + } + return *o.VersionNumber +} + +// GetVersionNumberOk returns a tuple with the VersionNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetVersionNumberOk() (*int32, bool) { + if o == nil || IsNil(o.VersionNumber) { + return nil, false + } + return o.VersionNumber, true +} + +// HasVersionNumber returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasVersionNumber() bool { + if o != nil && !IsNil(o.VersionNumber) { + return true + } + + return false +} + +// SetVersionNumber gets a reference to the given int32 and assigns it to the VersionNumber field. +func (o *AgentVersionListResponse) SetVersionNumber(v int32) { + o.VersionNumber = &v +} + +// GetVersionName returns the VersionName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionListResponse) GetVersionName() string { + if o == nil || IsNil(o.VersionName.Get()) { + var ret string + return ret + } + return *o.VersionName.Get() +} + +// GetVersionNameOk returns a tuple with the VersionName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionListResponse) GetVersionNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.VersionName.Get(), o.VersionName.IsSet() +} + +// HasVersionName returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasVersionName() bool { + if o != nil && o.VersionName.IsSet() { + return true + } + + return false +} + +// SetVersionName gets a reference to the given NullableString and assigns it to the VersionName field. +func (o *AgentVersionListResponse) SetVersionName(v string) { + o.VersionName.Set(&v) +} + +// SetVersionNameNil sets the value for VersionName to be an explicit nil +func (o *AgentVersionListResponse) SetVersionNameNil() { + o.VersionName.Set(nil) +} + +// UnsetVersionName ensures that no value is present for VersionName, not even an explicit nil +func (o *AgentVersionListResponse) UnsetVersionName() { + o.VersionName.Unset() +} + +// GetVersionNameDisplay returns the VersionNameDisplay field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetVersionNameDisplay() string { + if o == nil || IsNil(o.VersionNameDisplay) { + var ret string + return ret + } + return *o.VersionNameDisplay +} + +// GetVersionNameDisplayOk returns a tuple with the VersionNameDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetVersionNameDisplayOk() (*string, bool) { + if o == nil || IsNil(o.VersionNameDisplay) { + return nil, false + } + return o.VersionNameDisplay, true +} + +// HasVersionNameDisplay returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasVersionNameDisplay() bool { + if o != nil && !IsNil(o.VersionNameDisplay) { + return true + } + + return false +} + +// SetVersionNameDisplay gets a reference to the given string and assigns it to the VersionNameDisplay field. +func (o *AgentVersionListResponse) SetVersionNameDisplay(v string) { + o.VersionNameDisplay = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *AgentVersionListResponse) SetStatus(v string) { + o.Status = &v +} + +// GetStatusDisplay returns the StatusDisplay field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetStatusDisplay() string { + if o == nil || IsNil(o.StatusDisplay) { + var ret string + return ret + } + return *o.StatusDisplay +} + +// GetStatusDisplayOk returns a tuple with the StatusDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetStatusDisplayOk() (*string, bool) { + if o == nil || IsNil(o.StatusDisplay) { + return nil, false + } + return o.StatusDisplay, true +} + +// HasStatusDisplay returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasStatusDisplay() bool { + if o != nil && !IsNil(o.StatusDisplay) { + return true + } + + return false +} + +// SetStatusDisplay gets a reference to the given string and assigns it to the StatusDisplay field. +func (o *AgentVersionListResponse) SetStatusDisplay(v string) { + o.StatusDisplay = &v +} + +// GetScore returns the Score field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionListResponse) GetScore() float64 { + if o == nil || IsNil(o.Score.Get()) { + var ret float64 + return ret + } + return *o.Score.Get() +} + +// GetScoreOk returns a tuple with the Score field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionListResponse) GetScoreOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.Score.Get(), o.Score.IsSet() +} + +// HasScore returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasScore() bool { + if o != nil && o.Score.IsSet() { + return true + } + + return false +} + +// SetScore gets a reference to the given NullableFloat64 and assigns it to the Score field. +func (o *AgentVersionListResponse) SetScore(v float64) { + o.Score.Set(&v) +} + +// SetScoreNil sets the value for Score to be an explicit nil +func (o *AgentVersionListResponse) SetScoreNil() { + o.Score.Set(nil) +} + +// UnsetScore ensures that no value is present for Score, not even an explicit nil +func (o *AgentVersionListResponse) UnsetScore() { + o.Score.Unset() +} + +// GetTestCount returns the TestCount field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetTestCount() int32 { + if o == nil || IsNil(o.TestCount) { + var ret int32 + return ret + } + return *o.TestCount +} + +// GetTestCountOk returns a tuple with the TestCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetTestCountOk() (*int32, bool) { + if o == nil || IsNil(o.TestCount) { + return nil, false + } + return o.TestCount, true +} + +// HasTestCount returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasTestCount() bool { + if o != nil && !IsNil(o.TestCount) { + return true + } + + return false +} + +// SetTestCount gets a reference to the given int32 and assigns it to the TestCount field. +func (o *AgentVersionListResponse) SetTestCount(v int32) { + o.TestCount = &v +} + +// GetPassRate returns the PassRate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionListResponse) GetPassRate() float64 { + if o == nil || IsNil(o.PassRate.Get()) { + var ret float64 + return ret + } + return *o.PassRate.Get() +} + +// GetPassRateOk returns a tuple with the PassRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionListResponse) GetPassRateOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.PassRate.Get(), o.PassRate.IsSet() +} + +// HasPassRate returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasPassRate() bool { + if o != nil && o.PassRate.IsSet() { + return true + } + + return false +} + +// SetPassRate gets a reference to the given NullableFloat64 and assigns it to the PassRate field. +func (o *AgentVersionListResponse) SetPassRate(v float64) { + o.PassRate.Set(&v) +} + +// SetPassRateNil sets the value for PassRate to be an explicit nil +func (o *AgentVersionListResponse) SetPassRateNil() { + o.PassRate.Set(nil) +} + +// UnsetPassRate ensures that no value is present for PassRate, not even an explicit nil +func (o *AgentVersionListResponse) UnsetPassRate() { + o.PassRate.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AgentVersionListResponse) SetDescription(v string) { + o.Description = &v +} + +// GetCommitMessage returns the CommitMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionListResponse) GetCommitMessage() string { + if o == nil || IsNil(o.CommitMessage.Get()) { + var ret string + return ret + } + return *o.CommitMessage.Get() +} + +// GetCommitMessageOk returns a tuple with the CommitMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionListResponse) GetCommitMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CommitMessage.Get(), o.CommitMessage.IsSet() +} + +// HasCommitMessage returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasCommitMessage() bool { + if o != nil && o.CommitMessage.IsSet() { + return true + } + + return false +} + +// SetCommitMessage gets a reference to the given NullableString and assigns it to the CommitMessage field. +func (o *AgentVersionListResponse) SetCommitMessage(v string) { + o.CommitMessage.Set(&v) +} + +// SetCommitMessageNil sets the value for CommitMessage to be an explicit nil +func (o *AgentVersionListResponse) SetCommitMessageNil() { + o.CommitMessage.Set(nil) +} + +// UnsetCommitMessage ensures that no value is present for CommitMessage, not even an explicit nil +func (o *AgentVersionListResponse) UnsetCommitMessage() { + o.CommitMessage.Unset() +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetIsActive() string { + if o == nil || IsNil(o.IsActive) { + var ret string + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetIsActiveOk() (*string, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given string and assigns it to the IsActive field. +func (o *AgentVersionListResponse) SetIsActive(v string) { + o.IsActive = &v +} + +// GetIsLatest returns the IsLatest field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetIsLatest() string { + if o == nil || IsNil(o.IsLatest) { + var ret string + return ret + } + return *o.IsLatest +} + +// GetIsLatestOk returns a tuple with the IsLatest field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetIsLatestOk() (*string, bool) { + if o == nil || IsNil(o.IsLatest) { + return nil, false + } + return o.IsLatest, true +} + +// HasIsLatest returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasIsLatest() bool { + if o != nil && !IsNil(o.IsLatest) { + return true + } + + return false +} + +// SetIsLatest gets a reference to the given string and assigns it to the IsLatest field. +func (o *AgentVersionListResponse) SetIsLatest(v string) { + o.IsLatest = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AgentVersionListResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionListResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AgentVersionListResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AgentVersionListResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o AgentVersionListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentVersionListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.VersionNumber) { + toSerialize["version_number"] = o.VersionNumber + } + if o.VersionName.IsSet() { + toSerialize["version_name"] = o.VersionName.Get() + } + if !IsNil(o.VersionNameDisplay) { + toSerialize["version_name_display"] = o.VersionNameDisplay + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusDisplay) { + toSerialize["status_display"] = o.StatusDisplay + } + if o.Score.IsSet() { + toSerialize["score"] = o.Score.Get() + } + if !IsNil(o.TestCount) { + toSerialize["test_count"] = o.TestCount + } + if o.PassRate.IsSet() { + toSerialize["pass_rate"] = o.PassRate.Get() + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.CommitMessage.IsSet() { + toSerialize["commit_message"] = o.CommitMessage.Get() + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + if !IsNil(o.IsLatest) { + toSerialize["is_latest"] = o.IsLatest + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +type NullableAgentVersionListResponse struct { + value *AgentVersionListResponse + isSet bool +} + +func (v NullableAgentVersionListResponse) Get() *AgentVersionListResponse { + return v.value +} + +func (v *NullableAgentVersionListResponse) Set(val *AgentVersionListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentVersionListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentVersionListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentVersionListResponse(val *AgentVersionListResponse) *NullableAgentVersionListResponse { + return &NullableAgentVersionListResponse{value: val, isSet: true} +} + +func (v NullableAgentVersionListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentVersionListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_version_response.go b/go/futureagi/model_agent_version_response.go new file mode 100644 index 0000000..5b708bb --- /dev/null +++ b/go/futureagi/model_agent_version_response.go @@ -0,0 +1,841 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the AgentVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentVersionResponse{} + +// AgentVersionResponse struct for AgentVersionResponse +type AgentVersionResponse struct { + Id *string `json:"id,omitempty"` + // Version number of the agent + VersionNumber *int32 `json:"version_number,omitempty"` + // Human-readable version name (e.g., 'v1.2.3') + VersionName NullableString `json:"version_name,omitempty"` + VersionNameDisplay *string `json:"version_name_display,omitempty"` + // Current status of this version + Status *string `json:"status,omitempty"` + StatusDisplay *string `json:"status_display,omitempty"` + // Performance score (0.0 to 10.0) + Score NullableFloat64 `json:"score,omitempty"` + // Number of tests run for this version + TestCount *int32 `json:"test_count,omitempty"` + // Test pass rate percentage + PassRate NullableFloat64 `json:"pass_rate,omitempty"` + // Description of changes in this version + Description *string `json:"description,omitempty"` + // Commit message for the agent version + CommitMessage NullableString `json:"commit_message,omitempty"` + // Detailed release notes for this version + ReleaseNotes NullableString `json:"release_notes,omitempty"` + // Parent agent definition + AgentDefinition *string `json:"agent_definition,omitempty"` + // Organization this version belongs to + Organization *string `json:"organization,omitempty"` + // Snapshot of agent configuration at this version + ConfigurationSnapshot map[string]interface{} `json:"configuration_snapshot,omitempty"` + IsActive *string `json:"is_active,omitempty"` + IsLatest *string `json:"is_latest,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewAgentVersionResponse instantiates a new AgentVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentVersionResponse() *AgentVersionResponse { + this := AgentVersionResponse{} + return &this +} + +// NewAgentVersionResponseWithDefaults instantiates a new AgentVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentVersionResponseWithDefaults() *AgentVersionResponse { + this := AgentVersionResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AgentVersionResponse) SetId(v string) { + o.Id = &v +} + +// GetVersionNumber returns the VersionNumber field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetVersionNumber() int32 { + if o == nil || IsNil(o.VersionNumber) { + var ret int32 + return ret + } + return *o.VersionNumber +} + +// GetVersionNumberOk returns a tuple with the VersionNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetVersionNumberOk() (*int32, bool) { + if o == nil || IsNil(o.VersionNumber) { + return nil, false + } + return o.VersionNumber, true +} + +// HasVersionNumber returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasVersionNumber() bool { + if o != nil && !IsNil(o.VersionNumber) { + return true + } + + return false +} + +// SetVersionNumber gets a reference to the given int32 and assigns it to the VersionNumber field. +func (o *AgentVersionResponse) SetVersionNumber(v int32) { + o.VersionNumber = &v +} + +// GetVersionName returns the VersionName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionResponse) GetVersionName() string { + if o == nil || IsNil(o.VersionName.Get()) { + var ret string + return ret + } + return *o.VersionName.Get() +} + +// GetVersionNameOk returns a tuple with the VersionName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionResponse) GetVersionNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.VersionName.Get(), o.VersionName.IsSet() +} + +// HasVersionName returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasVersionName() bool { + if o != nil && o.VersionName.IsSet() { + return true + } + + return false +} + +// SetVersionName gets a reference to the given NullableString and assigns it to the VersionName field. +func (o *AgentVersionResponse) SetVersionName(v string) { + o.VersionName.Set(&v) +} + +// SetVersionNameNil sets the value for VersionName to be an explicit nil +func (o *AgentVersionResponse) SetVersionNameNil() { + o.VersionName.Set(nil) +} + +// UnsetVersionName ensures that no value is present for VersionName, not even an explicit nil +func (o *AgentVersionResponse) UnsetVersionName() { + o.VersionName.Unset() +} + +// GetVersionNameDisplay returns the VersionNameDisplay field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetVersionNameDisplay() string { + if o == nil || IsNil(o.VersionNameDisplay) { + var ret string + return ret + } + return *o.VersionNameDisplay +} + +// GetVersionNameDisplayOk returns a tuple with the VersionNameDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetVersionNameDisplayOk() (*string, bool) { + if o == nil || IsNil(o.VersionNameDisplay) { + return nil, false + } + return o.VersionNameDisplay, true +} + +// HasVersionNameDisplay returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasVersionNameDisplay() bool { + if o != nil && !IsNil(o.VersionNameDisplay) { + return true + } + + return false +} + +// SetVersionNameDisplay gets a reference to the given string and assigns it to the VersionNameDisplay field. +func (o *AgentVersionResponse) SetVersionNameDisplay(v string) { + o.VersionNameDisplay = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *AgentVersionResponse) SetStatus(v string) { + o.Status = &v +} + +// GetStatusDisplay returns the StatusDisplay field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetStatusDisplay() string { + if o == nil || IsNil(o.StatusDisplay) { + var ret string + return ret + } + return *o.StatusDisplay +} + +// GetStatusDisplayOk returns a tuple with the StatusDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetStatusDisplayOk() (*string, bool) { + if o == nil || IsNil(o.StatusDisplay) { + return nil, false + } + return o.StatusDisplay, true +} + +// HasStatusDisplay returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasStatusDisplay() bool { + if o != nil && !IsNil(o.StatusDisplay) { + return true + } + + return false +} + +// SetStatusDisplay gets a reference to the given string and assigns it to the StatusDisplay field. +func (o *AgentVersionResponse) SetStatusDisplay(v string) { + o.StatusDisplay = &v +} + +// GetScore returns the Score field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionResponse) GetScore() float64 { + if o == nil || IsNil(o.Score.Get()) { + var ret float64 + return ret + } + return *o.Score.Get() +} + +// GetScoreOk returns a tuple with the Score field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionResponse) GetScoreOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.Score.Get(), o.Score.IsSet() +} + +// HasScore returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasScore() bool { + if o != nil && o.Score.IsSet() { + return true + } + + return false +} + +// SetScore gets a reference to the given NullableFloat64 and assigns it to the Score field. +func (o *AgentVersionResponse) SetScore(v float64) { + o.Score.Set(&v) +} + +// SetScoreNil sets the value for Score to be an explicit nil +func (o *AgentVersionResponse) SetScoreNil() { + o.Score.Set(nil) +} + +// UnsetScore ensures that no value is present for Score, not even an explicit nil +func (o *AgentVersionResponse) UnsetScore() { + o.Score.Unset() +} + +// GetTestCount returns the TestCount field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetTestCount() int32 { + if o == nil || IsNil(o.TestCount) { + var ret int32 + return ret + } + return *o.TestCount +} + +// GetTestCountOk returns a tuple with the TestCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetTestCountOk() (*int32, bool) { + if o == nil || IsNil(o.TestCount) { + return nil, false + } + return o.TestCount, true +} + +// HasTestCount returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasTestCount() bool { + if o != nil && !IsNil(o.TestCount) { + return true + } + + return false +} + +// SetTestCount gets a reference to the given int32 and assigns it to the TestCount field. +func (o *AgentVersionResponse) SetTestCount(v int32) { + o.TestCount = &v +} + +// GetPassRate returns the PassRate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionResponse) GetPassRate() float64 { + if o == nil || IsNil(o.PassRate.Get()) { + var ret float64 + return ret + } + return *o.PassRate.Get() +} + +// GetPassRateOk returns a tuple with the PassRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionResponse) GetPassRateOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.PassRate.Get(), o.PassRate.IsSet() +} + +// HasPassRate returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasPassRate() bool { + if o != nil && o.PassRate.IsSet() { + return true + } + + return false +} + +// SetPassRate gets a reference to the given NullableFloat64 and assigns it to the PassRate field. +func (o *AgentVersionResponse) SetPassRate(v float64) { + o.PassRate.Set(&v) +} + +// SetPassRateNil sets the value for PassRate to be an explicit nil +func (o *AgentVersionResponse) SetPassRateNil() { + o.PassRate.Set(nil) +} + +// UnsetPassRate ensures that no value is present for PassRate, not even an explicit nil +func (o *AgentVersionResponse) UnsetPassRate() { + o.PassRate.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AgentVersionResponse) SetDescription(v string) { + o.Description = &v +} + +// GetCommitMessage returns the CommitMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionResponse) GetCommitMessage() string { + if o == nil || IsNil(o.CommitMessage.Get()) { + var ret string + return ret + } + return *o.CommitMessage.Get() +} + +// GetCommitMessageOk returns a tuple with the CommitMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionResponse) GetCommitMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CommitMessage.Get(), o.CommitMessage.IsSet() +} + +// HasCommitMessage returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasCommitMessage() bool { + if o != nil && o.CommitMessage.IsSet() { + return true + } + + return false +} + +// SetCommitMessage gets a reference to the given NullableString and assigns it to the CommitMessage field. +func (o *AgentVersionResponse) SetCommitMessage(v string) { + o.CommitMessage.Set(&v) +} + +// SetCommitMessageNil sets the value for CommitMessage to be an explicit nil +func (o *AgentVersionResponse) SetCommitMessageNil() { + o.CommitMessage.Set(nil) +} + +// UnsetCommitMessage ensures that no value is present for CommitMessage, not even an explicit nil +func (o *AgentVersionResponse) UnsetCommitMessage() { + o.CommitMessage.Unset() +} + +// GetReleaseNotes returns the ReleaseNotes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AgentVersionResponse) GetReleaseNotes() string { + if o == nil || IsNil(o.ReleaseNotes.Get()) { + var ret string + return ret + } + return *o.ReleaseNotes.Get() +} + +// GetReleaseNotesOk returns a tuple with the ReleaseNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentVersionResponse) GetReleaseNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReleaseNotes.Get(), o.ReleaseNotes.IsSet() +} + +// HasReleaseNotes returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasReleaseNotes() bool { + if o != nil && o.ReleaseNotes.IsSet() { + return true + } + + return false +} + +// SetReleaseNotes gets a reference to the given NullableString and assigns it to the ReleaseNotes field. +func (o *AgentVersionResponse) SetReleaseNotes(v string) { + o.ReleaseNotes.Set(&v) +} + +// SetReleaseNotesNil sets the value for ReleaseNotes to be an explicit nil +func (o *AgentVersionResponse) SetReleaseNotesNil() { + o.ReleaseNotes.Set(nil) +} + +// UnsetReleaseNotes ensures that no value is present for ReleaseNotes, not even an explicit nil +func (o *AgentVersionResponse) UnsetReleaseNotes() { + o.ReleaseNotes.Unset() +} + +// GetAgentDefinition returns the AgentDefinition field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetAgentDefinition() string { + if o == nil || IsNil(o.AgentDefinition) { + var ret string + return ret + } + return *o.AgentDefinition +} + +// GetAgentDefinitionOk returns a tuple with the AgentDefinition field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetAgentDefinitionOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinition) { + return nil, false + } + return o.AgentDefinition, true +} + +// HasAgentDefinition returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasAgentDefinition() bool { + if o != nil && !IsNil(o.AgentDefinition) { + return true + } + + return false +} + +// SetAgentDefinition gets a reference to the given string and assigns it to the AgentDefinition field. +func (o *AgentVersionResponse) SetAgentDefinition(v string) { + o.AgentDefinition = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *AgentVersionResponse) SetOrganization(v string) { + o.Organization = &v +} + +// GetConfigurationSnapshot returns the ConfigurationSnapshot field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetConfigurationSnapshot() map[string]interface{} { + if o == nil || IsNil(o.ConfigurationSnapshot) { + var ret map[string]interface{} + return ret + } + return o.ConfigurationSnapshot +} + +// GetConfigurationSnapshotOk returns a tuple with the ConfigurationSnapshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetConfigurationSnapshotOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConfigurationSnapshot) { + return map[string]interface{}{}, false + } + return o.ConfigurationSnapshot, true +} + +// HasConfigurationSnapshot returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasConfigurationSnapshot() bool { + if o != nil && !IsNil(o.ConfigurationSnapshot) { + return true + } + + return false +} + +// SetConfigurationSnapshot gets a reference to the given map[string]interface{} and assigns it to the ConfigurationSnapshot field. +func (o *AgentVersionResponse) SetConfigurationSnapshot(v map[string]interface{}) { + o.ConfigurationSnapshot = v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetIsActive() string { + if o == nil || IsNil(o.IsActive) { + var ret string + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetIsActiveOk() (*string, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given string and assigns it to the IsActive field. +func (o *AgentVersionResponse) SetIsActive(v string) { + o.IsActive = &v +} + +// GetIsLatest returns the IsLatest field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetIsLatest() string { + if o == nil || IsNil(o.IsLatest) { + var ret string + return ret + } + return *o.IsLatest +} + +// GetIsLatestOk returns a tuple with the IsLatest field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetIsLatestOk() (*string, bool) { + if o == nil || IsNil(o.IsLatest) { + return nil, false + } + return o.IsLatest, true +} + +// HasIsLatest returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasIsLatest() bool { + if o != nil && !IsNil(o.IsLatest) { + return true + } + + return false +} + +// SetIsLatest gets a reference to the given string and assigns it to the IsLatest field. +func (o *AgentVersionResponse) SetIsLatest(v string) { + o.IsLatest = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AgentVersionResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AgentVersionResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AgentVersionResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AgentVersionResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o AgentVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.VersionNumber) { + toSerialize["version_number"] = o.VersionNumber + } + if o.VersionName.IsSet() { + toSerialize["version_name"] = o.VersionName.Get() + } + if !IsNil(o.VersionNameDisplay) { + toSerialize["version_name_display"] = o.VersionNameDisplay + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusDisplay) { + toSerialize["status_display"] = o.StatusDisplay + } + if o.Score.IsSet() { + toSerialize["score"] = o.Score.Get() + } + if !IsNil(o.TestCount) { + toSerialize["test_count"] = o.TestCount + } + if o.PassRate.IsSet() { + toSerialize["pass_rate"] = o.PassRate.Get() + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.CommitMessage.IsSet() { + toSerialize["commit_message"] = o.CommitMessage.Get() + } + if o.ReleaseNotes.IsSet() { + toSerialize["release_notes"] = o.ReleaseNotes.Get() + } + if !IsNil(o.AgentDefinition) { + toSerialize["agent_definition"] = o.AgentDefinition + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.ConfigurationSnapshot) { + toSerialize["configuration_snapshot"] = o.ConfigurationSnapshot + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + if !IsNil(o.IsLatest) { + toSerialize["is_latest"] = o.IsLatest + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableAgentVersionResponse struct { + value *AgentVersionResponse + isSet bool +} + +func (v NullableAgentVersionResponse) Get() *AgentVersionResponse { + return v.value +} + +func (v *NullableAgentVersionResponse) Set(val *AgentVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentVersionResponse(val *AgentVersionResponse) *NullableAgentVersionResponse { + return &NullableAgentVersionResponse{value: val, isSet: true} +} + +func (v NullableAgentVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_agent_version_restore_response.go b/go/futureagi/model_agent_version_restore_response.go new file mode 100644 index 0000000..d25bbff --- /dev/null +++ b/go/futureagi/model_agent_version_restore_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AgentVersionRestoreResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentVersionRestoreResponse{} + +// AgentVersionRestoreResponse struct for AgentVersionRestoreResponse +type AgentVersionRestoreResponse struct { + Message *string `json:"message,omitempty"` + Agent *map[string]string `json:"agent,omitempty"` + Version *AgentVersionResponse `json:"version,omitempty"` +} + +// NewAgentVersionRestoreResponse instantiates a new AgentVersionRestoreResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAgentVersionRestoreResponse() *AgentVersionRestoreResponse { + this := AgentVersionRestoreResponse{} + return &this +} + +// NewAgentVersionRestoreResponseWithDefaults instantiates a new AgentVersionRestoreResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAgentVersionRestoreResponseWithDefaults() *AgentVersionRestoreResponse { + this := AgentVersionRestoreResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AgentVersionRestoreResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionRestoreResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *AgentVersionRestoreResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AgentVersionRestoreResponse) SetMessage(v string) { + o.Message = &v +} + +// GetAgent returns the Agent field value if set, zero value otherwise. +func (o *AgentVersionRestoreResponse) GetAgent() map[string]string { + if o == nil || IsNil(o.Agent) { + var ret map[string]string + return ret + } + return *o.Agent +} + +// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionRestoreResponse) GetAgentOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Agent) { + return nil, false + } + return o.Agent, true +} + +// HasAgent returns a boolean if a field has been set. +func (o *AgentVersionRestoreResponse) HasAgent() bool { + if o != nil && !IsNil(o.Agent) { + return true + } + + return false +} + +// SetAgent gets a reference to the given map[string]string and assigns it to the Agent field. +func (o *AgentVersionRestoreResponse) SetAgent(v map[string]string) { + o.Agent = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *AgentVersionRestoreResponse) GetVersion() AgentVersionResponse { + if o == nil || IsNil(o.Version) { + var ret AgentVersionResponse + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AgentVersionRestoreResponse) GetVersionOk() (*AgentVersionResponse, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *AgentVersionRestoreResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given AgentVersionResponse and assigns it to the Version field. +func (o *AgentVersionRestoreResponse) SetVersion(v AgentVersionResponse) { + o.Version = &v +} + +func (o AgentVersionRestoreResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentVersionRestoreResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Agent) { + toSerialize["agent"] = o.Agent + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableAgentVersionRestoreResponse struct { + value *AgentVersionRestoreResponse + isSet bool +} + +func (v NullableAgentVersionRestoreResponse) Get() *AgentVersionRestoreResponse { + return v.value +} + +func (v *NullableAgentVersionRestoreResponse) Set(val *AgentVersionRestoreResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentVersionRestoreResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentVersionRestoreResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentVersionRestoreResponse(val *AgentVersionRestoreResponse) *NullableAgentVersionRestoreResponse { + return &NullableAgentVersionRestoreResponse{value: val, isSet: true} +} + +func (v NullableAgentVersionRestoreResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentVersionRestoreResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_all_active_tests.go b/go/futureagi/model_all_active_tests.go new file mode 100644 index 0000000..add5415 --- /dev/null +++ b/go/futureagi/model_all_active_tests.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AllActiveTests type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AllActiveTests{} + +// AllActiveTests struct for AllActiveTests +type AllActiveTests struct { + ActiveTests map[string]string `json:"active_tests"` + TotalActive int32 `json:"total_active"` +} + +type _AllActiveTests AllActiveTests + +// NewAllActiveTests instantiates a new AllActiveTests object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAllActiveTests(activeTests map[string]string, totalActive int32) *AllActiveTests { + this := AllActiveTests{} + this.ActiveTests = activeTests + this.TotalActive = totalActive + return &this +} + +// NewAllActiveTestsWithDefaults instantiates a new AllActiveTests object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAllActiveTestsWithDefaults() *AllActiveTests { + this := AllActiveTests{} + return &this +} + +// GetActiveTests returns the ActiveTests field value +func (o *AllActiveTests) GetActiveTests() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.ActiveTests +} + +// GetActiveTestsOk returns a tuple with the ActiveTests field value +// and a boolean to check if the value has been set. +func (o *AllActiveTests) GetActiveTestsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.ActiveTests, true +} + +// SetActiveTests sets field value +func (o *AllActiveTests) SetActiveTests(v map[string]string) { + o.ActiveTests = v +} + +// GetTotalActive returns the TotalActive field value +func (o *AllActiveTests) GetTotalActive() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalActive +} + +// GetTotalActiveOk returns a tuple with the TotalActive field value +// and a boolean to check if the value has been set. +func (o *AllActiveTests) GetTotalActiveOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalActive, true +} + +// SetTotalActive sets field value +func (o *AllActiveTests) SetTotalActive(v int32) { + o.TotalActive = v +} + +func (o AllActiveTests) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AllActiveTests) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active_tests"] = o.ActiveTests + toSerialize["total_active"] = o.TotalActive + return toSerialize, nil +} + +func (o *AllActiveTests) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active_tests", + "total_active", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAllActiveTests := _AllActiveTests{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAllActiveTests) + + if err != nil { + return err + } + + *o = AllActiveTests(varAllActiveTests) + + return err +} + +type NullableAllActiveTests struct { + value *AllActiveTests + isSet bool +} + +func (v NullableAllActiveTests) Get() *AllActiveTests { + return v.value +} + +func (v *NullableAllActiveTests) Set(val *AllActiveTests) { + v.value = val + v.isSet = true +} + +func (v NullableAllActiveTests) IsSet() bool { + return v.isSet +} + +func (v *NullableAllActiveTests) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAllActiveTests(val *AllActiveTests) *NullableAllActiveTests { + return &NullableAllActiveTests{value: val, isSet: true} +} + +func (v NullableAllActiveTests) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAllActiveTests) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_annotation_label_response.go b/go/futureagi/model_annotation_label_response.go new file mode 100644 index 0000000..f955bfa --- /dev/null +++ b/go/futureagi/model_annotation_label_response.go @@ -0,0 +1,296 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AnnotationLabelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnnotationLabelResponse{} + +// AnnotationLabelResponse struct for AnnotationLabelResponse +type AnnotationLabelResponse struct { + Id string `json:"id"` + Name string `json:"name"` + Type string `json:"type"` + Description NullableString `json:"description,omitempty"` + Settings map[string]interface{} `json:"settings,omitempty"` +} + +type _AnnotationLabelResponse AnnotationLabelResponse + +// NewAnnotationLabelResponse instantiates a new AnnotationLabelResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnnotationLabelResponse(id string, name string, type_ string) *AnnotationLabelResponse { + this := AnnotationLabelResponse{} + this.Id = id + this.Name = name + this.Type = type_ + return &this +} + +// NewAnnotationLabelResponseWithDefaults instantiates a new AnnotationLabelResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnnotationLabelResponseWithDefaults() *AnnotationLabelResponse { + this := AnnotationLabelResponse{} + return &this +} + +// GetId returns the Id field value +func (o *AnnotationLabelResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *AnnotationLabelResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AnnotationLabelResponse) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *AnnotationLabelResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnnotationLabelResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnnotationLabelResponse) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *AnnotationLabelResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AnnotationLabelResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AnnotationLabelResponse) SetType(v string) { + o.Type = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationLabelResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationLabelResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnnotationLabelResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *AnnotationLabelResponse) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *AnnotationLabelResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *AnnotationLabelResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetSettings returns the Settings field value if set, zero value otherwise. +func (o *AnnotationLabelResponse) GetSettings() map[string]interface{} { + if o == nil || IsNil(o.Settings) { + var ret map[string]interface{} + return ret + } + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationLabelResponse) GetSettingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Settings) { + return map[string]interface{}{}, false + } + return o.Settings, true +} + +// HasSettings returns a boolean if a field has been set. +func (o *AnnotationLabelResponse) HasSettings() bool { + if o != nil && !IsNil(o.Settings) { + return true + } + + return false +} + +// SetSettings gets a reference to the given map[string]interface{} and assigns it to the Settings field. +func (o *AnnotationLabelResponse) SetSettings(v map[string]interface{}) { + o.Settings = v +} + +func (o AnnotationLabelResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnnotationLabelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Settings) { + toSerialize["settings"] = o.Settings + } + return toSerialize, nil +} + +func (o *AnnotationLabelResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnnotationLabelResponse := _AnnotationLabelResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnnotationLabelResponse) + + if err != nil { + return err + } + + *o = AnnotationLabelResponse(varAnnotationLabelResponse) + + return err +} + +type NullableAnnotationLabelResponse struct { + value *AnnotationLabelResponse + isSet bool +} + +func (v NullableAnnotationLabelResponse) Get() *AnnotationLabelResponse { + return v.value +} + +func (v *NullableAnnotationLabelResponse) Set(val *AnnotationLabelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnnotationLabelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnnotationLabelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnnotationLabelResponse(val *AnnotationLabelResponse) *NullableAnnotationLabelResponse { + return &NullableAnnotationLabelResponse{value: val, isSet: true} +} + +func (v NullableAnnotationLabelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnnotationLabelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_annotation_label_restore_response.go b/go/futureagi/model_annotation_label_restore_response.go new file mode 100644 index 0000000..a08f37b --- /dev/null +++ b/go/futureagi/model_annotation_label_restore_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AnnotationLabelRestoreResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnnotationLabelRestoreResponse{} + +// AnnotationLabelRestoreResponse struct for AnnotationLabelRestoreResponse +type AnnotationLabelRestoreResponse struct { + Status *bool `json:"status,omitempty"` + Result AnnotationsLabels `json:"result"` +} + +type _AnnotationLabelRestoreResponse AnnotationLabelRestoreResponse + +// NewAnnotationLabelRestoreResponse instantiates a new AnnotationLabelRestoreResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnnotationLabelRestoreResponse(result AnnotationsLabels) *AnnotationLabelRestoreResponse { + this := AnnotationLabelRestoreResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewAnnotationLabelRestoreResponseWithDefaults instantiates a new AnnotationLabelRestoreResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnnotationLabelRestoreResponseWithDefaults() *AnnotationLabelRestoreResponse { + this := AnnotationLabelRestoreResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AnnotationLabelRestoreResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationLabelRestoreResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AnnotationLabelRestoreResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *AnnotationLabelRestoreResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *AnnotationLabelRestoreResponse) GetResult() AnnotationsLabels { + if o == nil { + var ret AnnotationsLabels + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *AnnotationLabelRestoreResponse) GetResultOk() (*AnnotationsLabels, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *AnnotationLabelRestoreResponse) SetResult(v AnnotationsLabels) { + o.Result = v +} + +func (o AnnotationLabelRestoreResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnnotationLabelRestoreResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *AnnotationLabelRestoreResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnnotationLabelRestoreResponse := _AnnotationLabelRestoreResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnnotationLabelRestoreResponse) + + if err != nil { + return err + } + + *o = AnnotationLabelRestoreResponse(varAnnotationLabelRestoreResponse) + + return err +} + +type NullableAnnotationLabelRestoreResponse struct { + value *AnnotationLabelRestoreResponse + isSet bool +} + +func (v NullableAnnotationLabelRestoreResponse) Get() *AnnotationLabelRestoreResponse { + return v.value +} + +func (v *NullableAnnotationLabelRestoreResponse) Set(val *AnnotationLabelRestoreResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnnotationLabelRestoreResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnnotationLabelRestoreResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnnotationLabelRestoreResponse(val *AnnotationLabelRestoreResponse) *NullableAnnotationLabelRestoreResponse { + return &NullableAnnotationLabelRestoreResponse{value: val, isSet: true} +} + +func (v NullableAnnotationLabelRestoreResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnnotationLabelRestoreResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_annotation_queue.go b/go/futureagi/model_annotation_queue.go new file mode 100644 index 0000000..68fb018 --- /dev/null +++ b/go/futureagi/model_annotation_queue.go @@ -0,0 +1,1233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AnnotationQueue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnnotationQueue{} + +// AnnotationQueue struct for AnnotationQueue +type AnnotationQueue struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Description NullableString `json:"description,omitempty"` + Instructions NullableString `json:"instructions,omitempty"` + Status *string `json:"status,omitempty"` + AssignmentStrategy *string `json:"assignment_strategy,omitempty"` + AnnotationsRequired *int32 `json:"annotations_required,omitempty"` + ReservationTimeoutMinutes *int32 `json:"reservation_timeout_minutes,omitempty"` + RequiresReview *bool `json:"requires_review,omitempty"` + // When enabled, all queue members can annotate any item without explicit assignment. + AutoAssign *bool `json:"auto_assign,omitempty"` + Organization *string `json:"organization,omitempty"` + Project NullableString `json:"project,omitempty"` + Dataset NullableString `json:"dataset,omitempty"` + AgentDefinition NullableString `json:"agent_definition,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` + Labels []QueueLabelNested `json:"labels,omitempty"` + Annotators []QueueAnnotatorNested `json:"annotators,omitempty"` + LabelIds []string `json:"label_ids,omitempty"` + AnnotatorIds []string `json:"annotator_ids,omitempty"` + AnnotatorRoles *map[string]map[string]interface{} `json:"annotator_roles,omitempty"` + LabelCount *int32 `json:"label_count,omitempty"` + AnnotatorCount *int32 `json:"annotator_count,omitempty"` + ItemCount *int32 `json:"item_count,omitempty"` + CompletedCount *int32 `json:"completed_count,omitempty"` + CreatedBy NullableString `json:"created_by,omitempty"` + CreatedByName *string `json:"created_by_name,omitempty"` + ViewerRole *string `json:"viewer_role,omitempty"` + ViewerRoles *string `json:"viewer_roles,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +type _AnnotationQueue AnnotationQueue + +// NewAnnotationQueue instantiates a new AnnotationQueue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnnotationQueue(name string) *AnnotationQueue { + this := AnnotationQueue{} + this.Name = name + return &this +} + +// NewAnnotationQueueWithDefaults instantiates a new AnnotationQueue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnnotationQueueWithDefaults() *AnnotationQueue { + this := AnnotationQueue{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AnnotationQueue) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AnnotationQueue) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AnnotationQueue) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *AnnotationQueue) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnnotationQueue) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationQueue) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationQueue) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnnotationQueue) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *AnnotationQueue) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *AnnotationQueue) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *AnnotationQueue) UnsetDescription() { + o.Description.Unset() +} + +// GetInstructions returns the Instructions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationQueue) GetInstructions() string { + if o == nil || IsNil(o.Instructions.Get()) { + var ret string + return ret + } + return *o.Instructions.Get() +} + +// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationQueue) GetInstructionsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instructions.Get(), o.Instructions.IsSet() +} + +// HasInstructions returns a boolean if a field has been set. +func (o *AnnotationQueue) HasInstructions() bool { + if o != nil && o.Instructions.IsSet() { + return true + } + + return false +} + +// SetInstructions gets a reference to the given NullableString and assigns it to the Instructions field. +func (o *AnnotationQueue) SetInstructions(v string) { + o.Instructions.Set(&v) +} + +// SetInstructionsNil sets the value for Instructions to be an explicit nil +func (o *AnnotationQueue) SetInstructionsNil() { + o.Instructions.Set(nil) +} + +// UnsetInstructions ensures that no value is present for Instructions, not even an explicit nil +func (o *AnnotationQueue) UnsetInstructions() { + o.Instructions.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AnnotationQueue) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AnnotationQueue) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *AnnotationQueue) SetStatus(v string) { + o.Status = &v +} + +// GetAssignmentStrategy returns the AssignmentStrategy field value if set, zero value otherwise. +func (o *AnnotationQueue) GetAssignmentStrategy() string { + if o == nil || IsNil(o.AssignmentStrategy) { + var ret string + return ret + } + return *o.AssignmentStrategy +} + +// GetAssignmentStrategyOk returns a tuple with the AssignmentStrategy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetAssignmentStrategyOk() (*string, bool) { + if o == nil || IsNil(o.AssignmentStrategy) { + return nil, false + } + return o.AssignmentStrategy, true +} + +// HasAssignmentStrategy returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAssignmentStrategy() bool { + if o != nil && !IsNil(o.AssignmentStrategy) { + return true + } + + return false +} + +// SetAssignmentStrategy gets a reference to the given string and assigns it to the AssignmentStrategy field. +func (o *AnnotationQueue) SetAssignmentStrategy(v string) { + o.AssignmentStrategy = &v +} + +// GetAnnotationsRequired returns the AnnotationsRequired field value if set, zero value otherwise. +func (o *AnnotationQueue) GetAnnotationsRequired() int32 { + if o == nil || IsNil(o.AnnotationsRequired) { + var ret int32 + return ret + } + return *o.AnnotationsRequired +} + +// GetAnnotationsRequiredOk returns a tuple with the AnnotationsRequired field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetAnnotationsRequiredOk() (*int32, bool) { + if o == nil || IsNil(o.AnnotationsRequired) { + return nil, false + } + return o.AnnotationsRequired, true +} + +// HasAnnotationsRequired returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAnnotationsRequired() bool { + if o != nil && !IsNil(o.AnnotationsRequired) { + return true + } + + return false +} + +// SetAnnotationsRequired gets a reference to the given int32 and assigns it to the AnnotationsRequired field. +func (o *AnnotationQueue) SetAnnotationsRequired(v int32) { + o.AnnotationsRequired = &v +} + +// GetReservationTimeoutMinutes returns the ReservationTimeoutMinutes field value if set, zero value otherwise. +func (o *AnnotationQueue) GetReservationTimeoutMinutes() int32 { + if o == nil || IsNil(o.ReservationTimeoutMinutes) { + var ret int32 + return ret + } + return *o.ReservationTimeoutMinutes +} + +// GetReservationTimeoutMinutesOk returns a tuple with the ReservationTimeoutMinutes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetReservationTimeoutMinutesOk() (*int32, bool) { + if o == nil || IsNil(o.ReservationTimeoutMinutes) { + return nil, false + } + return o.ReservationTimeoutMinutes, true +} + +// HasReservationTimeoutMinutes returns a boolean if a field has been set. +func (o *AnnotationQueue) HasReservationTimeoutMinutes() bool { + if o != nil && !IsNil(o.ReservationTimeoutMinutes) { + return true + } + + return false +} + +// SetReservationTimeoutMinutes gets a reference to the given int32 and assigns it to the ReservationTimeoutMinutes field. +func (o *AnnotationQueue) SetReservationTimeoutMinutes(v int32) { + o.ReservationTimeoutMinutes = &v +} + +// GetRequiresReview returns the RequiresReview field value if set, zero value otherwise. +func (o *AnnotationQueue) GetRequiresReview() bool { + if o == nil || IsNil(o.RequiresReview) { + var ret bool + return ret + } + return *o.RequiresReview +} + +// GetRequiresReviewOk returns a tuple with the RequiresReview field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetRequiresReviewOk() (*bool, bool) { + if o == nil || IsNil(o.RequiresReview) { + return nil, false + } + return o.RequiresReview, true +} + +// HasRequiresReview returns a boolean if a field has been set. +func (o *AnnotationQueue) HasRequiresReview() bool { + if o != nil && !IsNil(o.RequiresReview) { + return true + } + + return false +} + +// SetRequiresReview gets a reference to the given bool and assigns it to the RequiresReview field. +func (o *AnnotationQueue) SetRequiresReview(v bool) { + o.RequiresReview = &v +} + +// GetAutoAssign returns the AutoAssign field value if set, zero value otherwise. +func (o *AnnotationQueue) GetAutoAssign() bool { + if o == nil || IsNil(o.AutoAssign) { + var ret bool + return ret + } + return *o.AutoAssign +} + +// GetAutoAssignOk returns a tuple with the AutoAssign field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetAutoAssignOk() (*bool, bool) { + if o == nil || IsNil(o.AutoAssign) { + return nil, false + } + return o.AutoAssign, true +} + +// HasAutoAssign returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAutoAssign() bool { + if o != nil && !IsNil(o.AutoAssign) { + return true + } + + return false +} + +// SetAutoAssign gets a reference to the given bool and assigns it to the AutoAssign field. +func (o *AnnotationQueue) SetAutoAssign(v bool) { + o.AutoAssign = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *AnnotationQueue) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *AnnotationQueue) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *AnnotationQueue) SetOrganization(v string) { + o.Organization = &v +} + +// GetProject returns the Project field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationQueue) GetProject() string { + if o == nil || IsNil(o.Project.Get()) { + var ret string + return ret + } + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationQueue) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// HasProject returns a boolean if a field has been set. +func (o *AnnotationQueue) HasProject() bool { + if o != nil && o.Project.IsSet() { + return true + } + + return false +} + +// SetProject gets a reference to the given NullableString and assigns it to the Project field. +func (o *AnnotationQueue) SetProject(v string) { + o.Project.Set(&v) +} + +// SetProjectNil sets the value for Project to be an explicit nil +func (o *AnnotationQueue) SetProjectNil() { + o.Project.Set(nil) +} + +// UnsetProject ensures that no value is present for Project, not even an explicit nil +func (o *AnnotationQueue) UnsetProject() { + o.Project.Unset() +} + +// GetDataset returns the Dataset field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationQueue) GetDataset() string { + if o == nil || IsNil(o.Dataset.Get()) { + var ret string + return ret + } + return *o.Dataset.Get() +} + +// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationQueue) GetDatasetOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Dataset.Get(), o.Dataset.IsSet() +} + +// HasDataset returns a boolean if a field has been set. +func (o *AnnotationQueue) HasDataset() bool { + if o != nil && o.Dataset.IsSet() { + return true + } + + return false +} + +// SetDataset gets a reference to the given NullableString and assigns it to the Dataset field. +func (o *AnnotationQueue) SetDataset(v string) { + o.Dataset.Set(&v) +} + +// SetDatasetNil sets the value for Dataset to be an explicit nil +func (o *AnnotationQueue) SetDatasetNil() { + o.Dataset.Set(nil) +} + +// UnsetDataset ensures that no value is present for Dataset, not even an explicit nil +func (o *AnnotationQueue) UnsetDataset() { + o.Dataset.Unset() +} + +// GetAgentDefinition returns the AgentDefinition field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationQueue) GetAgentDefinition() string { + if o == nil || IsNil(o.AgentDefinition.Get()) { + var ret string + return ret + } + return *o.AgentDefinition.Get() +} + +// GetAgentDefinitionOk returns a tuple with the AgentDefinition field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationQueue) GetAgentDefinitionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentDefinition.Get(), o.AgentDefinition.IsSet() +} + +// HasAgentDefinition returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAgentDefinition() bool { + if o != nil && o.AgentDefinition.IsSet() { + return true + } + + return false +} + +// SetAgentDefinition gets a reference to the given NullableString and assigns it to the AgentDefinition field. +func (o *AnnotationQueue) SetAgentDefinition(v string) { + o.AgentDefinition.Set(&v) +} + +// SetAgentDefinitionNil sets the value for AgentDefinition to be an explicit nil +func (o *AnnotationQueue) SetAgentDefinitionNil() { + o.AgentDefinition.Set(nil) +} + +// UnsetAgentDefinition ensures that no value is present for AgentDefinition, not even an explicit nil +func (o *AnnotationQueue) UnsetAgentDefinition() { + o.AgentDefinition.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *AnnotationQueue) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *AnnotationQueue) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *AnnotationQueue) SetIsDefault(v bool) { + o.IsDefault = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *AnnotationQueue) GetLabels() []QueueLabelNested { + if o == nil || IsNil(o.Labels) { + var ret []QueueLabelNested + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetLabelsOk() ([]QueueLabelNested, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *AnnotationQueue) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []QueueLabelNested and assigns it to the Labels field. +func (o *AnnotationQueue) SetLabels(v []QueueLabelNested) { + o.Labels = v +} + +// GetAnnotators returns the Annotators field value if set, zero value otherwise. +func (o *AnnotationQueue) GetAnnotators() []QueueAnnotatorNested { + if o == nil || IsNil(o.Annotators) { + var ret []QueueAnnotatorNested + return ret + } + return o.Annotators +} + +// GetAnnotatorsOk returns a tuple with the Annotators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetAnnotatorsOk() ([]QueueAnnotatorNested, bool) { + if o == nil || IsNil(o.Annotators) { + return nil, false + } + return o.Annotators, true +} + +// HasAnnotators returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAnnotators() bool { + if o != nil && !IsNil(o.Annotators) { + return true + } + + return false +} + +// SetAnnotators gets a reference to the given []QueueAnnotatorNested and assigns it to the Annotators field. +func (o *AnnotationQueue) SetAnnotators(v []QueueAnnotatorNested) { + o.Annotators = v +} + +// GetLabelIds returns the LabelIds field value if set, zero value otherwise. +func (o *AnnotationQueue) GetLabelIds() []string { + if o == nil || IsNil(o.LabelIds) { + var ret []string + return ret + } + return o.LabelIds +} + +// GetLabelIdsOk returns a tuple with the LabelIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetLabelIdsOk() ([]string, bool) { + if o == nil || IsNil(o.LabelIds) { + return nil, false + } + return o.LabelIds, true +} + +// HasLabelIds returns a boolean if a field has been set. +func (o *AnnotationQueue) HasLabelIds() bool { + if o != nil && !IsNil(o.LabelIds) { + return true + } + + return false +} + +// SetLabelIds gets a reference to the given []string and assigns it to the LabelIds field. +func (o *AnnotationQueue) SetLabelIds(v []string) { + o.LabelIds = v +} + +// GetAnnotatorIds returns the AnnotatorIds field value if set, zero value otherwise. +func (o *AnnotationQueue) GetAnnotatorIds() []string { + if o == nil || IsNil(o.AnnotatorIds) { + var ret []string + return ret + } + return o.AnnotatorIds +} + +// GetAnnotatorIdsOk returns a tuple with the AnnotatorIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetAnnotatorIdsOk() ([]string, bool) { + if o == nil || IsNil(o.AnnotatorIds) { + return nil, false + } + return o.AnnotatorIds, true +} + +// HasAnnotatorIds returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAnnotatorIds() bool { + if o != nil && !IsNil(o.AnnotatorIds) { + return true + } + + return false +} + +// SetAnnotatorIds gets a reference to the given []string and assigns it to the AnnotatorIds field. +func (o *AnnotationQueue) SetAnnotatorIds(v []string) { + o.AnnotatorIds = v +} + +// GetAnnotatorRoles returns the AnnotatorRoles field value if set, zero value otherwise. +func (o *AnnotationQueue) GetAnnotatorRoles() map[string]map[string]interface{} { + if o == nil || IsNil(o.AnnotatorRoles) { + var ret map[string]map[string]interface{} + return ret + } + return *o.AnnotatorRoles +} + +// GetAnnotatorRolesOk returns a tuple with the AnnotatorRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetAnnotatorRolesOk() (*map[string]map[string]interface{}, bool) { + if o == nil || IsNil(o.AnnotatorRoles) { + return nil, false + } + return o.AnnotatorRoles, true +} + +// HasAnnotatorRoles returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAnnotatorRoles() bool { + if o != nil && !IsNil(o.AnnotatorRoles) { + return true + } + + return false +} + +// SetAnnotatorRoles gets a reference to the given map[string]map[string]interface{} and assigns it to the AnnotatorRoles field. +func (o *AnnotationQueue) SetAnnotatorRoles(v map[string]map[string]interface{}) { + o.AnnotatorRoles = &v +} + +// GetLabelCount returns the LabelCount field value if set, zero value otherwise. +func (o *AnnotationQueue) GetLabelCount() int32 { + if o == nil || IsNil(o.LabelCount) { + var ret int32 + return ret + } + return *o.LabelCount +} + +// GetLabelCountOk returns a tuple with the LabelCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetLabelCountOk() (*int32, bool) { + if o == nil || IsNil(o.LabelCount) { + return nil, false + } + return o.LabelCount, true +} + +// HasLabelCount returns a boolean if a field has been set. +func (o *AnnotationQueue) HasLabelCount() bool { + if o != nil && !IsNil(o.LabelCount) { + return true + } + + return false +} + +// SetLabelCount gets a reference to the given int32 and assigns it to the LabelCount field. +func (o *AnnotationQueue) SetLabelCount(v int32) { + o.LabelCount = &v +} + +// GetAnnotatorCount returns the AnnotatorCount field value if set, zero value otherwise. +func (o *AnnotationQueue) GetAnnotatorCount() int32 { + if o == nil || IsNil(o.AnnotatorCount) { + var ret int32 + return ret + } + return *o.AnnotatorCount +} + +// GetAnnotatorCountOk returns a tuple with the AnnotatorCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetAnnotatorCountOk() (*int32, bool) { + if o == nil || IsNil(o.AnnotatorCount) { + return nil, false + } + return o.AnnotatorCount, true +} + +// HasAnnotatorCount returns a boolean if a field has been set. +func (o *AnnotationQueue) HasAnnotatorCount() bool { + if o != nil && !IsNil(o.AnnotatorCount) { + return true + } + + return false +} + +// SetAnnotatorCount gets a reference to the given int32 and assigns it to the AnnotatorCount field. +func (o *AnnotationQueue) SetAnnotatorCount(v int32) { + o.AnnotatorCount = &v +} + +// GetItemCount returns the ItemCount field value if set, zero value otherwise. +func (o *AnnotationQueue) GetItemCount() int32 { + if o == nil || IsNil(o.ItemCount) { + var ret int32 + return ret + } + return *o.ItemCount +} + +// GetItemCountOk returns a tuple with the ItemCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetItemCountOk() (*int32, bool) { + if o == nil || IsNil(o.ItemCount) { + return nil, false + } + return o.ItemCount, true +} + +// HasItemCount returns a boolean if a field has been set. +func (o *AnnotationQueue) HasItemCount() bool { + if o != nil && !IsNil(o.ItemCount) { + return true + } + + return false +} + +// SetItemCount gets a reference to the given int32 and assigns it to the ItemCount field. +func (o *AnnotationQueue) SetItemCount(v int32) { + o.ItemCount = &v +} + +// GetCompletedCount returns the CompletedCount field value if set, zero value otherwise. +func (o *AnnotationQueue) GetCompletedCount() int32 { + if o == nil || IsNil(o.CompletedCount) { + var ret int32 + return ret + } + return *o.CompletedCount +} + +// GetCompletedCountOk returns a tuple with the CompletedCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetCompletedCountOk() (*int32, bool) { + if o == nil || IsNil(o.CompletedCount) { + return nil, false + } + return o.CompletedCount, true +} + +// HasCompletedCount returns a boolean if a field has been set. +func (o *AnnotationQueue) HasCompletedCount() bool { + if o != nil && !IsNil(o.CompletedCount) { + return true + } + + return false +} + +// SetCompletedCount gets a reference to the given int32 and assigns it to the CompletedCount field. +func (o *AnnotationQueue) SetCompletedCount(v int32) { + o.CompletedCount = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationQueue) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationQueue) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *AnnotationQueue) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *AnnotationQueue) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *AnnotationQueue) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *AnnotationQueue) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetCreatedByName returns the CreatedByName field value if set, zero value otherwise. +func (o *AnnotationQueue) GetCreatedByName() string { + if o == nil || IsNil(o.CreatedByName) { + var ret string + return ret + } + return *o.CreatedByName +} + +// GetCreatedByNameOk returns a tuple with the CreatedByName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetCreatedByNameOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByName) { + return nil, false + } + return o.CreatedByName, true +} + +// HasCreatedByName returns a boolean if a field has been set. +func (o *AnnotationQueue) HasCreatedByName() bool { + if o != nil && !IsNil(o.CreatedByName) { + return true + } + + return false +} + +// SetCreatedByName gets a reference to the given string and assigns it to the CreatedByName field. +func (o *AnnotationQueue) SetCreatedByName(v string) { + o.CreatedByName = &v +} + +// GetViewerRole returns the ViewerRole field value if set, zero value otherwise. +func (o *AnnotationQueue) GetViewerRole() string { + if o == nil || IsNil(o.ViewerRole) { + var ret string + return ret + } + return *o.ViewerRole +} + +// GetViewerRoleOk returns a tuple with the ViewerRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetViewerRoleOk() (*string, bool) { + if o == nil || IsNil(o.ViewerRole) { + return nil, false + } + return o.ViewerRole, true +} + +// HasViewerRole returns a boolean if a field has been set. +func (o *AnnotationQueue) HasViewerRole() bool { + if o != nil && !IsNil(o.ViewerRole) { + return true + } + + return false +} + +// SetViewerRole gets a reference to the given string and assigns it to the ViewerRole field. +func (o *AnnotationQueue) SetViewerRole(v string) { + o.ViewerRole = &v +} + +// GetViewerRoles returns the ViewerRoles field value if set, zero value otherwise. +func (o *AnnotationQueue) GetViewerRoles() string { + if o == nil || IsNil(o.ViewerRoles) { + var ret string + return ret + } + return *o.ViewerRoles +} + +// GetViewerRolesOk returns a tuple with the ViewerRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetViewerRolesOk() (*string, bool) { + if o == nil || IsNil(o.ViewerRoles) { + return nil, false + } + return o.ViewerRoles, true +} + +// HasViewerRoles returns a boolean if a field has been set. +func (o *AnnotationQueue) HasViewerRoles() bool { + if o != nil && !IsNil(o.ViewerRoles) { + return true + } + + return false +} + +// SetViewerRoles gets a reference to the given string and assigns it to the ViewerRoles field. +func (o *AnnotationQueue) SetViewerRoles(v string) { + o.ViewerRoles = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AnnotationQueue) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationQueue) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AnnotationQueue) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AnnotationQueue) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o AnnotationQueue) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnnotationQueue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.Instructions.IsSet() { + toSerialize["instructions"] = o.Instructions.Get() + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.AssignmentStrategy) { + toSerialize["assignment_strategy"] = o.AssignmentStrategy + } + if !IsNil(o.AnnotationsRequired) { + toSerialize["annotations_required"] = o.AnnotationsRequired + } + if !IsNil(o.ReservationTimeoutMinutes) { + toSerialize["reservation_timeout_minutes"] = o.ReservationTimeoutMinutes + } + if !IsNil(o.RequiresReview) { + toSerialize["requires_review"] = o.RequiresReview + } + if !IsNil(o.AutoAssign) { + toSerialize["auto_assign"] = o.AutoAssign + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if o.Project.IsSet() { + toSerialize["project"] = o.Project.Get() + } + if o.Dataset.IsSet() { + toSerialize["dataset"] = o.Dataset.Get() + } + if o.AgentDefinition.IsSet() { + toSerialize["agent_definition"] = o.AgentDefinition.Get() + } + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Annotators) { + toSerialize["annotators"] = o.Annotators + } + if !IsNil(o.LabelIds) { + toSerialize["label_ids"] = o.LabelIds + } + if !IsNil(o.AnnotatorIds) { + toSerialize["annotator_ids"] = o.AnnotatorIds + } + if !IsNil(o.AnnotatorRoles) { + toSerialize["annotator_roles"] = o.AnnotatorRoles + } + if !IsNil(o.LabelCount) { + toSerialize["label_count"] = o.LabelCount + } + if !IsNil(o.AnnotatorCount) { + toSerialize["annotator_count"] = o.AnnotatorCount + } + if !IsNil(o.ItemCount) { + toSerialize["item_count"] = o.ItemCount + } + if !IsNil(o.CompletedCount) { + toSerialize["completed_count"] = o.CompletedCount + } + if o.CreatedBy.IsSet() { + toSerialize["created_by"] = o.CreatedBy.Get() + } + if !IsNil(o.CreatedByName) { + toSerialize["created_by_name"] = o.CreatedByName + } + if !IsNil(o.ViewerRole) { + toSerialize["viewer_role"] = o.ViewerRole + } + if !IsNil(o.ViewerRoles) { + toSerialize["viewer_roles"] = o.ViewerRoles + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *AnnotationQueue) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnnotationQueue := _AnnotationQueue{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnnotationQueue) + + if err != nil { + return err + } + + *o = AnnotationQueue(varAnnotationQueue) + + return err +} + +type NullableAnnotationQueue struct { + value *AnnotationQueue + isSet bool +} + +func (v NullableAnnotationQueue) Get() *AnnotationQueue { + return v.value +} + +func (v *NullableAnnotationQueue) Set(val *AnnotationQueue) { + v.value = val + v.isSet = true +} + +func (v NullableAnnotationQueue) IsSet() bool { + return v.isSet +} + +func (v *NullableAnnotationQueue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnnotationQueue(val *AnnotationQueue) *NullableAnnotationQueue { + return &NullableAnnotationQueue{value: val, isSet: true} +} + +func (v NullableAnnotationQueue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnnotationQueue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_annotation_summary_header.go b/go/futureagi/model_annotation_summary_header.go new file mode 100644 index 0000000..db315e3 --- /dev/null +++ b/go/futureagi/model_annotation_summary_header.go @@ -0,0 +1,230 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AnnotationSummaryHeader type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnnotationSummaryHeader{} + +// AnnotationSummaryHeader struct for AnnotationSummaryHeader +type AnnotationSummaryHeader struct { + DatasetCoverage NullableFloat32 `json:"dataset_coverage,omitempty"` + CompletionEta NullableFloat32 `json:"completion_eta,omitempty"` + OverallAgreement NullableFloat32 `json:"overall_agreement,omitempty"` +} + +// NewAnnotationSummaryHeader instantiates a new AnnotationSummaryHeader object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnnotationSummaryHeader() *AnnotationSummaryHeader { + this := AnnotationSummaryHeader{} + return &this +} + +// NewAnnotationSummaryHeaderWithDefaults instantiates a new AnnotationSummaryHeader object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnnotationSummaryHeaderWithDefaults() *AnnotationSummaryHeader { + this := AnnotationSummaryHeader{} + return &this +} + +// GetDatasetCoverage returns the DatasetCoverage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationSummaryHeader) GetDatasetCoverage() float32 { + if o == nil || IsNil(o.DatasetCoverage.Get()) { + var ret float32 + return ret + } + return *o.DatasetCoverage.Get() +} + +// GetDatasetCoverageOk returns a tuple with the DatasetCoverage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationSummaryHeader) GetDatasetCoverageOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.DatasetCoverage.Get(), o.DatasetCoverage.IsSet() +} + +// HasDatasetCoverage returns a boolean if a field has been set. +func (o *AnnotationSummaryHeader) HasDatasetCoverage() bool { + if o != nil && o.DatasetCoverage.IsSet() { + return true + } + + return false +} + +// SetDatasetCoverage gets a reference to the given NullableFloat32 and assigns it to the DatasetCoverage field. +func (o *AnnotationSummaryHeader) SetDatasetCoverage(v float32) { + o.DatasetCoverage.Set(&v) +} + +// SetDatasetCoverageNil sets the value for DatasetCoverage to be an explicit nil +func (o *AnnotationSummaryHeader) SetDatasetCoverageNil() { + o.DatasetCoverage.Set(nil) +} + +// UnsetDatasetCoverage ensures that no value is present for DatasetCoverage, not even an explicit nil +func (o *AnnotationSummaryHeader) UnsetDatasetCoverage() { + o.DatasetCoverage.Unset() +} + +// GetCompletionEta returns the CompletionEta field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationSummaryHeader) GetCompletionEta() float32 { + if o == nil || IsNil(o.CompletionEta.Get()) { + var ret float32 + return ret + } + return *o.CompletionEta.Get() +} + +// GetCompletionEtaOk returns a tuple with the CompletionEta field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationSummaryHeader) GetCompletionEtaOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.CompletionEta.Get(), o.CompletionEta.IsSet() +} + +// HasCompletionEta returns a boolean if a field has been set. +func (o *AnnotationSummaryHeader) HasCompletionEta() bool { + if o != nil && o.CompletionEta.IsSet() { + return true + } + + return false +} + +// SetCompletionEta gets a reference to the given NullableFloat32 and assigns it to the CompletionEta field. +func (o *AnnotationSummaryHeader) SetCompletionEta(v float32) { + o.CompletionEta.Set(&v) +} + +// SetCompletionEtaNil sets the value for CompletionEta to be an explicit nil +func (o *AnnotationSummaryHeader) SetCompletionEtaNil() { + o.CompletionEta.Set(nil) +} + +// UnsetCompletionEta ensures that no value is present for CompletionEta, not even an explicit nil +func (o *AnnotationSummaryHeader) UnsetCompletionEta() { + o.CompletionEta.Unset() +} + +// GetOverallAgreement returns the OverallAgreement field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationSummaryHeader) GetOverallAgreement() float32 { + if o == nil || IsNil(o.OverallAgreement.Get()) { + var ret float32 + return ret + } + return *o.OverallAgreement.Get() +} + +// GetOverallAgreementOk returns a tuple with the OverallAgreement field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationSummaryHeader) GetOverallAgreementOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.OverallAgreement.Get(), o.OverallAgreement.IsSet() +} + +// HasOverallAgreement returns a boolean if a field has been set. +func (o *AnnotationSummaryHeader) HasOverallAgreement() bool { + if o != nil && o.OverallAgreement.IsSet() { + return true + } + + return false +} + +// SetOverallAgreement gets a reference to the given NullableFloat32 and assigns it to the OverallAgreement field. +func (o *AnnotationSummaryHeader) SetOverallAgreement(v float32) { + o.OverallAgreement.Set(&v) +} + +// SetOverallAgreementNil sets the value for OverallAgreement to be an explicit nil +func (o *AnnotationSummaryHeader) SetOverallAgreementNil() { + o.OverallAgreement.Set(nil) +} + +// UnsetOverallAgreement ensures that no value is present for OverallAgreement, not even an explicit nil +func (o *AnnotationSummaryHeader) UnsetOverallAgreement() { + o.OverallAgreement.Unset() +} + +func (o AnnotationSummaryHeader) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnnotationSummaryHeader) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.DatasetCoverage.IsSet() { + toSerialize["dataset_coverage"] = o.DatasetCoverage.Get() + } + if o.CompletionEta.IsSet() { + toSerialize["completion_eta"] = o.CompletionEta.Get() + } + if o.OverallAgreement.IsSet() { + toSerialize["overall_agreement"] = o.OverallAgreement.Get() + } + return toSerialize, nil +} + +type NullableAnnotationSummaryHeader struct { + value *AnnotationSummaryHeader + isSet bool +} + +func (v NullableAnnotationSummaryHeader) Get() *AnnotationSummaryHeader { + return v.value +} + +func (v *NullableAnnotationSummaryHeader) Set(val *AnnotationSummaryHeader) { + v.value = val + v.isSet = true +} + +func (v NullableAnnotationSummaryHeader) IsSet() bool { + return v.isSet +} + +func (v *NullableAnnotationSummaryHeader) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnnotationSummaryHeader(val *AnnotationSummaryHeader) *NullableAnnotationSummaryHeader { + return &NullableAnnotationSummaryHeader{value: val, isSet: true} +} + +func (v NullableAnnotationSummaryHeader) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnnotationSummaryHeader) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_annotation_summary_response.go b/go/futureagi/model_annotation_summary_response.go new file mode 100644 index 0000000..b6f0566 --- /dev/null +++ b/go/futureagi/model_annotation_summary_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AnnotationSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnnotationSummaryResponse{} + +// AnnotationSummaryResponse struct for AnnotationSummaryResponse +type AnnotationSummaryResponse struct { + Status *bool `json:"status,omitempty"` + Result AnnotationSummaryResult `json:"result"` +} + +type _AnnotationSummaryResponse AnnotationSummaryResponse + +// NewAnnotationSummaryResponse instantiates a new AnnotationSummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnnotationSummaryResponse(result AnnotationSummaryResult) *AnnotationSummaryResponse { + this := AnnotationSummaryResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewAnnotationSummaryResponseWithDefaults instantiates a new AnnotationSummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnnotationSummaryResponseWithDefaults() *AnnotationSummaryResponse { + this := AnnotationSummaryResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AnnotationSummaryResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationSummaryResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AnnotationSummaryResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *AnnotationSummaryResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *AnnotationSummaryResponse) GetResult() AnnotationSummaryResult { + if o == nil { + var ret AnnotationSummaryResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *AnnotationSummaryResponse) GetResultOk() (*AnnotationSummaryResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *AnnotationSummaryResponse) SetResult(v AnnotationSummaryResult) { + o.Result = v +} + +func (o AnnotationSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnnotationSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *AnnotationSummaryResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnnotationSummaryResponse := _AnnotationSummaryResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnnotationSummaryResponse) + + if err != nil { + return err + } + + *o = AnnotationSummaryResponse(varAnnotationSummaryResponse) + + return err +} + +type NullableAnnotationSummaryResponse struct { + value *AnnotationSummaryResponse + isSet bool +} + +func (v NullableAnnotationSummaryResponse) Get() *AnnotationSummaryResponse { + return v.value +} + +func (v *NullableAnnotationSummaryResponse) Set(val *AnnotationSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnnotationSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnnotationSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnnotationSummaryResponse(val *AnnotationSummaryResponse) *NullableAnnotationSummaryResponse { + return &NullableAnnotationSummaryResponse{value: val, isSet: true} +} + +func (v NullableAnnotationSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnnotationSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_annotation_summary_result.go b/go/futureagi/model_annotation_summary_result.go new file mode 100644 index 0000000..c6f6a6a --- /dev/null +++ b/go/futureagi/model_annotation_summary_result.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AnnotationSummaryResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnnotationSummaryResult{} + +// AnnotationSummaryResult struct for AnnotationSummaryResult +type AnnotationSummaryResult struct { + Labels []map[string]interface{} `json:"labels,omitempty"` + Annotators []map[string]interface{} `json:"annotators,omitempty"` + Header *AnnotationSummaryHeader `json:"header,omitempty"` +} + +// NewAnnotationSummaryResult instantiates a new AnnotationSummaryResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnnotationSummaryResult() *AnnotationSummaryResult { + this := AnnotationSummaryResult{} + return &this +} + +// NewAnnotationSummaryResultWithDefaults instantiates a new AnnotationSummaryResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnnotationSummaryResultWithDefaults() *AnnotationSummaryResult { + this := AnnotationSummaryResult{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *AnnotationSummaryResult) GetLabels() []map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret []map[string]interface{} + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationSummaryResult) GetLabelsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *AnnotationSummaryResult) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []map[string]interface{} and assigns it to the Labels field. +func (o *AnnotationSummaryResult) SetLabels(v []map[string]interface{}) { + o.Labels = v +} + +// GetAnnotators returns the Annotators field value if set, zero value otherwise. +func (o *AnnotationSummaryResult) GetAnnotators() []map[string]interface{} { + if o == nil || IsNil(o.Annotators) { + var ret []map[string]interface{} + return ret + } + return o.Annotators +} + +// GetAnnotatorsOk returns a tuple with the Annotators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationSummaryResult) GetAnnotatorsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Annotators) { + return nil, false + } + return o.Annotators, true +} + +// HasAnnotators returns a boolean if a field has been set. +func (o *AnnotationSummaryResult) HasAnnotators() bool { + if o != nil && !IsNil(o.Annotators) { + return true + } + + return false +} + +// SetAnnotators gets a reference to the given []map[string]interface{} and assigns it to the Annotators field. +func (o *AnnotationSummaryResult) SetAnnotators(v []map[string]interface{}) { + o.Annotators = v +} + +// GetHeader returns the Header field value if set, zero value otherwise. +func (o *AnnotationSummaryResult) GetHeader() AnnotationSummaryHeader { + if o == nil || IsNil(o.Header) { + var ret AnnotationSummaryHeader + return ret + } + return *o.Header +} + +// GetHeaderOk returns a tuple with the Header field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationSummaryResult) GetHeaderOk() (*AnnotationSummaryHeader, bool) { + if o == nil || IsNil(o.Header) { + return nil, false + } + return o.Header, true +} + +// HasHeader returns a boolean if a field has been set. +func (o *AnnotationSummaryResult) HasHeader() bool { + if o != nil && !IsNil(o.Header) { + return true + } + + return false +} + +// SetHeader gets a reference to the given AnnotationSummaryHeader and assigns it to the Header field. +func (o *AnnotationSummaryResult) SetHeader(v AnnotationSummaryHeader) { + o.Header = &v +} + +func (o AnnotationSummaryResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnnotationSummaryResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Annotators) { + toSerialize["annotators"] = o.Annotators + } + if !IsNil(o.Header) { + toSerialize["header"] = o.Header + } + return toSerialize, nil +} + +type NullableAnnotationSummaryResult struct { + value *AnnotationSummaryResult + isSet bool +} + +func (v NullableAnnotationSummaryResult) Get() *AnnotationSummaryResult { + return v.value +} + +func (v *NullableAnnotationSummaryResult) Set(val *AnnotationSummaryResult) { + v.value = val + v.isSet = true +} + +func (v NullableAnnotationSummaryResult) IsSet() bool { + return v.isSet +} + +func (v *NullableAnnotationSummaryResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnnotationSummaryResult(val *AnnotationSummaryResult) *NullableAnnotationSummaryResult { + return &NullableAnnotationSummaryResult{value: val, isSet: true} +} + +func (v NullableAnnotationSummaryResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnnotationSummaryResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_annotations_labels.go b/go/futureagi/model_annotations_labels.go new file mode 100644 index 0000000..48f3188 --- /dev/null +++ b/go/futureagi/model_annotations_labels.go @@ -0,0 +1,521 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AnnotationsLabels type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnnotationsLabels{} + +// AnnotationsLabels struct for AnnotationsLabels +type AnnotationsLabels struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Type string `json:"type"` + Organization *string `json:"organization,omitempty"` + Settings map[string]interface{} `json:"settings,omitempty"` + Project *string `json:"project,omitempty"` + Description NullableString `json:"description,omitempty"` + AllowNotes *bool `json:"allow_notes,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + TraceAnnotationsCount *int32 `json:"trace_annotations_count,omitempty"` + AnnotationCount *int32 `json:"annotation_count,omitempty"` +} + +type _AnnotationsLabels AnnotationsLabels + +// NewAnnotationsLabels instantiates a new AnnotationsLabels object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnnotationsLabels(name string, type_ string) *AnnotationsLabels { + this := AnnotationsLabels{} + this.Name = name + this.Type = type_ + return &this +} + +// NewAnnotationsLabelsWithDefaults instantiates a new AnnotationsLabels object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnnotationsLabelsWithDefaults() *AnnotationsLabels { + this := AnnotationsLabels{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AnnotationsLabels) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *AnnotationsLabels) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnnotationsLabels) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *AnnotationsLabels) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AnnotationsLabels) SetType(v string) { + o.Type = v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *AnnotationsLabels) SetOrganization(v string) { + o.Organization = &v +} + +// GetSettings returns the Settings field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetSettings() map[string]interface{} { + if o == nil || IsNil(o.Settings) { + var ret map[string]interface{} + return ret + } + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetSettingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Settings) { + return map[string]interface{}{}, false + } + return o.Settings, true +} + +// HasSettings returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasSettings() bool { + if o != nil && !IsNil(o.Settings) { + return true + } + + return false +} + +// SetSettings gets a reference to the given map[string]interface{} and assigns it to the Settings field. +func (o *AnnotationsLabels) SetSettings(v map[string]interface{}) { + o.Settings = v +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetProject() string { + if o == nil || IsNil(o.Project) { + var ret string + return ret + } + return *o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetProjectOk() (*string, bool) { + if o == nil || IsNil(o.Project) { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given string and assigns it to the Project field. +func (o *AnnotationsLabels) SetProject(v string) { + o.Project = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnnotationsLabels) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnnotationsLabels) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *AnnotationsLabels) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *AnnotationsLabels) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *AnnotationsLabels) UnsetDescription() { + o.Description.Unset() +} + +// GetAllowNotes returns the AllowNotes field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetAllowNotes() bool { + if o == nil || IsNil(o.AllowNotes) { + var ret bool + return ret + } + return *o.AllowNotes +} + +// GetAllowNotesOk returns a tuple with the AllowNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetAllowNotesOk() (*bool, bool) { + if o == nil || IsNil(o.AllowNotes) { + return nil, false + } + return o.AllowNotes, true +} + +// HasAllowNotes returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasAllowNotes() bool { + if o != nil && !IsNil(o.AllowNotes) { + return true + } + + return false +} + +// SetAllowNotes gets a reference to the given bool and assigns it to the AllowNotes field. +func (o *AnnotationsLabels) SetAllowNotes(v bool) { + o.AllowNotes = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AnnotationsLabels) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetTraceAnnotationsCount returns the TraceAnnotationsCount field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetTraceAnnotationsCount() int32 { + if o == nil || IsNil(o.TraceAnnotationsCount) { + var ret int32 + return ret + } + return *o.TraceAnnotationsCount +} + +// GetTraceAnnotationsCountOk returns a tuple with the TraceAnnotationsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetTraceAnnotationsCountOk() (*int32, bool) { + if o == nil || IsNil(o.TraceAnnotationsCount) { + return nil, false + } + return o.TraceAnnotationsCount, true +} + +// HasTraceAnnotationsCount returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasTraceAnnotationsCount() bool { + if o != nil && !IsNil(o.TraceAnnotationsCount) { + return true + } + + return false +} + +// SetTraceAnnotationsCount gets a reference to the given int32 and assigns it to the TraceAnnotationsCount field. +func (o *AnnotationsLabels) SetTraceAnnotationsCount(v int32) { + o.TraceAnnotationsCount = &v +} + +// GetAnnotationCount returns the AnnotationCount field value if set, zero value otherwise. +func (o *AnnotationsLabels) GetAnnotationCount() int32 { + if o == nil || IsNil(o.AnnotationCount) { + var ret int32 + return ret + } + return *o.AnnotationCount +} + +// GetAnnotationCountOk returns a tuple with the AnnotationCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnnotationsLabels) GetAnnotationCountOk() (*int32, bool) { + if o == nil || IsNil(o.AnnotationCount) { + return nil, false + } + return o.AnnotationCount, true +} + +// HasAnnotationCount returns a boolean if a field has been set. +func (o *AnnotationsLabels) HasAnnotationCount() bool { + if o != nil && !IsNil(o.AnnotationCount) { + return true + } + + return false +} + +// SetAnnotationCount gets a reference to the given int32 and assigns it to the AnnotationCount field. +func (o *AnnotationsLabels) SetAnnotationCount(v int32) { + o.AnnotationCount = &v +} + +func (o AnnotationsLabels) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnnotationsLabels) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.Settings) { + toSerialize["settings"] = o.Settings + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.AllowNotes) { + toSerialize["allow_notes"] = o.AllowNotes + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.TraceAnnotationsCount) { + toSerialize["trace_annotations_count"] = o.TraceAnnotationsCount + } + if !IsNil(o.AnnotationCount) { + toSerialize["annotation_count"] = o.AnnotationCount + } + return toSerialize, nil +} + +func (o *AnnotationsLabels) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAnnotationsLabels := _AnnotationsLabels{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAnnotationsLabels) + + if err != nil { + return err + } + + *o = AnnotationsLabels(varAnnotationsLabels) + + return err +} + +type NullableAnnotationsLabels struct { + value *AnnotationsLabels + isSet bool +} + +func (v NullableAnnotationsLabels) Get() *AnnotationsLabels { + return v.value +} + +func (v *NullableAnnotationsLabels) Set(val *AnnotationsLabels) { + v.value = val + v.isSet = true +} + +func (v NullableAnnotationsLabels) IsSet() bool { + return v.isSet +} + +func (v *NullableAnnotationsLabels) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnnotationsLabels(val *AnnotationsLabels) *NullableAnnotationsLabels { + return &NullableAnnotationsLabels{value: val, isSet: true} +} + +func (v NullableAnnotationsLabels) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnnotationsLabels) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_api_error_response.go b/go/futureagi/model_api_error_response.go new file mode 100644 index 0000000..56ec0af --- /dev/null +++ b/go/futureagi/model_api_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ApiErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiErrorResponse{} + +// ApiErrorResponse struct for ApiErrorResponse +type ApiErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewApiErrorResponse instantiates a new ApiErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiErrorResponse() *ApiErrorResponse { + this := ApiErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewApiErrorResponseWithDefaults instantiates a new ApiErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiErrorResponseWithDefaults() *ApiErrorResponse { + this := ApiErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ApiErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ApiErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ApiErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ApiErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ApiErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ApiErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ApiErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ApiErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ApiErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ApiErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ApiErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ApiErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ApiErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ApiErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ApiErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ApiErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ApiErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ApiErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ApiErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ApiErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ApiErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ApiErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ApiErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ApiErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ApiErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ApiErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ApiErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableApiErrorResponse struct { + value *ApiErrorResponse + isSet bool +} + +func (v NullableApiErrorResponse) Get() *ApiErrorResponse { + return v.value +} + +func (v *NullableApiErrorResponse) Set(val *ApiErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiErrorResponse(val *ApiErrorResponse) *NullableApiErrorResponse { + return &NullableApiErrorResponse{value: val, isSet: true} +} + +func (v NullableApiErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_api_error_with_details_response.go b/go/futureagi/model_api_error_with_details_response.go new file mode 100644 index 0000000..1176d06 --- /dev/null +++ b/go/futureagi/model_api_error_with_details_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ApiErrorWithDetailsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiErrorWithDetailsResponse{} + +// ApiErrorWithDetailsResponse struct for ApiErrorWithDetailsResponse +type ApiErrorWithDetailsResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewApiErrorWithDetailsResponse instantiates a new ApiErrorWithDetailsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiErrorWithDetailsResponse() *ApiErrorWithDetailsResponse { + this := ApiErrorWithDetailsResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewApiErrorWithDetailsResponseWithDefaults instantiates a new ApiErrorWithDetailsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiErrorWithDetailsResponseWithDefaults() *ApiErrorWithDetailsResponse { + this := ApiErrorWithDetailsResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ApiErrorWithDetailsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiErrorWithDetailsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ApiErrorWithDetailsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorWithDetailsResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorWithDetailsResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ApiErrorWithDetailsResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ApiErrorWithDetailsResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ApiErrorWithDetailsResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorWithDetailsResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorWithDetailsResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ApiErrorWithDetailsResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ApiErrorWithDetailsResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ApiErrorWithDetailsResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorWithDetailsResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorWithDetailsResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ApiErrorWithDetailsResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ApiErrorWithDetailsResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ApiErrorWithDetailsResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorWithDetailsResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorWithDetailsResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ApiErrorWithDetailsResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ApiErrorWithDetailsResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ApiErrorWithDetailsResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorWithDetailsResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorWithDetailsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ApiErrorWithDetailsResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ApiErrorWithDetailsResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ApiErrorWithDetailsResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorWithDetailsResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorWithDetailsResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ApiErrorWithDetailsResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ApiErrorWithDetailsResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ApiErrorWithDetailsResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiErrorWithDetailsResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiErrorWithDetailsResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ApiErrorWithDetailsResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ApiErrorWithDetailsResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ApiErrorWithDetailsResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ApiErrorWithDetailsResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiErrorWithDetailsResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ApiErrorWithDetailsResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ApiErrorWithDetailsResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ApiErrorWithDetailsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiErrorWithDetailsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableApiErrorWithDetailsResponse struct { + value *ApiErrorWithDetailsResponse + isSet bool +} + +func (v NullableApiErrorWithDetailsResponse) Get() *ApiErrorWithDetailsResponse { + return v.value +} + +func (v *NullableApiErrorWithDetailsResponse) Set(val *ApiErrorWithDetailsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiErrorWithDetailsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiErrorWithDetailsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiErrorWithDetailsResponse(val *ApiErrorWithDetailsResponse) *NullableApiErrorWithDetailsResponse { + return &NullableApiErrorWithDetailsResponse{value: val, isSet: true} +} + +func (v NullableApiErrorWithDetailsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiErrorWithDetailsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_api_key.go b/go/futureagi/model_api_key.go new file mode 100644 index 0000000..68c7641 --- /dev/null +++ b/go/futureagi/model_api_key.go @@ -0,0 +1,359 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ApiKey type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiKey{} + +// ApiKey struct for ApiKey +type ApiKey struct { + Id *string `json:"id,omitempty"` + Provider string `json:"provider"` + Key NullableString `json:"key,omitempty"` + Organization NullableString `json:"organization,omitempty"` + MaskedActualKey *string `json:"masked_actual_key,omitempty"` + ConfigJson map[string]interface{} `json:"config_json,omitempty"` +} + +type _ApiKey ApiKey + +// NewApiKey instantiates a new ApiKey object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiKey(provider string) *ApiKey { + this := ApiKey{} + this.Provider = provider + return &this +} + +// NewApiKeyWithDefaults instantiates a new ApiKey object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiKeyWithDefaults() *ApiKey { + this := ApiKey{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApiKey) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiKey) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApiKey) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ApiKey) SetId(v string) { + o.Id = &v +} + +// GetProvider returns the Provider field value +func (o *ApiKey) GetProvider() string { + if o == nil { + var ret string + return ret + } + + return o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value +// and a boolean to check if the value has been set. +func (o *ApiKey) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Provider, true +} + +// SetProvider sets field value +func (o *ApiKey) SetProvider(v string) { + o.Provider = v +} + +// GetKey returns the Key field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiKey) GetKey() string { + if o == nil || IsNil(o.Key.Get()) { + var ret string + return ret + } + return *o.Key.Get() +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiKey) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Key.Get(), o.Key.IsSet() +} + +// HasKey returns a boolean if a field has been set. +func (o *ApiKey) HasKey() bool { + if o != nil && o.Key.IsSet() { + return true + } + + return false +} + +// SetKey gets a reference to the given NullableString and assigns it to the Key field. +func (o *ApiKey) SetKey(v string) { + o.Key.Set(&v) +} + +// SetKeyNil sets the value for Key to be an explicit nil +func (o *ApiKey) SetKeyNil() { + o.Key.Set(nil) +} + +// UnsetKey ensures that no value is present for Key, not even an explicit nil +func (o *ApiKey) UnsetKey() { + o.Key.Unset() +} + +// GetOrganization returns the Organization field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiKey) GetOrganization() string { + if o == nil || IsNil(o.Organization.Get()) { + var ret string + return ret + } + return *o.Organization.Get() +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiKey) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Organization.Get(), o.Organization.IsSet() +} + +// HasOrganization returns a boolean if a field has been set. +func (o *ApiKey) HasOrganization() bool { + if o != nil && o.Organization.IsSet() { + return true + } + + return false +} + +// SetOrganization gets a reference to the given NullableString and assigns it to the Organization field. +func (o *ApiKey) SetOrganization(v string) { + o.Organization.Set(&v) +} + +// SetOrganizationNil sets the value for Organization to be an explicit nil +func (o *ApiKey) SetOrganizationNil() { + o.Organization.Set(nil) +} + +// UnsetOrganization ensures that no value is present for Organization, not even an explicit nil +func (o *ApiKey) UnsetOrganization() { + o.Organization.Unset() +} + +// GetMaskedActualKey returns the MaskedActualKey field value if set, zero value otherwise. +func (o *ApiKey) GetMaskedActualKey() string { + if o == nil || IsNil(o.MaskedActualKey) { + var ret string + return ret + } + return *o.MaskedActualKey +} + +// GetMaskedActualKeyOk returns a tuple with the MaskedActualKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiKey) GetMaskedActualKeyOk() (*string, bool) { + if o == nil || IsNil(o.MaskedActualKey) { + return nil, false + } + return o.MaskedActualKey, true +} + +// HasMaskedActualKey returns a boolean if a field has been set. +func (o *ApiKey) HasMaskedActualKey() bool { + if o != nil && !IsNil(o.MaskedActualKey) { + return true + } + + return false +} + +// SetMaskedActualKey gets a reference to the given string and assigns it to the MaskedActualKey field. +func (o *ApiKey) SetMaskedActualKey(v string) { + o.MaskedActualKey = &v +} + +// GetConfigJson returns the ConfigJson field value if set, zero value otherwise. +func (o *ApiKey) GetConfigJson() map[string]interface{} { + if o == nil || IsNil(o.ConfigJson) { + var ret map[string]interface{} + return ret + } + return o.ConfigJson +} + +// GetConfigJsonOk returns a tuple with the ConfigJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiKey) GetConfigJsonOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConfigJson) { + return map[string]interface{}{}, false + } + return o.ConfigJson, true +} + +// HasConfigJson returns a boolean if a field has been set. +func (o *ApiKey) HasConfigJson() bool { + if o != nil && !IsNil(o.ConfigJson) { + return true + } + + return false +} + +// SetConfigJson gets a reference to the given map[string]interface{} and assigns it to the ConfigJson field. +func (o *ApiKey) SetConfigJson(v map[string]interface{}) { + o.ConfigJson = v +} + +func (o ApiKey) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiKey) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["provider"] = o.Provider + if o.Key.IsSet() { + toSerialize["key"] = o.Key.Get() + } + if o.Organization.IsSet() { + toSerialize["organization"] = o.Organization.Get() + } + if !IsNil(o.MaskedActualKey) { + toSerialize["masked_actual_key"] = o.MaskedActualKey + } + if !IsNil(o.ConfigJson) { + toSerialize["config_json"] = o.ConfigJson + } + return toSerialize, nil +} + +func (o *ApiKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "provider", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApiKey := _ApiKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApiKey) + + if err != nil { + return err + } + + *o = ApiKey(varApiKey) + + return err +} + +type NullableApiKey struct { + value *ApiKey + isSet bool +} + +func (v NullableApiKey) Get() *ApiKey { + return v.value +} + +func (v *NullableApiKey) Set(val *ApiKey) { + v.value = val + v.isSet = true +} + +func (v NullableApiKey) IsSet() bool { + return v.isSet +} + +func (v *NullableApiKey) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiKey(val *ApiKey) *NullableApiKey { + return &NullableApiKey{value: val, isSet: true} +} + +func (v NullableApiKey) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiKey) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_api_selection_too_large_detail.go b/go/futureagi/model_api_selection_too_large_detail.go new file mode 100644 index 0000000..d643e76 --- /dev/null +++ b/go/futureagi/model_api_selection_too_large_detail.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ApiSelectionTooLargeDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiSelectionTooLargeDetail{} + +// ApiSelectionTooLargeDetail struct for ApiSelectionTooLargeDetail +type ApiSelectionTooLargeDetail struct { + Type string `json:"type"` + Message string `json:"message"` + TotalMatching int32 `json:"total_matching"` + Cap int32 `json:"cap"` +} + +type _ApiSelectionTooLargeDetail ApiSelectionTooLargeDetail + +// NewApiSelectionTooLargeDetail instantiates a new ApiSelectionTooLargeDetail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiSelectionTooLargeDetail(type_ string, message string, totalMatching int32, cap int32) *ApiSelectionTooLargeDetail { + this := ApiSelectionTooLargeDetail{} + this.Type = type_ + this.Message = message + this.TotalMatching = totalMatching + this.Cap = cap + return &this +} + +// NewApiSelectionTooLargeDetailWithDefaults instantiates a new ApiSelectionTooLargeDetail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiSelectionTooLargeDetailWithDefaults() *ApiSelectionTooLargeDetail { + this := ApiSelectionTooLargeDetail{} + return &this +} + +// GetType returns the Type field value +func (o *ApiSelectionTooLargeDetail) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeDetail) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ApiSelectionTooLargeDetail) SetType(v string) { + o.Type = v +} + +// GetMessage returns the Message field value +func (o *ApiSelectionTooLargeDetail) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeDetail) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ApiSelectionTooLargeDetail) SetMessage(v string) { + o.Message = v +} + +// GetTotalMatching returns the TotalMatching field value +func (o *ApiSelectionTooLargeDetail) GetTotalMatching() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalMatching +} + +// GetTotalMatchingOk returns a tuple with the TotalMatching field value +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeDetail) GetTotalMatchingOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalMatching, true +} + +// SetTotalMatching sets field value +func (o *ApiSelectionTooLargeDetail) SetTotalMatching(v int32) { + o.TotalMatching = v +} + +// GetCap returns the Cap field value +func (o *ApiSelectionTooLargeDetail) GetCap() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Cap +} + +// GetCapOk returns a tuple with the Cap field value +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeDetail) GetCapOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Cap, true +} + +// SetCap sets field value +func (o *ApiSelectionTooLargeDetail) SetCap(v int32) { + o.Cap = v +} + +func (o ApiSelectionTooLargeDetail) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiSelectionTooLargeDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["message"] = o.Message + toSerialize["total_matching"] = o.TotalMatching + toSerialize["cap"] = o.Cap + return toSerialize, nil +} + +func (o *ApiSelectionTooLargeDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "message", + "total_matching", + "cap", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApiSelectionTooLargeDetail := _ApiSelectionTooLargeDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApiSelectionTooLargeDetail) + + if err != nil { + return err + } + + *o = ApiSelectionTooLargeDetail(varApiSelectionTooLargeDetail) + + return err +} + +type NullableApiSelectionTooLargeDetail struct { + value *ApiSelectionTooLargeDetail + isSet bool +} + +func (v NullableApiSelectionTooLargeDetail) Get() *ApiSelectionTooLargeDetail { + return v.value +} + +func (v *NullableApiSelectionTooLargeDetail) Set(val *ApiSelectionTooLargeDetail) { + v.value = val + v.isSet = true +} + +func (v NullableApiSelectionTooLargeDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableApiSelectionTooLargeDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiSelectionTooLargeDetail(val *ApiSelectionTooLargeDetail) *NullableApiSelectionTooLargeDetail { + return &NullableApiSelectionTooLargeDetail{value: val, isSet: true} +} + +func (v NullableApiSelectionTooLargeDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiSelectionTooLargeDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_api_selection_too_large_error.go b/go/futureagi/model_api_selection_too_large_error.go new file mode 100644 index 0000000..4842cde --- /dev/null +++ b/go/futureagi/model_api_selection_too_large_error.go @@ -0,0 +1,384 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ApiSelectionTooLargeError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiSelectionTooLargeError{} + +// ApiSelectionTooLargeError struct for ApiSelectionTooLargeError +type ApiSelectionTooLargeError struct { + Status *bool `json:"status,omitempty"` + Result NullableString `json:"result,omitempty"` + Type *string `json:"type,omitempty"` + Code *string `json:"code,omitempty"` + Detail *string `json:"detail,omitempty"` + Message string `json:"message"` + Error ApiSelectionTooLargeDetail `json:"error"` +} + +type _ApiSelectionTooLargeError ApiSelectionTooLargeError + +// NewApiSelectionTooLargeError instantiates a new ApiSelectionTooLargeError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiSelectionTooLargeError(message string, error_ ApiSelectionTooLargeDetail) *ApiSelectionTooLargeError { + this := ApiSelectionTooLargeError{} + var status bool = false + this.Status = &status + var code string = "selection_too_large" + this.Code = &code + this.Message = message + this.Error = error_ + return &this +} + +// NewApiSelectionTooLargeErrorWithDefaults instantiates a new ApiSelectionTooLargeError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiSelectionTooLargeErrorWithDefaults() *ApiSelectionTooLargeError { + this := ApiSelectionTooLargeError{} + var status bool = false + this.Status = &status + var code string = "selection_too_large" + this.Code = &code + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ApiSelectionTooLargeError) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeError) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ApiSelectionTooLargeError) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ApiSelectionTooLargeError) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiSelectionTooLargeError) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiSelectionTooLargeError) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ApiSelectionTooLargeError) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ApiSelectionTooLargeError) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ApiSelectionTooLargeError) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ApiSelectionTooLargeError) UnsetResult() { + o.Result.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ApiSelectionTooLargeError) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeError) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ApiSelectionTooLargeError) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ApiSelectionTooLargeError) SetType(v string) { + o.Type = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ApiSelectionTooLargeError) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeError) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ApiSelectionTooLargeError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ApiSelectionTooLargeError) SetCode(v string) { + o.Code = &v +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *ApiSelectionTooLargeError) GetDetail() string { + if o == nil || IsNil(o.Detail) { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeError) GetDetailOk() (*string, bool) { + if o == nil || IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *ApiSelectionTooLargeError) HasDetail() bool { + if o != nil && !IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *ApiSelectionTooLargeError) SetDetail(v string) { + o.Detail = &v +} + +// GetMessage returns the Message field value +func (o *ApiSelectionTooLargeError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ApiSelectionTooLargeError) SetMessage(v string) { + o.Message = v +} + +// GetError returns the Error field value +func (o *ApiSelectionTooLargeError) GetError() ApiSelectionTooLargeDetail { + if o == nil { + var ret ApiSelectionTooLargeDetail + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *ApiSelectionTooLargeError) GetErrorOk() (*ApiSelectionTooLargeDetail, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *ApiSelectionTooLargeError) SetError(v ApiSelectionTooLargeDetail) { + o.Error = v +} + +func (o ApiSelectionTooLargeError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiSelectionTooLargeError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + toSerialize["message"] = o.Message + toSerialize["error"] = o.Error + return toSerialize, nil +} + +func (o *ApiSelectionTooLargeError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApiSelectionTooLargeError := _ApiSelectionTooLargeError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApiSelectionTooLargeError) + + if err != nil { + return err + } + + *o = ApiSelectionTooLargeError(varApiSelectionTooLargeError) + + return err +} + +type NullableApiSelectionTooLargeError struct { + value *ApiSelectionTooLargeError + isSet bool +} + +func (v NullableApiSelectionTooLargeError) Get() *ApiSelectionTooLargeError { + return v.value +} + +func (v *NullableApiSelectionTooLargeError) Set(val *ApiSelectionTooLargeError) { + v.value = val + v.isSet = true +} + +func (v NullableApiSelectionTooLargeError) IsSet() bool { + return v.isSet +} + +func (v *NullableApiSelectionTooLargeError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiSelectionTooLargeError(val *ApiSelectionTooLargeError) *NullableApiSelectionTooLargeError { + return &NullableApiSelectionTooLargeError{value: val, isSet: true} +} + +func (v NullableApiSelectionTooLargeError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiSelectionTooLargeError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_api_text_error_response.go b/go/futureagi/model_api_text_error_response.go new file mode 100644 index 0000000..d9f1b6e --- /dev/null +++ b/go/futureagi/model_api_text_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ApiTextErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiTextErrorResponse{} + +// ApiTextErrorResponse struct for ApiTextErrorResponse +type ApiTextErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewApiTextErrorResponse instantiates a new ApiTextErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiTextErrorResponse() *ApiTextErrorResponse { + this := ApiTextErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewApiTextErrorResponseWithDefaults instantiates a new ApiTextErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiTextErrorResponseWithDefaults() *ApiTextErrorResponse { + this := ApiTextErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ApiTextErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiTextErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ApiTextErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiTextErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiTextErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ApiTextErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ApiTextErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ApiTextErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiTextErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiTextErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ApiTextErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ApiTextErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ApiTextErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiTextErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiTextErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ApiTextErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ApiTextErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ApiTextErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiTextErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiTextErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ApiTextErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ApiTextErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ApiTextErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiTextErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiTextErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ApiTextErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ApiTextErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ApiTextErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiTextErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiTextErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ApiTextErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ApiTextErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ApiTextErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApiTextErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApiTextErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ApiTextErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ApiTextErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ApiTextErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ApiTextErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiTextErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ApiTextErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ApiTextErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ApiTextErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiTextErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableApiTextErrorResponse struct { + value *ApiTextErrorResponse + isSet bool +} + +func (v NullableApiTextErrorResponse) Get() *ApiTextErrorResponse { + return v.value +} + +func (v *NullableApiTextErrorResponse) Set(val *ApiTextErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiTextErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiTextErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiTextErrorResponse(val *ApiTextErrorResponse) *NullableApiTextErrorResponse { + return &NullableApiTextErrorResponse{value: val, isSet: true} +} + +func (v NullableApiTextErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiTextErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_assign_items.go b/go/futureagi/model_assign_items.go new file mode 100644 index 0000000..de4a228 --- /dev/null +++ b/go/futureagi/model_assign_items.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AssignItems type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssignItems{} + +// AssignItems struct for AssignItems +type AssignItems struct { + ItemIds []string `json:"item_ids"` + UserIds []string `json:"user_ids,omitempty"` + Action *string `json:"action,omitempty"` +} + +type _AssignItems AssignItems + +// NewAssignItems instantiates a new AssignItems object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssignItems(itemIds []string) *AssignItems { + this := AssignItems{} + this.ItemIds = itemIds + var action string = "add" + this.Action = &action + return &this +} + +// NewAssignItemsWithDefaults instantiates a new AssignItems object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssignItemsWithDefaults() *AssignItems { + this := AssignItems{} + var action string = "add" + this.Action = &action + return &this +} + +// GetItemIds returns the ItemIds field value +func (o *AssignItems) GetItemIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ItemIds +} + +// GetItemIdsOk returns a tuple with the ItemIds field value +// and a boolean to check if the value has been set. +func (o *AssignItems) GetItemIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ItemIds, true +} + +// SetItemIds sets field value +func (o *AssignItems) SetItemIds(v []string) { + o.ItemIds = v +} + +// GetUserIds returns the UserIds field value if set, zero value otherwise. +func (o *AssignItems) GetUserIds() []string { + if o == nil || IsNil(o.UserIds) { + var ret []string + return ret + } + return o.UserIds +} + +// GetUserIdsOk returns a tuple with the UserIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssignItems) GetUserIdsOk() ([]string, bool) { + if o == nil || IsNil(o.UserIds) { + return nil, false + } + return o.UserIds, true +} + +// HasUserIds returns a boolean if a field has been set. +func (o *AssignItems) HasUserIds() bool { + if o != nil && !IsNil(o.UserIds) { + return true + } + + return false +} + +// SetUserIds gets a reference to the given []string and assigns it to the UserIds field. +func (o *AssignItems) SetUserIds(v []string) { + o.UserIds = v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *AssignItems) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssignItems) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *AssignItems) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *AssignItems) SetAction(v string) { + o.Action = &v +} + +func (o AssignItems) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssignItems) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["item_ids"] = o.ItemIds + if !IsNil(o.UserIds) { + toSerialize["user_ids"] = o.UserIds + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + return toSerialize, nil +} + +func (o *AssignItems) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "item_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAssignItems := _AssignItems{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAssignItems) + + if err != nil { + return err + } + + *o = AssignItems(varAssignItems) + + return err +} + +type NullableAssignItems struct { + value *AssignItems + isSet bool +} + +func (v NullableAssignItems) Get() *AssignItems { + return v.value +} + +func (v *NullableAssignItems) Set(val *AssignItems) { + v.value = val + v.isSet = true +} + +func (v NullableAssignItems) IsSet() bool { + return v.isSet +} + +func (v *NullableAssignItems) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssignItems(val *AssignItems) *NullableAssignItems { + return &NullableAssignItems{value: val, isSet: true} +} + +func (v NullableAssignItems) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssignItems) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule.go b/go/futureagi/model_automation_rule.go new file mode 100644 index 0000000..491613d --- /dev/null +++ b/go/futureagi/model_automation_rule.go @@ -0,0 +1,604 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the AutomationRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRule{} + +// AutomationRule struct for AutomationRule +type AutomationRule struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Queue *string `json:"queue,omitempty"` + SourceType string `json:"source_type"` + Conditions *AutomationRuleConditions `json:"conditions,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + TriggerFrequency *string `json:"trigger_frequency,omitempty"` + Organization *string `json:"organization,omitempty"` + CreatedBy NullableString `json:"created_by,omitempty"` + CreatedByName *string `json:"created_by_name,omitempty"` + LastTriggeredAt NullableTime `json:"last_triggered_at,omitempty"` + TriggerCount *int32 `json:"trigger_count,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +type _AutomationRule AutomationRule + +// NewAutomationRule instantiates a new AutomationRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRule(name string, sourceType string) *AutomationRule { + this := AutomationRule{} + this.Name = name + this.SourceType = sourceType + return &this +} + +// NewAutomationRuleWithDefaults instantiates a new AutomationRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleWithDefaults() *AutomationRule { + this := AutomationRule{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AutomationRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AutomationRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AutomationRule) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *AutomationRule) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AutomationRule) SetName(v string) { + o.Name = v +} + +// GetQueue returns the Queue field value if set, zero value otherwise. +func (o *AutomationRule) GetQueue() string { + if o == nil || IsNil(o.Queue) { + var ret string + return ret + } + return *o.Queue +} + +// GetQueueOk returns a tuple with the Queue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetQueueOk() (*string, bool) { + if o == nil || IsNil(o.Queue) { + return nil, false + } + return o.Queue, true +} + +// HasQueue returns a boolean if a field has been set. +func (o *AutomationRule) HasQueue() bool { + if o != nil && !IsNil(o.Queue) { + return true + } + + return false +} + +// SetQueue gets a reference to the given string and assigns it to the Queue field. +func (o *AutomationRule) SetQueue(v string) { + o.Queue = &v +} + +// GetSourceType returns the SourceType field value +func (o *AutomationRule) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *AutomationRule) SetSourceType(v string) { + o.SourceType = v +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *AutomationRule) GetConditions() AutomationRuleConditions { + if o == nil || IsNil(o.Conditions) { + var ret AutomationRuleConditions + return ret + } + return *o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetConditionsOk() (*AutomationRuleConditions, bool) { + if o == nil || IsNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *AutomationRule) HasConditions() bool { + if o != nil && !IsNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given AutomationRuleConditions and assigns it to the Conditions field. +func (o *AutomationRule) SetConditions(v AutomationRuleConditions) { + o.Conditions = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *AutomationRule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *AutomationRule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *AutomationRule) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetTriggerFrequency returns the TriggerFrequency field value if set, zero value otherwise. +func (o *AutomationRule) GetTriggerFrequency() string { + if o == nil || IsNil(o.TriggerFrequency) { + var ret string + return ret + } + return *o.TriggerFrequency +} + +// GetTriggerFrequencyOk returns a tuple with the TriggerFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetTriggerFrequencyOk() (*string, bool) { + if o == nil || IsNil(o.TriggerFrequency) { + return nil, false + } + return o.TriggerFrequency, true +} + +// HasTriggerFrequency returns a boolean if a field has been set. +func (o *AutomationRule) HasTriggerFrequency() bool { + if o != nil && !IsNil(o.TriggerFrequency) { + return true + } + + return false +} + +// SetTriggerFrequency gets a reference to the given string and assigns it to the TriggerFrequency field. +func (o *AutomationRule) SetTriggerFrequency(v string) { + o.TriggerFrequency = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *AutomationRule) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *AutomationRule) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *AutomationRule) SetOrganization(v string) { + o.Organization = &v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AutomationRule) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AutomationRule) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *AutomationRule) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *AutomationRule) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *AutomationRule) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *AutomationRule) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +// GetCreatedByName returns the CreatedByName field value if set, zero value otherwise. +func (o *AutomationRule) GetCreatedByName() string { + if o == nil || IsNil(o.CreatedByName) { + var ret string + return ret + } + return *o.CreatedByName +} + +// GetCreatedByNameOk returns a tuple with the CreatedByName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetCreatedByNameOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByName) { + return nil, false + } + return o.CreatedByName, true +} + +// HasCreatedByName returns a boolean if a field has been set. +func (o *AutomationRule) HasCreatedByName() bool { + if o != nil && !IsNil(o.CreatedByName) { + return true + } + + return false +} + +// SetCreatedByName gets a reference to the given string and assigns it to the CreatedByName field. +func (o *AutomationRule) SetCreatedByName(v string) { + o.CreatedByName = &v +} + +// GetLastTriggeredAt returns the LastTriggeredAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AutomationRule) GetLastTriggeredAt() time.Time { + if o == nil || IsNil(o.LastTriggeredAt.Get()) { + var ret time.Time + return ret + } + return *o.LastTriggeredAt.Get() +} + +// GetLastTriggeredAtOk returns a tuple with the LastTriggeredAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AutomationRule) GetLastTriggeredAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastTriggeredAt.Get(), o.LastTriggeredAt.IsSet() +} + +// HasLastTriggeredAt returns a boolean if a field has been set. +func (o *AutomationRule) HasLastTriggeredAt() bool { + if o != nil && o.LastTriggeredAt.IsSet() { + return true + } + + return false +} + +// SetLastTriggeredAt gets a reference to the given NullableTime and assigns it to the LastTriggeredAt field. +func (o *AutomationRule) SetLastTriggeredAt(v time.Time) { + o.LastTriggeredAt.Set(&v) +} + +// SetLastTriggeredAtNil sets the value for LastTriggeredAt to be an explicit nil +func (o *AutomationRule) SetLastTriggeredAtNil() { + o.LastTriggeredAt.Set(nil) +} + +// UnsetLastTriggeredAt ensures that no value is present for LastTriggeredAt, not even an explicit nil +func (o *AutomationRule) UnsetLastTriggeredAt() { + o.LastTriggeredAt.Unset() +} + +// GetTriggerCount returns the TriggerCount field value if set, zero value otherwise. +func (o *AutomationRule) GetTriggerCount() int32 { + if o == nil || IsNil(o.TriggerCount) { + var ret int32 + return ret + } + return *o.TriggerCount +} + +// GetTriggerCountOk returns a tuple with the TriggerCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetTriggerCountOk() (*int32, bool) { + if o == nil || IsNil(o.TriggerCount) { + return nil, false + } + return o.TriggerCount, true +} + +// HasTriggerCount returns a boolean if a field has been set. +func (o *AutomationRule) HasTriggerCount() bool { + if o != nil && !IsNil(o.TriggerCount) { + return true + } + + return false +} + +// SetTriggerCount gets a reference to the given int32 and assigns it to the TriggerCount field. +func (o *AutomationRule) SetTriggerCount(v int32) { + o.TriggerCount = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AutomationRule) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRule) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AutomationRule) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AutomationRule) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o AutomationRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if !IsNil(o.Queue) { + toSerialize["queue"] = o.Queue + } + toSerialize["source_type"] = o.SourceType + if !IsNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.TriggerFrequency) { + toSerialize["trigger_frequency"] = o.TriggerFrequency + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if o.CreatedBy.IsSet() { + toSerialize["created_by"] = o.CreatedBy.Get() + } + if !IsNil(o.CreatedByName) { + toSerialize["created_by_name"] = o.CreatedByName + } + if o.LastTriggeredAt.IsSet() { + toSerialize["last_triggered_at"] = o.LastTriggeredAt.Get() + } + if !IsNil(o.TriggerCount) { + toSerialize["trigger_count"] = o.TriggerCount + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *AutomationRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "source_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAutomationRule := _AutomationRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAutomationRule) + + if err != nil { + return err + } + + *o = AutomationRule(varAutomationRule) + + return err +} + +type NullableAutomationRule struct { + value *AutomationRule + isSet bool +} + +func (v NullableAutomationRule) Get() *AutomationRule { + return v.value +} + +func (v *NullableAutomationRule) Set(val *AutomationRule) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRule) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRule(val *AutomationRule) *NullableAutomationRule { + return &NullableAutomationRule{value: val, isSet: true} +} + +func (v NullableAutomationRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule_conditions.go b/go/futureagi/model_automation_rule_conditions.go new file mode 100644 index 0000000..d5e7133 --- /dev/null +++ b/go/futureagi/model_automation_rule_conditions.go @@ -0,0 +1,237 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AutomationRuleConditions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRuleConditions{} + +// AutomationRuleConditions struct for AutomationRuleConditions +type AutomationRuleConditions struct { + Operator *string `json:"operator,omitempty"` + Filter []AutomationRuleConditionsFilterInner `json:"filter,omitempty"` + Scope *AutomationRuleScope `json:"scope,omitempty"` + Rules []RulesInner `json:"rules,omitempty"` +} + +// NewAutomationRuleConditions instantiates a new AutomationRuleConditions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRuleConditions() *AutomationRuleConditions { + this := AutomationRuleConditions{} + var operator string = "and" + this.Operator = &operator + return &this +} + +// NewAutomationRuleConditionsWithDefaults instantiates a new AutomationRuleConditions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleConditionsWithDefaults() *AutomationRuleConditions { + this := AutomationRuleConditions{} + var operator string = "and" + this.Operator = &operator + return &this +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *AutomationRuleConditions) GetOperator() string { + if o == nil || IsNil(o.Operator) { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditions) GetOperatorOk() (*string, bool) { + if o == nil || IsNil(o.Operator) { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *AutomationRuleConditions) HasOperator() bool { + if o != nil && !IsNil(o.Operator) { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *AutomationRuleConditions) SetOperator(v string) { + o.Operator = &v +} + +// GetFilter returns the Filter field value if set, zero value otherwise. +func (o *AutomationRuleConditions) GetFilter() []AutomationRuleConditionsFilterInner { + if o == nil || IsNil(o.Filter) { + var ret []AutomationRuleConditionsFilterInner + return ret + } + return o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditions) GetFilterOk() ([]AutomationRuleConditionsFilterInner, bool) { + if o == nil || IsNil(o.Filter) { + return nil, false + } + return o.Filter, true +} + +// HasFilter returns a boolean if a field has been set. +func (o *AutomationRuleConditions) HasFilter() bool { + if o != nil && !IsNil(o.Filter) { + return true + } + + return false +} + +// SetFilter gets a reference to the given []AutomationRuleConditionsFilterInner and assigns it to the Filter field. +func (o *AutomationRuleConditions) SetFilter(v []AutomationRuleConditionsFilterInner) { + o.Filter = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *AutomationRuleConditions) GetScope() AutomationRuleScope { + if o == nil || IsNil(o.Scope) { + var ret AutomationRuleScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditions) GetScopeOk() (*AutomationRuleScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *AutomationRuleConditions) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given AutomationRuleScope and assigns it to the Scope field. +func (o *AutomationRuleConditions) SetScope(v AutomationRuleScope) { + o.Scope = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *AutomationRuleConditions) GetRules() []RulesInner { + if o == nil || IsNil(o.Rules) { + var ret []RulesInner + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditions) GetRulesOk() ([]RulesInner, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *AutomationRuleConditions) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []RulesInner and assigns it to the Rules field. +func (o *AutomationRuleConditions) SetRules(v []RulesInner) { + o.Rules = v +} + +func (o AutomationRuleConditions) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRuleConditions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Operator) { + toSerialize["operator"] = o.Operator + } + if !IsNil(o.Filter) { + toSerialize["filter"] = o.Filter + } + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + return toSerialize, nil +} + +type NullableAutomationRuleConditions struct { + value *AutomationRuleConditions + isSet bool +} + +func (v NullableAutomationRuleConditions) Get() *AutomationRuleConditions { + return v.value +} + +func (v *NullableAutomationRuleConditions) Set(val *AutomationRuleConditions) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRuleConditions) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRuleConditions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRuleConditions(val *AutomationRuleConditions) *NullableAutomationRuleConditions { + return &NullableAutomationRuleConditions{value: val, isSet: true} +} + +func (v NullableAutomationRuleConditions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRuleConditions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule_conditions_filter_inner.go b/go/futureagi/model_automation_rule_conditions_filter_inner.go new file mode 100644 index 0000000..a1f77d1 --- /dev/null +++ b/go/futureagi/model_automation_rule_conditions_filter_inner.go @@ -0,0 +1,297 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AutomationRuleConditionsFilterInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRuleConditionsFilterInner{} + +// AutomationRuleConditionsFilterInner struct for AutomationRuleConditionsFilterInner +type AutomationRuleConditionsFilterInner struct { + // Column or attribute id to filter on. + ColumnId string `json:"column_id"` + // Optional UI label for chips and saved views. + DisplayName *string `json:"display_name,omitempty"` + // Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + Source *string `json:"source,omitempty"` + // Optional metric output type metadata used by eval and annotation filters. + OutputType *string `json:"output_type,omitempty"` + FilterConfig AutomationRuleConditionsFilterInnerFilterConfig `json:"filter_config"` +} + +type _AutomationRuleConditionsFilterInner AutomationRuleConditionsFilterInner + +// NewAutomationRuleConditionsFilterInner instantiates a new AutomationRuleConditionsFilterInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRuleConditionsFilterInner(columnId string, filterConfig AutomationRuleConditionsFilterInnerFilterConfig) *AutomationRuleConditionsFilterInner { + this := AutomationRuleConditionsFilterInner{} + this.ColumnId = columnId + this.FilterConfig = filterConfig + return &this +} + +// NewAutomationRuleConditionsFilterInnerWithDefaults instantiates a new AutomationRuleConditionsFilterInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleConditionsFilterInnerWithDefaults() *AutomationRuleConditionsFilterInner { + this := AutomationRuleConditionsFilterInner{} + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *AutomationRuleConditionsFilterInner) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInner) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *AutomationRuleConditionsFilterInner) SetColumnId(v string) { + o.ColumnId = v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *AutomationRuleConditionsFilterInner) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInner) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *AutomationRuleConditionsFilterInner) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *AutomationRuleConditionsFilterInner) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *AutomationRuleConditionsFilterInner) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInner) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *AutomationRuleConditionsFilterInner) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *AutomationRuleConditionsFilterInner) SetSource(v string) { + o.Source = &v +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise. +func (o *AutomationRuleConditionsFilterInner) GetOutputType() string { + if o == nil || IsNil(o.OutputType) { + var ret string + return ret + } + return *o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInner) GetOutputTypeOk() (*string, bool) { + if o == nil || IsNil(o.OutputType) { + return nil, false + } + return o.OutputType, true +} + +// HasOutputType returns a boolean if a field has been set. +func (o *AutomationRuleConditionsFilterInner) HasOutputType() bool { + if o != nil && !IsNil(o.OutputType) { + return true + } + + return false +} + +// SetOutputType gets a reference to the given string and assigns it to the OutputType field. +func (o *AutomationRuleConditionsFilterInner) SetOutputType(v string) { + o.OutputType = &v +} + +// GetFilterConfig returns the FilterConfig field value +func (o *AutomationRuleConditionsFilterInner) GetFilterConfig() AutomationRuleConditionsFilterInnerFilterConfig { + if o == nil { + var ret AutomationRuleConditionsFilterInnerFilterConfig + return ret + } + + return o.FilterConfig +} + +// GetFilterConfigOk returns a tuple with the FilterConfig field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInner) GetFilterConfigOk() (*AutomationRuleConditionsFilterInnerFilterConfig, bool) { + if o == nil { + return nil, false + } + return &o.FilterConfig, true +} + +// SetFilterConfig sets field value +func (o *AutomationRuleConditionsFilterInner) SetFilterConfig(v AutomationRuleConditionsFilterInnerFilterConfig) { + o.FilterConfig = v +} + +func (o AutomationRuleConditionsFilterInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRuleConditionsFilterInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + if !IsNil(o.DisplayName) { + toSerialize["display_name"] = o.DisplayName + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.OutputType) { + toSerialize["output_type"] = o.OutputType + } + toSerialize["filter_config"] = o.FilterConfig + return toSerialize, nil +} + +func (o *AutomationRuleConditionsFilterInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + "filter_config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAutomationRuleConditionsFilterInner := _AutomationRuleConditionsFilterInner{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAutomationRuleConditionsFilterInner) + + if err != nil { + return err + } + + *o = AutomationRuleConditionsFilterInner(varAutomationRuleConditionsFilterInner) + + return err +} + +type NullableAutomationRuleConditionsFilterInner struct { + value *AutomationRuleConditionsFilterInner + isSet bool +} + +func (v NullableAutomationRuleConditionsFilterInner) Get() *AutomationRuleConditionsFilterInner { + return v.value +} + +func (v *NullableAutomationRuleConditionsFilterInner) Set(val *AutomationRuleConditionsFilterInner) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRuleConditionsFilterInner) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRuleConditionsFilterInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRuleConditionsFilterInner(val *AutomationRuleConditionsFilterInner) *NullableAutomationRuleConditionsFilterInner { + return &NullableAutomationRuleConditionsFilterInner{value: val, isSet: true} +} + +func (v NullableAutomationRuleConditionsFilterInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRuleConditionsFilterInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule_conditions_filter_inner_filter_config.go b/go/futureagi/model_automation_rule_conditions_filter_inner_filter_config.go new file mode 100644 index 0000000..75d586b --- /dev/null +++ b/go/futureagi/model_automation_rule_conditions_filter_inner_filter_config.go @@ -0,0 +1,262 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AutomationRuleConditionsFilterInnerFilterConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRuleConditionsFilterInnerFilterConfig{} + +// AutomationRuleConditionsFilterInnerFilterConfig struct for AutomationRuleConditionsFilterInnerFilterConfig +type AutomationRuleConditionsFilterInnerFilterConfig struct { + // Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + FilterType string `json:"filter_type"` + // Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + FilterOp string `json:"filter_op"` + // Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + FilterValue interface{} `json:"filter_value,omitempty"` + // Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + ColType *string `json:"col_type,omitempty"` +} + +type _AutomationRuleConditionsFilterInnerFilterConfig AutomationRuleConditionsFilterInnerFilterConfig + +// NewAutomationRuleConditionsFilterInnerFilterConfig instantiates a new AutomationRuleConditionsFilterInnerFilterConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRuleConditionsFilterInnerFilterConfig(filterType string, filterOp string) *AutomationRuleConditionsFilterInnerFilterConfig { + this := AutomationRuleConditionsFilterInnerFilterConfig{} + this.FilterType = filterType + this.FilterOp = filterOp + return &this +} + +// NewAutomationRuleConditionsFilterInnerFilterConfigWithDefaults instantiates a new AutomationRuleConditionsFilterInnerFilterConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleConditionsFilterInnerFilterConfigWithDefaults() *AutomationRuleConditionsFilterInnerFilterConfig { + this := AutomationRuleConditionsFilterInnerFilterConfig{} + return &this +} + +// GetFilterType returns the FilterType field value +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetFilterType() string { + if o == nil { + var ret string + return ret + } + + return o.FilterType +} + +// GetFilterTypeOk returns a tuple with the FilterType field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetFilterTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FilterType, true +} + +// SetFilterType sets field value +func (o *AutomationRuleConditionsFilterInnerFilterConfig) SetFilterType(v string) { + o.FilterType = v +} + +// GetFilterOp returns the FilterOp field value +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetFilterOp() string { + if o == nil { + var ret string + return ret + } + + return o.FilterOp +} + +// GetFilterOpOk returns a tuple with the FilterOp field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetFilterOpOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FilterOp, true +} + +// SetFilterOp sets field value +func (o *AutomationRuleConditionsFilterInnerFilterConfig) SetFilterOp(v string) { + o.FilterOp = v +} + +// GetFilterValue returns the FilterValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetFilterValue() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.FilterValue +} + +// GetFilterValueOk returns a tuple with the FilterValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetFilterValueOk() (*interface{}, bool) { + if o == nil || IsNil(o.FilterValue) { + return nil, false + } + return &o.FilterValue, true +} + +// HasFilterValue returns a boolean if a field has been set. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) HasFilterValue() bool { + if o != nil && !IsNil(o.FilterValue) { + return true + } + + return false +} + +// SetFilterValue gets a reference to the given interface{} and assigns it to the FilterValue field. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) SetFilterValue(v interface{}) { + o.FilterValue = v +} + +// GetColType returns the ColType field value if set, zero value otherwise. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetColType() string { + if o == nil || IsNil(o.ColType) { + var ret string + return ret + } + return *o.ColType +} + +// GetColTypeOk returns a tuple with the ColType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) GetColTypeOk() (*string, bool) { + if o == nil || IsNil(o.ColType) { + return nil, false + } + return o.ColType, true +} + +// HasColType returns a boolean if a field has been set. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) HasColType() bool { + if o != nil && !IsNil(o.ColType) { + return true + } + + return false +} + +// SetColType gets a reference to the given string and assigns it to the ColType field. +func (o *AutomationRuleConditionsFilterInnerFilterConfig) SetColType(v string) { + o.ColType = &v +} + +func (o AutomationRuleConditionsFilterInnerFilterConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRuleConditionsFilterInnerFilterConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["filter_type"] = o.FilterType + toSerialize["filter_op"] = o.FilterOp + if o.FilterValue != nil { + toSerialize["filter_value"] = o.FilterValue + } + if !IsNil(o.ColType) { + toSerialize["col_type"] = o.ColType + } + return toSerialize, nil +} + +func (o *AutomationRuleConditionsFilterInnerFilterConfig) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "filter_type", + "filter_op", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAutomationRuleConditionsFilterInnerFilterConfig := _AutomationRuleConditionsFilterInnerFilterConfig{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAutomationRuleConditionsFilterInnerFilterConfig) + + if err != nil { + return err + } + + *o = AutomationRuleConditionsFilterInnerFilterConfig(varAutomationRuleConditionsFilterInnerFilterConfig) + + return err +} + +type NullableAutomationRuleConditionsFilterInnerFilterConfig struct { + value *AutomationRuleConditionsFilterInnerFilterConfig + isSet bool +} + +func (v NullableAutomationRuleConditionsFilterInnerFilterConfig) Get() *AutomationRuleConditionsFilterInnerFilterConfig { + return v.value +} + +func (v *NullableAutomationRuleConditionsFilterInnerFilterConfig) Set(val *AutomationRuleConditionsFilterInnerFilterConfig) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRuleConditionsFilterInnerFilterConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRuleConditionsFilterInnerFilterConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRuleConditionsFilterInnerFilterConfig(val *AutomationRuleConditionsFilterInnerFilterConfig) *NullableAutomationRuleConditionsFilterInnerFilterConfig { + return &NullableAutomationRuleConditionsFilterInnerFilterConfig{value: val, isSet: true} +} + +func (v NullableAutomationRuleConditionsFilterInnerFilterConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRuleConditionsFilterInnerFilterConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule_evaluate_accepted_response.go b/go/futureagi/model_automation_rule_evaluate_accepted_response.go new file mode 100644 index 0000000..93088fa --- /dev/null +++ b/go/futureagi/model_automation_rule_evaluate_accepted_response.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AutomationRuleEvaluateAcceptedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRuleEvaluateAcceptedResponse{} + +// AutomationRuleEvaluateAcceptedResponse struct for AutomationRuleEvaluateAcceptedResponse +type AutomationRuleEvaluateAcceptedResponse struct { + Status string `json:"status"` + WorkflowId string `json:"workflow_id"` + Message string `json:"message"` +} + +type _AutomationRuleEvaluateAcceptedResponse AutomationRuleEvaluateAcceptedResponse + +// NewAutomationRuleEvaluateAcceptedResponse instantiates a new AutomationRuleEvaluateAcceptedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRuleEvaluateAcceptedResponse(status string, workflowId string, message string) *AutomationRuleEvaluateAcceptedResponse { + this := AutomationRuleEvaluateAcceptedResponse{} + this.Status = status + this.WorkflowId = workflowId + this.Message = message + return &this +} + +// NewAutomationRuleEvaluateAcceptedResponseWithDefaults instantiates a new AutomationRuleEvaluateAcceptedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleEvaluateAcceptedResponseWithDefaults() *AutomationRuleEvaluateAcceptedResponse { + this := AutomationRuleEvaluateAcceptedResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *AutomationRuleEvaluateAcceptedResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateAcceptedResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *AutomationRuleEvaluateAcceptedResponse) SetStatus(v string) { + o.Status = v +} + +// GetWorkflowId returns the WorkflowId field value +func (o *AutomationRuleEvaluateAcceptedResponse) GetWorkflowId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkflowId +} + +// GetWorkflowIdOk returns a tuple with the WorkflowId field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateAcceptedResponse) GetWorkflowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkflowId, true +} + +// SetWorkflowId sets field value +func (o *AutomationRuleEvaluateAcceptedResponse) SetWorkflowId(v string) { + o.WorkflowId = v +} + +// GetMessage returns the Message field value +func (o *AutomationRuleEvaluateAcceptedResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateAcceptedResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *AutomationRuleEvaluateAcceptedResponse) SetMessage(v string) { + o.Message = v +} + +func (o AutomationRuleEvaluateAcceptedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRuleEvaluateAcceptedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["workflow_id"] = o.WorkflowId + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *AutomationRuleEvaluateAcceptedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "workflow_id", + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAutomationRuleEvaluateAcceptedResponse := _AutomationRuleEvaluateAcceptedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAutomationRuleEvaluateAcceptedResponse) + + if err != nil { + return err + } + + *o = AutomationRuleEvaluateAcceptedResponse(varAutomationRuleEvaluateAcceptedResponse) + + return err +} + +type NullableAutomationRuleEvaluateAcceptedResponse struct { + value *AutomationRuleEvaluateAcceptedResponse + isSet bool +} + +func (v NullableAutomationRuleEvaluateAcceptedResponse) Get() *AutomationRuleEvaluateAcceptedResponse { + return v.value +} + +func (v *NullableAutomationRuleEvaluateAcceptedResponse) Set(val *AutomationRuleEvaluateAcceptedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRuleEvaluateAcceptedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRuleEvaluateAcceptedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRuleEvaluateAcceptedResponse(val *AutomationRuleEvaluateAcceptedResponse) *NullableAutomationRuleEvaluateAcceptedResponse { + return &NullableAutomationRuleEvaluateAcceptedResponse{value: val, isSet: true} +} + +func (v NullableAutomationRuleEvaluateAcceptedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRuleEvaluateAcceptedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule_evaluate_response.go b/go/futureagi/model_automation_rule_evaluate_response.go new file mode 100644 index 0000000..e474232 --- /dev/null +++ b/go/futureagi/model_automation_rule_evaluate_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AutomationRuleEvaluateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRuleEvaluateResponse{} + +// AutomationRuleEvaluateResponse struct for AutomationRuleEvaluateResponse +type AutomationRuleEvaluateResponse struct { + Status *bool `json:"status,omitempty"` + Result AutomationRuleEvaluateResult `json:"result"` +} + +type _AutomationRuleEvaluateResponse AutomationRuleEvaluateResponse + +// NewAutomationRuleEvaluateResponse instantiates a new AutomationRuleEvaluateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRuleEvaluateResponse(result AutomationRuleEvaluateResult) *AutomationRuleEvaluateResponse { + this := AutomationRuleEvaluateResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewAutomationRuleEvaluateResponseWithDefaults instantiates a new AutomationRuleEvaluateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleEvaluateResponseWithDefaults() *AutomationRuleEvaluateResponse { + this := AutomationRuleEvaluateResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AutomationRuleEvaluateResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AutomationRuleEvaluateResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *AutomationRuleEvaluateResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *AutomationRuleEvaluateResponse) GetResult() AutomationRuleEvaluateResult { + if o == nil { + var ret AutomationRuleEvaluateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateResponse) GetResultOk() (*AutomationRuleEvaluateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *AutomationRuleEvaluateResponse) SetResult(v AutomationRuleEvaluateResult) { + o.Result = v +} + +func (o AutomationRuleEvaluateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRuleEvaluateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *AutomationRuleEvaluateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAutomationRuleEvaluateResponse := _AutomationRuleEvaluateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAutomationRuleEvaluateResponse) + + if err != nil { + return err + } + + *o = AutomationRuleEvaluateResponse(varAutomationRuleEvaluateResponse) + + return err +} + +type NullableAutomationRuleEvaluateResponse struct { + value *AutomationRuleEvaluateResponse + isSet bool +} + +func (v NullableAutomationRuleEvaluateResponse) Get() *AutomationRuleEvaluateResponse { + return v.value +} + +func (v *NullableAutomationRuleEvaluateResponse) Set(val *AutomationRuleEvaluateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRuleEvaluateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRuleEvaluateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRuleEvaluateResponse(val *AutomationRuleEvaluateResponse) *NullableAutomationRuleEvaluateResponse { + return &NullableAutomationRuleEvaluateResponse{value: val, isSet: true} +} + +func (v NullableAutomationRuleEvaluateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRuleEvaluateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule_evaluate_result.go b/go/futureagi/model_automation_rule_evaluate_result.go new file mode 100644 index 0000000..9510b81 --- /dev/null +++ b/go/futureagi/model_automation_rule_evaluate_result.go @@ -0,0 +1,285 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AutomationRuleEvaluateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRuleEvaluateResult{} + +// AutomationRuleEvaluateResult struct for AutomationRuleEvaluateResult +type AutomationRuleEvaluateResult struct { + Matched int32 `json:"matched"` + Added int32 `json:"added"` + Duplicates int32 `json:"duplicates"` + Truncated *bool `json:"truncated,omitempty"` + Error *string `json:"error,omitempty"` +} + +type _AutomationRuleEvaluateResult AutomationRuleEvaluateResult + +// NewAutomationRuleEvaluateResult instantiates a new AutomationRuleEvaluateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRuleEvaluateResult(matched int32, added int32, duplicates int32) *AutomationRuleEvaluateResult { + this := AutomationRuleEvaluateResult{} + this.Matched = matched + this.Added = added + this.Duplicates = duplicates + return &this +} + +// NewAutomationRuleEvaluateResultWithDefaults instantiates a new AutomationRuleEvaluateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleEvaluateResultWithDefaults() *AutomationRuleEvaluateResult { + this := AutomationRuleEvaluateResult{} + return &this +} + +// GetMatched returns the Matched field value +func (o *AutomationRuleEvaluateResult) GetMatched() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Matched +} + +// GetMatchedOk returns a tuple with the Matched field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateResult) GetMatchedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Matched, true +} + +// SetMatched sets field value +func (o *AutomationRuleEvaluateResult) SetMatched(v int32) { + o.Matched = v +} + +// GetAdded returns the Added field value +func (o *AutomationRuleEvaluateResult) GetAdded() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Added +} + +// GetAddedOk returns a tuple with the Added field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateResult) GetAddedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Added, true +} + +// SetAdded sets field value +func (o *AutomationRuleEvaluateResult) SetAdded(v int32) { + o.Added = v +} + +// GetDuplicates returns the Duplicates field value +func (o *AutomationRuleEvaluateResult) GetDuplicates() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Duplicates +} + +// GetDuplicatesOk returns a tuple with the Duplicates field value +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateResult) GetDuplicatesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Duplicates, true +} + +// SetDuplicates sets field value +func (o *AutomationRuleEvaluateResult) SetDuplicates(v int32) { + o.Duplicates = v +} + +// GetTruncated returns the Truncated field value if set, zero value otherwise. +func (o *AutomationRuleEvaluateResult) GetTruncated() bool { + if o == nil || IsNil(o.Truncated) { + var ret bool + return ret + } + return *o.Truncated +} + +// GetTruncatedOk returns a tuple with the Truncated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateResult) GetTruncatedOk() (*bool, bool) { + if o == nil || IsNil(o.Truncated) { + return nil, false + } + return o.Truncated, true +} + +// HasTruncated returns a boolean if a field has been set. +func (o *AutomationRuleEvaluateResult) HasTruncated() bool { + if o != nil && !IsNil(o.Truncated) { + return true + } + + return false +} + +// SetTruncated gets a reference to the given bool and assigns it to the Truncated field. +func (o *AutomationRuleEvaluateResult) SetTruncated(v bool) { + o.Truncated = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *AutomationRuleEvaluateResult) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleEvaluateResult) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *AutomationRuleEvaluateResult) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *AutomationRuleEvaluateResult) SetError(v string) { + o.Error = &v +} + +func (o AutomationRuleEvaluateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRuleEvaluateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["matched"] = o.Matched + toSerialize["added"] = o.Added + toSerialize["duplicates"] = o.Duplicates + if !IsNil(o.Truncated) { + toSerialize["truncated"] = o.Truncated + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + return toSerialize, nil +} + +func (o *AutomationRuleEvaluateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "matched", + "added", + "duplicates", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAutomationRuleEvaluateResult := _AutomationRuleEvaluateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAutomationRuleEvaluateResult) + + if err != nil { + return err + } + + *o = AutomationRuleEvaluateResult(varAutomationRuleEvaluateResult) + + return err +} + +type NullableAutomationRuleEvaluateResult struct { + value *AutomationRuleEvaluateResult + isSet bool +} + +func (v NullableAutomationRuleEvaluateResult) Get() *AutomationRuleEvaluateResult { + return v.value +} + +func (v *NullableAutomationRuleEvaluateResult) Set(val *AutomationRuleEvaluateResult) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRuleEvaluateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRuleEvaluateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRuleEvaluateResult(val *AutomationRuleEvaluateResult) *NullableAutomationRuleEvaluateResult { + return &NullableAutomationRuleEvaluateResult{value: val, isSet: true} +} + +func (v NullableAutomationRuleEvaluateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRuleEvaluateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_automation_rule_scope.go b/go/futureagi/model_automation_rule_scope.go new file mode 100644 index 0000000..aef4d1e --- /dev/null +++ b/go/futureagi/model_automation_rule_scope.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the AutomationRuleScope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AutomationRuleScope{} + +// AutomationRuleScope struct for AutomationRuleScope +type AutomationRuleScope struct { + DatasetId *string `json:"dataset_id,omitempty"` + ProjectId *string `json:"project_id,omitempty"` + IsVoiceCall *bool `json:"is_voice_call,omitempty"` + RemoveSimulationCalls *bool `json:"remove_simulation_calls,omitempty"` +} + +// NewAutomationRuleScope instantiates a new AutomationRuleScope object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAutomationRuleScope() *AutomationRuleScope { + this := AutomationRuleScope{} + return &this +} + +// NewAutomationRuleScopeWithDefaults instantiates a new AutomationRuleScope object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAutomationRuleScopeWithDefaults() *AutomationRuleScope { + this := AutomationRuleScope{} + return &this +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *AutomationRuleScope) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleScope) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *AutomationRuleScope) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *AutomationRuleScope) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *AutomationRuleScope) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleScope) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *AutomationRuleScope) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *AutomationRuleScope) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetIsVoiceCall returns the IsVoiceCall field value if set, zero value otherwise. +func (o *AutomationRuleScope) GetIsVoiceCall() bool { + if o == nil || IsNil(o.IsVoiceCall) { + var ret bool + return ret + } + return *o.IsVoiceCall +} + +// GetIsVoiceCallOk returns a tuple with the IsVoiceCall field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleScope) GetIsVoiceCallOk() (*bool, bool) { + if o == nil || IsNil(o.IsVoiceCall) { + return nil, false + } + return o.IsVoiceCall, true +} + +// HasIsVoiceCall returns a boolean if a field has been set. +func (o *AutomationRuleScope) HasIsVoiceCall() bool { + if o != nil && !IsNil(o.IsVoiceCall) { + return true + } + + return false +} + +// SetIsVoiceCall gets a reference to the given bool and assigns it to the IsVoiceCall field. +func (o *AutomationRuleScope) SetIsVoiceCall(v bool) { + o.IsVoiceCall = &v +} + +// GetRemoveSimulationCalls returns the RemoveSimulationCalls field value if set, zero value otherwise. +func (o *AutomationRuleScope) GetRemoveSimulationCalls() bool { + if o == nil || IsNil(o.RemoveSimulationCalls) { + var ret bool + return ret + } + return *o.RemoveSimulationCalls +} + +// GetRemoveSimulationCallsOk returns a tuple with the RemoveSimulationCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AutomationRuleScope) GetRemoveSimulationCallsOk() (*bool, bool) { + if o == nil || IsNil(o.RemoveSimulationCalls) { + return nil, false + } + return o.RemoveSimulationCalls, true +} + +// HasRemoveSimulationCalls returns a boolean if a field has been set. +func (o *AutomationRuleScope) HasRemoveSimulationCalls() bool { + if o != nil && !IsNil(o.RemoveSimulationCalls) { + return true + } + + return false +} + +// SetRemoveSimulationCalls gets a reference to the given bool and assigns it to the RemoveSimulationCalls field. +func (o *AutomationRuleScope) SetRemoveSimulationCalls(v bool) { + o.RemoveSimulationCalls = &v +} + +func (o AutomationRuleScope) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AutomationRuleScope) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.IsVoiceCall) { + toSerialize["is_voice_call"] = o.IsVoiceCall + } + if !IsNil(o.RemoveSimulationCalls) { + toSerialize["remove_simulation_calls"] = o.RemoveSimulationCalls + } + return toSerialize, nil +} + +type NullableAutomationRuleScope struct { + value *AutomationRuleScope + isSet bool +} + +func (v NullableAutomationRuleScope) Get() *AutomationRuleScope { + return v.value +} + +func (v *NullableAutomationRuleScope) Set(val *AutomationRuleScope) { + v.value = val + v.isSet = true +} + +func (v NullableAutomationRuleScope) IsSet() bool { + return v.isSet +} + +func (v *NullableAutomationRuleScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAutomationRuleScope(val *AutomationRuleScope) *NullableAutomationRuleScope { + return &NullableAutomationRuleScope{value: val, isSet: true} +} + +func (v NullableAutomationRuleScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAutomationRuleScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_base_columns_response.go b/go/futureagi/model_base_columns_response.go new file mode 100644 index 0000000..091fe01 --- /dev/null +++ b/go/futureagi/model_base_columns_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BaseColumnsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseColumnsResponse{} + +// BaseColumnsResponse struct for BaseColumnsResponse +type BaseColumnsResponse struct { + Status bool `json:"status"` + Result BaseColumnsResponseResult `json:"result"` +} + +type _BaseColumnsResponse BaseColumnsResponse + +// NewBaseColumnsResponse instantiates a new BaseColumnsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBaseColumnsResponse(status bool, result BaseColumnsResponseResult) *BaseColumnsResponse { + this := BaseColumnsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewBaseColumnsResponseWithDefaults instantiates a new BaseColumnsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBaseColumnsResponseWithDefaults() *BaseColumnsResponse { + this := BaseColumnsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *BaseColumnsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *BaseColumnsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *BaseColumnsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *BaseColumnsResponse) GetResult() BaseColumnsResponseResult { + if o == nil { + var ret BaseColumnsResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *BaseColumnsResponse) GetResultOk() (*BaseColumnsResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *BaseColumnsResponse) SetResult(v BaseColumnsResponseResult) { + o.Result = v +} + +func (o BaseColumnsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseColumnsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *BaseColumnsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBaseColumnsResponse := _BaseColumnsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBaseColumnsResponse) + + if err != nil { + return err + } + + *o = BaseColumnsResponse(varBaseColumnsResponse) + + return err +} + +type NullableBaseColumnsResponse struct { + value *BaseColumnsResponse + isSet bool +} + +func (v NullableBaseColumnsResponse) Get() *BaseColumnsResponse { + return v.value +} + +func (v *NullableBaseColumnsResponse) Set(val *BaseColumnsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBaseColumnsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseColumnsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseColumnsResponse(val *BaseColumnsResponse) *NullableBaseColumnsResponse { + return &NullableBaseColumnsResponse{value: val, isSet: true} +} + +func (v NullableBaseColumnsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseColumnsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_base_columns_response_result.go b/go/futureagi/model_base_columns_response_result.go new file mode 100644 index 0000000..1ab81ac --- /dev/null +++ b/go/futureagi/model_base_columns_response_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BaseColumnsResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseColumnsResponseResult{} + +// BaseColumnsResponseResult struct for BaseColumnsResponseResult +type BaseColumnsResponseResult struct { + BaseColumns []string `json:"base_columns"` +} + +type _BaseColumnsResponseResult BaseColumnsResponseResult + +// NewBaseColumnsResponseResult instantiates a new BaseColumnsResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBaseColumnsResponseResult(baseColumns []string) *BaseColumnsResponseResult { + this := BaseColumnsResponseResult{} + this.BaseColumns = baseColumns + return &this +} + +// NewBaseColumnsResponseResultWithDefaults instantiates a new BaseColumnsResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBaseColumnsResponseResultWithDefaults() *BaseColumnsResponseResult { + this := BaseColumnsResponseResult{} + return &this +} + +// GetBaseColumns returns the BaseColumns field value +func (o *BaseColumnsResponseResult) GetBaseColumns() []string { + if o == nil { + var ret []string + return ret + } + + return o.BaseColumns +} + +// GetBaseColumnsOk returns a tuple with the BaseColumns field value +// and a boolean to check if the value has been set. +func (o *BaseColumnsResponseResult) GetBaseColumnsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.BaseColumns, true +} + +// SetBaseColumns sets field value +func (o *BaseColumnsResponseResult) SetBaseColumns(v []string) { + o.BaseColumns = v +} + +func (o BaseColumnsResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseColumnsResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_columns"] = o.BaseColumns + return toSerialize, nil +} + +func (o *BaseColumnsResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "base_columns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBaseColumnsResponseResult := _BaseColumnsResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBaseColumnsResponseResult) + + if err != nil { + return err + } + + *o = BaseColumnsResponseResult(varBaseColumnsResponseResult) + + return err +} + +type NullableBaseColumnsResponseResult struct { + value *BaseColumnsResponseResult + isSet bool +} + +func (v NullableBaseColumnsResponseResult) Get() *BaseColumnsResponseResult { + return v.value +} + +func (v *NullableBaseColumnsResponseResult) Set(val *BaseColumnsResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableBaseColumnsResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseColumnsResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseColumnsResponseResult(val *BaseColumnsResponseResult) *NullableBaseColumnsResponseResult { + return &NullableBaseColumnsResponseResult{value: val, isSet: true} +} + +func (v NullableBaseColumnsResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseColumnsResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_annotation_annotation_request.go b/go/futureagi/model_bulk_annotation_annotation_request.go new file mode 100644 index 0000000..9304aa2 --- /dev/null +++ b/go/futureagi/model_bulk_annotation_annotation_request.go @@ -0,0 +1,301 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkAnnotationAnnotationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkAnnotationAnnotationRequest{} + +// BulkAnnotationAnnotationRequest struct for BulkAnnotationAnnotationRequest +type BulkAnnotationAnnotationRequest struct { + AnnotationLabelId string `json:"annotation_label_id"` + Value *string `json:"value,omitempty"` + ValueFloat *float32 `json:"value_float,omitempty"` + ValueBool *bool `json:"value_bool,omitempty"` + ValueStrList []string `json:"value_str_list,omitempty"` +} + +type _BulkAnnotationAnnotationRequest BulkAnnotationAnnotationRequest + +// NewBulkAnnotationAnnotationRequest instantiates a new BulkAnnotationAnnotationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkAnnotationAnnotationRequest(annotationLabelId string) *BulkAnnotationAnnotationRequest { + this := BulkAnnotationAnnotationRequest{} + this.AnnotationLabelId = annotationLabelId + return &this +} + +// NewBulkAnnotationAnnotationRequestWithDefaults instantiates a new BulkAnnotationAnnotationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkAnnotationAnnotationRequestWithDefaults() *BulkAnnotationAnnotationRequest { + this := BulkAnnotationAnnotationRequest{} + return &this +} + +// GetAnnotationLabelId returns the AnnotationLabelId field value +func (o *BulkAnnotationAnnotationRequest) GetAnnotationLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.AnnotationLabelId +} + +// GetAnnotationLabelIdOk returns a tuple with the AnnotationLabelId field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationAnnotationRequest) GetAnnotationLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AnnotationLabelId, true +} + +// SetAnnotationLabelId sets field value +func (o *BulkAnnotationAnnotationRequest) SetAnnotationLabelId(v string) { + o.AnnotationLabelId = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *BulkAnnotationAnnotationRequest) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAnnotationAnnotationRequest) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *BulkAnnotationAnnotationRequest) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *BulkAnnotationAnnotationRequest) SetValue(v string) { + o.Value = &v +} + +// GetValueFloat returns the ValueFloat field value if set, zero value otherwise. +func (o *BulkAnnotationAnnotationRequest) GetValueFloat() float32 { + if o == nil || IsNil(o.ValueFloat) { + var ret float32 + return ret + } + return *o.ValueFloat +} + +// GetValueFloatOk returns a tuple with the ValueFloat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAnnotationAnnotationRequest) GetValueFloatOk() (*float32, bool) { + if o == nil || IsNil(o.ValueFloat) { + return nil, false + } + return o.ValueFloat, true +} + +// HasValueFloat returns a boolean if a field has been set. +func (o *BulkAnnotationAnnotationRequest) HasValueFloat() bool { + if o != nil && !IsNil(o.ValueFloat) { + return true + } + + return false +} + +// SetValueFloat gets a reference to the given float32 and assigns it to the ValueFloat field. +func (o *BulkAnnotationAnnotationRequest) SetValueFloat(v float32) { + o.ValueFloat = &v +} + +// GetValueBool returns the ValueBool field value if set, zero value otherwise. +func (o *BulkAnnotationAnnotationRequest) GetValueBool() bool { + if o == nil || IsNil(o.ValueBool) { + var ret bool + return ret + } + return *o.ValueBool +} + +// GetValueBoolOk returns a tuple with the ValueBool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAnnotationAnnotationRequest) GetValueBoolOk() (*bool, bool) { + if o == nil || IsNil(o.ValueBool) { + return nil, false + } + return o.ValueBool, true +} + +// HasValueBool returns a boolean if a field has been set. +func (o *BulkAnnotationAnnotationRequest) HasValueBool() bool { + if o != nil && !IsNil(o.ValueBool) { + return true + } + + return false +} + +// SetValueBool gets a reference to the given bool and assigns it to the ValueBool field. +func (o *BulkAnnotationAnnotationRequest) SetValueBool(v bool) { + o.ValueBool = &v +} + +// GetValueStrList returns the ValueStrList field value if set, zero value otherwise. +func (o *BulkAnnotationAnnotationRequest) GetValueStrList() []string { + if o == nil || IsNil(o.ValueStrList) { + var ret []string + return ret + } + return o.ValueStrList +} + +// GetValueStrListOk returns a tuple with the ValueStrList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAnnotationAnnotationRequest) GetValueStrListOk() ([]string, bool) { + if o == nil || IsNil(o.ValueStrList) { + return nil, false + } + return o.ValueStrList, true +} + +// HasValueStrList returns a boolean if a field has been set. +func (o *BulkAnnotationAnnotationRequest) HasValueStrList() bool { + if o != nil && !IsNil(o.ValueStrList) { + return true + } + + return false +} + +// SetValueStrList gets a reference to the given []string and assigns it to the ValueStrList field. +func (o *BulkAnnotationAnnotationRequest) SetValueStrList(v []string) { + o.ValueStrList = v +} + +func (o BulkAnnotationAnnotationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkAnnotationAnnotationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["annotation_label_id"] = o.AnnotationLabelId + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.ValueFloat) { + toSerialize["value_float"] = o.ValueFloat + } + if !IsNil(o.ValueBool) { + toSerialize["value_bool"] = o.ValueBool + } + if !IsNil(o.ValueStrList) { + toSerialize["value_str_list"] = o.ValueStrList + } + return toSerialize, nil +} + +func (o *BulkAnnotationAnnotationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "annotation_label_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkAnnotationAnnotationRequest := _BulkAnnotationAnnotationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkAnnotationAnnotationRequest) + + if err != nil { + return err + } + + *o = BulkAnnotationAnnotationRequest(varBulkAnnotationAnnotationRequest) + + return err +} + +type NullableBulkAnnotationAnnotationRequest struct { + value *BulkAnnotationAnnotationRequest + isSet bool +} + +func (v NullableBulkAnnotationAnnotationRequest) Get() *BulkAnnotationAnnotationRequest { + return v.value +} + +func (v *NullableBulkAnnotationAnnotationRequest) Set(val *BulkAnnotationAnnotationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkAnnotationAnnotationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkAnnotationAnnotationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkAnnotationAnnotationRequest(val *BulkAnnotationAnnotationRequest) *NullableBulkAnnotationAnnotationRequest { + return &NullableBulkAnnotationAnnotationRequest{value: val, isSet: true} +} + +func (v NullableBulkAnnotationAnnotationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkAnnotationAnnotationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_annotation_note_request.go b/go/futureagi/model_bulk_annotation_note_request.go new file mode 100644 index 0000000..1aea9e1 --- /dev/null +++ b/go/futureagi/model_bulk_annotation_note_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkAnnotationNoteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkAnnotationNoteRequest{} + +// BulkAnnotationNoteRequest struct for BulkAnnotationNoteRequest +type BulkAnnotationNoteRequest struct { + Text string `json:"text"` +} + +type _BulkAnnotationNoteRequest BulkAnnotationNoteRequest + +// NewBulkAnnotationNoteRequest instantiates a new BulkAnnotationNoteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkAnnotationNoteRequest(text string) *BulkAnnotationNoteRequest { + this := BulkAnnotationNoteRequest{} + this.Text = text + return &this +} + +// NewBulkAnnotationNoteRequestWithDefaults instantiates a new BulkAnnotationNoteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkAnnotationNoteRequestWithDefaults() *BulkAnnotationNoteRequest { + this := BulkAnnotationNoteRequest{} + return &this +} + +// GetText returns the Text field value +func (o *BulkAnnotationNoteRequest) GetText() string { + if o == nil { + var ret string + return ret + } + + return o.Text +} + +// GetTextOk returns a tuple with the Text field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationNoteRequest) GetTextOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Text, true +} + +// SetText sets field value +func (o *BulkAnnotationNoteRequest) SetText(v string) { + o.Text = v +} + +func (o BulkAnnotationNoteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkAnnotationNoteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["text"] = o.Text + return toSerialize, nil +} + +func (o *BulkAnnotationNoteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "text", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkAnnotationNoteRequest := _BulkAnnotationNoteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkAnnotationNoteRequest) + + if err != nil { + return err + } + + *o = BulkAnnotationNoteRequest(varBulkAnnotationNoteRequest) + + return err +} + +type NullableBulkAnnotationNoteRequest struct { + value *BulkAnnotationNoteRequest + isSet bool +} + +func (v NullableBulkAnnotationNoteRequest) Get() *BulkAnnotationNoteRequest { + return v.value +} + +func (v *NullableBulkAnnotationNoteRequest) Set(val *BulkAnnotationNoteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkAnnotationNoteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkAnnotationNoteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkAnnotationNoteRequest(val *BulkAnnotationNoteRequest) *NullableBulkAnnotationNoteRequest { + return &NullableBulkAnnotationNoteRequest{value: val, isSet: true} +} + +func (v NullableBulkAnnotationNoteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkAnnotationNoteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_annotation_record_request.go b/go/futureagi/model_bulk_annotation_record_request.go new file mode 100644 index 0000000..6f176b9 --- /dev/null +++ b/go/futureagi/model_bulk_annotation_record_request.go @@ -0,0 +1,229 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkAnnotationRecordRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkAnnotationRecordRequest{} + +// BulkAnnotationRecordRequest struct for BulkAnnotationRecordRequest +type BulkAnnotationRecordRequest struct { + ObservationSpanId string `json:"observation_span_id"` + Annotations []BulkAnnotationAnnotationRequest `json:"annotations,omitempty"` + Notes []BulkAnnotationNoteRequest `json:"notes,omitempty"` +} + +type _BulkAnnotationRecordRequest BulkAnnotationRecordRequest + +// NewBulkAnnotationRecordRequest instantiates a new BulkAnnotationRecordRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkAnnotationRecordRequest(observationSpanId string) *BulkAnnotationRecordRequest { + this := BulkAnnotationRecordRequest{} + this.ObservationSpanId = observationSpanId + return &this +} + +// NewBulkAnnotationRecordRequestWithDefaults instantiates a new BulkAnnotationRecordRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkAnnotationRecordRequestWithDefaults() *BulkAnnotationRecordRequest { + this := BulkAnnotationRecordRequest{} + return &this +} + +// GetObservationSpanId returns the ObservationSpanId field value +func (o *BulkAnnotationRecordRequest) GetObservationSpanId() string { + if o == nil { + var ret string + return ret + } + + return o.ObservationSpanId +} + +// GetObservationSpanIdOk returns a tuple with the ObservationSpanId field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationRecordRequest) GetObservationSpanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ObservationSpanId, true +} + +// SetObservationSpanId sets field value +func (o *BulkAnnotationRecordRequest) SetObservationSpanId(v string) { + o.ObservationSpanId = v +} + +// GetAnnotations returns the Annotations field value if set, zero value otherwise. +func (o *BulkAnnotationRecordRequest) GetAnnotations() []BulkAnnotationAnnotationRequest { + if o == nil || IsNil(o.Annotations) { + var ret []BulkAnnotationAnnotationRequest + return ret + } + return o.Annotations +} + +// GetAnnotationsOk returns a tuple with the Annotations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAnnotationRecordRequest) GetAnnotationsOk() ([]BulkAnnotationAnnotationRequest, bool) { + if o == nil || IsNil(o.Annotations) { + return nil, false + } + return o.Annotations, true +} + +// HasAnnotations returns a boolean if a field has been set. +func (o *BulkAnnotationRecordRequest) HasAnnotations() bool { + if o != nil && !IsNil(o.Annotations) { + return true + } + + return false +} + +// SetAnnotations gets a reference to the given []BulkAnnotationAnnotationRequest and assigns it to the Annotations field. +func (o *BulkAnnotationRecordRequest) SetAnnotations(v []BulkAnnotationAnnotationRequest) { + o.Annotations = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *BulkAnnotationRecordRequest) GetNotes() []BulkAnnotationNoteRequest { + if o == nil || IsNil(o.Notes) { + var ret []BulkAnnotationNoteRequest + return ret + } + return o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAnnotationRecordRequest) GetNotesOk() ([]BulkAnnotationNoteRequest, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *BulkAnnotationRecordRequest) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given []BulkAnnotationNoteRequest and assigns it to the Notes field. +func (o *BulkAnnotationRecordRequest) SetNotes(v []BulkAnnotationNoteRequest) { + o.Notes = v +} + +func (o BulkAnnotationRecordRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkAnnotationRecordRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["observation_span_id"] = o.ObservationSpanId + if !IsNil(o.Annotations) { + toSerialize["annotations"] = o.Annotations + } + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + return toSerialize, nil +} + +func (o *BulkAnnotationRecordRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "observation_span_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkAnnotationRecordRequest := _BulkAnnotationRecordRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkAnnotationRecordRequest) + + if err != nil { + return err + } + + *o = BulkAnnotationRecordRequest(varBulkAnnotationRecordRequest) + + return err +} + +type NullableBulkAnnotationRecordRequest struct { + value *BulkAnnotationRecordRequest + isSet bool +} + +func (v NullableBulkAnnotationRecordRequest) Get() *BulkAnnotationRecordRequest { + return v.value +} + +func (v *NullableBulkAnnotationRecordRequest) Set(val *BulkAnnotationRecordRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkAnnotationRecordRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkAnnotationRecordRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkAnnotationRecordRequest(val *BulkAnnotationRecordRequest) *NullableBulkAnnotationRecordRequest { + return &NullableBulkAnnotationRecordRequest{value: val, isSet: true} +} + +func (v NullableBulkAnnotationRecordRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkAnnotationRecordRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_annotation_request.go b/go/futureagi/model_bulk_annotation_request.go new file mode 100644 index 0000000..7b59665 --- /dev/null +++ b/go/futureagi/model_bulk_annotation_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkAnnotationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkAnnotationRequest{} + +// BulkAnnotationRequest struct for BulkAnnotationRequest +type BulkAnnotationRequest struct { + Records []BulkAnnotationRecordRequest `json:"records"` +} + +type _BulkAnnotationRequest BulkAnnotationRequest + +// NewBulkAnnotationRequest instantiates a new BulkAnnotationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkAnnotationRequest(records []BulkAnnotationRecordRequest) *BulkAnnotationRequest { + this := BulkAnnotationRequest{} + this.Records = records + return &this +} + +// NewBulkAnnotationRequestWithDefaults instantiates a new BulkAnnotationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkAnnotationRequestWithDefaults() *BulkAnnotationRequest { + this := BulkAnnotationRequest{} + return &this +} + +// GetRecords returns the Records field value +func (o *BulkAnnotationRequest) GetRecords() []BulkAnnotationRecordRequest { + if o == nil { + var ret []BulkAnnotationRecordRequest + return ret + } + + return o.Records +} + +// GetRecordsOk returns a tuple with the Records field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationRequest) GetRecordsOk() ([]BulkAnnotationRecordRequest, bool) { + if o == nil { + return nil, false + } + return o.Records, true +} + +// SetRecords sets field value +func (o *BulkAnnotationRequest) SetRecords(v []BulkAnnotationRecordRequest) { + o.Records = v +} + +func (o BulkAnnotationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkAnnotationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["records"] = o.Records + return toSerialize, nil +} + +func (o *BulkAnnotationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "records", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkAnnotationRequest := _BulkAnnotationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkAnnotationRequest) + + if err != nil { + return err + } + + *o = BulkAnnotationRequest(varBulkAnnotationRequest) + + return err +} + +type NullableBulkAnnotationRequest struct { + value *BulkAnnotationRequest + isSet bool +} + +func (v NullableBulkAnnotationRequest) Get() *BulkAnnotationRequest { + return v.value +} + +func (v *NullableBulkAnnotationRequest) Set(val *BulkAnnotationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkAnnotationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkAnnotationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkAnnotationRequest(val *BulkAnnotationRequest) *NullableBulkAnnotationRequest { + return &NullableBulkAnnotationRequest{value: val, isSet: true} +} + +func (v NullableBulkAnnotationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkAnnotationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_annotation_response.go b/go/futureagi/model_bulk_annotation_response.go new file mode 100644 index 0000000..009ab88 --- /dev/null +++ b/go/futureagi/model_bulk_annotation_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkAnnotationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkAnnotationResponse{} + +// BulkAnnotationResponse struct for BulkAnnotationResponse +type BulkAnnotationResponse struct { + Status *bool `json:"status,omitempty"` + Result BulkAnnotationResponseResult `json:"result"` +} + +type _BulkAnnotationResponse BulkAnnotationResponse + +// NewBulkAnnotationResponse instantiates a new BulkAnnotationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkAnnotationResponse(result BulkAnnotationResponseResult) *BulkAnnotationResponse { + this := BulkAnnotationResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewBulkAnnotationResponseWithDefaults instantiates a new BulkAnnotationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkAnnotationResponseWithDefaults() *BulkAnnotationResponse { + this := BulkAnnotationResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *BulkAnnotationResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *BulkAnnotationResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *BulkAnnotationResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *BulkAnnotationResponse) GetResult() BulkAnnotationResponseResult { + if o == nil { + var ret BulkAnnotationResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponse) GetResultOk() (*BulkAnnotationResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *BulkAnnotationResponse) SetResult(v BulkAnnotationResponseResult) { + o.Result = v +} + +func (o BulkAnnotationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkAnnotationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *BulkAnnotationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkAnnotationResponse := _BulkAnnotationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkAnnotationResponse) + + if err != nil { + return err + } + + *o = BulkAnnotationResponse(varBulkAnnotationResponse) + + return err +} + +type NullableBulkAnnotationResponse struct { + value *BulkAnnotationResponse + isSet bool +} + +func (v NullableBulkAnnotationResponse) Get() *BulkAnnotationResponse { + return v.value +} + +func (v *NullableBulkAnnotationResponse) Set(val *BulkAnnotationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBulkAnnotationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkAnnotationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkAnnotationResponse(val *BulkAnnotationResponse) *NullableBulkAnnotationResponse { + return &NullableBulkAnnotationResponse{value: val, isSet: true} +} + +func (v NullableBulkAnnotationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkAnnotationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_annotation_response_result.go b/go/futureagi/model_bulk_annotation_response_result.go new file mode 100644 index 0000000..b710fcc --- /dev/null +++ b/go/futureagi/model_bulk_annotation_response_result.go @@ -0,0 +1,399 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkAnnotationResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkAnnotationResponseResult{} + +// BulkAnnotationResponseResult struct for BulkAnnotationResponseResult +type BulkAnnotationResponseResult struct { + Message string `json:"message"` + AnnotationsCreated int32 `json:"annotations_created"` + AnnotationsUpdated int32 `json:"annotations_updated"` + NotesCreated int32 `json:"notes_created"` + SucceededCount int32 `json:"succeeded_count"` + ErrorsCount int32 `json:"errors_count"` + WarningsCount int32 `json:"warnings_count"` + Warnings []map[string]interface{} `json:"warnings,omitempty"` + Errors []map[string]interface{} `json:"errors,omitempty"` +} + +type _BulkAnnotationResponseResult BulkAnnotationResponseResult + +// NewBulkAnnotationResponseResult instantiates a new BulkAnnotationResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkAnnotationResponseResult(message string, annotationsCreated int32, annotationsUpdated int32, notesCreated int32, succeededCount int32, errorsCount int32, warningsCount int32) *BulkAnnotationResponseResult { + this := BulkAnnotationResponseResult{} + this.Message = message + this.AnnotationsCreated = annotationsCreated + this.AnnotationsUpdated = annotationsUpdated + this.NotesCreated = notesCreated + this.SucceededCount = succeededCount + this.ErrorsCount = errorsCount + this.WarningsCount = warningsCount + return &this +} + +// NewBulkAnnotationResponseResultWithDefaults instantiates a new BulkAnnotationResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkAnnotationResponseResultWithDefaults() *BulkAnnotationResponseResult { + this := BulkAnnotationResponseResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *BulkAnnotationResponseResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponseResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *BulkAnnotationResponseResult) SetMessage(v string) { + o.Message = v +} + +// GetAnnotationsCreated returns the AnnotationsCreated field value +func (o *BulkAnnotationResponseResult) GetAnnotationsCreated() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AnnotationsCreated +} + +// GetAnnotationsCreatedOk returns a tuple with the AnnotationsCreated field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponseResult) GetAnnotationsCreatedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.AnnotationsCreated, true +} + +// SetAnnotationsCreated sets field value +func (o *BulkAnnotationResponseResult) SetAnnotationsCreated(v int32) { + o.AnnotationsCreated = v +} + +// GetAnnotationsUpdated returns the AnnotationsUpdated field value +func (o *BulkAnnotationResponseResult) GetAnnotationsUpdated() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AnnotationsUpdated +} + +// GetAnnotationsUpdatedOk returns a tuple with the AnnotationsUpdated field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponseResult) GetAnnotationsUpdatedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.AnnotationsUpdated, true +} + +// SetAnnotationsUpdated sets field value +func (o *BulkAnnotationResponseResult) SetAnnotationsUpdated(v int32) { + o.AnnotationsUpdated = v +} + +// GetNotesCreated returns the NotesCreated field value +func (o *BulkAnnotationResponseResult) GetNotesCreated() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NotesCreated +} + +// GetNotesCreatedOk returns a tuple with the NotesCreated field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponseResult) GetNotesCreatedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NotesCreated, true +} + +// SetNotesCreated sets field value +func (o *BulkAnnotationResponseResult) SetNotesCreated(v int32) { + o.NotesCreated = v +} + +// GetSucceededCount returns the SucceededCount field value +func (o *BulkAnnotationResponseResult) GetSucceededCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SucceededCount +} + +// GetSucceededCountOk returns a tuple with the SucceededCount field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponseResult) GetSucceededCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SucceededCount, true +} + +// SetSucceededCount sets field value +func (o *BulkAnnotationResponseResult) SetSucceededCount(v int32) { + o.SucceededCount = v +} + +// GetErrorsCount returns the ErrorsCount field value +func (o *BulkAnnotationResponseResult) GetErrorsCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ErrorsCount +} + +// GetErrorsCountOk returns a tuple with the ErrorsCount field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponseResult) GetErrorsCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ErrorsCount, true +} + +// SetErrorsCount sets field value +func (o *BulkAnnotationResponseResult) SetErrorsCount(v int32) { + o.ErrorsCount = v +} + +// GetWarningsCount returns the WarningsCount field value +func (o *BulkAnnotationResponseResult) GetWarningsCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.WarningsCount +} + +// GetWarningsCountOk returns a tuple with the WarningsCount field value +// and a boolean to check if the value has been set. +func (o *BulkAnnotationResponseResult) GetWarningsCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.WarningsCount, true +} + +// SetWarningsCount sets field value +func (o *BulkAnnotationResponseResult) SetWarningsCount(v int32) { + o.WarningsCount = v +} + +// GetWarnings returns the Warnings field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkAnnotationResponseResult) GetWarnings() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.Warnings +} + +// GetWarningsOk returns a tuple with the Warnings field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BulkAnnotationResponseResult) GetWarningsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Warnings) { + return nil, false + } + return o.Warnings, true +} + +// HasWarnings returns a boolean if a field has been set. +func (o *BulkAnnotationResponseResult) HasWarnings() bool { + if o != nil && !IsNil(o.Warnings) { + return true + } + + return false +} + +// SetWarnings gets a reference to the given []map[string]interface{} and assigns it to the Warnings field. +func (o *BulkAnnotationResponseResult) SetWarnings(v []map[string]interface{}) { + o.Warnings = v +} + +// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkAnnotationResponseResult) GetErrors() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BulkAnnotationResponseResult) GetErrorsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *BulkAnnotationResponseResult) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field. +func (o *BulkAnnotationResponseResult) SetErrors(v []map[string]interface{}) { + o.Errors = v +} + +func (o BulkAnnotationResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkAnnotationResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["annotations_created"] = o.AnnotationsCreated + toSerialize["annotations_updated"] = o.AnnotationsUpdated + toSerialize["notes_created"] = o.NotesCreated + toSerialize["succeeded_count"] = o.SucceededCount + toSerialize["errors_count"] = o.ErrorsCount + toSerialize["warnings_count"] = o.WarningsCount + if o.Warnings != nil { + toSerialize["warnings"] = o.Warnings + } + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + return toSerialize, nil +} + +func (o *BulkAnnotationResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "annotations_created", + "annotations_updated", + "notes_created", + "succeeded_count", + "errors_count", + "warnings_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkAnnotationResponseResult := _BulkAnnotationResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkAnnotationResponseResult) + + if err != nil { + return err + } + + *o = BulkAnnotationResponseResult(varBulkAnnotationResponseResult) + + return err +} + +type NullableBulkAnnotationResponseResult struct { + value *BulkAnnotationResponseResult + isSet bool +} + +func (v NullableBulkAnnotationResponseResult) Get() *BulkAnnotationResponseResult { + return v.value +} + +func (v *NullableBulkAnnotationResponseResult) Set(val *BulkAnnotationResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableBulkAnnotationResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkAnnotationResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkAnnotationResponseResult(val *BulkAnnotationResponseResult) *NullableBulkAnnotationResponseResult { + return &NullableBulkAnnotationResponseResult{value: val, isSet: true} +} + +func (v NullableBulkAnnotationResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkAnnotationResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_create_score_item.go b/go/futureagi/model_bulk_create_score_item.go new file mode 100644 index 0000000..7ee184c --- /dev/null +++ b/go/futureagi/model_bulk_create_score_item.go @@ -0,0 +1,265 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkCreateScoreItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkCreateScoreItem{} + +// BulkCreateScoreItem struct for BulkCreateScoreItem +type BulkCreateScoreItem struct { + LabelId string `json:"label_id"` + Value map[string]interface{} `json:"value"` + Notes *string `json:"notes,omitempty"` + ScoreSource *string `json:"score_source,omitempty"` +} + +type _BulkCreateScoreItem BulkCreateScoreItem + +// NewBulkCreateScoreItem instantiates a new BulkCreateScoreItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkCreateScoreItem(labelId string, value map[string]interface{}) *BulkCreateScoreItem { + this := BulkCreateScoreItem{} + this.LabelId = labelId + this.Value = value + var notes string = "" + this.Notes = ¬es + var scoreSource string = "human" + this.ScoreSource = &scoreSource + return &this +} + +// NewBulkCreateScoreItemWithDefaults instantiates a new BulkCreateScoreItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkCreateScoreItemWithDefaults() *BulkCreateScoreItem { + this := BulkCreateScoreItem{} + var notes string = "" + this.Notes = ¬es + var scoreSource string = "human" + this.ScoreSource = &scoreSource + return &this +} + +// GetLabelId returns the LabelId field value +func (o *BulkCreateScoreItem) GetLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScoreItem) GetLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelId, true +} + +// SetLabelId sets field value +func (o *BulkCreateScoreItem) SetLabelId(v string) { + o.LabelId = v +} + +// GetValue returns the Value field value +func (o *BulkCreateScoreItem) GetValue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScoreItem) GetValueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *BulkCreateScoreItem) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *BulkCreateScoreItem) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkCreateScoreItem) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *BulkCreateScoreItem) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *BulkCreateScoreItem) SetNotes(v string) { + o.Notes = &v +} + +// GetScoreSource returns the ScoreSource field value if set, zero value otherwise. +func (o *BulkCreateScoreItem) GetScoreSource() string { + if o == nil || IsNil(o.ScoreSource) { + var ret string + return ret + } + return *o.ScoreSource +} + +// GetScoreSourceOk returns a tuple with the ScoreSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkCreateScoreItem) GetScoreSourceOk() (*string, bool) { + if o == nil || IsNil(o.ScoreSource) { + return nil, false + } + return o.ScoreSource, true +} + +// HasScoreSource returns a boolean if a field has been set. +func (o *BulkCreateScoreItem) HasScoreSource() bool { + if o != nil && !IsNil(o.ScoreSource) { + return true + } + + return false +} + +// SetScoreSource gets a reference to the given string and assigns it to the ScoreSource field. +func (o *BulkCreateScoreItem) SetScoreSource(v string) { + o.ScoreSource = &v +} + +func (o BulkCreateScoreItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkCreateScoreItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label_id"] = o.LabelId + toSerialize["value"] = o.Value + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if !IsNil(o.ScoreSource) { + toSerialize["score_source"] = o.ScoreSource + } + return toSerialize, nil +} + +func (o *BulkCreateScoreItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label_id", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkCreateScoreItem := _BulkCreateScoreItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkCreateScoreItem) + + if err != nil { + return err + } + + *o = BulkCreateScoreItem(varBulkCreateScoreItem) + + return err +} + +type NullableBulkCreateScoreItem struct { + value *BulkCreateScoreItem + isSet bool +} + +func (v NullableBulkCreateScoreItem) Get() *BulkCreateScoreItem { + return v.value +} + +func (v *NullableBulkCreateScoreItem) Set(val *BulkCreateScoreItem) { + v.value = val + v.isSet = true +} + +func (v NullableBulkCreateScoreItem) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkCreateScoreItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkCreateScoreItem(val *BulkCreateScoreItem) *NullableBulkCreateScoreItem { + return &NullableBulkCreateScoreItem{value: val, isSet: true} +} + +func (v NullableBulkCreateScoreItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkCreateScoreItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_create_scores.go b/go/futureagi/model_bulk_create_scores.go new file mode 100644 index 0000000..1937ac4 --- /dev/null +++ b/go/futureagi/model_bulk_create_scores.go @@ -0,0 +1,394 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkCreateScores type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkCreateScores{} + +// BulkCreateScores struct for BulkCreateScores +type BulkCreateScores struct { + SourceType string `json:"source_type"` + SourceId string `json:"source_id"` + Scores []BulkCreateScoreItem `json:"scores"` + Notes *string `json:"notes,omitempty"` + SpanNotes NullableString `json:"span_notes,omitempty"` + SpanNotesSourceId NullableString `json:"span_notes_source_id,omitempty"` + QueueItemId NullableString `json:"queue_item_id,omitempty"` +} + +type _BulkCreateScores BulkCreateScores + +// NewBulkCreateScores instantiates a new BulkCreateScores object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkCreateScores(sourceType string, sourceId string, scores []BulkCreateScoreItem) *BulkCreateScores { + this := BulkCreateScores{} + this.SourceType = sourceType + this.SourceId = sourceId + this.Scores = scores + var notes string = "" + this.Notes = ¬es + return &this +} + +// NewBulkCreateScoresWithDefaults instantiates a new BulkCreateScores object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkCreateScoresWithDefaults() *BulkCreateScores { + this := BulkCreateScores{} + var notes string = "" + this.Notes = ¬es + return &this +} + +// GetSourceType returns the SourceType field value +func (o *BulkCreateScores) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScores) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *BulkCreateScores) SetSourceType(v string) { + o.SourceType = v +} + +// GetSourceId returns the SourceId field value +func (o *BulkCreateScores) GetSourceId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScores) GetSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceId, true +} + +// SetSourceId sets field value +func (o *BulkCreateScores) SetSourceId(v string) { + o.SourceId = v +} + +// GetScores returns the Scores field value +func (o *BulkCreateScores) GetScores() []BulkCreateScoreItem { + if o == nil { + var ret []BulkCreateScoreItem + return ret + } + + return o.Scores +} + +// GetScoresOk returns a tuple with the Scores field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScores) GetScoresOk() ([]BulkCreateScoreItem, bool) { + if o == nil { + return nil, false + } + return o.Scores, true +} + +// SetScores sets field value +func (o *BulkCreateScores) SetScores(v []BulkCreateScoreItem) { + o.Scores = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *BulkCreateScores) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkCreateScores) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *BulkCreateScores) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *BulkCreateScores) SetNotes(v string) { + o.Notes = &v +} + +// GetSpanNotes returns the SpanNotes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkCreateScores) GetSpanNotes() string { + if o == nil || IsNil(o.SpanNotes.Get()) { + var ret string + return ret + } + return *o.SpanNotes.Get() +} + +// GetSpanNotesOk returns a tuple with the SpanNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BulkCreateScores) GetSpanNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SpanNotes.Get(), o.SpanNotes.IsSet() +} + +// HasSpanNotes returns a boolean if a field has been set. +func (o *BulkCreateScores) HasSpanNotes() bool { + if o != nil && o.SpanNotes.IsSet() { + return true + } + + return false +} + +// SetSpanNotes gets a reference to the given NullableString and assigns it to the SpanNotes field. +func (o *BulkCreateScores) SetSpanNotes(v string) { + o.SpanNotes.Set(&v) +} + +// SetSpanNotesNil sets the value for SpanNotes to be an explicit nil +func (o *BulkCreateScores) SetSpanNotesNil() { + o.SpanNotes.Set(nil) +} + +// UnsetSpanNotes ensures that no value is present for SpanNotes, not even an explicit nil +func (o *BulkCreateScores) UnsetSpanNotes() { + o.SpanNotes.Unset() +} + +// GetSpanNotesSourceId returns the SpanNotesSourceId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkCreateScores) GetSpanNotesSourceId() string { + if o == nil || IsNil(o.SpanNotesSourceId.Get()) { + var ret string + return ret + } + return *o.SpanNotesSourceId.Get() +} + +// GetSpanNotesSourceIdOk returns a tuple with the SpanNotesSourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BulkCreateScores) GetSpanNotesSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SpanNotesSourceId.Get(), o.SpanNotesSourceId.IsSet() +} + +// HasSpanNotesSourceId returns a boolean if a field has been set. +func (o *BulkCreateScores) HasSpanNotesSourceId() bool { + if o != nil && o.SpanNotesSourceId.IsSet() { + return true + } + + return false +} + +// SetSpanNotesSourceId gets a reference to the given NullableString and assigns it to the SpanNotesSourceId field. +func (o *BulkCreateScores) SetSpanNotesSourceId(v string) { + o.SpanNotesSourceId.Set(&v) +} + +// SetSpanNotesSourceIdNil sets the value for SpanNotesSourceId to be an explicit nil +func (o *BulkCreateScores) SetSpanNotesSourceIdNil() { + o.SpanNotesSourceId.Set(nil) +} + +// UnsetSpanNotesSourceId ensures that no value is present for SpanNotesSourceId, not even an explicit nil +func (o *BulkCreateScores) UnsetSpanNotesSourceId() { + o.SpanNotesSourceId.Unset() +} + +// GetQueueItemId returns the QueueItemId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkCreateScores) GetQueueItemId() string { + if o == nil || IsNil(o.QueueItemId.Get()) { + var ret string + return ret + } + return *o.QueueItemId.Get() +} + +// GetQueueItemIdOk returns a tuple with the QueueItemId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BulkCreateScores) GetQueueItemIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.QueueItemId.Get(), o.QueueItemId.IsSet() +} + +// HasQueueItemId returns a boolean if a field has been set. +func (o *BulkCreateScores) HasQueueItemId() bool { + if o != nil && o.QueueItemId.IsSet() { + return true + } + + return false +} + +// SetQueueItemId gets a reference to the given NullableString and assigns it to the QueueItemId field. +func (o *BulkCreateScores) SetQueueItemId(v string) { + o.QueueItemId.Set(&v) +} + +// SetQueueItemIdNil sets the value for QueueItemId to be an explicit nil +func (o *BulkCreateScores) SetQueueItemIdNil() { + o.QueueItemId.Set(nil) +} + +// UnsetQueueItemId ensures that no value is present for QueueItemId, not even an explicit nil +func (o *BulkCreateScores) UnsetQueueItemId() { + o.QueueItemId.Unset() +} + +func (o BulkCreateScores) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkCreateScores) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source_type"] = o.SourceType + toSerialize["source_id"] = o.SourceId + toSerialize["scores"] = o.Scores + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if o.SpanNotes.IsSet() { + toSerialize["span_notes"] = o.SpanNotes.Get() + } + if o.SpanNotesSourceId.IsSet() { + toSerialize["span_notes_source_id"] = o.SpanNotesSourceId.Get() + } + if o.QueueItemId.IsSet() { + toSerialize["queue_item_id"] = o.QueueItemId.Get() + } + return toSerialize, nil +} + +func (o *BulkCreateScores) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source_type", + "source_id", + "scores", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkCreateScores := _BulkCreateScores{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkCreateScores) + + if err != nil { + return err + } + + *o = BulkCreateScores(varBulkCreateScores) + + return err +} + +type NullableBulkCreateScores struct { + value *BulkCreateScores + isSet bool +} + +func (v NullableBulkCreateScores) Get() *BulkCreateScores { + return v.value +} + +func (v *NullableBulkCreateScores) Set(val *BulkCreateScores) { + v.value = val + v.isSet = true +} + +func (v NullableBulkCreateScores) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkCreateScores) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkCreateScores(val *BulkCreateScores) *NullableBulkCreateScores { + return &NullableBulkCreateScores{value: val, isSet: true} +} + +func (v NullableBulkCreateScores) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkCreateScores) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_create_scores_response.go b/go/futureagi/model_bulk_create_scores_response.go new file mode 100644 index 0000000..597ef4e --- /dev/null +++ b/go/futureagi/model_bulk_create_scores_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkCreateScoresResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkCreateScoresResponse{} + +// BulkCreateScoresResponse struct for BulkCreateScoresResponse +type BulkCreateScoresResponse struct { + Status *bool `json:"status,omitempty"` + Result BulkCreateScoresResult `json:"result"` +} + +type _BulkCreateScoresResponse BulkCreateScoresResponse + +// NewBulkCreateScoresResponse instantiates a new BulkCreateScoresResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkCreateScoresResponse(result BulkCreateScoresResult) *BulkCreateScoresResponse { + this := BulkCreateScoresResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewBulkCreateScoresResponseWithDefaults instantiates a new BulkCreateScoresResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkCreateScoresResponseWithDefaults() *BulkCreateScoresResponse { + this := BulkCreateScoresResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *BulkCreateScoresResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkCreateScoresResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *BulkCreateScoresResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *BulkCreateScoresResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *BulkCreateScoresResponse) GetResult() BulkCreateScoresResult { + if o == nil { + var ret BulkCreateScoresResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScoresResponse) GetResultOk() (*BulkCreateScoresResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *BulkCreateScoresResponse) SetResult(v BulkCreateScoresResult) { + o.Result = v +} + +func (o BulkCreateScoresResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkCreateScoresResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *BulkCreateScoresResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkCreateScoresResponse := _BulkCreateScoresResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkCreateScoresResponse) + + if err != nil { + return err + } + + *o = BulkCreateScoresResponse(varBulkCreateScoresResponse) + + return err +} + +type NullableBulkCreateScoresResponse struct { + value *BulkCreateScoresResponse + isSet bool +} + +func (v NullableBulkCreateScoresResponse) Get() *BulkCreateScoresResponse { + return v.value +} + +func (v *NullableBulkCreateScoresResponse) Set(val *BulkCreateScoresResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBulkCreateScoresResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkCreateScoresResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkCreateScoresResponse(val *BulkCreateScoresResponse) *NullableBulkCreateScoresResponse { + return &NullableBulkCreateScoresResponse{value: val, isSet: true} +} + +func (v NullableBulkCreateScoresResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkCreateScoresResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_create_scores_result.go b/go/futureagi/model_bulk_create_scores_result.go new file mode 100644 index 0000000..95dd514 --- /dev/null +++ b/go/futureagi/model_bulk_create_scores_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkCreateScoresResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkCreateScoresResult{} + +// BulkCreateScoresResult struct for BulkCreateScoresResult +type BulkCreateScoresResult struct { + Scores []Score `json:"scores"` + Errors []string `json:"errors"` +} + +type _BulkCreateScoresResult BulkCreateScoresResult + +// NewBulkCreateScoresResult instantiates a new BulkCreateScoresResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkCreateScoresResult(scores []Score, errors []string) *BulkCreateScoresResult { + this := BulkCreateScoresResult{} + this.Scores = scores + this.Errors = errors + return &this +} + +// NewBulkCreateScoresResultWithDefaults instantiates a new BulkCreateScoresResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkCreateScoresResultWithDefaults() *BulkCreateScoresResult { + this := BulkCreateScoresResult{} + return &this +} + +// GetScores returns the Scores field value +func (o *BulkCreateScoresResult) GetScores() []Score { + if o == nil { + var ret []Score + return ret + } + + return o.Scores +} + +// GetScoresOk returns a tuple with the Scores field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScoresResult) GetScoresOk() ([]Score, bool) { + if o == nil { + return nil, false + } + return o.Scores, true +} + +// SetScores sets field value +func (o *BulkCreateScoresResult) SetScores(v []Score) { + o.Scores = v +} + +// GetErrors returns the Errors field value +func (o *BulkCreateScoresResult) GetErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value +// and a boolean to check if the value has been set. +func (o *BulkCreateScoresResult) GetErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Errors, true +} + +// SetErrors sets field value +func (o *BulkCreateScoresResult) SetErrors(v []string) { + o.Errors = v +} + +func (o BulkCreateScoresResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkCreateScoresResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["scores"] = o.Scores + toSerialize["errors"] = o.Errors + return toSerialize, nil +} + +func (o *BulkCreateScoresResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "scores", + "errors", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkCreateScoresResult := _BulkCreateScoresResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkCreateScoresResult) + + if err != nil { + return err + } + + *o = BulkCreateScoresResult(varBulkCreateScoresResult) + + return err +} + +type NullableBulkCreateScoresResult struct { + value *BulkCreateScoresResult + isSet bool +} + +func (v NullableBulkCreateScoresResult) Get() *BulkCreateScoresResult { + return v.value +} + +func (v *NullableBulkCreateScoresResult) Set(val *BulkCreateScoresResult) { + v.value = val + v.isSet = true +} + +func (v NullableBulkCreateScoresResult) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkCreateScoresResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkCreateScoresResult(val *BulkCreateScoresResult) *NullableBulkCreateScoresResult { + return &NullableBulkCreateScoresResult{value: val, isSet: true} +} + +func (v NullableBulkCreateScoresResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkCreateScoresResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_bulk_remove_items.go b/go/futureagi/model_bulk_remove_items.go new file mode 100644 index 0000000..73efe74 --- /dev/null +++ b/go/futureagi/model_bulk_remove_items.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BulkRemoveItems type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkRemoveItems{} + +// BulkRemoveItems struct for BulkRemoveItems +type BulkRemoveItems struct { + ItemIds []string `json:"item_ids"` +} + +type _BulkRemoveItems BulkRemoveItems + +// NewBulkRemoveItems instantiates a new BulkRemoveItems object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBulkRemoveItems(itemIds []string) *BulkRemoveItems { + this := BulkRemoveItems{} + this.ItemIds = itemIds + return &this +} + +// NewBulkRemoveItemsWithDefaults instantiates a new BulkRemoveItems object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBulkRemoveItemsWithDefaults() *BulkRemoveItems { + this := BulkRemoveItems{} + return &this +} + +// GetItemIds returns the ItemIds field value +func (o *BulkRemoveItems) GetItemIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ItemIds +} + +// GetItemIdsOk returns a tuple with the ItemIds field value +// and a boolean to check if the value has been set. +func (o *BulkRemoveItems) GetItemIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ItemIds, true +} + +// SetItemIds sets field value +func (o *BulkRemoveItems) SetItemIds(v []string) { + o.ItemIds = v +} + +func (o BulkRemoveItems) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkRemoveItems) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["item_ids"] = o.ItemIds + return toSerialize, nil +} + +func (o *BulkRemoveItems) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "item_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBulkRemoveItems := _BulkRemoveItems{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBulkRemoveItems) + + if err != nil { + return err + } + + *o = BulkRemoveItems(varBulkRemoveItems) + + return err +} + +type NullableBulkRemoveItems struct { + value *BulkRemoveItems + isSet bool +} + +func (v NullableBulkRemoveItems) Get() *BulkRemoveItems { + return v.value +} + +func (v *NullableBulkRemoveItems) Set(val *BulkRemoveItems) { + v.value = val + v.isSet = true +} + +func (v NullableBulkRemoveItems) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkRemoveItems) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkRemoveItems(val *BulkRemoveItems) *NullableBulkRemoveItems { + return &NullableBulkRemoveItems{value: val, isSet: true} +} + +func (v NullableBulkRemoveItems) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkRemoveItems) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_branch_analysis_response.go b/go/futureagi/model_call_branch_analysis_response.go new file mode 100644 index 0000000..a072d9d --- /dev/null +++ b/go/futureagi/model_call_branch_analysis_response.go @@ -0,0 +1,292 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the CallBranchAnalysisResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallBranchAnalysisResponse{} + +// CallBranchAnalysisResponse struct for CallBranchAnalysisResponse +type CallBranchAnalysisResponse struct { + CallExecutionId *string `json:"call_execution_id,omitempty"` + ScenarioId NullableString `json:"scenario_id,omitempty"` + ScenarioName NullableString `json:"scenario_name,omitempty"` + Analysis *map[string]string `json:"analysis,omitempty"` + AnalyzedAt *time.Time `json:"analyzed_at,omitempty"` +} + +// NewCallBranchAnalysisResponse instantiates a new CallBranchAnalysisResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallBranchAnalysisResponse() *CallBranchAnalysisResponse { + this := CallBranchAnalysisResponse{} + return &this +} + +// NewCallBranchAnalysisResponseWithDefaults instantiates a new CallBranchAnalysisResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallBranchAnalysisResponseWithDefaults() *CallBranchAnalysisResponse { + this := CallBranchAnalysisResponse{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value if set, zero value otherwise. +func (o *CallBranchAnalysisResponse) GetCallExecutionId() string { + if o == nil || IsNil(o.CallExecutionId) { + var ret string + return ret + } + return *o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallBranchAnalysisResponse) GetCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.CallExecutionId) { + return nil, false + } + return o.CallExecutionId, true +} + +// HasCallExecutionId returns a boolean if a field has been set. +func (o *CallBranchAnalysisResponse) HasCallExecutionId() bool { + if o != nil && !IsNil(o.CallExecutionId) { + return true + } + + return false +} + +// SetCallExecutionId gets a reference to the given string and assigns it to the CallExecutionId field. +func (o *CallBranchAnalysisResponse) SetCallExecutionId(v string) { + o.CallExecutionId = &v +} + +// GetScenarioId returns the ScenarioId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallBranchAnalysisResponse) GetScenarioId() string { + if o == nil || IsNil(o.ScenarioId.Get()) { + var ret string + return ret + } + return *o.ScenarioId.Get() +} + +// GetScenarioIdOk returns a tuple with the ScenarioId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallBranchAnalysisResponse) GetScenarioIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScenarioId.Get(), o.ScenarioId.IsSet() +} + +// HasScenarioId returns a boolean if a field has been set. +func (o *CallBranchAnalysisResponse) HasScenarioId() bool { + if o != nil && o.ScenarioId.IsSet() { + return true + } + + return false +} + +// SetScenarioId gets a reference to the given NullableString and assigns it to the ScenarioId field. +func (o *CallBranchAnalysisResponse) SetScenarioId(v string) { + o.ScenarioId.Set(&v) +} + +// SetScenarioIdNil sets the value for ScenarioId to be an explicit nil +func (o *CallBranchAnalysisResponse) SetScenarioIdNil() { + o.ScenarioId.Set(nil) +} + +// UnsetScenarioId ensures that no value is present for ScenarioId, not even an explicit nil +func (o *CallBranchAnalysisResponse) UnsetScenarioId() { + o.ScenarioId.Unset() +} + +// GetScenarioName returns the ScenarioName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallBranchAnalysisResponse) GetScenarioName() string { + if o == nil || IsNil(o.ScenarioName.Get()) { + var ret string + return ret + } + return *o.ScenarioName.Get() +} + +// GetScenarioNameOk returns a tuple with the ScenarioName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallBranchAnalysisResponse) GetScenarioNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScenarioName.Get(), o.ScenarioName.IsSet() +} + +// HasScenarioName returns a boolean if a field has been set. +func (o *CallBranchAnalysisResponse) HasScenarioName() bool { + if o != nil && o.ScenarioName.IsSet() { + return true + } + + return false +} + +// SetScenarioName gets a reference to the given NullableString and assigns it to the ScenarioName field. +func (o *CallBranchAnalysisResponse) SetScenarioName(v string) { + o.ScenarioName.Set(&v) +} + +// SetScenarioNameNil sets the value for ScenarioName to be an explicit nil +func (o *CallBranchAnalysisResponse) SetScenarioNameNil() { + o.ScenarioName.Set(nil) +} + +// UnsetScenarioName ensures that no value is present for ScenarioName, not even an explicit nil +func (o *CallBranchAnalysisResponse) UnsetScenarioName() { + o.ScenarioName.Unset() +} + +// GetAnalysis returns the Analysis field value if set, zero value otherwise. +func (o *CallBranchAnalysisResponse) GetAnalysis() map[string]string { + if o == nil || IsNil(o.Analysis) { + var ret map[string]string + return ret + } + return *o.Analysis +} + +// GetAnalysisOk returns a tuple with the Analysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallBranchAnalysisResponse) GetAnalysisOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Analysis) { + return nil, false + } + return o.Analysis, true +} + +// HasAnalysis returns a boolean if a field has been set. +func (o *CallBranchAnalysisResponse) HasAnalysis() bool { + if o != nil && !IsNil(o.Analysis) { + return true + } + + return false +} + +// SetAnalysis gets a reference to the given map[string]string and assigns it to the Analysis field. +func (o *CallBranchAnalysisResponse) SetAnalysis(v map[string]string) { + o.Analysis = &v +} + +// GetAnalyzedAt returns the AnalyzedAt field value if set, zero value otherwise. +func (o *CallBranchAnalysisResponse) GetAnalyzedAt() time.Time { + if o == nil || IsNil(o.AnalyzedAt) { + var ret time.Time + return ret + } + return *o.AnalyzedAt +} + +// GetAnalyzedAtOk returns a tuple with the AnalyzedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallBranchAnalysisResponse) GetAnalyzedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.AnalyzedAt) { + return nil, false + } + return o.AnalyzedAt, true +} + +// HasAnalyzedAt returns a boolean if a field has been set. +func (o *CallBranchAnalysisResponse) HasAnalyzedAt() bool { + if o != nil && !IsNil(o.AnalyzedAt) { + return true + } + + return false +} + +// SetAnalyzedAt gets a reference to the given time.Time and assigns it to the AnalyzedAt field. +func (o *CallBranchAnalysisResponse) SetAnalyzedAt(v time.Time) { + o.AnalyzedAt = &v +} + +func (o CallBranchAnalysisResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallBranchAnalysisResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallExecutionId) { + toSerialize["call_execution_id"] = o.CallExecutionId + } + if o.ScenarioId.IsSet() { + toSerialize["scenario_id"] = o.ScenarioId.Get() + } + if o.ScenarioName.IsSet() { + toSerialize["scenario_name"] = o.ScenarioName.Get() + } + if !IsNil(o.Analysis) { + toSerialize["analysis"] = o.Analysis + } + if !IsNil(o.AnalyzedAt) { + toSerialize["analyzed_at"] = o.AnalyzedAt + } + return toSerialize, nil +} + +type NullableCallBranchAnalysisResponse struct { + value *CallBranchAnalysisResponse + isSet bool +} + +func (v NullableCallBranchAnalysisResponse) Get() *CallBranchAnalysisResponse { + return v.value +} + +func (v *NullableCallBranchAnalysisResponse) Set(val *CallBranchAnalysisResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallBranchAnalysisResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallBranchAnalysisResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallBranchAnalysisResponse(val *CallBranchAnalysisResponse) *NullableCallBranchAnalysisResponse { + return &NullableCallBranchAnalysisResponse{value: val, isSet: true} +} + +func (v NullableCallBranchAnalysisResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallBranchAnalysisResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_branch_deviation_create_response.go b/go/futureagi/model_call_branch_deviation_create_response.go new file mode 100644 index 0000000..2ef7d7d --- /dev/null +++ b/go/futureagi/model_call_branch_deviation_create_response.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CallBranchDeviationCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallBranchDeviationCreateResponse{} + +// CallBranchDeviationCreateResponse struct for CallBranchDeviationCreateResponse +type CallBranchDeviationCreateResponse struct { + CallExecutionId *string `json:"call_execution_id,omitempty"` + ScenarioGraphId *string `json:"scenario_graph_id,omitempty"` + DeviationData *map[string]string `json:"deviation_data,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewCallBranchDeviationCreateResponse instantiates a new CallBranchDeviationCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallBranchDeviationCreateResponse() *CallBranchDeviationCreateResponse { + this := CallBranchDeviationCreateResponse{} + return &this +} + +// NewCallBranchDeviationCreateResponseWithDefaults instantiates a new CallBranchDeviationCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallBranchDeviationCreateResponseWithDefaults() *CallBranchDeviationCreateResponse { + this := CallBranchDeviationCreateResponse{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value if set, zero value otherwise. +func (o *CallBranchDeviationCreateResponse) GetCallExecutionId() string { + if o == nil || IsNil(o.CallExecutionId) { + var ret string + return ret + } + return *o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallBranchDeviationCreateResponse) GetCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.CallExecutionId) { + return nil, false + } + return o.CallExecutionId, true +} + +// HasCallExecutionId returns a boolean if a field has been set. +func (o *CallBranchDeviationCreateResponse) HasCallExecutionId() bool { + if o != nil && !IsNil(o.CallExecutionId) { + return true + } + + return false +} + +// SetCallExecutionId gets a reference to the given string and assigns it to the CallExecutionId field. +func (o *CallBranchDeviationCreateResponse) SetCallExecutionId(v string) { + o.CallExecutionId = &v +} + +// GetScenarioGraphId returns the ScenarioGraphId field value if set, zero value otherwise. +func (o *CallBranchDeviationCreateResponse) GetScenarioGraphId() string { + if o == nil || IsNil(o.ScenarioGraphId) { + var ret string + return ret + } + return *o.ScenarioGraphId +} + +// GetScenarioGraphIdOk returns a tuple with the ScenarioGraphId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallBranchDeviationCreateResponse) GetScenarioGraphIdOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioGraphId) { + return nil, false + } + return o.ScenarioGraphId, true +} + +// HasScenarioGraphId returns a boolean if a field has been set. +func (o *CallBranchDeviationCreateResponse) HasScenarioGraphId() bool { + if o != nil && !IsNil(o.ScenarioGraphId) { + return true + } + + return false +} + +// SetScenarioGraphId gets a reference to the given string and assigns it to the ScenarioGraphId field. +func (o *CallBranchDeviationCreateResponse) SetScenarioGraphId(v string) { + o.ScenarioGraphId = &v +} + +// GetDeviationData returns the DeviationData field value if set, zero value otherwise. +func (o *CallBranchDeviationCreateResponse) GetDeviationData() map[string]string { + if o == nil || IsNil(o.DeviationData) { + var ret map[string]string + return ret + } + return *o.DeviationData +} + +// GetDeviationDataOk returns a tuple with the DeviationData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallBranchDeviationCreateResponse) GetDeviationDataOk() (*map[string]string, bool) { + if o == nil || IsNil(o.DeviationData) { + return nil, false + } + return o.DeviationData, true +} + +// HasDeviationData returns a boolean if a field has been set. +func (o *CallBranchDeviationCreateResponse) HasDeviationData() bool { + if o != nil && !IsNil(o.DeviationData) { + return true + } + + return false +} + +// SetDeviationData gets a reference to the given map[string]string and assigns it to the DeviationData field. +func (o *CallBranchDeviationCreateResponse) SetDeviationData(v map[string]string) { + o.DeviationData = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CallBranchDeviationCreateResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallBranchDeviationCreateResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *CallBranchDeviationCreateResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *CallBranchDeviationCreateResponse) SetMessage(v string) { + o.Message = &v +} + +func (o CallBranchDeviationCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallBranchDeviationCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallExecutionId) { + toSerialize["call_execution_id"] = o.CallExecutionId + } + if !IsNil(o.ScenarioGraphId) { + toSerialize["scenario_graph_id"] = o.ScenarioGraphId + } + if !IsNil(o.DeviationData) { + toSerialize["deviation_data"] = o.DeviationData + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableCallBranchDeviationCreateResponse struct { + value *CallBranchDeviationCreateResponse + isSet bool +} + +func (v NullableCallBranchDeviationCreateResponse) Get() *CallBranchDeviationCreateResponse { + return v.value +} + +func (v *NullableCallBranchDeviationCreateResponse) Set(val *CallBranchDeviationCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallBranchDeviationCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallBranchDeviationCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallBranchDeviationCreateResponse(val *CallBranchDeviationCreateResponse) *NullableCallBranchDeviationCreateResponse { + return &NullableCallBranchDeviationCreateResponse{value: val, isSet: true} +} + +func (v NullableCallBranchDeviationCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallBranchDeviationCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution.go b/go/futureagi/model_call_execution.go new file mode 100644 index 0000000..d512425 --- /dev/null +++ b/go/futureagi/model_call_execution.go @@ -0,0 +1,1958 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the CallExecution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecution{} + +// CallExecution struct for CallExecution +type CallExecution struct { + Id *string `json:"id,omitempty"` + // Phone number called (null for TEXT/chat simulations) + PhoneNumber NullableString `json:"phone_number,omitempty"` + ServiceProviderCallId *string `json:"service_provider_call_id,omitempty"` + // Current status of the call + Status *string `json:"status,omitempty"` + // When the call started + StartedAt NullableTime `json:"started_at,omitempty"` + // When the call completed + CompletedAt NullableTime `json:"completed_at,omitempty"` + // Duration of the call in seconds + DurationSeconds NullableInt32 `json:"duration_seconds,omitempty"` + // URL to the call recording + RecordingUrl NullableString `json:"recording_url,omitempty"` + // Cost of the call in cents + CostCents NullableInt32 `json:"cost_cents,omitempty"` + // Additional metadata about the call + CallMetadata map[string]interface{} `json:"call_metadata,omitempty"` + // Error message if the call failed + ErrorMessage NullableString `json:"error_message,omitempty"` + ScenarioName *string `json:"scenario_name,omitempty"` + Transcripts *string `json:"transcripts,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // Complete call data from the provider. Format: dict[provider_name, data] where provider_name must be from SupportedProviders + ProviderCallData map[string]interface{} `json:"provider_call_data,omitempty"` + // Stereo recording URL from Vapi + StereoRecordingUrl NullableString `json:"stereo_recording_url,omitempty"` + // Reason why the call ended + EndedReason NullableString `json:"ended_reason,omitempty"` + // STT cost in cents + SttCostCents NullableInt32 `json:"stt_cost_cents,omitempty"` + // LLM cost in cents + LlmCostCents NullableInt32 `json:"llm_cost_cents,omitempty"` + // TTS cost in cents + TtsCostCents NullableInt32 `json:"tts_cost_cents,omitempty"` + // Overall call performance score + OverallScore NullableFloat32 `json:"overall_score,omitempty"` + // Average response time in milliseconds + ResponseTimeMs NullableInt32 `json:"response_time_ms,omitempty"` + ResponseTimeSeconds *string `json:"response_time_seconds,omitempty"` + // Assistant ID used for the call (system side) + AssistantId NullableString `json:"assistant_id,omitempty"` + // Customer phone number (E.164 format) + CustomerNumber NullableString `json:"customer_number,omitempty"` + // Type of call (e.g., outboundPhoneCall) + CallType NullableString `json:"call_type,omitempty"` + // When the call ended + EndedAt NullableTime `json:"ended_at,omitempty"` + // Call analysis data from the service provider + AnalysisData map[string]interface{} `json:"analysis_data,omitempty"` + // Call evaluation data from the service provider + EvaluationData map[string]interface{} `json:"evaluation_data,omitempty"` + // Number of messages in the call + MessageCount NullableInt32 `json:"message_count,omitempty"` + // Whether transcript is available + TranscriptAvailable *bool `json:"transcript_available,omitempty"` + // Whether recording is available + RecordingAvailable *bool `json:"recording_available,omitempty"` + // Evaluation output + EvalOutputs map[string]interface{} `json:"eval_outputs,omitempty"` + ErrorLocalizerTasks *string `json:"error_localizer_tasks,omitempty"` + // Call summary from the service + CallSummary NullableString `json:"call_summary,omitempty"` + AgentVersion NullableString `json:"agent_version,omitempty"` + // Total customer-reported cost in cents + CustomerCostCents NullableInt32 `json:"customer_cost_cents,omitempty"` + SystemMetrics *string `json:"system_metrics,omitempty"` + CostBreakdown *string `json:"cost_breakdown,omitempty"` + // Customer call ID if available + CustomerCallId NullableString `json:"customer_call_id,omitempty"` + // Type of simulation call + SimulationCallType *string `json:"simulation_call_type,omitempty"` + ProcessingSkipped *string `json:"processing_skipped,omitempty"` + ProcessingSkipReason *string `json:"processing_skip_reason,omitempty"` +} + +// NewCallExecution instantiates a new CallExecution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecution() *CallExecution { + this := CallExecution{} + return &this +} + +// NewCallExecutionWithDefaults instantiates a new CallExecution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionWithDefaults() *CallExecution { + this := CallExecution{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CallExecution) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CallExecution) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CallExecution) SetId(v string) { + o.Id = &v +} + +// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetPhoneNumber() string { + if o == nil || IsNil(o.PhoneNumber.Get()) { + var ret string + return ret + } + return *o.PhoneNumber.Get() +} + +// GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetPhoneNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PhoneNumber.Get(), o.PhoneNumber.IsSet() +} + +// HasPhoneNumber returns a boolean if a field has been set. +func (o *CallExecution) HasPhoneNumber() bool { + if o != nil && o.PhoneNumber.IsSet() { + return true + } + + return false +} + +// SetPhoneNumber gets a reference to the given NullableString and assigns it to the PhoneNumber field. +func (o *CallExecution) SetPhoneNumber(v string) { + o.PhoneNumber.Set(&v) +} + +// SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil +func (o *CallExecution) SetPhoneNumberNil() { + o.PhoneNumber.Set(nil) +} + +// UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil +func (o *CallExecution) UnsetPhoneNumber() { + o.PhoneNumber.Unset() +} + +// GetServiceProviderCallId returns the ServiceProviderCallId field value if set, zero value otherwise. +func (o *CallExecution) GetServiceProviderCallId() string { + if o == nil || IsNil(o.ServiceProviderCallId) { + var ret string + return ret + } + return *o.ServiceProviderCallId +} + +// GetServiceProviderCallIdOk returns a tuple with the ServiceProviderCallId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetServiceProviderCallIdOk() (*string, bool) { + if o == nil || IsNil(o.ServiceProviderCallId) { + return nil, false + } + return o.ServiceProviderCallId, true +} + +// HasServiceProviderCallId returns a boolean if a field has been set. +func (o *CallExecution) HasServiceProviderCallId() bool { + if o != nil && !IsNil(o.ServiceProviderCallId) { + return true + } + + return false +} + +// SetServiceProviderCallId gets a reference to the given string and assigns it to the ServiceProviderCallId field. +func (o *CallExecution) SetServiceProviderCallId(v string) { + o.ServiceProviderCallId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CallExecution) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CallExecution) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CallExecution) SetStatus(v string) { + o.Status = &v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt.Get()) { + var ret time.Time + return ret + } + return *o.StartedAt.Get() +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetStartedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.StartedAt.Get(), o.StartedAt.IsSet() +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *CallExecution) HasStartedAt() bool { + if o != nil && o.StartedAt.IsSet() { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given NullableTime and assigns it to the StartedAt field. +func (o *CallExecution) SetStartedAt(v time.Time) { + o.StartedAt.Set(&v) +} + +// SetStartedAtNil sets the value for StartedAt to be an explicit nil +func (o *CallExecution) SetStartedAtNil() { + o.StartedAt.Set(nil) +} + +// UnsetStartedAt ensures that no value is present for StartedAt, not even an explicit nil +func (o *CallExecution) UnsetStartedAt() { + o.StartedAt.Unset() +} + +// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetCompletedAt() time.Time { + if o == nil || IsNil(o.CompletedAt.Get()) { + var ret time.Time + return ret + } + return *o.CompletedAt.Get() +} + +// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetCompletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CompletedAt.Get(), o.CompletedAt.IsSet() +} + +// HasCompletedAt returns a boolean if a field has been set. +func (o *CallExecution) HasCompletedAt() bool { + if o != nil && o.CompletedAt.IsSet() { + return true + } + + return false +} + +// SetCompletedAt gets a reference to the given NullableTime and assigns it to the CompletedAt field. +func (o *CallExecution) SetCompletedAt(v time.Time) { + o.CompletedAt.Set(&v) +} + +// SetCompletedAtNil sets the value for CompletedAt to be an explicit nil +func (o *CallExecution) SetCompletedAtNil() { + o.CompletedAt.Set(nil) +} + +// UnsetCompletedAt ensures that no value is present for CompletedAt, not even an explicit nil +func (o *CallExecution) UnsetCompletedAt() { + o.CompletedAt.Unset() +} + +// GetDurationSeconds returns the DurationSeconds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetDurationSeconds() int32 { + if o == nil || IsNil(o.DurationSeconds.Get()) { + var ret int32 + return ret + } + return *o.DurationSeconds.Get() +} + +// GetDurationSecondsOk returns a tuple with the DurationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetDurationSecondsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.DurationSeconds.Get(), o.DurationSeconds.IsSet() +} + +// HasDurationSeconds returns a boolean if a field has been set. +func (o *CallExecution) HasDurationSeconds() bool { + if o != nil && o.DurationSeconds.IsSet() { + return true + } + + return false +} + +// SetDurationSeconds gets a reference to the given NullableInt32 and assigns it to the DurationSeconds field. +func (o *CallExecution) SetDurationSeconds(v int32) { + o.DurationSeconds.Set(&v) +} + +// SetDurationSecondsNil sets the value for DurationSeconds to be an explicit nil +func (o *CallExecution) SetDurationSecondsNil() { + o.DurationSeconds.Set(nil) +} + +// UnsetDurationSeconds ensures that no value is present for DurationSeconds, not even an explicit nil +func (o *CallExecution) UnsetDurationSeconds() { + o.DurationSeconds.Unset() +} + +// GetRecordingUrl returns the RecordingUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetRecordingUrl() string { + if o == nil || IsNil(o.RecordingUrl.Get()) { + var ret string + return ret + } + return *o.RecordingUrl.Get() +} + +// GetRecordingUrlOk returns a tuple with the RecordingUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetRecordingUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RecordingUrl.Get(), o.RecordingUrl.IsSet() +} + +// HasRecordingUrl returns a boolean if a field has been set. +func (o *CallExecution) HasRecordingUrl() bool { + if o != nil && o.RecordingUrl.IsSet() { + return true + } + + return false +} + +// SetRecordingUrl gets a reference to the given NullableString and assigns it to the RecordingUrl field. +func (o *CallExecution) SetRecordingUrl(v string) { + o.RecordingUrl.Set(&v) +} + +// SetRecordingUrlNil sets the value for RecordingUrl to be an explicit nil +func (o *CallExecution) SetRecordingUrlNil() { + o.RecordingUrl.Set(nil) +} + +// UnsetRecordingUrl ensures that no value is present for RecordingUrl, not even an explicit nil +func (o *CallExecution) UnsetRecordingUrl() { + o.RecordingUrl.Unset() +} + +// GetCostCents returns the CostCents field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetCostCents() int32 { + if o == nil || IsNil(o.CostCents.Get()) { + var ret int32 + return ret + } + return *o.CostCents.Get() +} + +// GetCostCentsOk returns a tuple with the CostCents field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetCostCentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.CostCents.Get(), o.CostCents.IsSet() +} + +// HasCostCents returns a boolean if a field has been set. +func (o *CallExecution) HasCostCents() bool { + if o != nil && o.CostCents.IsSet() { + return true + } + + return false +} + +// SetCostCents gets a reference to the given NullableInt32 and assigns it to the CostCents field. +func (o *CallExecution) SetCostCents(v int32) { + o.CostCents.Set(&v) +} + +// SetCostCentsNil sets the value for CostCents to be an explicit nil +func (o *CallExecution) SetCostCentsNil() { + o.CostCents.Set(nil) +} + +// UnsetCostCents ensures that no value is present for CostCents, not even an explicit nil +func (o *CallExecution) UnsetCostCents() { + o.CostCents.Unset() +} + +// GetCallMetadata returns the CallMetadata field value if set, zero value otherwise. +func (o *CallExecution) GetCallMetadata() map[string]interface{} { + if o == nil || IsNil(o.CallMetadata) { + var ret map[string]interface{} + return ret + } + return o.CallMetadata +} + +// GetCallMetadataOk returns a tuple with the CallMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetCallMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CallMetadata) { + return map[string]interface{}{}, false + } + return o.CallMetadata, true +} + +// HasCallMetadata returns a boolean if a field has been set. +func (o *CallExecution) HasCallMetadata() bool { + if o != nil && !IsNil(o.CallMetadata) { + return true + } + + return false +} + +// SetCallMetadata gets a reference to the given map[string]interface{} and assigns it to the CallMetadata field. +func (o *CallExecution) SetCallMetadata(v map[string]interface{}) { + o.CallMetadata = v +} + +// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetErrorMessage() string { + if o == nil || IsNil(o.ErrorMessage.Get()) { + var ret string + return ret + } + return *o.ErrorMessage.Get() +} + +// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetErrorMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ErrorMessage.Get(), o.ErrorMessage.IsSet() +} + +// HasErrorMessage returns a boolean if a field has been set. +func (o *CallExecution) HasErrorMessage() bool { + if o != nil && o.ErrorMessage.IsSet() { + return true + } + + return false +} + +// SetErrorMessage gets a reference to the given NullableString and assigns it to the ErrorMessage field. +func (o *CallExecution) SetErrorMessage(v string) { + o.ErrorMessage.Set(&v) +} + +// SetErrorMessageNil sets the value for ErrorMessage to be an explicit nil +func (o *CallExecution) SetErrorMessageNil() { + o.ErrorMessage.Set(nil) +} + +// UnsetErrorMessage ensures that no value is present for ErrorMessage, not even an explicit nil +func (o *CallExecution) UnsetErrorMessage() { + o.ErrorMessage.Unset() +} + +// GetScenarioName returns the ScenarioName field value if set, zero value otherwise. +func (o *CallExecution) GetScenarioName() string { + if o == nil || IsNil(o.ScenarioName) { + var ret string + return ret + } + return *o.ScenarioName +} + +// GetScenarioNameOk returns a tuple with the ScenarioName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetScenarioNameOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioName) { + return nil, false + } + return o.ScenarioName, true +} + +// HasScenarioName returns a boolean if a field has been set. +func (o *CallExecution) HasScenarioName() bool { + if o != nil && !IsNil(o.ScenarioName) { + return true + } + + return false +} + +// SetScenarioName gets a reference to the given string and assigns it to the ScenarioName field. +func (o *CallExecution) SetScenarioName(v string) { + o.ScenarioName = &v +} + +// GetTranscripts returns the Transcripts field value if set, zero value otherwise. +func (o *CallExecution) GetTranscripts() string { + if o == nil || IsNil(o.Transcripts) { + var ret string + return ret + } + return *o.Transcripts +} + +// GetTranscriptsOk returns a tuple with the Transcripts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetTranscriptsOk() (*string, bool) { + if o == nil || IsNil(o.Transcripts) { + return nil, false + } + return o.Transcripts, true +} + +// HasTranscripts returns a boolean if a field has been set. +func (o *CallExecution) HasTranscripts() bool { + if o != nil && !IsNil(o.Transcripts) { + return true + } + + return false +} + +// SetTranscripts gets a reference to the given string and assigns it to the Transcripts field. +func (o *CallExecution) SetTranscripts(v string) { + o.Transcripts = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CallExecution) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CallExecution) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CallExecution) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CallExecution) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CallExecution) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CallExecution) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetProviderCallData returns the ProviderCallData field value if set, zero value otherwise. +func (o *CallExecution) GetProviderCallData() map[string]interface{} { + if o == nil || IsNil(o.ProviderCallData) { + var ret map[string]interface{} + return ret + } + return o.ProviderCallData +} + +// GetProviderCallDataOk returns a tuple with the ProviderCallData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetProviderCallDataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ProviderCallData) { + return map[string]interface{}{}, false + } + return o.ProviderCallData, true +} + +// HasProviderCallData returns a boolean if a field has been set. +func (o *CallExecution) HasProviderCallData() bool { + if o != nil && !IsNil(o.ProviderCallData) { + return true + } + + return false +} + +// SetProviderCallData gets a reference to the given map[string]interface{} and assigns it to the ProviderCallData field. +func (o *CallExecution) SetProviderCallData(v map[string]interface{}) { + o.ProviderCallData = v +} + +// GetStereoRecordingUrl returns the StereoRecordingUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetStereoRecordingUrl() string { + if o == nil || IsNil(o.StereoRecordingUrl.Get()) { + var ret string + return ret + } + return *o.StereoRecordingUrl.Get() +} + +// GetStereoRecordingUrlOk returns a tuple with the StereoRecordingUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetStereoRecordingUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StereoRecordingUrl.Get(), o.StereoRecordingUrl.IsSet() +} + +// HasStereoRecordingUrl returns a boolean if a field has been set. +func (o *CallExecution) HasStereoRecordingUrl() bool { + if o != nil && o.StereoRecordingUrl.IsSet() { + return true + } + + return false +} + +// SetStereoRecordingUrl gets a reference to the given NullableString and assigns it to the StereoRecordingUrl field. +func (o *CallExecution) SetStereoRecordingUrl(v string) { + o.StereoRecordingUrl.Set(&v) +} + +// SetStereoRecordingUrlNil sets the value for StereoRecordingUrl to be an explicit nil +func (o *CallExecution) SetStereoRecordingUrlNil() { + o.StereoRecordingUrl.Set(nil) +} + +// UnsetStereoRecordingUrl ensures that no value is present for StereoRecordingUrl, not even an explicit nil +func (o *CallExecution) UnsetStereoRecordingUrl() { + o.StereoRecordingUrl.Unset() +} + +// GetEndedReason returns the EndedReason field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetEndedReason() string { + if o == nil || IsNil(o.EndedReason.Get()) { + var ret string + return ret + } + return *o.EndedReason.Get() +} + +// GetEndedReasonOk returns a tuple with the EndedReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetEndedReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EndedReason.Get(), o.EndedReason.IsSet() +} + +// HasEndedReason returns a boolean if a field has been set. +func (o *CallExecution) HasEndedReason() bool { + if o != nil && o.EndedReason.IsSet() { + return true + } + + return false +} + +// SetEndedReason gets a reference to the given NullableString and assigns it to the EndedReason field. +func (o *CallExecution) SetEndedReason(v string) { + o.EndedReason.Set(&v) +} + +// SetEndedReasonNil sets the value for EndedReason to be an explicit nil +func (o *CallExecution) SetEndedReasonNil() { + o.EndedReason.Set(nil) +} + +// UnsetEndedReason ensures that no value is present for EndedReason, not even an explicit nil +func (o *CallExecution) UnsetEndedReason() { + o.EndedReason.Unset() +} + +// GetSttCostCents returns the SttCostCents field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetSttCostCents() int32 { + if o == nil || IsNil(o.SttCostCents.Get()) { + var ret int32 + return ret + } + return *o.SttCostCents.Get() +} + +// GetSttCostCentsOk returns a tuple with the SttCostCents field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetSttCostCentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.SttCostCents.Get(), o.SttCostCents.IsSet() +} + +// HasSttCostCents returns a boolean if a field has been set. +func (o *CallExecution) HasSttCostCents() bool { + if o != nil && o.SttCostCents.IsSet() { + return true + } + + return false +} + +// SetSttCostCents gets a reference to the given NullableInt32 and assigns it to the SttCostCents field. +func (o *CallExecution) SetSttCostCents(v int32) { + o.SttCostCents.Set(&v) +} + +// SetSttCostCentsNil sets the value for SttCostCents to be an explicit nil +func (o *CallExecution) SetSttCostCentsNil() { + o.SttCostCents.Set(nil) +} + +// UnsetSttCostCents ensures that no value is present for SttCostCents, not even an explicit nil +func (o *CallExecution) UnsetSttCostCents() { + o.SttCostCents.Unset() +} + +// GetLlmCostCents returns the LlmCostCents field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetLlmCostCents() int32 { + if o == nil || IsNil(o.LlmCostCents.Get()) { + var ret int32 + return ret + } + return *o.LlmCostCents.Get() +} + +// GetLlmCostCentsOk returns a tuple with the LlmCostCents field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetLlmCostCentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.LlmCostCents.Get(), o.LlmCostCents.IsSet() +} + +// HasLlmCostCents returns a boolean if a field has been set. +func (o *CallExecution) HasLlmCostCents() bool { + if o != nil && o.LlmCostCents.IsSet() { + return true + } + + return false +} + +// SetLlmCostCents gets a reference to the given NullableInt32 and assigns it to the LlmCostCents field. +func (o *CallExecution) SetLlmCostCents(v int32) { + o.LlmCostCents.Set(&v) +} + +// SetLlmCostCentsNil sets the value for LlmCostCents to be an explicit nil +func (o *CallExecution) SetLlmCostCentsNil() { + o.LlmCostCents.Set(nil) +} + +// UnsetLlmCostCents ensures that no value is present for LlmCostCents, not even an explicit nil +func (o *CallExecution) UnsetLlmCostCents() { + o.LlmCostCents.Unset() +} + +// GetTtsCostCents returns the TtsCostCents field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetTtsCostCents() int32 { + if o == nil || IsNil(o.TtsCostCents.Get()) { + var ret int32 + return ret + } + return *o.TtsCostCents.Get() +} + +// GetTtsCostCentsOk returns a tuple with the TtsCostCents field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetTtsCostCentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.TtsCostCents.Get(), o.TtsCostCents.IsSet() +} + +// HasTtsCostCents returns a boolean if a field has been set. +func (o *CallExecution) HasTtsCostCents() bool { + if o != nil && o.TtsCostCents.IsSet() { + return true + } + + return false +} + +// SetTtsCostCents gets a reference to the given NullableInt32 and assigns it to the TtsCostCents field. +func (o *CallExecution) SetTtsCostCents(v int32) { + o.TtsCostCents.Set(&v) +} + +// SetTtsCostCentsNil sets the value for TtsCostCents to be an explicit nil +func (o *CallExecution) SetTtsCostCentsNil() { + o.TtsCostCents.Set(nil) +} + +// UnsetTtsCostCents ensures that no value is present for TtsCostCents, not even an explicit nil +func (o *CallExecution) UnsetTtsCostCents() { + o.TtsCostCents.Unset() +} + +// GetOverallScore returns the OverallScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetOverallScore() float32 { + if o == nil || IsNil(o.OverallScore.Get()) { + var ret float32 + return ret + } + return *o.OverallScore.Get() +} + +// GetOverallScoreOk returns a tuple with the OverallScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetOverallScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.OverallScore.Get(), o.OverallScore.IsSet() +} + +// HasOverallScore returns a boolean if a field has been set. +func (o *CallExecution) HasOverallScore() bool { + if o != nil && o.OverallScore.IsSet() { + return true + } + + return false +} + +// SetOverallScore gets a reference to the given NullableFloat32 and assigns it to the OverallScore field. +func (o *CallExecution) SetOverallScore(v float32) { + o.OverallScore.Set(&v) +} + +// SetOverallScoreNil sets the value for OverallScore to be an explicit nil +func (o *CallExecution) SetOverallScoreNil() { + o.OverallScore.Set(nil) +} + +// UnsetOverallScore ensures that no value is present for OverallScore, not even an explicit nil +func (o *CallExecution) UnsetOverallScore() { + o.OverallScore.Unset() +} + +// GetResponseTimeMs returns the ResponseTimeMs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetResponseTimeMs() int32 { + if o == nil || IsNil(o.ResponseTimeMs.Get()) { + var ret int32 + return ret + } + return *o.ResponseTimeMs.Get() +} + +// GetResponseTimeMsOk returns a tuple with the ResponseTimeMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetResponseTimeMsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ResponseTimeMs.Get(), o.ResponseTimeMs.IsSet() +} + +// HasResponseTimeMs returns a boolean if a field has been set. +func (o *CallExecution) HasResponseTimeMs() bool { + if o != nil && o.ResponseTimeMs.IsSet() { + return true + } + + return false +} + +// SetResponseTimeMs gets a reference to the given NullableInt32 and assigns it to the ResponseTimeMs field. +func (o *CallExecution) SetResponseTimeMs(v int32) { + o.ResponseTimeMs.Set(&v) +} + +// SetResponseTimeMsNil sets the value for ResponseTimeMs to be an explicit nil +func (o *CallExecution) SetResponseTimeMsNil() { + o.ResponseTimeMs.Set(nil) +} + +// UnsetResponseTimeMs ensures that no value is present for ResponseTimeMs, not even an explicit nil +func (o *CallExecution) UnsetResponseTimeMs() { + o.ResponseTimeMs.Unset() +} + +// GetResponseTimeSeconds returns the ResponseTimeSeconds field value if set, zero value otherwise. +func (o *CallExecution) GetResponseTimeSeconds() string { + if o == nil || IsNil(o.ResponseTimeSeconds) { + var ret string + return ret + } + return *o.ResponseTimeSeconds +} + +// GetResponseTimeSecondsOk returns a tuple with the ResponseTimeSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetResponseTimeSecondsOk() (*string, bool) { + if o == nil || IsNil(o.ResponseTimeSeconds) { + return nil, false + } + return o.ResponseTimeSeconds, true +} + +// HasResponseTimeSeconds returns a boolean if a field has been set. +func (o *CallExecution) HasResponseTimeSeconds() bool { + if o != nil && !IsNil(o.ResponseTimeSeconds) { + return true + } + + return false +} + +// SetResponseTimeSeconds gets a reference to the given string and assigns it to the ResponseTimeSeconds field. +func (o *CallExecution) SetResponseTimeSeconds(v string) { + o.ResponseTimeSeconds = &v +} + +// GetAssistantId returns the AssistantId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetAssistantId() string { + if o == nil || IsNil(o.AssistantId.Get()) { + var ret string + return ret + } + return *o.AssistantId.Get() +} + +// GetAssistantIdOk returns a tuple with the AssistantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetAssistantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AssistantId.Get(), o.AssistantId.IsSet() +} + +// HasAssistantId returns a boolean if a field has been set. +func (o *CallExecution) HasAssistantId() bool { + if o != nil && o.AssistantId.IsSet() { + return true + } + + return false +} + +// SetAssistantId gets a reference to the given NullableString and assigns it to the AssistantId field. +func (o *CallExecution) SetAssistantId(v string) { + o.AssistantId.Set(&v) +} + +// SetAssistantIdNil sets the value for AssistantId to be an explicit nil +func (o *CallExecution) SetAssistantIdNil() { + o.AssistantId.Set(nil) +} + +// UnsetAssistantId ensures that no value is present for AssistantId, not even an explicit nil +func (o *CallExecution) UnsetAssistantId() { + o.AssistantId.Unset() +} + +// GetCustomerNumber returns the CustomerNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetCustomerNumber() string { + if o == nil || IsNil(o.CustomerNumber.Get()) { + var ret string + return ret + } + return *o.CustomerNumber.Get() +} + +// GetCustomerNumberOk returns a tuple with the CustomerNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetCustomerNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomerNumber.Get(), o.CustomerNumber.IsSet() +} + +// HasCustomerNumber returns a boolean if a field has been set. +func (o *CallExecution) HasCustomerNumber() bool { + if o != nil && o.CustomerNumber.IsSet() { + return true + } + + return false +} + +// SetCustomerNumber gets a reference to the given NullableString and assigns it to the CustomerNumber field. +func (o *CallExecution) SetCustomerNumber(v string) { + o.CustomerNumber.Set(&v) +} + +// SetCustomerNumberNil sets the value for CustomerNumber to be an explicit nil +func (o *CallExecution) SetCustomerNumberNil() { + o.CustomerNumber.Set(nil) +} + +// UnsetCustomerNumber ensures that no value is present for CustomerNumber, not even an explicit nil +func (o *CallExecution) UnsetCustomerNumber() { + o.CustomerNumber.Unset() +} + +// GetCallType returns the CallType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetCallType() string { + if o == nil || IsNil(o.CallType.Get()) { + var ret string + return ret + } + return *o.CallType.Get() +} + +// GetCallTypeOk returns a tuple with the CallType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetCallTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CallType.Get(), o.CallType.IsSet() +} + +// HasCallType returns a boolean if a field has been set. +func (o *CallExecution) HasCallType() bool { + if o != nil && o.CallType.IsSet() { + return true + } + + return false +} + +// SetCallType gets a reference to the given NullableString and assigns it to the CallType field. +func (o *CallExecution) SetCallType(v string) { + o.CallType.Set(&v) +} + +// SetCallTypeNil sets the value for CallType to be an explicit nil +func (o *CallExecution) SetCallTypeNil() { + o.CallType.Set(nil) +} + +// UnsetCallType ensures that no value is present for CallType, not even an explicit nil +func (o *CallExecution) UnsetCallType() { + o.CallType.Unset() +} + +// GetEndedAt returns the EndedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetEndedAt() time.Time { + if o == nil || IsNil(o.EndedAt.Get()) { + var ret time.Time + return ret + } + return *o.EndedAt.Get() +} + +// GetEndedAtOk returns a tuple with the EndedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetEndedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.EndedAt.Get(), o.EndedAt.IsSet() +} + +// HasEndedAt returns a boolean if a field has been set. +func (o *CallExecution) HasEndedAt() bool { + if o != nil && o.EndedAt.IsSet() { + return true + } + + return false +} + +// SetEndedAt gets a reference to the given NullableTime and assigns it to the EndedAt field. +func (o *CallExecution) SetEndedAt(v time.Time) { + o.EndedAt.Set(&v) +} + +// SetEndedAtNil sets the value for EndedAt to be an explicit nil +func (o *CallExecution) SetEndedAtNil() { + o.EndedAt.Set(nil) +} + +// UnsetEndedAt ensures that no value is present for EndedAt, not even an explicit nil +func (o *CallExecution) UnsetEndedAt() { + o.EndedAt.Unset() +} + +// GetAnalysisData returns the AnalysisData field value if set, zero value otherwise. +func (o *CallExecution) GetAnalysisData() map[string]interface{} { + if o == nil || IsNil(o.AnalysisData) { + var ret map[string]interface{} + return ret + } + return o.AnalysisData +} + +// GetAnalysisDataOk returns a tuple with the AnalysisData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetAnalysisDataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.AnalysisData) { + return map[string]interface{}{}, false + } + return o.AnalysisData, true +} + +// HasAnalysisData returns a boolean if a field has been set. +func (o *CallExecution) HasAnalysisData() bool { + if o != nil && !IsNil(o.AnalysisData) { + return true + } + + return false +} + +// SetAnalysisData gets a reference to the given map[string]interface{} and assigns it to the AnalysisData field. +func (o *CallExecution) SetAnalysisData(v map[string]interface{}) { + o.AnalysisData = v +} + +// GetEvaluationData returns the EvaluationData field value if set, zero value otherwise. +func (o *CallExecution) GetEvaluationData() map[string]interface{} { + if o == nil || IsNil(o.EvaluationData) { + var ret map[string]interface{} + return ret + } + return o.EvaluationData +} + +// GetEvaluationDataOk returns a tuple with the EvaluationData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetEvaluationDataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvaluationData) { + return map[string]interface{}{}, false + } + return o.EvaluationData, true +} + +// HasEvaluationData returns a boolean if a field has been set. +func (o *CallExecution) HasEvaluationData() bool { + if o != nil && !IsNil(o.EvaluationData) { + return true + } + + return false +} + +// SetEvaluationData gets a reference to the given map[string]interface{} and assigns it to the EvaluationData field. +func (o *CallExecution) SetEvaluationData(v map[string]interface{}) { + o.EvaluationData = v +} + +// GetMessageCount returns the MessageCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetMessageCount() int32 { + if o == nil || IsNil(o.MessageCount.Get()) { + var ret int32 + return ret + } + return *o.MessageCount.Get() +} + +// GetMessageCountOk returns a tuple with the MessageCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetMessageCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.MessageCount.Get(), o.MessageCount.IsSet() +} + +// HasMessageCount returns a boolean if a field has been set. +func (o *CallExecution) HasMessageCount() bool { + if o != nil && o.MessageCount.IsSet() { + return true + } + + return false +} + +// SetMessageCount gets a reference to the given NullableInt32 and assigns it to the MessageCount field. +func (o *CallExecution) SetMessageCount(v int32) { + o.MessageCount.Set(&v) +} + +// SetMessageCountNil sets the value for MessageCount to be an explicit nil +func (o *CallExecution) SetMessageCountNil() { + o.MessageCount.Set(nil) +} + +// UnsetMessageCount ensures that no value is present for MessageCount, not even an explicit nil +func (o *CallExecution) UnsetMessageCount() { + o.MessageCount.Unset() +} + +// GetTranscriptAvailable returns the TranscriptAvailable field value if set, zero value otherwise. +func (o *CallExecution) GetTranscriptAvailable() bool { + if o == nil || IsNil(o.TranscriptAvailable) { + var ret bool + return ret + } + return *o.TranscriptAvailable +} + +// GetTranscriptAvailableOk returns a tuple with the TranscriptAvailable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetTranscriptAvailableOk() (*bool, bool) { + if o == nil || IsNil(o.TranscriptAvailable) { + return nil, false + } + return o.TranscriptAvailable, true +} + +// HasTranscriptAvailable returns a boolean if a field has been set. +func (o *CallExecution) HasTranscriptAvailable() bool { + if o != nil && !IsNil(o.TranscriptAvailable) { + return true + } + + return false +} + +// SetTranscriptAvailable gets a reference to the given bool and assigns it to the TranscriptAvailable field. +func (o *CallExecution) SetTranscriptAvailable(v bool) { + o.TranscriptAvailable = &v +} + +// GetRecordingAvailable returns the RecordingAvailable field value if set, zero value otherwise. +func (o *CallExecution) GetRecordingAvailable() bool { + if o == nil || IsNil(o.RecordingAvailable) { + var ret bool + return ret + } + return *o.RecordingAvailable +} + +// GetRecordingAvailableOk returns a tuple with the RecordingAvailable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetRecordingAvailableOk() (*bool, bool) { + if o == nil || IsNil(o.RecordingAvailable) { + return nil, false + } + return o.RecordingAvailable, true +} + +// HasRecordingAvailable returns a boolean if a field has been set. +func (o *CallExecution) HasRecordingAvailable() bool { + if o != nil && !IsNil(o.RecordingAvailable) { + return true + } + + return false +} + +// SetRecordingAvailable gets a reference to the given bool and assigns it to the RecordingAvailable field. +func (o *CallExecution) SetRecordingAvailable(v bool) { + o.RecordingAvailable = &v +} + +// GetEvalOutputs returns the EvalOutputs field value if set, zero value otherwise. +func (o *CallExecution) GetEvalOutputs() map[string]interface{} { + if o == nil || IsNil(o.EvalOutputs) { + var ret map[string]interface{} + return ret + } + return o.EvalOutputs +} + +// GetEvalOutputsOk returns a tuple with the EvalOutputs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetEvalOutputsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalOutputs) { + return map[string]interface{}{}, false + } + return o.EvalOutputs, true +} + +// HasEvalOutputs returns a boolean if a field has been set. +func (o *CallExecution) HasEvalOutputs() bool { + if o != nil && !IsNil(o.EvalOutputs) { + return true + } + + return false +} + +// SetEvalOutputs gets a reference to the given map[string]interface{} and assigns it to the EvalOutputs field. +func (o *CallExecution) SetEvalOutputs(v map[string]interface{}) { + o.EvalOutputs = v +} + +// GetErrorLocalizerTasks returns the ErrorLocalizerTasks field value if set, zero value otherwise. +func (o *CallExecution) GetErrorLocalizerTasks() string { + if o == nil || IsNil(o.ErrorLocalizerTasks) { + var ret string + return ret + } + return *o.ErrorLocalizerTasks +} + +// GetErrorLocalizerTasksOk returns a tuple with the ErrorLocalizerTasks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetErrorLocalizerTasksOk() (*string, bool) { + if o == nil || IsNil(o.ErrorLocalizerTasks) { + return nil, false + } + return o.ErrorLocalizerTasks, true +} + +// HasErrorLocalizerTasks returns a boolean if a field has been set. +func (o *CallExecution) HasErrorLocalizerTasks() bool { + if o != nil && !IsNil(o.ErrorLocalizerTasks) { + return true + } + + return false +} + +// SetErrorLocalizerTasks gets a reference to the given string and assigns it to the ErrorLocalizerTasks field. +func (o *CallExecution) SetErrorLocalizerTasks(v string) { + o.ErrorLocalizerTasks = &v +} + +// GetCallSummary returns the CallSummary field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetCallSummary() string { + if o == nil || IsNil(o.CallSummary.Get()) { + var ret string + return ret + } + return *o.CallSummary.Get() +} + +// GetCallSummaryOk returns a tuple with the CallSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetCallSummaryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CallSummary.Get(), o.CallSummary.IsSet() +} + +// HasCallSummary returns a boolean if a field has been set. +func (o *CallExecution) HasCallSummary() bool { + if o != nil && o.CallSummary.IsSet() { + return true + } + + return false +} + +// SetCallSummary gets a reference to the given NullableString and assigns it to the CallSummary field. +func (o *CallExecution) SetCallSummary(v string) { + o.CallSummary.Set(&v) +} + +// SetCallSummaryNil sets the value for CallSummary to be an explicit nil +func (o *CallExecution) SetCallSummaryNil() { + o.CallSummary.Set(nil) +} + +// UnsetCallSummary ensures that no value is present for CallSummary, not even an explicit nil +func (o *CallExecution) UnsetCallSummary() { + o.CallSummary.Unset() +} + +// GetAgentVersion returns the AgentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetAgentVersion() string { + if o == nil || IsNil(o.AgentVersion.Get()) { + var ret string + return ret + } + return *o.AgentVersion.Get() +} + +// GetAgentVersionOk returns a tuple with the AgentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetAgentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentVersion.Get(), o.AgentVersion.IsSet() +} + +// HasAgentVersion returns a boolean if a field has been set. +func (o *CallExecution) HasAgentVersion() bool { + if o != nil && o.AgentVersion.IsSet() { + return true + } + + return false +} + +// SetAgentVersion gets a reference to the given NullableString and assigns it to the AgentVersion field. +func (o *CallExecution) SetAgentVersion(v string) { + o.AgentVersion.Set(&v) +} + +// SetAgentVersionNil sets the value for AgentVersion to be an explicit nil +func (o *CallExecution) SetAgentVersionNil() { + o.AgentVersion.Set(nil) +} + +// UnsetAgentVersion ensures that no value is present for AgentVersion, not even an explicit nil +func (o *CallExecution) UnsetAgentVersion() { + o.AgentVersion.Unset() +} + +// GetCustomerCostCents returns the CustomerCostCents field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetCustomerCostCents() int32 { + if o == nil || IsNil(o.CustomerCostCents.Get()) { + var ret int32 + return ret + } + return *o.CustomerCostCents.Get() +} + +// GetCustomerCostCentsOk returns a tuple with the CustomerCostCents field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetCustomerCostCentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.CustomerCostCents.Get(), o.CustomerCostCents.IsSet() +} + +// HasCustomerCostCents returns a boolean if a field has been set. +func (o *CallExecution) HasCustomerCostCents() bool { + if o != nil && o.CustomerCostCents.IsSet() { + return true + } + + return false +} + +// SetCustomerCostCents gets a reference to the given NullableInt32 and assigns it to the CustomerCostCents field. +func (o *CallExecution) SetCustomerCostCents(v int32) { + o.CustomerCostCents.Set(&v) +} + +// SetCustomerCostCentsNil sets the value for CustomerCostCents to be an explicit nil +func (o *CallExecution) SetCustomerCostCentsNil() { + o.CustomerCostCents.Set(nil) +} + +// UnsetCustomerCostCents ensures that no value is present for CustomerCostCents, not even an explicit nil +func (o *CallExecution) UnsetCustomerCostCents() { + o.CustomerCostCents.Unset() +} + +// GetSystemMetrics returns the SystemMetrics field value if set, zero value otherwise. +func (o *CallExecution) GetSystemMetrics() string { + if o == nil || IsNil(o.SystemMetrics) { + var ret string + return ret + } + return *o.SystemMetrics +} + +// GetSystemMetricsOk returns a tuple with the SystemMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetSystemMetricsOk() (*string, bool) { + if o == nil || IsNil(o.SystemMetrics) { + return nil, false + } + return o.SystemMetrics, true +} + +// HasSystemMetrics returns a boolean if a field has been set. +func (o *CallExecution) HasSystemMetrics() bool { + if o != nil && !IsNil(o.SystemMetrics) { + return true + } + + return false +} + +// SetSystemMetrics gets a reference to the given string and assigns it to the SystemMetrics field. +func (o *CallExecution) SetSystemMetrics(v string) { + o.SystemMetrics = &v +} + +// GetCostBreakdown returns the CostBreakdown field value if set, zero value otherwise. +func (o *CallExecution) GetCostBreakdown() string { + if o == nil || IsNil(o.CostBreakdown) { + var ret string + return ret + } + return *o.CostBreakdown +} + +// GetCostBreakdownOk returns a tuple with the CostBreakdown field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetCostBreakdownOk() (*string, bool) { + if o == nil || IsNil(o.CostBreakdown) { + return nil, false + } + return o.CostBreakdown, true +} + +// HasCostBreakdown returns a boolean if a field has been set. +func (o *CallExecution) HasCostBreakdown() bool { + if o != nil && !IsNil(o.CostBreakdown) { + return true + } + + return false +} + +// SetCostBreakdown gets a reference to the given string and assigns it to the CostBreakdown field. +func (o *CallExecution) SetCostBreakdown(v string) { + o.CostBreakdown = &v +} + +// GetCustomerCallId returns the CustomerCallId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecution) GetCustomerCallId() string { + if o == nil || IsNil(o.CustomerCallId.Get()) { + var ret string + return ret + } + return *o.CustomerCallId.Get() +} + +// GetCustomerCallIdOk returns a tuple with the CustomerCallId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecution) GetCustomerCallIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomerCallId.Get(), o.CustomerCallId.IsSet() +} + +// HasCustomerCallId returns a boolean if a field has been set. +func (o *CallExecution) HasCustomerCallId() bool { + if o != nil && o.CustomerCallId.IsSet() { + return true + } + + return false +} + +// SetCustomerCallId gets a reference to the given NullableString and assigns it to the CustomerCallId field. +func (o *CallExecution) SetCustomerCallId(v string) { + o.CustomerCallId.Set(&v) +} + +// SetCustomerCallIdNil sets the value for CustomerCallId to be an explicit nil +func (o *CallExecution) SetCustomerCallIdNil() { + o.CustomerCallId.Set(nil) +} + +// UnsetCustomerCallId ensures that no value is present for CustomerCallId, not even an explicit nil +func (o *CallExecution) UnsetCustomerCallId() { + o.CustomerCallId.Unset() +} + +// GetSimulationCallType returns the SimulationCallType field value if set, zero value otherwise. +func (o *CallExecution) GetSimulationCallType() string { + if o == nil || IsNil(o.SimulationCallType) { + var ret string + return ret + } + return *o.SimulationCallType +} + +// GetSimulationCallTypeOk returns a tuple with the SimulationCallType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetSimulationCallTypeOk() (*string, bool) { + if o == nil || IsNil(o.SimulationCallType) { + return nil, false + } + return o.SimulationCallType, true +} + +// HasSimulationCallType returns a boolean if a field has been set. +func (o *CallExecution) HasSimulationCallType() bool { + if o != nil && !IsNil(o.SimulationCallType) { + return true + } + + return false +} + +// SetSimulationCallType gets a reference to the given string and assigns it to the SimulationCallType field. +func (o *CallExecution) SetSimulationCallType(v string) { + o.SimulationCallType = &v +} + +// GetProcessingSkipped returns the ProcessingSkipped field value if set, zero value otherwise. +func (o *CallExecution) GetProcessingSkipped() string { + if o == nil || IsNil(o.ProcessingSkipped) { + var ret string + return ret + } + return *o.ProcessingSkipped +} + +// GetProcessingSkippedOk returns a tuple with the ProcessingSkipped field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetProcessingSkippedOk() (*string, bool) { + if o == nil || IsNil(o.ProcessingSkipped) { + return nil, false + } + return o.ProcessingSkipped, true +} + +// HasProcessingSkipped returns a boolean if a field has been set. +func (o *CallExecution) HasProcessingSkipped() bool { + if o != nil && !IsNil(o.ProcessingSkipped) { + return true + } + + return false +} + +// SetProcessingSkipped gets a reference to the given string and assigns it to the ProcessingSkipped field. +func (o *CallExecution) SetProcessingSkipped(v string) { + o.ProcessingSkipped = &v +} + +// GetProcessingSkipReason returns the ProcessingSkipReason field value if set, zero value otherwise. +func (o *CallExecution) GetProcessingSkipReason() string { + if o == nil || IsNil(o.ProcessingSkipReason) { + var ret string + return ret + } + return *o.ProcessingSkipReason +} + +// GetProcessingSkipReasonOk returns a tuple with the ProcessingSkipReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecution) GetProcessingSkipReasonOk() (*string, bool) { + if o == nil || IsNil(o.ProcessingSkipReason) { + return nil, false + } + return o.ProcessingSkipReason, true +} + +// HasProcessingSkipReason returns a boolean if a field has been set. +func (o *CallExecution) HasProcessingSkipReason() bool { + if o != nil && !IsNil(o.ProcessingSkipReason) { + return true + } + + return false +} + +// SetProcessingSkipReason gets a reference to the given string and assigns it to the ProcessingSkipReason field. +func (o *CallExecution) SetProcessingSkipReason(v string) { + o.ProcessingSkipReason = &v +} + +func (o CallExecution) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.PhoneNumber.IsSet() { + toSerialize["phone_number"] = o.PhoneNumber.Get() + } + if !IsNil(o.ServiceProviderCallId) { + toSerialize["service_provider_call_id"] = o.ServiceProviderCallId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.StartedAt.IsSet() { + toSerialize["started_at"] = o.StartedAt.Get() + } + if o.CompletedAt.IsSet() { + toSerialize["completed_at"] = o.CompletedAt.Get() + } + if o.DurationSeconds.IsSet() { + toSerialize["duration_seconds"] = o.DurationSeconds.Get() + } + if o.RecordingUrl.IsSet() { + toSerialize["recording_url"] = o.RecordingUrl.Get() + } + if o.CostCents.IsSet() { + toSerialize["cost_cents"] = o.CostCents.Get() + } + if !IsNil(o.CallMetadata) { + toSerialize["call_metadata"] = o.CallMetadata + } + if o.ErrorMessage.IsSet() { + toSerialize["error_message"] = o.ErrorMessage.Get() + } + if !IsNil(o.ScenarioName) { + toSerialize["scenario_name"] = o.ScenarioName + } + if !IsNil(o.Transcripts) { + toSerialize["transcripts"] = o.Transcripts + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.ProviderCallData) { + toSerialize["provider_call_data"] = o.ProviderCallData + } + if o.StereoRecordingUrl.IsSet() { + toSerialize["stereo_recording_url"] = o.StereoRecordingUrl.Get() + } + if o.EndedReason.IsSet() { + toSerialize["ended_reason"] = o.EndedReason.Get() + } + if o.SttCostCents.IsSet() { + toSerialize["stt_cost_cents"] = o.SttCostCents.Get() + } + if o.LlmCostCents.IsSet() { + toSerialize["llm_cost_cents"] = o.LlmCostCents.Get() + } + if o.TtsCostCents.IsSet() { + toSerialize["tts_cost_cents"] = o.TtsCostCents.Get() + } + if o.OverallScore.IsSet() { + toSerialize["overall_score"] = o.OverallScore.Get() + } + if o.ResponseTimeMs.IsSet() { + toSerialize["response_time_ms"] = o.ResponseTimeMs.Get() + } + if !IsNil(o.ResponseTimeSeconds) { + toSerialize["response_time_seconds"] = o.ResponseTimeSeconds + } + if o.AssistantId.IsSet() { + toSerialize["assistant_id"] = o.AssistantId.Get() + } + if o.CustomerNumber.IsSet() { + toSerialize["customer_number"] = o.CustomerNumber.Get() + } + if o.CallType.IsSet() { + toSerialize["call_type"] = o.CallType.Get() + } + if o.EndedAt.IsSet() { + toSerialize["ended_at"] = o.EndedAt.Get() + } + if !IsNil(o.AnalysisData) { + toSerialize["analysis_data"] = o.AnalysisData + } + if !IsNil(o.EvaluationData) { + toSerialize["evaluation_data"] = o.EvaluationData + } + if o.MessageCount.IsSet() { + toSerialize["message_count"] = o.MessageCount.Get() + } + if !IsNil(o.TranscriptAvailable) { + toSerialize["transcript_available"] = o.TranscriptAvailable + } + if !IsNil(o.RecordingAvailable) { + toSerialize["recording_available"] = o.RecordingAvailable + } + if !IsNil(o.EvalOutputs) { + toSerialize["eval_outputs"] = o.EvalOutputs + } + if !IsNil(o.ErrorLocalizerTasks) { + toSerialize["error_localizer_tasks"] = o.ErrorLocalizerTasks + } + if o.CallSummary.IsSet() { + toSerialize["call_summary"] = o.CallSummary.Get() + } + if o.AgentVersion.IsSet() { + toSerialize["agent_version"] = o.AgentVersion.Get() + } + if o.CustomerCostCents.IsSet() { + toSerialize["customer_cost_cents"] = o.CustomerCostCents.Get() + } + if !IsNil(o.SystemMetrics) { + toSerialize["system_metrics"] = o.SystemMetrics + } + if !IsNil(o.CostBreakdown) { + toSerialize["cost_breakdown"] = o.CostBreakdown + } + if o.CustomerCallId.IsSet() { + toSerialize["customer_call_id"] = o.CustomerCallId.Get() + } + if !IsNil(o.SimulationCallType) { + toSerialize["simulation_call_type"] = o.SimulationCallType + } + if !IsNil(o.ProcessingSkipped) { + toSerialize["processing_skipped"] = o.ProcessingSkipped + } + if !IsNil(o.ProcessingSkipReason) { + toSerialize["processing_skip_reason"] = o.ProcessingSkipReason + } + return toSerialize, nil +} + +type NullableCallExecution struct { + value *CallExecution + isSet bool +} + +func (v NullableCallExecution) Get() *CallExecution { + return v.value +} + +func (v *NullableCallExecution) Set(val *CallExecution) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecution) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecution(val *CallExecution) *NullableCallExecution { + return &NullableCallExecution{value: val, isSet: true} +} + +func (v NullableCallExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution_delete_response.go b/go/futureagi/model_call_execution_delete_response.go new file mode 100644 index 0000000..864ffde --- /dev/null +++ b/go/futureagi/model_call_execution_delete_response.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CallExecutionDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecutionDeleteResponse{} + +// CallExecutionDeleteResponse struct for CallExecutionDeleteResponse +type CallExecutionDeleteResponse struct { + Message *string `json:"message,omitempty"` +} + +// NewCallExecutionDeleteResponse instantiates a new CallExecutionDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecutionDeleteResponse() *CallExecutionDeleteResponse { + this := CallExecutionDeleteResponse{} + return &this +} + +// NewCallExecutionDeleteResponseWithDefaults instantiates a new CallExecutionDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionDeleteResponseWithDefaults() *CallExecutionDeleteResponse { + this := CallExecutionDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CallExecutionDeleteResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *CallExecutionDeleteResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *CallExecutionDeleteResponse) SetMessage(v string) { + o.Message = &v +} + +func (o CallExecutionDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecutionDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableCallExecutionDeleteResponse struct { + value *CallExecutionDeleteResponse + isSet bool +} + +func (v NullableCallExecutionDeleteResponse) Get() *CallExecutionDeleteResponse { + return v.value +} + +func (v *NullableCallExecutionDeleteResponse) Set(val *CallExecutionDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecutionDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecutionDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecutionDeleteResponse(val *CallExecutionDeleteResponse) *NullableCallExecutionDeleteResponse { + return &NullableCallExecutionDeleteResponse{value: val, isSet: true} +} + +func (v NullableCallExecutionDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecutionDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution_detail.go b/go/futureagi/model_call_execution_detail.go new file mode 100644 index 0000000..e809a7c --- /dev/null +++ b/go/futureagi/model_call_execution_detail.go @@ -0,0 +1,2447 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the CallExecutionDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecutionDetail{} + +// CallExecutionDetail struct for CallExecutionDetail +type CallExecutionDetail struct { + Id *string `json:"id,omitempty"` + ServiceProviderCallId *string `json:"service_provider_call_id,omitempty"` + SessionId *string `json:"session_id,omitempty"` + Timestamp *time.Time `json:"timestamp,omitempty"` + CallType *string `json:"call_type,omitempty"` + // Current status of the call + Status *string `json:"status,omitempty"` + Duration *string `json:"duration,omitempty"` + // Duration of the call in seconds + DurationSeconds NullableInt32 `json:"duration_seconds,omitempty"` + StartTime *string `json:"start_time,omitempty"` + Transcript *string `json:"transcript,omitempty"` + Scenario *string `json:"scenario,omitempty"` + OverallScore *string `json:"overall_score,omitempty"` + ResponseTime *string `json:"response_time,omitempty"` + // Average response time in milliseconds + ResponseTimeMs NullableInt32 `json:"response_time_ms,omitempty"` + AudioUrl *string `json:"audio_url,omitempty"` + CustomerName *string `json:"customer_name,omitempty"` + EvalOutputs *string `json:"eval_outputs,omitempty"` + EvalMetrics *string `json:"eval_metrics,omitempty"` + ScenarioColumns *string `json:"scenario_columns,omitempty"` + // Reason why the call ended + EndedReason NullableString `json:"ended_reason,omitempty"` + SimulatorAgentName *string `json:"simulator_agent_name,omitempty"` + SimulatorAgentId *string `json:"simulator_agent_id,omitempty"` + AgentDefinitionUsedName *string `json:"agent_definition_used_name,omitempty"` + AgentDefinitionUsedId *string `json:"agent_definition_used_id,omitempty"` + // Call summary from the service + CallSummary NullableString `json:"call_summary,omitempty"` + Recordings *string `json:"recordings,omitempty"` + ScenarioId *string `json:"scenario_id,omitempty"` + AvgAgentLatency *int32 `json:"avg_agent_latency,omitempty"` + // Average agent latency in milliseconds (time taken by agent to respond after user's pause) + AvgAgentLatencyMs NullableInt32 `json:"avg_agent_latency_ms,omitempty"` + // Number of times user interrupted the AI + UserInterruptionCount NullableInt32 `json:"user_interruption_count,omitempty"` + // Rate of user interruptions (interruptions per minute) + UserInterruptionRate NullableFloat32 `json:"user_interruption_rate,omitempty"` + // User's words per minute + UserWpm NullableFloat32 `json:"user_wpm,omitempty"` + // Bot's words per minute + BotWpm NullableFloat32 `json:"bot_wpm,omitempty"` + // Ratio of bot speaking time to user speaking time + TalkRatio NullableFloat32 `json:"talk_ratio,omitempty"` + // Number of times AI interrupted the user + AiInterruptionCount NullableInt32 `json:"ai_interruption_count,omitempty"` + // Rate of AI interruptions (interruptions per minute) + AiInterruptionRate NullableFloat32 `json:"ai_interruption_rate,omitempty"` + AvgStopTimeAfterInterruption *int32 `json:"avg_stop_time_after_interruption,omitempty"` + TotalTokens *string `json:"total_tokens,omitempty"` + InputTokens *string `json:"input_tokens,omitempty"` + OutputTokens *string `json:"output_tokens,omitempty"` + AvgLatencyMs *string `json:"avg_latency_ms,omitempty"` + TurnCount *string `json:"turn_count,omitempty"` + AgentTalkPercentage *string `json:"agent_talk_percentage,omitempty"` + CsatScore *string `json:"csat_score,omitempty"` + ProcessingSkipped *string `json:"processing_skipped,omitempty"` + ProcessingSkipReason *string `json:"processing_skip_reason,omitempty"` + RerunSnapshots *string `json:"rerun_snapshots,omitempty"` + IsSnapshot *string `json:"is_snapshot,omitempty"` + SnapshotTimestamp *string `json:"snapshot_timestamp,omitempty"` + RerunType *string `json:"rerun_type,omitempty"` + OriginalCallExecutionId *string `json:"original_call_execution_id,omitempty"` + // Tool evaluation output - separate from standard evaluations + ToolOutputs map[string]interface{} `json:"tool_outputs,omitempty"` + // Cost of the call in cents + CostCents NullableInt32 `json:"cost_cents,omitempty"` + // Total customer-reported cost in cents + CustomerCostCents NullableInt32 `json:"customer_cost_cents,omitempty"` + // Detailed cost breakdown from customer call data + CustomerCostBreakdown map[string]interface{} `json:"customer_cost_breakdown,omitempty"` + // Latency metrics from customer call data + CustomerLatencyMetrics map[string]interface{} `json:"customer_latency_metrics,omitempty"` + // Customer call ID if available + CustomerCallId NullableString `json:"customer_call_id,omitempty"` + // Type of simulation call + SimulationCallType *string `json:"simulation_call_type,omitempty"` + Provider *string `json:"provider,omitempty"` + // Phone number called (null for TEXT/chat simulations) + PhoneNumber NullableString `json:"phone_number,omitempty"` +} + +// NewCallExecutionDetail instantiates a new CallExecutionDetail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecutionDetail() *CallExecutionDetail { + this := CallExecutionDetail{} + return &this +} + +// NewCallExecutionDetailWithDefaults instantiates a new CallExecutionDetail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionDetailWithDefaults() *CallExecutionDetail { + this := CallExecutionDetail{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CallExecutionDetail) SetId(v string) { + o.Id = &v +} + +// GetServiceProviderCallId returns the ServiceProviderCallId field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetServiceProviderCallId() string { + if o == nil || IsNil(o.ServiceProviderCallId) { + var ret string + return ret + } + return *o.ServiceProviderCallId +} + +// GetServiceProviderCallIdOk returns a tuple with the ServiceProviderCallId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetServiceProviderCallIdOk() (*string, bool) { + if o == nil || IsNil(o.ServiceProviderCallId) { + return nil, false + } + return o.ServiceProviderCallId, true +} + +// HasServiceProviderCallId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasServiceProviderCallId() bool { + if o != nil && !IsNil(o.ServiceProviderCallId) { + return true + } + + return false +} + +// SetServiceProviderCallId gets a reference to the given string and assigns it to the ServiceProviderCallId field. +func (o *CallExecutionDetail) SetServiceProviderCallId(v string) { + o.ServiceProviderCallId = &v +} + +// GetSessionId returns the SessionId field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetSessionId() string { + if o == nil || IsNil(o.SessionId) { + var ret string + return ret + } + return *o.SessionId +} + +// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetSessionIdOk() (*string, bool) { + if o == nil || IsNil(o.SessionId) { + return nil, false + } + return o.SessionId, true +} + +// HasSessionId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasSessionId() bool { + if o != nil && !IsNil(o.SessionId) { + return true + } + + return false +} + +// SetSessionId gets a reference to the given string and assigns it to the SessionId field. +func (o *CallExecutionDetail) SetSessionId(v string) { + o.SessionId = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetTimestamp() time.Time { + if o == nil || IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *CallExecutionDetail) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +// GetCallType returns the CallType field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetCallType() string { + if o == nil || IsNil(o.CallType) { + var ret string + return ret + } + return *o.CallType +} + +// GetCallTypeOk returns a tuple with the CallType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetCallTypeOk() (*string, bool) { + if o == nil || IsNil(o.CallType) { + return nil, false + } + return o.CallType, true +} + +// HasCallType returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCallType() bool { + if o != nil && !IsNil(o.CallType) { + return true + } + + return false +} + +// SetCallType gets a reference to the given string and assigns it to the CallType field. +func (o *CallExecutionDetail) SetCallType(v string) { + o.CallType = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CallExecutionDetail) SetStatus(v string) { + o.Status = &v +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetDuration() string { + if o == nil || IsNil(o.Duration) { + var ret string + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetDurationOk() (*string, bool) { + if o == nil || IsNil(o.Duration) { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasDuration() bool { + if o != nil && !IsNil(o.Duration) { + return true + } + + return false +} + +// SetDuration gets a reference to the given string and assigns it to the Duration field. +func (o *CallExecutionDetail) SetDuration(v string) { + o.Duration = &v +} + +// GetDurationSeconds returns the DurationSeconds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetDurationSeconds() int32 { + if o == nil || IsNil(o.DurationSeconds.Get()) { + var ret int32 + return ret + } + return *o.DurationSeconds.Get() +} + +// GetDurationSecondsOk returns a tuple with the DurationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetDurationSecondsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.DurationSeconds.Get(), o.DurationSeconds.IsSet() +} + +// HasDurationSeconds returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasDurationSeconds() bool { + if o != nil && o.DurationSeconds.IsSet() { + return true + } + + return false +} + +// SetDurationSeconds gets a reference to the given NullableInt32 and assigns it to the DurationSeconds field. +func (o *CallExecutionDetail) SetDurationSeconds(v int32) { + o.DurationSeconds.Set(&v) +} + +// SetDurationSecondsNil sets the value for DurationSeconds to be an explicit nil +func (o *CallExecutionDetail) SetDurationSecondsNil() { + o.DurationSeconds.Set(nil) +} + +// UnsetDurationSeconds ensures that no value is present for DurationSeconds, not even an explicit nil +func (o *CallExecutionDetail) UnsetDurationSeconds() { + o.DurationSeconds.Unset() +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetStartTime() string { + if o == nil || IsNil(o.StartTime) { + var ret string + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetStartTimeOk() (*string, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +func (o *CallExecutionDetail) SetStartTime(v string) { + o.StartTime = &v +} + +// GetTranscript returns the Transcript field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetTranscript() string { + if o == nil || IsNil(o.Transcript) { + var ret string + return ret + } + return *o.Transcript +} + +// GetTranscriptOk returns a tuple with the Transcript field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetTranscriptOk() (*string, bool) { + if o == nil || IsNil(o.Transcript) { + return nil, false + } + return o.Transcript, true +} + +// HasTranscript returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasTranscript() bool { + if o != nil && !IsNil(o.Transcript) { + return true + } + + return false +} + +// SetTranscript gets a reference to the given string and assigns it to the Transcript field. +func (o *CallExecutionDetail) SetTranscript(v string) { + o.Transcript = &v +} + +// GetScenario returns the Scenario field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetScenario() string { + if o == nil || IsNil(o.Scenario) { + var ret string + return ret + } + return *o.Scenario +} + +// GetScenarioOk returns a tuple with the Scenario field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetScenarioOk() (*string, bool) { + if o == nil || IsNil(o.Scenario) { + return nil, false + } + return o.Scenario, true +} + +// HasScenario returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasScenario() bool { + if o != nil && !IsNil(o.Scenario) { + return true + } + + return false +} + +// SetScenario gets a reference to the given string and assigns it to the Scenario field. +func (o *CallExecutionDetail) SetScenario(v string) { + o.Scenario = &v +} + +// GetOverallScore returns the OverallScore field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetOverallScore() string { + if o == nil || IsNil(o.OverallScore) { + var ret string + return ret + } + return *o.OverallScore +} + +// GetOverallScoreOk returns a tuple with the OverallScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetOverallScoreOk() (*string, bool) { + if o == nil || IsNil(o.OverallScore) { + return nil, false + } + return o.OverallScore, true +} + +// HasOverallScore returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasOverallScore() bool { + if o != nil && !IsNil(o.OverallScore) { + return true + } + + return false +} + +// SetOverallScore gets a reference to the given string and assigns it to the OverallScore field. +func (o *CallExecutionDetail) SetOverallScore(v string) { + o.OverallScore = &v +} + +// GetResponseTime returns the ResponseTime field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetResponseTime() string { + if o == nil || IsNil(o.ResponseTime) { + var ret string + return ret + } + return *o.ResponseTime +} + +// GetResponseTimeOk returns a tuple with the ResponseTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetResponseTimeOk() (*string, bool) { + if o == nil || IsNil(o.ResponseTime) { + return nil, false + } + return o.ResponseTime, true +} + +// HasResponseTime returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasResponseTime() bool { + if o != nil && !IsNil(o.ResponseTime) { + return true + } + + return false +} + +// SetResponseTime gets a reference to the given string and assigns it to the ResponseTime field. +func (o *CallExecutionDetail) SetResponseTime(v string) { + o.ResponseTime = &v +} + +// GetResponseTimeMs returns the ResponseTimeMs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetResponseTimeMs() int32 { + if o == nil || IsNil(o.ResponseTimeMs.Get()) { + var ret int32 + return ret + } + return *o.ResponseTimeMs.Get() +} + +// GetResponseTimeMsOk returns a tuple with the ResponseTimeMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetResponseTimeMsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.ResponseTimeMs.Get(), o.ResponseTimeMs.IsSet() +} + +// HasResponseTimeMs returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasResponseTimeMs() bool { + if o != nil && o.ResponseTimeMs.IsSet() { + return true + } + + return false +} + +// SetResponseTimeMs gets a reference to the given NullableInt32 and assigns it to the ResponseTimeMs field. +func (o *CallExecutionDetail) SetResponseTimeMs(v int32) { + o.ResponseTimeMs.Set(&v) +} + +// SetResponseTimeMsNil sets the value for ResponseTimeMs to be an explicit nil +func (o *CallExecutionDetail) SetResponseTimeMsNil() { + o.ResponseTimeMs.Set(nil) +} + +// UnsetResponseTimeMs ensures that no value is present for ResponseTimeMs, not even an explicit nil +func (o *CallExecutionDetail) UnsetResponseTimeMs() { + o.ResponseTimeMs.Unset() +} + +// GetAudioUrl returns the AudioUrl field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetAudioUrl() string { + if o == nil || IsNil(o.AudioUrl) { + var ret string + return ret + } + return *o.AudioUrl +} + +// GetAudioUrlOk returns a tuple with the AudioUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetAudioUrlOk() (*string, bool) { + if o == nil || IsNil(o.AudioUrl) { + return nil, false + } + return o.AudioUrl, true +} + +// HasAudioUrl returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAudioUrl() bool { + if o != nil && !IsNil(o.AudioUrl) { + return true + } + + return false +} + +// SetAudioUrl gets a reference to the given string and assigns it to the AudioUrl field. +func (o *CallExecutionDetail) SetAudioUrl(v string) { + o.AudioUrl = &v +} + +// GetCustomerName returns the CustomerName field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetCustomerName() string { + if o == nil || IsNil(o.CustomerName) { + var ret string + return ret + } + return *o.CustomerName +} + +// GetCustomerNameOk returns a tuple with the CustomerName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetCustomerNameOk() (*string, bool) { + if o == nil || IsNil(o.CustomerName) { + return nil, false + } + return o.CustomerName, true +} + +// HasCustomerName returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCustomerName() bool { + if o != nil && !IsNil(o.CustomerName) { + return true + } + + return false +} + +// SetCustomerName gets a reference to the given string and assigns it to the CustomerName field. +func (o *CallExecutionDetail) SetCustomerName(v string) { + o.CustomerName = &v +} + +// GetEvalOutputs returns the EvalOutputs field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetEvalOutputs() string { + if o == nil || IsNil(o.EvalOutputs) { + var ret string + return ret + } + return *o.EvalOutputs +} + +// GetEvalOutputsOk returns a tuple with the EvalOutputs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetEvalOutputsOk() (*string, bool) { + if o == nil || IsNil(o.EvalOutputs) { + return nil, false + } + return o.EvalOutputs, true +} + +// HasEvalOutputs returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasEvalOutputs() bool { + if o != nil && !IsNil(o.EvalOutputs) { + return true + } + + return false +} + +// SetEvalOutputs gets a reference to the given string and assigns it to the EvalOutputs field. +func (o *CallExecutionDetail) SetEvalOutputs(v string) { + o.EvalOutputs = &v +} + +// GetEvalMetrics returns the EvalMetrics field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetEvalMetrics() string { + if o == nil || IsNil(o.EvalMetrics) { + var ret string + return ret + } + return *o.EvalMetrics +} + +// GetEvalMetricsOk returns a tuple with the EvalMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetEvalMetricsOk() (*string, bool) { + if o == nil || IsNil(o.EvalMetrics) { + return nil, false + } + return o.EvalMetrics, true +} + +// HasEvalMetrics returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasEvalMetrics() bool { + if o != nil && !IsNil(o.EvalMetrics) { + return true + } + + return false +} + +// SetEvalMetrics gets a reference to the given string and assigns it to the EvalMetrics field. +func (o *CallExecutionDetail) SetEvalMetrics(v string) { + o.EvalMetrics = &v +} + +// GetScenarioColumns returns the ScenarioColumns field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetScenarioColumns() string { + if o == nil || IsNil(o.ScenarioColumns) { + var ret string + return ret + } + return *o.ScenarioColumns +} + +// GetScenarioColumnsOk returns a tuple with the ScenarioColumns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetScenarioColumnsOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioColumns) { + return nil, false + } + return o.ScenarioColumns, true +} + +// HasScenarioColumns returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasScenarioColumns() bool { + if o != nil && !IsNil(o.ScenarioColumns) { + return true + } + + return false +} + +// SetScenarioColumns gets a reference to the given string and assigns it to the ScenarioColumns field. +func (o *CallExecutionDetail) SetScenarioColumns(v string) { + o.ScenarioColumns = &v +} + +// GetEndedReason returns the EndedReason field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetEndedReason() string { + if o == nil || IsNil(o.EndedReason.Get()) { + var ret string + return ret + } + return *o.EndedReason.Get() +} + +// GetEndedReasonOk returns a tuple with the EndedReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetEndedReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EndedReason.Get(), o.EndedReason.IsSet() +} + +// HasEndedReason returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasEndedReason() bool { + if o != nil && o.EndedReason.IsSet() { + return true + } + + return false +} + +// SetEndedReason gets a reference to the given NullableString and assigns it to the EndedReason field. +func (o *CallExecutionDetail) SetEndedReason(v string) { + o.EndedReason.Set(&v) +} + +// SetEndedReasonNil sets the value for EndedReason to be an explicit nil +func (o *CallExecutionDetail) SetEndedReasonNil() { + o.EndedReason.Set(nil) +} + +// UnsetEndedReason ensures that no value is present for EndedReason, not even an explicit nil +func (o *CallExecutionDetail) UnsetEndedReason() { + o.EndedReason.Unset() +} + +// GetSimulatorAgentName returns the SimulatorAgentName field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetSimulatorAgentName() string { + if o == nil || IsNil(o.SimulatorAgentName) { + var ret string + return ret + } + return *o.SimulatorAgentName +} + +// GetSimulatorAgentNameOk returns a tuple with the SimulatorAgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetSimulatorAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.SimulatorAgentName) { + return nil, false + } + return o.SimulatorAgentName, true +} + +// HasSimulatorAgentName returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasSimulatorAgentName() bool { + if o != nil && !IsNil(o.SimulatorAgentName) { + return true + } + + return false +} + +// SetSimulatorAgentName gets a reference to the given string and assigns it to the SimulatorAgentName field. +func (o *CallExecutionDetail) SetSimulatorAgentName(v string) { + o.SimulatorAgentName = &v +} + +// GetSimulatorAgentId returns the SimulatorAgentId field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetSimulatorAgentId() string { + if o == nil || IsNil(o.SimulatorAgentId) { + var ret string + return ret + } + return *o.SimulatorAgentId +} + +// GetSimulatorAgentIdOk returns a tuple with the SimulatorAgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetSimulatorAgentIdOk() (*string, bool) { + if o == nil || IsNil(o.SimulatorAgentId) { + return nil, false + } + return o.SimulatorAgentId, true +} + +// HasSimulatorAgentId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasSimulatorAgentId() bool { + if o != nil && !IsNil(o.SimulatorAgentId) { + return true + } + + return false +} + +// SetSimulatorAgentId gets a reference to the given string and assigns it to the SimulatorAgentId field. +func (o *CallExecutionDetail) SetSimulatorAgentId(v string) { + o.SimulatorAgentId = &v +} + +// GetAgentDefinitionUsedName returns the AgentDefinitionUsedName field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetAgentDefinitionUsedName() string { + if o == nil || IsNil(o.AgentDefinitionUsedName) { + var ret string + return ret + } + return *o.AgentDefinitionUsedName +} + +// GetAgentDefinitionUsedNameOk returns a tuple with the AgentDefinitionUsedName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetAgentDefinitionUsedNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionUsedName) { + return nil, false + } + return o.AgentDefinitionUsedName, true +} + +// HasAgentDefinitionUsedName returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAgentDefinitionUsedName() bool { + if o != nil && !IsNil(o.AgentDefinitionUsedName) { + return true + } + + return false +} + +// SetAgentDefinitionUsedName gets a reference to the given string and assigns it to the AgentDefinitionUsedName field. +func (o *CallExecutionDetail) SetAgentDefinitionUsedName(v string) { + o.AgentDefinitionUsedName = &v +} + +// GetAgentDefinitionUsedId returns the AgentDefinitionUsedId field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetAgentDefinitionUsedId() string { + if o == nil || IsNil(o.AgentDefinitionUsedId) { + var ret string + return ret + } + return *o.AgentDefinitionUsedId +} + +// GetAgentDefinitionUsedIdOk returns a tuple with the AgentDefinitionUsedId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetAgentDefinitionUsedIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionUsedId) { + return nil, false + } + return o.AgentDefinitionUsedId, true +} + +// HasAgentDefinitionUsedId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAgentDefinitionUsedId() bool { + if o != nil && !IsNil(o.AgentDefinitionUsedId) { + return true + } + + return false +} + +// SetAgentDefinitionUsedId gets a reference to the given string and assigns it to the AgentDefinitionUsedId field. +func (o *CallExecutionDetail) SetAgentDefinitionUsedId(v string) { + o.AgentDefinitionUsedId = &v +} + +// GetCallSummary returns the CallSummary field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetCallSummary() string { + if o == nil || IsNil(o.CallSummary.Get()) { + var ret string + return ret + } + return *o.CallSummary.Get() +} + +// GetCallSummaryOk returns a tuple with the CallSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetCallSummaryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CallSummary.Get(), o.CallSummary.IsSet() +} + +// HasCallSummary returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCallSummary() bool { + if o != nil && o.CallSummary.IsSet() { + return true + } + + return false +} + +// SetCallSummary gets a reference to the given NullableString and assigns it to the CallSummary field. +func (o *CallExecutionDetail) SetCallSummary(v string) { + o.CallSummary.Set(&v) +} + +// SetCallSummaryNil sets the value for CallSummary to be an explicit nil +func (o *CallExecutionDetail) SetCallSummaryNil() { + o.CallSummary.Set(nil) +} + +// UnsetCallSummary ensures that no value is present for CallSummary, not even an explicit nil +func (o *CallExecutionDetail) UnsetCallSummary() { + o.CallSummary.Unset() +} + +// GetRecordings returns the Recordings field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetRecordings() string { + if o == nil || IsNil(o.Recordings) { + var ret string + return ret + } + return *o.Recordings +} + +// GetRecordingsOk returns a tuple with the Recordings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetRecordingsOk() (*string, bool) { + if o == nil || IsNil(o.Recordings) { + return nil, false + } + return o.Recordings, true +} + +// HasRecordings returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasRecordings() bool { + if o != nil && !IsNil(o.Recordings) { + return true + } + + return false +} + +// SetRecordings gets a reference to the given string and assigns it to the Recordings field. +func (o *CallExecutionDetail) SetRecordings(v string) { + o.Recordings = &v +} + +// GetScenarioId returns the ScenarioId field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetScenarioId() string { + if o == nil || IsNil(o.ScenarioId) { + var ret string + return ret + } + return *o.ScenarioId +} + +// GetScenarioIdOk returns a tuple with the ScenarioId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetScenarioIdOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioId) { + return nil, false + } + return o.ScenarioId, true +} + +// HasScenarioId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasScenarioId() bool { + if o != nil && !IsNil(o.ScenarioId) { + return true + } + + return false +} + +// SetScenarioId gets a reference to the given string and assigns it to the ScenarioId field. +func (o *CallExecutionDetail) SetScenarioId(v string) { + o.ScenarioId = &v +} + +// GetAvgAgentLatency returns the AvgAgentLatency field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetAvgAgentLatency() int32 { + if o == nil || IsNil(o.AvgAgentLatency) { + var ret int32 + return ret + } + return *o.AvgAgentLatency +} + +// GetAvgAgentLatencyOk returns a tuple with the AvgAgentLatency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetAvgAgentLatencyOk() (*int32, bool) { + if o == nil || IsNil(o.AvgAgentLatency) { + return nil, false + } + return o.AvgAgentLatency, true +} + +// HasAvgAgentLatency returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAvgAgentLatency() bool { + if o != nil && !IsNil(o.AvgAgentLatency) { + return true + } + + return false +} + +// SetAvgAgentLatency gets a reference to the given int32 and assigns it to the AvgAgentLatency field. +func (o *CallExecutionDetail) SetAvgAgentLatency(v int32) { + o.AvgAgentLatency = &v +} + +// GetAvgAgentLatencyMs returns the AvgAgentLatencyMs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetAvgAgentLatencyMs() int32 { + if o == nil || IsNil(o.AvgAgentLatencyMs.Get()) { + var ret int32 + return ret + } + return *o.AvgAgentLatencyMs.Get() +} + +// GetAvgAgentLatencyMsOk returns a tuple with the AvgAgentLatencyMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetAvgAgentLatencyMsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.AvgAgentLatencyMs.Get(), o.AvgAgentLatencyMs.IsSet() +} + +// HasAvgAgentLatencyMs returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAvgAgentLatencyMs() bool { + if o != nil && o.AvgAgentLatencyMs.IsSet() { + return true + } + + return false +} + +// SetAvgAgentLatencyMs gets a reference to the given NullableInt32 and assigns it to the AvgAgentLatencyMs field. +func (o *CallExecutionDetail) SetAvgAgentLatencyMs(v int32) { + o.AvgAgentLatencyMs.Set(&v) +} + +// SetAvgAgentLatencyMsNil sets the value for AvgAgentLatencyMs to be an explicit nil +func (o *CallExecutionDetail) SetAvgAgentLatencyMsNil() { + o.AvgAgentLatencyMs.Set(nil) +} + +// UnsetAvgAgentLatencyMs ensures that no value is present for AvgAgentLatencyMs, not even an explicit nil +func (o *CallExecutionDetail) UnsetAvgAgentLatencyMs() { + o.AvgAgentLatencyMs.Unset() +} + +// GetUserInterruptionCount returns the UserInterruptionCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetUserInterruptionCount() int32 { + if o == nil || IsNil(o.UserInterruptionCount.Get()) { + var ret int32 + return ret + } + return *o.UserInterruptionCount.Get() +} + +// GetUserInterruptionCountOk returns a tuple with the UserInterruptionCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetUserInterruptionCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.UserInterruptionCount.Get(), o.UserInterruptionCount.IsSet() +} + +// HasUserInterruptionCount returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasUserInterruptionCount() bool { + if o != nil && o.UserInterruptionCount.IsSet() { + return true + } + + return false +} + +// SetUserInterruptionCount gets a reference to the given NullableInt32 and assigns it to the UserInterruptionCount field. +func (o *CallExecutionDetail) SetUserInterruptionCount(v int32) { + o.UserInterruptionCount.Set(&v) +} + +// SetUserInterruptionCountNil sets the value for UserInterruptionCount to be an explicit nil +func (o *CallExecutionDetail) SetUserInterruptionCountNil() { + o.UserInterruptionCount.Set(nil) +} + +// UnsetUserInterruptionCount ensures that no value is present for UserInterruptionCount, not even an explicit nil +func (o *CallExecutionDetail) UnsetUserInterruptionCount() { + o.UserInterruptionCount.Unset() +} + +// GetUserInterruptionRate returns the UserInterruptionRate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetUserInterruptionRate() float32 { + if o == nil || IsNil(o.UserInterruptionRate.Get()) { + var ret float32 + return ret + } + return *o.UserInterruptionRate.Get() +} + +// GetUserInterruptionRateOk returns a tuple with the UserInterruptionRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetUserInterruptionRateOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.UserInterruptionRate.Get(), o.UserInterruptionRate.IsSet() +} + +// HasUserInterruptionRate returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasUserInterruptionRate() bool { + if o != nil && o.UserInterruptionRate.IsSet() { + return true + } + + return false +} + +// SetUserInterruptionRate gets a reference to the given NullableFloat32 and assigns it to the UserInterruptionRate field. +func (o *CallExecutionDetail) SetUserInterruptionRate(v float32) { + o.UserInterruptionRate.Set(&v) +} + +// SetUserInterruptionRateNil sets the value for UserInterruptionRate to be an explicit nil +func (o *CallExecutionDetail) SetUserInterruptionRateNil() { + o.UserInterruptionRate.Set(nil) +} + +// UnsetUserInterruptionRate ensures that no value is present for UserInterruptionRate, not even an explicit nil +func (o *CallExecutionDetail) UnsetUserInterruptionRate() { + o.UserInterruptionRate.Unset() +} + +// GetUserWpm returns the UserWpm field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetUserWpm() float32 { + if o == nil || IsNil(o.UserWpm.Get()) { + var ret float32 + return ret + } + return *o.UserWpm.Get() +} + +// GetUserWpmOk returns a tuple with the UserWpm field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetUserWpmOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.UserWpm.Get(), o.UserWpm.IsSet() +} + +// HasUserWpm returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasUserWpm() bool { + if o != nil && o.UserWpm.IsSet() { + return true + } + + return false +} + +// SetUserWpm gets a reference to the given NullableFloat32 and assigns it to the UserWpm field. +func (o *CallExecutionDetail) SetUserWpm(v float32) { + o.UserWpm.Set(&v) +} + +// SetUserWpmNil sets the value for UserWpm to be an explicit nil +func (o *CallExecutionDetail) SetUserWpmNil() { + o.UserWpm.Set(nil) +} + +// UnsetUserWpm ensures that no value is present for UserWpm, not even an explicit nil +func (o *CallExecutionDetail) UnsetUserWpm() { + o.UserWpm.Unset() +} + +// GetBotWpm returns the BotWpm field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetBotWpm() float32 { + if o == nil || IsNil(o.BotWpm.Get()) { + var ret float32 + return ret + } + return *o.BotWpm.Get() +} + +// GetBotWpmOk returns a tuple with the BotWpm field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetBotWpmOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.BotWpm.Get(), o.BotWpm.IsSet() +} + +// HasBotWpm returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasBotWpm() bool { + if o != nil && o.BotWpm.IsSet() { + return true + } + + return false +} + +// SetBotWpm gets a reference to the given NullableFloat32 and assigns it to the BotWpm field. +func (o *CallExecutionDetail) SetBotWpm(v float32) { + o.BotWpm.Set(&v) +} + +// SetBotWpmNil sets the value for BotWpm to be an explicit nil +func (o *CallExecutionDetail) SetBotWpmNil() { + o.BotWpm.Set(nil) +} + +// UnsetBotWpm ensures that no value is present for BotWpm, not even an explicit nil +func (o *CallExecutionDetail) UnsetBotWpm() { + o.BotWpm.Unset() +} + +// GetTalkRatio returns the TalkRatio field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetTalkRatio() float32 { + if o == nil || IsNil(o.TalkRatio.Get()) { + var ret float32 + return ret + } + return *o.TalkRatio.Get() +} + +// GetTalkRatioOk returns a tuple with the TalkRatio field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetTalkRatioOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.TalkRatio.Get(), o.TalkRatio.IsSet() +} + +// HasTalkRatio returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasTalkRatio() bool { + if o != nil && o.TalkRatio.IsSet() { + return true + } + + return false +} + +// SetTalkRatio gets a reference to the given NullableFloat32 and assigns it to the TalkRatio field. +func (o *CallExecutionDetail) SetTalkRatio(v float32) { + o.TalkRatio.Set(&v) +} + +// SetTalkRatioNil sets the value for TalkRatio to be an explicit nil +func (o *CallExecutionDetail) SetTalkRatioNil() { + o.TalkRatio.Set(nil) +} + +// UnsetTalkRatio ensures that no value is present for TalkRatio, not even an explicit nil +func (o *CallExecutionDetail) UnsetTalkRatio() { + o.TalkRatio.Unset() +} + +// GetAiInterruptionCount returns the AiInterruptionCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetAiInterruptionCount() int32 { + if o == nil || IsNil(o.AiInterruptionCount.Get()) { + var ret int32 + return ret + } + return *o.AiInterruptionCount.Get() +} + +// GetAiInterruptionCountOk returns a tuple with the AiInterruptionCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetAiInterruptionCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.AiInterruptionCount.Get(), o.AiInterruptionCount.IsSet() +} + +// HasAiInterruptionCount returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAiInterruptionCount() bool { + if o != nil && o.AiInterruptionCount.IsSet() { + return true + } + + return false +} + +// SetAiInterruptionCount gets a reference to the given NullableInt32 and assigns it to the AiInterruptionCount field. +func (o *CallExecutionDetail) SetAiInterruptionCount(v int32) { + o.AiInterruptionCount.Set(&v) +} + +// SetAiInterruptionCountNil sets the value for AiInterruptionCount to be an explicit nil +func (o *CallExecutionDetail) SetAiInterruptionCountNil() { + o.AiInterruptionCount.Set(nil) +} + +// UnsetAiInterruptionCount ensures that no value is present for AiInterruptionCount, not even an explicit nil +func (o *CallExecutionDetail) UnsetAiInterruptionCount() { + o.AiInterruptionCount.Unset() +} + +// GetAiInterruptionRate returns the AiInterruptionRate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetAiInterruptionRate() float32 { + if o == nil || IsNil(o.AiInterruptionRate.Get()) { + var ret float32 + return ret + } + return *o.AiInterruptionRate.Get() +} + +// GetAiInterruptionRateOk returns a tuple with the AiInterruptionRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetAiInterruptionRateOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AiInterruptionRate.Get(), o.AiInterruptionRate.IsSet() +} + +// HasAiInterruptionRate returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAiInterruptionRate() bool { + if o != nil && o.AiInterruptionRate.IsSet() { + return true + } + + return false +} + +// SetAiInterruptionRate gets a reference to the given NullableFloat32 and assigns it to the AiInterruptionRate field. +func (o *CallExecutionDetail) SetAiInterruptionRate(v float32) { + o.AiInterruptionRate.Set(&v) +} + +// SetAiInterruptionRateNil sets the value for AiInterruptionRate to be an explicit nil +func (o *CallExecutionDetail) SetAiInterruptionRateNil() { + o.AiInterruptionRate.Set(nil) +} + +// UnsetAiInterruptionRate ensures that no value is present for AiInterruptionRate, not even an explicit nil +func (o *CallExecutionDetail) UnsetAiInterruptionRate() { + o.AiInterruptionRate.Unset() +} + +// GetAvgStopTimeAfterInterruption returns the AvgStopTimeAfterInterruption field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetAvgStopTimeAfterInterruption() int32 { + if o == nil || IsNil(o.AvgStopTimeAfterInterruption) { + var ret int32 + return ret + } + return *o.AvgStopTimeAfterInterruption +} + +// GetAvgStopTimeAfterInterruptionOk returns a tuple with the AvgStopTimeAfterInterruption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetAvgStopTimeAfterInterruptionOk() (*int32, bool) { + if o == nil || IsNil(o.AvgStopTimeAfterInterruption) { + return nil, false + } + return o.AvgStopTimeAfterInterruption, true +} + +// HasAvgStopTimeAfterInterruption returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAvgStopTimeAfterInterruption() bool { + if o != nil && !IsNil(o.AvgStopTimeAfterInterruption) { + return true + } + + return false +} + +// SetAvgStopTimeAfterInterruption gets a reference to the given int32 and assigns it to the AvgStopTimeAfterInterruption field. +func (o *CallExecutionDetail) SetAvgStopTimeAfterInterruption(v int32) { + o.AvgStopTimeAfterInterruption = &v +} + +// GetTotalTokens returns the TotalTokens field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetTotalTokens() string { + if o == nil || IsNil(o.TotalTokens) { + var ret string + return ret + } + return *o.TotalTokens +} + +// GetTotalTokensOk returns a tuple with the TotalTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetTotalTokensOk() (*string, bool) { + if o == nil || IsNil(o.TotalTokens) { + return nil, false + } + return o.TotalTokens, true +} + +// HasTotalTokens returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasTotalTokens() bool { + if o != nil && !IsNil(o.TotalTokens) { + return true + } + + return false +} + +// SetTotalTokens gets a reference to the given string and assigns it to the TotalTokens field. +func (o *CallExecutionDetail) SetTotalTokens(v string) { + o.TotalTokens = &v +} + +// GetInputTokens returns the InputTokens field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetInputTokens() string { + if o == nil || IsNil(o.InputTokens) { + var ret string + return ret + } + return *o.InputTokens +} + +// GetInputTokensOk returns a tuple with the InputTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetInputTokensOk() (*string, bool) { + if o == nil || IsNil(o.InputTokens) { + return nil, false + } + return o.InputTokens, true +} + +// HasInputTokens returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasInputTokens() bool { + if o != nil && !IsNil(o.InputTokens) { + return true + } + + return false +} + +// SetInputTokens gets a reference to the given string and assigns it to the InputTokens field. +func (o *CallExecutionDetail) SetInputTokens(v string) { + o.InputTokens = &v +} + +// GetOutputTokens returns the OutputTokens field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetOutputTokens() string { + if o == nil || IsNil(o.OutputTokens) { + var ret string + return ret + } + return *o.OutputTokens +} + +// GetOutputTokensOk returns a tuple with the OutputTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetOutputTokensOk() (*string, bool) { + if o == nil || IsNil(o.OutputTokens) { + return nil, false + } + return o.OutputTokens, true +} + +// HasOutputTokens returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasOutputTokens() bool { + if o != nil && !IsNil(o.OutputTokens) { + return true + } + + return false +} + +// SetOutputTokens gets a reference to the given string and assigns it to the OutputTokens field. +func (o *CallExecutionDetail) SetOutputTokens(v string) { + o.OutputTokens = &v +} + +// GetAvgLatencyMs returns the AvgLatencyMs field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetAvgLatencyMs() string { + if o == nil || IsNil(o.AvgLatencyMs) { + var ret string + return ret + } + return *o.AvgLatencyMs +} + +// GetAvgLatencyMsOk returns a tuple with the AvgLatencyMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetAvgLatencyMsOk() (*string, bool) { + if o == nil || IsNil(o.AvgLatencyMs) { + return nil, false + } + return o.AvgLatencyMs, true +} + +// HasAvgLatencyMs returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAvgLatencyMs() bool { + if o != nil && !IsNil(o.AvgLatencyMs) { + return true + } + + return false +} + +// SetAvgLatencyMs gets a reference to the given string and assigns it to the AvgLatencyMs field. +func (o *CallExecutionDetail) SetAvgLatencyMs(v string) { + o.AvgLatencyMs = &v +} + +// GetTurnCount returns the TurnCount field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetTurnCount() string { + if o == nil || IsNil(o.TurnCount) { + var ret string + return ret + } + return *o.TurnCount +} + +// GetTurnCountOk returns a tuple with the TurnCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetTurnCountOk() (*string, bool) { + if o == nil || IsNil(o.TurnCount) { + return nil, false + } + return o.TurnCount, true +} + +// HasTurnCount returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasTurnCount() bool { + if o != nil && !IsNil(o.TurnCount) { + return true + } + + return false +} + +// SetTurnCount gets a reference to the given string and assigns it to the TurnCount field. +func (o *CallExecutionDetail) SetTurnCount(v string) { + o.TurnCount = &v +} + +// GetAgentTalkPercentage returns the AgentTalkPercentage field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetAgentTalkPercentage() string { + if o == nil || IsNil(o.AgentTalkPercentage) { + var ret string + return ret + } + return *o.AgentTalkPercentage +} + +// GetAgentTalkPercentageOk returns a tuple with the AgentTalkPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetAgentTalkPercentageOk() (*string, bool) { + if o == nil || IsNil(o.AgentTalkPercentage) { + return nil, false + } + return o.AgentTalkPercentage, true +} + +// HasAgentTalkPercentage returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasAgentTalkPercentage() bool { + if o != nil && !IsNil(o.AgentTalkPercentage) { + return true + } + + return false +} + +// SetAgentTalkPercentage gets a reference to the given string and assigns it to the AgentTalkPercentage field. +func (o *CallExecutionDetail) SetAgentTalkPercentage(v string) { + o.AgentTalkPercentage = &v +} + +// GetCsatScore returns the CsatScore field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetCsatScore() string { + if o == nil || IsNil(o.CsatScore) { + var ret string + return ret + } + return *o.CsatScore +} + +// GetCsatScoreOk returns a tuple with the CsatScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetCsatScoreOk() (*string, bool) { + if o == nil || IsNil(o.CsatScore) { + return nil, false + } + return o.CsatScore, true +} + +// HasCsatScore returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCsatScore() bool { + if o != nil && !IsNil(o.CsatScore) { + return true + } + + return false +} + +// SetCsatScore gets a reference to the given string and assigns it to the CsatScore field. +func (o *CallExecutionDetail) SetCsatScore(v string) { + o.CsatScore = &v +} + +// GetProcessingSkipped returns the ProcessingSkipped field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetProcessingSkipped() string { + if o == nil || IsNil(o.ProcessingSkipped) { + var ret string + return ret + } + return *o.ProcessingSkipped +} + +// GetProcessingSkippedOk returns a tuple with the ProcessingSkipped field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetProcessingSkippedOk() (*string, bool) { + if o == nil || IsNil(o.ProcessingSkipped) { + return nil, false + } + return o.ProcessingSkipped, true +} + +// HasProcessingSkipped returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasProcessingSkipped() bool { + if o != nil && !IsNil(o.ProcessingSkipped) { + return true + } + + return false +} + +// SetProcessingSkipped gets a reference to the given string and assigns it to the ProcessingSkipped field. +func (o *CallExecutionDetail) SetProcessingSkipped(v string) { + o.ProcessingSkipped = &v +} + +// GetProcessingSkipReason returns the ProcessingSkipReason field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetProcessingSkipReason() string { + if o == nil || IsNil(o.ProcessingSkipReason) { + var ret string + return ret + } + return *o.ProcessingSkipReason +} + +// GetProcessingSkipReasonOk returns a tuple with the ProcessingSkipReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetProcessingSkipReasonOk() (*string, bool) { + if o == nil || IsNil(o.ProcessingSkipReason) { + return nil, false + } + return o.ProcessingSkipReason, true +} + +// HasProcessingSkipReason returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasProcessingSkipReason() bool { + if o != nil && !IsNil(o.ProcessingSkipReason) { + return true + } + + return false +} + +// SetProcessingSkipReason gets a reference to the given string and assigns it to the ProcessingSkipReason field. +func (o *CallExecutionDetail) SetProcessingSkipReason(v string) { + o.ProcessingSkipReason = &v +} + +// GetRerunSnapshots returns the RerunSnapshots field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetRerunSnapshots() string { + if o == nil || IsNil(o.RerunSnapshots) { + var ret string + return ret + } + return *o.RerunSnapshots +} + +// GetRerunSnapshotsOk returns a tuple with the RerunSnapshots field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetRerunSnapshotsOk() (*string, bool) { + if o == nil || IsNil(o.RerunSnapshots) { + return nil, false + } + return o.RerunSnapshots, true +} + +// HasRerunSnapshots returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasRerunSnapshots() bool { + if o != nil && !IsNil(o.RerunSnapshots) { + return true + } + + return false +} + +// SetRerunSnapshots gets a reference to the given string and assigns it to the RerunSnapshots field. +func (o *CallExecutionDetail) SetRerunSnapshots(v string) { + o.RerunSnapshots = &v +} + +// GetIsSnapshot returns the IsSnapshot field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetIsSnapshot() string { + if o == nil || IsNil(o.IsSnapshot) { + var ret string + return ret + } + return *o.IsSnapshot +} + +// GetIsSnapshotOk returns a tuple with the IsSnapshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetIsSnapshotOk() (*string, bool) { + if o == nil || IsNil(o.IsSnapshot) { + return nil, false + } + return o.IsSnapshot, true +} + +// HasIsSnapshot returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasIsSnapshot() bool { + if o != nil && !IsNil(o.IsSnapshot) { + return true + } + + return false +} + +// SetIsSnapshot gets a reference to the given string and assigns it to the IsSnapshot field. +func (o *CallExecutionDetail) SetIsSnapshot(v string) { + o.IsSnapshot = &v +} + +// GetSnapshotTimestamp returns the SnapshotTimestamp field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetSnapshotTimestamp() string { + if o == nil || IsNil(o.SnapshotTimestamp) { + var ret string + return ret + } + return *o.SnapshotTimestamp +} + +// GetSnapshotTimestampOk returns a tuple with the SnapshotTimestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetSnapshotTimestampOk() (*string, bool) { + if o == nil || IsNil(o.SnapshotTimestamp) { + return nil, false + } + return o.SnapshotTimestamp, true +} + +// HasSnapshotTimestamp returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasSnapshotTimestamp() bool { + if o != nil && !IsNil(o.SnapshotTimestamp) { + return true + } + + return false +} + +// SetSnapshotTimestamp gets a reference to the given string and assigns it to the SnapshotTimestamp field. +func (o *CallExecutionDetail) SetSnapshotTimestamp(v string) { + o.SnapshotTimestamp = &v +} + +// GetRerunType returns the RerunType field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetRerunType() string { + if o == nil || IsNil(o.RerunType) { + var ret string + return ret + } + return *o.RerunType +} + +// GetRerunTypeOk returns a tuple with the RerunType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetRerunTypeOk() (*string, bool) { + if o == nil || IsNil(o.RerunType) { + return nil, false + } + return o.RerunType, true +} + +// HasRerunType returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasRerunType() bool { + if o != nil && !IsNil(o.RerunType) { + return true + } + + return false +} + +// SetRerunType gets a reference to the given string and assigns it to the RerunType field. +func (o *CallExecutionDetail) SetRerunType(v string) { + o.RerunType = &v +} + +// GetOriginalCallExecutionId returns the OriginalCallExecutionId field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetOriginalCallExecutionId() string { + if o == nil || IsNil(o.OriginalCallExecutionId) { + var ret string + return ret + } + return *o.OriginalCallExecutionId +} + +// GetOriginalCallExecutionIdOk returns a tuple with the OriginalCallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetOriginalCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.OriginalCallExecutionId) { + return nil, false + } + return o.OriginalCallExecutionId, true +} + +// HasOriginalCallExecutionId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasOriginalCallExecutionId() bool { + if o != nil && !IsNil(o.OriginalCallExecutionId) { + return true + } + + return false +} + +// SetOriginalCallExecutionId gets a reference to the given string and assigns it to the OriginalCallExecutionId field. +func (o *CallExecutionDetail) SetOriginalCallExecutionId(v string) { + o.OriginalCallExecutionId = &v +} + +// GetToolOutputs returns the ToolOutputs field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetToolOutputs() map[string]interface{} { + if o == nil || IsNil(o.ToolOutputs) { + var ret map[string]interface{} + return ret + } + return o.ToolOutputs +} + +// GetToolOutputsOk returns a tuple with the ToolOutputs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetToolOutputsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ToolOutputs) { + return map[string]interface{}{}, false + } + return o.ToolOutputs, true +} + +// HasToolOutputs returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasToolOutputs() bool { + if o != nil && !IsNil(o.ToolOutputs) { + return true + } + + return false +} + +// SetToolOutputs gets a reference to the given map[string]interface{} and assigns it to the ToolOutputs field. +func (o *CallExecutionDetail) SetToolOutputs(v map[string]interface{}) { + o.ToolOutputs = v +} + +// GetCostCents returns the CostCents field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetCostCents() int32 { + if o == nil || IsNil(o.CostCents.Get()) { + var ret int32 + return ret + } + return *o.CostCents.Get() +} + +// GetCostCentsOk returns a tuple with the CostCents field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetCostCentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.CostCents.Get(), o.CostCents.IsSet() +} + +// HasCostCents returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCostCents() bool { + if o != nil && o.CostCents.IsSet() { + return true + } + + return false +} + +// SetCostCents gets a reference to the given NullableInt32 and assigns it to the CostCents field. +func (o *CallExecutionDetail) SetCostCents(v int32) { + o.CostCents.Set(&v) +} + +// SetCostCentsNil sets the value for CostCents to be an explicit nil +func (o *CallExecutionDetail) SetCostCentsNil() { + o.CostCents.Set(nil) +} + +// UnsetCostCents ensures that no value is present for CostCents, not even an explicit nil +func (o *CallExecutionDetail) UnsetCostCents() { + o.CostCents.Unset() +} + +// GetCustomerCostCents returns the CustomerCostCents field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetCustomerCostCents() int32 { + if o == nil || IsNil(o.CustomerCostCents.Get()) { + var ret int32 + return ret + } + return *o.CustomerCostCents.Get() +} + +// GetCustomerCostCentsOk returns a tuple with the CustomerCostCents field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetCustomerCostCentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.CustomerCostCents.Get(), o.CustomerCostCents.IsSet() +} + +// HasCustomerCostCents returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCustomerCostCents() bool { + if o != nil && o.CustomerCostCents.IsSet() { + return true + } + + return false +} + +// SetCustomerCostCents gets a reference to the given NullableInt32 and assigns it to the CustomerCostCents field. +func (o *CallExecutionDetail) SetCustomerCostCents(v int32) { + o.CustomerCostCents.Set(&v) +} + +// SetCustomerCostCentsNil sets the value for CustomerCostCents to be an explicit nil +func (o *CallExecutionDetail) SetCustomerCostCentsNil() { + o.CustomerCostCents.Set(nil) +} + +// UnsetCustomerCostCents ensures that no value is present for CustomerCostCents, not even an explicit nil +func (o *CallExecutionDetail) UnsetCustomerCostCents() { + o.CustomerCostCents.Unset() +} + +// GetCustomerCostBreakdown returns the CustomerCostBreakdown field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetCustomerCostBreakdown() map[string]interface{} { + if o == nil || IsNil(o.CustomerCostBreakdown) { + var ret map[string]interface{} + return ret + } + return o.CustomerCostBreakdown +} + +// GetCustomerCostBreakdownOk returns a tuple with the CustomerCostBreakdown field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetCustomerCostBreakdownOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CustomerCostBreakdown) { + return map[string]interface{}{}, false + } + return o.CustomerCostBreakdown, true +} + +// HasCustomerCostBreakdown returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCustomerCostBreakdown() bool { + if o != nil && !IsNil(o.CustomerCostBreakdown) { + return true + } + + return false +} + +// SetCustomerCostBreakdown gets a reference to the given map[string]interface{} and assigns it to the CustomerCostBreakdown field. +func (o *CallExecutionDetail) SetCustomerCostBreakdown(v map[string]interface{}) { + o.CustomerCostBreakdown = v +} + +// GetCustomerLatencyMetrics returns the CustomerLatencyMetrics field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetCustomerLatencyMetrics() map[string]interface{} { + if o == nil || IsNil(o.CustomerLatencyMetrics) { + var ret map[string]interface{} + return ret + } + return o.CustomerLatencyMetrics +} + +// GetCustomerLatencyMetricsOk returns a tuple with the CustomerLatencyMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetCustomerLatencyMetricsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CustomerLatencyMetrics) { + return map[string]interface{}{}, false + } + return o.CustomerLatencyMetrics, true +} + +// HasCustomerLatencyMetrics returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCustomerLatencyMetrics() bool { + if o != nil && !IsNil(o.CustomerLatencyMetrics) { + return true + } + + return false +} + +// SetCustomerLatencyMetrics gets a reference to the given map[string]interface{} and assigns it to the CustomerLatencyMetrics field. +func (o *CallExecutionDetail) SetCustomerLatencyMetrics(v map[string]interface{}) { + o.CustomerLatencyMetrics = v +} + +// GetCustomerCallId returns the CustomerCallId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetCustomerCallId() string { + if o == nil || IsNil(o.CustomerCallId.Get()) { + var ret string + return ret + } + return *o.CustomerCallId.Get() +} + +// GetCustomerCallIdOk returns a tuple with the CustomerCallId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetCustomerCallIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomerCallId.Get(), o.CustomerCallId.IsSet() +} + +// HasCustomerCallId returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasCustomerCallId() bool { + if o != nil && o.CustomerCallId.IsSet() { + return true + } + + return false +} + +// SetCustomerCallId gets a reference to the given NullableString and assigns it to the CustomerCallId field. +func (o *CallExecutionDetail) SetCustomerCallId(v string) { + o.CustomerCallId.Set(&v) +} + +// SetCustomerCallIdNil sets the value for CustomerCallId to be an explicit nil +func (o *CallExecutionDetail) SetCustomerCallIdNil() { + o.CustomerCallId.Set(nil) +} + +// UnsetCustomerCallId ensures that no value is present for CustomerCallId, not even an explicit nil +func (o *CallExecutionDetail) UnsetCustomerCallId() { + o.CustomerCallId.Unset() +} + +// GetSimulationCallType returns the SimulationCallType field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetSimulationCallType() string { + if o == nil || IsNil(o.SimulationCallType) { + var ret string + return ret + } + return *o.SimulationCallType +} + +// GetSimulationCallTypeOk returns a tuple with the SimulationCallType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetSimulationCallTypeOk() (*string, bool) { + if o == nil || IsNil(o.SimulationCallType) { + return nil, false + } + return o.SimulationCallType, true +} + +// HasSimulationCallType returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasSimulationCallType() bool { + if o != nil && !IsNil(o.SimulationCallType) { + return true + } + + return false +} + +// SetSimulationCallType gets a reference to the given string and assigns it to the SimulationCallType field. +func (o *CallExecutionDetail) SetSimulationCallType(v string) { + o.SimulationCallType = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *CallExecutionDetail) GetProvider() string { + if o == nil || IsNil(o.Provider) { + var ret string + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionDetail) GetProviderOk() (*string, bool) { + if o == nil || IsNil(o.Provider) { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasProvider() bool { + if o != nil && !IsNil(o.Provider) { + return true + } + + return false +} + +// SetProvider gets a reference to the given string and assigns it to the Provider field. +func (o *CallExecutionDetail) SetProvider(v string) { + o.Provider = &v +} + +// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionDetail) GetPhoneNumber() string { + if o == nil || IsNil(o.PhoneNumber.Get()) { + var ret string + return ret + } + return *o.PhoneNumber.Get() +} + +// GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionDetail) GetPhoneNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PhoneNumber.Get(), o.PhoneNumber.IsSet() +} + +// HasPhoneNumber returns a boolean if a field has been set. +func (o *CallExecutionDetail) HasPhoneNumber() bool { + if o != nil && o.PhoneNumber.IsSet() { + return true + } + + return false +} + +// SetPhoneNumber gets a reference to the given NullableString and assigns it to the PhoneNumber field. +func (o *CallExecutionDetail) SetPhoneNumber(v string) { + o.PhoneNumber.Set(&v) +} + +// SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil +func (o *CallExecutionDetail) SetPhoneNumberNil() { + o.PhoneNumber.Set(nil) +} + +// UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil +func (o *CallExecutionDetail) UnsetPhoneNumber() { + o.PhoneNumber.Unset() +} + +func (o CallExecutionDetail) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecutionDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ServiceProviderCallId) { + toSerialize["service_provider_call_id"] = o.ServiceProviderCallId + } + if !IsNil(o.SessionId) { + toSerialize["session_id"] = o.SessionId + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.CallType) { + toSerialize["call_type"] = o.CallType + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Duration) { + toSerialize["duration"] = o.Duration + } + if o.DurationSeconds.IsSet() { + toSerialize["duration_seconds"] = o.DurationSeconds.Get() + } + if !IsNil(o.StartTime) { + toSerialize["start_time"] = o.StartTime + } + if !IsNil(o.Transcript) { + toSerialize["transcript"] = o.Transcript + } + if !IsNil(o.Scenario) { + toSerialize["scenario"] = o.Scenario + } + if !IsNil(o.OverallScore) { + toSerialize["overall_score"] = o.OverallScore + } + if !IsNil(o.ResponseTime) { + toSerialize["response_time"] = o.ResponseTime + } + if o.ResponseTimeMs.IsSet() { + toSerialize["response_time_ms"] = o.ResponseTimeMs.Get() + } + if !IsNil(o.AudioUrl) { + toSerialize["audio_url"] = o.AudioUrl + } + if !IsNil(o.CustomerName) { + toSerialize["customer_name"] = o.CustomerName + } + if !IsNil(o.EvalOutputs) { + toSerialize["eval_outputs"] = o.EvalOutputs + } + if !IsNil(o.EvalMetrics) { + toSerialize["eval_metrics"] = o.EvalMetrics + } + if !IsNil(o.ScenarioColumns) { + toSerialize["scenario_columns"] = o.ScenarioColumns + } + if o.EndedReason.IsSet() { + toSerialize["ended_reason"] = o.EndedReason.Get() + } + if !IsNil(o.SimulatorAgentName) { + toSerialize["simulator_agent_name"] = o.SimulatorAgentName + } + if !IsNil(o.SimulatorAgentId) { + toSerialize["simulator_agent_id"] = o.SimulatorAgentId + } + if !IsNil(o.AgentDefinitionUsedName) { + toSerialize["agent_definition_used_name"] = o.AgentDefinitionUsedName + } + if !IsNil(o.AgentDefinitionUsedId) { + toSerialize["agent_definition_used_id"] = o.AgentDefinitionUsedId + } + if o.CallSummary.IsSet() { + toSerialize["call_summary"] = o.CallSummary.Get() + } + if !IsNil(o.Recordings) { + toSerialize["recordings"] = o.Recordings + } + if !IsNil(o.ScenarioId) { + toSerialize["scenario_id"] = o.ScenarioId + } + if !IsNil(o.AvgAgentLatency) { + toSerialize["avg_agent_latency"] = o.AvgAgentLatency + } + if o.AvgAgentLatencyMs.IsSet() { + toSerialize["avg_agent_latency_ms"] = o.AvgAgentLatencyMs.Get() + } + if o.UserInterruptionCount.IsSet() { + toSerialize["user_interruption_count"] = o.UserInterruptionCount.Get() + } + if o.UserInterruptionRate.IsSet() { + toSerialize["user_interruption_rate"] = o.UserInterruptionRate.Get() + } + if o.UserWpm.IsSet() { + toSerialize["user_wpm"] = o.UserWpm.Get() + } + if o.BotWpm.IsSet() { + toSerialize["bot_wpm"] = o.BotWpm.Get() + } + if o.TalkRatio.IsSet() { + toSerialize["talk_ratio"] = o.TalkRatio.Get() + } + if o.AiInterruptionCount.IsSet() { + toSerialize["ai_interruption_count"] = o.AiInterruptionCount.Get() + } + if o.AiInterruptionRate.IsSet() { + toSerialize["ai_interruption_rate"] = o.AiInterruptionRate.Get() + } + if !IsNil(o.AvgStopTimeAfterInterruption) { + toSerialize["avg_stop_time_after_interruption"] = o.AvgStopTimeAfterInterruption + } + if !IsNil(o.TotalTokens) { + toSerialize["total_tokens"] = o.TotalTokens + } + if !IsNil(o.InputTokens) { + toSerialize["input_tokens"] = o.InputTokens + } + if !IsNil(o.OutputTokens) { + toSerialize["output_tokens"] = o.OutputTokens + } + if !IsNil(o.AvgLatencyMs) { + toSerialize["avg_latency_ms"] = o.AvgLatencyMs + } + if !IsNil(o.TurnCount) { + toSerialize["turn_count"] = o.TurnCount + } + if !IsNil(o.AgentTalkPercentage) { + toSerialize["agent_talk_percentage"] = o.AgentTalkPercentage + } + if !IsNil(o.CsatScore) { + toSerialize["csat_score"] = o.CsatScore + } + if !IsNil(o.ProcessingSkipped) { + toSerialize["processing_skipped"] = o.ProcessingSkipped + } + if !IsNil(o.ProcessingSkipReason) { + toSerialize["processing_skip_reason"] = o.ProcessingSkipReason + } + if !IsNil(o.RerunSnapshots) { + toSerialize["rerun_snapshots"] = o.RerunSnapshots + } + if !IsNil(o.IsSnapshot) { + toSerialize["is_snapshot"] = o.IsSnapshot + } + if !IsNil(o.SnapshotTimestamp) { + toSerialize["snapshot_timestamp"] = o.SnapshotTimestamp + } + if !IsNil(o.RerunType) { + toSerialize["rerun_type"] = o.RerunType + } + if !IsNil(o.OriginalCallExecutionId) { + toSerialize["original_call_execution_id"] = o.OriginalCallExecutionId + } + if !IsNil(o.ToolOutputs) { + toSerialize["tool_outputs"] = o.ToolOutputs + } + if o.CostCents.IsSet() { + toSerialize["cost_cents"] = o.CostCents.Get() + } + if o.CustomerCostCents.IsSet() { + toSerialize["customer_cost_cents"] = o.CustomerCostCents.Get() + } + if !IsNil(o.CustomerCostBreakdown) { + toSerialize["customer_cost_breakdown"] = o.CustomerCostBreakdown + } + if !IsNil(o.CustomerLatencyMetrics) { + toSerialize["customer_latency_metrics"] = o.CustomerLatencyMetrics + } + if o.CustomerCallId.IsSet() { + toSerialize["customer_call_id"] = o.CustomerCallId.Get() + } + if !IsNil(o.SimulationCallType) { + toSerialize["simulation_call_type"] = o.SimulationCallType + } + if !IsNil(o.Provider) { + toSerialize["provider"] = o.Provider + } + if o.PhoneNumber.IsSet() { + toSerialize["phone_number"] = o.PhoneNumber.Get() + } + return toSerialize, nil +} + +type NullableCallExecutionDetail struct { + value *CallExecutionDetail + isSet bool +} + +func (v NullableCallExecutionDetail) Get() *CallExecutionDetail { + return v.value +} + +func (v *NullableCallExecutionDetail) Set(val *CallExecutionDetail) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecutionDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecutionDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecutionDetail(val *CallExecutionDetail) *NullableCallExecutionDetail { + return &NullableCallExecutionDetail{value: val, isSet: true} +} + +func (v NullableCallExecutionDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecutionDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution_error_localizer_tasks_response.go b/go/futureagi/model_call_execution_error_localizer_tasks_response.go new file mode 100644 index 0000000..0f98ec8 --- /dev/null +++ b/go/futureagi/model_call_execution_error_localizer_tasks_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CallExecutionErrorLocalizerTasksResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecutionErrorLocalizerTasksResponse{} + +// CallExecutionErrorLocalizerTasksResponse struct for CallExecutionErrorLocalizerTasksResponse +type CallExecutionErrorLocalizerTasksResponse struct { + CallExecutionId *string `json:"call_execution_id,omitempty"` + ErrorLocalizerTasks []ErrorLocalizerTaskResponse `json:"error_localizer_tasks,omitempty"` + TotalTasks *int32 `json:"total_tasks,omitempty"` +} + +// NewCallExecutionErrorLocalizerTasksResponse instantiates a new CallExecutionErrorLocalizerTasksResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecutionErrorLocalizerTasksResponse() *CallExecutionErrorLocalizerTasksResponse { + this := CallExecutionErrorLocalizerTasksResponse{} + return &this +} + +// NewCallExecutionErrorLocalizerTasksResponseWithDefaults instantiates a new CallExecutionErrorLocalizerTasksResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionErrorLocalizerTasksResponseWithDefaults() *CallExecutionErrorLocalizerTasksResponse { + this := CallExecutionErrorLocalizerTasksResponse{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value if set, zero value otherwise. +func (o *CallExecutionErrorLocalizerTasksResponse) GetCallExecutionId() string { + if o == nil || IsNil(o.CallExecutionId) { + var ret string + return ret + } + return *o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionErrorLocalizerTasksResponse) GetCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.CallExecutionId) { + return nil, false + } + return o.CallExecutionId, true +} + +// HasCallExecutionId returns a boolean if a field has been set. +func (o *CallExecutionErrorLocalizerTasksResponse) HasCallExecutionId() bool { + if o != nil && !IsNil(o.CallExecutionId) { + return true + } + + return false +} + +// SetCallExecutionId gets a reference to the given string and assigns it to the CallExecutionId field. +func (o *CallExecutionErrorLocalizerTasksResponse) SetCallExecutionId(v string) { + o.CallExecutionId = &v +} + +// GetErrorLocalizerTasks returns the ErrorLocalizerTasks field value if set, zero value otherwise. +func (o *CallExecutionErrorLocalizerTasksResponse) GetErrorLocalizerTasks() []ErrorLocalizerTaskResponse { + if o == nil || IsNil(o.ErrorLocalizerTasks) { + var ret []ErrorLocalizerTaskResponse + return ret + } + return o.ErrorLocalizerTasks +} + +// GetErrorLocalizerTasksOk returns a tuple with the ErrorLocalizerTasks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionErrorLocalizerTasksResponse) GetErrorLocalizerTasksOk() ([]ErrorLocalizerTaskResponse, bool) { + if o == nil || IsNil(o.ErrorLocalizerTasks) { + return nil, false + } + return o.ErrorLocalizerTasks, true +} + +// HasErrorLocalizerTasks returns a boolean if a field has been set. +func (o *CallExecutionErrorLocalizerTasksResponse) HasErrorLocalizerTasks() bool { + if o != nil && !IsNil(o.ErrorLocalizerTasks) { + return true + } + + return false +} + +// SetErrorLocalizerTasks gets a reference to the given []ErrorLocalizerTaskResponse and assigns it to the ErrorLocalizerTasks field. +func (o *CallExecutionErrorLocalizerTasksResponse) SetErrorLocalizerTasks(v []ErrorLocalizerTaskResponse) { + o.ErrorLocalizerTasks = v +} + +// GetTotalTasks returns the TotalTasks field value if set, zero value otherwise. +func (o *CallExecutionErrorLocalizerTasksResponse) GetTotalTasks() int32 { + if o == nil || IsNil(o.TotalTasks) { + var ret int32 + return ret + } + return *o.TotalTasks +} + +// GetTotalTasksOk returns a tuple with the TotalTasks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionErrorLocalizerTasksResponse) GetTotalTasksOk() (*int32, bool) { + if o == nil || IsNil(o.TotalTasks) { + return nil, false + } + return o.TotalTasks, true +} + +// HasTotalTasks returns a boolean if a field has been set. +func (o *CallExecutionErrorLocalizerTasksResponse) HasTotalTasks() bool { + if o != nil && !IsNil(o.TotalTasks) { + return true + } + + return false +} + +// SetTotalTasks gets a reference to the given int32 and assigns it to the TotalTasks field. +func (o *CallExecutionErrorLocalizerTasksResponse) SetTotalTasks(v int32) { + o.TotalTasks = &v +} + +func (o CallExecutionErrorLocalizerTasksResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecutionErrorLocalizerTasksResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallExecutionId) { + toSerialize["call_execution_id"] = o.CallExecutionId + } + if !IsNil(o.ErrorLocalizerTasks) { + toSerialize["error_localizer_tasks"] = o.ErrorLocalizerTasks + } + if !IsNil(o.TotalTasks) { + toSerialize["total_tasks"] = o.TotalTasks + } + return toSerialize, nil +} + +type NullableCallExecutionErrorLocalizerTasksResponse struct { + value *CallExecutionErrorLocalizerTasksResponse + isSet bool +} + +func (v NullableCallExecutionErrorLocalizerTasksResponse) Get() *CallExecutionErrorLocalizerTasksResponse { + return v.value +} + +func (v *NullableCallExecutionErrorLocalizerTasksResponse) Set(val *CallExecutionErrorLocalizerTasksResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecutionErrorLocalizerTasksResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecutionErrorLocalizerTasksResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecutionErrorLocalizerTasksResponse(val *CallExecutionErrorLocalizerTasksResponse) *NullableCallExecutionErrorLocalizerTasksResponse { + return &NullableCallExecutionErrorLocalizerTasksResponse{value: val, isSet: true} +} + +func (v NullableCallExecutionErrorLocalizerTasksResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecutionErrorLocalizerTasksResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution_error_response.go b/go/futureagi/model_call_execution_error_response.go new file mode 100644 index 0000000..081bc93 --- /dev/null +++ b/go/futureagi/model_call_execution_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CallExecutionErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecutionErrorResponse{} + +// CallExecutionErrorResponse struct for CallExecutionErrorResponse +type CallExecutionErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewCallExecutionErrorResponse instantiates a new CallExecutionErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecutionErrorResponse() *CallExecutionErrorResponse { + this := CallExecutionErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewCallExecutionErrorResponseWithDefaults instantiates a new CallExecutionErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionErrorResponseWithDefaults() *CallExecutionErrorResponse { + this := CallExecutionErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CallExecutionErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *CallExecutionErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *CallExecutionErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *CallExecutionErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *CallExecutionErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *CallExecutionErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *CallExecutionErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *CallExecutionErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *CallExecutionErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *CallExecutionErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *CallExecutionErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *CallExecutionErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *CallExecutionErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *CallExecutionErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *CallExecutionErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *CallExecutionErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *CallExecutionErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *CallExecutionErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *CallExecutionErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *CallExecutionErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *CallExecutionErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *CallExecutionErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *CallExecutionErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *CallExecutionErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *CallExecutionErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *CallExecutionErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o CallExecutionErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecutionErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableCallExecutionErrorResponse struct { + value *CallExecutionErrorResponse + isSet bool +} + +func (v NullableCallExecutionErrorResponse) Get() *CallExecutionErrorResponse { + return v.value +} + +func (v *NullableCallExecutionErrorResponse) Set(val *CallExecutionErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecutionErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecutionErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecutionErrorResponse(val *CallExecutionErrorResponse) *NullableCallExecutionErrorResponse { + return &NullableCallExecutionErrorResponse{value: val, isSet: true} +} + +func (v NullableCallExecutionErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecutionErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution_logs_response.go b/go/futureagi/model_call_execution_logs_response.go new file mode 100644 index 0000000..b946826 --- /dev/null +++ b/go/futureagi/model_call_execution_logs_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CallExecutionLogsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecutionLogsResponse{} + +// CallExecutionLogsResponse struct for CallExecutionLogsResponse +type CallExecutionLogsResponse struct { + Results []CallLogEntryResponse `json:"results,omitempty"` + Source *string `json:"source,omitempty"` + IngestionPending *bool `json:"ingestion_pending,omitempty"` +} + +// NewCallExecutionLogsResponse instantiates a new CallExecutionLogsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecutionLogsResponse() *CallExecutionLogsResponse { + this := CallExecutionLogsResponse{} + return &this +} + +// NewCallExecutionLogsResponseWithDefaults instantiates a new CallExecutionLogsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionLogsResponseWithDefaults() *CallExecutionLogsResponse { + this := CallExecutionLogsResponse{} + return &this +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *CallExecutionLogsResponse) GetResults() []CallLogEntryResponse { + if o == nil || IsNil(o.Results) { + var ret []CallLogEntryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionLogsResponse) GetResultsOk() ([]CallLogEntryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *CallExecutionLogsResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CallLogEntryResponse and assigns it to the Results field. +func (o *CallExecutionLogsResponse) SetResults(v []CallLogEntryResponse) { + o.Results = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *CallExecutionLogsResponse) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionLogsResponse) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *CallExecutionLogsResponse) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *CallExecutionLogsResponse) SetSource(v string) { + o.Source = &v +} + +// GetIngestionPending returns the IngestionPending field value if set, zero value otherwise. +func (o *CallExecutionLogsResponse) GetIngestionPending() bool { + if o == nil || IsNil(o.IngestionPending) { + var ret bool + return ret + } + return *o.IngestionPending +} + +// GetIngestionPendingOk returns a tuple with the IngestionPending field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionLogsResponse) GetIngestionPendingOk() (*bool, bool) { + if o == nil || IsNil(o.IngestionPending) { + return nil, false + } + return o.IngestionPending, true +} + +// HasIngestionPending returns a boolean if a field has been set. +func (o *CallExecutionLogsResponse) HasIngestionPending() bool { + if o != nil && !IsNil(o.IngestionPending) { + return true + } + + return false +} + +// SetIngestionPending gets a reference to the given bool and assigns it to the IngestionPending field. +func (o *CallExecutionLogsResponse) SetIngestionPending(v bool) { + o.IngestionPending = &v +} + +func (o CallExecutionLogsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecutionLogsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.IngestionPending) { + toSerialize["ingestion_pending"] = o.IngestionPending + } + return toSerialize, nil +} + +type NullableCallExecutionLogsResponse struct { + value *CallExecutionLogsResponse + isSet bool +} + +func (v NullableCallExecutionLogsResponse) Get() *CallExecutionLogsResponse { + return v.value +} + +func (v *NullableCallExecutionLogsResponse) Set(val *CallExecutionLogsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecutionLogsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecutionLogsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecutionLogsResponse(val *CallExecutionLogsResponse) *NullableCallExecutionLogsResponse { + return &NullableCallExecutionLogsResponse{value: val, isSet: true} +} + +func (v NullableCallExecutionLogsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecutionLogsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution_rerun.go b/go/futureagi/model_call_execution_rerun.go new file mode 100644 index 0000000..1d680df --- /dev/null +++ b/go/futureagi/model_call_execution_rerun.go @@ -0,0 +1,236 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CallExecutionRerun type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecutionRerun{} + +// CallExecutionRerun struct for CallExecutionRerun +type CallExecutionRerun struct { + // Type of rerun: evaluation only or call plus evaluation + RerunType string `json:"rerun_type"` + // List of specific call execution IDs to rerun + CallExecutionIds []string `json:"call_execution_ids,omitempty"` + // Whether to rerun all call executions in the test execution + SelectAll *bool `json:"select_all,omitempty"` +} + +type _CallExecutionRerun CallExecutionRerun + +// NewCallExecutionRerun instantiates a new CallExecutionRerun object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecutionRerun(rerunType string) *CallExecutionRerun { + this := CallExecutionRerun{} + this.RerunType = rerunType + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// NewCallExecutionRerunWithDefaults instantiates a new CallExecutionRerun object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionRerunWithDefaults() *CallExecutionRerun { + this := CallExecutionRerun{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// GetRerunType returns the RerunType field value +func (o *CallExecutionRerun) GetRerunType() string { + if o == nil { + var ret string + return ret + } + + return o.RerunType +} + +// GetRerunTypeOk returns a tuple with the RerunType field value +// and a boolean to check if the value has been set. +func (o *CallExecutionRerun) GetRerunTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RerunType, true +} + +// SetRerunType sets field value +func (o *CallExecutionRerun) SetRerunType(v string) { + o.RerunType = v +} + +// GetCallExecutionIds returns the CallExecutionIds field value if set, zero value otherwise. +func (o *CallExecutionRerun) GetCallExecutionIds() []string { + if o == nil || IsNil(o.CallExecutionIds) { + var ret []string + return ret + } + return o.CallExecutionIds +} + +// GetCallExecutionIdsOk returns a tuple with the CallExecutionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionRerun) GetCallExecutionIdsOk() ([]string, bool) { + if o == nil || IsNil(o.CallExecutionIds) { + return nil, false + } + return o.CallExecutionIds, true +} + +// HasCallExecutionIds returns a boolean if a field has been set. +func (o *CallExecutionRerun) HasCallExecutionIds() bool { + if o != nil && !IsNil(o.CallExecutionIds) { + return true + } + + return false +} + +// SetCallExecutionIds gets a reference to the given []string and assigns it to the CallExecutionIds field. +func (o *CallExecutionRerun) SetCallExecutionIds(v []string) { + o.CallExecutionIds = v +} + +// GetSelectAll returns the SelectAll field value if set, zero value otherwise. +func (o *CallExecutionRerun) GetSelectAll() bool { + if o == nil || IsNil(o.SelectAll) { + var ret bool + return ret + } + return *o.SelectAll +} + +// GetSelectAllOk returns a tuple with the SelectAll field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallExecutionRerun) GetSelectAllOk() (*bool, bool) { + if o == nil || IsNil(o.SelectAll) { + return nil, false + } + return o.SelectAll, true +} + +// HasSelectAll returns a boolean if a field has been set. +func (o *CallExecutionRerun) HasSelectAll() bool { + if o != nil && !IsNil(o.SelectAll) { + return true + } + + return false +} + +// SetSelectAll gets a reference to the given bool and assigns it to the SelectAll field. +func (o *CallExecutionRerun) SetSelectAll(v bool) { + o.SelectAll = &v +} + +func (o CallExecutionRerun) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecutionRerun) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["rerun_type"] = o.RerunType + if !IsNil(o.CallExecutionIds) { + toSerialize["call_execution_ids"] = o.CallExecutionIds + } + if !IsNil(o.SelectAll) { + toSerialize["select_all"] = o.SelectAll + } + return toSerialize, nil +} + +func (o *CallExecutionRerun) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rerun_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCallExecutionRerun := _CallExecutionRerun{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCallExecutionRerun) + + if err != nil { + return err + } + + *o = CallExecutionRerun(varCallExecutionRerun) + + return err +} + +type NullableCallExecutionRerun struct { + value *CallExecutionRerun + isSet bool +} + +func (v NullableCallExecutionRerun) Get() *CallExecutionRerun { + return v.value +} + +func (v *NullableCallExecutionRerun) Set(val *CallExecutionRerun) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecutionRerun) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecutionRerun) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecutionRerun(val *CallExecutionRerun) *NullableCallExecutionRerun { + return &NullableCallExecutionRerun{value: val, isSet: true} +} + +func (v NullableCallExecutionRerun) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecutionRerun) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_execution_status_update.go b/go/futureagi/model_call_execution_status_update.go new file mode 100644 index 0000000..2b214e7 --- /dev/null +++ b/go/futureagi/model_call_execution_status_update.go @@ -0,0 +1,204 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CallExecutionStatusUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallExecutionStatusUpdate{} + +// CallExecutionStatusUpdate struct for CallExecutionStatusUpdate +type CallExecutionStatusUpdate struct { + Status string `json:"status"` + EndedReason NullableString `json:"ended_reason,omitempty"` +} + +type _CallExecutionStatusUpdate CallExecutionStatusUpdate + +// NewCallExecutionStatusUpdate instantiates a new CallExecutionStatusUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallExecutionStatusUpdate(status string) *CallExecutionStatusUpdate { + this := CallExecutionStatusUpdate{} + this.Status = status + return &this +} + +// NewCallExecutionStatusUpdateWithDefaults instantiates a new CallExecutionStatusUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallExecutionStatusUpdateWithDefaults() *CallExecutionStatusUpdate { + this := CallExecutionStatusUpdate{} + return &this +} + +// GetStatus returns the Status field value +func (o *CallExecutionStatusUpdate) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CallExecutionStatusUpdate) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CallExecutionStatusUpdate) SetStatus(v string) { + o.Status = v +} + +// GetEndedReason returns the EndedReason field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallExecutionStatusUpdate) GetEndedReason() string { + if o == nil || IsNil(o.EndedReason.Get()) { + var ret string + return ret + } + return *o.EndedReason.Get() +} + +// GetEndedReasonOk returns a tuple with the EndedReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallExecutionStatusUpdate) GetEndedReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EndedReason.Get(), o.EndedReason.IsSet() +} + +// HasEndedReason returns a boolean if a field has been set. +func (o *CallExecutionStatusUpdate) HasEndedReason() bool { + if o != nil && o.EndedReason.IsSet() { + return true + } + + return false +} + +// SetEndedReason gets a reference to the given NullableString and assigns it to the EndedReason field. +func (o *CallExecutionStatusUpdate) SetEndedReason(v string) { + o.EndedReason.Set(&v) +} + +// SetEndedReasonNil sets the value for EndedReason to be an explicit nil +func (o *CallExecutionStatusUpdate) SetEndedReasonNil() { + o.EndedReason.Set(nil) +} + +// UnsetEndedReason ensures that no value is present for EndedReason, not even an explicit nil +func (o *CallExecutionStatusUpdate) UnsetEndedReason() { + o.EndedReason.Unset() +} + +func (o CallExecutionStatusUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallExecutionStatusUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + if o.EndedReason.IsSet() { + toSerialize["ended_reason"] = o.EndedReason.Get() + } + return toSerialize, nil +} + +func (o *CallExecutionStatusUpdate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCallExecutionStatusUpdate := _CallExecutionStatusUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCallExecutionStatusUpdate) + + if err != nil { + return err + } + + *o = CallExecutionStatusUpdate(varCallExecutionStatusUpdate) + + return err +} + +type NullableCallExecutionStatusUpdate struct { + value *CallExecutionStatusUpdate + isSet bool +} + +func (v NullableCallExecutionStatusUpdate) Get() *CallExecutionStatusUpdate { + return v.value +} + +func (v *NullableCallExecutionStatusUpdate) Set(val *CallExecutionStatusUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableCallExecutionStatusUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableCallExecutionStatusUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallExecutionStatusUpdate(val *CallExecutionStatusUpdate) *NullableCallExecutionStatusUpdate { + return &NullableCallExecutionStatusUpdate{value: val, isSet: true} +} + +func (v NullableCallExecutionStatusUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallExecutionStatusUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_log_entry_response.go b/go/futureagi/model_call_log_entry_response.go new file mode 100644 index 0000000..e5ed4bc --- /dev/null +++ b/go/futureagi/model_call_log_entry_response.go @@ -0,0 +1,432 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CallLogEntryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallLogEntryResponse{} + +// CallLogEntryResponse struct for CallLogEntryResponse +type CallLogEntryResponse struct { + Id *string `json:"id,omitempty"` + LoggedAt NullableString `json:"logged_at,omitempty"` + Level NullableString `json:"level,omitempty"` + SeverityText NullableString `json:"severity_text,omitempty"` + Category NullableString `json:"category,omitempty"` + Body NullableString `json:"body,omitempty"` + Attributes *map[string]string `json:"attributes,omitempty"` + Payload *map[string]string `json:"payload,omitempty"` +} + +// NewCallLogEntryResponse instantiates a new CallLogEntryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallLogEntryResponse() *CallLogEntryResponse { + this := CallLogEntryResponse{} + return &this +} + +// NewCallLogEntryResponseWithDefaults instantiates a new CallLogEntryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallLogEntryResponseWithDefaults() *CallLogEntryResponse { + this := CallLogEntryResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CallLogEntryResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallLogEntryResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CallLogEntryResponse) SetId(v string) { + o.Id = &v +} + +// GetLoggedAt returns the LoggedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallLogEntryResponse) GetLoggedAt() string { + if o == nil || IsNil(o.LoggedAt.Get()) { + var ret string + return ret + } + return *o.LoggedAt.Get() +} + +// GetLoggedAtOk returns a tuple with the LoggedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallLogEntryResponse) GetLoggedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LoggedAt.Get(), o.LoggedAt.IsSet() +} + +// HasLoggedAt returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasLoggedAt() bool { + if o != nil && o.LoggedAt.IsSet() { + return true + } + + return false +} + +// SetLoggedAt gets a reference to the given NullableString and assigns it to the LoggedAt field. +func (o *CallLogEntryResponse) SetLoggedAt(v string) { + o.LoggedAt.Set(&v) +} + +// SetLoggedAtNil sets the value for LoggedAt to be an explicit nil +func (o *CallLogEntryResponse) SetLoggedAtNil() { + o.LoggedAt.Set(nil) +} + +// UnsetLoggedAt ensures that no value is present for LoggedAt, not even an explicit nil +func (o *CallLogEntryResponse) UnsetLoggedAt() { + o.LoggedAt.Unset() +} + +// GetLevel returns the Level field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallLogEntryResponse) GetLevel() string { + if o == nil || IsNil(o.Level.Get()) { + var ret string + return ret + } + return *o.Level.Get() +} + +// GetLevelOk returns a tuple with the Level field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallLogEntryResponse) GetLevelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Level.Get(), o.Level.IsSet() +} + +// HasLevel returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasLevel() bool { + if o != nil && o.Level.IsSet() { + return true + } + + return false +} + +// SetLevel gets a reference to the given NullableString and assigns it to the Level field. +func (o *CallLogEntryResponse) SetLevel(v string) { + o.Level.Set(&v) +} + +// SetLevelNil sets the value for Level to be an explicit nil +func (o *CallLogEntryResponse) SetLevelNil() { + o.Level.Set(nil) +} + +// UnsetLevel ensures that no value is present for Level, not even an explicit nil +func (o *CallLogEntryResponse) UnsetLevel() { + o.Level.Unset() +} + +// GetSeverityText returns the SeverityText field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallLogEntryResponse) GetSeverityText() string { + if o == nil || IsNil(o.SeverityText.Get()) { + var ret string + return ret + } + return *o.SeverityText.Get() +} + +// GetSeverityTextOk returns a tuple with the SeverityText field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallLogEntryResponse) GetSeverityTextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SeverityText.Get(), o.SeverityText.IsSet() +} + +// HasSeverityText returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasSeverityText() bool { + if o != nil && o.SeverityText.IsSet() { + return true + } + + return false +} + +// SetSeverityText gets a reference to the given NullableString and assigns it to the SeverityText field. +func (o *CallLogEntryResponse) SetSeverityText(v string) { + o.SeverityText.Set(&v) +} + +// SetSeverityTextNil sets the value for SeverityText to be an explicit nil +func (o *CallLogEntryResponse) SetSeverityTextNil() { + o.SeverityText.Set(nil) +} + +// UnsetSeverityText ensures that no value is present for SeverityText, not even an explicit nil +func (o *CallLogEntryResponse) UnsetSeverityText() { + o.SeverityText.Unset() +} + +// GetCategory returns the Category field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallLogEntryResponse) GetCategory() string { + if o == nil || IsNil(o.Category.Get()) { + var ret string + return ret + } + return *o.Category.Get() +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallLogEntryResponse) GetCategoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Category.Get(), o.Category.IsSet() +} + +// HasCategory returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasCategory() bool { + if o != nil && o.Category.IsSet() { + return true + } + + return false +} + +// SetCategory gets a reference to the given NullableString and assigns it to the Category field. +func (o *CallLogEntryResponse) SetCategory(v string) { + o.Category.Set(&v) +} + +// SetCategoryNil sets the value for Category to be an explicit nil +func (o *CallLogEntryResponse) SetCategoryNil() { + o.Category.Set(nil) +} + +// UnsetCategory ensures that no value is present for Category, not even an explicit nil +func (o *CallLogEntryResponse) UnsetCategory() { + o.Category.Unset() +} + +// GetBody returns the Body field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallLogEntryResponse) GetBody() string { + if o == nil || IsNil(o.Body.Get()) { + var ret string + return ret + } + return *o.Body.Get() +} + +// GetBodyOk returns a tuple with the Body field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallLogEntryResponse) GetBodyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Body.Get(), o.Body.IsSet() +} + +// HasBody returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasBody() bool { + if o != nil && o.Body.IsSet() { + return true + } + + return false +} + +// SetBody gets a reference to the given NullableString and assigns it to the Body field. +func (o *CallLogEntryResponse) SetBody(v string) { + o.Body.Set(&v) +} + +// SetBodyNil sets the value for Body to be an explicit nil +func (o *CallLogEntryResponse) SetBodyNil() { + o.Body.Set(nil) +} + +// UnsetBody ensures that no value is present for Body, not even an explicit nil +func (o *CallLogEntryResponse) UnsetBody() { + o.Body.Unset() +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *CallLogEntryResponse) GetAttributes() map[string]string { + if o == nil || IsNil(o.Attributes) { + var ret map[string]string + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallLogEntryResponse) GetAttributesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Attributes) { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasAttributes() bool { + if o != nil && !IsNil(o.Attributes) { + return true + } + + return false +} + +// SetAttributes gets a reference to the given map[string]string and assigns it to the Attributes field. +func (o *CallLogEntryResponse) SetAttributes(v map[string]string) { + o.Attributes = &v +} + +// GetPayload returns the Payload field value if set, zero value otherwise. +func (o *CallLogEntryResponse) GetPayload() map[string]string { + if o == nil || IsNil(o.Payload) { + var ret map[string]string + return ret + } + return *o.Payload +} + +// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallLogEntryResponse) GetPayloadOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Payload) { + return nil, false + } + return o.Payload, true +} + +// HasPayload returns a boolean if a field has been set. +func (o *CallLogEntryResponse) HasPayload() bool { + if o != nil && !IsNil(o.Payload) { + return true + } + + return false +} + +// SetPayload gets a reference to the given map[string]string and assigns it to the Payload field. +func (o *CallLogEntryResponse) SetPayload(v map[string]string) { + o.Payload = &v +} + +func (o CallLogEntryResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallLogEntryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.LoggedAt.IsSet() { + toSerialize["logged_at"] = o.LoggedAt.Get() + } + if o.Level.IsSet() { + toSerialize["level"] = o.Level.Get() + } + if o.SeverityText.IsSet() { + toSerialize["severity_text"] = o.SeverityText.Get() + } + if o.Category.IsSet() { + toSerialize["category"] = o.Category.Get() + } + if o.Body.IsSet() { + toSerialize["body"] = o.Body.Get() + } + if !IsNil(o.Attributes) { + toSerialize["attributes"] = o.Attributes + } + if !IsNil(o.Payload) { + toSerialize["payload"] = o.Payload + } + return toSerialize, nil +} + +type NullableCallLogEntryResponse struct { + value *CallLogEntryResponse + isSet bool +} + +func (v NullableCallLogEntryResponse) Get() *CallLogEntryResponse { + return v.value +} + +func (v *NullableCallLogEntryResponse) Set(val *CallLogEntryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallLogEntryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallLogEntryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallLogEntryResponse(val *CallLogEntryResponse) *NullableCallLogEntryResponse { + return &NullableCallLogEntryResponse{value: val, isSet: true} +} + +func (v NullableCallLogEntryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallLogEntryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_transcript.go b/go/futureagi/model_call_transcript.go new file mode 100644 index 0000000..3adfedd --- /dev/null +++ b/go/futureagi/model_call_transcript.go @@ -0,0 +1,451 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the CallTranscript type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallTranscript{} + +// CallTranscript struct for CallTranscript +type CallTranscript struct { + Id *string `json:"id,omitempty"` + // Role of the speaker (user or assistant) + SpeakerRole *string `json:"speaker_role,omitempty"` + // Transcript content + Content string `json:"content"` + // Start time of this transcript segment in milliseconds + StartTimeMs *int32 `json:"start_time_ms,omitempty"` + StartTimeSeconds *string `json:"start_time_seconds,omitempty"` + // End time of this transcript segment in milliseconds + EndTimeMs *int32 `json:"end_time_ms,omitempty"` + EndTimeSeconds *string `json:"end_time_seconds,omitempty"` + // Confidence score for this transcript segment + ConfidenceScore *float32 `json:"confidence_score,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +type _CallTranscript CallTranscript + +// NewCallTranscript instantiates a new CallTranscript object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallTranscript(content string) *CallTranscript { + this := CallTranscript{} + this.Content = content + return &this +} + +// NewCallTranscriptWithDefaults instantiates a new CallTranscript object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallTranscriptWithDefaults() *CallTranscript { + this := CallTranscript{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CallTranscript) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CallTranscript) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CallTranscript) SetId(v string) { + o.Id = &v +} + +// GetSpeakerRole returns the SpeakerRole field value if set, zero value otherwise. +func (o *CallTranscript) GetSpeakerRole() string { + if o == nil || IsNil(o.SpeakerRole) { + var ret string + return ret + } + return *o.SpeakerRole +} + +// GetSpeakerRoleOk returns a tuple with the SpeakerRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetSpeakerRoleOk() (*string, bool) { + if o == nil || IsNil(o.SpeakerRole) { + return nil, false + } + return o.SpeakerRole, true +} + +// HasSpeakerRole returns a boolean if a field has been set. +func (o *CallTranscript) HasSpeakerRole() bool { + if o != nil && !IsNil(o.SpeakerRole) { + return true + } + + return false +} + +// SetSpeakerRole gets a reference to the given string and assigns it to the SpeakerRole field. +func (o *CallTranscript) SetSpeakerRole(v string) { + o.SpeakerRole = &v +} + +// GetContent returns the Content field value +func (o *CallTranscript) GetContent() string { + if o == nil { + var ret string + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetContentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Content, true +} + +// SetContent sets field value +func (o *CallTranscript) SetContent(v string) { + o.Content = v +} + +// GetStartTimeMs returns the StartTimeMs field value if set, zero value otherwise. +func (o *CallTranscript) GetStartTimeMs() int32 { + if o == nil || IsNil(o.StartTimeMs) { + var ret int32 + return ret + } + return *o.StartTimeMs +} + +// GetStartTimeMsOk returns a tuple with the StartTimeMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetStartTimeMsOk() (*int32, bool) { + if o == nil || IsNil(o.StartTimeMs) { + return nil, false + } + return o.StartTimeMs, true +} + +// HasStartTimeMs returns a boolean if a field has been set. +func (o *CallTranscript) HasStartTimeMs() bool { + if o != nil && !IsNil(o.StartTimeMs) { + return true + } + + return false +} + +// SetStartTimeMs gets a reference to the given int32 and assigns it to the StartTimeMs field. +func (o *CallTranscript) SetStartTimeMs(v int32) { + o.StartTimeMs = &v +} + +// GetStartTimeSeconds returns the StartTimeSeconds field value if set, zero value otherwise. +func (o *CallTranscript) GetStartTimeSeconds() string { + if o == nil || IsNil(o.StartTimeSeconds) { + var ret string + return ret + } + return *o.StartTimeSeconds +} + +// GetStartTimeSecondsOk returns a tuple with the StartTimeSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetStartTimeSecondsOk() (*string, bool) { + if o == nil || IsNil(o.StartTimeSeconds) { + return nil, false + } + return o.StartTimeSeconds, true +} + +// HasStartTimeSeconds returns a boolean if a field has been set. +func (o *CallTranscript) HasStartTimeSeconds() bool { + if o != nil && !IsNil(o.StartTimeSeconds) { + return true + } + + return false +} + +// SetStartTimeSeconds gets a reference to the given string and assigns it to the StartTimeSeconds field. +func (o *CallTranscript) SetStartTimeSeconds(v string) { + o.StartTimeSeconds = &v +} + +// GetEndTimeMs returns the EndTimeMs field value if set, zero value otherwise. +func (o *CallTranscript) GetEndTimeMs() int32 { + if o == nil || IsNil(o.EndTimeMs) { + var ret int32 + return ret + } + return *o.EndTimeMs +} + +// GetEndTimeMsOk returns a tuple with the EndTimeMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetEndTimeMsOk() (*int32, bool) { + if o == nil || IsNil(o.EndTimeMs) { + return nil, false + } + return o.EndTimeMs, true +} + +// HasEndTimeMs returns a boolean if a field has been set. +func (o *CallTranscript) HasEndTimeMs() bool { + if o != nil && !IsNil(o.EndTimeMs) { + return true + } + + return false +} + +// SetEndTimeMs gets a reference to the given int32 and assigns it to the EndTimeMs field. +func (o *CallTranscript) SetEndTimeMs(v int32) { + o.EndTimeMs = &v +} + +// GetEndTimeSeconds returns the EndTimeSeconds field value if set, zero value otherwise. +func (o *CallTranscript) GetEndTimeSeconds() string { + if o == nil || IsNil(o.EndTimeSeconds) { + var ret string + return ret + } + return *o.EndTimeSeconds +} + +// GetEndTimeSecondsOk returns a tuple with the EndTimeSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetEndTimeSecondsOk() (*string, bool) { + if o == nil || IsNil(o.EndTimeSeconds) { + return nil, false + } + return o.EndTimeSeconds, true +} + +// HasEndTimeSeconds returns a boolean if a field has been set. +func (o *CallTranscript) HasEndTimeSeconds() bool { + if o != nil && !IsNil(o.EndTimeSeconds) { + return true + } + + return false +} + +// SetEndTimeSeconds gets a reference to the given string and assigns it to the EndTimeSeconds field. +func (o *CallTranscript) SetEndTimeSeconds(v string) { + o.EndTimeSeconds = &v +} + +// GetConfidenceScore returns the ConfidenceScore field value if set, zero value otherwise. +func (o *CallTranscript) GetConfidenceScore() float32 { + if o == nil || IsNil(o.ConfidenceScore) { + var ret float32 + return ret + } + return *o.ConfidenceScore +} + +// GetConfidenceScoreOk returns a tuple with the ConfidenceScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetConfidenceScoreOk() (*float32, bool) { + if o == nil || IsNil(o.ConfidenceScore) { + return nil, false + } + return o.ConfidenceScore, true +} + +// HasConfidenceScore returns a boolean if a field has been set. +func (o *CallTranscript) HasConfidenceScore() bool { + if o != nil && !IsNil(o.ConfidenceScore) { + return true + } + + return false +} + +// SetConfidenceScore gets a reference to the given float32 and assigns it to the ConfidenceScore field. +func (o *CallTranscript) SetConfidenceScore(v float32) { + o.ConfidenceScore = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CallTranscript) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscript) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CallTranscript) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CallTranscript) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o CallTranscript) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallTranscript) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.SpeakerRole) { + toSerialize["speaker_role"] = o.SpeakerRole + } + toSerialize["content"] = o.Content + if !IsNil(o.StartTimeMs) { + toSerialize["start_time_ms"] = o.StartTimeMs + } + if !IsNil(o.StartTimeSeconds) { + toSerialize["start_time_seconds"] = o.StartTimeSeconds + } + if !IsNil(o.EndTimeMs) { + toSerialize["end_time_ms"] = o.EndTimeMs + } + if !IsNil(o.EndTimeSeconds) { + toSerialize["end_time_seconds"] = o.EndTimeSeconds + } + if !IsNil(o.ConfidenceScore) { + toSerialize["confidence_score"] = o.ConfidenceScore + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *CallTranscript) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "content", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCallTranscript := _CallTranscript{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCallTranscript) + + if err != nil { + return err + } + + *o = CallTranscript(varCallTranscript) + + return err +} + +type NullableCallTranscript struct { + value *CallTranscript + isSet bool +} + +func (v NullableCallTranscript) Get() *CallTranscript { + return v.value +} + +func (v *NullableCallTranscript) Set(val *CallTranscript) { + v.value = val + v.isSet = true +} + +func (v NullableCallTranscript) IsSet() bool { + return v.isSet +} + +func (v *NullableCallTranscript) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallTranscript(val *CallTranscript) *NullableCallTranscript { + return &NullableCallTranscript{value: val, isSet: true} +} + +func (v NullableCallTranscript) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallTranscript) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_call_transcript_response.go b/go/futureagi/model_call_transcript_response.go new file mode 100644 index 0000000..74c5e80 --- /dev/null +++ b/go/futureagi/model_call_transcript_response.go @@ -0,0 +1,280 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CallTranscriptResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CallTranscriptResponse{} + +// CallTranscriptResponse struct for CallTranscriptResponse +type CallTranscriptResponse struct { + CallExecutionId *string `json:"call_execution_id,omitempty"` + PhoneNumber NullableString `json:"phone_number,omitempty"` + Status *string `json:"status,omitempty"` + Transcripts []CallTranscript `json:"transcripts,omitempty"` + TotalTranscripts *int32 `json:"total_transcripts,omitempty"` +} + +// NewCallTranscriptResponse instantiates a new CallTranscriptResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCallTranscriptResponse() *CallTranscriptResponse { + this := CallTranscriptResponse{} + return &this +} + +// NewCallTranscriptResponseWithDefaults instantiates a new CallTranscriptResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCallTranscriptResponseWithDefaults() *CallTranscriptResponse { + this := CallTranscriptResponse{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value if set, zero value otherwise. +func (o *CallTranscriptResponse) GetCallExecutionId() string { + if o == nil || IsNil(o.CallExecutionId) { + var ret string + return ret + } + return *o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscriptResponse) GetCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.CallExecutionId) { + return nil, false + } + return o.CallExecutionId, true +} + +// HasCallExecutionId returns a boolean if a field has been set. +func (o *CallTranscriptResponse) HasCallExecutionId() bool { + if o != nil && !IsNil(o.CallExecutionId) { + return true + } + + return false +} + +// SetCallExecutionId gets a reference to the given string and assigns it to the CallExecutionId field. +func (o *CallTranscriptResponse) SetCallExecutionId(v string) { + o.CallExecutionId = &v +} + +// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CallTranscriptResponse) GetPhoneNumber() string { + if o == nil || IsNil(o.PhoneNumber.Get()) { + var ret string + return ret + } + return *o.PhoneNumber.Get() +} + +// GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CallTranscriptResponse) GetPhoneNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PhoneNumber.Get(), o.PhoneNumber.IsSet() +} + +// HasPhoneNumber returns a boolean if a field has been set. +func (o *CallTranscriptResponse) HasPhoneNumber() bool { + if o != nil && o.PhoneNumber.IsSet() { + return true + } + + return false +} + +// SetPhoneNumber gets a reference to the given NullableString and assigns it to the PhoneNumber field. +func (o *CallTranscriptResponse) SetPhoneNumber(v string) { + o.PhoneNumber.Set(&v) +} + +// SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil +func (o *CallTranscriptResponse) SetPhoneNumberNil() { + o.PhoneNumber.Set(nil) +} + +// UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil +func (o *CallTranscriptResponse) UnsetPhoneNumber() { + o.PhoneNumber.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CallTranscriptResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscriptResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CallTranscriptResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CallTranscriptResponse) SetStatus(v string) { + o.Status = &v +} + +// GetTranscripts returns the Transcripts field value if set, zero value otherwise. +func (o *CallTranscriptResponse) GetTranscripts() []CallTranscript { + if o == nil || IsNil(o.Transcripts) { + var ret []CallTranscript + return ret + } + return o.Transcripts +} + +// GetTranscriptsOk returns a tuple with the Transcripts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscriptResponse) GetTranscriptsOk() ([]CallTranscript, bool) { + if o == nil || IsNil(o.Transcripts) { + return nil, false + } + return o.Transcripts, true +} + +// HasTranscripts returns a boolean if a field has been set. +func (o *CallTranscriptResponse) HasTranscripts() bool { + if o != nil && !IsNil(o.Transcripts) { + return true + } + + return false +} + +// SetTranscripts gets a reference to the given []CallTranscript and assigns it to the Transcripts field. +func (o *CallTranscriptResponse) SetTranscripts(v []CallTranscript) { + o.Transcripts = v +} + +// GetTotalTranscripts returns the TotalTranscripts field value if set, zero value otherwise. +func (o *CallTranscriptResponse) GetTotalTranscripts() int32 { + if o == nil || IsNil(o.TotalTranscripts) { + var ret int32 + return ret + } + return *o.TotalTranscripts +} + +// GetTotalTranscriptsOk returns a tuple with the TotalTranscripts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CallTranscriptResponse) GetTotalTranscriptsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalTranscripts) { + return nil, false + } + return o.TotalTranscripts, true +} + +// HasTotalTranscripts returns a boolean if a field has been set. +func (o *CallTranscriptResponse) HasTotalTranscripts() bool { + if o != nil && !IsNil(o.TotalTranscripts) { + return true + } + + return false +} + +// SetTotalTranscripts gets a reference to the given int32 and assigns it to the TotalTranscripts field. +func (o *CallTranscriptResponse) SetTotalTranscripts(v int32) { + o.TotalTranscripts = &v +} + +func (o CallTranscriptResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CallTranscriptResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallExecutionId) { + toSerialize["call_execution_id"] = o.CallExecutionId + } + if o.PhoneNumber.IsSet() { + toSerialize["phone_number"] = o.PhoneNumber.Get() + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Transcripts) { + toSerialize["transcripts"] = o.Transcripts + } + if !IsNil(o.TotalTranscripts) { + toSerialize["total_transcripts"] = o.TotalTranscripts + } + return toSerialize, nil +} + +type NullableCallTranscriptResponse struct { + value *CallTranscriptResponse + isSet bool +} + +func (v NullableCallTranscriptResponse) Get() *CallTranscriptResponse { + return v.value +} + +func (v *NullableCallTranscriptResponse) Set(val *CallTranscriptResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCallTranscriptResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCallTranscriptResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCallTranscriptResponse(val *CallTranscriptResponse) *NullableCallTranscriptResponse { + return &NullableCallTranscriptResponse{value: val, isSet: true} +} + +func (v NullableCallTranscriptResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCallTranscriptResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_cancel_test_execution_response.go b/go/futureagi/model_cancel_test_execution_response.go new file mode 100644 index 0000000..ea9b223 --- /dev/null +++ b/go/futureagi/model_cancel_test_execution_response.go @@ -0,0 +1,215 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CancelTestExecutionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CancelTestExecutionResponse{} + +// CancelTestExecutionResponse struct for CancelTestExecutionResponse +type CancelTestExecutionResponse struct { + Success bool `json:"success"` + Message string `json:"message"` + TestExecutionId NullableString `json:"test_execution_id"` +} + +type _CancelTestExecutionResponse CancelTestExecutionResponse + +// NewCancelTestExecutionResponse instantiates a new CancelTestExecutionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCancelTestExecutionResponse(success bool, message string, testExecutionId NullableString) *CancelTestExecutionResponse { + this := CancelTestExecutionResponse{} + this.Success = success + this.Message = message + this.TestExecutionId = testExecutionId + return &this +} + +// NewCancelTestExecutionResponseWithDefaults instantiates a new CancelTestExecutionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCancelTestExecutionResponseWithDefaults() *CancelTestExecutionResponse { + this := CancelTestExecutionResponse{} + return &this +} + +// GetSuccess returns the Success field value +func (o *CancelTestExecutionResponse) GetSuccess() bool { + if o == nil { + var ret bool + return ret + } + + return o.Success +} + +// GetSuccessOk returns a tuple with the Success field value +// and a boolean to check if the value has been set. +func (o *CancelTestExecutionResponse) GetSuccessOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Success, true +} + +// SetSuccess sets field value +func (o *CancelTestExecutionResponse) SetSuccess(v bool) { + o.Success = v +} + +// GetMessage returns the Message field value +func (o *CancelTestExecutionResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *CancelTestExecutionResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *CancelTestExecutionResponse) SetMessage(v string) { + o.Message = v +} + +// GetTestExecutionId returns the TestExecutionId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CancelTestExecutionResponse) GetTestExecutionId() string { + if o == nil || o.TestExecutionId.Get() == nil { + var ret string + return ret + } + + return *o.TestExecutionId.Get() +} + +// GetTestExecutionIdOk returns a tuple with the TestExecutionId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CancelTestExecutionResponse) GetTestExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TestExecutionId.Get(), o.TestExecutionId.IsSet() +} + +// SetTestExecutionId sets field value +func (o *CancelTestExecutionResponse) SetTestExecutionId(v string) { + o.TestExecutionId.Set(&v) +} + +func (o CancelTestExecutionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CancelTestExecutionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["success"] = o.Success + toSerialize["message"] = o.Message + toSerialize["test_execution_id"] = o.TestExecutionId.Get() + return toSerialize, nil +} + +func (o *CancelTestExecutionResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "success", + "message", + "test_execution_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCancelTestExecutionResponse := _CancelTestExecutionResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCancelTestExecutionResponse) + + if err != nil { + return err + } + + *o = CancelTestExecutionResponse(varCancelTestExecutionResponse) + + return err +} + +type NullableCancelTestExecutionResponse struct { + value *CancelTestExecutionResponse + isSet bool +} + +func (v NullableCancelTestExecutionResponse) Get() *CancelTestExecutionResponse { + return v.value +} + +func (v *NullableCancelTestExecutionResponse) Set(val *CancelTestExecutionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCancelTestExecutionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCancelTestExecutionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCancelTestExecutionResponse(val *CancelTestExecutionResponse) *NullableCancelTestExecutionResponse { + return &NullableCancelTestExecutionResponse{value: val, isSet: true} +} + +func (v NullableCancelTestExecutionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCancelTestExecutionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_chat_message_contract.go b/go/futureagi/model_chat_message_contract.go new file mode 100644 index 0000000..14af4a9 --- /dev/null +++ b/go/futureagi/model_chat_message_contract.go @@ -0,0 +1,371 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChatMessageContract type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatMessageContract{} + +// ChatMessageContract struct for ChatMessageContract +type ChatMessageContract struct { + Role string `json:"role"` + Content NullableString `json:"content,omitempty"` + ToolCallId NullableString `json:"tool_call_id,omitempty"` + Name NullableString `json:"name,omitempty"` + Metadata *map[string]string `json:"metadata,omitempty"` + ToolCalls []ChatToolCall `json:"tool_calls,omitempty"` +} + +type _ChatMessageContract ChatMessageContract + +// NewChatMessageContract instantiates a new ChatMessageContract object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatMessageContract(role string) *ChatMessageContract { + this := ChatMessageContract{} + this.Role = role + return &this +} + +// NewChatMessageContractWithDefaults instantiates a new ChatMessageContract object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatMessageContractWithDefaults() *ChatMessageContract { + this := ChatMessageContract{} + return &this +} + +// GetRole returns the Role field value +func (o *ChatMessageContract) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *ChatMessageContract) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *ChatMessageContract) SetRole(v string) { + o.Role = v +} + +// GetContent returns the Content field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ChatMessageContract) GetContent() string { + if o == nil || IsNil(o.Content.Get()) { + var ret string + return ret + } + return *o.Content.Get() +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChatMessageContract) GetContentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Content.Get(), o.Content.IsSet() +} + +// HasContent returns a boolean if a field has been set. +func (o *ChatMessageContract) HasContent() bool { + if o != nil && o.Content.IsSet() { + return true + } + + return false +} + +// SetContent gets a reference to the given NullableString and assigns it to the Content field. +func (o *ChatMessageContract) SetContent(v string) { + o.Content.Set(&v) +} + +// SetContentNil sets the value for Content to be an explicit nil +func (o *ChatMessageContract) SetContentNil() { + o.Content.Set(nil) +} + +// UnsetContent ensures that no value is present for Content, not even an explicit nil +func (o *ChatMessageContract) UnsetContent() { + o.Content.Unset() +} + +// GetToolCallId returns the ToolCallId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ChatMessageContract) GetToolCallId() string { + if o == nil || IsNil(o.ToolCallId.Get()) { + var ret string + return ret + } + return *o.ToolCallId.Get() +} + +// GetToolCallIdOk returns a tuple with the ToolCallId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChatMessageContract) GetToolCallIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ToolCallId.Get(), o.ToolCallId.IsSet() +} + +// HasToolCallId returns a boolean if a field has been set. +func (o *ChatMessageContract) HasToolCallId() bool { + if o != nil && o.ToolCallId.IsSet() { + return true + } + + return false +} + +// SetToolCallId gets a reference to the given NullableString and assigns it to the ToolCallId field. +func (o *ChatMessageContract) SetToolCallId(v string) { + o.ToolCallId.Set(&v) +} + +// SetToolCallIdNil sets the value for ToolCallId to be an explicit nil +func (o *ChatMessageContract) SetToolCallIdNil() { + o.ToolCallId.Set(nil) +} + +// UnsetToolCallId ensures that no value is present for ToolCallId, not even an explicit nil +func (o *ChatMessageContract) UnsetToolCallId() { + o.ToolCallId.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ChatMessageContract) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChatMessageContract) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ChatMessageContract) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ChatMessageContract) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *ChatMessageContract) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ChatMessageContract) UnsetName() { + o.Name.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *ChatMessageContract) GetMetadata() map[string]string { + if o == nil || IsNil(o.Metadata) { + var ret map[string]string + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatMessageContract) GetMetadataOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *ChatMessageContract) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field. +func (o *ChatMessageContract) SetMetadata(v map[string]string) { + o.Metadata = &v +} + +// GetToolCalls returns the ToolCalls field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ChatMessageContract) GetToolCalls() []ChatToolCall { + if o == nil { + var ret []ChatToolCall + return ret + } + return o.ToolCalls +} + +// GetToolCallsOk returns a tuple with the ToolCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChatMessageContract) GetToolCallsOk() ([]ChatToolCall, bool) { + if o == nil || IsNil(o.ToolCalls) { + return nil, false + } + return o.ToolCalls, true +} + +// HasToolCalls returns a boolean if a field has been set. +func (o *ChatMessageContract) HasToolCalls() bool { + if o != nil && !IsNil(o.ToolCalls) { + return true + } + + return false +} + +// SetToolCalls gets a reference to the given []ChatToolCall and assigns it to the ToolCalls field. +func (o *ChatMessageContract) SetToolCalls(v []ChatToolCall) { + o.ToolCalls = v +} + +func (o ChatMessageContract) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatMessageContract) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + if o.Content.IsSet() { + toSerialize["content"] = o.Content.Get() + } + if o.ToolCallId.IsSet() { + toSerialize["tool_call_id"] = o.ToolCallId.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.ToolCalls != nil { + toSerialize["tool_calls"] = o.ToolCalls + } + return toSerialize, nil +} + +func (o *ChatMessageContract) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatMessageContract := _ChatMessageContract{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatMessageContract) + + if err != nil { + return err + } + + *o = ChatMessageContract(varChatMessageContract) + + return err +} + +type NullableChatMessageContract struct { + value *ChatMessageContract + isSet bool +} + +func (v NullableChatMessageContract) Get() *ChatMessageContract { + return v.value +} + +func (v *NullableChatMessageContract) Set(val *ChatMessageContract) { + v.value = val + v.isSet = true +} + +func (v NullableChatMessageContract) IsSet() bool { + return v.isSet +} + +func (v *NullableChatMessageContract) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatMessageContract(val *ChatMessageContract) *NullableChatMessageContract { + return &NullableChatMessageContract{value: val, isSet: true} +} + +func (v NullableChatMessageContract) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatMessageContract) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_chat_sdk_code_response.go b/go/futureagi/model_chat_sdk_code_response.go new file mode 100644 index 0000000..ada90ab --- /dev/null +++ b/go/futureagi/model_chat_sdk_code_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChatSDKCodeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatSDKCodeResponse{} + +// ChatSDKCodeResponse struct for ChatSDKCodeResponse +type ChatSDKCodeResponse struct { + Status *bool `json:"status,omitempty"` + Result ChatSDKCodeResult `json:"result"` +} + +type _ChatSDKCodeResponse ChatSDKCodeResponse + +// NewChatSDKCodeResponse instantiates a new ChatSDKCodeResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatSDKCodeResponse(result ChatSDKCodeResult) *ChatSDKCodeResponse { + this := ChatSDKCodeResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewChatSDKCodeResponseWithDefaults instantiates a new ChatSDKCodeResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatSDKCodeResponseWithDefaults() *ChatSDKCodeResponse { + this := ChatSDKCodeResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ChatSDKCodeResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatSDKCodeResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ChatSDKCodeResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ChatSDKCodeResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *ChatSDKCodeResponse) GetResult() ChatSDKCodeResult { + if o == nil { + var ret ChatSDKCodeResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ChatSDKCodeResponse) GetResultOk() (*ChatSDKCodeResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ChatSDKCodeResponse) SetResult(v ChatSDKCodeResult) { + o.Result = v +} + +func (o ChatSDKCodeResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatSDKCodeResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ChatSDKCodeResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatSDKCodeResponse := _ChatSDKCodeResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatSDKCodeResponse) + + if err != nil { + return err + } + + *o = ChatSDKCodeResponse(varChatSDKCodeResponse) + + return err +} + +type NullableChatSDKCodeResponse struct { + value *ChatSDKCodeResponse + isSet bool +} + +func (v NullableChatSDKCodeResponse) Get() *ChatSDKCodeResponse { + return v.value +} + +func (v *NullableChatSDKCodeResponse) Set(val *ChatSDKCodeResponse) { + v.value = val + v.isSet = true +} + +func (v NullableChatSDKCodeResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableChatSDKCodeResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatSDKCodeResponse(val *ChatSDKCodeResponse) *NullableChatSDKCodeResponse { + return &NullableChatSDKCodeResponse{value: val, isSet: true} +} + +func (v NullableChatSDKCodeResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatSDKCodeResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_chat_sdk_code_result.go b/go/futureagi/model_chat_sdk_code_result.go new file mode 100644 index 0000000..51db0cb --- /dev/null +++ b/go/futureagi/model_chat_sdk_code_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChatSDKCodeResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatSDKCodeResult{} + +// ChatSDKCodeResult struct for ChatSDKCodeResult +type ChatSDKCodeResult struct { + InstallationGuide string `json:"installation_guide"` + SdkCode string `json:"sdk_code"` + RunTestId string `json:"run_test_id"` + RunTestName string `json:"run_test_name"` +} + +type _ChatSDKCodeResult ChatSDKCodeResult + +// NewChatSDKCodeResult instantiates a new ChatSDKCodeResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatSDKCodeResult(installationGuide string, sdkCode string, runTestId string, runTestName string) *ChatSDKCodeResult { + this := ChatSDKCodeResult{} + this.InstallationGuide = installationGuide + this.SdkCode = sdkCode + this.RunTestId = runTestId + this.RunTestName = runTestName + return &this +} + +// NewChatSDKCodeResultWithDefaults instantiates a new ChatSDKCodeResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatSDKCodeResultWithDefaults() *ChatSDKCodeResult { + this := ChatSDKCodeResult{} + return &this +} + +// GetInstallationGuide returns the InstallationGuide field value +func (o *ChatSDKCodeResult) GetInstallationGuide() string { + if o == nil { + var ret string + return ret + } + + return o.InstallationGuide +} + +// GetInstallationGuideOk returns a tuple with the InstallationGuide field value +// and a boolean to check if the value has been set. +func (o *ChatSDKCodeResult) GetInstallationGuideOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstallationGuide, true +} + +// SetInstallationGuide sets field value +func (o *ChatSDKCodeResult) SetInstallationGuide(v string) { + o.InstallationGuide = v +} + +// GetSdkCode returns the SdkCode field value +func (o *ChatSDKCodeResult) GetSdkCode() string { + if o == nil { + var ret string + return ret + } + + return o.SdkCode +} + +// GetSdkCodeOk returns a tuple with the SdkCode field value +// and a boolean to check if the value has been set. +func (o *ChatSDKCodeResult) GetSdkCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SdkCode, true +} + +// SetSdkCode sets field value +func (o *ChatSDKCodeResult) SetSdkCode(v string) { + o.SdkCode = v +} + +// GetRunTestId returns the RunTestId field value +func (o *ChatSDKCodeResult) GetRunTestId() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value +// and a boolean to check if the value has been set. +func (o *ChatSDKCodeResult) GetRunTestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestId, true +} + +// SetRunTestId sets field value +func (o *ChatSDKCodeResult) SetRunTestId(v string) { + o.RunTestId = v +} + +// GetRunTestName returns the RunTestName field value +func (o *ChatSDKCodeResult) GetRunTestName() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestName +} + +// GetRunTestNameOk returns a tuple with the RunTestName field value +// and a boolean to check if the value has been set. +func (o *ChatSDKCodeResult) GetRunTestNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestName, true +} + +// SetRunTestName sets field value +func (o *ChatSDKCodeResult) SetRunTestName(v string) { + o.RunTestName = v +} + +func (o ChatSDKCodeResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatSDKCodeResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["installation_guide"] = o.InstallationGuide + toSerialize["sdk_code"] = o.SdkCode + toSerialize["run_test_id"] = o.RunTestId + toSerialize["run_test_name"] = o.RunTestName + return toSerialize, nil +} + +func (o *ChatSDKCodeResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "installation_guide", + "sdk_code", + "run_test_id", + "run_test_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatSDKCodeResult := _ChatSDKCodeResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatSDKCodeResult) + + if err != nil { + return err + } + + *o = ChatSDKCodeResult(varChatSDKCodeResult) + + return err +} + +type NullableChatSDKCodeResult struct { + value *ChatSDKCodeResult + isSet bool +} + +func (v NullableChatSDKCodeResult) Get() *ChatSDKCodeResult { + return v.value +} + +func (v *NullableChatSDKCodeResult) Set(val *ChatSDKCodeResult) { + v.value = val + v.isSet = true +} + +func (v NullableChatSDKCodeResult) IsSet() bool { + return v.isSet +} + +func (v *NullableChatSDKCodeResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatSDKCodeResult(val *ChatSDKCodeResult) *NullableChatSDKCodeResult { + return &NullableChatSDKCodeResult{value: val, isSet: true} +} + +func (v NullableChatSDKCodeResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatSDKCodeResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_chat_send_message_response.go b/go/futureagi/model_chat_send_message_response.go new file mode 100644 index 0000000..7c14b3d --- /dev/null +++ b/go/futureagi/model_chat_send_message_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChatSendMessageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatSendMessageResponse{} + +// ChatSendMessageResponse struct for ChatSendMessageResponse +type ChatSendMessageResponse struct { + Status *bool `json:"status,omitempty"` + Result ChatSendMessageResult `json:"result"` +} + +type _ChatSendMessageResponse ChatSendMessageResponse + +// NewChatSendMessageResponse instantiates a new ChatSendMessageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatSendMessageResponse(result ChatSendMessageResult) *ChatSendMessageResponse { + this := ChatSendMessageResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewChatSendMessageResponseWithDefaults instantiates a new ChatSendMessageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatSendMessageResponseWithDefaults() *ChatSendMessageResponse { + this := ChatSendMessageResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ChatSendMessageResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatSendMessageResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ChatSendMessageResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ChatSendMessageResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *ChatSendMessageResponse) GetResult() ChatSendMessageResult { + if o == nil { + var ret ChatSendMessageResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ChatSendMessageResponse) GetResultOk() (*ChatSendMessageResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ChatSendMessageResponse) SetResult(v ChatSendMessageResult) { + o.Result = v +} + +func (o ChatSendMessageResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatSendMessageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ChatSendMessageResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatSendMessageResponse := _ChatSendMessageResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatSendMessageResponse) + + if err != nil { + return err + } + + *o = ChatSendMessageResponse(varChatSendMessageResponse) + + return err +} + +type NullableChatSendMessageResponse struct { + value *ChatSendMessageResponse + isSet bool +} + +func (v NullableChatSendMessageResponse) Get() *ChatSendMessageResponse { + return v.value +} + +func (v *NullableChatSendMessageResponse) Set(val *ChatSendMessageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableChatSendMessageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableChatSendMessageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatSendMessageResponse(val *ChatSendMessageResponse) *NullableChatSendMessageResponse { + return &NullableChatSendMessageResponse{value: val, isSet: true} +} + +func (v NullableChatSendMessageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatSendMessageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_chat_send_message_result.go b/go/futureagi/model_chat_send_message_result.go new file mode 100644 index 0000000..fea29cf --- /dev/null +++ b/go/futureagi/model_chat_send_message_result.go @@ -0,0 +1,271 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChatSendMessageResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatSendMessageResult{} + +// ChatSendMessageResult struct for ChatSendMessageResult +type ChatSendMessageResult struct { + InputMessage []ChatMessageContract `json:"input_message,omitempty"` + OutputMessage []ChatMessageContract `json:"output_message,omitempty"` + MessageHistory []ChatMessageContract `json:"message_history"` + ChatEnded *bool `json:"chat_ended,omitempty"` +} + +type _ChatSendMessageResult ChatSendMessageResult + +// NewChatSendMessageResult instantiates a new ChatSendMessageResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatSendMessageResult(messageHistory []ChatMessageContract) *ChatSendMessageResult { + this := ChatSendMessageResult{} + this.MessageHistory = messageHistory + var chatEnded bool = false + this.ChatEnded = &chatEnded + return &this +} + +// NewChatSendMessageResultWithDefaults instantiates a new ChatSendMessageResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatSendMessageResultWithDefaults() *ChatSendMessageResult { + this := ChatSendMessageResult{} + var chatEnded bool = false + this.ChatEnded = &chatEnded + return &this +} + +// GetInputMessage returns the InputMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ChatSendMessageResult) GetInputMessage() []ChatMessageContract { + if o == nil { + var ret []ChatMessageContract + return ret + } + return o.InputMessage +} + +// GetInputMessageOk returns a tuple with the InputMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChatSendMessageResult) GetInputMessageOk() ([]ChatMessageContract, bool) { + if o == nil || IsNil(o.InputMessage) { + return nil, false + } + return o.InputMessage, true +} + +// HasInputMessage returns a boolean if a field has been set. +func (o *ChatSendMessageResult) HasInputMessage() bool { + if o != nil && !IsNil(o.InputMessage) { + return true + } + + return false +} + +// SetInputMessage gets a reference to the given []ChatMessageContract and assigns it to the InputMessage field. +func (o *ChatSendMessageResult) SetInputMessage(v []ChatMessageContract) { + o.InputMessage = v +} + +// GetOutputMessage returns the OutputMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ChatSendMessageResult) GetOutputMessage() []ChatMessageContract { + if o == nil { + var ret []ChatMessageContract + return ret + } + return o.OutputMessage +} + +// GetOutputMessageOk returns a tuple with the OutputMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChatSendMessageResult) GetOutputMessageOk() ([]ChatMessageContract, bool) { + if o == nil || IsNil(o.OutputMessage) { + return nil, false + } + return o.OutputMessage, true +} + +// HasOutputMessage returns a boolean if a field has been set. +func (o *ChatSendMessageResult) HasOutputMessage() bool { + if o != nil && !IsNil(o.OutputMessage) { + return true + } + + return false +} + +// SetOutputMessage gets a reference to the given []ChatMessageContract and assigns it to the OutputMessage field. +func (o *ChatSendMessageResult) SetOutputMessage(v []ChatMessageContract) { + o.OutputMessage = v +} + +// GetMessageHistory returns the MessageHistory field value +func (o *ChatSendMessageResult) GetMessageHistory() []ChatMessageContract { + if o == nil { + var ret []ChatMessageContract + return ret + } + + return o.MessageHistory +} + +// GetMessageHistoryOk returns a tuple with the MessageHistory field value +// and a boolean to check if the value has been set. +func (o *ChatSendMessageResult) GetMessageHistoryOk() ([]ChatMessageContract, bool) { + if o == nil { + return nil, false + } + return o.MessageHistory, true +} + +// SetMessageHistory sets field value +func (o *ChatSendMessageResult) SetMessageHistory(v []ChatMessageContract) { + o.MessageHistory = v +} + +// GetChatEnded returns the ChatEnded field value if set, zero value otherwise. +func (o *ChatSendMessageResult) GetChatEnded() bool { + if o == nil || IsNil(o.ChatEnded) { + var ret bool + return ret + } + return *o.ChatEnded +} + +// GetChatEndedOk returns a tuple with the ChatEnded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatSendMessageResult) GetChatEndedOk() (*bool, bool) { + if o == nil || IsNil(o.ChatEnded) { + return nil, false + } + return o.ChatEnded, true +} + +// HasChatEnded returns a boolean if a field has been set. +func (o *ChatSendMessageResult) HasChatEnded() bool { + if o != nil && !IsNil(o.ChatEnded) { + return true + } + + return false +} + +// SetChatEnded gets a reference to the given bool and assigns it to the ChatEnded field. +func (o *ChatSendMessageResult) SetChatEnded(v bool) { + o.ChatEnded = &v +} + +func (o ChatSendMessageResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatSendMessageResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.InputMessage != nil { + toSerialize["input_message"] = o.InputMessage + } + if o.OutputMessage != nil { + toSerialize["output_message"] = o.OutputMessage + } + toSerialize["message_history"] = o.MessageHistory + if !IsNil(o.ChatEnded) { + toSerialize["chat_ended"] = o.ChatEnded + } + return toSerialize, nil +} + +func (o *ChatSendMessageResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message_history", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatSendMessageResult := _ChatSendMessageResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatSendMessageResult) + + if err != nil { + return err + } + + *o = ChatSendMessageResult(varChatSendMessageResult) + + return err +} + +type NullableChatSendMessageResult struct { + value *ChatSendMessageResult + isSet bool +} + +func (v NullableChatSendMessageResult) Get() *ChatSendMessageResult { + return v.value +} + +func (v *NullableChatSendMessageResult) Set(val *ChatSendMessageResult) { + v.value = val + v.isSet = true +} + +func (v NullableChatSendMessageResult) IsSet() bool { + return v.isSet +} + +func (v *NullableChatSendMessageResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatSendMessageResult(val *ChatSendMessageResult) *NullableChatSendMessageResult { + return &NullableChatSendMessageResult{value: val, isSet: true} +} + +func (v NullableChatSendMessageResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatSendMessageResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_chat_tool_call.go b/go/futureagi/model_chat_tool_call.go new file mode 100644 index 0000000..390a81f --- /dev/null +++ b/go/futureagi/model_chat_tool_call.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChatToolCall type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatToolCall{} + +// ChatToolCall struct for ChatToolCall +type ChatToolCall struct { + Id string `json:"id"` + Type string `json:"type"` + Function ChatToolCallFunction `json:"function"` +} + +type _ChatToolCall ChatToolCall + +// NewChatToolCall instantiates a new ChatToolCall object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatToolCall(id string, type_ string, function ChatToolCallFunction) *ChatToolCall { + this := ChatToolCall{} + this.Id = id + this.Type = type_ + this.Function = function + return &this +} + +// NewChatToolCallWithDefaults instantiates a new ChatToolCall object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatToolCallWithDefaults() *ChatToolCall { + this := ChatToolCall{} + return &this +} + +// GetId returns the Id field value +func (o *ChatToolCall) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ChatToolCall) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ChatToolCall) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *ChatToolCall) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ChatToolCall) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ChatToolCall) SetType(v string) { + o.Type = v +} + +// GetFunction returns the Function field value +func (o *ChatToolCall) GetFunction() ChatToolCallFunction { + if o == nil { + var ret ChatToolCallFunction + return ret + } + + return o.Function +} + +// GetFunctionOk returns a tuple with the Function field value +// and a boolean to check if the value has been set. +func (o *ChatToolCall) GetFunctionOk() (*ChatToolCallFunction, bool) { + if o == nil { + return nil, false + } + return &o.Function, true +} + +// SetFunction sets field value +func (o *ChatToolCall) SetFunction(v ChatToolCallFunction) { + o.Function = v +} + +func (o ChatToolCall) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatToolCall) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + toSerialize["function"] = o.Function + return toSerialize, nil +} + +func (o *ChatToolCall) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "type", + "function", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatToolCall := _ChatToolCall{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatToolCall) + + if err != nil { + return err + } + + *o = ChatToolCall(varChatToolCall) + + return err +} + +type NullableChatToolCall struct { + value *ChatToolCall + isSet bool +} + +func (v NullableChatToolCall) Get() *ChatToolCall { + return v.value +} + +func (v *NullableChatToolCall) Set(val *ChatToolCall) { + v.value = val + v.isSet = true +} + +func (v NullableChatToolCall) IsSet() bool { + return v.isSet +} + +func (v *NullableChatToolCall) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatToolCall(val *ChatToolCall) *NullableChatToolCall { + return &NullableChatToolCall{value: val, isSet: true} +} + +func (v NullableChatToolCall) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatToolCall) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_chat_tool_call_function.go b/go/futureagi/model_chat_tool_call_function.go new file mode 100644 index 0000000..fbc2cdb --- /dev/null +++ b/go/futureagi/model_chat_tool_call_function.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChatToolCallFunction type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatToolCallFunction{} + +// ChatToolCallFunction struct for ChatToolCallFunction +type ChatToolCallFunction struct { + Name string `json:"name"` + Arguments string `json:"arguments"` +} + +type _ChatToolCallFunction ChatToolCallFunction + +// NewChatToolCallFunction instantiates a new ChatToolCallFunction object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatToolCallFunction(name string, arguments string) *ChatToolCallFunction { + this := ChatToolCallFunction{} + this.Name = name + this.Arguments = arguments + return &this +} + +// NewChatToolCallFunctionWithDefaults instantiates a new ChatToolCallFunction object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatToolCallFunctionWithDefaults() *ChatToolCallFunction { + this := ChatToolCallFunction{} + return &this +} + +// GetName returns the Name field value +func (o *ChatToolCallFunction) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ChatToolCallFunction) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ChatToolCallFunction) SetName(v string) { + o.Name = v +} + +// GetArguments returns the Arguments field value +func (o *ChatToolCallFunction) GetArguments() string { + if o == nil { + var ret string + return ret + } + + return o.Arguments +} + +// GetArgumentsOk returns a tuple with the Arguments field value +// and a boolean to check if the value has been set. +func (o *ChatToolCallFunction) GetArgumentsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Arguments, true +} + +// SetArguments sets field value +func (o *ChatToolCallFunction) SetArguments(v string) { + o.Arguments = v +} + +func (o ChatToolCallFunction) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatToolCallFunction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["arguments"] = o.Arguments + return toSerialize, nil +} + +func (o *ChatToolCallFunction) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "arguments", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatToolCallFunction := _ChatToolCallFunction{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatToolCallFunction) + + if err != nil { + return err + } + + *o = ChatToolCallFunction(varChatToolCallFunction) + + return err +} + +type NullableChatToolCallFunction struct { + value *ChatToolCallFunction + isSet bool +} + +func (v NullableChatToolCallFunction) Get() *ChatToolCallFunction { + return v.value +} + +func (v *NullableChatToolCallFunction) Set(val *ChatToolCallFunction) { + v.value = val + v.isSet = true +} + +func (v NullableChatToolCallFunction) IsSet() bool { + return v.isSet +} + +func (v *NullableChatToolCallFunction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatToolCallFunction(val *ChatToolCallFunction) *NullableChatToolCallFunction { + return &NullableChatToolCallFunction{value: val, isSet: true} +} + +func (v NullableChatToolCallFunction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatToolCallFunction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_cicd_evaluation_item.go b/go/futureagi/model_cicd_evaluation_item.go new file mode 100644 index 0000000..18b715d --- /dev/null +++ b/go/futureagi/model_cicd_evaluation_item.go @@ -0,0 +1,268 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CICDEvaluationItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CICDEvaluationItem{} + +// CICDEvaluationItem struct for CICDEvaluationItem +type CICDEvaluationItem struct { + EvalTemplate string `json:"eval_template"` + Inputs map[string]string `json:"inputs"` + ModelName NullableString `json:"model_name,omitempty"` + Config *map[string]string `json:"config,omitempty"` +} + +type _CICDEvaluationItem CICDEvaluationItem + +// NewCICDEvaluationItem instantiates a new CICDEvaluationItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCICDEvaluationItem(evalTemplate string, inputs map[string]string) *CICDEvaluationItem { + this := CICDEvaluationItem{} + this.EvalTemplate = evalTemplate + this.Inputs = inputs + return &this +} + +// NewCICDEvaluationItemWithDefaults instantiates a new CICDEvaluationItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCICDEvaluationItemWithDefaults() *CICDEvaluationItem { + this := CICDEvaluationItem{} + return &this +} + +// GetEvalTemplate returns the EvalTemplate field value +func (o *CICDEvaluationItem) GetEvalTemplate() string { + if o == nil { + var ret string + return ret + } + + return o.EvalTemplate +} + +// GetEvalTemplateOk returns a tuple with the EvalTemplate field value +// and a boolean to check if the value has been set. +func (o *CICDEvaluationItem) GetEvalTemplateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalTemplate, true +} + +// SetEvalTemplate sets field value +func (o *CICDEvaluationItem) SetEvalTemplate(v string) { + o.EvalTemplate = v +} + +// GetInputs returns the Inputs field value +func (o *CICDEvaluationItem) GetInputs() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value +// and a boolean to check if the value has been set. +func (o *CICDEvaluationItem) GetInputsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Inputs, true +} + +// SetInputs sets field value +func (o *CICDEvaluationItem) SetInputs(v map[string]string) { + o.Inputs = v +} + +// GetModelName returns the ModelName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CICDEvaluationItem) GetModelName() string { + if o == nil || IsNil(o.ModelName.Get()) { + var ret string + return ret + } + return *o.ModelName.Get() +} + +// GetModelNameOk returns a tuple with the ModelName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CICDEvaluationItem) GetModelNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ModelName.Get(), o.ModelName.IsSet() +} + +// HasModelName returns a boolean if a field has been set. +func (o *CICDEvaluationItem) HasModelName() bool { + if o != nil && o.ModelName.IsSet() { + return true + } + + return false +} + +// SetModelName gets a reference to the given NullableString and assigns it to the ModelName field. +func (o *CICDEvaluationItem) SetModelName(v string) { + o.ModelName.Set(&v) +} + +// SetModelNameNil sets the value for ModelName to be an explicit nil +func (o *CICDEvaluationItem) SetModelNameNil() { + o.ModelName.Set(nil) +} + +// UnsetModelName ensures that no value is present for ModelName, not even an explicit nil +func (o *CICDEvaluationItem) UnsetModelName() { + o.ModelName.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *CICDEvaluationItem) GetConfig() map[string]string { + if o == nil || IsNil(o.Config) { + var ret map[string]string + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CICDEvaluationItem) GetConfigOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *CICDEvaluationItem) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]string and assigns it to the Config field. +func (o *CICDEvaluationItem) SetConfig(v map[string]string) { + o.Config = &v +} + +func (o CICDEvaluationItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CICDEvaluationItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval_template"] = o.EvalTemplate + toSerialize["inputs"] = o.Inputs + if o.ModelName.IsSet() { + toSerialize["model_name"] = o.ModelName.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + return toSerialize, nil +} + +func (o *CICDEvaluationItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_template", + "inputs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCICDEvaluationItem := _CICDEvaluationItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCICDEvaluationItem) + + if err != nil { + return err + } + + *o = CICDEvaluationItem(varCICDEvaluationItem) + + return err +} + +type NullableCICDEvaluationItem struct { + value *CICDEvaluationItem + isSet bool +} + +func (v NullableCICDEvaluationItem) Get() *CICDEvaluationItem { + return v.value +} + +func (v *NullableCICDEvaluationItem) Set(val *CICDEvaluationItem) { + v.value = val + v.isSet = true +} + +func (v NullableCICDEvaluationItem) IsSet() bool { + return v.isSet +} + +func (v *NullableCICDEvaluationItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCICDEvaluationItem(val *CICDEvaluationItem) *NullableCICDEvaluationItem { + return &NullableCICDEvaluationItem{value: val, isSet: true} +} + +func (v NullableCICDEvaluationItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCICDEvaluationItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_cicd_job.go b/go/futureagi/model_cicd_job.go new file mode 100644 index 0000000..1facc0c --- /dev/null +++ b/go/futureagi/model_cicd_job.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CICDJob type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CICDJob{} + +// CICDJob struct for CICDJob +type CICDJob struct { + ProjectName string `json:"project_name"` + Version string `json:"version"` + EvalData []CICDEvaluationItem `json:"eval_data"` +} + +type _CICDJob CICDJob + +// NewCICDJob instantiates a new CICDJob object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCICDJob(projectName string, version string, evalData []CICDEvaluationItem) *CICDJob { + this := CICDJob{} + this.ProjectName = projectName + this.Version = version + this.EvalData = evalData + return &this +} + +// NewCICDJobWithDefaults instantiates a new CICDJob object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCICDJobWithDefaults() *CICDJob { + this := CICDJob{} + return &this +} + +// GetProjectName returns the ProjectName field value +func (o *CICDJob) GetProjectName() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectName +} + +// GetProjectNameOk returns a tuple with the ProjectName field value +// and a boolean to check if the value has been set. +func (o *CICDJob) GetProjectNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectName, true +} + +// SetProjectName sets field value +func (o *CICDJob) SetProjectName(v string) { + o.ProjectName = v +} + +// GetVersion returns the Version field value +func (o *CICDJob) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *CICDJob) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *CICDJob) SetVersion(v string) { + o.Version = v +} + +// GetEvalData returns the EvalData field value +func (o *CICDJob) GetEvalData() []CICDEvaluationItem { + if o == nil { + var ret []CICDEvaluationItem + return ret + } + + return o.EvalData +} + +// GetEvalDataOk returns a tuple with the EvalData field value +// and a boolean to check if the value has been set. +func (o *CICDJob) GetEvalDataOk() ([]CICDEvaluationItem, bool) { + if o == nil { + return nil, false + } + return o.EvalData, true +} + +// SetEvalData sets field value +func (o *CICDJob) SetEvalData(v []CICDEvaluationItem) { + o.EvalData = v +} + +func (o CICDJob) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CICDJob) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["project_name"] = o.ProjectName + toSerialize["version"] = o.Version + toSerialize["eval_data"] = o.EvalData + return toSerialize, nil +} + +func (o *CICDJob) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "project_name", + "version", + "eval_data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCICDJob := _CICDJob{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCICDJob) + + if err != nil { + return err + } + + *o = CICDJob(varCICDJob) + + return err +} + +type NullableCICDJob struct { + value *CICDJob + isSet bool +} + +func (v NullableCICDJob) Get() *CICDJob { + return v.value +} + +func (v *NullableCICDJob) Set(val *CICDJob) { + v.value = val + v.isSet = true +} + +func (v NullableCICDJob) IsSet() bool { + return v.isSet +} + +func (v *NullableCICDJob) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCICDJob(val *CICDJob) *NullableCICDJob { + return &NullableCICDJob{value: val, isSet: true} +} + +func (v NullableCICDJob) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCICDJob) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_classify_column_request.go b/go/futureagi/model_classify_column_request.go new file mode 100644 index 0000000..ad0b465 --- /dev/null +++ b/go/futureagi/model_classify_column_request.go @@ -0,0 +1,301 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ClassifyColumnRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClassifyColumnRequest{} + +// ClassifyColumnRequest struct for ClassifyColumnRequest +type ClassifyColumnRequest struct { + ColumnId string `json:"column_id"` + Labels []string `json:"labels"` + LanguageModelId *string `json:"language_model_id,omitempty"` + Concurrency *int32 `json:"concurrency,omitempty"` + NewColumnName *string `json:"new_column_name,omitempty"` +} + +type _ClassifyColumnRequest ClassifyColumnRequest + +// NewClassifyColumnRequest instantiates a new ClassifyColumnRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewClassifyColumnRequest(columnId string, labels []string) *ClassifyColumnRequest { + this := ClassifyColumnRequest{} + this.ColumnId = columnId + this.Labels = labels + var languageModelId string = "gpt-4o" + this.LanguageModelId = &languageModelId + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// NewClassifyColumnRequestWithDefaults instantiates a new ClassifyColumnRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClassifyColumnRequestWithDefaults() *ClassifyColumnRequest { + this := ClassifyColumnRequest{} + var languageModelId string = "gpt-4o" + this.LanguageModelId = &languageModelId + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *ClassifyColumnRequest) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *ClassifyColumnRequest) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *ClassifyColumnRequest) SetColumnId(v string) { + o.ColumnId = v +} + +// GetLabels returns the Labels field value +func (o *ClassifyColumnRequest) GetLabels() []string { + if o == nil { + var ret []string + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *ClassifyColumnRequest) GetLabelsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Labels, true +} + +// SetLabels sets field value +func (o *ClassifyColumnRequest) SetLabels(v []string) { + o.Labels = v +} + +// GetLanguageModelId returns the LanguageModelId field value if set, zero value otherwise. +func (o *ClassifyColumnRequest) GetLanguageModelId() string { + if o == nil || IsNil(o.LanguageModelId) { + var ret string + return ret + } + return *o.LanguageModelId +} + +// GetLanguageModelIdOk returns a tuple with the LanguageModelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClassifyColumnRequest) GetLanguageModelIdOk() (*string, bool) { + if o == nil || IsNil(o.LanguageModelId) { + return nil, false + } + return o.LanguageModelId, true +} + +// HasLanguageModelId returns a boolean if a field has been set. +func (o *ClassifyColumnRequest) HasLanguageModelId() bool { + if o != nil && !IsNil(o.LanguageModelId) { + return true + } + + return false +} + +// SetLanguageModelId gets a reference to the given string and assigns it to the LanguageModelId field. +func (o *ClassifyColumnRequest) SetLanguageModelId(v string) { + o.LanguageModelId = &v +} + +// GetConcurrency returns the Concurrency field value if set, zero value otherwise. +func (o *ClassifyColumnRequest) GetConcurrency() int32 { + if o == nil || IsNil(o.Concurrency) { + var ret int32 + return ret + } + return *o.Concurrency +} + +// GetConcurrencyOk returns a tuple with the Concurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClassifyColumnRequest) GetConcurrencyOk() (*int32, bool) { + if o == nil || IsNil(o.Concurrency) { + return nil, false + } + return o.Concurrency, true +} + +// HasConcurrency returns a boolean if a field has been set. +func (o *ClassifyColumnRequest) HasConcurrency() bool { + if o != nil && !IsNil(o.Concurrency) { + return true + } + + return false +} + +// SetConcurrency gets a reference to the given int32 and assigns it to the Concurrency field. +func (o *ClassifyColumnRequest) SetConcurrency(v int32) { + o.Concurrency = &v +} + +// GetNewColumnName returns the NewColumnName field value if set, zero value otherwise. +func (o *ClassifyColumnRequest) GetNewColumnName() string { + if o == nil || IsNil(o.NewColumnName) { + var ret string + return ret + } + return *o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClassifyColumnRequest) GetNewColumnNameOk() (*string, bool) { + if o == nil || IsNil(o.NewColumnName) { + return nil, false + } + return o.NewColumnName, true +} + +// HasNewColumnName returns a boolean if a field has been set. +func (o *ClassifyColumnRequest) HasNewColumnName() bool { + if o != nil && !IsNil(o.NewColumnName) { + return true + } + + return false +} + +// SetNewColumnName gets a reference to the given string and assigns it to the NewColumnName field. +func (o *ClassifyColumnRequest) SetNewColumnName(v string) { + o.NewColumnName = &v +} + +func (o ClassifyColumnRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClassifyColumnRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + toSerialize["labels"] = o.Labels + if !IsNil(o.LanguageModelId) { + toSerialize["language_model_id"] = o.LanguageModelId + } + if !IsNil(o.Concurrency) { + toSerialize["concurrency"] = o.Concurrency + } + if !IsNil(o.NewColumnName) { + toSerialize["new_column_name"] = o.NewColumnName + } + return toSerialize, nil +} + +func (o *ClassifyColumnRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + "labels", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varClassifyColumnRequest := _ClassifyColumnRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varClassifyColumnRequest) + + if err != nil { + return err + } + + *o = ClassifyColumnRequest(varClassifyColumnRequest) + + return err +} + +type NullableClassifyColumnRequest struct { + value *ClassifyColumnRequest + isSet bool +} + +func (v NullableClassifyColumnRequest) Get() *ClassifyColumnRequest { + return v.value +} + +func (v *NullableClassifyColumnRequest) Set(val *ClassifyColumnRequest) { + v.value = val + v.isSet = true +} + +func (v NullableClassifyColumnRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableClassifyColumnRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClassifyColumnRequest(val *ClassifyColumnRequest) *NullableClassifyColumnRequest { + return &NullableClassifyColumnRequest{value: val, isSet: true} +} + +func (v NullableClassifyColumnRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClassifyColumnRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_clone_dataset_request.go b/go/futureagi/model_clone_dataset_request.go new file mode 100644 index 0000000..b2580d7 --- /dev/null +++ b/go/futureagi/model_clone_dataset_request.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CloneDatasetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneDatasetRequest{} + +// CloneDatasetRequest struct for CloneDatasetRequest +type CloneDatasetRequest struct { + NewDatasetName *string `json:"new_dataset_name,omitempty"` +} + +// NewCloneDatasetRequest instantiates a new CloneDatasetRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCloneDatasetRequest() *CloneDatasetRequest { + this := CloneDatasetRequest{} + return &this +} + +// NewCloneDatasetRequestWithDefaults instantiates a new CloneDatasetRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCloneDatasetRequestWithDefaults() *CloneDatasetRequest { + this := CloneDatasetRequest{} + return &this +} + +// GetNewDatasetName returns the NewDatasetName field value if set, zero value otherwise. +func (o *CloneDatasetRequest) GetNewDatasetName() string { + if o == nil || IsNil(o.NewDatasetName) { + var ret string + return ret + } + return *o.NewDatasetName +} + +// GetNewDatasetNameOk returns a tuple with the NewDatasetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneDatasetRequest) GetNewDatasetNameOk() (*string, bool) { + if o == nil || IsNil(o.NewDatasetName) { + return nil, false + } + return o.NewDatasetName, true +} + +// HasNewDatasetName returns a boolean if a field has been set. +func (o *CloneDatasetRequest) HasNewDatasetName() bool { + if o != nil && !IsNil(o.NewDatasetName) { + return true + } + + return false +} + +// SetNewDatasetName gets a reference to the given string and assigns it to the NewDatasetName field. +func (o *CloneDatasetRequest) SetNewDatasetName(v string) { + o.NewDatasetName = &v +} + +func (o CloneDatasetRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneDatasetRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NewDatasetName) { + toSerialize["new_dataset_name"] = o.NewDatasetName + } + return toSerialize, nil +} + +type NullableCloneDatasetRequest struct { + value *CloneDatasetRequest + isSet bool +} + +func (v NullableCloneDatasetRequest) Get() *CloneDatasetRequest { + return v.value +} + +func (v *NullableCloneDatasetRequest) Set(val *CloneDatasetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCloneDatasetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneDatasetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneDatasetRequest(val *CloneDatasetRequest) *NullableCloneDatasetRequest { + return &NullableCloneDatasetRequest{value: val, isSet: true} +} + +func (v NullableCloneDatasetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneDatasetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_co_occurring_issue.go b/go/futureagi/model_co_occurring_issue.go new file mode 100644 index 0000000..0fd963e --- /dev/null +++ b/go/futureagi/model_co_occurring_issue.go @@ -0,0 +1,297 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CoOccurringIssue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CoOccurringIssue{} + +// CoOccurringIssue struct for CoOccurringIssue +type CoOccurringIssue struct { + Id string `json:"id"` + Title string `json:"title"` + Type string `json:"type"` + CoOccurrence float32 `json:"co_occurrence"` + Count int32 `json:"count"` + Severity string `json:"severity"` +} + +type _CoOccurringIssue CoOccurringIssue + +// NewCoOccurringIssue instantiates a new CoOccurringIssue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCoOccurringIssue(id string, title string, type_ string, coOccurrence float32, count int32, severity string) *CoOccurringIssue { + this := CoOccurringIssue{} + this.Id = id + this.Title = title + this.Type = type_ + this.CoOccurrence = coOccurrence + this.Count = count + this.Severity = severity + return &this +} + +// NewCoOccurringIssueWithDefaults instantiates a new CoOccurringIssue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCoOccurringIssueWithDefaults() *CoOccurringIssue { + this := CoOccurringIssue{} + return &this +} + +// GetId returns the Id field value +func (o *CoOccurringIssue) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CoOccurringIssue) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CoOccurringIssue) SetId(v string) { + o.Id = v +} + +// GetTitle returns the Title field value +func (o *CoOccurringIssue) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *CoOccurringIssue) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *CoOccurringIssue) SetTitle(v string) { + o.Title = v +} + +// GetType returns the Type field value +func (o *CoOccurringIssue) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CoOccurringIssue) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CoOccurringIssue) SetType(v string) { + o.Type = v +} + +// GetCoOccurrence returns the CoOccurrence field value +func (o *CoOccurringIssue) GetCoOccurrence() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.CoOccurrence +} + +// GetCoOccurrenceOk returns a tuple with the CoOccurrence field value +// and a boolean to check if the value has been set. +func (o *CoOccurringIssue) GetCoOccurrenceOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.CoOccurrence, true +} + +// SetCoOccurrence sets field value +func (o *CoOccurringIssue) SetCoOccurrence(v float32) { + o.CoOccurrence = v +} + +// GetCount returns the Count field value +func (o *CoOccurringIssue) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *CoOccurringIssue) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *CoOccurringIssue) SetCount(v int32) { + o.Count = v +} + +// GetSeverity returns the Severity field value +func (o *CoOccurringIssue) GetSeverity() string { + if o == nil { + var ret string + return ret + } + + return o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value +// and a boolean to check if the value has been set. +func (o *CoOccurringIssue) GetSeverityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Severity, true +} + +// SetSeverity sets field value +func (o *CoOccurringIssue) SetSeverity(v string) { + o.Severity = v +} + +func (o CoOccurringIssue) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CoOccurringIssue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["title"] = o.Title + toSerialize["type"] = o.Type + toSerialize["co_occurrence"] = o.CoOccurrence + toSerialize["count"] = o.Count + toSerialize["severity"] = o.Severity + return toSerialize, nil +} + +func (o *CoOccurringIssue) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "title", + "type", + "co_occurrence", + "count", + "severity", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCoOccurringIssue := _CoOccurringIssue{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCoOccurringIssue) + + if err != nil { + return err + } + + *o = CoOccurringIssue(varCoOccurringIssue) + + return err +} + +type NullableCoOccurringIssue struct { + value *CoOccurringIssue + isSet bool +} + +func (v NullableCoOccurringIssue) Get() *CoOccurringIssue { + return v.value +} + +func (v *NullableCoOccurringIssue) Set(val *CoOccurringIssue) { + v.value = val + v.isSet = true +} + +func (v NullableCoOccurringIssue) IsSet() bool { + return v.isSet +} + +func (v *NullableCoOccurringIssue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCoOccurringIssue(val *CoOccurringIssue) *NullableCoOccurringIssue { + return &NullableCoOccurringIssue{value: val, isSet: true} +} + +func (v NullableCoOccurringIssue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCoOccurringIssue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_column.go b/go/futureagi/model_column.go new file mode 100644 index 0000000..cd128d6 --- /dev/null +++ b/go/futureagi/model_column.go @@ -0,0 +1,343 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Column type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Column{} + +// Column struct for Column +type Column struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + DataType string `json:"data_type"` + Dataset NullableString `json:"dataset,omitempty"` + Source string `json:"source"` + SourceId NullableString `json:"source_id,omitempty"` +} + +type _Column Column + +// NewColumn instantiates a new Column object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewColumn(name string, dataType string, source string) *Column { + this := Column{} + this.Name = name + this.DataType = dataType + this.Source = source + return &this +} + +// NewColumnWithDefaults instantiates a new Column object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewColumnWithDefaults() *Column { + this := Column{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Column) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Column) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Column) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Column) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *Column) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Column) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Column) SetName(v string) { + o.Name = v +} + +// GetDataType returns the DataType field value +func (o *Column) GetDataType() string { + if o == nil { + var ret string + return ret + } + + return o.DataType +} + +// GetDataTypeOk returns a tuple with the DataType field value +// and a boolean to check if the value has been set. +func (o *Column) GetDataTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataType, true +} + +// SetDataType sets field value +func (o *Column) SetDataType(v string) { + o.DataType = v +} + +// GetDataset returns the Dataset field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Column) GetDataset() string { + if o == nil || IsNil(o.Dataset.Get()) { + var ret string + return ret + } + return *o.Dataset.Get() +} + +// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Column) GetDatasetOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Dataset.Get(), o.Dataset.IsSet() +} + +// HasDataset returns a boolean if a field has been set. +func (o *Column) HasDataset() bool { + if o != nil && o.Dataset.IsSet() { + return true + } + + return false +} + +// SetDataset gets a reference to the given NullableString and assigns it to the Dataset field. +func (o *Column) SetDataset(v string) { + o.Dataset.Set(&v) +} + +// SetDatasetNil sets the value for Dataset to be an explicit nil +func (o *Column) SetDatasetNil() { + o.Dataset.Set(nil) +} + +// UnsetDataset ensures that no value is present for Dataset, not even an explicit nil +func (o *Column) UnsetDataset() { + o.Dataset.Unset() +} + +// GetSource returns the Source field value +func (o *Column) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *Column) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *Column) SetSource(v string) { + o.Source = v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Column) GetSourceId() string { + if o == nil || IsNil(o.SourceId.Get()) { + var ret string + return ret + } + return *o.SourceId.Get() +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Column) GetSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SourceId.Get(), o.SourceId.IsSet() +} + +// HasSourceId returns a boolean if a field has been set. +func (o *Column) HasSourceId() bool { + if o != nil && o.SourceId.IsSet() { + return true + } + + return false +} + +// SetSourceId gets a reference to the given NullableString and assigns it to the SourceId field. +func (o *Column) SetSourceId(v string) { + o.SourceId.Set(&v) +} + +// SetSourceIdNil sets the value for SourceId to be an explicit nil +func (o *Column) SetSourceIdNil() { + o.SourceId.Set(nil) +} + +// UnsetSourceId ensures that no value is present for SourceId, not even an explicit nil +func (o *Column) UnsetSourceId() { + o.SourceId.Unset() +} + +func (o Column) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Column) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + toSerialize["data_type"] = o.DataType + if o.Dataset.IsSet() { + toSerialize["dataset"] = o.Dataset.Get() + } + toSerialize["source"] = o.Source + if o.SourceId.IsSet() { + toSerialize["source_id"] = o.SourceId.Get() + } + return toSerialize, nil +} + +func (o *Column) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "data_type", + "source", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varColumn := _Column{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varColumn) + + if err != nil { + return err + } + + *o = Column(varColumn) + + return err +} + +type NullableColumn struct { + value *Column + isSet bool +} + +func (v NullableColumn) Get() *Column { + return v.value +} + +func (v *NullableColumn) Set(val *Column) { + v.value = val + v.isSet = true +} + +func (v NullableColumn) IsSet() bool { + return v.isSet +} + +func (v *NullableColumn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableColumn(val *Column) *NullableColumn { + return &NullableColumn{value: val, isSet: true} +} + +func (v NullableColumn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableColumn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_column_definition.go b/go/futureagi/model_column_definition.go new file mode 100644 index 0000000..1772dde --- /dev/null +++ b/go/futureagi/model_column_definition.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ColumnDefinition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ColumnDefinition{} + +// ColumnDefinition struct for ColumnDefinition +type ColumnDefinition struct { + Name string `json:"name"` + DataType string `json:"data_type"` + Description string `json:"description"` +} + +type _ColumnDefinition ColumnDefinition + +// NewColumnDefinition instantiates a new ColumnDefinition object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewColumnDefinition(name string, dataType string, description string) *ColumnDefinition { + this := ColumnDefinition{} + this.Name = name + this.DataType = dataType + this.Description = description + return &this +} + +// NewColumnDefinitionWithDefaults instantiates a new ColumnDefinition object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewColumnDefinitionWithDefaults() *ColumnDefinition { + this := ColumnDefinition{} + return &this +} + +// GetName returns the Name field value +func (o *ColumnDefinition) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ColumnDefinition) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ColumnDefinition) SetName(v string) { + o.Name = v +} + +// GetDataType returns the DataType field value +func (o *ColumnDefinition) GetDataType() string { + if o == nil { + var ret string + return ret + } + + return o.DataType +} + +// GetDataTypeOk returns a tuple with the DataType field value +// and a boolean to check if the value has been set. +func (o *ColumnDefinition) GetDataTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataType, true +} + +// SetDataType sets field value +func (o *ColumnDefinition) SetDataType(v string) { + o.DataType = v +} + +// GetDescription returns the Description field value +func (o *ColumnDefinition) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *ColumnDefinition) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *ColumnDefinition) SetDescription(v string) { + o.Description = v +} + +func (o ColumnDefinition) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ColumnDefinition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["data_type"] = o.DataType + toSerialize["description"] = o.Description + return toSerialize, nil +} + +func (o *ColumnDefinition) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "data_type", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varColumnDefinition := _ColumnDefinition{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varColumnDefinition) + + if err != nil { + return err + } + + *o = ColumnDefinition(varColumnDefinition) + + return err +} + +type NullableColumnDefinition struct { + value *ColumnDefinition + isSet bool +} + +func (v NullableColumnDefinition) Get() *ColumnDefinition { + return v.value +} + +func (v *NullableColumnDefinition) Set(val *ColumnDefinition) { + v.value = val + v.isSet = true +} + +func (v NullableColumnDefinition) IsSet() bool { + return v.isSet +} + +func (v *NullableColumnDefinition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableColumnDefinition(val *ColumnDefinition) *NullableColumnDefinition { + return &NullableColumnDefinition{value: val, isSet: true} +} + +func (v NullableColumnDefinition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableColumnDefinition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_column_order.go b/go/futureagi/model_column_order.go new file mode 100644 index 0000000..8421d05 --- /dev/null +++ b/go/futureagi/model_column_order.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ColumnOrder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ColumnOrder{} + +// ColumnOrder struct for ColumnOrder +type ColumnOrder struct { + ColumnName string `json:"column_name"` + Id string `json:"id"` + Visible bool `json:"visible"` +} + +type _ColumnOrder ColumnOrder + +// NewColumnOrder instantiates a new ColumnOrder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewColumnOrder(columnName string, id string, visible bool) *ColumnOrder { + this := ColumnOrder{} + this.ColumnName = columnName + this.Id = id + this.Visible = visible + return &this +} + +// NewColumnOrderWithDefaults instantiates a new ColumnOrder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewColumnOrderWithDefaults() *ColumnOrder { + this := ColumnOrder{} + return &this +} + +// GetColumnName returns the ColumnName field value +func (o *ColumnOrder) GetColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnName +} + +// GetColumnNameOk returns a tuple with the ColumnName field value +// and a boolean to check if the value has been set. +func (o *ColumnOrder) GetColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnName, true +} + +// SetColumnName sets field value +func (o *ColumnOrder) SetColumnName(v string) { + o.ColumnName = v +} + +// GetId returns the Id field value +func (o *ColumnOrder) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ColumnOrder) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ColumnOrder) SetId(v string) { + o.Id = v +} + +// GetVisible returns the Visible field value +func (o *ColumnOrder) GetVisible() bool { + if o == nil { + var ret bool + return ret + } + + return o.Visible +} + +// GetVisibleOk returns a tuple with the Visible field value +// and a boolean to check if the value has been set. +func (o *ColumnOrder) GetVisibleOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Visible, true +} + +// SetVisible sets field value +func (o *ColumnOrder) SetVisible(v bool) { + o.Visible = v +} + +func (o ColumnOrder) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ColumnOrder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_name"] = o.ColumnName + toSerialize["id"] = o.Id + toSerialize["visible"] = o.Visible + return toSerialize, nil +} + +func (o *ColumnOrder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_name", + "id", + "visible", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varColumnOrder := _ColumnOrder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varColumnOrder) + + if err != nil { + return err + } + + *o = ColumnOrder(varColumnOrder) + + return err +} + +type NullableColumnOrder struct { + value *ColumnOrder + isSet bool +} + +func (v NullableColumnOrder) Get() *ColumnOrder { + return v.value +} + +func (v *NullableColumnOrder) Set(val *ColumnOrder) { + v.value = val + v.isSet = true +} + +func (v NullableColumnOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableColumnOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableColumnOrder(val *ColumnOrder) *NullableColumnOrder { + return &NullableColumnOrder{value: val, isSet: true} +} + +func (v NullableColumnOrder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableColumnOrder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_column_type_conversion_response.go b/go/futureagi/model_column_type_conversion_response.go new file mode 100644 index 0000000..9115650 --- /dev/null +++ b/go/futureagi/model_column_type_conversion_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ColumnTypeConversionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ColumnTypeConversionResponse{} + +// ColumnTypeConversionResponse struct for ColumnTypeConversionResponse +type ColumnTypeConversionResponse struct { + Status bool `json:"status"` + Result ColumnTypeConversionResult `json:"result"` +} + +type _ColumnTypeConversionResponse ColumnTypeConversionResponse + +// NewColumnTypeConversionResponse instantiates a new ColumnTypeConversionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewColumnTypeConversionResponse(status bool, result ColumnTypeConversionResult) *ColumnTypeConversionResponse { + this := ColumnTypeConversionResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewColumnTypeConversionResponseWithDefaults instantiates a new ColumnTypeConversionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewColumnTypeConversionResponseWithDefaults() *ColumnTypeConversionResponse { + this := ColumnTypeConversionResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ColumnTypeConversionResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ColumnTypeConversionResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ColumnTypeConversionResponse) GetResult() ColumnTypeConversionResult { + if o == nil { + var ret ColumnTypeConversionResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResponse) GetResultOk() (*ColumnTypeConversionResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ColumnTypeConversionResponse) SetResult(v ColumnTypeConversionResult) { + o.Result = v +} + +func (o ColumnTypeConversionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ColumnTypeConversionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ColumnTypeConversionResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varColumnTypeConversionResponse := _ColumnTypeConversionResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varColumnTypeConversionResponse) + + if err != nil { + return err + } + + *o = ColumnTypeConversionResponse(varColumnTypeConversionResponse) + + return err +} + +type NullableColumnTypeConversionResponse struct { + value *ColumnTypeConversionResponse + isSet bool +} + +func (v NullableColumnTypeConversionResponse) Get() *ColumnTypeConversionResponse { + return v.value +} + +func (v *NullableColumnTypeConversionResponse) Set(val *ColumnTypeConversionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableColumnTypeConversionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableColumnTypeConversionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableColumnTypeConversionResponse(val *ColumnTypeConversionResponse) *NullableColumnTypeConversionResponse { + return &NullableColumnTypeConversionResponse{value: val, isSet: true} +} + +func (v NullableColumnTypeConversionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableColumnTypeConversionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_column_type_conversion_result.go b/go/futureagi/model_column_type_conversion_result.go new file mode 100644 index 0000000..18814a5 --- /dev/null +++ b/go/futureagi/model_column_type_conversion_result.go @@ -0,0 +1,341 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ColumnTypeConversionResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ColumnTypeConversionResult{} + +// ColumnTypeConversionResult struct for ColumnTypeConversionResult +type ColumnTypeConversionResult struct { + Message *string `json:"message,omitempty"` + ColumnId *string `json:"column_id,omitempty"` + NewDataType *string `json:"new_data_type,omitempty"` + Status *string `json:"status,omitempty"` + InvalidCount *int32 `json:"invalid_count,omitempty"` + InvalidValues []map[string]interface{} `json:"invalid_values,omitempty"` + ValidConversionSamples map[string]interface{} `json:"valid_conversion_samples,omitempty"` +} + +// NewColumnTypeConversionResult instantiates a new ColumnTypeConversionResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewColumnTypeConversionResult() *ColumnTypeConversionResult { + this := ColumnTypeConversionResult{} + return &this +} + +// NewColumnTypeConversionResultWithDefaults instantiates a new ColumnTypeConversionResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewColumnTypeConversionResultWithDefaults() *ColumnTypeConversionResult { + this := ColumnTypeConversionResult{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ColumnTypeConversionResult) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResult) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ColumnTypeConversionResult) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ColumnTypeConversionResult) SetMessage(v string) { + o.Message = &v +} + +// GetColumnId returns the ColumnId field value if set, zero value otherwise. +func (o *ColumnTypeConversionResult) GetColumnId() string { + if o == nil || IsNil(o.ColumnId) { + var ret string + return ret + } + return *o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResult) GetColumnIdOk() (*string, bool) { + if o == nil || IsNil(o.ColumnId) { + return nil, false + } + return o.ColumnId, true +} + +// HasColumnId returns a boolean if a field has been set. +func (o *ColumnTypeConversionResult) HasColumnId() bool { + if o != nil && !IsNil(o.ColumnId) { + return true + } + + return false +} + +// SetColumnId gets a reference to the given string and assigns it to the ColumnId field. +func (o *ColumnTypeConversionResult) SetColumnId(v string) { + o.ColumnId = &v +} + +// GetNewDataType returns the NewDataType field value if set, zero value otherwise. +func (o *ColumnTypeConversionResult) GetNewDataType() string { + if o == nil || IsNil(o.NewDataType) { + var ret string + return ret + } + return *o.NewDataType +} + +// GetNewDataTypeOk returns a tuple with the NewDataType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResult) GetNewDataTypeOk() (*string, bool) { + if o == nil || IsNil(o.NewDataType) { + return nil, false + } + return o.NewDataType, true +} + +// HasNewDataType returns a boolean if a field has been set. +func (o *ColumnTypeConversionResult) HasNewDataType() bool { + if o != nil && !IsNil(o.NewDataType) { + return true + } + + return false +} + +// SetNewDataType gets a reference to the given string and assigns it to the NewDataType field. +func (o *ColumnTypeConversionResult) SetNewDataType(v string) { + o.NewDataType = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ColumnTypeConversionResult) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResult) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ColumnTypeConversionResult) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ColumnTypeConversionResult) SetStatus(v string) { + o.Status = &v +} + +// GetInvalidCount returns the InvalidCount field value if set, zero value otherwise. +func (o *ColumnTypeConversionResult) GetInvalidCount() int32 { + if o == nil || IsNil(o.InvalidCount) { + var ret int32 + return ret + } + return *o.InvalidCount +} + +// GetInvalidCountOk returns a tuple with the InvalidCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResult) GetInvalidCountOk() (*int32, bool) { + if o == nil || IsNil(o.InvalidCount) { + return nil, false + } + return o.InvalidCount, true +} + +// HasInvalidCount returns a boolean if a field has been set. +func (o *ColumnTypeConversionResult) HasInvalidCount() bool { + if o != nil && !IsNil(o.InvalidCount) { + return true + } + + return false +} + +// SetInvalidCount gets a reference to the given int32 and assigns it to the InvalidCount field. +func (o *ColumnTypeConversionResult) SetInvalidCount(v int32) { + o.InvalidCount = &v +} + +// GetInvalidValues returns the InvalidValues field value if set, zero value otherwise. +func (o *ColumnTypeConversionResult) GetInvalidValues() []map[string]interface{} { + if o == nil || IsNil(o.InvalidValues) { + var ret []map[string]interface{} + return ret + } + return o.InvalidValues +} + +// GetInvalidValuesOk returns a tuple with the InvalidValues field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResult) GetInvalidValuesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.InvalidValues) { + return nil, false + } + return o.InvalidValues, true +} + +// HasInvalidValues returns a boolean if a field has been set. +func (o *ColumnTypeConversionResult) HasInvalidValues() bool { + if o != nil && !IsNil(o.InvalidValues) { + return true + } + + return false +} + +// SetInvalidValues gets a reference to the given []map[string]interface{} and assigns it to the InvalidValues field. +func (o *ColumnTypeConversionResult) SetInvalidValues(v []map[string]interface{}) { + o.InvalidValues = v +} + +// GetValidConversionSamples returns the ValidConversionSamples field value if set, zero value otherwise. +func (o *ColumnTypeConversionResult) GetValidConversionSamples() map[string]interface{} { + if o == nil || IsNil(o.ValidConversionSamples) { + var ret map[string]interface{} + return ret + } + return o.ValidConversionSamples +} + +// GetValidConversionSamplesOk returns a tuple with the ValidConversionSamples field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ColumnTypeConversionResult) GetValidConversionSamplesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ValidConversionSamples) { + return map[string]interface{}{}, false + } + return o.ValidConversionSamples, true +} + +// HasValidConversionSamples returns a boolean if a field has been set. +func (o *ColumnTypeConversionResult) HasValidConversionSamples() bool { + if o != nil && !IsNil(o.ValidConversionSamples) { + return true + } + + return false +} + +// SetValidConversionSamples gets a reference to the given map[string]interface{} and assigns it to the ValidConversionSamples field. +func (o *ColumnTypeConversionResult) SetValidConversionSamples(v map[string]interface{}) { + o.ValidConversionSamples = v +} + +func (o ColumnTypeConversionResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ColumnTypeConversionResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.ColumnId) { + toSerialize["column_id"] = o.ColumnId + } + if !IsNil(o.NewDataType) { + toSerialize["new_data_type"] = o.NewDataType + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.InvalidCount) { + toSerialize["invalid_count"] = o.InvalidCount + } + if !IsNil(o.InvalidValues) { + toSerialize["invalid_values"] = o.InvalidValues + } + if !IsNil(o.ValidConversionSamples) { + toSerialize["valid_conversion_samples"] = o.ValidConversionSamples + } + return toSerialize, nil +} + +type NullableColumnTypeConversionResult struct { + value *ColumnTypeConversionResult + isSet bool +} + +func (v NullableColumnTypeConversionResult) Get() *ColumnTypeConversionResult { + return v.value +} + +func (v *NullableColumnTypeConversionResult) Set(val *ColumnTypeConversionResult) { + v.value = val + v.isSet = true +} + +func (v NullableColumnTypeConversionResult) IsSet() bool { + return v.isSet +} + +func (v *NullableColumnTypeConversionResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableColumnTypeConversionResult(val *ColumnTypeConversionResult) *NullableColumnTypeConversionResult { + return &NullableColumnTypeConversionResult{value: val, isSet: true} +} + +func (v NullableColumnTypeConversionResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableColumnTypeConversionResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset.go b/go/futureagi/model_compare_dataset.go new file mode 100644 index 0000000..e89f0d4 --- /dev/null +++ b/go/futureagi/model_compare_dataset.go @@ -0,0 +1,384 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDataset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDataset{} + +// CompareDataset struct for CompareDataset +type CompareDataset struct { + CompareId NullableString `json:"compare_id,omitempty"` + PageSize *int32 `json:"page_size,omitempty"` + CurrentPageIndex *int32 `json:"current_page_index,omitempty"` + BaseColumnName string `json:"base_column_name"` + DatasetInfo map[string]interface{} `json:"dataset_info,omitempty"` + CommonColumnNames []string `json:"common_column_names,omitempty"` + DatasetIds []string `json:"dataset_ids"` +} + +type _CompareDataset CompareDataset + +// NewCompareDataset instantiates a new CompareDataset object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDataset(baseColumnName string, datasetIds []string) *CompareDataset { + this := CompareDataset{} + var pageSize int32 = 10 + this.PageSize = &pageSize + var currentPageIndex int32 = 0 + this.CurrentPageIndex = ¤tPageIndex + this.BaseColumnName = baseColumnName + this.DatasetIds = datasetIds + return &this +} + +// NewCompareDatasetWithDefaults instantiates a new CompareDataset object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetWithDefaults() *CompareDataset { + this := CompareDataset{} + var pageSize int32 = 10 + this.PageSize = &pageSize + var currentPageIndex int32 = 0 + this.CurrentPageIndex = ¤tPageIndex + return &this +} + +// GetCompareId returns the CompareId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompareDataset) GetCompareId() string { + if o == nil || IsNil(o.CompareId.Get()) { + var ret string + return ret + } + return *o.CompareId.Get() +} + +// GetCompareIdOk returns a tuple with the CompareId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompareDataset) GetCompareIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CompareId.Get(), o.CompareId.IsSet() +} + +// HasCompareId returns a boolean if a field has been set. +func (o *CompareDataset) HasCompareId() bool { + if o != nil && o.CompareId.IsSet() { + return true + } + + return false +} + +// SetCompareId gets a reference to the given NullableString and assigns it to the CompareId field. +func (o *CompareDataset) SetCompareId(v string) { + o.CompareId.Set(&v) +} + +// SetCompareIdNil sets the value for CompareId to be an explicit nil +func (o *CompareDataset) SetCompareIdNil() { + o.CompareId.Set(nil) +} + +// UnsetCompareId ensures that no value is present for CompareId, not even an explicit nil +func (o *CompareDataset) UnsetCompareId() { + o.CompareId.Unset() +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *CompareDataset) GetPageSize() int32 { + if o == nil || IsNil(o.PageSize) { + var ret int32 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDataset) GetPageSizeOk() (*int32, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *CompareDataset) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int32 and assigns it to the PageSize field. +func (o *CompareDataset) SetPageSize(v int32) { + o.PageSize = &v +} + +// GetCurrentPageIndex returns the CurrentPageIndex field value if set, zero value otherwise. +func (o *CompareDataset) GetCurrentPageIndex() int32 { + if o == nil || IsNil(o.CurrentPageIndex) { + var ret int32 + return ret + } + return *o.CurrentPageIndex +} + +// GetCurrentPageIndexOk returns a tuple with the CurrentPageIndex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDataset) GetCurrentPageIndexOk() (*int32, bool) { + if o == nil || IsNil(o.CurrentPageIndex) { + return nil, false + } + return o.CurrentPageIndex, true +} + +// HasCurrentPageIndex returns a boolean if a field has been set. +func (o *CompareDataset) HasCurrentPageIndex() bool { + if o != nil && !IsNil(o.CurrentPageIndex) { + return true + } + + return false +} + +// SetCurrentPageIndex gets a reference to the given int32 and assigns it to the CurrentPageIndex field. +func (o *CompareDataset) SetCurrentPageIndex(v int32) { + o.CurrentPageIndex = &v +} + +// GetBaseColumnName returns the BaseColumnName field value +func (o *CompareDataset) GetBaseColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.BaseColumnName +} + +// GetBaseColumnNameOk returns a tuple with the BaseColumnName field value +// and a boolean to check if the value has been set. +func (o *CompareDataset) GetBaseColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BaseColumnName, true +} + +// SetBaseColumnName sets field value +func (o *CompareDataset) SetBaseColumnName(v string) { + o.BaseColumnName = v +} + +// GetDatasetInfo returns the DatasetInfo field value if set, zero value otherwise. +func (o *CompareDataset) GetDatasetInfo() map[string]interface{} { + if o == nil || IsNil(o.DatasetInfo) { + var ret map[string]interface{} + return ret + } + return o.DatasetInfo +} + +// GetDatasetInfoOk returns a tuple with the DatasetInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDataset) GetDatasetInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DatasetInfo) { + return map[string]interface{}{}, false + } + return o.DatasetInfo, true +} + +// HasDatasetInfo returns a boolean if a field has been set. +func (o *CompareDataset) HasDatasetInfo() bool { + if o != nil && !IsNil(o.DatasetInfo) { + return true + } + + return false +} + +// SetDatasetInfo gets a reference to the given map[string]interface{} and assigns it to the DatasetInfo field. +func (o *CompareDataset) SetDatasetInfo(v map[string]interface{}) { + o.DatasetInfo = v +} + +// GetCommonColumnNames returns the CommonColumnNames field value if set, zero value otherwise. +func (o *CompareDataset) GetCommonColumnNames() []string { + if o == nil || IsNil(o.CommonColumnNames) { + var ret []string + return ret + } + return o.CommonColumnNames +} + +// GetCommonColumnNamesOk returns a tuple with the CommonColumnNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDataset) GetCommonColumnNamesOk() ([]string, bool) { + if o == nil || IsNil(o.CommonColumnNames) { + return nil, false + } + return o.CommonColumnNames, true +} + +// HasCommonColumnNames returns a boolean if a field has been set. +func (o *CompareDataset) HasCommonColumnNames() bool { + if o != nil && !IsNil(o.CommonColumnNames) { + return true + } + + return false +} + +// SetCommonColumnNames gets a reference to the given []string and assigns it to the CommonColumnNames field. +func (o *CompareDataset) SetCommonColumnNames(v []string) { + o.CommonColumnNames = v +} + +// GetDatasetIds returns the DatasetIds field value +func (o *CompareDataset) GetDatasetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.DatasetIds +} + +// GetDatasetIdsOk returns a tuple with the DatasetIds field value +// and a boolean to check if the value has been set. +func (o *CompareDataset) GetDatasetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.DatasetIds, true +} + +// SetDatasetIds sets field value +func (o *CompareDataset) SetDatasetIds(v []string) { + o.DatasetIds = v +} + +func (o CompareDataset) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDataset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.CompareId.IsSet() { + toSerialize["compare_id"] = o.CompareId.Get() + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.CurrentPageIndex) { + toSerialize["current_page_index"] = o.CurrentPageIndex + } + toSerialize["base_column_name"] = o.BaseColumnName + if !IsNil(o.DatasetInfo) { + toSerialize["dataset_info"] = o.DatasetInfo + } + if !IsNil(o.CommonColumnNames) { + toSerialize["common_column_names"] = o.CommonColumnNames + } + toSerialize["dataset_ids"] = o.DatasetIds + return toSerialize, nil +} + +func (o *CompareDataset) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "base_column_name", + "dataset_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDataset := _CompareDataset{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDataset) + + if err != nil { + return err + } + + *o = CompareDataset(varCompareDataset) + + return err +} + +type NullableCompareDataset struct { + value *CompareDataset + isSet bool +} + +func (v NullableCompareDataset) Get() *CompareDataset { + return v.value +} + +func (v *NullableCompareDataset) Set(val *CompareDataset) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDataset) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDataset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDataset(val *CompareDataset) *NullableCompareDataset { + return &NullableCompareDataset{value: val, isSet: true} +} + +func (v NullableCompareDataset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDataset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_delete_response.go b/go/futureagi/model_compare_dataset_delete_response.go new file mode 100644 index 0000000..b290a17 --- /dev/null +++ b/go/futureagi/model_compare_dataset_delete_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetDeleteResponse{} + +// CompareDatasetDeleteResponse struct for CompareDatasetDeleteResponse +type CompareDatasetDeleteResponse struct { + Status bool `json:"status"` + Result CompareDatasetDeleteResult `json:"result"` +} + +type _CompareDatasetDeleteResponse CompareDatasetDeleteResponse + +// NewCompareDatasetDeleteResponse instantiates a new CompareDatasetDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetDeleteResponse(status bool, result CompareDatasetDeleteResult) *CompareDatasetDeleteResponse { + this := CompareDatasetDeleteResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompareDatasetDeleteResponseWithDefaults instantiates a new CompareDatasetDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetDeleteResponseWithDefaults() *CompareDatasetDeleteResponse { + this := CompareDatasetDeleteResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompareDatasetDeleteResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetDeleteResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompareDatasetDeleteResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompareDatasetDeleteResponse) GetResult() CompareDatasetDeleteResult { + if o == nil { + var ret CompareDatasetDeleteResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetDeleteResponse) GetResultOk() (*CompareDatasetDeleteResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompareDatasetDeleteResponse) SetResult(v CompareDatasetDeleteResult) { + o.Result = v +} + +func (o CompareDatasetDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompareDatasetDeleteResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetDeleteResponse := _CompareDatasetDeleteResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetDeleteResponse) + + if err != nil { + return err + } + + *o = CompareDatasetDeleteResponse(varCompareDatasetDeleteResponse) + + return err +} + +type NullableCompareDatasetDeleteResponse struct { + value *CompareDatasetDeleteResponse + isSet bool +} + +func (v NullableCompareDatasetDeleteResponse) Get() *CompareDatasetDeleteResponse { + return v.value +} + +func (v *NullableCompareDatasetDeleteResponse) Set(val *CompareDatasetDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetDeleteResponse(val *CompareDatasetDeleteResponse) *NullableCompareDatasetDeleteResponse { + return &NullableCompareDatasetDeleteResponse{value: val, isSet: true} +} + +func (v NullableCompareDatasetDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_delete_result.go b/go/futureagi/model_compare_dataset_delete_result.go new file mode 100644 index 0000000..098236c --- /dev/null +++ b/go/futureagi/model_compare_dataset_delete_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetDeleteResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetDeleteResult{} + +// CompareDatasetDeleteResult struct for CompareDatasetDeleteResult +type CompareDatasetDeleteResult struct { + Message string `json:"message"` +} + +type _CompareDatasetDeleteResult CompareDatasetDeleteResult + +// NewCompareDatasetDeleteResult instantiates a new CompareDatasetDeleteResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetDeleteResult(message string) *CompareDatasetDeleteResult { + this := CompareDatasetDeleteResult{} + this.Message = message + return &this +} + +// NewCompareDatasetDeleteResultWithDefaults instantiates a new CompareDatasetDeleteResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetDeleteResultWithDefaults() *CompareDatasetDeleteResult { + this := CompareDatasetDeleteResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *CompareDatasetDeleteResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetDeleteResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *CompareDatasetDeleteResult) SetMessage(v string) { + o.Message = v +} + +func (o CompareDatasetDeleteResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetDeleteResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *CompareDatasetDeleteResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetDeleteResult := _CompareDatasetDeleteResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetDeleteResult) + + if err != nil { + return err + } + + *o = CompareDatasetDeleteResult(varCompareDatasetDeleteResult) + + return err +} + +type NullableCompareDatasetDeleteResult struct { + value *CompareDatasetDeleteResult + isSet bool +} + +func (v NullableCompareDatasetDeleteResult) Get() *CompareDatasetDeleteResult { + return v.value +} + +func (v *NullableCompareDatasetDeleteResult) Set(val *CompareDatasetDeleteResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetDeleteResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetDeleteResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetDeleteResult(val *CompareDatasetDeleteResult) *NullableCompareDatasetDeleteResult { + return &NullableCompareDatasetDeleteResult{value: val, isSet: true} +} + +func (v NullableCompareDatasetDeleteResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetDeleteResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_metadata.go b/go/futureagi/model_compare_dataset_metadata.go new file mode 100644 index 0000000..fff7f56 --- /dev/null +++ b/go/futureagi/model_compare_dataset_metadata.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetMetadata{} + +// CompareDatasetMetadata struct for CompareDatasetMetadata +type CompareDatasetMetadata struct { + CompareId string `json:"compare_id"` + TotalRows int32 `json:"total_rows"` + TotalPages int32 `json:"total_pages"` +} + +type _CompareDatasetMetadata CompareDatasetMetadata + +// NewCompareDatasetMetadata instantiates a new CompareDatasetMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetMetadata(compareId string, totalRows int32, totalPages int32) *CompareDatasetMetadata { + this := CompareDatasetMetadata{} + this.CompareId = compareId + this.TotalRows = totalRows + this.TotalPages = totalPages + return &this +} + +// NewCompareDatasetMetadataWithDefaults instantiates a new CompareDatasetMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetMetadataWithDefaults() *CompareDatasetMetadata { + this := CompareDatasetMetadata{} + return &this +} + +// GetCompareId returns the CompareId field value +func (o *CompareDatasetMetadata) GetCompareId() string { + if o == nil { + var ret string + return ret + } + + return o.CompareId +} + +// GetCompareIdOk returns a tuple with the CompareId field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetMetadata) GetCompareIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CompareId, true +} + +// SetCompareId sets field value +func (o *CompareDatasetMetadata) SetCompareId(v string) { + o.CompareId = v +} + +// GetTotalRows returns the TotalRows field value +func (o *CompareDatasetMetadata) GetTotalRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalRows +} + +// GetTotalRowsOk returns a tuple with the TotalRows field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetMetadata) GetTotalRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalRows, true +} + +// SetTotalRows sets field value +func (o *CompareDatasetMetadata) SetTotalRows(v int32) { + o.TotalRows = v +} + +// GetTotalPages returns the TotalPages field value +func (o *CompareDatasetMetadata) GetTotalPages() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetMetadata) GetTotalPagesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *CompareDatasetMetadata) SetTotalPages(v int32) { + o.TotalPages = v +} + +func (o CompareDatasetMetadata) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["compare_id"] = o.CompareId + toSerialize["total_rows"] = o.TotalRows + toSerialize["total_pages"] = o.TotalPages + return toSerialize, nil +} + +func (o *CompareDatasetMetadata) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "compare_id", + "total_rows", + "total_pages", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetMetadata := _CompareDatasetMetadata{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetMetadata) + + if err != nil { + return err + } + + *o = CompareDatasetMetadata(varCompareDatasetMetadata) + + return err +} + +type NullableCompareDatasetMetadata struct { + value *CompareDatasetMetadata + isSet bool +} + +func (v NullableCompareDatasetMetadata) Get() *CompareDatasetMetadata { + return v.value +} + +func (v *NullableCompareDatasetMetadata) Set(val *CompareDatasetMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetMetadata(val *CompareDatasetMetadata) *NullableCompareDatasetMetadata { + return &NullableCompareDatasetMetadata{value: val, isSet: true} +} + +func (v NullableCompareDatasetMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_response.go b/go/futureagi/model_compare_dataset_response.go new file mode 100644 index 0000000..6d1bb6f --- /dev/null +++ b/go/futureagi/model_compare_dataset_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetResponse{} + +// CompareDatasetResponse struct for CompareDatasetResponse +type CompareDatasetResponse struct { + Status bool `json:"status"` + Result CompareDatasetResult `json:"result"` +} + +type _CompareDatasetResponse CompareDatasetResponse + +// NewCompareDatasetResponse instantiates a new CompareDatasetResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetResponse(status bool, result CompareDatasetResult) *CompareDatasetResponse { + this := CompareDatasetResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompareDatasetResponseWithDefaults instantiates a new CompareDatasetResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetResponseWithDefaults() *CompareDatasetResponse { + this := CompareDatasetResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompareDatasetResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompareDatasetResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompareDatasetResponse) GetResult() CompareDatasetResult { + if o == nil { + var ret CompareDatasetResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetResponse) GetResultOk() (*CompareDatasetResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompareDatasetResponse) SetResult(v CompareDatasetResult) { + o.Result = v +} + +func (o CompareDatasetResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompareDatasetResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetResponse := _CompareDatasetResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetResponse) + + if err != nil { + return err + } + + *o = CompareDatasetResponse(varCompareDatasetResponse) + + return err +} + +type NullableCompareDatasetResponse struct { + value *CompareDatasetResponse + isSet bool +} + +func (v NullableCompareDatasetResponse) Get() *CompareDatasetResponse { + return v.value +} + +func (v *NullableCompareDatasetResponse) Set(val *CompareDatasetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetResponse(val *CompareDatasetResponse) *NullableCompareDatasetResponse { + return &NullableCompareDatasetResponse{value: val, isSet: true} +} + +func (v NullableCompareDatasetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_result.go b/go/futureagi/model_compare_dataset_result.go new file mode 100644 index 0000000..b728906 --- /dev/null +++ b/go/futureagi/model_compare_dataset_result.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CompareDatasetResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetResult{} + +// CompareDatasetResult struct for CompareDatasetResult +type CompareDatasetResult struct { + Metadata *CompareDatasetMetadata `json:"metadata,omitempty"` + ColumnConfig []map[string]interface{} `json:"column_config,omitempty"` + Table []map[string]interface{} `json:"table,omitempty"` +} + +// NewCompareDatasetResult instantiates a new CompareDatasetResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetResult() *CompareDatasetResult { + this := CompareDatasetResult{} + return &this +} + +// NewCompareDatasetResultWithDefaults instantiates a new CompareDatasetResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetResultWithDefaults() *CompareDatasetResult { + this := CompareDatasetResult{} + return &this +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CompareDatasetResult) GetMetadata() CompareDatasetMetadata { + if o == nil || IsNil(o.Metadata) { + var ret CompareDatasetMetadata + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDatasetResult) GetMetadataOk() (*CompareDatasetMetadata, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CompareDatasetResult) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given CompareDatasetMetadata and assigns it to the Metadata field. +func (o *CompareDatasetResult) SetMetadata(v CompareDatasetMetadata) { + o.Metadata = &v +} + +// GetColumnConfig returns the ColumnConfig field value if set, zero value otherwise. +func (o *CompareDatasetResult) GetColumnConfig() []map[string]interface{} { + if o == nil || IsNil(o.ColumnConfig) { + var ret []map[string]interface{} + return ret + } + return o.ColumnConfig +} + +// GetColumnConfigOk returns a tuple with the ColumnConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDatasetResult) GetColumnConfigOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.ColumnConfig) { + return nil, false + } + return o.ColumnConfig, true +} + +// HasColumnConfig returns a boolean if a field has been set. +func (o *CompareDatasetResult) HasColumnConfig() bool { + if o != nil && !IsNil(o.ColumnConfig) { + return true + } + + return false +} + +// SetColumnConfig gets a reference to the given []map[string]interface{} and assigns it to the ColumnConfig field. +func (o *CompareDatasetResult) SetColumnConfig(v []map[string]interface{}) { + o.ColumnConfig = v +} + +// GetTable returns the Table field value if set, zero value otherwise. +func (o *CompareDatasetResult) GetTable() []map[string]interface{} { + if o == nil || IsNil(o.Table) { + var ret []map[string]interface{} + return ret + } + return o.Table +} + +// GetTableOk returns a tuple with the Table field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDatasetResult) GetTableOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Table) { + return nil, false + } + return o.Table, true +} + +// HasTable returns a boolean if a field has been set. +func (o *CompareDatasetResult) HasTable() bool { + if o != nil && !IsNil(o.Table) { + return true + } + + return false +} + +// SetTable gets a reference to the given []map[string]interface{} and assigns it to the Table field. +func (o *CompareDatasetResult) SetTable(v []map[string]interface{}) { + o.Table = v +} + +func (o CompareDatasetResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.ColumnConfig) { + toSerialize["column_config"] = o.ColumnConfig + } + if !IsNil(o.Table) { + toSerialize["table"] = o.Table + } + return toSerialize, nil +} + +type NullableCompareDatasetResult struct { + value *CompareDatasetResult + isSet bool +} + +func (v NullableCompareDatasetResult) Get() *CompareDatasetResult { + return v.value +} + +func (v *NullableCompareDatasetResult) Set(val *CompareDatasetResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetResult(val *CompareDatasetResult) *NullableCompareDatasetResult { + return &NullableCompareDatasetResult{value: val, isSet: true} +} + +func (v NullableCompareDatasetResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_row_response.go b/go/futureagi/model_compare_dataset_row_response.go new file mode 100644 index 0000000..603fa94 --- /dev/null +++ b/go/futureagi/model_compare_dataset_row_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetRowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetRowResponse{} + +// CompareDatasetRowResponse struct for CompareDatasetRowResponse +type CompareDatasetRowResponse struct { + Status bool `json:"status"` + Result CompareDatasetRowResult `json:"result"` +} + +type _CompareDatasetRowResponse CompareDatasetRowResponse + +// NewCompareDatasetRowResponse instantiates a new CompareDatasetRowResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetRowResponse(status bool, result CompareDatasetRowResult) *CompareDatasetRowResponse { + this := CompareDatasetRowResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompareDatasetRowResponseWithDefaults instantiates a new CompareDatasetRowResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetRowResponseWithDefaults() *CompareDatasetRowResponse { + this := CompareDatasetRowResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompareDatasetRowResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetRowResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompareDatasetRowResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompareDatasetRowResponse) GetResult() CompareDatasetRowResult { + if o == nil { + var ret CompareDatasetRowResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetRowResponse) GetResultOk() (*CompareDatasetRowResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompareDatasetRowResponse) SetResult(v CompareDatasetRowResult) { + o.Result = v +} + +func (o CompareDatasetRowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetRowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompareDatasetRowResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetRowResponse := _CompareDatasetRowResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetRowResponse) + + if err != nil { + return err + } + + *o = CompareDatasetRowResponse(varCompareDatasetRowResponse) + + return err +} + +type NullableCompareDatasetRowResponse struct { + value *CompareDatasetRowResponse + isSet bool +} + +func (v NullableCompareDatasetRowResponse) Get() *CompareDatasetRowResponse { + return v.value +} + +func (v *NullableCompareDatasetRowResponse) Set(val *CompareDatasetRowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetRowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetRowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetRowResponse(val *CompareDatasetRowResponse) *NullableCompareDatasetRowResponse { + return &NullableCompareDatasetRowResponse{value: val, isSet: true} +} + +func (v NullableCompareDatasetRowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetRowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_row_result.go b/go/futureagi/model_compare_dataset_row_result.go new file mode 100644 index 0000000..79272d5 --- /dev/null +++ b/go/futureagi/model_compare_dataset_row_result.go @@ -0,0 +1,251 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetRowResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetRowResult{} + +// CompareDatasetRowResult struct for CompareDatasetRowResult +type CompareDatasetRowResult struct { + PrevRowId NullableString `json:"prev_row_id,omitempty"` + NextRowId NullableString `json:"next_row_id,omitempty"` + Table []map[string]interface{} `json:"table"` +} + +type _CompareDatasetRowResult CompareDatasetRowResult + +// NewCompareDatasetRowResult instantiates a new CompareDatasetRowResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetRowResult(table []map[string]interface{}) *CompareDatasetRowResult { + this := CompareDatasetRowResult{} + this.Table = table + return &this +} + +// NewCompareDatasetRowResultWithDefaults instantiates a new CompareDatasetRowResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetRowResultWithDefaults() *CompareDatasetRowResult { + this := CompareDatasetRowResult{} + return &this +} + +// GetPrevRowId returns the PrevRowId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompareDatasetRowResult) GetPrevRowId() string { + if o == nil || IsNil(o.PrevRowId.Get()) { + var ret string + return ret + } + return *o.PrevRowId.Get() +} + +// GetPrevRowIdOk returns a tuple with the PrevRowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompareDatasetRowResult) GetPrevRowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrevRowId.Get(), o.PrevRowId.IsSet() +} + +// HasPrevRowId returns a boolean if a field has been set. +func (o *CompareDatasetRowResult) HasPrevRowId() bool { + if o != nil && o.PrevRowId.IsSet() { + return true + } + + return false +} + +// SetPrevRowId gets a reference to the given NullableString and assigns it to the PrevRowId field. +func (o *CompareDatasetRowResult) SetPrevRowId(v string) { + o.PrevRowId.Set(&v) +} + +// SetPrevRowIdNil sets the value for PrevRowId to be an explicit nil +func (o *CompareDatasetRowResult) SetPrevRowIdNil() { + o.PrevRowId.Set(nil) +} + +// UnsetPrevRowId ensures that no value is present for PrevRowId, not even an explicit nil +func (o *CompareDatasetRowResult) UnsetPrevRowId() { + o.PrevRowId.Unset() +} + +// GetNextRowId returns the NextRowId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompareDatasetRowResult) GetNextRowId() string { + if o == nil || IsNil(o.NextRowId.Get()) { + var ret string + return ret + } + return *o.NextRowId.Get() +} + +// GetNextRowIdOk returns a tuple with the NextRowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompareDatasetRowResult) GetNextRowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextRowId.Get(), o.NextRowId.IsSet() +} + +// HasNextRowId returns a boolean if a field has been set. +func (o *CompareDatasetRowResult) HasNextRowId() bool { + if o != nil && o.NextRowId.IsSet() { + return true + } + + return false +} + +// SetNextRowId gets a reference to the given NullableString and assigns it to the NextRowId field. +func (o *CompareDatasetRowResult) SetNextRowId(v string) { + o.NextRowId.Set(&v) +} + +// SetNextRowIdNil sets the value for NextRowId to be an explicit nil +func (o *CompareDatasetRowResult) SetNextRowIdNil() { + o.NextRowId.Set(nil) +} + +// UnsetNextRowId ensures that no value is present for NextRowId, not even an explicit nil +func (o *CompareDatasetRowResult) UnsetNextRowId() { + o.NextRowId.Unset() +} + +// GetTable returns the Table field value +func (o *CompareDatasetRowResult) GetTable() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Table +} + +// GetTableOk returns a tuple with the Table field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetRowResult) GetTableOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Table, true +} + +// SetTable sets field value +func (o *CompareDatasetRowResult) SetTable(v []map[string]interface{}) { + o.Table = v +} + +func (o CompareDatasetRowResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetRowResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.PrevRowId.IsSet() { + toSerialize["prev_row_id"] = o.PrevRowId.Get() + } + if o.NextRowId.IsSet() { + toSerialize["next_row_id"] = o.NextRowId.Get() + } + toSerialize["table"] = o.Table + return toSerialize, nil +} + +func (o *CompareDatasetRowResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "table", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetRowResult := _CompareDatasetRowResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetRowResult) + + if err != nil { + return err + } + + *o = CompareDatasetRowResult(varCompareDatasetRowResult) + + return err +} + +type NullableCompareDatasetRowResult struct { + value *CompareDatasetRowResult + isSet bool +} + +func (v NullableCompareDatasetRowResult) Get() *CompareDatasetRowResult { + return v.value +} + +func (v *NullableCompareDatasetRowResult) Set(val *CompareDatasetRowResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetRowResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetRowResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetRowResult(val *CompareDatasetRowResult) *NullableCompareDatasetRowResult { + return &NullableCompareDatasetRowResult{value: val, isSet: true} +} + +func (v NullableCompareDatasetRowResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetRowResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_stats_request.go b/go/futureagi/model_compare_dataset_stats_request.go new file mode 100644 index 0000000..10e4c5f --- /dev/null +++ b/go/futureagi/model_compare_dataset_stats_request.go @@ -0,0 +1,225 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetStatsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetStatsRequest{} + +// CompareDatasetStatsRequest struct for CompareDatasetStatsRequest +type CompareDatasetStatsRequest struct { + BaseColumnName string `json:"base_column_name"` + DatasetIds []string `json:"dataset_ids"` + StatType *string `json:"stat_type,omitempty"` +} + +type _CompareDatasetStatsRequest CompareDatasetStatsRequest + +// NewCompareDatasetStatsRequest instantiates a new CompareDatasetStatsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetStatsRequest(baseColumnName string, datasetIds []string) *CompareDatasetStatsRequest { + this := CompareDatasetStatsRequest{} + this.BaseColumnName = baseColumnName + this.DatasetIds = datasetIds + var statType string = "evaluation" + this.StatType = &statType + return &this +} + +// NewCompareDatasetStatsRequestWithDefaults instantiates a new CompareDatasetStatsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetStatsRequestWithDefaults() *CompareDatasetStatsRequest { + this := CompareDatasetStatsRequest{} + var statType string = "evaluation" + this.StatType = &statType + return &this +} + +// GetBaseColumnName returns the BaseColumnName field value +func (o *CompareDatasetStatsRequest) GetBaseColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.BaseColumnName +} + +// GetBaseColumnNameOk returns a tuple with the BaseColumnName field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetStatsRequest) GetBaseColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BaseColumnName, true +} + +// SetBaseColumnName sets field value +func (o *CompareDatasetStatsRequest) SetBaseColumnName(v string) { + o.BaseColumnName = v +} + +// GetDatasetIds returns the DatasetIds field value +func (o *CompareDatasetStatsRequest) GetDatasetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.DatasetIds +} + +// GetDatasetIdsOk returns a tuple with the DatasetIds field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetStatsRequest) GetDatasetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.DatasetIds, true +} + +// SetDatasetIds sets field value +func (o *CompareDatasetStatsRequest) SetDatasetIds(v []string) { + o.DatasetIds = v +} + +// GetStatType returns the StatType field value if set, zero value otherwise. +func (o *CompareDatasetStatsRequest) GetStatType() string { + if o == nil || IsNil(o.StatType) { + var ret string + return ret + } + return *o.StatType +} + +// GetStatTypeOk returns a tuple with the StatType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareDatasetStatsRequest) GetStatTypeOk() (*string, bool) { + if o == nil || IsNil(o.StatType) { + return nil, false + } + return o.StatType, true +} + +// HasStatType returns a boolean if a field has been set. +func (o *CompareDatasetStatsRequest) HasStatType() bool { + if o != nil && !IsNil(o.StatType) { + return true + } + + return false +} + +// SetStatType gets a reference to the given string and assigns it to the StatType field. +func (o *CompareDatasetStatsRequest) SetStatType(v string) { + o.StatType = &v +} + +func (o CompareDatasetStatsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetStatsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_column_name"] = o.BaseColumnName + toSerialize["dataset_ids"] = o.DatasetIds + if !IsNil(o.StatType) { + toSerialize["stat_type"] = o.StatType + } + return toSerialize, nil +} + +func (o *CompareDatasetStatsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "base_column_name", + "dataset_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetStatsRequest := _CompareDatasetStatsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetStatsRequest) + + if err != nil { + return err + } + + *o = CompareDatasetStatsRequest(varCompareDatasetStatsRequest) + + return err +} + +type NullableCompareDatasetStatsRequest struct { + value *CompareDatasetStatsRequest + isSet bool +} + +func (v NullableCompareDatasetStatsRequest) Get() *CompareDatasetStatsRequest { + return v.value +} + +func (v *NullableCompareDatasetStatsRequest) Set(val *CompareDatasetStatsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetStatsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetStatsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetStatsRequest(val *CompareDatasetStatsRequest) *NullableCompareDatasetStatsRequest { + return &NullableCompareDatasetStatsRequest{value: val, isSet: true} +} + +func (v NullableCompareDatasetStatsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetStatsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_dataset_stats_response.go b/go/futureagi/model_compare_dataset_stats_response.go new file mode 100644 index 0000000..0b6d06c --- /dev/null +++ b/go/futureagi/model_compare_dataset_stats_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareDatasetStatsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareDatasetStatsResponse{} + +// CompareDatasetStatsResponse struct for CompareDatasetStatsResponse +type CompareDatasetStatsResponse struct { + Status bool `json:"status"` + Result map[string][]map[string]interface{} `json:"result"` +} + +type _CompareDatasetStatsResponse CompareDatasetStatsResponse + +// NewCompareDatasetStatsResponse instantiates a new CompareDatasetStatsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareDatasetStatsResponse(status bool, result map[string][]map[string]interface{}) *CompareDatasetStatsResponse { + this := CompareDatasetStatsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompareDatasetStatsResponseWithDefaults instantiates a new CompareDatasetStatsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareDatasetStatsResponseWithDefaults() *CompareDatasetStatsResponse { + this := CompareDatasetStatsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompareDatasetStatsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetStatsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompareDatasetStatsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompareDatasetStatsResponse) GetResult() map[string][]map[string]interface{} { + if o == nil { + var ret map[string][]map[string]interface{} + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompareDatasetStatsResponse) GetResultOk() (*map[string][]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompareDatasetStatsResponse) SetResult(v map[string][]map[string]interface{}) { + o.Result = v +} + +func (o CompareDatasetStatsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareDatasetStatsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompareDatasetStatsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareDatasetStatsResponse := _CompareDatasetStatsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareDatasetStatsResponse) + + if err != nil { + return err + } + + *o = CompareDatasetStatsResponse(varCompareDatasetStatsResponse) + + return err +} + +type NullableCompareDatasetStatsResponse struct { + value *CompareDatasetStatsResponse + isSet bool +} + +func (v NullableCompareDatasetStatsResponse) Get() *CompareDatasetStatsResponse { + return v.value +} + +func (v *NullableCompareDatasetStatsResponse) Set(val *CompareDatasetStatsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompareDatasetStatsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareDatasetStatsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareDatasetStatsResponse(val *CompareDatasetStatsResponse) *NullableCompareDatasetStatsResponse { + return &NullableCompareDatasetStatsResponse{value: val, isSet: true} +} + +func (v NullableCompareDatasetStatsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareDatasetStatsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_eval_list_response.go b/go/futureagi/model_compare_eval_list_response.go new file mode 100644 index 0000000..d7a2f94 --- /dev/null +++ b/go/futureagi/model_compare_eval_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareEvalListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareEvalListResponse{} + +// CompareEvalListResponse struct for CompareEvalListResponse +type CompareEvalListResponse struct { + Status bool `json:"status"` + Result CompareEvalListResult `json:"result"` +} + +type _CompareEvalListResponse CompareEvalListResponse + +// NewCompareEvalListResponse instantiates a new CompareEvalListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareEvalListResponse(status bool, result CompareEvalListResult) *CompareEvalListResponse { + this := CompareEvalListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompareEvalListResponseWithDefaults instantiates a new CompareEvalListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareEvalListResponseWithDefaults() *CompareEvalListResponse { + this := CompareEvalListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompareEvalListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompareEvalListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompareEvalListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompareEvalListResponse) GetResult() CompareEvalListResult { + if o == nil { + var ret CompareEvalListResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompareEvalListResponse) GetResultOk() (*CompareEvalListResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompareEvalListResponse) SetResult(v CompareEvalListResult) { + o.Result = v +} + +func (o CompareEvalListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareEvalListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompareEvalListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareEvalListResponse := _CompareEvalListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareEvalListResponse) + + if err != nil { + return err + } + + *o = CompareEvalListResponse(varCompareEvalListResponse) + + return err +} + +type NullableCompareEvalListResponse struct { + value *CompareEvalListResponse + isSet bool +} + +func (v NullableCompareEvalListResponse) Get() *CompareEvalListResponse { + return v.value +} + +func (v *NullableCompareEvalListResponse) Set(val *CompareEvalListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompareEvalListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareEvalListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareEvalListResponse(val *CompareEvalListResponse) *NullableCompareEvalListResponse { + return &NullableCompareEvalListResponse{value: val, isSet: true} +} + +func (v NullableCompareEvalListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareEvalListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_eval_list_result.go b/go/futureagi/model_compare_eval_list_result.go new file mode 100644 index 0000000..9fee404 --- /dev/null +++ b/go/futureagi/model_compare_eval_list_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareEvalListResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareEvalListResult{} + +// CompareEvalListResult struct for CompareEvalListResult +type CompareEvalListResult struct { + Evals []map[string]interface{} `json:"evals"` +} + +type _CompareEvalListResult CompareEvalListResult + +// NewCompareEvalListResult instantiates a new CompareEvalListResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareEvalListResult(evals []map[string]interface{}) *CompareEvalListResult { + this := CompareEvalListResult{} + this.Evals = evals + return &this +} + +// NewCompareEvalListResultWithDefaults instantiates a new CompareEvalListResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareEvalListResultWithDefaults() *CompareEvalListResult { + this := CompareEvalListResult{} + return &this +} + +// GetEvals returns the Evals field value +func (o *CompareEvalListResult) GetEvals() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Evals +} + +// GetEvalsOk returns a tuple with the Evals field value +// and a boolean to check if the value has been set. +func (o *CompareEvalListResult) GetEvalsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Evals, true +} + +// SetEvals sets field value +func (o *CompareEvalListResult) SetEvals(v []map[string]interface{}) { + o.Evals = v +} + +func (o CompareEvalListResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareEvalListResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["evals"] = o.Evals + return toSerialize, nil +} + +func (o *CompareEvalListResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "evals", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareEvalListResult := _CompareEvalListResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareEvalListResult) + + if err != nil { + return err + } + + *o = CompareEvalListResult(varCompareEvalListResult) + + return err +} + +type NullableCompareEvalListResult struct { + value *CompareEvalListResult + isSet bool +} + +func (v NullableCompareEvalListResult) Get() *CompareEvalListResult { + return v.value +} + +func (v *NullableCompareEvalListResult) Set(val *CompareEvalListResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompareEvalListResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareEvalListResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareEvalListResult(val *CompareEvalListResult) *NullableCompareEvalListResult { + return &NullableCompareEvalListResult{value: val, isSet: true} +} + +func (v NullableCompareEvalListResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareEvalListResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_evals_list_request.go b/go/futureagi/model_compare_evals_list_request.go new file mode 100644 index 0000000..494817b --- /dev/null +++ b/go/futureagi/model_compare_evals_list_request.go @@ -0,0 +1,225 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareEvalsListRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareEvalsListRequest{} + +// CompareEvalsListRequest struct for CompareEvalsListRequest +type CompareEvalsListRequest struct { + SearchText *string `json:"search_text,omitempty"` + EvalType string `json:"eval_type"` + DatasetIds []string `json:"dataset_ids"` +} + +type _CompareEvalsListRequest CompareEvalsListRequest + +// NewCompareEvalsListRequest instantiates a new CompareEvalsListRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareEvalsListRequest(evalType string, datasetIds []string) *CompareEvalsListRequest { + this := CompareEvalsListRequest{} + var searchText string = "" + this.SearchText = &searchText + this.EvalType = evalType + this.DatasetIds = datasetIds + return &this +} + +// NewCompareEvalsListRequestWithDefaults instantiates a new CompareEvalsListRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareEvalsListRequestWithDefaults() *CompareEvalsListRequest { + this := CompareEvalsListRequest{} + var searchText string = "" + this.SearchText = &searchText + return &this +} + +// GetSearchText returns the SearchText field value if set, zero value otherwise. +func (o *CompareEvalsListRequest) GetSearchText() string { + if o == nil || IsNil(o.SearchText) { + var ret string + return ret + } + return *o.SearchText +} + +// GetSearchTextOk returns a tuple with the SearchText field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareEvalsListRequest) GetSearchTextOk() (*string, bool) { + if o == nil || IsNil(o.SearchText) { + return nil, false + } + return o.SearchText, true +} + +// HasSearchText returns a boolean if a field has been set. +func (o *CompareEvalsListRequest) HasSearchText() bool { + if o != nil && !IsNil(o.SearchText) { + return true + } + + return false +} + +// SetSearchText gets a reference to the given string and assigns it to the SearchText field. +func (o *CompareEvalsListRequest) SetSearchText(v string) { + o.SearchText = &v +} + +// GetEvalType returns the EvalType field value +func (o *CompareEvalsListRequest) GetEvalType() string { + if o == nil { + var ret string + return ret + } + + return o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value +// and a boolean to check if the value has been set. +func (o *CompareEvalsListRequest) GetEvalTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalType, true +} + +// SetEvalType sets field value +func (o *CompareEvalsListRequest) SetEvalType(v string) { + o.EvalType = v +} + +// GetDatasetIds returns the DatasetIds field value +func (o *CompareEvalsListRequest) GetDatasetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.DatasetIds +} + +// GetDatasetIdsOk returns a tuple with the DatasetIds field value +// and a boolean to check if the value has been set. +func (o *CompareEvalsListRequest) GetDatasetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.DatasetIds, true +} + +// SetDatasetIds sets field value +func (o *CompareEvalsListRequest) SetDatasetIds(v []string) { + o.DatasetIds = v +} + +func (o CompareEvalsListRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareEvalsListRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SearchText) { + toSerialize["search_text"] = o.SearchText + } + toSerialize["eval_type"] = o.EvalType + toSerialize["dataset_ids"] = o.DatasetIds + return toSerialize, nil +} + +func (o *CompareEvalsListRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_type", + "dataset_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareEvalsListRequest := _CompareEvalsListRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareEvalsListRequest) + + if err != nil { + return err + } + + *o = CompareEvalsListRequest(varCompareEvalsListRequest) + + return err +} + +type NullableCompareEvalsListRequest struct { + value *CompareEvalsListRequest + isSet bool +} + +func (v NullableCompareEvalsListRequest) Get() *CompareEvalsListRequest { + return v.value +} + +func (v *NullableCompareEvalsListRequest) Set(val *CompareEvalsListRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompareEvalsListRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareEvalsListRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareEvalsListRequest(val *CompareEvalsListRequest) *NullableCompareEvalsListRequest { + return &NullableCompareEvalsListRequest{value: val, isSet: true} +} + +func (v NullableCompareEvalsListRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareEvalsListRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_experiment_eval_request.go b/go/futureagi/model_compare_experiment_eval_request.go new file mode 100644 index 0000000..d8d0181 --- /dev/null +++ b/go/futureagi/model_compare_experiment_eval_request.go @@ -0,0 +1,549 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareExperimentEvalRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareExperimentEvalRequest{} + +// CompareExperimentEvalRequest struct for CompareExperimentEvalRequest +type CompareExperimentEvalRequest struct { + Name string `json:"name"` + TemplateId string `json:"template_id"` + Config map[string]interface{} `json:"config"` + KbId *string `json:"kb_id,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + Model *string `json:"model,omitempty"` + EvalType *string `json:"eval_type,omitempty"` + Run *bool `json:"run,omitempty"` + SaveAsTemplate *bool `json:"save_as_template,omitempty"` + ExperimentId *string `json:"experiment_id,omitempty"` + CompositeWeightOverrides map[string]interface{} `json:"composite_weight_overrides,omitempty"` + DatasetIds []string `json:"dataset_ids,omitempty"` +} + +type _CompareExperimentEvalRequest CompareExperimentEvalRequest + +// NewCompareExperimentEvalRequest instantiates a new CompareExperimentEvalRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareExperimentEvalRequest(name string, templateId string, config map[string]interface{}) *CompareExperimentEvalRequest { + this := CompareExperimentEvalRequest{} + this.Name = name + this.TemplateId = templateId + this.Config = config + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + var run bool = false + this.Run = &run + var saveAsTemplate bool = false + this.SaveAsTemplate = &saveAsTemplate + return &this +} + +// NewCompareExperimentEvalRequestWithDefaults instantiates a new CompareExperimentEvalRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareExperimentEvalRequestWithDefaults() *CompareExperimentEvalRequest { + this := CompareExperimentEvalRequest{} + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + var run bool = false + this.Run = &run + var saveAsTemplate bool = false + this.SaveAsTemplate = &saveAsTemplate + return &this +} + +// GetName returns the Name field value +func (o *CompareExperimentEvalRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompareExperimentEvalRequest) SetName(v string) { + o.Name = v +} + +// GetTemplateId returns the TemplateId field value +func (o *CompareExperimentEvalRequest) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *CompareExperimentEvalRequest) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetConfig returns the Config field value +func (o *CompareExperimentEvalRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *CompareExperimentEvalRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetKbId() string { + if o == nil || IsNil(o.KbId) { + var ret string + return ret + } + return *o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetKbIdOk() (*string, bool) { + if o == nil || IsNil(o.KbId) { + return nil, false + } + return o.KbId, true +} + +// HasKbId returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasKbId() bool { + if o != nil && !IsNil(o.KbId) { + return true + } + + return false +} + +// SetKbId gets a reference to the given string and assigns it to the KbId field. +func (o *CompareExperimentEvalRequest) SetKbId(v string) { + o.KbId = &v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *CompareExperimentEvalRequest) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *CompareExperimentEvalRequest) SetModel(v string) { + o.Model = &v +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetEvalType() string { + if o == nil || IsNil(o.EvalType) { + var ret string + return ret + } + return *o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetEvalTypeOk() (*string, bool) { + if o == nil || IsNil(o.EvalType) { + return nil, false + } + return o.EvalType, true +} + +// HasEvalType returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasEvalType() bool { + if o != nil && !IsNil(o.EvalType) { + return true + } + + return false +} + +// SetEvalType gets a reference to the given string and assigns it to the EvalType field. +func (o *CompareExperimentEvalRequest) SetEvalType(v string) { + o.EvalType = &v +} + +// GetRun returns the Run field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetRun() bool { + if o == nil || IsNil(o.Run) { + var ret bool + return ret + } + return *o.Run +} + +// GetRunOk returns a tuple with the Run field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetRunOk() (*bool, bool) { + if o == nil || IsNil(o.Run) { + return nil, false + } + return o.Run, true +} + +// HasRun returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasRun() bool { + if o != nil && !IsNil(o.Run) { + return true + } + + return false +} + +// SetRun gets a reference to the given bool and assigns it to the Run field. +func (o *CompareExperimentEvalRequest) SetRun(v bool) { + o.Run = &v +} + +// GetSaveAsTemplate returns the SaveAsTemplate field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetSaveAsTemplate() bool { + if o == nil || IsNil(o.SaveAsTemplate) { + var ret bool + return ret + } + return *o.SaveAsTemplate +} + +// GetSaveAsTemplateOk returns a tuple with the SaveAsTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetSaveAsTemplateOk() (*bool, bool) { + if o == nil || IsNil(o.SaveAsTemplate) { + return nil, false + } + return o.SaveAsTemplate, true +} + +// HasSaveAsTemplate returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasSaveAsTemplate() bool { + if o != nil && !IsNil(o.SaveAsTemplate) { + return true + } + + return false +} + +// SetSaveAsTemplate gets a reference to the given bool and assigns it to the SaveAsTemplate field. +func (o *CompareExperimentEvalRequest) SetSaveAsTemplate(v bool) { + o.SaveAsTemplate = &v +} + +// GetExperimentId returns the ExperimentId field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetExperimentId() string { + if o == nil || IsNil(o.ExperimentId) { + var ret string + return ret + } + return *o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetExperimentIdOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentId) { + return nil, false + } + return o.ExperimentId, true +} + +// HasExperimentId returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasExperimentId() bool { + if o != nil && !IsNil(o.ExperimentId) { + return true + } + + return false +} + +// SetExperimentId gets a reference to the given string and assigns it to the ExperimentId field. +func (o *CompareExperimentEvalRequest) SetExperimentId(v string) { + o.ExperimentId = &v +} + +// GetCompositeWeightOverrides returns the CompositeWeightOverrides field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetCompositeWeightOverrides() map[string]interface{} { + if o == nil || IsNil(o.CompositeWeightOverrides) { + var ret map[string]interface{} + return ret + } + return o.CompositeWeightOverrides +} + +// GetCompositeWeightOverridesOk returns a tuple with the CompositeWeightOverrides field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetCompositeWeightOverridesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CompositeWeightOverrides) { + return map[string]interface{}{}, false + } + return o.CompositeWeightOverrides, true +} + +// HasCompositeWeightOverrides returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasCompositeWeightOverrides() bool { + if o != nil && !IsNil(o.CompositeWeightOverrides) { + return true + } + + return false +} + +// SetCompositeWeightOverrides gets a reference to the given map[string]interface{} and assigns it to the CompositeWeightOverrides field. +func (o *CompareExperimentEvalRequest) SetCompositeWeightOverrides(v map[string]interface{}) { + o.CompositeWeightOverrides = v +} + +// GetDatasetIds returns the DatasetIds field value if set, zero value otherwise. +func (o *CompareExperimentEvalRequest) GetDatasetIds() []string { + if o == nil || IsNil(o.DatasetIds) { + var ret []string + return ret + } + return o.DatasetIds +} + +// GetDatasetIdsOk returns a tuple with the DatasetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareExperimentEvalRequest) GetDatasetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DatasetIds) { + return nil, false + } + return o.DatasetIds, true +} + +// HasDatasetIds returns a boolean if a field has been set. +func (o *CompareExperimentEvalRequest) HasDatasetIds() bool { + if o != nil && !IsNil(o.DatasetIds) { + return true + } + + return false +} + +// SetDatasetIds gets a reference to the given []string and assigns it to the DatasetIds field. +func (o *CompareExperimentEvalRequest) SetDatasetIds(v []string) { + o.DatasetIds = v +} + +func (o CompareExperimentEvalRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareExperimentEvalRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["template_id"] = o.TemplateId + toSerialize["config"] = o.Config + if !IsNil(o.KbId) { + toSerialize["kb_id"] = o.KbId + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.EvalType) { + toSerialize["eval_type"] = o.EvalType + } + if !IsNil(o.Run) { + toSerialize["run"] = o.Run + } + if !IsNil(o.SaveAsTemplate) { + toSerialize["save_as_template"] = o.SaveAsTemplate + } + if !IsNil(o.ExperimentId) { + toSerialize["experiment_id"] = o.ExperimentId + } + if !IsNil(o.CompositeWeightOverrides) { + toSerialize["composite_weight_overrides"] = o.CompositeWeightOverrides + } + if !IsNil(o.DatasetIds) { + toSerialize["dataset_ids"] = o.DatasetIds + } + return toSerialize, nil +} + +func (o *CompareExperimentEvalRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "template_id", + "config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareExperimentEvalRequest := _CompareExperimentEvalRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareExperimentEvalRequest) + + if err != nil { + return err + } + + *o = CompareExperimentEvalRequest(varCompareExperimentEvalRequest) + + return err +} + +type NullableCompareExperimentEvalRequest struct { + value *CompareExperimentEvalRequest + isSet bool +} + +func (v NullableCompareExperimentEvalRequest) Get() *CompareExperimentEvalRequest { + return v.value +} + +func (v *NullableCompareExperimentEvalRequest) Set(val *CompareExperimentEvalRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompareExperimentEvalRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareExperimentEvalRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareExperimentEvalRequest(val *CompareExperimentEvalRequest) *NullableCompareExperimentEvalRequest { + return &NullableCompareExperimentEvalRequest{value: val, isSet: true} +} + +func (v NullableCompareExperimentEvalRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareExperimentEvalRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_preview_run_eval_request.go b/go/futureagi/model_compare_preview_run_eval_request.go new file mode 100644 index 0000000..748caba --- /dev/null +++ b/go/futureagi/model_compare_preview_run_eval_request.go @@ -0,0 +1,329 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ComparePreviewRunEvalRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ComparePreviewRunEvalRequest{} + +// ComparePreviewRunEvalRequest struct for ComparePreviewRunEvalRequest +type ComparePreviewRunEvalRequest struct { + Config map[string]interface{} `json:"config"` + Model *string `json:"model,omitempty"` + TemplateId string `json:"template_id"` + DatasetIds []string `json:"dataset_ids"` + DatasetInfo map[string]interface{} `json:"dataset_info,omitempty"` + Source *string `json:"source,omitempty"` +} + +type _ComparePreviewRunEvalRequest ComparePreviewRunEvalRequest + +// NewComparePreviewRunEvalRequest instantiates a new ComparePreviewRunEvalRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewComparePreviewRunEvalRequest(config map[string]interface{}, templateId string, datasetIds []string) *ComparePreviewRunEvalRequest { + this := ComparePreviewRunEvalRequest{} + this.Config = config + var model string = "" + this.Model = &model + this.TemplateId = templateId + this.DatasetIds = datasetIds + var source string = "dataset_evaluation" + this.Source = &source + return &this +} + +// NewComparePreviewRunEvalRequestWithDefaults instantiates a new ComparePreviewRunEvalRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewComparePreviewRunEvalRequestWithDefaults() *ComparePreviewRunEvalRequest { + this := ComparePreviewRunEvalRequest{} + var model string = "" + this.Model = &model + var source string = "dataset_evaluation" + this.Source = &source + return &this +} + +// GetConfig returns the Config field value +func (o *ComparePreviewRunEvalRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ComparePreviewRunEvalRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ComparePreviewRunEvalRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *ComparePreviewRunEvalRequest) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComparePreviewRunEvalRequest) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *ComparePreviewRunEvalRequest) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *ComparePreviewRunEvalRequest) SetModel(v string) { + o.Model = &v +} + +// GetTemplateId returns the TemplateId field value +func (o *ComparePreviewRunEvalRequest) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *ComparePreviewRunEvalRequest) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *ComparePreviewRunEvalRequest) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetDatasetIds returns the DatasetIds field value +func (o *ComparePreviewRunEvalRequest) GetDatasetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.DatasetIds +} + +// GetDatasetIdsOk returns a tuple with the DatasetIds field value +// and a boolean to check if the value has been set. +func (o *ComparePreviewRunEvalRequest) GetDatasetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.DatasetIds, true +} + +// SetDatasetIds sets field value +func (o *ComparePreviewRunEvalRequest) SetDatasetIds(v []string) { + o.DatasetIds = v +} + +// GetDatasetInfo returns the DatasetInfo field value if set, zero value otherwise. +func (o *ComparePreviewRunEvalRequest) GetDatasetInfo() map[string]interface{} { + if o == nil || IsNil(o.DatasetInfo) { + var ret map[string]interface{} + return ret + } + return o.DatasetInfo +} + +// GetDatasetInfoOk returns a tuple with the DatasetInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComparePreviewRunEvalRequest) GetDatasetInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DatasetInfo) { + return map[string]interface{}{}, false + } + return o.DatasetInfo, true +} + +// HasDatasetInfo returns a boolean if a field has been set. +func (o *ComparePreviewRunEvalRequest) HasDatasetInfo() bool { + if o != nil && !IsNil(o.DatasetInfo) { + return true + } + + return false +} + +// SetDatasetInfo gets a reference to the given map[string]interface{} and assigns it to the DatasetInfo field. +func (o *ComparePreviewRunEvalRequest) SetDatasetInfo(v map[string]interface{}) { + o.DatasetInfo = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *ComparePreviewRunEvalRequest) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComparePreviewRunEvalRequest) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *ComparePreviewRunEvalRequest) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *ComparePreviewRunEvalRequest) SetSource(v string) { + o.Source = &v +} + +func (o ComparePreviewRunEvalRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ComparePreviewRunEvalRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + toSerialize["template_id"] = o.TemplateId + toSerialize["dataset_ids"] = o.DatasetIds + if !IsNil(o.DatasetInfo) { + toSerialize["dataset_info"] = o.DatasetInfo + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + return toSerialize, nil +} + +func (o *ComparePreviewRunEvalRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "config", + "template_id", + "dataset_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varComparePreviewRunEvalRequest := _ComparePreviewRunEvalRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varComparePreviewRunEvalRequest) + + if err != nil { + return err + } + + *o = ComparePreviewRunEvalRequest(varComparePreviewRunEvalRequest) + + return err +} + +type NullableComparePreviewRunEvalRequest struct { + value *ComparePreviewRunEvalRequest + isSet bool +} + +func (v NullableComparePreviewRunEvalRequest) Get() *ComparePreviewRunEvalRequest { + return v.value +} + +func (v *NullableComparePreviewRunEvalRequest) Set(val *ComparePreviewRunEvalRequest) { + v.value = val + v.isSet = true +} + +func (v NullableComparePreviewRunEvalRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableComparePreviewRunEvalRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComparePreviewRunEvalRequest(val *ComparePreviewRunEvalRequest) *NullableComparePreviewRunEvalRequest { + return &NullableComparePreviewRunEvalRequest{value: val, isSet: true} +} + +func (v NullableComparePreviewRunEvalRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComparePreviewRunEvalRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_compare_start_evals_request.go b/go/futureagi/model_compare_start_evals_request.go new file mode 100644 index 0000000..394e682 --- /dev/null +++ b/go/futureagi/model_compare_start_evals_request.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompareStartEvalsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompareStartEvalsRequest{} + +// CompareStartEvalsRequest struct for CompareStartEvalsRequest +type CompareStartEvalsRequest struct { + UserEvalNames []string `json:"user_eval_names"` + DatasetIds []string `json:"dataset_ids,omitempty"` +} + +type _CompareStartEvalsRequest CompareStartEvalsRequest + +// NewCompareStartEvalsRequest instantiates a new CompareStartEvalsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompareStartEvalsRequest(userEvalNames []string) *CompareStartEvalsRequest { + this := CompareStartEvalsRequest{} + this.UserEvalNames = userEvalNames + return &this +} + +// NewCompareStartEvalsRequestWithDefaults instantiates a new CompareStartEvalsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompareStartEvalsRequestWithDefaults() *CompareStartEvalsRequest { + this := CompareStartEvalsRequest{} + return &this +} + +// GetUserEvalNames returns the UserEvalNames field value +func (o *CompareStartEvalsRequest) GetUserEvalNames() []string { + if o == nil { + var ret []string + return ret + } + + return o.UserEvalNames +} + +// GetUserEvalNamesOk returns a tuple with the UserEvalNames field value +// and a boolean to check if the value has been set. +func (o *CompareStartEvalsRequest) GetUserEvalNamesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.UserEvalNames, true +} + +// SetUserEvalNames sets field value +func (o *CompareStartEvalsRequest) SetUserEvalNames(v []string) { + o.UserEvalNames = v +} + +// GetDatasetIds returns the DatasetIds field value if set, zero value otherwise. +func (o *CompareStartEvalsRequest) GetDatasetIds() []string { + if o == nil || IsNil(o.DatasetIds) { + var ret []string + return ret + } + return o.DatasetIds +} + +// GetDatasetIdsOk returns a tuple with the DatasetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompareStartEvalsRequest) GetDatasetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DatasetIds) { + return nil, false + } + return o.DatasetIds, true +} + +// HasDatasetIds returns a boolean if a field has been set. +func (o *CompareStartEvalsRequest) HasDatasetIds() bool { + if o != nil && !IsNil(o.DatasetIds) { + return true + } + + return false +} + +// SetDatasetIds gets a reference to the given []string and assigns it to the DatasetIds field. +func (o *CompareStartEvalsRequest) SetDatasetIds(v []string) { + o.DatasetIds = v +} + +func (o CompareStartEvalsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompareStartEvalsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_eval_names"] = o.UserEvalNames + if !IsNil(o.DatasetIds) { + toSerialize["dataset_ids"] = o.DatasetIds + } + return toSerialize, nil +} + +func (o *CompareStartEvalsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_eval_names", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompareStartEvalsRequest := _CompareStartEvalsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompareStartEvalsRequest) + + if err != nil { + return err + } + + *o = CompareStartEvalsRequest(varCompareStartEvalsRequest) + + return err +} + +type NullableCompareStartEvalsRequest struct { + value *CompareStartEvalsRequest + isSet bool +} + +func (v NullableCompareStartEvalsRequest) Get() *CompareStartEvalsRequest { + return v.value +} + +func (v *NullableCompareStartEvalsRequest) Set(val *CompareStartEvalsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompareStartEvalsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompareStartEvalsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompareStartEvalsRequest(val *CompareStartEvalsRequest) *NullableCompareStartEvalsRequest { + return &NullableCompareStartEvalsRequest{value: val, isSet: true} +} + +func (v NullableCompareStartEvalsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompareStartEvalsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_child_item.go b/go/futureagi/model_composite_child_item.go new file mode 100644 index 0000000..d9e5a9b --- /dev/null +++ b/go/futureagi/model_composite_child_item.go @@ -0,0 +1,415 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeChildItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeChildItem{} + +// CompositeChildItem struct for CompositeChildItem +type CompositeChildItem struct { + ChildId string `json:"child_id"` + ChildName string `json:"child_name"` + Order int32 `json:"order"` + EvalType *string `json:"eval_type,omitempty"` + PinnedVersionId NullableString `json:"pinned_version_id,omitempty"` + PinnedVersionNumber NullableInt32 `json:"pinned_version_number,omitempty"` + Weight *float32 `json:"weight,omitempty"` + RequiredKeys []string `json:"required_keys,omitempty"` +} + +type _CompositeChildItem CompositeChildItem + +// NewCompositeChildItem instantiates a new CompositeChildItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeChildItem(childId string, childName string, order int32) *CompositeChildItem { + this := CompositeChildItem{} + this.ChildId = childId + this.ChildName = childName + this.Order = order + return &this +} + +// NewCompositeChildItemWithDefaults instantiates a new CompositeChildItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeChildItemWithDefaults() *CompositeChildItem { + this := CompositeChildItem{} + return &this +} + +// GetChildId returns the ChildId field value +func (o *CompositeChildItem) GetChildId() string { + if o == nil { + var ret string + return ret + } + + return o.ChildId +} + +// GetChildIdOk returns a tuple with the ChildId field value +// and a boolean to check if the value has been set. +func (o *CompositeChildItem) GetChildIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChildId, true +} + +// SetChildId sets field value +func (o *CompositeChildItem) SetChildId(v string) { + o.ChildId = v +} + +// GetChildName returns the ChildName field value +func (o *CompositeChildItem) GetChildName() string { + if o == nil { + var ret string + return ret + } + + return o.ChildName +} + +// GetChildNameOk returns a tuple with the ChildName field value +// and a boolean to check if the value has been set. +func (o *CompositeChildItem) GetChildNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChildName, true +} + +// SetChildName sets field value +func (o *CompositeChildItem) SetChildName(v string) { + o.ChildName = v +} + +// GetOrder returns the Order field value +func (o *CompositeChildItem) GetOrder() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *CompositeChildItem) GetOrderOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *CompositeChildItem) SetOrder(v int32) { + o.Order = v +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise. +func (o *CompositeChildItem) GetEvalType() string { + if o == nil || IsNil(o.EvalType) { + var ret string + return ret + } + return *o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeChildItem) GetEvalTypeOk() (*string, bool) { + if o == nil || IsNil(o.EvalType) { + return nil, false + } + return o.EvalType, true +} + +// HasEvalType returns a boolean if a field has been set. +func (o *CompositeChildItem) HasEvalType() bool { + if o != nil && !IsNil(o.EvalType) { + return true + } + + return false +} + +// SetEvalType gets a reference to the given string and assigns it to the EvalType field. +func (o *CompositeChildItem) SetEvalType(v string) { + o.EvalType = &v +} + +// GetPinnedVersionId returns the PinnedVersionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeChildItem) GetPinnedVersionId() string { + if o == nil || IsNil(o.PinnedVersionId.Get()) { + var ret string + return ret + } + return *o.PinnedVersionId.Get() +} + +// GetPinnedVersionIdOk returns a tuple with the PinnedVersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeChildItem) GetPinnedVersionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PinnedVersionId.Get(), o.PinnedVersionId.IsSet() +} + +// HasPinnedVersionId returns a boolean if a field has been set. +func (o *CompositeChildItem) HasPinnedVersionId() bool { + if o != nil && o.PinnedVersionId.IsSet() { + return true + } + + return false +} + +// SetPinnedVersionId gets a reference to the given NullableString and assigns it to the PinnedVersionId field. +func (o *CompositeChildItem) SetPinnedVersionId(v string) { + o.PinnedVersionId.Set(&v) +} + +// SetPinnedVersionIdNil sets the value for PinnedVersionId to be an explicit nil +func (o *CompositeChildItem) SetPinnedVersionIdNil() { + o.PinnedVersionId.Set(nil) +} + +// UnsetPinnedVersionId ensures that no value is present for PinnedVersionId, not even an explicit nil +func (o *CompositeChildItem) UnsetPinnedVersionId() { + o.PinnedVersionId.Unset() +} + +// GetPinnedVersionNumber returns the PinnedVersionNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeChildItem) GetPinnedVersionNumber() int32 { + if o == nil || IsNil(o.PinnedVersionNumber.Get()) { + var ret int32 + return ret + } + return *o.PinnedVersionNumber.Get() +} + +// GetPinnedVersionNumberOk returns a tuple with the PinnedVersionNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeChildItem) GetPinnedVersionNumberOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.PinnedVersionNumber.Get(), o.PinnedVersionNumber.IsSet() +} + +// HasPinnedVersionNumber returns a boolean if a field has been set. +func (o *CompositeChildItem) HasPinnedVersionNumber() bool { + if o != nil && o.PinnedVersionNumber.IsSet() { + return true + } + + return false +} + +// SetPinnedVersionNumber gets a reference to the given NullableInt32 and assigns it to the PinnedVersionNumber field. +func (o *CompositeChildItem) SetPinnedVersionNumber(v int32) { + o.PinnedVersionNumber.Set(&v) +} + +// SetPinnedVersionNumberNil sets the value for PinnedVersionNumber to be an explicit nil +func (o *CompositeChildItem) SetPinnedVersionNumberNil() { + o.PinnedVersionNumber.Set(nil) +} + +// UnsetPinnedVersionNumber ensures that no value is present for PinnedVersionNumber, not even an explicit nil +func (o *CompositeChildItem) UnsetPinnedVersionNumber() { + o.PinnedVersionNumber.Unset() +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *CompositeChildItem) GetWeight() float32 { + if o == nil || IsNil(o.Weight) { + var ret float32 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeChildItem) GetWeightOk() (*float32, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *CompositeChildItem) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given float32 and assigns it to the Weight field. +func (o *CompositeChildItem) SetWeight(v float32) { + o.Weight = &v +} + +// GetRequiredKeys returns the RequiredKeys field value if set, zero value otherwise. +func (o *CompositeChildItem) GetRequiredKeys() []string { + if o == nil || IsNil(o.RequiredKeys) { + var ret []string + return ret + } + return o.RequiredKeys +} + +// GetRequiredKeysOk returns a tuple with the RequiredKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeChildItem) GetRequiredKeysOk() ([]string, bool) { + if o == nil || IsNil(o.RequiredKeys) { + return nil, false + } + return o.RequiredKeys, true +} + +// HasRequiredKeys returns a boolean if a field has been set. +func (o *CompositeChildItem) HasRequiredKeys() bool { + if o != nil && !IsNil(o.RequiredKeys) { + return true + } + + return false +} + +// SetRequiredKeys gets a reference to the given []string and assigns it to the RequiredKeys field. +func (o *CompositeChildItem) SetRequiredKeys(v []string) { + o.RequiredKeys = v +} + +func (o CompositeChildItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeChildItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["child_id"] = o.ChildId + toSerialize["child_name"] = o.ChildName + toSerialize["order"] = o.Order + if !IsNil(o.EvalType) { + toSerialize["eval_type"] = o.EvalType + } + if o.PinnedVersionId.IsSet() { + toSerialize["pinned_version_id"] = o.PinnedVersionId.Get() + } + if o.PinnedVersionNumber.IsSet() { + toSerialize["pinned_version_number"] = o.PinnedVersionNumber.Get() + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + if !IsNil(o.RequiredKeys) { + toSerialize["required_keys"] = o.RequiredKeys + } + return toSerialize, nil +} + +func (o *CompositeChildItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "child_id", + "child_name", + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeChildItem := _CompositeChildItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeChildItem) + + if err != nil { + return err + } + + *o = CompositeChildItem(varCompositeChildItem) + + return err +} + +type NullableCompositeChildItem struct { + value *CompositeChildItem + isSet bool +} + +func (v NullableCompositeChildItem) Get() *CompositeChildItem { + return v.value +} + +func (v *NullableCompositeChildItem) Set(val *CompositeChildItem) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeChildItem) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeChildItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeChildItem(val *CompositeChildItem) *NullableCompositeChildItem { + return &NullableCompositeChildItem{value: val, isSet: true} +} + +func (v NullableCompositeChildItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeChildItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_child_result.go b/go/futureagi/model_composite_child_result.go new file mode 100644 index 0000000..bc6daa9 --- /dev/null +++ b/go/futureagi/model_composite_child_result.go @@ -0,0 +1,584 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeChildResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeChildResult{} + +// CompositeChildResult struct for CompositeChildResult +type CompositeChildResult struct { + ChildId string `json:"child_id"` + ChildName string `json:"child_name"` + Order int32 `json:"order"` + Score NullableFloat32 `json:"score,omitempty"` + Output map[string]interface{} `json:"output,omitempty"` + Reason NullableString `json:"reason,omitempty"` + OutputType NullableString `json:"output_type,omitempty"` + Status string `json:"status"` + Error NullableString `json:"error,omitempty"` + LogId NullableString `json:"log_id,omitempty"` + Weight *float32 `json:"weight,omitempty"` + ErrorLocalizerResult map[string]interface{} `json:"error_localizer_result,omitempty"` +} + +type _CompositeChildResult CompositeChildResult + +// NewCompositeChildResult instantiates a new CompositeChildResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeChildResult(childId string, childName string, order int32, status string) *CompositeChildResult { + this := CompositeChildResult{} + this.ChildId = childId + this.ChildName = childName + this.Order = order + this.Status = status + return &this +} + +// NewCompositeChildResultWithDefaults instantiates a new CompositeChildResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeChildResultWithDefaults() *CompositeChildResult { + this := CompositeChildResult{} + return &this +} + +// GetChildId returns the ChildId field value +func (o *CompositeChildResult) GetChildId() string { + if o == nil { + var ret string + return ret + } + + return o.ChildId +} + +// GetChildIdOk returns a tuple with the ChildId field value +// and a boolean to check if the value has been set. +func (o *CompositeChildResult) GetChildIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChildId, true +} + +// SetChildId sets field value +func (o *CompositeChildResult) SetChildId(v string) { + o.ChildId = v +} + +// GetChildName returns the ChildName field value +func (o *CompositeChildResult) GetChildName() string { + if o == nil { + var ret string + return ret + } + + return o.ChildName +} + +// GetChildNameOk returns a tuple with the ChildName field value +// and a boolean to check if the value has been set. +func (o *CompositeChildResult) GetChildNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChildName, true +} + +// SetChildName sets field value +func (o *CompositeChildResult) SetChildName(v string) { + o.ChildName = v +} + +// GetOrder returns the Order field value +func (o *CompositeChildResult) GetOrder() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *CompositeChildResult) GetOrderOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *CompositeChildResult) SetOrder(v int32) { + o.Order = v +} + +// GetScore returns the Score field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeChildResult) GetScore() float32 { + if o == nil || IsNil(o.Score.Get()) { + var ret float32 + return ret + } + return *o.Score.Get() +} + +// GetScoreOk returns a tuple with the Score field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeChildResult) GetScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Score.Get(), o.Score.IsSet() +} + +// HasScore returns a boolean if a field has been set. +func (o *CompositeChildResult) HasScore() bool { + if o != nil && o.Score.IsSet() { + return true + } + + return false +} + +// SetScore gets a reference to the given NullableFloat32 and assigns it to the Score field. +func (o *CompositeChildResult) SetScore(v float32) { + o.Score.Set(&v) +} + +// SetScoreNil sets the value for Score to be an explicit nil +func (o *CompositeChildResult) SetScoreNil() { + o.Score.Set(nil) +} + +// UnsetScore ensures that no value is present for Score, not even an explicit nil +func (o *CompositeChildResult) UnsetScore() { + o.Score.Unset() +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *CompositeChildResult) GetOutput() map[string]interface{} { + if o == nil || IsNil(o.Output) { + var ret map[string]interface{} + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeChildResult) GetOutputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Output) { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *CompositeChildResult) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given map[string]interface{} and assigns it to the Output field. +func (o *CompositeChildResult) SetOutput(v map[string]interface{}) { + o.Output = v +} + +// GetReason returns the Reason field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeChildResult) GetReason() string { + if o == nil || IsNil(o.Reason.Get()) { + var ret string + return ret + } + return *o.Reason.Get() +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeChildResult) GetReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Reason.Get(), o.Reason.IsSet() +} + +// HasReason returns a boolean if a field has been set. +func (o *CompositeChildResult) HasReason() bool { + if o != nil && o.Reason.IsSet() { + return true + } + + return false +} + +// SetReason gets a reference to the given NullableString and assigns it to the Reason field. +func (o *CompositeChildResult) SetReason(v string) { + o.Reason.Set(&v) +} + +// SetReasonNil sets the value for Reason to be an explicit nil +func (o *CompositeChildResult) SetReasonNil() { + o.Reason.Set(nil) +} + +// UnsetReason ensures that no value is present for Reason, not even an explicit nil +func (o *CompositeChildResult) UnsetReason() { + o.Reason.Unset() +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeChildResult) GetOutputType() string { + if o == nil || IsNil(o.OutputType.Get()) { + var ret string + return ret + } + return *o.OutputType.Get() +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeChildResult) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OutputType.Get(), o.OutputType.IsSet() +} + +// HasOutputType returns a boolean if a field has been set. +func (o *CompositeChildResult) HasOutputType() bool { + if o != nil && o.OutputType.IsSet() { + return true + } + + return false +} + +// SetOutputType gets a reference to the given NullableString and assigns it to the OutputType field. +func (o *CompositeChildResult) SetOutputType(v string) { + o.OutputType.Set(&v) +} + +// SetOutputTypeNil sets the value for OutputType to be an explicit nil +func (o *CompositeChildResult) SetOutputTypeNil() { + o.OutputType.Set(nil) +} + +// UnsetOutputType ensures that no value is present for OutputType, not even an explicit nil +func (o *CompositeChildResult) UnsetOutputType() { + o.OutputType.Unset() +} + +// GetStatus returns the Status field value +func (o *CompositeChildResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompositeChildResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompositeChildResult) SetStatus(v string) { + o.Status = v +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeChildResult) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeChildResult) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *CompositeChildResult) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *CompositeChildResult) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *CompositeChildResult) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *CompositeChildResult) UnsetError() { + o.Error.Unset() +} + +// GetLogId returns the LogId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeChildResult) GetLogId() string { + if o == nil || IsNil(o.LogId.Get()) { + var ret string + return ret + } + return *o.LogId.Get() +} + +// GetLogIdOk returns a tuple with the LogId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeChildResult) GetLogIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LogId.Get(), o.LogId.IsSet() +} + +// HasLogId returns a boolean if a field has been set. +func (o *CompositeChildResult) HasLogId() bool { + if o != nil && o.LogId.IsSet() { + return true + } + + return false +} + +// SetLogId gets a reference to the given NullableString and assigns it to the LogId field. +func (o *CompositeChildResult) SetLogId(v string) { + o.LogId.Set(&v) +} + +// SetLogIdNil sets the value for LogId to be an explicit nil +func (o *CompositeChildResult) SetLogIdNil() { + o.LogId.Set(nil) +} + +// UnsetLogId ensures that no value is present for LogId, not even an explicit nil +func (o *CompositeChildResult) UnsetLogId() { + o.LogId.Unset() +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *CompositeChildResult) GetWeight() float32 { + if o == nil || IsNil(o.Weight) { + var ret float32 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeChildResult) GetWeightOk() (*float32, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *CompositeChildResult) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given float32 and assigns it to the Weight field. +func (o *CompositeChildResult) SetWeight(v float32) { + o.Weight = &v +} + +// GetErrorLocalizerResult returns the ErrorLocalizerResult field value if set, zero value otherwise. +func (o *CompositeChildResult) GetErrorLocalizerResult() map[string]interface{} { + if o == nil || IsNil(o.ErrorLocalizerResult) { + var ret map[string]interface{} + return ret + } + return o.ErrorLocalizerResult +} + +// GetErrorLocalizerResultOk returns a tuple with the ErrorLocalizerResult field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeChildResult) GetErrorLocalizerResultOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ErrorLocalizerResult) { + return map[string]interface{}{}, false + } + return o.ErrorLocalizerResult, true +} + +// HasErrorLocalizerResult returns a boolean if a field has been set. +func (o *CompositeChildResult) HasErrorLocalizerResult() bool { + if o != nil && !IsNil(o.ErrorLocalizerResult) { + return true + } + + return false +} + +// SetErrorLocalizerResult gets a reference to the given map[string]interface{} and assigns it to the ErrorLocalizerResult field. +func (o *CompositeChildResult) SetErrorLocalizerResult(v map[string]interface{}) { + o.ErrorLocalizerResult = v +} + +func (o CompositeChildResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeChildResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["child_id"] = o.ChildId + toSerialize["child_name"] = o.ChildName + toSerialize["order"] = o.Order + if o.Score.IsSet() { + toSerialize["score"] = o.Score.Get() + } + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + if o.Reason.IsSet() { + toSerialize["reason"] = o.Reason.Get() + } + if o.OutputType.IsSet() { + toSerialize["output_type"] = o.OutputType.Get() + } + toSerialize["status"] = o.Status + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.LogId.IsSet() { + toSerialize["log_id"] = o.LogId.Get() + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + if !IsNil(o.ErrorLocalizerResult) { + toSerialize["error_localizer_result"] = o.ErrorLocalizerResult + } + return toSerialize, nil +} + +func (o *CompositeChildResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "child_id", + "child_name", + "order", + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeChildResult := _CompositeChildResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeChildResult) + + if err != nil { + return err + } + + *o = CompositeChildResult(varCompositeChildResult) + + return err +} + +type NullableCompositeChildResult struct { + value *CompositeChildResult + isSet bool +} + +func (v NullableCompositeChildResult) Get() *CompositeChildResult { + return v.value +} + +func (v *NullableCompositeChildResult) Set(val *CompositeChildResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeChildResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeChildResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeChildResult(val *CompositeChildResult) *NullableCompositeChildResult { + return &NullableCompositeChildResult{value: val, isSet: true} +} + +func (v NullableCompositeChildResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeChildResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_adhoc_execute_request.go b/go/futureagi/model_composite_eval_adhoc_execute_request.go new file mode 100644 index 0000000..0ddfd78 --- /dev/null +++ b/go/futureagi/model_composite_eval_adhoc_execute_request.go @@ -0,0 +1,720 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalAdhocExecuteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalAdhocExecuteRequest{} + +// CompositeEvalAdhocExecuteRequest struct for CompositeEvalAdhocExecuteRequest +type CompositeEvalAdhocExecuteRequest struct { + Mapping map[string]interface{} `json:"mapping"` + Model NullableString `json:"model,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + InputDataTypes map[string]interface{} `json:"input_data_types,omitempty"` + SpanContext map[string]interface{} `json:"span_context,omitempty"` + TraceContext map[string]interface{} `json:"trace_context,omitempty"` + SessionContext map[string]interface{} `json:"session_context,omitempty"` + CallContext map[string]interface{} `json:"call_context,omitempty"` + RowContext map[string]interface{} `json:"row_context,omitempty"` + ChildTemplateIds []string `json:"child_template_ids"` + AggregationEnabled *bool `json:"aggregation_enabled,omitempty"` + AggregationFunction *string `json:"aggregation_function,omitempty"` + CompositeChildAxis *string `json:"composite_child_axis,omitempty"` + ChildWeights map[string]interface{} `json:"child_weights,omitempty"` + PassThreshold *float32 `json:"pass_threshold,omitempty"` +} + +type _CompositeEvalAdhocExecuteRequest CompositeEvalAdhocExecuteRequest + +// NewCompositeEvalAdhocExecuteRequest instantiates a new CompositeEvalAdhocExecuteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalAdhocExecuteRequest(mapping map[string]interface{}, childTemplateIds []string) *CompositeEvalAdhocExecuteRequest { + this := CompositeEvalAdhocExecuteRequest{} + this.Mapping = mapping + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + this.ChildTemplateIds = childTemplateIds + var aggregationEnabled bool = true + this.AggregationEnabled = &aggregationEnabled + var aggregationFunction string = "weighted_avg" + this.AggregationFunction = &aggregationFunction + var compositeChildAxis string = "" + this.CompositeChildAxis = &compositeChildAxis + var passThreshold float32 = 0.5 + this.PassThreshold = &passThreshold + return &this +} + +// NewCompositeEvalAdhocExecuteRequestWithDefaults instantiates a new CompositeEvalAdhocExecuteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalAdhocExecuteRequestWithDefaults() *CompositeEvalAdhocExecuteRequest { + this := CompositeEvalAdhocExecuteRequest{} + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + var aggregationEnabled bool = true + this.AggregationEnabled = &aggregationEnabled + var aggregationFunction string = "weighted_avg" + this.AggregationFunction = &aggregationFunction + var compositeChildAxis string = "" + this.CompositeChildAxis = &compositeChildAxis + var passThreshold float32 = 0.5 + this.PassThreshold = &passThreshold + return &this +} + +// GetMapping returns the Mapping field value +func (o *CompositeEvalAdhocExecuteRequest) GetMapping() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetMappingOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Mapping, true +} + +// SetMapping sets field value +func (o *CompositeEvalAdhocExecuteRequest) SetMapping(v map[string]interface{}) { + o.Mapping = v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalAdhocExecuteRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalAdhocExecuteRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *CompositeEvalAdhocExecuteRequest) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *CompositeEvalAdhocExecuteRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *CompositeEvalAdhocExecuteRequest) UnsetModel() { + o.Model.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *CompositeEvalAdhocExecuteRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *CompositeEvalAdhocExecuteRequest) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetInputDataTypes returns the InputDataTypes field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetInputDataTypes() map[string]interface{} { + if o == nil || IsNil(o.InputDataTypes) { + var ret map[string]interface{} + return ret + } + return o.InputDataTypes +} + +// GetInputDataTypesOk returns a tuple with the InputDataTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetInputDataTypesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InputDataTypes) { + return map[string]interface{}{}, false + } + return o.InputDataTypes, true +} + +// HasInputDataTypes returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasInputDataTypes() bool { + if o != nil && !IsNil(o.InputDataTypes) { + return true + } + + return false +} + +// SetInputDataTypes gets a reference to the given map[string]interface{} and assigns it to the InputDataTypes field. +func (o *CompositeEvalAdhocExecuteRequest) SetInputDataTypes(v map[string]interface{}) { + o.InputDataTypes = v +} + +// GetSpanContext returns the SpanContext field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetSpanContext() map[string]interface{} { + if o == nil || IsNil(o.SpanContext) { + var ret map[string]interface{} + return ret + } + return o.SpanContext +} + +// GetSpanContextOk returns a tuple with the SpanContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetSpanContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.SpanContext) { + return map[string]interface{}{}, false + } + return o.SpanContext, true +} + +// HasSpanContext returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasSpanContext() bool { + if o != nil && !IsNil(o.SpanContext) { + return true + } + + return false +} + +// SetSpanContext gets a reference to the given map[string]interface{} and assigns it to the SpanContext field. +func (o *CompositeEvalAdhocExecuteRequest) SetSpanContext(v map[string]interface{}) { + o.SpanContext = v +} + +// GetTraceContext returns the TraceContext field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetTraceContext() map[string]interface{} { + if o == nil || IsNil(o.TraceContext) { + var ret map[string]interface{} + return ret + } + return o.TraceContext +} + +// GetTraceContextOk returns a tuple with the TraceContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetTraceContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.TraceContext) { + return map[string]interface{}{}, false + } + return o.TraceContext, true +} + +// HasTraceContext returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasTraceContext() bool { + if o != nil && !IsNil(o.TraceContext) { + return true + } + + return false +} + +// SetTraceContext gets a reference to the given map[string]interface{} and assigns it to the TraceContext field. +func (o *CompositeEvalAdhocExecuteRequest) SetTraceContext(v map[string]interface{}) { + o.TraceContext = v +} + +// GetSessionContext returns the SessionContext field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetSessionContext() map[string]interface{} { + if o == nil || IsNil(o.SessionContext) { + var ret map[string]interface{} + return ret + } + return o.SessionContext +} + +// GetSessionContextOk returns a tuple with the SessionContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetSessionContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.SessionContext) { + return map[string]interface{}{}, false + } + return o.SessionContext, true +} + +// HasSessionContext returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasSessionContext() bool { + if o != nil && !IsNil(o.SessionContext) { + return true + } + + return false +} + +// SetSessionContext gets a reference to the given map[string]interface{} and assigns it to the SessionContext field. +func (o *CompositeEvalAdhocExecuteRequest) SetSessionContext(v map[string]interface{}) { + o.SessionContext = v +} + +// GetCallContext returns the CallContext field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetCallContext() map[string]interface{} { + if o == nil || IsNil(o.CallContext) { + var ret map[string]interface{} + return ret + } + return o.CallContext +} + +// GetCallContextOk returns a tuple with the CallContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetCallContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CallContext) { + return map[string]interface{}{}, false + } + return o.CallContext, true +} + +// HasCallContext returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasCallContext() bool { + if o != nil && !IsNil(o.CallContext) { + return true + } + + return false +} + +// SetCallContext gets a reference to the given map[string]interface{} and assigns it to the CallContext field. +func (o *CompositeEvalAdhocExecuteRequest) SetCallContext(v map[string]interface{}) { + o.CallContext = v +} + +// GetRowContext returns the RowContext field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetRowContext() map[string]interface{} { + if o == nil || IsNil(o.RowContext) { + var ret map[string]interface{} + return ret + } + return o.RowContext +} + +// GetRowContextOk returns a tuple with the RowContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetRowContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RowContext) { + return map[string]interface{}{}, false + } + return o.RowContext, true +} + +// HasRowContext returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasRowContext() bool { + if o != nil && !IsNil(o.RowContext) { + return true + } + + return false +} + +// SetRowContext gets a reference to the given map[string]interface{} and assigns it to the RowContext field. +func (o *CompositeEvalAdhocExecuteRequest) SetRowContext(v map[string]interface{}) { + o.RowContext = v +} + +// GetChildTemplateIds returns the ChildTemplateIds field value +func (o *CompositeEvalAdhocExecuteRequest) GetChildTemplateIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ChildTemplateIds +} + +// GetChildTemplateIdsOk returns a tuple with the ChildTemplateIds field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetChildTemplateIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ChildTemplateIds, true +} + +// SetChildTemplateIds sets field value +func (o *CompositeEvalAdhocExecuteRequest) SetChildTemplateIds(v []string) { + o.ChildTemplateIds = v +} + +// GetAggregationEnabled returns the AggregationEnabled field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetAggregationEnabled() bool { + if o == nil || IsNil(o.AggregationEnabled) { + var ret bool + return ret + } + return *o.AggregationEnabled +} + +// GetAggregationEnabledOk returns a tuple with the AggregationEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetAggregationEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.AggregationEnabled) { + return nil, false + } + return o.AggregationEnabled, true +} + +// HasAggregationEnabled returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasAggregationEnabled() bool { + if o != nil && !IsNil(o.AggregationEnabled) { + return true + } + + return false +} + +// SetAggregationEnabled gets a reference to the given bool and assigns it to the AggregationEnabled field. +func (o *CompositeEvalAdhocExecuteRequest) SetAggregationEnabled(v bool) { + o.AggregationEnabled = &v +} + +// GetAggregationFunction returns the AggregationFunction field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetAggregationFunction() string { + if o == nil || IsNil(o.AggregationFunction) { + var ret string + return ret + } + return *o.AggregationFunction +} + +// GetAggregationFunctionOk returns a tuple with the AggregationFunction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetAggregationFunctionOk() (*string, bool) { + if o == nil || IsNil(o.AggregationFunction) { + return nil, false + } + return o.AggregationFunction, true +} + +// HasAggregationFunction returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasAggregationFunction() bool { + if o != nil && !IsNil(o.AggregationFunction) { + return true + } + + return false +} + +// SetAggregationFunction gets a reference to the given string and assigns it to the AggregationFunction field. +func (o *CompositeEvalAdhocExecuteRequest) SetAggregationFunction(v string) { + o.AggregationFunction = &v +} + +// GetCompositeChildAxis returns the CompositeChildAxis field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetCompositeChildAxis() string { + if o == nil || IsNil(o.CompositeChildAxis) { + var ret string + return ret + } + return *o.CompositeChildAxis +} + +// GetCompositeChildAxisOk returns a tuple with the CompositeChildAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetCompositeChildAxisOk() (*string, bool) { + if o == nil || IsNil(o.CompositeChildAxis) { + return nil, false + } + return o.CompositeChildAxis, true +} + +// HasCompositeChildAxis returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasCompositeChildAxis() bool { + if o != nil && !IsNil(o.CompositeChildAxis) { + return true + } + + return false +} + +// SetCompositeChildAxis gets a reference to the given string and assigns it to the CompositeChildAxis field. +func (o *CompositeEvalAdhocExecuteRequest) SetCompositeChildAxis(v string) { + o.CompositeChildAxis = &v +} + +// GetChildWeights returns the ChildWeights field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetChildWeights() map[string]interface{} { + if o == nil || IsNil(o.ChildWeights) { + var ret map[string]interface{} + return ret + } + return o.ChildWeights +} + +// GetChildWeightsOk returns a tuple with the ChildWeights field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetChildWeightsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChildWeights) { + return map[string]interface{}{}, false + } + return o.ChildWeights, true +} + +// HasChildWeights returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasChildWeights() bool { + if o != nil && !IsNil(o.ChildWeights) { + return true + } + + return false +} + +// SetChildWeights gets a reference to the given map[string]interface{} and assigns it to the ChildWeights field. +func (o *CompositeEvalAdhocExecuteRequest) SetChildWeights(v map[string]interface{}) { + o.ChildWeights = v +} + +// GetPassThreshold returns the PassThreshold field value if set, zero value otherwise. +func (o *CompositeEvalAdhocExecuteRequest) GetPassThreshold() float32 { + if o == nil || IsNil(o.PassThreshold) { + var ret float32 + return ret + } + return *o.PassThreshold +} + +// GetPassThresholdOk returns a tuple with the PassThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalAdhocExecuteRequest) GetPassThresholdOk() (*float32, bool) { + if o == nil || IsNil(o.PassThreshold) { + return nil, false + } + return o.PassThreshold, true +} + +// HasPassThreshold returns a boolean if a field has been set. +func (o *CompositeEvalAdhocExecuteRequest) HasPassThreshold() bool { + if o != nil && !IsNil(o.PassThreshold) { + return true + } + + return false +} + +// SetPassThreshold gets a reference to the given float32 and assigns it to the PassThreshold field. +func (o *CompositeEvalAdhocExecuteRequest) SetPassThreshold(v float32) { + o.PassThreshold = &v +} + +func (o CompositeEvalAdhocExecuteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalAdhocExecuteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["mapping"] = o.Mapping + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if !IsNil(o.InputDataTypes) { + toSerialize["input_data_types"] = o.InputDataTypes + } + if !IsNil(o.SpanContext) { + toSerialize["span_context"] = o.SpanContext + } + if !IsNil(o.TraceContext) { + toSerialize["trace_context"] = o.TraceContext + } + if !IsNil(o.SessionContext) { + toSerialize["session_context"] = o.SessionContext + } + if !IsNil(o.CallContext) { + toSerialize["call_context"] = o.CallContext + } + if !IsNil(o.RowContext) { + toSerialize["row_context"] = o.RowContext + } + toSerialize["child_template_ids"] = o.ChildTemplateIds + if !IsNil(o.AggregationEnabled) { + toSerialize["aggregation_enabled"] = o.AggregationEnabled + } + if !IsNil(o.AggregationFunction) { + toSerialize["aggregation_function"] = o.AggregationFunction + } + if !IsNil(o.CompositeChildAxis) { + toSerialize["composite_child_axis"] = o.CompositeChildAxis + } + if !IsNil(o.ChildWeights) { + toSerialize["child_weights"] = o.ChildWeights + } + if !IsNil(o.PassThreshold) { + toSerialize["pass_threshold"] = o.PassThreshold + } + return toSerialize, nil +} + +func (o *CompositeEvalAdhocExecuteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "mapping", + "child_template_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalAdhocExecuteRequest := _CompositeEvalAdhocExecuteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalAdhocExecuteRequest) + + if err != nil { + return err + } + + *o = CompositeEvalAdhocExecuteRequest(varCompositeEvalAdhocExecuteRequest) + + return err +} + +type NullableCompositeEvalAdhocExecuteRequest struct { + value *CompositeEvalAdhocExecuteRequest + isSet bool +} + +func (v NullableCompositeEvalAdhocExecuteRequest) Get() *CompositeEvalAdhocExecuteRequest { + return v.value +} + +func (v *NullableCompositeEvalAdhocExecuteRequest) Set(val *CompositeEvalAdhocExecuteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalAdhocExecuteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalAdhocExecuteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalAdhocExecuteRequest(val *CompositeEvalAdhocExecuteRequest) *NullableCompositeEvalAdhocExecuteRequest { + return &NullableCompositeEvalAdhocExecuteRequest{value: val, isSet: true} +} + +func (v NullableCompositeEvalAdhocExecuteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalAdhocExecuteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_create_request.go b/go/futureagi/model_composite_eval_create_request.go new file mode 100644 index 0000000..9ff3aa9 --- /dev/null +++ b/go/futureagi/model_composite_eval_create_request.go @@ -0,0 +1,424 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalCreateRequest{} + +// CompositeEvalCreateRequest struct for CompositeEvalCreateRequest +type CompositeEvalCreateRequest struct { + Name string `json:"name"` + Description NullableString `json:"description,omitempty"` + Tags []string `json:"tags,omitempty"` + ChildTemplateIds []string `json:"child_template_ids"` + AggregationEnabled *bool `json:"aggregation_enabled,omitempty"` + AggregationFunction *string `json:"aggregation_function,omitempty"` + ChildWeights map[string]interface{} `json:"child_weights,omitempty"` + CompositeChildAxis *string `json:"composite_child_axis,omitempty"` +} + +type _CompositeEvalCreateRequest CompositeEvalCreateRequest + +// NewCompositeEvalCreateRequest instantiates a new CompositeEvalCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalCreateRequest(name string, childTemplateIds []string) *CompositeEvalCreateRequest { + this := CompositeEvalCreateRequest{} + this.Name = name + this.ChildTemplateIds = childTemplateIds + var aggregationEnabled bool = true + this.AggregationEnabled = &aggregationEnabled + var aggregationFunction string = "weighted_avg" + this.AggregationFunction = &aggregationFunction + var compositeChildAxis string = "" + this.CompositeChildAxis = &compositeChildAxis + return &this +} + +// NewCompositeEvalCreateRequestWithDefaults instantiates a new CompositeEvalCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalCreateRequestWithDefaults() *CompositeEvalCreateRequest { + this := CompositeEvalCreateRequest{} + var aggregationEnabled bool = true + this.AggregationEnabled = &aggregationEnabled + var aggregationFunction string = "weighted_avg" + this.AggregationFunction = &aggregationFunction + var compositeChildAxis string = "" + this.CompositeChildAxis = &compositeChildAxis + return &this +} + +// GetName returns the Name field value +func (o *CompositeEvalCreateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompositeEvalCreateRequest) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalCreateRequest) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalCreateRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CompositeEvalCreateRequest) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CompositeEvalCreateRequest) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CompositeEvalCreateRequest) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CompositeEvalCreateRequest) UnsetDescription() { + o.Description.Unset() +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *CompositeEvalCreateRequest) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *CompositeEvalCreateRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *CompositeEvalCreateRequest) SetTags(v []string) { + o.Tags = v +} + +// GetChildTemplateIds returns the ChildTemplateIds field value +func (o *CompositeEvalCreateRequest) GetChildTemplateIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ChildTemplateIds +} + +// GetChildTemplateIdsOk returns a tuple with the ChildTemplateIds field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateRequest) GetChildTemplateIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ChildTemplateIds, true +} + +// SetChildTemplateIds sets field value +func (o *CompositeEvalCreateRequest) SetChildTemplateIds(v []string) { + o.ChildTemplateIds = v +} + +// GetAggregationEnabled returns the AggregationEnabled field value if set, zero value otherwise. +func (o *CompositeEvalCreateRequest) GetAggregationEnabled() bool { + if o == nil || IsNil(o.AggregationEnabled) { + var ret bool + return ret + } + return *o.AggregationEnabled +} + +// GetAggregationEnabledOk returns a tuple with the AggregationEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateRequest) GetAggregationEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.AggregationEnabled) { + return nil, false + } + return o.AggregationEnabled, true +} + +// HasAggregationEnabled returns a boolean if a field has been set. +func (o *CompositeEvalCreateRequest) HasAggregationEnabled() bool { + if o != nil && !IsNil(o.AggregationEnabled) { + return true + } + + return false +} + +// SetAggregationEnabled gets a reference to the given bool and assigns it to the AggregationEnabled field. +func (o *CompositeEvalCreateRequest) SetAggregationEnabled(v bool) { + o.AggregationEnabled = &v +} + +// GetAggregationFunction returns the AggregationFunction field value if set, zero value otherwise. +func (o *CompositeEvalCreateRequest) GetAggregationFunction() string { + if o == nil || IsNil(o.AggregationFunction) { + var ret string + return ret + } + return *o.AggregationFunction +} + +// GetAggregationFunctionOk returns a tuple with the AggregationFunction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateRequest) GetAggregationFunctionOk() (*string, bool) { + if o == nil || IsNil(o.AggregationFunction) { + return nil, false + } + return o.AggregationFunction, true +} + +// HasAggregationFunction returns a boolean if a field has been set. +func (o *CompositeEvalCreateRequest) HasAggregationFunction() bool { + if o != nil && !IsNil(o.AggregationFunction) { + return true + } + + return false +} + +// SetAggregationFunction gets a reference to the given string and assigns it to the AggregationFunction field. +func (o *CompositeEvalCreateRequest) SetAggregationFunction(v string) { + o.AggregationFunction = &v +} + +// GetChildWeights returns the ChildWeights field value if set, zero value otherwise. +func (o *CompositeEvalCreateRequest) GetChildWeights() map[string]interface{} { + if o == nil || IsNil(o.ChildWeights) { + var ret map[string]interface{} + return ret + } + return o.ChildWeights +} + +// GetChildWeightsOk returns a tuple with the ChildWeights field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateRequest) GetChildWeightsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChildWeights) { + return map[string]interface{}{}, false + } + return o.ChildWeights, true +} + +// HasChildWeights returns a boolean if a field has been set. +func (o *CompositeEvalCreateRequest) HasChildWeights() bool { + if o != nil && !IsNil(o.ChildWeights) { + return true + } + + return false +} + +// SetChildWeights gets a reference to the given map[string]interface{} and assigns it to the ChildWeights field. +func (o *CompositeEvalCreateRequest) SetChildWeights(v map[string]interface{}) { + o.ChildWeights = v +} + +// GetCompositeChildAxis returns the CompositeChildAxis field value if set, zero value otherwise. +func (o *CompositeEvalCreateRequest) GetCompositeChildAxis() string { + if o == nil || IsNil(o.CompositeChildAxis) { + var ret string + return ret + } + return *o.CompositeChildAxis +} + +// GetCompositeChildAxisOk returns a tuple with the CompositeChildAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateRequest) GetCompositeChildAxisOk() (*string, bool) { + if o == nil || IsNil(o.CompositeChildAxis) { + return nil, false + } + return o.CompositeChildAxis, true +} + +// HasCompositeChildAxis returns a boolean if a field has been set. +func (o *CompositeEvalCreateRequest) HasCompositeChildAxis() bool { + if o != nil && !IsNil(o.CompositeChildAxis) { + return true + } + + return false +} + +// SetCompositeChildAxis gets a reference to the given string and assigns it to the CompositeChildAxis field. +func (o *CompositeEvalCreateRequest) SetCompositeChildAxis(v string) { + o.CompositeChildAxis = &v +} + +func (o CompositeEvalCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + toSerialize["child_template_ids"] = o.ChildTemplateIds + if !IsNil(o.AggregationEnabled) { + toSerialize["aggregation_enabled"] = o.AggregationEnabled + } + if !IsNil(o.AggregationFunction) { + toSerialize["aggregation_function"] = o.AggregationFunction + } + if !IsNil(o.ChildWeights) { + toSerialize["child_weights"] = o.ChildWeights + } + if !IsNil(o.CompositeChildAxis) { + toSerialize["composite_child_axis"] = o.CompositeChildAxis + } + return toSerialize, nil +} + +func (o *CompositeEvalCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "child_template_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalCreateRequest := _CompositeEvalCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalCreateRequest) + + if err != nil { + return err + } + + *o = CompositeEvalCreateRequest(varCompositeEvalCreateRequest) + + return err +} + +type NullableCompositeEvalCreateRequest struct { + value *CompositeEvalCreateRequest + isSet bool +} + +func (v NullableCompositeEvalCreateRequest) Get() *CompositeEvalCreateRequest { + return v.value +} + +func (v *NullableCompositeEvalCreateRequest) Set(val *CompositeEvalCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalCreateRequest(val *CompositeEvalCreateRequest) *NullableCompositeEvalCreateRequest { + return &NullableCompositeEvalCreateRequest{value: val, isSet: true} +} + +func (v NullableCompositeEvalCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_create_response.go b/go/futureagi/model_composite_eval_create_response.go new file mode 100644 index 0000000..4bc5b9f --- /dev/null +++ b/go/futureagi/model_composite_eval_create_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalCreateResponse{} + +// CompositeEvalCreateResponse struct for CompositeEvalCreateResponse +type CompositeEvalCreateResponse struct { + Status bool `json:"status"` + Result CompositeEvalCreateResponseResult `json:"result"` +} + +type _CompositeEvalCreateResponse CompositeEvalCreateResponse + +// NewCompositeEvalCreateResponse instantiates a new CompositeEvalCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalCreateResponse(status bool, result CompositeEvalCreateResponseResult) *CompositeEvalCreateResponse { + this := CompositeEvalCreateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompositeEvalCreateResponseWithDefaults instantiates a new CompositeEvalCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalCreateResponseWithDefaults() *CompositeEvalCreateResponse { + this := CompositeEvalCreateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompositeEvalCreateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompositeEvalCreateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompositeEvalCreateResponse) GetResult() CompositeEvalCreateResponseResult { + if o == nil { + var ret CompositeEvalCreateResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponse) GetResultOk() (*CompositeEvalCreateResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompositeEvalCreateResponse) SetResult(v CompositeEvalCreateResponseResult) { + o.Result = v +} + +func (o CompositeEvalCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompositeEvalCreateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalCreateResponse := _CompositeEvalCreateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalCreateResponse) + + if err != nil { + return err + } + + *o = CompositeEvalCreateResponse(varCompositeEvalCreateResponse) + + return err +} + +type NullableCompositeEvalCreateResponse struct { + value *CompositeEvalCreateResponse + isSet bool +} + +func (v NullableCompositeEvalCreateResponse) Get() *CompositeEvalCreateResponse { + return v.value +} + +func (v *NullableCompositeEvalCreateResponse) Set(val *CompositeEvalCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalCreateResponse(val *CompositeEvalCreateResponse) *NullableCompositeEvalCreateResponse { + return &NullableCompositeEvalCreateResponse{value: val, isSet: true} +} + +func (v NullableCompositeEvalCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_create_response_result.go b/go/futureagi/model_composite_eval_create_response_result.go new file mode 100644 index 0000000..d2ec807 --- /dev/null +++ b/go/futureagi/model_composite_eval_create_response_result.go @@ -0,0 +1,341 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalCreateResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalCreateResponseResult{} + +// CompositeEvalCreateResponseResult struct for CompositeEvalCreateResponseResult +type CompositeEvalCreateResponseResult struct { + Id string `json:"id"` + Name string `json:"name"` + TemplateType *string `json:"template_type,omitempty"` + AggregationEnabled bool `json:"aggregation_enabled"` + AggregationFunction string `json:"aggregation_function"` + CompositeChildAxis *string `json:"composite_child_axis,omitempty"` + Children []CompositeChildItem `json:"children"` +} + +type _CompositeEvalCreateResponseResult CompositeEvalCreateResponseResult + +// NewCompositeEvalCreateResponseResult instantiates a new CompositeEvalCreateResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalCreateResponseResult(id string, name string, aggregationEnabled bool, aggregationFunction string, children []CompositeChildItem) *CompositeEvalCreateResponseResult { + this := CompositeEvalCreateResponseResult{} + this.Id = id + this.Name = name + this.AggregationEnabled = aggregationEnabled + this.AggregationFunction = aggregationFunction + this.Children = children + return &this +} + +// NewCompositeEvalCreateResponseResultWithDefaults instantiates a new CompositeEvalCreateResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalCreateResponseResultWithDefaults() *CompositeEvalCreateResponseResult { + this := CompositeEvalCreateResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *CompositeEvalCreateResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CompositeEvalCreateResponseResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CompositeEvalCreateResponseResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponseResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompositeEvalCreateResponseResult) SetName(v string) { + o.Name = v +} + +// GetTemplateType returns the TemplateType field value if set, zero value otherwise. +func (o *CompositeEvalCreateResponseResult) GetTemplateType() string { + if o == nil || IsNil(o.TemplateType) { + var ret string + return ret + } + return *o.TemplateType +} + +// GetTemplateTypeOk returns a tuple with the TemplateType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponseResult) GetTemplateTypeOk() (*string, bool) { + if o == nil || IsNil(o.TemplateType) { + return nil, false + } + return o.TemplateType, true +} + +// HasTemplateType returns a boolean if a field has been set. +func (o *CompositeEvalCreateResponseResult) HasTemplateType() bool { + if o != nil && !IsNil(o.TemplateType) { + return true + } + + return false +} + +// SetTemplateType gets a reference to the given string and assigns it to the TemplateType field. +func (o *CompositeEvalCreateResponseResult) SetTemplateType(v string) { + o.TemplateType = &v +} + +// GetAggregationEnabled returns the AggregationEnabled field value +func (o *CompositeEvalCreateResponseResult) GetAggregationEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.AggregationEnabled +} + +// GetAggregationEnabledOk returns a tuple with the AggregationEnabled field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponseResult) GetAggregationEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AggregationEnabled, true +} + +// SetAggregationEnabled sets field value +func (o *CompositeEvalCreateResponseResult) SetAggregationEnabled(v bool) { + o.AggregationEnabled = v +} + +// GetAggregationFunction returns the AggregationFunction field value +func (o *CompositeEvalCreateResponseResult) GetAggregationFunction() string { + if o == nil { + var ret string + return ret + } + + return o.AggregationFunction +} + +// GetAggregationFunctionOk returns a tuple with the AggregationFunction field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponseResult) GetAggregationFunctionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AggregationFunction, true +} + +// SetAggregationFunction sets field value +func (o *CompositeEvalCreateResponseResult) SetAggregationFunction(v string) { + o.AggregationFunction = v +} + +// GetCompositeChildAxis returns the CompositeChildAxis field value if set, zero value otherwise. +func (o *CompositeEvalCreateResponseResult) GetCompositeChildAxis() string { + if o == nil || IsNil(o.CompositeChildAxis) { + var ret string + return ret + } + return *o.CompositeChildAxis +} + +// GetCompositeChildAxisOk returns a tuple with the CompositeChildAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponseResult) GetCompositeChildAxisOk() (*string, bool) { + if o == nil || IsNil(o.CompositeChildAxis) { + return nil, false + } + return o.CompositeChildAxis, true +} + +// HasCompositeChildAxis returns a boolean if a field has been set. +func (o *CompositeEvalCreateResponseResult) HasCompositeChildAxis() bool { + if o != nil && !IsNil(o.CompositeChildAxis) { + return true + } + + return false +} + +// SetCompositeChildAxis gets a reference to the given string and assigns it to the CompositeChildAxis field. +func (o *CompositeEvalCreateResponseResult) SetCompositeChildAxis(v string) { + o.CompositeChildAxis = &v +} + +// GetChildren returns the Children field value +func (o *CompositeEvalCreateResponseResult) GetChildren() []CompositeChildItem { + if o == nil { + var ret []CompositeChildItem + return ret + } + + return o.Children +} + +// GetChildrenOk returns a tuple with the Children field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalCreateResponseResult) GetChildrenOk() ([]CompositeChildItem, bool) { + if o == nil { + return nil, false + } + return o.Children, true +} + +// SetChildren sets field value +func (o *CompositeEvalCreateResponseResult) SetChildren(v []CompositeChildItem) { + o.Children = v +} + +func (o CompositeEvalCreateResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalCreateResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.TemplateType) { + toSerialize["template_type"] = o.TemplateType + } + toSerialize["aggregation_enabled"] = o.AggregationEnabled + toSerialize["aggregation_function"] = o.AggregationFunction + if !IsNil(o.CompositeChildAxis) { + toSerialize["composite_child_axis"] = o.CompositeChildAxis + } + toSerialize["children"] = o.Children + return toSerialize, nil +} + +func (o *CompositeEvalCreateResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "aggregation_enabled", + "aggregation_function", + "children", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalCreateResponseResult := _CompositeEvalCreateResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalCreateResponseResult) + + if err != nil { + return err + } + + *o = CompositeEvalCreateResponseResult(varCompositeEvalCreateResponseResult) + + return err +} + +type NullableCompositeEvalCreateResponseResult struct { + value *CompositeEvalCreateResponseResult + isSet bool +} + +func (v NullableCompositeEvalCreateResponseResult) Get() *CompositeEvalCreateResponseResult { + return v.value +} + +func (v *NullableCompositeEvalCreateResponseResult) Set(val *CompositeEvalCreateResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalCreateResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalCreateResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalCreateResponseResult(val *CompositeEvalCreateResponseResult) *NullableCompositeEvalCreateResponseResult { + return &NullableCompositeEvalCreateResponseResult{value: val, isSet: true} +} + +func (v NullableCompositeEvalCreateResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalCreateResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_detail_response.go b/go/futureagi/model_composite_eval_detail_response.go new file mode 100644 index 0000000..85b6462 --- /dev/null +++ b/go/futureagi/model_composite_eval_detail_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalDetailResponse{} + +// CompositeEvalDetailResponse struct for CompositeEvalDetailResponse +type CompositeEvalDetailResponse struct { + Status bool `json:"status"` + Result CompositeEvalDetailResponseResult `json:"result"` +} + +type _CompositeEvalDetailResponse CompositeEvalDetailResponse + +// NewCompositeEvalDetailResponse instantiates a new CompositeEvalDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalDetailResponse(status bool, result CompositeEvalDetailResponseResult) *CompositeEvalDetailResponse { + this := CompositeEvalDetailResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompositeEvalDetailResponseWithDefaults instantiates a new CompositeEvalDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalDetailResponseWithDefaults() *CompositeEvalDetailResponse { + this := CompositeEvalDetailResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompositeEvalDetailResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompositeEvalDetailResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompositeEvalDetailResponse) GetResult() CompositeEvalDetailResponseResult { + if o == nil { + var ret CompositeEvalDetailResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponse) GetResultOk() (*CompositeEvalDetailResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompositeEvalDetailResponse) SetResult(v CompositeEvalDetailResponseResult) { + o.Result = v +} + +func (o CompositeEvalDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompositeEvalDetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalDetailResponse := _CompositeEvalDetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalDetailResponse) + + if err != nil { + return err + } + + *o = CompositeEvalDetailResponse(varCompositeEvalDetailResponse) + + return err +} + +type NullableCompositeEvalDetailResponse struct { + value *CompositeEvalDetailResponse + isSet bool +} + +func (v NullableCompositeEvalDetailResponse) Get() *CompositeEvalDetailResponse { + return v.value +} + +func (v *NullableCompositeEvalDetailResponse) Set(val *CompositeEvalDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalDetailResponse(val *CompositeEvalDetailResponse) *NullableCompositeEvalDetailResponse { + return &NullableCompositeEvalDetailResponse{value: val, isSet: true} +} + +func (v NullableCompositeEvalDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_detail_response_result.go b/go/futureagi/model_composite_eval_detail_response_result.go new file mode 100644 index 0000000..e7cbf92 --- /dev/null +++ b/go/futureagi/model_composite_eval_detail_response_result.go @@ -0,0 +1,543 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalDetailResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalDetailResponseResult{} + +// CompositeEvalDetailResponseResult struct for CompositeEvalDetailResponseResult +type CompositeEvalDetailResponseResult struct { + Id string `json:"id"` + Name string `json:"name"` + TemplateType *string `json:"template_type,omitempty"` + AggregationEnabled bool `json:"aggregation_enabled"` + AggregationFunction string `json:"aggregation_function"` + CompositeChildAxis *string `json:"composite_child_axis,omitempty"` + Children []CompositeChildItem `json:"children"` + Description NullableString `json:"description,omitempty"` + Tags []string `json:"tags,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + VersionNumber NullableInt32 `json:"version_number,omitempty"` +} + +type _CompositeEvalDetailResponseResult CompositeEvalDetailResponseResult + +// NewCompositeEvalDetailResponseResult instantiates a new CompositeEvalDetailResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalDetailResponseResult(id string, name string, aggregationEnabled bool, aggregationFunction string, children []CompositeChildItem) *CompositeEvalDetailResponseResult { + this := CompositeEvalDetailResponseResult{} + this.Id = id + this.Name = name + this.AggregationEnabled = aggregationEnabled + this.AggregationFunction = aggregationFunction + this.Children = children + return &this +} + +// NewCompositeEvalDetailResponseResultWithDefaults instantiates a new CompositeEvalDetailResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalDetailResponseResultWithDefaults() *CompositeEvalDetailResponseResult { + this := CompositeEvalDetailResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *CompositeEvalDetailResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CompositeEvalDetailResponseResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CompositeEvalDetailResponseResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CompositeEvalDetailResponseResult) SetName(v string) { + o.Name = v +} + +// GetTemplateType returns the TemplateType field value if set, zero value otherwise. +func (o *CompositeEvalDetailResponseResult) GetTemplateType() string { + if o == nil || IsNil(o.TemplateType) { + var ret string + return ret + } + return *o.TemplateType +} + +// GetTemplateTypeOk returns a tuple with the TemplateType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetTemplateTypeOk() (*string, bool) { + if o == nil || IsNil(o.TemplateType) { + return nil, false + } + return o.TemplateType, true +} + +// HasTemplateType returns a boolean if a field has been set. +func (o *CompositeEvalDetailResponseResult) HasTemplateType() bool { + if o != nil && !IsNil(o.TemplateType) { + return true + } + + return false +} + +// SetTemplateType gets a reference to the given string and assigns it to the TemplateType field. +func (o *CompositeEvalDetailResponseResult) SetTemplateType(v string) { + o.TemplateType = &v +} + +// GetAggregationEnabled returns the AggregationEnabled field value +func (o *CompositeEvalDetailResponseResult) GetAggregationEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.AggregationEnabled +} + +// GetAggregationEnabledOk returns a tuple with the AggregationEnabled field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetAggregationEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AggregationEnabled, true +} + +// SetAggregationEnabled sets field value +func (o *CompositeEvalDetailResponseResult) SetAggregationEnabled(v bool) { + o.AggregationEnabled = v +} + +// GetAggregationFunction returns the AggregationFunction field value +func (o *CompositeEvalDetailResponseResult) GetAggregationFunction() string { + if o == nil { + var ret string + return ret + } + + return o.AggregationFunction +} + +// GetAggregationFunctionOk returns a tuple with the AggregationFunction field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetAggregationFunctionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AggregationFunction, true +} + +// SetAggregationFunction sets field value +func (o *CompositeEvalDetailResponseResult) SetAggregationFunction(v string) { + o.AggregationFunction = v +} + +// GetCompositeChildAxis returns the CompositeChildAxis field value if set, zero value otherwise. +func (o *CompositeEvalDetailResponseResult) GetCompositeChildAxis() string { + if o == nil || IsNil(o.CompositeChildAxis) { + var ret string + return ret + } + return *o.CompositeChildAxis +} + +// GetCompositeChildAxisOk returns a tuple with the CompositeChildAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetCompositeChildAxisOk() (*string, bool) { + if o == nil || IsNil(o.CompositeChildAxis) { + return nil, false + } + return o.CompositeChildAxis, true +} + +// HasCompositeChildAxis returns a boolean if a field has been set. +func (o *CompositeEvalDetailResponseResult) HasCompositeChildAxis() bool { + if o != nil && !IsNil(o.CompositeChildAxis) { + return true + } + + return false +} + +// SetCompositeChildAxis gets a reference to the given string and assigns it to the CompositeChildAxis field. +func (o *CompositeEvalDetailResponseResult) SetCompositeChildAxis(v string) { + o.CompositeChildAxis = &v +} + +// GetChildren returns the Children field value +func (o *CompositeEvalDetailResponseResult) GetChildren() []CompositeChildItem { + if o == nil { + var ret []CompositeChildItem + return ret + } + + return o.Children +} + +// GetChildrenOk returns a tuple with the Children field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetChildrenOk() ([]CompositeChildItem, bool) { + if o == nil { + return nil, false + } + return o.Children, true +} + +// SetChildren sets field value +func (o *CompositeEvalDetailResponseResult) SetChildren(v []CompositeChildItem) { + o.Children = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalDetailResponseResult) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalDetailResponseResult) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CompositeEvalDetailResponseResult) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CompositeEvalDetailResponseResult) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CompositeEvalDetailResponseResult) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CompositeEvalDetailResponseResult) UnsetDescription() { + o.Description.Unset() +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *CompositeEvalDetailResponseResult) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *CompositeEvalDetailResponseResult) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *CompositeEvalDetailResponseResult) SetTags(v []string) { + o.Tags = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CompositeEvalDetailResponseResult) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CompositeEvalDetailResponseResult) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *CompositeEvalDetailResponseResult) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CompositeEvalDetailResponseResult) GetUpdatedAt() string { + if o == nil || IsNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalDetailResponseResult) GetUpdatedAtOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CompositeEvalDetailResponseResult) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *CompositeEvalDetailResponseResult) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetVersionNumber returns the VersionNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalDetailResponseResult) GetVersionNumber() int32 { + if o == nil || IsNil(o.VersionNumber.Get()) { + var ret int32 + return ret + } + return *o.VersionNumber.Get() +} + +// GetVersionNumberOk returns a tuple with the VersionNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalDetailResponseResult) GetVersionNumberOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.VersionNumber.Get(), o.VersionNumber.IsSet() +} + +// HasVersionNumber returns a boolean if a field has been set. +func (o *CompositeEvalDetailResponseResult) HasVersionNumber() bool { + if o != nil && o.VersionNumber.IsSet() { + return true + } + + return false +} + +// SetVersionNumber gets a reference to the given NullableInt32 and assigns it to the VersionNumber field. +func (o *CompositeEvalDetailResponseResult) SetVersionNumber(v int32) { + o.VersionNumber.Set(&v) +} + +// SetVersionNumberNil sets the value for VersionNumber to be an explicit nil +func (o *CompositeEvalDetailResponseResult) SetVersionNumberNil() { + o.VersionNumber.Set(nil) +} + +// UnsetVersionNumber ensures that no value is present for VersionNumber, not even an explicit nil +func (o *CompositeEvalDetailResponseResult) UnsetVersionNumber() { + o.VersionNumber.Unset() +} + +func (o CompositeEvalDetailResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalDetailResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.TemplateType) { + toSerialize["template_type"] = o.TemplateType + } + toSerialize["aggregation_enabled"] = o.AggregationEnabled + toSerialize["aggregation_function"] = o.AggregationFunction + if !IsNil(o.CompositeChildAxis) { + toSerialize["composite_child_axis"] = o.CompositeChildAxis + } + toSerialize["children"] = o.Children + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.VersionNumber.IsSet() { + toSerialize["version_number"] = o.VersionNumber.Get() + } + return toSerialize, nil +} + +func (o *CompositeEvalDetailResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "aggregation_enabled", + "aggregation_function", + "children", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalDetailResponseResult := _CompositeEvalDetailResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalDetailResponseResult) + + if err != nil { + return err + } + + *o = CompositeEvalDetailResponseResult(varCompositeEvalDetailResponseResult) + + return err +} + +type NullableCompositeEvalDetailResponseResult struct { + value *CompositeEvalDetailResponseResult + isSet bool +} + +func (v NullableCompositeEvalDetailResponseResult) Get() *CompositeEvalDetailResponseResult { + return v.value +} + +func (v *NullableCompositeEvalDetailResponseResult) Set(val *CompositeEvalDetailResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalDetailResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalDetailResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalDetailResponseResult(val *CompositeEvalDetailResponseResult) *NullableCompositeEvalDetailResponseResult { + return &NullableCompositeEvalDetailResponseResult{value: val, isSet: true} +} + +func (v NullableCompositeEvalDetailResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalDetailResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_execute_request.go b/go/futureagi/model_composite_eval_execute_request.go new file mode 100644 index 0000000..e9ea818 --- /dev/null +++ b/go/futureagi/model_composite_eval_execute_request.go @@ -0,0 +1,496 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalExecuteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalExecuteRequest{} + +// CompositeEvalExecuteRequest struct for CompositeEvalExecuteRequest +type CompositeEvalExecuteRequest struct { + Mapping map[string]interface{} `json:"mapping"` + Model NullableString `json:"model,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + InputDataTypes map[string]interface{} `json:"input_data_types,omitempty"` + SpanContext map[string]interface{} `json:"span_context,omitempty"` + TraceContext map[string]interface{} `json:"trace_context,omitempty"` + SessionContext map[string]interface{} `json:"session_context,omitempty"` + CallContext map[string]interface{} `json:"call_context,omitempty"` + RowContext map[string]interface{} `json:"row_context,omitempty"` +} + +type _CompositeEvalExecuteRequest CompositeEvalExecuteRequest + +// NewCompositeEvalExecuteRequest instantiates a new CompositeEvalExecuteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalExecuteRequest(mapping map[string]interface{}) *CompositeEvalExecuteRequest { + this := CompositeEvalExecuteRequest{} + this.Mapping = mapping + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// NewCompositeEvalExecuteRequestWithDefaults instantiates a new CompositeEvalExecuteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalExecuteRequestWithDefaults() *CompositeEvalExecuteRequest { + this := CompositeEvalExecuteRequest{} + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// GetMapping returns the Mapping field value +func (o *CompositeEvalExecuteRequest) GetMapping() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetMappingOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Mapping, true +} + +// SetMapping sets field value +func (o *CompositeEvalExecuteRequest) SetMapping(v map[string]interface{}) { + o.Mapping = v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalExecuteRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalExecuteRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *CompositeEvalExecuteRequest) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *CompositeEvalExecuteRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *CompositeEvalExecuteRequest) UnsetModel() { + o.Model.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *CompositeEvalExecuteRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *CompositeEvalExecuteRequest) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetInputDataTypes returns the InputDataTypes field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetInputDataTypes() map[string]interface{} { + if o == nil || IsNil(o.InputDataTypes) { + var ret map[string]interface{} + return ret + } + return o.InputDataTypes +} + +// GetInputDataTypesOk returns a tuple with the InputDataTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetInputDataTypesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InputDataTypes) { + return map[string]interface{}{}, false + } + return o.InputDataTypes, true +} + +// HasInputDataTypes returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasInputDataTypes() bool { + if o != nil && !IsNil(o.InputDataTypes) { + return true + } + + return false +} + +// SetInputDataTypes gets a reference to the given map[string]interface{} and assigns it to the InputDataTypes field. +func (o *CompositeEvalExecuteRequest) SetInputDataTypes(v map[string]interface{}) { + o.InputDataTypes = v +} + +// GetSpanContext returns the SpanContext field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetSpanContext() map[string]interface{} { + if o == nil || IsNil(o.SpanContext) { + var ret map[string]interface{} + return ret + } + return o.SpanContext +} + +// GetSpanContextOk returns a tuple with the SpanContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetSpanContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.SpanContext) { + return map[string]interface{}{}, false + } + return o.SpanContext, true +} + +// HasSpanContext returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasSpanContext() bool { + if o != nil && !IsNil(o.SpanContext) { + return true + } + + return false +} + +// SetSpanContext gets a reference to the given map[string]interface{} and assigns it to the SpanContext field. +func (o *CompositeEvalExecuteRequest) SetSpanContext(v map[string]interface{}) { + o.SpanContext = v +} + +// GetTraceContext returns the TraceContext field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetTraceContext() map[string]interface{} { + if o == nil || IsNil(o.TraceContext) { + var ret map[string]interface{} + return ret + } + return o.TraceContext +} + +// GetTraceContextOk returns a tuple with the TraceContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetTraceContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.TraceContext) { + return map[string]interface{}{}, false + } + return o.TraceContext, true +} + +// HasTraceContext returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasTraceContext() bool { + if o != nil && !IsNil(o.TraceContext) { + return true + } + + return false +} + +// SetTraceContext gets a reference to the given map[string]interface{} and assigns it to the TraceContext field. +func (o *CompositeEvalExecuteRequest) SetTraceContext(v map[string]interface{}) { + o.TraceContext = v +} + +// GetSessionContext returns the SessionContext field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetSessionContext() map[string]interface{} { + if o == nil || IsNil(o.SessionContext) { + var ret map[string]interface{} + return ret + } + return o.SessionContext +} + +// GetSessionContextOk returns a tuple with the SessionContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetSessionContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.SessionContext) { + return map[string]interface{}{}, false + } + return o.SessionContext, true +} + +// HasSessionContext returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasSessionContext() bool { + if o != nil && !IsNil(o.SessionContext) { + return true + } + + return false +} + +// SetSessionContext gets a reference to the given map[string]interface{} and assigns it to the SessionContext field. +func (o *CompositeEvalExecuteRequest) SetSessionContext(v map[string]interface{}) { + o.SessionContext = v +} + +// GetCallContext returns the CallContext field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetCallContext() map[string]interface{} { + if o == nil || IsNil(o.CallContext) { + var ret map[string]interface{} + return ret + } + return o.CallContext +} + +// GetCallContextOk returns a tuple with the CallContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetCallContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CallContext) { + return map[string]interface{}{}, false + } + return o.CallContext, true +} + +// HasCallContext returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasCallContext() bool { + if o != nil && !IsNil(o.CallContext) { + return true + } + + return false +} + +// SetCallContext gets a reference to the given map[string]interface{} and assigns it to the CallContext field. +func (o *CompositeEvalExecuteRequest) SetCallContext(v map[string]interface{}) { + o.CallContext = v +} + +// GetRowContext returns the RowContext field value if set, zero value otherwise. +func (o *CompositeEvalExecuteRequest) GetRowContext() map[string]interface{} { + if o == nil || IsNil(o.RowContext) { + var ret map[string]interface{} + return ret + } + return o.RowContext +} + +// GetRowContextOk returns a tuple with the RowContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteRequest) GetRowContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RowContext) { + return map[string]interface{}{}, false + } + return o.RowContext, true +} + +// HasRowContext returns a boolean if a field has been set. +func (o *CompositeEvalExecuteRequest) HasRowContext() bool { + if o != nil && !IsNil(o.RowContext) { + return true + } + + return false +} + +// SetRowContext gets a reference to the given map[string]interface{} and assigns it to the RowContext field. +func (o *CompositeEvalExecuteRequest) SetRowContext(v map[string]interface{}) { + o.RowContext = v +} + +func (o CompositeEvalExecuteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalExecuteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["mapping"] = o.Mapping + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if !IsNil(o.InputDataTypes) { + toSerialize["input_data_types"] = o.InputDataTypes + } + if !IsNil(o.SpanContext) { + toSerialize["span_context"] = o.SpanContext + } + if !IsNil(o.TraceContext) { + toSerialize["trace_context"] = o.TraceContext + } + if !IsNil(o.SessionContext) { + toSerialize["session_context"] = o.SessionContext + } + if !IsNil(o.CallContext) { + toSerialize["call_context"] = o.CallContext + } + if !IsNil(o.RowContext) { + toSerialize["row_context"] = o.RowContext + } + return toSerialize, nil +} + +func (o *CompositeEvalExecuteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "mapping", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalExecuteRequest := _CompositeEvalExecuteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalExecuteRequest) + + if err != nil { + return err + } + + *o = CompositeEvalExecuteRequest(varCompositeEvalExecuteRequest) + + return err +} + +type NullableCompositeEvalExecuteRequest struct { + value *CompositeEvalExecuteRequest + isSet bool +} + +func (v NullableCompositeEvalExecuteRequest) Get() *CompositeEvalExecuteRequest { + return v.value +} + +func (v *NullableCompositeEvalExecuteRequest) Set(val *CompositeEvalExecuteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalExecuteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalExecuteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalExecuteRequest(val *CompositeEvalExecuteRequest) *NullableCompositeEvalExecuteRequest { + return &NullableCompositeEvalExecuteRequest{value: val, isSet: true} +} + +func (v NullableCompositeEvalExecuteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalExecuteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_execute_response.go b/go/futureagi/model_composite_eval_execute_response.go new file mode 100644 index 0000000..9220fc2 --- /dev/null +++ b/go/futureagi/model_composite_eval_execute_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalExecuteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalExecuteResponse{} + +// CompositeEvalExecuteResponse struct for CompositeEvalExecuteResponse +type CompositeEvalExecuteResponse struct { + Status bool `json:"status"` + Result CompositeEvalExecuteResponseResult `json:"result"` +} + +type _CompositeEvalExecuteResponse CompositeEvalExecuteResponse + +// NewCompositeEvalExecuteResponse instantiates a new CompositeEvalExecuteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalExecuteResponse(status bool, result CompositeEvalExecuteResponseResult) *CompositeEvalExecuteResponse { + this := CompositeEvalExecuteResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewCompositeEvalExecuteResponseWithDefaults instantiates a new CompositeEvalExecuteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalExecuteResponseWithDefaults() *CompositeEvalExecuteResponse { + this := CompositeEvalExecuteResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *CompositeEvalExecuteResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CompositeEvalExecuteResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *CompositeEvalExecuteResponse) GetResult() CompositeEvalExecuteResponseResult { + if o == nil { + var ret CompositeEvalExecuteResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponse) GetResultOk() (*CompositeEvalExecuteResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CompositeEvalExecuteResponse) SetResult(v CompositeEvalExecuteResponseResult) { + o.Result = v +} + +func (o CompositeEvalExecuteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalExecuteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CompositeEvalExecuteResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalExecuteResponse := _CompositeEvalExecuteResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalExecuteResponse) + + if err != nil { + return err + } + + *o = CompositeEvalExecuteResponse(varCompositeEvalExecuteResponse) + + return err +} + +type NullableCompositeEvalExecuteResponse struct { + value *CompositeEvalExecuteResponse + isSet bool +} + +func (v NullableCompositeEvalExecuteResponse) Get() *CompositeEvalExecuteResponse { + return v.value +} + +func (v *NullableCompositeEvalExecuteResponse) Set(val *CompositeEvalExecuteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalExecuteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalExecuteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalExecuteResponse(val *CompositeEvalExecuteResponse) *NullableCompositeEvalExecuteResponse { + return &NullableCompositeEvalExecuteResponse{value: val, isSet: true} +} + +func (v NullableCompositeEvalExecuteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalExecuteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_execute_response_result.go b/go/futureagi/model_composite_eval_execute_response_result.go new file mode 100644 index 0000000..bf833a0 --- /dev/null +++ b/go/futureagi/model_composite_eval_execute_response_result.go @@ -0,0 +1,615 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CompositeEvalExecuteResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalExecuteResponseResult{} + +// CompositeEvalExecuteResponseResult struct for CompositeEvalExecuteResponseResult +type CompositeEvalExecuteResponseResult struct { + CompositeId NullableString `json:"composite_id,omitempty"` + CompositeName string `json:"composite_name"` + AggregationEnabled bool `json:"aggregation_enabled"` + AggregationFunction NullableString `json:"aggregation_function,omitempty"` + AggregateScore NullableFloat32 `json:"aggregate_score,omitempty"` + AggregatePass NullableBool `json:"aggregate_pass,omitempty"` + Children []CompositeChildResult `json:"children"` + Summary NullableString `json:"summary,omitempty"` + ErrorLocalizerResults map[string]interface{} `json:"error_localizer_results,omitempty"` + TotalChildren int32 `json:"total_children"` + CompletedChildren int32 `json:"completed_children"` + FailedChildren int32 `json:"failed_children"` + EvaluationId NullableString `json:"evaluation_id,omitempty"` +} + +type _CompositeEvalExecuteResponseResult CompositeEvalExecuteResponseResult + +// NewCompositeEvalExecuteResponseResult instantiates a new CompositeEvalExecuteResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalExecuteResponseResult(compositeName string, aggregationEnabled bool, children []CompositeChildResult, totalChildren int32, completedChildren int32, failedChildren int32) *CompositeEvalExecuteResponseResult { + this := CompositeEvalExecuteResponseResult{} + this.CompositeName = compositeName + this.AggregationEnabled = aggregationEnabled + this.Children = children + this.TotalChildren = totalChildren + this.CompletedChildren = completedChildren + this.FailedChildren = failedChildren + return &this +} + +// NewCompositeEvalExecuteResponseResultWithDefaults instantiates a new CompositeEvalExecuteResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalExecuteResponseResultWithDefaults() *CompositeEvalExecuteResponseResult { + this := CompositeEvalExecuteResponseResult{} + return &this +} + +// GetCompositeId returns the CompositeId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalExecuteResponseResult) GetCompositeId() string { + if o == nil || IsNil(o.CompositeId.Get()) { + var ret string + return ret + } + return *o.CompositeId.Get() +} + +// GetCompositeIdOk returns a tuple with the CompositeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalExecuteResponseResult) GetCompositeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CompositeId.Get(), o.CompositeId.IsSet() +} + +// HasCompositeId returns a boolean if a field has been set. +func (o *CompositeEvalExecuteResponseResult) HasCompositeId() bool { + if o != nil && o.CompositeId.IsSet() { + return true + } + + return false +} + +// SetCompositeId gets a reference to the given NullableString and assigns it to the CompositeId field. +func (o *CompositeEvalExecuteResponseResult) SetCompositeId(v string) { + o.CompositeId.Set(&v) +} + +// SetCompositeIdNil sets the value for CompositeId to be an explicit nil +func (o *CompositeEvalExecuteResponseResult) SetCompositeIdNil() { + o.CompositeId.Set(nil) +} + +// UnsetCompositeId ensures that no value is present for CompositeId, not even an explicit nil +func (o *CompositeEvalExecuteResponseResult) UnsetCompositeId() { + o.CompositeId.Unset() +} + +// GetCompositeName returns the CompositeName field value +func (o *CompositeEvalExecuteResponseResult) GetCompositeName() string { + if o == nil { + var ret string + return ret + } + + return o.CompositeName +} + +// GetCompositeNameOk returns a tuple with the CompositeName field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponseResult) GetCompositeNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CompositeName, true +} + +// SetCompositeName sets field value +func (o *CompositeEvalExecuteResponseResult) SetCompositeName(v string) { + o.CompositeName = v +} + +// GetAggregationEnabled returns the AggregationEnabled field value +func (o *CompositeEvalExecuteResponseResult) GetAggregationEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.AggregationEnabled +} + +// GetAggregationEnabledOk returns a tuple with the AggregationEnabled field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponseResult) GetAggregationEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AggregationEnabled, true +} + +// SetAggregationEnabled sets field value +func (o *CompositeEvalExecuteResponseResult) SetAggregationEnabled(v bool) { + o.AggregationEnabled = v +} + +// GetAggregationFunction returns the AggregationFunction field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalExecuteResponseResult) GetAggregationFunction() string { + if o == nil || IsNil(o.AggregationFunction.Get()) { + var ret string + return ret + } + return *o.AggregationFunction.Get() +} + +// GetAggregationFunctionOk returns a tuple with the AggregationFunction field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalExecuteResponseResult) GetAggregationFunctionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AggregationFunction.Get(), o.AggregationFunction.IsSet() +} + +// HasAggregationFunction returns a boolean if a field has been set. +func (o *CompositeEvalExecuteResponseResult) HasAggregationFunction() bool { + if o != nil && o.AggregationFunction.IsSet() { + return true + } + + return false +} + +// SetAggregationFunction gets a reference to the given NullableString and assigns it to the AggregationFunction field. +func (o *CompositeEvalExecuteResponseResult) SetAggregationFunction(v string) { + o.AggregationFunction.Set(&v) +} + +// SetAggregationFunctionNil sets the value for AggregationFunction to be an explicit nil +func (o *CompositeEvalExecuteResponseResult) SetAggregationFunctionNil() { + o.AggregationFunction.Set(nil) +} + +// UnsetAggregationFunction ensures that no value is present for AggregationFunction, not even an explicit nil +func (o *CompositeEvalExecuteResponseResult) UnsetAggregationFunction() { + o.AggregationFunction.Unset() +} + +// GetAggregateScore returns the AggregateScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalExecuteResponseResult) GetAggregateScore() float32 { + if o == nil || IsNil(o.AggregateScore.Get()) { + var ret float32 + return ret + } + return *o.AggregateScore.Get() +} + +// GetAggregateScoreOk returns a tuple with the AggregateScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalExecuteResponseResult) GetAggregateScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AggregateScore.Get(), o.AggregateScore.IsSet() +} + +// HasAggregateScore returns a boolean if a field has been set. +func (o *CompositeEvalExecuteResponseResult) HasAggregateScore() bool { + if o != nil && o.AggregateScore.IsSet() { + return true + } + + return false +} + +// SetAggregateScore gets a reference to the given NullableFloat32 and assigns it to the AggregateScore field. +func (o *CompositeEvalExecuteResponseResult) SetAggregateScore(v float32) { + o.AggregateScore.Set(&v) +} + +// SetAggregateScoreNil sets the value for AggregateScore to be an explicit nil +func (o *CompositeEvalExecuteResponseResult) SetAggregateScoreNil() { + o.AggregateScore.Set(nil) +} + +// UnsetAggregateScore ensures that no value is present for AggregateScore, not even an explicit nil +func (o *CompositeEvalExecuteResponseResult) UnsetAggregateScore() { + o.AggregateScore.Unset() +} + +// GetAggregatePass returns the AggregatePass field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalExecuteResponseResult) GetAggregatePass() bool { + if o == nil || IsNil(o.AggregatePass.Get()) { + var ret bool + return ret + } + return *o.AggregatePass.Get() +} + +// GetAggregatePassOk returns a tuple with the AggregatePass field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalExecuteResponseResult) GetAggregatePassOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.AggregatePass.Get(), o.AggregatePass.IsSet() +} + +// HasAggregatePass returns a boolean if a field has been set. +func (o *CompositeEvalExecuteResponseResult) HasAggregatePass() bool { + if o != nil && o.AggregatePass.IsSet() { + return true + } + + return false +} + +// SetAggregatePass gets a reference to the given NullableBool and assigns it to the AggregatePass field. +func (o *CompositeEvalExecuteResponseResult) SetAggregatePass(v bool) { + o.AggregatePass.Set(&v) +} + +// SetAggregatePassNil sets the value for AggregatePass to be an explicit nil +func (o *CompositeEvalExecuteResponseResult) SetAggregatePassNil() { + o.AggregatePass.Set(nil) +} + +// UnsetAggregatePass ensures that no value is present for AggregatePass, not even an explicit nil +func (o *CompositeEvalExecuteResponseResult) UnsetAggregatePass() { + o.AggregatePass.Unset() +} + +// GetChildren returns the Children field value +func (o *CompositeEvalExecuteResponseResult) GetChildren() []CompositeChildResult { + if o == nil { + var ret []CompositeChildResult + return ret + } + + return o.Children +} + +// GetChildrenOk returns a tuple with the Children field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponseResult) GetChildrenOk() ([]CompositeChildResult, bool) { + if o == nil { + return nil, false + } + return o.Children, true +} + +// SetChildren sets field value +func (o *CompositeEvalExecuteResponseResult) SetChildren(v []CompositeChildResult) { + o.Children = v +} + +// GetSummary returns the Summary field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalExecuteResponseResult) GetSummary() string { + if o == nil || IsNil(o.Summary.Get()) { + var ret string + return ret + } + return *o.Summary.Get() +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalExecuteResponseResult) GetSummaryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Summary.Get(), o.Summary.IsSet() +} + +// HasSummary returns a boolean if a field has been set. +func (o *CompositeEvalExecuteResponseResult) HasSummary() bool { + if o != nil && o.Summary.IsSet() { + return true + } + + return false +} + +// SetSummary gets a reference to the given NullableString and assigns it to the Summary field. +func (o *CompositeEvalExecuteResponseResult) SetSummary(v string) { + o.Summary.Set(&v) +} + +// SetSummaryNil sets the value for Summary to be an explicit nil +func (o *CompositeEvalExecuteResponseResult) SetSummaryNil() { + o.Summary.Set(nil) +} + +// UnsetSummary ensures that no value is present for Summary, not even an explicit nil +func (o *CompositeEvalExecuteResponseResult) UnsetSummary() { + o.Summary.Unset() +} + +// GetErrorLocalizerResults returns the ErrorLocalizerResults field value if set, zero value otherwise. +func (o *CompositeEvalExecuteResponseResult) GetErrorLocalizerResults() map[string]interface{} { + if o == nil || IsNil(o.ErrorLocalizerResults) { + var ret map[string]interface{} + return ret + } + return o.ErrorLocalizerResults +} + +// GetErrorLocalizerResultsOk returns a tuple with the ErrorLocalizerResults field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponseResult) GetErrorLocalizerResultsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ErrorLocalizerResults) { + return map[string]interface{}{}, false + } + return o.ErrorLocalizerResults, true +} + +// HasErrorLocalizerResults returns a boolean if a field has been set. +func (o *CompositeEvalExecuteResponseResult) HasErrorLocalizerResults() bool { + if o != nil && !IsNil(o.ErrorLocalizerResults) { + return true + } + + return false +} + +// SetErrorLocalizerResults gets a reference to the given map[string]interface{} and assigns it to the ErrorLocalizerResults field. +func (o *CompositeEvalExecuteResponseResult) SetErrorLocalizerResults(v map[string]interface{}) { + o.ErrorLocalizerResults = v +} + +// GetTotalChildren returns the TotalChildren field value +func (o *CompositeEvalExecuteResponseResult) GetTotalChildren() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalChildren +} + +// GetTotalChildrenOk returns a tuple with the TotalChildren field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponseResult) GetTotalChildrenOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalChildren, true +} + +// SetTotalChildren sets field value +func (o *CompositeEvalExecuteResponseResult) SetTotalChildren(v int32) { + o.TotalChildren = v +} + +// GetCompletedChildren returns the CompletedChildren field value +func (o *CompositeEvalExecuteResponseResult) GetCompletedChildren() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CompletedChildren +} + +// GetCompletedChildrenOk returns a tuple with the CompletedChildren field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponseResult) GetCompletedChildrenOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CompletedChildren, true +} + +// SetCompletedChildren sets field value +func (o *CompositeEvalExecuteResponseResult) SetCompletedChildren(v int32) { + o.CompletedChildren = v +} + +// GetFailedChildren returns the FailedChildren field value +func (o *CompositeEvalExecuteResponseResult) GetFailedChildren() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FailedChildren +} + +// GetFailedChildrenOk returns a tuple with the FailedChildren field value +// and a boolean to check if the value has been set. +func (o *CompositeEvalExecuteResponseResult) GetFailedChildrenOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FailedChildren, true +} + +// SetFailedChildren sets field value +func (o *CompositeEvalExecuteResponseResult) SetFailedChildren(v int32) { + o.FailedChildren = v +} + +// GetEvaluationId returns the EvaluationId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalExecuteResponseResult) GetEvaluationId() string { + if o == nil || IsNil(o.EvaluationId.Get()) { + var ret string + return ret + } + return *o.EvaluationId.Get() +} + +// GetEvaluationIdOk returns a tuple with the EvaluationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalExecuteResponseResult) GetEvaluationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvaluationId.Get(), o.EvaluationId.IsSet() +} + +// HasEvaluationId returns a boolean if a field has been set. +func (o *CompositeEvalExecuteResponseResult) HasEvaluationId() bool { + if o != nil && o.EvaluationId.IsSet() { + return true + } + + return false +} + +// SetEvaluationId gets a reference to the given NullableString and assigns it to the EvaluationId field. +func (o *CompositeEvalExecuteResponseResult) SetEvaluationId(v string) { + o.EvaluationId.Set(&v) +} + +// SetEvaluationIdNil sets the value for EvaluationId to be an explicit nil +func (o *CompositeEvalExecuteResponseResult) SetEvaluationIdNil() { + o.EvaluationId.Set(nil) +} + +// UnsetEvaluationId ensures that no value is present for EvaluationId, not even an explicit nil +func (o *CompositeEvalExecuteResponseResult) UnsetEvaluationId() { + o.EvaluationId.Unset() +} + +func (o CompositeEvalExecuteResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalExecuteResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.CompositeId.IsSet() { + toSerialize["composite_id"] = o.CompositeId.Get() + } + toSerialize["composite_name"] = o.CompositeName + toSerialize["aggregation_enabled"] = o.AggregationEnabled + if o.AggregationFunction.IsSet() { + toSerialize["aggregation_function"] = o.AggregationFunction.Get() + } + if o.AggregateScore.IsSet() { + toSerialize["aggregate_score"] = o.AggregateScore.Get() + } + if o.AggregatePass.IsSet() { + toSerialize["aggregate_pass"] = o.AggregatePass.Get() + } + toSerialize["children"] = o.Children + if o.Summary.IsSet() { + toSerialize["summary"] = o.Summary.Get() + } + if !IsNil(o.ErrorLocalizerResults) { + toSerialize["error_localizer_results"] = o.ErrorLocalizerResults + } + toSerialize["total_children"] = o.TotalChildren + toSerialize["completed_children"] = o.CompletedChildren + toSerialize["failed_children"] = o.FailedChildren + if o.EvaluationId.IsSet() { + toSerialize["evaluation_id"] = o.EvaluationId.Get() + } + return toSerialize, nil +} + +func (o *CompositeEvalExecuteResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "composite_name", + "aggregation_enabled", + "children", + "total_children", + "completed_children", + "failed_children", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCompositeEvalExecuteResponseResult := _CompositeEvalExecuteResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCompositeEvalExecuteResponseResult) + + if err != nil { + return err + } + + *o = CompositeEvalExecuteResponseResult(varCompositeEvalExecuteResponseResult) + + return err +} + +type NullableCompositeEvalExecuteResponseResult struct { + value *CompositeEvalExecuteResponseResult + isSet bool +} + +func (v NullableCompositeEvalExecuteResponseResult) Get() *CompositeEvalExecuteResponseResult { + return v.value +} + +func (v *NullableCompositeEvalExecuteResponseResult) Set(val *CompositeEvalExecuteResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalExecuteResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalExecuteResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalExecuteResponseResult(val *CompositeEvalExecuteResponseResult) *NullableCompositeEvalExecuteResponseResult { + return &NullableCompositeEvalExecuteResponseResult{value: val, isSet: true} +} + +func (v NullableCompositeEvalExecuteResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalExecuteResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_composite_eval_update_request.go b/go/futureagi/model_composite_eval_update_request.go new file mode 100644 index 0000000..0c5b1b7 --- /dev/null +++ b/go/futureagi/model_composite_eval_update_request.go @@ -0,0 +1,434 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CompositeEvalUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompositeEvalUpdateRequest{} + +// CompositeEvalUpdateRequest struct for CompositeEvalUpdateRequest +type CompositeEvalUpdateRequest struct { + Name NullableString `json:"name,omitempty"` + Description NullableString `json:"description,omitempty"` + Tags []string `json:"tags,omitempty"` + AggregationEnabled NullableBool `json:"aggregation_enabled,omitempty"` + AggregationFunction NullableString `json:"aggregation_function,omitempty"` + ChildTemplateIds []string `json:"child_template_ids,omitempty"` + ChildWeights map[string]interface{} `json:"child_weights,omitempty"` + CompositeChildAxis NullableString `json:"composite_child_axis,omitempty"` +} + +// NewCompositeEvalUpdateRequest instantiates a new CompositeEvalUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompositeEvalUpdateRequest() *CompositeEvalUpdateRequest { + this := CompositeEvalUpdateRequest{} + return &this +} + +// NewCompositeEvalUpdateRequestWithDefaults instantiates a new CompositeEvalUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompositeEvalUpdateRequestWithDefaults() *CompositeEvalUpdateRequest { + this := CompositeEvalUpdateRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalUpdateRequest) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalUpdateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *CompositeEvalUpdateRequest) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *CompositeEvalUpdateRequest) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *CompositeEvalUpdateRequest) UnsetName() { + o.Name.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalUpdateRequest) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalUpdateRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CompositeEvalUpdateRequest) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CompositeEvalUpdateRequest) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CompositeEvalUpdateRequest) UnsetDescription() { + o.Description.Unset() +} + +// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalUpdateRequest) GetTags() []string { + if o == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalUpdateRequest) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *CompositeEvalUpdateRequest) SetTags(v []string) { + o.Tags = v +} + +// GetAggregationEnabled returns the AggregationEnabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalUpdateRequest) GetAggregationEnabled() bool { + if o == nil || IsNil(o.AggregationEnabled.Get()) { + var ret bool + return ret + } + return *o.AggregationEnabled.Get() +} + +// GetAggregationEnabledOk returns a tuple with the AggregationEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalUpdateRequest) GetAggregationEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.AggregationEnabled.Get(), o.AggregationEnabled.IsSet() +} + +// HasAggregationEnabled returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasAggregationEnabled() bool { + if o != nil && o.AggregationEnabled.IsSet() { + return true + } + + return false +} + +// SetAggregationEnabled gets a reference to the given NullableBool and assigns it to the AggregationEnabled field. +func (o *CompositeEvalUpdateRequest) SetAggregationEnabled(v bool) { + o.AggregationEnabled.Set(&v) +} + +// SetAggregationEnabledNil sets the value for AggregationEnabled to be an explicit nil +func (o *CompositeEvalUpdateRequest) SetAggregationEnabledNil() { + o.AggregationEnabled.Set(nil) +} + +// UnsetAggregationEnabled ensures that no value is present for AggregationEnabled, not even an explicit nil +func (o *CompositeEvalUpdateRequest) UnsetAggregationEnabled() { + o.AggregationEnabled.Unset() +} + +// GetAggregationFunction returns the AggregationFunction field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalUpdateRequest) GetAggregationFunction() string { + if o == nil || IsNil(o.AggregationFunction.Get()) { + var ret string + return ret + } + return *o.AggregationFunction.Get() +} + +// GetAggregationFunctionOk returns a tuple with the AggregationFunction field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalUpdateRequest) GetAggregationFunctionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AggregationFunction.Get(), o.AggregationFunction.IsSet() +} + +// HasAggregationFunction returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasAggregationFunction() bool { + if o != nil && o.AggregationFunction.IsSet() { + return true + } + + return false +} + +// SetAggregationFunction gets a reference to the given NullableString and assigns it to the AggregationFunction field. +func (o *CompositeEvalUpdateRequest) SetAggregationFunction(v string) { + o.AggregationFunction.Set(&v) +} + +// SetAggregationFunctionNil sets the value for AggregationFunction to be an explicit nil +func (o *CompositeEvalUpdateRequest) SetAggregationFunctionNil() { + o.AggregationFunction.Set(nil) +} + +// UnsetAggregationFunction ensures that no value is present for AggregationFunction, not even an explicit nil +func (o *CompositeEvalUpdateRequest) UnsetAggregationFunction() { + o.AggregationFunction.Unset() +} + +// GetChildTemplateIds returns the ChildTemplateIds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalUpdateRequest) GetChildTemplateIds() []string { + if o == nil { + var ret []string + return ret + } + return o.ChildTemplateIds +} + +// GetChildTemplateIdsOk returns a tuple with the ChildTemplateIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalUpdateRequest) GetChildTemplateIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ChildTemplateIds) { + return nil, false + } + return o.ChildTemplateIds, true +} + +// HasChildTemplateIds returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasChildTemplateIds() bool { + if o != nil && !IsNil(o.ChildTemplateIds) { + return true + } + + return false +} + +// SetChildTemplateIds gets a reference to the given []string and assigns it to the ChildTemplateIds field. +func (o *CompositeEvalUpdateRequest) SetChildTemplateIds(v []string) { + o.ChildTemplateIds = v +} + +// GetChildWeights returns the ChildWeights field value if set, zero value otherwise. +func (o *CompositeEvalUpdateRequest) GetChildWeights() map[string]interface{} { + if o == nil || IsNil(o.ChildWeights) { + var ret map[string]interface{} + return ret + } + return o.ChildWeights +} + +// GetChildWeightsOk returns a tuple with the ChildWeights field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompositeEvalUpdateRequest) GetChildWeightsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChildWeights) { + return map[string]interface{}{}, false + } + return o.ChildWeights, true +} + +// HasChildWeights returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasChildWeights() bool { + if o != nil && !IsNil(o.ChildWeights) { + return true + } + + return false +} + +// SetChildWeights gets a reference to the given map[string]interface{} and assigns it to the ChildWeights field. +func (o *CompositeEvalUpdateRequest) SetChildWeights(v map[string]interface{}) { + o.ChildWeights = v +} + +// GetCompositeChildAxis returns the CompositeChildAxis field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CompositeEvalUpdateRequest) GetCompositeChildAxis() string { + if o == nil || IsNil(o.CompositeChildAxis.Get()) { + var ret string + return ret + } + return *o.CompositeChildAxis.Get() +} + +// GetCompositeChildAxisOk returns a tuple with the CompositeChildAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CompositeEvalUpdateRequest) GetCompositeChildAxisOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CompositeChildAxis.Get(), o.CompositeChildAxis.IsSet() +} + +// HasCompositeChildAxis returns a boolean if a field has been set. +func (o *CompositeEvalUpdateRequest) HasCompositeChildAxis() bool { + if o != nil && o.CompositeChildAxis.IsSet() { + return true + } + + return false +} + +// SetCompositeChildAxis gets a reference to the given NullableString and assigns it to the CompositeChildAxis field. +func (o *CompositeEvalUpdateRequest) SetCompositeChildAxis(v string) { + o.CompositeChildAxis.Set(&v) +} + +// SetCompositeChildAxisNil sets the value for CompositeChildAxis to be an explicit nil +func (o *CompositeEvalUpdateRequest) SetCompositeChildAxisNil() { + o.CompositeChildAxis.Set(nil) +} + +// UnsetCompositeChildAxis ensures that no value is present for CompositeChildAxis, not even an explicit nil +func (o *CompositeEvalUpdateRequest) UnsetCompositeChildAxis() { + o.CompositeChildAxis.Unset() +} + +func (o CompositeEvalUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompositeEvalUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.AggregationEnabled.IsSet() { + toSerialize["aggregation_enabled"] = o.AggregationEnabled.Get() + } + if o.AggregationFunction.IsSet() { + toSerialize["aggregation_function"] = o.AggregationFunction.Get() + } + if o.ChildTemplateIds != nil { + toSerialize["child_template_ids"] = o.ChildTemplateIds + } + if !IsNil(o.ChildWeights) { + toSerialize["child_weights"] = o.ChildWeights + } + if o.CompositeChildAxis.IsSet() { + toSerialize["composite_child_axis"] = o.CompositeChildAxis.Get() + } + return toSerialize, nil +} + +type NullableCompositeEvalUpdateRequest struct { + value *CompositeEvalUpdateRequest + isSet bool +} + +func (v NullableCompositeEvalUpdateRequest) Get() *CompositeEvalUpdateRequest { + return v.value +} + +func (v *NullableCompositeEvalUpdateRequest) Set(val *CompositeEvalUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCompositeEvalUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCompositeEvalUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompositeEvalUpdateRequest(val *CompositeEvalUpdateRequest) *NullableCompositeEvalUpdateRequest { + return &NullableCompositeEvalUpdateRequest{value: val, isSet: true} +} + +func (v NullableCompositeEvalUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompositeEvalUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_conditional_column_request.go b/go/futureagi/model_conditional_column_request.go new file mode 100644 index 0000000..69c6809 --- /dev/null +++ b/go/futureagi/model_conditional_column_request.go @@ -0,0 +1,225 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ConditionalColumnRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConditionalColumnRequest{} + +// ConditionalColumnRequest struct for ConditionalColumnRequest +type ConditionalColumnRequest struct { + Config []map[string]interface{} `json:"config"` + NewColumnName string `json:"new_column_name"` + Concurrency *int32 `json:"concurrency,omitempty"` +} + +type _ConditionalColumnRequest ConditionalColumnRequest + +// NewConditionalColumnRequest instantiates a new ConditionalColumnRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConditionalColumnRequest(config []map[string]interface{}, newColumnName string) *ConditionalColumnRequest { + this := ConditionalColumnRequest{} + this.Config = config + this.NewColumnName = newColumnName + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// NewConditionalColumnRequestWithDefaults instantiates a new ConditionalColumnRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConditionalColumnRequestWithDefaults() *ConditionalColumnRequest { + this := ConditionalColumnRequest{} + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// GetConfig returns the Config field value +func (o *ConditionalColumnRequest) GetConfig() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConditionalColumnRequest) GetConfigOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ConditionalColumnRequest) SetConfig(v []map[string]interface{}) { + o.Config = v +} + +// GetNewColumnName returns the NewColumnName field value +func (o *ConditionalColumnRequest) GetNewColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value +// and a boolean to check if the value has been set. +func (o *ConditionalColumnRequest) GetNewColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewColumnName, true +} + +// SetNewColumnName sets field value +func (o *ConditionalColumnRequest) SetNewColumnName(v string) { + o.NewColumnName = v +} + +// GetConcurrency returns the Concurrency field value if set, zero value otherwise. +func (o *ConditionalColumnRequest) GetConcurrency() int32 { + if o == nil || IsNil(o.Concurrency) { + var ret int32 + return ret + } + return *o.Concurrency +} + +// GetConcurrencyOk returns a tuple with the Concurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConditionalColumnRequest) GetConcurrencyOk() (*int32, bool) { + if o == nil || IsNil(o.Concurrency) { + return nil, false + } + return o.Concurrency, true +} + +// HasConcurrency returns a boolean if a field has been set. +func (o *ConditionalColumnRequest) HasConcurrency() bool { + if o != nil && !IsNil(o.Concurrency) { + return true + } + + return false +} + +// SetConcurrency gets a reference to the given int32 and assigns it to the Concurrency field. +func (o *ConditionalColumnRequest) SetConcurrency(v int32) { + o.Concurrency = &v +} + +func (o ConditionalColumnRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConditionalColumnRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["new_column_name"] = o.NewColumnName + if !IsNil(o.Concurrency) { + toSerialize["concurrency"] = o.Concurrency + } + return toSerialize, nil +} + +func (o *ConditionalColumnRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "config", + "new_column_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConditionalColumnRequest := _ConditionalColumnRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConditionalColumnRequest) + + if err != nil { + return err + } + + *o = ConditionalColumnRequest(varConditionalColumnRequest) + + return err +} + +type NullableConditionalColumnRequest struct { + value *ConditionalColumnRequest + isSet bool +} + +func (v NullableConditionalColumnRequest) Get() *ConditionalColumnRequest { + return v.value +} + +func (v *NullableConditionalColumnRequest) Set(val *ConditionalColumnRequest) { + v.value = val + v.isSet = true +} + +func (v NullableConditionalColumnRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableConditionalColumnRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConditionalColumnRequest(val *ConditionalColumnRequest) *NullableConditionalColumnRequest { + return &NullableConditionalColumnRequest{value: val, isSet: true} +} + +func (v NullableConditionalColumnRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConditionalColumnRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_configure_evaluations.go b/go/futureagi/model_configure_evaluations.go new file mode 100644 index 0000000..596690d --- /dev/null +++ b/go/futureagi/model_configure_evaluations.go @@ -0,0 +1,268 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ConfigureEvaluations type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigureEvaluations{} + +// ConfigureEvaluations struct for ConfigureEvaluations +type ConfigureEvaluations struct { + EvalTemplates string `json:"eval_templates"` + Inputs map[string]string `json:"inputs"` + ModelName NullableString `json:"model_name,omitempty"` + Config *map[string]string `json:"config,omitempty"` +} + +type _ConfigureEvaluations ConfigureEvaluations + +// NewConfigureEvaluations instantiates a new ConfigureEvaluations object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigureEvaluations(evalTemplates string, inputs map[string]string) *ConfigureEvaluations { + this := ConfigureEvaluations{} + this.EvalTemplates = evalTemplates + this.Inputs = inputs + return &this +} + +// NewConfigureEvaluationsWithDefaults instantiates a new ConfigureEvaluations object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigureEvaluationsWithDefaults() *ConfigureEvaluations { + this := ConfigureEvaluations{} + return &this +} + +// GetEvalTemplates returns the EvalTemplates field value +func (o *ConfigureEvaluations) GetEvalTemplates() string { + if o == nil { + var ret string + return ret + } + + return o.EvalTemplates +} + +// GetEvalTemplatesOk returns a tuple with the EvalTemplates field value +// and a boolean to check if the value has been set. +func (o *ConfigureEvaluations) GetEvalTemplatesOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalTemplates, true +} + +// SetEvalTemplates sets field value +func (o *ConfigureEvaluations) SetEvalTemplates(v string) { + o.EvalTemplates = v +} + +// GetInputs returns the Inputs field value +func (o *ConfigureEvaluations) GetInputs() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value +// and a boolean to check if the value has been set. +func (o *ConfigureEvaluations) GetInputsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Inputs, true +} + +// SetInputs sets field value +func (o *ConfigureEvaluations) SetInputs(v map[string]string) { + o.Inputs = v +} + +// GetModelName returns the ModelName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfigureEvaluations) GetModelName() string { + if o == nil || IsNil(o.ModelName.Get()) { + var ret string + return ret + } + return *o.ModelName.Get() +} + +// GetModelNameOk returns a tuple with the ModelName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfigureEvaluations) GetModelNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ModelName.Get(), o.ModelName.IsSet() +} + +// HasModelName returns a boolean if a field has been set. +func (o *ConfigureEvaluations) HasModelName() bool { + if o != nil && o.ModelName.IsSet() { + return true + } + + return false +} + +// SetModelName gets a reference to the given NullableString and assigns it to the ModelName field. +func (o *ConfigureEvaluations) SetModelName(v string) { + o.ModelName.Set(&v) +} + +// SetModelNameNil sets the value for ModelName to be an explicit nil +func (o *ConfigureEvaluations) SetModelNameNil() { + o.ModelName.Set(nil) +} + +// UnsetModelName ensures that no value is present for ModelName, not even an explicit nil +func (o *ConfigureEvaluations) UnsetModelName() { + o.ModelName.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *ConfigureEvaluations) GetConfig() map[string]string { + if o == nil || IsNil(o.Config) { + var ret map[string]string + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigureEvaluations) GetConfigOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *ConfigureEvaluations) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]string and assigns it to the Config field. +func (o *ConfigureEvaluations) SetConfig(v map[string]string) { + o.Config = &v +} + +func (o ConfigureEvaluations) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigureEvaluations) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval_templates"] = o.EvalTemplates + toSerialize["inputs"] = o.Inputs + if o.ModelName.IsSet() { + toSerialize["model_name"] = o.ModelName.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + return toSerialize, nil +} + +func (o *ConfigureEvaluations) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_templates", + "inputs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigureEvaluations := _ConfigureEvaluations{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigureEvaluations) + + if err != nil { + return err + } + + *o = ConfigureEvaluations(varConfigureEvaluations) + + return err +} + +type NullableConfigureEvaluations struct { + value *ConfigureEvaluations + isSet bool +} + +func (v NullableConfigureEvaluations) Get() *ConfigureEvaluations { + return v.value +} + +func (v *NullableConfigureEvaluations) Set(val *ConfigureEvaluations) { + v.value = val + v.isSet = true +} + +func (v NullableConfigureEvaluations) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigureEvaluations) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigureEvaluations(val *ConfigureEvaluations) *NullableConfigureEvaluations { + return &NullableConfigureEvaluations{value: val, isSet: true} +} + +func (v NullableConfigureEvaluations) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigureEvaluations) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_dataset_from_experiment_request.go b/go/futureagi/model_create_dataset_from_experiment_request.go new file mode 100644 index 0000000..2b2133c --- /dev/null +++ b/go/futureagi/model_create_dataset_from_experiment_request.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CreateDatasetFromExperimentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDatasetFromExperimentRequest{} + +// CreateDatasetFromExperimentRequest struct for CreateDatasetFromExperimentRequest +type CreateDatasetFromExperimentRequest struct { + Name *string `json:"name,omitempty"` + ModelType *string `json:"model_type,omitempty"` +} + +// NewCreateDatasetFromExperimentRequest instantiates a new CreateDatasetFromExperimentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateDatasetFromExperimentRequest() *CreateDatasetFromExperimentRequest { + this := CreateDatasetFromExperimentRequest{} + return &this +} + +// NewCreateDatasetFromExperimentRequestWithDefaults instantiates a new CreateDatasetFromExperimentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateDatasetFromExperimentRequestWithDefaults() *CreateDatasetFromExperimentRequest { + this := CreateDatasetFromExperimentRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateDatasetFromExperimentRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatasetFromExperimentRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateDatasetFromExperimentRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateDatasetFromExperimentRequest) SetName(v string) { + o.Name = &v +} + +// GetModelType returns the ModelType field value if set, zero value otherwise. +func (o *CreateDatasetFromExperimentRequest) GetModelType() string { + if o == nil || IsNil(o.ModelType) { + var ret string + return ret + } + return *o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatasetFromExperimentRequest) GetModelTypeOk() (*string, bool) { + if o == nil || IsNil(o.ModelType) { + return nil, false + } + return o.ModelType, true +} + +// HasModelType returns a boolean if a field has been set. +func (o *CreateDatasetFromExperimentRequest) HasModelType() bool { + if o != nil && !IsNil(o.ModelType) { + return true + } + + return false +} + +// SetModelType gets a reference to the given string and assigns it to the ModelType field. +func (o *CreateDatasetFromExperimentRequest) SetModelType(v string) { + o.ModelType = &v +} + +func (o CreateDatasetFromExperimentRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateDatasetFromExperimentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ModelType) { + toSerialize["model_type"] = o.ModelType + } + return toSerialize, nil +} + +type NullableCreateDatasetFromExperimentRequest struct { + value *CreateDatasetFromExperimentRequest + isSet bool +} + +func (v NullableCreateDatasetFromExperimentRequest) Get() *CreateDatasetFromExperimentRequest { + return v.value +} + +func (v *NullableCreateDatasetFromExperimentRequest) Set(val *CreateDatasetFromExperimentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDatasetFromExperimentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDatasetFromExperimentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDatasetFromExperimentRequest(val *CreateDatasetFromExperimentRequest) *NullableCreateDatasetFromExperimentRequest { + return &NullableCreateDatasetFromExperimentRequest{value: val, isSet: true} +} + +func (v NullableCreateDatasetFromExperimentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDatasetFromExperimentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_dataset_from_local_file_request.go b/go/futureagi/model_create_dataset_from_local_file_request.go new file mode 100644 index 0000000..d7a10de --- /dev/null +++ b/go/futureagi/model_create_dataset_from_local_file_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CreateDatasetFromLocalFileRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDatasetFromLocalFileRequest{} + +// CreateDatasetFromLocalFileRequest struct for CreateDatasetFromLocalFileRequest +type CreateDatasetFromLocalFileRequest struct { + File *string `json:"file,omitempty"` + NewDatasetName *string `json:"new_dataset_name,omitempty"` + ModelType *string `json:"model_type,omitempty"` + Source *string `json:"source,omitempty"` +} + +// NewCreateDatasetFromLocalFileRequest instantiates a new CreateDatasetFromLocalFileRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateDatasetFromLocalFileRequest() *CreateDatasetFromLocalFileRequest { + this := CreateDatasetFromLocalFileRequest{} + return &this +} + +// NewCreateDatasetFromLocalFileRequestWithDefaults instantiates a new CreateDatasetFromLocalFileRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateDatasetFromLocalFileRequestWithDefaults() *CreateDatasetFromLocalFileRequest { + this := CreateDatasetFromLocalFileRequest{} + return &this +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *CreateDatasetFromLocalFileRequest) GetFile() string { + if o == nil || IsNil(o.File) { + var ret string + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatasetFromLocalFileRequest) GetFileOk() (*string, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *CreateDatasetFromLocalFileRequest) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given string and assigns it to the File field. +func (o *CreateDatasetFromLocalFileRequest) SetFile(v string) { + o.File = &v +} + +// GetNewDatasetName returns the NewDatasetName field value if set, zero value otherwise. +func (o *CreateDatasetFromLocalFileRequest) GetNewDatasetName() string { + if o == nil || IsNil(o.NewDatasetName) { + var ret string + return ret + } + return *o.NewDatasetName +} + +// GetNewDatasetNameOk returns a tuple with the NewDatasetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatasetFromLocalFileRequest) GetNewDatasetNameOk() (*string, bool) { + if o == nil || IsNil(o.NewDatasetName) { + return nil, false + } + return o.NewDatasetName, true +} + +// HasNewDatasetName returns a boolean if a field has been set. +func (o *CreateDatasetFromLocalFileRequest) HasNewDatasetName() bool { + if o != nil && !IsNil(o.NewDatasetName) { + return true + } + + return false +} + +// SetNewDatasetName gets a reference to the given string and assigns it to the NewDatasetName field. +func (o *CreateDatasetFromLocalFileRequest) SetNewDatasetName(v string) { + o.NewDatasetName = &v +} + +// GetModelType returns the ModelType field value if set, zero value otherwise. +func (o *CreateDatasetFromLocalFileRequest) GetModelType() string { + if o == nil || IsNil(o.ModelType) { + var ret string + return ret + } + return *o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatasetFromLocalFileRequest) GetModelTypeOk() (*string, bool) { + if o == nil || IsNil(o.ModelType) { + return nil, false + } + return o.ModelType, true +} + +// HasModelType returns a boolean if a field has been set. +func (o *CreateDatasetFromLocalFileRequest) HasModelType() bool { + if o != nil && !IsNil(o.ModelType) { + return true + } + + return false +} + +// SetModelType gets a reference to the given string and assigns it to the ModelType field. +func (o *CreateDatasetFromLocalFileRequest) SetModelType(v string) { + o.ModelType = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *CreateDatasetFromLocalFileRequest) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatasetFromLocalFileRequest) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *CreateDatasetFromLocalFileRequest) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *CreateDatasetFromLocalFileRequest) SetSource(v string) { + o.Source = &v +} + +func (o CreateDatasetFromLocalFileRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateDatasetFromLocalFileRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.NewDatasetName) { + toSerialize["new_dataset_name"] = o.NewDatasetName + } + if !IsNil(o.ModelType) { + toSerialize["model_type"] = o.ModelType + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + return toSerialize, nil +} + +type NullableCreateDatasetFromLocalFileRequest struct { + value *CreateDatasetFromLocalFileRequest + isSet bool +} + +func (v NullableCreateDatasetFromLocalFileRequest) Get() *CreateDatasetFromLocalFileRequest { + return v.value +} + +func (v *NullableCreateDatasetFromLocalFileRequest) Set(val *CreateDatasetFromLocalFileRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDatasetFromLocalFileRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDatasetFromLocalFileRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDatasetFromLocalFileRequest(val *CreateDatasetFromLocalFileRequest) *NullableCreateDatasetFromLocalFileRequest { + return &NullableCreateDatasetFromLocalFileRequest{value: val, isSet: true} +} + +func (v NullableCreateDatasetFromLocalFileRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDatasetFromLocalFileRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_empty_dataset_request.go b/go/futureagi/model_create_empty_dataset_request.go new file mode 100644 index 0000000..2ad1ecb --- /dev/null +++ b/go/futureagi/model_create_empty_dataset_request.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateEmptyDatasetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateEmptyDatasetRequest{} + +// CreateEmptyDatasetRequest struct for CreateEmptyDatasetRequest +type CreateEmptyDatasetRequest struct { + NewDatasetName string `json:"new_dataset_name"` + ModelType *string `json:"model_type,omitempty"` + IsSdk *bool `json:"is_sdk,omitempty"` + Row *int32 `json:"row,omitempty"` +} + +type _CreateEmptyDatasetRequest CreateEmptyDatasetRequest + +// NewCreateEmptyDatasetRequest instantiates a new CreateEmptyDatasetRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateEmptyDatasetRequest(newDatasetName string) *CreateEmptyDatasetRequest { + this := CreateEmptyDatasetRequest{} + this.NewDatasetName = newDatasetName + var isSdk bool = false + this.IsSdk = &isSdk + return &this +} + +// NewCreateEmptyDatasetRequestWithDefaults instantiates a new CreateEmptyDatasetRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateEmptyDatasetRequestWithDefaults() *CreateEmptyDatasetRequest { + this := CreateEmptyDatasetRequest{} + var isSdk bool = false + this.IsSdk = &isSdk + return &this +} + +// GetNewDatasetName returns the NewDatasetName field value +func (o *CreateEmptyDatasetRequest) GetNewDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.NewDatasetName +} + +// GetNewDatasetNameOk returns a tuple with the NewDatasetName field value +// and a boolean to check if the value has been set. +func (o *CreateEmptyDatasetRequest) GetNewDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewDatasetName, true +} + +// SetNewDatasetName sets field value +func (o *CreateEmptyDatasetRequest) SetNewDatasetName(v string) { + o.NewDatasetName = v +} + +// GetModelType returns the ModelType field value if set, zero value otherwise. +func (o *CreateEmptyDatasetRequest) GetModelType() string { + if o == nil || IsNil(o.ModelType) { + var ret string + return ret + } + return *o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateEmptyDatasetRequest) GetModelTypeOk() (*string, bool) { + if o == nil || IsNil(o.ModelType) { + return nil, false + } + return o.ModelType, true +} + +// HasModelType returns a boolean if a field has been set. +func (o *CreateEmptyDatasetRequest) HasModelType() bool { + if o != nil && !IsNil(o.ModelType) { + return true + } + + return false +} + +// SetModelType gets a reference to the given string and assigns it to the ModelType field. +func (o *CreateEmptyDatasetRequest) SetModelType(v string) { + o.ModelType = &v +} + +// GetIsSdk returns the IsSdk field value if set, zero value otherwise. +func (o *CreateEmptyDatasetRequest) GetIsSdk() bool { + if o == nil || IsNil(o.IsSdk) { + var ret bool + return ret + } + return *o.IsSdk +} + +// GetIsSdkOk returns a tuple with the IsSdk field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateEmptyDatasetRequest) GetIsSdkOk() (*bool, bool) { + if o == nil || IsNil(o.IsSdk) { + return nil, false + } + return o.IsSdk, true +} + +// HasIsSdk returns a boolean if a field has been set. +func (o *CreateEmptyDatasetRequest) HasIsSdk() bool { + if o != nil && !IsNil(o.IsSdk) { + return true + } + + return false +} + +// SetIsSdk gets a reference to the given bool and assigns it to the IsSdk field. +func (o *CreateEmptyDatasetRequest) SetIsSdk(v bool) { + o.IsSdk = &v +} + +// GetRow returns the Row field value if set, zero value otherwise. +func (o *CreateEmptyDatasetRequest) GetRow() int32 { + if o == nil || IsNil(o.Row) { + var ret int32 + return ret + } + return *o.Row +} + +// GetRowOk returns a tuple with the Row field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateEmptyDatasetRequest) GetRowOk() (*int32, bool) { + if o == nil || IsNil(o.Row) { + return nil, false + } + return o.Row, true +} + +// HasRow returns a boolean if a field has been set. +func (o *CreateEmptyDatasetRequest) HasRow() bool { + if o != nil && !IsNil(o.Row) { + return true + } + + return false +} + +// SetRow gets a reference to the given int32 and assigns it to the Row field. +func (o *CreateEmptyDatasetRequest) SetRow(v int32) { + o.Row = &v +} + +func (o CreateEmptyDatasetRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateEmptyDatasetRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["new_dataset_name"] = o.NewDatasetName + if !IsNil(o.ModelType) { + toSerialize["model_type"] = o.ModelType + } + if !IsNil(o.IsSdk) { + toSerialize["is_sdk"] = o.IsSdk + } + if !IsNil(o.Row) { + toSerialize["row"] = o.Row + } + return toSerialize, nil +} + +func (o *CreateEmptyDatasetRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "new_dataset_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateEmptyDatasetRequest := _CreateEmptyDatasetRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateEmptyDatasetRequest) + + if err != nil { + return err + } + + *o = CreateEmptyDatasetRequest(varCreateEmptyDatasetRequest) + + return err +} + +type NullableCreateEmptyDatasetRequest struct { + value *CreateEmptyDatasetRequest + isSet bool +} + +func (v NullableCreateEmptyDatasetRequest) Get() *CreateEmptyDatasetRequest { + return v.value +} + +func (v *NullableCreateEmptyDatasetRequest) Set(val *CreateEmptyDatasetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateEmptyDatasetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateEmptyDatasetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateEmptyDatasetRequest(val *CreateEmptyDatasetRequest) *NullableCreateEmptyDatasetRequest { + return &NullableCreateEmptyDatasetRequest{value: val, isSet: true} +} + +func (v NullableCreateEmptyDatasetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateEmptyDatasetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_linear_issue.go b/go/futureagi/model_create_linear_issue.go new file mode 100644 index 0000000..c7aaabf --- /dev/null +++ b/go/futureagi/model_create_linear_issue.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateLinearIssue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLinearIssue{} + +// CreateLinearIssue struct for CreateLinearIssue +type CreateLinearIssue struct { + TeamId string `json:"team_id"` + Title *string `json:"title,omitempty"` + Description *string `json:"description,omitempty"` + Priority *int32 `json:"priority,omitempty"` +} + +type _CreateLinearIssue CreateLinearIssue + +// NewCreateLinearIssue instantiates a new CreateLinearIssue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateLinearIssue(teamId string) *CreateLinearIssue { + this := CreateLinearIssue{} + this.TeamId = teamId + var priority int32 = 0 + this.Priority = &priority + return &this +} + +// NewCreateLinearIssueWithDefaults instantiates a new CreateLinearIssue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateLinearIssueWithDefaults() *CreateLinearIssue { + this := CreateLinearIssue{} + var priority int32 = 0 + this.Priority = &priority + return &this +} + +// GetTeamId returns the TeamId field value +func (o *CreateLinearIssue) GetTeamId() string { + if o == nil { + var ret string + return ret + } + + return o.TeamId +} + +// GetTeamIdOk returns a tuple with the TeamId field value +// and a boolean to check if the value has been set. +func (o *CreateLinearIssue) GetTeamIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TeamId, true +} + +// SetTeamId sets field value +func (o *CreateLinearIssue) SetTeamId(v string) { + o.TeamId = v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *CreateLinearIssue) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLinearIssue) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *CreateLinearIssue) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *CreateLinearIssue) SetTitle(v string) { + o.Title = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateLinearIssue) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLinearIssue) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateLinearIssue) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateLinearIssue) SetDescription(v string) { + o.Description = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *CreateLinearIssue) GetPriority() int32 { + if o == nil || IsNil(o.Priority) { + var ret int32 + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLinearIssue) GetPriorityOk() (*int32, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *CreateLinearIssue) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given int32 and assigns it to the Priority field. +func (o *CreateLinearIssue) SetPriority(v int32) { + o.Priority = &v +} + +func (o CreateLinearIssue) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateLinearIssue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["team_id"] = o.TeamId + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + return toSerialize, nil +} + +func (o *CreateLinearIssue) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "team_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateLinearIssue := _CreateLinearIssue{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateLinearIssue) + + if err != nil { + return err + } + + *o = CreateLinearIssue(varCreateLinearIssue) + + return err +} + +type NullableCreateLinearIssue struct { + value *CreateLinearIssue + isSet bool +} + +func (v NullableCreateLinearIssue) Get() *CreateLinearIssue { + return v.value +} + +func (v *NullableCreateLinearIssue) Set(val *CreateLinearIssue) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLinearIssue) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLinearIssue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLinearIssue(val *CreateLinearIssue) *NullableCreateLinearIssue { + return &NullableCreateLinearIssue{value: val, isSet: true} +} + +func (v NullableCreateLinearIssue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLinearIssue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_linear_issue_response.go b/go/futureagi/model_create_linear_issue_response.go new file mode 100644 index 0000000..d205b85 --- /dev/null +++ b/go/futureagi/model_create_linear_issue_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateLinearIssueResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLinearIssueResponse{} + +// CreateLinearIssueResponse struct for CreateLinearIssueResponse +type CreateLinearIssueResponse struct { + Status *bool `json:"status,omitempty"` + Result CreateLinearIssueResult `json:"result"` +} + +type _CreateLinearIssueResponse CreateLinearIssueResponse + +// NewCreateLinearIssueResponse instantiates a new CreateLinearIssueResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateLinearIssueResponse(result CreateLinearIssueResult) *CreateLinearIssueResponse { + this := CreateLinearIssueResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewCreateLinearIssueResponseWithDefaults instantiates a new CreateLinearIssueResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateLinearIssueResponseWithDefaults() *CreateLinearIssueResponse { + this := CreateLinearIssueResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateLinearIssueResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLinearIssueResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateLinearIssueResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *CreateLinearIssueResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *CreateLinearIssueResponse) GetResult() CreateLinearIssueResult { + if o == nil { + var ret CreateLinearIssueResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *CreateLinearIssueResponse) GetResultOk() (*CreateLinearIssueResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *CreateLinearIssueResponse) SetResult(v CreateLinearIssueResult) { + o.Result = v +} + +func (o CreateLinearIssueResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateLinearIssueResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *CreateLinearIssueResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateLinearIssueResponse := _CreateLinearIssueResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateLinearIssueResponse) + + if err != nil { + return err + } + + *o = CreateLinearIssueResponse(varCreateLinearIssueResponse) + + return err +} + +type NullableCreateLinearIssueResponse struct { + value *CreateLinearIssueResponse + isSet bool +} + +func (v NullableCreateLinearIssueResponse) Get() *CreateLinearIssueResponse { + return v.value +} + +func (v *NullableCreateLinearIssueResponse) Set(val *CreateLinearIssueResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLinearIssueResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLinearIssueResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLinearIssueResponse(val *CreateLinearIssueResponse) *NullableCreateLinearIssueResponse { + return &NullableCreateLinearIssueResponse{value: val, isSet: true} +} + +func (v NullableCreateLinearIssueResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLinearIssueResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_linear_issue_result.go b/go/futureagi/model_create_linear_issue_result.go new file mode 100644 index 0000000..7e7afe3 --- /dev/null +++ b/go/futureagi/model_create_linear_issue_result.go @@ -0,0 +1,266 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the CreateLinearIssueResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateLinearIssueResult{} + +// CreateLinearIssueResult struct for CreateLinearIssueResult +type CreateLinearIssueResult struct { + AlreadyLinked *bool `json:"already_linked,omitempty"` + IssueId NullableString `json:"issue_id,omitempty"` + IssueUrl NullableString `json:"issue_url,omitempty"` + IssueTitle NullableString `json:"issue_title,omitempty"` +} + +// NewCreateLinearIssueResult instantiates a new CreateLinearIssueResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateLinearIssueResult() *CreateLinearIssueResult { + this := CreateLinearIssueResult{} + return &this +} + +// NewCreateLinearIssueResultWithDefaults instantiates a new CreateLinearIssueResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateLinearIssueResultWithDefaults() *CreateLinearIssueResult { + this := CreateLinearIssueResult{} + return &this +} + +// GetAlreadyLinked returns the AlreadyLinked field value if set, zero value otherwise. +func (o *CreateLinearIssueResult) GetAlreadyLinked() bool { + if o == nil || IsNil(o.AlreadyLinked) { + var ret bool + return ret + } + return *o.AlreadyLinked +} + +// GetAlreadyLinkedOk returns a tuple with the AlreadyLinked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLinearIssueResult) GetAlreadyLinkedOk() (*bool, bool) { + if o == nil || IsNil(o.AlreadyLinked) { + return nil, false + } + return o.AlreadyLinked, true +} + +// HasAlreadyLinked returns a boolean if a field has been set. +func (o *CreateLinearIssueResult) HasAlreadyLinked() bool { + if o != nil && !IsNil(o.AlreadyLinked) { + return true + } + + return false +} + +// SetAlreadyLinked gets a reference to the given bool and assigns it to the AlreadyLinked field. +func (o *CreateLinearIssueResult) SetAlreadyLinked(v bool) { + o.AlreadyLinked = &v +} + +// GetIssueId returns the IssueId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateLinearIssueResult) GetIssueId() string { + if o == nil || IsNil(o.IssueId.Get()) { + var ret string + return ret + } + return *o.IssueId.Get() +} + +// GetIssueIdOk returns a tuple with the IssueId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateLinearIssueResult) GetIssueIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IssueId.Get(), o.IssueId.IsSet() +} + +// HasIssueId returns a boolean if a field has been set. +func (o *CreateLinearIssueResult) HasIssueId() bool { + if o != nil && o.IssueId.IsSet() { + return true + } + + return false +} + +// SetIssueId gets a reference to the given NullableString and assigns it to the IssueId field. +func (o *CreateLinearIssueResult) SetIssueId(v string) { + o.IssueId.Set(&v) +} + +// SetIssueIdNil sets the value for IssueId to be an explicit nil +func (o *CreateLinearIssueResult) SetIssueIdNil() { + o.IssueId.Set(nil) +} + +// UnsetIssueId ensures that no value is present for IssueId, not even an explicit nil +func (o *CreateLinearIssueResult) UnsetIssueId() { + o.IssueId.Unset() +} + +// GetIssueUrl returns the IssueUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateLinearIssueResult) GetIssueUrl() string { + if o == nil || IsNil(o.IssueUrl.Get()) { + var ret string + return ret + } + return *o.IssueUrl.Get() +} + +// GetIssueUrlOk returns a tuple with the IssueUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateLinearIssueResult) GetIssueUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IssueUrl.Get(), o.IssueUrl.IsSet() +} + +// HasIssueUrl returns a boolean if a field has been set. +func (o *CreateLinearIssueResult) HasIssueUrl() bool { + if o != nil && o.IssueUrl.IsSet() { + return true + } + + return false +} + +// SetIssueUrl gets a reference to the given NullableString and assigns it to the IssueUrl field. +func (o *CreateLinearIssueResult) SetIssueUrl(v string) { + o.IssueUrl.Set(&v) +} + +// SetIssueUrlNil sets the value for IssueUrl to be an explicit nil +func (o *CreateLinearIssueResult) SetIssueUrlNil() { + o.IssueUrl.Set(nil) +} + +// UnsetIssueUrl ensures that no value is present for IssueUrl, not even an explicit nil +func (o *CreateLinearIssueResult) UnsetIssueUrl() { + o.IssueUrl.Unset() +} + +// GetIssueTitle returns the IssueTitle field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateLinearIssueResult) GetIssueTitle() string { + if o == nil || IsNil(o.IssueTitle.Get()) { + var ret string + return ret + } + return *o.IssueTitle.Get() +} + +// GetIssueTitleOk returns a tuple with the IssueTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateLinearIssueResult) GetIssueTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IssueTitle.Get(), o.IssueTitle.IsSet() +} + +// HasIssueTitle returns a boolean if a field has been set. +func (o *CreateLinearIssueResult) HasIssueTitle() bool { + if o != nil && o.IssueTitle.IsSet() { + return true + } + + return false +} + +// SetIssueTitle gets a reference to the given NullableString and assigns it to the IssueTitle field. +func (o *CreateLinearIssueResult) SetIssueTitle(v string) { + o.IssueTitle.Set(&v) +} + +// SetIssueTitleNil sets the value for IssueTitle to be an explicit nil +func (o *CreateLinearIssueResult) SetIssueTitleNil() { + o.IssueTitle.Set(nil) +} + +// UnsetIssueTitle ensures that no value is present for IssueTitle, not even an explicit nil +func (o *CreateLinearIssueResult) UnsetIssueTitle() { + o.IssueTitle.Unset() +} + +func (o CreateLinearIssueResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateLinearIssueResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AlreadyLinked) { + toSerialize["already_linked"] = o.AlreadyLinked + } + if o.IssueId.IsSet() { + toSerialize["issue_id"] = o.IssueId.Get() + } + if o.IssueUrl.IsSet() { + toSerialize["issue_url"] = o.IssueUrl.Get() + } + if o.IssueTitle.IsSet() { + toSerialize["issue_title"] = o.IssueTitle.Get() + } + return toSerialize, nil +} + +type NullableCreateLinearIssueResult struct { + value *CreateLinearIssueResult + isSet bool +} + +func (v NullableCreateLinearIssueResult) Get() *CreateLinearIssueResult { + return v.value +} + +func (v *NullableCreateLinearIssueResult) Set(val *CreateLinearIssueResult) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLinearIssueResult) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLinearIssueResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLinearIssueResult(val *CreateLinearIssueResult) *NullableCreateLinearIssueResult { + return &NullableCreateLinearIssueResult{value: val, isSet: true} +} + +func (v NullableCreateLinearIssueResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLinearIssueResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_prompt_simulation_request.go b/go/futureagi/model_create_prompt_simulation_request.go new file mode 100644 index 0000000..aaf316c --- /dev/null +++ b/go/futureagi/model_create_prompt_simulation_request.go @@ -0,0 +1,364 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreatePromptSimulationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePromptSimulationRequest{} + +// CreatePromptSimulationRequest struct for CreatePromptSimulationRequest +type CreatePromptSimulationRequest struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + // Prompt version ID (UUID) or template_version string + PromptVersionId string `json:"prompt_version_id"` + ScenarioIds []string `json:"scenario_ids"` + DatasetRowIds []string `json:"dataset_row_ids,omitempty"` + // Evaluation configurations to create + EvaluationsConfig []EvalConfigDefinition `json:"evaluations_config,omitempty"` + // Enable automatic tool evaluation for this simulation run + EnableToolEvaluation *bool `json:"enable_tool_evaluation,omitempty"` +} + +type _CreatePromptSimulationRequest CreatePromptSimulationRequest + +// NewCreatePromptSimulationRequest instantiates a new CreatePromptSimulationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatePromptSimulationRequest(name string, promptVersionId string, scenarioIds []string) *CreatePromptSimulationRequest { + this := CreatePromptSimulationRequest{} + this.Name = name + this.PromptVersionId = promptVersionId + this.ScenarioIds = scenarioIds + var enableToolEvaluation bool = false + this.EnableToolEvaluation = &enableToolEvaluation + return &this +} + +// NewCreatePromptSimulationRequestWithDefaults instantiates a new CreatePromptSimulationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatePromptSimulationRequestWithDefaults() *CreatePromptSimulationRequest { + this := CreatePromptSimulationRequest{} + var enableToolEvaluation bool = false + this.EnableToolEvaluation = &enableToolEvaluation + return &this +} + +// GetName returns the Name field value +func (o *CreatePromptSimulationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatePromptSimulationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatePromptSimulationRequest) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreatePromptSimulationRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePromptSimulationRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreatePromptSimulationRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreatePromptSimulationRequest) SetDescription(v string) { + o.Description = &v +} + +// GetPromptVersionId returns the PromptVersionId field value +func (o *CreatePromptSimulationRequest) GetPromptVersionId() string { + if o == nil { + var ret string + return ret + } + + return o.PromptVersionId +} + +// GetPromptVersionIdOk returns a tuple with the PromptVersionId field value +// and a boolean to check if the value has been set. +func (o *CreatePromptSimulationRequest) GetPromptVersionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PromptVersionId, true +} + +// SetPromptVersionId sets field value +func (o *CreatePromptSimulationRequest) SetPromptVersionId(v string) { + o.PromptVersionId = v +} + +// GetScenarioIds returns the ScenarioIds field value +func (o *CreatePromptSimulationRequest) GetScenarioIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value +// and a boolean to check if the value has been set. +func (o *CreatePromptSimulationRequest) GetScenarioIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ScenarioIds, true +} + +// SetScenarioIds sets field value +func (o *CreatePromptSimulationRequest) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +// GetDatasetRowIds returns the DatasetRowIds field value if set, zero value otherwise. +func (o *CreatePromptSimulationRequest) GetDatasetRowIds() []string { + if o == nil || IsNil(o.DatasetRowIds) { + var ret []string + return ret + } + return o.DatasetRowIds +} + +// GetDatasetRowIdsOk returns a tuple with the DatasetRowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePromptSimulationRequest) GetDatasetRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DatasetRowIds) { + return nil, false + } + return o.DatasetRowIds, true +} + +// HasDatasetRowIds returns a boolean if a field has been set. +func (o *CreatePromptSimulationRequest) HasDatasetRowIds() bool { + if o != nil && !IsNil(o.DatasetRowIds) { + return true + } + + return false +} + +// SetDatasetRowIds gets a reference to the given []string and assigns it to the DatasetRowIds field. +func (o *CreatePromptSimulationRequest) SetDatasetRowIds(v []string) { + o.DatasetRowIds = v +} + +// GetEvaluationsConfig returns the EvaluationsConfig field value if set, zero value otherwise. +func (o *CreatePromptSimulationRequest) GetEvaluationsConfig() []EvalConfigDefinition { + if o == nil || IsNil(o.EvaluationsConfig) { + var ret []EvalConfigDefinition + return ret + } + return o.EvaluationsConfig +} + +// GetEvaluationsConfigOk returns a tuple with the EvaluationsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePromptSimulationRequest) GetEvaluationsConfigOk() ([]EvalConfigDefinition, bool) { + if o == nil || IsNil(o.EvaluationsConfig) { + return nil, false + } + return o.EvaluationsConfig, true +} + +// HasEvaluationsConfig returns a boolean if a field has been set. +func (o *CreatePromptSimulationRequest) HasEvaluationsConfig() bool { + if o != nil && !IsNil(o.EvaluationsConfig) { + return true + } + + return false +} + +// SetEvaluationsConfig gets a reference to the given []EvalConfigDefinition and assigns it to the EvaluationsConfig field. +func (o *CreatePromptSimulationRequest) SetEvaluationsConfig(v []EvalConfigDefinition) { + o.EvaluationsConfig = v +} + +// GetEnableToolEvaluation returns the EnableToolEvaluation field value if set, zero value otherwise. +func (o *CreatePromptSimulationRequest) GetEnableToolEvaluation() bool { + if o == nil || IsNil(o.EnableToolEvaluation) { + var ret bool + return ret + } + return *o.EnableToolEvaluation +} + +// GetEnableToolEvaluationOk returns a tuple with the EnableToolEvaluation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePromptSimulationRequest) GetEnableToolEvaluationOk() (*bool, bool) { + if o == nil || IsNil(o.EnableToolEvaluation) { + return nil, false + } + return o.EnableToolEvaluation, true +} + +// HasEnableToolEvaluation returns a boolean if a field has been set. +func (o *CreatePromptSimulationRequest) HasEnableToolEvaluation() bool { + if o != nil && !IsNil(o.EnableToolEvaluation) { + return true + } + + return false +} + +// SetEnableToolEvaluation gets a reference to the given bool and assigns it to the EnableToolEvaluation field. +func (o *CreatePromptSimulationRequest) SetEnableToolEvaluation(v bool) { + o.EnableToolEvaluation = &v +} + +func (o CreatePromptSimulationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatePromptSimulationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["prompt_version_id"] = o.PromptVersionId + toSerialize["scenario_ids"] = o.ScenarioIds + if !IsNil(o.DatasetRowIds) { + toSerialize["dataset_row_ids"] = o.DatasetRowIds + } + if !IsNil(o.EvaluationsConfig) { + toSerialize["evaluations_config"] = o.EvaluationsConfig + } + if !IsNil(o.EnableToolEvaluation) { + toSerialize["enable_tool_evaluation"] = o.EnableToolEvaluation + } + return toSerialize, nil +} + +func (o *CreatePromptSimulationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "prompt_version_id", + "scenario_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatePromptSimulationRequest := _CreatePromptSimulationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreatePromptSimulationRequest) + + if err != nil { + return err + } + + *o = CreatePromptSimulationRequest(varCreatePromptSimulationRequest) + + return err +} + +type NullableCreatePromptSimulationRequest struct { + value *CreatePromptSimulationRequest + isSet bool +} + +func (v NullableCreatePromptSimulationRequest) Get() *CreatePromptSimulationRequest { + return v.value +} + +func (v *NullableCreatePromptSimulationRequest) Set(val *CreatePromptSimulationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreatePromptSimulationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatePromptSimulationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatePromptSimulationRequest(val *CreatePromptSimulationRequest) *NullableCreatePromptSimulationRequest { + return &NullableCreatePromptSimulationRequest{value: val, isSet: true} +} + +func (v NullableCreatePromptSimulationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatePromptSimulationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_run_test_.go b/go/futureagi/model_create_run_test_.go new file mode 100644 index 0000000..b9dcc35 --- /dev/null +++ b/go/futureagi/model_create_run_test_.go @@ -0,0 +1,495 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateRunTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateRunTest{} + +// CreateRunTest struct for CreateRunTest +type CreateRunTest struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + AgentDefinitionId string `json:"agent_definition_id"` + ScenarioIds []string `json:"scenario_ids"` + DatasetRowIds []string `json:"dataset_row_ids,omitempty"` + EvalConfigIds []string `json:"eval_config_ids,omitempty"` + // Evaluation configurations to create + EvaluationsConfig []EvalConfigDefinition `json:"evaluations_config,omitempty"` + // Enable automatic tool evaluation for this test run + EnableToolEvaluation *bool `json:"enable_tool_evaluation,omitempty"` + // Optional replay session ID to mark as completed after run test creation + ReplaySessionId NullableString `json:"replay_session_id,omitempty"` + // Optional agent version to bind to this test run + AgentVersion NullableString `json:"agent_version,omitempty"` +} + +type _CreateRunTest CreateRunTest + +// NewCreateRunTest instantiates a new CreateRunTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateRunTest(name string, agentDefinitionId string, scenarioIds []string) *CreateRunTest { + this := CreateRunTest{} + this.Name = name + this.AgentDefinitionId = agentDefinitionId + this.ScenarioIds = scenarioIds + var enableToolEvaluation bool = false + this.EnableToolEvaluation = &enableToolEvaluation + return &this +} + +// NewCreateRunTestWithDefaults instantiates a new CreateRunTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateRunTestWithDefaults() *CreateRunTest { + this := CreateRunTest{} + var enableToolEvaluation bool = false + this.EnableToolEvaluation = &enableToolEvaluation + return &this +} + +// GetName returns the Name field value +func (o *CreateRunTest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateRunTest) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateRunTest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateRunTest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateRunTest) SetDescription(v string) { + o.Description = &v +} + +// GetAgentDefinitionId returns the AgentDefinitionId field value +func (o *CreateRunTest) GetAgentDefinitionId() string { + if o == nil { + var ret string + return ret + } + + return o.AgentDefinitionId +} + +// GetAgentDefinitionIdOk returns a tuple with the AgentDefinitionId field value +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetAgentDefinitionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AgentDefinitionId, true +} + +// SetAgentDefinitionId sets field value +func (o *CreateRunTest) SetAgentDefinitionId(v string) { + o.AgentDefinitionId = v +} + +// GetScenarioIds returns the ScenarioIds field value +func (o *CreateRunTest) GetScenarioIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetScenarioIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ScenarioIds, true +} + +// SetScenarioIds sets field value +func (o *CreateRunTest) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +// GetDatasetRowIds returns the DatasetRowIds field value if set, zero value otherwise. +func (o *CreateRunTest) GetDatasetRowIds() []string { + if o == nil || IsNil(o.DatasetRowIds) { + var ret []string + return ret + } + return o.DatasetRowIds +} + +// GetDatasetRowIdsOk returns a tuple with the DatasetRowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetDatasetRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DatasetRowIds) { + return nil, false + } + return o.DatasetRowIds, true +} + +// HasDatasetRowIds returns a boolean if a field has been set. +func (o *CreateRunTest) HasDatasetRowIds() bool { + if o != nil && !IsNil(o.DatasetRowIds) { + return true + } + + return false +} + +// SetDatasetRowIds gets a reference to the given []string and assigns it to the DatasetRowIds field. +func (o *CreateRunTest) SetDatasetRowIds(v []string) { + o.DatasetRowIds = v +} + +// GetEvalConfigIds returns the EvalConfigIds field value if set, zero value otherwise. +func (o *CreateRunTest) GetEvalConfigIds() []string { + if o == nil || IsNil(o.EvalConfigIds) { + var ret []string + return ret + } + return o.EvalConfigIds +} + +// GetEvalConfigIdsOk returns a tuple with the EvalConfigIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetEvalConfigIdsOk() ([]string, bool) { + if o == nil || IsNil(o.EvalConfigIds) { + return nil, false + } + return o.EvalConfigIds, true +} + +// HasEvalConfigIds returns a boolean if a field has been set. +func (o *CreateRunTest) HasEvalConfigIds() bool { + if o != nil && !IsNil(o.EvalConfigIds) { + return true + } + + return false +} + +// SetEvalConfigIds gets a reference to the given []string and assigns it to the EvalConfigIds field. +func (o *CreateRunTest) SetEvalConfigIds(v []string) { + o.EvalConfigIds = v +} + +// GetEvaluationsConfig returns the EvaluationsConfig field value if set, zero value otherwise. +func (o *CreateRunTest) GetEvaluationsConfig() []EvalConfigDefinition { + if o == nil || IsNil(o.EvaluationsConfig) { + var ret []EvalConfigDefinition + return ret + } + return o.EvaluationsConfig +} + +// GetEvaluationsConfigOk returns a tuple with the EvaluationsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetEvaluationsConfigOk() ([]EvalConfigDefinition, bool) { + if o == nil || IsNil(o.EvaluationsConfig) { + return nil, false + } + return o.EvaluationsConfig, true +} + +// HasEvaluationsConfig returns a boolean if a field has been set. +func (o *CreateRunTest) HasEvaluationsConfig() bool { + if o != nil && !IsNil(o.EvaluationsConfig) { + return true + } + + return false +} + +// SetEvaluationsConfig gets a reference to the given []EvalConfigDefinition and assigns it to the EvaluationsConfig field. +func (o *CreateRunTest) SetEvaluationsConfig(v []EvalConfigDefinition) { + o.EvaluationsConfig = v +} + +// GetEnableToolEvaluation returns the EnableToolEvaluation field value if set, zero value otherwise. +func (o *CreateRunTest) GetEnableToolEvaluation() bool { + if o == nil || IsNil(o.EnableToolEvaluation) { + var ret bool + return ret + } + return *o.EnableToolEvaluation +} + +// GetEnableToolEvaluationOk returns a tuple with the EnableToolEvaluation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRunTest) GetEnableToolEvaluationOk() (*bool, bool) { + if o == nil || IsNil(o.EnableToolEvaluation) { + return nil, false + } + return o.EnableToolEvaluation, true +} + +// HasEnableToolEvaluation returns a boolean if a field has been set. +func (o *CreateRunTest) HasEnableToolEvaluation() bool { + if o != nil && !IsNil(o.EnableToolEvaluation) { + return true + } + + return false +} + +// SetEnableToolEvaluation gets a reference to the given bool and assigns it to the EnableToolEvaluation field. +func (o *CreateRunTest) SetEnableToolEvaluation(v bool) { + o.EnableToolEvaluation = &v +} + +// GetReplaySessionId returns the ReplaySessionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateRunTest) GetReplaySessionId() string { + if o == nil || IsNil(o.ReplaySessionId.Get()) { + var ret string + return ret + } + return *o.ReplaySessionId.Get() +} + +// GetReplaySessionIdOk returns a tuple with the ReplaySessionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateRunTest) GetReplaySessionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReplaySessionId.Get(), o.ReplaySessionId.IsSet() +} + +// HasReplaySessionId returns a boolean if a field has been set. +func (o *CreateRunTest) HasReplaySessionId() bool { + if o != nil && o.ReplaySessionId.IsSet() { + return true + } + + return false +} + +// SetReplaySessionId gets a reference to the given NullableString and assigns it to the ReplaySessionId field. +func (o *CreateRunTest) SetReplaySessionId(v string) { + o.ReplaySessionId.Set(&v) +} + +// SetReplaySessionIdNil sets the value for ReplaySessionId to be an explicit nil +func (o *CreateRunTest) SetReplaySessionIdNil() { + o.ReplaySessionId.Set(nil) +} + +// UnsetReplaySessionId ensures that no value is present for ReplaySessionId, not even an explicit nil +func (o *CreateRunTest) UnsetReplaySessionId() { + o.ReplaySessionId.Unset() +} + +// GetAgentVersion returns the AgentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateRunTest) GetAgentVersion() string { + if o == nil || IsNil(o.AgentVersion.Get()) { + var ret string + return ret + } + return *o.AgentVersion.Get() +} + +// GetAgentVersionOk returns a tuple with the AgentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateRunTest) GetAgentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentVersion.Get(), o.AgentVersion.IsSet() +} + +// HasAgentVersion returns a boolean if a field has been set. +func (o *CreateRunTest) HasAgentVersion() bool { + if o != nil && o.AgentVersion.IsSet() { + return true + } + + return false +} + +// SetAgentVersion gets a reference to the given NullableString and assigns it to the AgentVersion field. +func (o *CreateRunTest) SetAgentVersion(v string) { + o.AgentVersion.Set(&v) +} + +// SetAgentVersionNil sets the value for AgentVersion to be an explicit nil +func (o *CreateRunTest) SetAgentVersionNil() { + o.AgentVersion.Set(nil) +} + +// UnsetAgentVersion ensures that no value is present for AgentVersion, not even an explicit nil +func (o *CreateRunTest) UnsetAgentVersion() { + o.AgentVersion.Unset() +} + +func (o CreateRunTest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateRunTest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["agent_definition_id"] = o.AgentDefinitionId + toSerialize["scenario_ids"] = o.ScenarioIds + if !IsNil(o.DatasetRowIds) { + toSerialize["dataset_row_ids"] = o.DatasetRowIds + } + if !IsNil(o.EvalConfigIds) { + toSerialize["eval_config_ids"] = o.EvalConfigIds + } + if !IsNil(o.EvaluationsConfig) { + toSerialize["evaluations_config"] = o.EvaluationsConfig + } + if !IsNil(o.EnableToolEvaluation) { + toSerialize["enable_tool_evaluation"] = o.EnableToolEvaluation + } + if o.ReplaySessionId.IsSet() { + toSerialize["replay_session_id"] = o.ReplaySessionId.Get() + } + if o.AgentVersion.IsSet() { + toSerialize["agent_version"] = o.AgentVersion.Get() + } + return toSerialize, nil +} + +func (o *CreateRunTest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "agent_definition_id", + "scenario_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateRunTest := _CreateRunTest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateRunTest) + + if err != nil { + return err + } + + *o = CreateRunTest(varCreateRunTest) + + return err +} + +type NullableCreateRunTest struct { + value *CreateRunTest + isSet bool +} + +func (v NullableCreateRunTest) Get() *CreateRunTest { + return v.value +} + +func (v *NullableCreateRunTest) Set(val *CreateRunTest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateRunTest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateRunTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateRunTest(val *CreateRunTest) *NullableCreateRunTest { + return &NullableCreateRunTest{value: val, isSet: true} +} + +func (v NullableCreateRunTest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateRunTest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_create_score.go b/go/futureagi/model_create_score.go new file mode 100644 index 0000000..1c9f9ca --- /dev/null +++ b/go/futureagi/model_create_score.go @@ -0,0 +1,368 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateScore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateScore{} + +// CreateScore struct for CreateScore +type CreateScore struct { + SourceType string `json:"source_type"` + SourceId string `json:"source_id"` + LabelId string `json:"label_id"` + Value map[string]interface{} `json:"value"` + Notes *string `json:"notes,omitempty"` + ScoreSource *string `json:"score_source,omitempty"` + QueueItemId NullableString `json:"queue_item_id,omitempty"` +} + +type _CreateScore CreateScore + +// NewCreateScore instantiates a new CreateScore object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateScore(sourceType string, sourceId string, labelId string, value map[string]interface{}) *CreateScore { + this := CreateScore{} + this.SourceType = sourceType + this.SourceId = sourceId + this.LabelId = labelId + this.Value = value + var notes string = "" + this.Notes = ¬es + var scoreSource string = "human" + this.ScoreSource = &scoreSource + return &this +} + +// NewCreateScoreWithDefaults instantiates a new CreateScore object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateScoreWithDefaults() *CreateScore { + this := CreateScore{} + var notes string = "" + this.Notes = ¬es + var scoreSource string = "human" + this.ScoreSource = &scoreSource + return &this +} + +// GetSourceType returns the SourceType field value +func (o *CreateScore) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *CreateScore) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *CreateScore) SetSourceType(v string) { + o.SourceType = v +} + +// GetSourceId returns the SourceId field value +func (o *CreateScore) GetSourceId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value +// and a boolean to check if the value has been set. +func (o *CreateScore) GetSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceId, true +} + +// SetSourceId sets field value +func (o *CreateScore) SetSourceId(v string) { + o.SourceId = v +} + +// GetLabelId returns the LabelId field value +func (o *CreateScore) GetLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value +// and a boolean to check if the value has been set. +func (o *CreateScore) GetLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelId, true +} + +// SetLabelId sets field value +func (o *CreateScore) SetLabelId(v string) { + o.LabelId = v +} + +// GetValue returns the Value field value +func (o *CreateScore) GetValue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CreateScore) GetValueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *CreateScore) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *CreateScore) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScore) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *CreateScore) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *CreateScore) SetNotes(v string) { + o.Notes = &v +} + +// GetScoreSource returns the ScoreSource field value if set, zero value otherwise. +func (o *CreateScore) GetScoreSource() string { + if o == nil || IsNil(o.ScoreSource) { + var ret string + return ret + } + return *o.ScoreSource +} + +// GetScoreSourceOk returns a tuple with the ScoreSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScore) GetScoreSourceOk() (*string, bool) { + if o == nil || IsNil(o.ScoreSource) { + return nil, false + } + return o.ScoreSource, true +} + +// HasScoreSource returns a boolean if a field has been set. +func (o *CreateScore) HasScoreSource() bool { + if o != nil && !IsNil(o.ScoreSource) { + return true + } + + return false +} + +// SetScoreSource gets a reference to the given string and assigns it to the ScoreSource field. +func (o *CreateScore) SetScoreSource(v string) { + o.ScoreSource = &v +} + +// GetQueueItemId returns the QueueItemId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateScore) GetQueueItemId() string { + if o == nil || IsNil(o.QueueItemId.Get()) { + var ret string + return ret + } + return *o.QueueItemId.Get() +} + +// GetQueueItemIdOk returns a tuple with the QueueItemId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateScore) GetQueueItemIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.QueueItemId.Get(), o.QueueItemId.IsSet() +} + +// HasQueueItemId returns a boolean if a field has been set. +func (o *CreateScore) HasQueueItemId() bool { + if o != nil && o.QueueItemId.IsSet() { + return true + } + + return false +} + +// SetQueueItemId gets a reference to the given NullableString and assigns it to the QueueItemId field. +func (o *CreateScore) SetQueueItemId(v string) { + o.QueueItemId.Set(&v) +} + +// SetQueueItemIdNil sets the value for QueueItemId to be an explicit nil +func (o *CreateScore) SetQueueItemIdNil() { + o.QueueItemId.Set(nil) +} + +// UnsetQueueItemId ensures that no value is present for QueueItemId, not even an explicit nil +func (o *CreateScore) UnsetQueueItemId() { + o.QueueItemId.Unset() +} + +func (o CreateScore) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateScore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source_type"] = o.SourceType + toSerialize["source_id"] = o.SourceId + toSerialize["label_id"] = o.LabelId + toSerialize["value"] = o.Value + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if !IsNil(o.ScoreSource) { + toSerialize["score_source"] = o.ScoreSource + } + if o.QueueItemId.IsSet() { + toSerialize["queue_item_id"] = o.QueueItemId.Get() + } + return toSerialize, nil +} + +func (o *CreateScore) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source_type", + "source_id", + "label_id", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateScore := _CreateScore{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateScore) + + if err != nil { + return err + } + + *o = CreateScore(varCreateScore) + + return err +} + +type NullableCreateScore struct { + value *CreateScore + isSet bool +} + +func (v NullableCreateScore) Get() *CreateScore { + return v.value +} + +func (v *NullableCreateScore) Set(val *CreateScore) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScore) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScore(val *CreateScore) *NullableCreateScore { + return &NullableCreateScore{value: val, isSet: true} +} + +func (v NullableCreateScore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset.go b/go/futureagi/model_dataset.go new file mode 100644 index 0000000..c70c3a5 --- /dev/null +++ b/go/futureagi/model_dataset.go @@ -0,0 +1,340 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Dataset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Dataset{} + +// Dataset struct for Dataset +type Dataset struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Organization string `json:"organization"` + ModelType *string `json:"model_type,omitempty"` + Source *string `json:"source,omitempty"` + User NullableString `json:"user,omitempty"` +} + +type _Dataset Dataset + +// NewDataset instantiates a new Dataset object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDataset(name string, organization string) *Dataset { + this := Dataset{} + this.Name = name + this.Organization = organization + return &this +} + +// NewDatasetWithDefaults instantiates a new Dataset object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetWithDefaults() *Dataset { + this := Dataset{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Dataset) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dataset) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Dataset) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Dataset) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *Dataset) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Dataset) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Dataset) SetName(v string) { + o.Name = v +} + +// GetOrganization returns the Organization field value +func (o *Dataset) GetOrganization() string { + if o == nil { + var ret string + return ret + } + + return o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value +// and a boolean to check if the value has been set. +func (o *Dataset) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Organization, true +} + +// SetOrganization sets field value +func (o *Dataset) SetOrganization(v string) { + o.Organization = v +} + +// GetModelType returns the ModelType field value if set, zero value otherwise. +func (o *Dataset) GetModelType() string { + if o == nil || IsNil(o.ModelType) { + var ret string + return ret + } + return *o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dataset) GetModelTypeOk() (*string, bool) { + if o == nil || IsNil(o.ModelType) { + return nil, false + } + return o.ModelType, true +} + +// HasModelType returns a boolean if a field has been set. +func (o *Dataset) HasModelType() bool { + if o != nil && !IsNil(o.ModelType) { + return true + } + + return false +} + +// SetModelType gets a reference to the given string and assigns it to the ModelType field. +func (o *Dataset) SetModelType(v string) { + o.ModelType = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *Dataset) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dataset) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *Dataset) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *Dataset) SetSource(v string) { + o.Source = &v +} + +// GetUser returns the User field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Dataset) GetUser() string { + if o == nil || IsNil(o.User.Get()) { + var ret string + return ret + } + return *o.User.Get() +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Dataset) GetUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.User.Get(), o.User.IsSet() +} + +// HasUser returns a boolean if a field has been set. +func (o *Dataset) HasUser() bool { + if o != nil && o.User.IsSet() { + return true + } + + return false +} + +// SetUser gets a reference to the given NullableString and assigns it to the User field. +func (o *Dataset) SetUser(v string) { + o.User.Set(&v) +} + +// SetUserNil sets the value for User to be an explicit nil +func (o *Dataset) SetUserNil() { + o.User.Set(nil) +} + +// UnsetUser ensures that no value is present for User, not even an explicit nil +func (o *Dataset) UnsetUser() { + o.User.Unset() +} + +func (o Dataset) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Dataset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + toSerialize["organization"] = o.Organization + if !IsNil(o.ModelType) { + toSerialize["model_type"] = o.ModelType + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if o.User.IsSet() { + toSerialize["user"] = o.User.Get() + } + return toSerialize, nil +} + +func (o *Dataset) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "organization", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataset := _Dataset{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataset) + + if err != nil { + return err + } + + *o = Dataset(varDataset) + + return err +} + +type NullableDataset struct { + value *Dataset + isSet bool +} + +func (v NullableDataset) Get() *Dataset { + return v.value +} + +func (v *NullableDataset) Set(val *Dataset) { + v.value = val + v.isSet = true +} + +func (v NullableDataset) IsSet() bool { + return v.isSet +} + +func (v *NullableDataset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataset(val *Dataset) *NullableDataset { + return &NullableDataset{value: val, isSet: true} +} + +func (v NullableDataset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_add_columns_request.go b/go/futureagi/model_dataset_add_columns_request.go new file mode 100644 index 0000000..ec7daa9 --- /dev/null +++ b/go/futureagi/model_dataset_add_columns_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetAddColumnsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetAddColumnsRequest{} + +// DatasetAddColumnsRequest struct for DatasetAddColumnsRequest +type DatasetAddColumnsRequest struct { + NewColumnsData []map[string]interface{} `json:"new_columns_data"` +} + +type _DatasetAddColumnsRequest DatasetAddColumnsRequest + +// NewDatasetAddColumnsRequest instantiates a new DatasetAddColumnsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetAddColumnsRequest(newColumnsData []map[string]interface{}) *DatasetAddColumnsRequest { + this := DatasetAddColumnsRequest{} + this.NewColumnsData = newColumnsData + return &this +} + +// NewDatasetAddColumnsRequestWithDefaults instantiates a new DatasetAddColumnsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetAddColumnsRequestWithDefaults() *DatasetAddColumnsRequest { + this := DatasetAddColumnsRequest{} + return &this +} + +// GetNewColumnsData returns the NewColumnsData field value +func (o *DatasetAddColumnsRequest) GetNewColumnsData() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.NewColumnsData +} + +// GetNewColumnsDataOk returns a tuple with the NewColumnsData field value +// and a boolean to check if the value has been set. +func (o *DatasetAddColumnsRequest) GetNewColumnsDataOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.NewColumnsData, true +} + +// SetNewColumnsData sets field value +func (o *DatasetAddColumnsRequest) SetNewColumnsData(v []map[string]interface{}) { + o.NewColumnsData = v +} + +func (o DatasetAddColumnsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetAddColumnsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["new_columns_data"] = o.NewColumnsData + return toSerialize, nil +} + +func (o *DatasetAddColumnsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "new_columns_data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetAddColumnsRequest := _DatasetAddColumnsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetAddColumnsRequest) + + if err != nil { + return err + } + + *o = DatasetAddColumnsRequest(varDatasetAddColumnsRequest) + + return err +} + +type NullableDatasetAddColumnsRequest struct { + value *DatasetAddColumnsRequest + isSet bool +} + +func (v NullableDatasetAddColumnsRequest) Get() *DatasetAddColumnsRequest { + return v.value +} + +func (v *NullableDatasetAddColumnsRequest) Set(val *DatasetAddColumnsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetAddColumnsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetAddColumnsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetAddColumnsRequest(val *DatasetAddColumnsRequest) *NullableDatasetAddColumnsRequest { + return &NullableDatasetAddColumnsRequest{value: val, isSet: true} +} + +func (v NullableDatasetAddColumnsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetAddColumnsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_add_empty_columns_request.go b/go/futureagi/model_dataset_add_empty_columns_request.go new file mode 100644 index 0000000..90118c0 --- /dev/null +++ b/go/futureagi/model_dataset_add_empty_columns_request.go @@ -0,0 +1,129 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DatasetAddEmptyColumnsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetAddEmptyColumnsRequest{} + +// DatasetAddEmptyColumnsRequest struct for DatasetAddEmptyColumnsRequest +type DatasetAddEmptyColumnsRequest struct { + NumCols *int32 `json:"num_cols,omitempty"` +} + +// NewDatasetAddEmptyColumnsRequest instantiates a new DatasetAddEmptyColumnsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetAddEmptyColumnsRequest() *DatasetAddEmptyColumnsRequest { + this := DatasetAddEmptyColumnsRequest{} + var numCols int32 = 0 + this.NumCols = &numCols + return &this +} + +// NewDatasetAddEmptyColumnsRequestWithDefaults instantiates a new DatasetAddEmptyColumnsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetAddEmptyColumnsRequestWithDefaults() *DatasetAddEmptyColumnsRequest { + this := DatasetAddEmptyColumnsRequest{} + var numCols int32 = 0 + this.NumCols = &numCols + return &this +} + +// GetNumCols returns the NumCols field value if set, zero value otherwise. +func (o *DatasetAddEmptyColumnsRequest) GetNumCols() int32 { + if o == nil || IsNil(o.NumCols) { + var ret int32 + return ret + } + return *o.NumCols +} + +// GetNumColsOk returns a tuple with the NumCols field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetAddEmptyColumnsRequest) GetNumColsOk() (*int32, bool) { + if o == nil || IsNil(o.NumCols) { + return nil, false + } + return o.NumCols, true +} + +// HasNumCols returns a boolean if a field has been set. +func (o *DatasetAddEmptyColumnsRequest) HasNumCols() bool { + if o != nil && !IsNil(o.NumCols) { + return true + } + + return false +} + +// SetNumCols gets a reference to the given int32 and assigns it to the NumCols field. +func (o *DatasetAddEmptyColumnsRequest) SetNumCols(v int32) { + o.NumCols = &v +} + +func (o DatasetAddEmptyColumnsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetAddEmptyColumnsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NumCols) { + toSerialize["num_cols"] = o.NumCols + } + return toSerialize, nil +} + +type NullableDatasetAddEmptyColumnsRequest struct { + value *DatasetAddEmptyColumnsRequest + isSet bool +} + +func (v NullableDatasetAddEmptyColumnsRequest) Get() *DatasetAddEmptyColumnsRequest { + return v.value +} + +func (v *NullableDatasetAddEmptyColumnsRequest) Set(val *DatasetAddEmptyColumnsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetAddEmptyColumnsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetAddEmptyColumnsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetAddEmptyColumnsRequest(val *DatasetAddEmptyColumnsRequest) *NullableDatasetAddEmptyColumnsRequest { + return &NullableDatasetAddEmptyColumnsRequest{value: val, isSet: true} +} + +func (v NullableDatasetAddEmptyColumnsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetAddEmptyColumnsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_add_empty_rows_request.go b/go/futureagi/model_dataset_add_empty_rows_request.go new file mode 100644 index 0000000..38722be --- /dev/null +++ b/go/futureagi/model_dataset_add_empty_rows_request.go @@ -0,0 +1,129 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DatasetAddEmptyRowsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetAddEmptyRowsRequest{} + +// DatasetAddEmptyRowsRequest struct for DatasetAddEmptyRowsRequest +type DatasetAddEmptyRowsRequest struct { + NumRows *int32 `json:"num_rows,omitempty"` +} + +// NewDatasetAddEmptyRowsRequest instantiates a new DatasetAddEmptyRowsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetAddEmptyRowsRequest() *DatasetAddEmptyRowsRequest { + this := DatasetAddEmptyRowsRequest{} + var numRows int32 = 1 + this.NumRows = &numRows + return &this +} + +// NewDatasetAddEmptyRowsRequestWithDefaults instantiates a new DatasetAddEmptyRowsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetAddEmptyRowsRequestWithDefaults() *DatasetAddEmptyRowsRequest { + this := DatasetAddEmptyRowsRequest{} + var numRows int32 = 1 + this.NumRows = &numRows + return &this +} + +// GetNumRows returns the NumRows field value if set, zero value otherwise. +func (o *DatasetAddEmptyRowsRequest) GetNumRows() int32 { + if o == nil || IsNil(o.NumRows) { + var ret int32 + return ret + } + return *o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetAddEmptyRowsRequest) GetNumRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NumRows) { + return nil, false + } + return o.NumRows, true +} + +// HasNumRows returns a boolean if a field has been set. +func (o *DatasetAddEmptyRowsRequest) HasNumRows() bool { + if o != nil && !IsNil(o.NumRows) { + return true + } + + return false +} + +// SetNumRows gets a reference to the given int32 and assigns it to the NumRows field. +func (o *DatasetAddEmptyRowsRequest) SetNumRows(v int32) { + o.NumRows = &v +} + +func (o DatasetAddEmptyRowsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetAddEmptyRowsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NumRows) { + toSerialize["num_rows"] = o.NumRows + } + return toSerialize, nil +} + +type NullableDatasetAddEmptyRowsRequest struct { + value *DatasetAddEmptyRowsRequest + isSet bool +} + +func (v NullableDatasetAddEmptyRowsRequest) Get() *DatasetAddEmptyRowsRequest { + return v.value +} + +func (v *NullableDatasetAddEmptyRowsRequest) Set(val *DatasetAddEmptyRowsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetAddEmptyRowsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetAddEmptyRowsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetAddEmptyRowsRequest(val *DatasetAddEmptyRowsRequest) *NullableDatasetAddEmptyRowsRequest { + return &NullableDatasetAddEmptyRowsRequest{value: val, isSet: true} +} + +func (v NullableDatasetAddEmptyRowsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetAddEmptyRowsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_add_rows_from_existing_request.go b/go/futureagi/model_dataset_add_rows_from_existing_request.go new file mode 100644 index 0000000..11239f8 --- /dev/null +++ b/go/futureagi/model_dataset_add_rows_from_existing_request.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetAddRowsFromExistingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetAddRowsFromExistingRequest{} + +// DatasetAddRowsFromExistingRequest struct for DatasetAddRowsFromExistingRequest +type DatasetAddRowsFromExistingRequest struct { + SourceDatasetId string `json:"source_dataset_id"` + ColumnMapping map[string]string `json:"column_mapping"` +} + +type _DatasetAddRowsFromExistingRequest DatasetAddRowsFromExistingRequest + +// NewDatasetAddRowsFromExistingRequest instantiates a new DatasetAddRowsFromExistingRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetAddRowsFromExistingRequest(sourceDatasetId string, columnMapping map[string]string) *DatasetAddRowsFromExistingRequest { + this := DatasetAddRowsFromExistingRequest{} + this.SourceDatasetId = sourceDatasetId + this.ColumnMapping = columnMapping + return &this +} + +// NewDatasetAddRowsFromExistingRequestWithDefaults instantiates a new DatasetAddRowsFromExistingRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetAddRowsFromExistingRequestWithDefaults() *DatasetAddRowsFromExistingRequest { + this := DatasetAddRowsFromExistingRequest{} + return &this +} + +// GetSourceDatasetId returns the SourceDatasetId field value +func (o *DatasetAddRowsFromExistingRequest) GetSourceDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceDatasetId +} + +// GetSourceDatasetIdOk returns a tuple with the SourceDatasetId field value +// and a boolean to check if the value has been set. +func (o *DatasetAddRowsFromExistingRequest) GetSourceDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceDatasetId, true +} + +// SetSourceDatasetId sets field value +func (o *DatasetAddRowsFromExistingRequest) SetSourceDatasetId(v string) { + o.SourceDatasetId = v +} + +// GetColumnMapping returns the ColumnMapping field value +func (o *DatasetAddRowsFromExistingRequest) GetColumnMapping() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.ColumnMapping +} + +// GetColumnMappingOk returns a tuple with the ColumnMapping field value +// and a boolean to check if the value has been set. +func (o *DatasetAddRowsFromExistingRequest) GetColumnMappingOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnMapping, true +} + +// SetColumnMapping sets field value +func (o *DatasetAddRowsFromExistingRequest) SetColumnMapping(v map[string]string) { + o.ColumnMapping = v +} + +func (o DatasetAddRowsFromExistingRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetAddRowsFromExistingRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["source_dataset_id"] = o.SourceDatasetId + toSerialize["column_mapping"] = o.ColumnMapping + return toSerialize, nil +} + +func (o *DatasetAddRowsFromExistingRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source_dataset_id", + "column_mapping", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetAddRowsFromExistingRequest := _DatasetAddRowsFromExistingRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetAddRowsFromExistingRequest) + + if err != nil { + return err + } + + *o = DatasetAddRowsFromExistingRequest(varDatasetAddRowsFromExistingRequest) + + return err +} + +type NullableDatasetAddRowsFromExistingRequest struct { + value *DatasetAddRowsFromExistingRequest + isSet bool +} + +func (v NullableDatasetAddRowsFromExistingRequest) Get() *DatasetAddRowsFromExistingRequest { + return v.value +} + +func (v *NullableDatasetAddRowsFromExistingRequest) Set(val *DatasetAddRowsFromExistingRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetAddRowsFromExistingRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetAddRowsFromExistingRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetAddRowsFromExistingRequest(val *DatasetAddRowsFromExistingRequest) *NullableDatasetAddRowsFromExistingRequest { + return &NullableDatasetAddRowsFromExistingRequest{value: val, isSet: true} +} + +func (v NullableDatasetAddRowsFromExistingRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetAddRowsFromExistingRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_add_rows_request.go b/go/futureagi/model_dataset_add_rows_request.go new file mode 100644 index 0000000..6975421 --- /dev/null +++ b/go/futureagi/model_dataset_add_rows_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetAddRowsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetAddRowsRequest{} + +// DatasetAddRowsRequest struct for DatasetAddRowsRequest +type DatasetAddRowsRequest struct { + Rows []map[string]interface{} `json:"rows"` +} + +type _DatasetAddRowsRequest DatasetAddRowsRequest + +// NewDatasetAddRowsRequest instantiates a new DatasetAddRowsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetAddRowsRequest(rows []map[string]interface{}) *DatasetAddRowsRequest { + this := DatasetAddRowsRequest{} + this.Rows = rows + return &this +} + +// NewDatasetAddRowsRequestWithDefaults instantiates a new DatasetAddRowsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetAddRowsRequestWithDefaults() *DatasetAddRowsRequest { + this := DatasetAddRowsRequest{} + return &this +} + +// GetRows returns the Rows field value +func (o *DatasetAddRowsRequest) GetRows() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Rows +} + +// GetRowsOk returns a tuple with the Rows field value +// and a boolean to check if the value has been set. +func (o *DatasetAddRowsRequest) GetRowsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Rows, true +} + +// SetRows sets field value +func (o *DatasetAddRowsRequest) SetRows(v []map[string]interface{}) { + o.Rows = v +} + +func (o DatasetAddRowsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetAddRowsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["rows"] = o.Rows + return toSerialize, nil +} + +func (o *DatasetAddRowsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rows", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetAddRowsRequest := _DatasetAddRowsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetAddRowsRequest) + + if err != nil { + return err + } + + *o = DatasetAddRowsRequest(varDatasetAddRowsRequest) + + return err +} + +type NullableDatasetAddRowsRequest struct { + value *DatasetAddRowsRequest + isSet bool +} + +func (v NullableDatasetAddRowsRequest) Get() *DatasetAddRowsRequest { + return v.value +} + +func (v *NullableDatasetAddRowsRequest) Set(val *DatasetAddRowsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetAddRowsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetAddRowsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetAddRowsRequest(val *DatasetAddRowsRequest) *NullableDatasetAddRowsRequest { + return &NullableDatasetAddRowsRequest{value: val, isSet: true} +} + +func (v NullableDatasetAddRowsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetAddRowsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_behavior_request.go b/go/futureagi/model_dataset_behavior_request.go new file mode 100644 index 0000000..b5939ed --- /dev/null +++ b/go/futureagi/model_dataset_behavior_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DatasetBehaviorRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetBehaviorRequest{} + +// DatasetBehaviorRequest struct for DatasetBehaviorRequest +type DatasetBehaviorRequest struct { + DatasetName *string `json:"dataset_name,omitempty"` + ColumnOrder []string `json:"column_order,omitempty"` + ColumnConfig map[string]interface{} `json:"column_config,omitempty"` + DatasetConfig map[string]interface{} `json:"dataset_config,omitempty"` +} + +// NewDatasetBehaviorRequest instantiates a new DatasetBehaviorRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetBehaviorRequest() *DatasetBehaviorRequest { + this := DatasetBehaviorRequest{} + return &this +} + +// NewDatasetBehaviorRequestWithDefaults instantiates a new DatasetBehaviorRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetBehaviorRequestWithDefaults() *DatasetBehaviorRequest { + this := DatasetBehaviorRequest{} + return &this +} + +// GetDatasetName returns the DatasetName field value if set, zero value otherwise. +func (o *DatasetBehaviorRequest) GetDatasetName() string { + if o == nil || IsNil(o.DatasetName) { + var ret string + return ret + } + return *o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetBehaviorRequest) GetDatasetNameOk() (*string, bool) { + if o == nil || IsNil(o.DatasetName) { + return nil, false + } + return o.DatasetName, true +} + +// HasDatasetName returns a boolean if a field has been set. +func (o *DatasetBehaviorRequest) HasDatasetName() bool { + if o != nil && !IsNil(o.DatasetName) { + return true + } + + return false +} + +// SetDatasetName gets a reference to the given string and assigns it to the DatasetName field. +func (o *DatasetBehaviorRequest) SetDatasetName(v string) { + o.DatasetName = &v +} + +// GetColumnOrder returns the ColumnOrder field value if set, zero value otherwise. +func (o *DatasetBehaviorRequest) GetColumnOrder() []string { + if o == nil || IsNil(o.ColumnOrder) { + var ret []string + return ret + } + return o.ColumnOrder +} + +// GetColumnOrderOk returns a tuple with the ColumnOrder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetBehaviorRequest) GetColumnOrderOk() ([]string, bool) { + if o == nil || IsNil(o.ColumnOrder) { + return nil, false + } + return o.ColumnOrder, true +} + +// HasColumnOrder returns a boolean if a field has been set. +func (o *DatasetBehaviorRequest) HasColumnOrder() bool { + if o != nil && !IsNil(o.ColumnOrder) { + return true + } + + return false +} + +// SetColumnOrder gets a reference to the given []string and assigns it to the ColumnOrder field. +func (o *DatasetBehaviorRequest) SetColumnOrder(v []string) { + o.ColumnOrder = v +} + +// GetColumnConfig returns the ColumnConfig field value if set, zero value otherwise. +func (o *DatasetBehaviorRequest) GetColumnConfig() map[string]interface{} { + if o == nil || IsNil(o.ColumnConfig) { + var ret map[string]interface{} + return ret + } + return o.ColumnConfig +} + +// GetColumnConfigOk returns a tuple with the ColumnConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetBehaviorRequest) GetColumnConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ColumnConfig) { + return map[string]interface{}{}, false + } + return o.ColumnConfig, true +} + +// HasColumnConfig returns a boolean if a field has been set. +func (o *DatasetBehaviorRequest) HasColumnConfig() bool { + if o != nil && !IsNil(o.ColumnConfig) { + return true + } + + return false +} + +// SetColumnConfig gets a reference to the given map[string]interface{} and assigns it to the ColumnConfig field. +func (o *DatasetBehaviorRequest) SetColumnConfig(v map[string]interface{}) { + o.ColumnConfig = v +} + +// GetDatasetConfig returns the DatasetConfig field value if set, zero value otherwise. +func (o *DatasetBehaviorRequest) GetDatasetConfig() map[string]interface{} { + if o == nil || IsNil(o.DatasetConfig) { + var ret map[string]interface{} + return ret + } + return o.DatasetConfig +} + +// GetDatasetConfigOk returns a tuple with the DatasetConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetBehaviorRequest) GetDatasetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DatasetConfig) { + return map[string]interface{}{}, false + } + return o.DatasetConfig, true +} + +// HasDatasetConfig returns a boolean if a field has been set. +func (o *DatasetBehaviorRequest) HasDatasetConfig() bool { + if o != nil && !IsNil(o.DatasetConfig) { + return true + } + + return false +} + +// SetDatasetConfig gets a reference to the given map[string]interface{} and assigns it to the DatasetConfig field. +func (o *DatasetBehaviorRequest) SetDatasetConfig(v map[string]interface{}) { + o.DatasetConfig = v +} + +func (o DatasetBehaviorRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetBehaviorRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DatasetName) { + toSerialize["dataset_name"] = o.DatasetName + } + if !IsNil(o.ColumnOrder) { + toSerialize["column_order"] = o.ColumnOrder + } + if !IsNil(o.ColumnConfig) { + toSerialize["column_config"] = o.ColumnConfig + } + if !IsNil(o.DatasetConfig) { + toSerialize["dataset_config"] = o.DatasetConfig + } + return toSerialize, nil +} + +type NullableDatasetBehaviorRequest struct { + value *DatasetBehaviorRequest + isSet bool +} + +func (v NullableDatasetBehaviorRequest) Get() *DatasetBehaviorRequest { + return v.value +} + +func (v *NullableDatasetBehaviorRequest) Set(val *DatasetBehaviorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetBehaviorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetBehaviorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetBehaviorRequest(val *DatasetBehaviorRequest) *NullableDatasetBehaviorRequest { + return &NullableDatasetBehaviorRequest{value: val, isSet: true} +} + +func (v NullableDatasetBehaviorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetBehaviorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_cell_data_request.go b/go/futureagi/model_dataset_cell_data_request.go new file mode 100644 index 0000000..88c3249 --- /dev/null +++ b/go/futureagi/model_dataset_cell_data_request.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCellDataRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCellDataRequest{} + +// DatasetCellDataRequest struct for DatasetCellDataRequest +type DatasetCellDataRequest struct { + RowIds []string `json:"row_ids"` + ColumnIds []string `json:"column_ids"` +} + +type _DatasetCellDataRequest DatasetCellDataRequest + +// NewDatasetCellDataRequest instantiates a new DatasetCellDataRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCellDataRequest(rowIds []string, columnIds []string) *DatasetCellDataRequest { + this := DatasetCellDataRequest{} + this.RowIds = rowIds + this.ColumnIds = columnIds + return &this +} + +// NewDatasetCellDataRequestWithDefaults instantiates a new DatasetCellDataRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCellDataRequestWithDefaults() *DatasetCellDataRequest { + this := DatasetCellDataRequest{} + return &this +} + +// GetRowIds returns the RowIds field value +func (o *DatasetCellDataRequest) GetRowIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.RowIds +} + +// GetRowIdsOk returns a tuple with the RowIds field value +// and a boolean to check if the value has been set. +func (o *DatasetCellDataRequest) GetRowIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.RowIds, true +} + +// SetRowIds sets field value +func (o *DatasetCellDataRequest) SetRowIds(v []string) { + o.RowIds = v +} + +// GetColumnIds returns the ColumnIds field value +func (o *DatasetCellDataRequest) GetColumnIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ColumnIds +} + +// GetColumnIdsOk returns a tuple with the ColumnIds field value +// and a boolean to check if the value has been set. +func (o *DatasetCellDataRequest) GetColumnIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ColumnIds, true +} + +// SetColumnIds sets field value +func (o *DatasetCellDataRequest) SetColumnIds(v []string) { + o.ColumnIds = v +} + +func (o DatasetCellDataRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCellDataRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["row_ids"] = o.RowIds + toSerialize["column_ids"] = o.ColumnIds + return toSerialize, nil +} + +func (o *DatasetCellDataRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "row_ids", + "column_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCellDataRequest := _DatasetCellDataRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCellDataRequest) + + if err != nil { + return err + } + + *o = DatasetCellDataRequest(varDatasetCellDataRequest) + + return err +} + +type NullableDatasetCellDataRequest struct { + value *DatasetCellDataRequest + isSet bool +} + +func (v NullableDatasetCellDataRequest) Get() *DatasetCellDataRequest { + return v.value +} + +func (v *NullableDatasetCellDataRequest) Set(val *DatasetCellDataRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCellDataRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCellDataRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCellDataRequest(val *DatasetCellDataRequest) *NullableDatasetCellDataRequest { + return &NullableDatasetCellDataRequest{value: val, isSet: true} +} + +func (v NullableDatasetCellDataRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCellDataRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_cell_data_response.go b/go/futureagi/model_dataset_cell_data_response.go new file mode 100644 index 0000000..f86644f --- /dev/null +++ b/go/futureagi/model_dataset_cell_data_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCellDataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCellDataResponse{} + +// DatasetCellDataResponse struct for DatasetCellDataResponse +type DatasetCellDataResponse struct { + Status bool `json:"status"` + Result map[string]map[string]DatasetCellValue `json:"result"` +} + +type _DatasetCellDataResponse DatasetCellDataResponse + +// NewDatasetCellDataResponse instantiates a new DatasetCellDataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCellDataResponse(status bool, result map[string]map[string]DatasetCellValue) *DatasetCellDataResponse { + this := DatasetCellDataResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetCellDataResponseWithDefaults instantiates a new DatasetCellDataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCellDataResponseWithDefaults() *DatasetCellDataResponse { + this := DatasetCellDataResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetCellDataResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetCellDataResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetCellDataResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetCellDataResponse) GetResult() map[string]map[string]DatasetCellValue { + if o == nil { + var ret map[string]map[string]DatasetCellValue + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetCellDataResponse) GetResultOk() (*map[string]map[string]DatasetCellValue, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetCellDataResponse) SetResult(v map[string]map[string]DatasetCellValue) { + o.Result = v +} + +func (o DatasetCellDataResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCellDataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetCellDataResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCellDataResponse := _DatasetCellDataResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCellDataResponse) + + if err != nil { + return err + } + + *o = DatasetCellDataResponse(varDatasetCellDataResponse) + + return err +} + +type NullableDatasetCellDataResponse struct { + value *DatasetCellDataResponse + isSet bool +} + +func (v NullableDatasetCellDataResponse) Get() *DatasetCellDataResponse { + return v.value +} + +func (v *NullableDatasetCellDataResponse) Set(val *DatasetCellDataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCellDataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCellDataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCellDataResponse(val *DatasetCellDataResponse) *NullableDatasetCellDataResponse { + return &NullableDatasetCellDataResponse{value: val, isSet: true} +} + +func (v NullableDatasetCellDataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCellDataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_cell_value.go b/go/futureagi/model_dataset_cell_value.go new file mode 100644 index 0000000..79ce7df --- /dev/null +++ b/go/futureagi/model_dataset_cell_value.go @@ -0,0 +1,244 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DatasetCellValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCellValue{} + +// DatasetCellValue struct for DatasetCellValue +type DatasetCellValue struct { + CellValue map[string]interface{} `json:"cell_value,omitempty"` + Status NullableString `json:"status,omitempty"` + ValueInfos map[string]interface{} `json:"value_infos,omitempty"` + FeedbackInfo map[string]interface{} `json:"feedback_info,omitempty"` +} + +// NewDatasetCellValue instantiates a new DatasetCellValue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCellValue() *DatasetCellValue { + this := DatasetCellValue{} + return &this +} + +// NewDatasetCellValueWithDefaults instantiates a new DatasetCellValue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCellValueWithDefaults() *DatasetCellValue { + this := DatasetCellValue{} + return &this +} + +// GetCellValue returns the CellValue field value if set, zero value otherwise. +func (o *DatasetCellValue) GetCellValue() map[string]interface{} { + if o == nil || IsNil(o.CellValue) { + var ret map[string]interface{} + return ret + } + return o.CellValue +} + +// GetCellValueOk returns a tuple with the CellValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetCellValue) GetCellValueOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CellValue) { + return map[string]interface{}{}, false + } + return o.CellValue, true +} + +// HasCellValue returns a boolean if a field has been set. +func (o *DatasetCellValue) HasCellValue() bool { + if o != nil && !IsNil(o.CellValue) { + return true + } + + return false +} + +// SetCellValue gets a reference to the given map[string]interface{} and assigns it to the CellValue field. +func (o *DatasetCellValue) SetCellValue(v map[string]interface{}) { + o.CellValue = v +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCellValue) GetStatus() string { + if o == nil || IsNil(o.Status.Get()) { + var ret string + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCellValue) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *DatasetCellValue) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableString and assigns it to the Status field. +func (o *DatasetCellValue) SetStatus(v string) { + o.Status.Set(&v) +} + +// SetStatusNil sets the value for Status to be an explicit nil +func (o *DatasetCellValue) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *DatasetCellValue) UnsetStatus() { + o.Status.Unset() +} + +// GetValueInfos returns the ValueInfos field value if set, zero value otherwise. +func (o *DatasetCellValue) GetValueInfos() map[string]interface{} { + if o == nil || IsNil(o.ValueInfos) { + var ret map[string]interface{} + return ret + } + return o.ValueInfos +} + +// GetValueInfosOk returns a tuple with the ValueInfos field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetCellValue) GetValueInfosOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ValueInfos) { + return map[string]interface{}{}, false + } + return o.ValueInfos, true +} + +// HasValueInfos returns a boolean if a field has been set. +func (o *DatasetCellValue) HasValueInfos() bool { + if o != nil && !IsNil(o.ValueInfos) { + return true + } + + return false +} + +// SetValueInfos gets a reference to the given map[string]interface{} and assigns it to the ValueInfos field. +func (o *DatasetCellValue) SetValueInfos(v map[string]interface{}) { + o.ValueInfos = v +} + +// GetFeedbackInfo returns the FeedbackInfo field value if set, zero value otherwise. +func (o *DatasetCellValue) GetFeedbackInfo() map[string]interface{} { + if o == nil || IsNil(o.FeedbackInfo) { + var ret map[string]interface{} + return ret + } + return o.FeedbackInfo +} + +// GetFeedbackInfoOk returns a tuple with the FeedbackInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetCellValue) GetFeedbackInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.FeedbackInfo) { + return map[string]interface{}{}, false + } + return o.FeedbackInfo, true +} + +// HasFeedbackInfo returns a boolean if a field has been set. +func (o *DatasetCellValue) HasFeedbackInfo() bool { + if o != nil && !IsNil(o.FeedbackInfo) { + return true + } + + return false +} + +// SetFeedbackInfo gets a reference to the given map[string]interface{} and assigns it to the FeedbackInfo field. +func (o *DatasetCellValue) SetFeedbackInfo(v map[string]interface{}) { + o.FeedbackInfo = v +} + +func (o DatasetCellValue) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCellValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CellValue) { + toSerialize["cell_value"] = o.CellValue + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + if !IsNil(o.ValueInfos) { + toSerialize["value_infos"] = o.ValueInfos + } + if !IsNil(o.FeedbackInfo) { + toSerialize["feedback_info"] = o.FeedbackInfo + } + return toSerialize, nil +} + +type NullableDatasetCellValue struct { + value *DatasetCellValue + isSet bool +} + +func (v NullableDatasetCellValue) Get() *DatasetCellValue { + return v.value +} + +func (v *NullableDatasetCellValue) Set(val *DatasetCellValue) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCellValue) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCellValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCellValue(val *DatasetCellValue) *NullableDatasetCellValue { + return &NullableDatasetCellValue{value: val, isSet: true} +} + +func (v NullableDatasetCellValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCellValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_column_detail_item.go b/go/futureagi/model_dataset_column_detail_item.go new file mode 100644 index 0000000..2412b3e --- /dev/null +++ b/go/futureagi/model_dataset_column_detail_item.go @@ -0,0 +1,232 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetColumnDetailItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetColumnDetailItem{} + +// DatasetColumnDetailItem struct for DatasetColumnDetailItem +type DatasetColumnDetailItem struct { + Id string `json:"id"` + Name string `json:"name"` + DataType NullableString `json:"data_type,omitempty"` +} + +type _DatasetColumnDetailItem DatasetColumnDetailItem + +// NewDatasetColumnDetailItem instantiates a new DatasetColumnDetailItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetColumnDetailItem(id string, name string) *DatasetColumnDetailItem { + this := DatasetColumnDetailItem{} + this.Id = id + this.Name = name + return &this +} + +// NewDatasetColumnDetailItemWithDefaults instantiates a new DatasetColumnDetailItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetColumnDetailItemWithDefaults() *DatasetColumnDetailItem { + this := DatasetColumnDetailItem{} + return &this +} + +// GetId returns the Id field value +func (o *DatasetColumnDetailItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnDetailItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DatasetColumnDetailItem) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DatasetColumnDetailItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnDetailItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatasetColumnDetailItem) SetName(v string) { + o.Name = v +} + +// GetDataType returns the DataType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetColumnDetailItem) GetDataType() string { + if o == nil || IsNil(o.DataType.Get()) { + var ret string + return ret + } + return *o.DataType.Get() +} + +// GetDataTypeOk returns a tuple with the DataType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetColumnDetailItem) GetDataTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DataType.Get(), o.DataType.IsSet() +} + +// HasDataType returns a boolean if a field has been set. +func (o *DatasetColumnDetailItem) HasDataType() bool { + if o != nil && o.DataType.IsSet() { + return true + } + + return false +} + +// SetDataType gets a reference to the given NullableString and assigns it to the DataType field. +func (o *DatasetColumnDetailItem) SetDataType(v string) { + o.DataType.Set(&v) +} + +// SetDataTypeNil sets the value for DataType to be an explicit nil +func (o *DatasetColumnDetailItem) SetDataTypeNil() { + o.DataType.Set(nil) +} + +// UnsetDataType ensures that no value is present for DataType, not even an explicit nil +func (o *DatasetColumnDetailItem) UnsetDataType() { + o.DataType.Unset() +} + +func (o DatasetColumnDetailItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetColumnDetailItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.DataType.IsSet() { + toSerialize["data_type"] = o.DataType.Get() + } + return toSerialize, nil +} + +func (o *DatasetColumnDetailItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetColumnDetailItem := _DatasetColumnDetailItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetColumnDetailItem) + + if err != nil { + return err + } + + *o = DatasetColumnDetailItem(varDatasetColumnDetailItem) + + return err +} + +type NullableDatasetColumnDetailItem struct { + value *DatasetColumnDetailItem + isSet bool +} + +func (v NullableDatasetColumnDetailItem) Get() *DatasetColumnDetailItem { + return v.value +} + +func (v *NullableDatasetColumnDetailItem) Set(val *DatasetColumnDetailItem) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetColumnDetailItem) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetColumnDetailItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetColumnDetailItem(val *DatasetColumnDetailItem) *NullableDatasetColumnDetailItem { + return &NullableDatasetColumnDetailItem{value: val, isSet: true} +} + +func (v NullableDatasetColumnDetailItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetColumnDetailItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_column_detail_response.go b/go/futureagi/model_dataset_column_detail_response.go new file mode 100644 index 0000000..b9e98de --- /dev/null +++ b/go/futureagi/model_dataset_column_detail_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetColumnDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetColumnDetailResponse{} + +// DatasetColumnDetailResponse struct for DatasetColumnDetailResponse +type DatasetColumnDetailResponse struct { + Status bool `json:"status"` + Result DatasetColumnDetailResult `json:"result"` +} + +type _DatasetColumnDetailResponse DatasetColumnDetailResponse + +// NewDatasetColumnDetailResponse instantiates a new DatasetColumnDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetColumnDetailResponse(status bool, result DatasetColumnDetailResult) *DatasetColumnDetailResponse { + this := DatasetColumnDetailResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetColumnDetailResponseWithDefaults instantiates a new DatasetColumnDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetColumnDetailResponseWithDefaults() *DatasetColumnDetailResponse { + this := DatasetColumnDetailResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetColumnDetailResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnDetailResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetColumnDetailResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetColumnDetailResponse) GetResult() DatasetColumnDetailResult { + if o == nil { + var ret DatasetColumnDetailResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnDetailResponse) GetResultOk() (*DatasetColumnDetailResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetColumnDetailResponse) SetResult(v DatasetColumnDetailResult) { + o.Result = v +} + +func (o DatasetColumnDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetColumnDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetColumnDetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetColumnDetailResponse := _DatasetColumnDetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetColumnDetailResponse) + + if err != nil { + return err + } + + *o = DatasetColumnDetailResponse(varDatasetColumnDetailResponse) + + return err +} + +type NullableDatasetColumnDetailResponse struct { + value *DatasetColumnDetailResponse + isSet bool +} + +func (v NullableDatasetColumnDetailResponse) Get() *DatasetColumnDetailResponse { + return v.value +} + +func (v *NullableDatasetColumnDetailResponse) Set(val *DatasetColumnDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetColumnDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetColumnDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetColumnDetailResponse(val *DatasetColumnDetailResponse) *NullableDatasetColumnDetailResponse { + return &NullableDatasetColumnDetailResponse{value: val, isSet: true} +} + +func (v NullableDatasetColumnDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetColumnDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_column_detail_result.go b/go/futureagi/model_dataset_column_detail_result.go new file mode 100644 index 0000000..9e601ff --- /dev/null +++ b/go/futureagi/model_dataset_column_detail_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetColumnDetailResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetColumnDetailResult{} + +// DatasetColumnDetailResult struct for DatasetColumnDetailResult +type DatasetColumnDetailResult struct { + Columns []DatasetColumnDetailItem `json:"columns"` +} + +type _DatasetColumnDetailResult DatasetColumnDetailResult + +// NewDatasetColumnDetailResult instantiates a new DatasetColumnDetailResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetColumnDetailResult(columns []DatasetColumnDetailItem) *DatasetColumnDetailResult { + this := DatasetColumnDetailResult{} + this.Columns = columns + return &this +} + +// NewDatasetColumnDetailResultWithDefaults instantiates a new DatasetColumnDetailResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetColumnDetailResultWithDefaults() *DatasetColumnDetailResult { + this := DatasetColumnDetailResult{} + return &this +} + +// GetColumns returns the Columns field value +func (o *DatasetColumnDetailResult) GetColumns() []DatasetColumnDetailItem { + if o == nil { + var ret []DatasetColumnDetailItem + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnDetailResult) GetColumnsOk() ([]DatasetColumnDetailItem, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *DatasetColumnDetailResult) SetColumns(v []DatasetColumnDetailItem) { + o.Columns = v +} + +func (o DatasetColumnDetailResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetColumnDetailResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["columns"] = o.Columns + return toSerialize, nil +} + +func (o *DatasetColumnDetailResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "columns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetColumnDetailResult := _DatasetColumnDetailResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetColumnDetailResult) + + if err != nil { + return err + } + + *o = DatasetColumnDetailResult(varDatasetColumnDetailResult) + + return err +} + +type NullableDatasetColumnDetailResult struct { + value *DatasetColumnDetailResult + isSet bool +} + +func (v NullableDatasetColumnDetailResult) Get() *DatasetColumnDetailResult { + return v.value +} + +func (v *NullableDatasetColumnDetailResult) Set(val *DatasetColumnDetailResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetColumnDetailResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetColumnDetailResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetColumnDetailResult(val *DatasetColumnDetailResult) *NullableDatasetColumnDetailResult { + return &NullableDatasetColumnDetailResult{value: val, isSet: true} +} + +func (v NullableDatasetColumnDetailResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetColumnDetailResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_columns_mutation_response.go b/go/futureagi/model_dataset_columns_mutation_response.go new file mode 100644 index 0000000..41e220f --- /dev/null +++ b/go/futureagi/model_dataset_columns_mutation_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetColumnsMutationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetColumnsMutationResponse{} + +// DatasetColumnsMutationResponse struct for DatasetColumnsMutationResponse +type DatasetColumnsMutationResponse struct { + Status bool `json:"status"` + Result DatasetColumnsMutationResult `json:"result"` +} + +type _DatasetColumnsMutationResponse DatasetColumnsMutationResponse + +// NewDatasetColumnsMutationResponse instantiates a new DatasetColumnsMutationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetColumnsMutationResponse(status bool, result DatasetColumnsMutationResult) *DatasetColumnsMutationResponse { + this := DatasetColumnsMutationResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetColumnsMutationResponseWithDefaults instantiates a new DatasetColumnsMutationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetColumnsMutationResponseWithDefaults() *DatasetColumnsMutationResponse { + this := DatasetColumnsMutationResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetColumnsMutationResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnsMutationResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetColumnsMutationResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetColumnsMutationResponse) GetResult() DatasetColumnsMutationResult { + if o == nil { + var ret DatasetColumnsMutationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnsMutationResponse) GetResultOk() (*DatasetColumnsMutationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetColumnsMutationResponse) SetResult(v DatasetColumnsMutationResult) { + o.Result = v +} + +func (o DatasetColumnsMutationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetColumnsMutationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetColumnsMutationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetColumnsMutationResponse := _DatasetColumnsMutationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetColumnsMutationResponse) + + if err != nil { + return err + } + + *o = DatasetColumnsMutationResponse(varDatasetColumnsMutationResponse) + + return err +} + +type NullableDatasetColumnsMutationResponse struct { + value *DatasetColumnsMutationResponse + isSet bool +} + +func (v NullableDatasetColumnsMutationResponse) Get() *DatasetColumnsMutationResponse { + return v.value +} + +func (v *NullableDatasetColumnsMutationResponse) Set(val *DatasetColumnsMutationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetColumnsMutationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetColumnsMutationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetColumnsMutationResponse(val *DatasetColumnsMutationResponse) *NullableDatasetColumnsMutationResponse { + return &NullableDatasetColumnsMutationResponse{value: val, isSet: true} +} + +func (v NullableDatasetColumnsMutationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetColumnsMutationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_columns_mutation_result.go b/go/futureagi/model_dataset_columns_mutation_result.go new file mode 100644 index 0000000..9338276 --- /dev/null +++ b/go/futureagi/model_dataset_columns_mutation_result.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetColumnsMutationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetColumnsMutationResult{} + +// DatasetColumnsMutationResult struct for DatasetColumnsMutationResult +type DatasetColumnsMutationResult struct { + Message string `json:"message"` + Data []Column `json:"data,omitempty"` +} + +type _DatasetColumnsMutationResult DatasetColumnsMutationResult + +// NewDatasetColumnsMutationResult instantiates a new DatasetColumnsMutationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetColumnsMutationResult(message string) *DatasetColumnsMutationResult { + this := DatasetColumnsMutationResult{} + this.Message = message + return &this +} + +// NewDatasetColumnsMutationResultWithDefaults instantiates a new DatasetColumnsMutationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetColumnsMutationResultWithDefaults() *DatasetColumnsMutationResult { + this := DatasetColumnsMutationResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DatasetColumnsMutationResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DatasetColumnsMutationResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DatasetColumnsMutationResult) SetMessage(v string) { + o.Message = v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DatasetColumnsMutationResult) GetData() []Column { + if o == nil || IsNil(o.Data) { + var ret []Column + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetColumnsMutationResult) GetDataOk() ([]Column, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DatasetColumnsMutationResult) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []Column and assigns it to the Data field. +func (o *DatasetColumnsMutationResult) SetData(v []Column) { + o.Data = v +} + +func (o DatasetColumnsMutationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetColumnsMutationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +func (o *DatasetColumnsMutationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetColumnsMutationResult := _DatasetColumnsMutationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetColumnsMutationResult) + + if err != nil { + return err + } + + *o = DatasetColumnsMutationResult(varDatasetColumnsMutationResult) + + return err +} + +type NullableDatasetColumnsMutationResult struct { + value *DatasetColumnsMutationResult + isSet bool +} + +func (v NullableDatasetColumnsMutationResult) Get() *DatasetColumnsMutationResult { + return v.value +} + +func (v *NullableDatasetColumnsMutationResult) Set(val *DatasetColumnsMutationResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetColumnsMutationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetColumnsMutationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetColumnsMutationResult(val *DatasetColumnsMutationResult) *NullableDatasetColumnsMutationResult { + return &NullableDatasetColumnsMutationResult{value: val, isSet: true} +} + +func (v NullableDatasetColumnsMutationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetColumnsMutationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_copy_response.go b/go/futureagi/model_dataset_copy_response.go new file mode 100644 index 0000000..60534e9 --- /dev/null +++ b/go/futureagi/model_dataset_copy_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCopyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCopyResponse{} + +// DatasetCopyResponse struct for DatasetCopyResponse +type DatasetCopyResponse struct { + Status bool `json:"status"` + Result DatasetCopyResult `json:"result"` +} + +type _DatasetCopyResponse DatasetCopyResponse + +// NewDatasetCopyResponse instantiates a new DatasetCopyResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCopyResponse(status bool, result DatasetCopyResult) *DatasetCopyResponse { + this := DatasetCopyResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetCopyResponseWithDefaults instantiates a new DatasetCopyResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCopyResponseWithDefaults() *DatasetCopyResponse { + this := DatasetCopyResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetCopyResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetCopyResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetCopyResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetCopyResponse) GetResult() DatasetCopyResult { + if o == nil { + var ret DatasetCopyResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetCopyResponse) GetResultOk() (*DatasetCopyResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetCopyResponse) SetResult(v DatasetCopyResult) { + o.Result = v +} + +func (o DatasetCopyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCopyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetCopyResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCopyResponse := _DatasetCopyResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCopyResponse) + + if err != nil { + return err + } + + *o = DatasetCopyResponse(varDatasetCopyResponse) + + return err +} + +type NullableDatasetCopyResponse struct { + value *DatasetCopyResponse + isSet bool +} + +func (v NullableDatasetCopyResponse) Get() *DatasetCopyResponse { + return v.value +} + +func (v *NullableDatasetCopyResponse) Set(val *DatasetCopyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCopyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCopyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCopyResponse(val *DatasetCopyResponse) *NullableDatasetCopyResponse { + return &NullableDatasetCopyResponse{value: val, isSet: true} +} + +func (v NullableDatasetCopyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCopyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_copy_result.go b/go/futureagi/model_dataset_copy_result.go new file mode 100644 index 0000000..5e5753c --- /dev/null +++ b/go/futureagi/model_dataset_copy_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCopyResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCopyResult{} + +// DatasetCopyResult struct for DatasetCopyResult +type DatasetCopyResult struct { + Message string `json:"message"` + DatasetId string `json:"dataset_id"` + DatasetName string `json:"dataset_name"` +} + +type _DatasetCopyResult DatasetCopyResult + +// NewDatasetCopyResult instantiates a new DatasetCopyResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCopyResult(message string, datasetId string, datasetName string) *DatasetCopyResult { + this := DatasetCopyResult{} + this.Message = message + this.DatasetId = datasetId + this.DatasetName = datasetName + return &this +} + +// NewDatasetCopyResultWithDefaults instantiates a new DatasetCopyResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCopyResultWithDefaults() *DatasetCopyResult { + this := DatasetCopyResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DatasetCopyResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DatasetCopyResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DatasetCopyResult) SetMessage(v string) { + o.Message = v +} + +// GetDatasetId returns the DatasetId field value +func (o *DatasetCopyResult) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *DatasetCopyResult) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *DatasetCopyResult) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetDatasetName returns the DatasetName field value +func (o *DatasetCopyResult) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *DatasetCopyResult) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *DatasetCopyResult) SetDatasetName(v string) { + o.DatasetName = v +} + +func (o DatasetCopyResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCopyResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["dataset_id"] = o.DatasetId + toSerialize["dataset_name"] = o.DatasetName + return toSerialize, nil +} + +func (o *DatasetCopyResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "dataset_id", + "dataset_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCopyResult := _DatasetCopyResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCopyResult) + + if err != nil { + return err + } + + *o = DatasetCopyResult(varDatasetCopyResult) + + return err +} + +type NullableDatasetCopyResult struct { + value *DatasetCopyResult + isSet bool +} + +func (v NullableDatasetCopyResult) Get() *DatasetCopyResult { + return v.value +} + +func (v *NullableDatasetCopyResult) Set(val *DatasetCopyResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCopyResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCopyResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCopyResult(val *DatasetCopyResult) *NullableDatasetCopyResult { + return &NullableDatasetCopyResult{value: val, isSet: true} +} + +func (v NullableDatasetCopyResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCopyResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_create_started_response.go b/go/futureagi/model_dataset_create_started_response.go new file mode 100644 index 0000000..22996e0 --- /dev/null +++ b/go/futureagi/model_dataset_create_started_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCreateStartedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCreateStartedResponse{} + +// DatasetCreateStartedResponse struct for DatasetCreateStartedResponse +type DatasetCreateStartedResponse struct { + Status bool `json:"status"` + Result DatasetCreateStartedResult `json:"result"` +} + +type _DatasetCreateStartedResponse DatasetCreateStartedResponse + +// NewDatasetCreateStartedResponse instantiates a new DatasetCreateStartedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCreateStartedResponse(status bool, result DatasetCreateStartedResult) *DatasetCreateStartedResponse { + this := DatasetCreateStartedResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetCreateStartedResponseWithDefaults instantiates a new DatasetCreateStartedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCreateStartedResponseWithDefaults() *DatasetCreateStartedResponse { + this := DatasetCreateStartedResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetCreateStartedResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetCreateStartedResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetCreateStartedResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetCreateStartedResponse) GetResult() DatasetCreateStartedResult { + if o == nil { + var ret DatasetCreateStartedResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetCreateStartedResponse) GetResultOk() (*DatasetCreateStartedResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetCreateStartedResponse) SetResult(v DatasetCreateStartedResult) { + o.Result = v +} + +func (o DatasetCreateStartedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCreateStartedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetCreateStartedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCreateStartedResponse := _DatasetCreateStartedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCreateStartedResponse) + + if err != nil { + return err + } + + *o = DatasetCreateStartedResponse(varDatasetCreateStartedResponse) + + return err +} + +type NullableDatasetCreateStartedResponse struct { + value *DatasetCreateStartedResponse + isSet bool +} + +func (v NullableDatasetCreateStartedResponse) Get() *DatasetCreateStartedResponse { + return v.value +} + +func (v *NullableDatasetCreateStartedResponse) Set(val *DatasetCreateStartedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCreateStartedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCreateStartedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCreateStartedResponse(val *DatasetCreateStartedResponse) *NullableDatasetCreateStartedResponse { + return &NullableDatasetCreateStartedResponse{value: val, isSet: true} +} + +func (v NullableDatasetCreateStartedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCreateStartedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_create_started_result.go b/go/futureagi/model_dataset_create_started_result.go new file mode 100644 index 0000000..be9bac9 --- /dev/null +++ b/go/futureagi/model_dataset_create_started_result.go @@ -0,0 +1,260 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCreateStartedResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCreateStartedResult{} + +// DatasetCreateStartedResult struct for DatasetCreateStartedResult +type DatasetCreateStartedResult struct { + Message string `json:"message"` + DatasetId string `json:"dataset_id"` + DatasetName string `json:"dataset_name"` + DatasetModelType NullableString `json:"dataset_model_type,omitempty"` +} + +type _DatasetCreateStartedResult DatasetCreateStartedResult + +// NewDatasetCreateStartedResult instantiates a new DatasetCreateStartedResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCreateStartedResult(message string, datasetId string, datasetName string) *DatasetCreateStartedResult { + this := DatasetCreateStartedResult{} + this.Message = message + this.DatasetId = datasetId + this.DatasetName = datasetName + return &this +} + +// NewDatasetCreateStartedResultWithDefaults instantiates a new DatasetCreateStartedResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCreateStartedResultWithDefaults() *DatasetCreateStartedResult { + this := DatasetCreateStartedResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DatasetCreateStartedResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DatasetCreateStartedResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DatasetCreateStartedResult) SetMessage(v string) { + o.Message = v +} + +// GetDatasetId returns the DatasetId field value +func (o *DatasetCreateStartedResult) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *DatasetCreateStartedResult) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *DatasetCreateStartedResult) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetDatasetName returns the DatasetName field value +func (o *DatasetCreateStartedResult) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *DatasetCreateStartedResult) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *DatasetCreateStartedResult) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetDatasetModelType returns the DatasetModelType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreateStartedResult) GetDatasetModelType() string { + if o == nil || IsNil(o.DatasetModelType.Get()) { + var ret string + return ret + } + return *o.DatasetModelType.Get() +} + +// GetDatasetModelTypeOk returns a tuple with the DatasetModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreateStartedResult) GetDatasetModelTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DatasetModelType.Get(), o.DatasetModelType.IsSet() +} + +// HasDatasetModelType returns a boolean if a field has been set. +func (o *DatasetCreateStartedResult) HasDatasetModelType() bool { + if o != nil && o.DatasetModelType.IsSet() { + return true + } + + return false +} + +// SetDatasetModelType gets a reference to the given NullableString and assigns it to the DatasetModelType field. +func (o *DatasetCreateStartedResult) SetDatasetModelType(v string) { + o.DatasetModelType.Set(&v) +} + +// SetDatasetModelTypeNil sets the value for DatasetModelType to be an explicit nil +func (o *DatasetCreateStartedResult) SetDatasetModelTypeNil() { + o.DatasetModelType.Set(nil) +} + +// UnsetDatasetModelType ensures that no value is present for DatasetModelType, not even an explicit nil +func (o *DatasetCreateStartedResult) UnsetDatasetModelType() { + o.DatasetModelType.Unset() +} + +func (o DatasetCreateStartedResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCreateStartedResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["dataset_id"] = o.DatasetId + toSerialize["dataset_name"] = o.DatasetName + if o.DatasetModelType.IsSet() { + toSerialize["dataset_model_type"] = o.DatasetModelType.Get() + } + return toSerialize, nil +} + +func (o *DatasetCreateStartedResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "dataset_id", + "dataset_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCreateStartedResult := _DatasetCreateStartedResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCreateStartedResult) + + if err != nil { + return err + } + + *o = DatasetCreateStartedResult(varDatasetCreateStartedResult) + + return err +} + +type NullableDatasetCreateStartedResult struct { + value *DatasetCreateStartedResult + isSet bool +} + +func (v NullableDatasetCreateStartedResult) Get() *DatasetCreateStartedResult { + return v.value +} + +func (v *NullableDatasetCreateStartedResult) Set(val *DatasetCreateStartedResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCreateStartedResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCreateStartedResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCreateStartedResult(val *DatasetCreateStartedResult) *NullableDatasetCreateStartedResult { + return &NullableDatasetCreateStartedResult{value: val, isSet: true} +} + +func (v NullableDatasetCreateStartedResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCreateStartedResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_creation_progress_response.go b/go/futureagi/model_dataset_creation_progress_response.go new file mode 100644 index 0000000..94c43c2 --- /dev/null +++ b/go/futureagi/model_dataset_creation_progress_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCreationProgressResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCreationProgressResponse{} + +// DatasetCreationProgressResponse struct for DatasetCreationProgressResponse +type DatasetCreationProgressResponse struct { + Status bool `json:"status"` + Result DatasetCreationProgressResult `json:"result"` +} + +type _DatasetCreationProgressResponse DatasetCreationProgressResponse + +// NewDatasetCreationProgressResponse instantiates a new DatasetCreationProgressResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCreationProgressResponse(status bool, result DatasetCreationProgressResult) *DatasetCreationProgressResponse { + this := DatasetCreationProgressResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetCreationProgressResponseWithDefaults instantiates a new DatasetCreationProgressResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCreationProgressResponseWithDefaults() *DatasetCreationProgressResponse { + this := DatasetCreationProgressResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetCreationProgressResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetCreationProgressResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetCreationProgressResponse) GetResult() DatasetCreationProgressResult { + if o == nil { + var ret DatasetCreationProgressResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResponse) GetResultOk() (*DatasetCreationProgressResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetCreationProgressResponse) SetResult(v DatasetCreationProgressResult) { + o.Result = v +} + +func (o DatasetCreationProgressResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCreationProgressResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetCreationProgressResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCreationProgressResponse := _DatasetCreationProgressResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCreationProgressResponse) + + if err != nil { + return err + } + + *o = DatasetCreationProgressResponse(varDatasetCreationProgressResponse) + + return err +} + +type NullableDatasetCreationProgressResponse struct { + value *DatasetCreationProgressResponse + isSet bool +} + +func (v NullableDatasetCreationProgressResponse) Get() *DatasetCreationProgressResponse { + return v.value +} + +func (v *NullableDatasetCreationProgressResponse) Set(val *DatasetCreationProgressResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCreationProgressResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCreationProgressResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCreationProgressResponse(val *DatasetCreationProgressResponse) *NullableDatasetCreationProgressResponse { + return &NullableDatasetCreationProgressResponse{value: val, isSet: true} +} + +func (v NullableDatasetCreationProgressResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCreationProgressResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_creation_progress_result.go b/go/futureagi/model_dataset_creation_progress_result.go new file mode 100644 index 0000000..a813811 --- /dev/null +++ b/go/futureagi/model_dataset_creation_progress_result.go @@ -0,0 +1,673 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetCreationProgressResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetCreationProgressResult{} + +// DatasetCreationProgressResult struct for DatasetCreationProgressResult +type DatasetCreationProgressResult struct { + DatasetId string `json:"dataset_id"` + DatasetName string `json:"dataset_name"` + ProcessingStatus string `json:"processing_status"` + IsProcessing bool `json:"is_processing"` + IsCompleted bool `json:"is_completed"` + IsFailed bool `json:"is_failed"` + OriginalFilename NullableString `json:"original_filename,omitempty"` + EstimatedRows NullableInt32 `json:"estimated_rows,omitempty"` + EstimatedColumns NullableInt32 `json:"estimated_columns,omitempty"` + QueuedAt NullableString `json:"queued_at,omitempty"` + StartedAt NullableString `json:"started_at,omitempty"` + CompletedAt NullableString `json:"completed_at,omitempty"` + FailedAt NullableString `json:"failed_at,omitempty"` + ErrorMessage NullableString `json:"error_message,omitempty"` +} + +type _DatasetCreationProgressResult DatasetCreationProgressResult + +// NewDatasetCreationProgressResult instantiates a new DatasetCreationProgressResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetCreationProgressResult(datasetId string, datasetName string, processingStatus string, isProcessing bool, isCompleted bool, isFailed bool) *DatasetCreationProgressResult { + this := DatasetCreationProgressResult{} + this.DatasetId = datasetId + this.DatasetName = datasetName + this.ProcessingStatus = processingStatus + this.IsProcessing = isProcessing + this.IsCompleted = isCompleted + this.IsFailed = isFailed + return &this +} + +// NewDatasetCreationProgressResultWithDefaults instantiates a new DatasetCreationProgressResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetCreationProgressResultWithDefaults() *DatasetCreationProgressResult { + this := DatasetCreationProgressResult{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *DatasetCreationProgressResult) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResult) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *DatasetCreationProgressResult) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetDatasetName returns the DatasetName field value +func (o *DatasetCreationProgressResult) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResult) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *DatasetCreationProgressResult) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetProcessingStatus returns the ProcessingStatus field value +func (o *DatasetCreationProgressResult) GetProcessingStatus() string { + if o == nil { + var ret string + return ret + } + + return o.ProcessingStatus +} + +// GetProcessingStatusOk returns a tuple with the ProcessingStatus field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResult) GetProcessingStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProcessingStatus, true +} + +// SetProcessingStatus sets field value +func (o *DatasetCreationProgressResult) SetProcessingStatus(v string) { + o.ProcessingStatus = v +} + +// GetIsProcessing returns the IsProcessing field value +func (o *DatasetCreationProgressResult) GetIsProcessing() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsProcessing +} + +// GetIsProcessingOk returns a tuple with the IsProcessing field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResult) GetIsProcessingOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsProcessing, true +} + +// SetIsProcessing sets field value +func (o *DatasetCreationProgressResult) SetIsProcessing(v bool) { + o.IsProcessing = v +} + +// GetIsCompleted returns the IsCompleted field value +func (o *DatasetCreationProgressResult) GetIsCompleted() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsCompleted +} + +// GetIsCompletedOk returns a tuple with the IsCompleted field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResult) GetIsCompletedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsCompleted, true +} + +// SetIsCompleted sets field value +func (o *DatasetCreationProgressResult) SetIsCompleted(v bool) { + o.IsCompleted = v +} + +// GetIsFailed returns the IsFailed field value +func (o *DatasetCreationProgressResult) GetIsFailed() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsFailed +} + +// GetIsFailedOk returns a tuple with the IsFailed field value +// and a boolean to check if the value has been set. +func (o *DatasetCreationProgressResult) GetIsFailedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsFailed, true +} + +// SetIsFailed sets field value +func (o *DatasetCreationProgressResult) SetIsFailed(v bool) { + o.IsFailed = v +} + +// GetOriginalFilename returns the OriginalFilename field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetOriginalFilename() string { + if o == nil || IsNil(o.OriginalFilename.Get()) { + var ret string + return ret + } + return *o.OriginalFilename.Get() +} + +// GetOriginalFilenameOk returns a tuple with the OriginalFilename field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetOriginalFilenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OriginalFilename.Get(), o.OriginalFilename.IsSet() +} + +// HasOriginalFilename returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasOriginalFilename() bool { + if o != nil && o.OriginalFilename.IsSet() { + return true + } + + return false +} + +// SetOriginalFilename gets a reference to the given NullableString and assigns it to the OriginalFilename field. +func (o *DatasetCreationProgressResult) SetOriginalFilename(v string) { + o.OriginalFilename.Set(&v) +} + +// SetOriginalFilenameNil sets the value for OriginalFilename to be an explicit nil +func (o *DatasetCreationProgressResult) SetOriginalFilenameNil() { + o.OriginalFilename.Set(nil) +} + +// UnsetOriginalFilename ensures that no value is present for OriginalFilename, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetOriginalFilename() { + o.OriginalFilename.Unset() +} + +// GetEstimatedRows returns the EstimatedRows field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetEstimatedRows() int32 { + if o == nil || IsNil(o.EstimatedRows.Get()) { + var ret int32 + return ret + } + return *o.EstimatedRows.Get() +} + +// GetEstimatedRowsOk returns a tuple with the EstimatedRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetEstimatedRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EstimatedRows.Get(), o.EstimatedRows.IsSet() +} + +// HasEstimatedRows returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasEstimatedRows() bool { + if o != nil && o.EstimatedRows.IsSet() { + return true + } + + return false +} + +// SetEstimatedRows gets a reference to the given NullableInt32 and assigns it to the EstimatedRows field. +func (o *DatasetCreationProgressResult) SetEstimatedRows(v int32) { + o.EstimatedRows.Set(&v) +} + +// SetEstimatedRowsNil sets the value for EstimatedRows to be an explicit nil +func (o *DatasetCreationProgressResult) SetEstimatedRowsNil() { + o.EstimatedRows.Set(nil) +} + +// UnsetEstimatedRows ensures that no value is present for EstimatedRows, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetEstimatedRows() { + o.EstimatedRows.Unset() +} + +// GetEstimatedColumns returns the EstimatedColumns field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetEstimatedColumns() int32 { + if o == nil || IsNil(o.EstimatedColumns.Get()) { + var ret int32 + return ret + } + return *o.EstimatedColumns.Get() +} + +// GetEstimatedColumnsOk returns a tuple with the EstimatedColumns field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetEstimatedColumnsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EstimatedColumns.Get(), o.EstimatedColumns.IsSet() +} + +// HasEstimatedColumns returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasEstimatedColumns() bool { + if o != nil && o.EstimatedColumns.IsSet() { + return true + } + + return false +} + +// SetEstimatedColumns gets a reference to the given NullableInt32 and assigns it to the EstimatedColumns field. +func (o *DatasetCreationProgressResult) SetEstimatedColumns(v int32) { + o.EstimatedColumns.Set(&v) +} + +// SetEstimatedColumnsNil sets the value for EstimatedColumns to be an explicit nil +func (o *DatasetCreationProgressResult) SetEstimatedColumnsNil() { + o.EstimatedColumns.Set(nil) +} + +// UnsetEstimatedColumns ensures that no value is present for EstimatedColumns, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetEstimatedColumns() { + o.EstimatedColumns.Unset() +} + +// GetQueuedAt returns the QueuedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetQueuedAt() string { + if o == nil || IsNil(o.QueuedAt.Get()) { + var ret string + return ret + } + return *o.QueuedAt.Get() +} + +// GetQueuedAtOk returns a tuple with the QueuedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetQueuedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.QueuedAt.Get(), o.QueuedAt.IsSet() +} + +// HasQueuedAt returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasQueuedAt() bool { + if o != nil && o.QueuedAt.IsSet() { + return true + } + + return false +} + +// SetQueuedAt gets a reference to the given NullableString and assigns it to the QueuedAt field. +func (o *DatasetCreationProgressResult) SetQueuedAt(v string) { + o.QueuedAt.Set(&v) +} + +// SetQueuedAtNil sets the value for QueuedAt to be an explicit nil +func (o *DatasetCreationProgressResult) SetQueuedAtNil() { + o.QueuedAt.Set(nil) +} + +// UnsetQueuedAt ensures that no value is present for QueuedAt, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetQueuedAt() { + o.QueuedAt.Unset() +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetStartedAt() string { + if o == nil || IsNil(o.StartedAt.Get()) { + var ret string + return ret + } + return *o.StartedAt.Get() +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetStartedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StartedAt.Get(), o.StartedAt.IsSet() +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasStartedAt() bool { + if o != nil && o.StartedAt.IsSet() { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given NullableString and assigns it to the StartedAt field. +func (o *DatasetCreationProgressResult) SetStartedAt(v string) { + o.StartedAt.Set(&v) +} + +// SetStartedAtNil sets the value for StartedAt to be an explicit nil +func (o *DatasetCreationProgressResult) SetStartedAtNil() { + o.StartedAt.Set(nil) +} + +// UnsetStartedAt ensures that no value is present for StartedAt, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetStartedAt() { + o.StartedAt.Unset() +} + +// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetCompletedAt() string { + if o == nil || IsNil(o.CompletedAt.Get()) { + var ret string + return ret + } + return *o.CompletedAt.Get() +} + +// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetCompletedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CompletedAt.Get(), o.CompletedAt.IsSet() +} + +// HasCompletedAt returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasCompletedAt() bool { + if o != nil && o.CompletedAt.IsSet() { + return true + } + + return false +} + +// SetCompletedAt gets a reference to the given NullableString and assigns it to the CompletedAt field. +func (o *DatasetCreationProgressResult) SetCompletedAt(v string) { + o.CompletedAt.Set(&v) +} + +// SetCompletedAtNil sets the value for CompletedAt to be an explicit nil +func (o *DatasetCreationProgressResult) SetCompletedAtNil() { + o.CompletedAt.Set(nil) +} + +// UnsetCompletedAt ensures that no value is present for CompletedAt, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetCompletedAt() { + o.CompletedAt.Unset() +} + +// GetFailedAt returns the FailedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetFailedAt() string { + if o == nil || IsNil(o.FailedAt.Get()) { + var ret string + return ret + } + return *o.FailedAt.Get() +} + +// GetFailedAtOk returns a tuple with the FailedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetFailedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FailedAt.Get(), o.FailedAt.IsSet() +} + +// HasFailedAt returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasFailedAt() bool { + if o != nil && o.FailedAt.IsSet() { + return true + } + + return false +} + +// SetFailedAt gets a reference to the given NullableString and assigns it to the FailedAt field. +func (o *DatasetCreationProgressResult) SetFailedAt(v string) { + o.FailedAt.Set(&v) +} + +// SetFailedAtNil sets the value for FailedAt to be an explicit nil +func (o *DatasetCreationProgressResult) SetFailedAtNil() { + o.FailedAt.Set(nil) +} + +// UnsetFailedAt ensures that no value is present for FailedAt, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetFailedAt() { + o.FailedAt.Unset() +} + +// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetCreationProgressResult) GetErrorMessage() string { + if o == nil || IsNil(o.ErrorMessage.Get()) { + var ret string + return ret + } + return *o.ErrorMessage.Get() +} + +// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetCreationProgressResult) GetErrorMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ErrorMessage.Get(), o.ErrorMessage.IsSet() +} + +// HasErrorMessage returns a boolean if a field has been set. +func (o *DatasetCreationProgressResult) HasErrorMessage() bool { + if o != nil && o.ErrorMessage.IsSet() { + return true + } + + return false +} + +// SetErrorMessage gets a reference to the given NullableString and assigns it to the ErrorMessage field. +func (o *DatasetCreationProgressResult) SetErrorMessage(v string) { + o.ErrorMessage.Set(&v) +} + +// SetErrorMessageNil sets the value for ErrorMessage to be an explicit nil +func (o *DatasetCreationProgressResult) SetErrorMessageNil() { + o.ErrorMessage.Set(nil) +} + +// UnsetErrorMessage ensures that no value is present for ErrorMessage, not even an explicit nil +func (o *DatasetCreationProgressResult) UnsetErrorMessage() { + o.ErrorMessage.Unset() +} + +func (o DatasetCreationProgressResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetCreationProgressResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["dataset_name"] = o.DatasetName + toSerialize["processing_status"] = o.ProcessingStatus + toSerialize["is_processing"] = o.IsProcessing + toSerialize["is_completed"] = o.IsCompleted + toSerialize["is_failed"] = o.IsFailed + if o.OriginalFilename.IsSet() { + toSerialize["original_filename"] = o.OriginalFilename.Get() + } + if o.EstimatedRows.IsSet() { + toSerialize["estimated_rows"] = o.EstimatedRows.Get() + } + if o.EstimatedColumns.IsSet() { + toSerialize["estimated_columns"] = o.EstimatedColumns.Get() + } + if o.QueuedAt.IsSet() { + toSerialize["queued_at"] = o.QueuedAt.Get() + } + if o.StartedAt.IsSet() { + toSerialize["started_at"] = o.StartedAt.Get() + } + if o.CompletedAt.IsSet() { + toSerialize["completed_at"] = o.CompletedAt.Get() + } + if o.FailedAt.IsSet() { + toSerialize["failed_at"] = o.FailedAt.Get() + } + if o.ErrorMessage.IsSet() { + toSerialize["error_message"] = o.ErrorMessage.Get() + } + return toSerialize, nil +} + +func (o *DatasetCreationProgressResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "dataset_name", + "processing_status", + "is_processing", + "is_completed", + "is_failed", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetCreationProgressResult := _DatasetCreationProgressResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetCreationProgressResult) + + if err != nil { + return err + } + + *o = DatasetCreationProgressResult(varDatasetCreationProgressResult) + + return err +} + +type NullableDatasetCreationProgressResult struct { + value *DatasetCreationProgressResult + isSet bool +} + +func (v NullableDatasetCreationProgressResult) Get() *DatasetCreationProgressResult { + return v.value +} + +func (v *NullableDatasetCreationProgressResult) Set(val *DatasetCreationProgressResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetCreationProgressResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetCreationProgressResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetCreationProgressResult(val *DatasetCreationProgressResult) *NullableDatasetCreationProgressResult { + return &NullableDatasetCreationProgressResult{value: val, isSet: true} +} + +func (v NullableDatasetCreationProgressResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetCreationProgressResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_derived_variables_response.go b/go/futureagi/model_dataset_derived_variables_response.go new file mode 100644 index 0000000..28f92e0 --- /dev/null +++ b/go/futureagi/model_dataset_derived_variables_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetDerivedVariablesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetDerivedVariablesResponse{} + +// DatasetDerivedVariablesResponse struct for DatasetDerivedVariablesResponse +type DatasetDerivedVariablesResponse struct { + Status bool `json:"status"` + Result DatasetDerivedVariablesResult `json:"result"` +} + +type _DatasetDerivedVariablesResponse DatasetDerivedVariablesResponse + +// NewDatasetDerivedVariablesResponse instantiates a new DatasetDerivedVariablesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetDerivedVariablesResponse(status bool, result DatasetDerivedVariablesResult) *DatasetDerivedVariablesResponse { + this := DatasetDerivedVariablesResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetDerivedVariablesResponseWithDefaults instantiates a new DatasetDerivedVariablesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetDerivedVariablesResponseWithDefaults() *DatasetDerivedVariablesResponse { + this := DatasetDerivedVariablesResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetDerivedVariablesResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetDerivedVariablesResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetDerivedVariablesResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetDerivedVariablesResponse) GetResult() DatasetDerivedVariablesResult { + if o == nil { + var ret DatasetDerivedVariablesResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetDerivedVariablesResponse) GetResultOk() (*DatasetDerivedVariablesResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetDerivedVariablesResponse) SetResult(v DatasetDerivedVariablesResult) { + o.Result = v +} + +func (o DatasetDerivedVariablesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetDerivedVariablesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetDerivedVariablesResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetDerivedVariablesResponse := _DatasetDerivedVariablesResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetDerivedVariablesResponse) + + if err != nil { + return err + } + + *o = DatasetDerivedVariablesResponse(varDatasetDerivedVariablesResponse) + + return err +} + +type NullableDatasetDerivedVariablesResponse struct { + value *DatasetDerivedVariablesResponse + isSet bool +} + +func (v NullableDatasetDerivedVariablesResponse) Get() *DatasetDerivedVariablesResponse { + return v.value +} + +func (v *NullableDatasetDerivedVariablesResponse) Set(val *DatasetDerivedVariablesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetDerivedVariablesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetDerivedVariablesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetDerivedVariablesResponse(val *DatasetDerivedVariablesResponse) *NullableDatasetDerivedVariablesResponse { + return &NullableDatasetDerivedVariablesResponse{value: val, isSet: true} +} + +func (v NullableDatasetDerivedVariablesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetDerivedVariablesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_derived_variables_result.go b/go/futureagi/model_dataset_derived_variables_result.go new file mode 100644 index 0000000..c4b57aa --- /dev/null +++ b/go/futureagi/model_dataset_derived_variables_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetDerivedVariablesResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetDerivedVariablesResult{} + +// DatasetDerivedVariablesResult struct for DatasetDerivedVariablesResult +type DatasetDerivedVariablesResult struct { + DerivedVariables map[string]DerivedVariableDetail `json:"derived_variables"` +} + +type _DatasetDerivedVariablesResult DatasetDerivedVariablesResult + +// NewDatasetDerivedVariablesResult instantiates a new DatasetDerivedVariablesResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetDerivedVariablesResult(derivedVariables map[string]DerivedVariableDetail) *DatasetDerivedVariablesResult { + this := DatasetDerivedVariablesResult{} + this.DerivedVariables = derivedVariables + return &this +} + +// NewDatasetDerivedVariablesResultWithDefaults instantiates a new DatasetDerivedVariablesResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetDerivedVariablesResultWithDefaults() *DatasetDerivedVariablesResult { + this := DatasetDerivedVariablesResult{} + return &this +} + +// GetDerivedVariables returns the DerivedVariables field value +func (o *DatasetDerivedVariablesResult) GetDerivedVariables() map[string]DerivedVariableDetail { + if o == nil { + var ret map[string]DerivedVariableDetail + return ret + } + + return o.DerivedVariables +} + +// GetDerivedVariablesOk returns a tuple with the DerivedVariables field value +// and a boolean to check if the value has been set. +func (o *DatasetDerivedVariablesResult) GetDerivedVariablesOk() (*map[string]DerivedVariableDetail, bool) { + if o == nil { + return nil, false + } + return &o.DerivedVariables, true +} + +// SetDerivedVariables sets field value +func (o *DatasetDerivedVariablesResult) SetDerivedVariables(v map[string]DerivedVariableDetail) { + o.DerivedVariables = v +} + +func (o DatasetDerivedVariablesResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetDerivedVariablesResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["derived_variables"] = o.DerivedVariables + return toSerialize, nil +} + +func (o *DatasetDerivedVariablesResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "derived_variables", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetDerivedVariablesResult := _DatasetDerivedVariablesResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetDerivedVariablesResult) + + if err != nil { + return err + } + + *o = DatasetDerivedVariablesResult(varDatasetDerivedVariablesResult) + + return err +} + +type NullableDatasetDerivedVariablesResult struct { + value *DatasetDerivedVariablesResult + isSet bool +} + +func (v NullableDatasetDerivedVariablesResult) Get() *DatasetDerivedVariablesResult { + return v.value +} + +func (v *NullableDatasetDerivedVariablesResult) Set(val *DatasetDerivedVariablesResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetDerivedVariablesResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetDerivedVariablesResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetDerivedVariablesResult(val *DatasetDerivedVariablesResult) *NullableDatasetDerivedVariablesResult { + return &NullableDatasetDerivedVariablesResult{value: val, isSet: true} +} + +func (v NullableDatasetDerivedVariablesResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetDerivedVariablesResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_eval_stats_item.go b/go/futureagi/model_dataset_eval_stats_item.go new file mode 100644 index 0000000..527cf02 --- /dev/null +++ b/go/futureagi/model_dataset_eval_stats_item.go @@ -0,0 +1,432 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetEvalStatsItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetEvalStatsItem{} + +// DatasetEvalStatsItem struct for DatasetEvalStatsItem +type DatasetEvalStatsItem struct { + Id string `json:"id"` + Name string `json:"name"` + OutputType string `json:"output_type"` + Result []DatasetEvalStatsMetric `json:"result"` + TotalPassRate NullableFloat32 `json:"total_pass_rate,omitempty"` + TotalAvg map[string]interface{} `json:"total_avg,omitempty"` + TotalChoicesAvg map[string]interface{} `json:"total_choices_avg,omitempty"` + IsNumericEval *bool `json:"is_numeric_eval,omitempty"` + IsNumericEvalPercentage *bool `json:"is_numeric_eval_percentage,omitempty"` +} + +type _DatasetEvalStatsItem DatasetEvalStatsItem + +// NewDatasetEvalStatsItem instantiates a new DatasetEvalStatsItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetEvalStatsItem(id string, name string, outputType string, result []DatasetEvalStatsMetric) *DatasetEvalStatsItem { + this := DatasetEvalStatsItem{} + this.Id = id + this.Name = name + this.OutputType = outputType + this.Result = result + return &this +} + +// NewDatasetEvalStatsItemWithDefaults instantiates a new DatasetEvalStatsItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetEvalStatsItemWithDefaults() *DatasetEvalStatsItem { + this := DatasetEvalStatsItem{} + return &this +} + +// GetId returns the Id field value +func (o *DatasetEvalStatsItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DatasetEvalStatsItem) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DatasetEvalStatsItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatasetEvalStatsItem) SetName(v string) { + o.Name = v +} + +// GetOutputType returns the OutputType field value +func (o *DatasetEvalStatsItem) GetOutputType() string { + if o == nil { + var ret string + return ret + } + + return o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OutputType, true +} + +// SetOutputType sets field value +func (o *DatasetEvalStatsItem) SetOutputType(v string) { + o.OutputType = v +} + +// GetResult returns the Result field value +func (o *DatasetEvalStatsItem) GetResult() []DatasetEvalStatsMetric { + if o == nil { + var ret []DatasetEvalStatsMetric + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetResultOk() ([]DatasetEvalStatsMetric, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *DatasetEvalStatsItem) SetResult(v []DatasetEvalStatsMetric) { + o.Result = v +} + +// GetTotalPassRate returns the TotalPassRate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetEvalStatsItem) GetTotalPassRate() float32 { + if o == nil || IsNil(o.TotalPassRate.Get()) { + var ret float32 + return ret + } + return *o.TotalPassRate.Get() +} + +// GetTotalPassRateOk returns a tuple with the TotalPassRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetEvalStatsItem) GetTotalPassRateOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.TotalPassRate.Get(), o.TotalPassRate.IsSet() +} + +// HasTotalPassRate returns a boolean if a field has been set. +func (o *DatasetEvalStatsItem) HasTotalPassRate() bool { + if o != nil && o.TotalPassRate.IsSet() { + return true + } + + return false +} + +// SetTotalPassRate gets a reference to the given NullableFloat32 and assigns it to the TotalPassRate field. +func (o *DatasetEvalStatsItem) SetTotalPassRate(v float32) { + o.TotalPassRate.Set(&v) +} + +// SetTotalPassRateNil sets the value for TotalPassRate to be an explicit nil +func (o *DatasetEvalStatsItem) SetTotalPassRateNil() { + o.TotalPassRate.Set(nil) +} + +// UnsetTotalPassRate ensures that no value is present for TotalPassRate, not even an explicit nil +func (o *DatasetEvalStatsItem) UnsetTotalPassRate() { + o.TotalPassRate.Unset() +} + +// GetTotalAvg returns the TotalAvg field value if set, zero value otherwise. +func (o *DatasetEvalStatsItem) GetTotalAvg() map[string]interface{} { + if o == nil || IsNil(o.TotalAvg) { + var ret map[string]interface{} + return ret + } + return o.TotalAvg +} + +// GetTotalAvgOk returns a tuple with the TotalAvg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetTotalAvgOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.TotalAvg) { + return map[string]interface{}{}, false + } + return o.TotalAvg, true +} + +// HasTotalAvg returns a boolean if a field has been set. +func (o *DatasetEvalStatsItem) HasTotalAvg() bool { + if o != nil && !IsNil(o.TotalAvg) { + return true + } + + return false +} + +// SetTotalAvg gets a reference to the given map[string]interface{} and assigns it to the TotalAvg field. +func (o *DatasetEvalStatsItem) SetTotalAvg(v map[string]interface{}) { + o.TotalAvg = v +} + +// GetTotalChoicesAvg returns the TotalChoicesAvg field value if set, zero value otherwise. +func (o *DatasetEvalStatsItem) GetTotalChoicesAvg() map[string]interface{} { + if o == nil || IsNil(o.TotalChoicesAvg) { + var ret map[string]interface{} + return ret + } + return o.TotalChoicesAvg +} + +// GetTotalChoicesAvgOk returns a tuple with the TotalChoicesAvg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetTotalChoicesAvgOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.TotalChoicesAvg) { + return map[string]interface{}{}, false + } + return o.TotalChoicesAvg, true +} + +// HasTotalChoicesAvg returns a boolean if a field has been set. +func (o *DatasetEvalStatsItem) HasTotalChoicesAvg() bool { + if o != nil && !IsNil(o.TotalChoicesAvg) { + return true + } + + return false +} + +// SetTotalChoicesAvg gets a reference to the given map[string]interface{} and assigns it to the TotalChoicesAvg field. +func (o *DatasetEvalStatsItem) SetTotalChoicesAvg(v map[string]interface{}) { + o.TotalChoicesAvg = v +} + +// GetIsNumericEval returns the IsNumericEval field value if set, zero value otherwise. +func (o *DatasetEvalStatsItem) GetIsNumericEval() bool { + if o == nil || IsNil(o.IsNumericEval) { + var ret bool + return ret + } + return *o.IsNumericEval +} + +// GetIsNumericEvalOk returns a tuple with the IsNumericEval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetIsNumericEvalOk() (*bool, bool) { + if o == nil || IsNil(o.IsNumericEval) { + return nil, false + } + return o.IsNumericEval, true +} + +// HasIsNumericEval returns a boolean if a field has been set. +func (o *DatasetEvalStatsItem) HasIsNumericEval() bool { + if o != nil && !IsNil(o.IsNumericEval) { + return true + } + + return false +} + +// SetIsNumericEval gets a reference to the given bool and assigns it to the IsNumericEval field. +func (o *DatasetEvalStatsItem) SetIsNumericEval(v bool) { + o.IsNumericEval = &v +} + +// GetIsNumericEvalPercentage returns the IsNumericEvalPercentage field value if set, zero value otherwise. +func (o *DatasetEvalStatsItem) GetIsNumericEvalPercentage() bool { + if o == nil || IsNil(o.IsNumericEvalPercentage) { + var ret bool + return ret + } + return *o.IsNumericEvalPercentage +} + +// GetIsNumericEvalPercentageOk returns a tuple with the IsNumericEvalPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsItem) GetIsNumericEvalPercentageOk() (*bool, bool) { + if o == nil || IsNil(o.IsNumericEvalPercentage) { + return nil, false + } + return o.IsNumericEvalPercentage, true +} + +// HasIsNumericEvalPercentage returns a boolean if a field has been set. +func (o *DatasetEvalStatsItem) HasIsNumericEvalPercentage() bool { + if o != nil && !IsNil(o.IsNumericEvalPercentage) { + return true + } + + return false +} + +// SetIsNumericEvalPercentage gets a reference to the given bool and assigns it to the IsNumericEvalPercentage field. +func (o *DatasetEvalStatsItem) SetIsNumericEvalPercentage(v bool) { + o.IsNumericEvalPercentage = &v +} + +func (o DatasetEvalStatsItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetEvalStatsItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["output_type"] = o.OutputType + toSerialize["result"] = o.Result + if o.TotalPassRate.IsSet() { + toSerialize["total_pass_rate"] = o.TotalPassRate.Get() + } + if !IsNil(o.TotalAvg) { + toSerialize["total_avg"] = o.TotalAvg + } + if !IsNil(o.TotalChoicesAvg) { + toSerialize["total_choices_avg"] = o.TotalChoicesAvg + } + if !IsNil(o.IsNumericEval) { + toSerialize["is_numeric_eval"] = o.IsNumericEval + } + if !IsNil(o.IsNumericEvalPercentage) { + toSerialize["is_numeric_eval_percentage"] = o.IsNumericEvalPercentage + } + return toSerialize, nil +} + +func (o *DatasetEvalStatsItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "output_type", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetEvalStatsItem := _DatasetEvalStatsItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetEvalStatsItem) + + if err != nil { + return err + } + + *o = DatasetEvalStatsItem(varDatasetEvalStatsItem) + + return err +} + +type NullableDatasetEvalStatsItem struct { + value *DatasetEvalStatsItem + isSet bool +} + +func (v NullableDatasetEvalStatsItem) Get() *DatasetEvalStatsItem { + return v.value +} + +func (v *NullableDatasetEvalStatsItem) Set(val *DatasetEvalStatsItem) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetEvalStatsItem) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetEvalStatsItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetEvalStatsItem(val *DatasetEvalStatsItem) *NullableDatasetEvalStatsItem { + return &NullableDatasetEvalStatsItem{value: val, isSet: true} +} + +func (v NullableDatasetEvalStatsItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetEvalStatsItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_eval_stats_metric.go b/go/futureagi/model_dataset_eval_stats_metric.go new file mode 100644 index 0000000..126283e --- /dev/null +++ b/go/futureagi/model_dataset_eval_stats_metric.go @@ -0,0 +1,268 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetEvalStatsMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetEvalStatsMetric{} + +// DatasetEvalStatsMetric struct for DatasetEvalStatsMetric +type DatasetEvalStatsMetric struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + TotalCells NullableInt32 `json:"total_cells,omitempty"` + Output map[string]interface{} `json:"output"` +} + +type _DatasetEvalStatsMetric DatasetEvalStatsMetric + +// NewDatasetEvalStatsMetric instantiates a new DatasetEvalStatsMetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetEvalStatsMetric(name string, output map[string]interface{}) *DatasetEvalStatsMetric { + this := DatasetEvalStatsMetric{} + this.Name = name + this.Output = output + return &this +} + +// NewDatasetEvalStatsMetricWithDefaults instantiates a new DatasetEvalStatsMetric object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetEvalStatsMetricWithDefaults() *DatasetEvalStatsMetric { + this := DatasetEvalStatsMetric{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DatasetEvalStatsMetric) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsMetric) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DatasetEvalStatsMetric) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DatasetEvalStatsMetric) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *DatasetEvalStatsMetric) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsMetric) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatasetEvalStatsMetric) SetName(v string) { + o.Name = v +} + +// GetTotalCells returns the TotalCells field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetEvalStatsMetric) GetTotalCells() int32 { + if o == nil || IsNil(o.TotalCells.Get()) { + var ret int32 + return ret + } + return *o.TotalCells.Get() +} + +// GetTotalCellsOk returns a tuple with the TotalCells field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetEvalStatsMetric) GetTotalCellsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.TotalCells.Get(), o.TotalCells.IsSet() +} + +// HasTotalCells returns a boolean if a field has been set. +func (o *DatasetEvalStatsMetric) HasTotalCells() bool { + if o != nil && o.TotalCells.IsSet() { + return true + } + + return false +} + +// SetTotalCells gets a reference to the given NullableInt32 and assigns it to the TotalCells field. +func (o *DatasetEvalStatsMetric) SetTotalCells(v int32) { + o.TotalCells.Set(&v) +} + +// SetTotalCellsNil sets the value for TotalCells to be an explicit nil +func (o *DatasetEvalStatsMetric) SetTotalCellsNil() { + o.TotalCells.Set(nil) +} + +// UnsetTotalCells ensures that no value is present for TotalCells, not even an explicit nil +func (o *DatasetEvalStatsMetric) UnsetTotalCells() { + o.TotalCells.Unset() +} + +// GetOutput returns the Output field value +func (o *DatasetEvalStatsMetric) GetOutput() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsMetric) GetOutputOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// SetOutput sets field value +func (o *DatasetEvalStatsMetric) SetOutput(v map[string]interface{}) { + o.Output = v +} + +func (o DatasetEvalStatsMetric) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetEvalStatsMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if o.TotalCells.IsSet() { + toSerialize["total_cells"] = o.TotalCells.Get() + } + toSerialize["output"] = o.Output + return toSerialize, nil +} + +func (o *DatasetEvalStatsMetric) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "output", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetEvalStatsMetric := _DatasetEvalStatsMetric{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetEvalStatsMetric) + + if err != nil { + return err + } + + *o = DatasetEvalStatsMetric(varDatasetEvalStatsMetric) + + return err +} + +type NullableDatasetEvalStatsMetric struct { + value *DatasetEvalStatsMetric + isSet bool +} + +func (v NullableDatasetEvalStatsMetric) Get() *DatasetEvalStatsMetric { + return v.value +} + +func (v *NullableDatasetEvalStatsMetric) Set(val *DatasetEvalStatsMetric) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetEvalStatsMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetEvalStatsMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetEvalStatsMetric(val *DatasetEvalStatsMetric) *NullableDatasetEvalStatsMetric { + return &NullableDatasetEvalStatsMetric{value: val, isSet: true} +} + +func (v NullableDatasetEvalStatsMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetEvalStatsMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_eval_stats_response.go b/go/futureagi/model_dataset_eval_stats_response.go new file mode 100644 index 0000000..bd09c37 --- /dev/null +++ b/go/futureagi/model_dataset_eval_stats_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetEvalStatsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetEvalStatsResponse{} + +// DatasetEvalStatsResponse struct for DatasetEvalStatsResponse +type DatasetEvalStatsResponse struct { + Status bool `json:"status"` + Result []DatasetEvalStatsItem `json:"result"` +} + +type _DatasetEvalStatsResponse DatasetEvalStatsResponse + +// NewDatasetEvalStatsResponse instantiates a new DatasetEvalStatsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetEvalStatsResponse(status bool, result []DatasetEvalStatsItem) *DatasetEvalStatsResponse { + this := DatasetEvalStatsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetEvalStatsResponseWithDefaults instantiates a new DatasetEvalStatsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetEvalStatsResponseWithDefaults() *DatasetEvalStatsResponse { + this := DatasetEvalStatsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetEvalStatsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetEvalStatsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetEvalStatsResponse) GetResult() []DatasetEvalStatsItem { + if o == nil { + var ret []DatasetEvalStatsItem + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetEvalStatsResponse) GetResultOk() ([]DatasetEvalStatsItem, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *DatasetEvalStatsResponse) SetResult(v []DatasetEvalStatsItem) { + o.Result = v +} + +func (o DatasetEvalStatsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetEvalStatsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetEvalStatsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetEvalStatsResponse := _DatasetEvalStatsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetEvalStatsResponse) + + if err != nil { + return err + } + + *o = DatasetEvalStatsResponse(varDatasetEvalStatsResponse) + + return err +} + +type NullableDatasetEvalStatsResponse struct { + value *DatasetEvalStatsResponse + isSet bool +} + +func (v NullableDatasetEvalStatsResponse) Get() *DatasetEvalStatsResponse { + return v.value +} + +func (v *NullableDatasetEvalStatsResponse) Set(val *DatasetEvalStatsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetEvalStatsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetEvalStatsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetEvalStatsResponse(val *DatasetEvalStatsResponse) *NullableDatasetEvalStatsResponse { + return &NullableDatasetEvalStatsResponse{value: val, isSet: true} +} + +func (v NullableDatasetEvalStatsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetEvalStatsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_explanation_summary_response.go b/go/futureagi/model_dataset_explanation_summary_response.go new file mode 100644 index 0000000..c6b25d7 --- /dev/null +++ b/go/futureagi/model_dataset_explanation_summary_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetExplanationSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetExplanationSummaryResponse{} + +// DatasetExplanationSummaryResponse struct for DatasetExplanationSummaryResponse +type DatasetExplanationSummaryResponse struct { + Status bool `json:"status"` + Result DatasetExplanationSummaryResponseResult `json:"result"` +} + +type _DatasetExplanationSummaryResponse DatasetExplanationSummaryResponse + +// NewDatasetExplanationSummaryResponse instantiates a new DatasetExplanationSummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetExplanationSummaryResponse(status bool, result DatasetExplanationSummaryResponseResult) *DatasetExplanationSummaryResponse { + this := DatasetExplanationSummaryResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetExplanationSummaryResponseWithDefaults instantiates a new DatasetExplanationSummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetExplanationSummaryResponseWithDefaults() *DatasetExplanationSummaryResponse { + this := DatasetExplanationSummaryResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetExplanationSummaryResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetExplanationSummaryResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetExplanationSummaryResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetExplanationSummaryResponse) GetResult() DatasetExplanationSummaryResponseResult { + if o == nil { + var ret DatasetExplanationSummaryResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetExplanationSummaryResponse) GetResultOk() (*DatasetExplanationSummaryResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetExplanationSummaryResponse) SetResult(v DatasetExplanationSummaryResponseResult) { + o.Result = v +} + +func (o DatasetExplanationSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetExplanationSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetExplanationSummaryResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetExplanationSummaryResponse := _DatasetExplanationSummaryResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetExplanationSummaryResponse) + + if err != nil { + return err + } + + *o = DatasetExplanationSummaryResponse(varDatasetExplanationSummaryResponse) + + return err +} + +type NullableDatasetExplanationSummaryResponse struct { + value *DatasetExplanationSummaryResponse + isSet bool +} + +func (v NullableDatasetExplanationSummaryResponse) Get() *DatasetExplanationSummaryResponse { + return v.value +} + +func (v *NullableDatasetExplanationSummaryResponse) Set(val *DatasetExplanationSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetExplanationSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetExplanationSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetExplanationSummaryResponse(val *DatasetExplanationSummaryResponse) *NullableDatasetExplanationSummaryResponse { + return &NullableDatasetExplanationSummaryResponse{value: val, isSet: true} +} + +func (v NullableDatasetExplanationSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetExplanationSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_explanation_summary_response_result.go b/go/futureagi/model_dataset_explanation_summary_response_result.go new file mode 100644 index 0000000..2f55fab --- /dev/null +++ b/go/futureagi/model_dataset_explanation_summary_response_result.go @@ -0,0 +1,272 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the DatasetExplanationSummaryResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetExplanationSummaryResponseResult{} + +// DatasetExplanationSummaryResponseResult struct for DatasetExplanationSummaryResponseResult +type DatasetExplanationSummaryResponseResult struct { + Response map[string]interface{} `json:"response"` + LastUpdated NullableTime `json:"last_updated"` + Status string `json:"status"` + RowCount int32 `json:"row_count"` + MinRowsRequired int32 `json:"min_rows_required"` +} + +type _DatasetExplanationSummaryResponseResult DatasetExplanationSummaryResponseResult + +// NewDatasetExplanationSummaryResponseResult instantiates a new DatasetExplanationSummaryResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetExplanationSummaryResponseResult(response map[string]interface{}, lastUpdated NullableTime, status string, rowCount int32, minRowsRequired int32) *DatasetExplanationSummaryResponseResult { + this := DatasetExplanationSummaryResponseResult{} + this.Response = response + this.LastUpdated = lastUpdated + this.Status = status + this.RowCount = rowCount + this.MinRowsRequired = minRowsRequired + return &this +} + +// NewDatasetExplanationSummaryResponseResultWithDefaults instantiates a new DatasetExplanationSummaryResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetExplanationSummaryResponseResultWithDefaults() *DatasetExplanationSummaryResponseResult { + this := DatasetExplanationSummaryResponseResult{} + return &this +} + +// GetResponse returns the Response field value +func (o *DatasetExplanationSummaryResponseResult) GetResponse() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Response +} + +// GetResponseOk returns a tuple with the Response field value +// and a boolean to check if the value has been set. +func (o *DatasetExplanationSummaryResponseResult) GetResponseOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Response, true +} + +// SetResponse sets field value +func (o *DatasetExplanationSummaryResponseResult) SetResponse(v map[string]interface{}) { + o.Response = v +} + +// GetLastUpdated returns the LastUpdated field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *DatasetExplanationSummaryResponseResult) GetLastUpdated() time.Time { + if o == nil || o.LastUpdated.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastUpdated.Get() +} + +// GetLastUpdatedOk returns a tuple with the LastUpdated field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetExplanationSummaryResponseResult) GetLastUpdatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastUpdated.Get(), o.LastUpdated.IsSet() +} + +// SetLastUpdated sets field value +func (o *DatasetExplanationSummaryResponseResult) SetLastUpdated(v time.Time) { + o.LastUpdated.Set(&v) +} + +// GetStatus returns the Status field value +func (o *DatasetExplanationSummaryResponseResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetExplanationSummaryResponseResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetExplanationSummaryResponseResult) SetStatus(v string) { + o.Status = v +} + +// GetRowCount returns the RowCount field value +func (o *DatasetExplanationSummaryResponseResult) GetRowCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowCount +} + +// GetRowCountOk returns a tuple with the RowCount field value +// and a boolean to check if the value has been set. +func (o *DatasetExplanationSummaryResponseResult) GetRowCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowCount, true +} + +// SetRowCount sets field value +func (o *DatasetExplanationSummaryResponseResult) SetRowCount(v int32) { + o.RowCount = v +} + +// GetMinRowsRequired returns the MinRowsRequired field value +func (o *DatasetExplanationSummaryResponseResult) GetMinRowsRequired() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.MinRowsRequired +} + +// GetMinRowsRequiredOk returns a tuple with the MinRowsRequired field value +// and a boolean to check if the value has been set. +func (o *DatasetExplanationSummaryResponseResult) GetMinRowsRequiredOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.MinRowsRequired, true +} + +// SetMinRowsRequired sets field value +func (o *DatasetExplanationSummaryResponseResult) SetMinRowsRequired(v int32) { + o.MinRowsRequired = v +} + +func (o DatasetExplanationSummaryResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetExplanationSummaryResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["response"] = o.Response + toSerialize["last_updated"] = o.LastUpdated.Get() + toSerialize["status"] = o.Status + toSerialize["row_count"] = o.RowCount + toSerialize["min_rows_required"] = o.MinRowsRequired + return toSerialize, nil +} + +func (o *DatasetExplanationSummaryResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "response", + "last_updated", + "status", + "row_count", + "min_rows_required", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetExplanationSummaryResponseResult := _DatasetExplanationSummaryResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetExplanationSummaryResponseResult) + + if err != nil { + return err + } + + *o = DatasetExplanationSummaryResponseResult(varDatasetExplanationSummaryResponseResult) + + return err +} + +type NullableDatasetExplanationSummaryResponseResult struct { + value *DatasetExplanationSummaryResponseResult + isSet bool +} + +func (v NullableDatasetExplanationSummaryResponseResult) Get() *DatasetExplanationSummaryResponseResult { + return v.value +} + +func (v *NullableDatasetExplanationSummaryResponseResult) Set(val *DatasetExplanationSummaryResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetExplanationSummaryResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetExplanationSummaryResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetExplanationSummaryResponseResult(val *DatasetExplanationSummaryResponseResult) *NullableDatasetExplanationSummaryResponseResult { + return &NullableDatasetExplanationSummaryResponseResult{value: val, isSet: true} +} + +func (v NullableDatasetExplanationSummaryResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetExplanationSummaryResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_json_schema_response.go b/go/futureagi/model_dataset_json_schema_response.go new file mode 100644 index 0000000..0a34d98 --- /dev/null +++ b/go/futureagi/model_dataset_json_schema_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetJsonSchemaResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetJsonSchemaResponse{} + +// DatasetJsonSchemaResponse struct for DatasetJsonSchemaResponse +type DatasetJsonSchemaResponse struct { + Status bool `json:"status"` + Result map[string]JsonColumnSchemaEntry `json:"result"` +} + +type _DatasetJsonSchemaResponse DatasetJsonSchemaResponse + +// NewDatasetJsonSchemaResponse instantiates a new DatasetJsonSchemaResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetJsonSchemaResponse(status bool, result map[string]JsonColumnSchemaEntry) *DatasetJsonSchemaResponse { + this := DatasetJsonSchemaResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetJsonSchemaResponseWithDefaults instantiates a new DatasetJsonSchemaResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetJsonSchemaResponseWithDefaults() *DatasetJsonSchemaResponse { + this := DatasetJsonSchemaResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetJsonSchemaResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetJsonSchemaResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetJsonSchemaResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetJsonSchemaResponse) GetResult() map[string]JsonColumnSchemaEntry { + if o == nil { + var ret map[string]JsonColumnSchemaEntry + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetJsonSchemaResponse) GetResultOk() (*map[string]JsonColumnSchemaEntry, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetJsonSchemaResponse) SetResult(v map[string]JsonColumnSchemaEntry) { + o.Result = v +} + +func (o DatasetJsonSchemaResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetJsonSchemaResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetJsonSchemaResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetJsonSchemaResponse := _DatasetJsonSchemaResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetJsonSchemaResponse) + + if err != nil { + return err + } + + *o = DatasetJsonSchemaResponse(varDatasetJsonSchemaResponse) + + return err +} + +type NullableDatasetJsonSchemaResponse struct { + value *DatasetJsonSchemaResponse + isSet bool +} + +func (v NullableDatasetJsonSchemaResponse) Get() *DatasetJsonSchemaResponse { + return v.value +} + +func (v *NullableDatasetJsonSchemaResponse) Set(val *DatasetJsonSchemaResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetJsonSchemaResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetJsonSchemaResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetJsonSchemaResponse(val *DatasetJsonSchemaResponse) *NullableDatasetJsonSchemaResponse { + return &NullableDatasetJsonSchemaResponse{value: val, isSet: true} +} + +func (v NullableDatasetJsonSchemaResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetJsonSchemaResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_list_item.go b/go/futureagi/model_dataset_list_item.go new file mode 100644 index 0000000..d15de48 --- /dev/null +++ b/go/futureagi/model_dataset_list_item.go @@ -0,0 +1,353 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetListItem{} + +// DatasetListItem struct for DatasetListItem +type DatasetListItem struct { + Id string `json:"id"` + Name string `json:"name"` + NumberOfDatapoints int32 `json:"number_of_datapoints"` + NumberOfExperiments int32 `json:"number_of_experiments"` + NumberOfOptimisations int32 `json:"number_of_optimisations"` + DerivedDatasets int32 `json:"derived_datasets"` + CreatedAt string `json:"created_at"` + DatasetType string `json:"dataset_type"` +} + +type _DatasetListItem DatasetListItem + +// NewDatasetListItem instantiates a new DatasetListItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetListItem(id string, name string, numberOfDatapoints int32, numberOfExperiments int32, numberOfOptimisations int32, derivedDatasets int32, createdAt string, datasetType string) *DatasetListItem { + this := DatasetListItem{} + this.Id = id + this.Name = name + this.NumberOfDatapoints = numberOfDatapoints + this.NumberOfExperiments = numberOfExperiments + this.NumberOfOptimisations = numberOfOptimisations + this.DerivedDatasets = derivedDatasets + this.CreatedAt = createdAt + this.DatasetType = datasetType + return &this +} + +// NewDatasetListItemWithDefaults instantiates a new DatasetListItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetListItemWithDefaults() *DatasetListItem { + this := DatasetListItem{} + return &this +} + +// GetId returns the Id field value +func (o *DatasetListItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DatasetListItem) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DatasetListItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatasetListItem) SetName(v string) { + o.Name = v +} + +// GetNumberOfDatapoints returns the NumberOfDatapoints field value +func (o *DatasetListItem) GetNumberOfDatapoints() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumberOfDatapoints +} + +// GetNumberOfDatapointsOk returns a tuple with the NumberOfDatapoints field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetNumberOfDatapointsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumberOfDatapoints, true +} + +// SetNumberOfDatapoints sets field value +func (o *DatasetListItem) SetNumberOfDatapoints(v int32) { + o.NumberOfDatapoints = v +} + +// GetNumberOfExperiments returns the NumberOfExperiments field value +func (o *DatasetListItem) GetNumberOfExperiments() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumberOfExperiments +} + +// GetNumberOfExperimentsOk returns a tuple with the NumberOfExperiments field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetNumberOfExperimentsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumberOfExperiments, true +} + +// SetNumberOfExperiments sets field value +func (o *DatasetListItem) SetNumberOfExperiments(v int32) { + o.NumberOfExperiments = v +} + +// GetNumberOfOptimisations returns the NumberOfOptimisations field value +func (o *DatasetListItem) GetNumberOfOptimisations() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumberOfOptimisations +} + +// GetNumberOfOptimisationsOk returns a tuple with the NumberOfOptimisations field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetNumberOfOptimisationsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumberOfOptimisations, true +} + +// SetNumberOfOptimisations sets field value +func (o *DatasetListItem) SetNumberOfOptimisations(v int32) { + o.NumberOfOptimisations = v +} + +// GetDerivedDatasets returns the DerivedDatasets field value +func (o *DatasetListItem) GetDerivedDatasets() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.DerivedDatasets +} + +// GetDerivedDatasetsOk returns a tuple with the DerivedDatasets field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetDerivedDatasetsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.DerivedDatasets, true +} + +// SetDerivedDatasets sets field value +func (o *DatasetListItem) SetDerivedDatasets(v int32) { + o.DerivedDatasets = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *DatasetListItem) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *DatasetListItem) SetCreatedAt(v string) { + o.CreatedAt = v +} + +// GetDatasetType returns the DatasetType field value +func (o *DatasetListItem) GetDatasetType() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetType +} + +// GetDatasetTypeOk returns a tuple with the DatasetType field value +// and a boolean to check if the value has been set. +func (o *DatasetListItem) GetDatasetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetType, true +} + +// SetDatasetType sets field value +func (o *DatasetListItem) SetDatasetType(v string) { + o.DatasetType = v +} + +func (o DatasetListItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetListItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["number_of_datapoints"] = o.NumberOfDatapoints + toSerialize["number_of_experiments"] = o.NumberOfExperiments + toSerialize["number_of_optimisations"] = o.NumberOfOptimisations + toSerialize["derived_datasets"] = o.DerivedDatasets + toSerialize["created_at"] = o.CreatedAt + toSerialize["dataset_type"] = o.DatasetType + return toSerialize, nil +} + +func (o *DatasetListItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "number_of_datapoints", + "number_of_experiments", + "number_of_optimisations", + "derived_datasets", + "created_at", + "dataset_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetListItem := _DatasetListItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetListItem) + + if err != nil { + return err + } + + *o = DatasetListItem(varDatasetListItem) + + return err +} + +type NullableDatasetListItem struct { + value *DatasetListItem + isSet bool +} + +func (v NullableDatasetListItem) Get() *DatasetListItem { + return v.value +} + +func (v *NullableDatasetListItem) Set(val *DatasetListItem) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetListItem) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetListItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetListItem(val *DatasetListItem) *NullableDatasetListItem { + return &NullableDatasetListItem{value: val, isSet: true} +} + +func (v NullableDatasetListItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetListItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_list_response.go b/go/futureagi/model_dataset_list_response.go new file mode 100644 index 0000000..75cc12a --- /dev/null +++ b/go/futureagi/model_dataset_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetListResponse{} + +// DatasetListResponse struct for DatasetListResponse +type DatasetListResponse struct { + Status bool `json:"status"` + Result DatasetListResult `json:"result"` +} + +type _DatasetListResponse DatasetListResponse + +// NewDatasetListResponse instantiates a new DatasetListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetListResponse(status bool, result DatasetListResult) *DatasetListResponse { + this := DatasetListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetListResponseWithDefaults instantiates a new DatasetListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetListResponseWithDefaults() *DatasetListResponse { + this := DatasetListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetListResponse) GetResult() DatasetListResult { + if o == nil { + var ret DatasetListResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetListResponse) GetResultOk() (*DatasetListResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetListResponse) SetResult(v DatasetListResult) { + o.Result = v +} + +func (o DatasetListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetListResponse := _DatasetListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetListResponse) + + if err != nil { + return err + } + + *o = DatasetListResponse(varDatasetListResponse) + + return err +} + +type NullableDatasetListResponse struct { + value *DatasetListResponse + isSet bool +} + +func (v NullableDatasetListResponse) Get() *DatasetListResponse { + return v.value +} + +func (v *NullableDatasetListResponse) Set(val *DatasetListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetListResponse(val *DatasetListResponse) *NullableDatasetListResponse { + return &NullableDatasetListResponse{value: val, isSet: true} +} + +func (v NullableDatasetListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_list_result.go b/go/futureagi/model_dataset_list_result.go new file mode 100644 index 0000000..49da420 --- /dev/null +++ b/go/futureagi/model_dataset_list_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetListResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetListResult{} + +// DatasetListResult struct for DatasetListResult +type DatasetListResult struct { + Datasets []DatasetListItem `json:"datasets"` + TotalPages int32 `json:"total_pages"` + TotalCount int32 `json:"total_count"` +} + +type _DatasetListResult DatasetListResult + +// NewDatasetListResult instantiates a new DatasetListResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetListResult(datasets []DatasetListItem, totalPages int32, totalCount int32) *DatasetListResult { + this := DatasetListResult{} + this.Datasets = datasets + this.TotalPages = totalPages + this.TotalCount = totalCount + return &this +} + +// NewDatasetListResultWithDefaults instantiates a new DatasetListResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetListResultWithDefaults() *DatasetListResult { + this := DatasetListResult{} + return &this +} + +// GetDatasets returns the Datasets field value +func (o *DatasetListResult) GetDatasets() []DatasetListItem { + if o == nil { + var ret []DatasetListItem + return ret + } + + return o.Datasets +} + +// GetDatasetsOk returns a tuple with the Datasets field value +// and a boolean to check if the value has been set. +func (o *DatasetListResult) GetDatasetsOk() ([]DatasetListItem, bool) { + if o == nil { + return nil, false + } + return o.Datasets, true +} + +// SetDatasets sets field value +func (o *DatasetListResult) SetDatasets(v []DatasetListItem) { + o.Datasets = v +} + +// GetTotalPages returns the TotalPages field value +func (o *DatasetListResult) GetTotalPages() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *DatasetListResult) GetTotalPagesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *DatasetListResult) SetTotalPages(v int32) { + o.TotalPages = v +} + +// GetTotalCount returns the TotalCount field value +func (o *DatasetListResult) GetTotalCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value +// and a boolean to check if the value has been set. +func (o *DatasetListResult) GetTotalCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalCount, true +} + +// SetTotalCount sets field value +func (o *DatasetListResult) SetTotalCount(v int32) { + o.TotalCount = v +} + +func (o DatasetListResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetListResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["datasets"] = o.Datasets + toSerialize["total_pages"] = o.TotalPages + toSerialize["total_count"] = o.TotalCount + return toSerialize, nil +} + +func (o *DatasetListResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "datasets", + "total_pages", + "total_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetListResult := _DatasetListResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetListResult) + + if err != nil { + return err + } + + *o = DatasetListResult(varDatasetListResult) + + return err +} + +type NullableDatasetListResult struct { + value *DatasetListResult + isSet bool +} + +func (v NullableDatasetListResult) Get() *DatasetListResult { + return v.value +} + +func (v *NullableDatasetListResult) Set(val *DatasetListResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetListResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetListResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetListResult(val *DatasetListResult) *NullableDatasetListResult { + return &NullableDatasetListResult{value: val, isSet: true} +} + +func (v NullableDatasetListResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetListResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_multiple_static_columns_request.go b/go/futureagi/model_dataset_multiple_static_columns_request.go new file mode 100644 index 0000000..6dfe8aa --- /dev/null +++ b/go/futureagi/model_dataset_multiple_static_columns_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetMultipleStaticColumnsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetMultipleStaticColumnsRequest{} + +// DatasetMultipleStaticColumnsRequest struct for DatasetMultipleStaticColumnsRequest +type DatasetMultipleStaticColumnsRequest struct { + Columns []map[string]interface{} `json:"columns"` +} + +type _DatasetMultipleStaticColumnsRequest DatasetMultipleStaticColumnsRequest + +// NewDatasetMultipleStaticColumnsRequest instantiates a new DatasetMultipleStaticColumnsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetMultipleStaticColumnsRequest(columns []map[string]interface{}) *DatasetMultipleStaticColumnsRequest { + this := DatasetMultipleStaticColumnsRequest{} + this.Columns = columns + return &this +} + +// NewDatasetMultipleStaticColumnsRequestWithDefaults instantiates a new DatasetMultipleStaticColumnsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetMultipleStaticColumnsRequestWithDefaults() *DatasetMultipleStaticColumnsRequest { + this := DatasetMultipleStaticColumnsRequest{} + return &this +} + +// GetColumns returns the Columns field value +func (o *DatasetMultipleStaticColumnsRequest) GetColumns() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *DatasetMultipleStaticColumnsRequest) GetColumnsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *DatasetMultipleStaticColumnsRequest) SetColumns(v []map[string]interface{}) { + o.Columns = v +} + +func (o DatasetMultipleStaticColumnsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetMultipleStaticColumnsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["columns"] = o.Columns + return toSerialize, nil +} + +func (o *DatasetMultipleStaticColumnsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "columns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetMultipleStaticColumnsRequest := _DatasetMultipleStaticColumnsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetMultipleStaticColumnsRequest) + + if err != nil { + return err + } + + *o = DatasetMultipleStaticColumnsRequest(varDatasetMultipleStaticColumnsRequest) + + return err +} + +type NullableDatasetMultipleStaticColumnsRequest struct { + value *DatasetMultipleStaticColumnsRequest + isSet bool +} + +func (v NullableDatasetMultipleStaticColumnsRequest) Get() *DatasetMultipleStaticColumnsRequest { + return v.value +} + +func (v *NullableDatasetMultipleStaticColumnsRequest) Set(val *DatasetMultipleStaticColumnsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetMultipleStaticColumnsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetMultipleStaticColumnsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetMultipleStaticColumnsRequest(val *DatasetMultipleStaticColumnsRequest) *NullableDatasetMultipleStaticColumnsRequest { + return &NullableDatasetMultipleStaticColumnsRequest{value: val, isSet: true} +} + +func (v NullableDatasetMultipleStaticColumnsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetMultipleStaticColumnsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_name_item.go b/go/futureagi/model_dataset_name_item.go new file mode 100644 index 0000000..fcfb0d8 --- /dev/null +++ b/go/futureagi/model_dataset_name_item.go @@ -0,0 +1,221 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetNameItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetNameItem{} + +// DatasetNameItem struct for DatasetNameItem +type DatasetNameItem struct { + DatasetId string `json:"dataset_id"` + Name string `json:"name"` + ModelType *string `json:"model_type,omitempty"` +} + +type _DatasetNameItem DatasetNameItem + +// NewDatasetNameItem instantiates a new DatasetNameItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetNameItem(datasetId string, name string) *DatasetNameItem { + this := DatasetNameItem{} + this.DatasetId = datasetId + this.Name = name + return &this +} + +// NewDatasetNameItemWithDefaults instantiates a new DatasetNameItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetNameItemWithDefaults() *DatasetNameItem { + this := DatasetNameItem{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *DatasetNameItem) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *DatasetNameItem) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *DatasetNameItem) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetName returns the Name field value +func (o *DatasetNameItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatasetNameItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatasetNameItem) SetName(v string) { + o.Name = v +} + +// GetModelType returns the ModelType field value if set, zero value otherwise. +func (o *DatasetNameItem) GetModelType() string { + if o == nil || IsNil(o.ModelType) { + var ret string + return ret + } + return *o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetNameItem) GetModelTypeOk() (*string, bool) { + if o == nil || IsNil(o.ModelType) { + return nil, false + } + return o.ModelType, true +} + +// HasModelType returns a boolean if a field has been set. +func (o *DatasetNameItem) HasModelType() bool { + if o != nil && !IsNil(o.ModelType) { + return true + } + + return false +} + +// SetModelType gets a reference to the given string and assigns it to the ModelType field. +func (o *DatasetNameItem) SetModelType(v string) { + o.ModelType = &v +} + +func (o DatasetNameItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetNameItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["name"] = o.Name + if !IsNil(o.ModelType) { + toSerialize["model_type"] = o.ModelType + } + return toSerialize, nil +} + +func (o *DatasetNameItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetNameItem := _DatasetNameItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetNameItem) + + if err != nil { + return err + } + + *o = DatasetNameItem(varDatasetNameItem) + + return err +} + +type NullableDatasetNameItem struct { + value *DatasetNameItem + isSet bool +} + +func (v NullableDatasetNameItem) Get() *DatasetNameItem { + return v.value +} + +func (v *NullableDatasetNameItem) Set(val *DatasetNameItem) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetNameItem) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetNameItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetNameItem(val *DatasetNameItem) *NullableDatasetNameItem { + return &NullableDatasetNameItem{value: val, isSet: true} +} + +func (v NullableDatasetNameItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetNameItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_names_response.go b/go/futureagi/model_dataset_names_response.go new file mode 100644 index 0000000..ef270a9 --- /dev/null +++ b/go/futureagi/model_dataset_names_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetNamesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetNamesResponse{} + +// DatasetNamesResponse struct for DatasetNamesResponse +type DatasetNamesResponse struct { + Status bool `json:"status"` + Result DatasetNamesResult `json:"result"` +} + +type _DatasetNamesResponse DatasetNamesResponse + +// NewDatasetNamesResponse instantiates a new DatasetNamesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetNamesResponse(status bool, result DatasetNamesResult) *DatasetNamesResponse { + this := DatasetNamesResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetNamesResponseWithDefaults instantiates a new DatasetNamesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetNamesResponseWithDefaults() *DatasetNamesResponse { + this := DatasetNamesResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetNamesResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetNamesResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetNamesResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetNamesResponse) GetResult() DatasetNamesResult { + if o == nil { + var ret DatasetNamesResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetNamesResponse) GetResultOk() (*DatasetNamesResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetNamesResponse) SetResult(v DatasetNamesResult) { + o.Result = v +} + +func (o DatasetNamesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetNamesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetNamesResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetNamesResponse := _DatasetNamesResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetNamesResponse) + + if err != nil { + return err + } + + *o = DatasetNamesResponse(varDatasetNamesResponse) + + return err +} + +type NullableDatasetNamesResponse struct { + value *DatasetNamesResponse + isSet bool +} + +func (v NullableDatasetNamesResponse) Get() *DatasetNamesResponse { + return v.value +} + +func (v *NullableDatasetNamesResponse) Set(val *DatasetNamesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetNamesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetNamesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetNamesResponse(val *DatasetNamesResponse) *NullableDatasetNamesResponse { + return &NullableDatasetNamesResponse{value: val, isSet: true} +} + +func (v NullableDatasetNamesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetNamesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_names_result.go b/go/futureagi/model_dataset_names_result.go new file mode 100644 index 0000000..da0eeb5 --- /dev/null +++ b/go/futureagi/model_dataset_names_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetNamesResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetNamesResult{} + +// DatasetNamesResult struct for DatasetNamesResult +type DatasetNamesResult struct { + Datasets []DatasetNameItem `json:"datasets"` +} + +type _DatasetNamesResult DatasetNamesResult + +// NewDatasetNamesResult instantiates a new DatasetNamesResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetNamesResult(datasets []DatasetNameItem) *DatasetNamesResult { + this := DatasetNamesResult{} + this.Datasets = datasets + return &this +} + +// NewDatasetNamesResultWithDefaults instantiates a new DatasetNamesResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetNamesResultWithDefaults() *DatasetNamesResult { + this := DatasetNamesResult{} + return &this +} + +// GetDatasets returns the Datasets field value +func (o *DatasetNamesResult) GetDatasets() []DatasetNameItem { + if o == nil { + var ret []DatasetNameItem + return ret + } + + return o.Datasets +} + +// GetDatasetsOk returns a tuple with the Datasets field value +// and a boolean to check if the value has been set. +func (o *DatasetNamesResult) GetDatasetsOk() ([]DatasetNameItem, bool) { + if o == nil { + return nil, false + } + return o.Datasets, true +} + +// SetDatasets sets field value +func (o *DatasetNamesResult) SetDatasets(v []DatasetNameItem) { + o.Datasets = v +} + +func (o DatasetNamesResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetNamesResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["datasets"] = o.Datasets + return toSerialize, nil +} + +func (o *DatasetNamesResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "datasets", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetNamesResult := _DatasetNamesResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetNamesResult) + + if err != nil { + return err + } + + *o = DatasetNamesResult(varDatasetNamesResult) + + return err +} + +type NullableDatasetNamesResult struct { + value *DatasetNamesResult + isSet bool +} + +func (v NullableDatasetNamesResult) Get() *DatasetNamesResult { + return v.value +} + +func (v *NullableDatasetNamesResult) Set(val *DatasetNamesResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetNamesResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetNamesResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetNamesResult(val *DatasetNamesResult) *NullableDatasetNamesResult { + return &NullableDatasetNamesResult{value: val, isSet: true} +} + +func (v NullableDatasetNamesResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetNamesResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_row_data_request.go b/go/futureagi/model_dataset_row_data_request.go new file mode 100644 index 0000000..ff18d2c --- /dev/null +++ b/go/futureagi/model_dataset_row_data_request.go @@ -0,0 +1,229 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowDataRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowDataRequest{} + +// DatasetRowDataRequest struct for DatasetRowDataRequest +type DatasetRowDataRequest struct { + Filters []AutomationRuleConditionsFilterInner `json:"filters,omitempty"` + Sort []DatasetRowDataRequestSortInner `json:"sort,omitempty"` + RowId string `json:"row_id"` +} + +type _DatasetRowDataRequest DatasetRowDataRequest + +// NewDatasetRowDataRequest instantiates a new DatasetRowDataRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowDataRequest(rowId string) *DatasetRowDataRequest { + this := DatasetRowDataRequest{} + this.RowId = rowId + return &this +} + +// NewDatasetRowDataRequestWithDefaults instantiates a new DatasetRowDataRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowDataRequestWithDefaults() *DatasetRowDataRequest { + this := DatasetRowDataRequest{} + return &this +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *DatasetRowDataRequest) GetFilters() []AutomationRuleConditionsFilterInner { + if o == nil || IsNil(o.Filters) { + var ret []AutomationRuleConditionsFilterInner + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetRowDataRequest) GetFiltersOk() ([]AutomationRuleConditionsFilterInner, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *DatasetRowDataRequest) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given []AutomationRuleConditionsFilterInner and assigns it to the Filters field. +func (o *DatasetRowDataRequest) SetFilters(v []AutomationRuleConditionsFilterInner) { + o.Filters = v +} + +// GetSort returns the Sort field value if set, zero value otherwise. +func (o *DatasetRowDataRequest) GetSort() []DatasetRowDataRequestSortInner { + if o == nil || IsNil(o.Sort) { + var ret []DatasetRowDataRequestSortInner + return ret + } + return o.Sort +} + +// GetSortOk returns a tuple with the Sort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetRowDataRequest) GetSortOk() ([]DatasetRowDataRequestSortInner, bool) { + if o == nil || IsNil(o.Sort) { + return nil, false + } + return o.Sort, true +} + +// HasSort returns a boolean if a field has been set. +func (o *DatasetRowDataRequest) HasSort() bool { + if o != nil && !IsNil(o.Sort) { + return true + } + + return false +} + +// SetSort gets a reference to the given []DatasetRowDataRequestSortInner and assigns it to the Sort field. +func (o *DatasetRowDataRequest) SetSort(v []DatasetRowDataRequestSortInner) { + o.Sort = v +} + +// GetRowId returns the RowId field value +func (o *DatasetRowDataRequest) GetRowId() string { + if o == nil { + var ret string + return ret + } + + return o.RowId +} + +// GetRowIdOk returns a tuple with the RowId field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDataRequest) GetRowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RowId, true +} + +// SetRowId sets field value +func (o *DatasetRowDataRequest) SetRowId(v string) { + o.RowId = v +} + +func (o DatasetRowDataRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowDataRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.Sort) { + toSerialize["sort"] = o.Sort + } + toSerialize["row_id"] = o.RowId + return toSerialize, nil +} + +func (o *DatasetRowDataRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "row_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowDataRequest := _DatasetRowDataRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowDataRequest) + + if err != nil { + return err + } + + *o = DatasetRowDataRequest(varDatasetRowDataRequest) + + return err +} + +type NullableDatasetRowDataRequest struct { + value *DatasetRowDataRequest + isSet bool +} + +func (v NullableDatasetRowDataRequest) Get() *DatasetRowDataRequest { + return v.value +} + +func (v *NullableDatasetRowDataRequest) Set(val *DatasetRowDataRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowDataRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowDataRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowDataRequest(val *DatasetRowDataRequest) *NullableDatasetRowDataRequest { + return &NullableDatasetRowDataRequest{value: val, isSet: true} +} + +func (v NullableDatasetRowDataRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowDataRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_row_data_request_sort_inner.go b/go/futureagi/model_dataset_row_data_request_sort_inner.go new file mode 100644 index 0000000..76b5480 --- /dev/null +++ b/go/futureagi/model_dataset_row_data_request_sort_inner.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowDataRequestSortInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowDataRequestSortInner{} + +// DatasetRowDataRequestSortInner struct for DatasetRowDataRequestSortInner +type DatasetRowDataRequestSortInner struct { + ColumnId string `json:"column_id"` + Type *string `json:"type,omitempty"` +} + +type _DatasetRowDataRequestSortInner DatasetRowDataRequestSortInner + +// NewDatasetRowDataRequestSortInner instantiates a new DatasetRowDataRequestSortInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowDataRequestSortInner(columnId string) *DatasetRowDataRequestSortInner { + this := DatasetRowDataRequestSortInner{} + this.ColumnId = columnId + return &this +} + +// NewDatasetRowDataRequestSortInnerWithDefaults instantiates a new DatasetRowDataRequestSortInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowDataRequestSortInnerWithDefaults() *DatasetRowDataRequestSortInner { + this := DatasetRowDataRequestSortInner{} + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *DatasetRowDataRequestSortInner) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDataRequestSortInner) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *DatasetRowDataRequestSortInner) SetColumnId(v string) { + o.ColumnId = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DatasetRowDataRequestSortInner) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetRowDataRequestSortInner) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DatasetRowDataRequestSortInner) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DatasetRowDataRequestSortInner) SetType(v string) { + o.Type = &v +} + +func (o DatasetRowDataRequestSortInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowDataRequestSortInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +func (o *DatasetRowDataRequestSortInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowDataRequestSortInner := _DatasetRowDataRequestSortInner{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowDataRequestSortInner) + + if err != nil { + return err + } + + *o = DatasetRowDataRequestSortInner(varDatasetRowDataRequestSortInner) + + return err +} + +type NullableDatasetRowDataRequestSortInner struct { + value *DatasetRowDataRequestSortInner + isSet bool +} + +func (v NullableDatasetRowDataRequestSortInner) Get() *DatasetRowDataRequestSortInner { + return v.value +} + +func (v *NullableDatasetRowDataRequestSortInner) Set(val *DatasetRowDataRequestSortInner) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowDataRequestSortInner) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowDataRequestSortInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowDataRequestSortInner(val *DatasetRowDataRequestSortInner) *NullableDatasetRowDataRequestSortInner { + return &NullableDatasetRowDataRequestSortInner{value: val, isSet: true} +} + +func (v NullableDatasetRowDataRequestSortInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowDataRequestSortInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_row_data_response.go b/go/futureagi/model_dataset_row_data_response.go new file mode 100644 index 0000000..e5efe52 --- /dev/null +++ b/go/futureagi/model_dataset_row_data_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowDataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowDataResponse{} + +// DatasetRowDataResponse struct for DatasetRowDataResponse +type DatasetRowDataResponse struct { + Status bool `json:"status"` + Result DatasetRowDataResult `json:"result"` +} + +type _DatasetRowDataResponse DatasetRowDataResponse + +// NewDatasetRowDataResponse instantiates a new DatasetRowDataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowDataResponse(status bool, result DatasetRowDataResult) *DatasetRowDataResponse { + this := DatasetRowDataResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetRowDataResponseWithDefaults instantiates a new DatasetRowDataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowDataResponseWithDefaults() *DatasetRowDataResponse { + this := DatasetRowDataResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetRowDataResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDataResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetRowDataResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetRowDataResponse) GetResult() DatasetRowDataResult { + if o == nil { + var ret DatasetRowDataResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDataResponse) GetResultOk() (*DatasetRowDataResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetRowDataResponse) SetResult(v DatasetRowDataResult) { + o.Result = v +} + +func (o DatasetRowDataResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowDataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetRowDataResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowDataResponse := _DatasetRowDataResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowDataResponse) + + if err != nil { + return err + } + + *o = DatasetRowDataResponse(varDatasetRowDataResponse) + + return err +} + +type NullableDatasetRowDataResponse struct { + value *DatasetRowDataResponse + isSet bool +} + +func (v NullableDatasetRowDataResponse) Get() *DatasetRowDataResponse { + return v.value +} + +func (v *NullableDatasetRowDataResponse) Set(val *DatasetRowDataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowDataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowDataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowDataResponse(val *DatasetRowDataResponse) *NullableDatasetRowDataResponse { + return &NullableDatasetRowDataResponse{value: val, isSet: true} +} + +func (v NullableDatasetRowDataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowDataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_row_data_result.go b/go/futureagi/model_dataset_row_data_result.go new file mode 100644 index 0000000..455a482 --- /dev/null +++ b/go/futureagi/model_dataset_row_data_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowDataResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowDataResult{} + +// DatasetRowDataResult struct for DatasetRowDataResult +type DatasetRowDataResult struct { + Next DatasetRowNavigation `json:"next"` + Current map[string]interface{} `json:"current"` +} + +type _DatasetRowDataResult DatasetRowDataResult + +// NewDatasetRowDataResult instantiates a new DatasetRowDataResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowDataResult(next DatasetRowNavigation, current map[string]interface{}) *DatasetRowDataResult { + this := DatasetRowDataResult{} + this.Next = next + this.Current = current + return &this +} + +// NewDatasetRowDataResultWithDefaults instantiates a new DatasetRowDataResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowDataResultWithDefaults() *DatasetRowDataResult { + this := DatasetRowDataResult{} + return &this +} + +// GetNext returns the Next field value +func (o *DatasetRowDataResult) GetNext() DatasetRowNavigation { + if o == nil { + var ret DatasetRowNavigation + return ret + } + + return o.Next +} + +// GetNextOk returns a tuple with the Next field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDataResult) GetNextOk() (*DatasetRowNavigation, bool) { + if o == nil { + return nil, false + } + return &o.Next, true +} + +// SetNext sets field value +func (o *DatasetRowDataResult) SetNext(v DatasetRowNavigation) { + o.Next = v +} + +// GetCurrent returns the Current field value +func (o *DatasetRowDataResult) GetCurrent() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Current +} + +// GetCurrentOk returns a tuple with the Current field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDataResult) GetCurrentOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Current, true +} + +// SetCurrent sets field value +func (o *DatasetRowDataResult) SetCurrent(v map[string]interface{}) { + o.Current = v +} + +func (o DatasetRowDataResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowDataResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["next"] = o.Next + toSerialize["current"] = o.Current + return toSerialize, nil +} + +func (o *DatasetRowDataResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "next", + "current", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowDataResult := _DatasetRowDataResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowDataResult) + + if err != nil { + return err + } + + *o = DatasetRowDataResult(varDatasetRowDataResult) + + return err +} + +type NullableDatasetRowDataResult struct { + value *DatasetRowDataResult + isSet bool +} + +func (v NullableDatasetRowDataResult) Get() *DatasetRowDataResult { + return v.value +} + +func (v *NullableDatasetRowDataResult) Set(val *DatasetRowDataResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowDataResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowDataResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowDataResult(val *DatasetRowDataResult) *NullableDatasetRowDataResult { + return &NullableDatasetRowDataResult{value: val, isSet: true} +} + +func (v NullableDatasetRowDataResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowDataResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_row_diff_request.go b/go/futureagi/model_dataset_row_diff_request.go new file mode 100644 index 0000000..cd0a710 --- /dev/null +++ b/go/futureagi/model_dataset_row_diff_request.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowDiffRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowDiffRequest{} + +// DatasetRowDiffRequest struct for DatasetRowDiffRequest +type DatasetRowDiffRequest struct { + ExperimentId string `json:"experiment_id"` + ColumnIds []string `json:"column_ids"` + RowIds []string `json:"row_ids"` + CompareColumnIds []string `json:"compare_column_ids"` +} + +type _DatasetRowDiffRequest DatasetRowDiffRequest + +// NewDatasetRowDiffRequest instantiates a new DatasetRowDiffRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowDiffRequest(experimentId string, columnIds []string, rowIds []string, compareColumnIds []string) *DatasetRowDiffRequest { + this := DatasetRowDiffRequest{} + this.ExperimentId = experimentId + this.ColumnIds = columnIds + this.RowIds = rowIds + this.CompareColumnIds = compareColumnIds + return &this +} + +// NewDatasetRowDiffRequestWithDefaults instantiates a new DatasetRowDiffRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowDiffRequestWithDefaults() *DatasetRowDiffRequest { + this := DatasetRowDiffRequest{} + return &this +} + +// GetExperimentId returns the ExperimentId field value +func (o *DatasetRowDiffRequest) GetExperimentId() string { + if o == nil { + var ret string + return ret + } + + return o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDiffRequest) GetExperimentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExperimentId, true +} + +// SetExperimentId sets field value +func (o *DatasetRowDiffRequest) SetExperimentId(v string) { + o.ExperimentId = v +} + +// GetColumnIds returns the ColumnIds field value +func (o *DatasetRowDiffRequest) GetColumnIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ColumnIds +} + +// GetColumnIdsOk returns a tuple with the ColumnIds field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDiffRequest) GetColumnIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ColumnIds, true +} + +// SetColumnIds sets field value +func (o *DatasetRowDiffRequest) SetColumnIds(v []string) { + o.ColumnIds = v +} + +// GetRowIds returns the RowIds field value +func (o *DatasetRowDiffRequest) GetRowIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.RowIds +} + +// GetRowIdsOk returns a tuple with the RowIds field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDiffRequest) GetRowIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.RowIds, true +} + +// SetRowIds sets field value +func (o *DatasetRowDiffRequest) SetRowIds(v []string) { + o.RowIds = v +} + +// GetCompareColumnIds returns the CompareColumnIds field value +func (o *DatasetRowDiffRequest) GetCompareColumnIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.CompareColumnIds +} + +// GetCompareColumnIdsOk returns a tuple with the CompareColumnIds field value +// and a boolean to check if the value has been set. +func (o *DatasetRowDiffRequest) GetCompareColumnIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.CompareColumnIds, true +} + +// SetCompareColumnIds sets field value +func (o *DatasetRowDiffRequest) SetCompareColumnIds(v []string) { + o.CompareColumnIds = v +} + +func (o DatasetRowDiffRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowDiffRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["experiment_id"] = o.ExperimentId + toSerialize["column_ids"] = o.ColumnIds + toSerialize["row_ids"] = o.RowIds + toSerialize["compare_column_ids"] = o.CompareColumnIds + return toSerialize, nil +} + +func (o *DatasetRowDiffRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "experiment_id", + "column_ids", + "row_ids", + "compare_column_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowDiffRequest := _DatasetRowDiffRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowDiffRequest) + + if err != nil { + return err + } + + *o = DatasetRowDiffRequest(varDatasetRowDiffRequest) + + return err +} + +type NullableDatasetRowDiffRequest struct { + value *DatasetRowDiffRequest + isSet bool +} + +func (v NullableDatasetRowDiffRequest) Get() *DatasetRowDiffRequest { + return v.value +} + +func (v *NullableDatasetRowDiffRequest) Set(val *DatasetRowDiffRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowDiffRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowDiffRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowDiffRequest(val *DatasetRowDiffRequest) *NullableDatasetRowDiffRequest { + return &NullableDatasetRowDiffRequest{value: val, isSet: true} +} + +func (v NullableDatasetRowDiffRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowDiffRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_row_navigation.go b/go/futureagi/model_dataset_row_navigation.go new file mode 100644 index 0000000..58ec05f --- /dev/null +++ b/go/futureagi/model_dataset_row_navigation.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DatasetRowNavigation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowNavigation{} + +// DatasetRowNavigation struct for DatasetRowNavigation +type DatasetRowNavigation struct { + RowId []string `json:"row_id,omitempty"` +} + +// NewDatasetRowNavigation instantiates a new DatasetRowNavigation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowNavigation() *DatasetRowNavigation { + this := DatasetRowNavigation{} + return &this +} + +// NewDatasetRowNavigationWithDefaults instantiates a new DatasetRowNavigation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowNavigationWithDefaults() *DatasetRowNavigation { + this := DatasetRowNavigation{} + return &this +} + +// GetRowId returns the RowId field value if set, zero value otherwise. +func (o *DatasetRowNavigation) GetRowId() []string { + if o == nil || IsNil(o.RowId) { + var ret []string + return ret + } + return o.RowId +} + +// GetRowIdOk returns a tuple with the RowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetRowNavigation) GetRowIdOk() ([]string, bool) { + if o == nil || IsNil(o.RowId) { + return nil, false + } + return o.RowId, true +} + +// HasRowId returns a boolean if a field has been set. +func (o *DatasetRowNavigation) HasRowId() bool { + if o != nil && !IsNil(o.RowId) { + return true + } + + return false +} + +// SetRowId gets a reference to the given []string and assigns it to the RowId field. +func (o *DatasetRowNavigation) SetRowId(v []string) { + o.RowId = v +} + +func (o DatasetRowNavigation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowNavigation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RowId) { + toSerialize["row_id"] = o.RowId + } + return toSerialize, nil +} + +type NullableDatasetRowNavigation struct { + value *DatasetRowNavigation + isSet bool +} + +func (v NullableDatasetRowNavigation) Get() *DatasetRowNavigation { + return v.value +} + +func (v *NullableDatasetRowNavigation) Set(val *DatasetRowNavigation) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowNavigation) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowNavigation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowNavigation(val *DatasetRowNavigation) *NullableDatasetRowNavigation { + return &NullableDatasetRowNavigation{value: val, isSet: true} +} + +func (v NullableDatasetRowNavigation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowNavigation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_rows_import_message_response.go b/go/futureagi/model_dataset_rows_import_message_response.go new file mode 100644 index 0000000..ef4e01f --- /dev/null +++ b/go/futureagi/model_dataset_rows_import_message_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowsImportMessageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowsImportMessageResponse{} + +// DatasetRowsImportMessageResponse struct for DatasetRowsImportMessageResponse +type DatasetRowsImportMessageResponse struct { + Status bool `json:"status"` + Result DatasetRowsImportMessageResult `json:"result"` +} + +type _DatasetRowsImportMessageResponse DatasetRowsImportMessageResponse + +// NewDatasetRowsImportMessageResponse instantiates a new DatasetRowsImportMessageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowsImportMessageResponse(status bool, result DatasetRowsImportMessageResult) *DatasetRowsImportMessageResponse { + this := DatasetRowsImportMessageResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetRowsImportMessageResponseWithDefaults instantiates a new DatasetRowsImportMessageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowsImportMessageResponseWithDefaults() *DatasetRowsImportMessageResponse { + this := DatasetRowsImportMessageResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetRowsImportMessageResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetRowsImportMessageResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetRowsImportMessageResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetRowsImportMessageResponse) GetResult() DatasetRowsImportMessageResult { + if o == nil { + var ret DatasetRowsImportMessageResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetRowsImportMessageResponse) GetResultOk() (*DatasetRowsImportMessageResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetRowsImportMessageResponse) SetResult(v DatasetRowsImportMessageResult) { + o.Result = v +} + +func (o DatasetRowsImportMessageResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowsImportMessageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetRowsImportMessageResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowsImportMessageResponse := _DatasetRowsImportMessageResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowsImportMessageResponse) + + if err != nil { + return err + } + + *o = DatasetRowsImportMessageResponse(varDatasetRowsImportMessageResponse) + + return err +} + +type NullableDatasetRowsImportMessageResponse struct { + value *DatasetRowsImportMessageResponse + isSet bool +} + +func (v NullableDatasetRowsImportMessageResponse) Get() *DatasetRowsImportMessageResponse { + return v.value +} + +func (v *NullableDatasetRowsImportMessageResponse) Set(val *DatasetRowsImportMessageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowsImportMessageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowsImportMessageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowsImportMessageResponse(val *DatasetRowsImportMessageResponse) *NullableDatasetRowsImportMessageResponse { + return &NullableDatasetRowsImportMessageResponse{value: val, isSet: true} +} + +func (v NullableDatasetRowsImportMessageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowsImportMessageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_rows_import_message_result.go b/go/futureagi/model_dataset_rows_import_message_result.go new file mode 100644 index 0000000..2520e8a --- /dev/null +++ b/go/futureagi/model_dataset_rows_import_message_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowsImportMessageResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowsImportMessageResult{} + +// DatasetRowsImportMessageResult struct for DatasetRowsImportMessageResult +type DatasetRowsImportMessageResult struct { + Message string `json:"message"` +} + +type _DatasetRowsImportMessageResult DatasetRowsImportMessageResult + +// NewDatasetRowsImportMessageResult instantiates a new DatasetRowsImportMessageResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowsImportMessageResult(message string) *DatasetRowsImportMessageResult { + this := DatasetRowsImportMessageResult{} + this.Message = message + return &this +} + +// NewDatasetRowsImportMessageResultWithDefaults instantiates a new DatasetRowsImportMessageResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowsImportMessageResultWithDefaults() *DatasetRowsImportMessageResult { + this := DatasetRowsImportMessageResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DatasetRowsImportMessageResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DatasetRowsImportMessageResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DatasetRowsImportMessageResult) SetMessage(v string) { + o.Message = v +} + +func (o DatasetRowsImportMessageResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowsImportMessageResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *DatasetRowsImportMessageResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowsImportMessageResult := _DatasetRowsImportMessageResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowsImportMessageResult) + + if err != nil { + return err + } + + *o = DatasetRowsImportMessageResult(varDatasetRowsImportMessageResult) + + return err +} + +type NullableDatasetRowsImportMessageResult struct { + value *DatasetRowsImportMessageResult + isSet bool +} + +func (v NullableDatasetRowsImportMessageResult) Get() *DatasetRowsImportMessageResult { + return v.value +} + +func (v *NullableDatasetRowsImportMessageResult) Set(val *DatasetRowsImportMessageResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowsImportMessageResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowsImportMessageResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowsImportMessageResult(val *DatasetRowsImportMessageResult) *NullableDatasetRowsImportMessageResult { + return &NullableDatasetRowsImportMessageResult{value: val, isSet: true} +} + +func (v NullableDatasetRowsImportMessageResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowsImportMessageResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_rows_imported_response.go b/go/futureagi/model_dataset_rows_imported_response.go new file mode 100644 index 0000000..8464cfe --- /dev/null +++ b/go/futureagi/model_dataset_rows_imported_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowsImportedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowsImportedResponse{} + +// DatasetRowsImportedResponse struct for DatasetRowsImportedResponse +type DatasetRowsImportedResponse struct { + Status bool `json:"status"` + Result DatasetRowsImportedResult `json:"result"` +} + +type _DatasetRowsImportedResponse DatasetRowsImportedResponse + +// NewDatasetRowsImportedResponse instantiates a new DatasetRowsImportedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowsImportedResponse(status bool, result DatasetRowsImportedResult) *DatasetRowsImportedResponse { + this := DatasetRowsImportedResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetRowsImportedResponseWithDefaults instantiates a new DatasetRowsImportedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowsImportedResponseWithDefaults() *DatasetRowsImportedResponse { + this := DatasetRowsImportedResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetRowsImportedResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetRowsImportedResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetRowsImportedResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetRowsImportedResponse) GetResult() DatasetRowsImportedResult { + if o == nil { + var ret DatasetRowsImportedResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetRowsImportedResponse) GetResultOk() (*DatasetRowsImportedResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetRowsImportedResponse) SetResult(v DatasetRowsImportedResult) { + o.Result = v +} + +func (o DatasetRowsImportedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowsImportedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetRowsImportedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowsImportedResponse := _DatasetRowsImportedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowsImportedResponse) + + if err != nil { + return err + } + + *o = DatasetRowsImportedResponse(varDatasetRowsImportedResponse) + + return err +} + +type NullableDatasetRowsImportedResponse struct { + value *DatasetRowsImportedResponse + isSet bool +} + +func (v NullableDatasetRowsImportedResponse) Get() *DatasetRowsImportedResponse { + return v.value +} + +func (v *NullableDatasetRowsImportedResponse) Set(val *DatasetRowsImportedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowsImportedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowsImportedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowsImportedResponse(val *DatasetRowsImportedResponse) *NullableDatasetRowsImportedResponse { + return &NullableDatasetRowsImportedResponse{value: val, isSet: true} +} + +func (v NullableDatasetRowsImportedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowsImportedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_rows_imported_result.go b/go/futureagi/model_dataset_rows_imported_result.go new file mode 100644 index 0000000..95e4eb0 --- /dev/null +++ b/go/futureagi/model_dataset_rows_imported_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRowsImportedResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRowsImportedResult{} + +// DatasetRowsImportedResult struct for DatasetRowsImportedResult +type DatasetRowsImportedResult struct { + Message string `json:"message"` + RowsAdded int32 `json:"rows_added"` +} + +type _DatasetRowsImportedResult DatasetRowsImportedResult + +// NewDatasetRowsImportedResult instantiates a new DatasetRowsImportedResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRowsImportedResult(message string, rowsAdded int32) *DatasetRowsImportedResult { + this := DatasetRowsImportedResult{} + this.Message = message + this.RowsAdded = rowsAdded + return &this +} + +// NewDatasetRowsImportedResultWithDefaults instantiates a new DatasetRowsImportedResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRowsImportedResultWithDefaults() *DatasetRowsImportedResult { + this := DatasetRowsImportedResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DatasetRowsImportedResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DatasetRowsImportedResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DatasetRowsImportedResult) SetMessage(v string) { + o.Message = v +} + +// GetRowsAdded returns the RowsAdded field value +func (o *DatasetRowsImportedResult) GetRowsAdded() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowsAdded +} + +// GetRowsAddedOk returns a tuple with the RowsAdded field value +// and a boolean to check if the value has been set. +func (o *DatasetRowsImportedResult) GetRowsAddedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowsAdded, true +} + +// SetRowsAdded sets field value +func (o *DatasetRowsImportedResult) SetRowsAdded(v int32) { + o.RowsAdded = v +} + +func (o DatasetRowsImportedResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRowsImportedResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["rows_added"] = o.RowsAdded + return toSerialize, nil +} + +func (o *DatasetRowsImportedResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "rows_added", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRowsImportedResult := _DatasetRowsImportedResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRowsImportedResult) + + if err != nil { + return err + } + + *o = DatasetRowsImportedResult(varDatasetRowsImportedResult) + + return err +} + +type NullableDatasetRowsImportedResult struct { + value *DatasetRowsImportedResult + isSet bool +} + +func (v NullableDatasetRowsImportedResult) Get() *DatasetRowsImportedResult { + return v.value +} + +func (v *NullableDatasetRowsImportedResult) Set(val *DatasetRowsImportedResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRowsImportedResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRowsImportedResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRowsImportedResult(val *DatasetRowsImportedResult) *NullableDatasetRowsImportedResult { + return &NullableDatasetRowsImportedResult{value: val, isSet: true} +} + +func (v NullableDatasetRowsImportedResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRowsImportedResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_run_prompt_stats_prompt.go b/go/futureagi/model_dataset_run_prompt_stats_prompt.go new file mode 100644 index 0000000..444fed8 --- /dev/null +++ b/go/futureagi/model_dataset_run_prompt_stats_prompt.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRunPromptStatsPrompt type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRunPromptStatsPrompt{} + +// DatasetRunPromptStatsPrompt struct for DatasetRunPromptStatsPrompt +type DatasetRunPromptStatsPrompt struct { + Id string `json:"id"` + Name string `json:"name"` + InputToken float32 `json:"input_token"` + OutputToken float32 `json:"output_token"` + TotalToken float32 `json:"total_token"` +} + +type _DatasetRunPromptStatsPrompt DatasetRunPromptStatsPrompt + +// NewDatasetRunPromptStatsPrompt instantiates a new DatasetRunPromptStatsPrompt object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRunPromptStatsPrompt(id string, name string, inputToken float32, outputToken float32, totalToken float32) *DatasetRunPromptStatsPrompt { + this := DatasetRunPromptStatsPrompt{} + this.Id = id + this.Name = name + this.InputToken = inputToken + this.OutputToken = outputToken + this.TotalToken = totalToken + return &this +} + +// NewDatasetRunPromptStatsPromptWithDefaults instantiates a new DatasetRunPromptStatsPrompt object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRunPromptStatsPromptWithDefaults() *DatasetRunPromptStatsPrompt { + this := DatasetRunPromptStatsPrompt{} + return &this +} + +// GetId returns the Id field value +func (o *DatasetRunPromptStatsPrompt) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsPrompt) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DatasetRunPromptStatsPrompt) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DatasetRunPromptStatsPrompt) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsPrompt) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatasetRunPromptStatsPrompt) SetName(v string) { + o.Name = v +} + +// GetInputToken returns the InputToken field value +func (o *DatasetRunPromptStatsPrompt) GetInputToken() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.InputToken +} + +// GetInputTokenOk returns a tuple with the InputToken field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsPrompt) GetInputTokenOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.InputToken, true +} + +// SetInputToken sets field value +func (o *DatasetRunPromptStatsPrompt) SetInputToken(v float32) { + o.InputToken = v +} + +// GetOutputToken returns the OutputToken field value +func (o *DatasetRunPromptStatsPrompt) GetOutputToken() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.OutputToken +} + +// GetOutputTokenOk returns a tuple with the OutputToken field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsPrompt) GetOutputTokenOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.OutputToken, true +} + +// SetOutputToken sets field value +func (o *DatasetRunPromptStatsPrompt) SetOutputToken(v float32) { + o.OutputToken = v +} + +// GetTotalToken returns the TotalToken field value +func (o *DatasetRunPromptStatsPrompt) GetTotalToken() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.TotalToken +} + +// GetTotalTokenOk returns a tuple with the TotalToken field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsPrompt) GetTotalTokenOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.TotalToken, true +} + +// SetTotalToken sets field value +func (o *DatasetRunPromptStatsPrompt) SetTotalToken(v float32) { + o.TotalToken = v +} + +func (o DatasetRunPromptStatsPrompt) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRunPromptStatsPrompt) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["input_token"] = o.InputToken + toSerialize["output_token"] = o.OutputToken + toSerialize["total_token"] = o.TotalToken + return toSerialize, nil +} + +func (o *DatasetRunPromptStatsPrompt) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "input_token", + "output_token", + "total_token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRunPromptStatsPrompt := _DatasetRunPromptStatsPrompt{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRunPromptStatsPrompt) + + if err != nil { + return err + } + + *o = DatasetRunPromptStatsPrompt(varDatasetRunPromptStatsPrompt) + + return err +} + +type NullableDatasetRunPromptStatsPrompt struct { + value *DatasetRunPromptStatsPrompt + isSet bool +} + +func (v NullableDatasetRunPromptStatsPrompt) Get() *DatasetRunPromptStatsPrompt { + return v.value +} + +func (v *NullableDatasetRunPromptStatsPrompt) Set(val *DatasetRunPromptStatsPrompt) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRunPromptStatsPrompt) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRunPromptStatsPrompt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRunPromptStatsPrompt(val *DatasetRunPromptStatsPrompt) *NullableDatasetRunPromptStatsPrompt { + return &NullableDatasetRunPromptStatsPrompt{value: val, isSet: true} +} + +func (v NullableDatasetRunPromptStatsPrompt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRunPromptStatsPrompt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_run_prompt_stats_response.go b/go/futureagi/model_dataset_run_prompt_stats_response.go new file mode 100644 index 0000000..660b01b --- /dev/null +++ b/go/futureagi/model_dataset_run_prompt_stats_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRunPromptStatsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRunPromptStatsResponse{} + +// DatasetRunPromptStatsResponse struct for DatasetRunPromptStatsResponse +type DatasetRunPromptStatsResponse struct { + Status bool `json:"status"` + Result DatasetRunPromptStatsResult `json:"result"` +} + +type _DatasetRunPromptStatsResponse DatasetRunPromptStatsResponse + +// NewDatasetRunPromptStatsResponse instantiates a new DatasetRunPromptStatsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRunPromptStatsResponse(status bool, result DatasetRunPromptStatsResult) *DatasetRunPromptStatsResponse { + this := DatasetRunPromptStatsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetRunPromptStatsResponseWithDefaults instantiates a new DatasetRunPromptStatsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRunPromptStatsResponseWithDefaults() *DatasetRunPromptStatsResponse { + this := DatasetRunPromptStatsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetRunPromptStatsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetRunPromptStatsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetRunPromptStatsResponse) GetResult() DatasetRunPromptStatsResult { + if o == nil { + var ret DatasetRunPromptStatsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsResponse) GetResultOk() (*DatasetRunPromptStatsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetRunPromptStatsResponse) SetResult(v DatasetRunPromptStatsResult) { + o.Result = v +} + +func (o DatasetRunPromptStatsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRunPromptStatsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetRunPromptStatsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRunPromptStatsResponse := _DatasetRunPromptStatsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRunPromptStatsResponse) + + if err != nil { + return err + } + + *o = DatasetRunPromptStatsResponse(varDatasetRunPromptStatsResponse) + + return err +} + +type NullableDatasetRunPromptStatsResponse struct { + value *DatasetRunPromptStatsResponse + isSet bool +} + +func (v NullableDatasetRunPromptStatsResponse) Get() *DatasetRunPromptStatsResponse { + return v.value +} + +func (v *NullableDatasetRunPromptStatsResponse) Set(val *DatasetRunPromptStatsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRunPromptStatsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRunPromptStatsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRunPromptStatsResponse(val *DatasetRunPromptStatsResponse) *NullableDatasetRunPromptStatsResponse { + return &NullableDatasetRunPromptStatsResponse{value: val, isSet: true} +} + +func (v NullableDatasetRunPromptStatsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRunPromptStatsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_run_prompt_stats_result.go b/go/futureagi/model_dataset_run_prompt_stats_result.go new file mode 100644 index 0000000..2636460 --- /dev/null +++ b/go/futureagi/model_dataset_run_prompt_stats_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetRunPromptStatsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetRunPromptStatsResult{} + +// DatasetRunPromptStatsResult struct for DatasetRunPromptStatsResult +type DatasetRunPromptStatsResult struct { + AvgTokens float32 `json:"avg_tokens"` + AvgCost float32 `json:"avg_cost"` + AvgTime float32 `json:"avg_time"` + Prompts []DatasetRunPromptStatsPrompt `json:"prompts"` +} + +type _DatasetRunPromptStatsResult DatasetRunPromptStatsResult + +// NewDatasetRunPromptStatsResult instantiates a new DatasetRunPromptStatsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetRunPromptStatsResult(avgTokens float32, avgCost float32, avgTime float32, prompts []DatasetRunPromptStatsPrompt) *DatasetRunPromptStatsResult { + this := DatasetRunPromptStatsResult{} + this.AvgTokens = avgTokens + this.AvgCost = avgCost + this.AvgTime = avgTime + this.Prompts = prompts + return &this +} + +// NewDatasetRunPromptStatsResultWithDefaults instantiates a new DatasetRunPromptStatsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetRunPromptStatsResultWithDefaults() *DatasetRunPromptStatsResult { + this := DatasetRunPromptStatsResult{} + return &this +} + +// GetAvgTokens returns the AvgTokens field value +func (o *DatasetRunPromptStatsResult) GetAvgTokens() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgTokens +} + +// GetAvgTokensOk returns a tuple with the AvgTokens field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsResult) GetAvgTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgTokens, true +} + +// SetAvgTokens sets field value +func (o *DatasetRunPromptStatsResult) SetAvgTokens(v float32) { + o.AvgTokens = v +} + +// GetAvgCost returns the AvgCost field value +func (o *DatasetRunPromptStatsResult) GetAvgCost() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgCost +} + +// GetAvgCostOk returns a tuple with the AvgCost field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsResult) GetAvgCostOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgCost, true +} + +// SetAvgCost sets field value +func (o *DatasetRunPromptStatsResult) SetAvgCost(v float32) { + o.AvgCost = v +} + +// GetAvgTime returns the AvgTime field value +func (o *DatasetRunPromptStatsResult) GetAvgTime() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgTime +} + +// GetAvgTimeOk returns a tuple with the AvgTime field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsResult) GetAvgTimeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgTime, true +} + +// SetAvgTime sets field value +func (o *DatasetRunPromptStatsResult) SetAvgTime(v float32) { + o.AvgTime = v +} + +// GetPrompts returns the Prompts field value +func (o *DatasetRunPromptStatsResult) GetPrompts() []DatasetRunPromptStatsPrompt { + if o == nil { + var ret []DatasetRunPromptStatsPrompt + return ret + } + + return o.Prompts +} + +// GetPromptsOk returns a tuple with the Prompts field value +// and a boolean to check if the value has been set. +func (o *DatasetRunPromptStatsResult) GetPromptsOk() ([]DatasetRunPromptStatsPrompt, bool) { + if o == nil { + return nil, false + } + return o.Prompts, true +} + +// SetPrompts sets field value +func (o *DatasetRunPromptStatsResult) SetPrompts(v []DatasetRunPromptStatsPrompt) { + o.Prompts = v +} + +func (o DatasetRunPromptStatsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetRunPromptStatsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["avg_tokens"] = o.AvgTokens + toSerialize["avg_cost"] = o.AvgCost + toSerialize["avg_time"] = o.AvgTime + toSerialize["prompts"] = o.Prompts + return toSerialize, nil +} + +func (o *DatasetRunPromptStatsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "avg_tokens", + "avg_cost", + "avg_time", + "prompts", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetRunPromptStatsResult := _DatasetRunPromptStatsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetRunPromptStatsResult) + + if err != nil { + return err + } + + *o = DatasetRunPromptStatsResult(varDatasetRunPromptStatsResult) + + return err +} + +type NullableDatasetRunPromptStatsResult struct { + value *DatasetRunPromptStatsResult + isSet bool +} + +func (v NullableDatasetRunPromptStatsResult) Get() *DatasetRunPromptStatsResult { + return v.value +} + +func (v *NullableDatasetRunPromptStatsResult) Set(val *DatasetRunPromptStatsResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetRunPromptStatsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetRunPromptStatsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetRunPromptStatsResult(val *DatasetRunPromptStatsResult) *NullableDatasetRunPromptStatsResult { + return &NullableDatasetRunPromptStatsResult{value: val, isSet: true} +} + +func (v NullableDatasetRunPromptStatsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetRunPromptStatsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_sdk_rows_code.go b/go/futureagi/model_dataset_sdk_rows_code.go new file mode 100644 index 0000000..109d318 --- /dev/null +++ b/go/futureagi/model_dataset_sdk_rows_code.go @@ -0,0 +1,297 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetSdkRowsCode type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetSdkRowsCode{} + +// DatasetSdkRowsCode struct for DatasetSdkRowsCode +type DatasetSdkRowsCode struct { + PythonAddRow string `json:"python_add_row"` + PythonAddCol string `json:"python_add_col"` + TypescriptAddCol string `json:"typescript_add_col"` + TypescriptAddRow string `json:"typescript_add_row"` + CurlAddCol string `json:"curl_add_col"` + CurlAddRow string `json:"curl_add_row"` +} + +type _DatasetSdkRowsCode DatasetSdkRowsCode + +// NewDatasetSdkRowsCode instantiates a new DatasetSdkRowsCode object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetSdkRowsCode(pythonAddRow string, pythonAddCol string, typescriptAddCol string, typescriptAddRow string, curlAddCol string, curlAddRow string) *DatasetSdkRowsCode { + this := DatasetSdkRowsCode{} + this.PythonAddRow = pythonAddRow + this.PythonAddCol = pythonAddCol + this.TypescriptAddCol = typescriptAddCol + this.TypescriptAddRow = typescriptAddRow + this.CurlAddCol = curlAddCol + this.CurlAddRow = curlAddRow + return &this +} + +// NewDatasetSdkRowsCodeWithDefaults instantiates a new DatasetSdkRowsCode object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetSdkRowsCodeWithDefaults() *DatasetSdkRowsCode { + this := DatasetSdkRowsCode{} + return &this +} + +// GetPythonAddRow returns the PythonAddRow field value +func (o *DatasetSdkRowsCode) GetPythonAddRow() string { + if o == nil { + var ret string + return ret + } + + return o.PythonAddRow +} + +// GetPythonAddRowOk returns a tuple with the PythonAddRow field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsCode) GetPythonAddRowOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PythonAddRow, true +} + +// SetPythonAddRow sets field value +func (o *DatasetSdkRowsCode) SetPythonAddRow(v string) { + o.PythonAddRow = v +} + +// GetPythonAddCol returns the PythonAddCol field value +func (o *DatasetSdkRowsCode) GetPythonAddCol() string { + if o == nil { + var ret string + return ret + } + + return o.PythonAddCol +} + +// GetPythonAddColOk returns a tuple with the PythonAddCol field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsCode) GetPythonAddColOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PythonAddCol, true +} + +// SetPythonAddCol sets field value +func (o *DatasetSdkRowsCode) SetPythonAddCol(v string) { + o.PythonAddCol = v +} + +// GetTypescriptAddCol returns the TypescriptAddCol field value +func (o *DatasetSdkRowsCode) GetTypescriptAddCol() string { + if o == nil { + var ret string + return ret + } + + return o.TypescriptAddCol +} + +// GetTypescriptAddColOk returns a tuple with the TypescriptAddCol field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsCode) GetTypescriptAddColOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TypescriptAddCol, true +} + +// SetTypescriptAddCol sets field value +func (o *DatasetSdkRowsCode) SetTypescriptAddCol(v string) { + o.TypescriptAddCol = v +} + +// GetTypescriptAddRow returns the TypescriptAddRow field value +func (o *DatasetSdkRowsCode) GetTypescriptAddRow() string { + if o == nil { + var ret string + return ret + } + + return o.TypescriptAddRow +} + +// GetTypescriptAddRowOk returns a tuple with the TypescriptAddRow field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsCode) GetTypescriptAddRowOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TypescriptAddRow, true +} + +// SetTypescriptAddRow sets field value +func (o *DatasetSdkRowsCode) SetTypescriptAddRow(v string) { + o.TypescriptAddRow = v +} + +// GetCurlAddCol returns the CurlAddCol field value +func (o *DatasetSdkRowsCode) GetCurlAddCol() string { + if o == nil { + var ret string + return ret + } + + return o.CurlAddCol +} + +// GetCurlAddColOk returns a tuple with the CurlAddCol field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsCode) GetCurlAddColOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CurlAddCol, true +} + +// SetCurlAddCol sets field value +func (o *DatasetSdkRowsCode) SetCurlAddCol(v string) { + o.CurlAddCol = v +} + +// GetCurlAddRow returns the CurlAddRow field value +func (o *DatasetSdkRowsCode) GetCurlAddRow() string { + if o == nil { + var ret string + return ret + } + + return o.CurlAddRow +} + +// GetCurlAddRowOk returns a tuple with the CurlAddRow field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsCode) GetCurlAddRowOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CurlAddRow, true +} + +// SetCurlAddRow sets field value +func (o *DatasetSdkRowsCode) SetCurlAddRow(v string) { + o.CurlAddRow = v +} + +func (o DatasetSdkRowsCode) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetSdkRowsCode) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["python_add_row"] = o.PythonAddRow + toSerialize["python_add_col"] = o.PythonAddCol + toSerialize["typescript_add_col"] = o.TypescriptAddCol + toSerialize["typescript_add_row"] = o.TypescriptAddRow + toSerialize["curl_add_col"] = o.CurlAddCol + toSerialize["curl_add_row"] = o.CurlAddRow + return toSerialize, nil +} + +func (o *DatasetSdkRowsCode) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "python_add_row", + "python_add_col", + "typescript_add_col", + "typescript_add_row", + "curl_add_col", + "curl_add_row", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetSdkRowsCode := _DatasetSdkRowsCode{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetSdkRowsCode) + + if err != nil { + return err + } + + *o = DatasetSdkRowsCode(varDatasetSdkRowsCode) + + return err +} + +type NullableDatasetSdkRowsCode struct { + value *DatasetSdkRowsCode + isSet bool +} + +func (v NullableDatasetSdkRowsCode) Get() *DatasetSdkRowsCode { + return v.value +} + +func (v *NullableDatasetSdkRowsCode) Set(val *DatasetSdkRowsCode) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetSdkRowsCode) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetSdkRowsCode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetSdkRowsCode(val *DatasetSdkRowsCode) *NullableDatasetSdkRowsCode { + return &NullableDatasetSdkRowsCode{value: val, isSet: true} +} + +func (v NullableDatasetSdkRowsCode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetSdkRowsCode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_sdk_rows_request.go b/go/futureagi/model_dataset_sdk_rows_request.go new file mode 100644 index 0000000..9119cc4 --- /dev/null +++ b/go/futureagi/model_dataset_sdk_rows_request.go @@ -0,0 +1,172 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DatasetSdkRowsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetSdkRowsRequest{} + +// DatasetSdkRowsRequest struct for DatasetSdkRowsRequest +type DatasetSdkRowsRequest struct { + DatasetName *string `json:"dataset_name,omitempty"` + DatasetId NullableString `json:"dataset_id,omitempty"` +} + +// NewDatasetSdkRowsRequest instantiates a new DatasetSdkRowsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetSdkRowsRequest() *DatasetSdkRowsRequest { + this := DatasetSdkRowsRequest{} + return &this +} + +// NewDatasetSdkRowsRequestWithDefaults instantiates a new DatasetSdkRowsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetSdkRowsRequestWithDefaults() *DatasetSdkRowsRequest { + this := DatasetSdkRowsRequest{} + return &this +} + +// GetDatasetName returns the DatasetName field value if set, zero value otherwise. +func (o *DatasetSdkRowsRequest) GetDatasetName() string { + if o == nil || IsNil(o.DatasetName) { + var ret string + return ret + } + return *o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsRequest) GetDatasetNameOk() (*string, bool) { + if o == nil || IsNil(o.DatasetName) { + return nil, false + } + return o.DatasetName, true +} + +// HasDatasetName returns a boolean if a field has been set. +func (o *DatasetSdkRowsRequest) HasDatasetName() bool { + if o != nil && !IsNil(o.DatasetName) { + return true + } + + return false +} + +// SetDatasetName gets a reference to the given string and assigns it to the DatasetName field. +func (o *DatasetSdkRowsRequest) SetDatasetName(v string) { + o.DatasetName = &v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetSdkRowsRequest) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId.Get()) { + var ret string + return ret + } + return *o.DatasetId.Get() +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetSdkRowsRequest) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DatasetId.Get(), o.DatasetId.IsSet() +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *DatasetSdkRowsRequest) HasDatasetId() bool { + if o != nil && o.DatasetId.IsSet() { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given NullableString and assigns it to the DatasetId field. +func (o *DatasetSdkRowsRequest) SetDatasetId(v string) { + o.DatasetId.Set(&v) +} + +// SetDatasetIdNil sets the value for DatasetId to be an explicit nil +func (o *DatasetSdkRowsRequest) SetDatasetIdNil() { + o.DatasetId.Set(nil) +} + +// UnsetDatasetId ensures that no value is present for DatasetId, not even an explicit nil +func (o *DatasetSdkRowsRequest) UnsetDatasetId() { + o.DatasetId.Unset() +} + +func (o DatasetSdkRowsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetSdkRowsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DatasetName) { + toSerialize["dataset_name"] = o.DatasetName + } + if o.DatasetId.IsSet() { + toSerialize["dataset_id"] = o.DatasetId.Get() + } + return toSerialize, nil +} + +type NullableDatasetSdkRowsRequest struct { + value *DatasetSdkRowsRequest + isSet bool +} + +func (v NullableDatasetSdkRowsRequest) Get() *DatasetSdkRowsRequest { + return v.value +} + +func (v *NullableDatasetSdkRowsRequest) Set(val *DatasetSdkRowsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetSdkRowsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetSdkRowsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetSdkRowsRequest(val *DatasetSdkRowsRequest) *NullableDatasetSdkRowsRequest { + return &NullableDatasetSdkRowsRequest{value: val, isSet: true} +} + +func (v NullableDatasetSdkRowsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetSdkRowsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_sdk_rows_response.go b/go/futureagi/model_dataset_sdk_rows_response.go new file mode 100644 index 0000000..ae76b81 --- /dev/null +++ b/go/futureagi/model_dataset_sdk_rows_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetSdkRowsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetSdkRowsResponse{} + +// DatasetSdkRowsResponse struct for DatasetSdkRowsResponse +type DatasetSdkRowsResponse struct { + Status bool `json:"status"` + Result DatasetSdkRowsResult `json:"result"` +} + +type _DatasetSdkRowsResponse DatasetSdkRowsResponse + +// NewDatasetSdkRowsResponse instantiates a new DatasetSdkRowsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetSdkRowsResponse(status bool, result DatasetSdkRowsResult) *DatasetSdkRowsResponse { + this := DatasetSdkRowsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetSdkRowsResponseWithDefaults instantiates a new DatasetSdkRowsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetSdkRowsResponseWithDefaults() *DatasetSdkRowsResponse { + this := DatasetSdkRowsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetSdkRowsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetSdkRowsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetSdkRowsResponse) GetResult() DatasetSdkRowsResult { + if o == nil { + var ret DatasetSdkRowsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsResponse) GetResultOk() (*DatasetSdkRowsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetSdkRowsResponse) SetResult(v DatasetSdkRowsResult) { + o.Result = v +} + +func (o DatasetSdkRowsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetSdkRowsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetSdkRowsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetSdkRowsResponse := _DatasetSdkRowsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetSdkRowsResponse) + + if err != nil { + return err + } + + *o = DatasetSdkRowsResponse(varDatasetSdkRowsResponse) + + return err +} + +type NullableDatasetSdkRowsResponse struct { + value *DatasetSdkRowsResponse + isSet bool +} + +func (v NullableDatasetSdkRowsResponse) Get() *DatasetSdkRowsResponse { + return v.value +} + +func (v *NullableDatasetSdkRowsResponse) Set(val *DatasetSdkRowsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetSdkRowsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetSdkRowsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetSdkRowsResponse(val *DatasetSdkRowsResponse) *NullableDatasetSdkRowsResponse { + return &NullableDatasetSdkRowsResponse{value: val, isSet: true} +} + +func (v NullableDatasetSdkRowsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetSdkRowsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_sdk_rows_result.go b/go/futureagi/model_dataset_sdk_rows_result.go new file mode 100644 index 0000000..89b10d6 --- /dev/null +++ b/go/futureagi/model_dataset_sdk_rows_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetSdkRowsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetSdkRowsResult{} + +// DatasetSdkRowsResult struct for DatasetSdkRowsResult +type DatasetSdkRowsResult struct { + ApiKeys map[string]interface{} `json:"api_keys"` + Dataset Dataset `json:"dataset"` + Code DatasetSdkRowsCode `json:"code"` +} + +type _DatasetSdkRowsResult DatasetSdkRowsResult + +// NewDatasetSdkRowsResult instantiates a new DatasetSdkRowsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetSdkRowsResult(apiKeys map[string]interface{}, dataset Dataset, code DatasetSdkRowsCode) *DatasetSdkRowsResult { + this := DatasetSdkRowsResult{} + this.ApiKeys = apiKeys + this.Dataset = dataset + this.Code = code + return &this +} + +// NewDatasetSdkRowsResultWithDefaults instantiates a new DatasetSdkRowsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetSdkRowsResultWithDefaults() *DatasetSdkRowsResult { + this := DatasetSdkRowsResult{} + return &this +} + +// GetApiKeys returns the ApiKeys field value +func (o *DatasetSdkRowsResult) GetApiKeys() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.ApiKeys +} + +// GetApiKeysOk returns a tuple with the ApiKeys field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsResult) GetApiKeysOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.ApiKeys, true +} + +// SetApiKeys sets field value +func (o *DatasetSdkRowsResult) SetApiKeys(v map[string]interface{}) { + o.ApiKeys = v +} + +// GetDataset returns the Dataset field value +func (o *DatasetSdkRowsResult) GetDataset() Dataset { + if o == nil { + var ret Dataset + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsResult) GetDatasetOk() (*Dataset, bool) { + if o == nil { + return nil, false + } + return &o.Dataset, true +} + +// SetDataset sets field value +func (o *DatasetSdkRowsResult) SetDataset(v Dataset) { + o.Dataset = v +} + +// GetCode returns the Code field value +func (o *DatasetSdkRowsResult) GetCode() DatasetSdkRowsCode { + if o == nil { + var ret DatasetSdkRowsCode + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *DatasetSdkRowsResult) GetCodeOk() (*DatasetSdkRowsCode, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *DatasetSdkRowsResult) SetCode(v DatasetSdkRowsCode) { + o.Code = v +} + +func (o DatasetSdkRowsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetSdkRowsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_keys"] = o.ApiKeys + toSerialize["dataset"] = o.Dataset + toSerialize["code"] = o.Code + return toSerialize, nil +} + +func (o *DatasetSdkRowsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_keys", + "dataset", + "code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetSdkRowsResult := _DatasetSdkRowsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetSdkRowsResult) + + if err != nil { + return err + } + + *o = DatasetSdkRowsResult(varDatasetSdkRowsResult) + + return err +} + +type NullableDatasetSdkRowsResult struct { + value *DatasetSdkRowsResult + isSet bool +} + +func (v NullableDatasetSdkRowsResult) Get() *DatasetSdkRowsResult { + return v.value +} + +func (v *NullableDatasetSdkRowsResult) Set(val *DatasetSdkRowsResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetSdkRowsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetSdkRowsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetSdkRowsResult(val *DatasetSdkRowsResult) *NullableDatasetSdkRowsResult { + return &NullableDatasetSdkRowsResult{value: val, isSet: true} +} + +func (v NullableDatasetSdkRowsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetSdkRowsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_static_column_request.go b/go/futureagi/model_dataset_static_column_request.go new file mode 100644 index 0000000..565aa49 --- /dev/null +++ b/go/futureagi/model_dataset_static_column_request.go @@ -0,0 +1,221 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetStaticColumnRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetStaticColumnRequest{} + +// DatasetStaticColumnRequest struct for DatasetStaticColumnRequest +type DatasetStaticColumnRequest struct { + NewColumnName string `json:"new_column_name"` + ColumnType string `json:"column_type"` + Source *string `json:"source,omitempty"` +} + +type _DatasetStaticColumnRequest DatasetStaticColumnRequest + +// NewDatasetStaticColumnRequest instantiates a new DatasetStaticColumnRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetStaticColumnRequest(newColumnName string, columnType string) *DatasetStaticColumnRequest { + this := DatasetStaticColumnRequest{} + this.NewColumnName = newColumnName + this.ColumnType = columnType + return &this +} + +// NewDatasetStaticColumnRequestWithDefaults instantiates a new DatasetStaticColumnRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetStaticColumnRequestWithDefaults() *DatasetStaticColumnRequest { + this := DatasetStaticColumnRequest{} + return &this +} + +// GetNewColumnName returns the NewColumnName field value +func (o *DatasetStaticColumnRequest) GetNewColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value +// and a boolean to check if the value has been set. +func (o *DatasetStaticColumnRequest) GetNewColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewColumnName, true +} + +// SetNewColumnName sets field value +func (o *DatasetStaticColumnRequest) SetNewColumnName(v string) { + o.NewColumnName = v +} + +// GetColumnType returns the ColumnType field value +func (o *DatasetStaticColumnRequest) GetColumnType() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnType +} + +// GetColumnTypeOk returns a tuple with the ColumnType field value +// and a boolean to check if the value has been set. +func (o *DatasetStaticColumnRequest) GetColumnTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnType, true +} + +// SetColumnType sets field value +func (o *DatasetStaticColumnRequest) SetColumnType(v string) { + o.ColumnType = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *DatasetStaticColumnRequest) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetStaticColumnRequest) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *DatasetStaticColumnRequest) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *DatasetStaticColumnRequest) SetSource(v string) { + o.Source = &v +} + +func (o DatasetStaticColumnRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetStaticColumnRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["new_column_name"] = o.NewColumnName + toSerialize["column_type"] = o.ColumnType + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + return toSerialize, nil +} + +func (o *DatasetStaticColumnRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "new_column_name", + "column_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetStaticColumnRequest := _DatasetStaticColumnRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetStaticColumnRequest) + + if err != nil { + return err + } + + *o = DatasetStaticColumnRequest(varDatasetStaticColumnRequest) + + return err +} + +type NullableDatasetStaticColumnRequest struct { + value *DatasetStaticColumnRequest + isSet bool +} + +func (v NullableDatasetStaticColumnRequest) Get() *DatasetStaticColumnRequest { + return v.value +} + +func (v *NullableDatasetStaticColumnRequest) Set(val *DatasetStaticColumnRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetStaticColumnRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetStaticColumnRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetStaticColumnRequest(val *DatasetStaticColumnRequest) *NullableDatasetStaticColumnRequest { + return &NullableDatasetStaticColumnRequest{value: val, isSet: true} +} + +func (v NullableDatasetStaticColumnRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetStaticColumnRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_table_metadata.go b/go/futureagi/model_dataset_table_metadata.go new file mode 100644 index 0000000..4f728af --- /dev/null +++ b/go/futureagi/model_dataset_table_metadata.go @@ -0,0 +1,312 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetTableMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetTableMetadata{} + +// DatasetTableMetadata struct for DatasetTableMetadata +type DatasetTableMetadata struct { + DatasetName string `json:"dataset_name"` + TotalRows *int32 `json:"total_rows,omitempty"` + TotalPages *int32 `json:"total_pages,omitempty"` + ErrorMessages []string `json:"error_messages,omitempty"` + Status NullableString `json:"status,omitempty"` +} + +type _DatasetTableMetadata DatasetTableMetadata + +// NewDatasetTableMetadata instantiates a new DatasetTableMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetTableMetadata(datasetName string) *DatasetTableMetadata { + this := DatasetTableMetadata{} + this.DatasetName = datasetName + return &this +} + +// NewDatasetTableMetadataWithDefaults instantiates a new DatasetTableMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetTableMetadataWithDefaults() *DatasetTableMetadata { + this := DatasetTableMetadata{} + return &this +} + +// GetDatasetName returns the DatasetName field value +func (o *DatasetTableMetadata) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *DatasetTableMetadata) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *DatasetTableMetadata) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetTotalRows returns the TotalRows field value if set, zero value otherwise. +func (o *DatasetTableMetadata) GetTotalRows() int32 { + if o == nil || IsNil(o.TotalRows) { + var ret int32 + return ret + } + return *o.TotalRows +} + +// GetTotalRowsOk returns a tuple with the TotalRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableMetadata) GetTotalRowsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalRows) { + return nil, false + } + return o.TotalRows, true +} + +// HasTotalRows returns a boolean if a field has been set. +func (o *DatasetTableMetadata) HasTotalRows() bool { + if o != nil && !IsNil(o.TotalRows) { + return true + } + + return false +} + +// SetTotalRows gets a reference to the given int32 and assigns it to the TotalRows field. +func (o *DatasetTableMetadata) SetTotalRows(v int32) { + o.TotalRows = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *DatasetTableMetadata) GetTotalPages() int32 { + if o == nil || IsNil(o.TotalPages) { + var ret int32 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableMetadata) GetTotalPagesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *DatasetTableMetadata) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field. +func (o *DatasetTableMetadata) SetTotalPages(v int32) { + o.TotalPages = &v +} + +// GetErrorMessages returns the ErrorMessages field value if set, zero value otherwise. +func (o *DatasetTableMetadata) GetErrorMessages() []string { + if o == nil || IsNil(o.ErrorMessages) { + var ret []string + return ret + } + return o.ErrorMessages +} + +// GetErrorMessagesOk returns a tuple with the ErrorMessages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableMetadata) GetErrorMessagesOk() ([]string, bool) { + if o == nil || IsNil(o.ErrorMessages) { + return nil, false + } + return o.ErrorMessages, true +} + +// HasErrorMessages returns a boolean if a field has been set. +func (o *DatasetTableMetadata) HasErrorMessages() bool { + if o != nil && !IsNil(o.ErrorMessages) { + return true + } + + return false +} + +// SetErrorMessages gets a reference to the given []string and assigns it to the ErrorMessages field. +func (o *DatasetTableMetadata) SetErrorMessages(v []string) { + o.ErrorMessages = v +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetTableMetadata) GetStatus() string { + if o == nil || IsNil(o.Status.Get()) { + var ret string + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetTableMetadata) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *DatasetTableMetadata) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableString and assigns it to the Status field. +func (o *DatasetTableMetadata) SetStatus(v string) { + o.Status.Set(&v) +} + +// SetStatusNil sets the value for Status to be an explicit nil +func (o *DatasetTableMetadata) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *DatasetTableMetadata) UnsetStatus() { + o.Status.Unset() +} + +func (o DatasetTableMetadata) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetTableMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_name"] = o.DatasetName + if !IsNil(o.TotalRows) { + toSerialize["total_rows"] = o.TotalRows + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.ErrorMessages) { + toSerialize["error_messages"] = o.ErrorMessages + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + return toSerialize, nil +} + +func (o *DatasetTableMetadata) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetTableMetadata := _DatasetTableMetadata{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetTableMetadata) + + if err != nil { + return err + } + + *o = DatasetTableMetadata(varDatasetTableMetadata) + + return err +} + +type NullableDatasetTableMetadata struct { + value *DatasetTableMetadata + isSet bool +} + +func (v NullableDatasetTableMetadata) Get() *DatasetTableMetadata { + return v.value +} + +func (v *NullableDatasetTableMetadata) Set(val *DatasetTableMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetTableMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetTableMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetTableMetadata(val *DatasetTableMetadata) *NullableDatasetTableMetadata { + return &NullableDatasetTableMetadata{value: val, isSet: true} +} + +func (v NullableDatasetTableMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetTableMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_table_response.go b/go/futureagi/model_dataset_table_response.go new file mode 100644 index 0000000..fe70acd --- /dev/null +++ b/go/futureagi/model_dataset_table_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetTableResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetTableResponse{} + +// DatasetTableResponse struct for DatasetTableResponse +type DatasetTableResponse struct { + Status bool `json:"status"` + Result DatasetTableResult `json:"result"` +} + +type _DatasetTableResponse DatasetTableResponse + +// NewDatasetTableResponse instantiates a new DatasetTableResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetTableResponse(status bool, result DatasetTableResult) *DatasetTableResponse { + this := DatasetTableResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDatasetTableResponseWithDefaults instantiates a new DatasetTableResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetTableResponseWithDefaults() *DatasetTableResponse { + this := DatasetTableResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DatasetTableResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatasetTableResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatasetTableResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DatasetTableResponse) GetResult() DatasetTableResult { + if o == nil { + var ret DatasetTableResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DatasetTableResponse) GetResultOk() (*DatasetTableResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DatasetTableResponse) SetResult(v DatasetTableResult) { + o.Result = v +} + +func (o DatasetTableResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetTableResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DatasetTableResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetTableResponse := _DatasetTableResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetTableResponse) + + if err != nil { + return err + } + + *o = DatasetTableResponse(varDatasetTableResponse) + + return err +} + +type NullableDatasetTableResponse struct { + value *DatasetTableResponse + isSet bool +} + +func (v NullableDatasetTableResponse) Get() *DatasetTableResponse { + return v.value +} + +func (v *NullableDatasetTableResponse) Set(val *DatasetTableResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetTableResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetTableResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetTableResponse(val *DatasetTableResponse) *NullableDatasetTableResponse { + return &NullableDatasetTableResponse{value: val, isSet: true} +} + +func (v NullableDatasetTableResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetTableResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_table_result.go b/go/futureagi/model_dataset_table_result.go new file mode 100644 index 0000000..5ce2ec0 --- /dev/null +++ b/go/futureagi/model_dataset_table_result.go @@ -0,0 +1,420 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetTableResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetTableResult{} + +// DatasetTableResult struct for DatasetTableResult +type DatasetTableResult struct { + Metadata *DatasetTableMetadata `json:"metadata,omitempty"` + ColumnConfig []map[string]interface{} `json:"column_config"` + Table []map[string]interface{} `json:"table,omitempty"` + DatasetConfig map[string]interface{} `json:"dataset_config,omitempty"` + SyntheticDataset *bool `json:"synthetic_dataset,omitempty"` + SyntheticDatasetPercentage NullableFloat32 `json:"synthetic_dataset_percentage,omitempty"` + SyntheticRegenerate *bool `json:"synthetic_regenerate,omitempty"` + IsProcessingData *bool `json:"is_processing_data,omitempty"` +} + +type _DatasetTableResult DatasetTableResult + +// NewDatasetTableResult instantiates a new DatasetTableResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetTableResult(columnConfig []map[string]interface{}) *DatasetTableResult { + this := DatasetTableResult{} + this.ColumnConfig = columnConfig + return &this +} + +// NewDatasetTableResultWithDefaults instantiates a new DatasetTableResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetTableResultWithDefaults() *DatasetTableResult { + this := DatasetTableResult{} + return &this +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *DatasetTableResult) GetMetadata() DatasetTableMetadata { + if o == nil || IsNil(o.Metadata) { + var ret DatasetTableMetadata + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableResult) GetMetadataOk() (*DatasetTableMetadata, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *DatasetTableResult) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given DatasetTableMetadata and assigns it to the Metadata field. +func (o *DatasetTableResult) SetMetadata(v DatasetTableMetadata) { + o.Metadata = &v +} + +// GetColumnConfig returns the ColumnConfig field value +func (o *DatasetTableResult) GetColumnConfig() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.ColumnConfig +} + +// GetColumnConfigOk returns a tuple with the ColumnConfig field value +// and a boolean to check if the value has been set. +func (o *DatasetTableResult) GetColumnConfigOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ColumnConfig, true +} + +// SetColumnConfig sets field value +func (o *DatasetTableResult) SetColumnConfig(v []map[string]interface{}) { + o.ColumnConfig = v +} + +// GetTable returns the Table field value if set, zero value otherwise. +func (o *DatasetTableResult) GetTable() []map[string]interface{} { + if o == nil || IsNil(o.Table) { + var ret []map[string]interface{} + return ret + } + return o.Table +} + +// GetTableOk returns a tuple with the Table field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableResult) GetTableOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Table) { + return nil, false + } + return o.Table, true +} + +// HasTable returns a boolean if a field has been set. +func (o *DatasetTableResult) HasTable() bool { + if o != nil && !IsNil(o.Table) { + return true + } + + return false +} + +// SetTable gets a reference to the given []map[string]interface{} and assigns it to the Table field. +func (o *DatasetTableResult) SetTable(v []map[string]interface{}) { + o.Table = v +} + +// GetDatasetConfig returns the DatasetConfig field value if set, zero value otherwise. +func (o *DatasetTableResult) GetDatasetConfig() map[string]interface{} { + if o == nil || IsNil(o.DatasetConfig) { + var ret map[string]interface{} + return ret + } + return o.DatasetConfig +} + +// GetDatasetConfigOk returns a tuple with the DatasetConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableResult) GetDatasetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DatasetConfig) { + return map[string]interface{}{}, false + } + return o.DatasetConfig, true +} + +// HasDatasetConfig returns a boolean if a field has been set. +func (o *DatasetTableResult) HasDatasetConfig() bool { + if o != nil && !IsNil(o.DatasetConfig) { + return true + } + + return false +} + +// SetDatasetConfig gets a reference to the given map[string]interface{} and assigns it to the DatasetConfig field. +func (o *DatasetTableResult) SetDatasetConfig(v map[string]interface{}) { + o.DatasetConfig = v +} + +// GetSyntheticDataset returns the SyntheticDataset field value if set, zero value otherwise. +func (o *DatasetTableResult) GetSyntheticDataset() bool { + if o == nil || IsNil(o.SyntheticDataset) { + var ret bool + return ret + } + return *o.SyntheticDataset +} + +// GetSyntheticDatasetOk returns a tuple with the SyntheticDataset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableResult) GetSyntheticDatasetOk() (*bool, bool) { + if o == nil || IsNil(o.SyntheticDataset) { + return nil, false + } + return o.SyntheticDataset, true +} + +// HasSyntheticDataset returns a boolean if a field has been set. +func (o *DatasetTableResult) HasSyntheticDataset() bool { + if o != nil && !IsNil(o.SyntheticDataset) { + return true + } + + return false +} + +// SetSyntheticDataset gets a reference to the given bool and assigns it to the SyntheticDataset field. +func (o *DatasetTableResult) SetSyntheticDataset(v bool) { + o.SyntheticDataset = &v +} + +// GetSyntheticDatasetPercentage returns the SyntheticDatasetPercentage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetTableResult) GetSyntheticDatasetPercentage() float32 { + if o == nil || IsNil(o.SyntheticDatasetPercentage.Get()) { + var ret float32 + return ret + } + return *o.SyntheticDatasetPercentage.Get() +} + +// GetSyntheticDatasetPercentageOk returns a tuple with the SyntheticDatasetPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetTableResult) GetSyntheticDatasetPercentageOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.SyntheticDatasetPercentage.Get(), o.SyntheticDatasetPercentage.IsSet() +} + +// HasSyntheticDatasetPercentage returns a boolean if a field has been set. +func (o *DatasetTableResult) HasSyntheticDatasetPercentage() bool { + if o != nil && o.SyntheticDatasetPercentage.IsSet() { + return true + } + + return false +} + +// SetSyntheticDatasetPercentage gets a reference to the given NullableFloat32 and assigns it to the SyntheticDatasetPercentage field. +func (o *DatasetTableResult) SetSyntheticDatasetPercentage(v float32) { + o.SyntheticDatasetPercentage.Set(&v) +} + +// SetSyntheticDatasetPercentageNil sets the value for SyntheticDatasetPercentage to be an explicit nil +func (o *DatasetTableResult) SetSyntheticDatasetPercentageNil() { + o.SyntheticDatasetPercentage.Set(nil) +} + +// UnsetSyntheticDatasetPercentage ensures that no value is present for SyntheticDatasetPercentage, not even an explicit nil +func (o *DatasetTableResult) UnsetSyntheticDatasetPercentage() { + o.SyntheticDatasetPercentage.Unset() +} + +// GetSyntheticRegenerate returns the SyntheticRegenerate field value if set, zero value otherwise. +func (o *DatasetTableResult) GetSyntheticRegenerate() bool { + if o == nil || IsNil(o.SyntheticRegenerate) { + var ret bool + return ret + } + return *o.SyntheticRegenerate +} + +// GetSyntheticRegenerateOk returns a tuple with the SyntheticRegenerate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableResult) GetSyntheticRegenerateOk() (*bool, bool) { + if o == nil || IsNil(o.SyntheticRegenerate) { + return nil, false + } + return o.SyntheticRegenerate, true +} + +// HasSyntheticRegenerate returns a boolean if a field has been set. +func (o *DatasetTableResult) HasSyntheticRegenerate() bool { + if o != nil && !IsNil(o.SyntheticRegenerate) { + return true + } + + return false +} + +// SetSyntheticRegenerate gets a reference to the given bool and assigns it to the SyntheticRegenerate field. +func (o *DatasetTableResult) SetSyntheticRegenerate(v bool) { + o.SyntheticRegenerate = &v +} + +// GetIsProcessingData returns the IsProcessingData field value if set, zero value otherwise. +func (o *DatasetTableResult) GetIsProcessingData() bool { + if o == nil || IsNil(o.IsProcessingData) { + var ret bool + return ret + } + return *o.IsProcessingData +} + +// GetIsProcessingDataOk returns a tuple with the IsProcessingData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetTableResult) GetIsProcessingDataOk() (*bool, bool) { + if o == nil || IsNil(o.IsProcessingData) { + return nil, false + } + return o.IsProcessingData, true +} + +// HasIsProcessingData returns a boolean if a field has been set. +func (o *DatasetTableResult) HasIsProcessingData() bool { + if o != nil && !IsNil(o.IsProcessingData) { + return true + } + + return false +} + +// SetIsProcessingData gets a reference to the given bool and assigns it to the IsProcessingData field. +func (o *DatasetTableResult) SetIsProcessingData(v bool) { + o.IsProcessingData = &v +} + +func (o DatasetTableResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetTableResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + toSerialize["column_config"] = o.ColumnConfig + if !IsNil(o.Table) { + toSerialize["table"] = o.Table + } + if !IsNil(o.DatasetConfig) { + toSerialize["dataset_config"] = o.DatasetConfig + } + if !IsNil(o.SyntheticDataset) { + toSerialize["synthetic_dataset"] = o.SyntheticDataset + } + if o.SyntheticDatasetPercentage.IsSet() { + toSerialize["synthetic_dataset_percentage"] = o.SyntheticDatasetPercentage.Get() + } + if !IsNil(o.SyntheticRegenerate) { + toSerialize["synthetic_regenerate"] = o.SyntheticRegenerate + } + if !IsNil(o.IsProcessingData) { + toSerialize["is_processing_data"] = o.IsProcessingData + } + return toSerialize, nil +} + +func (o *DatasetTableResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetTableResult := _DatasetTableResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetTableResult) + + if err != nil { + return err + } + + *o = DatasetTableResult(varDatasetTableResult) + + return err +} + +type NullableDatasetTableResult struct { + value *DatasetTableResult + isSet bool +} + +func (v NullableDatasetTableResult) Get() *DatasetTableResult { + return v.value +} + +func (v *NullableDatasetTableResult) Set(val *DatasetTableResult) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetTableResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetTableResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetTableResult(val *DatasetTableResult) *NullableDatasetTableResult { + return &NullableDatasetTableResult{value: val, isSet: true} +} + +func (v NullableDatasetTableResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetTableResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_update_cell_value_request.go b/go/futureagi/model_dataset_update_cell_value_request.go new file mode 100644 index 0000000..c2881f7 --- /dev/null +++ b/go/futureagi/model_dataset_update_cell_value_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetUpdateCellValueRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetUpdateCellValueRequest{} + +// DatasetUpdateCellValueRequest struct for DatasetUpdateCellValueRequest +type DatasetUpdateCellValueRequest struct { + RowId string `json:"row_id"` + ColumnId string `json:"column_id"` + // New cell value. Accepts JSON primitives or multipart file uploads. + NewValue NullableString `json:"new_value,omitempty"` +} + +type _DatasetUpdateCellValueRequest DatasetUpdateCellValueRequest + +// NewDatasetUpdateCellValueRequest instantiates a new DatasetUpdateCellValueRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetUpdateCellValueRequest(rowId string, columnId string) *DatasetUpdateCellValueRequest { + this := DatasetUpdateCellValueRequest{} + this.RowId = rowId + this.ColumnId = columnId + return &this +} + +// NewDatasetUpdateCellValueRequestWithDefaults instantiates a new DatasetUpdateCellValueRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetUpdateCellValueRequestWithDefaults() *DatasetUpdateCellValueRequest { + this := DatasetUpdateCellValueRequest{} + return &this +} + +// GetRowId returns the RowId field value +func (o *DatasetUpdateCellValueRequest) GetRowId() string { + if o == nil { + var ret string + return ret + } + + return o.RowId +} + +// GetRowIdOk returns a tuple with the RowId field value +// and a boolean to check if the value has been set. +func (o *DatasetUpdateCellValueRequest) GetRowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RowId, true +} + +// SetRowId sets field value +func (o *DatasetUpdateCellValueRequest) SetRowId(v string) { + o.RowId = v +} + +// GetColumnId returns the ColumnId field value +func (o *DatasetUpdateCellValueRequest) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *DatasetUpdateCellValueRequest) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *DatasetUpdateCellValueRequest) SetColumnId(v string) { + o.ColumnId = v +} + +// GetNewValue returns the NewValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DatasetUpdateCellValueRequest) GetNewValue() string { + if o == nil || IsNil(o.NewValue.Get()) { + var ret string + return ret + } + return *o.NewValue.Get() +} + +// GetNewValueOk returns a tuple with the NewValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatasetUpdateCellValueRequest) GetNewValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NewValue.Get(), o.NewValue.IsSet() +} + +// HasNewValue returns a boolean if a field has been set. +func (o *DatasetUpdateCellValueRequest) HasNewValue() bool { + if o != nil && o.NewValue.IsSet() { + return true + } + + return false +} + +// SetNewValue gets a reference to the given NullableString and assigns it to the NewValue field. +func (o *DatasetUpdateCellValueRequest) SetNewValue(v string) { + o.NewValue.Set(&v) +} + +// SetNewValueNil sets the value for NewValue to be an explicit nil +func (o *DatasetUpdateCellValueRequest) SetNewValueNil() { + o.NewValue.Set(nil) +} + +// UnsetNewValue ensures that no value is present for NewValue, not even an explicit nil +func (o *DatasetUpdateCellValueRequest) UnsetNewValue() { + o.NewValue.Unset() +} + +func (o DatasetUpdateCellValueRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetUpdateCellValueRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["row_id"] = o.RowId + toSerialize["column_id"] = o.ColumnId + if o.NewValue.IsSet() { + toSerialize["new_value"] = o.NewValue.Get() + } + return toSerialize, nil +} + +func (o *DatasetUpdateCellValueRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "row_id", + "column_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetUpdateCellValueRequest := _DatasetUpdateCellValueRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetUpdateCellValueRequest) + + if err != nil { + return err + } + + *o = DatasetUpdateCellValueRequest(varDatasetUpdateCellValueRequest) + + return err +} + +type NullableDatasetUpdateCellValueRequest struct { + value *DatasetUpdateCellValueRequest + isSet bool +} + +func (v NullableDatasetUpdateCellValueRequest) Get() *DatasetUpdateCellValueRequest { + return v.value +} + +func (v *NullableDatasetUpdateCellValueRequest) Set(val *DatasetUpdateCellValueRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetUpdateCellValueRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetUpdateCellValueRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetUpdateCellValueRequest(val *DatasetUpdateCellValueRequest) *NullableDatasetUpdateCellValueRequest { + return &NullableDatasetUpdateCellValueRequest{value: val, isSet: true} +} + +func (v NullableDatasetUpdateCellValueRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetUpdateCellValueRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_update_column_name_request.go b/go/futureagi/model_dataset_update_column_name_request.go new file mode 100644 index 0000000..5ee4068 --- /dev/null +++ b/go/futureagi/model_dataset_update_column_name_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetUpdateColumnNameRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetUpdateColumnNameRequest{} + +// DatasetUpdateColumnNameRequest struct for DatasetUpdateColumnNameRequest +type DatasetUpdateColumnNameRequest struct { + NewColumnName string `json:"new_column_name"` +} + +type _DatasetUpdateColumnNameRequest DatasetUpdateColumnNameRequest + +// NewDatasetUpdateColumnNameRequest instantiates a new DatasetUpdateColumnNameRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetUpdateColumnNameRequest(newColumnName string) *DatasetUpdateColumnNameRequest { + this := DatasetUpdateColumnNameRequest{} + this.NewColumnName = newColumnName + return &this +} + +// NewDatasetUpdateColumnNameRequestWithDefaults instantiates a new DatasetUpdateColumnNameRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetUpdateColumnNameRequestWithDefaults() *DatasetUpdateColumnNameRequest { + this := DatasetUpdateColumnNameRequest{} + return &this +} + +// GetNewColumnName returns the NewColumnName field value +func (o *DatasetUpdateColumnNameRequest) GetNewColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value +// and a boolean to check if the value has been set. +func (o *DatasetUpdateColumnNameRequest) GetNewColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewColumnName, true +} + +// SetNewColumnName sets field value +func (o *DatasetUpdateColumnNameRequest) SetNewColumnName(v string) { + o.NewColumnName = v +} + +func (o DatasetUpdateColumnNameRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetUpdateColumnNameRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["new_column_name"] = o.NewColumnName + return toSerialize, nil +} + +func (o *DatasetUpdateColumnNameRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "new_column_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetUpdateColumnNameRequest := _DatasetUpdateColumnNameRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetUpdateColumnNameRequest) + + if err != nil { + return err + } + + *o = DatasetUpdateColumnNameRequest(varDatasetUpdateColumnNameRequest) + + return err +} + +type NullableDatasetUpdateColumnNameRequest struct { + value *DatasetUpdateColumnNameRequest + isSet bool +} + +func (v NullableDatasetUpdateColumnNameRequest) Get() *DatasetUpdateColumnNameRequest { + return v.value +} + +func (v *NullableDatasetUpdateColumnNameRequest) Set(val *DatasetUpdateColumnNameRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetUpdateColumnNameRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetUpdateColumnNameRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetUpdateColumnNameRequest(val *DatasetUpdateColumnNameRequest) *NullableDatasetUpdateColumnNameRequest { + return &NullableDatasetUpdateColumnNameRequest{value: val, isSet: true} +} + +func (v NullableDatasetUpdateColumnNameRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetUpdateColumnNameRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dataset_update_column_type_request.go b/go/futureagi/model_dataset_update_column_type_request.go new file mode 100644 index 0000000..b974ac7 --- /dev/null +++ b/go/futureagi/model_dataset_update_column_type_request.go @@ -0,0 +1,237 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DatasetUpdateColumnTypeRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatasetUpdateColumnTypeRequest{} + +// DatasetUpdateColumnTypeRequest struct for DatasetUpdateColumnTypeRequest +type DatasetUpdateColumnTypeRequest struct { + NewColumnType string `json:"new_column_type"` + Preview *bool `json:"preview,omitempty"` + ForceUpdate *bool `json:"force_update,omitempty"` +} + +type _DatasetUpdateColumnTypeRequest DatasetUpdateColumnTypeRequest + +// NewDatasetUpdateColumnTypeRequest instantiates a new DatasetUpdateColumnTypeRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatasetUpdateColumnTypeRequest(newColumnType string) *DatasetUpdateColumnTypeRequest { + this := DatasetUpdateColumnTypeRequest{} + this.NewColumnType = newColumnType + var preview bool = true + this.Preview = &preview + var forceUpdate bool = false + this.ForceUpdate = &forceUpdate + return &this +} + +// NewDatasetUpdateColumnTypeRequestWithDefaults instantiates a new DatasetUpdateColumnTypeRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatasetUpdateColumnTypeRequestWithDefaults() *DatasetUpdateColumnTypeRequest { + this := DatasetUpdateColumnTypeRequest{} + var preview bool = true + this.Preview = &preview + var forceUpdate bool = false + this.ForceUpdate = &forceUpdate + return &this +} + +// GetNewColumnType returns the NewColumnType field value +func (o *DatasetUpdateColumnTypeRequest) GetNewColumnType() string { + if o == nil { + var ret string + return ret + } + + return o.NewColumnType +} + +// GetNewColumnTypeOk returns a tuple with the NewColumnType field value +// and a boolean to check if the value has been set. +func (o *DatasetUpdateColumnTypeRequest) GetNewColumnTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewColumnType, true +} + +// SetNewColumnType sets field value +func (o *DatasetUpdateColumnTypeRequest) SetNewColumnType(v string) { + o.NewColumnType = v +} + +// GetPreview returns the Preview field value if set, zero value otherwise. +func (o *DatasetUpdateColumnTypeRequest) GetPreview() bool { + if o == nil || IsNil(o.Preview) { + var ret bool + return ret + } + return *o.Preview +} + +// GetPreviewOk returns a tuple with the Preview field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetUpdateColumnTypeRequest) GetPreviewOk() (*bool, bool) { + if o == nil || IsNil(o.Preview) { + return nil, false + } + return o.Preview, true +} + +// HasPreview returns a boolean if a field has been set. +func (o *DatasetUpdateColumnTypeRequest) HasPreview() bool { + if o != nil && !IsNil(o.Preview) { + return true + } + + return false +} + +// SetPreview gets a reference to the given bool and assigns it to the Preview field. +func (o *DatasetUpdateColumnTypeRequest) SetPreview(v bool) { + o.Preview = &v +} + +// GetForceUpdate returns the ForceUpdate field value if set, zero value otherwise. +func (o *DatasetUpdateColumnTypeRequest) GetForceUpdate() bool { + if o == nil || IsNil(o.ForceUpdate) { + var ret bool + return ret + } + return *o.ForceUpdate +} + +// GetForceUpdateOk returns a tuple with the ForceUpdate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatasetUpdateColumnTypeRequest) GetForceUpdateOk() (*bool, bool) { + if o == nil || IsNil(o.ForceUpdate) { + return nil, false + } + return o.ForceUpdate, true +} + +// HasForceUpdate returns a boolean if a field has been set. +func (o *DatasetUpdateColumnTypeRequest) HasForceUpdate() bool { + if o != nil && !IsNil(o.ForceUpdate) { + return true + } + + return false +} + +// SetForceUpdate gets a reference to the given bool and assigns it to the ForceUpdate field. +func (o *DatasetUpdateColumnTypeRequest) SetForceUpdate(v bool) { + o.ForceUpdate = &v +} + +func (o DatasetUpdateColumnTypeRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatasetUpdateColumnTypeRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["new_column_type"] = o.NewColumnType + if !IsNil(o.Preview) { + toSerialize["preview"] = o.Preview + } + if !IsNil(o.ForceUpdate) { + toSerialize["force_update"] = o.ForceUpdate + } + return toSerialize, nil +} + +func (o *DatasetUpdateColumnTypeRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "new_column_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatasetUpdateColumnTypeRequest := _DatasetUpdateColumnTypeRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatasetUpdateColumnTypeRequest) + + if err != nil { + return err + } + + *o = DatasetUpdateColumnTypeRequest(varDatasetUpdateColumnTypeRequest) + + return err +} + +type NullableDatasetUpdateColumnTypeRequest struct { + value *DatasetUpdateColumnTypeRequest + isSet bool +} + +func (v NullableDatasetUpdateColumnTypeRequest) Get() *DatasetUpdateColumnTypeRequest { + return v.value +} + +func (v *NullableDatasetUpdateColumnTypeRequest) Set(val *DatasetUpdateColumnTypeRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatasetUpdateColumnTypeRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatasetUpdateColumnTypeRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatasetUpdateColumnTypeRequest(val *DatasetUpdateColumnTypeRequest) *NullableDatasetUpdateColumnTypeRequest { + return &NullableDatasetUpdateColumnTypeRequest{value: val, isSet: true} +} + +func (v NullableDatasetUpdateColumnTypeRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatasetUpdateColumnTypeRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_deep_analysis_api_response.go b/go/futureagi/model_deep_analysis_api_response.go new file mode 100644 index 0000000..8558840 --- /dev/null +++ b/go/futureagi/model_deep_analysis_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DeepAnalysisApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeepAnalysisApiResponse{} + +// DeepAnalysisApiResponse struct for DeepAnalysisApiResponse +type DeepAnalysisApiResponse struct { + Status *bool `json:"status,omitempty"` + Result DeepAnalysisResponse `json:"result"` +} + +type _DeepAnalysisApiResponse DeepAnalysisApiResponse + +// NewDeepAnalysisApiResponse instantiates a new DeepAnalysisApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeepAnalysisApiResponse(result DeepAnalysisResponse) *DeepAnalysisApiResponse { + this := DeepAnalysisApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewDeepAnalysisApiResponseWithDefaults instantiates a new DeepAnalysisApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeepAnalysisApiResponseWithDefaults() *DeepAnalysisApiResponse { + this := DeepAnalysisApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *DeepAnalysisApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeepAnalysisApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *DeepAnalysisApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *DeepAnalysisApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *DeepAnalysisApiResponse) GetResult() DeepAnalysisResponse { + if o == nil { + var ret DeepAnalysisResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisApiResponse) GetResultOk() (*DeepAnalysisResponse, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DeepAnalysisApiResponse) SetResult(v DeepAnalysisResponse) { + o.Result = v +} + +func (o DeepAnalysisApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeepAnalysisApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DeepAnalysisApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeepAnalysisApiResponse := _DeepAnalysisApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeepAnalysisApiResponse) + + if err != nil { + return err + } + + *o = DeepAnalysisApiResponse(varDeepAnalysisApiResponse) + + return err +} + +type NullableDeepAnalysisApiResponse struct { + value *DeepAnalysisApiResponse + isSet bool +} + +func (v NullableDeepAnalysisApiResponse) Get() *DeepAnalysisApiResponse { + return v.value +} + +func (v *NullableDeepAnalysisApiResponse) Set(val *DeepAnalysisApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeepAnalysisApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeepAnalysisApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeepAnalysisApiResponse(val *DeepAnalysisApiResponse) *NullableDeepAnalysisApiResponse { + return &NullableDeepAnalysisApiResponse{value: val, isSet: true} +} + +func (v NullableDeepAnalysisApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeepAnalysisApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_deep_analysis_body.go b/go/futureagi/model_deep_analysis_body.go new file mode 100644 index 0000000..6c1b746 --- /dev/null +++ b/go/futureagi/model_deep_analysis_body.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DeepAnalysisBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeepAnalysisBody{} + +// DeepAnalysisBody struct for DeepAnalysisBody +type DeepAnalysisBody struct { + TraceId string `json:"trace_id"` + Force *bool `json:"force,omitempty"` +} + +type _DeepAnalysisBody DeepAnalysisBody + +// NewDeepAnalysisBody instantiates a new DeepAnalysisBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeepAnalysisBody(traceId string) *DeepAnalysisBody { + this := DeepAnalysisBody{} + this.TraceId = traceId + var force bool = false + this.Force = &force + return &this +} + +// NewDeepAnalysisBodyWithDefaults instantiates a new DeepAnalysisBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeepAnalysisBodyWithDefaults() *DeepAnalysisBody { + this := DeepAnalysisBody{} + var force bool = false + this.Force = &force + return &this +} + +// GetTraceId returns the TraceId field value +func (o *DeepAnalysisBody) GetTraceId() string { + if o == nil { + var ret string + return ret + } + + return o.TraceId +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisBody) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceId, true +} + +// SetTraceId sets field value +func (o *DeepAnalysisBody) SetTraceId(v string) { + o.TraceId = v +} + +// GetForce returns the Force field value if set, zero value otherwise. +func (o *DeepAnalysisBody) GetForce() bool { + if o == nil || IsNil(o.Force) { + var ret bool + return ret + } + return *o.Force +} + +// GetForceOk returns a tuple with the Force field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeepAnalysisBody) GetForceOk() (*bool, bool) { + if o == nil || IsNil(o.Force) { + return nil, false + } + return o.Force, true +} + +// HasForce returns a boolean if a field has been set. +func (o *DeepAnalysisBody) HasForce() bool { + if o != nil && !IsNil(o.Force) { + return true + } + + return false +} + +// SetForce gets a reference to the given bool and assigns it to the Force field. +func (o *DeepAnalysisBody) SetForce(v bool) { + o.Force = &v +} + +func (o DeepAnalysisBody) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeepAnalysisBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["trace_id"] = o.TraceId + if !IsNil(o.Force) { + toSerialize["force"] = o.Force + } + return toSerialize, nil +} + +func (o *DeepAnalysisBody) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "trace_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeepAnalysisBody := _DeepAnalysisBody{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeepAnalysisBody) + + if err != nil { + return err + } + + *o = DeepAnalysisBody(varDeepAnalysisBody) + + return err +} + +type NullableDeepAnalysisBody struct { + value *DeepAnalysisBody + isSet bool +} + +func (v NullableDeepAnalysisBody) Get() *DeepAnalysisBody { + return v.value +} + +func (v *NullableDeepAnalysisBody) Set(val *DeepAnalysisBody) { + v.value = val + v.isSet = true +} + +func (v NullableDeepAnalysisBody) IsSet() bool { + return v.isSet +} + +func (v *NullableDeepAnalysisBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeepAnalysisBody(val *DeepAnalysisBody) *NullableDeepAnalysisBody { + return &NullableDeepAnalysisBody{value: val, isSet: true} +} + +func (v NullableDeepAnalysisBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeepAnalysisBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_deep_analysis_dispatch_api_response.go b/go/futureagi/model_deep_analysis_dispatch_api_response.go new file mode 100644 index 0000000..2e9f60b --- /dev/null +++ b/go/futureagi/model_deep_analysis_dispatch_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DeepAnalysisDispatchApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeepAnalysisDispatchApiResponse{} + +// DeepAnalysisDispatchApiResponse struct for DeepAnalysisDispatchApiResponse +type DeepAnalysisDispatchApiResponse struct { + Status *bool `json:"status,omitempty"` + Result DeepAnalysisDispatchResponse `json:"result"` +} + +type _DeepAnalysisDispatchApiResponse DeepAnalysisDispatchApiResponse + +// NewDeepAnalysisDispatchApiResponse instantiates a new DeepAnalysisDispatchApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeepAnalysisDispatchApiResponse(result DeepAnalysisDispatchResponse) *DeepAnalysisDispatchApiResponse { + this := DeepAnalysisDispatchApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewDeepAnalysisDispatchApiResponseWithDefaults instantiates a new DeepAnalysisDispatchApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeepAnalysisDispatchApiResponseWithDefaults() *DeepAnalysisDispatchApiResponse { + this := DeepAnalysisDispatchApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *DeepAnalysisDispatchApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeepAnalysisDispatchApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *DeepAnalysisDispatchApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *DeepAnalysisDispatchApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *DeepAnalysisDispatchApiResponse) GetResult() DeepAnalysisDispatchResponse { + if o == nil { + var ret DeepAnalysisDispatchResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisDispatchApiResponse) GetResultOk() (*DeepAnalysisDispatchResponse, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DeepAnalysisDispatchApiResponse) SetResult(v DeepAnalysisDispatchResponse) { + o.Result = v +} + +func (o DeepAnalysisDispatchApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeepAnalysisDispatchApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DeepAnalysisDispatchApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeepAnalysisDispatchApiResponse := _DeepAnalysisDispatchApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeepAnalysisDispatchApiResponse) + + if err != nil { + return err + } + + *o = DeepAnalysisDispatchApiResponse(varDeepAnalysisDispatchApiResponse) + + return err +} + +type NullableDeepAnalysisDispatchApiResponse struct { + value *DeepAnalysisDispatchApiResponse + isSet bool +} + +func (v NullableDeepAnalysisDispatchApiResponse) Get() *DeepAnalysisDispatchApiResponse { + return v.value +} + +func (v *NullableDeepAnalysisDispatchApiResponse) Set(val *DeepAnalysisDispatchApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeepAnalysisDispatchApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeepAnalysisDispatchApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeepAnalysisDispatchApiResponse(val *DeepAnalysisDispatchApiResponse) *NullableDeepAnalysisDispatchApiResponse { + return &NullableDeepAnalysisDispatchApiResponse{value: val, isSet: true} +} + +func (v NullableDeepAnalysisDispatchApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeepAnalysisDispatchApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_deep_analysis_dispatch_response.go b/go/futureagi/model_deep_analysis_dispatch_response.go new file mode 100644 index 0000000..ec85aaf --- /dev/null +++ b/go/futureagi/model_deep_analysis_dispatch_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DeepAnalysisDispatchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeepAnalysisDispatchResponse{} + +// DeepAnalysisDispatchResponse struct for DeepAnalysisDispatchResponse +type DeepAnalysisDispatchResponse struct { + Status string `json:"status"` + TraceId string `json:"trace_id"` +} + +type _DeepAnalysisDispatchResponse DeepAnalysisDispatchResponse + +// NewDeepAnalysisDispatchResponse instantiates a new DeepAnalysisDispatchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeepAnalysisDispatchResponse(status string, traceId string) *DeepAnalysisDispatchResponse { + this := DeepAnalysisDispatchResponse{} + this.Status = status + this.TraceId = traceId + return &this +} + +// NewDeepAnalysisDispatchResponseWithDefaults instantiates a new DeepAnalysisDispatchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeepAnalysisDispatchResponseWithDefaults() *DeepAnalysisDispatchResponse { + this := DeepAnalysisDispatchResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DeepAnalysisDispatchResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisDispatchResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DeepAnalysisDispatchResponse) SetStatus(v string) { + o.Status = v +} + +// GetTraceId returns the TraceId field value +func (o *DeepAnalysisDispatchResponse) GetTraceId() string { + if o == nil { + var ret string + return ret + } + + return o.TraceId +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisDispatchResponse) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceId, true +} + +// SetTraceId sets field value +func (o *DeepAnalysisDispatchResponse) SetTraceId(v string) { + o.TraceId = v +} + +func (o DeepAnalysisDispatchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeepAnalysisDispatchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["trace_id"] = o.TraceId + return toSerialize, nil +} + +func (o *DeepAnalysisDispatchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "trace_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeepAnalysisDispatchResponse := _DeepAnalysisDispatchResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeepAnalysisDispatchResponse) + + if err != nil { + return err + } + + *o = DeepAnalysisDispatchResponse(varDeepAnalysisDispatchResponse) + + return err +} + +type NullableDeepAnalysisDispatchResponse struct { + value *DeepAnalysisDispatchResponse + isSet bool +} + +func (v NullableDeepAnalysisDispatchResponse) Get() *DeepAnalysisDispatchResponse { + return v.value +} + +func (v *NullableDeepAnalysisDispatchResponse) Set(val *DeepAnalysisDispatchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeepAnalysisDispatchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeepAnalysisDispatchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeepAnalysisDispatchResponse(val *DeepAnalysisDispatchResponse) *NullableDeepAnalysisDispatchResponse { + return &NullableDeepAnalysisDispatchResponse{value: val, isSet: true} +} + +func (v NullableDeepAnalysisDispatchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeepAnalysisDispatchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_deep_analysis_response.go b/go/futureagi/model_deep_analysis_response.go new file mode 100644 index 0000000..a15eeab --- /dev/null +++ b/go/futureagi/model_deep_analysis_response.go @@ -0,0 +1,271 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DeepAnalysisResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeepAnalysisResponse{} + +// DeepAnalysisResponse struct for DeepAnalysisResponse +type DeepAnalysisResponse struct { + Status string `json:"status"` + TraceId string `json:"trace_id"` + RootCauses []RootCause `json:"root_causes"` + Recommendations []Recommendation `json:"recommendations"` + ImmediateFix NullableString `json:"immediate_fix"` +} + +type _DeepAnalysisResponse DeepAnalysisResponse + +// NewDeepAnalysisResponse instantiates a new DeepAnalysisResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeepAnalysisResponse(status string, traceId string, rootCauses []RootCause, recommendations []Recommendation, immediateFix NullableString) *DeepAnalysisResponse { + this := DeepAnalysisResponse{} + this.Status = status + this.TraceId = traceId + this.RootCauses = rootCauses + this.Recommendations = recommendations + this.ImmediateFix = immediateFix + return &this +} + +// NewDeepAnalysisResponseWithDefaults instantiates a new DeepAnalysisResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeepAnalysisResponseWithDefaults() *DeepAnalysisResponse { + this := DeepAnalysisResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DeepAnalysisResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DeepAnalysisResponse) SetStatus(v string) { + o.Status = v +} + +// GetTraceId returns the TraceId field value +func (o *DeepAnalysisResponse) GetTraceId() string { + if o == nil { + var ret string + return ret + } + + return o.TraceId +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisResponse) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceId, true +} + +// SetTraceId sets field value +func (o *DeepAnalysisResponse) SetTraceId(v string) { + o.TraceId = v +} + +// GetRootCauses returns the RootCauses field value +func (o *DeepAnalysisResponse) GetRootCauses() []RootCause { + if o == nil { + var ret []RootCause + return ret + } + + return o.RootCauses +} + +// GetRootCausesOk returns a tuple with the RootCauses field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisResponse) GetRootCausesOk() ([]RootCause, bool) { + if o == nil { + return nil, false + } + return o.RootCauses, true +} + +// SetRootCauses sets field value +func (o *DeepAnalysisResponse) SetRootCauses(v []RootCause) { + o.RootCauses = v +} + +// GetRecommendations returns the Recommendations field value +func (o *DeepAnalysisResponse) GetRecommendations() []Recommendation { + if o == nil { + var ret []Recommendation + return ret + } + + return o.Recommendations +} + +// GetRecommendationsOk returns a tuple with the Recommendations field value +// and a boolean to check if the value has been set. +func (o *DeepAnalysisResponse) GetRecommendationsOk() ([]Recommendation, bool) { + if o == nil { + return nil, false + } + return o.Recommendations, true +} + +// SetRecommendations sets field value +func (o *DeepAnalysisResponse) SetRecommendations(v []Recommendation) { + o.Recommendations = v +} + +// GetImmediateFix returns the ImmediateFix field value +// If the value is explicit nil, the zero value for string will be returned +func (o *DeepAnalysisResponse) GetImmediateFix() string { + if o == nil || o.ImmediateFix.Get() == nil { + var ret string + return ret + } + + return *o.ImmediateFix.Get() +} + +// GetImmediateFixOk returns a tuple with the ImmediateFix field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DeepAnalysisResponse) GetImmediateFixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ImmediateFix.Get(), o.ImmediateFix.IsSet() +} + +// SetImmediateFix sets field value +func (o *DeepAnalysisResponse) SetImmediateFix(v string) { + o.ImmediateFix.Set(&v) +} + +func (o DeepAnalysisResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeepAnalysisResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["trace_id"] = o.TraceId + toSerialize["root_causes"] = o.RootCauses + toSerialize["recommendations"] = o.Recommendations + toSerialize["immediate_fix"] = o.ImmediateFix.Get() + return toSerialize, nil +} + +func (o *DeepAnalysisResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "trace_id", + "root_causes", + "recommendations", + "immediate_fix", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeepAnalysisResponse := _DeepAnalysisResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeepAnalysisResponse) + + if err != nil { + return err + } + + *o = DeepAnalysisResponse(varDeepAnalysisResponse) + + return err +} + +type NullableDeepAnalysisResponse struct { + value *DeepAnalysisResponse + isSet bool +} + +func (v NullableDeepAnalysisResponse) Get() *DeepAnalysisResponse { + return v.value +} + +func (v *NullableDeepAnalysisResponse) Set(val *DeepAnalysisResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeepAnalysisResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeepAnalysisResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeepAnalysisResponse(val *DeepAnalysisResponse) *NullableDeepAnalysisResponse { + return &NullableDeepAnalysisResponse{value: val, isSet: true} +} + +func (v NullableDeepAnalysisResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeepAnalysisResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_delete_eval_config_response.go b/go/futureagi/model_delete_eval_config_response.go new file mode 100644 index 0000000..f6c0efb --- /dev/null +++ b/go/futureagi/model_delete_eval_config_response.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DeleteEvalConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeleteEvalConfigResponse{} + +// DeleteEvalConfigResponse struct for DeleteEvalConfigResponse +type DeleteEvalConfigResponse struct { + Message string `json:"message"` +} + +type _DeleteEvalConfigResponse DeleteEvalConfigResponse + +// NewDeleteEvalConfigResponse instantiates a new DeleteEvalConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeleteEvalConfigResponse(message string) *DeleteEvalConfigResponse { + this := DeleteEvalConfigResponse{} + this.Message = message + return &this +} + +// NewDeleteEvalConfigResponseWithDefaults instantiates a new DeleteEvalConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeleteEvalConfigResponseWithDefaults() *DeleteEvalConfigResponse { + this := DeleteEvalConfigResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *DeleteEvalConfigResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DeleteEvalConfigResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DeleteEvalConfigResponse) SetMessage(v string) { + o.Message = v +} + +func (o DeleteEvalConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeleteEvalConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *DeleteEvalConfigResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeleteEvalConfigResponse := _DeleteEvalConfigResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeleteEvalConfigResponse) + + if err != nil { + return err + } + + *o = DeleteEvalConfigResponse(varDeleteEvalConfigResponse) + + return err +} + +type NullableDeleteEvalConfigResponse struct { + value *DeleteEvalConfigResponse + isSet bool +} + +func (v NullableDeleteEvalConfigResponse) Get() *DeleteEvalConfigResponse { + return v.value +} + +func (v *NullableDeleteEvalConfigResponse) Set(val *DeleteEvalConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteEvalConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteEvalConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteEvalConfigResponse(val *DeleteEvalConfigResponse) *NullableDeleteEvalConfigResponse { + return &NullableDeleteEvalConfigResponse{value: val, isSet: true} +} + +func (v NullableDeleteEvalConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteEvalConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_delete_eval_template.go b/go/futureagi/model_delete_eval_template.go new file mode 100644 index 0000000..0e2d048 --- /dev/null +++ b/go/futureagi/model_delete_eval_template.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DeleteEvalTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeleteEvalTemplate{} + +// DeleteEvalTemplate struct for DeleteEvalTemplate +type DeleteEvalTemplate struct { + EvalTemplateId string `json:"eval_template_id"` +} + +type _DeleteEvalTemplate DeleteEvalTemplate + +// NewDeleteEvalTemplate instantiates a new DeleteEvalTemplate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeleteEvalTemplate(evalTemplateId string) *DeleteEvalTemplate { + this := DeleteEvalTemplate{} + this.EvalTemplateId = evalTemplateId + return &this +} + +// NewDeleteEvalTemplateWithDefaults instantiates a new DeleteEvalTemplate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeleteEvalTemplateWithDefaults() *DeleteEvalTemplate { + this := DeleteEvalTemplate{} + return &this +} + +// GetEvalTemplateId returns the EvalTemplateId field value +func (o *DeleteEvalTemplate) GetEvalTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.EvalTemplateId +} + +// GetEvalTemplateIdOk returns a tuple with the EvalTemplateId field value +// and a boolean to check if the value has been set. +func (o *DeleteEvalTemplate) GetEvalTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalTemplateId, true +} + +// SetEvalTemplateId sets field value +func (o *DeleteEvalTemplate) SetEvalTemplateId(v string) { + o.EvalTemplateId = v +} + +func (o DeleteEvalTemplate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeleteEvalTemplate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval_template_id"] = o.EvalTemplateId + return toSerialize, nil +} + +func (o *DeleteEvalTemplate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_template_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeleteEvalTemplate := _DeleteEvalTemplate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeleteEvalTemplate) + + if err != nil { + return err + } + + *o = DeleteEvalTemplate(varDeleteEvalTemplate) + + return err +} + +type NullableDeleteEvalTemplate struct { + value *DeleteEvalTemplate + isSet bool +} + +func (v NullableDeleteEvalTemplate) Get() *DeleteEvalTemplate { + return v.value +} + +func (v *NullableDeleteEvalTemplate) Set(val *DeleteEvalTemplate) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteEvalTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteEvalTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteEvalTemplate(val *DeleteEvalTemplate) *NullableDeleteEvalTemplate { + return &NullableDeleteEvalTemplate{value: val, isSet: true} +} + +func (v NullableDeleteEvalTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteEvalTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_derived_variable_detail.go b/go/futureagi/model_derived_variable_detail.go new file mode 100644 index 0000000..71c4b5b --- /dev/null +++ b/go/futureagi/model_derived_variable_detail.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DerivedVariableDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DerivedVariableDetail{} + +// DerivedVariableDetail struct for DerivedVariableDetail +type DerivedVariableDetail struct { + Paths []string `json:"paths,omitempty"` + Schema map[string]interface{} `json:"schema,omitempty"` + FullVariables []string `json:"full_variables,omitempty"` + RawSample map[string]interface{} `json:"raw_sample,omitempty"` + IsJson *bool `json:"is_json,omitempty"` +} + +// NewDerivedVariableDetail instantiates a new DerivedVariableDetail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDerivedVariableDetail() *DerivedVariableDetail { + this := DerivedVariableDetail{} + return &this +} + +// NewDerivedVariableDetailWithDefaults instantiates a new DerivedVariableDetail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDerivedVariableDetailWithDefaults() *DerivedVariableDetail { + this := DerivedVariableDetail{} + return &this +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *DerivedVariableDetail) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableDetail) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *DerivedVariableDetail) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *DerivedVariableDetail) SetPaths(v []string) { + o.Paths = v +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *DerivedVariableDetail) GetSchema() map[string]interface{} { + if o == nil || IsNil(o.Schema) { + var ret map[string]interface{} + return ret + } + return o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableDetail) GetSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Schema) { + return map[string]interface{}{}, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *DerivedVariableDetail) HasSchema() bool { + if o != nil && !IsNil(o.Schema) { + return true + } + + return false +} + +// SetSchema gets a reference to the given map[string]interface{} and assigns it to the Schema field. +func (o *DerivedVariableDetail) SetSchema(v map[string]interface{}) { + o.Schema = v +} + +// GetFullVariables returns the FullVariables field value if set, zero value otherwise. +func (o *DerivedVariableDetail) GetFullVariables() []string { + if o == nil || IsNil(o.FullVariables) { + var ret []string + return ret + } + return o.FullVariables +} + +// GetFullVariablesOk returns a tuple with the FullVariables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableDetail) GetFullVariablesOk() ([]string, bool) { + if o == nil || IsNil(o.FullVariables) { + return nil, false + } + return o.FullVariables, true +} + +// HasFullVariables returns a boolean if a field has been set. +func (o *DerivedVariableDetail) HasFullVariables() bool { + if o != nil && !IsNil(o.FullVariables) { + return true + } + + return false +} + +// SetFullVariables gets a reference to the given []string and assigns it to the FullVariables field. +func (o *DerivedVariableDetail) SetFullVariables(v []string) { + o.FullVariables = v +} + +// GetRawSample returns the RawSample field value if set, zero value otherwise. +func (o *DerivedVariableDetail) GetRawSample() map[string]interface{} { + if o == nil || IsNil(o.RawSample) { + var ret map[string]interface{} + return ret + } + return o.RawSample +} + +// GetRawSampleOk returns a tuple with the RawSample field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableDetail) GetRawSampleOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RawSample) { + return map[string]interface{}{}, false + } + return o.RawSample, true +} + +// HasRawSample returns a boolean if a field has been set. +func (o *DerivedVariableDetail) HasRawSample() bool { + if o != nil && !IsNil(o.RawSample) { + return true + } + + return false +} + +// SetRawSample gets a reference to the given map[string]interface{} and assigns it to the RawSample field. +func (o *DerivedVariableDetail) SetRawSample(v map[string]interface{}) { + o.RawSample = v +} + +// GetIsJson returns the IsJson field value if set, zero value otherwise. +func (o *DerivedVariableDetail) GetIsJson() bool { + if o == nil || IsNil(o.IsJson) { + var ret bool + return ret + } + return *o.IsJson +} + +// GetIsJsonOk returns a tuple with the IsJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableDetail) GetIsJsonOk() (*bool, bool) { + if o == nil || IsNil(o.IsJson) { + return nil, false + } + return o.IsJson, true +} + +// HasIsJson returns a boolean if a field has been set. +func (o *DerivedVariableDetail) HasIsJson() bool { + if o != nil && !IsNil(o.IsJson) { + return true + } + + return false +} + +// SetIsJson gets a reference to the given bool and assigns it to the IsJson field. +func (o *DerivedVariableDetail) SetIsJson(v bool) { + o.IsJson = &v +} + +func (o DerivedVariableDetail) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DerivedVariableDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + if !IsNil(o.Schema) { + toSerialize["schema"] = o.Schema + } + if !IsNil(o.FullVariables) { + toSerialize["full_variables"] = o.FullVariables + } + if !IsNil(o.RawSample) { + toSerialize["raw_sample"] = o.RawSample + } + if !IsNil(o.IsJson) { + toSerialize["is_json"] = o.IsJson + } + return toSerialize, nil +} + +type NullableDerivedVariableDetail struct { + value *DerivedVariableDetail + isSet bool +} + +func (v NullableDerivedVariableDetail) Get() *DerivedVariableDetail { + return v.value +} + +func (v *NullableDerivedVariableDetail) Set(val *DerivedVariableDetail) { + v.value = val + v.isSet = true +} + +func (v NullableDerivedVariableDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableDerivedVariableDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDerivedVariableDetail(val *DerivedVariableDetail) *NullableDerivedVariableDetail { + return &NullableDerivedVariableDetail{value: val, isSet: true} +} + +func (v NullableDerivedVariableDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDerivedVariableDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_derived_variable_detail_response.go b/go/futureagi/model_derived_variable_detail_response.go new file mode 100644 index 0000000..c8b3635 --- /dev/null +++ b/go/futureagi/model_derived_variable_detail_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DerivedVariableDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DerivedVariableDetailResponse{} + +// DerivedVariableDetailResponse struct for DerivedVariableDetailResponse +type DerivedVariableDetailResponse struct { + Status bool `json:"status"` + Result DerivedVariableDetail `json:"result"` +} + +type _DerivedVariableDetailResponse DerivedVariableDetailResponse + +// NewDerivedVariableDetailResponse instantiates a new DerivedVariableDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDerivedVariableDetailResponse(status bool, result DerivedVariableDetail) *DerivedVariableDetailResponse { + this := DerivedVariableDetailResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDerivedVariableDetailResponseWithDefaults instantiates a new DerivedVariableDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDerivedVariableDetailResponseWithDefaults() *DerivedVariableDetailResponse { + this := DerivedVariableDetailResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DerivedVariableDetailResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DerivedVariableDetailResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DerivedVariableDetailResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DerivedVariableDetailResponse) GetResult() DerivedVariableDetail { + if o == nil { + var ret DerivedVariableDetail + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DerivedVariableDetailResponse) GetResultOk() (*DerivedVariableDetail, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DerivedVariableDetailResponse) SetResult(v DerivedVariableDetail) { + o.Result = v +} + +func (o DerivedVariableDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DerivedVariableDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DerivedVariableDetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDerivedVariableDetailResponse := _DerivedVariableDetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDerivedVariableDetailResponse) + + if err != nil { + return err + } + + *o = DerivedVariableDetailResponse(varDerivedVariableDetailResponse) + + return err +} + +type NullableDerivedVariableDetailResponse struct { + value *DerivedVariableDetailResponse + isSet bool +} + +func (v NullableDerivedVariableDetailResponse) Get() *DerivedVariableDetailResponse { + return v.value +} + +func (v *NullableDerivedVariableDetailResponse) Set(val *DerivedVariableDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDerivedVariableDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDerivedVariableDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDerivedVariableDetailResponse(val *DerivedVariableDetailResponse) *NullableDerivedVariableDetailResponse { + return &NullableDerivedVariableDetailResponse{value: val, isSet: true} +} + +func (v NullableDerivedVariableDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDerivedVariableDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_derived_variable_extract_request.go b/go/futureagi/model_derived_variable_extract_request.go new file mode 100644 index 0000000..411b207 --- /dev/null +++ b/go/futureagi/model_derived_variable_extract_request.go @@ -0,0 +1,273 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DerivedVariableExtractRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DerivedVariableExtractRequest{} + +// DerivedVariableExtractRequest struct for DerivedVariableExtractRequest +type DerivedVariableExtractRequest struct { + Version string `json:"version"` + ColumnName *string `json:"column_name,omitempty"` + OutputIndex *int32 `json:"output_index,omitempty"` + ResponseFormatType *string `json:"response_format_type,omitempty"` +} + +type _DerivedVariableExtractRequest DerivedVariableExtractRequest + +// NewDerivedVariableExtractRequest instantiates a new DerivedVariableExtractRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDerivedVariableExtractRequest(version string) *DerivedVariableExtractRequest { + this := DerivedVariableExtractRequest{} + this.Version = version + var columnName string = "output" + this.ColumnName = &columnName + var outputIndex int32 = 0 + this.OutputIndex = &outputIndex + return &this +} + +// NewDerivedVariableExtractRequestWithDefaults instantiates a new DerivedVariableExtractRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDerivedVariableExtractRequestWithDefaults() *DerivedVariableExtractRequest { + this := DerivedVariableExtractRequest{} + var columnName string = "output" + this.ColumnName = &columnName + var outputIndex int32 = 0 + this.OutputIndex = &outputIndex + return &this +} + +// GetVersion returns the Version field value +func (o *DerivedVariableExtractRequest) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *DerivedVariableExtractRequest) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *DerivedVariableExtractRequest) SetVersion(v string) { + o.Version = v +} + +// GetColumnName returns the ColumnName field value if set, zero value otherwise. +func (o *DerivedVariableExtractRequest) GetColumnName() string { + if o == nil || IsNil(o.ColumnName) { + var ret string + return ret + } + return *o.ColumnName +} + +// GetColumnNameOk returns a tuple with the ColumnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableExtractRequest) GetColumnNameOk() (*string, bool) { + if o == nil || IsNil(o.ColumnName) { + return nil, false + } + return o.ColumnName, true +} + +// HasColumnName returns a boolean if a field has been set. +func (o *DerivedVariableExtractRequest) HasColumnName() bool { + if o != nil && !IsNil(o.ColumnName) { + return true + } + + return false +} + +// SetColumnName gets a reference to the given string and assigns it to the ColumnName field. +func (o *DerivedVariableExtractRequest) SetColumnName(v string) { + o.ColumnName = &v +} + +// GetOutputIndex returns the OutputIndex field value if set, zero value otherwise. +func (o *DerivedVariableExtractRequest) GetOutputIndex() int32 { + if o == nil || IsNil(o.OutputIndex) { + var ret int32 + return ret + } + return *o.OutputIndex +} + +// GetOutputIndexOk returns a tuple with the OutputIndex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableExtractRequest) GetOutputIndexOk() (*int32, bool) { + if o == nil || IsNil(o.OutputIndex) { + return nil, false + } + return o.OutputIndex, true +} + +// HasOutputIndex returns a boolean if a field has been set. +func (o *DerivedVariableExtractRequest) HasOutputIndex() bool { + if o != nil && !IsNil(o.OutputIndex) { + return true + } + + return false +} + +// SetOutputIndex gets a reference to the given int32 and assigns it to the OutputIndex field. +func (o *DerivedVariableExtractRequest) SetOutputIndex(v int32) { + o.OutputIndex = &v +} + +// GetResponseFormatType returns the ResponseFormatType field value if set, zero value otherwise. +func (o *DerivedVariableExtractRequest) GetResponseFormatType() string { + if o == nil || IsNil(o.ResponseFormatType) { + var ret string + return ret + } + return *o.ResponseFormatType +} + +// GetResponseFormatTypeOk returns a tuple with the ResponseFormatType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariableExtractRequest) GetResponseFormatTypeOk() (*string, bool) { + if o == nil || IsNil(o.ResponseFormatType) { + return nil, false + } + return o.ResponseFormatType, true +} + +// HasResponseFormatType returns a boolean if a field has been set. +func (o *DerivedVariableExtractRequest) HasResponseFormatType() bool { + if o != nil && !IsNil(o.ResponseFormatType) { + return true + } + + return false +} + +// SetResponseFormatType gets a reference to the given string and assigns it to the ResponseFormatType field. +func (o *DerivedVariableExtractRequest) SetResponseFormatType(v string) { + o.ResponseFormatType = &v +} + +func (o DerivedVariableExtractRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DerivedVariableExtractRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["version"] = o.Version + if !IsNil(o.ColumnName) { + toSerialize["column_name"] = o.ColumnName + } + if !IsNil(o.OutputIndex) { + toSerialize["output_index"] = o.OutputIndex + } + if !IsNil(o.ResponseFormatType) { + toSerialize["response_format_type"] = o.ResponseFormatType + } + return toSerialize, nil +} + +func (o *DerivedVariableExtractRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDerivedVariableExtractRequest := _DerivedVariableExtractRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDerivedVariableExtractRequest) + + if err != nil { + return err + } + + *o = DerivedVariableExtractRequest(varDerivedVariableExtractRequest) + + return err +} + +type NullableDerivedVariableExtractRequest struct { + value *DerivedVariableExtractRequest + isSet bool +} + +func (v NullableDerivedVariableExtractRequest) Get() *DerivedVariableExtractRequest { + return v.value +} + +func (v *NullableDerivedVariableExtractRequest) Set(val *DerivedVariableExtractRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDerivedVariableExtractRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDerivedVariableExtractRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDerivedVariableExtractRequest(val *DerivedVariableExtractRequest) *NullableDerivedVariableExtractRequest { + return &NullableDerivedVariableExtractRequest{value: val, isSet: true} +} + +func (v NullableDerivedVariableExtractRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDerivedVariableExtractRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_derived_variable_preview_request.go b/go/futureagi/model_derived_variable_preview_request.go new file mode 100644 index 0000000..99b74ac --- /dev/null +++ b/go/futureagi/model_derived_variable_preview_request.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DerivedVariablePreviewRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DerivedVariablePreviewRequest{} + +// DerivedVariablePreviewRequest struct for DerivedVariablePreviewRequest +type DerivedVariablePreviewRequest struct { + Content map[string]interface{} `json:"content"` + ColumnName *string `json:"column_name,omitempty"` +} + +type _DerivedVariablePreviewRequest DerivedVariablePreviewRequest + +// NewDerivedVariablePreviewRequest instantiates a new DerivedVariablePreviewRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDerivedVariablePreviewRequest(content map[string]interface{}) *DerivedVariablePreviewRequest { + this := DerivedVariablePreviewRequest{} + this.Content = content + var columnName string = "output" + this.ColumnName = &columnName + return &this +} + +// NewDerivedVariablePreviewRequestWithDefaults instantiates a new DerivedVariablePreviewRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDerivedVariablePreviewRequestWithDefaults() *DerivedVariablePreviewRequest { + this := DerivedVariablePreviewRequest{} + var columnName string = "output" + this.ColumnName = &columnName + return &this +} + +// GetContent returns the Content field value +func (o *DerivedVariablePreviewRequest) GetContent() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *DerivedVariablePreviewRequest) GetContentOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Content, true +} + +// SetContent sets field value +func (o *DerivedVariablePreviewRequest) SetContent(v map[string]interface{}) { + o.Content = v +} + +// GetColumnName returns the ColumnName field value if set, zero value otherwise. +func (o *DerivedVariablePreviewRequest) GetColumnName() string { + if o == nil || IsNil(o.ColumnName) { + var ret string + return ret + } + return *o.ColumnName +} + +// GetColumnNameOk returns a tuple with the ColumnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DerivedVariablePreviewRequest) GetColumnNameOk() (*string, bool) { + if o == nil || IsNil(o.ColumnName) { + return nil, false + } + return o.ColumnName, true +} + +// HasColumnName returns a boolean if a field has been set. +func (o *DerivedVariablePreviewRequest) HasColumnName() bool { + if o != nil && !IsNil(o.ColumnName) { + return true + } + + return false +} + +// SetColumnName gets a reference to the given string and assigns it to the ColumnName field. +func (o *DerivedVariablePreviewRequest) SetColumnName(v string) { + o.ColumnName = &v +} + +func (o DerivedVariablePreviewRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DerivedVariablePreviewRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content"] = o.Content + if !IsNil(o.ColumnName) { + toSerialize["column_name"] = o.ColumnName + } + return toSerialize, nil +} + +func (o *DerivedVariablePreviewRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "content", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDerivedVariablePreviewRequest := _DerivedVariablePreviewRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDerivedVariablePreviewRequest) + + if err != nil { + return err + } + + *o = DerivedVariablePreviewRequest(varDerivedVariablePreviewRequest) + + return err +} + +type NullableDerivedVariablePreviewRequest struct { + value *DerivedVariablePreviewRequest + isSet bool +} + +func (v NullableDerivedVariablePreviewRequest) Get() *DerivedVariablePreviewRequest { + return v.value +} + +func (v *NullableDerivedVariablePreviewRequest) Set(val *DerivedVariablePreviewRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDerivedVariablePreviewRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDerivedVariablePreviewRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDerivedVariablePreviewRequest(val *DerivedVariablePreviewRequest) *NullableDerivedVariablePreviewRequest { + return &NullableDerivedVariablePreviewRequest{value: val, isSet: true} +} + +func (v NullableDerivedVariablePreviewRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDerivedVariablePreviewRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_develop_dataset_message_response.go b/go/futureagi/model_develop_dataset_message_response.go new file mode 100644 index 0000000..c5b56d1 --- /dev/null +++ b/go/futureagi/model_develop_dataset_message_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DevelopDatasetMessageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DevelopDatasetMessageResponse{} + +// DevelopDatasetMessageResponse struct for DevelopDatasetMessageResponse +type DevelopDatasetMessageResponse struct { + Status bool `json:"status"` + Result string `json:"result"` +} + +type _DevelopDatasetMessageResponse DevelopDatasetMessageResponse + +// NewDevelopDatasetMessageResponse instantiates a new DevelopDatasetMessageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDevelopDatasetMessageResponse(status bool, result string) *DevelopDatasetMessageResponse { + this := DevelopDatasetMessageResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDevelopDatasetMessageResponseWithDefaults instantiates a new DevelopDatasetMessageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDevelopDatasetMessageResponseWithDefaults() *DevelopDatasetMessageResponse { + this := DevelopDatasetMessageResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DevelopDatasetMessageResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DevelopDatasetMessageResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DevelopDatasetMessageResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DevelopDatasetMessageResponse) GetResult() string { + if o == nil { + var ret string + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DevelopDatasetMessageResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DevelopDatasetMessageResponse) SetResult(v string) { + o.Result = v +} + +func (o DevelopDatasetMessageResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DevelopDatasetMessageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DevelopDatasetMessageResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDevelopDatasetMessageResponse := _DevelopDatasetMessageResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDevelopDatasetMessageResponse) + + if err != nil { + return err + } + + *o = DevelopDatasetMessageResponse(varDevelopDatasetMessageResponse) + + return err +} + +type NullableDevelopDatasetMessageResponse struct { + value *DevelopDatasetMessageResponse + isSet bool +} + +func (v NullableDevelopDatasetMessageResponse) Get() *DevelopDatasetMessageResponse { + return v.value +} + +func (v *NullableDevelopDatasetMessageResponse) Set(val *DevelopDatasetMessageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDevelopDatasetMessageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDevelopDatasetMessageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDevelopDatasetMessageResponse(val *DevelopDatasetMessageResponse) *NullableDevelopDatasetMessageResponse { + return &NullableDevelopDatasetMessageResponse{value: val, isSet: true} +} + +func (v NullableDevelopDatasetMessageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDevelopDatasetMessageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_discussion_comment_request.go b/go/futureagi/model_discussion_comment_request.go new file mode 100644 index 0000000..de4a1d8 --- /dev/null +++ b/go/futureagi/model_discussion_comment_request.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DiscussionCommentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DiscussionCommentRequest{} + +// DiscussionCommentRequest struct for DiscussionCommentRequest +type DiscussionCommentRequest struct { + Comment *string `json:"comment,omitempty"` + LabelId *string `json:"label_id,omitempty"` + TargetAnnotatorId *string `json:"target_annotator_id,omitempty"` + ThreadId *string `json:"thread_id,omitempty"` + MentionedUserIds []string `json:"mentioned_user_ids,omitempty"` +} + +// NewDiscussionCommentRequest instantiates a new DiscussionCommentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDiscussionCommentRequest() *DiscussionCommentRequest { + this := DiscussionCommentRequest{} + return &this +} + +// NewDiscussionCommentRequestWithDefaults instantiates a new DiscussionCommentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDiscussionCommentRequestWithDefaults() *DiscussionCommentRequest { + this := DiscussionCommentRequest{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *DiscussionCommentRequest) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscussionCommentRequest) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *DiscussionCommentRequest) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *DiscussionCommentRequest) SetComment(v string) { + o.Comment = &v +} + +// GetLabelId returns the LabelId field value if set, zero value otherwise. +func (o *DiscussionCommentRequest) GetLabelId() string { + if o == nil || IsNil(o.LabelId) { + var ret string + return ret + } + return *o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscussionCommentRequest) GetLabelIdOk() (*string, bool) { + if o == nil || IsNil(o.LabelId) { + return nil, false + } + return o.LabelId, true +} + +// HasLabelId returns a boolean if a field has been set. +func (o *DiscussionCommentRequest) HasLabelId() bool { + if o != nil && !IsNil(o.LabelId) { + return true + } + + return false +} + +// SetLabelId gets a reference to the given string and assigns it to the LabelId field. +func (o *DiscussionCommentRequest) SetLabelId(v string) { + o.LabelId = &v +} + +// GetTargetAnnotatorId returns the TargetAnnotatorId field value if set, zero value otherwise. +func (o *DiscussionCommentRequest) GetTargetAnnotatorId() string { + if o == nil || IsNil(o.TargetAnnotatorId) { + var ret string + return ret + } + return *o.TargetAnnotatorId +} + +// GetTargetAnnotatorIdOk returns a tuple with the TargetAnnotatorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscussionCommentRequest) GetTargetAnnotatorIdOk() (*string, bool) { + if o == nil || IsNil(o.TargetAnnotatorId) { + return nil, false + } + return o.TargetAnnotatorId, true +} + +// HasTargetAnnotatorId returns a boolean if a field has been set. +func (o *DiscussionCommentRequest) HasTargetAnnotatorId() bool { + if o != nil && !IsNil(o.TargetAnnotatorId) { + return true + } + + return false +} + +// SetTargetAnnotatorId gets a reference to the given string and assigns it to the TargetAnnotatorId field. +func (o *DiscussionCommentRequest) SetTargetAnnotatorId(v string) { + o.TargetAnnotatorId = &v +} + +// GetThreadId returns the ThreadId field value if set, zero value otherwise. +func (o *DiscussionCommentRequest) GetThreadId() string { + if o == nil || IsNil(o.ThreadId) { + var ret string + return ret + } + return *o.ThreadId +} + +// GetThreadIdOk returns a tuple with the ThreadId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscussionCommentRequest) GetThreadIdOk() (*string, bool) { + if o == nil || IsNil(o.ThreadId) { + return nil, false + } + return o.ThreadId, true +} + +// HasThreadId returns a boolean if a field has been set. +func (o *DiscussionCommentRequest) HasThreadId() bool { + if o != nil && !IsNil(o.ThreadId) { + return true + } + + return false +} + +// SetThreadId gets a reference to the given string and assigns it to the ThreadId field. +func (o *DiscussionCommentRequest) SetThreadId(v string) { + o.ThreadId = &v +} + +// GetMentionedUserIds returns the MentionedUserIds field value if set, zero value otherwise. +func (o *DiscussionCommentRequest) GetMentionedUserIds() []string { + if o == nil || IsNil(o.MentionedUserIds) { + var ret []string + return ret + } + return o.MentionedUserIds +} + +// GetMentionedUserIdsOk returns a tuple with the MentionedUserIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscussionCommentRequest) GetMentionedUserIdsOk() ([]string, bool) { + if o == nil || IsNil(o.MentionedUserIds) { + return nil, false + } + return o.MentionedUserIds, true +} + +// HasMentionedUserIds returns a boolean if a field has been set. +func (o *DiscussionCommentRequest) HasMentionedUserIds() bool { + if o != nil && !IsNil(o.MentionedUserIds) { + return true + } + + return false +} + +// SetMentionedUserIds gets a reference to the given []string and assigns it to the MentionedUserIds field. +func (o *DiscussionCommentRequest) SetMentionedUserIds(v []string) { + o.MentionedUserIds = v +} + +func (o DiscussionCommentRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DiscussionCommentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.LabelId) { + toSerialize["label_id"] = o.LabelId + } + if !IsNil(o.TargetAnnotatorId) { + toSerialize["target_annotator_id"] = o.TargetAnnotatorId + } + if !IsNil(o.ThreadId) { + toSerialize["thread_id"] = o.ThreadId + } + if !IsNil(o.MentionedUserIds) { + toSerialize["mentioned_user_ids"] = o.MentionedUserIds + } + return toSerialize, nil +} + +type NullableDiscussionCommentRequest struct { + value *DiscussionCommentRequest + isSet bool +} + +func (v NullableDiscussionCommentRequest) Get() *DiscussionCommentRequest { + return v.value +} + +func (v *NullableDiscussionCommentRequest) Set(val *DiscussionCommentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDiscussionCommentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDiscussionCommentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDiscussionCommentRequest(val *DiscussionCommentRequest) *NullableDiscussionCommentRequest { + return &NullableDiscussionCommentRequest{value: val, isSet: true} +} + +func (v NullableDiscussionCommentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDiscussionCommentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_discussion_reaction_request.go b/go/futureagi/model_discussion_reaction_request.go new file mode 100644 index 0000000..a93e817 --- /dev/null +++ b/go/futureagi/model_discussion_reaction_request.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DiscussionReactionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DiscussionReactionRequest{} + +// DiscussionReactionRequest struct for DiscussionReactionRequest +type DiscussionReactionRequest struct { + Emoji *string `json:"emoji,omitempty"` +} + +// NewDiscussionReactionRequest instantiates a new DiscussionReactionRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDiscussionReactionRequest() *DiscussionReactionRequest { + this := DiscussionReactionRequest{} + return &this +} + +// NewDiscussionReactionRequestWithDefaults instantiates a new DiscussionReactionRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDiscussionReactionRequestWithDefaults() *DiscussionReactionRequest { + this := DiscussionReactionRequest{} + return &this +} + +// GetEmoji returns the Emoji field value if set, zero value otherwise. +func (o *DiscussionReactionRequest) GetEmoji() string { + if o == nil || IsNil(o.Emoji) { + var ret string + return ret + } + return *o.Emoji +} + +// GetEmojiOk returns a tuple with the Emoji field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscussionReactionRequest) GetEmojiOk() (*string, bool) { + if o == nil || IsNil(o.Emoji) { + return nil, false + } + return o.Emoji, true +} + +// HasEmoji returns a boolean if a field has been set. +func (o *DiscussionReactionRequest) HasEmoji() bool { + if o != nil && !IsNil(o.Emoji) { + return true + } + + return false +} + +// SetEmoji gets a reference to the given string and assigns it to the Emoji field. +func (o *DiscussionReactionRequest) SetEmoji(v string) { + o.Emoji = &v +} + +func (o DiscussionReactionRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DiscussionReactionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Emoji) { + toSerialize["emoji"] = o.Emoji + } + return toSerialize, nil +} + +type NullableDiscussionReactionRequest struct { + value *DiscussionReactionRequest + isSet bool +} + +func (v NullableDiscussionReactionRequest) Get() *DiscussionReactionRequest { + return v.value +} + +func (v *NullableDiscussionReactionRequest) Set(val *DiscussionReactionRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDiscussionReactionRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDiscussionReactionRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDiscussionReactionRequest(val *DiscussionReactionRequest) *NullableDiscussionReactionRequest { + return &NullableDiscussionReactionRequest{value: val, isSet: true} +} + +func (v NullableDiscussionReactionRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDiscussionReactionRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_discussion_thread_status_request.go b/go/futureagi/model_discussion_thread_status_request.go new file mode 100644 index 0000000..1369a38 --- /dev/null +++ b/go/futureagi/model_discussion_thread_status_request.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DiscussionThreadStatusRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DiscussionThreadStatusRequest{} + +// DiscussionThreadStatusRequest struct for DiscussionThreadStatusRequest +type DiscussionThreadStatusRequest struct { + Comment *string `json:"comment,omitempty"` +} + +// NewDiscussionThreadStatusRequest instantiates a new DiscussionThreadStatusRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDiscussionThreadStatusRequest() *DiscussionThreadStatusRequest { + this := DiscussionThreadStatusRequest{} + return &this +} + +// NewDiscussionThreadStatusRequestWithDefaults instantiates a new DiscussionThreadStatusRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDiscussionThreadStatusRequestWithDefaults() *DiscussionThreadStatusRequest { + this := DiscussionThreadStatusRequest{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *DiscussionThreadStatusRequest) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DiscussionThreadStatusRequest) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *DiscussionThreadStatusRequest) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *DiscussionThreadStatusRequest) SetComment(v string) { + o.Comment = &v +} + +func (o DiscussionThreadStatusRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DiscussionThreadStatusRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + return toSerialize, nil +} + +type NullableDiscussionThreadStatusRequest struct { + value *DiscussionThreadStatusRequest + isSet bool +} + +func (v NullableDiscussionThreadStatusRequest) Get() *DiscussionThreadStatusRequest { + return v.value +} + +func (v *NullableDiscussionThreadStatusRequest) Set(val *DiscussionThreadStatusRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDiscussionThreadStatusRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDiscussionThreadStatusRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDiscussionThreadStatusRequest(val *DiscussionThreadStatusRequest) *NullableDiscussionThreadStatusRequest { + return &NullableDiscussionThreadStatusRequest{value: val, isSet: true} +} + +func (v NullableDiscussionThreadStatusRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDiscussionThreadStatusRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_duplicate_dataset_request.go b/go/futureagi/model_duplicate_dataset_request.go new file mode 100644 index 0000000..e407051 --- /dev/null +++ b/go/futureagi/model_duplicate_dataset_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DuplicateDatasetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicateDatasetRequest{} + +// DuplicateDatasetRequest struct for DuplicateDatasetRequest +type DuplicateDatasetRequest struct { + RowIds []string `json:"row_ids,omitempty"` + SelectedAllRows *bool `json:"selected_all_rows,omitempty"` + Name string `json:"name"` +} + +type _DuplicateDatasetRequest DuplicateDatasetRequest + +// NewDuplicateDatasetRequest instantiates a new DuplicateDatasetRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDuplicateDatasetRequest(name string) *DuplicateDatasetRequest { + this := DuplicateDatasetRequest{} + var selectedAllRows bool = false + this.SelectedAllRows = &selectedAllRows + this.Name = name + return &this +} + +// NewDuplicateDatasetRequestWithDefaults instantiates a new DuplicateDatasetRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDuplicateDatasetRequestWithDefaults() *DuplicateDatasetRequest { + this := DuplicateDatasetRequest{} + var selectedAllRows bool = false + this.SelectedAllRows = &selectedAllRows + return &this +} + +// GetRowIds returns the RowIds field value if set, zero value otherwise. +func (o *DuplicateDatasetRequest) GetRowIds() []string { + if o == nil || IsNil(o.RowIds) { + var ret []string + return ret + } + return o.RowIds +} + +// GetRowIdsOk returns a tuple with the RowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetRequest) GetRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.RowIds) { + return nil, false + } + return o.RowIds, true +} + +// HasRowIds returns a boolean if a field has been set. +func (o *DuplicateDatasetRequest) HasRowIds() bool { + if o != nil && !IsNil(o.RowIds) { + return true + } + + return false +} + +// SetRowIds gets a reference to the given []string and assigns it to the RowIds field. +func (o *DuplicateDatasetRequest) SetRowIds(v []string) { + o.RowIds = v +} + +// GetSelectedAllRows returns the SelectedAllRows field value if set, zero value otherwise. +func (o *DuplicateDatasetRequest) GetSelectedAllRows() bool { + if o == nil || IsNil(o.SelectedAllRows) { + var ret bool + return ret + } + return *o.SelectedAllRows +} + +// GetSelectedAllRowsOk returns a tuple with the SelectedAllRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetRequest) GetSelectedAllRowsOk() (*bool, bool) { + if o == nil || IsNil(o.SelectedAllRows) { + return nil, false + } + return o.SelectedAllRows, true +} + +// HasSelectedAllRows returns a boolean if a field has been set. +func (o *DuplicateDatasetRequest) HasSelectedAllRows() bool { + if o != nil && !IsNil(o.SelectedAllRows) { + return true + } + + return false +} + +// SetSelectedAllRows gets a reference to the given bool and assigns it to the SelectedAllRows field. +func (o *DuplicateDatasetRequest) SetSelectedAllRows(v bool) { + o.SelectedAllRows = &v +} + +// GetName returns the Name field value +func (o *DuplicateDatasetRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DuplicateDatasetRequest) SetName(v string) { + o.Name = v +} + +func (o DuplicateDatasetRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicateDatasetRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RowIds) { + toSerialize["row_ids"] = o.RowIds + } + if !IsNil(o.SelectedAllRows) { + toSerialize["selected_all_rows"] = o.SelectedAllRows + } + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *DuplicateDatasetRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDuplicateDatasetRequest := _DuplicateDatasetRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDuplicateDatasetRequest) + + if err != nil { + return err + } + + *o = DuplicateDatasetRequest(varDuplicateDatasetRequest) + + return err +} + +type NullableDuplicateDatasetRequest struct { + value *DuplicateDatasetRequest + isSet bool +} + +func (v NullableDuplicateDatasetRequest) Get() *DuplicateDatasetRequest { + return v.value +} + +func (v *NullableDuplicateDatasetRequest) Set(val *DuplicateDatasetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDuplicateDatasetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDuplicateDatasetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDuplicateDatasetRequest(val *DuplicateDatasetRequest) *NullableDuplicateDatasetRequest { + return &NullableDuplicateDatasetRequest{value: val, isSet: true} +} + +func (v NullableDuplicateDatasetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDuplicateDatasetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_duplicate_dataset_response.go b/go/futureagi/model_duplicate_dataset_response.go new file mode 100644 index 0000000..5815fe4 --- /dev/null +++ b/go/futureagi/model_duplicate_dataset_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DuplicateDatasetResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicateDatasetResponse{} + +// DuplicateDatasetResponse struct for DuplicateDatasetResponse +type DuplicateDatasetResponse struct { + Status bool `json:"status"` + Result DuplicateDatasetResult `json:"result"` +} + +type _DuplicateDatasetResponse DuplicateDatasetResponse + +// NewDuplicateDatasetResponse instantiates a new DuplicateDatasetResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDuplicateDatasetResponse(status bool, result DuplicateDatasetResult) *DuplicateDatasetResponse { + this := DuplicateDatasetResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDuplicateDatasetResponseWithDefaults instantiates a new DuplicateDatasetResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDuplicateDatasetResponseWithDefaults() *DuplicateDatasetResponse { + this := DuplicateDatasetResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DuplicateDatasetResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DuplicateDatasetResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DuplicateDatasetResponse) GetResult() DuplicateDatasetResult { + if o == nil { + var ret DuplicateDatasetResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetResponse) GetResultOk() (*DuplicateDatasetResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DuplicateDatasetResponse) SetResult(v DuplicateDatasetResult) { + o.Result = v +} + +func (o DuplicateDatasetResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicateDatasetResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DuplicateDatasetResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDuplicateDatasetResponse := _DuplicateDatasetResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDuplicateDatasetResponse) + + if err != nil { + return err + } + + *o = DuplicateDatasetResponse(varDuplicateDatasetResponse) + + return err +} + +type NullableDuplicateDatasetResponse struct { + value *DuplicateDatasetResponse + isSet bool +} + +func (v NullableDuplicateDatasetResponse) Get() *DuplicateDatasetResponse { + return v.value +} + +func (v *NullableDuplicateDatasetResponse) Set(val *DuplicateDatasetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDuplicateDatasetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDuplicateDatasetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDuplicateDatasetResponse(val *DuplicateDatasetResponse) *NullableDuplicateDatasetResponse { + return &NullableDuplicateDatasetResponse{value: val, isSet: true} +} + +func (v NullableDuplicateDatasetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDuplicateDatasetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_duplicate_dataset_result.go b/go/futureagi/model_duplicate_dataset_result.go new file mode 100644 index 0000000..e2baa75 --- /dev/null +++ b/go/futureagi/model_duplicate_dataset_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DuplicateDatasetResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicateDatasetResult{} + +// DuplicateDatasetResult struct for DuplicateDatasetResult +type DuplicateDatasetResult struct { + Message string `json:"message"` + NewDatasetId string `json:"new_dataset_id"` + NewDatasetName string `json:"new_dataset_name"` + ColumnsCopied int32 `json:"columns_copied"` + RowsCopied int32 `json:"rows_copied"` +} + +type _DuplicateDatasetResult DuplicateDatasetResult + +// NewDuplicateDatasetResult instantiates a new DuplicateDatasetResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDuplicateDatasetResult(message string, newDatasetId string, newDatasetName string, columnsCopied int32, rowsCopied int32) *DuplicateDatasetResult { + this := DuplicateDatasetResult{} + this.Message = message + this.NewDatasetId = newDatasetId + this.NewDatasetName = newDatasetName + this.ColumnsCopied = columnsCopied + this.RowsCopied = rowsCopied + return &this +} + +// NewDuplicateDatasetResultWithDefaults instantiates a new DuplicateDatasetResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDuplicateDatasetResultWithDefaults() *DuplicateDatasetResult { + this := DuplicateDatasetResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DuplicateDatasetResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DuplicateDatasetResult) SetMessage(v string) { + o.Message = v +} + +// GetNewDatasetId returns the NewDatasetId field value +func (o *DuplicateDatasetResult) GetNewDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.NewDatasetId +} + +// GetNewDatasetIdOk returns a tuple with the NewDatasetId field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetResult) GetNewDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewDatasetId, true +} + +// SetNewDatasetId sets field value +func (o *DuplicateDatasetResult) SetNewDatasetId(v string) { + o.NewDatasetId = v +} + +// GetNewDatasetName returns the NewDatasetName field value +func (o *DuplicateDatasetResult) GetNewDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.NewDatasetName +} + +// GetNewDatasetNameOk returns a tuple with the NewDatasetName field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetResult) GetNewDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewDatasetName, true +} + +// SetNewDatasetName sets field value +func (o *DuplicateDatasetResult) SetNewDatasetName(v string) { + o.NewDatasetName = v +} + +// GetColumnsCopied returns the ColumnsCopied field value +func (o *DuplicateDatasetResult) GetColumnsCopied() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ColumnsCopied +} + +// GetColumnsCopiedOk returns a tuple with the ColumnsCopied field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetResult) GetColumnsCopiedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ColumnsCopied, true +} + +// SetColumnsCopied sets field value +func (o *DuplicateDatasetResult) SetColumnsCopied(v int32) { + o.ColumnsCopied = v +} + +// GetRowsCopied returns the RowsCopied field value +func (o *DuplicateDatasetResult) GetRowsCopied() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowsCopied +} + +// GetRowsCopiedOk returns a tuple with the RowsCopied field value +// and a boolean to check if the value has been set. +func (o *DuplicateDatasetResult) GetRowsCopiedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowsCopied, true +} + +// SetRowsCopied sets field value +func (o *DuplicateDatasetResult) SetRowsCopied(v int32) { + o.RowsCopied = v +} + +func (o DuplicateDatasetResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicateDatasetResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["new_dataset_id"] = o.NewDatasetId + toSerialize["new_dataset_name"] = o.NewDatasetName + toSerialize["columns_copied"] = o.ColumnsCopied + toSerialize["rows_copied"] = o.RowsCopied + return toSerialize, nil +} + +func (o *DuplicateDatasetResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "new_dataset_id", + "new_dataset_name", + "columns_copied", + "rows_copied", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDuplicateDatasetResult := _DuplicateDatasetResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDuplicateDatasetResult) + + if err != nil { + return err + } + + *o = DuplicateDatasetResult(varDuplicateDatasetResult) + + return err +} + +type NullableDuplicateDatasetResult struct { + value *DuplicateDatasetResult + isSet bool +} + +func (v NullableDuplicateDatasetResult) Get() *DuplicateDatasetResult { + return v.value +} + +func (v *NullableDuplicateDatasetResult) Set(val *DuplicateDatasetResult) { + v.value = val + v.isSet = true +} + +func (v NullableDuplicateDatasetResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDuplicateDatasetResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDuplicateDatasetResult(val *DuplicateDatasetResult) *NullableDuplicateDatasetResult { + return &NullableDuplicateDatasetResult{value: val, isSet: true} +} + +func (v NullableDuplicateDatasetResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDuplicateDatasetResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_duplicate_rows_request.go b/go/futureagi/model_duplicate_rows_request.go new file mode 100644 index 0000000..136bac4 --- /dev/null +++ b/go/futureagi/model_duplicate_rows_request.go @@ -0,0 +1,205 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the DuplicateRowsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicateRowsRequest{} + +// DuplicateRowsRequest struct for DuplicateRowsRequest +type DuplicateRowsRequest struct { + RowIds []string `json:"row_ids,omitempty"` + SelectedAllRows *bool `json:"selected_all_rows,omitempty"` + NumCopies *int32 `json:"num_copies,omitempty"` +} + +// NewDuplicateRowsRequest instantiates a new DuplicateRowsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDuplicateRowsRequest() *DuplicateRowsRequest { + this := DuplicateRowsRequest{} + var selectedAllRows bool = false + this.SelectedAllRows = &selectedAllRows + var numCopies int32 = 1 + this.NumCopies = &numCopies + return &this +} + +// NewDuplicateRowsRequestWithDefaults instantiates a new DuplicateRowsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDuplicateRowsRequestWithDefaults() *DuplicateRowsRequest { + this := DuplicateRowsRequest{} + var selectedAllRows bool = false + this.SelectedAllRows = &selectedAllRows + var numCopies int32 = 1 + this.NumCopies = &numCopies + return &this +} + +// GetRowIds returns the RowIds field value if set, zero value otherwise. +func (o *DuplicateRowsRequest) GetRowIds() []string { + if o == nil || IsNil(o.RowIds) { + var ret []string + return ret + } + return o.RowIds +} + +// GetRowIdsOk returns a tuple with the RowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DuplicateRowsRequest) GetRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.RowIds) { + return nil, false + } + return o.RowIds, true +} + +// HasRowIds returns a boolean if a field has been set. +func (o *DuplicateRowsRequest) HasRowIds() bool { + if o != nil && !IsNil(o.RowIds) { + return true + } + + return false +} + +// SetRowIds gets a reference to the given []string and assigns it to the RowIds field. +func (o *DuplicateRowsRequest) SetRowIds(v []string) { + o.RowIds = v +} + +// GetSelectedAllRows returns the SelectedAllRows field value if set, zero value otherwise. +func (o *DuplicateRowsRequest) GetSelectedAllRows() bool { + if o == nil || IsNil(o.SelectedAllRows) { + var ret bool + return ret + } + return *o.SelectedAllRows +} + +// GetSelectedAllRowsOk returns a tuple with the SelectedAllRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DuplicateRowsRequest) GetSelectedAllRowsOk() (*bool, bool) { + if o == nil || IsNil(o.SelectedAllRows) { + return nil, false + } + return o.SelectedAllRows, true +} + +// HasSelectedAllRows returns a boolean if a field has been set. +func (o *DuplicateRowsRequest) HasSelectedAllRows() bool { + if o != nil && !IsNil(o.SelectedAllRows) { + return true + } + + return false +} + +// SetSelectedAllRows gets a reference to the given bool and assigns it to the SelectedAllRows field. +func (o *DuplicateRowsRequest) SetSelectedAllRows(v bool) { + o.SelectedAllRows = &v +} + +// GetNumCopies returns the NumCopies field value if set, zero value otherwise. +func (o *DuplicateRowsRequest) GetNumCopies() int32 { + if o == nil || IsNil(o.NumCopies) { + var ret int32 + return ret + } + return *o.NumCopies +} + +// GetNumCopiesOk returns a tuple with the NumCopies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DuplicateRowsRequest) GetNumCopiesOk() (*int32, bool) { + if o == nil || IsNil(o.NumCopies) { + return nil, false + } + return o.NumCopies, true +} + +// HasNumCopies returns a boolean if a field has been set. +func (o *DuplicateRowsRequest) HasNumCopies() bool { + if o != nil && !IsNil(o.NumCopies) { + return true + } + + return false +} + +// SetNumCopies gets a reference to the given int32 and assigns it to the NumCopies field. +func (o *DuplicateRowsRequest) SetNumCopies(v int32) { + o.NumCopies = &v +} + +func (o DuplicateRowsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicateRowsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RowIds) { + toSerialize["row_ids"] = o.RowIds + } + if !IsNil(o.SelectedAllRows) { + toSerialize["selected_all_rows"] = o.SelectedAllRows + } + if !IsNil(o.NumCopies) { + toSerialize["num_copies"] = o.NumCopies + } + return toSerialize, nil +} + +type NullableDuplicateRowsRequest struct { + value *DuplicateRowsRequest + isSet bool +} + +func (v NullableDuplicateRowsRequest) Get() *DuplicateRowsRequest { + return v.value +} + +func (v *NullableDuplicateRowsRequest) Set(val *DuplicateRowsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDuplicateRowsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDuplicateRowsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDuplicateRowsRequest(val *DuplicateRowsRequest) *NullableDuplicateRowsRequest { + return &NullableDuplicateRowsRequest{value: val, isSet: true} +} + +func (v NullableDuplicateRowsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDuplicateRowsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_duplicate_rows_response.go b/go/futureagi/model_duplicate_rows_response.go new file mode 100644 index 0000000..9ab7298 --- /dev/null +++ b/go/futureagi/model_duplicate_rows_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DuplicateRowsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicateRowsResponse{} + +// DuplicateRowsResponse struct for DuplicateRowsResponse +type DuplicateRowsResponse struct { + Status bool `json:"status"` + Result DuplicateRowsResult `json:"result"` +} + +type _DuplicateRowsResponse DuplicateRowsResponse + +// NewDuplicateRowsResponse instantiates a new DuplicateRowsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDuplicateRowsResponse(status bool, result DuplicateRowsResult) *DuplicateRowsResponse { + this := DuplicateRowsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDuplicateRowsResponseWithDefaults instantiates a new DuplicateRowsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDuplicateRowsResponseWithDefaults() *DuplicateRowsResponse { + this := DuplicateRowsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DuplicateRowsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DuplicateRowsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DuplicateRowsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DuplicateRowsResponse) GetResult() DuplicateRowsResult { + if o == nil { + var ret DuplicateRowsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DuplicateRowsResponse) GetResultOk() (*DuplicateRowsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DuplicateRowsResponse) SetResult(v DuplicateRowsResult) { + o.Result = v +} + +func (o DuplicateRowsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicateRowsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DuplicateRowsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDuplicateRowsResponse := _DuplicateRowsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDuplicateRowsResponse) + + if err != nil { + return err + } + + *o = DuplicateRowsResponse(varDuplicateRowsResponse) + + return err +} + +type NullableDuplicateRowsResponse struct { + value *DuplicateRowsResponse + isSet bool +} + +func (v NullableDuplicateRowsResponse) Get() *DuplicateRowsResponse { + return v.value +} + +func (v *NullableDuplicateRowsResponse) Set(val *DuplicateRowsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDuplicateRowsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDuplicateRowsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDuplicateRowsResponse(val *DuplicateRowsResponse) *NullableDuplicateRowsResponse { + return &NullableDuplicateRowsResponse{value: val, isSet: true} +} + +func (v NullableDuplicateRowsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDuplicateRowsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_duplicate_rows_result.go b/go/futureagi/model_duplicate_rows_result.go new file mode 100644 index 0000000..ae7ec91 --- /dev/null +++ b/go/futureagi/model_duplicate_rows_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DuplicateRowsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicateRowsResult{} + +// DuplicateRowsResult struct for DuplicateRowsResult +type DuplicateRowsResult struct { + Message string `json:"message"` + SourceRows int32 `json:"source_rows"` + CopiesPerRow int32 `json:"copies_per_row"` + TotalNewRows int32 `json:"total_new_rows"` + NewRowIds []string `json:"new_row_ids"` +} + +type _DuplicateRowsResult DuplicateRowsResult + +// NewDuplicateRowsResult instantiates a new DuplicateRowsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDuplicateRowsResult(message string, sourceRows int32, copiesPerRow int32, totalNewRows int32, newRowIds []string) *DuplicateRowsResult { + this := DuplicateRowsResult{} + this.Message = message + this.SourceRows = sourceRows + this.CopiesPerRow = copiesPerRow + this.TotalNewRows = totalNewRows + this.NewRowIds = newRowIds + return &this +} + +// NewDuplicateRowsResultWithDefaults instantiates a new DuplicateRowsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDuplicateRowsResultWithDefaults() *DuplicateRowsResult { + this := DuplicateRowsResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DuplicateRowsResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DuplicateRowsResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DuplicateRowsResult) SetMessage(v string) { + o.Message = v +} + +// GetSourceRows returns the SourceRows field value +func (o *DuplicateRowsResult) GetSourceRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SourceRows +} + +// GetSourceRowsOk returns a tuple with the SourceRows field value +// and a boolean to check if the value has been set. +func (o *DuplicateRowsResult) GetSourceRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SourceRows, true +} + +// SetSourceRows sets field value +func (o *DuplicateRowsResult) SetSourceRows(v int32) { + o.SourceRows = v +} + +// GetCopiesPerRow returns the CopiesPerRow field value +func (o *DuplicateRowsResult) GetCopiesPerRow() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CopiesPerRow +} + +// GetCopiesPerRowOk returns a tuple with the CopiesPerRow field value +// and a boolean to check if the value has been set. +func (o *DuplicateRowsResult) GetCopiesPerRowOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CopiesPerRow, true +} + +// SetCopiesPerRow sets field value +func (o *DuplicateRowsResult) SetCopiesPerRow(v int32) { + o.CopiesPerRow = v +} + +// GetTotalNewRows returns the TotalNewRows field value +func (o *DuplicateRowsResult) GetTotalNewRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalNewRows +} + +// GetTotalNewRowsOk returns a tuple with the TotalNewRows field value +// and a boolean to check if the value has been set. +func (o *DuplicateRowsResult) GetTotalNewRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalNewRows, true +} + +// SetTotalNewRows sets field value +func (o *DuplicateRowsResult) SetTotalNewRows(v int32) { + o.TotalNewRows = v +} + +// GetNewRowIds returns the NewRowIds field value +func (o *DuplicateRowsResult) GetNewRowIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.NewRowIds +} + +// GetNewRowIdsOk returns a tuple with the NewRowIds field value +// and a boolean to check if the value has been set. +func (o *DuplicateRowsResult) GetNewRowIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.NewRowIds, true +} + +// SetNewRowIds sets field value +func (o *DuplicateRowsResult) SetNewRowIds(v []string) { + o.NewRowIds = v +} + +func (o DuplicateRowsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicateRowsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["source_rows"] = o.SourceRows + toSerialize["copies_per_row"] = o.CopiesPerRow + toSerialize["total_new_rows"] = o.TotalNewRows + toSerialize["new_row_ids"] = o.NewRowIds + return toSerialize, nil +} + +func (o *DuplicateRowsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "source_rows", + "copies_per_row", + "total_new_rows", + "new_row_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDuplicateRowsResult := _DuplicateRowsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDuplicateRowsResult) + + if err != nil { + return err + } + + *o = DuplicateRowsResult(varDuplicateRowsResult) + + return err +} + +type NullableDuplicateRowsResult struct { + value *DuplicateRowsResult + isSet bool +} + +func (v NullableDuplicateRowsResult) Get() *DuplicateRowsResult { + return v.value +} + +func (v *NullableDuplicateRowsResult) Set(val *DuplicateRowsResult) { + v.value = val + v.isSet = true +} + +func (v NullableDuplicateRowsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDuplicateRowsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDuplicateRowsResult(val *DuplicateRowsResult) *NullableDuplicateRowsResult { + return &NullableDuplicateRowsResult{value: val, isSet: true} +} + +func (v NullableDuplicateRowsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDuplicateRowsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dynamic_column_create_response.go b/go/futureagi/model_dynamic_column_create_response.go new file mode 100644 index 0000000..8a32bc2 --- /dev/null +++ b/go/futureagi/model_dynamic_column_create_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DynamicColumnCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicColumnCreateResponse{} + +// DynamicColumnCreateResponse struct for DynamicColumnCreateResponse +type DynamicColumnCreateResponse struct { + Status bool `json:"status"` + Result DynamicColumnCreateResult `json:"result"` +} + +type _DynamicColumnCreateResponse DynamicColumnCreateResponse + +// NewDynamicColumnCreateResponse instantiates a new DynamicColumnCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDynamicColumnCreateResponse(status bool, result DynamicColumnCreateResult) *DynamicColumnCreateResponse { + this := DynamicColumnCreateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDynamicColumnCreateResponseWithDefaults instantiates a new DynamicColumnCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDynamicColumnCreateResponseWithDefaults() *DynamicColumnCreateResponse { + this := DynamicColumnCreateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DynamicColumnCreateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnCreateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DynamicColumnCreateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DynamicColumnCreateResponse) GetResult() DynamicColumnCreateResult { + if o == nil { + var ret DynamicColumnCreateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnCreateResponse) GetResultOk() (*DynamicColumnCreateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DynamicColumnCreateResponse) SetResult(v DynamicColumnCreateResult) { + o.Result = v +} + +func (o DynamicColumnCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicColumnCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DynamicColumnCreateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDynamicColumnCreateResponse := _DynamicColumnCreateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDynamicColumnCreateResponse) + + if err != nil { + return err + } + + *o = DynamicColumnCreateResponse(varDynamicColumnCreateResponse) + + return err +} + +type NullableDynamicColumnCreateResponse struct { + value *DynamicColumnCreateResponse + isSet bool +} + +func (v NullableDynamicColumnCreateResponse) Get() *DynamicColumnCreateResponse { + return v.value +} + +func (v *NullableDynamicColumnCreateResponse) Set(val *DynamicColumnCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicColumnCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicColumnCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicColumnCreateResponse(val *DynamicColumnCreateResponse) *NullableDynamicColumnCreateResponse { + return &NullableDynamicColumnCreateResponse{value: val, isSet: true} +} + +func (v NullableDynamicColumnCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicColumnCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dynamic_column_create_result.go b/go/futureagi/model_dynamic_column_create_result.go new file mode 100644 index 0000000..e4879ba --- /dev/null +++ b/go/futureagi/model_dynamic_column_create_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DynamicColumnCreateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicColumnCreateResult{} + +// DynamicColumnCreateResult struct for DynamicColumnCreateResult +type DynamicColumnCreateResult struct { + Message string `json:"message"` + NewColumnId string `json:"new_column_id"` + NewColumnName string `json:"new_column_name"` +} + +type _DynamicColumnCreateResult DynamicColumnCreateResult + +// NewDynamicColumnCreateResult instantiates a new DynamicColumnCreateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDynamicColumnCreateResult(message string, newColumnId string, newColumnName string) *DynamicColumnCreateResult { + this := DynamicColumnCreateResult{} + this.Message = message + this.NewColumnId = newColumnId + this.NewColumnName = newColumnName + return &this +} + +// NewDynamicColumnCreateResultWithDefaults instantiates a new DynamicColumnCreateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDynamicColumnCreateResultWithDefaults() *DynamicColumnCreateResult { + this := DynamicColumnCreateResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DynamicColumnCreateResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnCreateResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DynamicColumnCreateResult) SetMessage(v string) { + o.Message = v +} + +// GetNewColumnId returns the NewColumnId field value +func (o *DynamicColumnCreateResult) GetNewColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.NewColumnId +} + +// GetNewColumnIdOk returns a tuple with the NewColumnId field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnCreateResult) GetNewColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewColumnId, true +} + +// SetNewColumnId sets field value +func (o *DynamicColumnCreateResult) SetNewColumnId(v string) { + o.NewColumnId = v +} + +// GetNewColumnName returns the NewColumnName field value +func (o *DynamicColumnCreateResult) GetNewColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnCreateResult) GetNewColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewColumnName, true +} + +// SetNewColumnName sets field value +func (o *DynamicColumnCreateResult) SetNewColumnName(v string) { + o.NewColumnName = v +} + +func (o DynamicColumnCreateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicColumnCreateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["new_column_id"] = o.NewColumnId + toSerialize["new_column_name"] = o.NewColumnName + return toSerialize, nil +} + +func (o *DynamicColumnCreateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "new_column_id", + "new_column_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDynamicColumnCreateResult := _DynamicColumnCreateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDynamicColumnCreateResult) + + if err != nil { + return err + } + + *o = DynamicColumnCreateResult(varDynamicColumnCreateResult) + + return err +} + +type NullableDynamicColumnCreateResult struct { + value *DynamicColumnCreateResult + isSet bool +} + +func (v NullableDynamicColumnCreateResult) Get() *DynamicColumnCreateResult { + return v.value +} + +func (v *NullableDynamicColumnCreateResult) Set(val *DynamicColumnCreateResult) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicColumnCreateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicColumnCreateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicColumnCreateResult(val *DynamicColumnCreateResult) *NullableDynamicColumnCreateResult { + return &NullableDynamicColumnCreateResult{value: val, isSet: true} +} + +func (v NullableDynamicColumnCreateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicColumnCreateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dynamic_column_message_response.go b/go/futureagi/model_dynamic_column_message_response.go new file mode 100644 index 0000000..c0e1a0f --- /dev/null +++ b/go/futureagi/model_dynamic_column_message_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DynamicColumnMessageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicColumnMessageResponse{} + +// DynamicColumnMessageResponse struct for DynamicColumnMessageResponse +type DynamicColumnMessageResponse struct { + Status bool `json:"status"` + Result DynamicColumnMessageResult `json:"result"` +} + +type _DynamicColumnMessageResponse DynamicColumnMessageResponse + +// NewDynamicColumnMessageResponse instantiates a new DynamicColumnMessageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDynamicColumnMessageResponse(status bool, result DynamicColumnMessageResult) *DynamicColumnMessageResponse { + this := DynamicColumnMessageResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewDynamicColumnMessageResponseWithDefaults instantiates a new DynamicColumnMessageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDynamicColumnMessageResponseWithDefaults() *DynamicColumnMessageResponse { + this := DynamicColumnMessageResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *DynamicColumnMessageResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnMessageResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DynamicColumnMessageResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *DynamicColumnMessageResponse) GetResult() DynamicColumnMessageResult { + if o == nil { + var ret DynamicColumnMessageResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnMessageResponse) GetResultOk() (*DynamicColumnMessageResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *DynamicColumnMessageResponse) SetResult(v DynamicColumnMessageResult) { + o.Result = v +} + +func (o DynamicColumnMessageResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicColumnMessageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *DynamicColumnMessageResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDynamicColumnMessageResponse := _DynamicColumnMessageResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDynamicColumnMessageResponse) + + if err != nil { + return err + } + + *o = DynamicColumnMessageResponse(varDynamicColumnMessageResponse) + + return err +} + +type NullableDynamicColumnMessageResponse struct { + value *DynamicColumnMessageResponse + isSet bool +} + +func (v NullableDynamicColumnMessageResponse) Get() *DynamicColumnMessageResponse { + return v.value +} + +func (v *NullableDynamicColumnMessageResponse) Set(val *DynamicColumnMessageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicColumnMessageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicColumnMessageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicColumnMessageResponse(val *DynamicColumnMessageResponse) *NullableDynamicColumnMessageResponse { + return &NullableDynamicColumnMessageResponse{value: val, isSet: true} +} + +func (v NullableDynamicColumnMessageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicColumnMessageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_dynamic_column_message_result.go b/go/futureagi/model_dynamic_column_message_result.go new file mode 100644 index 0000000..213a95d --- /dev/null +++ b/go/futureagi/model_dynamic_column_message_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the DynamicColumnMessageResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicColumnMessageResult{} + +// DynamicColumnMessageResult struct for DynamicColumnMessageResult +type DynamicColumnMessageResult struct { + Message string `json:"message"` +} + +type _DynamicColumnMessageResult DynamicColumnMessageResult + +// NewDynamicColumnMessageResult instantiates a new DynamicColumnMessageResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDynamicColumnMessageResult(message string) *DynamicColumnMessageResult { + this := DynamicColumnMessageResult{} + this.Message = message + return &this +} + +// NewDynamicColumnMessageResultWithDefaults instantiates a new DynamicColumnMessageResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDynamicColumnMessageResultWithDefaults() *DynamicColumnMessageResult { + this := DynamicColumnMessageResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *DynamicColumnMessageResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DynamicColumnMessageResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DynamicColumnMessageResult) SetMessage(v string) { + o.Message = v +} + +func (o DynamicColumnMessageResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicColumnMessageResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *DynamicColumnMessageResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDynamicColumnMessageResult := _DynamicColumnMessageResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDynamicColumnMessageResult) + + if err != nil { + return err + } + + *o = DynamicColumnMessageResult(varDynamicColumnMessageResult) + + return err +} + +type NullableDynamicColumnMessageResult struct { + value *DynamicColumnMessageResult + isSet bool +} + +func (v NullableDynamicColumnMessageResult) Get() *DynamicColumnMessageResult { + return v.value +} + +func (v *NullableDynamicColumnMessageResult) Set(val *DynamicColumnMessageResult) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicColumnMessageResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicColumnMessageResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicColumnMessageResult(val *DynamicColumnMessageResult) *NullableDynamicColumnMessageResult { + return &NullableDynamicColumnMessageResult{value: val, isSet: true} +} + +func (v NullableDynamicColumnMessageResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicColumnMessageResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_edit_run_prompt_column.go b/go/futureagi/model_edit_run_prompt_column.go new file mode 100644 index 0000000..09df2f5 --- /dev/null +++ b/go/futureagi/model_edit_run_prompt_column.go @@ -0,0 +1,268 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EditRunPromptColumn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EditRunPromptColumn{} + +// EditRunPromptColumn struct for EditRunPromptColumn +type EditRunPromptColumn struct { + DatasetId string `json:"dataset_id"` + ColumnId string `json:"column_id"` + Name NullableString `json:"name,omitempty"` + Config *PromptConfig `json:"config,omitempty"` +} + +type _EditRunPromptColumn EditRunPromptColumn + +// NewEditRunPromptColumn instantiates a new EditRunPromptColumn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEditRunPromptColumn(datasetId string, columnId string) *EditRunPromptColumn { + this := EditRunPromptColumn{} + this.DatasetId = datasetId + this.ColumnId = columnId + return &this +} + +// NewEditRunPromptColumnWithDefaults instantiates a new EditRunPromptColumn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEditRunPromptColumnWithDefaults() *EditRunPromptColumn { + this := EditRunPromptColumn{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *EditRunPromptColumn) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *EditRunPromptColumn) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *EditRunPromptColumn) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetColumnId returns the ColumnId field value +func (o *EditRunPromptColumn) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *EditRunPromptColumn) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *EditRunPromptColumn) SetColumnId(v string) { + o.ColumnId = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EditRunPromptColumn) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EditRunPromptColumn) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *EditRunPromptColumn) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *EditRunPromptColumn) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *EditRunPromptColumn) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *EditRunPromptColumn) UnsetName() { + o.Name.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *EditRunPromptColumn) GetConfig() PromptConfig { + if o == nil || IsNil(o.Config) { + var ret PromptConfig + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EditRunPromptColumn) GetConfigOk() (*PromptConfig, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *EditRunPromptColumn) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given PromptConfig and assigns it to the Config field. +func (o *EditRunPromptColumn) SetConfig(v PromptConfig) { + o.Config = &v +} + +func (o EditRunPromptColumn) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EditRunPromptColumn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["column_id"] = o.ColumnId + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + return toSerialize, nil +} + +func (o *EditRunPromptColumn) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "column_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEditRunPromptColumn := _EditRunPromptColumn{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEditRunPromptColumn) + + if err != nil { + return err + } + + *o = EditRunPromptColumn(varEditRunPromptColumn) + + return err +} + +type NullableEditRunPromptColumn struct { + value *EditRunPromptColumn + isSet bool +} + +func (v NullableEditRunPromptColumn) Get() *EditRunPromptColumn { + return v.value +} + +func (v *NullableEditRunPromptColumn) Set(val *EditRunPromptColumn) { + v.value = val + v.isSet = true +} + +func (v NullableEditRunPromptColumn) IsSet() bool { + return v.isSet +} + +func (v *NullableEditRunPromptColumn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEditRunPromptColumn(val *EditRunPromptColumn) *NullableEditRunPromptColumn { + return &NullableEditRunPromptColumn{value: val, isSet: true} +} + +func (v NullableEditRunPromptColumn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEditRunPromptColumn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_error_localizer_task_response.go b/go/futureagi/model_error_localizer_task_response.go new file mode 100644 index 0000000..2a1f292 --- /dev/null +++ b/go/futureagi/model_error_localizer_task_response.go @@ -0,0 +1,765 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the ErrorLocalizerTaskResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLocalizerTaskResponse{} + +// ErrorLocalizerTaskResponse struct for ErrorLocalizerTaskResponse +type ErrorLocalizerTaskResponse struct { + TaskId *string `json:"task_id,omitempty"` + EvalConfigId NullableString `json:"eval_config_id,omitempty"` + Status *string `json:"status,omitempty"` + EvalResult map[string]interface{} `json:"eval_result,omitempty"` + EvalExplanation NullableString `json:"eval_explanation,omitempty"` + InputData map[string]interface{} `json:"input_data,omitempty"` + InputKeys map[string]interface{} `json:"input_keys,omitempty"` + InputTypes map[string]interface{} `json:"input_types,omitempty"` + RulePrompt NullableString `json:"rule_prompt,omitempty"` + ErrorAnalysis map[string]interface{} `json:"error_analysis,omitempty"` + SelectedInputKey NullableString `json:"selected_input_key,omitempty"` + ErrorMessage NullableString `json:"error_message,omitempty"` + CreatedAt NullableTime `json:"created_at,omitempty"` + UpdatedAt NullableTime `json:"updated_at,omitempty"` + EvalTemplateName NullableString `json:"eval_template_name,omitempty"` + EvalTemplateId NullableString `json:"eval_template_id,omitempty"` +} + +// NewErrorLocalizerTaskResponse instantiates a new ErrorLocalizerTaskResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorLocalizerTaskResponse() *ErrorLocalizerTaskResponse { + this := ErrorLocalizerTaskResponse{} + return &this +} + +// NewErrorLocalizerTaskResponseWithDefaults instantiates a new ErrorLocalizerTaskResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorLocalizerTaskResponseWithDefaults() *ErrorLocalizerTaskResponse { + this := ErrorLocalizerTaskResponse{} + return &this +} + +// GetTaskId returns the TaskId field value if set, zero value otherwise. +func (o *ErrorLocalizerTaskResponse) GetTaskId() string { + if o == nil || IsNil(o.TaskId) { + var ret string + return ret + } + return *o.TaskId +} + +// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLocalizerTaskResponse) GetTaskIdOk() (*string, bool) { + if o == nil || IsNil(o.TaskId) { + return nil, false + } + return o.TaskId, true +} + +// HasTaskId returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasTaskId() bool { + if o != nil && !IsNil(o.TaskId) { + return true + } + + return false +} + +// SetTaskId gets a reference to the given string and assigns it to the TaskId field. +func (o *ErrorLocalizerTaskResponse) SetTaskId(v string) { + o.TaskId = &v +} + +// GetEvalConfigId returns the EvalConfigId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetEvalConfigId() string { + if o == nil || IsNil(o.EvalConfigId.Get()) { + var ret string + return ret + } + return *o.EvalConfigId.Get() +} + +// GetEvalConfigIdOk returns a tuple with the EvalConfigId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetEvalConfigIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalConfigId.Get(), o.EvalConfigId.IsSet() +} + +// HasEvalConfigId returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasEvalConfigId() bool { + if o != nil && o.EvalConfigId.IsSet() { + return true + } + + return false +} + +// SetEvalConfigId gets a reference to the given NullableString and assigns it to the EvalConfigId field. +func (o *ErrorLocalizerTaskResponse) SetEvalConfigId(v string) { + o.EvalConfigId.Set(&v) +} + +// SetEvalConfigIdNil sets the value for EvalConfigId to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetEvalConfigIdNil() { + o.EvalConfigId.Set(nil) +} + +// UnsetEvalConfigId ensures that no value is present for EvalConfigId, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetEvalConfigId() { + o.EvalConfigId.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ErrorLocalizerTaskResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLocalizerTaskResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ErrorLocalizerTaskResponse) SetStatus(v string) { + o.Status = &v +} + +// GetEvalResult returns the EvalResult field value if set, zero value otherwise. +func (o *ErrorLocalizerTaskResponse) GetEvalResult() map[string]interface{} { + if o == nil || IsNil(o.EvalResult) { + var ret map[string]interface{} + return ret + } + return o.EvalResult +} + +// GetEvalResultOk returns a tuple with the EvalResult field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLocalizerTaskResponse) GetEvalResultOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalResult) { + return map[string]interface{}{}, false + } + return o.EvalResult, true +} + +// HasEvalResult returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasEvalResult() bool { + if o != nil && !IsNil(o.EvalResult) { + return true + } + + return false +} + +// SetEvalResult gets a reference to the given map[string]interface{} and assigns it to the EvalResult field. +func (o *ErrorLocalizerTaskResponse) SetEvalResult(v map[string]interface{}) { + o.EvalResult = v +} + +// GetEvalExplanation returns the EvalExplanation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetEvalExplanation() string { + if o == nil || IsNil(o.EvalExplanation.Get()) { + var ret string + return ret + } + return *o.EvalExplanation.Get() +} + +// GetEvalExplanationOk returns a tuple with the EvalExplanation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetEvalExplanationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalExplanation.Get(), o.EvalExplanation.IsSet() +} + +// HasEvalExplanation returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasEvalExplanation() bool { + if o != nil && o.EvalExplanation.IsSet() { + return true + } + + return false +} + +// SetEvalExplanation gets a reference to the given NullableString and assigns it to the EvalExplanation field. +func (o *ErrorLocalizerTaskResponse) SetEvalExplanation(v string) { + o.EvalExplanation.Set(&v) +} + +// SetEvalExplanationNil sets the value for EvalExplanation to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetEvalExplanationNil() { + o.EvalExplanation.Set(nil) +} + +// UnsetEvalExplanation ensures that no value is present for EvalExplanation, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetEvalExplanation() { + o.EvalExplanation.Unset() +} + +// GetInputData returns the InputData field value if set, zero value otherwise. +func (o *ErrorLocalizerTaskResponse) GetInputData() map[string]interface{} { + if o == nil || IsNil(o.InputData) { + var ret map[string]interface{} + return ret + } + return o.InputData +} + +// GetInputDataOk returns a tuple with the InputData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLocalizerTaskResponse) GetInputDataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InputData) { + return map[string]interface{}{}, false + } + return o.InputData, true +} + +// HasInputData returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasInputData() bool { + if o != nil && !IsNil(o.InputData) { + return true + } + + return false +} + +// SetInputData gets a reference to the given map[string]interface{} and assigns it to the InputData field. +func (o *ErrorLocalizerTaskResponse) SetInputData(v map[string]interface{}) { + o.InputData = v +} + +// GetInputKeys returns the InputKeys field value if set, zero value otherwise. +func (o *ErrorLocalizerTaskResponse) GetInputKeys() map[string]interface{} { + if o == nil || IsNil(o.InputKeys) { + var ret map[string]interface{} + return ret + } + return o.InputKeys +} + +// GetInputKeysOk returns a tuple with the InputKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLocalizerTaskResponse) GetInputKeysOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InputKeys) { + return map[string]interface{}{}, false + } + return o.InputKeys, true +} + +// HasInputKeys returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasInputKeys() bool { + if o != nil && !IsNil(o.InputKeys) { + return true + } + + return false +} + +// SetInputKeys gets a reference to the given map[string]interface{} and assigns it to the InputKeys field. +func (o *ErrorLocalizerTaskResponse) SetInputKeys(v map[string]interface{}) { + o.InputKeys = v +} + +// GetInputTypes returns the InputTypes field value if set, zero value otherwise. +func (o *ErrorLocalizerTaskResponse) GetInputTypes() map[string]interface{} { + if o == nil || IsNil(o.InputTypes) { + var ret map[string]interface{} + return ret + } + return o.InputTypes +} + +// GetInputTypesOk returns a tuple with the InputTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLocalizerTaskResponse) GetInputTypesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InputTypes) { + return map[string]interface{}{}, false + } + return o.InputTypes, true +} + +// HasInputTypes returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasInputTypes() bool { + if o != nil && !IsNil(o.InputTypes) { + return true + } + + return false +} + +// SetInputTypes gets a reference to the given map[string]interface{} and assigns it to the InputTypes field. +func (o *ErrorLocalizerTaskResponse) SetInputTypes(v map[string]interface{}) { + o.InputTypes = v +} + +// GetRulePrompt returns the RulePrompt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetRulePrompt() string { + if o == nil || IsNil(o.RulePrompt.Get()) { + var ret string + return ret + } + return *o.RulePrompt.Get() +} + +// GetRulePromptOk returns a tuple with the RulePrompt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetRulePromptOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RulePrompt.Get(), o.RulePrompt.IsSet() +} + +// HasRulePrompt returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasRulePrompt() bool { + if o != nil && o.RulePrompt.IsSet() { + return true + } + + return false +} + +// SetRulePrompt gets a reference to the given NullableString and assigns it to the RulePrompt field. +func (o *ErrorLocalizerTaskResponse) SetRulePrompt(v string) { + o.RulePrompt.Set(&v) +} + +// SetRulePromptNil sets the value for RulePrompt to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetRulePromptNil() { + o.RulePrompt.Set(nil) +} + +// UnsetRulePrompt ensures that no value is present for RulePrompt, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetRulePrompt() { + o.RulePrompt.Unset() +} + +// GetErrorAnalysis returns the ErrorAnalysis field value if set, zero value otherwise. +func (o *ErrorLocalizerTaskResponse) GetErrorAnalysis() map[string]interface{} { + if o == nil || IsNil(o.ErrorAnalysis) { + var ret map[string]interface{} + return ret + } + return o.ErrorAnalysis +} + +// GetErrorAnalysisOk returns a tuple with the ErrorAnalysis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLocalizerTaskResponse) GetErrorAnalysisOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ErrorAnalysis) { + return map[string]interface{}{}, false + } + return o.ErrorAnalysis, true +} + +// HasErrorAnalysis returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasErrorAnalysis() bool { + if o != nil && !IsNil(o.ErrorAnalysis) { + return true + } + + return false +} + +// SetErrorAnalysis gets a reference to the given map[string]interface{} and assigns it to the ErrorAnalysis field. +func (o *ErrorLocalizerTaskResponse) SetErrorAnalysis(v map[string]interface{}) { + o.ErrorAnalysis = v +} + +// GetSelectedInputKey returns the SelectedInputKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetSelectedInputKey() string { + if o == nil || IsNil(o.SelectedInputKey.Get()) { + var ret string + return ret + } + return *o.SelectedInputKey.Get() +} + +// GetSelectedInputKeyOk returns a tuple with the SelectedInputKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetSelectedInputKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SelectedInputKey.Get(), o.SelectedInputKey.IsSet() +} + +// HasSelectedInputKey returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasSelectedInputKey() bool { + if o != nil && o.SelectedInputKey.IsSet() { + return true + } + + return false +} + +// SetSelectedInputKey gets a reference to the given NullableString and assigns it to the SelectedInputKey field. +func (o *ErrorLocalizerTaskResponse) SetSelectedInputKey(v string) { + o.SelectedInputKey.Set(&v) +} + +// SetSelectedInputKeyNil sets the value for SelectedInputKey to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetSelectedInputKeyNil() { + o.SelectedInputKey.Set(nil) +} + +// UnsetSelectedInputKey ensures that no value is present for SelectedInputKey, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetSelectedInputKey() { + o.SelectedInputKey.Unset() +} + +// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetErrorMessage() string { + if o == nil || IsNil(o.ErrorMessage.Get()) { + var ret string + return ret + } + return *o.ErrorMessage.Get() +} + +// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetErrorMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ErrorMessage.Get(), o.ErrorMessage.IsSet() +} + +// HasErrorMessage returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasErrorMessage() bool { + if o != nil && o.ErrorMessage.IsSet() { + return true + } + + return false +} + +// SetErrorMessage gets a reference to the given NullableString and assigns it to the ErrorMessage field. +func (o *ErrorLocalizerTaskResponse) SetErrorMessage(v string) { + o.ErrorMessage.Set(&v) +} + +// SetErrorMessageNil sets the value for ErrorMessage to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetErrorMessageNil() { + o.ErrorMessage.Set(nil) +} + +// UnsetErrorMessage ensures that no value is present for ErrorMessage, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetErrorMessage() { + o.ErrorMessage.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt.Get()) { + var ret time.Time + return ret + } + return *o.CreatedAt.Get() +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CreatedAt.Get(), o.CreatedAt.IsSet() +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasCreatedAt() bool { + if o != nil && o.CreatedAt.IsSet() { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given NullableTime and assigns it to the CreatedAt field. +func (o *ErrorLocalizerTaskResponse) SetCreatedAt(v time.Time) { + o.CreatedAt.Set(&v) +} + +// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetCreatedAtNil() { + o.CreatedAt.Set(nil) +} + +// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetCreatedAt() { + o.CreatedAt.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt.Get()) { + var ret time.Time + return ret + } + return *o.UpdatedAt.Get() +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.UpdatedAt.Get(), o.UpdatedAt.IsSet() +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt.IsSet() { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given NullableTime and assigns it to the UpdatedAt field. +func (o *ErrorLocalizerTaskResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt.Set(&v) +} + +// SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetUpdatedAtNil() { + o.UpdatedAt.Set(nil) +} + +// UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetUpdatedAt() { + o.UpdatedAt.Unset() +} + +// GetEvalTemplateName returns the EvalTemplateName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetEvalTemplateName() string { + if o == nil || IsNil(o.EvalTemplateName.Get()) { + var ret string + return ret + } + return *o.EvalTemplateName.Get() +} + +// GetEvalTemplateNameOk returns a tuple with the EvalTemplateName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetEvalTemplateNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalTemplateName.Get(), o.EvalTemplateName.IsSet() +} + +// HasEvalTemplateName returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasEvalTemplateName() bool { + if o != nil && o.EvalTemplateName.IsSet() { + return true + } + + return false +} + +// SetEvalTemplateName gets a reference to the given NullableString and assigns it to the EvalTemplateName field. +func (o *ErrorLocalizerTaskResponse) SetEvalTemplateName(v string) { + o.EvalTemplateName.Set(&v) +} + +// SetEvalTemplateNameNil sets the value for EvalTemplateName to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetEvalTemplateNameNil() { + o.EvalTemplateName.Set(nil) +} + +// UnsetEvalTemplateName ensures that no value is present for EvalTemplateName, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetEvalTemplateName() { + o.EvalTemplateName.Unset() +} + +// GetEvalTemplateId returns the EvalTemplateId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorLocalizerTaskResponse) GetEvalTemplateId() string { + if o == nil || IsNil(o.EvalTemplateId.Get()) { + var ret string + return ret + } + return *o.EvalTemplateId.Get() +} + +// GetEvalTemplateIdOk returns a tuple with the EvalTemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorLocalizerTaskResponse) GetEvalTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalTemplateId.Get(), o.EvalTemplateId.IsSet() +} + +// HasEvalTemplateId returns a boolean if a field has been set. +func (o *ErrorLocalizerTaskResponse) HasEvalTemplateId() bool { + if o != nil && o.EvalTemplateId.IsSet() { + return true + } + + return false +} + +// SetEvalTemplateId gets a reference to the given NullableString and assigns it to the EvalTemplateId field. +func (o *ErrorLocalizerTaskResponse) SetEvalTemplateId(v string) { + o.EvalTemplateId.Set(&v) +} + +// SetEvalTemplateIdNil sets the value for EvalTemplateId to be an explicit nil +func (o *ErrorLocalizerTaskResponse) SetEvalTemplateIdNil() { + o.EvalTemplateId.Set(nil) +} + +// UnsetEvalTemplateId ensures that no value is present for EvalTemplateId, not even an explicit nil +func (o *ErrorLocalizerTaskResponse) UnsetEvalTemplateId() { + o.EvalTemplateId.Unset() +} + +func (o ErrorLocalizerTaskResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLocalizerTaskResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TaskId) { + toSerialize["task_id"] = o.TaskId + } + if o.EvalConfigId.IsSet() { + toSerialize["eval_config_id"] = o.EvalConfigId.Get() + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.EvalResult) { + toSerialize["eval_result"] = o.EvalResult + } + if o.EvalExplanation.IsSet() { + toSerialize["eval_explanation"] = o.EvalExplanation.Get() + } + if !IsNil(o.InputData) { + toSerialize["input_data"] = o.InputData + } + if !IsNil(o.InputKeys) { + toSerialize["input_keys"] = o.InputKeys + } + if !IsNil(o.InputTypes) { + toSerialize["input_types"] = o.InputTypes + } + if o.RulePrompt.IsSet() { + toSerialize["rule_prompt"] = o.RulePrompt.Get() + } + if !IsNil(o.ErrorAnalysis) { + toSerialize["error_analysis"] = o.ErrorAnalysis + } + if o.SelectedInputKey.IsSet() { + toSerialize["selected_input_key"] = o.SelectedInputKey.Get() + } + if o.ErrorMessage.IsSet() { + toSerialize["error_message"] = o.ErrorMessage.Get() + } + if o.CreatedAt.IsSet() { + toSerialize["created_at"] = o.CreatedAt.Get() + } + if o.UpdatedAt.IsSet() { + toSerialize["updated_at"] = o.UpdatedAt.Get() + } + if o.EvalTemplateName.IsSet() { + toSerialize["eval_template_name"] = o.EvalTemplateName.Get() + } + if o.EvalTemplateId.IsSet() { + toSerialize["eval_template_id"] = o.EvalTemplateId.Get() + } + return toSerialize, nil +} + +type NullableErrorLocalizerTaskResponse struct { + value *ErrorLocalizerTaskResponse + isSet bool +} + +func (v NullableErrorLocalizerTaskResponse) Get() *ErrorLocalizerTaskResponse { + return v.value +} + +func (v *NullableErrorLocalizerTaskResponse) Set(val *ErrorLocalizerTaskResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLocalizerTaskResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLocalizerTaskResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLocalizerTaskResponse(val *ErrorLocalizerTaskResponse) *NullableErrorLocalizerTaskResponse { + return &NullableErrorLocalizerTaskResponse{value: val, isSet: true} +} + +func (v NullableErrorLocalizerTaskResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLocalizerTaskResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_error_name.go b/go/futureagi/model_error_name.go new file mode 100644 index 0000000..0fde4a7 --- /dev/null +++ b/go/futureagi/model_error_name.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ErrorName type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorName{} + +// ErrorName struct for ErrorName +type ErrorName struct { + Name string `json:"name"` + Type string `json:"type"` +} + +type _ErrorName ErrorName + +// NewErrorName instantiates a new ErrorName object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorName(name string, type_ string) *ErrorName { + this := ErrorName{} + this.Name = name + this.Type = type_ + return &this +} + +// NewErrorNameWithDefaults instantiates a new ErrorName object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorNameWithDefaults() *ErrorName { + this := ErrorName{} + return &this +} + +// GetName returns the Name field value +func (o *ErrorName) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ErrorName) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ErrorName) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *ErrorName) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ErrorName) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ErrorName) SetType(v string) { + o.Type = v +} + +func (o ErrorName) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorName) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ErrorName) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varErrorName := _ErrorName{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varErrorName) + + if err != nil { + return err + } + + *o = ErrorName(varErrorName) + + return err +} + +type NullableErrorName struct { + value *ErrorName + isSet bool +} + +func (v NullableErrorName) Get() *ErrorName { + return v.value +} + +func (v *NullableErrorName) Set(val *ErrorName) { + v.value = val + v.isSet = true +} + +func (v NullableErrorName) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorName(val *ErrorName) *NullableErrorName { + return &NullableErrorName{value: val, isSet: true} +} + +func (v NullableErrorName) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorName) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_error_response.go b/go/futureagi/model_error_response.go new file mode 100644 index 0000000..5fb5474 --- /dev/null +++ b/go/futureagi/model_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorResponse{} + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewErrorResponse instantiates a new ErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorResponse() *ErrorResponse { + this := ErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewErrorResponseWithDefaults instantiates a new ErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorResponseWithDefaults() *ErrorResponse { + this := ErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableErrorResponse struct { + value *ErrorResponse + isSet bool +} + +func (v NullableErrorResponse) Get() *ErrorResponse { + return v.value +} + +func (v *NullableErrorResponse) Set(val *ErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { + return &NullableErrorResponse{value: val, isSet: true} +} + +func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_config_definition.go b/go/futureagi/model_eval_config_definition.go new file mode 100644 index 0000000..10a2c18 --- /dev/null +++ b/go/futureagi/model_eval_config_definition.go @@ -0,0 +1,491 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalConfigDefinition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalConfigDefinition{} + +// EvalConfigDefinition struct for EvalConfigDefinition +type EvalConfigDefinition struct { + // UUID of the evaluation template to use. + TemplateId string `json:"template_id"` + // Name for this evaluation configuration. Defaults to 'Eval-' if omitted. + Name *string `json:"name,omitempty"` + // Template-specific configuration parameters. + Config map[string]interface{} `json:"config,omitempty"` + // Maps test execution data fields to the evaluation template's expected inputs. + Mapping map[string]interface{} `json:"mapping,omitempty"` + // Canonical filter list to restrict which test results are evaluated. + Filters []AutomationRuleConditionsFilterInner `json:"filters,omitempty"` + // Enables granular error localization on evaluation failures. + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + // Model to use for running this evaluation. + Model NullableString `json:"model,omitempty"` + // Knowledge base file to use for this evaluation. + KbId NullableString `json:"kb_id,omitempty"` + // Eval group that created this evaluation config. + EvalGroup NullableString `json:"eval_group,omitempty"` +} + +type _EvalConfigDefinition EvalConfigDefinition + +// NewEvalConfigDefinition instantiates a new EvalConfigDefinition object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalConfigDefinition(templateId string) *EvalConfigDefinition { + this := EvalConfigDefinition{} + this.TemplateId = templateId + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// NewEvalConfigDefinitionWithDefaults instantiates a new EvalConfigDefinition object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalConfigDefinitionWithDefaults() *EvalConfigDefinition { + this := EvalConfigDefinition{} + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// GetTemplateId returns the TemplateId field value +func (o *EvalConfigDefinition) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *EvalConfigDefinition) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *EvalConfigDefinition) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EvalConfigDefinition) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigDefinition) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EvalConfigDefinition) SetName(v string) { + o.Name = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *EvalConfigDefinition) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigDefinition) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *EvalConfigDefinition) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetMapping returns the Mapping field value if set, zero value otherwise. +func (o *EvalConfigDefinition) GetMapping() map[string]interface{} { + if o == nil || IsNil(o.Mapping) { + var ret map[string]interface{} + return ret + } + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigDefinition) GetMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Mapping) { + return map[string]interface{}{}, false + } + return o.Mapping, true +} + +// HasMapping returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasMapping() bool { + if o != nil && !IsNil(o.Mapping) { + return true + } + + return false +} + +// SetMapping gets a reference to the given map[string]interface{} and assigns it to the Mapping field. +func (o *EvalConfigDefinition) SetMapping(v map[string]interface{}) { + o.Mapping = v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *EvalConfigDefinition) GetFilters() []AutomationRuleConditionsFilterInner { + if o == nil || IsNil(o.Filters) { + var ret []AutomationRuleConditionsFilterInner + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigDefinition) GetFiltersOk() ([]AutomationRuleConditionsFilterInner, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given []AutomationRuleConditionsFilterInner and assigns it to the Filters field. +func (o *EvalConfigDefinition) SetFilters(v []AutomationRuleConditionsFilterInner) { + o.Filters = v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *EvalConfigDefinition) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigDefinition) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *EvalConfigDefinition) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigDefinition) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigDefinition) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *EvalConfigDefinition) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *EvalConfigDefinition) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *EvalConfigDefinition) UnsetModel() { + o.Model.Unset() +} + +// GetKbId returns the KbId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigDefinition) GetKbId() string { + if o == nil || IsNil(o.KbId.Get()) { + var ret string + return ret + } + return *o.KbId.Get() +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigDefinition) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KbId.Get(), o.KbId.IsSet() +} + +// HasKbId returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasKbId() bool { + if o != nil && o.KbId.IsSet() { + return true + } + + return false +} + +// SetKbId gets a reference to the given NullableString and assigns it to the KbId field. +func (o *EvalConfigDefinition) SetKbId(v string) { + o.KbId.Set(&v) +} + +// SetKbIdNil sets the value for KbId to be an explicit nil +func (o *EvalConfigDefinition) SetKbIdNil() { + o.KbId.Set(nil) +} + +// UnsetKbId ensures that no value is present for KbId, not even an explicit nil +func (o *EvalConfigDefinition) UnsetKbId() { + o.KbId.Unset() +} + +// GetEvalGroup returns the EvalGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigDefinition) GetEvalGroup() string { + if o == nil || IsNil(o.EvalGroup.Get()) { + var ret string + return ret + } + return *o.EvalGroup.Get() +} + +// GetEvalGroupOk returns a tuple with the EvalGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigDefinition) GetEvalGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalGroup.Get(), o.EvalGroup.IsSet() +} + +// HasEvalGroup returns a boolean if a field has been set. +func (o *EvalConfigDefinition) HasEvalGroup() bool { + if o != nil && o.EvalGroup.IsSet() { + return true + } + + return false +} + +// SetEvalGroup gets a reference to the given NullableString and assigns it to the EvalGroup field. +func (o *EvalConfigDefinition) SetEvalGroup(v string) { + o.EvalGroup.Set(&v) +} + +// SetEvalGroupNil sets the value for EvalGroup to be an explicit nil +func (o *EvalConfigDefinition) SetEvalGroupNil() { + o.EvalGroup.Set(nil) +} + +// UnsetEvalGroup ensures that no value is present for EvalGroup, not even an explicit nil +func (o *EvalConfigDefinition) UnsetEvalGroup() { + o.EvalGroup.Unset() +} + +func (o EvalConfigDefinition) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalConfigDefinition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_id"] = o.TemplateId + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Mapping) { + toSerialize["mapping"] = o.Mapping + } + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if o.KbId.IsSet() { + toSerialize["kb_id"] = o.KbId.Get() + } + if o.EvalGroup.IsSet() { + toSerialize["eval_group"] = o.EvalGroup.Get() + } + return toSerialize, nil +} + +func (o *EvalConfigDefinition) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalConfigDefinition := _EvalConfigDefinition{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalConfigDefinition) + + if err != nil { + return err + } + + *o = EvalConfigDefinition(varEvalConfigDefinition) + + return err +} + +type NullableEvalConfigDefinition struct { + value *EvalConfigDefinition + isSet bool +} + +func (v NullableEvalConfigDefinition) Get() *EvalConfigDefinition { + return v.value +} + +func (v *NullableEvalConfigDefinition) Set(val *EvalConfigDefinition) { + v.value = val + v.isSet = true +} + +func (v NullableEvalConfigDefinition) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalConfigDefinition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalConfigDefinition(val *EvalConfigDefinition) *NullableEvalConfigDefinition { + return &NullableEvalConfigDefinition{value: val, isSet: true} +} + +func (v NullableEvalConfigDefinition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalConfigDefinition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_config_response.go b/go/futureagi/model_eval_config_response.go new file mode 100644 index 0000000..864377a --- /dev/null +++ b/go/futureagi/model_eval_config_response.go @@ -0,0 +1,471 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalConfigResponse{} + +// EvalConfigResponse struct for EvalConfigResponse +type EvalConfigResponse struct { + Id *string `json:"id,omitempty"` + Name NullableString `json:"name,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + Mapping map[string]interface{} `json:"mapping,omitempty"` + Filters map[string]interface{} `json:"filters,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + Model NullableString `json:"model,omitempty"` + Status *string `json:"status,omitempty"` + EvalGroup *string `json:"eval_group,omitempty"` + TemplateId *string `json:"template_id,omitempty"` +} + +// NewEvalConfigResponse instantiates a new EvalConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalConfigResponse() *EvalConfigResponse { + this := EvalConfigResponse{} + return &this +} + +// NewEvalConfigResponseWithDefaults instantiates a new EvalConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalConfigResponseWithDefaults() *EvalConfigResponse { + this := EvalConfigResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EvalConfigResponse) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigResponse) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *EvalConfigResponse) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *EvalConfigResponse) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *EvalConfigResponse) UnsetName() { + o.Name.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *EvalConfigResponse) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetMapping returns the Mapping field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetMapping() map[string]interface{} { + if o == nil || IsNil(o.Mapping) { + var ret map[string]interface{} + return ret + } + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Mapping) { + return map[string]interface{}{}, false + } + return o.Mapping, true +} + +// HasMapping returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasMapping() bool { + if o != nil && !IsNil(o.Mapping) { + return true + } + + return false +} + +// SetMapping gets a reference to the given map[string]interface{} and assigns it to the Mapping field. +func (o *EvalConfigResponse) SetMapping(v map[string]interface{}) { + o.Mapping = v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetFilters() map[string]interface{} { + if o == nil || IsNil(o.Filters) { + var ret map[string]interface{} + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetFiltersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Filters) { + return map[string]interface{}{}, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given map[string]interface{} and assigns it to the Filters field. +func (o *EvalConfigResponse) SetFilters(v map[string]interface{}) { + o.Filters = v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *EvalConfigResponse) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigResponse) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigResponse) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *EvalConfigResponse) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *EvalConfigResponse) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *EvalConfigResponse) UnsetModel() { + o.Model.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *EvalConfigResponse) SetStatus(v string) { + o.Status = &v +} + +// GetEvalGroup returns the EvalGroup field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetEvalGroup() string { + if o == nil || IsNil(o.EvalGroup) { + var ret string + return ret + } + return *o.EvalGroup +} + +// GetEvalGroupOk returns a tuple with the EvalGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetEvalGroupOk() (*string, bool) { + if o == nil || IsNil(o.EvalGroup) { + return nil, false + } + return o.EvalGroup, true +} + +// HasEvalGroup returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasEvalGroup() bool { + if o != nil && !IsNil(o.EvalGroup) { + return true + } + + return false +} + +// SetEvalGroup gets a reference to the given string and assigns it to the EvalGroup field. +func (o *EvalConfigResponse) SetEvalGroup(v string) { + o.EvalGroup = &v +} + +// GetTemplateId returns the TemplateId field value if set, zero value otherwise. +func (o *EvalConfigResponse) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId) { + var ret string + return ret + } + return *o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigResponse) GetTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.TemplateId) { + return nil, false + } + return o.TemplateId, true +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *EvalConfigResponse) HasTemplateId() bool { + if o != nil && !IsNil(o.TemplateId) { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given string and assigns it to the TemplateId field. +func (o *EvalConfigResponse) SetTemplateId(v string) { + o.TemplateId = &v +} + +func (o EvalConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Mapping) { + toSerialize["mapping"] = o.Mapping + } + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.EvalGroup) { + toSerialize["eval_group"] = o.EvalGroup + } + if !IsNil(o.TemplateId) { + toSerialize["template_id"] = o.TemplateId + } + return toSerialize, nil +} + +type NullableEvalConfigResponse struct { + value *EvalConfigResponse + isSet bool +} + +func (v NullableEvalConfigResponse) Get() *EvalConfigResponse { + return v.value +} + +func (v *NullableEvalConfigResponse) Set(val *EvalConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalConfigResponse(val *EvalConfigResponse) *NullableEvalConfigResponse { + return &NullableEvalConfigResponse{value: val, isSet: true} +} + +func (v NullableEvalConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_config_structure.go b/go/futureagi/model_eval_config_structure.go new file mode 100644 index 0000000..5516742 --- /dev/null +++ b/go/futureagi/model_eval_config_structure.go @@ -0,0 +1,955 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalConfigStructure type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalConfigStructure{} + +// EvalConfigStructure struct for EvalConfigStructure +type EvalConfigStructure struct { + Id *string `json:"id,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + Name *string `json:"name,omitempty"` + ReasonColumn *bool `json:"reason_column,omitempty"` + EvalTags map[string]interface{} `json:"eval_tags,omitempty"` + Description *string `json:"description,omitempty"` + RequiredKeys []string `json:"required_keys"` + OptionalKeys []string `json:"optional_keys"` + VariableKeys []string `json:"variable_keys"` + RunPromptColumn *bool `json:"run_prompt_column,omitempty"` + TemplateName *string `json:"template_name,omitempty"` + Mapping *map[string]string `json:"mapping,omitempty"` + Config *map[string]string `json:"config,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` + FunctionParamsSchema map[string]interface{} `json:"function_params_schema,omitempty"` + Models map[string]interface{} `json:"models,omitempty"` + SelectedModel NullableString `json:"selected_model,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + KbId NullableString `json:"kb_id,omitempty"` + Output map[string]interface{} `json:"output,omitempty"` + ConfigParamsDesc *map[string]string `json:"config_params_desc,omitempty"` + ConfigParamsOption *map[string]string `json:"config_params_option,omitempty"` + ApiKeyAvailable *bool `json:"api_key_available,omitempty"` +} + +type _EvalConfigStructure EvalConfigStructure + +// NewEvalConfigStructure instantiates a new EvalConfigStructure object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalConfigStructure(requiredKeys []string, optionalKeys []string, variableKeys []string) *EvalConfigStructure { + this := EvalConfigStructure{} + this.RequiredKeys = requiredKeys + this.OptionalKeys = optionalKeys + this.VariableKeys = variableKeys + return &this +} + +// NewEvalConfigStructureWithDefaults instantiates a new EvalConfigStructure object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalConfigStructureWithDefaults() *EvalConfigStructure { + this := EvalConfigStructure{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EvalConfigStructure) SetId(v string) { + o.Id = &v +} + +// GetTemplateId returns the TemplateId field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId) { + var ret string + return ret + } + return *o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.TemplateId) { + return nil, false + } + return o.TemplateId, true +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasTemplateId() bool { + if o != nil && !IsNil(o.TemplateId) { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given string and assigns it to the TemplateId field. +func (o *EvalConfigStructure) SetTemplateId(v string) { + o.TemplateId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EvalConfigStructure) SetName(v string) { + o.Name = &v +} + +// GetReasonColumn returns the ReasonColumn field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetReasonColumn() bool { + if o == nil || IsNil(o.ReasonColumn) { + var ret bool + return ret + } + return *o.ReasonColumn +} + +// GetReasonColumnOk returns a tuple with the ReasonColumn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetReasonColumnOk() (*bool, bool) { + if o == nil || IsNil(o.ReasonColumn) { + return nil, false + } + return o.ReasonColumn, true +} + +// HasReasonColumn returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasReasonColumn() bool { + if o != nil && !IsNil(o.ReasonColumn) { + return true + } + + return false +} + +// SetReasonColumn gets a reference to the given bool and assigns it to the ReasonColumn field. +func (o *EvalConfigStructure) SetReasonColumn(v bool) { + o.ReasonColumn = &v +} + +// GetEvalTags returns the EvalTags field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetEvalTags() map[string]interface{} { + if o == nil || IsNil(o.EvalTags) { + var ret map[string]interface{} + return ret + } + return o.EvalTags +} + +// GetEvalTagsOk returns a tuple with the EvalTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetEvalTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalTags) { + return map[string]interface{}{}, false + } + return o.EvalTags, true +} + +// HasEvalTags returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasEvalTags() bool { + if o != nil && !IsNil(o.EvalTags) { + return true + } + + return false +} + +// SetEvalTags gets a reference to the given map[string]interface{} and assigns it to the EvalTags field. +func (o *EvalConfigStructure) SetEvalTags(v map[string]interface{}) { + o.EvalTags = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *EvalConfigStructure) SetDescription(v string) { + o.Description = &v +} + +// GetRequiredKeys returns the RequiredKeys field value +func (o *EvalConfigStructure) GetRequiredKeys() []string { + if o == nil { + var ret []string + return ret + } + + return o.RequiredKeys +} + +// GetRequiredKeysOk returns a tuple with the RequiredKeys field value +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetRequiredKeysOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.RequiredKeys, true +} + +// SetRequiredKeys sets field value +func (o *EvalConfigStructure) SetRequiredKeys(v []string) { + o.RequiredKeys = v +} + +// GetOptionalKeys returns the OptionalKeys field value +func (o *EvalConfigStructure) GetOptionalKeys() []string { + if o == nil { + var ret []string + return ret + } + + return o.OptionalKeys +} + +// GetOptionalKeysOk returns a tuple with the OptionalKeys field value +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetOptionalKeysOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.OptionalKeys, true +} + +// SetOptionalKeys sets field value +func (o *EvalConfigStructure) SetOptionalKeys(v []string) { + o.OptionalKeys = v +} + +// GetVariableKeys returns the VariableKeys field value +func (o *EvalConfigStructure) GetVariableKeys() []string { + if o == nil { + var ret []string + return ret + } + + return o.VariableKeys +} + +// GetVariableKeysOk returns a tuple with the VariableKeys field value +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetVariableKeysOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.VariableKeys, true +} + +// SetVariableKeys sets field value +func (o *EvalConfigStructure) SetVariableKeys(v []string) { + o.VariableKeys = v +} + +// GetRunPromptColumn returns the RunPromptColumn field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetRunPromptColumn() bool { + if o == nil || IsNil(o.RunPromptColumn) { + var ret bool + return ret + } + return *o.RunPromptColumn +} + +// GetRunPromptColumnOk returns a tuple with the RunPromptColumn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetRunPromptColumnOk() (*bool, bool) { + if o == nil || IsNil(o.RunPromptColumn) { + return nil, false + } + return o.RunPromptColumn, true +} + +// HasRunPromptColumn returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasRunPromptColumn() bool { + if o != nil && !IsNil(o.RunPromptColumn) { + return true + } + + return false +} + +// SetRunPromptColumn gets a reference to the given bool and assigns it to the RunPromptColumn field. +func (o *EvalConfigStructure) SetRunPromptColumn(v bool) { + o.RunPromptColumn = &v +} + +// GetTemplateName returns the TemplateName field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetTemplateName() string { + if o == nil || IsNil(o.TemplateName) { + var ret string + return ret + } + return *o.TemplateName +} + +// GetTemplateNameOk returns a tuple with the TemplateName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetTemplateNameOk() (*string, bool) { + if o == nil || IsNil(o.TemplateName) { + return nil, false + } + return o.TemplateName, true +} + +// HasTemplateName returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasTemplateName() bool { + if o != nil && !IsNil(o.TemplateName) { + return true + } + + return false +} + +// SetTemplateName gets a reference to the given string and assigns it to the TemplateName field. +func (o *EvalConfigStructure) SetTemplateName(v string) { + o.TemplateName = &v +} + +// GetMapping returns the Mapping field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetMapping() map[string]string { + if o == nil || IsNil(o.Mapping) { + var ret map[string]string + return ret + } + return *o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetMappingOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Mapping) { + return nil, false + } + return o.Mapping, true +} + +// HasMapping returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasMapping() bool { + if o != nil && !IsNil(o.Mapping) { + return true + } + + return false +} + +// SetMapping gets a reference to the given map[string]string and assigns it to the Mapping field. +func (o *EvalConfigStructure) SetMapping(v map[string]string) { + o.Mapping = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetConfig() map[string]string { + if o == nil || IsNil(o.Config) { + var ret map[string]string + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetConfigOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]string and assigns it to the Config field. +func (o *EvalConfigStructure) SetConfig(v map[string]string) { + o.Config = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetParams() map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetParamsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *EvalConfigStructure) SetParams(v map[string]interface{}) { + o.Params = v +} + +// GetFunctionParamsSchema returns the FunctionParamsSchema field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetFunctionParamsSchema() map[string]interface{} { + if o == nil || IsNil(o.FunctionParamsSchema) { + var ret map[string]interface{} + return ret + } + return o.FunctionParamsSchema +} + +// GetFunctionParamsSchemaOk returns a tuple with the FunctionParamsSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetFunctionParamsSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.FunctionParamsSchema) { + return map[string]interface{}{}, false + } + return o.FunctionParamsSchema, true +} + +// HasFunctionParamsSchema returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasFunctionParamsSchema() bool { + if o != nil && !IsNil(o.FunctionParamsSchema) { + return true + } + + return false +} + +// SetFunctionParamsSchema gets a reference to the given map[string]interface{} and assigns it to the FunctionParamsSchema field. +func (o *EvalConfigStructure) SetFunctionParamsSchema(v map[string]interface{}) { + o.FunctionParamsSchema = v +} + +// GetModels returns the Models field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetModels() map[string]interface{} { + if o == nil || IsNil(o.Models) { + var ret map[string]interface{} + return ret + } + return o.Models +} + +// GetModelsOk returns a tuple with the Models field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetModelsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Models) { + return map[string]interface{}{}, false + } + return o.Models, true +} + +// HasModels returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasModels() bool { + if o != nil && !IsNil(o.Models) { + return true + } + + return false +} + +// SetModels gets a reference to the given map[string]interface{} and assigns it to the Models field. +func (o *EvalConfigStructure) SetModels(v map[string]interface{}) { + o.Models = v +} + +// GetSelectedModel returns the SelectedModel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigStructure) GetSelectedModel() string { + if o == nil || IsNil(o.SelectedModel.Get()) { + var ret string + return ret + } + return *o.SelectedModel.Get() +} + +// GetSelectedModelOk returns a tuple with the SelectedModel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigStructure) GetSelectedModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SelectedModel.Get(), o.SelectedModel.IsSet() +} + +// HasSelectedModel returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasSelectedModel() bool { + if o != nil && o.SelectedModel.IsSet() { + return true + } + + return false +} + +// SetSelectedModel gets a reference to the given NullableString and assigns it to the SelectedModel field. +func (o *EvalConfigStructure) SetSelectedModel(v string) { + o.SelectedModel.Set(&v) +} + +// SetSelectedModelNil sets the value for SelectedModel to be an explicit nil +func (o *EvalConfigStructure) SetSelectedModelNil() { + o.SelectedModel.Set(nil) +} + +// UnsetSelectedModel ensures that no value is present for SelectedModel, not even an explicit nil +func (o *EvalConfigStructure) UnsetSelectedModel() { + o.SelectedModel.Unset() +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *EvalConfigStructure) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetKbId returns the KbId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigStructure) GetKbId() string { + if o == nil || IsNil(o.KbId.Get()) { + var ret string + return ret + } + return *o.KbId.Get() +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigStructure) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KbId.Get(), o.KbId.IsSet() +} + +// HasKbId returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasKbId() bool { + if o != nil && o.KbId.IsSet() { + return true + } + + return false +} + +// SetKbId gets a reference to the given NullableString and assigns it to the KbId field. +func (o *EvalConfigStructure) SetKbId(v string) { + o.KbId.Set(&v) +} + +// SetKbIdNil sets the value for KbId to be an explicit nil +func (o *EvalConfigStructure) SetKbIdNil() { + o.KbId.Set(nil) +} + +// UnsetKbId ensures that no value is present for KbId, not even an explicit nil +func (o *EvalConfigStructure) UnsetKbId() { + o.KbId.Unset() +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetOutput() map[string]interface{} { + if o == nil || IsNil(o.Output) { + var ret map[string]interface{} + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetOutputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Output) { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given map[string]interface{} and assigns it to the Output field. +func (o *EvalConfigStructure) SetOutput(v map[string]interface{}) { + o.Output = v +} + +// GetConfigParamsDesc returns the ConfigParamsDesc field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetConfigParamsDesc() map[string]string { + if o == nil || IsNil(o.ConfigParamsDesc) { + var ret map[string]string + return ret + } + return *o.ConfigParamsDesc +} + +// GetConfigParamsDescOk returns a tuple with the ConfigParamsDesc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetConfigParamsDescOk() (*map[string]string, bool) { + if o == nil || IsNil(o.ConfigParamsDesc) { + return nil, false + } + return o.ConfigParamsDesc, true +} + +// HasConfigParamsDesc returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasConfigParamsDesc() bool { + if o != nil && !IsNil(o.ConfigParamsDesc) { + return true + } + + return false +} + +// SetConfigParamsDesc gets a reference to the given map[string]string and assigns it to the ConfigParamsDesc field. +func (o *EvalConfigStructure) SetConfigParamsDesc(v map[string]string) { + o.ConfigParamsDesc = &v +} + +// GetConfigParamsOption returns the ConfigParamsOption field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetConfigParamsOption() map[string]string { + if o == nil || IsNil(o.ConfigParamsOption) { + var ret map[string]string + return ret + } + return *o.ConfigParamsOption +} + +// GetConfigParamsOptionOk returns a tuple with the ConfigParamsOption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetConfigParamsOptionOk() (*map[string]string, bool) { + if o == nil || IsNil(o.ConfigParamsOption) { + return nil, false + } + return o.ConfigParamsOption, true +} + +// HasConfigParamsOption returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasConfigParamsOption() bool { + if o != nil && !IsNil(o.ConfigParamsOption) { + return true + } + + return false +} + +// SetConfigParamsOption gets a reference to the given map[string]string and assigns it to the ConfigParamsOption field. +func (o *EvalConfigStructure) SetConfigParamsOption(v map[string]string) { + o.ConfigParamsOption = &v +} + +// GetApiKeyAvailable returns the ApiKeyAvailable field value if set, zero value otherwise. +func (o *EvalConfigStructure) GetApiKeyAvailable() bool { + if o == nil || IsNil(o.ApiKeyAvailable) { + var ret bool + return ret + } + return *o.ApiKeyAvailable +} + +// GetApiKeyAvailableOk returns a tuple with the ApiKeyAvailable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructure) GetApiKeyAvailableOk() (*bool, bool) { + if o == nil || IsNil(o.ApiKeyAvailable) { + return nil, false + } + return o.ApiKeyAvailable, true +} + +// HasApiKeyAvailable returns a boolean if a field has been set. +func (o *EvalConfigStructure) HasApiKeyAvailable() bool { + if o != nil && !IsNil(o.ApiKeyAvailable) { + return true + } + + return false +} + +// SetApiKeyAvailable gets a reference to the given bool and assigns it to the ApiKeyAvailable field. +func (o *EvalConfigStructure) SetApiKeyAvailable(v bool) { + o.ApiKeyAvailable = &v +} + +func (o EvalConfigStructure) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalConfigStructure) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.TemplateId) { + toSerialize["template_id"] = o.TemplateId + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ReasonColumn) { + toSerialize["reason_column"] = o.ReasonColumn + } + if !IsNil(o.EvalTags) { + toSerialize["eval_tags"] = o.EvalTags + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["required_keys"] = o.RequiredKeys + toSerialize["optional_keys"] = o.OptionalKeys + toSerialize["variable_keys"] = o.VariableKeys + if !IsNil(o.RunPromptColumn) { + toSerialize["run_prompt_column"] = o.RunPromptColumn + } + if !IsNil(o.TemplateName) { + toSerialize["template_name"] = o.TemplateName + } + if !IsNil(o.Mapping) { + toSerialize["mapping"] = o.Mapping + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.FunctionParamsSchema) { + toSerialize["function_params_schema"] = o.FunctionParamsSchema + } + if !IsNil(o.Models) { + toSerialize["models"] = o.Models + } + if o.SelectedModel.IsSet() { + toSerialize["selected_model"] = o.SelectedModel.Get() + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if o.KbId.IsSet() { + toSerialize["kb_id"] = o.KbId.Get() + } + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + if !IsNil(o.ConfigParamsDesc) { + toSerialize["config_params_desc"] = o.ConfigParamsDesc + } + if !IsNil(o.ConfigParamsOption) { + toSerialize["config_params_option"] = o.ConfigParamsOption + } + if !IsNil(o.ApiKeyAvailable) { + toSerialize["api_key_available"] = o.ApiKeyAvailable + } + return toSerialize, nil +} + +func (o *EvalConfigStructure) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "required_keys", + "optional_keys", + "variable_keys", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalConfigStructure := _EvalConfigStructure{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalConfigStructure) + + if err != nil { + return err + } + + *o = EvalConfigStructure(varEvalConfigStructure) + + return err +} + +type NullableEvalConfigStructure struct { + value *EvalConfigStructure + isSet bool +} + +func (v NullableEvalConfigStructure) Get() *EvalConfigStructure { + return v.value +} + +func (v *NullableEvalConfigStructure) Set(val *EvalConfigStructure) { + v.value = val + v.isSet = true +} + +func (v NullableEvalConfigStructure) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalConfigStructure) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalConfigStructure(val *EvalConfigStructure) *NullableEvalConfigStructure { + return &NullableEvalConfigStructure{value: val, isSet: true} +} + +func (v NullableEvalConfigStructure) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalConfigStructure) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_config_structure_response.go b/go/futureagi/model_eval_config_structure_response.go new file mode 100644 index 0000000..ce42d06 --- /dev/null +++ b/go/futureagi/model_eval_config_structure_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalConfigStructureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalConfigStructureResponse{} + +// EvalConfigStructureResponse struct for EvalConfigStructureResponse +type EvalConfigStructureResponse struct { + Status *bool `json:"status,omitempty"` + Result EvalConfigStructureResult `json:"result"` +} + +type _EvalConfigStructureResponse EvalConfigStructureResponse + +// NewEvalConfigStructureResponse instantiates a new EvalConfigStructureResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalConfigStructureResponse(result EvalConfigStructureResult) *EvalConfigStructureResponse { + this := EvalConfigStructureResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewEvalConfigStructureResponseWithDefaults instantiates a new EvalConfigStructureResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalConfigStructureResponseWithDefaults() *EvalConfigStructureResponse { + this := EvalConfigStructureResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EvalConfigStructureResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigStructureResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EvalConfigStructureResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *EvalConfigStructureResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *EvalConfigStructureResponse) GetResult() EvalConfigStructureResult { + if o == nil { + var ret EvalConfigStructureResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalConfigStructureResponse) GetResultOk() (*EvalConfigStructureResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalConfigStructureResponse) SetResult(v EvalConfigStructureResult) { + o.Result = v +} + +func (o EvalConfigStructureResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalConfigStructureResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalConfigStructureResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalConfigStructureResponse := _EvalConfigStructureResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalConfigStructureResponse) + + if err != nil { + return err + } + + *o = EvalConfigStructureResponse(varEvalConfigStructureResponse) + + return err +} + +type NullableEvalConfigStructureResponse struct { + value *EvalConfigStructureResponse + isSet bool +} + +func (v NullableEvalConfigStructureResponse) Get() *EvalConfigStructureResponse { + return v.value +} + +func (v *NullableEvalConfigStructureResponse) Set(val *EvalConfigStructureResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalConfigStructureResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalConfigStructureResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalConfigStructureResponse(val *EvalConfigStructureResponse) *NullableEvalConfigStructureResponse { + return &NullableEvalConfigStructureResponse{value: val, isSet: true} +} + +func (v NullableEvalConfigStructureResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalConfigStructureResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_config_structure_result.go b/go/futureagi/model_eval_config_structure_result.go new file mode 100644 index 0000000..5c826b3 --- /dev/null +++ b/go/futureagi/model_eval_config_structure_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalConfigStructureResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalConfigStructureResult{} + +// EvalConfigStructureResult struct for EvalConfigStructureResult +type EvalConfigStructureResult struct { + Eval EvalConfigStructure `json:"eval"` +} + +type _EvalConfigStructureResult EvalConfigStructureResult + +// NewEvalConfigStructureResult instantiates a new EvalConfigStructureResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalConfigStructureResult(eval EvalConfigStructure) *EvalConfigStructureResult { + this := EvalConfigStructureResult{} + this.Eval = eval + return &this +} + +// NewEvalConfigStructureResultWithDefaults instantiates a new EvalConfigStructureResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalConfigStructureResultWithDefaults() *EvalConfigStructureResult { + this := EvalConfigStructureResult{} + return &this +} + +// GetEval returns the Eval field value +func (o *EvalConfigStructureResult) GetEval() EvalConfigStructure { + if o == nil { + var ret EvalConfigStructure + return ret + } + + return o.Eval +} + +// GetEvalOk returns a tuple with the Eval field value +// and a boolean to check if the value has been set. +func (o *EvalConfigStructureResult) GetEvalOk() (*EvalConfigStructure, bool) { + if o == nil { + return nil, false + } + return &o.Eval, true +} + +// SetEval sets field value +func (o *EvalConfigStructureResult) SetEval(v EvalConfigStructure) { + o.Eval = v +} + +func (o EvalConfigStructureResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalConfigStructureResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval"] = o.Eval + return toSerialize, nil +} + +func (o *EvalConfigStructureResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalConfigStructureResult := _EvalConfigStructureResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalConfigStructureResult) + + if err != nil { + return err + } + + *o = EvalConfigStructureResult(varEvalConfigStructureResult) + + return err +} + +type NullableEvalConfigStructureResult struct { + value *EvalConfigStructureResult + isSet bool +} + +func (v NullableEvalConfigStructureResult) Get() *EvalConfigStructureResult { + return v.value +} + +func (v *NullableEvalConfigStructureResult) Set(val *EvalConfigStructureResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalConfigStructureResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalConfigStructureResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalConfigStructureResult(val *EvalConfigStructureResult) *NullableEvalConfigStructureResult { + return &NullableEvalConfigStructureResult{value: val, isSet: true} +} + +func (v NullableEvalConfigStructureResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalConfigStructureResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_config_update_request.go b/go/futureagi/model_eval_config_update_request.go new file mode 100644 index 0000000..5809cc2 --- /dev/null +++ b/go/futureagi/model_eval_config_update_request.go @@ -0,0 +1,422 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalConfigUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalConfigUpdateRequest{} + +// EvalConfigUpdateRequest struct for EvalConfigUpdateRequest +type EvalConfigUpdateRequest struct { + // Updated evaluation configuration parameters. + Config map[string]interface{} `json:"config,omitempty"` + // Updated field mapping between test data and evaluation inputs. + Mapping map[string]interface{} `json:"mapping,omitempty"` + // Model to use for evaluations. + Model NullableString `json:"model,omitempty"` + // Enable granular error localization in evaluation results. + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + // UUID of a knowledge base to use for grounding. Pass null to clear. + KbId NullableString `json:"kb_id,omitempty"` + // Updated name for the evaluation configuration. + Name *string `json:"name,omitempty"` + // When true, triggers an immediate rerun after updating. Defaults to false. + Run *bool `json:"run,omitempty"` + // UUID of the test execution to rerun against. Required when run is true. + TestExecutionId NullableString `json:"test_execution_id,omitempty"` +} + +// NewEvalConfigUpdateRequest instantiates a new EvalConfigUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalConfigUpdateRequest() *EvalConfigUpdateRequest { + this := EvalConfigUpdateRequest{} + var run bool = false + this.Run = &run + return &this +} + +// NewEvalConfigUpdateRequestWithDefaults instantiates a new EvalConfigUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalConfigUpdateRequestWithDefaults() *EvalConfigUpdateRequest { + this := EvalConfigUpdateRequest{} + var run bool = false + this.Run = &run + return &this +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *EvalConfigUpdateRequest) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *EvalConfigUpdateRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetMapping returns the Mapping field value if set, zero value otherwise. +func (o *EvalConfigUpdateRequest) GetMapping() map[string]interface{} { + if o == nil || IsNil(o.Mapping) { + var ret map[string]interface{} + return ret + } + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateRequest) GetMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Mapping) { + return map[string]interface{}{}, false + } + return o.Mapping, true +} + +// HasMapping returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasMapping() bool { + if o != nil && !IsNil(o.Mapping) { + return true + } + + return false +} + +// SetMapping gets a reference to the given map[string]interface{} and assigns it to the Mapping field. +func (o *EvalConfigUpdateRequest) SetMapping(v map[string]interface{}) { + o.Mapping = v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigUpdateRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigUpdateRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *EvalConfigUpdateRequest) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *EvalConfigUpdateRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *EvalConfigUpdateRequest) UnsetModel() { + o.Model.Unset() +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *EvalConfigUpdateRequest) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateRequest) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *EvalConfigUpdateRequest) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetKbId returns the KbId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigUpdateRequest) GetKbId() string { + if o == nil || IsNil(o.KbId.Get()) { + var ret string + return ret + } + return *o.KbId.Get() +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigUpdateRequest) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KbId.Get(), o.KbId.IsSet() +} + +// HasKbId returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasKbId() bool { + if o != nil && o.KbId.IsSet() { + return true + } + + return false +} + +// SetKbId gets a reference to the given NullableString and assigns it to the KbId field. +func (o *EvalConfigUpdateRequest) SetKbId(v string) { + o.KbId.Set(&v) +} + +// SetKbIdNil sets the value for KbId to be an explicit nil +func (o *EvalConfigUpdateRequest) SetKbIdNil() { + o.KbId.Set(nil) +} + +// UnsetKbId ensures that no value is present for KbId, not even an explicit nil +func (o *EvalConfigUpdateRequest) UnsetKbId() { + o.KbId.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EvalConfigUpdateRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EvalConfigUpdateRequest) SetName(v string) { + o.Name = &v +} + +// GetRun returns the Run field value if set, zero value otherwise. +func (o *EvalConfigUpdateRequest) GetRun() bool { + if o == nil || IsNil(o.Run) { + var ret bool + return ret + } + return *o.Run +} + +// GetRunOk returns a tuple with the Run field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateRequest) GetRunOk() (*bool, bool) { + if o == nil || IsNil(o.Run) { + return nil, false + } + return o.Run, true +} + +// HasRun returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasRun() bool { + if o != nil && !IsNil(o.Run) { + return true + } + + return false +} + +// SetRun gets a reference to the given bool and assigns it to the Run field. +func (o *EvalConfigUpdateRequest) SetRun(v bool) { + o.Run = &v +} + +// GetTestExecutionId returns the TestExecutionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigUpdateRequest) GetTestExecutionId() string { + if o == nil || IsNil(o.TestExecutionId.Get()) { + var ret string + return ret + } + return *o.TestExecutionId.Get() +} + +// GetTestExecutionIdOk returns a tuple with the TestExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigUpdateRequest) GetTestExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TestExecutionId.Get(), o.TestExecutionId.IsSet() +} + +// HasTestExecutionId returns a boolean if a field has been set. +func (o *EvalConfigUpdateRequest) HasTestExecutionId() bool { + if o != nil && o.TestExecutionId.IsSet() { + return true + } + + return false +} + +// SetTestExecutionId gets a reference to the given NullableString and assigns it to the TestExecutionId field. +func (o *EvalConfigUpdateRequest) SetTestExecutionId(v string) { + o.TestExecutionId.Set(&v) +} + +// SetTestExecutionIdNil sets the value for TestExecutionId to be an explicit nil +func (o *EvalConfigUpdateRequest) SetTestExecutionIdNil() { + o.TestExecutionId.Set(nil) +} + +// UnsetTestExecutionId ensures that no value is present for TestExecutionId, not even an explicit nil +func (o *EvalConfigUpdateRequest) UnsetTestExecutionId() { + o.TestExecutionId.Unset() +} + +func (o EvalConfigUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalConfigUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Mapping) { + toSerialize["mapping"] = o.Mapping + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if o.KbId.IsSet() { + toSerialize["kb_id"] = o.KbId.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Run) { + toSerialize["run"] = o.Run + } + if o.TestExecutionId.IsSet() { + toSerialize["test_execution_id"] = o.TestExecutionId.Get() + } + return toSerialize, nil +} + +type NullableEvalConfigUpdateRequest struct { + value *EvalConfigUpdateRequest + isSet bool +} + +func (v NullableEvalConfigUpdateRequest) Get() *EvalConfigUpdateRequest { + return v.value +} + +func (v *NullableEvalConfigUpdateRequest) Set(val *EvalConfigUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEvalConfigUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalConfigUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalConfigUpdateRequest(val *EvalConfigUpdateRequest) *NullableEvalConfigUpdateRequest { + return &NullableEvalConfigUpdateRequest{value: val, isSet: true} +} + +func (v NullableEvalConfigUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalConfigUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_config_update_response.go b/go/futureagi/model_eval_config_update_response.go new file mode 100644 index 0000000..6b549c2 --- /dev/null +++ b/go/futureagi/model_eval_config_update_response.go @@ -0,0 +1,354 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalConfigUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalConfigUpdateResponse{} + +// EvalConfigUpdateResponse struct for EvalConfigUpdateResponse +type EvalConfigUpdateResponse struct { + Message string `json:"message"` + EvalConfigId string `json:"eval_config_id"` + RunTestId string `json:"run_test_id"` + TestExecutionId NullableString `json:"test_execution_id,omitempty"` + CallExecutionCount NullableInt32 `json:"call_execution_count,omitempty"` + Note NullableString `json:"note,omitempty"` +} + +type _EvalConfigUpdateResponse EvalConfigUpdateResponse + +// NewEvalConfigUpdateResponse instantiates a new EvalConfigUpdateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalConfigUpdateResponse(message string, evalConfigId string, runTestId string) *EvalConfigUpdateResponse { + this := EvalConfigUpdateResponse{} + this.Message = message + this.EvalConfigId = evalConfigId + this.RunTestId = runTestId + return &this +} + +// NewEvalConfigUpdateResponseWithDefaults instantiates a new EvalConfigUpdateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalConfigUpdateResponseWithDefaults() *EvalConfigUpdateResponse { + this := EvalConfigUpdateResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *EvalConfigUpdateResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *EvalConfigUpdateResponse) SetMessage(v string) { + o.Message = v +} + +// GetEvalConfigId returns the EvalConfigId field value +func (o *EvalConfigUpdateResponse) GetEvalConfigId() string { + if o == nil { + var ret string + return ret + } + + return o.EvalConfigId +} + +// GetEvalConfigIdOk returns a tuple with the EvalConfigId field value +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateResponse) GetEvalConfigIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalConfigId, true +} + +// SetEvalConfigId sets field value +func (o *EvalConfigUpdateResponse) SetEvalConfigId(v string) { + o.EvalConfigId = v +} + +// GetRunTestId returns the RunTestId field value +func (o *EvalConfigUpdateResponse) GetRunTestId() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value +// and a boolean to check if the value has been set. +func (o *EvalConfigUpdateResponse) GetRunTestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestId, true +} + +// SetRunTestId sets field value +func (o *EvalConfigUpdateResponse) SetRunTestId(v string) { + o.RunTestId = v +} + +// GetTestExecutionId returns the TestExecutionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigUpdateResponse) GetTestExecutionId() string { + if o == nil || IsNil(o.TestExecutionId.Get()) { + var ret string + return ret + } + return *o.TestExecutionId.Get() +} + +// GetTestExecutionIdOk returns a tuple with the TestExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigUpdateResponse) GetTestExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TestExecutionId.Get(), o.TestExecutionId.IsSet() +} + +// HasTestExecutionId returns a boolean if a field has been set. +func (o *EvalConfigUpdateResponse) HasTestExecutionId() bool { + if o != nil && o.TestExecutionId.IsSet() { + return true + } + + return false +} + +// SetTestExecutionId gets a reference to the given NullableString and assigns it to the TestExecutionId field. +func (o *EvalConfigUpdateResponse) SetTestExecutionId(v string) { + o.TestExecutionId.Set(&v) +} + +// SetTestExecutionIdNil sets the value for TestExecutionId to be an explicit nil +func (o *EvalConfigUpdateResponse) SetTestExecutionIdNil() { + o.TestExecutionId.Set(nil) +} + +// UnsetTestExecutionId ensures that no value is present for TestExecutionId, not even an explicit nil +func (o *EvalConfigUpdateResponse) UnsetTestExecutionId() { + o.TestExecutionId.Unset() +} + +// GetCallExecutionCount returns the CallExecutionCount field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigUpdateResponse) GetCallExecutionCount() int32 { + if o == nil || IsNil(o.CallExecutionCount.Get()) { + var ret int32 + return ret + } + return *o.CallExecutionCount.Get() +} + +// GetCallExecutionCountOk returns a tuple with the CallExecutionCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigUpdateResponse) GetCallExecutionCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.CallExecutionCount.Get(), o.CallExecutionCount.IsSet() +} + +// HasCallExecutionCount returns a boolean if a field has been set. +func (o *EvalConfigUpdateResponse) HasCallExecutionCount() bool { + if o != nil && o.CallExecutionCount.IsSet() { + return true + } + + return false +} + +// SetCallExecutionCount gets a reference to the given NullableInt32 and assigns it to the CallExecutionCount field. +func (o *EvalConfigUpdateResponse) SetCallExecutionCount(v int32) { + o.CallExecutionCount.Set(&v) +} + +// SetCallExecutionCountNil sets the value for CallExecutionCount to be an explicit nil +func (o *EvalConfigUpdateResponse) SetCallExecutionCountNil() { + o.CallExecutionCount.Set(nil) +} + +// UnsetCallExecutionCount ensures that no value is present for CallExecutionCount, not even an explicit nil +func (o *EvalConfigUpdateResponse) UnsetCallExecutionCount() { + o.CallExecutionCount.Unset() +} + +// GetNote returns the Note field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalConfigUpdateResponse) GetNote() string { + if o == nil || IsNil(o.Note.Get()) { + var ret string + return ret + } + return *o.Note.Get() +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalConfigUpdateResponse) GetNoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Note.Get(), o.Note.IsSet() +} + +// HasNote returns a boolean if a field has been set. +func (o *EvalConfigUpdateResponse) HasNote() bool { + if o != nil && o.Note.IsSet() { + return true + } + + return false +} + +// SetNote gets a reference to the given NullableString and assigns it to the Note field. +func (o *EvalConfigUpdateResponse) SetNote(v string) { + o.Note.Set(&v) +} + +// SetNoteNil sets the value for Note to be an explicit nil +func (o *EvalConfigUpdateResponse) SetNoteNil() { + o.Note.Set(nil) +} + +// UnsetNote ensures that no value is present for Note, not even an explicit nil +func (o *EvalConfigUpdateResponse) UnsetNote() { + o.Note.Unset() +} + +func (o EvalConfigUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalConfigUpdateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["eval_config_id"] = o.EvalConfigId + toSerialize["run_test_id"] = o.RunTestId + if o.TestExecutionId.IsSet() { + toSerialize["test_execution_id"] = o.TestExecutionId.Get() + } + if o.CallExecutionCount.IsSet() { + toSerialize["call_execution_count"] = o.CallExecutionCount.Get() + } + if o.Note.IsSet() { + toSerialize["note"] = o.Note.Get() + } + return toSerialize, nil +} + +func (o *EvalConfigUpdateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "eval_config_id", + "run_test_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalConfigUpdateResponse := _EvalConfigUpdateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalConfigUpdateResponse) + + if err != nil { + return err + } + + *o = EvalConfigUpdateResponse(varEvalConfigUpdateResponse) + + return err +} + +type NullableEvalConfigUpdateResponse struct { + value *EvalConfigUpdateResponse + isSet bool +} + +func (v NullableEvalConfigUpdateResponse) Get() *EvalConfigUpdateResponse { + return v.value +} + +func (v *NullableEvalConfigUpdateResponse) Set(val *EvalConfigUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalConfigUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalConfigUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalConfigUpdateResponse(val *EvalConfigUpdateResponse) *NullableEvalConfigUpdateResponse { + return &NullableEvalConfigUpdateResponse{value: val, isSet: true} +} + +func (v NullableEvalConfigUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalConfigUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_error_response.go b/go/futureagi/model_eval_error_response.go new file mode 100644 index 0000000..463065a --- /dev/null +++ b/go/futureagi/model_eval_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalErrorResponse{} + +// EvalErrorResponse struct for EvalErrorResponse +type EvalErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewEvalErrorResponse instantiates a new EvalErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalErrorResponse() *EvalErrorResponse { + this := EvalErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewEvalErrorResponseWithDefaults instantiates a new EvalErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalErrorResponseWithDefaults() *EvalErrorResponse { + this := EvalErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EvalErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *EvalErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *EvalErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *EvalErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *EvalErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *EvalErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *EvalErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *EvalErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *EvalErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *EvalErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *EvalErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *EvalErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *EvalErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *EvalErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *EvalErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *EvalErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *EvalErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *EvalErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *EvalErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *EvalErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *EvalErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *EvalErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *EvalErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *EvalErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *EvalErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *EvalErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o EvalErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableEvalErrorResponse struct { + value *EvalErrorResponse + isSet bool +} + +func (v NullableEvalErrorResponse) Get() *EvalErrorResponse { + return v.value +} + +func (v *NullableEvalErrorResponse) Set(val *EvalErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalErrorResponse(val *EvalErrorResponse) *NullableEvalErrorResponse { + return &NullableEvalErrorResponse{value: val, isSet: true} +} + +func (v NullableEvalErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_explanation_cluster.go b/go/futureagi/model_eval_explanation_cluster.go new file mode 100644 index 0000000..7e0bde3 --- /dev/null +++ b/go/futureagi/model_eval_explanation_cluster.go @@ -0,0 +1,377 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalExplanationCluster type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalExplanationCluster{} + +// EvalExplanationCluster struct for EvalExplanationCluster +type EvalExplanationCluster struct { + Kind *string `json:"kind,omitempty"` + Confidence *string `json:"confidence,omitempty"` + Theme *string `json:"theme,omitempty"` + Guidance *string `json:"guidance,omitempty"` + EvidenceSummary *string `json:"evidenceSummary,omitempty"` + EvalConfigId *string `json:"eval_config_id,omitempty"` + EvalTemplateId *string `json:"eval_template_id,omitempty"` + EvalName *string `json:"eval_name,omitempty"` +} + +// NewEvalExplanationCluster instantiates a new EvalExplanationCluster object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalExplanationCluster() *EvalExplanationCluster { + this := EvalExplanationCluster{} + return &this +} + +// NewEvalExplanationClusterWithDefaults instantiates a new EvalExplanationCluster object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalExplanationClusterWithDefaults() *EvalExplanationCluster { + this := EvalExplanationCluster{} + return &this +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetKind() string { + if o == nil || IsNil(o.Kind) { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetKindOk() (*string, bool) { + if o == nil || IsNil(o.Kind) { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasKind() bool { + if o != nil && !IsNil(o.Kind) { + return true + } + + return false +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *EvalExplanationCluster) SetKind(v string) { + o.Kind = &v +} + +// GetConfidence returns the Confidence field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetConfidence() string { + if o == nil || IsNil(o.Confidence) { + var ret string + return ret + } + return *o.Confidence +} + +// GetConfidenceOk returns a tuple with the Confidence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetConfidenceOk() (*string, bool) { + if o == nil || IsNil(o.Confidence) { + return nil, false + } + return o.Confidence, true +} + +// HasConfidence returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasConfidence() bool { + if o != nil && !IsNil(o.Confidence) { + return true + } + + return false +} + +// SetConfidence gets a reference to the given string and assigns it to the Confidence field. +func (o *EvalExplanationCluster) SetConfidence(v string) { + o.Confidence = &v +} + +// GetTheme returns the Theme field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetTheme() string { + if o == nil || IsNil(o.Theme) { + var ret string + return ret + } + return *o.Theme +} + +// GetThemeOk returns a tuple with the Theme field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetThemeOk() (*string, bool) { + if o == nil || IsNil(o.Theme) { + return nil, false + } + return o.Theme, true +} + +// HasTheme returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasTheme() bool { + if o != nil && !IsNil(o.Theme) { + return true + } + + return false +} + +// SetTheme gets a reference to the given string and assigns it to the Theme field. +func (o *EvalExplanationCluster) SetTheme(v string) { + o.Theme = &v +} + +// GetGuidance returns the Guidance field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetGuidance() string { + if o == nil || IsNil(o.Guidance) { + var ret string + return ret + } + return *o.Guidance +} + +// GetGuidanceOk returns a tuple with the Guidance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetGuidanceOk() (*string, bool) { + if o == nil || IsNil(o.Guidance) { + return nil, false + } + return o.Guidance, true +} + +// HasGuidance returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasGuidance() bool { + if o != nil && !IsNil(o.Guidance) { + return true + } + + return false +} + +// SetGuidance gets a reference to the given string and assigns it to the Guidance field. +func (o *EvalExplanationCluster) SetGuidance(v string) { + o.Guidance = &v +} + +// GetEvidenceSummary returns the EvidenceSummary field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetEvidenceSummary() string { + if o == nil || IsNil(o.EvidenceSummary) { + var ret string + return ret + } + return *o.EvidenceSummary +} + +// GetEvidenceSummaryOk returns a tuple with the EvidenceSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetEvidenceSummaryOk() (*string, bool) { + if o == nil || IsNil(o.EvidenceSummary) { + return nil, false + } + return o.EvidenceSummary, true +} + +// HasEvidenceSummary returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasEvidenceSummary() bool { + if o != nil && !IsNil(o.EvidenceSummary) { + return true + } + + return false +} + +// SetEvidenceSummary gets a reference to the given string and assigns it to the EvidenceSummary field. +func (o *EvalExplanationCluster) SetEvidenceSummary(v string) { + o.EvidenceSummary = &v +} + +// GetEvalConfigId returns the EvalConfigId field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetEvalConfigId() string { + if o == nil || IsNil(o.EvalConfigId) { + var ret string + return ret + } + return *o.EvalConfigId +} + +// GetEvalConfigIdOk returns a tuple with the EvalConfigId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetEvalConfigIdOk() (*string, bool) { + if o == nil || IsNil(o.EvalConfigId) { + return nil, false + } + return o.EvalConfigId, true +} + +// HasEvalConfigId returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasEvalConfigId() bool { + if o != nil && !IsNil(o.EvalConfigId) { + return true + } + + return false +} + +// SetEvalConfigId gets a reference to the given string and assigns it to the EvalConfigId field. +func (o *EvalExplanationCluster) SetEvalConfigId(v string) { + o.EvalConfigId = &v +} + +// GetEvalTemplateId returns the EvalTemplateId field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetEvalTemplateId() string { + if o == nil || IsNil(o.EvalTemplateId) { + var ret string + return ret + } + return *o.EvalTemplateId +} + +// GetEvalTemplateIdOk returns a tuple with the EvalTemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetEvalTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.EvalTemplateId) { + return nil, false + } + return o.EvalTemplateId, true +} + +// HasEvalTemplateId returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasEvalTemplateId() bool { + if o != nil && !IsNil(o.EvalTemplateId) { + return true + } + + return false +} + +// SetEvalTemplateId gets a reference to the given string and assigns it to the EvalTemplateId field. +func (o *EvalExplanationCluster) SetEvalTemplateId(v string) { + o.EvalTemplateId = &v +} + +// GetEvalName returns the EvalName field value if set, zero value otherwise. +func (o *EvalExplanationCluster) GetEvalName() string { + if o == nil || IsNil(o.EvalName) { + var ret string + return ret + } + return *o.EvalName +} + +// GetEvalNameOk returns a tuple with the EvalName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationCluster) GetEvalNameOk() (*string, bool) { + if o == nil || IsNil(o.EvalName) { + return nil, false + } + return o.EvalName, true +} + +// HasEvalName returns a boolean if a field has been set. +func (o *EvalExplanationCluster) HasEvalName() bool { + if o != nil && !IsNil(o.EvalName) { + return true + } + + return false +} + +// SetEvalName gets a reference to the given string and assigns it to the EvalName field. +func (o *EvalExplanationCluster) SetEvalName(v string) { + o.EvalName = &v +} + +func (o EvalExplanationCluster) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalExplanationCluster) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Kind) { + toSerialize["kind"] = o.Kind + } + if !IsNil(o.Confidence) { + toSerialize["confidence"] = o.Confidence + } + if !IsNil(o.Theme) { + toSerialize["theme"] = o.Theme + } + if !IsNil(o.Guidance) { + toSerialize["guidance"] = o.Guidance + } + if !IsNil(o.EvidenceSummary) { + toSerialize["evidenceSummary"] = o.EvidenceSummary + } + if !IsNil(o.EvalConfigId) { + toSerialize["eval_config_id"] = o.EvalConfigId + } + if !IsNil(o.EvalTemplateId) { + toSerialize["eval_template_id"] = o.EvalTemplateId + } + if !IsNil(o.EvalName) { + toSerialize["eval_name"] = o.EvalName + } + return toSerialize, nil +} + +type NullableEvalExplanationCluster struct { + value *EvalExplanationCluster + isSet bool +} + +func (v NullableEvalExplanationCluster) Get() *EvalExplanationCluster { + return v.value +} + +func (v *NullableEvalExplanationCluster) Set(val *EvalExplanationCluster) { + v.value = val + v.isSet = true +} + +func (v NullableEvalExplanationCluster) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalExplanationCluster) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalExplanationCluster(val *EvalExplanationCluster) *NullableEvalExplanationCluster { + return &NullableEvalExplanationCluster{value: val, isSet: true} +} + +func (v NullableEvalExplanationCluster) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalExplanationCluster) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_explanation_summary_refresh_response.go b/go/futureagi/model_eval_explanation_summary_refresh_response.go new file mode 100644 index 0000000..a3188ba --- /dev/null +++ b/go/futureagi/model_eval_explanation_summary_refresh_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalExplanationSummaryRefreshResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalExplanationSummaryRefreshResponse{} + +// EvalExplanationSummaryRefreshResponse struct for EvalExplanationSummaryRefreshResponse +type EvalExplanationSummaryRefreshResponse struct { + Status *bool `json:"status,omitempty"` + Result EvalExplanationSummaryRefreshResult `json:"result"` +} + +type _EvalExplanationSummaryRefreshResponse EvalExplanationSummaryRefreshResponse + +// NewEvalExplanationSummaryRefreshResponse instantiates a new EvalExplanationSummaryRefreshResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalExplanationSummaryRefreshResponse(result EvalExplanationSummaryRefreshResult) *EvalExplanationSummaryRefreshResponse { + this := EvalExplanationSummaryRefreshResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewEvalExplanationSummaryRefreshResponseWithDefaults instantiates a new EvalExplanationSummaryRefreshResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalExplanationSummaryRefreshResponseWithDefaults() *EvalExplanationSummaryRefreshResponse { + this := EvalExplanationSummaryRefreshResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EvalExplanationSummaryRefreshResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationSummaryRefreshResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EvalExplanationSummaryRefreshResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *EvalExplanationSummaryRefreshResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *EvalExplanationSummaryRefreshResponse) GetResult() EvalExplanationSummaryRefreshResult { + if o == nil { + var ret EvalExplanationSummaryRefreshResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalExplanationSummaryRefreshResponse) GetResultOk() (*EvalExplanationSummaryRefreshResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalExplanationSummaryRefreshResponse) SetResult(v EvalExplanationSummaryRefreshResult) { + o.Result = v +} + +func (o EvalExplanationSummaryRefreshResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalExplanationSummaryRefreshResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalExplanationSummaryRefreshResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalExplanationSummaryRefreshResponse := _EvalExplanationSummaryRefreshResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalExplanationSummaryRefreshResponse) + + if err != nil { + return err + } + + *o = EvalExplanationSummaryRefreshResponse(varEvalExplanationSummaryRefreshResponse) + + return err +} + +type NullableEvalExplanationSummaryRefreshResponse struct { + value *EvalExplanationSummaryRefreshResponse + isSet bool +} + +func (v NullableEvalExplanationSummaryRefreshResponse) Get() *EvalExplanationSummaryRefreshResponse { + return v.value +} + +func (v *NullableEvalExplanationSummaryRefreshResponse) Set(val *EvalExplanationSummaryRefreshResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalExplanationSummaryRefreshResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalExplanationSummaryRefreshResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalExplanationSummaryRefreshResponse(val *EvalExplanationSummaryRefreshResponse) *NullableEvalExplanationSummaryRefreshResponse { + return &NullableEvalExplanationSummaryRefreshResponse{value: val, isSet: true} +} + +func (v NullableEvalExplanationSummaryRefreshResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalExplanationSummaryRefreshResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_explanation_summary_refresh_result.go b/go/futureagi/model_eval_explanation_summary_refresh_result.go new file mode 100644 index 0000000..c0c776f --- /dev/null +++ b/go/futureagi/model_eval_explanation_summary_refresh_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalExplanationSummaryRefreshResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalExplanationSummaryRefreshResult{} + +// EvalExplanationSummaryRefreshResult struct for EvalExplanationSummaryRefreshResult +type EvalExplanationSummaryRefreshResult struct { + Message string `json:"message"` +} + +type _EvalExplanationSummaryRefreshResult EvalExplanationSummaryRefreshResult + +// NewEvalExplanationSummaryRefreshResult instantiates a new EvalExplanationSummaryRefreshResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalExplanationSummaryRefreshResult(message string) *EvalExplanationSummaryRefreshResult { + this := EvalExplanationSummaryRefreshResult{} + this.Message = message + return &this +} + +// NewEvalExplanationSummaryRefreshResultWithDefaults instantiates a new EvalExplanationSummaryRefreshResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalExplanationSummaryRefreshResultWithDefaults() *EvalExplanationSummaryRefreshResult { + this := EvalExplanationSummaryRefreshResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *EvalExplanationSummaryRefreshResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *EvalExplanationSummaryRefreshResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *EvalExplanationSummaryRefreshResult) SetMessage(v string) { + o.Message = v +} + +func (o EvalExplanationSummaryRefreshResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalExplanationSummaryRefreshResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *EvalExplanationSummaryRefreshResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalExplanationSummaryRefreshResult := _EvalExplanationSummaryRefreshResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalExplanationSummaryRefreshResult) + + if err != nil { + return err + } + + *o = EvalExplanationSummaryRefreshResult(varEvalExplanationSummaryRefreshResult) + + return err +} + +type NullableEvalExplanationSummaryRefreshResult struct { + value *EvalExplanationSummaryRefreshResult + isSet bool +} + +func (v NullableEvalExplanationSummaryRefreshResult) Get() *EvalExplanationSummaryRefreshResult { + return v.value +} + +func (v *NullableEvalExplanationSummaryRefreshResult) Set(val *EvalExplanationSummaryRefreshResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalExplanationSummaryRefreshResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalExplanationSummaryRefreshResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalExplanationSummaryRefreshResult(val *EvalExplanationSummaryRefreshResult) *NullableEvalExplanationSummaryRefreshResult { + return &NullableEvalExplanationSummaryRefreshResult{value: val, isSet: true} +} + +func (v NullableEvalExplanationSummaryRefreshResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalExplanationSummaryRefreshResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_explanation_summary_response.go b/go/futureagi/model_eval_explanation_summary_response.go new file mode 100644 index 0000000..adcf24f --- /dev/null +++ b/go/futureagi/model_eval_explanation_summary_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalExplanationSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalExplanationSummaryResponse{} + +// EvalExplanationSummaryResponse struct for EvalExplanationSummaryResponse +type EvalExplanationSummaryResponse struct { + Status *bool `json:"status,omitempty"` + Result EvalExplanationSummaryResult `json:"result"` +} + +type _EvalExplanationSummaryResponse EvalExplanationSummaryResponse + +// NewEvalExplanationSummaryResponse instantiates a new EvalExplanationSummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalExplanationSummaryResponse(result EvalExplanationSummaryResult) *EvalExplanationSummaryResponse { + this := EvalExplanationSummaryResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewEvalExplanationSummaryResponseWithDefaults instantiates a new EvalExplanationSummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalExplanationSummaryResponseWithDefaults() *EvalExplanationSummaryResponse { + this := EvalExplanationSummaryResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EvalExplanationSummaryResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalExplanationSummaryResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EvalExplanationSummaryResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *EvalExplanationSummaryResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *EvalExplanationSummaryResponse) GetResult() EvalExplanationSummaryResult { + if o == nil { + var ret EvalExplanationSummaryResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalExplanationSummaryResponse) GetResultOk() (*EvalExplanationSummaryResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalExplanationSummaryResponse) SetResult(v EvalExplanationSummaryResult) { + o.Result = v +} + +func (o EvalExplanationSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalExplanationSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalExplanationSummaryResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalExplanationSummaryResponse := _EvalExplanationSummaryResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalExplanationSummaryResponse) + + if err != nil { + return err + } + + *o = EvalExplanationSummaryResponse(varEvalExplanationSummaryResponse) + + return err +} + +type NullableEvalExplanationSummaryResponse struct { + value *EvalExplanationSummaryResponse + isSet bool +} + +func (v NullableEvalExplanationSummaryResponse) Get() *EvalExplanationSummaryResponse { + return v.value +} + +func (v *NullableEvalExplanationSummaryResponse) Set(val *EvalExplanationSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalExplanationSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalExplanationSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalExplanationSummaryResponse(val *EvalExplanationSummaryResponse) *NullableEvalExplanationSummaryResponse { + return &NullableEvalExplanationSummaryResponse{value: val, isSet: true} +} + +func (v NullableEvalExplanationSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalExplanationSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_explanation_summary_result.go b/go/futureagi/model_eval_explanation_summary_result.go new file mode 100644 index 0000000..c19d771 --- /dev/null +++ b/go/futureagi/model_eval_explanation_summary_result.go @@ -0,0 +1,216 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the EvalExplanationSummaryResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalExplanationSummaryResult{} + +// EvalExplanationSummaryResult struct for EvalExplanationSummaryResult +type EvalExplanationSummaryResult struct { + Response map[string][]EvalExplanationCluster `json:"response"` + LastUpdated NullableTime `json:"last_updated"` + Status string `json:"status"` +} + +type _EvalExplanationSummaryResult EvalExplanationSummaryResult + +// NewEvalExplanationSummaryResult instantiates a new EvalExplanationSummaryResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalExplanationSummaryResult(response map[string][]EvalExplanationCluster, lastUpdated NullableTime, status string) *EvalExplanationSummaryResult { + this := EvalExplanationSummaryResult{} + this.Response = response + this.LastUpdated = lastUpdated + this.Status = status + return &this +} + +// NewEvalExplanationSummaryResultWithDefaults instantiates a new EvalExplanationSummaryResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalExplanationSummaryResultWithDefaults() *EvalExplanationSummaryResult { + this := EvalExplanationSummaryResult{} + return &this +} + +// GetResponse returns the Response field value +func (o *EvalExplanationSummaryResult) GetResponse() map[string][]EvalExplanationCluster { + if o == nil { + var ret map[string][]EvalExplanationCluster + return ret + } + + return o.Response +} + +// GetResponseOk returns a tuple with the Response field value +// and a boolean to check if the value has been set. +func (o *EvalExplanationSummaryResult) GetResponseOk() (*map[string][]EvalExplanationCluster, bool) { + if o == nil { + return nil, false + } + return &o.Response, true +} + +// SetResponse sets field value +func (o *EvalExplanationSummaryResult) SetResponse(v map[string][]EvalExplanationCluster) { + o.Response = v +} + +// GetLastUpdated returns the LastUpdated field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *EvalExplanationSummaryResult) GetLastUpdated() time.Time { + if o == nil || o.LastUpdated.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastUpdated.Get() +} + +// GetLastUpdatedOk returns a tuple with the LastUpdated field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalExplanationSummaryResult) GetLastUpdatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastUpdated.Get(), o.LastUpdated.IsSet() +} + +// SetLastUpdated sets field value +func (o *EvalExplanationSummaryResult) SetLastUpdated(v time.Time) { + o.LastUpdated.Set(&v) +} + +// GetStatus returns the Status field value +func (o *EvalExplanationSummaryResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalExplanationSummaryResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalExplanationSummaryResult) SetStatus(v string) { + o.Status = v +} + +func (o EvalExplanationSummaryResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalExplanationSummaryResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["response"] = o.Response + toSerialize["last_updated"] = o.LastUpdated.Get() + toSerialize["status"] = o.Status + return toSerialize, nil +} + +func (o *EvalExplanationSummaryResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "response", + "last_updated", + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalExplanationSummaryResult := _EvalExplanationSummaryResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalExplanationSummaryResult) + + if err != nil { + return err + } + + *o = EvalExplanationSummaryResult(varEvalExplanationSummaryResult) + + return err +} + +type NullableEvalExplanationSummaryResult struct { + value *EvalExplanationSummaryResult + isSet bool +} + +func (v NullableEvalExplanationSummaryResult) Get() *EvalExplanationSummaryResult { + return v.value +} + +func (v *NullableEvalExplanationSummaryResult) Set(val *EvalExplanationSummaryResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalExplanationSummaryResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalExplanationSummaryResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalExplanationSummaryResult(val *EvalExplanationSummaryResult) *NullableEvalExplanationSummaryResult { + return &NullableEvalExplanationSummaryResult{value: val, isSet: true} +} + +func (v NullableEvalExplanationSummaryResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalExplanationSummaryResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_feedback_list_item.go b/go/futureagi/model_eval_feedback_list_item.go new file mode 100644 index 0000000..f82e80b --- /dev/null +++ b/go/futureagi/model_eval_feedback_list_item.go @@ -0,0 +1,353 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalFeedbackListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalFeedbackListItem{} + +// EvalFeedbackListItem struct for EvalFeedbackListItem +type EvalFeedbackListItem struct { + Id string `json:"id"` + Value string `json:"value"` + Explanation string `json:"explanation"` + Source string `json:"source"` + SourceId string `json:"source_id"` + ActionType string `json:"action_type"` + UserName string `json:"user_name"` + CreatedAt string `json:"created_at"` +} + +type _EvalFeedbackListItem EvalFeedbackListItem + +// NewEvalFeedbackListItem instantiates a new EvalFeedbackListItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalFeedbackListItem(id string, value string, explanation string, source string, sourceId string, actionType string, userName string, createdAt string) *EvalFeedbackListItem { + this := EvalFeedbackListItem{} + this.Id = id + this.Value = value + this.Explanation = explanation + this.Source = source + this.SourceId = sourceId + this.ActionType = actionType + this.UserName = userName + this.CreatedAt = createdAt + return &this +} + +// NewEvalFeedbackListItemWithDefaults instantiates a new EvalFeedbackListItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalFeedbackListItemWithDefaults() *EvalFeedbackListItem { + this := EvalFeedbackListItem{} + return &this +} + +// GetId returns the Id field value +func (o *EvalFeedbackListItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalFeedbackListItem) SetId(v string) { + o.Id = v +} + +// GetValue returns the Value field value +func (o *EvalFeedbackListItem) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *EvalFeedbackListItem) SetValue(v string) { + o.Value = v +} + +// GetExplanation returns the Explanation field value +func (o *EvalFeedbackListItem) GetExplanation() string { + if o == nil { + var ret string + return ret + } + + return o.Explanation +} + +// GetExplanationOk returns a tuple with the Explanation field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetExplanationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Explanation, true +} + +// SetExplanation sets field value +func (o *EvalFeedbackListItem) SetExplanation(v string) { + o.Explanation = v +} + +// GetSource returns the Source field value +func (o *EvalFeedbackListItem) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *EvalFeedbackListItem) SetSource(v string) { + o.Source = v +} + +// GetSourceId returns the SourceId field value +func (o *EvalFeedbackListItem) GetSourceId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceId, true +} + +// SetSourceId sets field value +func (o *EvalFeedbackListItem) SetSourceId(v string) { + o.SourceId = v +} + +// GetActionType returns the ActionType field value +func (o *EvalFeedbackListItem) GetActionType() string { + if o == nil { + var ret string + return ret + } + + return o.ActionType +} + +// GetActionTypeOk returns a tuple with the ActionType field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetActionTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ActionType, true +} + +// SetActionType sets field value +func (o *EvalFeedbackListItem) SetActionType(v string) { + o.ActionType = v +} + +// GetUserName returns the UserName field value +func (o *EvalFeedbackListItem) GetUserName() string { + if o == nil { + var ret string + return ret + } + + return o.UserName +} + +// GetUserNameOk returns a tuple with the UserName field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetUserNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserName, true +} + +// SetUserName sets field value +func (o *EvalFeedbackListItem) SetUserName(v string) { + o.UserName = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *EvalFeedbackListItem) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListItem) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *EvalFeedbackListItem) SetCreatedAt(v string) { + o.CreatedAt = v +} + +func (o EvalFeedbackListItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalFeedbackListItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["value"] = o.Value + toSerialize["explanation"] = o.Explanation + toSerialize["source"] = o.Source + toSerialize["source_id"] = o.SourceId + toSerialize["action_type"] = o.ActionType + toSerialize["user_name"] = o.UserName + toSerialize["created_at"] = o.CreatedAt + return toSerialize, nil +} + +func (o *EvalFeedbackListItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "value", + "explanation", + "source", + "source_id", + "action_type", + "user_name", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalFeedbackListItem := _EvalFeedbackListItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalFeedbackListItem) + + if err != nil { + return err + } + + *o = EvalFeedbackListItem(varEvalFeedbackListItem) + + return err +} + +type NullableEvalFeedbackListItem struct { + value *EvalFeedbackListItem + isSet bool +} + +func (v NullableEvalFeedbackListItem) Get() *EvalFeedbackListItem { + return v.value +} + +func (v *NullableEvalFeedbackListItem) Set(val *EvalFeedbackListItem) { + v.value = val + v.isSet = true +} + +func (v NullableEvalFeedbackListItem) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalFeedbackListItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalFeedbackListItem(val *EvalFeedbackListItem) *NullableEvalFeedbackListItem { + return &NullableEvalFeedbackListItem{value: val, isSet: true} +} + +func (v NullableEvalFeedbackListItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalFeedbackListItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_feedback_list_response.go b/go/futureagi/model_eval_feedback_list_response.go new file mode 100644 index 0000000..4d36396 --- /dev/null +++ b/go/futureagi/model_eval_feedback_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalFeedbackListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalFeedbackListResponse{} + +// EvalFeedbackListResponse struct for EvalFeedbackListResponse +type EvalFeedbackListResponse struct { + Status bool `json:"status"` + Result EvalFeedbackListResponseResult `json:"result"` +} + +type _EvalFeedbackListResponse EvalFeedbackListResponse + +// NewEvalFeedbackListResponse instantiates a new EvalFeedbackListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalFeedbackListResponse(status bool, result EvalFeedbackListResponseResult) *EvalFeedbackListResponse { + this := EvalFeedbackListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalFeedbackListResponseWithDefaults instantiates a new EvalFeedbackListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalFeedbackListResponseWithDefaults() *EvalFeedbackListResponse { + this := EvalFeedbackListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalFeedbackListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalFeedbackListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalFeedbackListResponse) GetResult() EvalFeedbackListResponseResult { + if o == nil { + var ret EvalFeedbackListResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListResponse) GetResultOk() (*EvalFeedbackListResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalFeedbackListResponse) SetResult(v EvalFeedbackListResponseResult) { + o.Result = v +} + +func (o EvalFeedbackListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalFeedbackListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalFeedbackListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalFeedbackListResponse := _EvalFeedbackListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalFeedbackListResponse) + + if err != nil { + return err + } + + *o = EvalFeedbackListResponse(varEvalFeedbackListResponse) + + return err +} + +type NullableEvalFeedbackListResponse struct { + value *EvalFeedbackListResponse + isSet bool +} + +func (v NullableEvalFeedbackListResponse) Get() *EvalFeedbackListResponse { + return v.value +} + +func (v *NullableEvalFeedbackListResponse) Set(val *EvalFeedbackListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalFeedbackListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalFeedbackListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalFeedbackListResponse(val *EvalFeedbackListResponse) *NullableEvalFeedbackListResponse { + return &NullableEvalFeedbackListResponse{value: val, isSet: true} +} + +func (v NullableEvalFeedbackListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalFeedbackListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_feedback_list_response_result.go b/go/futureagi/model_eval_feedback_list_response_result.go new file mode 100644 index 0000000..0eea888 --- /dev/null +++ b/go/futureagi/model_eval_feedback_list_response_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalFeedbackListResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalFeedbackListResponseResult{} + +// EvalFeedbackListResponseResult struct for EvalFeedbackListResponseResult +type EvalFeedbackListResponseResult struct { + TemplateId string `json:"template_id"` + Items []EvalFeedbackListItem `json:"items"` + Total int32 `json:"total"` + Page int32 `json:"page"` + PageSize int32 `json:"page_size"` +} + +type _EvalFeedbackListResponseResult EvalFeedbackListResponseResult + +// NewEvalFeedbackListResponseResult instantiates a new EvalFeedbackListResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalFeedbackListResponseResult(templateId string, items []EvalFeedbackListItem, total int32, page int32, pageSize int32) *EvalFeedbackListResponseResult { + this := EvalFeedbackListResponseResult{} + this.TemplateId = templateId + this.Items = items + this.Total = total + this.Page = page + this.PageSize = pageSize + return &this +} + +// NewEvalFeedbackListResponseResultWithDefaults instantiates a new EvalFeedbackListResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalFeedbackListResponseResultWithDefaults() *EvalFeedbackListResponseResult { + this := EvalFeedbackListResponseResult{} + return &this +} + +// GetTemplateId returns the TemplateId field value +func (o *EvalFeedbackListResponseResult) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListResponseResult) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *EvalFeedbackListResponseResult) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetItems returns the Items field value +func (o *EvalFeedbackListResponseResult) GetItems() []EvalFeedbackListItem { + if o == nil { + var ret []EvalFeedbackListItem + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListResponseResult) GetItemsOk() ([]EvalFeedbackListItem, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *EvalFeedbackListResponseResult) SetItems(v []EvalFeedbackListItem) { + o.Items = v +} + +// GetTotal returns the Total field value +func (o *EvalFeedbackListResponseResult) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListResponseResult) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *EvalFeedbackListResponseResult) SetTotal(v int32) { + o.Total = v +} + +// GetPage returns the Page field value +func (o *EvalFeedbackListResponseResult) GetPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListResponseResult) GetPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *EvalFeedbackListResponseResult) SetPage(v int32) { + o.Page = v +} + +// GetPageSize returns the PageSize field value +func (o *EvalFeedbackListResponseResult) GetPageSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value +// and a boolean to check if the value has been set. +func (o *EvalFeedbackListResponseResult) GetPageSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PageSize, true +} + +// SetPageSize sets field value +func (o *EvalFeedbackListResponseResult) SetPageSize(v int32) { + o.PageSize = v +} + +func (o EvalFeedbackListResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalFeedbackListResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_id"] = o.TemplateId + toSerialize["items"] = o.Items + toSerialize["total"] = o.Total + toSerialize["page"] = o.Page + toSerialize["page_size"] = o.PageSize + return toSerialize, nil +} + +func (o *EvalFeedbackListResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_id", + "items", + "total", + "page", + "page_size", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalFeedbackListResponseResult := _EvalFeedbackListResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalFeedbackListResponseResult) + + if err != nil { + return err + } + + *o = EvalFeedbackListResponseResult(varEvalFeedbackListResponseResult) + + return err +} + +type NullableEvalFeedbackListResponseResult struct { + value *EvalFeedbackListResponseResult + isSet bool +} + +func (v NullableEvalFeedbackListResponseResult) Get() *EvalFeedbackListResponseResult { + return v.value +} + +func (v *NullableEvalFeedbackListResponseResult) Set(val *EvalFeedbackListResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalFeedbackListResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalFeedbackListResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalFeedbackListResponseResult(val *EvalFeedbackListResponseResult) *NullableEvalFeedbackListResponseResult { + return &NullableEvalFeedbackListResponseResult{value: val, isSet: true} +} + +func (v NullableEvalFeedbackListResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalFeedbackListResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_function_list_response.go b/go/futureagi/model_eval_function_list_response.go new file mode 100644 index 0000000..67ed0e6 --- /dev/null +++ b/go/futureagi/model_eval_function_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalFunctionListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalFunctionListResponse{} + +// EvalFunctionListResponse struct for EvalFunctionListResponse +type EvalFunctionListResponse struct { + Status bool `json:"status"` + Result EvalFunctionListResult `json:"result"` +} + +type _EvalFunctionListResponse EvalFunctionListResponse + +// NewEvalFunctionListResponse instantiates a new EvalFunctionListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalFunctionListResponse(status bool, result EvalFunctionListResult) *EvalFunctionListResponse { + this := EvalFunctionListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalFunctionListResponseWithDefaults instantiates a new EvalFunctionListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalFunctionListResponseWithDefaults() *EvalFunctionListResponse { + this := EvalFunctionListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalFunctionListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalFunctionListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalFunctionListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalFunctionListResponse) GetResult() EvalFunctionListResult { + if o == nil { + var ret EvalFunctionListResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalFunctionListResponse) GetResultOk() (*EvalFunctionListResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalFunctionListResponse) SetResult(v EvalFunctionListResult) { + o.Result = v +} + +func (o EvalFunctionListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalFunctionListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalFunctionListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalFunctionListResponse := _EvalFunctionListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalFunctionListResponse) + + if err != nil { + return err + } + + *o = EvalFunctionListResponse(varEvalFunctionListResponse) + + return err +} + +type NullableEvalFunctionListResponse struct { + value *EvalFunctionListResponse + isSet bool +} + +func (v NullableEvalFunctionListResponse) Get() *EvalFunctionListResponse { + return v.value +} + +func (v *NullableEvalFunctionListResponse) Set(val *EvalFunctionListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalFunctionListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalFunctionListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalFunctionListResponse(val *EvalFunctionListResponse) *NullableEvalFunctionListResponse { + return &NullableEvalFunctionListResponse{value: val, isSet: true} +} + +func (v NullableEvalFunctionListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalFunctionListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_function_list_result.go b/go/futureagi/model_eval_function_list_result.go new file mode 100644 index 0000000..3ac41fd --- /dev/null +++ b/go/futureagi/model_eval_function_list_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalFunctionListResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalFunctionListResult{} + +// EvalFunctionListResult struct for EvalFunctionListResult +type EvalFunctionListResult struct { + Functions []map[string]interface{} `json:"functions"` +} + +type _EvalFunctionListResult EvalFunctionListResult + +// NewEvalFunctionListResult instantiates a new EvalFunctionListResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalFunctionListResult(functions []map[string]interface{}) *EvalFunctionListResult { + this := EvalFunctionListResult{} + this.Functions = functions + return &this +} + +// NewEvalFunctionListResultWithDefaults instantiates a new EvalFunctionListResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalFunctionListResultWithDefaults() *EvalFunctionListResult { + this := EvalFunctionListResult{} + return &this +} + +// GetFunctions returns the Functions field value +func (o *EvalFunctionListResult) GetFunctions() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Functions +} + +// GetFunctionsOk returns a tuple with the Functions field value +// and a boolean to check if the value has been set. +func (o *EvalFunctionListResult) GetFunctionsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Functions, true +} + +// SetFunctions sets field value +func (o *EvalFunctionListResult) SetFunctions(v []map[string]interface{}) { + o.Functions = v +} + +func (o EvalFunctionListResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalFunctionListResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["functions"] = o.Functions + return toSerialize, nil +} + +func (o *EvalFunctionListResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "functions", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalFunctionListResult := _EvalFunctionListResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalFunctionListResult) + + if err != nil { + return err + } + + *o = EvalFunctionListResult(varEvalFunctionListResult) + + return err +} + +type NullableEvalFunctionListResult struct { + value *EvalFunctionListResult + isSet bool +} + +func (v NullableEvalFunctionListResult) Get() *EvalFunctionListResult { + return v.value +} + +func (v *NullableEvalFunctionListResult) Set(val *EvalFunctionListResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalFunctionListResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalFunctionListResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalFunctionListResult(val *EvalFunctionListResult) *NullableEvalFunctionListResult { + return &NullableEvalFunctionListResult{value: val, isSet: true} +} + +func (v NullableEvalFunctionListResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalFunctionListResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_list_filters.go b/go/futureagi/model_eval_list_filters.go new file mode 100644 index 0000000..a280fb2 --- /dev/null +++ b/go/futureagi/model_eval_list_filters.go @@ -0,0 +1,305 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalListFilters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalListFilters{} + +// EvalListFilters struct for EvalListFilters +type EvalListFilters struct { + EvalType []string `json:"eval_type,omitempty"` + OutputType []string `json:"output_type,omitempty"` + TemplateType []string `json:"template_type,omitempty"` + Tags []string `json:"tags,omitempty"` + CreatedBy []string `json:"created_by,omitempty"` + Names []string `json:"names,omitempty"` +} + +// NewEvalListFilters instantiates a new EvalListFilters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalListFilters() *EvalListFilters { + this := EvalListFilters{} + return &this +} + +// NewEvalListFiltersWithDefaults instantiates a new EvalListFilters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalListFiltersWithDefaults() *EvalListFilters { + this := EvalListFilters{} + return &this +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise. +func (o *EvalListFilters) GetEvalType() []string { + if o == nil || IsNil(o.EvalType) { + var ret []string + return ret + } + return o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListFilters) GetEvalTypeOk() ([]string, bool) { + if o == nil || IsNil(o.EvalType) { + return nil, false + } + return o.EvalType, true +} + +// HasEvalType returns a boolean if a field has been set. +func (o *EvalListFilters) HasEvalType() bool { + if o != nil && !IsNil(o.EvalType) { + return true + } + + return false +} + +// SetEvalType gets a reference to the given []string and assigns it to the EvalType field. +func (o *EvalListFilters) SetEvalType(v []string) { + o.EvalType = v +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise. +func (o *EvalListFilters) GetOutputType() []string { + if o == nil || IsNil(o.OutputType) { + var ret []string + return ret + } + return o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListFilters) GetOutputTypeOk() ([]string, bool) { + if o == nil || IsNil(o.OutputType) { + return nil, false + } + return o.OutputType, true +} + +// HasOutputType returns a boolean if a field has been set. +func (o *EvalListFilters) HasOutputType() bool { + if o != nil && !IsNil(o.OutputType) { + return true + } + + return false +} + +// SetOutputType gets a reference to the given []string and assigns it to the OutputType field. +func (o *EvalListFilters) SetOutputType(v []string) { + o.OutputType = v +} + +// GetTemplateType returns the TemplateType field value if set, zero value otherwise. +func (o *EvalListFilters) GetTemplateType() []string { + if o == nil || IsNil(o.TemplateType) { + var ret []string + return ret + } + return o.TemplateType +} + +// GetTemplateTypeOk returns a tuple with the TemplateType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListFilters) GetTemplateTypeOk() ([]string, bool) { + if o == nil || IsNil(o.TemplateType) { + return nil, false + } + return o.TemplateType, true +} + +// HasTemplateType returns a boolean if a field has been set. +func (o *EvalListFilters) HasTemplateType() bool { + if o != nil && !IsNil(o.TemplateType) { + return true + } + + return false +} + +// SetTemplateType gets a reference to the given []string and assigns it to the TemplateType field. +func (o *EvalListFilters) SetTemplateType(v []string) { + o.TemplateType = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *EvalListFilters) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListFilters) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EvalListFilters) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EvalListFilters) SetTags(v []string) { + o.Tags = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *EvalListFilters) GetCreatedBy() []string { + if o == nil || IsNil(o.CreatedBy) { + var ret []string + return ret + } + return o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListFilters) GetCreatedByOk() ([]string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *EvalListFilters) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given []string and assigns it to the CreatedBy field. +func (o *EvalListFilters) SetCreatedBy(v []string) { + o.CreatedBy = v +} + +// GetNames returns the Names field value if set, zero value otherwise. +func (o *EvalListFilters) GetNames() []string { + if o == nil || IsNil(o.Names) { + var ret []string + return ret + } + return o.Names +} + +// GetNamesOk returns a tuple with the Names field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListFilters) GetNamesOk() ([]string, bool) { + if o == nil || IsNil(o.Names) { + return nil, false + } + return o.Names, true +} + +// HasNames returns a boolean if a field has been set. +func (o *EvalListFilters) HasNames() bool { + if o != nil && !IsNil(o.Names) { + return true + } + + return false +} + +// SetNames gets a reference to the given []string and assigns it to the Names field. +func (o *EvalListFilters) SetNames(v []string) { + o.Names = v +} + +func (o EvalListFilters) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalListFilters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EvalType) { + toSerialize["eval_type"] = o.EvalType + } + if !IsNil(o.OutputType) { + toSerialize["output_type"] = o.OutputType + } + if !IsNil(o.TemplateType) { + toSerialize["template_type"] = o.TemplateType + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.CreatedBy) { + toSerialize["created_by"] = o.CreatedBy + } + if !IsNil(o.Names) { + toSerialize["names"] = o.Names + } + return toSerialize, nil +} + +type NullableEvalListFilters struct { + value *EvalListFilters + isSet bool +} + +func (v NullableEvalListFilters) Get() *EvalListFilters { + return v.value +} + +func (v *NullableEvalListFilters) Set(val *EvalListFilters) { + v.value = val + v.isSet = true +} + +func (v NullableEvalListFilters) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalListFilters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalListFilters(val *EvalListFilters) *NullableEvalListFilters { + return &NullableEvalListFilters{value: val, isSet: true} +} + +func (v NullableEvalListFilters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalListFilters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_list_request.go b/go/futureagi/model_eval_list_request.go new file mode 100644 index 0000000..deb6e6e --- /dev/null +++ b/go/futureagi/model_eval_list_request.go @@ -0,0 +1,372 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalListRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalListRequest{} + +// EvalListRequest struct for EvalListRequest +type EvalListRequest struct { + Page *int32 `json:"page,omitempty"` + PageSize *int32 `json:"page_size,omitempty"` + Search NullableString `json:"search,omitempty"` + OwnerFilter *string `json:"owner_filter,omitempty"` + Filters *EvalListFilters `json:"filters,omitempty"` + SortBy *string `json:"sort_by,omitempty"` + SortOrder *string `json:"sort_order,omitempty"` +} + +// NewEvalListRequest instantiates a new EvalListRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalListRequest() *EvalListRequest { + this := EvalListRequest{} + var page int32 = 0 + this.Page = &page + var pageSize int32 = 25 + this.PageSize = &pageSize + var ownerFilter string = "all" + this.OwnerFilter = &ownerFilter + var sortBy string = "updated_at" + this.SortBy = &sortBy + var sortOrder string = "desc" + this.SortOrder = &sortOrder + return &this +} + +// NewEvalListRequestWithDefaults instantiates a new EvalListRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalListRequestWithDefaults() *EvalListRequest { + this := EvalListRequest{} + var page int32 = 0 + this.Page = &page + var pageSize int32 = 25 + this.PageSize = &pageSize + var ownerFilter string = "all" + this.OwnerFilter = &ownerFilter + var sortBy string = "updated_at" + this.SortBy = &sortBy + var sortOrder string = "desc" + this.SortOrder = &sortOrder + return &this +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *EvalListRequest) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListRequest) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *EvalListRequest) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *EvalListRequest) SetPage(v int32) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *EvalListRequest) GetPageSize() int32 { + if o == nil || IsNil(o.PageSize) { + var ret int32 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListRequest) GetPageSizeOk() (*int32, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *EvalListRequest) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int32 and assigns it to the PageSize field. +func (o *EvalListRequest) SetPageSize(v int32) { + o.PageSize = &v +} + +// GetSearch returns the Search field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalListRequest) GetSearch() string { + if o == nil || IsNil(o.Search.Get()) { + var ret string + return ret + } + return *o.Search.Get() +} + +// GetSearchOk returns a tuple with the Search field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalListRequest) GetSearchOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Search.Get(), o.Search.IsSet() +} + +// HasSearch returns a boolean if a field has been set. +func (o *EvalListRequest) HasSearch() bool { + if o != nil && o.Search.IsSet() { + return true + } + + return false +} + +// SetSearch gets a reference to the given NullableString and assigns it to the Search field. +func (o *EvalListRequest) SetSearch(v string) { + o.Search.Set(&v) +} + +// SetSearchNil sets the value for Search to be an explicit nil +func (o *EvalListRequest) SetSearchNil() { + o.Search.Set(nil) +} + +// UnsetSearch ensures that no value is present for Search, not even an explicit nil +func (o *EvalListRequest) UnsetSearch() { + o.Search.Unset() +} + +// GetOwnerFilter returns the OwnerFilter field value if set, zero value otherwise. +func (o *EvalListRequest) GetOwnerFilter() string { + if o == nil || IsNil(o.OwnerFilter) { + var ret string + return ret + } + return *o.OwnerFilter +} + +// GetOwnerFilterOk returns a tuple with the OwnerFilter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListRequest) GetOwnerFilterOk() (*string, bool) { + if o == nil || IsNil(o.OwnerFilter) { + return nil, false + } + return o.OwnerFilter, true +} + +// HasOwnerFilter returns a boolean if a field has been set. +func (o *EvalListRequest) HasOwnerFilter() bool { + if o != nil && !IsNil(o.OwnerFilter) { + return true + } + + return false +} + +// SetOwnerFilter gets a reference to the given string and assigns it to the OwnerFilter field. +func (o *EvalListRequest) SetOwnerFilter(v string) { + o.OwnerFilter = &v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *EvalListRequest) GetFilters() EvalListFilters { + if o == nil || IsNil(o.Filters) { + var ret EvalListFilters + return ret + } + return *o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListRequest) GetFiltersOk() (*EvalListFilters, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *EvalListRequest) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given EvalListFilters and assigns it to the Filters field. +func (o *EvalListRequest) SetFilters(v EvalListFilters) { + o.Filters = &v +} + +// GetSortBy returns the SortBy field value if set, zero value otherwise. +func (o *EvalListRequest) GetSortBy() string { + if o == nil || IsNil(o.SortBy) { + var ret string + return ret + } + return *o.SortBy +} + +// GetSortByOk returns a tuple with the SortBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListRequest) GetSortByOk() (*string, bool) { + if o == nil || IsNil(o.SortBy) { + return nil, false + } + return o.SortBy, true +} + +// HasSortBy returns a boolean if a field has been set. +func (o *EvalListRequest) HasSortBy() bool { + if o != nil && !IsNil(o.SortBy) { + return true + } + + return false +} + +// SetSortBy gets a reference to the given string and assigns it to the SortBy field. +func (o *EvalListRequest) SetSortBy(v string) { + o.SortBy = &v +} + +// GetSortOrder returns the SortOrder field value if set, zero value otherwise. +func (o *EvalListRequest) GetSortOrder() string { + if o == nil || IsNil(o.SortOrder) { + var ret string + return ret + } + return *o.SortOrder +} + +// GetSortOrderOk returns a tuple with the SortOrder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListRequest) GetSortOrderOk() (*string, bool) { + if o == nil || IsNil(o.SortOrder) { + return nil, false + } + return o.SortOrder, true +} + +// HasSortOrder returns a boolean if a field has been set. +func (o *EvalListRequest) HasSortOrder() bool { + if o != nil && !IsNil(o.SortOrder) { + return true + } + + return false +} + +// SetSortOrder gets a reference to the given string and assigns it to the SortOrder field. +func (o *EvalListRequest) SetSortOrder(v string) { + o.SortOrder = &v +} + +func (o EvalListRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalListRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Search.IsSet() { + toSerialize["search"] = o.Search.Get() + } + if !IsNil(o.OwnerFilter) { + toSerialize["owner_filter"] = o.OwnerFilter + } + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.SortBy) { + toSerialize["sort_by"] = o.SortBy + } + if !IsNil(o.SortOrder) { + toSerialize["sort_order"] = o.SortOrder + } + return toSerialize, nil +} + +type NullableEvalListRequest struct { + value *EvalListRequest + isSet bool +} + +func (v NullableEvalListRequest) Get() *EvalListRequest { + return v.value +} + +func (v *NullableEvalListRequest) Set(val *EvalListRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEvalListRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalListRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalListRequest(val *EvalListRequest) *NullableEvalListRequest { + return &NullableEvalListRequest{value: val, isSet: true} +} + +func (v NullableEvalListRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalListRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_list_response.go b/go/futureagi/model_eval_list_response.go new file mode 100644 index 0000000..ce22bac --- /dev/null +++ b/go/futureagi/model_eval_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalListResponse{} + +// EvalListResponse struct for EvalListResponse +type EvalListResponse struct { + Status bool `json:"status"` + Result EvalListResult `json:"result"` +} + +type _EvalListResponse EvalListResponse + +// NewEvalListResponse instantiates a new EvalListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalListResponse(status bool, result EvalListResult) *EvalListResponse { + this := EvalListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalListResponseWithDefaults instantiates a new EvalListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalListResponseWithDefaults() *EvalListResponse { + this := EvalListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalListResponse) GetResult() EvalListResult { + if o == nil { + var ret EvalListResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalListResponse) GetResultOk() (*EvalListResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalListResponse) SetResult(v EvalListResult) { + o.Result = v +} + +func (o EvalListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalListResponse := _EvalListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalListResponse) + + if err != nil { + return err + } + + *o = EvalListResponse(varEvalListResponse) + + return err +} + +type NullableEvalListResponse struct { + value *EvalListResponse + isSet bool +} + +func (v NullableEvalListResponse) Get() *EvalListResponse { + return v.value +} + +func (v *NullableEvalListResponse) Set(val *EvalListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalListResponse(val *EvalListResponse) *NullableEvalListResponse { + return &NullableEvalListResponse{value: val, isSet: true} +} + +func (v NullableEvalListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_list_result.go b/go/futureagi/model_eval_list_result.go new file mode 100644 index 0000000..5048730 --- /dev/null +++ b/go/futureagi/model_eval_list_result.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalListResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalListResult{} + +// EvalListResult struct for EvalListResult +type EvalListResult struct { + Evals []map[string]interface{} `json:"evals"` + EvalRecommendations []string `json:"eval_recommendations,omitempty"` +} + +type _EvalListResult EvalListResult + +// NewEvalListResult instantiates a new EvalListResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalListResult(evals []map[string]interface{}) *EvalListResult { + this := EvalListResult{} + this.Evals = evals + return &this +} + +// NewEvalListResultWithDefaults instantiates a new EvalListResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalListResultWithDefaults() *EvalListResult { + this := EvalListResult{} + return &this +} + +// GetEvals returns the Evals field value +func (o *EvalListResult) GetEvals() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Evals +} + +// GetEvalsOk returns a tuple with the Evals field value +// and a boolean to check if the value has been set. +func (o *EvalListResult) GetEvalsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Evals, true +} + +// SetEvals sets field value +func (o *EvalListResult) SetEvals(v []map[string]interface{}) { + o.Evals = v +} + +// GetEvalRecommendations returns the EvalRecommendations field value if set, zero value otherwise. +func (o *EvalListResult) GetEvalRecommendations() []string { + if o == nil || IsNil(o.EvalRecommendations) { + var ret []string + return ret + } + return o.EvalRecommendations +} + +// GetEvalRecommendationsOk returns a tuple with the EvalRecommendations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalListResult) GetEvalRecommendationsOk() ([]string, bool) { + if o == nil || IsNil(o.EvalRecommendations) { + return nil, false + } + return o.EvalRecommendations, true +} + +// HasEvalRecommendations returns a boolean if a field has been set. +func (o *EvalListResult) HasEvalRecommendations() bool { + if o != nil && !IsNil(o.EvalRecommendations) { + return true + } + + return false +} + +// SetEvalRecommendations gets a reference to the given []string and assigns it to the EvalRecommendations field. +func (o *EvalListResult) SetEvalRecommendations(v []string) { + o.EvalRecommendations = v +} + +func (o EvalListResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalListResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["evals"] = o.Evals + if !IsNil(o.EvalRecommendations) { + toSerialize["eval_recommendations"] = o.EvalRecommendations + } + return toSerialize, nil +} + +func (o *EvalListResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "evals", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalListResult := _EvalListResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalListResult) + + if err != nil { + return err + } + + *o = EvalListResult(varEvalListResult) + + return err +} + +type NullableEvalListResult struct { + value *EvalListResult + isSet bool +} + +func (v NullableEvalListResult) Get() *EvalListResult { + return v.value +} + +func (v *NullableEvalListResult) Set(val *EvalListResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalListResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalListResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalListResult(val *EvalListResult) *NullableEvalListResult { + return &NullableEvalListResult{value: val, isSet: true} +} + +func (v NullableEvalListResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalListResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_metric_entry.go b/go/futureagi/model_eval_metric_entry.go new file mode 100644 index 0000000..c42b1fb --- /dev/null +++ b/go/futureagi/model_eval_metric_entry.go @@ -0,0 +1,423 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalMetricEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalMetricEntry{} + +// EvalMetricEntry struct for EvalMetricEntry +type EvalMetricEntry struct { + Id NullableString `json:"id,omitempty"` + TemplateId string `json:"template_id"` + Name string `json:"name"` + Config map[string]interface{} `json:"config"` + Model *string `json:"model,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + KbId NullableString `json:"kb_id,omitempty"` + CompositeWeightOverrides map[string]interface{} `json:"composite_weight_overrides,omitempty"` +} + +type _EvalMetricEntry EvalMetricEntry + +// NewEvalMetricEntry instantiates a new EvalMetricEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalMetricEntry(templateId string, name string, config map[string]interface{}) *EvalMetricEntry { + this := EvalMetricEntry{} + this.TemplateId = templateId + this.Name = name + this.Config = config + var model string = "" + this.Model = &model + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// NewEvalMetricEntryWithDefaults instantiates a new EvalMetricEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalMetricEntryWithDefaults() *EvalMetricEntry { + this := EvalMetricEntry{} + var model string = "" + this.Model = &model + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalMetricEntry) GetId() string { + if o == nil || IsNil(o.Id.Get()) { + var ret string + return ret + } + return *o.Id.Get() +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalMetricEntry) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id.Get(), o.Id.IsSet() +} + +// HasId returns a boolean if a field has been set. +func (o *EvalMetricEntry) HasId() bool { + if o != nil && o.Id.IsSet() { + return true + } + + return false +} + +// SetId gets a reference to the given NullableString and assigns it to the Id field. +func (o *EvalMetricEntry) SetId(v string) { + o.Id.Set(&v) +} + +// SetIdNil sets the value for Id to be an explicit nil +func (o *EvalMetricEntry) SetIdNil() { + o.Id.Set(nil) +} + +// UnsetId ensures that no value is present for Id, not even an explicit nil +func (o *EvalMetricEntry) UnsetId() { + o.Id.Unset() +} + +// GetTemplateId returns the TemplateId field value +func (o *EvalMetricEntry) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *EvalMetricEntry) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *EvalMetricEntry) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetName returns the Name field value +func (o *EvalMetricEntry) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EvalMetricEntry) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EvalMetricEntry) SetName(v string) { + o.Name = v +} + +// GetConfig returns the Config field value +func (o *EvalMetricEntry) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *EvalMetricEntry) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *EvalMetricEntry) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *EvalMetricEntry) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalMetricEntry) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalMetricEntry) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *EvalMetricEntry) SetModel(v string) { + o.Model = &v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *EvalMetricEntry) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalMetricEntry) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *EvalMetricEntry) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *EvalMetricEntry) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetKbId returns the KbId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalMetricEntry) GetKbId() string { + if o == nil || IsNil(o.KbId.Get()) { + var ret string + return ret + } + return *o.KbId.Get() +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalMetricEntry) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KbId.Get(), o.KbId.IsSet() +} + +// HasKbId returns a boolean if a field has been set. +func (o *EvalMetricEntry) HasKbId() bool { + if o != nil && o.KbId.IsSet() { + return true + } + + return false +} + +// SetKbId gets a reference to the given NullableString and assigns it to the KbId field. +func (o *EvalMetricEntry) SetKbId(v string) { + o.KbId.Set(&v) +} + +// SetKbIdNil sets the value for KbId to be an explicit nil +func (o *EvalMetricEntry) SetKbIdNil() { + o.KbId.Set(nil) +} + +// UnsetKbId ensures that no value is present for KbId, not even an explicit nil +func (o *EvalMetricEntry) UnsetKbId() { + o.KbId.Unset() +} + +// GetCompositeWeightOverrides returns the CompositeWeightOverrides field value if set, zero value otherwise. +func (o *EvalMetricEntry) GetCompositeWeightOverrides() map[string]interface{} { + if o == nil || IsNil(o.CompositeWeightOverrides) { + var ret map[string]interface{} + return ret + } + return o.CompositeWeightOverrides +} + +// GetCompositeWeightOverridesOk returns a tuple with the CompositeWeightOverrides field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalMetricEntry) GetCompositeWeightOverridesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CompositeWeightOverrides) { + return map[string]interface{}{}, false + } + return o.CompositeWeightOverrides, true +} + +// HasCompositeWeightOverrides returns a boolean if a field has been set. +func (o *EvalMetricEntry) HasCompositeWeightOverrides() bool { + if o != nil && !IsNil(o.CompositeWeightOverrides) { + return true + } + + return false +} + +// SetCompositeWeightOverrides gets a reference to the given map[string]interface{} and assigns it to the CompositeWeightOverrides field. +func (o *EvalMetricEntry) SetCompositeWeightOverrides(v map[string]interface{}) { + o.CompositeWeightOverrides = v +} + +func (o EvalMetricEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalMetricEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Id.IsSet() { + toSerialize["id"] = o.Id.Get() + } + toSerialize["template_id"] = o.TemplateId + toSerialize["name"] = o.Name + toSerialize["config"] = o.Config + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if o.KbId.IsSet() { + toSerialize["kb_id"] = o.KbId.Get() + } + if !IsNil(o.CompositeWeightOverrides) { + toSerialize["composite_weight_overrides"] = o.CompositeWeightOverrides + } + return toSerialize, nil +} + +func (o *EvalMetricEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_id", + "name", + "config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalMetricEntry := _EvalMetricEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalMetricEntry) + + if err != nil { + return err + } + + *o = EvalMetricEntry(varEvalMetricEntry) + + return err +} + +type NullableEvalMetricEntry struct { + value *EvalMetricEntry + isSet bool +} + +func (v NullableEvalMetricEntry) Get() *EvalMetricEntry { + return v.value +} + +func (v *NullableEvalMetricEntry) Set(val *EvalMetricEntry) { + v.value = val + v.isSet = true +} + +func (v NullableEvalMetricEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalMetricEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalMetricEntry(val *EvalMetricEntry) *NullableEvalMetricEntry { + return &NullableEvalMetricEntry{value: val, isSet: true} +} + +func (v NullableEvalMetricEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalMetricEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_preview_response.go b/go/futureagi/model_eval_preview_response.go new file mode 100644 index 0000000..d3ad276 --- /dev/null +++ b/go/futureagi/model_eval_preview_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalPreviewResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalPreviewResponse{} + +// EvalPreviewResponse struct for EvalPreviewResponse +type EvalPreviewResponse struct { + Status bool `json:"status"` + Result EvalPreviewResult `json:"result"` +} + +type _EvalPreviewResponse EvalPreviewResponse + +// NewEvalPreviewResponse instantiates a new EvalPreviewResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalPreviewResponse(status bool, result EvalPreviewResult) *EvalPreviewResponse { + this := EvalPreviewResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalPreviewResponseWithDefaults instantiates a new EvalPreviewResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalPreviewResponseWithDefaults() *EvalPreviewResponse { + this := EvalPreviewResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalPreviewResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalPreviewResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalPreviewResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalPreviewResponse) GetResult() EvalPreviewResult { + if o == nil { + var ret EvalPreviewResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalPreviewResponse) GetResultOk() (*EvalPreviewResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalPreviewResponse) SetResult(v EvalPreviewResult) { + o.Result = v +} + +func (o EvalPreviewResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalPreviewResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalPreviewResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalPreviewResponse := _EvalPreviewResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalPreviewResponse) + + if err != nil { + return err + } + + *o = EvalPreviewResponse(varEvalPreviewResponse) + + return err +} + +type NullableEvalPreviewResponse struct { + value *EvalPreviewResponse + isSet bool +} + +func (v NullableEvalPreviewResponse) Get() *EvalPreviewResponse { + return v.value +} + +func (v *NullableEvalPreviewResponse) Set(val *EvalPreviewResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalPreviewResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalPreviewResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalPreviewResponse(val *EvalPreviewResponse) *NullableEvalPreviewResponse { + return &NullableEvalPreviewResponse{value: val, isSet: true} +} + +func (v NullableEvalPreviewResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalPreviewResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_preview_result.go b/go/futureagi/model_eval_preview_result.go new file mode 100644 index 0000000..4c0891d --- /dev/null +++ b/go/futureagi/model_eval_preview_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalPreviewResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalPreviewResult{} + +// EvalPreviewResult struct for EvalPreviewResult +type EvalPreviewResult struct { + Responses []map[string]interface{} `json:"responses"` +} + +type _EvalPreviewResult EvalPreviewResult + +// NewEvalPreviewResult instantiates a new EvalPreviewResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalPreviewResult(responses []map[string]interface{}) *EvalPreviewResult { + this := EvalPreviewResult{} + this.Responses = responses + return &this +} + +// NewEvalPreviewResultWithDefaults instantiates a new EvalPreviewResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalPreviewResultWithDefaults() *EvalPreviewResult { + this := EvalPreviewResult{} + return &this +} + +// GetResponses returns the Responses field value +func (o *EvalPreviewResult) GetResponses() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Responses +} + +// GetResponsesOk returns a tuple with the Responses field value +// and a boolean to check if the value has been set. +func (o *EvalPreviewResult) GetResponsesOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Responses, true +} + +// SetResponses sets field value +func (o *EvalPreviewResult) SetResponses(v []map[string]interface{}) { + o.Responses = v +} + +func (o EvalPreviewResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalPreviewResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["responses"] = o.Responses + return toSerialize, nil +} + +func (o *EvalPreviewResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "responses", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalPreviewResult := _EvalPreviewResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalPreviewResult) + + if err != nil { + return err + } + + *o = EvalPreviewResult(varEvalPreviewResult) + + return err +} + +type NullableEvalPreviewResult struct { + value *EvalPreviewResult + isSet bool +} + +func (v NullableEvalPreviewResult) Get() *EvalPreviewResult { + return v.value +} + +func (v *NullableEvalPreviewResult) Set(val *EvalPreviewResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalPreviewResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalPreviewResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalPreviewResult(val *EvalPreviewResult) *NullableEvalPreviewResult { + return &NullableEvalPreviewResult{value: val, isSet: true} +} + +func (v NullableEvalPreviewResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalPreviewResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_structure.go b/go/futureagi/model_eval_structure.go new file mode 100644 index 0000000..1521c61 --- /dev/null +++ b/go/futureagi/model_eval_structure.go @@ -0,0 +1,1088 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalStructure type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalStructure{} + +// EvalStructure struct for EvalStructure +type EvalStructure struct { + Id string `json:"id"` + TemplateId string `json:"template_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + EvalTags []string `json:"eval_tags,omitempty"` + TemplateName *string `json:"template_name,omitempty"` + RequiredKeys []string `json:"required_keys,omitempty"` + OptionalKeys []string `json:"optional_keys,omitempty"` + VariableKeys []string `json:"variable_keys,omitempty"` + RunPromptColumn *bool `json:"run_prompt_column,omitempty"` + Mapping map[string]interface{} `json:"mapping,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` + FunctionParamsSchema map[string]interface{} `json:"function_params_schema,omitempty"` + EvalTypeId *string `json:"eval_type_id,omitempty"` + EvalType *string `json:"eval_type,omitempty"` + ReasonColumn *bool `json:"reason_column,omitempty"` + Models map[string]interface{} `json:"models,omitempty"` + SelectedModel *string `json:"selected_model,omitempty"` + Output map[string]interface{} `json:"output,omitempty"` + ConfigParamsDesc map[string]interface{} `json:"config_params_desc,omitempty"` + ConfigParamsOption map[string]interface{} `json:"config_params_option,omitempty"` + KbId NullableString `json:"kb_id,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + Choices map[string]interface{} `json:"choices,omitempty"` + ApiKeyAvailable *bool `json:"api_key_available,omitempty"` + RunConfig map[string]interface{} `json:"run_config,omitempty"` +} + +type _EvalStructure EvalStructure + +// NewEvalStructure instantiates a new EvalStructure object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalStructure(id string, templateId string, name string) *EvalStructure { + this := EvalStructure{} + this.Id = id + this.TemplateId = templateId + this.Name = name + return &this +} + +// NewEvalStructureWithDefaults instantiates a new EvalStructure object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalStructureWithDefaults() *EvalStructure { + this := EvalStructure{} + return &this +} + +// GetId returns the Id field value +func (o *EvalStructure) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalStructure) SetId(v string) { + o.Id = v +} + +// GetTemplateId returns the TemplateId field value +func (o *EvalStructure) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *EvalStructure) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetName returns the Name field value +func (o *EvalStructure) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EvalStructure) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *EvalStructure) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *EvalStructure) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *EvalStructure) SetDescription(v string) { + o.Description = &v +} + +// GetEvalTags returns the EvalTags field value if set, zero value otherwise. +func (o *EvalStructure) GetEvalTags() []string { + if o == nil || IsNil(o.EvalTags) { + var ret []string + return ret + } + return o.EvalTags +} + +// GetEvalTagsOk returns a tuple with the EvalTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetEvalTagsOk() ([]string, bool) { + if o == nil || IsNil(o.EvalTags) { + return nil, false + } + return o.EvalTags, true +} + +// HasEvalTags returns a boolean if a field has been set. +func (o *EvalStructure) HasEvalTags() bool { + if o != nil && !IsNil(o.EvalTags) { + return true + } + + return false +} + +// SetEvalTags gets a reference to the given []string and assigns it to the EvalTags field. +func (o *EvalStructure) SetEvalTags(v []string) { + o.EvalTags = v +} + +// GetTemplateName returns the TemplateName field value if set, zero value otherwise. +func (o *EvalStructure) GetTemplateName() string { + if o == nil || IsNil(o.TemplateName) { + var ret string + return ret + } + return *o.TemplateName +} + +// GetTemplateNameOk returns a tuple with the TemplateName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetTemplateNameOk() (*string, bool) { + if o == nil || IsNil(o.TemplateName) { + return nil, false + } + return o.TemplateName, true +} + +// HasTemplateName returns a boolean if a field has been set. +func (o *EvalStructure) HasTemplateName() bool { + if o != nil && !IsNil(o.TemplateName) { + return true + } + + return false +} + +// SetTemplateName gets a reference to the given string and assigns it to the TemplateName field. +func (o *EvalStructure) SetTemplateName(v string) { + o.TemplateName = &v +} + +// GetRequiredKeys returns the RequiredKeys field value if set, zero value otherwise. +func (o *EvalStructure) GetRequiredKeys() []string { + if o == nil || IsNil(o.RequiredKeys) { + var ret []string + return ret + } + return o.RequiredKeys +} + +// GetRequiredKeysOk returns a tuple with the RequiredKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetRequiredKeysOk() ([]string, bool) { + if o == nil || IsNil(o.RequiredKeys) { + return nil, false + } + return o.RequiredKeys, true +} + +// HasRequiredKeys returns a boolean if a field has been set. +func (o *EvalStructure) HasRequiredKeys() bool { + if o != nil && !IsNil(o.RequiredKeys) { + return true + } + + return false +} + +// SetRequiredKeys gets a reference to the given []string and assigns it to the RequiredKeys field. +func (o *EvalStructure) SetRequiredKeys(v []string) { + o.RequiredKeys = v +} + +// GetOptionalKeys returns the OptionalKeys field value if set, zero value otherwise. +func (o *EvalStructure) GetOptionalKeys() []string { + if o == nil || IsNil(o.OptionalKeys) { + var ret []string + return ret + } + return o.OptionalKeys +} + +// GetOptionalKeysOk returns a tuple with the OptionalKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetOptionalKeysOk() ([]string, bool) { + if o == nil || IsNil(o.OptionalKeys) { + return nil, false + } + return o.OptionalKeys, true +} + +// HasOptionalKeys returns a boolean if a field has been set. +func (o *EvalStructure) HasOptionalKeys() bool { + if o != nil && !IsNil(o.OptionalKeys) { + return true + } + + return false +} + +// SetOptionalKeys gets a reference to the given []string and assigns it to the OptionalKeys field. +func (o *EvalStructure) SetOptionalKeys(v []string) { + o.OptionalKeys = v +} + +// GetVariableKeys returns the VariableKeys field value if set, zero value otherwise. +func (o *EvalStructure) GetVariableKeys() []string { + if o == nil || IsNil(o.VariableKeys) { + var ret []string + return ret + } + return o.VariableKeys +} + +// GetVariableKeysOk returns a tuple with the VariableKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetVariableKeysOk() ([]string, bool) { + if o == nil || IsNil(o.VariableKeys) { + return nil, false + } + return o.VariableKeys, true +} + +// HasVariableKeys returns a boolean if a field has been set. +func (o *EvalStructure) HasVariableKeys() bool { + if o != nil && !IsNil(o.VariableKeys) { + return true + } + + return false +} + +// SetVariableKeys gets a reference to the given []string and assigns it to the VariableKeys field. +func (o *EvalStructure) SetVariableKeys(v []string) { + o.VariableKeys = v +} + +// GetRunPromptColumn returns the RunPromptColumn field value if set, zero value otherwise. +func (o *EvalStructure) GetRunPromptColumn() bool { + if o == nil || IsNil(o.RunPromptColumn) { + var ret bool + return ret + } + return *o.RunPromptColumn +} + +// GetRunPromptColumnOk returns a tuple with the RunPromptColumn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetRunPromptColumnOk() (*bool, bool) { + if o == nil || IsNil(o.RunPromptColumn) { + return nil, false + } + return o.RunPromptColumn, true +} + +// HasRunPromptColumn returns a boolean if a field has been set. +func (o *EvalStructure) HasRunPromptColumn() bool { + if o != nil && !IsNil(o.RunPromptColumn) { + return true + } + + return false +} + +// SetRunPromptColumn gets a reference to the given bool and assigns it to the RunPromptColumn field. +func (o *EvalStructure) SetRunPromptColumn(v bool) { + o.RunPromptColumn = &v +} + +// GetMapping returns the Mapping field value if set, zero value otherwise. +func (o *EvalStructure) GetMapping() map[string]interface{} { + if o == nil || IsNil(o.Mapping) { + var ret map[string]interface{} + return ret + } + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Mapping) { + return map[string]interface{}{}, false + } + return o.Mapping, true +} + +// HasMapping returns a boolean if a field has been set. +func (o *EvalStructure) HasMapping() bool { + if o != nil && !IsNil(o.Mapping) { + return true + } + + return false +} + +// SetMapping gets a reference to the given map[string]interface{} and assigns it to the Mapping field. +func (o *EvalStructure) SetMapping(v map[string]interface{}) { + o.Mapping = v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *EvalStructure) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *EvalStructure) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *EvalStructure) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *EvalStructure) GetParams() map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetParamsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *EvalStructure) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *EvalStructure) SetParams(v map[string]interface{}) { + o.Params = v +} + +// GetFunctionParamsSchema returns the FunctionParamsSchema field value if set, zero value otherwise. +func (o *EvalStructure) GetFunctionParamsSchema() map[string]interface{} { + if o == nil || IsNil(o.FunctionParamsSchema) { + var ret map[string]interface{} + return ret + } + return o.FunctionParamsSchema +} + +// GetFunctionParamsSchemaOk returns a tuple with the FunctionParamsSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetFunctionParamsSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.FunctionParamsSchema) { + return map[string]interface{}{}, false + } + return o.FunctionParamsSchema, true +} + +// HasFunctionParamsSchema returns a boolean if a field has been set. +func (o *EvalStructure) HasFunctionParamsSchema() bool { + if o != nil && !IsNil(o.FunctionParamsSchema) { + return true + } + + return false +} + +// SetFunctionParamsSchema gets a reference to the given map[string]interface{} and assigns it to the FunctionParamsSchema field. +func (o *EvalStructure) SetFunctionParamsSchema(v map[string]interface{}) { + o.FunctionParamsSchema = v +} + +// GetEvalTypeId returns the EvalTypeId field value if set, zero value otherwise. +func (o *EvalStructure) GetEvalTypeId() string { + if o == nil || IsNil(o.EvalTypeId) { + var ret string + return ret + } + return *o.EvalTypeId +} + +// GetEvalTypeIdOk returns a tuple with the EvalTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetEvalTypeIdOk() (*string, bool) { + if o == nil || IsNil(o.EvalTypeId) { + return nil, false + } + return o.EvalTypeId, true +} + +// HasEvalTypeId returns a boolean if a field has been set. +func (o *EvalStructure) HasEvalTypeId() bool { + if o != nil && !IsNil(o.EvalTypeId) { + return true + } + + return false +} + +// SetEvalTypeId gets a reference to the given string and assigns it to the EvalTypeId field. +func (o *EvalStructure) SetEvalTypeId(v string) { + o.EvalTypeId = &v +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise. +func (o *EvalStructure) GetEvalType() string { + if o == nil || IsNil(o.EvalType) { + var ret string + return ret + } + return *o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetEvalTypeOk() (*string, bool) { + if o == nil || IsNil(o.EvalType) { + return nil, false + } + return o.EvalType, true +} + +// HasEvalType returns a boolean if a field has been set. +func (o *EvalStructure) HasEvalType() bool { + if o != nil && !IsNil(o.EvalType) { + return true + } + + return false +} + +// SetEvalType gets a reference to the given string and assigns it to the EvalType field. +func (o *EvalStructure) SetEvalType(v string) { + o.EvalType = &v +} + +// GetReasonColumn returns the ReasonColumn field value if set, zero value otherwise. +func (o *EvalStructure) GetReasonColumn() bool { + if o == nil || IsNil(o.ReasonColumn) { + var ret bool + return ret + } + return *o.ReasonColumn +} + +// GetReasonColumnOk returns a tuple with the ReasonColumn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetReasonColumnOk() (*bool, bool) { + if o == nil || IsNil(o.ReasonColumn) { + return nil, false + } + return o.ReasonColumn, true +} + +// HasReasonColumn returns a boolean if a field has been set. +func (o *EvalStructure) HasReasonColumn() bool { + if o != nil && !IsNil(o.ReasonColumn) { + return true + } + + return false +} + +// SetReasonColumn gets a reference to the given bool and assigns it to the ReasonColumn field. +func (o *EvalStructure) SetReasonColumn(v bool) { + o.ReasonColumn = &v +} + +// GetModels returns the Models field value if set, zero value otherwise. +func (o *EvalStructure) GetModels() map[string]interface{} { + if o == nil || IsNil(o.Models) { + var ret map[string]interface{} + return ret + } + return o.Models +} + +// GetModelsOk returns a tuple with the Models field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetModelsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Models) { + return map[string]interface{}{}, false + } + return o.Models, true +} + +// HasModels returns a boolean if a field has been set. +func (o *EvalStructure) HasModels() bool { + if o != nil && !IsNil(o.Models) { + return true + } + + return false +} + +// SetModels gets a reference to the given map[string]interface{} and assigns it to the Models field. +func (o *EvalStructure) SetModels(v map[string]interface{}) { + o.Models = v +} + +// GetSelectedModel returns the SelectedModel field value if set, zero value otherwise. +func (o *EvalStructure) GetSelectedModel() string { + if o == nil || IsNil(o.SelectedModel) { + var ret string + return ret + } + return *o.SelectedModel +} + +// GetSelectedModelOk returns a tuple with the SelectedModel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetSelectedModelOk() (*string, bool) { + if o == nil || IsNil(o.SelectedModel) { + return nil, false + } + return o.SelectedModel, true +} + +// HasSelectedModel returns a boolean if a field has been set. +func (o *EvalStructure) HasSelectedModel() bool { + if o != nil && !IsNil(o.SelectedModel) { + return true + } + + return false +} + +// SetSelectedModel gets a reference to the given string and assigns it to the SelectedModel field. +func (o *EvalStructure) SetSelectedModel(v string) { + o.SelectedModel = &v +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *EvalStructure) GetOutput() map[string]interface{} { + if o == nil || IsNil(o.Output) { + var ret map[string]interface{} + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetOutputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Output) { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *EvalStructure) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given map[string]interface{} and assigns it to the Output field. +func (o *EvalStructure) SetOutput(v map[string]interface{}) { + o.Output = v +} + +// GetConfigParamsDesc returns the ConfigParamsDesc field value if set, zero value otherwise. +func (o *EvalStructure) GetConfigParamsDesc() map[string]interface{} { + if o == nil || IsNil(o.ConfigParamsDesc) { + var ret map[string]interface{} + return ret + } + return o.ConfigParamsDesc +} + +// GetConfigParamsDescOk returns a tuple with the ConfigParamsDesc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetConfigParamsDescOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConfigParamsDesc) { + return map[string]interface{}{}, false + } + return o.ConfigParamsDesc, true +} + +// HasConfigParamsDesc returns a boolean if a field has been set. +func (o *EvalStructure) HasConfigParamsDesc() bool { + if o != nil && !IsNil(o.ConfigParamsDesc) { + return true + } + + return false +} + +// SetConfigParamsDesc gets a reference to the given map[string]interface{} and assigns it to the ConfigParamsDesc field. +func (o *EvalStructure) SetConfigParamsDesc(v map[string]interface{}) { + o.ConfigParamsDesc = v +} + +// GetConfigParamsOption returns the ConfigParamsOption field value if set, zero value otherwise. +func (o *EvalStructure) GetConfigParamsOption() map[string]interface{} { + if o == nil || IsNil(o.ConfigParamsOption) { + var ret map[string]interface{} + return ret + } + return o.ConfigParamsOption +} + +// GetConfigParamsOptionOk returns a tuple with the ConfigParamsOption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetConfigParamsOptionOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConfigParamsOption) { + return map[string]interface{}{}, false + } + return o.ConfigParamsOption, true +} + +// HasConfigParamsOption returns a boolean if a field has been set. +func (o *EvalStructure) HasConfigParamsOption() bool { + if o != nil && !IsNil(o.ConfigParamsOption) { + return true + } + + return false +} + +// SetConfigParamsOption gets a reference to the given map[string]interface{} and assigns it to the ConfigParamsOption field. +func (o *EvalStructure) SetConfigParamsOption(v map[string]interface{}) { + o.ConfigParamsOption = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalStructure) GetKbId() string { + if o == nil || IsNil(o.KbId.Get()) { + var ret string + return ret + } + return *o.KbId.Get() +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalStructure) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KbId.Get(), o.KbId.IsSet() +} + +// HasKbId returns a boolean if a field has been set. +func (o *EvalStructure) HasKbId() bool { + if o != nil && o.KbId.IsSet() { + return true + } + + return false +} + +// SetKbId gets a reference to the given NullableString and assigns it to the KbId field. +func (o *EvalStructure) SetKbId(v string) { + o.KbId.Set(&v) +} + +// SetKbIdNil sets the value for KbId to be an explicit nil +func (o *EvalStructure) SetKbIdNil() { + o.KbId.Set(nil) +} + +// UnsetKbId ensures that no value is present for KbId, not even an explicit nil +func (o *EvalStructure) UnsetKbId() { + o.KbId.Unset() +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *EvalStructure) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *EvalStructure) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *EvalStructure) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetChoices returns the Choices field value if set, zero value otherwise. +func (o *EvalStructure) GetChoices() map[string]interface{} { + if o == nil || IsNil(o.Choices) { + var ret map[string]interface{} + return ret + } + return o.Choices +} + +// GetChoicesOk returns a tuple with the Choices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetChoicesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Choices) { + return map[string]interface{}{}, false + } + return o.Choices, true +} + +// HasChoices returns a boolean if a field has been set. +func (o *EvalStructure) HasChoices() bool { + if o != nil && !IsNil(o.Choices) { + return true + } + + return false +} + +// SetChoices gets a reference to the given map[string]interface{} and assigns it to the Choices field. +func (o *EvalStructure) SetChoices(v map[string]interface{}) { + o.Choices = v +} + +// GetApiKeyAvailable returns the ApiKeyAvailable field value if set, zero value otherwise. +func (o *EvalStructure) GetApiKeyAvailable() bool { + if o == nil || IsNil(o.ApiKeyAvailable) { + var ret bool + return ret + } + return *o.ApiKeyAvailable +} + +// GetApiKeyAvailableOk returns a tuple with the ApiKeyAvailable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetApiKeyAvailableOk() (*bool, bool) { + if o == nil || IsNil(o.ApiKeyAvailable) { + return nil, false + } + return o.ApiKeyAvailable, true +} + +// HasApiKeyAvailable returns a boolean if a field has been set. +func (o *EvalStructure) HasApiKeyAvailable() bool { + if o != nil && !IsNil(o.ApiKeyAvailable) { + return true + } + + return false +} + +// SetApiKeyAvailable gets a reference to the given bool and assigns it to the ApiKeyAvailable field. +func (o *EvalStructure) SetApiKeyAvailable(v bool) { + o.ApiKeyAvailable = &v +} + +// GetRunConfig returns the RunConfig field value if set, zero value otherwise. +func (o *EvalStructure) GetRunConfig() map[string]interface{} { + if o == nil || IsNil(o.RunConfig) { + var ret map[string]interface{} + return ret + } + return o.RunConfig +} + +// GetRunConfigOk returns a tuple with the RunConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalStructure) GetRunConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RunConfig) { + return map[string]interface{}{}, false + } + return o.RunConfig, true +} + +// HasRunConfig returns a boolean if a field has been set. +func (o *EvalStructure) HasRunConfig() bool { + if o != nil && !IsNil(o.RunConfig) { + return true + } + + return false +} + +// SetRunConfig gets a reference to the given map[string]interface{} and assigns it to the RunConfig field. +func (o *EvalStructure) SetRunConfig(v map[string]interface{}) { + o.RunConfig = v +} + +func (o EvalStructure) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalStructure) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["template_id"] = o.TemplateId + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.EvalTags) { + toSerialize["eval_tags"] = o.EvalTags + } + if !IsNil(o.TemplateName) { + toSerialize["template_name"] = o.TemplateName + } + if !IsNil(o.RequiredKeys) { + toSerialize["required_keys"] = o.RequiredKeys + } + if !IsNil(o.OptionalKeys) { + toSerialize["optional_keys"] = o.OptionalKeys + } + if !IsNil(o.VariableKeys) { + toSerialize["variable_keys"] = o.VariableKeys + } + if !IsNil(o.RunPromptColumn) { + toSerialize["run_prompt_column"] = o.RunPromptColumn + } + if !IsNil(o.Mapping) { + toSerialize["mapping"] = o.Mapping + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.FunctionParamsSchema) { + toSerialize["function_params_schema"] = o.FunctionParamsSchema + } + if !IsNil(o.EvalTypeId) { + toSerialize["eval_type_id"] = o.EvalTypeId + } + if !IsNil(o.EvalType) { + toSerialize["eval_type"] = o.EvalType + } + if !IsNil(o.ReasonColumn) { + toSerialize["reason_column"] = o.ReasonColumn + } + if !IsNil(o.Models) { + toSerialize["models"] = o.Models + } + if !IsNil(o.SelectedModel) { + toSerialize["selected_model"] = o.SelectedModel + } + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + if !IsNil(o.ConfigParamsDesc) { + toSerialize["config_params_desc"] = o.ConfigParamsDesc + } + if !IsNil(o.ConfigParamsOption) { + toSerialize["config_params_option"] = o.ConfigParamsOption + } + if o.KbId.IsSet() { + toSerialize["kb_id"] = o.KbId.Get() + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if !IsNil(o.Choices) { + toSerialize["choices"] = o.Choices + } + if !IsNil(o.ApiKeyAvailable) { + toSerialize["api_key_available"] = o.ApiKeyAvailable + } + if !IsNil(o.RunConfig) { + toSerialize["run_config"] = o.RunConfig + } + return toSerialize, nil +} + +func (o *EvalStructure) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "template_id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalStructure := _EvalStructure{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalStructure) + + if err != nil { + return err + } + + *o = EvalStructure(varEvalStructure) + + return err +} + +type NullableEvalStructure struct { + value *EvalStructure + isSet bool +} + +func (v NullableEvalStructure) Get() *EvalStructure { + return v.value +} + +func (v *NullableEvalStructure) Set(val *EvalStructure) { + v.value = val + v.isSet = true +} + +func (v NullableEvalStructure) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalStructure) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalStructure(val *EvalStructure) *NullableEvalStructure { + return &NullableEvalStructure{value: val, isSet: true} +} + +func (v NullableEvalStructure) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalStructure) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_structure_response.go b/go/futureagi/model_eval_structure_response.go new file mode 100644 index 0000000..90eab6a --- /dev/null +++ b/go/futureagi/model_eval_structure_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalStructureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalStructureResponse{} + +// EvalStructureResponse struct for EvalStructureResponse +type EvalStructureResponse struct { + Status bool `json:"status"` + Result EvalStructureResult `json:"result"` +} + +type _EvalStructureResponse EvalStructureResponse + +// NewEvalStructureResponse instantiates a new EvalStructureResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalStructureResponse(status bool, result EvalStructureResult) *EvalStructureResponse { + this := EvalStructureResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalStructureResponseWithDefaults instantiates a new EvalStructureResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalStructureResponseWithDefaults() *EvalStructureResponse { + this := EvalStructureResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalStructureResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalStructureResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalStructureResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalStructureResponse) GetResult() EvalStructureResult { + if o == nil { + var ret EvalStructureResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalStructureResponse) GetResultOk() (*EvalStructureResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalStructureResponse) SetResult(v EvalStructureResult) { + o.Result = v +} + +func (o EvalStructureResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalStructureResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalStructureResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalStructureResponse := _EvalStructureResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalStructureResponse) + + if err != nil { + return err + } + + *o = EvalStructureResponse(varEvalStructureResponse) + + return err +} + +type NullableEvalStructureResponse struct { + value *EvalStructureResponse + isSet bool +} + +func (v NullableEvalStructureResponse) Get() *EvalStructureResponse { + return v.value +} + +func (v *NullableEvalStructureResponse) Set(val *EvalStructureResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalStructureResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalStructureResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalStructureResponse(val *EvalStructureResponse) *NullableEvalStructureResponse { + return &NullableEvalStructureResponse{value: val, isSet: true} +} + +func (v NullableEvalStructureResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalStructureResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_structure_result.go b/go/futureagi/model_eval_structure_result.go new file mode 100644 index 0000000..54ef3f5 --- /dev/null +++ b/go/futureagi/model_eval_structure_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalStructureResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalStructureResult{} + +// EvalStructureResult struct for EvalStructureResult +type EvalStructureResult struct { + Eval EvalStructure `json:"eval"` +} + +type _EvalStructureResult EvalStructureResult + +// NewEvalStructureResult instantiates a new EvalStructureResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalStructureResult(eval EvalStructure) *EvalStructureResult { + this := EvalStructureResult{} + this.Eval = eval + return &this +} + +// NewEvalStructureResultWithDefaults instantiates a new EvalStructureResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalStructureResultWithDefaults() *EvalStructureResult { + this := EvalStructureResult{} + return &this +} + +// GetEval returns the Eval field value +func (o *EvalStructureResult) GetEval() EvalStructure { + if o == nil { + var ret EvalStructure + return ret + } + + return o.Eval +} + +// GetEvalOk returns a tuple with the Eval field value +// and a boolean to check if the value has been set. +func (o *EvalStructureResult) GetEvalOk() (*EvalStructure, bool) { + if o == nil { + return nil, false + } + return &o.Eval, true +} + +// SetEval sets field value +func (o *EvalStructureResult) SetEval(v EvalStructure) { + o.Eval = v +} + +func (o EvalStructureResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalStructureResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval"] = o.Eval + return toSerialize, nil +} + +func (o *EvalStructureResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalStructureResult := _EvalStructureResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalStructureResult) + + if err != nil { + return err + } + + *o = EvalStructureResult(varEvalStructureResult) + + return err +} + +type NullableEvalStructureResult struct { + value *EvalStructureResult + isSet bool +} + +func (v NullableEvalStructureResult) Get() *EvalStructureResult { + return v.value +} + +func (v *NullableEvalStructureResult) Set(val *EvalStructureResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalStructureResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalStructureResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalStructureResult(val *EvalStructureResult) *NullableEvalStructureResult { + return &NullableEvalStructureResult{value: val, isSet: true} +} + +func (v NullableEvalStructureResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalStructureResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_summary_comparison_response.go b/go/futureagi/model_eval_summary_comparison_response.go new file mode 100644 index 0000000..10ec5a9 --- /dev/null +++ b/go/futureagi/model_eval_summary_comparison_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalSummaryComparisonResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalSummaryComparisonResponse{} + +// EvalSummaryComparisonResponse struct for EvalSummaryComparisonResponse +type EvalSummaryComparisonResponse struct { + Status *bool `json:"status,omitempty"` + Result map[string][]EvalTemplateSummary `json:"result"` +} + +type _EvalSummaryComparisonResponse EvalSummaryComparisonResponse + +// NewEvalSummaryComparisonResponse instantiates a new EvalSummaryComparisonResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalSummaryComparisonResponse(result map[string][]EvalTemplateSummary) *EvalSummaryComparisonResponse { + this := EvalSummaryComparisonResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewEvalSummaryComparisonResponseWithDefaults instantiates a new EvalSummaryComparisonResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalSummaryComparisonResponseWithDefaults() *EvalSummaryComparisonResponse { + this := EvalSummaryComparisonResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EvalSummaryComparisonResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalSummaryComparisonResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EvalSummaryComparisonResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *EvalSummaryComparisonResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *EvalSummaryComparisonResponse) GetResult() map[string][]EvalTemplateSummary { + if o == nil { + var ret map[string][]EvalTemplateSummary + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalSummaryComparisonResponse) GetResultOk() (*map[string][]EvalTemplateSummary, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalSummaryComparisonResponse) SetResult(v map[string][]EvalTemplateSummary) { + o.Result = v +} + +func (o EvalSummaryComparisonResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalSummaryComparisonResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalSummaryComparisonResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalSummaryComparisonResponse := _EvalSummaryComparisonResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalSummaryComparisonResponse) + + if err != nil { + return err + } + + *o = EvalSummaryComparisonResponse(varEvalSummaryComparisonResponse) + + return err +} + +type NullableEvalSummaryComparisonResponse struct { + value *EvalSummaryComparisonResponse + isSet bool +} + +func (v NullableEvalSummaryComparisonResponse) Get() *EvalSummaryComparisonResponse { + return v.value +} + +func (v *NullableEvalSummaryComparisonResponse) Set(val *EvalSummaryComparisonResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalSummaryComparisonResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalSummaryComparisonResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalSummaryComparisonResponse(val *EvalSummaryComparisonResponse) *NullableEvalSummaryComparisonResponse { + return &NullableEvalSummaryComparisonResponse{value: val, isSet: true} +} + +func (v NullableEvalSummaryComparisonResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalSummaryComparisonResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_summary_response.go b/go/futureagi/model_eval_summary_response.go new file mode 100644 index 0000000..1b1b23d --- /dev/null +++ b/go/futureagi/model_eval_summary_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalSummaryResponse{} + +// EvalSummaryResponse struct for EvalSummaryResponse +type EvalSummaryResponse struct { + Status *bool `json:"status,omitempty"` + Result []EvalTemplateSummary `json:"result"` +} + +type _EvalSummaryResponse EvalSummaryResponse + +// NewEvalSummaryResponse instantiates a new EvalSummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalSummaryResponse(result []EvalTemplateSummary) *EvalSummaryResponse { + this := EvalSummaryResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewEvalSummaryResponseWithDefaults instantiates a new EvalSummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalSummaryResponseWithDefaults() *EvalSummaryResponse { + this := EvalSummaryResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EvalSummaryResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalSummaryResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EvalSummaryResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *EvalSummaryResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *EvalSummaryResponse) GetResult() []EvalTemplateSummary { + if o == nil { + var ret []EvalTemplateSummary + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalSummaryResponse) GetResultOk() ([]EvalTemplateSummary, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *EvalSummaryResponse) SetResult(v []EvalTemplateSummary) { + o.Result = v +} + +func (o EvalSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalSummaryResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalSummaryResponse := _EvalSummaryResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalSummaryResponse) + + if err != nil { + return err + } + + *o = EvalSummaryResponse(varEvalSummaryResponse) + + return err +} + +type NullableEvalSummaryResponse struct { + value *EvalSummaryResponse + isSet bool +} + +func (v NullableEvalSummaryResponse) Get() *EvalSummaryResponse { + return v.value +} + +func (v *NullableEvalSummaryResponse) Set(val *EvalSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalSummaryResponse(val *EvalSummaryResponse) *NullableEvalSummaryResponse { + return &NullableEvalSummaryResponse{value: val, isSet: true} +} + +func (v NullableEvalSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_bulk_delete_request.go b/go/futureagi/model_eval_template_bulk_delete_request.go new file mode 100644 index 0000000..f3222c4 --- /dev/null +++ b/go/futureagi/model_eval_template_bulk_delete_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateBulkDeleteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateBulkDeleteRequest{} + +// EvalTemplateBulkDeleteRequest struct for EvalTemplateBulkDeleteRequest +type EvalTemplateBulkDeleteRequest struct { + TemplateIds []string `json:"template_ids"` +} + +type _EvalTemplateBulkDeleteRequest EvalTemplateBulkDeleteRequest + +// NewEvalTemplateBulkDeleteRequest instantiates a new EvalTemplateBulkDeleteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateBulkDeleteRequest(templateIds []string) *EvalTemplateBulkDeleteRequest { + this := EvalTemplateBulkDeleteRequest{} + this.TemplateIds = templateIds + return &this +} + +// NewEvalTemplateBulkDeleteRequestWithDefaults instantiates a new EvalTemplateBulkDeleteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateBulkDeleteRequestWithDefaults() *EvalTemplateBulkDeleteRequest { + this := EvalTemplateBulkDeleteRequest{} + return &this +} + +// GetTemplateIds returns the TemplateIds field value +func (o *EvalTemplateBulkDeleteRequest) GetTemplateIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.TemplateIds +} + +// GetTemplateIdsOk returns a tuple with the TemplateIds field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateBulkDeleteRequest) GetTemplateIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.TemplateIds, true +} + +// SetTemplateIds sets field value +func (o *EvalTemplateBulkDeleteRequest) SetTemplateIds(v []string) { + o.TemplateIds = v +} + +func (o EvalTemplateBulkDeleteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateBulkDeleteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_ids"] = o.TemplateIds + return toSerialize, nil +} + +func (o *EvalTemplateBulkDeleteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateBulkDeleteRequest := _EvalTemplateBulkDeleteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateBulkDeleteRequest) + + if err != nil { + return err + } + + *o = EvalTemplateBulkDeleteRequest(varEvalTemplateBulkDeleteRequest) + + return err +} + +type NullableEvalTemplateBulkDeleteRequest struct { + value *EvalTemplateBulkDeleteRequest + isSet bool +} + +func (v NullableEvalTemplateBulkDeleteRequest) Get() *EvalTemplateBulkDeleteRequest { + return v.value +} + +func (v *NullableEvalTemplateBulkDeleteRequest) Set(val *EvalTemplateBulkDeleteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateBulkDeleteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateBulkDeleteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateBulkDeleteRequest(val *EvalTemplateBulkDeleteRequest) *NullableEvalTemplateBulkDeleteRequest { + return &NullableEvalTemplateBulkDeleteRequest{value: val, isSet: true} +} + +func (v NullableEvalTemplateBulkDeleteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateBulkDeleteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_bulk_delete_response.go b/go/futureagi/model_eval_template_bulk_delete_response.go new file mode 100644 index 0000000..9097ab1 --- /dev/null +++ b/go/futureagi/model_eval_template_bulk_delete_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateBulkDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateBulkDeleteResponse{} + +// EvalTemplateBulkDeleteResponse struct for EvalTemplateBulkDeleteResponse +type EvalTemplateBulkDeleteResponse struct { + Status bool `json:"status"` + Result EvalTemplateBulkDeleteResponseResult `json:"result"` +} + +type _EvalTemplateBulkDeleteResponse EvalTemplateBulkDeleteResponse + +// NewEvalTemplateBulkDeleteResponse instantiates a new EvalTemplateBulkDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateBulkDeleteResponse(status bool, result EvalTemplateBulkDeleteResponseResult) *EvalTemplateBulkDeleteResponse { + this := EvalTemplateBulkDeleteResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateBulkDeleteResponseWithDefaults instantiates a new EvalTemplateBulkDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateBulkDeleteResponseWithDefaults() *EvalTemplateBulkDeleteResponse { + this := EvalTemplateBulkDeleteResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateBulkDeleteResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateBulkDeleteResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateBulkDeleteResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateBulkDeleteResponse) GetResult() EvalTemplateBulkDeleteResponseResult { + if o == nil { + var ret EvalTemplateBulkDeleteResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateBulkDeleteResponse) GetResultOk() (*EvalTemplateBulkDeleteResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateBulkDeleteResponse) SetResult(v EvalTemplateBulkDeleteResponseResult) { + o.Result = v +} + +func (o EvalTemplateBulkDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateBulkDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateBulkDeleteResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateBulkDeleteResponse := _EvalTemplateBulkDeleteResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateBulkDeleteResponse) + + if err != nil { + return err + } + + *o = EvalTemplateBulkDeleteResponse(varEvalTemplateBulkDeleteResponse) + + return err +} + +type NullableEvalTemplateBulkDeleteResponse struct { + value *EvalTemplateBulkDeleteResponse + isSet bool +} + +func (v NullableEvalTemplateBulkDeleteResponse) Get() *EvalTemplateBulkDeleteResponse { + return v.value +} + +func (v *NullableEvalTemplateBulkDeleteResponse) Set(val *EvalTemplateBulkDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateBulkDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateBulkDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateBulkDeleteResponse(val *EvalTemplateBulkDeleteResponse) *NullableEvalTemplateBulkDeleteResponse { + return &NullableEvalTemplateBulkDeleteResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateBulkDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateBulkDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_bulk_delete_response_result.go b/go/futureagi/model_eval_template_bulk_delete_response_result.go new file mode 100644 index 0000000..66e3821 --- /dev/null +++ b/go/futureagi/model_eval_template_bulk_delete_response_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateBulkDeleteResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateBulkDeleteResponseResult{} + +// EvalTemplateBulkDeleteResponseResult struct for EvalTemplateBulkDeleteResponseResult +type EvalTemplateBulkDeleteResponseResult struct { + DeletedCount int32 `json:"deleted_count"` +} + +type _EvalTemplateBulkDeleteResponseResult EvalTemplateBulkDeleteResponseResult + +// NewEvalTemplateBulkDeleteResponseResult instantiates a new EvalTemplateBulkDeleteResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateBulkDeleteResponseResult(deletedCount int32) *EvalTemplateBulkDeleteResponseResult { + this := EvalTemplateBulkDeleteResponseResult{} + this.DeletedCount = deletedCount + return &this +} + +// NewEvalTemplateBulkDeleteResponseResultWithDefaults instantiates a new EvalTemplateBulkDeleteResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateBulkDeleteResponseResultWithDefaults() *EvalTemplateBulkDeleteResponseResult { + this := EvalTemplateBulkDeleteResponseResult{} + return &this +} + +// GetDeletedCount returns the DeletedCount field value +func (o *EvalTemplateBulkDeleteResponseResult) GetDeletedCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.DeletedCount +} + +// GetDeletedCountOk returns a tuple with the DeletedCount field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateBulkDeleteResponseResult) GetDeletedCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.DeletedCount, true +} + +// SetDeletedCount sets field value +func (o *EvalTemplateBulkDeleteResponseResult) SetDeletedCount(v int32) { + o.DeletedCount = v +} + +func (o EvalTemplateBulkDeleteResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateBulkDeleteResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["deleted_count"] = o.DeletedCount + return toSerialize, nil +} + +func (o *EvalTemplateBulkDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "deleted_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateBulkDeleteResponseResult := _EvalTemplateBulkDeleteResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateBulkDeleteResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateBulkDeleteResponseResult(varEvalTemplateBulkDeleteResponseResult) + + return err +} + +type NullableEvalTemplateBulkDeleteResponseResult struct { + value *EvalTemplateBulkDeleteResponseResult + isSet bool +} + +func (v NullableEvalTemplateBulkDeleteResponseResult) Get() *EvalTemplateBulkDeleteResponseResult { + return v.value +} + +func (v *NullableEvalTemplateBulkDeleteResponseResult) Set(val *EvalTemplateBulkDeleteResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateBulkDeleteResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateBulkDeleteResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateBulkDeleteResponseResult(val *EvalTemplateBulkDeleteResponseResult) *NullableEvalTemplateBulkDeleteResponseResult { + return &NullableEvalTemplateBulkDeleteResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateBulkDeleteResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateBulkDeleteResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_chart_point.go b/go/futureagi/model_eval_template_chart_point.go new file mode 100644 index 0000000..002758b --- /dev/null +++ b/go/futureagi/model_eval_template_chart_point.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateChartPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateChartPoint{} + +// EvalTemplateChartPoint struct for EvalTemplateChartPoint +type EvalTemplateChartPoint struct { + Timestamp string `json:"timestamp"` + Value float32 `json:"value"` +} + +type _EvalTemplateChartPoint EvalTemplateChartPoint + +// NewEvalTemplateChartPoint instantiates a new EvalTemplateChartPoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateChartPoint(timestamp string, value float32) *EvalTemplateChartPoint { + this := EvalTemplateChartPoint{} + this.Timestamp = timestamp + this.Value = value + return &this +} + +// NewEvalTemplateChartPointWithDefaults instantiates a new EvalTemplateChartPoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateChartPointWithDefaults() *EvalTemplateChartPoint { + this := EvalTemplateChartPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value +func (o *EvalTemplateChartPoint) GetTimestamp() string { + if o == nil { + var ret string + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateChartPoint) GetTimestampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *EvalTemplateChartPoint) SetTimestamp(v string) { + o.Timestamp = v +} + +// GetValue returns the Value field value +func (o *EvalTemplateChartPoint) GetValue() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateChartPoint) GetValueOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *EvalTemplateChartPoint) SetValue(v float32) { + o.Value = v +} + +func (o EvalTemplateChartPoint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateChartPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["timestamp"] = o.Timestamp + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *EvalTemplateChartPoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timestamp", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateChartPoint := _EvalTemplateChartPoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateChartPoint) + + if err != nil { + return err + } + + *o = EvalTemplateChartPoint(varEvalTemplateChartPoint) + + return err +} + +type NullableEvalTemplateChartPoint struct { + value *EvalTemplateChartPoint + isSet bool +} + +func (v NullableEvalTemplateChartPoint) Get() *EvalTemplateChartPoint { + return v.value +} + +func (v *NullableEvalTemplateChartPoint) Set(val *EvalTemplateChartPoint) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateChartPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateChartPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateChartPoint(val *EvalTemplateChartPoint) *NullableEvalTemplateChartPoint { + return &NullableEvalTemplateChartPoint{value: val, isSet: true} +} + +func (v NullableEvalTemplateChartPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateChartPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_create_response.go b/go/futureagi/model_eval_template_create_response.go new file mode 100644 index 0000000..7b6d1b1 --- /dev/null +++ b/go/futureagi/model_eval_template_create_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateCreateResponse{} + +// EvalTemplateCreateResponse struct for EvalTemplateCreateResponse +type EvalTemplateCreateResponse struct { + Status bool `json:"status"` + Result EvalTemplateCreateResponseResult `json:"result"` +} + +type _EvalTemplateCreateResponse EvalTemplateCreateResponse + +// NewEvalTemplateCreateResponse instantiates a new EvalTemplateCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateCreateResponse(status bool, result EvalTemplateCreateResponseResult) *EvalTemplateCreateResponse { + this := EvalTemplateCreateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateCreateResponseWithDefaults instantiates a new EvalTemplateCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateCreateResponseWithDefaults() *EvalTemplateCreateResponse { + this := EvalTemplateCreateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateCreateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateCreateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateCreateResponse) GetResult() EvalTemplateCreateResponseResult { + if o == nil { + var ret EvalTemplateCreateResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateResponse) GetResultOk() (*EvalTemplateCreateResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateCreateResponse) SetResult(v EvalTemplateCreateResponseResult) { + o.Result = v +} + +func (o EvalTemplateCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateCreateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateCreateResponse := _EvalTemplateCreateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateCreateResponse) + + if err != nil { + return err + } + + *o = EvalTemplateCreateResponse(varEvalTemplateCreateResponse) + + return err +} + +type NullableEvalTemplateCreateResponse struct { + value *EvalTemplateCreateResponse + isSet bool +} + +func (v NullableEvalTemplateCreateResponse) Get() *EvalTemplateCreateResponse { + return v.value +} + +func (v *NullableEvalTemplateCreateResponse) Set(val *EvalTemplateCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateCreateResponse(val *EvalTemplateCreateResponse) *NullableEvalTemplateCreateResponse { + return &NullableEvalTemplateCreateResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_create_response_result.go b/go/futureagi/model_eval_template_create_response_result.go new file mode 100644 index 0000000..32c9b45 --- /dev/null +++ b/go/futureagi/model_eval_template_create_response_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateCreateResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateCreateResponseResult{} + +// EvalTemplateCreateResponseResult struct for EvalTemplateCreateResponseResult +type EvalTemplateCreateResponseResult struct { + Id string `json:"id"` + Name string `json:"name"` + Version string `json:"version"` +} + +type _EvalTemplateCreateResponseResult EvalTemplateCreateResponseResult + +// NewEvalTemplateCreateResponseResult instantiates a new EvalTemplateCreateResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateCreateResponseResult(id string, name string, version string) *EvalTemplateCreateResponseResult { + this := EvalTemplateCreateResponseResult{} + this.Id = id + this.Name = name + this.Version = version + return &this +} + +// NewEvalTemplateCreateResponseResultWithDefaults instantiates a new EvalTemplateCreateResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateCreateResponseResultWithDefaults() *EvalTemplateCreateResponseResult { + this := EvalTemplateCreateResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *EvalTemplateCreateResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateCreateResponseResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *EvalTemplateCreateResponseResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateResponseResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EvalTemplateCreateResponseResult) SetName(v string) { + o.Name = v +} + +// GetVersion returns the Version field value +func (o *EvalTemplateCreateResponseResult) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateResponseResult) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *EvalTemplateCreateResponseResult) SetVersion(v string) { + o.Version = v +} + +func (o EvalTemplateCreateResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateCreateResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *EvalTemplateCreateResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateCreateResponseResult := _EvalTemplateCreateResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateCreateResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateCreateResponseResult(varEvalTemplateCreateResponseResult) + + return err +} + +type NullableEvalTemplateCreateResponseResult struct { + value *EvalTemplateCreateResponseResult + isSet bool +} + +func (v NullableEvalTemplateCreateResponseResult) Get() *EvalTemplateCreateResponseResult { + return v.value +} + +func (v *NullableEvalTemplateCreateResponseResult) Set(val *EvalTemplateCreateResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateCreateResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateCreateResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateCreateResponseResult(val *EvalTemplateCreateResponseResult) *NullableEvalTemplateCreateResponseResult { + return &NullableEvalTemplateCreateResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateCreateResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateCreateResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_create_v2_request.go b/go/futureagi/model_eval_template_create_v2_request.go new file mode 100644 index 0000000..f18dc65 --- /dev/null +++ b/go/futureagi/model_eval_template_create_v2_request.go @@ -0,0 +1,956 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalTemplateCreateV2Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateCreateV2Request{} + +// EvalTemplateCreateV2Request struct for EvalTemplateCreateV2Request +type EvalTemplateCreateV2Request struct { + Name *string `json:"name,omitempty"` + IsDraft *bool `json:"is_draft,omitempty"` + EvalType *string `json:"eval_type,omitempty"` + Instructions *string `json:"instructions,omitempty"` + Model *string `json:"model,omitempty"` + OutputType *string `json:"output_type,omitempty"` + PassThreshold *float32 `json:"pass_threshold,omitempty"` + ChoiceScores map[string]interface{} `json:"choice_scores,omitempty"` + Description NullableString `json:"description,omitempty"` + Tags []string `json:"tags,omitempty"` + CheckInternet *bool `json:"check_internet,omitempty"` + Code NullableString `json:"code,omitempty"` + CodeLanguage NullableString `json:"code_language,omitempty"` + Messages []map[string]interface{} `json:"messages,omitempty"` + FewShotExamples []map[string]interface{} `json:"few_shot_examples,omitempty"` + Mode NullableString `json:"mode,omitempty"` + Tools map[string]interface{} `json:"tools,omitempty"` + KnowledgeBases []string `json:"knowledge_bases,omitempty"` + DataInjection map[string]interface{} `json:"data_injection,omitempty"` + Summary map[string]interface{} `json:"summary,omitempty"` + ErrorLocalizerEnabled *bool `json:"error_localizer_enabled,omitempty"` + TemplateFormat *string `json:"template_format,omitempty"` +} + +// NewEvalTemplateCreateV2Request instantiates a new EvalTemplateCreateV2Request object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateCreateV2Request() *EvalTemplateCreateV2Request { + this := EvalTemplateCreateV2Request{} + var isDraft bool = false + this.IsDraft = &isDraft + var evalType string = "llm" + this.EvalType = &evalType + var model string = "turing_large" + this.Model = &model + var outputType string = "pass_fail" + this.OutputType = &outputType + var checkInternet bool = false + this.CheckInternet = &checkInternet + var errorLocalizerEnabled bool = false + this.ErrorLocalizerEnabled = &errorLocalizerEnabled + var templateFormat string = "mustache" + this.TemplateFormat = &templateFormat + return &this +} + +// NewEvalTemplateCreateV2RequestWithDefaults instantiates a new EvalTemplateCreateV2Request object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateCreateV2RequestWithDefaults() *EvalTemplateCreateV2Request { + this := EvalTemplateCreateV2Request{} + var isDraft bool = false + this.IsDraft = &isDraft + var evalType string = "llm" + this.EvalType = &evalType + var model string = "turing_large" + this.Model = &model + var outputType string = "pass_fail" + this.OutputType = &outputType + var checkInternet bool = false + this.CheckInternet = &checkInternet + var errorLocalizerEnabled bool = false + this.ErrorLocalizerEnabled = &errorLocalizerEnabled + var templateFormat string = "mustache" + this.TemplateFormat = &templateFormat + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EvalTemplateCreateV2Request) SetName(v string) { + o.Name = &v +} + +// GetIsDraft returns the IsDraft field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetIsDraft() bool { + if o == nil || IsNil(o.IsDraft) { + var ret bool + return ret + } + return *o.IsDraft +} + +// GetIsDraftOk returns a tuple with the IsDraft field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetIsDraftOk() (*bool, bool) { + if o == nil || IsNil(o.IsDraft) { + return nil, false + } + return o.IsDraft, true +} + +// HasIsDraft returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasIsDraft() bool { + if o != nil && !IsNil(o.IsDraft) { + return true + } + + return false +} + +// SetIsDraft gets a reference to the given bool and assigns it to the IsDraft field. +func (o *EvalTemplateCreateV2Request) SetIsDraft(v bool) { + o.IsDraft = &v +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetEvalType() string { + if o == nil || IsNil(o.EvalType) { + var ret string + return ret + } + return *o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetEvalTypeOk() (*string, bool) { + if o == nil || IsNil(o.EvalType) { + return nil, false + } + return o.EvalType, true +} + +// HasEvalType returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasEvalType() bool { + if o != nil && !IsNil(o.EvalType) { + return true + } + + return false +} + +// SetEvalType gets a reference to the given string and assigns it to the EvalType field. +func (o *EvalTemplateCreateV2Request) SetEvalType(v string) { + o.EvalType = &v +} + +// GetInstructions returns the Instructions field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetInstructions() string { + if o == nil || IsNil(o.Instructions) { + var ret string + return ret + } + return *o.Instructions +} + +// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetInstructionsOk() (*string, bool) { + if o == nil || IsNil(o.Instructions) { + return nil, false + } + return o.Instructions, true +} + +// HasInstructions returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasInstructions() bool { + if o != nil && !IsNil(o.Instructions) { + return true + } + + return false +} + +// SetInstructions gets a reference to the given string and assigns it to the Instructions field. +func (o *EvalTemplateCreateV2Request) SetInstructions(v string) { + o.Instructions = &v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *EvalTemplateCreateV2Request) SetModel(v string) { + o.Model = &v +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetOutputType() string { + if o == nil || IsNil(o.OutputType) { + var ret string + return ret + } + return *o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetOutputTypeOk() (*string, bool) { + if o == nil || IsNil(o.OutputType) { + return nil, false + } + return o.OutputType, true +} + +// HasOutputType returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasOutputType() bool { + if o != nil && !IsNil(o.OutputType) { + return true + } + + return false +} + +// SetOutputType gets a reference to the given string and assigns it to the OutputType field. +func (o *EvalTemplateCreateV2Request) SetOutputType(v string) { + o.OutputType = &v +} + +// GetPassThreshold returns the PassThreshold field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetPassThreshold() float32 { + if o == nil || IsNil(o.PassThreshold) { + var ret float32 + return ret + } + return *o.PassThreshold +} + +// GetPassThresholdOk returns a tuple with the PassThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetPassThresholdOk() (*float32, bool) { + if o == nil || IsNil(o.PassThreshold) { + return nil, false + } + return o.PassThreshold, true +} + +// HasPassThreshold returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasPassThreshold() bool { + if o != nil && !IsNil(o.PassThreshold) { + return true + } + + return false +} + +// SetPassThreshold gets a reference to the given float32 and assigns it to the PassThreshold field. +func (o *EvalTemplateCreateV2Request) SetPassThreshold(v float32) { + o.PassThreshold = &v +} + +// GetChoiceScores returns the ChoiceScores field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetChoiceScores() map[string]interface{} { + if o == nil || IsNil(o.ChoiceScores) { + var ret map[string]interface{} + return ret + } + return o.ChoiceScores +} + +// GetChoiceScoresOk returns a tuple with the ChoiceScores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetChoiceScoresOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChoiceScores) { + return map[string]interface{}{}, false + } + return o.ChoiceScores, true +} + +// HasChoiceScores returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasChoiceScores() bool { + if o != nil && !IsNil(o.ChoiceScores) { + return true + } + + return false +} + +// SetChoiceScores gets a reference to the given map[string]interface{} and assigns it to the ChoiceScores field. +func (o *EvalTemplateCreateV2Request) SetChoiceScores(v map[string]interface{}) { + o.ChoiceScores = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateCreateV2Request) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateCreateV2Request) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *EvalTemplateCreateV2Request) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *EvalTemplateCreateV2Request) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *EvalTemplateCreateV2Request) UnsetDescription() { + o.Description.Unset() +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EvalTemplateCreateV2Request) SetTags(v []string) { + o.Tags = v +} + +// GetCheckInternet returns the CheckInternet field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetCheckInternet() bool { + if o == nil || IsNil(o.CheckInternet) { + var ret bool + return ret + } + return *o.CheckInternet +} + +// GetCheckInternetOk returns a tuple with the CheckInternet field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetCheckInternetOk() (*bool, bool) { + if o == nil || IsNil(o.CheckInternet) { + return nil, false + } + return o.CheckInternet, true +} + +// HasCheckInternet returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasCheckInternet() bool { + if o != nil && !IsNil(o.CheckInternet) { + return true + } + + return false +} + +// SetCheckInternet gets a reference to the given bool and assigns it to the CheckInternet field. +func (o *EvalTemplateCreateV2Request) SetCheckInternet(v bool) { + o.CheckInternet = &v +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateCreateV2Request) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateCreateV2Request) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *EvalTemplateCreateV2Request) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *EvalTemplateCreateV2Request) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *EvalTemplateCreateV2Request) UnsetCode() { + o.Code.Unset() +} + +// GetCodeLanguage returns the CodeLanguage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateCreateV2Request) GetCodeLanguage() string { + if o == nil || IsNil(o.CodeLanguage.Get()) { + var ret string + return ret + } + return *o.CodeLanguage.Get() +} + +// GetCodeLanguageOk returns a tuple with the CodeLanguage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateCreateV2Request) GetCodeLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeLanguage.Get(), o.CodeLanguage.IsSet() +} + +// HasCodeLanguage returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasCodeLanguage() bool { + if o != nil && o.CodeLanguage.IsSet() { + return true + } + + return false +} + +// SetCodeLanguage gets a reference to the given NullableString and assigns it to the CodeLanguage field. +func (o *EvalTemplateCreateV2Request) SetCodeLanguage(v string) { + o.CodeLanguage.Set(&v) +} + +// SetCodeLanguageNil sets the value for CodeLanguage to be an explicit nil +func (o *EvalTemplateCreateV2Request) SetCodeLanguageNil() { + o.CodeLanguage.Set(nil) +} + +// UnsetCodeLanguage ensures that no value is present for CodeLanguage, not even an explicit nil +func (o *EvalTemplateCreateV2Request) UnsetCodeLanguage() { + o.CodeLanguage.Unset() +} + +// GetMessages returns the Messages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateCreateV2Request) GetMessages() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateCreateV2Request) GetMessagesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Messages) { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasMessages() bool { + if o != nil && !IsNil(o.Messages) { + return true + } + + return false +} + +// SetMessages gets a reference to the given []map[string]interface{} and assigns it to the Messages field. +func (o *EvalTemplateCreateV2Request) SetMessages(v []map[string]interface{}) { + o.Messages = v +} + +// GetFewShotExamples returns the FewShotExamples field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateCreateV2Request) GetFewShotExamples() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.FewShotExamples +} + +// GetFewShotExamplesOk returns a tuple with the FewShotExamples field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateCreateV2Request) GetFewShotExamplesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.FewShotExamples) { + return nil, false + } + return o.FewShotExamples, true +} + +// HasFewShotExamples returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasFewShotExamples() bool { + if o != nil && !IsNil(o.FewShotExamples) { + return true + } + + return false +} + +// SetFewShotExamples gets a reference to the given []map[string]interface{} and assigns it to the FewShotExamples field. +func (o *EvalTemplateCreateV2Request) SetFewShotExamples(v []map[string]interface{}) { + o.FewShotExamples = v +} + +// GetMode returns the Mode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateCreateV2Request) GetMode() string { + if o == nil || IsNil(o.Mode.Get()) { + var ret string + return ret + } + return *o.Mode.Get() +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateCreateV2Request) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Mode.Get(), o.Mode.IsSet() +} + +// HasMode returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasMode() bool { + if o != nil && o.Mode.IsSet() { + return true + } + + return false +} + +// SetMode gets a reference to the given NullableString and assigns it to the Mode field. +func (o *EvalTemplateCreateV2Request) SetMode(v string) { + o.Mode.Set(&v) +} + +// SetModeNil sets the value for Mode to be an explicit nil +func (o *EvalTemplateCreateV2Request) SetModeNil() { + o.Mode.Set(nil) +} + +// UnsetMode ensures that no value is present for Mode, not even an explicit nil +func (o *EvalTemplateCreateV2Request) UnsetMode() { + o.Mode.Unset() +} + +// GetTools returns the Tools field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetTools() map[string]interface{} { + if o == nil || IsNil(o.Tools) { + var ret map[string]interface{} + return ret + } + return o.Tools +} + +// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetToolsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tools) { + return map[string]interface{}{}, false + } + return o.Tools, true +} + +// HasTools returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasTools() bool { + if o != nil && !IsNil(o.Tools) { + return true + } + + return false +} + +// SetTools gets a reference to the given map[string]interface{} and assigns it to the Tools field. +func (o *EvalTemplateCreateV2Request) SetTools(v map[string]interface{}) { + o.Tools = v +} + +// GetKnowledgeBases returns the KnowledgeBases field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateCreateV2Request) GetKnowledgeBases() []string { + if o == nil { + var ret []string + return ret + } + return o.KnowledgeBases +} + +// GetKnowledgeBasesOk returns a tuple with the KnowledgeBases field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateCreateV2Request) GetKnowledgeBasesOk() ([]string, bool) { + if o == nil || IsNil(o.KnowledgeBases) { + return nil, false + } + return o.KnowledgeBases, true +} + +// HasKnowledgeBases returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasKnowledgeBases() bool { + if o != nil && !IsNil(o.KnowledgeBases) { + return true + } + + return false +} + +// SetKnowledgeBases gets a reference to the given []string and assigns it to the KnowledgeBases field. +func (o *EvalTemplateCreateV2Request) SetKnowledgeBases(v []string) { + o.KnowledgeBases = v +} + +// GetDataInjection returns the DataInjection field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetDataInjection() map[string]interface{} { + if o == nil || IsNil(o.DataInjection) { + var ret map[string]interface{} + return ret + } + return o.DataInjection +} + +// GetDataInjectionOk returns a tuple with the DataInjection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetDataInjectionOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DataInjection) { + return map[string]interface{}{}, false + } + return o.DataInjection, true +} + +// HasDataInjection returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasDataInjection() bool { + if o != nil && !IsNil(o.DataInjection) { + return true + } + + return false +} + +// SetDataInjection gets a reference to the given map[string]interface{} and assigns it to the DataInjection field. +func (o *EvalTemplateCreateV2Request) SetDataInjection(v map[string]interface{}) { + o.DataInjection = v +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetSummary() map[string]interface{} { + if o == nil || IsNil(o.Summary) { + var ret map[string]interface{} + return ret + } + return o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetSummaryOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Summary) { + return map[string]interface{}{}, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given map[string]interface{} and assigns it to the Summary field. +func (o *EvalTemplateCreateV2Request) SetSummary(v map[string]interface{}) { + o.Summary = v +} + +// GetErrorLocalizerEnabled returns the ErrorLocalizerEnabled field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetErrorLocalizerEnabled() bool { + if o == nil || IsNil(o.ErrorLocalizerEnabled) { + var ret bool + return ret + } + return *o.ErrorLocalizerEnabled +} + +// GetErrorLocalizerEnabledOk returns a tuple with the ErrorLocalizerEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetErrorLocalizerEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizerEnabled) { + return nil, false + } + return o.ErrorLocalizerEnabled, true +} + +// HasErrorLocalizerEnabled returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasErrorLocalizerEnabled() bool { + if o != nil && !IsNil(o.ErrorLocalizerEnabled) { + return true + } + + return false +} + +// SetErrorLocalizerEnabled gets a reference to the given bool and assigns it to the ErrorLocalizerEnabled field. +func (o *EvalTemplateCreateV2Request) SetErrorLocalizerEnabled(v bool) { + o.ErrorLocalizerEnabled = &v +} + +// GetTemplateFormat returns the TemplateFormat field value if set, zero value otherwise. +func (o *EvalTemplateCreateV2Request) GetTemplateFormat() string { + if o == nil || IsNil(o.TemplateFormat) { + var ret string + return ret + } + return *o.TemplateFormat +} + +// GetTemplateFormatOk returns a tuple with the TemplateFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateCreateV2Request) GetTemplateFormatOk() (*string, bool) { + if o == nil || IsNil(o.TemplateFormat) { + return nil, false + } + return o.TemplateFormat, true +} + +// HasTemplateFormat returns a boolean if a field has been set. +func (o *EvalTemplateCreateV2Request) HasTemplateFormat() bool { + if o != nil && !IsNil(o.TemplateFormat) { + return true + } + + return false +} + +// SetTemplateFormat gets a reference to the given string and assigns it to the TemplateFormat field. +func (o *EvalTemplateCreateV2Request) SetTemplateFormat(v string) { + o.TemplateFormat = &v +} + +func (o EvalTemplateCreateV2Request) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateCreateV2Request) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.IsDraft) { + toSerialize["is_draft"] = o.IsDraft + } + if !IsNil(o.EvalType) { + toSerialize["eval_type"] = o.EvalType + } + if !IsNil(o.Instructions) { + toSerialize["instructions"] = o.Instructions + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.OutputType) { + toSerialize["output_type"] = o.OutputType + } + if !IsNil(o.PassThreshold) { + toSerialize["pass_threshold"] = o.PassThreshold + } + if !IsNil(o.ChoiceScores) { + toSerialize["choice_scores"] = o.ChoiceScores + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.CheckInternet) { + toSerialize["check_internet"] = o.CheckInternet + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.CodeLanguage.IsSet() { + toSerialize["code_language"] = o.CodeLanguage.Get() + } + if o.Messages != nil { + toSerialize["messages"] = o.Messages + } + if o.FewShotExamples != nil { + toSerialize["few_shot_examples"] = o.FewShotExamples + } + if o.Mode.IsSet() { + toSerialize["mode"] = o.Mode.Get() + } + if !IsNil(o.Tools) { + toSerialize["tools"] = o.Tools + } + if o.KnowledgeBases != nil { + toSerialize["knowledge_bases"] = o.KnowledgeBases + } + if !IsNil(o.DataInjection) { + toSerialize["data_injection"] = o.DataInjection + } + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + if !IsNil(o.ErrorLocalizerEnabled) { + toSerialize["error_localizer_enabled"] = o.ErrorLocalizerEnabled + } + if !IsNil(o.TemplateFormat) { + toSerialize["template_format"] = o.TemplateFormat + } + return toSerialize, nil +} + +type NullableEvalTemplateCreateV2Request struct { + value *EvalTemplateCreateV2Request + isSet bool +} + +func (v NullableEvalTemplateCreateV2Request) Get() *EvalTemplateCreateV2Request { + return v.value +} + +func (v *NullableEvalTemplateCreateV2Request) Set(val *EvalTemplateCreateV2Request) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateCreateV2Request) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateCreateV2Request) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateCreateV2Request(val *EvalTemplateCreateV2Request) *NullableEvalTemplateCreateV2Request { + return &NullableEvalTemplateCreateV2Request{value: val, isSet: true} +} + +func (v NullableEvalTemplateCreateV2Request) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateCreateV2Request) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_detail_response.go b/go/futureagi/model_eval_template_detail_response.go new file mode 100644 index 0000000..050ded3 --- /dev/null +++ b/go/futureagi/model_eval_template_detail_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateDetailResponse{} + +// EvalTemplateDetailResponse struct for EvalTemplateDetailResponse +type EvalTemplateDetailResponse struct { + Status bool `json:"status"` + Result EvalTemplateDetailResponseResult `json:"result"` +} + +type _EvalTemplateDetailResponse EvalTemplateDetailResponse + +// NewEvalTemplateDetailResponse instantiates a new EvalTemplateDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateDetailResponse(status bool, result EvalTemplateDetailResponseResult) *EvalTemplateDetailResponse { + this := EvalTemplateDetailResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateDetailResponseWithDefaults instantiates a new EvalTemplateDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateDetailResponseWithDefaults() *EvalTemplateDetailResponse { + this := EvalTemplateDetailResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateDetailResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateDetailResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateDetailResponse) GetResult() EvalTemplateDetailResponseResult { + if o == nil { + var ret EvalTemplateDetailResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponse) GetResultOk() (*EvalTemplateDetailResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateDetailResponse) SetResult(v EvalTemplateDetailResponseResult) { + o.Result = v +} + +func (o EvalTemplateDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateDetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateDetailResponse := _EvalTemplateDetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateDetailResponse) + + if err != nil { + return err + } + + *o = EvalTemplateDetailResponse(varEvalTemplateDetailResponse) + + return err +} + +type NullableEvalTemplateDetailResponse struct { + value *EvalTemplateDetailResponse + isSet bool +} + +func (v NullableEvalTemplateDetailResponse) Get() *EvalTemplateDetailResponse { + return v.value +} + +func (v *NullableEvalTemplateDetailResponse) Set(val *EvalTemplateDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateDetailResponse(val *EvalTemplateDetailResponse) *NullableEvalTemplateDetailResponse { + return &NullableEvalTemplateDetailResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_detail_response_result.go b/go/futureagi/model_eval_template_detail_response_result.go new file mode 100644 index 0000000..fb14295 --- /dev/null +++ b/go/futureagi/model_eval_template_detail_response_result.go @@ -0,0 +1,1068 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateDetailResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateDetailResponseResult{} + +// EvalTemplateDetailResponseResult struct for EvalTemplateDetailResponseResult +type EvalTemplateDetailResponseResult struct { + Id string `json:"id"` + Name string `json:"name"` + Description NullableString `json:"description,omitempty"` + TemplateType string `json:"template_type"` + EvalType string `json:"eval_type"` + Instructions NullableString `json:"instructions,omitempty"` + Model NullableString `json:"model,omitempty"` + OutputType string `json:"output_type"` + PassThreshold float32 `json:"pass_threshold"` + ChoiceScores map[string]interface{} `json:"choice_scores,omitempty"` + Choices map[string]interface{} `json:"choices,omitempty"` + MultiChoice bool `json:"multi_choice"` + Code NullableString `json:"code,omitempty"` + CodeLanguage NullableString `json:"code_language,omitempty"` + RequiredKeys []string `json:"required_keys"` + Owner string `json:"owner"` + CreatedByName string `json:"created_by_name"` + VersionCount int32 `json:"version_count"` + CurrentVersion string `json:"current_version"` + Tags []string `json:"tags"` + CheckInternet bool `json:"check_internet"` + ErrorLocalizerEnabled bool `json:"error_localizer_enabled"` + TemplateFormat string `json:"template_format"` + AggregationEnabled bool `json:"aggregation_enabled"` + AggregationFunction string `json:"aggregation_function"` + CompositeChildAxis *string `json:"composite_child_axis,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` +} + +type _EvalTemplateDetailResponseResult EvalTemplateDetailResponseResult + +// NewEvalTemplateDetailResponseResult instantiates a new EvalTemplateDetailResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateDetailResponseResult(id string, name string, templateType string, evalType string, outputType string, passThreshold float32, multiChoice bool, requiredKeys []string, owner string, createdByName string, versionCount int32, currentVersion string, tags []string, checkInternet bool, errorLocalizerEnabled bool, templateFormat string, aggregationEnabled bool, aggregationFunction string, createdAt string, updatedAt string) *EvalTemplateDetailResponseResult { + this := EvalTemplateDetailResponseResult{} + this.Id = id + this.Name = name + this.TemplateType = templateType + this.EvalType = evalType + this.OutputType = outputType + this.PassThreshold = passThreshold + this.MultiChoice = multiChoice + this.RequiredKeys = requiredKeys + this.Owner = owner + this.CreatedByName = createdByName + this.VersionCount = versionCount + this.CurrentVersion = currentVersion + this.Tags = tags + this.CheckInternet = checkInternet + this.ErrorLocalizerEnabled = errorLocalizerEnabled + this.TemplateFormat = templateFormat + this.AggregationEnabled = aggregationEnabled + this.AggregationFunction = aggregationFunction + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + return &this +} + +// NewEvalTemplateDetailResponseResultWithDefaults instantiates a new EvalTemplateDetailResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateDetailResponseResultWithDefaults() *EvalTemplateDetailResponseResult { + this := EvalTemplateDetailResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *EvalTemplateDetailResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateDetailResponseResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *EvalTemplateDetailResponseResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EvalTemplateDetailResponseResult) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateDetailResponseResult) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateDetailResponseResult) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *EvalTemplateDetailResponseResult) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *EvalTemplateDetailResponseResult) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *EvalTemplateDetailResponseResult) UnsetDescription() { + o.Description.Unset() +} + +// GetTemplateType returns the TemplateType field value +func (o *EvalTemplateDetailResponseResult) GetTemplateType() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateType +} + +// GetTemplateTypeOk returns a tuple with the TemplateType field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetTemplateTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateType, true +} + +// SetTemplateType sets field value +func (o *EvalTemplateDetailResponseResult) SetTemplateType(v string) { + o.TemplateType = v +} + +// GetEvalType returns the EvalType field value +func (o *EvalTemplateDetailResponseResult) GetEvalType() string { + if o == nil { + var ret string + return ret + } + + return o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetEvalTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalType, true +} + +// SetEvalType sets field value +func (o *EvalTemplateDetailResponseResult) SetEvalType(v string) { + o.EvalType = v +} + +// GetInstructions returns the Instructions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateDetailResponseResult) GetInstructions() string { + if o == nil || IsNil(o.Instructions.Get()) { + var ret string + return ret + } + return *o.Instructions.Get() +} + +// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateDetailResponseResult) GetInstructionsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instructions.Get(), o.Instructions.IsSet() +} + +// HasInstructions returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasInstructions() bool { + if o != nil && o.Instructions.IsSet() { + return true + } + + return false +} + +// SetInstructions gets a reference to the given NullableString and assigns it to the Instructions field. +func (o *EvalTemplateDetailResponseResult) SetInstructions(v string) { + o.Instructions.Set(&v) +} + +// SetInstructionsNil sets the value for Instructions to be an explicit nil +func (o *EvalTemplateDetailResponseResult) SetInstructionsNil() { + o.Instructions.Set(nil) +} + +// UnsetInstructions ensures that no value is present for Instructions, not even an explicit nil +func (o *EvalTemplateDetailResponseResult) UnsetInstructions() { + o.Instructions.Unset() +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateDetailResponseResult) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateDetailResponseResult) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *EvalTemplateDetailResponseResult) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *EvalTemplateDetailResponseResult) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *EvalTemplateDetailResponseResult) UnsetModel() { + o.Model.Unset() +} + +// GetOutputType returns the OutputType field value +func (o *EvalTemplateDetailResponseResult) GetOutputType() string { + if o == nil { + var ret string + return ret + } + + return o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OutputType, true +} + +// SetOutputType sets field value +func (o *EvalTemplateDetailResponseResult) SetOutputType(v string) { + o.OutputType = v +} + +// GetPassThreshold returns the PassThreshold field value +func (o *EvalTemplateDetailResponseResult) GetPassThreshold() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.PassThreshold +} + +// GetPassThresholdOk returns a tuple with the PassThreshold field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetPassThresholdOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.PassThreshold, true +} + +// SetPassThreshold sets field value +func (o *EvalTemplateDetailResponseResult) SetPassThreshold(v float32) { + o.PassThreshold = v +} + +// GetChoiceScores returns the ChoiceScores field value if set, zero value otherwise. +func (o *EvalTemplateDetailResponseResult) GetChoiceScores() map[string]interface{} { + if o == nil || IsNil(o.ChoiceScores) { + var ret map[string]interface{} + return ret + } + return o.ChoiceScores +} + +// GetChoiceScoresOk returns a tuple with the ChoiceScores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetChoiceScoresOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChoiceScores) { + return map[string]interface{}{}, false + } + return o.ChoiceScores, true +} + +// HasChoiceScores returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasChoiceScores() bool { + if o != nil && !IsNil(o.ChoiceScores) { + return true + } + + return false +} + +// SetChoiceScores gets a reference to the given map[string]interface{} and assigns it to the ChoiceScores field. +func (o *EvalTemplateDetailResponseResult) SetChoiceScores(v map[string]interface{}) { + o.ChoiceScores = v +} + +// GetChoices returns the Choices field value if set, zero value otherwise. +func (o *EvalTemplateDetailResponseResult) GetChoices() map[string]interface{} { + if o == nil || IsNil(o.Choices) { + var ret map[string]interface{} + return ret + } + return o.Choices +} + +// GetChoicesOk returns a tuple with the Choices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetChoicesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Choices) { + return map[string]interface{}{}, false + } + return o.Choices, true +} + +// HasChoices returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasChoices() bool { + if o != nil && !IsNil(o.Choices) { + return true + } + + return false +} + +// SetChoices gets a reference to the given map[string]interface{} and assigns it to the Choices field. +func (o *EvalTemplateDetailResponseResult) SetChoices(v map[string]interface{}) { + o.Choices = v +} + +// GetMultiChoice returns the MultiChoice field value +func (o *EvalTemplateDetailResponseResult) GetMultiChoice() bool { + if o == nil { + var ret bool + return ret + } + + return o.MultiChoice +} + +// GetMultiChoiceOk returns a tuple with the MultiChoice field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetMultiChoiceOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.MultiChoice, true +} + +// SetMultiChoice sets field value +func (o *EvalTemplateDetailResponseResult) SetMultiChoice(v bool) { + o.MultiChoice = v +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateDetailResponseResult) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateDetailResponseResult) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *EvalTemplateDetailResponseResult) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *EvalTemplateDetailResponseResult) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *EvalTemplateDetailResponseResult) UnsetCode() { + o.Code.Unset() +} + +// GetCodeLanguage returns the CodeLanguage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateDetailResponseResult) GetCodeLanguage() string { + if o == nil || IsNil(o.CodeLanguage.Get()) { + var ret string + return ret + } + return *o.CodeLanguage.Get() +} + +// GetCodeLanguageOk returns a tuple with the CodeLanguage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateDetailResponseResult) GetCodeLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeLanguage.Get(), o.CodeLanguage.IsSet() +} + +// HasCodeLanguage returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasCodeLanguage() bool { + if o != nil && o.CodeLanguage.IsSet() { + return true + } + + return false +} + +// SetCodeLanguage gets a reference to the given NullableString and assigns it to the CodeLanguage field. +func (o *EvalTemplateDetailResponseResult) SetCodeLanguage(v string) { + o.CodeLanguage.Set(&v) +} + +// SetCodeLanguageNil sets the value for CodeLanguage to be an explicit nil +func (o *EvalTemplateDetailResponseResult) SetCodeLanguageNil() { + o.CodeLanguage.Set(nil) +} + +// UnsetCodeLanguage ensures that no value is present for CodeLanguage, not even an explicit nil +func (o *EvalTemplateDetailResponseResult) UnsetCodeLanguage() { + o.CodeLanguage.Unset() +} + +// GetRequiredKeys returns the RequiredKeys field value +func (o *EvalTemplateDetailResponseResult) GetRequiredKeys() []string { + if o == nil { + var ret []string + return ret + } + + return o.RequiredKeys +} + +// GetRequiredKeysOk returns a tuple with the RequiredKeys field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetRequiredKeysOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.RequiredKeys, true +} + +// SetRequiredKeys sets field value +func (o *EvalTemplateDetailResponseResult) SetRequiredKeys(v []string) { + o.RequiredKeys = v +} + +// GetOwner returns the Owner field value +func (o *EvalTemplateDetailResponseResult) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *EvalTemplateDetailResponseResult) SetOwner(v string) { + o.Owner = v +} + +// GetCreatedByName returns the CreatedByName field value +func (o *EvalTemplateDetailResponseResult) GetCreatedByName() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedByName +} + +// GetCreatedByNameOk returns a tuple with the CreatedByName field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetCreatedByNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedByName, true +} + +// SetCreatedByName sets field value +func (o *EvalTemplateDetailResponseResult) SetCreatedByName(v string) { + o.CreatedByName = v +} + +// GetVersionCount returns the VersionCount field value +func (o *EvalTemplateDetailResponseResult) GetVersionCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.VersionCount +} + +// GetVersionCountOk returns a tuple with the VersionCount field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetVersionCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.VersionCount, true +} + +// SetVersionCount sets field value +func (o *EvalTemplateDetailResponseResult) SetVersionCount(v int32) { + o.VersionCount = v +} + +// GetCurrentVersion returns the CurrentVersion field value +func (o *EvalTemplateDetailResponseResult) GetCurrentVersion() string { + if o == nil { + var ret string + return ret + } + + return o.CurrentVersion +} + +// GetCurrentVersionOk returns a tuple with the CurrentVersion field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetCurrentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CurrentVersion, true +} + +// SetCurrentVersion sets field value +func (o *EvalTemplateDetailResponseResult) SetCurrentVersion(v string) { + o.CurrentVersion = v +} + +// GetTags returns the Tags field value +func (o *EvalTemplateDetailResponseResult) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *EvalTemplateDetailResponseResult) SetTags(v []string) { + o.Tags = v +} + +// GetCheckInternet returns the CheckInternet field value +func (o *EvalTemplateDetailResponseResult) GetCheckInternet() bool { + if o == nil { + var ret bool + return ret + } + + return o.CheckInternet +} + +// GetCheckInternetOk returns a tuple with the CheckInternet field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetCheckInternetOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.CheckInternet, true +} + +// SetCheckInternet sets field value +func (o *EvalTemplateDetailResponseResult) SetCheckInternet(v bool) { + o.CheckInternet = v +} + +// GetErrorLocalizerEnabled returns the ErrorLocalizerEnabled field value +func (o *EvalTemplateDetailResponseResult) GetErrorLocalizerEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.ErrorLocalizerEnabled +} + +// GetErrorLocalizerEnabledOk returns a tuple with the ErrorLocalizerEnabled field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetErrorLocalizerEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.ErrorLocalizerEnabled, true +} + +// SetErrorLocalizerEnabled sets field value +func (o *EvalTemplateDetailResponseResult) SetErrorLocalizerEnabled(v bool) { + o.ErrorLocalizerEnabled = v +} + +// GetTemplateFormat returns the TemplateFormat field value +func (o *EvalTemplateDetailResponseResult) GetTemplateFormat() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateFormat +} + +// GetTemplateFormatOk returns a tuple with the TemplateFormat field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetTemplateFormatOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateFormat, true +} + +// SetTemplateFormat sets field value +func (o *EvalTemplateDetailResponseResult) SetTemplateFormat(v string) { + o.TemplateFormat = v +} + +// GetAggregationEnabled returns the AggregationEnabled field value +func (o *EvalTemplateDetailResponseResult) GetAggregationEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.AggregationEnabled +} + +// GetAggregationEnabledOk returns a tuple with the AggregationEnabled field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetAggregationEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AggregationEnabled, true +} + +// SetAggregationEnabled sets field value +func (o *EvalTemplateDetailResponseResult) SetAggregationEnabled(v bool) { + o.AggregationEnabled = v +} + +// GetAggregationFunction returns the AggregationFunction field value +func (o *EvalTemplateDetailResponseResult) GetAggregationFunction() string { + if o == nil { + var ret string + return ret + } + + return o.AggregationFunction +} + +// GetAggregationFunctionOk returns a tuple with the AggregationFunction field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetAggregationFunctionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AggregationFunction, true +} + +// SetAggregationFunction sets field value +func (o *EvalTemplateDetailResponseResult) SetAggregationFunction(v string) { + o.AggregationFunction = v +} + +// GetCompositeChildAxis returns the CompositeChildAxis field value if set, zero value otherwise. +func (o *EvalTemplateDetailResponseResult) GetCompositeChildAxis() string { + if o == nil || IsNil(o.CompositeChildAxis) { + var ret string + return ret + } + return *o.CompositeChildAxis +} + +// GetCompositeChildAxisOk returns a tuple with the CompositeChildAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetCompositeChildAxisOk() (*string, bool) { + if o == nil || IsNil(o.CompositeChildAxis) { + return nil, false + } + return o.CompositeChildAxis, true +} + +// HasCompositeChildAxis returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasCompositeChildAxis() bool { + if o != nil && !IsNil(o.CompositeChildAxis) { + return true + } + + return false +} + +// SetCompositeChildAxis gets a reference to the given string and assigns it to the CompositeChildAxis field. +func (o *EvalTemplateDetailResponseResult) SetCompositeChildAxis(v string) { + o.CompositeChildAxis = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *EvalTemplateDetailResponseResult) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *EvalTemplateDetailResponseResult) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *EvalTemplateDetailResponseResult) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *EvalTemplateDetailResponseResult) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *EvalTemplateDetailResponseResult) SetCreatedAt(v string) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *EvalTemplateDetailResponseResult) GetUpdatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateDetailResponseResult) GetUpdatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *EvalTemplateDetailResponseResult) SetUpdatedAt(v string) { + o.UpdatedAt = v +} + +func (o EvalTemplateDetailResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateDetailResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["template_type"] = o.TemplateType + toSerialize["eval_type"] = o.EvalType + if o.Instructions.IsSet() { + toSerialize["instructions"] = o.Instructions.Get() + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + toSerialize["output_type"] = o.OutputType + toSerialize["pass_threshold"] = o.PassThreshold + if !IsNil(o.ChoiceScores) { + toSerialize["choice_scores"] = o.ChoiceScores + } + if !IsNil(o.Choices) { + toSerialize["choices"] = o.Choices + } + toSerialize["multi_choice"] = o.MultiChoice + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.CodeLanguage.IsSet() { + toSerialize["code_language"] = o.CodeLanguage.Get() + } + toSerialize["required_keys"] = o.RequiredKeys + toSerialize["owner"] = o.Owner + toSerialize["created_by_name"] = o.CreatedByName + toSerialize["version_count"] = o.VersionCount + toSerialize["current_version"] = o.CurrentVersion + toSerialize["tags"] = o.Tags + toSerialize["check_internet"] = o.CheckInternet + toSerialize["error_localizer_enabled"] = o.ErrorLocalizerEnabled + toSerialize["template_format"] = o.TemplateFormat + toSerialize["aggregation_enabled"] = o.AggregationEnabled + toSerialize["aggregation_function"] = o.AggregationFunction + if !IsNil(o.CompositeChildAxis) { + toSerialize["composite_child_axis"] = o.CompositeChildAxis + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + return toSerialize, nil +} + +func (o *EvalTemplateDetailResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "template_type", + "eval_type", + "output_type", + "pass_threshold", + "multi_choice", + "required_keys", + "owner", + "created_by_name", + "version_count", + "current_version", + "tags", + "check_internet", + "error_localizer_enabled", + "template_format", + "aggregation_enabled", + "aggregation_function", + "created_at", + "updated_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateDetailResponseResult := _EvalTemplateDetailResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateDetailResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateDetailResponseResult(varEvalTemplateDetailResponseResult) + + return err +} + +type NullableEvalTemplateDetailResponseResult struct { + value *EvalTemplateDetailResponseResult + isSet bool +} + +func (v NullableEvalTemplateDetailResponseResult) Get() *EvalTemplateDetailResponseResult { + return v.value +} + +func (v *NullableEvalTemplateDetailResponseResult) Set(val *EvalTemplateDetailResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateDetailResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateDetailResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateDetailResponseResult(val *EvalTemplateDetailResponseResult) *NullableEvalTemplateDetailResponseResult { + return &NullableEvalTemplateDetailResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateDetailResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateDetailResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_list_charts_item.go b/go/futureagi/model_eval_template_list_charts_item.go new file mode 100644 index 0000000..e6323d1 --- /dev/null +++ b/go/futureagi/model_eval_template_list_charts_item.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateListChartsItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateListChartsItem{} + +// EvalTemplateListChartsItem struct for EvalTemplateListChartsItem +type EvalTemplateListChartsItem struct { + Chart []EvalTemplateChartPoint `json:"chart"` + ErrorRate []EvalTemplateChartPoint `json:"error_rate"` + RunCount int32 `json:"run_count"` +} + +type _EvalTemplateListChartsItem EvalTemplateListChartsItem + +// NewEvalTemplateListChartsItem instantiates a new EvalTemplateListChartsItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateListChartsItem(chart []EvalTemplateChartPoint, errorRate []EvalTemplateChartPoint, runCount int32) *EvalTemplateListChartsItem { + this := EvalTemplateListChartsItem{} + this.Chart = chart + this.ErrorRate = errorRate + this.RunCount = runCount + return &this +} + +// NewEvalTemplateListChartsItemWithDefaults instantiates a new EvalTemplateListChartsItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateListChartsItemWithDefaults() *EvalTemplateListChartsItem { + this := EvalTemplateListChartsItem{} + return &this +} + +// GetChart returns the Chart field value +func (o *EvalTemplateListChartsItem) GetChart() []EvalTemplateChartPoint { + if o == nil { + var ret []EvalTemplateChartPoint + return ret + } + + return o.Chart +} + +// GetChartOk returns a tuple with the Chart field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListChartsItem) GetChartOk() ([]EvalTemplateChartPoint, bool) { + if o == nil { + return nil, false + } + return o.Chart, true +} + +// SetChart sets field value +func (o *EvalTemplateListChartsItem) SetChart(v []EvalTemplateChartPoint) { + o.Chart = v +} + +// GetErrorRate returns the ErrorRate field value +func (o *EvalTemplateListChartsItem) GetErrorRate() []EvalTemplateChartPoint { + if o == nil { + var ret []EvalTemplateChartPoint + return ret + } + + return o.ErrorRate +} + +// GetErrorRateOk returns a tuple with the ErrorRate field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListChartsItem) GetErrorRateOk() ([]EvalTemplateChartPoint, bool) { + if o == nil { + return nil, false + } + return o.ErrorRate, true +} + +// SetErrorRate sets field value +func (o *EvalTemplateListChartsItem) SetErrorRate(v []EvalTemplateChartPoint) { + o.ErrorRate = v +} + +// GetRunCount returns the RunCount field value +func (o *EvalTemplateListChartsItem) GetRunCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RunCount +} + +// GetRunCountOk returns a tuple with the RunCount field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListChartsItem) GetRunCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RunCount, true +} + +// SetRunCount sets field value +func (o *EvalTemplateListChartsItem) SetRunCount(v int32) { + o.RunCount = v +} + +func (o EvalTemplateListChartsItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateListChartsItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chart"] = o.Chart + toSerialize["error_rate"] = o.ErrorRate + toSerialize["run_count"] = o.RunCount + return toSerialize, nil +} + +func (o *EvalTemplateListChartsItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "chart", + "error_rate", + "run_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateListChartsItem := _EvalTemplateListChartsItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateListChartsItem) + + if err != nil { + return err + } + + *o = EvalTemplateListChartsItem(varEvalTemplateListChartsItem) + + return err +} + +type NullableEvalTemplateListChartsItem struct { + value *EvalTemplateListChartsItem + isSet bool +} + +func (v NullableEvalTemplateListChartsItem) Get() *EvalTemplateListChartsItem { + return v.value +} + +func (v *NullableEvalTemplateListChartsItem) Set(val *EvalTemplateListChartsItem) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateListChartsItem) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateListChartsItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateListChartsItem(val *EvalTemplateListChartsItem) *NullableEvalTemplateListChartsItem { + return &NullableEvalTemplateListChartsItem{value: val, isSet: true} +} + +func (v NullableEvalTemplateListChartsItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateListChartsItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_list_charts_request.go b/go/futureagi/model_eval_template_list_charts_request.go new file mode 100644 index 0000000..26881eb --- /dev/null +++ b/go/futureagi/model_eval_template_list_charts_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateListChartsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateListChartsRequest{} + +// EvalTemplateListChartsRequest struct for EvalTemplateListChartsRequest +type EvalTemplateListChartsRequest struct { + TemplateIds []string `json:"template_ids"` +} + +type _EvalTemplateListChartsRequest EvalTemplateListChartsRequest + +// NewEvalTemplateListChartsRequest instantiates a new EvalTemplateListChartsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateListChartsRequest(templateIds []string) *EvalTemplateListChartsRequest { + this := EvalTemplateListChartsRequest{} + this.TemplateIds = templateIds + return &this +} + +// NewEvalTemplateListChartsRequestWithDefaults instantiates a new EvalTemplateListChartsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateListChartsRequestWithDefaults() *EvalTemplateListChartsRequest { + this := EvalTemplateListChartsRequest{} + return &this +} + +// GetTemplateIds returns the TemplateIds field value +func (o *EvalTemplateListChartsRequest) GetTemplateIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.TemplateIds +} + +// GetTemplateIdsOk returns a tuple with the TemplateIds field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListChartsRequest) GetTemplateIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.TemplateIds, true +} + +// SetTemplateIds sets field value +func (o *EvalTemplateListChartsRequest) SetTemplateIds(v []string) { + o.TemplateIds = v +} + +func (o EvalTemplateListChartsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateListChartsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_ids"] = o.TemplateIds + return toSerialize, nil +} + +func (o *EvalTemplateListChartsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateListChartsRequest := _EvalTemplateListChartsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateListChartsRequest) + + if err != nil { + return err + } + + *o = EvalTemplateListChartsRequest(varEvalTemplateListChartsRequest) + + return err +} + +type NullableEvalTemplateListChartsRequest struct { + value *EvalTemplateListChartsRequest + isSet bool +} + +func (v NullableEvalTemplateListChartsRequest) Get() *EvalTemplateListChartsRequest { + return v.value +} + +func (v *NullableEvalTemplateListChartsRequest) Set(val *EvalTemplateListChartsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateListChartsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateListChartsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateListChartsRequest(val *EvalTemplateListChartsRequest) *NullableEvalTemplateListChartsRequest { + return &NullableEvalTemplateListChartsRequest{value: val, isSet: true} +} + +func (v NullableEvalTemplateListChartsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateListChartsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_list_charts_response.go b/go/futureagi/model_eval_template_list_charts_response.go new file mode 100644 index 0000000..d455cbf --- /dev/null +++ b/go/futureagi/model_eval_template_list_charts_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateListChartsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateListChartsResponse{} + +// EvalTemplateListChartsResponse struct for EvalTemplateListChartsResponse +type EvalTemplateListChartsResponse struct { + Status bool `json:"status"` + Result EvalTemplateListChartsResponseResult `json:"result"` +} + +type _EvalTemplateListChartsResponse EvalTemplateListChartsResponse + +// NewEvalTemplateListChartsResponse instantiates a new EvalTemplateListChartsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateListChartsResponse(status bool, result EvalTemplateListChartsResponseResult) *EvalTemplateListChartsResponse { + this := EvalTemplateListChartsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateListChartsResponseWithDefaults instantiates a new EvalTemplateListChartsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateListChartsResponseWithDefaults() *EvalTemplateListChartsResponse { + this := EvalTemplateListChartsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateListChartsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListChartsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateListChartsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateListChartsResponse) GetResult() EvalTemplateListChartsResponseResult { + if o == nil { + var ret EvalTemplateListChartsResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListChartsResponse) GetResultOk() (*EvalTemplateListChartsResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateListChartsResponse) SetResult(v EvalTemplateListChartsResponseResult) { + o.Result = v +} + +func (o EvalTemplateListChartsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateListChartsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateListChartsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateListChartsResponse := _EvalTemplateListChartsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateListChartsResponse) + + if err != nil { + return err + } + + *o = EvalTemplateListChartsResponse(varEvalTemplateListChartsResponse) + + return err +} + +type NullableEvalTemplateListChartsResponse struct { + value *EvalTemplateListChartsResponse + isSet bool +} + +func (v NullableEvalTemplateListChartsResponse) Get() *EvalTemplateListChartsResponse { + return v.value +} + +func (v *NullableEvalTemplateListChartsResponse) Set(val *EvalTemplateListChartsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateListChartsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateListChartsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateListChartsResponse(val *EvalTemplateListChartsResponse) *NullableEvalTemplateListChartsResponse { + return &NullableEvalTemplateListChartsResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateListChartsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateListChartsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_list_charts_response_result.go b/go/futureagi/model_eval_template_list_charts_response_result.go new file mode 100644 index 0000000..f15df03 --- /dev/null +++ b/go/futureagi/model_eval_template_list_charts_response_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateListChartsResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateListChartsResponseResult{} + +// EvalTemplateListChartsResponseResult struct for EvalTemplateListChartsResponseResult +type EvalTemplateListChartsResponseResult struct { + Charts map[string]EvalTemplateListChartsItem `json:"charts"` +} + +type _EvalTemplateListChartsResponseResult EvalTemplateListChartsResponseResult + +// NewEvalTemplateListChartsResponseResult instantiates a new EvalTemplateListChartsResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateListChartsResponseResult(charts map[string]EvalTemplateListChartsItem) *EvalTemplateListChartsResponseResult { + this := EvalTemplateListChartsResponseResult{} + this.Charts = charts + return &this +} + +// NewEvalTemplateListChartsResponseResultWithDefaults instantiates a new EvalTemplateListChartsResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateListChartsResponseResultWithDefaults() *EvalTemplateListChartsResponseResult { + this := EvalTemplateListChartsResponseResult{} + return &this +} + +// GetCharts returns the Charts field value +func (o *EvalTemplateListChartsResponseResult) GetCharts() map[string]EvalTemplateListChartsItem { + if o == nil { + var ret map[string]EvalTemplateListChartsItem + return ret + } + + return o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListChartsResponseResult) GetChartsOk() (*map[string]EvalTemplateListChartsItem, bool) { + if o == nil { + return nil, false + } + return &o.Charts, true +} + +// SetCharts sets field value +func (o *EvalTemplateListChartsResponseResult) SetCharts(v map[string]EvalTemplateListChartsItem) { + o.Charts = v +} + +func (o EvalTemplateListChartsResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateListChartsResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["charts"] = o.Charts + return toSerialize, nil +} + +func (o *EvalTemplateListChartsResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "charts", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateListChartsResponseResult := _EvalTemplateListChartsResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateListChartsResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateListChartsResponseResult(varEvalTemplateListChartsResponseResult) + + return err +} + +type NullableEvalTemplateListChartsResponseResult struct { + value *EvalTemplateListChartsResponseResult + isSet bool +} + +func (v NullableEvalTemplateListChartsResponseResult) Get() *EvalTemplateListChartsResponseResult { + return v.value +} + +func (v *NullableEvalTemplateListChartsResponseResult) Set(val *EvalTemplateListChartsResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateListChartsResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateListChartsResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateListChartsResponseResult(val *EvalTemplateListChartsResponseResult) *NullableEvalTemplateListChartsResponseResult { + return &NullableEvalTemplateListChartsResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateListChartsResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateListChartsResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_list_item.go b/go/futureagi/model_eval_template_list_item.go new file mode 100644 index 0000000..baf6d32 --- /dev/null +++ b/go/futureagi/model_eval_template_list_item.go @@ -0,0 +1,521 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateListItem{} + +// EvalTemplateListItem struct for EvalTemplateListItem +type EvalTemplateListItem struct { + Id string `json:"id"` + Name string `json:"name"` + TemplateType string `json:"template_type"` + EvalType string `json:"eval_type"` + OutputType string `json:"output_type"` + Owner string `json:"owner"` + CreatedByName string `json:"created_by_name"` + VersionCount int32 `json:"version_count"` + CurrentVersion string `json:"current_version"` + LastUpdated string `json:"last_updated"` + ThirtyDayChart []EvalTemplateChartPoint `json:"thirty_day_chart"` + ThirtyDayErrorRate []EvalTemplateChartPoint `json:"thirty_day_error_rate"` + ThirtyDayRunCount int32 `json:"thirty_day_run_count"` + Tags []string `json:"tags"` +} + +type _EvalTemplateListItem EvalTemplateListItem + +// NewEvalTemplateListItem instantiates a new EvalTemplateListItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateListItem(id string, name string, templateType string, evalType string, outputType string, owner string, createdByName string, versionCount int32, currentVersion string, lastUpdated string, thirtyDayChart []EvalTemplateChartPoint, thirtyDayErrorRate []EvalTemplateChartPoint, thirtyDayRunCount int32, tags []string) *EvalTemplateListItem { + this := EvalTemplateListItem{} + this.Id = id + this.Name = name + this.TemplateType = templateType + this.EvalType = evalType + this.OutputType = outputType + this.Owner = owner + this.CreatedByName = createdByName + this.VersionCount = versionCount + this.CurrentVersion = currentVersion + this.LastUpdated = lastUpdated + this.ThirtyDayChart = thirtyDayChart + this.ThirtyDayErrorRate = thirtyDayErrorRate + this.ThirtyDayRunCount = thirtyDayRunCount + this.Tags = tags + return &this +} + +// NewEvalTemplateListItemWithDefaults instantiates a new EvalTemplateListItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateListItemWithDefaults() *EvalTemplateListItem { + this := EvalTemplateListItem{} + return &this +} + +// GetId returns the Id field value +func (o *EvalTemplateListItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateListItem) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *EvalTemplateListItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EvalTemplateListItem) SetName(v string) { + o.Name = v +} + +// GetTemplateType returns the TemplateType field value +func (o *EvalTemplateListItem) GetTemplateType() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateType +} + +// GetTemplateTypeOk returns a tuple with the TemplateType field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetTemplateTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateType, true +} + +// SetTemplateType sets field value +func (o *EvalTemplateListItem) SetTemplateType(v string) { + o.TemplateType = v +} + +// GetEvalType returns the EvalType field value +func (o *EvalTemplateListItem) GetEvalType() string { + if o == nil { + var ret string + return ret + } + + return o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetEvalTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalType, true +} + +// SetEvalType sets field value +func (o *EvalTemplateListItem) SetEvalType(v string) { + o.EvalType = v +} + +// GetOutputType returns the OutputType field value +func (o *EvalTemplateListItem) GetOutputType() string { + if o == nil { + var ret string + return ret + } + + return o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OutputType, true +} + +// SetOutputType sets field value +func (o *EvalTemplateListItem) SetOutputType(v string) { + o.OutputType = v +} + +// GetOwner returns the Owner field value +func (o *EvalTemplateListItem) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *EvalTemplateListItem) SetOwner(v string) { + o.Owner = v +} + +// GetCreatedByName returns the CreatedByName field value +func (o *EvalTemplateListItem) GetCreatedByName() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedByName +} + +// GetCreatedByNameOk returns a tuple with the CreatedByName field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetCreatedByNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedByName, true +} + +// SetCreatedByName sets field value +func (o *EvalTemplateListItem) SetCreatedByName(v string) { + o.CreatedByName = v +} + +// GetVersionCount returns the VersionCount field value +func (o *EvalTemplateListItem) GetVersionCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.VersionCount +} + +// GetVersionCountOk returns a tuple with the VersionCount field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetVersionCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.VersionCount, true +} + +// SetVersionCount sets field value +func (o *EvalTemplateListItem) SetVersionCount(v int32) { + o.VersionCount = v +} + +// GetCurrentVersion returns the CurrentVersion field value +func (o *EvalTemplateListItem) GetCurrentVersion() string { + if o == nil { + var ret string + return ret + } + + return o.CurrentVersion +} + +// GetCurrentVersionOk returns a tuple with the CurrentVersion field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetCurrentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CurrentVersion, true +} + +// SetCurrentVersion sets field value +func (o *EvalTemplateListItem) SetCurrentVersion(v string) { + o.CurrentVersion = v +} + +// GetLastUpdated returns the LastUpdated field value +func (o *EvalTemplateListItem) GetLastUpdated() string { + if o == nil { + var ret string + return ret + } + + return o.LastUpdated +} + +// GetLastUpdatedOk returns a tuple with the LastUpdated field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetLastUpdatedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastUpdated, true +} + +// SetLastUpdated sets field value +func (o *EvalTemplateListItem) SetLastUpdated(v string) { + o.LastUpdated = v +} + +// GetThirtyDayChart returns the ThirtyDayChart field value +func (o *EvalTemplateListItem) GetThirtyDayChart() []EvalTemplateChartPoint { + if o == nil { + var ret []EvalTemplateChartPoint + return ret + } + + return o.ThirtyDayChart +} + +// GetThirtyDayChartOk returns a tuple with the ThirtyDayChart field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetThirtyDayChartOk() ([]EvalTemplateChartPoint, bool) { + if o == nil { + return nil, false + } + return o.ThirtyDayChart, true +} + +// SetThirtyDayChart sets field value +func (o *EvalTemplateListItem) SetThirtyDayChart(v []EvalTemplateChartPoint) { + o.ThirtyDayChart = v +} + +// GetThirtyDayErrorRate returns the ThirtyDayErrorRate field value +func (o *EvalTemplateListItem) GetThirtyDayErrorRate() []EvalTemplateChartPoint { + if o == nil { + var ret []EvalTemplateChartPoint + return ret + } + + return o.ThirtyDayErrorRate +} + +// GetThirtyDayErrorRateOk returns a tuple with the ThirtyDayErrorRate field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetThirtyDayErrorRateOk() ([]EvalTemplateChartPoint, bool) { + if o == nil { + return nil, false + } + return o.ThirtyDayErrorRate, true +} + +// SetThirtyDayErrorRate sets field value +func (o *EvalTemplateListItem) SetThirtyDayErrorRate(v []EvalTemplateChartPoint) { + o.ThirtyDayErrorRate = v +} + +// GetThirtyDayRunCount returns the ThirtyDayRunCount field value +func (o *EvalTemplateListItem) GetThirtyDayRunCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ThirtyDayRunCount +} + +// GetThirtyDayRunCountOk returns a tuple with the ThirtyDayRunCount field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetThirtyDayRunCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ThirtyDayRunCount, true +} + +// SetThirtyDayRunCount sets field value +func (o *EvalTemplateListItem) SetThirtyDayRunCount(v int32) { + o.ThirtyDayRunCount = v +} + +// GetTags returns the Tags field value +func (o *EvalTemplateListItem) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListItem) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *EvalTemplateListItem) SetTags(v []string) { + o.Tags = v +} + +func (o EvalTemplateListItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateListItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["template_type"] = o.TemplateType + toSerialize["eval_type"] = o.EvalType + toSerialize["output_type"] = o.OutputType + toSerialize["owner"] = o.Owner + toSerialize["created_by_name"] = o.CreatedByName + toSerialize["version_count"] = o.VersionCount + toSerialize["current_version"] = o.CurrentVersion + toSerialize["last_updated"] = o.LastUpdated + toSerialize["thirty_day_chart"] = o.ThirtyDayChart + toSerialize["thirty_day_error_rate"] = o.ThirtyDayErrorRate + toSerialize["thirty_day_run_count"] = o.ThirtyDayRunCount + toSerialize["tags"] = o.Tags + return toSerialize, nil +} + +func (o *EvalTemplateListItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "template_type", + "eval_type", + "output_type", + "owner", + "created_by_name", + "version_count", + "current_version", + "last_updated", + "thirty_day_chart", + "thirty_day_error_rate", + "thirty_day_run_count", + "tags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateListItem := _EvalTemplateListItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateListItem) + + if err != nil { + return err + } + + *o = EvalTemplateListItem(varEvalTemplateListItem) + + return err +} + +type NullableEvalTemplateListItem struct { + value *EvalTemplateListItem + isSet bool +} + +func (v NullableEvalTemplateListItem) Get() *EvalTemplateListItem { + return v.value +} + +func (v *NullableEvalTemplateListItem) Set(val *EvalTemplateListItem) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateListItem) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateListItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateListItem(val *EvalTemplateListItem) *NullableEvalTemplateListItem { + return &NullableEvalTemplateListItem{value: val, isSet: true} +} + +func (v NullableEvalTemplateListItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateListItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_list_response.go b/go/futureagi/model_eval_template_list_response.go new file mode 100644 index 0000000..6651b25 --- /dev/null +++ b/go/futureagi/model_eval_template_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateListResponse{} + +// EvalTemplateListResponse struct for EvalTemplateListResponse +type EvalTemplateListResponse struct { + Status bool `json:"status"` + Result EvalTemplateListResponseResult `json:"result"` +} + +type _EvalTemplateListResponse EvalTemplateListResponse + +// NewEvalTemplateListResponse instantiates a new EvalTemplateListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateListResponse(status bool, result EvalTemplateListResponseResult) *EvalTemplateListResponse { + this := EvalTemplateListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateListResponseWithDefaults instantiates a new EvalTemplateListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateListResponseWithDefaults() *EvalTemplateListResponse { + this := EvalTemplateListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateListResponse) GetResult() EvalTemplateListResponseResult { + if o == nil { + var ret EvalTemplateListResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListResponse) GetResultOk() (*EvalTemplateListResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateListResponse) SetResult(v EvalTemplateListResponseResult) { + o.Result = v +} + +func (o EvalTemplateListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateListResponse := _EvalTemplateListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateListResponse) + + if err != nil { + return err + } + + *o = EvalTemplateListResponse(varEvalTemplateListResponse) + + return err +} + +type NullableEvalTemplateListResponse struct { + value *EvalTemplateListResponse + isSet bool +} + +func (v NullableEvalTemplateListResponse) Get() *EvalTemplateListResponse { + return v.value +} + +func (v *NullableEvalTemplateListResponse) Set(val *EvalTemplateListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateListResponse(val *EvalTemplateListResponse) *NullableEvalTemplateListResponse { + return &NullableEvalTemplateListResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_list_response_result.go b/go/futureagi/model_eval_template_list_response_result.go new file mode 100644 index 0000000..939d07a --- /dev/null +++ b/go/futureagi/model_eval_template_list_response_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateListResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateListResponseResult{} + +// EvalTemplateListResponseResult struct for EvalTemplateListResponseResult +type EvalTemplateListResponseResult struct { + Items []EvalTemplateListItem `json:"items"` + Total int32 `json:"total"` + Page int32 `json:"page"` + PageSize int32 `json:"page_size"` +} + +type _EvalTemplateListResponseResult EvalTemplateListResponseResult + +// NewEvalTemplateListResponseResult instantiates a new EvalTemplateListResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateListResponseResult(items []EvalTemplateListItem, total int32, page int32, pageSize int32) *EvalTemplateListResponseResult { + this := EvalTemplateListResponseResult{} + this.Items = items + this.Total = total + this.Page = page + this.PageSize = pageSize + return &this +} + +// NewEvalTemplateListResponseResultWithDefaults instantiates a new EvalTemplateListResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateListResponseResultWithDefaults() *EvalTemplateListResponseResult { + this := EvalTemplateListResponseResult{} + return &this +} + +// GetItems returns the Items field value +func (o *EvalTemplateListResponseResult) GetItems() []EvalTemplateListItem { + if o == nil { + var ret []EvalTemplateListItem + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListResponseResult) GetItemsOk() ([]EvalTemplateListItem, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *EvalTemplateListResponseResult) SetItems(v []EvalTemplateListItem) { + o.Items = v +} + +// GetTotal returns the Total field value +func (o *EvalTemplateListResponseResult) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListResponseResult) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *EvalTemplateListResponseResult) SetTotal(v int32) { + o.Total = v +} + +// GetPage returns the Page field value +func (o *EvalTemplateListResponseResult) GetPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListResponseResult) GetPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *EvalTemplateListResponseResult) SetPage(v int32) { + o.Page = v +} + +// GetPageSize returns the PageSize field value +func (o *EvalTemplateListResponseResult) GetPageSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateListResponseResult) GetPageSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PageSize, true +} + +// SetPageSize sets field value +func (o *EvalTemplateListResponseResult) SetPageSize(v int32) { + o.PageSize = v +} + +func (o EvalTemplateListResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateListResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["total"] = o.Total + toSerialize["page"] = o.Page + toSerialize["page_size"] = o.PageSize + return toSerialize, nil +} + +func (o *EvalTemplateListResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "total", + "page", + "page_size", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateListResponseResult := _EvalTemplateListResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateListResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateListResponseResult(varEvalTemplateListResponseResult) + + return err +} + +type NullableEvalTemplateListResponseResult struct { + value *EvalTemplateListResponseResult + isSet bool +} + +func (v NullableEvalTemplateListResponseResult) Get() *EvalTemplateListResponseResult { + return v.value +} + +func (v *NullableEvalTemplateListResponseResult) Set(val *EvalTemplateListResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateListResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateListResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateListResponseResult(val *EvalTemplateListResponseResult) *NullableEvalTemplateListResponseResult { + return &NullableEvalTemplateListResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateListResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateListResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_summary.go b/go/futureagi/model_eval_template_summary.go new file mode 100644 index 0000000..cb04491 --- /dev/null +++ b/go/futureagi/model_eval_template_summary.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateSummary{} + +// EvalTemplateSummary struct for EvalTemplateSummary +type EvalTemplateSummary struct { + Name string `json:"name"` + Id string `json:"id"` + TotalCells int32 `json:"total_cells"` + Output map[string]interface{} `json:"output"` +} + +type _EvalTemplateSummary EvalTemplateSummary + +// NewEvalTemplateSummary instantiates a new EvalTemplateSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateSummary(name string, id string, totalCells int32, output map[string]interface{}) *EvalTemplateSummary { + this := EvalTemplateSummary{} + this.Name = name + this.Id = id + this.TotalCells = totalCells + this.Output = output + return &this +} + +// NewEvalTemplateSummaryWithDefaults instantiates a new EvalTemplateSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateSummaryWithDefaults() *EvalTemplateSummary { + this := EvalTemplateSummary{} + return &this +} + +// GetName returns the Name field value +func (o *EvalTemplateSummary) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateSummary) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EvalTemplateSummary) SetName(v string) { + o.Name = v +} + +// GetId returns the Id field value +func (o *EvalTemplateSummary) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateSummary) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateSummary) SetId(v string) { + o.Id = v +} + +// GetTotalCells returns the TotalCells field value +func (o *EvalTemplateSummary) GetTotalCells() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalCells +} + +// GetTotalCellsOk returns a tuple with the TotalCells field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateSummary) GetTotalCellsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalCells, true +} + +// SetTotalCells sets field value +func (o *EvalTemplateSummary) SetTotalCells(v int32) { + o.TotalCells = v +} + +// GetOutput returns the Output field value +func (o *EvalTemplateSummary) GetOutput() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateSummary) GetOutputOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// SetOutput sets field value +func (o *EvalTemplateSummary) SetOutput(v map[string]interface{}) { + o.Output = v +} + +func (o EvalTemplateSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["id"] = o.Id + toSerialize["total_cells"] = o.TotalCells + toSerialize["output"] = o.Output + return toSerialize, nil +} + +func (o *EvalTemplateSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + "total_cells", + "output", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateSummary := _EvalTemplateSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateSummary) + + if err != nil { + return err + } + + *o = EvalTemplateSummary(varEvalTemplateSummary) + + return err +} + +type NullableEvalTemplateSummary struct { + value *EvalTemplateSummary + isSet bool +} + +func (v NullableEvalTemplateSummary) Get() *EvalTemplateSummary { + return v.value +} + +func (v *NullableEvalTemplateSummary) Set(val *EvalTemplateSummary) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateSummary(val *EvalTemplateSummary) *NullableEvalTemplateSummary { + return &NullableEvalTemplateSummary{value: val, isSet: true} +} + +func (v NullableEvalTemplateSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_update_response.go b/go/futureagi/model_eval_template_update_response.go new file mode 100644 index 0000000..5f94e55 --- /dev/null +++ b/go/futureagi/model_eval_template_update_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateUpdateResponse{} + +// EvalTemplateUpdateResponse struct for EvalTemplateUpdateResponse +type EvalTemplateUpdateResponse struct { + Status bool `json:"status"` + Result EvalTemplateUpdateResponseResult `json:"result"` +} + +type _EvalTemplateUpdateResponse EvalTemplateUpdateResponse + +// NewEvalTemplateUpdateResponse instantiates a new EvalTemplateUpdateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateUpdateResponse(status bool, result EvalTemplateUpdateResponseResult) *EvalTemplateUpdateResponse { + this := EvalTemplateUpdateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateUpdateResponseWithDefaults instantiates a new EvalTemplateUpdateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateUpdateResponseWithDefaults() *EvalTemplateUpdateResponse { + this := EvalTemplateUpdateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateUpdateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateUpdateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateUpdateResponse) GetResult() EvalTemplateUpdateResponseResult { + if o == nil { + var ret EvalTemplateUpdateResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateResponse) GetResultOk() (*EvalTemplateUpdateResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateUpdateResponse) SetResult(v EvalTemplateUpdateResponseResult) { + o.Result = v +} + +func (o EvalTemplateUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateUpdateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateUpdateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateUpdateResponse := _EvalTemplateUpdateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateUpdateResponse) + + if err != nil { + return err + } + + *o = EvalTemplateUpdateResponse(varEvalTemplateUpdateResponse) + + return err +} + +type NullableEvalTemplateUpdateResponse struct { + value *EvalTemplateUpdateResponse + isSet bool +} + +func (v NullableEvalTemplateUpdateResponse) Get() *EvalTemplateUpdateResponse { + return v.value +} + +func (v *NullableEvalTemplateUpdateResponse) Set(val *EvalTemplateUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateUpdateResponse(val *EvalTemplateUpdateResponse) *NullableEvalTemplateUpdateResponse { + return &NullableEvalTemplateUpdateResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_update_response_result.go b/go/futureagi/model_eval_template_update_response_result.go new file mode 100644 index 0000000..54150ba --- /dev/null +++ b/go/futureagi/model_eval_template_update_response_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateUpdateResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateUpdateResponseResult{} + +// EvalTemplateUpdateResponseResult struct for EvalTemplateUpdateResponseResult +type EvalTemplateUpdateResponseResult struct { + Id string `json:"id"` + Name string `json:"name"` + Updated bool `json:"updated"` +} + +type _EvalTemplateUpdateResponseResult EvalTemplateUpdateResponseResult + +// NewEvalTemplateUpdateResponseResult instantiates a new EvalTemplateUpdateResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateUpdateResponseResult(id string, name string, updated bool) *EvalTemplateUpdateResponseResult { + this := EvalTemplateUpdateResponseResult{} + this.Id = id + this.Name = name + this.Updated = updated + return &this +} + +// NewEvalTemplateUpdateResponseResultWithDefaults instantiates a new EvalTemplateUpdateResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateUpdateResponseResultWithDefaults() *EvalTemplateUpdateResponseResult { + this := EvalTemplateUpdateResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *EvalTemplateUpdateResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateUpdateResponseResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *EvalTemplateUpdateResponseResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateResponseResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EvalTemplateUpdateResponseResult) SetName(v string) { + o.Name = v +} + +// GetUpdated returns the Updated field value +func (o *EvalTemplateUpdateResponseResult) GetUpdated() bool { + if o == nil { + var ret bool + return ret + } + + return o.Updated +} + +// GetUpdatedOk returns a tuple with the Updated field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateResponseResult) GetUpdatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Updated, true +} + +// SetUpdated sets field value +func (o *EvalTemplateUpdateResponseResult) SetUpdated(v bool) { + o.Updated = v +} + +func (o EvalTemplateUpdateResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateUpdateResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["updated"] = o.Updated + return toSerialize, nil +} + +func (o *EvalTemplateUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "updated", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateUpdateResponseResult := _EvalTemplateUpdateResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateUpdateResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateUpdateResponseResult(varEvalTemplateUpdateResponseResult) + + return err +} + +type NullableEvalTemplateUpdateResponseResult struct { + value *EvalTemplateUpdateResponseResult + isSet bool +} + +func (v NullableEvalTemplateUpdateResponseResult) Get() *EvalTemplateUpdateResponseResult { + return v.value +} + +func (v *NullableEvalTemplateUpdateResponseResult) Set(val *EvalTemplateUpdateResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateUpdateResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateUpdateResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateUpdateResponseResult(val *EvalTemplateUpdateResponseResult) *NullableEvalTemplateUpdateResponseResult { + return &NullableEvalTemplateUpdateResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateUpdateResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateUpdateResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_update_v2_request.go b/go/futureagi/model_eval_template_update_v2_request.go new file mode 100644 index 0000000..b1f361e --- /dev/null +++ b/go/futureagi/model_eval_template_update_v2_request.go @@ -0,0 +1,1086 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalTemplateUpdateV2Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateUpdateV2Request{} + +// EvalTemplateUpdateV2Request struct for EvalTemplateUpdateV2Request +type EvalTemplateUpdateV2Request struct { + Name NullableString `json:"name,omitempty"` + EvalType NullableString `json:"eval_type,omitempty"` + Instructions NullableString `json:"instructions,omitempty"` + Model NullableString `json:"model,omitempty"` + OutputType NullableString `json:"output_type,omitempty"` + PassThreshold NullableFloat32 `json:"pass_threshold,omitempty"` + ChoiceScores map[string]interface{} `json:"choice_scores,omitempty"` + MultiChoice NullableBool `json:"multi_choice,omitempty"` + Description NullableString `json:"description,omitempty"` + Tags []string `json:"tags,omitempty"` + CheckInternet NullableBool `json:"check_internet,omitempty"` + Code NullableString `json:"code,omitempty"` + CodeLanguage NullableString `json:"code_language,omitempty"` + Messages []map[string]interface{} `json:"messages,omitempty"` + FewShotExamples []map[string]interface{} `json:"few_shot_examples,omitempty"` + Mode NullableString `json:"mode,omitempty"` + Tools map[string]interface{} `json:"tools,omitempty"` + KnowledgeBases []string `json:"knowledge_bases,omitempty"` + DataInjection map[string]interface{} `json:"data_injection,omitempty"` + Summary map[string]interface{} `json:"summary,omitempty"` + ErrorLocalizerEnabled NullableBool `json:"error_localizer_enabled,omitempty"` + Publish NullableBool `json:"publish,omitempty"` + TemplateFormat NullableString `json:"template_format,omitempty"` +} + +// NewEvalTemplateUpdateV2Request instantiates a new EvalTemplateUpdateV2Request object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateUpdateV2Request() *EvalTemplateUpdateV2Request { + this := EvalTemplateUpdateV2Request{} + return &this +} + +// NewEvalTemplateUpdateV2RequestWithDefaults instantiates a new EvalTemplateUpdateV2Request object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateUpdateV2RequestWithDefaults() *EvalTemplateUpdateV2Request { + this := EvalTemplateUpdateV2Request{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *EvalTemplateUpdateV2Request) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetName() { + o.Name.Unset() +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetEvalType() string { + if o == nil || IsNil(o.EvalType.Get()) { + var ret string + return ret + } + return *o.EvalType.Get() +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetEvalTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalType.Get(), o.EvalType.IsSet() +} + +// HasEvalType returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasEvalType() bool { + if o != nil && o.EvalType.IsSet() { + return true + } + + return false +} + +// SetEvalType gets a reference to the given NullableString and assigns it to the EvalType field. +func (o *EvalTemplateUpdateV2Request) SetEvalType(v string) { + o.EvalType.Set(&v) +} + +// SetEvalTypeNil sets the value for EvalType to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetEvalTypeNil() { + o.EvalType.Set(nil) +} + +// UnsetEvalType ensures that no value is present for EvalType, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetEvalType() { + o.EvalType.Unset() +} + +// GetInstructions returns the Instructions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetInstructions() string { + if o == nil || IsNil(o.Instructions.Get()) { + var ret string + return ret + } + return *o.Instructions.Get() +} + +// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetInstructionsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instructions.Get(), o.Instructions.IsSet() +} + +// HasInstructions returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasInstructions() bool { + if o != nil && o.Instructions.IsSet() { + return true + } + + return false +} + +// SetInstructions gets a reference to the given NullableString and assigns it to the Instructions field. +func (o *EvalTemplateUpdateV2Request) SetInstructions(v string) { + o.Instructions.Set(&v) +} + +// SetInstructionsNil sets the value for Instructions to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetInstructionsNil() { + o.Instructions.Set(nil) +} + +// UnsetInstructions ensures that no value is present for Instructions, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetInstructions() { + o.Instructions.Unset() +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *EvalTemplateUpdateV2Request) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetModel() { + o.Model.Unset() +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetOutputType() string { + if o == nil || IsNil(o.OutputType.Get()) { + var ret string + return ret + } + return *o.OutputType.Get() +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OutputType.Get(), o.OutputType.IsSet() +} + +// HasOutputType returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasOutputType() bool { + if o != nil && o.OutputType.IsSet() { + return true + } + + return false +} + +// SetOutputType gets a reference to the given NullableString and assigns it to the OutputType field. +func (o *EvalTemplateUpdateV2Request) SetOutputType(v string) { + o.OutputType.Set(&v) +} + +// SetOutputTypeNil sets the value for OutputType to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetOutputTypeNil() { + o.OutputType.Set(nil) +} + +// UnsetOutputType ensures that no value is present for OutputType, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetOutputType() { + o.OutputType.Unset() +} + +// GetPassThreshold returns the PassThreshold field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetPassThreshold() float32 { + if o == nil || IsNil(o.PassThreshold.Get()) { + var ret float32 + return ret + } + return *o.PassThreshold.Get() +} + +// GetPassThresholdOk returns a tuple with the PassThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetPassThresholdOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.PassThreshold.Get(), o.PassThreshold.IsSet() +} + +// HasPassThreshold returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasPassThreshold() bool { + if o != nil && o.PassThreshold.IsSet() { + return true + } + + return false +} + +// SetPassThreshold gets a reference to the given NullableFloat32 and assigns it to the PassThreshold field. +func (o *EvalTemplateUpdateV2Request) SetPassThreshold(v float32) { + o.PassThreshold.Set(&v) +} + +// SetPassThresholdNil sets the value for PassThreshold to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetPassThresholdNil() { + o.PassThreshold.Set(nil) +} + +// UnsetPassThreshold ensures that no value is present for PassThreshold, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetPassThreshold() { + o.PassThreshold.Unset() +} + +// GetChoiceScores returns the ChoiceScores field value if set, zero value otherwise. +func (o *EvalTemplateUpdateV2Request) GetChoiceScores() map[string]interface{} { + if o == nil || IsNil(o.ChoiceScores) { + var ret map[string]interface{} + return ret + } + return o.ChoiceScores +} + +// GetChoiceScoresOk returns a tuple with the ChoiceScores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateV2Request) GetChoiceScoresOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChoiceScores) { + return map[string]interface{}{}, false + } + return o.ChoiceScores, true +} + +// HasChoiceScores returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasChoiceScores() bool { + if o != nil && !IsNil(o.ChoiceScores) { + return true + } + + return false +} + +// SetChoiceScores gets a reference to the given map[string]interface{} and assigns it to the ChoiceScores field. +func (o *EvalTemplateUpdateV2Request) SetChoiceScores(v map[string]interface{}) { + o.ChoiceScores = v +} + +// GetMultiChoice returns the MultiChoice field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetMultiChoice() bool { + if o == nil || IsNil(o.MultiChoice.Get()) { + var ret bool + return ret + } + return *o.MultiChoice.Get() +} + +// GetMultiChoiceOk returns a tuple with the MultiChoice field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetMultiChoiceOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.MultiChoice.Get(), o.MultiChoice.IsSet() +} + +// HasMultiChoice returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasMultiChoice() bool { + if o != nil && o.MultiChoice.IsSet() { + return true + } + + return false +} + +// SetMultiChoice gets a reference to the given NullableBool and assigns it to the MultiChoice field. +func (o *EvalTemplateUpdateV2Request) SetMultiChoice(v bool) { + o.MultiChoice.Set(&v) +} + +// SetMultiChoiceNil sets the value for MultiChoice to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetMultiChoiceNil() { + o.MultiChoice.Set(nil) +} + +// UnsetMultiChoice ensures that no value is present for MultiChoice, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetMultiChoice() { + o.MultiChoice.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *EvalTemplateUpdateV2Request) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetDescription() { + o.Description.Unset() +} + +// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetTags() []string { + if o == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EvalTemplateUpdateV2Request) SetTags(v []string) { + o.Tags = v +} + +// GetCheckInternet returns the CheckInternet field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetCheckInternet() bool { + if o == nil || IsNil(o.CheckInternet.Get()) { + var ret bool + return ret + } + return *o.CheckInternet.Get() +} + +// GetCheckInternetOk returns a tuple with the CheckInternet field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetCheckInternetOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.CheckInternet.Get(), o.CheckInternet.IsSet() +} + +// HasCheckInternet returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasCheckInternet() bool { + if o != nil && o.CheckInternet.IsSet() { + return true + } + + return false +} + +// SetCheckInternet gets a reference to the given NullableBool and assigns it to the CheckInternet field. +func (o *EvalTemplateUpdateV2Request) SetCheckInternet(v bool) { + o.CheckInternet.Set(&v) +} + +// SetCheckInternetNil sets the value for CheckInternet to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetCheckInternetNil() { + o.CheckInternet.Set(nil) +} + +// UnsetCheckInternet ensures that no value is present for CheckInternet, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetCheckInternet() { + o.CheckInternet.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *EvalTemplateUpdateV2Request) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetCode() { + o.Code.Unset() +} + +// GetCodeLanguage returns the CodeLanguage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetCodeLanguage() string { + if o == nil || IsNil(o.CodeLanguage.Get()) { + var ret string + return ret + } + return *o.CodeLanguage.Get() +} + +// GetCodeLanguageOk returns a tuple with the CodeLanguage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetCodeLanguageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CodeLanguage.Get(), o.CodeLanguage.IsSet() +} + +// HasCodeLanguage returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasCodeLanguage() bool { + if o != nil && o.CodeLanguage.IsSet() { + return true + } + + return false +} + +// SetCodeLanguage gets a reference to the given NullableString and assigns it to the CodeLanguage field. +func (o *EvalTemplateUpdateV2Request) SetCodeLanguage(v string) { + o.CodeLanguage.Set(&v) +} + +// SetCodeLanguageNil sets the value for CodeLanguage to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetCodeLanguageNil() { + o.CodeLanguage.Set(nil) +} + +// UnsetCodeLanguage ensures that no value is present for CodeLanguage, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetCodeLanguage() { + o.CodeLanguage.Unset() +} + +// GetMessages returns the Messages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetMessages() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetMessagesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Messages) { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasMessages() bool { + if o != nil && !IsNil(o.Messages) { + return true + } + + return false +} + +// SetMessages gets a reference to the given []map[string]interface{} and assigns it to the Messages field. +func (o *EvalTemplateUpdateV2Request) SetMessages(v []map[string]interface{}) { + o.Messages = v +} + +// GetFewShotExamples returns the FewShotExamples field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetFewShotExamples() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.FewShotExamples +} + +// GetFewShotExamplesOk returns a tuple with the FewShotExamples field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetFewShotExamplesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.FewShotExamples) { + return nil, false + } + return o.FewShotExamples, true +} + +// HasFewShotExamples returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasFewShotExamples() bool { + if o != nil && !IsNil(o.FewShotExamples) { + return true + } + + return false +} + +// SetFewShotExamples gets a reference to the given []map[string]interface{} and assigns it to the FewShotExamples field. +func (o *EvalTemplateUpdateV2Request) SetFewShotExamples(v []map[string]interface{}) { + o.FewShotExamples = v +} + +// GetMode returns the Mode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetMode() string { + if o == nil || IsNil(o.Mode.Get()) { + var ret string + return ret + } + return *o.Mode.Get() +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Mode.Get(), o.Mode.IsSet() +} + +// HasMode returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasMode() bool { + if o != nil && o.Mode.IsSet() { + return true + } + + return false +} + +// SetMode gets a reference to the given NullableString and assigns it to the Mode field. +func (o *EvalTemplateUpdateV2Request) SetMode(v string) { + o.Mode.Set(&v) +} + +// SetModeNil sets the value for Mode to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetModeNil() { + o.Mode.Set(nil) +} + +// UnsetMode ensures that no value is present for Mode, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetMode() { + o.Mode.Unset() +} + +// GetTools returns the Tools field value if set, zero value otherwise. +func (o *EvalTemplateUpdateV2Request) GetTools() map[string]interface{} { + if o == nil || IsNil(o.Tools) { + var ret map[string]interface{} + return ret + } + return o.Tools +} + +// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateV2Request) GetToolsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tools) { + return map[string]interface{}{}, false + } + return o.Tools, true +} + +// HasTools returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasTools() bool { + if o != nil && !IsNil(o.Tools) { + return true + } + + return false +} + +// SetTools gets a reference to the given map[string]interface{} and assigns it to the Tools field. +func (o *EvalTemplateUpdateV2Request) SetTools(v map[string]interface{}) { + o.Tools = v +} + +// GetKnowledgeBases returns the KnowledgeBases field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetKnowledgeBases() []string { + if o == nil { + var ret []string + return ret + } + return o.KnowledgeBases +} + +// GetKnowledgeBasesOk returns a tuple with the KnowledgeBases field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetKnowledgeBasesOk() ([]string, bool) { + if o == nil || IsNil(o.KnowledgeBases) { + return nil, false + } + return o.KnowledgeBases, true +} + +// HasKnowledgeBases returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasKnowledgeBases() bool { + if o != nil && !IsNil(o.KnowledgeBases) { + return true + } + + return false +} + +// SetKnowledgeBases gets a reference to the given []string and assigns it to the KnowledgeBases field. +func (o *EvalTemplateUpdateV2Request) SetKnowledgeBases(v []string) { + o.KnowledgeBases = v +} + +// GetDataInjection returns the DataInjection field value if set, zero value otherwise. +func (o *EvalTemplateUpdateV2Request) GetDataInjection() map[string]interface{} { + if o == nil || IsNil(o.DataInjection) { + var ret map[string]interface{} + return ret + } + return o.DataInjection +} + +// GetDataInjectionOk returns a tuple with the DataInjection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateV2Request) GetDataInjectionOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DataInjection) { + return map[string]interface{}{}, false + } + return o.DataInjection, true +} + +// HasDataInjection returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasDataInjection() bool { + if o != nil && !IsNil(o.DataInjection) { + return true + } + + return false +} + +// SetDataInjection gets a reference to the given map[string]interface{} and assigns it to the DataInjection field. +func (o *EvalTemplateUpdateV2Request) SetDataInjection(v map[string]interface{}) { + o.DataInjection = v +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *EvalTemplateUpdateV2Request) GetSummary() map[string]interface{} { + if o == nil || IsNil(o.Summary) { + var ret map[string]interface{} + return ret + } + return o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateUpdateV2Request) GetSummaryOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Summary) { + return map[string]interface{}{}, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given map[string]interface{} and assigns it to the Summary field. +func (o *EvalTemplateUpdateV2Request) SetSummary(v map[string]interface{}) { + o.Summary = v +} + +// GetErrorLocalizerEnabled returns the ErrorLocalizerEnabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetErrorLocalizerEnabled() bool { + if o == nil || IsNil(o.ErrorLocalizerEnabled.Get()) { + var ret bool + return ret + } + return *o.ErrorLocalizerEnabled.Get() +} + +// GetErrorLocalizerEnabledOk returns a tuple with the ErrorLocalizerEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetErrorLocalizerEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.ErrorLocalizerEnabled.Get(), o.ErrorLocalizerEnabled.IsSet() +} + +// HasErrorLocalizerEnabled returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasErrorLocalizerEnabled() bool { + if o != nil && o.ErrorLocalizerEnabled.IsSet() { + return true + } + + return false +} + +// SetErrorLocalizerEnabled gets a reference to the given NullableBool and assigns it to the ErrorLocalizerEnabled field. +func (o *EvalTemplateUpdateV2Request) SetErrorLocalizerEnabled(v bool) { + o.ErrorLocalizerEnabled.Set(&v) +} + +// SetErrorLocalizerEnabledNil sets the value for ErrorLocalizerEnabled to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetErrorLocalizerEnabledNil() { + o.ErrorLocalizerEnabled.Set(nil) +} + +// UnsetErrorLocalizerEnabled ensures that no value is present for ErrorLocalizerEnabled, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetErrorLocalizerEnabled() { + o.ErrorLocalizerEnabled.Unset() +} + +// GetPublish returns the Publish field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetPublish() bool { + if o == nil || IsNil(o.Publish.Get()) { + var ret bool + return ret + } + return *o.Publish.Get() +} + +// GetPublishOk returns a tuple with the Publish field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetPublishOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Publish.Get(), o.Publish.IsSet() +} + +// HasPublish returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasPublish() bool { + if o != nil && o.Publish.IsSet() { + return true + } + + return false +} + +// SetPublish gets a reference to the given NullableBool and assigns it to the Publish field. +func (o *EvalTemplateUpdateV2Request) SetPublish(v bool) { + o.Publish.Set(&v) +} + +// SetPublishNil sets the value for Publish to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetPublishNil() { + o.Publish.Set(nil) +} + +// UnsetPublish ensures that no value is present for Publish, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetPublish() { + o.Publish.Unset() +} + +// GetTemplateFormat returns the TemplateFormat field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateUpdateV2Request) GetTemplateFormat() string { + if o == nil || IsNil(o.TemplateFormat.Get()) { + var ret string + return ret + } + return *o.TemplateFormat.Get() +} + +// GetTemplateFormatOk returns a tuple with the TemplateFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateUpdateV2Request) GetTemplateFormatOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateFormat.Get(), o.TemplateFormat.IsSet() +} + +// HasTemplateFormat returns a boolean if a field has been set. +func (o *EvalTemplateUpdateV2Request) HasTemplateFormat() bool { + if o != nil && o.TemplateFormat.IsSet() { + return true + } + + return false +} + +// SetTemplateFormat gets a reference to the given NullableString and assigns it to the TemplateFormat field. +func (o *EvalTemplateUpdateV2Request) SetTemplateFormat(v string) { + o.TemplateFormat.Set(&v) +} + +// SetTemplateFormatNil sets the value for TemplateFormat to be an explicit nil +func (o *EvalTemplateUpdateV2Request) SetTemplateFormatNil() { + o.TemplateFormat.Set(nil) +} + +// UnsetTemplateFormat ensures that no value is present for TemplateFormat, not even an explicit nil +func (o *EvalTemplateUpdateV2Request) UnsetTemplateFormat() { + o.TemplateFormat.Unset() +} + +func (o EvalTemplateUpdateV2Request) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateUpdateV2Request) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.EvalType.IsSet() { + toSerialize["eval_type"] = o.EvalType.Get() + } + if o.Instructions.IsSet() { + toSerialize["instructions"] = o.Instructions.Get() + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if o.OutputType.IsSet() { + toSerialize["output_type"] = o.OutputType.Get() + } + if o.PassThreshold.IsSet() { + toSerialize["pass_threshold"] = o.PassThreshold.Get() + } + if !IsNil(o.ChoiceScores) { + toSerialize["choice_scores"] = o.ChoiceScores + } + if o.MultiChoice.IsSet() { + toSerialize["multi_choice"] = o.MultiChoice.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.CheckInternet.IsSet() { + toSerialize["check_internet"] = o.CheckInternet.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.CodeLanguage.IsSet() { + toSerialize["code_language"] = o.CodeLanguage.Get() + } + if o.Messages != nil { + toSerialize["messages"] = o.Messages + } + if o.FewShotExamples != nil { + toSerialize["few_shot_examples"] = o.FewShotExamples + } + if o.Mode.IsSet() { + toSerialize["mode"] = o.Mode.Get() + } + if !IsNil(o.Tools) { + toSerialize["tools"] = o.Tools + } + if o.KnowledgeBases != nil { + toSerialize["knowledge_bases"] = o.KnowledgeBases + } + if !IsNil(o.DataInjection) { + toSerialize["data_injection"] = o.DataInjection + } + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + if o.ErrorLocalizerEnabled.IsSet() { + toSerialize["error_localizer_enabled"] = o.ErrorLocalizerEnabled.Get() + } + if o.Publish.IsSet() { + toSerialize["publish"] = o.Publish.Get() + } + if o.TemplateFormat.IsSet() { + toSerialize["template_format"] = o.TemplateFormat.Get() + } + return toSerialize, nil +} + +type NullableEvalTemplateUpdateV2Request struct { + value *EvalTemplateUpdateV2Request + isSet bool +} + +func (v NullableEvalTemplateUpdateV2Request) Get() *EvalTemplateUpdateV2Request { + return v.value +} + +func (v *NullableEvalTemplateUpdateV2Request) Set(val *EvalTemplateUpdateV2Request) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateUpdateV2Request) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateUpdateV2Request) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateUpdateV2Request(val *EvalTemplateUpdateV2Request) *NullableEvalTemplateUpdateV2Request { + return &NullableEvalTemplateUpdateV2Request{value: val, isSet: true} +} + +func (v NullableEvalTemplateUpdateV2Request) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateUpdateV2Request) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_create_request.go b/go/futureagi/model_eval_template_version_create_request.go new file mode 100644 index 0000000..b507fea --- /dev/null +++ b/go/futureagi/model_eval_template_version_create_request.go @@ -0,0 +1,219 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the EvalTemplateVersionCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionCreateRequest{} + +// EvalTemplateVersionCreateRequest struct for EvalTemplateVersionCreateRequest +type EvalTemplateVersionCreateRequest struct { + Criteria NullableString `json:"criteria,omitempty"` + Model NullableString `json:"model,omitempty"` + ConfigSnapshot map[string]interface{} `json:"config_snapshot,omitempty"` +} + +// NewEvalTemplateVersionCreateRequest instantiates a new EvalTemplateVersionCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionCreateRequest() *EvalTemplateVersionCreateRequest { + this := EvalTemplateVersionCreateRequest{} + return &this +} + +// NewEvalTemplateVersionCreateRequestWithDefaults instantiates a new EvalTemplateVersionCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionCreateRequestWithDefaults() *EvalTemplateVersionCreateRequest { + this := EvalTemplateVersionCreateRequest{} + return &this +} + +// GetCriteria returns the Criteria field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateVersionCreateRequest) GetCriteria() string { + if o == nil || IsNil(o.Criteria.Get()) { + var ret string + return ret + } + return *o.Criteria.Get() +} + +// GetCriteriaOk returns a tuple with the Criteria field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateVersionCreateRequest) GetCriteriaOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Criteria.Get(), o.Criteria.IsSet() +} + +// HasCriteria returns a boolean if a field has been set. +func (o *EvalTemplateVersionCreateRequest) HasCriteria() bool { + if o != nil && o.Criteria.IsSet() { + return true + } + + return false +} + +// SetCriteria gets a reference to the given NullableString and assigns it to the Criteria field. +func (o *EvalTemplateVersionCreateRequest) SetCriteria(v string) { + o.Criteria.Set(&v) +} + +// SetCriteriaNil sets the value for Criteria to be an explicit nil +func (o *EvalTemplateVersionCreateRequest) SetCriteriaNil() { + o.Criteria.Set(nil) +} + +// UnsetCriteria ensures that no value is present for Criteria, not even an explicit nil +func (o *EvalTemplateVersionCreateRequest) UnsetCriteria() { + o.Criteria.Unset() +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalTemplateVersionCreateRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalTemplateVersionCreateRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalTemplateVersionCreateRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *EvalTemplateVersionCreateRequest) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *EvalTemplateVersionCreateRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *EvalTemplateVersionCreateRequest) UnsetModel() { + o.Model.Unset() +} + +// GetConfigSnapshot returns the ConfigSnapshot field value if set, zero value otherwise. +func (o *EvalTemplateVersionCreateRequest) GetConfigSnapshot() map[string]interface{} { + if o == nil || IsNil(o.ConfigSnapshot) { + var ret map[string]interface{} + return ret + } + return o.ConfigSnapshot +} + +// GetConfigSnapshotOk returns a tuple with the ConfigSnapshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionCreateRequest) GetConfigSnapshotOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConfigSnapshot) { + return map[string]interface{}{}, false + } + return o.ConfigSnapshot, true +} + +// HasConfigSnapshot returns a boolean if a field has been set. +func (o *EvalTemplateVersionCreateRequest) HasConfigSnapshot() bool { + if o != nil && !IsNil(o.ConfigSnapshot) { + return true + } + + return false +} + +// SetConfigSnapshot gets a reference to the given map[string]interface{} and assigns it to the ConfigSnapshot field. +func (o *EvalTemplateVersionCreateRequest) SetConfigSnapshot(v map[string]interface{}) { + o.ConfigSnapshot = v +} + +func (o EvalTemplateVersionCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Criteria.IsSet() { + toSerialize["criteria"] = o.Criteria.Get() + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if !IsNil(o.ConfigSnapshot) { + toSerialize["config_snapshot"] = o.ConfigSnapshot + } + return toSerialize, nil +} + +type NullableEvalTemplateVersionCreateRequest struct { + value *EvalTemplateVersionCreateRequest + isSet bool +} + +func (v NullableEvalTemplateVersionCreateRequest) Get() *EvalTemplateVersionCreateRequest { + return v.value +} + +func (v *NullableEvalTemplateVersionCreateRequest) Set(val *EvalTemplateVersionCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionCreateRequest(val *EvalTemplateVersionCreateRequest) *NullableEvalTemplateVersionCreateRequest { + return &NullableEvalTemplateVersionCreateRequest{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_item.go b/go/futureagi/model_eval_template_version_item.go new file mode 100644 index 0000000..a5cc97f --- /dev/null +++ b/go/futureagi/model_eval_template_version_item.go @@ -0,0 +1,393 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateVersionItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionItem{} + +// EvalTemplateVersionItem struct for EvalTemplateVersionItem +type EvalTemplateVersionItem struct { + Id string `json:"id"` + VersionNumber int32 `json:"version_number"` + IsDefault bool `json:"is_default"` + Criteria *string `json:"criteria,omitempty"` + Model *string `json:"model,omitempty"` + ConfigSnapshot map[string]interface{} `json:"config_snapshot,omitempty"` + CreatedByName *string `json:"created_by_name,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` +} + +type _EvalTemplateVersionItem EvalTemplateVersionItem + +// NewEvalTemplateVersionItem instantiates a new EvalTemplateVersionItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionItem(id string, versionNumber int32, isDefault bool) *EvalTemplateVersionItem { + this := EvalTemplateVersionItem{} + this.Id = id + this.VersionNumber = versionNumber + this.IsDefault = isDefault + return &this +} + +// NewEvalTemplateVersionItemWithDefaults instantiates a new EvalTemplateVersionItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionItemWithDefaults() *EvalTemplateVersionItem { + this := EvalTemplateVersionItem{} + return &this +} + +// GetId returns the Id field value +func (o *EvalTemplateVersionItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateVersionItem) SetId(v string) { + o.Id = v +} + +// GetVersionNumber returns the VersionNumber field value +func (o *EvalTemplateVersionItem) GetVersionNumber() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.VersionNumber +} + +// GetVersionNumberOk returns a tuple with the VersionNumber field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetVersionNumberOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.VersionNumber, true +} + +// SetVersionNumber sets field value +func (o *EvalTemplateVersionItem) SetVersionNumber(v int32) { + o.VersionNumber = v +} + +// GetIsDefault returns the IsDefault field value +func (o *EvalTemplateVersionItem) GetIsDefault() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDefault, true +} + +// SetIsDefault sets field value +func (o *EvalTemplateVersionItem) SetIsDefault(v bool) { + o.IsDefault = v +} + +// GetCriteria returns the Criteria field value if set, zero value otherwise. +func (o *EvalTemplateVersionItem) GetCriteria() string { + if o == nil || IsNil(o.Criteria) { + var ret string + return ret + } + return *o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetCriteriaOk() (*string, bool) { + if o == nil || IsNil(o.Criteria) { + return nil, false + } + return o.Criteria, true +} + +// HasCriteria returns a boolean if a field has been set. +func (o *EvalTemplateVersionItem) HasCriteria() bool { + if o != nil && !IsNil(o.Criteria) { + return true + } + + return false +} + +// SetCriteria gets a reference to the given string and assigns it to the Criteria field. +func (o *EvalTemplateVersionItem) SetCriteria(v string) { + o.Criteria = &v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *EvalTemplateVersionItem) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *EvalTemplateVersionItem) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *EvalTemplateVersionItem) SetModel(v string) { + o.Model = &v +} + +// GetConfigSnapshot returns the ConfigSnapshot field value if set, zero value otherwise. +func (o *EvalTemplateVersionItem) GetConfigSnapshot() map[string]interface{} { + if o == nil || IsNil(o.ConfigSnapshot) { + var ret map[string]interface{} + return ret + } + return o.ConfigSnapshot +} + +// GetConfigSnapshotOk returns a tuple with the ConfigSnapshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetConfigSnapshotOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConfigSnapshot) { + return map[string]interface{}{}, false + } + return o.ConfigSnapshot, true +} + +// HasConfigSnapshot returns a boolean if a field has been set. +func (o *EvalTemplateVersionItem) HasConfigSnapshot() bool { + if o != nil && !IsNil(o.ConfigSnapshot) { + return true + } + + return false +} + +// SetConfigSnapshot gets a reference to the given map[string]interface{} and assigns it to the ConfigSnapshot field. +func (o *EvalTemplateVersionItem) SetConfigSnapshot(v map[string]interface{}) { + o.ConfigSnapshot = v +} + +// GetCreatedByName returns the CreatedByName field value if set, zero value otherwise. +func (o *EvalTemplateVersionItem) GetCreatedByName() string { + if o == nil || IsNil(o.CreatedByName) { + var ret string + return ret + } + return *o.CreatedByName +} + +// GetCreatedByNameOk returns a tuple with the CreatedByName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetCreatedByNameOk() (*string, bool) { + if o == nil || IsNil(o.CreatedByName) { + return nil, false + } + return o.CreatedByName, true +} + +// HasCreatedByName returns a boolean if a field has been set. +func (o *EvalTemplateVersionItem) HasCreatedByName() bool { + if o != nil && !IsNil(o.CreatedByName) { + return true + } + + return false +} + +// SetCreatedByName gets a reference to the given string and assigns it to the CreatedByName field. +func (o *EvalTemplateVersionItem) SetCreatedByName(v string) { + o.CreatedByName = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EvalTemplateVersionItem) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionItem) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EvalTemplateVersionItem) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *EvalTemplateVersionItem) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +func (o EvalTemplateVersionItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["version_number"] = o.VersionNumber + toSerialize["is_default"] = o.IsDefault + if !IsNil(o.Criteria) { + toSerialize["criteria"] = o.Criteria + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.ConfigSnapshot) { + toSerialize["config_snapshot"] = o.ConfigSnapshot + } + if !IsNil(o.CreatedByName) { + toSerialize["created_by_name"] = o.CreatedByName + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *EvalTemplateVersionItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "version_number", + "is_default", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateVersionItem := _EvalTemplateVersionItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateVersionItem) + + if err != nil { + return err + } + + *o = EvalTemplateVersionItem(varEvalTemplateVersionItem) + + return err +} + +type NullableEvalTemplateVersionItem struct { + value *EvalTemplateVersionItem + isSet bool +} + +func (v NullableEvalTemplateVersionItem) Get() *EvalTemplateVersionItem { + return v.value +} + +func (v *NullableEvalTemplateVersionItem) Set(val *EvalTemplateVersionItem) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionItem) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionItem(val *EvalTemplateVersionItem) *NullableEvalTemplateVersionItem { + return &NullableEvalTemplateVersionItem{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_list_response.go b/go/futureagi/model_eval_template_version_list_response.go new file mode 100644 index 0000000..28d3f07 --- /dev/null +++ b/go/futureagi/model_eval_template_version_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateVersionListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionListResponse{} + +// EvalTemplateVersionListResponse struct for EvalTemplateVersionListResponse +type EvalTemplateVersionListResponse struct { + Status bool `json:"status"` + Result EvalTemplateVersionListResponseResult `json:"result"` +} + +type _EvalTemplateVersionListResponse EvalTemplateVersionListResponse + +// NewEvalTemplateVersionListResponse instantiates a new EvalTemplateVersionListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionListResponse(status bool, result EvalTemplateVersionListResponseResult) *EvalTemplateVersionListResponse { + this := EvalTemplateVersionListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateVersionListResponseWithDefaults instantiates a new EvalTemplateVersionListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionListResponseWithDefaults() *EvalTemplateVersionListResponse { + this := EvalTemplateVersionListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateVersionListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateVersionListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateVersionListResponse) GetResult() EvalTemplateVersionListResponseResult { + if o == nil { + var ret EvalTemplateVersionListResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionListResponse) GetResultOk() (*EvalTemplateVersionListResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateVersionListResponse) SetResult(v EvalTemplateVersionListResponseResult) { + o.Result = v +} + +func (o EvalTemplateVersionListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateVersionListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateVersionListResponse := _EvalTemplateVersionListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateVersionListResponse) + + if err != nil { + return err + } + + *o = EvalTemplateVersionListResponse(varEvalTemplateVersionListResponse) + + return err +} + +type NullableEvalTemplateVersionListResponse struct { + value *EvalTemplateVersionListResponse + isSet bool +} + +func (v NullableEvalTemplateVersionListResponse) Get() *EvalTemplateVersionListResponse { + return v.value +} + +func (v *NullableEvalTemplateVersionListResponse) Set(val *EvalTemplateVersionListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionListResponse(val *EvalTemplateVersionListResponse) *NullableEvalTemplateVersionListResponse { + return &NullableEvalTemplateVersionListResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_list_response_result.go b/go/futureagi/model_eval_template_version_list_response_result.go new file mode 100644 index 0000000..0e5a425 --- /dev/null +++ b/go/futureagi/model_eval_template_version_list_response_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateVersionListResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionListResponseResult{} + +// EvalTemplateVersionListResponseResult struct for EvalTemplateVersionListResponseResult +type EvalTemplateVersionListResponseResult struct { + TemplateId string `json:"template_id"` + Versions []EvalTemplateVersionItem `json:"versions"` + Total int32 `json:"total"` +} + +type _EvalTemplateVersionListResponseResult EvalTemplateVersionListResponseResult + +// NewEvalTemplateVersionListResponseResult instantiates a new EvalTemplateVersionListResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionListResponseResult(templateId string, versions []EvalTemplateVersionItem, total int32) *EvalTemplateVersionListResponseResult { + this := EvalTemplateVersionListResponseResult{} + this.TemplateId = templateId + this.Versions = versions + this.Total = total + return &this +} + +// NewEvalTemplateVersionListResponseResultWithDefaults instantiates a new EvalTemplateVersionListResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionListResponseResultWithDefaults() *EvalTemplateVersionListResponseResult { + this := EvalTemplateVersionListResponseResult{} + return &this +} + +// GetTemplateId returns the TemplateId field value +func (o *EvalTemplateVersionListResponseResult) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionListResponseResult) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *EvalTemplateVersionListResponseResult) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetVersions returns the Versions field value +func (o *EvalTemplateVersionListResponseResult) GetVersions() []EvalTemplateVersionItem { + if o == nil { + var ret []EvalTemplateVersionItem + return ret + } + + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionListResponseResult) GetVersionsOk() ([]EvalTemplateVersionItem, bool) { + if o == nil { + return nil, false + } + return o.Versions, true +} + +// SetVersions sets field value +func (o *EvalTemplateVersionListResponseResult) SetVersions(v []EvalTemplateVersionItem) { + o.Versions = v +} + +// GetTotal returns the Total field value +func (o *EvalTemplateVersionListResponseResult) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionListResponseResult) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *EvalTemplateVersionListResponseResult) SetTotal(v int32) { + o.Total = v +} + +func (o EvalTemplateVersionListResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionListResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_id"] = o.TemplateId + toSerialize["versions"] = o.Versions + toSerialize["total"] = o.Total + return toSerialize, nil +} + +func (o *EvalTemplateVersionListResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_id", + "versions", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateVersionListResponseResult := _EvalTemplateVersionListResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateVersionListResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateVersionListResponseResult(varEvalTemplateVersionListResponseResult) + + return err +} + +type NullableEvalTemplateVersionListResponseResult struct { + value *EvalTemplateVersionListResponseResult + isSet bool +} + +func (v NullableEvalTemplateVersionListResponseResult) Get() *EvalTemplateVersionListResponseResult { + return v.value +} + +func (v *NullableEvalTemplateVersionListResponseResult) Set(val *EvalTemplateVersionListResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionListResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionListResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionListResponseResult(val *EvalTemplateVersionListResponseResult) *NullableEvalTemplateVersionListResponseResult { + return &NullableEvalTemplateVersionListResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionListResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionListResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_response.go b/go/futureagi/model_eval_template_version_response.go new file mode 100644 index 0000000..96e22b3 --- /dev/null +++ b/go/futureagi/model_eval_template_version_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionResponse{} + +// EvalTemplateVersionResponse struct for EvalTemplateVersionResponse +type EvalTemplateVersionResponse struct { + Status bool `json:"status"` + Result EvalTemplateVersionResponseResult `json:"result"` +} + +type _EvalTemplateVersionResponse EvalTemplateVersionResponse + +// NewEvalTemplateVersionResponse instantiates a new EvalTemplateVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionResponse(status bool, result EvalTemplateVersionResponseResult) *EvalTemplateVersionResponse { + this := EvalTemplateVersionResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateVersionResponseWithDefaults instantiates a new EvalTemplateVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionResponseWithDefaults() *EvalTemplateVersionResponse { + this := EvalTemplateVersionResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateVersionResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateVersionResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateVersionResponse) GetResult() EvalTemplateVersionResponseResult { + if o == nil { + var ret EvalTemplateVersionResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionResponse) GetResultOk() (*EvalTemplateVersionResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateVersionResponse) SetResult(v EvalTemplateVersionResponseResult) { + o.Result = v +} + +func (o EvalTemplateVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateVersionResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateVersionResponse := _EvalTemplateVersionResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateVersionResponse) + + if err != nil { + return err + } + + *o = EvalTemplateVersionResponse(varEvalTemplateVersionResponse) + + return err +} + +type NullableEvalTemplateVersionResponse struct { + value *EvalTemplateVersionResponse + isSet bool +} + +func (v NullableEvalTemplateVersionResponse) Get() *EvalTemplateVersionResponse { + return v.value +} + +func (v *NullableEvalTemplateVersionResponse) Set(val *EvalTemplateVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionResponse(val *EvalTemplateVersionResponse) *NullableEvalTemplateVersionResponse { + return &NullableEvalTemplateVersionResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_response_result.go b/go/futureagi/model_eval_template_version_response_result.go new file mode 100644 index 0000000..f232e73 --- /dev/null +++ b/go/futureagi/model_eval_template_version_response_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateVersionResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionResponseResult{} + +// EvalTemplateVersionResponseResult struct for EvalTemplateVersionResponseResult +type EvalTemplateVersionResponseResult struct { + Id string `json:"id"` + VersionNumber int32 `json:"version_number"` + IsDefault bool `json:"is_default"` +} + +type _EvalTemplateVersionResponseResult EvalTemplateVersionResponseResult + +// NewEvalTemplateVersionResponseResult instantiates a new EvalTemplateVersionResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionResponseResult(id string, versionNumber int32, isDefault bool) *EvalTemplateVersionResponseResult { + this := EvalTemplateVersionResponseResult{} + this.Id = id + this.VersionNumber = versionNumber + this.IsDefault = isDefault + return &this +} + +// NewEvalTemplateVersionResponseResultWithDefaults instantiates a new EvalTemplateVersionResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionResponseResultWithDefaults() *EvalTemplateVersionResponseResult { + this := EvalTemplateVersionResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *EvalTemplateVersionResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateVersionResponseResult) SetId(v string) { + o.Id = v +} + +// GetVersionNumber returns the VersionNumber field value +func (o *EvalTemplateVersionResponseResult) GetVersionNumber() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.VersionNumber +} + +// GetVersionNumberOk returns a tuple with the VersionNumber field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionResponseResult) GetVersionNumberOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.VersionNumber, true +} + +// SetVersionNumber sets field value +func (o *EvalTemplateVersionResponseResult) SetVersionNumber(v int32) { + o.VersionNumber = v +} + +// GetIsDefault returns the IsDefault field value +func (o *EvalTemplateVersionResponseResult) GetIsDefault() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionResponseResult) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDefault, true +} + +// SetIsDefault sets field value +func (o *EvalTemplateVersionResponseResult) SetIsDefault(v bool) { + o.IsDefault = v +} + +func (o EvalTemplateVersionResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["version_number"] = o.VersionNumber + toSerialize["is_default"] = o.IsDefault + return toSerialize, nil +} + +func (o *EvalTemplateVersionResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "version_number", + "is_default", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateVersionResponseResult := _EvalTemplateVersionResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateVersionResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateVersionResponseResult(varEvalTemplateVersionResponseResult) + + return err +} + +type NullableEvalTemplateVersionResponseResult struct { + value *EvalTemplateVersionResponseResult + isSet bool +} + +func (v NullableEvalTemplateVersionResponseResult) Get() *EvalTemplateVersionResponseResult { + return v.value +} + +func (v *NullableEvalTemplateVersionResponseResult) Set(val *EvalTemplateVersionResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionResponseResult(val *EvalTemplateVersionResponseResult) *NullableEvalTemplateVersionResponseResult { + return &NullableEvalTemplateVersionResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_restore_response.go b/go/futureagi/model_eval_template_version_restore_response.go new file mode 100644 index 0000000..1826adc --- /dev/null +++ b/go/futureagi/model_eval_template_version_restore_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateVersionRestoreResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionRestoreResponse{} + +// EvalTemplateVersionRestoreResponse struct for EvalTemplateVersionRestoreResponse +type EvalTemplateVersionRestoreResponse struct { + Status bool `json:"status"` + Result EvalTemplateVersionRestoreResponseResult `json:"result"` +} + +type _EvalTemplateVersionRestoreResponse EvalTemplateVersionRestoreResponse + +// NewEvalTemplateVersionRestoreResponse instantiates a new EvalTemplateVersionRestoreResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionRestoreResponse(status bool, result EvalTemplateVersionRestoreResponseResult) *EvalTemplateVersionRestoreResponse { + this := EvalTemplateVersionRestoreResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalTemplateVersionRestoreResponseWithDefaults instantiates a new EvalTemplateVersionRestoreResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionRestoreResponseWithDefaults() *EvalTemplateVersionRestoreResponse { + this := EvalTemplateVersionRestoreResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalTemplateVersionRestoreResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionRestoreResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalTemplateVersionRestoreResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalTemplateVersionRestoreResponse) GetResult() EvalTemplateVersionRestoreResponseResult { + if o == nil { + var ret EvalTemplateVersionRestoreResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionRestoreResponse) GetResultOk() (*EvalTemplateVersionRestoreResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalTemplateVersionRestoreResponse) SetResult(v EvalTemplateVersionRestoreResponseResult) { + o.Result = v +} + +func (o EvalTemplateVersionRestoreResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionRestoreResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalTemplateVersionRestoreResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateVersionRestoreResponse := _EvalTemplateVersionRestoreResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateVersionRestoreResponse) + + if err != nil { + return err + } + + *o = EvalTemplateVersionRestoreResponse(varEvalTemplateVersionRestoreResponse) + + return err +} + +type NullableEvalTemplateVersionRestoreResponse struct { + value *EvalTemplateVersionRestoreResponse + isSet bool +} + +func (v NullableEvalTemplateVersionRestoreResponse) Get() *EvalTemplateVersionRestoreResponse { + return v.value +} + +func (v *NullableEvalTemplateVersionRestoreResponse) Set(val *EvalTemplateVersionRestoreResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionRestoreResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionRestoreResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionRestoreResponse(val *EvalTemplateVersionRestoreResponse) *NullableEvalTemplateVersionRestoreResponse { + return &NullableEvalTemplateVersionRestoreResponse{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionRestoreResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionRestoreResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_template_version_restore_response_result.go b/go/futureagi/model_eval_template_version_restore_response_result.go new file mode 100644 index 0000000..223e9ed --- /dev/null +++ b/go/futureagi/model_eval_template_version_restore_response_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalTemplateVersionRestoreResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalTemplateVersionRestoreResponseResult{} + +// EvalTemplateVersionRestoreResponseResult struct for EvalTemplateVersionRestoreResponseResult +type EvalTemplateVersionRestoreResponseResult struct { + Id string `json:"id"` + VersionNumber int32 `json:"version_number"` + IsDefault bool `json:"is_default"` + RestoredFrom int32 `json:"restored_from"` +} + +type _EvalTemplateVersionRestoreResponseResult EvalTemplateVersionRestoreResponseResult + +// NewEvalTemplateVersionRestoreResponseResult instantiates a new EvalTemplateVersionRestoreResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalTemplateVersionRestoreResponseResult(id string, versionNumber int32, isDefault bool, restoredFrom int32) *EvalTemplateVersionRestoreResponseResult { + this := EvalTemplateVersionRestoreResponseResult{} + this.Id = id + this.VersionNumber = versionNumber + this.IsDefault = isDefault + this.RestoredFrom = restoredFrom + return &this +} + +// NewEvalTemplateVersionRestoreResponseResultWithDefaults instantiates a new EvalTemplateVersionRestoreResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalTemplateVersionRestoreResponseResultWithDefaults() *EvalTemplateVersionRestoreResponseResult { + this := EvalTemplateVersionRestoreResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *EvalTemplateVersionRestoreResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionRestoreResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalTemplateVersionRestoreResponseResult) SetId(v string) { + o.Id = v +} + +// GetVersionNumber returns the VersionNumber field value +func (o *EvalTemplateVersionRestoreResponseResult) GetVersionNumber() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.VersionNumber +} + +// GetVersionNumberOk returns a tuple with the VersionNumber field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionRestoreResponseResult) GetVersionNumberOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.VersionNumber, true +} + +// SetVersionNumber sets field value +func (o *EvalTemplateVersionRestoreResponseResult) SetVersionNumber(v int32) { + o.VersionNumber = v +} + +// GetIsDefault returns the IsDefault field value +func (o *EvalTemplateVersionRestoreResponseResult) GetIsDefault() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionRestoreResponseResult) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDefault, true +} + +// SetIsDefault sets field value +func (o *EvalTemplateVersionRestoreResponseResult) SetIsDefault(v bool) { + o.IsDefault = v +} + +// GetRestoredFrom returns the RestoredFrom field value +func (o *EvalTemplateVersionRestoreResponseResult) GetRestoredFrom() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RestoredFrom +} + +// GetRestoredFromOk returns a tuple with the RestoredFrom field value +// and a boolean to check if the value has been set. +func (o *EvalTemplateVersionRestoreResponseResult) GetRestoredFromOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RestoredFrom, true +} + +// SetRestoredFrom sets field value +func (o *EvalTemplateVersionRestoreResponseResult) SetRestoredFrom(v int32) { + o.RestoredFrom = v +} + +func (o EvalTemplateVersionRestoreResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalTemplateVersionRestoreResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["version_number"] = o.VersionNumber + toSerialize["is_default"] = o.IsDefault + toSerialize["restored_from"] = o.RestoredFrom + return toSerialize, nil +} + +func (o *EvalTemplateVersionRestoreResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "version_number", + "is_default", + "restored_from", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalTemplateVersionRestoreResponseResult := _EvalTemplateVersionRestoreResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalTemplateVersionRestoreResponseResult) + + if err != nil { + return err + } + + *o = EvalTemplateVersionRestoreResponseResult(varEvalTemplateVersionRestoreResponseResult) + + return err +} + +type NullableEvalTemplateVersionRestoreResponseResult struct { + value *EvalTemplateVersionRestoreResponseResult + isSet bool +} + +func (v NullableEvalTemplateVersionRestoreResponseResult) Get() *EvalTemplateVersionRestoreResponseResult { + return v.value +} + +func (v *NullableEvalTemplateVersionRestoreResponseResult) Set(val *EvalTemplateVersionRestoreResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalTemplateVersionRestoreResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalTemplateVersionRestoreResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalTemplateVersionRestoreResponseResult(val *EvalTemplateVersionRestoreResponseResult) *NullableEvalTemplateVersionRestoreResponseResult { + return &NullableEvalTemplateVersionRestoreResponseResult{value: val, isSet: true} +} + +func (v NullableEvalTemplateVersionRestoreResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalTemplateVersionRestoreResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_usage_chart_point.go b/go/futureagi/model_eval_usage_chart_point.go new file mode 100644 index 0000000..a64ff29 --- /dev/null +++ b/go/futureagi/model_eval_usage_chart_point.go @@ -0,0 +1,348 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalUsageChartPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalUsageChartPoint{} + +// EvalUsageChartPoint struct for EvalUsageChartPoint +type EvalUsageChartPoint struct { + Timestamp string `json:"timestamp"` + Calls *int32 `json:"calls,omitempty"` + AvgLatencyMs *int32 `json:"avg_latency_ms,omitempty"` + AvgScore NullableFloat32 `json:"avg_score,omitempty"` + PassCount *int32 `json:"pass_count,omitempty"` + FailCount *int32 `json:"fail_count,omitempty"` +} + +type _EvalUsageChartPoint EvalUsageChartPoint + +// NewEvalUsageChartPoint instantiates a new EvalUsageChartPoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalUsageChartPoint(timestamp string) *EvalUsageChartPoint { + this := EvalUsageChartPoint{} + this.Timestamp = timestamp + return &this +} + +// NewEvalUsageChartPointWithDefaults instantiates a new EvalUsageChartPoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalUsageChartPointWithDefaults() *EvalUsageChartPoint { + this := EvalUsageChartPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value +func (o *EvalUsageChartPoint) GetTimestamp() string { + if o == nil { + var ret string + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *EvalUsageChartPoint) GetTimestampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *EvalUsageChartPoint) SetTimestamp(v string) { + o.Timestamp = v +} + +// GetCalls returns the Calls field value if set, zero value otherwise. +func (o *EvalUsageChartPoint) GetCalls() int32 { + if o == nil || IsNil(o.Calls) { + var ret int32 + return ret + } + return *o.Calls +} + +// GetCallsOk returns a tuple with the Calls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageChartPoint) GetCallsOk() (*int32, bool) { + if o == nil || IsNil(o.Calls) { + return nil, false + } + return o.Calls, true +} + +// HasCalls returns a boolean if a field has been set. +func (o *EvalUsageChartPoint) HasCalls() bool { + if o != nil && !IsNil(o.Calls) { + return true + } + + return false +} + +// SetCalls gets a reference to the given int32 and assigns it to the Calls field. +func (o *EvalUsageChartPoint) SetCalls(v int32) { + o.Calls = &v +} + +// GetAvgLatencyMs returns the AvgLatencyMs field value if set, zero value otherwise. +func (o *EvalUsageChartPoint) GetAvgLatencyMs() int32 { + if o == nil || IsNil(o.AvgLatencyMs) { + var ret int32 + return ret + } + return *o.AvgLatencyMs +} + +// GetAvgLatencyMsOk returns a tuple with the AvgLatencyMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageChartPoint) GetAvgLatencyMsOk() (*int32, bool) { + if o == nil || IsNil(o.AvgLatencyMs) { + return nil, false + } + return o.AvgLatencyMs, true +} + +// HasAvgLatencyMs returns a boolean if a field has been set. +func (o *EvalUsageChartPoint) HasAvgLatencyMs() bool { + if o != nil && !IsNil(o.AvgLatencyMs) { + return true + } + + return false +} + +// SetAvgLatencyMs gets a reference to the given int32 and assigns it to the AvgLatencyMs field. +func (o *EvalUsageChartPoint) SetAvgLatencyMs(v int32) { + o.AvgLatencyMs = &v +} + +// GetAvgScore returns the AvgScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalUsageChartPoint) GetAvgScore() float32 { + if o == nil || IsNil(o.AvgScore.Get()) { + var ret float32 + return ret + } + return *o.AvgScore.Get() +} + +// GetAvgScoreOk returns a tuple with the AvgScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalUsageChartPoint) GetAvgScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgScore.Get(), o.AvgScore.IsSet() +} + +// HasAvgScore returns a boolean if a field has been set. +func (o *EvalUsageChartPoint) HasAvgScore() bool { + if o != nil && o.AvgScore.IsSet() { + return true + } + + return false +} + +// SetAvgScore gets a reference to the given NullableFloat32 and assigns it to the AvgScore field. +func (o *EvalUsageChartPoint) SetAvgScore(v float32) { + o.AvgScore.Set(&v) +} + +// SetAvgScoreNil sets the value for AvgScore to be an explicit nil +func (o *EvalUsageChartPoint) SetAvgScoreNil() { + o.AvgScore.Set(nil) +} + +// UnsetAvgScore ensures that no value is present for AvgScore, not even an explicit nil +func (o *EvalUsageChartPoint) UnsetAvgScore() { + o.AvgScore.Unset() +} + +// GetPassCount returns the PassCount field value if set, zero value otherwise. +func (o *EvalUsageChartPoint) GetPassCount() int32 { + if o == nil || IsNil(o.PassCount) { + var ret int32 + return ret + } + return *o.PassCount +} + +// GetPassCountOk returns a tuple with the PassCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageChartPoint) GetPassCountOk() (*int32, bool) { + if o == nil || IsNil(o.PassCount) { + return nil, false + } + return o.PassCount, true +} + +// HasPassCount returns a boolean if a field has been set. +func (o *EvalUsageChartPoint) HasPassCount() bool { + if o != nil && !IsNil(o.PassCount) { + return true + } + + return false +} + +// SetPassCount gets a reference to the given int32 and assigns it to the PassCount field. +func (o *EvalUsageChartPoint) SetPassCount(v int32) { + o.PassCount = &v +} + +// GetFailCount returns the FailCount field value if set, zero value otherwise. +func (o *EvalUsageChartPoint) GetFailCount() int32 { + if o == nil || IsNil(o.FailCount) { + var ret int32 + return ret + } + return *o.FailCount +} + +// GetFailCountOk returns a tuple with the FailCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageChartPoint) GetFailCountOk() (*int32, bool) { + if o == nil || IsNil(o.FailCount) { + return nil, false + } + return o.FailCount, true +} + +// HasFailCount returns a boolean if a field has been set. +func (o *EvalUsageChartPoint) HasFailCount() bool { + if o != nil && !IsNil(o.FailCount) { + return true + } + + return false +} + +// SetFailCount gets a reference to the given int32 and assigns it to the FailCount field. +func (o *EvalUsageChartPoint) SetFailCount(v int32) { + o.FailCount = &v +} + +func (o EvalUsageChartPoint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalUsageChartPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["timestamp"] = o.Timestamp + if !IsNil(o.Calls) { + toSerialize["calls"] = o.Calls + } + if !IsNil(o.AvgLatencyMs) { + toSerialize["avg_latency_ms"] = o.AvgLatencyMs + } + if o.AvgScore.IsSet() { + toSerialize["avg_score"] = o.AvgScore.Get() + } + if !IsNil(o.PassCount) { + toSerialize["pass_count"] = o.PassCount + } + if !IsNil(o.FailCount) { + toSerialize["fail_count"] = o.FailCount + } + return toSerialize, nil +} + +func (o *EvalUsageChartPoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timestamp", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalUsageChartPoint := _EvalUsageChartPoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalUsageChartPoint) + + if err != nil { + return err + } + + *o = EvalUsageChartPoint(varEvalUsageChartPoint) + + return err +} + +type NullableEvalUsageChartPoint struct { + value *EvalUsageChartPoint + isSet bool +} + +func (v NullableEvalUsageChartPoint) Get() *EvalUsageChartPoint { + return v.value +} + +func (v *NullableEvalUsageChartPoint) Set(val *EvalUsageChartPoint) { + v.value = val + v.isSet = true +} + +func (v NullableEvalUsageChartPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalUsageChartPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalUsageChartPoint(val *EvalUsageChartPoint) *NullableEvalUsageChartPoint { + return &NullableEvalUsageChartPoint{value: val, isSet: true} +} + +func (v NullableEvalUsageChartPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalUsageChartPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_usage_feedback.go b/go/futureagi/model_eval_usage_feedback.go new file mode 100644 index 0000000..9ae8cc9 --- /dev/null +++ b/go/futureagi/model_eval_usage_feedback.go @@ -0,0 +1,337 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalUsageFeedback type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalUsageFeedback{} + +// EvalUsageFeedback struct for EvalUsageFeedback +type EvalUsageFeedback struct { + Id string `json:"id"` + Value map[string]interface{} `json:"value,omitempty"` + Explanation *string `json:"explanation,omitempty"` + ActionType *string `json:"action_type,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + User *string `json:"user,omitempty"` +} + +type _EvalUsageFeedback EvalUsageFeedback + +// NewEvalUsageFeedback instantiates a new EvalUsageFeedback object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalUsageFeedback(id string) *EvalUsageFeedback { + this := EvalUsageFeedback{} + this.Id = id + return &this +} + +// NewEvalUsageFeedbackWithDefaults instantiates a new EvalUsageFeedback object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalUsageFeedbackWithDefaults() *EvalUsageFeedback { + this := EvalUsageFeedback{} + return &this +} + +// GetId returns the Id field value +func (o *EvalUsageFeedback) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalUsageFeedback) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalUsageFeedback) SetId(v string) { + o.Id = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *EvalUsageFeedback) GetValue() map[string]interface{} { + if o == nil || IsNil(o.Value) { + var ret map[string]interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageFeedback) GetValueOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Value) { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *EvalUsageFeedback) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given map[string]interface{} and assigns it to the Value field. +func (o *EvalUsageFeedback) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetExplanation returns the Explanation field value if set, zero value otherwise. +func (o *EvalUsageFeedback) GetExplanation() string { + if o == nil || IsNil(o.Explanation) { + var ret string + return ret + } + return *o.Explanation +} + +// GetExplanationOk returns a tuple with the Explanation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageFeedback) GetExplanationOk() (*string, bool) { + if o == nil || IsNil(o.Explanation) { + return nil, false + } + return o.Explanation, true +} + +// HasExplanation returns a boolean if a field has been set. +func (o *EvalUsageFeedback) HasExplanation() bool { + if o != nil && !IsNil(o.Explanation) { + return true + } + + return false +} + +// SetExplanation gets a reference to the given string and assigns it to the Explanation field. +func (o *EvalUsageFeedback) SetExplanation(v string) { + o.Explanation = &v +} + +// GetActionType returns the ActionType field value if set, zero value otherwise. +func (o *EvalUsageFeedback) GetActionType() string { + if o == nil || IsNil(o.ActionType) { + var ret string + return ret + } + return *o.ActionType +} + +// GetActionTypeOk returns a tuple with the ActionType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageFeedback) GetActionTypeOk() (*string, bool) { + if o == nil || IsNil(o.ActionType) { + return nil, false + } + return o.ActionType, true +} + +// HasActionType returns a boolean if a field has been set. +func (o *EvalUsageFeedback) HasActionType() bool { + if o != nil && !IsNil(o.ActionType) { + return true + } + + return false +} + +// SetActionType gets a reference to the given string and assigns it to the ActionType field. +func (o *EvalUsageFeedback) SetActionType(v string) { + o.ActionType = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EvalUsageFeedback) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageFeedback) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EvalUsageFeedback) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *EvalUsageFeedback) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *EvalUsageFeedback) GetUser() string { + if o == nil || IsNil(o.User) { + var ret string + return ret + } + return *o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageFeedback) GetUserOk() (*string, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *EvalUsageFeedback) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given string and assigns it to the User field. +func (o *EvalUsageFeedback) SetUser(v string) { + o.User = &v +} + +func (o EvalUsageFeedback) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalUsageFeedback) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Explanation) { + toSerialize["explanation"] = o.Explanation + } + if !IsNil(o.ActionType) { + toSerialize["action_type"] = o.ActionType + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + return toSerialize, nil +} + +func (o *EvalUsageFeedback) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalUsageFeedback := _EvalUsageFeedback{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalUsageFeedback) + + if err != nil { + return err + } + + *o = EvalUsageFeedback(varEvalUsageFeedback) + + return err +} + +type NullableEvalUsageFeedback struct { + value *EvalUsageFeedback + isSet bool +} + +func (v NullableEvalUsageFeedback) Get() *EvalUsageFeedback { + return v.value +} + +func (v *NullableEvalUsageFeedback) Set(val *EvalUsageFeedback) { + v.value = val + v.isSet = true +} + +func (v NullableEvalUsageFeedback) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalUsageFeedback) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalUsageFeedback(val *EvalUsageFeedback) *NullableEvalUsageFeedback { + return &NullableEvalUsageFeedback{value: val, isSet: true} +} + +func (v NullableEvalUsageFeedback) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalUsageFeedback) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_usage_log_item.go b/go/futureagi/model_eval_usage_log_item.go new file mode 100644 index 0000000..c335c31 --- /dev/null +++ b/go/futureagi/model_eval_usage_log_item.go @@ -0,0 +1,543 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalUsageLogItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalUsageLogItem{} + +// EvalUsageLogItem struct for EvalUsageLogItem +type EvalUsageLogItem struct { + Id string `json:"id"` + Input string `json:"input"` + Result *string `json:"result,omitempty"` + Score NullableFloat32 `json:"score,omitempty"` + Reason *string `json:"reason,omitempty"` + Status string `json:"status"` + Source *string `json:"source,omitempty"` + CreatedAt string `json:"created_at"` + Detail map[string]interface{} `json:"detail"` + Feedback *EvalUsageFeedback `json:"feedback,omitempty"` + Composite *bool `json:"composite,omitempty"` + AggregatePass NullableBool `json:"aggregate_pass,omitempty"` +} + +type _EvalUsageLogItem EvalUsageLogItem + +// NewEvalUsageLogItem instantiates a new EvalUsageLogItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalUsageLogItem(id string, input string, status string, createdAt string, detail map[string]interface{}) *EvalUsageLogItem { + this := EvalUsageLogItem{} + this.Id = id + this.Input = input + this.Status = status + this.CreatedAt = createdAt + this.Detail = detail + return &this +} + +// NewEvalUsageLogItemWithDefaults instantiates a new EvalUsageLogItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalUsageLogItemWithDefaults() *EvalUsageLogItem { + this := EvalUsageLogItem{} + return &this +} + +// GetId returns the Id field value +func (o *EvalUsageLogItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EvalUsageLogItem) SetId(v string) { + o.Id = v +} + +// GetInput returns the Input field value +func (o *EvalUsageLogItem) GetInput() string { + if o == nil { + var ret string + return ret + } + + return o.Input +} + +// GetInputOk returns a tuple with the Input field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetInputOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Input, true +} + +// SetInput sets field value +func (o *EvalUsageLogItem) SetInput(v string) { + o.Input = v +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *EvalUsageLogItem) GetResult() string { + if o == nil || IsNil(o.Result) { + var ret string + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetResultOk() (*string, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *EvalUsageLogItem) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given string and assigns it to the Result field. +func (o *EvalUsageLogItem) SetResult(v string) { + o.Result = &v +} + +// GetScore returns the Score field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalUsageLogItem) GetScore() float32 { + if o == nil || IsNil(o.Score.Get()) { + var ret float32 + return ret + } + return *o.Score.Get() +} + +// GetScoreOk returns a tuple with the Score field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalUsageLogItem) GetScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Score.Get(), o.Score.IsSet() +} + +// HasScore returns a boolean if a field has been set. +func (o *EvalUsageLogItem) HasScore() bool { + if o != nil && o.Score.IsSet() { + return true + } + + return false +} + +// SetScore gets a reference to the given NullableFloat32 and assigns it to the Score field. +func (o *EvalUsageLogItem) SetScore(v float32) { + o.Score.Set(&v) +} + +// SetScoreNil sets the value for Score to be an explicit nil +func (o *EvalUsageLogItem) SetScoreNil() { + o.Score.Set(nil) +} + +// UnsetScore ensures that no value is present for Score, not even an explicit nil +func (o *EvalUsageLogItem) UnsetScore() { + o.Score.Unset() +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *EvalUsageLogItem) GetReason() string { + if o == nil || IsNil(o.Reason) { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetReasonOk() (*string, bool) { + if o == nil || IsNil(o.Reason) { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *EvalUsageLogItem) HasReason() bool { + if o != nil && !IsNil(o.Reason) { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *EvalUsageLogItem) SetReason(v string) { + o.Reason = &v +} + +// GetStatus returns the Status field value +func (o *EvalUsageLogItem) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalUsageLogItem) SetStatus(v string) { + o.Status = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *EvalUsageLogItem) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *EvalUsageLogItem) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *EvalUsageLogItem) SetSource(v string) { + o.Source = &v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *EvalUsageLogItem) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *EvalUsageLogItem) SetCreatedAt(v string) { + o.CreatedAt = v +} + +// GetDetail returns the Detail field value +func (o *EvalUsageLogItem) GetDetail() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetDetailOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Detail, true +} + +// SetDetail sets field value +func (o *EvalUsageLogItem) SetDetail(v map[string]interface{}) { + o.Detail = v +} + +// GetFeedback returns the Feedback field value if set, zero value otherwise. +func (o *EvalUsageLogItem) GetFeedback() EvalUsageFeedback { + if o == nil || IsNil(o.Feedback) { + var ret EvalUsageFeedback + return ret + } + return *o.Feedback +} + +// GetFeedbackOk returns a tuple with the Feedback field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetFeedbackOk() (*EvalUsageFeedback, bool) { + if o == nil || IsNil(o.Feedback) { + return nil, false + } + return o.Feedback, true +} + +// HasFeedback returns a boolean if a field has been set. +func (o *EvalUsageLogItem) HasFeedback() bool { + if o != nil && !IsNil(o.Feedback) { + return true + } + + return false +} + +// SetFeedback gets a reference to the given EvalUsageFeedback and assigns it to the Feedback field. +func (o *EvalUsageLogItem) SetFeedback(v EvalUsageFeedback) { + o.Feedback = &v +} + +// GetComposite returns the Composite field value if set, zero value otherwise. +func (o *EvalUsageLogItem) GetComposite() bool { + if o == nil || IsNil(o.Composite) { + var ret bool + return ret + } + return *o.Composite +} + +// GetCompositeOk returns a tuple with the Composite field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EvalUsageLogItem) GetCompositeOk() (*bool, bool) { + if o == nil || IsNil(o.Composite) { + return nil, false + } + return o.Composite, true +} + +// HasComposite returns a boolean if a field has been set. +func (o *EvalUsageLogItem) HasComposite() bool { + if o != nil && !IsNil(o.Composite) { + return true + } + + return false +} + +// SetComposite gets a reference to the given bool and assigns it to the Composite field. +func (o *EvalUsageLogItem) SetComposite(v bool) { + o.Composite = &v +} + +// GetAggregatePass returns the AggregatePass field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EvalUsageLogItem) GetAggregatePass() bool { + if o == nil || IsNil(o.AggregatePass.Get()) { + var ret bool + return ret + } + return *o.AggregatePass.Get() +} + +// GetAggregatePassOk returns a tuple with the AggregatePass field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvalUsageLogItem) GetAggregatePassOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.AggregatePass.Get(), o.AggregatePass.IsSet() +} + +// HasAggregatePass returns a boolean if a field has been set. +func (o *EvalUsageLogItem) HasAggregatePass() bool { + if o != nil && o.AggregatePass.IsSet() { + return true + } + + return false +} + +// SetAggregatePass gets a reference to the given NullableBool and assigns it to the AggregatePass field. +func (o *EvalUsageLogItem) SetAggregatePass(v bool) { + o.AggregatePass.Set(&v) +} + +// SetAggregatePassNil sets the value for AggregatePass to be an explicit nil +func (o *EvalUsageLogItem) SetAggregatePassNil() { + o.AggregatePass.Set(nil) +} + +// UnsetAggregatePass ensures that no value is present for AggregatePass, not even an explicit nil +func (o *EvalUsageLogItem) UnsetAggregatePass() { + o.AggregatePass.Unset() +} + +func (o EvalUsageLogItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalUsageLogItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["input"] = o.Input + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + if o.Score.IsSet() { + toSerialize["score"] = o.Score.Get() + } + if !IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + toSerialize["status"] = o.Status + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + toSerialize["created_at"] = o.CreatedAt + toSerialize["detail"] = o.Detail + if !IsNil(o.Feedback) { + toSerialize["feedback"] = o.Feedback + } + if !IsNil(o.Composite) { + toSerialize["composite"] = o.Composite + } + if o.AggregatePass.IsSet() { + toSerialize["aggregate_pass"] = o.AggregatePass.Get() + } + return toSerialize, nil +} + +func (o *EvalUsageLogItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "input", + "status", + "created_at", + "detail", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalUsageLogItem := _EvalUsageLogItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalUsageLogItem) + + if err != nil { + return err + } + + *o = EvalUsageLogItem(varEvalUsageLogItem) + + return err +} + +type NullableEvalUsageLogItem struct { + value *EvalUsageLogItem + isSet bool +} + +func (v NullableEvalUsageLogItem) Get() *EvalUsageLogItem { + return v.value +} + +func (v *NullableEvalUsageLogItem) Set(val *EvalUsageLogItem) { + v.value = val + v.isSet = true +} + +func (v NullableEvalUsageLogItem) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalUsageLogItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalUsageLogItem(val *EvalUsageLogItem) *NullableEvalUsageLogItem { + return &NullableEvalUsageLogItem{value: val, isSet: true} +} + +func (v NullableEvalUsageLogItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalUsageLogItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_usage_logs.go b/go/futureagi/model_eval_usage_logs.go new file mode 100644 index 0000000..76696da --- /dev/null +++ b/go/futureagi/model_eval_usage_logs.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalUsageLogs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalUsageLogs{} + +// EvalUsageLogs struct for EvalUsageLogs +type EvalUsageLogs struct { + Items []EvalUsageLogItem `json:"items"` + Total int32 `json:"total"` + Page int32 `json:"page"` + PageSize int32 `json:"page_size"` +} + +type _EvalUsageLogs EvalUsageLogs + +// NewEvalUsageLogs instantiates a new EvalUsageLogs object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalUsageLogs(items []EvalUsageLogItem, total int32, page int32, pageSize int32) *EvalUsageLogs { + this := EvalUsageLogs{} + this.Items = items + this.Total = total + this.Page = page + this.PageSize = pageSize + return &this +} + +// NewEvalUsageLogsWithDefaults instantiates a new EvalUsageLogs object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalUsageLogsWithDefaults() *EvalUsageLogs { + this := EvalUsageLogs{} + return &this +} + +// GetItems returns the Items field value +func (o *EvalUsageLogs) GetItems() []EvalUsageLogItem { + if o == nil { + var ret []EvalUsageLogItem + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogs) GetItemsOk() ([]EvalUsageLogItem, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *EvalUsageLogs) SetItems(v []EvalUsageLogItem) { + o.Items = v +} + +// GetTotal returns the Total field value +func (o *EvalUsageLogs) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogs) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *EvalUsageLogs) SetTotal(v int32) { + o.Total = v +} + +// GetPage returns the Page field value +func (o *EvalUsageLogs) GetPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogs) GetPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *EvalUsageLogs) SetPage(v int32) { + o.Page = v +} + +// GetPageSize returns the PageSize field value +func (o *EvalUsageLogs) GetPageSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value +// and a boolean to check if the value has been set. +func (o *EvalUsageLogs) GetPageSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PageSize, true +} + +// SetPageSize sets field value +func (o *EvalUsageLogs) SetPageSize(v int32) { + o.PageSize = v +} + +func (o EvalUsageLogs) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalUsageLogs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["total"] = o.Total + toSerialize["page"] = o.Page + toSerialize["page_size"] = o.PageSize + return toSerialize, nil +} + +func (o *EvalUsageLogs) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "total", + "page", + "page_size", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalUsageLogs := _EvalUsageLogs{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalUsageLogs) + + if err != nil { + return err + } + + *o = EvalUsageLogs(varEvalUsageLogs) + + return err +} + +type NullableEvalUsageLogs struct { + value *EvalUsageLogs + isSet bool +} + +func (v NullableEvalUsageLogs) Get() *EvalUsageLogs { + return v.value +} + +func (v *NullableEvalUsageLogs) Set(val *EvalUsageLogs) { + v.value = val + v.isSet = true +} + +func (v NullableEvalUsageLogs) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalUsageLogs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalUsageLogs(val *EvalUsageLogs) *NullableEvalUsageLogs { + return &NullableEvalUsageLogs{value: val, isSet: true} +} + +func (v NullableEvalUsageLogs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalUsageLogs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_usage_stats.go b/go/futureagi/model_eval_usage_stats.go new file mode 100644 index 0000000..f490b4f --- /dev/null +++ b/go/futureagi/model_eval_usage_stats.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalUsageStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalUsageStats{} + +// EvalUsageStats struct for EvalUsageStats +type EvalUsageStats struct { + TotalRuns int32 `json:"total_runs"` + RunsPeriod int32 `json:"runs_period"` + SuccessCount int32 `json:"success_count"` + ErrorCount int32 `json:"error_count"` + PassRate float32 `json:"pass_rate"` +} + +type _EvalUsageStats EvalUsageStats + +// NewEvalUsageStats instantiates a new EvalUsageStats object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalUsageStats(totalRuns int32, runsPeriod int32, successCount int32, errorCount int32, passRate float32) *EvalUsageStats { + this := EvalUsageStats{} + this.TotalRuns = totalRuns + this.RunsPeriod = runsPeriod + this.SuccessCount = successCount + this.ErrorCount = errorCount + this.PassRate = passRate + return &this +} + +// NewEvalUsageStatsWithDefaults instantiates a new EvalUsageStats object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalUsageStatsWithDefaults() *EvalUsageStats { + this := EvalUsageStats{} + return &this +} + +// GetTotalRuns returns the TotalRuns field value +func (o *EvalUsageStats) GetTotalRuns() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalRuns +} + +// GetTotalRunsOk returns a tuple with the TotalRuns field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStats) GetTotalRunsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalRuns, true +} + +// SetTotalRuns sets field value +func (o *EvalUsageStats) SetTotalRuns(v int32) { + o.TotalRuns = v +} + +// GetRunsPeriod returns the RunsPeriod field value +func (o *EvalUsageStats) GetRunsPeriod() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RunsPeriod +} + +// GetRunsPeriodOk returns a tuple with the RunsPeriod field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStats) GetRunsPeriodOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RunsPeriod, true +} + +// SetRunsPeriod sets field value +func (o *EvalUsageStats) SetRunsPeriod(v int32) { + o.RunsPeriod = v +} + +// GetSuccessCount returns the SuccessCount field value +func (o *EvalUsageStats) GetSuccessCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SuccessCount +} + +// GetSuccessCountOk returns a tuple with the SuccessCount field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStats) GetSuccessCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SuccessCount, true +} + +// SetSuccessCount sets field value +func (o *EvalUsageStats) SetSuccessCount(v int32) { + o.SuccessCount = v +} + +// GetErrorCount returns the ErrorCount field value +func (o *EvalUsageStats) GetErrorCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ErrorCount +} + +// GetErrorCountOk returns a tuple with the ErrorCount field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStats) GetErrorCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ErrorCount, true +} + +// SetErrorCount sets field value +func (o *EvalUsageStats) SetErrorCount(v int32) { + o.ErrorCount = v +} + +// GetPassRate returns the PassRate field value +func (o *EvalUsageStats) GetPassRate() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.PassRate +} + +// GetPassRateOk returns a tuple with the PassRate field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStats) GetPassRateOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.PassRate, true +} + +// SetPassRate sets field value +func (o *EvalUsageStats) SetPassRate(v float32) { + o.PassRate = v +} + +func (o EvalUsageStats) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalUsageStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["total_runs"] = o.TotalRuns + toSerialize["runs_period"] = o.RunsPeriod + toSerialize["success_count"] = o.SuccessCount + toSerialize["error_count"] = o.ErrorCount + toSerialize["pass_rate"] = o.PassRate + return toSerialize, nil +} + +func (o *EvalUsageStats) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "total_runs", + "runs_period", + "success_count", + "error_count", + "pass_rate", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalUsageStats := _EvalUsageStats{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalUsageStats) + + if err != nil { + return err + } + + *o = EvalUsageStats(varEvalUsageStats) + + return err +} + +type NullableEvalUsageStats struct { + value *EvalUsageStats + isSet bool +} + +func (v NullableEvalUsageStats) Get() *EvalUsageStats { + return v.value +} + +func (v *NullableEvalUsageStats) Set(val *EvalUsageStats) { + v.value = val + v.isSet = true +} + +func (v NullableEvalUsageStats) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalUsageStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalUsageStats(val *EvalUsageStats) *NullableEvalUsageStats { + return &NullableEvalUsageStats{value: val, isSet: true} +} + +func (v NullableEvalUsageStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalUsageStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_usage_stats_response.go b/go/futureagi/model_eval_usage_stats_response.go new file mode 100644 index 0000000..1b784f9 --- /dev/null +++ b/go/futureagi/model_eval_usage_stats_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalUsageStatsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalUsageStatsResponse{} + +// EvalUsageStatsResponse struct for EvalUsageStatsResponse +type EvalUsageStatsResponse struct { + Status bool `json:"status"` + Result EvalUsageStatsResponseResult `json:"result"` +} + +type _EvalUsageStatsResponse EvalUsageStatsResponse + +// NewEvalUsageStatsResponse instantiates a new EvalUsageStatsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalUsageStatsResponse(status bool, result EvalUsageStatsResponseResult) *EvalUsageStatsResponse { + this := EvalUsageStatsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewEvalUsageStatsResponseWithDefaults instantiates a new EvalUsageStatsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalUsageStatsResponseWithDefaults() *EvalUsageStatsResponse { + this := EvalUsageStatsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *EvalUsageStatsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStatsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *EvalUsageStatsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *EvalUsageStatsResponse) GetResult() EvalUsageStatsResponseResult { + if o == nil { + var ret EvalUsageStatsResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStatsResponse) GetResultOk() (*EvalUsageStatsResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvalUsageStatsResponse) SetResult(v EvalUsageStatsResponseResult) { + o.Result = v +} + +func (o EvalUsageStatsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalUsageStatsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *EvalUsageStatsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalUsageStatsResponse := _EvalUsageStatsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalUsageStatsResponse) + + if err != nil { + return err + } + + *o = EvalUsageStatsResponse(varEvalUsageStatsResponse) + + return err +} + +type NullableEvalUsageStatsResponse struct { + value *EvalUsageStatsResponse + isSet bool +} + +func (v NullableEvalUsageStatsResponse) Get() *EvalUsageStatsResponse { + return v.value +} + +func (v *NullableEvalUsageStatsResponse) Set(val *EvalUsageStatsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvalUsageStatsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalUsageStatsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalUsageStatsResponse(val *EvalUsageStatsResponse) *NullableEvalUsageStatsResponse { + return &NullableEvalUsageStatsResponse{value: val, isSet: true} +} + +func (v NullableEvalUsageStatsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalUsageStatsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_eval_usage_stats_response_result.go b/go/futureagi/model_eval_usage_stats_response_result.go new file mode 100644 index 0000000..6c30b0a --- /dev/null +++ b/go/futureagi/model_eval_usage_stats_response_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvalUsageStatsResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvalUsageStatsResponseResult{} + +// EvalUsageStatsResponseResult struct for EvalUsageStatsResponseResult +type EvalUsageStatsResponseResult struct { + TemplateId string `json:"template_id"` + IsComposite bool `json:"is_composite"` + Stats EvalUsageStats `json:"stats"` + Chart []EvalUsageChartPoint `json:"chart"` + Logs EvalUsageLogs `json:"logs"` +} + +type _EvalUsageStatsResponseResult EvalUsageStatsResponseResult + +// NewEvalUsageStatsResponseResult instantiates a new EvalUsageStatsResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvalUsageStatsResponseResult(templateId string, isComposite bool, stats EvalUsageStats, chart []EvalUsageChartPoint, logs EvalUsageLogs) *EvalUsageStatsResponseResult { + this := EvalUsageStatsResponseResult{} + this.TemplateId = templateId + this.IsComposite = isComposite + this.Stats = stats + this.Chart = chart + this.Logs = logs + return &this +} + +// NewEvalUsageStatsResponseResultWithDefaults instantiates a new EvalUsageStatsResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvalUsageStatsResponseResultWithDefaults() *EvalUsageStatsResponseResult { + this := EvalUsageStatsResponseResult{} + return &this +} + +// GetTemplateId returns the TemplateId field value +func (o *EvalUsageStatsResponseResult) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStatsResponseResult) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *EvalUsageStatsResponseResult) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetIsComposite returns the IsComposite field value +func (o *EvalUsageStatsResponseResult) GetIsComposite() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsComposite +} + +// GetIsCompositeOk returns a tuple with the IsComposite field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStatsResponseResult) GetIsCompositeOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsComposite, true +} + +// SetIsComposite sets field value +func (o *EvalUsageStatsResponseResult) SetIsComposite(v bool) { + o.IsComposite = v +} + +// GetStats returns the Stats field value +func (o *EvalUsageStatsResponseResult) GetStats() EvalUsageStats { + if o == nil { + var ret EvalUsageStats + return ret + } + + return o.Stats +} + +// GetStatsOk returns a tuple with the Stats field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStatsResponseResult) GetStatsOk() (*EvalUsageStats, bool) { + if o == nil { + return nil, false + } + return &o.Stats, true +} + +// SetStats sets field value +func (o *EvalUsageStatsResponseResult) SetStats(v EvalUsageStats) { + o.Stats = v +} + +// GetChart returns the Chart field value +func (o *EvalUsageStatsResponseResult) GetChart() []EvalUsageChartPoint { + if o == nil { + var ret []EvalUsageChartPoint + return ret + } + + return o.Chart +} + +// GetChartOk returns a tuple with the Chart field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStatsResponseResult) GetChartOk() ([]EvalUsageChartPoint, bool) { + if o == nil { + return nil, false + } + return o.Chart, true +} + +// SetChart sets field value +func (o *EvalUsageStatsResponseResult) SetChart(v []EvalUsageChartPoint) { + o.Chart = v +} + +// GetLogs returns the Logs field value +func (o *EvalUsageStatsResponseResult) GetLogs() EvalUsageLogs { + if o == nil { + var ret EvalUsageLogs + return ret + } + + return o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value +// and a boolean to check if the value has been set. +func (o *EvalUsageStatsResponseResult) GetLogsOk() (*EvalUsageLogs, bool) { + if o == nil { + return nil, false + } + return &o.Logs, true +} + +// SetLogs sets field value +func (o *EvalUsageStatsResponseResult) SetLogs(v EvalUsageLogs) { + o.Logs = v +} + +func (o EvalUsageStatsResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvalUsageStatsResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_id"] = o.TemplateId + toSerialize["is_composite"] = o.IsComposite + toSerialize["stats"] = o.Stats + toSerialize["chart"] = o.Chart + toSerialize["logs"] = o.Logs + return toSerialize, nil +} + +func (o *EvalUsageStatsResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_id", + "is_composite", + "stats", + "chart", + "logs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvalUsageStatsResponseResult := _EvalUsageStatsResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvalUsageStatsResponseResult) + + if err != nil { + return err + } + + *o = EvalUsageStatsResponseResult(varEvalUsageStatsResponseResult) + + return err +} + +type NullableEvalUsageStatsResponseResult struct { + value *EvalUsageStatsResponseResult + isSet bool +} + +func (v NullableEvalUsageStatsResponseResult) Get() *EvalUsageStatsResponseResult { + return v.value +} + +func (v *NullableEvalUsageStatsResponseResult) Set(val *EvalUsageStatsResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvalUsageStatsResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvalUsageStatsResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvalUsageStatsResponseResult(val *EvalUsageStatsResponseResult) *NullableEvalUsageStatsResponseResult { + return &NullableEvalUsageStatsResponseResult{value: val, isSet: true} +} + +func (v NullableEvalUsageStatsResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvalUsageStatsResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_evaluation_result.go b/go/futureagi/model_evaluation_result.go new file mode 100644 index 0000000..88e9ac2 --- /dev/null +++ b/go/futureagi/model_evaluation_result.go @@ -0,0 +1,273 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EvaluationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvaluationResult{} + +// EvaluationResult struct for EvaluationResult +type EvaluationResult struct { + Label string `json:"label"` + Type string `json:"type"` + Result string `json:"result"` + Score NullableFloat32 `json:"score"` + Value NullableString `json:"value"` +} + +type _EvaluationResult EvaluationResult + +// NewEvaluationResult instantiates a new EvaluationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvaluationResult(label string, type_ string, result string, score NullableFloat32, value NullableString) *EvaluationResult { + this := EvaluationResult{} + this.Label = label + this.Type = type_ + this.Result = result + this.Score = score + this.Value = value + return &this +} + +// NewEvaluationResultWithDefaults instantiates a new EvaluationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvaluationResultWithDefaults() *EvaluationResult { + this := EvaluationResult{} + return &this +} + +// GetLabel returns the Label field value +func (o *EvaluationResult) GetLabel() string { + if o == nil { + var ret string + return ret + } + + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value +// and a boolean to check if the value has been set. +func (o *EvaluationResult) GetLabelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Label, true +} + +// SetLabel sets field value +func (o *EvaluationResult) SetLabel(v string) { + o.Label = v +} + +// GetType returns the Type field value +func (o *EvaluationResult) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *EvaluationResult) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *EvaluationResult) SetType(v string) { + o.Type = v +} + +// GetResult returns the Result field value +func (o *EvaluationResult) GetResult() string { + if o == nil { + var ret string + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *EvaluationResult) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *EvaluationResult) SetResult(v string) { + o.Result = v +} + +// GetScore returns the Score field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *EvaluationResult) GetScore() float32 { + if o == nil || o.Score.Get() == nil { + var ret float32 + return ret + } + + return *o.Score.Get() +} + +// GetScoreOk returns a tuple with the Score field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvaluationResult) GetScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Score.Get(), o.Score.IsSet() +} + +// SetScore sets field value +func (o *EvaluationResult) SetScore(v float32) { + o.Score.Set(&v) +} + +// GetValue returns the Value field value +// If the value is explicit nil, the zero value for string will be returned +func (o *EvaluationResult) GetValue() string { + if o == nil || o.Value.Get() == nil { + var ret string + return ret + } + + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EvaluationResult) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// SetValue sets field value +func (o *EvaluationResult) SetValue(v string) { + o.Value.Set(&v) +} + +func (o EvaluationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvaluationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label"] = o.Label + toSerialize["type"] = o.Type + toSerialize["result"] = o.Result + toSerialize["score"] = o.Score.Get() + toSerialize["value"] = o.Value.Get() + return toSerialize, nil +} + +func (o *EvaluationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label", + "type", + "result", + "score", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEvaluationResult := _EvaluationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEvaluationResult) + + if err != nil { + return err + } + + *o = EvaluationResult(varEvaluationResult) + + return err +} + +type NullableEvaluationResult struct { + value *EvaluationResult + isSet bool +} + +func (v NullableEvaluationResult) Get() *EvaluationResult { + return v.value +} + +func (v *NullableEvaluationResult) Set(val *EvaluationResult) { + v.value = val + v.isSet = true +} + +func (v NullableEvaluationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableEvaluationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvaluationResult(val *EvaluationResult) *NullableEvaluationResult { + return &NullableEvaluationResult{value: val, isSet: true} +} + +func (v NullableEvaluationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvaluationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_events_over_time_point.go b/go/futureagi/model_events_over_time_point.go new file mode 100644 index 0000000..6fc1348 --- /dev/null +++ b/go/futureagi/model_events_over_time_point.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the EventsOverTimePoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventsOverTimePoint{} + +// EventsOverTimePoint struct for EventsOverTimePoint +type EventsOverTimePoint struct { + Date string `json:"date"` + Errors int32 `json:"errors"` + Passing int32 `json:"passing"` + Users int32 `json:"users"` +} + +type _EventsOverTimePoint EventsOverTimePoint + +// NewEventsOverTimePoint instantiates a new EventsOverTimePoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEventsOverTimePoint(date string, errors int32, passing int32, users int32) *EventsOverTimePoint { + this := EventsOverTimePoint{} + this.Date = date + this.Errors = errors + this.Passing = passing + this.Users = users + return &this +} + +// NewEventsOverTimePointWithDefaults instantiates a new EventsOverTimePoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEventsOverTimePointWithDefaults() *EventsOverTimePoint { + this := EventsOverTimePoint{} + return &this +} + +// GetDate returns the Date field value +func (o *EventsOverTimePoint) GetDate() string { + if o == nil { + var ret string + return ret + } + + return o.Date +} + +// GetDateOk returns a tuple with the Date field value +// and a boolean to check if the value has been set. +func (o *EventsOverTimePoint) GetDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Date, true +} + +// SetDate sets field value +func (o *EventsOverTimePoint) SetDate(v string) { + o.Date = v +} + +// GetErrors returns the Errors field value +func (o *EventsOverTimePoint) GetErrors() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value +// and a boolean to check if the value has been set. +func (o *EventsOverTimePoint) GetErrorsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Errors, true +} + +// SetErrors sets field value +func (o *EventsOverTimePoint) SetErrors(v int32) { + o.Errors = v +} + +// GetPassing returns the Passing field value +func (o *EventsOverTimePoint) GetPassing() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Passing +} + +// GetPassingOk returns a tuple with the Passing field value +// and a boolean to check if the value has been set. +func (o *EventsOverTimePoint) GetPassingOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Passing, true +} + +// SetPassing sets field value +func (o *EventsOverTimePoint) SetPassing(v int32) { + o.Passing = v +} + +// GetUsers returns the Users field value +func (o *EventsOverTimePoint) GetUsers() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value +// and a boolean to check if the value has been set. +func (o *EventsOverTimePoint) GetUsersOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Users, true +} + +// SetUsers sets field value +func (o *EventsOverTimePoint) SetUsers(v int32) { + o.Users = v +} + +func (o EventsOverTimePoint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EventsOverTimePoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["date"] = o.Date + toSerialize["errors"] = o.Errors + toSerialize["passing"] = o.Passing + toSerialize["users"] = o.Users + return toSerialize, nil +} + +func (o *EventsOverTimePoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "date", + "errors", + "passing", + "users", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEventsOverTimePoint := _EventsOverTimePoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varEventsOverTimePoint) + + if err != nil { + return err + } + + *o = EventsOverTimePoint(varEventsOverTimePoint) + + return err +} + +type NullableEventsOverTimePoint struct { + value *EventsOverTimePoint + isSet bool +} + +func (v NullableEventsOverTimePoint) Get() *EventsOverTimePoint { + return v.value +} + +func (v *NullableEventsOverTimePoint) Set(val *EventsOverTimePoint) { + v.value = val + v.isSet = true +} + +func (v NullableEventsOverTimePoint) IsSet() bool { + return v.isSet +} + +func (v *NullableEventsOverTimePoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventsOverTimePoint(val *EventsOverTimePoint) *NullableEventsOverTimePoint { + return &NullableEventsOverTimePoint{value: val, isSet: true} +} + +func (v NullableEventsOverTimePoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventsOverTimePoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_execute_prompt_simulation_request.go b/go/futureagi/model_execute_prompt_simulation_request.go new file mode 100644 index 0000000..8a38cc6 --- /dev/null +++ b/go/futureagi/model_execute_prompt_simulation_request.go @@ -0,0 +1,165 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExecutePromptSimulationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExecutePromptSimulationRequest{} + +// ExecutePromptSimulationRequest struct for ExecutePromptSimulationRequest +type ExecutePromptSimulationRequest struct { + ScenarioIds []string `json:"scenario_ids,omitempty"` + SelectAll *bool `json:"select_all,omitempty"` +} + +// NewExecutePromptSimulationRequest instantiates a new ExecutePromptSimulationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutePromptSimulationRequest() *ExecutePromptSimulationRequest { + this := ExecutePromptSimulationRequest{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// NewExecutePromptSimulationRequestWithDefaults instantiates a new ExecutePromptSimulationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutePromptSimulationRequestWithDefaults() *ExecutePromptSimulationRequest { + this := ExecutePromptSimulationRequest{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// GetScenarioIds returns the ScenarioIds field value if set, zero value otherwise. +func (o *ExecutePromptSimulationRequest) GetScenarioIds() []string { + if o == nil || IsNil(o.ScenarioIds) { + var ret []string + return ret + } + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationRequest) GetScenarioIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ScenarioIds) { + return nil, false + } + return o.ScenarioIds, true +} + +// HasScenarioIds returns a boolean if a field has been set. +func (o *ExecutePromptSimulationRequest) HasScenarioIds() bool { + if o != nil && !IsNil(o.ScenarioIds) { + return true + } + + return false +} + +// SetScenarioIds gets a reference to the given []string and assigns it to the ScenarioIds field. +func (o *ExecutePromptSimulationRequest) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +// GetSelectAll returns the SelectAll field value if set, zero value otherwise. +func (o *ExecutePromptSimulationRequest) GetSelectAll() bool { + if o == nil || IsNil(o.SelectAll) { + var ret bool + return ret + } + return *o.SelectAll +} + +// GetSelectAllOk returns a tuple with the SelectAll field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationRequest) GetSelectAllOk() (*bool, bool) { + if o == nil || IsNil(o.SelectAll) { + return nil, false + } + return o.SelectAll, true +} + +// HasSelectAll returns a boolean if a field has been set. +func (o *ExecutePromptSimulationRequest) HasSelectAll() bool { + if o != nil && !IsNil(o.SelectAll) { + return true + } + + return false +} + +// SetSelectAll gets a reference to the given bool and assigns it to the SelectAll field. +func (o *ExecutePromptSimulationRequest) SetSelectAll(v bool) { + o.SelectAll = &v +} + +func (o ExecutePromptSimulationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutePromptSimulationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ScenarioIds) { + toSerialize["scenario_ids"] = o.ScenarioIds + } + if !IsNil(o.SelectAll) { + toSerialize["select_all"] = o.SelectAll + } + return toSerialize, nil +} + +type NullableExecutePromptSimulationRequest struct { + value *ExecutePromptSimulationRequest + isSet bool +} + +func (v NullableExecutePromptSimulationRequest) Get() *ExecutePromptSimulationRequest { + return v.value +} + +func (v *NullableExecutePromptSimulationRequest) Set(val *ExecutePromptSimulationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableExecutePromptSimulationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutePromptSimulationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutePromptSimulationRequest(val *ExecutePromptSimulationRequest) *NullableExecutePromptSimulationRequest { + return &NullableExecutePromptSimulationRequest{value: val, isSet: true} +} + +func (v NullableExecutePromptSimulationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutePromptSimulationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_execute_prompt_simulation_response.go b/go/futureagi/model_execute_prompt_simulation_response.go new file mode 100644 index 0000000..aff5aa5 --- /dev/null +++ b/go/futureagi/model_execute_prompt_simulation_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExecutePromptSimulationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExecutePromptSimulationResponse{} + +// ExecutePromptSimulationResponse struct for ExecutePromptSimulationResponse +type ExecutePromptSimulationResponse struct { + Status *bool `json:"status,omitempty"` + Result ExecutePromptSimulationResult `json:"result"` +} + +type _ExecutePromptSimulationResponse ExecutePromptSimulationResponse + +// NewExecutePromptSimulationResponse instantiates a new ExecutePromptSimulationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutePromptSimulationResponse(result ExecutePromptSimulationResult) *ExecutePromptSimulationResponse { + this := ExecutePromptSimulationResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewExecutePromptSimulationResponseWithDefaults instantiates a new ExecutePromptSimulationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutePromptSimulationResponseWithDefaults() *ExecutePromptSimulationResponse { + this := ExecutePromptSimulationResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExecutePromptSimulationResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExecutePromptSimulationResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ExecutePromptSimulationResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *ExecutePromptSimulationResponse) GetResult() ExecutePromptSimulationResult { + if o == nil { + var ret ExecutePromptSimulationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResponse) GetResultOk() (*ExecutePromptSimulationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExecutePromptSimulationResponse) SetResult(v ExecutePromptSimulationResult) { + o.Result = v +} + +func (o ExecutePromptSimulationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutePromptSimulationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExecutePromptSimulationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExecutePromptSimulationResponse := _ExecutePromptSimulationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExecutePromptSimulationResponse) + + if err != nil { + return err + } + + *o = ExecutePromptSimulationResponse(varExecutePromptSimulationResponse) + + return err +} + +type NullableExecutePromptSimulationResponse struct { + value *ExecutePromptSimulationResponse + isSet bool +} + +func (v NullableExecutePromptSimulationResponse) Get() *ExecutePromptSimulationResponse { + return v.value +} + +func (v *NullableExecutePromptSimulationResponse) Set(val *ExecutePromptSimulationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExecutePromptSimulationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutePromptSimulationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutePromptSimulationResponse(val *ExecutePromptSimulationResponse) *NullableExecutePromptSimulationResponse { + return &NullableExecutePromptSimulationResponse{value: val, isSet: true} +} + +func (v NullableExecutePromptSimulationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutePromptSimulationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_execute_prompt_simulation_result.go b/go/futureagi/model_execute_prompt_simulation_result.go new file mode 100644 index 0000000..7c6979d --- /dev/null +++ b/go/futureagi/model_execute_prompt_simulation_result.go @@ -0,0 +1,373 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExecutePromptSimulationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExecutePromptSimulationResult{} + +// ExecutePromptSimulationResult struct for ExecutePromptSimulationResult +type ExecutePromptSimulationResult struct { + Message *string `json:"message,omitempty"` + ExecutionId *string `json:"execution_id,omitempty"` + RunTestId *string `json:"run_test_id,omitempty"` + Status *string `json:"status,omitempty"` + TotalScenarios *int32 `json:"total_scenarios,omitempty"` + TotalCalls *int32 `json:"total_calls,omitempty"` + ScenarioIds []string `json:"scenario_ids"` +} + +type _ExecutePromptSimulationResult ExecutePromptSimulationResult + +// NewExecutePromptSimulationResult instantiates a new ExecutePromptSimulationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutePromptSimulationResult(scenarioIds []string) *ExecutePromptSimulationResult { + this := ExecutePromptSimulationResult{} + this.ScenarioIds = scenarioIds + return &this +} + +// NewExecutePromptSimulationResultWithDefaults instantiates a new ExecutePromptSimulationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutePromptSimulationResultWithDefaults() *ExecutePromptSimulationResult { + this := ExecutePromptSimulationResult{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ExecutePromptSimulationResult) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResult) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ExecutePromptSimulationResult) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ExecutePromptSimulationResult) SetMessage(v string) { + o.Message = &v +} + +// GetExecutionId returns the ExecutionId field value if set, zero value otherwise. +func (o *ExecutePromptSimulationResult) GetExecutionId() string { + if o == nil || IsNil(o.ExecutionId) { + var ret string + return ret + } + return *o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResult) GetExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionId) { + return nil, false + } + return o.ExecutionId, true +} + +// HasExecutionId returns a boolean if a field has been set. +func (o *ExecutePromptSimulationResult) HasExecutionId() bool { + if o != nil && !IsNil(o.ExecutionId) { + return true + } + + return false +} + +// SetExecutionId gets a reference to the given string and assigns it to the ExecutionId field. +func (o *ExecutePromptSimulationResult) SetExecutionId(v string) { + o.ExecutionId = &v +} + +// GetRunTestId returns the RunTestId field value if set, zero value otherwise. +func (o *ExecutePromptSimulationResult) GetRunTestId() string { + if o == nil || IsNil(o.RunTestId) { + var ret string + return ret + } + return *o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResult) GetRunTestIdOk() (*string, bool) { + if o == nil || IsNil(o.RunTestId) { + return nil, false + } + return o.RunTestId, true +} + +// HasRunTestId returns a boolean if a field has been set. +func (o *ExecutePromptSimulationResult) HasRunTestId() bool { + if o != nil && !IsNil(o.RunTestId) { + return true + } + + return false +} + +// SetRunTestId gets a reference to the given string and assigns it to the RunTestId field. +func (o *ExecutePromptSimulationResult) SetRunTestId(v string) { + o.RunTestId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExecutePromptSimulationResult) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResult) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExecutePromptSimulationResult) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExecutePromptSimulationResult) SetStatus(v string) { + o.Status = &v +} + +// GetTotalScenarios returns the TotalScenarios field value if set, zero value otherwise. +func (o *ExecutePromptSimulationResult) GetTotalScenarios() int32 { + if o == nil || IsNil(o.TotalScenarios) { + var ret int32 + return ret + } + return *o.TotalScenarios +} + +// GetTotalScenariosOk returns a tuple with the TotalScenarios field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResult) GetTotalScenariosOk() (*int32, bool) { + if o == nil || IsNil(o.TotalScenarios) { + return nil, false + } + return o.TotalScenarios, true +} + +// HasTotalScenarios returns a boolean if a field has been set. +func (o *ExecutePromptSimulationResult) HasTotalScenarios() bool { + if o != nil && !IsNil(o.TotalScenarios) { + return true + } + + return false +} + +// SetTotalScenarios gets a reference to the given int32 and assigns it to the TotalScenarios field. +func (o *ExecutePromptSimulationResult) SetTotalScenarios(v int32) { + o.TotalScenarios = &v +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *ExecutePromptSimulationResult) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResult) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *ExecutePromptSimulationResult) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *ExecutePromptSimulationResult) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetScenarioIds returns the ScenarioIds field value +func (o *ExecutePromptSimulationResult) GetScenarioIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value +// and a boolean to check if the value has been set. +func (o *ExecutePromptSimulationResult) GetScenarioIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ScenarioIds, true +} + +// SetScenarioIds sets field value +func (o *ExecutePromptSimulationResult) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +func (o ExecutePromptSimulationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutePromptSimulationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.ExecutionId) { + toSerialize["execution_id"] = o.ExecutionId + } + if !IsNil(o.RunTestId) { + toSerialize["run_test_id"] = o.RunTestId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TotalScenarios) { + toSerialize["total_scenarios"] = o.TotalScenarios + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + toSerialize["scenario_ids"] = o.ScenarioIds + return toSerialize, nil +} + +func (o *ExecutePromptSimulationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "scenario_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExecutePromptSimulationResult := _ExecutePromptSimulationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExecutePromptSimulationResult) + + if err != nil { + return err + } + + *o = ExecutePromptSimulationResult(varExecutePromptSimulationResult) + + return err +} + +type NullableExecutePromptSimulationResult struct { + value *ExecutePromptSimulationResult + isSet bool +} + +func (v NullableExecutePromptSimulationResult) Get() *ExecutePromptSimulationResult { + return v.value +} + +func (v *NullableExecutePromptSimulationResult) Set(val *ExecutePromptSimulationResult) { + v.value = val + v.isSet = true +} + +func (v NullableExecutePromptSimulationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutePromptSimulationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutePromptSimulationResult(val *ExecutePromptSimulationResult) *NullableExecutePromptSimulationResult { + return &NullableExecutePromptSimulationResult{value: val, isSet: true} +} + +func (v NullableExecutePromptSimulationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutePromptSimulationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_execute_run_test_.go b/go/futureagi/model_execute_run_test_.go new file mode 100644 index 0000000..03eb18b --- /dev/null +++ b/go/futureagi/model_execute_run_test_.go @@ -0,0 +1,212 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExecuteRunTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExecuteRunTest{} + +// ExecuteRunTest struct for ExecuteRunTest +type ExecuteRunTest struct { + ScenarioIds []string `json:"scenario_ids,omitempty"` + SimulatorId NullableString `json:"simulator_id,omitempty"` + SelectAll *bool `json:"select_all,omitempty"` +} + +// NewExecuteRunTest instantiates a new ExecuteRunTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecuteRunTest() *ExecuteRunTest { + this := ExecuteRunTest{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// NewExecuteRunTestWithDefaults instantiates a new ExecuteRunTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecuteRunTestWithDefaults() *ExecuteRunTest { + this := ExecuteRunTest{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// GetScenarioIds returns the ScenarioIds field value if set, zero value otherwise. +func (o *ExecuteRunTest) GetScenarioIds() []string { + if o == nil || IsNil(o.ScenarioIds) { + var ret []string + return ret + } + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecuteRunTest) GetScenarioIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ScenarioIds) { + return nil, false + } + return o.ScenarioIds, true +} + +// HasScenarioIds returns a boolean if a field has been set. +func (o *ExecuteRunTest) HasScenarioIds() bool { + if o != nil && !IsNil(o.ScenarioIds) { + return true + } + + return false +} + +// SetScenarioIds gets a reference to the given []string and assigns it to the ScenarioIds field. +func (o *ExecuteRunTest) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +// GetSimulatorId returns the SimulatorId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExecuteRunTest) GetSimulatorId() string { + if o == nil || IsNil(o.SimulatorId.Get()) { + var ret string + return ret + } + return *o.SimulatorId.Get() +} + +// GetSimulatorIdOk returns a tuple with the SimulatorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExecuteRunTest) GetSimulatorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SimulatorId.Get(), o.SimulatorId.IsSet() +} + +// HasSimulatorId returns a boolean if a field has been set. +func (o *ExecuteRunTest) HasSimulatorId() bool { + if o != nil && o.SimulatorId.IsSet() { + return true + } + + return false +} + +// SetSimulatorId gets a reference to the given NullableString and assigns it to the SimulatorId field. +func (o *ExecuteRunTest) SetSimulatorId(v string) { + o.SimulatorId.Set(&v) +} + +// SetSimulatorIdNil sets the value for SimulatorId to be an explicit nil +func (o *ExecuteRunTest) SetSimulatorIdNil() { + o.SimulatorId.Set(nil) +} + +// UnsetSimulatorId ensures that no value is present for SimulatorId, not even an explicit nil +func (o *ExecuteRunTest) UnsetSimulatorId() { + o.SimulatorId.Unset() +} + +// GetSelectAll returns the SelectAll field value if set, zero value otherwise. +func (o *ExecuteRunTest) GetSelectAll() bool { + if o == nil || IsNil(o.SelectAll) { + var ret bool + return ret + } + return *o.SelectAll +} + +// GetSelectAllOk returns a tuple with the SelectAll field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecuteRunTest) GetSelectAllOk() (*bool, bool) { + if o == nil || IsNil(o.SelectAll) { + return nil, false + } + return o.SelectAll, true +} + +// HasSelectAll returns a boolean if a field has been set. +func (o *ExecuteRunTest) HasSelectAll() bool { + if o != nil && !IsNil(o.SelectAll) { + return true + } + + return false +} + +// SetSelectAll gets a reference to the given bool and assigns it to the SelectAll field. +func (o *ExecuteRunTest) SetSelectAll(v bool) { + o.SelectAll = &v +} + +func (o ExecuteRunTest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecuteRunTest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ScenarioIds) { + toSerialize["scenario_ids"] = o.ScenarioIds + } + if o.SimulatorId.IsSet() { + toSerialize["simulator_id"] = o.SimulatorId.Get() + } + if !IsNil(o.SelectAll) { + toSerialize["select_all"] = o.SelectAll + } + return toSerialize, nil +} + +type NullableExecuteRunTest struct { + value *ExecuteRunTest + isSet bool +} + +func (v NullableExecuteRunTest) Get() *ExecuteRunTest { + return v.value +} + +func (v *NullableExecuteRunTest) Set(val *ExecuteRunTest) { + v.value = val + v.isSet = true +} + +func (v NullableExecuteRunTest) IsSet() bool { + return v.isSet +} + +func (v *NullableExecuteRunTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecuteRunTest(val *ExecuteRunTest) *NullableExecuteRunTest { + return &NullableExecuteRunTest{value: val, isSet: true} +} + +func (v NullableExecuteRunTest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecuteRunTest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_execution_metrics.go b/go/futureagi/model_execution_metrics.go new file mode 100644 index 0000000..233413d --- /dev/null +++ b/go/futureagi/model_execution_metrics.go @@ -0,0 +1,427 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ExecutionMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExecutionMetrics{} + +// ExecutionMetrics struct for ExecutionMetrics +type ExecutionMetrics struct { + ExecutionId string `json:"execution_id"` + // Current status of the test execution + Status *string `json:"status,omitempty"` + // When the test execution started + StartedAt *time.Time `json:"started_at,omitempty"` + // When the test execution completed + CompletedAt NullableTime `json:"completed_at,omitempty"` + // Total number of calls to be made + TotalCalls *int32 `json:"total_calls,omitempty"` + // Number of successfully completed calls + CompletedCalls *int32 `json:"completed_calls,omitempty"` + // Number of failed calls + FailedCalls *int32 `json:"failed_calls,omitempty"` + Metrics *string `json:"metrics,omitempty"` +} + +type _ExecutionMetrics ExecutionMetrics + +// NewExecutionMetrics instantiates a new ExecutionMetrics object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutionMetrics(executionId string) *ExecutionMetrics { + this := ExecutionMetrics{} + this.ExecutionId = executionId + return &this +} + +// NewExecutionMetricsWithDefaults instantiates a new ExecutionMetrics object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutionMetricsWithDefaults() *ExecutionMetrics { + this := ExecutionMetrics{} + return &this +} + +// GetExecutionId returns the ExecutionId field value +func (o *ExecutionMetrics) GetExecutionId() string { + if o == nil { + var ret string + return ret + } + + return o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value +// and a boolean to check if the value has been set. +func (o *ExecutionMetrics) GetExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionId, true +} + +// SetExecutionId sets field value +func (o *ExecutionMetrics) SetExecutionId(v string) { + o.ExecutionId = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExecutionMetrics) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionMetrics) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExecutionMetrics) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExecutionMetrics) SetStatus(v string) { + o.Status = &v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *ExecutionMetrics) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt) { + var ret time.Time + return ret + } + return *o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionMetrics) GetStartedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.StartedAt) { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *ExecutionMetrics) HasStartedAt() bool { + if o != nil && !IsNil(o.StartedAt) { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given time.Time and assigns it to the StartedAt field. +func (o *ExecutionMetrics) SetStartedAt(v time.Time) { + o.StartedAt = &v +} + +// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExecutionMetrics) GetCompletedAt() time.Time { + if o == nil || IsNil(o.CompletedAt.Get()) { + var ret time.Time + return ret + } + return *o.CompletedAt.Get() +} + +// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExecutionMetrics) GetCompletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CompletedAt.Get(), o.CompletedAt.IsSet() +} + +// HasCompletedAt returns a boolean if a field has been set. +func (o *ExecutionMetrics) HasCompletedAt() bool { + if o != nil && o.CompletedAt.IsSet() { + return true + } + + return false +} + +// SetCompletedAt gets a reference to the given NullableTime and assigns it to the CompletedAt field. +func (o *ExecutionMetrics) SetCompletedAt(v time.Time) { + o.CompletedAt.Set(&v) +} + +// SetCompletedAtNil sets the value for CompletedAt to be an explicit nil +func (o *ExecutionMetrics) SetCompletedAtNil() { + o.CompletedAt.Set(nil) +} + +// UnsetCompletedAt ensures that no value is present for CompletedAt, not even an explicit nil +func (o *ExecutionMetrics) UnsetCompletedAt() { + o.CompletedAt.Unset() +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *ExecutionMetrics) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionMetrics) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *ExecutionMetrics) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *ExecutionMetrics) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetCompletedCalls returns the CompletedCalls field value if set, zero value otherwise. +func (o *ExecutionMetrics) GetCompletedCalls() int32 { + if o == nil || IsNil(o.CompletedCalls) { + var ret int32 + return ret + } + return *o.CompletedCalls +} + +// GetCompletedCallsOk returns a tuple with the CompletedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionMetrics) GetCompletedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.CompletedCalls) { + return nil, false + } + return o.CompletedCalls, true +} + +// HasCompletedCalls returns a boolean if a field has been set. +func (o *ExecutionMetrics) HasCompletedCalls() bool { + if o != nil && !IsNil(o.CompletedCalls) { + return true + } + + return false +} + +// SetCompletedCalls gets a reference to the given int32 and assigns it to the CompletedCalls field. +func (o *ExecutionMetrics) SetCompletedCalls(v int32) { + o.CompletedCalls = &v +} + +// GetFailedCalls returns the FailedCalls field value if set, zero value otherwise. +func (o *ExecutionMetrics) GetFailedCalls() int32 { + if o == nil || IsNil(o.FailedCalls) { + var ret int32 + return ret + } + return *o.FailedCalls +} + +// GetFailedCallsOk returns a tuple with the FailedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionMetrics) GetFailedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.FailedCalls) { + return nil, false + } + return o.FailedCalls, true +} + +// HasFailedCalls returns a boolean if a field has been set. +func (o *ExecutionMetrics) HasFailedCalls() bool { + if o != nil && !IsNil(o.FailedCalls) { + return true + } + + return false +} + +// SetFailedCalls gets a reference to the given int32 and assigns it to the FailedCalls field. +func (o *ExecutionMetrics) SetFailedCalls(v int32) { + o.FailedCalls = &v +} + +// GetMetrics returns the Metrics field value if set, zero value otherwise. +func (o *ExecutionMetrics) GetMetrics() string { + if o == nil || IsNil(o.Metrics) { + var ret string + return ret + } + return *o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionMetrics) GetMetricsOk() (*string, bool) { + if o == nil || IsNil(o.Metrics) { + return nil, false + } + return o.Metrics, true +} + +// HasMetrics returns a boolean if a field has been set. +func (o *ExecutionMetrics) HasMetrics() bool { + if o != nil && !IsNil(o.Metrics) { + return true + } + + return false +} + +// SetMetrics gets a reference to the given string and assigns it to the Metrics field. +func (o *ExecutionMetrics) SetMetrics(v string) { + o.Metrics = &v +} + +func (o ExecutionMetrics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutionMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["execution_id"] = o.ExecutionId + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StartedAt) { + toSerialize["started_at"] = o.StartedAt + } + if o.CompletedAt.IsSet() { + toSerialize["completed_at"] = o.CompletedAt.Get() + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.CompletedCalls) { + toSerialize["completed_calls"] = o.CompletedCalls + } + if !IsNil(o.FailedCalls) { + toSerialize["failed_calls"] = o.FailedCalls + } + if !IsNil(o.Metrics) { + toSerialize["metrics"] = o.Metrics + } + return toSerialize, nil +} + +func (o *ExecutionMetrics) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "execution_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExecutionMetrics := _ExecutionMetrics{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExecutionMetrics) + + if err != nil { + return err + } + + *o = ExecutionMetrics(varExecutionMetrics) + + return err +} + +type NullableExecutionMetrics struct { + value *ExecutionMetrics + isSet bool +} + +func (v NullableExecutionMetrics) Get() *ExecutionMetrics { + return v.value +} + +func (v *NullableExecutionMetrics) Set(val *ExecutionMetrics) { + v.value = val + v.isSet = true +} + +func (v NullableExecutionMetrics) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutionMetrics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutionMetrics(val *ExecutionMetrics) *NullableExecutionMetrics { + return &NullableExecutionMetrics{value: val, isSet: true} +} + +func (v NullableExecutionMetrics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutionMetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_execution_runs.go b/go/futureagi/model_execution_runs.go new file mode 100644 index 0000000..07657f9 --- /dev/null +++ b/go/futureagi/model_execution_runs.go @@ -0,0 +1,427 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ExecutionRuns type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExecutionRuns{} + +// ExecutionRuns struct for ExecutionRuns +type ExecutionRuns struct { + ExecutionId string `json:"execution_id"` + // Current status of the test execution + Status *string `json:"status,omitempty"` + // When the test execution started + StartedAt *time.Time `json:"started_at,omitempty"` + // When the test execution completed + CompletedAt NullableTime `json:"completed_at,omitempty"` + // Total number of calls to be made + TotalCalls *int32 `json:"total_calls,omitempty"` + // Number of successfully completed calls + CompletedCalls *int32 `json:"completed_calls,omitempty"` + // Number of failed calls + FailedCalls *int32 `json:"failed_calls,omitempty"` + EvalResults *string `json:"eval_results,omitempty"` +} + +type _ExecutionRuns ExecutionRuns + +// NewExecutionRuns instantiates a new ExecutionRuns object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutionRuns(executionId string) *ExecutionRuns { + this := ExecutionRuns{} + this.ExecutionId = executionId + return &this +} + +// NewExecutionRunsWithDefaults instantiates a new ExecutionRuns object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutionRunsWithDefaults() *ExecutionRuns { + this := ExecutionRuns{} + return &this +} + +// GetExecutionId returns the ExecutionId field value +func (o *ExecutionRuns) GetExecutionId() string { + if o == nil { + var ret string + return ret + } + + return o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value +// and a boolean to check if the value has been set. +func (o *ExecutionRuns) GetExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionId, true +} + +// SetExecutionId sets field value +func (o *ExecutionRuns) SetExecutionId(v string) { + o.ExecutionId = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExecutionRuns) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionRuns) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExecutionRuns) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExecutionRuns) SetStatus(v string) { + o.Status = &v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *ExecutionRuns) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt) { + var ret time.Time + return ret + } + return *o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionRuns) GetStartedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.StartedAt) { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *ExecutionRuns) HasStartedAt() bool { + if o != nil && !IsNil(o.StartedAt) { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given time.Time and assigns it to the StartedAt field. +func (o *ExecutionRuns) SetStartedAt(v time.Time) { + o.StartedAt = &v +} + +// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExecutionRuns) GetCompletedAt() time.Time { + if o == nil || IsNil(o.CompletedAt.Get()) { + var ret time.Time + return ret + } + return *o.CompletedAt.Get() +} + +// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExecutionRuns) GetCompletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CompletedAt.Get(), o.CompletedAt.IsSet() +} + +// HasCompletedAt returns a boolean if a field has been set. +func (o *ExecutionRuns) HasCompletedAt() bool { + if o != nil && o.CompletedAt.IsSet() { + return true + } + + return false +} + +// SetCompletedAt gets a reference to the given NullableTime and assigns it to the CompletedAt field. +func (o *ExecutionRuns) SetCompletedAt(v time.Time) { + o.CompletedAt.Set(&v) +} + +// SetCompletedAtNil sets the value for CompletedAt to be an explicit nil +func (o *ExecutionRuns) SetCompletedAtNil() { + o.CompletedAt.Set(nil) +} + +// UnsetCompletedAt ensures that no value is present for CompletedAt, not even an explicit nil +func (o *ExecutionRuns) UnsetCompletedAt() { + o.CompletedAt.Unset() +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *ExecutionRuns) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionRuns) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *ExecutionRuns) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *ExecutionRuns) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetCompletedCalls returns the CompletedCalls field value if set, zero value otherwise. +func (o *ExecutionRuns) GetCompletedCalls() int32 { + if o == nil || IsNil(o.CompletedCalls) { + var ret int32 + return ret + } + return *o.CompletedCalls +} + +// GetCompletedCallsOk returns a tuple with the CompletedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionRuns) GetCompletedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.CompletedCalls) { + return nil, false + } + return o.CompletedCalls, true +} + +// HasCompletedCalls returns a boolean if a field has been set. +func (o *ExecutionRuns) HasCompletedCalls() bool { + if o != nil && !IsNil(o.CompletedCalls) { + return true + } + + return false +} + +// SetCompletedCalls gets a reference to the given int32 and assigns it to the CompletedCalls field. +func (o *ExecutionRuns) SetCompletedCalls(v int32) { + o.CompletedCalls = &v +} + +// GetFailedCalls returns the FailedCalls field value if set, zero value otherwise. +func (o *ExecutionRuns) GetFailedCalls() int32 { + if o == nil || IsNil(o.FailedCalls) { + var ret int32 + return ret + } + return *o.FailedCalls +} + +// GetFailedCallsOk returns a tuple with the FailedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionRuns) GetFailedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.FailedCalls) { + return nil, false + } + return o.FailedCalls, true +} + +// HasFailedCalls returns a boolean if a field has been set. +func (o *ExecutionRuns) HasFailedCalls() bool { + if o != nil && !IsNil(o.FailedCalls) { + return true + } + + return false +} + +// SetFailedCalls gets a reference to the given int32 and assigns it to the FailedCalls field. +func (o *ExecutionRuns) SetFailedCalls(v int32) { + o.FailedCalls = &v +} + +// GetEvalResults returns the EvalResults field value if set, zero value otherwise. +func (o *ExecutionRuns) GetEvalResults() string { + if o == nil || IsNil(o.EvalResults) { + var ret string + return ret + } + return *o.EvalResults +} + +// GetEvalResultsOk returns a tuple with the EvalResults field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionRuns) GetEvalResultsOk() (*string, bool) { + if o == nil || IsNil(o.EvalResults) { + return nil, false + } + return o.EvalResults, true +} + +// HasEvalResults returns a boolean if a field has been set. +func (o *ExecutionRuns) HasEvalResults() bool { + if o != nil && !IsNil(o.EvalResults) { + return true + } + + return false +} + +// SetEvalResults gets a reference to the given string and assigns it to the EvalResults field. +func (o *ExecutionRuns) SetEvalResults(v string) { + o.EvalResults = &v +} + +func (o ExecutionRuns) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutionRuns) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["execution_id"] = o.ExecutionId + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StartedAt) { + toSerialize["started_at"] = o.StartedAt + } + if o.CompletedAt.IsSet() { + toSerialize["completed_at"] = o.CompletedAt.Get() + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.CompletedCalls) { + toSerialize["completed_calls"] = o.CompletedCalls + } + if !IsNil(o.FailedCalls) { + toSerialize["failed_calls"] = o.FailedCalls + } + if !IsNil(o.EvalResults) { + toSerialize["eval_results"] = o.EvalResults + } + return toSerialize, nil +} + +func (o *ExecutionRuns) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "execution_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExecutionRuns := _ExecutionRuns{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExecutionRuns) + + if err != nil { + return err + } + + *o = ExecutionRuns(varExecutionRuns) + + return err +} + +type NullableExecutionRuns struct { + value *ExecutionRuns + isSet bool +} + +func (v NullableExecutionRuns) Get() *ExecutionRuns { + return v.value +} + +func (v *NullableExecutionRuns) Set(val *ExecutionRuns) { + v.value = val + v.isSet = true +} + +func (v NullableExecutionRuns) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutionRuns) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutionRuns(val *ExecutionRuns) *NullableExecutionRuns { + return &NullableExecutionRuns{value: val, isSet: true} +} + +func (v NullableExecutionRuns) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutionRuns) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_column_metric.go b/go/futureagi/model_experiment_comparison_column_metric.go new file mode 100644 index 0000000..112cab2 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_column_metric.go @@ -0,0 +1,305 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentComparisonColumnMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonColumnMetric{} + +// ExperimentComparisonColumnMetric struct for ExperimentComparisonColumnMetric +type ExperimentComparisonColumnMetric struct { + ColumnId string `json:"column_id"` + ColumnName string `json:"column_name"` + AvgCompletionTokens float32 `json:"avg_completion_tokens"` + AvgTotalTokens float32 `json:"avg_total_tokens"` + AvgResponseTime float32 `json:"avg_response_time"` + AvgScore map[string]interface{} `json:"avg_score,omitempty"` +} + +type _ExperimentComparisonColumnMetric ExperimentComparisonColumnMetric + +// NewExperimentComparisonColumnMetric instantiates a new ExperimentComparisonColumnMetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonColumnMetric(columnId string, columnName string, avgCompletionTokens float32, avgTotalTokens float32, avgResponseTime float32) *ExperimentComparisonColumnMetric { + this := ExperimentComparisonColumnMetric{} + this.ColumnId = columnId + this.ColumnName = columnName + this.AvgCompletionTokens = avgCompletionTokens + this.AvgTotalTokens = avgTotalTokens + this.AvgResponseTime = avgResponseTime + return &this +} + +// NewExperimentComparisonColumnMetricWithDefaults instantiates a new ExperimentComparisonColumnMetric object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonColumnMetricWithDefaults() *ExperimentComparisonColumnMetric { + this := ExperimentComparisonColumnMetric{} + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *ExperimentComparisonColumnMetric) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonColumnMetric) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *ExperimentComparisonColumnMetric) SetColumnId(v string) { + o.ColumnId = v +} + +// GetColumnName returns the ColumnName field value +func (o *ExperimentComparisonColumnMetric) GetColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnName +} + +// GetColumnNameOk returns a tuple with the ColumnName field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonColumnMetric) GetColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnName, true +} + +// SetColumnName sets field value +func (o *ExperimentComparisonColumnMetric) SetColumnName(v string) { + o.ColumnName = v +} + +// GetAvgCompletionTokens returns the AvgCompletionTokens field value +func (o *ExperimentComparisonColumnMetric) GetAvgCompletionTokens() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgCompletionTokens +} + +// GetAvgCompletionTokensOk returns a tuple with the AvgCompletionTokens field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonColumnMetric) GetAvgCompletionTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgCompletionTokens, true +} + +// SetAvgCompletionTokens sets field value +func (o *ExperimentComparisonColumnMetric) SetAvgCompletionTokens(v float32) { + o.AvgCompletionTokens = v +} + +// GetAvgTotalTokens returns the AvgTotalTokens field value +func (o *ExperimentComparisonColumnMetric) GetAvgTotalTokens() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgTotalTokens +} + +// GetAvgTotalTokensOk returns a tuple with the AvgTotalTokens field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonColumnMetric) GetAvgTotalTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgTotalTokens, true +} + +// SetAvgTotalTokens sets field value +func (o *ExperimentComparisonColumnMetric) SetAvgTotalTokens(v float32) { + o.AvgTotalTokens = v +} + +// GetAvgResponseTime returns the AvgResponseTime field value +func (o *ExperimentComparisonColumnMetric) GetAvgResponseTime() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgResponseTime +} + +// GetAvgResponseTimeOk returns a tuple with the AvgResponseTime field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonColumnMetric) GetAvgResponseTimeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgResponseTime, true +} + +// SetAvgResponseTime sets field value +func (o *ExperimentComparisonColumnMetric) SetAvgResponseTime(v float32) { + o.AvgResponseTime = v +} + +// GetAvgScore returns the AvgScore field value if set, zero value otherwise. +func (o *ExperimentComparisonColumnMetric) GetAvgScore() map[string]interface{} { + if o == nil || IsNil(o.AvgScore) { + var ret map[string]interface{} + return ret + } + return o.AvgScore +} + +// GetAvgScoreOk returns a tuple with the AvgScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonColumnMetric) GetAvgScoreOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.AvgScore) { + return map[string]interface{}{}, false + } + return o.AvgScore, true +} + +// HasAvgScore returns a boolean if a field has been set. +func (o *ExperimentComparisonColumnMetric) HasAvgScore() bool { + if o != nil && !IsNil(o.AvgScore) { + return true + } + + return false +} + +// SetAvgScore gets a reference to the given map[string]interface{} and assigns it to the AvgScore field. +func (o *ExperimentComparisonColumnMetric) SetAvgScore(v map[string]interface{}) { + o.AvgScore = v +} + +func (o ExperimentComparisonColumnMetric) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonColumnMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + toSerialize["column_name"] = o.ColumnName + toSerialize["avg_completion_tokens"] = o.AvgCompletionTokens + toSerialize["avg_total_tokens"] = o.AvgTotalTokens + toSerialize["avg_response_time"] = o.AvgResponseTime + if !IsNil(o.AvgScore) { + toSerialize["avg_score"] = o.AvgScore + } + return toSerialize, nil +} + +func (o *ExperimentComparisonColumnMetric) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + "column_name", + "avg_completion_tokens", + "avg_total_tokens", + "avg_response_time", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentComparisonColumnMetric := _ExperimentComparisonColumnMetric{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentComparisonColumnMetric) + + if err != nil { + return err + } + + *o = ExperimentComparisonColumnMetric(varExperimentComparisonColumnMetric) + + return err +} + +type NullableExperimentComparisonColumnMetric struct { + value *ExperimentComparisonColumnMetric + isSet bool +} + +func (v NullableExperimentComparisonColumnMetric) Get() *ExperimentComparisonColumnMetric { + return v.value +} + +func (v *NullableExperimentComparisonColumnMetric) Set(val *ExperimentComparisonColumnMetric) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonColumnMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonColumnMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonColumnMetric(val *ExperimentComparisonColumnMetric) *NullableExperimentComparisonColumnMetric { + return &NullableExperimentComparisonColumnMetric{value: val, isSet: true} +} + +func (v NullableExperimentComparisonColumnMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonColumnMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_dataset_metric.go b/go/futureagi/model_experiment_comparison_dataset_metric.go new file mode 100644 index 0000000..35d2249 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_dataset_metric.go @@ -0,0 +1,583 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentComparisonDatasetMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonDatasetMetric{} + +// ExperimentComparisonDatasetMetric struct for ExperimentComparisonDatasetMetric +type ExperimentComparisonDatasetMetric struct { + DatasetId string `json:"dataset_id"` + AvgCompletionTokens NullableFloat32 `json:"avg_completion_tokens,omitempty"` + AvgTotalTokens NullableFloat32 `json:"avg_total_tokens,omitempty"` + AvgResponseTime NullableFloat32 `json:"avg_response_time,omitempty"` + AvgScore NullableFloat32 `json:"avg_score,omitempty"` + Columns []ExperimentComparisonColumnMetric `json:"columns,omitempty"` + NormalizedScores map[string]interface{} `json:"normalized_scores,omitempty"` + OverallRating NullableFloat32 `json:"overall_rating,omitempty"` + Rank NullableInt32 `json:"rank,omitempty"` + RankSuffix *string `json:"rank_suffix,omitempty"` + TotalDatasets *int32 `json:"total_datasets,omitempty"` +} + +type _ExperimentComparisonDatasetMetric ExperimentComparisonDatasetMetric + +// NewExperimentComparisonDatasetMetric instantiates a new ExperimentComparisonDatasetMetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonDatasetMetric(datasetId string) *ExperimentComparisonDatasetMetric { + this := ExperimentComparisonDatasetMetric{} + this.DatasetId = datasetId + return &this +} + +// NewExperimentComparisonDatasetMetricWithDefaults instantiates a new ExperimentComparisonDatasetMetric object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonDatasetMetricWithDefaults() *ExperimentComparisonDatasetMetric { + this := ExperimentComparisonDatasetMetric{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *ExperimentComparisonDatasetMetric) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDatasetMetric) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *ExperimentComparisonDatasetMetric) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetAvgCompletionTokens returns the AvgCompletionTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDatasetMetric) GetAvgCompletionTokens() float32 { + if o == nil || IsNil(o.AvgCompletionTokens.Get()) { + var ret float32 + return ret + } + return *o.AvgCompletionTokens.Get() +} + +// GetAvgCompletionTokensOk returns a tuple with the AvgCompletionTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDatasetMetric) GetAvgCompletionTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgCompletionTokens.Get(), o.AvgCompletionTokens.IsSet() +} + +// HasAvgCompletionTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasAvgCompletionTokens() bool { + if o != nil && o.AvgCompletionTokens.IsSet() { + return true + } + + return false +} + +// SetAvgCompletionTokens gets a reference to the given NullableFloat32 and assigns it to the AvgCompletionTokens field. +func (o *ExperimentComparisonDatasetMetric) SetAvgCompletionTokens(v float32) { + o.AvgCompletionTokens.Set(&v) +} + +// SetAvgCompletionTokensNil sets the value for AvgCompletionTokens to be an explicit nil +func (o *ExperimentComparisonDatasetMetric) SetAvgCompletionTokensNil() { + o.AvgCompletionTokens.Set(nil) +} + +// UnsetAvgCompletionTokens ensures that no value is present for AvgCompletionTokens, not even an explicit nil +func (o *ExperimentComparisonDatasetMetric) UnsetAvgCompletionTokens() { + o.AvgCompletionTokens.Unset() +} + +// GetAvgTotalTokens returns the AvgTotalTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDatasetMetric) GetAvgTotalTokens() float32 { + if o == nil || IsNil(o.AvgTotalTokens.Get()) { + var ret float32 + return ret + } + return *o.AvgTotalTokens.Get() +} + +// GetAvgTotalTokensOk returns a tuple with the AvgTotalTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDatasetMetric) GetAvgTotalTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgTotalTokens.Get(), o.AvgTotalTokens.IsSet() +} + +// HasAvgTotalTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasAvgTotalTokens() bool { + if o != nil && o.AvgTotalTokens.IsSet() { + return true + } + + return false +} + +// SetAvgTotalTokens gets a reference to the given NullableFloat32 and assigns it to the AvgTotalTokens field. +func (o *ExperimentComparisonDatasetMetric) SetAvgTotalTokens(v float32) { + o.AvgTotalTokens.Set(&v) +} + +// SetAvgTotalTokensNil sets the value for AvgTotalTokens to be an explicit nil +func (o *ExperimentComparisonDatasetMetric) SetAvgTotalTokensNil() { + o.AvgTotalTokens.Set(nil) +} + +// UnsetAvgTotalTokens ensures that no value is present for AvgTotalTokens, not even an explicit nil +func (o *ExperimentComparisonDatasetMetric) UnsetAvgTotalTokens() { + o.AvgTotalTokens.Unset() +} + +// GetAvgResponseTime returns the AvgResponseTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDatasetMetric) GetAvgResponseTime() float32 { + if o == nil || IsNil(o.AvgResponseTime.Get()) { + var ret float32 + return ret + } + return *o.AvgResponseTime.Get() +} + +// GetAvgResponseTimeOk returns a tuple with the AvgResponseTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDatasetMetric) GetAvgResponseTimeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgResponseTime.Get(), o.AvgResponseTime.IsSet() +} + +// HasAvgResponseTime returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasAvgResponseTime() bool { + if o != nil && o.AvgResponseTime.IsSet() { + return true + } + + return false +} + +// SetAvgResponseTime gets a reference to the given NullableFloat32 and assigns it to the AvgResponseTime field. +func (o *ExperimentComparisonDatasetMetric) SetAvgResponseTime(v float32) { + o.AvgResponseTime.Set(&v) +} + +// SetAvgResponseTimeNil sets the value for AvgResponseTime to be an explicit nil +func (o *ExperimentComparisonDatasetMetric) SetAvgResponseTimeNil() { + o.AvgResponseTime.Set(nil) +} + +// UnsetAvgResponseTime ensures that no value is present for AvgResponseTime, not even an explicit nil +func (o *ExperimentComparisonDatasetMetric) UnsetAvgResponseTime() { + o.AvgResponseTime.Unset() +} + +// GetAvgScore returns the AvgScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDatasetMetric) GetAvgScore() float32 { + if o == nil || IsNil(o.AvgScore.Get()) { + var ret float32 + return ret + } + return *o.AvgScore.Get() +} + +// GetAvgScoreOk returns a tuple with the AvgScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDatasetMetric) GetAvgScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgScore.Get(), o.AvgScore.IsSet() +} + +// HasAvgScore returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasAvgScore() bool { + if o != nil && o.AvgScore.IsSet() { + return true + } + + return false +} + +// SetAvgScore gets a reference to the given NullableFloat32 and assigns it to the AvgScore field. +func (o *ExperimentComparisonDatasetMetric) SetAvgScore(v float32) { + o.AvgScore.Set(&v) +} + +// SetAvgScoreNil sets the value for AvgScore to be an explicit nil +func (o *ExperimentComparisonDatasetMetric) SetAvgScoreNil() { + o.AvgScore.Set(nil) +} + +// UnsetAvgScore ensures that no value is present for AvgScore, not even an explicit nil +func (o *ExperimentComparisonDatasetMetric) UnsetAvgScore() { + o.AvgScore.Unset() +} + +// GetColumns returns the Columns field value if set, zero value otherwise. +func (o *ExperimentComparisonDatasetMetric) GetColumns() []ExperimentComparisonColumnMetric { + if o == nil || IsNil(o.Columns) { + var ret []ExperimentComparisonColumnMetric + return ret + } + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDatasetMetric) GetColumnsOk() ([]ExperimentComparisonColumnMetric, bool) { + if o == nil || IsNil(o.Columns) { + return nil, false + } + return o.Columns, true +} + +// HasColumns returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasColumns() bool { + if o != nil && !IsNil(o.Columns) { + return true + } + + return false +} + +// SetColumns gets a reference to the given []ExperimentComparisonColumnMetric and assigns it to the Columns field. +func (o *ExperimentComparisonDatasetMetric) SetColumns(v []ExperimentComparisonColumnMetric) { + o.Columns = v +} + +// GetNormalizedScores returns the NormalizedScores field value if set, zero value otherwise. +func (o *ExperimentComparisonDatasetMetric) GetNormalizedScores() map[string]interface{} { + if o == nil || IsNil(o.NormalizedScores) { + var ret map[string]interface{} + return ret + } + return o.NormalizedScores +} + +// GetNormalizedScoresOk returns a tuple with the NormalizedScores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDatasetMetric) GetNormalizedScoresOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.NormalizedScores) { + return map[string]interface{}{}, false + } + return o.NormalizedScores, true +} + +// HasNormalizedScores returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasNormalizedScores() bool { + if o != nil && !IsNil(o.NormalizedScores) { + return true + } + + return false +} + +// SetNormalizedScores gets a reference to the given map[string]interface{} and assigns it to the NormalizedScores field. +func (o *ExperimentComparisonDatasetMetric) SetNormalizedScores(v map[string]interface{}) { + o.NormalizedScores = v +} + +// GetOverallRating returns the OverallRating field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDatasetMetric) GetOverallRating() float32 { + if o == nil || IsNil(o.OverallRating.Get()) { + var ret float32 + return ret + } + return *o.OverallRating.Get() +} + +// GetOverallRatingOk returns a tuple with the OverallRating field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDatasetMetric) GetOverallRatingOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.OverallRating.Get(), o.OverallRating.IsSet() +} + +// HasOverallRating returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasOverallRating() bool { + if o != nil && o.OverallRating.IsSet() { + return true + } + + return false +} + +// SetOverallRating gets a reference to the given NullableFloat32 and assigns it to the OverallRating field. +func (o *ExperimentComparisonDatasetMetric) SetOverallRating(v float32) { + o.OverallRating.Set(&v) +} + +// SetOverallRatingNil sets the value for OverallRating to be an explicit nil +func (o *ExperimentComparisonDatasetMetric) SetOverallRatingNil() { + o.OverallRating.Set(nil) +} + +// UnsetOverallRating ensures that no value is present for OverallRating, not even an explicit nil +func (o *ExperimentComparisonDatasetMetric) UnsetOverallRating() { + o.OverallRating.Unset() +} + +// GetRank returns the Rank field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDatasetMetric) GetRank() int32 { + if o == nil || IsNil(o.Rank.Get()) { + var ret int32 + return ret + } + return *o.Rank.Get() +} + +// GetRankOk returns a tuple with the Rank field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDatasetMetric) GetRankOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Rank.Get(), o.Rank.IsSet() +} + +// HasRank returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasRank() bool { + if o != nil && o.Rank.IsSet() { + return true + } + + return false +} + +// SetRank gets a reference to the given NullableInt32 and assigns it to the Rank field. +func (o *ExperimentComparisonDatasetMetric) SetRank(v int32) { + o.Rank.Set(&v) +} + +// SetRankNil sets the value for Rank to be an explicit nil +func (o *ExperimentComparisonDatasetMetric) SetRankNil() { + o.Rank.Set(nil) +} + +// UnsetRank ensures that no value is present for Rank, not even an explicit nil +func (o *ExperimentComparisonDatasetMetric) UnsetRank() { + o.Rank.Unset() +} + +// GetRankSuffix returns the RankSuffix field value if set, zero value otherwise. +func (o *ExperimentComparisonDatasetMetric) GetRankSuffix() string { + if o == nil || IsNil(o.RankSuffix) { + var ret string + return ret + } + return *o.RankSuffix +} + +// GetRankSuffixOk returns a tuple with the RankSuffix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDatasetMetric) GetRankSuffixOk() (*string, bool) { + if o == nil || IsNil(o.RankSuffix) { + return nil, false + } + return o.RankSuffix, true +} + +// HasRankSuffix returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasRankSuffix() bool { + if o != nil && !IsNil(o.RankSuffix) { + return true + } + + return false +} + +// SetRankSuffix gets a reference to the given string and assigns it to the RankSuffix field. +func (o *ExperimentComparisonDatasetMetric) SetRankSuffix(v string) { + o.RankSuffix = &v +} + +// GetTotalDatasets returns the TotalDatasets field value if set, zero value otherwise. +func (o *ExperimentComparisonDatasetMetric) GetTotalDatasets() int32 { + if o == nil || IsNil(o.TotalDatasets) { + var ret int32 + return ret + } + return *o.TotalDatasets +} + +// GetTotalDatasetsOk returns a tuple with the TotalDatasets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDatasetMetric) GetTotalDatasetsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalDatasets) { + return nil, false + } + return o.TotalDatasets, true +} + +// HasTotalDatasets returns a boolean if a field has been set. +func (o *ExperimentComparisonDatasetMetric) HasTotalDatasets() bool { + if o != nil && !IsNil(o.TotalDatasets) { + return true + } + + return false +} + +// SetTotalDatasets gets a reference to the given int32 and assigns it to the TotalDatasets field. +func (o *ExperimentComparisonDatasetMetric) SetTotalDatasets(v int32) { + o.TotalDatasets = &v +} + +func (o ExperimentComparisonDatasetMetric) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonDatasetMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + if o.AvgCompletionTokens.IsSet() { + toSerialize["avg_completion_tokens"] = o.AvgCompletionTokens.Get() + } + if o.AvgTotalTokens.IsSet() { + toSerialize["avg_total_tokens"] = o.AvgTotalTokens.Get() + } + if o.AvgResponseTime.IsSet() { + toSerialize["avg_response_time"] = o.AvgResponseTime.Get() + } + if o.AvgScore.IsSet() { + toSerialize["avg_score"] = o.AvgScore.Get() + } + if !IsNil(o.Columns) { + toSerialize["columns"] = o.Columns + } + if !IsNil(o.NormalizedScores) { + toSerialize["normalized_scores"] = o.NormalizedScores + } + if o.OverallRating.IsSet() { + toSerialize["overall_rating"] = o.OverallRating.Get() + } + if o.Rank.IsSet() { + toSerialize["rank"] = o.Rank.Get() + } + if !IsNil(o.RankSuffix) { + toSerialize["rank_suffix"] = o.RankSuffix + } + if !IsNil(o.TotalDatasets) { + toSerialize["total_datasets"] = o.TotalDatasets + } + return toSerialize, nil +} + +func (o *ExperimentComparisonDatasetMetric) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentComparisonDatasetMetric := _ExperimentComparisonDatasetMetric{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentComparisonDatasetMetric) + + if err != nil { + return err + } + + *o = ExperimentComparisonDatasetMetric(varExperimentComparisonDatasetMetric) + + return err +} + +type NullableExperimentComparisonDatasetMetric struct { + value *ExperimentComparisonDatasetMetric + isSet bool +} + +func (v NullableExperimentComparisonDatasetMetric) Get() *ExperimentComparisonDatasetMetric { + return v.value +} + +func (v *NullableExperimentComparisonDatasetMetric) Set(val *ExperimentComparisonDatasetMetric) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonDatasetMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonDatasetMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonDatasetMetric(val *ExperimentComparisonDatasetMetric) *NullableExperimentComparisonDatasetMetric { + return &NullableExperimentComparisonDatasetMetric{value: val, isSet: true} +} + +func (v NullableExperimentComparisonDatasetMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonDatasetMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_detail.go b/go/futureagi/model_experiment_comparison_detail.go new file mode 100644 index 0000000..47f6b14 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_detail.go @@ -0,0 +1,398 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentComparisonDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonDetail{} + +// ExperimentComparisonDetail struct for ExperimentComparisonDetail +type ExperimentComparisonDetail struct { + ScoresWeight map[string]interface{} `json:"scores_weight,omitempty"` + ExperimentDatasetId NullableString `json:"experiment_dataset_id,omitempty"` + Rank NullableInt32 `json:"rank,omitempty"` + RankSuffix *string `json:"rank_suffix,omitempty"` + Metrics ExperimentComparisonMetrics `json:"metrics"` + Weights ExperimentComparisonWeights `json:"weights"` + OverallRating NullableFloat32 `json:"overall_rating,omitempty"` +} + +type _ExperimentComparisonDetail ExperimentComparisonDetail + +// NewExperimentComparisonDetail instantiates a new ExperimentComparisonDetail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonDetail(metrics ExperimentComparisonMetrics, weights ExperimentComparisonWeights) *ExperimentComparisonDetail { + this := ExperimentComparisonDetail{} + this.Metrics = metrics + this.Weights = weights + return &this +} + +// NewExperimentComparisonDetailWithDefaults instantiates a new ExperimentComparisonDetail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonDetailWithDefaults() *ExperimentComparisonDetail { + this := ExperimentComparisonDetail{} + return &this +} + +// GetScoresWeight returns the ScoresWeight field value if set, zero value otherwise. +func (o *ExperimentComparisonDetail) GetScoresWeight() map[string]interface{} { + if o == nil || IsNil(o.ScoresWeight) { + var ret map[string]interface{} + return ret + } + return o.ScoresWeight +} + +// GetScoresWeightOk returns a tuple with the ScoresWeight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetail) GetScoresWeightOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ScoresWeight) { + return map[string]interface{}{}, false + } + return o.ScoresWeight, true +} + +// HasScoresWeight returns a boolean if a field has been set. +func (o *ExperimentComparisonDetail) HasScoresWeight() bool { + if o != nil && !IsNil(o.ScoresWeight) { + return true + } + + return false +} + +// SetScoresWeight gets a reference to the given map[string]interface{} and assigns it to the ScoresWeight field. +func (o *ExperimentComparisonDetail) SetScoresWeight(v map[string]interface{}) { + o.ScoresWeight = v +} + +// GetExperimentDatasetId returns the ExperimentDatasetId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDetail) GetExperimentDatasetId() string { + if o == nil || IsNil(o.ExperimentDatasetId.Get()) { + var ret string + return ret + } + return *o.ExperimentDatasetId.Get() +} + +// GetExperimentDatasetIdOk returns a tuple with the ExperimentDatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDetail) GetExperimentDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExperimentDatasetId.Get(), o.ExperimentDatasetId.IsSet() +} + +// HasExperimentDatasetId returns a boolean if a field has been set. +func (o *ExperimentComparisonDetail) HasExperimentDatasetId() bool { + if o != nil && o.ExperimentDatasetId.IsSet() { + return true + } + + return false +} + +// SetExperimentDatasetId gets a reference to the given NullableString and assigns it to the ExperimentDatasetId field. +func (o *ExperimentComparisonDetail) SetExperimentDatasetId(v string) { + o.ExperimentDatasetId.Set(&v) +} + +// SetExperimentDatasetIdNil sets the value for ExperimentDatasetId to be an explicit nil +func (o *ExperimentComparisonDetail) SetExperimentDatasetIdNil() { + o.ExperimentDatasetId.Set(nil) +} + +// UnsetExperimentDatasetId ensures that no value is present for ExperimentDatasetId, not even an explicit nil +func (o *ExperimentComparisonDetail) UnsetExperimentDatasetId() { + o.ExperimentDatasetId.Unset() +} + +// GetRank returns the Rank field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDetail) GetRank() int32 { + if o == nil || IsNil(o.Rank.Get()) { + var ret int32 + return ret + } + return *o.Rank.Get() +} + +// GetRankOk returns a tuple with the Rank field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDetail) GetRankOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Rank.Get(), o.Rank.IsSet() +} + +// HasRank returns a boolean if a field has been set. +func (o *ExperimentComparisonDetail) HasRank() bool { + if o != nil && o.Rank.IsSet() { + return true + } + + return false +} + +// SetRank gets a reference to the given NullableInt32 and assigns it to the Rank field. +func (o *ExperimentComparisonDetail) SetRank(v int32) { + o.Rank.Set(&v) +} + +// SetRankNil sets the value for Rank to be an explicit nil +func (o *ExperimentComparisonDetail) SetRankNil() { + o.Rank.Set(nil) +} + +// UnsetRank ensures that no value is present for Rank, not even an explicit nil +func (o *ExperimentComparisonDetail) UnsetRank() { + o.Rank.Unset() +} + +// GetRankSuffix returns the RankSuffix field value if set, zero value otherwise. +func (o *ExperimentComparisonDetail) GetRankSuffix() string { + if o == nil || IsNil(o.RankSuffix) { + var ret string + return ret + } + return *o.RankSuffix +} + +// GetRankSuffixOk returns a tuple with the RankSuffix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetail) GetRankSuffixOk() (*string, bool) { + if o == nil || IsNil(o.RankSuffix) { + return nil, false + } + return o.RankSuffix, true +} + +// HasRankSuffix returns a boolean if a field has been set. +func (o *ExperimentComparisonDetail) HasRankSuffix() bool { + if o != nil && !IsNil(o.RankSuffix) { + return true + } + + return false +} + +// SetRankSuffix gets a reference to the given string and assigns it to the RankSuffix field. +func (o *ExperimentComparisonDetail) SetRankSuffix(v string) { + o.RankSuffix = &v +} + +// GetMetrics returns the Metrics field value +func (o *ExperimentComparisonDetail) GetMetrics() ExperimentComparisonMetrics { + if o == nil { + var ret ExperimentComparisonMetrics + return ret + } + + return o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetail) GetMetricsOk() (*ExperimentComparisonMetrics, bool) { + if o == nil { + return nil, false + } + return &o.Metrics, true +} + +// SetMetrics sets field value +func (o *ExperimentComparisonDetail) SetMetrics(v ExperimentComparisonMetrics) { + o.Metrics = v +} + +// GetWeights returns the Weights field value +func (o *ExperimentComparisonDetail) GetWeights() ExperimentComparisonWeights { + if o == nil { + var ret ExperimentComparisonWeights + return ret + } + + return o.Weights +} + +// GetWeightsOk returns a tuple with the Weights field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetail) GetWeightsOk() (*ExperimentComparisonWeights, bool) { + if o == nil { + return nil, false + } + return &o.Weights, true +} + +// SetWeights sets field value +func (o *ExperimentComparisonDetail) SetWeights(v ExperimentComparisonWeights) { + o.Weights = v +} + +// GetOverallRating returns the OverallRating field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonDetail) GetOverallRating() float32 { + if o == nil || IsNil(o.OverallRating.Get()) { + var ret float32 + return ret + } + return *o.OverallRating.Get() +} + +// GetOverallRatingOk returns a tuple with the OverallRating field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonDetail) GetOverallRatingOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.OverallRating.Get(), o.OverallRating.IsSet() +} + +// HasOverallRating returns a boolean if a field has been set. +func (o *ExperimentComparisonDetail) HasOverallRating() bool { + if o != nil && o.OverallRating.IsSet() { + return true + } + + return false +} + +// SetOverallRating gets a reference to the given NullableFloat32 and assigns it to the OverallRating field. +func (o *ExperimentComparisonDetail) SetOverallRating(v float32) { + o.OverallRating.Set(&v) +} + +// SetOverallRatingNil sets the value for OverallRating to be an explicit nil +func (o *ExperimentComparisonDetail) SetOverallRatingNil() { + o.OverallRating.Set(nil) +} + +// UnsetOverallRating ensures that no value is present for OverallRating, not even an explicit nil +func (o *ExperimentComparisonDetail) UnsetOverallRating() { + o.OverallRating.Unset() +} + +func (o ExperimentComparisonDetail) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ScoresWeight) { + toSerialize["scores_weight"] = o.ScoresWeight + } + if o.ExperimentDatasetId.IsSet() { + toSerialize["experiment_dataset_id"] = o.ExperimentDatasetId.Get() + } + if o.Rank.IsSet() { + toSerialize["rank"] = o.Rank.Get() + } + if !IsNil(o.RankSuffix) { + toSerialize["rank_suffix"] = o.RankSuffix + } + toSerialize["metrics"] = o.Metrics + toSerialize["weights"] = o.Weights + if o.OverallRating.IsSet() { + toSerialize["overall_rating"] = o.OverallRating.Get() + } + return toSerialize, nil +} + +func (o *ExperimentComparisonDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "metrics", + "weights", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentComparisonDetail := _ExperimentComparisonDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentComparisonDetail) + + if err != nil { + return err + } + + *o = ExperimentComparisonDetail(varExperimentComparisonDetail) + + return err +} + +type NullableExperimentComparisonDetail struct { + value *ExperimentComparisonDetail + isSet bool +} + +func (v NullableExperimentComparisonDetail) Get() *ExperimentComparisonDetail { + return v.value +} + +func (v *NullableExperimentComparisonDetail) Set(val *ExperimentComparisonDetail) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonDetail(val *ExperimentComparisonDetail) *NullableExperimentComparisonDetail { + return &NullableExperimentComparisonDetail{value: val, isSet: true} +} + +func (v NullableExperimentComparisonDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_details_response.go b/go/futureagi/model_experiment_comparison_details_response.go new file mode 100644 index 0000000..6c4f118 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_details_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentComparisonDetailsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonDetailsResponse{} + +// ExperimentComparisonDetailsResponse struct for ExperimentComparisonDetailsResponse +type ExperimentComparisonDetailsResponse struct { + Status bool `json:"status"` + Result ExperimentComparisonDetailsResult `json:"result"` +} + +type _ExperimentComparisonDetailsResponse ExperimentComparisonDetailsResponse + +// NewExperimentComparisonDetailsResponse instantiates a new ExperimentComparisonDetailsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonDetailsResponse(status bool, result ExperimentComparisonDetailsResult) *ExperimentComparisonDetailsResponse { + this := ExperimentComparisonDetailsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentComparisonDetailsResponseWithDefaults instantiates a new ExperimentComparisonDetailsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonDetailsResponseWithDefaults() *ExperimentComparisonDetailsResponse { + this := ExperimentComparisonDetailsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentComparisonDetailsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetailsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentComparisonDetailsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentComparisonDetailsResponse) GetResult() ExperimentComparisonDetailsResult { + if o == nil { + var ret ExperimentComparisonDetailsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetailsResponse) GetResultOk() (*ExperimentComparisonDetailsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentComparisonDetailsResponse) SetResult(v ExperimentComparisonDetailsResult) { + o.Result = v +} + +func (o ExperimentComparisonDetailsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonDetailsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentComparisonDetailsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentComparisonDetailsResponse := _ExperimentComparisonDetailsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentComparisonDetailsResponse) + + if err != nil { + return err + } + + *o = ExperimentComparisonDetailsResponse(varExperimentComparisonDetailsResponse) + + return err +} + +type NullableExperimentComparisonDetailsResponse struct { + value *ExperimentComparisonDetailsResponse + isSet bool +} + +func (v NullableExperimentComparisonDetailsResponse) Get() *ExperimentComparisonDetailsResponse { + return v.value +} + +func (v *NullableExperimentComparisonDetailsResponse) Set(val *ExperimentComparisonDetailsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonDetailsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonDetailsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonDetailsResponse(val *ExperimentComparisonDetailsResponse) *NullableExperimentComparisonDetailsResponse { + return &NullableExperimentComparisonDetailsResponse{value: val, isSet: true} +} + +func (v NullableExperimentComparisonDetailsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonDetailsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_details_result.go b/go/futureagi/model_experiment_comparison_details_result.go new file mode 100644 index 0000000..9643eea --- /dev/null +++ b/go/futureagi/model_experiment_comparison_details_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentComparisonDetailsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonDetailsResult{} + +// ExperimentComparisonDetailsResult struct for ExperimentComparisonDetailsResult +type ExperimentComparisonDetailsResult struct { + ExperimentId string `json:"experiment_id"` + TotalComparisons int32 `json:"total_comparisons"` + Comparisons []ExperimentComparisonDetail `json:"comparisons"` +} + +type _ExperimentComparisonDetailsResult ExperimentComparisonDetailsResult + +// NewExperimentComparisonDetailsResult instantiates a new ExperimentComparisonDetailsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonDetailsResult(experimentId string, totalComparisons int32, comparisons []ExperimentComparisonDetail) *ExperimentComparisonDetailsResult { + this := ExperimentComparisonDetailsResult{} + this.ExperimentId = experimentId + this.TotalComparisons = totalComparisons + this.Comparisons = comparisons + return &this +} + +// NewExperimentComparisonDetailsResultWithDefaults instantiates a new ExperimentComparisonDetailsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonDetailsResultWithDefaults() *ExperimentComparisonDetailsResult { + this := ExperimentComparisonDetailsResult{} + return &this +} + +// GetExperimentId returns the ExperimentId field value +func (o *ExperimentComparisonDetailsResult) GetExperimentId() string { + if o == nil { + var ret string + return ret + } + + return o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetailsResult) GetExperimentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExperimentId, true +} + +// SetExperimentId sets field value +func (o *ExperimentComparisonDetailsResult) SetExperimentId(v string) { + o.ExperimentId = v +} + +// GetTotalComparisons returns the TotalComparisons field value +func (o *ExperimentComparisonDetailsResult) GetTotalComparisons() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalComparisons +} + +// GetTotalComparisonsOk returns a tuple with the TotalComparisons field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetailsResult) GetTotalComparisonsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalComparisons, true +} + +// SetTotalComparisons sets field value +func (o *ExperimentComparisonDetailsResult) SetTotalComparisons(v int32) { + o.TotalComparisons = v +} + +// GetComparisons returns the Comparisons field value +func (o *ExperimentComparisonDetailsResult) GetComparisons() []ExperimentComparisonDetail { + if o == nil { + var ret []ExperimentComparisonDetail + return ret + } + + return o.Comparisons +} + +// GetComparisonsOk returns a tuple with the Comparisons field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonDetailsResult) GetComparisonsOk() ([]ExperimentComparisonDetail, bool) { + if o == nil { + return nil, false + } + return o.Comparisons, true +} + +// SetComparisons sets field value +func (o *ExperimentComparisonDetailsResult) SetComparisons(v []ExperimentComparisonDetail) { + o.Comparisons = v +} + +func (o ExperimentComparisonDetailsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonDetailsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["experiment_id"] = o.ExperimentId + toSerialize["total_comparisons"] = o.TotalComparisons + toSerialize["comparisons"] = o.Comparisons + return toSerialize, nil +} + +func (o *ExperimentComparisonDetailsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "experiment_id", + "total_comparisons", + "comparisons", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentComparisonDetailsResult := _ExperimentComparisonDetailsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentComparisonDetailsResult) + + if err != nil { + return err + } + + *o = ExperimentComparisonDetailsResult(varExperimentComparisonDetailsResult) + + return err +} + +type NullableExperimentComparisonDetailsResult struct { + value *ExperimentComparisonDetailsResult + isSet bool +} + +func (v NullableExperimentComparisonDetailsResult) Get() *ExperimentComparisonDetailsResult { + return v.value +} + +func (v *NullableExperimentComparisonDetailsResult) Set(val *ExperimentComparisonDetailsResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonDetailsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonDetailsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonDetailsResult(val *ExperimentComparisonDetailsResult) *NullableExperimentComparisonDetailsResult { + return &NullableExperimentComparisonDetailsResult{value: val, isSet: true} +} + +func (v NullableExperimentComparisonDetailsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonDetailsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_metrics.go b/go/futureagi/model_experiment_comparison_metrics.go new file mode 100644 index 0000000..cb468fa --- /dev/null +++ b/go/futureagi/model_experiment_comparison_metrics.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentComparisonMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonMetrics{} + +// ExperimentComparisonMetrics struct for ExperimentComparisonMetrics +type ExperimentComparisonMetrics struct { + Raw ExperimentComparisonRawMetrics `json:"raw"` + Normalized ExperimentComparisonNormalizedMetrics `json:"normalized"` +} + +type _ExperimentComparisonMetrics ExperimentComparisonMetrics + +// NewExperimentComparisonMetrics instantiates a new ExperimentComparisonMetrics object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonMetrics(raw ExperimentComparisonRawMetrics, normalized ExperimentComparisonNormalizedMetrics) *ExperimentComparisonMetrics { + this := ExperimentComparisonMetrics{} + this.Raw = raw + this.Normalized = normalized + return &this +} + +// NewExperimentComparisonMetricsWithDefaults instantiates a new ExperimentComparisonMetrics object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonMetricsWithDefaults() *ExperimentComparisonMetrics { + this := ExperimentComparisonMetrics{} + return &this +} + +// GetRaw returns the Raw field value +func (o *ExperimentComparisonMetrics) GetRaw() ExperimentComparisonRawMetrics { + if o == nil { + var ret ExperimentComparisonRawMetrics + return ret + } + + return o.Raw +} + +// GetRawOk returns a tuple with the Raw field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonMetrics) GetRawOk() (*ExperimentComparisonRawMetrics, bool) { + if o == nil { + return nil, false + } + return &o.Raw, true +} + +// SetRaw sets field value +func (o *ExperimentComparisonMetrics) SetRaw(v ExperimentComparisonRawMetrics) { + o.Raw = v +} + +// GetNormalized returns the Normalized field value +func (o *ExperimentComparisonMetrics) GetNormalized() ExperimentComparisonNormalizedMetrics { + if o == nil { + var ret ExperimentComparisonNormalizedMetrics + return ret + } + + return o.Normalized +} + +// GetNormalizedOk returns a tuple with the Normalized field value +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonMetrics) GetNormalizedOk() (*ExperimentComparisonNormalizedMetrics, bool) { + if o == nil { + return nil, false + } + return &o.Normalized, true +} + +// SetNormalized sets field value +func (o *ExperimentComparisonMetrics) SetNormalized(v ExperimentComparisonNormalizedMetrics) { + o.Normalized = v +} + +func (o ExperimentComparisonMetrics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["raw"] = o.Raw + toSerialize["normalized"] = o.Normalized + return toSerialize, nil +} + +func (o *ExperimentComparisonMetrics) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "raw", + "normalized", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentComparisonMetrics := _ExperimentComparisonMetrics{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentComparisonMetrics) + + if err != nil { + return err + } + + *o = ExperimentComparisonMetrics(varExperimentComparisonMetrics) + + return err +} + +type NullableExperimentComparisonMetrics struct { + value *ExperimentComparisonMetrics + isSet bool +} + +func (v NullableExperimentComparisonMetrics) Get() *ExperimentComparisonMetrics { + return v.value +} + +func (v *NullableExperimentComparisonMetrics) Set(val *ExperimentComparisonMetrics) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonMetrics) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonMetrics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonMetrics(val *ExperimentComparisonMetrics) *NullableExperimentComparisonMetrics { + return &NullableExperimentComparisonMetrics{value: val, isSet: true} +} + +func (v NullableExperimentComparisonMetrics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonMetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_normalized_metrics.go b/go/futureagi/model_experiment_comparison_normalized_metrics.go new file mode 100644 index 0000000..648d5b3 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_normalized_metrics.go @@ -0,0 +1,277 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentComparisonNormalizedMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonNormalizedMetrics{} + +// ExperimentComparisonNormalizedMetrics struct for ExperimentComparisonNormalizedMetrics +type ExperimentComparisonNormalizedMetrics struct { + CompletionTokens NullableFloat32 `json:"completion_tokens,omitempty"` + TotalTokens NullableFloat32 `json:"total_tokens,omitempty"` + ResponseTime NullableFloat32 `json:"response_time,omitempty"` + Score NullableFloat32 `json:"score,omitempty"` +} + +// NewExperimentComparisonNormalizedMetrics instantiates a new ExperimentComparisonNormalizedMetrics object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonNormalizedMetrics() *ExperimentComparisonNormalizedMetrics { + this := ExperimentComparisonNormalizedMetrics{} + return &this +} + +// NewExperimentComparisonNormalizedMetricsWithDefaults instantiates a new ExperimentComparisonNormalizedMetrics object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonNormalizedMetricsWithDefaults() *ExperimentComparisonNormalizedMetrics { + this := ExperimentComparisonNormalizedMetrics{} + return &this +} + +// GetCompletionTokens returns the CompletionTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonNormalizedMetrics) GetCompletionTokens() float32 { + if o == nil || IsNil(o.CompletionTokens.Get()) { + var ret float32 + return ret + } + return *o.CompletionTokens.Get() +} + +// GetCompletionTokensOk returns a tuple with the CompletionTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonNormalizedMetrics) GetCompletionTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.CompletionTokens.Get(), o.CompletionTokens.IsSet() +} + +// HasCompletionTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonNormalizedMetrics) HasCompletionTokens() bool { + if o != nil && o.CompletionTokens.IsSet() { + return true + } + + return false +} + +// SetCompletionTokens gets a reference to the given NullableFloat32 and assigns it to the CompletionTokens field. +func (o *ExperimentComparisonNormalizedMetrics) SetCompletionTokens(v float32) { + o.CompletionTokens.Set(&v) +} + +// SetCompletionTokensNil sets the value for CompletionTokens to be an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) SetCompletionTokensNil() { + o.CompletionTokens.Set(nil) +} + +// UnsetCompletionTokens ensures that no value is present for CompletionTokens, not even an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) UnsetCompletionTokens() { + o.CompletionTokens.Unset() +} + +// GetTotalTokens returns the TotalTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonNormalizedMetrics) GetTotalTokens() float32 { + if o == nil || IsNil(o.TotalTokens.Get()) { + var ret float32 + return ret + } + return *o.TotalTokens.Get() +} + +// GetTotalTokensOk returns a tuple with the TotalTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonNormalizedMetrics) GetTotalTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.TotalTokens.Get(), o.TotalTokens.IsSet() +} + +// HasTotalTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonNormalizedMetrics) HasTotalTokens() bool { + if o != nil && o.TotalTokens.IsSet() { + return true + } + + return false +} + +// SetTotalTokens gets a reference to the given NullableFloat32 and assigns it to the TotalTokens field. +func (o *ExperimentComparisonNormalizedMetrics) SetTotalTokens(v float32) { + o.TotalTokens.Set(&v) +} + +// SetTotalTokensNil sets the value for TotalTokens to be an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) SetTotalTokensNil() { + o.TotalTokens.Set(nil) +} + +// UnsetTotalTokens ensures that no value is present for TotalTokens, not even an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) UnsetTotalTokens() { + o.TotalTokens.Unset() +} + +// GetResponseTime returns the ResponseTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonNormalizedMetrics) GetResponseTime() float32 { + if o == nil || IsNil(o.ResponseTime.Get()) { + var ret float32 + return ret + } + return *o.ResponseTime.Get() +} + +// GetResponseTimeOk returns a tuple with the ResponseTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonNormalizedMetrics) GetResponseTimeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.ResponseTime.Get(), o.ResponseTime.IsSet() +} + +// HasResponseTime returns a boolean if a field has been set. +func (o *ExperimentComparisonNormalizedMetrics) HasResponseTime() bool { + if o != nil && o.ResponseTime.IsSet() { + return true + } + + return false +} + +// SetResponseTime gets a reference to the given NullableFloat32 and assigns it to the ResponseTime field. +func (o *ExperimentComparisonNormalizedMetrics) SetResponseTime(v float32) { + o.ResponseTime.Set(&v) +} + +// SetResponseTimeNil sets the value for ResponseTime to be an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) SetResponseTimeNil() { + o.ResponseTime.Set(nil) +} + +// UnsetResponseTime ensures that no value is present for ResponseTime, not even an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) UnsetResponseTime() { + o.ResponseTime.Unset() +} + +// GetScore returns the Score field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonNormalizedMetrics) GetScore() float32 { + if o == nil || IsNil(o.Score.Get()) { + var ret float32 + return ret + } + return *o.Score.Get() +} + +// GetScoreOk returns a tuple with the Score field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonNormalizedMetrics) GetScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Score.Get(), o.Score.IsSet() +} + +// HasScore returns a boolean if a field has been set. +func (o *ExperimentComparisonNormalizedMetrics) HasScore() bool { + if o != nil && o.Score.IsSet() { + return true + } + + return false +} + +// SetScore gets a reference to the given NullableFloat32 and assigns it to the Score field. +func (o *ExperimentComparisonNormalizedMetrics) SetScore(v float32) { + o.Score.Set(&v) +} + +// SetScoreNil sets the value for Score to be an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) SetScoreNil() { + o.Score.Set(nil) +} + +// UnsetScore ensures that no value is present for Score, not even an explicit nil +func (o *ExperimentComparisonNormalizedMetrics) UnsetScore() { + o.Score.Unset() +} + +func (o ExperimentComparisonNormalizedMetrics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonNormalizedMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.CompletionTokens.IsSet() { + toSerialize["completion_tokens"] = o.CompletionTokens.Get() + } + if o.TotalTokens.IsSet() { + toSerialize["total_tokens"] = o.TotalTokens.Get() + } + if o.ResponseTime.IsSet() { + toSerialize["response_time"] = o.ResponseTime.Get() + } + if o.Score.IsSet() { + toSerialize["score"] = o.Score.Get() + } + return toSerialize, nil +} + +type NullableExperimentComparisonNormalizedMetrics struct { + value *ExperimentComparisonNormalizedMetrics + isSet bool +} + +func (v NullableExperimentComparisonNormalizedMetrics) Get() *ExperimentComparisonNormalizedMetrics { + return v.value +} + +func (v *NullableExperimentComparisonNormalizedMetrics) Set(val *ExperimentComparisonNormalizedMetrics) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonNormalizedMetrics) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonNormalizedMetrics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonNormalizedMetrics(val *ExperimentComparisonNormalizedMetrics) *NullableExperimentComparisonNormalizedMetrics { + return &NullableExperimentComparisonNormalizedMetrics{value: val, isSet: true} +} + +func (v NullableExperimentComparisonNormalizedMetrics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonNormalizedMetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_raw_metrics.go b/go/futureagi/model_experiment_comparison_raw_metrics.go new file mode 100644 index 0000000..01a0e88 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_raw_metrics.go @@ -0,0 +1,277 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentComparisonRawMetrics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonRawMetrics{} + +// ExperimentComparisonRawMetrics struct for ExperimentComparisonRawMetrics +type ExperimentComparisonRawMetrics struct { + AvgCompletionTokens NullableFloat32 `json:"avg_completion_tokens,omitempty"` + AvgTotalTokens NullableFloat32 `json:"avg_total_tokens,omitempty"` + AvgResponseTime NullableFloat32 `json:"avg_response_time,omitempty"` + AvgScore NullableFloat32 `json:"avg_score,omitempty"` +} + +// NewExperimentComparisonRawMetrics instantiates a new ExperimentComparisonRawMetrics object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonRawMetrics() *ExperimentComparisonRawMetrics { + this := ExperimentComparisonRawMetrics{} + return &this +} + +// NewExperimentComparisonRawMetricsWithDefaults instantiates a new ExperimentComparisonRawMetrics object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonRawMetricsWithDefaults() *ExperimentComparisonRawMetrics { + this := ExperimentComparisonRawMetrics{} + return &this +} + +// GetAvgCompletionTokens returns the AvgCompletionTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonRawMetrics) GetAvgCompletionTokens() float32 { + if o == nil || IsNil(o.AvgCompletionTokens.Get()) { + var ret float32 + return ret + } + return *o.AvgCompletionTokens.Get() +} + +// GetAvgCompletionTokensOk returns a tuple with the AvgCompletionTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonRawMetrics) GetAvgCompletionTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgCompletionTokens.Get(), o.AvgCompletionTokens.IsSet() +} + +// HasAvgCompletionTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonRawMetrics) HasAvgCompletionTokens() bool { + if o != nil && o.AvgCompletionTokens.IsSet() { + return true + } + + return false +} + +// SetAvgCompletionTokens gets a reference to the given NullableFloat32 and assigns it to the AvgCompletionTokens field. +func (o *ExperimentComparisonRawMetrics) SetAvgCompletionTokens(v float32) { + o.AvgCompletionTokens.Set(&v) +} + +// SetAvgCompletionTokensNil sets the value for AvgCompletionTokens to be an explicit nil +func (o *ExperimentComparisonRawMetrics) SetAvgCompletionTokensNil() { + o.AvgCompletionTokens.Set(nil) +} + +// UnsetAvgCompletionTokens ensures that no value is present for AvgCompletionTokens, not even an explicit nil +func (o *ExperimentComparisonRawMetrics) UnsetAvgCompletionTokens() { + o.AvgCompletionTokens.Unset() +} + +// GetAvgTotalTokens returns the AvgTotalTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonRawMetrics) GetAvgTotalTokens() float32 { + if o == nil || IsNil(o.AvgTotalTokens.Get()) { + var ret float32 + return ret + } + return *o.AvgTotalTokens.Get() +} + +// GetAvgTotalTokensOk returns a tuple with the AvgTotalTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonRawMetrics) GetAvgTotalTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgTotalTokens.Get(), o.AvgTotalTokens.IsSet() +} + +// HasAvgTotalTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonRawMetrics) HasAvgTotalTokens() bool { + if o != nil && o.AvgTotalTokens.IsSet() { + return true + } + + return false +} + +// SetAvgTotalTokens gets a reference to the given NullableFloat32 and assigns it to the AvgTotalTokens field. +func (o *ExperimentComparisonRawMetrics) SetAvgTotalTokens(v float32) { + o.AvgTotalTokens.Set(&v) +} + +// SetAvgTotalTokensNil sets the value for AvgTotalTokens to be an explicit nil +func (o *ExperimentComparisonRawMetrics) SetAvgTotalTokensNil() { + o.AvgTotalTokens.Set(nil) +} + +// UnsetAvgTotalTokens ensures that no value is present for AvgTotalTokens, not even an explicit nil +func (o *ExperimentComparisonRawMetrics) UnsetAvgTotalTokens() { + o.AvgTotalTokens.Unset() +} + +// GetAvgResponseTime returns the AvgResponseTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonRawMetrics) GetAvgResponseTime() float32 { + if o == nil || IsNil(o.AvgResponseTime.Get()) { + var ret float32 + return ret + } + return *o.AvgResponseTime.Get() +} + +// GetAvgResponseTimeOk returns a tuple with the AvgResponseTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonRawMetrics) GetAvgResponseTimeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgResponseTime.Get(), o.AvgResponseTime.IsSet() +} + +// HasAvgResponseTime returns a boolean if a field has been set. +func (o *ExperimentComparisonRawMetrics) HasAvgResponseTime() bool { + if o != nil && o.AvgResponseTime.IsSet() { + return true + } + + return false +} + +// SetAvgResponseTime gets a reference to the given NullableFloat32 and assigns it to the AvgResponseTime field. +func (o *ExperimentComparisonRawMetrics) SetAvgResponseTime(v float32) { + o.AvgResponseTime.Set(&v) +} + +// SetAvgResponseTimeNil sets the value for AvgResponseTime to be an explicit nil +func (o *ExperimentComparisonRawMetrics) SetAvgResponseTimeNil() { + o.AvgResponseTime.Set(nil) +} + +// UnsetAvgResponseTime ensures that no value is present for AvgResponseTime, not even an explicit nil +func (o *ExperimentComparisonRawMetrics) UnsetAvgResponseTime() { + o.AvgResponseTime.Unset() +} + +// GetAvgScore returns the AvgScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonRawMetrics) GetAvgScore() float32 { + if o == nil || IsNil(o.AvgScore.Get()) { + var ret float32 + return ret + } + return *o.AvgScore.Get() +} + +// GetAvgScoreOk returns a tuple with the AvgScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonRawMetrics) GetAvgScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AvgScore.Get(), o.AvgScore.IsSet() +} + +// HasAvgScore returns a boolean if a field has been set. +func (o *ExperimentComparisonRawMetrics) HasAvgScore() bool { + if o != nil && o.AvgScore.IsSet() { + return true + } + + return false +} + +// SetAvgScore gets a reference to the given NullableFloat32 and assigns it to the AvgScore field. +func (o *ExperimentComparisonRawMetrics) SetAvgScore(v float32) { + o.AvgScore.Set(&v) +} + +// SetAvgScoreNil sets the value for AvgScore to be an explicit nil +func (o *ExperimentComparisonRawMetrics) SetAvgScoreNil() { + o.AvgScore.Set(nil) +} + +// UnsetAvgScore ensures that no value is present for AvgScore, not even an explicit nil +func (o *ExperimentComparisonRawMetrics) UnsetAvgScore() { + o.AvgScore.Unset() +} + +func (o ExperimentComparisonRawMetrics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonRawMetrics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.AvgCompletionTokens.IsSet() { + toSerialize["avg_completion_tokens"] = o.AvgCompletionTokens.Get() + } + if o.AvgTotalTokens.IsSet() { + toSerialize["avg_total_tokens"] = o.AvgTotalTokens.Get() + } + if o.AvgResponseTime.IsSet() { + toSerialize["avg_response_time"] = o.AvgResponseTime.Get() + } + if o.AvgScore.IsSet() { + toSerialize["avg_score"] = o.AvgScore.Get() + } + return toSerialize, nil +} + +type NullableExperimentComparisonRawMetrics struct { + value *ExperimentComparisonRawMetrics + isSet bool +} + +func (v NullableExperimentComparisonRawMetrics) Get() *ExperimentComparisonRawMetrics { + return v.value +} + +func (v *NullableExperimentComparisonRawMetrics) Set(val *ExperimentComparisonRawMetrics) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonRawMetrics) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonRawMetrics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonRawMetrics(val *ExperimentComparisonRawMetrics) *NullableExperimentComparisonRawMetrics { + return &NullableExperimentComparisonRawMetrics{value: val, isSet: true} +} + +func (v NullableExperimentComparisonRawMetrics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonRawMetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_weights.go b/go/futureagi/model_experiment_comparison_weights.go new file mode 100644 index 0000000..eb6ed11 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_weights.go @@ -0,0 +1,266 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentComparisonWeights type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonWeights{} + +// ExperimentComparisonWeights struct for ExperimentComparisonWeights +type ExperimentComparisonWeights struct { + ResponseTime NullableFloat32 `json:"response_time,omitempty"` + Scores map[string]interface{} `json:"scores,omitempty"` + TotalTokens NullableFloat32 `json:"total_tokens,omitempty"` + CompletionTokens NullableFloat32 `json:"completion_tokens,omitempty"` +} + +// NewExperimentComparisonWeights instantiates a new ExperimentComparisonWeights object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonWeights() *ExperimentComparisonWeights { + this := ExperimentComparisonWeights{} + return &this +} + +// NewExperimentComparisonWeightsWithDefaults instantiates a new ExperimentComparisonWeights object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonWeightsWithDefaults() *ExperimentComparisonWeights { + this := ExperimentComparisonWeights{} + return &this +} + +// GetResponseTime returns the ResponseTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonWeights) GetResponseTime() float32 { + if o == nil || IsNil(o.ResponseTime.Get()) { + var ret float32 + return ret + } + return *o.ResponseTime.Get() +} + +// GetResponseTimeOk returns a tuple with the ResponseTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonWeights) GetResponseTimeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.ResponseTime.Get(), o.ResponseTime.IsSet() +} + +// HasResponseTime returns a boolean if a field has been set. +func (o *ExperimentComparisonWeights) HasResponseTime() bool { + if o != nil && o.ResponseTime.IsSet() { + return true + } + + return false +} + +// SetResponseTime gets a reference to the given NullableFloat32 and assigns it to the ResponseTime field. +func (o *ExperimentComparisonWeights) SetResponseTime(v float32) { + o.ResponseTime.Set(&v) +} + +// SetResponseTimeNil sets the value for ResponseTime to be an explicit nil +func (o *ExperimentComparisonWeights) SetResponseTimeNil() { + o.ResponseTime.Set(nil) +} + +// UnsetResponseTime ensures that no value is present for ResponseTime, not even an explicit nil +func (o *ExperimentComparisonWeights) UnsetResponseTime() { + o.ResponseTime.Unset() +} + +// GetScores returns the Scores field value if set, zero value otherwise. +func (o *ExperimentComparisonWeights) GetScores() map[string]interface{} { + if o == nil || IsNil(o.Scores) { + var ret map[string]interface{} + return ret + } + return o.Scores +} + +// GetScoresOk returns a tuple with the Scores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonWeights) GetScoresOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Scores) { + return map[string]interface{}{}, false + } + return o.Scores, true +} + +// HasScores returns a boolean if a field has been set. +func (o *ExperimentComparisonWeights) HasScores() bool { + if o != nil && !IsNil(o.Scores) { + return true + } + + return false +} + +// SetScores gets a reference to the given map[string]interface{} and assigns it to the Scores field. +func (o *ExperimentComparisonWeights) SetScores(v map[string]interface{}) { + o.Scores = v +} + +// GetTotalTokens returns the TotalTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonWeights) GetTotalTokens() float32 { + if o == nil || IsNil(o.TotalTokens.Get()) { + var ret float32 + return ret + } + return *o.TotalTokens.Get() +} + +// GetTotalTokensOk returns a tuple with the TotalTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonWeights) GetTotalTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.TotalTokens.Get(), o.TotalTokens.IsSet() +} + +// HasTotalTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonWeights) HasTotalTokens() bool { + if o != nil && o.TotalTokens.IsSet() { + return true + } + + return false +} + +// SetTotalTokens gets a reference to the given NullableFloat32 and assigns it to the TotalTokens field. +func (o *ExperimentComparisonWeights) SetTotalTokens(v float32) { + o.TotalTokens.Set(&v) +} + +// SetTotalTokensNil sets the value for TotalTokens to be an explicit nil +func (o *ExperimentComparisonWeights) SetTotalTokensNil() { + o.TotalTokens.Set(nil) +} + +// UnsetTotalTokens ensures that no value is present for TotalTokens, not even an explicit nil +func (o *ExperimentComparisonWeights) UnsetTotalTokens() { + o.TotalTokens.Unset() +} + +// GetCompletionTokens returns the CompletionTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentComparisonWeights) GetCompletionTokens() float32 { + if o == nil || IsNil(o.CompletionTokens.Get()) { + var ret float32 + return ret + } + return *o.CompletionTokens.Get() +} + +// GetCompletionTokensOk returns a tuple with the CompletionTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentComparisonWeights) GetCompletionTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.CompletionTokens.Get(), o.CompletionTokens.IsSet() +} + +// HasCompletionTokens returns a boolean if a field has been set. +func (o *ExperimentComparisonWeights) HasCompletionTokens() bool { + if o != nil && o.CompletionTokens.IsSet() { + return true + } + + return false +} + +// SetCompletionTokens gets a reference to the given NullableFloat32 and assigns it to the CompletionTokens field. +func (o *ExperimentComparisonWeights) SetCompletionTokens(v float32) { + o.CompletionTokens.Set(&v) +} + +// SetCompletionTokensNil sets the value for CompletionTokens to be an explicit nil +func (o *ExperimentComparisonWeights) SetCompletionTokensNil() { + o.CompletionTokens.Set(nil) +} + +// UnsetCompletionTokens ensures that no value is present for CompletionTokens, not even an explicit nil +func (o *ExperimentComparisonWeights) UnsetCompletionTokens() { + o.CompletionTokens.Unset() +} + +func (o ExperimentComparisonWeights) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonWeights) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ResponseTime.IsSet() { + toSerialize["response_time"] = o.ResponseTime.Get() + } + if !IsNil(o.Scores) { + toSerialize["scores"] = o.Scores + } + if o.TotalTokens.IsSet() { + toSerialize["total_tokens"] = o.TotalTokens.Get() + } + if o.CompletionTokens.IsSet() { + toSerialize["completion_tokens"] = o.CompletionTokens.Get() + } + return toSerialize, nil +} + +type NullableExperimentComparisonWeights struct { + value *ExperimentComparisonWeights + isSet bool +} + +func (v NullableExperimentComparisonWeights) Get() *ExperimentComparisonWeights { + return v.value +} + +func (v *NullableExperimentComparisonWeights) Set(val *ExperimentComparisonWeights) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonWeights) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonWeights) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonWeights(val *ExperimentComparisonWeights) *NullableExperimentComparisonWeights { + return &NullableExperimentComparisonWeights{value: val, isSet: true} +} + +func (v NullableExperimentComparisonWeights) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonWeights) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_comparison_weights_request.go b/go/futureagi/model_experiment_comparison_weights_request.go new file mode 100644 index 0000000..8f03546 --- /dev/null +++ b/go/futureagi/model_experiment_comparison_weights_request.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentComparisonWeightsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentComparisonWeightsRequest{} + +// ExperimentComparisonWeightsRequest struct for ExperimentComparisonWeightsRequest +type ExperimentComparisonWeightsRequest struct { + EvalTemplateIds []string `json:"eval_template_ids,omitempty"` + Weights map[string]interface{} `json:"weights,omitempty"` +} + +// NewExperimentComparisonWeightsRequest instantiates a new ExperimentComparisonWeightsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentComparisonWeightsRequest() *ExperimentComparisonWeightsRequest { + this := ExperimentComparisonWeightsRequest{} + return &this +} + +// NewExperimentComparisonWeightsRequestWithDefaults instantiates a new ExperimentComparisonWeightsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentComparisonWeightsRequestWithDefaults() *ExperimentComparisonWeightsRequest { + this := ExperimentComparisonWeightsRequest{} + return &this +} + +// GetEvalTemplateIds returns the EvalTemplateIds field value if set, zero value otherwise. +func (o *ExperimentComparisonWeightsRequest) GetEvalTemplateIds() []string { + if o == nil || IsNil(o.EvalTemplateIds) { + var ret []string + return ret + } + return o.EvalTemplateIds +} + +// GetEvalTemplateIdsOk returns a tuple with the EvalTemplateIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonWeightsRequest) GetEvalTemplateIdsOk() ([]string, bool) { + if o == nil || IsNil(o.EvalTemplateIds) { + return nil, false + } + return o.EvalTemplateIds, true +} + +// HasEvalTemplateIds returns a boolean if a field has been set. +func (o *ExperimentComparisonWeightsRequest) HasEvalTemplateIds() bool { + if o != nil && !IsNil(o.EvalTemplateIds) { + return true + } + + return false +} + +// SetEvalTemplateIds gets a reference to the given []string and assigns it to the EvalTemplateIds field. +func (o *ExperimentComparisonWeightsRequest) SetEvalTemplateIds(v []string) { + o.EvalTemplateIds = v +} + +// GetWeights returns the Weights field value if set, zero value otherwise. +func (o *ExperimentComparisonWeightsRequest) GetWeights() map[string]interface{} { + if o == nil || IsNil(o.Weights) { + var ret map[string]interface{} + return ret + } + return o.Weights +} + +// GetWeightsOk returns a tuple with the Weights field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentComparisonWeightsRequest) GetWeightsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Weights) { + return map[string]interface{}{}, false + } + return o.Weights, true +} + +// HasWeights returns a boolean if a field has been set. +func (o *ExperimentComparisonWeightsRequest) HasWeights() bool { + if o != nil && !IsNil(o.Weights) { + return true + } + + return false +} + +// SetWeights gets a reference to the given map[string]interface{} and assigns it to the Weights field. +func (o *ExperimentComparisonWeightsRequest) SetWeights(v map[string]interface{}) { + o.Weights = v +} + +func (o ExperimentComparisonWeightsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentComparisonWeightsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EvalTemplateIds) { + toSerialize["eval_template_ids"] = o.EvalTemplateIds + } + if !IsNil(o.Weights) { + toSerialize["weights"] = o.Weights + } + return toSerialize, nil +} + +type NullableExperimentComparisonWeightsRequest struct { + value *ExperimentComparisonWeightsRequest + isSet bool +} + +func (v NullableExperimentComparisonWeightsRequest) Get() *ExperimentComparisonWeightsRequest { + return v.value +} + +func (v *NullableExperimentComparisonWeightsRequest) Set(val *ExperimentComparisonWeightsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentComparisonWeightsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentComparisonWeightsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentComparisonWeightsRequest(val *ExperimentComparisonWeightsRequest) *NullableExperimentComparisonWeightsRequest { + return &NullableExperimentComparisonWeightsRequest{value: val, isSet: true} +} + +func (v NullableExperimentComparisonWeightsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentComparisonWeightsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_create_v2.go b/go/futureagi/model_experiment_create_v2.go new file mode 100644 index 0000000..6caf8e5 --- /dev/null +++ b/go/futureagi/model_experiment_create_v2.go @@ -0,0 +1,328 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentCreateV2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentCreateV2{} + +// ExperimentCreateV2 struct for ExperimentCreateV2 +type ExperimentCreateV2 struct { + Name string `json:"name"` + DatasetId string `json:"dataset_id"` + ColumnId NullableString `json:"column_id,omitempty"` + ExperimentType *string `json:"experiment_type,omitempty"` + PromptConfig []PromptConfigEntry `json:"prompt_config"` + UserEvalMetrics []EvalMetricEntry `json:"user_eval_metrics"` +} + +type _ExperimentCreateV2 ExperimentCreateV2 + +// NewExperimentCreateV2 instantiates a new ExperimentCreateV2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentCreateV2(name string, datasetId string, promptConfig []PromptConfigEntry, userEvalMetrics []EvalMetricEntry) *ExperimentCreateV2 { + this := ExperimentCreateV2{} + this.Name = name + this.DatasetId = datasetId + var experimentType string = "llm" + this.ExperimentType = &experimentType + this.PromptConfig = promptConfig + this.UserEvalMetrics = userEvalMetrics + return &this +} + +// NewExperimentCreateV2WithDefaults instantiates a new ExperimentCreateV2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentCreateV2WithDefaults() *ExperimentCreateV2 { + this := ExperimentCreateV2{} + var experimentType string = "llm" + this.ExperimentType = &experimentType + return &this +} + +// GetName returns the Name field value +func (o *ExperimentCreateV2) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExperimentCreateV2) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExperimentCreateV2) SetName(v string) { + o.Name = v +} + +// GetDatasetId returns the DatasetId field value +func (o *ExperimentCreateV2) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *ExperimentCreateV2) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *ExperimentCreateV2) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetColumnId returns the ColumnId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentCreateV2) GetColumnId() string { + if o == nil || IsNil(o.ColumnId.Get()) { + var ret string + return ret + } + return *o.ColumnId.Get() +} + +// GetColumnIdOk returns a tuple with the ColumnId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentCreateV2) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ColumnId.Get(), o.ColumnId.IsSet() +} + +// HasColumnId returns a boolean if a field has been set. +func (o *ExperimentCreateV2) HasColumnId() bool { + if o != nil && o.ColumnId.IsSet() { + return true + } + + return false +} + +// SetColumnId gets a reference to the given NullableString and assigns it to the ColumnId field. +func (o *ExperimentCreateV2) SetColumnId(v string) { + o.ColumnId.Set(&v) +} + +// SetColumnIdNil sets the value for ColumnId to be an explicit nil +func (o *ExperimentCreateV2) SetColumnIdNil() { + o.ColumnId.Set(nil) +} + +// UnsetColumnId ensures that no value is present for ColumnId, not even an explicit nil +func (o *ExperimentCreateV2) UnsetColumnId() { + o.ColumnId.Unset() +} + +// GetExperimentType returns the ExperimentType field value if set, zero value otherwise. +func (o *ExperimentCreateV2) GetExperimentType() string { + if o == nil || IsNil(o.ExperimentType) { + var ret string + return ret + } + return *o.ExperimentType +} + +// GetExperimentTypeOk returns a tuple with the ExperimentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentCreateV2) GetExperimentTypeOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentType) { + return nil, false + } + return o.ExperimentType, true +} + +// HasExperimentType returns a boolean if a field has been set. +func (o *ExperimentCreateV2) HasExperimentType() bool { + if o != nil && !IsNil(o.ExperimentType) { + return true + } + + return false +} + +// SetExperimentType gets a reference to the given string and assigns it to the ExperimentType field. +func (o *ExperimentCreateV2) SetExperimentType(v string) { + o.ExperimentType = &v +} + +// GetPromptConfig returns the PromptConfig field value +func (o *ExperimentCreateV2) GetPromptConfig() []PromptConfigEntry { + if o == nil { + var ret []PromptConfigEntry + return ret + } + + return o.PromptConfig +} + +// GetPromptConfigOk returns a tuple with the PromptConfig field value +// and a boolean to check if the value has been set. +func (o *ExperimentCreateV2) GetPromptConfigOk() ([]PromptConfigEntry, bool) { + if o == nil { + return nil, false + } + return o.PromptConfig, true +} + +// SetPromptConfig sets field value +func (o *ExperimentCreateV2) SetPromptConfig(v []PromptConfigEntry) { + o.PromptConfig = v +} + +// GetUserEvalMetrics returns the UserEvalMetrics field value +func (o *ExperimentCreateV2) GetUserEvalMetrics() []EvalMetricEntry { + if o == nil { + var ret []EvalMetricEntry + return ret + } + + return o.UserEvalMetrics +} + +// GetUserEvalMetricsOk returns a tuple with the UserEvalMetrics field value +// and a boolean to check if the value has been set. +func (o *ExperimentCreateV2) GetUserEvalMetricsOk() ([]EvalMetricEntry, bool) { + if o == nil { + return nil, false + } + return o.UserEvalMetrics, true +} + +// SetUserEvalMetrics sets field value +func (o *ExperimentCreateV2) SetUserEvalMetrics(v []EvalMetricEntry) { + o.UserEvalMetrics = v +} + +func (o ExperimentCreateV2) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentCreateV2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["dataset_id"] = o.DatasetId + if o.ColumnId.IsSet() { + toSerialize["column_id"] = o.ColumnId.Get() + } + if !IsNil(o.ExperimentType) { + toSerialize["experiment_type"] = o.ExperimentType + } + toSerialize["prompt_config"] = o.PromptConfig + toSerialize["user_eval_metrics"] = o.UserEvalMetrics + return toSerialize, nil +} + +func (o *ExperimentCreateV2) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "dataset_id", + "prompt_config", + "user_eval_metrics", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentCreateV2 := _ExperimentCreateV2{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentCreateV2) + + if err != nil { + return err + } + + *o = ExperimentCreateV2(varExperimentCreateV2) + + return err +} + +type NullableExperimentCreateV2 struct { + value *ExperimentCreateV2 + isSet bool +} + +func (v NullableExperimentCreateV2) Get() *ExperimentCreateV2 { + return v.value +} + +func (v *NullableExperimentCreateV2) Set(val *ExperimentCreateV2) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentCreateV2) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentCreateV2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentCreateV2(val *ExperimentCreateV2) *NullableExperimentCreateV2 { + return &NullableExperimentCreateV2{value: val, isSet: true} +} + +func (v NullableExperimentCreateV2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentCreateV2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_dataset_comparison_response.go b/go/futureagi/model_experiment_dataset_comparison_response.go new file mode 100644 index 0000000..cef18fe --- /dev/null +++ b/go/futureagi/model_experiment_dataset_comparison_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentDatasetComparisonResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentDatasetComparisonResponse{} + +// ExperimentDatasetComparisonResponse struct for ExperimentDatasetComparisonResponse +type ExperimentDatasetComparisonResponse struct { + Status bool `json:"status"` + Result ExperimentDatasetComparisonResult `json:"result"` +} + +type _ExperimentDatasetComparisonResponse ExperimentDatasetComparisonResponse + +// NewExperimentDatasetComparisonResponse instantiates a new ExperimentDatasetComparisonResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentDatasetComparisonResponse(status bool, result ExperimentDatasetComparisonResult) *ExperimentDatasetComparisonResponse { + this := ExperimentDatasetComparisonResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentDatasetComparisonResponseWithDefaults instantiates a new ExperimentDatasetComparisonResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentDatasetComparisonResponseWithDefaults() *ExperimentDatasetComparisonResponse { + this := ExperimentDatasetComparisonResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentDatasetComparisonResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentDatasetComparisonResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentDatasetComparisonResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentDatasetComparisonResponse) GetResult() ExperimentDatasetComparisonResult { + if o == nil { + var ret ExperimentDatasetComparisonResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentDatasetComparisonResponse) GetResultOk() (*ExperimentDatasetComparisonResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentDatasetComparisonResponse) SetResult(v ExperimentDatasetComparisonResult) { + o.Result = v +} + +func (o ExperimentDatasetComparisonResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentDatasetComparisonResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentDatasetComparisonResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentDatasetComparisonResponse := _ExperimentDatasetComparisonResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentDatasetComparisonResponse) + + if err != nil { + return err + } + + *o = ExperimentDatasetComparisonResponse(varExperimentDatasetComparisonResponse) + + return err +} + +type NullableExperimentDatasetComparisonResponse struct { + value *ExperimentDatasetComparisonResponse + isSet bool +} + +func (v NullableExperimentDatasetComparisonResponse) Get() *ExperimentDatasetComparisonResponse { + return v.value +} + +func (v *NullableExperimentDatasetComparisonResponse) Set(val *ExperimentDatasetComparisonResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentDatasetComparisonResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentDatasetComparisonResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentDatasetComparisonResponse(val *ExperimentDatasetComparisonResponse) *NullableExperimentDatasetComparisonResponse { + return &NullableExperimentDatasetComparisonResponse{value: val, isSet: true} +} + +func (v NullableExperimentDatasetComparisonResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentDatasetComparisonResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_dataset_comparison_result.go b/go/futureagi/model_experiment_dataset_comparison_result.go new file mode 100644 index 0000000..70d4301 --- /dev/null +++ b/go/futureagi/model_experiment_dataset_comparison_result.go @@ -0,0 +1,277 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentDatasetComparisonResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentDatasetComparisonResult{} + +// ExperimentDatasetComparisonResult struct for ExperimentDatasetComparisonResult +type ExperimentDatasetComparisonResult struct { + ExperimentId string `json:"experiment_id"` + ExperimentName string `json:"experiment_name"` + TotalDatasets int32 `json:"total_datasets"` + WeightsApplied map[string]interface{} `json:"weights_applied,omitempty"` + DatasetComparisons []ExperimentComparisonDatasetMetric `json:"dataset_comparisons"` +} + +type _ExperimentDatasetComparisonResult ExperimentDatasetComparisonResult + +// NewExperimentDatasetComparisonResult instantiates a new ExperimentDatasetComparisonResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentDatasetComparisonResult(experimentId string, experimentName string, totalDatasets int32, datasetComparisons []ExperimentComparisonDatasetMetric) *ExperimentDatasetComparisonResult { + this := ExperimentDatasetComparisonResult{} + this.ExperimentId = experimentId + this.ExperimentName = experimentName + this.TotalDatasets = totalDatasets + this.DatasetComparisons = datasetComparisons + return &this +} + +// NewExperimentDatasetComparisonResultWithDefaults instantiates a new ExperimentDatasetComparisonResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentDatasetComparisonResultWithDefaults() *ExperimentDatasetComparisonResult { + this := ExperimentDatasetComparisonResult{} + return &this +} + +// GetExperimentId returns the ExperimentId field value +func (o *ExperimentDatasetComparisonResult) GetExperimentId() string { + if o == nil { + var ret string + return ret + } + + return o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value +// and a boolean to check if the value has been set. +func (o *ExperimentDatasetComparisonResult) GetExperimentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExperimentId, true +} + +// SetExperimentId sets field value +func (o *ExperimentDatasetComparisonResult) SetExperimentId(v string) { + o.ExperimentId = v +} + +// GetExperimentName returns the ExperimentName field value +func (o *ExperimentDatasetComparisonResult) GetExperimentName() string { + if o == nil { + var ret string + return ret + } + + return o.ExperimentName +} + +// GetExperimentNameOk returns a tuple with the ExperimentName field value +// and a boolean to check if the value has been set. +func (o *ExperimentDatasetComparisonResult) GetExperimentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExperimentName, true +} + +// SetExperimentName sets field value +func (o *ExperimentDatasetComparisonResult) SetExperimentName(v string) { + o.ExperimentName = v +} + +// GetTotalDatasets returns the TotalDatasets field value +func (o *ExperimentDatasetComparisonResult) GetTotalDatasets() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalDatasets +} + +// GetTotalDatasetsOk returns a tuple with the TotalDatasets field value +// and a boolean to check if the value has been set. +func (o *ExperimentDatasetComparisonResult) GetTotalDatasetsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalDatasets, true +} + +// SetTotalDatasets sets field value +func (o *ExperimentDatasetComparisonResult) SetTotalDatasets(v int32) { + o.TotalDatasets = v +} + +// GetWeightsApplied returns the WeightsApplied field value if set, zero value otherwise. +func (o *ExperimentDatasetComparisonResult) GetWeightsApplied() map[string]interface{} { + if o == nil || IsNil(o.WeightsApplied) { + var ret map[string]interface{} + return ret + } + return o.WeightsApplied +} + +// GetWeightsAppliedOk returns a tuple with the WeightsApplied field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDatasetComparisonResult) GetWeightsAppliedOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.WeightsApplied) { + return map[string]interface{}{}, false + } + return o.WeightsApplied, true +} + +// HasWeightsApplied returns a boolean if a field has been set. +func (o *ExperimentDatasetComparisonResult) HasWeightsApplied() bool { + if o != nil && !IsNil(o.WeightsApplied) { + return true + } + + return false +} + +// SetWeightsApplied gets a reference to the given map[string]interface{} and assigns it to the WeightsApplied field. +func (o *ExperimentDatasetComparisonResult) SetWeightsApplied(v map[string]interface{}) { + o.WeightsApplied = v +} + +// GetDatasetComparisons returns the DatasetComparisons field value +func (o *ExperimentDatasetComparisonResult) GetDatasetComparisons() []ExperimentComparisonDatasetMetric { + if o == nil { + var ret []ExperimentComparisonDatasetMetric + return ret + } + + return o.DatasetComparisons +} + +// GetDatasetComparisonsOk returns a tuple with the DatasetComparisons field value +// and a boolean to check if the value has been set. +func (o *ExperimentDatasetComparisonResult) GetDatasetComparisonsOk() ([]ExperimentComparisonDatasetMetric, bool) { + if o == nil { + return nil, false + } + return o.DatasetComparisons, true +} + +// SetDatasetComparisons sets field value +func (o *ExperimentDatasetComparisonResult) SetDatasetComparisons(v []ExperimentComparisonDatasetMetric) { + o.DatasetComparisons = v +} + +func (o ExperimentDatasetComparisonResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentDatasetComparisonResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["experiment_id"] = o.ExperimentId + toSerialize["experiment_name"] = o.ExperimentName + toSerialize["total_datasets"] = o.TotalDatasets + if !IsNil(o.WeightsApplied) { + toSerialize["weights_applied"] = o.WeightsApplied + } + toSerialize["dataset_comparisons"] = o.DatasetComparisons + return toSerialize, nil +} + +func (o *ExperimentDatasetComparisonResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "experiment_id", + "experiment_name", + "total_datasets", + "dataset_comparisons", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentDatasetComparisonResult := _ExperimentDatasetComparisonResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentDatasetComparisonResult) + + if err != nil { + return err + } + + *o = ExperimentDatasetComparisonResult(varExperimentDatasetComparisonResult) + + return err +} + +type NullableExperimentDatasetComparisonResult struct { + value *ExperimentDatasetComparisonResult + isSet bool +} + +func (v NullableExperimentDatasetComparisonResult) Get() *ExperimentDatasetComparisonResult { + return v.value +} + +func (v *NullableExperimentDatasetComparisonResult) Set(val *ExperimentDatasetComparisonResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentDatasetComparisonResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentDatasetComparisonResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentDatasetComparisonResult(val *ExperimentDatasetComparisonResult) *NullableExperimentDatasetComparisonResult { + return &NullableExperimentDatasetComparisonResult{value: val, isSet: true} +} + +func (v NullableExperimentDatasetComparisonResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentDatasetComparisonResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_derived_variables_response.go b/go/futureagi/model_experiment_derived_variables_response.go new file mode 100644 index 0000000..cba3b0f --- /dev/null +++ b/go/futureagi/model_experiment_derived_variables_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentDerivedVariablesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentDerivedVariablesResponse{} + +// ExperimentDerivedVariablesResponse struct for ExperimentDerivedVariablesResponse +type ExperimentDerivedVariablesResponse struct { + Status bool `json:"status"` + Result ExperimentDerivedVariablesResult `json:"result"` +} + +type _ExperimentDerivedVariablesResponse ExperimentDerivedVariablesResponse + +// NewExperimentDerivedVariablesResponse instantiates a new ExperimentDerivedVariablesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentDerivedVariablesResponse(status bool, result ExperimentDerivedVariablesResult) *ExperimentDerivedVariablesResponse { + this := ExperimentDerivedVariablesResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentDerivedVariablesResponseWithDefaults instantiates a new ExperimentDerivedVariablesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentDerivedVariablesResponseWithDefaults() *ExperimentDerivedVariablesResponse { + this := ExperimentDerivedVariablesResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentDerivedVariablesResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentDerivedVariablesResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentDerivedVariablesResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentDerivedVariablesResponse) GetResult() ExperimentDerivedVariablesResult { + if o == nil { + var ret ExperimentDerivedVariablesResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentDerivedVariablesResponse) GetResultOk() (*ExperimentDerivedVariablesResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentDerivedVariablesResponse) SetResult(v ExperimentDerivedVariablesResult) { + o.Result = v +} + +func (o ExperimentDerivedVariablesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentDerivedVariablesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentDerivedVariablesResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentDerivedVariablesResponse := _ExperimentDerivedVariablesResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentDerivedVariablesResponse) + + if err != nil { + return err + } + + *o = ExperimentDerivedVariablesResponse(varExperimentDerivedVariablesResponse) + + return err +} + +type NullableExperimentDerivedVariablesResponse struct { + value *ExperimentDerivedVariablesResponse + isSet bool +} + +func (v NullableExperimentDerivedVariablesResponse) Get() *ExperimentDerivedVariablesResponse { + return v.value +} + +func (v *NullableExperimentDerivedVariablesResponse) Set(val *ExperimentDerivedVariablesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentDerivedVariablesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentDerivedVariablesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentDerivedVariablesResponse(val *ExperimentDerivedVariablesResponse) *NullableExperimentDerivedVariablesResponse { + return &NullableExperimentDerivedVariablesResponse{value: val, isSet: true} +} + +func (v NullableExperimentDerivedVariablesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentDerivedVariablesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_derived_variables_result.go b/go/futureagi/model_experiment_derived_variables_result.go new file mode 100644 index 0000000..0733f20 --- /dev/null +++ b/go/futureagi/model_experiment_derived_variables_result.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentDerivedVariablesResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentDerivedVariablesResult{} + +// ExperimentDerivedVariablesResult struct for ExperimentDerivedVariablesResult +type ExperimentDerivedVariablesResult struct { + Version *string `json:"version,omitempty"` + DerivedVariables *map[string][]string `json:"derived_variables,omitempty"` +} + +// NewExperimentDerivedVariablesResult instantiates a new ExperimentDerivedVariablesResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentDerivedVariablesResult() *ExperimentDerivedVariablesResult { + this := ExperimentDerivedVariablesResult{} + return &this +} + +// NewExperimentDerivedVariablesResultWithDefaults instantiates a new ExperimentDerivedVariablesResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentDerivedVariablesResultWithDefaults() *ExperimentDerivedVariablesResult { + this := ExperimentDerivedVariablesResult{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *ExperimentDerivedVariablesResult) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDerivedVariablesResult) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *ExperimentDerivedVariablesResult) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *ExperimentDerivedVariablesResult) SetVersion(v string) { + o.Version = &v +} + +// GetDerivedVariables returns the DerivedVariables field value if set, zero value otherwise. +func (o *ExperimentDerivedVariablesResult) GetDerivedVariables() map[string][]string { + if o == nil || IsNil(o.DerivedVariables) { + var ret map[string][]string + return ret + } + return *o.DerivedVariables +} + +// GetDerivedVariablesOk returns a tuple with the DerivedVariables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDerivedVariablesResult) GetDerivedVariablesOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.DerivedVariables) { + return nil, false + } + return o.DerivedVariables, true +} + +// HasDerivedVariables returns a boolean if a field has been set. +func (o *ExperimentDerivedVariablesResult) HasDerivedVariables() bool { + if o != nil && !IsNil(o.DerivedVariables) { + return true + } + + return false +} + +// SetDerivedVariables gets a reference to the given map[string][]string and assigns it to the DerivedVariables field. +func (o *ExperimentDerivedVariablesResult) SetDerivedVariables(v map[string][]string) { + o.DerivedVariables = &v +} + +func (o ExperimentDerivedVariablesResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentDerivedVariablesResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.DerivedVariables) { + toSerialize["derived_variables"] = o.DerivedVariables + } + return toSerialize, nil +} + +type NullableExperimentDerivedVariablesResult struct { + value *ExperimentDerivedVariablesResult + isSet bool +} + +func (v NullableExperimentDerivedVariablesResult) Get() *ExperimentDerivedVariablesResult { + return v.value +} + +func (v *NullableExperimentDerivedVariablesResult) Set(val *ExperimentDerivedVariablesResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentDerivedVariablesResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentDerivedVariablesResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentDerivedVariablesResult(val *ExperimentDerivedVariablesResult) *NullableExperimentDerivedVariablesResult { + return &NullableExperimentDerivedVariablesResult{value: val, isSet: true} +} + +func (v NullableExperimentDerivedVariablesResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentDerivedVariablesResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_detail_v2.go b/go/futureagi/model_experiment_detail_v2.go new file mode 100644 index 0000000..5c9f453 --- /dev/null +++ b/go/futureagi/model_experiment_detail_v2.go @@ -0,0 +1,541 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ExperimentDetailV2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentDetailV2{} + +// ExperimentDetailV2 struct for ExperimentDetailV2 +type ExperimentDetailV2 struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + DatasetId *string `json:"dataset_id,omitempty"` + ColumnId NullableString `json:"column_id,omitempty"` + // Determines how the experiment executes: llm, tts, stt, or image. + ExperimentType *string `json:"experiment_type,omitempty"` + Status *string `json:"status,omitempty"` + SnapshotDatasetId NullableString `json:"snapshot_dataset_id,omitempty"` + PromptConfigs *string `json:"prompt_configs,omitempty"` + AgentConfigs *string `json:"agent_configs,omitempty"` + UserEvalMetrics *string `json:"user_eval_metrics,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +type _ExperimentDetailV2 ExperimentDetailV2 + +// NewExperimentDetailV2 instantiates a new ExperimentDetailV2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentDetailV2(name string) *ExperimentDetailV2 { + this := ExperimentDetailV2{} + this.Name = name + return &this +} + +// NewExperimentDetailV2WithDefaults instantiates a new ExperimentDetailV2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentDetailV2WithDefaults() *ExperimentDetailV2 { + this := ExperimentDetailV2{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ExperimentDetailV2) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *ExperimentDetailV2) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExperimentDetailV2) SetName(v string) { + o.Name = v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *ExperimentDetailV2) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetColumnId returns the ColumnId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentDetailV2) GetColumnId() string { + if o == nil || IsNil(o.ColumnId.Get()) { + var ret string + return ret + } + return *o.ColumnId.Get() +} + +// GetColumnIdOk returns a tuple with the ColumnId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentDetailV2) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ColumnId.Get(), o.ColumnId.IsSet() +} + +// HasColumnId returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasColumnId() bool { + if o != nil && o.ColumnId.IsSet() { + return true + } + + return false +} + +// SetColumnId gets a reference to the given NullableString and assigns it to the ColumnId field. +func (o *ExperimentDetailV2) SetColumnId(v string) { + o.ColumnId.Set(&v) +} + +// SetColumnIdNil sets the value for ColumnId to be an explicit nil +func (o *ExperimentDetailV2) SetColumnIdNil() { + o.ColumnId.Set(nil) +} + +// UnsetColumnId ensures that no value is present for ColumnId, not even an explicit nil +func (o *ExperimentDetailV2) UnsetColumnId() { + o.ColumnId.Unset() +} + +// GetExperimentType returns the ExperimentType field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetExperimentType() string { + if o == nil || IsNil(o.ExperimentType) { + var ret string + return ret + } + return *o.ExperimentType +} + +// GetExperimentTypeOk returns a tuple with the ExperimentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetExperimentTypeOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentType) { + return nil, false + } + return o.ExperimentType, true +} + +// HasExperimentType returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasExperimentType() bool { + if o != nil && !IsNil(o.ExperimentType) { + return true + } + + return false +} + +// SetExperimentType gets a reference to the given string and assigns it to the ExperimentType field. +func (o *ExperimentDetailV2) SetExperimentType(v string) { + o.ExperimentType = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExperimentDetailV2) SetStatus(v string) { + o.Status = &v +} + +// GetSnapshotDatasetId returns the SnapshotDatasetId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentDetailV2) GetSnapshotDatasetId() string { + if o == nil || IsNil(o.SnapshotDatasetId.Get()) { + var ret string + return ret + } + return *o.SnapshotDatasetId.Get() +} + +// GetSnapshotDatasetIdOk returns a tuple with the SnapshotDatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentDetailV2) GetSnapshotDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SnapshotDatasetId.Get(), o.SnapshotDatasetId.IsSet() +} + +// HasSnapshotDatasetId returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasSnapshotDatasetId() bool { + if o != nil && o.SnapshotDatasetId.IsSet() { + return true + } + + return false +} + +// SetSnapshotDatasetId gets a reference to the given NullableString and assigns it to the SnapshotDatasetId field. +func (o *ExperimentDetailV2) SetSnapshotDatasetId(v string) { + o.SnapshotDatasetId.Set(&v) +} + +// SetSnapshotDatasetIdNil sets the value for SnapshotDatasetId to be an explicit nil +func (o *ExperimentDetailV2) SetSnapshotDatasetIdNil() { + o.SnapshotDatasetId.Set(nil) +} + +// UnsetSnapshotDatasetId ensures that no value is present for SnapshotDatasetId, not even an explicit nil +func (o *ExperimentDetailV2) UnsetSnapshotDatasetId() { + o.SnapshotDatasetId.Unset() +} + +// GetPromptConfigs returns the PromptConfigs field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetPromptConfigs() string { + if o == nil || IsNil(o.PromptConfigs) { + var ret string + return ret + } + return *o.PromptConfigs +} + +// GetPromptConfigsOk returns a tuple with the PromptConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetPromptConfigsOk() (*string, bool) { + if o == nil || IsNil(o.PromptConfigs) { + return nil, false + } + return o.PromptConfigs, true +} + +// HasPromptConfigs returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasPromptConfigs() bool { + if o != nil && !IsNil(o.PromptConfigs) { + return true + } + + return false +} + +// SetPromptConfigs gets a reference to the given string and assigns it to the PromptConfigs field. +func (o *ExperimentDetailV2) SetPromptConfigs(v string) { + o.PromptConfigs = &v +} + +// GetAgentConfigs returns the AgentConfigs field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetAgentConfigs() string { + if o == nil || IsNil(o.AgentConfigs) { + var ret string + return ret + } + return *o.AgentConfigs +} + +// GetAgentConfigsOk returns a tuple with the AgentConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetAgentConfigsOk() (*string, bool) { + if o == nil || IsNil(o.AgentConfigs) { + return nil, false + } + return o.AgentConfigs, true +} + +// HasAgentConfigs returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasAgentConfigs() bool { + if o != nil && !IsNil(o.AgentConfigs) { + return true + } + + return false +} + +// SetAgentConfigs gets a reference to the given string and assigns it to the AgentConfigs field. +func (o *ExperimentDetailV2) SetAgentConfigs(v string) { + o.AgentConfigs = &v +} + +// GetUserEvalMetrics returns the UserEvalMetrics field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetUserEvalMetrics() string { + if o == nil || IsNil(o.UserEvalMetrics) { + var ret string + return ret + } + return *o.UserEvalMetrics +} + +// GetUserEvalMetricsOk returns a tuple with the UserEvalMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetUserEvalMetricsOk() (*string, bool) { + if o == nil || IsNil(o.UserEvalMetrics) { + return nil, false + } + return o.UserEvalMetrics, true +} + +// HasUserEvalMetrics returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasUserEvalMetrics() bool { + if o != nil && !IsNil(o.UserEvalMetrics) { + return true + } + + return false +} + +// SetUserEvalMetrics gets a reference to the given string and assigns it to the UserEvalMetrics field. +func (o *ExperimentDetailV2) SetUserEvalMetrics(v string) { + o.UserEvalMetrics = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ExperimentDetailV2) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentDetailV2) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ExperimentDetailV2) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ExperimentDetailV2) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o ExperimentDetailV2) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentDetailV2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if o.ColumnId.IsSet() { + toSerialize["column_id"] = o.ColumnId.Get() + } + if !IsNil(o.ExperimentType) { + toSerialize["experiment_type"] = o.ExperimentType + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.SnapshotDatasetId.IsSet() { + toSerialize["snapshot_dataset_id"] = o.SnapshotDatasetId.Get() + } + if !IsNil(o.PromptConfigs) { + toSerialize["prompt_configs"] = o.PromptConfigs + } + if !IsNil(o.AgentConfigs) { + toSerialize["agent_configs"] = o.AgentConfigs + } + if !IsNil(o.UserEvalMetrics) { + toSerialize["user_eval_metrics"] = o.UserEvalMetrics + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *ExperimentDetailV2) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentDetailV2 := _ExperimentDetailV2{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentDetailV2) + + if err != nil { + return err + } + + *o = ExperimentDetailV2(varExperimentDetailV2) + + return err +} + +type NullableExperimentDetailV2 struct { + value *ExperimentDetailV2 + isSet bool +} + +func (v NullableExperimentDetailV2) Get() *ExperimentDetailV2 { + return v.value +} + +func (v *NullableExperimentDetailV2) Set(val *ExperimentDetailV2) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentDetailV2) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentDetailV2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentDetailV2(val *ExperimentDetailV2) *NullableExperimentDetailV2 { + return &NullableExperimentDetailV2{value: val, isSet: true} +} + +func (v NullableExperimentDetailV2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentDetailV2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_evaluation_column_stats.go b/go/futureagi/model_experiment_evaluation_column_stats.go new file mode 100644 index 0000000..abcdfb0 --- /dev/null +++ b/go/futureagi/model_experiment_evaluation_column_stats.go @@ -0,0 +1,333 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentEvaluationColumnStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentEvaluationColumnStats{} + +// ExperimentEvaluationColumnStats struct for ExperimentEvaluationColumnStats +type ExperimentEvaluationColumnStats struct { + ColumnName string `json:"column_name"` + ColumnId string `json:"column_id"` + TotalRows int32 `json:"total_rows"` + SuccessRate float32 `json:"success_rate"` + AvgResponseTime float32 `json:"avg_response_time"` + TokenUsage ExperimentEvaluationTokenUsage `json:"token_usage"` + AvgScore map[string]interface{} `json:"avg_score,omitempty"` +} + +type _ExperimentEvaluationColumnStats ExperimentEvaluationColumnStats + +// NewExperimentEvaluationColumnStats instantiates a new ExperimentEvaluationColumnStats object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentEvaluationColumnStats(columnName string, columnId string, totalRows int32, successRate float32, avgResponseTime float32, tokenUsage ExperimentEvaluationTokenUsage) *ExperimentEvaluationColumnStats { + this := ExperimentEvaluationColumnStats{} + this.ColumnName = columnName + this.ColumnId = columnId + this.TotalRows = totalRows + this.SuccessRate = successRate + this.AvgResponseTime = avgResponseTime + this.TokenUsage = tokenUsage + return &this +} + +// NewExperimentEvaluationColumnStatsWithDefaults instantiates a new ExperimentEvaluationColumnStats object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentEvaluationColumnStatsWithDefaults() *ExperimentEvaluationColumnStats { + this := ExperimentEvaluationColumnStats{} + return &this +} + +// GetColumnName returns the ColumnName field value +func (o *ExperimentEvaluationColumnStats) GetColumnName() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnName +} + +// GetColumnNameOk returns a tuple with the ColumnName field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationColumnStats) GetColumnNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnName, true +} + +// SetColumnName sets field value +func (o *ExperimentEvaluationColumnStats) SetColumnName(v string) { + o.ColumnName = v +} + +// GetColumnId returns the ColumnId field value +func (o *ExperimentEvaluationColumnStats) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationColumnStats) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *ExperimentEvaluationColumnStats) SetColumnId(v string) { + o.ColumnId = v +} + +// GetTotalRows returns the TotalRows field value +func (o *ExperimentEvaluationColumnStats) GetTotalRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalRows +} + +// GetTotalRowsOk returns a tuple with the TotalRows field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationColumnStats) GetTotalRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalRows, true +} + +// SetTotalRows sets field value +func (o *ExperimentEvaluationColumnStats) SetTotalRows(v int32) { + o.TotalRows = v +} + +// GetSuccessRate returns the SuccessRate field value +func (o *ExperimentEvaluationColumnStats) GetSuccessRate() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.SuccessRate +} + +// GetSuccessRateOk returns a tuple with the SuccessRate field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationColumnStats) GetSuccessRateOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.SuccessRate, true +} + +// SetSuccessRate sets field value +func (o *ExperimentEvaluationColumnStats) SetSuccessRate(v float32) { + o.SuccessRate = v +} + +// GetAvgResponseTime returns the AvgResponseTime field value +func (o *ExperimentEvaluationColumnStats) GetAvgResponseTime() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgResponseTime +} + +// GetAvgResponseTimeOk returns a tuple with the AvgResponseTime field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationColumnStats) GetAvgResponseTimeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgResponseTime, true +} + +// SetAvgResponseTime sets field value +func (o *ExperimentEvaluationColumnStats) SetAvgResponseTime(v float32) { + o.AvgResponseTime = v +} + +// GetTokenUsage returns the TokenUsage field value +func (o *ExperimentEvaluationColumnStats) GetTokenUsage() ExperimentEvaluationTokenUsage { + if o == nil { + var ret ExperimentEvaluationTokenUsage + return ret + } + + return o.TokenUsage +} + +// GetTokenUsageOk returns a tuple with the TokenUsage field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationColumnStats) GetTokenUsageOk() (*ExperimentEvaluationTokenUsage, bool) { + if o == nil { + return nil, false + } + return &o.TokenUsage, true +} + +// SetTokenUsage sets field value +func (o *ExperimentEvaluationColumnStats) SetTokenUsage(v ExperimentEvaluationTokenUsage) { + o.TokenUsage = v +} + +// GetAvgScore returns the AvgScore field value if set, zero value otherwise. +func (o *ExperimentEvaluationColumnStats) GetAvgScore() map[string]interface{} { + if o == nil || IsNil(o.AvgScore) { + var ret map[string]interface{} + return ret + } + return o.AvgScore +} + +// GetAvgScoreOk returns a tuple with the AvgScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationColumnStats) GetAvgScoreOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.AvgScore) { + return map[string]interface{}{}, false + } + return o.AvgScore, true +} + +// HasAvgScore returns a boolean if a field has been set. +func (o *ExperimentEvaluationColumnStats) HasAvgScore() bool { + if o != nil && !IsNil(o.AvgScore) { + return true + } + + return false +} + +// SetAvgScore gets a reference to the given map[string]interface{} and assigns it to the AvgScore field. +func (o *ExperimentEvaluationColumnStats) SetAvgScore(v map[string]interface{}) { + o.AvgScore = v +} + +func (o ExperimentEvaluationColumnStats) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentEvaluationColumnStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_name"] = o.ColumnName + toSerialize["column_id"] = o.ColumnId + toSerialize["total_rows"] = o.TotalRows + toSerialize["success_rate"] = o.SuccessRate + toSerialize["avg_response_time"] = o.AvgResponseTime + toSerialize["token_usage"] = o.TokenUsage + if !IsNil(o.AvgScore) { + toSerialize["avg_score"] = o.AvgScore + } + return toSerialize, nil +} + +func (o *ExperimentEvaluationColumnStats) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_name", + "column_id", + "total_rows", + "success_rate", + "avg_response_time", + "token_usage", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentEvaluationColumnStats := _ExperimentEvaluationColumnStats{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentEvaluationColumnStats) + + if err != nil { + return err + } + + *o = ExperimentEvaluationColumnStats(varExperimentEvaluationColumnStats) + + return err +} + +type NullableExperimentEvaluationColumnStats struct { + value *ExperimentEvaluationColumnStats + isSet bool +} + +func (v NullableExperimentEvaluationColumnStats) Get() *ExperimentEvaluationColumnStats { + return v.value +} + +func (v *NullableExperimentEvaluationColumnStats) Set(val *ExperimentEvaluationColumnStats) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentEvaluationColumnStats) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentEvaluationColumnStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentEvaluationColumnStats(val *ExperimentEvaluationColumnStats) *NullableExperimentEvaluationColumnStats { + return &NullableExperimentEvaluationColumnStats{value: val, isSet: true} +} + +func (v NullableExperimentEvaluationColumnStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentEvaluationColumnStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_evaluation_stats_response.go b/go/futureagi/model_experiment_evaluation_stats_response.go new file mode 100644 index 0000000..116377a --- /dev/null +++ b/go/futureagi/model_experiment_evaluation_stats_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentEvaluationStatsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentEvaluationStatsResponse{} + +// ExperimentEvaluationStatsResponse struct for ExperimentEvaluationStatsResponse +type ExperimentEvaluationStatsResponse struct { + Status bool `json:"status"` + Result ExperimentEvaluationStatsResult `json:"result"` +} + +type _ExperimentEvaluationStatsResponse ExperimentEvaluationStatsResponse + +// NewExperimentEvaluationStatsResponse instantiates a new ExperimentEvaluationStatsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentEvaluationStatsResponse(status bool, result ExperimentEvaluationStatsResult) *ExperimentEvaluationStatsResponse { + this := ExperimentEvaluationStatsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentEvaluationStatsResponseWithDefaults instantiates a new ExperimentEvaluationStatsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentEvaluationStatsResponseWithDefaults() *ExperimentEvaluationStatsResponse { + this := ExperimentEvaluationStatsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentEvaluationStatsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentEvaluationStatsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentEvaluationStatsResponse) GetResult() ExperimentEvaluationStatsResult { + if o == nil { + var ret ExperimentEvaluationStatsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResponse) GetResultOk() (*ExperimentEvaluationStatsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentEvaluationStatsResponse) SetResult(v ExperimentEvaluationStatsResult) { + o.Result = v +} + +func (o ExperimentEvaluationStatsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentEvaluationStatsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentEvaluationStatsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentEvaluationStatsResponse := _ExperimentEvaluationStatsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentEvaluationStatsResponse) + + if err != nil { + return err + } + + *o = ExperimentEvaluationStatsResponse(varExperimentEvaluationStatsResponse) + + return err +} + +type NullableExperimentEvaluationStatsResponse struct { + value *ExperimentEvaluationStatsResponse + isSet bool +} + +func (v NullableExperimentEvaluationStatsResponse) Get() *ExperimentEvaluationStatsResponse { + return v.value +} + +func (v *NullableExperimentEvaluationStatsResponse) Set(val *ExperimentEvaluationStatsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentEvaluationStatsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentEvaluationStatsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentEvaluationStatsResponse(val *ExperimentEvaluationStatsResponse) *NullableExperimentEvaluationStatsResponse { + return &NullableExperimentEvaluationStatsResponse{value: val, isSet: true} +} + +func (v NullableExperimentEvaluationStatsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentEvaluationStatsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_evaluation_stats_result.go b/go/futureagi/model_experiment_evaluation_stats_result.go new file mode 100644 index 0000000..a0b06b9 --- /dev/null +++ b/go/futureagi/model_experiment_evaluation_stats_result.go @@ -0,0 +1,353 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentEvaluationStatsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentEvaluationStatsResult{} + +// ExperimentEvaluationStatsResult struct for ExperimentEvaluationStatsResult +type ExperimentEvaluationStatsResult struct { + ExperimentId string `json:"experiment_id"` + ExperimentName string `json:"experiment_name"` + EvaluationId string `json:"evaluation_id"` + EvaluationName string `json:"evaluation_name"` + EvaluationTemplateId string `json:"evaluation_template_id"` + DatasetId string `json:"dataset_id"` + DatasetName string `json:"dataset_name"` + EvaluationColumns []ExperimentEvaluationColumnStats `json:"evaluation_columns"` +} + +type _ExperimentEvaluationStatsResult ExperimentEvaluationStatsResult + +// NewExperimentEvaluationStatsResult instantiates a new ExperimentEvaluationStatsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentEvaluationStatsResult(experimentId string, experimentName string, evaluationId string, evaluationName string, evaluationTemplateId string, datasetId string, datasetName string, evaluationColumns []ExperimentEvaluationColumnStats) *ExperimentEvaluationStatsResult { + this := ExperimentEvaluationStatsResult{} + this.ExperimentId = experimentId + this.ExperimentName = experimentName + this.EvaluationId = evaluationId + this.EvaluationName = evaluationName + this.EvaluationTemplateId = evaluationTemplateId + this.DatasetId = datasetId + this.DatasetName = datasetName + this.EvaluationColumns = evaluationColumns + return &this +} + +// NewExperimentEvaluationStatsResultWithDefaults instantiates a new ExperimentEvaluationStatsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentEvaluationStatsResultWithDefaults() *ExperimentEvaluationStatsResult { + this := ExperimentEvaluationStatsResult{} + return &this +} + +// GetExperimentId returns the ExperimentId field value +func (o *ExperimentEvaluationStatsResult) GetExperimentId() string { + if o == nil { + var ret string + return ret + } + + return o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetExperimentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExperimentId, true +} + +// SetExperimentId sets field value +func (o *ExperimentEvaluationStatsResult) SetExperimentId(v string) { + o.ExperimentId = v +} + +// GetExperimentName returns the ExperimentName field value +func (o *ExperimentEvaluationStatsResult) GetExperimentName() string { + if o == nil { + var ret string + return ret + } + + return o.ExperimentName +} + +// GetExperimentNameOk returns a tuple with the ExperimentName field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetExperimentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExperimentName, true +} + +// SetExperimentName sets field value +func (o *ExperimentEvaluationStatsResult) SetExperimentName(v string) { + o.ExperimentName = v +} + +// GetEvaluationId returns the EvaluationId field value +func (o *ExperimentEvaluationStatsResult) GetEvaluationId() string { + if o == nil { + var ret string + return ret + } + + return o.EvaluationId +} + +// GetEvaluationIdOk returns a tuple with the EvaluationId field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetEvaluationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvaluationId, true +} + +// SetEvaluationId sets field value +func (o *ExperimentEvaluationStatsResult) SetEvaluationId(v string) { + o.EvaluationId = v +} + +// GetEvaluationName returns the EvaluationName field value +func (o *ExperimentEvaluationStatsResult) GetEvaluationName() string { + if o == nil { + var ret string + return ret + } + + return o.EvaluationName +} + +// GetEvaluationNameOk returns a tuple with the EvaluationName field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetEvaluationNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvaluationName, true +} + +// SetEvaluationName sets field value +func (o *ExperimentEvaluationStatsResult) SetEvaluationName(v string) { + o.EvaluationName = v +} + +// GetEvaluationTemplateId returns the EvaluationTemplateId field value +func (o *ExperimentEvaluationStatsResult) GetEvaluationTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.EvaluationTemplateId +} + +// GetEvaluationTemplateIdOk returns a tuple with the EvaluationTemplateId field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetEvaluationTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvaluationTemplateId, true +} + +// SetEvaluationTemplateId sets field value +func (o *ExperimentEvaluationStatsResult) SetEvaluationTemplateId(v string) { + o.EvaluationTemplateId = v +} + +// GetDatasetId returns the DatasetId field value +func (o *ExperimentEvaluationStatsResult) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *ExperimentEvaluationStatsResult) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetDatasetName returns the DatasetName field value +func (o *ExperimentEvaluationStatsResult) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *ExperimentEvaluationStatsResult) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetEvaluationColumns returns the EvaluationColumns field value +func (o *ExperimentEvaluationStatsResult) GetEvaluationColumns() []ExperimentEvaluationColumnStats { + if o == nil { + var ret []ExperimentEvaluationColumnStats + return ret + } + + return o.EvaluationColumns +} + +// GetEvaluationColumnsOk returns a tuple with the EvaluationColumns field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationStatsResult) GetEvaluationColumnsOk() ([]ExperimentEvaluationColumnStats, bool) { + if o == nil { + return nil, false + } + return o.EvaluationColumns, true +} + +// SetEvaluationColumns sets field value +func (o *ExperimentEvaluationStatsResult) SetEvaluationColumns(v []ExperimentEvaluationColumnStats) { + o.EvaluationColumns = v +} + +func (o ExperimentEvaluationStatsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentEvaluationStatsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["experiment_id"] = o.ExperimentId + toSerialize["experiment_name"] = o.ExperimentName + toSerialize["evaluation_id"] = o.EvaluationId + toSerialize["evaluation_name"] = o.EvaluationName + toSerialize["evaluation_template_id"] = o.EvaluationTemplateId + toSerialize["dataset_id"] = o.DatasetId + toSerialize["dataset_name"] = o.DatasetName + toSerialize["evaluation_columns"] = o.EvaluationColumns + return toSerialize, nil +} + +func (o *ExperimentEvaluationStatsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "experiment_id", + "experiment_name", + "evaluation_id", + "evaluation_name", + "evaluation_template_id", + "dataset_id", + "dataset_name", + "evaluation_columns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentEvaluationStatsResult := _ExperimentEvaluationStatsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentEvaluationStatsResult) + + if err != nil { + return err + } + + *o = ExperimentEvaluationStatsResult(varExperimentEvaluationStatsResult) + + return err +} + +type NullableExperimentEvaluationStatsResult struct { + value *ExperimentEvaluationStatsResult + isSet bool +} + +func (v NullableExperimentEvaluationStatsResult) Get() *ExperimentEvaluationStatsResult { + return v.value +} + +func (v *NullableExperimentEvaluationStatsResult) Set(val *ExperimentEvaluationStatsResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentEvaluationStatsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentEvaluationStatsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentEvaluationStatsResult(val *ExperimentEvaluationStatsResult) *NullableExperimentEvaluationStatsResult { + return &NullableExperimentEvaluationStatsResult{value: val, isSet: true} +} + +func (v NullableExperimentEvaluationStatsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentEvaluationStatsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_evaluation_token_usage.go b/go/futureagi/model_experiment_evaluation_token_usage.go new file mode 100644 index 0000000..6fa888a --- /dev/null +++ b/go/futureagi/model_experiment_evaluation_token_usage.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentEvaluationTokenUsage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentEvaluationTokenUsage{} + +// ExperimentEvaluationTokenUsage struct for ExperimentEvaluationTokenUsage +type ExperimentEvaluationTokenUsage struct { + AvgCompletionTokens float32 `json:"avg_completion_tokens"` + AvgPromptTokens float32 `json:"avg_prompt_tokens"` + AvgTotalTokens float32 `json:"avg_total_tokens"` + TotalTokens int32 `json:"total_tokens"` +} + +type _ExperimentEvaluationTokenUsage ExperimentEvaluationTokenUsage + +// NewExperimentEvaluationTokenUsage instantiates a new ExperimentEvaluationTokenUsage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentEvaluationTokenUsage(avgCompletionTokens float32, avgPromptTokens float32, avgTotalTokens float32, totalTokens int32) *ExperimentEvaluationTokenUsage { + this := ExperimentEvaluationTokenUsage{} + this.AvgCompletionTokens = avgCompletionTokens + this.AvgPromptTokens = avgPromptTokens + this.AvgTotalTokens = avgTotalTokens + this.TotalTokens = totalTokens + return &this +} + +// NewExperimentEvaluationTokenUsageWithDefaults instantiates a new ExperimentEvaluationTokenUsage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentEvaluationTokenUsageWithDefaults() *ExperimentEvaluationTokenUsage { + this := ExperimentEvaluationTokenUsage{} + return &this +} + +// GetAvgCompletionTokens returns the AvgCompletionTokens field value +func (o *ExperimentEvaluationTokenUsage) GetAvgCompletionTokens() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgCompletionTokens +} + +// GetAvgCompletionTokensOk returns a tuple with the AvgCompletionTokens field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationTokenUsage) GetAvgCompletionTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgCompletionTokens, true +} + +// SetAvgCompletionTokens sets field value +func (o *ExperimentEvaluationTokenUsage) SetAvgCompletionTokens(v float32) { + o.AvgCompletionTokens = v +} + +// GetAvgPromptTokens returns the AvgPromptTokens field value +func (o *ExperimentEvaluationTokenUsage) GetAvgPromptTokens() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgPromptTokens +} + +// GetAvgPromptTokensOk returns a tuple with the AvgPromptTokens field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationTokenUsage) GetAvgPromptTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgPromptTokens, true +} + +// SetAvgPromptTokens sets field value +func (o *ExperimentEvaluationTokenUsage) SetAvgPromptTokens(v float32) { + o.AvgPromptTokens = v +} + +// GetAvgTotalTokens returns the AvgTotalTokens field value +func (o *ExperimentEvaluationTokenUsage) GetAvgTotalTokens() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgTotalTokens +} + +// GetAvgTotalTokensOk returns a tuple with the AvgTotalTokens field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationTokenUsage) GetAvgTotalTokensOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgTotalTokens, true +} + +// SetAvgTotalTokens sets field value +func (o *ExperimentEvaluationTokenUsage) SetAvgTotalTokens(v float32) { + o.AvgTotalTokens = v +} + +// GetTotalTokens returns the TotalTokens field value +func (o *ExperimentEvaluationTokenUsage) GetTotalTokens() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalTokens +} + +// GetTotalTokensOk returns a tuple with the TotalTokens field value +// and a boolean to check if the value has been set. +func (o *ExperimentEvaluationTokenUsage) GetTotalTokensOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalTokens, true +} + +// SetTotalTokens sets field value +func (o *ExperimentEvaluationTokenUsage) SetTotalTokens(v int32) { + o.TotalTokens = v +} + +func (o ExperimentEvaluationTokenUsage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentEvaluationTokenUsage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["avg_completion_tokens"] = o.AvgCompletionTokens + toSerialize["avg_prompt_tokens"] = o.AvgPromptTokens + toSerialize["avg_total_tokens"] = o.AvgTotalTokens + toSerialize["total_tokens"] = o.TotalTokens + return toSerialize, nil +} + +func (o *ExperimentEvaluationTokenUsage) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "avg_completion_tokens", + "avg_prompt_tokens", + "avg_total_tokens", + "total_tokens", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentEvaluationTokenUsage := _ExperimentEvaluationTokenUsage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentEvaluationTokenUsage) + + if err != nil { + return err + } + + *o = ExperimentEvaluationTokenUsage(varExperimentEvaluationTokenUsage) + + return err +} + +type NullableExperimentEvaluationTokenUsage struct { + value *ExperimentEvaluationTokenUsage + isSet bool +} + +func (v NullableExperimentEvaluationTokenUsage) Get() *ExperimentEvaluationTokenUsage { + return v.value +} + +func (v *NullableExperimentEvaluationTokenUsage) Set(val *ExperimentEvaluationTokenUsage) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentEvaluationTokenUsage) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentEvaluationTokenUsage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentEvaluationTokenUsage(val *ExperimentEvaluationTokenUsage) *NullableExperimentEvaluationTokenUsage { + return &NullableExperimentEvaluationTokenUsage{value: val, isSet: true} +} + +func (v NullableExperimentEvaluationTokenUsage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentEvaluationTokenUsage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_create_response.go b/go/futureagi/model_experiment_feedback_create_response.go new file mode 100644 index 0000000..707f217 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_create_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackCreateResponse{} + +// ExperimentFeedbackCreateResponse struct for ExperimentFeedbackCreateResponse +type ExperimentFeedbackCreateResponse struct { + Status bool `json:"status"` + Result ExperimentFeedbackCreateResult `json:"result"` +} + +type _ExperimentFeedbackCreateResponse ExperimentFeedbackCreateResponse + +// NewExperimentFeedbackCreateResponse instantiates a new ExperimentFeedbackCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackCreateResponse(status bool, result ExperimentFeedbackCreateResult) *ExperimentFeedbackCreateResponse { + this := ExperimentFeedbackCreateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentFeedbackCreateResponseWithDefaults instantiates a new ExperimentFeedbackCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackCreateResponseWithDefaults() *ExperimentFeedbackCreateResponse { + this := ExperimentFeedbackCreateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentFeedbackCreateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackCreateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentFeedbackCreateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentFeedbackCreateResponse) GetResult() ExperimentFeedbackCreateResult { + if o == nil { + var ret ExperimentFeedbackCreateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackCreateResponse) GetResultOk() (*ExperimentFeedbackCreateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentFeedbackCreateResponse) SetResult(v ExperimentFeedbackCreateResult) { + o.Result = v +} + +func (o ExperimentFeedbackCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentFeedbackCreateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackCreateResponse := _ExperimentFeedbackCreateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackCreateResponse) + + if err != nil { + return err + } + + *o = ExperimentFeedbackCreateResponse(varExperimentFeedbackCreateResponse) + + return err +} + +type NullableExperimentFeedbackCreateResponse struct { + value *ExperimentFeedbackCreateResponse + isSet bool +} + +func (v NullableExperimentFeedbackCreateResponse) Get() *ExperimentFeedbackCreateResponse { + return v.value +} + +func (v *NullableExperimentFeedbackCreateResponse) Set(val *ExperimentFeedbackCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackCreateResponse(val *ExperimentFeedbackCreateResponse) *NullableExperimentFeedbackCreateResponse { + return &NullableExperimentFeedbackCreateResponse{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_create_result.go b/go/futureagi/model_experiment_feedback_create_result.go new file mode 100644 index 0000000..9209e70 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_create_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackCreateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackCreateResult{} + +// ExperimentFeedbackCreateResult struct for ExperimentFeedbackCreateResult +type ExperimentFeedbackCreateResult struct { + Id string `json:"id"` +} + +type _ExperimentFeedbackCreateResult ExperimentFeedbackCreateResult + +// NewExperimentFeedbackCreateResult instantiates a new ExperimentFeedbackCreateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackCreateResult(id string) *ExperimentFeedbackCreateResult { + this := ExperimentFeedbackCreateResult{} + this.Id = id + return &this +} + +// NewExperimentFeedbackCreateResultWithDefaults instantiates a new ExperimentFeedbackCreateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackCreateResultWithDefaults() *ExperimentFeedbackCreateResult { + this := ExperimentFeedbackCreateResult{} + return &this +} + +// GetId returns the Id field value +func (o *ExperimentFeedbackCreateResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackCreateResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ExperimentFeedbackCreateResult) SetId(v string) { + o.Id = v +} + +func (o ExperimentFeedbackCreateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackCreateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *ExperimentFeedbackCreateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackCreateResult := _ExperimentFeedbackCreateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackCreateResult) + + if err != nil { + return err + } + + *o = ExperimentFeedbackCreateResult(varExperimentFeedbackCreateResult) + + return err +} + +type NullableExperimentFeedbackCreateResult struct { + value *ExperimentFeedbackCreateResult + isSet bool +} + +func (v NullableExperimentFeedbackCreateResult) Get() *ExperimentFeedbackCreateResult { + return v.value +} + +func (v *NullableExperimentFeedbackCreateResult) Set(val *ExperimentFeedbackCreateResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackCreateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackCreateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackCreateResult(val *ExperimentFeedbackCreateResult) *NullableExperimentFeedbackCreateResult { + return &NullableExperimentFeedbackCreateResult{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackCreateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackCreateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_detail_item.go b/go/futureagi/model_experiment_feedback_detail_item.go new file mode 100644 index 0000000..704f0de --- /dev/null +++ b/go/futureagi/model_experiment_feedback_detail_item.go @@ -0,0 +1,316 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ExperimentFeedbackDetailItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackDetailItem{} + +// ExperimentFeedbackDetailItem struct for ExperimentFeedbackDetailItem +type ExperimentFeedbackDetailItem struct { + Id string `json:"id"` + Value map[string]interface{} `json:"value,omitempty"` + Comment NullableString `json:"comment,omitempty"` + CreatedAt time.Time `json:"created_at"` + ActionType NullableString `json:"action_type,omitempty"` +} + +type _ExperimentFeedbackDetailItem ExperimentFeedbackDetailItem + +// NewExperimentFeedbackDetailItem instantiates a new ExperimentFeedbackDetailItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackDetailItem(id string, createdAt time.Time) *ExperimentFeedbackDetailItem { + this := ExperimentFeedbackDetailItem{} + this.Id = id + this.CreatedAt = createdAt + return &this +} + +// NewExperimentFeedbackDetailItemWithDefaults instantiates a new ExperimentFeedbackDetailItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackDetailItemWithDefaults() *ExperimentFeedbackDetailItem { + this := ExperimentFeedbackDetailItem{} + return &this +} + +// GetId returns the Id field value +func (o *ExperimentFeedbackDetailItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackDetailItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ExperimentFeedbackDetailItem) SetId(v string) { + o.Id = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ExperimentFeedbackDetailItem) GetValue() map[string]interface{} { + if o == nil || IsNil(o.Value) { + var ret map[string]interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackDetailItem) GetValueOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Value) { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ExperimentFeedbackDetailItem) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given map[string]interface{} and assigns it to the Value field. +func (o *ExperimentFeedbackDetailItem) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetComment returns the Comment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentFeedbackDetailItem) GetComment() string { + if o == nil || IsNil(o.Comment.Get()) { + var ret string + return ret + } + return *o.Comment.Get() +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentFeedbackDetailItem) GetCommentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Comment.Get(), o.Comment.IsSet() +} + +// HasComment returns a boolean if a field has been set. +func (o *ExperimentFeedbackDetailItem) HasComment() bool { + if o != nil && o.Comment.IsSet() { + return true + } + + return false +} + +// SetComment gets a reference to the given NullableString and assigns it to the Comment field. +func (o *ExperimentFeedbackDetailItem) SetComment(v string) { + o.Comment.Set(&v) +} + +// SetCommentNil sets the value for Comment to be an explicit nil +func (o *ExperimentFeedbackDetailItem) SetCommentNil() { + o.Comment.Set(nil) +} + +// UnsetComment ensures that no value is present for Comment, not even an explicit nil +func (o *ExperimentFeedbackDetailItem) UnsetComment() { + o.Comment.Unset() +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ExperimentFeedbackDetailItem) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackDetailItem) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ExperimentFeedbackDetailItem) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetActionType returns the ActionType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentFeedbackDetailItem) GetActionType() string { + if o == nil || IsNil(o.ActionType.Get()) { + var ret string + return ret + } + return *o.ActionType.Get() +} + +// GetActionTypeOk returns a tuple with the ActionType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentFeedbackDetailItem) GetActionTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ActionType.Get(), o.ActionType.IsSet() +} + +// HasActionType returns a boolean if a field has been set. +func (o *ExperimentFeedbackDetailItem) HasActionType() bool { + if o != nil && o.ActionType.IsSet() { + return true + } + + return false +} + +// SetActionType gets a reference to the given NullableString and assigns it to the ActionType field. +func (o *ExperimentFeedbackDetailItem) SetActionType(v string) { + o.ActionType.Set(&v) +} + +// SetActionTypeNil sets the value for ActionType to be an explicit nil +func (o *ExperimentFeedbackDetailItem) SetActionTypeNil() { + o.ActionType.Set(nil) +} + +// UnsetActionType ensures that no value is present for ActionType, not even an explicit nil +func (o *ExperimentFeedbackDetailItem) UnsetActionType() { + o.ActionType.Unset() +} + +func (o ExperimentFeedbackDetailItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackDetailItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if o.Comment.IsSet() { + toSerialize["comment"] = o.Comment.Get() + } + toSerialize["created_at"] = o.CreatedAt + if o.ActionType.IsSet() { + toSerialize["action_type"] = o.ActionType.Get() + } + return toSerialize, nil +} + +func (o *ExperimentFeedbackDetailItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackDetailItem := _ExperimentFeedbackDetailItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackDetailItem) + + if err != nil { + return err + } + + *o = ExperimentFeedbackDetailItem(varExperimentFeedbackDetailItem) + + return err +} + +type NullableExperimentFeedbackDetailItem struct { + value *ExperimentFeedbackDetailItem + isSet bool +} + +func (v NullableExperimentFeedbackDetailItem) Get() *ExperimentFeedbackDetailItem { + return v.value +} + +func (v *NullableExperimentFeedbackDetailItem) Set(val *ExperimentFeedbackDetailItem) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackDetailItem) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackDetailItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackDetailItem(val *ExperimentFeedbackDetailItem) *NullableExperimentFeedbackDetailItem { + return &NullableExperimentFeedbackDetailItem{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackDetailItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackDetailItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_details_response.go b/go/futureagi/model_experiment_feedback_details_response.go new file mode 100644 index 0000000..7bfd6c2 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_details_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackDetailsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackDetailsResponse{} + +// ExperimentFeedbackDetailsResponse struct for ExperimentFeedbackDetailsResponse +type ExperimentFeedbackDetailsResponse struct { + Status bool `json:"status"` + Result ExperimentFeedbackDetailsResult `json:"result"` +} + +type _ExperimentFeedbackDetailsResponse ExperimentFeedbackDetailsResponse + +// NewExperimentFeedbackDetailsResponse instantiates a new ExperimentFeedbackDetailsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackDetailsResponse(status bool, result ExperimentFeedbackDetailsResult) *ExperimentFeedbackDetailsResponse { + this := ExperimentFeedbackDetailsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentFeedbackDetailsResponseWithDefaults instantiates a new ExperimentFeedbackDetailsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackDetailsResponseWithDefaults() *ExperimentFeedbackDetailsResponse { + this := ExperimentFeedbackDetailsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentFeedbackDetailsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackDetailsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentFeedbackDetailsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentFeedbackDetailsResponse) GetResult() ExperimentFeedbackDetailsResult { + if o == nil { + var ret ExperimentFeedbackDetailsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackDetailsResponse) GetResultOk() (*ExperimentFeedbackDetailsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentFeedbackDetailsResponse) SetResult(v ExperimentFeedbackDetailsResult) { + o.Result = v +} + +func (o ExperimentFeedbackDetailsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackDetailsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentFeedbackDetailsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackDetailsResponse := _ExperimentFeedbackDetailsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackDetailsResponse) + + if err != nil { + return err + } + + *o = ExperimentFeedbackDetailsResponse(varExperimentFeedbackDetailsResponse) + + return err +} + +type NullableExperimentFeedbackDetailsResponse struct { + value *ExperimentFeedbackDetailsResponse + isSet bool +} + +func (v NullableExperimentFeedbackDetailsResponse) Get() *ExperimentFeedbackDetailsResponse { + return v.value +} + +func (v *NullableExperimentFeedbackDetailsResponse) Set(val *ExperimentFeedbackDetailsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackDetailsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackDetailsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackDetailsResponse(val *ExperimentFeedbackDetailsResponse) *NullableExperimentFeedbackDetailsResponse { + return &NullableExperimentFeedbackDetailsResponse{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackDetailsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackDetailsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_details_result.go b/go/futureagi/model_experiment_feedback_details_result.go new file mode 100644 index 0000000..1bf05e2 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_details_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackDetailsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackDetailsResult{} + +// ExperimentFeedbackDetailsResult struct for ExperimentFeedbackDetailsResult +type ExperimentFeedbackDetailsResult struct { + Feedback []ExperimentFeedbackDetailItem `json:"feedback"` + TotalCount int32 `json:"total_count"` +} + +type _ExperimentFeedbackDetailsResult ExperimentFeedbackDetailsResult + +// NewExperimentFeedbackDetailsResult instantiates a new ExperimentFeedbackDetailsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackDetailsResult(feedback []ExperimentFeedbackDetailItem, totalCount int32) *ExperimentFeedbackDetailsResult { + this := ExperimentFeedbackDetailsResult{} + this.Feedback = feedback + this.TotalCount = totalCount + return &this +} + +// NewExperimentFeedbackDetailsResultWithDefaults instantiates a new ExperimentFeedbackDetailsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackDetailsResultWithDefaults() *ExperimentFeedbackDetailsResult { + this := ExperimentFeedbackDetailsResult{} + return &this +} + +// GetFeedback returns the Feedback field value +func (o *ExperimentFeedbackDetailsResult) GetFeedback() []ExperimentFeedbackDetailItem { + if o == nil { + var ret []ExperimentFeedbackDetailItem + return ret + } + + return o.Feedback +} + +// GetFeedbackOk returns a tuple with the Feedback field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackDetailsResult) GetFeedbackOk() ([]ExperimentFeedbackDetailItem, bool) { + if o == nil { + return nil, false + } + return o.Feedback, true +} + +// SetFeedback sets field value +func (o *ExperimentFeedbackDetailsResult) SetFeedback(v []ExperimentFeedbackDetailItem) { + o.Feedback = v +} + +// GetTotalCount returns the TotalCount field value +func (o *ExperimentFeedbackDetailsResult) GetTotalCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackDetailsResult) GetTotalCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalCount, true +} + +// SetTotalCount sets field value +func (o *ExperimentFeedbackDetailsResult) SetTotalCount(v int32) { + o.TotalCount = v +} + +func (o ExperimentFeedbackDetailsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackDetailsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["feedback"] = o.Feedback + toSerialize["total_count"] = o.TotalCount + return toSerialize, nil +} + +func (o *ExperimentFeedbackDetailsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "feedback", + "total_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackDetailsResult := _ExperimentFeedbackDetailsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackDetailsResult) + + if err != nil { + return err + } + + *o = ExperimentFeedbackDetailsResult(varExperimentFeedbackDetailsResult) + + return err +} + +type NullableExperimentFeedbackDetailsResult struct { + value *ExperimentFeedbackDetailsResult + isSet bool +} + +func (v NullableExperimentFeedbackDetailsResult) Get() *ExperimentFeedbackDetailsResult { + return v.value +} + +func (v *NullableExperimentFeedbackDetailsResult) Set(val *ExperimentFeedbackDetailsResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackDetailsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackDetailsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackDetailsResult(val *ExperimentFeedbackDetailsResult) *NullableExperimentFeedbackDetailsResult { + return &NullableExperimentFeedbackDetailsResult{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackDetailsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackDetailsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_submit_request.go b/go/futureagi/model_experiment_feedback_submit_request.go new file mode 100644 index 0000000..3cbb9ec --- /dev/null +++ b/go/futureagi/model_experiment_feedback_submit_request.go @@ -0,0 +1,285 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackSubmitRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackSubmitRequest{} + +// ExperimentFeedbackSubmitRequest struct for ExperimentFeedbackSubmitRequest +type ExperimentFeedbackSubmitRequest struct { + ActionType string `json:"action_type"` + FeedbackId string `json:"feedback_id"` + UserEvalMetricId string `json:"user_eval_metric_id"` + Value map[string]interface{} `json:"value,omitempty"` + Explanation *string `json:"explanation,omitempty"` +} + +type _ExperimentFeedbackSubmitRequest ExperimentFeedbackSubmitRequest + +// NewExperimentFeedbackSubmitRequest instantiates a new ExperimentFeedbackSubmitRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackSubmitRequest(actionType string, feedbackId string, userEvalMetricId string) *ExperimentFeedbackSubmitRequest { + this := ExperimentFeedbackSubmitRequest{} + this.ActionType = actionType + this.FeedbackId = feedbackId + this.UserEvalMetricId = userEvalMetricId + return &this +} + +// NewExperimentFeedbackSubmitRequestWithDefaults instantiates a new ExperimentFeedbackSubmitRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackSubmitRequestWithDefaults() *ExperimentFeedbackSubmitRequest { + this := ExperimentFeedbackSubmitRequest{} + return &this +} + +// GetActionType returns the ActionType field value +func (o *ExperimentFeedbackSubmitRequest) GetActionType() string { + if o == nil { + var ret string + return ret + } + + return o.ActionType +} + +// GetActionTypeOk returns a tuple with the ActionType field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitRequest) GetActionTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ActionType, true +} + +// SetActionType sets field value +func (o *ExperimentFeedbackSubmitRequest) SetActionType(v string) { + o.ActionType = v +} + +// GetFeedbackId returns the FeedbackId field value +func (o *ExperimentFeedbackSubmitRequest) GetFeedbackId() string { + if o == nil { + var ret string + return ret + } + + return o.FeedbackId +} + +// GetFeedbackIdOk returns a tuple with the FeedbackId field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitRequest) GetFeedbackIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FeedbackId, true +} + +// SetFeedbackId sets field value +func (o *ExperimentFeedbackSubmitRequest) SetFeedbackId(v string) { + o.FeedbackId = v +} + +// GetUserEvalMetricId returns the UserEvalMetricId field value +func (o *ExperimentFeedbackSubmitRequest) GetUserEvalMetricId() string { + if o == nil { + var ret string + return ret + } + + return o.UserEvalMetricId +} + +// GetUserEvalMetricIdOk returns a tuple with the UserEvalMetricId field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitRequest) GetUserEvalMetricIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserEvalMetricId, true +} + +// SetUserEvalMetricId sets field value +func (o *ExperimentFeedbackSubmitRequest) SetUserEvalMetricId(v string) { + o.UserEvalMetricId = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ExperimentFeedbackSubmitRequest) GetValue() map[string]interface{} { + if o == nil || IsNil(o.Value) { + var ret map[string]interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitRequest) GetValueOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Value) { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ExperimentFeedbackSubmitRequest) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given map[string]interface{} and assigns it to the Value field. +func (o *ExperimentFeedbackSubmitRequest) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetExplanation returns the Explanation field value if set, zero value otherwise. +func (o *ExperimentFeedbackSubmitRequest) GetExplanation() string { + if o == nil || IsNil(o.Explanation) { + var ret string + return ret + } + return *o.Explanation +} + +// GetExplanationOk returns a tuple with the Explanation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitRequest) GetExplanationOk() (*string, bool) { + if o == nil || IsNil(o.Explanation) { + return nil, false + } + return o.Explanation, true +} + +// HasExplanation returns a boolean if a field has been set. +func (o *ExperimentFeedbackSubmitRequest) HasExplanation() bool { + if o != nil && !IsNil(o.Explanation) { + return true + } + + return false +} + +// SetExplanation gets a reference to the given string and assigns it to the Explanation field. +func (o *ExperimentFeedbackSubmitRequest) SetExplanation(v string) { + o.Explanation = &v +} + +func (o ExperimentFeedbackSubmitRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackSubmitRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["action_type"] = o.ActionType + toSerialize["feedback_id"] = o.FeedbackId + toSerialize["user_eval_metric_id"] = o.UserEvalMetricId + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Explanation) { + toSerialize["explanation"] = o.Explanation + } + return toSerialize, nil +} + +func (o *ExperimentFeedbackSubmitRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "action_type", + "feedback_id", + "user_eval_metric_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackSubmitRequest := _ExperimentFeedbackSubmitRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackSubmitRequest) + + if err != nil { + return err + } + + *o = ExperimentFeedbackSubmitRequest(varExperimentFeedbackSubmitRequest) + + return err +} + +type NullableExperimentFeedbackSubmitRequest struct { + value *ExperimentFeedbackSubmitRequest + isSet bool +} + +func (v NullableExperimentFeedbackSubmitRequest) Get() *ExperimentFeedbackSubmitRequest { + return v.value +} + +func (v *NullableExperimentFeedbackSubmitRequest) Set(val *ExperimentFeedbackSubmitRequest) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackSubmitRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackSubmitRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackSubmitRequest(val *ExperimentFeedbackSubmitRequest) *NullableExperimentFeedbackSubmitRequest { + return &NullableExperimentFeedbackSubmitRequest{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackSubmitRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackSubmitRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_submit_response.go b/go/futureagi/model_experiment_feedback_submit_response.go new file mode 100644 index 0000000..9963223 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_submit_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackSubmitResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackSubmitResponse{} + +// ExperimentFeedbackSubmitResponse struct for ExperimentFeedbackSubmitResponse +type ExperimentFeedbackSubmitResponse struct { + Status bool `json:"status"` + Result ExperimentFeedbackSubmitResult `json:"result"` +} + +type _ExperimentFeedbackSubmitResponse ExperimentFeedbackSubmitResponse + +// NewExperimentFeedbackSubmitResponse instantiates a new ExperimentFeedbackSubmitResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackSubmitResponse(status bool, result ExperimentFeedbackSubmitResult) *ExperimentFeedbackSubmitResponse { + this := ExperimentFeedbackSubmitResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentFeedbackSubmitResponseWithDefaults instantiates a new ExperimentFeedbackSubmitResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackSubmitResponseWithDefaults() *ExperimentFeedbackSubmitResponse { + this := ExperimentFeedbackSubmitResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentFeedbackSubmitResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentFeedbackSubmitResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentFeedbackSubmitResponse) GetResult() ExperimentFeedbackSubmitResult { + if o == nil { + var ret ExperimentFeedbackSubmitResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitResponse) GetResultOk() (*ExperimentFeedbackSubmitResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentFeedbackSubmitResponse) SetResult(v ExperimentFeedbackSubmitResult) { + o.Result = v +} + +func (o ExperimentFeedbackSubmitResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackSubmitResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentFeedbackSubmitResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackSubmitResponse := _ExperimentFeedbackSubmitResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackSubmitResponse) + + if err != nil { + return err + } + + *o = ExperimentFeedbackSubmitResponse(varExperimentFeedbackSubmitResponse) + + return err +} + +type NullableExperimentFeedbackSubmitResponse struct { + value *ExperimentFeedbackSubmitResponse + isSet bool +} + +func (v NullableExperimentFeedbackSubmitResponse) Get() *ExperimentFeedbackSubmitResponse { + return v.value +} + +func (v *NullableExperimentFeedbackSubmitResponse) Set(val *ExperimentFeedbackSubmitResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackSubmitResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackSubmitResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackSubmitResponse(val *ExperimentFeedbackSubmitResponse) *NullableExperimentFeedbackSubmitResponse { + return &NullableExperimentFeedbackSubmitResponse{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackSubmitResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackSubmitResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_submit_result.go b/go/futureagi/model_experiment_feedback_submit_result.go new file mode 100644 index 0000000..b9deb81 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_submit_result.go @@ -0,0 +1,249 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackSubmitResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackSubmitResult{} + +// ExperimentFeedbackSubmitResult struct for ExperimentFeedbackSubmitResult +type ExperimentFeedbackSubmitResult struct { + Message string `json:"message"` + ActionType string `json:"action_type"` + UserEvalMetricId string `json:"user_eval_metric_id"` + WorkflowId *string `json:"workflow_id,omitempty"` +} + +type _ExperimentFeedbackSubmitResult ExperimentFeedbackSubmitResult + +// NewExperimentFeedbackSubmitResult instantiates a new ExperimentFeedbackSubmitResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackSubmitResult(message string, actionType string, userEvalMetricId string) *ExperimentFeedbackSubmitResult { + this := ExperimentFeedbackSubmitResult{} + this.Message = message + this.ActionType = actionType + this.UserEvalMetricId = userEvalMetricId + return &this +} + +// NewExperimentFeedbackSubmitResultWithDefaults instantiates a new ExperimentFeedbackSubmitResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackSubmitResultWithDefaults() *ExperimentFeedbackSubmitResult { + this := ExperimentFeedbackSubmitResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *ExperimentFeedbackSubmitResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ExperimentFeedbackSubmitResult) SetMessage(v string) { + o.Message = v +} + +// GetActionType returns the ActionType field value +func (o *ExperimentFeedbackSubmitResult) GetActionType() string { + if o == nil { + var ret string + return ret + } + + return o.ActionType +} + +// GetActionTypeOk returns a tuple with the ActionType field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitResult) GetActionTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ActionType, true +} + +// SetActionType sets field value +func (o *ExperimentFeedbackSubmitResult) SetActionType(v string) { + o.ActionType = v +} + +// GetUserEvalMetricId returns the UserEvalMetricId field value +func (o *ExperimentFeedbackSubmitResult) GetUserEvalMetricId() string { + if o == nil { + var ret string + return ret + } + + return o.UserEvalMetricId +} + +// GetUserEvalMetricIdOk returns a tuple with the UserEvalMetricId field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitResult) GetUserEvalMetricIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserEvalMetricId, true +} + +// SetUserEvalMetricId sets field value +func (o *ExperimentFeedbackSubmitResult) SetUserEvalMetricId(v string) { + o.UserEvalMetricId = v +} + +// GetWorkflowId returns the WorkflowId field value if set, zero value otherwise. +func (o *ExperimentFeedbackSubmitResult) GetWorkflowId() string { + if o == nil || IsNil(o.WorkflowId) { + var ret string + return ret + } + return *o.WorkflowId +} + +// GetWorkflowIdOk returns a tuple with the WorkflowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackSubmitResult) GetWorkflowIdOk() (*string, bool) { + if o == nil || IsNil(o.WorkflowId) { + return nil, false + } + return o.WorkflowId, true +} + +// HasWorkflowId returns a boolean if a field has been set. +func (o *ExperimentFeedbackSubmitResult) HasWorkflowId() bool { + if o != nil && !IsNil(o.WorkflowId) { + return true + } + + return false +} + +// SetWorkflowId gets a reference to the given string and assigns it to the WorkflowId field. +func (o *ExperimentFeedbackSubmitResult) SetWorkflowId(v string) { + o.WorkflowId = &v +} + +func (o ExperimentFeedbackSubmitResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackSubmitResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["action_type"] = o.ActionType + toSerialize["user_eval_metric_id"] = o.UserEvalMetricId + if !IsNil(o.WorkflowId) { + toSerialize["workflow_id"] = o.WorkflowId + } + return toSerialize, nil +} + +func (o *ExperimentFeedbackSubmitResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "action_type", + "user_eval_metric_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackSubmitResult := _ExperimentFeedbackSubmitResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackSubmitResult) + + if err != nil { + return err + } + + *o = ExperimentFeedbackSubmitResult(varExperimentFeedbackSubmitResult) + + return err +} + +type NullableExperimentFeedbackSubmitResult struct { + value *ExperimentFeedbackSubmitResult + isSet bool +} + +func (v NullableExperimentFeedbackSubmitResult) Get() *ExperimentFeedbackSubmitResult { + return v.value +} + +func (v *NullableExperimentFeedbackSubmitResult) Set(val *ExperimentFeedbackSubmitResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackSubmitResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackSubmitResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackSubmitResult(val *ExperimentFeedbackSubmitResult) *NullableExperimentFeedbackSubmitResult { + return &NullableExperimentFeedbackSubmitResult{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackSubmitResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackSubmitResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_template_response.go b/go/futureagi/model_experiment_feedback_template_response.go new file mode 100644 index 0000000..b14d2d3 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_template_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackTemplateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackTemplateResponse{} + +// ExperimentFeedbackTemplateResponse struct for ExperimentFeedbackTemplateResponse +type ExperimentFeedbackTemplateResponse struct { + Status bool `json:"status"` + Result ExperimentFeedbackTemplateResult `json:"result"` +} + +type _ExperimentFeedbackTemplateResponse ExperimentFeedbackTemplateResponse + +// NewExperimentFeedbackTemplateResponse instantiates a new ExperimentFeedbackTemplateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackTemplateResponse(status bool, result ExperimentFeedbackTemplateResult) *ExperimentFeedbackTemplateResponse { + this := ExperimentFeedbackTemplateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentFeedbackTemplateResponseWithDefaults instantiates a new ExperimentFeedbackTemplateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackTemplateResponseWithDefaults() *ExperimentFeedbackTemplateResponse { + this := ExperimentFeedbackTemplateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentFeedbackTemplateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackTemplateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentFeedbackTemplateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentFeedbackTemplateResponse) GetResult() ExperimentFeedbackTemplateResult { + if o == nil { + var ret ExperimentFeedbackTemplateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackTemplateResponse) GetResultOk() (*ExperimentFeedbackTemplateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentFeedbackTemplateResponse) SetResult(v ExperimentFeedbackTemplateResult) { + o.Result = v +} + +func (o ExperimentFeedbackTemplateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackTemplateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentFeedbackTemplateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackTemplateResponse := _ExperimentFeedbackTemplateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackTemplateResponse) + + if err != nil { + return err + } + + *o = ExperimentFeedbackTemplateResponse(varExperimentFeedbackTemplateResponse) + + return err +} + +type NullableExperimentFeedbackTemplateResponse struct { + value *ExperimentFeedbackTemplateResponse + isSet bool +} + +func (v NullableExperimentFeedbackTemplateResponse) Get() *ExperimentFeedbackTemplateResponse { + return v.value +} + +func (v *NullableExperimentFeedbackTemplateResponse) Set(val *ExperimentFeedbackTemplateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackTemplateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackTemplateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackTemplateResponse(val *ExperimentFeedbackTemplateResponse) *NullableExperimentFeedbackTemplateResponse { + return &NullableExperimentFeedbackTemplateResponse{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackTemplateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackTemplateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_feedback_template_result.go b/go/futureagi/model_experiment_feedback_template_result.go new file mode 100644 index 0000000..30d5708 --- /dev/null +++ b/go/futureagi/model_experiment_feedback_template_result.go @@ -0,0 +1,351 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentFeedbackTemplateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentFeedbackTemplateResult{} + +// ExperimentFeedbackTemplateResult struct for ExperimentFeedbackTemplateResult +type ExperimentFeedbackTemplateResult struct { + OutputType NullableString `json:"output_type,omitempty"` + EvalDescription NullableString `json:"eval_description,omitempty"` + EvalName string `json:"eval_name"` + UserEvalName string `json:"user_eval_name"` + Choices []string `json:"choices,omitempty"` + MultiChoice *bool `json:"multi_choice,omitempty"` +} + +type _ExperimentFeedbackTemplateResult ExperimentFeedbackTemplateResult + +// NewExperimentFeedbackTemplateResult instantiates a new ExperimentFeedbackTemplateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentFeedbackTemplateResult(evalName string, userEvalName string) *ExperimentFeedbackTemplateResult { + this := ExperimentFeedbackTemplateResult{} + this.EvalName = evalName + this.UserEvalName = userEvalName + return &this +} + +// NewExperimentFeedbackTemplateResultWithDefaults instantiates a new ExperimentFeedbackTemplateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentFeedbackTemplateResultWithDefaults() *ExperimentFeedbackTemplateResult { + this := ExperimentFeedbackTemplateResult{} + return &this +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentFeedbackTemplateResult) GetOutputType() string { + if o == nil || IsNil(o.OutputType.Get()) { + var ret string + return ret + } + return *o.OutputType.Get() +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentFeedbackTemplateResult) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OutputType.Get(), o.OutputType.IsSet() +} + +// HasOutputType returns a boolean if a field has been set. +func (o *ExperimentFeedbackTemplateResult) HasOutputType() bool { + if o != nil && o.OutputType.IsSet() { + return true + } + + return false +} + +// SetOutputType gets a reference to the given NullableString and assigns it to the OutputType field. +func (o *ExperimentFeedbackTemplateResult) SetOutputType(v string) { + o.OutputType.Set(&v) +} + +// SetOutputTypeNil sets the value for OutputType to be an explicit nil +func (o *ExperimentFeedbackTemplateResult) SetOutputTypeNil() { + o.OutputType.Set(nil) +} + +// UnsetOutputType ensures that no value is present for OutputType, not even an explicit nil +func (o *ExperimentFeedbackTemplateResult) UnsetOutputType() { + o.OutputType.Unset() +} + +// GetEvalDescription returns the EvalDescription field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentFeedbackTemplateResult) GetEvalDescription() string { + if o == nil || IsNil(o.EvalDescription.Get()) { + var ret string + return ret + } + return *o.EvalDescription.Get() +} + +// GetEvalDescriptionOk returns a tuple with the EvalDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentFeedbackTemplateResult) GetEvalDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalDescription.Get(), o.EvalDescription.IsSet() +} + +// HasEvalDescription returns a boolean if a field has been set. +func (o *ExperimentFeedbackTemplateResult) HasEvalDescription() bool { + if o != nil && o.EvalDescription.IsSet() { + return true + } + + return false +} + +// SetEvalDescription gets a reference to the given NullableString and assigns it to the EvalDescription field. +func (o *ExperimentFeedbackTemplateResult) SetEvalDescription(v string) { + o.EvalDescription.Set(&v) +} + +// SetEvalDescriptionNil sets the value for EvalDescription to be an explicit nil +func (o *ExperimentFeedbackTemplateResult) SetEvalDescriptionNil() { + o.EvalDescription.Set(nil) +} + +// UnsetEvalDescription ensures that no value is present for EvalDescription, not even an explicit nil +func (o *ExperimentFeedbackTemplateResult) UnsetEvalDescription() { + o.EvalDescription.Unset() +} + +// GetEvalName returns the EvalName field value +func (o *ExperimentFeedbackTemplateResult) GetEvalName() string { + if o == nil { + var ret string + return ret + } + + return o.EvalName +} + +// GetEvalNameOk returns a tuple with the EvalName field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackTemplateResult) GetEvalNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalName, true +} + +// SetEvalName sets field value +func (o *ExperimentFeedbackTemplateResult) SetEvalName(v string) { + o.EvalName = v +} + +// GetUserEvalName returns the UserEvalName field value +func (o *ExperimentFeedbackTemplateResult) GetUserEvalName() string { + if o == nil { + var ret string + return ret + } + + return o.UserEvalName +} + +// GetUserEvalNameOk returns a tuple with the UserEvalName field value +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackTemplateResult) GetUserEvalNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserEvalName, true +} + +// SetUserEvalName sets field value +func (o *ExperimentFeedbackTemplateResult) SetUserEvalName(v string) { + o.UserEvalName = v +} + +// GetChoices returns the Choices field value if set, zero value otherwise. +func (o *ExperimentFeedbackTemplateResult) GetChoices() []string { + if o == nil || IsNil(o.Choices) { + var ret []string + return ret + } + return o.Choices +} + +// GetChoicesOk returns a tuple with the Choices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackTemplateResult) GetChoicesOk() ([]string, bool) { + if o == nil || IsNil(o.Choices) { + return nil, false + } + return o.Choices, true +} + +// HasChoices returns a boolean if a field has been set. +func (o *ExperimentFeedbackTemplateResult) HasChoices() bool { + if o != nil && !IsNil(o.Choices) { + return true + } + + return false +} + +// SetChoices gets a reference to the given []string and assigns it to the Choices field. +func (o *ExperimentFeedbackTemplateResult) SetChoices(v []string) { + o.Choices = v +} + +// GetMultiChoice returns the MultiChoice field value if set, zero value otherwise. +func (o *ExperimentFeedbackTemplateResult) GetMultiChoice() bool { + if o == nil || IsNil(o.MultiChoice) { + var ret bool + return ret + } + return *o.MultiChoice +} + +// GetMultiChoiceOk returns a tuple with the MultiChoice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentFeedbackTemplateResult) GetMultiChoiceOk() (*bool, bool) { + if o == nil || IsNil(o.MultiChoice) { + return nil, false + } + return o.MultiChoice, true +} + +// HasMultiChoice returns a boolean if a field has been set. +func (o *ExperimentFeedbackTemplateResult) HasMultiChoice() bool { + if o != nil && !IsNil(o.MultiChoice) { + return true + } + + return false +} + +// SetMultiChoice gets a reference to the given bool and assigns it to the MultiChoice field. +func (o *ExperimentFeedbackTemplateResult) SetMultiChoice(v bool) { + o.MultiChoice = &v +} + +func (o ExperimentFeedbackTemplateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentFeedbackTemplateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.OutputType.IsSet() { + toSerialize["output_type"] = o.OutputType.Get() + } + if o.EvalDescription.IsSet() { + toSerialize["eval_description"] = o.EvalDescription.Get() + } + toSerialize["eval_name"] = o.EvalName + toSerialize["user_eval_name"] = o.UserEvalName + if !IsNil(o.Choices) { + toSerialize["choices"] = o.Choices + } + if !IsNil(o.MultiChoice) { + toSerialize["multi_choice"] = o.MultiChoice + } + return toSerialize, nil +} + +func (o *ExperimentFeedbackTemplateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_name", + "user_eval_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentFeedbackTemplateResult := _ExperimentFeedbackTemplateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentFeedbackTemplateResult) + + if err != nil { + return err + } + + *o = ExperimentFeedbackTemplateResult(varExperimentFeedbackTemplateResult) + + return err +} + +type NullableExperimentFeedbackTemplateResult struct { + value *ExperimentFeedbackTemplateResult + isSet bool +} + +func (v NullableExperimentFeedbackTemplateResult) Get() *ExperimentFeedbackTemplateResult { + return v.value +} + +func (v *NullableExperimentFeedbackTemplateResult) Set(val *ExperimentFeedbackTemplateResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentFeedbackTemplateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentFeedbackTemplateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentFeedbackTemplateResult(val *ExperimentFeedbackTemplateResult) *NullableExperimentFeedbackTemplateResult { + return &NullableExperimentFeedbackTemplateResult{value: val, isSet: true} +} + +func (v NullableExperimentFeedbackTemplateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentFeedbackTemplateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_json_schema_response.go b/go/futureagi/model_experiment_json_schema_response.go new file mode 100644 index 0000000..9f985d2 --- /dev/null +++ b/go/futureagi/model_experiment_json_schema_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentJsonSchemaResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentJsonSchemaResponse{} + +// ExperimentJsonSchemaResponse struct for ExperimentJsonSchemaResponse +type ExperimentJsonSchemaResponse struct { + Status bool `json:"status"` + Result map[string]JsonColumnSchemaEntry `json:"result"` +} + +type _ExperimentJsonSchemaResponse ExperimentJsonSchemaResponse + +// NewExperimentJsonSchemaResponse instantiates a new ExperimentJsonSchemaResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentJsonSchemaResponse(status bool, result map[string]JsonColumnSchemaEntry) *ExperimentJsonSchemaResponse { + this := ExperimentJsonSchemaResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentJsonSchemaResponseWithDefaults instantiates a new ExperimentJsonSchemaResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentJsonSchemaResponseWithDefaults() *ExperimentJsonSchemaResponse { + this := ExperimentJsonSchemaResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentJsonSchemaResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentJsonSchemaResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentJsonSchemaResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentJsonSchemaResponse) GetResult() map[string]JsonColumnSchemaEntry { + if o == nil { + var ret map[string]JsonColumnSchemaEntry + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentJsonSchemaResponse) GetResultOk() (*map[string]JsonColumnSchemaEntry, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentJsonSchemaResponse) SetResult(v map[string]JsonColumnSchemaEntry) { + o.Result = v +} + +func (o ExperimentJsonSchemaResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentJsonSchemaResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentJsonSchemaResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentJsonSchemaResponse := _ExperimentJsonSchemaResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentJsonSchemaResponse) + + if err != nil { + return err + } + + *o = ExperimentJsonSchemaResponse(varExperimentJsonSchemaResponse) + + return err +} + +type NullableExperimentJsonSchemaResponse struct { + value *ExperimentJsonSchemaResponse + isSet bool +} + +func (v NullableExperimentJsonSchemaResponse) Get() *ExperimentJsonSchemaResponse { + return v.value +} + +func (v *NullableExperimentJsonSchemaResponse) Set(val *ExperimentJsonSchemaResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentJsonSchemaResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentJsonSchemaResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentJsonSchemaResponse(val *ExperimentJsonSchemaResponse) *NullableExperimentJsonSchemaResponse { + return &NullableExperimentJsonSchemaResponse{value: val, isSet: true} +} + +func (v NullableExperimentJsonSchemaResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentJsonSchemaResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_list_v2.go b/go/futureagi/model_experiment_list_v2.go new file mode 100644 index 0000000..d7fb9a4 --- /dev/null +++ b/go/futureagi/model_experiment_list_v2.go @@ -0,0 +1,439 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ExperimentListV2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentListV2{} + +// ExperimentListV2 struct for ExperimentListV2 +type ExperimentListV2 struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Status *string `json:"status,omitempty"` + // Determines how the experiment executes: llm, tts, stt, or image. + ExperimentType *string `json:"experiment_type,omitempty"` + EvalTemplatesCount *string `json:"eval_templates_count,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + ModelsCount *string `json:"models_count,omitempty"` + AgentsCount *string `json:"agents_count,omitempty"` + Dataset string `json:"dataset"` +} + +type _ExperimentListV2 ExperimentListV2 + +// NewExperimentListV2 instantiates a new ExperimentListV2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentListV2(name string, dataset string) *ExperimentListV2 { + this := ExperimentListV2{} + this.Name = name + this.Dataset = dataset + return &this +} + +// NewExperimentListV2WithDefaults instantiates a new ExperimentListV2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentListV2WithDefaults() *ExperimentListV2 { + this := ExperimentListV2{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ExperimentListV2) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ExperimentListV2) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ExperimentListV2) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *ExperimentListV2) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExperimentListV2) SetName(v string) { + o.Name = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExperimentListV2) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExperimentListV2) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExperimentListV2) SetStatus(v string) { + o.Status = &v +} + +// GetExperimentType returns the ExperimentType field value if set, zero value otherwise. +func (o *ExperimentListV2) GetExperimentType() string { + if o == nil || IsNil(o.ExperimentType) { + var ret string + return ret + } + return *o.ExperimentType +} + +// GetExperimentTypeOk returns a tuple with the ExperimentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetExperimentTypeOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentType) { + return nil, false + } + return o.ExperimentType, true +} + +// HasExperimentType returns a boolean if a field has been set. +func (o *ExperimentListV2) HasExperimentType() bool { + if o != nil && !IsNil(o.ExperimentType) { + return true + } + + return false +} + +// SetExperimentType gets a reference to the given string and assigns it to the ExperimentType field. +func (o *ExperimentListV2) SetExperimentType(v string) { + o.ExperimentType = &v +} + +// GetEvalTemplatesCount returns the EvalTemplatesCount field value if set, zero value otherwise. +func (o *ExperimentListV2) GetEvalTemplatesCount() string { + if o == nil || IsNil(o.EvalTemplatesCount) { + var ret string + return ret + } + return *o.EvalTemplatesCount +} + +// GetEvalTemplatesCountOk returns a tuple with the EvalTemplatesCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetEvalTemplatesCountOk() (*string, bool) { + if o == nil || IsNil(o.EvalTemplatesCount) { + return nil, false + } + return o.EvalTemplatesCount, true +} + +// HasEvalTemplatesCount returns a boolean if a field has been set. +func (o *ExperimentListV2) HasEvalTemplatesCount() bool { + if o != nil && !IsNil(o.EvalTemplatesCount) { + return true + } + + return false +} + +// SetEvalTemplatesCount gets a reference to the given string and assigns it to the EvalTemplatesCount field. +func (o *ExperimentListV2) SetEvalTemplatesCount(v string) { + o.EvalTemplatesCount = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ExperimentListV2) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ExperimentListV2) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ExperimentListV2) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetModelsCount returns the ModelsCount field value if set, zero value otherwise. +func (o *ExperimentListV2) GetModelsCount() string { + if o == nil || IsNil(o.ModelsCount) { + var ret string + return ret + } + return *o.ModelsCount +} + +// GetModelsCountOk returns a tuple with the ModelsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetModelsCountOk() (*string, bool) { + if o == nil || IsNil(o.ModelsCount) { + return nil, false + } + return o.ModelsCount, true +} + +// HasModelsCount returns a boolean if a field has been set. +func (o *ExperimentListV2) HasModelsCount() bool { + if o != nil && !IsNil(o.ModelsCount) { + return true + } + + return false +} + +// SetModelsCount gets a reference to the given string and assigns it to the ModelsCount field. +func (o *ExperimentListV2) SetModelsCount(v string) { + o.ModelsCount = &v +} + +// GetAgentsCount returns the AgentsCount field value if set, zero value otherwise. +func (o *ExperimentListV2) GetAgentsCount() string { + if o == nil || IsNil(o.AgentsCount) { + var ret string + return ret + } + return *o.AgentsCount +} + +// GetAgentsCountOk returns a tuple with the AgentsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetAgentsCountOk() (*string, bool) { + if o == nil || IsNil(o.AgentsCount) { + return nil, false + } + return o.AgentsCount, true +} + +// HasAgentsCount returns a boolean if a field has been set. +func (o *ExperimentListV2) HasAgentsCount() bool { + if o != nil && !IsNil(o.AgentsCount) { + return true + } + + return false +} + +// SetAgentsCount gets a reference to the given string and assigns it to the AgentsCount field. +func (o *ExperimentListV2) SetAgentsCount(v string) { + o.AgentsCount = &v +} + +// GetDataset returns the Dataset field value +func (o *ExperimentListV2) GetDataset() string { + if o == nil { + var ret string + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *ExperimentListV2) GetDatasetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Dataset, true +} + +// SetDataset sets field value +func (o *ExperimentListV2) SetDataset(v string) { + o.Dataset = v +} + +func (o ExperimentListV2) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentListV2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.ExperimentType) { + toSerialize["experiment_type"] = o.ExperimentType + } + if !IsNil(o.EvalTemplatesCount) { + toSerialize["eval_templates_count"] = o.EvalTemplatesCount + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.ModelsCount) { + toSerialize["models_count"] = o.ModelsCount + } + if !IsNil(o.AgentsCount) { + toSerialize["agents_count"] = o.AgentsCount + } + toSerialize["dataset"] = o.Dataset + return toSerialize, nil +} + +func (o *ExperimentListV2) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "dataset", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentListV2 := _ExperimentListV2{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentListV2) + + if err != nil { + return err + } + + *o = ExperimentListV2(varExperimentListV2) + + return err +} + +type NullableExperimentListV2 struct { + value *ExperimentListV2 + isSet bool +} + +func (v NullableExperimentListV2) Get() *ExperimentListV2 { + return v.value +} + +func (v *NullableExperimentListV2) Set(val *ExperimentListV2) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentListV2) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentListV2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentListV2(val *ExperimentListV2) *NullableExperimentListV2 { + return &NullableExperimentListV2{value: val, isSet: true} +} + +func (v NullableExperimentListV2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentListV2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_name_suggestion_response.go b/go/futureagi/model_experiment_name_suggestion_response.go new file mode 100644 index 0000000..a58f55d --- /dev/null +++ b/go/futureagi/model_experiment_name_suggestion_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentNameSuggestionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentNameSuggestionResponse{} + +// ExperimentNameSuggestionResponse struct for ExperimentNameSuggestionResponse +type ExperimentNameSuggestionResponse struct { + Status bool `json:"status"` + Result ExperimentNameSuggestionResult `json:"result"` +} + +type _ExperimentNameSuggestionResponse ExperimentNameSuggestionResponse + +// NewExperimentNameSuggestionResponse instantiates a new ExperimentNameSuggestionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentNameSuggestionResponse(status bool, result ExperimentNameSuggestionResult) *ExperimentNameSuggestionResponse { + this := ExperimentNameSuggestionResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentNameSuggestionResponseWithDefaults instantiates a new ExperimentNameSuggestionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentNameSuggestionResponseWithDefaults() *ExperimentNameSuggestionResponse { + this := ExperimentNameSuggestionResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentNameSuggestionResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentNameSuggestionResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentNameSuggestionResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentNameSuggestionResponse) GetResult() ExperimentNameSuggestionResult { + if o == nil { + var ret ExperimentNameSuggestionResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentNameSuggestionResponse) GetResultOk() (*ExperimentNameSuggestionResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentNameSuggestionResponse) SetResult(v ExperimentNameSuggestionResult) { + o.Result = v +} + +func (o ExperimentNameSuggestionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentNameSuggestionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentNameSuggestionResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentNameSuggestionResponse := _ExperimentNameSuggestionResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentNameSuggestionResponse) + + if err != nil { + return err + } + + *o = ExperimentNameSuggestionResponse(varExperimentNameSuggestionResponse) + + return err +} + +type NullableExperimentNameSuggestionResponse struct { + value *ExperimentNameSuggestionResponse + isSet bool +} + +func (v NullableExperimentNameSuggestionResponse) Get() *ExperimentNameSuggestionResponse { + return v.value +} + +func (v *NullableExperimentNameSuggestionResponse) Set(val *ExperimentNameSuggestionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentNameSuggestionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentNameSuggestionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentNameSuggestionResponse(val *ExperimentNameSuggestionResponse) *NullableExperimentNameSuggestionResponse { + return &NullableExperimentNameSuggestionResponse{value: val, isSet: true} +} + +func (v NullableExperimentNameSuggestionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentNameSuggestionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_name_suggestion_result.go b/go/futureagi/model_experiment_name_suggestion_result.go new file mode 100644 index 0000000..7cffe5d --- /dev/null +++ b/go/futureagi/model_experiment_name_suggestion_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentNameSuggestionResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentNameSuggestionResult{} + +// ExperimentNameSuggestionResult struct for ExperimentNameSuggestionResult +type ExperimentNameSuggestionResult struct { + SuggestedName string `json:"suggested_name"` +} + +type _ExperimentNameSuggestionResult ExperimentNameSuggestionResult + +// NewExperimentNameSuggestionResult instantiates a new ExperimentNameSuggestionResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentNameSuggestionResult(suggestedName string) *ExperimentNameSuggestionResult { + this := ExperimentNameSuggestionResult{} + this.SuggestedName = suggestedName + return &this +} + +// NewExperimentNameSuggestionResultWithDefaults instantiates a new ExperimentNameSuggestionResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentNameSuggestionResultWithDefaults() *ExperimentNameSuggestionResult { + this := ExperimentNameSuggestionResult{} + return &this +} + +// GetSuggestedName returns the SuggestedName field value +func (o *ExperimentNameSuggestionResult) GetSuggestedName() string { + if o == nil { + var ret string + return ret + } + + return o.SuggestedName +} + +// GetSuggestedNameOk returns a tuple with the SuggestedName field value +// and a boolean to check if the value has been set. +func (o *ExperimentNameSuggestionResult) GetSuggestedNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SuggestedName, true +} + +// SetSuggestedName sets field value +func (o *ExperimentNameSuggestionResult) SetSuggestedName(v string) { + o.SuggestedName = v +} + +func (o ExperimentNameSuggestionResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentNameSuggestionResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["suggested_name"] = o.SuggestedName + return toSerialize, nil +} + +func (o *ExperimentNameSuggestionResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "suggested_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentNameSuggestionResult := _ExperimentNameSuggestionResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentNameSuggestionResult) + + if err != nil { + return err + } + + *o = ExperimentNameSuggestionResult(varExperimentNameSuggestionResult) + + return err +} + +type NullableExperimentNameSuggestionResult struct { + value *ExperimentNameSuggestionResult + isSet bool +} + +func (v NullableExperimentNameSuggestionResult) Get() *ExperimentNameSuggestionResult { + return v.value +} + +func (v *NullableExperimentNameSuggestionResult) Set(val *ExperimentNameSuggestionResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentNameSuggestionResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentNameSuggestionResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentNameSuggestionResult(val *ExperimentNameSuggestionResult) *NullableExperimentNameSuggestionResult { + return &NullableExperimentNameSuggestionResult{value: val, isSet: true} +} + +func (v NullableExperimentNameSuggestionResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentNameSuggestionResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_name_validation_response.go b/go/futureagi/model_experiment_name_validation_response.go new file mode 100644 index 0000000..84e5428 --- /dev/null +++ b/go/futureagi/model_experiment_name_validation_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentNameValidationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentNameValidationResponse{} + +// ExperimentNameValidationResponse struct for ExperimentNameValidationResponse +type ExperimentNameValidationResponse struct { + Status bool `json:"status"` + Result ExperimentNameValidationResult `json:"result"` +} + +type _ExperimentNameValidationResponse ExperimentNameValidationResponse + +// NewExperimentNameValidationResponse instantiates a new ExperimentNameValidationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentNameValidationResponse(status bool, result ExperimentNameValidationResult) *ExperimentNameValidationResponse { + this := ExperimentNameValidationResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentNameValidationResponseWithDefaults instantiates a new ExperimentNameValidationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentNameValidationResponseWithDefaults() *ExperimentNameValidationResponse { + this := ExperimentNameValidationResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentNameValidationResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentNameValidationResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentNameValidationResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentNameValidationResponse) GetResult() ExperimentNameValidationResult { + if o == nil { + var ret ExperimentNameValidationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentNameValidationResponse) GetResultOk() (*ExperimentNameValidationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentNameValidationResponse) SetResult(v ExperimentNameValidationResult) { + o.Result = v +} + +func (o ExperimentNameValidationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentNameValidationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentNameValidationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentNameValidationResponse := _ExperimentNameValidationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentNameValidationResponse) + + if err != nil { + return err + } + + *o = ExperimentNameValidationResponse(varExperimentNameValidationResponse) + + return err +} + +type NullableExperimentNameValidationResponse struct { + value *ExperimentNameValidationResponse + isSet bool +} + +func (v NullableExperimentNameValidationResponse) Get() *ExperimentNameValidationResponse { + return v.value +} + +func (v *NullableExperimentNameValidationResponse) Set(val *ExperimentNameValidationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentNameValidationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentNameValidationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentNameValidationResponse(val *ExperimentNameValidationResponse) *NullableExperimentNameValidationResponse { + return &NullableExperimentNameValidationResponse{value: val, isSet: true} +} + +func (v NullableExperimentNameValidationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentNameValidationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_name_validation_result.go b/go/futureagi/model_experiment_name_validation_result.go new file mode 100644 index 0000000..43c0869 --- /dev/null +++ b/go/futureagi/model_experiment_name_validation_result.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentNameValidationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentNameValidationResult{} + +// ExperimentNameValidationResult struct for ExperimentNameValidationResult +type ExperimentNameValidationResult struct { + IsValid bool `json:"is_valid"` + Message *string `json:"message,omitempty"` +} + +type _ExperimentNameValidationResult ExperimentNameValidationResult + +// NewExperimentNameValidationResult instantiates a new ExperimentNameValidationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentNameValidationResult(isValid bool) *ExperimentNameValidationResult { + this := ExperimentNameValidationResult{} + this.IsValid = isValid + return &this +} + +// NewExperimentNameValidationResultWithDefaults instantiates a new ExperimentNameValidationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentNameValidationResultWithDefaults() *ExperimentNameValidationResult { + this := ExperimentNameValidationResult{} + return &this +} + +// GetIsValid returns the IsValid field value +func (o *ExperimentNameValidationResult) GetIsValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsValid +} + +// GetIsValidOk returns a tuple with the IsValid field value +// and a boolean to check if the value has been set. +func (o *ExperimentNameValidationResult) GetIsValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsValid, true +} + +// SetIsValid sets field value +func (o *ExperimentNameValidationResult) SetIsValid(v bool) { + o.IsValid = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ExperimentNameValidationResult) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentNameValidationResult) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ExperimentNameValidationResult) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ExperimentNameValidationResult) SetMessage(v string) { + o.Message = &v +} + +func (o ExperimentNameValidationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentNameValidationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["is_valid"] = o.IsValid + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +func (o *ExperimentNameValidationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "is_valid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentNameValidationResult := _ExperimentNameValidationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentNameValidationResult) + + if err != nil { + return err + } + + *o = ExperimentNameValidationResult(varExperimentNameValidationResult) + + return err +} + +type NullableExperimentNameValidationResult struct { + value *ExperimentNameValidationResult + isSet bool +} + +func (v NullableExperimentNameValidationResult) Get() *ExperimentNameValidationResult { + return v.value +} + +func (v *NullableExperimentNameValidationResult) Set(val *ExperimentNameValidationResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentNameValidationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentNameValidationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentNameValidationResult(val *ExperimentNameValidationResult) *NullableExperimentNameValidationResult { + return &NullableExperimentNameValidationResult{value: val, isSet: true} +} + +func (v NullableExperimentNameValidationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentNameValidationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_rerun_cells.go b/go/futureagi/model_experiment_rerun_cells.go new file mode 100644 index 0000000..fd629d6 --- /dev/null +++ b/go/futureagi/model_experiment_rerun_cells.go @@ -0,0 +1,237 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentRerunCells type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentRerunCells{} + +// ExperimentRerunCells struct for ExperimentRerunCells +type ExperimentRerunCells struct { + SourceIds []string `json:"source_ids,omitempty"` + Cells []RerunCellEntry `json:"cells,omitempty"` + UserEvalMetricIds []string `json:"user_eval_metric_ids,omitempty"` + FailedOnly *bool `json:"failed_only,omitempty"` +} + +// NewExperimentRerunCells instantiates a new ExperimentRerunCells object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentRerunCells() *ExperimentRerunCells { + this := ExperimentRerunCells{} + var failedOnly bool = false + this.FailedOnly = &failedOnly + return &this +} + +// NewExperimentRerunCellsWithDefaults instantiates a new ExperimentRerunCells object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentRerunCellsWithDefaults() *ExperimentRerunCells { + this := ExperimentRerunCells{} + var failedOnly bool = false + this.FailedOnly = &failedOnly + return &this +} + +// GetSourceIds returns the SourceIds field value if set, zero value otherwise. +func (o *ExperimentRerunCells) GetSourceIds() []string { + if o == nil || IsNil(o.SourceIds) { + var ret []string + return ret + } + return o.SourceIds +} + +// GetSourceIdsOk returns a tuple with the SourceIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRerunCells) GetSourceIdsOk() ([]string, bool) { + if o == nil || IsNil(o.SourceIds) { + return nil, false + } + return o.SourceIds, true +} + +// HasSourceIds returns a boolean if a field has been set. +func (o *ExperimentRerunCells) HasSourceIds() bool { + if o != nil && !IsNil(o.SourceIds) { + return true + } + + return false +} + +// SetSourceIds gets a reference to the given []string and assigns it to the SourceIds field. +func (o *ExperimentRerunCells) SetSourceIds(v []string) { + o.SourceIds = v +} + +// GetCells returns the Cells field value if set, zero value otherwise. +func (o *ExperimentRerunCells) GetCells() []RerunCellEntry { + if o == nil || IsNil(o.Cells) { + var ret []RerunCellEntry + return ret + } + return o.Cells +} + +// GetCellsOk returns a tuple with the Cells field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRerunCells) GetCellsOk() ([]RerunCellEntry, bool) { + if o == nil || IsNil(o.Cells) { + return nil, false + } + return o.Cells, true +} + +// HasCells returns a boolean if a field has been set. +func (o *ExperimentRerunCells) HasCells() bool { + if o != nil && !IsNil(o.Cells) { + return true + } + + return false +} + +// SetCells gets a reference to the given []RerunCellEntry and assigns it to the Cells field. +func (o *ExperimentRerunCells) SetCells(v []RerunCellEntry) { + o.Cells = v +} + +// GetUserEvalMetricIds returns the UserEvalMetricIds field value if set, zero value otherwise. +func (o *ExperimentRerunCells) GetUserEvalMetricIds() []string { + if o == nil || IsNil(o.UserEvalMetricIds) { + var ret []string + return ret + } + return o.UserEvalMetricIds +} + +// GetUserEvalMetricIdsOk returns a tuple with the UserEvalMetricIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRerunCells) GetUserEvalMetricIdsOk() ([]string, bool) { + if o == nil || IsNil(o.UserEvalMetricIds) { + return nil, false + } + return o.UserEvalMetricIds, true +} + +// HasUserEvalMetricIds returns a boolean if a field has been set. +func (o *ExperimentRerunCells) HasUserEvalMetricIds() bool { + if o != nil && !IsNil(o.UserEvalMetricIds) { + return true + } + + return false +} + +// SetUserEvalMetricIds gets a reference to the given []string and assigns it to the UserEvalMetricIds field. +func (o *ExperimentRerunCells) SetUserEvalMetricIds(v []string) { + o.UserEvalMetricIds = v +} + +// GetFailedOnly returns the FailedOnly field value if set, zero value otherwise. +func (o *ExperimentRerunCells) GetFailedOnly() bool { + if o == nil || IsNil(o.FailedOnly) { + var ret bool + return ret + } + return *o.FailedOnly +} + +// GetFailedOnlyOk returns a tuple with the FailedOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRerunCells) GetFailedOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.FailedOnly) { + return nil, false + } + return o.FailedOnly, true +} + +// HasFailedOnly returns a boolean if a field has been set. +func (o *ExperimentRerunCells) HasFailedOnly() bool { + if o != nil && !IsNil(o.FailedOnly) { + return true + } + + return false +} + +// SetFailedOnly gets a reference to the given bool and assigns it to the FailedOnly field. +func (o *ExperimentRerunCells) SetFailedOnly(v bool) { + o.FailedOnly = &v +} + +func (o ExperimentRerunCells) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentRerunCells) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SourceIds) { + toSerialize["source_ids"] = o.SourceIds + } + if !IsNil(o.Cells) { + toSerialize["cells"] = o.Cells + } + if !IsNil(o.UserEvalMetricIds) { + toSerialize["user_eval_metric_ids"] = o.UserEvalMetricIds + } + if !IsNil(o.FailedOnly) { + toSerialize["failed_only"] = o.FailedOnly + } + return toSerialize, nil +} + +type NullableExperimentRerunCells struct { + value *ExperimentRerunCells + isSet bool +} + +func (v NullableExperimentRerunCells) Get() *ExperimentRerunCells { + return v.value +} + +func (v *NullableExperimentRerunCells) Set(val *ExperimentRerunCells) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentRerunCells) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentRerunCells) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentRerunCells(val *ExperimentRerunCells) *NullableExperimentRerunCells { + return &NullableExperimentRerunCells{value: val, isSet: true} +} + +func (v NullableExperimentRerunCells) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentRerunCells) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_rerun_request.go b/go/futureagi/model_experiment_rerun_request.go new file mode 100644 index 0000000..15f18f2 --- /dev/null +++ b/go/futureagi/model_experiment_rerun_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentRerunRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentRerunRequest{} + +// ExperimentRerunRequest struct for ExperimentRerunRequest +type ExperimentRerunRequest struct { + ExperimentIds []string `json:"experiment_ids"` + UseTemporal *bool `json:"use_temporal,omitempty"` + MaxConcurrentRows *int32 `json:"max_concurrent_rows,omitempty"` +} + +type _ExperimentRerunRequest ExperimentRerunRequest + +// NewExperimentRerunRequest instantiates a new ExperimentRerunRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentRerunRequest(experimentIds []string) *ExperimentRerunRequest { + this := ExperimentRerunRequest{} + this.ExperimentIds = experimentIds + var useTemporal bool = true + this.UseTemporal = &useTemporal + return &this +} + +// NewExperimentRerunRequestWithDefaults instantiates a new ExperimentRerunRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentRerunRequestWithDefaults() *ExperimentRerunRequest { + this := ExperimentRerunRequest{} + var useTemporal bool = true + this.UseTemporal = &useTemporal + return &this +} + +// GetExperimentIds returns the ExperimentIds field value +func (o *ExperimentRerunRequest) GetExperimentIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ExperimentIds +} + +// GetExperimentIdsOk returns a tuple with the ExperimentIds field value +// and a boolean to check if the value has been set. +func (o *ExperimentRerunRequest) GetExperimentIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ExperimentIds, true +} + +// SetExperimentIds sets field value +func (o *ExperimentRerunRequest) SetExperimentIds(v []string) { + o.ExperimentIds = v +} + +// GetUseTemporal returns the UseTemporal field value if set, zero value otherwise. +func (o *ExperimentRerunRequest) GetUseTemporal() bool { + if o == nil || IsNil(o.UseTemporal) { + var ret bool + return ret + } + return *o.UseTemporal +} + +// GetUseTemporalOk returns a tuple with the UseTemporal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRerunRequest) GetUseTemporalOk() (*bool, bool) { + if o == nil || IsNil(o.UseTemporal) { + return nil, false + } + return o.UseTemporal, true +} + +// HasUseTemporal returns a boolean if a field has been set. +func (o *ExperimentRerunRequest) HasUseTemporal() bool { + if o != nil && !IsNil(o.UseTemporal) { + return true + } + + return false +} + +// SetUseTemporal gets a reference to the given bool and assigns it to the UseTemporal field. +func (o *ExperimentRerunRequest) SetUseTemporal(v bool) { + o.UseTemporal = &v +} + +// GetMaxConcurrentRows returns the MaxConcurrentRows field value if set, zero value otherwise. +func (o *ExperimentRerunRequest) GetMaxConcurrentRows() int32 { + if o == nil || IsNil(o.MaxConcurrentRows) { + var ret int32 + return ret + } + return *o.MaxConcurrentRows +} + +// GetMaxConcurrentRowsOk returns a tuple with the MaxConcurrentRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRerunRequest) GetMaxConcurrentRowsOk() (*int32, bool) { + if o == nil || IsNil(o.MaxConcurrentRows) { + return nil, false + } + return o.MaxConcurrentRows, true +} + +// HasMaxConcurrentRows returns a boolean if a field has been set. +func (o *ExperimentRerunRequest) HasMaxConcurrentRows() bool { + if o != nil && !IsNil(o.MaxConcurrentRows) { + return true + } + + return false +} + +// SetMaxConcurrentRows gets a reference to the given int32 and assigns it to the MaxConcurrentRows field. +func (o *ExperimentRerunRequest) SetMaxConcurrentRows(v int32) { + o.MaxConcurrentRows = &v +} + +func (o ExperimentRerunRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentRerunRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["experiment_ids"] = o.ExperimentIds + if !IsNil(o.UseTemporal) { + toSerialize["use_temporal"] = o.UseTemporal + } + if !IsNil(o.MaxConcurrentRows) { + toSerialize["max_concurrent_rows"] = o.MaxConcurrentRows + } + return toSerialize, nil +} + +func (o *ExperimentRerunRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "experiment_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentRerunRequest := _ExperimentRerunRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentRerunRequest) + + if err != nil { + return err + } + + *o = ExperimentRerunRequest(varExperimentRerunRequest) + + return err +} + +type NullableExperimentRerunRequest struct { + value *ExperimentRerunRequest + isSet bool +} + +func (v NullableExperimentRerunRequest) Get() *ExperimentRerunRequest { + return v.value +} + +func (v *NullableExperimentRerunRequest) Set(val *ExperimentRerunRequest) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentRerunRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentRerunRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentRerunRequest(val *ExperimentRerunRequest) *NullableExperimentRerunRequest { + return &NullableExperimentRerunRequest{value: val, isSet: true} +} + +func (v NullableExperimentRerunRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentRerunRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_row_diff_cell.go b/go/futureagi/model_experiment_row_diff_cell.go new file mode 100644 index 0000000..1ab87b4 --- /dev/null +++ b/go/futureagi/model_experiment_row_diff_cell.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentRowDiffCell type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentRowDiffCell{} + +// ExperimentRowDiffCell struct for ExperimentRowDiffCell +type ExperimentRowDiffCell struct { + CellValue map[string]interface{} `json:"cell_value,omitempty"` + CellDiffValue map[string]interface{} `json:"cell_diff_value,omitempty"` + Status *string `json:"status,omitempty"` + ValueInfos map[string]interface{} `json:"value_infos,omitempty"` +} + +// NewExperimentRowDiffCell instantiates a new ExperimentRowDiffCell object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentRowDiffCell() *ExperimentRowDiffCell { + this := ExperimentRowDiffCell{} + return &this +} + +// NewExperimentRowDiffCellWithDefaults instantiates a new ExperimentRowDiffCell object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentRowDiffCellWithDefaults() *ExperimentRowDiffCell { + this := ExperimentRowDiffCell{} + return &this +} + +// GetCellValue returns the CellValue field value if set, zero value otherwise. +func (o *ExperimentRowDiffCell) GetCellValue() map[string]interface{} { + if o == nil || IsNil(o.CellValue) { + var ret map[string]interface{} + return ret + } + return o.CellValue +} + +// GetCellValueOk returns a tuple with the CellValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRowDiffCell) GetCellValueOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CellValue) { + return map[string]interface{}{}, false + } + return o.CellValue, true +} + +// HasCellValue returns a boolean if a field has been set. +func (o *ExperimentRowDiffCell) HasCellValue() bool { + if o != nil && !IsNil(o.CellValue) { + return true + } + + return false +} + +// SetCellValue gets a reference to the given map[string]interface{} and assigns it to the CellValue field. +func (o *ExperimentRowDiffCell) SetCellValue(v map[string]interface{}) { + o.CellValue = v +} + +// GetCellDiffValue returns the CellDiffValue field value if set, zero value otherwise. +func (o *ExperimentRowDiffCell) GetCellDiffValue() map[string]interface{} { + if o == nil || IsNil(o.CellDiffValue) { + var ret map[string]interface{} + return ret + } + return o.CellDiffValue +} + +// GetCellDiffValueOk returns a tuple with the CellDiffValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRowDiffCell) GetCellDiffValueOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CellDiffValue) { + return map[string]interface{}{}, false + } + return o.CellDiffValue, true +} + +// HasCellDiffValue returns a boolean if a field has been set. +func (o *ExperimentRowDiffCell) HasCellDiffValue() bool { + if o != nil && !IsNil(o.CellDiffValue) { + return true + } + + return false +} + +// SetCellDiffValue gets a reference to the given map[string]interface{} and assigns it to the CellDiffValue field. +func (o *ExperimentRowDiffCell) SetCellDiffValue(v map[string]interface{}) { + o.CellDiffValue = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExperimentRowDiffCell) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRowDiffCell) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExperimentRowDiffCell) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExperimentRowDiffCell) SetStatus(v string) { + o.Status = &v +} + +// GetValueInfos returns the ValueInfos field value if set, zero value otherwise. +func (o *ExperimentRowDiffCell) GetValueInfos() map[string]interface{} { + if o == nil || IsNil(o.ValueInfos) { + var ret map[string]interface{} + return ret + } + return o.ValueInfos +} + +// GetValueInfosOk returns a tuple with the ValueInfos field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentRowDiffCell) GetValueInfosOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ValueInfos) { + return map[string]interface{}{}, false + } + return o.ValueInfos, true +} + +// HasValueInfos returns a boolean if a field has been set. +func (o *ExperimentRowDiffCell) HasValueInfos() bool { + if o != nil && !IsNil(o.ValueInfos) { + return true + } + + return false +} + +// SetValueInfos gets a reference to the given map[string]interface{} and assigns it to the ValueInfos field. +func (o *ExperimentRowDiffCell) SetValueInfos(v map[string]interface{}) { + o.ValueInfos = v +} + +func (o ExperimentRowDiffCell) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentRowDiffCell) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CellValue) { + toSerialize["cell_value"] = o.CellValue + } + if !IsNil(o.CellDiffValue) { + toSerialize["cell_diff_value"] = o.CellDiffValue + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.ValueInfos) { + toSerialize["value_infos"] = o.ValueInfos + } + return toSerialize, nil +} + +type NullableExperimentRowDiffCell struct { + value *ExperimentRowDiffCell + isSet bool +} + +func (v NullableExperimentRowDiffCell) Get() *ExperimentRowDiffCell { + return v.value +} + +func (v *NullableExperimentRowDiffCell) Set(val *ExperimentRowDiffCell) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentRowDiffCell) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentRowDiffCell) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentRowDiffCell(val *ExperimentRowDiffCell) *NullableExperimentRowDiffCell { + return &NullableExperimentRowDiffCell{value: val, isSet: true} +} + +func (v NullableExperimentRowDiffCell) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentRowDiffCell) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_row_diff_response.go b/go/futureagi/model_experiment_row_diff_response.go new file mode 100644 index 0000000..5c38333 --- /dev/null +++ b/go/futureagi/model_experiment_row_diff_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentRowDiffResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentRowDiffResponse{} + +// ExperimentRowDiffResponse struct for ExperimentRowDiffResponse +type ExperimentRowDiffResponse struct { + Status bool `json:"status"` + Result map[string]map[string]ExperimentRowDiffCell `json:"result"` +} + +type _ExperimentRowDiffResponse ExperimentRowDiffResponse + +// NewExperimentRowDiffResponse instantiates a new ExperimentRowDiffResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentRowDiffResponse(status bool, result map[string]map[string]ExperimentRowDiffCell) *ExperimentRowDiffResponse { + this := ExperimentRowDiffResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentRowDiffResponseWithDefaults instantiates a new ExperimentRowDiffResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentRowDiffResponseWithDefaults() *ExperimentRowDiffResponse { + this := ExperimentRowDiffResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentRowDiffResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentRowDiffResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentRowDiffResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentRowDiffResponse) GetResult() map[string]map[string]ExperimentRowDiffCell { + if o == nil { + var ret map[string]map[string]ExperimentRowDiffCell + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentRowDiffResponse) GetResultOk() (*map[string]map[string]ExperimentRowDiffCell, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentRowDiffResponse) SetResult(v map[string]map[string]ExperimentRowDiffCell) { + o.Result = v +} + +func (o ExperimentRowDiffResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentRowDiffResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentRowDiffResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentRowDiffResponse := _ExperimentRowDiffResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentRowDiffResponse) + + if err != nil { + return err + } + + *o = ExperimentRowDiffResponse(varExperimentRowDiffResponse) + + return err +} + +type NullableExperimentRowDiffResponse struct { + value *ExperimentRowDiffResponse + isSet bool +} + +func (v NullableExperimentRowDiffResponse) Get() *ExperimentRowDiffResponse { + return v.value +} + +func (v *NullableExperimentRowDiffResponse) Set(val *ExperimentRowDiffResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentRowDiffResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentRowDiffResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentRowDiffResponse(val *ExperimentRowDiffResponse) *NullableExperimentRowDiffResponse { + return &NullableExperimentRowDiffResponse{value: val, isSet: true} +} + +func (v NullableExperimentRowDiffResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentRowDiffResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_stats_column_config.go b/go/futureagi/model_experiment_stats_column_config.go new file mode 100644 index 0000000..8990901 --- /dev/null +++ b/go/futureagi/model_experiment_stats_column_config.go @@ -0,0 +1,323 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStatsColumnConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStatsColumnConfig{} + +// ExperimentStatsColumnConfig struct for ExperimentStatsColumnConfig +type ExperimentStatsColumnConfig struct { + Status *string `json:"status,omitempty"` + Name string `json:"name"` + ReverseOutput *bool `json:"reverse_output,omitempty"` + OutputType NullableString `json:"output_type,omitempty"` + EvalTemplateId NullableString `json:"eval_template_id,omitempty"` +} + +type _ExperimentStatsColumnConfig ExperimentStatsColumnConfig + +// NewExperimentStatsColumnConfig instantiates a new ExperimentStatsColumnConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStatsColumnConfig(name string) *ExperimentStatsColumnConfig { + this := ExperimentStatsColumnConfig{} + this.Name = name + return &this +} + +// NewExperimentStatsColumnConfigWithDefaults instantiates a new ExperimentStatsColumnConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStatsColumnConfigWithDefaults() *ExperimentStatsColumnConfig { + this := ExperimentStatsColumnConfig{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExperimentStatsColumnConfig) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentStatsColumnConfig) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExperimentStatsColumnConfig) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExperimentStatsColumnConfig) SetStatus(v string) { + o.Status = &v +} + +// GetName returns the Name field value +func (o *ExperimentStatsColumnConfig) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExperimentStatsColumnConfig) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExperimentStatsColumnConfig) SetName(v string) { + o.Name = v +} + +// GetReverseOutput returns the ReverseOutput field value if set, zero value otherwise. +func (o *ExperimentStatsColumnConfig) GetReverseOutput() bool { + if o == nil || IsNil(o.ReverseOutput) { + var ret bool + return ret + } + return *o.ReverseOutput +} + +// GetReverseOutputOk returns a tuple with the ReverseOutput field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentStatsColumnConfig) GetReverseOutputOk() (*bool, bool) { + if o == nil || IsNil(o.ReverseOutput) { + return nil, false + } + return o.ReverseOutput, true +} + +// HasReverseOutput returns a boolean if a field has been set. +func (o *ExperimentStatsColumnConfig) HasReverseOutput() bool { + if o != nil && !IsNil(o.ReverseOutput) { + return true + } + + return false +} + +// SetReverseOutput gets a reference to the given bool and assigns it to the ReverseOutput field. +func (o *ExperimentStatsColumnConfig) SetReverseOutput(v bool) { + o.ReverseOutput = &v +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentStatsColumnConfig) GetOutputType() string { + if o == nil || IsNil(o.OutputType.Get()) { + var ret string + return ret + } + return *o.OutputType.Get() +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentStatsColumnConfig) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OutputType.Get(), o.OutputType.IsSet() +} + +// HasOutputType returns a boolean if a field has been set. +func (o *ExperimentStatsColumnConfig) HasOutputType() bool { + if o != nil && o.OutputType.IsSet() { + return true + } + + return false +} + +// SetOutputType gets a reference to the given NullableString and assigns it to the OutputType field. +func (o *ExperimentStatsColumnConfig) SetOutputType(v string) { + o.OutputType.Set(&v) +} + +// SetOutputTypeNil sets the value for OutputType to be an explicit nil +func (o *ExperimentStatsColumnConfig) SetOutputTypeNil() { + o.OutputType.Set(nil) +} + +// UnsetOutputType ensures that no value is present for OutputType, not even an explicit nil +func (o *ExperimentStatsColumnConfig) UnsetOutputType() { + o.OutputType.Unset() +} + +// GetEvalTemplateId returns the EvalTemplateId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentStatsColumnConfig) GetEvalTemplateId() string { + if o == nil || IsNil(o.EvalTemplateId.Get()) { + var ret string + return ret + } + return *o.EvalTemplateId.Get() +} + +// GetEvalTemplateIdOk returns a tuple with the EvalTemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentStatsColumnConfig) GetEvalTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalTemplateId.Get(), o.EvalTemplateId.IsSet() +} + +// HasEvalTemplateId returns a boolean if a field has been set. +func (o *ExperimentStatsColumnConfig) HasEvalTemplateId() bool { + if o != nil && o.EvalTemplateId.IsSet() { + return true + } + + return false +} + +// SetEvalTemplateId gets a reference to the given NullableString and assigns it to the EvalTemplateId field. +func (o *ExperimentStatsColumnConfig) SetEvalTemplateId(v string) { + o.EvalTemplateId.Set(&v) +} + +// SetEvalTemplateIdNil sets the value for EvalTemplateId to be an explicit nil +func (o *ExperimentStatsColumnConfig) SetEvalTemplateIdNil() { + o.EvalTemplateId.Set(nil) +} + +// UnsetEvalTemplateId ensures that no value is present for EvalTemplateId, not even an explicit nil +func (o *ExperimentStatsColumnConfig) UnsetEvalTemplateId() { + o.EvalTemplateId.Unset() +} + +func (o ExperimentStatsColumnConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStatsColumnConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["name"] = o.Name + if !IsNil(o.ReverseOutput) { + toSerialize["reverse_output"] = o.ReverseOutput + } + if o.OutputType.IsSet() { + toSerialize["output_type"] = o.OutputType.Get() + } + if o.EvalTemplateId.IsSet() { + toSerialize["eval_template_id"] = o.EvalTemplateId.Get() + } + return toSerialize, nil +} + +func (o *ExperimentStatsColumnConfig) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStatsColumnConfig := _ExperimentStatsColumnConfig{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStatsColumnConfig) + + if err != nil { + return err + } + + *o = ExperimentStatsColumnConfig(varExperimentStatsColumnConfig) + + return err +} + +type NullableExperimentStatsColumnConfig struct { + value *ExperimentStatsColumnConfig + isSet bool +} + +func (v NullableExperimentStatsColumnConfig) Get() *ExperimentStatsColumnConfig { + return v.value +} + +func (v *NullableExperimentStatsColumnConfig) Set(val *ExperimentStatsColumnConfig) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStatsColumnConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStatsColumnConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStatsColumnConfig(val *ExperimentStatsColumnConfig) *NullableExperimentStatsColumnConfig { + return &NullableExperimentStatsColumnConfig{value: val, isSet: true} +} + +func (v NullableExperimentStatsColumnConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStatsColumnConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_stats_metadata.go b/go/futureagi/model_experiment_stats_metadata.go new file mode 100644 index 0000000..98be09a --- /dev/null +++ b/go/futureagi/model_experiment_stats_metadata.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStatsMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStatsMetadata{} + +// ExperimentStatsMetadata struct for ExperimentStatsMetadata +type ExperimentStatsMetadata struct { + IsWinnerChosen bool `json:"is_winner_chosen"` +} + +type _ExperimentStatsMetadata ExperimentStatsMetadata + +// NewExperimentStatsMetadata instantiates a new ExperimentStatsMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStatsMetadata(isWinnerChosen bool) *ExperimentStatsMetadata { + this := ExperimentStatsMetadata{} + this.IsWinnerChosen = isWinnerChosen + return &this +} + +// NewExperimentStatsMetadataWithDefaults instantiates a new ExperimentStatsMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStatsMetadataWithDefaults() *ExperimentStatsMetadata { + this := ExperimentStatsMetadata{} + return &this +} + +// GetIsWinnerChosen returns the IsWinnerChosen field value +func (o *ExperimentStatsMetadata) GetIsWinnerChosen() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsWinnerChosen +} + +// GetIsWinnerChosenOk returns a tuple with the IsWinnerChosen field value +// and a boolean to check if the value has been set. +func (o *ExperimentStatsMetadata) GetIsWinnerChosenOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsWinnerChosen, true +} + +// SetIsWinnerChosen sets field value +func (o *ExperimentStatsMetadata) SetIsWinnerChosen(v bool) { + o.IsWinnerChosen = v +} + +func (o ExperimentStatsMetadata) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStatsMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["is_winner_chosen"] = o.IsWinnerChosen + return toSerialize, nil +} + +func (o *ExperimentStatsMetadata) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "is_winner_chosen", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStatsMetadata := _ExperimentStatsMetadata{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStatsMetadata) + + if err != nil { + return err + } + + *o = ExperimentStatsMetadata(varExperimentStatsMetadata) + + return err +} + +type NullableExperimentStatsMetadata struct { + value *ExperimentStatsMetadata + isSet bool +} + +func (v NullableExperimentStatsMetadata) Get() *ExperimentStatsMetadata { + return v.value +} + +func (v *NullableExperimentStatsMetadata) Set(val *ExperimentStatsMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStatsMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStatsMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStatsMetadata(val *ExperimentStatsMetadata) *NullableExperimentStatsMetadata { + return &NullableExperimentStatsMetadata{value: val, isSet: true} +} + +func (v NullableExperimentStatsMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStatsMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_stats_response.go b/go/futureagi/model_experiment_stats_response.go new file mode 100644 index 0000000..ae14890 --- /dev/null +++ b/go/futureagi/model_experiment_stats_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStatsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStatsResponse{} + +// ExperimentStatsResponse struct for ExperimentStatsResponse +type ExperimentStatsResponse struct { + Status bool `json:"status"` + Result ExperimentStatsResult `json:"result"` +} + +type _ExperimentStatsResponse ExperimentStatsResponse + +// NewExperimentStatsResponse instantiates a new ExperimentStatsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStatsResponse(status bool, result ExperimentStatsResult) *ExperimentStatsResponse { + this := ExperimentStatsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentStatsResponseWithDefaults instantiates a new ExperimentStatsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStatsResponseWithDefaults() *ExperimentStatsResponse { + this := ExperimentStatsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentStatsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentStatsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentStatsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentStatsResponse) GetResult() ExperimentStatsResult { + if o == nil { + var ret ExperimentStatsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentStatsResponse) GetResultOk() (*ExperimentStatsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentStatsResponse) SetResult(v ExperimentStatsResult) { + o.Result = v +} + +func (o ExperimentStatsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStatsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentStatsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStatsResponse := _ExperimentStatsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStatsResponse) + + if err != nil { + return err + } + + *o = ExperimentStatsResponse(varExperimentStatsResponse) + + return err +} + +type NullableExperimentStatsResponse struct { + value *ExperimentStatsResponse + isSet bool +} + +func (v NullableExperimentStatsResponse) Get() *ExperimentStatsResponse { + return v.value +} + +func (v *NullableExperimentStatsResponse) Set(val *ExperimentStatsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStatsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStatsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStatsResponse(val *ExperimentStatsResponse) *NullableExperimentStatsResponse { + return &NullableExperimentStatsResponse{value: val, isSet: true} +} + +func (v NullableExperimentStatsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStatsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_stats_result.go b/go/futureagi/model_experiment_stats_result.go new file mode 100644 index 0000000..6c633b7 --- /dev/null +++ b/go/futureagi/model_experiment_stats_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStatsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStatsResult{} + +// ExperimentStatsResult struct for ExperimentStatsResult +type ExperimentStatsResult struct { + ColumnConfig []ExperimentStatsColumnConfig `json:"column_config"` + TableData []map[string]interface{} `json:"table_data"` + Metadata ExperimentStatsMetadata `json:"metadata"` +} + +type _ExperimentStatsResult ExperimentStatsResult + +// NewExperimentStatsResult instantiates a new ExperimentStatsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStatsResult(columnConfig []ExperimentStatsColumnConfig, tableData []map[string]interface{}, metadata ExperimentStatsMetadata) *ExperimentStatsResult { + this := ExperimentStatsResult{} + this.ColumnConfig = columnConfig + this.TableData = tableData + this.Metadata = metadata + return &this +} + +// NewExperimentStatsResultWithDefaults instantiates a new ExperimentStatsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStatsResultWithDefaults() *ExperimentStatsResult { + this := ExperimentStatsResult{} + return &this +} + +// GetColumnConfig returns the ColumnConfig field value +func (o *ExperimentStatsResult) GetColumnConfig() []ExperimentStatsColumnConfig { + if o == nil { + var ret []ExperimentStatsColumnConfig + return ret + } + + return o.ColumnConfig +} + +// GetColumnConfigOk returns a tuple with the ColumnConfig field value +// and a boolean to check if the value has been set. +func (o *ExperimentStatsResult) GetColumnConfigOk() ([]ExperimentStatsColumnConfig, bool) { + if o == nil { + return nil, false + } + return o.ColumnConfig, true +} + +// SetColumnConfig sets field value +func (o *ExperimentStatsResult) SetColumnConfig(v []ExperimentStatsColumnConfig) { + o.ColumnConfig = v +} + +// GetTableData returns the TableData field value +func (o *ExperimentStatsResult) GetTableData() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.TableData +} + +// GetTableDataOk returns a tuple with the TableData field value +// and a boolean to check if the value has been set. +func (o *ExperimentStatsResult) GetTableDataOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.TableData, true +} + +// SetTableData sets field value +func (o *ExperimentStatsResult) SetTableData(v []map[string]interface{}) { + o.TableData = v +} + +// GetMetadata returns the Metadata field value +func (o *ExperimentStatsResult) GetMetadata() ExperimentStatsMetadata { + if o == nil { + var ret ExperimentStatsMetadata + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *ExperimentStatsResult) GetMetadataOk() (*ExperimentStatsMetadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value +func (o *ExperimentStatsResult) SetMetadata(v ExperimentStatsMetadata) { + o.Metadata = v +} + +func (o ExperimentStatsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStatsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_config"] = o.ColumnConfig + toSerialize["table_data"] = o.TableData + toSerialize["metadata"] = o.Metadata + return toSerialize, nil +} + +func (o *ExperimentStatsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_config", + "table_data", + "metadata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStatsResult := _ExperimentStatsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStatsResult) + + if err != nil { + return err + } + + *o = ExperimentStatsResult(varExperimentStatsResult) + + return err +} + +type NullableExperimentStatsResult struct { + value *ExperimentStatsResult + isSet bool +} + +func (v NullableExperimentStatsResult) Get() *ExperimentStatsResult { + return v.value +} + +func (v *NullableExperimentStatsResult) Set(val *ExperimentStatsResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStatsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStatsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStatsResult(val *ExperimentStatsResult) *NullableExperimentStatsResult { + return &NullableExperimentStatsResult{value: val, isSet: true} +} + +func (v NullableExperimentStatsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStatsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_stop_response.go b/go/futureagi/model_experiment_stop_response.go new file mode 100644 index 0000000..c0ebd51 --- /dev/null +++ b/go/futureagi/model_experiment_stop_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStopResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStopResponse{} + +// ExperimentStopResponse struct for ExperimentStopResponse +type ExperimentStopResponse struct { + Status bool `json:"status"` + Result ExperimentStopResult `json:"result"` +} + +type _ExperimentStopResponse ExperimentStopResponse + +// NewExperimentStopResponse instantiates a new ExperimentStopResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStopResponse(status bool, result ExperimentStopResult) *ExperimentStopResponse { + this := ExperimentStopResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentStopResponseWithDefaults instantiates a new ExperimentStopResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStopResponseWithDefaults() *ExperimentStopResponse { + this := ExperimentStopResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentStopResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentStopResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentStopResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentStopResponse) GetResult() ExperimentStopResult { + if o == nil { + var ret ExperimentStopResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentStopResponse) GetResultOk() (*ExperimentStopResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentStopResponse) SetResult(v ExperimentStopResult) { + o.Result = v +} + +func (o ExperimentStopResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStopResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentStopResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStopResponse := _ExperimentStopResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStopResponse) + + if err != nil { + return err + } + + *o = ExperimentStopResponse(varExperimentStopResponse) + + return err +} + +type NullableExperimentStopResponse struct { + value *ExperimentStopResponse + isSet bool +} + +func (v NullableExperimentStopResponse) Get() *ExperimentStopResponse { + return v.value +} + +func (v *NullableExperimentStopResponse) Set(val *ExperimentStopResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStopResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStopResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStopResponse(val *ExperimentStopResponse) *NullableExperimentStopResponse { + return &NullableExperimentStopResponse{value: val, isSet: true} +} + +func (v NullableExperimentStopResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStopResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_stop_result.go b/go/futureagi/model_experiment_stop_result.go new file mode 100644 index 0000000..f512e35 --- /dev/null +++ b/go/futureagi/model_experiment_stop_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStopResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStopResult{} + +// ExperimentStopResult struct for ExperimentStopResult +type ExperimentStopResult struct { + Message string `json:"message"` + ExperimentId string `json:"experiment_id"` + WorkflowsCancelled ExperimentStopWorkflowsCancelled `json:"workflows_cancelled"` +} + +type _ExperimentStopResult ExperimentStopResult + +// NewExperimentStopResult instantiates a new ExperimentStopResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStopResult(message string, experimentId string, workflowsCancelled ExperimentStopWorkflowsCancelled) *ExperimentStopResult { + this := ExperimentStopResult{} + this.Message = message + this.ExperimentId = experimentId + this.WorkflowsCancelled = workflowsCancelled + return &this +} + +// NewExperimentStopResultWithDefaults instantiates a new ExperimentStopResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStopResultWithDefaults() *ExperimentStopResult { + this := ExperimentStopResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *ExperimentStopResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ExperimentStopResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ExperimentStopResult) SetMessage(v string) { + o.Message = v +} + +// GetExperimentId returns the ExperimentId field value +func (o *ExperimentStopResult) GetExperimentId() string { + if o == nil { + var ret string + return ret + } + + return o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value +// and a boolean to check if the value has been set. +func (o *ExperimentStopResult) GetExperimentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExperimentId, true +} + +// SetExperimentId sets field value +func (o *ExperimentStopResult) SetExperimentId(v string) { + o.ExperimentId = v +} + +// GetWorkflowsCancelled returns the WorkflowsCancelled field value +func (o *ExperimentStopResult) GetWorkflowsCancelled() ExperimentStopWorkflowsCancelled { + if o == nil { + var ret ExperimentStopWorkflowsCancelled + return ret + } + + return o.WorkflowsCancelled +} + +// GetWorkflowsCancelledOk returns a tuple with the WorkflowsCancelled field value +// and a boolean to check if the value has been set. +func (o *ExperimentStopResult) GetWorkflowsCancelledOk() (*ExperimentStopWorkflowsCancelled, bool) { + if o == nil { + return nil, false + } + return &o.WorkflowsCancelled, true +} + +// SetWorkflowsCancelled sets field value +func (o *ExperimentStopResult) SetWorkflowsCancelled(v ExperimentStopWorkflowsCancelled) { + o.WorkflowsCancelled = v +} + +func (o ExperimentStopResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStopResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["experiment_id"] = o.ExperimentId + toSerialize["workflows_cancelled"] = o.WorkflowsCancelled + return toSerialize, nil +} + +func (o *ExperimentStopResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "experiment_id", + "workflows_cancelled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStopResult := _ExperimentStopResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStopResult) + + if err != nil { + return err + } + + *o = ExperimentStopResult(varExperimentStopResult) + + return err +} + +type NullableExperimentStopResult struct { + value *ExperimentStopResult + isSet bool +} + +func (v NullableExperimentStopResult) Get() *ExperimentStopResult { + return v.value +} + +func (v *NullableExperimentStopResult) Set(val *ExperimentStopResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStopResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStopResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStopResult(val *ExperimentStopResult) *NullableExperimentStopResult { + return &NullableExperimentStopResult{value: val, isSet: true} +} + +func (v NullableExperimentStopResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStopResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_stop_workflows_cancelled.go b/go/futureagi/model_experiment_stop_workflows_cancelled.go new file mode 100644 index 0000000..a2019d3 --- /dev/null +++ b/go/futureagi/model_experiment_stop_workflows_cancelled.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStopWorkflowsCancelled type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStopWorkflowsCancelled{} + +// ExperimentStopWorkflowsCancelled struct for ExperimentStopWorkflowsCancelled +type ExperimentStopWorkflowsCancelled struct { + Main bool `json:"main"` + Reruns bool `json:"reruns"` +} + +type _ExperimentStopWorkflowsCancelled ExperimentStopWorkflowsCancelled + +// NewExperimentStopWorkflowsCancelled instantiates a new ExperimentStopWorkflowsCancelled object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStopWorkflowsCancelled(main bool, reruns bool) *ExperimentStopWorkflowsCancelled { + this := ExperimentStopWorkflowsCancelled{} + this.Main = main + this.Reruns = reruns + return &this +} + +// NewExperimentStopWorkflowsCancelledWithDefaults instantiates a new ExperimentStopWorkflowsCancelled object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStopWorkflowsCancelledWithDefaults() *ExperimentStopWorkflowsCancelled { + this := ExperimentStopWorkflowsCancelled{} + return &this +} + +// GetMain returns the Main field value +func (o *ExperimentStopWorkflowsCancelled) GetMain() bool { + if o == nil { + var ret bool + return ret + } + + return o.Main +} + +// GetMainOk returns a tuple with the Main field value +// and a boolean to check if the value has been set. +func (o *ExperimentStopWorkflowsCancelled) GetMainOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Main, true +} + +// SetMain sets field value +func (o *ExperimentStopWorkflowsCancelled) SetMain(v bool) { + o.Main = v +} + +// GetReruns returns the Reruns field value +func (o *ExperimentStopWorkflowsCancelled) GetReruns() bool { + if o == nil { + var ret bool + return ret + } + + return o.Reruns +} + +// GetRerunsOk returns a tuple with the Reruns field value +// and a boolean to check if the value has been set. +func (o *ExperimentStopWorkflowsCancelled) GetRerunsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Reruns, true +} + +// SetReruns sets field value +func (o *ExperimentStopWorkflowsCancelled) SetReruns(v bool) { + o.Reruns = v +} + +func (o ExperimentStopWorkflowsCancelled) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStopWorkflowsCancelled) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["main"] = o.Main + toSerialize["reruns"] = o.Reruns + return toSerialize, nil +} + +func (o *ExperimentStopWorkflowsCancelled) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "main", + "reruns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStopWorkflowsCancelled := _ExperimentStopWorkflowsCancelled{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStopWorkflowsCancelled) + + if err != nil { + return err + } + + *o = ExperimentStopWorkflowsCancelled(varExperimentStopWorkflowsCancelled) + + return err +} + +type NullableExperimentStopWorkflowsCancelled struct { + value *ExperimentStopWorkflowsCancelled + isSet bool +} + +func (v NullableExperimentStopWorkflowsCancelled) Get() *ExperimentStopWorkflowsCancelled { + return v.value +} + +func (v *NullableExperimentStopWorkflowsCancelled) Set(val *ExperimentStopWorkflowsCancelled) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStopWorkflowsCancelled) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStopWorkflowsCancelled) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStopWorkflowsCancelled(val *ExperimentStopWorkflowsCancelled) *NullableExperimentStopWorkflowsCancelled { + return &NullableExperimentStopWorkflowsCancelled{value: val, isSet: true} +} + +func (v NullableExperimentStopWorkflowsCancelled) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStopWorkflowsCancelled) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_string_result_response.go b/go/futureagi/model_experiment_string_result_response.go new file mode 100644 index 0000000..b068347 --- /dev/null +++ b/go/futureagi/model_experiment_string_result_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentStringResultResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentStringResultResponse{} + +// ExperimentStringResultResponse struct for ExperimentStringResultResponse +type ExperimentStringResultResponse struct { + Status bool `json:"status"` + Result string `json:"result"` +} + +type _ExperimentStringResultResponse ExperimentStringResultResponse + +// NewExperimentStringResultResponse instantiates a new ExperimentStringResultResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentStringResultResponse(status bool, result string) *ExperimentStringResultResponse { + this := ExperimentStringResultResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentStringResultResponseWithDefaults instantiates a new ExperimentStringResultResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentStringResultResponseWithDefaults() *ExperimentStringResultResponse { + this := ExperimentStringResultResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentStringResultResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentStringResultResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentStringResultResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentStringResultResponse) GetResult() string { + if o == nil { + var ret string + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentStringResultResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentStringResultResponse) SetResult(v string) { + o.Result = v +} + +func (o ExperimentStringResultResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentStringResultResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentStringResultResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentStringResultResponse := _ExperimentStringResultResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentStringResultResponse) + + if err != nil { + return err + } + + *o = ExperimentStringResultResponse(varExperimentStringResultResponse) + + return err +} + +type NullableExperimentStringResultResponse struct { + value *ExperimentStringResultResponse + isSet bool +} + +func (v NullableExperimentStringResultResponse) Get() *ExperimentStringResultResponse { + return v.value +} + +func (v *NullableExperimentStringResultResponse) Set(val *ExperimentStringResultResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentStringResultResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentStringResultResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentStringResultResponse(val *ExperimentStringResultResponse) *NullableExperimentStringResultResponse { + return &NullableExperimentStringResultResponse{value: val, isSet: true} +} + +func (v NullableExperimentStringResultResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentStringResultResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_table_rows_column_config.go b/go/futureagi/model_experiment_table_rows_column_config.go new file mode 100644 index 0000000..368097c --- /dev/null +++ b/go/futureagi/model_experiment_table_rows_column_config.go @@ -0,0 +1,675 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentTableRowsColumnConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentTableRowsColumnConfig{} + +// ExperimentTableRowsColumnConfig struct for ExperimentTableRowsColumnConfig +type ExperimentTableRowsColumnConfig struct { + Id string `json:"id"` + Name string `json:"name"` + OriginType *string `json:"origin_type,omitempty"` + DataType *string `json:"data_type,omitempty"` + Status *string `json:"status,omitempty"` + Group map[string]interface{} `json:"group,omitempty"` + AverageScore map[string]interface{} `json:"average_score,omitempty"` + DatasetId *string `json:"dataset_id,omitempty"` + ChoicesMap map[string]interface{} `json:"choices_map,omitempty"` + IsBaseColumn *bool `json:"is_base_column,omitempty"` + OutputType NullableString `json:"output_type,omitempty"` + EvalTemplateId NullableString `json:"eval_template_id,omitempty"` + SourceId *string `json:"source_id,omitempty"` + IsAgent *bool `json:"is_agent,omitempty"` + IsFinal *bool `json:"is_final,omitempty"` +} + +type _ExperimentTableRowsColumnConfig ExperimentTableRowsColumnConfig + +// NewExperimentTableRowsColumnConfig instantiates a new ExperimentTableRowsColumnConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentTableRowsColumnConfig(id string, name string) *ExperimentTableRowsColumnConfig { + this := ExperimentTableRowsColumnConfig{} + this.Id = id + this.Name = name + return &this +} + +// NewExperimentTableRowsColumnConfigWithDefaults instantiates a new ExperimentTableRowsColumnConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentTableRowsColumnConfigWithDefaults() *ExperimentTableRowsColumnConfig { + this := ExperimentTableRowsColumnConfig{} + return &this +} + +// GetId returns the Id field value +func (o *ExperimentTableRowsColumnConfig) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ExperimentTableRowsColumnConfig) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ExperimentTableRowsColumnConfig) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExperimentTableRowsColumnConfig) SetName(v string) { + o.Name = v +} + +// GetOriginType returns the OriginType field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetOriginType() string { + if o == nil || IsNil(o.OriginType) { + var ret string + return ret + } + return *o.OriginType +} + +// GetOriginTypeOk returns a tuple with the OriginType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetOriginTypeOk() (*string, bool) { + if o == nil || IsNil(o.OriginType) { + return nil, false + } + return o.OriginType, true +} + +// HasOriginType returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasOriginType() bool { + if o != nil && !IsNil(o.OriginType) { + return true + } + + return false +} + +// SetOriginType gets a reference to the given string and assigns it to the OriginType field. +func (o *ExperimentTableRowsColumnConfig) SetOriginType(v string) { + o.OriginType = &v +} + +// GetDataType returns the DataType field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetDataType() string { + if o == nil || IsNil(o.DataType) { + var ret string + return ret + } + return *o.DataType +} + +// GetDataTypeOk returns a tuple with the DataType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetDataTypeOk() (*string, bool) { + if o == nil || IsNil(o.DataType) { + return nil, false + } + return o.DataType, true +} + +// HasDataType returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasDataType() bool { + if o != nil && !IsNil(o.DataType) { + return true + } + + return false +} + +// SetDataType gets a reference to the given string and assigns it to the DataType field. +func (o *ExperimentTableRowsColumnConfig) SetDataType(v string) { + o.DataType = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExperimentTableRowsColumnConfig) SetStatus(v string) { + o.Status = &v +} + +// GetGroup returns the Group field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetGroup() map[string]interface{} { + if o == nil || IsNil(o.Group) { + var ret map[string]interface{} + return ret + } + return o.Group +} + +// GetGroupOk returns a tuple with the Group field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetGroupOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Group) { + return map[string]interface{}{}, false + } + return o.Group, true +} + +// HasGroup returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasGroup() bool { + if o != nil && !IsNil(o.Group) { + return true + } + + return false +} + +// SetGroup gets a reference to the given map[string]interface{} and assigns it to the Group field. +func (o *ExperimentTableRowsColumnConfig) SetGroup(v map[string]interface{}) { + o.Group = v +} + +// GetAverageScore returns the AverageScore field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetAverageScore() map[string]interface{} { + if o == nil || IsNil(o.AverageScore) { + var ret map[string]interface{} + return ret + } + return o.AverageScore +} + +// GetAverageScoreOk returns a tuple with the AverageScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetAverageScoreOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.AverageScore) { + return map[string]interface{}{}, false + } + return o.AverageScore, true +} + +// HasAverageScore returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasAverageScore() bool { + if o != nil && !IsNil(o.AverageScore) { + return true + } + + return false +} + +// SetAverageScore gets a reference to the given map[string]interface{} and assigns it to the AverageScore field. +func (o *ExperimentTableRowsColumnConfig) SetAverageScore(v map[string]interface{}) { + o.AverageScore = v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *ExperimentTableRowsColumnConfig) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetChoicesMap returns the ChoicesMap field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetChoicesMap() map[string]interface{} { + if o == nil || IsNil(o.ChoicesMap) { + var ret map[string]interface{} + return ret + } + return o.ChoicesMap +} + +// GetChoicesMapOk returns a tuple with the ChoicesMap field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetChoicesMapOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChoicesMap) { + return map[string]interface{}{}, false + } + return o.ChoicesMap, true +} + +// HasChoicesMap returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasChoicesMap() bool { + if o != nil && !IsNil(o.ChoicesMap) { + return true + } + + return false +} + +// SetChoicesMap gets a reference to the given map[string]interface{} and assigns it to the ChoicesMap field. +func (o *ExperimentTableRowsColumnConfig) SetChoicesMap(v map[string]interface{}) { + o.ChoicesMap = v +} + +// GetIsBaseColumn returns the IsBaseColumn field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetIsBaseColumn() bool { + if o == nil || IsNil(o.IsBaseColumn) { + var ret bool + return ret + } + return *o.IsBaseColumn +} + +// GetIsBaseColumnOk returns a tuple with the IsBaseColumn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetIsBaseColumnOk() (*bool, bool) { + if o == nil || IsNil(o.IsBaseColumn) { + return nil, false + } + return o.IsBaseColumn, true +} + +// HasIsBaseColumn returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasIsBaseColumn() bool { + if o != nil && !IsNil(o.IsBaseColumn) { + return true + } + + return false +} + +// SetIsBaseColumn gets a reference to the given bool and assigns it to the IsBaseColumn field. +func (o *ExperimentTableRowsColumnConfig) SetIsBaseColumn(v bool) { + o.IsBaseColumn = &v +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentTableRowsColumnConfig) GetOutputType() string { + if o == nil || IsNil(o.OutputType.Get()) { + var ret string + return ret + } + return *o.OutputType.Get() +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentTableRowsColumnConfig) GetOutputTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OutputType.Get(), o.OutputType.IsSet() +} + +// HasOutputType returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasOutputType() bool { + if o != nil && o.OutputType.IsSet() { + return true + } + + return false +} + +// SetOutputType gets a reference to the given NullableString and assigns it to the OutputType field. +func (o *ExperimentTableRowsColumnConfig) SetOutputType(v string) { + o.OutputType.Set(&v) +} + +// SetOutputTypeNil sets the value for OutputType to be an explicit nil +func (o *ExperimentTableRowsColumnConfig) SetOutputTypeNil() { + o.OutputType.Set(nil) +} + +// UnsetOutputType ensures that no value is present for OutputType, not even an explicit nil +func (o *ExperimentTableRowsColumnConfig) UnsetOutputType() { + o.OutputType.Unset() +} + +// GetEvalTemplateId returns the EvalTemplateId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentTableRowsColumnConfig) GetEvalTemplateId() string { + if o == nil || IsNil(o.EvalTemplateId.Get()) { + var ret string + return ret + } + return *o.EvalTemplateId.Get() +} + +// GetEvalTemplateIdOk returns a tuple with the EvalTemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentTableRowsColumnConfig) GetEvalTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalTemplateId.Get(), o.EvalTemplateId.IsSet() +} + +// HasEvalTemplateId returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasEvalTemplateId() bool { + if o != nil && o.EvalTemplateId.IsSet() { + return true + } + + return false +} + +// SetEvalTemplateId gets a reference to the given NullableString and assigns it to the EvalTemplateId field. +func (o *ExperimentTableRowsColumnConfig) SetEvalTemplateId(v string) { + o.EvalTemplateId.Set(&v) +} + +// SetEvalTemplateIdNil sets the value for EvalTemplateId to be an explicit nil +func (o *ExperimentTableRowsColumnConfig) SetEvalTemplateIdNil() { + o.EvalTemplateId.Set(nil) +} + +// UnsetEvalTemplateId ensures that no value is present for EvalTemplateId, not even an explicit nil +func (o *ExperimentTableRowsColumnConfig) UnsetEvalTemplateId() { + o.EvalTemplateId.Unset() +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetSourceId() string { + if o == nil || IsNil(o.SourceId) { + var ret string + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetSourceIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given string and assigns it to the SourceId field. +func (o *ExperimentTableRowsColumnConfig) SetSourceId(v string) { + o.SourceId = &v +} + +// GetIsAgent returns the IsAgent field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetIsAgent() bool { + if o == nil || IsNil(o.IsAgent) { + var ret bool + return ret + } + return *o.IsAgent +} + +// GetIsAgentOk returns a tuple with the IsAgent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetIsAgentOk() (*bool, bool) { + if o == nil || IsNil(o.IsAgent) { + return nil, false + } + return o.IsAgent, true +} + +// HasIsAgent returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasIsAgent() bool { + if o != nil && !IsNil(o.IsAgent) { + return true + } + + return false +} + +// SetIsAgent gets a reference to the given bool and assigns it to the IsAgent field. +func (o *ExperimentTableRowsColumnConfig) SetIsAgent(v bool) { + o.IsAgent = &v +} + +// GetIsFinal returns the IsFinal field value if set, zero value otherwise. +func (o *ExperimentTableRowsColumnConfig) GetIsFinal() bool { + if o == nil || IsNil(o.IsFinal) { + var ret bool + return ret + } + return *o.IsFinal +} + +// GetIsFinalOk returns a tuple with the IsFinal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsColumnConfig) GetIsFinalOk() (*bool, bool) { + if o == nil || IsNil(o.IsFinal) { + return nil, false + } + return o.IsFinal, true +} + +// HasIsFinal returns a boolean if a field has been set. +func (o *ExperimentTableRowsColumnConfig) HasIsFinal() bool { + if o != nil && !IsNil(o.IsFinal) { + return true + } + + return false +} + +// SetIsFinal gets a reference to the given bool and assigns it to the IsFinal field. +func (o *ExperimentTableRowsColumnConfig) SetIsFinal(v bool) { + o.IsFinal = &v +} + +func (o ExperimentTableRowsColumnConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentTableRowsColumnConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.OriginType) { + toSerialize["origin_type"] = o.OriginType + } + if !IsNil(o.DataType) { + toSerialize["data_type"] = o.DataType + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Group) { + toSerialize["group"] = o.Group + } + if !IsNil(o.AverageScore) { + toSerialize["average_score"] = o.AverageScore + } + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if !IsNil(o.ChoicesMap) { + toSerialize["choices_map"] = o.ChoicesMap + } + if !IsNil(o.IsBaseColumn) { + toSerialize["is_base_column"] = o.IsBaseColumn + } + if o.OutputType.IsSet() { + toSerialize["output_type"] = o.OutputType.Get() + } + if o.EvalTemplateId.IsSet() { + toSerialize["eval_template_id"] = o.EvalTemplateId.Get() + } + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.IsAgent) { + toSerialize["is_agent"] = o.IsAgent + } + if !IsNil(o.IsFinal) { + toSerialize["is_final"] = o.IsFinal + } + return toSerialize, nil +} + +func (o *ExperimentTableRowsColumnConfig) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentTableRowsColumnConfig := _ExperimentTableRowsColumnConfig{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentTableRowsColumnConfig) + + if err != nil { + return err + } + + *o = ExperimentTableRowsColumnConfig(varExperimentTableRowsColumnConfig) + + return err +} + +type NullableExperimentTableRowsColumnConfig struct { + value *ExperimentTableRowsColumnConfig + isSet bool +} + +func (v NullableExperimentTableRowsColumnConfig) Get() *ExperimentTableRowsColumnConfig { + return v.value +} + +func (v *NullableExperimentTableRowsColumnConfig) Set(val *ExperimentTableRowsColumnConfig) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentTableRowsColumnConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentTableRowsColumnConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentTableRowsColumnConfig(val *ExperimentTableRowsColumnConfig) *NullableExperimentTableRowsColumnConfig { + return &NullableExperimentTableRowsColumnConfig{value: val, isSet: true} +} + +func (v NullableExperimentTableRowsColumnConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentTableRowsColumnConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_table_rows_metadata.go b/go/futureagi/model_experiment_table_rows_metadata.go new file mode 100644 index 0000000..553433f --- /dev/null +++ b/go/futureagi/model_experiment_table_rows_metadata.go @@ -0,0 +1,316 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentTableRowsMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentTableRowsMetadata{} + +// ExperimentTableRowsMetadata struct for ExperimentTableRowsMetadata +type ExperimentTableRowsMetadata struct { + TotalRows *int32 `json:"total_rows,omitempty"` + Dataset *string `json:"dataset,omitempty"` + DatasetName *string `json:"dataset_name,omitempty"` + Column NullableString `json:"column,omitempty"` + TotalPages *int32 `json:"total_pages,omitempty"` + Description *map[string]string `json:"description,omitempty"` +} + +// NewExperimentTableRowsMetadata instantiates a new ExperimentTableRowsMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentTableRowsMetadata() *ExperimentTableRowsMetadata { + this := ExperimentTableRowsMetadata{} + return &this +} + +// NewExperimentTableRowsMetadataWithDefaults instantiates a new ExperimentTableRowsMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentTableRowsMetadataWithDefaults() *ExperimentTableRowsMetadata { + this := ExperimentTableRowsMetadata{} + return &this +} + +// GetTotalRows returns the TotalRows field value if set, zero value otherwise. +func (o *ExperimentTableRowsMetadata) GetTotalRows() int32 { + if o == nil || IsNil(o.TotalRows) { + var ret int32 + return ret + } + return *o.TotalRows +} + +// GetTotalRowsOk returns a tuple with the TotalRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsMetadata) GetTotalRowsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalRows) { + return nil, false + } + return o.TotalRows, true +} + +// HasTotalRows returns a boolean if a field has been set. +func (o *ExperimentTableRowsMetadata) HasTotalRows() bool { + if o != nil && !IsNil(o.TotalRows) { + return true + } + + return false +} + +// SetTotalRows gets a reference to the given int32 and assigns it to the TotalRows field. +func (o *ExperimentTableRowsMetadata) SetTotalRows(v int32) { + o.TotalRows = &v +} + +// GetDataset returns the Dataset field value if set, zero value otherwise. +func (o *ExperimentTableRowsMetadata) GetDataset() string { + if o == nil || IsNil(o.Dataset) { + var ret string + return ret + } + return *o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsMetadata) GetDatasetOk() (*string, bool) { + if o == nil || IsNil(o.Dataset) { + return nil, false + } + return o.Dataset, true +} + +// HasDataset returns a boolean if a field has been set. +func (o *ExperimentTableRowsMetadata) HasDataset() bool { + if o != nil && !IsNil(o.Dataset) { + return true + } + + return false +} + +// SetDataset gets a reference to the given string and assigns it to the Dataset field. +func (o *ExperimentTableRowsMetadata) SetDataset(v string) { + o.Dataset = &v +} + +// GetDatasetName returns the DatasetName field value if set, zero value otherwise. +func (o *ExperimentTableRowsMetadata) GetDatasetName() string { + if o == nil || IsNil(o.DatasetName) { + var ret string + return ret + } + return *o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsMetadata) GetDatasetNameOk() (*string, bool) { + if o == nil || IsNil(o.DatasetName) { + return nil, false + } + return o.DatasetName, true +} + +// HasDatasetName returns a boolean if a field has been set. +func (o *ExperimentTableRowsMetadata) HasDatasetName() bool { + if o != nil && !IsNil(o.DatasetName) { + return true + } + + return false +} + +// SetDatasetName gets a reference to the given string and assigns it to the DatasetName field. +func (o *ExperimentTableRowsMetadata) SetDatasetName(v string) { + o.DatasetName = &v +} + +// GetColumn returns the Column field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentTableRowsMetadata) GetColumn() string { + if o == nil || IsNil(o.Column.Get()) { + var ret string + return ret + } + return *o.Column.Get() +} + +// GetColumnOk returns a tuple with the Column field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentTableRowsMetadata) GetColumnOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Column.Get(), o.Column.IsSet() +} + +// HasColumn returns a boolean if a field has been set. +func (o *ExperimentTableRowsMetadata) HasColumn() bool { + if o != nil && o.Column.IsSet() { + return true + } + + return false +} + +// SetColumn gets a reference to the given NullableString and assigns it to the Column field. +func (o *ExperimentTableRowsMetadata) SetColumn(v string) { + o.Column.Set(&v) +} + +// SetColumnNil sets the value for Column to be an explicit nil +func (o *ExperimentTableRowsMetadata) SetColumnNil() { + o.Column.Set(nil) +} + +// UnsetColumn ensures that no value is present for Column, not even an explicit nil +func (o *ExperimentTableRowsMetadata) UnsetColumn() { + o.Column.Unset() +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *ExperimentTableRowsMetadata) GetTotalPages() int32 { + if o == nil || IsNil(o.TotalPages) { + var ret int32 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsMetadata) GetTotalPagesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *ExperimentTableRowsMetadata) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field. +func (o *ExperimentTableRowsMetadata) SetTotalPages(v int32) { + o.TotalPages = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ExperimentTableRowsMetadata) GetDescription() map[string]string { + if o == nil || IsNil(o.Description) { + var ret map[string]string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsMetadata) GetDescriptionOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ExperimentTableRowsMetadata) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given map[string]string and assigns it to the Description field. +func (o *ExperimentTableRowsMetadata) SetDescription(v map[string]string) { + o.Description = &v +} + +func (o ExperimentTableRowsMetadata) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentTableRowsMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TotalRows) { + toSerialize["total_rows"] = o.TotalRows + } + if !IsNil(o.Dataset) { + toSerialize["dataset"] = o.Dataset + } + if !IsNil(o.DatasetName) { + toSerialize["dataset_name"] = o.DatasetName + } + if o.Column.IsSet() { + toSerialize["column"] = o.Column.Get() + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullableExperimentTableRowsMetadata struct { + value *ExperimentTableRowsMetadata + isSet bool +} + +func (v NullableExperimentTableRowsMetadata) Get() *ExperimentTableRowsMetadata { + return v.value +} + +func (v *NullableExperimentTableRowsMetadata) Set(val *ExperimentTableRowsMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentTableRowsMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentTableRowsMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentTableRowsMetadata(val *ExperimentTableRowsMetadata) *NullableExperimentTableRowsMetadata { + return &NullableExperimentTableRowsMetadata{value: val, isSet: true} +} + +func (v NullableExperimentTableRowsMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentTableRowsMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_table_rows_response.go b/go/futureagi/model_experiment_table_rows_response.go new file mode 100644 index 0000000..eaf88a4 --- /dev/null +++ b/go/futureagi/model_experiment_table_rows_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentTableRowsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentTableRowsResponse{} + +// ExperimentTableRowsResponse struct for ExperimentTableRowsResponse +type ExperimentTableRowsResponse struct { + Status bool `json:"status"` + Result ExperimentTableRowsResult `json:"result"` +} + +type _ExperimentTableRowsResponse ExperimentTableRowsResponse + +// NewExperimentTableRowsResponse instantiates a new ExperimentTableRowsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentTableRowsResponse(status bool, result ExperimentTableRowsResult) *ExperimentTableRowsResponse { + this := ExperimentTableRowsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentTableRowsResponseWithDefaults instantiates a new ExperimentTableRowsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentTableRowsResponseWithDefaults() *ExperimentTableRowsResponse { + this := ExperimentTableRowsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentTableRowsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentTableRowsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentTableRowsResponse) GetResult() ExperimentTableRowsResult { + if o == nil { + var ret ExperimentTableRowsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResponse) GetResultOk() (*ExperimentTableRowsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentTableRowsResponse) SetResult(v ExperimentTableRowsResult) { + o.Result = v +} + +func (o ExperimentTableRowsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentTableRowsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentTableRowsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentTableRowsResponse := _ExperimentTableRowsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentTableRowsResponse) + + if err != nil { + return err + } + + *o = ExperimentTableRowsResponse(varExperimentTableRowsResponse) + + return err +} + +type NullableExperimentTableRowsResponse struct { + value *ExperimentTableRowsResponse + isSet bool +} + +func (v NullableExperimentTableRowsResponse) Get() *ExperimentTableRowsResponse { + return v.value +} + +func (v *NullableExperimentTableRowsResponse) Set(val *ExperimentTableRowsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentTableRowsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentTableRowsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentTableRowsResponse(val *ExperimentTableRowsResponse) *NullableExperimentTableRowsResponse { + return &NullableExperimentTableRowsResponse{value: val, isSet: true} +} + +func (v NullableExperimentTableRowsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentTableRowsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_table_rows_result.go b/go/futureagi/model_experiment_table_rows_result.go new file mode 100644 index 0000000..a71feb2 --- /dev/null +++ b/go/futureagi/model_experiment_table_rows_result.go @@ -0,0 +1,337 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentTableRowsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentTableRowsResult{} + +// ExperimentTableRowsResult struct for ExperimentTableRowsResult +type ExperimentTableRowsResult struct { + ColumnConfig []ExperimentTableRowsColumnConfig `json:"column_config"` + Table []map[string]interface{} `json:"table,omitempty"` + Metadata *ExperimentTableRowsMetadata `json:"metadata,omitempty"` + OutputFormat *string `json:"output_format,omitempty"` + Status *string `json:"status,omitempty"` + NextRowIds []string `json:"next_row_ids,omitempty"` +} + +type _ExperimentTableRowsResult ExperimentTableRowsResult + +// NewExperimentTableRowsResult instantiates a new ExperimentTableRowsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentTableRowsResult(columnConfig []ExperimentTableRowsColumnConfig) *ExperimentTableRowsResult { + this := ExperimentTableRowsResult{} + this.ColumnConfig = columnConfig + return &this +} + +// NewExperimentTableRowsResultWithDefaults instantiates a new ExperimentTableRowsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentTableRowsResultWithDefaults() *ExperimentTableRowsResult { + this := ExperimentTableRowsResult{} + return &this +} + +// GetColumnConfig returns the ColumnConfig field value +func (o *ExperimentTableRowsResult) GetColumnConfig() []ExperimentTableRowsColumnConfig { + if o == nil { + var ret []ExperimentTableRowsColumnConfig + return ret + } + + return o.ColumnConfig +} + +// GetColumnConfigOk returns a tuple with the ColumnConfig field value +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResult) GetColumnConfigOk() ([]ExperimentTableRowsColumnConfig, bool) { + if o == nil { + return nil, false + } + return o.ColumnConfig, true +} + +// SetColumnConfig sets field value +func (o *ExperimentTableRowsResult) SetColumnConfig(v []ExperimentTableRowsColumnConfig) { + o.ColumnConfig = v +} + +// GetTable returns the Table field value if set, zero value otherwise. +func (o *ExperimentTableRowsResult) GetTable() []map[string]interface{} { + if o == nil || IsNil(o.Table) { + var ret []map[string]interface{} + return ret + } + return o.Table +} + +// GetTableOk returns a tuple with the Table field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResult) GetTableOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Table) { + return nil, false + } + return o.Table, true +} + +// HasTable returns a boolean if a field has been set. +func (o *ExperimentTableRowsResult) HasTable() bool { + if o != nil && !IsNil(o.Table) { + return true + } + + return false +} + +// SetTable gets a reference to the given []map[string]interface{} and assigns it to the Table field. +func (o *ExperimentTableRowsResult) SetTable(v []map[string]interface{}) { + o.Table = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *ExperimentTableRowsResult) GetMetadata() ExperimentTableRowsMetadata { + if o == nil || IsNil(o.Metadata) { + var ret ExperimentTableRowsMetadata + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResult) GetMetadataOk() (*ExperimentTableRowsMetadata, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *ExperimentTableRowsResult) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given ExperimentTableRowsMetadata and assigns it to the Metadata field. +func (o *ExperimentTableRowsResult) SetMetadata(v ExperimentTableRowsMetadata) { + o.Metadata = &v +} + +// GetOutputFormat returns the OutputFormat field value if set, zero value otherwise. +func (o *ExperimentTableRowsResult) GetOutputFormat() string { + if o == nil || IsNil(o.OutputFormat) { + var ret string + return ret + } + return *o.OutputFormat +} + +// GetOutputFormatOk returns a tuple with the OutputFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResult) GetOutputFormatOk() (*string, bool) { + if o == nil || IsNil(o.OutputFormat) { + return nil, false + } + return o.OutputFormat, true +} + +// HasOutputFormat returns a boolean if a field has been set. +func (o *ExperimentTableRowsResult) HasOutputFormat() bool { + if o != nil && !IsNil(o.OutputFormat) { + return true + } + + return false +} + +// SetOutputFormat gets a reference to the given string and assigns it to the OutputFormat field. +func (o *ExperimentTableRowsResult) SetOutputFormat(v string) { + o.OutputFormat = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ExperimentTableRowsResult) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResult) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ExperimentTableRowsResult) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ExperimentTableRowsResult) SetStatus(v string) { + o.Status = &v +} + +// GetNextRowIds returns the NextRowIds field value if set, zero value otherwise. +func (o *ExperimentTableRowsResult) GetNextRowIds() []string { + if o == nil || IsNil(o.NextRowIds) { + var ret []string + return ret + } + return o.NextRowIds +} + +// GetNextRowIdsOk returns a tuple with the NextRowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentTableRowsResult) GetNextRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.NextRowIds) { + return nil, false + } + return o.NextRowIds, true +} + +// HasNextRowIds returns a boolean if a field has been set. +func (o *ExperimentTableRowsResult) HasNextRowIds() bool { + if o != nil && !IsNil(o.NextRowIds) { + return true + } + + return false +} + +// SetNextRowIds gets a reference to the given []string and assigns it to the NextRowIds field. +func (o *ExperimentTableRowsResult) SetNextRowIds(v []string) { + o.NextRowIds = v +} + +func (o ExperimentTableRowsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentTableRowsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_config"] = o.ColumnConfig + if !IsNil(o.Table) { + toSerialize["table"] = o.Table + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.OutputFormat) { + toSerialize["output_format"] = o.OutputFormat + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.NextRowIds) { + toSerialize["next_row_ids"] = o.NextRowIds + } + return toSerialize, nil +} + +func (o *ExperimentTableRowsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentTableRowsResult := _ExperimentTableRowsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentTableRowsResult) + + if err != nil { + return err + } + + *o = ExperimentTableRowsResult(varExperimentTableRowsResult) + + return err +} + +type NullableExperimentTableRowsResult struct { + value *ExperimentTableRowsResult + isSet bool +} + +func (v NullableExperimentTableRowsResult) Get() *ExperimentTableRowsResult { + return v.value +} + +func (v *NullableExperimentTableRowsResult) Set(val *ExperimentTableRowsResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentTableRowsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentTableRowsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentTableRowsResult(val *ExperimentTableRowsResult) *NullableExperimentTableRowsResult { + return &NullableExperimentTableRowsResult{value: val, isSet: true} +} + +func (v NullableExperimentTableRowsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentTableRowsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_update_v2.go b/go/futureagi/model_experiment_update_v2.go new file mode 100644 index 0000000..d6cdfd8 --- /dev/null +++ b/go/futureagi/model_experiment_update_v2.go @@ -0,0 +1,208 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ExperimentUpdateV2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentUpdateV2{} + +// ExperimentUpdateV2 struct for ExperimentUpdateV2 +type ExperimentUpdateV2 struct { + ColumnId NullableString `json:"column_id,omitempty"` + PromptConfig []PromptConfigEntry `json:"prompt_config,omitempty"` + UserEvalMetrics []EvalMetricEntry `json:"user_eval_metrics,omitempty"` +} + +// NewExperimentUpdateV2 instantiates a new ExperimentUpdateV2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentUpdateV2() *ExperimentUpdateV2 { + this := ExperimentUpdateV2{} + return &this +} + +// NewExperimentUpdateV2WithDefaults instantiates a new ExperimentUpdateV2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentUpdateV2WithDefaults() *ExperimentUpdateV2 { + this := ExperimentUpdateV2{} + return &this +} + +// GetColumnId returns the ColumnId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ExperimentUpdateV2) GetColumnId() string { + if o == nil || IsNil(o.ColumnId.Get()) { + var ret string + return ret + } + return *o.ColumnId.Get() +} + +// GetColumnIdOk returns a tuple with the ColumnId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ExperimentUpdateV2) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ColumnId.Get(), o.ColumnId.IsSet() +} + +// HasColumnId returns a boolean if a field has been set. +func (o *ExperimentUpdateV2) HasColumnId() bool { + if o != nil && o.ColumnId.IsSet() { + return true + } + + return false +} + +// SetColumnId gets a reference to the given NullableString and assigns it to the ColumnId field. +func (o *ExperimentUpdateV2) SetColumnId(v string) { + o.ColumnId.Set(&v) +} + +// SetColumnIdNil sets the value for ColumnId to be an explicit nil +func (o *ExperimentUpdateV2) SetColumnIdNil() { + o.ColumnId.Set(nil) +} + +// UnsetColumnId ensures that no value is present for ColumnId, not even an explicit nil +func (o *ExperimentUpdateV2) UnsetColumnId() { + o.ColumnId.Unset() +} + +// GetPromptConfig returns the PromptConfig field value if set, zero value otherwise. +func (o *ExperimentUpdateV2) GetPromptConfig() []PromptConfigEntry { + if o == nil || IsNil(o.PromptConfig) { + var ret []PromptConfigEntry + return ret + } + return o.PromptConfig +} + +// GetPromptConfigOk returns a tuple with the PromptConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentUpdateV2) GetPromptConfigOk() ([]PromptConfigEntry, bool) { + if o == nil || IsNil(o.PromptConfig) { + return nil, false + } + return o.PromptConfig, true +} + +// HasPromptConfig returns a boolean if a field has been set. +func (o *ExperimentUpdateV2) HasPromptConfig() bool { + if o != nil && !IsNil(o.PromptConfig) { + return true + } + + return false +} + +// SetPromptConfig gets a reference to the given []PromptConfigEntry and assigns it to the PromptConfig field. +func (o *ExperimentUpdateV2) SetPromptConfig(v []PromptConfigEntry) { + o.PromptConfig = v +} + +// GetUserEvalMetrics returns the UserEvalMetrics field value if set, zero value otherwise. +func (o *ExperimentUpdateV2) GetUserEvalMetrics() []EvalMetricEntry { + if o == nil || IsNil(o.UserEvalMetrics) { + var ret []EvalMetricEntry + return ret + } + return o.UserEvalMetrics +} + +// GetUserEvalMetricsOk returns a tuple with the UserEvalMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentUpdateV2) GetUserEvalMetricsOk() ([]EvalMetricEntry, bool) { + if o == nil || IsNil(o.UserEvalMetrics) { + return nil, false + } + return o.UserEvalMetrics, true +} + +// HasUserEvalMetrics returns a boolean if a field has been set. +func (o *ExperimentUpdateV2) HasUserEvalMetrics() bool { + if o != nil && !IsNil(o.UserEvalMetrics) { + return true + } + + return false +} + +// SetUserEvalMetrics gets a reference to the given []EvalMetricEntry and assigns it to the UserEvalMetrics field. +func (o *ExperimentUpdateV2) SetUserEvalMetrics(v []EvalMetricEntry) { + o.UserEvalMetrics = v +} + +func (o ExperimentUpdateV2) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentUpdateV2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ColumnId.IsSet() { + toSerialize["column_id"] = o.ColumnId.Get() + } + if !IsNil(o.PromptConfig) { + toSerialize["prompt_config"] = o.PromptConfig + } + if !IsNil(o.UserEvalMetrics) { + toSerialize["user_eval_metrics"] = o.UserEvalMetrics + } + return toSerialize, nil +} + +type NullableExperimentUpdateV2 struct { + value *ExperimentUpdateV2 + isSet bool +} + +func (v NullableExperimentUpdateV2) Get() *ExperimentUpdateV2 { + return v.value +} + +func (v *NullableExperimentUpdateV2) Set(val *ExperimentUpdateV2) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentUpdateV2) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentUpdateV2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentUpdateV2(val *ExperimentUpdateV2) *NullableExperimentUpdateV2 { + return &NullableExperimentUpdateV2{value: val, isSet: true} +} + +func (v NullableExperimentUpdateV2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentUpdateV2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_v2_detail_response.go b/go/futureagi/model_experiment_v2_detail_response.go new file mode 100644 index 0000000..796cc18 --- /dev/null +++ b/go/futureagi/model_experiment_v2_detail_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentV2DetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentV2DetailResponse{} + +// ExperimentV2DetailResponse struct for ExperimentV2DetailResponse +type ExperimentV2DetailResponse struct { + Status bool `json:"status"` + Result ExperimentDetailV2 `json:"result"` +} + +type _ExperimentV2DetailResponse ExperimentV2DetailResponse + +// NewExperimentV2DetailResponse instantiates a new ExperimentV2DetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentV2DetailResponse(status bool, result ExperimentDetailV2) *ExperimentV2DetailResponse { + this := ExperimentV2DetailResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentV2DetailResponseWithDefaults instantiates a new ExperimentV2DetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentV2DetailResponseWithDefaults() *ExperimentV2DetailResponse { + this := ExperimentV2DetailResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentV2DetailResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentV2DetailResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentV2DetailResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentV2DetailResponse) GetResult() ExperimentDetailV2 { + if o == nil { + var ret ExperimentDetailV2 + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentV2DetailResponse) GetResultOk() (*ExperimentDetailV2, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentV2DetailResponse) SetResult(v ExperimentDetailV2) { + o.Result = v +} + +func (o ExperimentV2DetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentV2DetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentV2DetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentV2DetailResponse := _ExperimentV2DetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentV2DetailResponse) + + if err != nil { + return err + } + + *o = ExperimentV2DetailResponse(varExperimentV2DetailResponse) + + return err +} + +type NullableExperimentV2DetailResponse struct { + value *ExperimentV2DetailResponse + isSet bool +} + +func (v NullableExperimentV2DetailResponse) Get() *ExperimentV2DetailResponse { + return v.value +} + +func (v *NullableExperimentV2DetailResponse) Set(val *ExperimentV2DetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentV2DetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentV2DetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentV2DetailResponse(val *ExperimentV2DetailResponse) *NullableExperimentV2DetailResponse { + return &NullableExperimentV2DetailResponse{value: val, isSet: true} +} + +func (v NullableExperimentV2DetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentV2DetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_workflow_response.go b/go/futureagi/model_experiment_workflow_response.go new file mode 100644 index 0000000..708330e --- /dev/null +++ b/go/futureagi/model_experiment_workflow_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentWorkflowResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentWorkflowResponse{} + +// ExperimentWorkflowResponse struct for ExperimentWorkflowResponse +type ExperimentWorkflowResponse struct { + Status bool `json:"status"` + Result ExperimentWorkflowResult `json:"result"` +} + +type _ExperimentWorkflowResponse ExperimentWorkflowResponse + +// NewExperimentWorkflowResponse instantiates a new ExperimentWorkflowResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentWorkflowResponse(status bool, result ExperimentWorkflowResult) *ExperimentWorkflowResponse { + this := ExperimentWorkflowResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewExperimentWorkflowResponseWithDefaults instantiates a new ExperimentWorkflowResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentWorkflowResponseWithDefaults() *ExperimentWorkflowResponse { + this := ExperimentWorkflowResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ExperimentWorkflowResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ExperimentWorkflowResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ExperimentWorkflowResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ExperimentWorkflowResponse) GetResult() ExperimentWorkflowResult { + if o == nil { + var ret ExperimentWorkflowResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ExperimentWorkflowResponse) GetResultOk() (*ExperimentWorkflowResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ExperimentWorkflowResponse) SetResult(v ExperimentWorkflowResult) { + o.Result = v +} + +func (o ExperimentWorkflowResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentWorkflowResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ExperimentWorkflowResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentWorkflowResponse := _ExperimentWorkflowResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentWorkflowResponse) + + if err != nil { + return err + } + + *o = ExperimentWorkflowResponse(varExperimentWorkflowResponse) + + return err +} + +type NullableExperimentWorkflowResponse struct { + value *ExperimentWorkflowResponse + isSet bool +} + +func (v NullableExperimentWorkflowResponse) Get() *ExperimentWorkflowResponse { + return v.value +} + +func (v *NullableExperimentWorkflowResponse) Set(val *ExperimentWorkflowResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentWorkflowResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentWorkflowResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentWorkflowResponse(val *ExperimentWorkflowResponse) *NullableExperimentWorkflowResponse { + return &NullableExperimentWorkflowResponse{value: val, isSet: true} +} + +func (v NullableExperimentWorkflowResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentWorkflowResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_experiment_workflow_result.go b/go/futureagi/model_experiment_workflow_result.go new file mode 100644 index 0000000..88b7b9e --- /dev/null +++ b/go/futureagi/model_experiment_workflow_result.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExperimentWorkflowResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExperimentWorkflowResult{} + +// ExperimentWorkflowResult struct for ExperimentWorkflowResult +type ExperimentWorkflowResult struct { + Message string `json:"message"` + WorkflowId *string `json:"workflow_id,omitempty"` +} + +type _ExperimentWorkflowResult ExperimentWorkflowResult + +// NewExperimentWorkflowResult instantiates a new ExperimentWorkflowResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExperimentWorkflowResult(message string) *ExperimentWorkflowResult { + this := ExperimentWorkflowResult{} + this.Message = message + return &this +} + +// NewExperimentWorkflowResultWithDefaults instantiates a new ExperimentWorkflowResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExperimentWorkflowResultWithDefaults() *ExperimentWorkflowResult { + this := ExperimentWorkflowResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *ExperimentWorkflowResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ExperimentWorkflowResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ExperimentWorkflowResult) SetMessage(v string) { + o.Message = v +} + +// GetWorkflowId returns the WorkflowId field value if set, zero value otherwise. +func (o *ExperimentWorkflowResult) GetWorkflowId() string { + if o == nil || IsNil(o.WorkflowId) { + var ret string + return ret + } + return *o.WorkflowId +} + +// GetWorkflowIdOk returns a tuple with the WorkflowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExperimentWorkflowResult) GetWorkflowIdOk() (*string, bool) { + if o == nil || IsNil(o.WorkflowId) { + return nil, false + } + return o.WorkflowId, true +} + +// HasWorkflowId returns a boolean if a field has been set. +func (o *ExperimentWorkflowResult) HasWorkflowId() bool { + if o != nil && !IsNil(o.WorkflowId) { + return true + } + + return false +} + +// SetWorkflowId gets a reference to the given string and assigns it to the WorkflowId field. +func (o *ExperimentWorkflowResult) SetWorkflowId(v string) { + o.WorkflowId = &v +} + +func (o ExperimentWorkflowResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExperimentWorkflowResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + if !IsNil(o.WorkflowId) { + toSerialize["workflow_id"] = o.WorkflowId + } + return toSerialize, nil +} + +func (o *ExperimentWorkflowResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExperimentWorkflowResult := _ExperimentWorkflowResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExperimentWorkflowResult) + + if err != nil { + return err + } + + *o = ExperimentWorkflowResult(varExperimentWorkflowResult) + + return err +} + +type NullableExperimentWorkflowResult struct { + value *ExperimentWorkflowResult + isSet bool +} + +func (v NullableExperimentWorkflowResult) Get() *ExperimentWorkflowResult { + return v.value +} + +func (v *NullableExperimentWorkflowResult) Set(val *ExperimentWorkflowResult) { + v.value = val + v.isSet = true +} + +func (v NullableExperimentWorkflowResult) IsSet() bool { + return v.isSet +} + +func (v *NullableExperimentWorkflowResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExperimentWorkflowResult(val *ExperimentWorkflowResult) *NullableExperimentWorkflowResult { + return &NullableExperimentWorkflowResult{value: val, isSet: true} +} + +func (v NullableExperimentWorkflowResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExperimentWorkflowResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_extract_entities_request.go b/go/futureagi/model_extract_entities_request.go new file mode 100644 index 0000000..f1046e9 --- /dev/null +++ b/go/futureagi/model_extract_entities_request.go @@ -0,0 +1,301 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExtractEntitiesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExtractEntitiesRequest{} + +// ExtractEntitiesRequest struct for ExtractEntitiesRequest +type ExtractEntitiesRequest struct { + ColumnId string `json:"column_id"` + Instruction string `json:"instruction"` + LanguageModelId *string `json:"language_model_id,omitempty"` + Concurrency *int32 `json:"concurrency,omitempty"` + NewColumnName *string `json:"new_column_name,omitempty"` +} + +type _ExtractEntitiesRequest ExtractEntitiesRequest + +// NewExtractEntitiesRequest instantiates a new ExtractEntitiesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExtractEntitiesRequest(columnId string, instruction string) *ExtractEntitiesRequest { + this := ExtractEntitiesRequest{} + this.ColumnId = columnId + this.Instruction = instruction + var languageModelId string = "gpt-4" + this.LanguageModelId = &languageModelId + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// NewExtractEntitiesRequestWithDefaults instantiates a new ExtractEntitiesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExtractEntitiesRequestWithDefaults() *ExtractEntitiesRequest { + this := ExtractEntitiesRequest{} + var languageModelId string = "gpt-4" + this.LanguageModelId = &languageModelId + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *ExtractEntitiesRequest) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *ExtractEntitiesRequest) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *ExtractEntitiesRequest) SetColumnId(v string) { + o.ColumnId = v +} + +// GetInstruction returns the Instruction field value +func (o *ExtractEntitiesRequest) GetInstruction() string { + if o == nil { + var ret string + return ret + } + + return o.Instruction +} + +// GetInstructionOk returns a tuple with the Instruction field value +// and a boolean to check if the value has been set. +func (o *ExtractEntitiesRequest) GetInstructionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Instruction, true +} + +// SetInstruction sets field value +func (o *ExtractEntitiesRequest) SetInstruction(v string) { + o.Instruction = v +} + +// GetLanguageModelId returns the LanguageModelId field value if set, zero value otherwise. +func (o *ExtractEntitiesRequest) GetLanguageModelId() string { + if o == nil || IsNil(o.LanguageModelId) { + var ret string + return ret + } + return *o.LanguageModelId +} + +// GetLanguageModelIdOk returns a tuple with the LanguageModelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtractEntitiesRequest) GetLanguageModelIdOk() (*string, bool) { + if o == nil || IsNil(o.LanguageModelId) { + return nil, false + } + return o.LanguageModelId, true +} + +// HasLanguageModelId returns a boolean if a field has been set. +func (o *ExtractEntitiesRequest) HasLanguageModelId() bool { + if o != nil && !IsNil(o.LanguageModelId) { + return true + } + + return false +} + +// SetLanguageModelId gets a reference to the given string and assigns it to the LanguageModelId field. +func (o *ExtractEntitiesRequest) SetLanguageModelId(v string) { + o.LanguageModelId = &v +} + +// GetConcurrency returns the Concurrency field value if set, zero value otherwise. +func (o *ExtractEntitiesRequest) GetConcurrency() int32 { + if o == nil || IsNil(o.Concurrency) { + var ret int32 + return ret + } + return *o.Concurrency +} + +// GetConcurrencyOk returns a tuple with the Concurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtractEntitiesRequest) GetConcurrencyOk() (*int32, bool) { + if o == nil || IsNil(o.Concurrency) { + return nil, false + } + return o.Concurrency, true +} + +// HasConcurrency returns a boolean if a field has been set. +func (o *ExtractEntitiesRequest) HasConcurrency() bool { + if o != nil && !IsNil(o.Concurrency) { + return true + } + + return false +} + +// SetConcurrency gets a reference to the given int32 and assigns it to the Concurrency field. +func (o *ExtractEntitiesRequest) SetConcurrency(v int32) { + o.Concurrency = &v +} + +// GetNewColumnName returns the NewColumnName field value if set, zero value otherwise. +func (o *ExtractEntitiesRequest) GetNewColumnName() string { + if o == nil || IsNil(o.NewColumnName) { + var ret string + return ret + } + return *o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtractEntitiesRequest) GetNewColumnNameOk() (*string, bool) { + if o == nil || IsNil(o.NewColumnName) { + return nil, false + } + return o.NewColumnName, true +} + +// HasNewColumnName returns a boolean if a field has been set. +func (o *ExtractEntitiesRequest) HasNewColumnName() bool { + if o != nil && !IsNil(o.NewColumnName) { + return true + } + + return false +} + +// SetNewColumnName gets a reference to the given string and assigns it to the NewColumnName field. +func (o *ExtractEntitiesRequest) SetNewColumnName(v string) { + o.NewColumnName = &v +} + +func (o ExtractEntitiesRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExtractEntitiesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + toSerialize["instruction"] = o.Instruction + if !IsNil(o.LanguageModelId) { + toSerialize["language_model_id"] = o.LanguageModelId + } + if !IsNil(o.Concurrency) { + toSerialize["concurrency"] = o.Concurrency + } + if !IsNil(o.NewColumnName) { + toSerialize["new_column_name"] = o.NewColumnName + } + return toSerialize, nil +} + +func (o *ExtractEntitiesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + "instruction", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExtractEntitiesRequest := _ExtractEntitiesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExtractEntitiesRequest) + + if err != nil { + return err + } + + *o = ExtractEntitiesRequest(varExtractEntitiesRequest) + + return err +} + +type NullableExtractEntitiesRequest struct { + value *ExtractEntitiesRequest + isSet bool +} + +func (v NullableExtractEntitiesRequest) Get() *ExtractEntitiesRequest { + return v.value +} + +func (v *NullableExtractEntitiesRequest) Set(val *ExtractEntitiesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableExtractEntitiesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableExtractEntitiesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtractEntitiesRequest(val *ExtractEntitiesRequest) *NullableExtractEntitiesRequest { + return &NullableExtractEntitiesRequest{value: val, isSet: true} +} + +func (v NullableExtractEntitiesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtractEntitiesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_extract_json_column_request.go b/go/futureagi/model_extract_json_column_request.go new file mode 100644 index 0000000..6b6f289 --- /dev/null +++ b/go/futureagi/model_extract_json_column_request.go @@ -0,0 +1,261 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ExtractJsonColumnRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExtractJsonColumnRequest{} + +// ExtractJsonColumnRequest struct for ExtractJsonColumnRequest +type ExtractJsonColumnRequest struct { + ColumnId string `json:"column_id"` + JsonKey string `json:"json_key"` + NewColumnName *string `json:"new_column_name,omitempty"` + Concurrency *int32 `json:"concurrency,omitempty"` +} + +type _ExtractJsonColumnRequest ExtractJsonColumnRequest + +// NewExtractJsonColumnRequest instantiates a new ExtractJsonColumnRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExtractJsonColumnRequest(columnId string, jsonKey string) *ExtractJsonColumnRequest { + this := ExtractJsonColumnRequest{} + this.ColumnId = columnId + this.JsonKey = jsonKey + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// NewExtractJsonColumnRequestWithDefaults instantiates a new ExtractJsonColumnRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExtractJsonColumnRequestWithDefaults() *ExtractJsonColumnRequest { + this := ExtractJsonColumnRequest{} + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *ExtractJsonColumnRequest) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *ExtractJsonColumnRequest) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *ExtractJsonColumnRequest) SetColumnId(v string) { + o.ColumnId = v +} + +// GetJsonKey returns the JsonKey field value +func (o *ExtractJsonColumnRequest) GetJsonKey() string { + if o == nil { + var ret string + return ret + } + + return o.JsonKey +} + +// GetJsonKeyOk returns a tuple with the JsonKey field value +// and a boolean to check if the value has been set. +func (o *ExtractJsonColumnRequest) GetJsonKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JsonKey, true +} + +// SetJsonKey sets field value +func (o *ExtractJsonColumnRequest) SetJsonKey(v string) { + o.JsonKey = v +} + +// GetNewColumnName returns the NewColumnName field value if set, zero value otherwise. +func (o *ExtractJsonColumnRequest) GetNewColumnName() string { + if o == nil || IsNil(o.NewColumnName) { + var ret string + return ret + } + return *o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtractJsonColumnRequest) GetNewColumnNameOk() (*string, bool) { + if o == nil || IsNil(o.NewColumnName) { + return nil, false + } + return o.NewColumnName, true +} + +// HasNewColumnName returns a boolean if a field has been set. +func (o *ExtractJsonColumnRequest) HasNewColumnName() bool { + if o != nil && !IsNil(o.NewColumnName) { + return true + } + + return false +} + +// SetNewColumnName gets a reference to the given string and assigns it to the NewColumnName field. +func (o *ExtractJsonColumnRequest) SetNewColumnName(v string) { + o.NewColumnName = &v +} + +// GetConcurrency returns the Concurrency field value if set, zero value otherwise. +func (o *ExtractJsonColumnRequest) GetConcurrency() int32 { + if o == nil || IsNil(o.Concurrency) { + var ret int32 + return ret + } + return *o.Concurrency +} + +// GetConcurrencyOk returns a tuple with the Concurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtractJsonColumnRequest) GetConcurrencyOk() (*int32, bool) { + if o == nil || IsNil(o.Concurrency) { + return nil, false + } + return o.Concurrency, true +} + +// HasConcurrency returns a boolean if a field has been set. +func (o *ExtractJsonColumnRequest) HasConcurrency() bool { + if o != nil && !IsNil(o.Concurrency) { + return true + } + + return false +} + +// SetConcurrency gets a reference to the given int32 and assigns it to the Concurrency field. +func (o *ExtractJsonColumnRequest) SetConcurrency(v int32) { + o.Concurrency = &v +} + +func (o ExtractJsonColumnRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExtractJsonColumnRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + toSerialize["json_key"] = o.JsonKey + if !IsNil(o.NewColumnName) { + toSerialize["new_column_name"] = o.NewColumnName + } + if !IsNil(o.Concurrency) { + toSerialize["concurrency"] = o.Concurrency + } + return toSerialize, nil +} + +func (o *ExtractJsonColumnRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + "json_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExtractJsonColumnRequest := _ExtractJsonColumnRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExtractJsonColumnRequest) + + if err != nil { + return err + } + + *o = ExtractJsonColumnRequest(varExtractJsonColumnRequest) + + return err +} + +type NullableExtractJsonColumnRequest struct { + value *ExtractJsonColumnRequest + isSet bool +} + +func (v NullableExtractJsonColumnRequest) Get() *ExtractJsonColumnRequest { + return v.value +} + +func (v *NullableExtractJsonColumnRequest) Set(val *ExtractJsonColumnRequest) { + v.value = val + v.isSet = true +} + +func (v NullableExtractJsonColumnRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableExtractJsonColumnRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtractJsonColumnRequest(val *ExtractJsonColumnRequest) *NullableExtractJsonColumnRequest { + return &NullableExtractJsonColumnRequest{value: val, isSet: true} +} + +func (v NullableExtractJsonColumnRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtractJsonColumnRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_failed_rerun_item.go b/go/futureagi/model_failed_rerun_item.go new file mode 100644 index 0000000..940f666 --- /dev/null +++ b/go/futureagi/model_failed_rerun_item.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FailedRerunItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FailedRerunItem{} + +// FailedRerunItem struct for FailedRerunItem +type FailedRerunItem struct { + CallExecutionId string `json:"call_execution_id"` + Error string `json:"error"` +} + +type _FailedRerunItem FailedRerunItem + +// NewFailedRerunItem instantiates a new FailedRerunItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFailedRerunItem(callExecutionId string, error_ string) *FailedRerunItem { + this := FailedRerunItem{} + this.CallExecutionId = callExecutionId + this.Error = error_ + return &this +} + +// NewFailedRerunItemWithDefaults instantiates a new FailedRerunItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFailedRerunItemWithDefaults() *FailedRerunItem { + this := FailedRerunItem{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value +func (o *FailedRerunItem) GetCallExecutionId() string { + if o == nil { + var ret string + return ret + } + + return o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value +// and a boolean to check if the value has been set. +func (o *FailedRerunItem) GetCallExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CallExecutionId, true +} + +// SetCallExecutionId sets field value +func (o *FailedRerunItem) SetCallExecutionId(v string) { + o.CallExecutionId = v +} + +// GetError returns the Error field value +func (o *FailedRerunItem) GetError() string { + if o == nil { + var ret string + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *FailedRerunItem) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *FailedRerunItem) SetError(v string) { + o.Error = v +} + +func (o FailedRerunItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FailedRerunItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["call_execution_id"] = o.CallExecutionId + toSerialize["error"] = o.Error + return toSerialize, nil +} + +func (o *FailedRerunItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "call_execution_id", + "error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFailedRerunItem := _FailedRerunItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFailedRerunItem) + + if err != nil { + return err + } + + *o = FailedRerunItem(varFailedRerunItem) + + return err +} + +type NullableFailedRerunItem struct { + value *FailedRerunItem + isSet bool +} + +func (v NullableFailedRerunItem) Get() *FailedRerunItem { + return v.value +} + +func (v *NullableFailedRerunItem) Set(val *FailedRerunItem) { + v.value = val + v.isSet = true +} + +func (v NullableFailedRerunItem) IsSet() bool { + return v.isSet +} + +func (v *NullableFailedRerunItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFailedRerunItem(val *FailedRerunItem) *NullableFailedRerunItem { + return &NullableFailedRerunItem{value: val, isSet: true} +} + +func (v NullableFailedRerunItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFailedRerunItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_detail_api_response.go b/go/futureagi/model_feed_detail_api_response.go new file mode 100644 index 0000000..9d10792 --- /dev/null +++ b/go/futureagi/model_feed_detail_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedDetailApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedDetailApiResponse{} + +// FeedDetailApiResponse struct for FeedDetailApiResponse +type FeedDetailApiResponse struct { + Status *bool `json:"status,omitempty"` + Result FeedDetailCore `json:"result"` +} + +type _FeedDetailApiResponse FeedDetailApiResponse + +// NewFeedDetailApiResponse instantiates a new FeedDetailApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedDetailApiResponse(result FeedDetailCore) *FeedDetailApiResponse { + this := FeedDetailApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewFeedDetailApiResponseWithDefaults instantiates a new FeedDetailApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedDetailApiResponseWithDefaults() *FeedDetailApiResponse { + this := FeedDetailApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FeedDetailApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedDetailApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FeedDetailApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *FeedDetailApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *FeedDetailApiResponse) GetResult() FeedDetailCore { + if o == nil { + var ret FeedDetailCore + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *FeedDetailApiResponse) GetResultOk() (*FeedDetailCore, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *FeedDetailApiResponse) SetResult(v FeedDetailCore) { + o.Result = v +} + +func (o FeedDetailApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedDetailApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *FeedDetailApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedDetailApiResponse := _FeedDetailApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedDetailApiResponse) + + if err != nil { + return err + } + + *o = FeedDetailApiResponse(varFeedDetailApiResponse) + + return err +} + +type NullableFeedDetailApiResponse struct { + value *FeedDetailApiResponse + isSet bool +} + +func (v NullableFeedDetailApiResponse) Get() *FeedDetailApiResponse { + return v.value +} + +func (v *NullableFeedDetailApiResponse) Set(val *FeedDetailApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFeedDetailApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedDetailApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedDetailApiResponse(val *FeedDetailApiResponse) *NullableFeedDetailApiResponse { + return &NullableFeedDetailApiResponse{value: val, isSet: true} +} + +func (v NullableFeedDetailApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedDetailApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_detail_core.go b/go/futureagi/model_feed_detail_core.go new file mode 100644 index 0000000..f34bb2f --- /dev/null +++ b/go/futureagi/model_feed_detail_core.go @@ -0,0 +1,243 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedDetailCore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedDetailCore{} + +// FeedDetailCore struct for FeedDetailCore +type FeedDetailCore struct { + Row FeedListRow `json:"row"` + Description NullableString `json:"description"` + SuccessTrace TracePreview `json:"success_trace"` + RepresentativeTrace TracePreview `json:"representative_trace"` +} + +type _FeedDetailCore FeedDetailCore + +// NewFeedDetailCore instantiates a new FeedDetailCore object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedDetailCore(row FeedListRow, description NullableString, successTrace TracePreview, representativeTrace TracePreview) *FeedDetailCore { + this := FeedDetailCore{} + this.Row = row + this.Description = description + this.SuccessTrace = successTrace + this.RepresentativeTrace = representativeTrace + return &this +} + +// NewFeedDetailCoreWithDefaults instantiates a new FeedDetailCore object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedDetailCoreWithDefaults() *FeedDetailCore { + this := FeedDetailCore{} + return &this +} + +// GetRow returns the Row field value +func (o *FeedDetailCore) GetRow() FeedListRow { + if o == nil { + var ret FeedListRow + return ret + } + + return o.Row +} + +// GetRowOk returns a tuple with the Row field value +// and a boolean to check if the value has been set. +func (o *FeedDetailCore) GetRowOk() (*FeedListRow, bool) { + if o == nil { + return nil, false + } + return &o.Row, true +} + +// SetRow sets field value +func (o *FeedDetailCore) SetRow(v FeedListRow) { + o.Row = v +} + +// GetDescription returns the Description field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedDetailCore) GetDescription() string { + if o == nil || o.Description.Get() == nil { + var ret string + return ret + } + + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedDetailCore) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// SetDescription sets field value +func (o *FeedDetailCore) SetDescription(v string) { + o.Description.Set(&v) +} + +// GetSuccessTrace returns the SuccessTrace field value +func (o *FeedDetailCore) GetSuccessTrace() TracePreview { + if o == nil { + var ret TracePreview + return ret + } + + return o.SuccessTrace +} + +// GetSuccessTraceOk returns a tuple with the SuccessTrace field value +// and a boolean to check if the value has been set. +func (o *FeedDetailCore) GetSuccessTraceOk() (*TracePreview, bool) { + if o == nil { + return nil, false + } + return &o.SuccessTrace, true +} + +// SetSuccessTrace sets field value +func (o *FeedDetailCore) SetSuccessTrace(v TracePreview) { + o.SuccessTrace = v +} + +// GetRepresentativeTrace returns the RepresentativeTrace field value +func (o *FeedDetailCore) GetRepresentativeTrace() TracePreview { + if o == nil { + var ret TracePreview + return ret + } + + return o.RepresentativeTrace +} + +// GetRepresentativeTraceOk returns a tuple with the RepresentativeTrace field value +// and a boolean to check if the value has been set. +func (o *FeedDetailCore) GetRepresentativeTraceOk() (*TracePreview, bool) { + if o == nil { + return nil, false + } + return &o.RepresentativeTrace, true +} + +// SetRepresentativeTrace sets field value +func (o *FeedDetailCore) SetRepresentativeTrace(v TracePreview) { + o.RepresentativeTrace = v +} + +func (o FeedDetailCore) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedDetailCore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["row"] = o.Row + toSerialize["description"] = o.Description.Get() + toSerialize["success_trace"] = o.SuccessTrace + toSerialize["representative_trace"] = o.RepresentativeTrace + return toSerialize, nil +} + +func (o *FeedDetailCore) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "row", + "description", + "success_trace", + "representative_trace", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedDetailCore := _FeedDetailCore{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedDetailCore) + + if err != nil { + return err + } + + *o = FeedDetailCore(varFeedDetailCore) + + return err +} + +type NullableFeedDetailCore struct { + value *FeedDetailCore + isSet bool +} + +func (v NullableFeedDetailCore) Get() *FeedDetailCore { + return v.value +} + +func (v *NullableFeedDetailCore) Set(val *FeedDetailCore) { + v.value = val + v.isSet = true +} + +func (v NullableFeedDetailCore) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedDetailCore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedDetailCore(val *FeedDetailCore) *NullableFeedDetailCore { + return &NullableFeedDetailCore{value: val, isSet: true} +} + +func (v NullableFeedDetailCore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedDetailCore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_list_api_response.go b/go/futureagi/model_feed_list_api_response.go new file mode 100644 index 0000000..b61213c --- /dev/null +++ b/go/futureagi/model_feed_list_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedListApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedListApiResponse{} + +// FeedListApiResponse struct for FeedListApiResponse +type FeedListApiResponse struct { + Status *bool `json:"status,omitempty"` + Result FeedListResponse `json:"result"` +} + +type _FeedListApiResponse FeedListApiResponse + +// NewFeedListApiResponse instantiates a new FeedListApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedListApiResponse(result FeedListResponse) *FeedListApiResponse { + this := FeedListApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewFeedListApiResponseWithDefaults instantiates a new FeedListApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedListApiResponseWithDefaults() *FeedListApiResponse { + this := FeedListApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FeedListApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedListApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FeedListApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *FeedListApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *FeedListApiResponse) GetResult() FeedListResponse { + if o == nil { + var ret FeedListResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *FeedListApiResponse) GetResultOk() (*FeedListResponse, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *FeedListApiResponse) SetResult(v FeedListResponse) { + o.Result = v +} + +func (o FeedListApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedListApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *FeedListApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedListApiResponse := _FeedListApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedListApiResponse) + + if err != nil { + return err + } + + *o = FeedListApiResponse(varFeedListApiResponse) + + return err +} + +type NullableFeedListApiResponse struct { + value *FeedListApiResponse + isSet bool +} + +func (v NullableFeedListApiResponse) Get() *FeedListApiResponse { + return v.value +} + +func (v *NullableFeedListApiResponse) Set(val *FeedListApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFeedListApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedListApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedListApiResponse(val *FeedListApiResponse) *NullableFeedListApiResponse { + return &NullableFeedListApiResponse{value: val, isSet: true} +} + +func (v NullableFeedListApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedListApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_list_response.go b/go/futureagi/model_feed_list_response.go new file mode 100644 index 0000000..4195002 --- /dev/null +++ b/go/futureagi/model_feed_list_response.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedListResponse{} + +// FeedListResponse struct for FeedListResponse +type FeedListResponse struct { + Data []FeedListRow `json:"data"` + Total int32 `json:"total"` + Limit int32 `json:"limit"` + Offset int32 `json:"offset"` +} + +type _FeedListResponse FeedListResponse + +// NewFeedListResponse instantiates a new FeedListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedListResponse(data []FeedListRow, total int32, limit int32, offset int32) *FeedListResponse { + this := FeedListResponse{} + this.Data = data + this.Total = total + this.Limit = limit + this.Offset = offset + return &this +} + +// NewFeedListResponseWithDefaults instantiates a new FeedListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedListResponseWithDefaults() *FeedListResponse { + this := FeedListResponse{} + return &this +} + +// GetData returns the Data field value +func (o *FeedListResponse) GetData() []FeedListRow { + if o == nil { + var ret []FeedListRow + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *FeedListResponse) GetDataOk() ([]FeedListRow, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *FeedListResponse) SetData(v []FeedListRow) { + o.Data = v +} + +// GetTotal returns the Total field value +func (o *FeedListResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *FeedListResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *FeedListResponse) SetTotal(v int32) { + o.Total = v +} + +// GetLimit returns the Limit field value +func (o *FeedListResponse) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *FeedListResponse) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *FeedListResponse) SetLimit(v int32) { + o.Limit = v +} + +// GetOffset returns the Offset field value +func (o *FeedListResponse) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *FeedListResponse) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *FeedListResponse) SetOffset(v int32) { + o.Offset = v +} + +func (o FeedListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["total"] = o.Total + toSerialize["limit"] = o.Limit + toSerialize["offset"] = o.Offset + return toSerialize, nil +} + +func (o *FeedListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + "total", + "limit", + "offset", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedListResponse := _FeedListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedListResponse) + + if err != nil { + return err + } + + *o = FeedListResponse(varFeedListResponse) + + return err +} + +type NullableFeedListResponse struct { + value *FeedListResponse + isSet bool +} + +func (v NullableFeedListResponse) Get() *FeedListResponse { + return v.value +} + +func (v *NullableFeedListResponse) Set(val *FeedListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFeedListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedListResponse(val *FeedListResponse) *NullableFeedListResponse { + return &NullableFeedListResponse{value: val, isSet: true} +} + +func (v NullableFeedListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_list_row.go b/go/futureagi/model_feed_list_row.go new file mode 100644 index 0000000..6d2d51a --- /dev/null +++ b/go/futureagi/model_feed_list_row.go @@ -0,0 +1,798 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the FeedListRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedListRow{} + +// FeedListRow struct for FeedListRow +type FeedListRow struct { + ClusterId string `json:"cluster_id"` + Source string `json:"source"` + Error ErrorName `json:"error"` + Status string `json:"status"` + Severity string `json:"severity"` + Occurrences int32 `json:"occurrences"` + TraceCount int32 `json:"trace_count"` + FixLayer NullableString `json:"fix_layer"` + UsersAffected int32 `json:"users_affected"` + Sessions int32 `json:"sessions"` + FirstSeen NullableTime `json:"first_seen"` + LastSeen NullableTime `json:"last_seen"` + Trends []TrendPoint `json:"trends"` + Assignees []string `json:"assignees"` + Model NullableString `json:"model"` + ModelVersion NullableString `json:"model_version"` + Project NullableString `json:"project"` + ProjectId NullableString `json:"project_id"` + Environment NullableString `json:"environment"` + EvalScore NullableFloat32 `json:"eval_score"` + TraceId NullableString `json:"trace_id"` + ExternalIssueUrl NullableString `json:"external_issue_url"` + ExternalIssueId NullableString `json:"external_issue_id"` +} + +type _FeedListRow FeedListRow + +// NewFeedListRow instantiates a new FeedListRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedListRow(clusterId string, source string, error_ ErrorName, status string, severity string, occurrences int32, traceCount int32, fixLayer NullableString, usersAffected int32, sessions int32, firstSeen NullableTime, lastSeen NullableTime, trends []TrendPoint, assignees []string, model NullableString, modelVersion NullableString, project NullableString, projectId NullableString, environment NullableString, evalScore NullableFloat32, traceId NullableString, externalIssueUrl NullableString, externalIssueId NullableString) *FeedListRow { + this := FeedListRow{} + this.ClusterId = clusterId + this.Source = source + this.Error = error_ + this.Status = status + this.Severity = severity + this.Occurrences = occurrences + this.TraceCount = traceCount + this.FixLayer = fixLayer + this.UsersAffected = usersAffected + this.Sessions = sessions + this.FirstSeen = firstSeen + this.LastSeen = lastSeen + this.Trends = trends + this.Assignees = assignees + this.Model = model + this.ModelVersion = modelVersion + this.Project = project + this.ProjectId = projectId + this.Environment = environment + this.EvalScore = evalScore + this.TraceId = traceId + this.ExternalIssueUrl = externalIssueUrl + this.ExternalIssueId = externalIssueId + return &this +} + +// NewFeedListRowWithDefaults instantiates a new FeedListRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedListRowWithDefaults() *FeedListRow { + this := FeedListRow{} + return &this +} + +// GetClusterId returns the ClusterId field value +func (o *FeedListRow) GetClusterId() string { + if o == nil { + var ret string + return ret + } + + return o.ClusterId +} + +// GetClusterIdOk returns a tuple with the ClusterId field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetClusterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClusterId, true +} + +// SetClusterId sets field value +func (o *FeedListRow) SetClusterId(v string) { + o.ClusterId = v +} + +// GetSource returns the Source field value +func (o *FeedListRow) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *FeedListRow) SetSource(v string) { + o.Source = v +} + +// GetError returns the Error field value +func (o *FeedListRow) GetError() ErrorName { + if o == nil { + var ret ErrorName + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetErrorOk() (*ErrorName, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *FeedListRow) SetError(v ErrorName) { + o.Error = v +} + +// GetStatus returns the Status field value +func (o *FeedListRow) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *FeedListRow) SetStatus(v string) { + o.Status = v +} + +// GetSeverity returns the Severity field value +func (o *FeedListRow) GetSeverity() string { + if o == nil { + var ret string + return ret + } + + return o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetSeverityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Severity, true +} + +// SetSeverity sets field value +func (o *FeedListRow) SetSeverity(v string) { + o.Severity = v +} + +// GetOccurrences returns the Occurrences field value +func (o *FeedListRow) GetOccurrences() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Occurrences +} + +// GetOccurrencesOk returns a tuple with the Occurrences field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetOccurrencesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Occurrences, true +} + +// SetOccurrences sets field value +func (o *FeedListRow) SetOccurrences(v int32) { + o.Occurrences = v +} + +// GetTraceCount returns the TraceCount field value +func (o *FeedListRow) GetTraceCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TraceCount +} + +// GetTraceCountOk returns a tuple with the TraceCount field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetTraceCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TraceCount, true +} + +// SetTraceCount sets field value +func (o *FeedListRow) SetTraceCount(v int32) { + o.TraceCount = v +} + +// GetFixLayer returns the FixLayer field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetFixLayer() string { + if o == nil || o.FixLayer.Get() == nil { + var ret string + return ret + } + + return *o.FixLayer.Get() +} + +// GetFixLayerOk returns a tuple with the FixLayer field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetFixLayerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FixLayer.Get(), o.FixLayer.IsSet() +} + +// SetFixLayer sets field value +func (o *FeedListRow) SetFixLayer(v string) { + o.FixLayer.Set(&v) +} + +// GetUsersAffected returns the UsersAffected field value +func (o *FeedListRow) GetUsersAffected() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.UsersAffected +} + +// GetUsersAffectedOk returns a tuple with the UsersAffected field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetUsersAffectedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.UsersAffected, true +} + +// SetUsersAffected sets field value +func (o *FeedListRow) SetUsersAffected(v int32) { + o.UsersAffected = v +} + +// GetSessions returns the Sessions field value +func (o *FeedListRow) GetSessions() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Sessions +} + +// GetSessionsOk returns a tuple with the Sessions field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetSessionsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Sessions, true +} + +// SetSessions sets field value +func (o *FeedListRow) SetSessions(v int32) { + o.Sessions = v +} + +// GetFirstSeen returns the FirstSeen field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *FeedListRow) GetFirstSeen() time.Time { + if o == nil || o.FirstSeen.Get() == nil { + var ret time.Time + return ret + } + + return *o.FirstSeen.Get() +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetFirstSeenOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.FirstSeen.Get(), o.FirstSeen.IsSet() +} + +// SetFirstSeen sets field value +func (o *FeedListRow) SetFirstSeen(v time.Time) { + o.FirstSeen.Set(&v) +} + +// GetLastSeen returns the LastSeen field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *FeedListRow) GetLastSeen() time.Time { + if o == nil || o.LastSeen.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastSeen.Get() +} + +// GetLastSeenOk returns a tuple with the LastSeen field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetLastSeenOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastSeen.Get(), o.LastSeen.IsSet() +} + +// SetLastSeen sets field value +func (o *FeedListRow) SetLastSeen(v time.Time) { + o.LastSeen.Set(&v) +} + +// GetTrends returns the Trends field value +func (o *FeedListRow) GetTrends() []TrendPoint { + if o == nil { + var ret []TrendPoint + return ret + } + + return o.Trends +} + +// GetTrendsOk returns a tuple with the Trends field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetTrendsOk() ([]TrendPoint, bool) { + if o == nil { + return nil, false + } + return o.Trends, true +} + +// SetTrends sets field value +func (o *FeedListRow) SetTrends(v []TrendPoint) { + o.Trends = v +} + +// GetAssignees returns the Assignees field value +func (o *FeedListRow) GetAssignees() []string { + if o == nil { + var ret []string + return ret + } + + return o.Assignees +} + +// GetAssigneesOk returns a tuple with the Assignees field value +// and a boolean to check if the value has been set. +func (o *FeedListRow) GetAssigneesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Assignees, true +} + +// SetAssignees sets field value +func (o *FeedListRow) SetAssignees(v []string) { + o.Assignees = v +} + +// GetModel returns the Model field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetModel() string { + if o == nil || o.Model.Get() == nil { + var ret string + return ret + } + + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// SetModel sets field value +func (o *FeedListRow) SetModel(v string) { + o.Model.Set(&v) +} + +// GetModelVersion returns the ModelVersion field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetModelVersion() string { + if o == nil || o.ModelVersion.Get() == nil { + var ret string + return ret + } + + return *o.ModelVersion.Get() +} + +// GetModelVersionOk returns a tuple with the ModelVersion field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetModelVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ModelVersion.Get(), o.ModelVersion.IsSet() +} + +// SetModelVersion sets field value +func (o *FeedListRow) SetModelVersion(v string) { + o.ModelVersion.Set(&v) +} + +// GetProject returns the Project field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetProject() string { + if o == nil || o.Project.Get() == nil { + var ret string + return ret + } + + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// SetProject sets field value +func (o *FeedListRow) SetProject(v string) { + o.Project.Set(&v) +} + +// GetProjectId returns the ProjectId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetProjectId() string { + if o == nil || o.ProjectId.Get() == nil { + var ret string + return ret + } + + return *o.ProjectId.Get() +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectId.Get(), o.ProjectId.IsSet() +} + +// SetProjectId sets field value +func (o *FeedListRow) SetProjectId(v string) { + o.ProjectId.Set(&v) +} + +// GetEnvironment returns the Environment field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetEnvironment() string { + if o == nil || o.Environment.Get() == nil { + var ret string + return ret + } + + return *o.Environment.Get() +} + +// GetEnvironmentOk returns a tuple with the Environment field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Environment.Get(), o.Environment.IsSet() +} + +// SetEnvironment sets field value +func (o *FeedListRow) SetEnvironment(v string) { + o.Environment.Set(&v) +} + +// GetEvalScore returns the EvalScore field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *FeedListRow) GetEvalScore() float32 { + if o == nil || o.EvalScore.Get() == nil { + var ret float32 + return ret + } + + return *o.EvalScore.Get() +} + +// GetEvalScoreOk returns a tuple with the EvalScore field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetEvalScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.EvalScore.Get(), o.EvalScore.IsSet() +} + +// SetEvalScore sets field value +func (o *FeedListRow) SetEvalScore(v float32) { + o.EvalScore.Set(&v) +} + +// GetTraceId returns the TraceId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetTraceId() string { + if o == nil || o.TraceId.Get() == nil { + var ret string + return ret + } + + return *o.TraceId.Get() +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TraceId.Get(), o.TraceId.IsSet() +} + +// SetTraceId sets field value +func (o *FeedListRow) SetTraceId(v string) { + o.TraceId.Set(&v) +} + +// GetExternalIssueUrl returns the ExternalIssueUrl field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetExternalIssueUrl() string { + if o == nil || o.ExternalIssueUrl.Get() == nil { + var ret string + return ret + } + + return *o.ExternalIssueUrl.Get() +} + +// GetExternalIssueUrlOk returns a tuple with the ExternalIssueUrl field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetExternalIssueUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExternalIssueUrl.Get(), o.ExternalIssueUrl.IsSet() +} + +// SetExternalIssueUrl sets field value +func (o *FeedListRow) SetExternalIssueUrl(v string) { + o.ExternalIssueUrl.Set(&v) +} + +// GetExternalIssueId returns the ExternalIssueId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FeedListRow) GetExternalIssueId() string { + if o == nil || o.ExternalIssueId.Get() == nil { + var ret string + return ret + } + + return *o.ExternalIssueId.Get() +} + +// GetExternalIssueIdOk returns a tuple with the ExternalIssueId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedListRow) GetExternalIssueIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExternalIssueId.Get(), o.ExternalIssueId.IsSet() +} + +// SetExternalIssueId sets field value +func (o *FeedListRow) SetExternalIssueId(v string) { + o.ExternalIssueId.Set(&v) +} + +func (o FeedListRow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedListRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cluster_id"] = o.ClusterId + toSerialize["source"] = o.Source + toSerialize["error"] = o.Error + toSerialize["status"] = o.Status + toSerialize["severity"] = o.Severity + toSerialize["occurrences"] = o.Occurrences + toSerialize["trace_count"] = o.TraceCount + toSerialize["fix_layer"] = o.FixLayer.Get() + toSerialize["users_affected"] = o.UsersAffected + toSerialize["sessions"] = o.Sessions + toSerialize["first_seen"] = o.FirstSeen.Get() + toSerialize["last_seen"] = o.LastSeen.Get() + toSerialize["trends"] = o.Trends + toSerialize["assignees"] = o.Assignees + toSerialize["model"] = o.Model.Get() + toSerialize["model_version"] = o.ModelVersion.Get() + toSerialize["project"] = o.Project.Get() + toSerialize["project_id"] = o.ProjectId.Get() + toSerialize["environment"] = o.Environment.Get() + toSerialize["eval_score"] = o.EvalScore.Get() + toSerialize["trace_id"] = o.TraceId.Get() + toSerialize["external_issue_url"] = o.ExternalIssueUrl.Get() + toSerialize["external_issue_id"] = o.ExternalIssueId.Get() + return toSerialize, nil +} + +func (o *FeedListRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "cluster_id", + "source", + "error", + "status", + "severity", + "occurrences", + "trace_count", + "fix_layer", + "users_affected", + "sessions", + "first_seen", + "last_seen", + "trends", + "assignees", + "model", + "model_version", + "project", + "project_id", + "environment", + "eval_score", + "trace_id", + "external_issue_url", + "external_issue_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedListRow := _FeedListRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedListRow) + + if err != nil { + return err + } + + *o = FeedListRow(varFeedListRow) + + return err +} + +type NullableFeedListRow struct { + value *FeedListRow + isSet bool +} + +func (v NullableFeedListRow) Get() *FeedListRow { + return v.value +} + +func (v *NullableFeedListRow) Set(val *FeedListRow) { + v.value = val + v.isSet = true +} + +func (v NullableFeedListRow) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedListRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedListRow(val *FeedListRow) *NullableFeedListRow { + return &NullableFeedListRow{value: val, isSet: true} +} + +func (v NullableFeedListRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedListRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_sidebar.go b/go/futureagi/model_feed_sidebar.go new file mode 100644 index 0000000..dd241ec --- /dev/null +++ b/go/futureagi/model_feed_sidebar.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedSidebar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedSidebar{} + +// FeedSidebar struct for FeedSidebar +type FeedSidebar struct { + Timeline SidebarTimeline `json:"timeline"` + AiMetadata SidebarAIMetadata `json:"ai_metadata"` + Evaluations []EvaluationResult `json:"evaluations"` + CoOccurringIssues []CoOccurringIssue `json:"co_occurring_issues"` +} + +type _FeedSidebar FeedSidebar + +// NewFeedSidebar instantiates a new FeedSidebar object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedSidebar(timeline SidebarTimeline, aiMetadata SidebarAIMetadata, evaluations []EvaluationResult, coOccurringIssues []CoOccurringIssue) *FeedSidebar { + this := FeedSidebar{} + this.Timeline = timeline + this.AiMetadata = aiMetadata + this.Evaluations = evaluations + this.CoOccurringIssues = coOccurringIssues + return &this +} + +// NewFeedSidebarWithDefaults instantiates a new FeedSidebar object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedSidebarWithDefaults() *FeedSidebar { + this := FeedSidebar{} + return &this +} + +// GetTimeline returns the Timeline field value +func (o *FeedSidebar) GetTimeline() SidebarTimeline { + if o == nil { + var ret SidebarTimeline + return ret + } + + return o.Timeline +} + +// GetTimelineOk returns a tuple with the Timeline field value +// and a boolean to check if the value has been set. +func (o *FeedSidebar) GetTimelineOk() (*SidebarTimeline, bool) { + if o == nil { + return nil, false + } + return &o.Timeline, true +} + +// SetTimeline sets field value +func (o *FeedSidebar) SetTimeline(v SidebarTimeline) { + o.Timeline = v +} + +// GetAiMetadata returns the AiMetadata field value +func (o *FeedSidebar) GetAiMetadata() SidebarAIMetadata { + if o == nil { + var ret SidebarAIMetadata + return ret + } + + return o.AiMetadata +} + +// GetAiMetadataOk returns a tuple with the AiMetadata field value +// and a boolean to check if the value has been set. +func (o *FeedSidebar) GetAiMetadataOk() (*SidebarAIMetadata, bool) { + if o == nil { + return nil, false + } + return &o.AiMetadata, true +} + +// SetAiMetadata sets field value +func (o *FeedSidebar) SetAiMetadata(v SidebarAIMetadata) { + o.AiMetadata = v +} + +// GetEvaluations returns the Evaluations field value +func (o *FeedSidebar) GetEvaluations() []EvaluationResult { + if o == nil { + var ret []EvaluationResult + return ret + } + + return o.Evaluations +} + +// GetEvaluationsOk returns a tuple with the Evaluations field value +// and a boolean to check if the value has been set. +func (o *FeedSidebar) GetEvaluationsOk() ([]EvaluationResult, bool) { + if o == nil { + return nil, false + } + return o.Evaluations, true +} + +// SetEvaluations sets field value +func (o *FeedSidebar) SetEvaluations(v []EvaluationResult) { + o.Evaluations = v +} + +// GetCoOccurringIssues returns the CoOccurringIssues field value +func (o *FeedSidebar) GetCoOccurringIssues() []CoOccurringIssue { + if o == nil { + var ret []CoOccurringIssue + return ret + } + + return o.CoOccurringIssues +} + +// GetCoOccurringIssuesOk returns a tuple with the CoOccurringIssues field value +// and a boolean to check if the value has been set. +func (o *FeedSidebar) GetCoOccurringIssuesOk() ([]CoOccurringIssue, bool) { + if o == nil { + return nil, false + } + return o.CoOccurringIssues, true +} + +// SetCoOccurringIssues sets field value +func (o *FeedSidebar) SetCoOccurringIssues(v []CoOccurringIssue) { + o.CoOccurringIssues = v +} + +func (o FeedSidebar) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedSidebar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["timeline"] = o.Timeline + toSerialize["ai_metadata"] = o.AiMetadata + toSerialize["evaluations"] = o.Evaluations + toSerialize["co_occurring_issues"] = o.CoOccurringIssues + return toSerialize, nil +} + +func (o *FeedSidebar) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timeline", + "ai_metadata", + "evaluations", + "co_occurring_issues", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedSidebar := _FeedSidebar{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedSidebar) + + if err != nil { + return err + } + + *o = FeedSidebar(varFeedSidebar) + + return err +} + +type NullableFeedSidebar struct { + value *FeedSidebar + isSet bool +} + +func (v NullableFeedSidebar) Get() *FeedSidebar { + return v.value +} + +func (v *NullableFeedSidebar) Set(val *FeedSidebar) { + v.value = val + v.isSet = true +} + +func (v NullableFeedSidebar) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedSidebar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedSidebar(val *FeedSidebar) *NullableFeedSidebar { + return &NullableFeedSidebar{value: val, isSet: true} +} + +func (v NullableFeedSidebar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedSidebar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_sidebar_api_response.go b/go/futureagi/model_feed_sidebar_api_response.go new file mode 100644 index 0000000..e4d32f5 --- /dev/null +++ b/go/futureagi/model_feed_sidebar_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedSidebarApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedSidebarApiResponse{} + +// FeedSidebarApiResponse struct for FeedSidebarApiResponse +type FeedSidebarApiResponse struct { + Status *bool `json:"status,omitempty"` + Result FeedSidebar `json:"result"` +} + +type _FeedSidebarApiResponse FeedSidebarApiResponse + +// NewFeedSidebarApiResponse instantiates a new FeedSidebarApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedSidebarApiResponse(result FeedSidebar) *FeedSidebarApiResponse { + this := FeedSidebarApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewFeedSidebarApiResponseWithDefaults instantiates a new FeedSidebarApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedSidebarApiResponseWithDefaults() *FeedSidebarApiResponse { + this := FeedSidebarApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FeedSidebarApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedSidebarApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FeedSidebarApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *FeedSidebarApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *FeedSidebarApiResponse) GetResult() FeedSidebar { + if o == nil { + var ret FeedSidebar + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *FeedSidebarApiResponse) GetResultOk() (*FeedSidebar, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *FeedSidebarApiResponse) SetResult(v FeedSidebar) { + o.Result = v +} + +func (o FeedSidebarApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedSidebarApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *FeedSidebarApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedSidebarApiResponse := _FeedSidebarApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedSidebarApiResponse) + + if err != nil { + return err + } + + *o = FeedSidebarApiResponse(varFeedSidebarApiResponse) + + return err +} + +type NullableFeedSidebarApiResponse struct { + value *FeedSidebarApiResponse + isSet bool +} + +func (v NullableFeedSidebarApiResponse) Get() *FeedSidebarApiResponse { + return v.value +} + +func (v *NullableFeedSidebarApiResponse) Set(val *FeedSidebarApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFeedSidebarApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedSidebarApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedSidebarApiResponse(val *FeedSidebarApiResponse) *NullableFeedSidebarApiResponse { + return &NullableFeedSidebarApiResponse{value: val, isSet: true} +} + +func (v NullableFeedSidebarApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedSidebarApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_stats.go b/go/futureagi/model_feed_stats.go new file mode 100644 index 0000000..667d2ad --- /dev/null +++ b/go/futureagi/model_feed_stats.go @@ -0,0 +1,297 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedStats{} + +// FeedStats struct for FeedStats +type FeedStats struct { + TotalErrors int32 `json:"total_errors"` + Escalating int32 `json:"escalating"` + ForReview int32 `json:"for_review"` + Acknowledged int32 `json:"acknowledged"` + Resolved int32 `json:"resolved"` + AffectedUsers int32 `json:"affected_users"` +} + +type _FeedStats FeedStats + +// NewFeedStats instantiates a new FeedStats object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedStats(totalErrors int32, escalating int32, forReview int32, acknowledged int32, resolved int32, affectedUsers int32) *FeedStats { + this := FeedStats{} + this.TotalErrors = totalErrors + this.Escalating = escalating + this.ForReview = forReview + this.Acknowledged = acknowledged + this.Resolved = resolved + this.AffectedUsers = affectedUsers + return &this +} + +// NewFeedStatsWithDefaults instantiates a new FeedStats object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedStatsWithDefaults() *FeedStats { + this := FeedStats{} + return &this +} + +// GetTotalErrors returns the TotalErrors field value +func (o *FeedStats) GetTotalErrors() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalErrors +} + +// GetTotalErrorsOk returns a tuple with the TotalErrors field value +// and a boolean to check if the value has been set. +func (o *FeedStats) GetTotalErrorsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalErrors, true +} + +// SetTotalErrors sets field value +func (o *FeedStats) SetTotalErrors(v int32) { + o.TotalErrors = v +} + +// GetEscalating returns the Escalating field value +func (o *FeedStats) GetEscalating() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Escalating +} + +// GetEscalatingOk returns a tuple with the Escalating field value +// and a boolean to check if the value has been set. +func (o *FeedStats) GetEscalatingOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Escalating, true +} + +// SetEscalating sets field value +func (o *FeedStats) SetEscalating(v int32) { + o.Escalating = v +} + +// GetForReview returns the ForReview field value +func (o *FeedStats) GetForReview() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ForReview +} + +// GetForReviewOk returns a tuple with the ForReview field value +// and a boolean to check if the value has been set. +func (o *FeedStats) GetForReviewOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ForReview, true +} + +// SetForReview sets field value +func (o *FeedStats) SetForReview(v int32) { + o.ForReview = v +} + +// GetAcknowledged returns the Acknowledged field value +func (o *FeedStats) GetAcknowledged() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Acknowledged +} + +// GetAcknowledgedOk returns a tuple with the Acknowledged field value +// and a boolean to check if the value has been set. +func (o *FeedStats) GetAcknowledgedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Acknowledged, true +} + +// SetAcknowledged sets field value +func (o *FeedStats) SetAcknowledged(v int32) { + o.Acknowledged = v +} + +// GetResolved returns the Resolved field value +func (o *FeedStats) GetResolved() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Resolved +} + +// GetResolvedOk returns a tuple with the Resolved field value +// and a boolean to check if the value has been set. +func (o *FeedStats) GetResolvedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Resolved, true +} + +// SetResolved sets field value +func (o *FeedStats) SetResolved(v int32) { + o.Resolved = v +} + +// GetAffectedUsers returns the AffectedUsers field value +func (o *FeedStats) GetAffectedUsers() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AffectedUsers +} + +// GetAffectedUsersOk returns a tuple with the AffectedUsers field value +// and a boolean to check if the value has been set. +func (o *FeedStats) GetAffectedUsersOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.AffectedUsers, true +} + +// SetAffectedUsers sets field value +func (o *FeedStats) SetAffectedUsers(v int32) { + o.AffectedUsers = v +} + +func (o FeedStats) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["total_errors"] = o.TotalErrors + toSerialize["escalating"] = o.Escalating + toSerialize["for_review"] = o.ForReview + toSerialize["acknowledged"] = o.Acknowledged + toSerialize["resolved"] = o.Resolved + toSerialize["affected_users"] = o.AffectedUsers + return toSerialize, nil +} + +func (o *FeedStats) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "total_errors", + "escalating", + "for_review", + "acknowledged", + "resolved", + "affected_users", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedStats := _FeedStats{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedStats) + + if err != nil { + return err + } + + *o = FeedStats(varFeedStats) + + return err +} + +type NullableFeedStats struct { + value *FeedStats + isSet bool +} + +func (v NullableFeedStats) Get() *FeedStats { + return v.value +} + +func (v *NullableFeedStats) Set(val *FeedStats) { + v.value = val + v.isSet = true +} + +func (v NullableFeedStats) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedStats(val *FeedStats) *NullableFeedStats { + return &NullableFeedStats{value: val, isSet: true} +} + +func (v NullableFeedStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_stats_api_response.go b/go/futureagi/model_feed_stats_api_response.go new file mode 100644 index 0000000..983a317 --- /dev/null +++ b/go/futureagi/model_feed_stats_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the FeedStatsApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedStatsApiResponse{} + +// FeedStatsApiResponse struct for FeedStatsApiResponse +type FeedStatsApiResponse struct { + Status *bool `json:"status,omitempty"` + Result FeedStats `json:"result"` +} + +type _FeedStatsApiResponse FeedStatsApiResponse + +// NewFeedStatsApiResponse instantiates a new FeedStatsApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedStatsApiResponse(result FeedStats) *FeedStatsApiResponse { + this := FeedStatsApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewFeedStatsApiResponseWithDefaults instantiates a new FeedStatsApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedStatsApiResponseWithDefaults() *FeedStatsApiResponse { + this := FeedStatsApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FeedStatsApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedStatsApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FeedStatsApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *FeedStatsApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *FeedStatsApiResponse) GetResult() FeedStats { + if o == nil { + var ret FeedStats + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *FeedStatsApiResponse) GetResultOk() (*FeedStats, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *FeedStatsApiResponse) SetResult(v FeedStats) { + o.Result = v +} + +func (o FeedStatsApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedStatsApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *FeedStatsApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedStatsApiResponse := _FeedStatsApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedStatsApiResponse) + + if err != nil { + return err + } + + *o = FeedStatsApiResponse(varFeedStatsApiResponse) + + return err +} + +type NullableFeedStatsApiResponse struct { + value *FeedStatsApiResponse + isSet bool +} + +func (v NullableFeedStatsApiResponse) Get() *FeedStatsApiResponse { + return v.value +} + +func (v *NullableFeedStatsApiResponse) Set(val *FeedStatsApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFeedStatsApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedStatsApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedStatsApiResponse(val *FeedStatsApiResponse) *NullableFeedStatsApiResponse { + return &NullableFeedStatsApiResponse{value: val, isSet: true} +} + +func (v NullableFeedStatsApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedStatsApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feed_update_body.go b/go/futureagi/model_feed_update_body.go new file mode 100644 index 0000000..a1ed1a1 --- /dev/null +++ b/go/futureagi/model_feed_update_body.go @@ -0,0 +1,244 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the FeedUpdateBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeedUpdateBody{} + +// FeedUpdateBody struct for FeedUpdateBody +type FeedUpdateBody struct { + ProjectId *string `json:"project_id,omitempty"` + Status *string `json:"status,omitempty"` + Severity *string `json:"severity,omitempty"` + Assignee NullableString `json:"assignee,omitempty"` +} + +// NewFeedUpdateBody instantiates a new FeedUpdateBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedUpdateBody() *FeedUpdateBody { + this := FeedUpdateBody{} + return &this +} + +// NewFeedUpdateBodyWithDefaults instantiates a new FeedUpdateBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedUpdateBodyWithDefaults() *FeedUpdateBody { + this := FeedUpdateBody{} + return &this +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *FeedUpdateBody) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedUpdateBody) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *FeedUpdateBody) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *FeedUpdateBody) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FeedUpdateBody) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedUpdateBody) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FeedUpdateBody) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *FeedUpdateBody) SetStatus(v string) { + o.Status = &v +} + +// GetSeverity returns the Severity field value if set, zero value otherwise. +func (o *FeedUpdateBody) GetSeverity() string { + if o == nil || IsNil(o.Severity) { + var ret string + return ret + } + return *o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeedUpdateBody) GetSeverityOk() (*string, bool) { + if o == nil || IsNil(o.Severity) { + return nil, false + } + return o.Severity, true +} + +// HasSeverity returns a boolean if a field has been set. +func (o *FeedUpdateBody) HasSeverity() bool { + if o != nil && !IsNil(o.Severity) { + return true + } + + return false +} + +// SetSeverity gets a reference to the given string and assigns it to the Severity field. +func (o *FeedUpdateBody) SetSeverity(v string) { + o.Severity = &v +} + +// GetAssignee returns the Assignee field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeedUpdateBody) GetAssignee() string { + if o == nil || IsNil(o.Assignee.Get()) { + var ret string + return ret + } + return *o.Assignee.Get() +} + +// GetAssigneeOk returns a tuple with the Assignee field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FeedUpdateBody) GetAssigneeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Assignee.Get(), o.Assignee.IsSet() +} + +// HasAssignee returns a boolean if a field has been set. +func (o *FeedUpdateBody) HasAssignee() bool { + if o != nil && o.Assignee.IsSet() { + return true + } + + return false +} + +// SetAssignee gets a reference to the given NullableString and assigns it to the Assignee field. +func (o *FeedUpdateBody) SetAssignee(v string) { + o.Assignee.Set(&v) +} + +// SetAssigneeNil sets the value for Assignee to be an explicit nil +func (o *FeedUpdateBody) SetAssigneeNil() { + o.Assignee.Set(nil) +} + +// UnsetAssignee ensures that no value is present for Assignee, not even an explicit nil +func (o *FeedUpdateBody) UnsetAssignee() { + o.Assignee.Unset() +} + +func (o FeedUpdateBody) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeedUpdateBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity + } + if o.Assignee.IsSet() { + toSerialize["assignee"] = o.Assignee.Get() + } + return toSerialize, nil +} + +type NullableFeedUpdateBody struct { + value *FeedUpdateBody + isSet bool +} + +func (v NullableFeedUpdateBody) Get() *FeedUpdateBody { + return v.value +} + +func (v *NullableFeedUpdateBody) Set(val *FeedUpdateBody) { + v.value = val + v.isSet = true +} + +func (v NullableFeedUpdateBody) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedUpdateBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedUpdateBody(val *FeedUpdateBody) *NullableFeedUpdateBody { + return &NullableFeedUpdateBody{value: val, isSet: true} +} + +func (v NullableFeedUpdateBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedUpdateBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_feedback.go b/go/futureagi/model_feedback.go new file mode 100644 index 0000000..7b666ff --- /dev/null +++ b/go/futureagi/model_feedback.go @@ -0,0 +1,531 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Feedback type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Feedback{} + +// Feedback struct for Feedback +type Feedback struct { + Id *string `json:"id,omitempty"` + SourceId string `json:"source_id"` + Source string `json:"source"` + UserEvalMetric NullableString `json:"user_eval_metric,omitempty"` + Value string `json:"value"` + Explanation NullableString `json:"explanation,omitempty"` + RowId NullableString `json:"row_id,omitempty"` + CustomEvalConfigId NullableString `json:"custom_eval_config_id,omitempty"` + FeedbackImprovement NullableString `json:"feedback_improvement,omitempty"` + ActionType NullableString `json:"action_type,omitempty"` +} + +type _Feedback Feedback + +// NewFeedback instantiates a new Feedback object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeedback(sourceId string, source string, value string) *Feedback { + this := Feedback{} + this.SourceId = sourceId + this.Source = source + this.Value = value + return &this +} + +// NewFeedbackWithDefaults instantiates a new Feedback object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeedbackWithDefaults() *Feedback { + this := Feedback{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Feedback) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Feedback) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Feedback) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Feedback) SetId(v string) { + o.Id = &v +} + +// GetSourceId returns the SourceId field value +func (o *Feedback) GetSourceId() string { + if o == nil { + var ret string + return ret + } + + return o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value +// and a boolean to check if the value has been set. +func (o *Feedback) GetSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceId, true +} + +// SetSourceId sets field value +func (o *Feedback) SetSourceId(v string) { + o.SourceId = v +} + +// GetSource returns the Source field value +func (o *Feedback) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *Feedback) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *Feedback) SetSource(v string) { + o.Source = v +} + +// GetUserEvalMetric returns the UserEvalMetric field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Feedback) GetUserEvalMetric() string { + if o == nil || IsNil(o.UserEvalMetric.Get()) { + var ret string + return ret + } + return *o.UserEvalMetric.Get() +} + +// GetUserEvalMetricOk returns a tuple with the UserEvalMetric field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Feedback) GetUserEvalMetricOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UserEvalMetric.Get(), o.UserEvalMetric.IsSet() +} + +// HasUserEvalMetric returns a boolean if a field has been set. +func (o *Feedback) HasUserEvalMetric() bool { + if o != nil && o.UserEvalMetric.IsSet() { + return true + } + + return false +} + +// SetUserEvalMetric gets a reference to the given NullableString and assigns it to the UserEvalMetric field. +func (o *Feedback) SetUserEvalMetric(v string) { + o.UserEvalMetric.Set(&v) +} + +// SetUserEvalMetricNil sets the value for UserEvalMetric to be an explicit nil +func (o *Feedback) SetUserEvalMetricNil() { + o.UserEvalMetric.Set(nil) +} + +// UnsetUserEvalMetric ensures that no value is present for UserEvalMetric, not even an explicit nil +func (o *Feedback) UnsetUserEvalMetric() { + o.UserEvalMetric.Unset() +} + +// GetValue returns the Value field value +func (o *Feedback) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *Feedback) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *Feedback) SetValue(v string) { + o.Value = v +} + +// GetExplanation returns the Explanation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Feedback) GetExplanation() string { + if o == nil || IsNil(o.Explanation.Get()) { + var ret string + return ret + } + return *o.Explanation.Get() +} + +// GetExplanationOk returns a tuple with the Explanation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Feedback) GetExplanationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Explanation.Get(), o.Explanation.IsSet() +} + +// HasExplanation returns a boolean if a field has been set. +func (o *Feedback) HasExplanation() bool { + if o != nil && o.Explanation.IsSet() { + return true + } + + return false +} + +// SetExplanation gets a reference to the given NullableString and assigns it to the Explanation field. +func (o *Feedback) SetExplanation(v string) { + o.Explanation.Set(&v) +} + +// SetExplanationNil sets the value for Explanation to be an explicit nil +func (o *Feedback) SetExplanationNil() { + o.Explanation.Set(nil) +} + +// UnsetExplanation ensures that no value is present for Explanation, not even an explicit nil +func (o *Feedback) UnsetExplanation() { + o.Explanation.Unset() +} + +// GetRowId returns the RowId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Feedback) GetRowId() string { + if o == nil || IsNil(o.RowId.Get()) { + var ret string + return ret + } + return *o.RowId.Get() +} + +// GetRowIdOk returns a tuple with the RowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Feedback) GetRowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RowId.Get(), o.RowId.IsSet() +} + +// HasRowId returns a boolean if a field has been set. +func (o *Feedback) HasRowId() bool { + if o != nil && o.RowId.IsSet() { + return true + } + + return false +} + +// SetRowId gets a reference to the given NullableString and assigns it to the RowId field. +func (o *Feedback) SetRowId(v string) { + o.RowId.Set(&v) +} + +// SetRowIdNil sets the value for RowId to be an explicit nil +func (o *Feedback) SetRowIdNil() { + o.RowId.Set(nil) +} + +// UnsetRowId ensures that no value is present for RowId, not even an explicit nil +func (o *Feedback) UnsetRowId() { + o.RowId.Unset() +} + +// GetCustomEvalConfigId returns the CustomEvalConfigId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Feedback) GetCustomEvalConfigId() string { + if o == nil || IsNil(o.CustomEvalConfigId.Get()) { + var ret string + return ret + } + return *o.CustomEvalConfigId.Get() +} + +// GetCustomEvalConfigIdOk returns a tuple with the CustomEvalConfigId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Feedback) GetCustomEvalConfigIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomEvalConfigId.Get(), o.CustomEvalConfigId.IsSet() +} + +// HasCustomEvalConfigId returns a boolean if a field has been set. +func (o *Feedback) HasCustomEvalConfigId() bool { + if o != nil && o.CustomEvalConfigId.IsSet() { + return true + } + + return false +} + +// SetCustomEvalConfigId gets a reference to the given NullableString and assigns it to the CustomEvalConfigId field. +func (o *Feedback) SetCustomEvalConfigId(v string) { + o.CustomEvalConfigId.Set(&v) +} + +// SetCustomEvalConfigIdNil sets the value for CustomEvalConfigId to be an explicit nil +func (o *Feedback) SetCustomEvalConfigIdNil() { + o.CustomEvalConfigId.Set(nil) +} + +// UnsetCustomEvalConfigId ensures that no value is present for CustomEvalConfigId, not even an explicit nil +func (o *Feedback) UnsetCustomEvalConfigId() { + o.CustomEvalConfigId.Unset() +} + +// GetFeedbackImprovement returns the FeedbackImprovement field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Feedback) GetFeedbackImprovement() string { + if o == nil || IsNil(o.FeedbackImprovement.Get()) { + var ret string + return ret + } + return *o.FeedbackImprovement.Get() +} + +// GetFeedbackImprovementOk returns a tuple with the FeedbackImprovement field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Feedback) GetFeedbackImprovementOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FeedbackImprovement.Get(), o.FeedbackImprovement.IsSet() +} + +// HasFeedbackImprovement returns a boolean if a field has been set. +func (o *Feedback) HasFeedbackImprovement() bool { + if o != nil && o.FeedbackImprovement.IsSet() { + return true + } + + return false +} + +// SetFeedbackImprovement gets a reference to the given NullableString and assigns it to the FeedbackImprovement field. +func (o *Feedback) SetFeedbackImprovement(v string) { + o.FeedbackImprovement.Set(&v) +} + +// SetFeedbackImprovementNil sets the value for FeedbackImprovement to be an explicit nil +func (o *Feedback) SetFeedbackImprovementNil() { + o.FeedbackImprovement.Set(nil) +} + +// UnsetFeedbackImprovement ensures that no value is present for FeedbackImprovement, not even an explicit nil +func (o *Feedback) UnsetFeedbackImprovement() { + o.FeedbackImprovement.Unset() +} + +// GetActionType returns the ActionType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Feedback) GetActionType() string { + if o == nil || IsNil(o.ActionType.Get()) { + var ret string + return ret + } + return *o.ActionType.Get() +} + +// GetActionTypeOk returns a tuple with the ActionType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Feedback) GetActionTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ActionType.Get(), o.ActionType.IsSet() +} + +// HasActionType returns a boolean if a field has been set. +func (o *Feedback) HasActionType() bool { + if o != nil && o.ActionType.IsSet() { + return true + } + + return false +} + +// SetActionType gets a reference to the given NullableString and assigns it to the ActionType field. +func (o *Feedback) SetActionType(v string) { + o.ActionType.Set(&v) +} + +// SetActionTypeNil sets the value for ActionType to be an explicit nil +func (o *Feedback) SetActionTypeNil() { + o.ActionType.Set(nil) +} + +// UnsetActionType ensures that no value is present for ActionType, not even an explicit nil +func (o *Feedback) UnsetActionType() { + o.ActionType.Unset() +} + +func (o Feedback) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Feedback) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["source_id"] = o.SourceId + toSerialize["source"] = o.Source + if o.UserEvalMetric.IsSet() { + toSerialize["user_eval_metric"] = o.UserEvalMetric.Get() + } + toSerialize["value"] = o.Value + if o.Explanation.IsSet() { + toSerialize["explanation"] = o.Explanation.Get() + } + if o.RowId.IsSet() { + toSerialize["row_id"] = o.RowId.Get() + } + if o.CustomEvalConfigId.IsSet() { + toSerialize["custom_eval_config_id"] = o.CustomEvalConfigId.Get() + } + if o.FeedbackImprovement.IsSet() { + toSerialize["feedback_improvement"] = o.FeedbackImprovement.Get() + } + if o.ActionType.IsSet() { + toSerialize["action_type"] = o.ActionType.Get() + } + return toSerialize, nil +} + +func (o *Feedback) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source_id", + "source", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFeedback := _Feedback{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFeedback) + + if err != nil { + return err + } + + *o = Feedback(varFeedback) + + return err +} + +type NullableFeedback struct { + value *Feedback + isSet bool +} + +func (v NullableFeedback) Get() *Feedback { + return v.value +} + +func (v *NullableFeedback) Set(val *Feedback) { + v.value = val + v.isSet = true +} + +func (v NullableFeedback) IsSet() bool { + return v.isSet +} + +func (v *NullableFeedback) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeedback(val *Feedback) *NullableFeedback { + return &NullableFeedback{value: val, isSet: true} +} + +func (v NullableFeedback) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeedback) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_get_annotation_labels_response.go b/go/futureagi/model_get_annotation_labels_response.go new file mode 100644 index 0000000..e21ab7f --- /dev/null +++ b/go/futureagi/model_get_annotation_labels_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GetAnnotationLabelsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAnnotationLabelsResponse{} + +// GetAnnotationLabelsResponse struct for GetAnnotationLabelsResponse +type GetAnnotationLabelsResponse struct { + Status *bool `json:"status,omitempty"` + Result []AnnotationLabelResponse `json:"result"` +} + +type _GetAnnotationLabelsResponse GetAnnotationLabelsResponse + +// NewGetAnnotationLabelsResponse instantiates a new GetAnnotationLabelsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetAnnotationLabelsResponse(result []AnnotationLabelResponse) *GetAnnotationLabelsResponse { + this := GetAnnotationLabelsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewGetAnnotationLabelsResponseWithDefaults instantiates a new GetAnnotationLabelsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetAnnotationLabelsResponseWithDefaults() *GetAnnotationLabelsResponse { + this := GetAnnotationLabelsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetAnnotationLabelsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAnnotationLabelsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetAnnotationLabelsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *GetAnnotationLabelsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *GetAnnotationLabelsResponse) GetResult() []AnnotationLabelResponse { + if o == nil { + var ret []AnnotationLabelResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *GetAnnotationLabelsResponse) GetResultOk() ([]AnnotationLabelResponse, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *GetAnnotationLabelsResponse) SetResult(v []AnnotationLabelResponse) { + o.Result = v +} + +func (o GetAnnotationLabelsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAnnotationLabelsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *GetAnnotationLabelsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetAnnotationLabelsResponse := _GetAnnotationLabelsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGetAnnotationLabelsResponse) + + if err != nil { + return err + } + + *o = GetAnnotationLabelsResponse(varGetAnnotationLabelsResponse) + + return err +} + +type NullableGetAnnotationLabelsResponse struct { + value *GetAnnotationLabelsResponse + isSet bool +} + +func (v NullableGetAnnotationLabelsResponse) Get() *GetAnnotationLabelsResponse { + return v.value +} + +func (v *NullableGetAnnotationLabelsResponse) Set(val *GetAnnotationLabelsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetAnnotationLabelsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAnnotationLabelsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAnnotationLabelsResponse(val *GetAnnotationLabelsResponse) *NullableGetAnnotationLabelsResponse { + return &NullableGetAnnotationLabelsResponse{value: val, isSet: true} +} + +func (v NullableGetAnnotationLabelsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAnnotationLabelsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_get_trace_annotation.go b/go/futureagi/model_get_trace_annotation.go new file mode 100644 index 0000000..6955314 --- /dev/null +++ b/go/futureagi/model_get_trace_annotation.go @@ -0,0 +1,257 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the GetTraceAnnotation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetTraceAnnotation{} + +// GetTraceAnnotation struct for GetTraceAnnotation +type GetTraceAnnotation struct { + ObservationSpanId NullableString `json:"observation_span_id,omitempty"` + TraceId NullableString `json:"trace_id,omitempty"` + // JSON-encoded UUID list. + Annotators *string `json:"annotators,omitempty"` + // JSON-encoded UUID list. + ExcludeAnnotators *string `json:"exclude_annotators,omitempty"` +} + +// NewGetTraceAnnotation instantiates a new GetTraceAnnotation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetTraceAnnotation() *GetTraceAnnotation { + this := GetTraceAnnotation{} + return &this +} + +// NewGetTraceAnnotationWithDefaults instantiates a new GetTraceAnnotation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetTraceAnnotationWithDefaults() *GetTraceAnnotation { + this := GetTraceAnnotation{} + return &this +} + +// GetObservationSpanId returns the ObservationSpanId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetTraceAnnotation) GetObservationSpanId() string { + if o == nil || IsNil(o.ObservationSpanId.Get()) { + var ret string + return ret + } + return *o.ObservationSpanId.Get() +} + +// GetObservationSpanIdOk returns a tuple with the ObservationSpanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GetTraceAnnotation) GetObservationSpanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObservationSpanId.Get(), o.ObservationSpanId.IsSet() +} + +// HasObservationSpanId returns a boolean if a field has been set. +func (o *GetTraceAnnotation) HasObservationSpanId() bool { + if o != nil && o.ObservationSpanId.IsSet() { + return true + } + + return false +} + +// SetObservationSpanId gets a reference to the given NullableString and assigns it to the ObservationSpanId field. +func (o *GetTraceAnnotation) SetObservationSpanId(v string) { + o.ObservationSpanId.Set(&v) +} + +// SetObservationSpanIdNil sets the value for ObservationSpanId to be an explicit nil +func (o *GetTraceAnnotation) SetObservationSpanIdNil() { + o.ObservationSpanId.Set(nil) +} + +// UnsetObservationSpanId ensures that no value is present for ObservationSpanId, not even an explicit nil +func (o *GetTraceAnnotation) UnsetObservationSpanId() { + o.ObservationSpanId.Unset() +} + +// GetTraceId returns the TraceId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetTraceAnnotation) GetTraceId() string { + if o == nil || IsNil(o.TraceId.Get()) { + var ret string + return ret + } + return *o.TraceId.Get() +} + +// GetTraceIdOk returns a tuple with the TraceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GetTraceAnnotation) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TraceId.Get(), o.TraceId.IsSet() +} + +// HasTraceId returns a boolean if a field has been set. +func (o *GetTraceAnnotation) HasTraceId() bool { + if o != nil && o.TraceId.IsSet() { + return true + } + + return false +} + +// SetTraceId gets a reference to the given NullableString and assigns it to the TraceId field. +func (o *GetTraceAnnotation) SetTraceId(v string) { + o.TraceId.Set(&v) +} + +// SetTraceIdNil sets the value for TraceId to be an explicit nil +func (o *GetTraceAnnotation) SetTraceIdNil() { + o.TraceId.Set(nil) +} + +// UnsetTraceId ensures that no value is present for TraceId, not even an explicit nil +func (o *GetTraceAnnotation) UnsetTraceId() { + o.TraceId.Unset() +} + +// GetAnnotators returns the Annotators field value if set, zero value otherwise. +func (o *GetTraceAnnotation) GetAnnotators() string { + if o == nil || IsNil(o.Annotators) { + var ret string + return ret + } + return *o.Annotators +} + +// GetAnnotatorsOk returns a tuple with the Annotators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetTraceAnnotation) GetAnnotatorsOk() (*string, bool) { + if o == nil || IsNil(o.Annotators) { + return nil, false + } + return o.Annotators, true +} + +// HasAnnotators returns a boolean if a field has been set. +func (o *GetTraceAnnotation) HasAnnotators() bool { + if o != nil && !IsNil(o.Annotators) { + return true + } + + return false +} + +// SetAnnotators gets a reference to the given string and assigns it to the Annotators field. +func (o *GetTraceAnnotation) SetAnnotators(v string) { + o.Annotators = &v +} + +// GetExcludeAnnotators returns the ExcludeAnnotators field value if set, zero value otherwise. +func (o *GetTraceAnnotation) GetExcludeAnnotators() string { + if o == nil || IsNil(o.ExcludeAnnotators) { + var ret string + return ret + } + return *o.ExcludeAnnotators +} + +// GetExcludeAnnotatorsOk returns a tuple with the ExcludeAnnotators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetTraceAnnotation) GetExcludeAnnotatorsOk() (*string, bool) { + if o == nil || IsNil(o.ExcludeAnnotators) { + return nil, false + } + return o.ExcludeAnnotators, true +} + +// HasExcludeAnnotators returns a boolean if a field has been set. +func (o *GetTraceAnnotation) HasExcludeAnnotators() bool { + if o != nil && !IsNil(o.ExcludeAnnotators) { + return true + } + + return false +} + +// SetExcludeAnnotators gets a reference to the given string and assigns it to the ExcludeAnnotators field. +func (o *GetTraceAnnotation) SetExcludeAnnotators(v string) { + o.ExcludeAnnotators = &v +} + +func (o GetTraceAnnotation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetTraceAnnotation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ObservationSpanId.IsSet() { + toSerialize["observation_span_id"] = o.ObservationSpanId.Get() + } + if o.TraceId.IsSet() { + toSerialize["trace_id"] = o.TraceId.Get() + } + if !IsNil(o.Annotators) { + toSerialize["annotators"] = o.Annotators + } + if !IsNil(o.ExcludeAnnotators) { + toSerialize["exclude_annotators"] = o.ExcludeAnnotators + } + return toSerialize, nil +} + +type NullableGetTraceAnnotation struct { + value *GetTraceAnnotation + isSet bool +} + +func (v NullableGetTraceAnnotation) Get() *GetTraceAnnotation { + return v.value +} + +func (v *NullableGetTraceAnnotation) Set(val *GetTraceAnnotation) { + v.value = val + v.isSet = true +} + +func (v NullableGetTraceAnnotation) IsSet() bool { + return v.isSet +} + +func (v *NullableGetTraceAnnotation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetTraceAnnotation(val *GetTraceAnnotation) *NullableGetTraceAnnotation { + return &NullableGetTraceAnnotation{value: val, isSet: true} +} + +func (v NullableGetTraceAnnotation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetTraceAnnotation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_get_trace_annotation_values_response.go b/go/futureagi/model_get_trace_annotation_values_response.go new file mode 100644 index 0000000..09b078b --- /dev/null +++ b/go/futureagi/model_get_trace_annotation_values_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GetTraceAnnotationValuesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetTraceAnnotationValuesResponse{} + +// GetTraceAnnotationValuesResponse struct for GetTraceAnnotationValuesResponse +type GetTraceAnnotationValuesResponse struct { + Status *bool `json:"status,omitempty"` + Result GetTraceAnnotationValuesResult `json:"result"` +} + +type _GetTraceAnnotationValuesResponse GetTraceAnnotationValuesResponse + +// NewGetTraceAnnotationValuesResponse instantiates a new GetTraceAnnotationValuesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetTraceAnnotationValuesResponse(result GetTraceAnnotationValuesResult) *GetTraceAnnotationValuesResponse { + this := GetTraceAnnotationValuesResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewGetTraceAnnotationValuesResponseWithDefaults instantiates a new GetTraceAnnotationValuesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetTraceAnnotationValuesResponseWithDefaults() *GetTraceAnnotationValuesResponse { + this := GetTraceAnnotationValuesResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetTraceAnnotationValuesResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetTraceAnnotationValuesResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetTraceAnnotationValuesResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *GetTraceAnnotationValuesResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *GetTraceAnnotationValuesResponse) GetResult() GetTraceAnnotationValuesResult { + if o == nil { + var ret GetTraceAnnotationValuesResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *GetTraceAnnotationValuesResponse) GetResultOk() (*GetTraceAnnotationValuesResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *GetTraceAnnotationValuesResponse) SetResult(v GetTraceAnnotationValuesResult) { + o.Result = v +} + +func (o GetTraceAnnotationValuesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetTraceAnnotationValuesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *GetTraceAnnotationValuesResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetTraceAnnotationValuesResponse := _GetTraceAnnotationValuesResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGetTraceAnnotationValuesResponse) + + if err != nil { + return err + } + + *o = GetTraceAnnotationValuesResponse(varGetTraceAnnotationValuesResponse) + + return err +} + +type NullableGetTraceAnnotationValuesResponse struct { + value *GetTraceAnnotationValuesResponse + isSet bool +} + +func (v NullableGetTraceAnnotationValuesResponse) Get() *GetTraceAnnotationValuesResponse { + return v.value +} + +func (v *NullableGetTraceAnnotationValuesResponse) Set(val *GetTraceAnnotationValuesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetTraceAnnotationValuesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetTraceAnnotationValuesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetTraceAnnotationValuesResponse(val *GetTraceAnnotationValuesResponse) *NullableGetTraceAnnotationValuesResponse { + return &NullableGetTraceAnnotationValuesResponse{value: val, isSet: true} +} + +func (v NullableGetTraceAnnotationValuesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetTraceAnnotationValuesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_get_trace_annotation_values_result.go b/go/futureagi/model_get_trace_annotation_values_result.go new file mode 100644 index 0000000..1c0ac4d --- /dev/null +++ b/go/futureagi/model_get_trace_annotation_values_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GetTraceAnnotationValuesResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetTraceAnnotationValuesResult{} + +// GetTraceAnnotationValuesResult struct for GetTraceAnnotationValuesResult +type GetTraceAnnotationValuesResult struct { + Annotations []TraceAnnotationValueResponse `json:"annotations"` + Notes []TraceAnnotationNoteResponse `json:"notes"` +} + +type _GetTraceAnnotationValuesResult GetTraceAnnotationValuesResult + +// NewGetTraceAnnotationValuesResult instantiates a new GetTraceAnnotationValuesResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetTraceAnnotationValuesResult(annotations []TraceAnnotationValueResponse, notes []TraceAnnotationNoteResponse) *GetTraceAnnotationValuesResult { + this := GetTraceAnnotationValuesResult{} + this.Annotations = annotations + this.Notes = notes + return &this +} + +// NewGetTraceAnnotationValuesResultWithDefaults instantiates a new GetTraceAnnotationValuesResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetTraceAnnotationValuesResultWithDefaults() *GetTraceAnnotationValuesResult { + this := GetTraceAnnotationValuesResult{} + return &this +} + +// GetAnnotations returns the Annotations field value +func (o *GetTraceAnnotationValuesResult) GetAnnotations() []TraceAnnotationValueResponse { + if o == nil { + var ret []TraceAnnotationValueResponse + return ret + } + + return o.Annotations +} + +// GetAnnotationsOk returns a tuple with the Annotations field value +// and a boolean to check if the value has been set. +func (o *GetTraceAnnotationValuesResult) GetAnnotationsOk() ([]TraceAnnotationValueResponse, bool) { + if o == nil { + return nil, false + } + return o.Annotations, true +} + +// SetAnnotations sets field value +func (o *GetTraceAnnotationValuesResult) SetAnnotations(v []TraceAnnotationValueResponse) { + o.Annotations = v +} + +// GetNotes returns the Notes field value +func (o *GetTraceAnnotationValuesResult) GetNotes() []TraceAnnotationNoteResponse { + if o == nil { + var ret []TraceAnnotationNoteResponse + return ret + } + + return o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value +// and a boolean to check if the value has been set. +func (o *GetTraceAnnotationValuesResult) GetNotesOk() ([]TraceAnnotationNoteResponse, bool) { + if o == nil { + return nil, false + } + return o.Notes, true +} + +// SetNotes sets field value +func (o *GetTraceAnnotationValuesResult) SetNotes(v []TraceAnnotationNoteResponse) { + o.Notes = v +} + +func (o GetTraceAnnotationValuesResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetTraceAnnotationValuesResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["annotations"] = o.Annotations + toSerialize["notes"] = o.Notes + return toSerialize, nil +} + +func (o *GetTraceAnnotationValuesResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "annotations", + "notes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetTraceAnnotationValuesResult := _GetTraceAnnotationValuesResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGetTraceAnnotationValuesResult) + + if err != nil { + return err + } + + *o = GetTraceAnnotationValuesResult(varGetTraceAnnotationValuesResult) + + return err +} + +type NullableGetTraceAnnotationValuesResult struct { + value *GetTraceAnnotationValuesResult + isSet bool +} + +func (v NullableGetTraceAnnotationValuesResult) Get() *GetTraceAnnotationValuesResult { + return v.value +} + +func (v *NullableGetTraceAnnotationValuesResult) Set(val *GetTraceAnnotationValuesResult) { + v.value = val + v.isSet = true +} + +func (v NullableGetTraceAnnotationValuesResult) IsSet() bool { + return v.isSet +} + +func (v *NullableGetTraceAnnotationValuesResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetTraceAnnotationValuesResult(val *GetTraceAnnotationValuesResult) *NullableGetTraceAnnotationValuesResult { + return &NullableGetTraceAnnotationValuesResult{value: val, isSet: true} +} + +func (v NullableGetTraceAnnotationValuesResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetTraceAnnotationValuesResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_config.go b/go/futureagi/model_ground_truth_config.go new file mode 100644 index 0000000..583fbeb --- /dev/null +++ b/go/futureagi/model_ground_truth_config.go @@ -0,0 +1,316 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the GroundTruthConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthConfig{} + +// GroundTruthConfig struct for GroundTruthConfig +type GroundTruthConfig struct { + Enabled *bool `json:"enabled,omitempty"` + GroundTruthId NullableString `json:"ground_truth_id,omitempty"` + Mode *string `json:"mode,omitempty"` + MaxExamples *int32 `json:"max_examples,omitempty"` + SimilarityThreshold *float32 `json:"similarity_threshold,omitempty"` + InjectionFormat *string `json:"injection_format,omitempty"` +} + +// NewGroundTruthConfig instantiates a new GroundTruthConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthConfig() *GroundTruthConfig { + this := GroundTruthConfig{} + return &this +} + +// NewGroundTruthConfigWithDefaults instantiates a new GroundTruthConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthConfigWithDefaults() *GroundTruthConfig { + this := GroundTruthConfig{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *GroundTruthConfig) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfig) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *GroundTruthConfig) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *GroundTruthConfig) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetGroundTruthId returns the GroundTruthId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GroundTruthConfig) GetGroundTruthId() string { + if o == nil || IsNil(o.GroundTruthId.Get()) { + var ret string + return ret + } + return *o.GroundTruthId.Get() +} + +// GetGroundTruthIdOk returns a tuple with the GroundTruthId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroundTruthConfig) GetGroundTruthIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GroundTruthId.Get(), o.GroundTruthId.IsSet() +} + +// HasGroundTruthId returns a boolean if a field has been set. +func (o *GroundTruthConfig) HasGroundTruthId() bool { + if o != nil && o.GroundTruthId.IsSet() { + return true + } + + return false +} + +// SetGroundTruthId gets a reference to the given NullableString and assigns it to the GroundTruthId field. +func (o *GroundTruthConfig) SetGroundTruthId(v string) { + o.GroundTruthId.Set(&v) +} + +// SetGroundTruthIdNil sets the value for GroundTruthId to be an explicit nil +func (o *GroundTruthConfig) SetGroundTruthIdNil() { + o.GroundTruthId.Set(nil) +} + +// UnsetGroundTruthId ensures that no value is present for GroundTruthId, not even an explicit nil +func (o *GroundTruthConfig) UnsetGroundTruthId() { + o.GroundTruthId.Unset() +} + +// GetMode returns the Mode field value if set, zero value otherwise. +func (o *GroundTruthConfig) GetMode() string { + if o == nil || IsNil(o.Mode) { + var ret string + return ret + } + return *o.Mode +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfig) GetModeOk() (*string, bool) { + if o == nil || IsNil(o.Mode) { + return nil, false + } + return o.Mode, true +} + +// HasMode returns a boolean if a field has been set. +func (o *GroundTruthConfig) HasMode() bool { + if o != nil && !IsNil(o.Mode) { + return true + } + + return false +} + +// SetMode gets a reference to the given string and assigns it to the Mode field. +func (o *GroundTruthConfig) SetMode(v string) { + o.Mode = &v +} + +// GetMaxExamples returns the MaxExamples field value if set, zero value otherwise. +func (o *GroundTruthConfig) GetMaxExamples() int32 { + if o == nil || IsNil(o.MaxExamples) { + var ret int32 + return ret + } + return *o.MaxExamples +} + +// GetMaxExamplesOk returns a tuple with the MaxExamples field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfig) GetMaxExamplesOk() (*int32, bool) { + if o == nil || IsNil(o.MaxExamples) { + return nil, false + } + return o.MaxExamples, true +} + +// HasMaxExamples returns a boolean if a field has been set. +func (o *GroundTruthConfig) HasMaxExamples() bool { + if o != nil && !IsNil(o.MaxExamples) { + return true + } + + return false +} + +// SetMaxExamples gets a reference to the given int32 and assigns it to the MaxExamples field. +func (o *GroundTruthConfig) SetMaxExamples(v int32) { + o.MaxExamples = &v +} + +// GetSimilarityThreshold returns the SimilarityThreshold field value if set, zero value otherwise. +func (o *GroundTruthConfig) GetSimilarityThreshold() float32 { + if o == nil || IsNil(o.SimilarityThreshold) { + var ret float32 + return ret + } + return *o.SimilarityThreshold +} + +// GetSimilarityThresholdOk returns a tuple with the SimilarityThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfig) GetSimilarityThresholdOk() (*float32, bool) { + if o == nil || IsNil(o.SimilarityThreshold) { + return nil, false + } + return o.SimilarityThreshold, true +} + +// HasSimilarityThreshold returns a boolean if a field has been set. +func (o *GroundTruthConfig) HasSimilarityThreshold() bool { + if o != nil && !IsNil(o.SimilarityThreshold) { + return true + } + + return false +} + +// SetSimilarityThreshold gets a reference to the given float32 and assigns it to the SimilarityThreshold field. +func (o *GroundTruthConfig) SetSimilarityThreshold(v float32) { + o.SimilarityThreshold = &v +} + +// GetInjectionFormat returns the InjectionFormat field value if set, zero value otherwise. +func (o *GroundTruthConfig) GetInjectionFormat() string { + if o == nil || IsNil(o.InjectionFormat) { + var ret string + return ret + } + return *o.InjectionFormat +} + +// GetInjectionFormatOk returns a tuple with the InjectionFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfig) GetInjectionFormatOk() (*string, bool) { + if o == nil || IsNil(o.InjectionFormat) { + return nil, false + } + return o.InjectionFormat, true +} + +// HasInjectionFormat returns a boolean if a field has been set. +func (o *GroundTruthConfig) HasInjectionFormat() bool { + if o != nil && !IsNil(o.InjectionFormat) { + return true + } + + return false +} + +// SetInjectionFormat gets a reference to the given string and assigns it to the InjectionFormat field. +func (o *GroundTruthConfig) SetInjectionFormat(v string) { + o.InjectionFormat = &v +} + +func (o GroundTruthConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if o.GroundTruthId.IsSet() { + toSerialize["ground_truth_id"] = o.GroundTruthId.Get() + } + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode + } + if !IsNil(o.MaxExamples) { + toSerialize["max_examples"] = o.MaxExamples + } + if !IsNil(o.SimilarityThreshold) { + toSerialize["similarity_threshold"] = o.SimilarityThreshold + } + if !IsNil(o.InjectionFormat) { + toSerialize["injection_format"] = o.InjectionFormat + } + return toSerialize, nil +} + +type NullableGroundTruthConfig struct { + value *GroundTruthConfig + isSet bool +} + +func (v NullableGroundTruthConfig) Get() *GroundTruthConfig { + return v.value +} + +func (v *NullableGroundTruthConfig) Set(val *GroundTruthConfig) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthConfig(val *GroundTruthConfig) *NullableGroundTruthConfig { + return &NullableGroundTruthConfig{value: val, isSet: true} +} + +func (v NullableGroundTruthConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_config_request.go b/go/futureagi/model_ground_truth_config_request.go new file mode 100644 index 0000000..2771160 --- /dev/null +++ b/go/futureagi/model_ground_truth_config_request.go @@ -0,0 +1,328 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the GroundTruthConfigRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthConfigRequest{} + +// GroundTruthConfigRequest struct for GroundTruthConfigRequest +type GroundTruthConfigRequest struct { + Enabled *bool `json:"enabled,omitempty"` + GroundTruthId NullableString `json:"ground_truth_id,omitempty"` + Mode *string `json:"mode,omitempty"` + MaxExamples *int32 `json:"max_examples,omitempty"` + SimilarityThreshold *float32 `json:"similarity_threshold,omitempty"` + InjectionFormat *string `json:"injection_format,omitempty"` +} + +// NewGroundTruthConfigRequest instantiates a new GroundTruthConfigRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthConfigRequest() *GroundTruthConfigRequest { + this := GroundTruthConfigRequest{} + var enabled bool = true + this.Enabled = &enabled + var mode string = "auto" + this.Mode = &mode + var injectionFormat string = "structured" + this.InjectionFormat = &injectionFormat + return &this +} + +// NewGroundTruthConfigRequestWithDefaults instantiates a new GroundTruthConfigRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthConfigRequestWithDefaults() *GroundTruthConfigRequest { + this := GroundTruthConfigRequest{} + var enabled bool = true + this.Enabled = &enabled + var mode string = "auto" + this.Mode = &mode + var injectionFormat string = "structured" + this.InjectionFormat = &injectionFormat + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *GroundTruthConfigRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *GroundTruthConfigRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *GroundTruthConfigRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetGroundTruthId returns the GroundTruthId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GroundTruthConfigRequest) GetGroundTruthId() string { + if o == nil || IsNil(o.GroundTruthId.Get()) { + var ret string + return ret + } + return *o.GroundTruthId.Get() +} + +// GetGroundTruthIdOk returns a tuple with the GroundTruthId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroundTruthConfigRequest) GetGroundTruthIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GroundTruthId.Get(), o.GroundTruthId.IsSet() +} + +// HasGroundTruthId returns a boolean if a field has been set. +func (o *GroundTruthConfigRequest) HasGroundTruthId() bool { + if o != nil && o.GroundTruthId.IsSet() { + return true + } + + return false +} + +// SetGroundTruthId gets a reference to the given NullableString and assigns it to the GroundTruthId field. +func (o *GroundTruthConfigRequest) SetGroundTruthId(v string) { + o.GroundTruthId.Set(&v) +} + +// SetGroundTruthIdNil sets the value for GroundTruthId to be an explicit nil +func (o *GroundTruthConfigRequest) SetGroundTruthIdNil() { + o.GroundTruthId.Set(nil) +} + +// UnsetGroundTruthId ensures that no value is present for GroundTruthId, not even an explicit nil +func (o *GroundTruthConfigRequest) UnsetGroundTruthId() { + o.GroundTruthId.Unset() +} + +// GetMode returns the Mode field value if set, zero value otherwise. +func (o *GroundTruthConfigRequest) GetMode() string { + if o == nil || IsNil(o.Mode) { + var ret string + return ret + } + return *o.Mode +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigRequest) GetModeOk() (*string, bool) { + if o == nil || IsNil(o.Mode) { + return nil, false + } + return o.Mode, true +} + +// HasMode returns a boolean if a field has been set. +func (o *GroundTruthConfigRequest) HasMode() bool { + if o != nil && !IsNil(o.Mode) { + return true + } + + return false +} + +// SetMode gets a reference to the given string and assigns it to the Mode field. +func (o *GroundTruthConfigRequest) SetMode(v string) { + o.Mode = &v +} + +// GetMaxExamples returns the MaxExamples field value if set, zero value otherwise. +func (o *GroundTruthConfigRequest) GetMaxExamples() int32 { + if o == nil || IsNil(o.MaxExamples) { + var ret int32 + return ret + } + return *o.MaxExamples +} + +// GetMaxExamplesOk returns a tuple with the MaxExamples field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigRequest) GetMaxExamplesOk() (*int32, bool) { + if o == nil || IsNil(o.MaxExamples) { + return nil, false + } + return o.MaxExamples, true +} + +// HasMaxExamples returns a boolean if a field has been set. +func (o *GroundTruthConfigRequest) HasMaxExamples() bool { + if o != nil && !IsNil(o.MaxExamples) { + return true + } + + return false +} + +// SetMaxExamples gets a reference to the given int32 and assigns it to the MaxExamples field. +func (o *GroundTruthConfigRequest) SetMaxExamples(v int32) { + o.MaxExamples = &v +} + +// GetSimilarityThreshold returns the SimilarityThreshold field value if set, zero value otherwise. +func (o *GroundTruthConfigRequest) GetSimilarityThreshold() float32 { + if o == nil || IsNil(o.SimilarityThreshold) { + var ret float32 + return ret + } + return *o.SimilarityThreshold +} + +// GetSimilarityThresholdOk returns a tuple with the SimilarityThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigRequest) GetSimilarityThresholdOk() (*float32, bool) { + if o == nil || IsNil(o.SimilarityThreshold) { + return nil, false + } + return o.SimilarityThreshold, true +} + +// HasSimilarityThreshold returns a boolean if a field has been set. +func (o *GroundTruthConfigRequest) HasSimilarityThreshold() bool { + if o != nil && !IsNil(o.SimilarityThreshold) { + return true + } + + return false +} + +// SetSimilarityThreshold gets a reference to the given float32 and assigns it to the SimilarityThreshold field. +func (o *GroundTruthConfigRequest) SetSimilarityThreshold(v float32) { + o.SimilarityThreshold = &v +} + +// GetInjectionFormat returns the InjectionFormat field value if set, zero value otherwise. +func (o *GroundTruthConfigRequest) GetInjectionFormat() string { + if o == nil || IsNil(o.InjectionFormat) { + var ret string + return ret + } + return *o.InjectionFormat +} + +// GetInjectionFormatOk returns a tuple with the InjectionFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigRequest) GetInjectionFormatOk() (*string, bool) { + if o == nil || IsNil(o.InjectionFormat) { + return nil, false + } + return o.InjectionFormat, true +} + +// HasInjectionFormat returns a boolean if a field has been set. +func (o *GroundTruthConfigRequest) HasInjectionFormat() bool { + if o != nil && !IsNil(o.InjectionFormat) { + return true + } + + return false +} + +// SetInjectionFormat gets a reference to the given string and assigns it to the InjectionFormat field. +func (o *GroundTruthConfigRequest) SetInjectionFormat(v string) { + o.InjectionFormat = &v +} + +func (o GroundTruthConfigRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthConfigRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if o.GroundTruthId.IsSet() { + toSerialize["ground_truth_id"] = o.GroundTruthId.Get() + } + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode + } + if !IsNil(o.MaxExamples) { + toSerialize["max_examples"] = o.MaxExamples + } + if !IsNil(o.SimilarityThreshold) { + toSerialize["similarity_threshold"] = o.SimilarityThreshold + } + if !IsNil(o.InjectionFormat) { + toSerialize["injection_format"] = o.InjectionFormat + } + return toSerialize, nil +} + +type NullableGroundTruthConfigRequest struct { + value *GroundTruthConfigRequest + isSet bool +} + +func (v NullableGroundTruthConfigRequest) Get() *GroundTruthConfigRequest { + return v.value +} + +func (v *NullableGroundTruthConfigRequest) Set(val *GroundTruthConfigRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthConfigRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthConfigRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthConfigRequest(val *GroundTruthConfigRequest) *NullableGroundTruthConfigRequest { + return &NullableGroundTruthConfigRequest{value: val, isSet: true} +} + +func (v NullableGroundTruthConfigRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthConfigRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_config_response.go b/go/futureagi/model_ground_truth_config_response.go new file mode 100644 index 0000000..420a102 --- /dev/null +++ b/go/futureagi/model_ground_truth_config_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GroundTruthConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthConfigResponse{} + +// GroundTruthConfigResponse struct for GroundTruthConfigResponse +type GroundTruthConfigResponse struct { + Status bool `json:"status"` + Result GroundTruthConfigResponseResult `json:"result"` +} + +type _GroundTruthConfigResponse GroundTruthConfigResponse + +// NewGroundTruthConfigResponse instantiates a new GroundTruthConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthConfigResponse(status bool, result GroundTruthConfigResponseResult) *GroundTruthConfigResponse { + this := GroundTruthConfigResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewGroundTruthConfigResponseWithDefaults instantiates a new GroundTruthConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthConfigResponseWithDefaults() *GroundTruthConfigResponse { + this := GroundTruthConfigResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *GroundTruthConfigResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *GroundTruthConfigResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *GroundTruthConfigResponse) GetResult() GroundTruthConfigResponseResult { + if o == nil { + var ret GroundTruthConfigResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigResponse) GetResultOk() (*GroundTruthConfigResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *GroundTruthConfigResponse) SetResult(v GroundTruthConfigResponseResult) { + o.Result = v +} + +func (o GroundTruthConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *GroundTruthConfigResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroundTruthConfigResponse := _GroundTruthConfigResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroundTruthConfigResponse) + + if err != nil { + return err + } + + *o = GroundTruthConfigResponse(varGroundTruthConfigResponse) + + return err +} + +type NullableGroundTruthConfigResponse struct { + value *GroundTruthConfigResponse + isSet bool +} + +func (v NullableGroundTruthConfigResponse) Get() *GroundTruthConfigResponse { + return v.value +} + +func (v *NullableGroundTruthConfigResponse) Set(val *GroundTruthConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthConfigResponse(val *GroundTruthConfigResponse) *NullableGroundTruthConfigResponse { + return &NullableGroundTruthConfigResponse{value: val, isSet: true} +} + +func (v NullableGroundTruthConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_config_response_result.go b/go/futureagi/model_ground_truth_config_response_result.go new file mode 100644 index 0000000..d5c93c4 --- /dev/null +++ b/go/futureagi/model_ground_truth_config_response_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GroundTruthConfigResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthConfigResponseResult{} + +// GroundTruthConfigResponseResult struct for GroundTruthConfigResponseResult +type GroundTruthConfigResponseResult struct { + GroundTruth GroundTruthConfig `json:"ground_truth"` +} + +type _GroundTruthConfigResponseResult GroundTruthConfigResponseResult + +// NewGroundTruthConfigResponseResult instantiates a new GroundTruthConfigResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthConfigResponseResult(groundTruth GroundTruthConfig) *GroundTruthConfigResponseResult { + this := GroundTruthConfigResponseResult{} + this.GroundTruth = groundTruth + return &this +} + +// NewGroundTruthConfigResponseResultWithDefaults instantiates a new GroundTruthConfigResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthConfigResponseResultWithDefaults() *GroundTruthConfigResponseResult { + this := GroundTruthConfigResponseResult{} + return &this +} + +// GetGroundTruth returns the GroundTruth field value +func (o *GroundTruthConfigResponseResult) GetGroundTruth() GroundTruthConfig { + if o == nil { + var ret GroundTruthConfig + return ret + } + + return o.GroundTruth +} + +// GetGroundTruthOk returns a tuple with the GroundTruth field value +// and a boolean to check if the value has been set. +func (o *GroundTruthConfigResponseResult) GetGroundTruthOk() (*GroundTruthConfig, bool) { + if o == nil { + return nil, false + } + return &o.GroundTruth, true +} + +// SetGroundTruth sets field value +func (o *GroundTruthConfigResponseResult) SetGroundTruth(v GroundTruthConfig) { + o.GroundTruth = v +} + +func (o GroundTruthConfigResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthConfigResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ground_truth"] = o.GroundTruth + return toSerialize, nil +} + +func (o *GroundTruthConfigResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ground_truth", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroundTruthConfigResponseResult := _GroundTruthConfigResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroundTruthConfigResponseResult) + + if err != nil { + return err + } + + *o = GroundTruthConfigResponseResult(varGroundTruthConfigResponseResult) + + return err +} + +type NullableGroundTruthConfigResponseResult struct { + value *GroundTruthConfigResponseResult + isSet bool +} + +func (v NullableGroundTruthConfigResponseResult) Get() *GroundTruthConfigResponseResult { + return v.value +} + +func (v *NullableGroundTruthConfigResponseResult) Set(val *GroundTruthConfigResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthConfigResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthConfigResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthConfigResponseResult(val *GroundTruthConfigResponseResult) *NullableGroundTruthConfigResponseResult { + return &NullableGroundTruthConfigResponseResult{value: val, isSet: true} +} + +func (v NullableGroundTruthConfigResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthConfigResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_item.go b/go/futureagi/model_ground_truth_item.go new file mode 100644 index 0000000..92c80e9 --- /dev/null +++ b/go/futureagi/model_ground_truth_item.go @@ -0,0 +1,529 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GroundTruthItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthItem{} + +// GroundTruthItem struct for GroundTruthItem +type GroundTruthItem struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + FileName *string `json:"file_name,omitempty"` + Columns []string `json:"columns"` + RowCount int32 `json:"row_count"` + VariableMapping map[string]interface{} `json:"variable_mapping,omitempty"` + RoleMapping map[string]interface{} `json:"role_mapping,omitempty"` + EmbeddingStatus *string `json:"embedding_status,omitempty"` + EmbeddedRowCount *int32 `json:"embedded_row_count,omitempty"` + StorageType *string `json:"storage_type,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` +} + +type _GroundTruthItem GroundTruthItem + +// NewGroundTruthItem instantiates a new GroundTruthItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthItem(id string, name string, columns []string, rowCount int32) *GroundTruthItem { + this := GroundTruthItem{} + this.Id = id + this.Name = name + this.Columns = columns + this.RowCount = rowCount + return &this +} + +// NewGroundTruthItemWithDefaults instantiates a new GroundTruthItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthItemWithDefaults() *GroundTruthItem { + this := GroundTruthItem{} + return &this +} + +// GetId returns the Id field value +func (o *GroundTruthItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GroundTruthItem) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *GroundTruthItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GroundTruthItem) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GroundTruthItem) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GroundTruthItem) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GroundTruthItem) SetDescription(v string) { + o.Description = &v +} + +// GetFileName returns the FileName field value if set, zero value otherwise. +func (o *GroundTruthItem) GetFileName() string { + if o == nil || IsNil(o.FileName) { + var ret string + return ret + } + return *o.FileName +} + +// GetFileNameOk returns a tuple with the FileName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetFileNameOk() (*string, bool) { + if o == nil || IsNil(o.FileName) { + return nil, false + } + return o.FileName, true +} + +// HasFileName returns a boolean if a field has been set. +func (o *GroundTruthItem) HasFileName() bool { + if o != nil && !IsNil(o.FileName) { + return true + } + + return false +} + +// SetFileName gets a reference to the given string and assigns it to the FileName field. +func (o *GroundTruthItem) SetFileName(v string) { + o.FileName = &v +} + +// GetColumns returns the Columns field value +func (o *GroundTruthItem) GetColumns() []string { + if o == nil { + var ret []string + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetColumnsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *GroundTruthItem) SetColumns(v []string) { + o.Columns = v +} + +// GetRowCount returns the RowCount field value +func (o *GroundTruthItem) GetRowCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowCount +} + +// GetRowCountOk returns a tuple with the RowCount field value +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetRowCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowCount, true +} + +// SetRowCount sets field value +func (o *GroundTruthItem) SetRowCount(v int32) { + o.RowCount = v +} + +// GetVariableMapping returns the VariableMapping field value if set, zero value otherwise. +func (o *GroundTruthItem) GetVariableMapping() map[string]interface{} { + if o == nil || IsNil(o.VariableMapping) { + var ret map[string]interface{} + return ret + } + return o.VariableMapping +} + +// GetVariableMappingOk returns a tuple with the VariableMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetVariableMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.VariableMapping) { + return map[string]interface{}{}, false + } + return o.VariableMapping, true +} + +// HasVariableMapping returns a boolean if a field has been set. +func (o *GroundTruthItem) HasVariableMapping() bool { + if o != nil && !IsNil(o.VariableMapping) { + return true + } + + return false +} + +// SetVariableMapping gets a reference to the given map[string]interface{} and assigns it to the VariableMapping field. +func (o *GroundTruthItem) SetVariableMapping(v map[string]interface{}) { + o.VariableMapping = v +} + +// GetRoleMapping returns the RoleMapping field value if set, zero value otherwise. +func (o *GroundTruthItem) GetRoleMapping() map[string]interface{} { + if o == nil || IsNil(o.RoleMapping) { + var ret map[string]interface{} + return ret + } + return o.RoleMapping +} + +// GetRoleMappingOk returns a tuple with the RoleMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetRoleMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RoleMapping) { + return map[string]interface{}{}, false + } + return o.RoleMapping, true +} + +// HasRoleMapping returns a boolean if a field has been set. +func (o *GroundTruthItem) HasRoleMapping() bool { + if o != nil && !IsNil(o.RoleMapping) { + return true + } + + return false +} + +// SetRoleMapping gets a reference to the given map[string]interface{} and assigns it to the RoleMapping field. +func (o *GroundTruthItem) SetRoleMapping(v map[string]interface{}) { + o.RoleMapping = v +} + +// GetEmbeddingStatus returns the EmbeddingStatus field value if set, zero value otherwise. +func (o *GroundTruthItem) GetEmbeddingStatus() string { + if o == nil || IsNil(o.EmbeddingStatus) { + var ret string + return ret + } + return *o.EmbeddingStatus +} + +// GetEmbeddingStatusOk returns a tuple with the EmbeddingStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetEmbeddingStatusOk() (*string, bool) { + if o == nil || IsNil(o.EmbeddingStatus) { + return nil, false + } + return o.EmbeddingStatus, true +} + +// HasEmbeddingStatus returns a boolean if a field has been set. +func (o *GroundTruthItem) HasEmbeddingStatus() bool { + if o != nil && !IsNil(o.EmbeddingStatus) { + return true + } + + return false +} + +// SetEmbeddingStatus gets a reference to the given string and assigns it to the EmbeddingStatus field. +func (o *GroundTruthItem) SetEmbeddingStatus(v string) { + o.EmbeddingStatus = &v +} + +// GetEmbeddedRowCount returns the EmbeddedRowCount field value if set, zero value otherwise. +func (o *GroundTruthItem) GetEmbeddedRowCount() int32 { + if o == nil || IsNil(o.EmbeddedRowCount) { + var ret int32 + return ret + } + return *o.EmbeddedRowCount +} + +// GetEmbeddedRowCountOk returns a tuple with the EmbeddedRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetEmbeddedRowCountOk() (*int32, bool) { + if o == nil || IsNil(o.EmbeddedRowCount) { + return nil, false + } + return o.EmbeddedRowCount, true +} + +// HasEmbeddedRowCount returns a boolean if a field has been set. +func (o *GroundTruthItem) HasEmbeddedRowCount() bool { + if o != nil && !IsNil(o.EmbeddedRowCount) { + return true + } + + return false +} + +// SetEmbeddedRowCount gets a reference to the given int32 and assigns it to the EmbeddedRowCount field. +func (o *GroundTruthItem) SetEmbeddedRowCount(v int32) { + o.EmbeddedRowCount = &v +} + +// GetStorageType returns the StorageType field value if set, zero value otherwise. +func (o *GroundTruthItem) GetStorageType() string { + if o == nil || IsNil(o.StorageType) { + var ret string + return ret + } + return *o.StorageType +} + +// GetStorageTypeOk returns a tuple with the StorageType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetStorageTypeOk() (*string, bool) { + if o == nil || IsNil(o.StorageType) { + return nil, false + } + return o.StorageType, true +} + +// HasStorageType returns a boolean if a field has been set. +func (o *GroundTruthItem) HasStorageType() bool { + if o != nil && !IsNil(o.StorageType) { + return true + } + + return false +} + +// SetStorageType gets a reference to the given string and assigns it to the StorageType field. +func (o *GroundTruthItem) SetStorageType(v string) { + o.StorageType = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GroundTruthItem) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthItem) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GroundTruthItem) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GroundTruthItem) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +func (o GroundTruthItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.FileName) { + toSerialize["file_name"] = o.FileName + } + toSerialize["columns"] = o.Columns + toSerialize["row_count"] = o.RowCount + if !IsNil(o.VariableMapping) { + toSerialize["variable_mapping"] = o.VariableMapping + } + if !IsNil(o.RoleMapping) { + toSerialize["role_mapping"] = o.RoleMapping + } + if !IsNil(o.EmbeddingStatus) { + toSerialize["embedding_status"] = o.EmbeddingStatus + } + if !IsNil(o.EmbeddedRowCount) { + toSerialize["embedded_row_count"] = o.EmbeddedRowCount + } + if !IsNil(o.StorageType) { + toSerialize["storage_type"] = o.StorageType + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *GroundTruthItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "columns", + "row_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroundTruthItem := _GroundTruthItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroundTruthItem) + + if err != nil { + return err + } + + *o = GroundTruthItem(varGroundTruthItem) + + return err +} + +type NullableGroundTruthItem struct { + value *GroundTruthItem + isSet bool +} + +func (v NullableGroundTruthItem) Get() *GroundTruthItem { + return v.value +} + +func (v *NullableGroundTruthItem) Set(val *GroundTruthItem) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthItem) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthItem(val *GroundTruthItem) *NullableGroundTruthItem { + return &NullableGroundTruthItem{value: val, isSet: true} +} + +func (v NullableGroundTruthItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_list_response.go b/go/futureagi/model_ground_truth_list_response.go new file mode 100644 index 0000000..da232c3 --- /dev/null +++ b/go/futureagi/model_ground_truth_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GroundTruthListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthListResponse{} + +// GroundTruthListResponse struct for GroundTruthListResponse +type GroundTruthListResponse struct { + Status bool `json:"status"` + Result GroundTruthListResponseResult `json:"result"` +} + +type _GroundTruthListResponse GroundTruthListResponse + +// NewGroundTruthListResponse instantiates a new GroundTruthListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthListResponse(status bool, result GroundTruthListResponseResult) *GroundTruthListResponse { + this := GroundTruthListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewGroundTruthListResponseWithDefaults instantiates a new GroundTruthListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthListResponseWithDefaults() *GroundTruthListResponse { + this := GroundTruthListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *GroundTruthListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *GroundTruthListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *GroundTruthListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *GroundTruthListResponse) GetResult() GroundTruthListResponseResult { + if o == nil { + var ret GroundTruthListResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *GroundTruthListResponse) GetResultOk() (*GroundTruthListResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *GroundTruthListResponse) SetResult(v GroundTruthListResponseResult) { + o.Result = v +} + +func (o GroundTruthListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *GroundTruthListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroundTruthListResponse := _GroundTruthListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroundTruthListResponse) + + if err != nil { + return err + } + + *o = GroundTruthListResponse(varGroundTruthListResponse) + + return err +} + +type NullableGroundTruthListResponse struct { + value *GroundTruthListResponse + isSet bool +} + +func (v NullableGroundTruthListResponse) Get() *GroundTruthListResponse { + return v.value +} + +func (v *NullableGroundTruthListResponse) Set(val *GroundTruthListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthListResponse(val *GroundTruthListResponse) *NullableGroundTruthListResponse { + return &NullableGroundTruthListResponse{value: val, isSet: true} +} + +func (v NullableGroundTruthListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_list_response_result.go b/go/futureagi/model_ground_truth_list_response_result.go new file mode 100644 index 0000000..f3d6d93 --- /dev/null +++ b/go/futureagi/model_ground_truth_list_response_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GroundTruthListResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthListResponseResult{} + +// GroundTruthListResponseResult struct for GroundTruthListResponseResult +type GroundTruthListResponseResult struct { + TemplateId string `json:"template_id"` + Items []GroundTruthItem `json:"items"` + Total int32 `json:"total"` +} + +type _GroundTruthListResponseResult GroundTruthListResponseResult + +// NewGroundTruthListResponseResult instantiates a new GroundTruthListResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthListResponseResult(templateId string, items []GroundTruthItem, total int32) *GroundTruthListResponseResult { + this := GroundTruthListResponseResult{} + this.TemplateId = templateId + this.Items = items + this.Total = total + return &this +} + +// NewGroundTruthListResponseResultWithDefaults instantiates a new GroundTruthListResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthListResponseResultWithDefaults() *GroundTruthListResponseResult { + this := GroundTruthListResponseResult{} + return &this +} + +// GetTemplateId returns the TemplateId field value +func (o *GroundTruthListResponseResult) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *GroundTruthListResponseResult) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *GroundTruthListResponseResult) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetItems returns the Items field value +func (o *GroundTruthListResponseResult) GetItems() []GroundTruthItem { + if o == nil { + var ret []GroundTruthItem + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *GroundTruthListResponseResult) GetItemsOk() ([]GroundTruthItem, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *GroundTruthListResponseResult) SetItems(v []GroundTruthItem) { + o.Items = v +} + +// GetTotal returns the Total field value +func (o *GroundTruthListResponseResult) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *GroundTruthListResponseResult) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *GroundTruthListResponseResult) SetTotal(v int32) { + o.Total = v +} + +func (o GroundTruthListResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthListResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template_id"] = o.TemplateId + toSerialize["items"] = o.Items + toSerialize["total"] = o.Total + return toSerialize, nil +} + +func (o *GroundTruthListResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_id", + "items", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroundTruthListResponseResult := _GroundTruthListResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroundTruthListResponseResult) + + if err != nil { + return err + } + + *o = GroundTruthListResponseResult(varGroundTruthListResponseResult) + + return err +} + +type NullableGroundTruthListResponseResult struct { + value *GroundTruthListResponseResult + isSet bool +} + +func (v NullableGroundTruthListResponseResult) Get() *GroundTruthListResponseResult { + return v.value +} + +func (v *NullableGroundTruthListResponseResult) Set(val *GroundTruthListResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthListResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthListResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthListResponseResult(val *GroundTruthListResponseResult) *NullableGroundTruthListResponseResult { + return &NullableGroundTruthListResponseResult{value: val, isSet: true} +} + +func (v NullableGroundTruthListResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthListResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_upload_request.go b/go/futureagi/model_ground_truth_upload_request.go new file mode 100644 index 0000000..f8b2fd1 --- /dev/null +++ b/go/futureagi/model_ground_truth_upload_request.go @@ -0,0 +1,385 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the GroundTruthUploadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthUploadRequest{} + +// GroundTruthUploadRequest struct for GroundTruthUploadRequest +type GroundTruthUploadRequest struct { + File *string `json:"file,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + FileName *string `json:"file_name,omitempty"` + Columns []string `json:"columns,omitempty"` + Data []map[string]interface{} `json:"data,omitempty"` + VariableMapping map[string]interface{} `json:"variable_mapping,omitempty"` + RoleMapping map[string]interface{} `json:"role_mapping,omitempty"` +} + +// NewGroundTruthUploadRequest instantiates a new GroundTruthUploadRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthUploadRequest() *GroundTruthUploadRequest { + this := GroundTruthUploadRequest{} + var description string = "" + this.Description = &description + var fileName string = "" + this.FileName = &fileName + return &this +} + +// NewGroundTruthUploadRequestWithDefaults instantiates a new GroundTruthUploadRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthUploadRequestWithDefaults() *GroundTruthUploadRequest { + this := GroundTruthUploadRequest{} + var description string = "" + this.Description = &description + var fileName string = "" + this.FileName = &fileName + return &this +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetFile() string { + if o == nil || IsNil(o.File) { + var ret string + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetFileOk() (*string, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given string and assigns it to the File field. +func (o *GroundTruthUploadRequest) SetFile(v string) { + o.File = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GroundTruthUploadRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GroundTruthUploadRequest) SetDescription(v string) { + o.Description = &v +} + +// GetFileName returns the FileName field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetFileName() string { + if o == nil || IsNil(o.FileName) { + var ret string + return ret + } + return *o.FileName +} + +// GetFileNameOk returns a tuple with the FileName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetFileNameOk() (*string, bool) { + if o == nil || IsNil(o.FileName) { + return nil, false + } + return o.FileName, true +} + +// HasFileName returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasFileName() bool { + if o != nil && !IsNil(o.FileName) { + return true + } + + return false +} + +// SetFileName gets a reference to the given string and assigns it to the FileName field. +func (o *GroundTruthUploadRequest) SetFileName(v string) { + o.FileName = &v +} + +// GetColumns returns the Columns field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetColumns() []string { + if o == nil || IsNil(o.Columns) { + var ret []string + return ret + } + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetColumnsOk() ([]string, bool) { + if o == nil || IsNil(o.Columns) { + return nil, false + } + return o.Columns, true +} + +// HasColumns returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasColumns() bool { + if o != nil && !IsNil(o.Columns) { + return true + } + + return false +} + +// SetColumns gets a reference to the given []string and assigns it to the Columns field. +func (o *GroundTruthUploadRequest) SetColumns(v []string) { + o.Columns = v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetData() []map[string]interface{} { + if o == nil || IsNil(o.Data) { + var ret []map[string]interface{} + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetDataOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []map[string]interface{} and assigns it to the Data field. +func (o *GroundTruthUploadRequest) SetData(v []map[string]interface{}) { + o.Data = v +} + +// GetVariableMapping returns the VariableMapping field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetVariableMapping() map[string]interface{} { + if o == nil || IsNil(o.VariableMapping) { + var ret map[string]interface{} + return ret + } + return o.VariableMapping +} + +// GetVariableMappingOk returns a tuple with the VariableMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetVariableMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.VariableMapping) { + return map[string]interface{}{}, false + } + return o.VariableMapping, true +} + +// HasVariableMapping returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasVariableMapping() bool { + if o != nil && !IsNil(o.VariableMapping) { + return true + } + + return false +} + +// SetVariableMapping gets a reference to the given map[string]interface{} and assigns it to the VariableMapping field. +func (o *GroundTruthUploadRequest) SetVariableMapping(v map[string]interface{}) { + o.VariableMapping = v +} + +// GetRoleMapping returns the RoleMapping field value if set, zero value otherwise. +func (o *GroundTruthUploadRequest) GetRoleMapping() map[string]interface{} { + if o == nil || IsNil(o.RoleMapping) { + var ret map[string]interface{} + return ret + } + return o.RoleMapping +} + +// GetRoleMappingOk returns a tuple with the RoleMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadRequest) GetRoleMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RoleMapping) { + return map[string]interface{}{}, false + } + return o.RoleMapping, true +} + +// HasRoleMapping returns a boolean if a field has been set. +func (o *GroundTruthUploadRequest) HasRoleMapping() bool { + if o != nil && !IsNil(o.RoleMapping) { + return true + } + + return false +} + +// SetRoleMapping gets a reference to the given map[string]interface{} and assigns it to the RoleMapping field. +func (o *GroundTruthUploadRequest) SetRoleMapping(v map[string]interface{}) { + o.RoleMapping = v +} + +func (o GroundTruthUploadRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthUploadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.FileName) { + toSerialize["file_name"] = o.FileName + } + if !IsNil(o.Columns) { + toSerialize["columns"] = o.Columns + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.VariableMapping) { + toSerialize["variable_mapping"] = o.VariableMapping + } + if !IsNil(o.RoleMapping) { + toSerialize["role_mapping"] = o.RoleMapping + } + return toSerialize, nil +} + +type NullableGroundTruthUploadRequest struct { + value *GroundTruthUploadRequest + isSet bool +} + +func (v NullableGroundTruthUploadRequest) Get() *GroundTruthUploadRequest { + return v.value +} + +func (v *NullableGroundTruthUploadRequest) Set(val *GroundTruthUploadRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthUploadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthUploadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthUploadRequest(val *GroundTruthUploadRequest) *NullableGroundTruthUploadRequest { + return &NullableGroundTruthUploadRequest{value: val, isSet: true} +} + +func (v NullableGroundTruthUploadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthUploadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_upload_response.go b/go/futureagi/model_ground_truth_upload_response.go new file mode 100644 index 0000000..559ee15 --- /dev/null +++ b/go/futureagi/model_ground_truth_upload_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GroundTruthUploadResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthUploadResponse{} + +// GroundTruthUploadResponse struct for GroundTruthUploadResponse +type GroundTruthUploadResponse struct { + Status bool `json:"status"` + Result GroundTruthUploadResponseResult `json:"result"` +} + +type _GroundTruthUploadResponse GroundTruthUploadResponse + +// NewGroundTruthUploadResponse instantiates a new GroundTruthUploadResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthUploadResponse(status bool, result GroundTruthUploadResponseResult) *GroundTruthUploadResponse { + this := GroundTruthUploadResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewGroundTruthUploadResponseWithDefaults instantiates a new GroundTruthUploadResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthUploadResponseWithDefaults() *GroundTruthUploadResponse { + this := GroundTruthUploadResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *GroundTruthUploadResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *GroundTruthUploadResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *GroundTruthUploadResponse) GetResult() GroundTruthUploadResponseResult { + if o == nil { + var ret GroundTruthUploadResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadResponse) GetResultOk() (*GroundTruthUploadResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *GroundTruthUploadResponse) SetResult(v GroundTruthUploadResponseResult) { + o.Result = v +} + +func (o GroundTruthUploadResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthUploadResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *GroundTruthUploadResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroundTruthUploadResponse := _GroundTruthUploadResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroundTruthUploadResponse) + + if err != nil { + return err + } + + *o = GroundTruthUploadResponse(varGroundTruthUploadResponse) + + return err +} + +type NullableGroundTruthUploadResponse struct { + value *GroundTruthUploadResponse + isSet bool +} + +func (v NullableGroundTruthUploadResponse) Get() *GroundTruthUploadResponse { + return v.value +} + +func (v *NullableGroundTruthUploadResponse) Set(val *GroundTruthUploadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthUploadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthUploadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthUploadResponse(val *GroundTruthUploadResponse) *NullableGroundTruthUploadResponse { + return &NullableGroundTruthUploadResponse{value: val, isSet: true} +} + +func (v NullableGroundTruthUploadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthUploadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_ground_truth_upload_response_result.go b/go/futureagi/model_ground_truth_upload_response_result.go new file mode 100644 index 0000000..21704fa --- /dev/null +++ b/go/futureagi/model_ground_truth_upload_response_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the GroundTruthUploadResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroundTruthUploadResponseResult{} + +// GroundTruthUploadResponseResult struct for GroundTruthUploadResponseResult +type GroundTruthUploadResponseResult struct { + Id string `json:"id"` + Name string `json:"name"` + RowCount int32 `json:"row_count"` + Columns []string `json:"columns"` + EmbeddingStatus string `json:"embedding_status"` +} + +type _GroundTruthUploadResponseResult GroundTruthUploadResponseResult + +// NewGroundTruthUploadResponseResult instantiates a new GroundTruthUploadResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroundTruthUploadResponseResult(id string, name string, rowCount int32, columns []string, embeddingStatus string) *GroundTruthUploadResponseResult { + this := GroundTruthUploadResponseResult{} + this.Id = id + this.Name = name + this.RowCount = rowCount + this.Columns = columns + this.EmbeddingStatus = embeddingStatus + return &this +} + +// NewGroundTruthUploadResponseResultWithDefaults instantiates a new GroundTruthUploadResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroundTruthUploadResponseResultWithDefaults() *GroundTruthUploadResponseResult { + this := GroundTruthUploadResponseResult{} + return &this +} + +// GetId returns the Id field value +func (o *GroundTruthUploadResponseResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadResponseResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GroundTruthUploadResponseResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *GroundTruthUploadResponseResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadResponseResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GroundTruthUploadResponseResult) SetName(v string) { + o.Name = v +} + +// GetRowCount returns the RowCount field value +func (o *GroundTruthUploadResponseResult) GetRowCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowCount +} + +// GetRowCountOk returns a tuple with the RowCount field value +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadResponseResult) GetRowCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowCount, true +} + +// SetRowCount sets field value +func (o *GroundTruthUploadResponseResult) SetRowCount(v int32) { + o.RowCount = v +} + +// GetColumns returns the Columns field value +func (o *GroundTruthUploadResponseResult) GetColumns() []string { + if o == nil { + var ret []string + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadResponseResult) GetColumnsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *GroundTruthUploadResponseResult) SetColumns(v []string) { + o.Columns = v +} + +// GetEmbeddingStatus returns the EmbeddingStatus field value +func (o *GroundTruthUploadResponseResult) GetEmbeddingStatus() string { + if o == nil { + var ret string + return ret + } + + return o.EmbeddingStatus +} + +// GetEmbeddingStatusOk returns a tuple with the EmbeddingStatus field value +// and a boolean to check if the value has been set. +func (o *GroundTruthUploadResponseResult) GetEmbeddingStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EmbeddingStatus, true +} + +// SetEmbeddingStatus sets field value +func (o *GroundTruthUploadResponseResult) SetEmbeddingStatus(v string) { + o.EmbeddingStatus = v +} + +func (o GroundTruthUploadResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroundTruthUploadResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["row_count"] = o.RowCount + toSerialize["columns"] = o.Columns + toSerialize["embedding_status"] = o.EmbeddingStatus + return toSerialize, nil +} + +func (o *GroundTruthUploadResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "row_count", + "columns", + "embedding_status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroundTruthUploadResponseResult := _GroundTruthUploadResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroundTruthUploadResponseResult) + + if err != nil { + return err + } + + *o = GroundTruthUploadResponseResult(varGroundTruthUploadResponseResult) + + return err +} + +type NullableGroundTruthUploadResponseResult struct { + value *GroundTruthUploadResponseResult + isSet bool +} + +func (v NullableGroundTruthUploadResponseResult) Get() *GroundTruthUploadResponseResult { + return v.value +} + +func (v *NullableGroundTruthUploadResponseResult) Set(val *GroundTruthUploadResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableGroundTruthUploadResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableGroundTruthUploadResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroundTruthUploadResponseResult(val *GroundTruthUploadResponseResult) *NullableGroundTruthUploadResponseResult { + return &NullableGroundTruthUploadResponseResult{value: val, isSet: true} +} + +func (v NullableGroundTruthUploadResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroundTruthUploadResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_heatmap_cell.go b/go/futureagi/model_heatmap_cell.go new file mode 100644 index 0000000..f20c06c --- /dev/null +++ b/go/futureagi/model_heatmap_cell.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HeatmapCell type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HeatmapCell{} + +// HeatmapCell struct for HeatmapCell +type HeatmapCell struct { + Day int32 `json:"day"` + Hour int32 `json:"hour"` + Value int32 `json:"value"` +} + +type _HeatmapCell HeatmapCell + +// NewHeatmapCell instantiates a new HeatmapCell object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHeatmapCell(day int32, hour int32, value int32) *HeatmapCell { + this := HeatmapCell{} + this.Day = day + this.Hour = hour + this.Value = value + return &this +} + +// NewHeatmapCellWithDefaults instantiates a new HeatmapCell object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHeatmapCellWithDefaults() *HeatmapCell { + this := HeatmapCell{} + return &this +} + +// GetDay returns the Day field value +func (o *HeatmapCell) GetDay() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Day +} + +// GetDayOk returns a tuple with the Day field value +// and a boolean to check if the value has been set. +func (o *HeatmapCell) GetDayOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Day, true +} + +// SetDay sets field value +func (o *HeatmapCell) SetDay(v int32) { + o.Day = v +} + +// GetHour returns the Hour field value +func (o *HeatmapCell) GetHour() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Hour +} + +// GetHourOk returns a tuple with the Hour field value +// and a boolean to check if the value has been set. +func (o *HeatmapCell) GetHourOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Hour, true +} + +// SetHour sets field value +func (o *HeatmapCell) SetHour(v int32) { + o.Hour = v +} + +// GetValue returns the Value field value +func (o *HeatmapCell) GetValue() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *HeatmapCell) GetValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *HeatmapCell) SetValue(v int32) { + o.Value = v +} + +func (o HeatmapCell) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HeatmapCell) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["day"] = o.Day + toSerialize["hour"] = o.Hour + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *HeatmapCell) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "day", + "hour", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHeatmapCell := _HeatmapCell{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHeatmapCell) + + if err != nil { + return err + } + + *o = HeatmapCell(varHeatmapCell) + + return err +} + +type NullableHeatmapCell struct { + value *HeatmapCell + isSet bool +} + +func (v NullableHeatmapCell) Get() *HeatmapCell { + return v.value +} + +func (v *NullableHeatmapCell) Set(val *HeatmapCell) { + v.value = val + v.isSet = true +} + +func (v NullableHeatmapCell) IsSet() bool { + return v.isSet +} + +func (v *NullableHeatmapCell) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHeatmapCell(val *HeatmapCell) *NullableHeatmapCell { + return &NullableHeatmapCell{value: val, isSet: true} +} + +func (v NullableHeatmapCell) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHeatmapCell) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_add_rows_request.go b/go/futureagi/model_hugging_face_add_rows_request.go new file mode 100644 index 0000000..54c9fe5 --- /dev/null +++ b/go/futureagi/model_hugging_face_add_rows_request.go @@ -0,0 +1,249 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceAddRowsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceAddRowsRequest{} + +// HuggingFaceAddRowsRequest struct for HuggingFaceAddRowsRequest +type HuggingFaceAddRowsRequest struct { + NumRows *int32 `json:"num_rows,omitempty"` + HuggingfaceDatasetName string `json:"huggingface_dataset_name"` + HuggingfaceDatasetConfig string `json:"huggingface_dataset_config"` + HuggingfaceDatasetSplit string `json:"huggingface_dataset_split"` +} + +type _HuggingFaceAddRowsRequest HuggingFaceAddRowsRequest + +// NewHuggingFaceAddRowsRequest instantiates a new HuggingFaceAddRowsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceAddRowsRequest(huggingfaceDatasetName string, huggingfaceDatasetConfig string, huggingfaceDatasetSplit string) *HuggingFaceAddRowsRequest { + this := HuggingFaceAddRowsRequest{} + this.HuggingfaceDatasetName = huggingfaceDatasetName + this.HuggingfaceDatasetConfig = huggingfaceDatasetConfig + this.HuggingfaceDatasetSplit = huggingfaceDatasetSplit + return &this +} + +// NewHuggingFaceAddRowsRequestWithDefaults instantiates a new HuggingFaceAddRowsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceAddRowsRequestWithDefaults() *HuggingFaceAddRowsRequest { + this := HuggingFaceAddRowsRequest{} + return &this +} + +// GetNumRows returns the NumRows field value if set, zero value otherwise. +func (o *HuggingFaceAddRowsRequest) GetNumRows() int32 { + if o == nil || IsNil(o.NumRows) { + var ret int32 + return ret + } + return *o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HuggingFaceAddRowsRequest) GetNumRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NumRows) { + return nil, false + } + return o.NumRows, true +} + +// HasNumRows returns a boolean if a field has been set. +func (o *HuggingFaceAddRowsRequest) HasNumRows() bool { + if o != nil && !IsNil(o.NumRows) { + return true + } + + return false +} + +// SetNumRows gets a reference to the given int32 and assigns it to the NumRows field. +func (o *HuggingFaceAddRowsRequest) SetNumRows(v int32) { + o.NumRows = &v +} + +// GetHuggingfaceDatasetName returns the HuggingfaceDatasetName field value +func (o *HuggingFaceAddRowsRequest) GetHuggingfaceDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.HuggingfaceDatasetName +} + +// GetHuggingfaceDatasetNameOk returns a tuple with the HuggingfaceDatasetName field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceAddRowsRequest) GetHuggingfaceDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HuggingfaceDatasetName, true +} + +// SetHuggingfaceDatasetName sets field value +func (o *HuggingFaceAddRowsRequest) SetHuggingfaceDatasetName(v string) { + o.HuggingfaceDatasetName = v +} + +// GetHuggingfaceDatasetConfig returns the HuggingfaceDatasetConfig field value +func (o *HuggingFaceAddRowsRequest) GetHuggingfaceDatasetConfig() string { + if o == nil { + var ret string + return ret + } + + return o.HuggingfaceDatasetConfig +} + +// GetHuggingfaceDatasetConfigOk returns a tuple with the HuggingfaceDatasetConfig field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceAddRowsRequest) GetHuggingfaceDatasetConfigOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HuggingfaceDatasetConfig, true +} + +// SetHuggingfaceDatasetConfig sets field value +func (o *HuggingFaceAddRowsRequest) SetHuggingfaceDatasetConfig(v string) { + o.HuggingfaceDatasetConfig = v +} + +// GetHuggingfaceDatasetSplit returns the HuggingfaceDatasetSplit field value +func (o *HuggingFaceAddRowsRequest) GetHuggingfaceDatasetSplit() string { + if o == nil { + var ret string + return ret + } + + return o.HuggingfaceDatasetSplit +} + +// GetHuggingfaceDatasetSplitOk returns a tuple with the HuggingfaceDatasetSplit field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceAddRowsRequest) GetHuggingfaceDatasetSplitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HuggingfaceDatasetSplit, true +} + +// SetHuggingfaceDatasetSplit sets field value +func (o *HuggingFaceAddRowsRequest) SetHuggingfaceDatasetSplit(v string) { + o.HuggingfaceDatasetSplit = v +} + +func (o HuggingFaceAddRowsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceAddRowsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NumRows) { + toSerialize["num_rows"] = o.NumRows + } + toSerialize["huggingface_dataset_name"] = o.HuggingfaceDatasetName + toSerialize["huggingface_dataset_config"] = o.HuggingfaceDatasetConfig + toSerialize["huggingface_dataset_split"] = o.HuggingfaceDatasetSplit + return toSerialize, nil +} + +func (o *HuggingFaceAddRowsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "huggingface_dataset_name", + "huggingface_dataset_config", + "huggingface_dataset_split", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceAddRowsRequest := _HuggingFaceAddRowsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceAddRowsRequest) + + if err != nil { + return err + } + + *o = HuggingFaceAddRowsRequest(varHuggingFaceAddRowsRequest) + + return err +} + +type NullableHuggingFaceAddRowsRequest struct { + value *HuggingFaceAddRowsRequest + isSet bool +} + +func (v NullableHuggingFaceAddRowsRequest) Get() *HuggingFaceAddRowsRequest { + return v.value +} + +func (v *NullableHuggingFaceAddRowsRequest) Set(val *HuggingFaceAddRowsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceAddRowsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceAddRowsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceAddRowsRequest(val *HuggingFaceAddRowsRequest) *NullableHuggingFaceAddRowsRequest { + return &NullableHuggingFaceAddRowsRequest{value: val, isSet: true} +} + +func (v NullableHuggingFaceAddRowsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceAddRowsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_config_request.go b/go/futureagi/model_hugging_face_dataset_config_request.go new file mode 100644 index 0000000..294242d --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_config_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetConfigRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetConfigRequest{} + +// HuggingFaceDatasetConfigRequest struct for HuggingFaceDatasetConfigRequest +type HuggingFaceDatasetConfigRequest struct { + DatasetPath string `json:"dataset_path"` +} + +type _HuggingFaceDatasetConfigRequest HuggingFaceDatasetConfigRequest + +// NewHuggingFaceDatasetConfigRequest instantiates a new HuggingFaceDatasetConfigRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetConfigRequest(datasetPath string) *HuggingFaceDatasetConfigRequest { + this := HuggingFaceDatasetConfigRequest{} + this.DatasetPath = datasetPath + return &this +} + +// NewHuggingFaceDatasetConfigRequestWithDefaults instantiates a new HuggingFaceDatasetConfigRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetConfigRequestWithDefaults() *HuggingFaceDatasetConfigRequest { + this := HuggingFaceDatasetConfigRequest{} + return &this +} + +// GetDatasetPath returns the DatasetPath field value +func (o *HuggingFaceDatasetConfigRequest) GetDatasetPath() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetPath +} + +// GetDatasetPathOk returns a tuple with the DatasetPath field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetConfigRequest) GetDatasetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetPath, true +} + +// SetDatasetPath sets field value +func (o *HuggingFaceDatasetConfigRequest) SetDatasetPath(v string) { + o.DatasetPath = v +} + +func (o HuggingFaceDatasetConfigRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetConfigRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_path"] = o.DatasetPath + return toSerialize, nil +} + +func (o *HuggingFaceDatasetConfigRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_path", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetConfigRequest := _HuggingFaceDatasetConfigRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetConfigRequest) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetConfigRequest(varHuggingFaceDatasetConfigRequest) + + return err +} + +type NullableHuggingFaceDatasetConfigRequest struct { + value *HuggingFaceDatasetConfigRequest + isSet bool +} + +func (v NullableHuggingFaceDatasetConfigRequest) Get() *HuggingFaceDatasetConfigRequest { + return v.value +} + +func (v *NullableHuggingFaceDatasetConfigRequest) Set(val *HuggingFaceDatasetConfigRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetConfigRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetConfigRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetConfigRequest(val *HuggingFaceDatasetConfigRequest) *NullableHuggingFaceDatasetConfigRequest { + return &NullableHuggingFaceDatasetConfigRequest{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetConfigRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetConfigRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_config_response.go b/go/futureagi/model_hugging_face_dataset_config_response.go new file mode 100644 index 0000000..15b7d98 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_config_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetConfigResponse{} + +// HuggingFaceDatasetConfigResponse struct for HuggingFaceDatasetConfigResponse +type HuggingFaceDatasetConfigResponse struct { + Status bool `json:"status"` + Result HuggingFaceDatasetConfigResult `json:"result"` +} + +type _HuggingFaceDatasetConfigResponse HuggingFaceDatasetConfigResponse + +// NewHuggingFaceDatasetConfigResponse instantiates a new HuggingFaceDatasetConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetConfigResponse(status bool, result HuggingFaceDatasetConfigResult) *HuggingFaceDatasetConfigResponse { + this := HuggingFaceDatasetConfigResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewHuggingFaceDatasetConfigResponseWithDefaults instantiates a new HuggingFaceDatasetConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetConfigResponseWithDefaults() *HuggingFaceDatasetConfigResponse { + this := HuggingFaceDatasetConfigResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *HuggingFaceDatasetConfigResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetConfigResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *HuggingFaceDatasetConfigResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *HuggingFaceDatasetConfigResponse) GetResult() HuggingFaceDatasetConfigResult { + if o == nil { + var ret HuggingFaceDatasetConfigResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetConfigResponse) GetResultOk() (*HuggingFaceDatasetConfigResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *HuggingFaceDatasetConfigResponse) SetResult(v HuggingFaceDatasetConfigResult) { + o.Result = v +} + +func (o HuggingFaceDatasetConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *HuggingFaceDatasetConfigResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetConfigResponse := _HuggingFaceDatasetConfigResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetConfigResponse) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetConfigResponse(varHuggingFaceDatasetConfigResponse) + + return err +} + +type NullableHuggingFaceDatasetConfigResponse struct { + value *HuggingFaceDatasetConfigResponse + isSet bool +} + +func (v NullableHuggingFaceDatasetConfigResponse) Get() *HuggingFaceDatasetConfigResponse { + return v.value +} + +func (v *NullableHuggingFaceDatasetConfigResponse) Set(val *HuggingFaceDatasetConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetConfigResponse(val *HuggingFaceDatasetConfigResponse) *NullableHuggingFaceDatasetConfigResponse { + return &NullableHuggingFaceDatasetConfigResponse{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_config_result.go b/go/futureagi/model_hugging_face_dataset_config_result.go new file mode 100644 index 0000000..23740ba --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_config_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetConfigResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetConfigResult{} + +// HuggingFaceDatasetConfigResult struct for HuggingFaceDatasetConfigResult +type HuggingFaceDatasetConfigResult struct { + Message string `json:"message"` + DatasetInfo map[string]interface{} `json:"dataset_info"` +} + +type _HuggingFaceDatasetConfigResult HuggingFaceDatasetConfigResult + +// NewHuggingFaceDatasetConfigResult instantiates a new HuggingFaceDatasetConfigResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetConfigResult(message string, datasetInfo map[string]interface{}) *HuggingFaceDatasetConfigResult { + this := HuggingFaceDatasetConfigResult{} + this.Message = message + this.DatasetInfo = datasetInfo + return &this +} + +// NewHuggingFaceDatasetConfigResultWithDefaults instantiates a new HuggingFaceDatasetConfigResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetConfigResultWithDefaults() *HuggingFaceDatasetConfigResult { + this := HuggingFaceDatasetConfigResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *HuggingFaceDatasetConfigResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetConfigResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *HuggingFaceDatasetConfigResult) SetMessage(v string) { + o.Message = v +} + +// GetDatasetInfo returns the DatasetInfo field value +func (o *HuggingFaceDatasetConfigResult) GetDatasetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.DatasetInfo +} + +// GetDatasetInfoOk returns a tuple with the DatasetInfo field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetConfigResult) GetDatasetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.DatasetInfo, true +} + +// SetDatasetInfo sets field value +func (o *HuggingFaceDatasetConfigResult) SetDatasetInfo(v map[string]interface{}) { + o.DatasetInfo = v +} + +func (o HuggingFaceDatasetConfigResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetConfigResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["dataset_info"] = o.DatasetInfo + return toSerialize, nil +} + +func (o *HuggingFaceDatasetConfigResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "dataset_info", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetConfigResult := _HuggingFaceDatasetConfigResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetConfigResult) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetConfigResult(varHuggingFaceDatasetConfigResult) + + return err +} + +type NullableHuggingFaceDatasetConfigResult struct { + value *HuggingFaceDatasetConfigResult + isSet bool +} + +func (v NullableHuggingFaceDatasetConfigResult) Get() *HuggingFaceDatasetConfigResult { + return v.value +} + +func (v *NullableHuggingFaceDatasetConfigResult) Set(val *HuggingFaceDatasetConfigResult) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetConfigResult) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetConfigResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetConfigResult(val *HuggingFaceDatasetConfigResult) *NullableHuggingFaceDatasetConfigResult { + return &NullableHuggingFaceDatasetConfigResult{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetConfigResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetConfigResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_create_request.go b/go/futureagi/model_hugging_face_dataset_create_request.go new file mode 100644 index 0000000..60b0bd8 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_create_request.go @@ -0,0 +1,337 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetCreateRequest{} + +// HuggingFaceDatasetCreateRequest struct for HuggingFaceDatasetCreateRequest +type HuggingFaceDatasetCreateRequest struct { + Name *string `json:"name,omitempty"` + ModelType *string `json:"model_type,omitempty"` + NumRows *int32 `json:"num_rows,omitempty"` + HuggingfaceDatasetName string `json:"huggingface_dataset_name"` + HuggingfaceDatasetConfig *string `json:"huggingface_dataset_config,omitempty"` + HuggingfaceDatasetSplit string `json:"huggingface_dataset_split"` +} + +type _HuggingFaceDatasetCreateRequest HuggingFaceDatasetCreateRequest + +// NewHuggingFaceDatasetCreateRequest instantiates a new HuggingFaceDatasetCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetCreateRequest(huggingfaceDatasetName string, huggingfaceDatasetSplit string) *HuggingFaceDatasetCreateRequest { + this := HuggingFaceDatasetCreateRequest{} + var name string = "" + this.Name = &name + var modelType string = "" + this.ModelType = &modelType + this.HuggingfaceDatasetName = huggingfaceDatasetName + this.HuggingfaceDatasetSplit = huggingfaceDatasetSplit + return &this +} + +// NewHuggingFaceDatasetCreateRequestWithDefaults instantiates a new HuggingFaceDatasetCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetCreateRequestWithDefaults() *HuggingFaceDatasetCreateRequest { + this := HuggingFaceDatasetCreateRequest{} + var name string = "" + this.Name = &name + var modelType string = "" + this.ModelType = &modelType + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HuggingFaceDatasetCreateRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetCreateRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *HuggingFaceDatasetCreateRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *HuggingFaceDatasetCreateRequest) SetName(v string) { + o.Name = &v +} + +// GetModelType returns the ModelType field value if set, zero value otherwise. +func (o *HuggingFaceDatasetCreateRequest) GetModelType() string { + if o == nil || IsNil(o.ModelType) { + var ret string + return ret + } + return *o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetCreateRequest) GetModelTypeOk() (*string, bool) { + if o == nil || IsNil(o.ModelType) { + return nil, false + } + return o.ModelType, true +} + +// HasModelType returns a boolean if a field has been set. +func (o *HuggingFaceDatasetCreateRequest) HasModelType() bool { + if o != nil && !IsNil(o.ModelType) { + return true + } + + return false +} + +// SetModelType gets a reference to the given string and assigns it to the ModelType field. +func (o *HuggingFaceDatasetCreateRequest) SetModelType(v string) { + o.ModelType = &v +} + +// GetNumRows returns the NumRows field value if set, zero value otherwise. +func (o *HuggingFaceDatasetCreateRequest) GetNumRows() int32 { + if o == nil || IsNil(o.NumRows) { + var ret int32 + return ret + } + return *o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetCreateRequest) GetNumRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NumRows) { + return nil, false + } + return o.NumRows, true +} + +// HasNumRows returns a boolean if a field has been set. +func (o *HuggingFaceDatasetCreateRequest) HasNumRows() bool { + if o != nil && !IsNil(o.NumRows) { + return true + } + + return false +} + +// SetNumRows gets a reference to the given int32 and assigns it to the NumRows field. +func (o *HuggingFaceDatasetCreateRequest) SetNumRows(v int32) { + o.NumRows = &v +} + +// GetHuggingfaceDatasetName returns the HuggingfaceDatasetName field value +func (o *HuggingFaceDatasetCreateRequest) GetHuggingfaceDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.HuggingfaceDatasetName +} + +// GetHuggingfaceDatasetNameOk returns a tuple with the HuggingfaceDatasetName field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetCreateRequest) GetHuggingfaceDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HuggingfaceDatasetName, true +} + +// SetHuggingfaceDatasetName sets field value +func (o *HuggingFaceDatasetCreateRequest) SetHuggingfaceDatasetName(v string) { + o.HuggingfaceDatasetName = v +} + +// GetHuggingfaceDatasetConfig returns the HuggingfaceDatasetConfig field value if set, zero value otherwise. +func (o *HuggingFaceDatasetCreateRequest) GetHuggingfaceDatasetConfig() string { + if o == nil || IsNil(o.HuggingfaceDatasetConfig) { + var ret string + return ret + } + return *o.HuggingfaceDatasetConfig +} + +// GetHuggingfaceDatasetConfigOk returns a tuple with the HuggingfaceDatasetConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetCreateRequest) GetHuggingfaceDatasetConfigOk() (*string, bool) { + if o == nil || IsNil(o.HuggingfaceDatasetConfig) { + return nil, false + } + return o.HuggingfaceDatasetConfig, true +} + +// HasHuggingfaceDatasetConfig returns a boolean if a field has been set. +func (o *HuggingFaceDatasetCreateRequest) HasHuggingfaceDatasetConfig() bool { + if o != nil && !IsNil(o.HuggingfaceDatasetConfig) { + return true + } + + return false +} + +// SetHuggingfaceDatasetConfig gets a reference to the given string and assigns it to the HuggingfaceDatasetConfig field. +func (o *HuggingFaceDatasetCreateRequest) SetHuggingfaceDatasetConfig(v string) { + o.HuggingfaceDatasetConfig = &v +} + +// GetHuggingfaceDatasetSplit returns the HuggingfaceDatasetSplit field value +func (o *HuggingFaceDatasetCreateRequest) GetHuggingfaceDatasetSplit() string { + if o == nil { + var ret string + return ret + } + + return o.HuggingfaceDatasetSplit +} + +// GetHuggingfaceDatasetSplitOk returns a tuple with the HuggingfaceDatasetSplit field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetCreateRequest) GetHuggingfaceDatasetSplitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HuggingfaceDatasetSplit, true +} + +// SetHuggingfaceDatasetSplit sets field value +func (o *HuggingFaceDatasetCreateRequest) SetHuggingfaceDatasetSplit(v string) { + o.HuggingfaceDatasetSplit = v +} + +func (o HuggingFaceDatasetCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.ModelType) { + toSerialize["model_type"] = o.ModelType + } + if !IsNil(o.NumRows) { + toSerialize["num_rows"] = o.NumRows + } + toSerialize["huggingface_dataset_name"] = o.HuggingfaceDatasetName + if !IsNil(o.HuggingfaceDatasetConfig) { + toSerialize["huggingface_dataset_config"] = o.HuggingfaceDatasetConfig + } + toSerialize["huggingface_dataset_split"] = o.HuggingfaceDatasetSplit + return toSerialize, nil +} + +func (o *HuggingFaceDatasetCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "huggingface_dataset_name", + "huggingface_dataset_split", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetCreateRequest := _HuggingFaceDatasetCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetCreateRequest) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetCreateRequest(varHuggingFaceDatasetCreateRequest) + + return err +} + +type NullableHuggingFaceDatasetCreateRequest struct { + value *HuggingFaceDatasetCreateRequest + isSet bool +} + +func (v NullableHuggingFaceDatasetCreateRequest) Get() *HuggingFaceDatasetCreateRequest { + return v.value +} + +func (v *NullableHuggingFaceDatasetCreateRequest) Set(val *HuggingFaceDatasetCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetCreateRequest(val *HuggingFaceDatasetCreateRequest) *NullableHuggingFaceDatasetCreateRequest { + return &NullableHuggingFaceDatasetCreateRequest{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_detail.go b/go/futureagi/model_hugging_face_dataset_detail.go new file mode 100644 index 0000000..61be689 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_detail.go @@ -0,0 +1,344 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetDetail{} + +// HuggingFaceDatasetDetail struct for HuggingFaceDatasetDetail +type HuggingFaceDatasetDetail struct { + Id string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + Downloads int32 `json:"downloads"` + Likes int32 `json:"likes"` + Tags []string `json:"tags"` + Author NullableString `json:"author,omitempty"` +} + +type _HuggingFaceDatasetDetail HuggingFaceDatasetDetail + +// NewHuggingFaceDatasetDetail instantiates a new HuggingFaceDatasetDetail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetDetail(id string, name string, description string, downloads int32, likes int32, tags []string) *HuggingFaceDatasetDetail { + this := HuggingFaceDatasetDetail{} + this.Id = id + this.Name = name + this.Description = description + this.Downloads = downloads + this.Likes = likes + this.Tags = tags + return &this +} + +// NewHuggingFaceDatasetDetailWithDefaults instantiates a new HuggingFaceDatasetDetail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetDetailWithDefaults() *HuggingFaceDatasetDetail { + this := HuggingFaceDatasetDetail{} + return &this +} + +// GetId returns the Id field value +func (o *HuggingFaceDatasetDetail) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetail) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *HuggingFaceDatasetDetail) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *HuggingFaceDatasetDetail) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetail) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *HuggingFaceDatasetDetail) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *HuggingFaceDatasetDetail) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetail) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *HuggingFaceDatasetDetail) SetDescription(v string) { + o.Description = v +} + +// GetDownloads returns the Downloads field value +func (o *HuggingFaceDatasetDetail) GetDownloads() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Downloads +} + +// GetDownloadsOk returns a tuple with the Downloads field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetail) GetDownloadsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Downloads, true +} + +// SetDownloads sets field value +func (o *HuggingFaceDatasetDetail) SetDownloads(v int32) { + o.Downloads = v +} + +// GetLikes returns the Likes field value +func (o *HuggingFaceDatasetDetail) GetLikes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Likes +} + +// GetLikesOk returns a tuple with the Likes field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetail) GetLikesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Likes, true +} + +// SetLikes sets field value +func (o *HuggingFaceDatasetDetail) SetLikes(v int32) { + o.Likes = v +} + +// GetTags returns the Tags field value +func (o *HuggingFaceDatasetDetail) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetail) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *HuggingFaceDatasetDetail) SetTags(v []string) { + o.Tags = v +} + +// GetAuthor returns the Author field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HuggingFaceDatasetDetail) GetAuthor() string { + if o == nil || IsNil(o.Author.Get()) { + var ret string + return ret + } + return *o.Author.Get() +} + +// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HuggingFaceDatasetDetail) GetAuthorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Author.Get(), o.Author.IsSet() +} + +// HasAuthor returns a boolean if a field has been set. +func (o *HuggingFaceDatasetDetail) HasAuthor() bool { + if o != nil && o.Author.IsSet() { + return true + } + + return false +} + +// SetAuthor gets a reference to the given NullableString and assigns it to the Author field. +func (o *HuggingFaceDatasetDetail) SetAuthor(v string) { + o.Author.Set(&v) +} + +// SetAuthorNil sets the value for Author to be an explicit nil +func (o *HuggingFaceDatasetDetail) SetAuthorNil() { + o.Author.Set(nil) +} + +// UnsetAuthor ensures that no value is present for Author, not even an explicit nil +func (o *HuggingFaceDatasetDetail) UnsetAuthor() { + o.Author.Unset() +} + +func (o HuggingFaceDatasetDetail) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + toSerialize["downloads"] = o.Downloads + toSerialize["likes"] = o.Likes + toSerialize["tags"] = o.Tags + if o.Author.IsSet() { + toSerialize["author"] = o.Author.Get() + } + return toSerialize, nil +} + +func (o *HuggingFaceDatasetDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "description", + "downloads", + "likes", + "tags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetDetail := _HuggingFaceDatasetDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetDetail) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetDetail(varHuggingFaceDatasetDetail) + + return err +} + +type NullableHuggingFaceDatasetDetail struct { + value *HuggingFaceDatasetDetail + isSet bool +} + +func (v NullableHuggingFaceDatasetDetail) Get() *HuggingFaceDatasetDetail { + return v.value +} + +func (v *NullableHuggingFaceDatasetDetail) Set(val *HuggingFaceDatasetDetail) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetDetail(val *HuggingFaceDatasetDetail) *NullableHuggingFaceDatasetDetail { + return &NullableHuggingFaceDatasetDetail{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_detail_request.go b/go/futureagi/model_hugging_face_dataset_detail_request.go new file mode 100644 index 0000000..37d2f20 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_detail_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetDetailRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetDetailRequest{} + +// HuggingFaceDatasetDetailRequest struct for HuggingFaceDatasetDetailRequest +type HuggingFaceDatasetDetailRequest struct { + DatasetId string `json:"dataset_id"` +} + +type _HuggingFaceDatasetDetailRequest HuggingFaceDatasetDetailRequest + +// NewHuggingFaceDatasetDetailRequest instantiates a new HuggingFaceDatasetDetailRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetDetailRequest(datasetId string) *HuggingFaceDatasetDetailRequest { + this := HuggingFaceDatasetDetailRequest{} + this.DatasetId = datasetId + return &this +} + +// NewHuggingFaceDatasetDetailRequestWithDefaults instantiates a new HuggingFaceDatasetDetailRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetDetailRequestWithDefaults() *HuggingFaceDatasetDetailRequest { + this := HuggingFaceDatasetDetailRequest{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *HuggingFaceDatasetDetailRequest) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetailRequest) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *HuggingFaceDatasetDetailRequest) SetDatasetId(v string) { + o.DatasetId = v +} + +func (o HuggingFaceDatasetDetailRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetDetailRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + return toSerialize, nil +} + +func (o *HuggingFaceDatasetDetailRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetDetailRequest := _HuggingFaceDatasetDetailRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetDetailRequest) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetDetailRequest(varHuggingFaceDatasetDetailRequest) + + return err +} + +type NullableHuggingFaceDatasetDetailRequest struct { + value *HuggingFaceDatasetDetailRequest + isSet bool +} + +func (v NullableHuggingFaceDatasetDetailRequest) Get() *HuggingFaceDatasetDetailRequest { + return v.value +} + +func (v *NullableHuggingFaceDatasetDetailRequest) Set(val *HuggingFaceDatasetDetailRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetDetailRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetDetailRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetDetailRequest(val *HuggingFaceDatasetDetailRequest) *NullableHuggingFaceDatasetDetailRequest { + return &NullableHuggingFaceDatasetDetailRequest{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetDetailRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetDetailRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_detail_response.go b/go/futureagi/model_hugging_face_dataset_detail_response.go new file mode 100644 index 0000000..cb0ed46 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_detail_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetDetailResponse{} + +// HuggingFaceDatasetDetailResponse struct for HuggingFaceDatasetDetailResponse +type HuggingFaceDatasetDetailResponse struct { + Status bool `json:"status"` + Result HuggingFaceDatasetDetailResponseResult `json:"result"` +} + +type _HuggingFaceDatasetDetailResponse HuggingFaceDatasetDetailResponse + +// NewHuggingFaceDatasetDetailResponse instantiates a new HuggingFaceDatasetDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetDetailResponse(status bool, result HuggingFaceDatasetDetailResponseResult) *HuggingFaceDatasetDetailResponse { + this := HuggingFaceDatasetDetailResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewHuggingFaceDatasetDetailResponseWithDefaults instantiates a new HuggingFaceDatasetDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetDetailResponseWithDefaults() *HuggingFaceDatasetDetailResponse { + this := HuggingFaceDatasetDetailResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *HuggingFaceDatasetDetailResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetailResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *HuggingFaceDatasetDetailResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *HuggingFaceDatasetDetailResponse) GetResult() HuggingFaceDatasetDetailResponseResult { + if o == nil { + var ret HuggingFaceDatasetDetailResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetailResponse) GetResultOk() (*HuggingFaceDatasetDetailResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *HuggingFaceDatasetDetailResponse) SetResult(v HuggingFaceDatasetDetailResponseResult) { + o.Result = v +} + +func (o HuggingFaceDatasetDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *HuggingFaceDatasetDetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetDetailResponse := _HuggingFaceDatasetDetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetDetailResponse) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetDetailResponse(varHuggingFaceDatasetDetailResponse) + + return err +} + +type NullableHuggingFaceDatasetDetailResponse struct { + value *HuggingFaceDatasetDetailResponse + isSet bool +} + +func (v NullableHuggingFaceDatasetDetailResponse) Get() *HuggingFaceDatasetDetailResponse { + return v.value +} + +func (v *NullableHuggingFaceDatasetDetailResponse) Set(val *HuggingFaceDatasetDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetDetailResponse(val *HuggingFaceDatasetDetailResponse) *NullableHuggingFaceDatasetDetailResponse { + return &NullableHuggingFaceDatasetDetailResponse{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_detail_response_result.go b/go/futureagi/model_hugging_face_dataset_detail_response_result.go new file mode 100644 index 0000000..47978df --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_detail_response_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetDetailResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetDetailResponseResult{} + +// HuggingFaceDatasetDetailResponseResult struct for HuggingFaceDatasetDetailResponseResult +type HuggingFaceDatasetDetailResponseResult struct { + Message string `json:"message"` + Dataset HuggingFaceDatasetDetail `json:"dataset"` +} + +type _HuggingFaceDatasetDetailResponseResult HuggingFaceDatasetDetailResponseResult + +// NewHuggingFaceDatasetDetailResponseResult instantiates a new HuggingFaceDatasetDetailResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetDetailResponseResult(message string, dataset HuggingFaceDatasetDetail) *HuggingFaceDatasetDetailResponseResult { + this := HuggingFaceDatasetDetailResponseResult{} + this.Message = message + this.Dataset = dataset + return &this +} + +// NewHuggingFaceDatasetDetailResponseResultWithDefaults instantiates a new HuggingFaceDatasetDetailResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetDetailResponseResultWithDefaults() *HuggingFaceDatasetDetailResponseResult { + this := HuggingFaceDatasetDetailResponseResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *HuggingFaceDatasetDetailResponseResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetailResponseResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *HuggingFaceDatasetDetailResponseResult) SetMessage(v string) { + o.Message = v +} + +// GetDataset returns the Dataset field value +func (o *HuggingFaceDatasetDetailResponseResult) GetDataset() HuggingFaceDatasetDetail { + if o == nil { + var ret HuggingFaceDatasetDetail + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetDetailResponseResult) GetDatasetOk() (*HuggingFaceDatasetDetail, bool) { + if o == nil { + return nil, false + } + return &o.Dataset, true +} + +// SetDataset sets field value +func (o *HuggingFaceDatasetDetailResponseResult) SetDataset(v HuggingFaceDatasetDetail) { + o.Dataset = v +} + +func (o HuggingFaceDatasetDetailResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetDetailResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["dataset"] = o.Dataset + return toSerialize, nil +} + +func (o *HuggingFaceDatasetDetailResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "dataset", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetDetailResponseResult := _HuggingFaceDatasetDetailResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetDetailResponseResult) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetDetailResponseResult(varHuggingFaceDatasetDetailResponseResult) + + return err +} + +type NullableHuggingFaceDatasetDetailResponseResult struct { + value *HuggingFaceDatasetDetailResponseResult + isSet bool +} + +func (v NullableHuggingFaceDatasetDetailResponseResult) Get() *HuggingFaceDatasetDetailResponseResult { + return v.value +} + +func (v *NullableHuggingFaceDatasetDetailResponseResult) Set(val *HuggingFaceDatasetDetailResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetDetailResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetDetailResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetDetailResponseResult(val *HuggingFaceDatasetDetailResponseResult) *NullableHuggingFaceDatasetDetailResponseResult { + return &NullableHuggingFaceDatasetDetailResponseResult{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetDetailResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetDetailResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_list_item.go b/go/futureagi/model_hugging_face_dataset_list_item.go new file mode 100644 index 0000000..4af4fe8 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_list_item.go @@ -0,0 +1,288 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetListItem{} + +// HuggingFaceDatasetListItem struct for HuggingFaceDatasetListItem +type HuggingFaceDatasetListItem struct { + Id string `json:"id"` + Name string `json:"name"` + Downloads int32 `json:"downloads"` + Likes int32 `json:"likes"` + Author NullableString `json:"author,omitempty"` +} + +type _HuggingFaceDatasetListItem HuggingFaceDatasetListItem + +// NewHuggingFaceDatasetListItem instantiates a new HuggingFaceDatasetListItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetListItem(id string, name string, downloads int32, likes int32) *HuggingFaceDatasetListItem { + this := HuggingFaceDatasetListItem{} + this.Id = id + this.Name = name + this.Downloads = downloads + this.Likes = likes + return &this +} + +// NewHuggingFaceDatasetListItemWithDefaults instantiates a new HuggingFaceDatasetListItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetListItemWithDefaults() *HuggingFaceDatasetListItem { + this := HuggingFaceDatasetListItem{} + return &this +} + +// GetId returns the Id field value +func (o *HuggingFaceDatasetListItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *HuggingFaceDatasetListItem) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *HuggingFaceDatasetListItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *HuggingFaceDatasetListItem) SetName(v string) { + o.Name = v +} + +// GetDownloads returns the Downloads field value +func (o *HuggingFaceDatasetListItem) GetDownloads() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Downloads +} + +// GetDownloadsOk returns a tuple with the Downloads field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListItem) GetDownloadsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Downloads, true +} + +// SetDownloads sets field value +func (o *HuggingFaceDatasetListItem) SetDownloads(v int32) { + o.Downloads = v +} + +// GetLikes returns the Likes field value +func (o *HuggingFaceDatasetListItem) GetLikes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Likes +} + +// GetLikesOk returns a tuple with the Likes field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListItem) GetLikesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Likes, true +} + +// SetLikes sets field value +func (o *HuggingFaceDatasetListItem) SetLikes(v int32) { + o.Likes = v +} + +// GetAuthor returns the Author field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HuggingFaceDatasetListItem) GetAuthor() string { + if o == nil || IsNil(o.Author.Get()) { + var ret string + return ret + } + return *o.Author.Get() +} + +// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HuggingFaceDatasetListItem) GetAuthorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Author.Get(), o.Author.IsSet() +} + +// HasAuthor returns a boolean if a field has been set. +func (o *HuggingFaceDatasetListItem) HasAuthor() bool { + if o != nil && o.Author.IsSet() { + return true + } + + return false +} + +// SetAuthor gets a reference to the given NullableString and assigns it to the Author field. +func (o *HuggingFaceDatasetListItem) SetAuthor(v string) { + o.Author.Set(&v) +} + +// SetAuthorNil sets the value for Author to be an explicit nil +func (o *HuggingFaceDatasetListItem) SetAuthorNil() { + o.Author.Set(nil) +} + +// UnsetAuthor ensures that no value is present for Author, not even an explicit nil +func (o *HuggingFaceDatasetListItem) UnsetAuthor() { + o.Author.Unset() +} + +func (o HuggingFaceDatasetListItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetListItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["downloads"] = o.Downloads + toSerialize["likes"] = o.Likes + if o.Author.IsSet() { + toSerialize["author"] = o.Author.Get() + } + return toSerialize, nil +} + +func (o *HuggingFaceDatasetListItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "downloads", + "likes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetListItem := _HuggingFaceDatasetListItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetListItem) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetListItem(varHuggingFaceDatasetListItem) + + return err +} + +type NullableHuggingFaceDatasetListItem struct { + value *HuggingFaceDatasetListItem + isSet bool +} + +func (v NullableHuggingFaceDatasetListItem) Get() *HuggingFaceDatasetListItem { + return v.value +} + +func (v *NullableHuggingFaceDatasetListItem) Set(val *HuggingFaceDatasetListItem) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetListItem) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetListItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetListItem(val *HuggingFaceDatasetListItem) *NullableHuggingFaceDatasetListItem { + return &NullableHuggingFaceDatasetListItem{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetListItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetListItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_list_request.go b/go/futureagi/model_hugging_face_dataset_list_request.go new file mode 100644 index 0000000..4dc2db6 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_list_request.go @@ -0,0 +1,165 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the HuggingFaceDatasetListRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetListRequest{} + +// HuggingFaceDatasetListRequest struct for HuggingFaceDatasetListRequest +type HuggingFaceDatasetListRequest struct { + SearchQuery *string `json:"search_query,omitempty"` + FilterParams map[string]interface{} `json:"filter_params,omitempty"` +} + +// NewHuggingFaceDatasetListRequest instantiates a new HuggingFaceDatasetListRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetListRequest() *HuggingFaceDatasetListRequest { + this := HuggingFaceDatasetListRequest{} + var searchQuery string = "" + this.SearchQuery = &searchQuery + return &this +} + +// NewHuggingFaceDatasetListRequestWithDefaults instantiates a new HuggingFaceDatasetListRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetListRequestWithDefaults() *HuggingFaceDatasetListRequest { + this := HuggingFaceDatasetListRequest{} + var searchQuery string = "" + this.SearchQuery = &searchQuery + return &this +} + +// GetSearchQuery returns the SearchQuery field value if set, zero value otherwise. +func (o *HuggingFaceDatasetListRequest) GetSearchQuery() string { + if o == nil || IsNil(o.SearchQuery) { + var ret string + return ret + } + return *o.SearchQuery +} + +// GetSearchQueryOk returns a tuple with the SearchQuery field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListRequest) GetSearchQueryOk() (*string, bool) { + if o == nil || IsNil(o.SearchQuery) { + return nil, false + } + return o.SearchQuery, true +} + +// HasSearchQuery returns a boolean if a field has been set. +func (o *HuggingFaceDatasetListRequest) HasSearchQuery() bool { + if o != nil && !IsNil(o.SearchQuery) { + return true + } + + return false +} + +// SetSearchQuery gets a reference to the given string and assigns it to the SearchQuery field. +func (o *HuggingFaceDatasetListRequest) SetSearchQuery(v string) { + o.SearchQuery = &v +} + +// GetFilterParams returns the FilterParams field value if set, zero value otherwise. +func (o *HuggingFaceDatasetListRequest) GetFilterParams() map[string]interface{} { + if o == nil || IsNil(o.FilterParams) { + var ret map[string]interface{} + return ret + } + return o.FilterParams +} + +// GetFilterParamsOk returns a tuple with the FilterParams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListRequest) GetFilterParamsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.FilterParams) { + return map[string]interface{}{}, false + } + return o.FilterParams, true +} + +// HasFilterParams returns a boolean if a field has been set. +func (o *HuggingFaceDatasetListRequest) HasFilterParams() bool { + if o != nil && !IsNil(o.FilterParams) { + return true + } + + return false +} + +// SetFilterParams gets a reference to the given map[string]interface{} and assigns it to the FilterParams field. +func (o *HuggingFaceDatasetListRequest) SetFilterParams(v map[string]interface{}) { + o.FilterParams = v +} + +func (o HuggingFaceDatasetListRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetListRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SearchQuery) { + toSerialize["search_query"] = o.SearchQuery + } + if !IsNil(o.FilterParams) { + toSerialize["filter_params"] = o.FilterParams + } + return toSerialize, nil +} + +type NullableHuggingFaceDatasetListRequest struct { + value *HuggingFaceDatasetListRequest + isSet bool +} + +func (v NullableHuggingFaceDatasetListRequest) Get() *HuggingFaceDatasetListRequest { + return v.value +} + +func (v *NullableHuggingFaceDatasetListRequest) Set(val *HuggingFaceDatasetListRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetListRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetListRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetListRequest(val *HuggingFaceDatasetListRequest) *NullableHuggingFaceDatasetListRequest { + return &NullableHuggingFaceDatasetListRequest{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetListRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetListRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_list_response.go b/go/futureagi/model_hugging_face_dataset_list_response.go new file mode 100644 index 0000000..1df9aba --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetListResponse{} + +// HuggingFaceDatasetListResponse struct for HuggingFaceDatasetListResponse +type HuggingFaceDatasetListResponse struct { + Status bool `json:"status"` + Result HuggingFaceDatasetListResponseResult `json:"result"` +} + +type _HuggingFaceDatasetListResponse HuggingFaceDatasetListResponse + +// NewHuggingFaceDatasetListResponse instantiates a new HuggingFaceDatasetListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetListResponse(status bool, result HuggingFaceDatasetListResponseResult) *HuggingFaceDatasetListResponse { + this := HuggingFaceDatasetListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewHuggingFaceDatasetListResponseWithDefaults instantiates a new HuggingFaceDatasetListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetListResponseWithDefaults() *HuggingFaceDatasetListResponse { + this := HuggingFaceDatasetListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *HuggingFaceDatasetListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *HuggingFaceDatasetListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *HuggingFaceDatasetListResponse) GetResult() HuggingFaceDatasetListResponseResult { + if o == nil { + var ret HuggingFaceDatasetListResponseResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListResponse) GetResultOk() (*HuggingFaceDatasetListResponseResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *HuggingFaceDatasetListResponse) SetResult(v HuggingFaceDatasetListResponseResult) { + o.Result = v +} + +func (o HuggingFaceDatasetListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *HuggingFaceDatasetListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetListResponse := _HuggingFaceDatasetListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetListResponse) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetListResponse(varHuggingFaceDatasetListResponse) + + return err +} + +type NullableHuggingFaceDatasetListResponse struct { + value *HuggingFaceDatasetListResponse + isSet bool +} + +func (v NullableHuggingFaceDatasetListResponse) Get() *HuggingFaceDatasetListResponse { + return v.value +} + +func (v *NullableHuggingFaceDatasetListResponse) Set(val *HuggingFaceDatasetListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetListResponse(val *HuggingFaceDatasetListResponse) *NullableHuggingFaceDatasetListResponse { + return &NullableHuggingFaceDatasetListResponse{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_hugging_face_dataset_list_response_result.go b/go/futureagi/model_hugging_face_dataset_list_response_result.go new file mode 100644 index 0000000..7539ce8 --- /dev/null +++ b/go/futureagi/model_hugging_face_dataset_list_response_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the HuggingFaceDatasetListResponseResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HuggingFaceDatasetListResponseResult{} + +// HuggingFaceDatasetListResponseResult struct for HuggingFaceDatasetListResponseResult +type HuggingFaceDatasetListResponseResult struct { + Message string `json:"message"` + TotalDatasets int32 `json:"total_datasets"` + Datasets []HuggingFaceDatasetListItem `json:"datasets"` +} + +type _HuggingFaceDatasetListResponseResult HuggingFaceDatasetListResponseResult + +// NewHuggingFaceDatasetListResponseResult instantiates a new HuggingFaceDatasetListResponseResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHuggingFaceDatasetListResponseResult(message string, totalDatasets int32, datasets []HuggingFaceDatasetListItem) *HuggingFaceDatasetListResponseResult { + this := HuggingFaceDatasetListResponseResult{} + this.Message = message + this.TotalDatasets = totalDatasets + this.Datasets = datasets + return &this +} + +// NewHuggingFaceDatasetListResponseResultWithDefaults instantiates a new HuggingFaceDatasetListResponseResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHuggingFaceDatasetListResponseResultWithDefaults() *HuggingFaceDatasetListResponseResult { + this := HuggingFaceDatasetListResponseResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *HuggingFaceDatasetListResponseResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListResponseResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *HuggingFaceDatasetListResponseResult) SetMessage(v string) { + o.Message = v +} + +// GetTotalDatasets returns the TotalDatasets field value +func (o *HuggingFaceDatasetListResponseResult) GetTotalDatasets() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalDatasets +} + +// GetTotalDatasetsOk returns a tuple with the TotalDatasets field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListResponseResult) GetTotalDatasetsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalDatasets, true +} + +// SetTotalDatasets sets field value +func (o *HuggingFaceDatasetListResponseResult) SetTotalDatasets(v int32) { + o.TotalDatasets = v +} + +// GetDatasets returns the Datasets field value +func (o *HuggingFaceDatasetListResponseResult) GetDatasets() []HuggingFaceDatasetListItem { + if o == nil { + var ret []HuggingFaceDatasetListItem + return ret + } + + return o.Datasets +} + +// GetDatasetsOk returns a tuple with the Datasets field value +// and a boolean to check if the value has been set. +func (o *HuggingFaceDatasetListResponseResult) GetDatasetsOk() ([]HuggingFaceDatasetListItem, bool) { + if o == nil { + return nil, false + } + return o.Datasets, true +} + +// SetDatasets sets field value +func (o *HuggingFaceDatasetListResponseResult) SetDatasets(v []HuggingFaceDatasetListItem) { + o.Datasets = v +} + +func (o HuggingFaceDatasetListResponseResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HuggingFaceDatasetListResponseResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["total_datasets"] = o.TotalDatasets + toSerialize["datasets"] = o.Datasets + return toSerialize, nil +} + +func (o *HuggingFaceDatasetListResponseResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "total_datasets", + "datasets", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHuggingFaceDatasetListResponseResult := _HuggingFaceDatasetListResponseResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHuggingFaceDatasetListResponseResult) + + if err != nil { + return err + } + + *o = HuggingFaceDatasetListResponseResult(varHuggingFaceDatasetListResponseResult) + + return err +} + +type NullableHuggingFaceDatasetListResponseResult struct { + value *HuggingFaceDatasetListResponseResult + isSet bool +} + +func (v NullableHuggingFaceDatasetListResponseResult) Get() *HuggingFaceDatasetListResponseResult { + return v.value +} + +func (v *NullableHuggingFaceDatasetListResponseResult) Set(val *HuggingFaceDatasetListResponseResult) { + v.value = val + v.isSet = true +} + +func (v NullableHuggingFaceDatasetListResponseResult) IsSet() bool { + return v.isSet +} + +func (v *NullableHuggingFaceDatasetListResponseResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHuggingFaceDatasetListResponseResult(val *HuggingFaceDatasetListResponseResult) *NullableHuggingFaceDatasetListResponseResult { + return &NullableHuggingFaceDatasetListResponseResult{value: val, isSet: true} +} + +func (v NullableHuggingFaceDatasetListResponseResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHuggingFaceDatasetListResponseResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_import_annotation_entry.go b/go/futureagi/model_import_annotation_entry.go new file mode 100644 index 0000000..23393ae --- /dev/null +++ b/go/futureagi/model_import_annotation_entry.go @@ -0,0 +1,257 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ImportAnnotationEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportAnnotationEntry{} + +// ImportAnnotationEntry struct for ImportAnnotationEntry +type ImportAnnotationEntry struct { + LabelId string `json:"label_id"` + Value map[string]interface{} `json:"value"` + Notes *string `json:"notes,omitempty"` + ScoreSource *string `json:"score_source,omitempty"` +} + +type _ImportAnnotationEntry ImportAnnotationEntry + +// NewImportAnnotationEntry instantiates a new ImportAnnotationEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportAnnotationEntry(labelId string, value map[string]interface{}) *ImportAnnotationEntry { + this := ImportAnnotationEntry{} + this.LabelId = labelId + this.Value = value + return &this +} + +// NewImportAnnotationEntryWithDefaults instantiates a new ImportAnnotationEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportAnnotationEntryWithDefaults() *ImportAnnotationEntry { + this := ImportAnnotationEntry{} + return &this +} + +// GetLabelId returns the LabelId field value +func (o *ImportAnnotationEntry) GetLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value +// and a boolean to check if the value has been set. +func (o *ImportAnnotationEntry) GetLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelId, true +} + +// SetLabelId sets field value +func (o *ImportAnnotationEntry) SetLabelId(v string) { + o.LabelId = v +} + +// GetValue returns the Value field value +func (o *ImportAnnotationEntry) GetValue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *ImportAnnotationEntry) GetValueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *ImportAnnotationEntry) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *ImportAnnotationEntry) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAnnotationEntry) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *ImportAnnotationEntry) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *ImportAnnotationEntry) SetNotes(v string) { + o.Notes = &v +} + +// GetScoreSource returns the ScoreSource field value if set, zero value otherwise. +func (o *ImportAnnotationEntry) GetScoreSource() string { + if o == nil || IsNil(o.ScoreSource) { + var ret string + return ret + } + return *o.ScoreSource +} + +// GetScoreSourceOk returns a tuple with the ScoreSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAnnotationEntry) GetScoreSourceOk() (*string, bool) { + if o == nil || IsNil(o.ScoreSource) { + return nil, false + } + return o.ScoreSource, true +} + +// HasScoreSource returns a boolean if a field has been set. +func (o *ImportAnnotationEntry) HasScoreSource() bool { + if o != nil && !IsNil(o.ScoreSource) { + return true + } + + return false +} + +// SetScoreSource gets a reference to the given string and assigns it to the ScoreSource field. +func (o *ImportAnnotationEntry) SetScoreSource(v string) { + o.ScoreSource = &v +} + +func (o ImportAnnotationEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportAnnotationEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label_id"] = o.LabelId + toSerialize["value"] = o.Value + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if !IsNil(o.ScoreSource) { + toSerialize["score_source"] = o.ScoreSource + } + return toSerialize, nil +} + +func (o *ImportAnnotationEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label_id", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImportAnnotationEntry := _ImportAnnotationEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImportAnnotationEntry) + + if err != nil { + return err + } + + *o = ImportAnnotationEntry(varImportAnnotationEntry) + + return err +} + +type NullableImportAnnotationEntry struct { + value *ImportAnnotationEntry + isSet bool +} + +func (v NullableImportAnnotationEntry) Get() *ImportAnnotationEntry { + return v.value +} + +func (v *NullableImportAnnotationEntry) Set(val *ImportAnnotationEntry) { + v.value = val + v.isSet = true +} + +func (v NullableImportAnnotationEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableImportAnnotationEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportAnnotationEntry(val *ImportAnnotationEntry) *NullableImportAnnotationEntry { + return &NullableImportAnnotationEntry{value: val, isSet: true} +} + +func (v NullableImportAnnotationEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportAnnotationEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_import_annotations.go b/go/futureagi/model_import_annotations.go new file mode 100644 index 0000000..cef4195 --- /dev/null +++ b/go/futureagi/model_import_annotations.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ImportAnnotations type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportAnnotations{} + +// ImportAnnotations struct for ImportAnnotations +type ImportAnnotations struct { + Annotations []ImportAnnotationEntry `json:"annotations"` + AnnotatorId *string `json:"annotator_id,omitempty"` +} + +type _ImportAnnotations ImportAnnotations + +// NewImportAnnotations instantiates a new ImportAnnotations object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportAnnotations(annotations []ImportAnnotationEntry) *ImportAnnotations { + this := ImportAnnotations{} + this.Annotations = annotations + return &this +} + +// NewImportAnnotationsWithDefaults instantiates a new ImportAnnotations object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportAnnotationsWithDefaults() *ImportAnnotations { + this := ImportAnnotations{} + return &this +} + +// GetAnnotations returns the Annotations field value +func (o *ImportAnnotations) GetAnnotations() []ImportAnnotationEntry { + if o == nil { + var ret []ImportAnnotationEntry + return ret + } + + return o.Annotations +} + +// GetAnnotationsOk returns a tuple with the Annotations field value +// and a boolean to check if the value has been set. +func (o *ImportAnnotations) GetAnnotationsOk() ([]ImportAnnotationEntry, bool) { + if o == nil { + return nil, false + } + return o.Annotations, true +} + +// SetAnnotations sets field value +func (o *ImportAnnotations) SetAnnotations(v []ImportAnnotationEntry) { + o.Annotations = v +} + +// GetAnnotatorId returns the AnnotatorId field value if set, zero value otherwise. +func (o *ImportAnnotations) GetAnnotatorId() string { + if o == nil || IsNil(o.AnnotatorId) { + var ret string + return ret + } + return *o.AnnotatorId +} + +// GetAnnotatorIdOk returns a tuple with the AnnotatorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportAnnotations) GetAnnotatorIdOk() (*string, bool) { + if o == nil || IsNil(o.AnnotatorId) { + return nil, false + } + return o.AnnotatorId, true +} + +// HasAnnotatorId returns a boolean if a field has been set. +func (o *ImportAnnotations) HasAnnotatorId() bool { + if o != nil && !IsNil(o.AnnotatorId) { + return true + } + + return false +} + +// SetAnnotatorId gets a reference to the given string and assigns it to the AnnotatorId field. +func (o *ImportAnnotations) SetAnnotatorId(v string) { + o.AnnotatorId = &v +} + +func (o ImportAnnotations) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportAnnotations) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["annotations"] = o.Annotations + if !IsNil(o.AnnotatorId) { + toSerialize["annotator_id"] = o.AnnotatorId + } + return toSerialize, nil +} + +func (o *ImportAnnotations) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "annotations", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varImportAnnotations := _ImportAnnotations{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varImportAnnotations) + + if err != nil { + return err + } + + *o = ImportAnnotations(varImportAnnotations) + + return err +} + +type NullableImportAnnotations struct { + value *ImportAnnotations + isSet bool +} + +func (v NullableImportAnnotations) Get() *ImportAnnotations { + return v.value +} + +func (v *NullableImportAnnotations) Set(val *ImportAnnotations) { + v.value = val + v.isSet = true +} + +func (v NullableImportAnnotations) IsSet() bool { + return v.isSet +} + +func (v *NullableImportAnnotations) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportAnnotations(val *ImportAnnotations) *NullableImportAnnotations { + return &NullableImportAnnotations{value: val, isSet: true} +} + +func (v NullableImportAnnotations) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportAnnotations) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_json_column_schema_entry.go b/go/futureagi/model_json_column_schema_entry.go new file mode 100644 index 0000000..7d6e2bf --- /dev/null +++ b/go/futureagi/model_json_column_schema_entry.go @@ -0,0 +1,301 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the JsonColumnSchemaEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JsonColumnSchemaEntry{} + +// JsonColumnSchemaEntry struct for JsonColumnSchemaEntry +type JsonColumnSchemaEntry struct { + Name string `json:"name"` + Keys []string `json:"keys,omitempty"` + Sample map[string]interface{} `json:"sample,omitempty"` + MaxArrayCount *int32 `json:"max_array_count,omitempty"` + MaxImagesCount *int32 `json:"max_images_count,omitempty"` +} + +type _JsonColumnSchemaEntry JsonColumnSchemaEntry + +// NewJsonColumnSchemaEntry instantiates a new JsonColumnSchemaEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewJsonColumnSchemaEntry(name string) *JsonColumnSchemaEntry { + this := JsonColumnSchemaEntry{} + this.Name = name + return &this +} + +// NewJsonColumnSchemaEntryWithDefaults instantiates a new JsonColumnSchemaEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewJsonColumnSchemaEntryWithDefaults() *JsonColumnSchemaEntry { + this := JsonColumnSchemaEntry{} + return &this +} + +// GetName returns the Name field value +func (o *JsonColumnSchemaEntry) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *JsonColumnSchemaEntry) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *JsonColumnSchemaEntry) SetName(v string) { + o.Name = v +} + +// GetKeys returns the Keys field value if set, zero value otherwise. +func (o *JsonColumnSchemaEntry) GetKeys() []string { + if o == nil || IsNil(o.Keys) { + var ret []string + return ret + } + return o.Keys +} + +// GetKeysOk returns a tuple with the Keys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JsonColumnSchemaEntry) GetKeysOk() ([]string, bool) { + if o == nil || IsNil(o.Keys) { + return nil, false + } + return o.Keys, true +} + +// HasKeys returns a boolean if a field has been set. +func (o *JsonColumnSchemaEntry) HasKeys() bool { + if o != nil && !IsNil(o.Keys) { + return true + } + + return false +} + +// SetKeys gets a reference to the given []string and assigns it to the Keys field. +func (o *JsonColumnSchemaEntry) SetKeys(v []string) { + o.Keys = v +} + +// GetSample returns the Sample field value if set, zero value otherwise. +func (o *JsonColumnSchemaEntry) GetSample() map[string]interface{} { + if o == nil || IsNil(o.Sample) { + var ret map[string]interface{} + return ret + } + return o.Sample +} + +// GetSampleOk returns a tuple with the Sample field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JsonColumnSchemaEntry) GetSampleOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Sample) { + return map[string]interface{}{}, false + } + return o.Sample, true +} + +// HasSample returns a boolean if a field has been set. +func (o *JsonColumnSchemaEntry) HasSample() bool { + if o != nil && !IsNil(o.Sample) { + return true + } + + return false +} + +// SetSample gets a reference to the given map[string]interface{} and assigns it to the Sample field. +func (o *JsonColumnSchemaEntry) SetSample(v map[string]interface{}) { + o.Sample = v +} + +// GetMaxArrayCount returns the MaxArrayCount field value if set, zero value otherwise. +func (o *JsonColumnSchemaEntry) GetMaxArrayCount() int32 { + if o == nil || IsNil(o.MaxArrayCount) { + var ret int32 + return ret + } + return *o.MaxArrayCount +} + +// GetMaxArrayCountOk returns a tuple with the MaxArrayCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JsonColumnSchemaEntry) GetMaxArrayCountOk() (*int32, bool) { + if o == nil || IsNil(o.MaxArrayCount) { + return nil, false + } + return o.MaxArrayCount, true +} + +// HasMaxArrayCount returns a boolean if a field has been set. +func (o *JsonColumnSchemaEntry) HasMaxArrayCount() bool { + if o != nil && !IsNil(o.MaxArrayCount) { + return true + } + + return false +} + +// SetMaxArrayCount gets a reference to the given int32 and assigns it to the MaxArrayCount field. +func (o *JsonColumnSchemaEntry) SetMaxArrayCount(v int32) { + o.MaxArrayCount = &v +} + +// GetMaxImagesCount returns the MaxImagesCount field value if set, zero value otherwise. +func (o *JsonColumnSchemaEntry) GetMaxImagesCount() int32 { + if o == nil || IsNil(o.MaxImagesCount) { + var ret int32 + return ret + } + return *o.MaxImagesCount +} + +// GetMaxImagesCountOk returns a tuple with the MaxImagesCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JsonColumnSchemaEntry) GetMaxImagesCountOk() (*int32, bool) { + if o == nil || IsNil(o.MaxImagesCount) { + return nil, false + } + return o.MaxImagesCount, true +} + +// HasMaxImagesCount returns a boolean if a field has been set. +func (o *JsonColumnSchemaEntry) HasMaxImagesCount() bool { + if o != nil && !IsNil(o.MaxImagesCount) { + return true + } + + return false +} + +// SetMaxImagesCount gets a reference to the given int32 and assigns it to the MaxImagesCount field. +func (o *JsonColumnSchemaEntry) SetMaxImagesCount(v int32) { + o.MaxImagesCount = &v +} + +func (o JsonColumnSchemaEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JsonColumnSchemaEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Keys) { + toSerialize["keys"] = o.Keys + } + if !IsNil(o.Sample) { + toSerialize["sample"] = o.Sample + } + if !IsNil(o.MaxArrayCount) { + toSerialize["max_array_count"] = o.MaxArrayCount + } + if !IsNil(o.MaxImagesCount) { + toSerialize["max_images_count"] = o.MaxImagesCount + } + return toSerialize, nil +} + +func (o *JsonColumnSchemaEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varJsonColumnSchemaEntry := _JsonColumnSchemaEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varJsonColumnSchemaEntry) + + if err != nil { + return err + } + + *o = JsonColumnSchemaEntry(varJsonColumnSchemaEntry) + + return err +} + +type NullableJsonColumnSchemaEntry struct { + value *JsonColumnSchemaEntry + isSet bool +} + +func (v NullableJsonColumnSchemaEntry) Get() *JsonColumnSchemaEntry { + return v.value +} + +func (v *NullableJsonColumnSchemaEntry) Set(val *JsonColumnSchemaEntry) { + v.value = val + v.isSet = true +} + +func (v NullableJsonColumnSchemaEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableJsonColumnSchemaEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJsonColumnSchemaEntry(val *JsonColumnSchemaEntry) *NullableJsonColumnSchemaEntry { + return &NullableJsonColumnSchemaEntry{value: val, isSet: true} +} + +func (v NullableJsonColumnSchemaEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJsonColumnSchemaEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_key_moment.go b/go/futureagi/model_key_moment.go new file mode 100644 index 0000000..cc9d5bf --- /dev/null +++ b/go/futureagi/model_key_moment.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the KeyMoment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KeyMoment{} + +// KeyMoment struct for KeyMoment +type KeyMoment struct { + Kevinified string `json:"kevinified"` + Verbatim string `json:"verbatim"` +} + +type _KeyMoment KeyMoment + +// NewKeyMoment instantiates a new KeyMoment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKeyMoment(kevinified string, verbatim string) *KeyMoment { + this := KeyMoment{} + this.Kevinified = kevinified + this.Verbatim = verbatim + return &this +} + +// NewKeyMomentWithDefaults instantiates a new KeyMoment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKeyMomentWithDefaults() *KeyMoment { + this := KeyMoment{} + return &this +} + +// GetKevinified returns the Kevinified field value +func (o *KeyMoment) GetKevinified() string { + if o == nil { + var ret string + return ret + } + + return o.Kevinified +} + +// GetKevinifiedOk returns a tuple with the Kevinified field value +// and a boolean to check if the value has been set. +func (o *KeyMoment) GetKevinifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kevinified, true +} + +// SetKevinified sets field value +func (o *KeyMoment) SetKevinified(v string) { + o.Kevinified = v +} + +// GetVerbatim returns the Verbatim field value +func (o *KeyMoment) GetVerbatim() string { + if o == nil { + var ret string + return ret + } + + return o.Verbatim +} + +// GetVerbatimOk returns a tuple with the Verbatim field value +// and a boolean to check if the value has been set. +func (o *KeyMoment) GetVerbatimOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Verbatim, true +} + +// SetVerbatim sets field value +func (o *KeyMoment) SetVerbatim(v string) { + o.Verbatim = v +} + +func (o KeyMoment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KeyMoment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["kevinified"] = o.Kevinified + toSerialize["verbatim"] = o.Verbatim + return toSerialize, nil +} + +func (o *KeyMoment) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "kevinified", + "verbatim", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKeyMoment := _KeyMoment{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKeyMoment) + + if err != nil { + return err + } + + *o = KeyMoment(varKeyMoment) + + return err +} + +type NullableKeyMoment struct { + value *KeyMoment + isSet bool +} + +func (v NullableKeyMoment) Get() *KeyMoment { + return v.value +} + +func (v *NullableKeyMoment) Set(val *KeyMoment) { + v.value = val + v.isSet = true +} + +func (v NullableKeyMoment) IsSet() bool { + return v.isSet +} + +func (v *NullableKeyMoment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKeyMoment(val *KeyMoment) *NullableKeyMoment { + return &NullableKeyMoment{value: val, isSet: true} +} + +func (v NullableKeyMoment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKeyMoment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_create_response.go b/go/futureagi/model_legacy_knowledge_base_create_response.go new file mode 100644 index 0000000..67926c7 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_create_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseCreateResponse{} + +// LegacyKnowledgeBaseCreateResponse struct for LegacyKnowledgeBaseCreateResponse +type LegacyKnowledgeBaseCreateResponse struct { + Status bool `json:"status"` + Result LegacyKnowledgeBaseCreateResult `json:"result"` +} + +type _LegacyKnowledgeBaseCreateResponse LegacyKnowledgeBaseCreateResponse + +// NewLegacyKnowledgeBaseCreateResponse instantiates a new LegacyKnowledgeBaseCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseCreateResponse(status bool, result LegacyKnowledgeBaseCreateResult) *LegacyKnowledgeBaseCreateResponse { + this := LegacyKnowledgeBaseCreateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewLegacyKnowledgeBaseCreateResponseWithDefaults instantiates a new LegacyKnowledgeBaseCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseCreateResponseWithDefaults() *LegacyKnowledgeBaseCreateResponse { + this := LegacyKnowledgeBaseCreateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseCreateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseCreateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseCreateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *LegacyKnowledgeBaseCreateResponse) GetResult() LegacyKnowledgeBaseCreateResult { + if o == nil { + var ret LegacyKnowledgeBaseCreateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseCreateResponse) GetResultOk() (*LegacyKnowledgeBaseCreateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *LegacyKnowledgeBaseCreateResponse) SetResult(v LegacyKnowledgeBaseCreateResult) { + o.Result = v +} + +func (o LegacyKnowledgeBaseCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseCreateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseCreateResponse := _LegacyKnowledgeBaseCreateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseCreateResponse) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseCreateResponse(varLegacyKnowledgeBaseCreateResponse) + + return err +} + +type NullableLegacyKnowledgeBaseCreateResponse struct { + value *LegacyKnowledgeBaseCreateResponse + isSet bool +} + +func (v NullableLegacyKnowledgeBaseCreateResponse) Get() *LegacyKnowledgeBaseCreateResponse { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseCreateResponse) Set(val *LegacyKnowledgeBaseCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseCreateResponse(val *LegacyKnowledgeBaseCreateResponse) *NullableLegacyKnowledgeBaseCreateResponse { + return &NullableLegacyKnowledgeBaseCreateResponse{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_create_result.go b/go/futureagi/model_legacy_knowledge_base_create_result.go new file mode 100644 index 0000000..0905fd8 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_create_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseCreateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseCreateResult{} + +// LegacyKnowledgeBaseCreateResult struct for LegacyKnowledgeBaseCreateResult +type LegacyKnowledgeBaseCreateResult struct { + Detail string `json:"detail"` + KbId string `json:"kb_id"` + KbName string `json:"kb_name"` + FileIds []string `json:"file_ids"` +} + +type _LegacyKnowledgeBaseCreateResult LegacyKnowledgeBaseCreateResult + +// NewLegacyKnowledgeBaseCreateResult instantiates a new LegacyKnowledgeBaseCreateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseCreateResult(detail string, kbId string, kbName string, fileIds []string) *LegacyKnowledgeBaseCreateResult { + this := LegacyKnowledgeBaseCreateResult{} + this.Detail = detail + this.KbId = kbId + this.KbName = kbName + this.FileIds = fileIds + return &this +} + +// NewLegacyKnowledgeBaseCreateResultWithDefaults instantiates a new LegacyKnowledgeBaseCreateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseCreateResultWithDefaults() *LegacyKnowledgeBaseCreateResult { + this := LegacyKnowledgeBaseCreateResult{} + return &this +} + +// GetDetail returns the Detail field value +func (o *LegacyKnowledgeBaseCreateResult) GetDetail() string { + if o == nil { + var ret string + return ret + } + + return o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseCreateResult) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Detail, true +} + +// SetDetail sets field value +func (o *LegacyKnowledgeBaseCreateResult) SetDetail(v string) { + o.Detail = v +} + +// GetKbId returns the KbId field value +func (o *LegacyKnowledgeBaseCreateResult) GetKbId() string { + if o == nil { + var ret string + return ret + } + + return o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseCreateResult) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KbId, true +} + +// SetKbId sets field value +func (o *LegacyKnowledgeBaseCreateResult) SetKbId(v string) { + o.KbId = v +} + +// GetKbName returns the KbName field value +func (o *LegacyKnowledgeBaseCreateResult) GetKbName() string { + if o == nil { + var ret string + return ret + } + + return o.KbName +} + +// GetKbNameOk returns a tuple with the KbName field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseCreateResult) GetKbNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KbName, true +} + +// SetKbName sets field value +func (o *LegacyKnowledgeBaseCreateResult) SetKbName(v string) { + o.KbName = v +} + +// GetFileIds returns the FileIds field value +func (o *LegacyKnowledgeBaseCreateResult) GetFileIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.FileIds +} + +// GetFileIdsOk returns a tuple with the FileIds field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseCreateResult) GetFileIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.FileIds, true +} + +// SetFileIds sets field value +func (o *LegacyKnowledgeBaseCreateResult) SetFileIds(v []string) { + o.FileIds = v +} + +func (o LegacyKnowledgeBaseCreateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseCreateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["detail"] = o.Detail + toSerialize["kb_id"] = o.KbId + toSerialize["kb_name"] = o.KbName + toSerialize["file_ids"] = o.FileIds + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseCreateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "detail", + "kb_id", + "kb_name", + "file_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseCreateResult := _LegacyKnowledgeBaseCreateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseCreateResult) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseCreateResult(varLegacyKnowledgeBaseCreateResult) + + return err +} + +type NullableLegacyKnowledgeBaseCreateResult struct { + value *LegacyKnowledgeBaseCreateResult + isSet bool +} + +func (v NullableLegacyKnowledgeBaseCreateResult) Get() *LegacyKnowledgeBaseCreateResult { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseCreateResult) Set(val *LegacyKnowledgeBaseCreateResult) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseCreateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseCreateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseCreateResult(val *LegacyKnowledgeBaseCreateResult) *NullableLegacyKnowledgeBaseCreateResult { + return &NullableLegacyKnowledgeBaseCreateResult{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseCreateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseCreateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_file_row.go b/go/futureagi/model_legacy_knowledge_base_file_row.go new file mode 100644 index 0000000..52d1470 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_file_row.go @@ -0,0 +1,347 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the LegacyKnowledgeBaseFileRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseFileRow{} + +// LegacyKnowledgeBaseFileRow struct for LegacyKnowledgeBaseFileRow +type LegacyKnowledgeBaseFileRow struct { + Id string `json:"id"` + Name string `json:"name"` + FileSize int32 `json:"file_size"` + Status string `json:"status"` + Updated time.Time `json:"updated"` + UpdatedBy NullableString `json:"updated_by"` + Error NullableString `json:"error,omitempty"` +} + +type _LegacyKnowledgeBaseFileRow LegacyKnowledgeBaseFileRow + +// NewLegacyKnowledgeBaseFileRow instantiates a new LegacyKnowledgeBaseFileRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseFileRow(id string, name string, fileSize int32, status string, updated time.Time, updatedBy NullableString) *LegacyKnowledgeBaseFileRow { + this := LegacyKnowledgeBaseFileRow{} + this.Id = id + this.Name = name + this.FileSize = fileSize + this.Status = status + this.Updated = updated + this.UpdatedBy = updatedBy + return &this +} + +// NewLegacyKnowledgeBaseFileRowWithDefaults instantiates a new LegacyKnowledgeBaseFileRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseFileRowWithDefaults() *LegacyKnowledgeBaseFileRow { + this := LegacyKnowledgeBaseFileRow{} + return &this +} + +// GetId returns the Id field value +func (o *LegacyKnowledgeBaseFileRow) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFileRow) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *LegacyKnowledgeBaseFileRow) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *LegacyKnowledgeBaseFileRow) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFileRow) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LegacyKnowledgeBaseFileRow) SetName(v string) { + o.Name = v +} + +// GetFileSize returns the FileSize field value +func (o *LegacyKnowledgeBaseFileRow) GetFileSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FileSize +} + +// GetFileSizeOk returns a tuple with the FileSize field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFileRow) GetFileSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FileSize, true +} + +// SetFileSize sets field value +func (o *LegacyKnowledgeBaseFileRow) SetFileSize(v int32) { + o.FileSize = v +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseFileRow) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFileRow) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseFileRow) SetStatus(v string) { + o.Status = v +} + +// GetUpdated returns the Updated field value +func (o *LegacyKnowledgeBaseFileRow) GetUpdated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Updated +} + +// GetUpdatedOk returns a tuple with the Updated field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFileRow) GetUpdatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Updated, true +} + +// SetUpdated sets field value +func (o *LegacyKnowledgeBaseFileRow) SetUpdated(v time.Time) { + o.Updated = v +} + +// GetUpdatedBy returns the UpdatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *LegacyKnowledgeBaseFileRow) GetUpdatedBy() string { + if o == nil || o.UpdatedBy.Get() == nil { + var ret string + return ret + } + + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LegacyKnowledgeBaseFileRow) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// SetUpdatedBy sets field value +func (o *LegacyKnowledgeBaseFileRow) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LegacyKnowledgeBaseFileRow) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LegacyKnowledgeBaseFileRow) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseFileRow) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *LegacyKnowledgeBaseFileRow) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *LegacyKnowledgeBaseFileRow) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *LegacyKnowledgeBaseFileRow) UnsetError() { + o.Error.Unset() +} + +func (o LegacyKnowledgeBaseFileRow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseFileRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["file_size"] = o.FileSize + toSerialize["status"] = o.Status + toSerialize["updated"] = o.Updated + toSerialize["updated_by"] = o.UpdatedBy.Get() + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseFileRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "file_size", + "status", + "updated", + "updated_by", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseFileRow := _LegacyKnowledgeBaseFileRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseFileRow) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseFileRow(varLegacyKnowledgeBaseFileRow) + + return err +} + +type NullableLegacyKnowledgeBaseFileRow struct { + value *LegacyKnowledgeBaseFileRow + isSet bool +} + +func (v NullableLegacyKnowledgeBaseFileRow) Get() *LegacyKnowledgeBaseFileRow { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseFileRow) Set(val *LegacyKnowledgeBaseFileRow) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseFileRow) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseFileRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseFileRow(val *LegacyKnowledgeBaseFileRow) *NullableLegacyKnowledgeBaseFileRow { + return &NullableLegacyKnowledgeBaseFileRow{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseFileRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseFileRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_files_request.go b/go/futureagi/model_legacy_knowledge_base_files_request.go new file mode 100644 index 0000000..d86f41a --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_files_request.go @@ -0,0 +1,320 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseFilesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseFilesRequest{} + +// LegacyKnowledgeBaseFilesRequest struct for LegacyKnowledgeBaseFilesRequest +type LegacyKnowledgeBaseFilesRequest struct { + KbId string `json:"kb_id"` + Search NullableString `json:"search,omitempty"` + Sort []map[string]interface{} `json:"sort,omitempty"` + PageNumber *int32 `json:"page_number,omitempty"` + PageSize *int32 `json:"page_size,omitempty"` +} + +type _LegacyKnowledgeBaseFilesRequest LegacyKnowledgeBaseFilesRequest + +// NewLegacyKnowledgeBaseFilesRequest instantiates a new LegacyKnowledgeBaseFilesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseFilesRequest(kbId string) *LegacyKnowledgeBaseFilesRequest { + this := LegacyKnowledgeBaseFilesRequest{} + this.KbId = kbId + var pageNumber int32 = 0 + this.PageNumber = &pageNumber + var pageSize int32 = 10 + this.PageSize = &pageSize + return &this +} + +// NewLegacyKnowledgeBaseFilesRequestWithDefaults instantiates a new LegacyKnowledgeBaseFilesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseFilesRequestWithDefaults() *LegacyKnowledgeBaseFilesRequest { + this := LegacyKnowledgeBaseFilesRequest{} + var pageNumber int32 = 0 + this.PageNumber = &pageNumber + var pageSize int32 = 10 + this.PageSize = &pageSize + return &this +} + +// GetKbId returns the KbId field value +func (o *LegacyKnowledgeBaseFilesRequest) GetKbId() string { + if o == nil { + var ret string + return ret + } + + return o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesRequest) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KbId, true +} + +// SetKbId sets field value +func (o *LegacyKnowledgeBaseFilesRequest) SetKbId(v string) { + o.KbId = v +} + +// GetSearch returns the Search field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LegacyKnowledgeBaseFilesRequest) GetSearch() string { + if o == nil || IsNil(o.Search.Get()) { + var ret string + return ret + } + return *o.Search.Get() +} + +// GetSearchOk returns a tuple with the Search field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LegacyKnowledgeBaseFilesRequest) GetSearchOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Search.Get(), o.Search.IsSet() +} + +// HasSearch returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseFilesRequest) HasSearch() bool { + if o != nil && o.Search.IsSet() { + return true + } + + return false +} + +// SetSearch gets a reference to the given NullableString and assigns it to the Search field. +func (o *LegacyKnowledgeBaseFilesRequest) SetSearch(v string) { + o.Search.Set(&v) +} + +// SetSearchNil sets the value for Search to be an explicit nil +func (o *LegacyKnowledgeBaseFilesRequest) SetSearchNil() { + o.Search.Set(nil) +} + +// UnsetSearch ensures that no value is present for Search, not even an explicit nil +func (o *LegacyKnowledgeBaseFilesRequest) UnsetSearch() { + o.Search.Unset() +} + +// GetSort returns the Sort field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseFilesRequest) GetSort() []map[string]interface{} { + if o == nil || IsNil(o.Sort) { + var ret []map[string]interface{} + return ret + } + return o.Sort +} + +// GetSortOk returns a tuple with the Sort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesRequest) GetSortOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Sort) { + return nil, false + } + return o.Sort, true +} + +// HasSort returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseFilesRequest) HasSort() bool { + if o != nil && !IsNil(o.Sort) { + return true + } + + return false +} + +// SetSort gets a reference to the given []map[string]interface{} and assigns it to the Sort field. +func (o *LegacyKnowledgeBaseFilesRequest) SetSort(v []map[string]interface{}) { + o.Sort = v +} + +// GetPageNumber returns the PageNumber field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseFilesRequest) GetPageNumber() int32 { + if o == nil || IsNil(o.PageNumber) { + var ret int32 + return ret + } + return *o.PageNumber +} + +// GetPageNumberOk returns a tuple with the PageNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesRequest) GetPageNumberOk() (*int32, bool) { + if o == nil || IsNil(o.PageNumber) { + return nil, false + } + return o.PageNumber, true +} + +// HasPageNumber returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseFilesRequest) HasPageNumber() bool { + if o != nil && !IsNil(o.PageNumber) { + return true + } + + return false +} + +// SetPageNumber gets a reference to the given int32 and assigns it to the PageNumber field. +func (o *LegacyKnowledgeBaseFilesRequest) SetPageNumber(v int32) { + o.PageNumber = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseFilesRequest) GetPageSize() int32 { + if o == nil || IsNil(o.PageSize) { + var ret int32 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesRequest) GetPageSizeOk() (*int32, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseFilesRequest) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int32 and assigns it to the PageSize field. +func (o *LegacyKnowledgeBaseFilesRequest) SetPageSize(v int32) { + o.PageSize = &v +} + +func (o LegacyKnowledgeBaseFilesRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseFilesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["kb_id"] = o.KbId + if o.Search.IsSet() { + toSerialize["search"] = o.Search.Get() + } + if !IsNil(o.Sort) { + toSerialize["sort"] = o.Sort + } + if !IsNil(o.PageNumber) { + toSerialize["page_number"] = o.PageNumber + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseFilesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "kb_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseFilesRequest := _LegacyKnowledgeBaseFilesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseFilesRequest) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseFilesRequest(varLegacyKnowledgeBaseFilesRequest) + + return err +} + +type NullableLegacyKnowledgeBaseFilesRequest struct { + value *LegacyKnowledgeBaseFilesRequest + isSet bool +} + +func (v NullableLegacyKnowledgeBaseFilesRequest) Get() *LegacyKnowledgeBaseFilesRequest { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseFilesRequest) Set(val *LegacyKnowledgeBaseFilesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseFilesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseFilesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseFilesRequest(val *LegacyKnowledgeBaseFilesRequest) *NullableLegacyKnowledgeBaseFilesRequest { + return &NullableLegacyKnowledgeBaseFilesRequest{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseFilesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseFilesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_files_response.go b/go/futureagi/model_legacy_knowledge_base_files_response.go new file mode 100644 index 0000000..2338558 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_files_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseFilesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseFilesResponse{} + +// LegacyKnowledgeBaseFilesResponse struct for LegacyKnowledgeBaseFilesResponse +type LegacyKnowledgeBaseFilesResponse struct { + Status bool `json:"status"` + Result LegacyKnowledgeBaseFilesResult `json:"result"` +} + +type _LegacyKnowledgeBaseFilesResponse LegacyKnowledgeBaseFilesResponse + +// NewLegacyKnowledgeBaseFilesResponse instantiates a new LegacyKnowledgeBaseFilesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseFilesResponse(status bool, result LegacyKnowledgeBaseFilesResult) *LegacyKnowledgeBaseFilesResponse { + this := LegacyKnowledgeBaseFilesResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewLegacyKnowledgeBaseFilesResponseWithDefaults instantiates a new LegacyKnowledgeBaseFilesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseFilesResponseWithDefaults() *LegacyKnowledgeBaseFilesResponse { + this := LegacyKnowledgeBaseFilesResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseFilesResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseFilesResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *LegacyKnowledgeBaseFilesResponse) GetResult() LegacyKnowledgeBaseFilesResult { + if o == nil { + var ret LegacyKnowledgeBaseFilesResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesResponse) GetResultOk() (*LegacyKnowledgeBaseFilesResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *LegacyKnowledgeBaseFilesResponse) SetResult(v LegacyKnowledgeBaseFilesResult) { + o.Result = v +} + +func (o LegacyKnowledgeBaseFilesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseFilesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseFilesResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseFilesResponse := _LegacyKnowledgeBaseFilesResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseFilesResponse) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseFilesResponse(varLegacyKnowledgeBaseFilesResponse) + + return err +} + +type NullableLegacyKnowledgeBaseFilesResponse struct { + value *LegacyKnowledgeBaseFilesResponse + isSet bool +} + +func (v NullableLegacyKnowledgeBaseFilesResponse) Get() *LegacyKnowledgeBaseFilesResponse { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseFilesResponse) Set(val *LegacyKnowledgeBaseFilesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseFilesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseFilesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseFilesResponse(val *LegacyKnowledgeBaseFilesResponse) *NullableLegacyKnowledgeBaseFilesResponse { + return &NullableLegacyKnowledgeBaseFilesResponse{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseFilesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseFilesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_files_result.go b/go/futureagi/model_legacy_knowledge_base_files_result.go new file mode 100644 index 0000000..d730c99 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_files_result.go @@ -0,0 +1,270 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the LegacyKnowledgeBaseFilesResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseFilesResult{} + +// LegacyKnowledgeBaseFilesResult struct for LegacyKnowledgeBaseFilesResult +type LegacyKnowledgeBaseFilesResult struct { + TableData []LegacyKnowledgeBaseFileRow `json:"table_data"` + LastUpdated time.Time `json:"last_updated"` + Status string `json:"status"` + StatusCount int32 `json:"status_count"` + TotalRows int32 `json:"total_rows"` +} + +type _LegacyKnowledgeBaseFilesResult LegacyKnowledgeBaseFilesResult + +// NewLegacyKnowledgeBaseFilesResult instantiates a new LegacyKnowledgeBaseFilesResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseFilesResult(tableData []LegacyKnowledgeBaseFileRow, lastUpdated time.Time, status string, statusCount int32, totalRows int32) *LegacyKnowledgeBaseFilesResult { + this := LegacyKnowledgeBaseFilesResult{} + this.TableData = tableData + this.LastUpdated = lastUpdated + this.Status = status + this.StatusCount = statusCount + this.TotalRows = totalRows + return &this +} + +// NewLegacyKnowledgeBaseFilesResultWithDefaults instantiates a new LegacyKnowledgeBaseFilesResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseFilesResultWithDefaults() *LegacyKnowledgeBaseFilesResult { + this := LegacyKnowledgeBaseFilesResult{} + return &this +} + +// GetTableData returns the TableData field value +func (o *LegacyKnowledgeBaseFilesResult) GetTableData() []LegacyKnowledgeBaseFileRow { + if o == nil { + var ret []LegacyKnowledgeBaseFileRow + return ret + } + + return o.TableData +} + +// GetTableDataOk returns a tuple with the TableData field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesResult) GetTableDataOk() ([]LegacyKnowledgeBaseFileRow, bool) { + if o == nil { + return nil, false + } + return o.TableData, true +} + +// SetTableData sets field value +func (o *LegacyKnowledgeBaseFilesResult) SetTableData(v []LegacyKnowledgeBaseFileRow) { + o.TableData = v +} + +// GetLastUpdated returns the LastUpdated field value +func (o *LegacyKnowledgeBaseFilesResult) GetLastUpdated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastUpdated +} + +// GetLastUpdatedOk returns a tuple with the LastUpdated field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesResult) GetLastUpdatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastUpdated, true +} + +// SetLastUpdated sets field value +func (o *LegacyKnowledgeBaseFilesResult) SetLastUpdated(v time.Time) { + o.LastUpdated = v +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseFilesResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseFilesResult) SetStatus(v string) { + o.Status = v +} + +// GetStatusCount returns the StatusCount field value +func (o *LegacyKnowledgeBaseFilesResult) GetStatusCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.StatusCount +} + +// GetStatusCountOk returns a tuple with the StatusCount field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesResult) GetStatusCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.StatusCount, true +} + +// SetStatusCount sets field value +func (o *LegacyKnowledgeBaseFilesResult) SetStatusCount(v int32) { + o.StatusCount = v +} + +// GetTotalRows returns the TotalRows field value +func (o *LegacyKnowledgeBaseFilesResult) GetTotalRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalRows +} + +// GetTotalRowsOk returns a tuple with the TotalRows field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseFilesResult) GetTotalRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalRows, true +} + +// SetTotalRows sets field value +func (o *LegacyKnowledgeBaseFilesResult) SetTotalRows(v int32) { + o.TotalRows = v +} + +func (o LegacyKnowledgeBaseFilesResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseFilesResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["table_data"] = o.TableData + toSerialize["last_updated"] = o.LastUpdated + toSerialize["status"] = o.Status + toSerialize["status_count"] = o.StatusCount + toSerialize["total_rows"] = o.TotalRows + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseFilesResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "table_data", + "last_updated", + "status", + "status_count", + "total_rows", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseFilesResult := _LegacyKnowledgeBaseFilesResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseFilesResult) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseFilesResult(varLegacyKnowledgeBaseFilesResult) + + return err +} + +type NullableLegacyKnowledgeBaseFilesResult struct { + value *LegacyKnowledgeBaseFilesResult + isSet bool +} + +func (v NullableLegacyKnowledgeBaseFilesResult) Get() *LegacyKnowledgeBaseFilesResult { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseFilesResult) Set(val *LegacyKnowledgeBaseFilesResult) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseFilesResult) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseFilesResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseFilesResult(val *LegacyKnowledgeBaseFilesResult) *NullableLegacyKnowledgeBaseFilesResult { + return &NullableLegacyKnowledgeBaseFilesResult{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseFilesResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseFilesResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_list_response.go b/go/futureagi/model_legacy_knowledge_base_list_response.go new file mode 100644 index 0000000..305bcf6 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseListResponse{} + +// LegacyKnowledgeBaseListResponse struct for LegacyKnowledgeBaseListResponse +type LegacyKnowledgeBaseListResponse struct { + Status bool `json:"status"` + Result LegacyKnowledgeBaseListResult `json:"result"` +} + +type _LegacyKnowledgeBaseListResponse LegacyKnowledgeBaseListResponse + +// NewLegacyKnowledgeBaseListResponse instantiates a new LegacyKnowledgeBaseListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseListResponse(status bool, result LegacyKnowledgeBaseListResult) *LegacyKnowledgeBaseListResponse { + this := LegacyKnowledgeBaseListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewLegacyKnowledgeBaseListResponseWithDefaults instantiates a new LegacyKnowledgeBaseListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseListResponseWithDefaults() *LegacyKnowledgeBaseListResponse { + this := LegacyKnowledgeBaseListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *LegacyKnowledgeBaseListResponse) GetResult() LegacyKnowledgeBaseListResult { + if o == nil { + var ret LegacyKnowledgeBaseListResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseListResponse) GetResultOk() (*LegacyKnowledgeBaseListResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *LegacyKnowledgeBaseListResponse) SetResult(v LegacyKnowledgeBaseListResult) { + o.Result = v +} + +func (o LegacyKnowledgeBaseListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseListResponse := _LegacyKnowledgeBaseListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseListResponse) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseListResponse(varLegacyKnowledgeBaseListResponse) + + return err +} + +type NullableLegacyKnowledgeBaseListResponse struct { + value *LegacyKnowledgeBaseListResponse + isSet bool +} + +func (v NullableLegacyKnowledgeBaseListResponse) Get() *LegacyKnowledgeBaseListResponse { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseListResponse) Set(val *LegacyKnowledgeBaseListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseListResponse(val *LegacyKnowledgeBaseListResponse) *NullableLegacyKnowledgeBaseListResponse { + return &NullableLegacyKnowledgeBaseListResponse{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_list_result.go b/go/futureagi/model_legacy_knowledge_base_list_result.go new file mode 100644 index 0000000..1322f02 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_list_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseListResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseListResult{} + +// LegacyKnowledgeBaseListResult struct for LegacyKnowledgeBaseListResult +type LegacyKnowledgeBaseListResult struct { + TableData []LegacyKnowledgeBaseOption `json:"table_data"` +} + +type _LegacyKnowledgeBaseListResult LegacyKnowledgeBaseListResult + +// NewLegacyKnowledgeBaseListResult instantiates a new LegacyKnowledgeBaseListResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseListResult(tableData []LegacyKnowledgeBaseOption) *LegacyKnowledgeBaseListResult { + this := LegacyKnowledgeBaseListResult{} + this.TableData = tableData + return &this +} + +// NewLegacyKnowledgeBaseListResultWithDefaults instantiates a new LegacyKnowledgeBaseListResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseListResultWithDefaults() *LegacyKnowledgeBaseListResult { + this := LegacyKnowledgeBaseListResult{} + return &this +} + +// GetTableData returns the TableData field value +func (o *LegacyKnowledgeBaseListResult) GetTableData() []LegacyKnowledgeBaseOption { + if o == nil { + var ret []LegacyKnowledgeBaseOption + return ret + } + + return o.TableData +} + +// GetTableDataOk returns a tuple with the TableData field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseListResult) GetTableDataOk() ([]LegacyKnowledgeBaseOption, bool) { + if o == nil { + return nil, false + } + return o.TableData, true +} + +// SetTableData sets field value +func (o *LegacyKnowledgeBaseListResult) SetTableData(v []LegacyKnowledgeBaseOption) { + o.TableData = v +} + +func (o LegacyKnowledgeBaseListResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseListResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["table_data"] = o.TableData + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseListResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "table_data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseListResult := _LegacyKnowledgeBaseListResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseListResult) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseListResult(varLegacyKnowledgeBaseListResult) + + return err +} + +type NullableLegacyKnowledgeBaseListResult struct { + value *LegacyKnowledgeBaseListResult + isSet bool +} + +func (v NullableLegacyKnowledgeBaseListResult) Get() *LegacyKnowledgeBaseListResult { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseListResult) Set(val *LegacyKnowledgeBaseListResult) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseListResult) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseListResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseListResult(val *LegacyKnowledgeBaseListResult) *NullableLegacyKnowledgeBaseListResult { + return &NullableLegacyKnowledgeBaseListResult{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseListResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseListResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_mutation_request.go b/go/futureagi/model_legacy_knowledge_base_mutation_request.go new file mode 100644 index 0000000..7bf73ed --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_mutation_request.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the LegacyKnowledgeBaseMutationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseMutationRequest{} + +// LegacyKnowledgeBaseMutationRequest struct for LegacyKnowledgeBaseMutationRequest +type LegacyKnowledgeBaseMutationRequest struct { + Name *string `json:"name,omitempty"` + KbId *string `json:"kb_id,omitempty"` + Files []string `json:"files,omitempty"` +} + +// NewLegacyKnowledgeBaseMutationRequest instantiates a new LegacyKnowledgeBaseMutationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseMutationRequest() *LegacyKnowledgeBaseMutationRequest { + this := LegacyKnowledgeBaseMutationRequest{} + return &this +} + +// NewLegacyKnowledgeBaseMutationRequestWithDefaults instantiates a new LegacyKnowledgeBaseMutationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseMutationRequestWithDefaults() *LegacyKnowledgeBaseMutationRequest { + this := LegacyKnowledgeBaseMutationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseMutationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseMutationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LegacyKnowledgeBaseMutationRequest) SetName(v string) { + o.Name = &v +} + +// GetKbId returns the KbId field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseMutationRequest) GetKbId() string { + if o == nil || IsNil(o.KbId) { + var ret string + return ret + } + return *o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationRequest) GetKbIdOk() (*string, bool) { + if o == nil || IsNil(o.KbId) { + return nil, false + } + return o.KbId, true +} + +// HasKbId returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseMutationRequest) HasKbId() bool { + if o != nil && !IsNil(o.KbId) { + return true + } + + return false +} + +// SetKbId gets a reference to the given string and assigns it to the KbId field. +func (o *LegacyKnowledgeBaseMutationRequest) SetKbId(v string) { + o.KbId = &v +} + +// GetFiles returns the Files field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseMutationRequest) GetFiles() []string { + if o == nil || IsNil(o.Files) { + var ret []string + return ret + } + return o.Files +} + +// GetFilesOk returns a tuple with the Files field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationRequest) GetFilesOk() ([]string, bool) { + if o == nil || IsNil(o.Files) { + return nil, false + } + return o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseMutationRequest) HasFiles() bool { + if o != nil && !IsNil(o.Files) { + return true + } + + return false +} + +// SetFiles gets a reference to the given []string and assigns it to the Files field. +func (o *LegacyKnowledgeBaseMutationRequest) SetFiles(v []string) { + o.Files = v +} + +func (o LegacyKnowledgeBaseMutationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseMutationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.KbId) { + toSerialize["kb_id"] = o.KbId + } + if !IsNil(o.Files) { + toSerialize["files"] = o.Files + } + return toSerialize, nil +} + +type NullableLegacyKnowledgeBaseMutationRequest struct { + value *LegacyKnowledgeBaseMutationRequest + isSet bool +} + +func (v NullableLegacyKnowledgeBaseMutationRequest) Get() *LegacyKnowledgeBaseMutationRequest { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseMutationRequest) Set(val *LegacyKnowledgeBaseMutationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseMutationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseMutationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseMutationRequest(val *LegacyKnowledgeBaseMutationRequest) *NullableLegacyKnowledgeBaseMutationRequest { + return &NullableLegacyKnowledgeBaseMutationRequest{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseMutationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseMutationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_mutation_response.go b/go/futureagi/model_legacy_knowledge_base_mutation_response.go new file mode 100644 index 0000000..e1e5cb6 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_mutation_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseMutationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseMutationResponse{} + +// LegacyKnowledgeBaseMutationResponse struct for LegacyKnowledgeBaseMutationResponse +type LegacyKnowledgeBaseMutationResponse struct { + Status bool `json:"status"` + Result LegacyKnowledgeBaseMutationResult `json:"result"` +} + +type _LegacyKnowledgeBaseMutationResponse LegacyKnowledgeBaseMutationResponse + +// NewLegacyKnowledgeBaseMutationResponse instantiates a new LegacyKnowledgeBaseMutationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseMutationResponse(status bool, result LegacyKnowledgeBaseMutationResult) *LegacyKnowledgeBaseMutationResponse { + this := LegacyKnowledgeBaseMutationResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewLegacyKnowledgeBaseMutationResponseWithDefaults instantiates a new LegacyKnowledgeBaseMutationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseMutationResponseWithDefaults() *LegacyKnowledgeBaseMutationResponse { + this := LegacyKnowledgeBaseMutationResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseMutationResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseMutationResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *LegacyKnowledgeBaseMutationResponse) GetResult() LegacyKnowledgeBaseMutationResult { + if o == nil { + var ret LegacyKnowledgeBaseMutationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResponse) GetResultOk() (*LegacyKnowledgeBaseMutationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *LegacyKnowledgeBaseMutationResponse) SetResult(v LegacyKnowledgeBaseMutationResult) { + o.Result = v +} + +func (o LegacyKnowledgeBaseMutationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseMutationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseMutationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseMutationResponse := _LegacyKnowledgeBaseMutationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseMutationResponse) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseMutationResponse(varLegacyKnowledgeBaseMutationResponse) + + return err +} + +type NullableLegacyKnowledgeBaseMutationResponse struct { + value *LegacyKnowledgeBaseMutationResponse + isSet bool +} + +func (v NullableLegacyKnowledgeBaseMutationResponse) Get() *LegacyKnowledgeBaseMutationResponse { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseMutationResponse) Set(val *LegacyKnowledgeBaseMutationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseMutationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseMutationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseMutationResponse(val *LegacyKnowledgeBaseMutationResponse) *NullableLegacyKnowledgeBaseMutationResponse { + return &NullableLegacyKnowledgeBaseMutationResponse{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseMutationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseMutationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_mutation_result.go b/go/futureagi/model_legacy_knowledge_base_mutation_result.go new file mode 100644 index 0000000..43f1059 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_mutation_result.go @@ -0,0 +1,358 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the LegacyKnowledgeBaseMutationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseMutationResult{} + +// LegacyKnowledgeBaseMutationResult struct for LegacyKnowledgeBaseMutationResult +type LegacyKnowledgeBaseMutationResult struct { + Id string `json:"id"` + Name string `json:"name"` + Organization string `json:"organization"` + Status string `json:"status"` + Files []string `json:"files"` + UpdatedAt time.Time `json:"updated_at"` + CreatedBy NullableString `json:"created_by"` + LastError NullableString `json:"last_error"` +} + +type _LegacyKnowledgeBaseMutationResult LegacyKnowledgeBaseMutationResult + +// NewLegacyKnowledgeBaseMutationResult instantiates a new LegacyKnowledgeBaseMutationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseMutationResult(id string, name string, organization string, status string, files []string, updatedAt time.Time, createdBy NullableString, lastError NullableString) *LegacyKnowledgeBaseMutationResult { + this := LegacyKnowledgeBaseMutationResult{} + this.Id = id + this.Name = name + this.Organization = organization + this.Status = status + this.Files = files + this.UpdatedAt = updatedAt + this.CreatedBy = createdBy + this.LastError = lastError + return &this +} + +// NewLegacyKnowledgeBaseMutationResultWithDefaults instantiates a new LegacyKnowledgeBaseMutationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseMutationResultWithDefaults() *LegacyKnowledgeBaseMutationResult { + this := LegacyKnowledgeBaseMutationResult{} + return &this +} + +// GetId returns the Id field value +func (o *LegacyKnowledgeBaseMutationResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *LegacyKnowledgeBaseMutationResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetName(v string) { + o.Name = v +} + +// GetOrganization returns the Organization field value +func (o *LegacyKnowledgeBaseMutationResult) GetOrganization() string { + if o == nil { + var ret string + return ret + } + + return o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResult) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Organization, true +} + +// SetOrganization sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetOrganization(v string) { + o.Organization = v +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseMutationResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetStatus(v string) { + o.Status = v +} + +// GetFiles returns the Files field value +func (o *LegacyKnowledgeBaseMutationResult) GetFiles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Files +} + +// GetFilesOk returns a tuple with the Files field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResult) GetFilesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Files, true +} + +// SetFiles sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetFiles(v []string) { + o.Files = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *LegacyKnowledgeBaseMutationResult) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseMutationResult) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *LegacyKnowledgeBaseMutationResult) GetCreatedBy() string { + if o == nil || o.CreatedBy.Get() == nil { + var ret string + return ret + } + + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LegacyKnowledgeBaseMutationResult) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// SetCreatedBy sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// GetLastError returns the LastError field value +// If the value is explicit nil, the zero value for string will be returned +func (o *LegacyKnowledgeBaseMutationResult) GetLastError() string { + if o == nil || o.LastError.Get() == nil { + var ret string + return ret + } + + return *o.LastError.Get() +} + +// GetLastErrorOk returns a tuple with the LastError field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LegacyKnowledgeBaseMutationResult) GetLastErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastError.Get(), o.LastError.IsSet() +} + +// SetLastError sets field value +func (o *LegacyKnowledgeBaseMutationResult) SetLastError(v string) { + o.LastError.Set(&v) +} + +func (o LegacyKnowledgeBaseMutationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseMutationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["organization"] = o.Organization + toSerialize["status"] = o.Status + toSerialize["files"] = o.Files + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["created_by"] = o.CreatedBy.Get() + toSerialize["last_error"] = o.LastError.Get() + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseMutationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "organization", + "status", + "files", + "updated_at", + "created_by", + "last_error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseMutationResult := _LegacyKnowledgeBaseMutationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseMutationResult) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseMutationResult(varLegacyKnowledgeBaseMutationResult) + + return err +} + +type NullableLegacyKnowledgeBaseMutationResult struct { + value *LegacyKnowledgeBaseMutationResult + isSet bool +} + +func (v NullableLegacyKnowledgeBaseMutationResult) Get() *LegacyKnowledgeBaseMutationResult { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseMutationResult) Set(val *LegacyKnowledgeBaseMutationResult) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseMutationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseMutationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseMutationResult(val *LegacyKnowledgeBaseMutationResult) *NullableLegacyKnowledgeBaseMutationResult { + return &NullableLegacyKnowledgeBaseMutationResult{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseMutationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseMutationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_option.go b/go/futureagi/model_legacy_knowledge_base_option.go new file mode 100644 index 0000000..ad0c620 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_option.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseOption type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseOption{} + +// LegacyKnowledgeBaseOption struct for LegacyKnowledgeBaseOption +type LegacyKnowledgeBaseOption struct { + Id string `json:"id"` + Name string `json:"name"` +} + +type _LegacyKnowledgeBaseOption LegacyKnowledgeBaseOption + +// NewLegacyKnowledgeBaseOption instantiates a new LegacyKnowledgeBaseOption object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseOption(id string, name string) *LegacyKnowledgeBaseOption { + this := LegacyKnowledgeBaseOption{} + this.Id = id + this.Name = name + return &this +} + +// NewLegacyKnowledgeBaseOptionWithDefaults instantiates a new LegacyKnowledgeBaseOption object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseOptionWithDefaults() *LegacyKnowledgeBaseOption { + this := LegacyKnowledgeBaseOption{} + return &this +} + +// GetId returns the Id field value +func (o *LegacyKnowledgeBaseOption) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseOption) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *LegacyKnowledgeBaseOption) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *LegacyKnowledgeBaseOption) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseOption) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LegacyKnowledgeBaseOption) SetName(v string) { + o.Name = v +} + +func (o LegacyKnowledgeBaseOption) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseOption) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseOption) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseOption := _LegacyKnowledgeBaseOption{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseOption) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseOption(varLegacyKnowledgeBaseOption) + + return err +} + +type NullableLegacyKnowledgeBaseOption struct { + value *LegacyKnowledgeBaseOption + isSet bool +} + +func (v NullableLegacyKnowledgeBaseOption) Get() *LegacyKnowledgeBaseOption { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseOption) Set(val *LegacyKnowledgeBaseOption) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseOption) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseOption) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseOption(val *LegacyKnowledgeBaseOption) *NullableLegacyKnowledgeBaseOption { + return &NullableLegacyKnowledgeBaseOption{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseOption) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseOption) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_sdk_code_response.go b/go/futureagi/model_legacy_knowledge_base_sdk_code_response.go new file mode 100644 index 0000000..828032c --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_sdk_code_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseSdkCodeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseSdkCodeResponse{} + +// LegacyKnowledgeBaseSdkCodeResponse struct for LegacyKnowledgeBaseSdkCodeResponse +type LegacyKnowledgeBaseSdkCodeResponse struct { + Status bool `json:"status"` + Result LegacyKnowledgeBaseSdkCodeResult `json:"result"` +} + +type _LegacyKnowledgeBaseSdkCodeResponse LegacyKnowledgeBaseSdkCodeResponse + +// NewLegacyKnowledgeBaseSdkCodeResponse instantiates a new LegacyKnowledgeBaseSdkCodeResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseSdkCodeResponse(status bool, result LegacyKnowledgeBaseSdkCodeResult) *LegacyKnowledgeBaseSdkCodeResponse { + this := LegacyKnowledgeBaseSdkCodeResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewLegacyKnowledgeBaseSdkCodeResponseWithDefaults instantiates a new LegacyKnowledgeBaseSdkCodeResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseSdkCodeResponseWithDefaults() *LegacyKnowledgeBaseSdkCodeResponse { + this := LegacyKnowledgeBaseSdkCodeResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseSdkCodeResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseSdkCodeResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseSdkCodeResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *LegacyKnowledgeBaseSdkCodeResponse) GetResult() LegacyKnowledgeBaseSdkCodeResult { + if o == nil { + var ret LegacyKnowledgeBaseSdkCodeResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseSdkCodeResponse) GetResultOk() (*LegacyKnowledgeBaseSdkCodeResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *LegacyKnowledgeBaseSdkCodeResponse) SetResult(v LegacyKnowledgeBaseSdkCodeResult) { + o.Result = v +} + +func (o LegacyKnowledgeBaseSdkCodeResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseSdkCodeResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseSdkCodeResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseSdkCodeResponse := _LegacyKnowledgeBaseSdkCodeResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseSdkCodeResponse) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseSdkCodeResponse(varLegacyKnowledgeBaseSdkCodeResponse) + + return err +} + +type NullableLegacyKnowledgeBaseSdkCodeResponse struct { + value *LegacyKnowledgeBaseSdkCodeResponse + isSet bool +} + +func (v NullableLegacyKnowledgeBaseSdkCodeResponse) Get() *LegacyKnowledgeBaseSdkCodeResponse { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseSdkCodeResponse) Set(val *LegacyKnowledgeBaseSdkCodeResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseSdkCodeResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseSdkCodeResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseSdkCodeResponse(val *LegacyKnowledgeBaseSdkCodeResponse) *NullableLegacyKnowledgeBaseSdkCodeResponse { + return &NullableLegacyKnowledgeBaseSdkCodeResponse{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseSdkCodeResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseSdkCodeResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_sdk_code_result.go b/go/futureagi/model_legacy_knowledge_base_sdk_code_result.go new file mode 100644 index 0000000..7d91020 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_sdk_code_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseSdkCodeResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseSdkCodeResult{} + +// LegacyKnowledgeBaseSdkCodeResult struct for LegacyKnowledgeBaseSdkCodeResult +type LegacyKnowledgeBaseSdkCodeResult struct { + Code string `json:"code"` +} + +type _LegacyKnowledgeBaseSdkCodeResult LegacyKnowledgeBaseSdkCodeResult + +// NewLegacyKnowledgeBaseSdkCodeResult instantiates a new LegacyKnowledgeBaseSdkCodeResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseSdkCodeResult(code string) *LegacyKnowledgeBaseSdkCodeResult { + this := LegacyKnowledgeBaseSdkCodeResult{} + this.Code = code + return &this +} + +// NewLegacyKnowledgeBaseSdkCodeResultWithDefaults instantiates a new LegacyKnowledgeBaseSdkCodeResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseSdkCodeResultWithDefaults() *LegacyKnowledgeBaseSdkCodeResult { + this := LegacyKnowledgeBaseSdkCodeResult{} + return &this +} + +// GetCode returns the Code field value +func (o *LegacyKnowledgeBaseSdkCodeResult) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseSdkCodeResult) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *LegacyKnowledgeBaseSdkCodeResult) SetCode(v string) { + o.Code = v +} + +func (o LegacyKnowledgeBaseSdkCodeResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseSdkCodeResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseSdkCodeResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseSdkCodeResult := _LegacyKnowledgeBaseSdkCodeResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseSdkCodeResult) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseSdkCodeResult(varLegacyKnowledgeBaseSdkCodeResult) + + return err +} + +type NullableLegacyKnowledgeBaseSdkCodeResult struct { + value *LegacyKnowledgeBaseSdkCodeResult + isSet bool +} + +func (v NullableLegacyKnowledgeBaseSdkCodeResult) Get() *LegacyKnowledgeBaseSdkCodeResult { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseSdkCodeResult) Set(val *LegacyKnowledgeBaseSdkCodeResult) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseSdkCodeResult) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseSdkCodeResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseSdkCodeResult(val *LegacyKnowledgeBaseSdkCodeResult) *NullableLegacyKnowledgeBaseSdkCodeResult { + return &NullableLegacyKnowledgeBaseSdkCodeResult{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseSdkCodeResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseSdkCodeResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_table_column.go b/go/futureagi/model_legacy_knowledge_base_table_column.go new file mode 100644 index 0000000..cfc2c01 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_table_column.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseTableColumn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseTableColumn{} + +// LegacyKnowledgeBaseTableColumn struct for LegacyKnowledgeBaseTableColumn +type LegacyKnowledgeBaseTableColumn struct { + Id string `json:"id"` + Name string `json:"name"` +} + +type _LegacyKnowledgeBaseTableColumn LegacyKnowledgeBaseTableColumn + +// NewLegacyKnowledgeBaseTableColumn instantiates a new LegacyKnowledgeBaseTableColumn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseTableColumn(id string, name string) *LegacyKnowledgeBaseTableColumn { + this := LegacyKnowledgeBaseTableColumn{} + this.Id = id + this.Name = name + return &this +} + +// NewLegacyKnowledgeBaseTableColumnWithDefaults instantiates a new LegacyKnowledgeBaseTableColumn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseTableColumnWithDefaults() *LegacyKnowledgeBaseTableColumn { + this := LegacyKnowledgeBaseTableColumn{} + return &this +} + +// GetId returns the Id field value +func (o *LegacyKnowledgeBaseTableColumn) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableColumn) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *LegacyKnowledgeBaseTableColumn) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *LegacyKnowledgeBaseTableColumn) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableColumn) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LegacyKnowledgeBaseTableColumn) SetName(v string) { + o.Name = v +} + +func (o LegacyKnowledgeBaseTableColumn) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseTableColumn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseTableColumn) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseTableColumn := _LegacyKnowledgeBaseTableColumn{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseTableColumn) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseTableColumn(varLegacyKnowledgeBaseTableColumn) + + return err +} + +type NullableLegacyKnowledgeBaseTableColumn struct { + value *LegacyKnowledgeBaseTableColumn + isSet bool +} + +func (v NullableLegacyKnowledgeBaseTableColumn) Get() *LegacyKnowledgeBaseTableColumn { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseTableColumn) Set(val *LegacyKnowledgeBaseTableColumn) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseTableColumn) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseTableColumn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseTableColumn(val *LegacyKnowledgeBaseTableColumn) *NullableLegacyKnowledgeBaseTableColumn { + return &NullableLegacyKnowledgeBaseTableColumn{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseTableColumn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseTableColumn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_table_response.go b/go/futureagi/model_legacy_knowledge_base_table_response.go new file mode 100644 index 0000000..6aab11e --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_table_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LegacyKnowledgeBaseTableResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseTableResponse{} + +// LegacyKnowledgeBaseTableResponse struct for LegacyKnowledgeBaseTableResponse +type LegacyKnowledgeBaseTableResponse struct { + Status bool `json:"status"` + Result LegacyKnowledgeBaseTableResult `json:"result"` +} + +type _LegacyKnowledgeBaseTableResponse LegacyKnowledgeBaseTableResponse + +// NewLegacyKnowledgeBaseTableResponse instantiates a new LegacyKnowledgeBaseTableResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseTableResponse(status bool, result LegacyKnowledgeBaseTableResult) *LegacyKnowledgeBaseTableResponse { + this := LegacyKnowledgeBaseTableResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewLegacyKnowledgeBaseTableResponseWithDefaults instantiates a new LegacyKnowledgeBaseTableResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseTableResponseWithDefaults() *LegacyKnowledgeBaseTableResponse { + this := LegacyKnowledgeBaseTableResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseTableResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseTableResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *LegacyKnowledgeBaseTableResponse) GetResult() LegacyKnowledgeBaseTableResult { + if o == nil { + var ret LegacyKnowledgeBaseTableResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableResponse) GetResultOk() (*LegacyKnowledgeBaseTableResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *LegacyKnowledgeBaseTableResponse) SetResult(v LegacyKnowledgeBaseTableResult) { + o.Result = v +} + +func (o LegacyKnowledgeBaseTableResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseTableResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseTableResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseTableResponse := _LegacyKnowledgeBaseTableResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseTableResponse) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseTableResponse(varLegacyKnowledgeBaseTableResponse) + + return err +} + +type NullableLegacyKnowledgeBaseTableResponse struct { + value *LegacyKnowledgeBaseTableResponse + isSet bool +} + +func (v NullableLegacyKnowledgeBaseTableResponse) Get() *LegacyKnowledgeBaseTableResponse { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseTableResponse) Set(val *LegacyKnowledgeBaseTableResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseTableResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseTableResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseTableResponse(val *LegacyKnowledgeBaseTableResponse) *NullableLegacyKnowledgeBaseTableResponse { + return &NullableLegacyKnowledgeBaseTableResponse{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseTableResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseTableResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_table_result.go b/go/futureagi/model_legacy_knowledge_base_table_result.go new file mode 100644 index 0000000..ec26b5c --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_table_result.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the LegacyKnowledgeBaseTableResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseTableResult{} + +// LegacyKnowledgeBaseTableResult struct for LegacyKnowledgeBaseTableResult +type LegacyKnowledgeBaseTableResult struct { + ColumnConfig []LegacyKnowledgeBaseTableColumn `json:"column_config,omitempty"` + TableData []LegacyKnowledgeBaseTableRow `json:"table_data,omitempty"` + TotalRows *int32 `json:"total_rows,omitempty"` +} + +// NewLegacyKnowledgeBaseTableResult instantiates a new LegacyKnowledgeBaseTableResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseTableResult() *LegacyKnowledgeBaseTableResult { + this := LegacyKnowledgeBaseTableResult{} + return &this +} + +// NewLegacyKnowledgeBaseTableResultWithDefaults instantiates a new LegacyKnowledgeBaseTableResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseTableResultWithDefaults() *LegacyKnowledgeBaseTableResult { + this := LegacyKnowledgeBaseTableResult{} + return &this +} + +// GetColumnConfig returns the ColumnConfig field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseTableResult) GetColumnConfig() []LegacyKnowledgeBaseTableColumn { + if o == nil || IsNil(o.ColumnConfig) { + var ret []LegacyKnowledgeBaseTableColumn + return ret + } + return o.ColumnConfig +} + +// GetColumnConfigOk returns a tuple with the ColumnConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableResult) GetColumnConfigOk() ([]LegacyKnowledgeBaseTableColumn, bool) { + if o == nil || IsNil(o.ColumnConfig) { + return nil, false + } + return o.ColumnConfig, true +} + +// HasColumnConfig returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseTableResult) HasColumnConfig() bool { + if o != nil && !IsNil(o.ColumnConfig) { + return true + } + + return false +} + +// SetColumnConfig gets a reference to the given []LegacyKnowledgeBaseTableColumn and assigns it to the ColumnConfig field. +func (o *LegacyKnowledgeBaseTableResult) SetColumnConfig(v []LegacyKnowledgeBaseTableColumn) { + o.ColumnConfig = v +} + +// GetTableData returns the TableData field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseTableResult) GetTableData() []LegacyKnowledgeBaseTableRow { + if o == nil || IsNil(o.TableData) { + var ret []LegacyKnowledgeBaseTableRow + return ret + } + return o.TableData +} + +// GetTableDataOk returns a tuple with the TableData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableResult) GetTableDataOk() ([]LegacyKnowledgeBaseTableRow, bool) { + if o == nil || IsNil(o.TableData) { + return nil, false + } + return o.TableData, true +} + +// HasTableData returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseTableResult) HasTableData() bool { + if o != nil && !IsNil(o.TableData) { + return true + } + + return false +} + +// SetTableData gets a reference to the given []LegacyKnowledgeBaseTableRow and assigns it to the TableData field. +func (o *LegacyKnowledgeBaseTableResult) SetTableData(v []LegacyKnowledgeBaseTableRow) { + o.TableData = v +} + +// GetTotalRows returns the TotalRows field value if set, zero value otherwise. +func (o *LegacyKnowledgeBaseTableResult) GetTotalRows() int32 { + if o == nil || IsNil(o.TotalRows) { + var ret int32 + return ret + } + return *o.TotalRows +} + +// GetTotalRowsOk returns a tuple with the TotalRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableResult) GetTotalRowsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalRows) { + return nil, false + } + return o.TotalRows, true +} + +// HasTotalRows returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseTableResult) HasTotalRows() bool { + if o != nil && !IsNil(o.TotalRows) { + return true + } + + return false +} + +// SetTotalRows gets a reference to the given int32 and assigns it to the TotalRows field. +func (o *LegacyKnowledgeBaseTableResult) SetTotalRows(v int32) { + o.TotalRows = &v +} + +func (o LegacyKnowledgeBaseTableResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseTableResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ColumnConfig) { + toSerialize["column_config"] = o.ColumnConfig + } + if !IsNil(o.TableData) { + toSerialize["table_data"] = o.TableData + } + if !IsNil(o.TotalRows) { + toSerialize["total_rows"] = o.TotalRows + } + return toSerialize, nil +} + +type NullableLegacyKnowledgeBaseTableResult struct { + value *LegacyKnowledgeBaseTableResult + isSet bool +} + +func (v NullableLegacyKnowledgeBaseTableResult) Get() *LegacyKnowledgeBaseTableResult { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseTableResult) Set(val *LegacyKnowledgeBaseTableResult) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseTableResult) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseTableResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseTableResult(val *LegacyKnowledgeBaseTableResult) *NullableLegacyKnowledgeBaseTableResult { + return &NullableLegacyKnowledgeBaseTableResult{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseTableResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseTableResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_legacy_knowledge_base_table_row.go b/go/futureagi/model_legacy_knowledge_base_table_row.go new file mode 100644 index 0000000..5829b80 --- /dev/null +++ b/go/futureagi/model_legacy_knowledge_base_table_row.go @@ -0,0 +1,347 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the LegacyKnowledgeBaseTableRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyKnowledgeBaseTableRow{} + +// LegacyKnowledgeBaseTableRow struct for LegacyKnowledgeBaseTableRow +type LegacyKnowledgeBaseTableRow struct { + Id string `json:"id"` + Name string `json:"name"` + FilesUploaded int32 `json:"files_uploaded"` + Status string `json:"status"` + Error NullableString `json:"error,omitempty"` + UpdatedAt time.Time `json:"updated_at"` + CreatedBy NullableString `json:"created_by"` +} + +type _LegacyKnowledgeBaseTableRow LegacyKnowledgeBaseTableRow + +// NewLegacyKnowledgeBaseTableRow instantiates a new LegacyKnowledgeBaseTableRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyKnowledgeBaseTableRow(id string, name string, filesUploaded int32, status string, updatedAt time.Time, createdBy NullableString) *LegacyKnowledgeBaseTableRow { + this := LegacyKnowledgeBaseTableRow{} + this.Id = id + this.Name = name + this.FilesUploaded = filesUploaded + this.Status = status + this.UpdatedAt = updatedAt + this.CreatedBy = createdBy + return &this +} + +// NewLegacyKnowledgeBaseTableRowWithDefaults instantiates a new LegacyKnowledgeBaseTableRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyKnowledgeBaseTableRowWithDefaults() *LegacyKnowledgeBaseTableRow { + this := LegacyKnowledgeBaseTableRow{} + return &this +} + +// GetId returns the Id field value +func (o *LegacyKnowledgeBaseTableRow) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableRow) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *LegacyKnowledgeBaseTableRow) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *LegacyKnowledgeBaseTableRow) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableRow) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LegacyKnowledgeBaseTableRow) SetName(v string) { + o.Name = v +} + +// GetFilesUploaded returns the FilesUploaded field value +func (o *LegacyKnowledgeBaseTableRow) GetFilesUploaded() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FilesUploaded +} + +// GetFilesUploadedOk returns a tuple with the FilesUploaded field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableRow) GetFilesUploadedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FilesUploaded, true +} + +// SetFilesUploaded sets field value +func (o *LegacyKnowledgeBaseTableRow) SetFilesUploaded(v int32) { + o.FilesUploaded = v +} + +// GetStatus returns the Status field value +func (o *LegacyKnowledgeBaseTableRow) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableRow) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LegacyKnowledgeBaseTableRow) SetStatus(v string) { + o.Status = v +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LegacyKnowledgeBaseTableRow) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LegacyKnowledgeBaseTableRow) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *LegacyKnowledgeBaseTableRow) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *LegacyKnowledgeBaseTableRow) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *LegacyKnowledgeBaseTableRow) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *LegacyKnowledgeBaseTableRow) UnsetError() { + o.Error.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *LegacyKnowledgeBaseTableRow) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *LegacyKnowledgeBaseTableRow) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *LegacyKnowledgeBaseTableRow) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *LegacyKnowledgeBaseTableRow) GetCreatedBy() string { + if o == nil || o.CreatedBy.Get() == nil { + var ret string + return ret + } + + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LegacyKnowledgeBaseTableRow) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// SetCreatedBy sets field value +func (o *LegacyKnowledgeBaseTableRow) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +func (o LegacyKnowledgeBaseTableRow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyKnowledgeBaseTableRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["files_uploaded"] = o.FilesUploaded + toSerialize["status"] = o.Status + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["created_by"] = o.CreatedBy.Get() + return toSerialize, nil +} + +func (o *LegacyKnowledgeBaseTableRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "files_uploaded", + "status", + "updated_at", + "created_by", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLegacyKnowledgeBaseTableRow := _LegacyKnowledgeBaseTableRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLegacyKnowledgeBaseTableRow) + + if err != nil { + return err + } + + *o = LegacyKnowledgeBaseTableRow(varLegacyKnowledgeBaseTableRow) + + return err +} + +type NullableLegacyKnowledgeBaseTableRow struct { + value *LegacyKnowledgeBaseTableRow + isSet bool +} + +func (v NullableLegacyKnowledgeBaseTableRow) Get() *LegacyKnowledgeBaseTableRow { + return v.value +} + +func (v *NullableLegacyKnowledgeBaseTableRow) Set(val *LegacyKnowledgeBaseTableRow) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyKnowledgeBaseTableRow) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyKnowledgeBaseTableRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyKnowledgeBaseTableRow(val *LegacyKnowledgeBaseTableRow) *NullableLegacyKnowledgeBaseTableRow { + return &NullableLegacyKnowledgeBaseTableRow{value: val, isSet: true} +} + +func (v NullableLegacyKnowledgeBaseTableRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyKnowledgeBaseTableRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_list_alert_logs_200_response.go b/go/futureagi/model_list_alert_logs_200_response.go new file mode 100644 index 0000000..0fcfbac --- /dev/null +++ b/go/futureagi/model_list_alert_logs_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListAlertLogs200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListAlertLogs200Response{} + +// ListAlertLogs200Response struct for ListAlertLogs200Response +type ListAlertLogs200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []UserAlertMonitorLog `json:"results"` +} + +type _ListAlertLogs200Response ListAlertLogs200Response + +// NewListAlertLogs200Response instantiates a new ListAlertLogs200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListAlertLogs200Response(count int32, results []UserAlertMonitorLog) *ListAlertLogs200Response { + this := ListAlertLogs200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewListAlertLogs200ResponseWithDefaults instantiates a new ListAlertLogs200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListAlertLogs200ResponseWithDefaults() *ListAlertLogs200Response { + this := ListAlertLogs200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ListAlertLogs200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ListAlertLogs200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ListAlertLogs200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAlertLogs200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAlertLogs200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ListAlertLogs200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ListAlertLogs200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ListAlertLogs200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ListAlertLogs200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAlertLogs200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAlertLogs200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListAlertLogs200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ListAlertLogs200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ListAlertLogs200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ListAlertLogs200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ListAlertLogs200Response) GetResults() []UserAlertMonitorLog { + if o == nil { + var ret []UserAlertMonitorLog + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ListAlertLogs200Response) GetResultsOk() ([]UserAlertMonitorLog, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListAlertLogs200Response) SetResults(v []UserAlertMonitorLog) { + o.Results = v +} + +func (o ListAlertLogs200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListAlertLogs200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ListAlertLogs200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListAlertLogs200Response := _ListAlertLogs200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListAlertLogs200Response) + + if err != nil { + return err + } + + *o = ListAlertLogs200Response(varListAlertLogs200Response) + + return err +} + +type NullableListAlertLogs200Response struct { + value *ListAlertLogs200Response + isSet bool +} + +func (v NullableListAlertLogs200Response) Get() *ListAlertLogs200Response { + return v.value +} + +func (v *NullableListAlertLogs200Response) Set(val *ListAlertLogs200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListAlertLogs200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListAlertLogs200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAlertLogs200Response(val *ListAlertLogs200Response) *NullableListAlertLogs200Response { + return &NullableListAlertLogs200Response{value: val, isSet: true} +} + +func (v NullableListAlertLogs200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAlertLogs200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_list_alerts_200_response.go b/go/futureagi/model_list_alerts_200_response.go new file mode 100644 index 0000000..6e88b8c --- /dev/null +++ b/go/futureagi/model_list_alerts_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListAlerts200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListAlerts200Response{} + +// ListAlerts200Response struct for ListAlerts200Response +type ListAlerts200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []UserAlertMonitor `json:"results"` +} + +type _ListAlerts200Response ListAlerts200Response + +// NewListAlerts200Response instantiates a new ListAlerts200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListAlerts200Response(count int32, results []UserAlertMonitor) *ListAlerts200Response { + this := ListAlerts200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewListAlerts200ResponseWithDefaults instantiates a new ListAlerts200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListAlerts200ResponseWithDefaults() *ListAlerts200Response { + this := ListAlerts200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ListAlerts200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ListAlerts200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ListAlerts200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAlerts200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAlerts200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ListAlerts200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ListAlerts200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ListAlerts200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ListAlerts200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAlerts200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAlerts200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListAlerts200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ListAlerts200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ListAlerts200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ListAlerts200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ListAlerts200Response) GetResults() []UserAlertMonitor { + if o == nil { + var ret []UserAlertMonitor + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ListAlerts200Response) GetResultsOk() ([]UserAlertMonitor, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListAlerts200Response) SetResults(v []UserAlertMonitor) { + o.Results = v +} + +func (o ListAlerts200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListAlerts200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ListAlerts200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListAlerts200Response := _ListAlerts200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListAlerts200Response) + + if err != nil { + return err + } + + *o = ListAlerts200Response(varListAlerts200Response) + + return err +} + +type NullableListAlerts200Response struct { + value *ListAlerts200Response + isSet bool +} + +func (v NullableListAlerts200Response) Get() *ListAlerts200Response { + return v.value +} + +func (v *NullableListAlerts200Response) Set(val *ListAlerts200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListAlerts200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListAlerts200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAlerts200Response(val *ListAlerts200Response) *NullableListAlerts200Response { + return &NullableListAlerts200Response{value: val, isSet: true} +} + +func (v NullableListAlerts200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAlerts200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_list_annotation_queue_items_200_response.go b/go/futureagi/model_list_annotation_queue_items_200_response.go new file mode 100644 index 0000000..fd27c91 --- /dev/null +++ b/go/futureagi/model_list_annotation_queue_items_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListAnnotationQueueItems200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListAnnotationQueueItems200Response{} + +// ListAnnotationQueueItems200Response struct for ListAnnotationQueueItems200Response +type ListAnnotationQueueItems200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []QueueItem `json:"results"` +} + +type _ListAnnotationQueueItems200Response ListAnnotationQueueItems200Response + +// NewListAnnotationQueueItems200Response instantiates a new ListAnnotationQueueItems200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListAnnotationQueueItems200Response(count int32, results []QueueItem) *ListAnnotationQueueItems200Response { + this := ListAnnotationQueueItems200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewListAnnotationQueueItems200ResponseWithDefaults instantiates a new ListAnnotationQueueItems200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListAnnotationQueueItems200ResponseWithDefaults() *ListAnnotationQueueItems200Response { + this := ListAnnotationQueueItems200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ListAnnotationQueueItems200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ListAnnotationQueueItems200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ListAnnotationQueueItems200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAnnotationQueueItems200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAnnotationQueueItems200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ListAnnotationQueueItems200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ListAnnotationQueueItems200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ListAnnotationQueueItems200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ListAnnotationQueueItems200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAnnotationQueueItems200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAnnotationQueueItems200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListAnnotationQueueItems200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ListAnnotationQueueItems200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ListAnnotationQueueItems200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ListAnnotationQueueItems200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ListAnnotationQueueItems200Response) GetResults() []QueueItem { + if o == nil { + var ret []QueueItem + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ListAnnotationQueueItems200Response) GetResultsOk() ([]QueueItem, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListAnnotationQueueItems200Response) SetResults(v []QueueItem) { + o.Results = v +} + +func (o ListAnnotationQueueItems200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListAnnotationQueueItems200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ListAnnotationQueueItems200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListAnnotationQueueItems200Response := _ListAnnotationQueueItems200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListAnnotationQueueItems200Response) + + if err != nil { + return err + } + + *o = ListAnnotationQueueItems200Response(varListAnnotationQueueItems200Response) + + return err +} + +type NullableListAnnotationQueueItems200Response struct { + value *ListAnnotationQueueItems200Response + isSet bool +} + +func (v NullableListAnnotationQueueItems200Response) Get() *ListAnnotationQueueItems200Response { + return v.value +} + +func (v *NullableListAnnotationQueueItems200Response) Set(val *ListAnnotationQueueItems200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListAnnotationQueueItems200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListAnnotationQueueItems200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAnnotationQueueItems200Response(val *ListAnnotationQueueItems200Response) *NullableListAnnotationQueueItems200Response { + return &NullableListAnnotationQueueItems200Response{value: val, isSet: true} +} + +func (v NullableListAnnotationQueueItems200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAnnotationQueueItems200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_list_annotation_queues_200_response.go b/go/futureagi/model_list_annotation_queues_200_response.go new file mode 100644 index 0000000..04a4e27 --- /dev/null +++ b/go/futureagi/model_list_annotation_queues_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListAnnotationQueues200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListAnnotationQueues200Response{} + +// ListAnnotationQueues200Response struct for ListAnnotationQueues200Response +type ListAnnotationQueues200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnnotationQueue `json:"results"` +} + +type _ListAnnotationQueues200Response ListAnnotationQueues200Response + +// NewListAnnotationQueues200Response instantiates a new ListAnnotationQueues200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListAnnotationQueues200Response(count int32, results []AnnotationQueue) *ListAnnotationQueues200Response { + this := ListAnnotationQueues200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewListAnnotationQueues200ResponseWithDefaults instantiates a new ListAnnotationQueues200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListAnnotationQueues200ResponseWithDefaults() *ListAnnotationQueues200Response { + this := ListAnnotationQueues200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ListAnnotationQueues200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ListAnnotationQueues200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ListAnnotationQueues200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAnnotationQueues200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAnnotationQueues200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ListAnnotationQueues200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ListAnnotationQueues200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ListAnnotationQueues200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ListAnnotationQueues200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListAnnotationQueues200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListAnnotationQueues200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListAnnotationQueues200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ListAnnotationQueues200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ListAnnotationQueues200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ListAnnotationQueues200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ListAnnotationQueues200Response) GetResults() []AnnotationQueue { + if o == nil { + var ret []AnnotationQueue + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ListAnnotationQueues200Response) GetResultsOk() ([]AnnotationQueue, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListAnnotationQueues200Response) SetResults(v []AnnotationQueue) { + o.Results = v +} + +func (o ListAnnotationQueues200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListAnnotationQueues200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ListAnnotationQueues200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListAnnotationQueues200Response := _ListAnnotationQueues200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListAnnotationQueues200Response) + + if err != nil { + return err + } + + *o = ListAnnotationQueues200Response(varListAnnotationQueues200Response) + + return err +} + +type NullableListAnnotationQueues200Response struct { + value *ListAnnotationQueues200Response + isSet bool +} + +func (v NullableListAnnotationQueues200Response) Get() *ListAnnotationQueues200Response { + return v.value +} + +func (v *NullableListAnnotationQueues200Response) Set(val *ListAnnotationQueues200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListAnnotationQueues200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListAnnotationQueues200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAnnotationQueues200Response(val *ListAnnotationQueues200Response) *NullableListAnnotationQueues200Response { + return &NullableListAnnotationQueues200Response{value: val, isSet: true} +} + +func (v NullableListAnnotationQueues200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAnnotationQueues200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_list_experiments_200_response.go b/go/futureagi/model_list_experiments_200_response.go new file mode 100644 index 0000000..f29c199 --- /dev/null +++ b/go/futureagi/model_list_experiments_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListExperiments200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListExperiments200Response{} + +// ListExperiments200Response struct for ListExperiments200Response +type ListExperiments200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ExperimentListV2 `json:"results"` +} + +type _ListExperiments200Response ListExperiments200Response + +// NewListExperiments200Response instantiates a new ListExperiments200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListExperiments200Response(count int32, results []ExperimentListV2) *ListExperiments200Response { + this := ListExperiments200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewListExperiments200ResponseWithDefaults instantiates a new ListExperiments200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListExperiments200ResponseWithDefaults() *ListExperiments200Response { + this := ListExperiments200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ListExperiments200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ListExperiments200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ListExperiments200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListExperiments200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListExperiments200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ListExperiments200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ListExperiments200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ListExperiments200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ListExperiments200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListExperiments200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListExperiments200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListExperiments200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ListExperiments200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ListExperiments200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ListExperiments200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ListExperiments200Response) GetResults() []ExperimentListV2 { + if o == nil { + var ret []ExperimentListV2 + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ListExperiments200Response) GetResultsOk() ([]ExperimentListV2, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListExperiments200Response) SetResults(v []ExperimentListV2) { + o.Results = v +} + +func (o ListExperiments200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListExperiments200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ListExperiments200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListExperiments200Response := _ListExperiments200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListExperiments200Response) + + if err != nil { + return err + } + + *o = ListExperiments200Response(varListExperiments200Response) + + return err +} + +type NullableListExperiments200Response struct { + value *ListExperiments200Response + isSet bool +} + +func (v NullableListExperiments200Response) Get() *ListExperiments200Response { + return v.value +} + +func (v *NullableListExperiments200Response) Set(val *ListExperiments200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListExperiments200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListExperiments200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListExperiments200Response(val *ListExperiments200Response) *NullableListExperiments200Response { + return &NullableListExperiments200Response{value: val, isSet: true} +} + +func (v NullableListExperiments200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListExperiments200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_list_personas_200_response.go b/go/futureagi/model_list_personas_200_response.go new file mode 100644 index 0000000..f9f04a0 --- /dev/null +++ b/go/futureagi/model_list_personas_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListPersonas200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPersonas200Response{} + +// ListPersonas200Response struct for ListPersonas200Response +type ListPersonas200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PersonaList `json:"results"` +} + +type _ListPersonas200Response ListPersonas200Response + +// NewListPersonas200Response instantiates a new ListPersonas200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListPersonas200Response(count int32, results []PersonaList) *ListPersonas200Response { + this := ListPersonas200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewListPersonas200ResponseWithDefaults instantiates a new ListPersonas200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListPersonas200ResponseWithDefaults() *ListPersonas200Response { + this := ListPersonas200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ListPersonas200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ListPersonas200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ListPersonas200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListPersonas200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListPersonas200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ListPersonas200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ListPersonas200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ListPersonas200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ListPersonas200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListPersonas200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListPersonas200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListPersonas200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ListPersonas200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ListPersonas200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ListPersonas200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ListPersonas200Response) GetResults() []PersonaList { + if o == nil { + var ret []PersonaList + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ListPersonas200Response) GetResultsOk() ([]PersonaList, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListPersonas200Response) SetResults(v []PersonaList) { + o.Results = v +} + +func (o ListPersonas200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPersonas200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ListPersonas200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListPersonas200Response := _ListPersonas200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListPersonas200Response) + + if err != nil { + return err + } + + *o = ListPersonas200Response(varListPersonas200Response) + + return err +} + +type NullableListPersonas200Response struct { + value *ListPersonas200Response + isSet bool +} + +func (v NullableListPersonas200Response) Get() *ListPersonas200Response { + return v.value +} + +func (v *NullableListPersonas200Response) Set(val *ListPersonas200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListPersonas200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListPersonas200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListPersonas200Response(val *ListPersonas200Response) *NullableListPersonas200Response { + return &NullableListPersonas200Response{value: val, isSet: true} +} + +func (v NullableListPersonas200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListPersonas200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_list_trace_projects_200_response.go b/go/futureagi/model_list_trace_projects_200_response.go new file mode 100644 index 0000000..0f7b7af --- /dev/null +++ b/go/futureagi/model_list_trace_projects_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListTraceProjects200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListTraceProjects200Response{} + +// ListTraceProjects200Response struct for ListTraceProjects200Response +type ListTraceProjects200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []Project `json:"results"` +} + +type _ListTraceProjects200Response ListTraceProjects200Response + +// NewListTraceProjects200Response instantiates a new ListTraceProjects200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListTraceProjects200Response(count int32, results []Project) *ListTraceProjects200Response { + this := ListTraceProjects200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewListTraceProjects200ResponseWithDefaults instantiates a new ListTraceProjects200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListTraceProjects200ResponseWithDefaults() *ListTraceProjects200Response { + this := ListTraceProjects200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ListTraceProjects200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ListTraceProjects200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ListTraceProjects200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListTraceProjects200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListTraceProjects200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ListTraceProjects200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ListTraceProjects200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ListTraceProjects200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ListTraceProjects200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListTraceProjects200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListTraceProjects200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListTraceProjects200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ListTraceProjects200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ListTraceProjects200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ListTraceProjects200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ListTraceProjects200Response) GetResults() []Project { + if o == nil { + var ret []Project + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ListTraceProjects200Response) GetResultsOk() ([]Project, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ListTraceProjects200Response) SetResults(v []Project) { + o.Results = v +} + +func (o ListTraceProjects200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListTraceProjects200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ListTraceProjects200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListTraceProjects200Response := _ListTraceProjects200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListTraceProjects200Response) + + if err != nil { + return err + } + + *o = ListTraceProjects200Response(varListTraceProjects200Response) + + return err +} + +type NullableListTraceProjects200Response struct { + value *ListTraceProjects200Response + isSet bool +} + +func (v NullableListTraceProjects200Response) Get() *ListTraceProjects200Response { + return v.value +} + +func (v *NullableListTraceProjects200Response) Set(val *ListTraceProjects200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListTraceProjects200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListTraceProjects200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListTraceProjects200Response(val *ListTraceProjects200Response) *NullableListTraceProjects200Response { + return &NullableListTraceProjects200Response{value: val, isSet: true} +} + +func (v NullableListTraceProjects200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListTraceProjects200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_local_file_dataset_create_started_response.go b/go/futureagi/model_local_file_dataset_create_started_response.go new file mode 100644 index 0000000..e1c9ba7 --- /dev/null +++ b/go/futureagi/model_local_file_dataset_create_started_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LocalFileDatasetCreateStartedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LocalFileDatasetCreateStartedResponse{} + +// LocalFileDatasetCreateStartedResponse struct for LocalFileDatasetCreateStartedResponse +type LocalFileDatasetCreateStartedResponse struct { + Status bool `json:"status"` + Result LocalFileDatasetCreateStartedResult `json:"result"` +} + +type _LocalFileDatasetCreateStartedResponse LocalFileDatasetCreateStartedResponse + +// NewLocalFileDatasetCreateStartedResponse instantiates a new LocalFileDatasetCreateStartedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLocalFileDatasetCreateStartedResponse(status bool, result LocalFileDatasetCreateStartedResult) *LocalFileDatasetCreateStartedResponse { + this := LocalFileDatasetCreateStartedResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewLocalFileDatasetCreateStartedResponseWithDefaults instantiates a new LocalFileDatasetCreateStartedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLocalFileDatasetCreateStartedResponseWithDefaults() *LocalFileDatasetCreateStartedResponse { + this := LocalFileDatasetCreateStartedResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *LocalFileDatasetCreateStartedResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LocalFileDatasetCreateStartedResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *LocalFileDatasetCreateStartedResponse) GetResult() LocalFileDatasetCreateStartedResult { + if o == nil { + var ret LocalFileDatasetCreateStartedResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResponse) GetResultOk() (*LocalFileDatasetCreateStartedResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *LocalFileDatasetCreateStartedResponse) SetResult(v LocalFileDatasetCreateStartedResult) { + o.Result = v +} + +func (o LocalFileDatasetCreateStartedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LocalFileDatasetCreateStartedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *LocalFileDatasetCreateStartedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLocalFileDatasetCreateStartedResponse := _LocalFileDatasetCreateStartedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLocalFileDatasetCreateStartedResponse) + + if err != nil { + return err + } + + *o = LocalFileDatasetCreateStartedResponse(varLocalFileDatasetCreateStartedResponse) + + return err +} + +type NullableLocalFileDatasetCreateStartedResponse struct { + value *LocalFileDatasetCreateStartedResponse + isSet bool +} + +func (v NullableLocalFileDatasetCreateStartedResponse) Get() *LocalFileDatasetCreateStartedResponse { + return v.value +} + +func (v *NullableLocalFileDatasetCreateStartedResponse) Set(val *LocalFileDatasetCreateStartedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLocalFileDatasetCreateStartedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLocalFileDatasetCreateStartedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLocalFileDatasetCreateStartedResponse(val *LocalFileDatasetCreateStartedResponse) *NullableLocalFileDatasetCreateStartedResponse { + return &NullableLocalFileDatasetCreateStartedResponse{value: val, isSet: true} +} + +func (v NullableLocalFileDatasetCreateStartedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLocalFileDatasetCreateStartedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_local_file_dataset_create_started_result.go b/go/futureagi/model_local_file_dataset_create_started_result.go new file mode 100644 index 0000000..220d015 --- /dev/null +++ b/go/futureagi/model_local_file_dataset_create_started_result.go @@ -0,0 +1,344 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the LocalFileDatasetCreateStartedResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LocalFileDatasetCreateStartedResult{} + +// LocalFileDatasetCreateStartedResult struct for LocalFileDatasetCreateStartedResult +type LocalFileDatasetCreateStartedResult struct { + Message string `json:"message"` + DatasetId string `json:"dataset_id"` + DatasetName string `json:"dataset_name"` + DatasetModelType NullableString `json:"dataset_model_type,omitempty"` + ProcessingStatus string `json:"processing_status"` + EstimatedRows int32 `json:"estimated_rows"` + EstimatedColumns int32 `json:"estimated_columns"` +} + +type _LocalFileDatasetCreateStartedResult LocalFileDatasetCreateStartedResult + +// NewLocalFileDatasetCreateStartedResult instantiates a new LocalFileDatasetCreateStartedResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLocalFileDatasetCreateStartedResult(message string, datasetId string, datasetName string, processingStatus string, estimatedRows int32, estimatedColumns int32) *LocalFileDatasetCreateStartedResult { + this := LocalFileDatasetCreateStartedResult{} + this.Message = message + this.DatasetId = datasetId + this.DatasetName = datasetName + this.ProcessingStatus = processingStatus + this.EstimatedRows = estimatedRows + this.EstimatedColumns = estimatedColumns + return &this +} + +// NewLocalFileDatasetCreateStartedResultWithDefaults instantiates a new LocalFileDatasetCreateStartedResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLocalFileDatasetCreateStartedResultWithDefaults() *LocalFileDatasetCreateStartedResult { + this := LocalFileDatasetCreateStartedResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *LocalFileDatasetCreateStartedResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *LocalFileDatasetCreateStartedResult) SetMessage(v string) { + o.Message = v +} + +// GetDatasetId returns the DatasetId field value +func (o *LocalFileDatasetCreateStartedResult) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResult) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *LocalFileDatasetCreateStartedResult) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetDatasetName returns the DatasetName field value +func (o *LocalFileDatasetCreateStartedResult) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResult) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *LocalFileDatasetCreateStartedResult) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetDatasetModelType returns the DatasetModelType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LocalFileDatasetCreateStartedResult) GetDatasetModelType() string { + if o == nil || IsNil(o.DatasetModelType.Get()) { + var ret string + return ret + } + return *o.DatasetModelType.Get() +} + +// GetDatasetModelTypeOk returns a tuple with the DatasetModelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LocalFileDatasetCreateStartedResult) GetDatasetModelTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DatasetModelType.Get(), o.DatasetModelType.IsSet() +} + +// HasDatasetModelType returns a boolean if a field has been set. +func (o *LocalFileDatasetCreateStartedResult) HasDatasetModelType() bool { + if o != nil && o.DatasetModelType.IsSet() { + return true + } + + return false +} + +// SetDatasetModelType gets a reference to the given NullableString and assigns it to the DatasetModelType field. +func (o *LocalFileDatasetCreateStartedResult) SetDatasetModelType(v string) { + o.DatasetModelType.Set(&v) +} + +// SetDatasetModelTypeNil sets the value for DatasetModelType to be an explicit nil +func (o *LocalFileDatasetCreateStartedResult) SetDatasetModelTypeNil() { + o.DatasetModelType.Set(nil) +} + +// UnsetDatasetModelType ensures that no value is present for DatasetModelType, not even an explicit nil +func (o *LocalFileDatasetCreateStartedResult) UnsetDatasetModelType() { + o.DatasetModelType.Unset() +} + +// GetProcessingStatus returns the ProcessingStatus field value +func (o *LocalFileDatasetCreateStartedResult) GetProcessingStatus() string { + if o == nil { + var ret string + return ret + } + + return o.ProcessingStatus +} + +// GetProcessingStatusOk returns a tuple with the ProcessingStatus field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResult) GetProcessingStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProcessingStatus, true +} + +// SetProcessingStatus sets field value +func (o *LocalFileDatasetCreateStartedResult) SetProcessingStatus(v string) { + o.ProcessingStatus = v +} + +// GetEstimatedRows returns the EstimatedRows field value +func (o *LocalFileDatasetCreateStartedResult) GetEstimatedRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.EstimatedRows +} + +// GetEstimatedRowsOk returns a tuple with the EstimatedRows field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResult) GetEstimatedRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.EstimatedRows, true +} + +// SetEstimatedRows sets field value +func (o *LocalFileDatasetCreateStartedResult) SetEstimatedRows(v int32) { + o.EstimatedRows = v +} + +// GetEstimatedColumns returns the EstimatedColumns field value +func (o *LocalFileDatasetCreateStartedResult) GetEstimatedColumns() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.EstimatedColumns +} + +// GetEstimatedColumnsOk returns a tuple with the EstimatedColumns field value +// and a boolean to check if the value has been set. +func (o *LocalFileDatasetCreateStartedResult) GetEstimatedColumnsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.EstimatedColumns, true +} + +// SetEstimatedColumns sets field value +func (o *LocalFileDatasetCreateStartedResult) SetEstimatedColumns(v int32) { + o.EstimatedColumns = v +} + +func (o LocalFileDatasetCreateStartedResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LocalFileDatasetCreateStartedResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["dataset_id"] = o.DatasetId + toSerialize["dataset_name"] = o.DatasetName + if o.DatasetModelType.IsSet() { + toSerialize["dataset_model_type"] = o.DatasetModelType.Get() + } + toSerialize["processing_status"] = o.ProcessingStatus + toSerialize["estimated_rows"] = o.EstimatedRows + toSerialize["estimated_columns"] = o.EstimatedColumns + return toSerialize, nil +} + +func (o *LocalFileDatasetCreateStartedResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "dataset_id", + "dataset_name", + "processing_status", + "estimated_rows", + "estimated_columns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLocalFileDatasetCreateStartedResult := _LocalFileDatasetCreateStartedResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLocalFileDatasetCreateStartedResult) + + if err != nil { + return err + } + + *o = LocalFileDatasetCreateStartedResult(varLocalFileDatasetCreateStartedResult) + + return err +} + +type NullableLocalFileDatasetCreateStartedResult struct { + value *LocalFileDatasetCreateStartedResult + isSet bool +} + +func (v NullableLocalFileDatasetCreateStartedResult) Get() *LocalFileDatasetCreateStartedResult { + return v.value +} + +func (v *NullableLocalFileDatasetCreateStartedResult) Set(val *LocalFileDatasetCreateStartedResult) { + v.value = val + v.isSet = true +} + +func (v NullableLocalFileDatasetCreateStartedResult) IsSet() bool { + return v.isSet +} + +func (v *NullableLocalFileDatasetCreateStartedResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLocalFileDatasetCreateStartedResult(val *LocalFileDatasetCreateStartedResult) *NullableLocalFileDatasetCreateStartedResult { + return &NullableLocalFileDatasetCreateStartedResult{value: val, isSet: true} +} + +func (v NullableLocalFileDatasetCreateStartedResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLocalFileDatasetCreateStartedResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_management_api_error_response.go b/go/futureagi/model_management_api_error_response.go new file mode 100644 index 0000000..3ab30b2 --- /dev/null +++ b/go/futureagi/model_management_api_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ManagementAPIErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ManagementAPIErrorResponse{} + +// ManagementAPIErrorResponse struct for ManagementAPIErrorResponse +type ManagementAPIErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewManagementAPIErrorResponse instantiates a new ManagementAPIErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewManagementAPIErrorResponse() *ManagementAPIErrorResponse { + this := ManagementAPIErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewManagementAPIErrorResponseWithDefaults instantiates a new ManagementAPIErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewManagementAPIErrorResponseWithDefaults() *ManagementAPIErrorResponse { + this := ManagementAPIErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ManagementAPIErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManagementAPIErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ManagementAPIErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ManagementAPIErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ManagementAPIErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ManagementAPIErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ManagementAPIErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ManagementAPIErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ManagementAPIErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ManagementAPIErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ManagementAPIErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ManagementAPIErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ManagementAPIErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ManagementAPIErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ManagementAPIErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ManagementAPIErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ManagementAPIErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ManagementAPIErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ManagementAPIErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ManagementAPIErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ManagementAPIErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ManagementAPIErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ManagementAPIErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ManagementAPIErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ManagementAPIErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ManagementAPIErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ManagementAPIErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ManagementAPIErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ManagementAPIErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ManagementAPIErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ManagementAPIErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ManagementAPIErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ManagementAPIErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ManagementAPIErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ManagementAPIErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ManagementAPIErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ManagementAPIErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ManagementAPIErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ManagementAPIErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManagementAPIErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ManagementAPIErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ManagementAPIErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ManagementAPIErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ManagementAPIErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableManagementAPIErrorResponse struct { + value *ManagementAPIErrorResponse + isSet bool +} + +func (v NullableManagementAPIErrorResponse) Get() *ManagementAPIErrorResponse { + return v.value +} + +func (v *NullableManagementAPIErrorResponse) Set(val *ManagementAPIErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableManagementAPIErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableManagementAPIErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableManagementAPIErrorResponse(val *ManagementAPIErrorResponse) *NullableManagementAPIErrorResponse { + return &NullableManagementAPIErrorResponse{value: val, isSet: true} +} + +func (v NullableManagementAPIErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableManagementAPIErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_manual_dataset_create_request.go b/go/futureagi/model_manual_dataset_create_request.go new file mode 100644 index 0000000..150ec61 --- /dev/null +++ b/go/futureagi/model_manual_dataset_create_request.go @@ -0,0 +1,237 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ManualDatasetCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ManualDatasetCreateRequest{} + +// ManualDatasetCreateRequest struct for ManualDatasetCreateRequest +type ManualDatasetCreateRequest struct { + DatasetName string `json:"dataset_name"` + NumberOfRows *int32 `json:"number_of_rows,omitempty"` + NumberOfColumns *int32 `json:"number_of_columns,omitempty"` +} + +type _ManualDatasetCreateRequest ManualDatasetCreateRequest + +// NewManualDatasetCreateRequest instantiates a new ManualDatasetCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewManualDatasetCreateRequest(datasetName string) *ManualDatasetCreateRequest { + this := ManualDatasetCreateRequest{} + this.DatasetName = datasetName + var numberOfRows int32 = 1 + this.NumberOfRows = &numberOfRows + var numberOfColumns int32 = 1 + this.NumberOfColumns = &numberOfColumns + return &this +} + +// NewManualDatasetCreateRequestWithDefaults instantiates a new ManualDatasetCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewManualDatasetCreateRequestWithDefaults() *ManualDatasetCreateRequest { + this := ManualDatasetCreateRequest{} + var numberOfRows int32 = 1 + this.NumberOfRows = &numberOfRows + var numberOfColumns int32 = 1 + this.NumberOfColumns = &numberOfColumns + return &this +} + +// GetDatasetName returns the DatasetName field value +func (o *ManualDatasetCreateRequest) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateRequest) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *ManualDatasetCreateRequest) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetNumberOfRows returns the NumberOfRows field value if set, zero value otherwise. +func (o *ManualDatasetCreateRequest) GetNumberOfRows() int32 { + if o == nil || IsNil(o.NumberOfRows) { + var ret int32 + return ret + } + return *o.NumberOfRows +} + +// GetNumberOfRowsOk returns a tuple with the NumberOfRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateRequest) GetNumberOfRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NumberOfRows) { + return nil, false + } + return o.NumberOfRows, true +} + +// HasNumberOfRows returns a boolean if a field has been set. +func (o *ManualDatasetCreateRequest) HasNumberOfRows() bool { + if o != nil && !IsNil(o.NumberOfRows) { + return true + } + + return false +} + +// SetNumberOfRows gets a reference to the given int32 and assigns it to the NumberOfRows field. +func (o *ManualDatasetCreateRequest) SetNumberOfRows(v int32) { + o.NumberOfRows = &v +} + +// GetNumberOfColumns returns the NumberOfColumns field value if set, zero value otherwise. +func (o *ManualDatasetCreateRequest) GetNumberOfColumns() int32 { + if o == nil || IsNil(o.NumberOfColumns) { + var ret int32 + return ret + } + return *o.NumberOfColumns +} + +// GetNumberOfColumnsOk returns a tuple with the NumberOfColumns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateRequest) GetNumberOfColumnsOk() (*int32, bool) { + if o == nil || IsNil(o.NumberOfColumns) { + return nil, false + } + return o.NumberOfColumns, true +} + +// HasNumberOfColumns returns a boolean if a field has been set. +func (o *ManualDatasetCreateRequest) HasNumberOfColumns() bool { + if o != nil && !IsNil(o.NumberOfColumns) { + return true + } + + return false +} + +// SetNumberOfColumns gets a reference to the given int32 and assigns it to the NumberOfColumns field. +func (o *ManualDatasetCreateRequest) SetNumberOfColumns(v int32) { + o.NumberOfColumns = &v +} + +func (o ManualDatasetCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ManualDatasetCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_name"] = o.DatasetName + if !IsNil(o.NumberOfRows) { + toSerialize["number_of_rows"] = o.NumberOfRows + } + if !IsNil(o.NumberOfColumns) { + toSerialize["number_of_columns"] = o.NumberOfColumns + } + return toSerialize, nil +} + +func (o *ManualDatasetCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varManualDatasetCreateRequest := _ManualDatasetCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varManualDatasetCreateRequest) + + if err != nil { + return err + } + + *o = ManualDatasetCreateRequest(varManualDatasetCreateRequest) + + return err +} + +type NullableManualDatasetCreateRequest struct { + value *ManualDatasetCreateRequest + isSet bool +} + +func (v NullableManualDatasetCreateRequest) Get() *ManualDatasetCreateRequest { + return v.value +} + +func (v *NullableManualDatasetCreateRequest) Set(val *ManualDatasetCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableManualDatasetCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableManualDatasetCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableManualDatasetCreateRequest(val *ManualDatasetCreateRequest) *NullableManualDatasetCreateRequest { + return &NullableManualDatasetCreateRequest{value: val, isSet: true} +} + +func (v NullableManualDatasetCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableManualDatasetCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_manual_dataset_create_response.go b/go/futureagi/model_manual_dataset_create_response.go new file mode 100644 index 0000000..c51343d --- /dev/null +++ b/go/futureagi/model_manual_dataset_create_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ManualDatasetCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ManualDatasetCreateResponse{} + +// ManualDatasetCreateResponse struct for ManualDatasetCreateResponse +type ManualDatasetCreateResponse struct { + Status bool `json:"status"` + Result ManualDatasetCreateResult `json:"result"` +} + +type _ManualDatasetCreateResponse ManualDatasetCreateResponse + +// NewManualDatasetCreateResponse instantiates a new ManualDatasetCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewManualDatasetCreateResponse(status bool, result ManualDatasetCreateResult) *ManualDatasetCreateResponse { + this := ManualDatasetCreateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewManualDatasetCreateResponseWithDefaults instantiates a new ManualDatasetCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewManualDatasetCreateResponseWithDefaults() *ManualDatasetCreateResponse { + this := ManualDatasetCreateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ManualDatasetCreateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ManualDatasetCreateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ManualDatasetCreateResponse) GetResult() ManualDatasetCreateResult { + if o == nil { + var ret ManualDatasetCreateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateResponse) GetResultOk() (*ManualDatasetCreateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ManualDatasetCreateResponse) SetResult(v ManualDatasetCreateResult) { + o.Result = v +} + +func (o ManualDatasetCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ManualDatasetCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ManualDatasetCreateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varManualDatasetCreateResponse := _ManualDatasetCreateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varManualDatasetCreateResponse) + + if err != nil { + return err + } + + *o = ManualDatasetCreateResponse(varManualDatasetCreateResponse) + + return err +} + +type NullableManualDatasetCreateResponse struct { + value *ManualDatasetCreateResponse + isSet bool +} + +func (v NullableManualDatasetCreateResponse) Get() *ManualDatasetCreateResponse { + return v.value +} + +func (v *NullableManualDatasetCreateResponse) Set(val *ManualDatasetCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableManualDatasetCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableManualDatasetCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableManualDatasetCreateResponse(val *ManualDatasetCreateResponse) *NullableManualDatasetCreateResponse { + return &NullableManualDatasetCreateResponse{value: val, isSet: true} +} + +func (v NullableManualDatasetCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableManualDatasetCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_manual_dataset_create_result.go b/go/futureagi/model_manual_dataset_create_result.go new file mode 100644 index 0000000..3bbaa41 --- /dev/null +++ b/go/futureagi/model_manual_dataset_create_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ManualDatasetCreateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ManualDatasetCreateResult{} + +// ManualDatasetCreateResult struct for ManualDatasetCreateResult +type ManualDatasetCreateResult struct { + Message string `json:"message"` + DatasetId string `json:"dataset_id"` + RowsCreated int32 `json:"rows_created"` + ColumnsCreated int32 `json:"columns_created"` +} + +type _ManualDatasetCreateResult ManualDatasetCreateResult + +// NewManualDatasetCreateResult instantiates a new ManualDatasetCreateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewManualDatasetCreateResult(message string, datasetId string, rowsCreated int32, columnsCreated int32) *ManualDatasetCreateResult { + this := ManualDatasetCreateResult{} + this.Message = message + this.DatasetId = datasetId + this.RowsCreated = rowsCreated + this.ColumnsCreated = columnsCreated + return &this +} + +// NewManualDatasetCreateResultWithDefaults instantiates a new ManualDatasetCreateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewManualDatasetCreateResultWithDefaults() *ManualDatasetCreateResult { + this := ManualDatasetCreateResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *ManualDatasetCreateResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ManualDatasetCreateResult) SetMessage(v string) { + o.Message = v +} + +// GetDatasetId returns the DatasetId field value +func (o *ManualDatasetCreateResult) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateResult) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *ManualDatasetCreateResult) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetRowsCreated returns the RowsCreated field value +func (o *ManualDatasetCreateResult) GetRowsCreated() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowsCreated +} + +// GetRowsCreatedOk returns a tuple with the RowsCreated field value +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateResult) GetRowsCreatedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowsCreated, true +} + +// SetRowsCreated sets field value +func (o *ManualDatasetCreateResult) SetRowsCreated(v int32) { + o.RowsCreated = v +} + +// GetColumnsCreated returns the ColumnsCreated field value +func (o *ManualDatasetCreateResult) GetColumnsCreated() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ColumnsCreated +} + +// GetColumnsCreatedOk returns a tuple with the ColumnsCreated field value +// and a boolean to check if the value has been set. +func (o *ManualDatasetCreateResult) GetColumnsCreatedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ColumnsCreated, true +} + +// SetColumnsCreated sets field value +func (o *ManualDatasetCreateResult) SetColumnsCreated(v int32) { + o.ColumnsCreated = v +} + +func (o ManualDatasetCreateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ManualDatasetCreateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["dataset_id"] = o.DatasetId + toSerialize["rows_created"] = o.RowsCreated + toSerialize["columns_created"] = o.ColumnsCreated + return toSerialize, nil +} + +func (o *ManualDatasetCreateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "dataset_id", + "rows_created", + "columns_created", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varManualDatasetCreateResult := _ManualDatasetCreateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varManualDatasetCreateResult) + + if err != nil { + return err + } + + *o = ManualDatasetCreateResult(varManualDatasetCreateResult) + + return err +} + +type NullableManualDatasetCreateResult struct { + value *ManualDatasetCreateResult + isSet bool +} + +func (v NullableManualDatasetCreateResult) Get() *ManualDatasetCreateResult { + return v.value +} + +func (v *NullableManualDatasetCreateResult) Set(val *ManualDatasetCreateResult) { + v.value = val + v.isSet = true +} + +func (v NullableManualDatasetCreateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableManualDatasetCreateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableManualDatasetCreateResult(val *ManualDatasetCreateResult) *NullableManualDatasetCreateResult { + return &NullableManualDatasetCreateResult{value: val, isSet: true} +} + +func (v NullableManualDatasetCreateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableManualDatasetCreateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_list_item.go b/go/futureagi/model_member_list_item.go new file mode 100644 index 0000000..22c1f0d --- /dev/null +++ b/go/futureagi/model_member_list_item.go @@ -0,0 +1,557 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberListItem{} + +// MemberListItem struct for MemberListItem +type MemberListItem struct { + Id string `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + OrgLevel NullableInt32 `json:"org_level,omitempty"` + OrgRole NullableString `json:"org_role,omitempty"` + WsLevel NullableInt32 `json:"ws_level,omitempty"` + WsRole NullableString `json:"ws_role,omitempty"` + Workspaces []MemberWorkspaceAccess `json:"workspaces,omitempty"` + Status string `json:"status"` + CreatedAt string `json:"created_at"` + Type string `json:"type"` + AutoAccess *bool `json:"auto_access,omitempty"` +} + +type _MemberListItem MemberListItem + +// NewMemberListItem instantiates a new MemberListItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberListItem(id string, name string, email string, status string, createdAt string, type_ string) *MemberListItem { + this := MemberListItem{} + this.Id = id + this.Name = name + this.Email = email + this.Status = status + this.CreatedAt = createdAt + this.Type = type_ + return &this +} + +// NewMemberListItemWithDefaults instantiates a new MemberListItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberListItemWithDefaults() *MemberListItem { + this := MemberListItem{} + return &this +} + +// GetId returns the Id field value +func (o *MemberListItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *MemberListItem) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *MemberListItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MemberListItem) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *MemberListItem) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *MemberListItem) SetEmail(v string) { + o.Email = v +} + +// GetOrgLevel returns the OrgLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MemberListItem) GetOrgLevel() int32 { + if o == nil || IsNil(o.OrgLevel.Get()) { + var ret int32 + return ret + } + return *o.OrgLevel.Get() +} + +// GetOrgLevelOk returns a tuple with the OrgLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MemberListItem) GetOrgLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.OrgLevel.Get(), o.OrgLevel.IsSet() +} + +// HasOrgLevel returns a boolean if a field has been set. +func (o *MemberListItem) HasOrgLevel() bool { + if o != nil && o.OrgLevel.IsSet() { + return true + } + + return false +} + +// SetOrgLevel gets a reference to the given NullableInt32 and assigns it to the OrgLevel field. +func (o *MemberListItem) SetOrgLevel(v int32) { + o.OrgLevel.Set(&v) +} + +// SetOrgLevelNil sets the value for OrgLevel to be an explicit nil +func (o *MemberListItem) SetOrgLevelNil() { + o.OrgLevel.Set(nil) +} + +// UnsetOrgLevel ensures that no value is present for OrgLevel, not even an explicit nil +func (o *MemberListItem) UnsetOrgLevel() { + o.OrgLevel.Unset() +} + +// GetOrgRole returns the OrgRole field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MemberListItem) GetOrgRole() string { + if o == nil || IsNil(o.OrgRole.Get()) { + var ret string + return ret + } + return *o.OrgRole.Get() +} + +// GetOrgRoleOk returns a tuple with the OrgRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MemberListItem) GetOrgRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OrgRole.Get(), o.OrgRole.IsSet() +} + +// HasOrgRole returns a boolean if a field has been set. +func (o *MemberListItem) HasOrgRole() bool { + if o != nil && o.OrgRole.IsSet() { + return true + } + + return false +} + +// SetOrgRole gets a reference to the given NullableString and assigns it to the OrgRole field. +func (o *MemberListItem) SetOrgRole(v string) { + o.OrgRole.Set(&v) +} + +// SetOrgRoleNil sets the value for OrgRole to be an explicit nil +func (o *MemberListItem) SetOrgRoleNil() { + o.OrgRole.Set(nil) +} + +// UnsetOrgRole ensures that no value is present for OrgRole, not even an explicit nil +func (o *MemberListItem) UnsetOrgRole() { + o.OrgRole.Unset() +} + +// GetWsLevel returns the WsLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MemberListItem) GetWsLevel() int32 { + if o == nil || IsNil(o.WsLevel.Get()) { + var ret int32 + return ret + } + return *o.WsLevel.Get() +} + +// GetWsLevelOk returns a tuple with the WsLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MemberListItem) GetWsLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.WsLevel.Get(), o.WsLevel.IsSet() +} + +// HasWsLevel returns a boolean if a field has been set. +func (o *MemberListItem) HasWsLevel() bool { + if o != nil && o.WsLevel.IsSet() { + return true + } + + return false +} + +// SetWsLevel gets a reference to the given NullableInt32 and assigns it to the WsLevel field. +func (o *MemberListItem) SetWsLevel(v int32) { + o.WsLevel.Set(&v) +} + +// SetWsLevelNil sets the value for WsLevel to be an explicit nil +func (o *MemberListItem) SetWsLevelNil() { + o.WsLevel.Set(nil) +} + +// UnsetWsLevel ensures that no value is present for WsLevel, not even an explicit nil +func (o *MemberListItem) UnsetWsLevel() { + o.WsLevel.Unset() +} + +// GetWsRole returns the WsRole field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MemberListItem) GetWsRole() string { + if o == nil || IsNil(o.WsRole.Get()) { + var ret string + return ret + } + return *o.WsRole.Get() +} + +// GetWsRoleOk returns a tuple with the WsRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MemberListItem) GetWsRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WsRole.Get(), o.WsRole.IsSet() +} + +// HasWsRole returns a boolean if a field has been set. +func (o *MemberListItem) HasWsRole() bool { + if o != nil && o.WsRole.IsSet() { + return true + } + + return false +} + +// SetWsRole gets a reference to the given NullableString and assigns it to the WsRole field. +func (o *MemberListItem) SetWsRole(v string) { + o.WsRole.Set(&v) +} + +// SetWsRoleNil sets the value for WsRole to be an explicit nil +func (o *MemberListItem) SetWsRoleNil() { + o.WsRole.Set(nil) +} + +// UnsetWsRole ensures that no value is present for WsRole, not even an explicit nil +func (o *MemberListItem) UnsetWsRole() { + o.WsRole.Unset() +} + +// GetWorkspaces returns the Workspaces field value if set, zero value otherwise. +func (o *MemberListItem) GetWorkspaces() []MemberWorkspaceAccess { + if o == nil || IsNil(o.Workspaces) { + var ret []MemberWorkspaceAccess + return ret + } + return o.Workspaces +} + +// GetWorkspacesOk returns a tuple with the Workspaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetWorkspacesOk() ([]MemberWorkspaceAccess, bool) { + if o == nil || IsNil(o.Workspaces) { + return nil, false + } + return o.Workspaces, true +} + +// HasWorkspaces returns a boolean if a field has been set. +func (o *MemberListItem) HasWorkspaces() bool { + if o != nil && !IsNil(o.Workspaces) { + return true + } + + return false +} + +// SetWorkspaces gets a reference to the given []MemberWorkspaceAccess and assigns it to the Workspaces field. +func (o *MemberListItem) SetWorkspaces(v []MemberWorkspaceAccess) { + o.Workspaces = v +} + +// GetStatus returns the Status field value +func (o *MemberListItem) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *MemberListItem) SetStatus(v string) { + o.Status = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *MemberListItem) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *MemberListItem) SetCreatedAt(v string) { + o.CreatedAt = v +} + +// GetType returns the Type field value +func (o *MemberListItem) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *MemberListItem) SetType(v string) { + o.Type = v +} + +// GetAutoAccess returns the AutoAccess field value if set, zero value otherwise. +func (o *MemberListItem) GetAutoAccess() bool { + if o == nil || IsNil(o.AutoAccess) { + var ret bool + return ret + } + return *o.AutoAccess +} + +// GetAutoAccessOk returns a tuple with the AutoAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberListItem) GetAutoAccessOk() (*bool, bool) { + if o == nil || IsNil(o.AutoAccess) { + return nil, false + } + return o.AutoAccess, true +} + +// HasAutoAccess returns a boolean if a field has been set. +func (o *MemberListItem) HasAutoAccess() bool { + if o != nil && !IsNil(o.AutoAccess) { + return true + } + + return false +} + +// SetAutoAccess gets a reference to the given bool and assigns it to the AutoAccess field. +func (o *MemberListItem) SetAutoAccess(v bool) { + o.AutoAccess = &v +} + +func (o MemberListItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberListItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + if o.OrgLevel.IsSet() { + toSerialize["org_level"] = o.OrgLevel.Get() + } + if o.OrgRole.IsSet() { + toSerialize["org_role"] = o.OrgRole.Get() + } + if o.WsLevel.IsSet() { + toSerialize["ws_level"] = o.WsLevel.Get() + } + if o.WsRole.IsSet() { + toSerialize["ws_role"] = o.WsRole.Get() + } + if !IsNil(o.Workspaces) { + toSerialize["workspaces"] = o.Workspaces + } + toSerialize["status"] = o.Status + toSerialize["created_at"] = o.CreatedAt + toSerialize["type"] = o.Type + if !IsNil(o.AutoAccess) { + toSerialize["auto_access"] = o.AutoAccess + } + return toSerialize, nil +} + +func (o *MemberListItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "status", + "created_at", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberListItem := _MemberListItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberListItem) + + if err != nil { + return err + } + + *o = MemberListItem(varMemberListItem) + + return err +} + +type NullableMemberListItem struct { + value *MemberListItem + isSet bool +} + +func (v NullableMemberListItem) Get() *MemberListItem { + return v.value +} + +func (v *NullableMemberListItem) Set(val *MemberListItem) { + v.value = val + v.isSet = true +} + +func (v NullableMemberListItem) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberListItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberListItem(val *MemberListItem) *NullableMemberListItem { + return &NullableMemberListItem{value: val, isSet: true} +} + +func (v NullableMemberListItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberListItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_list_response.go b/go/futureagi/model_member_list_response.go new file mode 100644 index 0000000..8badcce --- /dev/null +++ b/go/futureagi/model_member_list_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberListResponse{} + +// MemberListResponse struct for MemberListResponse +type MemberListResponse struct { + Status bool `json:"status"` + Result MemberListResult `json:"result"` +} + +type _MemberListResponse MemberListResponse + +// NewMemberListResponse instantiates a new MemberListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberListResponse(status bool, result MemberListResult) *MemberListResponse { + this := MemberListResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewMemberListResponseWithDefaults instantiates a new MemberListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberListResponseWithDefaults() *MemberListResponse { + this := MemberListResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *MemberListResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *MemberListResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *MemberListResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *MemberListResponse) GetResult() MemberListResult { + if o == nil { + var ret MemberListResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *MemberListResponse) GetResultOk() (*MemberListResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *MemberListResponse) SetResult(v MemberListResult) { + o.Result = v +} + +func (o MemberListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *MemberListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberListResponse := _MemberListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberListResponse) + + if err != nil { + return err + } + + *o = MemberListResponse(varMemberListResponse) + + return err +} + +type NullableMemberListResponse struct { + value *MemberListResponse + isSet bool +} + +func (v NullableMemberListResponse) Get() *MemberListResponse { + return v.value +} + +func (v *NullableMemberListResponse) Set(val *MemberListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMemberListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberListResponse(val *MemberListResponse) *NullableMemberListResponse { + return &NullableMemberListResponse{value: val, isSet: true} +} + +func (v NullableMemberListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_list_result.go b/go/futureagi/model_member_list_result.go new file mode 100644 index 0000000..7c82a81 --- /dev/null +++ b/go/futureagi/model_member_list_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberListResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberListResult{} + +// MemberListResult struct for MemberListResult +type MemberListResult struct { + Results []MemberListItem `json:"results"` + Total int32 `json:"total"` + Page int32 `json:"page"` + Limit int32 `json:"limit"` +} + +type _MemberListResult MemberListResult + +// NewMemberListResult instantiates a new MemberListResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberListResult(results []MemberListItem, total int32, page int32, limit int32) *MemberListResult { + this := MemberListResult{} + this.Results = results + this.Total = total + this.Page = page + this.Limit = limit + return &this +} + +// NewMemberListResultWithDefaults instantiates a new MemberListResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberListResultWithDefaults() *MemberListResult { + this := MemberListResult{} + return &this +} + +// GetResults returns the Results field value +func (o *MemberListResult) GetResults() []MemberListItem { + if o == nil { + var ret []MemberListItem + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *MemberListResult) GetResultsOk() ([]MemberListItem, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *MemberListResult) SetResults(v []MemberListItem) { + o.Results = v +} + +// GetTotal returns the Total field value +func (o *MemberListResult) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *MemberListResult) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *MemberListResult) SetTotal(v int32) { + o.Total = v +} + +// GetPage returns the Page field value +func (o *MemberListResult) GetPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *MemberListResult) GetPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *MemberListResult) SetPage(v int32) { + o.Page = v +} + +// GetLimit returns the Limit field value +func (o *MemberListResult) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *MemberListResult) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *MemberListResult) SetLimit(v int32) { + o.Limit = v +} + +func (o MemberListResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberListResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["results"] = o.Results + toSerialize["total"] = o.Total + toSerialize["page"] = o.Page + toSerialize["limit"] = o.Limit + return toSerialize, nil +} + +func (o *MemberListResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "results", + "total", + "page", + "limit", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberListResult := _MemberListResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberListResult) + + if err != nil { + return err + } + + *o = MemberListResult(varMemberListResult) + + return err +} + +type NullableMemberListResult struct { + value *MemberListResult + isSet bool +} + +func (v NullableMemberListResult) Get() *MemberListResult { + return v.value +} + +func (v *NullableMemberListResult) Set(val *MemberListResult) { + v.value = val + v.isSet = true +} + +func (v NullableMemberListResult) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberListResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberListResult(val *MemberListResult) *NullableMemberListResult { + return &NullableMemberListResult{value: val, isSet: true} +} + +func (v NullableMemberListResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberListResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_remove.go b/go/futureagi/model_member_remove.go new file mode 100644 index 0000000..cb2e987 --- /dev/null +++ b/go/futureagi/model_member_remove.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberRemove type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberRemove{} + +// MemberRemove struct for MemberRemove +type MemberRemove struct { + UserId string `json:"user_id"` +} + +type _MemberRemove MemberRemove + +// NewMemberRemove instantiates a new MemberRemove object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberRemove(userId string) *MemberRemove { + this := MemberRemove{} + this.UserId = userId + return &this +} + +// NewMemberRemoveWithDefaults instantiates a new MemberRemove object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberRemoveWithDefaults() *MemberRemove { + this := MemberRemove{} + return &this +} + +// GetUserId returns the UserId field value +func (o *MemberRemove) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *MemberRemove) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *MemberRemove) SetUserId(v string) { + o.UserId = v +} + +func (o MemberRemove) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberRemove) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + return toSerialize, nil +} + +func (o *MemberRemove) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberRemove := _MemberRemove{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberRemove) + + if err != nil { + return err + } + + *o = MemberRemove(varMemberRemove) + + return err +} + +type NullableMemberRemove struct { + value *MemberRemove + isSet bool +} + +func (v NullableMemberRemove) Get() *MemberRemove { + return v.value +} + +func (v *NullableMemberRemove) Set(val *MemberRemove) { + v.value = val + v.isSet = true +} + +func (v NullableMemberRemove) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberRemove) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberRemove(val *MemberRemove) *NullableMemberRemove { + return &NullableMemberRemove{value: val, isSet: true} +} + +func (v NullableMemberRemove) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberRemove) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_role_update.go b/go/futureagi/model_member_role_update.go new file mode 100644 index 0000000..c604e1f --- /dev/null +++ b/go/futureagi/model_member_role_update.go @@ -0,0 +1,336 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberRoleUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberRoleUpdate{} + +// MemberRoleUpdate struct for MemberRoleUpdate +type MemberRoleUpdate struct { + UserId string `json:"user_id"` + OrgLevel NullableInt32 `json:"org_level,omitempty"` + WsLevel NullableInt32 `json:"ws_level,omitempty"` + // Required when updating ws_level. + WorkspaceId NullableString `json:"workspace_id,omitempty"` + // List of {workspace_id, level} for explicit workspace grants on demotion. + WorkspaceAccess []WorkspaceAccessInput `json:"workspace_access,omitempty"` +} + +type _MemberRoleUpdate MemberRoleUpdate + +// NewMemberRoleUpdate instantiates a new MemberRoleUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberRoleUpdate(userId string) *MemberRoleUpdate { + this := MemberRoleUpdate{} + this.UserId = userId + return &this +} + +// NewMemberRoleUpdateWithDefaults instantiates a new MemberRoleUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberRoleUpdateWithDefaults() *MemberRoleUpdate { + this := MemberRoleUpdate{} + return &this +} + +// GetUserId returns the UserId field value +func (o *MemberRoleUpdate) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *MemberRoleUpdate) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *MemberRoleUpdate) SetUserId(v string) { + o.UserId = v +} + +// GetOrgLevel returns the OrgLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MemberRoleUpdate) GetOrgLevel() int32 { + if o == nil || IsNil(o.OrgLevel.Get()) { + var ret int32 + return ret + } + return *o.OrgLevel.Get() +} + +// GetOrgLevelOk returns a tuple with the OrgLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MemberRoleUpdate) GetOrgLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.OrgLevel.Get(), o.OrgLevel.IsSet() +} + +// HasOrgLevel returns a boolean if a field has been set. +func (o *MemberRoleUpdate) HasOrgLevel() bool { + if o != nil && o.OrgLevel.IsSet() { + return true + } + + return false +} + +// SetOrgLevel gets a reference to the given NullableInt32 and assigns it to the OrgLevel field. +func (o *MemberRoleUpdate) SetOrgLevel(v int32) { + o.OrgLevel.Set(&v) +} + +// SetOrgLevelNil sets the value for OrgLevel to be an explicit nil +func (o *MemberRoleUpdate) SetOrgLevelNil() { + o.OrgLevel.Set(nil) +} + +// UnsetOrgLevel ensures that no value is present for OrgLevel, not even an explicit nil +func (o *MemberRoleUpdate) UnsetOrgLevel() { + o.OrgLevel.Unset() +} + +// GetWsLevel returns the WsLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MemberRoleUpdate) GetWsLevel() int32 { + if o == nil || IsNil(o.WsLevel.Get()) { + var ret int32 + return ret + } + return *o.WsLevel.Get() +} + +// GetWsLevelOk returns a tuple with the WsLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MemberRoleUpdate) GetWsLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.WsLevel.Get(), o.WsLevel.IsSet() +} + +// HasWsLevel returns a boolean if a field has been set. +func (o *MemberRoleUpdate) HasWsLevel() bool { + if o != nil && o.WsLevel.IsSet() { + return true + } + + return false +} + +// SetWsLevel gets a reference to the given NullableInt32 and assigns it to the WsLevel field. +func (o *MemberRoleUpdate) SetWsLevel(v int32) { + o.WsLevel.Set(&v) +} + +// SetWsLevelNil sets the value for WsLevel to be an explicit nil +func (o *MemberRoleUpdate) SetWsLevelNil() { + o.WsLevel.Set(nil) +} + +// UnsetWsLevel ensures that no value is present for WsLevel, not even an explicit nil +func (o *MemberRoleUpdate) UnsetWsLevel() { + o.WsLevel.Unset() +} + +// GetWorkspaceId returns the WorkspaceId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MemberRoleUpdate) GetWorkspaceId() string { + if o == nil || IsNil(o.WorkspaceId.Get()) { + var ret string + return ret + } + return *o.WorkspaceId.Get() +} + +// GetWorkspaceIdOk returns a tuple with the WorkspaceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MemberRoleUpdate) GetWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WorkspaceId.Get(), o.WorkspaceId.IsSet() +} + +// HasWorkspaceId returns a boolean if a field has been set. +func (o *MemberRoleUpdate) HasWorkspaceId() bool { + if o != nil && o.WorkspaceId.IsSet() { + return true + } + + return false +} + +// SetWorkspaceId gets a reference to the given NullableString and assigns it to the WorkspaceId field. +func (o *MemberRoleUpdate) SetWorkspaceId(v string) { + o.WorkspaceId.Set(&v) +} + +// SetWorkspaceIdNil sets the value for WorkspaceId to be an explicit nil +func (o *MemberRoleUpdate) SetWorkspaceIdNil() { + o.WorkspaceId.Set(nil) +} + +// UnsetWorkspaceId ensures that no value is present for WorkspaceId, not even an explicit nil +func (o *MemberRoleUpdate) UnsetWorkspaceId() { + o.WorkspaceId.Unset() +} + +// GetWorkspaceAccess returns the WorkspaceAccess field value if set, zero value otherwise. +func (o *MemberRoleUpdate) GetWorkspaceAccess() []WorkspaceAccessInput { + if o == nil || IsNil(o.WorkspaceAccess) { + var ret []WorkspaceAccessInput + return ret + } + return o.WorkspaceAccess +} + +// GetWorkspaceAccessOk returns a tuple with the WorkspaceAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberRoleUpdate) GetWorkspaceAccessOk() ([]WorkspaceAccessInput, bool) { + if o == nil || IsNil(o.WorkspaceAccess) { + return nil, false + } + return o.WorkspaceAccess, true +} + +// HasWorkspaceAccess returns a boolean if a field has been set. +func (o *MemberRoleUpdate) HasWorkspaceAccess() bool { + if o != nil && !IsNil(o.WorkspaceAccess) { + return true + } + + return false +} + +// SetWorkspaceAccess gets a reference to the given []WorkspaceAccessInput and assigns it to the WorkspaceAccess field. +func (o *MemberRoleUpdate) SetWorkspaceAccess(v []WorkspaceAccessInput) { + o.WorkspaceAccess = v +} + +func (o MemberRoleUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberRoleUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + if o.OrgLevel.IsSet() { + toSerialize["org_level"] = o.OrgLevel.Get() + } + if o.WsLevel.IsSet() { + toSerialize["ws_level"] = o.WsLevel.Get() + } + if o.WorkspaceId.IsSet() { + toSerialize["workspace_id"] = o.WorkspaceId.Get() + } + if !IsNil(o.WorkspaceAccess) { + toSerialize["workspace_access"] = o.WorkspaceAccess + } + return toSerialize, nil +} + +func (o *MemberRoleUpdate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberRoleUpdate := _MemberRoleUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberRoleUpdate) + + if err != nil { + return err + } + + *o = MemberRoleUpdate(varMemberRoleUpdate) + + return err +} + +type NullableMemberRoleUpdate struct { + value *MemberRoleUpdate + isSet bool +} + +func (v NullableMemberRoleUpdate) Get() *MemberRoleUpdate { + return v.value +} + +func (v *NullableMemberRoleUpdate) Set(val *MemberRoleUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableMemberRoleUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberRoleUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberRoleUpdate(val *MemberRoleUpdate) *NullableMemberRoleUpdate { + return &NullableMemberRoleUpdate{value: val, isSet: true} +} + +func (v NullableMemberRoleUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberRoleUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_role_update_response.go b/go/futureagi/model_member_role_update_response.go new file mode 100644 index 0000000..4ac67be --- /dev/null +++ b/go/futureagi/model_member_role_update_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberRoleUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberRoleUpdateResponse{} + +// MemberRoleUpdateResponse struct for MemberRoleUpdateResponse +type MemberRoleUpdateResponse struct { + Status bool `json:"status"` + Result MemberRoleUpdateResult `json:"result"` +} + +type _MemberRoleUpdateResponse MemberRoleUpdateResponse + +// NewMemberRoleUpdateResponse instantiates a new MemberRoleUpdateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberRoleUpdateResponse(status bool, result MemberRoleUpdateResult) *MemberRoleUpdateResponse { + this := MemberRoleUpdateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewMemberRoleUpdateResponseWithDefaults instantiates a new MemberRoleUpdateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberRoleUpdateResponseWithDefaults() *MemberRoleUpdateResponse { + this := MemberRoleUpdateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *MemberRoleUpdateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *MemberRoleUpdateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *MemberRoleUpdateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *MemberRoleUpdateResponse) GetResult() MemberRoleUpdateResult { + if o == nil { + var ret MemberRoleUpdateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *MemberRoleUpdateResponse) GetResultOk() (*MemberRoleUpdateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *MemberRoleUpdateResponse) SetResult(v MemberRoleUpdateResult) { + o.Result = v +} + +func (o MemberRoleUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberRoleUpdateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *MemberRoleUpdateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberRoleUpdateResponse := _MemberRoleUpdateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberRoleUpdateResponse) + + if err != nil { + return err + } + + *o = MemberRoleUpdateResponse(varMemberRoleUpdateResponse) + + return err +} + +type NullableMemberRoleUpdateResponse struct { + value *MemberRoleUpdateResponse + isSet bool +} + +func (v NullableMemberRoleUpdateResponse) Get() *MemberRoleUpdateResponse { + return v.value +} + +func (v *NullableMemberRoleUpdateResponse) Set(val *MemberRoleUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMemberRoleUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberRoleUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberRoleUpdateResponse(val *MemberRoleUpdateResponse) *NullableMemberRoleUpdateResponse { + return &NullableMemberRoleUpdateResponse{value: val, isSet: true} +} + +func (v NullableMemberRoleUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberRoleUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_role_update_result.go b/go/futureagi/model_member_role_update_result.go new file mode 100644 index 0000000..e9d5026 --- /dev/null +++ b/go/futureagi/model_member_role_update_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberRoleUpdateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberRoleUpdateResult{} + +// MemberRoleUpdateResult struct for MemberRoleUpdateResult +type MemberRoleUpdateResult struct { + Message string `json:"message"` + Changes map[string]interface{} `json:"changes"` +} + +type _MemberRoleUpdateResult MemberRoleUpdateResult + +// NewMemberRoleUpdateResult instantiates a new MemberRoleUpdateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberRoleUpdateResult(message string, changes map[string]interface{}) *MemberRoleUpdateResult { + this := MemberRoleUpdateResult{} + this.Message = message + this.Changes = changes + return &this +} + +// NewMemberRoleUpdateResultWithDefaults instantiates a new MemberRoleUpdateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberRoleUpdateResultWithDefaults() *MemberRoleUpdateResult { + this := MemberRoleUpdateResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *MemberRoleUpdateResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *MemberRoleUpdateResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *MemberRoleUpdateResult) SetMessage(v string) { + o.Message = v +} + +// GetChanges returns the Changes field value +func (o *MemberRoleUpdateResult) GetChanges() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Changes +} + +// GetChangesOk returns a tuple with the Changes field value +// and a boolean to check if the value has been set. +func (o *MemberRoleUpdateResult) GetChangesOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Changes, true +} + +// SetChanges sets field value +func (o *MemberRoleUpdateResult) SetChanges(v map[string]interface{}) { + o.Changes = v +} + +func (o MemberRoleUpdateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberRoleUpdateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["changes"] = o.Changes + return toSerialize, nil +} + +func (o *MemberRoleUpdateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "changes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberRoleUpdateResult := _MemberRoleUpdateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberRoleUpdateResult) + + if err != nil { + return err + } + + *o = MemberRoleUpdateResult(varMemberRoleUpdateResult) + + return err +} + +type NullableMemberRoleUpdateResult struct { + value *MemberRoleUpdateResult + isSet bool +} + +func (v NullableMemberRoleUpdateResult) Get() *MemberRoleUpdateResult { + return v.value +} + +func (v *NullableMemberRoleUpdateResult) Set(val *MemberRoleUpdateResult) { + v.value = val + v.isSet = true +} + +func (v NullableMemberRoleUpdateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberRoleUpdateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberRoleUpdateResult(val *MemberRoleUpdateResult) *NullableMemberRoleUpdateResult { + return &NullableMemberRoleUpdateResult{value: val, isSet: true} +} + +func (v NullableMemberRoleUpdateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberRoleUpdateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_user_mutation_response.go b/go/futureagi/model_member_user_mutation_response.go new file mode 100644 index 0000000..33443a0 --- /dev/null +++ b/go/futureagi/model_member_user_mutation_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberUserMutationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberUserMutationResponse{} + +// MemberUserMutationResponse struct for MemberUserMutationResponse +type MemberUserMutationResponse struct { + Status bool `json:"status"` + Result MemberUserMutationResult `json:"result"` +} + +type _MemberUserMutationResponse MemberUserMutationResponse + +// NewMemberUserMutationResponse instantiates a new MemberUserMutationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberUserMutationResponse(status bool, result MemberUserMutationResult) *MemberUserMutationResponse { + this := MemberUserMutationResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewMemberUserMutationResponseWithDefaults instantiates a new MemberUserMutationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberUserMutationResponseWithDefaults() *MemberUserMutationResponse { + this := MemberUserMutationResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *MemberUserMutationResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *MemberUserMutationResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *MemberUserMutationResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *MemberUserMutationResponse) GetResult() MemberUserMutationResult { + if o == nil { + var ret MemberUserMutationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *MemberUserMutationResponse) GetResultOk() (*MemberUserMutationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *MemberUserMutationResponse) SetResult(v MemberUserMutationResult) { + o.Result = v +} + +func (o MemberUserMutationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberUserMutationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *MemberUserMutationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberUserMutationResponse := _MemberUserMutationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberUserMutationResponse) + + if err != nil { + return err + } + + *o = MemberUserMutationResponse(varMemberUserMutationResponse) + + return err +} + +type NullableMemberUserMutationResponse struct { + value *MemberUserMutationResponse + isSet bool +} + +func (v NullableMemberUserMutationResponse) Get() *MemberUserMutationResponse { + return v.value +} + +func (v *NullableMemberUserMutationResponse) Set(val *MemberUserMutationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMemberUserMutationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberUserMutationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberUserMutationResponse(val *MemberUserMutationResponse) *NullableMemberUserMutationResponse { + return &NullableMemberUserMutationResponse{value: val, isSet: true} +} + +func (v NullableMemberUserMutationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberUserMutationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_user_mutation_result.go b/go/futureagi/model_member_user_mutation_result.go new file mode 100644 index 0000000..d8d0d8d --- /dev/null +++ b/go/futureagi/model_member_user_mutation_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberUserMutationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberUserMutationResult{} + +// MemberUserMutationResult struct for MemberUserMutationResult +type MemberUserMutationResult struct { + Message string `json:"message"` + UserId string `json:"user_id"` +} + +type _MemberUserMutationResult MemberUserMutationResult + +// NewMemberUserMutationResult instantiates a new MemberUserMutationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberUserMutationResult(message string, userId string) *MemberUserMutationResult { + this := MemberUserMutationResult{} + this.Message = message + this.UserId = userId + return &this +} + +// NewMemberUserMutationResultWithDefaults instantiates a new MemberUserMutationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberUserMutationResultWithDefaults() *MemberUserMutationResult { + this := MemberUserMutationResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *MemberUserMutationResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *MemberUserMutationResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *MemberUserMutationResult) SetMessage(v string) { + o.Message = v +} + +// GetUserId returns the UserId field value +func (o *MemberUserMutationResult) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *MemberUserMutationResult) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *MemberUserMutationResult) SetUserId(v string) { + o.UserId = v +} + +func (o MemberUserMutationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberUserMutationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["user_id"] = o.UserId + return toSerialize, nil +} + +func (o *MemberUserMutationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "user_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberUserMutationResult := _MemberUserMutationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberUserMutationResult) + + if err != nil { + return err + } + + *o = MemberUserMutationResult(varMemberUserMutationResult) + + return err +} + +type NullableMemberUserMutationResult struct { + value *MemberUserMutationResult + isSet bool +} + +func (v NullableMemberUserMutationResult) Get() *MemberUserMutationResult { + return v.value +} + +func (v *NullableMemberUserMutationResult) Set(val *MemberUserMutationResult) { + v.value = val + v.isSet = true +} + +func (v NullableMemberUserMutationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberUserMutationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberUserMutationResult(val *MemberUserMutationResult) *NullableMemberUserMutationResult { + return &NullableMemberUserMutationResult{value: val, isSet: true} +} + +func (v NullableMemberUserMutationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberUserMutationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_member_workspace_access.go b/go/futureagi/model_member_workspace_access.go new file mode 100644 index 0000000..45fddf5 --- /dev/null +++ b/go/futureagi/model_member_workspace_access.go @@ -0,0 +1,277 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MemberWorkspaceAccess type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberWorkspaceAccess{} + +// MemberWorkspaceAccess struct for MemberWorkspaceAccess +type MemberWorkspaceAccess struct { + WorkspaceId string `json:"workspace_id"` + WorkspaceName string `json:"workspace_name"` + WsLevel int32 `json:"ws_level"` + WsRole string `json:"ws_role"` + AutoAccess *bool `json:"auto_access,omitempty"` +} + +type _MemberWorkspaceAccess MemberWorkspaceAccess + +// NewMemberWorkspaceAccess instantiates a new MemberWorkspaceAccess object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMemberWorkspaceAccess(workspaceId string, workspaceName string, wsLevel int32, wsRole string) *MemberWorkspaceAccess { + this := MemberWorkspaceAccess{} + this.WorkspaceId = workspaceId + this.WorkspaceName = workspaceName + this.WsLevel = wsLevel + this.WsRole = wsRole + return &this +} + +// NewMemberWorkspaceAccessWithDefaults instantiates a new MemberWorkspaceAccess object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberWorkspaceAccessWithDefaults() *MemberWorkspaceAccess { + this := MemberWorkspaceAccess{} + return &this +} + +// GetWorkspaceId returns the WorkspaceId field value +func (o *MemberWorkspaceAccess) GetWorkspaceId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceId +} + +// GetWorkspaceIdOk returns a tuple with the WorkspaceId field value +// and a boolean to check if the value has been set. +func (o *MemberWorkspaceAccess) GetWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceId, true +} + +// SetWorkspaceId sets field value +func (o *MemberWorkspaceAccess) SetWorkspaceId(v string) { + o.WorkspaceId = v +} + +// GetWorkspaceName returns the WorkspaceName field value +func (o *MemberWorkspaceAccess) GetWorkspaceName() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceName +} + +// GetWorkspaceNameOk returns a tuple with the WorkspaceName field value +// and a boolean to check if the value has been set. +func (o *MemberWorkspaceAccess) GetWorkspaceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceName, true +} + +// SetWorkspaceName sets field value +func (o *MemberWorkspaceAccess) SetWorkspaceName(v string) { + o.WorkspaceName = v +} + +// GetWsLevel returns the WsLevel field value +func (o *MemberWorkspaceAccess) GetWsLevel() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.WsLevel +} + +// GetWsLevelOk returns a tuple with the WsLevel field value +// and a boolean to check if the value has been set. +func (o *MemberWorkspaceAccess) GetWsLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.WsLevel, true +} + +// SetWsLevel sets field value +func (o *MemberWorkspaceAccess) SetWsLevel(v int32) { + o.WsLevel = v +} + +// GetWsRole returns the WsRole field value +func (o *MemberWorkspaceAccess) GetWsRole() string { + if o == nil { + var ret string + return ret + } + + return o.WsRole +} + +// GetWsRoleOk returns a tuple with the WsRole field value +// and a boolean to check if the value has been set. +func (o *MemberWorkspaceAccess) GetWsRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WsRole, true +} + +// SetWsRole sets field value +func (o *MemberWorkspaceAccess) SetWsRole(v string) { + o.WsRole = v +} + +// GetAutoAccess returns the AutoAccess field value if set, zero value otherwise. +func (o *MemberWorkspaceAccess) GetAutoAccess() bool { + if o == nil || IsNil(o.AutoAccess) { + var ret bool + return ret + } + return *o.AutoAccess +} + +// GetAutoAccessOk returns a tuple with the AutoAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberWorkspaceAccess) GetAutoAccessOk() (*bool, bool) { + if o == nil || IsNil(o.AutoAccess) { + return nil, false + } + return o.AutoAccess, true +} + +// HasAutoAccess returns a boolean if a field has been set. +func (o *MemberWorkspaceAccess) HasAutoAccess() bool { + if o != nil && !IsNil(o.AutoAccess) { + return true + } + + return false +} + +// SetAutoAccess gets a reference to the given bool and assigns it to the AutoAccess field. +func (o *MemberWorkspaceAccess) SetAutoAccess(v bool) { + o.AutoAccess = &v +} + +func (o MemberWorkspaceAccess) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberWorkspaceAccess) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["workspace_id"] = o.WorkspaceId + toSerialize["workspace_name"] = o.WorkspaceName + toSerialize["ws_level"] = o.WsLevel + toSerialize["ws_role"] = o.WsRole + if !IsNil(o.AutoAccess) { + toSerialize["auto_access"] = o.AutoAccess + } + return toSerialize, nil +} + +func (o *MemberWorkspaceAccess) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "workspace_id", + "workspace_name", + "ws_level", + "ws_role", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMemberWorkspaceAccess := _MemberWorkspaceAccess{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMemberWorkspaceAccess) + + if err != nil { + return err + } + + *o = MemberWorkspaceAccess(varMemberWorkspaceAccess) + + return err +} + +type NullableMemberWorkspaceAccess struct { + value *MemberWorkspaceAccess + isSet bool +} + +func (v NullableMemberWorkspaceAccess) Get() *MemberWorkspaceAccess { + return v.value +} + +func (v *NullableMemberWorkspaceAccess) Set(val *MemberWorkspaceAccess) { + v.value = val + v.isSet = true +} + +func (v NullableMemberWorkspaceAccess) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberWorkspaceAccess) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberWorkspaceAccess(val *MemberWorkspaceAccess) *NullableMemberWorkspaceAccess { + return &NullableMemberWorkspaceAccess{value: val, isSet: true} +} + +func (v NullableMemberWorkspaceAccess) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberWorkspaceAccess) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_merge_dataset_request.go b/go/futureagi/model_merge_dataset_request.go new file mode 100644 index 0000000..9b34d1e --- /dev/null +++ b/go/futureagi/model_merge_dataset_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MergeDatasetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MergeDatasetRequest{} + +// MergeDatasetRequest struct for MergeDatasetRequest +type MergeDatasetRequest struct { + RowIds []string `json:"row_ids,omitempty"` + SelectedAllRows *bool `json:"selected_all_rows,omitempty"` + TargetDatasetId string `json:"target_dataset_id"` +} + +type _MergeDatasetRequest MergeDatasetRequest + +// NewMergeDatasetRequest instantiates a new MergeDatasetRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMergeDatasetRequest(targetDatasetId string) *MergeDatasetRequest { + this := MergeDatasetRequest{} + var selectedAllRows bool = false + this.SelectedAllRows = &selectedAllRows + this.TargetDatasetId = targetDatasetId + return &this +} + +// NewMergeDatasetRequestWithDefaults instantiates a new MergeDatasetRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMergeDatasetRequestWithDefaults() *MergeDatasetRequest { + this := MergeDatasetRequest{} + var selectedAllRows bool = false + this.SelectedAllRows = &selectedAllRows + return &this +} + +// GetRowIds returns the RowIds field value if set, zero value otherwise. +func (o *MergeDatasetRequest) GetRowIds() []string { + if o == nil || IsNil(o.RowIds) { + var ret []string + return ret + } + return o.RowIds +} + +// GetRowIdsOk returns a tuple with the RowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MergeDatasetRequest) GetRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.RowIds) { + return nil, false + } + return o.RowIds, true +} + +// HasRowIds returns a boolean if a field has been set. +func (o *MergeDatasetRequest) HasRowIds() bool { + if o != nil && !IsNil(o.RowIds) { + return true + } + + return false +} + +// SetRowIds gets a reference to the given []string and assigns it to the RowIds field. +func (o *MergeDatasetRequest) SetRowIds(v []string) { + o.RowIds = v +} + +// GetSelectedAllRows returns the SelectedAllRows field value if set, zero value otherwise. +func (o *MergeDatasetRequest) GetSelectedAllRows() bool { + if o == nil || IsNil(o.SelectedAllRows) { + var ret bool + return ret + } + return *o.SelectedAllRows +} + +// GetSelectedAllRowsOk returns a tuple with the SelectedAllRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MergeDatasetRequest) GetSelectedAllRowsOk() (*bool, bool) { + if o == nil || IsNil(o.SelectedAllRows) { + return nil, false + } + return o.SelectedAllRows, true +} + +// HasSelectedAllRows returns a boolean if a field has been set. +func (o *MergeDatasetRequest) HasSelectedAllRows() bool { + if o != nil && !IsNil(o.SelectedAllRows) { + return true + } + + return false +} + +// SetSelectedAllRows gets a reference to the given bool and assigns it to the SelectedAllRows field. +func (o *MergeDatasetRequest) SetSelectedAllRows(v bool) { + o.SelectedAllRows = &v +} + +// GetTargetDatasetId returns the TargetDatasetId field value +func (o *MergeDatasetRequest) GetTargetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.TargetDatasetId +} + +// GetTargetDatasetIdOk returns a tuple with the TargetDatasetId field value +// and a boolean to check if the value has been set. +func (o *MergeDatasetRequest) GetTargetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TargetDatasetId, true +} + +// SetTargetDatasetId sets field value +func (o *MergeDatasetRequest) SetTargetDatasetId(v string) { + o.TargetDatasetId = v +} + +func (o MergeDatasetRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MergeDatasetRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RowIds) { + toSerialize["row_ids"] = o.RowIds + } + if !IsNil(o.SelectedAllRows) { + toSerialize["selected_all_rows"] = o.SelectedAllRows + } + toSerialize["target_dataset_id"] = o.TargetDatasetId + return toSerialize, nil +} + +func (o *MergeDatasetRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "target_dataset_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMergeDatasetRequest := _MergeDatasetRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMergeDatasetRequest) + + if err != nil { + return err + } + + *o = MergeDatasetRequest(varMergeDatasetRequest) + + return err +} + +type NullableMergeDatasetRequest struct { + value *MergeDatasetRequest + isSet bool +} + +func (v NullableMergeDatasetRequest) Get() *MergeDatasetRequest { + return v.value +} + +func (v *NullableMergeDatasetRequest) Set(val *MergeDatasetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableMergeDatasetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableMergeDatasetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMergeDatasetRequest(val *MergeDatasetRequest) *NullableMergeDatasetRequest { + return &NullableMergeDatasetRequest{value: val, isSet: true} +} + +func (v NullableMergeDatasetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMergeDatasetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_merge_dataset_response.go b/go/futureagi/model_merge_dataset_response.go new file mode 100644 index 0000000..66aaabc --- /dev/null +++ b/go/futureagi/model_merge_dataset_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MergeDatasetResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MergeDatasetResponse{} + +// MergeDatasetResponse struct for MergeDatasetResponse +type MergeDatasetResponse struct { + Status bool `json:"status"` + Result MergeDatasetResult `json:"result"` +} + +type _MergeDatasetResponse MergeDatasetResponse + +// NewMergeDatasetResponse instantiates a new MergeDatasetResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMergeDatasetResponse(status bool, result MergeDatasetResult) *MergeDatasetResponse { + this := MergeDatasetResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewMergeDatasetResponseWithDefaults instantiates a new MergeDatasetResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMergeDatasetResponseWithDefaults() *MergeDatasetResponse { + this := MergeDatasetResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *MergeDatasetResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *MergeDatasetResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *MergeDatasetResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *MergeDatasetResponse) GetResult() MergeDatasetResult { + if o == nil { + var ret MergeDatasetResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *MergeDatasetResponse) GetResultOk() (*MergeDatasetResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *MergeDatasetResponse) SetResult(v MergeDatasetResult) { + o.Result = v +} + +func (o MergeDatasetResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MergeDatasetResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *MergeDatasetResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMergeDatasetResponse := _MergeDatasetResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMergeDatasetResponse) + + if err != nil { + return err + } + + *o = MergeDatasetResponse(varMergeDatasetResponse) + + return err +} + +type NullableMergeDatasetResponse struct { + value *MergeDatasetResponse + isSet bool +} + +func (v NullableMergeDatasetResponse) Get() *MergeDatasetResponse { + return v.value +} + +func (v *NullableMergeDatasetResponse) Set(val *MergeDatasetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMergeDatasetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMergeDatasetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMergeDatasetResponse(val *MergeDatasetResponse) *NullableMergeDatasetResponse { + return &NullableMergeDatasetResponse{value: val, isSet: true} +} + +func (v NullableMergeDatasetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMergeDatasetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_merge_dataset_result.go b/go/futureagi/model_merge_dataset_result.go new file mode 100644 index 0000000..cf24aa1 --- /dev/null +++ b/go/futureagi/model_merge_dataset_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the MergeDatasetResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MergeDatasetResult{} + +// MergeDatasetResult struct for MergeDatasetResult +type MergeDatasetResult struct { + Message string `json:"message"` + RowsAdded int32 `json:"rows_added"` + NewColumnsCreated int32 `json:"new_columns_created"` + ColumnsMapped int32 `json:"columns_mapped"` +} + +type _MergeDatasetResult MergeDatasetResult + +// NewMergeDatasetResult instantiates a new MergeDatasetResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMergeDatasetResult(message string, rowsAdded int32, newColumnsCreated int32, columnsMapped int32) *MergeDatasetResult { + this := MergeDatasetResult{} + this.Message = message + this.RowsAdded = rowsAdded + this.NewColumnsCreated = newColumnsCreated + this.ColumnsMapped = columnsMapped + return &this +} + +// NewMergeDatasetResultWithDefaults instantiates a new MergeDatasetResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMergeDatasetResultWithDefaults() *MergeDatasetResult { + this := MergeDatasetResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *MergeDatasetResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *MergeDatasetResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *MergeDatasetResult) SetMessage(v string) { + o.Message = v +} + +// GetRowsAdded returns the RowsAdded field value +func (o *MergeDatasetResult) GetRowsAdded() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowsAdded +} + +// GetRowsAddedOk returns a tuple with the RowsAdded field value +// and a boolean to check if the value has been set. +func (o *MergeDatasetResult) GetRowsAddedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowsAdded, true +} + +// SetRowsAdded sets field value +func (o *MergeDatasetResult) SetRowsAdded(v int32) { + o.RowsAdded = v +} + +// GetNewColumnsCreated returns the NewColumnsCreated field value +func (o *MergeDatasetResult) GetNewColumnsCreated() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NewColumnsCreated +} + +// GetNewColumnsCreatedOk returns a tuple with the NewColumnsCreated field value +// and a boolean to check if the value has been set. +func (o *MergeDatasetResult) GetNewColumnsCreatedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NewColumnsCreated, true +} + +// SetNewColumnsCreated sets field value +func (o *MergeDatasetResult) SetNewColumnsCreated(v int32) { + o.NewColumnsCreated = v +} + +// GetColumnsMapped returns the ColumnsMapped field value +func (o *MergeDatasetResult) GetColumnsMapped() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ColumnsMapped +} + +// GetColumnsMappedOk returns a tuple with the ColumnsMapped field value +// and a boolean to check if the value has been set. +func (o *MergeDatasetResult) GetColumnsMappedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ColumnsMapped, true +} + +// SetColumnsMapped sets field value +func (o *MergeDatasetResult) SetColumnsMapped(v int32) { + o.ColumnsMapped = v +} + +func (o MergeDatasetResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MergeDatasetResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["rows_added"] = o.RowsAdded + toSerialize["new_columns_created"] = o.NewColumnsCreated + toSerialize["columns_mapped"] = o.ColumnsMapped + return toSerialize, nil +} + +func (o *MergeDatasetResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "rows_added", + "new_columns_created", + "columns_mapped", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMergeDatasetResult := _MergeDatasetResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMergeDatasetResult) + + if err != nil { + return err + } + + *o = MergeDatasetResult(varMergeDatasetResult) + + return err +} + +type NullableMergeDatasetResult struct { + value *MergeDatasetResult + isSet bool +} + +func (v NullableMergeDatasetResult) Get() *MergeDatasetResult { + return v.value +} + +func (v *NullableMergeDatasetResult) Set(val *MergeDatasetResult) { + v.value = val + v.isSet = true +} + +func (v NullableMergeDatasetResult) IsSet() bool { + return v.isSet +} + +func (v *NullableMergeDatasetResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMergeDatasetResult(val *MergeDatasetResult) *NullableMergeDatasetResult { + return &NullableMergeDatasetResult{value: val, isSet: true} +} + +func (v NullableMergeDatasetResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMergeDatasetResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_annotation_queues_automation_rules_list_200_response.go b/go/futureagi/model_model_hub_annotation_queues_automation_rules_list_200_response.go new file mode 100644 index 0000000..d734a31 --- /dev/null +++ b/go/futureagi/model_model_hub_annotation_queues_automation_rules_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubAnnotationQueuesAutomationRulesList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubAnnotationQueuesAutomationRulesList200Response{} + +// ModelHubAnnotationQueuesAutomationRulesList200Response struct for ModelHubAnnotationQueuesAutomationRulesList200Response +type ModelHubAnnotationQueuesAutomationRulesList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AutomationRule `json:"results"` +} + +type _ModelHubAnnotationQueuesAutomationRulesList200Response ModelHubAnnotationQueuesAutomationRulesList200Response + +// NewModelHubAnnotationQueuesAutomationRulesList200Response instantiates a new ModelHubAnnotationQueuesAutomationRulesList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubAnnotationQueuesAutomationRulesList200Response(count int32, results []AutomationRule) *ModelHubAnnotationQueuesAutomationRulesList200Response { + this := ModelHubAnnotationQueuesAutomationRulesList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewModelHubAnnotationQueuesAutomationRulesList200ResponseWithDefaults instantiates a new ModelHubAnnotationQueuesAutomationRulesList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubAnnotationQueuesAutomationRulesList200ResponseWithDefaults() *ModelHubAnnotationQueuesAutomationRulesList200Response { + this := ModelHubAnnotationQueuesAutomationRulesList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetResults() []AutomationRule { + if o == nil { + var ret []AutomationRule + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) GetResultsOk() ([]AutomationRule, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) SetResults(v []AutomationRule) { + o.Results = v +} + +func (o ModelHubAnnotationQueuesAutomationRulesList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubAnnotationQueuesAutomationRulesList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ModelHubAnnotationQueuesAutomationRulesList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubAnnotationQueuesAutomationRulesList200Response := _ModelHubAnnotationQueuesAutomationRulesList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubAnnotationQueuesAutomationRulesList200Response) + + if err != nil { + return err + } + + *o = ModelHubAnnotationQueuesAutomationRulesList200Response(varModelHubAnnotationQueuesAutomationRulesList200Response) + + return err +} + +type NullableModelHubAnnotationQueuesAutomationRulesList200Response struct { + value *ModelHubAnnotationQueuesAutomationRulesList200Response + isSet bool +} + +func (v NullableModelHubAnnotationQueuesAutomationRulesList200Response) Get() *ModelHubAnnotationQueuesAutomationRulesList200Response { + return v.value +} + +func (v *NullableModelHubAnnotationQueuesAutomationRulesList200Response) Set(val *ModelHubAnnotationQueuesAutomationRulesList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubAnnotationQueuesAutomationRulesList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubAnnotationQueuesAutomationRulesList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubAnnotationQueuesAutomationRulesList200Response(val *ModelHubAnnotationQueuesAutomationRulesList200Response) *NullableModelHubAnnotationQueuesAutomationRulesList200Response { + return &NullableModelHubAnnotationQueuesAutomationRulesList200Response{value: val, isSet: true} +} + +func (v NullableModelHubAnnotationQueuesAutomationRulesList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubAnnotationQueuesAutomationRulesList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_api_keys_list_200_response.go b/go/futureagi/model_model_hub_api_keys_list_200_response.go new file mode 100644 index 0000000..c822603 --- /dev/null +++ b/go/futureagi/model_model_hub_api_keys_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubApiKeysList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubApiKeysList200Response{} + +// ModelHubApiKeysList200Response struct for ModelHubApiKeysList200Response +type ModelHubApiKeysList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ApiKey `json:"results"` +} + +type _ModelHubApiKeysList200Response ModelHubApiKeysList200Response + +// NewModelHubApiKeysList200Response instantiates a new ModelHubApiKeysList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubApiKeysList200Response(count int32, results []ApiKey) *ModelHubApiKeysList200Response { + this := ModelHubApiKeysList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewModelHubApiKeysList200ResponseWithDefaults instantiates a new ModelHubApiKeysList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubApiKeysList200ResponseWithDefaults() *ModelHubApiKeysList200Response { + this := ModelHubApiKeysList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ModelHubApiKeysList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ModelHubApiKeysList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ModelHubApiKeysList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubApiKeysList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubApiKeysList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ModelHubApiKeysList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ModelHubApiKeysList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ModelHubApiKeysList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ModelHubApiKeysList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubApiKeysList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubApiKeysList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ModelHubApiKeysList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ModelHubApiKeysList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ModelHubApiKeysList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ModelHubApiKeysList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ModelHubApiKeysList200Response) GetResults() []ApiKey { + if o == nil { + var ret []ApiKey + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ModelHubApiKeysList200Response) GetResultsOk() ([]ApiKey, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ModelHubApiKeysList200Response) SetResults(v []ApiKey) { + o.Results = v +} + +func (o ModelHubApiKeysList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubApiKeysList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ModelHubApiKeysList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubApiKeysList200Response := _ModelHubApiKeysList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubApiKeysList200Response) + + if err != nil { + return err + } + + *o = ModelHubApiKeysList200Response(varModelHubApiKeysList200Response) + + return err +} + +type NullableModelHubApiKeysList200Response struct { + value *ModelHubApiKeysList200Response + isSet bool +} + +func (v NullableModelHubApiKeysList200Response) Get() *ModelHubApiKeysList200Response { + return v.value +} + +func (v *NullableModelHubApiKeysList200Response) Set(val *ModelHubApiKeysList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubApiKeysList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubApiKeysList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubApiKeysList200Response(val *ModelHubApiKeysList200Response) *NullableModelHubApiKeysList200Response { + return &NullableModelHubApiKeysList200Response{value: val, isSet: true} +} + +func (v NullableModelHubApiKeysList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubApiKeysList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_error_response.go b/go/futureagi/model_model_hub_error_response.go new file mode 100644 index 0000000..6c999bf --- /dev/null +++ b/go/futureagi/model_model_hub_error_response.go @@ -0,0 +1,490 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ModelHubErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubErrorResponse{} + +// ModelHubErrorResponse struct for ModelHubErrorResponse +type ModelHubErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewModelHubErrorResponse instantiates a new ModelHubErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubErrorResponse() *ModelHubErrorResponse { + this := ModelHubErrorResponse{} + return &this +} + +// NewModelHubErrorResponseWithDefaults instantiates a new ModelHubErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubErrorResponseWithDefaults() *ModelHubErrorResponse { + this := ModelHubErrorResponse{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ModelHubErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelHubErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ModelHubErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ModelHubErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ModelHubErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ModelHubErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ModelHubErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ModelHubErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ModelHubErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ModelHubErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ModelHubErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ModelHubErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ModelHubErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ModelHubErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ModelHubErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ModelHubErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ModelHubErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ModelHubErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ModelHubErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ModelHubErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ModelHubErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ModelHubErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ModelHubErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ModelHubErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ModelHubErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelHubErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ModelHubErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ModelHubErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ModelHubErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableModelHubErrorResponse struct { + value *ModelHubErrorResponse + isSet bool +} + +func (v NullableModelHubErrorResponse) Get() *ModelHubErrorResponse { + return v.value +} + +func (v *NullableModelHubErrorResponse) Set(val *ModelHubErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubErrorResponse(val *ModelHubErrorResponse) *NullableModelHubErrorResponse { + return &NullableModelHubErrorResponse{value: val, isSet: true} +} + +func (v NullableModelHubErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_paginated_response.go b/go/futureagi/model_model_hub_paginated_response.go new file mode 100644 index 0000000..7645d4f --- /dev/null +++ b/go/futureagi/model_model_hub_paginated_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubPaginatedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubPaginatedResponse{} + +// ModelHubPaginatedResponse struct for ModelHubPaginatedResponse +type ModelHubPaginatedResponse struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []map[string]interface{} `json:"results"` +} + +type _ModelHubPaginatedResponse ModelHubPaginatedResponse + +// NewModelHubPaginatedResponse instantiates a new ModelHubPaginatedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubPaginatedResponse(count int32, results []map[string]interface{}) *ModelHubPaginatedResponse { + this := ModelHubPaginatedResponse{} + this.Count = count + this.Results = results + return &this +} + +// NewModelHubPaginatedResponseWithDefaults instantiates a new ModelHubPaginatedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubPaginatedResponseWithDefaults() *ModelHubPaginatedResponse { + this := ModelHubPaginatedResponse{} + return &this +} + +// GetCount returns the Count field value +func (o *ModelHubPaginatedResponse) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ModelHubPaginatedResponse) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ModelHubPaginatedResponse) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPaginatedResponse) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPaginatedResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ModelHubPaginatedResponse) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ModelHubPaginatedResponse) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ModelHubPaginatedResponse) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ModelHubPaginatedResponse) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPaginatedResponse) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPaginatedResponse) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ModelHubPaginatedResponse) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ModelHubPaginatedResponse) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ModelHubPaginatedResponse) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ModelHubPaginatedResponse) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ModelHubPaginatedResponse) GetResults() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ModelHubPaginatedResponse) GetResultsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ModelHubPaginatedResponse) SetResults(v []map[string]interface{}) { + o.Results = v +} + +func (o ModelHubPaginatedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubPaginatedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ModelHubPaginatedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubPaginatedResponse := _ModelHubPaginatedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubPaginatedResponse) + + if err != nil { + return err + } + + *o = ModelHubPaginatedResponse(varModelHubPaginatedResponse) + + return err +} + +type NullableModelHubPaginatedResponse struct { + value *ModelHubPaginatedResponse + isSet bool +} + +func (v NullableModelHubPaginatedResponse) Get() *ModelHubPaginatedResponse { + return v.value +} + +func (v *NullableModelHubPaginatedResponse) Set(val *ModelHubPaginatedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubPaginatedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubPaginatedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubPaginatedResponse(val *ModelHubPaginatedResponse) *NullableModelHubPaginatedResponse { + return &NullableModelHubPaginatedResponse{value: val, isSet: true} +} + +func (v NullableModelHubPaginatedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubPaginatedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_prompt_history_executions_list_200_response.go b/go/futureagi/model_model_hub_prompt_history_executions_list_200_response.go new file mode 100644 index 0000000..8a8a217 --- /dev/null +++ b/go/futureagi/model_model_hub_prompt_history_executions_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubPromptHistoryExecutionsList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubPromptHistoryExecutionsList200Response{} + +// ModelHubPromptHistoryExecutionsList200Response struct for ModelHubPromptHistoryExecutionsList200Response +type ModelHubPromptHistoryExecutionsList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PromptHistoryExecution `json:"results"` +} + +type _ModelHubPromptHistoryExecutionsList200Response ModelHubPromptHistoryExecutionsList200Response + +// NewModelHubPromptHistoryExecutionsList200Response instantiates a new ModelHubPromptHistoryExecutionsList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubPromptHistoryExecutionsList200Response(count int32, results []PromptHistoryExecution) *ModelHubPromptHistoryExecutionsList200Response { + this := ModelHubPromptHistoryExecutionsList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewModelHubPromptHistoryExecutionsList200ResponseWithDefaults instantiates a new ModelHubPromptHistoryExecutionsList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubPromptHistoryExecutionsList200ResponseWithDefaults() *ModelHubPromptHistoryExecutionsList200Response { + this := ModelHubPromptHistoryExecutionsList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ModelHubPromptHistoryExecutionsList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ModelHubPromptHistoryExecutionsList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ModelHubPromptHistoryExecutionsList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPromptHistoryExecutionsList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPromptHistoryExecutionsList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ModelHubPromptHistoryExecutionsList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ModelHubPromptHistoryExecutionsList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ModelHubPromptHistoryExecutionsList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ModelHubPromptHistoryExecutionsList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPromptHistoryExecutionsList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPromptHistoryExecutionsList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ModelHubPromptHistoryExecutionsList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ModelHubPromptHistoryExecutionsList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ModelHubPromptHistoryExecutionsList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ModelHubPromptHistoryExecutionsList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ModelHubPromptHistoryExecutionsList200Response) GetResults() []PromptHistoryExecution { + if o == nil { + var ret []PromptHistoryExecution + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ModelHubPromptHistoryExecutionsList200Response) GetResultsOk() ([]PromptHistoryExecution, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ModelHubPromptHistoryExecutionsList200Response) SetResults(v []PromptHistoryExecution) { + o.Results = v +} + +func (o ModelHubPromptHistoryExecutionsList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubPromptHistoryExecutionsList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ModelHubPromptHistoryExecutionsList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubPromptHistoryExecutionsList200Response := _ModelHubPromptHistoryExecutionsList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubPromptHistoryExecutionsList200Response) + + if err != nil { + return err + } + + *o = ModelHubPromptHistoryExecutionsList200Response(varModelHubPromptHistoryExecutionsList200Response) + + return err +} + +type NullableModelHubPromptHistoryExecutionsList200Response struct { + value *ModelHubPromptHistoryExecutionsList200Response + isSet bool +} + +func (v NullableModelHubPromptHistoryExecutionsList200Response) Get() *ModelHubPromptHistoryExecutionsList200Response { + return v.value +} + +func (v *NullableModelHubPromptHistoryExecutionsList200Response) Set(val *ModelHubPromptHistoryExecutionsList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubPromptHistoryExecutionsList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubPromptHistoryExecutionsList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubPromptHistoryExecutionsList200Response(val *ModelHubPromptHistoryExecutionsList200Response) *NullableModelHubPromptHistoryExecutionsList200Response { + return &NullableModelHubPromptHistoryExecutionsList200Response{value: val, isSet: true} +} + +func (v NullableModelHubPromptHistoryExecutionsList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubPromptHistoryExecutionsList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_prompt_labels_list_200_response.go b/go/futureagi/model_model_hub_prompt_labels_list_200_response.go new file mode 100644 index 0000000..5839921 --- /dev/null +++ b/go/futureagi/model_model_hub_prompt_labels_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubPromptLabelsList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubPromptLabelsList200Response{} + +// ModelHubPromptLabelsList200Response struct for ModelHubPromptLabelsList200Response +type ModelHubPromptLabelsList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PromptLabel `json:"results"` +} + +type _ModelHubPromptLabelsList200Response ModelHubPromptLabelsList200Response + +// NewModelHubPromptLabelsList200Response instantiates a new ModelHubPromptLabelsList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubPromptLabelsList200Response(count int32, results []PromptLabel) *ModelHubPromptLabelsList200Response { + this := ModelHubPromptLabelsList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewModelHubPromptLabelsList200ResponseWithDefaults instantiates a new ModelHubPromptLabelsList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubPromptLabelsList200ResponseWithDefaults() *ModelHubPromptLabelsList200Response { + this := ModelHubPromptLabelsList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ModelHubPromptLabelsList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ModelHubPromptLabelsList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ModelHubPromptLabelsList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPromptLabelsList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPromptLabelsList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ModelHubPromptLabelsList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ModelHubPromptLabelsList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ModelHubPromptLabelsList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ModelHubPromptLabelsList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPromptLabelsList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPromptLabelsList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ModelHubPromptLabelsList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ModelHubPromptLabelsList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ModelHubPromptLabelsList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ModelHubPromptLabelsList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ModelHubPromptLabelsList200Response) GetResults() []PromptLabel { + if o == nil { + var ret []PromptLabel + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ModelHubPromptLabelsList200Response) GetResultsOk() ([]PromptLabel, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ModelHubPromptLabelsList200Response) SetResults(v []PromptLabel) { + o.Results = v +} + +func (o ModelHubPromptLabelsList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubPromptLabelsList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ModelHubPromptLabelsList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubPromptLabelsList200Response := _ModelHubPromptLabelsList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubPromptLabelsList200Response) + + if err != nil { + return err + } + + *o = ModelHubPromptLabelsList200Response(varModelHubPromptLabelsList200Response) + + return err +} + +type NullableModelHubPromptLabelsList200Response struct { + value *ModelHubPromptLabelsList200Response + isSet bool +} + +func (v NullableModelHubPromptLabelsList200Response) Get() *ModelHubPromptLabelsList200Response { + return v.value +} + +func (v *NullableModelHubPromptLabelsList200Response) Set(val *ModelHubPromptLabelsList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubPromptLabelsList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubPromptLabelsList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubPromptLabelsList200Response(val *ModelHubPromptLabelsList200Response) *NullableModelHubPromptLabelsList200Response { + return &NullableModelHubPromptLabelsList200Response{value: val, isSet: true} +} + +func (v NullableModelHubPromptLabelsList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubPromptLabelsList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_prompt_templates_list_200_response.go b/go/futureagi/model_model_hub_prompt_templates_list_200_response.go new file mode 100644 index 0000000..bdeaee3 --- /dev/null +++ b/go/futureagi/model_model_hub_prompt_templates_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubPromptTemplatesList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubPromptTemplatesList200Response{} + +// ModelHubPromptTemplatesList200Response struct for ModelHubPromptTemplatesList200Response +type ModelHubPromptTemplatesList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PromptTemplate `json:"results"` +} + +type _ModelHubPromptTemplatesList200Response ModelHubPromptTemplatesList200Response + +// NewModelHubPromptTemplatesList200Response instantiates a new ModelHubPromptTemplatesList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubPromptTemplatesList200Response(count int32, results []PromptTemplate) *ModelHubPromptTemplatesList200Response { + this := ModelHubPromptTemplatesList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewModelHubPromptTemplatesList200ResponseWithDefaults instantiates a new ModelHubPromptTemplatesList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubPromptTemplatesList200ResponseWithDefaults() *ModelHubPromptTemplatesList200Response { + this := ModelHubPromptTemplatesList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ModelHubPromptTemplatesList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ModelHubPromptTemplatesList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ModelHubPromptTemplatesList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPromptTemplatesList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPromptTemplatesList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ModelHubPromptTemplatesList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ModelHubPromptTemplatesList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ModelHubPromptTemplatesList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ModelHubPromptTemplatesList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubPromptTemplatesList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubPromptTemplatesList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ModelHubPromptTemplatesList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ModelHubPromptTemplatesList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ModelHubPromptTemplatesList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ModelHubPromptTemplatesList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ModelHubPromptTemplatesList200Response) GetResults() []PromptTemplate { + if o == nil { + var ret []PromptTemplate + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ModelHubPromptTemplatesList200Response) GetResultsOk() ([]PromptTemplate, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ModelHubPromptTemplatesList200Response) SetResults(v []PromptTemplate) { + o.Results = v +} + +func (o ModelHubPromptTemplatesList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubPromptTemplatesList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ModelHubPromptTemplatesList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubPromptTemplatesList200Response := _ModelHubPromptTemplatesList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubPromptTemplatesList200Response) + + if err != nil { + return err + } + + *o = ModelHubPromptTemplatesList200Response(varModelHubPromptTemplatesList200Response) + + return err +} + +type NullableModelHubPromptTemplatesList200Response struct { + value *ModelHubPromptTemplatesList200Response + isSet bool +} + +func (v NullableModelHubPromptTemplatesList200Response) Get() *ModelHubPromptTemplatesList200Response { + return v.value +} + +func (v *NullableModelHubPromptTemplatesList200Response) Set(val *ModelHubPromptTemplatesList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubPromptTemplatesList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubPromptTemplatesList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubPromptTemplatesList200Response(val *ModelHubPromptTemplatesList200Response) *NullableModelHubPromptTemplatesList200Response { + return &NullableModelHubPromptTemplatesList200Response{value: val, isSet: true} +} + +func (v NullableModelHubPromptTemplatesList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubPromptTemplatesList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_scores_list_200_response.go b/go/futureagi/model_model_hub_scores_list_200_response.go new file mode 100644 index 0000000..484070a --- /dev/null +++ b/go/futureagi/model_model_hub_scores_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubScoresList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubScoresList200Response{} + +// ModelHubScoresList200Response struct for ModelHubScoresList200Response +type ModelHubScoresList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []Score `json:"results"` +} + +type _ModelHubScoresList200Response ModelHubScoresList200Response + +// NewModelHubScoresList200Response instantiates a new ModelHubScoresList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubScoresList200Response(count int32, results []Score) *ModelHubScoresList200Response { + this := ModelHubScoresList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewModelHubScoresList200ResponseWithDefaults instantiates a new ModelHubScoresList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubScoresList200ResponseWithDefaults() *ModelHubScoresList200Response { + this := ModelHubScoresList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *ModelHubScoresList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ModelHubScoresList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ModelHubScoresList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubScoresList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubScoresList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ModelHubScoresList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ModelHubScoresList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ModelHubScoresList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ModelHubScoresList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubScoresList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubScoresList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ModelHubScoresList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ModelHubScoresList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ModelHubScoresList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ModelHubScoresList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *ModelHubScoresList200Response) GetResults() []Score { + if o == nil { + var ret []Score + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ModelHubScoresList200Response) GetResultsOk() ([]Score, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ModelHubScoresList200Response) SetResults(v []Score) { + o.Results = v +} + +func (o ModelHubScoresList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubScoresList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ModelHubScoresList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubScoresList200Response := _ModelHubScoresList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubScoresList200Response) + + if err != nil { + return err + } + + *o = ModelHubScoresList200Response(varModelHubScoresList200Response) + + return err +} + +type NullableModelHubScoresList200Response struct { + value *ModelHubScoresList200Response + isSet bool +} + +func (v NullableModelHubScoresList200Response) Get() *ModelHubScoresList200Response { + return v.value +} + +func (v *NullableModelHubScoresList200Response) Set(val *ModelHubScoresList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubScoresList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubScoresList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubScoresList200Response(val *ModelHubScoresList200Response) *NullableModelHubScoresList200Response { + return &NullableModelHubScoresList200Response{value: val, isSet: true} +} + +func (v NullableModelHubScoresList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubScoresList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_string_result_response.go b/go/futureagi/model_model_hub_string_result_response.go new file mode 100644 index 0000000..a9e718d --- /dev/null +++ b/go/futureagi/model_model_hub_string_result_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ModelHubStringResultResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubStringResultResponse{} + +// ModelHubStringResultResponse struct for ModelHubStringResultResponse +type ModelHubStringResultResponse struct { + Status bool `json:"status"` + Result string `json:"result"` +} + +type _ModelHubStringResultResponse ModelHubStringResultResponse + +// NewModelHubStringResultResponse instantiates a new ModelHubStringResultResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubStringResultResponse(status bool, result string) *ModelHubStringResultResponse { + this := ModelHubStringResultResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewModelHubStringResultResponseWithDefaults instantiates a new ModelHubStringResultResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubStringResultResponseWithDefaults() *ModelHubStringResultResponse { + this := ModelHubStringResultResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ModelHubStringResultResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ModelHubStringResultResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ModelHubStringResultResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ModelHubStringResultResponse) GetResult() string { + if o == nil { + var ret string + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ModelHubStringResultResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ModelHubStringResultResponse) SetResult(v string) { + o.Result = v +} + +func (o ModelHubStringResultResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubStringResultResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ModelHubStringResultResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varModelHubStringResultResponse := _ModelHubStringResultResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varModelHubStringResultResponse) + + if err != nil { + return err + } + + *o = ModelHubStringResultResponse(varModelHubStringResultResponse) + + return err +} + +type NullableModelHubStringResultResponse struct { + value *ModelHubStringResultResponse + isSet bool +} + +func (v NullableModelHubStringResultResponse) Get() *ModelHubStringResultResponse { + return v.value +} + +func (v *NullableModelHubStringResultResponse) Set(val *ModelHubStringResultResponse) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubStringResultResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubStringResultResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubStringResultResponse(val *ModelHubStringResultResponse) *NullableModelHubStringResultResponse { + return &NullableModelHubStringResultResponse{value: val, isSet: true} +} + +func (v NullableModelHubStringResultResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubStringResultResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_model_hub_text_error_response.go b/go/futureagi/model_model_hub_text_error_response.go new file mode 100644 index 0000000..449bf9e --- /dev/null +++ b/go/futureagi/model_model_hub_text_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ModelHubTextErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModelHubTextErrorResponse{} + +// ModelHubTextErrorResponse struct for ModelHubTextErrorResponse +type ModelHubTextErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewModelHubTextErrorResponse instantiates a new ModelHubTextErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModelHubTextErrorResponse() *ModelHubTextErrorResponse { + this := ModelHubTextErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewModelHubTextErrorResponseWithDefaults instantiates a new ModelHubTextErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModelHubTextErrorResponseWithDefaults() *ModelHubTextErrorResponse { + this := ModelHubTextErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ModelHubTextErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelHubTextErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ModelHubTextErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubTextErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubTextErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ModelHubTextErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ModelHubTextErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ModelHubTextErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubTextErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubTextErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ModelHubTextErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ModelHubTextErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ModelHubTextErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubTextErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubTextErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ModelHubTextErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ModelHubTextErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ModelHubTextErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubTextErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubTextErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ModelHubTextErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ModelHubTextErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ModelHubTextErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubTextErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubTextErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ModelHubTextErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ModelHubTextErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ModelHubTextErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubTextErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubTextErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ModelHubTextErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ModelHubTextErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ModelHubTextErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ModelHubTextErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ModelHubTextErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ModelHubTextErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ModelHubTextErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ModelHubTextErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ModelHubTextErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelHubTextErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ModelHubTextErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ModelHubTextErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ModelHubTextErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModelHubTextErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableModelHubTextErrorResponse struct { + value *ModelHubTextErrorResponse + isSet bool +} + +func (v NullableModelHubTextErrorResponse) Get() *ModelHubTextErrorResponse { + return v.value +} + +func (v *NullableModelHubTextErrorResponse) Set(val *ModelHubTextErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableModelHubTextErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableModelHubTextErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModelHubTextErrorResponse(val *ModelHubTextErrorResponse) *NullableModelHubTextErrorResponse { + return &NullableModelHubTextErrorResponse{value: val, isSet: true} +} + +func (v NullableModelHubTextErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModelHubTextErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_observe_graph_data_point.go b/go/futureagi/model_observe_graph_data_point.go new file mode 100644 index 0000000..11e1b02 --- /dev/null +++ b/go/futureagi/model_observe_graph_data_point.go @@ -0,0 +1,234 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ObserveGraphDataPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObserveGraphDataPoint{} + +// ObserveGraphDataPoint struct for ObserveGraphDataPoint +type ObserveGraphDataPoint struct { + Timestamp string `json:"timestamp"` + Value NullableFloat32 `json:"value"` + PrimaryTraffic NullableFloat32 `json:"primary_traffic,omitempty"` +} + +type _ObserveGraphDataPoint ObserveGraphDataPoint + +// NewObserveGraphDataPoint instantiates a new ObserveGraphDataPoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObserveGraphDataPoint(timestamp string, value NullableFloat32) *ObserveGraphDataPoint { + this := ObserveGraphDataPoint{} + this.Timestamp = timestamp + this.Value = value + return &this +} + +// NewObserveGraphDataPointWithDefaults instantiates a new ObserveGraphDataPoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObserveGraphDataPointWithDefaults() *ObserveGraphDataPoint { + this := ObserveGraphDataPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value +func (o *ObserveGraphDataPoint) GetTimestamp() string { + if o == nil { + var ret string + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataPoint) GetTimestampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *ObserveGraphDataPoint) SetTimestamp(v string) { + o.Timestamp = v +} + +// GetValue returns the Value field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *ObserveGraphDataPoint) GetValue() float32 { + if o == nil || o.Value.Get() == nil { + var ret float32 + return ret + } + + return *o.Value.Get() +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ObserveGraphDataPoint) GetValueOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Value.Get(), o.Value.IsSet() +} + +// SetValue sets field value +func (o *ObserveGraphDataPoint) SetValue(v float32) { + o.Value.Set(&v) +} + +// GetPrimaryTraffic returns the PrimaryTraffic field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ObserveGraphDataPoint) GetPrimaryTraffic() float32 { + if o == nil || IsNil(o.PrimaryTraffic.Get()) { + var ret float32 + return ret + } + return *o.PrimaryTraffic.Get() +} + +// GetPrimaryTrafficOk returns a tuple with the PrimaryTraffic field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ObserveGraphDataPoint) GetPrimaryTrafficOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.PrimaryTraffic.Get(), o.PrimaryTraffic.IsSet() +} + +// HasPrimaryTraffic returns a boolean if a field has been set. +func (o *ObserveGraphDataPoint) HasPrimaryTraffic() bool { + if o != nil && o.PrimaryTraffic.IsSet() { + return true + } + + return false +} + +// SetPrimaryTraffic gets a reference to the given NullableFloat32 and assigns it to the PrimaryTraffic field. +func (o *ObserveGraphDataPoint) SetPrimaryTraffic(v float32) { + o.PrimaryTraffic.Set(&v) +} + +// SetPrimaryTrafficNil sets the value for PrimaryTraffic to be an explicit nil +func (o *ObserveGraphDataPoint) SetPrimaryTrafficNil() { + o.PrimaryTraffic.Set(nil) +} + +// UnsetPrimaryTraffic ensures that no value is present for PrimaryTraffic, not even an explicit nil +func (o *ObserveGraphDataPoint) UnsetPrimaryTraffic() { + o.PrimaryTraffic.Unset() +} + +func (o ObserveGraphDataPoint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObserveGraphDataPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["timestamp"] = o.Timestamp + toSerialize["value"] = o.Value.Get() + if o.PrimaryTraffic.IsSet() { + toSerialize["primary_traffic"] = o.PrimaryTraffic.Get() + } + return toSerialize, nil +} + +func (o *ObserveGraphDataPoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timestamp", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObserveGraphDataPoint := _ObserveGraphDataPoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObserveGraphDataPoint) + + if err != nil { + return err + } + + *o = ObserveGraphDataPoint(varObserveGraphDataPoint) + + return err +} + +type NullableObserveGraphDataPoint struct { + value *ObserveGraphDataPoint + isSet bool +} + +func (v NullableObserveGraphDataPoint) Get() *ObserveGraphDataPoint { + return v.value +} + +func (v *NullableObserveGraphDataPoint) Set(val *ObserveGraphDataPoint) { + v.value = val + v.isSet = true +} + +func (v NullableObserveGraphDataPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableObserveGraphDataPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObserveGraphDataPoint(val *ObserveGraphDataPoint) *NullableObserveGraphDataPoint { + return &NullableObserveGraphDataPoint{value: val, isSet: true} +} + +func (v NullableObserveGraphDataPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObserveGraphDataPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_observe_graph_data_request.go b/go/futureagi/model_observe_graph_data_request.go new file mode 100644 index 0000000..bdad7fa --- /dev/null +++ b/go/futureagi/model_observe_graph_data_request.go @@ -0,0 +1,301 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ObserveGraphDataRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObserveGraphDataRequest{} + +// ObserveGraphDataRequest struct for ObserveGraphDataRequest +type ObserveGraphDataRequest struct { + ProjectId string `json:"project_id"` + Filters []AutomationRuleConditionsFilterInner `json:"filters,omitempty"` + Interval *string `json:"interval,omitempty"` + Property *string `json:"property,omitempty"` + ReqDataConfig ReqDataConfig `json:"req_data_config"` +} + +type _ObserveGraphDataRequest ObserveGraphDataRequest + +// NewObserveGraphDataRequest instantiates a new ObserveGraphDataRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObserveGraphDataRequest(projectId string, reqDataConfig ReqDataConfig) *ObserveGraphDataRequest { + this := ObserveGraphDataRequest{} + this.ProjectId = projectId + var interval string = "day" + this.Interval = &interval + var property string = "average" + this.Property = &property + this.ReqDataConfig = reqDataConfig + return &this +} + +// NewObserveGraphDataRequestWithDefaults instantiates a new ObserveGraphDataRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObserveGraphDataRequestWithDefaults() *ObserveGraphDataRequest { + this := ObserveGraphDataRequest{} + var interval string = "day" + this.Interval = &interval + var property string = "average" + this.Property = &property + return &this +} + +// GetProjectId returns the ProjectId field value +func (o *ObserveGraphDataRequest) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataRequest) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *ObserveGraphDataRequest) SetProjectId(v string) { + o.ProjectId = v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *ObserveGraphDataRequest) GetFilters() []AutomationRuleConditionsFilterInner { + if o == nil || IsNil(o.Filters) { + var ret []AutomationRuleConditionsFilterInner + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataRequest) GetFiltersOk() ([]AutomationRuleConditionsFilterInner, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *ObserveGraphDataRequest) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given []AutomationRuleConditionsFilterInner and assigns it to the Filters field. +func (o *ObserveGraphDataRequest) SetFilters(v []AutomationRuleConditionsFilterInner) { + o.Filters = v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *ObserveGraphDataRequest) GetInterval() string { + if o == nil || IsNil(o.Interval) { + var ret string + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataRequest) GetIntervalOk() (*string, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *ObserveGraphDataRequest) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given string and assigns it to the Interval field. +func (o *ObserveGraphDataRequest) SetInterval(v string) { + o.Interval = &v +} + +// GetProperty returns the Property field value if set, zero value otherwise. +func (o *ObserveGraphDataRequest) GetProperty() string { + if o == nil || IsNil(o.Property) { + var ret string + return ret + } + return *o.Property +} + +// GetPropertyOk returns a tuple with the Property field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataRequest) GetPropertyOk() (*string, bool) { + if o == nil || IsNil(o.Property) { + return nil, false + } + return o.Property, true +} + +// HasProperty returns a boolean if a field has been set. +func (o *ObserveGraphDataRequest) HasProperty() bool { + if o != nil && !IsNil(o.Property) { + return true + } + + return false +} + +// SetProperty gets a reference to the given string and assigns it to the Property field. +func (o *ObserveGraphDataRequest) SetProperty(v string) { + o.Property = &v +} + +// GetReqDataConfig returns the ReqDataConfig field value +func (o *ObserveGraphDataRequest) GetReqDataConfig() ReqDataConfig { + if o == nil { + var ret ReqDataConfig + return ret + } + + return o.ReqDataConfig +} + +// GetReqDataConfigOk returns a tuple with the ReqDataConfig field value +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataRequest) GetReqDataConfigOk() (*ReqDataConfig, bool) { + if o == nil { + return nil, false + } + return &o.ReqDataConfig, true +} + +// SetReqDataConfig sets field value +func (o *ObserveGraphDataRequest) SetReqDataConfig(v ReqDataConfig) { + o.ReqDataConfig = v +} + +func (o ObserveGraphDataRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObserveGraphDataRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["project_id"] = o.ProjectId + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.Property) { + toSerialize["property"] = o.Property + } + toSerialize["req_data_config"] = o.ReqDataConfig + return toSerialize, nil +} + +func (o *ObserveGraphDataRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "project_id", + "req_data_config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObserveGraphDataRequest := _ObserveGraphDataRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObserveGraphDataRequest) + + if err != nil { + return err + } + + *o = ObserveGraphDataRequest(varObserveGraphDataRequest) + + return err +} + +type NullableObserveGraphDataRequest struct { + value *ObserveGraphDataRequest + isSet bool +} + +func (v NullableObserveGraphDataRequest) Get() *ObserveGraphDataRequest { + return v.value +} + +func (v *NullableObserveGraphDataRequest) Set(val *ObserveGraphDataRequest) { + v.value = val + v.isSet = true +} + +func (v NullableObserveGraphDataRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableObserveGraphDataRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObserveGraphDataRequest(val *ObserveGraphDataRequest) *NullableObserveGraphDataRequest { + return &NullableObserveGraphDataRequest{value: val, isSet: true} +} + +func (v NullableObserveGraphDataRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObserveGraphDataRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_observe_graph_data_response.go b/go/futureagi/model_observe_graph_data_response.go new file mode 100644 index 0000000..d31da71 --- /dev/null +++ b/go/futureagi/model_observe_graph_data_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ObserveGraphDataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObserveGraphDataResponse{} + +// ObserveGraphDataResponse struct for ObserveGraphDataResponse +type ObserveGraphDataResponse struct { + Status *bool `json:"status,omitempty"` + Result ObserveGraphDataResult `json:"result"` +} + +type _ObserveGraphDataResponse ObserveGraphDataResponse + +// NewObserveGraphDataResponse instantiates a new ObserveGraphDataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObserveGraphDataResponse(result ObserveGraphDataResult) *ObserveGraphDataResponse { + this := ObserveGraphDataResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewObserveGraphDataResponseWithDefaults instantiates a new ObserveGraphDataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObserveGraphDataResponseWithDefaults() *ObserveGraphDataResponse { + this := ObserveGraphDataResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ObserveGraphDataResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ObserveGraphDataResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ObserveGraphDataResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *ObserveGraphDataResponse) GetResult() ObserveGraphDataResult { + if o == nil { + var ret ObserveGraphDataResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataResponse) GetResultOk() (*ObserveGraphDataResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ObserveGraphDataResponse) SetResult(v ObserveGraphDataResult) { + o.Result = v +} + +func (o ObserveGraphDataResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObserveGraphDataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ObserveGraphDataResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObserveGraphDataResponse := _ObserveGraphDataResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObserveGraphDataResponse) + + if err != nil { + return err + } + + *o = ObserveGraphDataResponse(varObserveGraphDataResponse) + + return err +} + +type NullableObserveGraphDataResponse struct { + value *ObserveGraphDataResponse + isSet bool +} + +func (v NullableObserveGraphDataResponse) Get() *ObserveGraphDataResponse { + return v.value +} + +func (v *NullableObserveGraphDataResponse) Set(val *ObserveGraphDataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableObserveGraphDataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableObserveGraphDataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObserveGraphDataResponse(val *ObserveGraphDataResponse) *NullableObserveGraphDataResponse { + return &NullableObserveGraphDataResponse{value: val, isSet: true} +} + +func (v NullableObserveGraphDataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObserveGraphDataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_observe_graph_data_result.go b/go/futureagi/model_observe_graph_data_result.go new file mode 100644 index 0000000..8381751 --- /dev/null +++ b/go/futureagi/model_observe_graph_data_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ObserveGraphDataResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObserveGraphDataResult{} + +// ObserveGraphDataResult struct for ObserveGraphDataResult +type ObserveGraphDataResult struct { + MetricName string `json:"metric_name"` + Data []ObserveGraphDataPoint `json:"data"` +} + +type _ObserveGraphDataResult ObserveGraphDataResult + +// NewObserveGraphDataResult instantiates a new ObserveGraphDataResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObserveGraphDataResult(metricName string, data []ObserveGraphDataPoint) *ObserveGraphDataResult { + this := ObserveGraphDataResult{} + this.MetricName = metricName + this.Data = data + return &this +} + +// NewObserveGraphDataResultWithDefaults instantiates a new ObserveGraphDataResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObserveGraphDataResultWithDefaults() *ObserveGraphDataResult { + this := ObserveGraphDataResult{} + return &this +} + +// GetMetricName returns the MetricName field value +func (o *ObserveGraphDataResult) GetMetricName() string { + if o == nil { + var ret string + return ret + } + + return o.MetricName +} + +// GetMetricNameOk returns a tuple with the MetricName field value +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataResult) GetMetricNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MetricName, true +} + +// SetMetricName sets field value +func (o *ObserveGraphDataResult) SetMetricName(v string) { + o.MetricName = v +} + +// GetData returns the Data field value +func (o *ObserveGraphDataResult) GetData() []ObserveGraphDataPoint { + if o == nil { + var ret []ObserveGraphDataPoint + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ObserveGraphDataResult) GetDataOk() ([]ObserveGraphDataPoint, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *ObserveGraphDataResult) SetData(v []ObserveGraphDataPoint) { + o.Data = v +} + +func (o ObserveGraphDataResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObserveGraphDataResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["metric_name"] = o.MetricName + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ObserveGraphDataResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "metric_name", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObserveGraphDataResult := _ObserveGraphDataResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObserveGraphDataResult) + + if err != nil { + return err + } + + *o = ObserveGraphDataResult(varObserveGraphDataResult) + + return err +} + +type NullableObserveGraphDataResult struct { + value *ObserveGraphDataResult + isSet bool +} + +func (v NullableObserveGraphDataResult) Get() *ObserveGraphDataResult { + return v.value +} + +func (v *NullableObserveGraphDataResult) Set(val *ObserveGraphDataResult) { + v.value = val + v.isSet = true +} + +func (v NullableObserveGraphDataResult) IsSet() bool { + return v.isSet +} + +func (v *NullableObserveGraphDataResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObserveGraphDataResult(val *ObserveGraphDataResult) *NullableObserveGraphDataResult { + return &NullableObserveGraphDataResult{value: val, isSet: true} +} + +func (v NullableObserveGraphDataResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObserveGraphDataResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_optimiser_analysis_refresh_response.go b/go/futureagi/model_optimiser_analysis_refresh_response.go new file mode 100644 index 0000000..e29f285 --- /dev/null +++ b/go/futureagi/model_optimiser_analysis_refresh_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the OptimiserAnalysisRefreshResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptimiserAnalysisRefreshResponse{} + +// OptimiserAnalysisRefreshResponse struct for OptimiserAnalysisRefreshResponse +type OptimiserAnalysisRefreshResponse struct { + Status *bool `json:"status,omitempty"` + Result OptimiserAnalysisRefreshResult `json:"result"` +} + +type _OptimiserAnalysisRefreshResponse OptimiserAnalysisRefreshResponse + +// NewOptimiserAnalysisRefreshResponse instantiates a new OptimiserAnalysisRefreshResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOptimiserAnalysisRefreshResponse(result OptimiserAnalysisRefreshResult) *OptimiserAnalysisRefreshResponse { + this := OptimiserAnalysisRefreshResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewOptimiserAnalysisRefreshResponseWithDefaults instantiates a new OptimiserAnalysisRefreshResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOptimiserAnalysisRefreshResponseWithDefaults() *OptimiserAnalysisRefreshResponse { + this := OptimiserAnalysisRefreshResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *OptimiserAnalysisRefreshResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisRefreshResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *OptimiserAnalysisRefreshResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *OptimiserAnalysisRefreshResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *OptimiserAnalysisRefreshResponse) GetResult() OptimiserAnalysisRefreshResult { + if o == nil { + var ret OptimiserAnalysisRefreshResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisRefreshResponse) GetResultOk() (*OptimiserAnalysisRefreshResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *OptimiserAnalysisRefreshResponse) SetResult(v OptimiserAnalysisRefreshResult) { + o.Result = v +} + +func (o OptimiserAnalysisRefreshResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptimiserAnalysisRefreshResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *OptimiserAnalysisRefreshResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOptimiserAnalysisRefreshResponse := _OptimiserAnalysisRefreshResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOptimiserAnalysisRefreshResponse) + + if err != nil { + return err + } + + *o = OptimiserAnalysisRefreshResponse(varOptimiserAnalysisRefreshResponse) + + return err +} + +type NullableOptimiserAnalysisRefreshResponse struct { + value *OptimiserAnalysisRefreshResponse + isSet bool +} + +func (v NullableOptimiserAnalysisRefreshResponse) Get() *OptimiserAnalysisRefreshResponse { + return v.value +} + +func (v *NullableOptimiserAnalysisRefreshResponse) Set(val *OptimiserAnalysisRefreshResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOptimiserAnalysisRefreshResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOptimiserAnalysisRefreshResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptimiserAnalysisRefreshResponse(val *OptimiserAnalysisRefreshResponse) *NullableOptimiserAnalysisRefreshResponse { + return &NullableOptimiserAnalysisRefreshResponse{value: val, isSet: true} +} + +func (v NullableOptimiserAnalysisRefreshResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptimiserAnalysisRefreshResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_optimiser_analysis_refresh_result.go b/go/futureagi/model_optimiser_analysis_refresh_result.go new file mode 100644 index 0000000..bf5c58d --- /dev/null +++ b/go/futureagi/model_optimiser_analysis_refresh_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the OptimiserAnalysisRefreshResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptimiserAnalysisRefreshResult{} + +// OptimiserAnalysisRefreshResult struct for OptimiserAnalysisRefreshResult +type OptimiserAnalysisRefreshResult struct { + Message string `json:"message"` + Status string `json:"status"` +} + +type _OptimiserAnalysisRefreshResult OptimiserAnalysisRefreshResult + +// NewOptimiserAnalysisRefreshResult instantiates a new OptimiserAnalysisRefreshResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOptimiserAnalysisRefreshResult(message string, status string) *OptimiserAnalysisRefreshResult { + this := OptimiserAnalysisRefreshResult{} + this.Message = message + this.Status = status + return &this +} + +// NewOptimiserAnalysisRefreshResultWithDefaults instantiates a new OptimiserAnalysisRefreshResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOptimiserAnalysisRefreshResultWithDefaults() *OptimiserAnalysisRefreshResult { + this := OptimiserAnalysisRefreshResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *OptimiserAnalysisRefreshResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisRefreshResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *OptimiserAnalysisRefreshResult) SetMessage(v string) { + o.Message = v +} + +// GetStatus returns the Status field value +func (o *OptimiserAnalysisRefreshResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisRefreshResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *OptimiserAnalysisRefreshResult) SetStatus(v string) { + o.Status = v +} + +func (o OptimiserAnalysisRefreshResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptimiserAnalysisRefreshResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["status"] = o.Status + return toSerialize, nil +} + +func (o *OptimiserAnalysisRefreshResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOptimiserAnalysisRefreshResult := _OptimiserAnalysisRefreshResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOptimiserAnalysisRefreshResult) + + if err != nil { + return err + } + + *o = OptimiserAnalysisRefreshResult(varOptimiserAnalysisRefreshResult) + + return err +} + +type NullableOptimiserAnalysisRefreshResult struct { + value *OptimiserAnalysisRefreshResult + isSet bool +} + +func (v NullableOptimiserAnalysisRefreshResult) Get() *OptimiserAnalysisRefreshResult { + return v.value +} + +func (v *NullableOptimiserAnalysisRefreshResult) Set(val *OptimiserAnalysisRefreshResult) { + v.value = val + v.isSet = true +} + +func (v NullableOptimiserAnalysisRefreshResult) IsSet() bool { + return v.isSet +} + +func (v *NullableOptimiserAnalysisRefreshResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptimiserAnalysisRefreshResult(val *OptimiserAnalysisRefreshResult) *NullableOptimiserAnalysisRefreshResult { + return &NullableOptimiserAnalysisRefreshResult{value: val, isSet: true} +} + +func (v NullableOptimiserAnalysisRefreshResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptimiserAnalysisRefreshResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_optimiser_analysis_response.go b/go/futureagi/model_optimiser_analysis_response.go new file mode 100644 index 0000000..d90e931 --- /dev/null +++ b/go/futureagi/model_optimiser_analysis_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the OptimiserAnalysisResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptimiserAnalysisResponse{} + +// OptimiserAnalysisResponse struct for OptimiserAnalysisResponse +type OptimiserAnalysisResponse struct { + Status *bool `json:"status,omitempty"` + Result OptimiserAnalysisResultPayload `json:"result"` +} + +type _OptimiserAnalysisResponse OptimiserAnalysisResponse + +// NewOptimiserAnalysisResponse instantiates a new OptimiserAnalysisResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOptimiserAnalysisResponse(result OptimiserAnalysisResultPayload) *OptimiserAnalysisResponse { + this := OptimiserAnalysisResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewOptimiserAnalysisResponseWithDefaults instantiates a new OptimiserAnalysisResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOptimiserAnalysisResponseWithDefaults() *OptimiserAnalysisResponse { + this := OptimiserAnalysisResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *OptimiserAnalysisResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *OptimiserAnalysisResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *OptimiserAnalysisResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *OptimiserAnalysisResponse) GetResult() OptimiserAnalysisResultPayload { + if o == nil { + var ret OptimiserAnalysisResultPayload + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisResponse) GetResultOk() (*OptimiserAnalysisResultPayload, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *OptimiserAnalysisResponse) SetResult(v OptimiserAnalysisResultPayload) { + o.Result = v +} + +func (o OptimiserAnalysisResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptimiserAnalysisResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *OptimiserAnalysisResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOptimiserAnalysisResponse := _OptimiserAnalysisResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOptimiserAnalysisResponse) + + if err != nil { + return err + } + + *o = OptimiserAnalysisResponse(varOptimiserAnalysisResponse) + + return err +} + +type NullableOptimiserAnalysisResponse struct { + value *OptimiserAnalysisResponse + isSet bool +} + +func (v NullableOptimiserAnalysisResponse) Get() *OptimiserAnalysisResponse { + return v.value +} + +func (v *NullableOptimiserAnalysisResponse) Set(val *OptimiserAnalysisResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOptimiserAnalysisResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOptimiserAnalysisResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptimiserAnalysisResponse(val *OptimiserAnalysisResponse) *NullableOptimiserAnalysisResponse { + return &NullableOptimiserAnalysisResponse{value: val, isSet: true} +} + +func (v NullableOptimiserAnalysisResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptimiserAnalysisResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_optimiser_analysis_result_payload.go b/go/futureagi/model_optimiser_analysis_result_payload.go new file mode 100644 index 0000000..7a8b573 --- /dev/null +++ b/go/futureagi/model_optimiser_analysis_result_payload.go @@ -0,0 +1,258 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the OptimiserAnalysisResultPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OptimiserAnalysisResultPayload{} + +// OptimiserAnalysisResultPayload struct for OptimiserAnalysisResultPayload +type OptimiserAnalysisResultPayload struct { + Response map[string]map[string]interface{} `json:"response"` + Status string `json:"status"` + LastUpdated *time.Time `json:"last_updated,omitempty"` + Message *string `json:"message,omitempty"` +} + +type _OptimiserAnalysisResultPayload OptimiserAnalysisResultPayload + +// NewOptimiserAnalysisResultPayload instantiates a new OptimiserAnalysisResultPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOptimiserAnalysisResultPayload(response map[string]map[string]interface{}, status string) *OptimiserAnalysisResultPayload { + this := OptimiserAnalysisResultPayload{} + this.Response = response + this.Status = status + return &this +} + +// NewOptimiserAnalysisResultPayloadWithDefaults instantiates a new OptimiserAnalysisResultPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOptimiserAnalysisResultPayloadWithDefaults() *OptimiserAnalysisResultPayload { + this := OptimiserAnalysisResultPayload{} + return &this +} + +// GetResponse returns the Response field value +func (o *OptimiserAnalysisResultPayload) GetResponse() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.Response +} + +// GetResponseOk returns a tuple with the Response field value +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisResultPayload) GetResponseOk() (*map[string]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return &o.Response, true +} + +// SetResponse sets field value +func (o *OptimiserAnalysisResultPayload) SetResponse(v map[string]map[string]interface{}) { + o.Response = v +} + +// GetStatus returns the Status field value +func (o *OptimiserAnalysisResultPayload) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisResultPayload) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *OptimiserAnalysisResultPayload) SetStatus(v string) { + o.Status = v +} + +// GetLastUpdated returns the LastUpdated field value if set, zero value otherwise. +func (o *OptimiserAnalysisResultPayload) GetLastUpdated() time.Time { + if o == nil || IsNil(o.LastUpdated) { + var ret time.Time + return ret + } + return *o.LastUpdated +} + +// GetLastUpdatedOk returns a tuple with the LastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisResultPayload) GetLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastUpdated) { + return nil, false + } + return o.LastUpdated, true +} + +// HasLastUpdated returns a boolean if a field has been set. +func (o *OptimiserAnalysisResultPayload) HasLastUpdated() bool { + if o != nil && !IsNil(o.LastUpdated) { + return true + } + + return false +} + +// SetLastUpdated gets a reference to the given time.Time and assigns it to the LastUpdated field. +func (o *OptimiserAnalysisResultPayload) SetLastUpdated(v time.Time) { + o.LastUpdated = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *OptimiserAnalysisResultPayload) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OptimiserAnalysisResultPayload) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *OptimiserAnalysisResultPayload) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *OptimiserAnalysisResultPayload) SetMessage(v string) { + o.Message = &v +} + +func (o OptimiserAnalysisResultPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OptimiserAnalysisResultPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["response"] = o.Response + toSerialize["status"] = o.Status + if !IsNil(o.LastUpdated) { + toSerialize["last_updated"] = o.LastUpdated + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +func (o *OptimiserAnalysisResultPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "response", + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOptimiserAnalysisResultPayload := _OptimiserAnalysisResultPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOptimiserAnalysisResultPayload) + + if err != nil { + return err + } + + *o = OptimiserAnalysisResultPayload(varOptimiserAnalysisResultPayload) + + return err +} + +type NullableOptimiserAnalysisResultPayload struct { + value *OptimiserAnalysisResultPayload + isSet bool +} + +func (v NullableOptimiserAnalysisResultPayload) Get() *OptimiserAnalysisResultPayload { + return v.value +} + +func (v *NullableOptimiserAnalysisResultPayload) Set(val *OptimiserAnalysisResultPayload) { + v.value = val + v.isSet = true +} + +func (v NullableOptimiserAnalysisResultPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableOptimiserAnalysisResultPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOptimiserAnalysisResultPayload(val *OptimiserAnalysisResultPayload) *NullableOptimiserAnalysisResultPayload { + return &NullableOptimiserAnalysisResultPayload{value: val, isSet: true} +} + +func (v NullableOptimiserAnalysisResultPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOptimiserAnalysisResultPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_organization.go b/go/futureagi/model_organization.go new file mode 100644 index 0000000..116bb34 --- /dev/null +++ b/go/futureagi/model_organization.go @@ -0,0 +1,493 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Organization type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Organization{} + +// Organization struct for Organization +type Organization struct { + Id *string `json:"id,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Name string `json:"name"` + DisplayName *string `json:"display_name,omitempty"` + IsNew *bool `json:"is_new,omitempty"` + WsEnabled *bool `json:"ws_enabled,omitempty"` + Region *string `json:"region,omitempty"` + Require2fa *bool `json:"require_2fa,omitempty"` + Require2faGracePeriodDays *int32 `json:"require_2fa_grace_period_days,omitempty"` + Require2faEnforcedAt NullableTime `json:"require_2fa_enforced_at,omitempty"` +} + +type _Organization Organization + +// NewOrganization instantiates a new Organization object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganization(name string) *Organization { + this := Organization{} + this.Name = name + return &this +} + +// NewOrganizationWithDefaults instantiates a new Organization object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganizationWithDefaults() *Organization { + this := Organization{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Organization) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Organization) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Organization) SetId(v string) { + o.Id = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Organization) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Organization) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Organization) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetName returns the Name field value +func (o *Organization) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Organization) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Organization) SetName(v string) { + o.Name = v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *Organization) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *Organization) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *Organization) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetIsNew returns the IsNew field value if set, zero value otherwise. +func (o *Organization) GetIsNew() bool { + if o == nil || IsNil(o.IsNew) { + var ret bool + return ret + } + return *o.IsNew +} + +// GetIsNewOk returns a tuple with the IsNew field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetIsNewOk() (*bool, bool) { + if o == nil || IsNil(o.IsNew) { + return nil, false + } + return o.IsNew, true +} + +// HasIsNew returns a boolean if a field has been set. +func (o *Organization) HasIsNew() bool { + if o != nil && !IsNil(o.IsNew) { + return true + } + + return false +} + +// SetIsNew gets a reference to the given bool and assigns it to the IsNew field. +func (o *Organization) SetIsNew(v bool) { + o.IsNew = &v +} + +// GetWsEnabled returns the WsEnabled field value if set, zero value otherwise. +func (o *Organization) GetWsEnabled() bool { + if o == nil || IsNil(o.WsEnabled) { + var ret bool + return ret + } + return *o.WsEnabled +} + +// GetWsEnabledOk returns a tuple with the WsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetWsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.WsEnabled) { + return nil, false + } + return o.WsEnabled, true +} + +// HasWsEnabled returns a boolean if a field has been set. +func (o *Organization) HasWsEnabled() bool { + if o != nil && !IsNil(o.WsEnabled) { + return true + } + + return false +} + +// SetWsEnabled gets a reference to the given bool and assigns it to the WsEnabled field. +func (o *Organization) SetWsEnabled(v bool) { + o.WsEnabled = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *Organization) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *Organization) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *Organization) SetRegion(v string) { + o.Region = &v +} + +// GetRequire2fa returns the Require2fa field value if set, zero value otherwise. +func (o *Organization) GetRequire2fa() bool { + if o == nil || IsNil(o.Require2fa) { + var ret bool + return ret + } + return *o.Require2fa +} + +// GetRequire2faOk returns a tuple with the Require2fa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetRequire2faOk() (*bool, bool) { + if o == nil || IsNil(o.Require2fa) { + return nil, false + } + return o.Require2fa, true +} + +// HasRequire2fa returns a boolean if a field has been set. +func (o *Organization) HasRequire2fa() bool { + if o != nil && !IsNil(o.Require2fa) { + return true + } + + return false +} + +// SetRequire2fa gets a reference to the given bool and assigns it to the Require2fa field. +func (o *Organization) SetRequire2fa(v bool) { + o.Require2fa = &v +} + +// GetRequire2faGracePeriodDays returns the Require2faGracePeriodDays field value if set, zero value otherwise. +func (o *Organization) GetRequire2faGracePeriodDays() int32 { + if o == nil || IsNil(o.Require2faGracePeriodDays) { + var ret int32 + return ret + } + return *o.Require2faGracePeriodDays +} + +// GetRequire2faGracePeriodDaysOk returns a tuple with the Require2faGracePeriodDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Organization) GetRequire2faGracePeriodDaysOk() (*int32, bool) { + if o == nil || IsNil(o.Require2faGracePeriodDays) { + return nil, false + } + return o.Require2faGracePeriodDays, true +} + +// HasRequire2faGracePeriodDays returns a boolean if a field has been set. +func (o *Organization) HasRequire2faGracePeriodDays() bool { + if o != nil && !IsNil(o.Require2faGracePeriodDays) { + return true + } + + return false +} + +// SetRequire2faGracePeriodDays gets a reference to the given int32 and assigns it to the Require2faGracePeriodDays field. +func (o *Organization) SetRequire2faGracePeriodDays(v int32) { + o.Require2faGracePeriodDays = &v +} + +// GetRequire2faEnforcedAt returns the Require2faEnforcedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Organization) GetRequire2faEnforcedAt() time.Time { + if o == nil || IsNil(o.Require2faEnforcedAt.Get()) { + var ret time.Time + return ret + } + return *o.Require2faEnforcedAt.Get() +} + +// GetRequire2faEnforcedAtOk returns a tuple with the Require2faEnforcedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Organization) GetRequire2faEnforcedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Require2faEnforcedAt.Get(), o.Require2faEnforcedAt.IsSet() +} + +// HasRequire2faEnforcedAt returns a boolean if a field has been set. +func (o *Organization) HasRequire2faEnforcedAt() bool { + if o != nil && o.Require2faEnforcedAt.IsSet() { + return true + } + + return false +} + +// SetRequire2faEnforcedAt gets a reference to the given NullableTime and assigns it to the Require2faEnforcedAt field. +func (o *Organization) SetRequire2faEnforcedAt(v time.Time) { + o.Require2faEnforcedAt.Set(&v) +} + +// SetRequire2faEnforcedAtNil sets the value for Require2faEnforcedAt to be an explicit nil +func (o *Organization) SetRequire2faEnforcedAtNil() { + o.Require2faEnforcedAt.Set(nil) +} + +// UnsetRequire2faEnforcedAt ensures that no value is present for Require2faEnforcedAt, not even an explicit nil +func (o *Organization) UnsetRequire2faEnforcedAt() { + o.Require2faEnforcedAt.Unset() +} + +func (o Organization) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Organization) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + toSerialize["name"] = o.Name + if !IsNil(o.DisplayName) { + toSerialize["display_name"] = o.DisplayName + } + if !IsNil(o.IsNew) { + toSerialize["is_new"] = o.IsNew + } + if !IsNil(o.WsEnabled) { + toSerialize["ws_enabled"] = o.WsEnabled + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + if !IsNil(o.Require2fa) { + toSerialize["require_2fa"] = o.Require2fa + } + if !IsNil(o.Require2faGracePeriodDays) { + toSerialize["require_2fa_grace_period_days"] = o.Require2faGracePeriodDays + } + if o.Require2faEnforcedAt.IsSet() { + toSerialize["require_2fa_enforced_at"] = o.Require2faEnforcedAt.Get() + } + return toSerialize, nil +} + +func (o *Organization) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrganization := _Organization{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOrganization) + + if err != nil { + return err + } + + *o = Organization(varOrganization) + + return err +} + +type NullableOrganization struct { + value *Organization + isSet bool +} + +func (v NullableOrganization) Get() *Organization { + return v.value +} + +func (v *NullableOrganization) Set(val *Organization) { + v.value = val + v.isSet = true +} + +func (v NullableOrganization) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganization(val *Organization) *NullableOrganization { + return &NullableOrganization{value: val, isSet: true} +} + +func (v NullableOrganization) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganization) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_overview_api_response.go b/go/futureagi/model_overview_api_response.go new file mode 100644 index 0000000..d20a2ae --- /dev/null +++ b/go/futureagi/model_overview_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the OverviewApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OverviewApiResponse{} + +// OverviewApiResponse struct for OverviewApiResponse +type OverviewApiResponse struct { + Status *bool `json:"status,omitempty"` + Result OverviewResponse `json:"result"` +} + +type _OverviewApiResponse OverviewApiResponse + +// NewOverviewApiResponse instantiates a new OverviewApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOverviewApiResponse(result OverviewResponse) *OverviewApiResponse { + this := OverviewApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewOverviewApiResponseWithDefaults instantiates a new OverviewApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOverviewApiResponseWithDefaults() *OverviewApiResponse { + this := OverviewApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *OverviewApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverviewApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *OverviewApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *OverviewApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *OverviewApiResponse) GetResult() OverviewResponse { + if o == nil { + var ret OverviewResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *OverviewApiResponse) GetResultOk() (*OverviewResponse, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *OverviewApiResponse) SetResult(v OverviewResponse) { + o.Result = v +} + +func (o OverviewApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OverviewApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *OverviewApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOverviewApiResponse := _OverviewApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOverviewApiResponse) + + if err != nil { + return err + } + + *o = OverviewApiResponse(varOverviewApiResponse) + + return err +} + +type NullableOverviewApiResponse struct { + value *OverviewApiResponse + isSet bool +} + +func (v NullableOverviewApiResponse) Get() *OverviewApiResponse { + return v.value +} + +func (v *NullableOverviewApiResponse) Set(val *OverviewApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOverviewApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOverviewApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOverviewApiResponse(val *OverviewApiResponse) *NullableOverviewApiResponse { + return &NullableOverviewApiResponse{value: val, isSet: true} +} + +func (v NullableOverviewApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOverviewApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_overview_response.go b/go/futureagi/model_overview_response.go new file mode 100644 index 0000000..859aaee --- /dev/null +++ b/go/futureagi/model_overview_response.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the OverviewResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OverviewResponse{} + +// OverviewResponse struct for OverviewResponse +type OverviewResponse struct { + EventsOverTime []EventsOverTimePoint `json:"events_over_time"` + PatternSummary PatternSummary `json:"pattern_summary"` + RepresentativeTraces []RepresentativeTrace `json:"representative_traces"` +} + +type _OverviewResponse OverviewResponse + +// NewOverviewResponse instantiates a new OverviewResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOverviewResponse(eventsOverTime []EventsOverTimePoint, patternSummary PatternSummary, representativeTraces []RepresentativeTrace) *OverviewResponse { + this := OverviewResponse{} + this.EventsOverTime = eventsOverTime + this.PatternSummary = patternSummary + this.RepresentativeTraces = representativeTraces + return &this +} + +// NewOverviewResponseWithDefaults instantiates a new OverviewResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOverviewResponseWithDefaults() *OverviewResponse { + this := OverviewResponse{} + return &this +} + +// GetEventsOverTime returns the EventsOverTime field value +func (o *OverviewResponse) GetEventsOverTime() []EventsOverTimePoint { + if o == nil { + var ret []EventsOverTimePoint + return ret + } + + return o.EventsOverTime +} + +// GetEventsOverTimeOk returns a tuple with the EventsOverTime field value +// and a boolean to check if the value has been set. +func (o *OverviewResponse) GetEventsOverTimeOk() ([]EventsOverTimePoint, bool) { + if o == nil { + return nil, false + } + return o.EventsOverTime, true +} + +// SetEventsOverTime sets field value +func (o *OverviewResponse) SetEventsOverTime(v []EventsOverTimePoint) { + o.EventsOverTime = v +} + +// GetPatternSummary returns the PatternSummary field value +func (o *OverviewResponse) GetPatternSummary() PatternSummary { + if o == nil { + var ret PatternSummary + return ret + } + + return o.PatternSummary +} + +// GetPatternSummaryOk returns a tuple with the PatternSummary field value +// and a boolean to check if the value has been set. +func (o *OverviewResponse) GetPatternSummaryOk() (*PatternSummary, bool) { + if o == nil { + return nil, false + } + return &o.PatternSummary, true +} + +// SetPatternSummary sets field value +func (o *OverviewResponse) SetPatternSummary(v PatternSummary) { + o.PatternSummary = v +} + +// GetRepresentativeTraces returns the RepresentativeTraces field value +func (o *OverviewResponse) GetRepresentativeTraces() []RepresentativeTrace { + if o == nil { + var ret []RepresentativeTrace + return ret + } + + return o.RepresentativeTraces +} + +// GetRepresentativeTracesOk returns a tuple with the RepresentativeTraces field value +// and a boolean to check if the value has been set. +func (o *OverviewResponse) GetRepresentativeTracesOk() ([]RepresentativeTrace, bool) { + if o == nil { + return nil, false + } + return o.RepresentativeTraces, true +} + +// SetRepresentativeTraces sets field value +func (o *OverviewResponse) SetRepresentativeTraces(v []RepresentativeTrace) { + o.RepresentativeTraces = v +} + +func (o OverviewResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OverviewResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["events_over_time"] = o.EventsOverTime + toSerialize["pattern_summary"] = o.PatternSummary + toSerialize["representative_traces"] = o.RepresentativeTraces + return toSerialize, nil +} + +func (o *OverviewResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "events_over_time", + "pattern_summary", + "representative_traces", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOverviewResponse := _OverviewResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOverviewResponse) + + if err != nil { + return err + } + + *o = OverviewResponse(varOverviewResponse) + + return err +} + +type NullableOverviewResponse struct { + value *OverviewResponse + isSet bool +} + +func (v NullableOverviewResponse) Get() *OverviewResponse { + return v.value +} + +func (v *NullableOverviewResponse) Set(val *OverviewResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOverviewResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOverviewResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOverviewResponse(val *OverviewResponse) *NullableOverviewResponse { + return &NullableOverviewResponse{value: val, isSet: true} +} + +func (v NullableOverviewResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOverviewResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_pattern_insight.go b/go/futureagi/model_pattern_insight.go new file mode 100644 index 0000000..756559d --- /dev/null +++ b/go/futureagi/model_pattern_insight.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PatternInsight type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatternInsight{} + +// PatternInsight struct for PatternInsight +type PatternInsight struct { + Value string `json:"value"` + Caption string `json:"caption"` +} + +type _PatternInsight PatternInsight + +// NewPatternInsight instantiates a new PatternInsight object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatternInsight(value string, caption string) *PatternInsight { + this := PatternInsight{} + this.Value = value + this.Caption = caption + return &this +} + +// NewPatternInsightWithDefaults instantiates a new PatternInsight object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatternInsightWithDefaults() *PatternInsight { + this := PatternInsight{} + return &this +} + +// GetValue returns the Value field value +func (o *PatternInsight) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *PatternInsight) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *PatternInsight) SetValue(v string) { + o.Value = v +} + +// GetCaption returns the Caption field value +func (o *PatternInsight) GetCaption() string { + if o == nil { + var ret string + return ret + } + + return o.Caption +} + +// GetCaptionOk returns a tuple with the Caption field value +// and a boolean to check if the value has been set. +func (o *PatternInsight) GetCaptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Caption, true +} + +// SetCaption sets field value +func (o *PatternInsight) SetCaption(v string) { + o.Caption = v +} + +func (o PatternInsight) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatternInsight) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + toSerialize["caption"] = o.Caption + return toSerialize, nil +} + +func (o *PatternInsight) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "caption", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatternInsight := _PatternInsight{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatternInsight) + + if err != nil { + return err + } + + *o = PatternInsight(varPatternInsight) + + return err +} + +type NullablePatternInsight struct { + value *PatternInsight + isSet bool +} + +func (v NullablePatternInsight) Get() *PatternInsight { + return v.value +} + +func (v *NullablePatternInsight) Set(val *PatternInsight) { + v.value = val + v.isSet = true +} + +func (v NullablePatternInsight) IsSet() bool { + return v.isSet +} + +func (v *NullablePatternInsight) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatternInsight(val *PatternInsight) *NullablePatternInsight { + return &NullablePatternInsight{value: val, isSet: true} +} + +func (v NullablePatternInsight) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatternInsight) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_pattern_summary.go b/go/futureagi/model_pattern_summary.go new file mode 100644 index 0000000..48af4ca --- /dev/null +++ b/go/futureagi/model_pattern_summary.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PatternSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatternSummary{} + +// PatternSummary struct for PatternSummary +type PatternSummary struct { + Insights []PatternInsight `json:"insights"` + KeyMoments []KeyMoment `json:"key_moments"` +} + +type _PatternSummary PatternSummary + +// NewPatternSummary instantiates a new PatternSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatternSummary(insights []PatternInsight, keyMoments []KeyMoment) *PatternSummary { + this := PatternSummary{} + this.Insights = insights + this.KeyMoments = keyMoments + return &this +} + +// NewPatternSummaryWithDefaults instantiates a new PatternSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatternSummaryWithDefaults() *PatternSummary { + this := PatternSummary{} + return &this +} + +// GetInsights returns the Insights field value +func (o *PatternSummary) GetInsights() []PatternInsight { + if o == nil { + var ret []PatternInsight + return ret + } + + return o.Insights +} + +// GetInsightsOk returns a tuple with the Insights field value +// and a boolean to check if the value has been set. +func (o *PatternSummary) GetInsightsOk() ([]PatternInsight, bool) { + if o == nil { + return nil, false + } + return o.Insights, true +} + +// SetInsights sets field value +func (o *PatternSummary) SetInsights(v []PatternInsight) { + o.Insights = v +} + +// GetKeyMoments returns the KeyMoments field value +func (o *PatternSummary) GetKeyMoments() []KeyMoment { + if o == nil { + var ret []KeyMoment + return ret + } + + return o.KeyMoments +} + +// GetKeyMomentsOk returns a tuple with the KeyMoments field value +// and a boolean to check if the value has been set. +func (o *PatternSummary) GetKeyMomentsOk() ([]KeyMoment, bool) { + if o == nil { + return nil, false + } + return o.KeyMoments, true +} + +// SetKeyMoments sets field value +func (o *PatternSummary) SetKeyMoments(v []KeyMoment) { + o.KeyMoments = v +} + +func (o PatternSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatternSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["insights"] = o.Insights + toSerialize["key_moments"] = o.KeyMoments + return toSerialize, nil +} + +func (o *PatternSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "insights", + "key_moments", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatternSummary := _PatternSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatternSummary) + + if err != nil { + return err + } + + *o = PatternSummary(varPatternSummary) + + return err +} + +type NullablePatternSummary struct { + value *PatternSummary + isSet bool +} + +func (v NullablePatternSummary) Get() *PatternSummary { + return v.value +} + +func (v *NullablePatternSummary) Set(val *PatternSummary) { + v.value = val + v.isSet = true +} + +func (v NullablePatternSummary) IsSet() bool { + return v.isSet +} + +func (v *NullablePatternSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatternSummary(val *PatternSummary) *NullablePatternSummary { + return &NullablePatternSummary{value: val, isSet: true} +} + +func (v NullablePatternSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatternSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_performance_summary.go b/go/futureagi/model_performance_summary.go new file mode 100644 index 0000000..97304f1 --- /dev/null +++ b/go/futureagi/model_performance_summary.go @@ -0,0 +1,187 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PerformanceSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PerformanceSummary{} + +// PerformanceSummary struct for PerformanceSummary +type PerformanceSummary struct { + // Performance metrics including pass rate, total test runs, and latest fail rate + TestRunPerformanceMetrics map[string]float32 `json:"test_run_performance_metrics"` + // List of top performing scenarios + TopPerformingScenarios []map[string]string `json:"top_performing_scenarios"` +} + +type _PerformanceSummary PerformanceSummary + +// NewPerformanceSummary instantiates a new PerformanceSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPerformanceSummary(testRunPerformanceMetrics map[string]float32, topPerformingScenarios []map[string]string) *PerformanceSummary { + this := PerformanceSummary{} + this.TestRunPerformanceMetrics = testRunPerformanceMetrics + this.TopPerformingScenarios = topPerformingScenarios + return &this +} + +// NewPerformanceSummaryWithDefaults instantiates a new PerformanceSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPerformanceSummaryWithDefaults() *PerformanceSummary { + this := PerformanceSummary{} + return &this +} + +// GetTestRunPerformanceMetrics returns the TestRunPerformanceMetrics field value +func (o *PerformanceSummary) GetTestRunPerformanceMetrics() map[string]float32 { + if o == nil { + var ret map[string]float32 + return ret + } + + return o.TestRunPerformanceMetrics +} + +// GetTestRunPerformanceMetricsOk returns a tuple with the TestRunPerformanceMetrics field value +// and a boolean to check if the value has been set. +func (o *PerformanceSummary) GetTestRunPerformanceMetricsOk() (*map[string]float32, bool) { + if o == nil { + return nil, false + } + return &o.TestRunPerformanceMetrics, true +} + +// SetTestRunPerformanceMetrics sets field value +func (o *PerformanceSummary) SetTestRunPerformanceMetrics(v map[string]float32) { + o.TestRunPerformanceMetrics = v +} + +// GetTopPerformingScenarios returns the TopPerformingScenarios field value +func (o *PerformanceSummary) GetTopPerformingScenarios() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.TopPerformingScenarios +} + +// GetTopPerformingScenariosOk returns a tuple with the TopPerformingScenarios field value +// and a boolean to check if the value has been set. +func (o *PerformanceSummary) GetTopPerformingScenariosOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.TopPerformingScenarios, true +} + +// SetTopPerformingScenarios sets field value +func (o *PerformanceSummary) SetTopPerformingScenarios(v []map[string]string) { + o.TopPerformingScenarios = v +} + +func (o PerformanceSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PerformanceSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["test_run_performance_metrics"] = o.TestRunPerformanceMetrics + toSerialize["top_performing_scenarios"] = o.TopPerformingScenarios + return toSerialize, nil +} + +func (o *PerformanceSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "test_run_performance_metrics", + "top_performing_scenarios", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPerformanceSummary := _PerformanceSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPerformanceSummary) + + if err != nil { + return err + } + + *o = PerformanceSummary(varPerformanceSummary) + + return err +} + +type NullablePerformanceSummary struct { + value *PerformanceSummary + isSet bool +} + +func (v NullablePerformanceSummary) Get() *PerformanceSummary { + return v.value +} + +func (v *NullablePerformanceSummary) Set(val *PerformanceSummary) { + v.value = val + v.isSet = true +} + +func (v NullablePerformanceSummary) IsSet() bool { + return v.isSet +} + +func (v *NullablePerformanceSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePerformanceSummary(val *PerformanceSummary) *NullablePerformanceSummary { + return &NullablePerformanceSummary{value: val, isSet: true} +} + +func (v NullablePerformanceSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePerformanceSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_persona.go b/go/futureagi/model_persona.go new file mode 100644 index 0000000..83dd85a --- /dev/null +++ b/go/futureagi/model_persona.go @@ -0,0 +1,1544 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Persona type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Persona{} + +// Persona struct for Persona +type Persona struct { + Id *string `json:"id,omitempty"` + // Type of persona (system or workspace-level) + PersonaType *string `json:"persona_type,omitempty"` + PersonaTypeDisplay *string `json:"persona_type_display,omitempty"` + // Name of the persona + Name string `json:"name"` + // Description of the persona + Description NullableString `json:"description,omitempty"` + // List of genders for the persona (e.g., ['male'], ['female']) + Gender map[string]interface{} `json:"gender,omitempty"` + // List of age groups for the persona (e.g., ['18-25'], ['25-32']) + AgeGroup map[string]interface{} `json:"age_group,omitempty"` + // List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher']) + Occupation map[string]interface{} `json:"occupation,omitempty"` + // List of locations for the persona (e.g., ['United States'], ['Canada']) + Location map[string]interface{} `json:"location,omitempty"` + // List of personality types for the persona (e.g., ['Friendly and cooperative']) + Personality map[string]interface{} `json:"personality,omitempty"` + // List of communication styles for the persona (e.g., ['Direct and concise']) + CommunicationStyle map[string]interface{} `json:"communication_style,omitempty"` + // Whether the persona supports multiple languages + Multilingual NullableBool `json:"multilingual,omitempty"` + // List of languages the persona speaks (e.g., ['English', 'Hindi']) + Languages map[string]interface{} `json:"languages,omitempty"` + // List of accents for the persona (e.g., ['American'], ['Australian']) + Accent map[string]interface{} `json:"accent,omitempty"` + // List of conversation speeds (e.g., ['1.0'], ['1.25']) + ConversationSpeed map[string]interface{} `json:"conversation_speed,omitempty"` + // Whether background sound is enabled (null=not specified, True/False for enabled/disabled) + BackgroundSound NullableBool `json:"background_sound,omitempty"` + // List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6']) + FinishedSpeakingSensitivity map[string]interface{} `json:"finished_speaking_sensitivity,omitempty"` + // List of sensitivities for allowing interruptions (e.g., ['5'], ['6']) + InterruptSensitivity map[string]interface{} `json:"interrupt_sensitivity,omitempty"` + // List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful']) + Keywords map[string]interface{} `json:"keywords,omitempty"` + // Additional metadata for the persona (speech clarity, base emotion, etc.) + Metadata map[string]interface{} `json:"metadata,omitempty"` + // Additional instructions for how this persona should behave + AdditionalInstruction NullableString `json:"additional_instruction,omitempty"` + // Whether this is a default/recommended persona + IsDefault NullableBool `json:"is_default,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Profession []string `json:"profession,omitempty"` + Language []string `json:"language,omitempty"` + CustomProperties map[string]interface{} `json:"custom_properties,omitempty"` + // Type of simulation for the persona + SimulationType *string `json:"simulation_type,omitempty"` + // Punctuation style for the persona + Punctuation NullableString `json:"punctuation,omitempty"` + // Slang usage for the persona + SlangUsage NullableString `json:"slang_usage,omitempty"` + // Typos frequency for the persona + TyposFrequency NullableString `json:"typos_frequency,omitempty"` + // Regional mix for the persona + RegionalMix NullableString `json:"regional_mix,omitempty"` + // Emoji usage for the persona + EmojiUsage NullableString `json:"emoji_usage,omitempty"` + // Tone for the persona + Tone NullableString `json:"tone,omitempty"` + // Verbosity for the persona + Verbosity NullableString `json:"verbosity,omitempty"` +} + +type _Persona Persona + +// NewPersona instantiates a new Persona object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPersona(name string) *Persona { + this := Persona{} + this.Name = name + return &this +} + +// NewPersonaWithDefaults instantiates a new Persona object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPersonaWithDefaults() *Persona { + this := Persona{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Persona) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Persona) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Persona) SetId(v string) { + o.Id = &v +} + +// GetPersonaType returns the PersonaType field value if set, zero value otherwise. +func (o *Persona) GetPersonaType() string { + if o == nil || IsNil(o.PersonaType) { + var ret string + return ret + } + return *o.PersonaType +} + +// GetPersonaTypeOk returns a tuple with the PersonaType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetPersonaTypeOk() (*string, bool) { + if o == nil || IsNil(o.PersonaType) { + return nil, false + } + return o.PersonaType, true +} + +// HasPersonaType returns a boolean if a field has been set. +func (o *Persona) HasPersonaType() bool { + if o != nil && !IsNil(o.PersonaType) { + return true + } + + return false +} + +// SetPersonaType gets a reference to the given string and assigns it to the PersonaType field. +func (o *Persona) SetPersonaType(v string) { + o.PersonaType = &v +} + +// GetPersonaTypeDisplay returns the PersonaTypeDisplay field value if set, zero value otherwise. +func (o *Persona) GetPersonaTypeDisplay() string { + if o == nil || IsNil(o.PersonaTypeDisplay) { + var ret string + return ret + } + return *o.PersonaTypeDisplay +} + +// GetPersonaTypeDisplayOk returns a tuple with the PersonaTypeDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetPersonaTypeDisplayOk() (*string, bool) { + if o == nil || IsNil(o.PersonaTypeDisplay) { + return nil, false + } + return o.PersonaTypeDisplay, true +} + +// HasPersonaTypeDisplay returns a boolean if a field has been set. +func (o *Persona) HasPersonaTypeDisplay() bool { + if o != nil && !IsNil(o.PersonaTypeDisplay) { + return true + } + + return false +} + +// SetPersonaTypeDisplay gets a reference to the given string and assigns it to the PersonaTypeDisplay field. +func (o *Persona) SetPersonaTypeDisplay(v string) { + o.PersonaTypeDisplay = &v +} + +// GetName returns the Name field value +func (o *Persona) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Persona) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Persona) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *Persona) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *Persona) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *Persona) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *Persona) UnsetDescription() { + o.Description.Unset() +} + +// GetGender returns the Gender field value if set, zero value otherwise. +func (o *Persona) GetGender() map[string]interface{} { + if o == nil || IsNil(o.Gender) { + var ret map[string]interface{} + return ret + } + return o.Gender +} + +// GetGenderOk returns a tuple with the Gender field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetGenderOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Gender) { + return map[string]interface{}{}, false + } + return o.Gender, true +} + +// HasGender returns a boolean if a field has been set. +func (o *Persona) HasGender() bool { + if o != nil && !IsNil(o.Gender) { + return true + } + + return false +} + +// SetGender gets a reference to the given map[string]interface{} and assigns it to the Gender field. +func (o *Persona) SetGender(v map[string]interface{}) { + o.Gender = v +} + +// GetAgeGroup returns the AgeGroup field value if set, zero value otherwise. +func (o *Persona) GetAgeGroup() map[string]interface{} { + if o == nil || IsNil(o.AgeGroup) { + var ret map[string]interface{} + return ret + } + return o.AgeGroup +} + +// GetAgeGroupOk returns a tuple with the AgeGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetAgeGroupOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.AgeGroup) { + return map[string]interface{}{}, false + } + return o.AgeGroup, true +} + +// HasAgeGroup returns a boolean if a field has been set. +func (o *Persona) HasAgeGroup() bool { + if o != nil && !IsNil(o.AgeGroup) { + return true + } + + return false +} + +// SetAgeGroup gets a reference to the given map[string]interface{} and assigns it to the AgeGroup field. +func (o *Persona) SetAgeGroup(v map[string]interface{}) { + o.AgeGroup = v +} + +// GetOccupation returns the Occupation field value if set, zero value otherwise. +func (o *Persona) GetOccupation() map[string]interface{} { + if o == nil || IsNil(o.Occupation) { + var ret map[string]interface{} + return ret + } + return o.Occupation +} + +// GetOccupationOk returns a tuple with the Occupation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetOccupationOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Occupation) { + return map[string]interface{}{}, false + } + return o.Occupation, true +} + +// HasOccupation returns a boolean if a field has been set. +func (o *Persona) HasOccupation() bool { + if o != nil && !IsNil(o.Occupation) { + return true + } + + return false +} + +// SetOccupation gets a reference to the given map[string]interface{} and assigns it to the Occupation field. +func (o *Persona) SetOccupation(v map[string]interface{}) { + o.Occupation = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *Persona) GetLocation() map[string]interface{} { + if o == nil || IsNil(o.Location) { + var ret map[string]interface{} + return ret + } + return o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetLocationOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Location) { + return map[string]interface{}{}, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *Persona) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given map[string]interface{} and assigns it to the Location field. +func (o *Persona) SetLocation(v map[string]interface{}) { + o.Location = v +} + +// GetPersonality returns the Personality field value if set, zero value otherwise. +func (o *Persona) GetPersonality() map[string]interface{} { + if o == nil || IsNil(o.Personality) { + var ret map[string]interface{} + return ret + } + return o.Personality +} + +// GetPersonalityOk returns a tuple with the Personality field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetPersonalityOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Personality) { + return map[string]interface{}{}, false + } + return o.Personality, true +} + +// HasPersonality returns a boolean if a field has been set. +func (o *Persona) HasPersonality() bool { + if o != nil && !IsNil(o.Personality) { + return true + } + + return false +} + +// SetPersonality gets a reference to the given map[string]interface{} and assigns it to the Personality field. +func (o *Persona) SetPersonality(v map[string]interface{}) { + o.Personality = v +} + +// GetCommunicationStyle returns the CommunicationStyle field value if set, zero value otherwise. +func (o *Persona) GetCommunicationStyle() map[string]interface{} { + if o == nil || IsNil(o.CommunicationStyle) { + var ret map[string]interface{} + return ret + } + return o.CommunicationStyle +} + +// GetCommunicationStyleOk returns a tuple with the CommunicationStyle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetCommunicationStyleOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CommunicationStyle) { + return map[string]interface{}{}, false + } + return o.CommunicationStyle, true +} + +// HasCommunicationStyle returns a boolean if a field has been set. +func (o *Persona) HasCommunicationStyle() bool { + if o != nil && !IsNil(o.CommunicationStyle) { + return true + } + + return false +} + +// SetCommunicationStyle gets a reference to the given map[string]interface{} and assigns it to the CommunicationStyle field. +func (o *Persona) SetCommunicationStyle(v map[string]interface{}) { + o.CommunicationStyle = v +} + +// GetMultilingual returns the Multilingual field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetMultilingual() bool { + if o == nil || IsNil(o.Multilingual.Get()) { + var ret bool + return ret + } + return *o.Multilingual.Get() +} + +// GetMultilingualOk returns a tuple with the Multilingual field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetMultilingualOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Multilingual.Get(), o.Multilingual.IsSet() +} + +// HasMultilingual returns a boolean if a field has been set. +func (o *Persona) HasMultilingual() bool { + if o != nil && o.Multilingual.IsSet() { + return true + } + + return false +} + +// SetMultilingual gets a reference to the given NullableBool and assigns it to the Multilingual field. +func (o *Persona) SetMultilingual(v bool) { + o.Multilingual.Set(&v) +} + +// SetMultilingualNil sets the value for Multilingual to be an explicit nil +func (o *Persona) SetMultilingualNil() { + o.Multilingual.Set(nil) +} + +// UnsetMultilingual ensures that no value is present for Multilingual, not even an explicit nil +func (o *Persona) UnsetMultilingual() { + o.Multilingual.Unset() +} + +// GetLanguages returns the Languages field value if set, zero value otherwise. +func (o *Persona) GetLanguages() map[string]interface{} { + if o == nil || IsNil(o.Languages) { + var ret map[string]interface{} + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetLanguagesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Languages) { + return map[string]interface{}{}, false + } + return o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *Persona) HasLanguages() bool { + if o != nil && !IsNil(o.Languages) { + return true + } + + return false +} + +// SetLanguages gets a reference to the given map[string]interface{} and assigns it to the Languages field. +func (o *Persona) SetLanguages(v map[string]interface{}) { + o.Languages = v +} + +// GetAccent returns the Accent field value if set, zero value otherwise. +func (o *Persona) GetAccent() map[string]interface{} { + if o == nil || IsNil(o.Accent) { + var ret map[string]interface{} + return ret + } + return o.Accent +} + +// GetAccentOk returns a tuple with the Accent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetAccentOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Accent) { + return map[string]interface{}{}, false + } + return o.Accent, true +} + +// HasAccent returns a boolean if a field has been set. +func (o *Persona) HasAccent() bool { + if o != nil && !IsNil(o.Accent) { + return true + } + + return false +} + +// SetAccent gets a reference to the given map[string]interface{} and assigns it to the Accent field. +func (o *Persona) SetAccent(v map[string]interface{}) { + o.Accent = v +} + +// GetConversationSpeed returns the ConversationSpeed field value if set, zero value otherwise. +func (o *Persona) GetConversationSpeed() map[string]interface{} { + if o == nil || IsNil(o.ConversationSpeed) { + var ret map[string]interface{} + return ret + } + return o.ConversationSpeed +} + +// GetConversationSpeedOk returns a tuple with the ConversationSpeed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetConversationSpeedOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConversationSpeed) { + return map[string]interface{}{}, false + } + return o.ConversationSpeed, true +} + +// HasConversationSpeed returns a boolean if a field has been set. +func (o *Persona) HasConversationSpeed() bool { + if o != nil && !IsNil(o.ConversationSpeed) { + return true + } + + return false +} + +// SetConversationSpeed gets a reference to the given map[string]interface{} and assigns it to the ConversationSpeed field. +func (o *Persona) SetConversationSpeed(v map[string]interface{}) { + o.ConversationSpeed = v +} + +// GetBackgroundSound returns the BackgroundSound field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetBackgroundSound() bool { + if o == nil || IsNil(o.BackgroundSound.Get()) { + var ret bool + return ret + } + return *o.BackgroundSound.Get() +} + +// GetBackgroundSoundOk returns a tuple with the BackgroundSound field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetBackgroundSoundOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.BackgroundSound.Get(), o.BackgroundSound.IsSet() +} + +// HasBackgroundSound returns a boolean if a field has been set. +func (o *Persona) HasBackgroundSound() bool { + if o != nil && o.BackgroundSound.IsSet() { + return true + } + + return false +} + +// SetBackgroundSound gets a reference to the given NullableBool and assigns it to the BackgroundSound field. +func (o *Persona) SetBackgroundSound(v bool) { + o.BackgroundSound.Set(&v) +} + +// SetBackgroundSoundNil sets the value for BackgroundSound to be an explicit nil +func (o *Persona) SetBackgroundSoundNil() { + o.BackgroundSound.Set(nil) +} + +// UnsetBackgroundSound ensures that no value is present for BackgroundSound, not even an explicit nil +func (o *Persona) UnsetBackgroundSound() { + o.BackgroundSound.Unset() +} + +// GetFinishedSpeakingSensitivity returns the FinishedSpeakingSensitivity field value if set, zero value otherwise. +func (o *Persona) GetFinishedSpeakingSensitivity() map[string]interface{} { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + var ret map[string]interface{} + return ret + } + return o.FinishedSpeakingSensitivity +} + +// GetFinishedSpeakingSensitivityOk returns a tuple with the FinishedSpeakingSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetFinishedSpeakingSensitivityOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + return map[string]interface{}{}, false + } + return o.FinishedSpeakingSensitivity, true +} + +// HasFinishedSpeakingSensitivity returns a boolean if a field has been set. +func (o *Persona) HasFinishedSpeakingSensitivity() bool { + if o != nil && !IsNil(o.FinishedSpeakingSensitivity) { + return true + } + + return false +} + +// SetFinishedSpeakingSensitivity gets a reference to the given map[string]interface{} and assigns it to the FinishedSpeakingSensitivity field. +func (o *Persona) SetFinishedSpeakingSensitivity(v map[string]interface{}) { + o.FinishedSpeakingSensitivity = v +} + +// GetInterruptSensitivity returns the InterruptSensitivity field value if set, zero value otherwise. +func (o *Persona) GetInterruptSensitivity() map[string]interface{} { + if o == nil || IsNil(o.InterruptSensitivity) { + var ret map[string]interface{} + return ret + } + return o.InterruptSensitivity +} + +// GetInterruptSensitivityOk returns a tuple with the InterruptSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetInterruptSensitivityOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InterruptSensitivity) { + return map[string]interface{}{}, false + } + return o.InterruptSensitivity, true +} + +// HasInterruptSensitivity returns a boolean if a field has been set. +func (o *Persona) HasInterruptSensitivity() bool { + if o != nil && !IsNil(o.InterruptSensitivity) { + return true + } + + return false +} + +// SetInterruptSensitivity gets a reference to the given map[string]interface{} and assigns it to the InterruptSensitivity field. +func (o *Persona) SetInterruptSensitivity(v map[string]interface{}) { + o.InterruptSensitivity = v +} + +// GetKeywords returns the Keywords field value if set, zero value otherwise. +func (o *Persona) GetKeywords() map[string]interface{} { + if o == nil || IsNil(o.Keywords) { + var ret map[string]interface{} + return ret + } + return o.Keywords +} + +// GetKeywordsOk returns a tuple with the Keywords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetKeywordsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Keywords) { + return map[string]interface{}{}, false + } + return o.Keywords, true +} + +// HasKeywords returns a boolean if a field has been set. +func (o *Persona) HasKeywords() bool { + if o != nil && !IsNil(o.Keywords) { + return true + } + + return false +} + +// SetKeywords gets a reference to the given map[string]interface{} and assigns it to the Keywords field. +func (o *Persona) SetKeywords(v map[string]interface{}) { + o.Keywords = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *Persona) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *Persona) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *Persona) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetAdditionalInstruction returns the AdditionalInstruction field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetAdditionalInstruction() string { + if o == nil || IsNil(o.AdditionalInstruction.Get()) { + var ret string + return ret + } + return *o.AdditionalInstruction.Get() +} + +// GetAdditionalInstructionOk returns a tuple with the AdditionalInstruction field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetAdditionalInstructionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AdditionalInstruction.Get(), o.AdditionalInstruction.IsSet() +} + +// HasAdditionalInstruction returns a boolean if a field has been set. +func (o *Persona) HasAdditionalInstruction() bool { + if o != nil && o.AdditionalInstruction.IsSet() { + return true + } + + return false +} + +// SetAdditionalInstruction gets a reference to the given NullableString and assigns it to the AdditionalInstruction field. +func (o *Persona) SetAdditionalInstruction(v string) { + o.AdditionalInstruction.Set(&v) +} + +// SetAdditionalInstructionNil sets the value for AdditionalInstruction to be an explicit nil +func (o *Persona) SetAdditionalInstructionNil() { + o.AdditionalInstruction.Set(nil) +} + +// UnsetAdditionalInstruction ensures that no value is present for AdditionalInstruction, not even an explicit nil +func (o *Persona) UnsetAdditionalInstruction() { + o.AdditionalInstruction.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *Persona) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *Persona) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *Persona) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *Persona) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Persona) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Persona) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Persona) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Persona) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Persona) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Persona) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetProfession returns the Profession field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetProfession() []string { + if o == nil { + var ret []string + return ret + } + return o.Profession +} + +// GetProfessionOk returns a tuple with the Profession field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetProfessionOk() ([]string, bool) { + if o == nil || IsNil(o.Profession) { + return nil, false + } + return o.Profession, true +} + +// HasProfession returns a boolean if a field has been set. +func (o *Persona) HasProfession() bool { + if o != nil && !IsNil(o.Profession) { + return true + } + + return false +} + +// SetProfession gets a reference to the given []string and assigns it to the Profession field. +func (o *Persona) SetProfession(v []string) { + o.Profession = v +} + +// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetLanguage() []string { + if o == nil { + var ret []string + return ret + } + return o.Language +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetLanguageOk() ([]string, bool) { + if o == nil || IsNil(o.Language) { + return nil, false + } + return o.Language, true +} + +// HasLanguage returns a boolean if a field has been set. +func (o *Persona) HasLanguage() bool { + if o != nil && !IsNil(o.Language) { + return true + } + + return false +} + +// SetLanguage gets a reference to the given []string and assigns it to the Language field. +func (o *Persona) SetLanguage(v []string) { + o.Language = v +} + +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *Persona) GetCustomProperties() map[string]interface{} { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]interface{} + return ret + } + return o.CustomProperties +} + +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetCustomPropertiesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CustomProperties) { + return map[string]interface{}{}, false + } + return o.CustomProperties, true +} + +// HasCustomProperties returns a boolean if a field has been set. +func (o *Persona) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { + return true + } + + return false +} + +// SetCustomProperties gets a reference to the given map[string]interface{} and assigns it to the CustomProperties field. +func (o *Persona) SetCustomProperties(v map[string]interface{}) { + o.CustomProperties = v +} + +// GetSimulationType returns the SimulationType field value if set, zero value otherwise. +func (o *Persona) GetSimulationType() string { + if o == nil || IsNil(o.SimulationType) { + var ret string + return ret + } + return *o.SimulationType +} + +// GetSimulationTypeOk returns a tuple with the SimulationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Persona) GetSimulationTypeOk() (*string, bool) { + if o == nil || IsNil(o.SimulationType) { + return nil, false + } + return o.SimulationType, true +} + +// HasSimulationType returns a boolean if a field has been set. +func (o *Persona) HasSimulationType() bool { + if o != nil && !IsNil(o.SimulationType) { + return true + } + + return false +} + +// SetSimulationType gets a reference to the given string and assigns it to the SimulationType field. +func (o *Persona) SetSimulationType(v string) { + o.SimulationType = &v +} + +// GetPunctuation returns the Punctuation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetPunctuation() string { + if o == nil || IsNil(o.Punctuation.Get()) { + var ret string + return ret + } + return *o.Punctuation.Get() +} + +// GetPunctuationOk returns a tuple with the Punctuation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetPunctuationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Punctuation.Get(), o.Punctuation.IsSet() +} + +// HasPunctuation returns a boolean if a field has been set. +func (o *Persona) HasPunctuation() bool { + if o != nil && o.Punctuation.IsSet() { + return true + } + + return false +} + +// SetPunctuation gets a reference to the given NullableString and assigns it to the Punctuation field. +func (o *Persona) SetPunctuation(v string) { + o.Punctuation.Set(&v) +} + +// SetPunctuationNil sets the value for Punctuation to be an explicit nil +func (o *Persona) SetPunctuationNil() { + o.Punctuation.Set(nil) +} + +// UnsetPunctuation ensures that no value is present for Punctuation, not even an explicit nil +func (o *Persona) UnsetPunctuation() { + o.Punctuation.Unset() +} + +// GetSlangUsage returns the SlangUsage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetSlangUsage() string { + if o == nil || IsNil(o.SlangUsage.Get()) { + var ret string + return ret + } + return *o.SlangUsage.Get() +} + +// GetSlangUsageOk returns a tuple with the SlangUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetSlangUsageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlangUsage.Get(), o.SlangUsage.IsSet() +} + +// HasSlangUsage returns a boolean if a field has been set. +func (o *Persona) HasSlangUsage() bool { + if o != nil && o.SlangUsage.IsSet() { + return true + } + + return false +} + +// SetSlangUsage gets a reference to the given NullableString and assigns it to the SlangUsage field. +func (o *Persona) SetSlangUsage(v string) { + o.SlangUsage.Set(&v) +} + +// SetSlangUsageNil sets the value for SlangUsage to be an explicit nil +func (o *Persona) SetSlangUsageNil() { + o.SlangUsage.Set(nil) +} + +// UnsetSlangUsage ensures that no value is present for SlangUsage, not even an explicit nil +func (o *Persona) UnsetSlangUsage() { + o.SlangUsage.Unset() +} + +// GetTyposFrequency returns the TyposFrequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetTyposFrequency() string { + if o == nil || IsNil(o.TyposFrequency.Get()) { + var ret string + return ret + } + return *o.TyposFrequency.Get() +} + +// GetTyposFrequencyOk returns a tuple with the TyposFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetTyposFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TyposFrequency.Get(), o.TyposFrequency.IsSet() +} + +// HasTyposFrequency returns a boolean if a field has been set. +func (o *Persona) HasTyposFrequency() bool { + if o != nil && o.TyposFrequency.IsSet() { + return true + } + + return false +} + +// SetTyposFrequency gets a reference to the given NullableString and assigns it to the TyposFrequency field. +func (o *Persona) SetTyposFrequency(v string) { + o.TyposFrequency.Set(&v) +} + +// SetTyposFrequencyNil sets the value for TyposFrequency to be an explicit nil +func (o *Persona) SetTyposFrequencyNil() { + o.TyposFrequency.Set(nil) +} + +// UnsetTyposFrequency ensures that no value is present for TyposFrequency, not even an explicit nil +func (o *Persona) UnsetTyposFrequency() { + o.TyposFrequency.Unset() +} + +// GetRegionalMix returns the RegionalMix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetRegionalMix() string { + if o == nil || IsNil(o.RegionalMix.Get()) { + var ret string + return ret + } + return *o.RegionalMix.Get() +} + +// GetRegionalMixOk returns a tuple with the RegionalMix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetRegionalMixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RegionalMix.Get(), o.RegionalMix.IsSet() +} + +// HasRegionalMix returns a boolean if a field has been set. +func (o *Persona) HasRegionalMix() bool { + if o != nil && o.RegionalMix.IsSet() { + return true + } + + return false +} + +// SetRegionalMix gets a reference to the given NullableString and assigns it to the RegionalMix field. +func (o *Persona) SetRegionalMix(v string) { + o.RegionalMix.Set(&v) +} + +// SetRegionalMixNil sets the value for RegionalMix to be an explicit nil +func (o *Persona) SetRegionalMixNil() { + o.RegionalMix.Set(nil) +} + +// UnsetRegionalMix ensures that no value is present for RegionalMix, not even an explicit nil +func (o *Persona) UnsetRegionalMix() { + o.RegionalMix.Unset() +} + +// GetEmojiUsage returns the EmojiUsage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetEmojiUsage() string { + if o == nil || IsNil(o.EmojiUsage.Get()) { + var ret string + return ret + } + return *o.EmojiUsage.Get() +} + +// GetEmojiUsageOk returns a tuple with the EmojiUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetEmojiUsageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EmojiUsage.Get(), o.EmojiUsage.IsSet() +} + +// HasEmojiUsage returns a boolean if a field has been set. +func (o *Persona) HasEmojiUsage() bool { + if o != nil && o.EmojiUsage.IsSet() { + return true + } + + return false +} + +// SetEmojiUsage gets a reference to the given NullableString and assigns it to the EmojiUsage field. +func (o *Persona) SetEmojiUsage(v string) { + o.EmojiUsage.Set(&v) +} + +// SetEmojiUsageNil sets the value for EmojiUsage to be an explicit nil +func (o *Persona) SetEmojiUsageNil() { + o.EmojiUsage.Set(nil) +} + +// UnsetEmojiUsage ensures that no value is present for EmojiUsage, not even an explicit nil +func (o *Persona) UnsetEmojiUsage() { + o.EmojiUsage.Unset() +} + +// GetTone returns the Tone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetTone() string { + if o == nil || IsNil(o.Tone.Get()) { + var ret string + return ret + } + return *o.Tone.Get() +} + +// GetToneOk returns a tuple with the Tone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetToneOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Tone.Get(), o.Tone.IsSet() +} + +// HasTone returns a boolean if a field has been set. +func (o *Persona) HasTone() bool { + if o != nil && o.Tone.IsSet() { + return true + } + + return false +} + +// SetTone gets a reference to the given NullableString and assigns it to the Tone field. +func (o *Persona) SetTone(v string) { + o.Tone.Set(&v) +} + +// SetToneNil sets the value for Tone to be an explicit nil +func (o *Persona) SetToneNil() { + o.Tone.Set(nil) +} + +// UnsetTone ensures that no value is present for Tone, not even an explicit nil +func (o *Persona) UnsetTone() { + o.Tone.Unset() +} + +// GetVerbosity returns the Verbosity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Persona) GetVerbosity() string { + if o == nil || IsNil(o.Verbosity.Get()) { + var ret string + return ret + } + return *o.Verbosity.Get() +} + +// GetVerbosityOk returns a tuple with the Verbosity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Persona) GetVerbosityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Verbosity.Get(), o.Verbosity.IsSet() +} + +// HasVerbosity returns a boolean if a field has been set. +func (o *Persona) HasVerbosity() bool { + if o != nil && o.Verbosity.IsSet() { + return true + } + + return false +} + +// SetVerbosity gets a reference to the given NullableString and assigns it to the Verbosity field. +func (o *Persona) SetVerbosity(v string) { + o.Verbosity.Set(&v) +} + +// SetVerbosityNil sets the value for Verbosity to be an explicit nil +func (o *Persona) SetVerbosityNil() { + o.Verbosity.Set(nil) +} + +// UnsetVerbosity ensures that no value is present for Verbosity, not even an explicit nil +func (o *Persona) UnsetVerbosity() { + o.Verbosity.Unset() +} + +func (o Persona) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Persona) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.PersonaType) { + toSerialize["persona_type"] = o.PersonaType + } + if !IsNil(o.PersonaTypeDisplay) { + toSerialize["persona_type_display"] = o.PersonaTypeDisplay + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Gender) { + toSerialize["gender"] = o.Gender + } + if !IsNil(o.AgeGroup) { + toSerialize["age_group"] = o.AgeGroup + } + if !IsNil(o.Occupation) { + toSerialize["occupation"] = o.Occupation + } + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + if !IsNil(o.Personality) { + toSerialize["personality"] = o.Personality + } + if !IsNil(o.CommunicationStyle) { + toSerialize["communication_style"] = o.CommunicationStyle + } + if o.Multilingual.IsSet() { + toSerialize["multilingual"] = o.Multilingual.Get() + } + if !IsNil(o.Languages) { + toSerialize["languages"] = o.Languages + } + if !IsNil(o.Accent) { + toSerialize["accent"] = o.Accent + } + if !IsNil(o.ConversationSpeed) { + toSerialize["conversation_speed"] = o.ConversationSpeed + } + if o.BackgroundSound.IsSet() { + toSerialize["background_sound"] = o.BackgroundSound.Get() + } + if !IsNil(o.FinishedSpeakingSensitivity) { + toSerialize["finished_speaking_sensitivity"] = o.FinishedSpeakingSensitivity + } + if !IsNil(o.InterruptSensitivity) { + toSerialize["interrupt_sensitivity"] = o.InterruptSensitivity + } + if !IsNil(o.Keywords) { + toSerialize["keywords"] = o.Keywords + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.AdditionalInstruction.IsSet() { + toSerialize["additional_instruction"] = o.AdditionalInstruction.Get() + } + if o.IsDefault.IsSet() { + toSerialize["is_default"] = o.IsDefault.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.Profession != nil { + toSerialize["profession"] = o.Profession + } + if o.Language != nil { + toSerialize["language"] = o.Language + } + if !IsNil(o.CustomProperties) { + toSerialize["custom_properties"] = o.CustomProperties + } + if !IsNil(o.SimulationType) { + toSerialize["simulation_type"] = o.SimulationType + } + if o.Punctuation.IsSet() { + toSerialize["punctuation"] = o.Punctuation.Get() + } + if o.SlangUsage.IsSet() { + toSerialize["slang_usage"] = o.SlangUsage.Get() + } + if o.TyposFrequency.IsSet() { + toSerialize["typos_frequency"] = o.TyposFrequency.Get() + } + if o.RegionalMix.IsSet() { + toSerialize["regional_mix"] = o.RegionalMix.Get() + } + if o.EmojiUsage.IsSet() { + toSerialize["emoji_usage"] = o.EmojiUsage.Get() + } + if o.Tone.IsSet() { + toSerialize["tone"] = o.Tone.Get() + } + if o.Verbosity.IsSet() { + toSerialize["verbosity"] = o.Verbosity.Get() + } + return toSerialize, nil +} + +func (o *Persona) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPersona := _Persona{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPersona) + + if err != nil { + return err + } + + *o = Persona(varPersona) + + return err +} + +type NullablePersona struct { + value *Persona + isSet bool +} + +func (v NullablePersona) Get() *Persona { + return v.value +} + +func (v *NullablePersona) Set(val *Persona) { + v.value = val + v.isSet = true +} + +func (v NullablePersona) IsSet() bool { + return v.isSet +} + +func (v *NullablePersona) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersona(val *Persona) *NullablePersona { + return &NullablePersona{value: val, isSet: true} +} + +func (v NullablePersona) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersona) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_persona_create.go b/go/futureagi/model_persona_create.go new file mode 100644 index 0000000..d462b81 --- /dev/null +++ b/go/futureagi/model_persona_create.go @@ -0,0 +1,1211 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PersonaCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PersonaCreate{} + +// PersonaCreate struct for PersonaCreate +type PersonaCreate struct { + Name string `json:"name"` + Description string `json:"description"` + Gender []string `json:"gender,omitempty"` + AgeGroup []string `json:"age_group,omitempty"` + Location []string `json:"location,omitempty"` + Profession []string `json:"profession,omitempty"` + Personality []string `json:"personality,omitempty"` + CommunicationStyle []string `json:"communication_style,omitempty"` + Accent []string `json:"accent,omitempty"` + Multilingual *bool `json:"multilingual,omitempty"` + Language []string `json:"language,omitempty"` + ConversationSpeed []string `json:"conversation_speed,omitempty"` + BackgroundSound NullableBool `json:"background_sound,omitempty"` + FinishedSpeakingSensitivity []string `json:"finished_speaking_sensitivity,omitempty"` + InterruptSensitivity []string `json:"interrupt_sensitivity,omitempty"` + Keywords []string `json:"keywords,omitempty"` + CustomProperties map[string]interface{} `json:"custom_properties,omitempty"` + AdditionalInstruction NullableString `json:"additional_instruction,omitempty"` + SimulationType NullableString `json:"simulation_type,omitempty"` + Tone NullableString `json:"tone,omitempty"` + Punctuation NullableString `json:"punctuation,omitempty"` + SlangUsage NullableString `json:"slang_usage,omitempty"` + TyposFrequency NullableString `json:"typos_frequency,omitempty"` + RegionalMix NullableString `json:"regional_mix,omitempty"` + EmojiUsage NullableString `json:"emoji_usage,omitempty"` + Verbosity NullableString `json:"verbosity,omitempty"` +} + +type _PersonaCreate PersonaCreate + +// NewPersonaCreate instantiates a new PersonaCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPersonaCreate(name string, description string) *PersonaCreate { + this := PersonaCreate{} + this.Name = name + this.Description = description + var multilingual bool = false + this.Multilingual = &multilingual + var additionalInstruction string = "" + this.AdditionalInstruction = *NewNullableString(&additionalInstruction) + var simulationType string = "voice" + this.SimulationType = *NewNullableString(&simulationType) + var tone string = "casual" + this.Tone = *NewNullableString(&tone) + var punctuation string = "clean" + this.Punctuation = *NewNullableString(&punctuation) + var slangUsage string = "light" + this.SlangUsage = *NewNullableString(&slangUsage) + var typosFrequency string = "rare" + this.TyposFrequency = *NewNullableString(&typosFrequency) + var regionalMix string = "light" + this.RegionalMix = *NewNullableString(®ionalMix) + var emojiUsage string = "light" + this.EmojiUsage = *NewNullableString(&emojiUsage) + var verbosity string = "balanced" + this.Verbosity = *NewNullableString(&verbosity) + return &this +} + +// NewPersonaCreateWithDefaults instantiates a new PersonaCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPersonaCreateWithDefaults() *PersonaCreate { + this := PersonaCreate{} + var multilingual bool = false + this.Multilingual = &multilingual + var additionalInstruction string = "" + this.AdditionalInstruction = *NewNullableString(&additionalInstruction) + var simulationType string = "voice" + this.SimulationType = *NewNullableString(&simulationType) + var tone string = "casual" + this.Tone = *NewNullableString(&tone) + var punctuation string = "clean" + this.Punctuation = *NewNullableString(&punctuation) + var slangUsage string = "light" + this.SlangUsage = *NewNullableString(&slangUsage) + var typosFrequency string = "rare" + this.TyposFrequency = *NewNullableString(&typosFrequency) + var regionalMix string = "light" + this.RegionalMix = *NewNullableString(®ionalMix) + var emojiUsage string = "light" + this.EmojiUsage = *NewNullableString(&emojiUsage) + var verbosity string = "balanced" + this.Verbosity = *NewNullableString(&verbosity) + return &this +} + +// GetName returns the Name field value +func (o *PersonaCreate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PersonaCreate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PersonaCreate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *PersonaCreate) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *PersonaCreate) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *PersonaCreate) SetDescription(v string) { + o.Description = v +} + +// GetGender returns the Gender field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetGender() []string { + if o == nil { + var ret []string + return ret + } + return o.Gender +} + +// GetGenderOk returns a tuple with the Gender field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetGenderOk() ([]string, bool) { + if o == nil || IsNil(o.Gender) { + return nil, false + } + return o.Gender, true +} + +// HasGender returns a boolean if a field has been set. +func (o *PersonaCreate) HasGender() bool { + if o != nil && !IsNil(o.Gender) { + return true + } + + return false +} + +// SetGender gets a reference to the given []string and assigns it to the Gender field. +func (o *PersonaCreate) SetGender(v []string) { + o.Gender = v +} + +// GetAgeGroup returns the AgeGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetAgeGroup() []string { + if o == nil { + var ret []string + return ret + } + return o.AgeGroup +} + +// GetAgeGroupOk returns a tuple with the AgeGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetAgeGroupOk() ([]string, bool) { + if o == nil || IsNil(o.AgeGroup) { + return nil, false + } + return o.AgeGroup, true +} + +// HasAgeGroup returns a boolean if a field has been set. +func (o *PersonaCreate) HasAgeGroup() bool { + if o != nil && !IsNil(o.AgeGroup) { + return true + } + + return false +} + +// SetAgeGroup gets a reference to the given []string and assigns it to the AgeGroup field. +func (o *PersonaCreate) SetAgeGroup(v []string) { + o.AgeGroup = v +} + +// GetLocation returns the Location field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetLocation() []string { + if o == nil { + var ret []string + return ret + } + return o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetLocationOk() ([]string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *PersonaCreate) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given []string and assigns it to the Location field. +func (o *PersonaCreate) SetLocation(v []string) { + o.Location = v +} + +// GetProfession returns the Profession field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetProfession() []string { + if o == nil { + var ret []string + return ret + } + return o.Profession +} + +// GetProfessionOk returns a tuple with the Profession field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetProfessionOk() ([]string, bool) { + if o == nil || IsNil(o.Profession) { + return nil, false + } + return o.Profession, true +} + +// HasProfession returns a boolean if a field has been set. +func (o *PersonaCreate) HasProfession() bool { + if o != nil && !IsNil(o.Profession) { + return true + } + + return false +} + +// SetProfession gets a reference to the given []string and assigns it to the Profession field. +func (o *PersonaCreate) SetProfession(v []string) { + o.Profession = v +} + +// GetPersonality returns the Personality field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetPersonality() []string { + if o == nil { + var ret []string + return ret + } + return o.Personality +} + +// GetPersonalityOk returns a tuple with the Personality field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetPersonalityOk() ([]string, bool) { + if o == nil || IsNil(o.Personality) { + return nil, false + } + return o.Personality, true +} + +// HasPersonality returns a boolean if a field has been set. +func (o *PersonaCreate) HasPersonality() bool { + if o != nil && !IsNil(o.Personality) { + return true + } + + return false +} + +// SetPersonality gets a reference to the given []string and assigns it to the Personality field. +func (o *PersonaCreate) SetPersonality(v []string) { + o.Personality = v +} + +// GetCommunicationStyle returns the CommunicationStyle field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetCommunicationStyle() []string { + if o == nil { + var ret []string + return ret + } + return o.CommunicationStyle +} + +// GetCommunicationStyleOk returns a tuple with the CommunicationStyle field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetCommunicationStyleOk() ([]string, bool) { + if o == nil || IsNil(o.CommunicationStyle) { + return nil, false + } + return o.CommunicationStyle, true +} + +// HasCommunicationStyle returns a boolean if a field has been set. +func (o *PersonaCreate) HasCommunicationStyle() bool { + if o != nil && !IsNil(o.CommunicationStyle) { + return true + } + + return false +} + +// SetCommunicationStyle gets a reference to the given []string and assigns it to the CommunicationStyle field. +func (o *PersonaCreate) SetCommunicationStyle(v []string) { + o.CommunicationStyle = v +} + +// GetAccent returns the Accent field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetAccent() []string { + if o == nil { + var ret []string + return ret + } + return o.Accent +} + +// GetAccentOk returns a tuple with the Accent field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetAccentOk() ([]string, bool) { + if o == nil || IsNil(o.Accent) { + return nil, false + } + return o.Accent, true +} + +// HasAccent returns a boolean if a field has been set. +func (o *PersonaCreate) HasAccent() bool { + if o != nil && !IsNil(o.Accent) { + return true + } + + return false +} + +// SetAccent gets a reference to the given []string and assigns it to the Accent field. +func (o *PersonaCreate) SetAccent(v []string) { + o.Accent = v +} + +// GetMultilingual returns the Multilingual field value if set, zero value otherwise. +func (o *PersonaCreate) GetMultilingual() bool { + if o == nil || IsNil(o.Multilingual) { + var ret bool + return ret + } + return *o.Multilingual +} + +// GetMultilingualOk returns a tuple with the Multilingual field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaCreate) GetMultilingualOk() (*bool, bool) { + if o == nil || IsNil(o.Multilingual) { + return nil, false + } + return o.Multilingual, true +} + +// HasMultilingual returns a boolean if a field has been set. +func (o *PersonaCreate) HasMultilingual() bool { + if o != nil && !IsNil(o.Multilingual) { + return true + } + + return false +} + +// SetMultilingual gets a reference to the given bool and assigns it to the Multilingual field. +func (o *PersonaCreate) SetMultilingual(v bool) { + o.Multilingual = &v +} + +// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetLanguage() []string { + if o == nil { + var ret []string + return ret + } + return o.Language +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetLanguageOk() ([]string, bool) { + if o == nil || IsNil(o.Language) { + return nil, false + } + return o.Language, true +} + +// HasLanguage returns a boolean if a field has been set. +func (o *PersonaCreate) HasLanguage() bool { + if o != nil && !IsNil(o.Language) { + return true + } + + return false +} + +// SetLanguage gets a reference to the given []string and assigns it to the Language field. +func (o *PersonaCreate) SetLanguage(v []string) { + o.Language = v +} + +// GetConversationSpeed returns the ConversationSpeed field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetConversationSpeed() []string { + if o == nil { + var ret []string + return ret + } + return o.ConversationSpeed +} + +// GetConversationSpeedOk returns a tuple with the ConversationSpeed field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetConversationSpeedOk() ([]string, bool) { + if o == nil || IsNil(o.ConversationSpeed) { + return nil, false + } + return o.ConversationSpeed, true +} + +// HasConversationSpeed returns a boolean if a field has been set. +func (o *PersonaCreate) HasConversationSpeed() bool { + if o != nil && !IsNil(o.ConversationSpeed) { + return true + } + + return false +} + +// SetConversationSpeed gets a reference to the given []string and assigns it to the ConversationSpeed field. +func (o *PersonaCreate) SetConversationSpeed(v []string) { + o.ConversationSpeed = v +} + +// GetBackgroundSound returns the BackgroundSound field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetBackgroundSound() bool { + if o == nil || IsNil(o.BackgroundSound.Get()) { + var ret bool + return ret + } + return *o.BackgroundSound.Get() +} + +// GetBackgroundSoundOk returns a tuple with the BackgroundSound field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetBackgroundSoundOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.BackgroundSound.Get(), o.BackgroundSound.IsSet() +} + +// HasBackgroundSound returns a boolean if a field has been set. +func (o *PersonaCreate) HasBackgroundSound() bool { + if o != nil && o.BackgroundSound.IsSet() { + return true + } + + return false +} + +// SetBackgroundSound gets a reference to the given NullableBool and assigns it to the BackgroundSound field. +func (o *PersonaCreate) SetBackgroundSound(v bool) { + o.BackgroundSound.Set(&v) +} + +// SetBackgroundSoundNil sets the value for BackgroundSound to be an explicit nil +func (o *PersonaCreate) SetBackgroundSoundNil() { + o.BackgroundSound.Set(nil) +} + +// UnsetBackgroundSound ensures that no value is present for BackgroundSound, not even an explicit nil +func (o *PersonaCreate) UnsetBackgroundSound() { + o.BackgroundSound.Unset() +} + +// GetFinishedSpeakingSensitivity returns the FinishedSpeakingSensitivity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetFinishedSpeakingSensitivity() []string { + if o == nil { + var ret []string + return ret + } + return o.FinishedSpeakingSensitivity +} + +// GetFinishedSpeakingSensitivityOk returns a tuple with the FinishedSpeakingSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetFinishedSpeakingSensitivityOk() ([]string, bool) { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + return nil, false + } + return o.FinishedSpeakingSensitivity, true +} + +// HasFinishedSpeakingSensitivity returns a boolean if a field has been set. +func (o *PersonaCreate) HasFinishedSpeakingSensitivity() bool { + if o != nil && !IsNil(o.FinishedSpeakingSensitivity) { + return true + } + + return false +} + +// SetFinishedSpeakingSensitivity gets a reference to the given []string and assigns it to the FinishedSpeakingSensitivity field. +func (o *PersonaCreate) SetFinishedSpeakingSensitivity(v []string) { + o.FinishedSpeakingSensitivity = v +} + +// GetInterruptSensitivity returns the InterruptSensitivity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetInterruptSensitivity() []string { + if o == nil { + var ret []string + return ret + } + return o.InterruptSensitivity +} + +// GetInterruptSensitivityOk returns a tuple with the InterruptSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetInterruptSensitivityOk() ([]string, bool) { + if o == nil || IsNil(o.InterruptSensitivity) { + return nil, false + } + return o.InterruptSensitivity, true +} + +// HasInterruptSensitivity returns a boolean if a field has been set. +func (o *PersonaCreate) HasInterruptSensitivity() bool { + if o != nil && !IsNil(o.InterruptSensitivity) { + return true + } + + return false +} + +// SetInterruptSensitivity gets a reference to the given []string and assigns it to the InterruptSensitivity field. +func (o *PersonaCreate) SetInterruptSensitivity(v []string) { + o.InterruptSensitivity = v +} + +// GetKeywords returns the Keywords field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetKeywords() []string { + if o == nil { + var ret []string + return ret + } + return o.Keywords +} + +// GetKeywordsOk returns a tuple with the Keywords field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetKeywordsOk() ([]string, bool) { + if o == nil || IsNil(o.Keywords) { + return nil, false + } + return o.Keywords, true +} + +// HasKeywords returns a boolean if a field has been set. +func (o *PersonaCreate) HasKeywords() bool { + if o != nil && !IsNil(o.Keywords) { + return true + } + + return false +} + +// SetKeywords gets a reference to the given []string and assigns it to the Keywords field. +func (o *PersonaCreate) SetKeywords(v []string) { + o.Keywords = v +} + +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *PersonaCreate) GetCustomProperties() map[string]interface{} { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]interface{} + return ret + } + return o.CustomProperties +} + +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaCreate) GetCustomPropertiesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CustomProperties) { + return map[string]interface{}{}, false + } + return o.CustomProperties, true +} + +// HasCustomProperties returns a boolean if a field has been set. +func (o *PersonaCreate) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { + return true + } + + return false +} + +// SetCustomProperties gets a reference to the given map[string]interface{} and assigns it to the CustomProperties field. +func (o *PersonaCreate) SetCustomProperties(v map[string]interface{}) { + o.CustomProperties = v +} + +// GetAdditionalInstruction returns the AdditionalInstruction field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetAdditionalInstruction() string { + if o == nil || IsNil(o.AdditionalInstruction.Get()) { + var ret string + return ret + } + return *o.AdditionalInstruction.Get() +} + +// GetAdditionalInstructionOk returns a tuple with the AdditionalInstruction field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetAdditionalInstructionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AdditionalInstruction.Get(), o.AdditionalInstruction.IsSet() +} + +// HasAdditionalInstruction returns a boolean if a field has been set. +func (o *PersonaCreate) HasAdditionalInstruction() bool { + if o != nil && o.AdditionalInstruction.IsSet() { + return true + } + + return false +} + +// SetAdditionalInstruction gets a reference to the given NullableString and assigns it to the AdditionalInstruction field. +func (o *PersonaCreate) SetAdditionalInstruction(v string) { + o.AdditionalInstruction.Set(&v) +} + +// SetAdditionalInstructionNil sets the value for AdditionalInstruction to be an explicit nil +func (o *PersonaCreate) SetAdditionalInstructionNil() { + o.AdditionalInstruction.Set(nil) +} + +// UnsetAdditionalInstruction ensures that no value is present for AdditionalInstruction, not even an explicit nil +func (o *PersonaCreate) UnsetAdditionalInstruction() { + o.AdditionalInstruction.Unset() +} + +// GetSimulationType returns the SimulationType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetSimulationType() string { + if o == nil || IsNil(o.SimulationType.Get()) { + var ret string + return ret + } + return *o.SimulationType.Get() +} + +// GetSimulationTypeOk returns a tuple with the SimulationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetSimulationTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SimulationType.Get(), o.SimulationType.IsSet() +} + +// HasSimulationType returns a boolean if a field has been set. +func (o *PersonaCreate) HasSimulationType() bool { + if o != nil && o.SimulationType.IsSet() { + return true + } + + return false +} + +// SetSimulationType gets a reference to the given NullableString and assigns it to the SimulationType field. +func (o *PersonaCreate) SetSimulationType(v string) { + o.SimulationType.Set(&v) +} + +// SetSimulationTypeNil sets the value for SimulationType to be an explicit nil +func (o *PersonaCreate) SetSimulationTypeNil() { + o.SimulationType.Set(nil) +} + +// UnsetSimulationType ensures that no value is present for SimulationType, not even an explicit nil +func (o *PersonaCreate) UnsetSimulationType() { + o.SimulationType.Unset() +} + +// GetTone returns the Tone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetTone() string { + if o == nil || IsNil(o.Tone.Get()) { + var ret string + return ret + } + return *o.Tone.Get() +} + +// GetToneOk returns a tuple with the Tone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetToneOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Tone.Get(), o.Tone.IsSet() +} + +// HasTone returns a boolean if a field has been set. +func (o *PersonaCreate) HasTone() bool { + if o != nil && o.Tone.IsSet() { + return true + } + + return false +} + +// SetTone gets a reference to the given NullableString and assigns it to the Tone field. +func (o *PersonaCreate) SetTone(v string) { + o.Tone.Set(&v) +} + +// SetToneNil sets the value for Tone to be an explicit nil +func (o *PersonaCreate) SetToneNil() { + o.Tone.Set(nil) +} + +// UnsetTone ensures that no value is present for Tone, not even an explicit nil +func (o *PersonaCreate) UnsetTone() { + o.Tone.Unset() +} + +// GetPunctuation returns the Punctuation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetPunctuation() string { + if o == nil || IsNil(o.Punctuation.Get()) { + var ret string + return ret + } + return *o.Punctuation.Get() +} + +// GetPunctuationOk returns a tuple with the Punctuation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetPunctuationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Punctuation.Get(), o.Punctuation.IsSet() +} + +// HasPunctuation returns a boolean if a field has been set. +func (o *PersonaCreate) HasPunctuation() bool { + if o != nil && o.Punctuation.IsSet() { + return true + } + + return false +} + +// SetPunctuation gets a reference to the given NullableString and assigns it to the Punctuation field. +func (o *PersonaCreate) SetPunctuation(v string) { + o.Punctuation.Set(&v) +} + +// SetPunctuationNil sets the value for Punctuation to be an explicit nil +func (o *PersonaCreate) SetPunctuationNil() { + o.Punctuation.Set(nil) +} + +// UnsetPunctuation ensures that no value is present for Punctuation, not even an explicit nil +func (o *PersonaCreate) UnsetPunctuation() { + o.Punctuation.Unset() +} + +// GetSlangUsage returns the SlangUsage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetSlangUsage() string { + if o == nil || IsNil(o.SlangUsage.Get()) { + var ret string + return ret + } + return *o.SlangUsage.Get() +} + +// GetSlangUsageOk returns a tuple with the SlangUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetSlangUsageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlangUsage.Get(), o.SlangUsage.IsSet() +} + +// HasSlangUsage returns a boolean if a field has been set. +func (o *PersonaCreate) HasSlangUsage() bool { + if o != nil && o.SlangUsage.IsSet() { + return true + } + + return false +} + +// SetSlangUsage gets a reference to the given NullableString and assigns it to the SlangUsage field. +func (o *PersonaCreate) SetSlangUsage(v string) { + o.SlangUsage.Set(&v) +} + +// SetSlangUsageNil sets the value for SlangUsage to be an explicit nil +func (o *PersonaCreate) SetSlangUsageNil() { + o.SlangUsage.Set(nil) +} + +// UnsetSlangUsage ensures that no value is present for SlangUsage, not even an explicit nil +func (o *PersonaCreate) UnsetSlangUsage() { + o.SlangUsage.Unset() +} + +// GetTyposFrequency returns the TyposFrequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetTyposFrequency() string { + if o == nil || IsNil(o.TyposFrequency.Get()) { + var ret string + return ret + } + return *o.TyposFrequency.Get() +} + +// GetTyposFrequencyOk returns a tuple with the TyposFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetTyposFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TyposFrequency.Get(), o.TyposFrequency.IsSet() +} + +// HasTyposFrequency returns a boolean if a field has been set. +func (o *PersonaCreate) HasTyposFrequency() bool { + if o != nil && o.TyposFrequency.IsSet() { + return true + } + + return false +} + +// SetTyposFrequency gets a reference to the given NullableString and assigns it to the TyposFrequency field. +func (o *PersonaCreate) SetTyposFrequency(v string) { + o.TyposFrequency.Set(&v) +} + +// SetTyposFrequencyNil sets the value for TyposFrequency to be an explicit nil +func (o *PersonaCreate) SetTyposFrequencyNil() { + o.TyposFrequency.Set(nil) +} + +// UnsetTyposFrequency ensures that no value is present for TyposFrequency, not even an explicit nil +func (o *PersonaCreate) UnsetTyposFrequency() { + o.TyposFrequency.Unset() +} + +// GetRegionalMix returns the RegionalMix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetRegionalMix() string { + if o == nil || IsNil(o.RegionalMix.Get()) { + var ret string + return ret + } + return *o.RegionalMix.Get() +} + +// GetRegionalMixOk returns a tuple with the RegionalMix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetRegionalMixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RegionalMix.Get(), o.RegionalMix.IsSet() +} + +// HasRegionalMix returns a boolean if a field has been set. +func (o *PersonaCreate) HasRegionalMix() bool { + if o != nil && o.RegionalMix.IsSet() { + return true + } + + return false +} + +// SetRegionalMix gets a reference to the given NullableString and assigns it to the RegionalMix field. +func (o *PersonaCreate) SetRegionalMix(v string) { + o.RegionalMix.Set(&v) +} + +// SetRegionalMixNil sets the value for RegionalMix to be an explicit nil +func (o *PersonaCreate) SetRegionalMixNil() { + o.RegionalMix.Set(nil) +} + +// UnsetRegionalMix ensures that no value is present for RegionalMix, not even an explicit nil +func (o *PersonaCreate) UnsetRegionalMix() { + o.RegionalMix.Unset() +} + +// GetEmojiUsage returns the EmojiUsage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetEmojiUsage() string { + if o == nil || IsNil(o.EmojiUsage.Get()) { + var ret string + return ret + } + return *o.EmojiUsage.Get() +} + +// GetEmojiUsageOk returns a tuple with the EmojiUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetEmojiUsageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EmojiUsage.Get(), o.EmojiUsage.IsSet() +} + +// HasEmojiUsage returns a boolean if a field has been set. +func (o *PersonaCreate) HasEmojiUsage() bool { + if o != nil && o.EmojiUsage.IsSet() { + return true + } + + return false +} + +// SetEmojiUsage gets a reference to the given NullableString and assigns it to the EmojiUsage field. +func (o *PersonaCreate) SetEmojiUsage(v string) { + o.EmojiUsage.Set(&v) +} + +// SetEmojiUsageNil sets the value for EmojiUsage to be an explicit nil +func (o *PersonaCreate) SetEmojiUsageNil() { + o.EmojiUsage.Set(nil) +} + +// UnsetEmojiUsage ensures that no value is present for EmojiUsage, not even an explicit nil +func (o *PersonaCreate) UnsetEmojiUsage() { + o.EmojiUsage.Unset() +} + +// GetVerbosity returns the Verbosity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaCreate) GetVerbosity() string { + if o == nil || IsNil(o.Verbosity.Get()) { + var ret string + return ret + } + return *o.Verbosity.Get() +} + +// GetVerbosityOk returns a tuple with the Verbosity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaCreate) GetVerbosityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Verbosity.Get(), o.Verbosity.IsSet() +} + +// HasVerbosity returns a boolean if a field has been set. +func (o *PersonaCreate) HasVerbosity() bool { + if o != nil && o.Verbosity.IsSet() { + return true + } + + return false +} + +// SetVerbosity gets a reference to the given NullableString and assigns it to the Verbosity field. +func (o *PersonaCreate) SetVerbosity(v string) { + o.Verbosity.Set(&v) +} + +// SetVerbosityNil sets the value for Verbosity to be an explicit nil +func (o *PersonaCreate) SetVerbosityNil() { + o.Verbosity.Set(nil) +} + +// UnsetVerbosity ensures that no value is present for Verbosity, not even an explicit nil +func (o *PersonaCreate) UnsetVerbosity() { + o.Verbosity.Unset() +} + +func (o PersonaCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PersonaCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + if o.Gender != nil { + toSerialize["gender"] = o.Gender + } + if o.AgeGroup != nil { + toSerialize["age_group"] = o.AgeGroup + } + if o.Location != nil { + toSerialize["location"] = o.Location + } + if o.Profession != nil { + toSerialize["profession"] = o.Profession + } + if o.Personality != nil { + toSerialize["personality"] = o.Personality + } + if o.CommunicationStyle != nil { + toSerialize["communication_style"] = o.CommunicationStyle + } + if o.Accent != nil { + toSerialize["accent"] = o.Accent + } + if !IsNil(o.Multilingual) { + toSerialize["multilingual"] = o.Multilingual + } + if o.Language != nil { + toSerialize["language"] = o.Language + } + if o.ConversationSpeed != nil { + toSerialize["conversation_speed"] = o.ConversationSpeed + } + if o.BackgroundSound.IsSet() { + toSerialize["background_sound"] = o.BackgroundSound.Get() + } + if o.FinishedSpeakingSensitivity != nil { + toSerialize["finished_speaking_sensitivity"] = o.FinishedSpeakingSensitivity + } + if o.InterruptSensitivity != nil { + toSerialize["interrupt_sensitivity"] = o.InterruptSensitivity + } + if o.Keywords != nil { + toSerialize["keywords"] = o.Keywords + } + if !IsNil(o.CustomProperties) { + toSerialize["custom_properties"] = o.CustomProperties + } + if o.AdditionalInstruction.IsSet() { + toSerialize["additional_instruction"] = o.AdditionalInstruction.Get() + } + if o.SimulationType.IsSet() { + toSerialize["simulation_type"] = o.SimulationType.Get() + } + if o.Tone.IsSet() { + toSerialize["tone"] = o.Tone.Get() + } + if o.Punctuation.IsSet() { + toSerialize["punctuation"] = o.Punctuation.Get() + } + if o.SlangUsage.IsSet() { + toSerialize["slang_usage"] = o.SlangUsage.Get() + } + if o.TyposFrequency.IsSet() { + toSerialize["typos_frequency"] = o.TyposFrequency.Get() + } + if o.RegionalMix.IsSet() { + toSerialize["regional_mix"] = o.RegionalMix.Get() + } + if o.EmojiUsage.IsSet() { + toSerialize["emoji_usage"] = o.EmojiUsage.Get() + } + if o.Verbosity.IsSet() { + toSerialize["verbosity"] = o.Verbosity.Get() + } + return toSerialize, nil +} + +func (o *PersonaCreate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPersonaCreate := _PersonaCreate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPersonaCreate) + + if err != nil { + return err + } + + *o = PersonaCreate(varPersonaCreate) + + return err +} + +type NullablePersonaCreate struct { + value *PersonaCreate + isSet bool +} + +func (v NullablePersonaCreate) Get() *PersonaCreate { + return v.value +} + +func (v *NullablePersonaCreate) Set(val *PersonaCreate) { + v.value = val + v.isSet = true +} + +func (v NullablePersonaCreate) IsSet() bool { + return v.isSet +} + +func (v *NullablePersonaCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersonaCreate(val *PersonaCreate) *NullablePersonaCreate { + return &NullablePersonaCreate{value: val, isSet: true} +} + +func (v NullablePersonaCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersonaCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_persona_duplicate_request.go b/go/futureagi/model_persona_duplicate_request.go new file mode 100644 index 0000000..c42092b --- /dev/null +++ b/go/futureagi/model_persona_duplicate_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PersonaDuplicateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PersonaDuplicateRequest{} + +// PersonaDuplicateRequest struct for PersonaDuplicateRequest +type PersonaDuplicateRequest struct { + Name string `json:"name"` +} + +type _PersonaDuplicateRequest PersonaDuplicateRequest + +// NewPersonaDuplicateRequest instantiates a new PersonaDuplicateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPersonaDuplicateRequest(name string) *PersonaDuplicateRequest { + this := PersonaDuplicateRequest{} + this.Name = name + return &this +} + +// NewPersonaDuplicateRequestWithDefaults instantiates a new PersonaDuplicateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPersonaDuplicateRequestWithDefaults() *PersonaDuplicateRequest { + this := PersonaDuplicateRequest{} + return &this +} + +// GetName returns the Name field value +func (o *PersonaDuplicateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PersonaDuplicateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PersonaDuplicateRequest) SetName(v string) { + o.Name = v +} + +func (o PersonaDuplicateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PersonaDuplicateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *PersonaDuplicateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPersonaDuplicateRequest := _PersonaDuplicateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPersonaDuplicateRequest) + + if err != nil { + return err + } + + *o = PersonaDuplicateRequest(varPersonaDuplicateRequest) + + return err +} + +type NullablePersonaDuplicateRequest struct { + value *PersonaDuplicateRequest + isSet bool +} + +func (v NullablePersonaDuplicateRequest) Get() *PersonaDuplicateRequest { + return v.value +} + +func (v *NullablePersonaDuplicateRequest) Set(val *PersonaDuplicateRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePersonaDuplicateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePersonaDuplicateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersonaDuplicateRequest(val *PersonaDuplicateRequest) *NullablePersonaDuplicateRequest { + return &NullablePersonaDuplicateRequest{value: val, isSet: true} +} + +func (v NullablePersonaDuplicateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersonaDuplicateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_persona_duplicate_response.go b/go/futureagi/model_persona_duplicate_response.go new file mode 100644 index 0000000..a8e8229 --- /dev/null +++ b/go/futureagi/model_persona_duplicate_response.go @@ -0,0 +1,165 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PersonaDuplicateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PersonaDuplicateResponse{} + +// PersonaDuplicateResponse struct for PersonaDuplicateResponse +type PersonaDuplicateResponse struct { + Status *bool `json:"status,omitempty"` + Result *Persona `json:"result,omitempty"` +} + +// NewPersonaDuplicateResponse instantiates a new PersonaDuplicateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPersonaDuplicateResponse() *PersonaDuplicateResponse { + this := PersonaDuplicateResponse{} + var status bool = true + this.Status = &status + return &this +} + +// NewPersonaDuplicateResponseWithDefaults instantiates a new PersonaDuplicateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPersonaDuplicateResponseWithDefaults() *PersonaDuplicateResponse { + this := PersonaDuplicateResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PersonaDuplicateResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaDuplicateResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *PersonaDuplicateResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *PersonaDuplicateResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *PersonaDuplicateResponse) GetResult() Persona { + if o == nil || IsNil(o.Result) { + var ret Persona + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaDuplicateResponse) GetResultOk() (*Persona, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *PersonaDuplicateResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given Persona and assigns it to the Result field. +func (o *PersonaDuplicateResponse) SetResult(v Persona) { + o.Result = &v +} + +func (o PersonaDuplicateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PersonaDuplicateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + return toSerialize, nil +} + +type NullablePersonaDuplicateResponse struct { + value *PersonaDuplicateResponse + isSet bool +} + +func (v NullablePersonaDuplicateResponse) Get() *PersonaDuplicateResponse { + return v.value +} + +func (v *NullablePersonaDuplicateResponse) Set(val *PersonaDuplicateResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePersonaDuplicateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePersonaDuplicateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersonaDuplicateResponse(val *PersonaDuplicateResponse) *NullablePersonaDuplicateResponse { + return &NullablePersonaDuplicateResponse{value: val, isSet: true} +} + +func (v NullablePersonaDuplicateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersonaDuplicateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_persona_field_options.go b/go/futureagi/model_persona_field_options.go new file mode 100644 index 0000000..f757724 --- /dev/null +++ b/go/futureagi/model_persona_field_options.go @@ -0,0 +1,665 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PersonaFieldOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PersonaFieldOptions{} + +// PersonaFieldOptions struct for PersonaFieldOptions +type PersonaFieldOptions struct { + GenderChoices *string `json:"gender_choices,omitempty"` + AgeGroupChoices *string `json:"age_group_choices,omitempty"` + LocationChoices *string `json:"location_choices,omitempty"` + ProfessionChoices *string `json:"profession_choices,omitempty"` + PersonalityChoices *string `json:"personality_choices,omitempty"` + CommunicationStyleChoices *string `json:"communication_style_choices,omitempty"` + AccentChoices *string `json:"accent_choices,omitempty"` + LanguageChoices *string `json:"language_choices,omitempty"` + ConversationSpeedChoices *string `json:"conversation_speed_choices,omitempty"` + ToneChoices *string `json:"tone_choices,omitempty"` + VerbosityChoices *string `json:"verbosity_choices,omitempty"` + PunctuationChoices *string `json:"punctuation_choices,omitempty"` + EmojiUsageChoices *string `json:"emoji_usage_choices,omitempty"` + SlangUsageChoices *string `json:"slang_usage_choices,omitempty"` + TyposFrequencyChoices *string `json:"typos_frequency_choices,omitempty"` + RegionalMixChoices *string `json:"regional_mix_choices,omitempty"` +} + +// NewPersonaFieldOptions instantiates a new PersonaFieldOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPersonaFieldOptions() *PersonaFieldOptions { + this := PersonaFieldOptions{} + return &this +} + +// NewPersonaFieldOptionsWithDefaults instantiates a new PersonaFieldOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPersonaFieldOptionsWithDefaults() *PersonaFieldOptions { + this := PersonaFieldOptions{} + return &this +} + +// GetGenderChoices returns the GenderChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetGenderChoices() string { + if o == nil || IsNil(o.GenderChoices) { + var ret string + return ret + } + return *o.GenderChoices +} + +// GetGenderChoicesOk returns a tuple with the GenderChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetGenderChoicesOk() (*string, bool) { + if o == nil || IsNil(o.GenderChoices) { + return nil, false + } + return o.GenderChoices, true +} + +// HasGenderChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasGenderChoices() bool { + if o != nil && !IsNil(o.GenderChoices) { + return true + } + + return false +} + +// SetGenderChoices gets a reference to the given string and assigns it to the GenderChoices field. +func (o *PersonaFieldOptions) SetGenderChoices(v string) { + o.GenderChoices = &v +} + +// GetAgeGroupChoices returns the AgeGroupChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetAgeGroupChoices() string { + if o == nil || IsNil(o.AgeGroupChoices) { + var ret string + return ret + } + return *o.AgeGroupChoices +} + +// GetAgeGroupChoicesOk returns a tuple with the AgeGroupChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetAgeGroupChoicesOk() (*string, bool) { + if o == nil || IsNil(o.AgeGroupChoices) { + return nil, false + } + return o.AgeGroupChoices, true +} + +// HasAgeGroupChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasAgeGroupChoices() bool { + if o != nil && !IsNil(o.AgeGroupChoices) { + return true + } + + return false +} + +// SetAgeGroupChoices gets a reference to the given string and assigns it to the AgeGroupChoices field. +func (o *PersonaFieldOptions) SetAgeGroupChoices(v string) { + o.AgeGroupChoices = &v +} + +// GetLocationChoices returns the LocationChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetLocationChoices() string { + if o == nil || IsNil(o.LocationChoices) { + var ret string + return ret + } + return *o.LocationChoices +} + +// GetLocationChoicesOk returns a tuple with the LocationChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetLocationChoicesOk() (*string, bool) { + if o == nil || IsNil(o.LocationChoices) { + return nil, false + } + return o.LocationChoices, true +} + +// HasLocationChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasLocationChoices() bool { + if o != nil && !IsNil(o.LocationChoices) { + return true + } + + return false +} + +// SetLocationChoices gets a reference to the given string and assigns it to the LocationChoices field. +func (o *PersonaFieldOptions) SetLocationChoices(v string) { + o.LocationChoices = &v +} + +// GetProfessionChoices returns the ProfessionChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetProfessionChoices() string { + if o == nil || IsNil(o.ProfessionChoices) { + var ret string + return ret + } + return *o.ProfessionChoices +} + +// GetProfessionChoicesOk returns a tuple with the ProfessionChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetProfessionChoicesOk() (*string, bool) { + if o == nil || IsNil(o.ProfessionChoices) { + return nil, false + } + return o.ProfessionChoices, true +} + +// HasProfessionChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasProfessionChoices() bool { + if o != nil && !IsNil(o.ProfessionChoices) { + return true + } + + return false +} + +// SetProfessionChoices gets a reference to the given string and assigns it to the ProfessionChoices field. +func (o *PersonaFieldOptions) SetProfessionChoices(v string) { + o.ProfessionChoices = &v +} + +// GetPersonalityChoices returns the PersonalityChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetPersonalityChoices() string { + if o == nil || IsNil(o.PersonalityChoices) { + var ret string + return ret + } + return *o.PersonalityChoices +} + +// GetPersonalityChoicesOk returns a tuple with the PersonalityChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetPersonalityChoicesOk() (*string, bool) { + if o == nil || IsNil(o.PersonalityChoices) { + return nil, false + } + return o.PersonalityChoices, true +} + +// HasPersonalityChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasPersonalityChoices() bool { + if o != nil && !IsNil(o.PersonalityChoices) { + return true + } + + return false +} + +// SetPersonalityChoices gets a reference to the given string and assigns it to the PersonalityChoices field. +func (o *PersonaFieldOptions) SetPersonalityChoices(v string) { + o.PersonalityChoices = &v +} + +// GetCommunicationStyleChoices returns the CommunicationStyleChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetCommunicationStyleChoices() string { + if o == nil || IsNil(o.CommunicationStyleChoices) { + var ret string + return ret + } + return *o.CommunicationStyleChoices +} + +// GetCommunicationStyleChoicesOk returns a tuple with the CommunicationStyleChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetCommunicationStyleChoicesOk() (*string, bool) { + if o == nil || IsNil(o.CommunicationStyleChoices) { + return nil, false + } + return o.CommunicationStyleChoices, true +} + +// HasCommunicationStyleChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasCommunicationStyleChoices() bool { + if o != nil && !IsNil(o.CommunicationStyleChoices) { + return true + } + + return false +} + +// SetCommunicationStyleChoices gets a reference to the given string and assigns it to the CommunicationStyleChoices field. +func (o *PersonaFieldOptions) SetCommunicationStyleChoices(v string) { + o.CommunicationStyleChoices = &v +} + +// GetAccentChoices returns the AccentChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetAccentChoices() string { + if o == nil || IsNil(o.AccentChoices) { + var ret string + return ret + } + return *o.AccentChoices +} + +// GetAccentChoicesOk returns a tuple with the AccentChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetAccentChoicesOk() (*string, bool) { + if o == nil || IsNil(o.AccentChoices) { + return nil, false + } + return o.AccentChoices, true +} + +// HasAccentChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasAccentChoices() bool { + if o != nil && !IsNil(o.AccentChoices) { + return true + } + + return false +} + +// SetAccentChoices gets a reference to the given string and assigns it to the AccentChoices field. +func (o *PersonaFieldOptions) SetAccentChoices(v string) { + o.AccentChoices = &v +} + +// GetLanguageChoices returns the LanguageChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetLanguageChoices() string { + if o == nil || IsNil(o.LanguageChoices) { + var ret string + return ret + } + return *o.LanguageChoices +} + +// GetLanguageChoicesOk returns a tuple with the LanguageChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetLanguageChoicesOk() (*string, bool) { + if o == nil || IsNil(o.LanguageChoices) { + return nil, false + } + return o.LanguageChoices, true +} + +// HasLanguageChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasLanguageChoices() bool { + if o != nil && !IsNil(o.LanguageChoices) { + return true + } + + return false +} + +// SetLanguageChoices gets a reference to the given string and assigns it to the LanguageChoices field. +func (o *PersonaFieldOptions) SetLanguageChoices(v string) { + o.LanguageChoices = &v +} + +// GetConversationSpeedChoices returns the ConversationSpeedChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetConversationSpeedChoices() string { + if o == nil || IsNil(o.ConversationSpeedChoices) { + var ret string + return ret + } + return *o.ConversationSpeedChoices +} + +// GetConversationSpeedChoicesOk returns a tuple with the ConversationSpeedChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetConversationSpeedChoicesOk() (*string, bool) { + if o == nil || IsNil(o.ConversationSpeedChoices) { + return nil, false + } + return o.ConversationSpeedChoices, true +} + +// HasConversationSpeedChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasConversationSpeedChoices() bool { + if o != nil && !IsNil(o.ConversationSpeedChoices) { + return true + } + + return false +} + +// SetConversationSpeedChoices gets a reference to the given string and assigns it to the ConversationSpeedChoices field. +func (o *PersonaFieldOptions) SetConversationSpeedChoices(v string) { + o.ConversationSpeedChoices = &v +} + +// GetToneChoices returns the ToneChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetToneChoices() string { + if o == nil || IsNil(o.ToneChoices) { + var ret string + return ret + } + return *o.ToneChoices +} + +// GetToneChoicesOk returns a tuple with the ToneChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetToneChoicesOk() (*string, bool) { + if o == nil || IsNil(o.ToneChoices) { + return nil, false + } + return o.ToneChoices, true +} + +// HasToneChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasToneChoices() bool { + if o != nil && !IsNil(o.ToneChoices) { + return true + } + + return false +} + +// SetToneChoices gets a reference to the given string and assigns it to the ToneChoices field. +func (o *PersonaFieldOptions) SetToneChoices(v string) { + o.ToneChoices = &v +} + +// GetVerbosityChoices returns the VerbosityChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetVerbosityChoices() string { + if o == nil || IsNil(o.VerbosityChoices) { + var ret string + return ret + } + return *o.VerbosityChoices +} + +// GetVerbosityChoicesOk returns a tuple with the VerbosityChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetVerbosityChoicesOk() (*string, bool) { + if o == nil || IsNil(o.VerbosityChoices) { + return nil, false + } + return o.VerbosityChoices, true +} + +// HasVerbosityChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasVerbosityChoices() bool { + if o != nil && !IsNil(o.VerbosityChoices) { + return true + } + + return false +} + +// SetVerbosityChoices gets a reference to the given string and assigns it to the VerbosityChoices field. +func (o *PersonaFieldOptions) SetVerbosityChoices(v string) { + o.VerbosityChoices = &v +} + +// GetPunctuationChoices returns the PunctuationChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetPunctuationChoices() string { + if o == nil || IsNil(o.PunctuationChoices) { + var ret string + return ret + } + return *o.PunctuationChoices +} + +// GetPunctuationChoicesOk returns a tuple with the PunctuationChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetPunctuationChoicesOk() (*string, bool) { + if o == nil || IsNil(o.PunctuationChoices) { + return nil, false + } + return o.PunctuationChoices, true +} + +// HasPunctuationChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasPunctuationChoices() bool { + if o != nil && !IsNil(o.PunctuationChoices) { + return true + } + + return false +} + +// SetPunctuationChoices gets a reference to the given string and assigns it to the PunctuationChoices field. +func (o *PersonaFieldOptions) SetPunctuationChoices(v string) { + o.PunctuationChoices = &v +} + +// GetEmojiUsageChoices returns the EmojiUsageChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetEmojiUsageChoices() string { + if o == nil || IsNil(o.EmojiUsageChoices) { + var ret string + return ret + } + return *o.EmojiUsageChoices +} + +// GetEmojiUsageChoicesOk returns a tuple with the EmojiUsageChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetEmojiUsageChoicesOk() (*string, bool) { + if o == nil || IsNil(o.EmojiUsageChoices) { + return nil, false + } + return o.EmojiUsageChoices, true +} + +// HasEmojiUsageChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasEmojiUsageChoices() bool { + if o != nil && !IsNil(o.EmojiUsageChoices) { + return true + } + + return false +} + +// SetEmojiUsageChoices gets a reference to the given string and assigns it to the EmojiUsageChoices field. +func (o *PersonaFieldOptions) SetEmojiUsageChoices(v string) { + o.EmojiUsageChoices = &v +} + +// GetSlangUsageChoices returns the SlangUsageChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetSlangUsageChoices() string { + if o == nil || IsNil(o.SlangUsageChoices) { + var ret string + return ret + } + return *o.SlangUsageChoices +} + +// GetSlangUsageChoicesOk returns a tuple with the SlangUsageChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetSlangUsageChoicesOk() (*string, bool) { + if o == nil || IsNil(o.SlangUsageChoices) { + return nil, false + } + return o.SlangUsageChoices, true +} + +// HasSlangUsageChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasSlangUsageChoices() bool { + if o != nil && !IsNil(o.SlangUsageChoices) { + return true + } + + return false +} + +// SetSlangUsageChoices gets a reference to the given string and assigns it to the SlangUsageChoices field. +func (o *PersonaFieldOptions) SetSlangUsageChoices(v string) { + o.SlangUsageChoices = &v +} + +// GetTyposFrequencyChoices returns the TyposFrequencyChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetTyposFrequencyChoices() string { + if o == nil || IsNil(o.TyposFrequencyChoices) { + var ret string + return ret + } + return *o.TyposFrequencyChoices +} + +// GetTyposFrequencyChoicesOk returns a tuple with the TyposFrequencyChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetTyposFrequencyChoicesOk() (*string, bool) { + if o == nil || IsNil(o.TyposFrequencyChoices) { + return nil, false + } + return o.TyposFrequencyChoices, true +} + +// HasTyposFrequencyChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasTyposFrequencyChoices() bool { + if o != nil && !IsNil(o.TyposFrequencyChoices) { + return true + } + + return false +} + +// SetTyposFrequencyChoices gets a reference to the given string and assigns it to the TyposFrequencyChoices field. +func (o *PersonaFieldOptions) SetTyposFrequencyChoices(v string) { + o.TyposFrequencyChoices = &v +} + +// GetRegionalMixChoices returns the RegionalMixChoices field value if set, zero value otherwise. +func (o *PersonaFieldOptions) GetRegionalMixChoices() string { + if o == nil || IsNil(o.RegionalMixChoices) { + var ret string + return ret + } + return *o.RegionalMixChoices +} + +// GetRegionalMixChoicesOk returns a tuple with the RegionalMixChoices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaFieldOptions) GetRegionalMixChoicesOk() (*string, bool) { + if o == nil || IsNil(o.RegionalMixChoices) { + return nil, false + } + return o.RegionalMixChoices, true +} + +// HasRegionalMixChoices returns a boolean if a field has been set. +func (o *PersonaFieldOptions) HasRegionalMixChoices() bool { + if o != nil && !IsNil(o.RegionalMixChoices) { + return true + } + + return false +} + +// SetRegionalMixChoices gets a reference to the given string and assigns it to the RegionalMixChoices field. +func (o *PersonaFieldOptions) SetRegionalMixChoices(v string) { + o.RegionalMixChoices = &v +} + +func (o PersonaFieldOptions) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PersonaFieldOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.GenderChoices) { + toSerialize["gender_choices"] = o.GenderChoices + } + if !IsNil(o.AgeGroupChoices) { + toSerialize["age_group_choices"] = o.AgeGroupChoices + } + if !IsNil(o.LocationChoices) { + toSerialize["location_choices"] = o.LocationChoices + } + if !IsNil(o.ProfessionChoices) { + toSerialize["profession_choices"] = o.ProfessionChoices + } + if !IsNil(o.PersonalityChoices) { + toSerialize["personality_choices"] = o.PersonalityChoices + } + if !IsNil(o.CommunicationStyleChoices) { + toSerialize["communication_style_choices"] = o.CommunicationStyleChoices + } + if !IsNil(o.AccentChoices) { + toSerialize["accent_choices"] = o.AccentChoices + } + if !IsNil(o.LanguageChoices) { + toSerialize["language_choices"] = o.LanguageChoices + } + if !IsNil(o.ConversationSpeedChoices) { + toSerialize["conversation_speed_choices"] = o.ConversationSpeedChoices + } + if !IsNil(o.ToneChoices) { + toSerialize["tone_choices"] = o.ToneChoices + } + if !IsNil(o.VerbosityChoices) { + toSerialize["verbosity_choices"] = o.VerbosityChoices + } + if !IsNil(o.PunctuationChoices) { + toSerialize["punctuation_choices"] = o.PunctuationChoices + } + if !IsNil(o.EmojiUsageChoices) { + toSerialize["emoji_usage_choices"] = o.EmojiUsageChoices + } + if !IsNil(o.SlangUsageChoices) { + toSerialize["slang_usage_choices"] = o.SlangUsageChoices + } + if !IsNil(o.TyposFrequencyChoices) { + toSerialize["typos_frequency_choices"] = o.TyposFrequencyChoices + } + if !IsNil(o.RegionalMixChoices) { + toSerialize["regional_mix_choices"] = o.RegionalMixChoices + } + return toSerialize, nil +} + +type NullablePersonaFieldOptions struct { + value *PersonaFieldOptions + isSet bool +} + +func (v NullablePersonaFieldOptions) Get() *PersonaFieldOptions { + return v.value +} + +func (v *NullablePersonaFieldOptions) Set(val *PersonaFieldOptions) { + v.value = val + v.isSet = true +} + +func (v NullablePersonaFieldOptions) IsSet() bool { + return v.isSet +} + +func (v *NullablePersonaFieldOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersonaFieldOptions(val *PersonaFieldOptions) *NullablePersonaFieldOptions { + return &NullablePersonaFieldOptions{value: val, isSet: true} +} + +func (v NullablePersonaFieldOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersonaFieldOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_persona_list.go b/go/futureagi/model_persona_list.go new file mode 100644 index 0000000..575186b --- /dev/null +++ b/go/futureagi/model_persona_list.go @@ -0,0 +1,1401 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the PersonaList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PersonaList{} + +// PersonaList struct for PersonaList +type PersonaList struct { + Id *string `json:"id,omitempty"` + // Type of persona (system or workspace-level) + PersonaType *string `json:"persona_type,omitempty"` + PersonaTypeDisplay *string `json:"persona_type_display,omitempty"` + // Name of the persona + Name *string `json:"name,omitempty"` + // Description of the persona + Description NullableString `json:"description,omitempty"` + // List of genders for the persona (e.g., ['male'], ['female']) + Gender map[string]interface{} `json:"gender,omitempty"` + // List of age groups for the persona (e.g., ['18-25'], ['25-32']) + AgeGroup map[string]interface{} `json:"age_group,omitempty"` + // List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher']) + Occupation map[string]interface{} `json:"occupation,omitempty"` + // List of locations for the persona (e.g., ['United States'], ['Canada']) + Location map[string]interface{} `json:"location,omitempty"` + // List of personality types for the persona (e.g., ['Friendly and cooperative']) + Personality map[string]interface{} `json:"personality,omitempty"` + // List of communication styles for the persona (e.g., ['Direct and concise']) + CommunicationStyle map[string]interface{} `json:"communication_style,omitempty"` + // Whether the persona supports multiple languages + Multilingual NullableBool `json:"multilingual,omitempty"` + // List of languages the persona speaks (e.g., ['English', 'Hindi']) + Languages map[string]interface{} `json:"languages,omitempty"` + // List of accents for the persona (e.g., ['American'], ['Australian']) + Accent map[string]interface{} `json:"accent,omitempty"` + // List of conversation speeds (e.g., ['1.0'], ['1.25']) + ConversationSpeed map[string]interface{} `json:"conversation_speed,omitempty"` + // Whether background sound is enabled (null=not specified, True/False for enabled/disabled) + BackgroundSound NullableBool `json:"background_sound,omitempty"` + // List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6']) + FinishedSpeakingSensitivity map[string]interface{} `json:"finished_speaking_sensitivity,omitempty"` + // List of sensitivities for allowing interruptions (e.g., ['5'], ['6']) + InterruptSensitivity map[string]interface{} `json:"interrupt_sensitivity,omitempty"` + // List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful']) + Keywords map[string]interface{} `json:"keywords,omitempty"` + // Additional metadata for the persona (speech clarity, base emotion, etc.) + Metadata map[string]interface{} `json:"metadata,omitempty"` + // Additional instructions for how this persona should behave + AdditionalInstruction NullableString `json:"additional_instruction,omitempty"` + // Whether this is a default/recommended persona + IsDefault NullableBool `json:"is_default,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + SimulationType *string `json:"simulation_type,omitempty"` + // Punctuation style for the persona + Punctuation NullableString `json:"punctuation,omitempty"` + // Slang usage for the persona + SlangUsage NullableString `json:"slang_usage,omitempty"` + // Typos frequency for the persona + TyposFrequency NullableString `json:"typos_frequency,omitempty"` + // Regional mix for the persona + RegionalMix NullableString `json:"regional_mix,omitempty"` + // Emoji usage for the persona + EmojiUsage NullableString `json:"emoji_usage,omitempty"` + // Tone for the persona + Tone NullableString `json:"tone,omitempty"` + // Verbosity for the persona + Verbosity NullableString `json:"verbosity,omitempty"` +} + +// NewPersonaList instantiates a new PersonaList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPersonaList() *PersonaList { + this := PersonaList{} + return &this +} + +// NewPersonaListWithDefaults instantiates a new PersonaList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPersonaListWithDefaults() *PersonaList { + this := PersonaList{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PersonaList) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PersonaList) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PersonaList) SetId(v string) { + o.Id = &v +} + +// GetPersonaType returns the PersonaType field value if set, zero value otherwise. +func (o *PersonaList) GetPersonaType() string { + if o == nil || IsNil(o.PersonaType) { + var ret string + return ret + } + return *o.PersonaType +} + +// GetPersonaTypeOk returns a tuple with the PersonaType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetPersonaTypeOk() (*string, bool) { + if o == nil || IsNil(o.PersonaType) { + return nil, false + } + return o.PersonaType, true +} + +// HasPersonaType returns a boolean if a field has been set. +func (o *PersonaList) HasPersonaType() bool { + if o != nil && !IsNil(o.PersonaType) { + return true + } + + return false +} + +// SetPersonaType gets a reference to the given string and assigns it to the PersonaType field. +func (o *PersonaList) SetPersonaType(v string) { + o.PersonaType = &v +} + +// GetPersonaTypeDisplay returns the PersonaTypeDisplay field value if set, zero value otherwise. +func (o *PersonaList) GetPersonaTypeDisplay() string { + if o == nil || IsNil(o.PersonaTypeDisplay) { + var ret string + return ret + } + return *o.PersonaTypeDisplay +} + +// GetPersonaTypeDisplayOk returns a tuple with the PersonaTypeDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetPersonaTypeDisplayOk() (*string, bool) { + if o == nil || IsNil(o.PersonaTypeDisplay) { + return nil, false + } + return o.PersonaTypeDisplay, true +} + +// HasPersonaTypeDisplay returns a boolean if a field has been set. +func (o *PersonaList) HasPersonaTypeDisplay() bool { + if o != nil && !IsNil(o.PersonaTypeDisplay) { + return true + } + + return false +} + +// SetPersonaTypeDisplay gets a reference to the given string and assigns it to the PersonaTypeDisplay field. +func (o *PersonaList) SetPersonaTypeDisplay(v string) { + o.PersonaTypeDisplay = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PersonaList) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PersonaList) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PersonaList) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PersonaList) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PersonaList) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PersonaList) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PersonaList) UnsetDescription() { + o.Description.Unset() +} + +// GetGender returns the Gender field value if set, zero value otherwise. +func (o *PersonaList) GetGender() map[string]interface{} { + if o == nil || IsNil(o.Gender) { + var ret map[string]interface{} + return ret + } + return o.Gender +} + +// GetGenderOk returns a tuple with the Gender field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetGenderOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Gender) { + return map[string]interface{}{}, false + } + return o.Gender, true +} + +// HasGender returns a boolean if a field has been set. +func (o *PersonaList) HasGender() bool { + if o != nil && !IsNil(o.Gender) { + return true + } + + return false +} + +// SetGender gets a reference to the given map[string]interface{} and assigns it to the Gender field. +func (o *PersonaList) SetGender(v map[string]interface{}) { + o.Gender = v +} + +// GetAgeGroup returns the AgeGroup field value if set, zero value otherwise. +func (o *PersonaList) GetAgeGroup() map[string]interface{} { + if o == nil || IsNil(o.AgeGroup) { + var ret map[string]interface{} + return ret + } + return o.AgeGroup +} + +// GetAgeGroupOk returns a tuple with the AgeGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetAgeGroupOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.AgeGroup) { + return map[string]interface{}{}, false + } + return o.AgeGroup, true +} + +// HasAgeGroup returns a boolean if a field has been set. +func (o *PersonaList) HasAgeGroup() bool { + if o != nil && !IsNil(o.AgeGroup) { + return true + } + + return false +} + +// SetAgeGroup gets a reference to the given map[string]interface{} and assigns it to the AgeGroup field. +func (o *PersonaList) SetAgeGroup(v map[string]interface{}) { + o.AgeGroup = v +} + +// GetOccupation returns the Occupation field value if set, zero value otherwise. +func (o *PersonaList) GetOccupation() map[string]interface{} { + if o == nil || IsNil(o.Occupation) { + var ret map[string]interface{} + return ret + } + return o.Occupation +} + +// GetOccupationOk returns a tuple with the Occupation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetOccupationOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Occupation) { + return map[string]interface{}{}, false + } + return o.Occupation, true +} + +// HasOccupation returns a boolean if a field has been set. +func (o *PersonaList) HasOccupation() bool { + if o != nil && !IsNil(o.Occupation) { + return true + } + + return false +} + +// SetOccupation gets a reference to the given map[string]interface{} and assigns it to the Occupation field. +func (o *PersonaList) SetOccupation(v map[string]interface{}) { + o.Occupation = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *PersonaList) GetLocation() map[string]interface{} { + if o == nil || IsNil(o.Location) { + var ret map[string]interface{} + return ret + } + return o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetLocationOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Location) { + return map[string]interface{}{}, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *PersonaList) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given map[string]interface{} and assigns it to the Location field. +func (o *PersonaList) SetLocation(v map[string]interface{}) { + o.Location = v +} + +// GetPersonality returns the Personality field value if set, zero value otherwise. +func (o *PersonaList) GetPersonality() map[string]interface{} { + if o == nil || IsNil(o.Personality) { + var ret map[string]interface{} + return ret + } + return o.Personality +} + +// GetPersonalityOk returns a tuple with the Personality field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetPersonalityOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Personality) { + return map[string]interface{}{}, false + } + return o.Personality, true +} + +// HasPersonality returns a boolean if a field has been set. +func (o *PersonaList) HasPersonality() bool { + if o != nil && !IsNil(o.Personality) { + return true + } + + return false +} + +// SetPersonality gets a reference to the given map[string]interface{} and assigns it to the Personality field. +func (o *PersonaList) SetPersonality(v map[string]interface{}) { + o.Personality = v +} + +// GetCommunicationStyle returns the CommunicationStyle field value if set, zero value otherwise. +func (o *PersonaList) GetCommunicationStyle() map[string]interface{} { + if o == nil || IsNil(o.CommunicationStyle) { + var ret map[string]interface{} + return ret + } + return o.CommunicationStyle +} + +// GetCommunicationStyleOk returns a tuple with the CommunicationStyle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetCommunicationStyleOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CommunicationStyle) { + return map[string]interface{}{}, false + } + return o.CommunicationStyle, true +} + +// HasCommunicationStyle returns a boolean if a field has been set. +func (o *PersonaList) HasCommunicationStyle() bool { + if o != nil && !IsNil(o.CommunicationStyle) { + return true + } + + return false +} + +// SetCommunicationStyle gets a reference to the given map[string]interface{} and assigns it to the CommunicationStyle field. +func (o *PersonaList) SetCommunicationStyle(v map[string]interface{}) { + o.CommunicationStyle = v +} + +// GetMultilingual returns the Multilingual field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetMultilingual() bool { + if o == nil || IsNil(o.Multilingual.Get()) { + var ret bool + return ret + } + return *o.Multilingual.Get() +} + +// GetMultilingualOk returns a tuple with the Multilingual field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetMultilingualOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Multilingual.Get(), o.Multilingual.IsSet() +} + +// HasMultilingual returns a boolean if a field has been set. +func (o *PersonaList) HasMultilingual() bool { + if o != nil && o.Multilingual.IsSet() { + return true + } + + return false +} + +// SetMultilingual gets a reference to the given NullableBool and assigns it to the Multilingual field. +func (o *PersonaList) SetMultilingual(v bool) { + o.Multilingual.Set(&v) +} + +// SetMultilingualNil sets the value for Multilingual to be an explicit nil +func (o *PersonaList) SetMultilingualNil() { + o.Multilingual.Set(nil) +} + +// UnsetMultilingual ensures that no value is present for Multilingual, not even an explicit nil +func (o *PersonaList) UnsetMultilingual() { + o.Multilingual.Unset() +} + +// GetLanguages returns the Languages field value if set, zero value otherwise. +func (o *PersonaList) GetLanguages() map[string]interface{} { + if o == nil || IsNil(o.Languages) { + var ret map[string]interface{} + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetLanguagesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Languages) { + return map[string]interface{}{}, false + } + return o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *PersonaList) HasLanguages() bool { + if o != nil && !IsNil(o.Languages) { + return true + } + + return false +} + +// SetLanguages gets a reference to the given map[string]interface{} and assigns it to the Languages field. +func (o *PersonaList) SetLanguages(v map[string]interface{}) { + o.Languages = v +} + +// GetAccent returns the Accent field value if set, zero value otherwise. +func (o *PersonaList) GetAccent() map[string]interface{} { + if o == nil || IsNil(o.Accent) { + var ret map[string]interface{} + return ret + } + return o.Accent +} + +// GetAccentOk returns a tuple with the Accent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetAccentOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Accent) { + return map[string]interface{}{}, false + } + return o.Accent, true +} + +// HasAccent returns a boolean if a field has been set. +func (o *PersonaList) HasAccent() bool { + if o != nil && !IsNil(o.Accent) { + return true + } + + return false +} + +// SetAccent gets a reference to the given map[string]interface{} and assigns it to the Accent field. +func (o *PersonaList) SetAccent(v map[string]interface{}) { + o.Accent = v +} + +// GetConversationSpeed returns the ConversationSpeed field value if set, zero value otherwise. +func (o *PersonaList) GetConversationSpeed() map[string]interface{} { + if o == nil || IsNil(o.ConversationSpeed) { + var ret map[string]interface{} + return ret + } + return o.ConversationSpeed +} + +// GetConversationSpeedOk returns a tuple with the ConversationSpeed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetConversationSpeedOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ConversationSpeed) { + return map[string]interface{}{}, false + } + return o.ConversationSpeed, true +} + +// HasConversationSpeed returns a boolean if a field has been set. +func (o *PersonaList) HasConversationSpeed() bool { + if o != nil && !IsNil(o.ConversationSpeed) { + return true + } + + return false +} + +// SetConversationSpeed gets a reference to the given map[string]interface{} and assigns it to the ConversationSpeed field. +func (o *PersonaList) SetConversationSpeed(v map[string]interface{}) { + o.ConversationSpeed = v +} + +// GetBackgroundSound returns the BackgroundSound field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetBackgroundSound() bool { + if o == nil || IsNil(o.BackgroundSound.Get()) { + var ret bool + return ret + } + return *o.BackgroundSound.Get() +} + +// GetBackgroundSoundOk returns a tuple with the BackgroundSound field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetBackgroundSoundOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.BackgroundSound.Get(), o.BackgroundSound.IsSet() +} + +// HasBackgroundSound returns a boolean if a field has been set. +func (o *PersonaList) HasBackgroundSound() bool { + if o != nil && o.BackgroundSound.IsSet() { + return true + } + + return false +} + +// SetBackgroundSound gets a reference to the given NullableBool and assigns it to the BackgroundSound field. +func (o *PersonaList) SetBackgroundSound(v bool) { + o.BackgroundSound.Set(&v) +} + +// SetBackgroundSoundNil sets the value for BackgroundSound to be an explicit nil +func (o *PersonaList) SetBackgroundSoundNil() { + o.BackgroundSound.Set(nil) +} + +// UnsetBackgroundSound ensures that no value is present for BackgroundSound, not even an explicit nil +func (o *PersonaList) UnsetBackgroundSound() { + o.BackgroundSound.Unset() +} + +// GetFinishedSpeakingSensitivity returns the FinishedSpeakingSensitivity field value if set, zero value otherwise. +func (o *PersonaList) GetFinishedSpeakingSensitivity() map[string]interface{} { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + var ret map[string]interface{} + return ret + } + return o.FinishedSpeakingSensitivity +} + +// GetFinishedSpeakingSensitivityOk returns a tuple with the FinishedSpeakingSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetFinishedSpeakingSensitivityOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + return map[string]interface{}{}, false + } + return o.FinishedSpeakingSensitivity, true +} + +// HasFinishedSpeakingSensitivity returns a boolean if a field has been set. +func (o *PersonaList) HasFinishedSpeakingSensitivity() bool { + if o != nil && !IsNil(o.FinishedSpeakingSensitivity) { + return true + } + + return false +} + +// SetFinishedSpeakingSensitivity gets a reference to the given map[string]interface{} and assigns it to the FinishedSpeakingSensitivity field. +func (o *PersonaList) SetFinishedSpeakingSensitivity(v map[string]interface{}) { + o.FinishedSpeakingSensitivity = v +} + +// GetInterruptSensitivity returns the InterruptSensitivity field value if set, zero value otherwise. +func (o *PersonaList) GetInterruptSensitivity() map[string]interface{} { + if o == nil || IsNil(o.InterruptSensitivity) { + var ret map[string]interface{} + return ret + } + return o.InterruptSensitivity +} + +// GetInterruptSensitivityOk returns a tuple with the InterruptSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetInterruptSensitivityOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InterruptSensitivity) { + return map[string]interface{}{}, false + } + return o.InterruptSensitivity, true +} + +// HasInterruptSensitivity returns a boolean if a field has been set. +func (o *PersonaList) HasInterruptSensitivity() bool { + if o != nil && !IsNil(o.InterruptSensitivity) { + return true + } + + return false +} + +// SetInterruptSensitivity gets a reference to the given map[string]interface{} and assigns it to the InterruptSensitivity field. +func (o *PersonaList) SetInterruptSensitivity(v map[string]interface{}) { + o.InterruptSensitivity = v +} + +// GetKeywords returns the Keywords field value if set, zero value otherwise. +func (o *PersonaList) GetKeywords() map[string]interface{} { + if o == nil || IsNil(o.Keywords) { + var ret map[string]interface{} + return ret + } + return o.Keywords +} + +// GetKeywordsOk returns a tuple with the Keywords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetKeywordsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Keywords) { + return map[string]interface{}{}, false + } + return o.Keywords, true +} + +// HasKeywords returns a boolean if a field has been set. +func (o *PersonaList) HasKeywords() bool { + if o != nil && !IsNil(o.Keywords) { + return true + } + + return false +} + +// SetKeywords gets a reference to the given map[string]interface{} and assigns it to the Keywords field. +func (o *PersonaList) SetKeywords(v map[string]interface{}) { + o.Keywords = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *PersonaList) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *PersonaList) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *PersonaList) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetAdditionalInstruction returns the AdditionalInstruction field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetAdditionalInstruction() string { + if o == nil || IsNil(o.AdditionalInstruction.Get()) { + var ret string + return ret + } + return *o.AdditionalInstruction.Get() +} + +// GetAdditionalInstructionOk returns a tuple with the AdditionalInstruction field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetAdditionalInstructionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AdditionalInstruction.Get(), o.AdditionalInstruction.IsSet() +} + +// HasAdditionalInstruction returns a boolean if a field has been set. +func (o *PersonaList) HasAdditionalInstruction() bool { + if o != nil && o.AdditionalInstruction.IsSet() { + return true + } + + return false +} + +// SetAdditionalInstruction gets a reference to the given NullableString and assigns it to the AdditionalInstruction field. +func (o *PersonaList) SetAdditionalInstruction(v string) { + o.AdditionalInstruction.Set(&v) +} + +// SetAdditionalInstructionNil sets the value for AdditionalInstruction to be an explicit nil +func (o *PersonaList) SetAdditionalInstructionNil() { + o.AdditionalInstruction.Set(nil) +} + +// UnsetAdditionalInstruction ensures that no value is present for AdditionalInstruction, not even an explicit nil +func (o *PersonaList) UnsetAdditionalInstruction() { + o.AdditionalInstruction.Unset() +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault.Get()) { + var ret bool + return ret + } + return *o.IsDefault.Get() +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsDefault.Get(), o.IsDefault.IsSet() +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *PersonaList) HasIsDefault() bool { + if o != nil && o.IsDefault.IsSet() { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given NullableBool and assigns it to the IsDefault field. +func (o *PersonaList) SetIsDefault(v bool) { + o.IsDefault.Set(&v) +} + +// SetIsDefaultNil sets the value for IsDefault to be an explicit nil +func (o *PersonaList) SetIsDefaultNil() { + o.IsDefault.Set(nil) +} + +// UnsetIsDefault ensures that no value is present for IsDefault, not even an explicit nil +func (o *PersonaList) UnsetIsDefault() { + o.IsDefault.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PersonaList) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PersonaList) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PersonaList) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PersonaList) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PersonaList) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PersonaList) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetSimulationType returns the SimulationType field value if set, zero value otherwise. +func (o *PersonaList) GetSimulationType() string { + if o == nil || IsNil(o.SimulationType) { + var ret string + return ret + } + return *o.SimulationType +} + +// GetSimulationTypeOk returns a tuple with the SimulationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersonaList) GetSimulationTypeOk() (*string, bool) { + if o == nil || IsNil(o.SimulationType) { + return nil, false + } + return o.SimulationType, true +} + +// HasSimulationType returns a boolean if a field has been set. +func (o *PersonaList) HasSimulationType() bool { + if o != nil && !IsNil(o.SimulationType) { + return true + } + + return false +} + +// SetSimulationType gets a reference to the given string and assigns it to the SimulationType field. +func (o *PersonaList) SetSimulationType(v string) { + o.SimulationType = &v +} + +// GetPunctuation returns the Punctuation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetPunctuation() string { + if o == nil || IsNil(o.Punctuation.Get()) { + var ret string + return ret + } + return *o.Punctuation.Get() +} + +// GetPunctuationOk returns a tuple with the Punctuation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetPunctuationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Punctuation.Get(), o.Punctuation.IsSet() +} + +// HasPunctuation returns a boolean if a field has been set. +func (o *PersonaList) HasPunctuation() bool { + if o != nil && o.Punctuation.IsSet() { + return true + } + + return false +} + +// SetPunctuation gets a reference to the given NullableString and assigns it to the Punctuation field. +func (o *PersonaList) SetPunctuation(v string) { + o.Punctuation.Set(&v) +} + +// SetPunctuationNil sets the value for Punctuation to be an explicit nil +func (o *PersonaList) SetPunctuationNil() { + o.Punctuation.Set(nil) +} + +// UnsetPunctuation ensures that no value is present for Punctuation, not even an explicit nil +func (o *PersonaList) UnsetPunctuation() { + o.Punctuation.Unset() +} + +// GetSlangUsage returns the SlangUsage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetSlangUsage() string { + if o == nil || IsNil(o.SlangUsage.Get()) { + var ret string + return ret + } + return *o.SlangUsage.Get() +} + +// GetSlangUsageOk returns a tuple with the SlangUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetSlangUsageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlangUsage.Get(), o.SlangUsage.IsSet() +} + +// HasSlangUsage returns a boolean if a field has been set. +func (o *PersonaList) HasSlangUsage() bool { + if o != nil && o.SlangUsage.IsSet() { + return true + } + + return false +} + +// SetSlangUsage gets a reference to the given NullableString and assigns it to the SlangUsage field. +func (o *PersonaList) SetSlangUsage(v string) { + o.SlangUsage.Set(&v) +} + +// SetSlangUsageNil sets the value for SlangUsage to be an explicit nil +func (o *PersonaList) SetSlangUsageNil() { + o.SlangUsage.Set(nil) +} + +// UnsetSlangUsage ensures that no value is present for SlangUsage, not even an explicit nil +func (o *PersonaList) UnsetSlangUsage() { + o.SlangUsage.Unset() +} + +// GetTyposFrequency returns the TyposFrequency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetTyposFrequency() string { + if o == nil || IsNil(o.TyposFrequency.Get()) { + var ret string + return ret + } + return *o.TyposFrequency.Get() +} + +// GetTyposFrequencyOk returns a tuple with the TyposFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetTyposFrequencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TyposFrequency.Get(), o.TyposFrequency.IsSet() +} + +// HasTyposFrequency returns a boolean if a field has been set. +func (o *PersonaList) HasTyposFrequency() bool { + if o != nil && o.TyposFrequency.IsSet() { + return true + } + + return false +} + +// SetTyposFrequency gets a reference to the given NullableString and assigns it to the TyposFrequency field. +func (o *PersonaList) SetTyposFrequency(v string) { + o.TyposFrequency.Set(&v) +} + +// SetTyposFrequencyNil sets the value for TyposFrequency to be an explicit nil +func (o *PersonaList) SetTyposFrequencyNil() { + o.TyposFrequency.Set(nil) +} + +// UnsetTyposFrequency ensures that no value is present for TyposFrequency, not even an explicit nil +func (o *PersonaList) UnsetTyposFrequency() { + o.TyposFrequency.Unset() +} + +// GetRegionalMix returns the RegionalMix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetRegionalMix() string { + if o == nil || IsNil(o.RegionalMix.Get()) { + var ret string + return ret + } + return *o.RegionalMix.Get() +} + +// GetRegionalMixOk returns a tuple with the RegionalMix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetRegionalMixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RegionalMix.Get(), o.RegionalMix.IsSet() +} + +// HasRegionalMix returns a boolean if a field has been set. +func (o *PersonaList) HasRegionalMix() bool { + if o != nil && o.RegionalMix.IsSet() { + return true + } + + return false +} + +// SetRegionalMix gets a reference to the given NullableString and assigns it to the RegionalMix field. +func (o *PersonaList) SetRegionalMix(v string) { + o.RegionalMix.Set(&v) +} + +// SetRegionalMixNil sets the value for RegionalMix to be an explicit nil +func (o *PersonaList) SetRegionalMixNil() { + o.RegionalMix.Set(nil) +} + +// UnsetRegionalMix ensures that no value is present for RegionalMix, not even an explicit nil +func (o *PersonaList) UnsetRegionalMix() { + o.RegionalMix.Unset() +} + +// GetEmojiUsage returns the EmojiUsage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetEmojiUsage() string { + if o == nil || IsNil(o.EmojiUsage.Get()) { + var ret string + return ret + } + return *o.EmojiUsage.Get() +} + +// GetEmojiUsageOk returns a tuple with the EmojiUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetEmojiUsageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EmojiUsage.Get(), o.EmojiUsage.IsSet() +} + +// HasEmojiUsage returns a boolean if a field has been set. +func (o *PersonaList) HasEmojiUsage() bool { + if o != nil && o.EmojiUsage.IsSet() { + return true + } + + return false +} + +// SetEmojiUsage gets a reference to the given NullableString and assigns it to the EmojiUsage field. +func (o *PersonaList) SetEmojiUsage(v string) { + o.EmojiUsage.Set(&v) +} + +// SetEmojiUsageNil sets the value for EmojiUsage to be an explicit nil +func (o *PersonaList) SetEmojiUsageNil() { + o.EmojiUsage.Set(nil) +} + +// UnsetEmojiUsage ensures that no value is present for EmojiUsage, not even an explicit nil +func (o *PersonaList) UnsetEmojiUsage() { + o.EmojiUsage.Unset() +} + +// GetTone returns the Tone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetTone() string { + if o == nil || IsNil(o.Tone.Get()) { + var ret string + return ret + } + return *o.Tone.Get() +} + +// GetToneOk returns a tuple with the Tone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetToneOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Tone.Get(), o.Tone.IsSet() +} + +// HasTone returns a boolean if a field has been set. +func (o *PersonaList) HasTone() bool { + if o != nil && o.Tone.IsSet() { + return true + } + + return false +} + +// SetTone gets a reference to the given NullableString and assigns it to the Tone field. +func (o *PersonaList) SetTone(v string) { + o.Tone.Set(&v) +} + +// SetToneNil sets the value for Tone to be an explicit nil +func (o *PersonaList) SetToneNil() { + o.Tone.Set(nil) +} + +// UnsetTone ensures that no value is present for Tone, not even an explicit nil +func (o *PersonaList) UnsetTone() { + o.Tone.Unset() +} + +// GetVerbosity returns the Verbosity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PersonaList) GetVerbosity() string { + if o == nil || IsNil(o.Verbosity.Get()) { + var ret string + return ret + } + return *o.Verbosity.Get() +} + +// GetVerbosityOk returns a tuple with the Verbosity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PersonaList) GetVerbosityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Verbosity.Get(), o.Verbosity.IsSet() +} + +// HasVerbosity returns a boolean if a field has been set. +func (o *PersonaList) HasVerbosity() bool { + if o != nil && o.Verbosity.IsSet() { + return true + } + + return false +} + +// SetVerbosity gets a reference to the given NullableString and assigns it to the Verbosity field. +func (o *PersonaList) SetVerbosity(v string) { + o.Verbosity.Set(&v) +} + +// SetVerbosityNil sets the value for Verbosity to be an explicit nil +func (o *PersonaList) SetVerbosityNil() { + o.Verbosity.Set(nil) +} + +// UnsetVerbosity ensures that no value is present for Verbosity, not even an explicit nil +func (o *PersonaList) UnsetVerbosity() { + o.Verbosity.Unset() +} + +func (o PersonaList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PersonaList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.PersonaType) { + toSerialize["persona_type"] = o.PersonaType + } + if !IsNil(o.PersonaTypeDisplay) { + toSerialize["persona_type_display"] = o.PersonaTypeDisplay + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Gender) { + toSerialize["gender"] = o.Gender + } + if !IsNil(o.AgeGroup) { + toSerialize["age_group"] = o.AgeGroup + } + if !IsNil(o.Occupation) { + toSerialize["occupation"] = o.Occupation + } + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + if !IsNil(o.Personality) { + toSerialize["personality"] = o.Personality + } + if !IsNil(o.CommunicationStyle) { + toSerialize["communication_style"] = o.CommunicationStyle + } + if o.Multilingual.IsSet() { + toSerialize["multilingual"] = o.Multilingual.Get() + } + if !IsNil(o.Languages) { + toSerialize["languages"] = o.Languages + } + if !IsNil(o.Accent) { + toSerialize["accent"] = o.Accent + } + if !IsNil(o.ConversationSpeed) { + toSerialize["conversation_speed"] = o.ConversationSpeed + } + if o.BackgroundSound.IsSet() { + toSerialize["background_sound"] = o.BackgroundSound.Get() + } + if !IsNil(o.FinishedSpeakingSensitivity) { + toSerialize["finished_speaking_sensitivity"] = o.FinishedSpeakingSensitivity + } + if !IsNil(o.InterruptSensitivity) { + toSerialize["interrupt_sensitivity"] = o.InterruptSensitivity + } + if !IsNil(o.Keywords) { + toSerialize["keywords"] = o.Keywords + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.AdditionalInstruction.IsSet() { + toSerialize["additional_instruction"] = o.AdditionalInstruction.Get() + } + if o.IsDefault.IsSet() { + toSerialize["is_default"] = o.IsDefault.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.SimulationType) { + toSerialize["simulation_type"] = o.SimulationType + } + if o.Punctuation.IsSet() { + toSerialize["punctuation"] = o.Punctuation.Get() + } + if o.SlangUsage.IsSet() { + toSerialize["slang_usage"] = o.SlangUsage.Get() + } + if o.TyposFrequency.IsSet() { + toSerialize["typos_frequency"] = o.TyposFrequency.Get() + } + if o.RegionalMix.IsSet() { + toSerialize["regional_mix"] = o.RegionalMix.Get() + } + if o.EmojiUsage.IsSet() { + toSerialize["emoji_usage"] = o.EmojiUsage.Get() + } + if o.Tone.IsSet() { + toSerialize["tone"] = o.Tone.Get() + } + if o.Verbosity.IsSet() { + toSerialize["verbosity"] = o.Verbosity.Get() + } + return toSerialize, nil +} + +type NullablePersonaList struct { + value *PersonaList + isSet bool +} + +func (v NullablePersonaList) Get() *PersonaList { + return v.value +} + +func (v *NullablePersonaList) Set(val *PersonaList) { + v.value = val + v.isSet = true +} + +func (v NullablePersonaList) IsSet() bool { + return v.isSet +} + +func (v *NullablePersonaList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersonaList(val *PersonaList) *NullablePersonaList { + return &NullablePersonaList{value: val, isSet: true} +} + +func (v NullablePersonaList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersonaList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_preview_dataset_operation_request.go b/go/futureagi/model_preview_dataset_operation_request.go new file mode 100644 index 0000000..9539048 --- /dev/null +++ b/go/futureagi/model_preview_dataset_operation_request.go @@ -0,0 +1,341 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PreviewDatasetOperationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PreviewDatasetOperationRequest{} + +// PreviewDatasetOperationRequest struct for PreviewDatasetOperationRequest +type PreviewDatasetOperationRequest struct { + ColumnId *string `json:"column_id,omitempty"` + JsonKey *string `json:"json_key,omitempty"` + Labels []string `json:"labels,omitempty"` + Instruction *string `json:"instruction,omitempty"` + LanguageModelId *string `json:"language_model_id,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + Code *string `json:"code,omitempty"` +} + +// NewPreviewDatasetOperationRequest instantiates a new PreviewDatasetOperationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPreviewDatasetOperationRequest() *PreviewDatasetOperationRequest { + this := PreviewDatasetOperationRequest{} + return &this +} + +// NewPreviewDatasetOperationRequestWithDefaults instantiates a new PreviewDatasetOperationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPreviewDatasetOperationRequestWithDefaults() *PreviewDatasetOperationRequest { + this := PreviewDatasetOperationRequest{} + return &this +} + +// GetColumnId returns the ColumnId field value if set, zero value otherwise. +func (o *PreviewDatasetOperationRequest) GetColumnId() string { + if o == nil || IsNil(o.ColumnId) { + var ret string + return ret + } + return *o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationRequest) GetColumnIdOk() (*string, bool) { + if o == nil || IsNil(o.ColumnId) { + return nil, false + } + return o.ColumnId, true +} + +// HasColumnId returns a boolean if a field has been set. +func (o *PreviewDatasetOperationRequest) HasColumnId() bool { + if o != nil && !IsNil(o.ColumnId) { + return true + } + + return false +} + +// SetColumnId gets a reference to the given string and assigns it to the ColumnId field. +func (o *PreviewDatasetOperationRequest) SetColumnId(v string) { + o.ColumnId = &v +} + +// GetJsonKey returns the JsonKey field value if set, zero value otherwise. +func (o *PreviewDatasetOperationRequest) GetJsonKey() string { + if o == nil || IsNil(o.JsonKey) { + var ret string + return ret + } + return *o.JsonKey +} + +// GetJsonKeyOk returns a tuple with the JsonKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationRequest) GetJsonKeyOk() (*string, bool) { + if o == nil || IsNil(o.JsonKey) { + return nil, false + } + return o.JsonKey, true +} + +// HasJsonKey returns a boolean if a field has been set. +func (o *PreviewDatasetOperationRequest) HasJsonKey() bool { + if o != nil && !IsNil(o.JsonKey) { + return true + } + + return false +} + +// SetJsonKey gets a reference to the given string and assigns it to the JsonKey field. +func (o *PreviewDatasetOperationRequest) SetJsonKey(v string) { + o.JsonKey = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PreviewDatasetOperationRequest) GetLabels() []string { + if o == nil || IsNil(o.Labels) { + var ret []string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationRequest) GetLabelsOk() ([]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PreviewDatasetOperationRequest) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *PreviewDatasetOperationRequest) SetLabels(v []string) { + o.Labels = v +} + +// GetInstruction returns the Instruction field value if set, zero value otherwise. +func (o *PreviewDatasetOperationRequest) GetInstruction() string { + if o == nil || IsNil(o.Instruction) { + var ret string + return ret + } + return *o.Instruction +} + +// GetInstructionOk returns a tuple with the Instruction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationRequest) GetInstructionOk() (*string, bool) { + if o == nil || IsNil(o.Instruction) { + return nil, false + } + return o.Instruction, true +} + +// HasInstruction returns a boolean if a field has been set. +func (o *PreviewDatasetOperationRequest) HasInstruction() bool { + if o != nil && !IsNil(o.Instruction) { + return true + } + + return false +} + +// SetInstruction gets a reference to the given string and assigns it to the Instruction field. +func (o *PreviewDatasetOperationRequest) SetInstruction(v string) { + o.Instruction = &v +} + +// GetLanguageModelId returns the LanguageModelId field value if set, zero value otherwise. +func (o *PreviewDatasetOperationRequest) GetLanguageModelId() string { + if o == nil || IsNil(o.LanguageModelId) { + var ret string + return ret + } + return *o.LanguageModelId +} + +// GetLanguageModelIdOk returns a tuple with the LanguageModelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationRequest) GetLanguageModelIdOk() (*string, bool) { + if o == nil || IsNil(o.LanguageModelId) { + return nil, false + } + return o.LanguageModelId, true +} + +// HasLanguageModelId returns a boolean if a field has been set. +func (o *PreviewDatasetOperationRequest) HasLanguageModelId() bool { + if o != nil && !IsNil(o.LanguageModelId) { + return true + } + + return false +} + +// SetLanguageModelId gets a reference to the given string and assigns it to the LanguageModelId field. +func (o *PreviewDatasetOperationRequest) SetLanguageModelId(v string) { + o.LanguageModelId = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *PreviewDatasetOperationRequest) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *PreviewDatasetOperationRequest) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *PreviewDatasetOperationRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *PreviewDatasetOperationRequest) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationRequest) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *PreviewDatasetOperationRequest) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *PreviewDatasetOperationRequest) SetCode(v string) { + o.Code = &v +} + +func (o PreviewDatasetOperationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PreviewDatasetOperationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ColumnId) { + toSerialize["column_id"] = o.ColumnId + } + if !IsNil(o.JsonKey) { + toSerialize["json_key"] = o.JsonKey + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Instruction) { + toSerialize["instruction"] = o.Instruction + } + if !IsNil(o.LanguageModelId) { + toSerialize["language_model_id"] = o.LanguageModelId + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + return toSerialize, nil +} + +type NullablePreviewDatasetOperationRequest struct { + value *PreviewDatasetOperationRequest + isSet bool +} + +func (v NullablePreviewDatasetOperationRequest) Get() *PreviewDatasetOperationRequest { + return v.value +} + +func (v *NullablePreviewDatasetOperationRequest) Set(val *PreviewDatasetOperationRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePreviewDatasetOperationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePreviewDatasetOperationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePreviewDatasetOperationRequest(val *PreviewDatasetOperationRequest) *NullablePreviewDatasetOperationRequest { + return &NullablePreviewDatasetOperationRequest{value: val, isSet: true} +} + +func (v NullablePreviewDatasetOperationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePreviewDatasetOperationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_preview_dataset_operation_response.go b/go/futureagi/model_preview_dataset_operation_response.go new file mode 100644 index 0000000..064f46f --- /dev/null +++ b/go/futureagi/model_preview_dataset_operation_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PreviewDatasetOperationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PreviewDatasetOperationResponse{} + +// PreviewDatasetOperationResponse struct for PreviewDatasetOperationResponse +type PreviewDatasetOperationResponse struct { + Status bool `json:"status"` + Result PreviewDatasetOperationResult `json:"result"` +} + +type _PreviewDatasetOperationResponse PreviewDatasetOperationResponse + +// NewPreviewDatasetOperationResponse instantiates a new PreviewDatasetOperationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPreviewDatasetOperationResponse(status bool, result PreviewDatasetOperationResult) *PreviewDatasetOperationResponse { + this := PreviewDatasetOperationResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewPreviewDatasetOperationResponseWithDefaults instantiates a new PreviewDatasetOperationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPreviewDatasetOperationResponseWithDefaults() *PreviewDatasetOperationResponse { + this := PreviewDatasetOperationResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *PreviewDatasetOperationResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *PreviewDatasetOperationResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *PreviewDatasetOperationResponse) GetResult() PreviewDatasetOperationResult { + if o == nil { + var ret PreviewDatasetOperationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResponse) GetResultOk() (*PreviewDatasetOperationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *PreviewDatasetOperationResponse) SetResult(v PreviewDatasetOperationResult) { + o.Result = v +} + +func (o PreviewDatasetOperationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PreviewDatasetOperationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *PreviewDatasetOperationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPreviewDatasetOperationResponse := _PreviewDatasetOperationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPreviewDatasetOperationResponse) + + if err != nil { + return err + } + + *o = PreviewDatasetOperationResponse(varPreviewDatasetOperationResponse) + + return err +} + +type NullablePreviewDatasetOperationResponse struct { + value *PreviewDatasetOperationResponse + isSet bool +} + +func (v NullablePreviewDatasetOperationResponse) Get() *PreviewDatasetOperationResponse { + return v.value +} + +func (v *NullablePreviewDatasetOperationResponse) Set(val *PreviewDatasetOperationResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePreviewDatasetOperationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePreviewDatasetOperationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePreviewDatasetOperationResponse(val *PreviewDatasetOperationResponse) *NullablePreviewDatasetOperationResponse { + return &NullablePreviewDatasetOperationResponse{value: val, isSet: true} +} + +func (v NullablePreviewDatasetOperationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePreviewDatasetOperationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_preview_dataset_operation_result.go b/go/futureagi/model_preview_dataset_operation_result.go new file mode 100644 index 0000000..4b5200d --- /dev/null +++ b/go/futureagi/model_preview_dataset_operation_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PreviewDatasetOperationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PreviewDatasetOperationResult{} + +// PreviewDatasetOperationResult struct for PreviewDatasetOperationResult +type PreviewDatasetOperationResult struct { + Message string `json:"message"` + PreviewResults []PreviewDatasetOperationResultItem `json:"preview_results"` + SampleSize int32 `json:"sample_size"` +} + +type _PreviewDatasetOperationResult PreviewDatasetOperationResult + +// NewPreviewDatasetOperationResult instantiates a new PreviewDatasetOperationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPreviewDatasetOperationResult(message string, previewResults []PreviewDatasetOperationResultItem, sampleSize int32) *PreviewDatasetOperationResult { + this := PreviewDatasetOperationResult{} + this.Message = message + this.PreviewResults = previewResults + this.SampleSize = sampleSize + return &this +} + +// NewPreviewDatasetOperationResultWithDefaults instantiates a new PreviewDatasetOperationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPreviewDatasetOperationResultWithDefaults() *PreviewDatasetOperationResult { + this := PreviewDatasetOperationResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *PreviewDatasetOperationResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *PreviewDatasetOperationResult) SetMessage(v string) { + o.Message = v +} + +// GetPreviewResults returns the PreviewResults field value +func (o *PreviewDatasetOperationResult) GetPreviewResults() []PreviewDatasetOperationResultItem { + if o == nil { + var ret []PreviewDatasetOperationResultItem + return ret + } + + return o.PreviewResults +} + +// GetPreviewResultsOk returns a tuple with the PreviewResults field value +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResult) GetPreviewResultsOk() ([]PreviewDatasetOperationResultItem, bool) { + if o == nil { + return nil, false + } + return o.PreviewResults, true +} + +// SetPreviewResults sets field value +func (o *PreviewDatasetOperationResult) SetPreviewResults(v []PreviewDatasetOperationResultItem) { + o.PreviewResults = v +} + +// GetSampleSize returns the SampleSize field value +func (o *PreviewDatasetOperationResult) GetSampleSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SampleSize +} + +// GetSampleSizeOk returns a tuple with the SampleSize field value +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResult) GetSampleSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SampleSize, true +} + +// SetSampleSize sets field value +func (o *PreviewDatasetOperationResult) SetSampleSize(v int32) { + o.SampleSize = v +} + +func (o PreviewDatasetOperationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PreviewDatasetOperationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["preview_results"] = o.PreviewResults + toSerialize["sample_size"] = o.SampleSize + return toSerialize, nil +} + +func (o *PreviewDatasetOperationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "preview_results", + "sample_size", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPreviewDatasetOperationResult := _PreviewDatasetOperationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPreviewDatasetOperationResult) + + if err != nil { + return err + } + + *o = PreviewDatasetOperationResult(varPreviewDatasetOperationResult) + + return err +} + +type NullablePreviewDatasetOperationResult struct { + value *PreviewDatasetOperationResult + isSet bool +} + +func (v NullablePreviewDatasetOperationResult) Get() *PreviewDatasetOperationResult { + return v.value +} + +func (v *NullablePreviewDatasetOperationResult) Set(val *PreviewDatasetOperationResult) { + v.value = val + v.isSet = true +} + +func (v NullablePreviewDatasetOperationResult) IsSet() bool { + return v.isSet +} + +func (v *NullablePreviewDatasetOperationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePreviewDatasetOperationResult(val *PreviewDatasetOperationResult) *NullablePreviewDatasetOperationResult { + return &NullablePreviewDatasetOperationResult{value: val, isSet: true} +} + +func (v NullablePreviewDatasetOperationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePreviewDatasetOperationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_preview_dataset_operation_result_item.go b/go/futureagi/model_preview_dataset_operation_result_item.go new file mode 100644 index 0000000..4bc28e4 --- /dev/null +++ b/go/futureagi/model_preview_dataset_operation_result_item.go @@ -0,0 +1,265 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PreviewDatasetOperationResultItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PreviewDatasetOperationResultItem{} + +// PreviewDatasetOperationResultItem struct for PreviewDatasetOperationResultItem +type PreviewDatasetOperationResultItem struct { + RowId string `json:"row_id"` + Input map[string]interface{} `json:"input,omitempty"` + Output map[string]interface{} `json:"output,omitempty"` + Details map[string]interface{} `json:"details,omitempty"` +} + +type _PreviewDatasetOperationResultItem PreviewDatasetOperationResultItem + +// NewPreviewDatasetOperationResultItem instantiates a new PreviewDatasetOperationResultItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPreviewDatasetOperationResultItem(rowId string) *PreviewDatasetOperationResultItem { + this := PreviewDatasetOperationResultItem{} + this.RowId = rowId + return &this +} + +// NewPreviewDatasetOperationResultItemWithDefaults instantiates a new PreviewDatasetOperationResultItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPreviewDatasetOperationResultItemWithDefaults() *PreviewDatasetOperationResultItem { + this := PreviewDatasetOperationResultItem{} + return &this +} + +// GetRowId returns the RowId field value +func (o *PreviewDatasetOperationResultItem) GetRowId() string { + if o == nil { + var ret string + return ret + } + + return o.RowId +} + +// GetRowIdOk returns a tuple with the RowId field value +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResultItem) GetRowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RowId, true +} + +// SetRowId sets field value +func (o *PreviewDatasetOperationResultItem) SetRowId(v string) { + o.RowId = v +} + +// GetInput returns the Input field value if set, zero value otherwise. +func (o *PreviewDatasetOperationResultItem) GetInput() map[string]interface{} { + if o == nil || IsNil(o.Input) { + var ret map[string]interface{} + return ret + } + return o.Input +} + +// GetInputOk returns a tuple with the Input field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResultItem) GetInputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Input) { + return map[string]interface{}{}, false + } + return o.Input, true +} + +// HasInput returns a boolean if a field has been set. +func (o *PreviewDatasetOperationResultItem) HasInput() bool { + if o != nil && !IsNil(o.Input) { + return true + } + + return false +} + +// SetInput gets a reference to the given map[string]interface{} and assigns it to the Input field. +func (o *PreviewDatasetOperationResultItem) SetInput(v map[string]interface{}) { + o.Input = v +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *PreviewDatasetOperationResultItem) GetOutput() map[string]interface{} { + if o == nil || IsNil(o.Output) { + var ret map[string]interface{} + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResultItem) GetOutputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Output) { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *PreviewDatasetOperationResultItem) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given map[string]interface{} and assigns it to the Output field. +func (o *PreviewDatasetOperationResultItem) SetOutput(v map[string]interface{}) { + o.Output = v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *PreviewDatasetOperationResultItem) GetDetails() map[string]interface{} { + if o == nil || IsNil(o.Details) { + var ret map[string]interface{} + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewDatasetOperationResultItem) GetDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Details) { + return map[string]interface{}{}, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *PreviewDatasetOperationResultItem) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. +func (o *PreviewDatasetOperationResultItem) SetDetails(v map[string]interface{}) { + o.Details = v +} + +func (o PreviewDatasetOperationResultItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PreviewDatasetOperationResultItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["row_id"] = o.RowId + if !IsNil(o.Input) { + toSerialize["input"] = o.Input + } + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +func (o *PreviewDatasetOperationResultItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "row_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPreviewDatasetOperationResultItem := _PreviewDatasetOperationResultItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPreviewDatasetOperationResultItem) + + if err != nil { + return err + } + + *o = PreviewDatasetOperationResultItem(varPreviewDatasetOperationResultItem) + + return err +} + +type NullablePreviewDatasetOperationResultItem struct { + value *PreviewDatasetOperationResultItem + isSet bool +} + +func (v NullablePreviewDatasetOperationResultItem) Get() *PreviewDatasetOperationResultItem { + return v.value +} + +func (v *NullablePreviewDatasetOperationResultItem) Set(val *PreviewDatasetOperationResultItem) { + v.value = val + v.isSet = true +} + +func (v NullablePreviewDatasetOperationResultItem) IsSet() bool { + return v.isSet +} + +func (v *NullablePreviewDatasetOperationResultItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePreviewDatasetOperationResultItem(val *PreviewDatasetOperationResultItem) *NullablePreviewDatasetOperationResultItem { + return &NullablePreviewDatasetOperationResultItem{value: val, isSet: true} +} + +func (v NullablePreviewDatasetOperationResultItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePreviewDatasetOperationResultItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_preview_run_eval_request.go b/go/futureagi/model_preview_run_eval_request.go new file mode 100644 index 0000000..4fc7f10 --- /dev/null +++ b/go/futureagi/model_preview_run_eval_request.go @@ -0,0 +1,333 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PreviewRunEvalRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PreviewRunEvalRequest{} + +// PreviewRunEvalRequest struct for PreviewRunEvalRequest +type PreviewRunEvalRequest struct { + Config map[string]interface{} `json:"config"` + TemplateId string `json:"template_id"` + Model *string `json:"model,omitempty"` + SdkUuid *string `json:"sdk_uuid,omitempty"` + Source *string `json:"source,omitempty"` + ProtectFlash *bool `json:"protect_flash,omitempty"` +} + +type _PreviewRunEvalRequest PreviewRunEvalRequest + +// NewPreviewRunEvalRequest instantiates a new PreviewRunEvalRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPreviewRunEvalRequest(config map[string]interface{}, templateId string) *PreviewRunEvalRequest { + this := PreviewRunEvalRequest{} + this.Config = config + this.TemplateId = templateId + var protectFlash bool = false + this.ProtectFlash = &protectFlash + return &this +} + +// NewPreviewRunEvalRequestWithDefaults instantiates a new PreviewRunEvalRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPreviewRunEvalRequestWithDefaults() *PreviewRunEvalRequest { + this := PreviewRunEvalRequest{} + var protectFlash bool = false + this.ProtectFlash = &protectFlash + return &this +} + +// GetConfig returns the Config field value +func (o *PreviewRunEvalRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *PreviewRunEvalRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *PreviewRunEvalRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetTemplateId returns the TemplateId field value +func (o *PreviewRunEvalRequest) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *PreviewRunEvalRequest) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *PreviewRunEvalRequest) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *PreviewRunEvalRequest) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewRunEvalRequest) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *PreviewRunEvalRequest) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *PreviewRunEvalRequest) SetModel(v string) { + o.Model = &v +} + +// GetSdkUuid returns the SdkUuid field value if set, zero value otherwise. +func (o *PreviewRunEvalRequest) GetSdkUuid() string { + if o == nil || IsNil(o.SdkUuid) { + var ret string + return ret + } + return *o.SdkUuid +} + +// GetSdkUuidOk returns a tuple with the SdkUuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewRunEvalRequest) GetSdkUuidOk() (*string, bool) { + if o == nil || IsNil(o.SdkUuid) { + return nil, false + } + return o.SdkUuid, true +} + +// HasSdkUuid returns a boolean if a field has been set. +func (o *PreviewRunEvalRequest) HasSdkUuid() bool { + if o != nil && !IsNil(o.SdkUuid) { + return true + } + + return false +} + +// SetSdkUuid gets a reference to the given string and assigns it to the SdkUuid field. +func (o *PreviewRunEvalRequest) SetSdkUuid(v string) { + o.SdkUuid = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *PreviewRunEvalRequest) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewRunEvalRequest) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *PreviewRunEvalRequest) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *PreviewRunEvalRequest) SetSource(v string) { + o.Source = &v +} + +// GetProtectFlash returns the ProtectFlash field value if set, zero value otherwise. +func (o *PreviewRunEvalRequest) GetProtectFlash() bool { + if o == nil || IsNil(o.ProtectFlash) { + var ret bool + return ret + } + return *o.ProtectFlash +} + +// GetProtectFlashOk returns a tuple with the ProtectFlash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewRunEvalRequest) GetProtectFlashOk() (*bool, bool) { + if o == nil || IsNil(o.ProtectFlash) { + return nil, false + } + return o.ProtectFlash, true +} + +// HasProtectFlash returns a boolean if a field has been set. +func (o *PreviewRunEvalRequest) HasProtectFlash() bool { + if o != nil && !IsNil(o.ProtectFlash) { + return true + } + + return false +} + +// SetProtectFlash gets a reference to the given bool and assigns it to the ProtectFlash field. +func (o *PreviewRunEvalRequest) SetProtectFlash(v bool) { + o.ProtectFlash = &v +} + +func (o PreviewRunEvalRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PreviewRunEvalRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["template_id"] = o.TemplateId + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.SdkUuid) { + toSerialize["sdk_uuid"] = o.SdkUuid + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.ProtectFlash) { + toSerialize["protect_flash"] = o.ProtectFlash + } + return toSerialize, nil +} + +func (o *PreviewRunEvalRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "config", + "template_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPreviewRunEvalRequest := _PreviewRunEvalRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPreviewRunEvalRequest) + + if err != nil { + return err + } + + *o = PreviewRunEvalRequest(varPreviewRunEvalRequest) + + return err +} + +type NullablePreviewRunEvalRequest struct { + value *PreviewRunEvalRequest + isSet bool +} + +func (v NullablePreviewRunEvalRequest) Get() *PreviewRunEvalRequest { + return v.value +} + +func (v *NullablePreviewRunEvalRequest) Set(val *PreviewRunEvalRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePreviewRunEvalRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePreviewRunEvalRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePreviewRunEvalRequest(val *PreviewRunEvalRequest) *NullablePreviewRunEvalRequest { + return &NullablePreviewRunEvalRequest{value: val, isSet: true} +} + +func (v NullablePreviewRunEvalRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePreviewRunEvalRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_preview_run_prompt.go b/go/futureagi/model_preview_run_prompt.go new file mode 100644 index 0000000..1baedf4 --- /dev/null +++ b/go/futureagi/model_preview_run_prompt.go @@ -0,0 +1,294 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PreviewRunPrompt type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PreviewRunPrompt{} + +// PreviewRunPrompt struct for PreviewRunPrompt +type PreviewRunPrompt struct { + DatasetId string `json:"dataset_id"` + Name string `json:"name"` + Config *PromptConfig `json:"config,omitempty"` + FirstNRows *int32 `json:"first_n_rows,omitempty"` + // List of row indices to preview. Must contain at least one integer. + RowIndices []int32 `json:"row_indices,omitempty"` +} + +type _PreviewRunPrompt PreviewRunPrompt + +// NewPreviewRunPrompt instantiates a new PreviewRunPrompt object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPreviewRunPrompt(datasetId string, name string) *PreviewRunPrompt { + this := PreviewRunPrompt{} + this.DatasetId = datasetId + this.Name = name + return &this +} + +// NewPreviewRunPromptWithDefaults instantiates a new PreviewRunPrompt object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPreviewRunPromptWithDefaults() *PreviewRunPrompt { + this := PreviewRunPrompt{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *PreviewRunPrompt) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *PreviewRunPrompt) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *PreviewRunPrompt) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetName returns the Name field value +func (o *PreviewRunPrompt) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PreviewRunPrompt) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PreviewRunPrompt) SetName(v string) { + o.Name = v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *PreviewRunPrompt) GetConfig() PromptConfig { + if o == nil || IsNil(o.Config) { + var ret PromptConfig + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewRunPrompt) GetConfigOk() (*PromptConfig, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *PreviewRunPrompt) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given PromptConfig and assigns it to the Config field. +func (o *PreviewRunPrompt) SetConfig(v PromptConfig) { + o.Config = &v +} + +// GetFirstNRows returns the FirstNRows field value if set, zero value otherwise. +func (o *PreviewRunPrompt) GetFirstNRows() int32 { + if o == nil || IsNil(o.FirstNRows) { + var ret int32 + return ret + } + return *o.FirstNRows +} + +// GetFirstNRowsOk returns a tuple with the FirstNRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewRunPrompt) GetFirstNRowsOk() (*int32, bool) { + if o == nil || IsNil(o.FirstNRows) { + return nil, false + } + return o.FirstNRows, true +} + +// HasFirstNRows returns a boolean if a field has been set. +func (o *PreviewRunPrompt) HasFirstNRows() bool { + if o != nil && !IsNil(o.FirstNRows) { + return true + } + + return false +} + +// SetFirstNRows gets a reference to the given int32 and assigns it to the FirstNRows field. +func (o *PreviewRunPrompt) SetFirstNRows(v int32) { + o.FirstNRows = &v +} + +// GetRowIndices returns the RowIndices field value if set, zero value otherwise. +func (o *PreviewRunPrompt) GetRowIndices() []int32 { + if o == nil || IsNil(o.RowIndices) { + var ret []int32 + return ret + } + return o.RowIndices +} + +// GetRowIndicesOk returns a tuple with the RowIndices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PreviewRunPrompt) GetRowIndicesOk() ([]int32, bool) { + if o == nil || IsNil(o.RowIndices) { + return nil, false + } + return o.RowIndices, true +} + +// HasRowIndices returns a boolean if a field has been set. +func (o *PreviewRunPrompt) HasRowIndices() bool { + if o != nil && !IsNil(o.RowIndices) { + return true + } + + return false +} + +// SetRowIndices gets a reference to the given []int32 and assigns it to the RowIndices field. +func (o *PreviewRunPrompt) SetRowIndices(v []int32) { + o.RowIndices = v +} + +func (o PreviewRunPrompt) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PreviewRunPrompt) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["name"] = o.Name + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.FirstNRows) { + toSerialize["first_n_rows"] = o.FirstNRows + } + if !IsNil(o.RowIndices) { + toSerialize["row_indices"] = o.RowIndices + } + return toSerialize, nil +} + +func (o *PreviewRunPrompt) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPreviewRunPrompt := _PreviewRunPrompt{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPreviewRunPrompt) + + if err != nil { + return err + } + + *o = PreviewRunPrompt(varPreviewRunPrompt) + + return err +} + +type NullablePreviewRunPrompt struct { + value *PreviewRunPrompt + isSet bool +} + +func (v NullablePreviewRunPrompt) Get() *PreviewRunPrompt { + return v.value +} + +func (v *NullablePreviewRunPrompt) Set(val *PreviewRunPrompt) { + v.value = val + v.isSet = true +} + +func (v NullablePreviewRunPrompt) IsSet() bool { + return v.isSet +} + +func (v *NullablePreviewRunPrompt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePreviewRunPrompt(val *PreviewRunPrompt) *NullablePreviewRunPrompt { + return &NullablePreviewRunPrompt{value: val, isSet: true} +} + +func (v NullablePreviewRunPrompt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePreviewRunPrompt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_project.go b/go/futureagi/model_project.go new file mode 100644 index 0000000..b97ad55 --- /dev/null +++ b/go/futureagi/model_project.go @@ -0,0 +1,588 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Project type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Project{} + +// Project struct for Project +type Project struct { + Id *string `json:"id,omitempty"` + ModelType string `json:"model_type"` + Name string `json:"name"` + TraceType string `json:"trace_type"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Organization *string `json:"organization,omitempty"` + Workspace NullableString `json:"workspace,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // Any valid JSON value. + Config map[string]interface{} `json:"config,omitempty"` + Source *string `json:"source,omitempty"` + // Any valid JSON value. + SessionConfig map[string]interface{} `json:"session_config,omitempty"` + // Any valid JSON value. + Tags map[string]interface{} `json:"tags,omitempty"` +} + +type _Project Project + +// NewProject instantiates a new Project object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProject(modelType string, name string, traceType string) *Project { + this := Project{} + this.ModelType = modelType + this.Name = name + this.TraceType = traceType + return &this +} + +// NewProjectWithDefaults instantiates a new Project object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProjectWithDefaults() *Project { + this := Project{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Project) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Project) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Project) SetId(v string) { + o.Id = &v +} + +// GetModelType returns the ModelType field value +func (o *Project) GetModelType() string { + if o == nil { + var ret string + return ret + } + + return o.ModelType +} + +// GetModelTypeOk returns a tuple with the ModelType field value +// and a boolean to check if the value has been set. +func (o *Project) GetModelTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ModelType, true +} + +// SetModelType sets field value +func (o *Project) SetModelType(v string) { + o.ModelType = v +} + +// GetName returns the Name field value +func (o *Project) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Project) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Project) SetName(v string) { + o.Name = v +} + +// GetTraceType returns the TraceType field value +func (o *Project) GetTraceType() string { + if o == nil { + var ret string + return ret + } + + return o.TraceType +} + +// GetTraceTypeOk returns a tuple with the TraceType field value +// and a boolean to check if the value has been set. +func (o *Project) GetTraceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceType, true +} + +// SetTraceType sets field value +func (o *Project) SetTraceType(v string) { + o.TraceType = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *Project) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *Project) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *Project) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *Project) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *Project) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *Project) SetOrganization(v string) { + o.Organization = &v +} + +// GetWorkspace returns the Workspace field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Project) GetWorkspace() string { + if o == nil || IsNil(o.Workspace.Get()) { + var ret string + return ret + } + return *o.Workspace.Get() +} + +// GetWorkspaceOk returns a tuple with the Workspace field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Project) GetWorkspaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Workspace.Get(), o.Workspace.IsSet() +} + +// HasWorkspace returns a boolean if a field has been set. +func (o *Project) HasWorkspace() bool { + if o != nil && o.Workspace.IsSet() { + return true + } + + return false +} + +// SetWorkspace gets a reference to the given NullableString and assigns it to the Workspace field. +func (o *Project) SetWorkspace(v string) { + o.Workspace.Set(&v) +} + +// SetWorkspaceNil sets the value for Workspace to be an explicit nil +func (o *Project) SetWorkspaceNil() { + o.Workspace.Set(nil) +} + +// UnsetWorkspace ensures that no value is present for Workspace, not even an explicit nil +func (o *Project) UnsetWorkspace() { + o.Workspace.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Project) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Project) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Project) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Project) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Project) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Project) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *Project) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *Project) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *Project) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *Project) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *Project) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *Project) SetSource(v string) { + o.Source = &v +} + +// GetSessionConfig returns the SessionConfig field value if set, zero value otherwise. +func (o *Project) GetSessionConfig() map[string]interface{} { + if o == nil || IsNil(o.SessionConfig) { + var ret map[string]interface{} + return ret + } + return o.SessionConfig +} + +// GetSessionConfigOk returns a tuple with the SessionConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetSessionConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.SessionConfig) { + return map[string]interface{}{}, false + } + return o.SessionConfig, true +} + +// HasSessionConfig returns a boolean if a field has been set. +func (o *Project) HasSessionConfig() bool { + if o != nil && !IsNil(o.SessionConfig) { + return true + } + + return false +} + +// SetSessionConfig gets a reference to the given map[string]interface{} and assigns it to the SessionConfig field. +func (o *Project) SetSessionConfig(v map[string]interface{}) { + o.SessionConfig = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Project) GetTags() map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Project) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. +func (o *Project) SetTags(v map[string]interface{}) { + o.Tags = v +} + +func (o Project) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Project) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["model_type"] = o.ModelType + toSerialize["name"] = o.Name + toSerialize["trace_type"] = o.TraceType + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if o.Workspace.IsSet() { + toSerialize["workspace"] = o.Workspace.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.SessionConfig) { + toSerialize["session_config"] = o.SessionConfig + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + return toSerialize, nil +} + +func (o *Project) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "model_type", + "name", + "trace_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProject := _Project{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varProject) + + if err != nil { + return err + } + + *o = Project(varProject) + + return err +} + +type NullableProject struct { + value *Project + isSet bool +} + +func (v NullableProject) Get() *Project { + return v.value +} + +func (v *NullableProject) Set(val *Project) { + v.value = val + v.isSet = true +} + +func (v NullableProject) IsSet() bool { + return v.isSet +} + +func (v *NullableProject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProject(val *Project) *NullableProject { + return &NullableProject{value: val, isSet: true} +} + +func (v NullableProject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_config.go b/go/futureagi/model_prompt_config.go new file mode 100644 index 0000000..299a742 --- /dev/null +++ b/go/futureagi/model_prompt_config.go @@ -0,0 +1,657 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PromptConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptConfig{} + +// PromptConfig struct for PromptConfig +type PromptConfig struct { + Model *string `json:"model,omitempty"` + RunPromptConfig *map[string]string `json:"run_prompt_config,omitempty"` + // List of messages with format [{'role': 'user/assistant', 'content': 'text'}] + Messages []map[string]string `json:"messages,omitempty"` + // Controls the randomness. Value between 0 and 2. + Temperature NullableFloat32 `json:"temperature,omitempty"` + // Penalty for word repetition. Value between -2 and 2. + FrequencyPenalty NullableFloat32 `json:"frequency_penalty,omitempty"` + // Penalty for new word usage. Value between -2 and 2. + PresencePenalty NullableFloat32 `json:"presence_penalty,omitempty"` + // Maximum number of tokens to generate. Null = use provider default. + MaxTokens NullableInt32 `json:"max_tokens,omitempty"` + // Controls diversity via nucleus sampling. Value between 0 and 1. + TopP NullableFloat32 `json:"top_p,omitempty"` + // JSON schema for response format if required. Can be a JSON object or string. Defaults to None. + ResponseFormat map[string]interface{} `json:"response_format,omitempty"` + // Tool selection mode: 'auto' or 'required'. + ToolChoice NullableString `json:"tool_choice,omitempty"` + // List of tools with tool properties if available. + Tools []map[string]string `json:"tools,omitempty"` + // Output format type. + OutputFormat NullableString `json:"output_format,omitempty"` + // Number of concurrent operations allowed. Maximum 10. + Concurrency NullableInt32 `json:"concurrency,omitempty"` +} + +// NewPromptConfig instantiates a new PromptConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptConfig() *PromptConfig { + this := PromptConfig{} + return &this +} + +// NewPromptConfigWithDefaults instantiates a new PromptConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptConfigWithDefaults() *PromptConfig { + this := PromptConfig{} + return &this +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *PromptConfig) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfig) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *PromptConfig) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *PromptConfig) SetModel(v string) { + o.Model = &v +} + +// GetRunPromptConfig returns the RunPromptConfig field value if set, zero value otherwise. +func (o *PromptConfig) GetRunPromptConfig() map[string]string { + if o == nil || IsNil(o.RunPromptConfig) { + var ret map[string]string + return ret + } + return *o.RunPromptConfig +} + +// GetRunPromptConfigOk returns a tuple with the RunPromptConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfig) GetRunPromptConfigOk() (*map[string]string, bool) { + if o == nil || IsNil(o.RunPromptConfig) { + return nil, false + } + return o.RunPromptConfig, true +} + +// HasRunPromptConfig returns a boolean if a field has been set. +func (o *PromptConfig) HasRunPromptConfig() bool { + if o != nil && !IsNil(o.RunPromptConfig) { + return true + } + + return false +} + +// SetRunPromptConfig gets a reference to the given map[string]string and assigns it to the RunPromptConfig field. +func (o *PromptConfig) SetRunPromptConfig(v map[string]string) { + o.RunPromptConfig = &v +} + +// GetMessages returns the Messages field value if set, zero value otherwise. +func (o *PromptConfig) GetMessages() []map[string]string { + if o == nil || IsNil(o.Messages) { + var ret []map[string]string + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfig) GetMessagesOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.Messages) { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *PromptConfig) HasMessages() bool { + if o != nil && !IsNil(o.Messages) { + return true + } + + return false +} + +// SetMessages gets a reference to the given []map[string]string and assigns it to the Messages field. +func (o *PromptConfig) SetMessages(v []map[string]string) { + o.Messages = v +} + +// GetTemperature returns the Temperature field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetTemperature() float32 { + if o == nil || IsNil(o.Temperature.Get()) { + var ret float32 + return ret + } + return *o.Temperature.Get() +} + +// GetTemperatureOk returns a tuple with the Temperature field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetTemperatureOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Temperature.Get(), o.Temperature.IsSet() +} + +// HasTemperature returns a boolean if a field has been set. +func (o *PromptConfig) HasTemperature() bool { + if o != nil && o.Temperature.IsSet() { + return true + } + + return false +} + +// SetTemperature gets a reference to the given NullableFloat32 and assigns it to the Temperature field. +func (o *PromptConfig) SetTemperature(v float32) { + o.Temperature.Set(&v) +} + +// SetTemperatureNil sets the value for Temperature to be an explicit nil +func (o *PromptConfig) SetTemperatureNil() { + o.Temperature.Set(nil) +} + +// UnsetTemperature ensures that no value is present for Temperature, not even an explicit nil +func (o *PromptConfig) UnsetTemperature() { + o.Temperature.Unset() +} + +// GetFrequencyPenalty returns the FrequencyPenalty field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetFrequencyPenalty() float32 { + if o == nil || IsNil(o.FrequencyPenalty.Get()) { + var ret float32 + return ret + } + return *o.FrequencyPenalty.Get() +} + +// GetFrequencyPenaltyOk returns a tuple with the FrequencyPenalty field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetFrequencyPenaltyOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.FrequencyPenalty.Get(), o.FrequencyPenalty.IsSet() +} + +// HasFrequencyPenalty returns a boolean if a field has been set. +func (o *PromptConfig) HasFrequencyPenalty() bool { + if o != nil && o.FrequencyPenalty.IsSet() { + return true + } + + return false +} + +// SetFrequencyPenalty gets a reference to the given NullableFloat32 and assigns it to the FrequencyPenalty field. +func (o *PromptConfig) SetFrequencyPenalty(v float32) { + o.FrequencyPenalty.Set(&v) +} + +// SetFrequencyPenaltyNil sets the value for FrequencyPenalty to be an explicit nil +func (o *PromptConfig) SetFrequencyPenaltyNil() { + o.FrequencyPenalty.Set(nil) +} + +// UnsetFrequencyPenalty ensures that no value is present for FrequencyPenalty, not even an explicit nil +func (o *PromptConfig) UnsetFrequencyPenalty() { + o.FrequencyPenalty.Unset() +} + +// GetPresencePenalty returns the PresencePenalty field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetPresencePenalty() float32 { + if o == nil || IsNil(o.PresencePenalty.Get()) { + var ret float32 + return ret + } + return *o.PresencePenalty.Get() +} + +// GetPresencePenaltyOk returns a tuple with the PresencePenalty field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetPresencePenaltyOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.PresencePenalty.Get(), o.PresencePenalty.IsSet() +} + +// HasPresencePenalty returns a boolean if a field has been set. +func (o *PromptConfig) HasPresencePenalty() bool { + if o != nil && o.PresencePenalty.IsSet() { + return true + } + + return false +} + +// SetPresencePenalty gets a reference to the given NullableFloat32 and assigns it to the PresencePenalty field. +func (o *PromptConfig) SetPresencePenalty(v float32) { + o.PresencePenalty.Set(&v) +} + +// SetPresencePenaltyNil sets the value for PresencePenalty to be an explicit nil +func (o *PromptConfig) SetPresencePenaltyNil() { + o.PresencePenalty.Set(nil) +} + +// UnsetPresencePenalty ensures that no value is present for PresencePenalty, not even an explicit nil +func (o *PromptConfig) UnsetPresencePenalty() { + o.PresencePenalty.Unset() +} + +// GetMaxTokens returns the MaxTokens field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetMaxTokens() int32 { + if o == nil || IsNil(o.MaxTokens.Get()) { + var ret int32 + return ret + } + return *o.MaxTokens.Get() +} + +// GetMaxTokensOk returns a tuple with the MaxTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetMaxTokensOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.MaxTokens.Get(), o.MaxTokens.IsSet() +} + +// HasMaxTokens returns a boolean if a field has been set. +func (o *PromptConfig) HasMaxTokens() bool { + if o != nil && o.MaxTokens.IsSet() { + return true + } + + return false +} + +// SetMaxTokens gets a reference to the given NullableInt32 and assigns it to the MaxTokens field. +func (o *PromptConfig) SetMaxTokens(v int32) { + o.MaxTokens.Set(&v) +} + +// SetMaxTokensNil sets the value for MaxTokens to be an explicit nil +func (o *PromptConfig) SetMaxTokensNil() { + o.MaxTokens.Set(nil) +} + +// UnsetMaxTokens ensures that no value is present for MaxTokens, not even an explicit nil +func (o *PromptConfig) UnsetMaxTokens() { + o.MaxTokens.Unset() +} + +// GetTopP returns the TopP field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetTopP() float32 { + if o == nil || IsNil(o.TopP.Get()) { + var ret float32 + return ret + } + return *o.TopP.Get() +} + +// GetTopPOk returns a tuple with the TopP field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetTopPOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.TopP.Get(), o.TopP.IsSet() +} + +// HasTopP returns a boolean if a field has been set. +func (o *PromptConfig) HasTopP() bool { + if o != nil && o.TopP.IsSet() { + return true + } + + return false +} + +// SetTopP gets a reference to the given NullableFloat32 and assigns it to the TopP field. +func (o *PromptConfig) SetTopP(v float32) { + o.TopP.Set(&v) +} + +// SetTopPNil sets the value for TopP to be an explicit nil +func (o *PromptConfig) SetTopPNil() { + o.TopP.Set(nil) +} + +// UnsetTopP ensures that no value is present for TopP, not even an explicit nil +func (o *PromptConfig) UnsetTopP() { + o.TopP.Unset() +} + +// GetResponseFormat returns the ResponseFormat field value if set, zero value otherwise. +func (o *PromptConfig) GetResponseFormat() map[string]interface{} { + if o == nil || IsNil(o.ResponseFormat) { + var ret map[string]interface{} + return ret + } + return o.ResponseFormat +} + +// GetResponseFormatOk returns a tuple with the ResponseFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfig) GetResponseFormatOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ResponseFormat) { + return map[string]interface{}{}, false + } + return o.ResponseFormat, true +} + +// HasResponseFormat returns a boolean if a field has been set. +func (o *PromptConfig) HasResponseFormat() bool { + if o != nil && !IsNil(o.ResponseFormat) { + return true + } + + return false +} + +// SetResponseFormat gets a reference to the given map[string]interface{} and assigns it to the ResponseFormat field. +func (o *PromptConfig) SetResponseFormat(v map[string]interface{}) { + o.ResponseFormat = v +} + +// GetToolChoice returns the ToolChoice field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetToolChoice() string { + if o == nil || IsNil(o.ToolChoice.Get()) { + var ret string + return ret + } + return *o.ToolChoice.Get() +} + +// GetToolChoiceOk returns a tuple with the ToolChoice field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetToolChoiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ToolChoice.Get(), o.ToolChoice.IsSet() +} + +// HasToolChoice returns a boolean if a field has been set. +func (o *PromptConfig) HasToolChoice() bool { + if o != nil && o.ToolChoice.IsSet() { + return true + } + + return false +} + +// SetToolChoice gets a reference to the given NullableString and assigns it to the ToolChoice field. +func (o *PromptConfig) SetToolChoice(v string) { + o.ToolChoice.Set(&v) +} + +// SetToolChoiceNil sets the value for ToolChoice to be an explicit nil +func (o *PromptConfig) SetToolChoiceNil() { + o.ToolChoice.Set(nil) +} + +// UnsetToolChoice ensures that no value is present for ToolChoice, not even an explicit nil +func (o *PromptConfig) UnsetToolChoice() { + o.ToolChoice.Unset() +} + +// GetTools returns the Tools field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetTools() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + return o.Tools +} + +// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetToolsOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.Tools) { + return nil, false + } + return o.Tools, true +} + +// HasTools returns a boolean if a field has been set. +func (o *PromptConfig) HasTools() bool { + if o != nil && !IsNil(o.Tools) { + return true + } + + return false +} + +// SetTools gets a reference to the given []map[string]string and assigns it to the Tools field. +func (o *PromptConfig) SetTools(v []map[string]string) { + o.Tools = v +} + +// GetOutputFormat returns the OutputFormat field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetOutputFormat() string { + if o == nil || IsNil(o.OutputFormat.Get()) { + var ret string + return ret + } + return *o.OutputFormat.Get() +} + +// GetOutputFormatOk returns a tuple with the OutputFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetOutputFormatOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OutputFormat.Get(), o.OutputFormat.IsSet() +} + +// HasOutputFormat returns a boolean if a field has been set. +func (o *PromptConfig) HasOutputFormat() bool { + if o != nil && o.OutputFormat.IsSet() { + return true + } + + return false +} + +// SetOutputFormat gets a reference to the given NullableString and assigns it to the OutputFormat field. +func (o *PromptConfig) SetOutputFormat(v string) { + o.OutputFormat.Set(&v) +} + +// SetOutputFormatNil sets the value for OutputFormat to be an explicit nil +func (o *PromptConfig) SetOutputFormatNil() { + o.OutputFormat.Set(nil) +} + +// UnsetOutputFormat ensures that no value is present for OutputFormat, not even an explicit nil +func (o *PromptConfig) UnsetOutputFormat() { + o.OutputFormat.Unset() +} + +// GetConcurrency returns the Concurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfig) GetConcurrency() int32 { + if o == nil || IsNil(o.Concurrency.Get()) { + var ret int32 + return ret + } + return *o.Concurrency.Get() +} + +// GetConcurrencyOk returns a tuple with the Concurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfig) GetConcurrencyOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Concurrency.Get(), o.Concurrency.IsSet() +} + +// HasConcurrency returns a boolean if a field has been set. +func (o *PromptConfig) HasConcurrency() bool { + if o != nil && o.Concurrency.IsSet() { + return true + } + + return false +} + +// SetConcurrency gets a reference to the given NullableInt32 and assigns it to the Concurrency field. +func (o *PromptConfig) SetConcurrency(v int32) { + o.Concurrency.Set(&v) +} + +// SetConcurrencyNil sets the value for Concurrency to be an explicit nil +func (o *PromptConfig) SetConcurrencyNil() { + o.Concurrency.Set(nil) +} + +// UnsetConcurrency ensures that no value is present for Concurrency, not even an explicit nil +func (o *PromptConfig) UnsetConcurrency() { + o.Concurrency.Unset() +} + +func (o PromptConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.RunPromptConfig) { + toSerialize["run_prompt_config"] = o.RunPromptConfig + } + if !IsNil(o.Messages) { + toSerialize["messages"] = o.Messages + } + if o.Temperature.IsSet() { + toSerialize["temperature"] = o.Temperature.Get() + } + if o.FrequencyPenalty.IsSet() { + toSerialize["frequency_penalty"] = o.FrequencyPenalty.Get() + } + if o.PresencePenalty.IsSet() { + toSerialize["presence_penalty"] = o.PresencePenalty.Get() + } + if o.MaxTokens.IsSet() { + toSerialize["max_tokens"] = o.MaxTokens.Get() + } + if o.TopP.IsSet() { + toSerialize["top_p"] = o.TopP.Get() + } + if !IsNil(o.ResponseFormat) { + toSerialize["response_format"] = o.ResponseFormat + } + if o.ToolChoice.IsSet() { + toSerialize["tool_choice"] = o.ToolChoice.Get() + } + if o.Tools != nil { + toSerialize["tools"] = o.Tools + } + if o.OutputFormat.IsSet() { + toSerialize["output_format"] = o.OutputFormat.Get() + } + if o.Concurrency.IsSet() { + toSerialize["concurrency"] = o.Concurrency.Get() + } + return toSerialize, nil +} + +type NullablePromptConfig struct { + value *PromptConfig + isSet bool +} + +func (v NullablePromptConfig) Get() *PromptConfig { + return v.value +} + +func (v *NullablePromptConfig) Set(val *PromptConfig) { + v.value = val + v.isSet = true +} + +func (v NullablePromptConfig) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptConfig(val *PromptConfig) *NullablePromptConfig { + return &NullablePromptConfig{value: val, isSet: true} +} + +func (v NullablePromptConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_config_entry.go b/go/futureagi/model_prompt_config_entry.go new file mode 100644 index 0000000..0a194ee --- /dev/null +++ b/go/futureagi/model_prompt_config_entry.go @@ -0,0 +1,591 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PromptConfigEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptConfigEntry{} + +// PromptConfigEntry struct for PromptConfigEntry +type PromptConfigEntry struct { + Id NullableString `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PromptId NullableString `json:"prompt_id,omitempty"` + PromptVersion NullableString `json:"prompt_version,omitempty"` + AgentId NullableString `json:"agent_id,omitempty"` + AgentVersion NullableString `json:"agent_version,omitempty"` + Model map[string]interface{} `json:"model,omitempty"` + ModelParams *map[string]string `json:"model_params,omitempty"` + Configuration *map[string]string `json:"configuration,omitempty"` + OutputFormat *string `json:"output_format,omitempty"` + Messages []map[string]string `json:"messages,omitempty"` + VoiceInputColumnId NullableString `json:"voice_input_column_id,omitempty"` +} + +// NewPromptConfigEntry instantiates a new PromptConfigEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptConfigEntry() *PromptConfigEntry { + this := PromptConfigEntry{} + var outputFormat string = "string" + this.OutputFormat = &outputFormat + return &this +} + +// NewPromptConfigEntryWithDefaults instantiates a new PromptConfigEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptConfigEntryWithDefaults() *PromptConfigEntry { + this := PromptConfigEntry{} + var outputFormat string = "string" + this.OutputFormat = &outputFormat + return &this +} + +// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfigEntry) GetId() string { + if o == nil || IsNil(o.Id.Get()) { + var ret string + return ret + } + return *o.Id.Get() +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfigEntry) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id.Get(), o.Id.IsSet() +} + +// HasId returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasId() bool { + if o != nil && o.Id.IsSet() { + return true + } + + return false +} + +// SetId gets a reference to the given NullableString and assigns it to the Id field. +func (o *PromptConfigEntry) SetId(v string) { + o.Id.Set(&v) +} + +// SetIdNil sets the value for Id to be an explicit nil +func (o *PromptConfigEntry) SetIdNil() { + o.Id.Set(nil) +} + +// UnsetId ensures that no value is present for Id, not even an explicit nil +func (o *PromptConfigEntry) UnsetId() { + o.Id.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PromptConfigEntry) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfigEntry) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PromptConfigEntry) SetName(v string) { + o.Name = &v +} + +// GetPromptId returns the PromptId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfigEntry) GetPromptId() string { + if o == nil || IsNil(o.PromptId.Get()) { + var ret string + return ret + } + return *o.PromptId.Get() +} + +// GetPromptIdOk returns a tuple with the PromptId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfigEntry) GetPromptIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptId.Get(), o.PromptId.IsSet() +} + +// HasPromptId returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasPromptId() bool { + if o != nil && o.PromptId.IsSet() { + return true + } + + return false +} + +// SetPromptId gets a reference to the given NullableString and assigns it to the PromptId field. +func (o *PromptConfigEntry) SetPromptId(v string) { + o.PromptId.Set(&v) +} + +// SetPromptIdNil sets the value for PromptId to be an explicit nil +func (o *PromptConfigEntry) SetPromptIdNil() { + o.PromptId.Set(nil) +} + +// UnsetPromptId ensures that no value is present for PromptId, not even an explicit nil +func (o *PromptConfigEntry) UnsetPromptId() { + o.PromptId.Unset() +} + +// GetPromptVersion returns the PromptVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfigEntry) GetPromptVersion() string { + if o == nil || IsNil(o.PromptVersion.Get()) { + var ret string + return ret + } + return *o.PromptVersion.Get() +} + +// GetPromptVersionOk returns a tuple with the PromptVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfigEntry) GetPromptVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptVersion.Get(), o.PromptVersion.IsSet() +} + +// HasPromptVersion returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasPromptVersion() bool { + if o != nil && o.PromptVersion.IsSet() { + return true + } + + return false +} + +// SetPromptVersion gets a reference to the given NullableString and assigns it to the PromptVersion field. +func (o *PromptConfigEntry) SetPromptVersion(v string) { + o.PromptVersion.Set(&v) +} + +// SetPromptVersionNil sets the value for PromptVersion to be an explicit nil +func (o *PromptConfigEntry) SetPromptVersionNil() { + o.PromptVersion.Set(nil) +} + +// UnsetPromptVersion ensures that no value is present for PromptVersion, not even an explicit nil +func (o *PromptConfigEntry) UnsetPromptVersion() { + o.PromptVersion.Unset() +} + +// GetAgentId returns the AgentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfigEntry) GetAgentId() string { + if o == nil || IsNil(o.AgentId.Get()) { + var ret string + return ret + } + return *o.AgentId.Get() +} + +// GetAgentIdOk returns a tuple with the AgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfigEntry) GetAgentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentId.Get(), o.AgentId.IsSet() +} + +// HasAgentId returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasAgentId() bool { + if o != nil && o.AgentId.IsSet() { + return true + } + + return false +} + +// SetAgentId gets a reference to the given NullableString and assigns it to the AgentId field. +func (o *PromptConfigEntry) SetAgentId(v string) { + o.AgentId.Set(&v) +} + +// SetAgentIdNil sets the value for AgentId to be an explicit nil +func (o *PromptConfigEntry) SetAgentIdNil() { + o.AgentId.Set(nil) +} + +// UnsetAgentId ensures that no value is present for AgentId, not even an explicit nil +func (o *PromptConfigEntry) UnsetAgentId() { + o.AgentId.Unset() +} + +// GetAgentVersion returns the AgentVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfigEntry) GetAgentVersion() string { + if o == nil || IsNil(o.AgentVersion.Get()) { + var ret string + return ret + } + return *o.AgentVersion.Get() +} + +// GetAgentVersionOk returns a tuple with the AgentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfigEntry) GetAgentVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentVersion.Get(), o.AgentVersion.IsSet() +} + +// HasAgentVersion returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasAgentVersion() bool { + if o != nil && o.AgentVersion.IsSet() { + return true + } + + return false +} + +// SetAgentVersion gets a reference to the given NullableString and assigns it to the AgentVersion field. +func (o *PromptConfigEntry) SetAgentVersion(v string) { + o.AgentVersion.Set(&v) +} + +// SetAgentVersionNil sets the value for AgentVersion to be an explicit nil +func (o *PromptConfigEntry) SetAgentVersionNil() { + o.AgentVersion.Set(nil) +} + +// UnsetAgentVersion ensures that no value is present for AgentVersion, not even an explicit nil +func (o *PromptConfigEntry) UnsetAgentVersion() { + o.AgentVersion.Unset() +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *PromptConfigEntry) GetModel() map[string]interface{} { + if o == nil || IsNil(o.Model) { + var ret map[string]interface{} + return ret + } + return o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfigEntry) GetModelOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Model) { + return map[string]interface{}{}, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given map[string]interface{} and assigns it to the Model field. +func (o *PromptConfigEntry) SetModel(v map[string]interface{}) { + o.Model = v +} + +// GetModelParams returns the ModelParams field value if set, zero value otherwise. +func (o *PromptConfigEntry) GetModelParams() map[string]string { + if o == nil || IsNil(o.ModelParams) { + var ret map[string]string + return ret + } + return *o.ModelParams +} + +// GetModelParamsOk returns a tuple with the ModelParams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfigEntry) GetModelParamsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.ModelParams) { + return nil, false + } + return o.ModelParams, true +} + +// HasModelParams returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasModelParams() bool { + if o != nil && !IsNil(o.ModelParams) { + return true + } + + return false +} + +// SetModelParams gets a reference to the given map[string]string and assigns it to the ModelParams field. +func (o *PromptConfigEntry) SetModelParams(v map[string]string) { + o.ModelParams = &v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *PromptConfigEntry) GetConfiguration() map[string]string { + if o == nil || IsNil(o.Configuration) { + var ret map[string]string + return ret + } + return *o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfigEntry) GetConfigurationOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Configuration) { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given map[string]string and assigns it to the Configuration field. +func (o *PromptConfigEntry) SetConfiguration(v map[string]string) { + o.Configuration = &v +} + +// GetOutputFormat returns the OutputFormat field value if set, zero value otherwise. +func (o *PromptConfigEntry) GetOutputFormat() string { + if o == nil || IsNil(o.OutputFormat) { + var ret string + return ret + } + return *o.OutputFormat +} + +// GetOutputFormatOk returns a tuple with the OutputFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfigEntry) GetOutputFormatOk() (*string, bool) { + if o == nil || IsNil(o.OutputFormat) { + return nil, false + } + return o.OutputFormat, true +} + +// HasOutputFormat returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasOutputFormat() bool { + if o != nil && !IsNil(o.OutputFormat) { + return true + } + + return false +} + +// SetOutputFormat gets a reference to the given string and assigns it to the OutputFormat field. +func (o *PromptConfigEntry) SetOutputFormat(v string) { + o.OutputFormat = &v +} + +// GetMessages returns the Messages field value if set, zero value otherwise. +func (o *PromptConfigEntry) GetMessages() []map[string]string { + if o == nil || IsNil(o.Messages) { + var ret []map[string]string + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptConfigEntry) GetMessagesOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.Messages) { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasMessages() bool { + if o != nil && !IsNil(o.Messages) { + return true + } + + return false +} + +// SetMessages gets a reference to the given []map[string]string and assigns it to the Messages field. +func (o *PromptConfigEntry) SetMessages(v []map[string]string) { + o.Messages = v +} + +// GetVoiceInputColumnId returns the VoiceInputColumnId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptConfigEntry) GetVoiceInputColumnId() string { + if o == nil || IsNil(o.VoiceInputColumnId.Get()) { + var ret string + return ret + } + return *o.VoiceInputColumnId.Get() +} + +// GetVoiceInputColumnIdOk returns a tuple with the VoiceInputColumnId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptConfigEntry) GetVoiceInputColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.VoiceInputColumnId.Get(), o.VoiceInputColumnId.IsSet() +} + +// HasVoiceInputColumnId returns a boolean if a field has been set. +func (o *PromptConfigEntry) HasVoiceInputColumnId() bool { + if o != nil && o.VoiceInputColumnId.IsSet() { + return true + } + + return false +} + +// SetVoiceInputColumnId gets a reference to the given NullableString and assigns it to the VoiceInputColumnId field. +func (o *PromptConfigEntry) SetVoiceInputColumnId(v string) { + o.VoiceInputColumnId.Set(&v) +} + +// SetVoiceInputColumnIdNil sets the value for VoiceInputColumnId to be an explicit nil +func (o *PromptConfigEntry) SetVoiceInputColumnIdNil() { + o.VoiceInputColumnId.Set(nil) +} + +// UnsetVoiceInputColumnId ensures that no value is present for VoiceInputColumnId, not even an explicit nil +func (o *PromptConfigEntry) UnsetVoiceInputColumnId() { + o.VoiceInputColumnId.Unset() +} + +func (o PromptConfigEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptConfigEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Id.IsSet() { + toSerialize["id"] = o.Id.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.PromptId.IsSet() { + toSerialize["prompt_id"] = o.PromptId.Get() + } + if o.PromptVersion.IsSet() { + toSerialize["prompt_version"] = o.PromptVersion.Get() + } + if o.AgentId.IsSet() { + toSerialize["agent_id"] = o.AgentId.Get() + } + if o.AgentVersion.IsSet() { + toSerialize["agent_version"] = o.AgentVersion.Get() + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.ModelParams) { + toSerialize["model_params"] = o.ModelParams + } + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + if !IsNil(o.OutputFormat) { + toSerialize["output_format"] = o.OutputFormat + } + if !IsNil(o.Messages) { + toSerialize["messages"] = o.Messages + } + if o.VoiceInputColumnId.IsSet() { + toSerialize["voice_input_column_id"] = o.VoiceInputColumnId.Get() + } + return toSerialize, nil +} + +type NullablePromptConfigEntry struct { + value *PromptConfigEntry + isSet bool +} + +func (v NullablePromptConfigEntry) Get() *PromptConfigEntry { + return v.value +} + +func (v *NullablePromptConfigEntry) Set(val *PromptConfigEntry) { + v.value = val + v.isSet = true +} + +func (v NullablePromptConfigEntry) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptConfigEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptConfigEntry(val *PromptConfigEntry) *NullablePromptConfigEntry { + return &NullablePromptConfigEntry{value: val, isSet: true} +} + +func (v NullablePromptConfigEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptConfigEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_derived_variables_response.go b/go/futureagi/model_prompt_derived_variables_response.go new file mode 100644 index 0000000..8dfcab6 --- /dev/null +++ b/go/futureagi/model_prompt_derived_variables_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PromptDerivedVariablesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptDerivedVariablesResponse{} + +// PromptDerivedVariablesResponse struct for PromptDerivedVariablesResponse +type PromptDerivedVariablesResponse struct { + Status bool `json:"status"` + Result PromptDerivedVariablesResult `json:"result"` +} + +type _PromptDerivedVariablesResponse PromptDerivedVariablesResponse + +// NewPromptDerivedVariablesResponse instantiates a new PromptDerivedVariablesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptDerivedVariablesResponse(status bool, result PromptDerivedVariablesResult) *PromptDerivedVariablesResponse { + this := PromptDerivedVariablesResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewPromptDerivedVariablesResponseWithDefaults instantiates a new PromptDerivedVariablesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptDerivedVariablesResponseWithDefaults() *PromptDerivedVariablesResponse { + this := PromptDerivedVariablesResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *PromptDerivedVariablesResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *PromptDerivedVariablesResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *PromptDerivedVariablesResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *PromptDerivedVariablesResponse) GetResult() PromptDerivedVariablesResult { + if o == nil { + var ret PromptDerivedVariablesResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *PromptDerivedVariablesResponse) GetResultOk() (*PromptDerivedVariablesResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *PromptDerivedVariablesResponse) SetResult(v PromptDerivedVariablesResult) { + o.Result = v +} + +func (o PromptDerivedVariablesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptDerivedVariablesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *PromptDerivedVariablesResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptDerivedVariablesResponse := _PromptDerivedVariablesResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptDerivedVariablesResponse) + + if err != nil { + return err + } + + *o = PromptDerivedVariablesResponse(varPromptDerivedVariablesResponse) + + return err +} + +type NullablePromptDerivedVariablesResponse struct { + value *PromptDerivedVariablesResponse + isSet bool +} + +func (v NullablePromptDerivedVariablesResponse) Get() *PromptDerivedVariablesResponse { + return v.value +} + +func (v *NullablePromptDerivedVariablesResponse) Set(val *PromptDerivedVariablesResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePromptDerivedVariablesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptDerivedVariablesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptDerivedVariablesResponse(val *PromptDerivedVariablesResponse) *NullablePromptDerivedVariablesResponse { + return &NullablePromptDerivedVariablesResponse{value: val, isSet: true} +} + +func (v NullablePromptDerivedVariablesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptDerivedVariablesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_derived_variables_result.go b/go/futureagi/model_prompt_derived_variables_result.go new file mode 100644 index 0000000..582c72c --- /dev/null +++ b/go/futureagi/model_prompt_derived_variables_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PromptDerivedVariablesResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptDerivedVariablesResult{} + +// PromptDerivedVariablesResult struct for PromptDerivedVariablesResult +type PromptDerivedVariablesResult struct { + Version string `json:"version"` + DerivedVariables map[string][]string `json:"derived_variables"` +} + +type _PromptDerivedVariablesResult PromptDerivedVariablesResult + +// NewPromptDerivedVariablesResult instantiates a new PromptDerivedVariablesResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptDerivedVariablesResult(version string, derivedVariables map[string][]string) *PromptDerivedVariablesResult { + this := PromptDerivedVariablesResult{} + this.Version = version + this.DerivedVariables = derivedVariables + return &this +} + +// NewPromptDerivedVariablesResultWithDefaults instantiates a new PromptDerivedVariablesResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptDerivedVariablesResultWithDefaults() *PromptDerivedVariablesResult { + this := PromptDerivedVariablesResult{} + return &this +} + +// GetVersion returns the Version field value +func (o *PromptDerivedVariablesResult) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *PromptDerivedVariablesResult) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *PromptDerivedVariablesResult) SetVersion(v string) { + o.Version = v +} + +// GetDerivedVariables returns the DerivedVariables field value +func (o *PromptDerivedVariablesResult) GetDerivedVariables() map[string][]string { + if o == nil { + var ret map[string][]string + return ret + } + + return o.DerivedVariables +} + +// GetDerivedVariablesOk returns a tuple with the DerivedVariables field value +// and a boolean to check if the value has been set. +func (o *PromptDerivedVariablesResult) GetDerivedVariablesOk() (*map[string][]string, bool) { + if o == nil { + return nil, false + } + return &o.DerivedVariables, true +} + +// SetDerivedVariables sets field value +func (o *PromptDerivedVariablesResult) SetDerivedVariables(v map[string][]string) { + o.DerivedVariables = v +} + +func (o PromptDerivedVariablesResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptDerivedVariablesResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["version"] = o.Version + toSerialize["derived_variables"] = o.DerivedVariables + return toSerialize, nil +} + +func (o *PromptDerivedVariablesResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "version", + "derived_variables", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptDerivedVariablesResult := _PromptDerivedVariablesResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptDerivedVariablesResult) + + if err != nil { + return err + } + + *o = PromptDerivedVariablesResult(varPromptDerivedVariablesResult) + + return err +} + +type NullablePromptDerivedVariablesResult struct { + value *PromptDerivedVariablesResult + isSet bool +} + +func (v NullablePromptDerivedVariablesResult) Get() *PromptDerivedVariablesResult { + return v.value +} + +func (v *NullablePromptDerivedVariablesResult) Set(val *PromptDerivedVariablesResult) { + v.value = val + v.isSet = true +} + +func (v NullablePromptDerivedVariablesResult) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptDerivedVariablesResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptDerivedVariablesResult(val *PromptDerivedVariablesResult) *NullablePromptDerivedVariablesResult { + return &NullablePromptDerivedVariablesResult{value: val, isSet: true} +} + +func (v NullablePromptDerivedVariablesResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptDerivedVariablesResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_history_execution.go b/go/futureagi/model_prompt_history_execution.go new file mode 100644 index 0000000..2cc0aab --- /dev/null +++ b/go/futureagi/model_prompt_history_execution.go @@ -0,0 +1,803 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PromptHistoryExecution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptHistoryExecution{} + +// PromptHistoryExecution struct for PromptHistoryExecution +type PromptHistoryExecution struct { + Id *string `json:"id,omitempty"` + TemplateVersion string `json:"template_version"` + Output map[string]interface{} `json:"output,omitempty"` + PromptConfigSnapshot *string `json:"prompt_config_snapshot,omitempty"` + TemplateName *string `json:"template_name,omitempty"` + OriginalTemplate NullableString `json:"original_template,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + VariableNames *string `json:"variable_names,omitempty"` + EvaluationResults map[string]interface{} `json:"evaluation_results,omitempty"` + EvaluationConfigs map[string]interface{} `json:"evaluation_configs,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` + CommitMessage NullableString `json:"commit_message,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + IsDraft *bool `json:"is_draft,omitempty"` + Labels *string `json:"labels,omitempty"` + Placeholders map[string]interface{} `json:"placeholders,omitempty"` + PromptBaseTemplate NullableString `json:"prompt_base_template,omitempty"` +} + +type _PromptHistoryExecution PromptHistoryExecution + +// NewPromptHistoryExecution instantiates a new PromptHistoryExecution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptHistoryExecution(templateVersion string) *PromptHistoryExecution { + this := PromptHistoryExecution{} + this.TemplateVersion = templateVersion + return &this +} + +// NewPromptHistoryExecutionWithDefaults instantiates a new PromptHistoryExecution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptHistoryExecutionWithDefaults() *PromptHistoryExecution { + this := PromptHistoryExecution{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PromptHistoryExecution) SetId(v string) { + o.Id = &v +} + +// GetTemplateVersion returns the TemplateVersion field value +func (o *PromptHistoryExecution) GetTemplateVersion() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateVersion +} + +// GetTemplateVersionOk returns a tuple with the TemplateVersion field value +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetTemplateVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateVersion, true +} + +// SetTemplateVersion sets field value +func (o *PromptHistoryExecution) SetTemplateVersion(v string) { + o.TemplateVersion = v +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetOutput() map[string]interface{} { + if o == nil || IsNil(o.Output) { + var ret map[string]interface{} + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetOutputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Output) { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given map[string]interface{} and assigns it to the Output field. +func (o *PromptHistoryExecution) SetOutput(v map[string]interface{}) { + o.Output = v +} + +// GetPromptConfigSnapshot returns the PromptConfigSnapshot field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetPromptConfigSnapshot() string { + if o == nil || IsNil(o.PromptConfigSnapshot) { + var ret string + return ret + } + return *o.PromptConfigSnapshot +} + +// GetPromptConfigSnapshotOk returns a tuple with the PromptConfigSnapshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetPromptConfigSnapshotOk() (*string, bool) { + if o == nil || IsNil(o.PromptConfigSnapshot) { + return nil, false + } + return o.PromptConfigSnapshot, true +} + +// HasPromptConfigSnapshot returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasPromptConfigSnapshot() bool { + if o != nil && !IsNil(o.PromptConfigSnapshot) { + return true + } + + return false +} + +// SetPromptConfigSnapshot gets a reference to the given string and assigns it to the PromptConfigSnapshot field. +func (o *PromptHistoryExecution) SetPromptConfigSnapshot(v string) { + o.PromptConfigSnapshot = &v +} + +// GetTemplateName returns the TemplateName field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetTemplateName() string { + if o == nil || IsNil(o.TemplateName) { + var ret string + return ret + } + return *o.TemplateName +} + +// GetTemplateNameOk returns a tuple with the TemplateName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetTemplateNameOk() (*string, bool) { + if o == nil || IsNil(o.TemplateName) { + return nil, false + } + return o.TemplateName, true +} + +// HasTemplateName returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasTemplateName() bool { + if o != nil && !IsNil(o.TemplateName) { + return true + } + + return false +} + +// SetTemplateName gets a reference to the given string and assigns it to the TemplateName field. +func (o *PromptHistoryExecution) SetTemplateName(v string) { + o.TemplateName = &v +} + +// GetOriginalTemplate returns the OriginalTemplate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptHistoryExecution) GetOriginalTemplate() string { + if o == nil || IsNil(o.OriginalTemplate.Get()) { + var ret string + return ret + } + return *o.OriginalTemplate.Get() +} + +// GetOriginalTemplateOk returns a tuple with the OriginalTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptHistoryExecution) GetOriginalTemplateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OriginalTemplate.Get(), o.OriginalTemplate.IsSet() +} + +// HasOriginalTemplate returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasOriginalTemplate() bool { + if o != nil && o.OriginalTemplate.IsSet() { + return true + } + + return false +} + +// SetOriginalTemplate gets a reference to the given NullableString and assigns it to the OriginalTemplate field. +func (o *PromptHistoryExecution) SetOriginalTemplate(v string) { + o.OriginalTemplate.Set(&v) +} + +// SetOriginalTemplateNil sets the value for OriginalTemplate to be an explicit nil +func (o *PromptHistoryExecution) SetOriginalTemplateNil() { + o.OriginalTemplate.Set(nil) +} + +// UnsetOriginalTemplate ensures that no value is present for OriginalTemplate, not even an explicit nil +func (o *PromptHistoryExecution) UnsetOriginalTemplate() { + o.OriginalTemplate.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *PromptHistoryExecution) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetVariableNames returns the VariableNames field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetVariableNames() string { + if o == nil || IsNil(o.VariableNames) { + var ret string + return ret + } + return *o.VariableNames +} + +// GetVariableNamesOk returns a tuple with the VariableNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetVariableNamesOk() (*string, bool) { + if o == nil || IsNil(o.VariableNames) { + return nil, false + } + return o.VariableNames, true +} + +// HasVariableNames returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasVariableNames() bool { + if o != nil && !IsNil(o.VariableNames) { + return true + } + + return false +} + +// SetVariableNames gets a reference to the given string and assigns it to the VariableNames field. +func (o *PromptHistoryExecution) SetVariableNames(v string) { + o.VariableNames = &v +} + +// GetEvaluationResults returns the EvaluationResults field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetEvaluationResults() map[string]interface{} { + if o == nil || IsNil(o.EvaluationResults) { + var ret map[string]interface{} + return ret + } + return o.EvaluationResults +} + +// GetEvaluationResultsOk returns a tuple with the EvaluationResults field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetEvaluationResultsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvaluationResults) { + return map[string]interface{}{}, false + } + return o.EvaluationResults, true +} + +// HasEvaluationResults returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasEvaluationResults() bool { + if o != nil && !IsNil(o.EvaluationResults) { + return true + } + + return false +} + +// SetEvaluationResults gets a reference to the given map[string]interface{} and assigns it to the EvaluationResults field. +func (o *PromptHistoryExecution) SetEvaluationResults(v map[string]interface{}) { + o.EvaluationResults = v +} + +// GetEvaluationConfigs returns the EvaluationConfigs field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetEvaluationConfigs() map[string]interface{} { + if o == nil || IsNil(o.EvaluationConfigs) { + var ret map[string]interface{} + return ret + } + return o.EvaluationConfigs +} + +// GetEvaluationConfigsOk returns a tuple with the EvaluationConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetEvaluationConfigsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvaluationConfigs) { + return map[string]interface{}{}, false + } + return o.EvaluationConfigs, true +} + +// HasEvaluationConfigs returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasEvaluationConfigs() bool { + if o != nil && !IsNil(o.EvaluationConfigs) { + return true + } + + return false +} + +// SetEvaluationConfigs gets a reference to the given map[string]interface{} and assigns it to the EvaluationConfigs field. +func (o *PromptHistoryExecution) SetEvaluationConfigs(v map[string]interface{}) { + o.EvaluationConfigs = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PromptHistoryExecution) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *PromptHistoryExecution) SetIsDefault(v bool) { + o.IsDefault = &v +} + +// GetCommitMessage returns the CommitMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptHistoryExecution) GetCommitMessage() string { + if o == nil || IsNil(o.CommitMessage.Get()) { + var ret string + return ret + } + return *o.CommitMessage.Get() +} + +// GetCommitMessageOk returns a tuple with the CommitMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptHistoryExecution) GetCommitMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CommitMessage.Get(), o.CommitMessage.IsSet() +} + +// HasCommitMessage returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasCommitMessage() bool { + if o != nil && o.CommitMessage.IsSet() { + return true + } + + return false +} + +// SetCommitMessage gets a reference to the given NullableString and assigns it to the CommitMessage field. +func (o *PromptHistoryExecution) SetCommitMessage(v string) { + o.CommitMessage.Set(&v) +} + +// SetCommitMessageNil sets the value for CommitMessage to be an explicit nil +func (o *PromptHistoryExecution) SetCommitMessageNil() { + o.CommitMessage.Set(nil) +} + +// UnsetCommitMessage ensures that no value is present for CommitMessage, not even an explicit nil +func (o *PromptHistoryExecution) UnsetCommitMessage() { + o.CommitMessage.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PromptHistoryExecution) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetIsDraft returns the IsDraft field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetIsDraft() bool { + if o == nil || IsNil(o.IsDraft) { + var ret bool + return ret + } + return *o.IsDraft +} + +// GetIsDraftOk returns a tuple with the IsDraft field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetIsDraftOk() (*bool, bool) { + if o == nil || IsNil(o.IsDraft) { + return nil, false + } + return o.IsDraft, true +} + +// HasIsDraft returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasIsDraft() bool { + if o != nil && !IsNil(o.IsDraft) { + return true + } + + return false +} + +// SetIsDraft gets a reference to the given bool and assigns it to the IsDraft field. +func (o *PromptHistoryExecution) SetIsDraft(v bool) { + o.IsDraft = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetLabels() string { + if o == nil || IsNil(o.Labels) { + var ret string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetLabelsOk() (*string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given string and assigns it to the Labels field. +func (o *PromptHistoryExecution) SetLabels(v string) { + o.Labels = &v +} + +// GetPlaceholders returns the Placeholders field value if set, zero value otherwise. +func (o *PromptHistoryExecution) GetPlaceholders() map[string]interface{} { + if o == nil || IsNil(o.Placeholders) { + var ret map[string]interface{} + return ret + } + return o.Placeholders +} + +// GetPlaceholdersOk returns a tuple with the Placeholders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptHistoryExecution) GetPlaceholdersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Placeholders) { + return map[string]interface{}{}, false + } + return o.Placeholders, true +} + +// HasPlaceholders returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasPlaceholders() bool { + if o != nil && !IsNil(o.Placeholders) { + return true + } + + return false +} + +// SetPlaceholders gets a reference to the given map[string]interface{} and assigns it to the Placeholders field. +func (o *PromptHistoryExecution) SetPlaceholders(v map[string]interface{}) { + o.Placeholders = v +} + +// GetPromptBaseTemplate returns the PromptBaseTemplate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptHistoryExecution) GetPromptBaseTemplate() string { + if o == nil || IsNil(o.PromptBaseTemplate.Get()) { + var ret string + return ret + } + return *o.PromptBaseTemplate.Get() +} + +// GetPromptBaseTemplateOk returns a tuple with the PromptBaseTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptHistoryExecution) GetPromptBaseTemplateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptBaseTemplate.Get(), o.PromptBaseTemplate.IsSet() +} + +// HasPromptBaseTemplate returns a boolean if a field has been set. +func (o *PromptHistoryExecution) HasPromptBaseTemplate() bool { + if o != nil && o.PromptBaseTemplate.IsSet() { + return true + } + + return false +} + +// SetPromptBaseTemplate gets a reference to the given NullableString and assigns it to the PromptBaseTemplate field. +func (o *PromptHistoryExecution) SetPromptBaseTemplate(v string) { + o.PromptBaseTemplate.Set(&v) +} + +// SetPromptBaseTemplateNil sets the value for PromptBaseTemplate to be an explicit nil +func (o *PromptHistoryExecution) SetPromptBaseTemplateNil() { + o.PromptBaseTemplate.Set(nil) +} + +// UnsetPromptBaseTemplate ensures that no value is present for PromptBaseTemplate, not even an explicit nil +func (o *PromptHistoryExecution) UnsetPromptBaseTemplate() { + o.PromptBaseTemplate.Unset() +} + +func (o PromptHistoryExecution) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptHistoryExecution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["template_version"] = o.TemplateVersion + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + if !IsNil(o.PromptConfigSnapshot) { + toSerialize["prompt_config_snapshot"] = o.PromptConfigSnapshot + } + if !IsNil(o.TemplateName) { + toSerialize["template_name"] = o.TemplateName + } + if o.OriginalTemplate.IsSet() { + toSerialize["original_template"] = o.OriginalTemplate.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.VariableNames) { + toSerialize["variable_names"] = o.VariableNames + } + if !IsNil(o.EvaluationResults) { + toSerialize["evaluation_results"] = o.EvaluationResults + } + if !IsNil(o.EvaluationConfigs) { + toSerialize["evaluation_configs"] = o.EvaluationConfigs + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + if o.CommitMessage.IsSet() { + toSerialize["commit_message"] = o.CommitMessage.Get() + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.IsDraft) { + toSerialize["is_draft"] = o.IsDraft + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Placeholders) { + toSerialize["placeholders"] = o.Placeholders + } + if o.PromptBaseTemplate.IsSet() { + toSerialize["prompt_base_template"] = o.PromptBaseTemplate.Get() + } + return toSerialize, nil +} + +func (o *PromptHistoryExecution) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptHistoryExecution := _PromptHistoryExecution{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptHistoryExecution) + + if err != nil { + return err + } + + *o = PromptHistoryExecution(varPromptHistoryExecution) + + return err +} + +type NullablePromptHistoryExecution struct { + value *PromptHistoryExecution + isSet bool +} + +func (v NullablePromptHistoryExecution) Get() *PromptHistoryExecution { + return v.value +} + +func (v *NullablePromptHistoryExecution) Set(val *PromptHistoryExecution) { + v.value = val + v.isSet = true +} + +func (v NullablePromptHistoryExecution) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptHistoryExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptHistoryExecution(val *PromptHistoryExecution) *NullablePromptHistoryExecution { + return &NullablePromptHistoryExecution{value: val, isSet: true} +} + +func (v NullablePromptHistoryExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptHistoryExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_label.go b/go/futureagi/model_prompt_label.go new file mode 100644 index 0000000..161e30b --- /dev/null +++ b/go/futureagi/model_prompt_label.go @@ -0,0 +1,366 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the PromptLabel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptLabel{} + +// PromptLabel struct for PromptLabel +type PromptLabel struct { + Id *string `json:"id,omitempty"` + Organization *string `json:"organization,omitempty"` + Name string `json:"name"` + Type string `json:"type"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +type _PromptLabel PromptLabel + +// NewPromptLabel instantiates a new PromptLabel object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptLabel(name string, type_ string) *PromptLabel { + this := PromptLabel{} + this.Name = name + this.Type = type_ + return &this +} + +// NewPromptLabelWithDefaults instantiates a new PromptLabel object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptLabelWithDefaults() *PromptLabel { + this := PromptLabel{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PromptLabel) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptLabel) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PromptLabel) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PromptLabel) SetId(v string) { + o.Id = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *PromptLabel) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptLabel) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *PromptLabel) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *PromptLabel) SetOrganization(v string) { + o.Organization = &v +} + +// GetName returns the Name field value +func (o *PromptLabel) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PromptLabel) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PromptLabel) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *PromptLabel) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PromptLabel) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PromptLabel) SetType(v string) { + o.Type = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *PromptLabel) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptLabel) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *PromptLabel) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *PromptLabel) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PromptLabel) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptLabel) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PromptLabel) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PromptLabel) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PromptLabel) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptLabel) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PromptLabel) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PromptLabel) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o PromptLabel) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptLabel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +func (o *PromptLabel) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptLabel := _PromptLabel{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptLabel) + + if err != nil { + return err + } + + *o = PromptLabel(varPromptLabel) + + return err +} + +type NullablePromptLabel struct { + value *PromptLabel + isSet bool +} + +func (v NullablePromptLabel) Get() *PromptLabel { + return v.value +} + +func (v *NullablePromptLabel) Set(val *PromptLabel) { + v.value = val + v.isSet = true +} + +func (v NullablePromptLabel) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptLabel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptLabel(val *PromptLabel) *NullablePromptLabel { + return &NullablePromptLabel{value: val, isSet: true} +} + +func (v NullablePromptLabel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptLabel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_list_response.go b/go/futureagi/model_prompt_simulation_list_response.go new file mode 100644 index 0000000..714e319 --- /dev/null +++ b/go/futureagi/model_prompt_simulation_list_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PromptSimulationListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationListResponse{} + +// PromptSimulationListResponse struct for PromptSimulationListResponse +type PromptSimulationListResponse struct { + Status *bool `json:"status,omitempty"` + Result PromptSimulationListResult `json:"result"` +} + +type _PromptSimulationListResponse PromptSimulationListResponse + +// NewPromptSimulationListResponse instantiates a new PromptSimulationListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationListResponse(result PromptSimulationListResult) *PromptSimulationListResponse { + this := PromptSimulationListResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewPromptSimulationListResponseWithDefaults instantiates a new PromptSimulationListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationListResponseWithDefaults() *PromptSimulationListResponse { + this := PromptSimulationListResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PromptSimulationListResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationListResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *PromptSimulationListResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *PromptSimulationListResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *PromptSimulationListResponse) GetResult() PromptSimulationListResult { + if o == nil { + var ret PromptSimulationListResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *PromptSimulationListResponse) GetResultOk() (*PromptSimulationListResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *PromptSimulationListResponse) SetResult(v PromptSimulationListResult) { + o.Result = v +} + +func (o PromptSimulationListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *PromptSimulationListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptSimulationListResponse := _PromptSimulationListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptSimulationListResponse) + + if err != nil { + return err + } + + *o = PromptSimulationListResponse(varPromptSimulationListResponse) + + return err +} + +type NullablePromptSimulationListResponse struct { + value *PromptSimulationListResponse + isSet bool +} + +func (v NullablePromptSimulationListResponse) Get() *PromptSimulationListResponse { + return v.value +} + +func (v *NullablePromptSimulationListResponse) Set(val *PromptSimulationListResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationListResponse(val *PromptSimulationListResponse) *NullablePromptSimulationListResponse { + return &NullablePromptSimulationListResponse{value: val, isSet: true} +} + +func (v NullablePromptSimulationListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_list_result.go b/go/futureagi/model_prompt_simulation_list_result.go new file mode 100644 index 0000000..0008fd0 --- /dev/null +++ b/go/futureagi/model_prompt_simulation_list_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PromptSimulationListResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationListResult{} + +// PromptSimulationListResult struct for PromptSimulationListResult +type PromptSimulationListResult struct { + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + Limit *int32 `json:"limit,omitempty"` + Results []RunTestResponse `json:"results,omitempty"` + PromptTemplate *PromptSimulationTemplateSummary `json:"prompt_template,omitempty"` +} + +// NewPromptSimulationListResult instantiates a new PromptSimulationListResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationListResult() *PromptSimulationListResult { + this := PromptSimulationListResult{} + return &this +} + +// NewPromptSimulationListResultWithDefaults instantiates a new PromptSimulationListResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationListResultWithDefaults() *PromptSimulationListResult { + this := PromptSimulationListResult{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PromptSimulationListResult) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationListResult) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PromptSimulationListResult) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PromptSimulationListResult) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PromptSimulationListResult) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationListResult) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PromptSimulationListResult) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *PromptSimulationListResult) SetPage(v int32) { + o.Page = &v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *PromptSimulationListResult) GetLimit() int32 { + if o == nil || IsNil(o.Limit) { + var ret int32 + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationListResult) GetLimitOk() (*int32, bool) { + if o == nil || IsNil(o.Limit) { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *PromptSimulationListResult) HasLimit() bool { + if o != nil && !IsNil(o.Limit) { + return true + } + + return false +} + +// SetLimit gets a reference to the given int32 and assigns it to the Limit field. +func (o *PromptSimulationListResult) SetLimit(v int32) { + o.Limit = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PromptSimulationListResult) GetResults() []RunTestResponse { + if o == nil || IsNil(o.Results) { + var ret []RunTestResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationListResult) GetResultsOk() ([]RunTestResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PromptSimulationListResult) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RunTestResponse and assigns it to the Results field. +func (o *PromptSimulationListResult) SetResults(v []RunTestResponse) { + o.Results = v +} + +// GetPromptTemplate returns the PromptTemplate field value if set, zero value otherwise. +func (o *PromptSimulationListResult) GetPromptTemplate() PromptSimulationTemplateSummary { + if o == nil || IsNil(o.PromptTemplate) { + var ret PromptSimulationTemplateSummary + return ret + } + return *o.PromptTemplate +} + +// GetPromptTemplateOk returns a tuple with the PromptTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationListResult) GetPromptTemplateOk() (*PromptSimulationTemplateSummary, bool) { + if o == nil || IsNil(o.PromptTemplate) { + return nil, false + } + return o.PromptTemplate, true +} + +// HasPromptTemplate returns a boolean if a field has been set. +func (o *PromptSimulationListResult) HasPromptTemplate() bool { + if o != nil && !IsNil(o.PromptTemplate) { + return true + } + + return false +} + +// SetPromptTemplate gets a reference to the given PromptSimulationTemplateSummary and assigns it to the PromptTemplate field. +func (o *PromptSimulationListResult) SetPromptTemplate(v PromptSimulationTemplateSummary) { + o.PromptTemplate = &v +} + +func (o PromptSimulationListResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationListResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.Limit) { + toSerialize["limit"] = o.Limit + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + if !IsNil(o.PromptTemplate) { + toSerialize["prompt_template"] = o.PromptTemplate + } + return toSerialize, nil +} + +type NullablePromptSimulationListResult struct { + value *PromptSimulationListResult + isSet bool +} + +func (v NullablePromptSimulationListResult) Get() *PromptSimulationListResult { + return v.value +} + +func (v *NullablePromptSimulationListResult) Set(val *PromptSimulationListResult) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationListResult) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationListResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationListResult(val *PromptSimulationListResult) *NullablePromptSimulationListResult { + return &NullablePromptSimulationListResult{value: val, isSet: true} +} + +func (v NullablePromptSimulationListResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationListResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_run_response.go b/go/futureagi/model_prompt_simulation_run_response.go new file mode 100644 index 0000000..f10cecd --- /dev/null +++ b/go/futureagi/model_prompt_simulation_run_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PromptSimulationRunResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationRunResponse{} + +// PromptSimulationRunResponse struct for PromptSimulationRunResponse +type PromptSimulationRunResponse struct { + Status *bool `json:"status,omitempty"` + Result RunTestResponse `json:"result"` +} + +type _PromptSimulationRunResponse PromptSimulationRunResponse + +// NewPromptSimulationRunResponse instantiates a new PromptSimulationRunResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationRunResponse(result RunTestResponse) *PromptSimulationRunResponse { + this := PromptSimulationRunResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewPromptSimulationRunResponseWithDefaults instantiates a new PromptSimulationRunResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationRunResponseWithDefaults() *PromptSimulationRunResponse { + this := PromptSimulationRunResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PromptSimulationRunResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationRunResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *PromptSimulationRunResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *PromptSimulationRunResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *PromptSimulationRunResponse) GetResult() RunTestResponse { + if o == nil { + var ret RunTestResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *PromptSimulationRunResponse) GetResultOk() (*RunTestResponse, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *PromptSimulationRunResponse) SetResult(v RunTestResponse) { + o.Result = v +} + +func (o PromptSimulationRunResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationRunResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *PromptSimulationRunResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptSimulationRunResponse := _PromptSimulationRunResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptSimulationRunResponse) + + if err != nil { + return err + } + + *o = PromptSimulationRunResponse(varPromptSimulationRunResponse) + + return err +} + +type NullablePromptSimulationRunResponse struct { + value *PromptSimulationRunResponse + isSet bool +} + +func (v NullablePromptSimulationRunResponse) Get() *PromptSimulationRunResponse { + return v.value +} + +func (v *NullablePromptSimulationRunResponse) Set(val *PromptSimulationRunResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationRunResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationRunResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationRunResponse(val *PromptSimulationRunResponse) *NullablePromptSimulationRunResponse { + return &NullablePromptSimulationRunResponse{value: val, isSet: true} +} + +func (v NullablePromptSimulationRunResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationRunResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_scenario_item.go b/go/futureagi/model_prompt_simulation_scenario_item.go new file mode 100644 index 0000000..351e6ee --- /dev/null +++ b/go/futureagi/model_prompt_simulation_scenario_item.go @@ -0,0 +1,317 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the PromptSimulationScenarioItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationScenarioItem{} + +// PromptSimulationScenarioItem struct for PromptSimulationScenarioItem +type PromptSimulationScenarioItem struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + ScenarioType *string `json:"scenario_type,omitempty"` + DatasetId NullableString `json:"dataset_id,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +// NewPromptSimulationScenarioItem instantiates a new PromptSimulationScenarioItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationScenarioItem() *PromptSimulationScenarioItem { + this := PromptSimulationScenarioItem{} + return &this +} + +// NewPromptSimulationScenarioItemWithDefaults instantiates a new PromptSimulationScenarioItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationScenarioItemWithDefaults() *PromptSimulationScenarioItem { + this := PromptSimulationScenarioItem{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PromptSimulationScenarioItem) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenarioItem) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PromptSimulationScenarioItem) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PromptSimulationScenarioItem) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PromptSimulationScenarioItem) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenarioItem) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PromptSimulationScenarioItem) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PromptSimulationScenarioItem) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PromptSimulationScenarioItem) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenarioItem) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PromptSimulationScenarioItem) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PromptSimulationScenarioItem) SetDescription(v string) { + o.Description = &v +} + +// GetScenarioType returns the ScenarioType field value if set, zero value otherwise. +func (o *PromptSimulationScenarioItem) GetScenarioType() string { + if o == nil || IsNil(o.ScenarioType) { + var ret string + return ret + } + return *o.ScenarioType +} + +// GetScenarioTypeOk returns a tuple with the ScenarioType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenarioItem) GetScenarioTypeOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioType) { + return nil, false + } + return o.ScenarioType, true +} + +// HasScenarioType returns a boolean if a field has been set. +func (o *PromptSimulationScenarioItem) HasScenarioType() bool { + if o != nil && !IsNil(o.ScenarioType) { + return true + } + + return false +} + +// SetScenarioType gets a reference to the given string and assigns it to the ScenarioType field. +func (o *PromptSimulationScenarioItem) SetScenarioType(v string) { + o.ScenarioType = &v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptSimulationScenarioItem) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId.Get()) { + var ret string + return ret + } + return *o.DatasetId.Get() +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptSimulationScenarioItem) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DatasetId.Get(), o.DatasetId.IsSet() +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *PromptSimulationScenarioItem) HasDatasetId() bool { + if o != nil && o.DatasetId.IsSet() { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given NullableString and assigns it to the DatasetId field. +func (o *PromptSimulationScenarioItem) SetDatasetId(v string) { + o.DatasetId.Set(&v) +} + +// SetDatasetIdNil sets the value for DatasetId to be an explicit nil +func (o *PromptSimulationScenarioItem) SetDatasetIdNil() { + o.DatasetId.Set(nil) +} + +// UnsetDatasetId ensures that no value is present for DatasetId, not even an explicit nil +func (o *PromptSimulationScenarioItem) UnsetDatasetId() { + o.DatasetId.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PromptSimulationScenarioItem) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenarioItem) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PromptSimulationScenarioItem) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PromptSimulationScenarioItem) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o PromptSimulationScenarioItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationScenarioItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ScenarioType) { + toSerialize["scenario_type"] = o.ScenarioType + } + if o.DatasetId.IsSet() { + toSerialize["dataset_id"] = o.DatasetId.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +type NullablePromptSimulationScenarioItem struct { + value *PromptSimulationScenarioItem + isSet bool +} + +func (v NullablePromptSimulationScenarioItem) Get() *PromptSimulationScenarioItem { + return v.value +} + +func (v *NullablePromptSimulationScenarioItem) Set(val *PromptSimulationScenarioItem) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationScenarioItem) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationScenarioItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationScenarioItem(val *PromptSimulationScenarioItem) *NullablePromptSimulationScenarioItem { + return &NullablePromptSimulationScenarioItem{value: val, isSet: true} +} + +func (v NullablePromptSimulationScenarioItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationScenarioItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_scenarios_response.go b/go/futureagi/model_prompt_simulation_scenarios_response.go new file mode 100644 index 0000000..0d47f30 --- /dev/null +++ b/go/futureagi/model_prompt_simulation_scenarios_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PromptSimulationScenariosResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationScenariosResponse{} + +// PromptSimulationScenariosResponse struct for PromptSimulationScenariosResponse +type PromptSimulationScenariosResponse struct { + Status *bool `json:"status,omitempty"` + Result PromptSimulationScenariosResult `json:"result"` +} + +type _PromptSimulationScenariosResponse PromptSimulationScenariosResponse + +// NewPromptSimulationScenariosResponse instantiates a new PromptSimulationScenariosResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationScenariosResponse(result PromptSimulationScenariosResult) *PromptSimulationScenariosResponse { + this := PromptSimulationScenariosResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewPromptSimulationScenariosResponseWithDefaults instantiates a new PromptSimulationScenariosResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationScenariosResponseWithDefaults() *PromptSimulationScenariosResponse { + this := PromptSimulationScenariosResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PromptSimulationScenariosResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenariosResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *PromptSimulationScenariosResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *PromptSimulationScenariosResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *PromptSimulationScenariosResponse) GetResult() PromptSimulationScenariosResult { + if o == nil { + var ret PromptSimulationScenariosResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenariosResponse) GetResultOk() (*PromptSimulationScenariosResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *PromptSimulationScenariosResponse) SetResult(v PromptSimulationScenariosResult) { + o.Result = v +} + +func (o PromptSimulationScenariosResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationScenariosResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *PromptSimulationScenariosResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptSimulationScenariosResponse := _PromptSimulationScenariosResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptSimulationScenariosResponse) + + if err != nil { + return err + } + + *o = PromptSimulationScenariosResponse(varPromptSimulationScenariosResponse) + + return err +} + +type NullablePromptSimulationScenariosResponse struct { + value *PromptSimulationScenariosResponse + isSet bool +} + +func (v NullablePromptSimulationScenariosResponse) Get() *PromptSimulationScenariosResponse { + return v.value +} + +func (v *NullablePromptSimulationScenariosResponse) Set(val *PromptSimulationScenariosResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationScenariosResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationScenariosResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationScenariosResponse(val *PromptSimulationScenariosResponse) *NullablePromptSimulationScenariosResponse { + return &NullablePromptSimulationScenariosResponse{value: val, isSet: true} +} + +func (v NullablePromptSimulationScenariosResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationScenariosResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_scenarios_result.go b/go/futureagi/model_prompt_simulation_scenarios_result.go new file mode 100644 index 0000000..e584ac3 --- /dev/null +++ b/go/futureagi/model_prompt_simulation_scenarios_result.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PromptSimulationScenariosResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationScenariosResult{} + +// PromptSimulationScenariosResult struct for PromptSimulationScenariosResult +type PromptSimulationScenariosResult struct { + Count *int32 `json:"count,omitempty"` + Page *int32 `json:"page,omitempty"` + Limit *int32 `json:"limit,omitempty"` + Results []PromptSimulationScenarioItem `json:"results,omitempty"` +} + +// NewPromptSimulationScenariosResult instantiates a new PromptSimulationScenariosResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationScenariosResult() *PromptSimulationScenariosResult { + this := PromptSimulationScenariosResult{} + return &this +} + +// NewPromptSimulationScenariosResultWithDefaults instantiates a new PromptSimulationScenariosResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationScenariosResultWithDefaults() *PromptSimulationScenariosResult { + this := PromptSimulationScenariosResult{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PromptSimulationScenariosResult) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenariosResult) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PromptSimulationScenariosResult) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PromptSimulationScenariosResult) SetCount(v int32) { + o.Count = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PromptSimulationScenariosResult) GetPage() int32 { + if o == nil || IsNil(o.Page) { + var ret int32 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenariosResult) GetPageOk() (*int32, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PromptSimulationScenariosResult) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int32 and assigns it to the Page field. +func (o *PromptSimulationScenariosResult) SetPage(v int32) { + o.Page = &v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *PromptSimulationScenariosResult) GetLimit() int32 { + if o == nil || IsNil(o.Limit) { + var ret int32 + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenariosResult) GetLimitOk() (*int32, bool) { + if o == nil || IsNil(o.Limit) { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *PromptSimulationScenariosResult) HasLimit() bool { + if o != nil && !IsNil(o.Limit) { + return true + } + + return false +} + +// SetLimit gets a reference to the given int32 and assigns it to the Limit field. +func (o *PromptSimulationScenariosResult) SetLimit(v int32) { + o.Limit = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PromptSimulationScenariosResult) GetResults() []PromptSimulationScenarioItem { + if o == nil || IsNil(o.Results) { + var ret []PromptSimulationScenarioItem + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationScenariosResult) GetResultsOk() ([]PromptSimulationScenarioItem, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PromptSimulationScenariosResult) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PromptSimulationScenarioItem and assigns it to the Results field. +func (o *PromptSimulationScenariosResult) SetResults(v []PromptSimulationScenarioItem) { + o.Results = v +} + +func (o PromptSimulationScenariosResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationScenariosResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.Limit) { + toSerialize["limit"] = o.Limit + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePromptSimulationScenariosResult struct { + value *PromptSimulationScenariosResult + isSet bool +} + +func (v NullablePromptSimulationScenariosResult) Get() *PromptSimulationScenariosResult { + return v.value +} + +func (v *NullablePromptSimulationScenariosResult) Set(val *PromptSimulationScenariosResult) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationScenariosResult) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationScenariosResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationScenariosResult(val *PromptSimulationScenariosResult) *NullablePromptSimulationScenariosResult { + return &NullablePromptSimulationScenariosResult{value: val, isSet: true} +} + +func (v NullablePromptSimulationScenariosResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationScenariosResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_template_summary.go b/go/futureagi/model_prompt_simulation_template_summary.go new file mode 100644 index 0000000..cfc69dc --- /dev/null +++ b/go/futureagi/model_prompt_simulation_template_summary.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PromptSimulationTemplateSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationTemplateSummary{} + +// PromptSimulationTemplateSummary struct for PromptSimulationTemplateSummary +type PromptSimulationTemplateSummary struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewPromptSimulationTemplateSummary instantiates a new PromptSimulationTemplateSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationTemplateSummary() *PromptSimulationTemplateSummary { + this := PromptSimulationTemplateSummary{} + return &this +} + +// NewPromptSimulationTemplateSummaryWithDefaults instantiates a new PromptSimulationTemplateSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationTemplateSummaryWithDefaults() *PromptSimulationTemplateSummary { + this := PromptSimulationTemplateSummary{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PromptSimulationTemplateSummary) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationTemplateSummary) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PromptSimulationTemplateSummary) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PromptSimulationTemplateSummary) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PromptSimulationTemplateSummary) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationTemplateSummary) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PromptSimulationTemplateSummary) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PromptSimulationTemplateSummary) SetName(v string) { + o.Name = &v +} + +func (o PromptSimulationTemplateSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationTemplateSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullablePromptSimulationTemplateSummary struct { + value *PromptSimulationTemplateSummary + isSet bool +} + +func (v NullablePromptSimulationTemplateSummary) Get() *PromptSimulationTemplateSummary { + return v.value +} + +func (v *NullablePromptSimulationTemplateSummary) Set(val *PromptSimulationTemplateSummary) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationTemplateSummary) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationTemplateSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationTemplateSummary(val *PromptSimulationTemplateSummary) *NullablePromptSimulationTemplateSummary { + return &NullablePromptSimulationTemplateSummary{value: val, isSet: true} +} + +func (v NullablePromptSimulationTemplateSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationTemplateSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_simulation_update_request.go b/go/futureagi/model_prompt_simulation_update_request.go new file mode 100644 index 0000000..7784102 --- /dev/null +++ b/go/futureagi/model_prompt_simulation_update_request.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the PromptSimulationUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptSimulationUpdateRequest{} + +// PromptSimulationUpdateRequest struct for PromptSimulationUpdateRequest +type PromptSimulationUpdateRequest struct { + PromptVersionId *string `json:"prompt_version_id,omitempty"` + ScenarioIds []string `json:"scenario_ids,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + EnableToolEvaluation *bool `json:"enable_tool_evaluation,omitempty"` +} + +// NewPromptSimulationUpdateRequest instantiates a new PromptSimulationUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptSimulationUpdateRequest() *PromptSimulationUpdateRequest { + this := PromptSimulationUpdateRequest{} + return &this +} + +// NewPromptSimulationUpdateRequestWithDefaults instantiates a new PromptSimulationUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptSimulationUpdateRequestWithDefaults() *PromptSimulationUpdateRequest { + this := PromptSimulationUpdateRequest{} + return &this +} + +// GetPromptVersionId returns the PromptVersionId field value if set, zero value otherwise. +func (o *PromptSimulationUpdateRequest) GetPromptVersionId() string { + if o == nil || IsNil(o.PromptVersionId) { + var ret string + return ret + } + return *o.PromptVersionId +} + +// GetPromptVersionIdOk returns a tuple with the PromptVersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationUpdateRequest) GetPromptVersionIdOk() (*string, bool) { + if o == nil || IsNil(o.PromptVersionId) { + return nil, false + } + return o.PromptVersionId, true +} + +// HasPromptVersionId returns a boolean if a field has been set. +func (o *PromptSimulationUpdateRequest) HasPromptVersionId() bool { + if o != nil && !IsNil(o.PromptVersionId) { + return true + } + + return false +} + +// SetPromptVersionId gets a reference to the given string and assigns it to the PromptVersionId field. +func (o *PromptSimulationUpdateRequest) SetPromptVersionId(v string) { + o.PromptVersionId = &v +} + +// GetScenarioIds returns the ScenarioIds field value if set, zero value otherwise. +func (o *PromptSimulationUpdateRequest) GetScenarioIds() []string { + if o == nil || IsNil(o.ScenarioIds) { + var ret []string + return ret + } + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationUpdateRequest) GetScenarioIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ScenarioIds) { + return nil, false + } + return o.ScenarioIds, true +} + +// HasScenarioIds returns a boolean if a field has been set. +func (o *PromptSimulationUpdateRequest) HasScenarioIds() bool { + if o != nil && !IsNil(o.ScenarioIds) { + return true + } + + return false +} + +// SetScenarioIds gets a reference to the given []string and assigns it to the ScenarioIds field. +func (o *PromptSimulationUpdateRequest) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PromptSimulationUpdateRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationUpdateRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PromptSimulationUpdateRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PromptSimulationUpdateRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PromptSimulationUpdateRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationUpdateRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PromptSimulationUpdateRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PromptSimulationUpdateRequest) SetDescription(v string) { + o.Description = &v +} + +// GetEnableToolEvaluation returns the EnableToolEvaluation field value if set, zero value otherwise. +func (o *PromptSimulationUpdateRequest) GetEnableToolEvaluation() bool { + if o == nil || IsNil(o.EnableToolEvaluation) { + var ret bool + return ret + } + return *o.EnableToolEvaluation +} + +// GetEnableToolEvaluationOk returns a tuple with the EnableToolEvaluation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptSimulationUpdateRequest) GetEnableToolEvaluationOk() (*bool, bool) { + if o == nil || IsNil(o.EnableToolEvaluation) { + return nil, false + } + return o.EnableToolEvaluation, true +} + +// HasEnableToolEvaluation returns a boolean if a field has been set. +func (o *PromptSimulationUpdateRequest) HasEnableToolEvaluation() bool { + if o != nil && !IsNil(o.EnableToolEvaluation) { + return true + } + + return false +} + +// SetEnableToolEvaluation gets a reference to the given bool and assigns it to the EnableToolEvaluation field. +func (o *PromptSimulationUpdateRequest) SetEnableToolEvaluation(v bool) { + o.EnableToolEvaluation = &v +} + +func (o PromptSimulationUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptSimulationUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PromptVersionId) { + toSerialize["prompt_version_id"] = o.PromptVersionId + } + if !IsNil(o.ScenarioIds) { + toSerialize["scenario_ids"] = o.ScenarioIds + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.EnableToolEvaluation) { + toSerialize["enable_tool_evaluation"] = o.EnableToolEvaluation + } + return toSerialize, nil +} + +type NullablePromptSimulationUpdateRequest struct { + value *PromptSimulationUpdateRequest + isSet bool +} + +func (v NullablePromptSimulationUpdateRequest) Get() *PromptSimulationUpdateRequest { + return v.value +} + +func (v *NullablePromptSimulationUpdateRequest) Set(val *PromptSimulationUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePromptSimulationUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptSimulationUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptSimulationUpdateRequest(val *PromptSimulationUpdateRequest) *NullablePromptSimulationUpdateRequest { + return &NullablePromptSimulationUpdateRequest{value: val, isSet: true} +} + +func (v NullablePromptSimulationUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptSimulationUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_prompt_template.go b/go/futureagi/model_prompt_template.go new file mode 100644 index 0000000..c656ba9 --- /dev/null +++ b/go/futureagi/model_prompt_template.go @@ -0,0 +1,453 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PromptTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PromptTemplate{} + +// PromptTemplate struct for PromptTemplate +type PromptTemplate struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Description NullableString `json:"description,omitempty"` + VariableNames map[string]interface{} `json:"variable_names,omitempty"` + Organization NullableString `json:"organization,omitempty"` + PromptFolder NullableString `json:"prompt_folder,omitempty"` + Placeholders map[string]interface{} `json:"placeholders,omitempty"` + CreatedBy NullableString `json:"created_by,omitempty"` +} + +type _PromptTemplate PromptTemplate + +// NewPromptTemplate instantiates a new PromptTemplate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPromptTemplate(name string) *PromptTemplate { + this := PromptTemplate{} + this.Name = name + return &this +} + +// NewPromptTemplateWithDefaults instantiates a new PromptTemplate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPromptTemplateWithDefaults() *PromptTemplate { + this := PromptTemplate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PromptTemplate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptTemplate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PromptTemplate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PromptTemplate) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *PromptTemplate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PromptTemplate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PromptTemplate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptTemplate) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptTemplate) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PromptTemplate) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PromptTemplate) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PromptTemplate) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PromptTemplate) UnsetDescription() { + o.Description.Unset() +} + +// GetVariableNames returns the VariableNames field value if set, zero value otherwise. +func (o *PromptTemplate) GetVariableNames() map[string]interface{} { + if o == nil || IsNil(o.VariableNames) { + var ret map[string]interface{} + return ret + } + return o.VariableNames +} + +// GetVariableNamesOk returns a tuple with the VariableNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptTemplate) GetVariableNamesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.VariableNames) { + return map[string]interface{}{}, false + } + return o.VariableNames, true +} + +// HasVariableNames returns a boolean if a field has been set. +func (o *PromptTemplate) HasVariableNames() bool { + if o != nil && !IsNil(o.VariableNames) { + return true + } + + return false +} + +// SetVariableNames gets a reference to the given map[string]interface{} and assigns it to the VariableNames field. +func (o *PromptTemplate) SetVariableNames(v map[string]interface{}) { + o.VariableNames = v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptTemplate) GetOrganization() string { + if o == nil || IsNil(o.Organization.Get()) { + var ret string + return ret + } + return *o.Organization.Get() +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptTemplate) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Organization.Get(), o.Organization.IsSet() +} + +// HasOrganization returns a boolean if a field has been set. +func (o *PromptTemplate) HasOrganization() bool { + if o != nil && o.Organization.IsSet() { + return true + } + + return false +} + +// SetOrganization gets a reference to the given NullableString and assigns it to the Organization field. +func (o *PromptTemplate) SetOrganization(v string) { + o.Organization.Set(&v) +} + +// SetOrganizationNil sets the value for Organization to be an explicit nil +func (o *PromptTemplate) SetOrganizationNil() { + o.Organization.Set(nil) +} + +// UnsetOrganization ensures that no value is present for Organization, not even an explicit nil +func (o *PromptTemplate) UnsetOrganization() { + o.Organization.Unset() +} + +// GetPromptFolder returns the PromptFolder field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptTemplate) GetPromptFolder() string { + if o == nil || IsNil(o.PromptFolder.Get()) { + var ret string + return ret + } + return *o.PromptFolder.Get() +} + +// GetPromptFolderOk returns a tuple with the PromptFolder field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptTemplate) GetPromptFolderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptFolder.Get(), o.PromptFolder.IsSet() +} + +// HasPromptFolder returns a boolean if a field has been set. +func (o *PromptTemplate) HasPromptFolder() bool { + if o != nil && o.PromptFolder.IsSet() { + return true + } + + return false +} + +// SetPromptFolder gets a reference to the given NullableString and assigns it to the PromptFolder field. +func (o *PromptTemplate) SetPromptFolder(v string) { + o.PromptFolder.Set(&v) +} + +// SetPromptFolderNil sets the value for PromptFolder to be an explicit nil +func (o *PromptTemplate) SetPromptFolderNil() { + o.PromptFolder.Set(nil) +} + +// UnsetPromptFolder ensures that no value is present for PromptFolder, not even an explicit nil +func (o *PromptTemplate) UnsetPromptFolder() { + o.PromptFolder.Unset() +} + +// GetPlaceholders returns the Placeholders field value if set, zero value otherwise. +func (o *PromptTemplate) GetPlaceholders() map[string]interface{} { + if o == nil || IsNil(o.Placeholders) { + var ret map[string]interface{} + return ret + } + return o.Placeholders +} + +// GetPlaceholdersOk returns a tuple with the Placeholders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PromptTemplate) GetPlaceholdersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Placeholders) { + return map[string]interface{}{}, false + } + return o.Placeholders, true +} + +// HasPlaceholders returns a boolean if a field has been set. +func (o *PromptTemplate) HasPlaceholders() bool { + if o != nil && !IsNil(o.Placeholders) { + return true + } + + return false +} + +// SetPlaceholders gets a reference to the given map[string]interface{} and assigns it to the Placeholders field. +func (o *PromptTemplate) SetPlaceholders(v map[string]interface{}) { + o.Placeholders = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PromptTemplate) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PromptTemplate) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *PromptTemplate) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *PromptTemplate) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *PromptTemplate) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *PromptTemplate) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +func (o PromptTemplate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PromptTemplate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.VariableNames) { + toSerialize["variable_names"] = o.VariableNames + } + if o.Organization.IsSet() { + toSerialize["organization"] = o.Organization.Get() + } + if o.PromptFolder.IsSet() { + toSerialize["prompt_folder"] = o.PromptFolder.Get() + } + if !IsNil(o.Placeholders) { + toSerialize["placeholders"] = o.Placeholders + } + if o.CreatedBy.IsSet() { + toSerialize["created_by"] = o.CreatedBy.Get() + } + return toSerialize, nil +} + +func (o *PromptTemplate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPromptTemplate := _PromptTemplate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPromptTemplate) + + if err != nil { + return err + } + + *o = PromptTemplate(varPromptTemplate) + + return err +} + +type NullablePromptTemplate struct { + value *PromptTemplate + isSet bool +} + +func (v NullablePromptTemplate) Get() *PromptTemplate { + return v.value +} + +func (v *NullablePromptTemplate) Set(val *PromptTemplate) { + v.value = val + v.isSet = true +} + +func (v NullablePromptTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullablePromptTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePromptTemplate(val *PromptTemplate) *NullablePromptTemplate { + return &NullablePromptTemplate{value: val, isSet: true} +} + +func (v NullablePromptTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePromptTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_provider_status_item.go b/go/futureagi/model_provider_status_item.go new file mode 100644 index 0000000..3ca5c8b --- /dev/null +++ b/go/futureagi/model_provider_status_item.go @@ -0,0 +1,382 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ProviderStatusItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderStatusItem{} + +// ProviderStatusItem struct for ProviderStatusItem +type ProviderStatusItem struct { + Provider string `json:"provider"` + DisplayName string `json:"display_name"` + HasKey bool `json:"has_key"` + MaskedKey NullableString `json:"masked_key,omitempty"` + LogoUrl NullableString `json:"logo_url,omitempty"` + Type string `json:"type"` + Id NullableString `json:"id,omitempty"` +} + +type _ProviderStatusItem ProviderStatusItem + +// NewProviderStatusItem instantiates a new ProviderStatusItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProviderStatusItem(provider string, displayName string, hasKey bool, type_ string) *ProviderStatusItem { + this := ProviderStatusItem{} + this.Provider = provider + this.DisplayName = displayName + this.HasKey = hasKey + this.Type = type_ + return &this +} + +// NewProviderStatusItemWithDefaults instantiates a new ProviderStatusItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProviderStatusItemWithDefaults() *ProviderStatusItem { + this := ProviderStatusItem{} + return &this +} + +// GetProvider returns the Provider field value +func (o *ProviderStatusItem) GetProvider() string { + if o == nil { + var ret string + return ret + } + + return o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value +// and a boolean to check if the value has been set. +func (o *ProviderStatusItem) GetProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Provider, true +} + +// SetProvider sets field value +func (o *ProviderStatusItem) SetProvider(v string) { + o.Provider = v +} + +// GetDisplayName returns the DisplayName field value +func (o *ProviderStatusItem) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *ProviderStatusItem) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *ProviderStatusItem) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetHasKey returns the HasKey field value +func (o *ProviderStatusItem) GetHasKey() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasKey +} + +// GetHasKeyOk returns a tuple with the HasKey field value +// and a boolean to check if the value has been set. +func (o *ProviderStatusItem) GetHasKeyOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HasKey, true +} + +// SetHasKey sets field value +func (o *ProviderStatusItem) SetHasKey(v bool) { + o.HasKey = v +} + +// GetMaskedKey returns the MaskedKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProviderStatusItem) GetMaskedKey() string { + if o == nil || IsNil(o.MaskedKey.Get()) { + var ret string + return ret + } + return *o.MaskedKey.Get() +} + +// GetMaskedKeyOk returns a tuple with the MaskedKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProviderStatusItem) GetMaskedKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MaskedKey.Get(), o.MaskedKey.IsSet() +} + +// HasMaskedKey returns a boolean if a field has been set. +func (o *ProviderStatusItem) HasMaskedKey() bool { + if o != nil && o.MaskedKey.IsSet() { + return true + } + + return false +} + +// SetMaskedKey gets a reference to the given NullableString and assigns it to the MaskedKey field. +func (o *ProviderStatusItem) SetMaskedKey(v string) { + o.MaskedKey.Set(&v) +} + +// SetMaskedKeyNil sets the value for MaskedKey to be an explicit nil +func (o *ProviderStatusItem) SetMaskedKeyNil() { + o.MaskedKey.Set(nil) +} + +// UnsetMaskedKey ensures that no value is present for MaskedKey, not even an explicit nil +func (o *ProviderStatusItem) UnsetMaskedKey() { + o.MaskedKey.Unset() +} + +// GetLogoUrl returns the LogoUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProviderStatusItem) GetLogoUrl() string { + if o == nil || IsNil(o.LogoUrl.Get()) { + var ret string + return ret + } + return *o.LogoUrl.Get() +} + +// GetLogoUrlOk returns a tuple with the LogoUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProviderStatusItem) GetLogoUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LogoUrl.Get(), o.LogoUrl.IsSet() +} + +// HasLogoUrl returns a boolean if a field has been set. +func (o *ProviderStatusItem) HasLogoUrl() bool { + if o != nil && o.LogoUrl.IsSet() { + return true + } + + return false +} + +// SetLogoUrl gets a reference to the given NullableString and assigns it to the LogoUrl field. +func (o *ProviderStatusItem) SetLogoUrl(v string) { + o.LogoUrl.Set(&v) +} + +// SetLogoUrlNil sets the value for LogoUrl to be an explicit nil +func (o *ProviderStatusItem) SetLogoUrlNil() { + o.LogoUrl.Set(nil) +} + +// UnsetLogoUrl ensures that no value is present for LogoUrl, not even an explicit nil +func (o *ProviderStatusItem) UnsetLogoUrl() { + o.LogoUrl.Unset() +} + +// GetType returns the Type field value +func (o *ProviderStatusItem) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ProviderStatusItem) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ProviderStatusItem) SetType(v string) { + o.Type = v +} + +// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProviderStatusItem) GetId() string { + if o == nil || IsNil(o.Id.Get()) { + var ret string + return ret + } + return *o.Id.Get() +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProviderStatusItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id.Get(), o.Id.IsSet() +} + +// HasId returns a boolean if a field has been set. +func (o *ProviderStatusItem) HasId() bool { + if o != nil && o.Id.IsSet() { + return true + } + + return false +} + +// SetId gets a reference to the given NullableString and assigns it to the Id field. +func (o *ProviderStatusItem) SetId(v string) { + o.Id.Set(&v) +} + +// SetIdNil sets the value for Id to be an explicit nil +func (o *ProviderStatusItem) SetIdNil() { + o.Id.Set(nil) +} + +// UnsetId ensures that no value is present for Id, not even an explicit nil +func (o *ProviderStatusItem) UnsetId() { + o.Id.Unset() +} + +func (o ProviderStatusItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProviderStatusItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["provider"] = o.Provider + toSerialize["display_name"] = o.DisplayName + toSerialize["has_key"] = o.HasKey + if o.MaskedKey.IsSet() { + toSerialize["masked_key"] = o.MaskedKey.Get() + } + if o.LogoUrl.IsSet() { + toSerialize["logo_url"] = o.LogoUrl.Get() + } + toSerialize["type"] = o.Type + if o.Id.IsSet() { + toSerialize["id"] = o.Id.Get() + } + return toSerialize, nil +} + +func (o *ProviderStatusItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "provider", + "display_name", + "has_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProviderStatusItem := _ProviderStatusItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varProviderStatusItem) + + if err != nil { + return err + } + + *o = ProviderStatusItem(varProviderStatusItem) + + return err +} + +type NullableProviderStatusItem struct { + value *ProviderStatusItem + isSet bool +} + +func (v NullableProviderStatusItem) Get() *ProviderStatusItem { + return v.value +} + +func (v *NullableProviderStatusItem) Set(val *ProviderStatusItem) { + v.value = val + v.isSet = true +} + +func (v NullableProviderStatusItem) IsSet() bool { + return v.isSet +} + +func (v *NullableProviderStatusItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProviderStatusItem(val *ProviderStatusItem) *NullableProviderStatusItem { + return &NullableProviderStatusItem{value: val, isSet: true} +} + +func (v NullableProviderStatusItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProviderStatusItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_provider_status_response.go b/go/futureagi/model_provider_status_response.go new file mode 100644 index 0000000..5dc635f --- /dev/null +++ b/go/futureagi/model_provider_status_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ProviderStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderStatusResponse{} + +// ProviderStatusResponse struct for ProviderStatusResponse +type ProviderStatusResponse struct { + Status bool `json:"status"` + Result ProviderStatusResult `json:"result"` +} + +type _ProviderStatusResponse ProviderStatusResponse + +// NewProviderStatusResponse instantiates a new ProviderStatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProviderStatusResponse(status bool, result ProviderStatusResult) *ProviderStatusResponse { + this := ProviderStatusResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewProviderStatusResponseWithDefaults instantiates a new ProviderStatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProviderStatusResponseWithDefaults() *ProviderStatusResponse { + this := ProviderStatusResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *ProviderStatusResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ProviderStatusResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ProviderStatusResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *ProviderStatusResponse) GetResult() ProviderStatusResult { + if o == nil { + var ret ProviderStatusResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ProviderStatusResponse) GetResultOk() (*ProviderStatusResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ProviderStatusResponse) SetResult(v ProviderStatusResult) { + o.Result = v +} + +func (o ProviderStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProviderStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ProviderStatusResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProviderStatusResponse := _ProviderStatusResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varProviderStatusResponse) + + if err != nil { + return err + } + + *o = ProviderStatusResponse(varProviderStatusResponse) + + return err +} + +type NullableProviderStatusResponse struct { + value *ProviderStatusResponse + isSet bool +} + +func (v NullableProviderStatusResponse) Get() *ProviderStatusResponse { + return v.value +} + +func (v *NullableProviderStatusResponse) Set(val *ProviderStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableProviderStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableProviderStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProviderStatusResponse(val *ProviderStatusResponse) *NullableProviderStatusResponse { + return &NullableProviderStatusResponse{value: val, isSet: true} +} + +func (v NullableProviderStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProviderStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_provider_status_result.go b/go/futureagi/model_provider_status_result.go new file mode 100644 index 0000000..4f81b68 --- /dev/null +++ b/go/futureagi/model_provider_status_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ProviderStatusResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProviderStatusResult{} + +// ProviderStatusResult struct for ProviderStatusResult +type ProviderStatusResult struct { + Providers []ProviderStatusItem `json:"providers"` +} + +type _ProviderStatusResult ProviderStatusResult + +// NewProviderStatusResult instantiates a new ProviderStatusResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProviderStatusResult(providers []ProviderStatusItem) *ProviderStatusResult { + this := ProviderStatusResult{} + this.Providers = providers + return &this +} + +// NewProviderStatusResultWithDefaults instantiates a new ProviderStatusResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProviderStatusResultWithDefaults() *ProviderStatusResult { + this := ProviderStatusResult{} + return &this +} + +// GetProviders returns the Providers field value +func (o *ProviderStatusResult) GetProviders() []ProviderStatusItem { + if o == nil { + var ret []ProviderStatusItem + return ret + } + + return o.Providers +} + +// GetProvidersOk returns a tuple with the Providers field value +// and a boolean to check if the value has been set. +func (o *ProviderStatusResult) GetProvidersOk() ([]ProviderStatusItem, bool) { + if o == nil { + return nil, false + } + return o.Providers, true +} + +// SetProviders sets field value +func (o *ProviderStatusResult) SetProviders(v []ProviderStatusItem) { + o.Providers = v +} + +func (o ProviderStatusResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProviderStatusResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["providers"] = o.Providers + return toSerialize, nil +} + +func (o *ProviderStatusResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "providers", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProviderStatusResult := _ProviderStatusResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varProviderStatusResult) + + if err != nil { + return err + } + + *o = ProviderStatusResult(varProviderStatusResult) + + return err +} + +type NullableProviderStatusResult struct { + value *ProviderStatusResult + isSet bool +} + +func (v NullableProviderStatusResult) Get() *ProviderStatusResult { + return v.value +} + +func (v *NullableProviderStatusResult) Set(val *ProviderStatusResult) { + v.value = val + v.isSet = true +} + +func (v NullableProviderStatusResult) IsSet() bool { + return v.isSet +} + +func (v *NullableProviderStatusResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProviderStatusResult(val *ProviderStatusResult) *NullableProviderStatusResult { + return &NullableProviderStatusResult{value: val, isSet: true} +} + +func (v NullableProviderStatusResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProviderStatusResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_add_items_response.go b/go/futureagi/model_queue_add_items_response.go new file mode 100644 index 0000000..89c786f --- /dev/null +++ b/go/futureagi/model_queue_add_items_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAddItemsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAddItemsResponse{} + +// QueueAddItemsResponse struct for QueueAddItemsResponse +type QueueAddItemsResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueAddItemsResult `json:"result"` +} + +type _QueueAddItemsResponse QueueAddItemsResponse + +// NewQueueAddItemsResponse instantiates a new QueueAddItemsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAddItemsResponse(result QueueAddItemsResult) *QueueAddItemsResponse { + this := QueueAddItemsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueAddItemsResponseWithDefaults instantiates a new QueueAddItemsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAddItemsResponseWithDefaults() *QueueAddItemsResponse { + this := QueueAddItemsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueAddItemsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAddItemsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueAddItemsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueAddItemsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueAddItemsResponse) GetResult() QueueAddItemsResult { + if o == nil { + var ret QueueAddItemsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueAddItemsResponse) GetResultOk() (*QueueAddItemsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueAddItemsResponse) SetResult(v QueueAddItemsResult) { + o.Result = v +} + +func (o QueueAddItemsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAddItemsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueAddItemsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAddItemsResponse := _QueueAddItemsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAddItemsResponse) + + if err != nil { + return err + } + + *o = QueueAddItemsResponse(varQueueAddItemsResponse) + + return err +} + +type NullableQueueAddItemsResponse struct { + value *QueueAddItemsResponse + isSet bool +} + +func (v NullableQueueAddItemsResponse) Get() *QueueAddItemsResponse { + return v.value +} + +func (v *NullableQueueAddItemsResponse) Set(val *QueueAddItemsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAddItemsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAddItemsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAddItemsResponse(val *QueueAddItemsResponse) *NullableQueueAddItemsResponse { + return &NullableQueueAddItemsResponse{value: val, isSet: true} +} + +func (v NullableQueueAddItemsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAddItemsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_add_items_result.go b/go/futureagi/model_queue_add_items_result.go new file mode 100644 index 0000000..fc6b280 --- /dev/null +++ b/go/futureagi/model_queue_add_items_result.go @@ -0,0 +1,277 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAddItemsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAddItemsResult{} + +// QueueAddItemsResult struct for QueueAddItemsResult +type QueueAddItemsResult struct { + Added int32 `json:"added"` + Duplicates int32 `json:"duplicates"` + Errors []string `json:"errors"` + QueueStatus string `json:"queue_status"` + TotalMatching *int32 `json:"total_matching,omitempty"` +} + +type _QueueAddItemsResult QueueAddItemsResult + +// NewQueueAddItemsResult instantiates a new QueueAddItemsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAddItemsResult(added int32, duplicates int32, errors []string, queueStatus string) *QueueAddItemsResult { + this := QueueAddItemsResult{} + this.Added = added + this.Duplicates = duplicates + this.Errors = errors + this.QueueStatus = queueStatus + return &this +} + +// NewQueueAddItemsResultWithDefaults instantiates a new QueueAddItemsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAddItemsResultWithDefaults() *QueueAddItemsResult { + this := QueueAddItemsResult{} + return &this +} + +// GetAdded returns the Added field value +func (o *QueueAddItemsResult) GetAdded() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Added +} + +// GetAddedOk returns a tuple with the Added field value +// and a boolean to check if the value has been set. +func (o *QueueAddItemsResult) GetAddedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Added, true +} + +// SetAdded sets field value +func (o *QueueAddItemsResult) SetAdded(v int32) { + o.Added = v +} + +// GetDuplicates returns the Duplicates field value +func (o *QueueAddItemsResult) GetDuplicates() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Duplicates +} + +// GetDuplicatesOk returns a tuple with the Duplicates field value +// and a boolean to check if the value has been set. +func (o *QueueAddItemsResult) GetDuplicatesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Duplicates, true +} + +// SetDuplicates sets field value +func (o *QueueAddItemsResult) SetDuplicates(v int32) { + o.Duplicates = v +} + +// GetErrors returns the Errors field value +func (o *QueueAddItemsResult) GetErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value +// and a boolean to check if the value has been set. +func (o *QueueAddItemsResult) GetErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Errors, true +} + +// SetErrors sets field value +func (o *QueueAddItemsResult) SetErrors(v []string) { + o.Errors = v +} + +// GetQueueStatus returns the QueueStatus field value +func (o *QueueAddItemsResult) GetQueueStatus() string { + if o == nil { + var ret string + return ret + } + + return o.QueueStatus +} + +// GetQueueStatusOk returns a tuple with the QueueStatus field value +// and a boolean to check if the value has been set. +func (o *QueueAddItemsResult) GetQueueStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.QueueStatus, true +} + +// SetQueueStatus sets field value +func (o *QueueAddItemsResult) SetQueueStatus(v string) { + o.QueueStatus = v +} + +// GetTotalMatching returns the TotalMatching field value if set, zero value otherwise. +func (o *QueueAddItemsResult) GetTotalMatching() int32 { + if o == nil || IsNil(o.TotalMatching) { + var ret int32 + return ret + } + return *o.TotalMatching +} + +// GetTotalMatchingOk returns a tuple with the TotalMatching field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAddItemsResult) GetTotalMatchingOk() (*int32, bool) { + if o == nil || IsNil(o.TotalMatching) { + return nil, false + } + return o.TotalMatching, true +} + +// HasTotalMatching returns a boolean if a field has been set. +func (o *QueueAddItemsResult) HasTotalMatching() bool { + if o != nil && !IsNil(o.TotalMatching) { + return true + } + + return false +} + +// SetTotalMatching gets a reference to the given int32 and assigns it to the TotalMatching field. +func (o *QueueAddItemsResult) SetTotalMatching(v int32) { + o.TotalMatching = &v +} + +func (o QueueAddItemsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAddItemsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["added"] = o.Added + toSerialize["duplicates"] = o.Duplicates + toSerialize["errors"] = o.Errors + toSerialize["queue_status"] = o.QueueStatus + if !IsNil(o.TotalMatching) { + toSerialize["total_matching"] = o.TotalMatching + } + return toSerialize, nil +} + +func (o *QueueAddItemsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "added", + "duplicates", + "errors", + "queue_status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAddItemsResult := _QueueAddItemsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAddItemsResult) + + if err != nil { + return err + } + + *o = QueueAddItemsResult(varQueueAddItemsResult) + + return err +} + +type NullableQueueAddItemsResult struct { + value *QueueAddItemsResult + isSet bool +} + +func (v NullableQueueAddItemsResult) Get() *QueueAddItemsResult { + return v.value +} + +func (v *NullableQueueAddItemsResult) Set(val *QueueAddItemsResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAddItemsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAddItemsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAddItemsResult(val *QueueAddItemsResult) *NullableQueueAddItemsResult { + return &NullableQueueAddItemsResult{value: val, isSet: true} +} + +func (v NullableQueueAddItemsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAddItemsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_add_label_response.go b/go/futureagi/model_queue_add_label_response.go new file mode 100644 index 0000000..e835c82 --- /dev/null +++ b/go/futureagi/model_queue_add_label_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAddLabelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAddLabelResponse{} + +// QueueAddLabelResponse struct for QueueAddLabelResponse +type QueueAddLabelResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueAddLabelResult `json:"result"` +} + +type _QueueAddLabelResponse QueueAddLabelResponse + +// NewQueueAddLabelResponse instantiates a new QueueAddLabelResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAddLabelResponse(result QueueAddLabelResult) *QueueAddLabelResponse { + this := QueueAddLabelResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueAddLabelResponseWithDefaults instantiates a new QueueAddLabelResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAddLabelResponseWithDefaults() *QueueAddLabelResponse { + this := QueueAddLabelResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueAddLabelResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAddLabelResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueAddLabelResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueAddLabelResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueAddLabelResponse) GetResult() QueueAddLabelResult { + if o == nil { + var ret QueueAddLabelResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueAddLabelResponse) GetResultOk() (*QueueAddLabelResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueAddLabelResponse) SetResult(v QueueAddLabelResult) { + o.Result = v +} + +func (o QueueAddLabelResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAddLabelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueAddLabelResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAddLabelResponse := _QueueAddLabelResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAddLabelResponse) + + if err != nil { + return err + } + + *o = QueueAddLabelResponse(varQueueAddLabelResponse) + + return err +} + +type NullableQueueAddLabelResponse struct { + value *QueueAddLabelResponse + isSet bool +} + +func (v NullableQueueAddLabelResponse) Get() *QueueAddLabelResponse { + return v.value +} + +func (v *NullableQueueAddLabelResponse) Set(val *QueueAddLabelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAddLabelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAddLabelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAddLabelResponse(val *QueueAddLabelResponse) *NullableQueueAddLabelResponse { + return &NullableQueueAddLabelResponse{value: val, isSet: true} +} + +func (v NullableQueueAddLabelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAddLabelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_add_label_result.go b/go/futureagi/model_queue_add_label_result.go new file mode 100644 index 0000000..7a1cac8 --- /dev/null +++ b/go/futureagi/model_queue_add_label_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAddLabelResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAddLabelResult{} + +// QueueAddLabelResult struct for QueueAddLabelResult +type QueueAddLabelResult struct { + Label QueueLabelResult `json:"label"` + Created bool `json:"created"` + ReopenedItems int32 `json:"reopened_items"` + QueueStatus string `json:"queue_status"` +} + +type _QueueAddLabelResult QueueAddLabelResult + +// NewQueueAddLabelResult instantiates a new QueueAddLabelResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAddLabelResult(label QueueLabelResult, created bool, reopenedItems int32, queueStatus string) *QueueAddLabelResult { + this := QueueAddLabelResult{} + this.Label = label + this.Created = created + this.ReopenedItems = reopenedItems + this.QueueStatus = queueStatus + return &this +} + +// NewQueueAddLabelResultWithDefaults instantiates a new QueueAddLabelResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAddLabelResultWithDefaults() *QueueAddLabelResult { + this := QueueAddLabelResult{} + return &this +} + +// GetLabel returns the Label field value +func (o *QueueAddLabelResult) GetLabel() QueueLabelResult { + if o == nil { + var ret QueueLabelResult + return ret + } + + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value +// and a boolean to check if the value has been set. +func (o *QueueAddLabelResult) GetLabelOk() (*QueueLabelResult, bool) { + if o == nil { + return nil, false + } + return &o.Label, true +} + +// SetLabel sets field value +func (o *QueueAddLabelResult) SetLabel(v QueueLabelResult) { + o.Label = v +} + +// GetCreated returns the Created field value +func (o *QueueAddLabelResult) GetCreated() bool { + if o == nil { + var ret bool + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *QueueAddLabelResult) GetCreatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *QueueAddLabelResult) SetCreated(v bool) { + o.Created = v +} + +// GetReopenedItems returns the ReopenedItems field value +func (o *QueueAddLabelResult) GetReopenedItems() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ReopenedItems +} + +// GetReopenedItemsOk returns a tuple with the ReopenedItems field value +// and a boolean to check if the value has been set. +func (o *QueueAddLabelResult) GetReopenedItemsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ReopenedItems, true +} + +// SetReopenedItems sets field value +func (o *QueueAddLabelResult) SetReopenedItems(v int32) { + o.ReopenedItems = v +} + +// GetQueueStatus returns the QueueStatus field value +func (o *QueueAddLabelResult) GetQueueStatus() string { + if o == nil { + var ret string + return ret + } + + return o.QueueStatus +} + +// GetQueueStatusOk returns a tuple with the QueueStatus field value +// and a boolean to check if the value has been set. +func (o *QueueAddLabelResult) GetQueueStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.QueueStatus, true +} + +// SetQueueStatus sets field value +func (o *QueueAddLabelResult) SetQueueStatus(v string) { + o.QueueStatus = v +} + +func (o QueueAddLabelResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAddLabelResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label"] = o.Label + toSerialize["created"] = o.Created + toSerialize["reopened_items"] = o.ReopenedItems + toSerialize["queue_status"] = o.QueueStatus + return toSerialize, nil +} + +func (o *QueueAddLabelResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label", + "created", + "reopened_items", + "queue_status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAddLabelResult := _QueueAddLabelResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAddLabelResult) + + if err != nil { + return err + } + + *o = QueueAddLabelResult(varQueueAddLabelResult) + + return err +} + +type NullableQueueAddLabelResult struct { + value *QueueAddLabelResult + isSet bool +} + +func (v NullableQueueAddLabelResult) Get() *QueueAddLabelResult { + return v.value +} + +func (v *NullableQueueAddLabelResult) Set(val *QueueAddLabelResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAddLabelResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAddLabelResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAddLabelResult(val *QueueAddLabelResult) *NullableQueueAddLabelResult { + return &NullableQueueAddLabelResult{value: val, isSet: true} +} + +func (v NullableQueueAddLabelResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAddLabelResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_agreement_annotator_pair.go b/go/futureagi/model_queue_agreement_annotator_pair.go new file mode 100644 index 0000000..db5e3b6 --- /dev/null +++ b/go/futureagi/model_queue_agreement_annotator_pair.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAgreementAnnotatorPair type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAgreementAnnotatorPair{} + +// QueueAgreementAnnotatorPair struct for QueueAgreementAnnotatorPair +type QueueAgreementAnnotatorPair struct { + Annotator1Id string `json:"annotator_1_id"` + Annotator2Id string `json:"annotator_2_id"` + AgreementPct float32 `json:"agreement_pct"` + TotalComparisons int32 `json:"total_comparisons"` +} + +type _QueueAgreementAnnotatorPair QueueAgreementAnnotatorPair + +// NewQueueAgreementAnnotatorPair instantiates a new QueueAgreementAnnotatorPair object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAgreementAnnotatorPair(annotator1Id string, annotator2Id string, agreementPct float32, totalComparisons int32) *QueueAgreementAnnotatorPair { + this := QueueAgreementAnnotatorPair{} + this.Annotator1Id = annotator1Id + this.Annotator2Id = annotator2Id + this.AgreementPct = agreementPct + this.TotalComparisons = totalComparisons + return &this +} + +// NewQueueAgreementAnnotatorPairWithDefaults instantiates a new QueueAgreementAnnotatorPair object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAgreementAnnotatorPairWithDefaults() *QueueAgreementAnnotatorPair { + this := QueueAgreementAnnotatorPair{} + return &this +} + +// GetAnnotator1Id returns the Annotator1Id field value +func (o *QueueAgreementAnnotatorPair) GetAnnotator1Id() string { + if o == nil { + var ret string + return ret + } + + return o.Annotator1Id +} + +// GetAnnotator1IdOk returns a tuple with the Annotator1Id field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementAnnotatorPair) GetAnnotator1IdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Annotator1Id, true +} + +// SetAnnotator1Id sets field value +func (o *QueueAgreementAnnotatorPair) SetAnnotator1Id(v string) { + o.Annotator1Id = v +} + +// GetAnnotator2Id returns the Annotator2Id field value +func (o *QueueAgreementAnnotatorPair) GetAnnotator2Id() string { + if o == nil { + var ret string + return ret + } + + return o.Annotator2Id +} + +// GetAnnotator2IdOk returns a tuple with the Annotator2Id field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementAnnotatorPair) GetAnnotator2IdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Annotator2Id, true +} + +// SetAnnotator2Id sets field value +func (o *QueueAgreementAnnotatorPair) SetAnnotator2Id(v string) { + o.Annotator2Id = v +} + +// GetAgreementPct returns the AgreementPct field value +func (o *QueueAgreementAnnotatorPair) GetAgreementPct() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AgreementPct +} + +// GetAgreementPctOk returns a tuple with the AgreementPct field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementAnnotatorPair) GetAgreementPctOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AgreementPct, true +} + +// SetAgreementPct sets field value +func (o *QueueAgreementAnnotatorPair) SetAgreementPct(v float32) { + o.AgreementPct = v +} + +// GetTotalComparisons returns the TotalComparisons field value +func (o *QueueAgreementAnnotatorPair) GetTotalComparisons() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalComparisons +} + +// GetTotalComparisonsOk returns a tuple with the TotalComparisons field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementAnnotatorPair) GetTotalComparisonsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalComparisons, true +} + +// SetTotalComparisons sets field value +func (o *QueueAgreementAnnotatorPair) SetTotalComparisons(v int32) { + o.TotalComparisons = v +} + +func (o QueueAgreementAnnotatorPair) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAgreementAnnotatorPair) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["annotator_1_id"] = o.Annotator1Id + toSerialize["annotator_2_id"] = o.Annotator2Id + toSerialize["agreement_pct"] = o.AgreementPct + toSerialize["total_comparisons"] = o.TotalComparisons + return toSerialize, nil +} + +func (o *QueueAgreementAnnotatorPair) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "annotator_1_id", + "annotator_2_id", + "agreement_pct", + "total_comparisons", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAgreementAnnotatorPair := _QueueAgreementAnnotatorPair{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAgreementAnnotatorPair) + + if err != nil { + return err + } + + *o = QueueAgreementAnnotatorPair(varQueueAgreementAnnotatorPair) + + return err +} + +type NullableQueueAgreementAnnotatorPair struct { + value *QueueAgreementAnnotatorPair + isSet bool +} + +func (v NullableQueueAgreementAnnotatorPair) Get() *QueueAgreementAnnotatorPair { + return v.value +} + +func (v *NullableQueueAgreementAnnotatorPair) Set(val *QueueAgreementAnnotatorPair) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAgreementAnnotatorPair) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAgreementAnnotatorPair) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAgreementAnnotatorPair(val *QueueAgreementAnnotatorPair) *NullableQueueAgreementAnnotatorPair { + return &NullableQueueAgreementAnnotatorPair{value: val, isSet: true} +} + +func (v NullableQueueAgreementAnnotatorPair) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAgreementAnnotatorPair) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_agreement_label.go b/go/futureagi/model_queue_agreement_label.go new file mode 100644 index 0000000..56600f8 --- /dev/null +++ b/go/futureagi/model_queue_agreement_label.go @@ -0,0 +1,305 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAgreementLabel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAgreementLabel{} + +// QueueAgreementLabel struct for QueueAgreementLabel +type QueueAgreementLabel struct { + LabelName NullableString `json:"label_name"` + LabelType NullableString `json:"label_type"` + AgreementPct NullableFloat32 `json:"agreement_pct"` + CohensKappa NullableFloat32 `json:"cohens_kappa"` + DisagreementCount int32 `json:"disagreement_count"` + DisagreementItems []string `json:"disagreement_items"` +} + +type _QueueAgreementLabel QueueAgreementLabel + +// NewQueueAgreementLabel instantiates a new QueueAgreementLabel object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAgreementLabel(labelName NullableString, labelType NullableString, agreementPct NullableFloat32, cohensKappa NullableFloat32, disagreementCount int32, disagreementItems []string) *QueueAgreementLabel { + this := QueueAgreementLabel{} + this.LabelName = labelName + this.LabelType = labelType + this.AgreementPct = agreementPct + this.CohensKappa = cohensKappa + this.DisagreementCount = disagreementCount + this.DisagreementItems = disagreementItems + return &this +} + +// NewQueueAgreementLabelWithDefaults instantiates a new QueueAgreementLabel object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAgreementLabelWithDefaults() *QueueAgreementLabel { + this := QueueAgreementLabel{} + return &this +} + +// GetLabelName returns the LabelName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *QueueAgreementLabel) GetLabelName() string { + if o == nil || o.LabelName.Get() == nil { + var ret string + return ret + } + + return *o.LabelName.Get() +} + +// GetLabelNameOk returns a tuple with the LabelName field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAgreementLabel) GetLabelNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LabelName.Get(), o.LabelName.IsSet() +} + +// SetLabelName sets field value +func (o *QueueAgreementLabel) SetLabelName(v string) { + o.LabelName.Set(&v) +} + +// GetLabelType returns the LabelType field value +// If the value is explicit nil, the zero value for string will be returned +func (o *QueueAgreementLabel) GetLabelType() string { + if o == nil || o.LabelType.Get() == nil { + var ret string + return ret + } + + return *o.LabelType.Get() +} + +// GetLabelTypeOk returns a tuple with the LabelType field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAgreementLabel) GetLabelTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LabelType.Get(), o.LabelType.IsSet() +} + +// SetLabelType sets field value +func (o *QueueAgreementLabel) SetLabelType(v string) { + o.LabelType.Set(&v) +} + +// GetAgreementPct returns the AgreementPct field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *QueueAgreementLabel) GetAgreementPct() float32 { + if o == nil || o.AgreementPct.Get() == nil { + var ret float32 + return ret + } + + return *o.AgreementPct.Get() +} + +// GetAgreementPctOk returns a tuple with the AgreementPct field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAgreementLabel) GetAgreementPctOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.AgreementPct.Get(), o.AgreementPct.IsSet() +} + +// SetAgreementPct sets field value +func (o *QueueAgreementLabel) SetAgreementPct(v float32) { + o.AgreementPct.Set(&v) +} + +// GetCohensKappa returns the CohensKappa field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *QueueAgreementLabel) GetCohensKappa() float32 { + if o == nil || o.CohensKappa.Get() == nil { + var ret float32 + return ret + } + + return *o.CohensKappa.Get() +} + +// GetCohensKappaOk returns a tuple with the CohensKappa field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAgreementLabel) GetCohensKappaOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.CohensKappa.Get(), o.CohensKappa.IsSet() +} + +// SetCohensKappa sets field value +func (o *QueueAgreementLabel) SetCohensKappa(v float32) { + o.CohensKappa.Set(&v) +} + +// GetDisagreementCount returns the DisagreementCount field value +func (o *QueueAgreementLabel) GetDisagreementCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.DisagreementCount +} + +// GetDisagreementCountOk returns a tuple with the DisagreementCount field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementLabel) GetDisagreementCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.DisagreementCount, true +} + +// SetDisagreementCount sets field value +func (o *QueueAgreementLabel) SetDisagreementCount(v int32) { + o.DisagreementCount = v +} + +// GetDisagreementItems returns the DisagreementItems field value +func (o *QueueAgreementLabel) GetDisagreementItems() []string { + if o == nil { + var ret []string + return ret + } + + return o.DisagreementItems +} + +// GetDisagreementItemsOk returns a tuple with the DisagreementItems field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementLabel) GetDisagreementItemsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.DisagreementItems, true +} + +// SetDisagreementItems sets field value +func (o *QueueAgreementLabel) SetDisagreementItems(v []string) { + o.DisagreementItems = v +} + +func (o QueueAgreementLabel) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAgreementLabel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label_name"] = o.LabelName.Get() + toSerialize["label_type"] = o.LabelType.Get() + toSerialize["agreement_pct"] = o.AgreementPct.Get() + toSerialize["cohens_kappa"] = o.CohensKappa.Get() + toSerialize["disagreement_count"] = o.DisagreementCount + toSerialize["disagreement_items"] = o.DisagreementItems + return toSerialize, nil +} + +func (o *QueueAgreementLabel) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label_name", + "label_type", + "agreement_pct", + "cohens_kappa", + "disagreement_count", + "disagreement_items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAgreementLabel := _QueueAgreementLabel{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAgreementLabel) + + if err != nil { + return err + } + + *o = QueueAgreementLabel(varQueueAgreementLabel) + + return err +} + +type NullableQueueAgreementLabel struct { + value *QueueAgreementLabel + isSet bool +} + +func (v NullableQueueAgreementLabel) Get() *QueueAgreementLabel { + return v.value +} + +func (v *NullableQueueAgreementLabel) Set(val *QueueAgreementLabel) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAgreementLabel) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAgreementLabel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAgreementLabel(val *QueueAgreementLabel) *NullableQueueAgreementLabel { + return &NullableQueueAgreementLabel{value: val, isSet: true} +} + +func (v NullableQueueAgreementLabel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAgreementLabel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_agreement_response.go b/go/futureagi/model_queue_agreement_response.go new file mode 100644 index 0000000..e646436 --- /dev/null +++ b/go/futureagi/model_queue_agreement_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAgreementResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAgreementResponse{} + +// QueueAgreementResponse struct for QueueAgreementResponse +type QueueAgreementResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueAgreementResult `json:"result"` +} + +type _QueueAgreementResponse QueueAgreementResponse + +// NewQueueAgreementResponse instantiates a new QueueAgreementResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAgreementResponse(result QueueAgreementResult) *QueueAgreementResponse { + this := QueueAgreementResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueAgreementResponseWithDefaults instantiates a new QueueAgreementResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAgreementResponseWithDefaults() *QueueAgreementResponse { + this := QueueAgreementResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueAgreementResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAgreementResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueAgreementResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueAgreementResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueAgreementResponse) GetResult() QueueAgreementResult { + if o == nil { + var ret QueueAgreementResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementResponse) GetResultOk() (*QueueAgreementResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueAgreementResponse) SetResult(v QueueAgreementResult) { + o.Result = v +} + +func (o QueueAgreementResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAgreementResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueAgreementResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAgreementResponse := _QueueAgreementResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAgreementResponse) + + if err != nil { + return err + } + + *o = QueueAgreementResponse(varQueueAgreementResponse) + + return err +} + +type NullableQueueAgreementResponse struct { + value *QueueAgreementResponse + isSet bool +} + +func (v NullableQueueAgreementResponse) Get() *QueueAgreementResponse { + return v.value +} + +func (v *NullableQueueAgreementResponse) Set(val *QueueAgreementResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAgreementResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAgreementResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAgreementResponse(val *QueueAgreementResponse) *NullableQueueAgreementResponse { + return &NullableQueueAgreementResponse{value: val, isSet: true} +} + +func (v NullableQueueAgreementResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAgreementResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_agreement_result.go b/go/futureagi/model_queue_agreement_result.go new file mode 100644 index 0000000..710564f --- /dev/null +++ b/go/futureagi/model_queue_agreement_result.go @@ -0,0 +1,215 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAgreementResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAgreementResult{} + +// QueueAgreementResult struct for QueueAgreementResult +type QueueAgreementResult struct { + OverallAgreement NullableFloat32 `json:"overall_agreement"` + Labels map[string]QueueAgreementLabel `json:"labels"` + AnnotatorPairs []QueueAgreementAnnotatorPair `json:"annotator_pairs"` +} + +type _QueueAgreementResult QueueAgreementResult + +// NewQueueAgreementResult instantiates a new QueueAgreementResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAgreementResult(overallAgreement NullableFloat32, labels map[string]QueueAgreementLabel, annotatorPairs []QueueAgreementAnnotatorPair) *QueueAgreementResult { + this := QueueAgreementResult{} + this.OverallAgreement = overallAgreement + this.Labels = labels + this.AnnotatorPairs = annotatorPairs + return &this +} + +// NewQueueAgreementResultWithDefaults instantiates a new QueueAgreementResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAgreementResultWithDefaults() *QueueAgreementResult { + this := QueueAgreementResult{} + return &this +} + +// GetOverallAgreement returns the OverallAgreement field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *QueueAgreementResult) GetOverallAgreement() float32 { + if o == nil || o.OverallAgreement.Get() == nil { + var ret float32 + return ret + } + + return *o.OverallAgreement.Get() +} + +// GetOverallAgreementOk returns a tuple with the OverallAgreement field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAgreementResult) GetOverallAgreementOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.OverallAgreement.Get(), o.OverallAgreement.IsSet() +} + +// SetOverallAgreement sets field value +func (o *QueueAgreementResult) SetOverallAgreement(v float32) { + o.OverallAgreement.Set(&v) +} + +// GetLabels returns the Labels field value +func (o *QueueAgreementResult) GetLabels() map[string]QueueAgreementLabel { + if o == nil { + var ret map[string]QueueAgreementLabel + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementResult) GetLabelsOk() (*map[string]QueueAgreementLabel, bool) { + if o == nil { + return nil, false + } + return &o.Labels, true +} + +// SetLabels sets field value +func (o *QueueAgreementResult) SetLabels(v map[string]QueueAgreementLabel) { + o.Labels = v +} + +// GetAnnotatorPairs returns the AnnotatorPairs field value +func (o *QueueAgreementResult) GetAnnotatorPairs() []QueueAgreementAnnotatorPair { + if o == nil { + var ret []QueueAgreementAnnotatorPair + return ret + } + + return o.AnnotatorPairs +} + +// GetAnnotatorPairsOk returns a tuple with the AnnotatorPairs field value +// and a boolean to check if the value has been set. +func (o *QueueAgreementResult) GetAnnotatorPairsOk() ([]QueueAgreementAnnotatorPair, bool) { + if o == nil { + return nil, false + } + return o.AnnotatorPairs, true +} + +// SetAnnotatorPairs sets field value +func (o *QueueAgreementResult) SetAnnotatorPairs(v []QueueAgreementAnnotatorPair) { + o.AnnotatorPairs = v +} + +func (o QueueAgreementResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAgreementResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["overall_agreement"] = o.OverallAgreement.Get() + toSerialize["labels"] = o.Labels + toSerialize["annotator_pairs"] = o.AnnotatorPairs + return toSerialize, nil +} + +func (o *QueueAgreementResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "overall_agreement", + "labels", + "annotator_pairs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAgreementResult := _QueueAgreementResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAgreementResult) + + if err != nil { + return err + } + + *o = QueueAgreementResult(varQueueAgreementResult) + + return err +} + +type NullableQueueAgreementResult struct { + value *QueueAgreementResult + isSet bool +} + +func (v NullableQueueAgreementResult) Get() *QueueAgreementResult { + return v.value +} + +func (v *NullableQueueAgreementResult) Set(val *QueueAgreementResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAgreementResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAgreementResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAgreementResult(val *QueueAgreementResult) *NullableQueueAgreementResult { + return &NullableQueueAgreementResult{value: val, isSet: true} +} + +func (v NullableQueueAgreementResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAgreementResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_analytics_annotator_performance.go b/go/futureagi/model_queue_analytics_annotator_performance.go new file mode 100644 index 0000000..1340f85 --- /dev/null +++ b/go/futureagi/model_queue_analytics_annotator_performance.go @@ -0,0 +1,299 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the QueueAnalyticsAnnotatorPerformance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnalyticsAnnotatorPerformance{} + +// QueueAnalyticsAnnotatorPerformance struct for QueueAnalyticsAnnotatorPerformance +type QueueAnalyticsAnnotatorPerformance struct { + UserId NullableString `json:"user_id,omitempty"` + Name NullableString `json:"name,omitempty"` + Completed int32 `json:"completed"` + LastActive NullableTime `json:"last_active,omitempty"` +} + +type _QueueAnalyticsAnnotatorPerformance QueueAnalyticsAnnotatorPerformance + +// NewQueueAnalyticsAnnotatorPerformance instantiates a new QueueAnalyticsAnnotatorPerformance object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnalyticsAnnotatorPerformance(completed int32) *QueueAnalyticsAnnotatorPerformance { + this := QueueAnalyticsAnnotatorPerformance{} + this.Completed = completed + return &this +} + +// NewQueueAnalyticsAnnotatorPerformanceWithDefaults instantiates a new QueueAnalyticsAnnotatorPerformance object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnalyticsAnnotatorPerformanceWithDefaults() *QueueAnalyticsAnnotatorPerformance { + this := QueueAnalyticsAnnotatorPerformance{} + return &this +} + +// GetUserId returns the UserId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueAnalyticsAnnotatorPerformance) GetUserId() string { + if o == nil || IsNil(o.UserId.Get()) { + var ret string + return ret + } + return *o.UserId.Get() +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAnalyticsAnnotatorPerformance) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UserId.Get(), o.UserId.IsSet() +} + +// HasUserId returns a boolean if a field has been set. +func (o *QueueAnalyticsAnnotatorPerformance) HasUserId() bool { + if o != nil && o.UserId.IsSet() { + return true + } + + return false +} + +// SetUserId gets a reference to the given NullableString and assigns it to the UserId field. +func (o *QueueAnalyticsAnnotatorPerformance) SetUserId(v string) { + o.UserId.Set(&v) +} + +// SetUserIdNil sets the value for UserId to be an explicit nil +func (o *QueueAnalyticsAnnotatorPerformance) SetUserIdNil() { + o.UserId.Set(nil) +} + +// UnsetUserId ensures that no value is present for UserId, not even an explicit nil +func (o *QueueAnalyticsAnnotatorPerformance) UnsetUserId() { + o.UserId.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueAnalyticsAnnotatorPerformance) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAnalyticsAnnotatorPerformance) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *QueueAnalyticsAnnotatorPerformance) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *QueueAnalyticsAnnotatorPerformance) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *QueueAnalyticsAnnotatorPerformance) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *QueueAnalyticsAnnotatorPerformance) UnsetName() { + o.Name.Unset() +} + +// GetCompleted returns the Completed field value +func (o *QueueAnalyticsAnnotatorPerformance) GetCompleted() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Completed +} + +// GetCompletedOk returns a tuple with the Completed field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsAnnotatorPerformance) GetCompletedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Completed, true +} + +// SetCompleted sets field value +func (o *QueueAnalyticsAnnotatorPerformance) SetCompleted(v int32) { + o.Completed = v +} + +// GetLastActive returns the LastActive field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueAnalyticsAnnotatorPerformance) GetLastActive() time.Time { + if o == nil || IsNil(o.LastActive.Get()) { + var ret time.Time + return ret + } + return *o.LastActive.Get() +} + +// GetLastActiveOk returns a tuple with the LastActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAnalyticsAnnotatorPerformance) GetLastActiveOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastActive.Get(), o.LastActive.IsSet() +} + +// HasLastActive returns a boolean if a field has been set. +func (o *QueueAnalyticsAnnotatorPerformance) HasLastActive() bool { + if o != nil && o.LastActive.IsSet() { + return true + } + + return false +} + +// SetLastActive gets a reference to the given NullableTime and assigns it to the LastActive field. +func (o *QueueAnalyticsAnnotatorPerformance) SetLastActive(v time.Time) { + o.LastActive.Set(&v) +} + +// SetLastActiveNil sets the value for LastActive to be an explicit nil +func (o *QueueAnalyticsAnnotatorPerformance) SetLastActiveNil() { + o.LastActive.Set(nil) +} + +// UnsetLastActive ensures that no value is present for LastActive, not even an explicit nil +func (o *QueueAnalyticsAnnotatorPerformance) UnsetLastActive() { + o.LastActive.Unset() +} + +func (o QueueAnalyticsAnnotatorPerformance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnalyticsAnnotatorPerformance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.UserId.IsSet() { + toSerialize["user_id"] = o.UserId.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + toSerialize["completed"] = o.Completed + if o.LastActive.IsSet() { + toSerialize["last_active"] = o.LastActive.Get() + } + return toSerialize, nil +} + +func (o *QueueAnalyticsAnnotatorPerformance) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "completed", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnalyticsAnnotatorPerformance := _QueueAnalyticsAnnotatorPerformance{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnalyticsAnnotatorPerformance) + + if err != nil { + return err + } + + *o = QueueAnalyticsAnnotatorPerformance(varQueueAnalyticsAnnotatorPerformance) + + return err +} + +type NullableQueueAnalyticsAnnotatorPerformance struct { + value *QueueAnalyticsAnnotatorPerformance + isSet bool +} + +func (v NullableQueueAnalyticsAnnotatorPerformance) Get() *QueueAnalyticsAnnotatorPerformance { + return v.value +} + +func (v *NullableQueueAnalyticsAnnotatorPerformance) Set(val *QueueAnalyticsAnnotatorPerformance) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnalyticsAnnotatorPerformance) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnalyticsAnnotatorPerformance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnalyticsAnnotatorPerformance(val *QueueAnalyticsAnnotatorPerformance) *NullableQueueAnalyticsAnnotatorPerformance { + return &NullableQueueAnalyticsAnnotatorPerformance{value: val, isSet: true} +} + +func (v NullableQueueAnalyticsAnnotatorPerformance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnalyticsAnnotatorPerformance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_analytics_response.go b/go/futureagi/model_queue_analytics_response.go new file mode 100644 index 0000000..16c97f0 --- /dev/null +++ b/go/futureagi/model_queue_analytics_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAnalyticsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnalyticsResponse{} + +// QueueAnalyticsResponse struct for QueueAnalyticsResponse +type QueueAnalyticsResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueAnalyticsResult `json:"result"` +} + +type _QueueAnalyticsResponse QueueAnalyticsResponse + +// NewQueueAnalyticsResponse instantiates a new QueueAnalyticsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnalyticsResponse(result QueueAnalyticsResult) *QueueAnalyticsResponse { + this := QueueAnalyticsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueAnalyticsResponseWithDefaults instantiates a new QueueAnalyticsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnalyticsResponseWithDefaults() *QueueAnalyticsResponse { + this := QueueAnalyticsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueAnalyticsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueAnalyticsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueAnalyticsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueAnalyticsResponse) GetResult() QueueAnalyticsResult { + if o == nil { + var ret QueueAnalyticsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsResponse) GetResultOk() (*QueueAnalyticsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueAnalyticsResponse) SetResult(v QueueAnalyticsResult) { + o.Result = v +} + +func (o QueueAnalyticsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnalyticsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueAnalyticsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnalyticsResponse := _QueueAnalyticsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnalyticsResponse) + + if err != nil { + return err + } + + *o = QueueAnalyticsResponse(varQueueAnalyticsResponse) + + return err +} + +type NullableQueueAnalyticsResponse struct { + value *QueueAnalyticsResponse + isSet bool +} + +func (v NullableQueueAnalyticsResponse) Get() *QueueAnalyticsResponse { + return v.value +} + +func (v *NullableQueueAnalyticsResponse) Set(val *QueueAnalyticsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnalyticsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnalyticsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnalyticsResponse(val *QueueAnalyticsResponse) *NullableQueueAnalyticsResponse { + return &NullableQueueAnalyticsResponse{value: val, isSet: true} +} + +func (v NullableQueueAnalyticsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnalyticsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_analytics_result.go b/go/futureagi/model_queue_analytics_result.go new file mode 100644 index 0000000..5958cb2 --- /dev/null +++ b/go/futureagi/model_queue_analytics_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAnalyticsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnalyticsResult{} + +// QueueAnalyticsResult struct for QueueAnalyticsResult +type QueueAnalyticsResult struct { + Throughput QueueAnalyticsThroughput `json:"throughput"` + AnnotatorPerformance []QueueAnalyticsAnnotatorPerformance `json:"annotator_performance"` + LabelDistribution map[string]map[string]interface{} `json:"label_distribution"` + StatusBreakdown map[string]int32 `json:"status_breakdown"` + Total int32 `json:"total"` +} + +type _QueueAnalyticsResult QueueAnalyticsResult + +// NewQueueAnalyticsResult instantiates a new QueueAnalyticsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnalyticsResult(throughput QueueAnalyticsThroughput, annotatorPerformance []QueueAnalyticsAnnotatorPerformance, labelDistribution map[string]map[string]interface{}, statusBreakdown map[string]int32, total int32) *QueueAnalyticsResult { + this := QueueAnalyticsResult{} + this.Throughput = throughput + this.AnnotatorPerformance = annotatorPerformance + this.LabelDistribution = labelDistribution + this.StatusBreakdown = statusBreakdown + this.Total = total + return &this +} + +// NewQueueAnalyticsResultWithDefaults instantiates a new QueueAnalyticsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnalyticsResultWithDefaults() *QueueAnalyticsResult { + this := QueueAnalyticsResult{} + return &this +} + +// GetThroughput returns the Throughput field value +func (o *QueueAnalyticsResult) GetThroughput() QueueAnalyticsThroughput { + if o == nil { + var ret QueueAnalyticsThroughput + return ret + } + + return o.Throughput +} + +// GetThroughputOk returns a tuple with the Throughput field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsResult) GetThroughputOk() (*QueueAnalyticsThroughput, bool) { + if o == nil { + return nil, false + } + return &o.Throughput, true +} + +// SetThroughput sets field value +func (o *QueueAnalyticsResult) SetThroughput(v QueueAnalyticsThroughput) { + o.Throughput = v +} + +// GetAnnotatorPerformance returns the AnnotatorPerformance field value +func (o *QueueAnalyticsResult) GetAnnotatorPerformance() []QueueAnalyticsAnnotatorPerformance { + if o == nil { + var ret []QueueAnalyticsAnnotatorPerformance + return ret + } + + return o.AnnotatorPerformance +} + +// GetAnnotatorPerformanceOk returns a tuple with the AnnotatorPerformance field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsResult) GetAnnotatorPerformanceOk() ([]QueueAnalyticsAnnotatorPerformance, bool) { + if o == nil { + return nil, false + } + return o.AnnotatorPerformance, true +} + +// SetAnnotatorPerformance sets field value +func (o *QueueAnalyticsResult) SetAnnotatorPerformance(v []QueueAnalyticsAnnotatorPerformance) { + o.AnnotatorPerformance = v +} + +// GetLabelDistribution returns the LabelDistribution field value +func (o *QueueAnalyticsResult) GetLabelDistribution() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.LabelDistribution +} + +// GetLabelDistributionOk returns a tuple with the LabelDistribution field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsResult) GetLabelDistributionOk() (*map[string]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return &o.LabelDistribution, true +} + +// SetLabelDistribution sets field value +func (o *QueueAnalyticsResult) SetLabelDistribution(v map[string]map[string]interface{}) { + o.LabelDistribution = v +} + +// GetStatusBreakdown returns the StatusBreakdown field value +func (o *QueueAnalyticsResult) GetStatusBreakdown() map[string]int32 { + if o == nil { + var ret map[string]int32 + return ret + } + + return o.StatusBreakdown +} + +// GetStatusBreakdownOk returns a tuple with the StatusBreakdown field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsResult) GetStatusBreakdownOk() (*map[string]int32, bool) { + if o == nil { + return nil, false + } + return &o.StatusBreakdown, true +} + +// SetStatusBreakdown sets field value +func (o *QueueAnalyticsResult) SetStatusBreakdown(v map[string]int32) { + o.StatusBreakdown = v +} + +// GetTotal returns the Total field value +func (o *QueueAnalyticsResult) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsResult) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *QueueAnalyticsResult) SetTotal(v int32) { + o.Total = v +} + +func (o QueueAnalyticsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnalyticsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["throughput"] = o.Throughput + toSerialize["annotator_performance"] = o.AnnotatorPerformance + toSerialize["label_distribution"] = o.LabelDistribution + toSerialize["status_breakdown"] = o.StatusBreakdown + toSerialize["total"] = o.Total + return toSerialize, nil +} + +func (o *QueueAnalyticsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "throughput", + "annotator_performance", + "label_distribution", + "status_breakdown", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnalyticsResult := _QueueAnalyticsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnalyticsResult) + + if err != nil { + return err + } + + *o = QueueAnalyticsResult(varQueueAnalyticsResult) + + return err +} + +type NullableQueueAnalyticsResult struct { + value *QueueAnalyticsResult + isSet bool +} + +func (v NullableQueueAnalyticsResult) Get() *QueueAnalyticsResult { + return v.value +} + +func (v *NullableQueueAnalyticsResult) Set(val *QueueAnalyticsResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnalyticsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnalyticsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnalyticsResult(val *QueueAnalyticsResult) *NullableQueueAnalyticsResult { + return &NullableQueueAnalyticsResult{value: val, isSet: true} +} + +func (v NullableQueueAnalyticsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnalyticsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_analytics_throughput.go b/go/futureagi/model_queue_analytics_throughput.go new file mode 100644 index 0000000..fe654d9 --- /dev/null +++ b/go/futureagi/model_queue_analytics_throughput.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAnalyticsThroughput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnalyticsThroughput{} + +// QueueAnalyticsThroughput struct for QueueAnalyticsThroughput +type QueueAnalyticsThroughput struct { + Daily []QueueAnalyticsThroughputDaily `json:"daily"` + TotalCompleted int32 `json:"total_completed"` + AvgPerDay float32 `json:"avg_per_day"` +} + +type _QueueAnalyticsThroughput QueueAnalyticsThroughput + +// NewQueueAnalyticsThroughput instantiates a new QueueAnalyticsThroughput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnalyticsThroughput(daily []QueueAnalyticsThroughputDaily, totalCompleted int32, avgPerDay float32) *QueueAnalyticsThroughput { + this := QueueAnalyticsThroughput{} + this.Daily = daily + this.TotalCompleted = totalCompleted + this.AvgPerDay = avgPerDay + return &this +} + +// NewQueueAnalyticsThroughputWithDefaults instantiates a new QueueAnalyticsThroughput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnalyticsThroughputWithDefaults() *QueueAnalyticsThroughput { + this := QueueAnalyticsThroughput{} + return &this +} + +// GetDaily returns the Daily field value +func (o *QueueAnalyticsThroughput) GetDaily() []QueueAnalyticsThroughputDaily { + if o == nil { + var ret []QueueAnalyticsThroughputDaily + return ret + } + + return o.Daily +} + +// GetDailyOk returns a tuple with the Daily field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsThroughput) GetDailyOk() ([]QueueAnalyticsThroughputDaily, bool) { + if o == nil { + return nil, false + } + return o.Daily, true +} + +// SetDaily sets field value +func (o *QueueAnalyticsThroughput) SetDaily(v []QueueAnalyticsThroughputDaily) { + o.Daily = v +} + +// GetTotalCompleted returns the TotalCompleted field value +func (o *QueueAnalyticsThroughput) GetTotalCompleted() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalCompleted +} + +// GetTotalCompletedOk returns a tuple with the TotalCompleted field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsThroughput) GetTotalCompletedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalCompleted, true +} + +// SetTotalCompleted sets field value +func (o *QueueAnalyticsThroughput) SetTotalCompleted(v int32) { + o.TotalCompleted = v +} + +// GetAvgPerDay returns the AvgPerDay field value +func (o *QueueAnalyticsThroughput) GetAvgPerDay() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgPerDay +} + +// GetAvgPerDayOk returns a tuple with the AvgPerDay field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsThroughput) GetAvgPerDayOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgPerDay, true +} + +// SetAvgPerDay sets field value +func (o *QueueAnalyticsThroughput) SetAvgPerDay(v float32) { + o.AvgPerDay = v +} + +func (o QueueAnalyticsThroughput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnalyticsThroughput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["daily"] = o.Daily + toSerialize["total_completed"] = o.TotalCompleted + toSerialize["avg_per_day"] = o.AvgPerDay + return toSerialize, nil +} + +func (o *QueueAnalyticsThroughput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "daily", + "total_completed", + "avg_per_day", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnalyticsThroughput := _QueueAnalyticsThroughput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnalyticsThroughput) + + if err != nil { + return err + } + + *o = QueueAnalyticsThroughput(varQueueAnalyticsThroughput) + + return err +} + +type NullableQueueAnalyticsThroughput struct { + value *QueueAnalyticsThroughput + isSet bool +} + +func (v NullableQueueAnalyticsThroughput) Get() *QueueAnalyticsThroughput { + return v.value +} + +func (v *NullableQueueAnalyticsThroughput) Set(val *QueueAnalyticsThroughput) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnalyticsThroughput) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnalyticsThroughput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnalyticsThroughput(val *QueueAnalyticsThroughput) *NullableQueueAnalyticsThroughput { + return &NullableQueueAnalyticsThroughput{value: val, isSet: true} +} + +func (v NullableQueueAnalyticsThroughput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnalyticsThroughput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_analytics_throughput_daily.go b/go/futureagi/model_queue_analytics_throughput_daily.go new file mode 100644 index 0000000..2636c10 --- /dev/null +++ b/go/futureagi/model_queue_analytics_throughput_daily.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAnalyticsThroughputDaily type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnalyticsThroughputDaily{} + +// QueueAnalyticsThroughputDaily struct for QueueAnalyticsThroughputDaily +type QueueAnalyticsThroughputDaily struct { + Date string `json:"date"` + Count int32 `json:"count"` +} + +type _QueueAnalyticsThroughputDaily QueueAnalyticsThroughputDaily + +// NewQueueAnalyticsThroughputDaily instantiates a new QueueAnalyticsThroughputDaily object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnalyticsThroughputDaily(date string, count int32) *QueueAnalyticsThroughputDaily { + this := QueueAnalyticsThroughputDaily{} + this.Date = date + this.Count = count + return &this +} + +// NewQueueAnalyticsThroughputDailyWithDefaults instantiates a new QueueAnalyticsThroughputDaily object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnalyticsThroughputDailyWithDefaults() *QueueAnalyticsThroughputDaily { + this := QueueAnalyticsThroughputDaily{} + return &this +} + +// GetDate returns the Date field value +func (o *QueueAnalyticsThroughputDaily) GetDate() string { + if o == nil { + var ret string + return ret + } + + return o.Date +} + +// GetDateOk returns a tuple with the Date field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsThroughputDaily) GetDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Date, true +} + +// SetDate sets field value +func (o *QueueAnalyticsThroughputDaily) SetDate(v string) { + o.Date = v +} + +// GetCount returns the Count field value +func (o *QueueAnalyticsThroughputDaily) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *QueueAnalyticsThroughputDaily) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *QueueAnalyticsThroughputDaily) SetCount(v int32) { + o.Count = v +} + +func (o QueueAnalyticsThroughputDaily) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnalyticsThroughputDaily) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["date"] = o.Date + toSerialize["count"] = o.Count + return toSerialize, nil +} + +func (o *QueueAnalyticsThroughputDaily) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "date", + "count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnalyticsThroughputDaily := _QueueAnalyticsThroughputDaily{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnalyticsThroughputDaily) + + if err != nil { + return err + } + + *o = QueueAnalyticsThroughputDaily(varQueueAnalyticsThroughputDaily) + + return err +} + +type NullableQueueAnalyticsThroughputDaily struct { + value *QueueAnalyticsThroughputDaily + isSet bool +} + +func (v NullableQueueAnalyticsThroughputDaily) Get() *QueueAnalyticsThroughputDaily { + return v.value +} + +func (v *NullableQueueAnalyticsThroughputDaily) Set(val *QueueAnalyticsThroughputDaily) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnalyticsThroughputDaily) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnalyticsThroughputDaily) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnalyticsThroughputDaily(val *QueueAnalyticsThroughputDaily) *NullableQueueAnalyticsThroughputDaily { + return &NullableQueueAnalyticsThroughputDaily{value: val, isSet: true} +} + +func (v NullableQueueAnalyticsThroughputDaily) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnalyticsThroughputDaily) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_annotate_detail_response.go b/go/futureagi/model_queue_annotate_detail_response.go new file mode 100644 index 0000000..051ab85 --- /dev/null +++ b/go/futureagi/model_queue_annotate_detail_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAnnotateDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnnotateDetailResponse{} + +// QueueAnnotateDetailResponse struct for QueueAnnotateDetailResponse +type QueueAnnotateDetailResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueAnnotateDetailResult `json:"result"` +} + +type _QueueAnnotateDetailResponse QueueAnnotateDetailResponse + +// NewQueueAnnotateDetailResponse instantiates a new QueueAnnotateDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnnotateDetailResponse(result QueueAnnotateDetailResult) *QueueAnnotateDetailResponse { + this := QueueAnnotateDetailResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueAnnotateDetailResponseWithDefaults instantiates a new QueueAnnotateDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnnotateDetailResponseWithDefaults() *QueueAnnotateDetailResponse { + this := QueueAnnotateDetailResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueAnnotateDetailResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueAnnotateDetailResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueAnnotateDetailResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueAnnotateDetailResponse) GetResult() QueueAnnotateDetailResult { + if o == nil { + var ret QueueAnnotateDetailResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResponse) GetResultOk() (*QueueAnnotateDetailResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueAnnotateDetailResponse) SetResult(v QueueAnnotateDetailResult) { + o.Result = v +} + +func (o QueueAnnotateDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnnotateDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueAnnotateDetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnnotateDetailResponse := _QueueAnnotateDetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnnotateDetailResponse) + + if err != nil { + return err + } + + *o = QueueAnnotateDetailResponse(varQueueAnnotateDetailResponse) + + return err +} + +type NullableQueueAnnotateDetailResponse struct { + value *QueueAnnotateDetailResponse + isSet bool +} + +func (v NullableQueueAnnotateDetailResponse) Get() *QueueAnnotateDetailResponse { + return v.value +} + +func (v *NullableQueueAnnotateDetailResponse) Set(val *QueueAnnotateDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnnotateDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnnotateDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnnotateDetailResponse(val *QueueAnnotateDetailResponse) *NullableQueueAnnotateDetailResponse { + return &NullableQueueAnnotateDetailResponse{value: val, isSet: true} +} + +func (v NullableQueueAnnotateDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnnotateDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_annotate_detail_result.go b/go/futureagi/model_queue_annotate_detail_result.go new file mode 100644 index 0000000..c82bcdd --- /dev/null +++ b/go/futureagi/model_queue_annotate_detail_result.go @@ -0,0 +1,522 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAnnotateDetailResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnnotateDetailResult{} + +// QueueAnnotateDetailResult struct for QueueAnnotateDetailResult +type QueueAnnotateDetailResult struct { + Item map[string]interface{} `json:"item"` + Queue map[string]interface{} `json:"queue"` + Labels []map[string]interface{} `json:"labels"` + Annotations []map[string]interface{} `json:"annotations"` + ReviewComments []map[string]interface{} `json:"review_comments"` + ReviewThreads []map[string]interface{} `json:"review_threads"` + ExistingNotes string `json:"existing_notes"` + SpanNotes []map[string]interface{} `json:"span_notes"` + SpanNotesSourceId NullableString `json:"span_notes_source_id,omitempty"` + Progress map[string]interface{} `json:"progress"` + NextItemId NullableString `json:"next_item_id,omitempty"` + PrevItemId NullableString `json:"prev_item_id,omitempty"` +} + +type _QueueAnnotateDetailResult QueueAnnotateDetailResult + +// NewQueueAnnotateDetailResult instantiates a new QueueAnnotateDetailResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnnotateDetailResult(item map[string]interface{}, queue map[string]interface{}, labels []map[string]interface{}, annotations []map[string]interface{}, reviewComments []map[string]interface{}, reviewThreads []map[string]interface{}, existingNotes string, spanNotes []map[string]interface{}, progress map[string]interface{}) *QueueAnnotateDetailResult { + this := QueueAnnotateDetailResult{} + this.Item = item + this.Queue = queue + this.Labels = labels + this.Annotations = annotations + this.ReviewComments = reviewComments + this.ReviewThreads = reviewThreads + this.ExistingNotes = existingNotes + this.SpanNotes = spanNotes + this.Progress = progress + return &this +} + +// NewQueueAnnotateDetailResultWithDefaults instantiates a new QueueAnnotateDetailResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnnotateDetailResultWithDefaults() *QueueAnnotateDetailResult { + this := QueueAnnotateDetailResult{} + return &this +} + +// GetItem returns the Item field value +func (o *QueueAnnotateDetailResult) GetItem() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Item +} + +// GetItemOk returns a tuple with the Item field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetItemOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Item, true +} + +// SetItem sets field value +func (o *QueueAnnotateDetailResult) SetItem(v map[string]interface{}) { + o.Item = v +} + +// GetQueue returns the Queue field value +func (o *QueueAnnotateDetailResult) GetQueue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Queue +} + +// GetQueueOk returns a tuple with the Queue field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetQueueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Queue, true +} + +// SetQueue sets field value +func (o *QueueAnnotateDetailResult) SetQueue(v map[string]interface{}) { + o.Queue = v +} + +// GetLabels returns the Labels field value +func (o *QueueAnnotateDetailResult) GetLabels() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetLabelsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Labels, true +} + +// SetLabels sets field value +func (o *QueueAnnotateDetailResult) SetLabels(v []map[string]interface{}) { + o.Labels = v +} + +// GetAnnotations returns the Annotations field value +func (o *QueueAnnotateDetailResult) GetAnnotations() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Annotations +} + +// GetAnnotationsOk returns a tuple with the Annotations field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetAnnotationsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Annotations, true +} + +// SetAnnotations sets field value +func (o *QueueAnnotateDetailResult) SetAnnotations(v []map[string]interface{}) { + o.Annotations = v +} + +// GetReviewComments returns the ReviewComments field value +func (o *QueueAnnotateDetailResult) GetReviewComments() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.ReviewComments +} + +// GetReviewCommentsOk returns a tuple with the ReviewComments field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetReviewCommentsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ReviewComments, true +} + +// SetReviewComments sets field value +func (o *QueueAnnotateDetailResult) SetReviewComments(v []map[string]interface{}) { + o.ReviewComments = v +} + +// GetReviewThreads returns the ReviewThreads field value +func (o *QueueAnnotateDetailResult) GetReviewThreads() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.ReviewThreads +} + +// GetReviewThreadsOk returns a tuple with the ReviewThreads field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetReviewThreadsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ReviewThreads, true +} + +// SetReviewThreads sets field value +func (o *QueueAnnotateDetailResult) SetReviewThreads(v []map[string]interface{}) { + o.ReviewThreads = v +} + +// GetExistingNotes returns the ExistingNotes field value +func (o *QueueAnnotateDetailResult) GetExistingNotes() string { + if o == nil { + var ret string + return ret + } + + return o.ExistingNotes +} + +// GetExistingNotesOk returns a tuple with the ExistingNotes field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetExistingNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExistingNotes, true +} + +// SetExistingNotes sets field value +func (o *QueueAnnotateDetailResult) SetExistingNotes(v string) { + o.ExistingNotes = v +} + +// GetSpanNotes returns the SpanNotes field value +func (o *QueueAnnotateDetailResult) GetSpanNotes() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.SpanNotes +} + +// GetSpanNotesOk returns a tuple with the SpanNotes field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetSpanNotesOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.SpanNotes, true +} + +// SetSpanNotes sets field value +func (o *QueueAnnotateDetailResult) SetSpanNotes(v []map[string]interface{}) { + o.SpanNotes = v +} + +// GetSpanNotesSourceId returns the SpanNotesSourceId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueAnnotateDetailResult) GetSpanNotesSourceId() string { + if o == nil || IsNil(o.SpanNotesSourceId.Get()) { + var ret string + return ret + } + return *o.SpanNotesSourceId.Get() +} + +// GetSpanNotesSourceIdOk returns a tuple with the SpanNotesSourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAnnotateDetailResult) GetSpanNotesSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SpanNotesSourceId.Get(), o.SpanNotesSourceId.IsSet() +} + +// HasSpanNotesSourceId returns a boolean if a field has been set. +func (o *QueueAnnotateDetailResult) HasSpanNotesSourceId() bool { + if o != nil && o.SpanNotesSourceId.IsSet() { + return true + } + + return false +} + +// SetSpanNotesSourceId gets a reference to the given NullableString and assigns it to the SpanNotesSourceId field. +func (o *QueueAnnotateDetailResult) SetSpanNotesSourceId(v string) { + o.SpanNotesSourceId.Set(&v) +} + +// SetSpanNotesSourceIdNil sets the value for SpanNotesSourceId to be an explicit nil +func (o *QueueAnnotateDetailResult) SetSpanNotesSourceIdNil() { + o.SpanNotesSourceId.Set(nil) +} + +// UnsetSpanNotesSourceId ensures that no value is present for SpanNotesSourceId, not even an explicit nil +func (o *QueueAnnotateDetailResult) UnsetSpanNotesSourceId() { + o.SpanNotesSourceId.Unset() +} + +// GetProgress returns the Progress field value +func (o *QueueAnnotateDetailResult) GetProgress() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Progress +} + +// GetProgressOk returns a tuple with the Progress field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotateDetailResult) GetProgressOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Progress, true +} + +// SetProgress sets field value +func (o *QueueAnnotateDetailResult) SetProgress(v map[string]interface{}) { + o.Progress = v +} + +// GetNextItemId returns the NextItemId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueAnnotateDetailResult) GetNextItemId() string { + if o == nil || IsNil(o.NextItemId.Get()) { + var ret string + return ret + } + return *o.NextItemId.Get() +} + +// GetNextItemIdOk returns a tuple with the NextItemId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAnnotateDetailResult) GetNextItemIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextItemId.Get(), o.NextItemId.IsSet() +} + +// HasNextItemId returns a boolean if a field has been set. +func (o *QueueAnnotateDetailResult) HasNextItemId() bool { + if o != nil && o.NextItemId.IsSet() { + return true + } + + return false +} + +// SetNextItemId gets a reference to the given NullableString and assigns it to the NextItemId field. +func (o *QueueAnnotateDetailResult) SetNextItemId(v string) { + o.NextItemId.Set(&v) +} + +// SetNextItemIdNil sets the value for NextItemId to be an explicit nil +func (o *QueueAnnotateDetailResult) SetNextItemIdNil() { + o.NextItemId.Set(nil) +} + +// UnsetNextItemId ensures that no value is present for NextItemId, not even an explicit nil +func (o *QueueAnnotateDetailResult) UnsetNextItemId() { + o.NextItemId.Unset() +} + +// GetPrevItemId returns the PrevItemId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueAnnotateDetailResult) GetPrevItemId() string { + if o == nil || IsNil(o.PrevItemId.Get()) { + var ret string + return ret + } + return *o.PrevItemId.Get() +} + +// GetPrevItemIdOk returns a tuple with the PrevItemId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueAnnotateDetailResult) GetPrevItemIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrevItemId.Get(), o.PrevItemId.IsSet() +} + +// HasPrevItemId returns a boolean if a field has been set. +func (o *QueueAnnotateDetailResult) HasPrevItemId() bool { + if o != nil && o.PrevItemId.IsSet() { + return true + } + + return false +} + +// SetPrevItemId gets a reference to the given NullableString and assigns it to the PrevItemId field. +func (o *QueueAnnotateDetailResult) SetPrevItemId(v string) { + o.PrevItemId.Set(&v) +} + +// SetPrevItemIdNil sets the value for PrevItemId to be an explicit nil +func (o *QueueAnnotateDetailResult) SetPrevItemIdNil() { + o.PrevItemId.Set(nil) +} + +// UnsetPrevItemId ensures that no value is present for PrevItemId, not even an explicit nil +func (o *QueueAnnotateDetailResult) UnsetPrevItemId() { + o.PrevItemId.Unset() +} + +func (o QueueAnnotateDetailResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnnotateDetailResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["item"] = o.Item + toSerialize["queue"] = o.Queue + toSerialize["labels"] = o.Labels + toSerialize["annotations"] = o.Annotations + toSerialize["review_comments"] = o.ReviewComments + toSerialize["review_threads"] = o.ReviewThreads + toSerialize["existing_notes"] = o.ExistingNotes + toSerialize["span_notes"] = o.SpanNotes + if o.SpanNotesSourceId.IsSet() { + toSerialize["span_notes_source_id"] = o.SpanNotesSourceId.Get() + } + toSerialize["progress"] = o.Progress + if o.NextItemId.IsSet() { + toSerialize["next_item_id"] = o.NextItemId.Get() + } + if o.PrevItemId.IsSet() { + toSerialize["prev_item_id"] = o.PrevItemId.Get() + } + return toSerialize, nil +} + +func (o *QueueAnnotateDetailResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "item", + "queue", + "labels", + "annotations", + "review_comments", + "review_threads", + "existing_notes", + "span_notes", + "progress", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnnotateDetailResult := _QueueAnnotateDetailResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnnotateDetailResult) + + if err != nil { + return err + } + + *o = QueueAnnotateDetailResult(varQueueAnnotateDetailResult) + + return err +} + +type NullableQueueAnnotateDetailResult struct { + value *QueueAnnotateDetailResult + isSet bool +} + +func (v NullableQueueAnnotateDetailResult) Get() *QueueAnnotateDetailResult { + return v.value +} + +func (v *NullableQueueAnnotateDetailResult) Set(val *QueueAnnotateDetailResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnnotateDetailResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnnotateDetailResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnnotateDetailResult(val *QueueAnnotateDetailResult) *NullableQueueAnnotateDetailResult { + return &NullableQueueAnnotateDetailResult{value: val, isSet: true} +} + +func (v NullableQueueAnnotateDetailResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnnotateDetailResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_annotator_nested.go b/go/futureagi/model_queue_annotator_nested.go new file mode 100644 index 0000000..deeb299 --- /dev/null +++ b/go/futureagi/model_queue_annotator_nested.go @@ -0,0 +1,341 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAnnotatorNested type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAnnotatorNested{} + +// QueueAnnotatorNested struct for QueueAnnotatorNested +type QueueAnnotatorNested struct { + Id *string `json:"id,omitempty"` + UserId string `json:"user_id"` + Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Role *string `json:"role,omitempty"` + Roles *string `json:"roles,omitempty"` +} + +type _QueueAnnotatorNested QueueAnnotatorNested + +// NewQueueAnnotatorNested instantiates a new QueueAnnotatorNested object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAnnotatorNested(userId string) *QueueAnnotatorNested { + this := QueueAnnotatorNested{} + this.UserId = userId + var role string = "annotator" + this.Role = &role + return &this +} + +// NewQueueAnnotatorNestedWithDefaults instantiates a new QueueAnnotatorNested object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAnnotatorNestedWithDefaults() *QueueAnnotatorNested { + this := QueueAnnotatorNested{} + var role string = "annotator" + this.Role = &role + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *QueueAnnotatorNested) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAnnotatorNested) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *QueueAnnotatorNested) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *QueueAnnotatorNested) SetId(v string) { + o.Id = &v +} + +// GetUserId returns the UserId field value +func (o *QueueAnnotatorNested) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *QueueAnnotatorNested) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *QueueAnnotatorNested) SetUserId(v string) { + o.UserId = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *QueueAnnotatorNested) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAnnotatorNested) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *QueueAnnotatorNested) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *QueueAnnotatorNested) SetName(v string) { + o.Name = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *QueueAnnotatorNested) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAnnotatorNested) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *QueueAnnotatorNested) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *QueueAnnotatorNested) SetEmail(v string) { + o.Email = &v +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *QueueAnnotatorNested) GetRole() string { + if o == nil || IsNil(o.Role) { + var ret string + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAnnotatorNested) GetRoleOk() (*string, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *QueueAnnotatorNested) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given string and assigns it to the Role field. +func (o *QueueAnnotatorNested) SetRole(v string) { + o.Role = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *QueueAnnotatorNested) GetRoles() string { + if o == nil || IsNil(o.Roles) { + var ret string + return ret + } + return *o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAnnotatorNested) GetRolesOk() (*string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *QueueAnnotatorNested) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given string and assigns it to the Roles field. +func (o *QueueAnnotatorNested) SetRoles(v string) { + o.Roles = &v +} + +func (o QueueAnnotatorNested) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAnnotatorNested) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["user_id"] = o.UserId + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +func (o *QueueAnnotatorNested) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAnnotatorNested := _QueueAnnotatorNested{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAnnotatorNested) + + if err != nil { + return err + } + + *o = QueueAnnotatorNested(varQueueAnnotatorNested) + + return err +} + +type NullableQueueAnnotatorNested struct { + value *QueueAnnotatorNested + isSet bool +} + +func (v NullableQueueAnnotatorNested) Get() *QueueAnnotatorNested { + return v.value +} + +func (v *NullableQueueAnnotatorNested) Set(val *QueueAnnotatorNested) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAnnotatorNested) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAnnotatorNested) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAnnotatorNested(val *QueueAnnotatorNested) *NullableQueueAnnotatorNested { + return &NullableQueueAnnotatorNested{value: val, isSet: true} +} + +func (v NullableQueueAnnotatorNested) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAnnotatorNested) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_assign_items_response.go b/go/futureagi/model_queue_assign_items_response.go new file mode 100644 index 0000000..ce26544 --- /dev/null +++ b/go/futureagi/model_queue_assign_items_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAssignItemsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAssignItemsResponse{} + +// QueueAssignItemsResponse struct for QueueAssignItemsResponse +type QueueAssignItemsResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueAssignItemsResult `json:"result"` +} + +type _QueueAssignItemsResponse QueueAssignItemsResponse + +// NewQueueAssignItemsResponse instantiates a new QueueAssignItemsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAssignItemsResponse(result QueueAssignItemsResult) *QueueAssignItemsResponse { + this := QueueAssignItemsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueAssignItemsResponseWithDefaults instantiates a new QueueAssignItemsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAssignItemsResponseWithDefaults() *QueueAssignItemsResponse { + this := QueueAssignItemsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueAssignItemsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueAssignItemsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueAssignItemsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueAssignItemsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueAssignItemsResponse) GetResult() QueueAssignItemsResult { + if o == nil { + var ret QueueAssignItemsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueAssignItemsResponse) GetResultOk() (*QueueAssignItemsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueAssignItemsResponse) SetResult(v QueueAssignItemsResult) { + o.Result = v +} + +func (o QueueAssignItemsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAssignItemsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueAssignItemsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAssignItemsResponse := _QueueAssignItemsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAssignItemsResponse) + + if err != nil { + return err + } + + *o = QueueAssignItemsResponse(varQueueAssignItemsResponse) + + return err +} + +type NullableQueueAssignItemsResponse struct { + value *QueueAssignItemsResponse + isSet bool +} + +func (v NullableQueueAssignItemsResponse) Get() *QueueAssignItemsResponse { + return v.value +} + +func (v *NullableQueueAssignItemsResponse) Set(val *QueueAssignItemsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAssignItemsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAssignItemsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAssignItemsResponse(val *QueueAssignItemsResponse) *NullableQueueAssignItemsResponse { + return &NullableQueueAssignItemsResponse{value: val, isSet: true} +} + +func (v NullableQueueAssignItemsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAssignItemsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_assign_items_result.go b/go/futureagi/model_queue_assign_items_result.go new file mode 100644 index 0000000..636b69c --- /dev/null +++ b/go/futureagi/model_queue_assign_items_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueAssignItemsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueAssignItemsResult{} + +// QueueAssignItemsResult struct for QueueAssignItemsResult +type QueueAssignItemsResult struct { + Assigned int32 `json:"assigned"` +} + +type _QueueAssignItemsResult QueueAssignItemsResult + +// NewQueueAssignItemsResult instantiates a new QueueAssignItemsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueAssignItemsResult(assigned int32) *QueueAssignItemsResult { + this := QueueAssignItemsResult{} + this.Assigned = assigned + return &this +} + +// NewQueueAssignItemsResultWithDefaults instantiates a new QueueAssignItemsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueAssignItemsResultWithDefaults() *QueueAssignItemsResult { + this := QueueAssignItemsResult{} + return &this +} + +// GetAssigned returns the Assigned field value +func (o *QueueAssignItemsResult) GetAssigned() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Assigned +} + +// GetAssignedOk returns a tuple with the Assigned field value +// and a boolean to check if the value has been set. +func (o *QueueAssignItemsResult) GetAssignedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Assigned, true +} + +// SetAssigned sets field value +func (o *QueueAssignItemsResult) SetAssigned(v int32) { + o.Assigned = v +} + +func (o QueueAssignItemsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueAssignItemsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["assigned"] = o.Assigned + return toSerialize, nil +} + +func (o *QueueAssignItemsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "assigned", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueAssignItemsResult := _QueueAssignItemsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueAssignItemsResult) + + if err != nil { + return err + } + + *o = QueueAssignItemsResult(varQueueAssignItemsResult) + + return err +} + +type NullableQueueAssignItemsResult struct { + value *QueueAssignItemsResult + isSet bool +} + +func (v NullableQueueAssignItemsResult) Get() *QueueAssignItemsResult { + return v.value +} + +func (v *NullableQueueAssignItemsResult) Set(val *QueueAssignItemsResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueAssignItemsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueAssignItemsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueAssignItemsResult(val *QueueAssignItemsResult) *NullableQueueAssignItemsResult { + return &NullableQueueAssignItemsResult{value: val, isSet: true} +} + +func (v NullableQueueAssignItemsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueAssignItemsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_bulk_remove_items_response.go b/go/futureagi/model_queue_bulk_remove_items_response.go new file mode 100644 index 0000000..27f4c84 --- /dev/null +++ b/go/futureagi/model_queue_bulk_remove_items_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueBulkRemoveItemsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueBulkRemoveItemsResponse{} + +// QueueBulkRemoveItemsResponse struct for QueueBulkRemoveItemsResponse +type QueueBulkRemoveItemsResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueBulkRemoveItemsResult `json:"result"` +} + +type _QueueBulkRemoveItemsResponse QueueBulkRemoveItemsResponse + +// NewQueueBulkRemoveItemsResponse instantiates a new QueueBulkRemoveItemsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueBulkRemoveItemsResponse(result QueueBulkRemoveItemsResult) *QueueBulkRemoveItemsResponse { + this := QueueBulkRemoveItemsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueBulkRemoveItemsResponseWithDefaults instantiates a new QueueBulkRemoveItemsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueBulkRemoveItemsResponseWithDefaults() *QueueBulkRemoveItemsResponse { + this := QueueBulkRemoveItemsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueBulkRemoveItemsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueBulkRemoveItemsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueBulkRemoveItemsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueBulkRemoveItemsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueBulkRemoveItemsResponse) GetResult() QueueBulkRemoveItemsResult { + if o == nil { + var ret QueueBulkRemoveItemsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueBulkRemoveItemsResponse) GetResultOk() (*QueueBulkRemoveItemsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueBulkRemoveItemsResponse) SetResult(v QueueBulkRemoveItemsResult) { + o.Result = v +} + +func (o QueueBulkRemoveItemsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueBulkRemoveItemsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueBulkRemoveItemsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueBulkRemoveItemsResponse := _QueueBulkRemoveItemsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueBulkRemoveItemsResponse) + + if err != nil { + return err + } + + *o = QueueBulkRemoveItemsResponse(varQueueBulkRemoveItemsResponse) + + return err +} + +type NullableQueueBulkRemoveItemsResponse struct { + value *QueueBulkRemoveItemsResponse + isSet bool +} + +func (v NullableQueueBulkRemoveItemsResponse) Get() *QueueBulkRemoveItemsResponse { + return v.value +} + +func (v *NullableQueueBulkRemoveItemsResponse) Set(val *QueueBulkRemoveItemsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueBulkRemoveItemsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueBulkRemoveItemsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueBulkRemoveItemsResponse(val *QueueBulkRemoveItemsResponse) *NullableQueueBulkRemoveItemsResponse { + return &NullableQueueBulkRemoveItemsResponse{value: val, isSet: true} +} + +func (v NullableQueueBulkRemoveItemsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueBulkRemoveItemsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_bulk_remove_items_result.go b/go/futureagi/model_queue_bulk_remove_items_result.go new file mode 100644 index 0000000..3e2a87f --- /dev/null +++ b/go/futureagi/model_queue_bulk_remove_items_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueBulkRemoveItemsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueBulkRemoveItemsResult{} + +// QueueBulkRemoveItemsResult struct for QueueBulkRemoveItemsResult +type QueueBulkRemoveItemsResult struct { + Removed int32 `json:"removed"` +} + +type _QueueBulkRemoveItemsResult QueueBulkRemoveItemsResult + +// NewQueueBulkRemoveItemsResult instantiates a new QueueBulkRemoveItemsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueBulkRemoveItemsResult(removed int32) *QueueBulkRemoveItemsResult { + this := QueueBulkRemoveItemsResult{} + this.Removed = removed + return &this +} + +// NewQueueBulkRemoveItemsResultWithDefaults instantiates a new QueueBulkRemoveItemsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueBulkRemoveItemsResultWithDefaults() *QueueBulkRemoveItemsResult { + this := QueueBulkRemoveItemsResult{} + return &this +} + +// GetRemoved returns the Removed field value +func (o *QueueBulkRemoveItemsResult) GetRemoved() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Removed +} + +// GetRemovedOk returns a tuple with the Removed field value +// and a boolean to check if the value has been set. +func (o *QueueBulkRemoveItemsResult) GetRemovedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Removed, true +} + +// SetRemoved sets field value +func (o *QueueBulkRemoveItemsResult) SetRemoved(v int32) { + o.Removed = v +} + +func (o QueueBulkRemoveItemsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueBulkRemoveItemsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["removed"] = o.Removed + return toSerialize, nil +} + +func (o *QueueBulkRemoveItemsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "removed", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueBulkRemoveItemsResult := _QueueBulkRemoveItemsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueBulkRemoveItemsResult) + + if err != nil { + return err + } + + *o = QueueBulkRemoveItemsResult(varQueueBulkRemoveItemsResult) + + return err +} + +type NullableQueueBulkRemoveItemsResult struct { + value *QueueBulkRemoveItemsResult + isSet bool +} + +func (v NullableQueueBulkRemoveItemsResult) Get() *QueueBulkRemoveItemsResult { + return v.value +} + +func (v *NullableQueueBulkRemoveItemsResult) Set(val *QueueBulkRemoveItemsResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueBulkRemoveItemsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueBulkRemoveItemsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueBulkRemoveItemsResult(val *QueueBulkRemoveItemsResult) *NullableQueueBulkRemoveItemsResult { + return &NullableQueueBulkRemoveItemsResult{value: val, isSet: true} +} + +func (v NullableQueueBulkRemoveItemsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueBulkRemoveItemsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_default_queue.go b/go/futureagi/model_queue_default_queue.go new file mode 100644 index 0000000..d6c2bc2 --- /dev/null +++ b/go/futureagi/model_queue_default_queue.go @@ -0,0 +1,313 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueDefaultQueue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueDefaultQueue{} + +// QueueDefaultQueue struct for QueueDefaultQueue +type QueueDefaultQueue struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Instructions *string `json:"instructions,omitempty"` + Status string `json:"status"` + IsDefault bool `json:"is_default"` +} + +type _QueueDefaultQueue QueueDefaultQueue + +// NewQueueDefaultQueue instantiates a new QueueDefaultQueue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueDefaultQueue(id string, name string, status string, isDefault bool) *QueueDefaultQueue { + this := QueueDefaultQueue{} + this.Id = id + this.Name = name + this.Status = status + this.IsDefault = isDefault + return &this +} + +// NewQueueDefaultQueueWithDefaults instantiates a new QueueDefaultQueue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueDefaultQueueWithDefaults() *QueueDefaultQueue { + this := QueueDefaultQueue{} + return &this +} + +// GetId returns the Id field value +func (o *QueueDefaultQueue) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultQueue) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *QueueDefaultQueue) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *QueueDefaultQueue) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultQueue) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *QueueDefaultQueue) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *QueueDefaultQueue) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDefaultQueue) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *QueueDefaultQueue) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *QueueDefaultQueue) SetDescription(v string) { + o.Description = &v +} + +// GetInstructions returns the Instructions field value if set, zero value otherwise. +func (o *QueueDefaultQueue) GetInstructions() string { + if o == nil || IsNil(o.Instructions) { + var ret string + return ret + } + return *o.Instructions +} + +// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDefaultQueue) GetInstructionsOk() (*string, bool) { + if o == nil || IsNil(o.Instructions) { + return nil, false + } + return o.Instructions, true +} + +// HasInstructions returns a boolean if a field has been set. +func (o *QueueDefaultQueue) HasInstructions() bool { + if o != nil && !IsNil(o.Instructions) { + return true + } + + return false +} + +// SetInstructions gets a reference to the given string and assigns it to the Instructions field. +func (o *QueueDefaultQueue) SetInstructions(v string) { + o.Instructions = &v +} + +// GetStatus returns the Status field value +func (o *QueueDefaultQueue) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultQueue) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *QueueDefaultQueue) SetStatus(v string) { + o.Status = v +} + +// GetIsDefault returns the IsDefault field value +func (o *QueueDefaultQueue) GetIsDefault() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultQueue) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDefault, true +} + +// SetIsDefault sets field value +func (o *QueueDefaultQueue) SetIsDefault(v bool) { + o.IsDefault = v +} + +func (o QueueDefaultQueue) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueDefaultQueue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Instructions) { + toSerialize["instructions"] = o.Instructions + } + toSerialize["status"] = o.Status + toSerialize["is_default"] = o.IsDefault + return toSerialize, nil +} + +func (o *QueueDefaultQueue) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "status", + "is_default", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueDefaultQueue := _QueueDefaultQueue{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueDefaultQueue) + + if err != nil { + return err + } + + *o = QueueDefaultQueue(varQueueDefaultQueue) + + return err +} + +type NullableQueueDefaultQueue struct { + value *QueueDefaultQueue + isSet bool +} + +func (v NullableQueueDefaultQueue) Get() *QueueDefaultQueue { + return v.value +} + +func (v *NullableQueueDefaultQueue) Set(val *QueueDefaultQueue) { + v.value = val + v.isSet = true +} + +func (v NullableQueueDefaultQueue) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueDefaultQueue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueDefaultQueue(val *QueueDefaultQueue) *NullableQueueDefaultQueue { + return &NullableQueueDefaultQueue{value: val, isSet: true} +} + +func (v NullableQueueDefaultQueue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueDefaultQueue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_default_request.go b/go/futureagi/model_queue_default_request.go new file mode 100644 index 0000000..703c11c --- /dev/null +++ b/go/futureagi/model_queue_default_request.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the QueueDefaultRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueDefaultRequest{} + +// QueueDefaultRequest struct for QueueDefaultRequest +type QueueDefaultRequest struct { + ProjectId *string `json:"project_id,omitempty"` + DatasetId *string `json:"dataset_id,omitempty"` + AgentDefinitionId *string `json:"agent_definition_id,omitempty"` +} + +// NewQueueDefaultRequest instantiates a new QueueDefaultRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueDefaultRequest() *QueueDefaultRequest { + this := QueueDefaultRequest{} + return &this +} + +// NewQueueDefaultRequestWithDefaults instantiates a new QueueDefaultRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueDefaultRequestWithDefaults() *QueueDefaultRequest { + this := QueueDefaultRequest{} + return &this +} + +// GetProjectId returns the ProjectId field value if set, zero value otherwise. +func (o *QueueDefaultRequest) GetProjectId() string { + if o == nil || IsNil(o.ProjectId) { + var ret string + return ret + } + return *o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDefaultRequest) GetProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.ProjectId) { + return nil, false + } + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *QueueDefaultRequest) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false +} + +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. +func (o *QueueDefaultRequest) SetProjectId(v string) { + o.ProjectId = &v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *QueueDefaultRequest) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDefaultRequest) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *QueueDefaultRequest) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *QueueDefaultRequest) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetAgentDefinitionId returns the AgentDefinitionId field value if set, zero value otherwise. +func (o *QueueDefaultRequest) GetAgentDefinitionId() string { + if o == nil || IsNil(o.AgentDefinitionId) { + var ret string + return ret + } + return *o.AgentDefinitionId +} + +// GetAgentDefinitionIdOk returns a tuple with the AgentDefinitionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDefaultRequest) GetAgentDefinitionIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionId) { + return nil, false + } + return o.AgentDefinitionId, true +} + +// HasAgentDefinitionId returns a boolean if a field has been set. +func (o *QueueDefaultRequest) HasAgentDefinitionId() bool { + if o != nil && !IsNil(o.AgentDefinitionId) { + return true + } + + return false +} + +// SetAgentDefinitionId gets a reference to the given string and assigns it to the AgentDefinitionId field. +func (o *QueueDefaultRequest) SetAgentDefinitionId(v string) { + o.AgentDefinitionId = &v +} + +func (o QueueDefaultRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueDefaultRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectId) { + toSerialize["project_id"] = o.ProjectId + } + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if !IsNil(o.AgentDefinitionId) { + toSerialize["agent_definition_id"] = o.AgentDefinitionId + } + return toSerialize, nil +} + +type NullableQueueDefaultRequest struct { + value *QueueDefaultRequest + isSet bool +} + +func (v NullableQueueDefaultRequest) Get() *QueueDefaultRequest { + return v.value +} + +func (v *NullableQueueDefaultRequest) Set(val *QueueDefaultRequest) { + v.value = val + v.isSet = true +} + +func (v NullableQueueDefaultRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueDefaultRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueDefaultRequest(val *QueueDefaultRequest) *NullableQueueDefaultRequest { + return &NullableQueueDefaultRequest{value: val, isSet: true} +} + +func (v NullableQueueDefaultRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueDefaultRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_default_response.go b/go/futureagi/model_queue_default_response.go new file mode 100644 index 0000000..2b10422 --- /dev/null +++ b/go/futureagi/model_queue_default_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueDefaultResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueDefaultResponse{} + +// QueueDefaultResponse struct for QueueDefaultResponse +type QueueDefaultResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueDefaultResult `json:"result"` +} + +type _QueueDefaultResponse QueueDefaultResponse + +// NewQueueDefaultResponse instantiates a new QueueDefaultResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueDefaultResponse(result QueueDefaultResult) *QueueDefaultResponse { + this := QueueDefaultResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueDefaultResponseWithDefaults instantiates a new QueueDefaultResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueDefaultResponseWithDefaults() *QueueDefaultResponse { + this := QueueDefaultResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueDefaultResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDefaultResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueDefaultResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueDefaultResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueDefaultResponse) GetResult() QueueDefaultResult { + if o == nil { + var ret QueueDefaultResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultResponse) GetResultOk() (*QueueDefaultResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueDefaultResponse) SetResult(v QueueDefaultResult) { + o.Result = v +} + +func (o QueueDefaultResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueDefaultResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueDefaultResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueDefaultResponse := _QueueDefaultResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueDefaultResponse) + + if err != nil { + return err + } + + *o = QueueDefaultResponse(varQueueDefaultResponse) + + return err +} + +type NullableQueueDefaultResponse struct { + value *QueueDefaultResponse + isSet bool +} + +func (v NullableQueueDefaultResponse) Get() *QueueDefaultResponse { + return v.value +} + +func (v *NullableQueueDefaultResponse) Set(val *QueueDefaultResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueDefaultResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueDefaultResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueDefaultResponse(val *QueueDefaultResponse) *NullableQueueDefaultResponse { + return &NullableQueueDefaultResponse{value: val, isSet: true} +} + +func (v NullableQueueDefaultResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueDefaultResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_default_result.go b/go/futureagi/model_queue_default_result.go new file mode 100644 index 0000000..b63e0d7 --- /dev/null +++ b/go/futureagi/model_queue_default_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueDefaultResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueDefaultResult{} + +// QueueDefaultResult struct for QueueDefaultResult +type QueueDefaultResult struct { + Queue QueueDefaultQueue `json:"queue"` + Labels []QueueLabelResult `json:"labels"` + Created bool `json:"created"` + Action string `json:"action"` +} + +type _QueueDefaultResult QueueDefaultResult + +// NewQueueDefaultResult instantiates a new QueueDefaultResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueDefaultResult(queue QueueDefaultQueue, labels []QueueLabelResult, created bool, action string) *QueueDefaultResult { + this := QueueDefaultResult{} + this.Queue = queue + this.Labels = labels + this.Created = created + this.Action = action + return &this +} + +// NewQueueDefaultResultWithDefaults instantiates a new QueueDefaultResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueDefaultResultWithDefaults() *QueueDefaultResult { + this := QueueDefaultResult{} + return &this +} + +// GetQueue returns the Queue field value +func (o *QueueDefaultResult) GetQueue() QueueDefaultQueue { + if o == nil { + var ret QueueDefaultQueue + return ret + } + + return o.Queue +} + +// GetQueueOk returns a tuple with the Queue field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultResult) GetQueueOk() (*QueueDefaultQueue, bool) { + if o == nil { + return nil, false + } + return &o.Queue, true +} + +// SetQueue sets field value +func (o *QueueDefaultResult) SetQueue(v QueueDefaultQueue) { + o.Queue = v +} + +// GetLabels returns the Labels field value +func (o *QueueDefaultResult) GetLabels() []QueueLabelResult { + if o == nil { + var ret []QueueLabelResult + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultResult) GetLabelsOk() ([]QueueLabelResult, bool) { + if o == nil { + return nil, false + } + return o.Labels, true +} + +// SetLabels sets field value +func (o *QueueDefaultResult) SetLabels(v []QueueLabelResult) { + o.Labels = v +} + +// GetCreated returns the Created field value +func (o *QueueDefaultResult) GetCreated() bool { + if o == nil { + var ret bool + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultResult) GetCreatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *QueueDefaultResult) SetCreated(v bool) { + o.Created = v +} + +// GetAction returns the Action field value +func (o *QueueDefaultResult) GetAction() string { + if o == nil { + var ret string + return ret + } + + return o.Action +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *QueueDefaultResult) GetActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Action, true +} + +// SetAction sets field value +func (o *QueueDefaultResult) SetAction(v string) { + o.Action = v +} + +func (o QueueDefaultResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueDefaultResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["queue"] = o.Queue + toSerialize["labels"] = o.Labels + toSerialize["created"] = o.Created + toSerialize["action"] = o.Action + return toSerialize, nil +} + +func (o *QueueDefaultResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "queue", + "labels", + "created", + "action", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueDefaultResult := _QueueDefaultResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueDefaultResult) + + if err != nil { + return err + } + + *o = QueueDefaultResult(varQueueDefaultResult) + + return err +} + +type NullableQueueDefaultResult struct { + value *QueueDefaultResult + isSet bool +} + +func (v NullableQueueDefaultResult) Get() *QueueDefaultResult { + return v.value +} + +func (v *NullableQueueDefaultResult) Set(val *QueueDefaultResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueDefaultResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueDefaultResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueDefaultResult(val *QueueDefaultResult) *NullableQueueDefaultResult { + return &NullableQueueDefaultResult{value: val, isSet: true} +} + +func (v NullableQueueDefaultResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueDefaultResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_discussion_response.go b/go/futureagi/model_queue_discussion_response.go new file mode 100644 index 0000000..fbad424 --- /dev/null +++ b/go/futureagi/model_queue_discussion_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueDiscussionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueDiscussionResponse{} + +// QueueDiscussionResponse struct for QueueDiscussionResponse +type QueueDiscussionResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueDiscussionResult `json:"result"` +} + +type _QueueDiscussionResponse QueueDiscussionResponse + +// NewQueueDiscussionResponse instantiates a new QueueDiscussionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueDiscussionResponse(result QueueDiscussionResult) *QueueDiscussionResponse { + this := QueueDiscussionResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueDiscussionResponseWithDefaults instantiates a new QueueDiscussionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueDiscussionResponseWithDefaults() *QueueDiscussionResponse { + this := QueueDiscussionResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueDiscussionResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDiscussionResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueDiscussionResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueDiscussionResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueDiscussionResponse) GetResult() QueueDiscussionResult { + if o == nil { + var ret QueueDiscussionResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueDiscussionResponse) GetResultOk() (*QueueDiscussionResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueDiscussionResponse) SetResult(v QueueDiscussionResult) { + o.Result = v +} + +func (o QueueDiscussionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueDiscussionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueDiscussionResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueDiscussionResponse := _QueueDiscussionResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueDiscussionResponse) + + if err != nil { + return err + } + + *o = QueueDiscussionResponse(varQueueDiscussionResponse) + + return err +} + +type NullableQueueDiscussionResponse struct { + value *QueueDiscussionResponse + isSet bool +} + +func (v NullableQueueDiscussionResponse) Get() *QueueDiscussionResponse { + return v.value +} + +func (v *NullableQueueDiscussionResponse) Set(val *QueueDiscussionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueDiscussionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueDiscussionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueDiscussionResponse(val *QueueDiscussionResponse) *NullableQueueDiscussionResponse { + return &NullableQueueDiscussionResponse{value: val, isSet: true} +} + +func (v NullableQueueDiscussionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueDiscussionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_discussion_result.go b/go/futureagi/model_queue_discussion_result.go new file mode 100644 index 0000000..9f1f835 --- /dev/null +++ b/go/futureagi/model_queue_discussion_result.go @@ -0,0 +1,257 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueDiscussionResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueDiscussionResult{} + +// QueueDiscussionResult struct for QueueDiscussionResult +type QueueDiscussionResult struct { + ReviewComments []map[string]interface{} `json:"review_comments"` + ReviewThreads []map[string]interface{} `json:"review_threads"` + Comment map[string]interface{} `json:"comment,omitempty"` + Thread map[string]interface{} `json:"thread,omitempty"` +} + +type _QueueDiscussionResult QueueDiscussionResult + +// NewQueueDiscussionResult instantiates a new QueueDiscussionResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueDiscussionResult(reviewComments []map[string]interface{}, reviewThreads []map[string]interface{}) *QueueDiscussionResult { + this := QueueDiscussionResult{} + this.ReviewComments = reviewComments + this.ReviewThreads = reviewThreads + return &this +} + +// NewQueueDiscussionResultWithDefaults instantiates a new QueueDiscussionResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueDiscussionResultWithDefaults() *QueueDiscussionResult { + this := QueueDiscussionResult{} + return &this +} + +// GetReviewComments returns the ReviewComments field value +func (o *QueueDiscussionResult) GetReviewComments() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.ReviewComments +} + +// GetReviewCommentsOk returns a tuple with the ReviewComments field value +// and a boolean to check if the value has been set. +func (o *QueueDiscussionResult) GetReviewCommentsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ReviewComments, true +} + +// SetReviewComments sets field value +func (o *QueueDiscussionResult) SetReviewComments(v []map[string]interface{}) { + o.ReviewComments = v +} + +// GetReviewThreads returns the ReviewThreads field value +func (o *QueueDiscussionResult) GetReviewThreads() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.ReviewThreads +} + +// GetReviewThreadsOk returns a tuple with the ReviewThreads field value +// and a boolean to check if the value has been set. +func (o *QueueDiscussionResult) GetReviewThreadsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ReviewThreads, true +} + +// SetReviewThreads sets field value +func (o *QueueDiscussionResult) SetReviewThreads(v []map[string]interface{}) { + o.ReviewThreads = v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *QueueDiscussionResult) GetComment() map[string]interface{} { + if o == nil || IsNil(o.Comment) { + var ret map[string]interface{} + return ret + } + return o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDiscussionResult) GetCommentOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Comment) { + return map[string]interface{}{}, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *QueueDiscussionResult) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given map[string]interface{} and assigns it to the Comment field. +func (o *QueueDiscussionResult) SetComment(v map[string]interface{}) { + o.Comment = v +} + +// GetThread returns the Thread field value if set, zero value otherwise. +func (o *QueueDiscussionResult) GetThread() map[string]interface{} { + if o == nil || IsNil(o.Thread) { + var ret map[string]interface{} + return ret + } + return o.Thread +} + +// GetThreadOk returns a tuple with the Thread field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueDiscussionResult) GetThreadOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Thread) { + return map[string]interface{}{}, false + } + return o.Thread, true +} + +// HasThread returns a boolean if a field has been set. +func (o *QueueDiscussionResult) HasThread() bool { + if o != nil && !IsNil(o.Thread) { + return true + } + + return false +} + +// SetThread gets a reference to the given map[string]interface{} and assigns it to the Thread field. +func (o *QueueDiscussionResult) SetThread(v map[string]interface{}) { + o.Thread = v +} + +func (o QueueDiscussionResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueDiscussionResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["review_comments"] = o.ReviewComments + toSerialize["review_threads"] = o.ReviewThreads + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.Thread) { + toSerialize["thread"] = o.Thread + } + return toSerialize, nil +} + +func (o *QueueDiscussionResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "review_comments", + "review_threads", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueDiscussionResult := _QueueDiscussionResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueDiscussionResult) + + if err != nil { + return err + } + + *o = QueueDiscussionResult(varQueueDiscussionResult) + + return err +} + +type NullableQueueDiscussionResult struct { + value *QueueDiscussionResult + isSet bool +} + +func (v NullableQueueDiscussionResult) Get() *QueueDiscussionResult { + return v.value +} + +func (v *NullableQueueDiscussionResult) Set(val *QueueDiscussionResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueDiscussionResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueDiscussionResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueDiscussionResult(val *QueueDiscussionResult) *NullableQueueDiscussionResult { + return &NullableQueueDiscussionResult{value: val, isSet: true} +} + +func (v NullableQueueDiscussionResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueDiscussionResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_annotations_response.go b/go/futureagi/model_queue_export_annotations_response.go new file mode 100644 index 0000000..3d6f5ae --- /dev/null +++ b/go/futureagi/model_queue_export_annotations_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueExportAnnotationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportAnnotationsResponse{} + +// QueueExportAnnotationsResponse struct for QueueExportAnnotationsResponse +type QueueExportAnnotationsResponse struct { + Status *bool `json:"status,omitempty"` + Result []map[string]interface{} `json:"result"` +} + +type _QueueExportAnnotationsResponse QueueExportAnnotationsResponse + +// NewQueueExportAnnotationsResponse instantiates a new QueueExportAnnotationsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportAnnotationsResponse(result []map[string]interface{}) *QueueExportAnnotationsResponse { + this := QueueExportAnnotationsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueExportAnnotationsResponseWithDefaults instantiates a new QueueExportAnnotationsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportAnnotationsResponseWithDefaults() *QueueExportAnnotationsResponse { + this := QueueExportAnnotationsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueExportAnnotationsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportAnnotationsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueExportAnnotationsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueExportAnnotationsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueExportAnnotationsResponse) GetResult() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueExportAnnotationsResponse) GetResultOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *QueueExportAnnotationsResponse) SetResult(v []map[string]interface{}) { + o.Result = v +} + +func (o QueueExportAnnotationsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportAnnotationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueExportAnnotationsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueExportAnnotationsResponse := _QueueExportAnnotationsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueExportAnnotationsResponse) + + if err != nil { + return err + } + + *o = QueueExportAnnotationsResponse(varQueueExportAnnotationsResponse) + + return err +} + +type NullableQueueExportAnnotationsResponse struct { + value *QueueExportAnnotationsResponse + isSet bool +} + +func (v NullableQueueExportAnnotationsResponse) Get() *QueueExportAnnotationsResponse { + return v.value +} + +func (v *NullableQueueExportAnnotationsResponse) Set(val *QueueExportAnnotationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportAnnotationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportAnnotationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportAnnotationsResponse(val *QueueExportAnnotationsResponse) *NullableQueueExportAnnotationsResponse { + return &NullableQueueExportAnnotationsResponse{value: val, isSet: true} +} + +func (v NullableQueueExportAnnotationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportAnnotationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_column_mapping.go b/go/futureagi/model_queue_export_column_mapping.go new file mode 100644 index 0000000..8e81048 --- /dev/null +++ b/go/futureagi/model_queue_export_column_mapping.go @@ -0,0 +1,237 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the QueueExportColumnMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportColumnMapping{} + +// QueueExportColumnMapping struct for QueueExportColumnMapping +type QueueExportColumnMapping struct { + Field *string `json:"field,omitempty"` + Id *string `json:"id,omitempty"` + Column *string `json:"column,omitempty"` + Enabled *bool `json:"enabled,omitempty"` +} + +// NewQueueExportColumnMapping instantiates a new QueueExportColumnMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportColumnMapping() *QueueExportColumnMapping { + this := QueueExportColumnMapping{} + var enabled bool = true + this.Enabled = &enabled + return &this +} + +// NewQueueExportColumnMappingWithDefaults instantiates a new QueueExportColumnMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportColumnMappingWithDefaults() *QueueExportColumnMapping { + this := QueueExportColumnMapping{} + var enabled bool = true + this.Enabled = &enabled + return &this +} + +// GetField returns the Field field value if set, zero value otherwise. +func (o *QueueExportColumnMapping) GetField() string { + if o == nil || IsNil(o.Field) { + var ret string + return ret + } + return *o.Field +} + +// GetFieldOk returns a tuple with the Field field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportColumnMapping) GetFieldOk() (*string, bool) { + if o == nil || IsNil(o.Field) { + return nil, false + } + return o.Field, true +} + +// HasField returns a boolean if a field has been set. +func (o *QueueExportColumnMapping) HasField() bool { + if o != nil && !IsNil(o.Field) { + return true + } + + return false +} + +// SetField gets a reference to the given string and assigns it to the Field field. +func (o *QueueExportColumnMapping) SetField(v string) { + o.Field = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *QueueExportColumnMapping) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportColumnMapping) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *QueueExportColumnMapping) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *QueueExportColumnMapping) SetId(v string) { + o.Id = &v +} + +// GetColumn returns the Column field value if set, zero value otherwise. +func (o *QueueExportColumnMapping) GetColumn() string { + if o == nil || IsNil(o.Column) { + var ret string + return ret + } + return *o.Column +} + +// GetColumnOk returns a tuple with the Column field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportColumnMapping) GetColumnOk() (*string, bool) { + if o == nil || IsNil(o.Column) { + return nil, false + } + return o.Column, true +} + +// HasColumn returns a boolean if a field has been set. +func (o *QueueExportColumnMapping) HasColumn() bool { + if o != nil && !IsNil(o.Column) { + return true + } + + return false +} + +// SetColumn gets a reference to the given string and assigns it to the Column field. +func (o *QueueExportColumnMapping) SetColumn(v string) { + o.Column = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *QueueExportColumnMapping) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportColumnMapping) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *QueueExportColumnMapping) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *QueueExportColumnMapping) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o QueueExportColumnMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportColumnMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Field) { + toSerialize["field"] = o.Field + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Column) { + toSerialize["column"] = o.Column + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableQueueExportColumnMapping struct { + value *QueueExportColumnMapping + isSet bool +} + +func (v NullableQueueExportColumnMapping) Get() *QueueExportColumnMapping { + return v.value +} + +func (v *NullableQueueExportColumnMapping) Set(val *QueueExportColumnMapping) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportColumnMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportColumnMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportColumnMapping(val *QueueExportColumnMapping) *NullableQueueExportColumnMapping { + return &NullableQueueExportColumnMapping{value: val, isSet: true} +} + +func (v NullableQueueExportColumnMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportColumnMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_default_mapping.go b/go/futureagi/model_queue_export_default_mapping.go new file mode 100644 index 0000000..b3956c1 --- /dev/null +++ b/go/futureagi/model_queue_export_default_mapping.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueExportDefaultMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportDefaultMapping{} + +// QueueExportDefaultMapping struct for QueueExportDefaultMapping +type QueueExportDefaultMapping struct { + Field string `json:"field"` + Column string `json:"column"` + Enabled bool `json:"enabled"` +} + +type _QueueExportDefaultMapping QueueExportDefaultMapping + +// NewQueueExportDefaultMapping instantiates a new QueueExportDefaultMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportDefaultMapping(field string, column string, enabled bool) *QueueExportDefaultMapping { + this := QueueExportDefaultMapping{} + this.Field = field + this.Column = column + this.Enabled = enabled + return &this +} + +// NewQueueExportDefaultMappingWithDefaults instantiates a new QueueExportDefaultMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportDefaultMappingWithDefaults() *QueueExportDefaultMapping { + this := QueueExportDefaultMapping{} + return &this +} + +// GetField returns the Field field value +func (o *QueueExportDefaultMapping) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *QueueExportDefaultMapping) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *QueueExportDefaultMapping) SetField(v string) { + o.Field = v +} + +// GetColumn returns the Column field value +func (o *QueueExportDefaultMapping) GetColumn() string { + if o == nil { + var ret string + return ret + } + + return o.Column +} + +// GetColumnOk returns a tuple with the Column field value +// and a boolean to check if the value has been set. +func (o *QueueExportDefaultMapping) GetColumnOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Column, true +} + +// SetColumn sets field value +func (o *QueueExportDefaultMapping) SetColumn(v string) { + o.Column = v +} + +// GetEnabled returns the Enabled field value +func (o *QueueExportDefaultMapping) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *QueueExportDefaultMapping) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *QueueExportDefaultMapping) SetEnabled(v bool) { + o.Enabled = v +} + +func (o QueueExportDefaultMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportDefaultMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field"] = o.Field + toSerialize["column"] = o.Column + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +func (o *QueueExportDefaultMapping) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "field", + "column", + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueExportDefaultMapping := _QueueExportDefaultMapping{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueExportDefaultMapping) + + if err != nil { + return err + } + + *o = QueueExportDefaultMapping(varQueueExportDefaultMapping) + + return err +} + +type NullableQueueExportDefaultMapping struct { + value *QueueExportDefaultMapping + isSet bool +} + +func (v NullableQueueExportDefaultMapping) Get() *QueueExportDefaultMapping { + return v.value +} + +func (v *NullableQueueExportDefaultMapping) Set(val *QueueExportDefaultMapping) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportDefaultMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportDefaultMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportDefaultMapping(val *QueueExportDefaultMapping) *NullableQueueExportDefaultMapping { + return &NullableQueueExportDefaultMapping{value: val, isSet: true} +} + +func (v NullableQueueExportDefaultMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportDefaultMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_field.go b/go/futureagi/model_queue_export_field.go new file mode 100644 index 0000000..1a8b1b1 --- /dev/null +++ b/go/futureagi/model_queue_export_field.go @@ -0,0 +1,549 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueExportField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportField{} + +// QueueExportField struct for QueueExportField +type QueueExportField struct { + Id string `json:"id"` + Label string `json:"label"` + Column string `json:"column"` + DataType string `json:"data_type"` + Group string `json:"group"` + Default bool `json:"default"` + Path *string `json:"path,omitempty"` + SourceType *string `json:"source_type,omitempty"` + Kind *string `json:"kind,omitempty"` + LabelId *string `json:"label_id,omitempty"` + Slot *int32 `json:"slot,omitempty"` + EvalKey *string `json:"eval_key,omitempty"` + ExpandFields []string `json:"expand_fields,omitempty"` +} + +type _QueueExportField QueueExportField + +// NewQueueExportField instantiates a new QueueExportField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportField(id string, label string, column string, dataType string, group string, default_ bool) *QueueExportField { + this := QueueExportField{} + this.Id = id + this.Label = label + this.Column = column + this.DataType = dataType + this.Group = group + this.Default = default_ + return &this +} + +// NewQueueExportFieldWithDefaults instantiates a new QueueExportField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportFieldWithDefaults() *QueueExportField { + this := QueueExportField{} + return &this +} + +// GetId returns the Id field value +func (o *QueueExportField) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *QueueExportField) SetId(v string) { + o.Id = v +} + +// GetLabel returns the Label field value +func (o *QueueExportField) GetLabel() string { + if o == nil { + var ret string + return ret + } + + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetLabelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Label, true +} + +// SetLabel sets field value +func (o *QueueExportField) SetLabel(v string) { + o.Label = v +} + +// GetColumn returns the Column field value +func (o *QueueExportField) GetColumn() string { + if o == nil { + var ret string + return ret + } + + return o.Column +} + +// GetColumnOk returns a tuple with the Column field value +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetColumnOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Column, true +} + +// SetColumn sets field value +func (o *QueueExportField) SetColumn(v string) { + o.Column = v +} + +// GetDataType returns the DataType field value +func (o *QueueExportField) GetDataType() string { + if o == nil { + var ret string + return ret + } + + return o.DataType +} + +// GetDataTypeOk returns a tuple with the DataType field value +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetDataTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataType, true +} + +// SetDataType sets field value +func (o *QueueExportField) SetDataType(v string) { + o.DataType = v +} + +// GetGroup returns the Group field value +func (o *QueueExportField) GetGroup() string { + if o == nil { + var ret string + return ret + } + + return o.Group +} + +// GetGroupOk returns a tuple with the Group field value +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Group, true +} + +// SetGroup sets field value +func (o *QueueExportField) SetGroup(v string) { + o.Group = v +} + +// GetDefault returns the Default field value +func (o *QueueExportField) GetDefault() bool { + if o == nil { + var ret bool + return ret + } + + return o.Default +} + +// GetDefaultOk returns a tuple with the Default field value +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Default, true +} + +// SetDefault sets field value +func (o *QueueExportField) SetDefault(v bool) { + o.Default = v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *QueueExportField) GetPath() string { + if o == nil || IsNil(o.Path) { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetPathOk() (*string, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *QueueExportField) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *QueueExportField) SetPath(v string) { + o.Path = &v +} + +// GetSourceType returns the SourceType field value if set, zero value otherwise. +func (o *QueueExportField) GetSourceType() string { + if o == nil || IsNil(o.SourceType) { + var ret string + return ret + } + return *o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetSourceTypeOk() (*string, bool) { + if o == nil || IsNil(o.SourceType) { + return nil, false + } + return o.SourceType, true +} + +// HasSourceType returns a boolean if a field has been set. +func (o *QueueExportField) HasSourceType() bool { + if o != nil && !IsNil(o.SourceType) { + return true + } + + return false +} + +// SetSourceType gets a reference to the given string and assigns it to the SourceType field. +func (o *QueueExportField) SetSourceType(v string) { + o.SourceType = &v +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *QueueExportField) GetKind() string { + if o == nil || IsNil(o.Kind) { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetKindOk() (*string, bool) { + if o == nil || IsNil(o.Kind) { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *QueueExportField) HasKind() bool { + if o != nil && !IsNil(o.Kind) { + return true + } + + return false +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *QueueExportField) SetKind(v string) { + o.Kind = &v +} + +// GetLabelId returns the LabelId field value if set, zero value otherwise. +func (o *QueueExportField) GetLabelId() string { + if o == nil || IsNil(o.LabelId) { + var ret string + return ret + } + return *o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetLabelIdOk() (*string, bool) { + if o == nil || IsNil(o.LabelId) { + return nil, false + } + return o.LabelId, true +} + +// HasLabelId returns a boolean if a field has been set. +func (o *QueueExportField) HasLabelId() bool { + if o != nil && !IsNil(o.LabelId) { + return true + } + + return false +} + +// SetLabelId gets a reference to the given string and assigns it to the LabelId field. +func (o *QueueExportField) SetLabelId(v string) { + o.LabelId = &v +} + +// GetSlot returns the Slot field value if set, zero value otherwise. +func (o *QueueExportField) GetSlot() int32 { + if o == nil || IsNil(o.Slot) { + var ret int32 + return ret + } + return *o.Slot +} + +// GetSlotOk returns a tuple with the Slot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetSlotOk() (*int32, bool) { + if o == nil || IsNil(o.Slot) { + return nil, false + } + return o.Slot, true +} + +// HasSlot returns a boolean if a field has been set. +func (o *QueueExportField) HasSlot() bool { + if o != nil && !IsNil(o.Slot) { + return true + } + + return false +} + +// SetSlot gets a reference to the given int32 and assigns it to the Slot field. +func (o *QueueExportField) SetSlot(v int32) { + o.Slot = &v +} + +// GetEvalKey returns the EvalKey field value if set, zero value otherwise. +func (o *QueueExportField) GetEvalKey() string { + if o == nil || IsNil(o.EvalKey) { + var ret string + return ret + } + return *o.EvalKey +} + +// GetEvalKeyOk returns a tuple with the EvalKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetEvalKeyOk() (*string, bool) { + if o == nil || IsNil(o.EvalKey) { + return nil, false + } + return o.EvalKey, true +} + +// HasEvalKey returns a boolean if a field has been set. +func (o *QueueExportField) HasEvalKey() bool { + if o != nil && !IsNil(o.EvalKey) { + return true + } + + return false +} + +// SetEvalKey gets a reference to the given string and assigns it to the EvalKey field. +func (o *QueueExportField) SetEvalKey(v string) { + o.EvalKey = &v +} + +// GetExpandFields returns the ExpandFields field value if set, zero value otherwise. +func (o *QueueExportField) GetExpandFields() []string { + if o == nil || IsNil(o.ExpandFields) { + var ret []string + return ret + } + return o.ExpandFields +} + +// GetExpandFieldsOk returns a tuple with the ExpandFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportField) GetExpandFieldsOk() ([]string, bool) { + if o == nil || IsNil(o.ExpandFields) { + return nil, false + } + return o.ExpandFields, true +} + +// HasExpandFields returns a boolean if a field has been set. +func (o *QueueExportField) HasExpandFields() bool { + if o != nil && !IsNil(o.ExpandFields) { + return true + } + + return false +} + +// SetExpandFields gets a reference to the given []string and assigns it to the ExpandFields field. +func (o *QueueExportField) SetExpandFields(v []string) { + o.ExpandFields = v +} + +func (o QueueExportField) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["label"] = o.Label + toSerialize["column"] = o.Column + toSerialize["data_type"] = o.DataType + toSerialize["group"] = o.Group + toSerialize["default"] = o.Default + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.SourceType) { + toSerialize["source_type"] = o.SourceType + } + if !IsNil(o.Kind) { + toSerialize["kind"] = o.Kind + } + if !IsNil(o.LabelId) { + toSerialize["label_id"] = o.LabelId + } + if !IsNil(o.Slot) { + toSerialize["slot"] = o.Slot + } + if !IsNil(o.EvalKey) { + toSerialize["eval_key"] = o.EvalKey + } + if !IsNil(o.ExpandFields) { + toSerialize["expand_fields"] = o.ExpandFields + } + return toSerialize, nil +} + +func (o *QueueExportField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "label", + "column", + "data_type", + "group", + "default", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueExportField := _QueueExportField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueExportField) + + if err != nil { + return err + } + + *o = QueueExportField(varQueueExportField) + + return err +} + +type NullableQueueExportField struct { + value *QueueExportField + isSet bool +} + +func (v NullableQueueExportField) Get() *QueueExportField { + return v.value +} + +func (v *NullableQueueExportField) Set(val *QueueExportField) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportField) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportField(val *QueueExportField) *NullableQueueExportField { + return &NullableQueueExportField{value: val, isSet: true} +} + +func (v NullableQueueExportField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_fields_response.go b/go/futureagi/model_queue_export_fields_response.go new file mode 100644 index 0000000..6bb7710 --- /dev/null +++ b/go/futureagi/model_queue_export_fields_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueExportFieldsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportFieldsResponse{} + +// QueueExportFieldsResponse struct for QueueExportFieldsResponse +type QueueExportFieldsResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueExportFieldsResult `json:"result"` +} + +type _QueueExportFieldsResponse QueueExportFieldsResponse + +// NewQueueExportFieldsResponse instantiates a new QueueExportFieldsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportFieldsResponse(result QueueExportFieldsResult) *QueueExportFieldsResponse { + this := QueueExportFieldsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueExportFieldsResponseWithDefaults instantiates a new QueueExportFieldsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportFieldsResponseWithDefaults() *QueueExportFieldsResponse { + this := QueueExportFieldsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueExportFieldsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportFieldsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueExportFieldsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueExportFieldsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueExportFieldsResponse) GetResult() QueueExportFieldsResult { + if o == nil { + var ret QueueExportFieldsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueExportFieldsResponse) GetResultOk() (*QueueExportFieldsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueExportFieldsResponse) SetResult(v QueueExportFieldsResult) { + o.Result = v +} + +func (o QueueExportFieldsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportFieldsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueExportFieldsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueExportFieldsResponse := _QueueExportFieldsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueExportFieldsResponse) + + if err != nil { + return err + } + + *o = QueueExportFieldsResponse(varQueueExportFieldsResponse) + + return err +} + +type NullableQueueExportFieldsResponse struct { + value *QueueExportFieldsResponse + isSet bool +} + +func (v NullableQueueExportFieldsResponse) Get() *QueueExportFieldsResponse { + return v.value +} + +func (v *NullableQueueExportFieldsResponse) Set(val *QueueExportFieldsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportFieldsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportFieldsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportFieldsResponse(val *QueueExportFieldsResponse) *NullableQueueExportFieldsResponse { + return &NullableQueueExportFieldsResponse{value: val, isSet: true} +} + +func (v NullableQueueExportFieldsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportFieldsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_fields_result.go b/go/futureagi/model_queue_export_fields_result.go new file mode 100644 index 0000000..c27bd0b --- /dev/null +++ b/go/futureagi/model_queue_export_fields_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueExportFieldsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportFieldsResult{} + +// QueueExportFieldsResult struct for QueueExportFieldsResult +type QueueExportFieldsResult struct { + Fields []QueueExportField `json:"fields"` + DefaultMapping []QueueExportDefaultMapping `json:"default_mapping"` +} + +type _QueueExportFieldsResult QueueExportFieldsResult + +// NewQueueExportFieldsResult instantiates a new QueueExportFieldsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportFieldsResult(fields []QueueExportField, defaultMapping []QueueExportDefaultMapping) *QueueExportFieldsResult { + this := QueueExportFieldsResult{} + this.Fields = fields + this.DefaultMapping = defaultMapping + return &this +} + +// NewQueueExportFieldsResultWithDefaults instantiates a new QueueExportFieldsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportFieldsResultWithDefaults() *QueueExportFieldsResult { + this := QueueExportFieldsResult{} + return &this +} + +// GetFields returns the Fields field value +func (o *QueueExportFieldsResult) GetFields() []QueueExportField { + if o == nil { + var ret []QueueExportField + return ret + } + + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value +// and a boolean to check if the value has been set. +func (o *QueueExportFieldsResult) GetFieldsOk() ([]QueueExportField, bool) { + if o == nil { + return nil, false + } + return o.Fields, true +} + +// SetFields sets field value +func (o *QueueExportFieldsResult) SetFields(v []QueueExportField) { + o.Fields = v +} + +// GetDefaultMapping returns the DefaultMapping field value +func (o *QueueExportFieldsResult) GetDefaultMapping() []QueueExportDefaultMapping { + if o == nil { + var ret []QueueExportDefaultMapping + return ret + } + + return o.DefaultMapping +} + +// GetDefaultMappingOk returns a tuple with the DefaultMapping field value +// and a boolean to check if the value has been set. +func (o *QueueExportFieldsResult) GetDefaultMappingOk() ([]QueueExportDefaultMapping, bool) { + if o == nil { + return nil, false + } + return o.DefaultMapping, true +} + +// SetDefaultMapping sets field value +func (o *QueueExportFieldsResult) SetDefaultMapping(v []QueueExportDefaultMapping) { + o.DefaultMapping = v +} + +func (o QueueExportFieldsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportFieldsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fields"] = o.Fields + toSerialize["default_mapping"] = o.DefaultMapping + return toSerialize, nil +} + +func (o *QueueExportFieldsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "fields", + "default_mapping", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueExportFieldsResult := _QueueExportFieldsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueExportFieldsResult) + + if err != nil { + return err + } + + *o = QueueExportFieldsResult(varQueueExportFieldsResult) + + return err +} + +type NullableQueueExportFieldsResult struct { + value *QueueExportFieldsResult + isSet bool +} + +func (v NullableQueueExportFieldsResult) Get() *QueueExportFieldsResult { + return v.value +} + +func (v *NullableQueueExportFieldsResult) Set(val *QueueExportFieldsResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportFieldsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportFieldsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportFieldsResult(val *QueueExportFieldsResult) *NullableQueueExportFieldsResult { + return &NullableQueueExportFieldsResult{value: val, isSet: true} +} + +func (v NullableQueueExportFieldsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportFieldsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_to_dataset_request.go b/go/futureagi/model_queue_export_to_dataset_request.go new file mode 100644 index 0000000..abb3df4 --- /dev/null +++ b/go/futureagi/model_queue_export_to_dataset_request.go @@ -0,0 +1,237 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the QueueExportToDatasetRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportToDatasetRequest{} + +// QueueExportToDatasetRequest struct for QueueExportToDatasetRequest +type QueueExportToDatasetRequest struct { + DatasetId *string `json:"dataset_id,omitempty"` + DatasetName *string `json:"dataset_name,omitempty"` + StatusFilter *string `json:"status_filter,omitempty"` + ColumnMapping []QueueExportColumnMapping `json:"column_mapping,omitempty"` +} + +// NewQueueExportToDatasetRequest instantiates a new QueueExportToDatasetRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportToDatasetRequest() *QueueExportToDatasetRequest { + this := QueueExportToDatasetRequest{} + var statusFilter string = "completed" + this.StatusFilter = &statusFilter + return &this +} + +// NewQueueExportToDatasetRequestWithDefaults instantiates a new QueueExportToDatasetRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportToDatasetRequestWithDefaults() *QueueExportToDatasetRequest { + this := QueueExportToDatasetRequest{} + var statusFilter string = "completed" + this.StatusFilter = &statusFilter + return &this +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *QueueExportToDatasetRequest) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetRequest) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *QueueExportToDatasetRequest) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *QueueExportToDatasetRequest) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetDatasetName returns the DatasetName field value if set, zero value otherwise. +func (o *QueueExportToDatasetRequest) GetDatasetName() string { + if o == nil || IsNil(o.DatasetName) { + var ret string + return ret + } + return *o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetRequest) GetDatasetNameOk() (*string, bool) { + if o == nil || IsNil(o.DatasetName) { + return nil, false + } + return o.DatasetName, true +} + +// HasDatasetName returns a boolean if a field has been set. +func (o *QueueExportToDatasetRequest) HasDatasetName() bool { + if o != nil && !IsNil(o.DatasetName) { + return true + } + + return false +} + +// SetDatasetName gets a reference to the given string and assigns it to the DatasetName field. +func (o *QueueExportToDatasetRequest) SetDatasetName(v string) { + o.DatasetName = &v +} + +// GetStatusFilter returns the StatusFilter field value if set, zero value otherwise. +func (o *QueueExportToDatasetRequest) GetStatusFilter() string { + if o == nil || IsNil(o.StatusFilter) { + var ret string + return ret + } + return *o.StatusFilter +} + +// GetStatusFilterOk returns a tuple with the StatusFilter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetRequest) GetStatusFilterOk() (*string, bool) { + if o == nil || IsNil(o.StatusFilter) { + return nil, false + } + return o.StatusFilter, true +} + +// HasStatusFilter returns a boolean if a field has been set. +func (o *QueueExportToDatasetRequest) HasStatusFilter() bool { + if o != nil && !IsNil(o.StatusFilter) { + return true + } + + return false +} + +// SetStatusFilter gets a reference to the given string and assigns it to the StatusFilter field. +func (o *QueueExportToDatasetRequest) SetStatusFilter(v string) { + o.StatusFilter = &v +} + +// GetColumnMapping returns the ColumnMapping field value if set, zero value otherwise. +func (o *QueueExportToDatasetRequest) GetColumnMapping() []QueueExportColumnMapping { + if o == nil || IsNil(o.ColumnMapping) { + var ret []QueueExportColumnMapping + return ret + } + return o.ColumnMapping +} + +// GetColumnMappingOk returns a tuple with the ColumnMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetRequest) GetColumnMappingOk() ([]QueueExportColumnMapping, bool) { + if o == nil || IsNil(o.ColumnMapping) { + return nil, false + } + return o.ColumnMapping, true +} + +// HasColumnMapping returns a boolean if a field has been set. +func (o *QueueExportToDatasetRequest) HasColumnMapping() bool { + if o != nil && !IsNil(o.ColumnMapping) { + return true + } + + return false +} + +// SetColumnMapping gets a reference to the given []QueueExportColumnMapping and assigns it to the ColumnMapping field. +func (o *QueueExportToDatasetRequest) SetColumnMapping(v []QueueExportColumnMapping) { + o.ColumnMapping = v +} + +func (o QueueExportToDatasetRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportToDatasetRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if !IsNil(o.DatasetName) { + toSerialize["dataset_name"] = o.DatasetName + } + if !IsNil(o.StatusFilter) { + toSerialize["status_filter"] = o.StatusFilter + } + if !IsNil(o.ColumnMapping) { + toSerialize["column_mapping"] = o.ColumnMapping + } + return toSerialize, nil +} + +type NullableQueueExportToDatasetRequest struct { + value *QueueExportToDatasetRequest + isSet bool +} + +func (v NullableQueueExportToDatasetRequest) Get() *QueueExportToDatasetRequest { + return v.value +} + +func (v *NullableQueueExportToDatasetRequest) Set(val *QueueExportToDatasetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportToDatasetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportToDatasetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportToDatasetRequest(val *QueueExportToDatasetRequest) *NullableQueueExportToDatasetRequest { + return &NullableQueueExportToDatasetRequest{value: val, isSet: true} +} + +func (v NullableQueueExportToDatasetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportToDatasetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_to_dataset_response.go b/go/futureagi/model_queue_export_to_dataset_response.go new file mode 100644 index 0000000..93f379f --- /dev/null +++ b/go/futureagi/model_queue_export_to_dataset_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueExportToDatasetResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportToDatasetResponse{} + +// QueueExportToDatasetResponse struct for QueueExportToDatasetResponse +type QueueExportToDatasetResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueExportToDatasetResult `json:"result"` +} + +type _QueueExportToDatasetResponse QueueExportToDatasetResponse + +// NewQueueExportToDatasetResponse instantiates a new QueueExportToDatasetResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportToDatasetResponse(result QueueExportToDatasetResult) *QueueExportToDatasetResponse { + this := QueueExportToDatasetResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueExportToDatasetResponseWithDefaults instantiates a new QueueExportToDatasetResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportToDatasetResponseWithDefaults() *QueueExportToDatasetResponse { + this := QueueExportToDatasetResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueExportToDatasetResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueExportToDatasetResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueExportToDatasetResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueExportToDatasetResponse) GetResult() QueueExportToDatasetResult { + if o == nil { + var ret QueueExportToDatasetResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetResponse) GetResultOk() (*QueueExportToDatasetResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueExportToDatasetResponse) SetResult(v QueueExportToDatasetResult) { + o.Result = v +} + +func (o QueueExportToDatasetResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportToDatasetResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueExportToDatasetResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueExportToDatasetResponse := _QueueExportToDatasetResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueExportToDatasetResponse) + + if err != nil { + return err + } + + *o = QueueExportToDatasetResponse(varQueueExportToDatasetResponse) + + return err +} + +type NullableQueueExportToDatasetResponse struct { + value *QueueExportToDatasetResponse + isSet bool +} + +func (v NullableQueueExportToDatasetResponse) Get() *QueueExportToDatasetResponse { + return v.value +} + +func (v *NullableQueueExportToDatasetResponse) Set(val *QueueExportToDatasetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportToDatasetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportToDatasetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportToDatasetResponse(val *QueueExportToDatasetResponse) *NullableQueueExportToDatasetResponse { + return &NullableQueueExportToDatasetResponse{value: val, isSet: true} +} + +func (v NullableQueueExportToDatasetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportToDatasetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_export_to_dataset_result.go b/go/futureagi/model_queue_export_to_dataset_result.go new file mode 100644 index 0000000..fbdd0b9 --- /dev/null +++ b/go/futureagi/model_queue_export_to_dataset_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueExportToDatasetResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueExportToDatasetResult{} + +// QueueExportToDatasetResult struct for QueueExportToDatasetResult +type QueueExportToDatasetResult struct { + DatasetId string `json:"dataset_id"` + DatasetName string `json:"dataset_name"` + RowsCreated int32 `json:"rows_created"` + Columns []string `json:"columns"` +} + +type _QueueExportToDatasetResult QueueExportToDatasetResult + +// NewQueueExportToDatasetResult instantiates a new QueueExportToDatasetResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueExportToDatasetResult(datasetId string, datasetName string, rowsCreated int32, columns []string) *QueueExportToDatasetResult { + this := QueueExportToDatasetResult{} + this.DatasetId = datasetId + this.DatasetName = datasetName + this.RowsCreated = rowsCreated + this.Columns = columns + return &this +} + +// NewQueueExportToDatasetResultWithDefaults instantiates a new QueueExportToDatasetResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueExportToDatasetResultWithDefaults() *QueueExportToDatasetResult { + this := QueueExportToDatasetResult{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *QueueExportToDatasetResult) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetResult) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *QueueExportToDatasetResult) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetDatasetName returns the DatasetName field value +func (o *QueueExportToDatasetResult) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetResult) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *QueueExportToDatasetResult) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetRowsCreated returns the RowsCreated field value +func (o *QueueExportToDatasetResult) GetRowsCreated() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RowsCreated +} + +// GetRowsCreatedOk returns a tuple with the RowsCreated field value +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetResult) GetRowsCreatedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RowsCreated, true +} + +// SetRowsCreated sets field value +func (o *QueueExportToDatasetResult) SetRowsCreated(v int32) { + o.RowsCreated = v +} + +// GetColumns returns the Columns field value +func (o *QueueExportToDatasetResult) GetColumns() []string { + if o == nil { + var ret []string + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *QueueExportToDatasetResult) GetColumnsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *QueueExportToDatasetResult) SetColumns(v []string) { + o.Columns = v +} + +func (o QueueExportToDatasetResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueExportToDatasetResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["dataset_name"] = o.DatasetName + toSerialize["rows_created"] = o.RowsCreated + toSerialize["columns"] = o.Columns + return toSerialize, nil +} + +func (o *QueueExportToDatasetResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "dataset_name", + "rows_created", + "columns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueExportToDatasetResult := _QueueExportToDatasetResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueExportToDatasetResult) + + if err != nil { + return err + } + + *o = QueueExportToDatasetResult(varQueueExportToDatasetResult) + + return err +} + +type NullableQueueExportToDatasetResult struct { + value *QueueExportToDatasetResult + isSet bool +} + +func (v NullableQueueExportToDatasetResult) Get() *QueueExportToDatasetResult { + return v.value +} + +func (v *NullableQueueExportToDatasetResult) Set(val *QueueExportToDatasetResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueExportToDatasetResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueExportToDatasetResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueExportToDatasetResult(val *QueueExportToDatasetResult) *NullableQueueExportToDatasetResult { + return &NullableQueueExportToDatasetResult{value: val, isSet: true} +} + +func (v NullableQueueExportToDatasetResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueExportToDatasetResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_for_source_entry.go b/go/futureagi/model_queue_for_source_entry.go new file mode 100644 index 0000000..577d336 --- /dev/null +++ b/go/futureagi/model_queue_for_source_entry.go @@ -0,0 +1,372 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueForSourceEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueForSourceEntry{} + +// QueueForSourceEntry struct for QueueForSourceEntry +type QueueForSourceEntry struct { + Queue QueueForSourceQueue `json:"queue"` + Item QueueForSourceItem `json:"item"` + Labels []QueueLabelResult `json:"labels"` + ExistingScores map[string]map[string]interface{} `json:"existing_scores"` + ExistingNotes string `json:"existing_notes"` + ExistingLabelNotes map[string]string `json:"existing_label_notes"` + SpanNotes []map[string]interface{} `json:"span_notes"` + SpanNotesSourceId NullableString `json:"span_notes_source_id,omitempty"` +} + +type _QueueForSourceEntry QueueForSourceEntry + +// NewQueueForSourceEntry instantiates a new QueueForSourceEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueForSourceEntry(queue QueueForSourceQueue, item QueueForSourceItem, labels []QueueLabelResult, existingScores map[string]map[string]interface{}, existingNotes string, existingLabelNotes map[string]string, spanNotes []map[string]interface{}) *QueueForSourceEntry { + this := QueueForSourceEntry{} + this.Queue = queue + this.Item = item + this.Labels = labels + this.ExistingScores = existingScores + this.ExistingNotes = existingNotes + this.ExistingLabelNotes = existingLabelNotes + this.SpanNotes = spanNotes + return &this +} + +// NewQueueForSourceEntryWithDefaults instantiates a new QueueForSourceEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueForSourceEntryWithDefaults() *QueueForSourceEntry { + this := QueueForSourceEntry{} + return &this +} + +// GetQueue returns the Queue field value +func (o *QueueForSourceEntry) GetQueue() QueueForSourceQueue { + if o == nil { + var ret QueueForSourceQueue + return ret + } + + return o.Queue +} + +// GetQueueOk returns a tuple with the Queue field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceEntry) GetQueueOk() (*QueueForSourceQueue, bool) { + if o == nil { + return nil, false + } + return &o.Queue, true +} + +// SetQueue sets field value +func (o *QueueForSourceEntry) SetQueue(v QueueForSourceQueue) { + o.Queue = v +} + +// GetItem returns the Item field value +func (o *QueueForSourceEntry) GetItem() QueueForSourceItem { + if o == nil { + var ret QueueForSourceItem + return ret + } + + return o.Item +} + +// GetItemOk returns a tuple with the Item field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceEntry) GetItemOk() (*QueueForSourceItem, bool) { + if o == nil { + return nil, false + } + return &o.Item, true +} + +// SetItem sets field value +func (o *QueueForSourceEntry) SetItem(v QueueForSourceItem) { + o.Item = v +} + +// GetLabels returns the Labels field value +func (o *QueueForSourceEntry) GetLabels() []QueueLabelResult { + if o == nil { + var ret []QueueLabelResult + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceEntry) GetLabelsOk() ([]QueueLabelResult, bool) { + if o == nil { + return nil, false + } + return o.Labels, true +} + +// SetLabels sets field value +func (o *QueueForSourceEntry) SetLabels(v []QueueLabelResult) { + o.Labels = v +} + +// GetExistingScores returns the ExistingScores field value +func (o *QueueForSourceEntry) GetExistingScores() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.ExistingScores +} + +// GetExistingScoresOk returns a tuple with the ExistingScores field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceEntry) GetExistingScoresOk() (*map[string]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return &o.ExistingScores, true +} + +// SetExistingScores sets field value +func (o *QueueForSourceEntry) SetExistingScores(v map[string]map[string]interface{}) { + o.ExistingScores = v +} + +// GetExistingNotes returns the ExistingNotes field value +func (o *QueueForSourceEntry) GetExistingNotes() string { + if o == nil { + var ret string + return ret + } + + return o.ExistingNotes +} + +// GetExistingNotesOk returns a tuple with the ExistingNotes field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceEntry) GetExistingNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExistingNotes, true +} + +// SetExistingNotes sets field value +func (o *QueueForSourceEntry) SetExistingNotes(v string) { + o.ExistingNotes = v +} + +// GetExistingLabelNotes returns the ExistingLabelNotes field value +func (o *QueueForSourceEntry) GetExistingLabelNotes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.ExistingLabelNotes +} + +// GetExistingLabelNotesOk returns a tuple with the ExistingLabelNotes field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceEntry) GetExistingLabelNotesOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.ExistingLabelNotes, true +} + +// SetExistingLabelNotes sets field value +func (o *QueueForSourceEntry) SetExistingLabelNotes(v map[string]string) { + o.ExistingLabelNotes = v +} + +// GetSpanNotes returns the SpanNotes field value +func (o *QueueForSourceEntry) GetSpanNotes() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.SpanNotes +} + +// GetSpanNotesOk returns a tuple with the SpanNotes field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceEntry) GetSpanNotesOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.SpanNotes, true +} + +// SetSpanNotes sets field value +func (o *QueueForSourceEntry) SetSpanNotes(v []map[string]interface{}) { + o.SpanNotes = v +} + +// GetSpanNotesSourceId returns the SpanNotesSourceId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueForSourceEntry) GetSpanNotesSourceId() string { + if o == nil || IsNil(o.SpanNotesSourceId.Get()) { + var ret string + return ret + } + return *o.SpanNotesSourceId.Get() +} + +// GetSpanNotesSourceIdOk returns a tuple with the SpanNotesSourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueForSourceEntry) GetSpanNotesSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SpanNotesSourceId.Get(), o.SpanNotesSourceId.IsSet() +} + +// HasSpanNotesSourceId returns a boolean if a field has been set. +func (o *QueueForSourceEntry) HasSpanNotesSourceId() bool { + if o != nil && o.SpanNotesSourceId.IsSet() { + return true + } + + return false +} + +// SetSpanNotesSourceId gets a reference to the given NullableString and assigns it to the SpanNotesSourceId field. +func (o *QueueForSourceEntry) SetSpanNotesSourceId(v string) { + o.SpanNotesSourceId.Set(&v) +} + +// SetSpanNotesSourceIdNil sets the value for SpanNotesSourceId to be an explicit nil +func (o *QueueForSourceEntry) SetSpanNotesSourceIdNil() { + o.SpanNotesSourceId.Set(nil) +} + +// UnsetSpanNotesSourceId ensures that no value is present for SpanNotesSourceId, not even an explicit nil +func (o *QueueForSourceEntry) UnsetSpanNotesSourceId() { + o.SpanNotesSourceId.Unset() +} + +func (o QueueForSourceEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueForSourceEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["queue"] = o.Queue + toSerialize["item"] = o.Item + toSerialize["labels"] = o.Labels + toSerialize["existing_scores"] = o.ExistingScores + toSerialize["existing_notes"] = o.ExistingNotes + toSerialize["existing_label_notes"] = o.ExistingLabelNotes + toSerialize["span_notes"] = o.SpanNotes + if o.SpanNotesSourceId.IsSet() { + toSerialize["span_notes_source_id"] = o.SpanNotesSourceId.Get() + } + return toSerialize, nil +} + +func (o *QueueForSourceEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "queue", + "item", + "labels", + "existing_scores", + "existing_notes", + "existing_label_notes", + "span_notes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueForSourceEntry := _QueueForSourceEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueForSourceEntry) + + if err != nil { + return err + } + + *o = QueueForSourceEntry(varQueueForSourceEntry) + + return err +} + +type NullableQueueForSourceEntry struct { + value *QueueForSourceEntry + isSet bool +} + +func (v NullableQueueForSourceEntry) Get() *QueueForSourceEntry { + return v.value +} + +func (v *NullableQueueForSourceEntry) Set(val *QueueForSourceEntry) { + v.value = val + v.isSet = true +} + +func (v NullableQueueForSourceEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueForSourceEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueForSourceEntry(val *QueueForSourceEntry) *NullableQueueForSourceEntry { + return &NullableQueueForSourceEntry{value: val, isSet: true} +} + +func (v NullableQueueForSourceEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueForSourceEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_for_source_item.go b/go/futureagi/model_queue_for_source_item.go new file mode 100644 index 0000000..509d981 --- /dev/null +++ b/go/futureagi/model_queue_for_source_item.go @@ -0,0 +1,243 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueForSourceItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueForSourceItem{} + +// QueueForSourceItem struct for QueueForSourceItem +type QueueForSourceItem struct { + Id string `json:"id"` + Status string `json:"status"` + SourceType string `json:"source_type"` + SourceId NullableString `json:"source_id"` +} + +type _QueueForSourceItem QueueForSourceItem + +// NewQueueForSourceItem instantiates a new QueueForSourceItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueForSourceItem(id string, status string, sourceType string, sourceId NullableString) *QueueForSourceItem { + this := QueueForSourceItem{} + this.Id = id + this.Status = status + this.SourceType = sourceType + this.SourceId = sourceId + return &this +} + +// NewQueueForSourceItemWithDefaults instantiates a new QueueForSourceItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueForSourceItemWithDefaults() *QueueForSourceItem { + this := QueueForSourceItem{} + return &this +} + +// GetId returns the Id field value +func (o *QueueForSourceItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *QueueForSourceItem) SetId(v string) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *QueueForSourceItem) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceItem) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *QueueForSourceItem) SetStatus(v string) { + o.Status = v +} + +// GetSourceType returns the SourceType field value +func (o *QueueForSourceItem) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceItem) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *QueueForSourceItem) SetSourceType(v string) { + o.SourceType = v +} + +// GetSourceId returns the SourceId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *QueueForSourceItem) GetSourceId() string { + if o == nil || o.SourceId.Get() == nil { + var ret string + return ret + } + + return *o.SourceId.Get() +} + +// GetSourceIdOk returns a tuple with the SourceId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueForSourceItem) GetSourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SourceId.Get(), o.SourceId.IsSet() +} + +// SetSourceId sets field value +func (o *QueueForSourceItem) SetSourceId(v string) { + o.SourceId.Set(&v) +} + +func (o QueueForSourceItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueForSourceItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["source_type"] = o.SourceType + toSerialize["source_id"] = o.SourceId.Get() + return toSerialize, nil +} + +func (o *QueueForSourceItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "status", + "source_type", + "source_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueForSourceItem := _QueueForSourceItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueForSourceItem) + + if err != nil { + return err + } + + *o = QueueForSourceItem(varQueueForSourceItem) + + return err +} + +type NullableQueueForSourceItem struct { + value *QueueForSourceItem + isSet bool +} + +func (v NullableQueueForSourceItem) Get() *QueueForSourceItem { + return v.value +} + +func (v *NullableQueueForSourceItem) Set(val *QueueForSourceItem) { + v.value = val + v.isSet = true +} + +func (v NullableQueueForSourceItem) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueForSourceItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueForSourceItem(val *QueueForSourceItem) *NullableQueueForSourceItem { + return &NullableQueueForSourceItem{value: val, isSet: true} +} + +func (v NullableQueueForSourceItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueForSourceItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_for_source_queue.go b/go/futureagi/model_queue_for_source_queue.go new file mode 100644 index 0000000..e9d9c95 --- /dev/null +++ b/go/futureagi/model_queue_for_source_queue.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueForSourceQueue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueForSourceQueue{} + +// QueueForSourceQueue struct for QueueForSourceQueue +type QueueForSourceQueue struct { + Id string `json:"id"` + Name string `json:"name"` + Instructions string `json:"instructions"` + IsDefault bool `json:"is_default"` +} + +type _QueueForSourceQueue QueueForSourceQueue + +// NewQueueForSourceQueue instantiates a new QueueForSourceQueue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueForSourceQueue(id string, name string, instructions string, isDefault bool) *QueueForSourceQueue { + this := QueueForSourceQueue{} + this.Id = id + this.Name = name + this.Instructions = instructions + this.IsDefault = isDefault + return &this +} + +// NewQueueForSourceQueueWithDefaults instantiates a new QueueForSourceQueue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueForSourceQueueWithDefaults() *QueueForSourceQueue { + this := QueueForSourceQueue{} + return &this +} + +// GetId returns the Id field value +func (o *QueueForSourceQueue) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceQueue) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *QueueForSourceQueue) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *QueueForSourceQueue) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceQueue) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *QueueForSourceQueue) SetName(v string) { + o.Name = v +} + +// GetInstructions returns the Instructions field value +func (o *QueueForSourceQueue) GetInstructions() string { + if o == nil { + var ret string + return ret + } + + return o.Instructions +} + +// GetInstructionsOk returns a tuple with the Instructions field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceQueue) GetInstructionsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Instructions, true +} + +// SetInstructions sets field value +func (o *QueueForSourceQueue) SetInstructions(v string) { + o.Instructions = v +} + +// GetIsDefault returns the IsDefault field value +func (o *QueueForSourceQueue) GetIsDefault() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceQueue) GetIsDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDefault, true +} + +// SetIsDefault sets field value +func (o *QueueForSourceQueue) SetIsDefault(v bool) { + o.IsDefault = v +} + +func (o QueueForSourceQueue) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueForSourceQueue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["instructions"] = o.Instructions + toSerialize["is_default"] = o.IsDefault + return toSerialize, nil +} + +func (o *QueueForSourceQueue) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "instructions", + "is_default", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueForSourceQueue := _QueueForSourceQueue{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueForSourceQueue) + + if err != nil { + return err + } + + *o = QueueForSourceQueue(varQueueForSourceQueue) + + return err +} + +type NullableQueueForSourceQueue struct { + value *QueueForSourceQueue + isSet bool +} + +func (v NullableQueueForSourceQueue) Get() *QueueForSourceQueue { + return v.value +} + +func (v *NullableQueueForSourceQueue) Set(val *QueueForSourceQueue) { + v.value = val + v.isSet = true +} + +func (v NullableQueueForSourceQueue) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueForSourceQueue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueForSourceQueue(val *QueueForSourceQueue) *NullableQueueForSourceQueue { + return &NullableQueueForSourceQueue{value: val, isSet: true} +} + +func (v NullableQueueForSourceQueue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueForSourceQueue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_for_source_response.go b/go/futureagi/model_queue_for_source_response.go new file mode 100644 index 0000000..f9782dd --- /dev/null +++ b/go/futureagi/model_queue_for_source_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueForSourceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueForSourceResponse{} + +// QueueForSourceResponse struct for QueueForSourceResponse +type QueueForSourceResponse struct { + Status *bool `json:"status,omitempty"` + Result []QueueForSourceEntry `json:"result"` +} + +type _QueueForSourceResponse QueueForSourceResponse + +// NewQueueForSourceResponse instantiates a new QueueForSourceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueForSourceResponse(result []QueueForSourceEntry) *QueueForSourceResponse { + this := QueueForSourceResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueForSourceResponseWithDefaults instantiates a new QueueForSourceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueForSourceResponseWithDefaults() *QueueForSourceResponse { + this := QueueForSourceResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueForSourceResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueForSourceResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueForSourceResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueForSourceResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueForSourceResponse) GetResult() []QueueForSourceEntry { + if o == nil { + var ret []QueueForSourceEntry + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueForSourceResponse) GetResultOk() ([]QueueForSourceEntry, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *QueueForSourceResponse) SetResult(v []QueueForSourceEntry) { + o.Result = v +} + +func (o QueueForSourceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueForSourceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueForSourceResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueForSourceResponse := _QueueForSourceResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueForSourceResponse) + + if err != nil { + return err + } + + *o = QueueForSourceResponse(varQueueForSourceResponse) + + return err +} + +type NullableQueueForSourceResponse struct { + value *QueueForSourceResponse + isSet bool +} + +func (v NullableQueueForSourceResponse) Get() *QueueForSourceResponse { + return v.value +} + +func (v *NullableQueueForSourceResponse) Set(val *QueueForSourceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueForSourceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueForSourceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueForSourceResponse(val *QueueForSourceResponse) *NullableQueueForSourceResponse { + return &NullableQueueForSourceResponse{value: val, isSet: true} +} + +func (v NullableQueueForSourceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueForSourceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_hard_delete_request.go b/go/futureagi/model_queue_hard_delete_request.go new file mode 100644 index 0000000..db6dcb1 --- /dev/null +++ b/go/futureagi/model_queue_hard_delete_request.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueHardDeleteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueHardDeleteRequest{} + +// QueueHardDeleteRequest struct for QueueHardDeleteRequest +type QueueHardDeleteRequest struct { + Force bool `json:"force"` + ConfirmName string `json:"confirm_name"` +} + +type _QueueHardDeleteRequest QueueHardDeleteRequest + +// NewQueueHardDeleteRequest instantiates a new QueueHardDeleteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueHardDeleteRequest(force bool, confirmName string) *QueueHardDeleteRequest { + this := QueueHardDeleteRequest{} + this.Force = force + this.ConfirmName = confirmName + return &this +} + +// NewQueueHardDeleteRequestWithDefaults instantiates a new QueueHardDeleteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueHardDeleteRequestWithDefaults() *QueueHardDeleteRequest { + this := QueueHardDeleteRequest{} + return &this +} + +// GetForce returns the Force field value +func (o *QueueHardDeleteRequest) GetForce() bool { + if o == nil { + var ret bool + return ret + } + + return o.Force +} + +// GetForceOk returns a tuple with the Force field value +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteRequest) GetForceOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Force, true +} + +// SetForce sets field value +func (o *QueueHardDeleteRequest) SetForce(v bool) { + o.Force = v +} + +// GetConfirmName returns the ConfirmName field value +func (o *QueueHardDeleteRequest) GetConfirmName() string { + if o == nil { + var ret string + return ret + } + + return o.ConfirmName +} + +// GetConfirmNameOk returns a tuple with the ConfirmName field value +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteRequest) GetConfirmNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConfirmName, true +} + +// SetConfirmName sets field value +func (o *QueueHardDeleteRequest) SetConfirmName(v string) { + o.ConfirmName = v +} + +func (o QueueHardDeleteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueHardDeleteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["force"] = o.Force + toSerialize["confirm_name"] = o.ConfirmName + return toSerialize, nil +} + +func (o *QueueHardDeleteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "force", + "confirm_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueHardDeleteRequest := _QueueHardDeleteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueHardDeleteRequest) + + if err != nil { + return err + } + + *o = QueueHardDeleteRequest(varQueueHardDeleteRequest) + + return err +} + +type NullableQueueHardDeleteRequest struct { + value *QueueHardDeleteRequest + isSet bool +} + +func (v NullableQueueHardDeleteRequest) Get() *QueueHardDeleteRequest { + return v.value +} + +func (v *NullableQueueHardDeleteRequest) Set(val *QueueHardDeleteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableQueueHardDeleteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueHardDeleteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueHardDeleteRequest(val *QueueHardDeleteRequest) *NullableQueueHardDeleteRequest { + return &NullableQueueHardDeleteRequest{value: val, isSet: true} +} + +func (v NullableQueueHardDeleteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueHardDeleteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_hard_delete_response.go b/go/futureagi/model_queue_hard_delete_response.go new file mode 100644 index 0000000..ab04481 --- /dev/null +++ b/go/futureagi/model_queue_hard_delete_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueHardDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueHardDeleteResponse{} + +// QueueHardDeleteResponse struct for QueueHardDeleteResponse +type QueueHardDeleteResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueHardDeleteResult `json:"result"` +} + +type _QueueHardDeleteResponse QueueHardDeleteResponse + +// NewQueueHardDeleteResponse instantiates a new QueueHardDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueHardDeleteResponse(result QueueHardDeleteResult) *QueueHardDeleteResponse { + this := QueueHardDeleteResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueHardDeleteResponseWithDefaults instantiates a new QueueHardDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueHardDeleteResponseWithDefaults() *QueueHardDeleteResponse { + this := QueueHardDeleteResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueHardDeleteResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueHardDeleteResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueHardDeleteResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueHardDeleteResponse) GetResult() QueueHardDeleteResult { + if o == nil { + var ret QueueHardDeleteResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteResponse) GetResultOk() (*QueueHardDeleteResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueHardDeleteResponse) SetResult(v QueueHardDeleteResult) { + o.Result = v +} + +func (o QueueHardDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueHardDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueHardDeleteResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueHardDeleteResponse := _QueueHardDeleteResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueHardDeleteResponse) + + if err != nil { + return err + } + + *o = QueueHardDeleteResponse(varQueueHardDeleteResponse) + + return err +} + +type NullableQueueHardDeleteResponse struct { + value *QueueHardDeleteResponse + isSet bool +} + +func (v NullableQueueHardDeleteResponse) Get() *QueueHardDeleteResponse { + return v.value +} + +func (v *NullableQueueHardDeleteResponse) Set(val *QueueHardDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueHardDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueHardDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueHardDeleteResponse(val *QueueHardDeleteResponse) *NullableQueueHardDeleteResponse { + return &NullableQueueHardDeleteResponse{value: val, isSet: true} +} + +func (v NullableQueueHardDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueHardDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_hard_delete_result.go b/go/futureagi/model_queue_hard_delete_result.go new file mode 100644 index 0000000..321195c --- /dev/null +++ b/go/futureagi/model_queue_hard_delete_result.go @@ -0,0 +1,257 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueHardDeleteResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueHardDeleteResult{} + +// QueueHardDeleteResult struct for QueueHardDeleteResult +type QueueHardDeleteResult struct { + Deleted bool `json:"deleted"` + HardDeleted *bool `json:"hard_deleted,omitempty"` + Archived *bool `json:"archived,omitempty"` + QueueId string `json:"queue_id"` +} + +type _QueueHardDeleteResult QueueHardDeleteResult + +// NewQueueHardDeleteResult instantiates a new QueueHardDeleteResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueHardDeleteResult(deleted bool, queueId string) *QueueHardDeleteResult { + this := QueueHardDeleteResult{} + this.Deleted = deleted + this.QueueId = queueId + return &this +} + +// NewQueueHardDeleteResultWithDefaults instantiates a new QueueHardDeleteResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueHardDeleteResultWithDefaults() *QueueHardDeleteResult { + this := QueueHardDeleteResult{} + return &this +} + +// GetDeleted returns the Deleted field value +func (o *QueueHardDeleteResult) GetDeleted() bool { + if o == nil { + var ret bool + return ret + } + + return o.Deleted +} + +// GetDeletedOk returns a tuple with the Deleted field value +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteResult) GetDeletedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Deleted, true +} + +// SetDeleted sets field value +func (o *QueueHardDeleteResult) SetDeleted(v bool) { + o.Deleted = v +} + +// GetHardDeleted returns the HardDeleted field value if set, zero value otherwise. +func (o *QueueHardDeleteResult) GetHardDeleted() bool { + if o == nil || IsNil(o.HardDeleted) { + var ret bool + return ret + } + return *o.HardDeleted +} + +// GetHardDeletedOk returns a tuple with the HardDeleted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteResult) GetHardDeletedOk() (*bool, bool) { + if o == nil || IsNil(o.HardDeleted) { + return nil, false + } + return o.HardDeleted, true +} + +// HasHardDeleted returns a boolean if a field has been set. +func (o *QueueHardDeleteResult) HasHardDeleted() bool { + if o != nil && !IsNil(o.HardDeleted) { + return true + } + + return false +} + +// SetHardDeleted gets a reference to the given bool and assigns it to the HardDeleted field. +func (o *QueueHardDeleteResult) SetHardDeleted(v bool) { + o.HardDeleted = &v +} + +// GetArchived returns the Archived field value if set, zero value otherwise. +func (o *QueueHardDeleteResult) GetArchived() bool { + if o == nil || IsNil(o.Archived) { + var ret bool + return ret + } + return *o.Archived +} + +// GetArchivedOk returns a tuple with the Archived field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteResult) GetArchivedOk() (*bool, bool) { + if o == nil || IsNil(o.Archived) { + return nil, false + } + return o.Archived, true +} + +// HasArchived returns a boolean if a field has been set. +func (o *QueueHardDeleteResult) HasArchived() bool { + if o != nil && !IsNil(o.Archived) { + return true + } + + return false +} + +// SetArchived gets a reference to the given bool and assigns it to the Archived field. +func (o *QueueHardDeleteResult) SetArchived(v bool) { + o.Archived = &v +} + +// GetQueueId returns the QueueId field value +func (o *QueueHardDeleteResult) GetQueueId() string { + if o == nil { + var ret string + return ret + } + + return o.QueueId +} + +// GetQueueIdOk returns a tuple with the QueueId field value +// and a boolean to check if the value has been set. +func (o *QueueHardDeleteResult) GetQueueIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.QueueId, true +} + +// SetQueueId sets field value +func (o *QueueHardDeleteResult) SetQueueId(v string) { + o.QueueId = v +} + +func (o QueueHardDeleteResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueHardDeleteResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["deleted"] = o.Deleted + if !IsNil(o.HardDeleted) { + toSerialize["hard_deleted"] = o.HardDeleted + } + if !IsNil(o.Archived) { + toSerialize["archived"] = o.Archived + } + toSerialize["queue_id"] = o.QueueId + return toSerialize, nil +} + +func (o *QueueHardDeleteResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "deleted", + "queue_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueHardDeleteResult := _QueueHardDeleteResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueHardDeleteResult) + + if err != nil { + return err + } + + *o = QueueHardDeleteResult(varQueueHardDeleteResult) + + return err +} + +type NullableQueueHardDeleteResult struct { + value *QueueHardDeleteResult + isSet bool +} + +func (v NullableQueueHardDeleteResult) Get() *QueueHardDeleteResult { + return v.value +} + +func (v *NullableQueueHardDeleteResult) Set(val *QueueHardDeleteResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueHardDeleteResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueHardDeleteResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueHardDeleteResult(val *QueueHardDeleteResult) *NullableQueueHardDeleteResult { + return &NullableQueueHardDeleteResult{value: val, isSet: true} +} + +func (v NullableQueueHardDeleteResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueHardDeleteResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_import_annotations_response.go b/go/futureagi/model_queue_import_annotations_response.go new file mode 100644 index 0000000..8ffae6d --- /dev/null +++ b/go/futureagi/model_queue_import_annotations_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueImportAnnotationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueImportAnnotationsResponse{} + +// QueueImportAnnotationsResponse struct for QueueImportAnnotationsResponse +type QueueImportAnnotationsResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueImportAnnotationsResult `json:"result"` +} + +type _QueueImportAnnotationsResponse QueueImportAnnotationsResponse + +// NewQueueImportAnnotationsResponse instantiates a new QueueImportAnnotationsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueImportAnnotationsResponse(result QueueImportAnnotationsResult) *QueueImportAnnotationsResponse { + this := QueueImportAnnotationsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueImportAnnotationsResponseWithDefaults instantiates a new QueueImportAnnotationsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueImportAnnotationsResponseWithDefaults() *QueueImportAnnotationsResponse { + this := QueueImportAnnotationsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueImportAnnotationsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueImportAnnotationsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueImportAnnotationsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueImportAnnotationsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueImportAnnotationsResponse) GetResult() QueueImportAnnotationsResult { + if o == nil { + var ret QueueImportAnnotationsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueImportAnnotationsResponse) GetResultOk() (*QueueImportAnnotationsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueImportAnnotationsResponse) SetResult(v QueueImportAnnotationsResult) { + o.Result = v +} + +func (o QueueImportAnnotationsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueImportAnnotationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueImportAnnotationsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueImportAnnotationsResponse := _QueueImportAnnotationsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueImportAnnotationsResponse) + + if err != nil { + return err + } + + *o = QueueImportAnnotationsResponse(varQueueImportAnnotationsResponse) + + return err +} + +type NullableQueueImportAnnotationsResponse struct { + value *QueueImportAnnotationsResponse + isSet bool +} + +func (v NullableQueueImportAnnotationsResponse) Get() *QueueImportAnnotationsResponse { + return v.value +} + +func (v *NullableQueueImportAnnotationsResponse) Set(val *QueueImportAnnotationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueImportAnnotationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueImportAnnotationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueImportAnnotationsResponse(val *QueueImportAnnotationsResponse) *NullableQueueImportAnnotationsResponse { + return &NullableQueueImportAnnotationsResponse{value: val, isSet: true} +} + +func (v NullableQueueImportAnnotationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueImportAnnotationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_import_annotations_result.go b/go/futureagi/model_queue_import_annotations_result.go new file mode 100644 index 0000000..bb9515c --- /dev/null +++ b/go/futureagi/model_queue_import_annotations_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueImportAnnotationsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueImportAnnotationsResult{} + +// QueueImportAnnotationsResult struct for QueueImportAnnotationsResult +type QueueImportAnnotationsResult struct { + Imported int32 `json:"imported"` +} + +type _QueueImportAnnotationsResult QueueImportAnnotationsResult + +// NewQueueImportAnnotationsResult instantiates a new QueueImportAnnotationsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueImportAnnotationsResult(imported int32) *QueueImportAnnotationsResult { + this := QueueImportAnnotationsResult{} + this.Imported = imported + return &this +} + +// NewQueueImportAnnotationsResultWithDefaults instantiates a new QueueImportAnnotationsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueImportAnnotationsResultWithDefaults() *QueueImportAnnotationsResult { + this := QueueImportAnnotationsResult{} + return &this +} + +// GetImported returns the Imported field value +func (o *QueueImportAnnotationsResult) GetImported() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Imported +} + +// GetImportedOk returns a tuple with the Imported field value +// and a boolean to check if the value has been set. +func (o *QueueImportAnnotationsResult) GetImportedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Imported, true +} + +// SetImported sets field value +func (o *QueueImportAnnotationsResult) SetImported(v int32) { + o.Imported = v +} + +func (o QueueImportAnnotationsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueImportAnnotationsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["imported"] = o.Imported + return toSerialize, nil +} + +func (o *QueueImportAnnotationsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "imported", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueImportAnnotationsResult := _QueueImportAnnotationsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueImportAnnotationsResult) + + if err != nil { + return err + } + + *o = QueueImportAnnotationsResult(varQueueImportAnnotationsResult) + + return err +} + +type NullableQueueImportAnnotationsResult struct { + value *QueueImportAnnotationsResult + isSet bool +} + +func (v NullableQueueImportAnnotationsResult) Get() *QueueImportAnnotationsResult { + return v.value +} + +func (v *NullableQueueImportAnnotationsResult) Set(val *QueueImportAnnotationsResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueImportAnnotationsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueImportAnnotationsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueImportAnnotationsResult(val *QueueImportAnnotationsResult) *NullableQueueImportAnnotationsResult { + return &NullableQueueImportAnnotationsResult{value: val, isSet: true} +} + +func (v NullableQueueImportAnnotationsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueImportAnnotationsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_item.go b/go/futureagi/model_queue_item.go new file mode 100644 index 0000000..02c934b --- /dev/null +++ b/go/futureagi/model_queue_item.go @@ -0,0 +1,1027 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the QueueItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueItem{} + +// QueueItem struct for QueueItem +type QueueItem struct { + Id *string `json:"id,omitempty"` + Queue *string `json:"queue,omitempty"` + SourceType string `json:"source_type"` + SourceId *string `json:"source_id,omitempty"` + Status *string `json:"status,omitempty"` + WorkflowStatus *string `json:"workflow_status,omitempty"` + WorkflowStatusLabel *string `json:"workflow_status_label,omitempty"` + Priority *int32 `json:"priority,omitempty"` + Order *int32 `json:"order,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + AssignedTo NullableString `json:"assigned_to,omitempty"` + AssignedToName *string `json:"assigned_to_name,omitempty"` + AssignedUsers *string `json:"assigned_users,omitempty"` + ReservedBy NullableString `json:"reserved_by,omitempty"` + ReservedByName *string `json:"reserved_by_name,omitempty"` + ReservationExpiresAt NullableTime `json:"reservation_expires_at,omitempty"` + ReviewStatus NullableString `json:"review_status,omitempty"` + ReviewedBy NullableString `json:"reviewed_by,omitempty"` + ReviewedByName *string `json:"reviewed_by_name,omitempty"` + ReviewedAt NullableTime `json:"reviewed_at,omitempty"` + ReviewNotes NullableString `json:"review_notes,omitempty"` + SourcePreview *string `json:"source_preview,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +type _QueueItem QueueItem + +// NewQueueItem instantiates a new QueueItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueItem(sourceType string) *QueueItem { + this := QueueItem{} + this.SourceType = sourceType + return &this +} + +// NewQueueItemWithDefaults instantiates a new QueueItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueItemWithDefaults() *QueueItem { + this := QueueItem{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *QueueItem) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *QueueItem) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *QueueItem) SetId(v string) { + o.Id = &v +} + +// GetQueue returns the Queue field value if set, zero value otherwise. +func (o *QueueItem) GetQueue() string { + if o == nil || IsNil(o.Queue) { + var ret string + return ret + } + return *o.Queue +} + +// GetQueueOk returns a tuple with the Queue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetQueueOk() (*string, bool) { + if o == nil || IsNil(o.Queue) { + return nil, false + } + return o.Queue, true +} + +// HasQueue returns a boolean if a field has been set. +func (o *QueueItem) HasQueue() bool { + if o != nil && !IsNil(o.Queue) { + return true + } + + return false +} + +// SetQueue gets a reference to the given string and assigns it to the Queue field. +func (o *QueueItem) SetQueue(v string) { + o.Queue = &v +} + +// GetSourceType returns the SourceType field value +func (o *QueueItem) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *QueueItem) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *QueueItem) SetSourceType(v string) { + o.SourceType = v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *QueueItem) GetSourceId() string { + if o == nil || IsNil(o.SourceId) { + var ret string + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetSourceIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *QueueItem) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given string and assigns it to the SourceId field. +func (o *QueueItem) SetSourceId(v string) { + o.SourceId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueItem) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueItem) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *QueueItem) SetStatus(v string) { + o.Status = &v +} + +// GetWorkflowStatus returns the WorkflowStatus field value if set, zero value otherwise. +func (o *QueueItem) GetWorkflowStatus() string { + if o == nil || IsNil(o.WorkflowStatus) { + var ret string + return ret + } + return *o.WorkflowStatus +} + +// GetWorkflowStatusOk returns a tuple with the WorkflowStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetWorkflowStatusOk() (*string, bool) { + if o == nil || IsNil(o.WorkflowStatus) { + return nil, false + } + return o.WorkflowStatus, true +} + +// HasWorkflowStatus returns a boolean if a field has been set. +func (o *QueueItem) HasWorkflowStatus() bool { + if o != nil && !IsNil(o.WorkflowStatus) { + return true + } + + return false +} + +// SetWorkflowStatus gets a reference to the given string and assigns it to the WorkflowStatus field. +func (o *QueueItem) SetWorkflowStatus(v string) { + o.WorkflowStatus = &v +} + +// GetWorkflowStatusLabel returns the WorkflowStatusLabel field value if set, zero value otherwise. +func (o *QueueItem) GetWorkflowStatusLabel() string { + if o == nil || IsNil(o.WorkflowStatusLabel) { + var ret string + return ret + } + return *o.WorkflowStatusLabel +} + +// GetWorkflowStatusLabelOk returns a tuple with the WorkflowStatusLabel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetWorkflowStatusLabelOk() (*string, bool) { + if o == nil || IsNil(o.WorkflowStatusLabel) { + return nil, false + } + return o.WorkflowStatusLabel, true +} + +// HasWorkflowStatusLabel returns a boolean if a field has been set. +func (o *QueueItem) HasWorkflowStatusLabel() bool { + if o != nil && !IsNil(o.WorkflowStatusLabel) { + return true + } + + return false +} + +// SetWorkflowStatusLabel gets a reference to the given string and assigns it to the WorkflowStatusLabel field. +func (o *QueueItem) SetWorkflowStatusLabel(v string) { + o.WorkflowStatusLabel = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *QueueItem) GetPriority() int32 { + if o == nil || IsNil(o.Priority) { + var ret int32 + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetPriorityOk() (*int32, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *QueueItem) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given int32 and assigns it to the Priority field. +func (o *QueueItem) SetPriority(v int32) { + o.Priority = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *QueueItem) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetOrderOk() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *QueueItem) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *QueueItem) SetOrder(v int32) { + o.Order = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *QueueItem) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *QueueItem) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *QueueItem) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetAssignedTo returns the AssignedTo field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueItem) GetAssignedTo() string { + if o == nil || IsNil(o.AssignedTo.Get()) { + var ret string + return ret + } + return *o.AssignedTo.Get() +} + +// GetAssignedToOk returns a tuple with the AssignedTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueItem) GetAssignedToOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AssignedTo.Get(), o.AssignedTo.IsSet() +} + +// HasAssignedTo returns a boolean if a field has been set. +func (o *QueueItem) HasAssignedTo() bool { + if o != nil && o.AssignedTo.IsSet() { + return true + } + + return false +} + +// SetAssignedTo gets a reference to the given NullableString and assigns it to the AssignedTo field. +func (o *QueueItem) SetAssignedTo(v string) { + o.AssignedTo.Set(&v) +} + +// SetAssignedToNil sets the value for AssignedTo to be an explicit nil +func (o *QueueItem) SetAssignedToNil() { + o.AssignedTo.Set(nil) +} + +// UnsetAssignedTo ensures that no value is present for AssignedTo, not even an explicit nil +func (o *QueueItem) UnsetAssignedTo() { + o.AssignedTo.Unset() +} + +// GetAssignedToName returns the AssignedToName field value if set, zero value otherwise. +func (o *QueueItem) GetAssignedToName() string { + if o == nil || IsNil(o.AssignedToName) { + var ret string + return ret + } + return *o.AssignedToName +} + +// GetAssignedToNameOk returns a tuple with the AssignedToName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetAssignedToNameOk() (*string, bool) { + if o == nil || IsNil(o.AssignedToName) { + return nil, false + } + return o.AssignedToName, true +} + +// HasAssignedToName returns a boolean if a field has been set. +func (o *QueueItem) HasAssignedToName() bool { + if o != nil && !IsNil(o.AssignedToName) { + return true + } + + return false +} + +// SetAssignedToName gets a reference to the given string and assigns it to the AssignedToName field. +func (o *QueueItem) SetAssignedToName(v string) { + o.AssignedToName = &v +} + +// GetAssignedUsers returns the AssignedUsers field value if set, zero value otherwise. +func (o *QueueItem) GetAssignedUsers() string { + if o == nil || IsNil(o.AssignedUsers) { + var ret string + return ret + } + return *o.AssignedUsers +} + +// GetAssignedUsersOk returns a tuple with the AssignedUsers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetAssignedUsersOk() (*string, bool) { + if o == nil || IsNil(o.AssignedUsers) { + return nil, false + } + return o.AssignedUsers, true +} + +// HasAssignedUsers returns a boolean if a field has been set. +func (o *QueueItem) HasAssignedUsers() bool { + if o != nil && !IsNil(o.AssignedUsers) { + return true + } + + return false +} + +// SetAssignedUsers gets a reference to the given string and assigns it to the AssignedUsers field. +func (o *QueueItem) SetAssignedUsers(v string) { + o.AssignedUsers = &v +} + +// GetReservedBy returns the ReservedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueItem) GetReservedBy() string { + if o == nil || IsNil(o.ReservedBy.Get()) { + var ret string + return ret + } + return *o.ReservedBy.Get() +} + +// GetReservedByOk returns a tuple with the ReservedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueItem) GetReservedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReservedBy.Get(), o.ReservedBy.IsSet() +} + +// HasReservedBy returns a boolean if a field has been set. +func (o *QueueItem) HasReservedBy() bool { + if o != nil && o.ReservedBy.IsSet() { + return true + } + + return false +} + +// SetReservedBy gets a reference to the given NullableString and assigns it to the ReservedBy field. +func (o *QueueItem) SetReservedBy(v string) { + o.ReservedBy.Set(&v) +} + +// SetReservedByNil sets the value for ReservedBy to be an explicit nil +func (o *QueueItem) SetReservedByNil() { + o.ReservedBy.Set(nil) +} + +// UnsetReservedBy ensures that no value is present for ReservedBy, not even an explicit nil +func (o *QueueItem) UnsetReservedBy() { + o.ReservedBy.Unset() +} + +// GetReservedByName returns the ReservedByName field value if set, zero value otherwise. +func (o *QueueItem) GetReservedByName() string { + if o == nil || IsNil(o.ReservedByName) { + var ret string + return ret + } + return *o.ReservedByName +} + +// GetReservedByNameOk returns a tuple with the ReservedByName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetReservedByNameOk() (*string, bool) { + if o == nil || IsNil(o.ReservedByName) { + return nil, false + } + return o.ReservedByName, true +} + +// HasReservedByName returns a boolean if a field has been set. +func (o *QueueItem) HasReservedByName() bool { + if o != nil && !IsNil(o.ReservedByName) { + return true + } + + return false +} + +// SetReservedByName gets a reference to the given string and assigns it to the ReservedByName field. +func (o *QueueItem) SetReservedByName(v string) { + o.ReservedByName = &v +} + +// GetReservationExpiresAt returns the ReservationExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueItem) GetReservationExpiresAt() time.Time { + if o == nil || IsNil(o.ReservationExpiresAt.Get()) { + var ret time.Time + return ret + } + return *o.ReservationExpiresAt.Get() +} + +// GetReservationExpiresAtOk returns a tuple with the ReservationExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueItem) GetReservationExpiresAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ReservationExpiresAt.Get(), o.ReservationExpiresAt.IsSet() +} + +// HasReservationExpiresAt returns a boolean if a field has been set. +func (o *QueueItem) HasReservationExpiresAt() bool { + if o != nil && o.ReservationExpiresAt.IsSet() { + return true + } + + return false +} + +// SetReservationExpiresAt gets a reference to the given NullableTime and assigns it to the ReservationExpiresAt field. +func (o *QueueItem) SetReservationExpiresAt(v time.Time) { + o.ReservationExpiresAt.Set(&v) +} + +// SetReservationExpiresAtNil sets the value for ReservationExpiresAt to be an explicit nil +func (o *QueueItem) SetReservationExpiresAtNil() { + o.ReservationExpiresAt.Set(nil) +} + +// UnsetReservationExpiresAt ensures that no value is present for ReservationExpiresAt, not even an explicit nil +func (o *QueueItem) UnsetReservationExpiresAt() { + o.ReservationExpiresAt.Unset() +} + +// GetReviewStatus returns the ReviewStatus field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueItem) GetReviewStatus() string { + if o == nil || IsNil(o.ReviewStatus.Get()) { + var ret string + return ret + } + return *o.ReviewStatus.Get() +} + +// GetReviewStatusOk returns a tuple with the ReviewStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueItem) GetReviewStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReviewStatus.Get(), o.ReviewStatus.IsSet() +} + +// HasReviewStatus returns a boolean if a field has been set. +func (o *QueueItem) HasReviewStatus() bool { + if o != nil && o.ReviewStatus.IsSet() { + return true + } + + return false +} + +// SetReviewStatus gets a reference to the given NullableString and assigns it to the ReviewStatus field. +func (o *QueueItem) SetReviewStatus(v string) { + o.ReviewStatus.Set(&v) +} + +// SetReviewStatusNil sets the value for ReviewStatus to be an explicit nil +func (o *QueueItem) SetReviewStatusNil() { + o.ReviewStatus.Set(nil) +} + +// UnsetReviewStatus ensures that no value is present for ReviewStatus, not even an explicit nil +func (o *QueueItem) UnsetReviewStatus() { + o.ReviewStatus.Unset() +} + +// GetReviewedBy returns the ReviewedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueItem) GetReviewedBy() string { + if o == nil || IsNil(o.ReviewedBy.Get()) { + var ret string + return ret + } + return *o.ReviewedBy.Get() +} + +// GetReviewedByOk returns a tuple with the ReviewedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueItem) GetReviewedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReviewedBy.Get(), o.ReviewedBy.IsSet() +} + +// HasReviewedBy returns a boolean if a field has been set. +func (o *QueueItem) HasReviewedBy() bool { + if o != nil && o.ReviewedBy.IsSet() { + return true + } + + return false +} + +// SetReviewedBy gets a reference to the given NullableString and assigns it to the ReviewedBy field. +func (o *QueueItem) SetReviewedBy(v string) { + o.ReviewedBy.Set(&v) +} + +// SetReviewedByNil sets the value for ReviewedBy to be an explicit nil +func (o *QueueItem) SetReviewedByNil() { + o.ReviewedBy.Set(nil) +} + +// UnsetReviewedBy ensures that no value is present for ReviewedBy, not even an explicit nil +func (o *QueueItem) UnsetReviewedBy() { + o.ReviewedBy.Unset() +} + +// GetReviewedByName returns the ReviewedByName field value if set, zero value otherwise. +func (o *QueueItem) GetReviewedByName() string { + if o == nil || IsNil(o.ReviewedByName) { + var ret string + return ret + } + return *o.ReviewedByName +} + +// GetReviewedByNameOk returns a tuple with the ReviewedByName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetReviewedByNameOk() (*string, bool) { + if o == nil || IsNil(o.ReviewedByName) { + return nil, false + } + return o.ReviewedByName, true +} + +// HasReviewedByName returns a boolean if a field has been set. +func (o *QueueItem) HasReviewedByName() bool { + if o != nil && !IsNil(o.ReviewedByName) { + return true + } + + return false +} + +// SetReviewedByName gets a reference to the given string and assigns it to the ReviewedByName field. +func (o *QueueItem) SetReviewedByName(v string) { + o.ReviewedByName = &v +} + +// GetReviewedAt returns the ReviewedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueItem) GetReviewedAt() time.Time { + if o == nil || IsNil(o.ReviewedAt.Get()) { + var ret time.Time + return ret + } + return *o.ReviewedAt.Get() +} + +// GetReviewedAtOk returns a tuple with the ReviewedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueItem) GetReviewedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ReviewedAt.Get(), o.ReviewedAt.IsSet() +} + +// HasReviewedAt returns a boolean if a field has been set. +func (o *QueueItem) HasReviewedAt() bool { + if o != nil && o.ReviewedAt.IsSet() { + return true + } + + return false +} + +// SetReviewedAt gets a reference to the given NullableTime and assigns it to the ReviewedAt field. +func (o *QueueItem) SetReviewedAt(v time.Time) { + o.ReviewedAt.Set(&v) +} + +// SetReviewedAtNil sets the value for ReviewedAt to be an explicit nil +func (o *QueueItem) SetReviewedAtNil() { + o.ReviewedAt.Set(nil) +} + +// UnsetReviewedAt ensures that no value is present for ReviewedAt, not even an explicit nil +func (o *QueueItem) UnsetReviewedAt() { + o.ReviewedAt.Unset() +} + +// GetReviewNotes returns the ReviewNotes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueItem) GetReviewNotes() string { + if o == nil || IsNil(o.ReviewNotes.Get()) { + var ret string + return ret + } + return *o.ReviewNotes.Get() +} + +// GetReviewNotesOk returns a tuple with the ReviewNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueItem) GetReviewNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReviewNotes.Get(), o.ReviewNotes.IsSet() +} + +// HasReviewNotes returns a boolean if a field has been set. +func (o *QueueItem) HasReviewNotes() bool { + if o != nil && o.ReviewNotes.IsSet() { + return true + } + + return false +} + +// SetReviewNotes gets a reference to the given NullableString and assigns it to the ReviewNotes field. +func (o *QueueItem) SetReviewNotes(v string) { + o.ReviewNotes.Set(&v) +} + +// SetReviewNotesNil sets the value for ReviewNotes to be an explicit nil +func (o *QueueItem) SetReviewNotesNil() { + o.ReviewNotes.Set(nil) +} + +// UnsetReviewNotes ensures that no value is present for ReviewNotes, not even an explicit nil +func (o *QueueItem) UnsetReviewNotes() { + o.ReviewNotes.Unset() +} + +// GetSourcePreview returns the SourcePreview field value if set, zero value otherwise. +func (o *QueueItem) GetSourcePreview() string { + if o == nil || IsNil(o.SourcePreview) { + var ret string + return ret + } + return *o.SourcePreview +} + +// GetSourcePreviewOk returns a tuple with the SourcePreview field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetSourcePreviewOk() (*string, bool) { + if o == nil || IsNil(o.SourcePreview) { + return nil, false + } + return o.SourcePreview, true +} + +// HasSourcePreview returns a boolean if a field has been set. +func (o *QueueItem) HasSourcePreview() bool { + if o != nil && !IsNil(o.SourcePreview) { + return true + } + + return false +} + +// SetSourcePreview gets a reference to the given string and assigns it to the SourcePreview field. +func (o *QueueItem) SetSourcePreview(v string) { + o.SourcePreview = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *QueueItem) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItem) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *QueueItem) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *QueueItem) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o QueueItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Queue) { + toSerialize["queue"] = o.Queue + } + toSerialize["source_type"] = o.SourceType + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.WorkflowStatus) { + toSerialize["workflow_status"] = o.WorkflowStatus + } + if !IsNil(o.WorkflowStatusLabel) { + toSerialize["workflow_status_label"] = o.WorkflowStatusLabel + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.AssignedTo.IsSet() { + toSerialize["assigned_to"] = o.AssignedTo.Get() + } + if !IsNil(o.AssignedToName) { + toSerialize["assigned_to_name"] = o.AssignedToName + } + if !IsNil(o.AssignedUsers) { + toSerialize["assigned_users"] = o.AssignedUsers + } + if o.ReservedBy.IsSet() { + toSerialize["reserved_by"] = o.ReservedBy.Get() + } + if !IsNil(o.ReservedByName) { + toSerialize["reserved_by_name"] = o.ReservedByName + } + if o.ReservationExpiresAt.IsSet() { + toSerialize["reservation_expires_at"] = o.ReservationExpiresAt.Get() + } + if o.ReviewStatus.IsSet() { + toSerialize["review_status"] = o.ReviewStatus.Get() + } + if o.ReviewedBy.IsSet() { + toSerialize["reviewed_by"] = o.ReviewedBy.Get() + } + if !IsNil(o.ReviewedByName) { + toSerialize["reviewed_by_name"] = o.ReviewedByName + } + if o.ReviewedAt.IsSet() { + toSerialize["reviewed_at"] = o.ReviewedAt.Get() + } + if o.ReviewNotes.IsSet() { + toSerialize["review_notes"] = o.ReviewNotes.Get() + } + if !IsNil(o.SourcePreview) { + toSerialize["source_preview"] = o.SourcePreview + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *QueueItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueItem := _QueueItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueItem) + + if err != nil { + return err + } + + *o = QueueItem(varQueueItem) + + return err +} + +type NullableQueueItem struct { + value *QueueItem + isSet bool +} + +func (v NullableQueueItem) Get() *QueueItem { + return v.value +} + +func (v *NullableQueueItem) Set(val *QueueItem) { + v.value = val + v.isSet = true +} + +func (v NullableQueueItem) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueItem(val *QueueItem) *NullableQueueItem { + return &NullableQueueItem{value: val, isSet: true} +} + +func (v NullableQueueItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_item_annotations_response.go b/go/futureagi/model_queue_item_annotations_response.go new file mode 100644 index 0000000..0951e71 --- /dev/null +++ b/go/futureagi/model_queue_item_annotations_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueItemAnnotationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueItemAnnotationsResponse{} + +// QueueItemAnnotationsResponse struct for QueueItemAnnotationsResponse +type QueueItemAnnotationsResponse struct { + Status *bool `json:"status,omitempty"` + Result []Score `json:"result"` +} + +type _QueueItemAnnotationsResponse QueueItemAnnotationsResponse + +// NewQueueItemAnnotationsResponse instantiates a new QueueItemAnnotationsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueItemAnnotationsResponse(result []Score) *QueueItemAnnotationsResponse { + this := QueueItemAnnotationsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueItemAnnotationsResponseWithDefaults instantiates a new QueueItemAnnotationsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueItemAnnotationsResponseWithDefaults() *QueueItemAnnotationsResponse { + this := QueueItemAnnotationsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueItemAnnotationsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItemAnnotationsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueItemAnnotationsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueItemAnnotationsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueItemAnnotationsResponse) GetResult() []Score { + if o == nil { + var ret []Score + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueItemAnnotationsResponse) GetResultOk() ([]Score, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *QueueItemAnnotationsResponse) SetResult(v []Score) { + o.Result = v +} + +func (o QueueItemAnnotationsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueItemAnnotationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueItemAnnotationsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueItemAnnotationsResponse := _QueueItemAnnotationsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueItemAnnotationsResponse) + + if err != nil { + return err + } + + *o = QueueItemAnnotationsResponse(varQueueItemAnnotationsResponse) + + return err +} + +type NullableQueueItemAnnotationsResponse struct { + value *QueueItemAnnotationsResponse + isSet bool +} + +func (v NullableQueueItemAnnotationsResponse) Get() *QueueItemAnnotationsResponse { + return v.value +} + +func (v *NullableQueueItemAnnotationsResponse) Set(val *QueueItemAnnotationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueItemAnnotationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueItemAnnotationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueItemAnnotationsResponse(val *QueueItemAnnotationsResponse) *NullableQueueItemAnnotationsResponse { + return &NullableQueueItemAnnotationsResponse{value: val, isSet: true} +} + +func (v NullableQueueItemAnnotationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueItemAnnotationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_item_navigation_request.go b/go/futureagi/model_queue_item_navigation_request.go new file mode 100644 index 0000000..4d48f64 --- /dev/null +++ b/go/futureagi/model_queue_item_navigation_request.go @@ -0,0 +1,201 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the QueueItemNavigationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueItemNavigationRequest{} + +// QueueItemNavigationRequest struct for QueueItemNavigationRequest +type QueueItemNavigationRequest struct { + Exclude []string `json:"exclude,omitempty"` + ExcludeReviewStatus *string `json:"exclude_review_status,omitempty"` + IncludeCompleted *bool `json:"include_completed,omitempty"` +} + +// NewQueueItemNavigationRequest instantiates a new QueueItemNavigationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueItemNavigationRequest() *QueueItemNavigationRequest { + this := QueueItemNavigationRequest{} + var includeCompleted bool = false + this.IncludeCompleted = &includeCompleted + return &this +} + +// NewQueueItemNavigationRequestWithDefaults instantiates a new QueueItemNavigationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueItemNavigationRequestWithDefaults() *QueueItemNavigationRequest { + this := QueueItemNavigationRequest{} + var includeCompleted bool = false + this.IncludeCompleted = &includeCompleted + return &this +} + +// GetExclude returns the Exclude field value if set, zero value otherwise. +func (o *QueueItemNavigationRequest) GetExclude() []string { + if o == nil || IsNil(o.Exclude) { + var ret []string + return ret + } + return o.Exclude +} + +// GetExcludeOk returns a tuple with the Exclude field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItemNavigationRequest) GetExcludeOk() ([]string, bool) { + if o == nil || IsNil(o.Exclude) { + return nil, false + } + return o.Exclude, true +} + +// HasExclude returns a boolean if a field has been set. +func (o *QueueItemNavigationRequest) HasExclude() bool { + if o != nil && !IsNil(o.Exclude) { + return true + } + + return false +} + +// SetExclude gets a reference to the given []string and assigns it to the Exclude field. +func (o *QueueItemNavigationRequest) SetExclude(v []string) { + o.Exclude = v +} + +// GetExcludeReviewStatus returns the ExcludeReviewStatus field value if set, zero value otherwise. +func (o *QueueItemNavigationRequest) GetExcludeReviewStatus() string { + if o == nil || IsNil(o.ExcludeReviewStatus) { + var ret string + return ret + } + return *o.ExcludeReviewStatus +} + +// GetExcludeReviewStatusOk returns a tuple with the ExcludeReviewStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItemNavigationRequest) GetExcludeReviewStatusOk() (*string, bool) { + if o == nil || IsNil(o.ExcludeReviewStatus) { + return nil, false + } + return o.ExcludeReviewStatus, true +} + +// HasExcludeReviewStatus returns a boolean if a field has been set. +func (o *QueueItemNavigationRequest) HasExcludeReviewStatus() bool { + if o != nil && !IsNil(o.ExcludeReviewStatus) { + return true + } + + return false +} + +// SetExcludeReviewStatus gets a reference to the given string and assigns it to the ExcludeReviewStatus field. +func (o *QueueItemNavigationRequest) SetExcludeReviewStatus(v string) { + o.ExcludeReviewStatus = &v +} + +// GetIncludeCompleted returns the IncludeCompleted field value if set, zero value otherwise. +func (o *QueueItemNavigationRequest) GetIncludeCompleted() bool { + if o == nil || IsNil(o.IncludeCompleted) { + var ret bool + return ret + } + return *o.IncludeCompleted +} + +// GetIncludeCompletedOk returns a tuple with the IncludeCompleted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueItemNavigationRequest) GetIncludeCompletedOk() (*bool, bool) { + if o == nil || IsNil(o.IncludeCompleted) { + return nil, false + } + return o.IncludeCompleted, true +} + +// HasIncludeCompleted returns a boolean if a field has been set. +func (o *QueueItemNavigationRequest) HasIncludeCompleted() bool { + if o != nil && !IsNil(o.IncludeCompleted) { + return true + } + + return false +} + +// SetIncludeCompleted gets a reference to the given bool and assigns it to the IncludeCompleted field. +func (o *QueueItemNavigationRequest) SetIncludeCompleted(v bool) { + o.IncludeCompleted = &v +} + +func (o QueueItemNavigationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueItemNavigationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Exclude) { + toSerialize["exclude"] = o.Exclude + } + if !IsNil(o.ExcludeReviewStatus) { + toSerialize["exclude_review_status"] = o.ExcludeReviewStatus + } + if !IsNil(o.IncludeCompleted) { + toSerialize["include_completed"] = o.IncludeCompleted + } + return toSerialize, nil +} + +type NullableQueueItemNavigationRequest struct { + value *QueueItemNavigationRequest + isSet bool +} + +func (v NullableQueueItemNavigationRequest) Get() *QueueItemNavigationRequest { + return v.value +} + +func (v *NullableQueueItemNavigationRequest) Set(val *QueueItemNavigationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableQueueItemNavigationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueItemNavigationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueItemNavigationRequest(val *QueueItemNavigationRequest) *NullableQueueItemNavigationRequest { + return &NullableQueueItemNavigationRequest{value: val, isSet: true} +} + +func (v NullableQueueItemNavigationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueItemNavigationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_label_nested.go b/go/futureagi/model_queue_label_nested.go new file mode 100644 index 0000000..0504797 --- /dev/null +++ b/go/futureagi/model_queue_label_nested.go @@ -0,0 +1,337 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueLabelNested type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueLabelNested{} + +// QueueLabelNested struct for QueueLabelNested +type QueueLabelNested struct { + Id *string `json:"id,omitempty"` + LabelId string `json:"label_id"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Required *bool `json:"required,omitempty"` + Order *int32 `json:"order,omitempty"` +} + +type _QueueLabelNested QueueLabelNested + +// NewQueueLabelNested instantiates a new QueueLabelNested object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueLabelNested(labelId string) *QueueLabelNested { + this := QueueLabelNested{} + this.LabelId = labelId + return &this +} + +// NewQueueLabelNestedWithDefaults instantiates a new QueueLabelNested object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueLabelNestedWithDefaults() *QueueLabelNested { + this := QueueLabelNested{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *QueueLabelNested) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueLabelNested) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *QueueLabelNested) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *QueueLabelNested) SetId(v string) { + o.Id = &v +} + +// GetLabelId returns the LabelId field value +func (o *QueueLabelNested) GetLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value +// and a boolean to check if the value has been set. +func (o *QueueLabelNested) GetLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelId, true +} + +// SetLabelId sets field value +func (o *QueueLabelNested) SetLabelId(v string) { + o.LabelId = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *QueueLabelNested) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueLabelNested) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *QueueLabelNested) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *QueueLabelNested) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *QueueLabelNested) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueLabelNested) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *QueueLabelNested) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *QueueLabelNested) SetType(v string) { + o.Type = &v +} + +// GetRequired returns the Required field value if set, zero value otherwise. +func (o *QueueLabelNested) GetRequired() bool { + if o == nil || IsNil(o.Required) { + var ret bool + return ret + } + return *o.Required +} + +// GetRequiredOk returns a tuple with the Required field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueLabelNested) GetRequiredOk() (*bool, bool) { + if o == nil || IsNil(o.Required) { + return nil, false + } + return o.Required, true +} + +// HasRequired returns a boolean if a field has been set. +func (o *QueueLabelNested) HasRequired() bool { + if o != nil && !IsNil(o.Required) { + return true + } + + return false +} + +// SetRequired gets a reference to the given bool and assigns it to the Required field. +func (o *QueueLabelNested) SetRequired(v bool) { + o.Required = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *QueueLabelNested) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueLabelNested) GetOrderOk() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *QueueLabelNested) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *QueueLabelNested) SetOrder(v int32) { + o.Order = &v +} + +func (o QueueLabelNested) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueLabelNested) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["label_id"] = o.LabelId + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Required) { + toSerialize["required"] = o.Required + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + return toSerialize, nil +} + +func (o *QueueLabelNested) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueLabelNested := _QueueLabelNested{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueLabelNested) + + if err != nil { + return err + } + + *o = QueueLabelNested(varQueueLabelNested) + + return err +} + +type NullableQueueLabelNested struct { + value *QueueLabelNested + isSet bool +} + +func (v NullableQueueLabelNested) Get() *QueueLabelNested { + return v.value +} + +func (v *NullableQueueLabelNested) Set(val *QueueLabelNested) { + v.value = val + v.isSet = true +} + +func (v NullableQueueLabelNested) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueLabelNested) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueLabelNested(val *QueueLabelNested) *NullableQueueLabelNested { + return &NullableQueueLabelNested{value: val, isSet: true} +} + +func (v NullableQueueLabelNested) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueLabelNested) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_label_request.go b/go/futureagi/model_queue_label_request.go new file mode 100644 index 0000000..50b3b46 --- /dev/null +++ b/go/futureagi/model_queue_label_request.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueLabelRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueLabelRequest{} + +// QueueLabelRequest struct for QueueLabelRequest +type QueueLabelRequest struct { + LabelId string `json:"label_id"` + Required *bool `json:"required,omitempty"` +} + +type _QueueLabelRequest QueueLabelRequest + +// NewQueueLabelRequest instantiates a new QueueLabelRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueLabelRequest(labelId string) *QueueLabelRequest { + this := QueueLabelRequest{} + this.LabelId = labelId + var required bool = true + this.Required = &required + return &this +} + +// NewQueueLabelRequestWithDefaults instantiates a new QueueLabelRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueLabelRequestWithDefaults() *QueueLabelRequest { + this := QueueLabelRequest{} + var required bool = true + this.Required = &required + return &this +} + +// GetLabelId returns the LabelId field value +func (o *QueueLabelRequest) GetLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value +// and a boolean to check if the value has been set. +func (o *QueueLabelRequest) GetLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelId, true +} + +// SetLabelId sets field value +func (o *QueueLabelRequest) SetLabelId(v string) { + o.LabelId = v +} + +// GetRequired returns the Required field value if set, zero value otherwise. +func (o *QueueLabelRequest) GetRequired() bool { + if o == nil || IsNil(o.Required) { + var ret bool + return ret + } + return *o.Required +} + +// GetRequiredOk returns a tuple with the Required field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueLabelRequest) GetRequiredOk() (*bool, bool) { + if o == nil || IsNil(o.Required) { + return nil, false + } + return o.Required, true +} + +// HasRequired returns a boolean if a field has been set. +func (o *QueueLabelRequest) HasRequired() bool { + if o != nil && !IsNil(o.Required) { + return true + } + + return false +} + +// SetRequired gets a reference to the given bool and assigns it to the Required field. +func (o *QueueLabelRequest) SetRequired(v bool) { + o.Required = &v +} + +func (o QueueLabelRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueLabelRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label_id"] = o.LabelId + if !IsNil(o.Required) { + toSerialize["required"] = o.Required + } + return toSerialize, nil +} + +func (o *QueueLabelRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueLabelRequest := _QueueLabelRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueLabelRequest) + + if err != nil { + return err + } + + *o = QueueLabelRequest(varQueueLabelRequest) + + return err +} + +type NullableQueueLabelRequest struct { + value *QueueLabelRequest + isSet bool +} + +func (v NullableQueueLabelRequest) Get() *QueueLabelRequest { + return v.value +} + +func (v *NullableQueueLabelRequest) Set(val *QueueLabelRequest) { + v.value = val + v.isSet = true +} + +func (v NullableQueueLabelRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueLabelRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueLabelRequest(val *QueueLabelRequest) *NullableQueueLabelRequest { + return &NullableQueueLabelRequest{value: val, isSet: true} +} + +func (v NullableQueueLabelRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueLabelRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_label_result.go b/go/futureagi/model_queue_label_result.go new file mode 100644 index 0000000..30b0dd1 --- /dev/null +++ b/go/futureagi/model_queue_label_result.go @@ -0,0 +1,361 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueLabelResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueLabelResult{} + +// QueueLabelResult struct for QueueLabelResult +type QueueLabelResult struct { + Id string `json:"id"` + Name string `json:"name"` + Type string `json:"type"` + Settings map[string]interface{} `json:"settings"` + Description *string `json:"description,omitempty"` + AllowNotes bool `json:"allow_notes"` + Required bool `json:"required"` + Order int32 `json:"order"` +} + +type _QueueLabelResult QueueLabelResult + +// NewQueueLabelResult instantiates a new QueueLabelResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueLabelResult(id string, name string, type_ string, settings map[string]interface{}, allowNotes bool, required bool, order int32) *QueueLabelResult { + this := QueueLabelResult{} + this.Id = id + this.Name = name + this.Type = type_ + this.Settings = settings + this.AllowNotes = allowNotes + this.Required = required + this.Order = order + return &this +} + +// NewQueueLabelResultWithDefaults instantiates a new QueueLabelResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueLabelResultWithDefaults() *QueueLabelResult { + this := QueueLabelResult{} + return &this +} + +// GetId returns the Id field value +func (o *QueueLabelResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *QueueLabelResult) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *QueueLabelResult) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *QueueLabelResult) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *QueueLabelResult) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *QueueLabelResult) SetType(v string) { + o.Type = v +} + +// GetSettings returns the Settings field value +func (o *QueueLabelResult) GetSettings() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetSettingsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Settings, true +} + +// SetSettings sets field value +func (o *QueueLabelResult) SetSettings(v map[string]interface{}) { + o.Settings = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *QueueLabelResult) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *QueueLabelResult) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *QueueLabelResult) SetDescription(v string) { + o.Description = &v +} + +// GetAllowNotes returns the AllowNotes field value +func (o *QueueLabelResult) GetAllowNotes() bool { + if o == nil { + var ret bool + return ret + } + + return o.AllowNotes +} + +// GetAllowNotesOk returns a tuple with the AllowNotes field value +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetAllowNotesOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AllowNotes, true +} + +// SetAllowNotes sets field value +func (o *QueueLabelResult) SetAllowNotes(v bool) { + o.AllowNotes = v +} + +// GetRequired returns the Required field value +func (o *QueueLabelResult) GetRequired() bool { + if o == nil { + var ret bool + return ret + } + + return o.Required +} + +// GetRequiredOk returns a tuple with the Required field value +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetRequiredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Required, true +} + +// SetRequired sets field value +func (o *QueueLabelResult) SetRequired(v bool) { + o.Required = v +} + +// GetOrder returns the Order field value +func (o *QueueLabelResult) GetOrder() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *QueueLabelResult) GetOrderOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *QueueLabelResult) SetOrder(v int32) { + o.Order = v +} + +func (o QueueLabelResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueLabelResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["settings"] = o.Settings + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["allow_notes"] = o.AllowNotes + toSerialize["required"] = o.Required + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *QueueLabelResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "type", + "settings", + "allow_notes", + "required", + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueLabelResult := _QueueLabelResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueLabelResult) + + if err != nil { + return err + } + + *o = QueueLabelResult(varQueueLabelResult) + + return err +} + +type NullableQueueLabelResult struct { + value *QueueLabelResult + isSet bool +} + +func (v NullableQueueLabelResult) Get() *QueueLabelResult { + return v.value +} + +func (v *NullableQueueLabelResult) Set(val *QueueLabelResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueLabelResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueLabelResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueLabelResult(val *QueueLabelResult) *NullableQueueLabelResult { + return &NullableQueueLabelResult{value: val, isSet: true} +} + +func (v NullableQueueLabelResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueLabelResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_navigation_response.go b/go/futureagi/model_queue_navigation_response.go new file mode 100644 index 0000000..8bf874f --- /dev/null +++ b/go/futureagi/model_queue_navigation_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueNavigationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueNavigationResponse{} + +// QueueNavigationResponse struct for QueueNavigationResponse +type QueueNavigationResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueNavigationResult `json:"result"` +} + +type _QueueNavigationResponse QueueNavigationResponse + +// NewQueueNavigationResponse instantiates a new QueueNavigationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueNavigationResponse(result QueueNavigationResult) *QueueNavigationResponse { + this := QueueNavigationResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueNavigationResponseWithDefaults instantiates a new QueueNavigationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueNavigationResponseWithDefaults() *QueueNavigationResponse { + this := QueueNavigationResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueNavigationResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueNavigationResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueNavigationResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueNavigationResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueNavigationResponse) GetResult() QueueNavigationResult { + if o == nil { + var ret QueueNavigationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueNavigationResponse) GetResultOk() (*QueueNavigationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueNavigationResponse) SetResult(v QueueNavigationResult) { + o.Result = v +} + +func (o QueueNavigationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueNavigationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueNavigationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueNavigationResponse := _QueueNavigationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueNavigationResponse) + + if err != nil { + return err + } + + *o = QueueNavigationResponse(varQueueNavigationResponse) + + return err +} + +type NullableQueueNavigationResponse struct { + value *QueueNavigationResponse + isSet bool +} + +func (v NullableQueueNavigationResponse) Get() *QueueNavigationResponse { + return v.value +} + +func (v *NullableQueueNavigationResponse) Set(val *QueueNavigationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueNavigationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueNavigationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueNavigationResponse(val *QueueNavigationResponse) *NullableQueueNavigationResponse { + return &NullableQueueNavigationResponse{value: val, isSet: true} +} + +func (v NullableQueueNavigationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueNavigationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_navigation_result.go b/go/futureagi/model_queue_navigation_result.go new file mode 100644 index 0000000..3a9e7fc --- /dev/null +++ b/go/futureagi/model_queue_navigation_result.go @@ -0,0 +1,229 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueNavigationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueNavigationResult{} + +// QueueNavigationResult struct for QueueNavigationResult +type QueueNavigationResult struct { + CompletedItemId *string `json:"completed_item_id,omitempty"` + SkippedItemId *string `json:"skipped_item_id,omitempty"` + NextItem map[string]interface{} `json:"next_item"` +} + +type _QueueNavigationResult QueueNavigationResult + +// NewQueueNavigationResult instantiates a new QueueNavigationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueNavigationResult(nextItem map[string]interface{}) *QueueNavigationResult { + this := QueueNavigationResult{} + this.NextItem = nextItem + return &this +} + +// NewQueueNavigationResultWithDefaults instantiates a new QueueNavigationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueNavigationResultWithDefaults() *QueueNavigationResult { + this := QueueNavigationResult{} + return &this +} + +// GetCompletedItemId returns the CompletedItemId field value if set, zero value otherwise. +func (o *QueueNavigationResult) GetCompletedItemId() string { + if o == nil || IsNil(o.CompletedItemId) { + var ret string + return ret + } + return *o.CompletedItemId +} + +// GetCompletedItemIdOk returns a tuple with the CompletedItemId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueNavigationResult) GetCompletedItemIdOk() (*string, bool) { + if o == nil || IsNil(o.CompletedItemId) { + return nil, false + } + return o.CompletedItemId, true +} + +// HasCompletedItemId returns a boolean if a field has been set. +func (o *QueueNavigationResult) HasCompletedItemId() bool { + if o != nil && !IsNil(o.CompletedItemId) { + return true + } + + return false +} + +// SetCompletedItemId gets a reference to the given string and assigns it to the CompletedItemId field. +func (o *QueueNavigationResult) SetCompletedItemId(v string) { + o.CompletedItemId = &v +} + +// GetSkippedItemId returns the SkippedItemId field value if set, zero value otherwise. +func (o *QueueNavigationResult) GetSkippedItemId() string { + if o == nil || IsNil(o.SkippedItemId) { + var ret string + return ret + } + return *o.SkippedItemId +} + +// GetSkippedItemIdOk returns a tuple with the SkippedItemId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueNavigationResult) GetSkippedItemIdOk() (*string, bool) { + if o == nil || IsNil(o.SkippedItemId) { + return nil, false + } + return o.SkippedItemId, true +} + +// HasSkippedItemId returns a boolean if a field has been set. +func (o *QueueNavigationResult) HasSkippedItemId() bool { + if o != nil && !IsNil(o.SkippedItemId) { + return true + } + + return false +} + +// SetSkippedItemId gets a reference to the given string and assigns it to the SkippedItemId field. +func (o *QueueNavigationResult) SetSkippedItemId(v string) { + o.SkippedItemId = &v +} + +// GetNextItem returns the NextItem field value +func (o *QueueNavigationResult) GetNextItem() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.NextItem +} + +// GetNextItemOk returns a tuple with the NextItem field value +// and a boolean to check if the value has been set. +func (o *QueueNavigationResult) GetNextItemOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.NextItem, true +} + +// SetNextItem sets field value +func (o *QueueNavigationResult) SetNextItem(v map[string]interface{}) { + o.NextItem = v +} + +func (o QueueNavigationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueNavigationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CompletedItemId) { + toSerialize["completed_item_id"] = o.CompletedItemId + } + if !IsNil(o.SkippedItemId) { + toSerialize["skipped_item_id"] = o.SkippedItemId + } + toSerialize["next_item"] = o.NextItem + return toSerialize, nil +} + +func (o *QueueNavigationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "next_item", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueNavigationResult := _QueueNavigationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueNavigationResult) + + if err != nil { + return err + } + + *o = QueueNavigationResult(varQueueNavigationResult) + + return err +} + +type NullableQueueNavigationResult struct { + value *QueueNavigationResult + isSet bool +} + +func (v NullableQueueNavigationResult) Get() *QueueNavigationResult { + return v.value +} + +func (v *NullableQueueNavigationResult) Set(val *QueueNavigationResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueNavigationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueNavigationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueNavigationResult(val *QueueNavigationResult) *NullableQueueNavigationResult { + return &NullableQueueNavigationResult{value: val, isSet: true} +} + +func (v NullableQueueNavigationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueNavigationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_next_item_response.go b/go/futureagi/model_queue_next_item_response.go new file mode 100644 index 0000000..2d18567 --- /dev/null +++ b/go/futureagi/model_queue_next_item_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueNextItemResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueNextItemResponse{} + +// QueueNextItemResponse struct for QueueNextItemResponse +type QueueNextItemResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueNextItemResult `json:"result"` +} + +type _QueueNextItemResponse QueueNextItemResponse + +// NewQueueNextItemResponse instantiates a new QueueNextItemResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueNextItemResponse(result QueueNextItemResult) *QueueNextItemResponse { + this := QueueNextItemResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueNextItemResponseWithDefaults instantiates a new QueueNextItemResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueNextItemResponseWithDefaults() *QueueNextItemResponse { + this := QueueNextItemResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueNextItemResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueNextItemResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueNextItemResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueNextItemResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueNextItemResponse) GetResult() QueueNextItemResult { + if o == nil { + var ret QueueNextItemResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueNextItemResponse) GetResultOk() (*QueueNextItemResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueNextItemResponse) SetResult(v QueueNextItemResult) { + o.Result = v +} + +func (o QueueNextItemResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueNextItemResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueNextItemResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueNextItemResponse := _QueueNextItemResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueNextItemResponse) + + if err != nil { + return err + } + + *o = QueueNextItemResponse(varQueueNextItemResponse) + + return err +} + +type NullableQueueNextItemResponse struct { + value *QueueNextItemResponse + isSet bool +} + +func (v NullableQueueNextItemResponse) Get() *QueueNextItemResponse { + return v.value +} + +func (v *NullableQueueNextItemResponse) Set(val *QueueNextItemResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueNextItemResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueNextItemResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueNextItemResponse(val *QueueNextItemResponse) *NullableQueueNextItemResponse { + return &NullableQueueNextItemResponse{value: val, isSet: true} +} + +func (v NullableQueueNextItemResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueNextItemResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_next_item_result.go b/go/futureagi/model_queue_next_item_result.go new file mode 100644 index 0000000..45c94e7 --- /dev/null +++ b/go/futureagi/model_queue_next_item_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueNextItemResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueNextItemResult{} + +// QueueNextItemResult struct for QueueNextItemResult +type QueueNextItemResult struct { + Item map[string]interface{} `json:"item"` +} + +type _QueueNextItemResult QueueNextItemResult + +// NewQueueNextItemResult instantiates a new QueueNextItemResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueNextItemResult(item map[string]interface{}) *QueueNextItemResult { + this := QueueNextItemResult{} + this.Item = item + return &this +} + +// NewQueueNextItemResultWithDefaults instantiates a new QueueNextItemResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueNextItemResultWithDefaults() *QueueNextItemResult { + this := QueueNextItemResult{} + return &this +} + +// GetItem returns the Item field value +func (o *QueueNextItemResult) GetItem() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Item +} + +// GetItemOk returns a tuple with the Item field value +// and a boolean to check if the value has been set. +func (o *QueueNextItemResult) GetItemOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Item, true +} + +// SetItem sets field value +func (o *QueueNextItemResult) SetItem(v map[string]interface{}) { + o.Item = v +} + +func (o QueueNextItemResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueNextItemResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["item"] = o.Item + return toSerialize, nil +} + +func (o *QueueNextItemResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "item", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueNextItemResult := _QueueNextItemResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueNextItemResult) + + if err != nil { + return err + } + + *o = QueueNextItemResult(varQueueNextItemResult) + + return err +} + +type NullableQueueNextItemResult struct { + value *QueueNextItemResult + isSet bool +} + +func (v NullableQueueNextItemResult) Get() *QueueNextItemResult { + return v.value +} + +func (v *NullableQueueNextItemResult) Set(val *QueueNextItemResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueNextItemResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueNextItemResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueNextItemResult(val *QueueNextItemResult) *NullableQueueNextItemResult { + return &NullableQueueNextItemResult{value: val, isSet: true} +} + +func (v NullableQueueNextItemResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueNextItemResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_progress_annotator_stat.go b/go/futureagi/model_queue_progress_annotator_stat.go new file mode 100644 index 0000000..56ee210 --- /dev/null +++ b/go/futureagi/model_queue_progress_annotator_stat.go @@ -0,0 +1,344 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueProgressAnnotatorStat type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueProgressAnnotatorStat{} + +// QueueProgressAnnotatorStat struct for QueueProgressAnnotatorStat +type QueueProgressAnnotatorStat struct { + UserId string `json:"user_id"` + Name NullableString `json:"name,omitempty"` + Completed int32 `json:"completed"` + Pending int32 `json:"pending"` + InProgress int32 `json:"in_progress"` + InReview int32 `json:"in_review"` + AnnotationsCount int32 `json:"annotations_count"` +} + +type _QueueProgressAnnotatorStat QueueProgressAnnotatorStat + +// NewQueueProgressAnnotatorStat instantiates a new QueueProgressAnnotatorStat object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueProgressAnnotatorStat(userId string, completed int32, pending int32, inProgress int32, inReview int32, annotationsCount int32) *QueueProgressAnnotatorStat { + this := QueueProgressAnnotatorStat{} + this.UserId = userId + this.Completed = completed + this.Pending = pending + this.InProgress = inProgress + this.InReview = inReview + this.AnnotationsCount = annotationsCount + return &this +} + +// NewQueueProgressAnnotatorStatWithDefaults instantiates a new QueueProgressAnnotatorStat object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueProgressAnnotatorStatWithDefaults() *QueueProgressAnnotatorStat { + this := QueueProgressAnnotatorStat{} + return &this +} + +// GetUserId returns the UserId field value +func (o *QueueProgressAnnotatorStat) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *QueueProgressAnnotatorStat) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *QueueProgressAnnotatorStat) SetUserId(v string) { + o.UserId = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueProgressAnnotatorStat) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *QueueProgressAnnotatorStat) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *QueueProgressAnnotatorStat) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *QueueProgressAnnotatorStat) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *QueueProgressAnnotatorStat) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *QueueProgressAnnotatorStat) UnsetName() { + o.Name.Unset() +} + +// GetCompleted returns the Completed field value +func (o *QueueProgressAnnotatorStat) GetCompleted() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Completed +} + +// GetCompletedOk returns a tuple with the Completed field value +// and a boolean to check if the value has been set. +func (o *QueueProgressAnnotatorStat) GetCompletedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Completed, true +} + +// SetCompleted sets field value +func (o *QueueProgressAnnotatorStat) SetCompleted(v int32) { + o.Completed = v +} + +// GetPending returns the Pending field value +func (o *QueueProgressAnnotatorStat) GetPending() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Pending +} + +// GetPendingOk returns a tuple with the Pending field value +// and a boolean to check if the value has been set. +func (o *QueueProgressAnnotatorStat) GetPendingOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Pending, true +} + +// SetPending sets field value +func (o *QueueProgressAnnotatorStat) SetPending(v int32) { + o.Pending = v +} + +// GetInProgress returns the InProgress field value +func (o *QueueProgressAnnotatorStat) GetInProgress() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.InProgress +} + +// GetInProgressOk returns a tuple with the InProgress field value +// and a boolean to check if the value has been set. +func (o *QueueProgressAnnotatorStat) GetInProgressOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.InProgress, true +} + +// SetInProgress sets field value +func (o *QueueProgressAnnotatorStat) SetInProgress(v int32) { + o.InProgress = v +} + +// GetInReview returns the InReview field value +func (o *QueueProgressAnnotatorStat) GetInReview() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.InReview +} + +// GetInReviewOk returns a tuple with the InReview field value +// and a boolean to check if the value has been set. +func (o *QueueProgressAnnotatorStat) GetInReviewOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.InReview, true +} + +// SetInReview sets field value +func (o *QueueProgressAnnotatorStat) SetInReview(v int32) { + o.InReview = v +} + +// GetAnnotationsCount returns the AnnotationsCount field value +func (o *QueueProgressAnnotatorStat) GetAnnotationsCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AnnotationsCount +} + +// GetAnnotationsCountOk returns a tuple with the AnnotationsCount field value +// and a boolean to check if the value has been set. +func (o *QueueProgressAnnotatorStat) GetAnnotationsCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.AnnotationsCount, true +} + +// SetAnnotationsCount sets field value +func (o *QueueProgressAnnotatorStat) SetAnnotationsCount(v int32) { + o.AnnotationsCount = v +} + +func (o QueueProgressAnnotatorStat) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueProgressAnnotatorStat) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + toSerialize["completed"] = o.Completed + toSerialize["pending"] = o.Pending + toSerialize["in_progress"] = o.InProgress + toSerialize["in_review"] = o.InReview + toSerialize["annotations_count"] = o.AnnotationsCount + return toSerialize, nil +} + +func (o *QueueProgressAnnotatorStat) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + "completed", + "pending", + "in_progress", + "in_review", + "annotations_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueProgressAnnotatorStat := _QueueProgressAnnotatorStat{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueProgressAnnotatorStat) + + if err != nil { + return err + } + + *o = QueueProgressAnnotatorStat(varQueueProgressAnnotatorStat) + + return err +} + +type NullableQueueProgressAnnotatorStat struct { + value *QueueProgressAnnotatorStat + isSet bool +} + +func (v NullableQueueProgressAnnotatorStat) Get() *QueueProgressAnnotatorStat { + return v.value +} + +func (v *NullableQueueProgressAnnotatorStat) Set(val *QueueProgressAnnotatorStat) { + v.value = val + v.isSet = true +} + +func (v NullableQueueProgressAnnotatorStat) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueProgressAnnotatorStat) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueProgressAnnotatorStat(val *QueueProgressAnnotatorStat) *NullableQueueProgressAnnotatorStat { + return &NullableQueueProgressAnnotatorStat{value: val, isSet: true} +} + +func (v NullableQueueProgressAnnotatorStat) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueProgressAnnotatorStat) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_progress_response.go b/go/futureagi/model_queue_progress_response.go new file mode 100644 index 0000000..fafe309 --- /dev/null +++ b/go/futureagi/model_queue_progress_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueProgressResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueProgressResponse{} + +// QueueProgressResponse struct for QueueProgressResponse +type QueueProgressResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueProgressResult `json:"result"` +} + +type _QueueProgressResponse QueueProgressResponse + +// NewQueueProgressResponse instantiates a new QueueProgressResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueProgressResponse(result QueueProgressResult) *QueueProgressResponse { + this := QueueProgressResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueProgressResponseWithDefaults instantiates a new QueueProgressResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueProgressResponseWithDefaults() *QueueProgressResponse { + this := QueueProgressResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueProgressResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueProgressResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueProgressResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueProgressResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueProgressResponse) GetResult() QueueProgressResult { + if o == nil { + var ret QueueProgressResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResponse) GetResultOk() (*QueueProgressResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueProgressResponse) SetResult(v QueueProgressResult) { + o.Result = v +} + +func (o QueueProgressResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueProgressResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueProgressResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueProgressResponse := _QueueProgressResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueProgressResponse) + + if err != nil { + return err + } + + *o = QueueProgressResponse(varQueueProgressResponse) + + return err +} + +type NullableQueueProgressResponse struct { + value *QueueProgressResponse + isSet bool +} + +func (v NullableQueueProgressResponse) Get() *QueueProgressResponse { + return v.value +} + +func (v *NullableQueueProgressResponse) Set(val *QueueProgressResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueProgressResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueProgressResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueProgressResponse(val *QueueProgressResponse) *NullableQueueProgressResponse { + return &NullableQueueProgressResponse{value: val, isSet: true} +} + +func (v NullableQueueProgressResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueProgressResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_progress_result.go b/go/futureagi/model_queue_progress_result.go new file mode 100644 index 0000000..ece4621 --- /dev/null +++ b/go/futureagi/model_queue_progress_result.go @@ -0,0 +1,381 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueProgressResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueProgressResult{} + +// QueueProgressResult struct for QueueProgressResult +type QueueProgressResult struct { + Total int32 `json:"total"` + Pending int32 `json:"pending"` + InProgress int32 `json:"in_progress"` + InReview int32 `json:"in_review"` + Completed int32 `json:"completed"` + Skipped int32 `json:"skipped"` + ProgressPct float32 `json:"progress_pct"` + AnnotatorStats []QueueProgressAnnotatorStat `json:"annotator_stats"` + UserProgress QueueProgressUserProgress `json:"user_progress"` +} + +type _QueueProgressResult QueueProgressResult + +// NewQueueProgressResult instantiates a new QueueProgressResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueProgressResult(total int32, pending int32, inProgress int32, inReview int32, completed int32, skipped int32, progressPct float32, annotatorStats []QueueProgressAnnotatorStat, userProgress QueueProgressUserProgress) *QueueProgressResult { + this := QueueProgressResult{} + this.Total = total + this.Pending = pending + this.InProgress = inProgress + this.InReview = inReview + this.Completed = completed + this.Skipped = skipped + this.ProgressPct = progressPct + this.AnnotatorStats = annotatorStats + this.UserProgress = userProgress + return &this +} + +// NewQueueProgressResultWithDefaults instantiates a new QueueProgressResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueProgressResultWithDefaults() *QueueProgressResult { + this := QueueProgressResult{} + return &this +} + +// GetTotal returns the Total field value +func (o *QueueProgressResult) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *QueueProgressResult) SetTotal(v int32) { + o.Total = v +} + +// GetPending returns the Pending field value +func (o *QueueProgressResult) GetPending() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Pending +} + +// GetPendingOk returns a tuple with the Pending field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetPendingOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Pending, true +} + +// SetPending sets field value +func (o *QueueProgressResult) SetPending(v int32) { + o.Pending = v +} + +// GetInProgress returns the InProgress field value +func (o *QueueProgressResult) GetInProgress() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.InProgress +} + +// GetInProgressOk returns a tuple with the InProgress field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetInProgressOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.InProgress, true +} + +// SetInProgress sets field value +func (o *QueueProgressResult) SetInProgress(v int32) { + o.InProgress = v +} + +// GetInReview returns the InReview field value +func (o *QueueProgressResult) GetInReview() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.InReview +} + +// GetInReviewOk returns a tuple with the InReview field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetInReviewOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.InReview, true +} + +// SetInReview sets field value +func (o *QueueProgressResult) SetInReview(v int32) { + o.InReview = v +} + +// GetCompleted returns the Completed field value +func (o *QueueProgressResult) GetCompleted() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Completed +} + +// GetCompletedOk returns a tuple with the Completed field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetCompletedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Completed, true +} + +// SetCompleted sets field value +func (o *QueueProgressResult) SetCompleted(v int32) { + o.Completed = v +} + +// GetSkipped returns the Skipped field value +func (o *QueueProgressResult) GetSkipped() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Skipped +} + +// GetSkippedOk returns a tuple with the Skipped field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetSkippedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Skipped, true +} + +// SetSkipped sets field value +func (o *QueueProgressResult) SetSkipped(v int32) { + o.Skipped = v +} + +// GetProgressPct returns the ProgressPct field value +func (o *QueueProgressResult) GetProgressPct() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.ProgressPct +} + +// GetProgressPctOk returns a tuple with the ProgressPct field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetProgressPctOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.ProgressPct, true +} + +// SetProgressPct sets field value +func (o *QueueProgressResult) SetProgressPct(v float32) { + o.ProgressPct = v +} + +// GetAnnotatorStats returns the AnnotatorStats field value +func (o *QueueProgressResult) GetAnnotatorStats() []QueueProgressAnnotatorStat { + if o == nil { + var ret []QueueProgressAnnotatorStat + return ret + } + + return o.AnnotatorStats +} + +// GetAnnotatorStatsOk returns a tuple with the AnnotatorStats field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetAnnotatorStatsOk() ([]QueueProgressAnnotatorStat, bool) { + if o == nil { + return nil, false + } + return o.AnnotatorStats, true +} + +// SetAnnotatorStats sets field value +func (o *QueueProgressResult) SetAnnotatorStats(v []QueueProgressAnnotatorStat) { + o.AnnotatorStats = v +} + +// GetUserProgress returns the UserProgress field value +func (o *QueueProgressResult) GetUserProgress() QueueProgressUserProgress { + if o == nil { + var ret QueueProgressUserProgress + return ret + } + + return o.UserProgress +} + +// GetUserProgressOk returns a tuple with the UserProgress field value +// and a boolean to check if the value has been set. +func (o *QueueProgressResult) GetUserProgressOk() (*QueueProgressUserProgress, bool) { + if o == nil { + return nil, false + } + return &o.UserProgress, true +} + +// SetUserProgress sets field value +func (o *QueueProgressResult) SetUserProgress(v QueueProgressUserProgress) { + o.UserProgress = v +} + +func (o QueueProgressResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueProgressResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["total"] = o.Total + toSerialize["pending"] = o.Pending + toSerialize["in_progress"] = o.InProgress + toSerialize["in_review"] = o.InReview + toSerialize["completed"] = o.Completed + toSerialize["skipped"] = o.Skipped + toSerialize["progress_pct"] = o.ProgressPct + toSerialize["annotator_stats"] = o.AnnotatorStats + toSerialize["user_progress"] = o.UserProgress + return toSerialize, nil +} + +func (o *QueueProgressResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "total", + "pending", + "in_progress", + "in_review", + "completed", + "skipped", + "progress_pct", + "annotator_stats", + "user_progress", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueProgressResult := _QueueProgressResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueProgressResult) + + if err != nil { + return err + } + + *o = QueueProgressResult(varQueueProgressResult) + + return err +} + +type NullableQueueProgressResult struct { + value *QueueProgressResult + isSet bool +} + +func (v NullableQueueProgressResult) Get() *QueueProgressResult { + return v.value +} + +func (v *NullableQueueProgressResult) Set(val *QueueProgressResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueProgressResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueProgressResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueProgressResult(val *QueueProgressResult) *NullableQueueProgressResult { + return &NullableQueueProgressResult{value: val, isSet: true} +} + +func (v NullableQueueProgressResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueProgressResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_progress_user_progress.go b/go/futureagi/model_queue_progress_user_progress.go new file mode 100644 index 0000000..b7f4f20 --- /dev/null +++ b/go/futureagi/model_queue_progress_user_progress.go @@ -0,0 +1,325 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueProgressUserProgress type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueProgressUserProgress{} + +// QueueProgressUserProgress struct for QueueProgressUserProgress +type QueueProgressUserProgress struct { + Total int32 `json:"total"` + Completed int32 `json:"completed"` + Pending int32 `json:"pending"` + InProgress int32 `json:"in_progress"` + InReview int32 `json:"in_review"` + Skipped int32 `json:"skipped"` + ProgressPct float32 `json:"progress_pct"` +} + +type _QueueProgressUserProgress QueueProgressUserProgress + +// NewQueueProgressUserProgress instantiates a new QueueProgressUserProgress object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueProgressUserProgress(total int32, completed int32, pending int32, inProgress int32, inReview int32, skipped int32, progressPct float32) *QueueProgressUserProgress { + this := QueueProgressUserProgress{} + this.Total = total + this.Completed = completed + this.Pending = pending + this.InProgress = inProgress + this.InReview = inReview + this.Skipped = skipped + this.ProgressPct = progressPct + return &this +} + +// NewQueueProgressUserProgressWithDefaults instantiates a new QueueProgressUserProgress object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueProgressUserProgressWithDefaults() *QueueProgressUserProgress { + this := QueueProgressUserProgress{} + return &this +} + +// GetTotal returns the Total field value +func (o *QueueProgressUserProgress) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *QueueProgressUserProgress) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *QueueProgressUserProgress) SetTotal(v int32) { + o.Total = v +} + +// GetCompleted returns the Completed field value +func (o *QueueProgressUserProgress) GetCompleted() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Completed +} + +// GetCompletedOk returns a tuple with the Completed field value +// and a boolean to check if the value has been set. +func (o *QueueProgressUserProgress) GetCompletedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Completed, true +} + +// SetCompleted sets field value +func (o *QueueProgressUserProgress) SetCompleted(v int32) { + o.Completed = v +} + +// GetPending returns the Pending field value +func (o *QueueProgressUserProgress) GetPending() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Pending +} + +// GetPendingOk returns a tuple with the Pending field value +// and a boolean to check if the value has been set. +func (o *QueueProgressUserProgress) GetPendingOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Pending, true +} + +// SetPending sets field value +func (o *QueueProgressUserProgress) SetPending(v int32) { + o.Pending = v +} + +// GetInProgress returns the InProgress field value +func (o *QueueProgressUserProgress) GetInProgress() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.InProgress +} + +// GetInProgressOk returns a tuple with the InProgress field value +// and a boolean to check if the value has been set. +func (o *QueueProgressUserProgress) GetInProgressOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.InProgress, true +} + +// SetInProgress sets field value +func (o *QueueProgressUserProgress) SetInProgress(v int32) { + o.InProgress = v +} + +// GetInReview returns the InReview field value +func (o *QueueProgressUserProgress) GetInReview() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.InReview +} + +// GetInReviewOk returns a tuple with the InReview field value +// and a boolean to check if the value has been set. +func (o *QueueProgressUserProgress) GetInReviewOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.InReview, true +} + +// SetInReview sets field value +func (o *QueueProgressUserProgress) SetInReview(v int32) { + o.InReview = v +} + +// GetSkipped returns the Skipped field value +func (o *QueueProgressUserProgress) GetSkipped() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Skipped +} + +// GetSkippedOk returns a tuple with the Skipped field value +// and a boolean to check if the value has been set. +func (o *QueueProgressUserProgress) GetSkippedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Skipped, true +} + +// SetSkipped sets field value +func (o *QueueProgressUserProgress) SetSkipped(v int32) { + o.Skipped = v +} + +// GetProgressPct returns the ProgressPct field value +func (o *QueueProgressUserProgress) GetProgressPct() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.ProgressPct +} + +// GetProgressPctOk returns a tuple with the ProgressPct field value +// and a boolean to check if the value has been set. +func (o *QueueProgressUserProgress) GetProgressPctOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.ProgressPct, true +} + +// SetProgressPct sets field value +func (o *QueueProgressUserProgress) SetProgressPct(v float32) { + o.ProgressPct = v +} + +func (o QueueProgressUserProgress) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueProgressUserProgress) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["total"] = o.Total + toSerialize["completed"] = o.Completed + toSerialize["pending"] = o.Pending + toSerialize["in_progress"] = o.InProgress + toSerialize["in_review"] = o.InReview + toSerialize["skipped"] = o.Skipped + toSerialize["progress_pct"] = o.ProgressPct + return toSerialize, nil +} + +func (o *QueueProgressUserProgress) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "total", + "completed", + "pending", + "in_progress", + "in_review", + "skipped", + "progress_pct", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueProgressUserProgress := _QueueProgressUserProgress{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueProgressUserProgress) + + if err != nil { + return err + } + + *o = QueueProgressUserProgress(varQueueProgressUserProgress) + + return err +} + +type NullableQueueProgressUserProgress struct { + value *QueueProgressUserProgress + isSet bool +} + +func (v NullableQueueProgressUserProgress) Get() *QueueProgressUserProgress { + return v.value +} + +func (v *NullableQueueProgressUserProgress) Set(val *QueueProgressUserProgress) { + v.value = val + v.isSet = true +} + +func (v NullableQueueProgressUserProgress) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueProgressUserProgress) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueProgressUserProgress(val *QueueProgressUserProgress) *NullableQueueProgressUserProgress { + return &NullableQueueProgressUserProgress{value: val, isSet: true} +} + +func (v NullableQueueProgressUserProgress) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueProgressUserProgress) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_release_reservation_response.go b/go/futureagi/model_queue_release_reservation_response.go new file mode 100644 index 0000000..4ee956e --- /dev/null +++ b/go/futureagi/model_queue_release_reservation_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueReleaseReservationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueReleaseReservationResponse{} + +// QueueReleaseReservationResponse struct for QueueReleaseReservationResponse +type QueueReleaseReservationResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueReleaseReservationResult `json:"result"` +} + +type _QueueReleaseReservationResponse QueueReleaseReservationResponse + +// NewQueueReleaseReservationResponse instantiates a new QueueReleaseReservationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueReleaseReservationResponse(result QueueReleaseReservationResult) *QueueReleaseReservationResponse { + this := QueueReleaseReservationResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueReleaseReservationResponseWithDefaults instantiates a new QueueReleaseReservationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueReleaseReservationResponseWithDefaults() *QueueReleaseReservationResponse { + this := QueueReleaseReservationResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueReleaseReservationResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueReleaseReservationResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueReleaseReservationResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueReleaseReservationResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueReleaseReservationResponse) GetResult() QueueReleaseReservationResult { + if o == nil { + var ret QueueReleaseReservationResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueReleaseReservationResponse) GetResultOk() (*QueueReleaseReservationResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueReleaseReservationResponse) SetResult(v QueueReleaseReservationResult) { + o.Result = v +} + +func (o QueueReleaseReservationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueReleaseReservationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueReleaseReservationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueReleaseReservationResponse := _QueueReleaseReservationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueReleaseReservationResponse) + + if err != nil { + return err + } + + *o = QueueReleaseReservationResponse(varQueueReleaseReservationResponse) + + return err +} + +type NullableQueueReleaseReservationResponse struct { + value *QueueReleaseReservationResponse + isSet bool +} + +func (v NullableQueueReleaseReservationResponse) Get() *QueueReleaseReservationResponse { + return v.value +} + +func (v *NullableQueueReleaseReservationResponse) Set(val *QueueReleaseReservationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueReleaseReservationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueReleaseReservationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueReleaseReservationResponse(val *QueueReleaseReservationResponse) *NullableQueueReleaseReservationResponse { + return &NullableQueueReleaseReservationResponse{value: val, isSet: true} +} + +func (v NullableQueueReleaseReservationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueReleaseReservationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_release_reservation_result.go b/go/futureagi/model_queue_release_reservation_result.go new file mode 100644 index 0000000..4afb28b --- /dev/null +++ b/go/futureagi/model_queue_release_reservation_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueReleaseReservationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueReleaseReservationResult{} + +// QueueReleaseReservationResult struct for QueueReleaseReservationResult +type QueueReleaseReservationResult struct { + Released bool `json:"released"` +} + +type _QueueReleaseReservationResult QueueReleaseReservationResult + +// NewQueueReleaseReservationResult instantiates a new QueueReleaseReservationResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueReleaseReservationResult(released bool) *QueueReleaseReservationResult { + this := QueueReleaseReservationResult{} + this.Released = released + return &this +} + +// NewQueueReleaseReservationResultWithDefaults instantiates a new QueueReleaseReservationResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueReleaseReservationResultWithDefaults() *QueueReleaseReservationResult { + this := QueueReleaseReservationResult{} + return &this +} + +// GetReleased returns the Released field value +func (o *QueueReleaseReservationResult) GetReleased() bool { + if o == nil { + var ret bool + return ret + } + + return o.Released +} + +// GetReleasedOk returns a tuple with the Released field value +// and a boolean to check if the value has been set. +func (o *QueueReleaseReservationResult) GetReleasedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Released, true +} + +// SetReleased sets field value +func (o *QueueReleaseReservationResult) SetReleased(v bool) { + o.Released = v +} + +func (o QueueReleaseReservationResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueReleaseReservationResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["released"] = o.Released + return toSerialize, nil +} + +func (o *QueueReleaseReservationResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "released", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueReleaseReservationResult := _QueueReleaseReservationResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueReleaseReservationResult) + + if err != nil { + return err + } + + *o = QueueReleaseReservationResult(varQueueReleaseReservationResult) + + return err +} + +type NullableQueueReleaseReservationResult struct { + value *QueueReleaseReservationResult + isSet bool +} + +func (v NullableQueueReleaseReservationResult) Get() *QueueReleaseReservationResult { + return v.value +} + +func (v *NullableQueueReleaseReservationResult) Set(val *QueueReleaseReservationResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueReleaseReservationResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueReleaseReservationResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueReleaseReservationResult(val *QueueReleaseReservationResult) *NullableQueueReleaseReservationResult { + return &NullableQueueReleaseReservationResult{value: val, isSet: true} +} + +func (v NullableQueueReleaseReservationResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueReleaseReservationResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_remove_label_response.go b/go/futureagi/model_queue_remove_label_response.go new file mode 100644 index 0000000..ecc1c2e --- /dev/null +++ b/go/futureagi/model_queue_remove_label_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueRemoveLabelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueRemoveLabelResponse{} + +// QueueRemoveLabelResponse struct for QueueRemoveLabelResponse +type QueueRemoveLabelResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueRemoveLabelResult `json:"result"` +} + +type _QueueRemoveLabelResponse QueueRemoveLabelResponse + +// NewQueueRemoveLabelResponse instantiates a new QueueRemoveLabelResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueRemoveLabelResponse(result QueueRemoveLabelResult) *QueueRemoveLabelResponse { + this := QueueRemoveLabelResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueRemoveLabelResponseWithDefaults instantiates a new QueueRemoveLabelResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueRemoveLabelResponseWithDefaults() *QueueRemoveLabelResponse { + this := QueueRemoveLabelResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueRemoveLabelResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueRemoveLabelResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueRemoveLabelResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueRemoveLabelResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueRemoveLabelResponse) GetResult() QueueRemoveLabelResult { + if o == nil { + var ret QueueRemoveLabelResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueRemoveLabelResponse) GetResultOk() (*QueueRemoveLabelResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueRemoveLabelResponse) SetResult(v QueueRemoveLabelResult) { + o.Result = v +} + +func (o QueueRemoveLabelResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueRemoveLabelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueRemoveLabelResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueRemoveLabelResponse := _QueueRemoveLabelResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueRemoveLabelResponse) + + if err != nil { + return err + } + + *o = QueueRemoveLabelResponse(varQueueRemoveLabelResponse) + + return err +} + +type NullableQueueRemoveLabelResponse struct { + value *QueueRemoveLabelResponse + isSet bool +} + +func (v NullableQueueRemoveLabelResponse) Get() *QueueRemoveLabelResponse { + return v.value +} + +func (v *NullableQueueRemoveLabelResponse) Set(val *QueueRemoveLabelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueRemoveLabelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueRemoveLabelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueRemoveLabelResponse(val *QueueRemoveLabelResponse) *NullableQueueRemoveLabelResponse { + return &NullableQueueRemoveLabelResponse{value: val, isSet: true} +} + +func (v NullableQueueRemoveLabelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueRemoveLabelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_remove_label_result.go b/go/futureagi/model_queue_remove_label_result.go new file mode 100644 index 0000000..948cd88 --- /dev/null +++ b/go/futureagi/model_queue_remove_label_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueRemoveLabelResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueRemoveLabelResult{} + +// QueueRemoveLabelResult struct for QueueRemoveLabelResult +type QueueRemoveLabelResult struct { + Removed bool `json:"removed"` +} + +type _QueueRemoveLabelResult QueueRemoveLabelResult + +// NewQueueRemoveLabelResult instantiates a new QueueRemoveLabelResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueRemoveLabelResult(removed bool) *QueueRemoveLabelResult { + this := QueueRemoveLabelResult{} + this.Removed = removed + return &this +} + +// NewQueueRemoveLabelResultWithDefaults instantiates a new QueueRemoveLabelResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueRemoveLabelResultWithDefaults() *QueueRemoveLabelResult { + this := QueueRemoveLabelResult{} + return &this +} + +// GetRemoved returns the Removed field value +func (o *QueueRemoveLabelResult) GetRemoved() bool { + if o == nil { + var ret bool + return ret + } + + return o.Removed +} + +// GetRemovedOk returns a tuple with the Removed field value +// and a boolean to check if the value has been set. +func (o *QueueRemoveLabelResult) GetRemovedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Removed, true +} + +// SetRemoved sets field value +func (o *QueueRemoveLabelResult) SetRemoved(v bool) { + o.Removed = v +} + +func (o QueueRemoveLabelResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueRemoveLabelResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["removed"] = o.Removed + return toSerialize, nil +} + +func (o *QueueRemoveLabelResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "removed", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueRemoveLabelResult := _QueueRemoveLabelResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueRemoveLabelResult) + + if err != nil { + return err + } + + *o = QueueRemoveLabelResult(varQueueRemoveLabelResult) + + return err +} + +type NullableQueueRemoveLabelResult struct { + value *QueueRemoveLabelResult + isSet bool +} + +func (v NullableQueueRemoveLabelResult) Get() *QueueRemoveLabelResult { + return v.value +} + +func (v *NullableQueueRemoveLabelResult) Set(val *QueueRemoveLabelResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueRemoveLabelResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueRemoveLabelResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueRemoveLabelResult(val *QueueRemoveLabelResult) *NullableQueueRemoveLabelResult { + return &NullableQueueRemoveLabelResult{value: val, isSet: true} +} + +func (v NullableQueueRemoveLabelResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueRemoveLabelResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_review_item_response.go b/go/futureagi/model_queue_review_item_response.go new file mode 100644 index 0000000..3267abd --- /dev/null +++ b/go/futureagi/model_queue_review_item_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueReviewItemResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueReviewItemResponse{} + +// QueueReviewItemResponse struct for QueueReviewItemResponse +type QueueReviewItemResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueReviewItemResult `json:"result"` +} + +type _QueueReviewItemResponse QueueReviewItemResponse + +// NewQueueReviewItemResponse instantiates a new QueueReviewItemResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueReviewItemResponse(result QueueReviewItemResult) *QueueReviewItemResponse { + this := QueueReviewItemResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueReviewItemResponseWithDefaults instantiates a new QueueReviewItemResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueReviewItemResponseWithDefaults() *QueueReviewItemResponse { + this := QueueReviewItemResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueReviewItemResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueReviewItemResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueReviewItemResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueReviewItemResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueReviewItemResponse) GetResult() QueueReviewItemResult { + if o == nil { + var ret QueueReviewItemResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueReviewItemResponse) GetResultOk() (*QueueReviewItemResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueReviewItemResponse) SetResult(v QueueReviewItemResult) { + o.Result = v +} + +func (o QueueReviewItemResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueReviewItemResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueReviewItemResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueReviewItemResponse := _QueueReviewItemResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueReviewItemResponse) + + if err != nil { + return err + } + + *o = QueueReviewItemResponse(varQueueReviewItemResponse) + + return err +} + +type NullableQueueReviewItemResponse struct { + value *QueueReviewItemResponse + isSet bool +} + +func (v NullableQueueReviewItemResponse) Get() *QueueReviewItemResponse { + return v.value +} + +func (v *NullableQueueReviewItemResponse) Set(val *QueueReviewItemResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueReviewItemResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueReviewItemResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueReviewItemResponse(val *QueueReviewItemResponse) *NullableQueueReviewItemResponse { + return &NullableQueueReviewItemResponse{value: val, isSet: true} +} + +func (v NullableQueueReviewItemResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueReviewItemResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_review_item_result.go b/go/futureagi/model_queue_review_item_result.go new file mode 100644 index 0000000..6cdff95 --- /dev/null +++ b/go/futureagi/model_queue_review_item_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueReviewItemResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueReviewItemResult{} + +// QueueReviewItemResult struct for QueueReviewItemResult +type QueueReviewItemResult struct { + ReviewedItemId string `json:"reviewed_item_id"` + Action string `json:"action"` + NextItem map[string]interface{} `json:"next_item"` + ReviewComments []map[string]interface{} `json:"review_comments"` + ReviewThreads []map[string]interface{} `json:"review_threads"` +} + +type _QueueReviewItemResult QueueReviewItemResult + +// NewQueueReviewItemResult instantiates a new QueueReviewItemResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueReviewItemResult(reviewedItemId string, action string, nextItem map[string]interface{}, reviewComments []map[string]interface{}, reviewThreads []map[string]interface{}) *QueueReviewItemResult { + this := QueueReviewItemResult{} + this.ReviewedItemId = reviewedItemId + this.Action = action + this.NextItem = nextItem + this.ReviewComments = reviewComments + this.ReviewThreads = reviewThreads + return &this +} + +// NewQueueReviewItemResultWithDefaults instantiates a new QueueReviewItemResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueReviewItemResultWithDefaults() *QueueReviewItemResult { + this := QueueReviewItemResult{} + return &this +} + +// GetReviewedItemId returns the ReviewedItemId field value +func (o *QueueReviewItemResult) GetReviewedItemId() string { + if o == nil { + var ret string + return ret + } + + return o.ReviewedItemId +} + +// GetReviewedItemIdOk returns a tuple with the ReviewedItemId field value +// and a boolean to check if the value has been set. +func (o *QueueReviewItemResult) GetReviewedItemIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReviewedItemId, true +} + +// SetReviewedItemId sets field value +func (o *QueueReviewItemResult) SetReviewedItemId(v string) { + o.ReviewedItemId = v +} + +// GetAction returns the Action field value +func (o *QueueReviewItemResult) GetAction() string { + if o == nil { + var ret string + return ret + } + + return o.Action +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *QueueReviewItemResult) GetActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Action, true +} + +// SetAction sets field value +func (o *QueueReviewItemResult) SetAction(v string) { + o.Action = v +} + +// GetNextItem returns the NextItem field value +func (o *QueueReviewItemResult) GetNextItem() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.NextItem +} + +// GetNextItemOk returns a tuple with the NextItem field value +// and a boolean to check if the value has been set. +func (o *QueueReviewItemResult) GetNextItemOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.NextItem, true +} + +// SetNextItem sets field value +func (o *QueueReviewItemResult) SetNextItem(v map[string]interface{}) { + o.NextItem = v +} + +// GetReviewComments returns the ReviewComments field value +func (o *QueueReviewItemResult) GetReviewComments() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.ReviewComments +} + +// GetReviewCommentsOk returns a tuple with the ReviewComments field value +// and a boolean to check if the value has been set. +func (o *QueueReviewItemResult) GetReviewCommentsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ReviewComments, true +} + +// SetReviewComments sets field value +func (o *QueueReviewItemResult) SetReviewComments(v []map[string]interface{}) { + o.ReviewComments = v +} + +// GetReviewThreads returns the ReviewThreads field value +func (o *QueueReviewItemResult) GetReviewThreads() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.ReviewThreads +} + +// GetReviewThreadsOk returns a tuple with the ReviewThreads field value +// and a boolean to check if the value has been set. +func (o *QueueReviewItemResult) GetReviewThreadsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ReviewThreads, true +} + +// SetReviewThreads sets field value +func (o *QueueReviewItemResult) SetReviewThreads(v []map[string]interface{}) { + o.ReviewThreads = v +} + +func (o QueueReviewItemResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueReviewItemResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["reviewed_item_id"] = o.ReviewedItemId + toSerialize["action"] = o.Action + toSerialize["next_item"] = o.NextItem + toSerialize["review_comments"] = o.ReviewComments + toSerialize["review_threads"] = o.ReviewThreads + return toSerialize, nil +} + +func (o *QueueReviewItemResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "reviewed_item_id", + "action", + "next_item", + "review_comments", + "review_threads", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueReviewItemResult := _QueueReviewItemResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueReviewItemResult) + + if err != nil { + return err + } + + *o = QueueReviewItemResult(varQueueReviewItemResult) + + return err +} + +type NullableQueueReviewItemResult struct { + value *QueueReviewItemResult + isSet bool +} + +func (v NullableQueueReviewItemResult) Get() *QueueReviewItemResult { + return v.value +} + +func (v *NullableQueueReviewItemResult) Set(val *QueueReviewItemResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueReviewItemResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueReviewItemResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueReviewItemResult(val *QueueReviewItemResult) *NullableQueueReviewItemResult { + return &NullableQueueReviewItemResult{value: val, isSet: true} +} + +func (v NullableQueueReviewItemResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueReviewItemResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_status_request.go b/go/futureagi/model_queue_status_request.go new file mode 100644 index 0000000..62e4cbe --- /dev/null +++ b/go/futureagi/model_queue_status_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueStatusRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueStatusRequest{} + +// QueueStatusRequest struct for QueueStatusRequest +type QueueStatusRequest struct { + Status string `json:"status"` +} + +type _QueueStatusRequest QueueStatusRequest + +// NewQueueStatusRequest instantiates a new QueueStatusRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueStatusRequest(status string) *QueueStatusRequest { + this := QueueStatusRequest{} + this.Status = status + return &this +} + +// NewQueueStatusRequestWithDefaults instantiates a new QueueStatusRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueStatusRequestWithDefaults() *QueueStatusRequest { + this := QueueStatusRequest{} + return &this +} + +// GetStatus returns the Status field value +func (o *QueueStatusRequest) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *QueueStatusRequest) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *QueueStatusRequest) SetStatus(v string) { + o.Status = v +} + +func (o QueueStatusRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueStatusRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + return toSerialize, nil +} + +func (o *QueueStatusRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueStatusRequest := _QueueStatusRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueStatusRequest) + + if err != nil { + return err + } + + *o = QueueStatusRequest(varQueueStatusRequest) + + return err +} + +type NullableQueueStatusRequest struct { + value *QueueStatusRequest + isSet bool +} + +func (v NullableQueueStatusRequest) Get() *QueueStatusRequest { + return v.value +} + +func (v *NullableQueueStatusRequest) Set(val *QueueStatusRequest) { + v.value = val + v.isSet = true +} + +func (v NullableQueueStatusRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueStatusRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueStatusRequest(val *QueueStatusRequest) *NullableQueueStatusRequest { + return &NullableQueueStatusRequest{value: val, isSet: true} +} + +func (v NullableQueueStatusRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueStatusRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_status_response.go b/go/futureagi/model_queue_status_response.go new file mode 100644 index 0000000..b27ef1f --- /dev/null +++ b/go/futureagi/model_queue_status_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueStatusResponse{} + +// QueueStatusResponse struct for QueueStatusResponse +type QueueStatusResponse struct { + Status *bool `json:"status,omitempty"` + Result AnnotationQueue `json:"result"` +} + +type _QueueStatusResponse QueueStatusResponse + +// NewQueueStatusResponse instantiates a new QueueStatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueStatusResponse(result AnnotationQueue) *QueueStatusResponse { + this := QueueStatusResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueStatusResponseWithDefaults instantiates a new QueueStatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueStatusResponseWithDefaults() *QueueStatusResponse { + this := QueueStatusResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueStatusResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueStatusResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueStatusResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueStatusResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueStatusResponse) GetResult() AnnotationQueue { + if o == nil { + var ret AnnotationQueue + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueStatusResponse) GetResultOk() (*AnnotationQueue, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueStatusResponse) SetResult(v AnnotationQueue) { + o.Result = v +} + +func (o QueueStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueStatusResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueStatusResponse := _QueueStatusResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueStatusResponse) + + if err != nil { + return err + } + + *o = QueueStatusResponse(varQueueStatusResponse) + + return err +} + +type NullableQueueStatusResponse struct { + value *QueueStatusResponse + isSet bool +} + +func (v NullableQueueStatusResponse) Get() *QueueStatusResponse { + return v.value +} + +func (v *NullableQueueStatusResponse) Set(val *QueueStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueStatusResponse(val *QueueStatusResponse) *NullableQueueStatusResponse { + return &NullableQueueStatusResponse{value: val, isSet: true} +} + +func (v NullableQueueStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_submit_annotations_response.go b/go/futureagi/model_queue_submit_annotations_response.go new file mode 100644 index 0000000..e3bfc29 --- /dev/null +++ b/go/futureagi/model_queue_submit_annotations_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueSubmitAnnotationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueSubmitAnnotationsResponse{} + +// QueueSubmitAnnotationsResponse struct for QueueSubmitAnnotationsResponse +type QueueSubmitAnnotationsResponse struct { + Status *bool `json:"status,omitempty"` + Result QueueSubmitAnnotationsResult `json:"result"` +} + +type _QueueSubmitAnnotationsResponse QueueSubmitAnnotationsResponse + +// NewQueueSubmitAnnotationsResponse instantiates a new QueueSubmitAnnotationsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueSubmitAnnotationsResponse(result QueueSubmitAnnotationsResult) *QueueSubmitAnnotationsResponse { + this := QueueSubmitAnnotationsResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewQueueSubmitAnnotationsResponseWithDefaults instantiates a new QueueSubmitAnnotationsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueSubmitAnnotationsResponseWithDefaults() *QueueSubmitAnnotationsResponse { + this := QueueSubmitAnnotationsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *QueueSubmitAnnotationsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueueSubmitAnnotationsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *QueueSubmitAnnotationsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *QueueSubmitAnnotationsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *QueueSubmitAnnotationsResponse) GetResult() QueueSubmitAnnotationsResult { + if o == nil { + var ret QueueSubmitAnnotationsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *QueueSubmitAnnotationsResponse) GetResultOk() (*QueueSubmitAnnotationsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *QueueSubmitAnnotationsResponse) SetResult(v QueueSubmitAnnotationsResult) { + o.Result = v +} + +func (o QueueSubmitAnnotationsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueSubmitAnnotationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *QueueSubmitAnnotationsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueSubmitAnnotationsResponse := _QueueSubmitAnnotationsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueSubmitAnnotationsResponse) + + if err != nil { + return err + } + + *o = QueueSubmitAnnotationsResponse(varQueueSubmitAnnotationsResponse) + + return err +} + +type NullableQueueSubmitAnnotationsResponse struct { + value *QueueSubmitAnnotationsResponse + isSet bool +} + +func (v NullableQueueSubmitAnnotationsResponse) Get() *QueueSubmitAnnotationsResponse { + return v.value +} + +func (v *NullableQueueSubmitAnnotationsResponse) Set(val *QueueSubmitAnnotationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableQueueSubmitAnnotationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueSubmitAnnotationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueSubmitAnnotationsResponse(val *QueueSubmitAnnotationsResponse) *NullableQueueSubmitAnnotationsResponse { + return &NullableQueueSubmitAnnotationsResponse{value: val, isSet: true} +} + +func (v NullableQueueSubmitAnnotationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueSubmitAnnotationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_queue_submit_annotations_result.go b/go/futureagi/model_queue_submit_annotations_result.go new file mode 100644 index 0000000..a29cbb9 --- /dev/null +++ b/go/futureagi/model_queue_submit_annotations_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the QueueSubmitAnnotationsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QueueSubmitAnnotationsResult{} + +// QueueSubmitAnnotationsResult struct for QueueSubmitAnnotationsResult +type QueueSubmitAnnotationsResult struct { + Submitted int32 `json:"submitted"` +} + +type _QueueSubmitAnnotationsResult QueueSubmitAnnotationsResult + +// NewQueueSubmitAnnotationsResult instantiates a new QueueSubmitAnnotationsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueueSubmitAnnotationsResult(submitted int32) *QueueSubmitAnnotationsResult { + this := QueueSubmitAnnotationsResult{} + this.Submitted = submitted + return &this +} + +// NewQueueSubmitAnnotationsResultWithDefaults instantiates a new QueueSubmitAnnotationsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueueSubmitAnnotationsResultWithDefaults() *QueueSubmitAnnotationsResult { + this := QueueSubmitAnnotationsResult{} + return &this +} + +// GetSubmitted returns the Submitted field value +func (o *QueueSubmitAnnotationsResult) GetSubmitted() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Submitted +} + +// GetSubmittedOk returns a tuple with the Submitted field value +// and a boolean to check if the value has been set. +func (o *QueueSubmitAnnotationsResult) GetSubmittedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Submitted, true +} + +// SetSubmitted sets field value +func (o *QueueSubmitAnnotationsResult) SetSubmitted(v int32) { + o.Submitted = v +} + +func (o QueueSubmitAnnotationsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QueueSubmitAnnotationsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["submitted"] = o.Submitted + return toSerialize, nil +} + +func (o *QueueSubmitAnnotationsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "submitted", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQueueSubmitAnnotationsResult := _QueueSubmitAnnotationsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQueueSubmitAnnotationsResult) + + if err != nil { + return err + } + + *o = QueueSubmitAnnotationsResult(varQueueSubmitAnnotationsResult) + + return err +} + +type NullableQueueSubmitAnnotationsResult struct { + value *QueueSubmitAnnotationsResult + isSet bool +} + +func (v NullableQueueSubmitAnnotationsResult) Get() *QueueSubmitAnnotationsResult { + return v.value +} + +func (v *NullableQueueSubmitAnnotationsResult) Set(val *QueueSubmitAnnotationsResult) { + v.value = val + v.isSet = true +} + +func (v NullableQueueSubmitAnnotationsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableQueueSubmitAnnotationsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueueSubmitAnnotationsResult(val *QueueSubmitAnnotationsResult) *NullableQueueSubmitAnnotationsResult { + return &NullableQueueSubmitAnnotationsResult{value: val, isSet: true} +} + +func (v NullableQueueSubmitAnnotationsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueueSubmitAnnotationsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_recommendation.go b/go/futureagi/model_recommendation.go new file mode 100644 index 0000000..8f04d46 --- /dev/null +++ b/go/futureagi/model_recommendation.go @@ -0,0 +1,359 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Recommendation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Recommendation{} + +// Recommendation struct for Recommendation +type Recommendation struct { + Id string `json:"id"` + Title string `json:"title"` + Description string `json:"description"` + Priority string `json:"priority"` + RootCauseLink NullableInt32 `json:"root_cause_link"` + ImmediateFix NullableString `json:"immediate_fix"` + Insights NullableString `json:"insights"` + Evidence []string `json:"evidence"` +} + +type _Recommendation Recommendation + +// NewRecommendation instantiates a new Recommendation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecommendation(id string, title string, description string, priority string, rootCauseLink NullableInt32, immediateFix NullableString, insights NullableString, evidence []string) *Recommendation { + this := Recommendation{} + this.Id = id + this.Title = title + this.Description = description + this.Priority = priority + this.RootCauseLink = rootCauseLink + this.ImmediateFix = immediateFix + this.Insights = insights + this.Evidence = evidence + return &this +} + +// NewRecommendationWithDefaults instantiates a new Recommendation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecommendationWithDefaults() *Recommendation { + this := Recommendation{} + return &this +} + +// GetId returns the Id field value +func (o *Recommendation) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Recommendation) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Recommendation) SetId(v string) { + o.Id = v +} + +// GetTitle returns the Title field value +func (o *Recommendation) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *Recommendation) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *Recommendation) SetTitle(v string) { + o.Title = v +} + +// GetDescription returns the Description field value +func (o *Recommendation) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Recommendation) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *Recommendation) SetDescription(v string) { + o.Description = v +} + +// GetPriority returns the Priority field value +func (o *Recommendation) GetPriority() string { + if o == nil { + var ret string + return ret + } + + return o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value +// and a boolean to check if the value has been set. +func (o *Recommendation) GetPriorityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Priority, true +} + +// SetPriority sets field value +func (o *Recommendation) SetPriority(v string) { + o.Priority = v +} + +// GetRootCauseLink returns the RootCauseLink field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *Recommendation) GetRootCauseLink() int32 { + if o == nil || o.RootCauseLink.Get() == nil { + var ret int32 + return ret + } + + return *o.RootCauseLink.Get() +} + +// GetRootCauseLinkOk returns a tuple with the RootCauseLink field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Recommendation) GetRootCauseLinkOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.RootCauseLink.Get(), o.RootCauseLink.IsSet() +} + +// SetRootCauseLink sets field value +func (o *Recommendation) SetRootCauseLink(v int32) { + o.RootCauseLink.Set(&v) +} + +// GetImmediateFix returns the ImmediateFix field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Recommendation) GetImmediateFix() string { + if o == nil || o.ImmediateFix.Get() == nil { + var ret string + return ret + } + + return *o.ImmediateFix.Get() +} + +// GetImmediateFixOk returns a tuple with the ImmediateFix field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Recommendation) GetImmediateFixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ImmediateFix.Get(), o.ImmediateFix.IsSet() +} + +// SetImmediateFix sets field value +func (o *Recommendation) SetImmediateFix(v string) { + o.ImmediateFix.Set(&v) +} + +// GetInsights returns the Insights field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Recommendation) GetInsights() string { + if o == nil || o.Insights.Get() == nil { + var ret string + return ret + } + + return *o.Insights.Get() +} + +// GetInsightsOk returns a tuple with the Insights field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Recommendation) GetInsightsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Insights.Get(), o.Insights.IsSet() +} + +// SetInsights sets field value +func (o *Recommendation) SetInsights(v string) { + o.Insights.Set(&v) +} + +// GetEvidence returns the Evidence field value +func (o *Recommendation) GetEvidence() []string { + if o == nil { + var ret []string + return ret + } + + return o.Evidence +} + +// GetEvidenceOk returns a tuple with the Evidence field value +// and a boolean to check if the value has been set. +func (o *Recommendation) GetEvidenceOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Evidence, true +} + +// SetEvidence sets field value +func (o *Recommendation) SetEvidence(v []string) { + o.Evidence = v +} + +func (o Recommendation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Recommendation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["title"] = o.Title + toSerialize["description"] = o.Description + toSerialize["priority"] = o.Priority + toSerialize["root_cause_link"] = o.RootCauseLink.Get() + toSerialize["immediate_fix"] = o.ImmediateFix.Get() + toSerialize["insights"] = o.Insights.Get() + toSerialize["evidence"] = o.Evidence + return toSerialize, nil +} + +func (o *Recommendation) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "title", + "description", + "priority", + "root_cause_link", + "immediate_fix", + "insights", + "evidence", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRecommendation := _Recommendation{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRecommendation) + + if err != nil { + return err + } + + *o = Recommendation(varRecommendation) + + return err +} + +type NullableRecommendation struct { + value *Recommendation + isSet bool +} + +func (v NullableRecommendation) Get() *Recommendation { + return v.value +} + +func (v *NullableRecommendation) Set(val *Recommendation) { + v.value = val + v.isSet = true +} + +func (v NullableRecommendation) IsSet() bool { + return v.isSet +} + +func (v *NullableRecommendation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecommendation(val *Recommendation) *NullableRecommendation { + return &NullableRecommendation{value: val, isSet: true} +} + +func (v NullableRecommendation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecommendation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_representative_trace.go b/go/futureagi/model_representative_trace.go new file mode 100644 index 0000000..d1da386 --- /dev/null +++ b/go/futureagi/model_representative_trace.go @@ -0,0 +1,384 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the RepresentativeTrace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepresentativeTrace{} + +// RepresentativeTrace struct for RepresentativeTrace +type RepresentativeTrace struct { + Id string `json:"id"` + Status string `json:"status"` + Timestamp NullableTime `json:"timestamp"` + Summary TraceSummary `json:"summary"` + Evidence TraceEvidence `json:"evidence"` + AgentFlow AgentFlowGraph `json:"agent_flow"` + RootCauses []map[string]string `json:"root_causes"` + Recommendations []map[string]string `json:"recommendations"` + WhatChanged map[string]string `json:"what_changed"` +} + +type _RepresentativeTrace RepresentativeTrace + +// NewRepresentativeTrace instantiates a new RepresentativeTrace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepresentativeTrace(id string, status string, timestamp NullableTime, summary TraceSummary, evidence TraceEvidence, agentFlow AgentFlowGraph, rootCauses []map[string]string, recommendations []map[string]string, whatChanged map[string]string) *RepresentativeTrace { + this := RepresentativeTrace{} + this.Id = id + this.Status = status + this.Timestamp = timestamp + this.Summary = summary + this.Evidence = evidence + this.AgentFlow = agentFlow + this.RootCauses = rootCauses + this.Recommendations = recommendations + this.WhatChanged = whatChanged + return &this +} + +// NewRepresentativeTraceWithDefaults instantiates a new RepresentativeTrace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepresentativeTraceWithDefaults() *RepresentativeTrace { + this := RepresentativeTrace{} + return &this +} + +// GetId returns the Id field value +func (o *RepresentativeTrace) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RepresentativeTrace) SetId(v string) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *RepresentativeTrace) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *RepresentativeTrace) SetStatus(v string) { + o.Status = v +} + +// GetTimestamp returns the Timestamp field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *RepresentativeTrace) GetTimestamp() time.Time { + if o == nil || o.Timestamp.Get() == nil { + var ret time.Time + return ret + } + + return *o.Timestamp.Get() +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RepresentativeTrace) GetTimestampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Timestamp.Get(), o.Timestamp.IsSet() +} + +// SetTimestamp sets field value +func (o *RepresentativeTrace) SetTimestamp(v time.Time) { + o.Timestamp.Set(&v) +} + +// GetSummary returns the Summary field value +func (o *RepresentativeTrace) GetSummary() TraceSummary { + if o == nil { + var ret TraceSummary + return ret + } + + return o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetSummaryOk() (*TraceSummary, bool) { + if o == nil { + return nil, false + } + return &o.Summary, true +} + +// SetSummary sets field value +func (o *RepresentativeTrace) SetSummary(v TraceSummary) { + o.Summary = v +} + +// GetEvidence returns the Evidence field value +func (o *RepresentativeTrace) GetEvidence() TraceEvidence { + if o == nil { + var ret TraceEvidence + return ret + } + + return o.Evidence +} + +// GetEvidenceOk returns a tuple with the Evidence field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetEvidenceOk() (*TraceEvidence, bool) { + if o == nil { + return nil, false + } + return &o.Evidence, true +} + +// SetEvidence sets field value +func (o *RepresentativeTrace) SetEvidence(v TraceEvidence) { + o.Evidence = v +} + +// GetAgentFlow returns the AgentFlow field value +func (o *RepresentativeTrace) GetAgentFlow() AgentFlowGraph { + if o == nil { + var ret AgentFlowGraph + return ret + } + + return o.AgentFlow +} + +// GetAgentFlowOk returns a tuple with the AgentFlow field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetAgentFlowOk() (*AgentFlowGraph, bool) { + if o == nil { + return nil, false + } + return &o.AgentFlow, true +} + +// SetAgentFlow sets field value +func (o *RepresentativeTrace) SetAgentFlow(v AgentFlowGraph) { + o.AgentFlow = v +} + +// GetRootCauses returns the RootCauses field value +func (o *RepresentativeTrace) GetRootCauses() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.RootCauses +} + +// GetRootCausesOk returns a tuple with the RootCauses field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetRootCausesOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.RootCauses, true +} + +// SetRootCauses sets field value +func (o *RepresentativeTrace) SetRootCauses(v []map[string]string) { + o.RootCauses = v +} + +// GetRecommendations returns the Recommendations field value +func (o *RepresentativeTrace) GetRecommendations() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.Recommendations +} + +// GetRecommendationsOk returns a tuple with the Recommendations field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetRecommendationsOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.Recommendations, true +} + +// SetRecommendations sets field value +func (o *RepresentativeTrace) SetRecommendations(v []map[string]string) { + o.Recommendations = v +} + +// GetWhatChanged returns the WhatChanged field value +func (o *RepresentativeTrace) GetWhatChanged() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.WhatChanged +} + +// GetWhatChangedOk returns a tuple with the WhatChanged field value +// and a boolean to check if the value has been set. +func (o *RepresentativeTrace) GetWhatChangedOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.WhatChanged, true +} + +// SetWhatChanged sets field value +func (o *RepresentativeTrace) SetWhatChanged(v map[string]string) { + o.WhatChanged = v +} + +func (o RepresentativeTrace) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepresentativeTrace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["timestamp"] = o.Timestamp.Get() + toSerialize["summary"] = o.Summary + toSerialize["evidence"] = o.Evidence + toSerialize["agent_flow"] = o.AgentFlow + toSerialize["root_causes"] = o.RootCauses + toSerialize["recommendations"] = o.Recommendations + toSerialize["what_changed"] = o.WhatChanged + return toSerialize, nil +} + +func (o *RepresentativeTrace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "status", + "timestamp", + "summary", + "evidence", + "agent_flow", + "root_causes", + "recommendations", + "what_changed", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRepresentativeTrace := _RepresentativeTrace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRepresentativeTrace) + + if err != nil { + return err + } + + *o = RepresentativeTrace(varRepresentativeTrace) + + return err +} + +type NullableRepresentativeTrace struct { + value *RepresentativeTrace + isSet bool +} + +func (v NullableRepresentativeTrace) Get() *RepresentativeTrace { + return v.value +} + +func (v *NullableRepresentativeTrace) Set(val *RepresentativeTrace) { + v.value = val + v.isSet = true +} + +func (v NullableRepresentativeTrace) IsSet() bool { + return v.isSet +} + +func (v *NullableRepresentativeTrace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepresentativeTrace(val *RepresentativeTrace) *NullableRepresentativeTrace { + return &NullableRepresentativeTrace{value: val, isSet: true} +} + +func (v NullableRepresentativeTrace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepresentativeTrace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_req_data_config.go b/go/futureagi/model_req_data_config.go new file mode 100644 index 0000000..ab39773 --- /dev/null +++ b/go/futureagi/model_req_data_config.go @@ -0,0 +1,403 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ReqDataConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReqDataConfig{} + +// ReqDataConfig struct for ReqDataConfig +type ReqDataConfig struct { + Id string `json:"id"` + Type string `json:"type"` + OutputType *string `json:"output_type,omitempty"` + EvalOutputType *string `json:"eval_output_type,omitempty"` + Choices []string `json:"choices,omitempty"` + Value interface{} `json:"value,omitempty"` + FilterOp *string `json:"filter_op,omitempty"` + FilterValue interface{} `json:"filter_value,omitempty"` +} + +type _ReqDataConfig ReqDataConfig + +// NewReqDataConfig instantiates a new ReqDataConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReqDataConfig(id string, type_ string) *ReqDataConfig { + this := ReqDataConfig{} + this.Id = id + this.Type = type_ + return &this +} + +// NewReqDataConfigWithDefaults instantiates a new ReqDataConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReqDataConfigWithDefaults() *ReqDataConfig { + this := ReqDataConfig{} + return &this +} + +// GetId returns the Id field value +func (o *ReqDataConfig) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ReqDataConfig) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ReqDataConfig) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *ReqDataConfig) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ReqDataConfig) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ReqDataConfig) SetType(v string) { + o.Type = v +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise. +func (o *ReqDataConfig) GetOutputType() string { + if o == nil || IsNil(o.OutputType) { + var ret string + return ret + } + return *o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReqDataConfig) GetOutputTypeOk() (*string, bool) { + if o == nil || IsNil(o.OutputType) { + return nil, false + } + return o.OutputType, true +} + +// HasOutputType returns a boolean if a field has been set. +func (o *ReqDataConfig) HasOutputType() bool { + if o != nil && !IsNil(o.OutputType) { + return true + } + + return false +} + +// SetOutputType gets a reference to the given string and assigns it to the OutputType field. +func (o *ReqDataConfig) SetOutputType(v string) { + o.OutputType = &v +} + +// GetEvalOutputType returns the EvalOutputType field value if set, zero value otherwise. +func (o *ReqDataConfig) GetEvalOutputType() string { + if o == nil || IsNil(o.EvalOutputType) { + var ret string + return ret + } + return *o.EvalOutputType +} + +// GetEvalOutputTypeOk returns a tuple with the EvalOutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReqDataConfig) GetEvalOutputTypeOk() (*string, bool) { + if o == nil || IsNil(o.EvalOutputType) { + return nil, false + } + return o.EvalOutputType, true +} + +// HasEvalOutputType returns a boolean if a field has been set. +func (o *ReqDataConfig) HasEvalOutputType() bool { + if o != nil && !IsNil(o.EvalOutputType) { + return true + } + + return false +} + +// SetEvalOutputType gets a reference to the given string and assigns it to the EvalOutputType field. +func (o *ReqDataConfig) SetEvalOutputType(v string) { + o.EvalOutputType = &v +} + +// GetChoices returns the Choices field value if set, zero value otherwise. +func (o *ReqDataConfig) GetChoices() []string { + if o == nil || IsNil(o.Choices) { + var ret []string + return ret + } + return o.Choices +} + +// GetChoicesOk returns a tuple with the Choices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReqDataConfig) GetChoicesOk() ([]string, bool) { + if o == nil || IsNil(o.Choices) { + return nil, false + } + return o.Choices, true +} + +// HasChoices returns a boolean if a field has been set. +func (o *ReqDataConfig) HasChoices() bool { + if o != nil && !IsNil(o.Choices) { + return true + } + + return false +} + +// SetChoices gets a reference to the given []string and assigns it to the Choices field. +func (o *ReqDataConfig) SetChoices(v []string) { + o.Choices = v +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ReqDataConfig) GetValue() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ReqDataConfig) GetValueOk() (*interface{}, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return &o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ReqDataConfig) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given interface{} and assigns it to the Value field. +func (o *ReqDataConfig) SetValue(v interface{}) { + o.Value = v +} + +// GetFilterOp returns the FilterOp field value if set, zero value otherwise. +func (o *ReqDataConfig) GetFilterOp() string { + if o == nil || IsNil(o.FilterOp) { + var ret string + return ret + } + return *o.FilterOp +} + +// GetFilterOpOk returns a tuple with the FilterOp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReqDataConfig) GetFilterOpOk() (*string, bool) { + if o == nil || IsNil(o.FilterOp) { + return nil, false + } + return o.FilterOp, true +} + +// HasFilterOp returns a boolean if a field has been set. +func (o *ReqDataConfig) HasFilterOp() bool { + if o != nil && !IsNil(o.FilterOp) { + return true + } + + return false +} + +// SetFilterOp gets a reference to the given string and assigns it to the FilterOp field. +func (o *ReqDataConfig) SetFilterOp(v string) { + o.FilterOp = &v +} + +// GetFilterValue returns the FilterValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ReqDataConfig) GetFilterValue() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.FilterValue +} + +// GetFilterValueOk returns a tuple with the FilterValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ReqDataConfig) GetFilterValueOk() (*interface{}, bool) { + if o == nil || IsNil(o.FilterValue) { + return nil, false + } + return &o.FilterValue, true +} + +// HasFilterValue returns a boolean if a field has been set. +func (o *ReqDataConfig) HasFilterValue() bool { + if o != nil && !IsNil(o.FilterValue) { + return true + } + + return false +} + +// SetFilterValue gets a reference to the given interface{} and assigns it to the FilterValue field. +func (o *ReqDataConfig) SetFilterValue(v interface{}) { + o.FilterValue = v +} + +func (o ReqDataConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReqDataConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + if !IsNil(o.OutputType) { + toSerialize["output_type"] = o.OutputType + } + if !IsNil(o.EvalOutputType) { + toSerialize["eval_output_type"] = o.EvalOutputType + } + if !IsNil(o.Choices) { + toSerialize["choices"] = o.Choices + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + if !IsNil(o.FilterOp) { + toSerialize["filter_op"] = o.FilterOp + } + if o.FilterValue != nil { + toSerialize["filter_value"] = o.FilterValue + } + return toSerialize, nil +} + +func (o *ReqDataConfig) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varReqDataConfig := _ReqDataConfig{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varReqDataConfig) + + if err != nil { + return err + } + + *o = ReqDataConfig(varReqDataConfig) + + return err +} + +type NullableReqDataConfig struct { + value *ReqDataConfig + isSet bool +} + +func (v NullableReqDataConfig) Get() *ReqDataConfig { + return v.value +} + +func (v *NullableReqDataConfig) Set(val *ReqDataConfig) { + v.value = val + v.isSet = true +} + +func (v NullableReqDataConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableReqDataConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReqDataConfig(val *ReqDataConfig) *NullableReqDataConfig { + return &NullableReqDataConfig{value: val, isSet: true} +} + +func (v NullableReqDataConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReqDataConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_rerun_calls_response.go b/go/futureagi/model_rerun_calls_response.go new file mode 100644 index 0000000..87bce31 --- /dev/null +++ b/go/futureagi/model_rerun_calls_response.go @@ -0,0 +1,353 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RerunCallsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RerunCallsResponse{} + +// RerunCallsResponse struct for RerunCallsResponse +type RerunCallsResponse struct { + Message string `json:"message"` + TestExecutionId string `json:"test_execution_id"` + RerunType string `json:"rerun_type"` + TotalProcessed int32 `json:"total_processed"` + SuccessfulReruns []string `json:"successful_reruns"` + FailedReruns []FailedRerunItem `json:"failed_reruns"` + SuccessCount int32 `json:"success_count"` + FailureCount int32 `json:"failure_count"` +} + +type _RerunCallsResponse RerunCallsResponse + +// NewRerunCallsResponse instantiates a new RerunCallsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRerunCallsResponse(message string, testExecutionId string, rerunType string, totalProcessed int32, successfulReruns []string, failedReruns []FailedRerunItem, successCount int32, failureCount int32) *RerunCallsResponse { + this := RerunCallsResponse{} + this.Message = message + this.TestExecutionId = testExecutionId + this.RerunType = rerunType + this.TotalProcessed = totalProcessed + this.SuccessfulReruns = successfulReruns + this.FailedReruns = failedReruns + this.SuccessCount = successCount + this.FailureCount = failureCount + return &this +} + +// NewRerunCallsResponseWithDefaults instantiates a new RerunCallsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRerunCallsResponseWithDefaults() *RerunCallsResponse { + this := RerunCallsResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *RerunCallsResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *RerunCallsResponse) SetMessage(v string) { + o.Message = v +} + +// GetTestExecutionId returns the TestExecutionId field value +func (o *RerunCallsResponse) GetTestExecutionId() string { + if o == nil { + var ret string + return ret + } + + return o.TestExecutionId +} + +// GetTestExecutionIdOk returns a tuple with the TestExecutionId field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetTestExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TestExecutionId, true +} + +// SetTestExecutionId sets field value +func (o *RerunCallsResponse) SetTestExecutionId(v string) { + o.TestExecutionId = v +} + +// GetRerunType returns the RerunType field value +func (o *RerunCallsResponse) GetRerunType() string { + if o == nil { + var ret string + return ret + } + + return o.RerunType +} + +// GetRerunTypeOk returns a tuple with the RerunType field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetRerunTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RerunType, true +} + +// SetRerunType sets field value +func (o *RerunCallsResponse) SetRerunType(v string) { + o.RerunType = v +} + +// GetTotalProcessed returns the TotalProcessed field value +func (o *RerunCallsResponse) GetTotalProcessed() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalProcessed +} + +// GetTotalProcessedOk returns a tuple with the TotalProcessed field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetTotalProcessedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalProcessed, true +} + +// SetTotalProcessed sets field value +func (o *RerunCallsResponse) SetTotalProcessed(v int32) { + o.TotalProcessed = v +} + +// GetSuccessfulReruns returns the SuccessfulReruns field value +func (o *RerunCallsResponse) GetSuccessfulReruns() []string { + if o == nil { + var ret []string + return ret + } + + return o.SuccessfulReruns +} + +// GetSuccessfulRerunsOk returns a tuple with the SuccessfulReruns field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetSuccessfulRerunsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SuccessfulReruns, true +} + +// SetSuccessfulReruns sets field value +func (o *RerunCallsResponse) SetSuccessfulReruns(v []string) { + o.SuccessfulReruns = v +} + +// GetFailedReruns returns the FailedReruns field value +func (o *RerunCallsResponse) GetFailedReruns() []FailedRerunItem { + if o == nil { + var ret []FailedRerunItem + return ret + } + + return o.FailedReruns +} + +// GetFailedRerunsOk returns a tuple with the FailedReruns field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetFailedRerunsOk() ([]FailedRerunItem, bool) { + if o == nil { + return nil, false + } + return o.FailedReruns, true +} + +// SetFailedReruns sets field value +func (o *RerunCallsResponse) SetFailedReruns(v []FailedRerunItem) { + o.FailedReruns = v +} + +// GetSuccessCount returns the SuccessCount field value +func (o *RerunCallsResponse) GetSuccessCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SuccessCount +} + +// GetSuccessCountOk returns a tuple with the SuccessCount field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetSuccessCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SuccessCount, true +} + +// SetSuccessCount sets field value +func (o *RerunCallsResponse) SetSuccessCount(v int32) { + o.SuccessCount = v +} + +// GetFailureCount returns the FailureCount field value +func (o *RerunCallsResponse) GetFailureCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FailureCount +} + +// GetFailureCountOk returns a tuple with the FailureCount field value +// and a boolean to check if the value has been set. +func (o *RerunCallsResponse) GetFailureCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FailureCount, true +} + +// SetFailureCount sets field value +func (o *RerunCallsResponse) SetFailureCount(v int32) { + o.FailureCount = v +} + +func (o RerunCallsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RerunCallsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["test_execution_id"] = o.TestExecutionId + toSerialize["rerun_type"] = o.RerunType + toSerialize["total_processed"] = o.TotalProcessed + toSerialize["successful_reruns"] = o.SuccessfulReruns + toSerialize["failed_reruns"] = o.FailedReruns + toSerialize["success_count"] = o.SuccessCount + toSerialize["failure_count"] = o.FailureCount + return toSerialize, nil +} + +func (o *RerunCallsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "test_execution_id", + "rerun_type", + "total_processed", + "successful_reruns", + "failed_reruns", + "success_count", + "failure_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRerunCallsResponse := _RerunCallsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRerunCallsResponse) + + if err != nil { + return err + } + + *o = RerunCallsResponse(varRerunCallsResponse) + + return err +} + +type NullableRerunCallsResponse struct { + value *RerunCallsResponse + isSet bool +} + +func (v NullableRerunCallsResponse) Get() *RerunCallsResponse { + return v.value +} + +func (v *NullableRerunCallsResponse) Set(val *RerunCallsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRerunCallsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRerunCallsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRerunCallsResponse(val *RerunCallsResponse) *NullableRerunCallsResponse { + return &NullableRerunCallsResponse{value: val, isSet: true} +} + +func (v NullableRerunCallsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRerunCallsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_rerun_cell_entry.go b/go/futureagi/model_rerun_cell_entry.go new file mode 100644 index 0000000..a072c00 --- /dev/null +++ b/go/futureagi/model_rerun_cell_entry.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RerunCellEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RerunCellEntry{} + +// RerunCellEntry struct for RerunCellEntry +type RerunCellEntry struct { + ColumnId string `json:"column_id"` + RowId string `json:"row_id"` +} + +type _RerunCellEntry RerunCellEntry + +// NewRerunCellEntry instantiates a new RerunCellEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRerunCellEntry(columnId string, rowId string) *RerunCellEntry { + this := RerunCellEntry{} + this.ColumnId = columnId + this.RowId = rowId + return &this +} + +// NewRerunCellEntryWithDefaults instantiates a new RerunCellEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRerunCellEntryWithDefaults() *RerunCellEntry { + this := RerunCellEntry{} + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *RerunCellEntry) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *RerunCellEntry) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *RerunCellEntry) SetColumnId(v string) { + o.ColumnId = v +} + +// GetRowId returns the RowId field value +func (o *RerunCellEntry) GetRowId() string { + if o == nil { + var ret string + return ret + } + + return o.RowId +} + +// GetRowIdOk returns a tuple with the RowId field value +// and a boolean to check if the value has been set. +func (o *RerunCellEntry) GetRowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RowId, true +} + +// SetRowId sets field value +func (o *RerunCellEntry) SetRowId(v string) { + o.RowId = v +} + +func (o RerunCellEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RerunCellEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + toSerialize["row_id"] = o.RowId + return toSerialize, nil +} + +func (o *RerunCellEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + "row_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRerunCellEntry := _RerunCellEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRerunCellEntry) + + if err != nil { + return err + } + + *o = RerunCellEntry(varRerunCellEntry) + + return err +} + +type NullableRerunCellEntry struct { + value *RerunCellEntry + isSet bool +} + +func (v NullableRerunCellEntry) Get() *RerunCellEntry { + return v.value +} + +func (v *NullableRerunCellEntry) Set(val *RerunCellEntry) { + v.value = val + v.isSet = true +} + +func (v NullableRerunCellEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableRerunCellEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRerunCellEntry(val *RerunCellEntry) *NullableRerunCellEntry { + return &NullableRerunCellEntry{value: val, isSet: true} +} + +func (v NullableRerunCellEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRerunCellEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_review_item_request.go b/go/futureagi/model_review_item_request.go new file mode 100644 index 0000000..4cae3e7 --- /dev/null +++ b/go/futureagi/model_review_item_request.go @@ -0,0 +1,229 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ReviewItemRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReviewItemRequest{} + +// ReviewItemRequest struct for ReviewItemRequest +type ReviewItemRequest struct { + Action string `json:"action"` + Notes *string `json:"notes,omitempty"` + LabelComments []ReviewLabelCommentRequest `json:"label_comments,omitempty"` +} + +type _ReviewItemRequest ReviewItemRequest + +// NewReviewItemRequest instantiates a new ReviewItemRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReviewItemRequest(action string) *ReviewItemRequest { + this := ReviewItemRequest{} + this.Action = action + return &this +} + +// NewReviewItemRequestWithDefaults instantiates a new ReviewItemRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReviewItemRequestWithDefaults() *ReviewItemRequest { + this := ReviewItemRequest{} + return &this +} + +// GetAction returns the Action field value +func (o *ReviewItemRequest) GetAction() string { + if o == nil { + var ret string + return ret + } + + return o.Action +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *ReviewItemRequest) GetActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Action, true +} + +// SetAction sets field value +func (o *ReviewItemRequest) SetAction(v string) { + o.Action = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *ReviewItemRequest) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReviewItemRequest) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *ReviewItemRequest) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *ReviewItemRequest) SetNotes(v string) { + o.Notes = &v +} + +// GetLabelComments returns the LabelComments field value if set, zero value otherwise. +func (o *ReviewItemRequest) GetLabelComments() []ReviewLabelCommentRequest { + if o == nil || IsNil(o.LabelComments) { + var ret []ReviewLabelCommentRequest + return ret + } + return o.LabelComments +} + +// GetLabelCommentsOk returns a tuple with the LabelComments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReviewItemRequest) GetLabelCommentsOk() ([]ReviewLabelCommentRequest, bool) { + if o == nil || IsNil(o.LabelComments) { + return nil, false + } + return o.LabelComments, true +} + +// HasLabelComments returns a boolean if a field has been set. +func (o *ReviewItemRequest) HasLabelComments() bool { + if o != nil && !IsNil(o.LabelComments) { + return true + } + + return false +} + +// SetLabelComments gets a reference to the given []ReviewLabelCommentRequest and assigns it to the LabelComments field. +func (o *ReviewItemRequest) SetLabelComments(v []ReviewLabelCommentRequest) { + o.LabelComments = v +} + +func (o ReviewItemRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReviewItemRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["action"] = o.Action + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if !IsNil(o.LabelComments) { + toSerialize["label_comments"] = o.LabelComments + } + return toSerialize, nil +} + +func (o *ReviewItemRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "action", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varReviewItemRequest := _ReviewItemRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varReviewItemRequest) + + if err != nil { + return err + } + + *o = ReviewItemRequest(varReviewItemRequest) + + return err +} + +type NullableReviewItemRequest struct { + value *ReviewItemRequest + isSet bool +} + +func (v NullableReviewItemRequest) Get() *ReviewItemRequest { + return v.value +} + +func (v *NullableReviewItemRequest) Set(val *ReviewItemRequest) { + v.value = val + v.isSet = true +} + +func (v NullableReviewItemRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableReviewItemRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReviewItemRequest(val *ReviewItemRequest) *NullableReviewItemRequest { + return &NullableReviewItemRequest{value: val, isSet: true} +} + +func (v NullableReviewItemRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReviewItemRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_review_label_comment_request.go b/go/futureagi/model_review_label_comment_request.go new file mode 100644 index 0000000..570689e --- /dev/null +++ b/go/futureagi/model_review_label_comment_request.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ReviewLabelCommentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReviewLabelCommentRequest{} + +// ReviewLabelCommentRequest struct for ReviewLabelCommentRequest +type ReviewLabelCommentRequest struct { + LabelId *string `json:"label_id,omitempty"` + TargetAnnotatorId *string `json:"target_annotator_id,omitempty"` + Comment *string `json:"comment,omitempty"` +} + +// NewReviewLabelCommentRequest instantiates a new ReviewLabelCommentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReviewLabelCommentRequest() *ReviewLabelCommentRequest { + this := ReviewLabelCommentRequest{} + return &this +} + +// NewReviewLabelCommentRequestWithDefaults instantiates a new ReviewLabelCommentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReviewLabelCommentRequestWithDefaults() *ReviewLabelCommentRequest { + this := ReviewLabelCommentRequest{} + return &this +} + +// GetLabelId returns the LabelId field value if set, zero value otherwise. +func (o *ReviewLabelCommentRequest) GetLabelId() string { + if o == nil || IsNil(o.LabelId) { + var ret string + return ret + } + return *o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReviewLabelCommentRequest) GetLabelIdOk() (*string, bool) { + if o == nil || IsNil(o.LabelId) { + return nil, false + } + return o.LabelId, true +} + +// HasLabelId returns a boolean if a field has been set. +func (o *ReviewLabelCommentRequest) HasLabelId() bool { + if o != nil && !IsNil(o.LabelId) { + return true + } + + return false +} + +// SetLabelId gets a reference to the given string and assigns it to the LabelId field. +func (o *ReviewLabelCommentRequest) SetLabelId(v string) { + o.LabelId = &v +} + +// GetTargetAnnotatorId returns the TargetAnnotatorId field value if set, zero value otherwise. +func (o *ReviewLabelCommentRequest) GetTargetAnnotatorId() string { + if o == nil || IsNil(o.TargetAnnotatorId) { + var ret string + return ret + } + return *o.TargetAnnotatorId +} + +// GetTargetAnnotatorIdOk returns a tuple with the TargetAnnotatorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReviewLabelCommentRequest) GetTargetAnnotatorIdOk() (*string, bool) { + if o == nil || IsNil(o.TargetAnnotatorId) { + return nil, false + } + return o.TargetAnnotatorId, true +} + +// HasTargetAnnotatorId returns a boolean if a field has been set. +func (o *ReviewLabelCommentRequest) HasTargetAnnotatorId() bool { + if o != nil && !IsNil(o.TargetAnnotatorId) { + return true + } + + return false +} + +// SetTargetAnnotatorId gets a reference to the given string and assigns it to the TargetAnnotatorId field. +func (o *ReviewLabelCommentRequest) SetTargetAnnotatorId(v string) { + o.TargetAnnotatorId = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *ReviewLabelCommentRequest) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReviewLabelCommentRequest) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *ReviewLabelCommentRequest) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *ReviewLabelCommentRequest) SetComment(v string) { + o.Comment = &v +} + +func (o ReviewLabelCommentRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReviewLabelCommentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LabelId) { + toSerialize["label_id"] = o.LabelId + } + if !IsNil(o.TargetAnnotatorId) { + toSerialize["target_annotator_id"] = o.TargetAnnotatorId + } + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + return toSerialize, nil +} + +type NullableReviewLabelCommentRequest struct { + value *ReviewLabelCommentRequest + isSet bool +} + +func (v NullableReviewLabelCommentRequest) Get() *ReviewLabelCommentRequest { + return v.value +} + +func (v *NullableReviewLabelCommentRequest) Set(val *ReviewLabelCommentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableReviewLabelCommentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableReviewLabelCommentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReviewLabelCommentRequest(val *ReviewLabelCommentRequest) *NullableReviewLabelCommentRequest { + return &NullableReviewLabelCommentRequest{value: val, isSet: true} +} + +func (v NullableReviewLabelCommentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReviewLabelCommentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_root_cause.go b/go/futureagi/model_root_cause.go new file mode 100644 index 0000000..4197e99 --- /dev/null +++ b/go/futureagi/model_root_cause.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RootCause type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RootCause{} + +// RootCause struct for RootCause +type RootCause struct { + Rank int32 `json:"rank"` + Title string `json:"title"` + Description string `json:"description"` +} + +type _RootCause RootCause + +// NewRootCause instantiates a new RootCause object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRootCause(rank int32, title string, description string) *RootCause { + this := RootCause{} + this.Rank = rank + this.Title = title + this.Description = description + return &this +} + +// NewRootCauseWithDefaults instantiates a new RootCause object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRootCauseWithDefaults() *RootCause { + this := RootCause{} + return &this +} + +// GetRank returns the Rank field value +func (o *RootCause) GetRank() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Rank +} + +// GetRankOk returns a tuple with the Rank field value +// and a boolean to check if the value has been set. +func (o *RootCause) GetRankOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Rank, true +} + +// SetRank sets field value +func (o *RootCause) SetRank(v int32) { + o.Rank = v +} + +// GetTitle returns the Title field value +func (o *RootCause) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *RootCause) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *RootCause) SetTitle(v string) { + o.Title = v +} + +// GetDescription returns the Description field value +func (o *RootCause) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *RootCause) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *RootCause) SetDescription(v string) { + o.Description = v +} + +func (o RootCause) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RootCause) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["rank"] = o.Rank + toSerialize["title"] = o.Title + toSerialize["description"] = o.Description + return toSerialize, nil +} + +func (o *RootCause) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rank", + "title", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRootCause := _RootCause{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRootCause) + + if err != nil { + return err + } + + *o = RootCause(varRootCause) + + return err +} + +type NullableRootCause struct { + value *RootCause + isSet bool +} + +func (v NullableRootCause) Get() *RootCause { + return v.value +} + +func (v *NullableRootCause) Set(val *RootCause) { + v.value = val + v.isSet = true +} + +func (v NullableRootCause) IsSet() bool { + return v.isSet +} + +func (v *NullableRootCause) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRootCause(val *RootCause) *NullableRootCause { + return &NullableRootCause{value: val, isSet: true} +} + +func (v NullableRootCause) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRootCause) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_rules_inner.go b/go/futureagi/model_rules_inner.go new file mode 100644 index 0000000..0f22b13 --- /dev/null +++ b/go/futureagi/model_rules_inner.go @@ -0,0 +1,235 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RulesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RulesInner{} + +// RulesInner struct for RulesInner +type RulesInner struct { + Field string `json:"field"` + Op *string `json:"op,omitempty"` + // Rule comparison value. Can be a scalar, list, object, boolean, or null depending on the operator. + Value interface{} `json:"value,omitempty"` +} + +type _RulesInner RulesInner + +// NewRulesInner instantiates a new RulesInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRulesInner(field string) *RulesInner { + this := RulesInner{} + this.Field = field + var op string = "eq" + this.Op = &op + return &this +} + +// NewRulesInnerWithDefaults instantiates a new RulesInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRulesInnerWithDefaults() *RulesInner { + this := RulesInner{} + var op string = "eq" + this.Op = &op + return &this +} + +// GetField returns the Field field value +func (o *RulesInner) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *RulesInner) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *RulesInner) SetField(v string) { + o.Field = v +} + +// GetOp returns the Op field value if set, zero value otherwise. +func (o *RulesInner) GetOp() string { + if o == nil || IsNil(o.Op) { + var ret string + return ret + } + return *o.Op +} + +// GetOpOk returns a tuple with the Op field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RulesInner) GetOpOk() (*string, bool) { + if o == nil || IsNil(o.Op) { + return nil, false + } + return o.Op, true +} + +// HasOp returns a boolean if a field has been set. +func (o *RulesInner) HasOp() bool { + if o != nil && !IsNil(o.Op) { + return true + } + + return false +} + +// SetOp gets a reference to the given string and assigns it to the Op field. +func (o *RulesInner) SetOp(v string) { + o.Op = &v +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RulesInner) GetValue() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RulesInner) GetValueOk() (*interface{}, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return &o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *RulesInner) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given interface{} and assigns it to the Value field. +func (o *RulesInner) SetValue(v interface{}) { + o.Value = v +} + +func (o RulesInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RulesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field"] = o.Field + if !IsNil(o.Op) { + toSerialize["op"] = o.Op + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +func (o *RulesInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRulesInner := _RulesInner{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRulesInner) + + if err != nil { + return err + } + + *o = RulesInner(varRulesInner) + + return err +} + +type NullableRulesInner struct { + value *RulesInner + isSet bool +} + +func (v NullableRulesInner) Get() *RulesInner { + return v.value +} + +func (v *NullableRulesInner) Set(val *RulesInner) { + v.value = val + v.isSet = true +} + +func (v NullableRulesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableRulesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRulesInner(val *RulesInner) *NullableRulesInner { + return &NullableRulesInner{value: val, isSet: true} +} + +func (v NullableRulesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRulesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_new_evals_on_test_execution.go b/go/futureagi/model_run_new_evals_on_test_execution.go new file mode 100644 index 0000000..7b8f0fe --- /dev/null +++ b/go/futureagi/model_run_new_evals_on_test_execution.go @@ -0,0 +1,273 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunNewEvalsOnTestExecution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunNewEvalsOnTestExecution{} + +// RunNewEvalsOnTestExecution struct for RunNewEvalsOnTestExecution +type RunNewEvalsOnTestExecution struct { + // List of specific test execution IDs to run evaluations on + TestExecutionIds []string `json:"test_execution_ids,omitempty"` + // Whether to run evaluations on all test executions in the run test + SelectAll *bool `json:"select_all,omitempty"` + // List of SimulateEvalConfig IDs to run on the test executions + EvalConfigIds []string `json:"eval_config_ids"` + // Whether to enable tool evaluation for this run (if not provided, uses the run test's current setting) + EnableToolEvaluation *bool `json:"enable_tool_evaluation,omitempty"` +} + +type _RunNewEvalsOnTestExecution RunNewEvalsOnTestExecution + +// NewRunNewEvalsOnTestExecution instantiates a new RunNewEvalsOnTestExecution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunNewEvalsOnTestExecution(evalConfigIds []string) *RunNewEvalsOnTestExecution { + this := RunNewEvalsOnTestExecution{} + var selectAll bool = false + this.SelectAll = &selectAll + this.EvalConfigIds = evalConfigIds + return &this +} + +// NewRunNewEvalsOnTestExecutionWithDefaults instantiates a new RunNewEvalsOnTestExecution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunNewEvalsOnTestExecutionWithDefaults() *RunNewEvalsOnTestExecution { + this := RunNewEvalsOnTestExecution{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// GetTestExecutionIds returns the TestExecutionIds field value if set, zero value otherwise. +func (o *RunNewEvalsOnTestExecution) GetTestExecutionIds() []string { + if o == nil || IsNil(o.TestExecutionIds) { + var ret []string + return ret + } + return o.TestExecutionIds +} + +// GetTestExecutionIdsOk returns a tuple with the TestExecutionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunNewEvalsOnTestExecution) GetTestExecutionIdsOk() ([]string, bool) { + if o == nil || IsNil(o.TestExecutionIds) { + return nil, false + } + return o.TestExecutionIds, true +} + +// HasTestExecutionIds returns a boolean if a field has been set. +func (o *RunNewEvalsOnTestExecution) HasTestExecutionIds() bool { + if o != nil && !IsNil(o.TestExecutionIds) { + return true + } + + return false +} + +// SetTestExecutionIds gets a reference to the given []string and assigns it to the TestExecutionIds field. +func (o *RunNewEvalsOnTestExecution) SetTestExecutionIds(v []string) { + o.TestExecutionIds = v +} + +// GetSelectAll returns the SelectAll field value if set, zero value otherwise. +func (o *RunNewEvalsOnTestExecution) GetSelectAll() bool { + if o == nil || IsNil(o.SelectAll) { + var ret bool + return ret + } + return *o.SelectAll +} + +// GetSelectAllOk returns a tuple with the SelectAll field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunNewEvalsOnTestExecution) GetSelectAllOk() (*bool, bool) { + if o == nil || IsNil(o.SelectAll) { + return nil, false + } + return o.SelectAll, true +} + +// HasSelectAll returns a boolean if a field has been set. +func (o *RunNewEvalsOnTestExecution) HasSelectAll() bool { + if o != nil && !IsNil(o.SelectAll) { + return true + } + + return false +} + +// SetSelectAll gets a reference to the given bool and assigns it to the SelectAll field. +func (o *RunNewEvalsOnTestExecution) SetSelectAll(v bool) { + o.SelectAll = &v +} + +// GetEvalConfigIds returns the EvalConfigIds field value +func (o *RunNewEvalsOnTestExecution) GetEvalConfigIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.EvalConfigIds +} + +// GetEvalConfigIdsOk returns a tuple with the EvalConfigIds field value +// and a boolean to check if the value has been set. +func (o *RunNewEvalsOnTestExecution) GetEvalConfigIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.EvalConfigIds, true +} + +// SetEvalConfigIds sets field value +func (o *RunNewEvalsOnTestExecution) SetEvalConfigIds(v []string) { + o.EvalConfigIds = v +} + +// GetEnableToolEvaluation returns the EnableToolEvaluation field value if set, zero value otherwise. +func (o *RunNewEvalsOnTestExecution) GetEnableToolEvaluation() bool { + if o == nil || IsNil(o.EnableToolEvaluation) { + var ret bool + return ret + } + return *o.EnableToolEvaluation +} + +// GetEnableToolEvaluationOk returns a tuple with the EnableToolEvaluation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunNewEvalsOnTestExecution) GetEnableToolEvaluationOk() (*bool, bool) { + if o == nil || IsNil(o.EnableToolEvaluation) { + return nil, false + } + return o.EnableToolEvaluation, true +} + +// HasEnableToolEvaluation returns a boolean if a field has been set. +func (o *RunNewEvalsOnTestExecution) HasEnableToolEvaluation() bool { + if o != nil && !IsNil(o.EnableToolEvaluation) { + return true + } + + return false +} + +// SetEnableToolEvaluation gets a reference to the given bool and assigns it to the EnableToolEvaluation field. +func (o *RunNewEvalsOnTestExecution) SetEnableToolEvaluation(v bool) { + o.EnableToolEvaluation = &v +} + +func (o RunNewEvalsOnTestExecution) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunNewEvalsOnTestExecution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TestExecutionIds) { + toSerialize["test_execution_ids"] = o.TestExecutionIds + } + if !IsNil(o.SelectAll) { + toSerialize["select_all"] = o.SelectAll + } + toSerialize["eval_config_ids"] = o.EvalConfigIds + if !IsNil(o.EnableToolEvaluation) { + toSerialize["enable_tool_evaluation"] = o.EnableToolEvaluation + } + return toSerialize, nil +} + +func (o *RunNewEvalsOnTestExecution) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_config_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunNewEvalsOnTestExecution := _RunNewEvalsOnTestExecution{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunNewEvalsOnTestExecution) + + if err != nil { + return err + } + + *o = RunNewEvalsOnTestExecution(varRunNewEvalsOnTestExecution) + + return err +} + +type NullableRunNewEvalsOnTestExecution struct { + value *RunNewEvalsOnTestExecution + isSet bool +} + +func (v NullableRunNewEvalsOnTestExecution) Get() *RunNewEvalsOnTestExecution { + return v.value +} + +func (v *NullableRunNewEvalsOnTestExecution) Set(val *RunNewEvalsOnTestExecution) { + v.value = val + v.isSet = true +} + +func (v NullableRunNewEvalsOnTestExecution) IsSet() bool { + return v.isSet +} + +func (v *NullableRunNewEvalsOnTestExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunNewEvalsOnTestExecution(val *RunNewEvalsOnTestExecution) *NullableRunNewEvalsOnTestExecution { + return &NullableRunNewEvalsOnTestExecution{value: val, isSet: true} +} + +func (v NullableRunNewEvalsOnTestExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunNewEvalsOnTestExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_new_evals_response.go b/go/futureagi/model_run_new_evals_response.go new file mode 100644 index 0000000..98d13cc --- /dev/null +++ b/go/futureagi/model_run_new_evals_response.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunNewEvalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunNewEvalsResponse{} + +// RunNewEvalsResponse struct for RunNewEvalsResponse +type RunNewEvalsResponse struct { + Message string `json:"message"` + RunTestId string `json:"run_test_id"` + CallExecutionCount int32 `json:"call_execution_count"` +} + +type _RunNewEvalsResponse RunNewEvalsResponse + +// NewRunNewEvalsResponse instantiates a new RunNewEvalsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunNewEvalsResponse(message string, runTestId string, callExecutionCount int32) *RunNewEvalsResponse { + this := RunNewEvalsResponse{} + this.Message = message + this.RunTestId = runTestId + this.CallExecutionCount = callExecutionCount + return &this +} + +// NewRunNewEvalsResponseWithDefaults instantiates a new RunNewEvalsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunNewEvalsResponseWithDefaults() *RunNewEvalsResponse { + this := RunNewEvalsResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *RunNewEvalsResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *RunNewEvalsResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *RunNewEvalsResponse) SetMessage(v string) { + o.Message = v +} + +// GetRunTestId returns the RunTestId field value +func (o *RunNewEvalsResponse) GetRunTestId() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value +// and a boolean to check if the value has been set. +func (o *RunNewEvalsResponse) GetRunTestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestId, true +} + +// SetRunTestId sets field value +func (o *RunNewEvalsResponse) SetRunTestId(v string) { + o.RunTestId = v +} + +// GetCallExecutionCount returns the CallExecutionCount field value +func (o *RunNewEvalsResponse) GetCallExecutionCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CallExecutionCount +} + +// GetCallExecutionCountOk returns a tuple with the CallExecutionCount field value +// and a boolean to check if the value has been set. +func (o *RunNewEvalsResponse) GetCallExecutionCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CallExecutionCount, true +} + +// SetCallExecutionCount sets field value +func (o *RunNewEvalsResponse) SetCallExecutionCount(v int32) { + o.CallExecutionCount = v +} + +func (o RunNewEvalsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunNewEvalsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["run_test_id"] = o.RunTestId + toSerialize["call_execution_count"] = o.CallExecutionCount + return toSerialize, nil +} + +func (o *RunNewEvalsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "run_test_id", + "call_execution_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunNewEvalsResponse := _RunNewEvalsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunNewEvalsResponse) + + if err != nil { + return err + } + + *o = RunNewEvalsResponse(varRunNewEvalsResponse) + + return err +} + +type NullableRunNewEvalsResponse struct { + value *RunNewEvalsResponse + isSet bool +} + +func (v NullableRunNewEvalsResponse) Get() *RunNewEvalsResponse { + return v.value +} + +func (v *NullableRunNewEvalsResponse) Set(val *RunNewEvalsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunNewEvalsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunNewEvalsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunNewEvalsResponse(val *RunNewEvalsResponse) *NullableRunNewEvalsResponse { + return &NullableRunNewEvalsResponse{value: val, isSet: true} +} + +func (v NullableRunNewEvalsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunNewEvalsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_choice_option.go b/go/futureagi/model_run_prompt_choice_option.go new file mode 100644 index 0000000..6a7bf3d --- /dev/null +++ b/go/futureagi/model_run_prompt_choice_option.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptChoiceOption type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptChoiceOption{} + +// RunPromptChoiceOption struct for RunPromptChoiceOption +type RunPromptChoiceOption struct { + Value map[string]interface{} `json:"value"` + Label string `json:"label"` +} + +type _RunPromptChoiceOption RunPromptChoiceOption + +// NewRunPromptChoiceOption instantiates a new RunPromptChoiceOption object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptChoiceOption(value map[string]interface{}, label string) *RunPromptChoiceOption { + this := RunPromptChoiceOption{} + this.Value = value + this.Label = label + return &this +} + +// NewRunPromptChoiceOptionWithDefaults instantiates a new RunPromptChoiceOption object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptChoiceOptionWithDefaults() *RunPromptChoiceOption { + this := RunPromptChoiceOption{} + return &this +} + +// GetValue returns the Value field value +func (o *RunPromptChoiceOption) GetValue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *RunPromptChoiceOption) GetValueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *RunPromptChoiceOption) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetLabel returns the Label field value +func (o *RunPromptChoiceOption) GetLabel() string { + if o == nil { + var ret string + return ret + } + + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value +// and a boolean to check if the value has been set. +func (o *RunPromptChoiceOption) GetLabelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Label, true +} + +// SetLabel sets field value +func (o *RunPromptChoiceOption) SetLabel(v string) { + o.Label = v +} + +func (o RunPromptChoiceOption) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptChoiceOption) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + toSerialize["label"] = o.Label + return toSerialize, nil +} + +func (o *RunPromptChoiceOption) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + "label", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptChoiceOption := _RunPromptChoiceOption{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptChoiceOption) + + if err != nil { + return err + } + + *o = RunPromptChoiceOption(varRunPromptChoiceOption) + + return err +} + +type NullableRunPromptChoiceOption struct { + value *RunPromptChoiceOption + isSet bool +} + +func (v NullableRunPromptChoiceOption) Get() *RunPromptChoiceOption { + return v.value +} + +func (v *NullableRunPromptChoiceOption) Set(val *RunPromptChoiceOption) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptChoiceOption) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptChoiceOption) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptChoiceOption(val *RunPromptChoiceOption) *NullableRunPromptChoiceOption { + return &NullableRunPromptChoiceOption{value: val, isSet: true} +} + +func (v NullableRunPromptChoiceOption) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptChoiceOption) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_column_config_response.go b/go/futureagi/model_run_prompt_column_config_response.go new file mode 100644 index 0000000..8527962 --- /dev/null +++ b/go/futureagi/model_run_prompt_column_config_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptColumnConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptColumnConfigResponse{} + +// RunPromptColumnConfigResponse struct for RunPromptColumnConfigResponse +type RunPromptColumnConfigResponse struct { + Status bool `json:"status"` + Result RunPromptColumnConfigResult `json:"result"` +} + +type _RunPromptColumnConfigResponse RunPromptColumnConfigResponse + +// NewRunPromptColumnConfigResponse instantiates a new RunPromptColumnConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptColumnConfigResponse(status bool, result RunPromptColumnConfigResult) *RunPromptColumnConfigResponse { + this := RunPromptColumnConfigResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewRunPromptColumnConfigResponseWithDefaults instantiates a new RunPromptColumnConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptColumnConfigResponseWithDefaults() *RunPromptColumnConfigResponse { + this := RunPromptColumnConfigResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *RunPromptColumnConfigResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnConfigResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *RunPromptColumnConfigResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *RunPromptColumnConfigResponse) GetResult() RunPromptColumnConfigResult { + if o == nil { + var ret RunPromptColumnConfigResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnConfigResponse) GetResultOk() (*RunPromptColumnConfigResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *RunPromptColumnConfigResponse) SetResult(v RunPromptColumnConfigResult) { + o.Result = v +} + +func (o RunPromptColumnConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptColumnConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *RunPromptColumnConfigResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptColumnConfigResponse := _RunPromptColumnConfigResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptColumnConfigResponse) + + if err != nil { + return err + } + + *o = RunPromptColumnConfigResponse(varRunPromptColumnConfigResponse) + + return err +} + +type NullableRunPromptColumnConfigResponse struct { + value *RunPromptColumnConfigResponse + isSet bool +} + +func (v NullableRunPromptColumnConfigResponse) Get() *RunPromptColumnConfigResponse { + return v.value +} + +func (v *NullableRunPromptColumnConfigResponse) Set(val *RunPromptColumnConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptColumnConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptColumnConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptColumnConfigResponse(val *RunPromptColumnConfigResponse) *NullableRunPromptColumnConfigResponse { + return &NullableRunPromptColumnConfigResponse{value: val, isSet: true} +} + +func (v NullableRunPromptColumnConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptColumnConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_column_config_result.go b/go/futureagi/model_run_prompt_column_config_result.go new file mode 100644 index 0000000..cdcd25d --- /dev/null +++ b/go/futureagi/model_run_prompt_column_config_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptColumnConfigResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptColumnConfigResult{} + +// RunPromptColumnConfigResult struct for RunPromptColumnConfigResult +type RunPromptColumnConfigResult struct { + Config map[string]interface{} `json:"config"` +} + +type _RunPromptColumnConfigResult RunPromptColumnConfigResult + +// NewRunPromptColumnConfigResult instantiates a new RunPromptColumnConfigResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptColumnConfigResult(config map[string]interface{}) *RunPromptColumnConfigResult { + this := RunPromptColumnConfigResult{} + this.Config = config + return &this +} + +// NewRunPromptColumnConfigResultWithDefaults instantiates a new RunPromptColumnConfigResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptColumnConfigResultWithDefaults() *RunPromptColumnConfigResult { + this := RunPromptColumnConfigResult{} + return &this +} + +// GetConfig returns the Config field value +func (o *RunPromptColumnConfigResult) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnConfigResult) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *RunPromptColumnConfigResult) SetConfig(v map[string]interface{}) { + o.Config = v +} + +func (o RunPromptColumnConfigResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptColumnConfigResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + return toSerialize, nil +} + +func (o *RunPromptColumnConfigResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptColumnConfigResult := _RunPromptColumnConfigResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptColumnConfigResult) + + if err != nil { + return err + } + + *o = RunPromptColumnConfigResult(varRunPromptColumnConfigResult) + + return err +} + +type NullableRunPromptColumnConfigResult struct { + value *RunPromptColumnConfigResult + isSet bool +} + +func (v NullableRunPromptColumnConfigResult) Get() *RunPromptColumnConfigResult { + return v.value +} + +func (v *NullableRunPromptColumnConfigResult) Set(val *RunPromptColumnConfigResult) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptColumnConfigResult) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptColumnConfigResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptColumnConfigResult(val *RunPromptColumnConfigResult) *NullableRunPromptColumnConfigResult { + return &NullableRunPromptColumnConfigResult{value: val, isSet: true} +} + +func (v NullableRunPromptColumnConfigResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptColumnConfigResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_column_preview_response.go b/go/futureagi/model_run_prompt_column_preview_response.go new file mode 100644 index 0000000..eb96764 --- /dev/null +++ b/go/futureagi/model_run_prompt_column_preview_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptColumnPreviewResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptColumnPreviewResponse{} + +// RunPromptColumnPreviewResponse struct for RunPromptColumnPreviewResponse +type RunPromptColumnPreviewResponse struct { + Status bool `json:"status"` + Result RunPromptColumnPreviewResult `json:"result"` +} + +type _RunPromptColumnPreviewResponse RunPromptColumnPreviewResponse + +// NewRunPromptColumnPreviewResponse instantiates a new RunPromptColumnPreviewResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptColumnPreviewResponse(status bool, result RunPromptColumnPreviewResult) *RunPromptColumnPreviewResponse { + this := RunPromptColumnPreviewResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewRunPromptColumnPreviewResponseWithDefaults instantiates a new RunPromptColumnPreviewResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptColumnPreviewResponseWithDefaults() *RunPromptColumnPreviewResponse { + this := RunPromptColumnPreviewResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *RunPromptColumnPreviewResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnPreviewResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *RunPromptColumnPreviewResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *RunPromptColumnPreviewResponse) GetResult() RunPromptColumnPreviewResult { + if o == nil { + var ret RunPromptColumnPreviewResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnPreviewResponse) GetResultOk() (*RunPromptColumnPreviewResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *RunPromptColumnPreviewResponse) SetResult(v RunPromptColumnPreviewResult) { + o.Result = v +} + +func (o RunPromptColumnPreviewResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptColumnPreviewResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *RunPromptColumnPreviewResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptColumnPreviewResponse := _RunPromptColumnPreviewResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptColumnPreviewResponse) + + if err != nil { + return err + } + + *o = RunPromptColumnPreviewResponse(varRunPromptColumnPreviewResponse) + + return err +} + +type NullableRunPromptColumnPreviewResponse struct { + value *RunPromptColumnPreviewResponse + isSet bool +} + +func (v NullableRunPromptColumnPreviewResponse) Get() *RunPromptColumnPreviewResponse { + return v.value +} + +func (v *NullableRunPromptColumnPreviewResponse) Set(val *RunPromptColumnPreviewResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptColumnPreviewResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptColumnPreviewResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptColumnPreviewResponse(val *RunPromptColumnPreviewResponse) *NullableRunPromptColumnPreviewResponse { + return &NullableRunPromptColumnPreviewResponse{value: val, isSet: true} +} + +func (v NullableRunPromptColumnPreviewResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptColumnPreviewResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_column_preview_result.go b/go/futureagi/model_run_prompt_column_preview_result.go new file mode 100644 index 0000000..457d8db --- /dev/null +++ b/go/futureagi/model_run_prompt_column_preview_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptColumnPreviewResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptColumnPreviewResult{} + +// RunPromptColumnPreviewResult struct for RunPromptColumnPreviewResult +type RunPromptColumnPreviewResult struct { + Responses []map[string]interface{} `json:"responses"` + TokenUsage map[string]interface{} `json:"token_usage"` + Cost map[string]interface{} `json:"cost"` +} + +type _RunPromptColumnPreviewResult RunPromptColumnPreviewResult + +// NewRunPromptColumnPreviewResult instantiates a new RunPromptColumnPreviewResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptColumnPreviewResult(responses []map[string]interface{}, tokenUsage map[string]interface{}, cost map[string]interface{}) *RunPromptColumnPreviewResult { + this := RunPromptColumnPreviewResult{} + this.Responses = responses + this.TokenUsage = tokenUsage + this.Cost = cost + return &this +} + +// NewRunPromptColumnPreviewResultWithDefaults instantiates a new RunPromptColumnPreviewResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptColumnPreviewResultWithDefaults() *RunPromptColumnPreviewResult { + this := RunPromptColumnPreviewResult{} + return &this +} + +// GetResponses returns the Responses field value +func (o *RunPromptColumnPreviewResult) GetResponses() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Responses +} + +// GetResponsesOk returns a tuple with the Responses field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnPreviewResult) GetResponsesOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Responses, true +} + +// SetResponses sets field value +func (o *RunPromptColumnPreviewResult) SetResponses(v []map[string]interface{}) { + o.Responses = v +} + +// GetTokenUsage returns the TokenUsage field value +func (o *RunPromptColumnPreviewResult) GetTokenUsage() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.TokenUsage +} + +// GetTokenUsageOk returns a tuple with the TokenUsage field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnPreviewResult) GetTokenUsageOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.TokenUsage, true +} + +// SetTokenUsage sets field value +func (o *RunPromptColumnPreviewResult) SetTokenUsage(v map[string]interface{}) { + o.TokenUsage = v +} + +// GetCost returns the Cost field value +func (o *RunPromptColumnPreviewResult) GetCost() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Cost +} + +// GetCostOk returns a tuple with the Cost field value +// and a boolean to check if the value has been set. +func (o *RunPromptColumnPreviewResult) GetCostOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Cost, true +} + +// SetCost sets field value +func (o *RunPromptColumnPreviewResult) SetCost(v map[string]interface{}) { + o.Cost = v +} + +func (o RunPromptColumnPreviewResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptColumnPreviewResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["responses"] = o.Responses + toSerialize["token_usage"] = o.TokenUsage + toSerialize["cost"] = o.Cost + return toSerialize, nil +} + +func (o *RunPromptColumnPreviewResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "responses", + "token_usage", + "cost", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptColumnPreviewResult := _RunPromptColumnPreviewResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptColumnPreviewResult) + + if err != nil { + return err + } + + *o = RunPromptColumnPreviewResult(varRunPromptColumnPreviewResult) + + return err +} + +type NullableRunPromptColumnPreviewResult struct { + value *RunPromptColumnPreviewResult + isSet bool +} + +func (v NullableRunPromptColumnPreviewResult) Get() *RunPromptColumnPreviewResult { + return v.value +} + +func (v *NullableRunPromptColumnPreviewResult) Set(val *RunPromptColumnPreviewResult) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptColumnPreviewResult) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptColumnPreviewResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptColumnPreviewResult(val *RunPromptColumnPreviewResult) *NullableRunPromptColumnPreviewResult { + return &NullableRunPromptColumnPreviewResult{value: val, isSet: true} +} + +func (v NullableRunPromptColumnPreviewResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptColumnPreviewResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_options_response.go b/go/futureagi/model_run_prompt_options_response.go new file mode 100644 index 0000000..a899a7c --- /dev/null +++ b/go/futureagi/model_run_prompt_options_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptOptionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptOptionsResponse{} + +// RunPromptOptionsResponse struct for RunPromptOptionsResponse +type RunPromptOptionsResponse struct { + Status bool `json:"status"` + Result RunPromptOptionsResult `json:"result"` +} + +type _RunPromptOptionsResponse RunPromptOptionsResponse + +// NewRunPromptOptionsResponse instantiates a new RunPromptOptionsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptOptionsResponse(status bool, result RunPromptOptionsResult) *RunPromptOptionsResponse { + this := RunPromptOptionsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewRunPromptOptionsResponseWithDefaults instantiates a new RunPromptOptionsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptOptionsResponseWithDefaults() *RunPromptOptionsResponse { + this := RunPromptOptionsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *RunPromptOptionsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *RunPromptOptionsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *RunPromptOptionsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *RunPromptOptionsResponse) GetResult() RunPromptOptionsResult { + if o == nil { + var ret RunPromptOptionsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *RunPromptOptionsResponse) GetResultOk() (*RunPromptOptionsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *RunPromptOptionsResponse) SetResult(v RunPromptOptionsResult) { + o.Result = v +} + +func (o RunPromptOptionsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptOptionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *RunPromptOptionsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptOptionsResponse := _RunPromptOptionsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptOptionsResponse) + + if err != nil { + return err + } + + *o = RunPromptOptionsResponse(varRunPromptOptionsResponse) + + return err +} + +type NullableRunPromptOptionsResponse struct { + value *RunPromptOptionsResponse + isSet bool +} + +func (v NullableRunPromptOptionsResponse) Get() *RunPromptOptionsResponse { + return v.value +} + +func (v *NullableRunPromptOptionsResponse) Set(val *RunPromptOptionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptOptionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptOptionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptOptionsResponse(val *RunPromptOptionsResponse) *NullableRunPromptOptionsResponse { + return &NullableRunPromptOptionsResponse{value: val, isSet: true} +} + +func (v NullableRunPromptOptionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptOptionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_options_result.go b/go/futureagi/model_run_prompt_options_result.go new file mode 100644 index 0000000..2579cfb --- /dev/null +++ b/go/futureagi/model_run_prompt_options_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptOptionsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptOptionsResult{} + +// RunPromptOptionsResult struct for RunPromptOptionsResult +type RunPromptOptionsResult struct { + Models []map[string]interface{} `json:"models"` + ToolConfig map[string]interface{} `json:"tool_config"` + AvailableTools []RunPromptToolOption `json:"available_tools"` + OutputFormats []RunPromptChoiceOption `json:"output_formats"` + ToolChoices []RunPromptChoiceOption `json:"tool_choices"` +} + +type _RunPromptOptionsResult RunPromptOptionsResult + +// NewRunPromptOptionsResult instantiates a new RunPromptOptionsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptOptionsResult(models []map[string]interface{}, toolConfig map[string]interface{}, availableTools []RunPromptToolOption, outputFormats []RunPromptChoiceOption, toolChoices []RunPromptChoiceOption) *RunPromptOptionsResult { + this := RunPromptOptionsResult{} + this.Models = models + this.ToolConfig = toolConfig + this.AvailableTools = availableTools + this.OutputFormats = outputFormats + this.ToolChoices = toolChoices + return &this +} + +// NewRunPromptOptionsResultWithDefaults instantiates a new RunPromptOptionsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptOptionsResultWithDefaults() *RunPromptOptionsResult { + this := RunPromptOptionsResult{} + return &this +} + +// GetModels returns the Models field value +func (o *RunPromptOptionsResult) GetModels() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Models +} + +// GetModelsOk returns a tuple with the Models field value +// and a boolean to check if the value has been set. +func (o *RunPromptOptionsResult) GetModelsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Models, true +} + +// SetModels sets field value +func (o *RunPromptOptionsResult) SetModels(v []map[string]interface{}) { + o.Models = v +} + +// GetToolConfig returns the ToolConfig field value +func (o *RunPromptOptionsResult) GetToolConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.ToolConfig +} + +// GetToolConfigOk returns a tuple with the ToolConfig field value +// and a boolean to check if the value has been set. +func (o *RunPromptOptionsResult) GetToolConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.ToolConfig, true +} + +// SetToolConfig sets field value +func (o *RunPromptOptionsResult) SetToolConfig(v map[string]interface{}) { + o.ToolConfig = v +} + +// GetAvailableTools returns the AvailableTools field value +func (o *RunPromptOptionsResult) GetAvailableTools() []RunPromptToolOption { + if o == nil { + var ret []RunPromptToolOption + return ret + } + + return o.AvailableTools +} + +// GetAvailableToolsOk returns a tuple with the AvailableTools field value +// and a boolean to check if the value has been set. +func (o *RunPromptOptionsResult) GetAvailableToolsOk() ([]RunPromptToolOption, bool) { + if o == nil { + return nil, false + } + return o.AvailableTools, true +} + +// SetAvailableTools sets field value +func (o *RunPromptOptionsResult) SetAvailableTools(v []RunPromptToolOption) { + o.AvailableTools = v +} + +// GetOutputFormats returns the OutputFormats field value +func (o *RunPromptOptionsResult) GetOutputFormats() []RunPromptChoiceOption { + if o == nil { + var ret []RunPromptChoiceOption + return ret + } + + return o.OutputFormats +} + +// GetOutputFormatsOk returns a tuple with the OutputFormats field value +// and a boolean to check if the value has been set. +func (o *RunPromptOptionsResult) GetOutputFormatsOk() ([]RunPromptChoiceOption, bool) { + if o == nil { + return nil, false + } + return o.OutputFormats, true +} + +// SetOutputFormats sets field value +func (o *RunPromptOptionsResult) SetOutputFormats(v []RunPromptChoiceOption) { + o.OutputFormats = v +} + +// GetToolChoices returns the ToolChoices field value +func (o *RunPromptOptionsResult) GetToolChoices() []RunPromptChoiceOption { + if o == nil { + var ret []RunPromptChoiceOption + return ret + } + + return o.ToolChoices +} + +// GetToolChoicesOk returns a tuple with the ToolChoices field value +// and a boolean to check if the value has been set. +func (o *RunPromptOptionsResult) GetToolChoicesOk() ([]RunPromptChoiceOption, bool) { + if o == nil { + return nil, false + } + return o.ToolChoices, true +} + +// SetToolChoices sets field value +func (o *RunPromptOptionsResult) SetToolChoices(v []RunPromptChoiceOption) { + o.ToolChoices = v +} + +func (o RunPromptOptionsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptOptionsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["models"] = o.Models + toSerialize["tool_config"] = o.ToolConfig + toSerialize["available_tools"] = o.AvailableTools + toSerialize["output_formats"] = o.OutputFormats + toSerialize["tool_choices"] = o.ToolChoices + return toSerialize, nil +} + +func (o *RunPromptOptionsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "models", + "tool_config", + "available_tools", + "output_formats", + "tool_choices", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptOptionsResult := _RunPromptOptionsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptOptionsResult) + + if err != nil { + return err + } + + *o = RunPromptOptionsResult(varRunPromptOptionsResult) + + return err +} + +type NullableRunPromptOptionsResult struct { + value *RunPromptOptionsResult + isSet bool +} + +func (v NullableRunPromptOptionsResult) Get() *RunPromptOptionsResult { + return v.value +} + +func (v *NullableRunPromptOptionsResult) Set(val *RunPromptOptionsResult) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptOptionsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptOptionsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptOptionsResult(val *RunPromptOptionsResult) *NullableRunPromptOptionsResult { + return &NullableRunPromptOptionsResult{value: val, isSet: true} +} + +func (v NullableRunPromptOptionsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptOptionsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_prompt_tool_option.go b/go/futureagi/model_run_prompt_tool_option.go new file mode 100644 index 0000000..0bf141e --- /dev/null +++ b/go/futureagi/model_run_prompt_tool_option.go @@ -0,0 +1,362 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunPromptToolOption type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunPromptToolOption{} + +// RunPromptToolOption struct for RunPromptToolOption +type RunPromptToolOption struct { + Id string `json:"id"` + Name string `json:"name"` + YamlConfig NullableString `json:"yaml_config,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + ConfigType NullableString `json:"config_type,omitempty"` + Description NullableString `json:"description,omitempty"` +} + +type _RunPromptToolOption RunPromptToolOption + +// NewRunPromptToolOption instantiates a new RunPromptToolOption object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunPromptToolOption(id string, name string) *RunPromptToolOption { + this := RunPromptToolOption{} + this.Id = id + this.Name = name + return &this +} + +// NewRunPromptToolOptionWithDefaults instantiates a new RunPromptToolOption object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunPromptToolOptionWithDefaults() *RunPromptToolOption { + this := RunPromptToolOption{} + return &this +} + +// GetId returns the Id field value +func (o *RunPromptToolOption) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RunPromptToolOption) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RunPromptToolOption) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *RunPromptToolOption) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RunPromptToolOption) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RunPromptToolOption) SetName(v string) { + o.Name = v +} + +// GetYamlConfig returns the YamlConfig field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunPromptToolOption) GetYamlConfig() string { + if o == nil || IsNil(o.YamlConfig.Get()) { + var ret string + return ret + } + return *o.YamlConfig.Get() +} + +// GetYamlConfigOk returns a tuple with the YamlConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunPromptToolOption) GetYamlConfigOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.YamlConfig.Get(), o.YamlConfig.IsSet() +} + +// HasYamlConfig returns a boolean if a field has been set. +func (o *RunPromptToolOption) HasYamlConfig() bool { + if o != nil && o.YamlConfig.IsSet() { + return true + } + + return false +} + +// SetYamlConfig gets a reference to the given NullableString and assigns it to the YamlConfig field. +func (o *RunPromptToolOption) SetYamlConfig(v string) { + o.YamlConfig.Set(&v) +} + +// SetYamlConfigNil sets the value for YamlConfig to be an explicit nil +func (o *RunPromptToolOption) SetYamlConfigNil() { + o.YamlConfig.Set(nil) +} + +// UnsetYamlConfig ensures that no value is present for YamlConfig, not even an explicit nil +func (o *RunPromptToolOption) UnsetYamlConfig() { + o.YamlConfig.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *RunPromptToolOption) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunPromptToolOption) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *RunPromptToolOption) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *RunPromptToolOption) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConfigType returns the ConfigType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunPromptToolOption) GetConfigType() string { + if o == nil || IsNil(o.ConfigType.Get()) { + var ret string + return ret + } + return *o.ConfigType.Get() +} + +// GetConfigTypeOk returns a tuple with the ConfigType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunPromptToolOption) GetConfigTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ConfigType.Get(), o.ConfigType.IsSet() +} + +// HasConfigType returns a boolean if a field has been set. +func (o *RunPromptToolOption) HasConfigType() bool { + if o != nil && o.ConfigType.IsSet() { + return true + } + + return false +} + +// SetConfigType gets a reference to the given NullableString and assigns it to the ConfigType field. +func (o *RunPromptToolOption) SetConfigType(v string) { + o.ConfigType.Set(&v) +} + +// SetConfigTypeNil sets the value for ConfigType to be an explicit nil +func (o *RunPromptToolOption) SetConfigTypeNil() { + o.ConfigType.Set(nil) +} + +// UnsetConfigType ensures that no value is present for ConfigType, not even an explicit nil +func (o *RunPromptToolOption) UnsetConfigType() { + o.ConfigType.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunPromptToolOption) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunPromptToolOption) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RunPromptToolOption) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RunPromptToolOption) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RunPromptToolOption) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RunPromptToolOption) UnsetDescription() { + o.Description.Unset() +} + +func (o RunPromptToolOption) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunPromptToolOption) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.YamlConfig.IsSet() { + toSerialize["yaml_config"] = o.YamlConfig.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if o.ConfigType.IsSet() { + toSerialize["config_type"] = o.ConfigType.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + return toSerialize, nil +} + +func (o *RunPromptToolOption) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunPromptToolOption := _RunPromptToolOption{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunPromptToolOption) + + if err != nil { + return err + } + + *o = RunPromptToolOption(varRunPromptToolOption) + + return err +} + +type NullableRunPromptToolOption struct { + value *RunPromptToolOption + isSet bool +} + +func (v NullableRunPromptToolOption) Get() *RunPromptToolOption { + return v.value +} + +func (v *NullableRunPromptToolOption) Set(val *RunPromptToolOption) { + v.value = val + v.isSet = true +} + +func (v NullableRunPromptToolOption) IsSet() bool { + return v.isSet +} + +func (v *NullableRunPromptToolOption) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunPromptToolOption(val *RunPromptToolOption) *NullableRunPromptToolOption { + return &NullableRunPromptToolOption{value: val, isSet: true} +} + +func (v NullableRunPromptToolOption) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunPromptToolOption) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_analytics.go b/go/futureagi/model_run_test_analytics.go new file mode 100644 index 0000000..d89ba12 --- /dev/null +++ b/go/futureagi/model_run_test_analytics.go @@ -0,0 +1,282 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunTestAnalytics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestAnalytics{} + +// RunTestAnalytics struct for RunTestAnalytics +type RunTestAnalytics struct { + // Run test metadata + RunTestInfo map[string]string `json:"run_test_info"` + // Fail-rate trend points + FailRateTrends []map[string]string `json:"fail_rate_trends"` + // Evaluation score trend points + EvaluationScoreTrends []map[string]string `json:"evaluation_score_trends"` + // Per-execution performance rows + PerformanceComparison []map[string]string `json:"performance_comparison"` + // Aggregate performance summary + SummaryStats *map[string]string `json:"summary_stats,omitempty"` +} + +type _RunTestAnalytics RunTestAnalytics + +// NewRunTestAnalytics instantiates a new RunTestAnalytics object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestAnalytics(runTestInfo map[string]string, failRateTrends []map[string]string, evaluationScoreTrends []map[string]string, performanceComparison []map[string]string) *RunTestAnalytics { + this := RunTestAnalytics{} + this.RunTestInfo = runTestInfo + this.FailRateTrends = failRateTrends + this.EvaluationScoreTrends = evaluationScoreTrends + this.PerformanceComparison = performanceComparison + return &this +} + +// NewRunTestAnalyticsWithDefaults instantiates a new RunTestAnalytics object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestAnalyticsWithDefaults() *RunTestAnalytics { + this := RunTestAnalytics{} + return &this +} + +// GetRunTestInfo returns the RunTestInfo field value +func (o *RunTestAnalytics) GetRunTestInfo() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.RunTestInfo +} + +// GetRunTestInfoOk returns a tuple with the RunTestInfo field value +// and a boolean to check if the value has been set. +func (o *RunTestAnalytics) GetRunTestInfoOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestInfo, true +} + +// SetRunTestInfo sets field value +func (o *RunTestAnalytics) SetRunTestInfo(v map[string]string) { + o.RunTestInfo = v +} + +// GetFailRateTrends returns the FailRateTrends field value +func (o *RunTestAnalytics) GetFailRateTrends() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.FailRateTrends +} + +// GetFailRateTrendsOk returns a tuple with the FailRateTrends field value +// and a boolean to check if the value has been set. +func (o *RunTestAnalytics) GetFailRateTrendsOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.FailRateTrends, true +} + +// SetFailRateTrends sets field value +func (o *RunTestAnalytics) SetFailRateTrends(v []map[string]string) { + o.FailRateTrends = v +} + +// GetEvaluationScoreTrends returns the EvaluationScoreTrends field value +func (o *RunTestAnalytics) GetEvaluationScoreTrends() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.EvaluationScoreTrends +} + +// GetEvaluationScoreTrendsOk returns a tuple with the EvaluationScoreTrends field value +// and a boolean to check if the value has been set. +func (o *RunTestAnalytics) GetEvaluationScoreTrendsOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.EvaluationScoreTrends, true +} + +// SetEvaluationScoreTrends sets field value +func (o *RunTestAnalytics) SetEvaluationScoreTrends(v []map[string]string) { + o.EvaluationScoreTrends = v +} + +// GetPerformanceComparison returns the PerformanceComparison field value +func (o *RunTestAnalytics) GetPerformanceComparison() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.PerformanceComparison +} + +// GetPerformanceComparisonOk returns a tuple with the PerformanceComparison field value +// and a boolean to check if the value has been set. +func (o *RunTestAnalytics) GetPerformanceComparisonOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.PerformanceComparison, true +} + +// SetPerformanceComparison sets field value +func (o *RunTestAnalytics) SetPerformanceComparison(v []map[string]string) { + o.PerformanceComparison = v +} + +// GetSummaryStats returns the SummaryStats field value if set, zero value otherwise. +func (o *RunTestAnalytics) GetSummaryStats() map[string]string { + if o == nil || IsNil(o.SummaryStats) { + var ret map[string]string + return ret + } + return *o.SummaryStats +} + +// GetSummaryStatsOk returns a tuple with the SummaryStats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestAnalytics) GetSummaryStatsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.SummaryStats) { + return nil, false + } + return o.SummaryStats, true +} + +// HasSummaryStats returns a boolean if a field has been set. +func (o *RunTestAnalytics) HasSummaryStats() bool { + if o != nil && !IsNil(o.SummaryStats) { + return true + } + + return false +} + +// SetSummaryStats gets a reference to the given map[string]string and assigns it to the SummaryStats field. +func (o *RunTestAnalytics) SetSummaryStats(v map[string]string) { + o.SummaryStats = &v +} + +func (o RunTestAnalytics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestAnalytics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["run_test_info"] = o.RunTestInfo + toSerialize["fail_rate_trends"] = o.FailRateTrends + toSerialize["evaluation_score_trends"] = o.EvaluationScoreTrends + toSerialize["performance_comparison"] = o.PerformanceComparison + if !IsNil(o.SummaryStats) { + toSerialize["summary_stats"] = o.SummaryStats + } + return toSerialize, nil +} + +func (o *RunTestAnalytics) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "run_test_info", + "fail_rate_trends", + "evaluation_score_trends", + "performance_comparison", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunTestAnalytics := _RunTestAnalytics{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunTestAnalytics) + + if err != nil { + return err + } + + *o = RunTestAnalytics(varRunTestAnalytics) + + return err +} + +type NullableRunTestAnalytics struct { + value *RunTestAnalytics + isSet bool +} + +func (v NullableRunTestAnalytics) Get() *RunTestAnalytics { + return v.value +} + +func (v *NullableRunTestAnalytics) Set(val *RunTestAnalytics) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestAnalytics) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestAnalytics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestAnalytics(val *RunTestAnalytics) *NullableRunTestAnalytics { + return &NullableRunTestAnalytics{value: val, isSet: true} +} + +func (v NullableRunTestAnalytics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestAnalytics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_call_executions_response.go b/go/futureagi/model_run_test_call_executions_response.go new file mode 100644 index 0000000..e75d212 --- /dev/null +++ b/go/futureagi/model_run_test_call_executions_response.go @@ -0,0 +1,327 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the RunTestCallExecutionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestCallExecutionsResponse{} + +// RunTestCallExecutionsResponse struct for RunTestCallExecutionsResponse +type RunTestCallExecutionsResponse struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []map[string]string `json:"results,omitempty"` + TotalPages *int32 `json:"total_pages,omitempty"` + CurrentPage *int32 `json:"current_page,omitempty"` +} + +// NewRunTestCallExecutionsResponse instantiates a new RunTestCallExecutionsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestCallExecutionsResponse() *RunTestCallExecutionsResponse { + this := RunTestCallExecutionsResponse{} + return &this +} + +// NewRunTestCallExecutionsResponseWithDefaults instantiates a new RunTestCallExecutionsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestCallExecutionsResponseWithDefaults() *RunTestCallExecutionsResponse { + this := RunTestCallExecutionsResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *RunTestCallExecutionsResponse) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestCallExecutionsResponse) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *RunTestCallExecutionsResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *RunTestCallExecutionsResponse) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestCallExecutionsResponse) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestCallExecutionsResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *RunTestCallExecutionsResponse) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *RunTestCallExecutionsResponse) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *RunTestCallExecutionsResponse) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *RunTestCallExecutionsResponse) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestCallExecutionsResponse) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestCallExecutionsResponse) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *RunTestCallExecutionsResponse) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *RunTestCallExecutionsResponse) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *RunTestCallExecutionsResponse) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *RunTestCallExecutionsResponse) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *RunTestCallExecutionsResponse) GetResults() []map[string]string { + if o == nil || IsNil(o.Results) { + var ret []map[string]string + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestCallExecutionsResponse) GetResultsOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *RunTestCallExecutionsResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []map[string]string and assigns it to the Results field. +func (o *RunTestCallExecutionsResponse) SetResults(v []map[string]string) { + o.Results = v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *RunTestCallExecutionsResponse) GetTotalPages() int32 { + if o == nil || IsNil(o.TotalPages) { + var ret int32 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestCallExecutionsResponse) GetTotalPagesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *RunTestCallExecutionsResponse) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field. +func (o *RunTestCallExecutionsResponse) SetTotalPages(v int32) { + o.TotalPages = &v +} + +// GetCurrentPage returns the CurrentPage field value if set, zero value otherwise. +func (o *RunTestCallExecutionsResponse) GetCurrentPage() int32 { + if o == nil || IsNil(o.CurrentPage) { + var ret int32 + return ret + } + return *o.CurrentPage +} + +// GetCurrentPageOk returns a tuple with the CurrentPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestCallExecutionsResponse) GetCurrentPageOk() (*int32, bool) { + if o == nil || IsNil(o.CurrentPage) { + return nil, false + } + return o.CurrentPage, true +} + +// HasCurrentPage returns a boolean if a field has been set. +func (o *RunTestCallExecutionsResponse) HasCurrentPage() bool { + if o != nil && !IsNil(o.CurrentPage) { + return true + } + + return false +} + +// SetCurrentPage gets a reference to the given int32 and assigns it to the CurrentPage field. +func (o *RunTestCallExecutionsResponse) SetCurrentPage(v int32) { + o.CurrentPage = &v +} + +func (o RunTestCallExecutionsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestCallExecutionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.CurrentPage) { + toSerialize["current_page"] = o.CurrentPage + } + return toSerialize, nil +} + +type NullableRunTestCallExecutionsResponse struct { + value *RunTestCallExecutionsResponse + isSet bool +} + +func (v NullableRunTestCallExecutionsResponse) Get() *RunTestCallExecutionsResponse { + return v.value +} + +func (v *NullableRunTestCallExecutionsResponse) Set(val *RunTestCallExecutionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestCallExecutionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestCallExecutionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestCallExecutionsResponse(val *RunTestCallExecutionsResponse) *NullableRunTestCallExecutionsResponse { + return &NullableRunTestCallExecutionsResponse{value: val, isSet: true} +} + +func (v NullableRunTestCallExecutionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestCallExecutionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_chat_execution_response.go b/go/futureagi/model_run_test_chat_execution_response.go new file mode 100644 index 0000000..fde34e1 --- /dev/null +++ b/go/futureagi/model_run_test_chat_execution_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunTestChatExecutionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestChatExecutionResponse{} + +// RunTestChatExecutionResponse struct for RunTestChatExecutionResponse +type RunTestChatExecutionResponse struct { + Status *bool `json:"status,omitempty"` + Result RunTestChatExecutionResult `json:"result"` +} + +type _RunTestChatExecutionResponse RunTestChatExecutionResponse + +// NewRunTestChatExecutionResponse instantiates a new RunTestChatExecutionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestChatExecutionResponse(result RunTestChatExecutionResult) *RunTestChatExecutionResponse { + this := RunTestChatExecutionResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewRunTestChatExecutionResponseWithDefaults instantiates a new RunTestChatExecutionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestChatExecutionResponseWithDefaults() *RunTestChatExecutionResponse { + this := RunTestChatExecutionResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RunTestChatExecutionResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestChatExecutionResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RunTestChatExecutionResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *RunTestChatExecutionResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *RunTestChatExecutionResponse) GetResult() RunTestChatExecutionResult { + if o == nil { + var ret RunTestChatExecutionResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *RunTestChatExecutionResponse) GetResultOk() (*RunTestChatExecutionResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *RunTestChatExecutionResponse) SetResult(v RunTestChatExecutionResult) { + o.Result = v +} + +func (o RunTestChatExecutionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestChatExecutionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *RunTestChatExecutionResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunTestChatExecutionResponse := _RunTestChatExecutionResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunTestChatExecutionResponse) + + if err != nil { + return err + } + + *o = RunTestChatExecutionResponse(varRunTestChatExecutionResponse) + + return err +} + +type NullableRunTestChatExecutionResponse struct { + value *RunTestChatExecutionResponse + isSet bool +} + +func (v NullableRunTestChatExecutionResponse) Get() *RunTestChatExecutionResponse { + return v.value +} + +func (v *NullableRunTestChatExecutionResponse) Set(val *RunTestChatExecutionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestChatExecutionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestChatExecutionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestChatExecutionResponse(val *RunTestChatExecutionResponse) *NullableRunTestChatExecutionResponse { + return &NullableRunTestChatExecutionResponse{value: val, isSet: true} +} + +func (v NullableRunTestChatExecutionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestChatExecutionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_chat_execution_result.go b/go/futureagi/model_run_test_chat_execution_result.go new file mode 100644 index 0000000..c3bc2c3 --- /dev/null +++ b/go/futureagi/model_run_test_chat_execution_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunTestChatExecutionResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestChatExecutionResult{} + +// RunTestChatExecutionResult struct for RunTestChatExecutionResult +type RunTestChatExecutionResult struct { + Message string `json:"message"` + ExecutionId string `json:"execution_id"` + RunTestId string `json:"run_test_id"` + Status string `json:"status"` + TotalScenarios []string `json:"total_scenarios"` +} + +type _RunTestChatExecutionResult RunTestChatExecutionResult + +// NewRunTestChatExecutionResult instantiates a new RunTestChatExecutionResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestChatExecutionResult(message string, executionId string, runTestId string, status string, totalScenarios []string) *RunTestChatExecutionResult { + this := RunTestChatExecutionResult{} + this.Message = message + this.ExecutionId = executionId + this.RunTestId = runTestId + this.Status = status + this.TotalScenarios = totalScenarios + return &this +} + +// NewRunTestChatExecutionResultWithDefaults instantiates a new RunTestChatExecutionResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestChatExecutionResultWithDefaults() *RunTestChatExecutionResult { + this := RunTestChatExecutionResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *RunTestChatExecutionResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *RunTestChatExecutionResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *RunTestChatExecutionResult) SetMessage(v string) { + o.Message = v +} + +// GetExecutionId returns the ExecutionId field value +func (o *RunTestChatExecutionResult) GetExecutionId() string { + if o == nil { + var ret string + return ret + } + + return o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value +// and a boolean to check if the value has been set. +func (o *RunTestChatExecutionResult) GetExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionId, true +} + +// SetExecutionId sets field value +func (o *RunTestChatExecutionResult) SetExecutionId(v string) { + o.ExecutionId = v +} + +// GetRunTestId returns the RunTestId field value +func (o *RunTestChatExecutionResult) GetRunTestId() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value +// and a boolean to check if the value has been set. +func (o *RunTestChatExecutionResult) GetRunTestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestId, true +} + +// SetRunTestId sets field value +func (o *RunTestChatExecutionResult) SetRunTestId(v string) { + o.RunTestId = v +} + +// GetStatus returns the Status field value +func (o *RunTestChatExecutionResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *RunTestChatExecutionResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *RunTestChatExecutionResult) SetStatus(v string) { + o.Status = v +} + +// GetTotalScenarios returns the TotalScenarios field value +func (o *RunTestChatExecutionResult) GetTotalScenarios() []string { + if o == nil { + var ret []string + return ret + } + + return o.TotalScenarios +} + +// GetTotalScenariosOk returns a tuple with the TotalScenarios field value +// and a boolean to check if the value has been set. +func (o *RunTestChatExecutionResult) GetTotalScenariosOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.TotalScenarios, true +} + +// SetTotalScenarios sets field value +func (o *RunTestChatExecutionResult) SetTotalScenarios(v []string) { + o.TotalScenarios = v +} + +func (o RunTestChatExecutionResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestChatExecutionResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["execution_id"] = o.ExecutionId + toSerialize["run_test_id"] = o.RunTestId + toSerialize["status"] = o.Status + toSerialize["total_scenarios"] = o.TotalScenarios + return toSerialize, nil +} + +func (o *RunTestChatExecutionResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "execution_id", + "run_test_id", + "status", + "total_scenarios", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunTestChatExecutionResult := _RunTestChatExecutionResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunTestChatExecutionResult) + + if err != nil { + return err + } + + *o = RunTestChatExecutionResult(varRunTestChatExecutionResult) + + return err +} + +type NullableRunTestChatExecutionResult struct { + value *RunTestChatExecutionResult + isSet bool +} + +func (v NullableRunTestChatExecutionResult) Get() *RunTestChatExecutionResult { + return v.value +} + +func (v *NullableRunTestChatExecutionResult) Set(val *RunTestChatExecutionResult) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestChatExecutionResult) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestChatExecutionResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestChatExecutionResult(val *RunTestChatExecutionResult) *NullableRunTestChatExecutionResult { + return &NullableRunTestChatExecutionResult{value: val, isSet: true} +} + +func (v NullableRunTestChatExecutionResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestChatExecutionResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_components_update.go b/go/futureagi/model_run_test_components_update.go new file mode 100644 index 0000000..83d53c7 --- /dev/null +++ b/go/futureagi/model_run_test_components_update.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the RunTestComponentsUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestComponentsUpdate{} + +// RunTestComponentsUpdate struct for RunTestComponentsUpdate +type RunTestComponentsUpdate struct { + AgentDefinitionId *string `json:"agent_definition_id,omitempty"` + Version *string `json:"version,omitempty"` + SimulatorAgentId *string `json:"simulator_agent_id,omitempty"` + Scenarios []string `json:"scenarios,omitempty"` + EnableToolEvaluation *bool `json:"enable_tool_evaluation,omitempty"` +} + +// NewRunTestComponentsUpdate instantiates a new RunTestComponentsUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestComponentsUpdate() *RunTestComponentsUpdate { + this := RunTestComponentsUpdate{} + return &this +} + +// NewRunTestComponentsUpdateWithDefaults instantiates a new RunTestComponentsUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestComponentsUpdateWithDefaults() *RunTestComponentsUpdate { + this := RunTestComponentsUpdate{} + return &this +} + +// GetAgentDefinitionId returns the AgentDefinitionId field value if set, zero value otherwise. +func (o *RunTestComponentsUpdate) GetAgentDefinitionId() string { + if o == nil || IsNil(o.AgentDefinitionId) { + var ret string + return ret + } + return *o.AgentDefinitionId +} + +// GetAgentDefinitionIdOk returns a tuple with the AgentDefinitionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestComponentsUpdate) GetAgentDefinitionIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionId) { + return nil, false + } + return o.AgentDefinitionId, true +} + +// HasAgentDefinitionId returns a boolean if a field has been set. +func (o *RunTestComponentsUpdate) HasAgentDefinitionId() bool { + if o != nil && !IsNil(o.AgentDefinitionId) { + return true + } + + return false +} + +// SetAgentDefinitionId gets a reference to the given string and assigns it to the AgentDefinitionId field. +func (o *RunTestComponentsUpdate) SetAgentDefinitionId(v string) { + o.AgentDefinitionId = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *RunTestComponentsUpdate) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestComponentsUpdate) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *RunTestComponentsUpdate) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *RunTestComponentsUpdate) SetVersion(v string) { + o.Version = &v +} + +// GetSimulatorAgentId returns the SimulatorAgentId field value if set, zero value otherwise. +func (o *RunTestComponentsUpdate) GetSimulatorAgentId() string { + if o == nil || IsNil(o.SimulatorAgentId) { + var ret string + return ret + } + return *o.SimulatorAgentId +} + +// GetSimulatorAgentIdOk returns a tuple with the SimulatorAgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestComponentsUpdate) GetSimulatorAgentIdOk() (*string, bool) { + if o == nil || IsNil(o.SimulatorAgentId) { + return nil, false + } + return o.SimulatorAgentId, true +} + +// HasSimulatorAgentId returns a boolean if a field has been set. +func (o *RunTestComponentsUpdate) HasSimulatorAgentId() bool { + if o != nil && !IsNil(o.SimulatorAgentId) { + return true + } + + return false +} + +// SetSimulatorAgentId gets a reference to the given string and assigns it to the SimulatorAgentId field. +func (o *RunTestComponentsUpdate) SetSimulatorAgentId(v string) { + o.SimulatorAgentId = &v +} + +// GetScenarios returns the Scenarios field value if set, zero value otherwise. +func (o *RunTestComponentsUpdate) GetScenarios() []string { + if o == nil || IsNil(o.Scenarios) { + var ret []string + return ret + } + return o.Scenarios +} + +// GetScenariosOk returns a tuple with the Scenarios field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestComponentsUpdate) GetScenariosOk() ([]string, bool) { + if o == nil || IsNil(o.Scenarios) { + return nil, false + } + return o.Scenarios, true +} + +// HasScenarios returns a boolean if a field has been set. +func (o *RunTestComponentsUpdate) HasScenarios() bool { + if o != nil && !IsNil(o.Scenarios) { + return true + } + + return false +} + +// SetScenarios gets a reference to the given []string and assigns it to the Scenarios field. +func (o *RunTestComponentsUpdate) SetScenarios(v []string) { + o.Scenarios = v +} + +// GetEnableToolEvaluation returns the EnableToolEvaluation field value if set, zero value otherwise. +func (o *RunTestComponentsUpdate) GetEnableToolEvaluation() bool { + if o == nil || IsNil(o.EnableToolEvaluation) { + var ret bool + return ret + } + return *o.EnableToolEvaluation +} + +// GetEnableToolEvaluationOk returns a tuple with the EnableToolEvaluation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestComponentsUpdate) GetEnableToolEvaluationOk() (*bool, bool) { + if o == nil || IsNil(o.EnableToolEvaluation) { + return nil, false + } + return o.EnableToolEvaluation, true +} + +// HasEnableToolEvaluation returns a boolean if a field has been set. +func (o *RunTestComponentsUpdate) HasEnableToolEvaluation() bool { + if o != nil && !IsNil(o.EnableToolEvaluation) { + return true + } + + return false +} + +// SetEnableToolEvaluation gets a reference to the given bool and assigns it to the EnableToolEvaluation field. +func (o *RunTestComponentsUpdate) SetEnableToolEvaluation(v bool) { + o.EnableToolEvaluation = &v +} + +func (o RunTestComponentsUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestComponentsUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AgentDefinitionId) { + toSerialize["agent_definition_id"] = o.AgentDefinitionId + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.SimulatorAgentId) { + toSerialize["simulator_agent_id"] = o.SimulatorAgentId + } + if !IsNil(o.Scenarios) { + toSerialize["scenarios"] = o.Scenarios + } + if !IsNil(o.EnableToolEvaluation) { + toSerialize["enable_tool_evaluation"] = o.EnableToolEvaluation + } + return toSerialize, nil +} + +type NullableRunTestComponentsUpdate struct { + value *RunTestComponentsUpdate + isSet bool +} + +func (v NullableRunTestComponentsUpdate) Get() *RunTestComponentsUpdate { + return v.value +} + +func (v *NullableRunTestComponentsUpdate) Set(val *RunTestComponentsUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestComponentsUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestComponentsUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestComponentsUpdate(val *RunTestComponentsUpdate) *NullableRunTestComponentsUpdate { + return &NullableRunTestComponentsUpdate{value: val, isSet: true} +} + +func (v NullableRunTestComponentsUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestComponentsUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_error_response.go b/go/futureagi/model_run_test_error_response.go new file mode 100644 index 0000000..58286b4 --- /dev/null +++ b/go/futureagi/model_run_test_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the RunTestErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestErrorResponse{} + +// RunTestErrorResponse struct for RunTestErrorResponse +type RunTestErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewRunTestErrorResponse instantiates a new RunTestErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestErrorResponse() *RunTestErrorResponse { + this := RunTestErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewRunTestErrorResponseWithDefaults instantiates a new RunTestErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestErrorResponseWithDefaults() *RunTestErrorResponse { + this := RunTestErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RunTestErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *RunTestErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *RunTestErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *RunTestErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *RunTestErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *RunTestErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *RunTestErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *RunTestErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *RunTestErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *RunTestErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *RunTestErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *RunTestErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *RunTestErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *RunTestErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *RunTestErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *RunTestErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *RunTestErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *RunTestErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *RunTestErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *RunTestErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *RunTestErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *RunTestErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *RunTestErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *RunTestErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *RunTestErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *RunTestErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o RunTestErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableRunTestErrorResponse struct { + value *RunTestErrorResponse + isSet bool +} + +func (v NullableRunTestErrorResponse) Get() *RunTestErrorResponse { + return v.value +} + +func (v *NullableRunTestErrorResponse) Set(val *RunTestErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestErrorResponse(val *RunTestErrorResponse) *NullableRunTestErrorResponse { + return &NullableRunTestErrorResponse{value: val, isSet: true} +} + +func (v NullableRunTestErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_execution_response.go b/go/futureagi/model_run_test_execution_response.go new file mode 100644 index 0000000..2d047e4 --- /dev/null +++ b/go/futureagi/model_run_test_execution_response.go @@ -0,0 +1,341 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the RunTestExecutionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestExecutionResponse{} + +// RunTestExecutionResponse struct for RunTestExecutionResponse +type RunTestExecutionResponse struct { + Message *string `json:"message,omitempty"` + ExecutionId *string `json:"execution_id,omitempty"` + RunTestId *string `json:"run_test_id,omitempty"` + Status *string `json:"status,omitempty"` + TotalScenarios *int32 `json:"total_scenarios,omitempty"` + TotalCalls *int32 `json:"total_calls,omitempty"` + ScenarioIds []string `json:"scenario_ids,omitempty"` +} + +// NewRunTestExecutionResponse instantiates a new RunTestExecutionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestExecutionResponse() *RunTestExecutionResponse { + this := RunTestExecutionResponse{} + return &this +} + +// NewRunTestExecutionResponseWithDefaults instantiates a new RunTestExecutionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestExecutionResponseWithDefaults() *RunTestExecutionResponse { + this := RunTestExecutionResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *RunTestExecutionResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestExecutionResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *RunTestExecutionResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *RunTestExecutionResponse) SetMessage(v string) { + o.Message = &v +} + +// GetExecutionId returns the ExecutionId field value if set, zero value otherwise. +func (o *RunTestExecutionResponse) GetExecutionId() string { + if o == nil || IsNil(o.ExecutionId) { + var ret string + return ret + } + return *o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestExecutionResponse) GetExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionId) { + return nil, false + } + return o.ExecutionId, true +} + +// HasExecutionId returns a boolean if a field has been set. +func (o *RunTestExecutionResponse) HasExecutionId() bool { + if o != nil && !IsNil(o.ExecutionId) { + return true + } + + return false +} + +// SetExecutionId gets a reference to the given string and assigns it to the ExecutionId field. +func (o *RunTestExecutionResponse) SetExecutionId(v string) { + o.ExecutionId = &v +} + +// GetRunTestId returns the RunTestId field value if set, zero value otherwise. +func (o *RunTestExecutionResponse) GetRunTestId() string { + if o == nil || IsNil(o.RunTestId) { + var ret string + return ret + } + return *o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestExecutionResponse) GetRunTestIdOk() (*string, bool) { + if o == nil || IsNil(o.RunTestId) { + return nil, false + } + return o.RunTestId, true +} + +// HasRunTestId returns a boolean if a field has been set. +func (o *RunTestExecutionResponse) HasRunTestId() bool { + if o != nil && !IsNil(o.RunTestId) { + return true + } + + return false +} + +// SetRunTestId gets a reference to the given string and assigns it to the RunTestId field. +func (o *RunTestExecutionResponse) SetRunTestId(v string) { + o.RunTestId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RunTestExecutionResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestExecutionResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RunTestExecutionResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *RunTestExecutionResponse) SetStatus(v string) { + o.Status = &v +} + +// GetTotalScenarios returns the TotalScenarios field value if set, zero value otherwise. +func (o *RunTestExecutionResponse) GetTotalScenarios() int32 { + if o == nil || IsNil(o.TotalScenarios) { + var ret int32 + return ret + } + return *o.TotalScenarios +} + +// GetTotalScenariosOk returns a tuple with the TotalScenarios field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestExecutionResponse) GetTotalScenariosOk() (*int32, bool) { + if o == nil || IsNil(o.TotalScenarios) { + return nil, false + } + return o.TotalScenarios, true +} + +// HasTotalScenarios returns a boolean if a field has been set. +func (o *RunTestExecutionResponse) HasTotalScenarios() bool { + if o != nil && !IsNil(o.TotalScenarios) { + return true + } + + return false +} + +// SetTotalScenarios gets a reference to the given int32 and assigns it to the TotalScenarios field. +func (o *RunTestExecutionResponse) SetTotalScenarios(v int32) { + o.TotalScenarios = &v +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *RunTestExecutionResponse) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestExecutionResponse) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *RunTestExecutionResponse) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *RunTestExecutionResponse) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetScenarioIds returns the ScenarioIds field value if set, zero value otherwise. +func (o *RunTestExecutionResponse) GetScenarioIds() []string { + if o == nil || IsNil(o.ScenarioIds) { + var ret []string + return ret + } + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestExecutionResponse) GetScenarioIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ScenarioIds) { + return nil, false + } + return o.ScenarioIds, true +} + +// HasScenarioIds returns a boolean if a field has been set. +func (o *RunTestExecutionResponse) HasScenarioIds() bool { + if o != nil && !IsNil(o.ScenarioIds) { + return true + } + + return false +} + +// SetScenarioIds gets a reference to the given []string and assigns it to the ScenarioIds field. +func (o *RunTestExecutionResponse) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +func (o RunTestExecutionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestExecutionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.ExecutionId) { + toSerialize["execution_id"] = o.ExecutionId + } + if !IsNil(o.RunTestId) { + toSerialize["run_test_id"] = o.RunTestId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.TotalScenarios) { + toSerialize["total_scenarios"] = o.TotalScenarios + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.ScenarioIds) { + toSerialize["scenario_ids"] = o.ScenarioIds + } + return toSerialize, nil +} + +type NullableRunTestExecutionResponse struct { + value *RunTestExecutionResponse + isSet bool +} + +func (v NullableRunTestExecutionResponse) Get() *RunTestExecutionResponse { + return v.value +} + +func (v *NullableRunTestExecutionResponse) Set(val *RunTestExecutionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestExecutionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestExecutionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestExecutionResponse(val *RunTestExecutionResponse) *NullableRunTestExecutionResponse { + return &NullableRunTestExecutionResponse{value: val, isSet: true} +} + +func (v NullableRunTestExecutionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestExecutionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_kpis_response.go b/go/futureagi/model_run_test_kpis_response.go new file mode 100644 index 0000000..5ca2d6e --- /dev/null +++ b/go/futureagi/model_run_test_kpis_response.go @@ -0,0 +1,1108 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the RunTestKPIsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestKPIsResponse{} + +// RunTestKPIsResponse struct for RunTestKPIsResponse +type RunTestKPIsResponse struct { + TotalCalls *int32 `json:"total_calls,omitempty"` + AvgScore *float32 `json:"avg_score,omitempty"` + AvgResponse *float32 `json:"avg_response,omitempty"` + CallsAttempted *int32 `json:"calls_attempted,omitempty"` + ConnectedCalls *int32 `json:"connected_calls,omitempty"` + CallsConnectedPercentage *float32 `json:"calls_connected_percentage,omitempty"` + ScenarioGraphs *map[string]map[string]map[string]interface{} `json:"scenario_graphs,omitempty"` + AgentType *string `json:"agent_type,omitempty"` + IsInbound NullableBool `json:"is_inbound,omitempty"` + AvgAgentLatency *float32 `json:"avg_agent_latency,omitempty"` + AvgUserInterruptionCount *float32 `json:"avg_user_interruption_count,omitempty"` + AvgUserInterruptionRate *float32 `json:"avg_user_interruption_rate,omitempty"` + AvgUserWpm *float32 `json:"avg_user_wpm,omitempty"` + AvgBotWpm *float32 `json:"avg_bot_wpm,omitempty"` + AvgTalkRatio *float32 `json:"avg_talk_ratio,omitempty"` + AvgAiInterruptionCount *float32 `json:"avg_ai_interruption_count,omitempty"` + AvgAiInterruptionRate *float32 `json:"avg_ai_interruption_rate,omitempty"` + AvgStopTimeAfterInterruption *float32 `json:"avg_stop_time_after_interruption,omitempty"` + AgentTalkPercentage *float32 `json:"agent_talk_percentage,omitempty"` + CustomerTalkPercentage *float32 `json:"customer_talk_percentage,omitempty"` + AvgTotalTokens *float32 `json:"avg_total_tokens,omitempty"` + AvgInputTokens *float32 `json:"avg_input_tokens,omitempty"` + AvgOutputTokens *float32 `json:"avg_output_tokens,omitempty"` + AvgChatLatencyMs *float32 `json:"avg_chat_latency_ms,omitempty"` + AvgTurnCount *float32 `json:"avg_turn_count,omitempty"` + AvgCsatScore *float32 `json:"avg_csat_score,omitempty"` + FailedCalls *int32 `json:"failed_calls,omitempty"` + TotalDuration *float32 `json:"total_duration,omitempty"` +} + +// NewRunTestKPIsResponse instantiates a new RunTestKPIsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestKPIsResponse() *RunTestKPIsResponse { + this := RunTestKPIsResponse{} + return &this +} + +// NewRunTestKPIsResponseWithDefaults instantiates a new RunTestKPIsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestKPIsResponseWithDefaults() *RunTestKPIsResponse { + this := RunTestKPIsResponse{} + return &this +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *RunTestKPIsResponse) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetAvgScore returns the AvgScore field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgScore() float32 { + if o == nil || IsNil(o.AvgScore) { + var ret float32 + return ret + } + return *o.AvgScore +} + +// GetAvgScoreOk returns a tuple with the AvgScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgScoreOk() (*float32, bool) { + if o == nil || IsNil(o.AvgScore) { + return nil, false + } + return o.AvgScore, true +} + +// HasAvgScore returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgScore() bool { + if o != nil && !IsNil(o.AvgScore) { + return true + } + + return false +} + +// SetAvgScore gets a reference to the given float32 and assigns it to the AvgScore field. +func (o *RunTestKPIsResponse) SetAvgScore(v float32) { + o.AvgScore = &v +} + +// GetAvgResponse returns the AvgResponse field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgResponse() float32 { + if o == nil || IsNil(o.AvgResponse) { + var ret float32 + return ret + } + return *o.AvgResponse +} + +// GetAvgResponseOk returns a tuple with the AvgResponse field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgResponseOk() (*float32, bool) { + if o == nil || IsNil(o.AvgResponse) { + return nil, false + } + return o.AvgResponse, true +} + +// HasAvgResponse returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgResponse() bool { + if o != nil && !IsNil(o.AvgResponse) { + return true + } + + return false +} + +// SetAvgResponse gets a reference to the given float32 and assigns it to the AvgResponse field. +func (o *RunTestKPIsResponse) SetAvgResponse(v float32) { + o.AvgResponse = &v +} + +// GetCallsAttempted returns the CallsAttempted field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetCallsAttempted() int32 { + if o == nil || IsNil(o.CallsAttempted) { + var ret int32 + return ret + } + return *o.CallsAttempted +} + +// GetCallsAttemptedOk returns a tuple with the CallsAttempted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetCallsAttemptedOk() (*int32, bool) { + if o == nil || IsNil(o.CallsAttempted) { + return nil, false + } + return o.CallsAttempted, true +} + +// HasCallsAttempted returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasCallsAttempted() bool { + if o != nil && !IsNil(o.CallsAttempted) { + return true + } + + return false +} + +// SetCallsAttempted gets a reference to the given int32 and assigns it to the CallsAttempted field. +func (o *RunTestKPIsResponse) SetCallsAttempted(v int32) { + o.CallsAttempted = &v +} + +// GetConnectedCalls returns the ConnectedCalls field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetConnectedCalls() int32 { + if o == nil || IsNil(o.ConnectedCalls) { + var ret int32 + return ret + } + return *o.ConnectedCalls +} + +// GetConnectedCallsOk returns a tuple with the ConnectedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetConnectedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.ConnectedCalls) { + return nil, false + } + return o.ConnectedCalls, true +} + +// HasConnectedCalls returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasConnectedCalls() bool { + if o != nil && !IsNil(o.ConnectedCalls) { + return true + } + + return false +} + +// SetConnectedCalls gets a reference to the given int32 and assigns it to the ConnectedCalls field. +func (o *RunTestKPIsResponse) SetConnectedCalls(v int32) { + o.ConnectedCalls = &v +} + +// GetCallsConnectedPercentage returns the CallsConnectedPercentage field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetCallsConnectedPercentage() float32 { + if o == nil || IsNil(o.CallsConnectedPercentage) { + var ret float32 + return ret + } + return *o.CallsConnectedPercentage +} + +// GetCallsConnectedPercentageOk returns a tuple with the CallsConnectedPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetCallsConnectedPercentageOk() (*float32, bool) { + if o == nil || IsNil(o.CallsConnectedPercentage) { + return nil, false + } + return o.CallsConnectedPercentage, true +} + +// HasCallsConnectedPercentage returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasCallsConnectedPercentage() bool { + if o != nil && !IsNil(o.CallsConnectedPercentage) { + return true + } + + return false +} + +// SetCallsConnectedPercentage gets a reference to the given float32 and assigns it to the CallsConnectedPercentage field. +func (o *RunTestKPIsResponse) SetCallsConnectedPercentage(v float32) { + o.CallsConnectedPercentage = &v +} + +// GetScenarioGraphs returns the ScenarioGraphs field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetScenarioGraphs() map[string]map[string]map[string]interface{} { + if o == nil || IsNil(o.ScenarioGraphs) { + var ret map[string]map[string]map[string]interface{} + return ret + } + return *o.ScenarioGraphs +} + +// GetScenarioGraphsOk returns a tuple with the ScenarioGraphs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetScenarioGraphsOk() (*map[string]map[string]map[string]interface{}, bool) { + if o == nil || IsNil(o.ScenarioGraphs) { + return nil, false + } + return o.ScenarioGraphs, true +} + +// HasScenarioGraphs returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasScenarioGraphs() bool { + if o != nil && !IsNil(o.ScenarioGraphs) { + return true + } + + return false +} + +// SetScenarioGraphs gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the ScenarioGraphs field. +func (o *RunTestKPIsResponse) SetScenarioGraphs(v map[string]map[string]map[string]interface{}) { + o.ScenarioGraphs = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *RunTestKPIsResponse) SetAgentType(v string) { + o.AgentType = &v +} + +// GetIsInbound returns the IsInbound field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestKPIsResponse) GetIsInbound() bool { + if o == nil || IsNil(o.IsInbound.Get()) { + var ret bool + return ret + } + return *o.IsInbound.Get() +} + +// GetIsInboundOk returns a tuple with the IsInbound field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestKPIsResponse) GetIsInboundOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsInbound.Get(), o.IsInbound.IsSet() +} + +// HasIsInbound returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasIsInbound() bool { + if o != nil && o.IsInbound.IsSet() { + return true + } + + return false +} + +// SetIsInbound gets a reference to the given NullableBool and assigns it to the IsInbound field. +func (o *RunTestKPIsResponse) SetIsInbound(v bool) { + o.IsInbound.Set(&v) +} + +// SetIsInboundNil sets the value for IsInbound to be an explicit nil +func (o *RunTestKPIsResponse) SetIsInboundNil() { + o.IsInbound.Set(nil) +} + +// UnsetIsInbound ensures that no value is present for IsInbound, not even an explicit nil +func (o *RunTestKPIsResponse) UnsetIsInbound() { + o.IsInbound.Unset() +} + +// GetAvgAgentLatency returns the AvgAgentLatency field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgAgentLatency() float32 { + if o == nil || IsNil(o.AvgAgentLatency) { + var ret float32 + return ret + } + return *o.AvgAgentLatency +} + +// GetAvgAgentLatencyOk returns a tuple with the AvgAgentLatency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgAgentLatencyOk() (*float32, bool) { + if o == nil || IsNil(o.AvgAgentLatency) { + return nil, false + } + return o.AvgAgentLatency, true +} + +// HasAvgAgentLatency returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgAgentLatency() bool { + if o != nil && !IsNil(o.AvgAgentLatency) { + return true + } + + return false +} + +// SetAvgAgentLatency gets a reference to the given float32 and assigns it to the AvgAgentLatency field. +func (o *RunTestKPIsResponse) SetAvgAgentLatency(v float32) { + o.AvgAgentLatency = &v +} + +// GetAvgUserInterruptionCount returns the AvgUserInterruptionCount field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgUserInterruptionCount() float32 { + if o == nil || IsNil(o.AvgUserInterruptionCount) { + var ret float32 + return ret + } + return *o.AvgUserInterruptionCount +} + +// GetAvgUserInterruptionCountOk returns a tuple with the AvgUserInterruptionCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgUserInterruptionCountOk() (*float32, bool) { + if o == nil || IsNil(o.AvgUserInterruptionCount) { + return nil, false + } + return o.AvgUserInterruptionCount, true +} + +// HasAvgUserInterruptionCount returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgUserInterruptionCount() bool { + if o != nil && !IsNil(o.AvgUserInterruptionCount) { + return true + } + + return false +} + +// SetAvgUserInterruptionCount gets a reference to the given float32 and assigns it to the AvgUserInterruptionCount field. +func (o *RunTestKPIsResponse) SetAvgUserInterruptionCount(v float32) { + o.AvgUserInterruptionCount = &v +} + +// GetAvgUserInterruptionRate returns the AvgUserInterruptionRate field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgUserInterruptionRate() float32 { + if o == nil || IsNil(o.AvgUserInterruptionRate) { + var ret float32 + return ret + } + return *o.AvgUserInterruptionRate +} + +// GetAvgUserInterruptionRateOk returns a tuple with the AvgUserInterruptionRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgUserInterruptionRateOk() (*float32, bool) { + if o == nil || IsNil(o.AvgUserInterruptionRate) { + return nil, false + } + return o.AvgUserInterruptionRate, true +} + +// HasAvgUserInterruptionRate returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgUserInterruptionRate() bool { + if o != nil && !IsNil(o.AvgUserInterruptionRate) { + return true + } + + return false +} + +// SetAvgUserInterruptionRate gets a reference to the given float32 and assigns it to the AvgUserInterruptionRate field. +func (o *RunTestKPIsResponse) SetAvgUserInterruptionRate(v float32) { + o.AvgUserInterruptionRate = &v +} + +// GetAvgUserWpm returns the AvgUserWpm field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgUserWpm() float32 { + if o == nil || IsNil(o.AvgUserWpm) { + var ret float32 + return ret + } + return *o.AvgUserWpm +} + +// GetAvgUserWpmOk returns a tuple with the AvgUserWpm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgUserWpmOk() (*float32, bool) { + if o == nil || IsNil(o.AvgUserWpm) { + return nil, false + } + return o.AvgUserWpm, true +} + +// HasAvgUserWpm returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgUserWpm() bool { + if o != nil && !IsNil(o.AvgUserWpm) { + return true + } + + return false +} + +// SetAvgUserWpm gets a reference to the given float32 and assigns it to the AvgUserWpm field. +func (o *RunTestKPIsResponse) SetAvgUserWpm(v float32) { + o.AvgUserWpm = &v +} + +// GetAvgBotWpm returns the AvgBotWpm field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgBotWpm() float32 { + if o == nil || IsNil(o.AvgBotWpm) { + var ret float32 + return ret + } + return *o.AvgBotWpm +} + +// GetAvgBotWpmOk returns a tuple with the AvgBotWpm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgBotWpmOk() (*float32, bool) { + if o == nil || IsNil(o.AvgBotWpm) { + return nil, false + } + return o.AvgBotWpm, true +} + +// HasAvgBotWpm returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgBotWpm() bool { + if o != nil && !IsNil(o.AvgBotWpm) { + return true + } + + return false +} + +// SetAvgBotWpm gets a reference to the given float32 and assigns it to the AvgBotWpm field. +func (o *RunTestKPIsResponse) SetAvgBotWpm(v float32) { + o.AvgBotWpm = &v +} + +// GetAvgTalkRatio returns the AvgTalkRatio field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgTalkRatio() float32 { + if o == nil || IsNil(o.AvgTalkRatio) { + var ret float32 + return ret + } + return *o.AvgTalkRatio +} + +// GetAvgTalkRatioOk returns a tuple with the AvgTalkRatio field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgTalkRatioOk() (*float32, bool) { + if o == nil || IsNil(o.AvgTalkRatio) { + return nil, false + } + return o.AvgTalkRatio, true +} + +// HasAvgTalkRatio returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgTalkRatio() bool { + if o != nil && !IsNil(o.AvgTalkRatio) { + return true + } + + return false +} + +// SetAvgTalkRatio gets a reference to the given float32 and assigns it to the AvgTalkRatio field. +func (o *RunTestKPIsResponse) SetAvgTalkRatio(v float32) { + o.AvgTalkRatio = &v +} + +// GetAvgAiInterruptionCount returns the AvgAiInterruptionCount field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgAiInterruptionCount() float32 { + if o == nil || IsNil(o.AvgAiInterruptionCount) { + var ret float32 + return ret + } + return *o.AvgAiInterruptionCount +} + +// GetAvgAiInterruptionCountOk returns a tuple with the AvgAiInterruptionCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgAiInterruptionCountOk() (*float32, bool) { + if o == nil || IsNil(o.AvgAiInterruptionCount) { + return nil, false + } + return o.AvgAiInterruptionCount, true +} + +// HasAvgAiInterruptionCount returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgAiInterruptionCount() bool { + if o != nil && !IsNil(o.AvgAiInterruptionCount) { + return true + } + + return false +} + +// SetAvgAiInterruptionCount gets a reference to the given float32 and assigns it to the AvgAiInterruptionCount field. +func (o *RunTestKPIsResponse) SetAvgAiInterruptionCount(v float32) { + o.AvgAiInterruptionCount = &v +} + +// GetAvgAiInterruptionRate returns the AvgAiInterruptionRate field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgAiInterruptionRate() float32 { + if o == nil || IsNil(o.AvgAiInterruptionRate) { + var ret float32 + return ret + } + return *o.AvgAiInterruptionRate +} + +// GetAvgAiInterruptionRateOk returns a tuple with the AvgAiInterruptionRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgAiInterruptionRateOk() (*float32, bool) { + if o == nil || IsNil(o.AvgAiInterruptionRate) { + return nil, false + } + return o.AvgAiInterruptionRate, true +} + +// HasAvgAiInterruptionRate returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgAiInterruptionRate() bool { + if o != nil && !IsNil(o.AvgAiInterruptionRate) { + return true + } + + return false +} + +// SetAvgAiInterruptionRate gets a reference to the given float32 and assigns it to the AvgAiInterruptionRate field. +func (o *RunTestKPIsResponse) SetAvgAiInterruptionRate(v float32) { + o.AvgAiInterruptionRate = &v +} + +// GetAvgStopTimeAfterInterruption returns the AvgStopTimeAfterInterruption field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgStopTimeAfterInterruption() float32 { + if o == nil || IsNil(o.AvgStopTimeAfterInterruption) { + var ret float32 + return ret + } + return *o.AvgStopTimeAfterInterruption +} + +// GetAvgStopTimeAfterInterruptionOk returns a tuple with the AvgStopTimeAfterInterruption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgStopTimeAfterInterruptionOk() (*float32, bool) { + if o == nil || IsNil(o.AvgStopTimeAfterInterruption) { + return nil, false + } + return o.AvgStopTimeAfterInterruption, true +} + +// HasAvgStopTimeAfterInterruption returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgStopTimeAfterInterruption() bool { + if o != nil && !IsNil(o.AvgStopTimeAfterInterruption) { + return true + } + + return false +} + +// SetAvgStopTimeAfterInterruption gets a reference to the given float32 and assigns it to the AvgStopTimeAfterInterruption field. +func (o *RunTestKPIsResponse) SetAvgStopTimeAfterInterruption(v float32) { + o.AvgStopTimeAfterInterruption = &v +} + +// GetAgentTalkPercentage returns the AgentTalkPercentage field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAgentTalkPercentage() float32 { + if o == nil || IsNil(o.AgentTalkPercentage) { + var ret float32 + return ret + } + return *o.AgentTalkPercentage +} + +// GetAgentTalkPercentageOk returns a tuple with the AgentTalkPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAgentTalkPercentageOk() (*float32, bool) { + if o == nil || IsNil(o.AgentTalkPercentage) { + return nil, false + } + return o.AgentTalkPercentage, true +} + +// HasAgentTalkPercentage returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAgentTalkPercentage() bool { + if o != nil && !IsNil(o.AgentTalkPercentage) { + return true + } + + return false +} + +// SetAgentTalkPercentage gets a reference to the given float32 and assigns it to the AgentTalkPercentage field. +func (o *RunTestKPIsResponse) SetAgentTalkPercentage(v float32) { + o.AgentTalkPercentage = &v +} + +// GetCustomerTalkPercentage returns the CustomerTalkPercentage field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetCustomerTalkPercentage() float32 { + if o == nil || IsNil(o.CustomerTalkPercentage) { + var ret float32 + return ret + } + return *o.CustomerTalkPercentage +} + +// GetCustomerTalkPercentageOk returns a tuple with the CustomerTalkPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetCustomerTalkPercentageOk() (*float32, bool) { + if o == nil || IsNil(o.CustomerTalkPercentage) { + return nil, false + } + return o.CustomerTalkPercentage, true +} + +// HasCustomerTalkPercentage returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasCustomerTalkPercentage() bool { + if o != nil && !IsNil(o.CustomerTalkPercentage) { + return true + } + + return false +} + +// SetCustomerTalkPercentage gets a reference to the given float32 and assigns it to the CustomerTalkPercentage field. +func (o *RunTestKPIsResponse) SetCustomerTalkPercentage(v float32) { + o.CustomerTalkPercentage = &v +} + +// GetAvgTotalTokens returns the AvgTotalTokens field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgTotalTokens() float32 { + if o == nil || IsNil(o.AvgTotalTokens) { + var ret float32 + return ret + } + return *o.AvgTotalTokens +} + +// GetAvgTotalTokensOk returns a tuple with the AvgTotalTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgTotalTokensOk() (*float32, bool) { + if o == nil || IsNil(o.AvgTotalTokens) { + return nil, false + } + return o.AvgTotalTokens, true +} + +// HasAvgTotalTokens returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgTotalTokens() bool { + if o != nil && !IsNil(o.AvgTotalTokens) { + return true + } + + return false +} + +// SetAvgTotalTokens gets a reference to the given float32 and assigns it to the AvgTotalTokens field. +func (o *RunTestKPIsResponse) SetAvgTotalTokens(v float32) { + o.AvgTotalTokens = &v +} + +// GetAvgInputTokens returns the AvgInputTokens field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgInputTokens() float32 { + if o == nil || IsNil(o.AvgInputTokens) { + var ret float32 + return ret + } + return *o.AvgInputTokens +} + +// GetAvgInputTokensOk returns a tuple with the AvgInputTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgInputTokensOk() (*float32, bool) { + if o == nil || IsNil(o.AvgInputTokens) { + return nil, false + } + return o.AvgInputTokens, true +} + +// HasAvgInputTokens returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgInputTokens() bool { + if o != nil && !IsNil(o.AvgInputTokens) { + return true + } + + return false +} + +// SetAvgInputTokens gets a reference to the given float32 and assigns it to the AvgInputTokens field. +func (o *RunTestKPIsResponse) SetAvgInputTokens(v float32) { + o.AvgInputTokens = &v +} + +// GetAvgOutputTokens returns the AvgOutputTokens field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgOutputTokens() float32 { + if o == nil || IsNil(o.AvgOutputTokens) { + var ret float32 + return ret + } + return *o.AvgOutputTokens +} + +// GetAvgOutputTokensOk returns a tuple with the AvgOutputTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgOutputTokensOk() (*float32, bool) { + if o == nil || IsNil(o.AvgOutputTokens) { + return nil, false + } + return o.AvgOutputTokens, true +} + +// HasAvgOutputTokens returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgOutputTokens() bool { + if o != nil && !IsNil(o.AvgOutputTokens) { + return true + } + + return false +} + +// SetAvgOutputTokens gets a reference to the given float32 and assigns it to the AvgOutputTokens field. +func (o *RunTestKPIsResponse) SetAvgOutputTokens(v float32) { + o.AvgOutputTokens = &v +} + +// GetAvgChatLatencyMs returns the AvgChatLatencyMs field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgChatLatencyMs() float32 { + if o == nil || IsNil(o.AvgChatLatencyMs) { + var ret float32 + return ret + } + return *o.AvgChatLatencyMs +} + +// GetAvgChatLatencyMsOk returns a tuple with the AvgChatLatencyMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgChatLatencyMsOk() (*float32, bool) { + if o == nil || IsNil(o.AvgChatLatencyMs) { + return nil, false + } + return o.AvgChatLatencyMs, true +} + +// HasAvgChatLatencyMs returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgChatLatencyMs() bool { + if o != nil && !IsNil(o.AvgChatLatencyMs) { + return true + } + + return false +} + +// SetAvgChatLatencyMs gets a reference to the given float32 and assigns it to the AvgChatLatencyMs field. +func (o *RunTestKPIsResponse) SetAvgChatLatencyMs(v float32) { + o.AvgChatLatencyMs = &v +} + +// GetAvgTurnCount returns the AvgTurnCount field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgTurnCount() float32 { + if o == nil || IsNil(o.AvgTurnCount) { + var ret float32 + return ret + } + return *o.AvgTurnCount +} + +// GetAvgTurnCountOk returns a tuple with the AvgTurnCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgTurnCountOk() (*float32, bool) { + if o == nil || IsNil(o.AvgTurnCount) { + return nil, false + } + return o.AvgTurnCount, true +} + +// HasAvgTurnCount returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgTurnCount() bool { + if o != nil && !IsNil(o.AvgTurnCount) { + return true + } + + return false +} + +// SetAvgTurnCount gets a reference to the given float32 and assigns it to the AvgTurnCount field. +func (o *RunTestKPIsResponse) SetAvgTurnCount(v float32) { + o.AvgTurnCount = &v +} + +// GetAvgCsatScore returns the AvgCsatScore field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetAvgCsatScore() float32 { + if o == nil || IsNil(o.AvgCsatScore) { + var ret float32 + return ret + } + return *o.AvgCsatScore +} + +// GetAvgCsatScoreOk returns a tuple with the AvgCsatScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetAvgCsatScoreOk() (*float32, bool) { + if o == nil || IsNil(o.AvgCsatScore) { + return nil, false + } + return o.AvgCsatScore, true +} + +// HasAvgCsatScore returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasAvgCsatScore() bool { + if o != nil && !IsNil(o.AvgCsatScore) { + return true + } + + return false +} + +// SetAvgCsatScore gets a reference to the given float32 and assigns it to the AvgCsatScore field. +func (o *RunTestKPIsResponse) SetAvgCsatScore(v float32) { + o.AvgCsatScore = &v +} + +// GetFailedCalls returns the FailedCalls field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetFailedCalls() int32 { + if o == nil || IsNil(o.FailedCalls) { + var ret int32 + return ret + } + return *o.FailedCalls +} + +// GetFailedCallsOk returns a tuple with the FailedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetFailedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.FailedCalls) { + return nil, false + } + return o.FailedCalls, true +} + +// HasFailedCalls returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasFailedCalls() bool { + if o != nil && !IsNil(o.FailedCalls) { + return true + } + + return false +} + +// SetFailedCalls gets a reference to the given int32 and assigns it to the FailedCalls field. +func (o *RunTestKPIsResponse) SetFailedCalls(v int32) { + o.FailedCalls = &v +} + +// GetTotalDuration returns the TotalDuration field value if set, zero value otherwise. +func (o *RunTestKPIsResponse) GetTotalDuration() float32 { + if o == nil || IsNil(o.TotalDuration) { + var ret float32 + return ret + } + return *o.TotalDuration +} + +// GetTotalDurationOk returns a tuple with the TotalDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestKPIsResponse) GetTotalDurationOk() (*float32, bool) { + if o == nil || IsNil(o.TotalDuration) { + return nil, false + } + return o.TotalDuration, true +} + +// HasTotalDuration returns a boolean if a field has been set. +func (o *RunTestKPIsResponse) HasTotalDuration() bool { + if o != nil && !IsNil(o.TotalDuration) { + return true + } + + return false +} + +// SetTotalDuration gets a reference to the given float32 and assigns it to the TotalDuration field. +func (o *RunTestKPIsResponse) SetTotalDuration(v float32) { + o.TotalDuration = &v +} + +func (o RunTestKPIsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestKPIsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.AvgScore) { + toSerialize["avg_score"] = o.AvgScore + } + if !IsNil(o.AvgResponse) { + toSerialize["avg_response"] = o.AvgResponse + } + if !IsNil(o.CallsAttempted) { + toSerialize["calls_attempted"] = o.CallsAttempted + } + if !IsNil(o.ConnectedCalls) { + toSerialize["connected_calls"] = o.ConnectedCalls + } + if !IsNil(o.CallsConnectedPercentage) { + toSerialize["calls_connected_percentage"] = o.CallsConnectedPercentage + } + if !IsNil(o.ScenarioGraphs) { + toSerialize["scenario_graphs"] = o.ScenarioGraphs + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + if o.IsInbound.IsSet() { + toSerialize["is_inbound"] = o.IsInbound.Get() + } + if !IsNil(o.AvgAgentLatency) { + toSerialize["avg_agent_latency"] = o.AvgAgentLatency + } + if !IsNil(o.AvgUserInterruptionCount) { + toSerialize["avg_user_interruption_count"] = o.AvgUserInterruptionCount + } + if !IsNil(o.AvgUserInterruptionRate) { + toSerialize["avg_user_interruption_rate"] = o.AvgUserInterruptionRate + } + if !IsNil(o.AvgUserWpm) { + toSerialize["avg_user_wpm"] = o.AvgUserWpm + } + if !IsNil(o.AvgBotWpm) { + toSerialize["avg_bot_wpm"] = o.AvgBotWpm + } + if !IsNil(o.AvgTalkRatio) { + toSerialize["avg_talk_ratio"] = o.AvgTalkRatio + } + if !IsNil(o.AvgAiInterruptionCount) { + toSerialize["avg_ai_interruption_count"] = o.AvgAiInterruptionCount + } + if !IsNil(o.AvgAiInterruptionRate) { + toSerialize["avg_ai_interruption_rate"] = o.AvgAiInterruptionRate + } + if !IsNil(o.AvgStopTimeAfterInterruption) { + toSerialize["avg_stop_time_after_interruption"] = o.AvgStopTimeAfterInterruption + } + if !IsNil(o.AgentTalkPercentage) { + toSerialize["agent_talk_percentage"] = o.AgentTalkPercentage + } + if !IsNil(o.CustomerTalkPercentage) { + toSerialize["customer_talk_percentage"] = o.CustomerTalkPercentage + } + if !IsNil(o.AvgTotalTokens) { + toSerialize["avg_total_tokens"] = o.AvgTotalTokens + } + if !IsNil(o.AvgInputTokens) { + toSerialize["avg_input_tokens"] = o.AvgInputTokens + } + if !IsNil(o.AvgOutputTokens) { + toSerialize["avg_output_tokens"] = o.AvgOutputTokens + } + if !IsNil(o.AvgChatLatencyMs) { + toSerialize["avg_chat_latency_ms"] = o.AvgChatLatencyMs + } + if !IsNil(o.AvgTurnCount) { + toSerialize["avg_turn_count"] = o.AvgTurnCount + } + if !IsNil(o.AvgCsatScore) { + toSerialize["avg_csat_score"] = o.AvgCsatScore + } + if !IsNil(o.FailedCalls) { + toSerialize["failed_calls"] = o.FailedCalls + } + if !IsNil(o.TotalDuration) { + toSerialize["total_duration"] = o.TotalDuration + } + return toSerialize, nil +} + +type NullableRunTestKPIsResponse struct { + value *RunTestKPIsResponse + isSet bool +} + +func (v NullableRunTestKPIsResponse) Get() *RunTestKPIsResponse { + return v.value +} + +func (v *NullableRunTestKPIsResponse) Set(val *RunTestKPIsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestKPIsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestKPIsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestKPIsResponse(val *RunTestKPIsResponse) *NullableRunTestKPIsResponse { + return &NullableRunTestKPIsResponse{value: val, isSet: true} +} + +func (v NullableRunTestKPIsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestKPIsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_message_response.go b/go/futureagi/model_run_test_message_response.go new file mode 100644 index 0000000..3bf1717 --- /dev/null +++ b/go/futureagi/model_run_test_message_response.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the RunTestMessageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestMessageResponse{} + +// RunTestMessageResponse struct for RunTestMessageResponse +type RunTestMessageResponse struct { + Message *string `json:"message,omitempty"` +} + +// NewRunTestMessageResponse instantiates a new RunTestMessageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestMessageResponse() *RunTestMessageResponse { + this := RunTestMessageResponse{} + return &this +} + +// NewRunTestMessageResponseWithDefaults instantiates a new RunTestMessageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestMessageResponseWithDefaults() *RunTestMessageResponse { + this := RunTestMessageResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *RunTestMessageResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestMessageResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *RunTestMessageResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *RunTestMessageResponse) SetMessage(v string) { + o.Message = &v +} + +func (o RunTestMessageResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestMessageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableRunTestMessageResponse struct { + value *RunTestMessageResponse + isSet bool +} + +func (v NullableRunTestMessageResponse) Get() *RunTestMessageResponse { + return v.value +} + +func (v *NullableRunTestMessageResponse) Set(val *RunTestMessageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestMessageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestMessageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestMessageResponse(val *RunTestMessageResponse) *NullableRunTestMessageResponse { + return &NullableRunTestMessageResponse{value: val, isSet: true} +} + +func (v NullableRunTestMessageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestMessageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_name_response.go b/go/futureagi/model_run_test_name_response.go new file mode 100644 index 0000000..bc489a4 --- /dev/null +++ b/go/futureagi/model_run_test_name_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunTestNameResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestNameResponse{} + +// RunTestNameResponse struct for RunTestNameResponse +type RunTestNameResponse struct { + Status *bool `json:"status,omitempty"` + Result RunTestNameResult `json:"result"` +} + +type _RunTestNameResponse RunTestNameResponse + +// NewRunTestNameResponse instantiates a new RunTestNameResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestNameResponse(result RunTestNameResult) *RunTestNameResponse { + this := RunTestNameResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewRunTestNameResponseWithDefaults instantiates a new RunTestNameResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestNameResponseWithDefaults() *RunTestNameResponse { + this := RunTestNameResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RunTestNameResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestNameResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RunTestNameResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *RunTestNameResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *RunTestNameResponse) GetResult() RunTestNameResult { + if o == nil { + var ret RunTestNameResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *RunTestNameResponse) GetResultOk() (*RunTestNameResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *RunTestNameResponse) SetResult(v RunTestNameResult) { + o.Result = v +} + +func (o RunTestNameResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestNameResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *RunTestNameResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunTestNameResponse := _RunTestNameResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunTestNameResponse) + + if err != nil { + return err + } + + *o = RunTestNameResponse(varRunTestNameResponse) + + return err +} + +type NullableRunTestNameResponse struct { + value *RunTestNameResponse + isSet bool +} + +func (v NullableRunTestNameResponse) Get() *RunTestNameResponse { + return v.value +} + +func (v *NullableRunTestNameResponse) Set(val *RunTestNameResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestNameResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestNameResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestNameResponse(val *RunTestNameResponse) *NullableRunTestNameResponse { + return &NullableRunTestNameResponse{value: val, isSet: true} +} + +func (v NullableRunTestNameResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestNameResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_name_result.go b/go/futureagi/model_run_test_name_result.go new file mode 100644 index 0000000..9bf8723 --- /dev/null +++ b/go/futureagi/model_run_test_name_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RunTestNameResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestNameResult{} + +// RunTestNameResult struct for RunTestNameResult +type RunTestNameResult struct { + RunTestId string `json:"run_test_id"` + RunTestName string `json:"run_test_name"` +} + +type _RunTestNameResult RunTestNameResult + +// NewRunTestNameResult instantiates a new RunTestNameResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestNameResult(runTestId string, runTestName string) *RunTestNameResult { + this := RunTestNameResult{} + this.RunTestId = runTestId + this.RunTestName = runTestName + return &this +} + +// NewRunTestNameResultWithDefaults instantiates a new RunTestNameResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestNameResultWithDefaults() *RunTestNameResult { + this := RunTestNameResult{} + return &this +} + +// GetRunTestId returns the RunTestId field value +func (o *RunTestNameResult) GetRunTestId() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value +// and a boolean to check if the value has been set. +func (o *RunTestNameResult) GetRunTestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestId, true +} + +// SetRunTestId sets field value +func (o *RunTestNameResult) SetRunTestId(v string) { + o.RunTestId = v +} + +// GetRunTestName returns the RunTestName field value +func (o *RunTestNameResult) GetRunTestName() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestName +} + +// GetRunTestNameOk returns a tuple with the RunTestName field value +// and a boolean to check if the value has been set. +func (o *RunTestNameResult) GetRunTestNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestName, true +} + +// SetRunTestName sets field value +func (o *RunTestNameResult) SetRunTestName(v string) { + o.RunTestName = v +} + +func (o RunTestNameResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestNameResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["run_test_id"] = o.RunTestId + toSerialize["run_test_name"] = o.RunTestName + return toSerialize, nil +} + +func (o *RunTestNameResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "run_test_id", + "run_test_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunTestNameResult := _RunTestNameResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRunTestNameResult) + + if err != nil { + return err + } + + *o = RunTestNameResult(varRunTestNameResult) + + return err +} + +type NullableRunTestNameResult struct { + value *RunTestNameResult + isSet bool +} + +func (v NullableRunTestNameResult) Get() *RunTestNameResult { + return v.value +} + +func (v *NullableRunTestNameResult) Set(val *RunTestNameResult) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestNameResult) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestNameResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestNameResult(val *RunTestNameResult) *NullableRunTestNameResult { + return &NullableRunTestNameResult{value: val, isSet: true} +} + +func (v NullableRunTestNameResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestNameResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_response.go b/go/futureagi/model_run_test_response.go new file mode 100644 index 0000000..1fb6e9c --- /dev/null +++ b/go/futureagi/model_run_test_response.go @@ -0,0 +1,1161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the RunTestResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestResponse{} + +// RunTestResponse struct for RunTestResponse +type RunTestResponse struct { + Id *string `json:"id,omitempty"` + // Name of the test run + Name *string `json:"name,omitempty"` + // Description of the test run + Description NullableString `json:"description,omitempty"` + // Agent definition for this test run + AgentDefinition NullableString `json:"agent_definition,omitempty"` + AgentVersion *map[string]string `json:"agent_version,omitempty"` + AgentDefinitionDetail *map[string]string `json:"agent_definition_detail,omitempty"` + // Source type for the test run: agent_definition or prompt + SourceType *string `json:"source_type,omitempty"` + SourceTypeDisplay NullableString `json:"source_type_display,omitempty"` + // Prompt template for this test run (only for prompt source type) + PromptTemplate NullableString `json:"prompt_template,omitempty"` + PromptTemplateDetail *map[string]string `json:"prompt_template_detail,omitempty"` + // Prompt version for this test run (only for prompt source type) + PromptVersion NullableString `json:"prompt_version,omitempty"` + PromptVersionDetail *map[string]string `json:"prompt_version_detail,omitempty"` + // Scenarios to run in this test + Scenarios []string `json:"scenarios,omitempty"` + ScenariosDetail []map[string]string `json:"scenarios_detail,omitempty"` + // IDs of dataset rows to run evaluations on + DatasetRowIds []string `json:"dataset_row_ids,omitempty"` + // Simulator agent for this test run (derived from scenarios) + SimulatorAgent NullableString `json:"simulator_agent,omitempty"` + SimulatorAgentDetail *map[string]string `json:"simulator_agent_detail,omitempty"` + SimulateEvalConfigs []string `json:"simulate_eval_configs,omitempty"` + SimulateEvalConfigsDetail []SimulateEvalConfigResponse `json:"simulate_eval_configs_detail,omitempty"` + EvalsDetail []SimulateEvalConfigResponse `json:"evals_detail,omitempty"` + // Organization this test run belongs to + Organization *string `json:"organization,omitempty"` + // Enable automatic tool evaluation for this test run + EnableToolEvaluation *bool `json:"enable_tool_evaluation,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + LastRunAt NullableTime `json:"last_run_at,omitempty"` + Deleted *bool `json:"deleted,omitempty"` + DeletedAt NullableTime `json:"deleted_at,omitempty"` +} + +// NewRunTestResponse instantiates a new RunTestResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestResponse() *RunTestResponse { + this := RunTestResponse{} + return &this +} + +// NewRunTestResponseWithDefaults instantiates a new RunTestResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestResponseWithDefaults() *RunTestResponse { + this := RunTestResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RunTestResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RunTestResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RunTestResponse) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RunTestResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RunTestResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RunTestResponse) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RunTestResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RunTestResponse) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RunTestResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RunTestResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetAgentDefinition returns the AgentDefinition field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetAgentDefinition() string { + if o == nil || IsNil(o.AgentDefinition.Get()) { + var ret string + return ret + } + return *o.AgentDefinition.Get() +} + +// GetAgentDefinitionOk returns a tuple with the AgentDefinition field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetAgentDefinitionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentDefinition.Get(), o.AgentDefinition.IsSet() +} + +// HasAgentDefinition returns a boolean if a field has been set. +func (o *RunTestResponse) HasAgentDefinition() bool { + if o != nil && o.AgentDefinition.IsSet() { + return true + } + + return false +} + +// SetAgentDefinition gets a reference to the given NullableString and assigns it to the AgentDefinition field. +func (o *RunTestResponse) SetAgentDefinition(v string) { + o.AgentDefinition.Set(&v) +} + +// SetAgentDefinitionNil sets the value for AgentDefinition to be an explicit nil +func (o *RunTestResponse) SetAgentDefinitionNil() { + o.AgentDefinition.Set(nil) +} + +// UnsetAgentDefinition ensures that no value is present for AgentDefinition, not even an explicit nil +func (o *RunTestResponse) UnsetAgentDefinition() { + o.AgentDefinition.Unset() +} + +// GetAgentVersion returns the AgentVersion field value if set, zero value otherwise. +func (o *RunTestResponse) GetAgentVersion() map[string]string { + if o == nil || IsNil(o.AgentVersion) { + var ret map[string]string + return ret + } + return *o.AgentVersion +} + +// GetAgentVersionOk returns a tuple with the AgentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetAgentVersionOk() (*map[string]string, bool) { + if o == nil || IsNil(o.AgentVersion) { + return nil, false + } + return o.AgentVersion, true +} + +// HasAgentVersion returns a boolean if a field has been set. +func (o *RunTestResponse) HasAgentVersion() bool { + if o != nil && !IsNil(o.AgentVersion) { + return true + } + + return false +} + +// SetAgentVersion gets a reference to the given map[string]string and assigns it to the AgentVersion field. +func (o *RunTestResponse) SetAgentVersion(v map[string]string) { + o.AgentVersion = &v +} + +// GetAgentDefinitionDetail returns the AgentDefinitionDetail field value if set, zero value otherwise. +func (o *RunTestResponse) GetAgentDefinitionDetail() map[string]string { + if o == nil || IsNil(o.AgentDefinitionDetail) { + var ret map[string]string + return ret + } + return *o.AgentDefinitionDetail +} + +// GetAgentDefinitionDetailOk returns a tuple with the AgentDefinitionDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetAgentDefinitionDetailOk() (*map[string]string, bool) { + if o == nil || IsNil(o.AgentDefinitionDetail) { + return nil, false + } + return o.AgentDefinitionDetail, true +} + +// HasAgentDefinitionDetail returns a boolean if a field has been set. +func (o *RunTestResponse) HasAgentDefinitionDetail() bool { + if o != nil && !IsNil(o.AgentDefinitionDetail) { + return true + } + + return false +} + +// SetAgentDefinitionDetail gets a reference to the given map[string]string and assigns it to the AgentDefinitionDetail field. +func (o *RunTestResponse) SetAgentDefinitionDetail(v map[string]string) { + o.AgentDefinitionDetail = &v +} + +// GetSourceType returns the SourceType field value if set, zero value otherwise. +func (o *RunTestResponse) GetSourceType() string { + if o == nil || IsNil(o.SourceType) { + var ret string + return ret + } + return *o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetSourceTypeOk() (*string, bool) { + if o == nil || IsNil(o.SourceType) { + return nil, false + } + return o.SourceType, true +} + +// HasSourceType returns a boolean if a field has been set. +func (o *RunTestResponse) HasSourceType() bool { + if o != nil && !IsNil(o.SourceType) { + return true + } + + return false +} + +// SetSourceType gets a reference to the given string and assigns it to the SourceType field. +func (o *RunTestResponse) SetSourceType(v string) { + o.SourceType = &v +} + +// GetSourceTypeDisplay returns the SourceTypeDisplay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetSourceTypeDisplay() string { + if o == nil || IsNil(o.SourceTypeDisplay.Get()) { + var ret string + return ret + } + return *o.SourceTypeDisplay.Get() +} + +// GetSourceTypeDisplayOk returns a tuple with the SourceTypeDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetSourceTypeDisplayOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SourceTypeDisplay.Get(), o.SourceTypeDisplay.IsSet() +} + +// HasSourceTypeDisplay returns a boolean if a field has been set. +func (o *RunTestResponse) HasSourceTypeDisplay() bool { + if o != nil && o.SourceTypeDisplay.IsSet() { + return true + } + + return false +} + +// SetSourceTypeDisplay gets a reference to the given NullableString and assigns it to the SourceTypeDisplay field. +func (o *RunTestResponse) SetSourceTypeDisplay(v string) { + o.SourceTypeDisplay.Set(&v) +} + +// SetSourceTypeDisplayNil sets the value for SourceTypeDisplay to be an explicit nil +func (o *RunTestResponse) SetSourceTypeDisplayNil() { + o.SourceTypeDisplay.Set(nil) +} + +// UnsetSourceTypeDisplay ensures that no value is present for SourceTypeDisplay, not even an explicit nil +func (o *RunTestResponse) UnsetSourceTypeDisplay() { + o.SourceTypeDisplay.Unset() +} + +// GetPromptTemplate returns the PromptTemplate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetPromptTemplate() string { + if o == nil || IsNil(o.PromptTemplate.Get()) { + var ret string + return ret + } + return *o.PromptTemplate.Get() +} + +// GetPromptTemplateOk returns a tuple with the PromptTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetPromptTemplateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptTemplate.Get(), o.PromptTemplate.IsSet() +} + +// HasPromptTemplate returns a boolean if a field has been set. +func (o *RunTestResponse) HasPromptTemplate() bool { + if o != nil && o.PromptTemplate.IsSet() { + return true + } + + return false +} + +// SetPromptTemplate gets a reference to the given NullableString and assigns it to the PromptTemplate field. +func (o *RunTestResponse) SetPromptTemplate(v string) { + o.PromptTemplate.Set(&v) +} + +// SetPromptTemplateNil sets the value for PromptTemplate to be an explicit nil +func (o *RunTestResponse) SetPromptTemplateNil() { + o.PromptTemplate.Set(nil) +} + +// UnsetPromptTemplate ensures that no value is present for PromptTemplate, not even an explicit nil +func (o *RunTestResponse) UnsetPromptTemplate() { + o.PromptTemplate.Unset() +} + +// GetPromptTemplateDetail returns the PromptTemplateDetail field value if set, zero value otherwise. +func (o *RunTestResponse) GetPromptTemplateDetail() map[string]string { + if o == nil || IsNil(o.PromptTemplateDetail) { + var ret map[string]string + return ret + } + return *o.PromptTemplateDetail +} + +// GetPromptTemplateDetailOk returns a tuple with the PromptTemplateDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetPromptTemplateDetailOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PromptTemplateDetail) { + return nil, false + } + return o.PromptTemplateDetail, true +} + +// HasPromptTemplateDetail returns a boolean if a field has been set. +func (o *RunTestResponse) HasPromptTemplateDetail() bool { + if o != nil && !IsNil(o.PromptTemplateDetail) { + return true + } + + return false +} + +// SetPromptTemplateDetail gets a reference to the given map[string]string and assigns it to the PromptTemplateDetail field. +func (o *RunTestResponse) SetPromptTemplateDetail(v map[string]string) { + o.PromptTemplateDetail = &v +} + +// GetPromptVersion returns the PromptVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetPromptVersion() string { + if o == nil || IsNil(o.PromptVersion.Get()) { + var ret string + return ret + } + return *o.PromptVersion.Get() +} + +// GetPromptVersionOk returns a tuple with the PromptVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetPromptVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptVersion.Get(), o.PromptVersion.IsSet() +} + +// HasPromptVersion returns a boolean if a field has been set. +func (o *RunTestResponse) HasPromptVersion() bool { + if o != nil && o.PromptVersion.IsSet() { + return true + } + + return false +} + +// SetPromptVersion gets a reference to the given NullableString and assigns it to the PromptVersion field. +func (o *RunTestResponse) SetPromptVersion(v string) { + o.PromptVersion.Set(&v) +} + +// SetPromptVersionNil sets the value for PromptVersion to be an explicit nil +func (o *RunTestResponse) SetPromptVersionNil() { + o.PromptVersion.Set(nil) +} + +// UnsetPromptVersion ensures that no value is present for PromptVersion, not even an explicit nil +func (o *RunTestResponse) UnsetPromptVersion() { + o.PromptVersion.Unset() +} + +// GetPromptVersionDetail returns the PromptVersionDetail field value if set, zero value otherwise. +func (o *RunTestResponse) GetPromptVersionDetail() map[string]string { + if o == nil || IsNil(o.PromptVersionDetail) { + var ret map[string]string + return ret + } + return *o.PromptVersionDetail +} + +// GetPromptVersionDetailOk returns a tuple with the PromptVersionDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetPromptVersionDetailOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PromptVersionDetail) { + return nil, false + } + return o.PromptVersionDetail, true +} + +// HasPromptVersionDetail returns a boolean if a field has been set. +func (o *RunTestResponse) HasPromptVersionDetail() bool { + if o != nil && !IsNil(o.PromptVersionDetail) { + return true + } + + return false +} + +// SetPromptVersionDetail gets a reference to the given map[string]string and assigns it to the PromptVersionDetail field. +func (o *RunTestResponse) SetPromptVersionDetail(v map[string]string) { + o.PromptVersionDetail = &v +} + +// GetScenarios returns the Scenarios field value if set, zero value otherwise. +func (o *RunTestResponse) GetScenarios() []string { + if o == nil || IsNil(o.Scenarios) { + var ret []string + return ret + } + return o.Scenarios +} + +// GetScenariosOk returns a tuple with the Scenarios field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetScenariosOk() ([]string, bool) { + if o == nil || IsNil(o.Scenarios) { + return nil, false + } + return o.Scenarios, true +} + +// HasScenarios returns a boolean if a field has been set. +func (o *RunTestResponse) HasScenarios() bool { + if o != nil && !IsNil(o.Scenarios) { + return true + } + + return false +} + +// SetScenarios gets a reference to the given []string and assigns it to the Scenarios field. +func (o *RunTestResponse) SetScenarios(v []string) { + o.Scenarios = v +} + +// GetScenariosDetail returns the ScenariosDetail field value if set, zero value otherwise. +func (o *RunTestResponse) GetScenariosDetail() []map[string]string { + if o == nil || IsNil(o.ScenariosDetail) { + var ret []map[string]string + return ret + } + return o.ScenariosDetail +} + +// GetScenariosDetailOk returns a tuple with the ScenariosDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetScenariosDetailOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.ScenariosDetail) { + return nil, false + } + return o.ScenariosDetail, true +} + +// HasScenariosDetail returns a boolean if a field has been set. +func (o *RunTestResponse) HasScenariosDetail() bool { + if o != nil && !IsNil(o.ScenariosDetail) { + return true + } + + return false +} + +// SetScenariosDetail gets a reference to the given []map[string]string and assigns it to the ScenariosDetail field. +func (o *RunTestResponse) SetScenariosDetail(v []map[string]string) { + o.ScenariosDetail = v +} + +// GetDatasetRowIds returns the DatasetRowIds field value if set, zero value otherwise. +func (o *RunTestResponse) GetDatasetRowIds() []string { + if o == nil || IsNil(o.DatasetRowIds) { + var ret []string + return ret + } + return o.DatasetRowIds +} + +// GetDatasetRowIdsOk returns a tuple with the DatasetRowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetDatasetRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DatasetRowIds) { + return nil, false + } + return o.DatasetRowIds, true +} + +// HasDatasetRowIds returns a boolean if a field has been set. +func (o *RunTestResponse) HasDatasetRowIds() bool { + if o != nil && !IsNil(o.DatasetRowIds) { + return true + } + + return false +} + +// SetDatasetRowIds gets a reference to the given []string and assigns it to the DatasetRowIds field. +func (o *RunTestResponse) SetDatasetRowIds(v []string) { + o.DatasetRowIds = v +} + +// GetSimulatorAgent returns the SimulatorAgent field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetSimulatorAgent() string { + if o == nil || IsNil(o.SimulatorAgent.Get()) { + var ret string + return ret + } + return *o.SimulatorAgent.Get() +} + +// GetSimulatorAgentOk returns a tuple with the SimulatorAgent field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetSimulatorAgentOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SimulatorAgent.Get(), o.SimulatorAgent.IsSet() +} + +// HasSimulatorAgent returns a boolean if a field has been set. +func (o *RunTestResponse) HasSimulatorAgent() bool { + if o != nil && o.SimulatorAgent.IsSet() { + return true + } + + return false +} + +// SetSimulatorAgent gets a reference to the given NullableString and assigns it to the SimulatorAgent field. +func (o *RunTestResponse) SetSimulatorAgent(v string) { + o.SimulatorAgent.Set(&v) +} + +// SetSimulatorAgentNil sets the value for SimulatorAgent to be an explicit nil +func (o *RunTestResponse) SetSimulatorAgentNil() { + o.SimulatorAgent.Set(nil) +} + +// UnsetSimulatorAgent ensures that no value is present for SimulatorAgent, not even an explicit nil +func (o *RunTestResponse) UnsetSimulatorAgent() { + o.SimulatorAgent.Unset() +} + +// GetSimulatorAgentDetail returns the SimulatorAgentDetail field value if set, zero value otherwise. +func (o *RunTestResponse) GetSimulatorAgentDetail() map[string]string { + if o == nil || IsNil(o.SimulatorAgentDetail) { + var ret map[string]string + return ret + } + return *o.SimulatorAgentDetail +} + +// GetSimulatorAgentDetailOk returns a tuple with the SimulatorAgentDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetSimulatorAgentDetailOk() (*map[string]string, bool) { + if o == nil || IsNil(o.SimulatorAgentDetail) { + return nil, false + } + return o.SimulatorAgentDetail, true +} + +// HasSimulatorAgentDetail returns a boolean if a field has been set. +func (o *RunTestResponse) HasSimulatorAgentDetail() bool { + if o != nil && !IsNil(o.SimulatorAgentDetail) { + return true + } + + return false +} + +// SetSimulatorAgentDetail gets a reference to the given map[string]string and assigns it to the SimulatorAgentDetail field. +func (o *RunTestResponse) SetSimulatorAgentDetail(v map[string]string) { + o.SimulatorAgentDetail = &v +} + +// GetSimulateEvalConfigs returns the SimulateEvalConfigs field value if set, zero value otherwise. +func (o *RunTestResponse) GetSimulateEvalConfigs() []string { + if o == nil || IsNil(o.SimulateEvalConfigs) { + var ret []string + return ret + } + return o.SimulateEvalConfigs +} + +// GetSimulateEvalConfigsOk returns a tuple with the SimulateEvalConfigs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetSimulateEvalConfigsOk() ([]string, bool) { + if o == nil || IsNil(o.SimulateEvalConfigs) { + return nil, false + } + return o.SimulateEvalConfigs, true +} + +// HasSimulateEvalConfigs returns a boolean if a field has been set. +func (o *RunTestResponse) HasSimulateEvalConfigs() bool { + if o != nil && !IsNil(o.SimulateEvalConfigs) { + return true + } + + return false +} + +// SetSimulateEvalConfigs gets a reference to the given []string and assigns it to the SimulateEvalConfigs field. +func (o *RunTestResponse) SetSimulateEvalConfigs(v []string) { + o.SimulateEvalConfigs = v +} + +// GetSimulateEvalConfigsDetail returns the SimulateEvalConfigsDetail field value if set, zero value otherwise. +func (o *RunTestResponse) GetSimulateEvalConfigsDetail() []SimulateEvalConfigResponse { + if o == nil || IsNil(o.SimulateEvalConfigsDetail) { + var ret []SimulateEvalConfigResponse + return ret + } + return o.SimulateEvalConfigsDetail +} + +// GetSimulateEvalConfigsDetailOk returns a tuple with the SimulateEvalConfigsDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetSimulateEvalConfigsDetailOk() ([]SimulateEvalConfigResponse, bool) { + if o == nil || IsNil(o.SimulateEvalConfigsDetail) { + return nil, false + } + return o.SimulateEvalConfigsDetail, true +} + +// HasSimulateEvalConfigsDetail returns a boolean if a field has been set. +func (o *RunTestResponse) HasSimulateEvalConfigsDetail() bool { + if o != nil && !IsNil(o.SimulateEvalConfigsDetail) { + return true + } + + return false +} + +// SetSimulateEvalConfigsDetail gets a reference to the given []SimulateEvalConfigResponse and assigns it to the SimulateEvalConfigsDetail field. +func (o *RunTestResponse) SetSimulateEvalConfigsDetail(v []SimulateEvalConfigResponse) { + o.SimulateEvalConfigsDetail = v +} + +// GetEvalsDetail returns the EvalsDetail field value if set, zero value otherwise. +func (o *RunTestResponse) GetEvalsDetail() []SimulateEvalConfigResponse { + if o == nil || IsNil(o.EvalsDetail) { + var ret []SimulateEvalConfigResponse + return ret + } + return o.EvalsDetail +} + +// GetEvalsDetailOk returns a tuple with the EvalsDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetEvalsDetailOk() ([]SimulateEvalConfigResponse, bool) { + if o == nil || IsNil(o.EvalsDetail) { + return nil, false + } + return o.EvalsDetail, true +} + +// HasEvalsDetail returns a boolean if a field has been set. +func (o *RunTestResponse) HasEvalsDetail() bool { + if o != nil && !IsNil(o.EvalsDetail) { + return true + } + + return false +} + +// SetEvalsDetail gets a reference to the given []SimulateEvalConfigResponse and assigns it to the EvalsDetail field. +func (o *RunTestResponse) SetEvalsDetail(v []SimulateEvalConfigResponse) { + o.EvalsDetail = v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *RunTestResponse) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *RunTestResponse) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *RunTestResponse) SetOrganization(v string) { + o.Organization = &v +} + +// GetEnableToolEvaluation returns the EnableToolEvaluation field value if set, zero value otherwise. +func (o *RunTestResponse) GetEnableToolEvaluation() bool { + if o == nil || IsNil(o.EnableToolEvaluation) { + var ret bool + return ret + } + return *o.EnableToolEvaluation +} + +// GetEnableToolEvaluationOk returns a tuple with the EnableToolEvaluation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetEnableToolEvaluationOk() (*bool, bool) { + if o == nil || IsNil(o.EnableToolEvaluation) { + return nil, false + } + return o.EnableToolEvaluation, true +} + +// HasEnableToolEvaluation returns a boolean if a field has been set. +func (o *RunTestResponse) HasEnableToolEvaluation() bool { + if o != nil && !IsNil(o.EnableToolEvaluation) { + return true + } + + return false +} + +// SetEnableToolEvaluation gets a reference to the given bool and assigns it to the EnableToolEvaluation field. +func (o *RunTestResponse) SetEnableToolEvaluation(v bool) { + o.EnableToolEvaluation = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *RunTestResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *RunTestResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *RunTestResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *RunTestResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *RunTestResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *RunTestResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetLastRunAt returns the LastRunAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetLastRunAt() time.Time { + if o == nil || IsNil(o.LastRunAt.Get()) { + var ret time.Time + return ret + } + return *o.LastRunAt.Get() +} + +// GetLastRunAtOk returns a tuple with the LastRunAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetLastRunAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRunAt.Get(), o.LastRunAt.IsSet() +} + +// HasLastRunAt returns a boolean if a field has been set. +func (o *RunTestResponse) HasLastRunAt() bool { + if o != nil && o.LastRunAt.IsSet() { + return true + } + + return false +} + +// SetLastRunAt gets a reference to the given NullableTime and assigns it to the LastRunAt field. +func (o *RunTestResponse) SetLastRunAt(v time.Time) { + o.LastRunAt.Set(&v) +} + +// SetLastRunAtNil sets the value for LastRunAt to be an explicit nil +func (o *RunTestResponse) SetLastRunAtNil() { + o.LastRunAt.Set(nil) +} + +// UnsetLastRunAt ensures that no value is present for LastRunAt, not even an explicit nil +func (o *RunTestResponse) UnsetLastRunAt() { + o.LastRunAt.Unset() +} + +// GetDeleted returns the Deleted field value if set, zero value otherwise. +func (o *RunTestResponse) GetDeleted() bool { + if o == nil || IsNil(o.Deleted) { + var ret bool + return ret + } + return *o.Deleted +} + +// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestResponse) GetDeletedOk() (*bool, bool) { + if o == nil || IsNil(o.Deleted) { + return nil, false + } + return o.Deleted, true +} + +// HasDeleted returns a boolean if a field has been set. +func (o *RunTestResponse) HasDeleted() bool { + if o != nil && !IsNil(o.Deleted) { + return true + } + + return false +} + +// SetDeleted gets a reference to the given bool and assigns it to the Deleted field. +func (o *RunTestResponse) SetDeleted(v bool) { + o.Deleted = &v +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunTestResponse) GetDeletedAt() time.Time { + if o == nil || IsNil(o.DeletedAt.Get()) { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunTestResponse) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *RunTestResponse) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *RunTestResponse) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} + +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *RunTestResponse) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *RunTestResponse) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +func (o RunTestResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.AgentDefinition.IsSet() { + toSerialize["agent_definition"] = o.AgentDefinition.Get() + } + if !IsNil(o.AgentVersion) { + toSerialize["agent_version"] = o.AgentVersion + } + if !IsNil(o.AgentDefinitionDetail) { + toSerialize["agent_definition_detail"] = o.AgentDefinitionDetail + } + if !IsNil(o.SourceType) { + toSerialize["source_type"] = o.SourceType + } + if o.SourceTypeDisplay.IsSet() { + toSerialize["source_type_display"] = o.SourceTypeDisplay.Get() + } + if o.PromptTemplate.IsSet() { + toSerialize["prompt_template"] = o.PromptTemplate.Get() + } + if !IsNil(o.PromptTemplateDetail) { + toSerialize["prompt_template_detail"] = o.PromptTemplateDetail + } + if o.PromptVersion.IsSet() { + toSerialize["prompt_version"] = o.PromptVersion.Get() + } + if !IsNil(o.PromptVersionDetail) { + toSerialize["prompt_version_detail"] = o.PromptVersionDetail + } + if !IsNil(o.Scenarios) { + toSerialize["scenarios"] = o.Scenarios + } + if !IsNil(o.ScenariosDetail) { + toSerialize["scenarios_detail"] = o.ScenariosDetail + } + if !IsNil(o.DatasetRowIds) { + toSerialize["dataset_row_ids"] = o.DatasetRowIds + } + if o.SimulatorAgent.IsSet() { + toSerialize["simulator_agent"] = o.SimulatorAgent.Get() + } + if !IsNil(o.SimulatorAgentDetail) { + toSerialize["simulator_agent_detail"] = o.SimulatorAgentDetail + } + if !IsNil(o.SimulateEvalConfigs) { + toSerialize["simulate_eval_configs"] = o.SimulateEvalConfigs + } + if !IsNil(o.SimulateEvalConfigsDetail) { + toSerialize["simulate_eval_configs_detail"] = o.SimulateEvalConfigsDetail + } + if !IsNil(o.EvalsDetail) { + toSerialize["evals_detail"] = o.EvalsDetail + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.EnableToolEvaluation) { + toSerialize["enable_tool_evaluation"] = o.EnableToolEvaluation + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.LastRunAt.IsSet() { + toSerialize["last_run_at"] = o.LastRunAt.Get() + } + if !IsNil(o.Deleted) { + toSerialize["deleted"] = o.Deleted + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + return toSerialize, nil +} + +type NullableRunTestResponse struct { + value *RunTestResponse + isSet bool +} + +func (v NullableRunTestResponse) Get() *RunTestResponse { + return v.value +} + +func (v *NullableRunTestResponse) Set(val *RunTestResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestResponse(val *RunTestResponse) *NullableRunTestResponse { + return &NullableRunTestResponse{value: val, isSet: true} +} + +func (v NullableRunTestResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_run_test_scenario_item_response.go b/go/futureagi/model_run_test_scenario_item_response.go new file mode 100644 index 0000000..69684f3 --- /dev/null +++ b/go/futureagi/model_run_test_scenario_item_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the RunTestScenarioItemResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunTestScenarioItemResponse{} + +// RunTestScenarioItemResponse struct for RunTestScenarioItemResponse +type RunTestScenarioItemResponse struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + RowCount *int32 `json:"row_count,omitempty"` +} + +// NewRunTestScenarioItemResponse instantiates a new RunTestScenarioItemResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunTestScenarioItemResponse() *RunTestScenarioItemResponse { + this := RunTestScenarioItemResponse{} + return &this +} + +// NewRunTestScenarioItemResponseWithDefaults instantiates a new RunTestScenarioItemResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunTestScenarioItemResponseWithDefaults() *RunTestScenarioItemResponse { + this := RunTestScenarioItemResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RunTestScenarioItemResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestScenarioItemResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RunTestScenarioItemResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RunTestScenarioItemResponse) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RunTestScenarioItemResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestScenarioItemResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RunTestScenarioItemResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RunTestScenarioItemResponse) SetName(v string) { + o.Name = &v +} + +// GetRowCount returns the RowCount field value if set, zero value otherwise. +func (o *RunTestScenarioItemResponse) GetRowCount() int32 { + if o == nil || IsNil(o.RowCount) { + var ret int32 + return ret + } + return *o.RowCount +} + +// GetRowCountOk returns a tuple with the RowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunTestScenarioItemResponse) GetRowCountOk() (*int32, bool) { + if o == nil || IsNil(o.RowCount) { + return nil, false + } + return o.RowCount, true +} + +// HasRowCount returns a boolean if a field has been set. +func (o *RunTestScenarioItemResponse) HasRowCount() bool { + if o != nil && !IsNil(o.RowCount) { + return true + } + + return false +} + +// SetRowCount gets a reference to the given int32 and assigns it to the RowCount field. +func (o *RunTestScenarioItemResponse) SetRowCount(v int32) { + o.RowCount = &v +} + +func (o RunTestScenarioItemResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunTestScenarioItemResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.RowCount) { + toSerialize["row_count"] = o.RowCount + } + return toSerialize, nil +} + +type NullableRunTestScenarioItemResponse struct { + value *RunTestScenarioItemResponse + isSet bool +} + +func (v NullableRunTestScenarioItemResponse) Get() *RunTestScenarioItemResponse { + return v.value +} + +func (v *NullableRunTestScenarioItemResponse) Set(val *RunTestScenarioItemResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRunTestScenarioItemResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRunTestScenarioItemResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunTestScenarioItemResponse(val *RunTestScenarioItemResponse) *NullableRunTestScenarioItemResponse { + return &NullableRunTestScenarioItemResponse{value: val, isSet: true} +} + +func (v NullableRunTestScenarioItemResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunTestScenarioItemResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_add_columns_request.go b/go/futureagi/model_scenario_add_columns_request.go new file mode 100644 index 0000000..d5a3f32 --- /dev/null +++ b/go/futureagi/model_scenario_add_columns_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScenarioAddColumnsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioAddColumnsRequest{} + +// ScenarioAddColumnsRequest struct for ScenarioAddColumnsRequest +type ScenarioAddColumnsRequest struct { + Columns []ColumnDefinition `json:"columns"` +} + +type _ScenarioAddColumnsRequest ScenarioAddColumnsRequest + +// NewScenarioAddColumnsRequest instantiates a new ScenarioAddColumnsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioAddColumnsRequest(columns []ColumnDefinition) *ScenarioAddColumnsRequest { + this := ScenarioAddColumnsRequest{} + this.Columns = columns + return &this +} + +// NewScenarioAddColumnsRequestWithDefaults instantiates a new ScenarioAddColumnsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioAddColumnsRequestWithDefaults() *ScenarioAddColumnsRequest { + this := ScenarioAddColumnsRequest{} + return &this +} + +// GetColumns returns the Columns field value +func (o *ScenarioAddColumnsRequest) GetColumns() []ColumnDefinition { + if o == nil { + var ret []ColumnDefinition + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *ScenarioAddColumnsRequest) GetColumnsOk() ([]ColumnDefinition, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *ScenarioAddColumnsRequest) SetColumns(v []ColumnDefinition) { + o.Columns = v +} + +func (o ScenarioAddColumnsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioAddColumnsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["columns"] = o.Columns + return toSerialize, nil +} + +func (o *ScenarioAddColumnsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "columns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScenarioAddColumnsRequest := _ScenarioAddColumnsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScenarioAddColumnsRequest) + + if err != nil { + return err + } + + *o = ScenarioAddColumnsRequest(varScenarioAddColumnsRequest) + + return err +} + +type NullableScenarioAddColumnsRequest struct { + value *ScenarioAddColumnsRequest + isSet bool +} + +func (v NullableScenarioAddColumnsRequest) Get() *ScenarioAddColumnsRequest { + return v.value +} + +func (v *NullableScenarioAddColumnsRequest) Set(val *ScenarioAddColumnsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioAddColumnsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioAddColumnsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioAddColumnsRequest(val *ScenarioAddColumnsRequest) *NullableScenarioAddColumnsRequest { + return &NullableScenarioAddColumnsRequest{value: val, isSet: true} +} + +func (v NullableScenarioAddColumnsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioAddColumnsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_add_columns_response.go b/go/futureagi/model_scenario_add_columns_response.go new file mode 100644 index 0000000..7290b47 --- /dev/null +++ b/go/futureagi/model_scenario_add_columns_response.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioAddColumnsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioAddColumnsResponse{} + +// ScenarioAddColumnsResponse struct for ScenarioAddColumnsResponse +type ScenarioAddColumnsResponse struct { + Message *string `json:"message,omitempty"` + ScenarioId *string `json:"scenario_id,omitempty"` + DatasetId *string `json:"dataset_id,omitempty"` + Columns []string `json:"columns,omitempty"` +} + +// NewScenarioAddColumnsResponse instantiates a new ScenarioAddColumnsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioAddColumnsResponse() *ScenarioAddColumnsResponse { + this := ScenarioAddColumnsResponse{} + return &this +} + +// NewScenarioAddColumnsResponseWithDefaults instantiates a new ScenarioAddColumnsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioAddColumnsResponseWithDefaults() *ScenarioAddColumnsResponse { + this := ScenarioAddColumnsResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ScenarioAddColumnsResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddColumnsResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ScenarioAddColumnsResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ScenarioAddColumnsResponse) SetMessage(v string) { + o.Message = &v +} + +// GetScenarioId returns the ScenarioId field value if set, zero value otherwise. +func (o *ScenarioAddColumnsResponse) GetScenarioId() string { + if o == nil || IsNil(o.ScenarioId) { + var ret string + return ret + } + return *o.ScenarioId +} + +// GetScenarioIdOk returns a tuple with the ScenarioId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddColumnsResponse) GetScenarioIdOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioId) { + return nil, false + } + return o.ScenarioId, true +} + +// HasScenarioId returns a boolean if a field has been set. +func (o *ScenarioAddColumnsResponse) HasScenarioId() bool { + if o != nil && !IsNil(o.ScenarioId) { + return true + } + + return false +} + +// SetScenarioId gets a reference to the given string and assigns it to the ScenarioId field. +func (o *ScenarioAddColumnsResponse) SetScenarioId(v string) { + o.ScenarioId = &v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *ScenarioAddColumnsResponse) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddColumnsResponse) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *ScenarioAddColumnsResponse) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *ScenarioAddColumnsResponse) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetColumns returns the Columns field value if set, zero value otherwise. +func (o *ScenarioAddColumnsResponse) GetColumns() []string { + if o == nil || IsNil(o.Columns) { + var ret []string + return ret + } + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddColumnsResponse) GetColumnsOk() ([]string, bool) { + if o == nil || IsNil(o.Columns) { + return nil, false + } + return o.Columns, true +} + +// HasColumns returns a boolean if a field has been set. +func (o *ScenarioAddColumnsResponse) HasColumns() bool { + if o != nil && !IsNil(o.Columns) { + return true + } + + return false +} + +// SetColumns gets a reference to the given []string and assigns it to the Columns field. +func (o *ScenarioAddColumnsResponse) SetColumns(v []string) { + o.Columns = v +} + +func (o ScenarioAddColumnsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioAddColumnsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.ScenarioId) { + toSerialize["scenario_id"] = o.ScenarioId + } + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if !IsNil(o.Columns) { + toSerialize["columns"] = o.Columns + } + return toSerialize, nil +} + +type NullableScenarioAddColumnsResponse struct { + value *ScenarioAddColumnsResponse + isSet bool +} + +func (v NullableScenarioAddColumnsResponse) Get() *ScenarioAddColumnsResponse { + return v.value +} + +func (v *NullableScenarioAddColumnsResponse) Set(val *ScenarioAddColumnsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioAddColumnsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioAddColumnsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioAddColumnsResponse(val *ScenarioAddColumnsResponse) *NullableScenarioAddColumnsResponse { + return &NullableScenarioAddColumnsResponse{value: val, isSet: true} +} + +func (v NullableScenarioAddColumnsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioAddColumnsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_add_rows_request.go b/go/futureagi/model_scenario_add_rows_request.go new file mode 100644 index 0000000..88cbff1 --- /dev/null +++ b/go/futureagi/model_scenario_add_rows_request.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScenarioAddRowsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioAddRowsRequest{} + +// ScenarioAddRowsRequest struct for ScenarioAddRowsRequest +type ScenarioAddRowsRequest struct { + NumRows int32 `json:"num_rows"` + Description *string `json:"description,omitempty"` +} + +type _ScenarioAddRowsRequest ScenarioAddRowsRequest + +// NewScenarioAddRowsRequest instantiates a new ScenarioAddRowsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioAddRowsRequest(numRows int32) *ScenarioAddRowsRequest { + this := ScenarioAddRowsRequest{} + this.NumRows = numRows + return &this +} + +// NewScenarioAddRowsRequestWithDefaults instantiates a new ScenarioAddRowsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioAddRowsRequestWithDefaults() *ScenarioAddRowsRequest { + this := ScenarioAddRowsRequest{} + return &this +} + +// GetNumRows returns the NumRows field value +func (o *ScenarioAddRowsRequest) GetNumRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value +// and a boolean to check if the value has been set. +func (o *ScenarioAddRowsRequest) GetNumRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumRows, true +} + +// SetNumRows sets field value +func (o *ScenarioAddRowsRequest) SetNumRows(v int32) { + o.NumRows = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ScenarioAddRowsRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddRowsRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ScenarioAddRowsRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ScenarioAddRowsRequest) SetDescription(v string) { + o.Description = &v +} + +func (o ScenarioAddRowsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioAddRowsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["num_rows"] = o.NumRows + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +func (o *ScenarioAddRowsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "num_rows", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScenarioAddRowsRequest := _ScenarioAddRowsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScenarioAddRowsRequest) + + if err != nil { + return err + } + + *o = ScenarioAddRowsRequest(varScenarioAddRowsRequest) + + return err +} + +type NullableScenarioAddRowsRequest struct { + value *ScenarioAddRowsRequest + isSet bool +} + +func (v NullableScenarioAddRowsRequest) Get() *ScenarioAddRowsRequest { + return v.value +} + +func (v *NullableScenarioAddRowsRequest) Set(val *ScenarioAddRowsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioAddRowsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioAddRowsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioAddRowsRequest(val *ScenarioAddRowsRequest) *NullableScenarioAddRowsRequest { + return &NullableScenarioAddRowsRequest{value: val, isSet: true} +} + +func (v NullableScenarioAddRowsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioAddRowsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_add_rows_response.go b/go/futureagi/model_scenario_add_rows_response.go new file mode 100644 index 0000000..3112f73 --- /dev/null +++ b/go/futureagi/model_scenario_add_rows_response.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioAddRowsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioAddRowsResponse{} + +// ScenarioAddRowsResponse struct for ScenarioAddRowsResponse +type ScenarioAddRowsResponse struct { + Message *string `json:"message,omitempty"` + ScenarioId *string `json:"scenario_id,omitempty"` + DatasetId *string `json:"dataset_id,omitempty"` + NumRows *int32 `json:"num_rows,omitempty"` +} + +// NewScenarioAddRowsResponse instantiates a new ScenarioAddRowsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioAddRowsResponse() *ScenarioAddRowsResponse { + this := ScenarioAddRowsResponse{} + return &this +} + +// NewScenarioAddRowsResponseWithDefaults instantiates a new ScenarioAddRowsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioAddRowsResponseWithDefaults() *ScenarioAddRowsResponse { + this := ScenarioAddRowsResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ScenarioAddRowsResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddRowsResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ScenarioAddRowsResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ScenarioAddRowsResponse) SetMessage(v string) { + o.Message = &v +} + +// GetScenarioId returns the ScenarioId field value if set, zero value otherwise. +func (o *ScenarioAddRowsResponse) GetScenarioId() string { + if o == nil || IsNil(o.ScenarioId) { + var ret string + return ret + } + return *o.ScenarioId +} + +// GetScenarioIdOk returns a tuple with the ScenarioId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddRowsResponse) GetScenarioIdOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioId) { + return nil, false + } + return o.ScenarioId, true +} + +// HasScenarioId returns a boolean if a field has been set. +func (o *ScenarioAddRowsResponse) HasScenarioId() bool { + if o != nil && !IsNil(o.ScenarioId) { + return true + } + + return false +} + +// SetScenarioId gets a reference to the given string and assigns it to the ScenarioId field. +func (o *ScenarioAddRowsResponse) SetScenarioId(v string) { + o.ScenarioId = &v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *ScenarioAddRowsResponse) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddRowsResponse) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *ScenarioAddRowsResponse) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *ScenarioAddRowsResponse) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetNumRows returns the NumRows field value if set, zero value otherwise. +func (o *ScenarioAddRowsResponse) GetNumRows() int32 { + if o == nil || IsNil(o.NumRows) { + var ret int32 + return ret + } + return *o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioAddRowsResponse) GetNumRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NumRows) { + return nil, false + } + return o.NumRows, true +} + +// HasNumRows returns a boolean if a field has been set. +func (o *ScenarioAddRowsResponse) HasNumRows() bool { + if o != nil && !IsNil(o.NumRows) { + return true + } + + return false +} + +// SetNumRows gets a reference to the given int32 and assigns it to the NumRows field. +func (o *ScenarioAddRowsResponse) SetNumRows(v int32) { + o.NumRows = &v +} + +func (o ScenarioAddRowsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioAddRowsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.ScenarioId) { + toSerialize["scenario_id"] = o.ScenarioId + } + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if !IsNil(o.NumRows) { + toSerialize["num_rows"] = o.NumRows + } + return toSerialize, nil +} + +type NullableScenarioAddRowsResponse struct { + value *ScenarioAddRowsResponse + isSet bool +} + +func (v NullableScenarioAddRowsResponse) Get() *ScenarioAddRowsResponse { + return v.value +} + +func (v *NullableScenarioAddRowsResponse) Set(val *ScenarioAddRowsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioAddRowsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioAddRowsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioAddRowsResponse(val *ScenarioAddRowsResponse) *NullableScenarioAddRowsResponse { + return &NullableScenarioAddRowsResponse{value: val, isSet: true} +} + +func (v NullableScenarioAddRowsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioAddRowsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_create_request.go b/go/futureagi/model_scenario_create_request.go new file mode 100644 index 0000000..0940c46 --- /dev/null +++ b/go/futureagi/model_scenario_create_request.go @@ -0,0 +1,1265 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScenarioCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioCreateRequest{} + +// ScenarioCreateRequest struct for ScenarioCreateRequest +type ScenarioCreateRequest struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + DatasetId *string `json:"dataset_id,omitempty"` + Kind *string `json:"kind,omitempty"` + ScriptUrl NullableString `json:"script_url,omitempty"` + AgentDefinitionId *string `json:"agent_definition_id,omitempty"` + AgentDefinitionVersionId NullableString `json:"agent_definition_version_id,omitempty"` + CustomInstruction *string `json:"custom_instruction,omitempty"` + NoOfRows *int32 `json:"no_of_rows,omitempty"` + GenerateGraph *bool `json:"generate_graph,omitempty"` + Graph map[string]interface{} `json:"graph,omitempty"` + SourceType *string `json:"source_type,omitempty"` + PromptTemplateId NullableString `json:"prompt_template_id,omitempty"` + PromptVersionId NullableString `json:"prompt_version_id,omitempty"` + AddPersonaAutomatically *bool `json:"add_persona_automatically,omitempty"` + Personas []string `json:"personas,omitempty"` + CustomColumns []ColumnDefinition `json:"custom_columns,omitempty"` + AgentName *string `json:"agent_name,omitempty"` + AgentPrompt *string `json:"agent_prompt,omitempty"` + VoiceProvider *string `json:"voice_provider,omitempty"` + VoiceName *string `json:"voice_name,omitempty"` + Model *string `json:"model,omitempty"` + LlmTemperature *float32 `json:"llm_temperature,omitempty"` + InitialMessage *string `json:"initial_message,omitempty"` + MaxCallDurationInMinutes *int32 `json:"max_call_duration_in_minutes,omitempty"` + InterruptSensitivity *float32 `json:"interrupt_sensitivity,omitempty"` + ConversationSpeed *float32 `json:"conversation_speed,omitempty"` + FinishedSpeakingSensitivity *float32 `json:"finished_speaking_sensitivity,omitempty"` + InitialMessageDelay *int32 `json:"initial_message_delay,omitempty"` +} + +type _ScenarioCreateRequest ScenarioCreateRequest + +// NewScenarioCreateRequest instantiates a new ScenarioCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioCreateRequest(name string) *ScenarioCreateRequest { + this := ScenarioCreateRequest{} + this.Name = name + var kind string = "dataset" + this.Kind = &kind + var noOfRows int32 = 20 + this.NoOfRows = &noOfRows + var generateGraph bool = false + this.GenerateGraph = &generateGraph + var sourceType string = "agent_definition" + this.SourceType = &sourceType + var addPersonaAutomatically bool = false + this.AddPersonaAutomatically = &addPersonaAutomatically + var voiceProvider string = "elevenlabs" + this.VoiceProvider = &voiceProvider + var voiceName string = "marissa" + this.VoiceName = &voiceName + var model string = "gpt-4" + this.Model = &model + var llmTemperature float32 = 0.7 + this.LlmTemperature = &llmTemperature + var maxCallDurationInMinutes int32 = 30 + this.MaxCallDurationInMinutes = &maxCallDurationInMinutes + var interruptSensitivity float32 = 0.5 + this.InterruptSensitivity = &interruptSensitivity + var conversationSpeed float32 = 1 + this.ConversationSpeed = &conversationSpeed + var finishedSpeakingSensitivity float32 = 0.5 + this.FinishedSpeakingSensitivity = &finishedSpeakingSensitivity + var initialMessageDelay int32 = 0 + this.InitialMessageDelay = &initialMessageDelay + return &this +} + +// NewScenarioCreateRequestWithDefaults instantiates a new ScenarioCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioCreateRequestWithDefaults() *ScenarioCreateRequest { + this := ScenarioCreateRequest{} + var kind string = "dataset" + this.Kind = &kind + var noOfRows int32 = 20 + this.NoOfRows = &noOfRows + var generateGraph bool = false + this.GenerateGraph = &generateGraph + var sourceType string = "agent_definition" + this.SourceType = &sourceType + var addPersonaAutomatically bool = false + this.AddPersonaAutomatically = &addPersonaAutomatically + var voiceProvider string = "elevenlabs" + this.VoiceProvider = &voiceProvider + var voiceName string = "marissa" + this.VoiceName = &voiceName + var model string = "gpt-4" + this.Model = &model + var llmTemperature float32 = 0.7 + this.LlmTemperature = &llmTemperature + var maxCallDurationInMinutes int32 = 30 + this.MaxCallDurationInMinutes = &maxCallDurationInMinutes + var interruptSensitivity float32 = 0.5 + this.InterruptSensitivity = &interruptSensitivity + var conversationSpeed float32 = 1 + this.ConversationSpeed = &conversationSpeed + var finishedSpeakingSensitivity float32 = 0.5 + this.FinishedSpeakingSensitivity = &finishedSpeakingSensitivity + var initialMessageDelay int32 = 0 + this.InitialMessageDelay = &initialMessageDelay + return &this +} + +// GetName returns the Name field value +func (o *ScenarioCreateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ScenarioCreateRequest) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ScenarioCreateRequest) SetDescription(v string) { + o.Description = &v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId) { + var ret string + return ret + } + return *o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetDatasetIdOk() (*string, bool) { + if o == nil || IsNil(o.DatasetId) { + return nil, false + } + return o.DatasetId, true +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasDatasetId() bool { + if o != nil && !IsNil(o.DatasetId) { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given string and assigns it to the DatasetId field. +func (o *ScenarioCreateRequest) SetDatasetId(v string) { + o.DatasetId = &v +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetKind() string { + if o == nil || IsNil(o.Kind) { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetKindOk() (*string, bool) { + if o == nil || IsNil(o.Kind) { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasKind() bool { + if o != nil && !IsNil(o.Kind) { + return true + } + + return false +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *ScenarioCreateRequest) SetKind(v string) { + o.Kind = &v +} + +// GetScriptUrl returns the ScriptUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioCreateRequest) GetScriptUrl() string { + if o == nil || IsNil(o.ScriptUrl.Get()) { + var ret string + return ret + } + return *o.ScriptUrl.Get() +} + +// GetScriptUrlOk returns a tuple with the ScriptUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioCreateRequest) GetScriptUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScriptUrl.Get(), o.ScriptUrl.IsSet() +} + +// HasScriptUrl returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasScriptUrl() bool { + if o != nil && o.ScriptUrl.IsSet() { + return true + } + + return false +} + +// SetScriptUrl gets a reference to the given NullableString and assigns it to the ScriptUrl field. +func (o *ScenarioCreateRequest) SetScriptUrl(v string) { + o.ScriptUrl.Set(&v) +} + +// SetScriptUrlNil sets the value for ScriptUrl to be an explicit nil +func (o *ScenarioCreateRequest) SetScriptUrlNil() { + o.ScriptUrl.Set(nil) +} + +// UnsetScriptUrl ensures that no value is present for ScriptUrl, not even an explicit nil +func (o *ScenarioCreateRequest) UnsetScriptUrl() { + o.ScriptUrl.Unset() +} + +// GetAgentDefinitionId returns the AgentDefinitionId field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetAgentDefinitionId() string { + if o == nil || IsNil(o.AgentDefinitionId) { + var ret string + return ret + } + return *o.AgentDefinitionId +} + +// GetAgentDefinitionIdOk returns a tuple with the AgentDefinitionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetAgentDefinitionIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionId) { + return nil, false + } + return o.AgentDefinitionId, true +} + +// HasAgentDefinitionId returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasAgentDefinitionId() bool { + if o != nil && !IsNil(o.AgentDefinitionId) { + return true + } + + return false +} + +// SetAgentDefinitionId gets a reference to the given string and assigns it to the AgentDefinitionId field. +func (o *ScenarioCreateRequest) SetAgentDefinitionId(v string) { + o.AgentDefinitionId = &v +} + +// GetAgentDefinitionVersionId returns the AgentDefinitionVersionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioCreateRequest) GetAgentDefinitionVersionId() string { + if o == nil || IsNil(o.AgentDefinitionVersionId.Get()) { + var ret string + return ret + } + return *o.AgentDefinitionVersionId.Get() +} + +// GetAgentDefinitionVersionIdOk returns a tuple with the AgentDefinitionVersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioCreateRequest) GetAgentDefinitionVersionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentDefinitionVersionId.Get(), o.AgentDefinitionVersionId.IsSet() +} + +// HasAgentDefinitionVersionId returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasAgentDefinitionVersionId() bool { + if o != nil && o.AgentDefinitionVersionId.IsSet() { + return true + } + + return false +} + +// SetAgentDefinitionVersionId gets a reference to the given NullableString and assigns it to the AgentDefinitionVersionId field. +func (o *ScenarioCreateRequest) SetAgentDefinitionVersionId(v string) { + o.AgentDefinitionVersionId.Set(&v) +} + +// SetAgentDefinitionVersionIdNil sets the value for AgentDefinitionVersionId to be an explicit nil +func (o *ScenarioCreateRequest) SetAgentDefinitionVersionIdNil() { + o.AgentDefinitionVersionId.Set(nil) +} + +// UnsetAgentDefinitionVersionId ensures that no value is present for AgentDefinitionVersionId, not even an explicit nil +func (o *ScenarioCreateRequest) UnsetAgentDefinitionVersionId() { + o.AgentDefinitionVersionId.Unset() +} + +// GetCustomInstruction returns the CustomInstruction field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetCustomInstruction() string { + if o == nil || IsNil(o.CustomInstruction) { + var ret string + return ret + } + return *o.CustomInstruction +} + +// GetCustomInstructionOk returns a tuple with the CustomInstruction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetCustomInstructionOk() (*string, bool) { + if o == nil || IsNil(o.CustomInstruction) { + return nil, false + } + return o.CustomInstruction, true +} + +// HasCustomInstruction returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasCustomInstruction() bool { + if o != nil && !IsNil(o.CustomInstruction) { + return true + } + + return false +} + +// SetCustomInstruction gets a reference to the given string and assigns it to the CustomInstruction field. +func (o *ScenarioCreateRequest) SetCustomInstruction(v string) { + o.CustomInstruction = &v +} + +// GetNoOfRows returns the NoOfRows field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetNoOfRows() int32 { + if o == nil || IsNil(o.NoOfRows) { + var ret int32 + return ret + } + return *o.NoOfRows +} + +// GetNoOfRowsOk returns a tuple with the NoOfRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetNoOfRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NoOfRows) { + return nil, false + } + return o.NoOfRows, true +} + +// HasNoOfRows returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasNoOfRows() bool { + if o != nil && !IsNil(o.NoOfRows) { + return true + } + + return false +} + +// SetNoOfRows gets a reference to the given int32 and assigns it to the NoOfRows field. +func (o *ScenarioCreateRequest) SetNoOfRows(v int32) { + o.NoOfRows = &v +} + +// GetGenerateGraph returns the GenerateGraph field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetGenerateGraph() bool { + if o == nil || IsNil(o.GenerateGraph) { + var ret bool + return ret + } + return *o.GenerateGraph +} + +// GetGenerateGraphOk returns a tuple with the GenerateGraph field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetGenerateGraphOk() (*bool, bool) { + if o == nil || IsNil(o.GenerateGraph) { + return nil, false + } + return o.GenerateGraph, true +} + +// HasGenerateGraph returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasGenerateGraph() bool { + if o != nil && !IsNil(o.GenerateGraph) { + return true + } + + return false +} + +// SetGenerateGraph gets a reference to the given bool and assigns it to the GenerateGraph field. +func (o *ScenarioCreateRequest) SetGenerateGraph(v bool) { + o.GenerateGraph = &v +} + +// GetGraph returns the Graph field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetGraph() map[string]interface{} { + if o == nil || IsNil(o.Graph) { + var ret map[string]interface{} + return ret + } + return o.Graph +} + +// GetGraphOk returns a tuple with the Graph field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetGraphOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Graph) { + return map[string]interface{}{}, false + } + return o.Graph, true +} + +// HasGraph returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasGraph() bool { + if o != nil && !IsNil(o.Graph) { + return true + } + + return false +} + +// SetGraph gets a reference to the given map[string]interface{} and assigns it to the Graph field. +func (o *ScenarioCreateRequest) SetGraph(v map[string]interface{}) { + o.Graph = v +} + +// GetSourceType returns the SourceType field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetSourceType() string { + if o == nil || IsNil(o.SourceType) { + var ret string + return ret + } + return *o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetSourceTypeOk() (*string, bool) { + if o == nil || IsNil(o.SourceType) { + return nil, false + } + return o.SourceType, true +} + +// HasSourceType returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasSourceType() bool { + if o != nil && !IsNil(o.SourceType) { + return true + } + + return false +} + +// SetSourceType gets a reference to the given string and assigns it to the SourceType field. +func (o *ScenarioCreateRequest) SetSourceType(v string) { + o.SourceType = &v +} + +// GetPromptTemplateId returns the PromptTemplateId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioCreateRequest) GetPromptTemplateId() string { + if o == nil || IsNil(o.PromptTemplateId.Get()) { + var ret string + return ret + } + return *o.PromptTemplateId.Get() +} + +// GetPromptTemplateIdOk returns a tuple with the PromptTemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioCreateRequest) GetPromptTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptTemplateId.Get(), o.PromptTemplateId.IsSet() +} + +// HasPromptTemplateId returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasPromptTemplateId() bool { + if o != nil && o.PromptTemplateId.IsSet() { + return true + } + + return false +} + +// SetPromptTemplateId gets a reference to the given NullableString and assigns it to the PromptTemplateId field. +func (o *ScenarioCreateRequest) SetPromptTemplateId(v string) { + o.PromptTemplateId.Set(&v) +} + +// SetPromptTemplateIdNil sets the value for PromptTemplateId to be an explicit nil +func (o *ScenarioCreateRequest) SetPromptTemplateIdNil() { + o.PromptTemplateId.Set(nil) +} + +// UnsetPromptTemplateId ensures that no value is present for PromptTemplateId, not even an explicit nil +func (o *ScenarioCreateRequest) UnsetPromptTemplateId() { + o.PromptTemplateId.Unset() +} + +// GetPromptVersionId returns the PromptVersionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioCreateRequest) GetPromptVersionId() string { + if o == nil || IsNil(o.PromptVersionId.Get()) { + var ret string + return ret + } + return *o.PromptVersionId.Get() +} + +// GetPromptVersionIdOk returns a tuple with the PromptVersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioCreateRequest) GetPromptVersionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptVersionId.Get(), o.PromptVersionId.IsSet() +} + +// HasPromptVersionId returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasPromptVersionId() bool { + if o != nil && o.PromptVersionId.IsSet() { + return true + } + + return false +} + +// SetPromptVersionId gets a reference to the given NullableString and assigns it to the PromptVersionId field. +func (o *ScenarioCreateRequest) SetPromptVersionId(v string) { + o.PromptVersionId.Set(&v) +} + +// SetPromptVersionIdNil sets the value for PromptVersionId to be an explicit nil +func (o *ScenarioCreateRequest) SetPromptVersionIdNil() { + o.PromptVersionId.Set(nil) +} + +// UnsetPromptVersionId ensures that no value is present for PromptVersionId, not even an explicit nil +func (o *ScenarioCreateRequest) UnsetPromptVersionId() { + o.PromptVersionId.Unset() +} + +// GetAddPersonaAutomatically returns the AddPersonaAutomatically field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetAddPersonaAutomatically() bool { + if o == nil || IsNil(o.AddPersonaAutomatically) { + var ret bool + return ret + } + return *o.AddPersonaAutomatically +} + +// GetAddPersonaAutomaticallyOk returns a tuple with the AddPersonaAutomatically field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetAddPersonaAutomaticallyOk() (*bool, bool) { + if o == nil || IsNil(o.AddPersonaAutomatically) { + return nil, false + } + return o.AddPersonaAutomatically, true +} + +// HasAddPersonaAutomatically returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasAddPersonaAutomatically() bool { + if o != nil && !IsNil(o.AddPersonaAutomatically) { + return true + } + + return false +} + +// SetAddPersonaAutomatically gets a reference to the given bool and assigns it to the AddPersonaAutomatically field. +func (o *ScenarioCreateRequest) SetAddPersonaAutomatically(v bool) { + o.AddPersonaAutomatically = &v +} + +// GetPersonas returns the Personas field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetPersonas() []string { + if o == nil || IsNil(o.Personas) { + var ret []string + return ret + } + return o.Personas +} + +// GetPersonasOk returns a tuple with the Personas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetPersonasOk() ([]string, bool) { + if o == nil || IsNil(o.Personas) { + return nil, false + } + return o.Personas, true +} + +// HasPersonas returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasPersonas() bool { + if o != nil && !IsNil(o.Personas) { + return true + } + + return false +} + +// SetPersonas gets a reference to the given []string and assigns it to the Personas field. +func (o *ScenarioCreateRequest) SetPersonas(v []string) { + o.Personas = v +} + +// GetCustomColumns returns the CustomColumns field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetCustomColumns() []ColumnDefinition { + if o == nil || IsNil(o.CustomColumns) { + var ret []ColumnDefinition + return ret + } + return o.CustomColumns +} + +// GetCustomColumnsOk returns a tuple with the CustomColumns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetCustomColumnsOk() ([]ColumnDefinition, bool) { + if o == nil || IsNil(o.CustomColumns) { + return nil, false + } + return o.CustomColumns, true +} + +// HasCustomColumns returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasCustomColumns() bool { + if o != nil && !IsNil(o.CustomColumns) { + return true + } + + return false +} + +// SetCustomColumns gets a reference to the given []ColumnDefinition and assigns it to the CustomColumns field. +func (o *ScenarioCreateRequest) SetCustomColumns(v []ColumnDefinition) { + o.CustomColumns = v +} + +// GetAgentName returns the AgentName field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetAgentName() string { + if o == nil || IsNil(o.AgentName) { + var ret string + return ret + } + return *o.AgentName +} + +// GetAgentNameOk returns a tuple with the AgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentName) { + return nil, false + } + return o.AgentName, true +} + +// HasAgentName returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasAgentName() bool { + if o != nil && !IsNil(o.AgentName) { + return true + } + + return false +} + +// SetAgentName gets a reference to the given string and assigns it to the AgentName field. +func (o *ScenarioCreateRequest) SetAgentName(v string) { + o.AgentName = &v +} + +// GetAgentPrompt returns the AgentPrompt field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetAgentPrompt() string { + if o == nil || IsNil(o.AgentPrompt) { + var ret string + return ret + } + return *o.AgentPrompt +} + +// GetAgentPromptOk returns a tuple with the AgentPrompt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetAgentPromptOk() (*string, bool) { + if o == nil || IsNil(o.AgentPrompt) { + return nil, false + } + return o.AgentPrompt, true +} + +// HasAgentPrompt returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasAgentPrompt() bool { + if o != nil && !IsNil(o.AgentPrompt) { + return true + } + + return false +} + +// SetAgentPrompt gets a reference to the given string and assigns it to the AgentPrompt field. +func (o *ScenarioCreateRequest) SetAgentPrompt(v string) { + o.AgentPrompt = &v +} + +// GetVoiceProvider returns the VoiceProvider field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetVoiceProvider() string { + if o == nil || IsNil(o.VoiceProvider) { + var ret string + return ret + } + return *o.VoiceProvider +} + +// GetVoiceProviderOk returns a tuple with the VoiceProvider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetVoiceProviderOk() (*string, bool) { + if o == nil || IsNil(o.VoiceProvider) { + return nil, false + } + return o.VoiceProvider, true +} + +// HasVoiceProvider returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasVoiceProvider() bool { + if o != nil && !IsNil(o.VoiceProvider) { + return true + } + + return false +} + +// SetVoiceProvider gets a reference to the given string and assigns it to the VoiceProvider field. +func (o *ScenarioCreateRequest) SetVoiceProvider(v string) { + o.VoiceProvider = &v +} + +// GetVoiceName returns the VoiceName field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetVoiceName() string { + if o == nil || IsNil(o.VoiceName) { + var ret string + return ret + } + return *o.VoiceName +} + +// GetVoiceNameOk returns a tuple with the VoiceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetVoiceNameOk() (*string, bool) { + if o == nil || IsNil(o.VoiceName) { + return nil, false + } + return o.VoiceName, true +} + +// HasVoiceName returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasVoiceName() bool { + if o != nil && !IsNil(o.VoiceName) { + return true + } + + return false +} + +// SetVoiceName gets a reference to the given string and assigns it to the VoiceName field. +func (o *ScenarioCreateRequest) SetVoiceName(v string) { + o.VoiceName = &v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *ScenarioCreateRequest) SetModel(v string) { + o.Model = &v +} + +// GetLlmTemperature returns the LlmTemperature field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetLlmTemperature() float32 { + if o == nil || IsNil(o.LlmTemperature) { + var ret float32 + return ret + } + return *o.LlmTemperature +} + +// GetLlmTemperatureOk returns a tuple with the LlmTemperature field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetLlmTemperatureOk() (*float32, bool) { + if o == nil || IsNil(o.LlmTemperature) { + return nil, false + } + return o.LlmTemperature, true +} + +// HasLlmTemperature returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasLlmTemperature() bool { + if o != nil && !IsNil(o.LlmTemperature) { + return true + } + + return false +} + +// SetLlmTemperature gets a reference to the given float32 and assigns it to the LlmTemperature field. +func (o *ScenarioCreateRequest) SetLlmTemperature(v float32) { + o.LlmTemperature = &v +} + +// GetInitialMessage returns the InitialMessage field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetInitialMessage() string { + if o == nil || IsNil(o.InitialMessage) { + var ret string + return ret + } + return *o.InitialMessage +} + +// GetInitialMessageOk returns a tuple with the InitialMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetInitialMessageOk() (*string, bool) { + if o == nil || IsNil(o.InitialMessage) { + return nil, false + } + return o.InitialMessage, true +} + +// HasInitialMessage returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasInitialMessage() bool { + if o != nil && !IsNil(o.InitialMessage) { + return true + } + + return false +} + +// SetInitialMessage gets a reference to the given string and assigns it to the InitialMessage field. +func (o *ScenarioCreateRequest) SetInitialMessage(v string) { + o.InitialMessage = &v +} + +// GetMaxCallDurationInMinutes returns the MaxCallDurationInMinutes field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetMaxCallDurationInMinutes() int32 { + if o == nil || IsNil(o.MaxCallDurationInMinutes) { + var ret int32 + return ret + } + return *o.MaxCallDurationInMinutes +} + +// GetMaxCallDurationInMinutesOk returns a tuple with the MaxCallDurationInMinutes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetMaxCallDurationInMinutesOk() (*int32, bool) { + if o == nil || IsNil(o.MaxCallDurationInMinutes) { + return nil, false + } + return o.MaxCallDurationInMinutes, true +} + +// HasMaxCallDurationInMinutes returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasMaxCallDurationInMinutes() bool { + if o != nil && !IsNil(o.MaxCallDurationInMinutes) { + return true + } + + return false +} + +// SetMaxCallDurationInMinutes gets a reference to the given int32 and assigns it to the MaxCallDurationInMinutes field. +func (o *ScenarioCreateRequest) SetMaxCallDurationInMinutes(v int32) { + o.MaxCallDurationInMinutes = &v +} + +// GetInterruptSensitivity returns the InterruptSensitivity field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetInterruptSensitivity() float32 { + if o == nil || IsNil(o.InterruptSensitivity) { + var ret float32 + return ret + } + return *o.InterruptSensitivity +} + +// GetInterruptSensitivityOk returns a tuple with the InterruptSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetInterruptSensitivityOk() (*float32, bool) { + if o == nil || IsNil(o.InterruptSensitivity) { + return nil, false + } + return o.InterruptSensitivity, true +} + +// HasInterruptSensitivity returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasInterruptSensitivity() bool { + if o != nil && !IsNil(o.InterruptSensitivity) { + return true + } + + return false +} + +// SetInterruptSensitivity gets a reference to the given float32 and assigns it to the InterruptSensitivity field. +func (o *ScenarioCreateRequest) SetInterruptSensitivity(v float32) { + o.InterruptSensitivity = &v +} + +// GetConversationSpeed returns the ConversationSpeed field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetConversationSpeed() float32 { + if o == nil || IsNil(o.ConversationSpeed) { + var ret float32 + return ret + } + return *o.ConversationSpeed +} + +// GetConversationSpeedOk returns a tuple with the ConversationSpeed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetConversationSpeedOk() (*float32, bool) { + if o == nil || IsNil(o.ConversationSpeed) { + return nil, false + } + return o.ConversationSpeed, true +} + +// HasConversationSpeed returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasConversationSpeed() bool { + if o != nil && !IsNil(o.ConversationSpeed) { + return true + } + + return false +} + +// SetConversationSpeed gets a reference to the given float32 and assigns it to the ConversationSpeed field. +func (o *ScenarioCreateRequest) SetConversationSpeed(v float32) { + o.ConversationSpeed = &v +} + +// GetFinishedSpeakingSensitivity returns the FinishedSpeakingSensitivity field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetFinishedSpeakingSensitivity() float32 { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + var ret float32 + return ret + } + return *o.FinishedSpeakingSensitivity +} + +// GetFinishedSpeakingSensitivityOk returns a tuple with the FinishedSpeakingSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetFinishedSpeakingSensitivityOk() (*float32, bool) { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + return nil, false + } + return o.FinishedSpeakingSensitivity, true +} + +// HasFinishedSpeakingSensitivity returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasFinishedSpeakingSensitivity() bool { + if o != nil && !IsNil(o.FinishedSpeakingSensitivity) { + return true + } + + return false +} + +// SetFinishedSpeakingSensitivity gets a reference to the given float32 and assigns it to the FinishedSpeakingSensitivity field. +func (o *ScenarioCreateRequest) SetFinishedSpeakingSensitivity(v float32) { + o.FinishedSpeakingSensitivity = &v +} + +// GetInitialMessageDelay returns the InitialMessageDelay field value if set, zero value otherwise. +func (o *ScenarioCreateRequest) GetInitialMessageDelay() int32 { + if o == nil || IsNil(o.InitialMessageDelay) { + var ret int32 + return ret + } + return *o.InitialMessageDelay +} + +// GetInitialMessageDelayOk returns a tuple with the InitialMessageDelay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateRequest) GetInitialMessageDelayOk() (*int32, bool) { + if o == nil || IsNil(o.InitialMessageDelay) { + return nil, false + } + return o.InitialMessageDelay, true +} + +// HasInitialMessageDelay returns a boolean if a field has been set. +func (o *ScenarioCreateRequest) HasInitialMessageDelay() bool { + if o != nil && !IsNil(o.InitialMessageDelay) { + return true + } + + return false +} + +// SetInitialMessageDelay gets a reference to the given int32 and assigns it to the InitialMessageDelay field. +func (o *ScenarioCreateRequest) SetInitialMessageDelay(v int32) { + o.InitialMessageDelay = &v +} + +func (o ScenarioCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DatasetId) { + toSerialize["dataset_id"] = o.DatasetId + } + if !IsNil(o.Kind) { + toSerialize["kind"] = o.Kind + } + if o.ScriptUrl.IsSet() { + toSerialize["script_url"] = o.ScriptUrl.Get() + } + if !IsNil(o.AgentDefinitionId) { + toSerialize["agent_definition_id"] = o.AgentDefinitionId + } + if o.AgentDefinitionVersionId.IsSet() { + toSerialize["agent_definition_version_id"] = o.AgentDefinitionVersionId.Get() + } + if !IsNil(o.CustomInstruction) { + toSerialize["custom_instruction"] = o.CustomInstruction + } + if !IsNil(o.NoOfRows) { + toSerialize["no_of_rows"] = o.NoOfRows + } + if !IsNil(o.GenerateGraph) { + toSerialize["generate_graph"] = o.GenerateGraph + } + if !IsNil(o.Graph) { + toSerialize["graph"] = o.Graph + } + if !IsNil(o.SourceType) { + toSerialize["source_type"] = o.SourceType + } + if o.PromptTemplateId.IsSet() { + toSerialize["prompt_template_id"] = o.PromptTemplateId.Get() + } + if o.PromptVersionId.IsSet() { + toSerialize["prompt_version_id"] = o.PromptVersionId.Get() + } + if !IsNil(o.AddPersonaAutomatically) { + toSerialize["add_persona_automatically"] = o.AddPersonaAutomatically + } + if !IsNil(o.Personas) { + toSerialize["personas"] = o.Personas + } + if !IsNil(o.CustomColumns) { + toSerialize["custom_columns"] = o.CustomColumns + } + if !IsNil(o.AgentName) { + toSerialize["agent_name"] = o.AgentName + } + if !IsNil(o.AgentPrompt) { + toSerialize["agent_prompt"] = o.AgentPrompt + } + if !IsNil(o.VoiceProvider) { + toSerialize["voice_provider"] = o.VoiceProvider + } + if !IsNil(o.VoiceName) { + toSerialize["voice_name"] = o.VoiceName + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.LlmTemperature) { + toSerialize["llm_temperature"] = o.LlmTemperature + } + if !IsNil(o.InitialMessage) { + toSerialize["initial_message"] = o.InitialMessage + } + if !IsNil(o.MaxCallDurationInMinutes) { + toSerialize["max_call_duration_in_minutes"] = o.MaxCallDurationInMinutes + } + if !IsNil(o.InterruptSensitivity) { + toSerialize["interrupt_sensitivity"] = o.InterruptSensitivity + } + if !IsNil(o.ConversationSpeed) { + toSerialize["conversation_speed"] = o.ConversationSpeed + } + if !IsNil(o.FinishedSpeakingSensitivity) { + toSerialize["finished_speaking_sensitivity"] = o.FinishedSpeakingSensitivity + } + if !IsNil(o.InitialMessageDelay) { + toSerialize["initial_message_delay"] = o.InitialMessageDelay + } + return toSerialize, nil +} + +func (o *ScenarioCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScenarioCreateRequest := _ScenarioCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScenarioCreateRequest) + + if err != nil { + return err + } + + *o = ScenarioCreateRequest(varScenarioCreateRequest) + + return err +} + +type NullableScenarioCreateRequest struct { + value *ScenarioCreateRequest + isSet bool +} + +func (v NullableScenarioCreateRequest) Get() *ScenarioCreateRequest { + return v.value +} + +func (v *NullableScenarioCreateRequest) Set(val *ScenarioCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioCreateRequest(val *ScenarioCreateRequest) *NullableScenarioCreateRequest { + return &NullableScenarioCreateRequest{value: val, isSet: true} +} + +func (v NullableScenarioCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_create_response.go b/go/futureagi/model_scenario_create_response.go new file mode 100644 index 0000000..29c057b --- /dev/null +++ b/go/futureagi/model_scenario_create_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioCreateResponse{} + +// ScenarioCreateResponse struct for ScenarioCreateResponse +type ScenarioCreateResponse struct { + Message *string `json:"message,omitempty"` + Scenario *ScenarioResponse `json:"scenario,omitempty"` + Status *string `json:"status,omitempty"` +} + +// NewScenarioCreateResponse instantiates a new ScenarioCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioCreateResponse() *ScenarioCreateResponse { + this := ScenarioCreateResponse{} + return &this +} + +// NewScenarioCreateResponseWithDefaults instantiates a new ScenarioCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioCreateResponseWithDefaults() *ScenarioCreateResponse { + this := ScenarioCreateResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ScenarioCreateResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ScenarioCreateResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ScenarioCreateResponse) SetMessage(v string) { + o.Message = &v +} + +// GetScenario returns the Scenario field value if set, zero value otherwise. +func (o *ScenarioCreateResponse) GetScenario() ScenarioResponse { + if o == nil || IsNil(o.Scenario) { + var ret ScenarioResponse + return ret + } + return *o.Scenario +} + +// GetScenarioOk returns a tuple with the Scenario field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateResponse) GetScenarioOk() (*ScenarioResponse, bool) { + if o == nil || IsNil(o.Scenario) { + return nil, false + } + return o.Scenario, true +} + +// HasScenario returns a boolean if a field has been set. +func (o *ScenarioCreateResponse) HasScenario() bool { + if o != nil && !IsNil(o.Scenario) { + return true + } + + return false +} + +// SetScenario gets a reference to the given ScenarioResponse and assigns it to the Scenario field. +func (o *ScenarioCreateResponse) SetScenario(v ScenarioResponse) { + o.Scenario = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScenarioCreateResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioCreateResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScenarioCreateResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ScenarioCreateResponse) SetStatus(v string) { + o.Status = &v +} + +func (o ScenarioCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Scenario) { + toSerialize["scenario"] = o.Scenario + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableScenarioCreateResponse struct { + value *ScenarioCreateResponse + isSet bool +} + +func (v NullableScenarioCreateResponse) Get() *ScenarioCreateResponse { + return v.value +} + +func (v *NullableScenarioCreateResponse) Set(val *ScenarioCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioCreateResponse(val *ScenarioCreateResponse) *NullableScenarioCreateResponse { + return &NullableScenarioCreateResponse{value: val, isSet: true} +} + +func (v NullableScenarioCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_delete_response.go b/go/futureagi/model_scenario_delete_response.go new file mode 100644 index 0000000..6cad18d --- /dev/null +++ b/go/futureagi/model_scenario_delete_response.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioDeleteResponse{} + +// ScenarioDeleteResponse struct for ScenarioDeleteResponse +type ScenarioDeleteResponse struct { + Message *string `json:"message,omitempty"` +} + +// NewScenarioDeleteResponse instantiates a new ScenarioDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioDeleteResponse() *ScenarioDeleteResponse { + this := ScenarioDeleteResponse{} + return &this +} + +// NewScenarioDeleteResponseWithDefaults instantiates a new ScenarioDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioDeleteResponseWithDefaults() *ScenarioDeleteResponse { + this := ScenarioDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ScenarioDeleteResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ScenarioDeleteResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ScenarioDeleteResponse) SetMessage(v string) { + o.Message = &v +} + +func (o ScenarioDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableScenarioDeleteResponse struct { + value *ScenarioDeleteResponse + isSet bool +} + +func (v NullableScenarioDeleteResponse) Get() *ScenarioDeleteResponse { + return v.value +} + +func (v *NullableScenarioDeleteResponse) Set(val *ScenarioDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioDeleteResponse(val *ScenarioDeleteResponse) *NullableScenarioDeleteResponse { + return &NullableScenarioDeleteResponse{value: val, isSet: true} +} + +func (v NullableScenarioDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_detail_response.go b/go/futureagi/model_scenario_detail_response.go new file mode 100644 index 0000000..adacafa --- /dev/null +++ b/go/futureagi/model_scenario_detail_response.go @@ -0,0 +1,757 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the ScenarioDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioDetailResponse{} + +// ScenarioDetailResponse struct for ScenarioDetailResponse +type ScenarioDetailResponse struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description NullableString `json:"description,omitempty"` + Source *string `json:"source,omitempty"` + ScenarioType *string `json:"scenario_type,omitempty"` + DatasetId NullableString `json:"dataset_id,omitempty"` + Organization *string `json:"organization,omitempty"` + Dataset NullableString `json:"dataset,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Deleted *bool `json:"deleted,omitempty"` + DeletedAt NullableTime `json:"deleted_at,omitempty"` + Status *string `json:"status,omitempty"` + AgentType NullableString `json:"agent_type,omitempty"` + Graph *map[string]string `json:"graph,omitempty"` + Prompts []ScenarioPromptItem `json:"prompts,omitempty"` + DatasetRows *int32 `json:"dataset_rows,omitempty"` +} + +// NewScenarioDetailResponse instantiates a new ScenarioDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioDetailResponse() *ScenarioDetailResponse { + this := ScenarioDetailResponse{} + return &this +} + +// NewScenarioDetailResponseWithDefaults instantiates a new ScenarioDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioDetailResponseWithDefaults() *ScenarioDetailResponse { + this := ScenarioDetailResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ScenarioDetailResponse) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ScenarioDetailResponse) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioDetailResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioDetailResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ScenarioDetailResponse) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ScenarioDetailResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ScenarioDetailResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *ScenarioDetailResponse) SetSource(v string) { + o.Source = &v +} + +// GetScenarioType returns the ScenarioType field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetScenarioType() string { + if o == nil || IsNil(o.ScenarioType) { + var ret string + return ret + } + return *o.ScenarioType +} + +// GetScenarioTypeOk returns a tuple with the ScenarioType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetScenarioTypeOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioType) { + return nil, false + } + return o.ScenarioType, true +} + +// HasScenarioType returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasScenarioType() bool { + if o != nil && !IsNil(o.ScenarioType) { + return true + } + + return false +} + +// SetScenarioType gets a reference to the given string and assigns it to the ScenarioType field. +func (o *ScenarioDetailResponse) SetScenarioType(v string) { + o.ScenarioType = &v +} + +// GetDatasetId returns the DatasetId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioDetailResponse) GetDatasetId() string { + if o == nil || IsNil(o.DatasetId.Get()) { + var ret string + return ret + } + return *o.DatasetId.Get() +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioDetailResponse) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DatasetId.Get(), o.DatasetId.IsSet() +} + +// HasDatasetId returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasDatasetId() bool { + if o != nil && o.DatasetId.IsSet() { + return true + } + + return false +} + +// SetDatasetId gets a reference to the given NullableString and assigns it to the DatasetId field. +func (o *ScenarioDetailResponse) SetDatasetId(v string) { + o.DatasetId.Set(&v) +} + +// SetDatasetIdNil sets the value for DatasetId to be an explicit nil +func (o *ScenarioDetailResponse) SetDatasetIdNil() { + o.DatasetId.Set(nil) +} + +// UnsetDatasetId ensures that no value is present for DatasetId, not even an explicit nil +func (o *ScenarioDetailResponse) UnsetDatasetId() { + o.DatasetId.Unset() +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *ScenarioDetailResponse) SetOrganization(v string) { + o.Organization = &v +} + +// GetDataset returns the Dataset field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioDetailResponse) GetDataset() string { + if o == nil || IsNil(o.Dataset.Get()) { + var ret string + return ret + } + return *o.Dataset.Get() +} + +// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioDetailResponse) GetDatasetOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Dataset.Get(), o.Dataset.IsSet() +} + +// HasDataset returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasDataset() bool { + if o != nil && o.Dataset.IsSet() { + return true + } + + return false +} + +// SetDataset gets a reference to the given NullableString and assigns it to the Dataset field. +func (o *ScenarioDetailResponse) SetDataset(v string) { + o.Dataset.Set(&v) +} + +// SetDatasetNil sets the value for Dataset to be an explicit nil +func (o *ScenarioDetailResponse) SetDatasetNil() { + o.Dataset.Set(nil) +} + +// UnsetDataset ensures that no value is present for Dataset, not even an explicit nil +func (o *ScenarioDetailResponse) UnsetDataset() { + o.Dataset.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ScenarioDetailResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ScenarioDetailResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetDeleted returns the Deleted field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetDeleted() bool { + if o == nil || IsNil(o.Deleted) { + var ret bool + return ret + } + return *o.Deleted +} + +// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetDeletedOk() (*bool, bool) { + if o == nil || IsNil(o.Deleted) { + return nil, false + } + return o.Deleted, true +} + +// HasDeleted returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasDeleted() bool { + if o != nil && !IsNil(o.Deleted) { + return true + } + + return false +} + +// SetDeleted gets a reference to the given bool and assigns it to the Deleted field. +func (o *ScenarioDetailResponse) SetDeleted(v bool) { + o.Deleted = &v +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioDetailResponse) GetDeletedAt() time.Time { + if o == nil || IsNil(o.DeletedAt.Get()) { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioDetailResponse) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *ScenarioDetailResponse) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} + +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *ScenarioDetailResponse) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *ScenarioDetailResponse) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ScenarioDetailResponse) SetStatus(v string) { + o.Status = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioDetailResponse) GetAgentType() string { + if o == nil || IsNil(o.AgentType.Get()) { + var ret string + return ret + } + return *o.AgentType.Get() +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioDetailResponse) GetAgentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AgentType.Get(), o.AgentType.IsSet() +} + +// HasAgentType returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasAgentType() bool { + if o != nil && o.AgentType.IsSet() { + return true + } + + return false +} + +// SetAgentType gets a reference to the given NullableString and assigns it to the AgentType field. +func (o *ScenarioDetailResponse) SetAgentType(v string) { + o.AgentType.Set(&v) +} + +// SetAgentTypeNil sets the value for AgentType to be an explicit nil +func (o *ScenarioDetailResponse) SetAgentTypeNil() { + o.AgentType.Set(nil) +} + +// UnsetAgentType ensures that no value is present for AgentType, not even an explicit nil +func (o *ScenarioDetailResponse) UnsetAgentType() { + o.AgentType.Unset() +} + +// GetGraph returns the Graph field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetGraph() map[string]string { + if o == nil || IsNil(o.Graph) { + var ret map[string]string + return ret + } + return *o.Graph +} + +// GetGraphOk returns a tuple with the Graph field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetGraphOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Graph) { + return nil, false + } + return o.Graph, true +} + +// HasGraph returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasGraph() bool { + if o != nil && !IsNil(o.Graph) { + return true + } + + return false +} + +// SetGraph gets a reference to the given map[string]string and assigns it to the Graph field. +func (o *ScenarioDetailResponse) SetGraph(v map[string]string) { + o.Graph = &v +} + +// GetPrompts returns the Prompts field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetPrompts() []ScenarioPromptItem { + if o == nil || IsNil(o.Prompts) { + var ret []ScenarioPromptItem + return ret + } + return o.Prompts +} + +// GetPromptsOk returns a tuple with the Prompts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetPromptsOk() ([]ScenarioPromptItem, bool) { + if o == nil || IsNil(o.Prompts) { + return nil, false + } + return o.Prompts, true +} + +// HasPrompts returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasPrompts() bool { + if o != nil && !IsNil(o.Prompts) { + return true + } + + return false +} + +// SetPrompts gets a reference to the given []ScenarioPromptItem and assigns it to the Prompts field. +func (o *ScenarioDetailResponse) SetPrompts(v []ScenarioPromptItem) { + o.Prompts = v +} + +// GetDatasetRows returns the DatasetRows field value if set, zero value otherwise. +func (o *ScenarioDetailResponse) GetDatasetRows() int32 { + if o == nil || IsNil(o.DatasetRows) { + var ret int32 + return ret + } + return *o.DatasetRows +} + +// GetDatasetRowsOk returns a tuple with the DatasetRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioDetailResponse) GetDatasetRowsOk() (*int32, bool) { + if o == nil || IsNil(o.DatasetRows) { + return nil, false + } + return o.DatasetRows, true +} + +// HasDatasetRows returns a boolean if a field has been set. +func (o *ScenarioDetailResponse) HasDatasetRows() bool { + if o != nil && !IsNil(o.DatasetRows) { + return true + } + + return false +} + +// SetDatasetRows gets a reference to the given int32 and assigns it to the DatasetRows field. +func (o *ScenarioDetailResponse) SetDatasetRows(v int32) { + o.DatasetRows = &v +} + +func (o ScenarioDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.ScenarioType) { + toSerialize["scenario_type"] = o.ScenarioType + } + if o.DatasetId.IsSet() { + toSerialize["dataset_id"] = o.DatasetId.Get() + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if o.Dataset.IsSet() { + toSerialize["dataset"] = o.Dataset.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Deleted) { + toSerialize["deleted"] = o.Deleted + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.AgentType.IsSet() { + toSerialize["agent_type"] = o.AgentType.Get() + } + if !IsNil(o.Graph) { + toSerialize["graph"] = o.Graph + } + if !IsNil(o.Prompts) { + toSerialize["prompts"] = o.Prompts + } + if !IsNil(o.DatasetRows) { + toSerialize["dataset_rows"] = o.DatasetRows + } + return toSerialize, nil +} + +type NullableScenarioDetailResponse struct { + value *ScenarioDetailResponse + isSet bool +} + +func (v NullableScenarioDetailResponse) Get() *ScenarioDetailResponse { + return v.value +} + +func (v *NullableScenarioDetailResponse) Set(val *ScenarioDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioDetailResponse(val *ScenarioDetailResponse) *NullableScenarioDetailResponse { + return &NullableScenarioDetailResponse{value: val, isSet: true} +} + +func (v NullableScenarioDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_edit_prompts_request.go b/go/futureagi/model_scenario_edit_prompts_request.go new file mode 100644 index 0000000..a8211ae --- /dev/null +++ b/go/futureagi/model_scenario_edit_prompts_request.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScenarioEditPromptsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioEditPromptsRequest{} + +// ScenarioEditPromptsRequest struct for ScenarioEditPromptsRequest +type ScenarioEditPromptsRequest struct { + Prompts string `json:"prompts"` +} + +type _ScenarioEditPromptsRequest ScenarioEditPromptsRequest + +// NewScenarioEditPromptsRequest instantiates a new ScenarioEditPromptsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioEditPromptsRequest(prompts string) *ScenarioEditPromptsRequest { + this := ScenarioEditPromptsRequest{} + this.Prompts = prompts + return &this +} + +// NewScenarioEditPromptsRequestWithDefaults instantiates a new ScenarioEditPromptsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioEditPromptsRequestWithDefaults() *ScenarioEditPromptsRequest { + this := ScenarioEditPromptsRequest{} + return &this +} + +// GetPrompts returns the Prompts field value +func (o *ScenarioEditPromptsRequest) GetPrompts() string { + if o == nil { + var ret string + return ret + } + + return o.Prompts +} + +// GetPromptsOk returns a tuple with the Prompts field value +// and a boolean to check if the value has been set. +func (o *ScenarioEditPromptsRequest) GetPromptsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Prompts, true +} + +// SetPrompts sets field value +func (o *ScenarioEditPromptsRequest) SetPrompts(v string) { + o.Prompts = v +} + +func (o ScenarioEditPromptsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioEditPromptsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["prompts"] = o.Prompts + return toSerialize, nil +} + +func (o *ScenarioEditPromptsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "prompts", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScenarioEditPromptsRequest := _ScenarioEditPromptsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScenarioEditPromptsRequest) + + if err != nil { + return err + } + + *o = ScenarioEditPromptsRequest(varScenarioEditPromptsRequest) + + return err +} + +type NullableScenarioEditPromptsRequest struct { + value *ScenarioEditPromptsRequest + isSet bool +} + +func (v NullableScenarioEditPromptsRequest) Get() *ScenarioEditPromptsRequest { + return v.value +} + +func (v *NullableScenarioEditPromptsRequest) Set(val *ScenarioEditPromptsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioEditPromptsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioEditPromptsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioEditPromptsRequest(val *ScenarioEditPromptsRequest) *NullableScenarioEditPromptsRequest { + return &NullableScenarioEditPromptsRequest{value: val, isSet: true} +} + +func (v NullableScenarioEditPromptsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioEditPromptsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_edit_request.go b/go/futureagi/model_scenario_edit_request.go new file mode 100644 index 0000000..7fdc9ea --- /dev/null +++ b/go/futureagi/model_scenario_edit_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioEditRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioEditRequest{} + +// ScenarioEditRequest struct for ScenarioEditRequest +type ScenarioEditRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Graph map[string]interface{} `json:"graph,omitempty"` + Prompt *string `json:"prompt,omitempty"` +} + +// NewScenarioEditRequest instantiates a new ScenarioEditRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioEditRequest() *ScenarioEditRequest { + this := ScenarioEditRequest{} + return &this +} + +// NewScenarioEditRequestWithDefaults instantiates a new ScenarioEditRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioEditRequestWithDefaults() *ScenarioEditRequest { + this := ScenarioEditRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ScenarioEditRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioEditRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ScenarioEditRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ScenarioEditRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ScenarioEditRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioEditRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ScenarioEditRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ScenarioEditRequest) SetDescription(v string) { + o.Description = &v +} + +// GetGraph returns the Graph field value if set, zero value otherwise. +func (o *ScenarioEditRequest) GetGraph() map[string]interface{} { + if o == nil || IsNil(o.Graph) { + var ret map[string]interface{} + return ret + } + return o.Graph +} + +// GetGraphOk returns a tuple with the Graph field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioEditRequest) GetGraphOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Graph) { + return map[string]interface{}{}, false + } + return o.Graph, true +} + +// HasGraph returns a boolean if a field has been set. +func (o *ScenarioEditRequest) HasGraph() bool { + if o != nil && !IsNil(o.Graph) { + return true + } + + return false +} + +// SetGraph gets a reference to the given map[string]interface{} and assigns it to the Graph field. +func (o *ScenarioEditRequest) SetGraph(v map[string]interface{}) { + o.Graph = v +} + +// GetPrompt returns the Prompt field value if set, zero value otherwise. +func (o *ScenarioEditRequest) GetPrompt() string { + if o == nil || IsNil(o.Prompt) { + var ret string + return ret + } + return *o.Prompt +} + +// GetPromptOk returns a tuple with the Prompt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioEditRequest) GetPromptOk() (*string, bool) { + if o == nil || IsNil(o.Prompt) { + return nil, false + } + return o.Prompt, true +} + +// HasPrompt returns a boolean if a field has been set. +func (o *ScenarioEditRequest) HasPrompt() bool { + if o != nil && !IsNil(o.Prompt) { + return true + } + + return false +} + +// SetPrompt gets a reference to the given string and assigns it to the Prompt field. +func (o *ScenarioEditRequest) SetPrompt(v string) { + o.Prompt = &v +} + +func (o ScenarioEditRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioEditRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Graph) { + toSerialize["graph"] = o.Graph + } + if !IsNil(o.Prompt) { + toSerialize["prompt"] = o.Prompt + } + return toSerialize, nil +} + +type NullableScenarioEditRequest struct { + value *ScenarioEditRequest + isSet bool +} + +func (v NullableScenarioEditRequest) Get() *ScenarioEditRequest { + return v.value +} + +func (v *NullableScenarioEditRequest) Set(val *ScenarioEditRequest) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioEditRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioEditRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioEditRequest(val *ScenarioEditRequest) *NullableScenarioEditRequest { + return &NullableScenarioEditRequest{value: val, isSet: true} +} + +func (v NullableScenarioEditRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioEditRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_edit_response.go b/go/futureagi/model_scenario_edit_response.go new file mode 100644 index 0000000..7df3ffa --- /dev/null +++ b/go/futureagi/model_scenario_edit_response.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioEditResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioEditResponse{} + +// ScenarioEditResponse struct for ScenarioEditResponse +type ScenarioEditResponse struct { + Message *string `json:"message,omitempty"` + Scenario *ScenarioResponse `json:"scenario,omitempty"` +} + +// NewScenarioEditResponse instantiates a new ScenarioEditResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioEditResponse() *ScenarioEditResponse { + this := ScenarioEditResponse{} + return &this +} + +// NewScenarioEditResponseWithDefaults instantiates a new ScenarioEditResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioEditResponseWithDefaults() *ScenarioEditResponse { + this := ScenarioEditResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ScenarioEditResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioEditResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ScenarioEditResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ScenarioEditResponse) SetMessage(v string) { + o.Message = &v +} + +// GetScenario returns the Scenario field value if set, zero value otherwise. +func (o *ScenarioEditResponse) GetScenario() ScenarioResponse { + if o == nil || IsNil(o.Scenario) { + var ret ScenarioResponse + return ret + } + return *o.Scenario +} + +// GetScenarioOk returns a tuple with the Scenario field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioEditResponse) GetScenarioOk() (*ScenarioResponse, bool) { + if o == nil || IsNil(o.Scenario) { + return nil, false + } + return o.Scenario, true +} + +// HasScenario returns a boolean if a field has been set. +func (o *ScenarioEditResponse) HasScenario() bool { + if o != nil && !IsNil(o.Scenario) { + return true + } + + return false +} + +// SetScenario gets a reference to the given ScenarioResponse and assigns it to the Scenario field. +func (o *ScenarioEditResponse) SetScenario(v ScenarioResponse) { + o.Scenario = &v +} + +func (o ScenarioEditResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioEditResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Scenario) { + toSerialize["scenario"] = o.Scenario + } + return toSerialize, nil +} + +type NullableScenarioEditResponse struct { + value *ScenarioEditResponse + isSet bool +} + +func (v NullableScenarioEditResponse) Get() *ScenarioEditResponse { + return v.value +} + +func (v *NullableScenarioEditResponse) Set(val *ScenarioEditResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioEditResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioEditResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioEditResponse(val *ScenarioEditResponse) *NullableScenarioEditResponse { + return &NullableScenarioEditResponse{value: val, isSet: true} +} + +func (v NullableScenarioEditResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioEditResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_error_response.go b/go/futureagi/model_scenario_error_response.go new file mode 100644 index 0000000..c72cfd8 --- /dev/null +++ b/go/futureagi/model_scenario_error_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioErrorResponse{} + +// ScenarioErrorResponse struct for ScenarioErrorResponse +type ScenarioErrorResponse struct { + Status *bool `json:"status,omitempty"` + Type NullableString `json:"type,omitempty"` + Code NullableString `json:"code,omitempty"` + Detail NullableString `json:"detail,omitempty"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Error NullableString `json:"error,omitempty"` + Attr NullableString `json:"attr,omitempty"` + Details *map[string][]string `json:"details,omitempty"` +} + +// NewScenarioErrorResponse instantiates a new ScenarioErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioErrorResponse() *ScenarioErrorResponse { + this := ScenarioErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// NewScenarioErrorResponseWithDefaults instantiates a new ScenarioErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioErrorResponseWithDefaults() *ScenarioErrorResponse { + this := ScenarioErrorResponse{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScenarioErrorResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ScenarioErrorResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioErrorResponse) GetType() string { + if o == nil || IsNil(o.Type.Get()) { + var ret string + return ret + } + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioErrorResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// HasType returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasType() bool { + if o != nil && o.Type.IsSet() { + return true + } + + return false +} + +// SetType gets a reference to the given NullableString and assigns it to the Type field. +func (o *ScenarioErrorResponse) SetType(v string) { + o.Type.Set(&v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *ScenarioErrorResponse) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *ScenarioErrorResponse) UnsetType() { + o.Type.Unset() +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioErrorResponse) GetCode() string { + if o == nil || IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioErrorResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *ScenarioErrorResponse) SetCode(v string) { + o.Code.Set(&v) +} + +// SetCodeNil sets the value for Code to be an explicit nil +func (o *ScenarioErrorResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *ScenarioErrorResponse) UnsetCode() { + o.Code.Unset() +} + +// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioErrorResponse) GetDetail() string { + if o == nil || IsNil(o.Detail.Get()) { + var ret string + return ret + } + return *o.Detail.Get() +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioErrorResponse) GetDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Detail.Get(), o.Detail.IsSet() +} + +// HasDetail returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasDetail() bool { + if o != nil && o.Detail.IsSet() { + return true + } + + return false +} + +// SetDetail gets a reference to the given NullableString and assigns it to the Detail field. +func (o *ScenarioErrorResponse) SetDetail(v string) { + o.Detail.Set(&v) +} + +// SetDetailNil sets the value for Detail to be an explicit nil +func (o *ScenarioErrorResponse) SetDetailNil() { + o.Detail.Set(nil) +} + +// UnsetDetail ensures that no value is present for Detail, not even an explicit nil +func (o *ScenarioErrorResponse) UnsetDetail() { + o.Detail.Unset() +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *ScenarioErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *ScenarioErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *ScenarioErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ScenarioErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ScenarioErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ScenarioErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioErrorResponse) GetError() string { + if o == nil || IsNil(o.Error.Get()) { + var ret string + return ret + } + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// HasError returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasError() bool { + if o != nil && o.Error.IsSet() { + return true + } + + return false +} + +// SetError gets a reference to the given NullableString and assigns it to the Error field. +func (o *ScenarioErrorResponse) SetError(v string) { + o.Error.Set(&v) +} + +// SetErrorNil sets the value for Error to be an explicit nil +func (o *ScenarioErrorResponse) SetErrorNil() { + o.Error.Set(nil) +} + +// UnsetError ensures that no value is present for Error, not even an explicit nil +func (o *ScenarioErrorResponse) UnsetError() { + o.Error.Unset() +} + +// GetAttr returns the Attr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioErrorResponse) GetAttr() string { + if o == nil || IsNil(o.Attr.Get()) { + var ret string + return ret + } + return *o.Attr.Get() +} + +// GetAttrOk returns a tuple with the Attr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioErrorResponse) GetAttrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Attr.Get(), o.Attr.IsSet() +} + +// HasAttr returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasAttr() bool { + if o != nil && o.Attr.IsSet() { + return true + } + + return false +} + +// SetAttr gets a reference to the given NullableString and assigns it to the Attr field. +func (o *ScenarioErrorResponse) SetAttr(v string) { + o.Attr.Set(&v) +} + +// SetAttrNil sets the value for Attr to be an explicit nil +func (o *ScenarioErrorResponse) SetAttrNil() { + o.Attr.Set(nil) +} + +// UnsetAttr ensures that no value is present for Attr, not even an explicit nil +func (o *ScenarioErrorResponse) UnsetAttr() { + o.Attr.Unset() +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ScenarioErrorResponse) GetDetails() map[string][]string { + if o == nil || IsNil(o.Details) { + var ret map[string][]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioErrorResponse) GetDetailsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ScenarioErrorResponse) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string][]string and assigns it to the Details field. +func (o *ScenarioErrorResponse) SetDetails(v map[string][]string) { + o.Details = &v +} + +func (o ScenarioErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + if o.Detail.IsSet() { + toSerialize["detail"] = o.Detail.Get() + } + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Error.IsSet() { + toSerialize["error"] = o.Error.Get() + } + if o.Attr.IsSet() { + toSerialize["attr"] = o.Attr.Get() + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableScenarioErrorResponse struct { + value *ScenarioErrorResponse + isSet bool +} + +func (v NullableScenarioErrorResponse) Get() *ScenarioErrorResponse { + return v.value +} + +func (v *NullableScenarioErrorResponse) Set(val *ScenarioErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioErrorResponse(val *ScenarioErrorResponse) *NullableScenarioErrorResponse { + return &NullableScenarioErrorResponse{value: val, isSet: true} +} + +func (v NullableScenarioErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_list_response.go b/go/futureagi/model_scenario_list_response.go new file mode 100644 index 0000000..6da8477 --- /dev/null +++ b/go/futureagi/model_scenario_list_response.go @@ -0,0 +1,255 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioListResponse{} + +// ScenarioListResponse struct for ScenarioListResponse +type ScenarioListResponse struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ScenarioResponse `json:"results,omitempty"` +} + +// NewScenarioListResponse instantiates a new ScenarioListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioListResponse() *ScenarioListResponse { + this := ScenarioListResponse{} + return &this +} + +// NewScenarioListResponseWithDefaults instantiates a new ScenarioListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioListResponseWithDefaults() *ScenarioListResponse { + this := ScenarioListResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ScenarioListResponse) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioListResponse) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ScenarioListResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *ScenarioListResponse) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioListResponse) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioListResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *ScenarioListResponse) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *ScenarioListResponse) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *ScenarioListResponse) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *ScenarioListResponse) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioListResponse) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioListResponse) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ScenarioListResponse) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *ScenarioListResponse) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *ScenarioListResponse) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *ScenarioListResponse) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *ScenarioListResponse) GetResults() []ScenarioResponse { + if o == nil || IsNil(o.Results) { + var ret []ScenarioResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioListResponse) GetResultsOk() ([]ScenarioResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *ScenarioListResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ScenarioResponse and assigns it to the Results field. +func (o *ScenarioListResponse) SetResults(v []ScenarioResponse) { + o.Results = v +} + +func (o ScenarioListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullableScenarioListResponse struct { + value *ScenarioListResponse + isSet bool +} + +func (v NullableScenarioListResponse) Get() *ScenarioListResponse { + return v.value +} + +func (v *NullableScenarioListResponse) Set(val *ScenarioListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioListResponse(val *ScenarioListResponse) *NullableScenarioListResponse { + return &NullableScenarioListResponse{value: val, isSet: true} +} + +func (v NullableScenarioListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_prompt_item.go b/go/futureagi/model_scenario_prompt_item.go new file mode 100644 index 0000000..af63756 --- /dev/null +++ b/go/futureagi/model_scenario_prompt_item.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioPromptItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioPromptItem{} + +// ScenarioPromptItem struct for ScenarioPromptItem +type ScenarioPromptItem struct { + Role *string `json:"role,omitempty"` + Content *string `json:"content,omitempty"` +} + +// NewScenarioPromptItem instantiates a new ScenarioPromptItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioPromptItem() *ScenarioPromptItem { + this := ScenarioPromptItem{} + return &this +} + +// NewScenarioPromptItemWithDefaults instantiates a new ScenarioPromptItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioPromptItemWithDefaults() *ScenarioPromptItem { + this := ScenarioPromptItem{} + return &this +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *ScenarioPromptItem) GetRole() string { + if o == nil || IsNil(o.Role) { + var ret string + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioPromptItem) GetRoleOk() (*string, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *ScenarioPromptItem) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given string and assigns it to the Role field. +func (o *ScenarioPromptItem) SetRole(v string) { + o.Role = &v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *ScenarioPromptItem) GetContent() string { + if o == nil || IsNil(o.Content) { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioPromptItem) GetContentOk() (*string, bool) { + if o == nil || IsNil(o.Content) { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *ScenarioPromptItem) HasContent() bool { + if o != nil && !IsNil(o.Content) { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *ScenarioPromptItem) SetContent(v string) { + o.Content = &v +} + +func (o ScenarioPromptItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioPromptItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + if !IsNil(o.Content) { + toSerialize["content"] = o.Content + } + return toSerialize, nil +} + +type NullableScenarioPromptItem struct { + value *ScenarioPromptItem + isSet bool +} + +func (v NullableScenarioPromptItem) Get() *ScenarioPromptItem { + return v.value +} + +func (v *NullableScenarioPromptItem) Set(val *ScenarioPromptItem) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioPromptItem) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioPromptItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioPromptItem(val *ScenarioPromptItem) *NullableScenarioPromptItem { + return &NullableScenarioPromptItem{value: val, isSet: true} +} + +func (v NullableScenarioPromptItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioPromptItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_prompts_update_response.go b/go/futureagi/model_scenario_prompts_update_response.go new file mode 100644 index 0000000..55c9f9a --- /dev/null +++ b/go/futureagi/model_scenario_prompts_update_response.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the ScenarioPromptsUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioPromptsUpdateResponse{} + +// ScenarioPromptsUpdateResponse struct for ScenarioPromptsUpdateResponse +type ScenarioPromptsUpdateResponse struct { + Message *string `json:"message,omitempty"` + Prompts *string `json:"prompts,omitempty"` +} + +// NewScenarioPromptsUpdateResponse instantiates a new ScenarioPromptsUpdateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioPromptsUpdateResponse() *ScenarioPromptsUpdateResponse { + this := ScenarioPromptsUpdateResponse{} + return &this +} + +// NewScenarioPromptsUpdateResponseWithDefaults instantiates a new ScenarioPromptsUpdateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioPromptsUpdateResponseWithDefaults() *ScenarioPromptsUpdateResponse { + this := ScenarioPromptsUpdateResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ScenarioPromptsUpdateResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioPromptsUpdateResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ScenarioPromptsUpdateResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ScenarioPromptsUpdateResponse) SetMessage(v string) { + o.Message = &v +} + +// GetPrompts returns the Prompts field value if set, zero value otherwise. +func (o *ScenarioPromptsUpdateResponse) GetPrompts() string { + if o == nil || IsNil(o.Prompts) { + var ret string + return ret + } + return *o.Prompts +} + +// GetPromptsOk returns a tuple with the Prompts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioPromptsUpdateResponse) GetPromptsOk() (*string, bool) { + if o == nil || IsNil(o.Prompts) { + return nil, false + } + return o.Prompts, true +} + +// HasPrompts returns a boolean if a field has been set. +func (o *ScenarioPromptsUpdateResponse) HasPrompts() bool { + if o != nil && !IsNil(o.Prompts) { + return true + } + + return false +} + +// SetPrompts gets a reference to the given string and assigns it to the Prompts field. +func (o *ScenarioPromptsUpdateResponse) SetPrompts(v string) { + o.Prompts = &v +} + +func (o ScenarioPromptsUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioPromptsUpdateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Prompts) { + toSerialize["prompts"] = o.Prompts + } + return toSerialize, nil +} + +type NullableScenarioPromptsUpdateResponse struct { + value *ScenarioPromptsUpdateResponse + isSet bool +} + +func (v NullableScenarioPromptsUpdateResponse) Get() *ScenarioPromptsUpdateResponse { + return v.value +} + +func (v *NullableScenarioPromptsUpdateResponse) Set(val *ScenarioPromptsUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioPromptsUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioPromptsUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioPromptsUpdateResponse(val *ScenarioPromptsUpdateResponse) *NullableScenarioPromptsUpdateResponse { + return &NullableScenarioPromptsUpdateResponse{value: val, isSet: true} +} + +func (v NullableScenarioPromptsUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioPromptsUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_scenario_response.go b/go/futureagi/model_scenario_response.go new file mode 100644 index 0000000..25aa468 --- /dev/null +++ b/go/futureagi/model_scenario_response.go @@ -0,0 +1,1043 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the ScenarioResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScenarioResponse{} + +// ScenarioResponse struct for ScenarioResponse +type ScenarioResponse struct { + Id *string `json:"id,omitempty"` + // Name of the scenario + Name string `json:"name"` + // Optional description of the scenario + Description NullableString `json:"description,omitempty"` + // Source content or reference for the scenario + Source string `json:"source"` + // Type of scenario (graph, script, or dataset) + ScenarioType *string `json:"scenario_type,omitempty"` + ScenarioTypeDisplay *string `json:"scenario_type_display,omitempty"` + // Source type for the scenario: agent_definition or prompt + SourceType *string `json:"source_type,omitempty"` + SourceTypeDisplay *string `json:"source_type_display,omitempty"` + // Organization this scenario belongs to + Organization *string `json:"organization,omitempty"` + // Dataset associated with this scenario (only for dataset type scenarios) + Dataset NullableString `json:"dataset,omitempty"` + DatasetRows *string `json:"dataset_rows,omitempty"` + DatasetColumnConfig *string `json:"dataset_column_config,omitempty"` + Graph *string `json:"graph,omitempty"` + Agent *string `json:"agent,omitempty"` + // Prompt template associated with this scenario (only for prompt source type) + PromptTemplate NullableString `json:"prompt_template,omitempty"` + PromptTemplateDetail *string `json:"prompt_template_detail,omitempty"` + // Prompt version associated with this scenario (only for prompt source type) + PromptVersion NullableString `json:"prompt_version,omitempty"` + PromptVersionDetail *string `json:"prompt_version_detail,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Deleted *bool `json:"deleted,omitempty"` + // Status of the scenario + Status *string `json:"status,omitempty"` + DeletedAt NullableTime `json:"deleted_at,omitempty"` + AgentType *string `json:"agent_type,omitempty"` +} + +type _ScenarioResponse ScenarioResponse + +// NewScenarioResponse instantiates a new ScenarioResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScenarioResponse(name string, source string) *ScenarioResponse { + this := ScenarioResponse{} + this.Name = name + this.Source = source + return &this +} + +// NewScenarioResponseWithDefaults instantiates a new ScenarioResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScenarioResponseWithDefaults() *ScenarioResponse { + this := ScenarioResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ScenarioResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ScenarioResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ScenarioResponse) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *ScenarioResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ScenarioResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ScenarioResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ScenarioResponse) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ScenarioResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ScenarioResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetSource returns the Source field value +func (o *ScenarioResponse) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *ScenarioResponse) SetSource(v string) { + o.Source = v +} + +// GetScenarioType returns the ScenarioType field value if set, zero value otherwise. +func (o *ScenarioResponse) GetScenarioType() string { + if o == nil || IsNil(o.ScenarioType) { + var ret string + return ret + } + return *o.ScenarioType +} + +// GetScenarioTypeOk returns a tuple with the ScenarioType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetScenarioTypeOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioType) { + return nil, false + } + return o.ScenarioType, true +} + +// HasScenarioType returns a boolean if a field has been set. +func (o *ScenarioResponse) HasScenarioType() bool { + if o != nil && !IsNil(o.ScenarioType) { + return true + } + + return false +} + +// SetScenarioType gets a reference to the given string and assigns it to the ScenarioType field. +func (o *ScenarioResponse) SetScenarioType(v string) { + o.ScenarioType = &v +} + +// GetScenarioTypeDisplay returns the ScenarioTypeDisplay field value if set, zero value otherwise. +func (o *ScenarioResponse) GetScenarioTypeDisplay() string { + if o == nil || IsNil(o.ScenarioTypeDisplay) { + var ret string + return ret + } + return *o.ScenarioTypeDisplay +} + +// GetScenarioTypeDisplayOk returns a tuple with the ScenarioTypeDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetScenarioTypeDisplayOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioTypeDisplay) { + return nil, false + } + return o.ScenarioTypeDisplay, true +} + +// HasScenarioTypeDisplay returns a boolean if a field has been set. +func (o *ScenarioResponse) HasScenarioTypeDisplay() bool { + if o != nil && !IsNil(o.ScenarioTypeDisplay) { + return true + } + + return false +} + +// SetScenarioTypeDisplay gets a reference to the given string and assigns it to the ScenarioTypeDisplay field. +func (o *ScenarioResponse) SetScenarioTypeDisplay(v string) { + o.ScenarioTypeDisplay = &v +} + +// GetSourceType returns the SourceType field value if set, zero value otherwise. +func (o *ScenarioResponse) GetSourceType() string { + if o == nil || IsNil(o.SourceType) { + var ret string + return ret + } + return *o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetSourceTypeOk() (*string, bool) { + if o == nil || IsNil(o.SourceType) { + return nil, false + } + return o.SourceType, true +} + +// HasSourceType returns a boolean if a field has been set. +func (o *ScenarioResponse) HasSourceType() bool { + if o != nil && !IsNil(o.SourceType) { + return true + } + + return false +} + +// SetSourceType gets a reference to the given string and assigns it to the SourceType field. +func (o *ScenarioResponse) SetSourceType(v string) { + o.SourceType = &v +} + +// GetSourceTypeDisplay returns the SourceTypeDisplay field value if set, zero value otherwise. +func (o *ScenarioResponse) GetSourceTypeDisplay() string { + if o == nil || IsNil(o.SourceTypeDisplay) { + var ret string + return ret + } + return *o.SourceTypeDisplay +} + +// GetSourceTypeDisplayOk returns a tuple with the SourceTypeDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetSourceTypeDisplayOk() (*string, bool) { + if o == nil || IsNil(o.SourceTypeDisplay) { + return nil, false + } + return o.SourceTypeDisplay, true +} + +// HasSourceTypeDisplay returns a boolean if a field has been set. +func (o *ScenarioResponse) HasSourceTypeDisplay() bool { + if o != nil && !IsNil(o.SourceTypeDisplay) { + return true + } + + return false +} + +// SetSourceTypeDisplay gets a reference to the given string and assigns it to the SourceTypeDisplay field. +func (o *ScenarioResponse) SetSourceTypeDisplay(v string) { + o.SourceTypeDisplay = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *ScenarioResponse) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *ScenarioResponse) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *ScenarioResponse) SetOrganization(v string) { + o.Organization = &v +} + +// GetDataset returns the Dataset field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioResponse) GetDataset() string { + if o == nil || IsNil(o.Dataset.Get()) { + var ret string + return ret + } + return *o.Dataset.Get() +} + +// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioResponse) GetDatasetOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Dataset.Get(), o.Dataset.IsSet() +} + +// HasDataset returns a boolean if a field has been set. +func (o *ScenarioResponse) HasDataset() bool { + if o != nil && o.Dataset.IsSet() { + return true + } + + return false +} + +// SetDataset gets a reference to the given NullableString and assigns it to the Dataset field. +func (o *ScenarioResponse) SetDataset(v string) { + o.Dataset.Set(&v) +} + +// SetDatasetNil sets the value for Dataset to be an explicit nil +func (o *ScenarioResponse) SetDatasetNil() { + o.Dataset.Set(nil) +} + +// UnsetDataset ensures that no value is present for Dataset, not even an explicit nil +func (o *ScenarioResponse) UnsetDataset() { + o.Dataset.Unset() +} + +// GetDatasetRows returns the DatasetRows field value if set, zero value otherwise. +func (o *ScenarioResponse) GetDatasetRows() string { + if o == nil || IsNil(o.DatasetRows) { + var ret string + return ret + } + return *o.DatasetRows +} + +// GetDatasetRowsOk returns a tuple with the DatasetRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetDatasetRowsOk() (*string, bool) { + if o == nil || IsNil(o.DatasetRows) { + return nil, false + } + return o.DatasetRows, true +} + +// HasDatasetRows returns a boolean if a field has been set. +func (o *ScenarioResponse) HasDatasetRows() bool { + if o != nil && !IsNil(o.DatasetRows) { + return true + } + + return false +} + +// SetDatasetRows gets a reference to the given string and assigns it to the DatasetRows field. +func (o *ScenarioResponse) SetDatasetRows(v string) { + o.DatasetRows = &v +} + +// GetDatasetColumnConfig returns the DatasetColumnConfig field value if set, zero value otherwise. +func (o *ScenarioResponse) GetDatasetColumnConfig() string { + if o == nil || IsNil(o.DatasetColumnConfig) { + var ret string + return ret + } + return *o.DatasetColumnConfig +} + +// GetDatasetColumnConfigOk returns a tuple with the DatasetColumnConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetDatasetColumnConfigOk() (*string, bool) { + if o == nil || IsNil(o.DatasetColumnConfig) { + return nil, false + } + return o.DatasetColumnConfig, true +} + +// HasDatasetColumnConfig returns a boolean if a field has been set. +func (o *ScenarioResponse) HasDatasetColumnConfig() bool { + if o != nil && !IsNil(o.DatasetColumnConfig) { + return true + } + + return false +} + +// SetDatasetColumnConfig gets a reference to the given string and assigns it to the DatasetColumnConfig field. +func (o *ScenarioResponse) SetDatasetColumnConfig(v string) { + o.DatasetColumnConfig = &v +} + +// GetGraph returns the Graph field value if set, zero value otherwise. +func (o *ScenarioResponse) GetGraph() string { + if o == nil || IsNil(o.Graph) { + var ret string + return ret + } + return *o.Graph +} + +// GetGraphOk returns a tuple with the Graph field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetGraphOk() (*string, bool) { + if o == nil || IsNil(o.Graph) { + return nil, false + } + return o.Graph, true +} + +// HasGraph returns a boolean if a field has been set. +func (o *ScenarioResponse) HasGraph() bool { + if o != nil && !IsNil(o.Graph) { + return true + } + + return false +} + +// SetGraph gets a reference to the given string and assigns it to the Graph field. +func (o *ScenarioResponse) SetGraph(v string) { + o.Graph = &v +} + +// GetAgent returns the Agent field value if set, zero value otherwise. +func (o *ScenarioResponse) GetAgent() string { + if o == nil || IsNil(o.Agent) { + var ret string + return ret + } + return *o.Agent +} + +// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetAgentOk() (*string, bool) { + if o == nil || IsNil(o.Agent) { + return nil, false + } + return o.Agent, true +} + +// HasAgent returns a boolean if a field has been set. +func (o *ScenarioResponse) HasAgent() bool { + if o != nil && !IsNil(o.Agent) { + return true + } + + return false +} + +// SetAgent gets a reference to the given string and assigns it to the Agent field. +func (o *ScenarioResponse) SetAgent(v string) { + o.Agent = &v +} + +// GetPromptTemplate returns the PromptTemplate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioResponse) GetPromptTemplate() string { + if o == nil || IsNil(o.PromptTemplate.Get()) { + var ret string + return ret + } + return *o.PromptTemplate.Get() +} + +// GetPromptTemplateOk returns a tuple with the PromptTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioResponse) GetPromptTemplateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptTemplate.Get(), o.PromptTemplate.IsSet() +} + +// HasPromptTemplate returns a boolean if a field has been set. +func (o *ScenarioResponse) HasPromptTemplate() bool { + if o != nil && o.PromptTemplate.IsSet() { + return true + } + + return false +} + +// SetPromptTemplate gets a reference to the given NullableString and assigns it to the PromptTemplate field. +func (o *ScenarioResponse) SetPromptTemplate(v string) { + o.PromptTemplate.Set(&v) +} + +// SetPromptTemplateNil sets the value for PromptTemplate to be an explicit nil +func (o *ScenarioResponse) SetPromptTemplateNil() { + o.PromptTemplate.Set(nil) +} + +// UnsetPromptTemplate ensures that no value is present for PromptTemplate, not even an explicit nil +func (o *ScenarioResponse) UnsetPromptTemplate() { + o.PromptTemplate.Unset() +} + +// GetPromptTemplateDetail returns the PromptTemplateDetail field value if set, zero value otherwise. +func (o *ScenarioResponse) GetPromptTemplateDetail() string { + if o == nil || IsNil(o.PromptTemplateDetail) { + var ret string + return ret + } + return *o.PromptTemplateDetail +} + +// GetPromptTemplateDetailOk returns a tuple with the PromptTemplateDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetPromptTemplateDetailOk() (*string, bool) { + if o == nil || IsNil(o.PromptTemplateDetail) { + return nil, false + } + return o.PromptTemplateDetail, true +} + +// HasPromptTemplateDetail returns a boolean if a field has been set. +func (o *ScenarioResponse) HasPromptTemplateDetail() bool { + if o != nil && !IsNil(o.PromptTemplateDetail) { + return true + } + + return false +} + +// SetPromptTemplateDetail gets a reference to the given string and assigns it to the PromptTemplateDetail field. +func (o *ScenarioResponse) SetPromptTemplateDetail(v string) { + o.PromptTemplateDetail = &v +} + +// GetPromptVersion returns the PromptVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioResponse) GetPromptVersion() string { + if o == nil || IsNil(o.PromptVersion.Get()) { + var ret string + return ret + } + return *o.PromptVersion.Get() +} + +// GetPromptVersionOk returns a tuple with the PromptVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioResponse) GetPromptVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PromptVersion.Get(), o.PromptVersion.IsSet() +} + +// HasPromptVersion returns a boolean if a field has been set. +func (o *ScenarioResponse) HasPromptVersion() bool { + if o != nil && o.PromptVersion.IsSet() { + return true + } + + return false +} + +// SetPromptVersion gets a reference to the given NullableString and assigns it to the PromptVersion field. +func (o *ScenarioResponse) SetPromptVersion(v string) { + o.PromptVersion.Set(&v) +} + +// SetPromptVersionNil sets the value for PromptVersion to be an explicit nil +func (o *ScenarioResponse) SetPromptVersionNil() { + o.PromptVersion.Set(nil) +} + +// UnsetPromptVersion ensures that no value is present for PromptVersion, not even an explicit nil +func (o *ScenarioResponse) UnsetPromptVersion() { + o.PromptVersion.Unset() +} + +// GetPromptVersionDetail returns the PromptVersionDetail field value if set, zero value otherwise. +func (o *ScenarioResponse) GetPromptVersionDetail() string { + if o == nil || IsNil(o.PromptVersionDetail) { + var ret string + return ret + } + return *o.PromptVersionDetail +} + +// GetPromptVersionDetailOk returns a tuple with the PromptVersionDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetPromptVersionDetailOk() (*string, bool) { + if o == nil || IsNil(o.PromptVersionDetail) { + return nil, false + } + return o.PromptVersionDetail, true +} + +// HasPromptVersionDetail returns a boolean if a field has been set. +func (o *ScenarioResponse) HasPromptVersionDetail() bool { + if o != nil && !IsNil(o.PromptVersionDetail) { + return true + } + + return false +} + +// SetPromptVersionDetail gets a reference to the given string and assigns it to the PromptVersionDetail field. +func (o *ScenarioResponse) SetPromptVersionDetail(v string) { + o.PromptVersionDetail = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ScenarioResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ScenarioResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ScenarioResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ScenarioResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ScenarioResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ScenarioResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetDeleted returns the Deleted field value if set, zero value otherwise. +func (o *ScenarioResponse) GetDeleted() bool { + if o == nil || IsNil(o.Deleted) { + var ret bool + return ret + } + return *o.Deleted +} + +// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetDeletedOk() (*bool, bool) { + if o == nil || IsNil(o.Deleted) { + return nil, false + } + return o.Deleted, true +} + +// HasDeleted returns a boolean if a field has been set. +func (o *ScenarioResponse) HasDeleted() bool { + if o != nil && !IsNil(o.Deleted) { + return true + } + + return false +} + +// SetDeleted gets a reference to the given bool and assigns it to the Deleted field. +func (o *ScenarioResponse) SetDeleted(v bool) { + o.Deleted = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScenarioResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScenarioResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ScenarioResponse) SetStatus(v string) { + o.Status = &v +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ScenarioResponse) GetDeletedAt() time.Time { + if o == nil || IsNil(o.DeletedAt.Get()) { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ScenarioResponse) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *ScenarioResponse) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *ScenarioResponse) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} + +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *ScenarioResponse) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *ScenarioResponse) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *ScenarioResponse) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScenarioResponse) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *ScenarioResponse) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *ScenarioResponse) SetAgentType(v string) { + o.AgentType = &v +} + +func (o ScenarioResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScenarioResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["source"] = o.Source + if !IsNil(o.ScenarioType) { + toSerialize["scenario_type"] = o.ScenarioType + } + if !IsNil(o.ScenarioTypeDisplay) { + toSerialize["scenario_type_display"] = o.ScenarioTypeDisplay + } + if !IsNil(o.SourceType) { + toSerialize["source_type"] = o.SourceType + } + if !IsNil(o.SourceTypeDisplay) { + toSerialize["source_type_display"] = o.SourceTypeDisplay + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if o.Dataset.IsSet() { + toSerialize["dataset"] = o.Dataset.Get() + } + if !IsNil(o.DatasetRows) { + toSerialize["dataset_rows"] = o.DatasetRows + } + if !IsNil(o.DatasetColumnConfig) { + toSerialize["dataset_column_config"] = o.DatasetColumnConfig + } + if !IsNil(o.Graph) { + toSerialize["graph"] = o.Graph + } + if !IsNil(o.Agent) { + toSerialize["agent"] = o.Agent + } + if o.PromptTemplate.IsSet() { + toSerialize["prompt_template"] = o.PromptTemplate.Get() + } + if !IsNil(o.PromptTemplateDetail) { + toSerialize["prompt_template_detail"] = o.PromptTemplateDetail + } + if o.PromptVersion.IsSet() { + toSerialize["prompt_version"] = o.PromptVersion.Get() + } + if !IsNil(o.PromptVersionDetail) { + toSerialize["prompt_version_detail"] = o.PromptVersionDetail + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Deleted) { + toSerialize["deleted"] = o.Deleted + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + return toSerialize, nil +} + +func (o *ScenarioResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "source", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScenarioResponse := _ScenarioResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScenarioResponse) + + if err != nil { + return err + } + + *o = ScenarioResponse(varScenarioResponse) + + return err +} + +type NullableScenarioResponse struct { + value *ScenarioResponse + isSet bool +} + +func (v NullableScenarioResponse) Get() *ScenarioResponse { + return v.value +} + +func (v *NullableScenarioResponse) Set(val *ScenarioResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScenarioResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScenarioResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScenarioResponse(val *ScenarioResponse) *NullableScenarioResponse { + return &NullableScenarioResponse{value: val, isSet: true} +} + +func (v NullableScenarioResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScenarioResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_score.go b/go/futureagi/model_score.go new file mode 100644 index 0000000..8074d32 --- /dev/null +++ b/go/futureagi/model_score.go @@ -0,0 +1,795 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the Score type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Score{} + +// Score struct for Score +type Score struct { + Id *string `json:"id,omitempty"` + SourceType string `json:"source_type"` + SourceId *string `json:"source_id,omitempty"` + LabelId *string `json:"label_id,omitempty"` + LabelName *string `json:"label_name,omitempty"` + LabelType *string `json:"label_type,omitempty"` + LabelSettings map[string]interface{} `json:"label_settings,omitempty"` + LabelAllowNotes *bool `json:"label_allow_notes,omitempty"` + Value map[string]interface{} `json:"value"` + ScoreSource *string `json:"score_source,omitempty"` + Notes NullableString `json:"notes,omitempty"` + Annotator NullableString `json:"annotator,omitempty"` + AnnotatorName *string `json:"annotator_name,omitempty"` + AnnotatorEmail *string `json:"annotator_email,omitempty"` + QueueItem NullableString `json:"queue_item,omitempty"` + QueueId *string `json:"queue_id,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +type _Score Score + +// NewScore instantiates a new Score object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScore(sourceType string, value map[string]interface{}) *Score { + this := Score{} + this.SourceType = sourceType + this.Value = value + return &this +} + +// NewScoreWithDefaults instantiates a new Score object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScoreWithDefaults() *Score { + this := Score{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Score) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Score) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Score) SetId(v string) { + o.Id = &v +} + +// GetSourceType returns the SourceType field value +func (o *Score) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *Score) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *Score) SetSourceType(v string) { + o.SourceType = v +} + +// GetSourceId returns the SourceId field value if set, zero value otherwise. +func (o *Score) GetSourceId() string { + if o == nil || IsNil(o.SourceId) { + var ret string + return ret + } + return *o.SourceId +} + +// GetSourceIdOk returns a tuple with the SourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetSourceIdOk() (*string, bool) { + if o == nil || IsNil(o.SourceId) { + return nil, false + } + return o.SourceId, true +} + +// HasSourceId returns a boolean if a field has been set. +func (o *Score) HasSourceId() bool { + if o != nil && !IsNil(o.SourceId) { + return true + } + + return false +} + +// SetSourceId gets a reference to the given string and assigns it to the SourceId field. +func (o *Score) SetSourceId(v string) { + o.SourceId = &v +} + +// GetLabelId returns the LabelId field value if set, zero value otherwise. +func (o *Score) GetLabelId() string { + if o == nil || IsNil(o.LabelId) { + var ret string + return ret + } + return *o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetLabelIdOk() (*string, bool) { + if o == nil || IsNil(o.LabelId) { + return nil, false + } + return o.LabelId, true +} + +// HasLabelId returns a boolean if a field has been set. +func (o *Score) HasLabelId() bool { + if o != nil && !IsNil(o.LabelId) { + return true + } + + return false +} + +// SetLabelId gets a reference to the given string and assigns it to the LabelId field. +func (o *Score) SetLabelId(v string) { + o.LabelId = &v +} + +// GetLabelName returns the LabelName field value if set, zero value otherwise. +func (o *Score) GetLabelName() string { + if o == nil || IsNil(o.LabelName) { + var ret string + return ret + } + return *o.LabelName +} + +// GetLabelNameOk returns a tuple with the LabelName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetLabelNameOk() (*string, bool) { + if o == nil || IsNil(o.LabelName) { + return nil, false + } + return o.LabelName, true +} + +// HasLabelName returns a boolean if a field has been set. +func (o *Score) HasLabelName() bool { + if o != nil && !IsNil(o.LabelName) { + return true + } + + return false +} + +// SetLabelName gets a reference to the given string and assigns it to the LabelName field. +func (o *Score) SetLabelName(v string) { + o.LabelName = &v +} + +// GetLabelType returns the LabelType field value if set, zero value otherwise. +func (o *Score) GetLabelType() string { + if o == nil || IsNil(o.LabelType) { + var ret string + return ret + } + return *o.LabelType +} + +// GetLabelTypeOk returns a tuple with the LabelType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetLabelTypeOk() (*string, bool) { + if o == nil || IsNil(o.LabelType) { + return nil, false + } + return o.LabelType, true +} + +// HasLabelType returns a boolean if a field has been set. +func (o *Score) HasLabelType() bool { + if o != nil && !IsNil(o.LabelType) { + return true + } + + return false +} + +// SetLabelType gets a reference to the given string and assigns it to the LabelType field. +func (o *Score) SetLabelType(v string) { + o.LabelType = &v +} + +// GetLabelSettings returns the LabelSettings field value if set, zero value otherwise. +func (o *Score) GetLabelSettings() map[string]interface{} { + if o == nil || IsNil(o.LabelSettings) { + var ret map[string]interface{} + return ret + } + return o.LabelSettings +} + +// GetLabelSettingsOk returns a tuple with the LabelSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetLabelSettingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.LabelSettings) { + return map[string]interface{}{}, false + } + return o.LabelSettings, true +} + +// HasLabelSettings returns a boolean if a field has been set. +func (o *Score) HasLabelSettings() bool { + if o != nil && !IsNil(o.LabelSettings) { + return true + } + + return false +} + +// SetLabelSettings gets a reference to the given map[string]interface{} and assigns it to the LabelSettings field. +func (o *Score) SetLabelSettings(v map[string]interface{}) { + o.LabelSettings = v +} + +// GetLabelAllowNotes returns the LabelAllowNotes field value if set, zero value otherwise. +func (o *Score) GetLabelAllowNotes() bool { + if o == nil || IsNil(o.LabelAllowNotes) { + var ret bool + return ret + } + return *o.LabelAllowNotes +} + +// GetLabelAllowNotesOk returns a tuple with the LabelAllowNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetLabelAllowNotesOk() (*bool, bool) { + if o == nil || IsNil(o.LabelAllowNotes) { + return nil, false + } + return o.LabelAllowNotes, true +} + +// HasLabelAllowNotes returns a boolean if a field has been set. +func (o *Score) HasLabelAllowNotes() bool { + if o != nil && !IsNil(o.LabelAllowNotes) { + return true + } + + return false +} + +// SetLabelAllowNotes gets a reference to the given bool and assigns it to the LabelAllowNotes field. +func (o *Score) SetLabelAllowNotes(v bool) { + o.LabelAllowNotes = &v +} + +// GetValue returns the Value field value +func (o *Score) GetValue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *Score) GetValueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *Score) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetScoreSource returns the ScoreSource field value if set, zero value otherwise. +func (o *Score) GetScoreSource() string { + if o == nil || IsNil(o.ScoreSource) { + var ret string + return ret + } + return *o.ScoreSource +} + +// GetScoreSourceOk returns a tuple with the ScoreSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetScoreSourceOk() (*string, bool) { + if o == nil || IsNil(o.ScoreSource) { + return nil, false + } + return o.ScoreSource, true +} + +// HasScoreSource returns a boolean if a field has been set. +func (o *Score) HasScoreSource() bool { + if o != nil && !IsNil(o.ScoreSource) { + return true + } + + return false +} + +// SetScoreSource gets a reference to the given string and assigns it to the ScoreSource field. +func (o *Score) SetScoreSource(v string) { + o.ScoreSource = &v +} + +// GetNotes returns the Notes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Score) GetNotes() string { + if o == nil || IsNil(o.Notes.Get()) { + var ret string + return ret + } + return *o.Notes.Get() +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Score) GetNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Notes.Get(), o.Notes.IsSet() +} + +// HasNotes returns a boolean if a field has been set. +func (o *Score) HasNotes() bool { + if o != nil && o.Notes.IsSet() { + return true + } + + return false +} + +// SetNotes gets a reference to the given NullableString and assigns it to the Notes field. +func (o *Score) SetNotes(v string) { + o.Notes.Set(&v) +} + +// SetNotesNil sets the value for Notes to be an explicit nil +func (o *Score) SetNotesNil() { + o.Notes.Set(nil) +} + +// UnsetNotes ensures that no value is present for Notes, not even an explicit nil +func (o *Score) UnsetNotes() { + o.Notes.Unset() +} + +// GetAnnotator returns the Annotator field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Score) GetAnnotator() string { + if o == nil || IsNil(o.Annotator.Get()) { + var ret string + return ret + } + return *o.Annotator.Get() +} + +// GetAnnotatorOk returns a tuple with the Annotator field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Score) GetAnnotatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Annotator.Get(), o.Annotator.IsSet() +} + +// HasAnnotator returns a boolean if a field has been set. +func (o *Score) HasAnnotator() bool { + if o != nil && o.Annotator.IsSet() { + return true + } + + return false +} + +// SetAnnotator gets a reference to the given NullableString and assigns it to the Annotator field. +func (o *Score) SetAnnotator(v string) { + o.Annotator.Set(&v) +} + +// SetAnnotatorNil sets the value for Annotator to be an explicit nil +func (o *Score) SetAnnotatorNil() { + o.Annotator.Set(nil) +} + +// UnsetAnnotator ensures that no value is present for Annotator, not even an explicit nil +func (o *Score) UnsetAnnotator() { + o.Annotator.Unset() +} + +// GetAnnotatorName returns the AnnotatorName field value if set, zero value otherwise. +func (o *Score) GetAnnotatorName() string { + if o == nil || IsNil(o.AnnotatorName) { + var ret string + return ret + } + return *o.AnnotatorName +} + +// GetAnnotatorNameOk returns a tuple with the AnnotatorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetAnnotatorNameOk() (*string, bool) { + if o == nil || IsNil(o.AnnotatorName) { + return nil, false + } + return o.AnnotatorName, true +} + +// HasAnnotatorName returns a boolean if a field has been set. +func (o *Score) HasAnnotatorName() bool { + if o != nil && !IsNil(o.AnnotatorName) { + return true + } + + return false +} + +// SetAnnotatorName gets a reference to the given string and assigns it to the AnnotatorName field. +func (o *Score) SetAnnotatorName(v string) { + o.AnnotatorName = &v +} + +// GetAnnotatorEmail returns the AnnotatorEmail field value if set, zero value otherwise. +func (o *Score) GetAnnotatorEmail() string { + if o == nil || IsNil(o.AnnotatorEmail) { + var ret string + return ret + } + return *o.AnnotatorEmail +} + +// GetAnnotatorEmailOk returns a tuple with the AnnotatorEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetAnnotatorEmailOk() (*string, bool) { + if o == nil || IsNil(o.AnnotatorEmail) { + return nil, false + } + return o.AnnotatorEmail, true +} + +// HasAnnotatorEmail returns a boolean if a field has been set. +func (o *Score) HasAnnotatorEmail() bool { + if o != nil && !IsNil(o.AnnotatorEmail) { + return true + } + + return false +} + +// SetAnnotatorEmail gets a reference to the given string and assigns it to the AnnotatorEmail field. +func (o *Score) SetAnnotatorEmail(v string) { + o.AnnotatorEmail = &v +} + +// GetQueueItem returns the QueueItem field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Score) GetQueueItem() string { + if o == nil || IsNil(o.QueueItem.Get()) { + var ret string + return ret + } + return *o.QueueItem.Get() +} + +// GetQueueItemOk returns a tuple with the QueueItem field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Score) GetQueueItemOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.QueueItem.Get(), o.QueueItem.IsSet() +} + +// HasQueueItem returns a boolean if a field has been set. +func (o *Score) HasQueueItem() bool { + if o != nil && o.QueueItem.IsSet() { + return true + } + + return false +} + +// SetQueueItem gets a reference to the given NullableString and assigns it to the QueueItem field. +func (o *Score) SetQueueItem(v string) { + o.QueueItem.Set(&v) +} + +// SetQueueItemNil sets the value for QueueItem to be an explicit nil +func (o *Score) SetQueueItemNil() { + o.QueueItem.Set(nil) +} + +// UnsetQueueItem ensures that no value is present for QueueItem, not even an explicit nil +func (o *Score) UnsetQueueItem() { + o.QueueItem.Unset() +} + +// GetQueueId returns the QueueId field value if set, zero value otherwise. +func (o *Score) GetQueueId() string { + if o == nil || IsNil(o.QueueId) { + var ret string + return ret + } + return *o.QueueId +} + +// GetQueueIdOk returns a tuple with the QueueId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetQueueIdOk() (*string, bool) { + if o == nil || IsNil(o.QueueId) { + return nil, false + } + return o.QueueId, true +} + +// HasQueueId returns a boolean if a field has been set. +func (o *Score) HasQueueId() bool { + if o != nil && !IsNil(o.QueueId) { + return true + } + + return false +} + +// SetQueueId gets a reference to the given string and assigns it to the QueueId field. +func (o *Score) SetQueueId(v string) { + o.QueueId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Score) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Score) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Score) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Score) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Score) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Score) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Score) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Score) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["source_type"] = o.SourceType + if !IsNil(o.SourceId) { + toSerialize["source_id"] = o.SourceId + } + if !IsNil(o.LabelId) { + toSerialize["label_id"] = o.LabelId + } + if !IsNil(o.LabelName) { + toSerialize["label_name"] = o.LabelName + } + if !IsNil(o.LabelType) { + toSerialize["label_type"] = o.LabelType + } + if !IsNil(o.LabelSettings) { + toSerialize["label_settings"] = o.LabelSettings + } + if !IsNil(o.LabelAllowNotes) { + toSerialize["label_allow_notes"] = o.LabelAllowNotes + } + toSerialize["value"] = o.Value + if !IsNil(o.ScoreSource) { + toSerialize["score_source"] = o.ScoreSource + } + if o.Notes.IsSet() { + toSerialize["notes"] = o.Notes.Get() + } + if o.Annotator.IsSet() { + toSerialize["annotator"] = o.Annotator.Get() + } + if !IsNil(o.AnnotatorName) { + toSerialize["annotator_name"] = o.AnnotatorName + } + if !IsNil(o.AnnotatorEmail) { + toSerialize["annotator_email"] = o.AnnotatorEmail + } + if o.QueueItem.IsSet() { + toSerialize["queue_item"] = o.QueueItem.Get() + } + if !IsNil(o.QueueId) { + toSerialize["queue_id"] = o.QueueId + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +func (o *Score) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "source_type", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScore := _Score{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScore) + + if err != nil { + return err + } + + *o = Score(varScore) + + return err +} + +type NullableScore struct { + value *Score + isSet bool +} + +func (v NullableScore) Get() *Score { + return v.value +} + +func (v *NullableScore) Set(val *Score) { + v.value = val + v.isSet = true +} + +func (v NullableScore) IsSet() bool { + return v.isSet +} + +func (v *NullableScore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScore(val *Score) *NullableScore { + return &NullableScore{value: val, isSet: true} +} + +func (v NullableScore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_score_delete_response.go b/go/futureagi/model_score_delete_response.go new file mode 100644 index 0000000..b52ac4b --- /dev/null +++ b/go/futureagi/model_score_delete_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScoreDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScoreDeleteResponse{} + +// ScoreDeleteResponse struct for ScoreDeleteResponse +type ScoreDeleteResponse struct { + Status *bool `json:"status,omitempty"` + Result map[string]bool `json:"result"` +} + +type _ScoreDeleteResponse ScoreDeleteResponse + +// NewScoreDeleteResponse instantiates a new ScoreDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScoreDeleteResponse(result map[string]bool) *ScoreDeleteResponse { + this := ScoreDeleteResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewScoreDeleteResponseWithDefaults instantiates a new ScoreDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScoreDeleteResponseWithDefaults() *ScoreDeleteResponse { + this := ScoreDeleteResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScoreDeleteResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScoreDeleteResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScoreDeleteResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ScoreDeleteResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *ScoreDeleteResponse) GetResult() map[string]bool { + if o == nil { + var ret map[string]bool + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ScoreDeleteResponse) GetResultOk() (*map[string]bool, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ScoreDeleteResponse) SetResult(v map[string]bool) { + o.Result = v +} + +func (o ScoreDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScoreDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ScoreDeleteResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScoreDeleteResponse := _ScoreDeleteResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScoreDeleteResponse) + + if err != nil { + return err + } + + *o = ScoreDeleteResponse(varScoreDeleteResponse) + + return err +} + +type NullableScoreDeleteResponse struct { + value *ScoreDeleteResponse + isSet bool +} + +func (v NullableScoreDeleteResponse) Get() *ScoreDeleteResponse { + return v.value +} + +func (v *NullableScoreDeleteResponse) Set(val *ScoreDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScoreDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScoreDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScoreDeleteResponse(val *ScoreDeleteResponse) *NullableScoreDeleteResponse { + return &NullableScoreDeleteResponse{value: val, isSet: true} +} + +func (v NullableScoreDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScoreDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_score_for_source_response.go b/go/futureagi/model_score_for_source_response.go new file mode 100644 index 0000000..7a59b1f --- /dev/null +++ b/go/futureagi/model_score_for_source_response.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScoreForSourceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScoreForSourceResponse{} + +// ScoreForSourceResponse struct for ScoreForSourceResponse +type ScoreForSourceResponse struct { + Status *bool `json:"status,omitempty"` + Result []Score `json:"result"` + SpanNotes []map[string]interface{} `json:"span_notes,omitempty"` +} + +type _ScoreForSourceResponse ScoreForSourceResponse + +// NewScoreForSourceResponse instantiates a new ScoreForSourceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScoreForSourceResponse(result []Score) *ScoreForSourceResponse { + this := ScoreForSourceResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewScoreForSourceResponseWithDefaults instantiates a new ScoreForSourceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScoreForSourceResponseWithDefaults() *ScoreForSourceResponse { + this := ScoreForSourceResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScoreForSourceResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScoreForSourceResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScoreForSourceResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ScoreForSourceResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *ScoreForSourceResponse) GetResult() []Score { + if o == nil { + var ret []Score + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ScoreForSourceResponse) GetResultOk() ([]Score, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *ScoreForSourceResponse) SetResult(v []Score) { + o.Result = v +} + +// GetSpanNotes returns the SpanNotes field value if set, zero value otherwise. +func (o *ScoreForSourceResponse) GetSpanNotes() []map[string]interface{} { + if o == nil || IsNil(o.SpanNotes) { + var ret []map[string]interface{} + return ret + } + return o.SpanNotes +} + +// GetSpanNotesOk returns a tuple with the SpanNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScoreForSourceResponse) GetSpanNotesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.SpanNotes) { + return nil, false + } + return o.SpanNotes, true +} + +// HasSpanNotes returns a boolean if a field has been set. +func (o *ScoreForSourceResponse) HasSpanNotes() bool { + if o != nil && !IsNil(o.SpanNotes) { + return true + } + + return false +} + +// SetSpanNotes gets a reference to the given []map[string]interface{} and assigns it to the SpanNotes field. +func (o *ScoreForSourceResponse) SetSpanNotes(v []map[string]interface{}) { + o.SpanNotes = v +} + +func (o ScoreForSourceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScoreForSourceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + if !IsNil(o.SpanNotes) { + toSerialize["span_notes"] = o.SpanNotes + } + return toSerialize, nil +} + +func (o *ScoreForSourceResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScoreForSourceResponse := _ScoreForSourceResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScoreForSourceResponse) + + if err != nil { + return err + } + + *o = ScoreForSourceResponse(varScoreForSourceResponse) + + return err +} + +type NullableScoreForSourceResponse struct { + value *ScoreForSourceResponse + isSet bool +} + +func (v NullableScoreForSourceResponse) Get() *ScoreForSourceResponse { + return v.value +} + +func (v *NullableScoreForSourceResponse) Set(val *ScoreForSourceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScoreForSourceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScoreForSourceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScoreForSourceResponse(val *ScoreForSourceResponse) *NullableScoreForSourceResponse { + return &NullableScoreForSourceResponse{value: val, isSet: true} +} + +func (v NullableScoreForSourceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScoreForSourceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_score_response.go b/go/futureagi/model_score_response.go new file mode 100644 index 0000000..698013c --- /dev/null +++ b/go/futureagi/model_score_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScoreResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScoreResponse{} + +// ScoreResponse struct for ScoreResponse +type ScoreResponse struct { + Status *bool `json:"status,omitempty"` + Result Score `json:"result"` +} + +type _ScoreResponse ScoreResponse + +// NewScoreResponse instantiates a new ScoreResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScoreResponse(result Score) *ScoreResponse { + this := ScoreResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewScoreResponseWithDefaults instantiates a new ScoreResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScoreResponseWithDefaults() *ScoreResponse { + this := ScoreResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ScoreResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScoreResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ScoreResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *ScoreResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *ScoreResponse) GetResult() Score { + if o == nil { + var ret Score + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *ScoreResponse) GetResultOk() (*Score, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *ScoreResponse) SetResult(v Score) { + o.Result = v +} + +func (o ScoreResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScoreResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *ScoreResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScoreResponse := _ScoreResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScoreResponse) + + if err != nil { + return err + } + + *o = ScoreResponse(varScoreResponse) + + return err +} + +type NullableScoreResponse struct { + value *ScoreResponse + isSet bool +} + +func (v NullableScoreResponse) Get() *ScoreResponse { + return v.value +} + +func (v *NullableScoreResponse) Set(val *ScoreResponse) { + v.value = val + v.isSet = true +} + +func (v NullableScoreResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableScoreResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScoreResponse(val *ScoreResponse) *NullableScoreResponse { + return &NullableScoreResponse{value: val, isSet: true} +} + +func (v NullableScoreResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScoreResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_score_trend.go b/go/futureagi/model_score_trend.go new file mode 100644 index 0000000..8bd3c6e --- /dev/null +++ b/go/futureagi/model_score_trend.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ScoreTrend type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScoreTrend{} + +// ScoreTrend struct for ScoreTrend +type ScoreTrend struct { + Label string `json:"label"` + Current float32 `json:"current"` + Prev float32 `json:"prev"` + Sparkline []float32 `json:"sparkline"` +} + +type _ScoreTrend ScoreTrend + +// NewScoreTrend instantiates a new ScoreTrend object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewScoreTrend(label string, current float32, prev float32, sparkline []float32) *ScoreTrend { + this := ScoreTrend{} + this.Label = label + this.Current = current + this.Prev = prev + this.Sparkline = sparkline + return &this +} + +// NewScoreTrendWithDefaults instantiates a new ScoreTrend object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewScoreTrendWithDefaults() *ScoreTrend { + this := ScoreTrend{} + return &this +} + +// GetLabel returns the Label field value +func (o *ScoreTrend) GetLabel() string { + if o == nil { + var ret string + return ret + } + + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value +// and a boolean to check if the value has been set. +func (o *ScoreTrend) GetLabelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Label, true +} + +// SetLabel sets field value +func (o *ScoreTrend) SetLabel(v string) { + o.Label = v +} + +// GetCurrent returns the Current field value +func (o *ScoreTrend) GetCurrent() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Current +} + +// GetCurrentOk returns a tuple with the Current field value +// and a boolean to check if the value has been set. +func (o *ScoreTrend) GetCurrentOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Current, true +} + +// SetCurrent sets field value +func (o *ScoreTrend) SetCurrent(v float32) { + o.Current = v +} + +// GetPrev returns the Prev field value +func (o *ScoreTrend) GetPrev() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Prev +} + +// GetPrevOk returns a tuple with the Prev field value +// and a boolean to check if the value has been set. +func (o *ScoreTrend) GetPrevOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Prev, true +} + +// SetPrev sets field value +func (o *ScoreTrend) SetPrev(v float32) { + o.Prev = v +} + +// GetSparkline returns the Sparkline field value +func (o *ScoreTrend) GetSparkline() []float32 { + if o == nil { + var ret []float32 + return ret + } + + return o.Sparkline +} + +// GetSparklineOk returns a tuple with the Sparkline field value +// and a boolean to check if the value has been set. +func (o *ScoreTrend) GetSparklineOk() ([]float32, bool) { + if o == nil { + return nil, false + } + return o.Sparkline, true +} + +// SetSparkline sets field value +func (o *ScoreTrend) SetSparkline(v []float32) { + o.Sparkline = v +} + +func (o ScoreTrend) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScoreTrend) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label"] = o.Label + toSerialize["current"] = o.Current + toSerialize["prev"] = o.Prev + toSerialize["sparkline"] = o.Sparkline + return toSerialize, nil +} + +func (o *ScoreTrend) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label", + "current", + "prev", + "sparkline", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varScoreTrend := _ScoreTrend{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varScoreTrend) + + if err != nil { + return err + } + + *o = ScoreTrend(varScoreTrend) + + return err +} + +type NullableScoreTrend struct { + value *ScoreTrend + isSet bool +} + +func (v NullableScoreTrend) Get() *ScoreTrend { + return v.value +} + +func (v *NullableScoreTrend) Set(val *ScoreTrend) { + v.value = val + v.isSet = true +} + +func (v NullableScoreTrend) IsSet() bool { + return v.isSet +} + +func (v *NullableScoreTrend) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScoreTrend(val *ScoreTrend) *NullableScoreTrend { + return &NullableScoreTrend{value: val, isSet: true} +} + +func (v NullableScoreTrend) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScoreTrend) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_configure_evaluations_request.go b/go/futureagi/model_sdk_configure_evaluations_request.go new file mode 100644 index 0000000..da68530 --- /dev/null +++ b/go/futureagi/model_sdk_configure_evaluations_request.go @@ -0,0 +1,244 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "fmt" +) + +// checks if the SDKConfigureEvaluationsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKConfigureEvaluationsRequest{} + +// SDKConfigureEvaluationsRequest struct for SDKConfigureEvaluationsRequest +type SDKConfigureEvaluationsRequest struct { + EvalConfig ConfigureEvaluations `json:"eval_config"` + Platform string `json:"platform"` + CustomEvalName NullableString `json:"custom_eval_name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _SDKConfigureEvaluationsRequest SDKConfigureEvaluationsRequest + +// NewSDKConfigureEvaluationsRequest instantiates a new SDKConfigureEvaluationsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKConfigureEvaluationsRequest(evalConfig ConfigureEvaluations, platform string) *SDKConfigureEvaluationsRequest { + this := SDKConfigureEvaluationsRequest{} + this.EvalConfig = evalConfig + this.Platform = platform + return &this +} + +// NewSDKConfigureEvaluationsRequestWithDefaults instantiates a new SDKConfigureEvaluationsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKConfigureEvaluationsRequestWithDefaults() *SDKConfigureEvaluationsRequest { + this := SDKConfigureEvaluationsRequest{} + return &this +} + +// GetEvalConfig returns the EvalConfig field value +func (o *SDKConfigureEvaluationsRequest) GetEvalConfig() ConfigureEvaluations { + if o == nil { + var ret ConfigureEvaluations + return ret + } + + return o.EvalConfig +} + +// GetEvalConfigOk returns a tuple with the EvalConfig field value +// and a boolean to check if the value has been set. +func (o *SDKConfigureEvaluationsRequest) GetEvalConfigOk() (*ConfigureEvaluations, bool) { + if o == nil { + return nil, false + } + return &o.EvalConfig, true +} + +// SetEvalConfig sets field value +func (o *SDKConfigureEvaluationsRequest) SetEvalConfig(v ConfigureEvaluations) { + o.EvalConfig = v +} + +// GetPlatform returns the Platform field value +func (o *SDKConfigureEvaluationsRequest) GetPlatform() string { + if o == nil { + var ret string + return ret + } + + return o.Platform +} + +// GetPlatformOk returns a tuple with the Platform field value +// and a boolean to check if the value has been set. +func (o *SDKConfigureEvaluationsRequest) GetPlatformOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Platform, true +} + +// SetPlatform sets field value +func (o *SDKConfigureEvaluationsRequest) SetPlatform(v string) { + o.Platform = v +} + +// GetCustomEvalName returns the CustomEvalName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKConfigureEvaluationsRequest) GetCustomEvalName() string { + if o == nil || IsNil(o.CustomEvalName.Get()) { + var ret string + return ret + } + return *o.CustomEvalName.Get() +} + +// GetCustomEvalNameOk returns a tuple with the CustomEvalName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKConfigureEvaluationsRequest) GetCustomEvalNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomEvalName.Get(), o.CustomEvalName.IsSet() +} + +// HasCustomEvalName returns a boolean if a field has been set. +func (o *SDKConfigureEvaluationsRequest) HasCustomEvalName() bool { + if o != nil && o.CustomEvalName.IsSet() { + return true + } + + return false +} + +// SetCustomEvalName gets a reference to the given NullableString and assigns it to the CustomEvalName field. +func (o *SDKConfigureEvaluationsRequest) SetCustomEvalName(v string) { + o.CustomEvalName.Set(&v) +} + +// SetCustomEvalNameNil sets the value for CustomEvalName to be an explicit nil +func (o *SDKConfigureEvaluationsRequest) SetCustomEvalNameNil() { + o.CustomEvalName.Set(nil) +} + +// UnsetCustomEvalName ensures that no value is present for CustomEvalName, not even an explicit nil +func (o *SDKConfigureEvaluationsRequest) UnsetCustomEvalName() { + o.CustomEvalName.Unset() +} + +func (o SDKConfigureEvaluationsRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKConfigureEvaluationsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval_config"] = o.EvalConfig + toSerialize["platform"] = o.Platform + if o.CustomEvalName.IsSet() { + toSerialize["custom_eval_name"] = o.CustomEvalName.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SDKConfigureEvaluationsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_config", + "platform", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKConfigureEvaluationsRequest := _SDKConfigureEvaluationsRequest{} + + err = json.Unmarshal(data, &varSDKConfigureEvaluationsRequest) + + if err != nil { + return err + } + + *o = SDKConfigureEvaluationsRequest(varSDKConfigureEvaluationsRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "eval_config") + delete(additionalProperties, "platform") + delete(additionalProperties, "custom_eval_name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSDKConfigureEvaluationsRequest struct { + value *SDKConfigureEvaluationsRequest + isSet bool +} + +func (v NullableSDKConfigureEvaluationsRequest) Get() *SDKConfigureEvaluationsRequest { + return v.value +} + +func (v *NullableSDKConfigureEvaluationsRequest) Set(val *SDKConfigureEvaluationsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSDKConfigureEvaluationsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKConfigureEvaluationsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKConfigureEvaluationsRequest(val *SDKConfigureEvaluationsRequest) *NullableSDKConfigureEvaluationsRequest { + return &NullableSDKConfigureEvaluationsRequest{value: val, isSet: true} +} + +func (v NullableSDKConfigureEvaluationsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKConfigureEvaluationsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_configure_evaluations_response.go b/go/futureagi/model_sdk_configure_evaluations_response.go new file mode 100644 index 0000000..ef179e8 --- /dev/null +++ b/go/futureagi/model_sdk_configure_evaluations_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKConfigureEvaluationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKConfigureEvaluationsResponse{} + +// SDKConfigureEvaluationsResponse struct for SDKConfigureEvaluationsResponse +type SDKConfigureEvaluationsResponse struct { + Status bool `json:"status"` + Result SDKMessageResult `json:"result"` +} + +type _SDKConfigureEvaluationsResponse SDKConfigureEvaluationsResponse + +// NewSDKConfigureEvaluationsResponse instantiates a new SDKConfigureEvaluationsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKConfigureEvaluationsResponse(status bool, result SDKMessageResult) *SDKConfigureEvaluationsResponse { + this := SDKConfigureEvaluationsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKConfigureEvaluationsResponseWithDefaults instantiates a new SDKConfigureEvaluationsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKConfigureEvaluationsResponseWithDefaults() *SDKConfigureEvaluationsResponse { + this := SDKConfigureEvaluationsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKConfigureEvaluationsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKConfigureEvaluationsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKConfigureEvaluationsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKConfigureEvaluationsResponse) GetResult() SDKMessageResult { + if o == nil { + var ret SDKMessageResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKConfigureEvaluationsResponse) GetResultOk() (*SDKMessageResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKConfigureEvaluationsResponse) SetResult(v SDKMessageResult) { + o.Result = v +} + +func (o SDKConfigureEvaluationsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKConfigureEvaluationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKConfigureEvaluationsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKConfigureEvaluationsResponse := _SDKConfigureEvaluationsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKConfigureEvaluationsResponse) + + if err != nil { + return err + } + + *o = SDKConfigureEvaluationsResponse(varSDKConfigureEvaluationsResponse) + + return err +} + +type NullableSDKConfigureEvaluationsResponse struct { + value *SDKConfigureEvaluationsResponse + isSet bool +} + +func (v NullableSDKConfigureEvaluationsResponse) Get() *SDKConfigureEvaluationsResponse { + return v.value +} + +func (v *NullableSDKConfigureEvaluationsResponse) Set(val *SDKConfigureEvaluationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKConfigureEvaluationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKConfigureEvaluationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKConfigureEvaluationsResponse(val *SDKConfigureEvaluationsResponse) *NullableSDKConfigureEvaluationsResponse { + return &NullableSDKConfigureEvaluationsResponse{value: val, isSet: true} +} + +func (v NullableSDKConfigureEvaluationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKConfigureEvaluationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_error_response.go b/go/futureagi/model_sdk_error_response.go new file mode 100644 index 0000000..c9c6da9 --- /dev/null +++ b/go/futureagi/model_sdk_error_response.go @@ -0,0 +1,287 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKErrorResponse{} + +// SDKErrorResponse struct for SDKErrorResponse +type SDKErrorResponse struct { + Status bool `json:"status"` + Result NullableString `json:"result,omitempty"` + Message NullableString `json:"message,omitempty"` + Errors *map[string][]string `json:"errors,omitempty"` +} + +type _SDKErrorResponse SDKErrorResponse + +// NewSDKErrorResponse instantiates a new SDKErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKErrorResponse(status bool) *SDKErrorResponse { + this := SDKErrorResponse{} + this.Status = status + return &this +} + +// NewSDKErrorResponseWithDefaults instantiates a new SDKErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKErrorResponseWithDefaults() *SDKErrorResponse { + this := SDKErrorResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKErrorResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKErrorResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKErrorResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKErrorResponse) GetResult() string { + if o == nil || IsNil(o.Result.Get()) { + var ret string + return ret + } + return *o.Result.Get() +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKErrorResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Result.Get(), o.Result.IsSet() +} + +// HasResult returns a boolean if a field has been set. +func (o *SDKErrorResponse) HasResult() bool { + if o != nil && o.Result.IsSet() { + return true + } + + return false +} + +// SetResult gets a reference to the given NullableString and assigns it to the Result field. +func (o *SDKErrorResponse) SetResult(v string) { + o.Result.Set(&v) +} + +// SetResultNil sets the value for Result to be an explicit nil +func (o *SDKErrorResponse) SetResultNil() { + o.Result.Set(nil) +} + +// UnsetResult ensures that no value is present for Result, not even an explicit nil +func (o *SDKErrorResponse) UnsetResult() { + o.Result.Unset() +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKErrorResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *SDKErrorResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *SDKErrorResponse) SetMessage(v string) { + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil +func (o *SDKErrorResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *SDKErrorResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *SDKErrorResponse) GetErrors() map[string][]string { + if o == nil || IsNil(o.Errors) { + var ret map[string][]string + return ret + } + return *o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKErrorResponse) GetErrorsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *SDKErrorResponse) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given map[string][]string and assigns it to the Errors field. +func (o *SDKErrorResponse) SetErrors(v map[string][]string) { + o.Errors = &v +} + +func (o SDKErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + if o.Result.IsSet() { + toSerialize["result"] = o.Result.Get() + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if !IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + return toSerialize, nil +} + +func (o *SDKErrorResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKErrorResponse := _SDKErrorResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKErrorResponse) + + if err != nil { + return err + } + + *o = SDKErrorResponse(varSDKErrorResponse) + + return err +} + +type NullableSDKErrorResponse struct { + value *SDKErrorResponse + isSet bool +} + +func (v NullableSDKErrorResponse) Get() *SDKErrorResponse { + return v.value +} + +func (v *NullableSDKErrorResponse) Set(val *SDKErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKErrorResponse(val *SDKErrorResponse) *NullableSDKErrorResponse { + return &NullableSDKErrorResponse{value: val, isSet: true} +} + +func (v NullableSDKErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_eval_template.go b/go/futureagi/model_sdk_eval_template.go new file mode 100644 index 0000000..dc9503d --- /dev/null +++ b/go/futureagi/model_sdk_eval_template.go @@ -0,0 +1,496 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKEvalTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKEvalTemplate{} + +// SDKEvalTemplate struct for SDKEvalTemplate +type SDKEvalTemplate struct { + Id string `json:"id"` + Name string `json:"name"` + Description NullableString `json:"description"` + Organization NullableString `json:"organization"` + Owner NullableString `json:"owner"` + EvalTags map[string]interface{} `json:"eval_tags,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + EvalId NullableString `json:"eval_id"` + Criteria map[string]interface{} `json:"criteria,omitempty"` + Choices map[string]interface{} `json:"choices,omitempty"` + MultiChoice NullableBool `json:"multi_choice,omitempty"` +} + +type _SDKEvalTemplate SDKEvalTemplate + +// NewSDKEvalTemplate instantiates a new SDKEvalTemplate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKEvalTemplate(id string, name string, description NullableString, organization NullableString, owner NullableString, evalId NullableString) *SDKEvalTemplate { + this := SDKEvalTemplate{} + this.Id = id + this.Name = name + this.Description = description + this.Organization = organization + this.Owner = owner + this.EvalId = evalId + return &this +} + +// NewSDKEvalTemplateWithDefaults instantiates a new SDKEvalTemplate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKEvalTemplateWithDefaults() *SDKEvalTemplate { + this := SDKEvalTemplate{} + return &this +} + +// GetId returns the Id field value +func (o *SDKEvalTemplate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SDKEvalTemplate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *SDKEvalTemplate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SDKEvalTemplate) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SDKEvalTemplate) GetDescription() string { + if o == nil || o.Description.Get() == nil { + var ret string + return ret + } + + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKEvalTemplate) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// SetDescription sets field value +func (o *SDKEvalTemplate) SetDescription(v string) { + o.Description.Set(&v) +} + +// GetOrganization returns the Organization field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SDKEvalTemplate) GetOrganization() string { + if o == nil || o.Organization.Get() == nil { + var ret string + return ret + } + + return *o.Organization.Get() +} + +// GetOrganizationOk returns a tuple with the Organization field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKEvalTemplate) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Organization.Get(), o.Organization.IsSet() +} + +// SetOrganization sets field value +func (o *SDKEvalTemplate) SetOrganization(v string) { + o.Organization.Set(&v) +} + +// GetOwner returns the Owner field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SDKEvalTemplate) GetOwner() string { + if o == nil || o.Owner.Get() == nil { + var ret string + return ret + } + + return *o.Owner.Get() +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKEvalTemplate) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Owner.Get(), o.Owner.IsSet() +} + +// SetOwner sets field value +func (o *SDKEvalTemplate) SetOwner(v string) { + o.Owner.Set(&v) +} + +// GetEvalTags returns the EvalTags field value if set, zero value otherwise. +func (o *SDKEvalTemplate) GetEvalTags() map[string]interface{} { + if o == nil || IsNil(o.EvalTags) { + var ret map[string]interface{} + return ret + } + return o.EvalTags +} + +// GetEvalTagsOk returns a tuple with the EvalTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplate) GetEvalTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalTags) { + return map[string]interface{}{}, false + } + return o.EvalTags, true +} + +// HasEvalTags returns a boolean if a field has been set. +func (o *SDKEvalTemplate) HasEvalTags() bool { + if o != nil && !IsNil(o.EvalTags) { + return true + } + + return false +} + +// SetEvalTags gets a reference to the given map[string]interface{} and assigns it to the EvalTags field. +func (o *SDKEvalTemplate) SetEvalTags(v map[string]interface{}) { + o.EvalTags = v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *SDKEvalTemplate) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplate) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *SDKEvalTemplate) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *SDKEvalTemplate) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetEvalId returns the EvalId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SDKEvalTemplate) GetEvalId() string { + if o == nil || o.EvalId.Get() == nil { + var ret string + return ret + } + + return *o.EvalId.Get() +} + +// GetEvalIdOk returns a tuple with the EvalId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKEvalTemplate) GetEvalIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalId.Get(), o.EvalId.IsSet() +} + +// SetEvalId sets field value +func (o *SDKEvalTemplate) SetEvalId(v string) { + o.EvalId.Set(&v) +} + +// GetCriteria returns the Criteria field value if set, zero value otherwise. +func (o *SDKEvalTemplate) GetCriteria() map[string]interface{} { + if o == nil || IsNil(o.Criteria) { + var ret map[string]interface{} + return ret + } + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplate) GetCriteriaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Criteria) { + return map[string]interface{}{}, false + } + return o.Criteria, true +} + +// HasCriteria returns a boolean if a field has been set. +func (o *SDKEvalTemplate) HasCriteria() bool { + if o != nil && !IsNil(o.Criteria) { + return true + } + + return false +} + +// SetCriteria gets a reference to the given map[string]interface{} and assigns it to the Criteria field. +func (o *SDKEvalTemplate) SetCriteria(v map[string]interface{}) { + o.Criteria = v +} + +// GetChoices returns the Choices field value if set, zero value otherwise. +func (o *SDKEvalTemplate) GetChoices() map[string]interface{} { + if o == nil || IsNil(o.Choices) { + var ret map[string]interface{} + return ret + } + return o.Choices +} + +// GetChoicesOk returns a tuple with the Choices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplate) GetChoicesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Choices) { + return map[string]interface{}{}, false + } + return o.Choices, true +} + +// HasChoices returns a boolean if a field has been set. +func (o *SDKEvalTemplate) HasChoices() bool { + if o != nil && !IsNil(o.Choices) { + return true + } + + return false +} + +// SetChoices gets a reference to the given map[string]interface{} and assigns it to the Choices field. +func (o *SDKEvalTemplate) SetChoices(v map[string]interface{}) { + o.Choices = v +} + +// GetMultiChoice returns the MultiChoice field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKEvalTemplate) GetMultiChoice() bool { + if o == nil || IsNil(o.MultiChoice.Get()) { + var ret bool + return ret + } + return *o.MultiChoice.Get() +} + +// GetMultiChoiceOk returns a tuple with the MultiChoice field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKEvalTemplate) GetMultiChoiceOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.MultiChoice.Get(), o.MultiChoice.IsSet() +} + +// HasMultiChoice returns a boolean if a field has been set. +func (o *SDKEvalTemplate) HasMultiChoice() bool { + if o != nil && o.MultiChoice.IsSet() { + return true + } + + return false +} + +// SetMultiChoice gets a reference to the given NullableBool and assigns it to the MultiChoice field. +func (o *SDKEvalTemplate) SetMultiChoice(v bool) { + o.MultiChoice.Set(&v) +} + +// SetMultiChoiceNil sets the value for MultiChoice to be an explicit nil +func (o *SDKEvalTemplate) SetMultiChoiceNil() { + o.MultiChoice.Set(nil) +} + +// UnsetMultiChoice ensures that no value is present for MultiChoice, not even an explicit nil +func (o *SDKEvalTemplate) UnsetMultiChoice() { + o.MultiChoice.Unset() +} + +func (o SDKEvalTemplate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKEvalTemplate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description.Get() + toSerialize["organization"] = o.Organization.Get() + toSerialize["owner"] = o.Owner.Get() + if !IsNil(o.EvalTags) { + toSerialize["eval_tags"] = o.EvalTags + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + toSerialize["eval_id"] = o.EvalId.Get() + if !IsNil(o.Criteria) { + toSerialize["criteria"] = o.Criteria + } + if !IsNil(o.Choices) { + toSerialize["choices"] = o.Choices + } + if o.MultiChoice.IsSet() { + toSerialize["multi_choice"] = o.MultiChoice.Get() + } + return toSerialize, nil +} + +func (o *SDKEvalTemplate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "description", + "organization", + "owner", + "eval_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKEvalTemplate := _SDKEvalTemplate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKEvalTemplate) + + if err != nil { + return err + } + + *o = SDKEvalTemplate(varSDKEvalTemplate) + + return err +} + +type NullableSDKEvalTemplate struct { + value *SDKEvalTemplate + isSet bool +} + +func (v NullableSDKEvalTemplate) Get() *SDKEvalTemplate { + return v.value +} + +func (v *NullableSDKEvalTemplate) Set(val *SDKEvalTemplate) { + v.value = val + v.isSet = true +} + +func (v NullableSDKEvalTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKEvalTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKEvalTemplate(val *SDKEvalTemplate) *NullableSDKEvalTemplate { + return &NullableSDKEvalTemplate{value: val, isSet: true} +} + +func (v NullableSDKEvalTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKEvalTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_eval_template_response.go b/go/futureagi/model_sdk_eval_template_response.go new file mode 100644 index 0000000..7ba792b --- /dev/null +++ b/go/futureagi/model_sdk_eval_template_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKEvalTemplateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKEvalTemplateResponse{} + +// SDKEvalTemplateResponse struct for SDKEvalTemplateResponse +type SDKEvalTemplateResponse struct { + Status bool `json:"status"` + Result SDKEvalTemplate `json:"result"` +} + +type _SDKEvalTemplateResponse SDKEvalTemplateResponse + +// NewSDKEvalTemplateResponse instantiates a new SDKEvalTemplateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKEvalTemplateResponse(status bool, result SDKEvalTemplate) *SDKEvalTemplateResponse { + this := SDKEvalTemplateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKEvalTemplateResponseWithDefaults instantiates a new SDKEvalTemplateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKEvalTemplateResponseWithDefaults() *SDKEvalTemplateResponse { + this := SDKEvalTemplateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKEvalTemplateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKEvalTemplateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKEvalTemplateResponse) GetResult() SDKEvalTemplate { + if o == nil { + var ret SDKEvalTemplate + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKEvalTemplateResponse) GetResultOk() (*SDKEvalTemplate, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKEvalTemplateResponse) SetResult(v SDKEvalTemplate) { + o.Result = v +} + +func (o SDKEvalTemplateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKEvalTemplateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKEvalTemplateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKEvalTemplateResponse := _SDKEvalTemplateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKEvalTemplateResponse) + + if err != nil { + return err + } + + *o = SDKEvalTemplateResponse(varSDKEvalTemplateResponse) + + return err +} + +type NullableSDKEvalTemplateResponse struct { + value *SDKEvalTemplateResponse + isSet bool +} + +func (v NullableSDKEvalTemplateResponse) Get() *SDKEvalTemplateResponse { + return v.value +} + +func (v *NullableSDKEvalTemplateResponse) Set(val *SDKEvalTemplateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKEvalTemplateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKEvalTemplateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKEvalTemplateResponse(val *SDKEvalTemplateResponse) *NullableSDKEvalTemplateResponse { + return &NullableSDKEvalTemplateResponse{value: val, isSet: true} +} + +func (v NullableSDKEvalTemplateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKEvalTemplateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_get_evals_response.go b/go/futureagi/model_sdk_get_evals_response.go new file mode 100644 index 0000000..ff68884 --- /dev/null +++ b/go/futureagi/model_sdk_get_evals_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKGetEvalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKGetEvalsResponse{} + +// SDKGetEvalsResponse struct for SDKGetEvalsResponse +type SDKGetEvalsResponse struct { + Status bool `json:"status"` + Result []SDKEvalTemplate `json:"result"` +} + +type _SDKGetEvalsResponse SDKGetEvalsResponse + +// NewSDKGetEvalsResponse instantiates a new SDKGetEvalsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKGetEvalsResponse(status bool, result []SDKEvalTemplate) *SDKGetEvalsResponse { + this := SDKGetEvalsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKGetEvalsResponseWithDefaults instantiates a new SDKGetEvalsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKGetEvalsResponseWithDefaults() *SDKGetEvalsResponse { + this := SDKGetEvalsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKGetEvalsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKGetEvalsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKGetEvalsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKGetEvalsResponse) GetResult() []SDKEvalTemplate { + if o == nil { + var ret []SDKEvalTemplate + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKGetEvalsResponse) GetResultOk() ([]SDKEvalTemplate, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *SDKGetEvalsResponse) SetResult(v []SDKEvalTemplate) { + o.Result = v +} + +func (o SDKGetEvalsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKGetEvalsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKGetEvalsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKGetEvalsResponse := _SDKGetEvalsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKGetEvalsResponse) + + if err != nil { + return err + } + + *o = SDKGetEvalsResponse(varSDKGetEvalsResponse) + + return err +} + +type NullableSDKGetEvalsResponse struct { + value *SDKGetEvalsResponse + isSet bool +} + +func (v NullableSDKGetEvalsResponse) Get() *SDKGetEvalsResponse { + return v.value +} + +func (v *NullableSDKGetEvalsResponse) Set(val *SDKGetEvalsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKGetEvalsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKGetEvalsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKGetEvalsResponse(val *SDKGetEvalsResponse) *NullableSDKGetEvalsResponse { + return &NullableSDKGetEvalsResponse{value: val, isSet: true} +} + +func (v NullableSDKGetEvalsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKGetEvalsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_message_result.go b/go/futureagi/model_sdk_message_result.go new file mode 100644 index 0000000..c7e4020 --- /dev/null +++ b/go/futureagi/model_sdk_message_result.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKMessageResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKMessageResult{} + +// SDKMessageResult struct for SDKMessageResult +type SDKMessageResult struct { + Message string `json:"message"` +} + +type _SDKMessageResult SDKMessageResult + +// NewSDKMessageResult instantiates a new SDKMessageResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKMessageResult(message string) *SDKMessageResult { + this := SDKMessageResult{} + this.Message = message + return &this +} + +// NewSDKMessageResultWithDefaults instantiates a new SDKMessageResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKMessageResultWithDefaults() *SDKMessageResult { + this := SDKMessageResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *SDKMessageResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *SDKMessageResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *SDKMessageResult) SetMessage(v string) { + o.Message = v +} + +func (o SDKMessageResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKMessageResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *SDKMessageResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKMessageResult := _SDKMessageResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKMessageResult) + + if err != nil { + return err + } + + *o = SDKMessageResult(varSDKMessageResult) + + return err +} + +type NullableSDKMessageResult struct { + value *SDKMessageResult + isSet bool +} + +func (v NullableSDKMessageResult) Get() *SDKMessageResult { + return v.value +} + +func (v *NullableSDKMessageResult) Set(val *SDKMessageResult) { + v.value = val + v.isSet = true +} + +func (v NullableSDKMessageResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKMessageResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKMessageResult(val *SDKMessageResult) *NullableSDKMessageResult { + return &NullableSDKMessageResult{value: val, isSet: true} +} + +func (v NullableSDKMessageResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKMessageResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_simulation_analytics_response.go b/go/futureagi/model_sdk_simulation_analytics_response.go new file mode 100644 index 0000000..3dda26b --- /dev/null +++ b/go/futureagi/model_sdk_simulation_analytics_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKSimulationAnalyticsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKSimulationAnalyticsResponse{} + +// SDKSimulationAnalyticsResponse struct for SDKSimulationAnalyticsResponse +type SDKSimulationAnalyticsResponse struct { + Status bool `json:"status"` + Result SDKSimulationAnalyticsResult `json:"result"` +} + +type _SDKSimulationAnalyticsResponse SDKSimulationAnalyticsResponse + +// NewSDKSimulationAnalyticsResponse instantiates a new SDKSimulationAnalyticsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKSimulationAnalyticsResponse(status bool, result SDKSimulationAnalyticsResult) *SDKSimulationAnalyticsResponse { + this := SDKSimulationAnalyticsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKSimulationAnalyticsResponseWithDefaults instantiates a new SDKSimulationAnalyticsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKSimulationAnalyticsResponseWithDefaults() *SDKSimulationAnalyticsResponse { + this := SDKSimulationAnalyticsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKSimulationAnalyticsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKSimulationAnalyticsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKSimulationAnalyticsResponse) GetResult() SDKSimulationAnalyticsResult { + if o == nil { + var ret SDKSimulationAnalyticsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResponse) GetResultOk() (*SDKSimulationAnalyticsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKSimulationAnalyticsResponse) SetResult(v SDKSimulationAnalyticsResult) { + o.Result = v +} + +func (o SDKSimulationAnalyticsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKSimulationAnalyticsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKSimulationAnalyticsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKSimulationAnalyticsResponse := _SDKSimulationAnalyticsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKSimulationAnalyticsResponse) + + if err != nil { + return err + } + + *o = SDKSimulationAnalyticsResponse(varSDKSimulationAnalyticsResponse) + + return err +} + +type NullableSDKSimulationAnalyticsResponse struct { + value *SDKSimulationAnalyticsResponse + isSet bool +} + +func (v NullableSDKSimulationAnalyticsResponse) Get() *SDKSimulationAnalyticsResponse { + return v.value +} + +func (v *NullableSDKSimulationAnalyticsResponse) Set(val *SDKSimulationAnalyticsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKSimulationAnalyticsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKSimulationAnalyticsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKSimulationAnalyticsResponse(val *SDKSimulationAnalyticsResponse) *NullableSDKSimulationAnalyticsResponse { + return &NullableSDKSimulationAnalyticsResponse{value: val, isSet: true} +} + +func (v NullableSDKSimulationAnalyticsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKSimulationAnalyticsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_simulation_analytics_result.go b/go/futureagi/model_sdk_simulation_analytics_result.go new file mode 100644 index 0000000..0be6621 --- /dev/null +++ b/go/futureagi/model_sdk_simulation_analytics_result.go @@ -0,0 +1,432 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKSimulationAnalyticsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKSimulationAnalyticsResult{} + +// SDKSimulationAnalyticsResult struct for SDKSimulationAnalyticsResult +type SDKSimulationAnalyticsResult struct { + ExecutionId *string `json:"execution_id,omitempty"` + RunTestName string `json:"run_test_name"` + Status *string `json:"status,omitempty"` + Message *string `json:"message,omitempty"` + EvalResults []map[string]interface{} `json:"eval_results"` + EvalAverages map[string]interface{} `json:"eval_averages"` + SystemSummary map[string]interface{} `json:"system_summary"` + EvalExplanationSummary map[string]interface{} `json:"eval_explanation_summary,omitempty"` + EvalExplanationSummaryStatus NullableString `json:"eval_explanation_summary_status,omitempty"` +} + +type _SDKSimulationAnalyticsResult SDKSimulationAnalyticsResult + +// NewSDKSimulationAnalyticsResult instantiates a new SDKSimulationAnalyticsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKSimulationAnalyticsResult(runTestName string, evalResults []map[string]interface{}, evalAverages map[string]interface{}, systemSummary map[string]interface{}) *SDKSimulationAnalyticsResult { + this := SDKSimulationAnalyticsResult{} + this.RunTestName = runTestName + this.EvalResults = evalResults + this.EvalAverages = evalAverages + this.SystemSummary = systemSummary + return &this +} + +// NewSDKSimulationAnalyticsResultWithDefaults instantiates a new SDKSimulationAnalyticsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKSimulationAnalyticsResultWithDefaults() *SDKSimulationAnalyticsResult { + this := SDKSimulationAnalyticsResult{} + return &this +} + +// GetExecutionId returns the ExecutionId field value if set, zero value otherwise. +func (o *SDKSimulationAnalyticsResult) GetExecutionId() string { + if o == nil || IsNil(o.ExecutionId) { + var ret string + return ret + } + return *o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionId) { + return nil, false + } + return o.ExecutionId, true +} + +// HasExecutionId returns a boolean if a field has been set. +func (o *SDKSimulationAnalyticsResult) HasExecutionId() bool { + if o != nil && !IsNil(o.ExecutionId) { + return true + } + + return false +} + +// SetExecutionId gets a reference to the given string and assigns it to the ExecutionId field. +func (o *SDKSimulationAnalyticsResult) SetExecutionId(v string) { + o.ExecutionId = &v +} + +// GetRunTestName returns the RunTestName field value +func (o *SDKSimulationAnalyticsResult) GetRunTestName() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestName +} + +// GetRunTestNameOk returns a tuple with the RunTestName field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetRunTestNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestName, true +} + +// SetRunTestName sets field value +func (o *SDKSimulationAnalyticsResult) SetRunTestName(v string) { + o.RunTestName = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SDKSimulationAnalyticsResult) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *SDKSimulationAnalyticsResult) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *SDKSimulationAnalyticsResult) SetStatus(v string) { + o.Status = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *SDKSimulationAnalyticsResult) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *SDKSimulationAnalyticsResult) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *SDKSimulationAnalyticsResult) SetMessage(v string) { + o.Message = &v +} + +// GetEvalResults returns the EvalResults field value +func (o *SDKSimulationAnalyticsResult) GetEvalResults() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.EvalResults +} + +// GetEvalResultsOk returns a tuple with the EvalResults field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetEvalResultsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.EvalResults, true +} + +// SetEvalResults sets field value +func (o *SDKSimulationAnalyticsResult) SetEvalResults(v []map[string]interface{}) { + o.EvalResults = v +} + +// GetEvalAverages returns the EvalAverages field value +func (o *SDKSimulationAnalyticsResult) GetEvalAverages() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.EvalAverages +} + +// GetEvalAveragesOk returns a tuple with the EvalAverages field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetEvalAveragesOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.EvalAverages, true +} + +// SetEvalAverages sets field value +func (o *SDKSimulationAnalyticsResult) SetEvalAverages(v map[string]interface{}) { + o.EvalAverages = v +} + +// GetSystemSummary returns the SystemSummary field value +func (o *SDKSimulationAnalyticsResult) GetSystemSummary() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.SystemSummary +} + +// GetSystemSummaryOk returns a tuple with the SystemSummary field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetSystemSummaryOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.SystemSummary, true +} + +// SetSystemSummary sets field value +func (o *SDKSimulationAnalyticsResult) SetSystemSummary(v map[string]interface{}) { + o.SystemSummary = v +} + +// GetEvalExplanationSummary returns the EvalExplanationSummary field value if set, zero value otherwise. +func (o *SDKSimulationAnalyticsResult) GetEvalExplanationSummary() map[string]interface{} { + if o == nil || IsNil(o.EvalExplanationSummary) { + var ret map[string]interface{} + return ret + } + return o.EvalExplanationSummary +} + +// GetEvalExplanationSummaryOk returns a tuple with the EvalExplanationSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationAnalyticsResult) GetEvalExplanationSummaryOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalExplanationSummary) { + return map[string]interface{}{}, false + } + return o.EvalExplanationSummary, true +} + +// HasEvalExplanationSummary returns a boolean if a field has been set. +func (o *SDKSimulationAnalyticsResult) HasEvalExplanationSummary() bool { + if o != nil && !IsNil(o.EvalExplanationSummary) { + return true + } + + return false +} + +// SetEvalExplanationSummary gets a reference to the given map[string]interface{} and assigns it to the EvalExplanationSummary field. +func (o *SDKSimulationAnalyticsResult) SetEvalExplanationSummary(v map[string]interface{}) { + o.EvalExplanationSummary = v +} + +// GetEvalExplanationSummaryStatus returns the EvalExplanationSummaryStatus field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationAnalyticsResult) GetEvalExplanationSummaryStatus() string { + if o == nil || IsNil(o.EvalExplanationSummaryStatus.Get()) { + var ret string + return ret + } + return *o.EvalExplanationSummaryStatus.Get() +} + +// GetEvalExplanationSummaryStatusOk returns a tuple with the EvalExplanationSummaryStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationAnalyticsResult) GetEvalExplanationSummaryStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalExplanationSummaryStatus.Get(), o.EvalExplanationSummaryStatus.IsSet() +} + +// HasEvalExplanationSummaryStatus returns a boolean if a field has been set. +func (o *SDKSimulationAnalyticsResult) HasEvalExplanationSummaryStatus() bool { + if o != nil && o.EvalExplanationSummaryStatus.IsSet() { + return true + } + + return false +} + +// SetEvalExplanationSummaryStatus gets a reference to the given NullableString and assigns it to the EvalExplanationSummaryStatus field. +func (o *SDKSimulationAnalyticsResult) SetEvalExplanationSummaryStatus(v string) { + o.EvalExplanationSummaryStatus.Set(&v) +} + +// SetEvalExplanationSummaryStatusNil sets the value for EvalExplanationSummaryStatus to be an explicit nil +func (o *SDKSimulationAnalyticsResult) SetEvalExplanationSummaryStatusNil() { + o.EvalExplanationSummaryStatus.Set(nil) +} + +// UnsetEvalExplanationSummaryStatus ensures that no value is present for EvalExplanationSummaryStatus, not even an explicit nil +func (o *SDKSimulationAnalyticsResult) UnsetEvalExplanationSummaryStatus() { + o.EvalExplanationSummaryStatus.Unset() +} + +func (o SDKSimulationAnalyticsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKSimulationAnalyticsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExecutionId) { + toSerialize["execution_id"] = o.ExecutionId + } + toSerialize["run_test_name"] = o.RunTestName + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + toSerialize["eval_results"] = o.EvalResults + toSerialize["eval_averages"] = o.EvalAverages + toSerialize["system_summary"] = o.SystemSummary + if !IsNil(o.EvalExplanationSummary) { + toSerialize["eval_explanation_summary"] = o.EvalExplanationSummary + } + if o.EvalExplanationSummaryStatus.IsSet() { + toSerialize["eval_explanation_summary_status"] = o.EvalExplanationSummaryStatus.Get() + } + return toSerialize, nil +} + +func (o *SDKSimulationAnalyticsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "run_test_name", + "eval_results", + "eval_averages", + "system_summary", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKSimulationAnalyticsResult := _SDKSimulationAnalyticsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKSimulationAnalyticsResult) + + if err != nil { + return err + } + + *o = SDKSimulationAnalyticsResult(varSDKSimulationAnalyticsResult) + + return err +} + +type NullableSDKSimulationAnalyticsResult struct { + value *SDKSimulationAnalyticsResult + isSet bool +} + +func (v NullableSDKSimulationAnalyticsResult) Get() *SDKSimulationAnalyticsResult { + return v.value +} + +func (v *NullableSDKSimulationAnalyticsResult) Set(val *SDKSimulationAnalyticsResult) { + v.value = val + v.isSet = true +} + +func (v NullableSDKSimulationAnalyticsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKSimulationAnalyticsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKSimulationAnalyticsResult(val *SDKSimulationAnalyticsResult) *NullableSDKSimulationAnalyticsResult { + return &NullableSDKSimulationAnalyticsResult{value: val, isSet: true} +} + +func (v NullableSDKSimulationAnalyticsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKSimulationAnalyticsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_simulation_metrics_response.go b/go/futureagi/model_sdk_simulation_metrics_response.go new file mode 100644 index 0000000..e318221 --- /dev/null +++ b/go/futureagi/model_sdk_simulation_metrics_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKSimulationMetricsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKSimulationMetricsResponse{} + +// SDKSimulationMetricsResponse struct for SDKSimulationMetricsResponse +type SDKSimulationMetricsResponse struct { + Status bool `json:"status"` + Result SDKSimulationMetricsResult `json:"result"` +} + +type _SDKSimulationMetricsResponse SDKSimulationMetricsResponse + +// NewSDKSimulationMetricsResponse instantiates a new SDKSimulationMetricsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKSimulationMetricsResponse(status bool, result SDKSimulationMetricsResult) *SDKSimulationMetricsResponse { + this := SDKSimulationMetricsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKSimulationMetricsResponseWithDefaults instantiates a new SDKSimulationMetricsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKSimulationMetricsResponseWithDefaults() *SDKSimulationMetricsResponse { + this := SDKSimulationMetricsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKSimulationMetricsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKSimulationMetricsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKSimulationMetricsResponse) GetResult() SDKSimulationMetricsResult { + if o == nil { + var ret SDKSimulationMetricsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResponse) GetResultOk() (*SDKSimulationMetricsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKSimulationMetricsResponse) SetResult(v SDKSimulationMetricsResult) { + o.Result = v +} + +func (o SDKSimulationMetricsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKSimulationMetricsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKSimulationMetricsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKSimulationMetricsResponse := _SDKSimulationMetricsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKSimulationMetricsResponse) + + if err != nil { + return err + } + + *o = SDKSimulationMetricsResponse(varSDKSimulationMetricsResponse) + + return err +} + +type NullableSDKSimulationMetricsResponse struct { + value *SDKSimulationMetricsResponse + isSet bool +} + +func (v NullableSDKSimulationMetricsResponse) Get() *SDKSimulationMetricsResponse { + return v.value +} + +func (v *NullableSDKSimulationMetricsResponse) Set(val *SDKSimulationMetricsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKSimulationMetricsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKSimulationMetricsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKSimulationMetricsResponse(val *SDKSimulationMetricsResponse) *NullableSDKSimulationMetricsResponse { + return &NullableSDKSimulationMetricsResponse{value: val, isSet: true} +} + +func (v NullableSDKSimulationMetricsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKSimulationMetricsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_simulation_metrics_result.go b/go/futureagi/model_sdk_simulation_metrics_result.go new file mode 100644 index 0000000..54cf5c2 --- /dev/null +++ b/go/futureagi/model_sdk_simulation_metrics_result.go @@ -0,0 +1,771 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the SDKSimulationMetricsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKSimulationMetricsResult{} + +// SDKSimulationMetricsResult struct for SDKSimulationMetricsResult +type SDKSimulationMetricsResult struct { + CallExecutionId *string `json:"call_execution_id,omitempty"` + ExecutionId *string `json:"execution_id,omitempty"` + Status *string `json:"status,omitempty"` + DurationSeconds NullableFloat32 `json:"duration_seconds,omitempty"` + StartedAt NullableTime `json:"started_at,omitempty"` + CompletedAt NullableTime `json:"completed_at,omitempty"` + TotalCalls *int32 `json:"total_calls,omitempty"` + CompletedCalls *int32 `json:"completed_calls,omitempty"` + FailedCalls *int32 `json:"failed_calls,omitempty"` + Latency map[string]interface{} `json:"latency,omitempty"` + Cost map[string]interface{} `json:"cost,omitempty"` + Conversation map[string]interface{} `json:"conversation,omitempty"` + ChatMetrics map[string]interface{} `json:"chat_metrics,omitempty"` + Metrics map[string]interface{} `json:"metrics,omitempty"` + TotalPages *int32 `json:"total_pages,omitempty"` + CurrentPage *int32 `json:"current_page,omitempty"` + Count *int32 `json:"count,omitempty"` + Results []ExecutionMetrics `json:"results,omitempty"` +} + +// NewSDKSimulationMetricsResult instantiates a new SDKSimulationMetricsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKSimulationMetricsResult() *SDKSimulationMetricsResult { + this := SDKSimulationMetricsResult{} + return &this +} + +// NewSDKSimulationMetricsResultWithDefaults instantiates a new SDKSimulationMetricsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKSimulationMetricsResultWithDefaults() *SDKSimulationMetricsResult { + this := SDKSimulationMetricsResult{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetCallExecutionId() string { + if o == nil || IsNil(o.CallExecutionId) { + var ret string + return ret + } + return *o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.CallExecutionId) { + return nil, false + } + return o.CallExecutionId, true +} + +// HasCallExecutionId returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasCallExecutionId() bool { + if o != nil && !IsNil(o.CallExecutionId) { + return true + } + + return false +} + +// SetCallExecutionId gets a reference to the given string and assigns it to the CallExecutionId field. +func (o *SDKSimulationMetricsResult) SetCallExecutionId(v string) { + o.CallExecutionId = &v +} + +// GetExecutionId returns the ExecutionId field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetExecutionId() string { + if o == nil || IsNil(o.ExecutionId) { + var ret string + return ret + } + return *o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionId) { + return nil, false + } + return o.ExecutionId, true +} + +// HasExecutionId returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasExecutionId() bool { + if o != nil && !IsNil(o.ExecutionId) { + return true + } + + return false +} + +// SetExecutionId gets a reference to the given string and assigns it to the ExecutionId field. +func (o *SDKSimulationMetricsResult) SetExecutionId(v string) { + o.ExecutionId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *SDKSimulationMetricsResult) SetStatus(v string) { + o.Status = &v +} + +// GetDurationSeconds returns the DurationSeconds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationMetricsResult) GetDurationSeconds() float32 { + if o == nil || IsNil(o.DurationSeconds.Get()) { + var ret float32 + return ret + } + return *o.DurationSeconds.Get() +} + +// GetDurationSecondsOk returns a tuple with the DurationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationMetricsResult) GetDurationSecondsOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.DurationSeconds.Get(), o.DurationSeconds.IsSet() +} + +// HasDurationSeconds returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasDurationSeconds() bool { + if o != nil && o.DurationSeconds.IsSet() { + return true + } + + return false +} + +// SetDurationSeconds gets a reference to the given NullableFloat32 and assigns it to the DurationSeconds field. +func (o *SDKSimulationMetricsResult) SetDurationSeconds(v float32) { + o.DurationSeconds.Set(&v) +} + +// SetDurationSecondsNil sets the value for DurationSeconds to be an explicit nil +func (o *SDKSimulationMetricsResult) SetDurationSecondsNil() { + o.DurationSeconds.Set(nil) +} + +// UnsetDurationSeconds ensures that no value is present for DurationSeconds, not even an explicit nil +func (o *SDKSimulationMetricsResult) UnsetDurationSeconds() { + o.DurationSeconds.Unset() +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationMetricsResult) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt.Get()) { + var ret time.Time + return ret + } + return *o.StartedAt.Get() +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationMetricsResult) GetStartedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.StartedAt.Get(), o.StartedAt.IsSet() +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasStartedAt() bool { + if o != nil && o.StartedAt.IsSet() { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given NullableTime and assigns it to the StartedAt field. +func (o *SDKSimulationMetricsResult) SetStartedAt(v time.Time) { + o.StartedAt.Set(&v) +} + +// SetStartedAtNil sets the value for StartedAt to be an explicit nil +func (o *SDKSimulationMetricsResult) SetStartedAtNil() { + o.StartedAt.Set(nil) +} + +// UnsetStartedAt ensures that no value is present for StartedAt, not even an explicit nil +func (o *SDKSimulationMetricsResult) UnsetStartedAt() { + o.StartedAt.Unset() +} + +// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationMetricsResult) GetCompletedAt() time.Time { + if o == nil || IsNil(o.CompletedAt.Get()) { + var ret time.Time + return ret + } + return *o.CompletedAt.Get() +} + +// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationMetricsResult) GetCompletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CompletedAt.Get(), o.CompletedAt.IsSet() +} + +// HasCompletedAt returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasCompletedAt() bool { + if o != nil && o.CompletedAt.IsSet() { + return true + } + + return false +} + +// SetCompletedAt gets a reference to the given NullableTime and assigns it to the CompletedAt field. +func (o *SDKSimulationMetricsResult) SetCompletedAt(v time.Time) { + o.CompletedAt.Set(&v) +} + +// SetCompletedAtNil sets the value for CompletedAt to be an explicit nil +func (o *SDKSimulationMetricsResult) SetCompletedAtNil() { + o.CompletedAt.Set(nil) +} + +// UnsetCompletedAt ensures that no value is present for CompletedAt, not even an explicit nil +func (o *SDKSimulationMetricsResult) UnsetCompletedAt() { + o.CompletedAt.Unset() +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *SDKSimulationMetricsResult) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetCompletedCalls returns the CompletedCalls field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetCompletedCalls() int32 { + if o == nil || IsNil(o.CompletedCalls) { + var ret int32 + return ret + } + return *o.CompletedCalls +} + +// GetCompletedCallsOk returns a tuple with the CompletedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetCompletedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.CompletedCalls) { + return nil, false + } + return o.CompletedCalls, true +} + +// HasCompletedCalls returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasCompletedCalls() bool { + if o != nil && !IsNil(o.CompletedCalls) { + return true + } + + return false +} + +// SetCompletedCalls gets a reference to the given int32 and assigns it to the CompletedCalls field. +func (o *SDKSimulationMetricsResult) SetCompletedCalls(v int32) { + o.CompletedCalls = &v +} + +// GetFailedCalls returns the FailedCalls field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetFailedCalls() int32 { + if o == nil || IsNil(o.FailedCalls) { + var ret int32 + return ret + } + return *o.FailedCalls +} + +// GetFailedCallsOk returns a tuple with the FailedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetFailedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.FailedCalls) { + return nil, false + } + return o.FailedCalls, true +} + +// HasFailedCalls returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasFailedCalls() bool { + if o != nil && !IsNil(o.FailedCalls) { + return true + } + + return false +} + +// SetFailedCalls gets a reference to the given int32 and assigns it to the FailedCalls field. +func (o *SDKSimulationMetricsResult) SetFailedCalls(v int32) { + o.FailedCalls = &v +} + +// GetLatency returns the Latency field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetLatency() map[string]interface{} { + if o == nil || IsNil(o.Latency) { + var ret map[string]interface{} + return ret + } + return o.Latency +} + +// GetLatencyOk returns a tuple with the Latency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetLatencyOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Latency) { + return map[string]interface{}{}, false + } + return o.Latency, true +} + +// HasLatency returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasLatency() bool { + if o != nil && !IsNil(o.Latency) { + return true + } + + return false +} + +// SetLatency gets a reference to the given map[string]interface{} and assigns it to the Latency field. +func (o *SDKSimulationMetricsResult) SetLatency(v map[string]interface{}) { + o.Latency = v +} + +// GetCost returns the Cost field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetCost() map[string]interface{} { + if o == nil || IsNil(o.Cost) { + var ret map[string]interface{} + return ret + } + return o.Cost +} + +// GetCostOk returns a tuple with the Cost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetCostOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Cost) { + return map[string]interface{}{}, false + } + return o.Cost, true +} + +// HasCost returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasCost() bool { + if o != nil && !IsNil(o.Cost) { + return true + } + + return false +} + +// SetCost gets a reference to the given map[string]interface{} and assigns it to the Cost field. +func (o *SDKSimulationMetricsResult) SetCost(v map[string]interface{}) { + o.Cost = v +} + +// GetConversation returns the Conversation field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetConversation() map[string]interface{} { + if o == nil || IsNil(o.Conversation) { + var ret map[string]interface{} + return ret + } + return o.Conversation +} + +// GetConversationOk returns a tuple with the Conversation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetConversationOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Conversation) { + return map[string]interface{}{}, false + } + return o.Conversation, true +} + +// HasConversation returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasConversation() bool { + if o != nil && !IsNil(o.Conversation) { + return true + } + + return false +} + +// SetConversation gets a reference to the given map[string]interface{} and assigns it to the Conversation field. +func (o *SDKSimulationMetricsResult) SetConversation(v map[string]interface{}) { + o.Conversation = v +} + +// GetChatMetrics returns the ChatMetrics field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetChatMetrics() map[string]interface{} { + if o == nil || IsNil(o.ChatMetrics) { + var ret map[string]interface{} + return ret + } + return o.ChatMetrics +} + +// GetChatMetricsOk returns a tuple with the ChatMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetChatMetricsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChatMetrics) { + return map[string]interface{}{}, false + } + return o.ChatMetrics, true +} + +// HasChatMetrics returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasChatMetrics() bool { + if o != nil && !IsNil(o.ChatMetrics) { + return true + } + + return false +} + +// SetChatMetrics gets a reference to the given map[string]interface{} and assigns it to the ChatMetrics field. +func (o *SDKSimulationMetricsResult) SetChatMetrics(v map[string]interface{}) { + o.ChatMetrics = v +} + +// GetMetrics returns the Metrics field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetMetrics() map[string]interface{} { + if o == nil || IsNil(o.Metrics) { + var ret map[string]interface{} + return ret + } + return o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetMetricsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metrics) { + return map[string]interface{}{}, false + } + return o.Metrics, true +} + +// HasMetrics returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasMetrics() bool { + if o != nil && !IsNil(o.Metrics) { + return true + } + + return false +} + +// SetMetrics gets a reference to the given map[string]interface{} and assigns it to the Metrics field. +func (o *SDKSimulationMetricsResult) SetMetrics(v map[string]interface{}) { + o.Metrics = v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetTotalPages() int32 { + if o == nil || IsNil(o.TotalPages) { + var ret int32 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetTotalPagesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field. +func (o *SDKSimulationMetricsResult) SetTotalPages(v int32) { + o.TotalPages = &v +} + +// GetCurrentPage returns the CurrentPage field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetCurrentPage() int32 { + if o == nil || IsNil(o.CurrentPage) { + var ret int32 + return ret + } + return *o.CurrentPage +} + +// GetCurrentPageOk returns a tuple with the CurrentPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetCurrentPageOk() (*int32, bool) { + if o == nil || IsNil(o.CurrentPage) { + return nil, false + } + return o.CurrentPage, true +} + +// HasCurrentPage returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasCurrentPage() bool { + if o != nil && !IsNil(o.CurrentPage) { + return true + } + + return false +} + +// SetCurrentPage gets a reference to the given int32 and assigns it to the CurrentPage field. +func (o *SDKSimulationMetricsResult) SetCurrentPage(v int32) { + o.CurrentPage = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *SDKSimulationMetricsResult) SetCount(v int32) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *SDKSimulationMetricsResult) GetResults() []ExecutionMetrics { + if o == nil || IsNil(o.Results) { + var ret []ExecutionMetrics + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationMetricsResult) GetResultsOk() ([]ExecutionMetrics, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *SDKSimulationMetricsResult) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ExecutionMetrics and assigns it to the Results field. +func (o *SDKSimulationMetricsResult) SetResults(v []ExecutionMetrics) { + o.Results = v +} + +func (o SDKSimulationMetricsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKSimulationMetricsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallExecutionId) { + toSerialize["call_execution_id"] = o.CallExecutionId + } + if !IsNil(o.ExecutionId) { + toSerialize["execution_id"] = o.ExecutionId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.DurationSeconds.IsSet() { + toSerialize["duration_seconds"] = o.DurationSeconds.Get() + } + if o.StartedAt.IsSet() { + toSerialize["started_at"] = o.StartedAt.Get() + } + if o.CompletedAt.IsSet() { + toSerialize["completed_at"] = o.CompletedAt.Get() + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.CompletedCalls) { + toSerialize["completed_calls"] = o.CompletedCalls + } + if !IsNil(o.FailedCalls) { + toSerialize["failed_calls"] = o.FailedCalls + } + if !IsNil(o.Latency) { + toSerialize["latency"] = o.Latency + } + if !IsNil(o.Cost) { + toSerialize["cost"] = o.Cost + } + if !IsNil(o.Conversation) { + toSerialize["conversation"] = o.Conversation + } + if !IsNil(o.ChatMetrics) { + toSerialize["chat_metrics"] = o.ChatMetrics + } + if !IsNil(o.Metrics) { + toSerialize["metrics"] = o.Metrics + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.CurrentPage) { + toSerialize["current_page"] = o.CurrentPage + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullableSDKSimulationMetricsResult struct { + value *SDKSimulationMetricsResult + isSet bool +} + +func (v NullableSDKSimulationMetricsResult) Get() *SDKSimulationMetricsResult { + return v.value +} + +func (v *NullableSDKSimulationMetricsResult) Set(val *SDKSimulationMetricsResult) { + v.value = val + v.isSet = true +} + +func (v NullableSDKSimulationMetricsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKSimulationMetricsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKSimulationMetricsResult(val *SDKSimulationMetricsResult) *NullableSDKSimulationMetricsResult { + return &NullableSDKSimulationMetricsResult{value: val, isSet: true} +} + +func (v NullableSDKSimulationMetricsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKSimulationMetricsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_simulation_runs_response.go b/go/futureagi/model_sdk_simulation_runs_response.go new file mode 100644 index 0000000..057e752 --- /dev/null +++ b/go/futureagi/model_sdk_simulation_runs_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKSimulationRunsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKSimulationRunsResponse{} + +// SDKSimulationRunsResponse struct for SDKSimulationRunsResponse +type SDKSimulationRunsResponse struct { + Status bool `json:"status"` + Result SDKSimulationRunsResult `json:"result"` +} + +type _SDKSimulationRunsResponse SDKSimulationRunsResponse + +// NewSDKSimulationRunsResponse instantiates a new SDKSimulationRunsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKSimulationRunsResponse(status bool, result SDKSimulationRunsResult) *SDKSimulationRunsResponse { + this := SDKSimulationRunsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKSimulationRunsResponseWithDefaults instantiates a new SDKSimulationRunsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKSimulationRunsResponseWithDefaults() *SDKSimulationRunsResponse { + this := SDKSimulationRunsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKSimulationRunsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKSimulationRunsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKSimulationRunsResponse) GetResult() SDKSimulationRunsResult { + if o == nil { + var ret SDKSimulationRunsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResponse) GetResultOk() (*SDKSimulationRunsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKSimulationRunsResponse) SetResult(v SDKSimulationRunsResult) { + o.Result = v +} + +func (o SDKSimulationRunsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKSimulationRunsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKSimulationRunsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKSimulationRunsResponse := _SDKSimulationRunsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKSimulationRunsResponse) + + if err != nil { + return err + } + + *o = SDKSimulationRunsResponse(varSDKSimulationRunsResponse) + + return err +} + +type NullableSDKSimulationRunsResponse struct { + value *SDKSimulationRunsResponse + isSet bool +} + +func (v NullableSDKSimulationRunsResponse) Get() *SDKSimulationRunsResponse { + return v.value +} + +func (v *NullableSDKSimulationRunsResponse) Set(val *SDKSimulationRunsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKSimulationRunsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKSimulationRunsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKSimulationRunsResponse(val *SDKSimulationRunsResponse) *NullableSDKSimulationRunsResponse { + return &NullableSDKSimulationRunsResponse{value: val, isSet: true} +} + +func (v NullableSDKSimulationRunsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKSimulationRunsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_simulation_runs_result.go b/go/futureagi/model_sdk_simulation_runs_result.go new file mode 100644 index 0000000..0afbd55 --- /dev/null +++ b/go/futureagi/model_sdk_simulation_runs_result.go @@ -0,0 +1,1020 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" + "time" +) + +// checks if the SDKSimulationRunsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKSimulationRunsResult{} + +// SDKSimulationRunsResult struct for SDKSimulationRunsResult +type SDKSimulationRunsResult struct { + CallExecutionId *string `json:"call_execution_id,omitempty"` + ExecutionId *string `json:"execution_id,omitempty"` + ScenarioId *string `json:"scenario_id,omitempty"` + ScenarioName *string `json:"scenario_name,omitempty"` + Status *string `json:"status,omitempty"` + StartedAt NullableTime `json:"started_at,omitempty"` + CompletedAt NullableTime `json:"completed_at,omitempty"` + DurationSeconds NullableFloat32 `json:"duration_seconds,omitempty"` + EndedReason NullableString `json:"ended_reason,omitempty"` + CallSummary NullableString `json:"call_summary,omitempty"` + TotalCalls *int32 `json:"total_calls,omitempty"` + CompletedCalls *int32 `json:"completed_calls,omitempty"` + FailedCalls *int32 `json:"failed_calls,omitempty"` + EvalOutputs map[string]interface{} `json:"eval_outputs,omitempty"` + EvalResults []map[string]interface{} `json:"eval_results,omitempty"` + Latency map[string]interface{} `json:"latency,omitempty"` + Cost map[string]interface{} `json:"cost,omitempty"` + CallResults map[string]interface{} `json:"call_results,omitempty"` + EvalExplanationSummary map[string]interface{} `json:"eval_explanation_summary,omitempty"` + EvalExplanationSummaryStatus NullableString `json:"eval_explanation_summary_status,omitempty"` + TotalPages *int32 `json:"total_pages,omitempty"` + CurrentPage *int32 `json:"current_page,omitempty"` + Count *int32 `json:"count,omitempty"` + Results []ExecutionRuns `json:"results,omitempty"` +} + +// NewSDKSimulationRunsResult instantiates a new SDKSimulationRunsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKSimulationRunsResult() *SDKSimulationRunsResult { + this := SDKSimulationRunsResult{} + return &this +} + +// NewSDKSimulationRunsResultWithDefaults instantiates a new SDKSimulationRunsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKSimulationRunsResultWithDefaults() *SDKSimulationRunsResult { + this := SDKSimulationRunsResult{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetCallExecutionId() string { + if o == nil || IsNil(o.CallExecutionId) { + var ret string + return ret + } + return *o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.CallExecutionId) { + return nil, false + } + return o.CallExecutionId, true +} + +// HasCallExecutionId returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCallExecutionId() bool { + if o != nil && !IsNil(o.CallExecutionId) { + return true + } + + return false +} + +// SetCallExecutionId gets a reference to the given string and assigns it to the CallExecutionId field. +func (o *SDKSimulationRunsResult) SetCallExecutionId(v string) { + o.CallExecutionId = &v +} + +// GetExecutionId returns the ExecutionId field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetExecutionId() string { + if o == nil || IsNil(o.ExecutionId) { + var ret string + return ret + } + return *o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionId) { + return nil, false + } + return o.ExecutionId, true +} + +// HasExecutionId returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasExecutionId() bool { + if o != nil && !IsNil(o.ExecutionId) { + return true + } + + return false +} + +// SetExecutionId gets a reference to the given string and assigns it to the ExecutionId field. +func (o *SDKSimulationRunsResult) SetExecutionId(v string) { + o.ExecutionId = &v +} + +// GetScenarioId returns the ScenarioId field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetScenarioId() string { + if o == nil || IsNil(o.ScenarioId) { + var ret string + return ret + } + return *o.ScenarioId +} + +// GetScenarioIdOk returns a tuple with the ScenarioId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetScenarioIdOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioId) { + return nil, false + } + return o.ScenarioId, true +} + +// HasScenarioId returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasScenarioId() bool { + if o != nil && !IsNil(o.ScenarioId) { + return true + } + + return false +} + +// SetScenarioId gets a reference to the given string and assigns it to the ScenarioId field. +func (o *SDKSimulationRunsResult) SetScenarioId(v string) { + o.ScenarioId = &v +} + +// GetScenarioName returns the ScenarioName field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetScenarioName() string { + if o == nil || IsNil(o.ScenarioName) { + var ret string + return ret + } + return *o.ScenarioName +} + +// GetScenarioNameOk returns a tuple with the ScenarioName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetScenarioNameOk() (*string, bool) { + if o == nil || IsNil(o.ScenarioName) { + return nil, false + } + return o.ScenarioName, true +} + +// HasScenarioName returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasScenarioName() bool { + if o != nil && !IsNil(o.ScenarioName) { + return true + } + + return false +} + +// SetScenarioName gets a reference to the given string and assigns it to the ScenarioName field. +func (o *SDKSimulationRunsResult) SetScenarioName(v string) { + o.ScenarioName = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *SDKSimulationRunsResult) SetStatus(v string) { + o.Status = &v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationRunsResult) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt.Get()) { + var ret time.Time + return ret + } + return *o.StartedAt.Get() +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationRunsResult) GetStartedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.StartedAt.Get(), o.StartedAt.IsSet() +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasStartedAt() bool { + if o != nil && o.StartedAt.IsSet() { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given NullableTime and assigns it to the StartedAt field. +func (o *SDKSimulationRunsResult) SetStartedAt(v time.Time) { + o.StartedAt.Set(&v) +} + +// SetStartedAtNil sets the value for StartedAt to be an explicit nil +func (o *SDKSimulationRunsResult) SetStartedAtNil() { + o.StartedAt.Set(nil) +} + +// UnsetStartedAt ensures that no value is present for StartedAt, not even an explicit nil +func (o *SDKSimulationRunsResult) UnsetStartedAt() { + o.StartedAt.Unset() +} + +// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationRunsResult) GetCompletedAt() time.Time { + if o == nil || IsNil(o.CompletedAt.Get()) { + var ret time.Time + return ret + } + return *o.CompletedAt.Get() +} + +// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationRunsResult) GetCompletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CompletedAt.Get(), o.CompletedAt.IsSet() +} + +// HasCompletedAt returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCompletedAt() bool { + if o != nil && o.CompletedAt.IsSet() { + return true + } + + return false +} + +// SetCompletedAt gets a reference to the given NullableTime and assigns it to the CompletedAt field. +func (o *SDKSimulationRunsResult) SetCompletedAt(v time.Time) { + o.CompletedAt.Set(&v) +} + +// SetCompletedAtNil sets the value for CompletedAt to be an explicit nil +func (o *SDKSimulationRunsResult) SetCompletedAtNil() { + o.CompletedAt.Set(nil) +} + +// UnsetCompletedAt ensures that no value is present for CompletedAt, not even an explicit nil +func (o *SDKSimulationRunsResult) UnsetCompletedAt() { + o.CompletedAt.Unset() +} + +// GetDurationSeconds returns the DurationSeconds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationRunsResult) GetDurationSeconds() float32 { + if o == nil || IsNil(o.DurationSeconds.Get()) { + var ret float32 + return ret + } + return *o.DurationSeconds.Get() +} + +// GetDurationSecondsOk returns a tuple with the DurationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationRunsResult) GetDurationSecondsOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.DurationSeconds.Get(), o.DurationSeconds.IsSet() +} + +// HasDurationSeconds returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasDurationSeconds() bool { + if o != nil && o.DurationSeconds.IsSet() { + return true + } + + return false +} + +// SetDurationSeconds gets a reference to the given NullableFloat32 and assigns it to the DurationSeconds field. +func (o *SDKSimulationRunsResult) SetDurationSeconds(v float32) { + o.DurationSeconds.Set(&v) +} + +// SetDurationSecondsNil sets the value for DurationSeconds to be an explicit nil +func (o *SDKSimulationRunsResult) SetDurationSecondsNil() { + o.DurationSeconds.Set(nil) +} + +// UnsetDurationSeconds ensures that no value is present for DurationSeconds, not even an explicit nil +func (o *SDKSimulationRunsResult) UnsetDurationSeconds() { + o.DurationSeconds.Unset() +} + +// GetEndedReason returns the EndedReason field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationRunsResult) GetEndedReason() string { + if o == nil || IsNil(o.EndedReason.Get()) { + var ret string + return ret + } + return *o.EndedReason.Get() +} + +// GetEndedReasonOk returns a tuple with the EndedReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationRunsResult) GetEndedReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EndedReason.Get(), o.EndedReason.IsSet() +} + +// HasEndedReason returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasEndedReason() bool { + if o != nil && o.EndedReason.IsSet() { + return true + } + + return false +} + +// SetEndedReason gets a reference to the given NullableString and assigns it to the EndedReason field. +func (o *SDKSimulationRunsResult) SetEndedReason(v string) { + o.EndedReason.Set(&v) +} + +// SetEndedReasonNil sets the value for EndedReason to be an explicit nil +func (o *SDKSimulationRunsResult) SetEndedReasonNil() { + o.EndedReason.Set(nil) +} + +// UnsetEndedReason ensures that no value is present for EndedReason, not even an explicit nil +func (o *SDKSimulationRunsResult) UnsetEndedReason() { + o.EndedReason.Unset() +} + +// GetCallSummary returns the CallSummary field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationRunsResult) GetCallSummary() string { + if o == nil || IsNil(o.CallSummary.Get()) { + var ret string + return ret + } + return *o.CallSummary.Get() +} + +// GetCallSummaryOk returns a tuple with the CallSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationRunsResult) GetCallSummaryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CallSummary.Get(), o.CallSummary.IsSet() +} + +// HasCallSummary returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCallSummary() bool { + if o != nil && o.CallSummary.IsSet() { + return true + } + + return false +} + +// SetCallSummary gets a reference to the given NullableString and assigns it to the CallSummary field. +func (o *SDKSimulationRunsResult) SetCallSummary(v string) { + o.CallSummary.Set(&v) +} + +// SetCallSummaryNil sets the value for CallSummary to be an explicit nil +func (o *SDKSimulationRunsResult) SetCallSummaryNil() { + o.CallSummary.Set(nil) +} + +// UnsetCallSummary ensures that no value is present for CallSummary, not even an explicit nil +func (o *SDKSimulationRunsResult) UnsetCallSummary() { + o.CallSummary.Unset() +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *SDKSimulationRunsResult) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetCompletedCalls returns the CompletedCalls field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetCompletedCalls() int32 { + if o == nil || IsNil(o.CompletedCalls) { + var ret int32 + return ret + } + return *o.CompletedCalls +} + +// GetCompletedCallsOk returns a tuple with the CompletedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetCompletedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.CompletedCalls) { + return nil, false + } + return o.CompletedCalls, true +} + +// HasCompletedCalls returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCompletedCalls() bool { + if o != nil && !IsNil(o.CompletedCalls) { + return true + } + + return false +} + +// SetCompletedCalls gets a reference to the given int32 and assigns it to the CompletedCalls field. +func (o *SDKSimulationRunsResult) SetCompletedCalls(v int32) { + o.CompletedCalls = &v +} + +// GetFailedCalls returns the FailedCalls field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetFailedCalls() int32 { + if o == nil || IsNil(o.FailedCalls) { + var ret int32 + return ret + } + return *o.FailedCalls +} + +// GetFailedCallsOk returns a tuple with the FailedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetFailedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.FailedCalls) { + return nil, false + } + return o.FailedCalls, true +} + +// HasFailedCalls returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasFailedCalls() bool { + if o != nil && !IsNil(o.FailedCalls) { + return true + } + + return false +} + +// SetFailedCalls gets a reference to the given int32 and assigns it to the FailedCalls field. +func (o *SDKSimulationRunsResult) SetFailedCalls(v int32) { + o.FailedCalls = &v +} + +// GetEvalOutputs returns the EvalOutputs field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetEvalOutputs() map[string]interface{} { + if o == nil || IsNil(o.EvalOutputs) { + var ret map[string]interface{} + return ret + } + return o.EvalOutputs +} + +// GetEvalOutputsOk returns a tuple with the EvalOutputs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetEvalOutputsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalOutputs) { + return map[string]interface{}{}, false + } + return o.EvalOutputs, true +} + +// HasEvalOutputs returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasEvalOutputs() bool { + if o != nil && !IsNil(o.EvalOutputs) { + return true + } + + return false +} + +// SetEvalOutputs gets a reference to the given map[string]interface{} and assigns it to the EvalOutputs field. +func (o *SDKSimulationRunsResult) SetEvalOutputs(v map[string]interface{}) { + o.EvalOutputs = v +} + +// GetEvalResults returns the EvalResults field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetEvalResults() []map[string]interface{} { + if o == nil || IsNil(o.EvalResults) { + var ret []map[string]interface{} + return ret + } + return o.EvalResults +} + +// GetEvalResultsOk returns a tuple with the EvalResults field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetEvalResultsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalResults) { + return nil, false + } + return o.EvalResults, true +} + +// HasEvalResults returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasEvalResults() bool { + if o != nil && !IsNil(o.EvalResults) { + return true + } + + return false +} + +// SetEvalResults gets a reference to the given []map[string]interface{} and assigns it to the EvalResults field. +func (o *SDKSimulationRunsResult) SetEvalResults(v []map[string]interface{}) { + o.EvalResults = v +} + +// GetLatency returns the Latency field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetLatency() map[string]interface{} { + if o == nil || IsNil(o.Latency) { + var ret map[string]interface{} + return ret + } + return o.Latency +} + +// GetLatencyOk returns a tuple with the Latency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetLatencyOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Latency) { + return map[string]interface{}{}, false + } + return o.Latency, true +} + +// HasLatency returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasLatency() bool { + if o != nil && !IsNil(o.Latency) { + return true + } + + return false +} + +// SetLatency gets a reference to the given map[string]interface{} and assigns it to the Latency field. +func (o *SDKSimulationRunsResult) SetLatency(v map[string]interface{}) { + o.Latency = v +} + +// GetCost returns the Cost field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetCost() map[string]interface{} { + if o == nil || IsNil(o.Cost) { + var ret map[string]interface{} + return ret + } + return o.Cost +} + +// GetCostOk returns a tuple with the Cost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetCostOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Cost) { + return map[string]interface{}{}, false + } + return o.Cost, true +} + +// HasCost returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCost() bool { + if o != nil && !IsNil(o.Cost) { + return true + } + + return false +} + +// SetCost gets a reference to the given map[string]interface{} and assigns it to the Cost field. +func (o *SDKSimulationRunsResult) SetCost(v map[string]interface{}) { + o.Cost = v +} + +// GetCallResults returns the CallResults field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetCallResults() map[string]interface{} { + if o == nil || IsNil(o.CallResults) { + var ret map[string]interface{} + return ret + } + return o.CallResults +} + +// GetCallResultsOk returns a tuple with the CallResults field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetCallResultsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CallResults) { + return map[string]interface{}{}, false + } + return o.CallResults, true +} + +// HasCallResults returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCallResults() bool { + if o != nil && !IsNil(o.CallResults) { + return true + } + + return false +} + +// SetCallResults gets a reference to the given map[string]interface{} and assigns it to the CallResults field. +func (o *SDKSimulationRunsResult) SetCallResults(v map[string]interface{}) { + o.CallResults = v +} + +// GetEvalExplanationSummary returns the EvalExplanationSummary field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetEvalExplanationSummary() map[string]interface{} { + if o == nil || IsNil(o.EvalExplanationSummary) { + var ret map[string]interface{} + return ret + } + return o.EvalExplanationSummary +} + +// GetEvalExplanationSummaryOk returns a tuple with the EvalExplanationSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetEvalExplanationSummaryOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EvalExplanationSummary) { + return map[string]interface{}{}, false + } + return o.EvalExplanationSummary, true +} + +// HasEvalExplanationSummary returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasEvalExplanationSummary() bool { + if o != nil && !IsNil(o.EvalExplanationSummary) { + return true + } + + return false +} + +// SetEvalExplanationSummary gets a reference to the given map[string]interface{} and assigns it to the EvalExplanationSummary field. +func (o *SDKSimulationRunsResult) SetEvalExplanationSummary(v map[string]interface{}) { + o.EvalExplanationSummary = v +} + +// GetEvalExplanationSummaryStatus returns the EvalExplanationSummaryStatus field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKSimulationRunsResult) GetEvalExplanationSummaryStatus() string { + if o == nil || IsNil(o.EvalExplanationSummaryStatus.Get()) { + var ret string + return ret + } + return *o.EvalExplanationSummaryStatus.Get() +} + +// GetEvalExplanationSummaryStatusOk returns a tuple with the EvalExplanationSummaryStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKSimulationRunsResult) GetEvalExplanationSummaryStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalExplanationSummaryStatus.Get(), o.EvalExplanationSummaryStatus.IsSet() +} + +// HasEvalExplanationSummaryStatus returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasEvalExplanationSummaryStatus() bool { + if o != nil && o.EvalExplanationSummaryStatus.IsSet() { + return true + } + + return false +} + +// SetEvalExplanationSummaryStatus gets a reference to the given NullableString and assigns it to the EvalExplanationSummaryStatus field. +func (o *SDKSimulationRunsResult) SetEvalExplanationSummaryStatus(v string) { + o.EvalExplanationSummaryStatus.Set(&v) +} + +// SetEvalExplanationSummaryStatusNil sets the value for EvalExplanationSummaryStatus to be an explicit nil +func (o *SDKSimulationRunsResult) SetEvalExplanationSummaryStatusNil() { + o.EvalExplanationSummaryStatus.Set(nil) +} + +// UnsetEvalExplanationSummaryStatus ensures that no value is present for EvalExplanationSummaryStatus, not even an explicit nil +func (o *SDKSimulationRunsResult) UnsetEvalExplanationSummaryStatus() { + o.EvalExplanationSummaryStatus.Unset() +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetTotalPages() int32 { + if o == nil || IsNil(o.TotalPages) { + var ret int32 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetTotalPagesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field. +func (o *SDKSimulationRunsResult) SetTotalPages(v int32) { + o.TotalPages = &v +} + +// GetCurrentPage returns the CurrentPage field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetCurrentPage() int32 { + if o == nil || IsNil(o.CurrentPage) { + var ret int32 + return ret + } + return *o.CurrentPage +} + +// GetCurrentPageOk returns a tuple with the CurrentPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetCurrentPageOk() (*int32, bool) { + if o == nil || IsNil(o.CurrentPage) { + return nil, false + } + return o.CurrentPage, true +} + +// HasCurrentPage returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCurrentPage() bool { + if o != nil && !IsNil(o.CurrentPage) { + return true + } + + return false +} + +// SetCurrentPage gets a reference to the given int32 and assigns it to the CurrentPage field. +func (o *SDKSimulationRunsResult) SetCurrentPage(v int32) { + o.CurrentPage = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *SDKSimulationRunsResult) SetCount(v int32) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *SDKSimulationRunsResult) GetResults() []ExecutionRuns { + if o == nil || IsNil(o.Results) { + var ret []ExecutionRuns + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKSimulationRunsResult) GetResultsOk() ([]ExecutionRuns, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *SDKSimulationRunsResult) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ExecutionRuns and assigns it to the Results field. +func (o *SDKSimulationRunsResult) SetResults(v []ExecutionRuns) { + o.Results = v +} + +func (o SDKSimulationRunsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKSimulationRunsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallExecutionId) { + toSerialize["call_execution_id"] = o.CallExecutionId + } + if !IsNil(o.ExecutionId) { + toSerialize["execution_id"] = o.ExecutionId + } + if !IsNil(o.ScenarioId) { + toSerialize["scenario_id"] = o.ScenarioId + } + if !IsNil(o.ScenarioName) { + toSerialize["scenario_name"] = o.ScenarioName + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.StartedAt.IsSet() { + toSerialize["started_at"] = o.StartedAt.Get() + } + if o.CompletedAt.IsSet() { + toSerialize["completed_at"] = o.CompletedAt.Get() + } + if o.DurationSeconds.IsSet() { + toSerialize["duration_seconds"] = o.DurationSeconds.Get() + } + if o.EndedReason.IsSet() { + toSerialize["ended_reason"] = o.EndedReason.Get() + } + if o.CallSummary.IsSet() { + toSerialize["call_summary"] = o.CallSummary.Get() + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.CompletedCalls) { + toSerialize["completed_calls"] = o.CompletedCalls + } + if !IsNil(o.FailedCalls) { + toSerialize["failed_calls"] = o.FailedCalls + } + if !IsNil(o.EvalOutputs) { + toSerialize["eval_outputs"] = o.EvalOutputs + } + if !IsNil(o.EvalResults) { + toSerialize["eval_results"] = o.EvalResults + } + if !IsNil(o.Latency) { + toSerialize["latency"] = o.Latency + } + if !IsNil(o.Cost) { + toSerialize["cost"] = o.Cost + } + if !IsNil(o.CallResults) { + toSerialize["call_results"] = o.CallResults + } + if !IsNil(o.EvalExplanationSummary) { + toSerialize["eval_explanation_summary"] = o.EvalExplanationSummary + } + if o.EvalExplanationSummaryStatus.IsSet() { + toSerialize["eval_explanation_summary_status"] = o.EvalExplanationSummaryStatus.Get() + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.CurrentPage) { + toSerialize["current_page"] = o.CurrentPage + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullableSDKSimulationRunsResult struct { + value *SDKSimulationRunsResult + isSet bool +} + +func (v NullableSDKSimulationRunsResult) Get() *SDKSimulationRunsResult { + return v.value +} + +func (v *NullableSDKSimulationRunsResult) Set(val *SDKSimulationRunsResult) { + v.value = val + v.isSet = true +} + +func (v NullableSDKSimulationRunsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKSimulationRunsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKSimulationRunsResult(val *SDKSimulationRunsResult) *NullableSDKSimulationRunsResult { + return &NullableSDKSimulationRunsResult{value: val, isSet: true} +} + +func (v NullableSDKSimulationRunsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKSimulationRunsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_standalone_eval_input.go b/go/futureagi/model_sdk_standalone_eval_input.go new file mode 100644 index 0000000..2fd49c0 --- /dev/null +++ b/go/futureagi/model_sdk_standalone_eval_input.go @@ -0,0 +1,191 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the SDKStandaloneEvalInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKStandaloneEvalInput{} + +// SDKStandaloneEvalInput struct for SDKStandaloneEvalInput +type SDKStandaloneEvalInput struct { + Input *string `json:"input,omitempty"` + MaxTokens *int32 `json:"max_tokens,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _SDKStandaloneEvalInput SDKStandaloneEvalInput + +// NewSDKStandaloneEvalInput instantiates a new SDKStandaloneEvalInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKStandaloneEvalInput() *SDKStandaloneEvalInput { + this := SDKStandaloneEvalInput{} + return &this +} + +// NewSDKStandaloneEvalInputWithDefaults instantiates a new SDKStandaloneEvalInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKStandaloneEvalInputWithDefaults() *SDKStandaloneEvalInput { + this := SDKStandaloneEvalInput{} + return &this +} + +// GetInput returns the Input field value if set, zero value otherwise. +func (o *SDKStandaloneEvalInput) GetInput() string { + if o == nil || IsNil(o.Input) { + var ret string + return ret + } + return *o.Input +} + +// GetInputOk returns a tuple with the Input field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalInput) GetInputOk() (*string, bool) { + if o == nil || IsNil(o.Input) { + return nil, false + } + return o.Input, true +} + +// HasInput returns a boolean if a field has been set. +func (o *SDKStandaloneEvalInput) HasInput() bool { + if o != nil && !IsNil(o.Input) { + return true + } + + return false +} + +// SetInput gets a reference to the given string and assigns it to the Input field. +func (o *SDKStandaloneEvalInput) SetInput(v string) { + o.Input = &v +} + +// GetMaxTokens returns the MaxTokens field value if set, zero value otherwise. +func (o *SDKStandaloneEvalInput) GetMaxTokens() int32 { + if o == nil || IsNil(o.MaxTokens) { + var ret int32 + return ret + } + return *o.MaxTokens +} + +// GetMaxTokensOk returns a tuple with the MaxTokens field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalInput) GetMaxTokensOk() (*int32, bool) { + if o == nil || IsNil(o.MaxTokens) { + return nil, false + } + return o.MaxTokens, true +} + +// HasMaxTokens returns a boolean if a field has been set. +func (o *SDKStandaloneEvalInput) HasMaxTokens() bool { + if o != nil && !IsNil(o.MaxTokens) { + return true + } + + return false +} + +// SetMaxTokens gets a reference to the given int32 and assigns it to the MaxTokens field. +func (o *SDKStandaloneEvalInput) SetMaxTokens(v int32) { + o.MaxTokens = &v +} + +func (o SDKStandaloneEvalInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKStandaloneEvalInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Input) { + toSerialize["input"] = o.Input + } + if !IsNil(o.MaxTokens) { + toSerialize["max_tokens"] = o.MaxTokens + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SDKStandaloneEvalInput) UnmarshalJSON(data []byte) (err error) { + varSDKStandaloneEvalInput := _SDKStandaloneEvalInput{} + + err = json.Unmarshal(data, &varSDKStandaloneEvalInput) + + if err != nil { + return err + } + + *o = SDKStandaloneEvalInput(varSDKStandaloneEvalInput) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "input") + delete(additionalProperties, "max_tokens") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSDKStandaloneEvalInput struct { + value *SDKStandaloneEvalInput + isSet bool +} + +func (v NullableSDKStandaloneEvalInput) Get() *SDKStandaloneEvalInput { + return v.value +} + +func (v *NullableSDKStandaloneEvalInput) Set(val *SDKStandaloneEvalInput) { + v.value = val + v.isSet = true +} + +func (v NullableSDKStandaloneEvalInput) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKStandaloneEvalInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKStandaloneEvalInput(val *SDKStandaloneEvalInput) *NullableSDKStandaloneEvalInput { + return &NullableSDKStandaloneEvalInput{value: val, isSet: true} +} + +func (v NullableSDKStandaloneEvalInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKStandaloneEvalInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_standalone_eval_request.go b/go/futureagi/model_sdk_standalone_eval_request.go new file mode 100644 index 0000000..a5ad0d6 --- /dev/null +++ b/go/futureagi/model_sdk_standalone_eval_request.go @@ -0,0 +1,225 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKStandaloneEvalRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKStandaloneEvalRequest{} + +// SDKStandaloneEvalRequest struct for SDKStandaloneEvalRequest +type SDKStandaloneEvalRequest struct { + Inputs []SDKStandaloneEvalInput `json:"inputs"` + Config map[string]string `json:"config"` + ProtectFlash *bool `json:"protect_flash,omitempty"` +} + +type _SDKStandaloneEvalRequest SDKStandaloneEvalRequest + +// NewSDKStandaloneEvalRequest instantiates a new SDKStandaloneEvalRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKStandaloneEvalRequest(inputs []SDKStandaloneEvalInput, config map[string]string) *SDKStandaloneEvalRequest { + this := SDKStandaloneEvalRequest{} + this.Inputs = inputs + this.Config = config + var protectFlash bool = false + this.ProtectFlash = &protectFlash + return &this +} + +// NewSDKStandaloneEvalRequestWithDefaults instantiates a new SDKStandaloneEvalRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKStandaloneEvalRequestWithDefaults() *SDKStandaloneEvalRequest { + this := SDKStandaloneEvalRequest{} + var protectFlash bool = false + this.ProtectFlash = &protectFlash + return &this +} + +// GetInputs returns the Inputs field value +func (o *SDKStandaloneEvalRequest) GetInputs() []SDKStandaloneEvalInput { + if o == nil { + var ret []SDKStandaloneEvalInput + return ret + } + + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalRequest) GetInputsOk() ([]SDKStandaloneEvalInput, bool) { + if o == nil { + return nil, false + } + return o.Inputs, true +} + +// SetInputs sets field value +func (o *SDKStandaloneEvalRequest) SetInputs(v []SDKStandaloneEvalInput) { + o.Inputs = v +} + +// GetConfig returns the Config field value +func (o *SDKStandaloneEvalRequest) GetConfig() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalRequest) GetConfigOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *SDKStandaloneEvalRequest) SetConfig(v map[string]string) { + o.Config = v +} + +// GetProtectFlash returns the ProtectFlash field value if set, zero value otherwise. +func (o *SDKStandaloneEvalRequest) GetProtectFlash() bool { + if o == nil || IsNil(o.ProtectFlash) { + var ret bool + return ret + } + return *o.ProtectFlash +} + +// GetProtectFlashOk returns a tuple with the ProtectFlash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalRequest) GetProtectFlashOk() (*bool, bool) { + if o == nil || IsNil(o.ProtectFlash) { + return nil, false + } + return o.ProtectFlash, true +} + +// HasProtectFlash returns a boolean if a field has been set. +func (o *SDKStandaloneEvalRequest) HasProtectFlash() bool { + if o != nil && !IsNil(o.ProtectFlash) { + return true + } + + return false +} + +// SetProtectFlash gets a reference to the given bool and assigns it to the ProtectFlash field. +func (o *SDKStandaloneEvalRequest) SetProtectFlash(v bool) { + o.ProtectFlash = &v +} + +func (o SDKStandaloneEvalRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKStandaloneEvalRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["inputs"] = o.Inputs + toSerialize["config"] = o.Config + if !IsNil(o.ProtectFlash) { + toSerialize["protect_flash"] = o.ProtectFlash + } + return toSerialize, nil +} + +func (o *SDKStandaloneEvalRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "inputs", + "config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKStandaloneEvalRequest := _SDKStandaloneEvalRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKStandaloneEvalRequest) + + if err != nil { + return err + } + + *o = SDKStandaloneEvalRequest(varSDKStandaloneEvalRequest) + + return err +} + +type NullableSDKStandaloneEvalRequest struct { + value *SDKStandaloneEvalRequest + isSet bool +} + +func (v NullableSDKStandaloneEvalRequest) Get() *SDKStandaloneEvalRequest { + return v.value +} + +func (v *NullableSDKStandaloneEvalRequest) Set(val *SDKStandaloneEvalRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSDKStandaloneEvalRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKStandaloneEvalRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKStandaloneEvalRequest(val *SDKStandaloneEvalRequest) *NullableSDKStandaloneEvalRequest { + return &NullableSDKStandaloneEvalRequest{value: val, isSet: true} +} + +func (v NullableSDKStandaloneEvalRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKStandaloneEvalRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_standalone_eval_response.go b/go/futureagi/model_sdk_standalone_eval_response.go new file mode 100644 index 0000000..680c6a5 --- /dev/null +++ b/go/futureagi/model_sdk_standalone_eval_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKStandaloneEvalResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKStandaloneEvalResponse{} + +// SDKStandaloneEvalResponse struct for SDKStandaloneEvalResponse +type SDKStandaloneEvalResponse struct { + Status bool `json:"status"` + Result []SDKStandaloneEvalResultItem `json:"result"` +} + +type _SDKStandaloneEvalResponse SDKStandaloneEvalResponse + +// NewSDKStandaloneEvalResponse instantiates a new SDKStandaloneEvalResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKStandaloneEvalResponse(status bool, result []SDKStandaloneEvalResultItem) *SDKStandaloneEvalResponse { + this := SDKStandaloneEvalResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKStandaloneEvalResponseWithDefaults instantiates a new SDKStandaloneEvalResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKStandaloneEvalResponseWithDefaults() *SDKStandaloneEvalResponse { + this := SDKStandaloneEvalResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKStandaloneEvalResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKStandaloneEvalResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKStandaloneEvalResponse) GetResult() []SDKStandaloneEvalResultItem { + if o == nil { + var ret []SDKStandaloneEvalResultItem + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalResponse) GetResultOk() ([]SDKStandaloneEvalResultItem, bool) { + if o == nil { + return nil, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *SDKStandaloneEvalResponse) SetResult(v []SDKStandaloneEvalResultItem) { + o.Result = v +} + +func (o SDKStandaloneEvalResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKStandaloneEvalResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKStandaloneEvalResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKStandaloneEvalResponse := _SDKStandaloneEvalResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKStandaloneEvalResponse) + + if err != nil { + return err + } + + *o = SDKStandaloneEvalResponse(varSDKStandaloneEvalResponse) + + return err +} + +type NullableSDKStandaloneEvalResponse struct { + value *SDKStandaloneEvalResponse + isSet bool +} + +func (v NullableSDKStandaloneEvalResponse) Get() *SDKStandaloneEvalResponse { + return v.value +} + +func (v *NullableSDKStandaloneEvalResponse) Set(val *SDKStandaloneEvalResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKStandaloneEvalResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKStandaloneEvalResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKStandaloneEvalResponse(val *SDKStandaloneEvalResponse) *NullableSDKStandaloneEvalResponse { + return &NullableSDKStandaloneEvalResponse{value: val, isSet: true} +} + +func (v NullableSDKStandaloneEvalResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKStandaloneEvalResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_standalone_eval_result_item.go b/go/futureagi/model_sdk_standalone_eval_result_item.go new file mode 100644 index 0000000..d2798e5 --- /dev/null +++ b/go/futureagi/model_sdk_standalone_eval_result_item.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKStandaloneEvalResultItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKStandaloneEvalResultItem{} + +// SDKStandaloneEvalResultItem struct for SDKStandaloneEvalResultItem +type SDKStandaloneEvalResultItem struct { + Evaluations []map[string]interface{} `json:"evaluations"` +} + +type _SDKStandaloneEvalResultItem SDKStandaloneEvalResultItem + +// NewSDKStandaloneEvalResultItem instantiates a new SDKStandaloneEvalResultItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKStandaloneEvalResultItem(evaluations []map[string]interface{}) *SDKStandaloneEvalResultItem { + this := SDKStandaloneEvalResultItem{} + this.Evaluations = evaluations + return &this +} + +// NewSDKStandaloneEvalResultItemWithDefaults instantiates a new SDKStandaloneEvalResultItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKStandaloneEvalResultItemWithDefaults() *SDKStandaloneEvalResultItem { + this := SDKStandaloneEvalResultItem{} + return &this +} + +// GetEvaluations returns the Evaluations field value +func (o *SDKStandaloneEvalResultItem) GetEvaluations() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Evaluations +} + +// GetEvaluationsOk returns a tuple with the Evaluations field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalResultItem) GetEvaluationsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Evaluations, true +} + +// SetEvaluations sets field value +func (o *SDKStandaloneEvalResultItem) SetEvaluations(v []map[string]interface{}) { + o.Evaluations = v +} + +func (o SDKStandaloneEvalResultItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKStandaloneEvalResultItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["evaluations"] = o.Evaluations + return toSerialize, nil +} + +func (o *SDKStandaloneEvalResultItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "evaluations", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKStandaloneEvalResultItem := _SDKStandaloneEvalResultItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKStandaloneEvalResultItem) + + if err != nil { + return err + } + + *o = SDKStandaloneEvalResultItem(varSDKStandaloneEvalResultItem) + + return err +} + +type NullableSDKStandaloneEvalResultItem struct { + value *SDKStandaloneEvalResultItem + isSet bool +} + +func (v NullableSDKStandaloneEvalResultItem) Get() *SDKStandaloneEvalResultItem { + return v.value +} + +func (v *NullableSDKStandaloneEvalResultItem) Set(val *SDKStandaloneEvalResultItem) { + v.value = val + v.isSet = true +} + +func (v NullableSDKStandaloneEvalResultItem) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKStandaloneEvalResultItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKStandaloneEvalResultItem(val *SDKStandaloneEvalResultItem) *NullableSDKStandaloneEvalResultItem { + return &NullableSDKStandaloneEvalResultItem{value: val, isSet: true} +} + +func (v NullableSDKStandaloneEvalResultItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKStandaloneEvalResultItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_standalone_eval_v2_request.go b/go/futureagi/model_sdk_standalone_eval_v2_request.go new file mode 100644 index 0000000..bcb69fe --- /dev/null +++ b/go/futureagi/model_sdk_standalone_eval_v2_request.go @@ -0,0 +1,482 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKStandaloneEvalV2Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKStandaloneEvalV2Request{} + +// SDKStandaloneEvalV2Request struct for SDKStandaloneEvalV2Request +type SDKStandaloneEvalV2Request struct { + EvalName string `json:"eval_name"` + Inputs map[string]string `json:"inputs"` + Model NullableString `json:"model,omitempty"` + SpanId NullableString `json:"span_id,omitempty"` + CustomEvalName NullableString `json:"custom_eval_name,omitempty"` + TraceEval *bool `json:"trace_eval,omitempty"` + IsAsync *bool `json:"is_async,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + Config *map[string]string `json:"config,omitempty"` +} + +type _SDKStandaloneEvalV2Request SDKStandaloneEvalV2Request + +// NewSDKStandaloneEvalV2Request instantiates a new SDKStandaloneEvalV2Request object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKStandaloneEvalV2Request(evalName string, inputs map[string]string) *SDKStandaloneEvalV2Request { + this := SDKStandaloneEvalV2Request{} + this.EvalName = evalName + this.Inputs = inputs + var traceEval bool = false + this.TraceEval = &traceEval + var isAsync bool = false + this.IsAsync = &isAsync + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// NewSDKStandaloneEvalV2RequestWithDefaults instantiates a new SDKStandaloneEvalV2Request object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKStandaloneEvalV2RequestWithDefaults() *SDKStandaloneEvalV2Request { + this := SDKStandaloneEvalV2Request{} + var traceEval bool = false + this.TraceEval = &traceEval + var isAsync bool = false + this.IsAsync = &isAsync + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + return &this +} + +// GetEvalName returns the EvalName field value +func (o *SDKStandaloneEvalV2Request) GetEvalName() string { + if o == nil { + var ret string + return ret + } + + return o.EvalName +} + +// GetEvalNameOk returns a tuple with the EvalName field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Request) GetEvalNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalName, true +} + +// SetEvalName sets field value +func (o *SDKStandaloneEvalV2Request) SetEvalName(v string) { + o.EvalName = v +} + +// GetInputs returns the Inputs field value +func (o *SDKStandaloneEvalV2Request) GetInputs() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Request) GetInputsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Inputs, true +} + +// SetInputs sets field value +func (o *SDKStandaloneEvalV2Request) SetInputs(v map[string]string) { + o.Inputs = v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKStandaloneEvalV2Request) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKStandaloneEvalV2Request) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *SDKStandaloneEvalV2Request) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *SDKStandaloneEvalV2Request) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *SDKStandaloneEvalV2Request) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *SDKStandaloneEvalV2Request) UnsetModel() { + o.Model.Unset() +} + +// GetSpanId returns the SpanId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKStandaloneEvalV2Request) GetSpanId() string { + if o == nil || IsNil(o.SpanId.Get()) { + var ret string + return ret + } + return *o.SpanId.Get() +} + +// GetSpanIdOk returns a tuple with the SpanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKStandaloneEvalV2Request) GetSpanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SpanId.Get(), o.SpanId.IsSet() +} + +// HasSpanId returns a boolean if a field has been set. +func (o *SDKStandaloneEvalV2Request) HasSpanId() bool { + if o != nil && o.SpanId.IsSet() { + return true + } + + return false +} + +// SetSpanId gets a reference to the given NullableString and assigns it to the SpanId field. +func (o *SDKStandaloneEvalV2Request) SetSpanId(v string) { + o.SpanId.Set(&v) +} + +// SetSpanIdNil sets the value for SpanId to be an explicit nil +func (o *SDKStandaloneEvalV2Request) SetSpanIdNil() { + o.SpanId.Set(nil) +} + +// UnsetSpanId ensures that no value is present for SpanId, not even an explicit nil +func (o *SDKStandaloneEvalV2Request) UnsetSpanId() { + o.SpanId.Unset() +} + +// GetCustomEvalName returns the CustomEvalName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SDKStandaloneEvalV2Request) GetCustomEvalName() string { + if o == nil || IsNil(o.CustomEvalName.Get()) { + var ret string + return ret + } + return *o.CustomEvalName.Get() +} + +// GetCustomEvalNameOk returns a tuple with the CustomEvalName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SDKStandaloneEvalV2Request) GetCustomEvalNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomEvalName.Get(), o.CustomEvalName.IsSet() +} + +// HasCustomEvalName returns a boolean if a field has been set. +func (o *SDKStandaloneEvalV2Request) HasCustomEvalName() bool { + if o != nil && o.CustomEvalName.IsSet() { + return true + } + + return false +} + +// SetCustomEvalName gets a reference to the given NullableString and assigns it to the CustomEvalName field. +func (o *SDKStandaloneEvalV2Request) SetCustomEvalName(v string) { + o.CustomEvalName.Set(&v) +} + +// SetCustomEvalNameNil sets the value for CustomEvalName to be an explicit nil +func (o *SDKStandaloneEvalV2Request) SetCustomEvalNameNil() { + o.CustomEvalName.Set(nil) +} + +// UnsetCustomEvalName ensures that no value is present for CustomEvalName, not even an explicit nil +func (o *SDKStandaloneEvalV2Request) UnsetCustomEvalName() { + o.CustomEvalName.Unset() +} + +// GetTraceEval returns the TraceEval field value if set, zero value otherwise. +func (o *SDKStandaloneEvalV2Request) GetTraceEval() bool { + if o == nil || IsNil(o.TraceEval) { + var ret bool + return ret + } + return *o.TraceEval +} + +// GetTraceEvalOk returns a tuple with the TraceEval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Request) GetTraceEvalOk() (*bool, bool) { + if o == nil || IsNil(o.TraceEval) { + return nil, false + } + return o.TraceEval, true +} + +// HasTraceEval returns a boolean if a field has been set. +func (o *SDKStandaloneEvalV2Request) HasTraceEval() bool { + if o != nil && !IsNil(o.TraceEval) { + return true + } + + return false +} + +// SetTraceEval gets a reference to the given bool and assigns it to the TraceEval field. +func (o *SDKStandaloneEvalV2Request) SetTraceEval(v bool) { + o.TraceEval = &v +} + +// GetIsAsync returns the IsAsync field value if set, zero value otherwise. +func (o *SDKStandaloneEvalV2Request) GetIsAsync() bool { + if o == nil || IsNil(o.IsAsync) { + var ret bool + return ret + } + return *o.IsAsync +} + +// GetIsAsyncOk returns a tuple with the IsAsync field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Request) GetIsAsyncOk() (*bool, bool) { + if o == nil || IsNil(o.IsAsync) { + return nil, false + } + return o.IsAsync, true +} + +// HasIsAsync returns a boolean if a field has been set. +func (o *SDKStandaloneEvalV2Request) HasIsAsync() bool { + if o != nil && !IsNil(o.IsAsync) { + return true + } + + return false +} + +// SetIsAsync gets a reference to the given bool and assigns it to the IsAsync field. +func (o *SDKStandaloneEvalV2Request) SetIsAsync(v bool) { + o.IsAsync = &v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *SDKStandaloneEvalV2Request) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Request) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *SDKStandaloneEvalV2Request) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *SDKStandaloneEvalV2Request) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *SDKStandaloneEvalV2Request) GetConfig() map[string]string { + if o == nil || IsNil(o.Config) { + var ret map[string]string + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Request) GetConfigOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Config) { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *SDKStandaloneEvalV2Request) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]string and assigns it to the Config field. +func (o *SDKStandaloneEvalV2Request) SetConfig(v map[string]string) { + o.Config = &v +} + +func (o SDKStandaloneEvalV2Request) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKStandaloneEvalV2Request) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval_name"] = o.EvalName + toSerialize["inputs"] = o.Inputs + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if o.SpanId.IsSet() { + toSerialize["span_id"] = o.SpanId.Get() + } + if o.CustomEvalName.IsSet() { + toSerialize["custom_eval_name"] = o.CustomEvalName.Get() + } + if !IsNil(o.TraceEval) { + toSerialize["trace_eval"] = o.TraceEval + } + if !IsNil(o.IsAsync) { + toSerialize["is_async"] = o.IsAsync + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + return toSerialize, nil +} + +func (o *SDKStandaloneEvalV2Request) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_name", + "inputs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKStandaloneEvalV2Request := _SDKStandaloneEvalV2Request{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKStandaloneEvalV2Request) + + if err != nil { + return err + } + + *o = SDKStandaloneEvalV2Request(varSDKStandaloneEvalV2Request) + + return err +} + +type NullableSDKStandaloneEvalV2Request struct { + value *SDKStandaloneEvalV2Request + isSet bool +} + +func (v NullableSDKStandaloneEvalV2Request) Get() *SDKStandaloneEvalV2Request { + return v.value +} + +func (v *NullableSDKStandaloneEvalV2Request) Set(val *SDKStandaloneEvalV2Request) { + v.value = val + v.isSet = true +} + +func (v NullableSDKStandaloneEvalV2Request) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKStandaloneEvalV2Request) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKStandaloneEvalV2Request(val *SDKStandaloneEvalV2Request) *NullableSDKStandaloneEvalV2Request { + return &NullableSDKStandaloneEvalV2Request{value: val, isSet: true} +} + +func (v NullableSDKStandaloneEvalV2Request) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKStandaloneEvalV2Request) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_standalone_eval_v2_response.go b/go/futureagi/model_sdk_standalone_eval_v2_response.go new file mode 100644 index 0000000..2d4446d --- /dev/null +++ b/go/futureagi/model_sdk_standalone_eval_v2_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKStandaloneEvalV2Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKStandaloneEvalV2Response{} + +// SDKStandaloneEvalV2Response struct for SDKStandaloneEvalV2Response +type SDKStandaloneEvalV2Response struct { + Status bool `json:"status"` + Result SDKStandaloneEvalV2Result `json:"result"` +} + +type _SDKStandaloneEvalV2Response SDKStandaloneEvalV2Response + +// NewSDKStandaloneEvalV2Response instantiates a new SDKStandaloneEvalV2Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKStandaloneEvalV2Response(status bool, result SDKStandaloneEvalV2Result) *SDKStandaloneEvalV2Response { + this := SDKStandaloneEvalV2Response{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKStandaloneEvalV2ResponseWithDefaults instantiates a new SDKStandaloneEvalV2Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKStandaloneEvalV2ResponseWithDefaults() *SDKStandaloneEvalV2Response { + this := SDKStandaloneEvalV2Response{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKStandaloneEvalV2Response) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Response) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKStandaloneEvalV2Response) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKStandaloneEvalV2Response) GetResult() SDKStandaloneEvalV2Result { + if o == nil { + var ret SDKStandaloneEvalV2Result + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Response) GetResultOk() (*SDKStandaloneEvalV2Result, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKStandaloneEvalV2Response) SetResult(v SDKStandaloneEvalV2Result) { + o.Result = v +} + +func (o SDKStandaloneEvalV2Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKStandaloneEvalV2Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKStandaloneEvalV2Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKStandaloneEvalV2Response := _SDKStandaloneEvalV2Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKStandaloneEvalV2Response) + + if err != nil { + return err + } + + *o = SDKStandaloneEvalV2Response(varSDKStandaloneEvalV2Response) + + return err +} + +type NullableSDKStandaloneEvalV2Response struct { + value *SDKStandaloneEvalV2Response + isSet bool +} + +func (v NullableSDKStandaloneEvalV2Response) Get() *SDKStandaloneEvalV2Response { + return v.value +} + +func (v *NullableSDKStandaloneEvalV2Response) Set(val *SDKStandaloneEvalV2Response) { + v.value = val + v.isSet = true +} + +func (v NullableSDKStandaloneEvalV2Response) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKStandaloneEvalV2Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKStandaloneEvalV2Response(val *SDKStandaloneEvalV2Response) *NullableSDKStandaloneEvalV2Response { + return &NullableSDKStandaloneEvalV2Response{value: val, isSet: true} +} + +func (v NullableSDKStandaloneEvalV2Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKStandaloneEvalV2Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdk_standalone_eval_v2_result.go b/go/futureagi/model_sdk_standalone_eval_v2_result.go new file mode 100644 index 0000000..3f98bd2 --- /dev/null +++ b/go/futureagi/model_sdk_standalone_eval_v2_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKStandaloneEvalV2Result type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKStandaloneEvalV2Result{} + +// SDKStandaloneEvalV2Result struct for SDKStandaloneEvalV2Result +type SDKStandaloneEvalV2Result struct { + EvalStatus string `json:"eval_status"` + Result map[string]interface{} `json:"result"` +} + +type _SDKStandaloneEvalV2Result SDKStandaloneEvalV2Result + +// NewSDKStandaloneEvalV2Result instantiates a new SDKStandaloneEvalV2Result object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKStandaloneEvalV2Result(evalStatus string, result map[string]interface{}) *SDKStandaloneEvalV2Result { + this := SDKStandaloneEvalV2Result{} + this.EvalStatus = evalStatus + this.Result = result + return &this +} + +// NewSDKStandaloneEvalV2ResultWithDefaults instantiates a new SDKStandaloneEvalV2Result object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKStandaloneEvalV2ResultWithDefaults() *SDKStandaloneEvalV2Result { + this := SDKStandaloneEvalV2Result{} + return &this +} + +// GetEvalStatus returns the EvalStatus field value +func (o *SDKStandaloneEvalV2Result) GetEvalStatus() string { + if o == nil { + var ret string + return ret + } + + return o.EvalStatus +} + +// GetEvalStatusOk returns a tuple with the EvalStatus field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Result) GetEvalStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvalStatus, true +} + +// SetEvalStatus sets field value +func (o *SDKStandaloneEvalV2Result) SetEvalStatus(v string) { + o.EvalStatus = v +} + +// GetResult returns the Result field value +func (o *SDKStandaloneEvalV2Result) GetResult() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKStandaloneEvalV2Result) GetResultOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Result, true +} + +// SetResult sets field value +func (o *SDKStandaloneEvalV2Result) SetResult(v map[string]interface{}) { + o.Result = v +} + +func (o SDKStandaloneEvalV2Result) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKStandaloneEvalV2Result) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval_status"] = o.EvalStatus + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKStandaloneEvalV2Result) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKStandaloneEvalV2Result := _SDKStandaloneEvalV2Result{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKStandaloneEvalV2Result) + + if err != nil { + return err + } + + *o = SDKStandaloneEvalV2Result(varSDKStandaloneEvalV2Result) + + return err +} + +type NullableSDKStandaloneEvalV2Result struct { + value *SDKStandaloneEvalV2Result + isSet bool +} + +func (v NullableSDKStandaloneEvalV2Result) Get() *SDKStandaloneEvalV2Result { + return v.value +} + +func (v *NullableSDKStandaloneEvalV2Result) Set(val *SDKStandaloneEvalV2Result) { + v.value = val + v.isSet = true +} + +func (v NullableSDKStandaloneEvalV2Result) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKStandaloneEvalV2Result) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKStandaloneEvalV2Result(val *SDKStandaloneEvalV2Result) *NullableSDKStandaloneEvalV2Result { + return &NullableSDKStandaloneEvalV2Result{value: val, isSet: true} +} + +func (v NullableSDKStandaloneEvalV2Result) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKStandaloneEvalV2Result) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdkcicd_evaluation_run_accepted.go b/go/futureagi/model_sdkcicd_evaluation_run_accepted.go new file mode 100644 index 0000000..d0b48d5 --- /dev/null +++ b/go/futureagi/model_sdkcicd_evaluation_run_accepted.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKCICDEvaluationRunAccepted type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKCICDEvaluationRunAccepted{} + +// SDKCICDEvaluationRunAccepted struct for SDKCICDEvaluationRunAccepted +type SDKCICDEvaluationRunAccepted struct { + Message string `json:"message"` + ProjectName string `json:"project_name"` + Version string `json:"version"` + EvaluationRunId string `json:"evaluation_run_id"` +} + +type _SDKCICDEvaluationRunAccepted SDKCICDEvaluationRunAccepted + +// NewSDKCICDEvaluationRunAccepted instantiates a new SDKCICDEvaluationRunAccepted object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKCICDEvaluationRunAccepted(message string, projectName string, version string, evaluationRunId string) *SDKCICDEvaluationRunAccepted { + this := SDKCICDEvaluationRunAccepted{} + this.Message = message + this.ProjectName = projectName + this.Version = version + this.EvaluationRunId = evaluationRunId + return &this +} + +// NewSDKCICDEvaluationRunAcceptedWithDefaults instantiates a new SDKCICDEvaluationRunAccepted object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKCICDEvaluationRunAcceptedWithDefaults() *SDKCICDEvaluationRunAccepted { + this := SDKCICDEvaluationRunAccepted{} + return &this +} + +// GetMessage returns the Message field value +func (o *SDKCICDEvaluationRunAccepted) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunAccepted) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *SDKCICDEvaluationRunAccepted) SetMessage(v string) { + o.Message = v +} + +// GetProjectName returns the ProjectName field value +func (o *SDKCICDEvaluationRunAccepted) GetProjectName() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectName +} + +// GetProjectNameOk returns a tuple with the ProjectName field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunAccepted) GetProjectNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectName, true +} + +// SetProjectName sets field value +func (o *SDKCICDEvaluationRunAccepted) SetProjectName(v string) { + o.ProjectName = v +} + +// GetVersion returns the Version field value +func (o *SDKCICDEvaluationRunAccepted) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunAccepted) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *SDKCICDEvaluationRunAccepted) SetVersion(v string) { + o.Version = v +} + +// GetEvaluationRunId returns the EvaluationRunId field value +func (o *SDKCICDEvaluationRunAccepted) GetEvaluationRunId() string { + if o == nil { + var ret string + return ret + } + + return o.EvaluationRunId +} + +// GetEvaluationRunIdOk returns a tuple with the EvaluationRunId field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunAccepted) GetEvaluationRunIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EvaluationRunId, true +} + +// SetEvaluationRunId sets field value +func (o *SDKCICDEvaluationRunAccepted) SetEvaluationRunId(v string) { + o.EvaluationRunId = v +} + +func (o SDKCICDEvaluationRunAccepted) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKCICDEvaluationRunAccepted) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["project_name"] = o.ProjectName + toSerialize["version"] = o.Version + toSerialize["evaluation_run_id"] = o.EvaluationRunId + return toSerialize, nil +} + +func (o *SDKCICDEvaluationRunAccepted) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "project_name", + "version", + "evaluation_run_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKCICDEvaluationRunAccepted := _SDKCICDEvaluationRunAccepted{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKCICDEvaluationRunAccepted) + + if err != nil { + return err + } + + *o = SDKCICDEvaluationRunAccepted(varSDKCICDEvaluationRunAccepted) + + return err +} + +type NullableSDKCICDEvaluationRunAccepted struct { + value *SDKCICDEvaluationRunAccepted + isSet bool +} + +func (v NullableSDKCICDEvaluationRunAccepted) Get() *SDKCICDEvaluationRunAccepted { + return v.value +} + +func (v *NullableSDKCICDEvaluationRunAccepted) Set(val *SDKCICDEvaluationRunAccepted) { + v.value = val + v.isSet = true +} + +func (v NullableSDKCICDEvaluationRunAccepted) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKCICDEvaluationRunAccepted) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKCICDEvaluationRunAccepted(val *SDKCICDEvaluationRunAccepted) *NullableSDKCICDEvaluationRunAccepted { + return &NullableSDKCICDEvaluationRunAccepted{value: val, isSet: true} +} + +func (v NullableSDKCICDEvaluationRunAccepted) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKCICDEvaluationRunAccepted) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdkcicd_evaluation_run_accepted_response.go b/go/futureagi/model_sdkcicd_evaluation_run_accepted_response.go new file mode 100644 index 0000000..c2e3cac --- /dev/null +++ b/go/futureagi/model_sdkcicd_evaluation_run_accepted_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKCICDEvaluationRunAcceptedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKCICDEvaluationRunAcceptedResponse{} + +// SDKCICDEvaluationRunAcceptedResponse struct for SDKCICDEvaluationRunAcceptedResponse +type SDKCICDEvaluationRunAcceptedResponse struct { + Status bool `json:"status"` + Result SDKCICDEvaluationRunAccepted `json:"result"` +} + +type _SDKCICDEvaluationRunAcceptedResponse SDKCICDEvaluationRunAcceptedResponse + +// NewSDKCICDEvaluationRunAcceptedResponse instantiates a new SDKCICDEvaluationRunAcceptedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKCICDEvaluationRunAcceptedResponse(status bool, result SDKCICDEvaluationRunAccepted) *SDKCICDEvaluationRunAcceptedResponse { + this := SDKCICDEvaluationRunAcceptedResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKCICDEvaluationRunAcceptedResponseWithDefaults instantiates a new SDKCICDEvaluationRunAcceptedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKCICDEvaluationRunAcceptedResponseWithDefaults() *SDKCICDEvaluationRunAcceptedResponse { + this := SDKCICDEvaluationRunAcceptedResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKCICDEvaluationRunAcceptedResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunAcceptedResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKCICDEvaluationRunAcceptedResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKCICDEvaluationRunAcceptedResponse) GetResult() SDKCICDEvaluationRunAccepted { + if o == nil { + var ret SDKCICDEvaluationRunAccepted + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunAcceptedResponse) GetResultOk() (*SDKCICDEvaluationRunAccepted, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKCICDEvaluationRunAcceptedResponse) SetResult(v SDKCICDEvaluationRunAccepted) { + o.Result = v +} + +func (o SDKCICDEvaluationRunAcceptedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKCICDEvaluationRunAcceptedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKCICDEvaluationRunAcceptedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKCICDEvaluationRunAcceptedResponse := _SDKCICDEvaluationRunAcceptedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKCICDEvaluationRunAcceptedResponse) + + if err != nil { + return err + } + + *o = SDKCICDEvaluationRunAcceptedResponse(varSDKCICDEvaluationRunAcceptedResponse) + + return err +} + +type NullableSDKCICDEvaluationRunAcceptedResponse struct { + value *SDKCICDEvaluationRunAcceptedResponse + isSet bool +} + +func (v NullableSDKCICDEvaluationRunAcceptedResponse) Get() *SDKCICDEvaluationRunAcceptedResponse { + return v.value +} + +func (v *NullableSDKCICDEvaluationRunAcceptedResponse) Set(val *SDKCICDEvaluationRunAcceptedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKCICDEvaluationRunAcceptedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKCICDEvaluationRunAcceptedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKCICDEvaluationRunAcceptedResponse(val *SDKCICDEvaluationRunAcceptedResponse) *NullableSDKCICDEvaluationRunAcceptedResponse { + return &NullableSDKCICDEvaluationRunAcceptedResponse{value: val, isSet: true} +} + +func (v NullableSDKCICDEvaluationRunAcceptedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKCICDEvaluationRunAcceptedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdkcicd_evaluation_run_summary.go b/go/futureagi/model_sdkcicd_evaluation_run_summary.go new file mode 100644 index 0000000..fe067e8 --- /dev/null +++ b/go/futureagi/model_sdkcicd_evaluation_run_summary.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKCICDEvaluationRunSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKCICDEvaluationRunSummary{} + +// SDKCICDEvaluationRunSummary struct for SDKCICDEvaluationRunSummary +type SDKCICDEvaluationRunSummary struct { + Id string `json:"id"` + Project string `json:"project"` + Version string `json:"version"` + ResultsSummary map[string]string `json:"results_summary"` +} + +type _SDKCICDEvaluationRunSummary SDKCICDEvaluationRunSummary + +// NewSDKCICDEvaluationRunSummary instantiates a new SDKCICDEvaluationRunSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKCICDEvaluationRunSummary(id string, project string, version string, resultsSummary map[string]string) *SDKCICDEvaluationRunSummary { + this := SDKCICDEvaluationRunSummary{} + this.Id = id + this.Project = project + this.Version = version + this.ResultsSummary = resultsSummary + return &this +} + +// NewSDKCICDEvaluationRunSummaryWithDefaults instantiates a new SDKCICDEvaluationRunSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKCICDEvaluationRunSummaryWithDefaults() *SDKCICDEvaluationRunSummary { + this := SDKCICDEvaluationRunSummary{} + return &this +} + +// GetId returns the Id field value +func (o *SDKCICDEvaluationRunSummary) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunSummary) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SDKCICDEvaluationRunSummary) SetId(v string) { + o.Id = v +} + +// GetProject returns the Project field value +func (o *SDKCICDEvaluationRunSummary) GetProject() string { + if o == nil { + var ret string + return ret + } + + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunSummary) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Project, true +} + +// SetProject sets field value +func (o *SDKCICDEvaluationRunSummary) SetProject(v string) { + o.Project = v +} + +// GetVersion returns the Version field value +func (o *SDKCICDEvaluationRunSummary) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunSummary) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *SDKCICDEvaluationRunSummary) SetVersion(v string) { + o.Version = v +} + +// GetResultsSummary returns the ResultsSummary field value +func (o *SDKCICDEvaluationRunSummary) GetResultsSummary() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.ResultsSummary +} + +// GetResultsSummaryOk returns a tuple with the ResultsSummary field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunSummary) GetResultsSummaryOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.ResultsSummary, true +} + +// SetResultsSummary sets field value +func (o *SDKCICDEvaluationRunSummary) SetResultsSummary(v map[string]string) { + o.ResultsSummary = v +} + +func (o SDKCICDEvaluationRunSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKCICDEvaluationRunSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["project"] = o.Project + toSerialize["version"] = o.Version + toSerialize["results_summary"] = o.ResultsSummary + return toSerialize, nil +} + +func (o *SDKCICDEvaluationRunSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "project", + "version", + "results_summary", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKCICDEvaluationRunSummary := _SDKCICDEvaluationRunSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKCICDEvaluationRunSummary) + + if err != nil { + return err + } + + *o = SDKCICDEvaluationRunSummary(varSDKCICDEvaluationRunSummary) + + return err +} + +type NullableSDKCICDEvaluationRunSummary struct { + value *SDKCICDEvaluationRunSummary + isSet bool +} + +func (v NullableSDKCICDEvaluationRunSummary) Get() *SDKCICDEvaluationRunSummary { + return v.value +} + +func (v *NullableSDKCICDEvaluationRunSummary) Set(val *SDKCICDEvaluationRunSummary) { + v.value = val + v.isSet = true +} + +func (v NullableSDKCICDEvaluationRunSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKCICDEvaluationRunSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKCICDEvaluationRunSummary(val *SDKCICDEvaluationRunSummary) *NullableSDKCICDEvaluationRunSummary { + return &NullableSDKCICDEvaluationRunSummary{value: val, isSet: true} +} + +func (v NullableSDKCICDEvaluationRunSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKCICDEvaluationRunSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdkcicd_evaluation_runs_response.go b/go/futureagi/model_sdkcicd_evaluation_runs_response.go new file mode 100644 index 0000000..0a548b7 --- /dev/null +++ b/go/futureagi/model_sdkcicd_evaluation_runs_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKCICDEvaluationRunsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKCICDEvaluationRunsResponse{} + +// SDKCICDEvaluationRunsResponse struct for SDKCICDEvaluationRunsResponse +type SDKCICDEvaluationRunsResponse struct { + Status bool `json:"status"` + Result SDKCICDEvaluationRunsResult `json:"result"` +} + +type _SDKCICDEvaluationRunsResponse SDKCICDEvaluationRunsResponse + +// NewSDKCICDEvaluationRunsResponse instantiates a new SDKCICDEvaluationRunsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKCICDEvaluationRunsResponse(status bool, result SDKCICDEvaluationRunsResult) *SDKCICDEvaluationRunsResponse { + this := SDKCICDEvaluationRunsResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSDKCICDEvaluationRunsResponseWithDefaults instantiates a new SDKCICDEvaluationRunsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKCICDEvaluationRunsResponseWithDefaults() *SDKCICDEvaluationRunsResponse { + this := SDKCICDEvaluationRunsResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SDKCICDEvaluationRunsResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunsResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKCICDEvaluationRunsResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SDKCICDEvaluationRunsResponse) GetResult() SDKCICDEvaluationRunsResult { + if o == nil { + var ret SDKCICDEvaluationRunsResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunsResponse) GetResultOk() (*SDKCICDEvaluationRunsResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SDKCICDEvaluationRunsResponse) SetResult(v SDKCICDEvaluationRunsResult) { + o.Result = v +} + +func (o SDKCICDEvaluationRunsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKCICDEvaluationRunsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SDKCICDEvaluationRunsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKCICDEvaluationRunsResponse := _SDKCICDEvaluationRunsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKCICDEvaluationRunsResponse) + + if err != nil { + return err + } + + *o = SDKCICDEvaluationRunsResponse(varSDKCICDEvaluationRunsResponse) + + return err +} + +type NullableSDKCICDEvaluationRunsResponse struct { + value *SDKCICDEvaluationRunsResponse + isSet bool +} + +func (v NullableSDKCICDEvaluationRunsResponse) Get() *SDKCICDEvaluationRunsResponse { + return v.value +} + +func (v *NullableSDKCICDEvaluationRunsResponse) Set(val *SDKCICDEvaluationRunsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSDKCICDEvaluationRunsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKCICDEvaluationRunsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKCICDEvaluationRunsResponse(val *SDKCICDEvaluationRunsResponse) *NullableSDKCICDEvaluationRunsResponse { + return &NullableSDKCICDEvaluationRunsResponse{value: val, isSet: true} +} + +func (v NullableSDKCICDEvaluationRunsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKCICDEvaluationRunsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sdkcicd_evaluation_runs_result.go b/go/futureagi/model_sdkcicd_evaluation_runs_result.go new file mode 100644 index 0000000..7989f49 --- /dev/null +++ b/go/futureagi/model_sdkcicd_evaluation_runs_result.go @@ -0,0 +1,221 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SDKCICDEvaluationRunsResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SDKCICDEvaluationRunsResult{} + +// SDKCICDEvaluationRunsResult struct for SDKCICDEvaluationRunsResult +type SDKCICDEvaluationRunsResult struct { + Message string `json:"message"` + Status string `json:"status"` + EvaluationRuns []SDKCICDEvaluationRunSummary `json:"evaluation_runs,omitempty"` +} + +type _SDKCICDEvaluationRunsResult SDKCICDEvaluationRunsResult + +// NewSDKCICDEvaluationRunsResult instantiates a new SDKCICDEvaluationRunsResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSDKCICDEvaluationRunsResult(message string, status string) *SDKCICDEvaluationRunsResult { + this := SDKCICDEvaluationRunsResult{} + this.Message = message + this.Status = status + return &this +} + +// NewSDKCICDEvaluationRunsResultWithDefaults instantiates a new SDKCICDEvaluationRunsResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSDKCICDEvaluationRunsResultWithDefaults() *SDKCICDEvaluationRunsResult { + this := SDKCICDEvaluationRunsResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *SDKCICDEvaluationRunsResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunsResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *SDKCICDEvaluationRunsResult) SetMessage(v string) { + o.Message = v +} + +// GetStatus returns the Status field value +func (o *SDKCICDEvaluationRunsResult) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunsResult) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SDKCICDEvaluationRunsResult) SetStatus(v string) { + o.Status = v +} + +// GetEvaluationRuns returns the EvaluationRuns field value if set, zero value otherwise. +func (o *SDKCICDEvaluationRunsResult) GetEvaluationRuns() []SDKCICDEvaluationRunSummary { + if o == nil || IsNil(o.EvaluationRuns) { + var ret []SDKCICDEvaluationRunSummary + return ret + } + return o.EvaluationRuns +} + +// GetEvaluationRunsOk returns a tuple with the EvaluationRuns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SDKCICDEvaluationRunsResult) GetEvaluationRunsOk() ([]SDKCICDEvaluationRunSummary, bool) { + if o == nil || IsNil(o.EvaluationRuns) { + return nil, false + } + return o.EvaluationRuns, true +} + +// HasEvaluationRuns returns a boolean if a field has been set. +func (o *SDKCICDEvaluationRunsResult) HasEvaluationRuns() bool { + if o != nil && !IsNil(o.EvaluationRuns) { + return true + } + + return false +} + +// SetEvaluationRuns gets a reference to the given []SDKCICDEvaluationRunSummary and assigns it to the EvaluationRuns field. +func (o *SDKCICDEvaluationRunsResult) SetEvaluationRuns(v []SDKCICDEvaluationRunSummary) { + o.EvaluationRuns = v +} + +func (o SDKCICDEvaluationRunsResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SDKCICDEvaluationRunsResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["status"] = o.Status + if !IsNil(o.EvaluationRuns) { + toSerialize["evaluation_runs"] = o.EvaluationRuns + } + return toSerialize, nil +} + +func (o *SDKCICDEvaluationRunsResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSDKCICDEvaluationRunsResult := _SDKCICDEvaluationRunsResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSDKCICDEvaluationRunsResult) + + if err != nil { + return err + } + + *o = SDKCICDEvaluationRunsResult(varSDKCICDEvaluationRunsResult) + + return err +} + +type NullableSDKCICDEvaluationRunsResult struct { + value *SDKCICDEvaluationRunsResult + isSet bool +} + +func (v NullableSDKCICDEvaluationRunsResult) Get() *SDKCICDEvaluationRunsResult { + return v.value +} + +func (v *NullableSDKCICDEvaluationRunsResult) Set(val *SDKCICDEvaluationRunsResult) { + v.value = val + v.isSet = true +} + +func (v NullableSDKCICDEvaluationRunsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSDKCICDEvaluationRunsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSDKCICDEvaluationRunsResult(val *SDKCICDEvaluationRunsResult) *NullableSDKCICDEvaluationRunsResult { + return &NullableSDKCICDEvaluationRunsResult{value: val, isSet: true} +} + +func (v NullableSDKCICDEvaluationRunsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSDKCICDEvaluationRunsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_selection.go b/go/futureagi/model_selection.go new file mode 100644 index 0000000..d7f0f82 --- /dev/null +++ b/go/futureagi/model_selection.go @@ -0,0 +1,365 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Selection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Selection{} + +// Selection struct for Selection +type Selection struct { + Mode string `json:"mode"` + SourceType string `json:"source_type"` + ProjectId string `json:"project_id"` + Filter []AutomationRuleConditionsFilterInner `json:"filter,omitempty"` + ExcludeIds []string `json:"exclude_ids,omitempty"` + RemoveSimulationCalls *bool `json:"remove_simulation_calls,omitempty"` + IsVoiceCall *bool `json:"is_voice_call,omitempty"` +} + +type _Selection Selection + +// NewSelection instantiates a new Selection object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSelection(mode string, sourceType string, projectId string) *Selection { + this := Selection{} + this.Mode = mode + this.SourceType = sourceType + this.ProjectId = projectId + var removeSimulationCalls bool = false + this.RemoveSimulationCalls = &removeSimulationCalls + var isVoiceCall bool = false + this.IsVoiceCall = &isVoiceCall + return &this +} + +// NewSelectionWithDefaults instantiates a new Selection object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSelectionWithDefaults() *Selection { + this := Selection{} + var removeSimulationCalls bool = false + this.RemoveSimulationCalls = &removeSimulationCalls + var isVoiceCall bool = false + this.IsVoiceCall = &isVoiceCall + return &this +} + +// GetMode returns the Mode field value +func (o *Selection) GetMode() string { + if o == nil { + var ret string + return ret + } + + return o.Mode +} + +// GetModeOk returns a tuple with the Mode field value +// and a boolean to check if the value has been set. +func (o *Selection) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mode, true +} + +// SetMode sets field value +func (o *Selection) SetMode(v string) { + o.Mode = v +} + +// GetSourceType returns the SourceType field value +func (o *Selection) GetSourceType() string { + if o == nil { + var ret string + return ret + } + + return o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value +// and a boolean to check if the value has been set. +func (o *Selection) GetSourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceType, true +} + +// SetSourceType sets field value +func (o *Selection) SetSourceType(v string) { + o.SourceType = v +} + +// GetProjectId returns the ProjectId field value +func (o *Selection) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *Selection) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *Selection) SetProjectId(v string) { + o.ProjectId = v +} + +// GetFilter returns the Filter field value if set, zero value otherwise. +func (o *Selection) GetFilter() []AutomationRuleConditionsFilterInner { + if o == nil || IsNil(o.Filter) { + var ret []AutomationRuleConditionsFilterInner + return ret + } + return o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Selection) GetFilterOk() ([]AutomationRuleConditionsFilterInner, bool) { + if o == nil || IsNil(o.Filter) { + return nil, false + } + return o.Filter, true +} + +// HasFilter returns a boolean if a field has been set. +func (o *Selection) HasFilter() bool { + if o != nil && !IsNil(o.Filter) { + return true + } + + return false +} + +// SetFilter gets a reference to the given []AutomationRuleConditionsFilterInner and assigns it to the Filter field. +func (o *Selection) SetFilter(v []AutomationRuleConditionsFilterInner) { + o.Filter = v +} + +// GetExcludeIds returns the ExcludeIds field value if set, zero value otherwise. +func (o *Selection) GetExcludeIds() []string { + if o == nil || IsNil(o.ExcludeIds) { + var ret []string + return ret + } + return o.ExcludeIds +} + +// GetExcludeIdsOk returns a tuple with the ExcludeIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Selection) GetExcludeIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeIds) { + return nil, false + } + return o.ExcludeIds, true +} + +// HasExcludeIds returns a boolean if a field has been set. +func (o *Selection) HasExcludeIds() bool { + if o != nil && !IsNil(o.ExcludeIds) { + return true + } + + return false +} + +// SetExcludeIds gets a reference to the given []string and assigns it to the ExcludeIds field. +func (o *Selection) SetExcludeIds(v []string) { + o.ExcludeIds = v +} + +// GetRemoveSimulationCalls returns the RemoveSimulationCalls field value if set, zero value otherwise. +func (o *Selection) GetRemoveSimulationCalls() bool { + if o == nil || IsNil(o.RemoveSimulationCalls) { + var ret bool + return ret + } + return *o.RemoveSimulationCalls +} + +// GetRemoveSimulationCallsOk returns a tuple with the RemoveSimulationCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Selection) GetRemoveSimulationCallsOk() (*bool, bool) { + if o == nil || IsNil(o.RemoveSimulationCalls) { + return nil, false + } + return o.RemoveSimulationCalls, true +} + +// HasRemoveSimulationCalls returns a boolean if a field has been set. +func (o *Selection) HasRemoveSimulationCalls() bool { + if o != nil && !IsNil(o.RemoveSimulationCalls) { + return true + } + + return false +} + +// SetRemoveSimulationCalls gets a reference to the given bool and assigns it to the RemoveSimulationCalls field. +func (o *Selection) SetRemoveSimulationCalls(v bool) { + o.RemoveSimulationCalls = &v +} + +// GetIsVoiceCall returns the IsVoiceCall field value if set, zero value otherwise. +func (o *Selection) GetIsVoiceCall() bool { + if o == nil || IsNil(o.IsVoiceCall) { + var ret bool + return ret + } + return *o.IsVoiceCall +} + +// GetIsVoiceCallOk returns a tuple with the IsVoiceCall field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Selection) GetIsVoiceCallOk() (*bool, bool) { + if o == nil || IsNil(o.IsVoiceCall) { + return nil, false + } + return o.IsVoiceCall, true +} + +// HasIsVoiceCall returns a boolean if a field has been set. +func (o *Selection) HasIsVoiceCall() bool { + if o != nil && !IsNil(o.IsVoiceCall) { + return true + } + + return false +} + +// SetIsVoiceCall gets a reference to the given bool and assigns it to the IsVoiceCall field. +func (o *Selection) SetIsVoiceCall(v bool) { + o.IsVoiceCall = &v +} + +func (o Selection) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Selection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["mode"] = o.Mode + toSerialize["source_type"] = o.SourceType + toSerialize["project_id"] = o.ProjectId + if !IsNil(o.Filter) { + toSerialize["filter"] = o.Filter + } + if !IsNil(o.ExcludeIds) { + toSerialize["exclude_ids"] = o.ExcludeIds + } + if !IsNil(o.RemoveSimulationCalls) { + toSerialize["remove_simulation_calls"] = o.RemoveSimulationCalls + } + if !IsNil(o.IsVoiceCall) { + toSerialize["is_voice_call"] = o.IsVoiceCall + } + return toSerialize, nil +} + +func (o *Selection) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "mode", + "source_type", + "project_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSelection := _Selection{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSelection) + + if err != nil { + return err + } + + *o = Selection(varSelection) + + return err +} + +type NullableSelection struct { + value *Selection + isSet bool +} + +func (v NullableSelection) Get() *Selection { + return v.value +} + +func (v *NullableSelection) Set(val *Selection) { + v.value = val + v.isSet = true +} + +func (v NullableSelection) IsSet() bool { + return v.isSet +} + +func (v *NullableSelection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSelection(val *Selection) *NullableSelection { + return &NullableSelection{value: val, isSet: true} +} + +func (v NullableSelection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSelection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_send_chat_request.go b/go/futureagi/model_send_chat_request.go new file mode 100644 index 0000000..9743f94 --- /dev/null +++ b/go/futureagi/model_send_chat_request.go @@ -0,0 +1,202 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the SendChatRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendChatRequest{} + +// SendChatRequest struct for SendChatRequest +type SendChatRequest struct { + Messages []ChatMessageContract `json:"messages,omitempty"` + Metrics *map[string]string `json:"metrics,omitempty"` + InitiateChat *bool `json:"initiate_chat,omitempty"` +} + +// NewSendChatRequest instantiates a new SendChatRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSendChatRequest() *SendChatRequest { + this := SendChatRequest{} + var initiateChat bool = false + this.InitiateChat = &initiateChat + return &this +} + +// NewSendChatRequestWithDefaults instantiates a new SendChatRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSendChatRequestWithDefaults() *SendChatRequest { + this := SendChatRequest{} + var initiateChat bool = false + this.InitiateChat = &initiateChat + return &this +} + +// GetMessages returns the Messages field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SendChatRequest) GetMessages() []ChatMessageContract { + if o == nil { + var ret []ChatMessageContract + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SendChatRequest) GetMessagesOk() ([]ChatMessageContract, bool) { + if o == nil || IsNil(o.Messages) { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *SendChatRequest) HasMessages() bool { + if o != nil && !IsNil(o.Messages) { + return true + } + + return false +} + +// SetMessages gets a reference to the given []ChatMessageContract and assigns it to the Messages field. +func (o *SendChatRequest) SetMessages(v []ChatMessageContract) { + o.Messages = v +} + +// GetMetrics returns the Metrics field value if set, zero value otherwise. +func (o *SendChatRequest) GetMetrics() map[string]string { + if o == nil || IsNil(o.Metrics) { + var ret map[string]string + return ret + } + return *o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SendChatRequest) GetMetricsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Metrics) { + return nil, false + } + return o.Metrics, true +} + +// HasMetrics returns a boolean if a field has been set. +func (o *SendChatRequest) HasMetrics() bool { + if o != nil && !IsNil(o.Metrics) { + return true + } + + return false +} + +// SetMetrics gets a reference to the given map[string]string and assigns it to the Metrics field. +func (o *SendChatRequest) SetMetrics(v map[string]string) { + o.Metrics = &v +} + +// GetInitiateChat returns the InitiateChat field value if set, zero value otherwise. +func (o *SendChatRequest) GetInitiateChat() bool { + if o == nil || IsNil(o.InitiateChat) { + var ret bool + return ret + } + return *o.InitiateChat +} + +// GetInitiateChatOk returns a tuple with the InitiateChat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SendChatRequest) GetInitiateChatOk() (*bool, bool) { + if o == nil || IsNil(o.InitiateChat) { + return nil, false + } + return o.InitiateChat, true +} + +// HasInitiateChat returns a boolean if a field has been set. +func (o *SendChatRequest) HasInitiateChat() bool { + if o != nil && !IsNil(o.InitiateChat) { + return true + } + + return false +} + +// SetInitiateChat gets a reference to the given bool and assigns it to the InitiateChat field. +func (o *SendChatRequest) SetInitiateChat(v bool) { + o.InitiateChat = &v +} + +func (o SendChatRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendChatRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Messages != nil { + toSerialize["messages"] = o.Messages + } + if !IsNil(o.Metrics) { + toSerialize["metrics"] = o.Metrics + } + if !IsNil(o.InitiateChat) { + toSerialize["initiate_chat"] = o.InitiateChat + } + return toSerialize, nil +} + +type NullableSendChatRequest struct { + value *SendChatRequest + isSet bool +} + +func (v NullableSendChatRequest) Get() *SendChatRequest { + return v.value +} + +func (v *NullableSendChatRequest) Set(val *SendChatRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSendChatRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSendChatRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSendChatRequest(val *SendChatRequest) *NullableSendChatRequest { + return &NullableSendChatRequest{value: val, isSet: true} +} + +func (v NullableSendChatRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSendChatRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_session_comparison_response.go b/go/futureagi/model_session_comparison_response.go new file mode 100644 index 0000000..dfcc8d1 --- /dev/null +++ b/go/futureagi/model_session_comparison_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SessionComparisonResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionComparisonResponse{} + +// SessionComparisonResponse struct for SessionComparisonResponse +type SessionComparisonResponse struct { + Status *bool `json:"status,omitempty"` + Result SessionComparisonResult `json:"result"` +} + +type _SessionComparisonResponse SessionComparisonResponse + +// NewSessionComparisonResponse instantiates a new SessionComparisonResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSessionComparisonResponse(result SessionComparisonResult) *SessionComparisonResponse { + this := SessionComparisonResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewSessionComparisonResponseWithDefaults instantiates a new SessionComparisonResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSessionComparisonResponseWithDefaults() *SessionComparisonResponse { + this := SessionComparisonResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SessionComparisonResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionComparisonResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *SessionComparisonResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *SessionComparisonResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *SessionComparisonResponse) GetResult() SessionComparisonResult { + if o == nil { + var ret SessionComparisonResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SessionComparisonResponse) GetResultOk() (*SessionComparisonResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SessionComparisonResponse) SetResult(v SessionComparisonResult) { + o.Result = v +} + +func (o SessionComparisonResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionComparisonResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SessionComparisonResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSessionComparisonResponse := _SessionComparisonResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSessionComparisonResponse) + + if err != nil { + return err + } + + *o = SessionComparisonResponse(varSessionComparisonResponse) + + return err +} + +type NullableSessionComparisonResponse struct { + value *SessionComparisonResponse + isSet bool +} + +func (v NullableSessionComparisonResponse) Get() *SessionComparisonResponse { + return v.value +} + +func (v *NullableSessionComparisonResponse) Set(val *SessionComparisonResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSessionComparisonResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionComparisonResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionComparisonResponse(val *SessionComparisonResponse) *NullableSessionComparisonResponse { + return &NullableSessionComparisonResponse{value: val, isSet: true} +} + +func (v NullableSessionComparisonResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionComparisonResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_session_comparison_result.go b/go/futureagi/model_session_comparison_result.go new file mode 100644 index 0000000..23c9d07 --- /dev/null +++ b/go/futureagi/model_session_comparison_result.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the SessionComparisonResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionComparisonResult{} + +// SessionComparisonResult struct for SessionComparisonResult +type SessionComparisonResult struct { + ComparisonMetrics map[string]interface{} `json:"comparison_metrics,omitempty"` + ComparisonTranscripts map[string]interface{} `json:"comparison_transcripts,omitempty"` + ComparisonRecordings map[string]interface{} `json:"comparison_recordings,omitempty"` +} + +// NewSessionComparisonResult instantiates a new SessionComparisonResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSessionComparisonResult() *SessionComparisonResult { + this := SessionComparisonResult{} + return &this +} + +// NewSessionComparisonResultWithDefaults instantiates a new SessionComparisonResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSessionComparisonResultWithDefaults() *SessionComparisonResult { + this := SessionComparisonResult{} + return &this +} + +// GetComparisonMetrics returns the ComparisonMetrics field value if set, zero value otherwise. +func (o *SessionComparisonResult) GetComparisonMetrics() map[string]interface{} { + if o == nil || IsNil(o.ComparisonMetrics) { + var ret map[string]interface{} + return ret + } + return o.ComparisonMetrics +} + +// GetComparisonMetricsOk returns a tuple with the ComparisonMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionComparisonResult) GetComparisonMetricsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ComparisonMetrics) { + return map[string]interface{}{}, false + } + return o.ComparisonMetrics, true +} + +// HasComparisonMetrics returns a boolean if a field has been set. +func (o *SessionComparisonResult) HasComparisonMetrics() bool { + if o != nil && !IsNil(o.ComparisonMetrics) { + return true + } + + return false +} + +// SetComparisonMetrics gets a reference to the given map[string]interface{} and assigns it to the ComparisonMetrics field. +func (o *SessionComparisonResult) SetComparisonMetrics(v map[string]interface{}) { + o.ComparisonMetrics = v +} + +// GetComparisonTranscripts returns the ComparisonTranscripts field value if set, zero value otherwise. +func (o *SessionComparisonResult) GetComparisonTranscripts() map[string]interface{} { + if o == nil || IsNil(o.ComparisonTranscripts) { + var ret map[string]interface{} + return ret + } + return o.ComparisonTranscripts +} + +// GetComparisonTranscriptsOk returns a tuple with the ComparisonTranscripts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionComparisonResult) GetComparisonTranscriptsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ComparisonTranscripts) { + return map[string]interface{}{}, false + } + return o.ComparisonTranscripts, true +} + +// HasComparisonTranscripts returns a boolean if a field has been set. +func (o *SessionComparisonResult) HasComparisonTranscripts() bool { + if o != nil && !IsNil(o.ComparisonTranscripts) { + return true + } + + return false +} + +// SetComparisonTranscripts gets a reference to the given map[string]interface{} and assigns it to the ComparisonTranscripts field. +func (o *SessionComparisonResult) SetComparisonTranscripts(v map[string]interface{}) { + o.ComparisonTranscripts = v +} + +// GetComparisonRecordings returns the ComparisonRecordings field value if set, zero value otherwise. +func (o *SessionComparisonResult) GetComparisonRecordings() map[string]interface{} { + if o == nil || IsNil(o.ComparisonRecordings) { + var ret map[string]interface{} + return ret + } + return o.ComparisonRecordings +} + +// GetComparisonRecordingsOk returns a tuple with the ComparisonRecordings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionComparisonResult) GetComparisonRecordingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ComparisonRecordings) { + return map[string]interface{}{}, false + } + return o.ComparisonRecordings, true +} + +// HasComparisonRecordings returns a boolean if a field has been set. +func (o *SessionComparisonResult) HasComparisonRecordings() bool { + if o != nil && !IsNil(o.ComparisonRecordings) { + return true + } + + return false +} + +// SetComparisonRecordings gets a reference to the given map[string]interface{} and assigns it to the ComparisonRecordings field. +func (o *SessionComparisonResult) SetComparisonRecordings(v map[string]interface{}) { + o.ComparisonRecordings = v +} + +func (o SessionComparisonResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionComparisonResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ComparisonMetrics) { + toSerialize["comparison_metrics"] = o.ComparisonMetrics + } + if !IsNil(o.ComparisonTranscripts) { + toSerialize["comparison_transcripts"] = o.ComparisonTranscripts + } + if !IsNil(o.ComparisonRecordings) { + toSerialize["comparison_recordings"] = o.ComparisonRecordings + } + return toSerialize, nil +} + +type NullableSessionComparisonResult struct { + value *SessionComparisonResult + isSet bool +} + +func (v NullableSessionComparisonResult) Get() *SessionComparisonResult { + return v.value +} + +func (v *NullableSessionComparisonResult) Set(val *SessionComparisonResult) { + v.value = val + v.isSet = true +} + +func (v NullableSessionComparisonResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionComparisonResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionComparisonResult(val *SessionComparisonResult) *NullableSessionComparisonResult { + return &NullableSessionComparisonResult{value: val, isSet: true} +} + +func (v NullableSessionComparisonResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionComparisonResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sidebar_ai_metadata.go b/go/futureagi/model_sidebar_ai_metadata.go new file mode 100644 index 0000000..6d530ce --- /dev/null +++ b/go/futureagi/model_sidebar_ai_metadata.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SidebarAIMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SidebarAIMetadata{} + +// SidebarAIMetadata struct for SidebarAIMetadata +type SidebarAIMetadata struct { + Model NullableString `json:"model"` + ModelVersion NullableString `json:"model_version"` + Project NullableString `json:"project"` + EvalScore NullableFloat32 `json:"eval_score"` + TraceId NullableString `json:"trace_id"` +} + +type _SidebarAIMetadata SidebarAIMetadata + +// NewSidebarAIMetadata instantiates a new SidebarAIMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSidebarAIMetadata(model NullableString, modelVersion NullableString, project NullableString, evalScore NullableFloat32, traceId NullableString) *SidebarAIMetadata { + this := SidebarAIMetadata{} + this.Model = model + this.ModelVersion = modelVersion + this.Project = project + this.EvalScore = evalScore + this.TraceId = traceId + return &this +} + +// NewSidebarAIMetadataWithDefaults instantiates a new SidebarAIMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSidebarAIMetadataWithDefaults() *SidebarAIMetadata { + this := SidebarAIMetadata{} + return &this +} + +// GetModel returns the Model field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SidebarAIMetadata) GetModel() string { + if o == nil || o.Model.Get() == nil { + var ret string + return ret + } + + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarAIMetadata) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// SetModel sets field value +func (o *SidebarAIMetadata) SetModel(v string) { + o.Model.Set(&v) +} + +// GetModelVersion returns the ModelVersion field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SidebarAIMetadata) GetModelVersion() string { + if o == nil || o.ModelVersion.Get() == nil { + var ret string + return ret + } + + return *o.ModelVersion.Get() +} + +// GetModelVersionOk returns a tuple with the ModelVersion field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarAIMetadata) GetModelVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ModelVersion.Get(), o.ModelVersion.IsSet() +} + +// SetModelVersion sets field value +func (o *SidebarAIMetadata) SetModelVersion(v string) { + o.ModelVersion.Set(&v) +} + +// GetProject returns the Project field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SidebarAIMetadata) GetProject() string { + if o == nil || o.Project.Get() == nil { + var ret string + return ret + } + + return *o.Project.Get() +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarAIMetadata) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Project.Get(), o.Project.IsSet() +} + +// SetProject sets field value +func (o *SidebarAIMetadata) SetProject(v string) { + o.Project.Set(&v) +} + +// GetEvalScore returns the EvalScore field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *SidebarAIMetadata) GetEvalScore() float32 { + if o == nil || o.EvalScore.Get() == nil { + var ret float32 + return ret + } + + return *o.EvalScore.Get() +} + +// GetEvalScoreOk returns a tuple with the EvalScore field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarAIMetadata) GetEvalScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.EvalScore.Get(), o.EvalScore.IsSet() +} + +// SetEvalScore sets field value +func (o *SidebarAIMetadata) SetEvalScore(v float32) { + o.EvalScore.Set(&v) +} + +// GetTraceId returns the TraceId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SidebarAIMetadata) GetTraceId() string { + if o == nil || o.TraceId.Get() == nil { + var ret string + return ret + } + + return *o.TraceId.Get() +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarAIMetadata) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TraceId.Get(), o.TraceId.IsSet() +} + +// SetTraceId sets field value +func (o *SidebarAIMetadata) SetTraceId(v string) { + o.TraceId.Set(&v) +} + +func (o SidebarAIMetadata) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SidebarAIMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["model"] = o.Model.Get() + toSerialize["model_version"] = o.ModelVersion.Get() + toSerialize["project"] = o.Project.Get() + toSerialize["eval_score"] = o.EvalScore.Get() + toSerialize["trace_id"] = o.TraceId.Get() + return toSerialize, nil +} + +func (o *SidebarAIMetadata) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "model", + "model_version", + "project", + "eval_score", + "trace_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSidebarAIMetadata := _SidebarAIMetadata{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSidebarAIMetadata) + + if err != nil { + return err + } + + *o = SidebarAIMetadata(varSidebarAIMetadata) + + return err +} + +type NullableSidebarAIMetadata struct { + value *SidebarAIMetadata + isSet bool +} + +func (v NullableSidebarAIMetadata) Get() *SidebarAIMetadata { + return v.value +} + +func (v *NullableSidebarAIMetadata) Set(val *SidebarAIMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableSidebarAIMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableSidebarAIMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSidebarAIMetadata(val *SidebarAIMetadata) *NullableSidebarAIMetadata { + return &NullableSidebarAIMetadata{value: val, isSet: true} +} + +func (v NullableSidebarAIMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSidebarAIMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_sidebar_timeline.go b/go/futureagi/model_sidebar_timeline.go new file mode 100644 index 0000000..09c6757 --- /dev/null +++ b/go/futureagi/model_sidebar_timeline.go @@ -0,0 +1,220 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SidebarTimeline type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SidebarTimeline{} + +// SidebarTimeline struct for SidebarTimeline +type SidebarTimeline struct { + FirstSeen NullableTime `json:"first_seen"` + LastSeen NullableTime `json:"last_seen"` + AgeDays NullableInt32 `json:"age_days"` +} + +type _SidebarTimeline SidebarTimeline + +// NewSidebarTimeline instantiates a new SidebarTimeline object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSidebarTimeline(firstSeen NullableTime, lastSeen NullableTime, ageDays NullableInt32) *SidebarTimeline { + this := SidebarTimeline{} + this.FirstSeen = firstSeen + this.LastSeen = lastSeen + this.AgeDays = ageDays + return &this +} + +// NewSidebarTimelineWithDefaults instantiates a new SidebarTimeline object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSidebarTimelineWithDefaults() *SidebarTimeline { + this := SidebarTimeline{} + return &this +} + +// GetFirstSeen returns the FirstSeen field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *SidebarTimeline) GetFirstSeen() time.Time { + if o == nil || o.FirstSeen.Get() == nil { + var ret time.Time + return ret + } + + return *o.FirstSeen.Get() +} + +// GetFirstSeenOk returns a tuple with the FirstSeen field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarTimeline) GetFirstSeenOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.FirstSeen.Get(), o.FirstSeen.IsSet() +} + +// SetFirstSeen sets field value +func (o *SidebarTimeline) SetFirstSeen(v time.Time) { + o.FirstSeen.Set(&v) +} + +// GetLastSeen returns the LastSeen field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *SidebarTimeline) GetLastSeen() time.Time { + if o == nil || o.LastSeen.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastSeen.Get() +} + +// GetLastSeenOk returns a tuple with the LastSeen field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarTimeline) GetLastSeenOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastSeen.Get(), o.LastSeen.IsSet() +} + +// SetLastSeen sets field value +func (o *SidebarTimeline) SetLastSeen(v time.Time) { + o.LastSeen.Set(&v) +} + +// GetAgeDays returns the AgeDays field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *SidebarTimeline) GetAgeDays() int32 { + if o == nil || o.AgeDays.Get() == nil { + var ret int32 + return ret + } + + return *o.AgeDays.Get() +} + +// GetAgeDaysOk returns a tuple with the AgeDays field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SidebarTimeline) GetAgeDaysOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.AgeDays.Get(), o.AgeDays.IsSet() +} + +// SetAgeDays sets field value +func (o *SidebarTimeline) SetAgeDays(v int32) { + o.AgeDays.Set(&v) +} + +func (o SidebarTimeline) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SidebarTimeline) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["first_seen"] = o.FirstSeen.Get() + toSerialize["last_seen"] = o.LastSeen.Get() + toSerialize["age_days"] = o.AgeDays.Get() + return toSerialize, nil +} + +func (o *SidebarTimeline) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "first_seen", + "last_seen", + "age_days", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSidebarTimeline := _SidebarTimeline{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSidebarTimeline) + + if err != nil { + return err + } + + *o = SidebarTimeline(varSidebarTimeline) + + return err +} + +type NullableSidebarTimeline struct { + value *SidebarTimeline + isSet bool +} + +func (v NullableSidebarTimeline) Get() *SidebarTimeline { + return v.value +} + +func (v *NullableSidebarTimeline) Set(val *SidebarTimeline) { + v.value = val + v.isSet = true +} + +func (v NullableSidebarTimeline) IsSet() bool { + return v.isSet +} + +func (v *NullableSidebarTimeline) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSidebarTimeline(val *SidebarTimeline) *NullableSidebarTimeline { + return &NullableSidebarTimeline{value: val, isSet: true} +} + +func (v NullableSidebarTimeline) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSidebarTimeline) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_simulate_api_personas_field_options_200_response.go b/go/futureagi/model_simulate_api_personas_field_options_200_response.go new file mode 100644 index 0000000..cece949 --- /dev/null +++ b/go/futureagi/model_simulate_api_personas_field_options_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SimulateApiPersonasFieldOptions200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SimulateApiPersonasFieldOptions200Response{} + +// SimulateApiPersonasFieldOptions200Response struct for SimulateApiPersonasFieldOptions200Response +type SimulateApiPersonasFieldOptions200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PersonaFieldOptions `json:"results"` +} + +type _SimulateApiPersonasFieldOptions200Response SimulateApiPersonasFieldOptions200Response + +// NewSimulateApiPersonasFieldOptions200Response instantiates a new SimulateApiPersonasFieldOptions200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSimulateApiPersonasFieldOptions200Response(count int32, results []PersonaFieldOptions) *SimulateApiPersonasFieldOptions200Response { + this := SimulateApiPersonasFieldOptions200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewSimulateApiPersonasFieldOptions200ResponseWithDefaults instantiates a new SimulateApiPersonasFieldOptions200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSimulateApiPersonasFieldOptions200ResponseWithDefaults() *SimulateApiPersonasFieldOptions200Response { + this := SimulateApiPersonasFieldOptions200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *SimulateApiPersonasFieldOptions200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *SimulateApiPersonasFieldOptions200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *SimulateApiPersonasFieldOptions200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateApiPersonasFieldOptions200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateApiPersonasFieldOptions200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *SimulateApiPersonasFieldOptions200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *SimulateApiPersonasFieldOptions200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *SimulateApiPersonasFieldOptions200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *SimulateApiPersonasFieldOptions200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateApiPersonasFieldOptions200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateApiPersonasFieldOptions200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *SimulateApiPersonasFieldOptions200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *SimulateApiPersonasFieldOptions200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *SimulateApiPersonasFieldOptions200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *SimulateApiPersonasFieldOptions200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *SimulateApiPersonasFieldOptions200Response) GetResults() []PersonaFieldOptions { + if o == nil { + var ret []PersonaFieldOptions + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *SimulateApiPersonasFieldOptions200Response) GetResultsOk() ([]PersonaFieldOptions, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *SimulateApiPersonasFieldOptions200Response) SetResults(v []PersonaFieldOptions) { + o.Results = v +} + +func (o SimulateApiPersonasFieldOptions200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SimulateApiPersonasFieldOptions200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *SimulateApiPersonasFieldOptions200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSimulateApiPersonasFieldOptions200Response := _SimulateApiPersonasFieldOptions200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSimulateApiPersonasFieldOptions200Response) + + if err != nil { + return err + } + + *o = SimulateApiPersonasFieldOptions200Response(varSimulateApiPersonasFieldOptions200Response) + + return err +} + +type NullableSimulateApiPersonasFieldOptions200Response struct { + value *SimulateApiPersonasFieldOptions200Response + isSet bool +} + +func (v NullableSimulateApiPersonasFieldOptions200Response) Get() *SimulateApiPersonasFieldOptions200Response { + return v.value +} + +func (v *NullableSimulateApiPersonasFieldOptions200Response) Set(val *SimulateApiPersonasFieldOptions200Response) { + v.value = val + v.isSet = true +} + +func (v NullableSimulateApiPersonasFieldOptions200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulateApiPersonasFieldOptions200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulateApiPersonasFieldOptions200Response(val *SimulateApiPersonasFieldOptions200Response) *NullableSimulateApiPersonasFieldOptions200Response { + return &NullableSimulateApiPersonasFieldOptions200Response{value: val, isSet: true} +} + +func (v NullableSimulateApiPersonasFieldOptions200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulateApiPersonasFieldOptions200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_simulate_api_personas_system_personas_200_response.go b/go/futureagi/model_simulate_api_personas_system_personas_200_response.go new file mode 100644 index 0000000..7f9491e --- /dev/null +++ b/go/futureagi/model_simulate_api_personas_system_personas_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SimulateApiPersonasSystemPersonas200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SimulateApiPersonasSystemPersonas200Response{} + +// SimulateApiPersonasSystemPersonas200Response struct for SimulateApiPersonasSystemPersonas200Response +type SimulateApiPersonasSystemPersonas200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []Persona `json:"results"` +} + +type _SimulateApiPersonasSystemPersonas200Response SimulateApiPersonasSystemPersonas200Response + +// NewSimulateApiPersonasSystemPersonas200Response instantiates a new SimulateApiPersonasSystemPersonas200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSimulateApiPersonasSystemPersonas200Response(count int32, results []Persona) *SimulateApiPersonasSystemPersonas200Response { + this := SimulateApiPersonasSystemPersonas200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewSimulateApiPersonasSystemPersonas200ResponseWithDefaults instantiates a new SimulateApiPersonasSystemPersonas200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSimulateApiPersonasSystemPersonas200ResponseWithDefaults() *SimulateApiPersonasSystemPersonas200Response { + this := SimulateApiPersonasSystemPersonas200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *SimulateApiPersonasSystemPersonas200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *SimulateApiPersonasSystemPersonas200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *SimulateApiPersonasSystemPersonas200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateApiPersonasSystemPersonas200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateApiPersonasSystemPersonas200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *SimulateApiPersonasSystemPersonas200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *SimulateApiPersonasSystemPersonas200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *SimulateApiPersonasSystemPersonas200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *SimulateApiPersonasSystemPersonas200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateApiPersonasSystemPersonas200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateApiPersonasSystemPersonas200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *SimulateApiPersonasSystemPersonas200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *SimulateApiPersonasSystemPersonas200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *SimulateApiPersonasSystemPersonas200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *SimulateApiPersonasSystemPersonas200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *SimulateApiPersonasSystemPersonas200Response) GetResults() []Persona { + if o == nil { + var ret []Persona + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *SimulateApiPersonasSystemPersonas200Response) GetResultsOk() ([]Persona, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *SimulateApiPersonasSystemPersonas200Response) SetResults(v []Persona) { + o.Results = v +} + +func (o SimulateApiPersonasSystemPersonas200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SimulateApiPersonasSystemPersonas200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *SimulateApiPersonasSystemPersonas200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSimulateApiPersonasSystemPersonas200Response := _SimulateApiPersonasSystemPersonas200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSimulateApiPersonasSystemPersonas200Response) + + if err != nil { + return err + } + + *o = SimulateApiPersonasSystemPersonas200Response(varSimulateApiPersonasSystemPersonas200Response) + + return err +} + +type NullableSimulateApiPersonasSystemPersonas200Response struct { + value *SimulateApiPersonasSystemPersonas200Response + isSet bool +} + +func (v NullableSimulateApiPersonasSystemPersonas200Response) Get() *SimulateApiPersonasSystemPersonas200Response { + return v.value +} + +func (v *NullableSimulateApiPersonasSystemPersonas200Response) Set(val *SimulateApiPersonasSystemPersonas200Response) { + v.value = val + v.isSet = true +} + +func (v NullableSimulateApiPersonasSystemPersonas200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulateApiPersonasSystemPersonas200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulateApiPersonasSystemPersonas200Response(val *SimulateApiPersonasSystemPersonas200Response) *NullableSimulateApiPersonasSystemPersonas200Response { + return &NullableSimulateApiPersonasSystemPersonas200Response{value: val, isSet: true} +} + +func (v NullableSimulateApiPersonasSystemPersonas200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulateApiPersonasSystemPersonas200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_simulate_eval_config_response.go b/go/futureagi/model_simulate_eval_config_response.go new file mode 100644 index 0000000..0ec0288 --- /dev/null +++ b/go/futureagi/model_simulate_eval_config_response.go @@ -0,0 +1,504 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the SimulateEvalConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SimulateEvalConfigResponse{} + +// SimulateEvalConfigResponse struct for SimulateEvalConfigResponse +type SimulateEvalConfigResponse struct { + Id *string `json:"id,omitempty"` + Name NullableString `json:"name,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + Mapping map[string]interface{} `json:"mapping,omitempty"` + Filters []AutomationRuleConditionsFilterInner `json:"filters,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + Model NullableString `json:"model,omitempty"` + Status NullableString `json:"status,omitempty"` + EvalGroup NullableString `json:"eval_group,omitempty"` + TemplateId NullableString `json:"template_id,omitempty"` +} + +// NewSimulateEvalConfigResponse instantiates a new SimulateEvalConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSimulateEvalConfigResponse() *SimulateEvalConfigResponse { + this := SimulateEvalConfigResponse{} + return &this +} + +// NewSimulateEvalConfigResponseWithDefaults instantiates a new SimulateEvalConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSimulateEvalConfigResponseWithDefaults() *SimulateEvalConfigResponse { + this := SimulateEvalConfigResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SimulateEvalConfigResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulateEvalConfigResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SimulateEvalConfigResponse) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateEvalConfigResponse) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateEvalConfigResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *SimulateEvalConfigResponse) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *SimulateEvalConfigResponse) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *SimulateEvalConfigResponse) UnsetName() { + o.Name.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *SimulateEvalConfigResponse) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulateEvalConfigResponse) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *SimulateEvalConfigResponse) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetMapping returns the Mapping field value if set, zero value otherwise. +func (o *SimulateEvalConfigResponse) GetMapping() map[string]interface{} { + if o == nil || IsNil(o.Mapping) { + var ret map[string]interface{} + return ret + } + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulateEvalConfigResponse) GetMappingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Mapping) { + return map[string]interface{}{}, false + } + return o.Mapping, true +} + +// HasMapping returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasMapping() bool { + if o != nil && !IsNil(o.Mapping) { + return true + } + + return false +} + +// SetMapping gets a reference to the given map[string]interface{} and assigns it to the Mapping field. +func (o *SimulateEvalConfigResponse) SetMapping(v map[string]interface{}) { + o.Mapping = v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *SimulateEvalConfigResponse) GetFilters() []AutomationRuleConditionsFilterInner { + if o == nil || IsNil(o.Filters) { + var ret []AutomationRuleConditionsFilterInner + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulateEvalConfigResponse) GetFiltersOk() ([]AutomationRuleConditionsFilterInner, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given []AutomationRuleConditionsFilterInner and assigns it to the Filters field. +func (o *SimulateEvalConfigResponse) SetFilters(v []AutomationRuleConditionsFilterInner) { + o.Filters = v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *SimulateEvalConfigResponse) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulateEvalConfigResponse) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *SimulateEvalConfigResponse) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateEvalConfigResponse) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateEvalConfigResponse) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *SimulateEvalConfigResponse) SetModel(v string) { + o.Model.Set(&v) +} + +// SetModelNil sets the value for Model to be an explicit nil +func (o *SimulateEvalConfigResponse) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *SimulateEvalConfigResponse) UnsetModel() { + o.Model.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateEvalConfigResponse) GetStatus() string { + if o == nil || IsNil(o.Status.Get()) { + var ret string + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateEvalConfigResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableString and assigns it to the Status field. +func (o *SimulateEvalConfigResponse) SetStatus(v string) { + o.Status.Set(&v) +} + +// SetStatusNil sets the value for Status to be an explicit nil +func (o *SimulateEvalConfigResponse) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *SimulateEvalConfigResponse) UnsetStatus() { + o.Status.Unset() +} + +// GetEvalGroup returns the EvalGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateEvalConfigResponse) GetEvalGroup() string { + if o == nil || IsNil(o.EvalGroup.Get()) { + var ret string + return ret + } + return *o.EvalGroup.Get() +} + +// GetEvalGroupOk returns a tuple with the EvalGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateEvalConfigResponse) GetEvalGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EvalGroup.Get(), o.EvalGroup.IsSet() +} + +// HasEvalGroup returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasEvalGroup() bool { + if o != nil && o.EvalGroup.IsSet() { + return true + } + + return false +} + +// SetEvalGroup gets a reference to the given NullableString and assigns it to the EvalGroup field. +func (o *SimulateEvalConfigResponse) SetEvalGroup(v string) { + o.EvalGroup.Set(&v) +} + +// SetEvalGroupNil sets the value for EvalGroup to be an explicit nil +func (o *SimulateEvalConfigResponse) SetEvalGroupNil() { + o.EvalGroup.Set(nil) +} + +// UnsetEvalGroup ensures that no value is present for EvalGroup, not even an explicit nil +func (o *SimulateEvalConfigResponse) UnsetEvalGroup() { + o.EvalGroup.Unset() +} + +// GetTemplateId returns the TemplateId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulateEvalConfigResponse) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId.Get()) { + var ret string + return ret + } + return *o.TemplateId.Get() +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulateEvalConfigResponse) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TemplateId.Get(), o.TemplateId.IsSet() +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *SimulateEvalConfigResponse) HasTemplateId() bool { + if o != nil && o.TemplateId.IsSet() { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given NullableString and assigns it to the TemplateId field. +func (o *SimulateEvalConfigResponse) SetTemplateId(v string) { + o.TemplateId.Set(&v) +} + +// SetTemplateIdNil sets the value for TemplateId to be an explicit nil +func (o *SimulateEvalConfigResponse) SetTemplateIdNil() { + o.TemplateId.Set(nil) +} + +// UnsetTemplateId ensures that no value is present for TemplateId, not even an explicit nil +func (o *SimulateEvalConfigResponse) UnsetTemplateId() { + o.TemplateId.Unset() +} + +func (o SimulateEvalConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SimulateEvalConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Mapping) { + toSerialize["mapping"] = o.Mapping + } + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + if o.EvalGroup.IsSet() { + toSerialize["eval_group"] = o.EvalGroup.Get() + } + if o.TemplateId.IsSet() { + toSerialize["template_id"] = o.TemplateId.Get() + } + return toSerialize, nil +} + +type NullableSimulateEvalConfigResponse struct { + value *SimulateEvalConfigResponse + isSet bool +} + +func (v NullableSimulateEvalConfigResponse) Get() *SimulateEvalConfigResponse { + return v.value +} + +func (v *NullableSimulateEvalConfigResponse) Set(val *SimulateEvalConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSimulateEvalConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulateEvalConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulateEvalConfigResponse(val *SimulateEvalConfigResponse) *NullableSimulateEvalConfigResponse { + return &NullableSimulateEvalConfigResponse{value: val, isSet: true} +} + +func (v NullableSimulateEvalConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulateEvalConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_simulator_agent.go b/go/futureagi/model_simulator_agent.go new file mode 100644 index 0000000..0578a7e --- /dev/null +++ b/go/futureagi/model_simulator_agent.go @@ -0,0 +1,798 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the SimulatorAgent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SimulatorAgent{} + +// SimulatorAgent struct for SimulatorAgent +type SimulatorAgent struct { + Id *string `json:"id,omitempty"` + // Name of the simulator agent + Name string `json:"name"` + // System prompt for the agent + Prompt string `json:"prompt"` + // Voice service provider + VoiceProvider string `json:"voice_provider"` + // Specific voice to use + VoiceName string `json:"voice_name"` + // Sensitivity for interruption detection (0-1) + InterruptSensitivity *float32 `json:"interrupt_sensitivity,omitempty"` + // Speed of conversation (0.1-3.0) + ConversationSpeed *float32 `json:"conversation_speed,omitempty"` + // Sensitivity for detecting when speaker has finished (0-1) + FinishedSpeakingSensitivity *float32 `json:"finished_speaking_sensitivity,omitempty"` + // LLM model to use + Model string `json:"model"` + // Temperature setting for LLM (0-2) + LlmTemperature *float32 `json:"llm_temperature,omitempty"` + // Maximum call duration in minutes (1-180) + MaxCallDurationInMinutes *int32 `json:"max_call_duration_in_minutes,omitempty"` + // Delay before initial message in seconds (0-60) + InitialMessageDelay *int32 `json:"initial_message_delay,omitempty"` + // Initial message to send when conversation starts + InitialMessage *string `json:"initial_message,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // Organization this simulator agent belongs to + Organization *string `json:"organization,omitempty"` + Deleted *bool `json:"deleted,omitempty"` + DeletedAt NullableTime `json:"deleted_at,omitempty"` + LogoUrl *string `json:"logo_url,omitempty"` +} + +type _SimulatorAgent SimulatorAgent + +// NewSimulatorAgent instantiates a new SimulatorAgent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSimulatorAgent(name string, prompt string, voiceProvider string, voiceName string, model string) *SimulatorAgent { + this := SimulatorAgent{} + this.Name = name + this.Prompt = prompt + this.VoiceProvider = voiceProvider + this.VoiceName = voiceName + this.Model = model + return &this +} + +// NewSimulatorAgentWithDefaults instantiates a new SimulatorAgent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSimulatorAgentWithDefaults() *SimulatorAgent { + this := SimulatorAgent{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SimulatorAgent) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SimulatorAgent) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SimulatorAgent) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *SimulatorAgent) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SimulatorAgent) SetName(v string) { + o.Name = v +} + +// GetPrompt returns the Prompt field value +func (o *SimulatorAgent) GetPrompt() string { + if o == nil { + var ret string + return ret + } + + return o.Prompt +} + +// GetPromptOk returns a tuple with the Prompt field value +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetPromptOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Prompt, true +} + +// SetPrompt sets field value +func (o *SimulatorAgent) SetPrompt(v string) { + o.Prompt = v +} + +// GetVoiceProvider returns the VoiceProvider field value +func (o *SimulatorAgent) GetVoiceProvider() string { + if o == nil { + var ret string + return ret + } + + return o.VoiceProvider +} + +// GetVoiceProviderOk returns a tuple with the VoiceProvider field value +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetVoiceProviderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.VoiceProvider, true +} + +// SetVoiceProvider sets field value +func (o *SimulatorAgent) SetVoiceProvider(v string) { + o.VoiceProvider = v +} + +// GetVoiceName returns the VoiceName field value +func (o *SimulatorAgent) GetVoiceName() string { + if o == nil { + var ret string + return ret + } + + return o.VoiceName +} + +// GetVoiceNameOk returns a tuple with the VoiceName field value +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetVoiceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.VoiceName, true +} + +// SetVoiceName sets field value +func (o *SimulatorAgent) SetVoiceName(v string) { + o.VoiceName = v +} + +// GetInterruptSensitivity returns the InterruptSensitivity field value if set, zero value otherwise. +func (o *SimulatorAgent) GetInterruptSensitivity() float32 { + if o == nil || IsNil(o.InterruptSensitivity) { + var ret float32 + return ret + } + return *o.InterruptSensitivity +} + +// GetInterruptSensitivityOk returns a tuple with the InterruptSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetInterruptSensitivityOk() (*float32, bool) { + if o == nil || IsNil(o.InterruptSensitivity) { + return nil, false + } + return o.InterruptSensitivity, true +} + +// HasInterruptSensitivity returns a boolean if a field has been set. +func (o *SimulatorAgent) HasInterruptSensitivity() bool { + if o != nil && !IsNil(o.InterruptSensitivity) { + return true + } + + return false +} + +// SetInterruptSensitivity gets a reference to the given float32 and assigns it to the InterruptSensitivity field. +func (o *SimulatorAgent) SetInterruptSensitivity(v float32) { + o.InterruptSensitivity = &v +} + +// GetConversationSpeed returns the ConversationSpeed field value if set, zero value otherwise. +func (o *SimulatorAgent) GetConversationSpeed() float32 { + if o == nil || IsNil(o.ConversationSpeed) { + var ret float32 + return ret + } + return *o.ConversationSpeed +} + +// GetConversationSpeedOk returns a tuple with the ConversationSpeed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetConversationSpeedOk() (*float32, bool) { + if o == nil || IsNil(o.ConversationSpeed) { + return nil, false + } + return o.ConversationSpeed, true +} + +// HasConversationSpeed returns a boolean if a field has been set. +func (o *SimulatorAgent) HasConversationSpeed() bool { + if o != nil && !IsNil(o.ConversationSpeed) { + return true + } + + return false +} + +// SetConversationSpeed gets a reference to the given float32 and assigns it to the ConversationSpeed field. +func (o *SimulatorAgent) SetConversationSpeed(v float32) { + o.ConversationSpeed = &v +} + +// GetFinishedSpeakingSensitivity returns the FinishedSpeakingSensitivity field value if set, zero value otherwise. +func (o *SimulatorAgent) GetFinishedSpeakingSensitivity() float32 { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + var ret float32 + return ret + } + return *o.FinishedSpeakingSensitivity +} + +// GetFinishedSpeakingSensitivityOk returns a tuple with the FinishedSpeakingSensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetFinishedSpeakingSensitivityOk() (*float32, bool) { + if o == nil || IsNil(o.FinishedSpeakingSensitivity) { + return nil, false + } + return o.FinishedSpeakingSensitivity, true +} + +// HasFinishedSpeakingSensitivity returns a boolean if a field has been set. +func (o *SimulatorAgent) HasFinishedSpeakingSensitivity() bool { + if o != nil && !IsNil(o.FinishedSpeakingSensitivity) { + return true + } + + return false +} + +// SetFinishedSpeakingSensitivity gets a reference to the given float32 and assigns it to the FinishedSpeakingSensitivity field. +func (o *SimulatorAgent) SetFinishedSpeakingSensitivity(v float32) { + o.FinishedSpeakingSensitivity = &v +} + +// GetModel returns the Model field value +func (o *SimulatorAgent) GetModel() string { + if o == nil { + var ret string + return ret + } + + return o.Model +} + +// GetModelOk returns a tuple with the Model field value +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Model, true +} + +// SetModel sets field value +func (o *SimulatorAgent) SetModel(v string) { + o.Model = v +} + +// GetLlmTemperature returns the LlmTemperature field value if set, zero value otherwise. +func (o *SimulatorAgent) GetLlmTemperature() float32 { + if o == nil || IsNil(o.LlmTemperature) { + var ret float32 + return ret + } + return *o.LlmTemperature +} + +// GetLlmTemperatureOk returns a tuple with the LlmTemperature field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetLlmTemperatureOk() (*float32, bool) { + if o == nil || IsNil(o.LlmTemperature) { + return nil, false + } + return o.LlmTemperature, true +} + +// HasLlmTemperature returns a boolean if a field has been set. +func (o *SimulatorAgent) HasLlmTemperature() bool { + if o != nil && !IsNil(o.LlmTemperature) { + return true + } + + return false +} + +// SetLlmTemperature gets a reference to the given float32 and assigns it to the LlmTemperature field. +func (o *SimulatorAgent) SetLlmTemperature(v float32) { + o.LlmTemperature = &v +} + +// GetMaxCallDurationInMinutes returns the MaxCallDurationInMinutes field value if set, zero value otherwise. +func (o *SimulatorAgent) GetMaxCallDurationInMinutes() int32 { + if o == nil || IsNil(o.MaxCallDurationInMinutes) { + var ret int32 + return ret + } + return *o.MaxCallDurationInMinutes +} + +// GetMaxCallDurationInMinutesOk returns a tuple with the MaxCallDurationInMinutes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetMaxCallDurationInMinutesOk() (*int32, bool) { + if o == nil || IsNil(o.MaxCallDurationInMinutes) { + return nil, false + } + return o.MaxCallDurationInMinutes, true +} + +// HasMaxCallDurationInMinutes returns a boolean if a field has been set. +func (o *SimulatorAgent) HasMaxCallDurationInMinutes() bool { + if o != nil && !IsNil(o.MaxCallDurationInMinutes) { + return true + } + + return false +} + +// SetMaxCallDurationInMinutes gets a reference to the given int32 and assigns it to the MaxCallDurationInMinutes field. +func (o *SimulatorAgent) SetMaxCallDurationInMinutes(v int32) { + o.MaxCallDurationInMinutes = &v +} + +// GetInitialMessageDelay returns the InitialMessageDelay field value if set, zero value otherwise. +func (o *SimulatorAgent) GetInitialMessageDelay() int32 { + if o == nil || IsNil(o.InitialMessageDelay) { + var ret int32 + return ret + } + return *o.InitialMessageDelay +} + +// GetInitialMessageDelayOk returns a tuple with the InitialMessageDelay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetInitialMessageDelayOk() (*int32, bool) { + if o == nil || IsNil(o.InitialMessageDelay) { + return nil, false + } + return o.InitialMessageDelay, true +} + +// HasInitialMessageDelay returns a boolean if a field has been set. +func (o *SimulatorAgent) HasInitialMessageDelay() bool { + if o != nil && !IsNil(o.InitialMessageDelay) { + return true + } + + return false +} + +// SetInitialMessageDelay gets a reference to the given int32 and assigns it to the InitialMessageDelay field. +func (o *SimulatorAgent) SetInitialMessageDelay(v int32) { + o.InitialMessageDelay = &v +} + +// GetInitialMessage returns the InitialMessage field value if set, zero value otherwise. +func (o *SimulatorAgent) GetInitialMessage() string { + if o == nil || IsNil(o.InitialMessage) { + var ret string + return ret + } + return *o.InitialMessage +} + +// GetInitialMessageOk returns a tuple with the InitialMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetInitialMessageOk() (*string, bool) { + if o == nil || IsNil(o.InitialMessage) { + return nil, false + } + return o.InitialMessage, true +} + +// HasInitialMessage returns a boolean if a field has been set. +func (o *SimulatorAgent) HasInitialMessage() bool { + if o != nil && !IsNil(o.InitialMessage) { + return true + } + + return false +} + +// SetInitialMessage gets a reference to the given string and assigns it to the InitialMessage field. +func (o *SimulatorAgent) SetInitialMessage(v string) { + o.InitialMessage = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *SimulatorAgent) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SimulatorAgent) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *SimulatorAgent) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *SimulatorAgent) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SimulatorAgent) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *SimulatorAgent) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *SimulatorAgent) GetOrganization() string { + if o == nil || IsNil(o.Organization) { + var ret string + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetOrganizationOk() (*string, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *SimulatorAgent) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given string and assigns it to the Organization field. +func (o *SimulatorAgent) SetOrganization(v string) { + o.Organization = &v +} + +// GetDeleted returns the Deleted field value if set, zero value otherwise. +func (o *SimulatorAgent) GetDeleted() bool { + if o == nil || IsNil(o.Deleted) { + var ret bool + return ret + } + return *o.Deleted +} + +// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetDeletedOk() (*bool, bool) { + if o == nil || IsNil(o.Deleted) { + return nil, false + } + return o.Deleted, true +} + +// HasDeleted returns a boolean if a field has been set. +func (o *SimulatorAgent) HasDeleted() bool { + if o != nil && !IsNil(o.Deleted) { + return true + } + + return false +} + +// SetDeleted gets a reference to the given bool and assigns it to the Deleted field. +func (o *SimulatorAgent) SetDeleted(v bool) { + o.Deleted = &v +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulatorAgent) GetDeletedAt() time.Time { + if o == nil || IsNil(o.DeletedAt.Get()) { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulatorAgent) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *SimulatorAgent) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *SimulatorAgent) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} + +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *SimulatorAgent) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *SimulatorAgent) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +// GetLogoUrl returns the LogoUrl field value if set, zero value otherwise. +func (o *SimulatorAgent) GetLogoUrl() string { + if o == nil || IsNil(o.LogoUrl) { + var ret string + return ret + } + return *o.LogoUrl +} + +// GetLogoUrlOk returns a tuple with the LogoUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgent) GetLogoUrlOk() (*string, bool) { + if o == nil || IsNil(o.LogoUrl) { + return nil, false + } + return o.LogoUrl, true +} + +// HasLogoUrl returns a boolean if a field has been set. +func (o *SimulatorAgent) HasLogoUrl() bool { + if o != nil && !IsNil(o.LogoUrl) { + return true + } + + return false +} + +// SetLogoUrl gets a reference to the given string and assigns it to the LogoUrl field. +func (o *SimulatorAgent) SetLogoUrl(v string) { + o.LogoUrl = &v +} + +func (o SimulatorAgent) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SimulatorAgent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + toSerialize["prompt"] = o.Prompt + toSerialize["voice_provider"] = o.VoiceProvider + toSerialize["voice_name"] = o.VoiceName + if !IsNil(o.InterruptSensitivity) { + toSerialize["interrupt_sensitivity"] = o.InterruptSensitivity + } + if !IsNil(o.ConversationSpeed) { + toSerialize["conversation_speed"] = o.ConversationSpeed + } + if !IsNil(o.FinishedSpeakingSensitivity) { + toSerialize["finished_speaking_sensitivity"] = o.FinishedSpeakingSensitivity + } + toSerialize["model"] = o.Model + if !IsNil(o.LlmTemperature) { + toSerialize["llm_temperature"] = o.LlmTemperature + } + if !IsNil(o.MaxCallDurationInMinutes) { + toSerialize["max_call_duration_in_minutes"] = o.MaxCallDurationInMinutes + } + if !IsNil(o.InitialMessageDelay) { + toSerialize["initial_message_delay"] = o.InitialMessageDelay + } + if !IsNil(o.InitialMessage) { + toSerialize["initial_message"] = o.InitialMessage + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.Deleted) { + toSerialize["deleted"] = o.Deleted + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + if !IsNil(o.LogoUrl) { + toSerialize["logo_url"] = o.LogoUrl + } + return toSerialize, nil +} + +func (o *SimulatorAgent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "prompt", + "voice_provider", + "voice_name", + "model", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSimulatorAgent := _SimulatorAgent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSimulatorAgent) + + if err != nil { + return err + } + + *o = SimulatorAgent(varSimulatorAgent) + + return err +} + +type NullableSimulatorAgent struct { + value *SimulatorAgent + isSet bool +} + +func (v NullableSimulatorAgent) Get() *SimulatorAgent { + return v.value +} + +func (v *NullableSimulatorAgent) Set(val *SimulatorAgent) { + v.value = val + v.isSet = true +} + +func (v NullableSimulatorAgent) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulatorAgent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulatorAgent(val *SimulatorAgent) *NullableSimulatorAgent { + return &NullableSimulatorAgent{value: val, isSet: true} +} + +func (v NullableSimulatorAgent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulatorAgent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_simulator_agent_delete_response.go b/go/futureagi/model_simulator_agent_delete_response.go new file mode 100644 index 0000000..c00aa10 --- /dev/null +++ b/go/futureagi/model_simulator_agent_delete_response.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the SimulatorAgentDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SimulatorAgentDeleteResponse{} + +// SimulatorAgentDeleteResponse struct for SimulatorAgentDeleteResponse +type SimulatorAgentDeleteResponse struct { + Message *string `json:"message,omitempty"` +} + +// NewSimulatorAgentDeleteResponse instantiates a new SimulatorAgentDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSimulatorAgentDeleteResponse() *SimulatorAgentDeleteResponse { + this := SimulatorAgentDeleteResponse{} + return &this +} + +// NewSimulatorAgentDeleteResponseWithDefaults instantiates a new SimulatorAgentDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSimulatorAgentDeleteResponseWithDefaults() *SimulatorAgentDeleteResponse { + this := SimulatorAgentDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *SimulatorAgentDeleteResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgentDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *SimulatorAgentDeleteResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *SimulatorAgentDeleteResponse) SetMessage(v string) { + o.Message = &v +} + +func (o SimulatorAgentDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SimulatorAgentDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableSimulatorAgentDeleteResponse struct { + value *SimulatorAgentDeleteResponse + isSet bool +} + +func (v NullableSimulatorAgentDeleteResponse) Get() *SimulatorAgentDeleteResponse { + return v.value +} + +func (v *NullableSimulatorAgentDeleteResponse) Set(val *SimulatorAgentDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSimulatorAgentDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulatorAgentDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulatorAgentDeleteResponse(val *SimulatorAgentDeleteResponse) *NullableSimulatorAgentDeleteResponse { + return &NullableSimulatorAgentDeleteResponse{value: val, isSet: true} +} + +func (v NullableSimulatorAgentDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulatorAgentDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_simulator_agent_list_response.go b/go/futureagi/model_simulator_agent_list_response.go new file mode 100644 index 0000000..57b78fc --- /dev/null +++ b/go/futureagi/model_simulator_agent_list_response.go @@ -0,0 +1,327 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the SimulatorAgentListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SimulatorAgentListResponse{} + +// SimulatorAgentListResponse struct for SimulatorAgentListResponse +type SimulatorAgentListResponse struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []SimulatorAgent `json:"results,omitempty"` + TotalPages *int32 `json:"total_pages,omitempty"` + CurrentPage *int32 `json:"current_page,omitempty"` +} + +// NewSimulatorAgentListResponse instantiates a new SimulatorAgentListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSimulatorAgentListResponse() *SimulatorAgentListResponse { + this := SimulatorAgentListResponse{} + return &this +} + +// NewSimulatorAgentListResponseWithDefaults instantiates a new SimulatorAgentListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSimulatorAgentListResponseWithDefaults() *SimulatorAgentListResponse { + this := SimulatorAgentListResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *SimulatorAgentListResponse) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgentListResponse) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *SimulatorAgentListResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *SimulatorAgentListResponse) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulatorAgentListResponse) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulatorAgentListResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *SimulatorAgentListResponse) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *SimulatorAgentListResponse) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *SimulatorAgentListResponse) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *SimulatorAgentListResponse) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SimulatorAgentListResponse) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SimulatorAgentListResponse) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *SimulatorAgentListResponse) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *SimulatorAgentListResponse) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *SimulatorAgentListResponse) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *SimulatorAgentListResponse) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *SimulatorAgentListResponse) GetResults() []SimulatorAgent { + if o == nil || IsNil(o.Results) { + var ret []SimulatorAgent + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgentListResponse) GetResultsOk() ([]SimulatorAgent, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *SimulatorAgentListResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []SimulatorAgent and assigns it to the Results field. +func (o *SimulatorAgentListResponse) SetResults(v []SimulatorAgent) { + o.Results = v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *SimulatorAgentListResponse) GetTotalPages() int32 { + if o == nil || IsNil(o.TotalPages) { + var ret int32 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgentListResponse) GetTotalPagesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *SimulatorAgentListResponse) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field. +func (o *SimulatorAgentListResponse) SetTotalPages(v int32) { + o.TotalPages = &v +} + +// GetCurrentPage returns the CurrentPage field value if set, zero value otherwise. +func (o *SimulatorAgentListResponse) GetCurrentPage() int32 { + if o == nil || IsNil(o.CurrentPage) { + var ret int32 + return ret + } + return *o.CurrentPage +} + +// GetCurrentPageOk returns a tuple with the CurrentPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulatorAgentListResponse) GetCurrentPageOk() (*int32, bool) { + if o == nil || IsNil(o.CurrentPage) { + return nil, false + } + return o.CurrentPage, true +} + +// HasCurrentPage returns a boolean if a field has been set. +func (o *SimulatorAgentListResponse) HasCurrentPage() bool { + if o != nil && !IsNil(o.CurrentPage) { + return true + } + + return false +} + +// SetCurrentPage gets a reference to the given int32 and assigns it to the CurrentPage field. +func (o *SimulatorAgentListResponse) SetCurrentPage(v int32) { + o.CurrentPage = &v +} + +func (o SimulatorAgentListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SimulatorAgentListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.CurrentPage) { + toSerialize["current_page"] = o.CurrentPage + } + return toSerialize, nil +} + +type NullableSimulatorAgentListResponse struct { + value *SimulatorAgentListResponse + isSet bool +} + +func (v NullableSimulatorAgentListResponse) Get() *SimulatorAgentListResponse { + return v.value +} + +func (v *NullableSimulatorAgentListResponse) Set(val *SimulatorAgentListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSimulatorAgentListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulatorAgentListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulatorAgentListResponse(val *SimulatorAgentListResponse) *NullableSimulatorAgentListResponse { + return &NullableSimulatorAgentListResponse{value: val, isSet: true} +} + +func (v NullableSimulatorAgentListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulatorAgentListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_start_evals_process_request.go b/go/futureagi/model_start_evals_process_request.go new file mode 100644 index 0000000..26ef602 --- /dev/null +++ b/go/futureagi/model_start_evals_process_request.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the StartEvalsProcessRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StartEvalsProcessRequest{} + +// StartEvalsProcessRequest struct for StartEvalsProcessRequest +type StartEvalsProcessRequest struct { + UserEvalIds []string `json:"user_eval_ids"` + ExperimentId *string `json:"experiment_id,omitempty"` + FailedOnly *bool `json:"failed_only,omitempty"` +} + +type _StartEvalsProcessRequest StartEvalsProcessRequest + +// NewStartEvalsProcessRequest instantiates a new StartEvalsProcessRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStartEvalsProcessRequest(userEvalIds []string) *StartEvalsProcessRequest { + this := StartEvalsProcessRequest{} + this.UserEvalIds = userEvalIds + var failedOnly bool = false + this.FailedOnly = &failedOnly + return &this +} + +// NewStartEvalsProcessRequestWithDefaults instantiates a new StartEvalsProcessRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStartEvalsProcessRequestWithDefaults() *StartEvalsProcessRequest { + this := StartEvalsProcessRequest{} + var failedOnly bool = false + this.FailedOnly = &failedOnly + return &this +} + +// GetUserEvalIds returns the UserEvalIds field value +func (o *StartEvalsProcessRequest) GetUserEvalIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.UserEvalIds +} + +// GetUserEvalIdsOk returns a tuple with the UserEvalIds field value +// and a boolean to check if the value has been set. +func (o *StartEvalsProcessRequest) GetUserEvalIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.UserEvalIds, true +} + +// SetUserEvalIds sets field value +func (o *StartEvalsProcessRequest) SetUserEvalIds(v []string) { + o.UserEvalIds = v +} + +// GetExperimentId returns the ExperimentId field value if set, zero value otherwise. +func (o *StartEvalsProcessRequest) GetExperimentId() string { + if o == nil || IsNil(o.ExperimentId) { + var ret string + return ret + } + return *o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartEvalsProcessRequest) GetExperimentIdOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentId) { + return nil, false + } + return o.ExperimentId, true +} + +// HasExperimentId returns a boolean if a field has been set. +func (o *StartEvalsProcessRequest) HasExperimentId() bool { + if o != nil && !IsNil(o.ExperimentId) { + return true + } + + return false +} + +// SetExperimentId gets a reference to the given string and assigns it to the ExperimentId field. +func (o *StartEvalsProcessRequest) SetExperimentId(v string) { + o.ExperimentId = &v +} + +// GetFailedOnly returns the FailedOnly field value if set, zero value otherwise. +func (o *StartEvalsProcessRequest) GetFailedOnly() bool { + if o == nil || IsNil(o.FailedOnly) { + var ret bool + return ret + } + return *o.FailedOnly +} + +// GetFailedOnlyOk returns a tuple with the FailedOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartEvalsProcessRequest) GetFailedOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.FailedOnly) { + return nil, false + } + return o.FailedOnly, true +} + +// HasFailedOnly returns a boolean if a field has been set. +func (o *StartEvalsProcessRequest) HasFailedOnly() bool { + if o != nil && !IsNil(o.FailedOnly) { + return true + } + + return false +} + +// SetFailedOnly gets a reference to the given bool and assigns it to the FailedOnly field. +func (o *StartEvalsProcessRequest) SetFailedOnly(v bool) { + o.FailedOnly = &v +} + +func (o StartEvalsProcessRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StartEvalsProcessRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_eval_ids"] = o.UserEvalIds + if !IsNil(o.ExperimentId) { + toSerialize["experiment_id"] = o.ExperimentId + } + if !IsNil(o.FailedOnly) { + toSerialize["failed_only"] = o.FailedOnly + } + return toSerialize, nil +} + +func (o *StartEvalsProcessRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_eval_ids", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varStartEvalsProcessRequest := _StartEvalsProcessRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varStartEvalsProcessRequest) + + if err != nil { + return err + } + + *o = StartEvalsProcessRequest(varStartEvalsProcessRequest) + + return err +} + +type NullableStartEvalsProcessRequest struct { + value *StartEvalsProcessRequest + isSet bool +} + +func (v NullableStartEvalsProcessRequest) Get() *StartEvalsProcessRequest { + return v.value +} + +func (v *NullableStartEvalsProcessRequest) Set(val *StartEvalsProcessRequest) { + v.value = val + v.isSet = true +} + +func (v NullableStartEvalsProcessRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableStartEvalsProcessRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStartEvalsProcessRequest(val *StartEvalsProcessRequest) *NullableStartEvalsProcessRequest { + return &NullableStartEvalsProcessRequest{value: val, isSet: true} +} + +func (v NullableStartEvalsProcessRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStartEvalsProcessRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_stop_user_eval_request.go b/go/futureagi/model_stop_user_eval_request.go new file mode 100644 index 0000000..b4a0d81 --- /dev/null +++ b/go/futureagi/model_stop_user_eval_request.go @@ -0,0 +1,125 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the StopUserEvalRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StopUserEvalRequest{} + +// StopUserEvalRequest struct for StopUserEvalRequest +type StopUserEvalRequest struct { + ExperimentId *string `json:"experiment_id,omitempty"` +} + +// NewStopUserEvalRequest instantiates a new StopUserEvalRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStopUserEvalRequest() *StopUserEvalRequest { + this := StopUserEvalRequest{} + return &this +} + +// NewStopUserEvalRequestWithDefaults instantiates a new StopUserEvalRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStopUserEvalRequestWithDefaults() *StopUserEvalRequest { + this := StopUserEvalRequest{} + return &this +} + +// GetExperimentId returns the ExperimentId field value if set, zero value otherwise. +func (o *StopUserEvalRequest) GetExperimentId() string { + if o == nil || IsNil(o.ExperimentId) { + var ret string + return ret + } + return *o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StopUserEvalRequest) GetExperimentIdOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentId) { + return nil, false + } + return o.ExperimentId, true +} + +// HasExperimentId returns a boolean if a field has been set. +func (o *StopUserEvalRequest) HasExperimentId() bool { + if o != nil && !IsNil(o.ExperimentId) { + return true + } + + return false +} + +// SetExperimentId gets a reference to the given string and assigns it to the ExperimentId field. +func (o *StopUserEvalRequest) SetExperimentId(v string) { + o.ExperimentId = &v +} + +func (o StopUserEvalRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StopUserEvalRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExperimentId) { + toSerialize["experiment_id"] = o.ExperimentId + } + return toSerialize, nil +} + +type NullableStopUserEvalRequest struct { + value *StopUserEvalRequest + isSet bool +} + +func (v NullableStopUserEvalRequest) Get() *StopUserEvalRequest { + return v.value +} + +func (v *NullableStopUserEvalRequest) Set(val *StopUserEvalRequest) { + v.value = val + v.isSet = true +} + +func (v NullableStopUserEvalRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableStopUserEvalRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStopUserEvalRequest(val *StopUserEvalRequest) *NullableStopUserEvalRequest { + return &NullableStopUserEvalRequest{value: val, isSet: true} +} + +func (v NullableStopUserEvalRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStopUserEvalRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_submit_annotation_entry.go b/go/futureagi/model_submit_annotation_entry.go new file mode 100644 index 0000000..d8e16ba --- /dev/null +++ b/go/futureagi/model_submit_annotation_entry.go @@ -0,0 +1,221 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SubmitAnnotationEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SubmitAnnotationEntry{} + +// SubmitAnnotationEntry struct for SubmitAnnotationEntry +type SubmitAnnotationEntry struct { + LabelId string `json:"label_id"` + Value map[string]interface{} `json:"value"` + Notes *string `json:"notes,omitempty"` +} + +type _SubmitAnnotationEntry SubmitAnnotationEntry + +// NewSubmitAnnotationEntry instantiates a new SubmitAnnotationEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSubmitAnnotationEntry(labelId string, value map[string]interface{}) *SubmitAnnotationEntry { + this := SubmitAnnotationEntry{} + this.LabelId = labelId + this.Value = value + return &this +} + +// NewSubmitAnnotationEntryWithDefaults instantiates a new SubmitAnnotationEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSubmitAnnotationEntryWithDefaults() *SubmitAnnotationEntry { + this := SubmitAnnotationEntry{} + return &this +} + +// GetLabelId returns the LabelId field value +func (o *SubmitAnnotationEntry) GetLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.LabelId +} + +// GetLabelIdOk returns a tuple with the LabelId field value +// and a boolean to check if the value has been set. +func (o *SubmitAnnotationEntry) GetLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelId, true +} + +// SetLabelId sets field value +func (o *SubmitAnnotationEntry) SetLabelId(v string) { + o.LabelId = v +} + +// GetValue returns the Value field value +func (o *SubmitAnnotationEntry) GetValue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *SubmitAnnotationEntry) GetValueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// SetValue sets field value +func (o *SubmitAnnotationEntry) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *SubmitAnnotationEntry) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubmitAnnotationEntry) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *SubmitAnnotationEntry) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *SubmitAnnotationEntry) SetNotes(v string) { + o.Notes = &v +} + +func (o SubmitAnnotationEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SubmitAnnotationEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label_id"] = o.LabelId + toSerialize["value"] = o.Value + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + return toSerialize, nil +} + +func (o *SubmitAnnotationEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label_id", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSubmitAnnotationEntry := _SubmitAnnotationEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSubmitAnnotationEntry) + + if err != nil { + return err + } + + *o = SubmitAnnotationEntry(varSubmitAnnotationEntry) + + return err +} + +type NullableSubmitAnnotationEntry struct { + value *SubmitAnnotationEntry + isSet bool +} + +func (v NullableSubmitAnnotationEntry) Get() *SubmitAnnotationEntry { + return v.value +} + +func (v *NullableSubmitAnnotationEntry) Set(val *SubmitAnnotationEntry) { + v.value = val + v.isSet = true +} + +func (v NullableSubmitAnnotationEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableSubmitAnnotationEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubmitAnnotationEntry(val *SubmitAnnotationEntry) *NullableSubmitAnnotationEntry { + return &NullableSubmitAnnotationEntry{value: val, isSet: true} +} + +func (v NullableSubmitAnnotationEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubmitAnnotationEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_submit_annotations.go b/go/futureagi/model_submit_annotations.go new file mode 100644 index 0000000..1c9de34 --- /dev/null +++ b/go/futureagi/model_submit_annotations.go @@ -0,0 +1,244 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SubmitAnnotations type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SubmitAnnotations{} + +// SubmitAnnotations struct for SubmitAnnotations +type SubmitAnnotations struct { + Annotations []SubmitAnnotationEntry `json:"annotations"` + Notes *string `json:"notes,omitempty"` + ItemNotes NullableString `json:"item_notes,omitempty"` +} + +type _SubmitAnnotations SubmitAnnotations + +// NewSubmitAnnotations instantiates a new SubmitAnnotations object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSubmitAnnotations(annotations []SubmitAnnotationEntry) *SubmitAnnotations { + this := SubmitAnnotations{} + this.Annotations = annotations + var notes string = "" + this.Notes = ¬es + return &this +} + +// NewSubmitAnnotationsWithDefaults instantiates a new SubmitAnnotations object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSubmitAnnotationsWithDefaults() *SubmitAnnotations { + this := SubmitAnnotations{} + var notes string = "" + this.Notes = ¬es + return &this +} + +// GetAnnotations returns the Annotations field value +func (o *SubmitAnnotations) GetAnnotations() []SubmitAnnotationEntry { + if o == nil { + var ret []SubmitAnnotationEntry + return ret + } + + return o.Annotations +} + +// GetAnnotationsOk returns a tuple with the Annotations field value +// and a boolean to check if the value has been set. +func (o *SubmitAnnotations) GetAnnotationsOk() ([]SubmitAnnotationEntry, bool) { + if o == nil { + return nil, false + } + return o.Annotations, true +} + +// SetAnnotations sets field value +func (o *SubmitAnnotations) SetAnnotations(v []SubmitAnnotationEntry) { + o.Annotations = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *SubmitAnnotations) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubmitAnnotations) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *SubmitAnnotations) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *SubmitAnnotations) SetNotes(v string) { + o.Notes = &v +} + +// GetItemNotes returns the ItemNotes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SubmitAnnotations) GetItemNotes() string { + if o == nil || IsNil(o.ItemNotes.Get()) { + var ret string + return ret + } + return *o.ItemNotes.Get() +} + +// GetItemNotesOk returns a tuple with the ItemNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SubmitAnnotations) GetItemNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ItemNotes.Get(), o.ItemNotes.IsSet() +} + +// HasItemNotes returns a boolean if a field has been set. +func (o *SubmitAnnotations) HasItemNotes() bool { + if o != nil && o.ItemNotes.IsSet() { + return true + } + + return false +} + +// SetItemNotes gets a reference to the given NullableString and assigns it to the ItemNotes field. +func (o *SubmitAnnotations) SetItemNotes(v string) { + o.ItemNotes.Set(&v) +} + +// SetItemNotesNil sets the value for ItemNotes to be an explicit nil +func (o *SubmitAnnotations) SetItemNotesNil() { + o.ItemNotes.Set(nil) +} + +// UnsetItemNotes ensures that no value is present for ItemNotes, not even an explicit nil +func (o *SubmitAnnotations) UnsetItemNotes() { + o.ItemNotes.Unset() +} + +func (o SubmitAnnotations) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SubmitAnnotations) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["annotations"] = o.Annotations + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if o.ItemNotes.IsSet() { + toSerialize["item_notes"] = o.ItemNotes.Get() + } + return toSerialize, nil +} + +func (o *SubmitAnnotations) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "annotations", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSubmitAnnotations := _SubmitAnnotations{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSubmitAnnotations) + + if err != nil { + return err + } + + *o = SubmitAnnotations(varSubmitAnnotations) + + return err +} + +type NullableSubmitAnnotations struct { + value *SubmitAnnotations + isSet bool +} + +func (v NullableSubmitAnnotations) Get() *SubmitAnnotations { + return v.value +} + +func (v *NullableSubmitAnnotations) Set(val *SubmitAnnotations) { + v.value = val + v.isSet = true +} + +func (v NullableSubmitAnnotations) IsSet() bool { + return v.isSet +} + +func (v *NullableSubmitAnnotations) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubmitAnnotations(val *SubmitAnnotations) *NullableSubmitAnnotations { + return &NullableSubmitAnnotations{value: val, isSet: true} +} + +func (v NullableSubmitAnnotations) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubmitAnnotations) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_switch_workspace.go b/go/futureagi/model_switch_workspace.go new file mode 100644 index 0000000..e7d30d3 --- /dev/null +++ b/go/futureagi/model_switch_workspace.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SwitchWorkspace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SwitchWorkspace{} + +// SwitchWorkspace struct for SwitchWorkspace +type SwitchWorkspace struct { + NewWorkspaceId string `json:"new_workspace_id"` +} + +type _SwitchWorkspace SwitchWorkspace + +// NewSwitchWorkspace instantiates a new SwitchWorkspace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSwitchWorkspace(newWorkspaceId string) *SwitchWorkspace { + this := SwitchWorkspace{} + this.NewWorkspaceId = newWorkspaceId + return &this +} + +// NewSwitchWorkspaceWithDefaults instantiates a new SwitchWorkspace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSwitchWorkspaceWithDefaults() *SwitchWorkspace { + this := SwitchWorkspace{} + return &this +} + +// GetNewWorkspaceId returns the NewWorkspaceId field value +func (o *SwitchWorkspace) GetNewWorkspaceId() string { + if o == nil { + var ret string + return ret + } + + return o.NewWorkspaceId +} + +// GetNewWorkspaceIdOk returns a tuple with the NewWorkspaceId field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspace) GetNewWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NewWorkspaceId, true +} + +// SetNewWorkspaceId sets field value +func (o *SwitchWorkspace) SetNewWorkspaceId(v string) { + o.NewWorkspaceId = v +} + +func (o SwitchWorkspace) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SwitchWorkspace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["new_workspace_id"] = o.NewWorkspaceId + return toSerialize, nil +} + +func (o *SwitchWorkspace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "new_workspace_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSwitchWorkspace := _SwitchWorkspace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSwitchWorkspace) + + if err != nil { + return err + } + + *o = SwitchWorkspace(varSwitchWorkspace) + + return err +} + +type NullableSwitchWorkspace struct { + value *SwitchWorkspace + isSet bool +} + +func (v NullableSwitchWorkspace) Get() *SwitchWorkspace { + return v.value +} + +func (v *NullableSwitchWorkspace) Set(val *SwitchWorkspace) { + v.value = val + v.isSet = true +} + +func (v NullableSwitchWorkspace) IsSet() bool { + return v.isSet +} + +func (v *NullableSwitchWorkspace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSwitchWorkspace(val *SwitchWorkspace) *NullableSwitchWorkspace { + return &NullableSwitchWorkspace{value: val, isSet: true} +} + +func (v NullableSwitchWorkspace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSwitchWorkspace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_switch_workspace_response.go b/go/futureagi/model_switch_workspace_response.go new file mode 100644 index 0000000..c6f01db --- /dev/null +++ b/go/futureagi/model_switch_workspace_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SwitchWorkspaceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SwitchWorkspaceResponse{} + +// SwitchWorkspaceResponse struct for SwitchWorkspaceResponse +type SwitchWorkspaceResponse struct { + Status bool `json:"status"` + Result SwitchWorkspaceResult `json:"result"` +} + +type _SwitchWorkspaceResponse SwitchWorkspaceResponse + +// NewSwitchWorkspaceResponse instantiates a new SwitchWorkspaceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSwitchWorkspaceResponse(status bool, result SwitchWorkspaceResult) *SwitchWorkspaceResponse { + this := SwitchWorkspaceResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSwitchWorkspaceResponseWithDefaults instantiates a new SwitchWorkspaceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSwitchWorkspaceResponseWithDefaults() *SwitchWorkspaceResponse { + this := SwitchWorkspaceResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SwitchWorkspaceResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspaceResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SwitchWorkspaceResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SwitchWorkspaceResponse) GetResult() SwitchWorkspaceResult { + if o == nil { + var ret SwitchWorkspaceResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspaceResponse) GetResultOk() (*SwitchWorkspaceResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SwitchWorkspaceResponse) SetResult(v SwitchWorkspaceResult) { + o.Result = v +} + +func (o SwitchWorkspaceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SwitchWorkspaceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SwitchWorkspaceResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSwitchWorkspaceResponse := _SwitchWorkspaceResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSwitchWorkspaceResponse) + + if err != nil { + return err + } + + *o = SwitchWorkspaceResponse(varSwitchWorkspaceResponse) + + return err +} + +type NullableSwitchWorkspaceResponse struct { + value *SwitchWorkspaceResponse + isSet bool +} + +func (v NullableSwitchWorkspaceResponse) Get() *SwitchWorkspaceResponse { + return v.value +} + +func (v *NullableSwitchWorkspaceResponse) Set(val *SwitchWorkspaceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSwitchWorkspaceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSwitchWorkspaceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSwitchWorkspaceResponse(val *SwitchWorkspaceResponse) *NullableSwitchWorkspaceResponse { + return &NullableSwitchWorkspaceResponse{value: val, isSet: true} +} + +func (v NullableSwitchWorkspaceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSwitchWorkspaceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_switch_workspace_result.go b/go/futureagi/model_switch_workspace_result.go new file mode 100644 index 0000000..e54d160 --- /dev/null +++ b/go/futureagi/model_switch_workspace_result.go @@ -0,0 +1,269 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SwitchWorkspaceResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SwitchWorkspaceResult{} + +// SwitchWorkspaceResult struct for SwitchWorkspaceResult +type SwitchWorkspaceResult struct { + Message string `json:"message"` + Workspace WorkspaceSummary `json:"workspace"` + UserRole string `json:"user_role"` + AccessType string `json:"access_type"` + Organization string `json:"organization"` +} + +type _SwitchWorkspaceResult SwitchWorkspaceResult + +// NewSwitchWorkspaceResult instantiates a new SwitchWorkspaceResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSwitchWorkspaceResult(message string, workspace WorkspaceSummary, userRole string, accessType string, organization string) *SwitchWorkspaceResult { + this := SwitchWorkspaceResult{} + this.Message = message + this.Workspace = workspace + this.UserRole = userRole + this.AccessType = accessType + this.Organization = organization + return &this +} + +// NewSwitchWorkspaceResultWithDefaults instantiates a new SwitchWorkspaceResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSwitchWorkspaceResultWithDefaults() *SwitchWorkspaceResult { + this := SwitchWorkspaceResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *SwitchWorkspaceResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspaceResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *SwitchWorkspaceResult) SetMessage(v string) { + o.Message = v +} + +// GetWorkspace returns the Workspace field value +func (o *SwitchWorkspaceResult) GetWorkspace() WorkspaceSummary { + if o == nil { + var ret WorkspaceSummary + return ret + } + + return o.Workspace +} + +// GetWorkspaceOk returns a tuple with the Workspace field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspaceResult) GetWorkspaceOk() (*WorkspaceSummary, bool) { + if o == nil { + return nil, false + } + return &o.Workspace, true +} + +// SetWorkspace sets field value +func (o *SwitchWorkspaceResult) SetWorkspace(v WorkspaceSummary) { + o.Workspace = v +} + +// GetUserRole returns the UserRole field value +func (o *SwitchWorkspaceResult) GetUserRole() string { + if o == nil { + var ret string + return ret + } + + return o.UserRole +} + +// GetUserRoleOk returns a tuple with the UserRole field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspaceResult) GetUserRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserRole, true +} + +// SetUserRole sets field value +func (o *SwitchWorkspaceResult) SetUserRole(v string) { + o.UserRole = v +} + +// GetAccessType returns the AccessType field value +func (o *SwitchWorkspaceResult) GetAccessType() string { + if o == nil { + var ret string + return ret + } + + return o.AccessType +} + +// GetAccessTypeOk returns a tuple with the AccessType field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspaceResult) GetAccessTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessType, true +} + +// SetAccessType sets field value +func (o *SwitchWorkspaceResult) SetAccessType(v string) { + o.AccessType = v +} + +// GetOrganization returns the Organization field value +func (o *SwitchWorkspaceResult) GetOrganization() string { + if o == nil { + var ret string + return ret + } + + return o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value +// and a boolean to check if the value has been set. +func (o *SwitchWorkspaceResult) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Organization, true +} + +// SetOrganization sets field value +func (o *SwitchWorkspaceResult) SetOrganization(v string) { + o.Organization = v +} + +func (o SwitchWorkspaceResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SwitchWorkspaceResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["workspace"] = o.Workspace + toSerialize["user_role"] = o.UserRole + toSerialize["access_type"] = o.AccessType + toSerialize["organization"] = o.Organization + return toSerialize, nil +} + +func (o *SwitchWorkspaceResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "workspace", + "user_role", + "access_type", + "organization", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSwitchWorkspaceResult := _SwitchWorkspaceResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSwitchWorkspaceResult) + + if err != nil { + return err + } + + *o = SwitchWorkspaceResult(varSwitchWorkspaceResult) + + return err +} + +type NullableSwitchWorkspaceResult struct { + value *SwitchWorkspaceResult + isSet bool +} + +func (v NullableSwitchWorkspaceResult) Get() *SwitchWorkspaceResult { + return v.value +} + +func (v *NullableSwitchWorkspaceResult) Set(val *SwitchWorkspaceResult) { + v.value = val + v.isSet = true +} + +func (v NullableSwitchWorkspaceResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSwitchWorkspaceResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSwitchWorkspaceResult(val *SwitchWorkspaceResult) *NullableSwitchWorkspaceResult { + return &NullableSwitchWorkspaceResult{value: val, isSet: true} +} + +func (v NullableSwitchWorkspaceResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSwitchWorkspaceResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_data.go b/go/futureagi/model_synthetic_data.go new file mode 100644 index 0000000..3889985 --- /dev/null +++ b/go/futureagi/model_synthetic_data.go @@ -0,0 +1,289 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticData{} + +// SyntheticData struct for SyntheticData +type SyntheticData struct { + NumRows int32 `json:"num_rows"` + Columns []*string `json:"columns"` + Dataset map[string]interface{} `json:"dataset"` + KbId *string `json:"kb_id,omitempty"` + FillExistingRows *bool `json:"fill_existing_rows,omitempty"` +} + +type _SyntheticData SyntheticData + +// NewSyntheticData instantiates a new SyntheticData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticData(numRows int32, columns []*string, dataset map[string]interface{}) *SyntheticData { + this := SyntheticData{} + this.NumRows = numRows + this.Columns = columns + this.Dataset = dataset + var fillExistingRows bool = false + this.FillExistingRows = &fillExistingRows + return &this +} + +// NewSyntheticDataWithDefaults instantiates a new SyntheticData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDataWithDefaults() *SyntheticData { + this := SyntheticData{} + var fillExistingRows bool = false + this.FillExistingRows = &fillExistingRows + return &this +} + +// GetNumRows returns the NumRows field value +func (o *SyntheticData) GetNumRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value +// and a boolean to check if the value has been set. +func (o *SyntheticData) GetNumRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumRows, true +} + +// SetNumRows sets field value +func (o *SyntheticData) SetNumRows(v int32) { + o.NumRows = v +} + +// GetColumns returns the Columns field value +func (o *SyntheticData) GetColumns() []*string { + if o == nil { + var ret []*string + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *SyntheticData) GetColumnsOk() ([]*string, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *SyntheticData) SetColumns(v []*string) { + o.Columns = v +} + +// GetDataset returns the Dataset field value +func (o *SyntheticData) GetDataset() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *SyntheticData) GetDatasetOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Dataset, true +} + +// SetDataset sets field value +func (o *SyntheticData) SetDataset(v map[string]interface{}) { + o.Dataset = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise. +func (o *SyntheticData) GetKbId() string { + if o == nil || IsNil(o.KbId) { + var ret string + return ret + } + return *o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticData) GetKbIdOk() (*string, bool) { + if o == nil || IsNil(o.KbId) { + return nil, false + } + return o.KbId, true +} + +// HasKbId returns a boolean if a field has been set. +func (o *SyntheticData) HasKbId() bool { + if o != nil && !IsNil(o.KbId) { + return true + } + + return false +} + +// SetKbId gets a reference to the given string and assigns it to the KbId field. +func (o *SyntheticData) SetKbId(v string) { + o.KbId = &v +} + +// GetFillExistingRows returns the FillExistingRows field value if set, zero value otherwise. +func (o *SyntheticData) GetFillExistingRows() bool { + if o == nil || IsNil(o.FillExistingRows) { + var ret bool + return ret + } + return *o.FillExistingRows +} + +// GetFillExistingRowsOk returns a tuple with the FillExistingRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticData) GetFillExistingRowsOk() (*bool, bool) { + if o == nil || IsNil(o.FillExistingRows) { + return nil, false + } + return o.FillExistingRows, true +} + +// HasFillExistingRows returns a boolean if a field has been set. +func (o *SyntheticData) HasFillExistingRows() bool { + if o != nil && !IsNil(o.FillExistingRows) { + return true + } + + return false +} + +// SetFillExistingRows gets a reference to the given bool and assigns it to the FillExistingRows field. +func (o *SyntheticData) SetFillExistingRows(v bool) { + o.FillExistingRows = &v +} + +func (o SyntheticData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["num_rows"] = o.NumRows + toSerialize["columns"] = o.Columns + toSerialize["dataset"] = o.Dataset + if !IsNil(o.KbId) { + toSerialize["kb_id"] = o.KbId + } + if !IsNil(o.FillExistingRows) { + toSerialize["fill_existing_rows"] = o.FillExistingRows + } + return toSerialize, nil +} + +func (o *SyntheticData) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "num_rows", + "columns", + "dataset", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticData := _SyntheticData{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticData) + + if err != nil { + return err + } + + *o = SyntheticData(varSyntheticData) + + return err +} + +type NullableSyntheticData struct { + value *SyntheticData + isSet bool +} + +func (v NullableSyntheticData) Get() *SyntheticData { + return v.value +} + +func (v *NullableSyntheticData) Set(val *SyntheticData) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticData) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticData(val *SyntheticData) *NullableSyntheticData { + return &NullableSyntheticData{value: val, isSet: true} +} + +func (v NullableSyntheticData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_config.go b/go/futureagi/model_synthetic_dataset_config.go new file mode 100644 index 0000000..07866c9 --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_config.go @@ -0,0 +1,300 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetConfig{} + +// SyntheticDatasetConfig struct for SyntheticDatasetConfig +type SyntheticDatasetConfig struct { + NumRows int32 `json:"num_rows"` + Columns []*string `json:"columns"` + Dataset map[string]interface{} `json:"dataset"` + KbId NullableString `json:"kb_id,omitempty"` + Regenerate *bool `json:"regenerate,omitempty"` +} + +type _SyntheticDatasetConfig SyntheticDatasetConfig + +// NewSyntheticDatasetConfig instantiates a new SyntheticDatasetConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetConfig(numRows int32, columns []*string, dataset map[string]interface{}) *SyntheticDatasetConfig { + this := SyntheticDatasetConfig{} + this.NumRows = numRows + this.Columns = columns + this.Dataset = dataset + var regenerate bool = false + this.Regenerate = ®enerate + return &this +} + +// NewSyntheticDatasetConfigWithDefaults instantiates a new SyntheticDatasetConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetConfigWithDefaults() *SyntheticDatasetConfig { + this := SyntheticDatasetConfig{} + var regenerate bool = false + this.Regenerate = ®enerate + return &this +} + +// GetNumRows returns the NumRows field value +func (o *SyntheticDatasetConfig) GetNumRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfig) GetNumRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumRows, true +} + +// SetNumRows sets field value +func (o *SyntheticDatasetConfig) SetNumRows(v int32) { + o.NumRows = v +} + +// GetColumns returns the Columns field value +func (o *SyntheticDatasetConfig) GetColumns() []*string { + if o == nil { + var ret []*string + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfig) GetColumnsOk() ([]*string, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *SyntheticDatasetConfig) SetColumns(v []*string) { + o.Columns = v +} + +// GetDataset returns the Dataset field value +func (o *SyntheticDatasetConfig) GetDataset() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfig) GetDatasetOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Dataset, true +} + +// SetDataset sets field value +func (o *SyntheticDatasetConfig) SetDataset(v map[string]interface{}) { + o.Dataset = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SyntheticDatasetConfig) GetKbId() string { + if o == nil || IsNil(o.KbId.Get()) { + var ret string + return ret + } + return *o.KbId.Get() +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SyntheticDatasetConfig) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KbId.Get(), o.KbId.IsSet() +} + +// HasKbId returns a boolean if a field has been set. +func (o *SyntheticDatasetConfig) HasKbId() bool { + if o != nil && o.KbId.IsSet() { + return true + } + + return false +} + +// SetKbId gets a reference to the given NullableString and assigns it to the KbId field. +func (o *SyntheticDatasetConfig) SetKbId(v string) { + o.KbId.Set(&v) +} + +// SetKbIdNil sets the value for KbId to be an explicit nil +func (o *SyntheticDatasetConfig) SetKbIdNil() { + o.KbId.Set(nil) +} + +// UnsetKbId ensures that no value is present for KbId, not even an explicit nil +func (o *SyntheticDatasetConfig) UnsetKbId() { + o.KbId.Unset() +} + +// GetRegenerate returns the Regenerate field value if set, zero value otherwise. +func (o *SyntheticDatasetConfig) GetRegenerate() bool { + if o == nil || IsNil(o.Regenerate) { + var ret bool + return ret + } + return *o.Regenerate +} + +// GetRegenerateOk returns a tuple with the Regenerate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfig) GetRegenerateOk() (*bool, bool) { + if o == nil || IsNil(o.Regenerate) { + return nil, false + } + return o.Regenerate, true +} + +// HasRegenerate returns a boolean if a field has been set. +func (o *SyntheticDatasetConfig) HasRegenerate() bool { + if o != nil && !IsNil(o.Regenerate) { + return true + } + + return false +} + +// SetRegenerate gets a reference to the given bool and assigns it to the Regenerate field. +func (o *SyntheticDatasetConfig) SetRegenerate(v bool) { + o.Regenerate = &v +} + +func (o SyntheticDatasetConfig) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["num_rows"] = o.NumRows + toSerialize["columns"] = o.Columns + toSerialize["dataset"] = o.Dataset + if o.KbId.IsSet() { + toSerialize["kb_id"] = o.KbId.Get() + } + if !IsNil(o.Regenerate) { + toSerialize["regenerate"] = o.Regenerate + } + return toSerialize, nil +} + +func (o *SyntheticDatasetConfig) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "num_rows", + "columns", + "dataset", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetConfig := _SyntheticDatasetConfig{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetConfig) + + if err != nil { + return err + } + + *o = SyntheticDatasetConfig(varSyntheticDatasetConfig) + + return err +} + +type NullableSyntheticDatasetConfig struct { + value *SyntheticDatasetConfig + isSet bool +} + +func (v NullableSyntheticDatasetConfig) Get() *SyntheticDatasetConfig { + return v.value +} + +func (v *NullableSyntheticDatasetConfig) Set(val *SyntheticDatasetConfig) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetConfig(val *SyntheticDatasetConfig) *NullableSyntheticDatasetConfig { + return &NullableSyntheticDatasetConfig{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_config_payload.go b/go/futureagi/model_synthetic_dataset_config_payload.go new file mode 100644 index 0000000..2f2c308 --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_config_payload.go @@ -0,0 +1,244 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the SyntheticDatasetConfigPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetConfigPayload{} + +// SyntheticDatasetConfigPayload struct for SyntheticDatasetConfigPayload +type SyntheticDatasetConfigPayload struct { + NumRows *int32 `json:"num_rows,omitempty"` + Columns []map[string]interface{} `json:"columns,omitempty"` + Dataset map[string]interface{} `json:"dataset,omitempty"` + KbId NullableString `json:"kb_id,omitempty"` +} + +// NewSyntheticDatasetConfigPayload instantiates a new SyntheticDatasetConfigPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetConfigPayload() *SyntheticDatasetConfigPayload { + this := SyntheticDatasetConfigPayload{} + return &this +} + +// NewSyntheticDatasetConfigPayloadWithDefaults instantiates a new SyntheticDatasetConfigPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetConfigPayloadWithDefaults() *SyntheticDatasetConfigPayload { + this := SyntheticDatasetConfigPayload{} + return &this +} + +// GetNumRows returns the NumRows field value if set, zero value otherwise. +func (o *SyntheticDatasetConfigPayload) GetNumRows() int32 { + if o == nil || IsNil(o.NumRows) { + var ret int32 + return ret + } + return *o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfigPayload) GetNumRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NumRows) { + return nil, false + } + return o.NumRows, true +} + +// HasNumRows returns a boolean if a field has been set. +func (o *SyntheticDatasetConfigPayload) HasNumRows() bool { + if o != nil && !IsNil(o.NumRows) { + return true + } + + return false +} + +// SetNumRows gets a reference to the given int32 and assigns it to the NumRows field. +func (o *SyntheticDatasetConfigPayload) SetNumRows(v int32) { + o.NumRows = &v +} + +// GetColumns returns the Columns field value if set, zero value otherwise. +func (o *SyntheticDatasetConfigPayload) GetColumns() []map[string]interface{} { + if o == nil || IsNil(o.Columns) { + var ret []map[string]interface{} + return ret + } + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfigPayload) GetColumnsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Columns) { + return nil, false + } + return o.Columns, true +} + +// HasColumns returns a boolean if a field has been set. +func (o *SyntheticDatasetConfigPayload) HasColumns() bool { + if o != nil && !IsNil(o.Columns) { + return true + } + + return false +} + +// SetColumns gets a reference to the given []map[string]interface{} and assigns it to the Columns field. +func (o *SyntheticDatasetConfigPayload) SetColumns(v []map[string]interface{}) { + o.Columns = v +} + +// GetDataset returns the Dataset field value if set, zero value otherwise. +func (o *SyntheticDatasetConfigPayload) GetDataset() map[string]interface{} { + if o == nil || IsNil(o.Dataset) { + var ret map[string]interface{} + return ret + } + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfigPayload) GetDatasetOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Dataset) { + return map[string]interface{}{}, false + } + return o.Dataset, true +} + +// HasDataset returns a boolean if a field has been set. +func (o *SyntheticDatasetConfigPayload) HasDataset() bool { + if o != nil && !IsNil(o.Dataset) { + return true + } + + return false +} + +// SetDataset gets a reference to the given map[string]interface{} and assigns it to the Dataset field. +func (o *SyntheticDatasetConfigPayload) SetDataset(v map[string]interface{}) { + o.Dataset = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SyntheticDatasetConfigPayload) GetKbId() string { + if o == nil || IsNil(o.KbId.Get()) { + var ret string + return ret + } + return *o.KbId.Get() +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SyntheticDatasetConfigPayload) GetKbIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KbId.Get(), o.KbId.IsSet() +} + +// HasKbId returns a boolean if a field has been set. +func (o *SyntheticDatasetConfigPayload) HasKbId() bool { + if o != nil && o.KbId.IsSet() { + return true + } + + return false +} + +// SetKbId gets a reference to the given NullableString and assigns it to the KbId field. +func (o *SyntheticDatasetConfigPayload) SetKbId(v string) { + o.KbId.Set(&v) +} + +// SetKbIdNil sets the value for KbId to be an explicit nil +func (o *SyntheticDatasetConfigPayload) SetKbIdNil() { + o.KbId.Set(nil) +} + +// UnsetKbId ensures that no value is present for KbId, not even an explicit nil +func (o *SyntheticDatasetConfigPayload) UnsetKbId() { + o.KbId.Unset() +} + +func (o SyntheticDatasetConfigPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetConfigPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NumRows) { + toSerialize["num_rows"] = o.NumRows + } + if !IsNil(o.Columns) { + toSerialize["columns"] = o.Columns + } + if !IsNil(o.Dataset) { + toSerialize["dataset"] = o.Dataset + } + if o.KbId.IsSet() { + toSerialize["kb_id"] = o.KbId.Get() + } + return toSerialize, nil +} + +type NullableSyntheticDatasetConfigPayload struct { + value *SyntheticDatasetConfigPayload + isSet bool +} + +func (v NullableSyntheticDatasetConfigPayload) Get() *SyntheticDatasetConfigPayload { + return v.value +} + +func (v *NullableSyntheticDatasetConfigPayload) Set(val *SyntheticDatasetConfigPayload) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetConfigPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetConfigPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetConfigPayload(val *SyntheticDatasetConfigPayload) *NullableSyntheticDatasetConfigPayload { + return &NullableSyntheticDatasetConfigPayload{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetConfigPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetConfigPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_config_response.go b/go/futureagi/model_synthetic_dataset_config_response.go new file mode 100644 index 0000000..c181130 --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_config_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetConfigResponse{} + +// SyntheticDatasetConfigResponse struct for SyntheticDatasetConfigResponse +type SyntheticDatasetConfigResponse struct { + Status bool `json:"status"` + Result SyntheticDatasetConfigResult `json:"result"` +} + +type _SyntheticDatasetConfigResponse SyntheticDatasetConfigResponse + +// NewSyntheticDatasetConfigResponse instantiates a new SyntheticDatasetConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetConfigResponse(status bool, result SyntheticDatasetConfigResult) *SyntheticDatasetConfigResponse { + this := SyntheticDatasetConfigResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSyntheticDatasetConfigResponseWithDefaults instantiates a new SyntheticDatasetConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetConfigResponseWithDefaults() *SyntheticDatasetConfigResponse { + this := SyntheticDatasetConfigResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SyntheticDatasetConfigResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfigResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SyntheticDatasetConfigResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SyntheticDatasetConfigResponse) GetResult() SyntheticDatasetConfigResult { + if o == nil { + var ret SyntheticDatasetConfigResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfigResponse) GetResultOk() (*SyntheticDatasetConfigResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SyntheticDatasetConfigResponse) SetResult(v SyntheticDatasetConfigResult) { + o.Result = v +} + +func (o SyntheticDatasetConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SyntheticDatasetConfigResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetConfigResponse := _SyntheticDatasetConfigResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetConfigResponse) + + if err != nil { + return err + } + + *o = SyntheticDatasetConfigResponse(varSyntheticDatasetConfigResponse) + + return err +} + +type NullableSyntheticDatasetConfigResponse struct { + value *SyntheticDatasetConfigResponse + isSet bool +} + +func (v NullableSyntheticDatasetConfigResponse) Get() *SyntheticDatasetConfigResponse { + return v.value +} + +func (v *NullableSyntheticDatasetConfigResponse) Set(val *SyntheticDatasetConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetConfigResponse(val *SyntheticDatasetConfigResponse) *NullableSyntheticDatasetConfigResponse { + return &NullableSyntheticDatasetConfigResponse{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_config_result.go b/go/futureagi/model_synthetic_dataset_config_result.go new file mode 100644 index 0000000..eb27c80 --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_config_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetConfigResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetConfigResult{} + +// SyntheticDatasetConfigResult struct for SyntheticDatasetConfigResult +type SyntheticDatasetConfigResult struct { + Message string `json:"message"` + Data SyntheticDatasetConfigPayload `json:"data"` +} + +type _SyntheticDatasetConfigResult SyntheticDatasetConfigResult + +// NewSyntheticDatasetConfigResult instantiates a new SyntheticDatasetConfigResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetConfigResult(message string, data SyntheticDatasetConfigPayload) *SyntheticDatasetConfigResult { + this := SyntheticDatasetConfigResult{} + this.Message = message + this.Data = data + return &this +} + +// NewSyntheticDatasetConfigResultWithDefaults instantiates a new SyntheticDatasetConfigResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetConfigResultWithDefaults() *SyntheticDatasetConfigResult { + this := SyntheticDatasetConfigResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *SyntheticDatasetConfigResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfigResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *SyntheticDatasetConfigResult) SetMessage(v string) { + o.Message = v +} + +// GetData returns the Data field value +func (o *SyntheticDatasetConfigResult) GetData() SyntheticDatasetConfigPayload { + if o == nil { + var ret SyntheticDatasetConfigPayload + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetConfigResult) GetDataOk() (*SyntheticDatasetConfigPayload, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SyntheticDatasetConfigResult) SetData(v SyntheticDatasetConfigPayload) { + o.Data = v +} + +func (o SyntheticDatasetConfigResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetConfigResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *SyntheticDatasetConfigResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetConfigResult := _SyntheticDatasetConfigResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetConfigResult) + + if err != nil { + return err + } + + *o = SyntheticDatasetConfigResult(varSyntheticDatasetConfigResult) + + return err +} + +type NullableSyntheticDatasetConfigResult struct { + value *SyntheticDatasetConfigResult + isSet bool +} + +func (v NullableSyntheticDatasetConfigResult) Get() *SyntheticDatasetConfigResult { + return v.value +} + +func (v *NullableSyntheticDatasetConfigResult) Set(val *SyntheticDatasetConfigResult) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetConfigResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetConfigResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetConfigResult(val *SyntheticDatasetConfigResult) *NullableSyntheticDatasetConfigResult { + return &NullableSyntheticDatasetConfigResult{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetConfigResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetConfigResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_create_started_response.go b/go/futureagi/model_synthetic_dataset_create_started_response.go new file mode 100644 index 0000000..c361228 --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_create_started_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetCreateStartedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetCreateStartedResponse{} + +// SyntheticDatasetCreateStartedResponse struct for SyntheticDatasetCreateStartedResponse +type SyntheticDatasetCreateStartedResponse struct { + Status bool `json:"status"` + Result SyntheticDatasetCreateStartedResult `json:"result"` +} + +type _SyntheticDatasetCreateStartedResponse SyntheticDatasetCreateStartedResponse + +// NewSyntheticDatasetCreateStartedResponse instantiates a new SyntheticDatasetCreateStartedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetCreateStartedResponse(status bool, result SyntheticDatasetCreateStartedResult) *SyntheticDatasetCreateStartedResponse { + this := SyntheticDatasetCreateStartedResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSyntheticDatasetCreateStartedResponseWithDefaults instantiates a new SyntheticDatasetCreateStartedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetCreateStartedResponseWithDefaults() *SyntheticDatasetCreateStartedResponse { + this := SyntheticDatasetCreateStartedResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SyntheticDatasetCreateStartedResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreateStartedResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SyntheticDatasetCreateStartedResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SyntheticDatasetCreateStartedResponse) GetResult() SyntheticDatasetCreateStartedResult { + if o == nil { + var ret SyntheticDatasetCreateStartedResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreateStartedResponse) GetResultOk() (*SyntheticDatasetCreateStartedResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SyntheticDatasetCreateStartedResponse) SetResult(v SyntheticDatasetCreateStartedResult) { + o.Result = v +} + +func (o SyntheticDatasetCreateStartedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetCreateStartedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SyntheticDatasetCreateStartedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetCreateStartedResponse := _SyntheticDatasetCreateStartedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetCreateStartedResponse) + + if err != nil { + return err + } + + *o = SyntheticDatasetCreateStartedResponse(varSyntheticDatasetCreateStartedResponse) + + return err +} + +type NullableSyntheticDatasetCreateStartedResponse struct { + value *SyntheticDatasetCreateStartedResponse + isSet bool +} + +func (v NullableSyntheticDatasetCreateStartedResponse) Get() *SyntheticDatasetCreateStartedResponse { + return v.value +} + +func (v *NullableSyntheticDatasetCreateStartedResponse) Set(val *SyntheticDatasetCreateStartedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetCreateStartedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetCreateStartedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetCreateStartedResponse(val *SyntheticDatasetCreateStartedResponse) *NullableSyntheticDatasetCreateStartedResponse { + return &NullableSyntheticDatasetCreateStartedResponse{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetCreateStartedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetCreateStartedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_create_started_result.go b/go/futureagi/model_synthetic_dataset_create_started_result.go new file mode 100644 index 0000000..9a600bc --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_create_started_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetCreateStartedResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetCreateStartedResult{} + +// SyntheticDatasetCreateStartedResult struct for SyntheticDatasetCreateStartedResult +type SyntheticDatasetCreateStartedResult struct { + Message string `json:"message"` + Data Dataset `json:"data"` +} + +type _SyntheticDatasetCreateStartedResult SyntheticDatasetCreateStartedResult + +// NewSyntheticDatasetCreateStartedResult instantiates a new SyntheticDatasetCreateStartedResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetCreateStartedResult(message string, data Dataset) *SyntheticDatasetCreateStartedResult { + this := SyntheticDatasetCreateStartedResult{} + this.Message = message + this.Data = data + return &this +} + +// NewSyntheticDatasetCreateStartedResultWithDefaults instantiates a new SyntheticDatasetCreateStartedResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetCreateStartedResultWithDefaults() *SyntheticDatasetCreateStartedResult { + this := SyntheticDatasetCreateStartedResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *SyntheticDatasetCreateStartedResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreateStartedResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *SyntheticDatasetCreateStartedResult) SetMessage(v string) { + o.Message = v +} + +// GetData returns the Data field value +func (o *SyntheticDatasetCreateStartedResult) GetData() Dataset { + if o == nil { + var ret Dataset + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreateStartedResult) GetDataOk() (*Dataset, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SyntheticDatasetCreateStartedResult) SetData(v Dataset) { + o.Data = v +} + +func (o SyntheticDatasetCreateStartedResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetCreateStartedResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *SyntheticDatasetCreateStartedResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetCreateStartedResult := _SyntheticDatasetCreateStartedResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetCreateStartedResult) + + if err != nil { + return err + } + + *o = SyntheticDatasetCreateStartedResult(varSyntheticDatasetCreateStartedResult) + + return err +} + +type NullableSyntheticDatasetCreateStartedResult struct { + value *SyntheticDatasetCreateStartedResult + isSet bool +} + +func (v NullableSyntheticDatasetCreateStartedResult) Get() *SyntheticDatasetCreateStartedResult { + return v.value +} + +func (v *NullableSyntheticDatasetCreateStartedResult) Set(val *SyntheticDatasetCreateStartedResult) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetCreateStartedResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetCreateStartedResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetCreateStartedResult(val *SyntheticDatasetCreateStartedResult) *NullableSyntheticDatasetCreateStartedResult { + return &NullableSyntheticDatasetCreateStartedResult{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetCreateStartedResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetCreateStartedResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_creation.go b/go/futureagi/model_synthetic_dataset_creation.go new file mode 100644 index 0000000..ea0bc0a --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_creation.go @@ -0,0 +1,249 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetCreation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetCreation{} + +// SyntheticDatasetCreation struct for SyntheticDatasetCreation +type SyntheticDatasetCreation struct { + NumRows int32 `json:"num_rows"` + Columns []*string `json:"columns"` + Dataset map[string]interface{} `json:"dataset"` + KbId *string `json:"kb_id,omitempty"` +} + +type _SyntheticDatasetCreation SyntheticDatasetCreation + +// NewSyntheticDatasetCreation instantiates a new SyntheticDatasetCreation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetCreation(numRows int32, columns []*string, dataset map[string]interface{}) *SyntheticDatasetCreation { + this := SyntheticDatasetCreation{} + this.NumRows = numRows + this.Columns = columns + this.Dataset = dataset + return &this +} + +// NewSyntheticDatasetCreationWithDefaults instantiates a new SyntheticDatasetCreation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetCreationWithDefaults() *SyntheticDatasetCreation { + this := SyntheticDatasetCreation{} + return &this +} + +// GetNumRows returns the NumRows field value +func (o *SyntheticDatasetCreation) GetNumRows() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreation) GetNumRowsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumRows, true +} + +// SetNumRows sets field value +func (o *SyntheticDatasetCreation) SetNumRows(v int32) { + o.NumRows = v +} + +// GetColumns returns the Columns field value +func (o *SyntheticDatasetCreation) GetColumns() []*string { + if o == nil { + var ret []*string + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreation) GetColumnsOk() ([]*string, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *SyntheticDatasetCreation) SetColumns(v []*string) { + o.Columns = v +} + +// GetDataset returns the Dataset field value +func (o *SyntheticDatasetCreation) GetDataset() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreation) GetDatasetOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Dataset, true +} + +// SetDataset sets field value +func (o *SyntheticDatasetCreation) SetDataset(v map[string]interface{}) { + o.Dataset = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise. +func (o *SyntheticDatasetCreation) GetKbId() string { + if o == nil || IsNil(o.KbId) { + var ret string + return ret + } + return *o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetCreation) GetKbIdOk() (*string, bool) { + if o == nil || IsNil(o.KbId) { + return nil, false + } + return o.KbId, true +} + +// HasKbId returns a boolean if a field has been set. +func (o *SyntheticDatasetCreation) HasKbId() bool { + if o != nil && !IsNil(o.KbId) { + return true + } + + return false +} + +// SetKbId gets a reference to the given string and assigns it to the KbId field. +func (o *SyntheticDatasetCreation) SetKbId(v string) { + o.KbId = &v +} + +func (o SyntheticDatasetCreation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetCreation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["num_rows"] = o.NumRows + toSerialize["columns"] = o.Columns + toSerialize["dataset"] = o.Dataset + if !IsNil(o.KbId) { + toSerialize["kb_id"] = o.KbId + } + return toSerialize, nil +} + +func (o *SyntheticDatasetCreation) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "num_rows", + "columns", + "dataset", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetCreation := _SyntheticDatasetCreation{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetCreation) + + if err != nil { + return err + } + + *o = SyntheticDatasetCreation(varSyntheticDatasetCreation) + + return err +} + +type NullableSyntheticDatasetCreation struct { + value *SyntheticDatasetCreation + isSet bool +} + +func (v NullableSyntheticDatasetCreation) Get() *SyntheticDatasetCreation { + return v.value +} + +func (v *NullableSyntheticDatasetCreation) Set(val *SyntheticDatasetCreation) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetCreation) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetCreation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetCreation(val *SyntheticDatasetCreation) *NullableSyntheticDatasetCreation { + return &NullableSyntheticDatasetCreation{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetCreation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetCreation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_update_data.go b/go/futureagi/model_synthetic_dataset_update_data.go new file mode 100644 index 0000000..9c75670 --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_update_data.go @@ -0,0 +1,257 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetUpdateData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetUpdateData{} + +// SyntheticDatasetUpdateData struct for SyntheticDatasetUpdateData +type SyntheticDatasetUpdateData struct { + DatasetId string `json:"dataset_id"` + DatasetName string `json:"dataset_name"` + NumRows *int32 `json:"num_rows,omitempty"` + NumColumns *int32 `json:"num_columns,omitempty"` +} + +type _SyntheticDatasetUpdateData SyntheticDatasetUpdateData + +// NewSyntheticDatasetUpdateData instantiates a new SyntheticDatasetUpdateData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetUpdateData(datasetId string, datasetName string) *SyntheticDatasetUpdateData { + this := SyntheticDatasetUpdateData{} + this.DatasetId = datasetId + this.DatasetName = datasetName + return &this +} + +// NewSyntheticDatasetUpdateDataWithDefaults instantiates a new SyntheticDatasetUpdateData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetUpdateDataWithDefaults() *SyntheticDatasetUpdateData { + this := SyntheticDatasetUpdateData{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *SyntheticDatasetUpdateData) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateData) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *SyntheticDatasetUpdateData) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetDatasetName returns the DatasetName field value +func (o *SyntheticDatasetUpdateData) GetDatasetName() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetName +} + +// GetDatasetNameOk returns a tuple with the DatasetName field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateData) GetDatasetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetName, true +} + +// SetDatasetName sets field value +func (o *SyntheticDatasetUpdateData) SetDatasetName(v string) { + o.DatasetName = v +} + +// GetNumRows returns the NumRows field value if set, zero value otherwise. +func (o *SyntheticDatasetUpdateData) GetNumRows() int32 { + if o == nil || IsNil(o.NumRows) { + var ret int32 + return ret + } + return *o.NumRows +} + +// GetNumRowsOk returns a tuple with the NumRows field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateData) GetNumRowsOk() (*int32, bool) { + if o == nil || IsNil(o.NumRows) { + return nil, false + } + return o.NumRows, true +} + +// HasNumRows returns a boolean if a field has been set. +func (o *SyntheticDatasetUpdateData) HasNumRows() bool { + if o != nil && !IsNil(o.NumRows) { + return true + } + + return false +} + +// SetNumRows gets a reference to the given int32 and assigns it to the NumRows field. +func (o *SyntheticDatasetUpdateData) SetNumRows(v int32) { + o.NumRows = &v +} + +// GetNumColumns returns the NumColumns field value if set, zero value otherwise. +func (o *SyntheticDatasetUpdateData) GetNumColumns() int32 { + if o == nil || IsNil(o.NumColumns) { + var ret int32 + return ret + } + return *o.NumColumns +} + +// GetNumColumnsOk returns a tuple with the NumColumns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateData) GetNumColumnsOk() (*int32, bool) { + if o == nil || IsNil(o.NumColumns) { + return nil, false + } + return o.NumColumns, true +} + +// HasNumColumns returns a boolean if a field has been set. +func (o *SyntheticDatasetUpdateData) HasNumColumns() bool { + if o != nil && !IsNil(o.NumColumns) { + return true + } + + return false +} + +// SetNumColumns gets a reference to the given int32 and assigns it to the NumColumns field. +func (o *SyntheticDatasetUpdateData) SetNumColumns(v int32) { + o.NumColumns = &v +} + +func (o SyntheticDatasetUpdateData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetUpdateData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["dataset_name"] = o.DatasetName + if !IsNil(o.NumRows) { + toSerialize["num_rows"] = o.NumRows + } + if !IsNil(o.NumColumns) { + toSerialize["num_columns"] = o.NumColumns + } + return toSerialize, nil +} + +func (o *SyntheticDatasetUpdateData) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "dataset_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetUpdateData := _SyntheticDatasetUpdateData{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetUpdateData) + + if err != nil { + return err + } + + *o = SyntheticDatasetUpdateData(varSyntheticDatasetUpdateData) + + return err +} + +type NullableSyntheticDatasetUpdateData struct { + value *SyntheticDatasetUpdateData + isSet bool +} + +func (v NullableSyntheticDatasetUpdateData) Get() *SyntheticDatasetUpdateData { + return v.value +} + +func (v *NullableSyntheticDatasetUpdateData) Set(val *SyntheticDatasetUpdateData) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetUpdateData) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetUpdateData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetUpdateData(val *SyntheticDatasetUpdateData) *NullableSyntheticDatasetUpdateData { + return &NullableSyntheticDatasetUpdateData{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetUpdateData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetUpdateData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_update_response.go b/go/futureagi/model_synthetic_dataset_update_response.go new file mode 100644 index 0000000..795d9bb --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_update_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetUpdateResponse{} + +// SyntheticDatasetUpdateResponse struct for SyntheticDatasetUpdateResponse +type SyntheticDatasetUpdateResponse struct { + Status bool `json:"status"` + Result SyntheticDatasetUpdateResult `json:"result"` +} + +type _SyntheticDatasetUpdateResponse SyntheticDatasetUpdateResponse + +// NewSyntheticDatasetUpdateResponse instantiates a new SyntheticDatasetUpdateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetUpdateResponse(status bool, result SyntheticDatasetUpdateResult) *SyntheticDatasetUpdateResponse { + this := SyntheticDatasetUpdateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewSyntheticDatasetUpdateResponseWithDefaults instantiates a new SyntheticDatasetUpdateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetUpdateResponseWithDefaults() *SyntheticDatasetUpdateResponse { + this := SyntheticDatasetUpdateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *SyntheticDatasetUpdateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SyntheticDatasetUpdateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *SyntheticDatasetUpdateResponse) GetResult() SyntheticDatasetUpdateResult { + if o == nil { + var ret SyntheticDatasetUpdateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateResponse) GetResultOk() (*SyntheticDatasetUpdateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *SyntheticDatasetUpdateResponse) SetResult(v SyntheticDatasetUpdateResult) { + o.Result = v +} + +func (o SyntheticDatasetUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetUpdateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *SyntheticDatasetUpdateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetUpdateResponse := _SyntheticDatasetUpdateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetUpdateResponse) + + if err != nil { + return err + } + + *o = SyntheticDatasetUpdateResponse(varSyntheticDatasetUpdateResponse) + + return err +} + +type NullableSyntheticDatasetUpdateResponse struct { + value *SyntheticDatasetUpdateResponse + isSet bool +} + +func (v NullableSyntheticDatasetUpdateResponse) Get() *SyntheticDatasetUpdateResponse { + return v.value +} + +func (v *NullableSyntheticDatasetUpdateResponse) Set(val *SyntheticDatasetUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetUpdateResponse(val *SyntheticDatasetUpdateResponse) *NullableSyntheticDatasetUpdateResponse { + return &NullableSyntheticDatasetUpdateResponse{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_synthetic_dataset_update_result.go b/go/futureagi/model_synthetic_dataset_update_result.go new file mode 100644 index 0000000..2f4c657 --- /dev/null +++ b/go/futureagi/model_synthetic_dataset_update_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SyntheticDatasetUpdateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SyntheticDatasetUpdateResult{} + +// SyntheticDatasetUpdateResult struct for SyntheticDatasetUpdateResult +type SyntheticDatasetUpdateResult struct { + Message string `json:"message"` + Data SyntheticDatasetUpdateData `json:"data"` +} + +type _SyntheticDatasetUpdateResult SyntheticDatasetUpdateResult + +// NewSyntheticDatasetUpdateResult instantiates a new SyntheticDatasetUpdateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSyntheticDatasetUpdateResult(message string, data SyntheticDatasetUpdateData) *SyntheticDatasetUpdateResult { + this := SyntheticDatasetUpdateResult{} + this.Message = message + this.Data = data + return &this +} + +// NewSyntheticDatasetUpdateResultWithDefaults instantiates a new SyntheticDatasetUpdateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSyntheticDatasetUpdateResultWithDefaults() *SyntheticDatasetUpdateResult { + this := SyntheticDatasetUpdateResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *SyntheticDatasetUpdateResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *SyntheticDatasetUpdateResult) SetMessage(v string) { + o.Message = v +} + +// GetData returns the Data field value +func (o *SyntheticDatasetUpdateResult) GetData() SyntheticDatasetUpdateData { + if o == nil { + var ret SyntheticDatasetUpdateData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SyntheticDatasetUpdateResult) GetDataOk() (*SyntheticDatasetUpdateData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SyntheticDatasetUpdateResult) SetData(v SyntheticDatasetUpdateData) { + o.Data = v +} + +func (o SyntheticDatasetUpdateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SyntheticDatasetUpdateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *SyntheticDatasetUpdateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSyntheticDatasetUpdateResult := _SyntheticDatasetUpdateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSyntheticDatasetUpdateResult) + + if err != nil { + return err + } + + *o = SyntheticDatasetUpdateResult(varSyntheticDatasetUpdateResult) + + return err +} + +type NullableSyntheticDatasetUpdateResult struct { + value *SyntheticDatasetUpdateResult + isSet bool +} + +func (v NullableSyntheticDatasetUpdateResult) Get() *SyntheticDatasetUpdateResult { + return v.value +} + +func (v *NullableSyntheticDatasetUpdateResult) Set(val *SyntheticDatasetUpdateResult) { + v.value = val + v.isSet = true +} + +func (v NullableSyntheticDatasetUpdateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSyntheticDatasetUpdateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyntheticDatasetUpdateResult(val *SyntheticDatasetUpdateResult) *NullableSyntheticDatasetUpdateResult { + return &NullableSyntheticDatasetUpdateResult{value: val, isSet: true} +} + +func (v NullableSyntheticDatasetUpdateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyntheticDatasetUpdateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution.go b/go/futureagi/model_test_execution.go new file mode 100644 index 0000000..6f730b1 --- /dev/null +++ b/go/futureagi/model_test_execution.go @@ -0,0 +1,1018 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TestExecution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecution{} + +// TestExecution struct for TestExecution +type TestExecution struct { + Id *string `json:"id,omitempty"` + // The run test being executed + RunTest string `json:"run_test"` + RunTestName *string `json:"run_test_name,omitempty"` + AgentDefinitionName *string `json:"agent_definition_name,omitempty"` + // Current status of the test execution + Status *string `json:"status,omitempty"` + ErrorReason NullableString `json:"error_reason,omitempty"` + // When the test execution started + StartedAt *time.Time `json:"started_at,omitempty"` + // When the test execution completed + CompletedAt NullableTime `json:"completed_at,omitempty"` + // Total number of scenarios in this execution + TotalScenarios *int32 `json:"total_scenarios,omitempty"` + // Total number of calls to be made + TotalCalls *int32 `json:"total_calls,omitempty"` + // Number of successfully completed calls + CompletedCalls *int32 `json:"completed_calls,omitempty"` + // Number of failed calls + FailedCalls *int32 `json:"failed_calls,omitempty"` + // Additional metadata about the execution + ExecutionMetadata map[string]interface{} `json:"execution_metadata,omitempty"` + DurationSeconds *string `json:"duration_seconds,omitempty"` + SuccessRate *string `json:"success_rate,omitempty"` + Calls []CallExecution `json:"calls,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + // List of scenario IDs that were executed in this run + ScenarioIds map[string]interface{} `json:"scenario_ids,omitempty"` + SimulatorAgentName *string `json:"simulator_agent_name,omitempty"` + SimulatorAgentId *string `json:"simulator_agent_id,omitempty"` + AgentDefinitionUsedName *string `json:"agent_definition_used_name,omitempty"` + AgentDefinitionUsedId *string `json:"agent_definition_used_id,omitempty"` + CallsAttempted *string `json:"calls_attempted,omitempty"` + CallsConnectedPercentage *string `json:"calls_connected_percentage,omitempty"` +} + +type _TestExecution TestExecution + +// NewTestExecution instantiates a new TestExecution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecution(runTest string) *TestExecution { + this := TestExecution{} + this.RunTest = runTest + return &this +} + +// NewTestExecutionWithDefaults instantiates a new TestExecution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionWithDefaults() *TestExecution { + this := TestExecution{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TestExecution) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TestExecution) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TestExecution) SetId(v string) { + o.Id = &v +} + +// GetRunTest returns the RunTest field value +func (o *TestExecution) GetRunTest() string { + if o == nil { + var ret string + return ret + } + + return o.RunTest +} + +// GetRunTestOk returns a tuple with the RunTest field value +// and a boolean to check if the value has been set. +func (o *TestExecution) GetRunTestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTest, true +} + +// SetRunTest sets field value +func (o *TestExecution) SetRunTest(v string) { + o.RunTest = v +} + +// GetRunTestName returns the RunTestName field value if set, zero value otherwise. +func (o *TestExecution) GetRunTestName() string { + if o == nil || IsNil(o.RunTestName) { + var ret string + return ret + } + return *o.RunTestName +} + +// GetRunTestNameOk returns a tuple with the RunTestName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetRunTestNameOk() (*string, bool) { + if o == nil || IsNil(o.RunTestName) { + return nil, false + } + return o.RunTestName, true +} + +// HasRunTestName returns a boolean if a field has been set. +func (o *TestExecution) HasRunTestName() bool { + if o != nil && !IsNil(o.RunTestName) { + return true + } + + return false +} + +// SetRunTestName gets a reference to the given string and assigns it to the RunTestName field. +func (o *TestExecution) SetRunTestName(v string) { + o.RunTestName = &v +} + +// GetAgentDefinitionName returns the AgentDefinitionName field value if set, zero value otherwise. +func (o *TestExecution) GetAgentDefinitionName() string { + if o == nil || IsNil(o.AgentDefinitionName) { + var ret string + return ret + } + return *o.AgentDefinitionName +} + +// GetAgentDefinitionNameOk returns a tuple with the AgentDefinitionName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetAgentDefinitionNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionName) { + return nil, false + } + return o.AgentDefinitionName, true +} + +// HasAgentDefinitionName returns a boolean if a field has been set. +func (o *TestExecution) HasAgentDefinitionName() bool { + if o != nil && !IsNil(o.AgentDefinitionName) { + return true + } + + return false +} + +// SetAgentDefinitionName gets a reference to the given string and assigns it to the AgentDefinitionName field. +func (o *TestExecution) SetAgentDefinitionName(v string) { + o.AgentDefinitionName = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TestExecution) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TestExecution) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TestExecution) SetStatus(v string) { + o.Status = &v +} + +// GetErrorReason returns the ErrorReason field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecution) GetErrorReason() string { + if o == nil || IsNil(o.ErrorReason.Get()) { + var ret string + return ret + } + return *o.ErrorReason.Get() +} + +// GetErrorReasonOk returns a tuple with the ErrorReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecution) GetErrorReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ErrorReason.Get(), o.ErrorReason.IsSet() +} + +// HasErrorReason returns a boolean if a field has been set. +func (o *TestExecution) HasErrorReason() bool { + if o != nil && o.ErrorReason.IsSet() { + return true + } + + return false +} + +// SetErrorReason gets a reference to the given NullableString and assigns it to the ErrorReason field. +func (o *TestExecution) SetErrorReason(v string) { + o.ErrorReason.Set(&v) +} + +// SetErrorReasonNil sets the value for ErrorReason to be an explicit nil +func (o *TestExecution) SetErrorReasonNil() { + o.ErrorReason.Set(nil) +} + +// UnsetErrorReason ensures that no value is present for ErrorReason, not even an explicit nil +func (o *TestExecution) UnsetErrorReason() { + o.ErrorReason.Unset() +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *TestExecution) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt) { + var ret time.Time + return ret + } + return *o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetStartedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.StartedAt) { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *TestExecution) HasStartedAt() bool { + if o != nil && !IsNil(o.StartedAt) { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given time.Time and assigns it to the StartedAt field. +func (o *TestExecution) SetStartedAt(v time.Time) { + o.StartedAt = &v +} + +// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecution) GetCompletedAt() time.Time { + if o == nil || IsNil(o.CompletedAt.Get()) { + var ret time.Time + return ret + } + return *o.CompletedAt.Get() +} + +// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecution) GetCompletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CompletedAt.Get(), o.CompletedAt.IsSet() +} + +// HasCompletedAt returns a boolean if a field has been set. +func (o *TestExecution) HasCompletedAt() bool { + if o != nil && o.CompletedAt.IsSet() { + return true + } + + return false +} + +// SetCompletedAt gets a reference to the given NullableTime and assigns it to the CompletedAt field. +func (o *TestExecution) SetCompletedAt(v time.Time) { + o.CompletedAt.Set(&v) +} + +// SetCompletedAtNil sets the value for CompletedAt to be an explicit nil +func (o *TestExecution) SetCompletedAtNil() { + o.CompletedAt.Set(nil) +} + +// UnsetCompletedAt ensures that no value is present for CompletedAt, not even an explicit nil +func (o *TestExecution) UnsetCompletedAt() { + o.CompletedAt.Unset() +} + +// GetTotalScenarios returns the TotalScenarios field value if set, zero value otherwise. +func (o *TestExecution) GetTotalScenarios() int32 { + if o == nil || IsNil(o.TotalScenarios) { + var ret int32 + return ret + } + return *o.TotalScenarios +} + +// GetTotalScenariosOk returns a tuple with the TotalScenarios field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetTotalScenariosOk() (*int32, bool) { + if o == nil || IsNil(o.TotalScenarios) { + return nil, false + } + return o.TotalScenarios, true +} + +// HasTotalScenarios returns a boolean if a field has been set. +func (o *TestExecution) HasTotalScenarios() bool { + if o != nil && !IsNil(o.TotalScenarios) { + return true + } + + return false +} + +// SetTotalScenarios gets a reference to the given int32 and assigns it to the TotalScenarios field. +func (o *TestExecution) SetTotalScenarios(v int32) { + o.TotalScenarios = &v +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *TestExecution) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *TestExecution) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *TestExecution) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetCompletedCalls returns the CompletedCalls field value if set, zero value otherwise. +func (o *TestExecution) GetCompletedCalls() int32 { + if o == nil || IsNil(o.CompletedCalls) { + var ret int32 + return ret + } + return *o.CompletedCalls +} + +// GetCompletedCallsOk returns a tuple with the CompletedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetCompletedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.CompletedCalls) { + return nil, false + } + return o.CompletedCalls, true +} + +// HasCompletedCalls returns a boolean if a field has been set. +func (o *TestExecution) HasCompletedCalls() bool { + if o != nil && !IsNil(o.CompletedCalls) { + return true + } + + return false +} + +// SetCompletedCalls gets a reference to the given int32 and assigns it to the CompletedCalls field. +func (o *TestExecution) SetCompletedCalls(v int32) { + o.CompletedCalls = &v +} + +// GetFailedCalls returns the FailedCalls field value if set, zero value otherwise. +func (o *TestExecution) GetFailedCalls() int32 { + if o == nil || IsNil(o.FailedCalls) { + var ret int32 + return ret + } + return *o.FailedCalls +} + +// GetFailedCallsOk returns a tuple with the FailedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetFailedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.FailedCalls) { + return nil, false + } + return o.FailedCalls, true +} + +// HasFailedCalls returns a boolean if a field has been set. +func (o *TestExecution) HasFailedCalls() bool { + if o != nil && !IsNil(o.FailedCalls) { + return true + } + + return false +} + +// SetFailedCalls gets a reference to the given int32 and assigns it to the FailedCalls field. +func (o *TestExecution) SetFailedCalls(v int32) { + o.FailedCalls = &v +} + +// GetExecutionMetadata returns the ExecutionMetadata field value if set, zero value otherwise. +func (o *TestExecution) GetExecutionMetadata() map[string]interface{} { + if o == nil || IsNil(o.ExecutionMetadata) { + var ret map[string]interface{} + return ret + } + return o.ExecutionMetadata +} + +// GetExecutionMetadataOk returns a tuple with the ExecutionMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetExecutionMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ExecutionMetadata) { + return map[string]interface{}{}, false + } + return o.ExecutionMetadata, true +} + +// HasExecutionMetadata returns a boolean if a field has been set. +func (o *TestExecution) HasExecutionMetadata() bool { + if o != nil && !IsNil(o.ExecutionMetadata) { + return true + } + + return false +} + +// SetExecutionMetadata gets a reference to the given map[string]interface{} and assigns it to the ExecutionMetadata field. +func (o *TestExecution) SetExecutionMetadata(v map[string]interface{}) { + o.ExecutionMetadata = v +} + +// GetDurationSeconds returns the DurationSeconds field value if set, zero value otherwise. +func (o *TestExecution) GetDurationSeconds() string { + if o == nil || IsNil(o.DurationSeconds) { + var ret string + return ret + } + return *o.DurationSeconds +} + +// GetDurationSecondsOk returns a tuple with the DurationSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetDurationSecondsOk() (*string, bool) { + if o == nil || IsNil(o.DurationSeconds) { + return nil, false + } + return o.DurationSeconds, true +} + +// HasDurationSeconds returns a boolean if a field has been set. +func (o *TestExecution) HasDurationSeconds() bool { + if o != nil && !IsNil(o.DurationSeconds) { + return true + } + + return false +} + +// SetDurationSeconds gets a reference to the given string and assigns it to the DurationSeconds field. +func (o *TestExecution) SetDurationSeconds(v string) { + o.DurationSeconds = &v +} + +// GetSuccessRate returns the SuccessRate field value if set, zero value otherwise. +func (o *TestExecution) GetSuccessRate() string { + if o == nil || IsNil(o.SuccessRate) { + var ret string + return ret + } + return *o.SuccessRate +} + +// GetSuccessRateOk returns a tuple with the SuccessRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetSuccessRateOk() (*string, bool) { + if o == nil || IsNil(o.SuccessRate) { + return nil, false + } + return o.SuccessRate, true +} + +// HasSuccessRate returns a boolean if a field has been set. +func (o *TestExecution) HasSuccessRate() bool { + if o != nil && !IsNil(o.SuccessRate) { + return true + } + + return false +} + +// SetSuccessRate gets a reference to the given string and assigns it to the SuccessRate field. +func (o *TestExecution) SetSuccessRate(v string) { + o.SuccessRate = &v +} + +// GetCalls returns the Calls field value if set, zero value otherwise. +func (o *TestExecution) GetCalls() []CallExecution { + if o == nil || IsNil(o.Calls) { + var ret []CallExecution + return ret + } + return o.Calls +} + +// GetCallsOk returns a tuple with the Calls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetCallsOk() ([]CallExecution, bool) { + if o == nil || IsNil(o.Calls) { + return nil, false + } + return o.Calls, true +} + +// HasCalls returns a boolean if a field has been set. +func (o *TestExecution) HasCalls() bool { + if o != nil && !IsNil(o.Calls) { + return true + } + + return false +} + +// SetCalls gets a reference to the given []CallExecution and assigns it to the Calls field. +func (o *TestExecution) SetCalls(v []CallExecution) { + o.Calls = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TestExecution) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TestExecution) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TestExecution) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetScenarioIds returns the ScenarioIds field value if set, zero value otherwise. +func (o *TestExecution) GetScenarioIds() map[string]interface{} { + if o == nil || IsNil(o.ScenarioIds) { + var ret map[string]interface{} + return ret + } + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetScenarioIdsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ScenarioIds) { + return map[string]interface{}{}, false + } + return o.ScenarioIds, true +} + +// HasScenarioIds returns a boolean if a field has been set. +func (o *TestExecution) HasScenarioIds() bool { + if o != nil && !IsNil(o.ScenarioIds) { + return true + } + + return false +} + +// SetScenarioIds gets a reference to the given map[string]interface{} and assigns it to the ScenarioIds field. +func (o *TestExecution) SetScenarioIds(v map[string]interface{}) { + o.ScenarioIds = v +} + +// GetSimulatorAgentName returns the SimulatorAgentName field value if set, zero value otherwise. +func (o *TestExecution) GetSimulatorAgentName() string { + if o == nil || IsNil(o.SimulatorAgentName) { + var ret string + return ret + } + return *o.SimulatorAgentName +} + +// GetSimulatorAgentNameOk returns a tuple with the SimulatorAgentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetSimulatorAgentNameOk() (*string, bool) { + if o == nil || IsNil(o.SimulatorAgentName) { + return nil, false + } + return o.SimulatorAgentName, true +} + +// HasSimulatorAgentName returns a boolean if a field has been set. +func (o *TestExecution) HasSimulatorAgentName() bool { + if o != nil && !IsNil(o.SimulatorAgentName) { + return true + } + + return false +} + +// SetSimulatorAgentName gets a reference to the given string and assigns it to the SimulatorAgentName field. +func (o *TestExecution) SetSimulatorAgentName(v string) { + o.SimulatorAgentName = &v +} + +// GetSimulatorAgentId returns the SimulatorAgentId field value if set, zero value otherwise. +func (o *TestExecution) GetSimulatorAgentId() string { + if o == nil || IsNil(o.SimulatorAgentId) { + var ret string + return ret + } + return *o.SimulatorAgentId +} + +// GetSimulatorAgentIdOk returns a tuple with the SimulatorAgentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetSimulatorAgentIdOk() (*string, bool) { + if o == nil || IsNil(o.SimulatorAgentId) { + return nil, false + } + return o.SimulatorAgentId, true +} + +// HasSimulatorAgentId returns a boolean if a field has been set. +func (o *TestExecution) HasSimulatorAgentId() bool { + if o != nil && !IsNil(o.SimulatorAgentId) { + return true + } + + return false +} + +// SetSimulatorAgentId gets a reference to the given string and assigns it to the SimulatorAgentId field. +func (o *TestExecution) SetSimulatorAgentId(v string) { + o.SimulatorAgentId = &v +} + +// GetAgentDefinitionUsedName returns the AgentDefinitionUsedName field value if set, zero value otherwise. +func (o *TestExecution) GetAgentDefinitionUsedName() string { + if o == nil || IsNil(o.AgentDefinitionUsedName) { + var ret string + return ret + } + return *o.AgentDefinitionUsedName +} + +// GetAgentDefinitionUsedNameOk returns a tuple with the AgentDefinitionUsedName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetAgentDefinitionUsedNameOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionUsedName) { + return nil, false + } + return o.AgentDefinitionUsedName, true +} + +// HasAgentDefinitionUsedName returns a boolean if a field has been set. +func (o *TestExecution) HasAgentDefinitionUsedName() bool { + if o != nil && !IsNil(o.AgentDefinitionUsedName) { + return true + } + + return false +} + +// SetAgentDefinitionUsedName gets a reference to the given string and assigns it to the AgentDefinitionUsedName field. +func (o *TestExecution) SetAgentDefinitionUsedName(v string) { + o.AgentDefinitionUsedName = &v +} + +// GetAgentDefinitionUsedId returns the AgentDefinitionUsedId field value if set, zero value otherwise. +func (o *TestExecution) GetAgentDefinitionUsedId() string { + if o == nil || IsNil(o.AgentDefinitionUsedId) { + var ret string + return ret + } + return *o.AgentDefinitionUsedId +} + +// GetAgentDefinitionUsedIdOk returns a tuple with the AgentDefinitionUsedId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetAgentDefinitionUsedIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionUsedId) { + return nil, false + } + return o.AgentDefinitionUsedId, true +} + +// HasAgentDefinitionUsedId returns a boolean if a field has been set. +func (o *TestExecution) HasAgentDefinitionUsedId() bool { + if o != nil && !IsNil(o.AgentDefinitionUsedId) { + return true + } + + return false +} + +// SetAgentDefinitionUsedId gets a reference to the given string and assigns it to the AgentDefinitionUsedId field. +func (o *TestExecution) SetAgentDefinitionUsedId(v string) { + o.AgentDefinitionUsedId = &v +} + +// GetCallsAttempted returns the CallsAttempted field value if set, zero value otherwise. +func (o *TestExecution) GetCallsAttempted() string { + if o == nil || IsNil(o.CallsAttempted) { + var ret string + return ret + } + return *o.CallsAttempted +} + +// GetCallsAttemptedOk returns a tuple with the CallsAttempted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetCallsAttemptedOk() (*string, bool) { + if o == nil || IsNil(o.CallsAttempted) { + return nil, false + } + return o.CallsAttempted, true +} + +// HasCallsAttempted returns a boolean if a field has been set. +func (o *TestExecution) HasCallsAttempted() bool { + if o != nil && !IsNil(o.CallsAttempted) { + return true + } + + return false +} + +// SetCallsAttempted gets a reference to the given string and assigns it to the CallsAttempted field. +func (o *TestExecution) SetCallsAttempted(v string) { + o.CallsAttempted = &v +} + +// GetCallsConnectedPercentage returns the CallsConnectedPercentage field value if set, zero value otherwise. +func (o *TestExecution) GetCallsConnectedPercentage() string { + if o == nil || IsNil(o.CallsConnectedPercentage) { + var ret string + return ret + } + return *o.CallsConnectedPercentage +} + +// GetCallsConnectedPercentageOk returns a tuple with the CallsConnectedPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecution) GetCallsConnectedPercentageOk() (*string, bool) { + if o == nil || IsNil(o.CallsConnectedPercentage) { + return nil, false + } + return o.CallsConnectedPercentage, true +} + +// HasCallsConnectedPercentage returns a boolean if a field has been set. +func (o *TestExecution) HasCallsConnectedPercentage() bool { + if o != nil && !IsNil(o.CallsConnectedPercentage) { + return true + } + + return false +} + +// SetCallsConnectedPercentage gets a reference to the given string and assigns it to the CallsConnectedPercentage field. +func (o *TestExecution) SetCallsConnectedPercentage(v string) { + o.CallsConnectedPercentage = &v +} + +func (o TestExecution) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["run_test"] = o.RunTest + if !IsNil(o.RunTestName) { + toSerialize["run_test_name"] = o.RunTestName + } + if !IsNil(o.AgentDefinitionName) { + toSerialize["agent_definition_name"] = o.AgentDefinitionName + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.ErrorReason.IsSet() { + toSerialize["error_reason"] = o.ErrorReason.Get() + } + if !IsNil(o.StartedAt) { + toSerialize["started_at"] = o.StartedAt + } + if o.CompletedAt.IsSet() { + toSerialize["completed_at"] = o.CompletedAt.Get() + } + if !IsNil(o.TotalScenarios) { + toSerialize["total_scenarios"] = o.TotalScenarios + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.CompletedCalls) { + toSerialize["completed_calls"] = o.CompletedCalls + } + if !IsNil(o.FailedCalls) { + toSerialize["failed_calls"] = o.FailedCalls + } + if !IsNil(o.ExecutionMetadata) { + toSerialize["execution_metadata"] = o.ExecutionMetadata + } + if !IsNil(o.DurationSeconds) { + toSerialize["duration_seconds"] = o.DurationSeconds + } + if !IsNil(o.SuccessRate) { + toSerialize["success_rate"] = o.SuccessRate + } + if !IsNil(o.Calls) { + toSerialize["calls"] = o.Calls + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.ScenarioIds) { + toSerialize["scenario_ids"] = o.ScenarioIds + } + if !IsNil(o.SimulatorAgentName) { + toSerialize["simulator_agent_name"] = o.SimulatorAgentName + } + if !IsNil(o.SimulatorAgentId) { + toSerialize["simulator_agent_id"] = o.SimulatorAgentId + } + if !IsNil(o.AgentDefinitionUsedName) { + toSerialize["agent_definition_used_name"] = o.AgentDefinitionUsedName + } + if !IsNil(o.AgentDefinitionUsedId) { + toSerialize["agent_definition_used_id"] = o.AgentDefinitionUsedId + } + if !IsNil(o.CallsAttempted) { + toSerialize["calls_attempted"] = o.CallsAttempted + } + if !IsNil(o.CallsConnectedPercentage) { + toSerialize["calls_connected_percentage"] = o.CallsConnectedPercentage + } + return toSerialize, nil +} + +func (o *TestExecution) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "run_test", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTestExecution := _TestExecution{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTestExecution) + + if err != nil { + return err + } + + *o = TestExecution(varTestExecution) + + return err +} + +type NullableTestExecution struct { + value *TestExecution + isSet bool +} + +func (v NullableTestExecution) Get() *TestExecution { + return v.value +} + +func (v *NullableTestExecution) Set(val *TestExecution) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecution) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecution(val *TestExecution) *NullableTestExecution { + return &NullableTestExecution{value: val, isSet: true} +} + +func (v NullableTestExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_analytics.go b/go/futureagi/model_test_execution_analytics.go new file mode 100644 index 0000000..a7f8fa6 --- /dev/null +++ b/go/futureagi/model_test_execution_analytics.go @@ -0,0 +1,216 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TestExecutionAnalytics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionAnalytics{} + +// TestExecutionAnalytics struct for TestExecutionAnalytics +type TestExecutionAnalytics struct { + // Fail rate data for scatter plot chart + FailRateOverTestRuns map[string]string `json:"fail_rate_over_test_runs"` + // Evaluation categories data for line graph chart + EvaluationCategoriesOverTestRuns map[string]string `json:"evaluation_categories_over_test_runs"` + // Metadata about the analytics data + Metadata map[string]string `json:"metadata"` +} + +type _TestExecutionAnalytics TestExecutionAnalytics + +// NewTestExecutionAnalytics instantiates a new TestExecutionAnalytics object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionAnalytics(failRateOverTestRuns map[string]string, evaluationCategoriesOverTestRuns map[string]string, metadata map[string]string) *TestExecutionAnalytics { + this := TestExecutionAnalytics{} + this.FailRateOverTestRuns = failRateOverTestRuns + this.EvaluationCategoriesOverTestRuns = evaluationCategoriesOverTestRuns + this.Metadata = metadata + return &this +} + +// NewTestExecutionAnalyticsWithDefaults instantiates a new TestExecutionAnalytics object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionAnalyticsWithDefaults() *TestExecutionAnalytics { + this := TestExecutionAnalytics{} + return &this +} + +// GetFailRateOverTestRuns returns the FailRateOverTestRuns field value +func (o *TestExecutionAnalytics) GetFailRateOverTestRuns() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.FailRateOverTestRuns +} + +// GetFailRateOverTestRunsOk returns a tuple with the FailRateOverTestRuns field value +// and a boolean to check if the value has been set. +func (o *TestExecutionAnalytics) GetFailRateOverTestRunsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.FailRateOverTestRuns, true +} + +// SetFailRateOverTestRuns sets field value +func (o *TestExecutionAnalytics) SetFailRateOverTestRuns(v map[string]string) { + o.FailRateOverTestRuns = v +} + +// GetEvaluationCategoriesOverTestRuns returns the EvaluationCategoriesOverTestRuns field value +func (o *TestExecutionAnalytics) GetEvaluationCategoriesOverTestRuns() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.EvaluationCategoriesOverTestRuns +} + +// GetEvaluationCategoriesOverTestRunsOk returns a tuple with the EvaluationCategoriesOverTestRuns field value +// and a boolean to check if the value has been set. +func (o *TestExecutionAnalytics) GetEvaluationCategoriesOverTestRunsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.EvaluationCategoriesOverTestRuns, true +} + +// SetEvaluationCategoriesOverTestRuns sets field value +func (o *TestExecutionAnalytics) SetEvaluationCategoriesOverTestRuns(v map[string]string) { + o.EvaluationCategoriesOverTestRuns = v +} + +// GetMetadata returns the Metadata field value +func (o *TestExecutionAnalytics) GetMetadata() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *TestExecutionAnalytics) GetMetadataOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value +func (o *TestExecutionAnalytics) SetMetadata(v map[string]string) { + o.Metadata = v +} + +func (o TestExecutionAnalytics) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionAnalytics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fail_rate_over_test_runs"] = o.FailRateOverTestRuns + toSerialize["evaluation_categories_over_test_runs"] = o.EvaluationCategoriesOverTestRuns + toSerialize["metadata"] = o.Metadata + return toSerialize, nil +} + +func (o *TestExecutionAnalytics) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "fail_rate_over_test_runs", + "evaluation_categories_over_test_runs", + "metadata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTestExecutionAnalytics := _TestExecutionAnalytics{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTestExecutionAnalytics) + + if err != nil { + return err + } + + *o = TestExecutionAnalytics(varTestExecutionAnalytics) + + return err +} + +type NullableTestExecutionAnalytics struct { + value *TestExecutionAnalytics + isSet bool +} + +func (v NullableTestExecutionAnalytics) Get() *TestExecutionAnalytics { + return v.value +} + +func (v *NullableTestExecutionAnalytics) Set(val *TestExecutionAnalytics) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionAnalytics) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionAnalytics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionAnalytics(val *TestExecutionAnalytics) *NullableTestExecutionAnalytics { + return &NullableTestExecutionAnalytics{value: val, isSet: true} +} + +func (v NullableTestExecutionAnalytics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionAnalytics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_bulk_delete.go b/go/futureagi/model_test_execution_bulk_delete.go new file mode 100644 index 0000000..0427b56 --- /dev/null +++ b/go/futureagi/model_test_execution_bulk_delete.go @@ -0,0 +1,167 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionBulkDelete type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionBulkDelete{} + +// TestExecutionBulkDelete struct for TestExecutionBulkDelete +type TestExecutionBulkDelete struct { + // List of specific test execution IDs to delete + TestExecutionIds []string `json:"test_execution_ids,omitempty"` + // Whether to delete all test executions in the run test + SelectAll *bool `json:"select_all,omitempty"` +} + +// NewTestExecutionBulkDelete instantiates a new TestExecutionBulkDelete object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionBulkDelete() *TestExecutionBulkDelete { + this := TestExecutionBulkDelete{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// NewTestExecutionBulkDeleteWithDefaults instantiates a new TestExecutionBulkDelete object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionBulkDeleteWithDefaults() *TestExecutionBulkDelete { + this := TestExecutionBulkDelete{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// GetTestExecutionIds returns the TestExecutionIds field value if set, zero value otherwise. +func (o *TestExecutionBulkDelete) GetTestExecutionIds() []string { + if o == nil || IsNil(o.TestExecutionIds) { + var ret []string + return ret + } + return o.TestExecutionIds +} + +// GetTestExecutionIdsOk returns a tuple with the TestExecutionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionBulkDelete) GetTestExecutionIdsOk() ([]string, bool) { + if o == nil || IsNil(o.TestExecutionIds) { + return nil, false + } + return o.TestExecutionIds, true +} + +// HasTestExecutionIds returns a boolean if a field has been set. +func (o *TestExecutionBulkDelete) HasTestExecutionIds() bool { + if o != nil && !IsNil(o.TestExecutionIds) { + return true + } + + return false +} + +// SetTestExecutionIds gets a reference to the given []string and assigns it to the TestExecutionIds field. +func (o *TestExecutionBulkDelete) SetTestExecutionIds(v []string) { + o.TestExecutionIds = v +} + +// GetSelectAll returns the SelectAll field value if set, zero value otherwise. +func (o *TestExecutionBulkDelete) GetSelectAll() bool { + if o == nil || IsNil(o.SelectAll) { + var ret bool + return ret + } + return *o.SelectAll +} + +// GetSelectAllOk returns a tuple with the SelectAll field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionBulkDelete) GetSelectAllOk() (*bool, bool) { + if o == nil || IsNil(o.SelectAll) { + return nil, false + } + return o.SelectAll, true +} + +// HasSelectAll returns a boolean if a field has been set. +func (o *TestExecutionBulkDelete) HasSelectAll() bool { + if o != nil && !IsNil(o.SelectAll) { + return true + } + + return false +} + +// SetSelectAll gets a reference to the given bool and assigns it to the SelectAll field. +func (o *TestExecutionBulkDelete) SetSelectAll(v bool) { + o.SelectAll = &v +} + +func (o TestExecutionBulkDelete) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionBulkDelete) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TestExecutionIds) { + toSerialize["test_execution_ids"] = o.TestExecutionIds + } + if !IsNil(o.SelectAll) { + toSerialize["select_all"] = o.SelectAll + } + return toSerialize, nil +} + +type NullableTestExecutionBulkDelete struct { + value *TestExecutionBulkDelete + isSet bool +} + +func (v NullableTestExecutionBulkDelete) Get() *TestExecutionBulkDelete { + return v.value +} + +func (v *NullableTestExecutionBulkDelete) Set(val *TestExecutionBulkDelete) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionBulkDelete) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionBulkDelete) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionBulkDelete(val *TestExecutionBulkDelete) *NullableTestExecutionBulkDelete { + return &NullableTestExecutionBulkDelete{value: val, isSet: true} +} + +func (v NullableTestExecutionBulkDelete) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionBulkDelete) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_bulk_delete_response.go b/go/futureagi/model_test_execution_bulk_delete_response.go new file mode 100644 index 0000000..7c65c24 --- /dev/null +++ b/go/futureagi/model_test_execution_bulk_delete_response.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionBulkDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionBulkDeleteResponse{} + +// TestExecutionBulkDeleteResponse struct for TestExecutionBulkDeleteResponse +type TestExecutionBulkDeleteResponse struct { + Message *string `json:"message,omitempty"` + RunTestId *string `json:"run_test_id,omitempty"` + DeletedCount *int32 `json:"deleted_count,omitempty"` + DeletedIds []string `json:"deleted_ids,omitempty"` +} + +// NewTestExecutionBulkDeleteResponse instantiates a new TestExecutionBulkDeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionBulkDeleteResponse() *TestExecutionBulkDeleteResponse { + this := TestExecutionBulkDeleteResponse{} + return &this +} + +// NewTestExecutionBulkDeleteResponseWithDefaults instantiates a new TestExecutionBulkDeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionBulkDeleteResponseWithDefaults() *TestExecutionBulkDeleteResponse { + this := TestExecutionBulkDeleteResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *TestExecutionBulkDeleteResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionBulkDeleteResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *TestExecutionBulkDeleteResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *TestExecutionBulkDeleteResponse) SetMessage(v string) { + o.Message = &v +} + +// GetRunTestId returns the RunTestId field value if set, zero value otherwise. +func (o *TestExecutionBulkDeleteResponse) GetRunTestId() string { + if o == nil || IsNil(o.RunTestId) { + var ret string + return ret + } + return *o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionBulkDeleteResponse) GetRunTestIdOk() (*string, bool) { + if o == nil || IsNil(o.RunTestId) { + return nil, false + } + return o.RunTestId, true +} + +// HasRunTestId returns a boolean if a field has been set. +func (o *TestExecutionBulkDeleteResponse) HasRunTestId() bool { + if o != nil && !IsNil(o.RunTestId) { + return true + } + + return false +} + +// SetRunTestId gets a reference to the given string and assigns it to the RunTestId field. +func (o *TestExecutionBulkDeleteResponse) SetRunTestId(v string) { + o.RunTestId = &v +} + +// GetDeletedCount returns the DeletedCount field value if set, zero value otherwise. +func (o *TestExecutionBulkDeleteResponse) GetDeletedCount() int32 { + if o == nil || IsNil(o.DeletedCount) { + var ret int32 + return ret + } + return *o.DeletedCount +} + +// GetDeletedCountOk returns a tuple with the DeletedCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionBulkDeleteResponse) GetDeletedCountOk() (*int32, bool) { + if o == nil || IsNil(o.DeletedCount) { + return nil, false + } + return o.DeletedCount, true +} + +// HasDeletedCount returns a boolean if a field has been set. +func (o *TestExecutionBulkDeleteResponse) HasDeletedCount() bool { + if o != nil && !IsNil(o.DeletedCount) { + return true + } + + return false +} + +// SetDeletedCount gets a reference to the given int32 and assigns it to the DeletedCount field. +func (o *TestExecutionBulkDeleteResponse) SetDeletedCount(v int32) { + o.DeletedCount = &v +} + +// GetDeletedIds returns the DeletedIds field value if set, zero value otherwise. +func (o *TestExecutionBulkDeleteResponse) GetDeletedIds() []string { + if o == nil || IsNil(o.DeletedIds) { + var ret []string + return ret + } + return o.DeletedIds +} + +// GetDeletedIdsOk returns a tuple with the DeletedIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionBulkDeleteResponse) GetDeletedIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DeletedIds) { + return nil, false + } + return o.DeletedIds, true +} + +// HasDeletedIds returns a boolean if a field has been set. +func (o *TestExecutionBulkDeleteResponse) HasDeletedIds() bool { + if o != nil && !IsNil(o.DeletedIds) { + return true + } + + return false +} + +// SetDeletedIds gets a reference to the given []string and assigns it to the DeletedIds field. +func (o *TestExecutionBulkDeleteResponse) SetDeletedIds(v []string) { + o.DeletedIds = v +} + +func (o TestExecutionBulkDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionBulkDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.RunTestId) { + toSerialize["run_test_id"] = o.RunTestId + } + if !IsNil(o.DeletedCount) { + toSerialize["deleted_count"] = o.DeletedCount + } + if !IsNil(o.DeletedIds) { + toSerialize["deleted_ids"] = o.DeletedIds + } + return toSerialize, nil +} + +type NullableTestExecutionBulkDeleteResponse struct { + value *TestExecutionBulkDeleteResponse + isSet bool +} + +func (v NullableTestExecutionBulkDeleteResponse) Get() *TestExecutionBulkDeleteResponse { + return v.value +} + +func (v *NullableTestExecutionBulkDeleteResponse) Set(val *TestExecutionBulkDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionBulkDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionBulkDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionBulkDeleteResponse(val *TestExecutionBulkDeleteResponse) *NullableTestExecutionBulkDeleteResponse { + return &NullableTestExecutionBulkDeleteResponse{value: val, isSet: true} +} + +func (v NullableTestExecutionBulkDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionBulkDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_chat_batch_response.go b/go/futureagi/model_test_execution_chat_batch_response.go new file mode 100644 index 0000000..4207a26 --- /dev/null +++ b/go/futureagi/model_test_execution_chat_batch_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TestExecutionChatBatchResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionChatBatchResponse{} + +// TestExecutionChatBatchResponse struct for TestExecutionChatBatchResponse +type TestExecutionChatBatchResponse struct { + Status *bool `json:"status,omitempty"` + Result TestExecutionChatBatchResult `json:"result"` +} + +type _TestExecutionChatBatchResponse TestExecutionChatBatchResponse + +// NewTestExecutionChatBatchResponse instantiates a new TestExecutionChatBatchResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionChatBatchResponse(result TestExecutionChatBatchResult) *TestExecutionChatBatchResponse { + this := TestExecutionChatBatchResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewTestExecutionChatBatchResponseWithDefaults instantiates a new TestExecutionChatBatchResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionChatBatchResponseWithDefaults() *TestExecutionChatBatchResponse { + this := TestExecutionChatBatchResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TestExecutionChatBatchResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionChatBatchResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TestExecutionChatBatchResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *TestExecutionChatBatchResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *TestExecutionChatBatchResponse) GetResult() TestExecutionChatBatchResult { + if o == nil { + var ret TestExecutionChatBatchResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *TestExecutionChatBatchResponse) GetResultOk() (*TestExecutionChatBatchResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *TestExecutionChatBatchResponse) SetResult(v TestExecutionChatBatchResult) { + o.Result = v +} + +func (o TestExecutionChatBatchResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionChatBatchResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *TestExecutionChatBatchResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTestExecutionChatBatchResponse := _TestExecutionChatBatchResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTestExecutionChatBatchResponse) + + if err != nil { + return err + } + + *o = TestExecutionChatBatchResponse(varTestExecutionChatBatchResponse) + + return err +} + +type NullableTestExecutionChatBatchResponse struct { + value *TestExecutionChatBatchResponse + isSet bool +} + +func (v NullableTestExecutionChatBatchResponse) Get() *TestExecutionChatBatchResponse { + return v.value +} + +func (v *NullableTestExecutionChatBatchResponse) Set(val *TestExecutionChatBatchResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionChatBatchResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionChatBatchResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionChatBatchResponse(val *TestExecutionChatBatchResponse) *NullableTestExecutionChatBatchResponse { + return &NullableTestExecutionChatBatchResponse{value: val, isSet: true} +} + +func (v NullableTestExecutionChatBatchResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionChatBatchResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_chat_batch_result.go b/go/futureagi/model_test_execution_chat_batch_result.go new file mode 100644 index 0000000..6c298b3 --- /dev/null +++ b/go/futureagi/model_test_execution_chat_batch_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TestExecutionChatBatchResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionChatBatchResult{} + +// TestExecutionChatBatchResult struct for TestExecutionChatBatchResult +type TestExecutionChatBatchResult struct { + CallExecutionIds []string `json:"call_execution_ids"` + HasMore bool `json:"has_more"` + BatchedScenarios []string `json:"batched_scenarios"` +} + +type _TestExecutionChatBatchResult TestExecutionChatBatchResult + +// NewTestExecutionChatBatchResult instantiates a new TestExecutionChatBatchResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionChatBatchResult(callExecutionIds []string, hasMore bool, batchedScenarios []string) *TestExecutionChatBatchResult { + this := TestExecutionChatBatchResult{} + this.CallExecutionIds = callExecutionIds + this.HasMore = hasMore + this.BatchedScenarios = batchedScenarios + return &this +} + +// NewTestExecutionChatBatchResultWithDefaults instantiates a new TestExecutionChatBatchResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionChatBatchResultWithDefaults() *TestExecutionChatBatchResult { + this := TestExecutionChatBatchResult{} + return &this +} + +// GetCallExecutionIds returns the CallExecutionIds field value +func (o *TestExecutionChatBatchResult) GetCallExecutionIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.CallExecutionIds +} + +// GetCallExecutionIdsOk returns a tuple with the CallExecutionIds field value +// and a boolean to check if the value has been set. +func (o *TestExecutionChatBatchResult) GetCallExecutionIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.CallExecutionIds, true +} + +// SetCallExecutionIds sets field value +func (o *TestExecutionChatBatchResult) SetCallExecutionIds(v []string) { + o.CallExecutionIds = v +} + +// GetHasMore returns the HasMore field value +func (o *TestExecutionChatBatchResult) GetHasMore() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value +// and a boolean to check if the value has been set. +func (o *TestExecutionChatBatchResult) GetHasMoreOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HasMore, true +} + +// SetHasMore sets field value +func (o *TestExecutionChatBatchResult) SetHasMore(v bool) { + o.HasMore = v +} + +// GetBatchedScenarios returns the BatchedScenarios field value +func (o *TestExecutionChatBatchResult) GetBatchedScenarios() []string { + if o == nil { + var ret []string + return ret + } + + return o.BatchedScenarios +} + +// GetBatchedScenariosOk returns a tuple with the BatchedScenarios field value +// and a boolean to check if the value has been set. +func (o *TestExecutionChatBatchResult) GetBatchedScenariosOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.BatchedScenarios, true +} + +// SetBatchedScenarios sets field value +func (o *TestExecutionChatBatchResult) SetBatchedScenarios(v []string) { + o.BatchedScenarios = v +} + +func (o TestExecutionChatBatchResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionChatBatchResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["call_execution_ids"] = o.CallExecutionIds + toSerialize["has_more"] = o.HasMore + toSerialize["batched_scenarios"] = o.BatchedScenarios + return toSerialize, nil +} + +func (o *TestExecutionChatBatchResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "call_execution_ids", + "has_more", + "batched_scenarios", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTestExecutionChatBatchResult := _TestExecutionChatBatchResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTestExecutionChatBatchResult) + + if err != nil { + return err + } + + *o = TestExecutionChatBatchResult(varTestExecutionChatBatchResult) + + return err +} + +type NullableTestExecutionChatBatchResult struct { + value *TestExecutionChatBatchResult + isSet bool +} + +func (v NullableTestExecutionChatBatchResult) Get() *TestExecutionChatBatchResult { + return v.value +} + +func (v *NullableTestExecutionChatBatchResult) Set(val *TestExecutionChatBatchResult) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionChatBatchResult) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionChatBatchResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionChatBatchResult(val *TestExecutionChatBatchResult) *NullableTestExecutionChatBatchResult { + return &NullableTestExecutionChatBatchResult{value: val, isSet: true} +} + +func (v NullableTestExecutionChatBatchResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionChatBatchResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_column_order.go b/go/futureagi/model_test_execution_column_order.go new file mode 100644 index 0000000..92967c8 --- /dev/null +++ b/go/futureagi/model_test_execution_column_order.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TestExecutionColumnOrder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionColumnOrder{} + +// TestExecutionColumnOrder struct for TestExecutionColumnOrder +type TestExecutionColumnOrder struct { + ColumnOrder []ColumnOrder `json:"column_order"` +} + +type _TestExecutionColumnOrder TestExecutionColumnOrder + +// NewTestExecutionColumnOrder instantiates a new TestExecutionColumnOrder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionColumnOrder(columnOrder []ColumnOrder) *TestExecutionColumnOrder { + this := TestExecutionColumnOrder{} + this.ColumnOrder = columnOrder + return &this +} + +// NewTestExecutionColumnOrderWithDefaults instantiates a new TestExecutionColumnOrder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionColumnOrderWithDefaults() *TestExecutionColumnOrder { + this := TestExecutionColumnOrder{} + return &this +} + +// GetColumnOrder returns the ColumnOrder field value +func (o *TestExecutionColumnOrder) GetColumnOrder() []ColumnOrder { + if o == nil { + var ret []ColumnOrder + return ret + } + + return o.ColumnOrder +} + +// GetColumnOrderOk returns a tuple with the ColumnOrder field value +// and a boolean to check if the value has been set. +func (o *TestExecutionColumnOrder) GetColumnOrderOk() ([]ColumnOrder, bool) { + if o == nil { + return nil, false + } + return o.ColumnOrder, true +} + +// SetColumnOrder sets field value +func (o *TestExecutionColumnOrder) SetColumnOrder(v []ColumnOrder) { + o.ColumnOrder = v +} + +func (o TestExecutionColumnOrder) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionColumnOrder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_order"] = o.ColumnOrder + return toSerialize, nil +} + +func (o *TestExecutionColumnOrder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTestExecutionColumnOrder := _TestExecutionColumnOrder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTestExecutionColumnOrder) + + if err != nil { + return err + } + + *o = TestExecutionColumnOrder(varTestExecutionColumnOrder) + + return err +} + +type NullableTestExecutionColumnOrder struct { + value *TestExecutionColumnOrder + isSet bool +} + +func (v NullableTestExecutionColumnOrder) Get() *TestExecutionColumnOrder { + return v.value +} + +func (v *NullableTestExecutionColumnOrder) Set(val *TestExecutionColumnOrder) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionColumnOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionColumnOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionColumnOrder(val *TestExecutionColumnOrder) *NullableTestExecutionColumnOrder { + return &NullableTestExecutionColumnOrder{value: val, isSet: true} +} + +func (v NullableTestExecutionColumnOrder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionColumnOrder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_column_order_response.go b/go/futureagi/model_test_execution_column_order_response.go new file mode 100644 index 0000000..64f6e9f --- /dev/null +++ b/go/futureagi/model_test_execution_column_order_response.go @@ -0,0 +1,161 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionColumnOrderResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionColumnOrderResponse{} + +// TestExecutionColumnOrderResponse struct for TestExecutionColumnOrderResponse +type TestExecutionColumnOrderResponse struct { + Message *string `json:"message,omitempty"` + ColumnOrder []ColumnOrder `json:"column_order,omitempty"` +} + +// NewTestExecutionColumnOrderResponse instantiates a new TestExecutionColumnOrderResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionColumnOrderResponse() *TestExecutionColumnOrderResponse { + this := TestExecutionColumnOrderResponse{} + return &this +} + +// NewTestExecutionColumnOrderResponseWithDefaults instantiates a new TestExecutionColumnOrderResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionColumnOrderResponseWithDefaults() *TestExecutionColumnOrderResponse { + this := TestExecutionColumnOrderResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *TestExecutionColumnOrderResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionColumnOrderResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *TestExecutionColumnOrderResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *TestExecutionColumnOrderResponse) SetMessage(v string) { + o.Message = &v +} + +// GetColumnOrder returns the ColumnOrder field value if set, zero value otherwise. +func (o *TestExecutionColumnOrderResponse) GetColumnOrder() []ColumnOrder { + if o == nil || IsNil(o.ColumnOrder) { + var ret []ColumnOrder + return ret + } + return o.ColumnOrder +} + +// GetColumnOrderOk returns a tuple with the ColumnOrder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionColumnOrderResponse) GetColumnOrderOk() ([]ColumnOrder, bool) { + if o == nil || IsNil(o.ColumnOrder) { + return nil, false + } + return o.ColumnOrder, true +} + +// HasColumnOrder returns a boolean if a field has been set. +func (o *TestExecutionColumnOrderResponse) HasColumnOrder() bool { + if o != nil && !IsNil(o.ColumnOrder) { + return true + } + + return false +} + +// SetColumnOrder gets a reference to the given []ColumnOrder and assigns it to the ColumnOrder field. +func (o *TestExecutionColumnOrderResponse) SetColumnOrder(v []ColumnOrder) { + o.ColumnOrder = v +} + +func (o TestExecutionColumnOrderResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionColumnOrderResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.ColumnOrder) { + toSerialize["column_order"] = o.ColumnOrder + } + return toSerialize, nil +} + +type NullableTestExecutionColumnOrderResponse struct { + value *TestExecutionColumnOrderResponse + isSet bool +} + +func (v NullableTestExecutionColumnOrderResponse) Get() *TestExecutionColumnOrderResponse { + return v.value +} + +func (v *NullableTestExecutionColumnOrderResponse) Set(val *TestExecutionColumnOrderResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionColumnOrderResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionColumnOrderResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionColumnOrderResponse(val *TestExecutionColumnOrderResponse) *NullableTestExecutionColumnOrderResponse { + return &NullableTestExecutionColumnOrderResponse{value: val, isSet: true} +} + +func (v NullableTestExecutionColumnOrderResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionColumnOrderResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_detail_response.go b/go/futureagi/model_test_execution_detail_response.go new file mode 100644 index 0000000..5d20af8 --- /dev/null +++ b/go/futureagi/model_test_execution_detail_response.go @@ -0,0 +1,508 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionDetailResponse{} + +// TestExecutionDetailResponse struct for TestExecutionDetailResponse +type TestExecutionDetailResponse struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + // Call execution rows may include dynamic eval/scenario columns. + Results []map[string]string `json:"results,omitempty"` + TotalPages *int32 `json:"total_pages,omitempty"` + CurrentPage *int32 `json:"current_page,omitempty"` + ColumnOrder []map[string]string `json:"column_order,omitempty"` + ErrorMessages []string `json:"error_messages,omitempty"` + Status *string `json:"status,omitempty"` + Provider *string `json:"provider,omitempty"` + AgentType *string `json:"agent_type,omitempty"` +} + +// NewTestExecutionDetailResponse instantiates a new TestExecutionDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionDetailResponse() *TestExecutionDetailResponse { + this := TestExecutionDetailResponse{} + return &this +} + +// NewTestExecutionDetailResponseWithDefaults instantiates a new TestExecutionDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionDetailResponseWithDefaults() *TestExecutionDetailResponse { + this := TestExecutionDetailResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *TestExecutionDetailResponse) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecutionDetailResponse) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionDetailResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *TestExecutionDetailResponse) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *TestExecutionDetailResponse) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *TestExecutionDetailResponse) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecutionDetailResponse) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionDetailResponse) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *TestExecutionDetailResponse) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *TestExecutionDetailResponse) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *TestExecutionDetailResponse) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetResults() []map[string]string { + if o == nil || IsNil(o.Results) { + var ret []map[string]string + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetResultsOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []map[string]string and assigns it to the Results field. +func (o *TestExecutionDetailResponse) SetResults(v []map[string]string) { + o.Results = v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetTotalPages() int32 { + if o == nil || IsNil(o.TotalPages) { + var ret int32 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetTotalPagesOk() (*int32, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field. +func (o *TestExecutionDetailResponse) SetTotalPages(v int32) { + o.TotalPages = &v +} + +// GetCurrentPage returns the CurrentPage field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetCurrentPage() int32 { + if o == nil || IsNil(o.CurrentPage) { + var ret int32 + return ret + } + return *o.CurrentPage +} + +// GetCurrentPageOk returns a tuple with the CurrentPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetCurrentPageOk() (*int32, bool) { + if o == nil || IsNil(o.CurrentPage) { + return nil, false + } + return o.CurrentPage, true +} + +// HasCurrentPage returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasCurrentPage() bool { + if o != nil && !IsNil(o.CurrentPage) { + return true + } + + return false +} + +// SetCurrentPage gets a reference to the given int32 and assigns it to the CurrentPage field. +func (o *TestExecutionDetailResponse) SetCurrentPage(v int32) { + o.CurrentPage = &v +} + +// GetColumnOrder returns the ColumnOrder field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetColumnOrder() []map[string]string { + if o == nil || IsNil(o.ColumnOrder) { + var ret []map[string]string + return ret + } + return o.ColumnOrder +} + +// GetColumnOrderOk returns a tuple with the ColumnOrder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetColumnOrderOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.ColumnOrder) { + return nil, false + } + return o.ColumnOrder, true +} + +// HasColumnOrder returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasColumnOrder() bool { + if o != nil && !IsNil(o.ColumnOrder) { + return true + } + + return false +} + +// SetColumnOrder gets a reference to the given []map[string]string and assigns it to the ColumnOrder field. +func (o *TestExecutionDetailResponse) SetColumnOrder(v []map[string]string) { + o.ColumnOrder = v +} + +// GetErrorMessages returns the ErrorMessages field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetErrorMessages() []string { + if o == nil || IsNil(o.ErrorMessages) { + var ret []string + return ret + } + return o.ErrorMessages +} + +// GetErrorMessagesOk returns a tuple with the ErrorMessages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetErrorMessagesOk() ([]string, bool) { + if o == nil || IsNil(o.ErrorMessages) { + return nil, false + } + return o.ErrorMessages, true +} + +// HasErrorMessages returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasErrorMessages() bool { + if o != nil && !IsNil(o.ErrorMessages) { + return true + } + + return false +} + +// SetErrorMessages gets a reference to the given []string and assigns it to the ErrorMessages field. +func (o *TestExecutionDetailResponse) SetErrorMessages(v []string) { + o.ErrorMessages = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TestExecutionDetailResponse) SetStatus(v string) { + o.Status = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetProvider() string { + if o == nil || IsNil(o.Provider) { + var ret string + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetProviderOk() (*string, bool) { + if o == nil || IsNil(o.Provider) { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasProvider() bool { + if o != nil && !IsNil(o.Provider) { + return true + } + + return false +} + +// SetProvider gets a reference to the given string and assigns it to the Provider field. +func (o *TestExecutionDetailResponse) SetProvider(v string) { + o.Provider = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *TestExecutionDetailResponse) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionDetailResponse) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *TestExecutionDetailResponse) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *TestExecutionDetailResponse) SetAgentType(v string) { + o.AgentType = &v +} + +func (o TestExecutionDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.CurrentPage) { + toSerialize["current_page"] = o.CurrentPage + } + if !IsNil(o.ColumnOrder) { + toSerialize["column_order"] = o.ColumnOrder + } + if !IsNil(o.ErrorMessages) { + toSerialize["error_messages"] = o.ErrorMessages + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Provider) { + toSerialize["provider"] = o.Provider + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + return toSerialize, nil +} + +type NullableTestExecutionDetailResponse struct { + value *TestExecutionDetailResponse + isSet bool +} + +func (v NullableTestExecutionDetailResponse) Get() *TestExecutionDetailResponse { + return v.value +} + +func (v *NullableTestExecutionDetailResponse) Set(val *TestExecutionDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionDetailResponse(val *TestExecutionDetailResponse) *NullableTestExecutionDetailResponse { + return &NullableTestExecutionDetailResponse{value: val, isSet: true} +} + +func (v NullableTestExecutionDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_item_response.go b/go/futureagi/model_test_execution_item_response.go new file mode 100644 index 0000000..156367a --- /dev/null +++ b/go/futureagi/model_test_execution_item_response.go @@ -0,0 +1,759 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionItemResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionItemResponse{} + +// TestExecutionItemResponse struct for TestExecutionItemResponse +type TestExecutionItemResponse struct { + Id *string `json:"id,omitempty"` + Status *string `json:"status,omitempty"` + Scenarios *string `json:"scenarios,omitempty"` + StartTime NullableString `json:"start_time,omitempty"` + Duration *int32 `json:"duration,omitempty"` + ErrorReason NullableString `json:"error_reason,omitempty"` + SuccessRate *float32 `json:"success_rate,omitempty"` + AvgResponseTime *float32 `json:"avg_response_time,omitempty"` + Calls *int32 `json:"calls,omitempty"` + CallsAttempted *int32 `json:"calls_attempted,omitempty"` + ConnectedCalls *int32 `json:"connected_calls,omitempty"` + AgentVersion *string `json:"agent_version,omitempty"` + AgentDefinition *string `json:"agent_definition,omitempty"` + CallsConnectedPercentage *float32 `json:"calls_connected_percentage,omitempty"` + TotalChats *int32 `json:"total_chats,omitempty"` + AgentType *string `json:"agent_type,omitempty"` + TotalNumberOfFagiAgentTurns *int32 `json:"total_number_of_fagi_agent_turns,omitempty"` + SourceType *string `json:"source_type,omitempty"` +} + +// NewTestExecutionItemResponse instantiates a new TestExecutionItemResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionItemResponse() *TestExecutionItemResponse { + this := TestExecutionItemResponse{} + return &this +} + +// NewTestExecutionItemResponseWithDefaults instantiates a new TestExecutionItemResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionItemResponseWithDefaults() *TestExecutionItemResponse { + this := TestExecutionItemResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TestExecutionItemResponse) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TestExecutionItemResponse) SetStatus(v string) { + o.Status = &v +} + +// GetScenarios returns the Scenarios field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetScenarios() string { + if o == nil || IsNil(o.Scenarios) { + var ret string + return ret + } + return *o.Scenarios +} + +// GetScenariosOk returns a tuple with the Scenarios field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetScenariosOk() (*string, bool) { + if o == nil || IsNil(o.Scenarios) { + return nil, false + } + return o.Scenarios, true +} + +// HasScenarios returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasScenarios() bool { + if o != nil && !IsNil(o.Scenarios) { + return true + } + + return false +} + +// SetScenarios gets a reference to the given string and assigns it to the Scenarios field. +func (o *TestExecutionItemResponse) SetScenarios(v string) { + o.Scenarios = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecutionItemResponse) GetStartTime() string { + if o == nil || IsNil(o.StartTime.Get()) { + var ret string + return ret + } + return *o.StartTime.Get() +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionItemResponse) GetStartTimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StartTime.Get(), o.StartTime.IsSet() +} + +// HasStartTime returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasStartTime() bool { + if o != nil && o.StartTime.IsSet() { + return true + } + + return false +} + +// SetStartTime gets a reference to the given NullableString and assigns it to the StartTime field. +func (o *TestExecutionItemResponse) SetStartTime(v string) { + o.StartTime.Set(&v) +} + +// SetStartTimeNil sets the value for StartTime to be an explicit nil +func (o *TestExecutionItemResponse) SetStartTimeNil() { + o.StartTime.Set(nil) +} + +// UnsetStartTime ensures that no value is present for StartTime, not even an explicit nil +func (o *TestExecutionItemResponse) UnsetStartTime() { + o.StartTime.Unset() +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetDuration() int32 { + if o == nil || IsNil(o.Duration) { + var ret int32 + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetDurationOk() (*int32, bool) { + if o == nil || IsNil(o.Duration) { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasDuration() bool { + if o != nil && !IsNil(o.Duration) { + return true + } + + return false +} + +// SetDuration gets a reference to the given int32 and assigns it to the Duration field. +func (o *TestExecutionItemResponse) SetDuration(v int32) { + o.Duration = &v +} + +// GetErrorReason returns the ErrorReason field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecutionItemResponse) GetErrorReason() string { + if o == nil || IsNil(o.ErrorReason.Get()) { + var ret string + return ret + } + return *o.ErrorReason.Get() +} + +// GetErrorReasonOk returns a tuple with the ErrorReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionItemResponse) GetErrorReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ErrorReason.Get(), o.ErrorReason.IsSet() +} + +// HasErrorReason returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasErrorReason() bool { + if o != nil && o.ErrorReason.IsSet() { + return true + } + + return false +} + +// SetErrorReason gets a reference to the given NullableString and assigns it to the ErrorReason field. +func (o *TestExecutionItemResponse) SetErrorReason(v string) { + o.ErrorReason.Set(&v) +} + +// SetErrorReasonNil sets the value for ErrorReason to be an explicit nil +func (o *TestExecutionItemResponse) SetErrorReasonNil() { + o.ErrorReason.Set(nil) +} + +// UnsetErrorReason ensures that no value is present for ErrorReason, not even an explicit nil +func (o *TestExecutionItemResponse) UnsetErrorReason() { + o.ErrorReason.Unset() +} + +// GetSuccessRate returns the SuccessRate field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetSuccessRate() float32 { + if o == nil || IsNil(o.SuccessRate) { + var ret float32 + return ret + } + return *o.SuccessRate +} + +// GetSuccessRateOk returns a tuple with the SuccessRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetSuccessRateOk() (*float32, bool) { + if o == nil || IsNil(o.SuccessRate) { + return nil, false + } + return o.SuccessRate, true +} + +// HasSuccessRate returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasSuccessRate() bool { + if o != nil && !IsNil(o.SuccessRate) { + return true + } + + return false +} + +// SetSuccessRate gets a reference to the given float32 and assigns it to the SuccessRate field. +func (o *TestExecutionItemResponse) SetSuccessRate(v float32) { + o.SuccessRate = &v +} + +// GetAvgResponseTime returns the AvgResponseTime field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetAvgResponseTime() float32 { + if o == nil || IsNil(o.AvgResponseTime) { + var ret float32 + return ret + } + return *o.AvgResponseTime +} + +// GetAvgResponseTimeOk returns a tuple with the AvgResponseTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetAvgResponseTimeOk() (*float32, bool) { + if o == nil || IsNil(o.AvgResponseTime) { + return nil, false + } + return o.AvgResponseTime, true +} + +// HasAvgResponseTime returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasAvgResponseTime() bool { + if o != nil && !IsNil(o.AvgResponseTime) { + return true + } + + return false +} + +// SetAvgResponseTime gets a reference to the given float32 and assigns it to the AvgResponseTime field. +func (o *TestExecutionItemResponse) SetAvgResponseTime(v float32) { + o.AvgResponseTime = &v +} + +// GetCalls returns the Calls field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetCalls() int32 { + if o == nil || IsNil(o.Calls) { + var ret int32 + return ret + } + return *o.Calls +} + +// GetCallsOk returns a tuple with the Calls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetCallsOk() (*int32, bool) { + if o == nil || IsNil(o.Calls) { + return nil, false + } + return o.Calls, true +} + +// HasCalls returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasCalls() bool { + if o != nil && !IsNil(o.Calls) { + return true + } + + return false +} + +// SetCalls gets a reference to the given int32 and assigns it to the Calls field. +func (o *TestExecutionItemResponse) SetCalls(v int32) { + o.Calls = &v +} + +// GetCallsAttempted returns the CallsAttempted field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetCallsAttempted() int32 { + if o == nil || IsNil(o.CallsAttempted) { + var ret int32 + return ret + } + return *o.CallsAttempted +} + +// GetCallsAttemptedOk returns a tuple with the CallsAttempted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetCallsAttemptedOk() (*int32, bool) { + if o == nil || IsNil(o.CallsAttempted) { + return nil, false + } + return o.CallsAttempted, true +} + +// HasCallsAttempted returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasCallsAttempted() bool { + if o != nil && !IsNil(o.CallsAttempted) { + return true + } + + return false +} + +// SetCallsAttempted gets a reference to the given int32 and assigns it to the CallsAttempted field. +func (o *TestExecutionItemResponse) SetCallsAttempted(v int32) { + o.CallsAttempted = &v +} + +// GetConnectedCalls returns the ConnectedCalls field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetConnectedCalls() int32 { + if o == nil || IsNil(o.ConnectedCalls) { + var ret int32 + return ret + } + return *o.ConnectedCalls +} + +// GetConnectedCallsOk returns a tuple with the ConnectedCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetConnectedCallsOk() (*int32, bool) { + if o == nil || IsNil(o.ConnectedCalls) { + return nil, false + } + return o.ConnectedCalls, true +} + +// HasConnectedCalls returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasConnectedCalls() bool { + if o != nil && !IsNil(o.ConnectedCalls) { + return true + } + + return false +} + +// SetConnectedCalls gets a reference to the given int32 and assigns it to the ConnectedCalls field. +func (o *TestExecutionItemResponse) SetConnectedCalls(v int32) { + o.ConnectedCalls = &v +} + +// GetAgentVersion returns the AgentVersion field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetAgentVersion() string { + if o == nil || IsNil(o.AgentVersion) { + var ret string + return ret + } + return *o.AgentVersion +} + +// GetAgentVersionOk returns a tuple with the AgentVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetAgentVersionOk() (*string, bool) { + if o == nil || IsNil(o.AgentVersion) { + return nil, false + } + return o.AgentVersion, true +} + +// HasAgentVersion returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasAgentVersion() bool { + if o != nil && !IsNil(o.AgentVersion) { + return true + } + + return false +} + +// SetAgentVersion gets a reference to the given string and assigns it to the AgentVersion field. +func (o *TestExecutionItemResponse) SetAgentVersion(v string) { + o.AgentVersion = &v +} + +// GetAgentDefinition returns the AgentDefinition field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetAgentDefinition() string { + if o == nil || IsNil(o.AgentDefinition) { + var ret string + return ret + } + return *o.AgentDefinition +} + +// GetAgentDefinitionOk returns a tuple with the AgentDefinition field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetAgentDefinitionOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinition) { + return nil, false + } + return o.AgentDefinition, true +} + +// HasAgentDefinition returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasAgentDefinition() bool { + if o != nil && !IsNil(o.AgentDefinition) { + return true + } + + return false +} + +// SetAgentDefinition gets a reference to the given string and assigns it to the AgentDefinition field. +func (o *TestExecutionItemResponse) SetAgentDefinition(v string) { + o.AgentDefinition = &v +} + +// GetCallsConnectedPercentage returns the CallsConnectedPercentage field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetCallsConnectedPercentage() float32 { + if o == nil || IsNil(o.CallsConnectedPercentage) { + var ret float32 + return ret + } + return *o.CallsConnectedPercentage +} + +// GetCallsConnectedPercentageOk returns a tuple with the CallsConnectedPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetCallsConnectedPercentageOk() (*float32, bool) { + if o == nil || IsNil(o.CallsConnectedPercentage) { + return nil, false + } + return o.CallsConnectedPercentage, true +} + +// HasCallsConnectedPercentage returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasCallsConnectedPercentage() bool { + if o != nil && !IsNil(o.CallsConnectedPercentage) { + return true + } + + return false +} + +// SetCallsConnectedPercentage gets a reference to the given float32 and assigns it to the CallsConnectedPercentage field. +func (o *TestExecutionItemResponse) SetCallsConnectedPercentage(v float32) { + o.CallsConnectedPercentage = &v +} + +// GetTotalChats returns the TotalChats field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetTotalChats() int32 { + if o == nil || IsNil(o.TotalChats) { + var ret int32 + return ret + } + return *o.TotalChats +} + +// GetTotalChatsOk returns a tuple with the TotalChats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetTotalChatsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalChats) { + return nil, false + } + return o.TotalChats, true +} + +// HasTotalChats returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasTotalChats() bool { + if o != nil && !IsNil(o.TotalChats) { + return true + } + + return false +} + +// SetTotalChats gets a reference to the given int32 and assigns it to the TotalChats field. +func (o *TestExecutionItemResponse) SetTotalChats(v int32) { + o.TotalChats = &v +} + +// GetAgentType returns the AgentType field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetAgentType() string { + if o == nil || IsNil(o.AgentType) { + var ret string + return ret + } + return *o.AgentType +} + +// GetAgentTypeOk returns a tuple with the AgentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetAgentTypeOk() (*string, bool) { + if o == nil || IsNil(o.AgentType) { + return nil, false + } + return o.AgentType, true +} + +// HasAgentType returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasAgentType() bool { + if o != nil && !IsNil(o.AgentType) { + return true + } + + return false +} + +// SetAgentType gets a reference to the given string and assigns it to the AgentType field. +func (o *TestExecutionItemResponse) SetAgentType(v string) { + o.AgentType = &v +} + +// GetTotalNumberOfFagiAgentTurns returns the TotalNumberOfFagiAgentTurns field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetTotalNumberOfFagiAgentTurns() int32 { + if o == nil || IsNil(o.TotalNumberOfFagiAgentTurns) { + var ret int32 + return ret + } + return *o.TotalNumberOfFagiAgentTurns +} + +// GetTotalNumberOfFagiAgentTurnsOk returns a tuple with the TotalNumberOfFagiAgentTurns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetTotalNumberOfFagiAgentTurnsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalNumberOfFagiAgentTurns) { + return nil, false + } + return o.TotalNumberOfFagiAgentTurns, true +} + +// HasTotalNumberOfFagiAgentTurns returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasTotalNumberOfFagiAgentTurns() bool { + if o != nil && !IsNil(o.TotalNumberOfFagiAgentTurns) { + return true + } + + return false +} + +// SetTotalNumberOfFagiAgentTurns gets a reference to the given int32 and assigns it to the TotalNumberOfFagiAgentTurns field. +func (o *TestExecutionItemResponse) SetTotalNumberOfFagiAgentTurns(v int32) { + o.TotalNumberOfFagiAgentTurns = &v +} + +// GetSourceType returns the SourceType field value if set, zero value otherwise. +func (o *TestExecutionItemResponse) GetSourceType() string { + if o == nil || IsNil(o.SourceType) { + var ret string + return ret + } + return *o.SourceType +} + +// GetSourceTypeOk returns a tuple with the SourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionItemResponse) GetSourceTypeOk() (*string, bool) { + if o == nil || IsNil(o.SourceType) { + return nil, false + } + return o.SourceType, true +} + +// HasSourceType returns a boolean if a field has been set. +func (o *TestExecutionItemResponse) HasSourceType() bool { + if o != nil && !IsNil(o.SourceType) { + return true + } + + return false +} + +// SetSourceType gets a reference to the given string and assigns it to the SourceType field. +func (o *TestExecutionItemResponse) SetSourceType(v string) { + o.SourceType = &v +} + +func (o TestExecutionItemResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionItemResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Scenarios) { + toSerialize["scenarios"] = o.Scenarios + } + if o.StartTime.IsSet() { + toSerialize["start_time"] = o.StartTime.Get() + } + if !IsNil(o.Duration) { + toSerialize["duration"] = o.Duration + } + if o.ErrorReason.IsSet() { + toSerialize["error_reason"] = o.ErrorReason.Get() + } + if !IsNil(o.SuccessRate) { + toSerialize["success_rate"] = o.SuccessRate + } + if !IsNil(o.AvgResponseTime) { + toSerialize["avg_response_time"] = o.AvgResponseTime + } + if !IsNil(o.Calls) { + toSerialize["calls"] = o.Calls + } + if !IsNil(o.CallsAttempted) { + toSerialize["calls_attempted"] = o.CallsAttempted + } + if !IsNil(o.ConnectedCalls) { + toSerialize["connected_calls"] = o.ConnectedCalls + } + if !IsNil(o.AgentVersion) { + toSerialize["agent_version"] = o.AgentVersion + } + if !IsNil(o.AgentDefinition) { + toSerialize["agent_definition"] = o.AgentDefinition + } + if !IsNil(o.CallsConnectedPercentage) { + toSerialize["calls_connected_percentage"] = o.CallsConnectedPercentage + } + if !IsNil(o.TotalChats) { + toSerialize["total_chats"] = o.TotalChats + } + if !IsNil(o.AgentType) { + toSerialize["agent_type"] = o.AgentType + } + if !IsNil(o.TotalNumberOfFagiAgentTurns) { + toSerialize["total_number_of_fagi_agent_turns"] = o.TotalNumberOfFagiAgentTurns + } + if !IsNil(o.SourceType) { + toSerialize["source_type"] = o.SourceType + } + return toSerialize, nil +} + +type NullableTestExecutionItemResponse struct { + value *TestExecutionItemResponse + isSet bool +} + +func (v NullableTestExecutionItemResponse) Get() *TestExecutionItemResponse { + return v.value +} + +func (v *NullableTestExecutionItemResponse) Set(val *TestExecutionItemResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionItemResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionItemResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionItemResponse(val *TestExecutionItemResponse) *NullableTestExecutionItemResponse { + return &NullableTestExecutionItemResponse{value: val, isSet: true} +} + +func (v NullableTestExecutionItemResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionItemResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_rerun.go b/go/futureagi/model_test_execution_rerun.go new file mode 100644 index 0000000..9f2c8cc --- /dev/null +++ b/go/futureagi/model_test_execution_rerun.go @@ -0,0 +1,236 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TestExecutionRerun type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionRerun{} + +// TestExecutionRerun struct for TestExecutionRerun +type TestExecutionRerun struct { + // Type of rerun: evaluation only or call plus evaluation + RerunType string `json:"rerun_type"` + // List of specific test execution IDs to rerun + TestExecutionIds []string `json:"test_execution_ids,omitempty"` + // Whether to rerun all test executions in the run test + SelectAll *bool `json:"select_all,omitempty"` +} + +type _TestExecutionRerun TestExecutionRerun + +// NewTestExecutionRerun instantiates a new TestExecutionRerun object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionRerun(rerunType string) *TestExecutionRerun { + this := TestExecutionRerun{} + this.RerunType = rerunType + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// NewTestExecutionRerunWithDefaults instantiates a new TestExecutionRerun object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionRerunWithDefaults() *TestExecutionRerun { + this := TestExecutionRerun{} + var selectAll bool = false + this.SelectAll = &selectAll + return &this +} + +// GetRerunType returns the RerunType field value +func (o *TestExecutionRerun) GetRerunType() string { + if o == nil { + var ret string + return ret + } + + return o.RerunType +} + +// GetRerunTypeOk returns a tuple with the RerunType field value +// and a boolean to check if the value has been set. +func (o *TestExecutionRerun) GetRerunTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RerunType, true +} + +// SetRerunType sets field value +func (o *TestExecutionRerun) SetRerunType(v string) { + o.RerunType = v +} + +// GetTestExecutionIds returns the TestExecutionIds field value if set, zero value otherwise. +func (o *TestExecutionRerun) GetTestExecutionIds() []string { + if o == nil || IsNil(o.TestExecutionIds) { + var ret []string + return ret + } + return o.TestExecutionIds +} + +// GetTestExecutionIdsOk returns a tuple with the TestExecutionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerun) GetTestExecutionIdsOk() ([]string, bool) { + if o == nil || IsNil(o.TestExecutionIds) { + return nil, false + } + return o.TestExecutionIds, true +} + +// HasTestExecutionIds returns a boolean if a field has been set. +func (o *TestExecutionRerun) HasTestExecutionIds() bool { + if o != nil && !IsNil(o.TestExecutionIds) { + return true + } + + return false +} + +// SetTestExecutionIds gets a reference to the given []string and assigns it to the TestExecutionIds field. +func (o *TestExecutionRerun) SetTestExecutionIds(v []string) { + o.TestExecutionIds = v +} + +// GetSelectAll returns the SelectAll field value if set, zero value otherwise. +func (o *TestExecutionRerun) GetSelectAll() bool { + if o == nil || IsNil(o.SelectAll) { + var ret bool + return ret + } + return *o.SelectAll +} + +// GetSelectAllOk returns a tuple with the SelectAll field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerun) GetSelectAllOk() (*bool, bool) { + if o == nil || IsNil(o.SelectAll) { + return nil, false + } + return o.SelectAll, true +} + +// HasSelectAll returns a boolean if a field has been set. +func (o *TestExecutionRerun) HasSelectAll() bool { + if o != nil && !IsNil(o.SelectAll) { + return true + } + + return false +} + +// SetSelectAll gets a reference to the given bool and assigns it to the SelectAll field. +func (o *TestExecutionRerun) SetSelectAll(v bool) { + o.SelectAll = &v +} + +func (o TestExecutionRerun) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionRerun) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["rerun_type"] = o.RerunType + if !IsNil(o.TestExecutionIds) { + toSerialize["test_execution_ids"] = o.TestExecutionIds + } + if !IsNil(o.SelectAll) { + toSerialize["select_all"] = o.SelectAll + } + return toSerialize, nil +} + +func (o *TestExecutionRerun) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rerun_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTestExecutionRerun := _TestExecutionRerun{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTestExecutionRerun) + + if err != nil { + return err + } + + *o = TestExecutionRerun(varTestExecutionRerun) + + return err +} + +type NullableTestExecutionRerun struct { + value *TestExecutionRerun + isSet bool +} + +func (v NullableTestExecutionRerun) Get() *TestExecutionRerun { + return v.value +} + +func (v *NullableTestExecutionRerun) Set(val *TestExecutionRerun) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionRerun) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionRerun) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionRerun(val *TestExecutionRerun) *NullableTestExecutionRerun { + return &NullableTestExecutionRerun{value: val, isSet: true} +} + +func (v NullableTestExecutionRerun) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionRerun) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_rerun_response.go b/go/futureagi/model_test_execution_rerun_response.go new file mode 100644 index 0000000..376656e --- /dev/null +++ b/go/futureagi/model_test_execution_rerun_response.go @@ -0,0 +1,341 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionRerunResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionRerunResponse{} + +// TestExecutionRerunResponse struct for TestExecutionRerunResponse +type TestExecutionRerunResponse struct { + Message *string `json:"message,omitempty"` + RunTestId *string `json:"run_test_id,omitempty"` + RerunType *string `json:"rerun_type,omitempty"` + TotalTestExecutions *int32 `json:"total_test_executions,omitempty"` + Results []TestExecutionRerunResult `json:"results,omitempty"` + OverallSuccessCount *int32 `json:"overall_success_count,omitempty"` + OverallFailureCount *int32 `json:"overall_failure_count,omitempty"` +} + +// NewTestExecutionRerunResponse instantiates a new TestExecutionRerunResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionRerunResponse() *TestExecutionRerunResponse { + this := TestExecutionRerunResponse{} + return &this +} + +// NewTestExecutionRerunResponseWithDefaults instantiates a new TestExecutionRerunResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionRerunResponseWithDefaults() *TestExecutionRerunResponse { + this := TestExecutionRerunResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *TestExecutionRerunResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *TestExecutionRerunResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *TestExecutionRerunResponse) SetMessage(v string) { + o.Message = &v +} + +// GetRunTestId returns the RunTestId field value if set, zero value otherwise. +func (o *TestExecutionRerunResponse) GetRunTestId() string { + if o == nil || IsNil(o.RunTestId) { + var ret string + return ret + } + return *o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResponse) GetRunTestIdOk() (*string, bool) { + if o == nil || IsNil(o.RunTestId) { + return nil, false + } + return o.RunTestId, true +} + +// HasRunTestId returns a boolean if a field has been set. +func (o *TestExecutionRerunResponse) HasRunTestId() bool { + if o != nil && !IsNil(o.RunTestId) { + return true + } + + return false +} + +// SetRunTestId gets a reference to the given string and assigns it to the RunTestId field. +func (o *TestExecutionRerunResponse) SetRunTestId(v string) { + o.RunTestId = &v +} + +// GetRerunType returns the RerunType field value if set, zero value otherwise. +func (o *TestExecutionRerunResponse) GetRerunType() string { + if o == nil || IsNil(o.RerunType) { + var ret string + return ret + } + return *o.RerunType +} + +// GetRerunTypeOk returns a tuple with the RerunType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResponse) GetRerunTypeOk() (*string, bool) { + if o == nil || IsNil(o.RerunType) { + return nil, false + } + return o.RerunType, true +} + +// HasRerunType returns a boolean if a field has been set. +func (o *TestExecutionRerunResponse) HasRerunType() bool { + if o != nil && !IsNil(o.RerunType) { + return true + } + + return false +} + +// SetRerunType gets a reference to the given string and assigns it to the RerunType field. +func (o *TestExecutionRerunResponse) SetRerunType(v string) { + o.RerunType = &v +} + +// GetTotalTestExecutions returns the TotalTestExecutions field value if set, zero value otherwise. +func (o *TestExecutionRerunResponse) GetTotalTestExecutions() int32 { + if o == nil || IsNil(o.TotalTestExecutions) { + var ret int32 + return ret + } + return *o.TotalTestExecutions +} + +// GetTotalTestExecutionsOk returns a tuple with the TotalTestExecutions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResponse) GetTotalTestExecutionsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalTestExecutions) { + return nil, false + } + return o.TotalTestExecutions, true +} + +// HasTotalTestExecutions returns a boolean if a field has been set. +func (o *TestExecutionRerunResponse) HasTotalTestExecutions() bool { + if o != nil && !IsNil(o.TotalTestExecutions) { + return true + } + + return false +} + +// SetTotalTestExecutions gets a reference to the given int32 and assigns it to the TotalTestExecutions field. +func (o *TestExecutionRerunResponse) SetTotalTestExecutions(v int32) { + o.TotalTestExecutions = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *TestExecutionRerunResponse) GetResults() []TestExecutionRerunResult { + if o == nil || IsNil(o.Results) { + var ret []TestExecutionRerunResult + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResponse) GetResultsOk() ([]TestExecutionRerunResult, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *TestExecutionRerunResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []TestExecutionRerunResult and assigns it to the Results field. +func (o *TestExecutionRerunResponse) SetResults(v []TestExecutionRerunResult) { + o.Results = v +} + +// GetOverallSuccessCount returns the OverallSuccessCount field value if set, zero value otherwise. +func (o *TestExecutionRerunResponse) GetOverallSuccessCount() int32 { + if o == nil || IsNil(o.OverallSuccessCount) { + var ret int32 + return ret + } + return *o.OverallSuccessCount +} + +// GetOverallSuccessCountOk returns a tuple with the OverallSuccessCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResponse) GetOverallSuccessCountOk() (*int32, bool) { + if o == nil || IsNil(o.OverallSuccessCount) { + return nil, false + } + return o.OverallSuccessCount, true +} + +// HasOverallSuccessCount returns a boolean if a field has been set. +func (o *TestExecutionRerunResponse) HasOverallSuccessCount() bool { + if o != nil && !IsNil(o.OverallSuccessCount) { + return true + } + + return false +} + +// SetOverallSuccessCount gets a reference to the given int32 and assigns it to the OverallSuccessCount field. +func (o *TestExecutionRerunResponse) SetOverallSuccessCount(v int32) { + o.OverallSuccessCount = &v +} + +// GetOverallFailureCount returns the OverallFailureCount field value if set, zero value otherwise. +func (o *TestExecutionRerunResponse) GetOverallFailureCount() int32 { + if o == nil || IsNil(o.OverallFailureCount) { + var ret int32 + return ret + } + return *o.OverallFailureCount +} + +// GetOverallFailureCountOk returns a tuple with the OverallFailureCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResponse) GetOverallFailureCountOk() (*int32, bool) { + if o == nil || IsNil(o.OverallFailureCount) { + return nil, false + } + return o.OverallFailureCount, true +} + +// HasOverallFailureCount returns a boolean if a field has been set. +func (o *TestExecutionRerunResponse) HasOverallFailureCount() bool { + if o != nil && !IsNil(o.OverallFailureCount) { + return true + } + + return false +} + +// SetOverallFailureCount gets a reference to the given int32 and assigns it to the OverallFailureCount field. +func (o *TestExecutionRerunResponse) SetOverallFailureCount(v int32) { + o.OverallFailureCount = &v +} + +func (o TestExecutionRerunResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionRerunResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.RunTestId) { + toSerialize["run_test_id"] = o.RunTestId + } + if !IsNil(o.RerunType) { + toSerialize["rerun_type"] = o.RerunType + } + if !IsNil(o.TotalTestExecutions) { + toSerialize["total_test_executions"] = o.TotalTestExecutions + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + if !IsNil(o.OverallSuccessCount) { + toSerialize["overall_success_count"] = o.OverallSuccessCount + } + if !IsNil(o.OverallFailureCount) { + toSerialize["overall_failure_count"] = o.OverallFailureCount + } + return toSerialize, nil +} + +type NullableTestExecutionRerunResponse struct { + value *TestExecutionRerunResponse + isSet bool +} + +func (v NullableTestExecutionRerunResponse) Get() *TestExecutionRerunResponse { + return v.value +} + +func (v *NullableTestExecutionRerunResponse) Set(val *TestExecutionRerunResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionRerunResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionRerunResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionRerunResponse(val *TestExecutionRerunResponse) *NullableTestExecutionRerunResponse { + return &NullableTestExecutionRerunResponse{value: val, isSet: true} +} + +func (v NullableTestExecutionRerunResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionRerunResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_rerun_result.go b/go/futureagi/model_test_execution_rerun_result.go new file mode 100644 index 0000000..f317840 --- /dev/null +++ b/go/futureagi/model_test_execution_rerun_result.go @@ -0,0 +1,341 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionRerunResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionRerunResult{} + +// TestExecutionRerunResult struct for TestExecutionRerunResult +type TestExecutionRerunResult struct { + TestExecutionId *string `json:"test_execution_id,omitempty"` + SuccessCount *int32 `json:"success_count,omitempty"` + FailureCount *int32 `json:"failure_count,omitempty"` + SuccessfulReruns []string `json:"successful_reruns,omitempty"` + FailedReruns []map[string]string `json:"failed_reruns,omitempty"` + Skipped *bool `json:"skipped,omitempty"` + Reason *string `json:"reason,omitempty"` +} + +// NewTestExecutionRerunResult instantiates a new TestExecutionRerunResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionRerunResult() *TestExecutionRerunResult { + this := TestExecutionRerunResult{} + return &this +} + +// NewTestExecutionRerunResultWithDefaults instantiates a new TestExecutionRerunResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionRerunResultWithDefaults() *TestExecutionRerunResult { + this := TestExecutionRerunResult{} + return &this +} + +// GetTestExecutionId returns the TestExecutionId field value if set, zero value otherwise. +func (o *TestExecutionRerunResult) GetTestExecutionId() string { + if o == nil || IsNil(o.TestExecutionId) { + var ret string + return ret + } + return *o.TestExecutionId +} + +// GetTestExecutionIdOk returns a tuple with the TestExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResult) GetTestExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.TestExecutionId) { + return nil, false + } + return o.TestExecutionId, true +} + +// HasTestExecutionId returns a boolean if a field has been set. +func (o *TestExecutionRerunResult) HasTestExecutionId() bool { + if o != nil && !IsNil(o.TestExecutionId) { + return true + } + + return false +} + +// SetTestExecutionId gets a reference to the given string and assigns it to the TestExecutionId field. +func (o *TestExecutionRerunResult) SetTestExecutionId(v string) { + o.TestExecutionId = &v +} + +// GetSuccessCount returns the SuccessCount field value if set, zero value otherwise. +func (o *TestExecutionRerunResult) GetSuccessCount() int32 { + if o == nil || IsNil(o.SuccessCount) { + var ret int32 + return ret + } + return *o.SuccessCount +} + +// GetSuccessCountOk returns a tuple with the SuccessCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResult) GetSuccessCountOk() (*int32, bool) { + if o == nil || IsNil(o.SuccessCount) { + return nil, false + } + return o.SuccessCount, true +} + +// HasSuccessCount returns a boolean if a field has been set. +func (o *TestExecutionRerunResult) HasSuccessCount() bool { + if o != nil && !IsNil(o.SuccessCount) { + return true + } + + return false +} + +// SetSuccessCount gets a reference to the given int32 and assigns it to the SuccessCount field. +func (o *TestExecutionRerunResult) SetSuccessCount(v int32) { + o.SuccessCount = &v +} + +// GetFailureCount returns the FailureCount field value if set, zero value otherwise. +func (o *TestExecutionRerunResult) GetFailureCount() int32 { + if o == nil || IsNil(o.FailureCount) { + var ret int32 + return ret + } + return *o.FailureCount +} + +// GetFailureCountOk returns a tuple with the FailureCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResult) GetFailureCountOk() (*int32, bool) { + if o == nil || IsNil(o.FailureCount) { + return nil, false + } + return o.FailureCount, true +} + +// HasFailureCount returns a boolean if a field has been set. +func (o *TestExecutionRerunResult) HasFailureCount() bool { + if o != nil && !IsNil(o.FailureCount) { + return true + } + + return false +} + +// SetFailureCount gets a reference to the given int32 and assigns it to the FailureCount field. +func (o *TestExecutionRerunResult) SetFailureCount(v int32) { + o.FailureCount = &v +} + +// GetSuccessfulReruns returns the SuccessfulReruns field value if set, zero value otherwise. +func (o *TestExecutionRerunResult) GetSuccessfulReruns() []string { + if o == nil || IsNil(o.SuccessfulReruns) { + var ret []string + return ret + } + return o.SuccessfulReruns +} + +// GetSuccessfulRerunsOk returns a tuple with the SuccessfulReruns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResult) GetSuccessfulRerunsOk() ([]string, bool) { + if o == nil || IsNil(o.SuccessfulReruns) { + return nil, false + } + return o.SuccessfulReruns, true +} + +// HasSuccessfulReruns returns a boolean if a field has been set. +func (o *TestExecutionRerunResult) HasSuccessfulReruns() bool { + if o != nil && !IsNil(o.SuccessfulReruns) { + return true + } + + return false +} + +// SetSuccessfulReruns gets a reference to the given []string and assigns it to the SuccessfulReruns field. +func (o *TestExecutionRerunResult) SetSuccessfulReruns(v []string) { + o.SuccessfulReruns = v +} + +// GetFailedReruns returns the FailedReruns field value if set, zero value otherwise. +func (o *TestExecutionRerunResult) GetFailedReruns() []map[string]string { + if o == nil || IsNil(o.FailedReruns) { + var ret []map[string]string + return ret + } + return o.FailedReruns +} + +// GetFailedRerunsOk returns a tuple with the FailedReruns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResult) GetFailedRerunsOk() ([]map[string]string, bool) { + if o == nil || IsNil(o.FailedReruns) { + return nil, false + } + return o.FailedReruns, true +} + +// HasFailedReruns returns a boolean if a field has been set. +func (o *TestExecutionRerunResult) HasFailedReruns() bool { + if o != nil && !IsNil(o.FailedReruns) { + return true + } + + return false +} + +// SetFailedReruns gets a reference to the given []map[string]string and assigns it to the FailedReruns field. +func (o *TestExecutionRerunResult) SetFailedReruns(v []map[string]string) { + o.FailedReruns = v +} + +// GetSkipped returns the Skipped field value if set, zero value otherwise. +func (o *TestExecutionRerunResult) GetSkipped() bool { + if o == nil || IsNil(o.Skipped) { + var ret bool + return ret + } + return *o.Skipped +} + +// GetSkippedOk returns a tuple with the Skipped field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResult) GetSkippedOk() (*bool, bool) { + if o == nil || IsNil(o.Skipped) { + return nil, false + } + return o.Skipped, true +} + +// HasSkipped returns a boolean if a field has been set. +func (o *TestExecutionRerunResult) HasSkipped() bool { + if o != nil && !IsNil(o.Skipped) { + return true + } + + return false +} + +// SetSkipped gets a reference to the given bool and assigns it to the Skipped field. +func (o *TestExecutionRerunResult) SetSkipped(v bool) { + o.Skipped = &v +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *TestExecutionRerunResult) GetReason() string { + if o == nil || IsNil(o.Reason) { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionRerunResult) GetReasonOk() (*string, bool) { + if o == nil || IsNil(o.Reason) { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *TestExecutionRerunResult) HasReason() bool { + if o != nil && !IsNil(o.Reason) { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *TestExecutionRerunResult) SetReason(v string) { + o.Reason = &v +} + +func (o TestExecutionRerunResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionRerunResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TestExecutionId) { + toSerialize["test_execution_id"] = o.TestExecutionId + } + if !IsNil(o.SuccessCount) { + toSerialize["success_count"] = o.SuccessCount + } + if !IsNil(o.FailureCount) { + toSerialize["failure_count"] = o.FailureCount + } + if !IsNil(o.SuccessfulReruns) { + toSerialize["successful_reruns"] = o.SuccessfulReruns + } + if !IsNil(o.FailedReruns) { + toSerialize["failed_reruns"] = o.FailedReruns + } + if !IsNil(o.Skipped) { + toSerialize["skipped"] = o.Skipped + } + if !IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + return toSerialize, nil +} + +type NullableTestExecutionRerunResult struct { + value *TestExecutionRerunResult + isSet bool +} + +func (v NullableTestExecutionRerunResult) Get() *TestExecutionRerunResult { + return v.value +} + +func (v *NullableTestExecutionRerunResult) Set(val *TestExecutionRerunResult) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionRerunResult) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionRerunResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionRerunResult(val *TestExecutionRerunResult) *NullableTestExecutionRerunResult { + return &NullableTestExecutionRerunResult{value: val, isSet: true} +} + +func (v NullableTestExecutionRerunResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionRerunResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_status_summary.go b/go/futureagi/model_test_execution_status_summary.go new file mode 100644 index 0000000..e237f9e --- /dev/null +++ b/go/futureagi/model_test_execution_status_summary.go @@ -0,0 +1,470 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TestExecutionStatusSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionStatusSummary{} + +// TestExecutionStatusSummary struct for TestExecutionStatusSummary +type TestExecutionStatusSummary struct { + RunTestId string `json:"run_test_id"` + ExecutionId string `json:"execution_id"` + Status string `json:"status"` + TotalScenarios int32 `json:"total_scenarios"` + TotalCalls int32 `json:"total_calls"` + CompletedCalls int32 `json:"completed_calls"` + FailedCalls int32 `json:"failed_calls"` + SuccessRate float32 `json:"success_rate"` + StartTime time.Time `json:"start_time"` + EndTime NullableTime `json:"end_time"` + Scenarios []map[string]string `json:"scenarios"` + Error NullableString `json:"error"` +} + +type _TestExecutionStatusSummary TestExecutionStatusSummary + +// NewTestExecutionStatusSummary instantiates a new TestExecutionStatusSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionStatusSummary(runTestId string, executionId string, status string, totalScenarios int32, totalCalls int32, completedCalls int32, failedCalls int32, successRate float32, startTime time.Time, endTime NullableTime, scenarios []map[string]string, error_ NullableString) *TestExecutionStatusSummary { + this := TestExecutionStatusSummary{} + this.RunTestId = runTestId + this.ExecutionId = executionId + this.Status = status + this.TotalScenarios = totalScenarios + this.TotalCalls = totalCalls + this.CompletedCalls = completedCalls + this.FailedCalls = failedCalls + this.SuccessRate = successRate + this.StartTime = startTime + this.EndTime = endTime + this.Scenarios = scenarios + this.Error = error_ + return &this +} + +// NewTestExecutionStatusSummaryWithDefaults instantiates a new TestExecutionStatusSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionStatusSummaryWithDefaults() *TestExecutionStatusSummary { + this := TestExecutionStatusSummary{} + return &this +} + +// GetRunTestId returns the RunTestId field value +func (o *TestExecutionStatusSummary) GetRunTestId() string { + if o == nil { + var ret string + return ret + } + + return o.RunTestId +} + +// GetRunTestIdOk returns a tuple with the RunTestId field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetRunTestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RunTestId, true +} + +// SetRunTestId sets field value +func (o *TestExecutionStatusSummary) SetRunTestId(v string) { + o.RunTestId = v +} + +// GetExecutionId returns the ExecutionId field value +func (o *TestExecutionStatusSummary) GetExecutionId() string { + if o == nil { + var ret string + return ret + } + + return o.ExecutionId +} + +// GetExecutionIdOk returns a tuple with the ExecutionId field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetExecutionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionId, true +} + +// SetExecutionId sets field value +func (o *TestExecutionStatusSummary) SetExecutionId(v string) { + o.ExecutionId = v +} + +// GetStatus returns the Status field value +func (o *TestExecutionStatusSummary) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TestExecutionStatusSummary) SetStatus(v string) { + o.Status = v +} + +// GetTotalScenarios returns the TotalScenarios field value +func (o *TestExecutionStatusSummary) GetTotalScenarios() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalScenarios +} + +// GetTotalScenariosOk returns a tuple with the TotalScenarios field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetTotalScenariosOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalScenarios, true +} + +// SetTotalScenarios sets field value +func (o *TestExecutionStatusSummary) SetTotalScenarios(v int32) { + o.TotalScenarios = v +} + +// GetTotalCalls returns the TotalCalls field value +func (o *TestExecutionStatusSummary) GetTotalCalls() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetTotalCallsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalCalls, true +} + +// SetTotalCalls sets field value +func (o *TestExecutionStatusSummary) SetTotalCalls(v int32) { + o.TotalCalls = v +} + +// GetCompletedCalls returns the CompletedCalls field value +func (o *TestExecutionStatusSummary) GetCompletedCalls() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CompletedCalls +} + +// GetCompletedCallsOk returns a tuple with the CompletedCalls field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetCompletedCallsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CompletedCalls, true +} + +// SetCompletedCalls sets field value +func (o *TestExecutionStatusSummary) SetCompletedCalls(v int32) { + o.CompletedCalls = v +} + +// GetFailedCalls returns the FailedCalls field value +func (o *TestExecutionStatusSummary) GetFailedCalls() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FailedCalls +} + +// GetFailedCallsOk returns a tuple with the FailedCalls field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetFailedCallsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FailedCalls, true +} + +// SetFailedCalls sets field value +func (o *TestExecutionStatusSummary) SetFailedCalls(v int32) { + o.FailedCalls = v +} + +// GetSuccessRate returns the SuccessRate field value +func (o *TestExecutionStatusSummary) GetSuccessRate() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.SuccessRate +} + +// GetSuccessRateOk returns a tuple with the SuccessRate field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetSuccessRateOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.SuccessRate, true +} + +// SetSuccessRate sets field value +func (o *TestExecutionStatusSummary) SetSuccessRate(v float32) { + o.SuccessRate = v +} + +// GetStartTime returns the StartTime field value +func (o *TestExecutionStatusSummary) GetStartTime() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetStartTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.StartTime, true +} + +// SetStartTime sets field value +func (o *TestExecutionStatusSummary) SetStartTime(v time.Time) { + o.StartTime = v +} + +// GetEndTime returns the EndTime field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *TestExecutionStatusSummary) GetEndTime() time.Time { + if o == nil || o.EndTime.Get() == nil { + var ret time.Time + return ret + } + + return *o.EndTime.Get() +} + +// GetEndTimeOk returns a tuple with the EndTime field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionStatusSummary) GetEndTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.EndTime.Get(), o.EndTime.IsSet() +} + +// SetEndTime sets field value +func (o *TestExecutionStatusSummary) SetEndTime(v time.Time) { + o.EndTime.Set(&v) +} + +// GetScenarios returns the Scenarios field value +func (o *TestExecutionStatusSummary) GetScenarios() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.Scenarios +} + +// GetScenariosOk returns a tuple with the Scenarios field value +// and a boolean to check if the value has been set. +func (o *TestExecutionStatusSummary) GetScenariosOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.Scenarios, true +} + +// SetScenarios sets field value +func (o *TestExecutionStatusSummary) SetScenarios(v []map[string]string) { + o.Scenarios = v +} + +// GetError returns the Error field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TestExecutionStatusSummary) GetError() string { + if o == nil || o.Error.Get() == nil { + var ret string + return ret + } + + return *o.Error.Get() +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionStatusSummary) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error.Get(), o.Error.IsSet() +} + +// SetError sets field value +func (o *TestExecutionStatusSummary) SetError(v string) { + o.Error.Set(&v) +} + +func (o TestExecutionStatusSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionStatusSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["run_test_id"] = o.RunTestId + toSerialize["execution_id"] = o.ExecutionId + toSerialize["status"] = o.Status + toSerialize["total_scenarios"] = o.TotalScenarios + toSerialize["total_calls"] = o.TotalCalls + toSerialize["completed_calls"] = o.CompletedCalls + toSerialize["failed_calls"] = o.FailedCalls + toSerialize["success_rate"] = o.SuccessRate + toSerialize["start_time"] = o.StartTime + toSerialize["end_time"] = o.EndTime.Get() + toSerialize["scenarios"] = o.Scenarios + toSerialize["error"] = o.Error.Get() + return toSerialize, nil +} + +func (o *TestExecutionStatusSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "run_test_id", + "execution_id", + "status", + "total_scenarios", + "total_calls", + "completed_calls", + "failed_calls", + "success_rate", + "start_time", + "end_time", + "scenarios", + "error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTestExecutionStatusSummary := _TestExecutionStatusSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTestExecutionStatusSummary) + + if err != nil { + return err + } + + *o = TestExecutionStatusSummary(varTestExecutionStatusSummary) + + return err +} + +type NullableTestExecutionStatusSummary struct { + value *TestExecutionStatusSummary + isSet bool +} + +func (v NullableTestExecutionStatusSummary) Get() *TestExecutionStatusSummary { + return v.value +} + +func (v *NullableTestExecutionStatusSummary) Set(val *TestExecutionStatusSummary) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionStatusSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionStatusSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionStatusSummary(val *TestExecutionStatusSummary) *NullableTestExecutionStatusSummary { + return &NullableTestExecutionStatusSummary{value: val, isSet: true} +} + +func (v NullableTestExecutionStatusSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionStatusSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_transcript_call.go b/go/futureagi/model_test_execution_transcript_call.go new file mode 100644 index 0000000..d283f6d --- /dev/null +++ b/go/futureagi/model_test_execution_transcript_call.go @@ -0,0 +1,327 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionTranscriptCall type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionTranscriptCall{} + +// TestExecutionTranscriptCall struct for TestExecutionTranscriptCall +type TestExecutionTranscriptCall struct { + CallExecutionId *string `json:"call_execution_id,omitempty"` + PhoneNumber NullableString `json:"phone_number,omitempty"` + Status *string `json:"status,omitempty"` + Transcripts []CallTranscript `json:"transcripts,omitempty"` + TotalTranscripts *int32 `json:"total_transcripts,omitempty"` + ScenarioName NullableString `json:"scenario_name,omitempty"` +} + +// NewTestExecutionTranscriptCall instantiates a new TestExecutionTranscriptCall object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionTranscriptCall() *TestExecutionTranscriptCall { + this := TestExecutionTranscriptCall{} + return &this +} + +// NewTestExecutionTranscriptCallWithDefaults instantiates a new TestExecutionTranscriptCall object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionTranscriptCallWithDefaults() *TestExecutionTranscriptCall { + this := TestExecutionTranscriptCall{} + return &this +} + +// GetCallExecutionId returns the CallExecutionId field value if set, zero value otherwise. +func (o *TestExecutionTranscriptCall) GetCallExecutionId() string { + if o == nil || IsNil(o.CallExecutionId) { + var ret string + return ret + } + return *o.CallExecutionId +} + +// GetCallExecutionIdOk returns a tuple with the CallExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptCall) GetCallExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.CallExecutionId) { + return nil, false + } + return o.CallExecutionId, true +} + +// HasCallExecutionId returns a boolean if a field has been set. +func (o *TestExecutionTranscriptCall) HasCallExecutionId() bool { + if o != nil && !IsNil(o.CallExecutionId) { + return true + } + + return false +} + +// SetCallExecutionId gets a reference to the given string and assigns it to the CallExecutionId field. +func (o *TestExecutionTranscriptCall) SetCallExecutionId(v string) { + o.CallExecutionId = &v +} + +// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecutionTranscriptCall) GetPhoneNumber() string { + if o == nil || IsNil(o.PhoneNumber.Get()) { + var ret string + return ret + } + return *o.PhoneNumber.Get() +} + +// GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionTranscriptCall) GetPhoneNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PhoneNumber.Get(), o.PhoneNumber.IsSet() +} + +// HasPhoneNumber returns a boolean if a field has been set. +func (o *TestExecutionTranscriptCall) HasPhoneNumber() bool { + if o != nil && o.PhoneNumber.IsSet() { + return true + } + + return false +} + +// SetPhoneNumber gets a reference to the given NullableString and assigns it to the PhoneNumber field. +func (o *TestExecutionTranscriptCall) SetPhoneNumber(v string) { + o.PhoneNumber.Set(&v) +} + +// SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil +func (o *TestExecutionTranscriptCall) SetPhoneNumberNil() { + o.PhoneNumber.Set(nil) +} + +// UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil +func (o *TestExecutionTranscriptCall) UnsetPhoneNumber() { + o.PhoneNumber.Unset() +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TestExecutionTranscriptCall) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptCall) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TestExecutionTranscriptCall) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TestExecutionTranscriptCall) SetStatus(v string) { + o.Status = &v +} + +// GetTranscripts returns the Transcripts field value if set, zero value otherwise. +func (o *TestExecutionTranscriptCall) GetTranscripts() []CallTranscript { + if o == nil || IsNil(o.Transcripts) { + var ret []CallTranscript + return ret + } + return o.Transcripts +} + +// GetTranscriptsOk returns a tuple with the Transcripts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptCall) GetTranscriptsOk() ([]CallTranscript, bool) { + if o == nil || IsNil(o.Transcripts) { + return nil, false + } + return o.Transcripts, true +} + +// HasTranscripts returns a boolean if a field has been set. +func (o *TestExecutionTranscriptCall) HasTranscripts() bool { + if o != nil && !IsNil(o.Transcripts) { + return true + } + + return false +} + +// SetTranscripts gets a reference to the given []CallTranscript and assigns it to the Transcripts field. +func (o *TestExecutionTranscriptCall) SetTranscripts(v []CallTranscript) { + o.Transcripts = v +} + +// GetTotalTranscripts returns the TotalTranscripts field value if set, zero value otherwise. +func (o *TestExecutionTranscriptCall) GetTotalTranscripts() int32 { + if o == nil || IsNil(o.TotalTranscripts) { + var ret int32 + return ret + } + return *o.TotalTranscripts +} + +// GetTotalTranscriptsOk returns a tuple with the TotalTranscripts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptCall) GetTotalTranscriptsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalTranscripts) { + return nil, false + } + return o.TotalTranscripts, true +} + +// HasTotalTranscripts returns a boolean if a field has been set. +func (o *TestExecutionTranscriptCall) HasTotalTranscripts() bool { + if o != nil && !IsNil(o.TotalTranscripts) { + return true + } + + return false +} + +// SetTotalTranscripts gets a reference to the given int32 and assigns it to the TotalTranscripts field. +func (o *TestExecutionTranscriptCall) SetTotalTranscripts(v int32) { + o.TotalTranscripts = &v +} + +// GetScenarioName returns the ScenarioName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TestExecutionTranscriptCall) GetScenarioName() string { + if o == nil || IsNil(o.ScenarioName.Get()) { + var ret string + return ret + } + return *o.ScenarioName.Get() +} + +// GetScenarioNameOk returns a tuple with the ScenarioName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TestExecutionTranscriptCall) GetScenarioNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ScenarioName.Get(), o.ScenarioName.IsSet() +} + +// HasScenarioName returns a boolean if a field has been set. +func (o *TestExecutionTranscriptCall) HasScenarioName() bool { + if o != nil && o.ScenarioName.IsSet() { + return true + } + + return false +} + +// SetScenarioName gets a reference to the given NullableString and assigns it to the ScenarioName field. +func (o *TestExecutionTranscriptCall) SetScenarioName(v string) { + o.ScenarioName.Set(&v) +} + +// SetScenarioNameNil sets the value for ScenarioName to be an explicit nil +func (o *TestExecutionTranscriptCall) SetScenarioNameNil() { + o.ScenarioName.Set(nil) +} + +// UnsetScenarioName ensures that no value is present for ScenarioName, not even an explicit nil +func (o *TestExecutionTranscriptCall) UnsetScenarioName() { + o.ScenarioName.Unset() +} + +func (o TestExecutionTranscriptCall) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionTranscriptCall) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallExecutionId) { + toSerialize["call_execution_id"] = o.CallExecutionId + } + if o.PhoneNumber.IsSet() { + toSerialize["phone_number"] = o.PhoneNumber.Get() + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Transcripts) { + toSerialize["transcripts"] = o.Transcripts + } + if !IsNil(o.TotalTranscripts) { + toSerialize["total_transcripts"] = o.TotalTranscripts + } + if o.ScenarioName.IsSet() { + toSerialize["scenario_name"] = o.ScenarioName.Get() + } + return toSerialize, nil +} + +type NullableTestExecutionTranscriptCall struct { + value *TestExecutionTranscriptCall + isSet bool +} + +func (v NullableTestExecutionTranscriptCall) Get() *TestExecutionTranscriptCall { + return v.value +} + +func (v *NullableTestExecutionTranscriptCall) Set(val *TestExecutionTranscriptCall) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionTranscriptCall) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionTranscriptCall) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionTranscriptCall(val *TestExecutionTranscriptCall) *NullableTestExecutionTranscriptCall { + return &NullableTestExecutionTranscriptCall{value: val, isSet: true} +} + +func (v NullableTestExecutionTranscriptCall) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionTranscriptCall) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_test_execution_transcripts_response.go b/go/futureagi/model_test_execution_transcripts_response.go new file mode 100644 index 0000000..2cccbcc --- /dev/null +++ b/go/futureagi/model_test_execution_transcripts_response.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the TestExecutionTranscriptsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestExecutionTranscriptsResponse{} + +// TestExecutionTranscriptsResponse struct for TestExecutionTranscriptsResponse +type TestExecutionTranscriptsResponse struct { + TestExecutionId *string `json:"test_execution_id,omitempty"` + Calls []TestExecutionTranscriptCall `json:"calls,omitempty"` + TotalCalls *int32 `json:"total_calls,omitempty"` + TotalTranscripts *int32 `json:"total_transcripts,omitempty"` +} + +// NewTestExecutionTranscriptsResponse instantiates a new TestExecutionTranscriptsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTestExecutionTranscriptsResponse() *TestExecutionTranscriptsResponse { + this := TestExecutionTranscriptsResponse{} + return &this +} + +// NewTestExecutionTranscriptsResponseWithDefaults instantiates a new TestExecutionTranscriptsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTestExecutionTranscriptsResponseWithDefaults() *TestExecutionTranscriptsResponse { + this := TestExecutionTranscriptsResponse{} + return &this +} + +// GetTestExecutionId returns the TestExecutionId field value if set, zero value otherwise. +func (o *TestExecutionTranscriptsResponse) GetTestExecutionId() string { + if o == nil || IsNil(o.TestExecutionId) { + var ret string + return ret + } + return *o.TestExecutionId +} + +// GetTestExecutionIdOk returns a tuple with the TestExecutionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptsResponse) GetTestExecutionIdOk() (*string, bool) { + if o == nil || IsNil(o.TestExecutionId) { + return nil, false + } + return o.TestExecutionId, true +} + +// HasTestExecutionId returns a boolean if a field has been set. +func (o *TestExecutionTranscriptsResponse) HasTestExecutionId() bool { + if o != nil && !IsNil(o.TestExecutionId) { + return true + } + + return false +} + +// SetTestExecutionId gets a reference to the given string and assigns it to the TestExecutionId field. +func (o *TestExecutionTranscriptsResponse) SetTestExecutionId(v string) { + o.TestExecutionId = &v +} + +// GetCalls returns the Calls field value if set, zero value otherwise. +func (o *TestExecutionTranscriptsResponse) GetCalls() []TestExecutionTranscriptCall { + if o == nil || IsNil(o.Calls) { + var ret []TestExecutionTranscriptCall + return ret + } + return o.Calls +} + +// GetCallsOk returns a tuple with the Calls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptsResponse) GetCallsOk() ([]TestExecutionTranscriptCall, bool) { + if o == nil || IsNil(o.Calls) { + return nil, false + } + return o.Calls, true +} + +// HasCalls returns a boolean if a field has been set. +func (o *TestExecutionTranscriptsResponse) HasCalls() bool { + if o != nil && !IsNil(o.Calls) { + return true + } + + return false +} + +// SetCalls gets a reference to the given []TestExecutionTranscriptCall and assigns it to the Calls field. +func (o *TestExecutionTranscriptsResponse) SetCalls(v []TestExecutionTranscriptCall) { + o.Calls = v +} + +// GetTotalCalls returns the TotalCalls field value if set, zero value otherwise. +func (o *TestExecutionTranscriptsResponse) GetTotalCalls() int32 { + if o == nil || IsNil(o.TotalCalls) { + var ret int32 + return ret + } + return *o.TotalCalls +} + +// GetTotalCallsOk returns a tuple with the TotalCalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptsResponse) GetTotalCallsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalCalls) { + return nil, false + } + return o.TotalCalls, true +} + +// HasTotalCalls returns a boolean if a field has been set. +func (o *TestExecutionTranscriptsResponse) HasTotalCalls() bool { + if o != nil && !IsNil(o.TotalCalls) { + return true + } + + return false +} + +// SetTotalCalls gets a reference to the given int32 and assigns it to the TotalCalls field. +func (o *TestExecutionTranscriptsResponse) SetTotalCalls(v int32) { + o.TotalCalls = &v +} + +// GetTotalTranscripts returns the TotalTranscripts field value if set, zero value otherwise. +func (o *TestExecutionTranscriptsResponse) GetTotalTranscripts() int32 { + if o == nil || IsNil(o.TotalTranscripts) { + var ret int32 + return ret + } + return *o.TotalTranscripts +} + +// GetTotalTranscriptsOk returns a tuple with the TotalTranscripts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestExecutionTranscriptsResponse) GetTotalTranscriptsOk() (*int32, bool) { + if o == nil || IsNil(o.TotalTranscripts) { + return nil, false + } + return o.TotalTranscripts, true +} + +// HasTotalTranscripts returns a boolean if a field has been set. +func (o *TestExecutionTranscriptsResponse) HasTotalTranscripts() bool { + if o != nil && !IsNil(o.TotalTranscripts) { + return true + } + + return false +} + +// SetTotalTranscripts gets a reference to the given int32 and assigns it to the TotalTranscripts field. +func (o *TestExecutionTranscriptsResponse) SetTotalTranscripts(v int32) { + o.TotalTranscripts = &v +} + +func (o TestExecutionTranscriptsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestExecutionTranscriptsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TestExecutionId) { + toSerialize["test_execution_id"] = o.TestExecutionId + } + if !IsNil(o.Calls) { + toSerialize["calls"] = o.Calls + } + if !IsNil(o.TotalCalls) { + toSerialize["total_calls"] = o.TotalCalls + } + if !IsNil(o.TotalTranscripts) { + toSerialize["total_transcripts"] = o.TotalTranscripts + } + return toSerialize, nil +} + +type NullableTestExecutionTranscriptsResponse struct { + value *TestExecutionTranscriptsResponse + isSet bool +} + +func (v NullableTestExecutionTranscriptsResponse) Get() *TestExecutionTranscriptsResponse { + return v.value +} + +func (v *NullableTestExecutionTranscriptsResponse) Set(val *TestExecutionTranscriptsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTestExecutionTranscriptsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTestExecutionTranscriptsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestExecutionTranscriptsResponse(val *TestExecutionTranscriptsResponse) *NullableTestExecutionTranscriptsResponse { + return &NullableTestExecutionTranscriptsResponse{value: val, isSet: true} +} + +func (v NullableTestExecutionTranscriptsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestExecutionTranscriptsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace.go b/go/futureagi/model_trace.go new file mode 100644 index 0000000..7c59a35 --- /dev/null +++ b/go/futureagi/model_trace.go @@ -0,0 +1,539 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Trace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Trace{} + +// Trace struct for Trace +type Trace struct { + Id *string `json:"id,omitempty"` + Project string `json:"project"` + ProjectVersion *string `json:"project_version,omitempty"` + Name NullableString `json:"name,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Input map[string]interface{} `json:"input,omitempty"` + Output map[string]interface{} `json:"output,omitempty"` + Error map[string]interface{} `json:"error,omitempty"` + Session *string `json:"session,omitempty"` + ExternalId NullableString `json:"external_id,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` +} + +type _Trace Trace + +// NewTrace instantiates a new Trace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTrace(project string) *Trace { + this := Trace{} + this.Project = project + return &this +} + +// NewTraceWithDefaults instantiates a new Trace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceWithDefaults() *Trace { + this := Trace{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Trace) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Trace) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Trace) SetId(v string) { + o.Id = &v +} + +// GetProject returns the Project field value +func (o *Trace) GetProject() string { + if o == nil { + var ret string + return ret + } + + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +func (o *Trace) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Project, true +} + +// SetProject sets field value +func (o *Trace) SetProject(v string) { + o.Project = v +} + +// GetProjectVersion returns the ProjectVersion field value if set, zero value otherwise. +func (o *Trace) GetProjectVersion() string { + if o == nil || IsNil(o.ProjectVersion) { + var ret string + return ret + } + return *o.ProjectVersion +} + +// GetProjectVersionOk returns a tuple with the ProjectVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetProjectVersionOk() (*string, bool) { + if o == nil || IsNil(o.ProjectVersion) { + return nil, false + } + return o.ProjectVersion, true +} + +// HasProjectVersion returns a boolean if a field has been set. +func (o *Trace) HasProjectVersion() bool { + if o != nil && !IsNil(o.ProjectVersion) { + return true + } + + return false +} + +// SetProjectVersion gets a reference to the given string and assigns it to the ProjectVersion field. +func (o *Trace) SetProjectVersion(v string) { + o.ProjectVersion = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Trace) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Trace) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *Trace) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *Trace) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *Trace) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *Trace) UnsetName() { + o.Name.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *Trace) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *Trace) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *Trace) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetInput returns the Input field value if set, zero value otherwise. +func (o *Trace) GetInput() map[string]interface{} { + if o == nil || IsNil(o.Input) { + var ret map[string]interface{} + return ret + } + return o.Input +} + +// GetInputOk returns a tuple with the Input field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetInputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Input) { + return map[string]interface{}{}, false + } + return o.Input, true +} + +// HasInput returns a boolean if a field has been set. +func (o *Trace) HasInput() bool { + if o != nil && !IsNil(o.Input) { + return true + } + + return false +} + +// SetInput gets a reference to the given map[string]interface{} and assigns it to the Input field. +func (o *Trace) SetInput(v map[string]interface{}) { + o.Input = v +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *Trace) GetOutput() map[string]interface{} { + if o == nil || IsNil(o.Output) { + var ret map[string]interface{} + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetOutputOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Output) { + return map[string]interface{}{}, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *Trace) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given map[string]interface{} and assigns it to the Output field. +func (o *Trace) SetOutput(v map[string]interface{}) { + o.Output = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Trace) GetError() map[string]interface{} { + if o == nil || IsNil(o.Error) { + var ret map[string]interface{} + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetErrorOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Error) { + return map[string]interface{}{}, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Trace) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given map[string]interface{} and assigns it to the Error field. +func (o *Trace) SetError(v map[string]interface{}) { + o.Error = v +} + +// GetSession returns the Session field value if set, zero value otherwise. +func (o *Trace) GetSession() string { + if o == nil || IsNil(o.Session) { + var ret string + return ret + } + return *o.Session +} + +// GetSessionOk returns a tuple with the Session field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetSessionOk() (*string, bool) { + if o == nil || IsNil(o.Session) { + return nil, false + } + return o.Session, true +} + +// HasSession returns a boolean if a field has been set. +func (o *Trace) HasSession() bool { + if o != nil && !IsNil(o.Session) { + return true + } + + return false +} + +// SetSession gets a reference to the given string and assigns it to the Session field. +func (o *Trace) SetSession(v string) { + o.Session = &v +} + +// GetExternalId returns the ExternalId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Trace) GetExternalId() string { + if o == nil || IsNil(o.ExternalId.Get()) { + var ret string + return ret + } + return *o.ExternalId.Get() +} + +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Trace) GetExternalIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExternalId.Get(), o.ExternalId.IsSet() +} + +// HasExternalId returns a boolean if a field has been set. +func (o *Trace) HasExternalId() bool { + if o != nil && o.ExternalId.IsSet() { + return true + } + + return false +} + +// SetExternalId gets a reference to the given NullableString and assigns it to the ExternalId field. +func (o *Trace) SetExternalId(v string) { + o.ExternalId.Set(&v) +} + +// SetExternalIdNil sets the value for ExternalId to be an explicit nil +func (o *Trace) SetExternalIdNil() { + o.ExternalId.Set(nil) +} + +// UnsetExternalId ensures that no value is present for ExternalId, not even an explicit nil +func (o *Trace) UnsetExternalId() { + o.ExternalId.Unset() +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Trace) GetTags() map[string]interface{} { + if o == nil || IsNil(o.Tags) { + var ret map[string]interface{} + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Trace) GetTagsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Tags) { + return map[string]interface{}{}, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Trace) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. +func (o *Trace) SetTags(v map[string]interface{}) { + o.Tags = v +} + +func (o Trace) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Trace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["project"] = o.Project + if !IsNil(o.ProjectVersion) { + toSerialize["project_version"] = o.ProjectVersion + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.Input) { + toSerialize["input"] = o.Input + } + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Session) { + toSerialize["session"] = o.Session + } + if o.ExternalId.IsSet() { + toSerialize["external_id"] = o.ExternalId.Get() + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + return toSerialize, nil +} + +func (o *Trace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "project", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTrace := _Trace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTrace) + + if err != nil { + return err + } + + *o = Trace(varTrace) + + return err +} + +type NullableTrace struct { + value *Trace + isSet bool +} + +func (v NullableTrace) Get() *Trace { + return v.value +} + +func (v *NullableTrace) Set(val *Trace) { + v.value = val + v.isSet = true +} + +func (v NullableTrace) IsSet() bool { + return v.isSet +} + +func (v *NullableTrace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrace(val *Trace) *NullableTrace { + return &NullableTrace{value: val, isSet: true} +} + +func (v NullableTrace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_annotation_note_response.go b/go/futureagi/model_trace_annotation_note_response.go new file mode 100644 index 0000000..255d405 --- /dev/null +++ b/go/futureagi/model_trace_annotation_note_response.go @@ -0,0 +1,298 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TraceAnnotationNoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TraceAnnotationNoteResponse{} + +// TraceAnnotationNoteResponse struct for TraceAnnotationNoteResponse +type TraceAnnotationNoteResponse struct { + Id string `json:"id"` + Notes string `json:"notes"` + CreatedByAnnotator string `json:"created_by_annotator"` + CreatedByUser string `json:"created_by_user"` + CreatedByUserId string `json:"created_by_user_id"` + UpdatedAt time.Time `json:"updated_at"` +} + +type _TraceAnnotationNoteResponse TraceAnnotationNoteResponse + +// NewTraceAnnotationNoteResponse instantiates a new TraceAnnotationNoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTraceAnnotationNoteResponse(id string, notes string, createdByAnnotator string, createdByUser string, createdByUserId string, updatedAt time.Time) *TraceAnnotationNoteResponse { + this := TraceAnnotationNoteResponse{} + this.Id = id + this.Notes = notes + this.CreatedByAnnotator = createdByAnnotator + this.CreatedByUser = createdByUser + this.CreatedByUserId = createdByUserId + this.UpdatedAt = updatedAt + return &this +} + +// NewTraceAnnotationNoteResponseWithDefaults instantiates a new TraceAnnotationNoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceAnnotationNoteResponseWithDefaults() *TraceAnnotationNoteResponse { + this := TraceAnnotationNoteResponse{} + return &this +} + +// GetId returns the Id field value +func (o *TraceAnnotationNoteResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationNoteResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TraceAnnotationNoteResponse) SetId(v string) { + o.Id = v +} + +// GetNotes returns the Notes field value +func (o *TraceAnnotationNoteResponse) GetNotes() string { + if o == nil { + var ret string + return ret + } + + return o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationNoteResponse) GetNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Notes, true +} + +// SetNotes sets field value +func (o *TraceAnnotationNoteResponse) SetNotes(v string) { + o.Notes = v +} + +// GetCreatedByAnnotator returns the CreatedByAnnotator field value +func (o *TraceAnnotationNoteResponse) GetCreatedByAnnotator() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedByAnnotator +} + +// GetCreatedByAnnotatorOk returns a tuple with the CreatedByAnnotator field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationNoteResponse) GetCreatedByAnnotatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedByAnnotator, true +} + +// SetCreatedByAnnotator sets field value +func (o *TraceAnnotationNoteResponse) SetCreatedByAnnotator(v string) { + o.CreatedByAnnotator = v +} + +// GetCreatedByUser returns the CreatedByUser field value +func (o *TraceAnnotationNoteResponse) GetCreatedByUser() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedByUser +} + +// GetCreatedByUserOk returns a tuple with the CreatedByUser field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationNoteResponse) GetCreatedByUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedByUser, true +} + +// SetCreatedByUser sets field value +func (o *TraceAnnotationNoteResponse) SetCreatedByUser(v string) { + o.CreatedByUser = v +} + +// GetCreatedByUserId returns the CreatedByUserId field value +func (o *TraceAnnotationNoteResponse) GetCreatedByUserId() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedByUserId +} + +// GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationNoteResponse) GetCreatedByUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedByUserId, true +} + +// SetCreatedByUserId sets field value +func (o *TraceAnnotationNoteResponse) SetCreatedByUserId(v string) { + o.CreatedByUserId = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *TraceAnnotationNoteResponse) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationNoteResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *TraceAnnotationNoteResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +func (o TraceAnnotationNoteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TraceAnnotationNoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["notes"] = o.Notes + toSerialize["created_by_annotator"] = o.CreatedByAnnotator + toSerialize["created_by_user"] = o.CreatedByUser + toSerialize["created_by_user_id"] = o.CreatedByUserId + toSerialize["updated_at"] = o.UpdatedAt + return toSerialize, nil +} + +func (o *TraceAnnotationNoteResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "notes", + "created_by_annotator", + "created_by_user", + "created_by_user_id", + "updated_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTraceAnnotationNoteResponse := _TraceAnnotationNoteResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTraceAnnotationNoteResponse) + + if err != nil { + return err + } + + *o = TraceAnnotationNoteResponse(varTraceAnnotationNoteResponse) + + return err +} + +type NullableTraceAnnotationNoteResponse struct { + value *TraceAnnotationNoteResponse + isSet bool +} + +func (v NullableTraceAnnotationNoteResponse) Get() *TraceAnnotationNoteResponse { + return v.value +} + +func (v *NullableTraceAnnotationNoteResponse) Set(val *TraceAnnotationNoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTraceAnnotationNoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceAnnotationNoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceAnnotationNoteResponse(val *TraceAnnotationNoteResponse) *NullableTraceAnnotationNoteResponse { + return &NullableTraceAnnotationNoteResponse{value: val, isSet: true} +} + +func (v NullableTraceAnnotationNoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceAnnotationNoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_annotation_value_response.go b/go/futureagi/model_trace_annotation_value_response.go new file mode 100644 index 0000000..c5e9705 --- /dev/null +++ b/go/futureagi/model_trace_annotation_value_response.go @@ -0,0 +1,494 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TraceAnnotationValueResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TraceAnnotationValueResponse{} + +// TraceAnnotationValueResponse struct for TraceAnnotationValueResponse +type TraceAnnotationValueResponse struct { + Id string `json:"id"` + AnnotationLabelName string `json:"annotation_label_name"` + AnnotationValue map[string]interface{} `json:"annotation_value"` + AnnotationLabelId string `json:"annotation_label_id"` + Annotator NullableString `json:"annotator,omitempty"` + AnnotatorId NullableString `json:"annotator_id,omitempty"` + UpdatedBy NullableString `json:"updated_by,omitempty"` + UpdatedAt NullableTime `json:"updated_at,omitempty"` + AnnotationType string `json:"annotation_type"` + Settings map[string]interface{} `json:"settings,omitempty"` +} + +type _TraceAnnotationValueResponse TraceAnnotationValueResponse + +// NewTraceAnnotationValueResponse instantiates a new TraceAnnotationValueResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTraceAnnotationValueResponse(id string, annotationLabelName string, annotationValue map[string]interface{}, annotationLabelId string, annotationType string) *TraceAnnotationValueResponse { + this := TraceAnnotationValueResponse{} + this.Id = id + this.AnnotationLabelName = annotationLabelName + this.AnnotationValue = annotationValue + this.AnnotationLabelId = annotationLabelId + this.AnnotationType = annotationType + return &this +} + +// NewTraceAnnotationValueResponseWithDefaults instantiates a new TraceAnnotationValueResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceAnnotationValueResponseWithDefaults() *TraceAnnotationValueResponse { + this := TraceAnnotationValueResponse{} + return &this +} + +// GetId returns the Id field value +func (o *TraceAnnotationValueResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationValueResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TraceAnnotationValueResponse) SetId(v string) { + o.Id = v +} + +// GetAnnotationLabelName returns the AnnotationLabelName field value +func (o *TraceAnnotationValueResponse) GetAnnotationLabelName() string { + if o == nil { + var ret string + return ret + } + + return o.AnnotationLabelName +} + +// GetAnnotationLabelNameOk returns a tuple with the AnnotationLabelName field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationValueResponse) GetAnnotationLabelNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AnnotationLabelName, true +} + +// SetAnnotationLabelName sets field value +func (o *TraceAnnotationValueResponse) SetAnnotationLabelName(v string) { + o.AnnotationLabelName = v +} + +// GetAnnotationValue returns the AnnotationValue field value +func (o *TraceAnnotationValueResponse) GetAnnotationValue() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.AnnotationValue +} + +// GetAnnotationValueOk returns a tuple with the AnnotationValue field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationValueResponse) GetAnnotationValueOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.AnnotationValue, true +} + +// SetAnnotationValue sets field value +func (o *TraceAnnotationValueResponse) SetAnnotationValue(v map[string]interface{}) { + o.AnnotationValue = v +} + +// GetAnnotationLabelId returns the AnnotationLabelId field value +func (o *TraceAnnotationValueResponse) GetAnnotationLabelId() string { + if o == nil { + var ret string + return ret + } + + return o.AnnotationLabelId +} + +// GetAnnotationLabelIdOk returns a tuple with the AnnotationLabelId field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationValueResponse) GetAnnotationLabelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AnnotationLabelId, true +} + +// SetAnnotationLabelId sets field value +func (o *TraceAnnotationValueResponse) SetAnnotationLabelId(v string) { + o.AnnotationLabelId = v +} + +// GetAnnotator returns the Annotator field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TraceAnnotationValueResponse) GetAnnotator() string { + if o == nil || IsNil(o.Annotator.Get()) { + var ret string + return ret + } + return *o.Annotator.Get() +} + +// GetAnnotatorOk returns a tuple with the Annotator field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceAnnotationValueResponse) GetAnnotatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Annotator.Get(), o.Annotator.IsSet() +} + +// HasAnnotator returns a boolean if a field has been set. +func (o *TraceAnnotationValueResponse) HasAnnotator() bool { + if o != nil && o.Annotator.IsSet() { + return true + } + + return false +} + +// SetAnnotator gets a reference to the given NullableString and assigns it to the Annotator field. +func (o *TraceAnnotationValueResponse) SetAnnotator(v string) { + o.Annotator.Set(&v) +} + +// SetAnnotatorNil sets the value for Annotator to be an explicit nil +func (o *TraceAnnotationValueResponse) SetAnnotatorNil() { + o.Annotator.Set(nil) +} + +// UnsetAnnotator ensures that no value is present for Annotator, not even an explicit nil +func (o *TraceAnnotationValueResponse) UnsetAnnotator() { + o.Annotator.Unset() +} + +// GetAnnotatorId returns the AnnotatorId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TraceAnnotationValueResponse) GetAnnotatorId() string { + if o == nil || IsNil(o.AnnotatorId.Get()) { + var ret string + return ret + } + return *o.AnnotatorId.Get() +} + +// GetAnnotatorIdOk returns a tuple with the AnnotatorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceAnnotationValueResponse) GetAnnotatorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AnnotatorId.Get(), o.AnnotatorId.IsSet() +} + +// HasAnnotatorId returns a boolean if a field has been set. +func (o *TraceAnnotationValueResponse) HasAnnotatorId() bool { + if o != nil && o.AnnotatorId.IsSet() { + return true + } + + return false +} + +// SetAnnotatorId gets a reference to the given NullableString and assigns it to the AnnotatorId field. +func (o *TraceAnnotationValueResponse) SetAnnotatorId(v string) { + o.AnnotatorId.Set(&v) +} + +// SetAnnotatorIdNil sets the value for AnnotatorId to be an explicit nil +func (o *TraceAnnotationValueResponse) SetAnnotatorIdNil() { + o.AnnotatorId.Set(nil) +} + +// UnsetAnnotatorId ensures that no value is present for AnnotatorId, not even an explicit nil +func (o *TraceAnnotationValueResponse) UnsetAnnotatorId() { + o.AnnotatorId.Unset() +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TraceAnnotationValueResponse) GetUpdatedBy() string { + if o == nil || IsNil(o.UpdatedBy.Get()) { + var ret string + return ret + } + return *o.UpdatedBy.Get() +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceAnnotationValueResponse) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UpdatedBy.Get(), o.UpdatedBy.IsSet() +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *TraceAnnotationValueResponse) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy.IsSet() { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given NullableString and assigns it to the UpdatedBy field. +func (o *TraceAnnotationValueResponse) SetUpdatedBy(v string) { + o.UpdatedBy.Set(&v) +} + +// SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil +func (o *TraceAnnotationValueResponse) SetUpdatedByNil() { + o.UpdatedBy.Set(nil) +} + +// UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil +func (o *TraceAnnotationValueResponse) UnsetUpdatedBy() { + o.UpdatedBy.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TraceAnnotationValueResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt.Get()) { + var ret time.Time + return ret + } + return *o.UpdatedAt.Get() +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceAnnotationValueResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.UpdatedAt.Get(), o.UpdatedAt.IsSet() +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TraceAnnotationValueResponse) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt.IsSet() { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given NullableTime and assigns it to the UpdatedAt field. +func (o *TraceAnnotationValueResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt.Set(&v) +} + +// SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil +func (o *TraceAnnotationValueResponse) SetUpdatedAtNil() { + o.UpdatedAt.Set(nil) +} + +// UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +func (o *TraceAnnotationValueResponse) UnsetUpdatedAt() { + o.UpdatedAt.Unset() +} + +// GetAnnotationType returns the AnnotationType field value +func (o *TraceAnnotationValueResponse) GetAnnotationType() string { + if o == nil { + var ret string + return ret + } + + return o.AnnotationType +} + +// GetAnnotationTypeOk returns a tuple with the AnnotationType field value +// and a boolean to check if the value has been set. +func (o *TraceAnnotationValueResponse) GetAnnotationTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AnnotationType, true +} + +// SetAnnotationType sets field value +func (o *TraceAnnotationValueResponse) SetAnnotationType(v string) { + o.AnnotationType = v +} + +// GetSettings returns the Settings field value if set, zero value otherwise. +func (o *TraceAnnotationValueResponse) GetSettings() map[string]interface{} { + if o == nil || IsNil(o.Settings) { + var ret map[string]interface{} + return ret + } + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TraceAnnotationValueResponse) GetSettingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Settings) { + return map[string]interface{}{}, false + } + return o.Settings, true +} + +// HasSettings returns a boolean if a field has been set. +func (o *TraceAnnotationValueResponse) HasSettings() bool { + if o != nil && !IsNil(o.Settings) { + return true + } + + return false +} + +// SetSettings gets a reference to the given map[string]interface{} and assigns it to the Settings field. +func (o *TraceAnnotationValueResponse) SetSettings(v map[string]interface{}) { + o.Settings = v +} + +func (o TraceAnnotationValueResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TraceAnnotationValueResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["annotation_label_name"] = o.AnnotationLabelName + toSerialize["annotation_value"] = o.AnnotationValue + toSerialize["annotation_label_id"] = o.AnnotationLabelId + if o.Annotator.IsSet() { + toSerialize["annotator"] = o.Annotator.Get() + } + if o.AnnotatorId.IsSet() { + toSerialize["annotator_id"] = o.AnnotatorId.Get() + } + if o.UpdatedBy.IsSet() { + toSerialize["updated_by"] = o.UpdatedBy.Get() + } + if o.UpdatedAt.IsSet() { + toSerialize["updated_at"] = o.UpdatedAt.Get() + } + toSerialize["annotation_type"] = o.AnnotationType + if !IsNil(o.Settings) { + toSerialize["settings"] = o.Settings + } + return toSerialize, nil +} + +func (o *TraceAnnotationValueResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "annotation_label_name", + "annotation_value", + "annotation_label_id", + "annotation_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTraceAnnotationValueResponse := _TraceAnnotationValueResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTraceAnnotationValueResponse) + + if err != nil { + return err + } + + *o = TraceAnnotationValueResponse(varTraceAnnotationValueResponse) + + return err +} + +type NullableTraceAnnotationValueResponse struct { + value *TraceAnnotationValueResponse + isSet bool +} + +func (v NullableTraceAnnotationValueResponse) Get() *TraceAnnotationValueResponse { + return v.value +} + +func (v *NullableTraceAnnotationValueResponse) Set(val *TraceAnnotationValueResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTraceAnnotationValueResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceAnnotationValueResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceAnnotationValueResponse(val *TraceAnnotationValueResponse) *NullableTraceAnnotationValueResponse { + return &NullableTraceAnnotationValueResponse{value: val, isSet: true} +} + +func (v NullableTraceAnnotationValueResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceAnnotationValueResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_evidence.go b/go/futureagi/model_trace_evidence.go new file mode 100644 index 0000000..7a85f58 --- /dev/null +++ b/go/futureagi/model_trace_evidence.go @@ -0,0 +1,245 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TraceEvidence type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TraceEvidence{} + +// TraceEvidence struct for TraceEvidence +type TraceEvidence struct { + Input NullableString `json:"input"` + Output NullableString `json:"output"` + FailReel []map[string]string `json:"fail_reel"` + PassReel []map[string]string `json:"pass_reel"` +} + +type _TraceEvidence TraceEvidence + +// NewTraceEvidence instantiates a new TraceEvidence object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTraceEvidence(input NullableString, output NullableString, failReel []map[string]string, passReel []map[string]string) *TraceEvidence { + this := TraceEvidence{} + this.Input = input + this.Output = output + this.FailReel = failReel + this.PassReel = passReel + return &this +} + +// NewTraceEvidenceWithDefaults instantiates a new TraceEvidence object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceEvidenceWithDefaults() *TraceEvidence { + this := TraceEvidence{} + return &this +} + +// GetInput returns the Input field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TraceEvidence) GetInput() string { + if o == nil || o.Input.Get() == nil { + var ret string + return ret + } + + return *o.Input.Get() +} + +// GetInputOk returns a tuple with the Input field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceEvidence) GetInputOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Input.Get(), o.Input.IsSet() +} + +// SetInput sets field value +func (o *TraceEvidence) SetInput(v string) { + o.Input.Set(&v) +} + +// GetOutput returns the Output field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TraceEvidence) GetOutput() string { + if o == nil || o.Output.Get() == nil { + var ret string + return ret + } + + return *o.Output.Get() +} + +// GetOutputOk returns a tuple with the Output field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceEvidence) GetOutputOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Output.Get(), o.Output.IsSet() +} + +// SetOutput sets field value +func (o *TraceEvidence) SetOutput(v string) { + o.Output.Set(&v) +} + +// GetFailReel returns the FailReel field value +func (o *TraceEvidence) GetFailReel() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.FailReel +} + +// GetFailReelOk returns a tuple with the FailReel field value +// and a boolean to check if the value has been set. +func (o *TraceEvidence) GetFailReelOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.FailReel, true +} + +// SetFailReel sets field value +func (o *TraceEvidence) SetFailReel(v []map[string]string) { + o.FailReel = v +} + +// GetPassReel returns the PassReel field value +func (o *TraceEvidence) GetPassReel() []map[string]string { + if o == nil { + var ret []map[string]string + return ret + } + + return o.PassReel +} + +// GetPassReelOk returns a tuple with the PassReel field value +// and a boolean to check if the value has been set. +func (o *TraceEvidence) GetPassReelOk() ([]map[string]string, bool) { + if o == nil { + return nil, false + } + return o.PassReel, true +} + +// SetPassReel sets field value +func (o *TraceEvidence) SetPassReel(v []map[string]string) { + o.PassReel = v +} + +func (o TraceEvidence) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TraceEvidence) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["input"] = o.Input.Get() + toSerialize["output"] = o.Output.Get() + toSerialize["fail_reel"] = o.FailReel + toSerialize["pass_reel"] = o.PassReel + return toSerialize, nil +} + +func (o *TraceEvidence) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "input", + "output", + "fail_reel", + "pass_reel", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTraceEvidence := _TraceEvidence{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTraceEvidence) + + if err != nil { + return err + } + + *o = TraceEvidence(varTraceEvidence) + + return err +} + +type NullableTraceEvidence struct { + value *TraceEvidence + isSet bool +} + +func (v NullableTraceEvidence) Get() *TraceEvidence { + return v.value +} + +func (v *NullableTraceEvidence) Set(val *TraceEvidence) { + v.value = val + v.isSet = true +} + +func (v NullableTraceEvidence) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceEvidence) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceEvidence(val *TraceEvidence) *NullableTraceEvidence { + return &NullableTraceEvidence{value: val, isSet: true} +} + +func (v NullableTraceEvidence) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceEvidence) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_preview.go b/go/futureagi/model_trace_preview.go new file mode 100644 index 0000000..44b6ba4 --- /dev/null +++ b/go/futureagi/model_trace_preview.go @@ -0,0 +1,217 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TracePreview type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracePreview{} + +// TracePreview struct for TracePreview +type TracePreview struct { + TraceId string `json:"trace_id"` + Input NullableString `json:"input"` + Output NullableString `json:"output"` +} + +type _TracePreview TracePreview + +// NewTracePreview instantiates a new TracePreview object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracePreview(traceId string, input NullableString, output NullableString) *TracePreview { + this := TracePreview{} + this.TraceId = traceId + this.Input = input + this.Output = output + return &this +} + +// NewTracePreviewWithDefaults instantiates a new TracePreview object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracePreviewWithDefaults() *TracePreview { + this := TracePreview{} + return &this +} + +// GetTraceId returns the TraceId field value +func (o *TracePreview) GetTraceId() string { + if o == nil { + var ret string + return ret + } + + return o.TraceId +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +func (o *TracePreview) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceId, true +} + +// SetTraceId sets field value +func (o *TracePreview) SetTraceId(v string) { + o.TraceId = v +} + +// GetInput returns the Input field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TracePreview) GetInput() string { + if o == nil || o.Input.Get() == nil { + var ret string + return ret + } + + return *o.Input.Get() +} + +// GetInputOk returns a tuple with the Input field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracePreview) GetInputOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Input.Get(), o.Input.IsSet() +} + +// SetInput sets field value +func (o *TracePreview) SetInput(v string) { + o.Input.Set(&v) +} + +// GetOutput returns the Output field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TracePreview) GetOutput() string { + if o == nil || o.Output.Get() == nil { + var ret string + return ret + } + + return *o.Output.Get() +} + +// GetOutputOk returns a tuple with the Output field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracePreview) GetOutputOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Output.Get(), o.Output.IsSet() +} + +// SetOutput sets field value +func (o *TracePreview) SetOutput(v string) { + o.Output.Set(&v) +} + +func (o TracePreview) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracePreview) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["trace_id"] = o.TraceId + toSerialize["input"] = o.Input.Get() + toSerialize["output"] = o.Output.Get() + return toSerialize, nil +} + +func (o *TracePreview) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "trace_id", + "input", + "output", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracePreview := _TracePreview{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracePreview) + + if err != nil { + return err + } + + *o = TracePreview(varTracePreview) + + return err +} + +type NullableTracePreview struct { + value *TracePreview + isSet bool +} + +func (v NullableTracePreview) Get() *TracePreview { + return v.value +} + +func (v *NullableTracePreview) Set(val *TracePreview) { + v.value = val + v.isSet = true +} + +func (v NullableTracePreview) IsSet() bool { + return v.isSet +} + +func (v *NullableTracePreview) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracePreview(val *TracePreview) *NullableTracePreview { + return &NullableTracePreview{value: val, isSet: true} +} + +func (v NullableTracePreview) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracePreview) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_session.go b/go/futureagi/model_trace_session.go new file mode 100644 index 0000000..bbf4cc0 --- /dev/null +++ b/go/futureagi/model_trace_session.go @@ -0,0 +1,313 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TraceSession type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TraceSession{} + +// TraceSession struct for TraceSession +type TraceSession struct { + Id *string `json:"id,omitempty"` + Project string `json:"project"` + Bookmarked *bool `json:"bookmarked,omitempty"` + Name NullableString `json:"name,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` +} + +type _TraceSession TraceSession + +// NewTraceSession instantiates a new TraceSession object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTraceSession(project string) *TraceSession { + this := TraceSession{} + this.Project = project + return &this +} + +// NewTraceSessionWithDefaults instantiates a new TraceSession object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceSessionWithDefaults() *TraceSession { + this := TraceSession{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TraceSession) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TraceSession) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TraceSession) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TraceSession) SetId(v string) { + o.Id = &v +} + +// GetProject returns the Project field value +func (o *TraceSession) GetProject() string { + if o == nil { + var ret string + return ret + } + + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +func (o *TraceSession) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Project, true +} + +// SetProject sets field value +func (o *TraceSession) SetProject(v string) { + o.Project = v +} + +// GetBookmarked returns the Bookmarked field value if set, zero value otherwise. +func (o *TraceSession) GetBookmarked() bool { + if o == nil || IsNil(o.Bookmarked) { + var ret bool + return ret + } + return *o.Bookmarked +} + +// GetBookmarkedOk returns a tuple with the Bookmarked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TraceSession) GetBookmarkedOk() (*bool, bool) { + if o == nil || IsNil(o.Bookmarked) { + return nil, false + } + return o.Bookmarked, true +} + +// HasBookmarked returns a boolean if a field has been set. +func (o *TraceSession) HasBookmarked() bool { + if o != nil && !IsNil(o.Bookmarked) { + return true + } + + return false +} + +// SetBookmarked gets a reference to the given bool and assigns it to the Bookmarked field. +func (o *TraceSession) SetBookmarked(v bool) { + o.Bookmarked = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TraceSession) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceSession) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *TraceSession) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *TraceSession) SetName(v string) { + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *TraceSession) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *TraceSession) UnsetName() { + o.Name.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TraceSession) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TraceSession) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TraceSession) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TraceSession) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +func (o TraceSession) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TraceSession) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["project"] = o.Project + if !IsNil(o.Bookmarked) { + toSerialize["bookmarked"] = o.Bookmarked + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +func (o *TraceSession) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "project", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTraceSession := _TraceSession{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTraceSession) + + if err != nil { + return err + } + + *o = TraceSession(varTraceSession) + + return err +} + +type NullableTraceSession struct { + value *TraceSession + isSet bool +} + +func (v NullableTraceSession) Get() *TraceSession { + return v.value +} + +func (v *NullableTraceSession) Set(val *TraceSession) { + v.value = val + v.isSet = true +} + +func (v NullableTraceSession) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceSession) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceSession(val *TraceSession) *NullableTraceSession { + return &NullableTraceSession{value: val, isSet: true} +} + +func (v NullableTraceSession) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceSession) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_session_graph_data_request.go b/go/futureagi/model_trace_session_graph_data_request.go new file mode 100644 index 0000000..6bce43c --- /dev/null +++ b/go/futureagi/model_trace_session_graph_data_request.go @@ -0,0 +1,301 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TraceSessionGraphDataRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TraceSessionGraphDataRequest{} + +// TraceSessionGraphDataRequest struct for TraceSessionGraphDataRequest +type TraceSessionGraphDataRequest struct { + ProjectId string `json:"project_id"` + Filters []AutomationRuleConditionsFilterInner `json:"filters,omitempty"` + Interval *string `json:"interval,omitempty"` + Property *string `json:"property,omitempty"` + ReqDataConfig ReqDataConfig `json:"req_data_config"` +} + +type _TraceSessionGraphDataRequest TraceSessionGraphDataRequest + +// NewTraceSessionGraphDataRequest instantiates a new TraceSessionGraphDataRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTraceSessionGraphDataRequest(projectId string, reqDataConfig ReqDataConfig) *TraceSessionGraphDataRequest { + this := TraceSessionGraphDataRequest{} + this.ProjectId = projectId + var interval string = "day" + this.Interval = &interval + var property string = "average" + this.Property = &property + this.ReqDataConfig = reqDataConfig + return &this +} + +// NewTraceSessionGraphDataRequestWithDefaults instantiates a new TraceSessionGraphDataRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceSessionGraphDataRequestWithDefaults() *TraceSessionGraphDataRequest { + this := TraceSessionGraphDataRequest{} + var interval string = "day" + this.Interval = &interval + var property string = "average" + this.Property = &property + return &this +} + +// GetProjectId returns the ProjectId field value +func (o *TraceSessionGraphDataRequest) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *TraceSessionGraphDataRequest) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *TraceSessionGraphDataRequest) SetProjectId(v string) { + o.ProjectId = v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *TraceSessionGraphDataRequest) GetFilters() []AutomationRuleConditionsFilterInner { + if o == nil || IsNil(o.Filters) { + var ret []AutomationRuleConditionsFilterInner + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TraceSessionGraphDataRequest) GetFiltersOk() ([]AutomationRuleConditionsFilterInner, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *TraceSessionGraphDataRequest) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given []AutomationRuleConditionsFilterInner and assigns it to the Filters field. +func (o *TraceSessionGraphDataRequest) SetFilters(v []AutomationRuleConditionsFilterInner) { + o.Filters = v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *TraceSessionGraphDataRequest) GetInterval() string { + if o == nil || IsNil(o.Interval) { + var ret string + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TraceSessionGraphDataRequest) GetIntervalOk() (*string, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *TraceSessionGraphDataRequest) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given string and assigns it to the Interval field. +func (o *TraceSessionGraphDataRequest) SetInterval(v string) { + o.Interval = &v +} + +// GetProperty returns the Property field value if set, zero value otherwise. +func (o *TraceSessionGraphDataRequest) GetProperty() string { + if o == nil || IsNil(o.Property) { + var ret string + return ret + } + return *o.Property +} + +// GetPropertyOk returns a tuple with the Property field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TraceSessionGraphDataRequest) GetPropertyOk() (*string, bool) { + if o == nil || IsNil(o.Property) { + return nil, false + } + return o.Property, true +} + +// HasProperty returns a boolean if a field has been set. +func (o *TraceSessionGraphDataRequest) HasProperty() bool { + if o != nil && !IsNil(o.Property) { + return true + } + + return false +} + +// SetProperty gets a reference to the given string and assigns it to the Property field. +func (o *TraceSessionGraphDataRequest) SetProperty(v string) { + o.Property = &v +} + +// GetReqDataConfig returns the ReqDataConfig field value +func (o *TraceSessionGraphDataRequest) GetReqDataConfig() ReqDataConfig { + if o == nil { + var ret ReqDataConfig + return ret + } + + return o.ReqDataConfig +} + +// GetReqDataConfigOk returns a tuple with the ReqDataConfig field value +// and a boolean to check if the value has been set. +func (o *TraceSessionGraphDataRequest) GetReqDataConfigOk() (*ReqDataConfig, bool) { + if o == nil { + return nil, false + } + return &o.ReqDataConfig, true +} + +// SetReqDataConfig sets field value +func (o *TraceSessionGraphDataRequest) SetReqDataConfig(v ReqDataConfig) { + o.ReqDataConfig = v +} + +func (o TraceSessionGraphDataRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TraceSessionGraphDataRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["project_id"] = o.ProjectId + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.Property) { + toSerialize["property"] = o.Property + } + toSerialize["req_data_config"] = o.ReqDataConfig + return toSerialize, nil +} + +func (o *TraceSessionGraphDataRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "project_id", + "req_data_config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTraceSessionGraphDataRequest := _TraceSessionGraphDataRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTraceSessionGraphDataRequest) + + if err != nil { + return err + } + + *o = TraceSessionGraphDataRequest(varTraceSessionGraphDataRequest) + + return err +} + +type NullableTraceSessionGraphDataRequest struct { + value *TraceSessionGraphDataRequest + isSet bool +} + +func (v NullableTraceSessionGraphDataRequest) Get() *TraceSessionGraphDataRequest { + return v.value +} + +func (v *NullableTraceSessionGraphDataRequest) Set(val *TraceSessionGraphDataRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTraceSessionGraphDataRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceSessionGraphDataRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceSessionGraphDataRequest(val *TraceSessionGraphDataRequest) *NullableTraceSessionGraphDataRequest { + return &NullableTraceSessionGraphDataRequest{value: val, isSet: true} +} + +func (v NullableTraceSessionGraphDataRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceSessionGraphDataRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_summary.go b/go/futureagi/model_trace_summary.go new file mode 100644 index 0000000..99a0414 --- /dev/null +++ b/go/futureagi/model_trace_summary.go @@ -0,0 +1,309 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TraceSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TraceSummary{} + +// TraceSummary struct for TraceSummary +type TraceSummary struct { + EvalScore NullableFloat32 `json:"eval_score"` + LatencyMs NullableInt32 `json:"latency_ms"` + Turns NullableInt32 `json:"turns"` + Model NullableString `json:"model"` + InputTokens NullableInt32 `json:"input_tokens"` + OutputTokens NullableInt32 `json:"output_tokens"` +} + +type _TraceSummary TraceSummary + +// NewTraceSummary instantiates a new TraceSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTraceSummary(evalScore NullableFloat32, latencyMs NullableInt32, turns NullableInt32, model NullableString, inputTokens NullableInt32, outputTokens NullableInt32) *TraceSummary { + this := TraceSummary{} + this.EvalScore = evalScore + this.LatencyMs = latencyMs + this.Turns = turns + this.Model = model + this.InputTokens = inputTokens + this.OutputTokens = outputTokens + return &this +} + +// NewTraceSummaryWithDefaults instantiates a new TraceSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceSummaryWithDefaults() *TraceSummary { + this := TraceSummary{} + return &this +} + +// GetEvalScore returns the EvalScore field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *TraceSummary) GetEvalScore() float32 { + if o == nil || o.EvalScore.Get() == nil { + var ret float32 + return ret + } + + return *o.EvalScore.Get() +} + +// GetEvalScoreOk returns a tuple with the EvalScore field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceSummary) GetEvalScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.EvalScore.Get(), o.EvalScore.IsSet() +} + +// SetEvalScore sets field value +func (o *TraceSummary) SetEvalScore(v float32) { + o.EvalScore.Set(&v) +} + +// GetLatencyMs returns the LatencyMs field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *TraceSummary) GetLatencyMs() int32 { + if o == nil || o.LatencyMs.Get() == nil { + var ret int32 + return ret + } + + return *o.LatencyMs.Get() +} + +// GetLatencyMsOk returns a tuple with the LatencyMs field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceSummary) GetLatencyMsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.LatencyMs.Get(), o.LatencyMs.IsSet() +} + +// SetLatencyMs sets field value +func (o *TraceSummary) SetLatencyMs(v int32) { + o.LatencyMs.Set(&v) +} + +// GetTurns returns the Turns field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *TraceSummary) GetTurns() int32 { + if o == nil || o.Turns.Get() == nil { + var ret int32 + return ret + } + + return *o.Turns.Get() +} + +// GetTurnsOk returns a tuple with the Turns field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceSummary) GetTurnsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Turns.Get(), o.Turns.IsSet() +} + +// SetTurns sets field value +func (o *TraceSummary) SetTurns(v int32) { + o.Turns.Set(&v) +} + +// GetModel returns the Model field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TraceSummary) GetModel() string { + if o == nil || o.Model.Get() == nil { + var ret string + return ret + } + + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceSummary) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// SetModel sets field value +func (o *TraceSummary) SetModel(v string) { + o.Model.Set(&v) +} + +// GetInputTokens returns the InputTokens field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *TraceSummary) GetInputTokens() int32 { + if o == nil || o.InputTokens.Get() == nil { + var ret int32 + return ret + } + + return *o.InputTokens.Get() +} + +// GetInputTokensOk returns a tuple with the InputTokens field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceSummary) GetInputTokensOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.InputTokens.Get(), o.InputTokens.IsSet() +} + +// SetInputTokens sets field value +func (o *TraceSummary) SetInputTokens(v int32) { + o.InputTokens.Set(&v) +} + +// GetOutputTokens returns the OutputTokens field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *TraceSummary) GetOutputTokens() int32 { + if o == nil || o.OutputTokens.Get() == nil { + var ret int32 + return ret + } + + return *o.OutputTokens.Get() +} + +// GetOutputTokensOk returns a tuple with the OutputTokens field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TraceSummary) GetOutputTokensOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.OutputTokens.Get(), o.OutputTokens.IsSet() +} + +// SetOutputTokens sets field value +func (o *TraceSummary) SetOutputTokens(v int32) { + o.OutputTokens.Set(&v) +} + +func (o TraceSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TraceSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["eval_score"] = o.EvalScore.Get() + toSerialize["latency_ms"] = o.LatencyMs.Get() + toSerialize["turns"] = o.Turns.Get() + toSerialize["model"] = o.Model.Get() + toSerialize["input_tokens"] = o.InputTokens.Get() + toSerialize["output_tokens"] = o.OutputTokens.Get() + return toSerialize, nil +} + +func (o *TraceSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "eval_score", + "latency_ms", + "turns", + "model", + "input_tokens", + "output_tokens", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTraceSummary := _TraceSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTraceSummary) + + if err != nil { + return err + } + + *o = TraceSummary(varTraceSummary) + + return err +} + +type NullableTraceSummary struct { + value *TraceSummary + isSet bool +} + +func (v NullableTraceSummary) Get() *TraceSummary { + return v.value +} + +func (v *NullableTraceSummary) Set(val *TraceSummary) { + v.value = val + v.isSet = true +} + +func (v NullableTraceSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceSummary(val *TraceSummary) *NullableTraceSummary { + return &NullableTraceSummary{value: val, isSet: true} +} + +func (v NullableTraceSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trace_tags_update.go b/go/futureagi/model_trace_tags_update.go new file mode 100644 index 0000000..d4575d6 --- /dev/null +++ b/go/futureagi/model_trace_tags_update.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TraceTagsUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TraceTagsUpdate{} + +// TraceTagsUpdate struct for TraceTagsUpdate +type TraceTagsUpdate struct { + Tags []string `json:"tags"` +} + +type _TraceTagsUpdate TraceTagsUpdate + +// NewTraceTagsUpdate instantiates a new TraceTagsUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTraceTagsUpdate(tags []string) *TraceTagsUpdate { + this := TraceTagsUpdate{} + this.Tags = tags + return &this +} + +// NewTraceTagsUpdateWithDefaults instantiates a new TraceTagsUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTraceTagsUpdateWithDefaults() *TraceTagsUpdate { + this := TraceTagsUpdate{} + return &this +} + +// GetTags returns the Tags field value +func (o *TraceTagsUpdate) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *TraceTagsUpdate) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *TraceTagsUpdate) SetTags(v []string) { + o.Tags = v +} + +func (o TraceTagsUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TraceTagsUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tags"] = o.Tags + return toSerialize, nil +} + +func (o *TraceTagsUpdate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTraceTagsUpdate := _TraceTagsUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTraceTagsUpdate) + + if err != nil { + return err + } + + *o = TraceTagsUpdate(varTraceTagsUpdate) + + return err +} + +type NullableTraceTagsUpdate struct { + value *TraceTagsUpdate + isSet bool +} + +func (v NullableTraceTagsUpdate) Get() *TraceTagsUpdate { + return v.value +} + +func (v *NullableTraceTagsUpdate) Set(val *TraceTagsUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableTraceTagsUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceTagsUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceTagsUpdate(val *TraceTagsUpdate) *NullableTraceTagsUpdate { + return &NullableTraceTagsUpdate{value: val, isSet: true} +} + +func (v NullableTraceTagsUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceTagsUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_tracer_trace_annotation_list_200_response.go b/go/futureagi/model_tracer_trace_annotation_list_200_response.go new file mode 100644 index 0000000..8a86009 --- /dev/null +++ b/go/futureagi/model_tracer_trace_annotation_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TracerTraceAnnotationList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracerTraceAnnotationList200Response{} + +// TracerTraceAnnotationList200Response struct for TracerTraceAnnotationList200Response +type TracerTraceAnnotationList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GetTraceAnnotation `json:"results"` +} + +type _TracerTraceAnnotationList200Response TracerTraceAnnotationList200Response + +// NewTracerTraceAnnotationList200Response instantiates a new TracerTraceAnnotationList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracerTraceAnnotationList200Response(count int32, results []GetTraceAnnotation) *TracerTraceAnnotationList200Response { + this := TracerTraceAnnotationList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewTracerTraceAnnotationList200ResponseWithDefaults instantiates a new TracerTraceAnnotationList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracerTraceAnnotationList200ResponseWithDefaults() *TracerTraceAnnotationList200Response { + this := TracerTraceAnnotationList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *TracerTraceAnnotationList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *TracerTraceAnnotationList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *TracerTraceAnnotationList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TracerTraceAnnotationList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracerTraceAnnotationList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *TracerTraceAnnotationList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *TracerTraceAnnotationList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *TracerTraceAnnotationList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *TracerTraceAnnotationList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TracerTraceAnnotationList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracerTraceAnnotationList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *TracerTraceAnnotationList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *TracerTraceAnnotationList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *TracerTraceAnnotationList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *TracerTraceAnnotationList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *TracerTraceAnnotationList200Response) GetResults() []GetTraceAnnotation { + if o == nil { + var ret []GetTraceAnnotation + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *TracerTraceAnnotationList200Response) GetResultsOk() ([]GetTraceAnnotation, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *TracerTraceAnnotationList200Response) SetResults(v []GetTraceAnnotation) { + o.Results = v +} + +func (o TracerTraceAnnotationList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracerTraceAnnotationList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *TracerTraceAnnotationList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracerTraceAnnotationList200Response := _TracerTraceAnnotationList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracerTraceAnnotationList200Response) + + if err != nil { + return err + } + + *o = TracerTraceAnnotationList200Response(varTracerTraceAnnotationList200Response) + + return err +} + +type NullableTracerTraceAnnotationList200Response struct { + value *TracerTraceAnnotationList200Response + isSet bool +} + +func (v NullableTracerTraceAnnotationList200Response) Get() *TracerTraceAnnotationList200Response { + return v.value +} + +func (v *NullableTracerTraceAnnotationList200Response) Set(val *TracerTraceAnnotationList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableTracerTraceAnnotationList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableTracerTraceAnnotationList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracerTraceAnnotationList200Response(val *TracerTraceAnnotationList200Response) *NullableTracerTraceAnnotationList200Response { + return &NullableTracerTraceAnnotationList200Response{value: val, isSet: true} +} + +func (v NullableTracerTraceAnnotationList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracerTraceAnnotationList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_tracer_trace_list_200_response.go b/go/futureagi/model_tracer_trace_list_200_response.go new file mode 100644 index 0000000..45e7706 --- /dev/null +++ b/go/futureagi/model_tracer_trace_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TracerTraceList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracerTraceList200Response{} + +// TracerTraceList200Response struct for TracerTraceList200Response +type TracerTraceList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []Trace `json:"results"` +} + +type _TracerTraceList200Response TracerTraceList200Response + +// NewTracerTraceList200Response instantiates a new TracerTraceList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracerTraceList200Response(count int32, results []Trace) *TracerTraceList200Response { + this := TracerTraceList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewTracerTraceList200ResponseWithDefaults instantiates a new TracerTraceList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracerTraceList200ResponseWithDefaults() *TracerTraceList200Response { + this := TracerTraceList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *TracerTraceList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *TracerTraceList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *TracerTraceList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TracerTraceList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracerTraceList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *TracerTraceList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *TracerTraceList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *TracerTraceList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *TracerTraceList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TracerTraceList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracerTraceList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *TracerTraceList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *TracerTraceList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *TracerTraceList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *TracerTraceList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *TracerTraceList200Response) GetResults() []Trace { + if o == nil { + var ret []Trace + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *TracerTraceList200Response) GetResultsOk() ([]Trace, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *TracerTraceList200Response) SetResults(v []Trace) { + o.Results = v +} + +func (o TracerTraceList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracerTraceList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *TracerTraceList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracerTraceList200Response := _TracerTraceList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracerTraceList200Response) + + if err != nil { + return err + } + + *o = TracerTraceList200Response(varTracerTraceList200Response) + + return err +} + +type NullableTracerTraceList200Response struct { + value *TracerTraceList200Response + isSet bool +} + +func (v NullableTracerTraceList200Response) Get() *TracerTraceList200Response { + return v.value +} + +func (v *NullableTracerTraceList200Response) Set(val *TracerTraceList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableTracerTraceList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableTracerTraceList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracerTraceList200Response(val *TracerTraceList200Response) *NullableTracerTraceList200Response { + return &NullableTracerTraceList200Response{value: val, isSet: true} +} + +func (v NullableTracerTraceList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracerTraceList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_tracer_trace_session_list_200_response.go b/go/futureagi/model_tracer_trace_session_list_200_response.go new file mode 100644 index 0000000..df0d384 --- /dev/null +++ b/go/futureagi/model_tracer_trace_session_list_200_response.go @@ -0,0 +1,279 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TracerTraceSessionList200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracerTraceSessionList200Response{} + +// TracerTraceSessionList200Response struct for TracerTraceSessionList200Response +type TracerTraceSessionList200Response struct { + Count int32 `json:"count"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []TraceSession `json:"results"` +} + +type _TracerTraceSessionList200Response TracerTraceSessionList200Response + +// NewTracerTraceSessionList200Response instantiates a new TracerTraceSessionList200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracerTraceSessionList200Response(count int32, results []TraceSession) *TracerTraceSessionList200Response { + this := TracerTraceSessionList200Response{} + this.Count = count + this.Results = results + return &this +} + +// NewTracerTraceSessionList200ResponseWithDefaults instantiates a new TracerTraceSessionList200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracerTraceSessionList200ResponseWithDefaults() *TracerTraceSessionList200Response { + this := TracerTraceSessionList200Response{} + return &this +} + +// GetCount returns the Count field value +func (o *TracerTraceSessionList200Response) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *TracerTraceSessionList200Response) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *TracerTraceSessionList200Response) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TracerTraceSessionList200Response) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracerTraceSessionList200Response) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *TracerTraceSessionList200Response) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *TracerTraceSessionList200Response) SetNext(v string) { + o.Next.Set(&v) +} + +// SetNextNil sets the value for Next to be an explicit nil +func (o *TracerTraceSessionList200Response) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *TracerTraceSessionList200Response) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TracerTraceSessionList200Response) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracerTraceSessionList200Response) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *TracerTraceSessionList200Response) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *TracerTraceSessionList200Response) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *TracerTraceSessionList200Response) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *TracerTraceSessionList200Response) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value +func (o *TracerTraceSessionList200Response) GetResults() []TraceSession { + if o == nil { + var ret []TraceSession + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *TracerTraceSessionList200Response) GetResultsOk() ([]TraceSession, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *TracerTraceSessionList200Response) SetResults(v []TraceSession) { + o.Results = v +} + +func (o TracerTraceSessionList200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracerTraceSessionList200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *TracerTraceSessionList200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracerTraceSessionList200Response := _TracerTraceSessionList200Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracerTraceSessionList200Response) + + if err != nil { + return err + } + + *o = TracerTraceSessionList200Response(varTracerTraceSessionList200Response) + + return err +} + +type NullableTracerTraceSessionList200Response struct { + value *TracerTraceSessionList200Response + isSet bool +} + +func (v NullableTracerTraceSessionList200Response) Get() *TracerTraceSessionList200Response { + return v.value +} + +func (v *NullableTracerTraceSessionList200Response) Set(val *TracerTraceSessionList200Response) { + v.value = val + v.isSet = true +} + +func (v NullableTracerTraceSessionList200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableTracerTraceSessionList200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracerTraceSessionList200Response(val *TracerTraceSessionList200Response) *NullableTracerTraceSessionList200Response { + return &NullableTracerTraceSessionList200Response{value: val, isSet: true} +} + +func (v NullableTracerTraceSessionList200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracerTraceSessionList200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_traces_aggregates.go b/go/futureagi/model_traces_aggregates.go new file mode 100644 index 0000000..f0290a7 --- /dev/null +++ b/go/futureagi/model_traces_aggregates.go @@ -0,0 +1,325 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TracesAggregates type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracesAggregates{} + +// TracesAggregates struct for TracesAggregates +type TracesAggregates struct { + TotalTraces int32 `json:"total_traces"` + FailingTraces int32 `json:"failing_traces"` + PassingTraces int32 `json:"passing_traces"` + AvgScore float32 `json:"avg_score"` + P50Latency int32 `json:"p50_latency"` + P95Latency int32 `json:"p95_latency"` + AvgTurns float32 `json:"avg_turns"` +} + +type _TracesAggregates TracesAggregates + +// NewTracesAggregates instantiates a new TracesAggregates object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracesAggregates(totalTraces int32, failingTraces int32, passingTraces int32, avgScore float32, p50Latency int32, p95Latency int32, avgTurns float32) *TracesAggregates { + this := TracesAggregates{} + this.TotalTraces = totalTraces + this.FailingTraces = failingTraces + this.PassingTraces = passingTraces + this.AvgScore = avgScore + this.P50Latency = p50Latency + this.P95Latency = p95Latency + this.AvgTurns = avgTurns + return &this +} + +// NewTracesAggregatesWithDefaults instantiates a new TracesAggregates object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracesAggregatesWithDefaults() *TracesAggregates { + this := TracesAggregates{} + return &this +} + +// GetTotalTraces returns the TotalTraces field value +func (o *TracesAggregates) GetTotalTraces() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalTraces +} + +// GetTotalTracesOk returns a tuple with the TotalTraces field value +// and a boolean to check if the value has been set. +func (o *TracesAggregates) GetTotalTracesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalTraces, true +} + +// SetTotalTraces sets field value +func (o *TracesAggregates) SetTotalTraces(v int32) { + o.TotalTraces = v +} + +// GetFailingTraces returns the FailingTraces field value +func (o *TracesAggregates) GetFailingTraces() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FailingTraces +} + +// GetFailingTracesOk returns a tuple with the FailingTraces field value +// and a boolean to check if the value has been set. +func (o *TracesAggregates) GetFailingTracesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FailingTraces, true +} + +// SetFailingTraces sets field value +func (o *TracesAggregates) SetFailingTraces(v int32) { + o.FailingTraces = v +} + +// GetPassingTraces returns the PassingTraces field value +func (o *TracesAggregates) GetPassingTraces() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PassingTraces +} + +// GetPassingTracesOk returns a tuple with the PassingTraces field value +// and a boolean to check if the value has been set. +func (o *TracesAggregates) GetPassingTracesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PassingTraces, true +} + +// SetPassingTraces sets field value +func (o *TracesAggregates) SetPassingTraces(v int32) { + o.PassingTraces = v +} + +// GetAvgScore returns the AvgScore field value +func (o *TracesAggregates) GetAvgScore() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgScore +} + +// GetAvgScoreOk returns a tuple with the AvgScore field value +// and a boolean to check if the value has been set. +func (o *TracesAggregates) GetAvgScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgScore, true +} + +// SetAvgScore sets field value +func (o *TracesAggregates) SetAvgScore(v float32) { + o.AvgScore = v +} + +// GetP50Latency returns the P50Latency field value +func (o *TracesAggregates) GetP50Latency() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.P50Latency +} + +// GetP50LatencyOk returns a tuple with the P50Latency field value +// and a boolean to check if the value has been set. +func (o *TracesAggregates) GetP50LatencyOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.P50Latency, true +} + +// SetP50Latency sets field value +func (o *TracesAggregates) SetP50Latency(v int32) { + o.P50Latency = v +} + +// GetP95Latency returns the P95Latency field value +func (o *TracesAggregates) GetP95Latency() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.P95Latency +} + +// GetP95LatencyOk returns a tuple with the P95Latency field value +// and a boolean to check if the value has been set. +func (o *TracesAggregates) GetP95LatencyOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.P95Latency, true +} + +// SetP95Latency sets field value +func (o *TracesAggregates) SetP95Latency(v int32) { + o.P95Latency = v +} + +// GetAvgTurns returns the AvgTurns field value +func (o *TracesAggregates) GetAvgTurns() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.AvgTurns +} + +// GetAvgTurnsOk returns a tuple with the AvgTurns field value +// and a boolean to check if the value has been set. +func (o *TracesAggregates) GetAvgTurnsOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.AvgTurns, true +} + +// SetAvgTurns sets field value +func (o *TracesAggregates) SetAvgTurns(v float32) { + o.AvgTurns = v +} + +func (o TracesAggregates) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracesAggregates) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["total_traces"] = o.TotalTraces + toSerialize["failing_traces"] = o.FailingTraces + toSerialize["passing_traces"] = o.PassingTraces + toSerialize["avg_score"] = o.AvgScore + toSerialize["p50_latency"] = o.P50Latency + toSerialize["p95_latency"] = o.P95Latency + toSerialize["avg_turns"] = o.AvgTurns + return toSerialize, nil +} + +func (o *TracesAggregates) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "total_traces", + "failing_traces", + "passing_traces", + "avg_score", + "p50_latency", + "p95_latency", + "avg_turns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracesAggregates := _TracesAggregates{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracesAggregates) + + if err != nil { + return err + } + + *o = TracesAggregates(varTracesAggregates) + + return err +} + +type NullableTracesAggregates struct { + value *TracesAggregates + isSet bool +} + +func (v NullableTracesAggregates) Get() *TracesAggregates { + return v.value +} + +func (v *NullableTracesAggregates) Set(val *TracesAggregates) { + v.value = val + v.isSet = true +} + +func (v NullableTracesAggregates) IsSet() bool { + return v.isSet +} + +func (v *NullableTracesAggregates) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracesAggregates(val *TracesAggregates) *NullableTracesAggregates { + return &NullableTracesAggregates{value: val, isSet: true} +} + +func (v NullableTracesAggregates) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracesAggregates) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_traces_list_row.go b/go/futureagi/model_traces_list_row.go new file mode 100644 index 0000000..68a5e54 --- /dev/null +++ b/go/futureagi/model_traces_list_row.go @@ -0,0 +1,368 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TracesListRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracesListRow{} + +// TracesListRow struct for TracesListRow +type TracesListRow struct { + Id string `json:"id"` + Input NullableString `json:"input"` + Timestamp NullableTime `json:"timestamp"` + LatencyMs NullableInt32 `json:"latency_ms"` + Tokens NullableInt32 `json:"tokens"` + Cost NullableFloat32 `json:"cost"` + Score NullableFloat32 `json:"score"` + Turns NullableInt32 `json:"turns"` +} + +type _TracesListRow TracesListRow + +// NewTracesListRow instantiates a new TracesListRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracesListRow(id string, input NullableString, timestamp NullableTime, latencyMs NullableInt32, tokens NullableInt32, cost NullableFloat32, score NullableFloat32, turns NullableInt32) *TracesListRow { + this := TracesListRow{} + this.Id = id + this.Input = input + this.Timestamp = timestamp + this.LatencyMs = latencyMs + this.Tokens = tokens + this.Cost = cost + this.Score = score + this.Turns = turns + return &this +} + +// NewTracesListRowWithDefaults instantiates a new TracesListRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracesListRowWithDefaults() *TracesListRow { + this := TracesListRow{} + return &this +} + +// GetId returns the Id field value +func (o *TracesListRow) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TracesListRow) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TracesListRow) SetId(v string) { + o.Id = v +} + +// GetInput returns the Input field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TracesListRow) GetInput() string { + if o == nil || o.Input.Get() == nil { + var ret string + return ret + } + + return *o.Input.Get() +} + +// GetInputOk returns a tuple with the Input field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracesListRow) GetInputOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Input.Get(), o.Input.IsSet() +} + +// SetInput sets field value +func (o *TracesListRow) SetInput(v string) { + o.Input.Set(&v) +} + +// GetTimestamp returns the Timestamp field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *TracesListRow) GetTimestamp() time.Time { + if o == nil || o.Timestamp.Get() == nil { + var ret time.Time + return ret + } + + return *o.Timestamp.Get() +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracesListRow) GetTimestampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Timestamp.Get(), o.Timestamp.IsSet() +} + +// SetTimestamp sets field value +func (o *TracesListRow) SetTimestamp(v time.Time) { + o.Timestamp.Set(&v) +} + +// GetLatencyMs returns the LatencyMs field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *TracesListRow) GetLatencyMs() int32 { + if o == nil || o.LatencyMs.Get() == nil { + var ret int32 + return ret + } + + return *o.LatencyMs.Get() +} + +// GetLatencyMsOk returns a tuple with the LatencyMs field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracesListRow) GetLatencyMsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.LatencyMs.Get(), o.LatencyMs.IsSet() +} + +// SetLatencyMs sets field value +func (o *TracesListRow) SetLatencyMs(v int32) { + o.LatencyMs.Set(&v) +} + +// GetTokens returns the Tokens field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *TracesListRow) GetTokens() int32 { + if o == nil || o.Tokens.Get() == nil { + var ret int32 + return ret + } + + return *o.Tokens.Get() +} + +// GetTokensOk returns a tuple with the Tokens field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracesListRow) GetTokensOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Tokens.Get(), o.Tokens.IsSet() +} + +// SetTokens sets field value +func (o *TracesListRow) SetTokens(v int32) { + o.Tokens.Set(&v) +} + +// GetCost returns the Cost field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *TracesListRow) GetCost() float32 { + if o == nil || o.Cost.Get() == nil { + var ret float32 + return ret + } + + return *o.Cost.Get() +} + +// GetCostOk returns a tuple with the Cost field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracesListRow) GetCostOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Cost.Get(), o.Cost.IsSet() +} + +// SetCost sets field value +func (o *TracesListRow) SetCost(v float32) { + o.Cost.Set(&v) +} + +// GetScore returns the Score field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *TracesListRow) GetScore() float32 { + if o == nil || o.Score.Get() == nil { + var ret float32 + return ret + } + + return *o.Score.Get() +} + +// GetScoreOk returns a tuple with the Score field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracesListRow) GetScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Score.Get(), o.Score.IsSet() +} + +// SetScore sets field value +func (o *TracesListRow) SetScore(v float32) { + o.Score.Set(&v) +} + +// GetTurns returns the Turns field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *TracesListRow) GetTurns() int32 { + if o == nil || o.Turns.Get() == nil { + var ret int32 + return ret + } + + return *o.Turns.Get() +} + +// GetTurnsOk returns a tuple with the Turns field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TracesListRow) GetTurnsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Turns.Get(), o.Turns.IsSet() +} + +// SetTurns sets field value +func (o *TracesListRow) SetTurns(v int32) { + o.Turns.Set(&v) +} + +func (o TracesListRow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracesListRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["input"] = o.Input.Get() + toSerialize["timestamp"] = o.Timestamp.Get() + toSerialize["latency_ms"] = o.LatencyMs.Get() + toSerialize["tokens"] = o.Tokens.Get() + toSerialize["cost"] = o.Cost.Get() + toSerialize["score"] = o.Score.Get() + toSerialize["turns"] = o.Turns.Get() + return toSerialize, nil +} + +func (o *TracesListRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "input", + "timestamp", + "latency_ms", + "tokens", + "cost", + "score", + "turns", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracesListRow := _TracesListRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracesListRow) + + if err != nil { + return err + } + + *o = TracesListRow(varTracesListRow) + + return err +} + +type NullableTracesListRow struct { + value *TracesListRow + isSet bool +} + +func (v NullableTracesListRow) Get() *TracesListRow { + return v.value +} + +func (v *NullableTracesListRow) Set(val *TracesListRow) { + v.value = val + v.isSet = true +} + +func (v NullableTracesListRow) IsSet() bool { + return v.isSet +} + +func (v *NullableTracesListRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracesListRow(val *TracesListRow) *NullableTracesListRow { + return &NullableTracesListRow{value: val, isSet: true} +} + +func (v NullableTracesListRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracesListRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_traces_tab_api_response.go b/go/futureagi/model_traces_tab_api_response.go new file mode 100644 index 0000000..7c15477 --- /dev/null +++ b/go/futureagi/model_traces_tab_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TracesTabApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracesTabApiResponse{} + +// TracesTabApiResponse struct for TracesTabApiResponse +type TracesTabApiResponse struct { + Status *bool `json:"status,omitempty"` + Result TracesTabResponse `json:"result"` +} + +type _TracesTabApiResponse TracesTabApiResponse + +// NewTracesTabApiResponse instantiates a new TracesTabApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracesTabApiResponse(result TracesTabResponse) *TracesTabApiResponse { + this := TracesTabApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewTracesTabApiResponseWithDefaults instantiates a new TracesTabApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracesTabApiResponseWithDefaults() *TracesTabApiResponse { + this := TracesTabApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TracesTabApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TracesTabApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TracesTabApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *TracesTabApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *TracesTabApiResponse) GetResult() TracesTabResponse { + if o == nil { + var ret TracesTabResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *TracesTabApiResponse) GetResultOk() (*TracesTabResponse, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *TracesTabApiResponse) SetResult(v TracesTabResponse) { + o.Result = v +} + +func (o TracesTabApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracesTabApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *TracesTabApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracesTabApiResponse := _TracesTabApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracesTabApiResponse) + + if err != nil { + return err + } + + *o = TracesTabApiResponse(varTracesTabApiResponse) + + return err +} + +type NullableTracesTabApiResponse struct { + value *TracesTabApiResponse + isSet bool +} + +func (v NullableTracesTabApiResponse) Get() *TracesTabApiResponse { + return v.value +} + +func (v *NullableTracesTabApiResponse) Set(val *TracesTabApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTracesTabApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTracesTabApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracesTabApiResponse(val *TracesTabApiResponse) *NullableTracesTabApiResponse { + return &NullableTracesTabApiResponse{value: val, isSet: true} +} + +func (v NullableTracesTabApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracesTabApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_traces_tab_response.go b/go/futureagi/model_traces_tab_response.go new file mode 100644 index 0000000..8749dcb --- /dev/null +++ b/go/futureagi/model_traces_tab_response.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TracesTabResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TracesTabResponse{} + +// TracesTabResponse struct for TracesTabResponse +type TracesTabResponse struct { + Aggregates TracesAggregates `json:"aggregates"` + Traces []TracesListRow `json:"traces"` + Total int32 `json:"total"` +} + +type _TracesTabResponse TracesTabResponse + +// NewTracesTabResponse instantiates a new TracesTabResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTracesTabResponse(aggregates TracesAggregates, traces []TracesListRow, total int32) *TracesTabResponse { + this := TracesTabResponse{} + this.Aggregates = aggregates + this.Traces = traces + this.Total = total + return &this +} + +// NewTracesTabResponseWithDefaults instantiates a new TracesTabResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTracesTabResponseWithDefaults() *TracesTabResponse { + this := TracesTabResponse{} + return &this +} + +// GetAggregates returns the Aggregates field value +func (o *TracesTabResponse) GetAggregates() TracesAggregates { + if o == nil { + var ret TracesAggregates + return ret + } + + return o.Aggregates +} + +// GetAggregatesOk returns a tuple with the Aggregates field value +// and a boolean to check if the value has been set. +func (o *TracesTabResponse) GetAggregatesOk() (*TracesAggregates, bool) { + if o == nil { + return nil, false + } + return &o.Aggregates, true +} + +// SetAggregates sets field value +func (o *TracesTabResponse) SetAggregates(v TracesAggregates) { + o.Aggregates = v +} + +// GetTraces returns the Traces field value +func (o *TracesTabResponse) GetTraces() []TracesListRow { + if o == nil { + var ret []TracesListRow + return ret + } + + return o.Traces +} + +// GetTracesOk returns a tuple with the Traces field value +// and a boolean to check if the value has been set. +func (o *TracesTabResponse) GetTracesOk() ([]TracesListRow, bool) { + if o == nil { + return nil, false + } + return o.Traces, true +} + +// SetTraces sets field value +func (o *TracesTabResponse) SetTraces(v []TracesListRow) { + o.Traces = v +} + +// GetTotal returns the Total field value +func (o *TracesTabResponse) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *TracesTabResponse) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *TracesTabResponse) SetTotal(v int32) { + o.Total = v +} + +func (o TracesTabResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TracesTabResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["aggregates"] = o.Aggregates + toSerialize["traces"] = o.Traces + toSerialize["total"] = o.Total + return toSerialize, nil +} + +func (o *TracesTabResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "aggregates", + "traces", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTracesTabResponse := _TracesTabResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTracesTabResponse) + + if err != nil { + return err + } + + *o = TracesTabResponse(varTracesTabResponse) + + return err +} + +type NullableTracesTabResponse struct { + value *TracesTabResponse + isSet bool +} + +func (v NullableTracesTabResponse) Get() *TracesTabResponse { + return v.value +} + +func (v *NullableTracesTabResponse) Set(val *TracesTabResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTracesTabResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTracesTabResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTracesTabResponse(val *TracesTabResponse) *NullableTracesTabResponse { + return &NullableTracesTabResponse{value: val, isSet: true} +} + +func (v NullableTracesTabResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTracesTabResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trend_metric.go b/go/futureagi/model_trend_metric.go new file mode 100644 index 0000000..66d793b --- /dev/null +++ b/go/futureagi/model_trend_metric.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TrendMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrendMetric{} + +// TrendMetric struct for TrendMetric +type TrendMetric struct { + Label string `json:"label"` + Value string `json:"value"` + Delta float32 `json:"delta"` + Unit string `json:"unit"` +} + +type _TrendMetric TrendMetric + +// NewTrendMetric instantiates a new TrendMetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTrendMetric(label string, value string, delta float32, unit string) *TrendMetric { + this := TrendMetric{} + this.Label = label + this.Value = value + this.Delta = delta + this.Unit = unit + return &this +} + +// NewTrendMetricWithDefaults instantiates a new TrendMetric object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTrendMetricWithDefaults() *TrendMetric { + this := TrendMetric{} + return &this +} + +// GetLabel returns the Label field value +func (o *TrendMetric) GetLabel() string { + if o == nil { + var ret string + return ret + } + + return o.Label +} + +// GetLabelOk returns a tuple with the Label field value +// and a boolean to check if the value has been set. +func (o *TrendMetric) GetLabelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Label, true +} + +// SetLabel sets field value +func (o *TrendMetric) SetLabel(v string) { + o.Label = v +} + +// GetValue returns the Value field value +func (o *TrendMetric) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *TrendMetric) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *TrendMetric) SetValue(v string) { + o.Value = v +} + +// GetDelta returns the Delta field value +func (o *TrendMetric) GetDelta() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Delta +} + +// GetDeltaOk returns a tuple with the Delta field value +// and a boolean to check if the value has been set. +func (o *TrendMetric) GetDeltaOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Delta, true +} + +// SetDelta sets field value +func (o *TrendMetric) SetDelta(v float32) { + o.Delta = v +} + +// GetUnit returns the Unit field value +func (o *TrendMetric) GetUnit() string { + if o == nil { + var ret string + return ret + } + + return o.Unit +} + +// GetUnitOk returns a tuple with the Unit field value +// and a boolean to check if the value has been set. +func (o *TrendMetric) GetUnitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Unit, true +} + +// SetUnit sets field value +func (o *TrendMetric) SetUnit(v string) { + o.Unit = v +} + +func (o TrendMetric) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrendMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["label"] = o.Label + toSerialize["value"] = o.Value + toSerialize["delta"] = o.Delta + toSerialize["unit"] = o.Unit + return toSerialize, nil +} + +func (o *TrendMetric) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "label", + "value", + "delta", + "unit", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTrendMetric := _TrendMetric{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTrendMetric) + + if err != nil { + return err + } + + *o = TrendMetric(varTrendMetric) + + return err +} + +type NullableTrendMetric struct { + value *TrendMetric + isSet bool +} + +func (v NullableTrendMetric) Get() *TrendMetric { + return v.value +} + +func (v *NullableTrendMetric) Set(val *TrendMetric) { + v.value = val + v.isSet = true +} + +func (v NullableTrendMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableTrendMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrendMetric(val *TrendMetric) *NullableTrendMetric { + return &NullableTrendMetric{value: val, isSet: true} +} + +func (v NullableTrendMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrendMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trend_point.go b/go/futureagi/model_trend_point.go new file mode 100644 index 0000000..8a8d042 --- /dev/null +++ b/go/futureagi/model_trend_point.go @@ -0,0 +1,214 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the TrendPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrendPoint{} + +// TrendPoint struct for TrendPoint +type TrendPoint struct { + Timestamp time.Time `json:"timestamp"` + Value int32 `json:"value"` + Users int32 `json:"users"` +} + +type _TrendPoint TrendPoint + +// NewTrendPoint instantiates a new TrendPoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTrendPoint(timestamp time.Time, value int32, users int32) *TrendPoint { + this := TrendPoint{} + this.Timestamp = timestamp + this.Value = value + this.Users = users + return &this +} + +// NewTrendPointWithDefaults instantiates a new TrendPoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTrendPointWithDefaults() *TrendPoint { + this := TrendPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value +func (o *TrendPoint) GetTimestamp() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *TrendPoint) GetTimestampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *TrendPoint) SetTimestamp(v time.Time) { + o.Timestamp = v +} + +// GetValue returns the Value field value +func (o *TrendPoint) GetValue() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *TrendPoint) GetValueOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *TrendPoint) SetValue(v int32) { + o.Value = v +} + +// GetUsers returns the Users field value +func (o *TrendPoint) GetUsers() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value +// and a boolean to check if the value has been set. +func (o *TrendPoint) GetUsersOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Users, true +} + +// SetUsers sets field value +func (o *TrendPoint) SetUsers(v int32) { + o.Users = v +} + +func (o TrendPoint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrendPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["timestamp"] = o.Timestamp + toSerialize["value"] = o.Value + toSerialize["users"] = o.Users + return toSerialize, nil +} + +func (o *TrendPoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timestamp", + "value", + "users", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTrendPoint := _TrendPoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTrendPoint) + + if err != nil { + return err + } + + *o = TrendPoint(varTrendPoint) + + return err +} + +type NullableTrendPoint struct { + value *TrendPoint + isSet bool +} + +func (v NullableTrendPoint) Get() *TrendPoint { + return v.value +} + +func (v *NullableTrendPoint) Set(val *TrendPoint) { + v.value = val + v.isSet = true +} + +func (v NullableTrendPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableTrendPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrendPoint(val *TrendPoint) *NullableTrendPoint { + return &NullableTrendPoint{value: val, isSet: true} +} + +func (v NullableTrendPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrendPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trends_tab_api_response.go b/go/futureagi/model_trends_tab_api_response.go new file mode 100644 index 0000000..902aa6e --- /dev/null +++ b/go/futureagi/model_trends_tab_api_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TrendsTabApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrendsTabApiResponse{} + +// TrendsTabApiResponse struct for TrendsTabApiResponse +type TrendsTabApiResponse struct { + Status *bool `json:"status,omitempty"` + Result TrendsTabResponse `json:"result"` +} + +type _TrendsTabApiResponse TrendsTabApiResponse + +// NewTrendsTabApiResponse instantiates a new TrendsTabApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTrendsTabApiResponse(result TrendsTabResponse) *TrendsTabApiResponse { + this := TrendsTabApiResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewTrendsTabApiResponseWithDefaults instantiates a new TrendsTabApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTrendsTabApiResponseWithDefaults() *TrendsTabApiResponse { + this := TrendsTabApiResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TrendsTabApiResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrendsTabApiResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *TrendsTabApiResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *TrendsTabApiResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *TrendsTabApiResponse) GetResult() TrendsTabResponse { + if o == nil { + var ret TrendsTabResponse + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *TrendsTabApiResponse) GetResultOk() (*TrendsTabResponse, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *TrendsTabApiResponse) SetResult(v TrendsTabResponse) { + o.Result = v +} + +func (o TrendsTabApiResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrendsTabApiResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *TrendsTabApiResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTrendsTabApiResponse := _TrendsTabApiResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTrendsTabApiResponse) + + if err != nil { + return err + } + + *o = TrendsTabApiResponse(varTrendsTabApiResponse) + + return err +} + +type NullableTrendsTabApiResponse struct { + value *TrendsTabApiResponse + isSet bool +} + +func (v NullableTrendsTabApiResponse) Get() *TrendsTabApiResponse { + return v.value +} + +func (v *NullableTrendsTabApiResponse) Set(val *TrendsTabApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTrendsTabApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTrendsTabApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrendsTabApiResponse(val *TrendsTabApiResponse) *NullableTrendsTabApiResponse { + return &NullableTrendsTabApiResponse{value: val, isSet: true} +} + +func (v NullableTrendsTabApiResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrendsTabApiResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_trends_tab_response.go b/go/futureagi/model_trends_tab_response.go new file mode 100644 index 0000000..5c5d072 --- /dev/null +++ b/go/futureagi/model_trends_tab_response.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TrendsTabResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrendsTabResponse{} + +// TrendsTabResponse struct for TrendsTabResponse +type TrendsTabResponse struct { + Metrics []TrendMetric `json:"metrics"` + EventsOverTime []EventsOverTimePoint `json:"events_over_time"` + ScoreTrends []ScoreTrend `json:"score_trends"` + ActivityHeatmap [][]HeatmapCell `json:"activity_heatmap"` +} + +type _TrendsTabResponse TrendsTabResponse + +// NewTrendsTabResponse instantiates a new TrendsTabResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTrendsTabResponse(metrics []TrendMetric, eventsOverTime []EventsOverTimePoint, scoreTrends []ScoreTrend, activityHeatmap [][]HeatmapCell) *TrendsTabResponse { + this := TrendsTabResponse{} + this.Metrics = metrics + this.EventsOverTime = eventsOverTime + this.ScoreTrends = scoreTrends + this.ActivityHeatmap = activityHeatmap + return &this +} + +// NewTrendsTabResponseWithDefaults instantiates a new TrendsTabResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTrendsTabResponseWithDefaults() *TrendsTabResponse { + this := TrendsTabResponse{} + return &this +} + +// GetMetrics returns the Metrics field value +func (o *TrendsTabResponse) GetMetrics() []TrendMetric { + if o == nil { + var ret []TrendMetric + return ret + } + + return o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value +// and a boolean to check if the value has been set. +func (o *TrendsTabResponse) GetMetricsOk() ([]TrendMetric, bool) { + if o == nil { + return nil, false + } + return o.Metrics, true +} + +// SetMetrics sets field value +func (o *TrendsTabResponse) SetMetrics(v []TrendMetric) { + o.Metrics = v +} + +// GetEventsOverTime returns the EventsOverTime field value +func (o *TrendsTabResponse) GetEventsOverTime() []EventsOverTimePoint { + if o == nil { + var ret []EventsOverTimePoint + return ret + } + + return o.EventsOverTime +} + +// GetEventsOverTimeOk returns a tuple with the EventsOverTime field value +// and a boolean to check if the value has been set. +func (o *TrendsTabResponse) GetEventsOverTimeOk() ([]EventsOverTimePoint, bool) { + if o == nil { + return nil, false + } + return o.EventsOverTime, true +} + +// SetEventsOverTime sets field value +func (o *TrendsTabResponse) SetEventsOverTime(v []EventsOverTimePoint) { + o.EventsOverTime = v +} + +// GetScoreTrends returns the ScoreTrends field value +func (o *TrendsTabResponse) GetScoreTrends() []ScoreTrend { + if o == nil { + var ret []ScoreTrend + return ret + } + + return o.ScoreTrends +} + +// GetScoreTrendsOk returns a tuple with the ScoreTrends field value +// and a boolean to check if the value has been set. +func (o *TrendsTabResponse) GetScoreTrendsOk() ([]ScoreTrend, bool) { + if o == nil { + return nil, false + } + return o.ScoreTrends, true +} + +// SetScoreTrends sets field value +func (o *TrendsTabResponse) SetScoreTrends(v []ScoreTrend) { + o.ScoreTrends = v +} + +// GetActivityHeatmap returns the ActivityHeatmap field value +func (o *TrendsTabResponse) GetActivityHeatmap() [][]HeatmapCell { + if o == nil { + var ret [][]HeatmapCell + return ret + } + + return o.ActivityHeatmap +} + +// GetActivityHeatmapOk returns a tuple with the ActivityHeatmap field value +// and a boolean to check if the value has been set. +func (o *TrendsTabResponse) GetActivityHeatmapOk() ([][]HeatmapCell, bool) { + if o == nil { + return nil, false + } + return o.ActivityHeatmap, true +} + +// SetActivityHeatmap sets field value +func (o *TrendsTabResponse) SetActivityHeatmap(v [][]HeatmapCell) { + o.ActivityHeatmap = v +} + +func (o TrendsTabResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrendsTabResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["metrics"] = o.Metrics + toSerialize["events_over_time"] = o.EventsOverTime + toSerialize["score_trends"] = o.ScoreTrends + toSerialize["activity_heatmap"] = o.ActivityHeatmap + return toSerialize, nil +} + +func (o *TrendsTabResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "metrics", + "events_over_time", + "score_trends", + "activity_heatmap", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTrendsTabResponse := _TrendsTabResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTrendsTabResponse) + + if err != nil { + return err + } + + *o = TrendsTabResponse(varTrendsTabResponse) + + return err +} + +type NullableTrendsTabResponse struct { + value *TrendsTabResponse + isSet bool +} + +func (v NullableTrendsTabResponse) Get() *TrendsTabResponse { + return v.value +} + +func (v *NullableTrendsTabResponse) Set(val *TrendsTabResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTrendsTabResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTrendsTabResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrendsTabResponse(val *TrendsTabResponse) *NullableTrendsTabResponse { + return &NullableTrendsTabResponse{value: val, isSet: true} +} + +func (v NullableTrendsTabResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrendsTabResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_update_run_test_.go b/go/futureagi/model_update_run_test_.go new file mode 100644 index 0000000..7fafee4 --- /dev/null +++ b/go/futureagi/model_update_run_test_.go @@ -0,0 +1,305 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the UpdateRunTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateRunTest{} + +// UpdateRunTest struct for UpdateRunTest +type UpdateRunTest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + AgentDefinitionId *string `json:"agent_definition_id,omitempty"` + ScenarioIds []string `json:"scenario_ids,omitempty"` + DatasetRowIds []string `json:"dataset_row_ids,omitempty"` + EvalConfigIds []string `json:"eval_config_ids,omitempty"` +} + +// NewUpdateRunTest instantiates a new UpdateRunTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateRunTest() *UpdateRunTest { + this := UpdateRunTest{} + return &this +} + +// NewUpdateRunTestWithDefaults instantiates a new UpdateRunTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateRunTestWithDefaults() *UpdateRunTest { + this := UpdateRunTest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateRunTest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRunTest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateRunTest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateRunTest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateRunTest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRunTest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateRunTest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateRunTest) SetDescription(v string) { + o.Description = &v +} + +// GetAgentDefinitionId returns the AgentDefinitionId field value if set, zero value otherwise. +func (o *UpdateRunTest) GetAgentDefinitionId() string { + if o == nil || IsNil(o.AgentDefinitionId) { + var ret string + return ret + } + return *o.AgentDefinitionId +} + +// GetAgentDefinitionIdOk returns a tuple with the AgentDefinitionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRunTest) GetAgentDefinitionIdOk() (*string, bool) { + if o == nil || IsNil(o.AgentDefinitionId) { + return nil, false + } + return o.AgentDefinitionId, true +} + +// HasAgentDefinitionId returns a boolean if a field has been set. +func (o *UpdateRunTest) HasAgentDefinitionId() bool { + if o != nil && !IsNil(o.AgentDefinitionId) { + return true + } + + return false +} + +// SetAgentDefinitionId gets a reference to the given string and assigns it to the AgentDefinitionId field. +func (o *UpdateRunTest) SetAgentDefinitionId(v string) { + o.AgentDefinitionId = &v +} + +// GetScenarioIds returns the ScenarioIds field value if set, zero value otherwise. +func (o *UpdateRunTest) GetScenarioIds() []string { + if o == nil || IsNil(o.ScenarioIds) { + var ret []string + return ret + } + return o.ScenarioIds +} + +// GetScenarioIdsOk returns a tuple with the ScenarioIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRunTest) GetScenarioIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ScenarioIds) { + return nil, false + } + return o.ScenarioIds, true +} + +// HasScenarioIds returns a boolean if a field has been set. +func (o *UpdateRunTest) HasScenarioIds() bool { + if o != nil && !IsNil(o.ScenarioIds) { + return true + } + + return false +} + +// SetScenarioIds gets a reference to the given []string and assigns it to the ScenarioIds field. +func (o *UpdateRunTest) SetScenarioIds(v []string) { + o.ScenarioIds = v +} + +// GetDatasetRowIds returns the DatasetRowIds field value if set, zero value otherwise. +func (o *UpdateRunTest) GetDatasetRowIds() []string { + if o == nil || IsNil(o.DatasetRowIds) { + var ret []string + return ret + } + return o.DatasetRowIds +} + +// GetDatasetRowIdsOk returns a tuple with the DatasetRowIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRunTest) GetDatasetRowIdsOk() ([]string, bool) { + if o == nil || IsNil(o.DatasetRowIds) { + return nil, false + } + return o.DatasetRowIds, true +} + +// HasDatasetRowIds returns a boolean if a field has been set. +func (o *UpdateRunTest) HasDatasetRowIds() bool { + if o != nil && !IsNil(o.DatasetRowIds) { + return true + } + + return false +} + +// SetDatasetRowIds gets a reference to the given []string and assigns it to the DatasetRowIds field. +func (o *UpdateRunTest) SetDatasetRowIds(v []string) { + o.DatasetRowIds = v +} + +// GetEvalConfigIds returns the EvalConfigIds field value if set, zero value otherwise. +func (o *UpdateRunTest) GetEvalConfigIds() []string { + if o == nil || IsNil(o.EvalConfigIds) { + var ret []string + return ret + } + return o.EvalConfigIds +} + +// GetEvalConfigIdsOk returns a tuple with the EvalConfigIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRunTest) GetEvalConfigIdsOk() ([]string, bool) { + if o == nil || IsNil(o.EvalConfigIds) { + return nil, false + } + return o.EvalConfigIds, true +} + +// HasEvalConfigIds returns a boolean if a field has been set. +func (o *UpdateRunTest) HasEvalConfigIds() bool { + if o != nil && !IsNil(o.EvalConfigIds) { + return true + } + + return false +} + +// SetEvalConfigIds gets a reference to the given []string and assigns it to the EvalConfigIds field. +func (o *UpdateRunTest) SetEvalConfigIds(v []string) { + o.EvalConfigIds = v +} + +func (o UpdateRunTest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateRunTest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.AgentDefinitionId) { + toSerialize["agent_definition_id"] = o.AgentDefinitionId + } + if !IsNil(o.ScenarioIds) { + toSerialize["scenario_ids"] = o.ScenarioIds + } + if !IsNil(o.DatasetRowIds) { + toSerialize["dataset_row_ids"] = o.DatasetRowIds + } + if !IsNil(o.EvalConfigIds) { + toSerialize["eval_config_ids"] = o.EvalConfigIds + } + return toSerialize, nil +} + +type NullableUpdateRunTest struct { + value *UpdateRunTest + isSet bool +} + +func (v NullableUpdateRunTest) Get() *UpdateRunTest { + return v.value +} + +func (v *NullableUpdateRunTest) Set(val *UpdateRunTest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateRunTest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateRunTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateRunTest(val *UpdateRunTest) *NullableUpdateRunTest { + return &NullableUpdateRunTest{value: val, isSet: true} +} + +func (v NullableUpdateRunTest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateRunTest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user.go b/go/futureagi/model_user.go new file mode 100644 index 0000000..e8bda80 --- /dev/null +++ b/go/futureagi/model_user.go @@ -0,0 +1,462 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User struct for User +type User struct { + Id *string `json:"id,omitempty"` + Email string `json:"email"` + Name string `json:"name"` + OrganizationRole NullableString `json:"organization_role,omitempty"` + Organization *Organization `json:"organization,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Status *string `json:"status,omitempty"` + // User's job role (e.g., Data Scientist, ML Engineer, or custom role) + Role NullableString `json:"role,omitempty"` + // List of user's goals for using the platform + Goals map[string]interface{} `json:"goals,omitempty"` +} + +type _User User + +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser(email string, name string) *User { + this := User{} + this.Email = email + this.Name = name + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *User) SetId(v string) { + o.Id = &v +} + +// GetEmail returns the Email field value +func (o *User) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *User) SetEmail(v string) { + o.Email = v +} + +// GetName returns the Name field value +func (o *User) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *User) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *User) SetName(v string) { + o.Name = v +} + +// GetOrganizationRole returns the OrganizationRole field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetOrganizationRole() string { + if o == nil || IsNil(o.OrganizationRole.Get()) { + var ret string + return ret + } + return *o.OrganizationRole.Get() +} + +// GetOrganizationRoleOk returns a tuple with the OrganizationRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetOrganizationRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OrganizationRole.Get(), o.OrganizationRole.IsSet() +} + +// HasOrganizationRole returns a boolean if a field has been set. +func (o *User) HasOrganizationRole() bool { + if o != nil && o.OrganizationRole.IsSet() { + return true + } + + return false +} + +// SetOrganizationRole gets a reference to the given NullableString and assigns it to the OrganizationRole field. +func (o *User) SetOrganizationRole(v string) { + o.OrganizationRole.Set(&v) +} + +// SetOrganizationRoleNil sets the value for OrganizationRole to be an explicit nil +func (o *User) SetOrganizationRoleNil() { + o.OrganizationRole.Set(nil) +} + +// UnsetOrganizationRole ensures that no value is present for OrganizationRole, not even an explicit nil +func (o *User) UnsetOrganizationRole() { + o.OrganizationRole.Unset() +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *User) GetOrganization() Organization { + if o == nil || IsNil(o.Organization) { + var ret Organization + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetOrganizationOk() (*Organization, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *User) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given Organization and assigns it to the Organization field. +func (o *User) SetOrganization(v Organization) { + o.Organization = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *User) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *User) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *User) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *User) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *User) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *User) SetStatus(v string) { + o.Status = &v +} + +// GetRole returns the Role field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetRole() string { + if o == nil || IsNil(o.Role.Get()) { + var ret string + return ret + } + return *o.Role.Get() +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Role.Get(), o.Role.IsSet() +} + +// HasRole returns a boolean if a field has been set. +func (o *User) HasRole() bool { + if o != nil && o.Role.IsSet() { + return true + } + + return false +} + +// SetRole gets a reference to the given NullableString and assigns it to the Role field. +func (o *User) SetRole(v string) { + o.Role.Set(&v) +} + +// SetRoleNil sets the value for Role to be an explicit nil +func (o *User) SetRoleNil() { + o.Role.Set(nil) +} + +// UnsetRole ensures that no value is present for Role, not even an explicit nil +func (o *User) UnsetRole() { + o.Role.Unset() +} + +// GetGoals returns the Goals field value if set, zero value otherwise. +func (o *User) GetGoals() map[string]interface{} { + if o == nil || IsNil(o.Goals) { + var ret map[string]interface{} + return ret + } + return o.Goals +} + +// GetGoalsOk returns a tuple with the Goals field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetGoalsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Goals) { + return map[string]interface{}{}, false + } + return o.Goals, true +} + +// HasGoals returns a boolean if a field has been set. +func (o *User) HasGoals() bool { + if o != nil && !IsNil(o.Goals) { + return true + } + + return false +} + +// SetGoals gets a reference to the given map[string]interface{} and assigns it to the Goals field. +func (o *User) SetGoals(v map[string]interface{}) { + o.Goals = v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["email"] = o.Email + toSerialize["name"] = o.Name + if o.OrganizationRole.IsSet() { + toSerialize["organization_role"] = o.OrganizationRole.Get() + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Role.IsSet() { + toSerialize["role"] = o.Role.Get() + } + if !IsNil(o.Goals) { + toSerialize["goals"] = o.Goals + } + return toSerialize, nil +} + +func (o *User) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "email", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUser := _User{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + return err +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_alert_monitor.go b/go/futureagi/model_user_alert_monitor.go new file mode 100644 index 0000000..899da9b --- /dev/null +++ b/go/futureagi/model_user_alert_monitor.go @@ -0,0 +1,1179 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UserAlertMonitor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAlertMonitor{} + +// UserAlertMonitor struct for UserAlertMonitor +type UserAlertMonitor struct { + Id *string `json:"id,omitempty"` + Project string `json:"project"` + Name string `json:"name"` + MetricName *string `json:"metric_name,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Deleted *bool `json:"deleted,omitempty"` + DeletedAt NullableTime `json:"deleted_at,omitempty"` + MetricType string `json:"metric_type"` + // Id of the evaluation template. + Metric NullableString `json:"metric,omitempty"` + ThresholdOperator string `json:"threshold_operator"` + // Method to set the threshold for the monitor (Static or Percentage change). + ThresholdType *string `json:"threshold_type,omitempty"` + // For choice and pass/fail evals, the specific metric value to monitor. + ThresholdMetricValue NullableString `json:"threshold_metric_value,omitempty"` + CriticalThresholdValue NullableFloat32 `json:"critical_threshold_value,omitempty"` + WarningThresholdValue NullableFloat32 `json:"warning_threshold_value,omitempty"` + // Frequency of alert checks in minutes. + AlertFrequency *int32 `json:"alert_frequency,omitempty"` + // For auto-thresholding. The time window in minutes to calculate the historical mean + AutoThresholdTimeWindow *int32 `json:"auto_threshold_time_window,omitempty"` + // The last time the monitor was checked for alerts. + LastCheckedAt NullableTime `json:"last_checked_at,omitempty"` + NotificationEmails []string `json:"notification_emails,omitempty"` + SlackWebhookUrl NullableString `json:"slack_webhook_url,omitempty"` + SlackNotes NullableString `json:"slack_notes,omitempty"` + IsMute *bool `json:"is_mute,omitempty"` + Filters map[string]interface{} `json:"filters,omitempty"` + Logs []map[string]interface{} `json:"logs,omitempty"` + Organization string `json:"organization"` + Workspace NullableString `json:"workspace,omitempty"` + CreatedBy NullableString `json:"created_by,omitempty"` +} + +type _UserAlertMonitor UserAlertMonitor + +// NewUserAlertMonitor instantiates a new UserAlertMonitor object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAlertMonitor(project string, name string, metricType string, thresholdOperator string, organization string) *UserAlertMonitor { + this := UserAlertMonitor{} + this.Project = project + this.Name = name + this.MetricType = metricType + this.ThresholdOperator = thresholdOperator + this.Organization = organization + return &this +} + +// NewUserAlertMonitorWithDefaults instantiates a new UserAlertMonitor object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAlertMonitorWithDefaults() *UserAlertMonitor { + this := UserAlertMonitor{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UserAlertMonitor) SetId(v string) { + o.Id = &v +} + +// GetProject returns the Project field value +func (o *UserAlertMonitor) GetProject() string { + if o == nil { + var ret string + return ret + } + + return o.Project +} + +// GetProjectOk returns a tuple with the Project field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetProjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Project, true +} + +// SetProject sets field value +func (o *UserAlertMonitor) SetProject(v string) { + o.Project = v +} + +// GetName returns the Name field value +func (o *UserAlertMonitor) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UserAlertMonitor) SetName(v string) { + o.Name = v +} + +// GetMetricName returns the MetricName field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetMetricName() string { + if o == nil || IsNil(o.MetricName) { + var ret string + return ret + } + return *o.MetricName +} + +// GetMetricNameOk returns a tuple with the MetricName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetMetricNameOk() (*string, bool) { + if o == nil || IsNil(o.MetricName) { + return nil, false + } + return o.MetricName, true +} + +// HasMetricName returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasMetricName() bool { + if o != nil && !IsNil(o.MetricName) { + return true + } + + return false +} + +// SetMetricName gets a reference to the given string and assigns it to the MetricName field. +func (o *UserAlertMonitor) SetMetricName(v string) { + o.MetricName = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *UserAlertMonitor) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *UserAlertMonitor) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetDeleted returns the Deleted field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetDeleted() bool { + if o == nil || IsNil(o.Deleted) { + var ret bool + return ret + } + return *o.Deleted +} + +// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetDeletedOk() (*bool, bool) { + if o == nil || IsNil(o.Deleted) { + return nil, false + } + return o.Deleted, true +} + +// HasDeleted returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasDeleted() bool { + if o != nil && !IsNil(o.Deleted) { + return true + } + + return false +} + +// SetDeleted gets a reference to the given bool and assigns it to the Deleted field. +func (o *UserAlertMonitor) SetDeleted(v bool) { + o.Deleted = &v +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetDeletedAt() time.Time { + if o == nil || IsNil(o.DeletedAt.Get()) { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *UserAlertMonitor) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} + +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *UserAlertMonitor) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *UserAlertMonitor) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +// GetMetricType returns the MetricType field value +func (o *UserAlertMonitor) GetMetricType() string { + if o == nil { + var ret string + return ret + } + + return o.MetricType +} + +// GetMetricTypeOk returns a tuple with the MetricType field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetMetricTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MetricType, true +} + +// SetMetricType sets field value +func (o *UserAlertMonitor) SetMetricType(v string) { + o.MetricType = v +} + +// GetMetric returns the Metric field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetMetric() string { + if o == nil || IsNil(o.Metric.Get()) { + var ret string + return ret + } + return *o.Metric.Get() +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetMetricOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Metric.Get(), o.Metric.IsSet() +} + +// HasMetric returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasMetric() bool { + if o != nil && o.Metric.IsSet() { + return true + } + + return false +} + +// SetMetric gets a reference to the given NullableString and assigns it to the Metric field. +func (o *UserAlertMonitor) SetMetric(v string) { + o.Metric.Set(&v) +} + +// SetMetricNil sets the value for Metric to be an explicit nil +func (o *UserAlertMonitor) SetMetricNil() { + o.Metric.Set(nil) +} + +// UnsetMetric ensures that no value is present for Metric, not even an explicit nil +func (o *UserAlertMonitor) UnsetMetric() { + o.Metric.Unset() +} + +// GetThresholdOperator returns the ThresholdOperator field value +func (o *UserAlertMonitor) GetThresholdOperator() string { + if o == nil { + var ret string + return ret + } + + return o.ThresholdOperator +} + +// GetThresholdOperatorOk returns a tuple with the ThresholdOperator field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetThresholdOperatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ThresholdOperator, true +} + +// SetThresholdOperator sets field value +func (o *UserAlertMonitor) SetThresholdOperator(v string) { + o.ThresholdOperator = v +} + +// GetThresholdType returns the ThresholdType field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetThresholdType() string { + if o == nil || IsNil(o.ThresholdType) { + var ret string + return ret + } + return *o.ThresholdType +} + +// GetThresholdTypeOk returns a tuple with the ThresholdType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetThresholdTypeOk() (*string, bool) { + if o == nil || IsNil(o.ThresholdType) { + return nil, false + } + return o.ThresholdType, true +} + +// HasThresholdType returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasThresholdType() bool { + if o != nil && !IsNil(o.ThresholdType) { + return true + } + + return false +} + +// SetThresholdType gets a reference to the given string and assigns it to the ThresholdType field. +func (o *UserAlertMonitor) SetThresholdType(v string) { + o.ThresholdType = &v +} + +// GetThresholdMetricValue returns the ThresholdMetricValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetThresholdMetricValue() string { + if o == nil || IsNil(o.ThresholdMetricValue.Get()) { + var ret string + return ret + } + return *o.ThresholdMetricValue.Get() +} + +// GetThresholdMetricValueOk returns a tuple with the ThresholdMetricValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetThresholdMetricValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ThresholdMetricValue.Get(), o.ThresholdMetricValue.IsSet() +} + +// HasThresholdMetricValue returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasThresholdMetricValue() bool { + if o != nil && o.ThresholdMetricValue.IsSet() { + return true + } + + return false +} + +// SetThresholdMetricValue gets a reference to the given NullableString and assigns it to the ThresholdMetricValue field. +func (o *UserAlertMonitor) SetThresholdMetricValue(v string) { + o.ThresholdMetricValue.Set(&v) +} + +// SetThresholdMetricValueNil sets the value for ThresholdMetricValue to be an explicit nil +func (o *UserAlertMonitor) SetThresholdMetricValueNil() { + o.ThresholdMetricValue.Set(nil) +} + +// UnsetThresholdMetricValue ensures that no value is present for ThresholdMetricValue, not even an explicit nil +func (o *UserAlertMonitor) UnsetThresholdMetricValue() { + o.ThresholdMetricValue.Unset() +} + +// GetCriticalThresholdValue returns the CriticalThresholdValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetCriticalThresholdValue() float32 { + if o == nil || IsNil(o.CriticalThresholdValue.Get()) { + var ret float32 + return ret + } + return *o.CriticalThresholdValue.Get() +} + +// GetCriticalThresholdValueOk returns a tuple with the CriticalThresholdValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetCriticalThresholdValueOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.CriticalThresholdValue.Get(), o.CriticalThresholdValue.IsSet() +} + +// HasCriticalThresholdValue returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasCriticalThresholdValue() bool { + if o != nil && o.CriticalThresholdValue.IsSet() { + return true + } + + return false +} + +// SetCriticalThresholdValue gets a reference to the given NullableFloat32 and assigns it to the CriticalThresholdValue field. +func (o *UserAlertMonitor) SetCriticalThresholdValue(v float32) { + o.CriticalThresholdValue.Set(&v) +} + +// SetCriticalThresholdValueNil sets the value for CriticalThresholdValue to be an explicit nil +func (o *UserAlertMonitor) SetCriticalThresholdValueNil() { + o.CriticalThresholdValue.Set(nil) +} + +// UnsetCriticalThresholdValue ensures that no value is present for CriticalThresholdValue, not even an explicit nil +func (o *UserAlertMonitor) UnsetCriticalThresholdValue() { + o.CriticalThresholdValue.Unset() +} + +// GetWarningThresholdValue returns the WarningThresholdValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetWarningThresholdValue() float32 { + if o == nil || IsNil(o.WarningThresholdValue.Get()) { + var ret float32 + return ret + } + return *o.WarningThresholdValue.Get() +} + +// GetWarningThresholdValueOk returns a tuple with the WarningThresholdValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetWarningThresholdValueOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.WarningThresholdValue.Get(), o.WarningThresholdValue.IsSet() +} + +// HasWarningThresholdValue returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasWarningThresholdValue() bool { + if o != nil && o.WarningThresholdValue.IsSet() { + return true + } + + return false +} + +// SetWarningThresholdValue gets a reference to the given NullableFloat32 and assigns it to the WarningThresholdValue field. +func (o *UserAlertMonitor) SetWarningThresholdValue(v float32) { + o.WarningThresholdValue.Set(&v) +} + +// SetWarningThresholdValueNil sets the value for WarningThresholdValue to be an explicit nil +func (o *UserAlertMonitor) SetWarningThresholdValueNil() { + o.WarningThresholdValue.Set(nil) +} + +// UnsetWarningThresholdValue ensures that no value is present for WarningThresholdValue, not even an explicit nil +func (o *UserAlertMonitor) UnsetWarningThresholdValue() { + o.WarningThresholdValue.Unset() +} + +// GetAlertFrequency returns the AlertFrequency field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetAlertFrequency() int32 { + if o == nil || IsNil(o.AlertFrequency) { + var ret int32 + return ret + } + return *o.AlertFrequency +} + +// GetAlertFrequencyOk returns a tuple with the AlertFrequency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetAlertFrequencyOk() (*int32, bool) { + if o == nil || IsNil(o.AlertFrequency) { + return nil, false + } + return o.AlertFrequency, true +} + +// HasAlertFrequency returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasAlertFrequency() bool { + if o != nil && !IsNil(o.AlertFrequency) { + return true + } + + return false +} + +// SetAlertFrequency gets a reference to the given int32 and assigns it to the AlertFrequency field. +func (o *UserAlertMonitor) SetAlertFrequency(v int32) { + o.AlertFrequency = &v +} + +// GetAutoThresholdTimeWindow returns the AutoThresholdTimeWindow field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetAutoThresholdTimeWindow() int32 { + if o == nil || IsNil(o.AutoThresholdTimeWindow) { + var ret int32 + return ret + } + return *o.AutoThresholdTimeWindow +} + +// GetAutoThresholdTimeWindowOk returns a tuple with the AutoThresholdTimeWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetAutoThresholdTimeWindowOk() (*int32, bool) { + if o == nil || IsNil(o.AutoThresholdTimeWindow) { + return nil, false + } + return o.AutoThresholdTimeWindow, true +} + +// HasAutoThresholdTimeWindow returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasAutoThresholdTimeWindow() bool { + if o != nil && !IsNil(o.AutoThresholdTimeWindow) { + return true + } + + return false +} + +// SetAutoThresholdTimeWindow gets a reference to the given int32 and assigns it to the AutoThresholdTimeWindow field. +func (o *UserAlertMonitor) SetAutoThresholdTimeWindow(v int32) { + o.AutoThresholdTimeWindow = &v +} + +// GetLastCheckedAt returns the LastCheckedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetLastCheckedAt() time.Time { + if o == nil || IsNil(o.LastCheckedAt.Get()) { + var ret time.Time + return ret + } + return *o.LastCheckedAt.Get() +} + +// GetLastCheckedAtOk returns a tuple with the LastCheckedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetLastCheckedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastCheckedAt.Get(), o.LastCheckedAt.IsSet() +} + +// HasLastCheckedAt returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasLastCheckedAt() bool { + if o != nil && o.LastCheckedAt.IsSet() { + return true + } + + return false +} + +// SetLastCheckedAt gets a reference to the given NullableTime and assigns it to the LastCheckedAt field. +func (o *UserAlertMonitor) SetLastCheckedAt(v time.Time) { + o.LastCheckedAt.Set(&v) +} + +// SetLastCheckedAtNil sets the value for LastCheckedAt to be an explicit nil +func (o *UserAlertMonitor) SetLastCheckedAtNil() { + o.LastCheckedAt.Set(nil) +} + +// UnsetLastCheckedAt ensures that no value is present for LastCheckedAt, not even an explicit nil +func (o *UserAlertMonitor) UnsetLastCheckedAt() { + o.LastCheckedAt.Unset() +} + +// GetNotificationEmails returns the NotificationEmails field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetNotificationEmails() []string { + if o == nil || IsNil(o.NotificationEmails) { + var ret []string + return ret + } + return o.NotificationEmails +} + +// GetNotificationEmailsOk returns a tuple with the NotificationEmails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetNotificationEmailsOk() ([]string, bool) { + if o == nil || IsNil(o.NotificationEmails) { + return nil, false + } + return o.NotificationEmails, true +} + +// HasNotificationEmails returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasNotificationEmails() bool { + if o != nil && !IsNil(o.NotificationEmails) { + return true + } + + return false +} + +// SetNotificationEmails gets a reference to the given []string and assigns it to the NotificationEmails field. +func (o *UserAlertMonitor) SetNotificationEmails(v []string) { + o.NotificationEmails = v +} + +// GetSlackWebhookUrl returns the SlackWebhookUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetSlackWebhookUrl() string { + if o == nil || IsNil(o.SlackWebhookUrl.Get()) { + var ret string + return ret + } + return *o.SlackWebhookUrl.Get() +} + +// GetSlackWebhookUrlOk returns a tuple with the SlackWebhookUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetSlackWebhookUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlackWebhookUrl.Get(), o.SlackWebhookUrl.IsSet() +} + +// HasSlackWebhookUrl returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasSlackWebhookUrl() bool { + if o != nil && o.SlackWebhookUrl.IsSet() { + return true + } + + return false +} + +// SetSlackWebhookUrl gets a reference to the given NullableString and assigns it to the SlackWebhookUrl field. +func (o *UserAlertMonitor) SetSlackWebhookUrl(v string) { + o.SlackWebhookUrl.Set(&v) +} + +// SetSlackWebhookUrlNil sets the value for SlackWebhookUrl to be an explicit nil +func (o *UserAlertMonitor) SetSlackWebhookUrlNil() { + o.SlackWebhookUrl.Set(nil) +} + +// UnsetSlackWebhookUrl ensures that no value is present for SlackWebhookUrl, not even an explicit nil +func (o *UserAlertMonitor) UnsetSlackWebhookUrl() { + o.SlackWebhookUrl.Unset() +} + +// GetSlackNotes returns the SlackNotes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetSlackNotes() string { + if o == nil || IsNil(o.SlackNotes.Get()) { + var ret string + return ret + } + return *o.SlackNotes.Get() +} + +// GetSlackNotesOk returns a tuple with the SlackNotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetSlackNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlackNotes.Get(), o.SlackNotes.IsSet() +} + +// HasSlackNotes returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasSlackNotes() bool { + if o != nil && o.SlackNotes.IsSet() { + return true + } + + return false +} + +// SetSlackNotes gets a reference to the given NullableString and assigns it to the SlackNotes field. +func (o *UserAlertMonitor) SetSlackNotes(v string) { + o.SlackNotes.Set(&v) +} + +// SetSlackNotesNil sets the value for SlackNotes to be an explicit nil +func (o *UserAlertMonitor) SetSlackNotesNil() { + o.SlackNotes.Set(nil) +} + +// UnsetSlackNotes ensures that no value is present for SlackNotes, not even an explicit nil +func (o *UserAlertMonitor) UnsetSlackNotes() { + o.SlackNotes.Unset() +} + +// GetIsMute returns the IsMute field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetIsMute() bool { + if o == nil || IsNil(o.IsMute) { + var ret bool + return ret + } + return *o.IsMute +} + +// GetIsMuteOk returns a tuple with the IsMute field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetIsMuteOk() (*bool, bool) { + if o == nil || IsNil(o.IsMute) { + return nil, false + } + return o.IsMute, true +} + +// HasIsMute returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasIsMute() bool { + if o != nil && !IsNil(o.IsMute) { + return true + } + + return false +} + +// SetIsMute gets a reference to the given bool and assigns it to the IsMute field. +func (o *UserAlertMonitor) SetIsMute(v bool) { + o.IsMute = &v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *UserAlertMonitor) GetFilters() map[string]interface{} { + if o == nil || IsNil(o.Filters) { + var ret map[string]interface{} + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetFiltersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Filters) { + return map[string]interface{}{}, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given map[string]interface{} and assigns it to the Filters field. +func (o *UserAlertMonitor) SetFilters(v map[string]interface{}) { + o.Filters = v +} + +// GetLogs returns the Logs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetLogs() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + return o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetLogsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Logs) { + return nil, false + } + return o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasLogs() bool { + if o != nil && !IsNil(o.Logs) { + return true + } + + return false +} + +// SetLogs gets a reference to the given []map[string]interface{} and assigns it to the Logs field. +func (o *UserAlertMonitor) SetLogs(v []map[string]interface{}) { + o.Logs = v +} + +// GetOrganization returns the Organization field value +func (o *UserAlertMonitor) GetOrganization() string { + if o == nil { + var ret string + return ret + } + + return o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitor) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Organization, true +} + +// SetOrganization sets field value +func (o *UserAlertMonitor) SetOrganization(v string) { + o.Organization = v +} + +// GetWorkspace returns the Workspace field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetWorkspace() string { + if o == nil || IsNil(o.Workspace.Get()) { + var ret string + return ret + } + return *o.Workspace.Get() +} + +// GetWorkspaceOk returns a tuple with the Workspace field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetWorkspaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Workspace.Get(), o.Workspace.IsSet() +} + +// HasWorkspace returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasWorkspace() bool { + if o != nil && o.Workspace.IsSet() { + return true + } + + return false +} + +// SetWorkspace gets a reference to the given NullableString and assigns it to the Workspace field. +func (o *UserAlertMonitor) SetWorkspace(v string) { + o.Workspace.Set(&v) +} + +// SetWorkspaceNil sets the value for Workspace to be an explicit nil +func (o *UserAlertMonitor) SetWorkspaceNil() { + o.Workspace.Set(nil) +} + +// UnsetWorkspace ensures that no value is present for Workspace, not even an explicit nil +func (o *UserAlertMonitor) UnsetWorkspace() { + o.Workspace.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitor) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy.Get()) { + var ret string + return ret + } + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitor) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *UserAlertMonitor) HasCreatedBy() bool { + if o != nil && o.CreatedBy.IsSet() { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given NullableString and assigns it to the CreatedBy field. +func (o *UserAlertMonitor) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// SetCreatedByNil sets the value for CreatedBy to be an explicit nil +func (o *UserAlertMonitor) SetCreatedByNil() { + o.CreatedBy.Set(nil) +} + +// UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +func (o *UserAlertMonitor) UnsetCreatedBy() { + o.CreatedBy.Unset() +} + +func (o UserAlertMonitor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAlertMonitor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["project"] = o.Project + toSerialize["name"] = o.Name + if !IsNil(o.MetricName) { + toSerialize["metric_name"] = o.MetricName + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.Deleted) { + toSerialize["deleted"] = o.Deleted + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + toSerialize["metric_type"] = o.MetricType + if o.Metric.IsSet() { + toSerialize["metric"] = o.Metric.Get() + } + toSerialize["threshold_operator"] = o.ThresholdOperator + if !IsNil(o.ThresholdType) { + toSerialize["threshold_type"] = o.ThresholdType + } + if o.ThresholdMetricValue.IsSet() { + toSerialize["threshold_metric_value"] = o.ThresholdMetricValue.Get() + } + if o.CriticalThresholdValue.IsSet() { + toSerialize["critical_threshold_value"] = o.CriticalThresholdValue.Get() + } + if o.WarningThresholdValue.IsSet() { + toSerialize["warning_threshold_value"] = o.WarningThresholdValue.Get() + } + if !IsNil(o.AlertFrequency) { + toSerialize["alert_frequency"] = o.AlertFrequency + } + if !IsNil(o.AutoThresholdTimeWindow) { + toSerialize["auto_threshold_time_window"] = o.AutoThresholdTimeWindow + } + if o.LastCheckedAt.IsSet() { + toSerialize["last_checked_at"] = o.LastCheckedAt.Get() + } + if !IsNil(o.NotificationEmails) { + toSerialize["notification_emails"] = o.NotificationEmails + } + if o.SlackWebhookUrl.IsSet() { + toSerialize["slack_webhook_url"] = o.SlackWebhookUrl.Get() + } + if o.SlackNotes.IsSet() { + toSerialize["slack_notes"] = o.SlackNotes.Get() + } + if !IsNil(o.IsMute) { + toSerialize["is_mute"] = o.IsMute + } + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if o.Logs != nil { + toSerialize["logs"] = o.Logs + } + toSerialize["organization"] = o.Organization + if o.Workspace.IsSet() { + toSerialize["workspace"] = o.Workspace.Get() + } + if o.CreatedBy.IsSet() { + toSerialize["created_by"] = o.CreatedBy.Get() + } + return toSerialize, nil +} + +func (o *UserAlertMonitor) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "project", + "name", + "metric_type", + "threshold_operator", + "organization", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAlertMonitor := _UserAlertMonitor{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAlertMonitor) + + if err != nil { + return err + } + + *o = UserAlertMonitor(varUserAlertMonitor) + + return err +} + +type NullableUserAlertMonitor struct { + value *UserAlertMonitor + isSet bool +} + +func (v NullableUserAlertMonitor) Get() *UserAlertMonitor { + return v.value +} + +func (v *NullableUserAlertMonitor) Set(val *UserAlertMonitor) { + v.value = val + v.isSet = true +} + +func (v NullableUserAlertMonitor) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAlertMonitor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAlertMonitor(val *UserAlertMonitor) *NullableUserAlertMonitor { + return &NullableUserAlertMonitor{value: val, isSet: true} +} + +func (v NullableUserAlertMonitor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAlertMonitor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_alert_monitor_duplicate.go b/go/futureagi/model_user_alert_monitor_duplicate.go new file mode 100644 index 0000000..2a01492 --- /dev/null +++ b/go/futureagi/model_user_alert_monitor_duplicate.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserAlertMonitorDuplicate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAlertMonitorDuplicate{} + +// UserAlertMonitorDuplicate struct for UserAlertMonitorDuplicate +type UserAlertMonitorDuplicate struct { + Id string `json:"id"` + Name string `json:"name"` +} + +type _UserAlertMonitorDuplicate UserAlertMonitorDuplicate + +// NewUserAlertMonitorDuplicate instantiates a new UserAlertMonitorDuplicate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAlertMonitorDuplicate(id string, name string) *UserAlertMonitorDuplicate { + this := UserAlertMonitorDuplicate{} + this.Id = id + this.Name = name + return &this +} + +// NewUserAlertMonitorDuplicateWithDefaults instantiates a new UserAlertMonitorDuplicate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAlertMonitorDuplicateWithDefaults() *UserAlertMonitorDuplicate { + this := UserAlertMonitorDuplicate{} + return &this +} + +// GetId returns the Id field value +func (o *UserAlertMonitorDuplicate) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorDuplicate) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *UserAlertMonitorDuplicate) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *UserAlertMonitorDuplicate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorDuplicate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UserAlertMonitorDuplicate) SetName(v string) { + o.Name = v +} + +func (o UserAlertMonitorDuplicate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAlertMonitorDuplicate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *UserAlertMonitorDuplicate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAlertMonitorDuplicate := _UserAlertMonitorDuplicate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAlertMonitorDuplicate) + + if err != nil { + return err + } + + *o = UserAlertMonitorDuplicate(varUserAlertMonitorDuplicate) + + return err +} + +type NullableUserAlertMonitorDuplicate struct { + value *UserAlertMonitorDuplicate + isSet bool +} + +func (v NullableUserAlertMonitorDuplicate) Get() *UserAlertMonitorDuplicate { + return v.value +} + +func (v *NullableUserAlertMonitorDuplicate) Set(val *UserAlertMonitorDuplicate) { + v.value = val + v.isSet = true +} + +func (v NullableUserAlertMonitorDuplicate) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAlertMonitorDuplicate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAlertMonitorDuplicate(val *UserAlertMonitorDuplicate) *NullableUserAlertMonitorDuplicate { + return &NullableUserAlertMonitorDuplicate{value: val, isSet: true} +} + +func (v NullableUserAlertMonitorDuplicate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAlertMonitorDuplicate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_alert_monitor_duplicate_response.go b/go/futureagi/model_user_alert_monitor_duplicate_response.go new file mode 100644 index 0000000..6b93551 --- /dev/null +++ b/go/futureagi/model_user_alert_monitor_duplicate_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserAlertMonitorDuplicateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAlertMonitorDuplicateResponse{} + +// UserAlertMonitorDuplicateResponse struct for UserAlertMonitorDuplicateResponse +type UserAlertMonitorDuplicateResponse struct { + Status *bool `json:"status,omitempty"` + Result UserAlertMonitorDuplicateResult `json:"result"` +} + +type _UserAlertMonitorDuplicateResponse UserAlertMonitorDuplicateResponse + +// NewUserAlertMonitorDuplicateResponse instantiates a new UserAlertMonitorDuplicateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAlertMonitorDuplicateResponse(result UserAlertMonitorDuplicateResult) *UserAlertMonitorDuplicateResponse { + this := UserAlertMonitorDuplicateResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewUserAlertMonitorDuplicateResponseWithDefaults instantiates a new UserAlertMonitorDuplicateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAlertMonitorDuplicateResponseWithDefaults() *UserAlertMonitorDuplicateResponse { + this := UserAlertMonitorDuplicateResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UserAlertMonitorDuplicateResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorDuplicateResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UserAlertMonitorDuplicateResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *UserAlertMonitorDuplicateResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *UserAlertMonitorDuplicateResponse) GetResult() UserAlertMonitorDuplicateResult { + if o == nil { + var ret UserAlertMonitorDuplicateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorDuplicateResponse) GetResultOk() (*UserAlertMonitorDuplicateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *UserAlertMonitorDuplicateResponse) SetResult(v UserAlertMonitorDuplicateResult) { + o.Result = v +} + +func (o UserAlertMonitorDuplicateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAlertMonitorDuplicateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *UserAlertMonitorDuplicateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAlertMonitorDuplicateResponse := _UserAlertMonitorDuplicateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAlertMonitorDuplicateResponse) + + if err != nil { + return err + } + + *o = UserAlertMonitorDuplicateResponse(varUserAlertMonitorDuplicateResponse) + + return err +} + +type NullableUserAlertMonitorDuplicateResponse struct { + value *UserAlertMonitorDuplicateResponse + isSet bool +} + +func (v NullableUserAlertMonitorDuplicateResponse) Get() *UserAlertMonitorDuplicateResponse { + return v.value +} + +func (v *NullableUserAlertMonitorDuplicateResponse) Set(val *UserAlertMonitorDuplicateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserAlertMonitorDuplicateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAlertMonitorDuplicateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAlertMonitorDuplicateResponse(val *UserAlertMonitorDuplicateResponse) *NullableUserAlertMonitorDuplicateResponse { + return &NullableUserAlertMonitorDuplicateResponse{value: val, isSet: true} +} + +func (v NullableUserAlertMonitorDuplicateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAlertMonitorDuplicateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_alert_monitor_duplicate_result.go b/go/futureagi/model_user_alert_monitor_duplicate_result.go new file mode 100644 index 0000000..03ea09f --- /dev/null +++ b/go/futureagi/model_user_alert_monitor_duplicate_result.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserAlertMonitorDuplicateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAlertMonitorDuplicateResult{} + +// UserAlertMonitorDuplicateResult struct for UserAlertMonitorDuplicateResult +type UserAlertMonitorDuplicateResult struct { + Id string `json:"id"` + Message string `json:"message"` +} + +type _UserAlertMonitorDuplicateResult UserAlertMonitorDuplicateResult + +// NewUserAlertMonitorDuplicateResult instantiates a new UserAlertMonitorDuplicateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAlertMonitorDuplicateResult(id string, message string) *UserAlertMonitorDuplicateResult { + this := UserAlertMonitorDuplicateResult{} + this.Id = id + this.Message = message + return &this +} + +// NewUserAlertMonitorDuplicateResultWithDefaults instantiates a new UserAlertMonitorDuplicateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAlertMonitorDuplicateResultWithDefaults() *UserAlertMonitorDuplicateResult { + this := UserAlertMonitorDuplicateResult{} + return &this +} + +// GetId returns the Id field value +func (o *UserAlertMonitorDuplicateResult) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorDuplicateResult) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *UserAlertMonitorDuplicateResult) SetId(v string) { + o.Id = v +} + +// GetMessage returns the Message field value +func (o *UserAlertMonitorDuplicateResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorDuplicateResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *UserAlertMonitorDuplicateResult) SetMessage(v string) { + o.Message = v +} + +func (o UserAlertMonitorDuplicateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAlertMonitorDuplicateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *UserAlertMonitorDuplicateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAlertMonitorDuplicateResult := _UserAlertMonitorDuplicateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAlertMonitorDuplicateResult) + + if err != nil { + return err + } + + *o = UserAlertMonitorDuplicateResult(varUserAlertMonitorDuplicateResult) + + return err +} + +type NullableUserAlertMonitorDuplicateResult struct { + value *UserAlertMonitorDuplicateResult + isSet bool +} + +func (v NullableUserAlertMonitorDuplicateResult) Get() *UserAlertMonitorDuplicateResult { + return v.value +} + +func (v *NullableUserAlertMonitorDuplicateResult) Set(val *UserAlertMonitorDuplicateResult) { + v.value = val + v.isSet = true +} + +func (v NullableUserAlertMonitorDuplicateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAlertMonitorDuplicateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAlertMonitorDuplicateResult(val *UserAlertMonitorDuplicateResult) *NullableUserAlertMonitorDuplicateResult { + return &NullableUserAlertMonitorDuplicateResult{value: val, isSet: true} +} + +func (v NullableUserAlertMonitorDuplicateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAlertMonitorDuplicateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_alert_monitor_log.go b/go/futureagi/model_user_alert_monitor_log.go new file mode 100644 index 0000000..d604262 --- /dev/null +++ b/go/futureagi/model_user_alert_monitor_log.go @@ -0,0 +1,518 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UserAlertMonitorLog type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAlertMonitorLog{} + +// UserAlertMonitorLog struct for UserAlertMonitorLog +type UserAlertMonitorLog struct { + Id *string `json:"id,omitempty"` + ResolvedBy *User `json:"resolved_by,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Type string `json:"type"` + Message string `json:"message"` + Resolved *bool `json:"resolved,omitempty"` + ResolvedAt NullableTime `json:"resolved_at,omitempty"` + Link NullableString `json:"link,omitempty"` + TimeWindowStart NullableTime `json:"time_window_start,omitempty"` + TimeWindowEnd NullableTime `json:"time_window_end,omitempty"` +} + +type _UserAlertMonitorLog UserAlertMonitorLog + +// NewUserAlertMonitorLog instantiates a new UserAlertMonitorLog object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAlertMonitorLog(type_ string, message string) *UserAlertMonitorLog { + this := UserAlertMonitorLog{} + this.Type = type_ + this.Message = message + return &this +} + +// NewUserAlertMonitorLogWithDefaults instantiates a new UserAlertMonitorLog object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAlertMonitorLogWithDefaults() *UserAlertMonitorLog { + this := UserAlertMonitorLog{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UserAlertMonitorLog) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorLog) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UserAlertMonitorLog) SetId(v string) { + o.Id = &v +} + +// GetResolvedBy returns the ResolvedBy field value if set, zero value otherwise. +func (o *UserAlertMonitorLog) GetResolvedBy() User { + if o == nil || IsNil(o.ResolvedBy) { + var ret User + return ret + } + return *o.ResolvedBy +} + +// GetResolvedByOk returns a tuple with the ResolvedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorLog) GetResolvedByOk() (*User, bool) { + if o == nil || IsNil(o.ResolvedBy) { + return nil, false + } + return o.ResolvedBy, true +} + +// HasResolvedBy returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasResolvedBy() bool { + if o != nil && !IsNil(o.ResolvedBy) { + return true + } + + return false +} + +// SetResolvedBy gets a reference to the given User and assigns it to the ResolvedBy field. +func (o *UserAlertMonitorLog) SetResolvedBy(v User) { + o.ResolvedBy = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *UserAlertMonitorLog) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorLog) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *UserAlertMonitorLog) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetType returns the Type field value +func (o *UserAlertMonitorLog) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorLog) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *UserAlertMonitorLog) SetType(v string) { + o.Type = v +} + +// GetMessage returns the Message field value +func (o *UserAlertMonitorLog) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorLog) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *UserAlertMonitorLog) SetMessage(v string) { + o.Message = v +} + +// GetResolved returns the Resolved field value if set, zero value otherwise. +func (o *UserAlertMonitorLog) GetResolved() bool { + if o == nil || IsNil(o.Resolved) { + var ret bool + return ret + } + return *o.Resolved +} + +// GetResolvedOk returns a tuple with the Resolved field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorLog) GetResolvedOk() (*bool, bool) { + if o == nil || IsNil(o.Resolved) { + return nil, false + } + return o.Resolved, true +} + +// HasResolved returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasResolved() bool { + if o != nil && !IsNil(o.Resolved) { + return true + } + + return false +} + +// SetResolved gets a reference to the given bool and assigns it to the Resolved field. +func (o *UserAlertMonitorLog) SetResolved(v bool) { + o.Resolved = &v +} + +// GetResolvedAt returns the ResolvedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitorLog) GetResolvedAt() time.Time { + if o == nil || IsNil(o.ResolvedAt.Get()) { + var ret time.Time + return ret + } + return *o.ResolvedAt.Get() +} + +// GetResolvedAtOk returns a tuple with the ResolvedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitorLog) GetResolvedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ResolvedAt.Get(), o.ResolvedAt.IsSet() +} + +// HasResolvedAt returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasResolvedAt() bool { + if o != nil && o.ResolvedAt.IsSet() { + return true + } + + return false +} + +// SetResolvedAt gets a reference to the given NullableTime and assigns it to the ResolvedAt field. +func (o *UserAlertMonitorLog) SetResolvedAt(v time.Time) { + o.ResolvedAt.Set(&v) +} + +// SetResolvedAtNil sets the value for ResolvedAt to be an explicit nil +func (o *UserAlertMonitorLog) SetResolvedAtNil() { + o.ResolvedAt.Set(nil) +} + +// UnsetResolvedAt ensures that no value is present for ResolvedAt, not even an explicit nil +func (o *UserAlertMonitorLog) UnsetResolvedAt() { + o.ResolvedAt.Unset() +} + +// GetLink returns the Link field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitorLog) GetLink() string { + if o == nil || IsNil(o.Link.Get()) { + var ret string + return ret + } + return *o.Link.Get() +} + +// GetLinkOk returns a tuple with the Link field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitorLog) GetLinkOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Link.Get(), o.Link.IsSet() +} + +// HasLink returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasLink() bool { + if o != nil && o.Link.IsSet() { + return true + } + + return false +} + +// SetLink gets a reference to the given NullableString and assigns it to the Link field. +func (o *UserAlertMonitorLog) SetLink(v string) { + o.Link.Set(&v) +} + +// SetLinkNil sets the value for Link to be an explicit nil +func (o *UserAlertMonitorLog) SetLinkNil() { + o.Link.Set(nil) +} + +// UnsetLink ensures that no value is present for Link, not even an explicit nil +func (o *UserAlertMonitorLog) UnsetLink() { + o.Link.Unset() +} + +// GetTimeWindowStart returns the TimeWindowStart field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitorLog) GetTimeWindowStart() time.Time { + if o == nil || IsNil(o.TimeWindowStart.Get()) { + var ret time.Time + return ret + } + return *o.TimeWindowStart.Get() +} + +// GetTimeWindowStartOk returns a tuple with the TimeWindowStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitorLog) GetTimeWindowStartOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.TimeWindowStart.Get(), o.TimeWindowStart.IsSet() +} + +// HasTimeWindowStart returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasTimeWindowStart() bool { + if o != nil && o.TimeWindowStart.IsSet() { + return true + } + + return false +} + +// SetTimeWindowStart gets a reference to the given NullableTime and assigns it to the TimeWindowStart field. +func (o *UserAlertMonitorLog) SetTimeWindowStart(v time.Time) { + o.TimeWindowStart.Set(&v) +} + +// SetTimeWindowStartNil sets the value for TimeWindowStart to be an explicit nil +func (o *UserAlertMonitorLog) SetTimeWindowStartNil() { + o.TimeWindowStart.Set(nil) +} + +// UnsetTimeWindowStart ensures that no value is present for TimeWindowStart, not even an explicit nil +func (o *UserAlertMonitorLog) UnsetTimeWindowStart() { + o.TimeWindowStart.Unset() +} + +// GetTimeWindowEnd returns the TimeWindowEnd field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserAlertMonitorLog) GetTimeWindowEnd() time.Time { + if o == nil || IsNil(o.TimeWindowEnd.Get()) { + var ret time.Time + return ret + } + return *o.TimeWindowEnd.Get() +} + +// GetTimeWindowEndOk returns a tuple with the TimeWindowEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserAlertMonitorLog) GetTimeWindowEndOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.TimeWindowEnd.Get(), o.TimeWindowEnd.IsSet() +} + +// HasTimeWindowEnd returns a boolean if a field has been set. +func (o *UserAlertMonitorLog) HasTimeWindowEnd() bool { + if o != nil && o.TimeWindowEnd.IsSet() { + return true + } + + return false +} + +// SetTimeWindowEnd gets a reference to the given NullableTime and assigns it to the TimeWindowEnd field. +func (o *UserAlertMonitorLog) SetTimeWindowEnd(v time.Time) { + o.TimeWindowEnd.Set(&v) +} + +// SetTimeWindowEndNil sets the value for TimeWindowEnd to be an explicit nil +func (o *UserAlertMonitorLog) SetTimeWindowEndNil() { + o.TimeWindowEnd.Set(nil) +} + +// UnsetTimeWindowEnd ensures that no value is present for TimeWindowEnd, not even an explicit nil +func (o *UserAlertMonitorLog) UnsetTimeWindowEnd() { + o.TimeWindowEnd.Unset() +} + +func (o UserAlertMonitorLog) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAlertMonitorLog) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ResolvedBy) { + toSerialize["resolved_by"] = o.ResolvedBy + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + toSerialize["type"] = o.Type + toSerialize["message"] = o.Message + if !IsNil(o.Resolved) { + toSerialize["resolved"] = o.Resolved + } + if o.ResolvedAt.IsSet() { + toSerialize["resolved_at"] = o.ResolvedAt.Get() + } + if o.Link.IsSet() { + toSerialize["link"] = o.Link.Get() + } + if o.TimeWindowStart.IsSet() { + toSerialize["time_window_start"] = o.TimeWindowStart.Get() + } + if o.TimeWindowEnd.IsSet() { + toSerialize["time_window_end"] = o.TimeWindowEnd.Get() + } + return toSerialize, nil +} + +func (o *UserAlertMonitorLog) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAlertMonitorLog := _UserAlertMonitorLog{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserAlertMonitorLog) + + if err != nil { + return err + } + + *o = UserAlertMonitorLog(varUserAlertMonitorLog) + + return err +} + +type NullableUserAlertMonitorLog struct { + value *UserAlertMonitorLog + isSet bool +} + +func (v NullableUserAlertMonitorLog) Get() *UserAlertMonitorLog { + return v.value +} + +func (v *NullableUserAlertMonitorLog) Set(val *UserAlertMonitorLog) { + v.value = val + v.isSet = true +} + +func (v NullableUserAlertMonitorLog) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAlertMonitorLog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAlertMonitorLog(val *UserAlertMonitorLog) *NullableUserAlertMonitorLog { + return &NullableUserAlertMonitorLog{value: val, isSet: true} +} + +func (v NullableUserAlertMonitorLog) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAlertMonitorLog) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_alert_monitor_metric_option.go b/go/futureagi/model_user_alert_monitor_metric_option.go new file mode 100644 index 0000000..1694d2f --- /dev/null +++ b/go/futureagi/model_user_alert_monitor_metric_option.go @@ -0,0 +1,233 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the UserAlertMonitorMetricOption type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAlertMonitorMetricOption{} + +// UserAlertMonitorMetricOption struct for UserAlertMonitorMetricOption +type UserAlertMonitorMetricOption struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + MetricType *string `json:"metric_type,omitempty"` + OutputType *string `json:"output_type,omitempty"` +} + +// NewUserAlertMonitorMetricOption instantiates a new UserAlertMonitorMetricOption object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAlertMonitorMetricOption() *UserAlertMonitorMetricOption { + this := UserAlertMonitorMetricOption{} + return &this +} + +// NewUserAlertMonitorMetricOptionWithDefaults instantiates a new UserAlertMonitorMetricOption object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAlertMonitorMetricOptionWithDefaults() *UserAlertMonitorMetricOption { + this := UserAlertMonitorMetricOption{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UserAlertMonitorMetricOption) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorMetricOption) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UserAlertMonitorMetricOption) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UserAlertMonitorMetricOption) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UserAlertMonitorMetricOption) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorMetricOption) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UserAlertMonitorMetricOption) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UserAlertMonitorMetricOption) SetName(v string) { + o.Name = &v +} + +// GetMetricType returns the MetricType field value if set, zero value otherwise. +func (o *UserAlertMonitorMetricOption) GetMetricType() string { + if o == nil || IsNil(o.MetricType) { + var ret string + return ret + } + return *o.MetricType +} + +// GetMetricTypeOk returns a tuple with the MetricType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorMetricOption) GetMetricTypeOk() (*string, bool) { + if o == nil || IsNil(o.MetricType) { + return nil, false + } + return o.MetricType, true +} + +// HasMetricType returns a boolean if a field has been set. +func (o *UserAlertMonitorMetricOption) HasMetricType() bool { + if o != nil && !IsNil(o.MetricType) { + return true + } + + return false +} + +// SetMetricType gets a reference to the given string and assigns it to the MetricType field. +func (o *UserAlertMonitorMetricOption) SetMetricType(v string) { + o.MetricType = &v +} + +// GetOutputType returns the OutputType field value if set, zero value otherwise. +func (o *UserAlertMonitorMetricOption) GetOutputType() string { + if o == nil || IsNil(o.OutputType) { + var ret string + return ret + } + return *o.OutputType +} + +// GetOutputTypeOk returns a tuple with the OutputType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorMetricOption) GetOutputTypeOk() (*string, bool) { + if o == nil || IsNil(o.OutputType) { + return nil, false + } + return o.OutputType, true +} + +// HasOutputType returns a boolean if a field has been set. +func (o *UserAlertMonitorMetricOption) HasOutputType() bool { + if o != nil && !IsNil(o.OutputType) { + return true + } + + return false +} + +// SetOutputType gets a reference to the given string and assigns it to the OutputType field. +func (o *UserAlertMonitorMetricOption) SetOutputType(v string) { + o.OutputType = &v +} + +func (o UserAlertMonitorMetricOption) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAlertMonitorMetricOption) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.MetricType) { + toSerialize["metric_type"] = o.MetricType + } + if !IsNil(o.OutputType) { + toSerialize["output_type"] = o.OutputType + } + return toSerialize, nil +} + +type NullableUserAlertMonitorMetricOption struct { + value *UserAlertMonitorMetricOption + isSet bool +} + +func (v NullableUserAlertMonitorMetricOption) Get() *UserAlertMonitorMetricOption { + return v.value +} + +func (v *NullableUserAlertMonitorMetricOption) Set(val *UserAlertMonitorMetricOption) { + v.value = val + v.isSet = true +} + +func (v NullableUserAlertMonitorMetricOption) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAlertMonitorMetricOption) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAlertMonitorMetricOption(val *UserAlertMonitorMetricOption) *NullableUserAlertMonitorMetricOption { + return &NullableUserAlertMonitorMetricOption{value: val, isSet: true} +} + +func (v NullableUserAlertMonitorMetricOption) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAlertMonitorMetricOption) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_alert_monitor_metric_options_response.go b/go/futureagi/model_user_alert_monitor_metric_options_response.go new file mode 100644 index 0000000..ef70545 --- /dev/null +++ b/go/futureagi/model_user_alert_monitor_metric_options_response.go @@ -0,0 +1,165 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "encoding/json" +) + +// checks if the UserAlertMonitorMetricOptionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAlertMonitorMetricOptionsResponse{} + +// UserAlertMonitorMetricOptionsResponse struct for UserAlertMonitorMetricOptionsResponse +type UserAlertMonitorMetricOptionsResponse struct { + Status *bool `json:"status,omitempty"` + Result []UserAlertMonitorMetricOption `json:"result,omitempty"` +} + +// NewUserAlertMonitorMetricOptionsResponse instantiates a new UserAlertMonitorMetricOptionsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAlertMonitorMetricOptionsResponse() *UserAlertMonitorMetricOptionsResponse { + this := UserAlertMonitorMetricOptionsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// NewUserAlertMonitorMetricOptionsResponseWithDefaults instantiates a new UserAlertMonitorMetricOptionsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAlertMonitorMetricOptionsResponseWithDefaults() *UserAlertMonitorMetricOptionsResponse { + this := UserAlertMonitorMetricOptionsResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UserAlertMonitorMetricOptionsResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorMetricOptionsResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UserAlertMonitorMetricOptionsResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *UserAlertMonitorMetricOptionsResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *UserAlertMonitorMetricOptionsResponse) GetResult() []UserAlertMonitorMetricOption { + if o == nil || IsNil(o.Result) { + var ret []UserAlertMonitorMetricOption + return ret + } + return o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserAlertMonitorMetricOptionsResponse) GetResultOk() ([]UserAlertMonitorMetricOption, bool) { + if o == nil || IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *UserAlertMonitorMetricOptionsResponse) HasResult() bool { + if o != nil && !IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given []UserAlertMonitorMetricOption and assigns it to the Result field. +func (o *UserAlertMonitorMetricOptionsResponse) SetResult(v []UserAlertMonitorMetricOption) { + o.Result = v +} + +func (o UserAlertMonitorMetricOptionsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAlertMonitorMetricOptionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Result) { + toSerialize["result"] = o.Result + } + return toSerialize, nil +} + +type NullableUserAlertMonitorMetricOptionsResponse struct { + value *UserAlertMonitorMetricOptionsResponse + isSet bool +} + +func (v NullableUserAlertMonitorMetricOptionsResponse) Get() *UserAlertMonitorMetricOptionsResponse { + return v.value +} + +func (v *NullableUserAlertMonitorMetricOptionsResponse) Set(val *UserAlertMonitorMetricOptionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserAlertMonitorMetricOptionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAlertMonitorMetricOptionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAlertMonitorMetricOptionsResponse(val *UserAlertMonitorMetricOptionsResponse) *NullableUserAlertMonitorMetricOptionsResponse { + return &NullableUserAlertMonitorMetricOptionsResponse{value: val, isSet: true} +} + +func (v NullableUserAlertMonitorMetricOptionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAlertMonitorMetricOptionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_code_example_response.go b/go/futureagi/model_user_code_example_response.go new file mode 100644 index 0000000..cf523ff --- /dev/null +++ b/go/futureagi/model_user_code_example_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserCodeExampleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserCodeExampleResponse{} + +// UserCodeExampleResponse struct for UserCodeExampleResponse +type UserCodeExampleResponse struct { + Status *bool `json:"status,omitempty"` + Result string `json:"result"` +} + +type _UserCodeExampleResponse UserCodeExampleResponse + +// NewUserCodeExampleResponse instantiates a new UserCodeExampleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserCodeExampleResponse(result string) *UserCodeExampleResponse { + this := UserCodeExampleResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewUserCodeExampleResponseWithDefaults instantiates a new UserCodeExampleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserCodeExampleResponseWithDefaults() *UserCodeExampleResponse { + this := UserCodeExampleResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UserCodeExampleResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserCodeExampleResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UserCodeExampleResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *UserCodeExampleResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *UserCodeExampleResponse) GetResult() string { + if o == nil { + var ret string + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *UserCodeExampleResponse) GetResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *UserCodeExampleResponse) SetResult(v string) { + o.Result = v +} + +func (o UserCodeExampleResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserCodeExampleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *UserCodeExampleResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserCodeExampleResponse := _UserCodeExampleResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserCodeExampleResponse) + + if err != nil { + return err + } + + *o = UserCodeExampleResponse(varUserCodeExampleResponse) + + return err +} + +type NullableUserCodeExampleResponse struct { + value *UserCodeExampleResponse + isSet bool +} + +func (v NullableUserCodeExampleResponse) Get() *UserCodeExampleResponse { + return v.value +} + +func (v *NullableUserCodeExampleResponse) Set(val *UserCodeExampleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserCodeExampleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserCodeExampleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserCodeExampleResponse(val *UserCodeExampleResponse) *NullableUserCodeExampleResponse { + return &NullableUserCodeExampleResponse{value: val, isSet: true} +} + +func (v NullableUserCodeExampleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserCodeExampleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_eval_mutation_request.go b/go/futureagi/model_user_eval_mutation_request.go new file mode 100644 index 0000000..0fe72df --- /dev/null +++ b/go/futureagi/model_user_eval_mutation_request.go @@ -0,0 +1,513 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserEvalMutationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserEvalMutationRequest{} + +// UserEvalMutationRequest struct for UserEvalMutationRequest +type UserEvalMutationRequest struct { + Name string `json:"name"` + TemplateId string `json:"template_id"` + Config map[string]interface{} `json:"config"` + KbId *string `json:"kb_id,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + Model *string `json:"model,omitempty"` + EvalType *string `json:"eval_type,omitempty"` + Run *bool `json:"run,omitempty"` + SaveAsTemplate *bool `json:"save_as_template,omitempty"` + ExperimentId *string `json:"experiment_id,omitempty"` + CompositeWeightOverrides map[string]interface{} `json:"composite_weight_overrides,omitempty"` +} + +type _UserEvalMutationRequest UserEvalMutationRequest + +// NewUserEvalMutationRequest instantiates a new UserEvalMutationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserEvalMutationRequest(name string, templateId string, config map[string]interface{}) *UserEvalMutationRequest { + this := UserEvalMutationRequest{} + this.Name = name + this.TemplateId = templateId + this.Config = config + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + var run bool = false + this.Run = &run + var saveAsTemplate bool = false + this.SaveAsTemplate = &saveAsTemplate + return &this +} + +// NewUserEvalMutationRequestWithDefaults instantiates a new UserEvalMutationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserEvalMutationRequestWithDefaults() *UserEvalMutationRequest { + this := UserEvalMutationRequest{} + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + var run bool = false + this.Run = &run + var saveAsTemplate bool = false + this.SaveAsTemplate = &saveAsTemplate + return &this +} + +// GetName returns the Name field value +func (o *UserEvalMutationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UserEvalMutationRequest) SetName(v string) { + o.Name = v +} + +// GetTemplateId returns the TemplateId field value +func (o *UserEvalMutationRequest) GetTemplateId() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetTemplateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateId, true +} + +// SetTemplateId sets field value +func (o *UserEvalMutationRequest) SetTemplateId(v string) { + o.TemplateId = v +} + +// GetConfig returns the Config field value +func (o *UserEvalMutationRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *UserEvalMutationRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetKbId() string { + if o == nil || IsNil(o.KbId) { + var ret string + return ret + } + return *o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetKbIdOk() (*string, bool) { + if o == nil || IsNil(o.KbId) { + return nil, false + } + return o.KbId, true +} + +// HasKbId returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasKbId() bool { + if o != nil && !IsNil(o.KbId) { + return true + } + + return false +} + +// SetKbId gets a reference to the given string and assigns it to the KbId field. +func (o *UserEvalMutationRequest) SetKbId(v string) { + o.KbId = &v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *UserEvalMutationRequest) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *UserEvalMutationRequest) SetModel(v string) { + o.Model = &v +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetEvalType() string { + if o == nil || IsNil(o.EvalType) { + var ret string + return ret + } + return *o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetEvalTypeOk() (*string, bool) { + if o == nil || IsNil(o.EvalType) { + return nil, false + } + return o.EvalType, true +} + +// HasEvalType returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasEvalType() bool { + if o != nil && !IsNil(o.EvalType) { + return true + } + + return false +} + +// SetEvalType gets a reference to the given string and assigns it to the EvalType field. +func (o *UserEvalMutationRequest) SetEvalType(v string) { + o.EvalType = &v +} + +// GetRun returns the Run field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetRun() bool { + if o == nil || IsNil(o.Run) { + var ret bool + return ret + } + return *o.Run +} + +// GetRunOk returns a tuple with the Run field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetRunOk() (*bool, bool) { + if o == nil || IsNil(o.Run) { + return nil, false + } + return o.Run, true +} + +// HasRun returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasRun() bool { + if o != nil && !IsNil(o.Run) { + return true + } + + return false +} + +// SetRun gets a reference to the given bool and assigns it to the Run field. +func (o *UserEvalMutationRequest) SetRun(v bool) { + o.Run = &v +} + +// GetSaveAsTemplate returns the SaveAsTemplate field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetSaveAsTemplate() bool { + if o == nil || IsNil(o.SaveAsTemplate) { + var ret bool + return ret + } + return *o.SaveAsTemplate +} + +// GetSaveAsTemplateOk returns a tuple with the SaveAsTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetSaveAsTemplateOk() (*bool, bool) { + if o == nil || IsNil(o.SaveAsTemplate) { + return nil, false + } + return o.SaveAsTemplate, true +} + +// HasSaveAsTemplate returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasSaveAsTemplate() bool { + if o != nil && !IsNil(o.SaveAsTemplate) { + return true + } + + return false +} + +// SetSaveAsTemplate gets a reference to the given bool and assigns it to the SaveAsTemplate field. +func (o *UserEvalMutationRequest) SetSaveAsTemplate(v bool) { + o.SaveAsTemplate = &v +} + +// GetExperimentId returns the ExperimentId field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetExperimentId() string { + if o == nil || IsNil(o.ExperimentId) { + var ret string + return ret + } + return *o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetExperimentIdOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentId) { + return nil, false + } + return o.ExperimentId, true +} + +// HasExperimentId returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasExperimentId() bool { + if o != nil && !IsNil(o.ExperimentId) { + return true + } + + return false +} + +// SetExperimentId gets a reference to the given string and assigns it to the ExperimentId field. +func (o *UserEvalMutationRequest) SetExperimentId(v string) { + o.ExperimentId = &v +} + +// GetCompositeWeightOverrides returns the CompositeWeightOverrides field value if set, zero value otherwise. +func (o *UserEvalMutationRequest) GetCompositeWeightOverrides() map[string]interface{} { + if o == nil || IsNil(o.CompositeWeightOverrides) { + var ret map[string]interface{} + return ret + } + return o.CompositeWeightOverrides +} + +// GetCompositeWeightOverridesOk returns a tuple with the CompositeWeightOverrides field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalMutationRequest) GetCompositeWeightOverridesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CompositeWeightOverrides) { + return map[string]interface{}{}, false + } + return o.CompositeWeightOverrides, true +} + +// HasCompositeWeightOverrides returns a boolean if a field has been set. +func (o *UserEvalMutationRequest) HasCompositeWeightOverrides() bool { + if o != nil && !IsNil(o.CompositeWeightOverrides) { + return true + } + + return false +} + +// SetCompositeWeightOverrides gets a reference to the given map[string]interface{} and assigns it to the CompositeWeightOverrides field. +func (o *UserEvalMutationRequest) SetCompositeWeightOverrides(v map[string]interface{}) { + o.CompositeWeightOverrides = v +} + +func (o UserEvalMutationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserEvalMutationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["template_id"] = o.TemplateId + toSerialize["config"] = o.Config + if !IsNil(o.KbId) { + toSerialize["kb_id"] = o.KbId + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.EvalType) { + toSerialize["eval_type"] = o.EvalType + } + if !IsNil(o.Run) { + toSerialize["run"] = o.Run + } + if !IsNil(o.SaveAsTemplate) { + toSerialize["save_as_template"] = o.SaveAsTemplate + } + if !IsNil(o.ExperimentId) { + toSerialize["experiment_id"] = o.ExperimentId + } + if !IsNil(o.CompositeWeightOverrides) { + toSerialize["composite_weight_overrides"] = o.CompositeWeightOverrides + } + return toSerialize, nil +} + +func (o *UserEvalMutationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "template_id", + "config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserEvalMutationRequest := _UserEvalMutationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserEvalMutationRequest) + + if err != nil { + return err + } + + *o = UserEvalMutationRequest(varUserEvalMutationRequest) + + return err +} + +type NullableUserEvalMutationRequest struct { + value *UserEvalMutationRequest + isSet bool +} + +func (v NullableUserEvalMutationRequest) Get() *UserEvalMutationRequest { + return v.value +} + +func (v *NullableUserEvalMutationRequest) Set(val *UserEvalMutationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUserEvalMutationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUserEvalMutationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserEvalMutationRequest(val *UserEvalMutationRequest) *NullableUserEvalMutationRequest { + return &NullableUserEvalMutationRequest{value: val, isSet: true} +} + +func (v NullableUserEvalMutationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserEvalMutationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_eval_update_request.go b/go/futureagi/model_user_eval_update_request.go new file mode 100644 index 0000000..7f032d5 --- /dev/null +++ b/go/futureagi/model_user_eval_update_request.go @@ -0,0 +1,529 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserEvalUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserEvalUpdateRequest{} + +// UserEvalUpdateRequest struct for UserEvalUpdateRequest +type UserEvalUpdateRequest struct { + Name *string `json:"name,omitempty"` + TemplateId *string `json:"template_id,omitempty"` + Config map[string]interface{} `json:"config"` + KbId *string `json:"kb_id,omitempty"` + ErrorLocalizer *bool `json:"error_localizer,omitempty"` + Model *string `json:"model,omitempty"` + EvalType *string `json:"eval_type,omitempty"` + Run *bool `json:"run,omitempty"` + SaveAsTemplate *bool `json:"save_as_template,omitempty"` + ExperimentId *string `json:"experiment_id,omitempty"` + CompositeWeightOverrides map[string]interface{} `json:"composite_weight_overrides,omitempty"` +} + +type _UserEvalUpdateRequest UserEvalUpdateRequest + +// NewUserEvalUpdateRequest instantiates a new UserEvalUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserEvalUpdateRequest(config map[string]interface{}) *UserEvalUpdateRequest { + this := UserEvalUpdateRequest{} + this.Config = config + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + var run bool = false + this.Run = &run + var saveAsTemplate bool = false + this.SaveAsTemplate = &saveAsTemplate + return &this +} + +// NewUserEvalUpdateRequestWithDefaults instantiates a new UserEvalUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserEvalUpdateRequestWithDefaults() *UserEvalUpdateRequest { + this := UserEvalUpdateRequest{} + var errorLocalizer bool = false + this.ErrorLocalizer = &errorLocalizer + var run bool = false + this.Run = &run + var saveAsTemplate bool = false + this.SaveAsTemplate = &saveAsTemplate + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UserEvalUpdateRequest) SetName(v string) { + o.Name = &v +} + +// GetTemplateId returns the TemplateId field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetTemplateId() string { + if o == nil || IsNil(o.TemplateId) { + var ret string + return ret + } + return *o.TemplateId +} + +// GetTemplateIdOk returns a tuple with the TemplateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetTemplateIdOk() (*string, bool) { + if o == nil || IsNil(o.TemplateId) { + return nil, false + } + return o.TemplateId, true +} + +// HasTemplateId returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasTemplateId() bool { + if o != nil && !IsNil(o.TemplateId) { + return true + } + + return false +} + +// SetTemplateId gets a reference to the given string and assigns it to the TemplateId field. +func (o *UserEvalUpdateRequest) SetTemplateId(v string) { + o.TemplateId = &v +} + +// GetConfig returns the Config field value +func (o *UserEvalUpdateRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *UserEvalUpdateRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetKbId returns the KbId field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetKbId() string { + if o == nil || IsNil(o.KbId) { + var ret string + return ret + } + return *o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetKbIdOk() (*string, bool) { + if o == nil || IsNil(o.KbId) { + return nil, false + } + return o.KbId, true +} + +// HasKbId returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasKbId() bool { + if o != nil && !IsNil(o.KbId) { + return true + } + + return false +} + +// SetKbId gets a reference to the given string and assigns it to the KbId field. +func (o *UserEvalUpdateRequest) SetKbId(v string) { + o.KbId = &v +} + +// GetErrorLocalizer returns the ErrorLocalizer field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetErrorLocalizer() bool { + if o == nil || IsNil(o.ErrorLocalizer) { + var ret bool + return ret + } + return *o.ErrorLocalizer +} + +// GetErrorLocalizerOk returns a tuple with the ErrorLocalizer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetErrorLocalizerOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorLocalizer) { + return nil, false + } + return o.ErrorLocalizer, true +} + +// HasErrorLocalizer returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasErrorLocalizer() bool { + if o != nil && !IsNil(o.ErrorLocalizer) { + return true + } + + return false +} + +// SetErrorLocalizer gets a reference to the given bool and assigns it to the ErrorLocalizer field. +func (o *UserEvalUpdateRequest) SetErrorLocalizer(v bool) { + o.ErrorLocalizer = &v +} + +// GetModel returns the Model field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetModel() string { + if o == nil || IsNil(o.Model) { + var ret string + return ret + } + return *o.Model +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetModelOk() (*string, bool) { + if o == nil || IsNil(o.Model) { + return nil, false + } + return o.Model, true +} + +// HasModel returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasModel() bool { + if o != nil && !IsNil(o.Model) { + return true + } + + return false +} + +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *UserEvalUpdateRequest) SetModel(v string) { + o.Model = &v +} + +// GetEvalType returns the EvalType field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetEvalType() string { + if o == nil || IsNil(o.EvalType) { + var ret string + return ret + } + return *o.EvalType +} + +// GetEvalTypeOk returns a tuple with the EvalType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetEvalTypeOk() (*string, bool) { + if o == nil || IsNil(o.EvalType) { + return nil, false + } + return o.EvalType, true +} + +// HasEvalType returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasEvalType() bool { + if o != nil && !IsNil(o.EvalType) { + return true + } + + return false +} + +// SetEvalType gets a reference to the given string and assigns it to the EvalType field. +func (o *UserEvalUpdateRequest) SetEvalType(v string) { + o.EvalType = &v +} + +// GetRun returns the Run field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetRun() bool { + if o == nil || IsNil(o.Run) { + var ret bool + return ret + } + return *o.Run +} + +// GetRunOk returns a tuple with the Run field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetRunOk() (*bool, bool) { + if o == nil || IsNil(o.Run) { + return nil, false + } + return o.Run, true +} + +// HasRun returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasRun() bool { + if o != nil && !IsNil(o.Run) { + return true + } + + return false +} + +// SetRun gets a reference to the given bool and assigns it to the Run field. +func (o *UserEvalUpdateRequest) SetRun(v bool) { + o.Run = &v +} + +// GetSaveAsTemplate returns the SaveAsTemplate field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetSaveAsTemplate() bool { + if o == nil || IsNil(o.SaveAsTemplate) { + var ret bool + return ret + } + return *o.SaveAsTemplate +} + +// GetSaveAsTemplateOk returns a tuple with the SaveAsTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetSaveAsTemplateOk() (*bool, bool) { + if o == nil || IsNil(o.SaveAsTemplate) { + return nil, false + } + return o.SaveAsTemplate, true +} + +// HasSaveAsTemplate returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasSaveAsTemplate() bool { + if o != nil && !IsNil(o.SaveAsTemplate) { + return true + } + + return false +} + +// SetSaveAsTemplate gets a reference to the given bool and assigns it to the SaveAsTemplate field. +func (o *UserEvalUpdateRequest) SetSaveAsTemplate(v bool) { + o.SaveAsTemplate = &v +} + +// GetExperimentId returns the ExperimentId field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetExperimentId() string { + if o == nil || IsNil(o.ExperimentId) { + var ret string + return ret + } + return *o.ExperimentId +} + +// GetExperimentIdOk returns a tuple with the ExperimentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetExperimentIdOk() (*string, bool) { + if o == nil || IsNil(o.ExperimentId) { + return nil, false + } + return o.ExperimentId, true +} + +// HasExperimentId returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasExperimentId() bool { + if o != nil && !IsNil(o.ExperimentId) { + return true + } + + return false +} + +// SetExperimentId gets a reference to the given string and assigns it to the ExperimentId field. +func (o *UserEvalUpdateRequest) SetExperimentId(v string) { + o.ExperimentId = &v +} + +// GetCompositeWeightOverrides returns the CompositeWeightOverrides field value if set, zero value otherwise. +func (o *UserEvalUpdateRequest) GetCompositeWeightOverrides() map[string]interface{} { + if o == nil || IsNil(o.CompositeWeightOverrides) { + var ret map[string]interface{} + return ret + } + return o.CompositeWeightOverrides +} + +// GetCompositeWeightOverridesOk returns a tuple with the CompositeWeightOverrides field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserEvalUpdateRequest) GetCompositeWeightOverridesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.CompositeWeightOverrides) { + return map[string]interface{}{}, false + } + return o.CompositeWeightOverrides, true +} + +// HasCompositeWeightOverrides returns a boolean if a field has been set. +func (o *UserEvalUpdateRequest) HasCompositeWeightOverrides() bool { + if o != nil && !IsNil(o.CompositeWeightOverrides) { + return true + } + + return false +} + +// SetCompositeWeightOverrides gets a reference to the given map[string]interface{} and assigns it to the CompositeWeightOverrides field. +func (o *UserEvalUpdateRequest) SetCompositeWeightOverrides(v map[string]interface{}) { + o.CompositeWeightOverrides = v +} + +func (o UserEvalUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserEvalUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.TemplateId) { + toSerialize["template_id"] = o.TemplateId + } + toSerialize["config"] = o.Config + if !IsNil(o.KbId) { + toSerialize["kb_id"] = o.KbId + } + if !IsNil(o.ErrorLocalizer) { + toSerialize["error_localizer"] = o.ErrorLocalizer + } + if !IsNil(o.Model) { + toSerialize["model"] = o.Model + } + if !IsNil(o.EvalType) { + toSerialize["eval_type"] = o.EvalType + } + if !IsNil(o.Run) { + toSerialize["run"] = o.Run + } + if !IsNil(o.SaveAsTemplate) { + toSerialize["save_as_template"] = o.SaveAsTemplate + } + if !IsNil(o.ExperimentId) { + toSerialize["experiment_id"] = o.ExperimentId + } + if !IsNil(o.CompositeWeightOverrides) { + toSerialize["composite_weight_overrides"] = o.CompositeWeightOverrides + } + return toSerialize, nil +} + +func (o *UserEvalUpdateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "config", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserEvalUpdateRequest := _UserEvalUpdateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserEvalUpdateRequest) + + if err != nil { + return err + } + + *o = UserEvalUpdateRequest(varUserEvalUpdateRequest) + + return err +} + +type NullableUserEvalUpdateRequest struct { + value *UserEvalUpdateRequest + isSet bool +} + +func (v NullableUserEvalUpdateRequest) Get() *UserEvalUpdateRequest { + return v.value +} + +func (v *NullableUserEvalUpdateRequest) Set(val *UserEvalUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUserEvalUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUserEvalUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserEvalUpdateRequest(val *UserEvalUpdateRequest) *NullableUserEvalUpdateRequest { + return &NullableUserEvalUpdateRequest{value: val, isSet: true} +} + +func (v NullableUserEvalUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserEvalUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_info_organization.go b/go/futureagi/model_user_info_organization.go new file mode 100644 index 0000000..6226510 --- /dev/null +++ b/go/futureagi/model_user_info_organization.go @@ -0,0 +1,249 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserInfoOrganization type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserInfoOrganization{} + +// UserInfoOrganization struct for UserInfoOrganization +type UserInfoOrganization struct { + Id string `json:"id"` + Name string `json:"name"` + DisplayName string `json:"display_name"` + WsEnabled *bool `json:"ws_enabled,omitempty"` +} + +type _UserInfoOrganization UserInfoOrganization + +// NewUserInfoOrganization instantiates a new UserInfoOrganization object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserInfoOrganization(id string, name string, displayName string) *UserInfoOrganization { + this := UserInfoOrganization{} + this.Id = id + this.Name = name + this.DisplayName = displayName + return &this +} + +// NewUserInfoOrganizationWithDefaults instantiates a new UserInfoOrganization object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserInfoOrganizationWithDefaults() *UserInfoOrganization { + this := UserInfoOrganization{} + return &this +} + +// GetId returns the Id field value +func (o *UserInfoOrganization) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *UserInfoOrganization) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *UserInfoOrganization) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *UserInfoOrganization) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UserInfoOrganization) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UserInfoOrganization) SetName(v string) { + o.Name = v +} + +// GetDisplayName returns the DisplayName field value +func (o *UserInfoOrganization) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *UserInfoOrganization) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *UserInfoOrganization) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetWsEnabled returns the WsEnabled field value if set, zero value otherwise. +func (o *UserInfoOrganization) GetWsEnabled() bool { + if o == nil || IsNil(o.WsEnabled) { + var ret bool + return ret + } + return *o.WsEnabled +} + +// GetWsEnabledOk returns a tuple with the WsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoOrganization) GetWsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.WsEnabled) { + return nil, false + } + return o.WsEnabled, true +} + +// HasWsEnabled returns a boolean if a field has been set. +func (o *UserInfoOrganization) HasWsEnabled() bool { + if o != nil && !IsNil(o.WsEnabled) { + return true + } + + return false +} + +// SetWsEnabled gets a reference to the given bool and assigns it to the WsEnabled field. +func (o *UserInfoOrganization) SetWsEnabled(v bool) { + o.WsEnabled = &v +} + +func (o UserInfoOrganization) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserInfoOrganization) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["display_name"] = o.DisplayName + if !IsNil(o.WsEnabled) { + toSerialize["ws_enabled"] = o.WsEnabled + } + return toSerialize, nil +} + +func (o *UserInfoOrganization) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "display_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserInfoOrganization := _UserInfoOrganization{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserInfoOrganization) + + if err != nil { + return err + } + + *o = UserInfoOrganization(varUserInfoOrganization) + + return err +} + +type NullableUserInfoOrganization struct { + value *UserInfoOrganization + isSet bool +} + +func (v NullableUserInfoOrganization) Get() *UserInfoOrganization { + return v.value +} + +func (v *NullableUserInfoOrganization) Set(val *UserInfoOrganization) { + v.value = val + v.isSet = true +} + +func (v NullableUserInfoOrganization) IsSet() bool { + return v.isSet +} + +func (v *NullableUserInfoOrganization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserInfoOrganization(val *UserInfoOrganization) *NullableUserInfoOrganization { + return &NullableUserInfoOrganization{value: val, isSet: true} +} + +func (v NullableUserInfoOrganization) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserInfoOrganization) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_info_response.go b/go/futureagi/model_user_info_response.go new file mode 100644 index 0000000..081ee96 --- /dev/null +++ b/go/futureagi/model_user_info_response.go @@ -0,0 +1,898 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "time" +) + +// checks if the UserInfoResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserInfoResponse{} + +// UserInfoResponse struct for UserInfoResponse +type UserInfoResponse struct { + Id string `json:"id"` + Email string `json:"email"` + Name NullableString `json:"name"` + OrganizationRole NullableString `json:"organization_role"` + Organization UserInfoOrganization `json:"organization"` + CreatedAt time.Time `json:"created_at"` + Status string `json:"status"` + Role NullableString `json:"role"` + Goals []string `json:"goals,omitempty"` + RememberMe bool `json:"remember_me"` + GetStartedCompleted bool `json:"get_started_completed"` + OnboardingCompleted bool `json:"onboarding_completed"` + WsEnabled bool `json:"ws_enabled"` + RequiresOrgSetup *bool `json:"requires_org_setup,omitempty"` + DefaultWorkspaceId NullableString `json:"default_workspace_id"` + DefaultWorkspaceName NullableString `json:"default_workspace_name"` + DefaultWorkspaceDisplayName NullableString `json:"default_workspace_display_name"` + DefaultWorkspaceRole NullableString `json:"default_workspace_role"` + OrgLevel NullableInt32 `json:"org_level"` + WsLevel NullableInt32 `json:"ws_level"` + EffectiveLevel NullableInt32 `json:"effective_level"` + Has2faEnabled *bool `json:"has_2fa_enabled,omitempty"` + TwoFactorMethods *UserInfoTwoFactorMethods `json:"two_factor_methods,omitempty"` + Org2faRequired *bool `json:"org_2fa_required,omitempty"` + Org2faGraceEndsAt *time.Time `json:"org_2fa_grace_ends_at,omitempty"` +} + +type _UserInfoResponse UserInfoResponse + +// NewUserInfoResponse instantiates a new UserInfoResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserInfoResponse(id string, email string, name NullableString, organizationRole NullableString, organization UserInfoOrganization, createdAt time.Time, status string, role NullableString, rememberMe bool, getStartedCompleted bool, onboardingCompleted bool, wsEnabled bool, defaultWorkspaceId NullableString, defaultWorkspaceName NullableString, defaultWorkspaceDisplayName NullableString, defaultWorkspaceRole NullableString, orgLevel NullableInt32, wsLevel NullableInt32, effectiveLevel NullableInt32) *UserInfoResponse { + this := UserInfoResponse{} + this.Id = id + this.Email = email + this.Name = name + this.OrganizationRole = organizationRole + this.Organization = organization + this.CreatedAt = createdAt + this.Status = status + this.Role = role + this.RememberMe = rememberMe + this.GetStartedCompleted = getStartedCompleted + this.OnboardingCompleted = onboardingCompleted + this.WsEnabled = wsEnabled + this.DefaultWorkspaceId = defaultWorkspaceId + this.DefaultWorkspaceName = defaultWorkspaceName + this.DefaultWorkspaceDisplayName = defaultWorkspaceDisplayName + this.DefaultWorkspaceRole = defaultWorkspaceRole + this.OrgLevel = orgLevel + this.WsLevel = wsLevel + this.EffectiveLevel = effectiveLevel + return &this +} + +// NewUserInfoResponseWithDefaults instantiates a new UserInfoResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserInfoResponseWithDefaults() *UserInfoResponse { + this := UserInfoResponse{} + return &this +} + +// GetId returns the Id field value +func (o *UserInfoResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *UserInfoResponse) SetId(v string) { + o.Id = v +} + +// GetEmail returns the Email field value +func (o *UserInfoResponse) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *UserInfoResponse) SetEmail(v string) { + o.Email = v +} + +// GetName returns the Name field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserInfoResponse) GetName() string { + if o == nil || o.Name.Get() == nil { + var ret string + return ret + } + + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// SetName sets field value +func (o *UserInfoResponse) SetName(v string) { + o.Name.Set(&v) +} + +// GetOrganizationRole returns the OrganizationRole field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserInfoResponse) GetOrganizationRole() string { + if o == nil || o.OrganizationRole.Get() == nil { + var ret string + return ret + } + + return *o.OrganizationRole.Get() +} + +// GetOrganizationRoleOk returns a tuple with the OrganizationRole field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetOrganizationRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OrganizationRole.Get(), o.OrganizationRole.IsSet() +} + +// SetOrganizationRole sets field value +func (o *UserInfoResponse) SetOrganizationRole(v string) { + o.OrganizationRole.Set(&v) +} + +// GetOrganization returns the Organization field value +func (o *UserInfoResponse) GetOrganization() UserInfoOrganization { + if o == nil { + var ret UserInfoOrganization + return ret + } + + return o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetOrganizationOk() (*UserInfoOrganization, bool) { + if o == nil { + return nil, false + } + return &o.Organization, true +} + +// SetOrganization sets field value +func (o *UserInfoResponse) SetOrganization(v UserInfoOrganization) { + o.Organization = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *UserInfoResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *UserInfoResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetStatus returns the Status field value +func (o *UserInfoResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *UserInfoResponse) SetStatus(v string) { + o.Status = v +} + +// GetRole returns the Role field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserInfoResponse) GetRole() string { + if o == nil || o.Role.Get() == nil { + var ret string + return ret + } + + return *o.Role.Get() +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Role.Get(), o.Role.IsSet() +} + +// SetRole sets field value +func (o *UserInfoResponse) SetRole(v string) { + o.Role.Set(&v) +} + +// GetGoals returns the Goals field value if set, zero value otherwise. +func (o *UserInfoResponse) GetGoals() []string { + if o == nil || IsNil(o.Goals) { + var ret []string + return ret + } + return o.Goals +} + +// GetGoalsOk returns a tuple with the Goals field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetGoalsOk() ([]string, bool) { + if o == nil || IsNil(o.Goals) { + return nil, false + } + return o.Goals, true +} + +// HasGoals returns a boolean if a field has been set. +func (o *UserInfoResponse) HasGoals() bool { + if o != nil && !IsNil(o.Goals) { + return true + } + + return false +} + +// SetGoals gets a reference to the given []string and assigns it to the Goals field. +func (o *UserInfoResponse) SetGoals(v []string) { + o.Goals = v +} + +// GetRememberMe returns the RememberMe field value +func (o *UserInfoResponse) GetRememberMe() bool { + if o == nil { + var ret bool + return ret + } + + return o.RememberMe +} + +// GetRememberMeOk returns a tuple with the RememberMe field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetRememberMeOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.RememberMe, true +} + +// SetRememberMe sets field value +func (o *UserInfoResponse) SetRememberMe(v bool) { + o.RememberMe = v +} + +// GetGetStartedCompleted returns the GetStartedCompleted field value +func (o *UserInfoResponse) GetGetStartedCompleted() bool { + if o == nil { + var ret bool + return ret + } + + return o.GetStartedCompleted +} + +// GetGetStartedCompletedOk returns a tuple with the GetStartedCompleted field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetGetStartedCompletedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.GetStartedCompleted, true +} + +// SetGetStartedCompleted sets field value +func (o *UserInfoResponse) SetGetStartedCompleted(v bool) { + o.GetStartedCompleted = v +} + +// GetOnboardingCompleted returns the OnboardingCompleted field value +func (o *UserInfoResponse) GetOnboardingCompleted() bool { + if o == nil { + var ret bool + return ret + } + + return o.OnboardingCompleted +} + +// GetOnboardingCompletedOk returns a tuple with the OnboardingCompleted field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetOnboardingCompletedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.OnboardingCompleted, true +} + +// SetOnboardingCompleted sets field value +func (o *UserInfoResponse) SetOnboardingCompleted(v bool) { + o.OnboardingCompleted = v +} + +// GetWsEnabled returns the WsEnabled field value +func (o *UserInfoResponse) GetWsEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.WsEnabled +} + +// GetWsEnabledOk returns a tuple with the WsEnabled field value +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetWsEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.WsEnabled, true +} + +// SetWsEnabled sets field value +func (o *UserInfoResponse) SetWsEnabled(v bool) { + o.WsEnabled = v +} + +// GetRequiresOrgSetup returns the RequiresOrgSetup field value if set, zero value otherwise. +func (o *UserInfoResponse) GetRequiresOrgSetup() bool { + if o == nil || IsNil(o.RequiresOrgSetup) { + var ret bool + return ret + } + return *o.RequiresOrgSetup +} + +// GetRequiresOrgSetupOk returns a tuple with the RequiresOrgSetup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetRequiresOrgSetupOk() (*bool, bool) { + if o == nil || IsNil(o.RequiresOrgSetup) { + return nil, false + } + return o.RequiresOrgSetup, true +} + +// HasRequiresOrgSetup returns a boolean if a field has been set. +func (o *UserInfoResponse) HasRequiresOrgSetup() bool { + if o != nil && !IsNil(o.RequiresOrgSetup) { + return true + } + + return false +} + +// SetRequiresOrgSetup gets a reference to the given bool and assigns it to the RequiresOrgSetup field. +func (o *UserInfoResponse) SetRequiresOrgSetup(v bool) { + o.RequiresOrgSetup = &v +} + +// GetDefaultWorkspaceId returns the DefaultWorkspaceId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceId() string { + if o == nil || o.DefaultWorkspaceId.Get() == nil { + var ret string + return ret + } + + return *o.DefaultWorkspaceId.Get() +} + +// GetDefaultWorkspaceIdOk returns a tuple with the DefaultWorkspaceId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultWorkspaceId.Get(), o.DefaultWorkspaceId.IsSet() +} + +// SetDefaultWorkspaceId sets field value +func (o *UserInfoResponse) SetDefaultWorkspaceId(v string) { + o.DefaultWorkspaceId.Set(&v) +} + +// GetDefaultWorkspaceName returns the DefaultWorkspaceName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceName() string { + if o == nil || o.DefaultWorkspaceName.Get() == nil { + var ret string + return ret + } + + return *o.DefaultWorkspaceName.Get() +} + +// GetDefaultWorkspaceNameOk returns a tuple with the DefaultWorkspaceName field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultWorkspaceName.Get(), o.DefaultWorkspaceName.IsSet() +} + +// SetDefaultWorkspaceName sets field value +func (o *UserInfoResponse) SetDefaultWorkspaceName(v string) { + o.DefaultWorkspaceName.Set(&v) +} + +// GetDefaultWorkspaceDisplayName returns the DefaultWorkspaceDisplayName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceDisplayName() string { + if o == nil || o.DefaultWorkspaceDisplayName.Get() == nil { + var ret string + return ret + } + + return *o.DefaultWorkspaceDisplayName.Get() +} + +// GetDefaultWorkspaceDisplayNameOk returns a tuple with the DefaultWorkspaceDisplayName field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultWorkspaceDisplayName.Get(), o.DefaultWorkspaceDisplayName.IsSet() +} + +// SetDefaultWorkspaceDisplayName sets field value +func (o *UserInfoResponse) SetDefaultWorkspaceDisplayName(v string) { + o.DefaultWorkspaceDisplayName.Set(&v) +} + +// GetDefaultWorkspaceRole returns the DefaultWorkspaceRole field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceRole() string { + if o == nil || o.DefaultWorkspaceRole.Get() == nil { + var ret string + return ret + } + + return *o.DefaultWorkspaceRole.Get() +} + +// GetDefaultWorkspaceRoleOk returns a tuple with the DefaultWorkspaceRole field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetDefaultWorkspaceRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultWorkspaceRole.Get(), o.DefaultWorkspaceRole.IsSet() +} + +// SetDefaultWorkspaceRole sets field value +func (o *UserInfoResponse) SetDefaultWorkspaceRole(v string) { + o.DefaultWorkspaceRole.Set(&v) +} + +// GetOrgLevel returns the OrgLevel field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *UserInfoResponse) GetOrgLevel() int32 { + if o == nil || o.OrgLevel.Get() == nil { + var ret int32 + return ret + } + + return *o.OrgLevel.Get() +} + +// GetOrgLevelOk returns a tuple with the OrgLevel field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetOrgLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.OrgLevel.Get(), o.OrgLevel.IsSet() +} + +// SetOrgLevel sets field value +func (o *UserInfoResponse) SetOrgLevel(v int32) { + o.OrgLevel.Set(&v) +} + +// GetWsLevel returns the WsLevel field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *UserInfoResponse) GetWsLevel() int32 { + if o == nil || o.WsLevel.Get() == nil { + var ret int32 + return ret + } + + return *o.WsLevel.Get() +} + +// GetWsLevelOk returns a tuple with the WsLevel field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetWsLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.WsLevel.Get(), o.WsLevel.IsSet() +} + +// SetWsLevel sets field value +func (o *UserInfoResponse) SetWsLevel(v int32) { + o.WsLevel.Set(&v) +} + +// GetEffectiveLevel returns the EffectiveLevel field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *UserInfoResponse) GetEffectiveLevel() int32 { + if o == nil || o.EffectiveLevel.Get() == nil { + var ret int32 + return ret + } + + return *o.EffectiveLevel.Get() +} + +// GetEffectiveLevelOk returns a tuple with the EffectiveLevel field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserInfoResponse) GetEffectiveLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.EffectiveLevel.Get(), o.EffectiveLevel.IsSet() +} + +// SetEffectiveLevel sets field value +func (o *UserInfoResponse) SetEffectiveLevel(v int32) { + o.EffectiveLevel.Set(&v) +} + +// GetHas2faEnabled returns the Has2faEnabled field value if set, zero value otherwise. +func (o *UserInfoResponse) GetHas2faEnabled() bool { + if o == nil || IsNil(o.Has2faEnabled) { + var ret bool + return ret + } + return *o.Has2faEnabled +} + +// GetHas2faEnabledOk returns a tuple with the Has2faEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetHas2faEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Has2faEnabled) { + return nil, false + } + return o.Has2faEnabled, true +} + +// HasHas2faEnabled returns a boolean if a field has been set. +func (o *UserInfoResponse) HasHas2faEnabled() bool { + if o != nil && !IsNil(o.Has2faEnabled) { + return true + } + + return false +} + +// SetHas2faEnabled gets a reference to the given bool and assigns it to the Has2faEnabled field. +func (o *UserInfoResponse) SetHas2faEnabled(v bool) { + o.Has2faEnabled = &v +} + +// GetTwoFactorMethods returns the TwoFactorMethods field value if set, zero value otherwise. +func (o *UserInfoResponse) GetTwoFactorMethods() UserInfoTwoFactorMethods { + if o == nil || IsNil(o.TwoFactorMethods) { + var ret UserInfoTwoFactorMethods + return ret + } + return *o.TwoFactorMethods +} + +// GetTwoFactorMethodsOk returns a tuple with the TwoFactorMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetTwoFactorMethodsOk() (*UserInfoTwoFactorMethods, bool) { + if o == nil || IsNil(o.TwoFactorMethods) { + return nil, false + } + return o.TwoFactorMethods, true +} + +// HasTwoFactorMethods returns a boolean if a field has been set. +func (o *UserInfoResponse) HasTwoFactorMethods() bool { + if o != nil && !IsNil(o.TwoFactorMethods) { + return true + } + + return false +} + +// SetTwoFactorMethods gets a reference to the given UserInfoTwoFactorMethods and assigns it to the TwoFactorMethods field. +func (o *UserInfoResponse) SetTwoFactorMethods(v UserInfoTwoFactorMethods) { + o.TwoFactorMethods = &v +} + +// GetOrg2faRequired returns the Org2faRequired field value if set, zero value otherwise. +func (o *UserInfoResponse) GetOrg2faRequired() bool { + if o == nil || IsNil(o.Org2faRequired) { + var ret bool + return ret + } + return *o.Org2faRequired +} + +// GetOrg2faRequiredOk returns a tuple with the Org2faRequired field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetOrg2faRequiredOk() (*bool, bool) { + if o == nil || IsNil(o.Org2faRequired) { + return nil, false + } + return o.Org2faRequired, true +} + +// HasOrg2faRequired returns a boolean if a field has been set. +func (o *UserInfoResponse) HasOrg2faRequired() bool { + if o != nil && !IsNil(o.Org2faRequired) { + return true + } + + return false +} + +// SetOrg2faRequired gets a reference to the given bool and assigns it to the Org2faRequired field. +func (o *UserInfoResponse) SetOrg2faRequired(v bool) { + o.Org2faRequired = &v +} + +// GetOrg2faGraceEndsAt returns the Org2faGraceEndsAt field value if set, zero value otherwise. +func (o *UserInfoResponse) GetOrg2faGraceEndsAt() time.Time { + if o == nil || IsNil(o.Org2faGraceEndsAt) { + var ret time.Time + return ret + } + return *o.Org2faGraceEndsAt +} + +// GetOrg2faGraceEndsAtOk returns a tuple with the Org2faGraceEndsAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoResponse) GetOrg2faGraceEndsAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.Org2faGraceEndsAt) { + return nil, false + } + return o.Org2faGraceEndsAt, true +} + +// HasOrg2faGraceEndsAt returns a boolean if a field has been set. +func (o *UserInfoResponse) HasOrg2faGraceEndsAt() bool { + if o != nil && !IsNil(o.Org2faGraceEndsAt) { + return true + } + + return false +} + +// SetOrg2faGraceEndsAt gets a reference to the given time.Time and assigns it to the Org2faGraceEndsAt field. +func (o *UserInfoResponse) SetOrg2faGraceEndsAt(v time.Time) { + o.Org2faGraceEndsAt = &v +} + +func (o UserInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserInfoResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["email"] = o.Email + toSerialize["name"] = o.Name.Get() + toSerialize["organization_role"] = o.OrganizationRole.Get() + toSerialize["organization"] = o.Organization + toSerialize["created_at"] = o.CreatedAt + toSerialize["status"] = o.Status + toSerialize["role"] = o.Role.Get() + if !IsNil(o.Goals) { + toSerialize["goals"] = o.Goals + } + toSerialize["remember_me"] = o.RememberMe + toSerialize["get_started_completed"] = o.GetStartedCompleted + toSerialize["onboarding_completed"] = o.OnboardingCompleted + toSerialize["ws_enabled"] = o.WsEnabled + if !IsNil(o.RequiresOrgSetup) { + toSerialize["requires_org_setup"] = o.RequiresOrgSetup + } + toSerialize["default_workspace_id"] = o.DefaultWorkspaceId.Get() + toSerialize["default_workspace_name"] = o.DefaultWorkspaceName.Get() + toSerialize["default_workspace_display_name"] = o.DefaultWorkspaceDisplayName.Get() + toSerialize["default_workspace_role"] = o.DefaultWorkspaceRole.Get() + toSerialize["org_level"] = o.OrgLevel.Get() + toSerialize["ws_level"] = o.WsLevel.Get() + toSerialize["effective_level"] = o.EffectiveLevel.Get() + if !IsNil(o.Has2faEnabled) { + toSerialize["has_2fa_enabled"] = o.Has2faEnabled + } + if !IsNil(o.TwoFactorMethods) { + toSerialize["two_factor_methods"] = o.TwoFactorMethods + } + if !IsNil(o.Org2faRequired) { + toSerialize["org_2fa_required"] = o.Org2faRequired + } + if !IsNil(o.Org2faGraceEndsAt) { + toSerialize["org_2fa_grace_ends_at"] = o.Org2faGraceEndsAt + } + return toSerialize, nil +} + +func (o *UserInfoResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "email", + "name", + "organization_role", + "organization", + "created_at", + "status", + "role", + "remember_me", + "get_started_completed", + "onboarding_completed", + "ws_enabled", + "default_workspace_id", + "default_workspace_name", + "default_workspace_display_name", + "default_workspace_role", + "org_level", + "ws_level", + "effective_level", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserInfoResponse := _UserInfoResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserInfoResponse) + + if err != nil { + return err + } + + *o = UserInfoResponse(varUserInfoResponse) + + return err +} + +type NullableUserInfoResponse struct { + value *UserInfoResponse + isSet bool +} + +func (v NullableUserInfoResponse) Get() *UserInfoResponse { + return v.value +} + +func (v *NullableUserInfoResponse) Set(val *UserInfoResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserInfoResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserInfoResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserInfoResponse(val *UserInfoResponse) *NullableUserInfoResponse { + return &NullableUserInfoResponse{value: val, isSet: true} +} + +func (v NullableUserInfoResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserInfoResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_user_info_two_factor_methods.go b/go/futureagi/model_user_info_two_factor_methods.go new file mode 100644 index 0000000..bcce54b --- /dev/null +++ b/go/futureagi/model_user_info_two_factor_methods.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserInfoTwoFactorMethods type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserInfoTwoFactorMethods{} + +// UserInfoTwoFactorMethods struct for UserInfoTwoFactorMethods +type UserInfoTwoFactorMethods struct { + Totp bool `json:"totp"` + Passkey bool `json:"passkey"` +} + +type _UserInfoTwoFactorMethods UserInfoTwoFactorMethods + +// NewUserInfoTwoFactorMethods instantiates a new UserInfoTwoFactorMethods object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserInfoTwoFactorMethods(totp bool, passkey bool) *UserInfoTwoFactorMethods { + this := UserInfoTwoFactorMethods{} + this.Totp = totp + this.Passkey = passkey + return &this +} + +// NewUserInfoTwoFactorMethodsWithDefaults instantiates a new UserInfoTwoFactorMethods object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserInfoTwoFactorMethodsWithDefaults() *UserInfoTwoFactorMethods { + this := UserInfoTwoFactorMethods{} + return &this +} + +// GetTotp returns the Totp field value +func (o *UserInfoTwoFactorMethods) GetTotp() bool { + if o == nil { + var ret bool + return ret + } + + return o.Totp +} + +// GetTotpOk returns a tuple with the Totp field value +// and a boolean to check if the value has been set. +func (o *UserInfoTwoFactorMethods) GetTotpOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Totp, true +} + +// SetTotp sets field value +func (o *UserInfoTwoFactorMethods) SetTotp(v bool) { + o.Totp = v +} + +// GetPasskey returns the Passkey field value +func (o *UserInfoTwoFactorMethods) GetPasskey() bool { + if o == nil { + var ret bool + return ret + } + + return o.Passkey +} + +// GetPasskeyOk returns a tuple with the Passkey field value +// and a boolean to check if the value has been set. +func (o *UserInfoTwoFactorMethods) GetPasskeyOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Passkey, true +} + +// SetPasskey sets field value +func (o *UserInfoTwoFactorMethods) SetPasskey(v bool) { + o.Passkey = v +} + +func (o UserInfoTwoFactorMethods) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserInfoTwoFactorMethods) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["totp"] = o.Totp + toSerialize["passkey"] = o.Passkey + return toSerialize, nil +} + +func (o *UserInfoTwoFactorMethods) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "totp", + "passkey", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserInfoTwoFactorMethods := _UserInfoTwoFactorMethods{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserInfoTwoFactorMethods) + + if err != nil { + return err + } + + *o = UserInfoTwoFactorMethods(varUserInfoTwoFactorMethods) + + return err +} + +type NullableUserInfoTwoFactorMethods struct { + value *UserInfoTwoFactorMethods + isSet bool +} + +func (v NullableUserInfoTwoFactorMethods) Get() *UserInfoTwoFactorMethods { + return v.value +} + +func (v *NullableUserInfoTwoFactorMethods) Set(val *UserInfoTwoFactorMethods) { + v.value = val + v.isSet = true +} + +func (v NullableUserInfoTwoFactorMethods) IsSet() bool { + return v.isSet +} + +func (v *NullableUserInfoTwoFactorMethods) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserInfoTwoFactorMethods(val *UserInfoTwoFactorMethods) *NullableUserInfoTwoFactorMethods { + return &NullableUserInfoTwoFactorMethods{value: val, isSet: true} +} + +func (v NullableUserInfoTwoFactorMethods) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserInfoTwoFactorMethods) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_users_response.go b/go/futureagi/model_users_response.go new file mode 100644 index 0000000..93a6581 --- /dev/null +++ b/go/futureagi/model_users_response.go @@ -0,0 +1,197 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UsersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UsersResponse{} + +// UsersResponse struct for UsersResponse +type UsersResponse struct { + Status *bool `json:"status,omitempty"` + Result UsersResult `json:"result"` +} + +type _UsersResponse UsersResponse + +// NewUsersResponse instantiates a new UsersResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUsersResponse(result UsersResult) *UsersResponse { + this := UsersResponse{} + var status bool = true + this.Status = &status + this.Result = result + return &this +} + +// NewUsersResponseWithDefaults instantiates a new UsersResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUsersResponseWithDefaults() *UsersResponse { + this := UsersResponse{} + var status bool = true + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UsersResponse) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsersResponse) GetStatusOk() (*bool, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *UsersResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *UsersResponse) SetStatus(v bool) { + o.Status = &v +} + +// GetResult returns the Result field value +func (o *UsersResponse) GetResult() UsersResult { + if o == nil { + var ret UsersResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *UsersResponse) GetResultOk() (*UsersResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *UsersResponse) SetResult(v UsersResult) { + o.Result = v +} + +func (o UsersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UsersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *UsersResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUsersResponse := _UsersResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUsersResponse) + + if err != nil { + return err + } + + *o = UsersResponse(varUsersResponse) + + return err +} + +type NullableUsersResponse struct { + value *UsersResponse + isSet bool +} + +func (v NullableUsersResponse) Get() *UsersResponse { + return v.value +} + +func (v *NullableUsersResponse) Set(val *UsersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUsersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUsersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUsersResponse(val *UsersResponse) *NullableUsersResponse { + return &NullableUsersResponse{value: val, isSet: true} +} + +func (v NullableUsersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUsersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_users_result.go b/go/futureagi/model_users_result.go new file mode 100644 index 0000000..1c0bf60 --- /dev/null +++ b/go/futureagi/model_users_result.go @@ -0,0 +1,213 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UsersResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UsersResult{} + +// UsersResult struct for UsersResult +type UsersResult struct { + Table []map[string]interface{} `json:"table"` + TotalCount int32 `json:"total_count"` + TotalPages int32 `json:"total_pages"` +} + +type _UsersResult UsersResult + +// NewUsersResult instantiates a new UsersResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUsersResult(table []map[string]interface{}, totalCount int32, totalPages int32) *UsersResult { + this := UsersResult{} + this.Table = table + this.TotalCount = totalCount + this.TotalPages = totalPages + return &this +} + +// NewUsersResultWithDefaults instantiates a new UsersResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUsersResultWithDefaults() *UsersResult { + this := UsersResult{} + return &this +} + +// GetTable returns the Table field value +func (o *UsersResult) GetTable() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Table +} + +// GetTableOk returns a tuple with the Table field value +// and a boolean to check if the value has been set. +func (o *UsersResult) GetTableOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Table, true +} + +// SetTable sets field value +func (o *UsersResult) SetTable(v []map[string]interface{}) { + o.Table = v +} + +// GetTotalCount returns the TotalCount field value +func (o *UsersResult) GetTotalCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value +// and a boolean to check if the value has been set. +func (o *UsersResult) GetTotalCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalCount, true +} + +// SetTotalCount sets field value +func (o *UsersResult) SetTotalCount(v int32) { + o.TotalCount = v +} + +// GetTotalPages returns the TotalPages field value +func (o *UsersResult) GetTotalPages() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *UsersResult) GetTotalPagesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *UsersResult) SetTotalPages(v int32) { + o.TotalPages = v +} + +func (o UsersResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UsersResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["table"] = o.Table + toSerialize["total_count"] = o.TotalCount + toSerialize["total_pages"] = o.TotalPages + return toSerialize, nil +} + +func (o *UsersResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "table", + "total_count", + "total_pages", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUsersResult := _UsersResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUsersResult) + + if err != nil { + return err + } + + *o = UsersResult(varUsersResult) + + return err +} + +type NullableUsersResult struct { + value *UsersResult + isSet bool +} + +func (v NullableUsersResult) Get() *UsersResult { + return v.value +} + +func (v *NullableUsersResult) Set(val *UsersResult) { + v.value = val + v.isSet = true +} + +func (v NullableUsersResult) IsSet() bool { + return v.isSet +} + +func (v *NullableUsersResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUsersResult(val *UsersResult) *NullableUsersResult { + return &NullableUsersResult{value: val, isSet: true} +} + +func (v NullableUsersResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUsersResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_vector_db_column_request.go b/go/futureagi/model_vector_db_column_request.go new file mode 100644 index 0000000..3fa1bac --- /dev/null +++ b/go/futureagi/model_vector_db_column_request.go @@ -0,0 +1,685 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the VectorDBColumnRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VectorDBColumnRequest{} + +// VectorDBColumnRequest struct for VectorDBColumnRequest +type VectorDBColumnRequest struct { + ColumnId string `json:"column_id"` + NewColumnName *string `json:"new_column_name,omitempty"` + SubType string `json:"sub_type"` + ApiKey string `json:"api_key"` + CollectionName *string `json:"collection_name,omitempty"` + Url *string `json:"url,omitempty"` + SearchType *string `json:"search_type,omitempty"` + Key *string `json:"key,omitempty"` + Limit *int32 `json:"limit,omitempty"` + IndexName *string `json:"index_name,omitempty"` + TopK *int32 `json:"top_k,omitempty"` + Namespace *string `json:"namespace,omitempty"` + EmbeddingConfig map[string]interface{} `json:"embedding_config,omitempty"` + Concurrency *int32 `json:"concurrency,omitempty"` + QueryKey *string `json:"query_key,omitempty"` + VectorLength *int32 `json:"vector_length,omitempty"` +} + +type _VectorDBColumnRequest VectorDBColumnRequest + +// NewVectorDBColumnRequest instantiates a new VectorDBColumnRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVectorDBColumnRequest(columnId string, subType string, apiKey string) *VectorDBColumnRequest { + this := VectorDBColumnRequest{} + this.ColumnId = columnId + this.SubType = subType + this.ApiKey = apiKey + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// NewVectorDBColumnRequestWithDefaults instantiates a new VectorDBColumnRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVectorDBColumnRequestWithDefaults() *VectorDBColumnRequest { + this := VectorDBColumnRequest{} + var concurrency int32 = 5 + this.Concurrency = &concurrency + return &this +} + +// GetColumnId returns the ColumnId field value +func (o *VectorDBColumnRequest) GetColumnId() string { + if o == nil { + var ret string + return ret + } + + return o.ColumnId +} + +// GetColumnIdOk returns a tuple with the ColumnId field value +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetColumnIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ColumnId, true +} + +// SetColumnId sets field value +func (o *VectorDBColumnRequest) SetColumnId(v string) { + o.ColumnId = v +} + +// GetNewColumnName returns the NewColumnName field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetNewColumnName() string { + if o == nil || IsNil(o.NewColumnName) { + var ret string + return ret + } + return *o.NewColumnName +} + +// GetNewColumnNameOk returns a tuple with the NewColumnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetNewColumnNameOk() (*string, bool) { + if o == nil || IsNil(o.NewColumnName) { + return nil, false + } + return o.NewColumnName, true +} + +// HasNewColumnName returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasNewColumnName() bool { + if o != nil && !IsNil(o.NewColumnName) { + return true + } + + return false +} + +// SetNewColumnName gets a reference to the given string and assigns it to the NewColumnName field. +func (o *VectorDBColumnRequest) SetNewColumnName(v string) { + o.NewColumnName = &v +} + +// GetSubType returns the SubType field value +func (o *VectorDBColumnRequest) GetSubType() string { + if o == nil { + var ret string + return ret + } + + return o.SubType +} + +// GetSubTypeOk returns a tuple with the SubType field value +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetSubTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubType, true +} + +// SetSubType sets field value +func (o *VectorDBColumnRequest) SetSubType(v string) { + o.SubType = v +} + +// GetApiKey returns the ApiKey field value +func (o *VectorDBColumnRequest) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *VectorDBColumnRequest) SetApiKey(v string) { + o.ApiKey = v +} + +// GetCollectionName returns the CollectionName field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetCollectionName() string { + if o == nil || IsNil(o.CollectionName) { + var ret string + return ret + } + return *o.CollectionName +} + +// GetCollectionNameOk returns a tuple with the CollectionName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetCollectionNameOk() (*string, bool) { + if o == nil || IsNil(o.CollectionName) { + return nil, false + } + return o.CollectionName, true +} + +// HasCollectionName returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasCollectionName() bool { + if o != nil && !IsNil(o.CollectionName) { + return true + } + + return false +} + +// SetCollectionName gets a reference to the given string and assigns it to the CollectionName field. +func (o *VectorDBColumnRequest) SetCollectionName(v string) { + o.CollectionName = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *VectorDBColumnRequest) SetUrl(v string) { + o.Url = &v +} + +// GetSearchType returns the SearchType field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetSearchType() string { + if o == nil || IsNil(o.SearchType) { + var ret string + return ret + } + return *o.SearchType +} + +// GetSearchTypeOk returns a tuple with the SearchType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetSearchTypeOk() (*string, bool) { + if o == nil || IsNil(o.SearchType) { + return nil, false + } + return o.SearchType, true +} + +// HasSearchType returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasSearchType() bool { + if o != nil && !IsNil(o.SearchType) { + return true + } + + return false +} + +// SetSearchType gets a reference to the given string and assigns it to the SearchType field. +func (o *VectorDBColumnRequest) SetSearchType(v string) { + o.SearchType = &v +} + +// GetKey returns the Key field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetKey() string { + if o == nil || IsNil(o.Key) { + var ret string + return ret + } + return *o.Key +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetKeyOk() (*string, bool) { + if o == nil || IsNil(o.Key) { + return nil, false + } + return o.Key, true +} + +// HasKey returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasKey() bool { + if o != nil && !IsNil(o.Key) { + return true + } + + return false +} + +// SetKey gets a reference to the given string and assigns it to the Key field. +func (o *VectorDBColumnRequest) SetKey(v string) { + o.Key = &v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetLimit() int32 { + if o == nil || IsNil(o.Limit) { + var ret int32 + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetLimitOk() (*int32, bool) { + if o == nil || IsNil(o.Limit) { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasLimit() bool { + if o != nil && !IsNil(o.Limit) { + return true + } + + return false +} + +// SetLimit gets a reference to the given int32 and assigns it to the Limit field. +func (o *VectorDBColumnRequest) SetLimit(v int32) { + o.Limit = &v +} + +// GetIndexName returns the IndexName field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetIndexName() string { + if o == nil || IsNil(o.IndexName) { + var ret string + return ret + } + return *o.IndexName +} + +// GetIndexNameOk returns a tuple with the IndexName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetIndexNameOk() (*string, bool) { + if o == nil || IsNil(o.IndexName) { + return nil, false + } + return o.IndexName, true +} + +// HasIndexName returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasIndexName() bool { + if o != nil && !IsNil(o.IndexName) { + return true + } + + return false +} + +// SetIndexName gets a reference to the given string and assigns it to the IndexName field. +func (o *VectorDBColumnRequest) SetIndexName(v string) { + o.IndexName = &v +} + +// GetTopK returns the TopK field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetTopK() int32 { + if o == nil || IsNil(o.TopK) { + var ret int32 + return ret + } + return *o.TopK +} + +// GetTopKOk returns a tuple with the TopK field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetTopKOk() (*int32, bool) { + if o == nil || IsNil(o.TopK) { + return nil, false + } + return o.TopK, true +} + +// HasTopK returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasTopK() bool { + if o != nil && !IsNil(o.TopK) { + return true + } + + return false +} + +// SetTopK gets a reference to the given int32 and assigns it to the TopK field. +func (o *VectorDBColumnRequest) SetTopK(v int32) { + o.TopK = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *VectorDBColumnRequest) SetNamespace(v string) { + o.Namespace = &v +} + +// GetEmbeddingConfig returns the EmbeddingConfig field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetEmbeddingConfig() map[string]interface{} { + if o == nil || IsNil(o.EmbeddingConfig) { + var ret map[string]interface{} + return ret + } + return o.EmbeddingConfig +} + +// GetEmbeddingConfigOk returns a tuple with the EmbeddingConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetEmbeddingConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.EmbeddingConfig) { + return map[string]interface{}{}, false + } + return o.EmbeddingConfig, true +} + +// HasEmbeddingConfig returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasEmbeddingConfig() bool { + if o != nil && !IsNil(o.EmbeddingConfig) { + return true + } + + return false +} + +// SetEmbeddingConfig gets a reference to the given map[string]interface{} and assigns it to the EmbeddingConfig field. +func (o *VectorDBColumnRequest) SetEmbeddingConfig(v map[string]interface{}) { + o.EmbeddingConfig = v +} + +// GetConcurrency returns the Concurrency field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetConcurrency() int32 { + if o == nil || IsNil(o.Concurrency) { + var ret int32 + return ret + } + return *o.Concurrency +} + +// GetConcurrencyOk returns a tuple with the Concurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetConcurrencyOk() (*int32, bool) { + if o == nil || IsNil(o.Concurrency) { + return nil, false + } + return o.Concurrency, true +} + +// HasConcurrency returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasConcurrency() bool { + if o != nil && !IsNil(o.Concurrency) { + return true + } + + return false +} + +// SetConcurrency gets a reference to the given int32 and assigns it to the Concurrency field. +func (o *VectorDBColumnRequest) SetConcurrency(v int32) { + o.Concurrency = &v +} + +// GetQueryKey returns the QueryKey field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetQueryKey() string { + if o == nil || IsNil(o.QueryKey) { + var ret string + return ret + } + return *o.QueryKey +} + +// GetQueryKeyOk returns a tuple with the QueryKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetQueryKeyOk() (*string, bool) { + if o == nil || IsNil(o.QueryKey) { + return nil, false + } + return o.QueryKey, true +} + +// HasQueryKey returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasQueryKey() bool { + if o != nil && !IsNil(o.QueryKey) { + return true + } + + return false +} + +// SetQueryKey gets a reference to the given string and assigns it to the QueryKey field. +func (o *VectorDBColumnRequest) SetQueryKey(v string) { + o.QueryKey = &v +} + +// GetVectorLength returns the VectorLength field value if set, zero value otherwise. +func (o *VectorDBColumnRequest) GetVectorLength() int32 { + if o == nil || IsNil(o.VectorLength) { + var ret int32 + return ret + } + return *o.VectorLength +} + +// GetVectorLengthOk returns a tuple with the VectorLength field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorDBColumnRequest) GetVectorLengthOk() (*int32, bool) { + if o == nil || IsNil(o.VectorLength) { + return nil, false + } + return o.VectorLength, true +} + +// HasVectorLength returns a boolean if a field has been set. +func (o *VectorDBColumnRequest) HasVectorLength() bool { + if o != nil && !IsNil(o.VectorLength) { + return true + } + + return false +} + +// SetVectorLength gets a reference to the given int32 and assigns it to the VectorLength field. +func (o *VectorDBColumnRequest) SetVectorLength(v int32) { + o.VectorLength = &v +} + +func (o VectorDBColumnRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VectorDBColumnRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["column_id"] = o.ColumnId + if !IsNil(o.NewColumnName) { + toSerialize["new_column_name"] = o.NewColumnName + } + toSerialize["sub_type"] = o.SubType + toSerialize["api_key"] = o.ApiKey + if !IsNil(o.CollectionName) { + toSerialize["collection_name"] = o.CollectionName + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.SearchType) { + toSerialize["search_type"] = o.SearchType + } + if !IsNil(o.Key) { + toSerialize["key"] = o.Key + } + if !IsNil(o.Limit) { + toSerialize["limit"] = o.Limit + } + if !IsNil(o.IndexName) { + toSerialize["index_name"] = o.IndexName + } + if !IsNil(o.TopK) { + toSerialize["top_k"] = o.TopK + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.EmbeddingConfig) { + toSerialize["embedding_config"] = o.EmbeddingConfig + } + if !IsNil(o.Concurrency) { + toSerialize["concurrency"] = o.Concurrency + } + if !IsNil(o.QueryKey) { + toSerialize["query_key"] = o.QueryKey + } + if !IsNil(o.VectorLength) { + toSerialize["vector_length"] = o.VectorLength + } + return toSerialize, nil +} + +func (o *VectorDBColumnRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "column_id", + "sub_type", + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVectorDBColumnRequest := _VectorDBColumnRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVectorDBColumnRequest) + + if err != nil { + return err + } + + *o = VectorDBColumnRequest(varVectorDBColumnRequest) + + return err +} + +type NullableVectorDBColumnRequest struct { + value *VectorDBColumnRequest + isSet bool +} + +func (v NullableVectorDBColumnRequest) Get() *VectorDBColumnRequest { + return v.value +} + +func (v *NullableVectorDBColumnRequest) Set(val *VectorDBColumnRequest) { + v.value = val + v.isSet = true +} + +func (v NullableVectorDBColumnRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableVectorDBColumnRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVectorDBColumnRequest(val *VectorDBColumnRequest) *NullableVectorDBColumnRequest { + return &NullableVectorDBColumnRequest{value: val, isSet: true} +} + +func (v NullableVectorDBColumnRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVectorDBColumnRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_access_input.go b/go/futureagi/model_workspace_access_input.go new file mode 100644 index 0000000..2e1a14c --- /dev/null +++ b/go/futureagi/model_workspace_access_input.go @@ -0,0 +1,193 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceAccessInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceAccessInput{} + +// WorkspaceAccessInput List of {\"workspace_id\": \"\", \"level\": }. +type WorkspaceAccessInput struct { + WorkspaceId string `json:"workspace_id"` + Level *int32 `json:"level,omitempty"` +} + +type _WorkspaceAccessInput WorkspaceAccessInput + +// NewWorkspaceAccessInput instantiates a new WorkspaceAccessInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceAccessInput(workspaceId string) *WorkspaceAccessInput { + this := WorkspaceAccessInput{} + this.WorkspaceId = workspaceId + return &this +} + +// NewWorkspaceAccessInputWithDefaults instantiates a new WorkspaceAccessInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceAccessInputWithDefaults() *WorkspaceAccessInput { + this := WorkspaceAccessInput{} + return &this +} + +// GetWorkspaceId returns the WorkspaceId field value +func (o *WorkspaceAccessInput) GetWorkspaceId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceId +} + +// GetWorkspaceIdOk returns a tuple with the WorkspaceId field value +// and a boolean to check if the value has been set. +func (o *WorkspaceAccessInput) GetWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceId, true +} + +// SetWorkspaceId sets field value +func (o *WorkspaceAccessInput) SetWorkspaceId(v string) { + o.WorkspaceId = v +} + +// GetLevel returns the Level field value if set, zero value otherwise. +func (o *WorkspaceAccessInput) GetLevel() int32 { + if o == nil || IsNil(o.Level) { + var ret int32 + return ret + } + return *o.Level +} + +// GetLevelOk returns a tuple with the Level field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkspaceAccessInput) GetLevelOk() (*int32, bool) { + if o == nil || IsNil(o.Level) { + return nil, false + } + return o.Level, true +} + +// HasLevel returns a boolean if a field has been set. +func (o *WorkspaceAccessInput) HasLevel() bool { + if o != nil && !IsNil(o.Level) { + return true + } + + return false +} + +// SetLevel gets a reference to the given int32 and assigns it to the Level field. +func (o *WorkspaceAccessInput) SetLevel(v int32) { + o.Level = &v +} + +func (o WorkspaceAccessInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceAccessInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["workspace_id"] = o.WorkspaceId + if !IsNil(o.Level) { + toSerialize["level"] = o.Level + } + return toSerialize, nil +} + +func (o *WorkspaceAccessInput) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "workspace_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceAccessInput := _WorkspaceAccessInput{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceAccessInput) + + if err != nil { + return err + } + + *o = WorkspaceAccessInput(varWorkspaceAccessInput) + + return err +} + +type NullableWorkspaceAccessInput struct { + value *WorkspaceAccessInput + isSet bool +} + +func (v NullableWorkspaceAccessInput) Get() *WorkspaceAccessInput { + return v.value +} + +func (v *NullableWorkspaceAccessInput) Set(val *WorkspaceAccessInput) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceAccessInput) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceAccessInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceAccessInput(val *WorkspaceAccessInput) *NullableWorkspaceAccessInput { + return &NullableWorkspaceAccessInput{value: val, isSet: true} +} + +func (v NullableWorkspaceAccessInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceAccessInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_admin_summary.go b/go/futureagi/model_workspace_admin_summary.go new file mode 100644 index 0000000..2eac7a0 --- /dev/null +++ b/go/futureagi/model_workspace_admin_summary.go @@ -0,0 +1,187 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceAdminSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceAdminSummary{} + +// WorkspaceAdminSummary struct for WorkspaceAdminSummary +type WorkspaceAdminSummary struct { + Name NullableString `json:"name"` + Id string `json:"id"` +} + +type _WorkspaceAdminSummary WorkspaceAdminSummary + +// NewWorkspaceAdminSummary instantiates a new WorkspaceAdminSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceAdminSummary(name NullableString, id string) *WorkspaceAdminSummary { + this := WorkspaceAdminSummary{} + this.Name = name + this.Id = id + return &this +} + +// NewWorkspaceAdminSummaryWithDefaults instantiates a new WorkspaceAdminSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceAdminSummaryWithDefaults() *WorkspaceAdminSummary { + this := WorkspaceAdminSummary{} + return &this +} + +// GetName returns the Name field value +// If the value is explicit nil, the zero value for string will be returned +func (o *WorkspaceAdminSummary) GetName() string { + if o == nil || o.Name.Get() == nil { + var ret string + return ret + } + + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkspaceAdminSummary) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// SetName sets field value +func (o *WorkspaceAdminSummary) SetName(v string) { + o.Name.Set(&v) +} + +// GetId returns the Id field value +func (o *WorkspaceAdminSummary) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkspaceAdminSummary) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkspaceAdminSummary) SetId(v string) { + o.Id = v +} + +func (o WorkspaceAdminSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceAdminSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name.Get() + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *WorkspaceAdminSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceAdminSummary := _WorkspaceAdminSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceAdminSummary) + + if err != nil { + return err + } + + *o = WorkspaceAdminSummary(varWorkspaceAdminSummary) + + return err +} + +type NullableWorkspaceAdminSummary struct { + value *WorkspaceAdminSummary + isSet bool +} + +func (v NullableWorkspaceAdminSummary) Get() *WorkspaceAdminSummary { + return v.value +} + +func (v *NullableWorkspaceAdminSummary) Set(val *WorkspaceAdminSummary) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceAdminSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceAdminSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceAdminSummary(val *WorkspaceAdminSummary) *NullableWorkspaceAdminSummary { + return &NullableWorkspaceAdminSummary{value: val, isSet: true} +} + +func (v NullableWorkspaceAdminSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceAdminSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_list_item_response.go b/go/futureagi/model_workspace_list_item_response.go new file mode 100644 index 0000000..2b3e472 --- /dev/null +++ b/go/futureagi/model_workspace_list_item_response.go @@ -0,0 +1,451 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceListItemResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceListItemResponse{} + +// WorkspaceListItemResponse struct for WorkspaceListItemResponse +type WorkspaceListItemResponse struct { + Id string `json:"id"` + Name string `json:"name"` + DisplayName string `json:"display_name"` + AdminNames []WorkspaceAdminSummary `json:"admin_names,omitempty"` + StartData *string `json:"start_data,omitempty"` + LastUpdateDate *string `json:"last_update_date,omitempty"` + InviteLink *string `json:"invite_link,omitempty"` + UserWsLevel NullableInt32 `json:"user_ws_level,omitempty"` + UserWsRole NullableString `json:"user_ws_role,omitempty"` +} + +type _WorkspaceListItemResponse WorkspaceListItemResponse + +// NewWorkspaceListItemResponse instantiates a new WorkspaceListItemResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceListItemResponse(id string, name string, displayName string) *WorkspaceListItemResponse { + this := WorkspaceListItemResponse{} + this.Id = id + this.Name = name + this.DisplayName = displayName + return &this +} + +// NewWorkspaceListItemResponseWithDefaults instantiates a new WorkspaceListItemResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceListItemResponseWithDefaults() *WorkspaceListItemResponse { + this := WorkspaceListItemResponse{} + return &this +} + +// GetId returns the Id field value +func (o *WorkspaceListItemResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkspaceListItemResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkspaceListItemResponse) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *WorkspaceListItemResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkspaceListItemResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkspaceListItemResponse) SetName(v string) { + o.Name = v +} + +// GetDisplayName returns the DisplayName field value +func (o *WorkspaceListItemResponse) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *WorkspaceListItemResponse) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *WorkspaceListItemResponse) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetAdminNames returns the AdminNames field value if set, zero value otherwise. +func (o *WorkspaceListItemResponse) GetAdminNames() []WorkspaceAdminSummary { + if o == nil || IsNil(o.AdminNames) { + var ret []WorkspaceAdminSummary + return ret + } + return o.AdminNames +} + +// GetAdminNamesOk returns a tuple with the AdminNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkspaceListItemResponse) GetAdminNamesOk() ([]WorkspaceAdminSummary, bool) { + if o == nil || IsNil(o.AdminNames) { + return nil, false + } + return o.AdminNames, true +} + +// HasAdminNames returns a boolean if a field has been set. +func (o *WorkspaceListItemResponse) HasAdminNames() bool { + if o != nil && !IsNil(o.AdminNames) { + return true + } + + return false +} + +// SetAdminNames gets a reference to the given []WorkspaceAdminSummary and assigns it to the AdminNames field. +func (o *WorkspaceListItemResponse) SetAdminNames(v []WorkspaceAdminSummary) { + o.AdminNames = v +} + +// GetStartData returns the StartData field value if set, zero value otherwise. +func (o *WorkspaceListItemResponse) GetStartData() string { + if o == nil || IsNil(o.StartData) { + var ret string + return ret + } + return *o.StartData +} + +// GetStartDataOk returns a tuple with the StartData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkspaceListItemResponse) GetStartDataOk() (*string, bool) { + if o == nil || IsNil(o.StartData) { + return nil, false + } + return o.StartData, true +} + +// HasStartData returns a boolean if a field has been set. +func (o *WorkspaceListItemResponse) HasStartData() bool { + if o != nil && !IsNil(o.StartData) { + return true + } + + return false +} + +// SetStartData gets a reference to the given string and assigns it to the StartData field. +func (o *WorkspaceListItemResponse) SetStartData(v string) { + o.StartData = &v +} + +// GetLastUpdateDate returns the LastUpdateDate field value if set, zero value otherwise. +func (o *WorkspaceListItemResponse) GetLastUpdateDate() string { + if o == nil || IsNil(o.LastUpdateDate) { + var ret string + return ret + } + return *o.LastUpdateDate +} + +// GetLastUpdateDateOk returns a tuple with the LastUpdateDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkspaceListItemResponse) GetLastUpdateDateOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateDate) { + return nil, false + } + return o.LastUpdateDate, true +} + +// HasLastUpdateDate returns a boolean if a field has been set. +func (o *WorkspaceListItemResponse) HasLastUpdateDate() bool { + if o != nil && !IsNil(o.LastUpdateDate) { + return true + } + + return false +} + +// SetLastUpdateDate gets a reference to the given string and assigns it to the LastUpdateDate field. +func (o *WorkspaceListItemResponse) SetLastUpdateDate(v string) { + o.LastUpdateDate = &v +} + +// GetInviteLink returns the InviteLink field value if set, zero value otherwise. +func (o *WorkspaceListItemResponse) GetInviteLink() string { + if o == nil || IsNil(o.InviteLink) { + var ret string + return ret + } + return *o.InviteLink +} + +// GetInviteLinkOk returns a tuple with the InviteLink field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkspaceListItemResponse) GetInviteLinkOk() (*string, bool) { + if o == nil || IsNil(o.InviteLink) { + return nil, false + } + return o.InviteLink, true +} + +// HasInviteLink returns a boolean if a field has been set. +func (o *WorkspaceListItemResponse) HasInviteLink() bool { + if o != nil && !IsNil(o.InviteLink) { + return true + } + + return false +} + +// SetInviteLink gets a reference to the given string and assigns it to the InviteLink field. +func (o *WorkspaceListItemResponse) SetInviteLink(v string) { + o.InviteLink = &v +} + +// GetUserWsLevel returns the UserWsLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WorkspaceListItemResponse) GetUserWsLevel() int32 { + if o == nil || IsNil(o.UserWsLevel.Get()) { + var ret int32 + return ret + } + return *o.UserWsLevel.Get() +} + +// GetUserWsLevelOk returns a tuple with the UserWsLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkspaceListItemResponse) GetUserWsLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.UserWsLevel.Get(), o.UserWsLevel.IsSet() +} + +// HasUserWsLevel returns a boolean if a field has been set. +func (o *WorkspaceListItemResponse) HasUserWsLevel() bool { + if o != nil && o.UserWsLevel.IsSet() { + return true + } + + return false +} + +// SetUserWsLevel gets a reference to the given NullableInt32 and assigns it to the UserWsLevel field. +func (o *WorkspaceListItemResponse) SetUserWsLevel(v int32) { + o.UserWsLevel.Set(&v) +} + +// SetUserWsLevelNil sets the value for UserWsLevel to be an explicit nil +func (o *WorkspaceListItemResponse) SetUserWsLevelNil() { + o.UserWsLevel.Set(nil) +} + +// UnsetUserWsLevel ensures that no value is present for UserWsLevel, not even an explicit nil +func (o *WorkspaceListItemResponse) UnsetUserWsLevel() { + o.UserWsLevel.Unset() +} + +// GetUserWsRole returns the UserWsRole field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WorkspaceListItemResponse) GetUserWsRole() string { + if o == nil || IsNil(o.UserWsRole.Get()) { + var ret string + return ret + } + return *o.UserWsRole.Get() +} + +// GetUserWsRoleOk returns a tuple with the UserWsRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkspaceListItemResponse) GetUserWsRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UserWsRole.Get(), o.UserWsRole.IsSet() +} + +// HasUserWsRole returns a boolean if a field has been set. +func (o *WorkspaceListItemResponse) HasUserWsRole() bool { + if o != nil && o.UserWsRole.IsSet() { + return true + } + + return false +} + +// SetUserWsRole gets a reference to the given NullableString and assigns it to the UserWsRole field. +func (o *WorkspaceListItemResponse) SetUserWsRole(v string) { + o.UserWsRole.Set(&v) +} + +// SetUserWsRoleNil sets the value for UserWsRole to be an explicit nil +func (o *WorkspaceListItemResponse) SetUserWsRoleNil() { + o.UserWsRole.Set(nil) +} + +// UnsetUserWsRole ensures that no value is present for UserWsRole, not even an explicit nil +func (o *WorkspaceListItemResponse) UnsetUserWsRole() { + o.UserWsRole.Unset() +} + +func (o WorkspaceListItemResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceListItemResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["display_name"] = o.DisplayName + if !IsNil(o.AdminNames) { + toSerialize["admin_names"] = o.AdminNames + } + if !IsNil(o.StartData) { + toSerialize["start_data"] = o.StartData + } + if !IsNil(o.LastUpdateDate) { + toSerialize["last_update_date"] = o.LastUpdateDate + } + if !IsNil(o.InviteLink) { + toSerialize["invite_link"] = o.InviteLink + } + if o.UserWsLevel.IsSet() { + toSerialize["user_ws_level"] = o.UserWsLevel.Get() + } + if o.UserWsRole.IsSet() { + toSerialize["user_ws_role"] = o.UserWsRole.Get() + } + return toSerialize, nil +} + +func (o *WorkspaceListItemResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "display_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceListItemResponse := _WorkspaceListItemResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceListItemResponse) + + if err != nil { + return err + } + + *o = WorkspaceListItemResponse(varWorkspaceListItemResponse) + + return err +} + +type NullableWorkspaceListItemResponse struct { + value *WorkspaceListItemResponse + isSet bool +} + +func (v NullableWorkspaceListItemResponse) Get() *WorkspaceListItemResponse { + return v.value +} + +func (v *NullableWorkspaceListItemResponse) Set(val *WorkspaceListItemResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceListItemResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceListItemResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceListItemResponse(val *WorkspaceListItemResponse) *NullableWorkspaceListItemResponse { + return &NullableWorkspaceListItemResponse{value: val, isSet: true} +} + +func (v NullableWorkspaceListItemResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceListItemResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_list_paginated_response.go b/go/futureagi/model_workspace_list_paginated_response.go new file mode 100644 index 0000000..f6d7b25 --- /dev/null +++ b/go/futureagi/model_workspace_list_paginated_response.go @@ -0,0 +1,301 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceListPaginatedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceListPaginatedResponse{} + +// WorkspaceListPaginatedResponse struct for WorkspaceListPaginatedResponse +type WorkspaceListPaginatedResponse struct { + Count int32 `json:"count"` + Next NullableString `json:"next"` + Previous NullableString `json:"previous"` + Results []WorkspaceListItemResponse `json:"results"` + TotalPages int32 `json:"total_pages"` + CurrentPage int32 `json:"current_page"` +} + +type _WorkspaceListPaginatedResponse WorkspaceListPaginatedResponse + +// NewWorkspaceListPaginatedResponse instantiates a new WorkspaceListPaginatedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceListPaginatedResponse(count int32, next NullableString, previous NullableString, results []WorkspaceListItemResponse, totalPages int32, currentPage int32) *WorkspaceListPaginatedResponse { + this := WorkspaceListPaginatedResponse{} + this.Count = count + this.Next = next + this.Previous = previous + this.Results = results + this.TotalPages = totalPages + this.CurrentPage = currentPage + return &this +} + +// NewWorkspaceListPaginatedResponseWithDefaults instantiates a new WorkspaceListPaginatedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceListPaginatedResponseWithDefaults() *WorkspaceListPaginatedResponse { + this := WorkspaceListPaginatedResponse{} + return &this +} + +// GetCount returns the Count field value +func (o *WorkspaceListPaginatedResponse) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *WorkspaceListPaginatedResponse) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *WorkspaceListPaginatedResponse) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value +// If the value is explicit nil, the zero value for string will be returned +func (o *WorkspaceListPaginatedResponse) GetNext() string { + if o == nil || o.Next.Get() == nil { + var ret string + return ret + } + + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkspaceListPaginatedResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// SetNext sets field value +func (o *WorkspaceListPaginatedResponse) SetNext(v string) { + o.Next.Set(&v) +} + +// GetPrevious returns the Previous field value +// If the value is explicit nil, the zero value for string will be returned +func (o *WorkspaceListPaginatedResponse) GetPrevious() string { + if o == nil || o.Previous.Get() == nil { + var ret string + return ret + } + + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkspaceListPaginatedResponse) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// SetPrevious sets field value +func (o *WorkspaceListPaginatedResponse) SetPrevious(v string) { + o.Previous.Set(&v) +} + +// GetResults returns the Results field value +func (o *WorkspaceListPaginatedResponse) GetResults() []WorkspaceListItemResponse { + if o == nil { + var ret []WorkspaceListItemResponse + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *WorkspaceListPaginatedResponse) GetResultsOk() ([]WorkspaceListItemResponse, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *WorkspaceListPaginatedResponse) SetResults(v []WorkspaceListItemResponse) { + o.Results = v +} + +// GetTotalPages returns the TotalPages field value +func (o *WorkspaceListPaginatedResponse) GetTotalPages() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *WorkspaceListPaginatedResponse) GetTotalPagesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *WorkspaceListPaginatedResponse) SetTotalPages(v int32) { + o.TotalPages = v +} + +// GetCurrentPage returns the CurrentPage field value +func (o *WorkspaceListPaginatedResponse) GetCurrentPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CurrentPage +} + +// GetCurrentPageOk returns a tuple with the CurrentPage field value +// and a boolean to check if the value has been set. +func (o *WorkspaceListPaginatedResponse) GetCurrentPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CurrentPage, true +} + +// SetCurrentPage sets field value +func (o *WorkspaceListPaginatedResponse) SetCurrentPage(v int32) { + o.CurrentPage = v +} + +func (o WorkspaceListPaginatedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceListPaginatedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["count"] = o.Count + toSerialize["next"] = o.Next.Get() + toSerialize["previous"] = o.Previous.Get() + toSerialize["results"] = o.Results + toSerialize["total_pages"] = o.TotalPages + toSerialize["current_page"] = o.CurrentPage + return toSerialize, nil +} + +func (o *WorkspaceListPaginatedResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "next", + "previous", + "results", + "total_pages", + "current_page", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceListPaginatedResponse := _WorkspaceListPaginatedResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceListPaginatedResponse) + + if err != nil { + return err + } + + *o = WorkspaceListPaginatedResponse(varWorkspaceListPaginatedResponse) + + return err +} + +type NullableWorkspaceListPaginatedResponse struct { + value *WorkspaceListPaginatedResponse + isSet bool +} + +func (v NullableWorkspaceListPaginatedResponse) Get() *WorkspaceListPaginatedResponse { + return v.value +} + +func (v *NullableWorkspaceListPaginatedResponse) Set(val *WorkspaceListPaginatedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceListPaginatedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceListPaginatedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceListPaginatedResponse(val *WorkspaceListPaginatedResponse) *NullableWorkspaceListPaginatedResponse { + return &NullableWorkspaceListPaginatedResponse{value: val, isSet: true} +} + +func (v NullableWorkspaceListPaginatedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceListPaginatedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_member_remove.go b/go/futureagi/model_workspace_member_remove.go new file mode 100644 index 0000000..3c96903 --- /dev/null +++ b/go/futureagi/model_workspace_member_remove.go @@ -0,0 +1,157 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceMemberRemove type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceMemberRemove{} + +// WorkspaceMemberRemove struct for WorkspaceMemberRemove +type WorkspaceMemberRemove struct { + UserId string `json:"user_id"` +} + +type _WorkspaceMemberRemove WorkspaceMemberRemove + +// NewWorkspaceMemberRemove instantiates a new WorkspaceMemberRemove object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceMemberRemove(userId string) *WorkspaceMemberRemove { + this := WorkspaceMemberRemove{} + this.UserId = userId + return &this +} + +// NewWorkspaceMemberRemoveWithDefaults instantiates a new WorkspaceMemberRemove object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceMemberRemoveWithDefaults() *WorkspaceMemberRemove { + this := WorkspaceMemberRemove{} + return &this +} + +// GetUserId returns the UserId field value +func (o *WorkspaceMemberRemove) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRemove) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *WorkspaceMemberRemove) SetUserId(v string) { + o.UserId = v +} + +func (o WorkspaceMemberRemove) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceMemberRemove) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + return toSerialize, nil +} + +func (o *WorkspaceMemberRemove) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceMemberRemove := _WorkspaceMemberRemove{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceMemberRemove) + + if err != nil { + return err + } + + *o = WorkspaceMemberRemove(varWorkspaceMemberRemove) + + return err +} + +type NullableWorkspaceMemberRemove struct { + value *WorkspaceMemberRemove + isSet bool +} + +func (v NullableWorkspaceMemberRemove) Get() *WorkspaceMemberRemove { + return v.value +} + +func (v *NullableWorkspaceMemberRemove) Set(val *WorkspaceMemberRemove) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceMemberRemove) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceMemberRemove) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceMemberRemove(val *WorkspaceMemberRemove) *NullableWorkspaceMemberRemove { + return &NullableWorkspaceMemberRemove{value: val, isSet: true} +} + +func (v NullableWorkspaceMemberRemove) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceMemberRemove) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_member_role_update.go b/go/futureagi/model_workspace_member_role_update.go new file mode 100644 index 0000000..a524611 --- /dev/null +++ b/go/futureagi/model_workspace_member_role_update.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceMemberRoleUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceMemberRoleUpdate{} + +// WorkspaceMemberRoleUpdate struct for WorkspaceMemberRoleUpdate +type WorkspaceMemberRoleUpdate struct { + UserId string `json:"user_id"` + WsLevel int32 `json:"ws_level"` +} + +type _WorkspaceMemberRoleUpdate WorkspaceMemberRoleUpdate + +// NewWorkspaceMemberRoleUpdate instantiates a new WorkspaceMemberRoleUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceMemberRoleUpdate(userId string, wsLevel int32) *WorkspaceMemberRoleUpdate { + this := WorkspaceMemberRoleUpdate{} + this.UserId = userId + this.WsLevel = wsLevel + return &this +} + +// NewWorkspaceMemberRoleUpdateWithDefaults instantiates a new WorkspaceMemberRoleUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceMemberRoleUpdateWithDefaults() *WorkspaceMemberRoleUpdate { + this := WorkspaceMemberRoleUpdate{} + return &this +} + +// GetUserId returns the UserId field value +func (o *WorkspaceMemberRoleUpdate) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdate) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *WorkspaceMemberRoleUpdate) SetUserId(v string) { + o.UserId = v +} + +// GetWsLevel returns the WsLevel field value +func (o *WorkspaceMemberRoleUpdate) GetWsLevel() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.WsLevel +} + +// GetWsLevelOk returns a tuple with the WsLevel field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdate) GetWsLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.WsLevel, true +} + +// SetWsLevel sets field value +func (o *WorkspaceMemberRoleUpdate) SetWsLevel(v int32) { + o.WsLevel = v +} + +func (o WorkspaceMemberRoleUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceMemberRoleUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_id"] = o.UserId + toSerialize["ws_level"] = o.WsLevel + return toSerialize, nil +} + +func (o *WorkspaceMemberRoleUpdate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user_id", + "ws_level", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceMemberRoleUpdate := _WorkspaceMemberRoleUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceMemberRoleUpdate) + + if err != nil { + return err + } + + *o = WorkspaceMemberRoleUpdate(varWorkspaceMemberRoleUpdate) + + return err +} + +type NullableWorkspaceMemberRoleUpdate struct { + value *WorkspaceMemberRoleUpdate + isSet bool +} + +func (v NullableWorkspaceMemberRoleUpdate) Get() *WorkspaceMemberRoleUpdate { + return v.value +} + +func (v *NullableWorkspaceMemberRoleUpdate) Set(val *WorkspaceMemberRoleUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceMemberRoleUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceMemberRoleUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceMemberRoleUpdate(val *WorkspaceMemberRoleUpdate) *NullableWorkspaceMemberRoleUpdate { + return &NullableWorkspaceMemberRoleUpdate{value: val, isSet: true} +} + +func (v NullableWorkspaceMemberRoleUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceMemberRoleUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_member_role_update_response.go b/go/futureagi/model_workspace_member_role_update_response.go new file mode 100644 index 0000000..3a79d0a --- /dev/null +++ b/go/futureagi/model_workspace_member_role_update_response.go @@ -0,0 +1,185 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceMemberRoleUpdateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceMemberRoleUpdateResponse{} + +// WorkspaceMemberRoleUpdateResponse struct for WorkspaceMemberRoleUpdateResponse +type WorkspaceMemberRoleUpdateResponse struct { + Status bool `json:"status"` + Result WorkspaceMemberRoleUpdateResult `json:"result"` +} + +type _WorkspaceMemberRoleUpdateResponse WorkspaceMemberRoleUpdateResponse + +// NewWorkspaceMemberRoleUpdateResponse instantiates a new WorkspaceMemberRoleUpdateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceMemberRoleUpdateResponse(status bool, result WorkspaceMemberRoleUpdateResult) *WorkspaceMemberRoleUpdateResponse { + this := WorkspaceMemberRoleUpdateResponse{} + this.Status = status + this.Result = result + return &this +} + +// NewWorkspaceMemberRoleUpdateResponseWithDefaults instantiates a new WorkspaceMemberRoleUpdateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceMemberRoleUpdateResponseWithDefaults() *WorkspaceMemberRoleUpdateResponse { + this := WorkspaceMemberRoleUpdateResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *WorkspaceMemberRoleUpdateResponse) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdateResponse) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *WorkspaceMemberRoleUpdateResponse) SetStatus(v bool) { + o.Status = v +} + +// GetResult returns the Result field value +func (o *WorkspaceMemberRoleUpdateResponse) GetResult() WorkspaceMemberRoleUpdateResult { + if o == nil { + var ret WorkspaceMemberRoleUpdateResult + return ret + } + + return o.Result +} + +// GetResultOk returns a tuple with the Result field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdateResponse) GetResultOk() (*WorkspaceMemberRoleUpdateResult, bool) { + if o == nil { + return nil, false + } + return &o.Result, true +} + +// SetResult sets field value +func (o *WorkspaceMemberRoleUpdateResponse) SetResult(v WorkspaceMemberRoleUpdateResult) { + o.Result = v +} + +func (o WorkspaceMemberRoleUpdateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceMemberRoleUpdateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["result"] = o.Result + return toSerialize, nil +} + +func (o *WorkspaceMemberRoleUpdateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + "result", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceMemberRoleUpdateResponse := _WorkspaceMemberRoleUpdateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceMemberRoleUpdateResponse) + + if err != nil { + return err + } + + *o = WorkspaceMemberRoleUpdateResponse(varWorkspaceMemberRoleUpdateResponse) + + return err +} + +type NullableWorkspaceMemberRoleUpdateResponse struct { + value *WorkspaceMemberRoleUpdateResponse + isSet bool +} + +func (v NullableWorkspaceMemberRoleUpdateResponse) Get() *WorkspaceMemberRoleUpdateResponse { + return v.value +} + +func (v *NullableWorkspaceMemberRoleUpdateResponse) Set(val *WorkspaceMemberRoleUpdateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceMemberRoleUpdateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceMemberRoleUpdateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceMemberRoleUpdateResponse(val *WorkspaceMemberRoleUpdateResponse) *NullableWorkspaceMemberRoleUpdateResponse { + return &NullableWorkspaceMemberRoleUpdateResponse{value: val, isSet: true} +} + +func (v NullableWorkspaceMemberRoleUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceMemberRoleUpdateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_member_role_update_result.go b/go/futureagi/model_workspace_member_role_update_result.go new file mode 100644 index 0000000..68de393 --- /dev/null +++ b/go/futureagi/model_workspace_member_role_update_result.go @@ -0,0 +1,241 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceMemberRoleUpdateResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceMemberRoleUpdateResult{} + +// WorkspaceMemberRoleUpdateResult struct for WorkspaceMemberRoleUpdateResult +type WorkspaceMemberRoleUpdateResult struct { + Message string `json:"message"` + UserId string `json:"user_id"` + WsLevel int32 `json:"ws_level"` + WsRole string `json:"ws_role"` +} + +type _WorkspaceMemberRoleUpdateResult WorkspaceMemberRoleUpdateResult + +// NewWorkspaceMemberRoleUpdateResult instantiates a new WorkspaceMemberRoleUpdateResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceMemberRoleUpdateResult(message string, userId string, wsLevel int32, wsRole string) *WorkspaceMemberRoleUpdateResult { + this := WorkspaceMemberRoleUpdateResult{} + this.Message = message + this.UserId = userId + this.WsLevel = wsLevel + this.WsRole = wsRole + return &this +} + +// NewWorkspaceMemberRoleUpdateResultWithDefaults instantiates a new WorkspaceMemberRoleUpdateResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceMemberRoleUpdateResultWithDefaults() *WorkspaceMemberRoleUpdateResult { + this := WorkspaceMemberRoleUpdateResult{} + return &this +} + +// GetMessage returns the Message field value +func (o *WorkspaceMemberRoleUpdateResult) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdateResult) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *WorkspaceMemberRoleUpdateResult) SetMessage(v string) { + o.Message = v +} + +// GetUserId returns the UserId field value +func (o *WorkspaceMemberRoleUpdateResult) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdateResult) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *WorkspaceMemberRoleUpdateResult) SetUserId(v string) { + o.UserId = v +} + +// GetWsLevel returns the WsLevel field value +func (o *WorkspaceMemberRoleUpdateResult) GetWsLevel() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.WsLevel +} + +// GetWsLevelOk returns a tuple with the WsLevel field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdateResult) GetWsLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.WsLevel, true +} + +// SetWsLevel sets field value +func (o *WorkspaceMemberRoleUpdateResult) SetWsLevel(v int32) { + o.WsLevel = v +} + +// GetWsRole returns the WsRole field value +func (o *WorkspaceMemberRoleUpdateResult) GetWsRole() string { + if o == nil { + var ret string + return ret + } + + return o.WsRole +} + +// GetWsRoleOk returns a tuple with the WsRole field value +// and a boolean to check if the value has been set. +func (o *WorkspaceMemberRoleUpdateResult) GetWsRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WsRole, true +} + +// SetWsRole sets field value +func (o *WorkspaceMemberRoleUpdateResult) SetWsRole(v string) { + o.WsRole = v +} + +func (o WorkspaceMemberRoleUpdateResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceMemberRoleUpdateResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["user_id"] = o.UserId + toSerialize["ws_level"] = o.WsLevel + toSerialize["ws_role"] = o.WsRole + return toSerialize, nil +} + +func (o *WorkspaceMemberRoleUpdateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "user_id", + "ws_level", + "ws_role", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceMemberRoleUpdateResult := _WorkspaceMemberRoleUpdateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceMemberRoleUpdateResult) + + if err != nil { + return err + } + + *o = WorkspaceMemberRoleUpdateResult(varWorkspaceMemberRoleUpdateResult) + + return err +} + +type NullableWorkspaceMemberRoleUpdateResult struct { + value *WorkspaceMemberRoleUpdateResult + isSet bool +} + +func (v NullableWorkspaceMemberRoleUpdateResult) Get() *WorkspaceMemberRoleUpdateResult { + return v.value +} + +func (v *NullableWorkspaceMemberRoleUpdateResult) Set(val *WorkspaceMemberRoleUpdateResult) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceMemberRoleUpdateResult) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceMemberRoleUpdateResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceMemberRoleUpdateResult(val *WorkspaceMemberRoleUpdateResult) *NullableWorkspaceMemberRoleUpdateResult { + return &NullableWorkspaceMemberRoleUpdateResult{value: val, isSet: true} +} + +func (v NullableWorkspaceMemberRoleUpdateResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceMemberRoleUpdateResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/model_workspace_summary.go b/go/futureagi/model_workspace_summary.go new file mode 100644 index 0000000..6ebfe28 --- /dev/null +++ b/go/futureagi/model_workspace_summary.go @@ -0,0 +1,285 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the WorkspaceSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceSummary{} + +// WorkspaceSummary struct for WorkspaceSummary +type WorkspaceSummary struct { + Id string `json:"id"` + Name string `json:"name"` + DisplayName string `json:"display_name"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +type _WorkspaceSummary WorkspaceSummary + +// NewWorkspaceSummary instantiates a new WorkspaceSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceSummary(id string, name string, displayName string) *WorkspaceSummary { + this := WorkspaceSummary{} + this.Id = id + this.Name = name + this.DisplayName = displayName + return &this +} + +// NewWorkspaceSummaryWithDefaults instantiates a new WorkspaceSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceSummaryWithDefaults() *WorkspaceSummary { + this := WorkspaceSummary{} + return &this +} + +// GetId returns the Id field value +func (o *WorkspaceSummary) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkspaceSummary) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkspaceSummary) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *WorkspaceSummary) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkspaceSummary) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkspaceSummary) SetName(v string) { + o.Name = v +} + +// GetDisplayName returns the DisplayName field value +func (o *WorkspaceSummary) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *WorkspaceSummary) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *WorkspaceSummary) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *WorkspaceSummary) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkspaceSummary) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *WorkspaceSummary) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *WorkspaceSummary) SetDescription(v string) { + o.Description = &v +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *WorkspaceSummary) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkspaceSummary) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *WorkspaceSummary) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *WorkspaceSummary) SetIsDefault(v bool) { + o.IsDefault = &v +} + +func (o WorkspaceSummary) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["display_name"] = o.DisplayName + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + return toSerialize, nil +} + +func (o *WorkspaceSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "display_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceSummary := _WorkspaceSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceSummary) + + if err != nil { + return err + } + + *o = WorkspaceSummary(varWorkspaceSummary) + + return err +} + +type NullableWorkspaceSummary struct { + value *WorkspaceSummary + isSet bool +} + +func (v NullableWorkspaceSummary) Get() *WorkspaceSummary { + return v.value +} + +func (v *NullableWorkspaceSummary) Set(val *WorkspaceSummary) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceSummary(val *WorkspaceSummary) *NullableWorkspaceSummary { + return &NullableWorkspaceSummary{value: val, isSet: true} +} + +func (v NullableWorkspaceSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/go/futureagi/response.go b/go/futureagi/response.go new file mode 100644 index 0000000..3f7c4a8 --- /dev/null +++ b/go/futureagi/response.go @@ -0,0 +1,48 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/go/futureagi/utils.go b/go/futureagi/utils.go new file mode 100644 index 0000000..5b4dd40 --- /dev/null +++ b/go/futureagi/utils.go @@ -0,0 +1,362 @@ +/* +Future AGI Public SDK API + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + +API version: 0.1.0 +Contact: help@futureagi.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package futureagi + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/java/futureagi/.gitignore b/java/futureagi/.gitignore new file mode 100644 index 0000000..81c8833 --- /dev/null +++ b/java/futureagi/.gitignore @@ -0,0 +1,43 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build + +# === Python virtualenvs + caches (added by setup) === +.venv +.venv/ +.venv*/ +**/.venv +**/.venv/ +**/.venv*/ +venv +venv/ +**/venv +**/venv/ +__pycache__/ +**/__pycache__/ +*.pyc +*.pyo +.pytest_cache/ +**/.pytest_cache/ +.ruff_cache/ +**/.ruff_cache/ +.mypy_cache/ +**/.mypy_cache/ diff --git a/java/futureagi/README.md b/java/futureagi/README.md new file mode 100644 index 0000000..648331d --- /dev/null +++ b/java/futureagi/README.md @@ -0,0 +1,1802 @@ +# futureagi-sdk + +Future AGI Public SDK API + +- API version: 0.1.0 + +- Generator version: 7.12.0 + +The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 11+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.futureagi + futureagi-sdk + 0.1.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "com.futureagi:futureagi-sdk:0.1.0" +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/futureagi-sdk-0.1.0.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import com.futureagi.sdk.*; +import com.futureagi.sdk.model.*; +import com.futureagi.sdk.api.AccountsApi; + +public class AccountsApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure clients using the `defaultClient` object, such as + // overriding the host and port, timeout, etc. + AccountsApi apiInstance = new AccountsApi(defaultClient); + MemberRemove memberRemove = new MemberRemove(); // MemberRemove | + try { + MemberUserMutationResponse result = apiInstance.accountsOrganizationMembersReactivateCreate(memberRemove); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsOrganizationMembersReactivateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.futureagi.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountsApi* | [**accountsOrganizationMembersReactivateCreate**](docs/AccountsApi.md#accountsOrganizationMembersReactivateCreate) | **POST** /accounts/organization/members/reactivate/ | POST /accounts/organization/members/reactivate/ +*AccountsApi* | [**accountsOrganizationMembersReactivateCreateWithHttpInfo**](docs/AccountsApi.md#accountsOrganizationMembersReactivateCreateWithHttpInfo) | **POST** /accounts/organization/members/reactivate/ | POST /accounts/organization/members/reactivate/ +*AccountsApi* | [**accountsOrganizationMembersRemoveDelete**](docs/AccountsApi.md#accountsOrganizationMembersRemoveDelete) | **DELETE** /accounts/organization/members/remove/ | DELETE /accounts/organization/members/remove/ +*AccountsApi* | [**accountsOrganizationMembersRemoveDeleteWithHttpInfo**](docs/AccountsApi.md#accountsOrganizationMembersRemoveDeleteWithHttpInfo) | **DELETE** /accounts/organization/members/remove/ | DELETE /accounts/organization/members/remove/ +*AccountsApi* | [**accountsOrganizationMembersRoleCreate**](docs/AccountsApi.md#accountsOrganizationMembersRoleCreate) | **POST** /accounts/organization/members/role/ | POST /accounts/organization/members/role/ +*AccountsApi* | [**accountsOrganizationMembersRoleCreateWithHttpInfo**](docs/AccountsApi.md#accountsOrganizationMembersRoleCreateWithHttpInfo) | **POST** /accounts/organization/members/role/ | POST /accounts/organization/members/role/ +*AccountsApi* | [**accountsWorkspaceMembersRemoveDelete**](docs/AccountsApi.md#accountsWorkspaceMembersRemoveDelete) | **DELETE** /accounts/workspace/{workspace_id}/members/remove/ | DELETE /accounts/workspace/<workspace_id>/members/remove/ +*AccountsApi* | [**accountsWorkspaceMembersRemoveDeleteWithHttpInfo**](docs/AccountsApi.md#accountsWorkspaceMembersRemoveDeleteWithHttpInfo) | **DELETE** /accounts/workspace/{workspace_id}/members/remove/ | DELETE /accounts/workspace/<workspace_id>/members/remove/ +*AccountsApi* | [**accountsWorkspaceMembersRoleCreate**](docs/AccountsApi.md#accountsWorkspaceMembersRoleCreate) | **POST** /accounts/workspace/{workspace_id}/members/role/ | POST /accounts/workspace/<workspace_id>/members/role/ +*AccountsApi* | [**accountsWorkspaceMembersRoleCreateWithHttpInfo**](docs/AccountsApi.md#accountsWorkspaceMembersRoleCreateWithHttpInfo) | **POST** /accounts/workspace/{workspace_id}/members/role/ | POST /accounts/workspace/<workspace_id>/members/role/ +*AlertsApi* | [**bulkMuteAlerts**](docs/AlertsApi.md#bulkMuteAlerts) | **POST** /tracer/user-alerts/bulk-mute/ | +*AlertsApi* | [**bulkMuteAlertsWithHttpInfo**](docs/AlertsApi.md#bulkMuteAlertsWithHttpInfo) | **POST** /tracer/user-alerts/bulk-mute/ | +*AlertsApi* | [**createAlert**](docs/AlertsApi.md#createAlert) | **POST** /tracer/user-alerts/ | +*AlertsApi* | [**createAlertWithHttpInfo**](docs/AlertsApi.md#createAlertWithHttpInfo) | **POST** /tracer/user-alerts/ | +*AlertsApi* | [**deleteAlert**](docs/AlertsApi.md#deleteAlert) | **DELETE** /tracer/user-alerts/{id}/ | +*AlertsApi* | [**deleteAlertWithHttpInfo**](docs/AlertsApi.md#deleteAlertWithHttpInfo) | **DELETE** /tracer/user-alerts/{id}/ | +*AlertsApi* | [**getAlert**](docs/AlertsApi.md#getAlert) | **GET** /tracer/user-alerts/{id}/ | +*AlertsApi* | [**getAlertWithHttpInfo**](docs/AlertsApi.md#getAlertWithHttpInfo) | **GET** /tracer/user-alerts/{id}/ | +*AlertsApi* | [**getAlertDetails**](docs/AlertsApi.md#getAlertDetails) | **GET** /tracer/user-alerts/{id}/details/ | +*AlertsApi* | [**getAlertDetailsWithHttpInfo**](docs/AlertsApi.md#getAlertDetailsWithHttpInfo) | **GET** /tracer/user-alerts/{id}/details/ | +*AlertsApi* | [**getAlertGraph**](docs/AlertsApi.md#getAlertGraph) | **GET** /tracer/user-alerts/{id}/graph/ | Returns time-series data for a monitor's metric, suitable for graphing. +*AlertsApi* | [**getAlertGraphWithHttpInfo**](docs/AlertsApi.md#getAlertGraphWithHttpInfo) | **GET** /tracer/user-alerts/{id}/graph/ | Returns time-series data for a monitor's metric, suitable for graphing. +*AlertsApi* | [**getAlertLog**](docs/AlertsApi.md#getAlertLog) | **GET** /tracer/user-alert-logs/{id}/ | +*AlertsApi* | [**getAlertLogWithHttpInfo**](docs/AlertsApi.md#getAlertLogWithHttpInfo) | **GET** /tracer/user-alert-logs/{id}/ | +*AlertsApi* | [**listAlertLogs**](docs/AlertsApi.md#listAlertLogs) | **GET** /tracer/user-alert-logs/ | +*AlertsApi* | [**listAlertLogsWithHttpInfo**](docs/AlertsApi.md#listAlertLogsWithHttpInfo) | **GET** /tracer/user-alert-logs/ | +*AlertsApi* | [**listAlertLogsForAlert**](docs/AlertsApi.md#listAlertLogsForAlert) | **GET** /tracer/user-alert-logs/{id}/list/ | +*AlertsApi* | [**listAlertLogsForAlertWithHttpInfo**](docs/AlertsApi.md#listAlertLogsForAlertWithHttpInfo) | **GET** /tracer/user-alert-logs/{id}/list/ | +*AlertsApi* | [**listAlertMetricOptions**](docs/AlertsApi.md#listAlertMetricOptions) | **GET** /tracer/user-alerts/metric-options/ | +*AlertsApi* | [**listAlertMetricOptionsWithHttpInfo**](docs/AlertsApi.md#listAlertMetricOptionsWithHttpInfo) | **GET** /tracer/user-alerts/metric-options/ | +*AlertsApi* | [**listAlerts**](docs/AlertsApi.md#listAlerts) | **GET** /tracer/user-alerts/ | +*AlertsApi* | [**listAlertsWithHttpInfo**](docs/AlertsApi.md#listAlertsWithHttpInfo) | **GET** /tracer/user-alerts/ | +*AlertsApi* | [**listAllAlertLogs**](docs/AlertsApi.md#listAllAlertLogs) | **GET** /tracer/user-alert-logs/all/ | +*AlertsApi* | [**listAllAlertLogsWithHttpInfo**](docs/AlertsApi.md#listAllAlertLogsWithHttpInfo) | **GET** /tracer/user-alert-logs/all/ | +*AlertsApi* | [**previewAlertGraph**](docs/AlertsApi.md#previewAlertGraph) | **POST** /tracer/user-alerts/preview-graph/ | +*AlertsApi* | [**previewAlertGraphWithHttpInfo**](docs/AlertsApi.md#previewAlertGraphWithHttpInfo) | **POST** /tracer/user-alerts/preview-graph/ | +*AlertsApi* | [**resolveAlertLogs**](docs/AlertsApi.md#resolveAlertLogs) | **POST** /tracer/user-alert-logs/resolve/ | +*AlertsApi* | [**resolveAlertLogsWithHttpInfo**](docs/AlertsApi.md#resolveAlertLogsWithHttpInfo) | **POST** /tracer/user-alert-logs/resolve/ | +*AlertsApi* | [**updateAlert**](docs/AlertsApi.md#updateAlert) | **PATCH** /tracer/user-alerts/{id}/ | +*AlertsApi* | [**updateAlertWithHttpInfo**](docs/AlertsApi.md#updateAlertWithHttpInfo) | **PATCH** /tracer/user-alerts/{id}/ | +*AnnotationQueueDiscussionApi* | [**createAnnotationQueueItemComment**](docs/AnnotationQueueDiscussionApi.md#createAnnotationQueueItemComment) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +*AnnotationQueueDiscussionApi* | [**createAnnotationQueueItemCommentWithHttpInfo**](docs/AnnotationQueueDiscussionApi.md#createAnnotationQueueItemCommentWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +*AnnotationQueueDiscussionApi* | [**listAnnotationQueueItemDiscussion**](docs/AnnotationQueueDiscussionApi.md#listAnnotationQueueItemDiscussion) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +*AnnotationQueueDiscussionApi* | [**listAnnotationQueueItemDiscussionWithHttpInfo**](docs/AnnotationQueueDiscussionApi.md#listAnnotationQueueItemDiscussionWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | +*AnnotationQueueDiscussionApi* | [**reopenAnnotationQueueItemThread**](docs/AnnotationQueueDiscussionApi.md#reopenAnnotationQueueItemThread) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/ | +*AnnotationQueueDiscussionApi* | [**reopenAnnotationQueueItemThreadWithHttpInfo**](docs/AnnotationQueueDiscussionApi.md#reopenAnnotationQueueItemThreadWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/ | +*AnnotationQueueDiscussionApi* | [**resolveAnnotationQueueItemThread**](docs/AnnotationQueueDiscussionApi.md#resolveAnnotationQueueItemThread) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/ | +*AnnotationQueueDiscussionApi* | [**resolveAnnotationQueueItemThreadWithHttpInfo**](docs/AnnotationQueueDiscussionApi.md#resolveAnnotationQueueItemThreadWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/ | +*AnnotationQueueDiscussionApi* | [**toggleAnnotationQueueItemCommentReaction**](docs/AnnotationQueueDiscussionApi.md#toggleAnnotationQueueItemCommentReaction) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/ | +*AnnotationQueueDiscussionApi* | [**toggleAnnotationQueueItemCommentReactionWithHttpInfo**](docs/AnnotationQueueDiscussionApi.md#toggleAnnotationQueueItemCommentReactionWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/ | +*AnnotationQueueItemsApi* | [**addAnnotationQueueItems**](docs/AnnotationQueueItemsApi.md#addAnnotationQueueItems) | **POST** /model-hub/annotation-queues/{queue_id}/items/add-items/ | +*AnnotationQueueItemsApi* | [**addAnnotationQueueItemsWithHttpInfo**](docs/AnnotationQueueItemsApi.md#addAnnotationQueueItemsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/add-items/ | +*AnnotationQueueItemsApi* | [**assignAnnotationQueueItems**](docs/AnnotationQueueItemsApi.md#assignAnnotationQueueItems) | **POST** /model-hub/annotation-queues/{queue_id}/items/assign/ | +*AnnotationQueueItemsApi* | [**assignAnnotationQueueItemsWithHttpInfo**](docs/AnnotationQueueItemsApi.md#assignAnnotationQueueItemsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/assign/ | +*AnnotationQueueItemsApi* | [**completeAnnotationQueueItem**](docs/AnnotationQueueItemsApi.md#completeAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/complete/ | +*AnnotationQueueItemsApi* | [**completeAnnotationQueueItemWithHttpInfo**](docs/AnnotationQueueItemsApi.md#completeAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/complete/ | +*AnnotationQueueItemsApi* | [**getAnnotationQueueItemDetail**](docs/AnnotationQueueItemsApi.md#getAnnotationQueueItemDetail) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/ | +*AnnotationQueueItemsApi* | [**getAnnotationQueueItemDetailWithHttpInfo**](docs/AnnotationQueueItemsApi.md#getAnnotationQueueItemDetailWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/ | +*AnnotationQueueItemsApi* | [**getNextAnnotationQueueItem**](docs/AnnotationQueueItemsApi.md#getNextAnnotationQueueItem) | **GET** /model-hub/annotation-queues/{queue_id}/items/next-item/ | Get the next or previous item in the queue. +*AnnotationQueueItemsApi* | [**getNextAnnotationQueueItemWithHttpInfo**](docs/AnnotationQueueItemsApi.md#getNextAnnotationQueueItemWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/next-item/ | Get the next or previous item in the queue. +*AnnotationQueueItemsApi* | [**importAnnotationQueueItemAnnotations**](docs/AnnotationQueueItemsApi.md#importAnnotationQueueItemAnnotations) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/ | +*AnnotationQueueItemsApi* | [**importAnnotationQueueItemAnnotationsWithHttpInfo**](docs/AnnotationQueueItemsApi.md#importAnnotationQueueItemAnnotationsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/ | +*AnnotationQueueItemsApi* | [**listAnnotationQueueItemAnnotations**](docs/AnnotationQueueItemsApi.md#listAnnotationQueueItemAnnotations) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/ | +*AnnotationQueueItemsApi* | [**listAnnotationQueueItemAnnotationsWithHttpInfo**](docs/AnnotationQueueItemsApi.md#listAnnotationQueueItemAnnotationsWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/ | +*AnnotationQueueItemsApi* | [**listAnnotationQueueItems**](docs/AnnotationQueueItemsApi.md#listAnnotationQueueItems) | **GET** /model-hub/annotation-queues/{queue_id}/items/ | +*AnnotationQueueItemsApi* | [**listAnnotationQueueItemsWithHttpInfo**](docs/AnnotationQueueItemsApi.md#listAnnotationQueueItemsWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/ | +*AnnotationQueueItemsApi* | [**releaseAnnotationQueueItem**](docs/AnnotationQueueItemsApi.md#releaseAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/release/ | +*AnnotationQueueItemsApi* | [**releaseAnnotationQueueItemWithHttpInfo**](docs/AnnotationQueueItemsApi.md#releaseAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/release/ | +*AnnotationQueueItemsApi* | [**removeAnnotationQueueItems**](docs/AnnotationQueueItemsApi.md#removeAnnotationQueueItems) | **POST** /model-hub/annotation-queues/{queue_id}/items/bulk-remove/ | +*AnnotationQueueItemsApi* | [**removeAnnotationQueueItemsWithHttpInfo**](docs/AnnotationQueueItemsApi.md#removeAnnotationQueueItemsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/bulk-remove/ | +*AnnotationQueueItemsApi* | [**skipAnnotationQueueItem**](docs/AnnotationQueueItemsApi.md#skipAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/skip/ | +*AnnotationQueueItemsApi* | [**skipAnnotationQueueItemWithHttpInfo**](docs/AnnotationQueueItemsApi.md#skipAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/skip/ | +*AnnotationQueueItemsApi* | [**submitAnnotationQueueItemAnnotations**](docs/AnnotationQueueItemsApi.md#submitAnnotationQueueItemAnnotations) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/ | +*AnnotationQueueItemsApi* | [**submitAnnotationQueueItemAnnotationsWithHttpInfo**](docs/AnnotationQueueItemsApi.md#submitAnnotationQueueItemAnnotationsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/ | +*AnnotationQueueReviewApi* | [**reviewAnnotationQueueItem**](docs/AnnotationQueueReviewApi.md#reviewAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/review/ | +*AnnotationQueueReviewApi* | [**reviewAnnotationQueueItemWithHttpInfo**](docs/AnnotationQueueReviewApi.md#reviewAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/review/ | +*AnnotationQueuesApi* | [**addAnnotationQueueLabel**](docs/AnnotationQueuesApi.md#addAnnotationQueueLabel) | **POST** /model-hub/annotation-queues/{id}/add-label/ | +*AnnotationQueuesApi* | [**addAnnotationQueueLabelWithHttpInfo**](docs/AnnotationQueuesApi.md#addAnnotationQueueLabelWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/add-label/ | +*AnnotationQueuesApi* | [**archiveAnnotationQueue**](docs/AnnotationQueuesApi.md#archiveAnnotationQueue) | **DELETE** /model-hub/annotation-queues/{id}/ | Archive a queue (soft delete). +*AnnotationQueuesApi* | [**archiveAnnotationQueueWithHttpInfo**](docs/AnnotationQueuesApi.md#archiveAnnotationQueueWithHttpInfo) | **DELETE** /model-hub/annotation-queues/{id}/ | Archive a queue (soft delete). +*AnnotationQueuesApi* | [**createAnnotationQueue**](docs/AnnotationQueuesApi.md#createAnnotationQueue) | **POST** /model-hub/annotation-queues/ | +*AnnotationQueuesApi* | [**createAnnotationQueueWithHttpInfo**](docs/AnnotationQueuesApi.md#createAnnotationQueueWithHttpInfo) | **POST** /model-hub/annotation-queues/ | +*AnnotationQueuesApi* | [**exportAnnotationQueue**](docs/AnnotationQueuesApi.md#exportAnnotationQueue) | **GET** /model-hub/annotation-queues/{id}/export/ | +*AnnotationQueuesApi* | [**exportAnnotationQueueWithHttpInfo**](docs/AnnotationQueuesApi.md#exportAnnotationQueueWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/export/ | +*AnnotationQueuesApi* | [**exportAnnotationQueueToDataset**](docs/AnnotationQueuesApi.md#exportAnnotationQueueToDataset) | **POST** /model-hub/annotation-queues/{id}/export-to-dataset/ | +*AnnotationQueuesApi* | [**exportAnnotationQueueToDatasetWithHttpInfo**](docs/AnnotationQueuesApi.md#exportAnnotationQueueToDatasetWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/export-to-dataset/ | +*AnnotationQueuesApi* | [**getAnnotationQueue**](docs/AnnotationQueuesApi.md#getAnnotationQueue) | **GET** /model-hub/annotation-queues/{id}/ | +*AnnotationQueuesApi* | [**getAnnotationQueueWithHttpInfo**](docs/AnnotationQueuesApi.md#getAnnotationQueueWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/ | +*AnnotationQueuesApi* | [**getAnnotationQueueAgreement**](docs/AnnotationQueuesApi.md#getAnnotationQueueAgreement) | **GET** /model-hub/annotation-queues/{id}/agreement/ | +*AnnotationQueuesApi* | [**getAnnotationQueueAgreementWithHttpInfo**](docs/AnnotationQueuesApi.md#getAnnotationQueueAgreementWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/agreement/ | +*AnnotationQueuesApi* | [**getAnnotationQueueAnalytics**](docs/AnnotationQueuesApi.md#getAnnotationQueueAnalytics) | **GET** /model-hub/annotation-queues/{id}/analytics/ | +*AnnotationQueuesApi* | [**getAnnotationQueueAnalyticsWithHttpInfo**](docs/AnnotationQueuesApi.md#getAnnotationQueueAnalyticsWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/analytics/ | +*AnnotationQueuesApi* | [**getAnnotationQueueProgress**](docs/AnnotationQueuesApi.md#getAnnotationQueueProgress) | **GET** /model-hub/annotation-queues/{id}/progress/ | +*AnnotationQueuesApi* | [**getAnnotationQueueProgressWithHttpInfo**](docs/AnnotationQueuesApi.md#getAnnotationQueueProgressWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/progress/ | +*AnnotationQueuesApi* | [**listAnnotationQueueExportFields**](docs/AnnotationQueuesApi.md#listAnnotationQueueExportFields) | **GET** /model-hub/annotation-queues/{id}/export-fields/ | +*AnnotationQueuesApi* | [**listAnnotationQueueExportFieldsWithHttpInfo**](docs/AnnotationQueuesApi.md#listAnnotationQueueExportFieldsWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/export-fields/ | +*AnnotationQueuesApi* | [**listAnnotationQueues**](docs/AnnotationQueuesApi.md#listAnnotationQueues) | **GET** /model-hub/annotation-queues/ | +*AnnotationQueuesApi* | [**listAnnotationQueuesWithHttpInfo**](docs/AnnotationQueuesApi.md#listAnnotationQueuesWithHttpInfo) | **GET** /model-hub/annotation-queues/ | +*AnnotationQueuesApi* | [**removeAnnotationQueueLabel**](docs/AnnotationQueuesApi.md#removeAnnotationQueueLabel) | **POST** /model-hub/annotation-queues/{id}/remove-label/ | +*AnnotationQueuesApi* | [**removeAnnotationQueueLabelWithHttpInfo**](docs/AnnotationQueuesApi.md#removeAnnotationQueueLabelWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/remove-label/ | +*AnnotationQueuesApi* | [**updateAnnotationQueue**](docs/AnnotationQueuesApi.md#updateAnnotationQueue) | **PATCH** /model-hub/annotation-queues/{id}/ | +*AnnotationQueuesApi* | [**updateAnnotationQueueWithHttpInfo**](docs/AnnotationQueuesApi.md#updateAnnotationQueueWithHttpInfo) | **PATCH** /model-hub/annotation-queues/{id}/ | +*AnnotationQueuesApi* | [**updateAnnotationQueueStatus**](docs/AnnotationQueuesApi.md#updateAnnotationQueueStatus) | **POST** /model-hub/annotation-queues/{id}/update-status/ | +*AnnotationQueuesApi* | [**updateAnnotationQueueStatusWithHttpInfo**](docs/AnnotationQueuesApi.md#updateAnnotationQueueStatusWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/update-status/ | +*DatasetsApi* | [**addDatasetColumns**](docs/DatasetsApi.md#addDatasetColumns) | **POST** /model-hub/develops/{dataset_id}/add_columns/ | +*DatasetsApi* | [**addDatasetColumnsWithHttpInfo**](docs/DatasetsApi.md#addDatasetColumnsWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_columns/ | +*DatasetsApi* | [**addDatasetRows**](docs/DatasetsApi.md#addDatasetRows) | **POST** /model-hub/develops/{dataset_id}/add_rows/ | +*DatasetsApi* | [**addDatasetRowsWithHttpInfo**](docs/DatasetsApi.md#addDatasetRowsWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_rows/ | +*DatasetsApi* | [**createDatasetFromLocalFile**](docs/DatasetsApi.md#createDatasetFromLocalFile) | **POST** /model-hub/develops/create-dataset-from-local-file/ | +*DatasetsApi* | [**createDatasetFromLocalFileWithHttpInfo**](docs/DatasetsApi.md#createDatasetFromLocalFileWithHttpInfo) | **POST** /model-hub/develops/create-dataset-from-local-file/ | +*DatasetsApi* | [**createDatasetManually**](docs/DatasetsApi.md#createDatasetManually) | **POST** /model-hub/develops/create-dataset-manually/ | +*DatasetsApi* | [**createDatasetManuallyWithHttpInfo**](docs/DatasetsApi.md#createDatasetManuallyWithHttpInfo) | **POST** /model-hub/develops/create-dataset-manually/ | +*DatasetsApi* | [**createEmptyDataset**](docs/DatasetsApi.md#createEmptyDataset) | **POST** /model-hub/develops/create-empty-dataset/ | +*DatasetsApi* | [**createEmptyDatasetWithHttpInfo**](docs/DatasetsApi.md#createEmptyDatasetWithHttpInfo) | **POST** /model-hub/develops/create-empty-dataset/ | +*DatasetsApi* | [**deleteDatasetColumn**](docs/DatasetsApi.md#deleteDatasetColumn) | **DELETE** /model-hub/develops/{dataset_id}/delete_column/{column_id}/ | +*DatasetsApi* | [**deleteDatasetColumnWithHttpInfo**](docs/DatasetsApi.md#deleteDatasetColumnWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_column/{column_id}/ | +*DatasetsApi* | [**deleteDatasetRow**](docs/DatasetsApi.md#deleteDatasetRow) | **DELETE** /model-hub/develops/{dataset_id}/delete_row/ | +*DatasetsApi* | [**deleteDatasetRowWithHttpInfo**](docs/DatasetsApi.md#deleteDatasetRowWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_row/ | +*DatasetsApi* | [**downloadDataset**](docs/DatasetsApi.md#downloadDataset) | **GET** /model-hub/develops/{dataset_id}/download_dataset/ | +*DatasetsApi* | [**downloadDatasetWithHttpInfo**](docs/DatasetsApi.md#downloadDatasetWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/download_dataset/ | +*DatasetsApi* | [**duplicateDataset**](docs/DatasetsApi.md#duplicateDataset) | **POST** /model-hub/datasets/{dataset_id}/duplicate/ | +*DatasetsApi* | [**duplicateDatasetWithHttpInfo**](docs/DatasetsApi.md#duplicateDatasetWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/duplicate/ | +*DatasetsApi* | [**getDatasetAnnotationSummary**](docs/DatasetsApi.md#getDatasetAnnotationSummary) | **GET** /model-hub/dataset/{dataset_id}/annotation-summary/ | +*DatasetsApi* | [**getDatasetAnnotationSummaryWithHttpInfo**](docs/DatasetsApi.md#getDatasetAnnotationSummaryWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/annotation-summary/ | +*DatasetsApi* | [**getDatasetColumns**](docs/DatasetsApi.md#getDatasetColumns) | **GET** /model-hub/dataset/columns/{dataset_id}/ | +*DatasetsApi* | [**getDatasetColumnsWithHttpInfo**](docs/DatasetsApi.md#getDatasetColumnsWithHttpInfo) | **GET** /model-hub/dataset/columns/{dataset_id}/ | +*DatasetsApi* | [**getDatasetEvalStats**](docs/DatasetsApi.md#getDatasetEvalStats) | **GET** /model-hub/dataset/{dataset_id}/eval-stats/ | +*DatasetsApi* | [**getDatasetEvalStatsWithHttpInfo**](docs/DatasetsApi.md#getDatasetEvalStatsWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/eval-stats/ | +*DatasetsApi* | [**getDatasetJsonSchema**](docs/DatasetsApi.md#getDatasetJsonSchema) | **GET** /model-hub/dataset/{dataset_id}/json-schema/ | +*DatasetsApi* | [**getDatasetJsonSchemaWithHttpInfo**](docs/DatasetsApi.md#getDatasetJsonSchemaWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/json-schema/ | +*DatasetsApi* | [**getDatasetRow**](docs/DatasetsApi.md#getDatasetRow) | **POST** /model-hub/develops/{dataset_id}/get-row-data/ | +*DatasetsApi* | [**getDatasetRowWithHttpInfo**](docs/DatasetsApi.md#getDatasetRowWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/get-row-data/ | +*DatasetsApi* | [**getDatasetTable**](docs/DatasetsApi.md#getDatasetTable) | **GET** /model-hub/develops/{dataset_id}/get-dataset-table/ | +*DatasetsApi* | [**getDatasetTableWithHttpInfo**](docs/DatasetsApi.md#getDatasetTableWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/get-dataset-table/ | +*DatasetsApi* | [**listDatasetBaseColumns**](docs/DatasetsApi.md#listDatasetBaseColumns) | **GET** /model-hub/datasets/get-base-columns/ | +*DatasetsApi* | [**listDatasetBaseColumnsWithHttpInfo**](docs/DatasetsApi.md#listDatasetBaseColumnsWithHttpInfo) | **GET** /model-hub/datasets/get-base-columns/ | +*DatasetsApi* | [**listDatasetDerivedVariables**](docs/DatasetsApi.md#listDatasetDerivedVariables) | **GET** /model-hub/datasets/{dataset_id}/derived-variables/ | Get all derived variables from all run prompt columns in a dataset. +*DatasetsApi* | [**listDatasetDerivedVariablesWithHttpInfo**](docs/DatasetsApi.md#listDatasetDerivedVariablesWithHttpInfo) | **GET** /model-hub/datasets/{dataset_id}/derived-variables/ | Get all derived variables from all run prompt columns in a dataset. +*DatasetsApi* | [**listDatasetNames**](docs/DatasetsApi.md#listDatasetNames) | **GET** /model-hub/develops/get-datasets-names/ | +*DatasetsApi* | [**listDatasetNamesWithHttpInfo**](docs/DatasetsApi.md#listDatasetNamesWithHttpInfo) | **GET** /model-hub/develops/get-datasets-names/ | +*DatasetsApi* | [**listDatasets**](docs/DatasetsApi.md#listDatasets) | **GET** /model-hub/develops/get-datasets/ | +*DatasetsApi* | [**listDatasetsWithHttpInfo**](docs/DatasetsApi.md#listDatasetsWithHttpInfo) | **GET** /model-hub/develops/get-datasets/ | +*DatasetsApi* | [**updateDatasetCell**](docs/DatasetsApi.md#updateDatasetCell) | **POST** /model-hub/develops/{dataset_id}/update_cell_value/ | +*DatasetsApi* | [**updateDatasetCellWithHttpInfo**](docs/DatasetsApi.md#updateDatasetCellWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/update_cell_value/ | +*ExperimentsApi* | [**compareExperiments**](docs/ExperimentsApi.md#compareExperiments) | **POST** /model-hub/experiments/v2/{experiment_id}/compare-experiments/ | +*ExperimentsApi* | [**compareExperimentsWithHttpInfo**](docs/ExperimentsApi.md#compareExperimentsWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/compare-experiments/ | +*ExperimentsApi* | [**createExperiment**](docs/ExperimentsApi.md#createExperiment) | **POST** /model-hub/experiments/v2/ | +*ExperimentsApi* | [**createExperimentWithHttpInfo**](docs/ExperimentsApi.md#createExperimentWithHttpInfo) | **POST** /model-hub/experiments/v2/ | +*ExperimentsApi* | [**deleteExperiments**](docs/ExperimentsApi.md#deleteExperiments) | **DELETE** /model-hub/experiments/v2/delete/ | +*ExperimentsApi* | [**deleteExperimentsWithHttpInfo**](docs/ExperimentsApi.md#deleteExperimentsWithHttpInfo) | **DELETE** /model-hub/experiments/v2/delete/ | +*ExperimentsApi* | [**downloadExperiment**](docs/ExperimentsApi.md#downloadExperiment) | **GET** /model-hub/experiments/v2/{experiment_id}/download/ | +*ExperimentsApi* | [**downloadExperimentWithHttpInfo**](docs/ExperimentsApi.md#downloadExperimentWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/download/ | +*ExperimentsApi* | [**getExperiment**](docs/ExperimentsApi.md#getExperiment) | **GET** /model-hub/experiments/v2/{experiment_id}/ | +*ExperimentsApi* | [**getExperimentWithHttpInfo**](docs/ExperimentsApi.md#getExperimentWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/ | +*ExperimentsApi* | [**getExperimentJsonSchema**](docs/ExperimentsApi.md#getExperimentJsonSchema) | **GET** /model-hub/experiments/v2/{experiment_id}/json-schema/ | +*ExperimentsApi* | [**getExperimentJsonSchemaWithHttpInfo**](docs/ExperimentsApi.md#getExperimentJsonSchemaWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/json-schema/ | +*ExperimentsApi* | [**getExperimentRow**](docs/ExperimentsApi.md#getExperimentRow) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/ | +*ExperimentsApi* | [**getExperimentRowWithHttpInfo**](docs/ExperimentsApi.md#getExperimentRowWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/ | +*ExperimentsApi* | [**getExperimentStats**](docs/ExperimentsApi.md#getExperimentStats) | **GET** /model-hub/experiments/v2/{experiment_id}/stats/ | +*ExperimentsApi* | [**getExperimentStatsWithHttpInfo**](docs/ExperimentsApi.md#getExperimentStatsWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/stats/ | +*ExperimentsApi* | [**listExperimentComparisons**](docs/ExperimentsApi.md#listExperimentComparisons) | **GET** /model-hub/experiments/v2/{experiment_id}/comparisons/ | +*ExperimentsApi* | [**listExperimentComparisonsWithHttpInfo**](docs/ExperimentsApi.md#listExperimentComparisonsWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/comparisons/ | +*ExperimentsApi* | [**listExperimentRows**](docs/ExperimentsApi.md#listExperimentRows) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/ | +*ExperimentsApi* | [**listExperimentRowsWithHttpInfo**](docs/ExperimentsApi.md#listExperimentRowsWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/ | +*ExperimentsApi* | [**listExperiments**](docs/ExperimentsApi.md#listExperiments) | **GET** /model-hub/experiments/v2/list/ | +*ExperimentsApi* | [**listExperimentsWithHttpInfo**](docs/ExperimentsApi.md#listExperimentsWithHttpInfo) | **GET** /model-hub/experiments/v2/list/ | +*ExperimentsApi* | [**rerunExperiment**](docs/ExperimentsApi.md#rerunExperiment) | **POST** /model-hub/experiments/v2/re-run/ | V2 re-run: org-scoped, uses V2 Temporal workflow. +*ExperimentsApi* | [**rerunExperimentWithHttpInfo**](docs/ExperimentsApi.md#rerunExperimentWithHttpInfo) | **POST** /model-hub/experiments/v2/re-run/ | V2 re-run: org-scoped, uses V2 Temporal workflow. +*ExperimentsApi* | [**stopExperiment**](docs/ExperimentsApi.md#stopExperiment) | **POST** /model-hub/experiments/v2/{experiment_id}/stop/ | Stop a running V2 experiment. +*ExperimentsApi* | [**stopExperimentWithHttpInfo**](docs/ExperimentsApi.md#stopExperimentWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/stop/ | Stop a running V2 experiment. +*ExperimentsApi* | [**updateExperiment**](docs/ExperimentsApi.md#updateExperiment) | **PUT** /model-hub/experiments/v2/{experiment_id}/ | Update a V2 experiment with diff-based selective re-run. +*ExperimentsApi* | [**updateExperimentWithHttpInfo**](docs/ExperimentsApi.md#updateExperimentWithHttpInfo) | **PUT** /model-hub/experiments/v2/{experiment_id}/ | Update a V2 experiment with diff-based selective re-run. +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesCreate**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesCreate) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesDelete**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesDelete) | **DELETE** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo) | **DELETE** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesEvaluate**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesEvaluate) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/ | Trigger a manual rule run with a sync-or-async branch. +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/ | Trigger a manual rule run with a sync-or-async branch. +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesList**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesList) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesListWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesListWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesPartialUpdate**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPartialUpdate) | **PATCH** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo) | **PATCH** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesPreview**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPreview) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesRead**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesRead) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesUpdate**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesUpdate) | **PUT** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo) | **PUT** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesForSource**](docs/ModelHubApi.md#modelHubAnnotationQueuesForSource) | **GET** /model-hub/annotation-queues/for-source/ | +*ModelHubApi* | [**modelHubAnnotationQueuesForSourceWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesForSourceWithHttpInfo) | **GET** /model-hub/annotation-queues/for-source/ | +*ModelHubApi* | [**modelHubAnnotationQueuesGetOrCreateDefault**](docs/ModelHubApi.md#modelHubAnnotationQueuesGetOrCreateDefault) | **POST** /model-hub/annotation-queues/get-or-create-default/ | +*ModelHubApi* | [**modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo) | **POST** /model-hub/annotation-queues/get-or-create-default/ | +*ModelHubApi* | [**modelHubAnnotationQueuesHardDelete**](docs/ModelHubApi.md#modelHubAnnotationQueuesHardDelete) | **POST** /model-hub/annotation-queues/{id}/hard-delete/ | Permanently remove a queue + everything attached. +*ModelHubApi* | [**modelHubAnnotationQueuesHardDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesHardDeleteWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/hard-delete/ | Permanently remove a queue + everything attached. +*ModelHubApi* | [**modelHubAnnotationQueuesItemsCreate**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsCreate) | **POST** /model-hub/annotation-queues/{queue_id}/items/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsCreateWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsDelete**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsDelete) | **DELETE** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsDeleteWithHttpInfo) | **DELETE** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsPartialUpdate**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsPartialUpdate) | **PATCH** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo) | **PATCH** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsRead**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsRead) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsReadWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsReadWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsUpdate**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsUpdate) | **PUT** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesItemsUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesItemsUpdateWithHttpInfo) | **PUT** /model-hub/annotation-queues/{queue_id}/items/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesRestore**](docs/ModelHubApi.md#modelHubAnnotationQueuesRestore) | **POST** /model-hub/annotation-queues/{id}/restore/ | +*ModelHubApi* | [**modelHubAnnotationQueuesRestoreWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesRestoreWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/restore/ | +*ModelHubApi* | [**modelHubAnnotationQueuesUpdate**](docs/ModelHubApi.md#modelHubAnnotationQueuesUpdate) | **PUT** /model-hub/annotation-queues/{id}/ | +*ModelHubApi* | [**modelHubAnnotationQueuesUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationQueuesUpdateWithHttpInfo) | **PUT** /model-hub/annotation-queues/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsCreate**](docs/ModelHubApi.md#modelHubAnnotationsLabelsCreate) | **POST** /model-hub/annotations-labels/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationsLabelsCreateWithHttpInfo) | **POST** /model-hub/annotations-labels/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsDelete**](docs/ModelHubApi.md#modelHubAnnotationsLabelsDelete) | **DELETE** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationsLabelsDeleteWithHttpInfo) | **DELETE** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsList**](docs/ModelHubApi.md#modelHubAnnotationsLabelsList) | **GET** /model-hub/annotations-labels/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsListWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationsLabelsListWithHttpInfo) | **GET** /model-hub/annotations-labels/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsPartialUpdate**](docs/ModelHubApi.md#modelHubAnnotationsLabelsPartialUpdate) | **PATCH** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsPartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationsLabelsPartialUpdateWithHttpInfo) | **PATCH** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsRead**](docs/ModelHubApi.md#modelHubAnnotationsLabelsRead) | **GET** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsReadWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationsLabelsReadWithHttpInfo) | **GET** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsRestore**](docs/ModelHubApi.md#modelHubAnnotationsLabelsRestore) | **POST** /model-hub/annotations-labels/{id}/restore/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsRestoreWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationsLabelsRestoreWithHttpInfo) | **POST** /model-hub/annotations-labels/{id}/restore/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsUpdate**](docs/ModelHubApi.md#modelHubAnnotationsLabelsUpdate) | **PUT** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubAnnotationsLabelsUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubAnnotationsLabelsUpdateWithHttpInfo) | **PUT** /model-hub/annotations-labels/{id}/ | +*ModelHubApi* | [**modelHubApiKeysCreate**](docs/ModelHubApi.md#modelHubApiKeysCreate) | **POST** /model-hub/api-keys/ | +*ModelHubApi* | [**modelHubApiKeysCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubApiKeysCreateWithHttpInfo) | **POST** /model-hub/api-keys/ | +*ModelHubApi* | [**modelHubApiKeysDelete**](docs/ModelHubApi.md#modelHubApiKeysDelete) | **DELETE** /model-hub/api-keys/{id}/ | Soft-delete an API key. +*ModelHubApi* | [**modelHubApiKeysDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubApiKeysDeleteWithHttpInfo) | **DELETE** /model-hub/api-keys/{id}/ | Soft-delete an API key. +*ModelHubApi* | [**modelHubApiKeysList**](docs/ModelHubApi.md#modelHubApiKeysList) | **GET** /model-hub/api-keys/ | +*ModelHubApi* | [**modelHubApiKeysListWithHttpInfo**](docs/ModelHubApi.md#modelHubApiKeysListWithHttpInfo) | **GET** /model-hub/api-keys/ | +*ModelHubApi* | [**modelHubApiKeysPartialUpdate**](docs/ModelHubApi.md#modelHubApiKeysPartialUpdate) | **PATCH** /model-hub/api-keys/{id}/ | +*ModelHubApi* | [**modelHubApiKeysPartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubApiKeysPartialUpdateWithHttpInfo) | **PATCH** /model-hub/api-keys/{id}/ | +*ModelHubApi* | [**modelHubApiKeysRead**](docs/ModelHubApi.md#modelHubApiKeysRead) | **GET** /model-hub/api-keys/{id}/ | +*ModelHubApi* | [**modelHubApiKeysReadWithHttpInfo**](docs/ModelHubApi.md#modelHubApiKeysReadWithHttpInfo) | **GET** /model-hub/api-keys/{id}/ | +*ModelHubApi* | [**modelHubApiKeysUpdate**](docs/ModelHubApi.md#modelHubApiKeysUpdate) | **PUT** /model-hub/api-keys/{id}/ | +*ModelHubApi* | [**modelHubApiKeysUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubApiKeysUpdateWithHttpInfo) | **PUT** /model-hub/api-keys/{id}/ | +*ModelHubApi* | [**modelHubApiModelsListList**](docs/ModelHubApi.md#modelHubApiModelsListList) | **GET** /model-hub/api/models_list/ | +*ModelHubApi* | [**modelHubApiModelsListListWithHttpInfo**](docs/ModelHubApi.md#modelHubApiModelsListListWithHttpInfo) | **GET** /model-hub/api/models_list/ | +*ModelHubApi* | [**modelHubDatasetRunPromptStatsList**](docs/ModelHubApi.md#modelHubDatasetRunPromptStatsList) | **GET** /model-hub/dataset/{dataset_id}/run-prompt-stats/ | +*ModelHubApi* | [**modelHubDatasetRunPromptStatsListWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetRunPromptStatsListWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/run-prompt-stats/ | +*ModelHubApi* | [**modelHubDatasetsAddApiColumnCreate**](docs/ModelHubApi.md#modelHubDatasetsAddApiColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/add-api-column/ | +*ModelHubApi* | [**modelHubDatasetsAddApiColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsAddApiColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/add-api-column/ | +*ModelHubApi* | [**modelHubDatasetsAddVectorDbColumnCreate**](docs/ModelHubApi.md#modelHubDatasetsAddVectorDbColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/add_vector_db_column/ | +*ModelHubApi* | [**modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/add_vector_db_column/ | +*ModelHubApi* | [**modelHubDatasetsClassifyColumnCreate**](docs/ModelHubApi.md#modelHubDatasetsClassifyColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/classify-column/ | +*ModelHubApi* | [**modelHubDatasetsClassifyColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsClassifyColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/classify-column/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsAddEvalCreate**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsAddEvalCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsCreate**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsDownloadCreate**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsDownloadCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/download/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/download/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsStartEvalCreate**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsStartEvalCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/ | +*ModelHubApi* | [**modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/ | +*ModelHubApi* | [**modelHubDatasetsCompareGetEvalsListCreate**](docs/ModelHubApi.md#modelHubDatasetsCompareGetEvalsListCreate) | **POST** /model-hub/datasets/compare/get-evals-list/ | +*ModelHubApi* | [**modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo) | **POST** /model-hub/datasets/compare/get-evals-list/ | +*ModelHubApi* | [**modelHubDatasetsComparePreviewRunEvalCreate**](docs/ModelHubApi.md#modelHubDatasetsComparePreviewRunEvalCreate) | **POST** /model-hub/datasets/compare/preview-run-eval/ | +*ModelHubApi* | [**modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo) | **POST** /model-hub/datasets/compare/preview-run-eval/ | +*ModelHubApi* | [**modelHubDatasetsCompareStatsCreate**](docs/ModelHubApi.md#modelHubDatasetsCompareStatsCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-stats/ | +*ModelHubApi* | [**modelHubDatasetsCompareStatsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsCompareStatsCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-stats/ | +*ModelHubApi* | [**modelHubDatasetsConditionalColumnCreate**](docs/ModelHubApi.md#modelHubDatasetsConditionalColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/conditional-column/ | +*ModelHubApi* | [**modelHubDatasetsConditionalColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsConditionalColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/conditional-column/ | +*ModelHubApi* | [**modelHubDatasetsDeleteCompareDelete**](docs/ModelHubApi.md#modelHubDatasetsDeleteCompareDelete) | **DELETE** /model-hub/datasets/delete-compare/{compare_id}/ | +*ModelHubApi* | [**modelHubDatasetsDeleteCompareDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsDeleteCompareDeleteWithHttpInfo) | **DELETE** /model-hub/datasets/delete-compare/{compare_id}/ | +*ModelHubApi* | [**modelHubDatasetsDeleteCompareRead**](docs/ModelHubApi.md#modelHubDatasetsDeleteCompareRead) | **GET** /model-hub/datasets/delete-compare/{compare_id}/ | +*ModelHubApi* | [**modelHubDatasetsDeleteCompareReadWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsDeleteCompareReadWithHttpInfo) | **GET** /model-hub/datasets/delete-compare/{compare_id}/ | +*ModelHubApi* | [**modelHubDatasetsDuplicateRowsCreate**](docs/ModelHubApi.md#modelHubDatasetsDuplicateRowsCreate) | **POST** /model-hub/datasets/{dataset_id}/duplicate-rows/ | +*ModelHubApi* | [**modelHubDatasetsDuplicateRowsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsDuplicateRowsCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/duplicate-rows/ | +*ModelHubApi* | [**modelHubDatasetsExplanationSummaryRead**](docs/ModelHubApi.md#modelHubDatasetsExplanationSummaryRead) | **GET** /model-hub/datasets/explanation-summary/{dataset_id}/ | +*ModelHubApi* | [**modelHubDatasetsExplanationSummaryReadWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsExplanationSummaryReadWithHttpInfo) | **GET** /model-hub/datasets/explanation-summary/{dataset_id}/ | +*ModelHubApi* | [**modelHubDatasetsExplanationSummaryRefreshCreate**](docs/ModelHubApi.md#modelHubDatasetsExplanationSummaryRefreshCreate) | **POST** /model-hub/datasets/explanation-summary/{dataset_id}/refresh/ | +*ModelHubApi* | [**modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo) | **POST** /model-hub/datasets/explanation-summary/{dataset_id}/refresh/ | +*ModelHubApi* | [**modelHubDatasetsExtractEntitiesCreate**](docs/ModelHubApi.md#modelHubDatasetsExtractEntitiesCreate) | **POST** /model-hub/datasets/{dataset_id}/extract-entities/ | +*ModelHubApi* | [**modelHubDatasetsExtractEntitiesCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsExtractEntitiesCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/extract-entities/ | +*ModelHubApi* | [**modelHubDatasetsGetCompareRowDelete**](docs/ModelHubApi.md#modelHubDatasetsGetCompareRowDelete) | **DELETE** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +*ModelHubApi* | [**modelHubDatasetsGetCompareRowDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsGetCompareRowDeleteWithHttpInfo) | **DELETE** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +*ModelHubApi* | [**modelHubDatasetsGetCompareRowRead**](docs/ModelHubApi.md#modelHubDatasetsGetCompareRowRead) | **GET** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +*ModelHubApi* | [**modelHubDatasetsGetCompareRowReadWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsGetCompareRowReadWithHttpInfo) | **GET** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | +*ModelHubApi* | [**modelHubDatasetsHuggingfaceDetailCreate**](docs/ModelHubApi.md#modelHubDatasetsHuggingfaceDetailCreate) | **POST** /model-hub/datasets/huggingface/detail/ | +*ModelHubApi* | [**modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo) | **POST** /model-hub/datasets/huggingface/detail/ | +*ModelHubApi* | [**modelHubDatasetsHuggingfaceListCreate**](docs/ModelHubApi.md#modelHubDatasetsHuggingfaceListCreate) | **POST** /model-hub/datasets/huggingface/list/ | +*ModelHubApi* | [**modelHubDatasetsHuggingfaceListCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsHuggingfaceListCreateWithHttpInfo) | **POST** /model-hub/datasets/huggingface/list/ | +*ModelHubApi* | [**modelHubDatasetsMergeCreate**](docs/ModelHubApi.md#modelHubDatasetsMergeCreate) | **POST** /model-hub/datasets/{dataset_id}/merge/ | +*ModelHubApi* | [**modelHubDatasetsMergeCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsMergeCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/merge/ | +*ModelHubApi* | [**modelHubDatasetsPreviewCreate**](docs/ModelHubApi.md#modelHubDatasetsPreviewCreate) | **POST** /model-hub/datasets/{dataset_id}/preview/{operation_type}/ | +*ModelHubApi* | [**modelHubDatasetsPreviewCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDatasetsPreviewCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/preview/{operation_type}/ | +*ModelHubApi* | [**modelHubDeleteEvalTemplateCreate**](docs/ModelHubApi.md#modelHubDeleteEvalTemplateCreate) | **POST** /model-hub/delete-eval-template/ | +*ModelHubApi* | [**modelHubDeleteEvalTemplateCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDeleteEvalTemplateCreateWithHttpInfo) | **POST** /model-hub/delete-eval-template/ | +*ModelHubApi* | [**modelHubDevelopsAddAsNewCreate**](docs/ModelHubApi.md#modelHubDevelopsAddAsNewCreate) | **POST** /model-hub/develops/add-as-new/ | +*ModelHubApi* | [**modelHubDevelopsAddAsNewCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddAsNewCreateWithHttpInfo) | **POST** /model-hub/develops/add-as-new/ | +*ModelHubApi* | [**modelHubDevelopsAddEmptyColumnsCreate**](docs/ModelHubApi.md#modelHubDevelopsAddEmptyColumnsCreate) | **POST** /model-hub/develops/{dataset_id}/add_empty_columns/ | +*ModelHubApi* | [**modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_empty_columns/ | +*ModelHubApi* | [**modelHubDevelopsAddEmptyRowsCreate**](docs/ModelHubApi.md#modelHubDevelopsAddEmptyRowsCreate) | **POST** /model-hub/develops/{dataset_id}/add_empty_rows/ | +*ModelHubApi* | [**modelHubDevelopsAddEmptyRowsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddEmptyRowsCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_empty_rows/ | +*ModelHubApi* | [**modelHubDevelopsAddMultipleStaticColumnsCreate**](docs/ModelHubApi.md#modelHubDevelopsAddMultipleStaticColumnsCreate) | **POST** /model-hub/develops/{dataset_id}/add_multiple_static_columns/ | Add multiple static columns to a dataset at once. +*ModelHubApi* | [**modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_multiple_static_columns/ | Add multiple static columns to a dataset at once. +*ModelHubApi* | [**modelHubDevelopsAddRowsFromExistingDatasetCreate**](docs/ModelHubApi.md#modelHubDevelopsAddRowsFromExistingDatasetCreate) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/ | +*ModelHubApi* | [**modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/ | +*ModelHubApi* | [**modelHubDevelopsAddRowsFromFileCreate**](docs/ModelHubApi.md#modelHubDevelopsAddRowsFromFileCreate) | **POST** /model-hub/develops/add_rows_from_file/ | +*ModelHubApi* | [**modelHubDevelopsAddRowsFromFileCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddRowsFromFileCreateWithHttpInfo) | **POST** /model-hub/develops/add_rows_from_file/ | +*ModelHubApi* | [**modelHubDevelopsAddRowsFromHuggingfaceCreate**](docs/ModelHubApi.md#modelHubDevelopsAddRowsFromHuggingfaceCreate) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_huggingface/ | +*ModelHubApi* | [**modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_huggingface/ | +*ModelHubApi* | [**modelHubDevelopsAddRowsSdkCreate**](docs/ModelHubApi.md#modelHubDevelopsAddRowsSdkCreate) | **POST** /model-hub/develops/add_rows_sdk/ | +*ModelHubApi* | [**modelHubDevelopsAddRowsSdkCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddRowsSdkCreateWithHttpInfo) | **POST** /model-hub/develops/add_rows_sdk/ | +*ModelHubApi* | [**modelHubDevelopsAddRunPromptColumnCreate**](docs/ModelHubApi.md#modelHubDevelopsAddRunPromptColumnCreate) | **POST** /model-hub/develops/add_run_prompt_column/ | +*ModelHubApi* | [**modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo) | **POST** /model-hub/develops/add_run_prompt_column/ | +*ModelHubApi* | [**modelHubDevelopsAddStaticColumnCreate**](docs/ModelHubApi.md#modelHubDevelopsAddStaticColumnCreate) | **POST** /model-hub/develops/{dataset_id}/add_static_column/ | +*ModelHubApi* | [**modelHubDevelopsAddStaticColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddStaticColumnCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_static_column/ | +*ModelHubApi* | [**modelHubDevelopsAddSyntheticDataCreate**](docs/ModelHubApi.md#modelHubDevelopsAddSyntheticDataCreate) | **POST** /model-hub/develops/{dataset_id}/add_synthetic_data/ | +*ModelHubApi* | [**modelHubDevelopsAddSyntheticDataCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddSyntheticDataCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_synthetic_data/ | +*ModelHubApi* | [**modelHubDevelopsAddUserEvalCreate**](docs/ModelHubApi.md#modelHubDevelopsAddUserEvalCreate) | **POST** /model-hub/develops/{dataset_id}/add_user_eval/ | +*ModelHubApi* | [**modelHubDevelopsAddUserEvalCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsAddUserEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_user_eval/ | +*ModelHubApi* | [**modelHubDevelopsCloneDatasetCreate**](docs/ModelHubApi.md#modelHubDevelopsCloneDatasetCreate) | **POST** /model-hub/develops/clone-dataset/{dataset_id}/ | +*ModelHubApi* | [**modelHubDevelopsCloneDatasetCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsCloneDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/clone-dataset/{dataset_id}/ | +*ModelHubApi* | [**modelHubDevelopsCreateDatasetCreate**](docs/ModelHubApi.md#modelHubDevelopsCreateDatasetCreate) | **POST** /model-hub/develops/{exp_dataset_id}/create-dataset/ | +*ModelHubApi* | [**modelHubDevelopsCreateDatasetCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsCreateDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/{exp_dataset_id}/create-dataset/ | +*ModelHubApi* | [**modelHubDevelopsCreateDatasetFromHuggingfaceCreate**](docs/ModelHubApi.md#modelHubDevelopsCreateDatasetFromHuggingfaceCreate) | **POST** /model-hub/develops/create-dataset-from-huggingface/ | +*ModelHubApi* | [**modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo) | **POST** /model-hub/develops/create-dataset-from-huggingface/ | +*ModelHubApi* | [**modelHubDevelopsCreateSyntheticDatasetCreate**](docs/ModelHubApi.md#modelHubDevelopsCreateSyntheticDatasetCreate) | **POST** /model-hub/develops/create-synthetic-dataset/ | +*ModelHubApi* | [**modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/create-synthetic-dataset/ | +*ModelHubApi* | [**modelHubDevelopsDatasetCreationProgressRead**](docs/ModelHubApi.md#modelHubDevelopsDatasetCreationProgressRead) | **GET** /model-hub/develops/dataset-creation-progress/{dataset_id}/ | +*ModelHubApi* | [**modelHubDevelopsDatasetCreationProgressReadWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsDatasetCreationProgressReadWithHttpInfo) | **GET** /model-hub/develops/dataset-creation-progress/{dataset_id}/ | +*ModelHubApi* | [**modelHubDevelopsDeleteDatasetDelete**](docs/ModelHubApi.md#modelHubDevelopsDeleteDatasetDelete) | **DELETE** /model-hub/develops/delete_dataset/ | +*ModelHubApi* | [**modelHubDevelopsDeleteDatasetDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsDeleteDatasetDeleteWithHttpInfo) | **DELETE** /model-hub/develops/delete_dataset/ | +*ModelHubApi* | [**modelHubDevelopsDeleteTemplateEvalDelete**](docs/ModelHubApi.md#modelHubDevelopsDeleteTemplateEvalDelete) | **DELETE** /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsDeleteUserEvalDelete**](docs/ModelHubApi.md#modelHubDevelopsDeleteUserEvalDelete) | **DELETE** /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsEditAndRunUserEvalCreate**](docs/ModelHubApi.md#modelHubDevelopsEditAndRunUserEvalCreate) | **POST** /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsEditDatasetBehaviorUpdate**](docs/ModelHubApi.md#modelHubDevelopsEditDatasetBehaviorUpdate) | **PUT** /model-hub/develops/{dataset_id}/edit_dataset_behavior/ | +*ModelHubApi* | [**modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/edit_dataset_behavior/ | +*ModelHubApi* | [**modelHubDevelopsEditRunPromptColumnCreate**](docs/ModelHubApi.md#modelHubDevelopsEditRunPromptColumnCreate) | **POST** /model-hub/develops/edit_run_prompt_column/ | +*ModelHubApi* | [**modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo) | **POST** /model-hub/develops/edit_run_prompt_column/ | +*ModelHubApi* | [**modelHubDevelopsExtractJsonColumnCreate**](docs/ModelHubApi.md#modelHubDevelopsExtractJsonColumnCreate) | **POST** /model-hub/develops/{dataset_id}/extract-json-column/ | +*ModelHubApi* | [**modelHubDevelopsExtractJsonColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsExtractJsonColumnCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/extract-json-column/ | +*ModelHubApi* | [**modelHubDevelopsGetCellDataCreate**](docs/ModelHubApi.md#modelHubDevelopsGetCellDataCreate) | **POST** /model-hub/develops/get-cell-data/ | +*ModelHubApi* | [**modelHubDevelopsGetCellDataCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetCellDataCreateWithHttpInfo) | **POST** /model-hub/develops/get-cell-data/ | +*ModelHubApi* | [**modelHubDevelopsGetDerivedDatasetsRead**](docs/ModelHubApi.md#modelHubDevelopsGetDerivedDatasetsRead) | **GET** /model-hub/develops/get-derived-datasets/{dataset_id}/ | +*ModelHubApi* | [**modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo) | **GET** /model-hub/develops/get-derived-datasets/{dataset_id}/ | +*ModelHubApi* | [**modelHubDevelopsGetEvalStructureRead**](docs/ModelHubApi.md#modelHubDevelopsGetEvalStructureRead) | **GET** /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsGetEvalStructureReadWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetEvalStructureReadWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/ | +*ModelHubApi* | [**modelHubDevelopsGetEvalsListList**](docs/ModelHubApi.md#modelHubDevelopsGetEvalsListList) | **GET** /model-hub/develops/{dataset_id}/get_evals_list/ | +*ModelHubApi* | [**modelHubDevelopsGetEvalsListListWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetEvalsListListWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/get_evals_list/ | +*ModelHubApi* | [**modelHubDevelopsGetExperimentDatasetTableList**](docs/ModelHubApi.md#modelHubDevelopsGetExperimentDatasetTableList) | **GET** /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/ | +*ModelHubApi* | [**modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo) | **GET** /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/ | +*ModelHubApi* | [**modelHubDevelopsGetFunctionListList**](docs/ModelHubApi.md#modelHubDevelopsGetFunctionListList) | **GET** /model-hub/develops/get_function_list/ | +*ModelHubApi* | [**modelHubDevelopsGetFunctionListListWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetFunctionListListWithHttpInfo) | **GET** /model-hub/develops/get_function_list/ | +*ModelHubApi* | [**modelHubDevelopsGetHuggingfaceDatasetConfigCreate**](docs/ModelHubApi.md#modelHubDevelopsGetHuggingfaceDatasetConfigCreate) | **POST** /model-hub/develops/get-huggingface-dataset-config/ | +*ModelHubApi* | [**modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo) | **POST** /model-hub/develops/get-huggingface-dataset-config/ | +*ModelHubApi* | [**modelHubDevelopsGetRowDiffCreate**](docs/ModelHubApi.md#modelHubDevelopsGetRowDiffCreate) | **POST** /model-hub/develops/get-row-diff/ | +*ModelHubApi* | [**modelHubDevelopsGetRowDiffCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsGetRowDiffCreateWithHttpInfo) | **POST** /model-hub/develops/get-row-diff/ | +*ModelHubApi* | [**modelHubDevelopsPreviewRunEvalCreate**](docs/ModelHubApi.md#modelHubDevelopsPreviewRunEvalCreate) | **POST** /model-hub/develops/{dataset_id}/preview_run_eval/ | +*ModelHubApi* | [**modelHubDevelopsPreviewRunEvalCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsPreviewRunEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/preview_run_eval/ | +*ModelHubApi* | [**modelHubDevelopsPreviewRunPromptColumnCreate**](docs/ModelHubApi.md#modelHubDevelopsPreviewRunPromptColumnCreate) | **POST** /model-hub/develops/preview_run_prompt_column/ | +*ModelHubApi* | [**modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo) | **POST** /model-hub/develops/preview_run_prompt_column/ | +*ModelHubApi* | [**modelHubDevelopsProviderStatusList**](docs/ModelHubApi.md#modelHubDevelopsProviderStatusList) | **GET** /model-hub/develops/provider-status/ | +*ModelHubApi* | [**modelHubDevelopsProviderStatusListWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsProviderStatusListWithHttpInfo) | **GET** /model-hub/develops/provider-status/ | +*ModelHubApi* | [**modelHubDevelopsRetrieveRunPromptColumnConfigList**](docs/ModelHubApi.md#modelHubDevelopsRetrieveRunPromptColumnConfigList) | **GET** /model-hub/develops/retrieve_run_prompt_column_config/ | +*ModelHubApi* | [**modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo) | **GET** /model-hub/develops/retrieve_run_prompt_column_config/ | +*ModelHubApi* | [**modelHubDevelopsRetrieveRunPromptOptionsList**](docs/ModelHubApi.md#modelHubDevelopsRetrieveRunPromptOptionsList) | **GET** /model-hub/develops/retrieve_run_prompt_options/ | +*ModelHubApi* | [**modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo) | **GET** /model-hub/develops/retrieve_run_prompt_options/ | +*ModelHubApi* | [**modelHubDevelopsStartEvalsProcessCreate**](docs/ModelHubApi.md#modelHubDevelopsStartEvalsProcessCreate) | **POST** /model-hub/develops/{dataset_id}/start_evals_process/ | +*ModelHubApi* | [**modelHubDevelopsStartEvalsProcessCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsStartEvalsProcessCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/start_evals_process/ | +*ModelHubApi* | [**modelHubDevelopsStopUserEvalCreate**](docs/ModelHubApi.md#modelHubDevelopsStopUserEvalCreate) | **POST** /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/ | POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. +*ModelHubApi* | [**modelHubDevelopsStopUserEvalCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsStopUserEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/ | POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. +*ModelHubApi* | [**modelHubDevelopsSyntheticConfigList**](docs/ModelHubApi.md#modelHubDevelopsSyntheticConfigList) | **GET** /model-hub/develops/{dataset_id}/synthetic-config/ | +*ModelHubApi* | [**modelHubDevelopsSyntheticConfigListWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsSyntheticConfigListWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/synthetic-config/ | +*ModelHubApi* | [**modelHubDevelopsUpdateColumnNameUpdate**](docs/ModelHubApi.md#modelHubDevelopsUpdateColumnNameUpdate) | **PUT** /model-hub/develops/{dataset_id}/update_column_name/{column_id}/ | +*ModelHubApi* | [**modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/update_column_name/{column_id}/ | +*ModelHubApi* | [**modelHubDevelopsUpdateColumnTypeUpdate**](docs/ModelHubApi.md#modelHubDevelopsUpdateColumnTypeUpdate) | **PUT** /model-hub/develops/{dataset_id}/update_column_type/{column_id}/ | +*ModelHubApi* | [**modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/update_column_type/{column_id}/ | +*ModelHubApi* | [**modelHubDevelopsUpdateSyntheticConfigUpdate**](docs/ModelHubApi.md#modelHubDevelopsUpdateSyntheticConfigUpdate) | **PUT** /model-hub/develops/{dataset_id}/update-synthetic-config/ | +*ModelHubApi* | [**modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/update-synthetic-config/ | +*ModelHubApi* | [**modelHubEvalTemplatesBulkDeleteCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesBulkDeleteCreate) | **POST** /model-hub/eval-templates/bulk-delete/ | POST /model-hub/eval-templates/bulk-delete/ +*ModelHubApi* | [**modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo) | **POST** /model-hub/eval-templates/bulk-delete/ | POST /model-hub/eval-templates/bulk-delete/ +*ModelHubApi* | [**modelHubEvalTemplatesCompositeExecuteAdhocCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteAdhocCreate) | **POST** /model-hub/eval-templates/composite/execute-adhoc/ | POST /model-hub/eval-templates/composite/execute-adhoc/ +*ModelHubApi* | [**modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo) | **POST** /model-hub/eval-templates/composite/execute-adhoc/ | POST /model-hub/eval-templates/composite/execute-adhoc/ +*ModelHubApi* | [**modelHubEvalTemplatesCompositeExecuteCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteCreate) | **POST** /model-hub/eval-templates/{template_id}/composite/execute/ | POST /model-hub/eval-templates/<template_id>/composite/execute/ +*ModelHubApi* | [**modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/composite/execute/ | POST /model-hub/eval-templates/<template_id>/composite/execute/ +*ModelHubApi* | [**modelHubEvalTemplatesCompositeList**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositeList) | **GET** /model-hub/eval-templates/{template_id}/composite/ | GET /model-hub/eval-templates/<id>/composite/ +*ModelHubApi* | [**modelHubEvalTemplatesCompositeListWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositeListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/composite/ | GET /model-hub/eval-templates/<id>/composite/ +*ModelHubApi* | [**modelHubEvalTemplatesCompositePartialUpdate**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositePartialUpdate) | **PATCH** /model-hub/eval-templates/{template_id}/composite/ | PATCH — partial update of a composite eval. +*ModelHubApi* | [**modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo) | **PATCH** /model-hub/eval-templates/{template_id}/composite/ | PATCH — partial update of a composite eval. +*ModelHubApi* | [**modelHubEvalTemplatesCreateCompositeCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesCreateCompositeCreate) | **POST** /model-hub/eval-templates/create-composite/ | POST /model-hub/eval-templates/create-composite/ +*ModelHubApi* | [**modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo) | **POST** /model-hub/eval-templates/create-composite/ | POST /model-hub/eval-templates/create-composite/ +*ModelHubApi* | [**modelHubEvalTemplatesCreateV2Create**](docs/ModelHubApi.md#modelHubEvalTemplatesCreateV2Create) | **POST** /model-hub/eval-templates/create-v2/ | POST /model-hub/eval-templates/create-v2/ +*ModelHubApi* | [**modelHubEvalTemplatesCreateV2CreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesCreateV2CreateWithHttpInfo) | **POST** /model-hub/eval-templates/create-v2/ | POST /model-hub/eval-templates/create-v2/ +*ModelHubApi* | [**modelHubEvalTemplatesDetailList**](docs/ModelHubApi.md#modelHubEvalTemplatesDetailList) | **GET** /model-hub/eval-templates/{template_id}/detail/ | GET /model-hub/eval-templates/<id>/detail/ +*ModelHubApi* | [**modelHubEvalTemplatesDetailListWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesDetailListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/detail/ | GET /model-hub/eval-templates/<id>/detail/ +*ModelHubApi* | [**modelHubEvalTemplatesFeedbackListList**](docs/ModelHubApi.md#modelHubEvalTemplatesFeedbackListList) | **GET** /model-hub/eval-templates/{template_id}/feedback-list/ | GET /model-hub/eval-templates/<id>/feedback-list/ +*ModelHubApi* | [**modelHubEvalTemplatesFeedbackListListWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesFeedbackListListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/feedback-list/ | GET /model-hub/eval-templates/<id>/feedback-list/ +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthConfigList**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigList) | **GET** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthConfigUpdate**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigUpdate) | **PUT** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo) | **PUT** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthList**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthList) | **GET** /model-hub/eval-templates/{template_id}/ground-truth/ | +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthListWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/ground-truth/ | +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthUploadCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthUploadCreate) | **POST** /model-hub/eval-templates/{template_id}/ground-truth/upload/ | POST /model-hub/eval-templates/<id>/ground-truth/upload/ +*ModelHubApi* | [**modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/ground-truth/upload/ | POST /model-hub/eval-templates/<id>/ground-truth/upload/ +*ModelHubApi* | [**modelHubEvalTemplatesListChartsCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesListChartsCreate) | **POST** /model-hub/eval-templates/list-charts/ | POST /model-hub/eval-templates/list-charts/ +*ModelHubApi* | [**modelHubEvalTemplatesListChartsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesListChartsCreateWithHttpInfo) | **POST** /model-hub/eval-templates/list-charts/ | POST /model-hub/eval-templates/list-charts/ +*ModelHubApi* | [**modelHubEvalTemplatesListCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesListCreate) | **POST** /model-hub/eval-templates/list/ | POST /model-hub/eval-templates/list/ +*ModelHubApi* | [**modelHubEvalTemplatesListCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesListCreateWithHttpInfo) | **POST** /model-hub/eval-templates/list/ | POST /model-hub/eval-templates/list/ +*ModelHubApi* | [**modelHubEvalTemplatesUpdateUpdate**](docs/ModelHubApi.md#modelHubEvalTemplatesUpdateUpdate) | **PUT** /model-hub/eval-templates/{template_id}/update/ | PUT /model-hub/eval-templates/<id>/update/ +*ModelHubApi* | [**modelHubEvalTemplatesUpdateUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesUpdateUpdateWithHttpInfo) | **PUT** /model-hub/eval-templates/{template_id}/update/ | PUT /model-hub/eval-templates/<id>/update/ +*ModelHubApi* | [**modelHubEvalTemplatesUsageList**](docs/ModelHubApi.md#modelHubEvalTemplatesUsageList) | **GET** /model-hub/eval-templates/{template_id}/usage/ | GET /model-hub/eval-templates/<id>/usage/ +*ModelHubApi* | [**modelHubEvalTemplatesUsageListWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesUsageListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/usage/ | GET /model-hub/eval-templates/<id>/usage/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsCreateCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsCreateCreate) | **POST** /model-hub/eval-templates/{template_id}/versions/create/ | POST /model-hub/eval-templates/<id>/versions/create/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/versions/create/ | POST /model-hub/eval-templates/<id>/versions/create/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsList**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsList) | **GET** /model-hub/eval-templates/{template_id}/versions/ | GET /model-hub/eval-templates/<id>/versions/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsListWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/versions/ | GET /model-hub/eval-templates/<id>/versions/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsRestoreCreate**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsRestoreCreate) | **POST** /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/ | POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/ | POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsSetDefaultUpdate**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsSetDefaultUpdate) | **PUT** /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/ | PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ +*ModelHubApi* | [**modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo) | **PUT** /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/ | PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ +*ModelHubApi* | [**modelHubExperimentsV2DerivedVariablesList**](docs/ModelHubApi.md#modelHubExperimentsV2DerivedVariablesList) | **GET** /model-hub/experiments/v2/{experiment_id}/derived-variables/ | +*ModelHubApi* | [**modelHubExperimentsV2DerivedVariablesListWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2DerivedVariablesListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/derived-variables/ | +*ModelHubApi* | [**modelHubExperimentsV2EvaluationsStatsList**](docs/ModelHubApi.md#modelHubExperimentsV2EvaluationsStatsList) | **GET** /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/ | +*ModelHubApi* | [**modelHubExperimentsV2EvaluationsStatsListWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2EvaluationsStatsListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackCreate**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackCreate) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackGetFeedbackDetailsList**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackGetFeedbackDetailsList) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackGetTemplateList**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackGetTemplateList) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-template/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-template/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackSubmitFeedbackCreate**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackSubmitFeedbackCreate) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/ | +*ModelHubApi* | [**modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/ | +*ModelHubApi* | [**modelHubExperimentsV2RerunCellsCreate**](docs/ModelHubApi.md#modelHubExperimentsV2RerunCellsCreate) | **POST** /model-hub/experiments/v2/{experiment_id}/rerun-cells/ | Rerun specific cells or columns in a V2 experiment. +*ModelHubApi* | [**modelHubExperimentsV2RerunCellsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2RerunCellsCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/rerun-cells/ | Rerun specific cells or columns in a V2 experiment. +*ModelHubApi* | [**modelHubExperimentsV2RowDiffCreate**](docs/ModelHubApi.md#modelHubExperimentsV2RowDiffCreate) | **POST** /model-hub/experiments/v2/row-diff/ | +*ModelHubApi* | [**modelHubExperimentsV2RowDiffCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2RowDiffCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/row-diff/ | +*ModelHubApi* | [**modelHubExperimentsV2SuggestNameRead**](docs/ModelHubApi.md#modelHubExperimentsV2SuggestNameRead) | **GET** /model-hub/experiments/v2/suggest-name/{dataset_id}/ | +*ModelHubApi* | [**modelHubExperimentsV2SuggestNameReadWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2SuggestNameReadWithHttpInfo) | **GET** /model-hub/experiments/v2/suggest-name/{dataset_id}/ | +*ModelHubApi* | [**modelHubExperimentsV2ValidateNameList**](docs/ModelHubApi.md#modelHubExperimentsV2ValidateNameList) | **GET** /model-hub/experiments/v2/validate-name/ | +*ModelHubApi* | [**modelHubExperimentsV2ValidateNameListWithHttpInfo**](docs/ModelHubApi.md#modelHubExperimentsV2ValidateNameListWithHttpInfo) | **GET** /model-hub/experiments/v2/validate-name/ | +*ModelHubApi* | [**modelHubKnowledgeBaseCreate**](docs/ModelHubApi.md#modelHubKnowledgeBaseCreate) | **POST** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubKnowledgeBaseCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBaseCreateWithHttpInfo) | **POST** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubKnowledgeBaseDelete**](docs/ModelHubApi.md#modelHubKnowledgeBaseDelete) | **DELETE** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubKnowledgeBaseDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBaseDeleteWithHttpInfo) | **DELETE** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubKnowledgeBaseFilesCreate**](docs/ModelHubApi.md#modelHubKnowledgeBaseFilesCreate) | **POST** /model-hub/knowledge-base/files/ | +*ModelHubApi* | [**modelHubKnowledgeBaseFilesCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBaseFilesCreateWithHttpInfo) | **POST** /model-hub/knowledge-base/files/ | +*ModelHubApi* | [**modelHubKnowledgeBaseFilesDelete**](docs/ModelHubApi.md#modelHubKnowledgeBaseFilesDelete) | **DELETE** /model-hub/knowledge-base/files/ | +*ModelHubApi* | [**modelHubKnowledgeBaseFilesDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBaseFilesDeleteWithHttpInfo) | **DELETE** /model-hub/knowledge-base/files/ | +*ModelHubApi* | [**modelHubKnowledgeBaseGetList**](docs/ModelHubApi.md#modelHubKnowledgeBaseGetList) | **GET** /model-hub/knowledge-base/get/ | +*ModelHubApi* | [**modelHubKnowledgeBaseGetListWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBaseGetListWithHttpInfo) | **GET** /model-hub/knowledge-base/get/ | +*ModelHubApi* | [**modelHubKnowledgeBaseList**](docs/ModelHubApi.md#modelHubKnowledgeBaseList) | **GET** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubKnowledgeBaseListWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBaseListWithHttpInfo) | **GET** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubKnowledgeBaseListList**](docs/ModelHubApi.md#modelHubKnowledgeBaseListList) | **GET** /model-hub/knowledge-base/list/ | +*ModelHubApi* | [**modelHubKnowledgeBaseListListWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBaseListListWithHttpInfo) | **GET** /model-hub/knowledge-base/list/ | +*ModelHubApi* | [**modelHubKnowledgeBasePartialUpdate**](docs/ModelHubApi.md#modelHubKnowledgeBasePartialUpdate) | **PATCH** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubKnowledgeBasePartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubKnowledgeBasePartialUpdateWithHttpInfo) | **PATCH** /model-hub/knowledge-base/ | +*ModelHubApi* | [**modelHubPromptHistoryExecutionsGetExecutionDetails**](docs/ModelHubApi.md#modelHubPromptHistoryExecutionsGetExecutionDetails) | **GET** /model-hub/prompt-history-executions/execution-details/{execution_id}/ | +*ModelHubApi* | [**modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo) | **GET** /model-hub/prompt-history-executions/execution-details/{execution_id}/ | +*ModelHubApi* | [**modelHubPromptHistoryExecutionsList**](docs/ModelHubApi.md#modelHubPromptHistoryExecutionsList) | **GET** /model-hub/prompt-history-executions/ | +*ModelHubApi* | [**modelHubPromptHistoryExecutionsListWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptHistoryExecutionsListWithHttpInfo) | **GET** /model-hub/prompt-history-executions/ | +*ModelHubApi* | [**modelHubPromptHistoryExecutionsRead**](docs/ModelHubApi.md#modelHubPromptHistoryExecutionsRead) | **GET** /model-hub/prompt-history-executions/{id}/ | +*ModelHubApi* | [**modelHubPromptHistoryExecutionsReadWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptHistoryExecutionsReadWithHttpInfo) | **GET** /model-hub/prompt-history-executions/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsAssignLabelById**](docs/ModelHubApi.md#modelHubPromptLabelsAssignLabelById) | **POST** /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/ | +*ModelHubApi* | [**modelHubPromptLabelsAssignLabelByIdWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsAssignLabelByIdWithHttpInfo) | **POST** /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/ | +*ModelHubApi* | [**modelHubPromptLabelsAssignMultipleLabels**](docs/ModelHubApi.md#modelHubPromptLabelsAssignMultipleLabels) | **POST** /model-hub/prompt-labels/assign-multiple-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo) | **POST** /model-hub/prompt-labels/assign-multiple-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsCreate**](docs/ModelHubApi.md#modelHubPromptLabelsCreate) | **POST** /model-hub/prompt-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsCreateWithHttpInfo) | **POST** /model-hub/prompt-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsCreateSystemLabels**](docs/ModelHubApi.md#modelHubPromptLabelsCreateSystemLabels) | **POST** /model-hub/prompt-labels/create-system-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsCreateSystemLabelsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsCreateSystemLabelsWithHttpInfo) | **POST** /model-hub/prompt-labels/create-system-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsDelete**](docs/ModelHubApi.md#modelHubPromptLabelsDelete) | **DELETE** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsDeleteWithHttpInfo) | **DELETE** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsGetByName**](docs/ModelHubApi.md#modelHubPromptLabelsGetByName) | **GET** /model-hub/prompt-labels/get-by-name/ | Fetch a prompt version by template name and either explicit version or label. +*ModelHubApi* | [**modelHubPromptLabelsGetByNameWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsGetByNameWithHttpInfo) | **GET** /model-hub/prompt-labels/get-by-name/ | Fetch a prompt version by template name and either explicit version or label. +*ModelHubApi* | [**modelHubPromptLabelsList**](docs/ModelHubApi.md#modelHubPromptLabelsList) | **GET** /model-hub/prompt-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsListWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsListWithHttpInfo) | **GET** /model-hub/prompt-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsPartialUpdate**](docs/ModelHubApi.md#modelHubPromptLabelsPartialUpdate) | **PATCH** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsPartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsPartialUpdateWithHttpInfo) | **PATCH** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsRead**](docs/ModelHubApi.md#modelHubPromptLabelsRead) | **GET** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsReadWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsReadWithHttpInfo) | **GET** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsRemoveLabelFromVersion**](docs/ModelHubApi.md#modelHubPromptLabelsRemoveLabelFromVersion) | **POST** /model-hub/prompt-labels/remove/ | +*ModelHubApi* | [**modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo) | **POST** /model-hub/prompt-labels/remove/ | +*ModelHubApi* | [**modelHubPromptLabelsSetDefault**](docs/ModelHubApi.md#modelHubPromptLabelsSetDefault) | **POST** /model-hub/prompt-labels/set-default/ | +*ModelHubApi* | [**modelHubPromptLabelsSetDefaultWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsSetDefaultWithHttpInfo) | **POST** /model-hub/prompt-labels/set-default/ | +*ModelHubApi* | [**modelHubPromptLabelsTemplateLabels**](docs/ModelHubApi.md#modelHubPromptLabelsTemplateLabels) | **GET** /model-hub/prompt-labels/template-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsTemplateLabelsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsTemplateLabelsWithHttpInfo) | **GET** /model-hub/prompt-labels/template-labels/ | +*ModelHubApi* | [**modelHubPromptLabelsUpdate**](docs/ModelHubApi.md#modelHubPromptLabelsUpdate) | **PUT** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptLabelsUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptLabelsUpdateWithHttpInfo) | **PUT** /model-hub/prompt-labels/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesAddNewDraft**](docs/ModelHubApi.md#modelHubPromptTemplatesAddNewDraft) | **POST** /model-hub/prompt-templates/{id}/add-new-draft/ | +*ModelHubApi* | [**modelHubPromptTemplatesAddNewDraftWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesAddNewDraftWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/add-new-draft/ | +*ModelHubApi* | [**modelHubPromptTemplatesAnalyzePrompt**](docs/ModelHubApi.md#modelHubPromptTemplatesAnalyzePrompt) | **POST** /model-hub/prompt-templates/analyze-prompt/ | +*ModelHubApi* | [**modelHubPromptTemplatesAnalyzePromptWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesAnalyzePromptWithHttpInfo) | **POST** /model-hub/prompt-templates/analyze-prompt/ | +*ModelHubApi* | [**modelHubPromptTemplatesBulkDelete**](docs/ModelHubApi.md#modelHubPromptTemplatesBulkDelete) | **POST** /model-hub/prompt-templates/bulk-delete/ | +*ModelHubApi* | [**modelHubPromptTemplatesBulkDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesBulkDeleteWithHttpInfo) | **POST** /model-hub/prompt-templates/bulk-delete/ | +*ModelHubApi* | [**modelHubPromptTemplatesCommit**](docs/ModelHubApi.md#modelHubPromptTemplatesCommit) | **POST** /model-hub/prompt-templates/{id}/commit/ | +*ModelHubApi* | [**modelHubPromptTemplatesCommitWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesCommitWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/commit/ | +*ModelHubApi* | [**modelHubPromptTemplatesCompareVersions**](docs/ModelHubApi.md#modelHubPromptTemplatesCompareVersions) | **POST** /model-hub/prompt-templates/{id}/compare-versions/ | +*ModelHubApi* | [**modelHubPromptTemplatesCompareVersionsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesCompareVersionsWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/compare-versions/ | +*ModelHubApi* | [**modelHubPromptTemplatesCreate**](docs/ModelHubApi.md#modelHubPromptTemplatesCreate) | **POST** /model-hub/prompt-templates/ | +*ModelHubApi* | [**modelHubPromptTemplatesCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesCreateWithHttpInfo) | **POST** /model-hub/prompt-templates/ | +*ModelHubApi* | [**modelHubPromptTemplatesCreateDraft**](docs/ModelHubApi.md#modelHubPromptTemplatesCreateDraft) | **POST** /model-hub/prompt-templates/create-draft/ | +*ModelHubApi* | [**modelHubPromptTemplatesCreateDraftWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesCreateDraftWithHttpInfo) | **POST** /model-hub/prompt-templates/create-draft/ | +*ModelHubApi* | [**modelHubPromptTemplatesDelete**](docs/ModelHubApi.md#modelHubPromptTemplatesDelete) | **DELETE** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesDeleteWithHttpInfo) | **DELETE** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesDeleteEvaluationConfig**](docs/ModelHubApi.md#modelHubPromptTemplatesDeleteEvaluationConfig) | **DELETE** /model-hub/prompt-templates/{id}/delete-evaluation-config/ | Delete an evaluation configuration by name from a PromptTemplate. +*ModelHubApi* | [**modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo) | **DELETE** /model-hub/prompt-templates/{id}/delete-evaluation-config/ | Delete an evaluation configuration by name from a PromptTemplate. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesExtractCreate**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesExtractCreate) | **POST** /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/ | Manually trigger extraction of derived variables from outputs. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo) | **POST** /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/ | Manually trigger extraction of derived variables from outputs. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesList**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesList) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/ | Get all derived variables for a prompt template. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesListWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesListWithHttpInfo) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/ | Get all derived variables for a prompt template. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesPreviewCreate**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesPreviewCreate) | **POST** /model-hub/prompt-templates/derived-variables/preview/ | Preview derived variables from JSON content without saving. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo) | **POST** /model-hub/prompt-templates/derived-variables/preview/ | Preview derived variables from JSON content without saving. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesSchemaList**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesSchemaList) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/ | Get the schema for derived variables of a specific column. +*ModelHubApi* | [**modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/ | Get the schema for derived variables of a specific column. +*ModelHubApi* | [**modelHubPromptTemplatesGeneratePrompt**](docs/ModelHubApi.md#modelHubPromptTemplatesGeneratePrompt) | **POST** /model-hub/prompt-templates/generate-prompt/ | +*ModelHubApi* | [**modelHubPromptTemplatesGeneratePromptWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGeneratePromptWithHttpInfo) | **POST** /model-hub/prompt-templates/generate-prompt/ | +*ModelHubApi* | [**modelHubPromptTemplatesGenerateVariables**](docs/ModelHubApi.md#modelHubPromptTemplatesGenerateVariables) | **POST** /model-hub/prompt-templates/generate-variables/ | Generate synthetic data for prompt variables using the SyntheticDataAgent. +*ModelHubApi* | [**modelHubPromptTemplatesGenerateVariablesWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGenerateVariablesWithHttpInfo) | **POST** /model-hub/prompt-templates/generate-variables/ | Generate synthetic data for prompt variables using the SyntheticDataAgent. +*ModelHubApi* | [**modelHubPromptTemplatesGetAllVariables**](docs/ModelHubApi.md#modelHubPromptTemplatesGetAllVariables) | **GET** /model-hub/prompt-templates/{id}/all-variables/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetAllVariablesWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGetAllVariablesWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/all-variables/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetEvaluationConfigs**](docs/ModelHubApi.md#modelHubPromptTemplatesGetEvaluationConfigs) | **GET** /model-hub/prompt-templates/{id}/evaluation-configs/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/evaluation-configs/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetNextVersion**](docs/ModelHubApi.md#modelHubPromptTemplatesGetNextVersion) | **GET** /model-hub/prompt-templates/{id}/get-next-version/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetNextVersionWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGetNextVersionWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/get-next-version/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetRunStatus**](docs/ModelHubApi.md#modelHubPromptTemplatesGetRunStatus) | **GET** /model-hub/prompt-templates/{id}/get-run-status/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetRunStatusWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGetRunStatusWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/get-run-status/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetSdkCode**](docs/ModelHubApi.md#modelHubPromptTemplatesGetSdkCode) | **GET** /model-hub/prompt-templates/{id}/get-sdk-code/{language}/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetSdkCodeWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGetSdkCodeWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/get-sdk-code/{language}/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetTemplateByName**](docs/ModelHubApi.md#modelHubPromptTemplatesGetTemplateByName) | **GET** /model-hub/prompt-templates/get-template-by-name/ | +*ModelHubApi* | [**modelHubPromptTemplatesGetTemplateByNameWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesGetTemplateByNameWithHttpInfo) | **GET** /model-hub/prompt-templates/get-template-by-name/ | +*ModelHubApi* | [**modelHubPromptTemplatesImprovePrompt**](docs/ModelHubApi.md#modelHubPromptTemplatesImprovePrompt) | **POST** /model-hub/prompt-templates/improve-prompt/ | +*ModelHubApi* | [**modelHubPromptTemplatesImprovePromptWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesImprovePromptWithHttpInfo) | **POST** /model-hub/prompt-templates/improve-prompt/ | +*ModelHubApi* | [**modelHubPromptTemplatesList**](docs/ModelHubApi.md#modelHubPromptTemplatesList) | **GET** /model-hub/prompt-templates/ | +*ModelHubApi* | [**modelHubPromptTemplatesListWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesListWithHttpInfo) | **GET** /model-hub/prompt-templates/ | +*ModelHubApi* | [**modelHubPromptTemplatesPartialUpdate**](docs/ModelHubApi.md#modelHubPromptTemplatesPartialUpdate) | **PATCH** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesPartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesPartialUpdateWithHttpInfo) | **PATCH** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesRead**](docs/ModelHubApi.md#modelHubPromptTemplatesRead) | **GET** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesReadWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesReadWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesRetrieveEvaluations**](docs/ModelHubApi.md#modelHubPromptTemplatesRetrieveEvaluations) | **GET** /model-hub/prompt-templates/{id}/evaluations/ | +*ModelHubApi* | [**modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/evaluations/ | +*ModelHubApi* | [**modelHubPromptTemplatesRunEvalsOnMultipleVersions**](docs/ModelHubApi.md#modelHubPromptTemplatesRunEvalsOnMultipleVersions) | **POST** /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/ | +*ModelHubApi* | [**modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/ | +*ModelHubApi* | [**modelHubPromptTemplatesRunTemplate**](docs/ModelHubApi.md#modelHubPromptTemplatesRunTemplate) | **POST** /model-hub/prompt-templates/{id}/run_template/ | +*ModelHubApi* | [**modelHubPromptTemplatesRunTemplateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesRunTemplateWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/run_template/ | +*ModelHubApi* | [**modelHubPromptTemplatesSaveName**](docs/ModelHubApi.md#modelHubPromptTemplatesSaveName) | **POST** /model-hub/prompt-templates/{id}/save-name/ | +*ModelHubApi* | [**modelHubPromptTemplatesSaveNameWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesSaveNameWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/save-name/ | +*ModelHubApi* | [**modelHubPromptTemplatesSavePromptFolder**](docs/ModelHubApi.md#modelHubPromptTemplatesSavePromptFolder) | **POST** /model-hub/prompt-templates/{id}/save-prompt-folder/ | +*ModelHubApi* | [**modelHubPromptTemplatesSavePromptFolderWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesSavePromptFolderWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/save-prompt-folder/ | +*ModelHubApi* | [**modelHubPromptTemplatesSetDefault**](docs/ModelHubApi.md#modelHubPromptTemplatesSetDefault) | **POST** /model-hub/prompt-templates/{id}/set_default/ | +*ModelHubApi* | [**modelHubPromptTemplatesSetDefaultWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesSetDefaultWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/set_default/ | +*ModelHubApi* | [**modelHubPromptTemplatesStopStreaming**](docs/ModelHubApi.md#modelHubPromptTemplatesStopStreaming) | **GET** /model-hub/prompt-templates/{id}/stop-streaming/ | +*ModelHubApi* | [**modelHubPromptTemplatesStopStreamingWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesStopStreamingWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/stop-streaming/ | +*ModelHubApi* | [**modelHubPromptTemplatesUpdate**](docs/ModelHubApi.md#modelHubPromptTemplatesUpdate) | **PUT** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesUpdateWithHttpInfo) | **PUT** /model-hub/prompt-templates/{id}/ | +*ModelHubApi* | [**modelHubPromptTemplatesUpdateEvaluationConfigs**](docs/ModelHubApi.md#modelHubPromptTemplatesUpdateEvaluationConfigs) | **POST** /model-hub/prompt-templates/{id}/update-evaluation-configs/ | Add or update evaluation configurations for a PromptTemplate. +*ModelHubApi* | [**modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/update-evaluation-configs/ | Add or update evaluation configurations for a PromptTemplate. +*ModelHubApi* | [**modelHubPromptTemplatesVersions**](docs/ModelHubApi.md#modelHubPromptTemplatesVersions) | **GET** /model-hub/prompt-templates/{id}/versions/ | +*ModelHubApi* | [**modelHubPromptTemplatesVersionsWithHttpInfo**](docs/ModelHubApi.md#modelHubPromptTemplatesVersionsWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/versions/ | +*ModelHubApi* | [**modelHubScoresBulkCreate**](docs/ModelHubApi.md#modelHubScoresBulkCreate) | **POST** /model-hub/scores/bulk/ | +*ModelHubApi* | [**modelHubScoresBulkCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresBulkCreateWithHttpInfo) | **POST** /model-hub/scores/bulk/ | +*ModelHubApi* | [**modelHubScoresCreate**](docs/ModelHubApi.md#modelHubScoresCreate) | **POST** /model-hub/scores/ | +*ModelHubApi* | [**modelHubScoresCreateWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresCreateWithHttpInfo) | **POST** /model-hub/scores/ | +*ModelHubApi* | [**modelHubScoresDelete**](docs/ModelHubApi.md#modelHubScoresDelete) | **DELETE** /model-hub/scores/{id}/ | Soft-delete a score. +*ModelHubApi* | [**modelHubScoresDeleteWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresDeleteWithHttpInfo) | **DELETE** /model-hub/scores/{id}/ | Soft-delete a score. +*ModelHubApi* | [**modelHubScoresForSource**](docs/ModelHubApi.md#modelHubScoresForSource) | **GET** /model-hub/scores/for-source/ | +*ModelHubApi* | [**modelHubScoresForSourceWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresForSourceWithHttpInfo) | **GET** /model-hub/scores/for-source/ | +*ModelHubApi* | [**modelHubScoresList**](docs/ModelHubApi.md#modelHubScoresList) | **GET** /model-hub/scores/ | Universal Score CRUD. +*ModelHubApi* | [**modelHubScoresListWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresListWithHttpInfo) | **GET** /model-hub/scores/ | Universal Score CRUD. +*ModelHubApi* | [**modelHubScoresPartialUpdate**](docs/ModelHubApi.md#modelHubScoresPartialUpdate) | **PATCH** /model-hub/scores/{id}/ | Universal Score CRUD. +*ModelHubApi* | [**modelHubScoresPartialUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresPartialUpdateWithHttpInfo) | **PATCH** /model-hub/scores/{id}/ | Universal Score CRUD. +*ModelHubApi* | [**modelHubScoresRead**](docs/ModelHubApi.md#modelHubScoresRead) | **GET** /model-hub/scores/{id}/ | Universal Score CRUD. +*ModelHubApi* | [**modelHubScoresReadWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresReadWithHttpInfo) | **GET** /model-hub/scores/{id}/ | Universal Score CRUD. +*ModelHubApi* | [**modelHubScoresUpdate**](docs/ModelHubApi.md#modelHubScoresUpdate) | **PUT** /model-hub/scores/{id}/ | Universal Score CRUD. +*ModelHubApi* | [**modelHubScoresUpdateWithHttpInfo**](docs/ModelHubApi.md#modelHubScoresUpdateWithHttpInfo) | **PUT** /model-hub/scores/{id}/ | Universal Score CRUD. +*RunTestsEvalConfigsApi* | [**simulateRunTestsEvalConfigsCreate**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsCreate) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/ | Add evaluation configurations +*RunTestsEvalConfigsApi* | [**simulateRunTestsEvalConfigsCreateWithHttpInfo**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/ | Add evaluation configurations +*RunTestsEvalConfigsApi* | [**simulateRunTestsEvalConfigsDelete**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsDelete) | **DELETE** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/ | Delete evaluation configuration +*RunTestsEvalConfigsApi* | [**simulateRunTestsEvalConfigsDeleteWithHttpInfo**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsDeleteWithHttpInfo) | **DELETE** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/ | Delete evaluation configuration +*RunTestsEvalConfigsApi* | [**simulateRunTestsEvalConfigsUpdateCreate**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsUpdateCreate) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/ | Update evaluation configuration +*RunTestsEvalConfigsApi* | [**simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/ | Update evaluation configuration +*RunTestsEvalConfigsApi* | [**simulateRunTestsRunNewEvalsCreate**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsRunNewEvalsCreate) | **POST** /simulate/run-tests/{run_test_id}/run-new-evals/ | Run new evaluations on test executions +*RunTestsEvalConfigsApi* | [**simulateRunTestsRunNewEvalsCreateWithHttpInfo**](docs/RunTestsEvalConfigsApi.md#simulateRunTestsRunNewEvalsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/run-new-evals/ | Run new evaluations on test executions +*RunTestsEvalSummaryApi* | [**simulateRunTestsEvalSummaryComparisonList**](docs/RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryComparisonList) | **GET** /simulate/run-tests/{run_test_id}/eval-summary-comparison/ | Compare evaluation summaries +*RunTestsEvalSummaryApi* | [**simulateRunTestsEvalSummaryComparisonListWithHttpInfo**](docs/RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryComparisonListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/eval-summary-comparison/ | Compare evaluation summaries +*RunTestsEvalSummaryApi* | [**simulateRunTestsEvalSummaryList**](docs/RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryList) | **GET** /simulate/run-tests/{run_test_id}/eval-summary/ | Get evaluation summary +*RunTestsEvalSummaryApi* | [**simulateRunTestsEvalSummaryListWithHttpInfo**](docs/RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/eval-summary/ | Get evaluation summary +*ScenariosApi* | [**simulateScenariosAddColumnsCreate**](docs/ScenariosApi.md#simulateScenariosAddColumnsCreate) | **POST** /simulate/scenarios/{scenario_id}/add-columns/ | Add columns to scenario +*ScenariosApi* | [**simulateScenariosAddColumnsCreateWithHttpInfo**](docs/ScenariosApi.md#simulateScenariosAddColumnsCreateWithHttpInfo) | **POST** /simulate/scenarios/{scenario_id}/add-columns/ | Add columns to scenario +*ScenariosApi* | [**simulateScenariosAddRowsCreate**](docs/ScenariosApi.md#simulateScenariosAddRowsCreate) | **POST** /simulate/scenarios/{scenario_id}/add-rows/ | Add rows to scenario +*ScenariosApi* | [**simulateScenariosAddRowsCreateWithHttpInfo**](docs/ScenariosApi.md#simulateScenariosAddRowsCreateWithHttpInfo) | **POST** /simulate/scenarios/{scenario_id}/add-rows/ | Add rows to scenario +*ScenariosApi* | [**simulateScenariosGetColumnsList**](docs/ScenariosApi.md#simulateScenariosGetColumnsList) | **GET** /simulate/scenarios/get-columns/ | List scenarios +*ScenariosApi* | [**simulateScenariosGetColumnsListWithHttpInfo**](docs/ScenariosApi.md#simulateScenariosGetColumnsListWithHttpInfo) | **GET** /simulate/scenarios/get-columns/ | List scenarios +*ScenariosApi* | [**simulateScenariosPromptsUpdate**](docs/ScenariosApi.md#simulateScenariosPromptsUpdate) | **PUT** /simulate/scenarios/{scenario_id}/prompts/ | Edit scenario prompts +*ScenariosApi* | [**simulateScenariosPromptsUpdateWithHttpInfo**](docs/ScenariosApi.md#simulateScenariosPromptsUpdateWithHttpInfo) | **PUT** /simulate/scenarios/{scenario_id}/prompts/ | Edit scenario prompts +*SdkApi* | [**sdkApiV1ConfigureEvaluationsCreate**](docs/SdkApi.md#sdkApiV1ConfigureEvaluationsCreate) | **POST** /sdk/api/v1/configure-evaluations/ | +*SdkApi* | [**sdkApiV1ConfigureEvaluationsCreateWithHttpInfo**](docs/SdkApi.md#sdkApiV1ConfigureEvaluationsCreateWithHttpInfo) | **POST** /sdk/api/v1/configure-evaluations/ | +*SdkApi* | [**sdkApiV1EvalCreate**](docs/SdkApi.md#sdkApiV1EvalCreate) | **POST** /sdk/api/v1/eval/ | +*SdkApi* | [**sdkApiV1EvalCreateWithHttpInfo**](docs/SdkApi.md#sdkApiV1EvalCreateWithHttpInfo) | **POST** /sdk/api/v1/eval/ | +*SdkApi* | [**sdkApiV1EvalRead**](docs/SdkApi.md#sdkApiV1EvalRead) | **GET** /sdk/api/v1/eval/{eval_id}/ | +*SdkApi* | [**sdkApiV1EvalReadWithHttpInfo**](docs/SdkApi.md#sdkApiV1EvalReadWithHttpInfo) | **GET** /sdk/api/v1/eval/{eval_id}/ | +*SdkApi* | [**sdkApiV1EvaluatePipelineCreate**](docs/SdkApi.md#sdkApiV1EvaluatePipelineCreate) | **POST** /sdk/api/v1/evaluate-pipeline/ | +*SdkApi* | [**sdkApiV1EvaluatePipelineCreateWithHttpInfo**](docs/SdkApi.md#sdkApiV1EvaluatePipelineCreateWithHttpInfo) | **POST** /sdk/api/v1/evaluate-pipeline/ | +*SdkApi* | [**sdkApiV1EvaluatePipelineList**](docs/SdkApi.md#sdkApiV1EvaluatePipelineList) | **GET** /sdk/api/v1/evaluate-pipeline/ | +*SdkApi* | [**sdkApiV1EvaluatePipelineListWithHttpInfo**](docs/SdkApi.md#sdkApiV1EvaluatePipelineListWithHttpInfo) | **GET** /sdk/api/v1/evaluate-pipeline/ | +*SdkApi* | [**sdkApiV1GetEvalsList**](docs/SdkApi.md#sdkApiV1GetEvalsList) | **GET** /sdk/api/v1/get-evals/ | +*SdkApi* | [**sdkApiV1GetEvalsListWithHttpInfo**](docs/SdkApi.md#sdkApiV1GetEvalsListWithHttpInfo) | **GET** /sdk/api/v1/get-evals/ | +*SdkApi* | [**sdkApiV1NewEvalCreate**](docs/SdkApi.md#sdkApiV1NewEvalCreate) | **POST** /sdk/api/v1/new-eval/ | +*SdkApi* | [**sdkApiV1NewEvalCreateWithHttpInfo**](docs/SdkApi.md#sdkApiV1NewEvalCreateWithHttpInfo) | **POST** /sdk/api/v1/new-eval/ | +*SdkApi* | [**sdkApiV1NewEvalList**](docs/SdkApi.md#sdkApiV1NewEvalList) | **GET** /sdk/api/v1/new-eval/ | +*SdkApi* | [**sdkApiV1NewEvalListWithHttpInfo**](docs/SdkApi.md#sdkApiV1NewEvalListWithHttpInfo) | **GET** /sdk/api/v1/new-eval/ | +*SimulateApi* | [**simulateAgentDefinitionsDelete**](docs/SimulateApi.md#simulateAgentDefinitionsDelete) | **DELETE** /simulate/agent-definitions/ | +*SimulateApi* | [**simulateAgentDefinitionsDeleteWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsDeleteWithHttpInfo) | **DELETE** /simulate/agent-definitions/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsActivateCreate**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsActivateCreate) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsCallExecutionsList**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsCallExecutionsList) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsCreateCreate**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsCreateCreate) | **POST** /simulate/agent-definitions/{agent_id}/versions/create/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo) | **POST** /simulate/agent-definitions/{agent_id}/versions/create/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsDeleteDelete**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsDeleteDelete) | **DELETE** /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsEvalSummaryList**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsEvalSummaryList) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsList**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsList) | **GET** /simulate/agent-definitions/{agent_id}/versions/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsListWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsListWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsRead**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsRead) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsReadWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsReadWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsRestoreCreate**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsRestoreCreate) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/ | +*SimulateApi* | [**simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo**](docs/SimulateApi.md#simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/ | +*SimulateApi* | [**simulateApiCallExecutionsList**](docs/SimulateApi.md#simulateApiCallExecutionsList) | **GET** /simulate/api/call-executions/ | +*SimulateApi* | [**simulateApiCallExecutionsListWithHttpInfo**](docs/SimulateApi.md#simulateApiCallExecutionsListWithHttpInfo) | **GET** /simulate/api/call-executions/ | +*SimulateApi* | [**simulateApiPersonasDuplicate**](docs/SimulateApi.md#simulateApiPersonasDuplicate) | **POST** /simulate/api/personas/{id}/duplicate/ | +*SimulateApi* | [**simulateApiPersonasDuplicateWithHttpInfo**](docs/SimulateApi.md#simulateApiPersonasDuplicateWithHttpInfo) | **POST** /simulate/api/personas/{id}/duplicate/ | +*SimulateApi* | [**simulateApiPersonasDuplicateCreate**](docs/SimulateApi.md#simulateApiPersonasDuplicateCreate) | **POST** /simulate/api/personas/duplicate/{persona_id}/ | +*SimulateApi* | [**simulateApiPersonasDuplicateCreateWithHttpInfo**](docs/SimulateApi.md#simulateApiPersonasDuplicateCreateWithHttpInfo) | **POST** /simulate/api/personas/duplicate/{persona_id}/ | +*SimulateApi* | [**simulateApiPersonasFieldOptions**](docs/SimulateApi.md#simulateApiPersonasFieldOptions) | **GET** /simulate/api/personas/field-options/ | +*SimulateApi* | [**simulateApiPersonasFieldOptionsWithHttpInfo**](docs/SimulateApi.md#simulateApiPersonasFieldOptionsWithHttpInfo) | **GET** /simulate/api/personas/field-options/ | +*SimulateApi* | [**simulateApiPersonasSystemPersonas**](docs/SimulateApi.md#simulateApiPersonasSystemPersonas) | **GET** /simulate/api/personas/system/ | +*SimulateApi* | [**simulateApiPersonasSystemPersonasWithHttpInfo**](docs/SimulateApi.md#simulateApiPersonasSystemPersonasWithHttpInfo) | **GET** /simulate/api/personas/system/ | +*SimulateApi* | [**simulateApiPersonasUpdate**](docs/SimulateApi.md#simulateApiPersonasUpdate) | **PUT** /simulate/api/personas/{id}/ | +*SimulateApi* | [**simulateApiPersonasUpdateWithHttpInfo**](docs/SimulateApi.md#simulateApiPersonasUpdateWithHttpInfo) | **PUT** /simulate/api/personas/{id}/ | +*SimulateApi* | [**simulateApiPersonasWorkspacePersonas**](docs/SimulateApi.md#simulateApiPersonasWorkspacePersonas) | **GET** /simulate/api/personas/workspace/ | +*SimulateApi* | [**simulateApiPersonasWorkspacePersonasWithHttpInfo**](docs/SimulateApi.md#simulateApiPersonasWorkspacePersonasWithHttpInfo) | **GET** /simulate/api/personas/workspace/ | +*SimulateApi* | [**simulateApiRunTestsList**](docs/SimulateApi.md#simulateApiRunTestsList) | **GET** /simulate/api/run-tests/ | +*SimulateApi* | [**simulateApiRunTestsListWithHttpInfo**](docs/SimulateApi.md#simulateApiRunTestsListWithHttpInfo) | **GET** /simulate/api/run-tests/ | +*SimulateApi* | [**simulateCallExecutionsBranchAnalysisCreate**](docs/SimulateApi.md#simulateCallExecutionsBranchAnalysisCreate) | **POST** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +*SimulateApi* | [**simulateCallExecutionsBranchAnalysisCreateWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsBranchAnalysisCreateWithHttpInfo) | **POST** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +*SimulateApi* | [**simulateCallExecutionsBranchAnalysisList**](docs/SimulateApi.md#simulateCallExecutionsBranchAnalysisList) | **GET** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +*SimulateApi* | [**simulateCallExecutionsBranchAnalysisListWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsBranchAnalysisListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/branch-analysis/ | +*SimulateApi* | [**simulateCallExecutionsChatSendMessageCreate**](docs/SimulateApi.md#simulateCallExecutionsChatSendMessageCreate) | **POST** /simulate/call-executions/{call_execution_id}/chat/send-message/ | +*SimulateApi* | [**simulateCallExecutionsChatSendMessageCreateWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsChatSendMessageCreateWithHttpInfo) | **POST** /simulate/call-executions/{call_execution_id}/chat/send-message/ | +*SimulateApi* | [**simulateCallExecutionsDeleteDelete**](docs/SimulateApi.md#simulateCallExecutionsDeleteDelete) | **DELETE** /simulate/call-executions/{call_execution_id}/delete/ | +*SimulateApi* | [**simulateCallExecutionsDeleteDeleteWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/call-executions/{call_execution_id}/delete/ | +*SimulateApi* | [**simulateCallExecutionsErrorLocalizerTasksList**](docs/SimulateApi.md#simulateCallExecutionsErrorLocalizerTasksList) | **GET** /simulate/call-executions/{call_execution_id}/error-localizer-tasks/ | +*SimulateApi* | [**simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/error-localizer-tasks/ | +*SimulateApi* | [**simulateCallExecutionsLogsList**](docs/SimulateApi.md#simulateCallExecutionsLogsList) | **GET** /simulate/call-executions/{call_execution_id}/logs/ | +*SimulateApi* | [**simulateCallExecutionsLogsListWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsLogsListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/logs/ | +*SimulateApi* | [**simulateCallExecutionsPartialUpdate**](docs/SimulateApi.md#simulateCallExecutionsPartialUpdate) | **PATCH** /simulate/call-executions/{call_execution_id}/ | +*SimulateApi* | [**simulateCallExecutionsPartialUpdateWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsPartialUpdateWithHttpInfo) | **PATCH** /simulate/call-executions/{call_execution_id}/ | +*SimulateApi* | [**simulateCallExecutionsRead**](docs/SimulateApi.md#simulateCallExecutionsRead) | **GET** /simulate/call-executions/{call_execution_id}/ | +*SimulateApi* | [**simulateCallExecutionsReadWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsReadWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/ | +*SimulateApi* | [**simulateCallExecutionsSessionComparisonList**](docs/SimulateApi.md#simulateCallExecutionsSessionComparisonList) | **GET** /simulate/call-executions/{call_execution_id}/session-comparison/ | +*SimulateApi* | [**simulateCallExecutionsSessionComparisonListWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsSessionComparisonListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/session-comparison/ | +*SimulateApi* | [**simulateCallExecutionsTranscriptsList**](docs/SimulateApi.md#simulateCallExecutionsTranscriptsList) | **GET** /simulate/call-executions/{call_execution_id}/transcripts/ | +*SimulateApi* | [**simulateCallExecutionsTranscriptsListWithHttpInfo**](docs/SimulateApi.md#simulateCallExecutionsTranscriptsListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/transcripts/ | +*SimulateApi* | [**simulateExportRead**](docs/SimulateApi.md#simulateExportRead) | **GET** /simulate/export/{item_id}/ | +*SimulateApi* | [**simulateExportReadWithHttpInfo**](docs/SimulateApi.md#simulateExportReadWithHttpInfo) | **GET** /simulate/export/{item_id}/ | +*SimulateApi* | [**simulatePromptSimulationsScenariosList**](docs/SimulateApi.md#simulatePromptSimulationsScenariosList) | **GET** /simulate/prompt-simulations/scenarios/ | Get list of scenarios available for prompt simulations. +*SimulateApi* | [**simulatePromptSimulationsScenariosListWithHttpInfo**](docs/SimulateApi.md#simulatePromptSimulationsScenariosListWithHttpInfo) | **GET** /simulate/prompt-simulations/scenarios/ | Get list of scenarios available for prompt simulations. +*SimulateApi* | [**simulatePromptTemplatesSimulationsCreate**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsCreate) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Create a new prompt-based simulation run. +*SimulateApi* | [**simulatePromptTemplatesSimulationsCreateWithHttpInfo**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsCreateWithHttpInfo) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Create a new prompt-based simulation run. +*SimulateApi* | [**simulatePromptTemplatesSimulationsDelete**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsDelete) | **DELETE** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateApi* | [**simulatePromptTemplatesSimulationsDeleteWithHttpInfo**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsDeleteWithHttpInfo) | **DELETE** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateApi* | [**simulatePromptTemplatesSimulationsExecuteCreate**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsExecuteCreate) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/ | Execute a prompt-based simulation run. +*SimulateApi* | [**simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/ | Execute a prompt-based simulation run. +*SimulateApi* | [**simulatePromptTemplatesSimulationsList**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsList) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Get paginated list of simulation runs for a specific prompt template. +*SimulateApi* | [**simulatePromptTemplatesSimulationsListWithHttpInfo**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsListWithHttpInfo) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Get paginated list of simulation runs for a specific prompt template. +*SimulateApi* | [**simulatePromptTemplatesSimulationsPartialUpdate**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsPartialUpdate) | **PATCH** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateApi* | [**simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo) | **PATCH** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateApi* | [**simulatePromptTemplatesSimulationsRead**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsRead) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateApi* | [**simulatePromptTemplatesSimulationsReadWithHttpInfo**](docs/SimulateApi.md#simulatePromptTemplatesSimulationsReadWithHttpInfo) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | +*SimulateApi* | [**simulateRunTestsActiveList**](docs/SimulateApi.md#simulateRunTestsActiveList) | **GET** /simulate/run-tests/active/ | +*SimulateApi* | [**simulateRunTestsActiveListWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsActiveListWithHttpInfo) | **GET** /simulate/run-tests/active/ | +*SimulateApi* | [**simulateRunTestsChatExecuteCreate**](docs/SimulateApi.md#simulateRunTestsChatExecuteCreate) | **POST** /simulate/run-tests/{run_test_id}/chat-execute/ | +*SimulateApi* | [**simulateRunTestsChatExecuteCreateWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsChatExecuteCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/chat-execute/ | +*SimulateApi* | [**simulateRunTestsComponentsPartialUpdate**](docs/SimulateApi.md#simulateRunTestsComponentsPartialUpdate) | **PATCH** /simulate/run-tests/{run_test_id}/components/ | +*SimulateApi* | [**simulateRunTestsComponentsPartialUpdateWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsComponentsPartialUpdateWithHttpInfo) | **PATCH** /simulate/run-tests/{run_test_id}/components/ | +*SimulateApi* | [**simulateRunTestsDeleteDelete**](docs/SimulateApi.md#simulateRunTestsDeleteDelete) | **DELETE** /simulate/run-tests/{run_test_id}/delete/ | +*SimulateApi* | [**simulateRunTestsDeleteDeleteWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/run-tests/{run_test_id}/delete/ | +*SimulateApi* | [**simulateRunTestsDeleteTestExecutionsCreate**](docs/SimulateApi.md#simulateRunTestsDeleteTestExecutionsCreate) | **POST** /simulate/run-tests/{run_test_id}/delete-test-executions/ | +*SimulateApi* | [**simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/delete-test-executions/ | +*SimulateApi* | [**simulateRunTestsEvalConfigsGetStructureList**](docs/SimulateApi.md#simulateRunTestsEvalConfigsGetStructureList) | **GET** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/ | +*SimulateApi* | [**simulateRunTestsEvalConfigsGetStructureListWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsEvalConfigsGetStructureListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/ | +*SimulateApi* | [**simulateRunTestsGetIdByNameRead**](docs/SimulateApi.md#simulateRunTestsGetIdByNameRead) | **GET** /simulate/run-tests/get-id-by-name/{run_test_name}/ | +*SimulateApi* | [**simulateRunTestsGetIdByNameReadWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsGetIdByNameReadWithHttpInfo) | **GET** /simulate/run-tests/get-id-by-name/{run_test_name}/ | +*SimulateApi* | [**simulateRunTestsRerunTestExecutionsCreate**](docs/SimulateApi.md#simulateRunTestsRerunTestExecutionsCreate) | **POST** /simulate/run-tests/{run_test_id}/rerun-test-executions/ | +*SimulateApi* | [**simulateRunTestsRerunTestExecutionsCreateWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsRerunTestExecutionsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/rerun-test-executions/ | +*SimulateApi* | [**simulateRunTestsScenariosList**](docs/SimulateApi.md#simulateRunTestsScenariosList) | **GET** /simulate/run-tests/{run_test_id}/scenarios/ | +*SimulateApi* | [**simulateRunTestsScenariosListWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsScenariosListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/scenarios/ | +*SimulateApi* | [**simulateRunTestsSdkCodeList**](docs/SimulateApi.md#simulateRunTestsSdkCodeList) | **GET** /simulate/run-tests/{run_test_id}/sdk-code/ | +*SimulateApi* | [**simulateRunTestsSdkCodeListWithHttpInfo**](docs/SimulateApi.md#simulateRunTestsSdkCodeListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/sdk-code/ | +*SimulateApi* | [**simulateSimulatorAgentsCreateCreate**](docs/SimulateApi.md#simulateSimulatorAgentsCreateCreate) | **POST** /simulate/simulator-agents/create/ | +*SimulateApi* | [**simulateSimulatorAgentsCreateCreateWithHttpInfo**](docs/SimulateApi.md#simulateSimulatorAgentsCreateCreateWithHttpInfo) | **POST** /simulate/simulator-agents/create/ | +*SimulateApi* | [**simulateSimulatorAgentsDeleteDelete**](docs/SimulateApi.md#simulateSimulatorAgentsDeleteDelete) | **DELETE** /simulate/simulator-agents/{agent_id}/delete/ | +*SimulateApi* | [**simulateSimulatorAgentsDeleteDeleteWithHttpInfo**](docs/SimulateApi.md#simulateSimulatorAgentsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/simulator-agents/{agent_id}/delete/ | +*SimulateApi* | [**simulateSimulatorAgentsEditUpdate**](docs/SimulateApi.md#simulateSimulatorAgentsEditUpdate) | **PUT** /simulate/simulator-agents/{agent_id}/edit/ | +*SimulateApi* | [**simulateSimulatorAgentsEditUpdateWithHttpInfo**](docs/SimulateApi.md#simulateSimulatorAgentsEditUpdateWithHttpInfo) | **PUT** /simulate/simulator-agents/{agent_id}/edit/ | +*SimulateApi* | [**simulateSimulatorAgentsList**](docs/SimulateApi.md#simulateSimulatorAgentsList) | **GET** /simulate/simulator-agents/ | +*SimulateApi* | [**simulateSimulatorAgentsListWithHttpInfo**](docs/SimulateApi.md#simulateSimulatorAgentsListWithHttpInfo) | **GET** /simulate/simulator-agents/ | +*SimulateApi* | [**simulateSimulatorAgentsRead**](docs/SimulateApi.md#simulateSimulatorAgentsRead) | **GET** /simulate/simulator-agents/{agent_id}/ | +*SimulateApi* | [**simulateSimulatorAgentsReadWithHttpInfo**](docs/SimulateApi.md#simulateSimulatorAgentsReadWithHttpInfo) | **GET** /simulate/simulator-agents/{agent_id}/ | +*SimulateApi* | [**simulateTestExecutionsChatCallExecutionsBatchCreate**](docs/SimulateApi.md#simulateTestExecutionsChatCallExecutionsBatchCreate) | **POST** /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/ | Create a batch of CallExecution records for chat execution (exactly 10 per API call). +*SimulateApi* | [**simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/ | Create a batch of CallExecution records for chat execution (exactly 10 per API call). +*SimulateApi* | [**simulateTestExecutionsColumnOrderUpdate**](docs/SimulateApi.md#simulateTestExecutionsColumnOrderUpdate) | **PUT** /simulate/test-executions/{test_execution_id}/column-order/ | +*SimulateApi* | [**simulateTestExecutionsColumnOrderUpdateWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsColumnOrderUpdateWithHttpInfo) | **PUT** /simulate/test-executions/{test_execution_id}/column-order/ | +*SimulateApi* | [**simulateTestExecutionsDeleteDelete**](docs/SimulateApi.md#simulateTestExecutionsDeleteDelete) | **DELETE** /simulate/test-executions/{test_execution_id}/delete/ | +*SimulateApi* | [**simulateTestExecutionsDeleteDeleteWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/test-executions/{test_execution_id}/delete/ | +*SimulateApi* | [**simulateTestExecutionsEvalExplanationSummaryList**](docs/SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryList) | **GET** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/ | +*SimulateApi* | [**simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/ | +*SimulateApi* | [**simulateTestExecutionsEvalExplanationSummaryRefreshCreate**](docs/SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryRefreshCreate) | **POST** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/ | +*SimulateApi* | [**simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/ | +*SimulateApi* | [**simulateTestExecutionsOptimiserAnalysisList**](docs/SimulateApi.md#simulateTestExecutionsOptimiserAnalysisList) | **GET** /simulate/test-executions/{test_execution_id}/optimiser-analysis/ | +*SimulateApi* | [**simulateTestExecutionsOptimiserAnalysisListWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsOptimiserAnalysisListWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/optimiser-analysis/ | +*SimulateApi* | [**simulateTestExecutionsOptimiserAnalysisRefreshCreate**](docs/SimulateApi.md#simulateTestExecutionsOptimiserAnalysisRefreshCreate) | **POST** /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/ | +*SimulateApi* | [**simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/ | +*SimulateApi* | [**simulateTestExecutionsRerunCallsCreate**](docs/SimulateApi.md#simulateTestExecutionsRerunCallsCreate) | **POST** /simulate/test-executions/{test_execution_id}/rerun-calls/ | +*SimulateApi* | [**simulateTestExecutionsRerunCallsCreateWithHttpInfo**](docs/SimulateApi.md#simulateTestExecutionsRerunCallsCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/rerun-calls/ | +*SimulationAgentDefinitionsApi* | [**createAgentDefinition**](docs/SimulationAgentDefinitionsApi.md#createAgentDefinition) | **POST** /simulate/agent-definitions/create/ | +*SimulationAgentDefinitionsApi* | [**createAgentDefinitionWithHttpInfo**](docs/SimulationAgentDefinitionsApi.md#createAgentDefinitionWithHttpInfo) | **POST** /simulate/agent-definitions/create/ | +*SimulationAgentDefinitionsApi* | [**deleteAgentDefinition**](docs/SimulationAgentDefinitionsApi.md#deleteAgentDefinition) | **DELETE** /simulate/agent-definitions/{agent_id}/delete/ | +*SimulationAgentDefinitionsApi* | [**deleteAgentDefinitionWithHttpInfo**](docs/SimulationAgentDefinitionsApi.md#deleteAgentDefinitionWithHttpInfo) | **DELETE** /simulate/agent-definitions/{agent_id}/delete/ | +*SimulationAgentDefinitionsApi* | [**getAgentDefinition**](docs/SimulationAgentDefinitionsApi.md#getAgentDefinition) | **GET** /simulate/agent-definitions/{agent_id}/ | +*SimulationAgentDefinitionsApi* | [**getAgentDefinitionWithHttpInfo**](docs/SimulationAgentDefinitionsApi.md#getAgentDefinitionWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/ | +*SimulationAgentDefinitionsApi* | [**listAgentDefinitions**](docs/SimulationAgentDefinitionsApi.md#listAgentDefinitions) | **GET** /simulate/agent-definitions/ | +*SimulationAgentDefinitionsApi* | [**listAgentDefinitionsWithHttpInfo**](docs/SimulationAgentDefinitionsApi.md#listAgentDefinitionsWithHttpInfo) | **GET** /simulate/agent-definitions/ | +*SimulationAgentDefinitionsApi* | [**updateAgentDefinition**](docs/SimulationAgentDefinitionsApi.md#updateAgentDefinition) | **PUT** /simulate/agent-definitions/{agent_id}/edit/ | +*SimulationAgentDefinitionsApi* | [**updateAgentDefinitionWithHttpInfo**](docs/SimulationAgentDefinitionsApi.md#updateAgentDefinitionWithHttpInfo) | **PUT** /simulate/agent-definitions/{agent_id}/edit/ | +*SimulationPersonasApi* | [**createPersona**](docs/SimulationPersonasApi.md#createPersona) | **POST** /simulate/api/personas/ | +*SimulationPersonasApi* | [**createPersonaWithHttpInfo**](docs/SimulationPersonasApi.md#createPersonaWithHttpInfo) | **POST** /simulate/api/personas/ | +*SimulationPersonasApi* | [**deletePersona**](docs/SimulationPersonasApi.md#deletePersona) | **DELETE** /simulate/api/personas/{id}/ | +*SimulationPersonasApi* | [**deletePersonaWithHttpInfo**](docs/SimulationPersonasApi.md#deletePersonaWithHttpInfo) | **DELETE** /simulate/api/personas/{id}/ | +*SimulationPersonasApi* | [**getPersona**](docs/SimulationPersonasApi.md#getPersona) | **GET** /simulate/api/personas/{id}/ | +*SimulationPersonasApi* | [**getPersonaWithHttpInfo**](docs/SimulationPersonasApi.md#getPersonaWithHttpInfo) | **GET** /simulate/api/personas/{id}/ | +*SimulationPersonasApi* | [**listPersonas**](docs/SimulationPersonasApi.md#listPersonas) | **GET** /simulate/api/personas/ | +*SimulationPersonasApi* | [**listPersonasWithHttpInfo**](docs/SimulationPersonasApi.md#listPersonasWithHttpInfo) | **GET** /simulate/api/personas/ | +*SimulationPersonasApi* | [**updatePersona**](docs/SimulationPersonasApi.md#updatePersona) | **PATCH** /simulate/api/personas/{id}/ | +*SimulationPersonasApi* | [**updatePersonaWithHttpInfo**](docs/SimulationPersonasApi.md#updatePersonaWithHttpInfo) | **PATCH** /simulate/api/personas/{id}/ | +*SimulationRunTestsApi* | [**createRunTest**](docs/SimulationRunTestsApi.md#createRunTest) | **POST** /simulate/run-tests/create/ | +*SimulationRunTestsApi* | [**createRunTestWithHttpInfo**](docs/SimulationRunTestsApi.md#createRunTestWithHttpInfo) | **POST** /simulate/run-tests/create/ | +*SimulationRunTestsApi* | [**deleteRunTest**](docs/SimulationRunTestsApi.md#deleteRunTest) | **DELETE** /simulate/run-tests/{run_test_id}/ | +*SimulationRunTestsApi* | [**deleteRunTestWithHttpInfo**](docs/SimulationRunTestsApi.md#deleteRunTestWithHttpInfo) | **DELETE** /simulate/run-tests/{run_test_id}/ | +*SimulationRunTestsApi* | [**executeRunTest**](docs/SimulationRunTestsApi.md#executeRunTest) | **POST** /simulate/run-tests/{run_test_id}/execute/ | +*SimulationRunTestsApi* | [**executeRunTestWithHttpInfo**](docs/SimulationRunTestsApi.md#executeRunTestWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/execute/ | +*SimulationRunTestsApi* | [**getRunTest**](docs/SimulationRunTestsApi.md#getRunTest) | **GET** /simulate/run-tests/{run_test_id}/ | +*SimulationRunTestsApi* | [**getRunTestWithHttpInfo**](docs/SimulationRunTestsApi.md#getRunTestWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/ | +*SimulationRunTestsApi* | [**getRunTestAnalytics**](docs/SimulationRunTestsApi.md#getRunTestAnalytics) | **GET** /simulate/run-tests/{run_test_id}/analytics/ | +*SimulationRunTestsApi* | [**getRunTestAnalyticsWithHttpInfo**](docs/SimulationRunTestsApi.md#getRunTestAnalyticsWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/analytics/ | +*SimulationRunTestsApi* | [**getRunTestStatus**](docs/SimulationRunTestsApi.md#getRunTestStatus) | **GET** /simulate/run-tests/{run_test_id}/status/ | +*SimulationRunTestsApi* | [**getRunTestStatusWithHttpInfo**](docs/SimulationRunTestsApi.md#getRunTestStatusWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/status/ | +*SimulationRunTestsApi* | [**listRunTestCallExecutions**](docs/SimulationRunTestsApi.md#listRunTestCallExecutions) | **GET** /simulate/run-tests/{run_test_id}/call-executions/ | +*SimulationRunTestsApi* | [**listRunTestCallExecutionsWithHttpInfo**](docs/SimulationRunTestsApi.md#listRunTestCallExecutionsWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/call-executions/ | +*SimulationRunTestsApi* | [**listRunTestExecutions**](docs/SimulationRunTestsApi.md#listRunTestExecutions) | **GET** /simulate/run-tests/{run_test_id}/executions/ | +*SimulationRunTestsApi* | [**listRunTestExecutionsWithHttpInfo**](docs/SimulationRunTestsApi.md#listRunTestExecutionsWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/executions/ | +*SimulationRunTestsApi* | [**listRunTests**](docs/SimulationRunTestsApi.md#listRunTests) | **GET** /simulate/run-tests/ | +*SimulationRunTestsApi* | [**listRunTestsWithHttpInfo**](docs/SimulationRunTestsApi.md#listRunTestsWithHttpInfo) | **GET** /simulate/run-tests/ | +*SimulationRunTestsApi* | [**updateRunTest**](docs/SimulationRunTestsApi.md#updateRunTest) | **PATCH** /simulate/run-tests/{run_test_id}/ | +*SimulationRunTestsApi* | [**updateRunTestWithHttpInfo**](docs/SimulationRunTestsApi.md#updateRunTestWithHttpInfo) | **PATCH** /simulate/run-tests/{run_test_id}/ | +*SimulationScenariosApi* | [**createScenario**](docs/SimulationScenariosApi.md#createScenario) | **POST** /simulate/scenarios/create/ | Create scenario +*SimulationScenariosApi* | [**createScenarioWithHttpInfo**](docs/SimulationScenariosApi.md#createScenarioWithHttpInfo) | **POST** /simulate/scenarios/create/ | Create scenario +*SimulationScenariosApi* | [**deleteScenario**](docs/SimulationScenariosApi.md#deleteScenario) | **DELETE** /simulate/scenarios/{scenario_id}/delete/ | Delete scenario +*SimulationScenariosApi* | [**deleteScenarioWithHttpInfo**](docs/SimulationScenariosApi.md#deleteScenarioWithHttpInfo) | **DELETE** /simulate/scenarios/{scenario_id}/delete/ | Delete scenario +*SimulationScenariosApi* | [**getScenario**](docs/SimulationScenariosApi.md#getScenario) | **GET** /simulate/scenarios/{scenario_id}/ | Get scenario detail +*SimulationScenariosApi* | [**getScenarioWithHttpInfo**](docs/SimulationScenariosApi.md#getScenarioWithHttpInfo) | **GET** /simulate/scenarios/{scenario_id}/ | Get scenario detail +*SimulationScenariosApi* | [**listScenarios**](docs/SimulationScenariosApi.md#listScenarios) | **GET** /simulate/scenarios/ | List scenarios +*SimulationScenariosApi* | [**listScenariosWithHttpInfo**](docs/SimulationScenariosApi.md#listScenariosWithHttpInfo) | **GET** /simulate/scenarios/ | List scenarios +*SimulationScenariosApi* | [**updateScenario**](docs/SimulationScenariosApi.md#updateScenario) | **PUT** /simulate/scenarios/{scenario_id}/edit/ | Edit scenario +*SimulationScenariosApi* | [**updateScenarioWithHttpInfo**](docs/SimulationScenariosApi.md#updateScenarioWithHttpInfo) | **PUT** /simulate/scenarios/{scenario_id}/edit/ | Edit scenario +*SimulationTestExecutionsApi* | [**cancelTestExecution**](docs/SimulationTestExecutionsApi.md#cancelTestExecution) | **POST** /simulate/test-executions/{test_execution_id}/cancel/ | +*SimulationTestExecutionsApi* | [**cancelTestExecutionWithHttpInfo**](docs/SimulationTestExecutionsApi.md#cancelTestExecutionWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/cancel/ | +*SimulationTestExecutionsApi* | [**getTestExecution**](docs/SimulationTestExecutionsApi.md#getTestExecution) | **GET** /simulate/test-executions/{test_execution_id}/ | +*SimulationTestExecutionsApi* | [**getTestExecutionWithHttpInfo**](docs/SimulationTestExecutionsApi.md#getTestExecutionWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/ | +*SimulationTestExecutionsApi* | [**getTestExecutionAnalytics**](docs/SimulationTestExecutionsApi.md#getTestExecutionAnalytics) | **GET** /simulate/test-executions/{test_execution_id}/analytics/ | +*SimulationTestExecutionsApi* | [**getTestExecutionAnalyticsWithHttpInfo**](docs/SimulationTestExecutionsApi.md#getTestExecutionAnalyticsWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/analytics/ | +*SimulationTestExecutionsApi* | [**getTestExecutionKpis**](docs/SimulationTestExecutionsApi.md#getTestExecutionKpis) | **GET** /simulate/test-executions/{test_execution_id}/kpis/ | +*SimulationTestExecutionsApi* | [**getTestExecutionKpisWithHttpInfo**](docs/SimulationTestExecutionsApi.md#getTestExecutionKpisWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/kpis/ | +*SimulationTestExecutionsApi* | [**getTestExecutionPerformanceSummary**](docs/SimulationTestExecutionsApi.md#getTestExecutionPerformanceSummary) | **GET** /simulate/test-executions/{test_execution_id}/performance-summary/ | +*SimulationTestExecutionsApi* | [**getTestExecutionPerformanceSummaryWithHttpInfo**](docs/SimulationTestExecutionsApi.md#getTestExecutionPerformanceSummaryWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/performance-summary/ | +*SimulationTestExecutionsApi* | [**getTestExecutionTranscripts**](docs/SimulationTestExecutionsApi.md#getTestExecutionTranscripts) | **GET** /simulate/test-executions/{test_execution_id}/transcripts/ | +*SimulationTestExecutionsApi* | [**getTestExecutionTranscriptsWithHttpInfo**](docs/SimulationTestExecutionsApi.md#getTestExecutionTranscriptsWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/transcripts/ | +*SimulationTestExecutionsApi* | [**listTestExecutions**](docs/SimulationTestExecutionsApi.md#listTestExecutions) | **GET** /simulate/api/test-executions/ | +*SimulationTestExecutionsApi* | [**listTestExecutionsWithHttpInfo**](docs/SimulationTestExecutionsApi.md#listTestExecutionsWithHttpInfo) | **GET** /simulate/api/test-executions/ | +*SimulationsApi* | [**getSimulationAnalytics**](docs/SimulationsApi.md#getSimulationAnalytics) | **GET** /sdk/api/v1/simulation/analytics/ | GET /simulation/analytics/ +*SimulationsApi* | [**getSimulationAnalyticsWithHttpInfo**](docs/SimulationsApi.md#getSimulationAnalyticsWithHttpInfo) | **GET** /sdk/api/v1/simulation/analytics/ | GET /simulation/analytics/ +*SimulationsApi* | [**listSimulationMetrics**](docs/SimulationsApi.md#listSimulationMetrics) | **GET** /sdk/api/v1/simulation/metrics/ | GET /simulation/metrics/ +*SimulationsApi* | [**listSimulationMetricsWithHttpInfo**](docs/SimulationsApi.md#listSimulationMetricsWithHttpInfo) | **GET** /sdk/api/v1/simulation/metrics/ | GET /simulation/metrics/ +*SimulationsApi* | [**listSimulationRuns**](docs/SimulationsApi.md#listSimulationRuns) | **GET** /sdk/api/v1/simulation/runs/ | GET /simulation/runs/ +*SimulationsApi* | [**listSimulationRunsWithHttpInfo**](docs/SimulationsApi.md#listSimulationRunsWithHttpInfo) | **GET** /sdk/api/v1/simulation/runs/ | GET /simulation/runs/ +*TracerApi* | [**tracerFeedIssuesCreateLinearIssueCreate**](docs/TracerApi.md#tracerFeedIssuesCreateLinearIssueCreate) | **POST** /tracer/feed/issues/{cluster_id}/create-linear-issue/ | +*TracerApi* | [**tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo) | **POST** /tracer/feed/issues/{cluster_id}/create-linear-issue/ | +*TracerApi* | [**tracerFeedIssuesDeepAnalysisCreate**](docs/TracerApi.md#tracerFeedIssuesDeepAnalysisCreate) | **POST** /tracer/feed/issues/{cluster_id}/deep-analysis/ | +*TracerApi* | [**tracerFeedIssuesDeepAnalysisCreateWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesDeepAnalysisCreateWithHttpInfo) | **POST** /tracer/feed/issues/{cluster_id}/deep-analysis/ | +*TracerApi* | [**tracerFeedIssuesOverviewList**](docs/TracerApi.md#tracerFeedIssuesOverviewList) | **GET** /tracer/feed/issues/{cluster_id}/overview/ | +*TracerApi* | [**tracerFeedIssuesOverviewListWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesOverviewListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/overview/ | +*TracerApi* | [**tracerFeedIssuesPartialUpdate**](docs/TracerApi.md#tracerFeedIssuesPartialUpdate) | **PATCH** /tracer/feed/issues/{cluster_id}/ | +*TracerApi* | [**tracerFeedIssuesPartialUpdateWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesPartialUpdateWithHttpInfo) | **PATCH** /tracer/feed/issues/{cluster_id}/ | +*TracerApi* | [**tracerFeedIssuesRootCauseList**](docs/TracerApi.md#tracerFeedIssuesRootCauseList) | **GET** /tracer/feed/issues/{cluster_id}/root-cause/ | GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X +*TracerApi* | [**tracerFeedIssuesRootCauseListWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesRootCauseListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/root-cause/ | GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X +*TracerApi* | [**tracerFeedIssuesSidebarList**](docs/TracerApi.md#tracerFeedIssuesSidebarList) | **GET** /tracer/feed/issues/{cluster_id}/sidebar/ | GET /tracer/feed/issues/{cluster_id}/sidebar/ +*TracerApi* | [**tracerFeedIssuesSidebarListWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesSidebarListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/sidebar/ | GET /tracer/feed/issues/{cluster_id}/sidebar/ +*TracerApi* | [**tracerFeedIssuesTracesList**](docs/TracerApi.md#tracerFeedIssuesTracesList) | **GET** /tracer/feed/issues/{cluster_id}/traces/ | +*TracerApi* | [**tracerFeedIssuesTracesListWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesTracesListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/traces/ | +*TracerApi* | [**tracerFeedIssuesTrendsList**](docs/TracerApi.md#tracerFeedIssuesTrendsList) | **GET** /tracer/feed/issues/{cluster_id}/trends/ | +*TracerApi* | [**tracerFeedIssuesTrendsListWithHttpInfo**](docs/TracerApi.md#tracerFeedIssuesTrendsListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/trends/ | +*TracerApi* | [**tracerTraceAgentGraph**](docs/TracerApi.md#tracerTraceAgentGraph) | **GET** /tracer/trace/agent_graph/ | Return the aggregate agent graph for a project. +*TracerApi* | [**tracerTraceAgentGraphWithHttpInfo**](docs/TracerApi.md#tracerTraceAgentGraphWithHttpInfo) | **GET** /tracer/trace/agent_graph/ | Return the aggregate agent graph for a project. +*TracerApi* | [**tracerTraceAnnotationCreate**](docs/TracerApi.md#tracerTraceAnnotationCreate) | **POST** /tracer/trace-annotation/ | +*TracerApi* | [**tracerTraceAnnotationCreateWithHttpInfo**](docs/TracerApi.md#tracerTraceAnnotationCreateWithHttpInfo) | **POST** /tracer/trace-annotation/ | +*TracerApi* | [**tracerTraceAnnotationDelete**](docs/TracerApi.md#tracerTraceAnnotationDelete) | **DELETE** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceAnnotationDeleteWithHttpInfo**](docs/TracerApi.md#tracerTraceAnnotationDeleteWithHttpInfo) | **DELETE** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceAnnotationGetAnnotationValues**](docs/TracerApi.md#tracerTraceAnnotationGetAnnotationValues) | **GET** /tracer/trace-annotation/get_annotation_values/ | +*TracerApi* | [**tracerTraceAnnotationGetAnnotationValuesWithHttpInfo**](docs/TracerApi.md#tracerTraceAnnotationGetAnnotationValuesWithHttpInfo) | **GET** /tracer/trace-annotation/get_annotation_values/ | +*TracerApi* | [**tracerTraceAnnotationList**](docs/TracerApi.md#tracerTraceAnnotationList) | **GET** /tracer/trace-annotation/ | +*TracerApi* | [**tracerTraceAnnotationListWithHttpInfo**](docs/TracerApi.md#tracerTraceAnnotationListWithHttpInfo) | **GET** /tracer/trace-annotation/ | +*TracerApi* | [**tracerTraceAnnotationPartialUpdate**](docs/TracerApi.md#tracerTraceAnnotationPartialUpdate) | **PATCH** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceAnnotationPartialUpdateWithHttpInfo**](docs/TracerApi.md#tracerTraceAnnotationPartialUpdateWithHttpInfo) | **PATCH** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceAnnotationRead**](docs/TracerApi.md#tracerTraceAnnotationRead) | **GET** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceAnnotationReadWithHttpInfo**](docs/TracerApi.md#tracerTraceAnnotationReadWithHttpInfo) | **GET** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceAnnotationUpdate**](docs/TracerApi.md#tracerTraceAnnotationUpdate) | **PUT** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceAnnotationUpdateWithHttpInfo**](docs/TracerApi.md#tracerTraceAnnotationUpdateWithHttpInfo) | **PUT** /tracer/trace-annotation/{id}/ | +*TracerApi* | [**tracerTraceBulkCreate**](docs/TracerApi.md#tracerTraceBulkCreate) | **POST** /tracer/trace/bulk_create/ | +*TracerApi* | [**tracerTraceBulkCreateWithHttpInfo**](docs/TracerApi.md#tracerTraceBulkCreateWithHttpInfo) | **POST** /tracer/trace/bulk_create/ | +*TracerApi* | [**tracerTraceCompareTraces**](docs/TracerApi.md#tracerTraceCompareTraces) | **POST** /tracer/trace/compare_traces/ | +*TracerApi* | [**tracerTraceCompareTracesWithHttpInfo**](docs/TracerApi.md#tracerTraceCompareTracesWithHttpInfo) | **POST** /tracer/trace/compare_traces/ | +*TracerApi* | [**tracerTraceCreate**](docs/TracerApi.md#tracerTraceCreate) | **POST** /tracer/trace/ | +*TracerApi* | [**tracerTraceCreateWithHttpInfo**](docs/TracerApi.md#tracerTraceCreateWithHttpInfo) | **POST** /tracer/trace/ | +*TracerApi* | [**tracerTraceDelete**](docs/TracerApi.md#tracerTraceDelete) | **DELETE** /tracer/trace/{id}/ | +*TracerApi* | [**tracerTraceDeleteWithHttpInfo**](docs/TracerApi.md#tracerTraceDeleteWithHttpInfo) | **DELETE** /tracer/trace/{id}/ | +*TracerApi* | [**tracerTraceGetEvalNames**](docs/TracerApi.md#tracerTraceGetEvalNames) | **GET** /tracer/trace/get_eval_names/ | +*TracerApi* | [**tracerTraceGetEvalNamesWithHttpInfo**](docs/TracerApi.md#tracerTraceGetEvalNamesWithHttpInfo) | **GET** /tracer/trace/get_eval_names/ | +*TracerApi* | [**tracerTraceGetTraceExportData**](docs/TracerApi.md#tracerTraceGetTraceExportData) | **GET** /tracer/trace/get_trace_export_data/ | +*TracerApi* | [**tracerTraceGetTraceExportDataWithHttpInfo**](docs/TracerApi.md#tracerTraceGetTraceExportDataWithHttpInfo) | **GET** /tracer/trace/get_trace_export_data/ | +*TracerApi* | [**tracerTraceGetTraceIdByIndex**](docs/TracerApi.md#tracerTraceGetTraceIdByIndex) | **GET** /tracer/trace/get_trace_id_by_index/ | +*TracerApi* | [**tracerTraceGetTraceIdByIndexWithHttpInfo**](docs/TracerApi.md#tracerTraceGetTraceIdByIndexWithHttpInfo) | **GET** /tracer/trace/get_trace_id_by_index/ | +*TracerApi* | [**tracerTraceGetTraceIdByIndexObserve**](docs/TracerApi.md#tracerTraceGetTraceIdByIndexObserve) | **GET** /tracer/trace/get_trace_id_by_index_observe/ | +*TracerApi* | [**tracerTraceGetTraceIdByIndexObserveWithHttpInfo**](docs/TracerApi.md#tracerTraceGetTraceIdByIndexObserveWithHttpInfo) | **GET** /tracer/trace/get_trace_id_by_index_observe/ | +*TracerApi* | [**tracerTraceList**](docs/TracerApi.md#tracerTraceList) | **GET** /tracer/trace/ | +*TracerApi* | [**tracerTraceListWithHttpInfo**](docs/TracerApi.md#tracerTraceListWithHttpInfo) | **GET** /tracer/trace/ | +*TracerApi* | [**tracerTraceListTracesOfSession**](docs/TracerApi.md#tracerTraceListTracesOfSession) | **GET** /tracer/trace/list_traces_of_session/ | +*TracerApi* | [**tracerTraceListTracesOfSessionWithHttpInfo**](docs/TracerApi.md#tracerTraceListTracesOfSessionWithHttpInfo) | **GET** /tracer/trace/list_traces_of_session/ | +*TracerApi* | [**tracerTracePartialUpdate**](docs/TracerApi.md#tracerTracePartialUpdate) | **PATCH** /tracer/trace/{id}/ | +*TracerApi* | [**tracerTracePartialUpdateWithHttpInfo**](docs/TracerApi.md#tracerTracePartialUpdateWithHttpInfo) | **PATCH** /tracer/trace/{id}/ | +*TracerApi* | [**tracerTraceSessionCreate**](docs/TracerApi.md#tracerTraceSessionCreate) | **POST** /tracer/trace-session/ | +*TracerApi* | [**tracerTraceSessionCreateWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionCreateWithHttpInfo) | **POST** /tracer/trace-session/ | +*TracerApi* | [**tracerTraceSessionDelete**](docs/TracerApi.md#tracerTraceSessionDelete) | **DELETE** /tracer/trace-session/{id}/ | +*TracerApi* | [**tracerTraceSessionDeleteWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionDeleteWithHttpInfo) | **DELETE** /tracer/trace-session/{id}/ | +*TracerApi* | [**tracerTraceSessionEvalLogs**](docs/TracerApi.md#tracerTraceSessionEvalLogs) | **GET** /tracer/trace-session/{id}/eval_logs/ | Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. +*TracerApi* | [**tracerTraceSessionEvalLogsWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionEvalLogsWithHttpInfo) | **GET** /tracer/trace-session/{id}/eval_logs/ | Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. +*TracerApi* | [**tracerTraceSessionGetSessionFilterValues**](docs/TracerApi.md#tracerTraceSessionGetSessionFilterValues) | **GET** /tracer/trace-session/get_session_filter_values/ | +*TracerApi* | [**tracerTraceSessionGetSessionFilterValuesWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionGetSessionFilterValuesWithHttpInfo) | **GET** /tracer/trace-session/get_session_filter_values/ | +*TracerApi* | [**tracerTraceSessionGetTraceSessionExportData**](docs/TracerApi.md#tracerTraceSessionGetTraceSessionExportData) | **GET** /tracer/trace-session/get_trace_session_export_data/ | +*TracerApi* | [**tracerTraceSessionGetTraceSessionExportDataWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionGetTraceSessionExportDataWithHttpInfo) | **GET** /tracer/trace-session/get_trace_session_export_data/ | +*TracerApi* | [**tracerTraceSessionList**](docs/TracerApi.md#tracerTraceSessionList) | **GET** /tracer/trace-session/ | +*TracerApi* | [**tracerTraceSessionListWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionListWithHttpInfo) | **GET** /tracer/trace-session/ | +*TracerApi* | [**tracerTraceSessionPartialUpdate**](docs/TracerApi.md#tracerTraceSessionPartialUpdate) | **PATCH** /tracer/trace-session/{id}/ | +*TracerApi* | [**tracerTraceSessionPartialUpdateWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionPartialUpdateWithHttpInfo) | **PATCH** /tracer/trace-session/{id}/ | +*TracerApi* | [**tracerTraceSessionUpdate**](docs/TracerApi.md#tracerTraceSessionUpdate) | **PUT** /tracer/trace-session/{id}/ | +*TracerApi* | [**tracerTraceSessionUpdateWithHttpInfo**](docs/TracerApi.md#tracerTraceSessionUpdateWithHttpInfo) | **PUT** /tracer/trace-session/{id}/ | +*TracerApi* | [**tracerTraceUpdate**](docs/TracerApi.md#tracerTraceUpdate) | **PUT** /tracer/trace/{id}/ | +*TracerApi* | [**tracerTraceUpdateWithHttpInfo**](docs/TracerApi.md#tracerTraceUpdateWithHttpInfo) | **PUT** /tracer/trace/{id}/ | +*TracerApi* | [**tracerUserAlertLogsCreate**](docs/TracerApi.md#tracerUserAlertLogsCreate) | **POST** /tracer/user-alert-logs/ | +*TracerApi* | [**tracerUserAlertLogsCreateWithHttpInfo**](docs/TracerApi.md#tracerUserAlertLogsCreateWithHttpInfo) | **POST** /tracer/user-alert-logs/ | +*TracerApi* | [**tracerUserAlertLogsDelete**](docs/TracerApi.md#tracerUserAlertLogsDelete) | **DELETE** /tracer/user-alert-logs/{id}/ | +*TracerApi* | [**tracerUserAlertLogsDeleteWithHttpInfo**](docs/TracerApi.md#tracerUserAlertLogsDeleteWithHttpInfo) | **DELETE** /tracer/user-alert-logs/{id}/ | +*TracerApi* | [**tracerUserAlertLogsPartialUpdate**](docs/TracerApi.md#tracerUserAlertLogsPartialUpdate) | **PATCH** /tracer/user-alert-logs/{id}/ | +*TracerApi* | [**tracerUserAlertLogsPartialUpdateWithHttpInfo**](docs/TracerApi.md#tracerUserAlertLogsPartialUpdateWithHttpInfo) | **PATCH** /tracer/user-alert-logs/{id}/ | +*TracerApi* | [**tracerUserAlertLogsUpdate**](docs/TracerApi.md#tracerUserAlertLogsUpdate) | **PUT** /tracer/user-alert-logs/{id}/ | +*TracerApi* | [**tracerUserAlertLogsUpdateWithHttpInfo**](docs/TracerApi.md#tracerUserAlertLogsUpdateWithHttpInfo) | **PUT** /tracer/user-alert-logs/{id}/ | +*TracerApi* | [**tracerUserAlertsDuplicate**](docs/TracerApi.md#tracerUserAlertsDuplicate) | **POST** /tracer/user-alerts/duplicate/ | +*TracerApi* | [**tracerUserAlertsDuplicateWithHttpInfo**](docs/TracerApi.md#tracerUserAlertsDuplicateWithHttpInfo) | **POST** /tracer/user-alerts/duplicate/ | +*TracerApi* | [**tracerUserAlertsListMonitors**](docs/TracerApi.md#tracerUserAlertsListMonitors) | **GET** /tracer/user-alerts/list_monitors/ | +*TracerApi* | [**tracerUserAlertsListMonitorsWithHttpInfo**](docs/TracerApi.md#tracerUserAlertsListMonitorsWithHttpInfo) | **GET** /tracer/user-alerts/list_monitors/ | +*TracerApi* | [**tracerUserAlertsUpdate**](docs/TracerApi.md#tracerUserAlertsUpdate) | **PUT** /tracer/user-alerts/{id}/ | +*TracerApi* | [**tracerUserAlertsUpdateWithHttpInfo**](docs/TracerApi.md#tracerUserAlertsUpdateWithHttpInfo) | **PUT** /tracer/user-alerts/{id}/ | +*TracerApi* | [**tracerUsersGetCodeExampleList**](docs/TracerApi.md#tracerUsersGetCodeExampleList) | **GET** /tracer/users/get_code_example/ | +*TracerApi* | [**tracerUsersGetCodeExampleListWithHttpInfo**](docs/TracerApi.md#tracerUsersGetCodeExampleListWithHttpInfo) | **GET** /tracer/users/get_code_example/ | +*TracingApi* | [**createBulkTraceAnnotation**](docs/TracingApi.md#createBulkTraceAnnotation) | **POST** /tracer/bulk-annotation/ | +*TracingApi* | [**createBulkTraceAnnotationWithHttpInfo**](docs/TracingApi.md#createBulkTraceAnnotationWithHttpInfo) | **POST** /tracer/bulk-annotation/ | +*TracingApi* | [**getErrorFeedIssue**](docs/TracingApi.md#getErrorFeedIssue) | **GET** /tracer/feed/issues/{cluster_id}/ | +*TracingApi* | [**getErrorFeedIssueWithHttpInfo**](docs/TracingApi.md#getErrorFeedIssueWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/ | +*TracingApi* | [**getErrorFeedIssueStats**](docs/TracingApi.md#getErrorFeedIssueStats) | **GET** /tracer/feed/issues/stats/ | +*TracingApi* | [**getErrorFeedIssueStatsWithHttpInfo**](docs/TracingApi.md#getErrorFeedIssueStatsWithHttpInfo) | **GET** /tracer/feed/issues/stats/ | +*TracingApi* | [**getTrace**](docs/TracingApi.md#getTrace) | **GET** /tracer/trace/{id}/ | +*TracingApi* | [**getTraceWithHttpInfo**](docs/TracingApi.md#getTraceWithHttpInfo) | **GET** /tracer/trace/{id}/ | +*TracingApi* | [**getTraceGraphMethods**](docs/TracingApi.md#getTraceGraphMethods) | **POST** /tracer/trace/get_graph_methods/ | +*TracingApi* | [**getTraceGraphMethodsWithHttpInfo**](docs/TracingApi.md#getTraceGraphMethodsWithHttpInfo) | **POST** /tracer/trace/get_graph_methods/ | +*TracingApi* | [**getTraceSession**](docs/TracingApi.md#getTraceSession) | **GET** /tracer/trace-session/{id}/ | +*TracingApi* | [**getTraceSessionWithHttpInfo**](docs/TracingApi.md#getTraceSessionWithHttpInfo) | **GET** /tracer/trace-session/{id}/ | +*TracingApi* | [**getTraceSessionGraphData**](docs/TracingApi.md#getTraceSessionGraphData) | **POST** /tracer/trace-session/get_session_graph_data/ | Fetch time-series session metrics for the observe graph. +*TracingApi* | [**getTraceSessionGraphDataWithHttpInfo**](docs/TracingApi.md#getTraceSessionGraphDataWithHttpInfo) | **POST** /tracer/trace-session/get_session_graph_data/ | Fetch time-series session metrics for the observe graph. +*TracingApi* | [**getVoiceCallDetail**](docs/TracingApi.md#getVoiceCallDetail) | **GET** /tracer/trace/voice_call_detail/ | Return the heavy / detail-only fields for a single voice call. +*TracingApi* | [**getVoiceCallDetailWithHttpInfo**](docs/TracingApi.md#getVoiceCallDetailWithHttpInfo) | **GET** /tracer/trace/voice_call_detail/ | Return the heavy / detail-only fields for a single voice call. +*TracingApi* | [**listErrorFeedIssues**](docs/TracingApi.md#listErrorFeedIssues) | **GET** /tracer/feed/issues/ | +*TracingApi* | [**listErrorFeedIssuesWithHttpInfo**](docs/TracingApi.md#listErrorFeedIssuesWithHttpInfo) | **GET** /tracer/feed/issues/ | +*TracingApi* | [**listTraceAnnotationLabels**](docs/TracingApi.md#listTraceAnnotationLabels) | **GET** /tracer/get-annotation-labels/ | +*TracingApi* | [**listTraceAnnotationLabelsWithHttpInfo**](docs/TracingApi.md#listTraceAnnotationLabelsWithHttpInfo) | **GET** /tracer/get-annotation-labels/ | +*TracingApi* | [**listTraceProjects**](docs/TracingApi.md#listTraceProjects) | **GET** /tracer/project/list_projects/ | List projects filtered by organization ID. +*TracingApi* | [**listTraceProjectsWithHttpInfo**](docs/TracingApi.md#listTraceProjectsWithHttpInfo) | **GET** /tracer/project/list_projects/ | List projects filtered by organization ID. +*TracingApi* | [**listTraceProperties**](docs/TracingApi.md#listTraceProperties) | **GET** /tracer/trace/get_properties/ | +*TracingApi* | [**listTracePropertiesWithHttpInfo**](docs/TracingApi.md#listTracePropertiesWithHttpInfo) | **GET** /tracer/trace/get_properties/ | +*TracingApi* | [**listTraceSessions**](docs/TracingApi.md#listTraceSessions) | **GET** /tracer/trace-session/list_sessions/ | +*TracingApi* | [**listTraceSessionsWithHttpInfo**](docs/TracingApi.md#listTraceSessionsWithHttpInfo) | **GET** /tracer/trace-session/list_sessions/ | +*TracingApi* | [**listTraceUsers**](docs/TracingApi.md#listTraceUsers) | **GET** /tracer/users/ | +*TracingApi* | [**listTraceUsersWithHttpInfo**](docs/TracingApi.md#listTraceUsersWithHttpInfo) | **GET** /tracer/users/ | +*TracingApi* | [**listTraces**](docs/TracingApi.md#listTraces) | **GET** /tracer/trace/list_traces/ | +*TracingApi* | [**listTracesWithHttpInfo**](docs/TracingApi.md#listTracesWithHttpInfo) | **GET** /tracer/trace/list_traces/ | +*TracingApi* | [**listVoiceCalls**](docs/TracingApi.md#listVoiceCalls) | **GET** /tracer/trace/list_voice_calls/ | +*TracingApi* | [**listVoiceCallsWithHttpInfo**](docs/TracingApi.md#listVoiceCallsWithHttpInfo) | **GET** /tracer/trace/list_voice_calls/ | +*TracingApi* | [**updateTraceTags**](docs/TracingApi.md#updateTraceTags) | **PATCH** /tracer/trace/{id}/tags/ | +*TracingApi* | [**updateTraceTagsWithHttpInfo**](docs/TracingApi.md#updateTraceTagsWithHttpInfo) | **PATCH** /tracer/trace/{id}/tags/ | +*UsersApi* | [**getCurrentUser**](docs/UsersApi.md#getCurrentUser) | **GET** /accounts/user-info/ | +*UsersApi* | [**getCurrentUserWithHttpInfo**](docs/UsersApi.md#getCurrentUserWithHttpInfo) | **GET** /accounts/user-info/ | +*UsersApi* | [**listOrganizationMembers**](docs/UsersApi.md#listOrganizationMembers) | **GET** /accounts/organization/members/ | GET /accounts/organization/members/ +*UsersApi* | [**listOrganizationMembersWithHttpInfo**](docs/UsersApi.md#listOrganizationMembersWithHttpInfo) | **GET** /accounts/organization/members/ | GET /accounts/organization/members/ +*UsersApi* | [**listWorkspaceMembers**](docs/UsersApi.md#listWorkspaceMembers) | **GET** /accounts/workspace/{workspace_id}/members/ | GET /accounts/workspace/<workspace_id>/members/ +*UsersApi* | [**listWorkspaceMembersWithHttpInfo**](docs/UsersApi.md#listWorkspaceMembersWithHttpInfo) | **GET** /accounts/workspace/{workspace_id}/members/ | GET /accounts/workspace/<workspace_id>/members/ +*UsersApi* | [**listWorkspaces**](docs/UsersApi.md#listWorkspaces) | **GET** /accounts/workspace/list/ | +*UsersApi* | [**listWorkspacesWithHttpInfo**](docs/UsersApi.md#listWorkspacesWithHttpInfo) | **GET** /accounts/workspace/list/ | +*UsersApi* | [**switchWorkspace**](docs/UsersApi.md#switchWorkspace) | **POST** /accounts/workspace/switch/ | +*UsersApi* | [**switchWorkspaceWithHttpInfo**](docs/UsersApi.md#switchWorkspaceWithHttpInfo) | **POST** /accounts/workspace/switch/ | + + +## Documentation for Models + + - [AccountsErrorResponse](docs/AccountsErrorResponse.md) + - [AddApiColumnRequest](docs/AddApiColumnRequest.md) + - [AddAsNewDatasetRequest](docs/AddAsNewDatasetRequest.md) + - [AddEvalConfigsRequest](docs/AddEvalConfigsRequest.md) + - [AddEvalConfigsResponse](docs/AddEvalConfigsResponse.md) + - [AddItems](docs/AddItems.md) + - [AddQueueItem](docs/AddQueueItem.md) + - [AddRowsFromFileRequest](docs/AddRowsFromFileRequest.md) + - [AddRunPrompt](docs/AddRunPrompt.md) + - [AgentDefinitionBulkDeleteRequest](docs/AgentDefinitionBulkDeleteRequest.md) + - [AgentDefinitionBulkDeleteResponse](docs/AgentDefinitionBulkDeleteResponse.md) + - [AgentDefinitionCreateRequest](docs/AgentDefinitionCreateRequest.md) + - [AgentDefinitionCreateResponse](docs/AgentDefinitionCreateResponse.md) + - [AgentDefinitionDeleteResponse](docs/AgentDefinitionDeleteResponse.md) + - [AgentDefinitionEditRequest](docs/AgentDefinitionEditRequest.md) + - [AgentDefinitionEditResponse](docs/AgentDefinitionEditResponse.md) + - [AgentDefinitionListResponse](docs/AgentDefinitionListResponse.md) + - [AgentDefinitionResponse](docs/AgentDefinitionResponse.md) + - [AgentFlowGraph](docs/AgentFlowGraph.md) + - [AgentVersionActivateResponse](docs/AgentVersionActivateResponse.md) + - [AgentVersionCreateRequest](docs/AgentVersionCreateRequest.md) + - [AgentVersionCreateResponse](docs/AgentVersionCreateResponse.md) + - [AgentVersionDeleteResponse](docs/AgentVersionDeleteResponse.md) + - [AgentVersionListResponse](docs/AgentVersionListResponse.md) + - [AgentVersionResponse](docs/AgentVersionResponse.md) + - [AgentVersionRestoreResponse](docs/AgentVersionRestoreResponse.md) + - [AllActiveTests](docs/AllActiveTests.md) + - [AnnotationLabelResponse](docs/AnnotationLabelResponse.md) + - [AnnotationLabelRestoreResponse](docs/AnnotationLabelRestoreResponse.md) + - [AnnotationQueue](docs/AnnotationQueue.md) + - [AnnotationSummaryHeader](docs/AnnotationSummaryHeader.md) + - [AnnotationSummaryResponse](docs/AnnotationSummaryResponse.md) + - [AnnotationSummaryResult](docs/AnnotationSummaryResult.md) + - [AnnotationsLabels](docs/AnnotationsLabels.md) + - [ApiErrorResponse](docs/ApiErrorResponse.md) + - [ApiErrorWithDetailsResponse](docs/ApiErrorWithDetailsResponse.md) + - [ApiKey](docs/ApiKey.md) + - [ApiSelectionTooLargeDetail](docs/ApiSelectionTooLargeDetail.md) + - [ApiSelectionTooLargeError](docs/ApiSelectionTooLargeError.md) + - [ApiTextErrorResponse](docs/ApiTextErrorResponse.md) + - [AssignItems](docs/AssignItems.md) + - [AutomationRule](docs/AutomationRule.md) + - [AutomationRuleConditions](docs/AutomationRuleConditions.md) + - [AutomationRuleConditionsFilterInner](docs/AutomationRuleConditionsFilterInner.md) + - [AutomationRuleConditionsFilterInnerFilterConfig](docs/AutomationRuleConditionsFilterInnerFilterConfig.md) + - [AutomationRuleEvaluateAcceptedResponse](docs/AutomationRuleEvaluateAcceptedResponse.md) + - [AutomationRuleEvaluateResponse](docs/AutomationRuleEvaluateResponse.md) + - [AutomationRuleEvaluateResult](docs/AutomationRuleEvaluateResult.md) + - [AutomationRuleScope](docs/AutomationRuleScope.md) + - [BaseColumnsResponse](docs/BaseColumnsResponse.md) + - [BaseColumnsResponseResult](docs/BaseColumnsResponseResult.md) + - [BulkAnnotationAnnotationRequest](docs/BulkAnnotationAnnotationRequest.md) + - [BulkAnnotationNoteRequest](docs/BulkAnnotationNoteRequest.md) + - [BulkAnnotationRecordRequest](docs/BulkAnnotationRecordRequest.md) + - [BulkAnnotationRequest](docs/BulkAnnotationRequest.md) + - [BulkAnnotationResponse](docs/BulkAnnotationResponse.md) + - [BulkAnnotationResponseResult](docs/BulkAnnotationResponseResult.md) + - [BulkCreateScoreItem](docs/BulkCreateScoreItem.md) + - [BulkCreateScores](docs/BulkCreateScores.md) + - [BulkCreateScoresResponse](docs/BulkCreateScoresResponse.md) + - [BulkCreateScoresResult](docs/BulkCreateScoresResult.md) + - [BulkRemoveItems](docs/BulkRemoveItems.md) + - [CICDEvaluationItem](docs/CICDEvaluationItem.md) + - [CICDJob](docs/CICDJob.md) + - [CallBranchAnalysisResponse](docs/CallBranchAnalysisResponse.md) + - [CallBranchDeviationCreateResponse](docs/CallBranchDeviationCreateResponse.md) + - [CallExecution](docs/CallExecution.md) + - [CallExecutionDeleteResponse](docs/CallExecutionDeleteResponse.md) + - [CallExecutionDetail](docs/CallExecutionDetail.md) + - [CallExecutionErrorLocalizerTasksResponse](docs/CallExecutionErrorLocalizerTasksResponse.md) + - [CallExecutionErrorResponse](docs/CallExecutionErrorResponse.md) + - [CallExecutionLogsResponse](docs/CallExecutionLogsResponse.md) + - [CallExecutionRerun](docs/CallExecutionRerun.md) + - [CallExecutionStatusUpdate](docs/CallExecutionStatusUpdate.md) + - [CallLogEntryResponse](docs/CallLogEntryResponse.md) + - [CallTranscript](docs/CallTranscript.md) + - [CallTranscriptResponse](docs/CallTranscriptResponse.md) + - [CancelTestExecutionResponse](docs/CancelTestExecutionResponse.md) + - [ChatMessageContract](docs/ChatMessageContract.md) + - [ChatSDKCodeResponse](docs/ChatSDKCodeResponse.md) + - [ChatSDKCodeResult](docs/ChatSDKCodeResult.md) + - [ChatSendMessageResponse](docs/ChatSendMessageResponse.md) + - [ChatSendMessageResult](docs/ChatSendMessageResult.md) + - [ChatToolCall](docs/ChatToolCall.md) + - [ChatToolCallFunction](docs/ChatToolCallFunction.md) + - [ClassifyColumnRequest](docs/ClassifyColumnRequest.md) + - [CloneDatasetRequest](docs/CloneDatasetRequest.md) + - [CoOccurringIssue](docs/CoOccurringIssue.md) + - [Column](docs/Column.md) + - [ColumnDefinition](docs/ColumnDefinition.md) + - [ColumnOrder](docs/ColumnOrder.md) + - [ColumnTypeConversionResponse](docs/ColumnTypeConversionResponse.md) + - [ColumnTypeConversionResult](docs/ColumnTypeConversionResult.md) + - [CompareDataset](docs/CompareDataset.md) + - [CompareDatasetDeleteResponse](docs/CompareDatasetDeleteResponse.md) + - [CompareDatasetDeleteResult](docs/CompareDatasetDeleteResult.md) + - [CompareDatasetMetadata](docs/CompareDatasetMetadata.md) + - [CompareDatasetResponse](docs/CompareDatasetResponse.md) + - [CompareDatasetResult](docs/CompareDatasetResult.md) + - [CompareDatasetRowResponse](docs/CompareDatasetRowResponse.md) + - [CompareDatasetRowResult](docs/CompareDatasetRowResult.md) + - [CompareDatasetStatsRequest](docs/CompareDatasetStatsRequest.md) + - [CompareDatasetStatsResponse](docs/CompareDatasetStatsResponse.md) + - [CompareEvalListResponse](docs/CompareEvalListResponse.md) + - [CompareEvalListResult](docs/CompareEvalListResult.md) + - [CompareEvalsListRequest](docs/CompareEvalsListRequest.md) + - [CompareExperimentEvalRequest](docs/CompareExperimentEvalRequest.md) + - [ComparePreviewRunEvalRequest](docs/ComparePreviewRunEvalRequest.md) + - [CompareStartEvalsRequest](docs/CompareStartEvalsRequest.md) + - [CompositeChildItem](docs/CompositeChildItem.md) + - [CompositeChildResult](docs/CompositeChildResult.md) + - [CompositeEvalAdhocExecuteRequest](docs/CompositeEvalAdhocExecuteRequest.md) + - [CompositeEvalCreateRequest](docs/CompositeEvalCreateRequest.md) + - [CompositeEvalCreateResponse](docs/CompositeEvalCreateResponse.md) + - [CompositeEvalCreateResponseResult](docs/CompositeEvalCreateResponseResult.md) + - [CompositeEvalDetailResponse](docs/CompositeEvalDetailResponse.md) + - [CompositeEvalDetailResponseResult](docs/CompositeEvalDetailResponseResult.md) + - [CompositeEvalExecuteRequest](docs/CompositeEvalExecuteRequest.md) + - [CompositeEvalExecuteResponse](docs/CompositeEvalExecuteResponse.md) + - [CompositeEvalExecuteResponseResult](docs/CompositeEvalExecuteResponseResult.md) + - [CompositeEvalUpdateRequest](docs/CompositeEvalUpdateRequest.md) + - [ConditionalColumnRequest](docs/ConditionalColumnRequest.md) + - [ConfigureEvaluations](docs/ConfigureEvaluations.md) + - [CreateDatasetFromExperimentRequest](docs/CreateDatasetFromExperimentRequest.md) + - [CreateDatasetFromLocalFileRequest](docs/CreateDatasetFromLocalFileRequest.md) + - [CreateEmptyDatasetRequest](docs/CreateEmptyDatasetRequest.md) + - [CreateLinearIssue](docs/CreateLinearIssue.md) + - [CreateLinearIssueResponse](docs/CreateLinearIssueResponse.md) + - [CreateLinearIssueResult](docs/CreateLinearIssueResult.md) + - [CreatePromptSimulationRequest](docs/CreatePromptSimulationRequest.md) + - [CreateRunTest](docs/CreateRunTest.md) + - [CreateScore](docs/CreateScore.md) + - [Dataset](docs/Dataset.md) + - [DatasetAddColumnsRequest](docs/DatasetAddColumnsRequest.md) + - [DatasetAddEmptyColumnsRequest](docs/DatasetAddEmptyColumnsRequest.md) + - [DatasetAddEmptyRowsRequest](docs/DatasetAddEmptyRowsRequest.md) + - [DatasetAddRowsFromExistingRequest](docs/DatasetAddRowsFromExistingRequest.md) + - [DatasetAddRowsRequest](docs/DatasetAddRowsRequest.md) + - [DatasetBehaviorRequest](docs/DatasetBehaviorRequest.md) + - [DatasetCellDataRequest](docs/DatasetCellDataRequest.md) + - [DatasetCellDataResponse](docs/DatasetCellDataResponse.md) + - [DatasetCellValue](docs/DatasetCellValue.md) + - [DatasetColumnDetailItem](docs/DatasetColumnDetailItem.md) + - [DatasetColumnDetailResponse](docs/DatasetColumnDetailResponse.md) + - [DatasetColumnDetailResult](docs/DatasetColumnDetailResult.md) + - [DatasetColumnsMutationResponse](docs/DatasetColumnsMutationResponse.md) + - [DatasetColumnsMutationResult](docs/DatasetColumnsMutationResult.md) + - [DatasetCopyResponse](docs/DatasetCopyResponse.md) + - [DatasetCopyResult](docs/DatasetCopyResult.md) + - [DatasetCreateStartedResponse](docs/DatasetCreateStartedResponse.md) + - [DatasetCreateStartedResult](docs/DatasetCreateStartedResult.md) + - [DatasetCreationProgressResponse](docs/DatasetCreationProgressResponse.md) + - [DatasetCreationProgressResult](docs/DatasetCreationProgressResult.md) + - [DatasetDerivedVariablesResponse](docs/DatasetDerivedVariablesResponse.md) + - [DatasetDerivedVariablesResult](docs/DatasetDerivedVariablesResult.md) + - [DatasetEvalStatsItem](docs/DatasetEvalStatsItem.md) + - [DatasetEvalStatsMetric](docs/DatasetEvalStatsMetric.md) + - [DatasetEvalStatsResponse](docs/DatasetEvalStatsResponse.md) + - [DatasetExplanationSummaryResponse](docs/DatasetExplanationSummaryResponse.md) + - [DatasetExplanationSummaryResponseResult](docs/DatasetExplanationSummaryResponseResult.md) + - [DatasetJsonSchemaResponse](docs/DatasetJsonSchemaResponse.md) + - [DatasetListItem](docs/DatasetListItem.md) + - [DatasetListResponse](docs/DatasetListResponse.md) + - [DatasetListResult](docs/DatasetListResult.md) + - [DatasetMultipleStaticColumnsRequest](docs/DatasetMultipleStaticColumnsRequest.md) + - [DatasetNameItem](docs/DatasetNameItem.md) + - [DatasetNamesResponse](docs/DatasetNamesResponse.md) + - [DatasetNamesResult](docs/DatasetNamesResult.md) + - [DatasetRowDataRequest](docs/DatasetRowDataRequest.md) + - [DatasetRowDataRequestSortInner](docs/DatasetRowDataRequestSortInner.md) + - [DatasetRowDataResponse](docs/DatasetRowDataResponse.md) + - [DatasetRowDataResult](docs/DatasetRowDataResult.md) + - [DatasetRowDiffRequest](docs/DatasetRowDiffRequest.md) + - [DatasetRowNavigation](docs/DatasetRowNavigation.md) + - [DatasetRowsImportMessageResponse](docs/DatasetRowsImportMessageResponse.md) + - [DatasetRowsImportMessageResult](docs/DatasetRowsImportMessageResult.md) + - [DatasetRowsImportedResponse](docs/DatasetRowsImportedResponse.md) + - [DatasetRowsImportedResult](docs/DatasetRowsImportedResult.md) + - [DatasetRunPromptStatsPrompt](docs/DatasetRunPromptStatsPrompt.md) + - [DatasetRunPromptStatsResponse](docs/DatasetRunPromptStatsResponse.md) + - [DatasetRunPromptStatsResult](docs/DatasetRunPromptStatsResult.md) + - [DatasetSdkRowsCode](docs/DatasetSdkRowsCode.md) + - [DatasetSdkRowsRequest](docs/DatasetSdkRowsRequest.md) + - [DatasetSdkRowsResponse](docs/DatasetSdkRowsResponse.md) + - [DatasetSdkRowsResult](docs/DatasetSdkRowsResult.md) + - [DatasetStaticColumnRequest](docs/DatasetStaticColumnRequest.md) + - [DatasetTableMetadata](docs/DatasetTableMetadata.md) + - [DatasetTableResponse](docs/DatasetTableResponse.md) + - [DatasetTableResult](docs/DatasetTableResult.md) + - [DatasetUpdateCellValueRequest](docs/DatasetUpdateCellValueRequest.md) + - [DatasetUpdateColumnNameRequest](docs/DatasetUpdateColumnNameRequest.md) + - [DatasetUpdateColumnTypeRequest](docs/DatasetUpdateColumnTypeRequest.md) + - [DeepAnalysisApiResponse](docs/DeepAnalysisApiResponse.md) + - [DeepAnalysisBody](docs/DeepAnalysisBody.md) + - [DeepAnalysisDispatchApiResponse](docs/DeepAnalysisDispatchApiResponse.md) + - [DeepAnalysisDispatchResponse](docs/DeepAnalysisDispatchResponse.md) + - [DeepAnalysisResponse](docs/DeepAnalysisResponse.md) + - [DeleteEvalConfigResponse](docs/DeleteEvalConfigResponse.md) + - [DeleteEvalTemplate](docs/DeleteEvalTemplate.md) + - [DerivedVariableDetail](docs/DerivedVariableDetail.md) + - [DerivedVariableDetailResponse](docs/DerivedVariableDetailResponse.md) + - [DerivedVariableExtractRequest](docs/DerivedVariableExtractRequest.md) + - [DerivedVariablePreviewRequest](docs/DerivedVariablePreviewRequest.md) + - [DevelopDatasetMessageResponse](docs/DevelopDatasetMessageResponse.md) + - [DiscussionCommentRequest](docs/DiscussionCommentRequest.md) + - [DiscussionReactionRequest](docs/DiscussionReactionRequest.md) + - [DiscussionThreadStatusRequest](docs/DiscussionThreadStatusRequest.md) + - [DuplicateDatasetRequest](docs/DuplicateDatasetRequest.md) + - [DuplicateDatasetResponse](docs/DuplicateDatasetResponse.md) + - [DuplicateDatasetResult](docs/DuplicateDatasetResult.md) + - [DuplicateRowsRequest](docs/DuplicateRowsRequest.md) + - [DuplicateRowsResponse](docs/DuplicateRowsResponse.md) + - [DuplicateRowsResult](docs/DuplicateRowsResult.md) + - [DynamicColumnCreateResponse](docs/DynamicColumnCreateResponse.md) + - [DynamicColumnCreateResult](docs/DynamicColumnCreateResult.md) + - [DynamicColumnMessageResponse](docs/DynamicColumnMessageResponse.md) + - [DynamicColumnMessageResult](docs/DynamicColumnMessageResult.md) + - [EditRunPromptColumn](docs/EditRunPromptColumn.md) + - [ErrorLocalizerTaskResponse](docs/ErrorLocalizerTaskResponse.md) + - [ErrorName](docs/ErrorName.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [EvalConfigDefinition](docs/EvalConfigDefinition.md) + - [EvalConfigResponse](docs/EvalConfigResponse.md) + - [EvalConfigStructure](docs/EvalConfigStructure.md) + - [EvalConfigStructureResponse](docs/EvalConfigStructureResponse.md) + - [EvalConfigStructureResult](docs/EvalConfigStructureResult.md) + - [EvalConfigUpdateRequest](docs/EvalConfigUpdateRequest.md) + - [EvalConfigUpdateResponse](docs/EvalConfigUpdateResponse.md) + - [EvalErrorResponse](docs/EvalErrorResponse.md) + - [EvalExplanationCluster](docs/EvalExplanationCluster.md) + - [EvalExplanationSummaryRefreshResponse](docs/EvalExplanationSummaryRefreshResponse.md) + - [EvalExplanationSummaryRefreshResult](docs/EvalExplanationSummaryRefreshResult.md) + - [EvalExplanationSummaryResponse](docs/EvalExplanationSummaryResponse.md) + - [EvalExplanationSummaryResult](docs/EvalExplanationSummaryResult.md) + - [EvalFeedbackListItem](docs/EvalFeedbackListItem.md) + - [EvalFeedbackListResponse](docs/EvalFeedbackListResponse.md) + - [EvalFeedbackListResponseResult](docs/EvalFeedbackListResponseResult.md) + - [EvalFunctionListResponse](docs/EvalFunctionListResponse.md) + - [EvalFunctionListResult](docs/EvalFunctionListResult.md) + - [EvalListFilters](docs/EvalListFilters.md) + - [EvalListRequest](docs/EvalListRequest.md) + - [EvalListResponse](docs/EvalListResponse.md) + - [EvalListResult](docs/EvalListResult.md) + - [EvalMetricEntry](docs/EvalMetricEntry.md) + - [EvalPreviewResponse](docs/EvalPreviewResponse.md) + - [EvalPreviewResult](docs/EvalPreviewResult.md) + - [EvalStructure](docs/EvalStructure.md) + - [EvalStructureResponse](docs/EvalStructureResponse.md) + - [EvalStructureResult](docs/EvalStructureResult.md) + - [EvalSummaryComparisonResponse](docs/EvalSummaryComparisonResponse.md) + - [EvalSummaryResponse](docs/EvalSummaryResponse.md) + - [EvalTemplateBulkDeleteRequest](docs/EvalTemplateBulkDeleteRequest.md) + - [EvalTemplateBulkDeleteResponse](docs/EvalTemplateBulkDeleteResponse.md) + - [EvalTemplateBulkDeleteResponseResult](docs/EvalTemplateBulkDeleteResponseResult.md) + - [EvalTemplateChartPoint](docs/EvalTemplateChartPoint.md) + - [EvalTemplateCreateResponse](docs/EvalTemplateCreateResponse.md) + - [EvalTemplateCreateResponseResult](docs/EvalTemplateCreateResponseResult.md) + - [EvalTemplateCreateV2Request](docs/EvalTemplateCreateV2Request.md) + - [EvalTemplateDetailResponse](docs/EvalTemplateDetailResponse.md) + - [EvalTemplateDetailResponseResult](docs/EvalTemplateDetailResponseResult.md) + - [EvalTemplateListChartsItem](docs/EvalTemplateListChartsItem.md) + - [EvalTemplateListChartsRequest](docs/EvalTemplateListChartsRequest.md) + - [EvalTemplateListChartsResponse](docs/EvalTemplateListChartsResponse.md) + - [EvalTemplateListChartsResponseResult](docs/EvalTemplateListChartsResponseResult.md) + - [EvalTemplateListItem](docs/EvalTemplateListItem.md) + - [EvalTemplateListResponse](docs/EvalTemplateListResponse.md) + - [EvalTemplateListResponseResult](docs/EvalTemplateListResponseResult.md) + - [EvalTemplateSummary](docs/EvalTemplateSummary.md) + - [EvalTemplateUpdateResponse](docs/EvalTemplateUpdateResponse.md) + - [EvalTemplateUpdateResponseResult](docs/EvalTemplateUpdateResponseResult.md) + - [EvalTemplateUpdateV2Request](docs/EvalTemplateUpdateV2Request.md) + - [EvalTemplateVersionCreateRequest](docs/EvalTemplateVersionCreateRequest.md) + - [EvalTemplateVersionItem](docs/EvalTemplateVersionItem.md) + - [EvalTemplateVersionListResponse](docs/EvalTemplateVersionListResponse.md) + - [EvalTemplateVersionListResponseResult](docs/EvalTemplateVersionListResponseResult.md) + - [EvalTemplateVersionResponse](docs/EvalTemplateVersionResponse.md) + - [EvalTemplateVersionResponseResult](docs/EvalTemplateVersionResponseResult.md) + - [EvalTemplateVersionRestoreResponse](docs/EvalTemplateVersionRestoreResponse.md) + - [EvalTemplateVersionRestoreResponseResult](docs/EvalTemplateVersionRestoreResponseResult.md) + - [EvalUsageChartPoint](docs/EvalUsageChartPoint.md) + - [EvalUsageFeedback](docs/EvalUsageFeedback.md) + - [EvalUsageLogItem](docs/EvalUsageLogItem.md) + - [EvalUsageLogs](docs/EvalUsageLogs.md) + - [EvalUsageStats](docs/EvalUsageStats.md) + - [EvalUsageStatsResponse](docs/EvalUsageStatsResponse.md) + - [EvalUsageStatsResponseResult](docs/EvalUsageStatsResponseResult.md) + - [EvaluationResult](docs/EvaluationResult.md) + - [EventsOverTimePoint](docs/EventsOverTimePoint.md) + - [ExecutePromptSimulationRequest](docs/ExecutePromptSimulationRequest.md) + - [ExecutePromptSimulationResponse](docs/ExecutePromptSimulationResponse.md) + - [ExecutePromptSimulationResult](docs/ExecutePromptSimulationResult.md) + - [ExecuteRunTest](docs/ExecuteRunTest.md) + - [ExecutionMetrics](docs/ExecutionMetrics.md) + - [ExecutionRuns](docs/ExecutionRuns.md) + - [ExperimentComparisonColumnMetric](docs/ExperimentComparisonColumnMetric.md) + - [ExperimentComparisonDatasetMetric](docs/ExperimentComparisonDatasetMetric.md) + - [ExperimentComparisonDetail](docs/ExperimentComparisonDetail.md) + - [ExperimentComparisonDetailsResponse](docs/ExperimentComparisonDetailsResponse.md) + - [ExperimentComparisonDetailsResult](docs/ExperimentComparisonDetailsResult.md) + - [ExperimentComparisonMetrics](docs/ExperimentComparisonMetrics.md) + - [ExperimentComparisonNormalizedMetrics](docs/ExperimentComparisonNormalizedMetrics.md) + - [ExperimentComparisonRawMetrics](docs/ExperimentComparisonRawMetrics.md) + - [ExperimentComparisonWeights](docs/ExperimentComparisonWeights.md) + - [ExperimentComparisonWeightsRequest](docs/ExperimentComparisonWeightsRequest.md) + - [ExperimentCreateV2](docs/ExperimentCreateV2.md) + - [ExperimentDatasetComparisonResponse](docs/ExperimentDatasetComparisonResponse.md) + - [ExperimentDatasetComparisonResult](docs/ExperimentDatasetComparisonResult.md) + - [ExperimentDerivedVariablesResponse](docs/ExperimentDerivedVariablesResponse.md) + - [ExperimentDerivedVariablesResult](docs/ExperimentDerivedVariablesResult.md) + - [ExperimentDetailV2](docs/ExperimentDetailV2.md) + - [ExperimentEvaluationColumnStats](docs/ExperimentEvaluationColumnStats.md) + - [ExperimentEvaluationStatsResponse](docs/ExperimentEvaluationStatsResponse.md) + - [ExperimentEvaluationStatsResult](docs/ExperimentEvaluationStatsResult.md) + - [ExperimentEvaluationTokenUsage](docs/ExperimentEvaluationTokenUsage.md) + - [ExperimentFeedbackCreateResponse](docs/ExperimentFeedbackCreateResponse.md) + - [ExperimentFeedbackCreateResult](docs/ExperimentFeedbackCreateResult.md) + - [ExperimentFeedbackDetailItem](docs/ExperimentFeedbackDetailItem.md) + - [ExperimentFeedbackDetailsResponse](docs/ExperimentFeedbackDetailsResponse.md) + - [ExperimentFeedbackDetailsResult](docs/ExperimentFeedbackDetailsResult.md) + - [ExperimentFeedbackSubmitRequest](docs/ExperimentFeedbackSubmitRequest.md) + - [ExperimentFeedbackSubmitResponse](docs/ExperimentFeedbackSubmitResponse.md) + - [ExperimentFeedbackSubmitResult](docs/ExperimentFeedbackSubmitResult.md) + - [ExperimentFeedbackTemplateResponse](docs/ExperimentFeedbackTemplateResponse.md) + - [ExperimentFeedbackTemplateResult](docs/ExperimentFeedbackTemplateResult.md) + - [ExperimentJsonSchemaResponse](docs/ExperimentJsonSchemaResponse.md) + - [ExperimentListV2](docs/ExperimentListV2.md) + - [ExperimentNameSuggestionResponse](docs/ExperimentNameSuggestionResponse.md) + - [ExperimentNameSuggestionResult](docs/ExperimentNameSuggestionResult.md) + - [ExperimentNameValidationResponse](docs/ExperimentNameValidationResponse.md) + - [ExperimentNameValidationResult](docs/ExperimentNameValidationResult.md) + - [ExperimentRerunCells](docs/ExperimentRerunCells.md) + - [ExperimentRerunRequest](docs/ExperimentRerunRequest.md) + - [ExperimentRowDiffCell](docs/ExperimentRowDiffCell.md) + - [ExperimentRowDiffResponse](docs/ExperimentRowDiffResponse.md) + - [ExperimentStatsColumnConfig](docs/ExperimentStatsColumnConfig.md) + - [ExperimentStatsMetadata](docs/ExperimentStatsMetadata.md) + - [ExperimentStatsResponse](docs/ExperimentStatsResponse.md) + - [ExperimentStatsResult](docs/ExperimentStatsResult.md) + - [ExperimentStopResponse](docs/ExperimentStopResponse.md) + - [ExperimentStopResult](docs/ExperimentStopResult.md) + - [ExperimentStopWorkflowsCancelled](docs/ExperimentStopWorkflowsCancelled.md) + - [ExperimentStringResultResponse](docs/ExperimentStringResultResponse.md) + - [ExperimentTableRowsColumnConfig](docs/ExperimentTableRowsColumnConfig.md) + - [ExperimentTableRowsMetadata](docs/ExperimentTableRowsMetadata.md) + - [ExperimentTableRowsResponse](docs/ExperimentTableRowsResponse.md) + - [ExperimentTableRowsResult](docs/ExperimentTableRowsResult.md) + - [ExperimentUpdateV2](docs/ExperimentUpdateV2.md) + - [ExperimentV2DetailResponse](docs/ExperimentV2DetailResponse.md) + - [ExperimentWorkflowResponse](docs/ExperimentWorkflowResponse.md) + - [ExperimentWorkflowResult](docs/ExperimentWorkflowResult.md) + - [ExtractEntitiesRequest](docs/ExtractEntitiesRequest.md) + - [ExtractJsonColumnRequest](docs/ExtractJsonColumnRequest.md) + - [FailedRerunItem](docs/FailedRerunItem.md) + - [FeedDetailApiResponse](docs/FeedDetailApiResponse.md) + - [FeedDetailCore](docs/FeedDetailCore.md) + - [FeedListApiResponse](docs/FeedListApiResponse.md) + - [FeedListResponse](docs/FeedListResponse.md) + - [FeedListRow](docs/FeedListRow.md) + - [FeedSidebar](docs/FeedSidebar.md) + - [FeedSidebarApiResponse](docs/FeedSidebarApiResponse.md) + - [FeedStats](docs/FeedStats.md) + - [FeedStatsApiResponse](docs/FeedStatsApiResponse.md) + - [FeedUpdateBody](docs/FeedUpdateBody.md) + - [Feedback](docs/Feedback.md) + - [GetAnnotationLabelsResponse](docs/GetAnnotationLabelsResponse.md) + - [GetTraceAnnotation](docs/GetTraceAnnotation.md) + - [GetTraceAnnotationValuesResponse](docs/GetTraceAnnotationValuesResponse.md) + - [GetTraceAnnotationValuesResult](docs/GetTraceAnnotationValuesResult.md) + - [GroundTruthConfig](docs/GroundTruthConfig.md) + - [GroundTruthConfigRequest](docs/GroundTruthConfigRequest.md) + - [GroundTruthConfigResponse](docs/GroundTruthConfigResponse.md) + - [GroundTruthConfigResponseResult](docs/GroundTruthConfigResponseResult.md) + - [GroundTruthItem](docs/GroundTruthItem.md) + - [GroundTruthListResponse](docs/GroundTruthListResponse.md) + - [GroundTruthListResponseResult](docs/GroundTruthListResponseResult.md) + - [GroundTruthUploadRequest](docs/GroundTruthUploadRequest.md) + - [GroundTruthUploadResponse](docs/GroundTruthUploadResponse.md) + - [GroundTruthUploadResponseResult](docs/GroundTruthUploadResponseResult.md) + - [HeatmapCell](docs/HeatmapCell.md) + - [HuggingFaceAddRowsRequest](docs/HuggingFaceAddRowsRequest.md) + - [HuggingFaceDatasetConfigRequest](docs/HuggingFaceDatasetConfigRequest.md) + - [HuggingFaceDatasetConfigResponse](docs/HuggingFaceDatasetConfigResponse.md) + - [HuggingFaceDatasetConfigResult](docs/HuggingFaceDatasetConfigResult.md) + - [HuggingFaceDatasetCreateRequest](docs/HuggingFaceDatasetCreateRequest.md) + - [HuggingFaceDatasetDetail](docs/HuggingFaceDatasetDetail.md) + - [HuggingFaceDatasetDetailRequest](docs/HuggingFaceDatasetDetailRequest.md) + - [HuggingFaceDatasetDetailResponse](docs/HuggingFaceDatasetDetailResponse.md) + - [HuggingFaceDatasetDetailResponseResult](docs/HuggingFaceDatasetDetailResponseResult.md) + - [HuggingFaceDatasetListItem](docs/HuggingFaceDatasetListItem.md) + - [HuggingFaceDatasetListRequest](docs/HuggingFaceDatasetListRequest.md) + - [HuggingFaceDatasetListResponse](docs/HuggingFaceDatasetListResponse.md) + - [HuggingFaceDatasetListResponseResult](docs/HuggingFaceDatasetListResponseResult.md) + - [ImportAnnotationEntry](docs/ImportAnnotationEntry.md) + - [ImportAnnotations](docs/ImportAnnotations.md) + - [JsonColumnSchemaEntry](docs/JsonColumnSchemaEntry.md) + - [KeyMoment](docs/KeyMoment.md) + - [LegacyKnowledgeBaseCreateResponse](docs/LegacyKnowledgeBaseCreateResponse.md) + - [LegacyKnowledgeBaseCreateResult](docs/LegacyKnowledgeBaseCreateResult.md) + - [LegacyKnowledgeBaseFileRow](docs/LegacyKnowledgeBaseFileRow.md) + - [LegacyKnowledgeBaseFilesRequest](docs/LegacyKnowledgeBaseFilesRequest.md) + - [LegacyKnowledgeBaseFilesResponse](docs/LegacyKnowledgeBaseFilesResponse.md) + - [LegacyKnowledgeBaseFilesResult](docs/LegacyKnowledgeBaseFilesResult.md) + - [LegacyKnowledgeBaseListResponse](docs/LegacyKnowledgeBaseListResponse.md) + - [LegacyKnowledgeBaseListResult](docs/LegacyKnowledgeBaseListResult.md) + - [LegacyKnowledgeBaseMutationRequest](docs/LegacyKnowledgeBaseMutationRequest.md) + - [LegacyKnowledgeBaseMutationResponse](docs/LegacyKnowledgeBaseMutationResponse.md) + - [LegacyKnowledgeBaseMutationResult](docs/LegacyKnowledgeBaseMutationResult.md) + - [LegacyKnowledgeBaseOption](docs/LegacyKnowledgeBaseOption.md) + - [LegacyKnowledgeBaseSdkCodeResponse](docs/LegacyKnowledgeBaseSdkCodeResponse.md) + - [LegacyKnowledgeBaseSdkCodeResult](docs/LegacyKnowledgeBaseSdkCodeResult.md) + - [LegacyKnowledgeBaseTableColumn](docs/LegacyKnowledgeBaseTableColumn.md) + - [LegacyKnowledgeBaseTableResponse](docs/LegacyKnowledgeBaseTableResponse.md) + - [LegacyKnowledgeBaseTableResult](docs/LegacyKnowledgeBaseTableResult.md) + - [LegacyKnowledgeBaseTableRow](docs/LegacyKnowledgeBaseTableRow.md) + - [ListAlertLogs200Response](docs/ListAlertLogs200Response.md) + - [ListAlerts200Response](docs/ListAlerts200Response.md) + - [ListAnnotationQueueItems200Response](docs/ListAnnotationQueueItems200Response.md) + - [ListAnnotationQueues200Response](docs/ListAnnotationQueues200Response.md) + - [ListExperiments200Response](docs/ListExperiments200Response.md) + - [ListPersonas200Response](docs/ListPersonas200Response.md) + - [ListTraceProjects200Response](docs/ListTraceProjects200Response.md) + - [LocalFileDatasetCreateStartedResponse](docs/LocalFileDatasetCreateStartedResponse.md) + - [LocalFileDatasetCreateStartedResult](docs/LocalFileDatasetCreateStartedResult.md) + - [ManagementAPIErrorResponse](docs/ManagementAPIErrorResponse.md) + - [ManualDatasetCreateRequest](docs/ManualDatasetCreateRequest.md) + - [ManualDatasetCreateResponse](docs/ManualDatasetCreateResponse.md) + - [ManualDatasetCreateResult](docs/ManualDatasetCreateResult.md) + - [MemberListItem](docs/MemberListItem.md) + - [MemberListResponse](docs/MemberListResponse.md) + - [MemberListResult](docs/MemberListResult.md) + - [MemberRemove](docs/MemberRemove.md) + - [MemberRoleUpdate](docs/MemberRoleUpdate.md) + - [MemberRoleUpdateResponse](docs/MemberRoleUpdateResponse.md) + - [MemberRoleUpdateResult](docs/MemberRoleUpdateResult.md) + - [MemberUserMutationResponse](docs/MemberUserMutationResponse.md) + - [MemberUserMutationResult](docs/MemberUserMutationResult.md) + - [MemberWorkspaceAccess](docs/MemberWorkspaceAccess.md) + - [MergeDatasetRequest](docs/MergeDatasetRequest.md) + - [MergeDatasetResponse](docs/MergeDatasetResponse.md) + - [MergeDatasetResult](docs/MergeDatasetResult.md) + - [ModelHubAnnotationQueuesAutomationRulesList200Response](docs/ModelHubAnnotationQueuesAutomationRulesList200Response.md) + - [ModelHubApiKeysList200Response](docs/ModelHubApiKeysList200Response.md) + - [ModelHubErrorResponse](docs/ModelHubErrorResponse.md) + - [ModelHubPaginatedResponse](docs/ModelHubPaginatedResponse.md) + - [ModelHubPromptHistoryExecutionsList200Response](docs/ModelHubPromptHistoryExecutionsList200Response.md) + - [ModelHubPromptLabelsList200Response](docs/ModelHubPromptLabelsList200Response.md) + - [ModelHubPromptTemplatesList200Response](docs/ModelHubPromptTemplatesList200Response.md) + - [ModelHubScoresList200Response](docs/ModelHubScoresList200Response.md) + - [ModelHubStringResultResponse](docs/ModelHubStringResultResponse.md) + - [ModelHubTextErrorResponse](docs/ModelHubTextErrorResponse.md) + - [ObserveGraphDataPoint](docs/ObserveGraphDataPoint.md) + - [ObserveGraphDataRequest](docs/ObserveGraphDataRequest.md) + - [ObserveGraphDataResponse](docs/ObserveGraphDataResponse.md) + - [ObserveGraphDataResult](docs/ObserveGraphDataResult.md) + - [OptimiserAnalysisRefreshResponse](docs/OptimiserAnalysisRefreshResponse.md) + - [OptimiserAnalysisRefreshResult](docs/OptimiserAnalysisRefreshResult.md) + - [OptimiserAnalysisResponse](docs/OptimiserAnalysisResponse.md) + - [OptimiserAnalysisResultPayload](docs/OptimiserAnalysisResultPayload.md) + - [Organization](docs/Organization.md) + - [OverviewApiResponse](docs/OverviewApiResponse.md) + - [OverviewResponse](docs/OverviewResponse.md) + - [PatternInsight](docs/PatternInsight.md) + - [PatternSummary](docs/PatternSummary.md) + - [PerformanceSummary](docs/PerformanceSummary.md) + - [Persona](docs/Persona.md) + - [PersonaCreate](docs/PersonaCreate.md) + - [PersonaDuplicateRequest](docs/PersonaDuplicateRequest.md) + - [PersonaDuplicateResponse](docs/PersonaDuplicateResponse.md) + - [PersonaFieldOptions](docs/PersonaFieldOptions.md) + - [PersonaList](docs/PersonaList.md) + - [PreviewDatasetOperationRequest](docs/PreviewDatasetOperationRequest.md) + - [PreviewDatasetOperationResponse](docs/PreviewDatasetOperationResponse.md) + - [PreviewDatasetOperationResult](docs/PreviewDatasetOperationResult.md) + - [PreviewDatasetOperationResultItem](docs/PreviewDatasetOperationResultItem.md) + - [PreviewRunEvalRequest](docs/PreviewRunEvalRequest.md) + - [PreviewRunPrompt](docs/PreviewRunPrompt.md) + - [Project](docs/Project.md) + - [PromptConfig](docs/PromptConfig.md) + - [PromptConfigEntry](docs/PromptConfigEntry.md) + - [PromptDerivedVariablesResponse](docs/PromptDerivedVariablesResponse.md) + - [PromptDerivedVariablesResult](docs/PromptDerivedVariablesResult.md) + - [PromptHistoryExecution](docs/PromptHistoryExecution.md) + - [PromptLabel](docs/PromptLabel.md) + - [PromptSimulationListResponse](docs/PromptSimulationListResponse.md) + - [PromptSimulationListResult](docs/PromptSimulationListResult.md) + - [PromptSimulationRunResponse](docs/PromptSimulationRunResponse.md) + - [PromptSimulationScenarioItem](docs/PromptSimulationScenarioItem.md) + - [PromptSimulationScenariosResponse](docs/PromptSimulationScenariosResponse.md) + - [PromptSimulationScenariosResult](docs/PromptSimulationScenariosResult.md) + - [PromptSimulationTemplateSummary](docs/PromptSimulationTemplateSummary.md) + - [PromptSimulationUpdateRequest](docs/PromptSimulationUpdateRequest.md) + - [PromptTemplate](docs/PromptTemplate.md) + - [ProviderStatusItem](docs/ProviderStatusItem.md) + - [ProviderStatusResponse](docs/ProviderStatusResponse.md) + - [ProviderStatusResult](docs/ProviderStatusResult.md) + - [QueueAddItemsResponse](docs/QueueAddItemsResponse.md) + - [QueueAddItemsResult](docs/QueueAddItemsResult.md) + - [QueueAddLabelResponse](docs/QueueAddLabelResponse.md) + - [QueueAddLabelResult](docs/QueueAddLabelResult.md) + - [QueueAgreementAnnotatorPair](docs/QueueAgreementAnnotatorPair.md) + - [QueueAgreementLabel](docs/QueueAgreementLabel.md) + - [QueueAgreementResponse](docs/QueueAgreementResponse.md) + - [QueueAgreementResult](docs/QueueAgreementResult.md) + - [QueueAnalyticsAnnotatorPerformance](docs/QueueAnalyticsAnnotatorPerformance.md) + - [QueueAnalyticsResponse](docs/QueueAnalyticsResponse.md) + - [QueueAnalyticsResult](docs/QueueAnalyticsResult.md) + - [QueueAnalyticsThroughput](docs/QueueAnalyticsThroughput.md) + - [QueueAnalyticsThroughputDaily](docs/QueueAnalyticsThroughputDaily.md) + - [QueueAnnotateDetailResponse](docs/QueueAnnotateDetailResponse.md) + - [QueueAnnotateDetailResult](docs/QueueAnnotateDetailResult.md) + - [QueueAnnotatorNested](docs/QueueAnnotatorNested.md) + - [QueueAssignItemsResponse](docs/QueueAssignItemsResponse.md) + - [QueueAssignItemsResult](docs/QueueAssignItemsResult.md) + - [QueueBulkRemoveItemsResponse](docs/QueueBulkRemoveItemsResponse.md) + - [QueueBulkRemoveItemsResult](docs/QueueBulkRemoveItemsResult.md) + - [QueueDefaultQueue](docs/QueueDefaultQueue.md) + - [QueueDefaultRequest](docs/QueueDefaultRequest.md) + - [QueueDefaultResponse](docs/QueueDefaultResponse.md) + - [QueueDefaultResult](docs/QueueDefaultResult.md) + - [QueueDiscussionResponse](docs/QueueDiscussionResponse.md) + - [QueueDiscussionResult](docs/QueueDiscussionResult.md) + - [QueueExportAnnotationsResponse](docs/QueueExportAnnotationsResponse.md) + - [QueueExportColumnMapping](docs/QueueExportColumnMapping.md) + - [QueueExportDefaultMapping](docs/QueueExportDefaultMapping.md) + - [QueueExportField](docs/QueueExportField.md) + - [QueueExportFieldsResponse](docs/QueueExportFieldsResponse.md) + - [QueueExportFieldsResult](docs/QueueExportFieldsResult.md) + - [QueueExportToDatasetRequest](docs/QueueExportToDatasetRequest.md) + - [QueueExportToDatasetResponse](docs/QueueExportToDatasetResponse.md) + - [QueueExportToDatasetResult](docs/QueueExportToDatasetResult.md) + - [QueueForSourceEntry](docs/QueueForSourceEntry.md) + - [QueueForSourceItem](docs/QueueForSourceItem.md) + - [QueueForSourceQueue](docs/QueueForSourceQueue.md) + - [QueueForSourceResponse](docs/QueueForSourceResponse.md) + - [QueueHardDeleteRequest](docs/QueueHardDeleteRequest.md) + - [QueueHardDeleteResponse](docs/QueueHardDeleteResponse.md) + - [QueueHardDeleteResult](docs/QueueHardDeleteResult.md) + - [QueueImportAnnotationsResponse](docs/QueueImportAnnotationsResponse.md) + - [QueueImportAnnotationsResult](docs/QueueImportAnnotationsResult.md) + - [QueueItem](docs/QueueItem.md) + - [QueueItemAnnotationsResponse](docs/QueueItemAnnotationsResponse.md) + - [QueueItemNavigationRequest](docs/QueueItemNavigationRequest.md) + - [QueueLabelNested](docs/QueueLabelNested.md) + - [QueueLabelRequest](docs/QueueLabelRequest.md) + - [QueueLabelResult](docs/QueueLabelResult.md) + - [QueueNavigationResponse](docs/QueueNavigationResponse.md) + - [QueueNavigationResult](docs/QueueNavigationResult.md) + - [QueueNextItemResponse](docs/QueueNextItemResponse.md) + - [QueueNextItemResult](docs/QueueNextItemResult.md) + - [QueueProgressAnnotatorStat](docs/QueueProgressAnnotatorStat.md) + - [QueueProgressResponse](docs/QueueProgressResponse.md) + - [QueueProgressResult](docs/QueueProgressResult.md) + - [QueueProgressUserProgress](docs/QueueProgressUserProgress.md) + - [QueueReleaseReservationResponse](docs/QueueReleaseReservationResponse.md) + - [QueueReleaseReservationResult](docs/QueueReleaseReservationResult.md) + - [QueueRemoveLabelResponse](docs/QueueRemoveLabelResponse.md) + - [QueueRemoveLabelResult](docs/QueueRemoveLabelResult.md) + - [QueueReviewItemResponse](docs/QueueReviewItemResponse.md) + - [QueueReviewItemResult](docs/QueueReviewItemResult.md) + - [QueueStatusRequest](docs/QueueStatusRequest.md) + - [QueueStatusResponse](docs/QueueStatusResponse.md) + - [QueueSubmitAnnotationsResponse](docs/QueueSubmitAnnotationsResponse.md) + - [QueueSubmitAnnotationsResult](docs/QueueSubmitAnnotationsResult.md) + - [Recommendation](docs/Recommendation.md) + - [RepresentativeTrace](docs/RepresentativeTrace.md) + - [ReqDataConfig](docs/ReqDataConfig.md) + - [RerunCallsResponse](docs/RerunCallsResponse.md) + - [RerunCellEntry](docs/RerunCellEntry.md) + - [ReviewItemRequest](docs/ReviewItemRequest.md) + - [ReviewLabelCommentRequest](docs/ReviewLabelCommentRequest.md) + - [RootCause](docs/RootCause.md) + - [RulesInner](docs/RulesInner.md) + - [RunNewEvalsOnTestExecution](docs/RunNewEvalsOnTestExecution.md) + - [RunNewEvalsResponse](docs/RunNewEvalsResponse.md) + - [RunPromptChoiceOption](docs/RunPromptChoiceOption.md) + - [RunPromptColumnConfigResponse](docs/RunPromptColumnConfigResponse.md) + - [RunPromptColumnConfigResult](docs/RunPromptColumnConfigResult.md) + - [RunPromptColumnPreviewResponse](docs/RunPromptColumnPreviewResponse.md) + - [RunPromptColumnPreviewResult](docs/RunPromptColumnPreviewResult.md) + - [RunPromptOptionsResponse](docs/RunPromptOptionsResponse.md) + - [RunPromptOptionsResult](docs/RunPromptOptionsResult.md) + - [RunPromptToolOption](docs/RunPromptToolOption.md) + - [RunTestAnalytics](docs/RunTestAnalytics.md) + - [RunTestCallExecutionsResponse](docs/RunTestCallExecutionsResponse.md) + - [RunTestChatExecutionResponse](docs/RunTestChatExecutionResponse.md) + - [RunTestChatExecutionResult](docs/RunTestChatExecutionResult.md) + - [RunTestComponentsUpdate](docs/RunTestComponentsUpdate.md) + - [RunTestErrorResponse](docs/RunTestErrorResponse.md) + - [RunTestExecutionResponse](docs/RunTestExecutionResponse.md) + - [RunTestKPIsResponse](docs/RunTestKPIsResponse.md) + - [RunTestMessageResponse](docs/RunTestMessageResponse.md) + - [RunTestNameResponse](docs/RunTestNameResponse.md) + - [RunTestNameResult](docs/RunTestNameResult.md) + - [RunTestResponse](docs/RunTestResponse.md) + - [RunTestScenarioItemResponse](docs/RunTestScenarioItemResponse.md) + - [SDKCICDEvaluationRunAccepted](docs/SDKCICDEvaluationRunAccepted.md) + - [SDKCICDEvaluationRunAcceptedResponse](docs/SDKCICDEvaluationRunAcceptedResponse.md) + - [SDKCICDEvaluationRunSummary](docs/SDKCICDEvaluationRunSummary.md) + - [SDKCICDEvaluationRunsResponse](docs/SDKCICDEvaluationRunsResponse.md) + - [SDKCICDEvaluationRunsResult](docs/SDKCICDEvaluationRunsResult.md) + - [SDKConfigureEvaluationsRequest](docs/SDKConfigureEvaluationsRequest.md) + - [SDKConfigureEvaluationsResponse](docs/SDKConfigureEvaluationsResponse.md) + - [SDKErrorResponse](docs/SDKErrorResponse.md) + - [SDKEvalTemplate](docs/SDKEvalTemplate.md) + - [SDKEvalTemplateResponse](docs/SDKEvalTemplateResponse.md) + - [SDKGetEvalsResponse](docs/SDKGetEvalsResponse.md) + - [SDKMessageResult](docs/SDKMessageResult.md) + - [SDKSimulationAnalyticsResponse](docs/SDKSimulationAnalyticsResponse.md) + - [SDKSimulationAnalyticsResult](docs/SDKSimulationAnalyticsResult.md) + - [SDKSimulationMetricsResponse](docs/SDKSimulationMetricsResponse.md) + - [SDKSimulationMetricsResult](docs/SDKSimulationMetricsResult.md) + - [SDKSimulationRunsResponse](docs/SDKSimulationRunsResponse.md) + - [SDKSimulationRunsResult](docs/SDKSimulationRunsResult.md) + - [SDKStandaloneEvalInput](docs/SDKStandaloneEvalInput.md) + - [SDKStandaloneEvalRequest](docs/SDKStandaloneEvalRequest.md) + - [SDKStandaloneEvalResponse](docs/SDKStandaloneEvalResponse.md) + - [SDKStandaloneEvalResultItem](docs/SDKStandaloneEvalResultItem.md) + - [SDKStandaloneEvalV2Request](docs/SDKStandaloneEvalV2Request.md) + - [SDKStandaloneEvalV2Response](docs/SDKStandaloneEvalV2Response.md) + - [SDKStandaloneEvalV2Result](docs/SDKStandaloneEvalV2Result.md) + - [ScenarioAddColumnsRequest](docs/ScenarioAddColumnsRequest.md) + - [ScenarioAddColumnsResponse](docs/ScenarioAddColumnsResponse.md) + - [ScenarioAddRowsRequest](docs/ScenarioAddRowsRequest.md) + - [ScenarioAddRowsResponse](docs/ScenarioAddRowsResponse.md) + - [ScenarioCreateRequest](docs/ScenarioCreateRequest.md) + - [ScenarioCreateResponse](docs/ScenarioCreateResponse.md) + - [ScenarioDeleteResponse](docs/ScenarioDeleteResponse.md) + - [ScenarioDetailResponse](docs/ScenarioDetailResponse.md) + - [ScenarioEditPromptsRequest](docs/ScenarioEditPromptsRequest.md) + - [ScenarioEditRequest](docs/ScenarioEditRequest.md) + - [ScenarioEditResponse](docs/ScenarioEditResponse.md) + - [ScenarioErrorResponse](docs/ScenarioErrorResponse.md) + - [ScenarioListResponse](docs/ScenarioListResponse.md) + - [ScenarioPromptItem](docs/ScenarioPromptItem.md) + - [ScenarioPromptsUpdateResponse](docs/ScenarioPromptsUpdateResponse.md) + - [ScenarioResponse](docs/ScenarioResponse.md) + - [Score](docs/Score.md) + - [ScoreDeleteResponse](docs/ScoreDeleteResponse.md) + - [ScoreForSourceResponse](docs/ScoreForSourceResponse.md) + - [ScoreResponse](docs/ScoreResponse.md) + - [ScoreTrend](docs/ScoreTrend.md) + - [Selection](docs/Selection.md) + - [SendChatRequest](docs/SendChatRequest.md) + - [SessionComparisonResponse](docs/SessionComparisonResponse.md) + - [SessionComparisonResult](docs/SessionComparisonResult.md) + - [SidebarAIMetadata](docs/SidebarAIMetadata.md) + - [SidebarTimeline](docs/SidebarTimeline.md) + - [SimulateApiPersonasFieldOptions200Response](docs/SimulateApiPersonasFieldOptions200Response.md) + - [SimulateApiPersonasSystemPersonas200Response](docs/SimulateApiPersonasSystemPersonas200Response.md) + - [SimulateEvalConfigResponse](docs/SimulateEvalConfigResponse.md) + - [SimulatorAgent](docs/SimulatorAgent.md) + - [SimulatorAgentDeleteResponse](docs/SimulatorAgentDeleteResponse.md) + - [SimulatorAgentListResponse](docs/SimulatorAgentListResponse.md) + - [StartEvalsProcessRequest](docs/StartEvalsProcessRequest.md) + - [StopUserEvalRequest](docs/StopUserEvalRequest.md) + - [SubmitAnnotationEntry](docs/SubmitAnnotationEntry.md) + - [SubmitAnnotations](docs/SubmitAnnotations.md) + - [SwitchWorkspace](docs/SwitchWorkspace.md) + - [SwitchWorkspaceResponse](docs/SwitchWorkspaceResponse.md) + - [SwitchWorkspaceResult](docs/SwitchWorkspaceResult.md) + - [SyntheticData](docs/SyntheticData.md) + - [SyntheticDatasetConfig](docs/SyntheticDatasetConfig.md) + - [SyntheticDatasetConfigPayload](docs/SyntheticDatasetConfigPayload.md) + - [SyntheticDatasetConfigResponse](docs/SyntheticDatasetConfigResponse.md) + - [SyntheticDatasetConfigResult](docs/SyntheticDatasetConfigResult.md) + - [SyntheticDatasetCreateStartedResponse](docs/SyntheticDatasetCreateStartedResponse.md) + - [SyntheticDatasetCreateStartedResult](docs/SyntheticDatasetCreateStartedResult.md) + - [SyntheticDatasetCreation](docs/SyntheticDatasetCreation.md) + - [SyntheticDatasetUpdateData](docs/SyntheticDatasetUpdateData.md) + - [SyntheticDatasetUpdateResponse](docs/SyntheticDatasetUpdateResponse.md) + - [SyntheticDatasetUpdateResult](docs/SyntheticDatasetUpdateResult.md) + - [TestExecution](docs/TestExecution.md) + - [TestExecutionAnalytics](docs/TestExecutionAnalytics.md) + - [TestExecutionBulkDelete](docs/TestExecutionBulkDelete.md) + - [TestExecutionBulkDeleteResponse](docs/TestExecutionBulkDeleteResponse.md) + - [TestExecutionChatBatchResponse](docs/TestExecutionChatBatchResponse.md) + - [TestExecutionChatBatchResult](docs/TestExecutionChatBatchResult.md) + - [TestExecutionColumnOrder](docs/TestExecutionColumnOrder.md) + - [TestExecutionColumnOrderResponse](docs/TestExecutionColumnOrderResponse.md) + - [TestExecutionDetailResponse](docs/TestExecutionDetailResponse.md) + - [TestExecutionItemResponse](docs/TestExecutionItemResponse.md) + - [TestExecutionRerun](docs/TestExecutionRerun.md) + - [TestExecutionRerunResponse](docs/TestExecutionRerunResponse.md) + - [TestExecutionRerunResult](docs/TestExecutionRerunResult.md) + - [TestExecutionStatusSummary](docs/TestExecutionStatusSummary.md) + - [TestExecutionTranscriptCall](docs/TestExecutionTranscriptCall.md) + - [TestExecutionTranscriptsResponse](docs/TestExecutionTranscriptsResponse.md) + - [Trace](docs/Trace.md) + - [TraceAnnotationNoteResponse](docs/TraceAnnotationNoteResponse.md) + - [TraceAnnotationValueResponse](docs/TraceAnnotationValueResponse.md) + - [TraceEvidence](docs/TraceEvidence.md) + - [TracePreview](docs/TracePreview.md) + - [TraceSession](docs/TraceSession.md) + - [TraceSessionGraphDataRequest](docs/TraceSessionGraphDataRequest.md) + - [TraceSummary](docs/TraceSummary.md) + - [TraceTagsUpdate](docs/TraceTagsUpdate.md) + - [TracerTraceAnnotationList200Response](docs/TracerTraceAnnotationList200Response.md) + - [TracerTraceList200Response](docs/TracerTraceList200Response.md) + - [TracerTraceSessionList200Response](docs/TracerTraceSessionList200Response.md) + - [TracesAggregates](docs/TracesAggregates.md) + - [TracesListRow](docs/TracesListRow.md) + - [TracesTabApiResponse](docs/TracesTabApiResponse.md) + - [TracesTabResponse](docs/TracesTabResponse.md) + - [TrendMetric](docs/TrendMetric.md) + - [TrendPoint](docs/TrendPoint.md) + - [TrendsTabApiResponse](docs/TrendsTabApiResponse.md) + - [TrendsTabResponse](docs/TrendsTabResponse.md) + - [UpdateRunTest](docs/UpdateRunTest.md) + - [User](docs/User.md) + - [UserAlertMonitor](docs/UserAlertMonitor.md) + - [UserAlertMonitorDuplicate](docs/UserAlertMonitorDuplicate.md) + - [UserAlertMonitorDuplicateResponse](docs/UserAlertMonitorDuplicateResponse.md) + - [UserAlertMonitorDuplicateResult](docs/UserAlertMonitorDuplicateResult.md) + - [UserAlertMonitorLog](docs/UserAlertMonitorLog.md) + - [UserAlertMonitorMetricOption](docs/UserAlertMonitorMetricOption.md) + - [UserAlertMonitorMetricOptionsResponse](docs/UserAlertMonitorMetricOptionsResponse.md) + - [UserCodeExampleResponse](docs/UserCodeExampleResponse.md) + - [UserEvalMutationRequest](docs/UserEvalMutationRequest.md) + - [UserEvalUpdateRequest](docs/UserEvalUpdateRequest.md) + - [UserInfoOrganization](docs/UserInfoOrganization.md) + - [UserInfoResponse](docs/UserInfoResponse.md) + - [UserInfoTwoFactorMethods](docs/UserInfoTwoFactorMethods.md) + - [UsersResponse](docs/UsersResponse.md) + - [UsersResult](docs/UsersResult.md) + - [VectorDBColumnRequest](docs/VectorDBColumnRequest.md) + - [WorkspaceAccessInput](docs/WorkspaceAccessInput.md) + - [WorkspaceAdminSummary](docs/WorkspaceAdminSummary.md) + - [WorkspaceListItemResponse](docs/WorkspaceListItemResponse.md) + - [WorkspaceListPaginatedResponse](docs/WorkspaceListPaginatedResponse.md) + - [WorkspaceMemberRemove](docs/WorkspaceMemberRemove.md) + - [WorkspaceMemberRoleUpdate](docs/WorkspaceMemberRoleUpdate.md) + - [WorkspaceMemberRoleUpdateResponse](docs/WorkspaceMemberRoleUpdateResponse.md) + - [WorkspaceMemberRoleUpdateResult](docs/WorkspaceMemberRoleUpdateResult.md) + - [WorkspaceSummary](docs/WorkspaceSummary.md) + + + +## Documentation for Authorization + + +Authentication schemes defined for the API: + +### X-Api-Key + + +- **Type**: API key +- **API key parameter name**: X-Api-Key +- **Location**: HTTP header + + +### X-Secret-Key + + +- **Type**: API key +- **API key parameter name**: X-Secret-Key +- **Location**: HTTP header + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. +However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used. + +## Author + +help@futureagi.com + diff --git a/java/futureagi/api/openapi.yaml b/java/futureagi/api/openapi.yaml new file mode 100644 index 0000000..0cb59d7 --- /dev/null +++ b/java/futureagi/api/openapi.yaml @@ -0,0 +1,57920 @@ +openapi: 3.0.3 +info: + contact: + email: help@futureagi.com + description: The endpoints defined below allow users to programmatically carry out + various actions on the Future AGI platform. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + termsOfService: https://futureagi.com/legal + title: Future AGI Public SDK API + version: 0.1.0 +servers: +- url: https://api.futureagi.com +security: +- X-Api-Key: [] +- X-Secret-Key: [] +tags: +- name: Alerts +- name: Annotation Queue Discussion +- name: Annotation Queue Items +- name: Annotation Queue Review +- name: Annotation Queues +- name: Datasets +- name: Experiments +- name: Run Tests - Eval Configs +- name: Run Tests - Eval Summary +- name: Scenarios +- name: Simulation Agent Definitions +- name: Simulation Personas +- name: Simulation Run Tests +- name: Simulation Scenarios +- name: Simulation Test Executions +- name: Simulations +- name: Tracing +- name: Users +- name: accounts +- name: model-hub +- name: sdk +- name: simulate +- name: tracer +paths: + /accounts/organization/members/: + get: + description: |- + Returns UNION of active members + pending/expired invites. + Status is derived at query time (Active / Pending / Expired). + operationId: listOrganizationMembers + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: false + in: query + name: filter_status + required: false + schema: + items: + enum: + - Active + - Pending + - Expired + - Deactivated + type: string + type: array + style: form + - explode: false + in: query + name: filter_role + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: -created_at + enum: + - name + - -name + - email + - -email + - status + - -status + - type + - -type + - date_joined + - -date_joined + - created_at + - -created_at + - org_level + - -org_level + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /accounts/organization/members/ + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /accounts/organization/members/reactivate/: + post: + description: |- + Re-activates a deactivated org membership and restores workspace + memberships that were soft-deactivated during removal. If no prior + workspace memberships exist, the user is added to the default workspace. + operationId: accounts_organization_members_reactivate_create + requestBody: + $ref: '#/components/requestBodies/MemberRemove' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberUserMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /accounts/organization/members/reactivate/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /accounts/organization/members/remove/: + delete: + description: |- + Soft-deactivates OrganizationMembership and cascades to workspace + memberships. Signals handle Redis clear + audit log. + operationId: accounts_organization_members_remove_delete + requestBody: + $ref: '#/components/requestBodies/MemberRemove' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberUserMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: DELETE /accounts/organization/members/remove/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /accounts/organization/members/role/: + post: + description: Update a member's org level and/or workspace level. + operationId: accounts_organization_members_role_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MemberRoleUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberRoleUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /accounts/organization/members/role/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /accounts/user-info/: + get: + description: "" + operationId: getCurrentUser + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfoResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Users + x-accepts: + - application/json + /accounts/workspace/list/: + get: + description: Get paginated list of workspaces + operationId: listWorkspaces + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: "" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceListPaginatedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /accounts/workspace/switch/: + post: + description: Switch to a different workspace with proper validation + operationId: switchWorkspace + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SwitchWorkspace' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SwitchWorkspaceResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /accounts/workspace/{workspace_id}/members/: + get: + description: |- + Returns members of a specific workspace. + Org Admin+ users who auto-access are included with derived WS Admin role. + operationId: listWorkspaceMembers + parameters: + - explode: false + in: path + name: workspace_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: false + in: query + name: filter_status + required: false + schema: + items: + enum: + - Active + - Pending + - Expired + type: string + type: array + style: form + - explode: false + in: query + name: filter_role + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: -created_at + enum: + - name + - -name + - email + - -email + - status + - -status + - type + - -type + - date_joined + - -date_joined + - created_at + - -created_at + - ws_level + - -ws_level + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /accounts/workspace//members/ + tags: + - Users + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /accounts/workspace/{workspace_id}/members/remove/: + delete: + description: Remove a member from a workspace only (keeps org membership). + operationId: accounts_workspace_members_remove_delete + parameters: + - explode: false + in: path + name: workspace_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceMemberRemove' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemberUserMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: DELETE /accounts/workspace//members/remove/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /accounts/workspace/{workspace_id}/members/role/: + post: + description: Update a member's workspace role. + operationId: accounts_workspace_members_role_create + parameters: + - explode: false + in: path + name: workspace_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceMemberRoleUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkspaceMemberRoleUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /accounts/workspace//members/role/ + tags: + - accounts + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/: + get: + description: "" + operationId: listAnnotationQueues + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_counts + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAnnotationQueues_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-accepts: + - application/json + post: + description: "" + operationId: createAnnotationQueue + requestBody: + $ref: '#/components/requestBodies/AnnotationQueue' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/for-source/: + get: + description: |- + Find annotation queues for a given source that the current user can annotate. + Includes queues where: + - The source is a queue item AND the user is an annotator in that queue + (regardless of whether the item is explicitly assigned to them) + + Query params: + - source_type, source_id (single source) + - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + operationId: model-hub_annotation-queues_for_source + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: source_type + required: false + schema: + enum: + - call_execution + - dataset_row + - observation_span + - prototype_run + - trace + - trace_session + type: string + style: form + - explode: true + in: query + name: source_id + required: false + schema: + type: string + style: form + - explode: true + in: query + name: sources + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueForSourceResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/annotation-queues/get-or-create-default/: + post: + description: |- + Get or create the default annotation queue for a project, dataset, or agent definition. + Default queues are open to all org members (no annotator restriction). + + Body params (one of): + - project_id + - dataset_id + - agent_definition_id + operationId: model-hub_annotation-queues_get_or_create_default + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDefaultRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDefaultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/: + delete: + description: |- + ``BaseModel.delete()`` flips ``deleted=True`` instead of removing + the row. Attached automation rules go dormant (the scheduler + filters ``queue__deleted=False``), items stay invisible but + recoverable, label bindings preserved. + + For truly destructive removal, use the ``hard-delete`` action + below. + operationId: archiveAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Archive a queue (soft delete). + tags: + - Annotation Queues + x-accepts: + - application/json + get: + description: "" + operationId: getAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-accepts: + - application/json + patch: + description: "" + operationId: updateAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationQueue' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-content-type: application/json + x-accepts: + - application/json + put: + description: Only managers of the queue may update queue settings. + operationId: model-hub_annotation-queues_update + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationQueue' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/add-label/: + post: + description: |- + Add a label to an annotation queue. + Labels apply to all sources in the queue's project (for default queues). + Queue items are created lazily when someone actually annotates. + operationId: addAnnotationQueueLabel + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueLabelRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAddLabelResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/agreement/: + get: + description: Calculate inter-annotator agreement metrics. + operationId: getAnnotationQueueAgreement + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAgreementResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/analytics/: + get: + description: "Queue analytics: throughput, annotator performance, label distribution." + operationId: getAnnotationQueueAnalytics + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAnalyticsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/export-fields/: + get: + description: Return source/label/attribute fields available for dataset export. + operationId: listAnnotationQueueExportFields + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportFieldsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/export-to-dataset/: + post: + description: Export queue items to a dataset using a user-editable column mapping. + operationId: exportAnnotationQueueToDataset + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportToDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportToDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/export/: + get: + description: Export all items with their annotations. + operationId: exportAnnotationQueue + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: true + in: query + name: export_format + required: false + schema: + enum: + - json + - csv + type: string + style: form + - explode: true + in: query + name: status + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueExportAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/hard-delete/: + post: + description: |- + Hard delete cascades through the FK graph (rules, items, + assignments, scores) via ``on_delete=CASCADE``. There is no + recovery — callers must pass ``force=true`` AND the queue's + exact name as ``confirm_name`` so the action can't fire from + a typo'd request. + operationId: model-hub_annotation-queues_hard_delete + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueHardDeleteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueHardDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Permanently remove a queue + everything attached. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/progress/: + get: + description: "" + operationId: getAnnotationQueueProgress + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueProgressResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/remove-label/: + post: + description: Remove a label from an annotation queue. + operationId: removeAnnotationQueueLabel + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueLabelRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueRemoveLabelResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/restore/: + post: + description: "" + operationId: model-hub_annotation-queues_restore + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueStatusResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{id}/update-status/: + post: + description: "" + operationId: updateAnnotationQueueStatus + parameters: + - description: A UUID string identifying this annotation queue. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueStatusRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueStatusResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queues + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/automation-rules/: + get: + description: "" + operationId: model-hub_annotation-queues_automation-rules_list + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_annotation_queues_automation_rules_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + post: + description: "" + operationId: model-hub_annotation-queues_automation-rules_create + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AutomationRule' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/: + delete: + description: "" + operationId: model-hub_annotation-queues_automation-rules_delete + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_annotation-queues_automation-rules_read + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + patch: + description: "" + operationId: model-hub_annotation-queues_automation-rules_partial_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AutomationRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: model-hub_annotation-queues_automation-rules_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AutomationRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/: + post: + description: |- + Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish + in the HTTP request and return 200 with the result — fast feedback + for the common case. Large runs (mostly first-ever runs on backlogs + or rules with wide filters) hand the work to a Temporal activity and + return 202 immediately. The activity emails creator + queue managers + on completion. + + The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- + 100ms even on 10M+ row trace tables — so this branch costs little + even when it ends up taking the sync path. + operationId: model-hub_annotation-queues_automation-rules_evaluate + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluateResponse' + description: Response + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluateAcceptedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Trigger a manual rule run with a sync-or-async branch. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/: + get: + description: Preview how many items match a rule (dry run). + operationId: model-hub_annotation-queues_automation-rules_preview + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this automation rule. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/: + get: + description: "" + operationId: listAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: false + in: query + name: status + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: false + in: query + name: source_type + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - explode: true + in: query + name: assigned_to + required: false + schema: + type: string + style: form + - explode: true + in: query + name: review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: ordering + required: false + schema: + enum: + - created_at + - -created_at + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAnnotationQueueItems_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-accepts: + - application/json + post: + description: "" + operationId: model-hub_annotation-queues_items_create + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItem' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/add-items/: + post: + description: "" + operationId: addAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddItems' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAddItemsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiSelectionTooLargeError' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/assign/: + post: + description: Assign items to one or more annotators. + operationId: assignAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssignItems' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAssignItemsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/bulk-remove/: + post: + description: "" + operationId: removeAnnotationQueueItems + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkRemoveItems' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueBulkRemoveItemsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/next-item/: + get: + description: |- + Query params: + exclude: comma-separated item IDs to skip + before: item ID — returns the item immediately before this one in order + review_status: optional review status filter (for reviewer queues) + exclude_review_status: optional review status to omit (for annotator queues) + include_completed: when true, navigation can visit completed items too + operationId: getNextAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: exclude + required: false + schema: + type: string + style: form + - explode: true + in: query + name: before + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: exclude_review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_completed + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: view_mode + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_all_annotations + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueNextItemResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get the next or previous item in the queue. + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/: + delete: + description: "" + operationId: model-hub_annotation-queues_items_delete + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_annotation-queues_items_read + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + patch: + description: "" + operationId: model-hub_annotation-queues_items_partial_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItem' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: model-hub_annotation-queues_items_update + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItem' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/: + get: + description: Get full annotation workspace data for an item. + operationId: getAnnotationQueueItemDetail + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: true + in: query + name: annotator_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: include_completed + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: view_mode + required: false + schema: + type: string + style: form + - explode: true + in: query + name: review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: exclude_review_status + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_all_annotations + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: reserve + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueAnnotateDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/: + get: + description: List all annotations for a queue item (across all annotators). + operationId: listAnnotationQueueItemAnnotations + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItemAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/: + post: + description: Import annotations from external sources. + operationId: importAnnotationQueueItemAnnotations + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportAnnotations' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueImportAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/: + post: + description: Submit or update annotations for a queue item. + operationId: submitAnnotationQueueItemAnnotations + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubmitAnnotations' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueSubmitAnnotationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/complete/: + post: + description: Mark item as completed and return next pending item. + operationId: completeAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItemNavigationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueNavigationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/: + get: + description: List or create non-blocking discussion comments for a queue item. + operationId: listAnnotationQueueItemDiscussion + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-accepts: + - application/json + post: + description: List or create non-blocking discussion comments for a queue item. + operationId: createAnnotationQueueItemComment + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DiscussionCommentRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/: + post: + description: Toggle the current user's reaction on a discussion comment. + operationId: toggleAnnotationQueueItemCommentReaction + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: comment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DiscussionReactionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/: + post: + description: "" + operationId: reopenAnnotationQueueItemThread + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: thread_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/DiscussionThreadStatusRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/: + post: + description: "" + operationId: resolveAnnotationQueueItemThread + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: thread_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/DiscussionThreadStatusRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueDiscussionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Discussion + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/release/: + post: + description: Release reservation on an item. + operationId: releaseAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueReleaseReservationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/review/: + post: + description: "Approve, request changes, or leave reviewer feedback on an item." + operationId: reviewAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReviewItemRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueReviewItemResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Review + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotation-queues/{queue_id}/items/{id}/skip/: + post: + description: Mark item as skipped and return next pending item. + operationId: skipAnnotationQueueItem + parameters: + - explode: false + in: path + name: queue_id + required: true + schema: + type: string + style: simple + - description: A UUID string identifying this queue item. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/QueueItemNavigationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueNavigationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Annotation Queue Items + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotations-labels/: + get: + description: "" + operationId: model-hub_annotations-labels_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: dataset + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: type + required: false + schema: + enum: + - text + - numeric + - categorical + - star + - thumbs_up_down + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: include_usage_count + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: include_archived + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AnnotationsLabels' + type: array + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + post: + description: Custom create to provide clearer error responses in GM format. + operationId: model-hub_annotations-labels_create + requestBody: + $ref: '#/components/requestBodies/AnnotationsLabels' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotations-labels/{id}/: + delete: + description: "" + operationId: model-hub_annotations-labels_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_annotations-labels_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + patch: + description: "" + operationId: model-hub_annotations-labels_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationsLabels' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: model-hub_annotations-labels_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AnnotationsLabels' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/annotations-labels/{id}/restore/: + post: + description: Restore a soft-deleted (archived) annotation label. + operationId: model-hub_annotations-labels_restore + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationLabelRestoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/api-keys/: + get: + description: "" + operationId: model-hub_api-keys_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_api_keys_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + post: + description: "" + operationId: model-hub_api-keys_create + requestBody: + $ref: '#/components/requestBodies/ApiKey' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/api-keys/{id}/: + delete: + description: |- + ApiKey inherits from BaseModel, so `instance.delete()` sets: + - deleted=True + - deleted_at= + and excludes it from the default manager (`objects`) queries. + operationId: model-hub_api-keys_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Soft-delete an API key. + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_api-keys_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + patch: + description: "" + operationId: model-hub_api-keys_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ApiKey' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: model-hub_api-keys_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ApiKey' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/api/models_list/: + get: + description: "" + operationId: model-hub_api_models_list_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubPaginatedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/dataset/columns/{dataset_id}/: + get: + description: "" + operationId: getDatasetColumns + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetColumnDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/dataset/{dataset_id}/annotation-summary/: + get: + description: "" + operationId: getDatasetAnnotationSummary + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/dataset/{dataset_id}/eval-stats/: + get: + description: "" + operationId: getDatasetEvalStats + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetEvalStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/dataset/{dataset_id}/json-schema/: + get: + description: |- + API endpoint to get JSON schemas and images metadata for columns in a dataset. + Used by frontend for autocomplete suggestions when accessing JSON properties + and for indexed access to images columns. + operationId: getDatasetJsonSchema + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetJsonSchemaResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/dataset/{dataset_id}/run-prompt-stats/: + get: + description: "" + operationId: model-hub_dataset_run-prompt-stats_list + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRunPromptStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/datasets/compare/get-evals-list/: + post: + description: "" + operationId: model-hub_datasets_compare_get-evals-list_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareEvalsListRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareEvalListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/compare/preview-run-eval/: + post: + description: "" + operationId: model-hub_datasets_compare_preview-run-eval_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ComparePreviewRunEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalPreviewResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/delete-compare/{compare_id}/: + delete: + description: "" + operationId: model-hub_datasets_delete-compare_delete + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_datasets_delete-compare_read + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetRowResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/datasets/explanation-summary/{dataset_id}/: + get: + description: "" + operationId: model-hub_datasets_explanation-summary_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetExplanationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/datasets/explanation-summary/{dataset_id}/refresh/: + post: + description: "" + operationId: model-hub_datasets_explanation-summary_refresh_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetExplanationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/get-base-columns/: + get: + description: "" + operationId: listDatasetBaseColumns + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BaseColumnsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/: + delete: + description: "" + operationId: model-hub_datasets_get-compare-row_delete + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: row_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_datasets_get-compare-row_read + parameters: + - explode: false + in: path + name: compare_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: row_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetRowResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/datasets/huggingface/detail/: + post: + description: "" + operationId: model-hub_datasets_huggingface_detail_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetDetailRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/huggingface/list/: + post: + description: "" + operationId: model-hub_datasets_huggingface_list_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetListRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/add-api-column/: + post: + description: "" + operationId: model-hub_datasets_add-api-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddApiColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/add_vector_db_column/: + post: + description: "" + operationId: model-hub_datasets_add_vector_db_column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VectorDBColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/classify-column/: + post: + description: "" + operationId: model-hub_datasets_classify-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClassifyColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/compare-datasets/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/CompareDataset' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_add-eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareExperimentEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/compare-datasets/download/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_download_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/CompareDataset' + responses: + "200": + content: + application/json: + schema: + format: binary + type: string + description: CSV export + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/: + post: + description: "" + operationId: model-hub_datasets_compare-datasets_start-eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareStartEvalsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/compare-stats/: + post: + description: "" + operationId: model-hub_datasets_compare-stats_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetStatsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDatasetStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/conditional-column/: + post: + description: "" + operationId: model-hub_datasets_conditional-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConditionalColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/derived-variables/: + get: + description: |- + This aggregates derived variables from run prompt columns that + produce JSON outputs, making them available for use in other + prompts, evals, and experiments. + + Path params: + - dataset_id: UUID of the dataset + operationId: listDatasetDerivedVariables + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetDerivedVariablesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get all derived variables from all run prompt columns in a dataset. + tags: + - Datasets + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/duplicate-rows/: + post: + description: "" + operationId: model-hub_datasets_duplicate-rows_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/duplicate/: + post: + description: "" + operationId: duplicateDataset + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DuplicateDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/extract-entities/: + post: + description: "" + operationId: model-hub_datasets_extract-entities_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExtractEntitiesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/merge/: + post: + description: "" + operationId: model-hub_datasets_merge_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MergeDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MergeDatasetResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/datasets/{dataset_id}/preview/{operation_type}/: + post: + description: "" + operationId: model-hub_datasets_preview_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: operation_type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewDatasetOperationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewDatasetOperationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/delete-eval-template/: + post: + description: "" + operationId: model-hub_delete-eval-template_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteEvalTemplate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubStringResultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/add-as-new/: + post: + description: "" + operationId: model-hub_develops_add-as-new_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddAsNewDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCopyResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/add_rows_from_file/: + post: + description: "" + operationId: model-hub_develops_add_rows_from_file_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddRowsFromFileRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/add_rows_sdk/: + post: + description: "" + operationId: model-hub_develops_add_rows_sdk_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetSdkRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetSdkRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/add_run_prompt_column/: + post: + description: "" + operationId: model-hub_develops_add_run_prompt_column_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddRunPrompt' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/clone-dataset/{dataset_id}/: + post: + description: "" + operationId: model-hub_develops_clone-dataset_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CloneDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCopyResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/create-dataset-from-huggingface/: + post: + description: "" + operationId: model-hub_develops_create-dataset-from-huggingface_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/create-dataset-from-local-file/: + post: + description: "" + operationId: createDatasetFromLocalFile + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatasetFromLocalFileRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LocalFileDatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/create-dataset-manually/: + post: + description: "" + operationId: createDatasetManually + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ManualDatasetCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ManualDatasetCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/create-empty-dataset/: + post: + description: "" + operationId: createEmptyDataset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEmptyDatasetRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/create-synthetic-dataset/: + post: + description: "" + operationId: model-hub_develops_create-synthetic-dataset_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetCreation' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetCreateStartedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/dataset-creation-progress/{dataset_id}/: + get: + description: API endpoint to check the progress of dataset creation from file + upload + operationId: model-hub_develops_dataset-creation-progress_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCreationProgressResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/delete_dataset/: + delete: + description: "" + operationId: model-hub_develops_delete_dataset_delete + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/edit_run_prompt_column/: + post: + description: "" + operationId: model-hub_develops_edit_run_prompt_column_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EditRunPromptColumn' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/get-cell-data/: + post: + description: "" + operationId: model-hub_develops_get-cell-data_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCellDataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetCellDataResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/get-datasets-names/: + get: + description: "" + operationId: listDatasetNames + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetNamesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/develops/get-datasets/: + get: + description: "" + operationId: listDatasets + parameters: + - explode: true + in: query + name: search_text + required: false + schema: + default: "" + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: sort + required: false + schema: + type: string + style: form + x-nullable: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/develops/get-derived-datasets/{dataset_id}/: + get: + description: "" + operationId: model-hub_develops_get-derived-datasets_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetExplanationSummaryResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/get-huggingface-dataset-config/: + post: + description: "" + operationId: model-hub_develops_get-huggingface-dataset-config_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceDatasetConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/get-row-diff/: + post: + description: "" + operationId: model-hub_develops_get-row-diff_create + requestBody: + $ref: '#/components/requestBodies/DatasetRowDiffRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRowDiffResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/get_function_list/: + get: + description: "" + operationId: model-hub_develops_get_function_list_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalFunctionListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/preview_run_prompt_column/: + post: + description: "" + operationId: model-hub_develops_preview_run_prompt_column_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewRunPrompt' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunPromptColumnPreviewResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/provider-status/: + get: + description: "" + operationId: model-hub_develops_provider-status_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderStatusResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/retrieve_run_prompt_column_config/: + get: + description: "" + operationId: model-hub_develops_retrieve_run_prompt_column_config_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunPromptColumnConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/retrieve_run_prompt_options/: + get: + description: "" + operationId: model-hub_develops_retrieve_run_prompt_options_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunPromptOptionsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_columns/: + post: + description: "" + operationId: addDatasetColumns + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddColumnsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetColumnsMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_empty_columns/: + post: + description: "" + operationId: model-hub_develops_add_empty_columns_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddEmptyColumnsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetColumnsMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_empty_rows/: + post: + description: "" + operationId: model-hub_develops_add_empty_rows_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddEmptyRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_multiple_static_columns/: + post: + description: |- + Expected request data: + { + "columns": [ + { + "new_column_name": "column1", + "column_type": "string", + "source": "OTHERS" # optional + }, + { + "new_column_name": "column2", + "column_type": "number", + "source": "OTHERS" # optional + } + ] + } + operationId: model-hub_develops_add_multiple_static_columns_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetMultipleStaticColumnsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add multiple static columns to a dataset at once. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_rows/: + post: + description: "" + operationId: addDatasetRows + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/: + post: + description: "" + operationId: model-hub_develops_add_rows_from_existing_dataset_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetAddRowsFromExistingRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowsImportedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_rows_from_huggingface/: + post: + description: "" + operationId: model-hub_develops_add_rows_from_huggingface_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HuggingFaceAddRowsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowsImportMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_static_column/: + post: + description: "" + operationId: model-hub_develops_add_static_column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetStaticColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_synthetic_data/: + post: + description: "" + operationId: model-hub_develops_add_synthetic_data_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticData' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/add_user_eval/: + post: + description: "" + operationId: model-hub_develops_add_user_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserEvalMutationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/delete_column/{column_id}/: + delete: + description: "" + operationId: deleteDatasetColumn + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/delete_row/: + delete: + description: "" + operationId: deleteDatasetRow + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/: + delete: + description: "" + operationId: model-hub_develops_delete_template_eval_delete + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/: + delete: + description: "" + operationId: model-hub_develops_delete_user_eval_delete + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/download_dataset/: + get: + description: "" + operationId: downloadDataset + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + format: binary + type: string + description: CSV export + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/: + post: + description: "" + operationId: model-hub_develops_edit_and_run_user_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserEvalUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/edit_dataset_behavior/: + put: + description: "" + operationId: model-hub_develops_edit_dataset_behavior_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetBehaviorRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/extract-json-column/: + post: + description: "" + operationId: model-hub_develops_extract-json-column_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExtractJsonColumnRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicColumnCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/get-dataset-table/: + get: + description: "" + operationId: getDatasetTable + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: sort + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 10 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: current_page_index + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: column_config_only + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetTableResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/get-row-data/: + post: + description: "" + operationId: getDatasetRow + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowDataRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowDataResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/: + get: + description: "" + operationId: model-hub_develops_get_eval_structure_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: eval_type + required: true + schema: + enum: + - preset + - user + - previously_configured + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalStructureResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/get_evals_list/: + get: + description: "" + operationId: model-hub_develops_get_evals_list_list + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/preview_run_eval/: + post: + description: "" + operationId: model-hub_develops_preview_run_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewRunEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalPreviewResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/start_evals_process/: + post: + description: "" + operationId: model-hub_develops_start_evals_process_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StartEvalsProcessRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/: + post: + description: |- + Accepts optional experiment_id in the body. When present, the eval is + looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) + and cells are updated across both base columns (source_id=eval_id) and + per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + operationId: model-hub_develops_stop_user_eval_create + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StopUserEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: |- + POST /develops//stop_user_eval// + Stops a running evaluation by setting its status to Completed. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/synthetic-config/: + get: + description: "" + operationId: model-hub_develops_synthetic-config_list + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/update-synthetic-config/: + put: + description: "" + operationId: model-hub_develops_update-synthetic-config_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetConfig' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDatasetUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/update_cell_value/: + post: + description: "" + operationId: updateDatasetCell + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetUpdateCellValueRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Datasets + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/update_column_name/{column_id}/: + put: + description: "" + operationId: model-hub_develops_update_column_name_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetUpdateColumnNameRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{dataset_id}/update_column_type/{column_id}/: + put: + description: "" + operationId: model-hub_develops_update_column_type_update + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetUpdateColumnTypeRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ColumnTypeConversionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{exp_dataset_id}/create-dataset/: + post: + description: "" + operationId: model-hub_develops_create-dataset_create + parameters: + - explode: false + in: path + name: exp_dataset_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatasetFromExperimentRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DevelopDatasetMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/: + get: + description: "" + operationId: model-hub_develops_get-experiment-dataset-table_list + parameters: + - explode: false + in: path + name: experiment_dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetTableResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/eval-templates/bulk-delete/: + post: + description: Soft-delete multiple eval templates. Only user-owned templates + can be deleted. + operationId: model-hub_eval-templates_bulk-delete_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateBulkDeleteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateBulkDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/bulk-delete/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/composite/execute-adhoc/: + post: + description: |- + Execute a composite eval configuration without persisting it. Used by + the eval create page so users can test a composite (selected children + + aggregation settings) before clicking Save. Builds an unsaved parent + template and unsaved child links in memory and reuses + `execute_composite_children_sync` so semantics match the persisted path. + operationId: model-hub_eval-templates_composite_execute-adhoc_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalAdhocExecuteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalExecuteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/composite/execute-adhoc/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/create-composite/: + post: + description: Create a composite eval from a list of existing eval template IDs. + operationId: model-hub_eval-templates_create-composite_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/create-composite/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/create-v2/: + post: + description: |- + Create a single eval template with the revamped schema. + Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + operationId: model-hub_eval-templates_create-v2_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateCreateV2Request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/create-v2/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/list-charts/: + post: + description: |- + Returns 30-day chart data (run counts + error rates) for a list of template IDs. + Uses ClickHouse for fast analytics. Called separately from the list API so the + table renders instantly while charts load async. + operationId: model-hub_eval-templates_list-charts_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateListChartsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateListChartsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/list-charts/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/list/: + post: + description: |- + Returns paginated eval template list with filtering, search, and 30-day metrics. + All inputs and outputs are validated with Pydantic schemas. + operationId: model-hub_eval-templates_list_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalListRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates/list/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/composite/: + get: + description: Get composite eval detail with its children. + operationId: model-hub_eval-templates_composite_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//composite/ + tags: + - model-hub + x-accepts: + - application/json + patch: + description: |- + Supported fields (all optional): + name, description, tags, + aggregation_enabled, aggregation_function, + child_template_ids (replaces the child list), + child_weights (map of child_id -> weight). + operationId: model-hub_eval-templates_composite_partial_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: PATCH — partial update of a composite eval. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/composite/execute/: + post: + description: |- + Execute all child evals in a composite and optionally aggregate results. + Thin wrapper around `execute_composite_children_sync` — the same helper + the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation + semantics stay consistent across surfaces. + operationId: model-hub_eval-templates_composite_execute_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalExecuteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompositeEvalExecuteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//composite/execute/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/detail/: + get: + description: Fetch a single eval template with all revamped fields. + operationId: model-hub_eval-templates_detail_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//detail/ + tags: + - model-hub + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/feedback-list/: + get: + description: |- + Paginated feedback list with user info. + Query params: page (0-based), page_size + operationId: model-hub_eval-templates_feedback-list_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalFeedbackListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//feedback-list/ + tags: + - model-hub + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/ground-truth-config/: + get: + description: Manages ground truth configuration on the eval template's config + JSONField. + operationId: model-hub_eval-templates_ground-truth-config_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET/PUT /model-hub/eval-templates//ground-truth-config/ + tags: + - model-hub + x-accepts: + - application/json + put: + description: Manages ground truth configuration on the eval template's config + JSONField. + operationId: model-hub_eval-templates_ground-truth-config_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET/PUT /model-hub/eval-templates//ground-truth-config/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/ground-truth/: + get: + description: GET /model-hub/eval-templates//ground-truth/ + operationId: model-hub_eval-templates_ground-truth_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/ground-truth/upload/: + post: + description: |- + Supports two modes: + 1. JSON body: { name, columns, data, ... } + 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + operationId: model-hub_eval-templates_ground-truth_upload_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthUploadRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroundTruthUploadResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//ground-truth/upload/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/update/: + put: + description: Update an eval template. Only user-owned templates can be updated. + operationId: model-hub_eval-templates_update_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateUpdateV2Request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: PUT /model-hub/eval-templates//update/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/usage/: + get: + description: |- + Returns usage stats, chart data, and paginated eval logs. + Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + operationId: model-hub_eval-templates_usage_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalUsageStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//usage/ + tags: + - model-hub + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/versions/: + get: + description: List all versions for an eval template. + operationId: model-hub_eval-templates_versions_list + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /model-hub/eval-templates//versions/ + tags: + - model-hub + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/versions/create/: + post: + description: Create a new version snapshot from the current template state. + operationId: model-hub_eval-templates_versions_create_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//versions/create/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/: + post: + description: |- + Restore a version by creating a new version with the old version's config. + Does NOT modify the old version — creates a new one on top. + operationId: model-hub_eval-templates_versions_restore_create + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionRestoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: POST /model-hub/eval-templates//versions//restore/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/: + put: + description: Set a specific version as the default (active) version. + operationId: model-hub_eval-templates_versions_set-default_update + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalTemplateVersionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: PUT /model-hub/eval-templates//versions//set-default/ + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/: + post: + description: "" + operationId: createExperiment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentCreateV2' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStringResultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/delete/: + delete: + description: "V2 delete: org-scoped, cancels workflows, cleans up columns &\ + \ EDTs." + operationId: deleteExperiments + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/list/: + get: + description: "V2 experiment list with filtering, search, and pagination." + operationId: listExperiments + parameters: + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: dataset_id + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listExperiments_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/re-run/: + post: + description: |- + No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID + reuse policy automatically cancels any running workflow with the same ID. + Cell reset is handled by the workflow itself (cleanup + setup activities). + operationId: rerunExperiment + requestBody: + $ref: '#/components/requestBodies/ExperimentRerunRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStringResultResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "V2 re-run: org-scoped, uses V2 Temporal workflow." + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/row-diff/: + post: + description: "" + operationId: model-hub_experiments_v2_row-diff_create + requestBody: + $ref: '#/components/requestBodies/DatasetRowDiffRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRowDiffResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/suggest-name/{dataset_id}/: + get: + description: Generate a suggested experiment name for a dataset. + operationId: model-hub_experiments_v2_suggest-name_read + parameters: + - explode: false + in: path + name: dataset_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentNameSuggestionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/experiments/v2/validate-name/: + get: + description: Validate that an experiment name is unique within a dataset. + operationId: model-hub_experiments_v2_validate-name_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentNameValidationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/: + get: + description: "" + operationId: getExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentV2DetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + put: + description: |- + Editable fields: column_id, prompt_config, user_eval_metrics. + Re-run triggers (determined by fingerprint diffs, not field presence): + - prompt_config has new/modified entries → re-run those configs + ALL dependent evals + - user_eval_metrics has new/modified entries → re-run only those evals + - column_id changed → delete old base eval columns, re-run base evals + - If FE sends unchanged data, diffs return empty → no re-run + operationId: updateExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentUpdateV2' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentV2DetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Update a V2 experiment with diff-based selective re-run. + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/compare-experiments/: + post: + description: "V2 compare view: reads from experiment_datasets FK + snapshot_dataset." + operationId: compareExperiments + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ExperimentComparisonWeightsRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentDatasetComparisonResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/comparisons/: + get: + description: "" + operationId: listExperimentComparisons + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentComparisonDetailsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/derived-variables/: + get: + description: |- + Get derived variables from run prompt columns in an experiment's snapshot dataset. + Delegates to the existing get_dataset_derived_variables() service function. + operationId: model-hub_experiments_v2_derived-variables_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentDerivedVariablesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/download/: + get: + description: "" + operationId: downloadExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + description: CSV file download. + format: binary + type: string + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/: + get: + description: "" + operationId: model-hub_experiments_v2_evaluations_stats_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: evaluation_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentEvaluationStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/feedback/: + post: + description: Create a feedback record scoped to an experiment. + operationId: model-hub_experiments_v2_feedback_create + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Feedback' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/: + get: + description: Get previous feedback details for a metric+row in an experiment. + operationId: model-hub_experiments_v2_feedback_get-feedback-details_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackDetailsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/feedback/get-template/: + get: + description: Get evaluation template details for rendering the feedback form. + operationId: model-hub_experiments_v2_feedback_get-template_list + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackTemplateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/: + post: + description: Submit feedback action — triggers temporal eval rerun for experiments. + operationId: model-hub_experiments_v2_feedback_submit-feedback_create + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackSubmitRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentFeedbackSubmitResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/json-schema/: + get: + description: |- + Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. + Delegates to the shared get_json_column_schemas() function. + operationId: getExperimentJsonSchema + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentJsonSchemaResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/rerun-cells/: + post: + description: |- + Accepts source_ids (EDT IDs for full column rerun) and/or + cells ({source_id, row_id} pairs for individual cell rerun). + Resets affected output cells and dependent eval cells to RUNNING, + then starts a RerunCellsV2Workflow. + operationId: model-hub_experiments_v2_rerun-cells_create + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRerunCells' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentWorkflowResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Rerun specific cells or columns in a V2 experiment. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/rows/: + get: + description: "" + operationId: listExperimentRows + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentTableRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/: + get: + description: "" + operationId: getExperimentRow + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: row_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentTableRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/stats/: + get: + description: Stats view for V2 experiments that read from snapshot_dataset. + operationId: getExperimentStats + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStatsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Experiments + x-accepts: + - application/json + /model-hub/experiments/v2/{experiment_id}/stop/: + post: + description: |- + Cancels all Temporal workflows (main + reruns). DB cleanup (marking + RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) + is handled by each workflow's CancelledError handler via the + stop_experiment_cleanup_activity. + operationId: stopExperiment + parameters: + - explode: false + in: path + name: experiment_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/ModelHubEmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentStopResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Stop a running V2 experiment. + tags: + - Experiments + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/knowledge-base/: + delete: + description: "" + operationId: model-hub_knowledge-base_delete + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_knowledge-base_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseSdkCodeResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + patch: + description: "" + operationId: model-hub_knowledge-base_partial_update + requestBody: + $ref: '#/components/requestBodies/LegacyKnowledgeBaseMutationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseMutationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + post: + description: "" + operationId: model-hub_knowledge-base_create + requestBody: + $ref: '#/components/requestBodies/LegacyKnowledgeBaseMutationRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/knowledge-base/files/: + delete: + description: "" + operationId: model-hub_knowledge-base_files_delete + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + post: + description: "" + operationId: model-hub_knowledge-base_files_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseFilesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseFilesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/knowledge-base/get/: + get: + description: "" + operationId: model-hub_knowledge-base_get_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/knowledge-base/list/: + get: + description: "" + operationId: model-hub_knowledge-base_list_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-history-executions/: + get: + description: "" + operationId: model-hub_prompt-history-executions_list + parameters: + - description: "" + explode: true + in: query + name: template_name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: template_version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_history_executions_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-history-executions/execution-details/{execution_id}/: + get: + description: Get detailed information about a specific PromptVersion + operationId: model-hub_prompt-history-executions_get_execution_details + parameters: + - explode: false + in: path + name: execution_id + required: true + schema: + type: string + style: simple + - description: "" + explode: true + in: query + name: template_name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: template_version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_history_executions_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-history-executions/{id}/: + get: + description: "" + operationId: model-hub_prompt-history-executions_read + parameters: + - description: A UUID string identifying this prompt version. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptHistoryExecution' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-labels/: + get: + description: "" + operationId: model-hub_prompt-labels_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_labels_list_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + post: + description: "" + operationId: model-hub_prompt-labels_create + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-labels/assign-multiple-labels/: + post: + description: "" + operationId: model-hub_prompt-labels_assign_multiple_labels + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-labels/create-system-labels/: + post: + description: "Create (idempotently) Production, Staging, Development system\ + \ labels for the caller's org." + operationId: model-hub_prompt-labels_create_system_labels + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-labels/get-by-name/: + get: + description: |- + Query params: + - name: template name (required) + - version: version name like v1 (optional) + - label: label name like Production/Staging/Development or custom (optional) + operationId: model-hub_prompt-labels_get_by_name + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_labels_list_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Fetch a prompt version by template name and either explicit version + or label. + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-labels/remove/: + post: + description: Detach label from a prompt version. + operationId: model-hub_prompt-labels_remove_label_from_version + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-labels/set-default/: + post: + description: Set default version for a template by name and version. + operationId: model-hub_prompt-labels_set_default + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-labels/template-labels/: + get: + description: List versions with labels for a template by name or id. + operationId: model-hub_prompt-labels_template_labels + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_labels_list_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-labels/{id}/: + delete: + description: "" + operationId: model-hub_prompt-labels_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: "" + operationId: model-hub_prompt-labels_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + patch: + description: "" + operationId: model-hub_prompt-labels_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: model-hub_prompt-labels_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/: + post: + description: Assign a label to a specific version by template name and version + name. + operationId: model-hub_prompt-labels_assign_label_by_id + parameters: + - explode: false + in: path + name: template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: label_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptLabel' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/: + get: + description: "" + operationId: model-hub_prompt-templates_list + parameters: + - description: "" + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_templates_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + post: + description: "" + operationId: model-hub_prompt-templates_create + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/analyze-prompt/: + post: + description: "" + operationId: model-hub_prompt-templates_analyze_prompt + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/bulk-delete/: + post: + description: Bulk delete prompt templates + operationId: model-hub_prompt-templates_bulk_delete + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/create-draft/: + post: + description: Create a draft version of the PromptTemplate and return its details. + operationId: model-hub_prompt-templates_create_draft + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/derived-variables/preview/: + post: + description: |- + Useful for showing what variables would be extracted before running. + + Request body: + - content: JSON string or object to analyze + - column_name: Name for the variable prefix + operationId: model-hub_prompt-templates_derived-variables_preview_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariablePreviewRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Preview derived variables from JSON content without saving. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/generate-prompt/: + post: + description: "" + operationId: model-hub_prompt-templates_generate_prompt + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/generate-variables/: + post: + description: |- + Expected payload: + { + "prompt_name": "string", + "prompt_instructions": "list/array" , + "variable_names": ["string"], + "variable_count": "int", + "generation_type": "prompt" + } + operationId: model-hub_prompt-templates_generate_variables + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Generate synthetic data for prompt variables using the SyntheticDataAgent. + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/get-template-by-name/: + get: + description: |- + Retrieve a prompt template by name. + If no version is specified, returns the default version (is_default=True). + If a version is specified, returns that specific version. + operationId: model-hub_prompt-templates_get_template_by_name + parameters: + - description: "" + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: version + required: false + schema: + type: string + style: form + - description: "" + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_prompt_templates_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/improve-prompt/: + post: + description: "" + operationId: model-hub_prompt-templates_improve_prompt + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/: + delete: + description: "" + operationId: model-hub_prompt-templates_delete + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + get: + description: |- + Retrieve a prompt template with version history and execution data. + Handles caching and error cases. + operationId: model-hub_prompt-templates_read + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + patch: + description: "" + operationId: model-hub_prompt-templates_partial_update + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: model-hub_prompt-templates_update + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/add-new-draft/: + post: + description: Create a new draft version of the PromptTemplate and return its + details. + operationId: model-hub_prompt-templates_add_new_draft + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/all-variables/: + get: + description: Get all variables from template and its executions + operationId: model-hub_prompt-templates_get_all_variables + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/commit/: + post: + description: "" + operationId: model-hub_prompt-templates_commit + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/compare-versions/: + post: + description: Compare different versions of the PromptTemplate. + operationId: model-hub_prompt-templates_compare_versions + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/delete-evaluation-config/: + delete: + description: |- + This endpoint allows removing an evaluation configuration from a PromptTemplate + based on its unique name. + operationId: model-hub_prompt-templates_delete_evaluation_config + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Delete an evaluation configuration by name from a PromptTemplate. + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/evaluation-configs/: + get: + description: Get the evaluation configurations for a specific prompt template. + operationId: model-hub_prompt-templates_get_evaluation_configs + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/evaluations/: + get: + description: "" + operationId: model-hub_prompt-templates_retrieve_evaluations + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/get-next-version/: + get: + description: Get the next version of the PromptTemplate + operationId: model-hub_prompt-templates_get_next_version + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/get-run-status/: + get: + description: Get the current status and results of a template run + operationId: model-hub_prompt-templates_get_run_status + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/get-sdk-code/{language}/: + get: + description: |- + Get the prompt code in the requested format. If no format is specified, returns all formats. + Supported languages: python, typescript, curl, langchain, nodejs, go + operationId: model-hub_prompt-templates_get_sdk_code + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + - explode: false + in: path + name: language + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/: + post: + description: "" + operationId: model-hub_prompt-templates_run_evals_on_multiple_versions + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/run_template/: + post: + description: Run a prompt template with the given configuration. + operationId: model-hub_prompt-templates_run_template + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/save-name/: + post: + description: Save/update the name for a template. + operationId: model-hub_prompt-templates_save_name + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/save-prompt-folder/: + post: + description: "" + operationId: model-hub_prompt-templates_save_prompt_folder + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/set_default/: + post: + description: Set a specific version of a prompt template as default + operationId: model-hub_prompt-templates_set_default + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/stop-streaming/: + get: + description: "" + operationId: model-hub_prompt-templates_stop_streaming + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/update-evaluation-configs/: + post: + description: |- + This endpoint allows adding new evaluation configurations or updating + existing ones in a PromptTemplate. If is_run is true, it will also + run evaluations on specified versions (or latest version if none specified). + operationId: model-hub_prompt-templates_update_evaluation_configs + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PromptTemplate' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add or update evaluation configurations for a PromptTemplate. + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{id}/versions/: + get: + description: "" + operationId: model-hub_prompt-templates_versions + parameters: + - description: A UUID string identifying this prompt template. + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{prompt_id}/derived-variables/: + get: + description: |- + Returns derived variables from JSON outputs across all versions. + + Query params: + - version: Optional version filter + - column_name: Optional column name filter + operationId: model-hub_prompt-templates_derived-variables_list + parameters: + - explode: false + in: path + name: prompt_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptDerivedVariablesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get all derived variables for a prompt template. + tags: + - model-hub + x-accepts: + - application/json + /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/: + post: + description: |- + This is useful when you want to re-extract variables or extract from + existing outputs that weren't processed. + + Request body: + - version: Version to extract from + - column_name: Name for the output column + - output_index: Optional specific output index (default: 0) + - response_format_type: Optional response format hint + operationId: model-hub_prompt-templates_derived-variables_extract_create + parameters: + - explode: false + in: path + name: prompt_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableExtractRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Manually trigger extraction of derived variables from outputs. + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/: + get: + description: |- + Returns detailed schema information including types and sample values. + + Path params: + - prompt_id: UUID of the prompt template + - column_name: Name of the column + + Query params: + - version: Optional version filter + operationId: model-hub_prompt-templates_derived-variables_schema_list + parameters: + - explode: false + in: path + name: prompt_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: column_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DerivedVariableDetailResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get the schema for derived variables of a specific column. + tags: + - model-hub + x-accepts: + - application/json + /model-hub/scores/: + get: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: source_type + required: false + schema: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + type: string + style: form + - explode: true + in: query + name: source_id + required: false + schema: + type: string + style: form + - explode: true + in: query + name: label_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: annotator_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/model_hub_scores_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + x-runtime-request-validation: true + x-accepts: + - application/json + post: + description: Create a single score. + operationId: model-hub_scores_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateScore' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/scores/bulk/: + post: + description: Create multiple scores on a single source (e.g. from inline annotator). + operationId: model-hub_scores_bulk_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkCreateScores' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BulkCreateScoresResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /model-hub/scores/for-source/: + get: + description: |- + Get all scores for a specific source. + GET /model-hub/scores/for-source/?source_type=trace&source_id= + operationId: model-hub_scores_for_source + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: source_type + required: true + schema: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + type: string + style: form + - explode: true + in: query + name: source_id + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreForSourceResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - model-hub + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /model-hub/scores/{id}/: + delete: + description: |- + Only the annotator who created the score or an org Owner/Admin may + delete it. + operationId: model-hub_scores_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Soft-delete a score. + tags: + - model-hub + x-accepts: + - application/json + get: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + x-accepts: + - application/json + patch: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Score' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + put: + description: |- + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + operationId: model-hub_scores_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Score' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Universal Score CRUD. + tags: + - model-hub + x-content-type: application/json + x-accepts: + - application/json + /sdk/api/v1/configure-evaluations/: + post: + description: "" + operationId: sdk_api_v1_configure-evaluations_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SDKConfigureEvaluationsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKConfigureEvaluationsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /sdk/api/v1/eval/: + post: + description: "" + operationId: sdk_api_v1_eval_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /sdk/api/v1/eval/{eval_id}/: + get: + description: "" + operationId: sdk_api_v1_eval_read + parameters: + - explode: false + in: path + name: eval_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKEvalTemplateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-accepts: + - application/json + /sdk/api/v1/evaluate-pipeline/: + get: + description: "" + operationId: sdk_api_v1_evaluate-pipeline_list + parameters: + - explode: true + in: query + name: project_name + required: true + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: versions + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKCICDEvaluationRunsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + post: + description: "" + operationId: sdk_api_v1_evaluate-pipeline_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CICDJob' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKCICDEvaluationRunAcceptedResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /sdk/api/v1/get-evals/: + get: + description: "" + operationId: sdk_api_v1_get-evals_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKGetEvalsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-accepts: + - application/json + /sdk/api/v1/new-eval/: + get: + description: "" + operationId: sdk_api_v1_new-eval_list + parameters: + - explode: true + in: query + name: eval_id + required: true + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalV2Response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + post: + description: "" + operationId: sdk_api_v1_new-eval_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalV2Request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKStandaloneEvalResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - sdk + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /sdk/api/v1/simulation/analytics/: + get: + description: |- + Aggregated analytics view: eval scores (radar chart data), critical issues, + FMA suggestions. Corresponds to the Analytics tab in the UI. + operationId: getSimulationAnalytics + parameters: + - explode: true + in: query + name: run_test_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: eval_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: summary + required: false + schema: + default: true + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKSimulationAnalyticsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /simulation/analytics/ + tags: + - Simulations + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /sdk/api/v1/simulation/metrics/: + get: + description: "Aggregated system metrics: latency (by subsystem), cost, conversation\ + \ metrics." + operationId: listSimulationMetrics + parameters: + - explode: true + in: query + name: run_test_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: call_execution_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKSimulationMetricsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /simulation/metrics/ + tags: + - Simulations + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /sdk/api/v1/simulation/runs/: + get: + description: "Run-level records with eval scores, scenario metadata, call details." + operationId: listSimulationRuns + parameters: + - explode: true + in: query + name: run_test_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: call_execution_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: eval_name + required: false + schema: + minLength: 1 + type: string + style: form + - explode: true + in: query + name: summary + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKSimulationRunsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/SDKErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: GET /simulation/runs/ + tags: + - Simulations + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/agent-definitions/: + delete: + description: Bulk soft-delete agent definitions. + operationId: simulate_agent-definitions_delete + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionBulkDeleteRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionBulkDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + get: + description: Get paginated list of agent definitions for the user's organization. + operationId: listAgentDefinitions + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: agent_type + required: false + schema: + enum: + - voice + - text + type: string + style: form + x-nullable: true + - explode: true + in: query + name: agent_definition_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AgentDefinitionListResponse' + type: array + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/agent-definitions/create/: + post: + description: Create a new agent definition with its first version. + operationId: createAgentDefinition + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionCreateRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/: + get: + description: Get details of a specific agent definition with version information. + operationId: getAgentDefinition + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/delete/: + delete: + description: Soft delete an agent definition. + operationId: deleteAgentDefinition + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/edit/: + put: + description: Update an existing agent definition. + operationId: updateAgentDefinition + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionEditRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentDefinitionEditResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Agent Definitions + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/: + get: + description: Get all versions of a specific agent definition. + operationId: simulate_agent-definitions_versions_list + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AgentVersionListResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/create/: + post: + description: Create a new version of an agent definition. + operationId: simulate_agent-definitions_versions_create_create + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionCreateRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/{version_id}/: + get: + description: Get details of a specific agent version. + operationId: simulate_agent-definitions_versions_read + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/: + post: + description: Activate a specific agent version. + operationId: simulate_agent-definitions_versions_activate_create + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionActivateResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/: + get: + description: Get the call executions of an agent version. + operationId: simulate_agent-definitions_versions_call-executions_list + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CallExecution' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/: + delete: + description: Soft delete an agent version. + operationId: simulate_agent-definitions_versions_delete_delete + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/: + get: + description: Get the eval summary of an agent version. + operationId: simulate_agent-definitions_versions_eval-summary_list + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalSummaryResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/: + post: + description: Restore agent definition from a specific version. + operationId: simulate_agent-definitions_versions_restore_create + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentVersionRestoreResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/api/call-executions/: + get: + description: |- + Get paginated list of call executions for the user's organization + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call status + - test_execution_id: filter by specific test execution + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: simulate_api_call-executions_list + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: status + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: test_execution_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/CallExecution' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/api/personas/: + get: + description: List personas with pagination + operationId: listPersonas + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listPersonas_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + x-accepts: + - application/json + post: + description: Create a new workspace-level persona + operationId: createPersona + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaCreate' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaCreate' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + x-content-type: application/json + x-accepts: + - application/json + /simulate/api/personas/duplicate/{persona_id}/: + post: + description: Duplicate a persona by ID + operationId: simulate_api_personas_duplicate_create + parameters: + - explode: false + in: path + name: persona_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PersonaDuplicateRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaDuplicateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/api/personas/field-options/: + get: + description: Get field options/choices for persona creation + operationId: simulate_api_personas_field_options + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/simulate_api_personas_field_options_200_response' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/api/personas/system/: + get: + description: Get only system-level personas + operationId: simulate_api_personas_system_personas + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/simulate_api_personas_system_personas_200_response' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/api/personas/workspace/: + get: + description: Get only workspace-level personas + operationId: simulate_api_personas_workspace_personas + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/simulate_api_personas_system_personas_200_response' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/api/personas/{id}/: + delete: + description: Delete a persona (workspace-level only) + operationId: deletePersona + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + x-accepts: + - application/json + get: + description: Retrieve a specific persona + operationId: getPersona + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + x-accepts: + - application/json + patch: + description: ViewSet for managing Personas. + operationId: updatePersona + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Persona' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Personas + x-content-type: application/json + x-accepts: + - application/json + put: + description: Update a persona (workspace-level only) + operationId: simulate_api_personas_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Persona' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-content-type: application/json + x-accepts: + - application/json + /simulate/api/personas/{id}/duplicate/: + post: + description: Duplicate a persona (creates a workspace-level copy) + operationId: simulate_api_personas_duplicate + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/PersonaDuplicateRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaDuplicateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/api/run-tests/: + get: + description: |- + Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: simulate_api_run-tests_list + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: simulation_type + required: false + schema: + enum: + - agent_definition + - prompt + type: string + style: form + - explode: true + in: query + name: prompt_template_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RunTestResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/api/test-executions/: + get: + description: |- + Get paginated list of test executions for the user's organization + Query Parameters: + - search: search string to filter test executions by run test name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: listTestExecutions + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TestExecution' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/: + get: + description: Get a specific call execution with all its details + operationId: simulate_call-executions_read + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionDetail' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + patch: + description: Update the status of a specific call execution + operationId: simulate_call-executions_partial_update + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionStatusUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecution' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/branch-analysis/: + get: + description: Analyze a call execution against graph branches and identify deviations + operationId: simulate_call-executions_branch-analysis_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallBranchAnalysisResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + post: + description: Create deviation nodes and edges for a call execution + operationId: simulate_call-executions_branch-analysis_create + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallBranchDeviationCreateResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/chat/send-message/: + post: + description: Send a message to a chat execution + operationId: simulate_call-executions_chat_send-message_create + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SendChatRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ChatSendMessageResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/delete/: + delete: + description: Delete a specific call execution + operationId: simulate_call-executions_delete_delete + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "204": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/error-localizer-tasks/: + get: + description: Get error localizer tasks for a specific call execution + operationId: simulate_call-executions_error-localizer-tasks_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorLocalizerTasksResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/logs/: + get: + description: Paginated API to retrieve stored log entries for a call execution. + operationId: simulate_call-executions_logs_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionLogsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/session-comparison/: + get: + description: API View to compare session chat simulations + operationId: simulate_call-executions_session-comparison_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SessionComparisonResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/call-executions/{call_execution_id}/transcripts/: + get: + description: Get transcripts for a specific call execution + operationId: simulate_call-executions_transcripts_list + parameters: + - explode: false + in: path + name: call_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallTranscriptResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/export/{item_id}/: + get: + description: |- + Export data as CSV based on type parameter + Query Parameters: + - type: 'runtest' or 'testexecution' (required) + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + operationId: simulate_export_read + parameters: + - explode: false + in: path + name: item_id + required: true + schema: + type: string + style: simple + - description: Export source type. + explode: true + in: query + name: type + required: true + schema: + enum: + - runtest + - testexecution + type: string + style: form + - description: Optional call-execution search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Optional call-execution status filter. + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + format: binary + type: string + description: CSV export + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/prompt-simulations/scenarios/: + get: + description: |- + Query Parameters: + - limit: number of items per page (default: 20) + - page: page number (default: 1) + - search: search string to filter scenarios by name + operationId: simulate_prompt-simulations_scenarios_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationScenariosResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get list of scenarios available for prompt simulations. + tags: + - simulate + x-accepts: + - application/json + /simulate/prompt-templates/{prompt_template_id}/simulations/: + get: + description: |- + Query Parameters: + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - version_id: filter by specific prompt version + operationId: simulate_prompt-templates_simulations_list + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get paginated list of simulation runs for a specific prompt template. + tags: + - simulate + x-accepts: + - application/json + post: + description: |- + Request Body: + - name: Name of the simulation run + - description: Optional description + - prompt_version_id: The prompt version to use + - scenario_ids: List of scenario IDs to run + - dataset_row_ids: Optional list of specific row IDs + - evaluations_config: Optional evaluation configurations + - enable_tool_evaluation: Optional boolean to enable tool evaluation + operationId: simulate_prompt-templates_simulations_create + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePromptSimulationRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationRunResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Create a new prompt-based simulation run. + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/: + delete: + description: Soft delete a prompt simulation run. + operationId: simulate_prompt-templates_simulations_delete + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + get: + description: Retrieve a specific prompt simulation run. + operationId: simulate_prompt-templates_simulations_read + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationRunResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + patch: + description: "Update a prompt simulation run (version, scenarios, etc.)." + operationId: simulate_prompt-templates_simulations_partial_update + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromptSimulationRunResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/: + post: + description: |- + Request Body (optional): + - scenario_ids: List of specific scenario IDs to run (default: all scenarios) + - select_all: If true, run all scenarios except ones in scenario_ids + operationId: simulate_prompt-templates_simulations_execute_create + parameters: + - explode: false + in: path + name: prompt_template_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExecutePromptSimulationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ExecutePromptSimulationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Execute a prompt-based simulation run. + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/: + get: + description: |- + Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - simulation_type: filter by source type (RunTest.SourceTypes values: + 'agent_definition' or 'prompt') + - prompt_template_id: filter by prompt template ID (used when + simulation_type is 'prompt') + operationId: listRunTests + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: simulation_type + required: false + schema: + enum: + - agent_definition + - prompt + type: string + style: form + - explode: true + in: query + name: prompt_template_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RunTestResponse' + type: array + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/run-tests/active/: + get: + description: Get all active tests + operationId: simulate_run-tests_active_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AllActiveTests' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/run-tests/create/: + post: + description: Create a new RunTest + operationId: createRunTest + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRunTest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/get-id-by-name/{run_test_name}/: + get: + description: API View to get the id of a run test by name + operationId: simulate_run-tests_get-id-by-name_read + parameters: + - explode: false + in: path + name: run_test_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestNameResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/: + delete: + description: Delete a specific RunTest (soft delete) + operationId: deleteRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestMessageResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-accepts: + - application/json + get: + description: Retrieve a specific RunTest + operationId: getRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-accepts: + - application/json + patch: + description: Update a specific RunTest + operationId: updateRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRunTest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/analytics/: + get: + description: Get analytics data for a specific run test across multiple test + executions + operationId: getRunTestAnalytics + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestAnalytics' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/call-executions/: + get: + description: |- + Get all call executions for a specific run test with pagination and search + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + - limit: number of call executions per page (default: 10) + - page: page number for call executions (default: 1) + operationId: listRunTestCallExecutions + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestCallExecutionsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/chat-execute/: + post: + description: Execute a test run + operationId: simulate_run-tests_chat-execute_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestChatExecutionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/components/: + patch: + description: Update components of a specific RunTest + operationId: simulate_run-tests_components_partial_update + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestComponentsUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/delete-test-executions/: + post: + description: Delete multiple test executions within a run test. + operationId: simulate_run-tests_delete-test-executions_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionBulkDelete' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionBulkDeleteResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/delete/: + delete: + description: Delete a specific run test + operationId: simulate_run-tests_delete_delete + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/eval-configs/: + post: + description: Adds evaluation configurations to a test run. Returns 201 with + the created configs. + operationId: simulate_run-tests_eval-configs_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddEvalConfigsRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AddEvalConfigsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add evaluation configurations + tags: + - Run Tests - Eval Configs + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/: + delete: + description: Soft-deletes an evaluation configuration. Cannot delete the last + remaining config in the test run. + operationId: simulate_run-tests_eval-configs_delete + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_config_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteEvalConfigResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Delete evaluation configuration + tags: + - Run Tests - Eval Configs + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/: + get: + description: Get the structure of an evaluation config + operationId: simulate_run-tests_eval-configs_get-structure_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_config_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalConfigStructureResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/: + post: + description: "Updates an evaluation configuration and optionally triggers a\ + \ rerun. When run=true, test_execution_id is required." + operationId: simulate_run-tests_eval-configs_update_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: eval_config_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvalConfigUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalConfigUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Update evaluation configuration + tags: + - Run Tests - Eval Configs + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/eval-summary-comparison/: + get: + description: Compares evaluation summary statistics across multiple test executions. + operationId: simulate_run-tests_eval-summary-comparison_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - description: "JSON-encoded array of test execution UUIDs to compare. Example:\ + \ [\"uuid1\",\"uuid2\"]. Must be URL-encoded." + explode: true + in: query + name: execution_ids + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalSummaryComparisonResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Compare evaluation summaries + tags: + - Run Tests - Eval Summary + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/eval-summary/: + get: + description: "Returns evaluation summary statistics for a test run, optionally\ + \ scoped to a single execution." + operationId: simulate_run-tests_eval-summary_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + - description: "UUID of a specific test execution to scope the summary to. If\ + \ omitted, aggregates across all executions." + explode: true + in: query + name: execution_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalSummaryResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get evaluation summary + tags: + - Run Tests - Eval Summary + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/execute/: + post: + description: Execute a test run + operationId: executeRunTest + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExecuteRunTest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestExecutionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/executions/: + get: + description: |- + Get test execution data for a specific run test + Query Parameters: + - search: search string to filter test executions by status or scenario name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: listRunTestExecutions + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TestExecutionItemResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/rerun-test-executions/: + post: + description: |- + Rerun multiple test executions (either evaluation only or call + evaluation). + All call executions within each test execution are rerun. + operationId: simulate_run-tests_rerun-test-executions_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionRerun' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionRerunResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/run-new-evals/: + post: + description: Runs new evaluations on completed test executions. Either test_execution_ids + or select_all=true must be provided. + operationId: simulate_run-tests_run-new-evals_create + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunNewEvalsOnTestExecution' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunNewEvalsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "401": + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Run new evaluations on test executions + tags: + - Run Tests - Eval Configs + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/scenarios/: + get: + description: |- + Get paginated list of scenarios for a specific run test + Query Parameters: + - search: search string to filter scenarios by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + operationId: simulate_run-tests_scenarios_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/RunTestScenarioItemResponse' + type: array + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/sdk-code/: + get: + description: Get the SDK code with placeholders filled + operationId: simulate_run-tests_sdk-code_list + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ChatSDKCodeResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/run-tests/{run_test_id}/status/: + get: + description: Get test execution status + operationId: getRunTestStatus + parameters: + - explode: false + in: path + name: run_test_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionStatusSummary' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Run Tests + x-accepts: + - application/json + /simulate/scenarios/: + get: + description: Returns a paginated list of scenarios for the user's organization. + operationId: listScenarios + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: agent_definition_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: agent_type + required: false + schema: + minLength: 1 + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioListResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: List scenarios + tags: + - Simulation Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/scenarios/create/: + post: + description: "Creates a new scenario (dataset, script, or graph kind). Returns\ + \ 202 with processing status." + operationId: createScenario + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioCreateRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioCreateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Create scenario + tags: + - Simulation Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/scenarios/get-columns/: + get: + description: Returns a paginated list of scenarios for the user's organization. + operationId: simulate_scenarios_get-columns_list + parameters: + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: agent_definition_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: agent_type + required: false + schema: + minLength: 1 + type: string + style: form + x-nullable: true + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioListResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: List scenarios + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/scenarios/{scenario_id}/: + get: + description: Returns full detail of a specific scenario including graph data + and prompts. + operationId: getScenario + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioDetailResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Get scenario detail + tags: + - Simulation Scenarios + x-accepts: + - application/json + /simulate/scenarios/{scenario_id}/add-columns/: + post: + description: Adds new columns to a scenario's dataset via Temporal workflow. + Returns 202 Accepted. + operationId: simulate_scenarios_add-columns_create + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddColumnsRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddColumnsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add columns to scenario + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/scenarios/{scenario_id}/add-rows/: + post: + description: Adds new rows to a scenario's dataset via Temporal workflow. Returns + 202 Accepted. + operationId: simulate_scenarios_add-rows_create + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddRowsRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioAddRowsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Add rows to scenario + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/scenarios/{scenario_id}/delete/: + delete: + description: Soft-deletes a scenario by setting deleted=True. + operationId: deleteScenario + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Delete scenario + tags: + - Simulation Scenarios + x-accepts: + - application/json + /simulate/scenarios/{scenario_id}/edit/: + put: + description: "Updates scenario name, description, graph, or prompt." + operationId: updateScenario + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioEditRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioEditResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Edit scenario + tags: + - Simulation Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/scenarios/{scenario_id}/prompts/: + put: + description: Updates the simulator agent prompt for a scenario. + operationId: simulate_scenarios_prompts_update + parameters: + - explode: false + in: path + name: scenario_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioEditPromptsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioPromptsUpdateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ScenarioErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Edit scenario prompts + tags: + - Scenarios + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/simulator-agents/: + get: + description: List simulator agents with pagination and search + operationId: simulate_simulator-agents_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentListResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/simulator-agents/create/: + post: + description: Create a new simulator agent + operationId: simulate_simulator-agents_create_create + requestBody: + $ref: '#/components/requestBodies/SimulatorAgent' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentValidationErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/simulator-agents/{agent_id}/: + get: + description: Get details of a specific simulator agent + operationId: simulate_simulator-agents_read + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/simulator-agents/{agent_id}/delete/: + delete: + description: Soft delete a simulator agent + operationId: simulate_simulator-agents_delete_delete + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentDeleteResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorWithDetailsResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/simulator-agents/{agent_id}/edit/: + put: + description: Edit an existing simulator agent + operationId: simulate_simulator-agents_edit_update + parameters: + - explode: false + in: path + name: agent_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/SimulatorAgent' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgentValidationErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/: + get: + description: |- + Get a specific test execution with all its details and paginated call executions + Query Parameters: + - search: search string to filter call executions + - page: page number for call executions (default: 1) + - filters: JSON array of filter objects + - row_groups: JSON array of column IDs to group by + - group_keys: JSON array of group keys + operationId: getTestExecution + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: search + required: false + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: row_groups + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: group_keys + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 30 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionDetailResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/analytics/: + get: + description: Get analytics data for a specific test execution + operationId: getTestExecutionAnalytics + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionAnalytics' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/cancel/: + post: + description: Cancel a test execution + operationId: cancelTestExecution + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CancelTestExecutionResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/: + post: + description: |- + This follows the same flow as inbound/outbound calls: + 1. Resolve SimulatorAgent (scenario > run_test > fallback) + 2. Extract base_prompt from SimulatorAgent + 3. Handle dataset scenarios (create one CallExecution per row) + 4. Enhance prompt with row data if applicable + 5. Store proper metadata in CallExecution + + Returns exactly 10 CallExecution objects per API call. + hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + operationId: simulate_test-executions_chat_call-executions_batch_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionChatBatchResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Create a batch of CallExecution records for chat execution (exactly + 10 per API call). + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/column-order/: + put: + description: Update column order for a test execution + operationId: simulate_test-executions_column-order_update + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionColumnOrder' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionColumnOrderResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/delete/: + delete: + description: Delete a specific test execution + operationId: simulate_test-executions_delete_delete + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/eval-explanation-summary/: + get: + description: |- + Fetch the evaluation explanation summary from the database. + If not present, trigger async calculation and return empty response. + operationId: simulate_test-executions_eval-explanation-summary_list + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalExplanationSummaryResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/: + post: + description: |- + Refresh the evaluation explanation summary by recalculating it. + This endpoint triggers the summary calculation task again. + operationId: simulate_test-executions_eval-explanation-summary_refresh_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EvalExplanationSummaryRefreshResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/kpis/: + get: + description: Get combined KPI values for a specific run test + operationId: getTestExecutionKpis + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RunTestKPIsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/optimiser-analysis/: + get: + description: |- + Fetch the agent optimiser analysis for a test execution. + If not present or pending, returns status information. + operationId: simulate_test-executions_optimiser-analysis_list + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OptimiserAnalysisResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/: + post: + description: Trigger a new agent optimiser analysis run. + operationId: simulate_test-executions_optimiser-analysis_refresh_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/EmptyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OptimiserAnalysisRefreshResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiTextErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/performance-summary/: + get: + description: Get performance summary data for a specific test execution + operationId: getTestExecutionPerformanceSummary + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PerformanceSummary' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/rerun-calls/: + post: + description: Rerun multiple call executions (either evaluation only or call + + evaluation) + operationId: simulate_test-executions_rerun-calls_create + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CallExecutionRerun' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RerunCallsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - simulate + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /simulate/test-executions/{test_execution_id}/transcripts/: + get: + description: Get all transcripts for a test execution + operationId: getTestExecutionTranscripts + parameters: + - explode: false + in: path + name: test_execution_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TestExecutionTranscriptsResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Simulation Test Executions + x-accepts: + - application/json + /tracer/bulk-annotation/: + post: + description: "" + operationId: createBulkTraceAnnotation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkAnnotationRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BulkAnnotationResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/feed/issues/: + get: + description: GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + operationId: listErrorFeedIssues + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: status + required: false + schema: + enum: + - escalating + - for_review + - acknowledged + - resolved + type: string + style: form + - explode: true + in: query + name: fix_layer + required: false + schema: + type: string + style: form + - explode: true + in: query + name: source + required: false + schema: + enum: + - scanner + - eval + type: string + style: form + - explode: true + in: query + name: issue_group + required: false + schema: + type: string + style: form + - explode: true + in: query + name: time_range_days + required: false + schema: + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: sort_by + required: false + schema: + default: last_seen + enum: + - last_seen + - first_seen + - error_count + - unique_traces + type: string + style: form + - explode: true + in: query + name: sort_dir + required: false + schema: + default: desc + enum: + - asc + - desc + type: string + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 25 + maximum: 200 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedListApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/feed/issues/stats/: + get: + description: GET /tracer/feed/issues/stats/ — top stats bar totals. + operationId: getErrorFeedIssueStats + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: time_range_days + required: false + schema: + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedStatsApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/: + get: + description: "GET + PATCH /tracer/feed/issues/{cluster_id}/" + operationId: getErrorFeedIssue + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedDetailApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + patch: + description: "GET + PATCH /tracer/feed/issues/{cluster_id}/" + operationId: tracer_feed_issues_partial_update + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FeedUpdateBody' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedDetailApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/create-linear-issue/: + post: + description: "POST /tracer/feed/issues/{cluster_id}/create-linear-issue/" + operationId: tracer_feed_issues_create-linear-issue_create + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLinearIssue' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLinearIssueResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/deep-analysis/: + post: + description: "POST /tracer/feed/issues/{cluster_id}/deep-analysis/" + operationId: tracer_feed_issues_deep-analysis_create + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeepAnalysisBody' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeepAnalysisDispatchApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/overview/: + get: + description: "GET /tracer/feed/issues/{cluster_id}/overview/" + operationId: tracer_feed_issues_overview_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OverviewApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/root-cause/: + get: + description: |- + Read cached deep-analysis results for a single trace within the + cluster. The frontend hits this on mount (to show existing results) + and polls it after a POST to /deep-analysis/ until ``status`` flips + from ``running`` to ``done`` or ``failed``. + operationId: tracer_feed_issues_root-cause_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: trace_id + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeepAnalysisApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X" + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/sidebar/: + get: + description: |- + Accepts an optional ``?trace_id=`` query param. When present, the + trace-level sections (AI Metadata + Evaluations) are computed for + that trace instead of the cluster's latest, keeping the sidebar in + sync with the Overview tab's trace selection. + operationId: tracer_feed_issues_sidebar_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: trace_id + required: false + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FeedSidebarApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "GET /tracer/feed/issues/{cluster_id}/sidebar/" + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/traces/: + get: + description: "GET /tracer/feed/issues/{cluster_id}/traces/" + operationId: tracer_feed_issues_traces_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: limit + required: false + schema: + default: 50 + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TracesTabApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/feed/issues/{cluster_id}/trends/: + get: + description: "GET /tracer/feed/issues/{cluster_id}/trends/" + operationId: tracer_feed_issues_trends_list + parameters: + - explode: false + in: path + name: cluster_id + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: days + required: false + schema: + default: 14 + maximum: 90 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TrendsTabApiResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/get-annotation-labels/: + get: + description: "" + operationId: listTraceAnnotationLabels + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetAnnotationLabelsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/project/list_projects/: + get: + description: |- + Volume counts come from ClickHouse (fast) instead of a PG + JOIN on observation_spans (was 12+ seconds). + operationId: listTraceProjects + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listTraceProjects_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: List projects filtered by organization ID. + tags: + - Tracing + x-accepts: + - application/json + /tracer/trace-annotation/: + get: + description: "" + operationId: tracer_trace-annotation_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_annotation_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + post: + description: "" + operationId: tracer_trace-annotation_create + requestBody: + $ref: '#/components/requestBodies/GetTraceAnnotation' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace-annotation/get_annotation_values/: + get: + description: "" + operationId: tracer_trace-annotation_get_annotation_values + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: observation_span_id + required: false + schema: + maxLength: 255 + minLength: 1 + type: string + style: form + x-nullable: true + - explode: true + in: query + name: trace_id + required: false + schema: + format: uuid + type: string + style: form + x-nullable: true + - explode: true + in: query + name: annotators + required: false + schema: + type: string + style: form + - explode: true + in: query + name: exclude_annotators + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotationValuesResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/trace-annotation/{id}/: + delete: + description: "" + operationId: tracer_trace-annotation_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + get: + description: "" + operationId: tracer_trace-annotation_read + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + patch: + description: "" + operationId: tracer_trace-annotation_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/GetTraceAnnotation' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: tracer_trace-annotation_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/GetTraceAnnotation' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace-session/: + get: + description: "" + operationId: tracer_trace-session_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + post: + description: "" + operationId: tracer_trace-session_create + requestBody: + $ref: '#/components/requestBodies/TraceSession' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace-session/get_session_filter_values/: + get: + description: |- + Return distinct values for a session-level column. + Used by the filter panel's value picker for session-specific fields + (session_id, user_id, first_message, etc.). + + Query params: + project_id: required + column: canonical session column name, e.g. "session_id" + search: optional search substring + page: page number (0-based), default 0 + page_size: default 50 + operationId: tracer_trace-session_get_session_filter_values + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + /tracer/trace-session/get_session_graph_data/: + post: + description: |- + Supports the same metric types as the trace graph endpoint: + - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + avg_duration, avg_traces_per_session — all aggregated at session level + - EVAL: eval scores averaged across sessions + - ANNOTATION: annotation scores averaged across sessions + + Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + operationId: getTraceSessionGraphData + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSessionGraphDataRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSessionGraphDataRequest' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Fetch time-series session metrics for the observe graph. + tags: + - Tracing + x-runtime-request-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace-session/get_trace_session_export_data/: + get: + description: Export traces filtered by project ID and project version ID with + optimized queries. + operationId: tracer_trace-session_get_trace_session_export_data + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + /tracer/trace-session/list_sessions/: + get: + description: List traces filtered by project ID and project version ID with + optimized queries. + operationId: listTraceSessions + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: user_id + required: false + schema: + type: string + style: form + - explode: true + in: query + name: bookmarked + required: false + schema: + type: boolean + style: form + x-nullable: true + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: sort_params + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page_number + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 30 + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: interval + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_session_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-accepts: + - application/json + /tracer/trace-session/{id}/: + delete: + description: "" + operationId: tracer_trace-session_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + get: + description: "" + operationId: getTraceSession + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-accepts: + - application/json + patch: + description: "" + operationId: tracer_trace-session_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/TraceSession' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: tracer_trace-session_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/TraceSession' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace-session/{id}/eval_logs/: + get: + description: |- + Session-level eval results are walled off from span/trace surfaces + by ``target_type='session'`` — this endpoint is the only place + they appear. + + Query params: + page (int, 0-indexed, default 0) + page_size (int, default 25, max 100) + operationId: tracer_trace-session_eval_logs + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Session-scoped eval log feed for TracesDrawer's "Evals" tab. + tags: + - tracer + x-accepts: + - application/json + /tracer/trace/: + get: + description: "" + operationId: tracer_trace_list + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + post: + description: "" + operationId: tracer_trace_create + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace/agent_graph/: + get: + description: |- + Computes nodes (distinct span types/names) and edges (parent→child + transitions) across all traces in the given time window. + operationId: tracer_trace_agent_graph + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Return the aggregate agent graph for a project. + tags: + - tracer + x-runtime-request-validation: true + x-accepts: + - application/json + /tracer/trace/bulk_create/: + post: + description: "" + operationId: tracer_trace_bulk_create + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace/compare_traces/: + post: + description: Compare traces across project versions with optimized queries. + operationId: tracer_trace_compare_traces + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace/get_eval_names/: + get: + description: Fetch all evaluation template names. + operationId: tracer_trace_get_eval_names + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + /tracer/trace/get_graph_methods/: + post: + description: Fetch data for the observe graph with optimized queries + operationId: getTraceGraphMethods + requestBody: + $ref: '#/components/requestBodies/ObserveGraphDataRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ObserveGraphDataResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace/get_properties/: + get: + description: Fetch all properties for graphing. + operationId: listTraceProperties + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-accepts: + - application/json + /tracer/trace/get_trace_export_data/: + get: + description: |- + Export traces filtered by project ID with optimized queries. + Auto-detects voice/conversation projects and exports voice-specific fields. + operationId: tracer_trace_get_trace_export_data + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + /tracer/trace/get_trace_id_by_index/: + get: + description: Get the previous and next trace id by index using efficient database + queries. + operationId: tracer_trace_get_trace_id_by_index + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: trace_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_version_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-accepts: + - application/json + /tracer/trace/get_trace_id_by_index_observe/: + get: + description: Get the previous and next trace id by index. + operationId: tracer_trace_get_trace_id_by_index_observe + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: trace_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-accepts: + - application/json + /tracer/trace/list_traces/: + get: + description: List traces filtered by project ID and project version ID with + optimized queries. + operationId: listTraces + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_version_id + required: true + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: trace_ids + required: false + schema: + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: sort_params + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page_number + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 30 + maximum: 500 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-accepts: + - application/json + /tracer/trace/list_traces_of_session/: + get: + description: List traces filtered by project ID with optimized queries. + operationId: tracer_trace_list_traces_of_session + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: project_version_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: session_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: page_number + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: page_size + required: false + schema: + default: 30 + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: interval + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-accepts: + - application/json + /tracer/trace/list_voice_calls/: + get: + description: |- + List voice/conversation traces for a project in an optimized way and + return a response similar to the provided call object schema. + + Query params: + - project_id (required) + - page (1-based, optional, default 1) + - page_size (optional, default 30) + operationId: listVoiceCalls + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-accepts: + - application/json + /tracer/trace/voice_call_detail/: + get: + description: |- + Query params: + - trace_id (required) — UUID of the voice call trace. + operationId: getVoiceCallDetail + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tracer_trace_list_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: Return the heavy / detail-only fields for a single voice call. + tags: + - Tracing + x-accepts: + - application/json + /tracer/trace/{id}/: + delete: + description: "" + operationId: tracer_trace_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + get: + description: Retrieve a trace by its ID. + operationId: getTrace + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-accepts: + - application/json + patch: + description: "" + operationId: tracer_trace_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: tracer_trace_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Trace' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/trace/{id}/tags/: + patch: + description: Update tags for a trace. + operationId: updateTraceTags + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TraceTagsUpdate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TraceTagsUpdate' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alert-logs/: + get: + description: "" + operationId: listAlertLogs + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlertLogs_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + post: + description: "" + operationId: tracer_user-alert-logs_create + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alert-logs/all/: + get: + description: "" + operationId: listAllAlertLogs + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlertLogs_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + /tracer/user-alert-logs/resolve/: + post: + description: "" + operationId: resolveAlertLogs + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alert-logs/{id}/: + delete: + description: "" + operationId: tracer_user-alert-logs_delete + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + get: + description: "" + operationId: getAlertLog + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + patch: + description: "" + operationId: tracer_user-alert-logs_partial_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: tracer_user-alert-logs_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitorLog' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alert-logs/{id}/list/: + get: + description: "" + operationId: listAlertLogsForAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + /tracer/user-alerts/: + get: + description: "" + operationId: listAlerts + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlerts_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + post: + description: "" + operationId: createAlert + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alerts/bulk-mute/: + post: + description: "" + operationId: bulkMuteAlerts + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alerts/duplicate/: + post: + description: "" + operationId: tracer_user-alerts_duplicate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorDuplicate' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorDuplicateResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-runtime-request-validation: true + x-runtime-response-validation: true + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alerts/list_monitors/: + get: + description: "" + operationId: tracer_user-alerts_list_monitors + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAlerts_200_response' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json + /tracer/user-alerts/metric-options/: + get: + description: "" + operationId: listAlertMetricOptions + parameters: + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Number of results to return per page. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorMetricOptionsResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + /tracer/user-alerts/preview-graph/: + post: + description: |- + Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. + Accepts monitor configuration in the request body. + operationId: previewAlertGraph + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alerts/{id}/: + delete: + description: "" + operationId: deleteAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + get: + description: "" + operationId: getAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + patch: + description: "" + operationId: updateAlert + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-content-type: application/json + x-accepts: + - application/json + put: + description: "" + operationId: tracer_user-alerts_update + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/UserAlertMonitor' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-content-type: application/json + x-accepts: + - application/json + /tracer/user-alerts/{id}/details/: + get: + description: "" + operationId: getAlertDetails + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Alerts + x-accepts: + - application/json + /tracer/user-alerts/{id}/graph/: + get: + description: |- + Accepts `start_date` and `end_date` query parameters (ISO 8601 format). + If not provided, it defaults to the last 7 days. + operationId: getAlertGraph + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + summary: "Returns time-series data for a monitor's metric, suitable for graphing." + tags: + - Alerts + x-accepts: + - application/json + /tracer/users/: + get: + description: List traces filtered by project ID with optimized queries. + operationId: listTraceUsers + parameters: + - explode: true + in: query + name: project_id + required: false + schema: + format: uuid + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: page_size + required: false + schema: + maximum: 500 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: current_page_index + required: false + schema: + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: sort_params + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + - explode: true + in: query + name: filters + required: false + schema: + default: "[]" + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - Tracing + x-runtime-request-validation: true + x-runtime-response-validation: true + x-accepts: + - application/json + /tracer/users/get_code_example/: + get: + description: "" + operationId: tracer_users_get_code_example_list + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/UserCodeExampleResponse' + description: Response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + description: Response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ManagementAPIErrorResponse' + description: Default error response + tags: + - tracer + x-accepts: + - application/json +components: + requestBodies: + AnnotationQueue: + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationQueue' + required: true + SimulatorAgent: + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatorAgent' + required: true + MemberRemove: + content: + application/json: + schema: + $ref: '#/components/schemas/MemberRemove' + required: true + QueueItemNavigationRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItemNavigationRequest' + required: true + ObserveGraphDataRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ObserveGraphDataRequest' + required: true + UserAlertMonitorLog: + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitorLog' + required: true + PromptLabel: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptLabel' + required: true + PromptTemplate: + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplate' + required: true + Score: + content: + application/json: + schema: + $ref: '#/components/schemas/Score' + required: true + DatasetRowDiffRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRowDiffRequest' + required: true + CompareDataset: + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDataset' + required: true + PersonaDuplicateRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/PersonaDuplicateRequest' + required: true + ApiKey: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + required: true + UserAlertMonitor: + content: + application/json: + schema: + $ref: '#/components/schemas/UserAlertMonitor' + required: true + EmptyRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/EmptyRequest' + required: true + LegacyKnowledgeBaseMutationRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyKnowledgeBaseMutationRequest' + required: true + AutomationRule: + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRule' + required: true + QueueItem: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueItem' + required: true + Feedback: + content: + application/json: + schema: + $ref: '#/components/schemas/Feedback' + required: true + TraceSession: + content: + application/json: + schema: + $ref: '#/components/schemas/TraceSession' + required: true + QueueLabelRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueLabelRequest' + required: true + DiscussionThreadStatusRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/DiscussionThreadStatusRequest' + required: true + AnnotationsLabels: + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationsLabels' + required: true + ModelHubEmptyRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ModelHubEmptyRequest' + required: true + UserEvalMutationRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/UserEvalMutationRequest' + required: true + ExperimentRerunRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentRerunRequest' + required: true + ExperimentComparisonWeightsRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentComparisonWeightsRequest' + required: true + Persona: + content: + application/json: + schema: + $ref: '#/components/schemas/Persona' + required: true + GetTraceAnnotation: + content: + application/json: + schema: + $ref: '#/components/schemas/GetTraceAnnotation' + required: true + Trace: + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + required: true + schemas: + AccountsErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ManagementAPIErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + WorkspaceAccessInput: + description: "List of {\"workspace_id\": \"\", \"level\": }." + example: + workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + level: 1 + properties: + workspace_id: + format: uuid + title: Workspace id + type: string + level: + enum: + - 8 + - 3 + - 1 + title: Level + type: integer + required: + - workspace_id + type: object + MemberWorkspaceAccess: + example: + workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + properties: + workspace_id: + format: uuid + title: Workspace id + type: string + workspace_name: + minLength: 1 + title: Workspace name + type: string + ws_level: + title: Ws level + type: integer + ws_role: + minLength: 1 + title: Ws role + type: string + auto_access: + title: Auto access + type: boolean + required: + - workspace_id + - workspace_name + - ws_level + - ws_role + type: object + MemberListItem: + example: + auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + title: Name + type: string + email: + format: email + minLength: 1 + title: Email + type: string + org_level: + nullable: true + title: Org level + type: integer + org_role: + minLength: 1 + nullable: true + title: Org role + type: string + ws_level: + nullable: true + title: Ws level + type: integer + ws_role: + minLength: 1 + nullable: true + title: Ws role + type: string + workspaces: + items: + $ref: '#/components/schemas/MemberWorkspaceAccess' + type: array + status: + minLength: 1 + title: Status + type: string + created_at: + title: Created at + type: string + type: + enum: + - member + - invite + title: Type + type: string + auto_access: + title: Auto access + type: boolean + required: + - created_at + - email + - id + - name + - status + - type + type: object + MemberListResult: + example: + total: 5 + limit: 2 + page: 5 + results: + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + properties: + results: + items: + $ref: '#/components/schemas/MemberListItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + limit: + title: Limit + type: integer + required: + - limit + - page + - results + - total + type: object + MemberListResponse: + example: + result: + total: 5 + limit: 2 + page: 5 + results: + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + - auto_access: true + ws_level: 6 + name: name + org_level: 0 + created_at: created_at + ws_role: ws_role + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspaces: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + auto_access: true + ws_level: 1 + ws_role: ws_role + workspace_name: workspace_name + type: member + org_role: org_role + email: email + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MemberListResult' + required: + - result + - status + type: object + MemberRemove: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + user_id: + format: uuid + title: User id + type: string + required: + - user_id + type: object + MemberUserMutationResult: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + user_id: + format: uuid + title: User id + type: string + required: + - message + - user_id + type: object + MemberUserMutationResponse: + example: + result: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MemberUserMutationResult' + required: + - result + - status + type: object + MemberRoleUpdate: + example: + workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workspace_access: + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + level: 1 + - workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + level: 1 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 6 + org_level: 0 + properties: + user_id: + format: uuid + title: User id + type: string + org_level: + enum: + - 15 + - 8 + - 3 + - 1 + nullable: true + title: Org level + type: integer + ws_level: + enum: + - 8 + - 3 + - 1 + nullable: true + title: Ws level + type: integer + workspace_id: + description: Required when updating ws_level. + format: uuid + nullable: true + title: Workspace id + type: string + workspace_access: + description: "List of {workspace_id, level} for explicit workspace grants\ + \ on demotion." + items: + $ref: '#/components/schemas/WorkspaceAccessInput' + type: array + required: + - user_id + type: object + MemberRoleUpdateResult: + example: + changes: + key: "" + message: message + properties: + message: + minLength: 1 + title: Message + type: string + changes: + additionalProperties: true + title: Changes + type: object + required: + - changes + - message + type: object + MemberRoleUpdateResponse: + example: + result: + changes: + key: "" + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MemberRoleUpdateResult' + required: + - result + - status + type: object + WorkspaceSummary: + example: + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + is_default: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + display_name: + title: Display name + type: string + description: + title: Description + type: string + is_default: + title: Is default + type: boolean + required: + - display_name + - id + - name + type: object + UserInfoOrganization: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + ws_enabled: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + display_name: + title: Display name + type: string + ws_enabled: + title: Ws enabled + type: boolean + required: + - display_name + - id + - name + type: object + UserInfoTwoFactorMethods: + example: + totp: true + passkey: true + properties: + totp: + title: Totp + type: boolean + passkey: + title: Passkey + type: boolean + required: + - passkey + - totp + type: object + UserInfoResponse: + example: + role: role + org_2fa_required: true + created_at: 2000-01-23T04:56:07.000+00:00 + effective_level: 1 + onboarding_completed: true + get_started_completed: true + default_workspace_name: default_workspace_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + remember_me: true + email: email + ws_enabled: true + default_workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + goals: + - goals + - goals + org_2fa_grace_ends_at: 2000-01-23T04:56:07.000+00:00 + requires_org_setup: true + organization: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + ws_enabled: true + default_workspace_role: default_workspace_role + ws_level: 6 + name: name + org_level: 0 + default_workspace_display_name: default_workspace_display_name + has_2fa_enabled: true + organization_role: organization_role + two_factor_methods: + totp: true + passkey: true + status: status + properties: + id: + format: uuid + title: Id + type: string + email: + format: email + minLength: 1 + title: Email + type: string + name: + nullable: true + title: Name + type: string + organization_role: + nullable: true + title: Organization role + type: string + organization: + $ref: '#/components/schemas/UserInfoOrganization' + created_at: + format: date-time + title: Created at + type: string + status: + minLength: 1 + title: Status + type: string + role: + nullable: true + title: Role + type: string + goals: + items: + minLength: 1 + type: string + type: array + remember_me: + title: Remember me + type: boolean + get_started_completed: + title: Get started completed + type: boolean + onboarding_completed: + title: Onboarding completed + type: boolean + ws_enabled: + title: Ws enabled + type: boolean + requires_org_setup: + title: Requires org setup + type: boolean + default_workspace_id: + format: uuid + nullable: true + title: Default workspace id + type: string + default_workspace_name: + nullable: true + title: Default workspace name + type: string + default_workspace_display_name: + nullable: true + title: Default workspace display name + type: string + default_workspace_role: + nullable: true + title: Default workspace role + type: string + org_level: + nullable: true + title: Org level + type: integer + ws_level: + nullable: true + title: Ws level + type: integer + effective_level: + nullable: true + title: Effective level + type: integer + has_2fa_enabled: + title: Has 2fa enabled + type: boolean + two_factor_methods: + $ref: '#/components/schemas/UserInfoTwoFactorMethods' + org_2fa_required: + title: Org 2fa required + type: boolean + org_2fa_grace_ends_at: + format: date-time + title: Org 2fa grace ends at + type: string + required: + - created_at + - default_workspace_display_name + - default_workspace_id + - default_workspace_name + - default_workspace_role + - effective_level + - email + - get_started_completed + - id + - name + - onboarding_completed + - org_level + - organization + - organization_role + - remember_me + - role + - status + - ws_enabled + - ws_level + type: object + WorkspaceAdminSummary: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + name: + nullable: true + title: Name + type: string + id: + format: uuid + title: Id + type: string + required: + - id + - name + type: object + WorkspaceListItemResponse: + example: + start_data: start_data + admin_names: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_ws_role: user_ws_role + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + invite_link: invite_link + user_ws_level: 6 + last_update_date: last_update_date + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + display_name: + title: Display name + type: string + admin_names: + items: + $ref: '#/components/schemas/WorkspaceAdminSummary' + type: array + start_data: + title: Start data + type: string + last_update_date: + title: Last update date + type: string + invite_link: + title: Invite link + type: string + user_ws_level: + nullable: true + title: User ws level + type: integer + user_ws_role: + minLength: 1 + nullable: true + title: User ws role + type: string + required: + - display_name + - id + - name + type: object + WorkspaceListPaginatedResponse: + example: + next: next + previous: previous + count: 0 + total_pages: 1 + results: + - start_data: start_data + admin_names: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_ws_role: user_ws_role + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + invite_link: invite_link + user_ws_level: 6 + last_update_date: last_update_date + - start_data: start_data + admin_names: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_ws_role: user_ws_role + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + invite_link: invite_link + user_ws_level: 6 + last_update_date: last_update_date + current_page: 5 + properties: + count: + title: Count + type: integer + next: + minLength: 1 + nullable: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + title: Previous + type: string + results: + items: + $ref: '#/components/schemas/WorkspaceListItemResponse' + type: array + total_pages: + title: Total pages + type: integer + current_page: + title: Current page + type: integer + required: + - count + - current_page + - next + - previous + - results + - total_pages + type: object + SwitchWorkspace: + example: + new_workspace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + new_workspace_id: + format: uuid + title: New workspace id + type: string + required: + - new_workspace_id + type: object + SwitchWorkspaceResult: + example: + user_role: user_role + workspace: + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + is_default: true + access_type: access_type + organization: organization + message: message + properties: + message: + minLength: 1 + title: Message + type: string + workspace: + $ref: '#/components/schemas/WorkspaceSummary' + user_role: + minLength: 1 + title: User role + type: string + access_type: + minLength: 1 + title: Access type + type: string + organization: + minLength: 1 + title: Organization + type: string + required: + - access_type + - message + - organization + - user_role + - workspace + type: object + SwitchWorkspaceResponse: + example: + result: + user_role: user_role + workspace: + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + is_default: true + access_type: access_type + organization: organization + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SwitchWorkspaceResult' + required: + - result + - status + type: object + WorkspaceMemberRemove: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + user_id: + format: uuid + title: User id + type: string + required: + - user_id + type: object + WorkspaceMemberRoleUpdate: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 0 + properties: + user_id: + format: uuid + title: User id + type: string + ws_level: + enum: + - 8 + - 3 + - 1 + title: Ws level + type: integer + required: + - user_id + - ws_level + type: object + WorkspaceMemberRoleUpdateResult: + example: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 0 + ws_role: ws_role + message: message + properties: + message: + minLength: 1 + title: Message + type: string + user_id: + format: uuid + title: User id + type: string + ws_level: + title: Ws level + type: integer + ws_role: + minLength: 1 + title: Ws role + type: string + required: + - message + - user_id + - ws_level + - ws_role + type: object + WorkspaceMemberRoleUpdateResponse: + example: + result: + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + ws_level: 0 + ws_role: ws_role + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/WorkspaceMemberRoleUpdateResult' + required: + - result + - status + type: object + ApiTextErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ModelHubErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: true + properties: + status: + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + QueueLabelNested: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + label_id: + format: uuid + title: Label id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + type: + minLength: 1 + readOnly: true + title: Type + type: string + required: + title: Required + type: boolean + order: + maximum: 2147483647 + minimum: -2147483648 + title: Order + type: integer + required: + - label_id + type: object + QueueAnnotatorNested: + example: + role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + user_id: + format: uuid + title: User id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + email: + format: email + minLength: 1 + readOnly: true + title: Email + type: string + role: + default: annotator + minLength: 1 + title: Role + type: string + roles: + readOnly: true + title: Roles + type: string + required: + - user_id + type: object + AnnotationQueue: + example: + viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + instructions: + nullable: true + title: Instructions + type: string + status: + enum: + - draft + - active + - paused + - completed + readOnly: true + title: Status + type: string + assignment_strategy: + enum: + - manual + - round_robin + - load_balanced + title: Assignment strategy + type: string + annotations_required: + maximum: 2147483647 + minimum: -2147483648 + title: Annotations required + type: integer + reservation_timeout_minutes: + maximum: 2147483647 + minimum: -2147483648 + title: Reservation timeout minutes + type: integer + requires_review: + title: Requires review + type: boolean + auto_assign: + description: "When enabled, all queue members can annotate any item without\ + \ explicit assignment." + title: Auto assign + type: boolean + organization: + format: uuid + readOnly: true + title: Organization + type: string + project: + format: uuid + nullable: true + readOnly: true + title: Project + type: string + dataset: + format: uuid + nullable: true + readOnly: true + title: Dataset + type: string + agent_definition: + format: uuid + nullable: true + readOnly: true + title: Agent definition + type: string + is_default: + readOnly: true + title: Is default + type: boolean + labels: + items: + $ref: '#/components/schemas/QueueLabelNested' + readOnly: true + type: array + annotators: + items: + $ref: '#/components/schemas/QueueAnnotatorNested' + readOnly: true + type: array + label_ids: + items: + format: uuid + type: string + type: array + annotator_ids: + items: + format: uuid + type: string + type: array + annotator_roles: + additionalProperties: + additionalProperties: true + type: object + title: Annotator roles + type: object + label_count: + readOnly: true + title: Label count + type: integer + annotator_count: + readOnly: true + title: Annotator count + type: integer + item_count: + readOnly: true + title: Item count + type: integer + completed_count: + readOnly: true + title: Completed count + type: integer + created_by: + format: uuid + nullable: true + readOnly: true + title: Created by + type: string + created_by_name: + minLength: 1 + readOnly: true + title: Created by name + type: string + viewer_role: + readOnly: true + title: Viewer role + type: string + viewer_roles: + readOnly: true + title: Viewer roles + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - name + type: object + QueueForSourceQueue: + example: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + instructions: + title: Instructions + type: string + is_default: + title: Is default + type: boolean + required: + - id + - instructions + - is_default + - name + type: object + QueueForSourceItem: + example: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + properties: + id: + format: uuid + title: Id + type: string + status: + minLength: 1 + title: Status + type: string + source_type: + minLength: 1 + title: Source type + type: string + source_id: + minLength: 1 + nullable: true + title: Source id + type: string + required: + - id + - source_id + - source_type + - status + type: object + QueueLabelResult: + example: + settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + type: + minLength: 1 + title: Type + type: string + settings: + additionalProperties: true + title: Settings + type: object + description: + title: Description + type: string + allow_notes: + title: Allow notes + type: boolean + required: + title: Required + type: boolean + order: + title: Order + type: integer + required: + - allow_notes + - id + - name + - order + - required + - settings + - type + type: object + QueueForSourceEntry: + example: + span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + existing_notes: existing_notes + existing_label_notes: + key: existing_label_notes + existing_scores: + key: + key: "" + queue: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + queue: + $ref: '#/components/schemas/QueueForSourceQueue' + item: + $ref: '#/components/schemas/QueueForSourceItem' + labels: + items: + $ref: '#/components/schemas/QueueLabelResult' + type: array + existing_scores: + additionalProperties: + additionalProperties: true + type: object + title: Existing scores + type: object + existing_notes: + title: Existing notes + type: string + existing_label_notes: + additionalProperties: + minLength: 1 + type: string + title: Existing label notes + type: object + span_notes: + items: + additionalProperties: true + type: object + type: array + span_notes_source_id: + minLength: 1 + nullable: true + title: Span notes source id + type: string + required: + - existing_label_notes + - existing_notes + - existing_scores + - item + - labels + - queue + - span_notes + type: object + QueueForSourceResponse: + example: + result: + - span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + existing_notes: existing_notes + existing_label_notes: + key: existing_label_notes + existing_scores: + key: + key: "" + queue: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + source_type: source_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + status: status + existing_notes: existing_notes + existing_label_notes: + key: existing_label_notes + existing_scores: + key: + key: "" + queue: + instructions: instructions + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/QueueForSourceEntry' + type: array + required: + - result + type: object + QueueDefaultRequest: + example: + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + project_id: + format: uuid + title: Project id + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + type: object + QueueDefaultQueue: + example: + instructions: instructions + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + instructions: + title: Instructions + type: string + status: + minLength: 1 + title: Status + type: string + is_default: + title: Is default + type: boolean + required: + - id + - is_default + - name + - status + type: object + QueueDefaultResult: + example: + created: true + action: created + queue: + instructions: instructions + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: status + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + queue: + $ref: '#/components/schemas/QueueDefaultQueue' + labels: + items: + $ref: '#/components/schemas/QueueLabelResult' + type: array + created: + title: Created + type: boolean + action: + enum: + - created + - restored + - fetched + title: Action + type: string + required: + - action + - created + - labels + - queue + type: object + QueueDefaultResponse: + example: + result: + created: true + action: created + queue: + instructions: instructions + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: status + labels: + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + - settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueDefaultResult' + required: + - result + type: object + QueueLabelRequest: + example: + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + properties: + label_id: + format: uuid + title: Label id + type: string + required: + default: true + title: Required + type: boolean + required: + - label_id + type: object + QueueAddLabelResult: + example: + queue_status: queue_status + created: true + reopened_items: 0 + label: + settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + properties: + label: + $ref: '#/components/schemas/QueueLabelResult' + created: + title: Created + type: boolean + reopened_items: + title: Reopened items + type: integer + queue_status: + minLength: 1 + title: Queue status + type: string + required: + - created + - label + - queue_status + - reopened_items + type: object + QueueAddLabelResponse: + example: + result: + queue_status: queue_status + created: true + reopened_items: 0 + label: + settings: + key: "" + allow_notes: true + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + required: true + order: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAddLabelResult' + required: + - result + type: object + QueueAgreementLabel: + example: + cohens_kappa: 1.4658129805029452 + agreement_pct: 6.027456183070403 + disagreement_items: + - disagreement_items + - disagreement_items + disagreement_count: 5 + label_type: label_type + label_name: label_name + properties: + label_name: + nullable: true + title: Label name + type: string + label_type: + nullable: true + title: Label type + type: string + agreement_pct: + nullable: true + title: Agreement pct + type: number + cohens_kappa: + nullable: true + title: Cohens kappa + type: number + disagreement_count: + title: Disagreement count + type: integer + disagreement_items: + items: + minLength: 1 + type: string + type: array + required: + - agreement_pct + - cohens_kappa + - disagreement_count + - disagreement_items + - label_name + - label_type + type: object + QueueAgreementAnnotatorPair: + example: + agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + properties: + annotator_1_id: + minLength: 1 + title: Annotator 1 id + type: string + annotator_2_id: + minLength: 1 + title: Annotator 2 id + type: string + agreement_pct: + title: Agreement pct + type: number + total_comparisons: + title: Total comparisons + type: integer + required: + - agreement_pct + - annotator_1_id + - annotator_2_id + - total_comparisons + type: object + QueueAgreementResult: + example: + annotator_pairs: + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + overall_agreement: 0.8008281904610115 + labels: + key: + cohens_kappa: 1.4658129805029452 + agreement_pct: 6.027456183070403 + disagreement_items: + - disagreement_items + - disagreement_items + disagreement_count: 5 + label_type: label_type + label_name: label_name + properties: + overall_agreement: + nullable: true + title: Overall agreement + type: number + labels: + additionalProperties: + $ref: '#/components/schemas/QueueAgreementLabel' + title: Labels + type: object + annotator_pairs: + items: + $ref: '#/components/schemas/QueueAgreementAnnotatorPair' + type: array + required: + - annotator_pairs + - labels + - overall_agreement + type: object + QueueAgreementResponse: + example: + result: + annotator_pairs: + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + - agreement_pct: 5.637376656633329 + annotator_2_id: annotator_2_id + total_comparisons: 2 + annotator_1_id: annotator_1_id + overall_agreement: 0.8008281904610115 + labels: + key: + cohens_kappa: 1.4658129805029452 + agreement_pct: 6.027456183070403 + disagreement_items: + - disagreement_items + - disagreement_items + disagreement_count: 5 + label_type: label_type + label_name: label_name + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAgreementResult' + required: + - result + type: object + QueueAnalyticsThroughputDaily: + example: + date: date + count: 0 + properties: + date: + minLength: 1 + title: Date + type: string + count: + title: Count + type: integer + required: + - count + - date + type: object + QueueAnalyticsThroughput: + example: + total_completed: 6 + daily: + - date: date + count: 0 + - date: date + count: 0 + avg_per_day: 1.4658129805029452 + properties: + daily: + items: + $ref: '#/components/schemas/QueueAnalyticsThroughputDaily' + type: array + total_completed: + title: Total completed + type: integer + avg_per_day: + title: Avg per day + type: number + required: + - avg_per_day + - daily + - total_completed + type: object + QueueAnalyticsAnnotatorPerformance: + example: + user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + properties: + user_id: + minLength: 1 + nullable: true + title: User id + type: string + name: + nullable: true + title: Name + type: string + completed: + title: Completed + type: integer + last_active: + format: date-time + nullable: true + title: Last active + type: string + required: + - completed + type: object + QueueAnalyticsResult: + example: + total: 2 + label_distribution: + key: + key: "" + throughput: + total_completed: 6 + daily: + - date: date + count: 0 + - date: date + count: 0 + avg_per_day: 1.4658129805029452 + status_breakdown: + key: 5 + annotator_performance: + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + properties: + throughput: + $ref: '#/components/schemas/QueueAnalyticsThroughput' + annotator_performance: + items: + $ref: '#/components/schemas/QueueAnalyticsAnnotatorPerformance' + type: array + label_distribution: + additionalProperties: + additionalProperties: true + type: object + title: Label distribution + type: object + status_breakdown: + additionalProperties: + type: integer + title: Status breakdown + type: object + total: + title: Total + type: integer + required: + - annotator_performance + - label_distribution + - status_breakdown + - throughput + - total + type: object + QueueAnalyticsResponse: + example: + result: + total: 2 + label_distribution: + key: + key: "" + throughput: + total_completed: 6 + daily: + - date: date + count: 0 + - date: date + count: 0 + avg_per_day: 1.4658129805029452 + status_breakdown: + key: 5 + annotator_performance: + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + - user_id: user_id + name: name + completed: 5 + last_active: 2000-01-23T04:56:07.000+00:00 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAnalyticsResult' + required: + - result + type: object + QueueExportField: + example: + kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + properties: + id: + minLength: 1 + title: Id + type: string + label: + minLength: 1 + title: Label + type: string + column: + minLength: 1 + title: Column + type: string + data_type: + minLength: 1 + title: Data type + type: string + group: + minLength: 1 + title: Group + type: string + default: + title: Default + type: boolean + path: + title: Path + type: string + source_type: + title: Source type + type: string + kind: + title: Kind + type: string + label_id: + format: uuid + title: Label id + type: string + slot: + title: Slot + type: integer + eval_key: + title: Eval key + type: string + expand_fields: + items: + minLength: 1 + type: string + type: array + required: + - column + - data_type + - default + - group + - id + - label + type: object + QueueExportDefaultMapping: + example: + field: field + column: column + enabled: true + properties: + field: + minLength: 1 + title: Field + type: string + column: + minLength: 1 + title: Column + type: string + enabled: + title: Enabled + type: boolean + required: + - column + - enabled + - field + type: object + QueueExportFieldsResult: + example: + default_mapping: + - field: field + column: column + enabled: true + - field: field + column: column + enabled: true + fields: + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + properties: + fields: + items: + $ref: '#/components/schemas/QueueExportField' + type: array + default_mapping: + items: + $ref: '#/components/schemas/QueueExportDefaultMapping' + type: array + required: + - default_mapping + - fields + type: object + QueueExportFieldsResponse: + example: + result: + default_mapping: + - field: field + column: column + enabled: true + - field: field + column: column + enabled: true + fields: + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + - kind: kind + eval_key: eval_key + column: column + source_type: source_type + label: label + slot: 0 + path: path + default: true + expand_fields: + - expand_fields + - expand_fields + data_type: data_type + id: id + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + group: group + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueExportFieldsResult' + required: + - result + type: object + QueueExportColumnMapping: + example: + field: field + column: column + id: id + enabled: true + properties: + field: + title: Field + type: string + id: + title: Id + type: string + column: + title: Column + type: string + enabled: + default: true + title: Enabled + type: boolean + type: object + QueueExportToDatasetRequest: + example: + column_mapping: + - field: field + column: column + id: id + enabled: true + - field: field + column: column + id: id + enabled: true + status_filter: completed + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + title: Dataset name + type: string + status_filter: + default: completed + title: Status filter + type: string + column_mapping: + items: + $ref: '#/components/schemas/QueueExportColumnMapping' + type: array + type: object + QueueExportToDatasetResult: + example: + rows_created: 0 + columns: + - columns + - columns + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + rows_created: + title: Rows created + type: integer + columns: + items: + minLength: 1 + type: string + type: array + required: + - columns + - dataset_id + - dataset_name + - rows_created + type: object + QueueExportToDatasetResponse: + example: + result: + rows_created: 0 + columns: + - columns + - columns + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueExportToDatasetResult' + required: + - result + type: object + QueueExportAnnotationsResponse: + example: + result: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + additionalProperties: true + type: object + type: array + required: + - result + type: object + QueueHardDeleteRequest: + example: + confirm_name: confirm_name + force: true + properties: + force: + title: Force + type: boolean + confirm_name: + minLength: 1 + title: Confirm name + type: string + required: + - confirm_name + - force + type: object + QueueHardDeleteResult: + example: + archived: true + deleted: true + hard_deleted: true + queue_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + deleted: + title: Deleted + type: boolean + hard_deleted: + title: Hard deleted + type: boolean + archived: + title: Archived + type: boolean + queue_id: + format: uuid + title: Queue id + type: string + required: + - deleted + - queue_id + type: object + QueueHardDeleteResponse: + example: + result: + archived: true + deleted: true + hard_deleted: true + queue_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueHardDeleteResult' + required: + - result + type: object + QueueProgressAnnotatorStat: + example: + in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + properties: + user_id: + format: uuid + title: User id + type: string + name: + minLength: 1 + nullable: true + title: Name + type: string + completed: + title: Completed + type: integer + pending: + title: Pending + type: integer + in_progress: + title: In progress + type: integer + in_review: + title: In review + type: integer + annotations_count: + title: Annotations count + type: integer + required: + - annotations_count + - completed + - in_progress + - in_review + - pending + - user_id + type: object + QueueProgressUserProgress: + example: + total: 1 + in_progress: 6 + in_review: 7 + progress_pct: 4.965218492984954 + pending: 1 + completed: 1 + skipped: 1 + properties: + total: + title: Total + type: integer + completed: + title: Completed + type: integer + pending: + title: Pending + type: integer + in_progress: + title: In progress + type: integer + in_review: + title: In review + type: integer + skipped: + title: Skipped + type: integer + progress_pct: + title: Progress pct + type: number + required: + - completed + - in_progress + - in_review + - pending + - progress_pct + - skipped + - total + type: object + QueueProgressResult: + example: + total: 0 + in_progress: 1 + in_review: 5 + progress_pct: 7.061401241503109 + annotator_stats: + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + pending: 6 + user_progress: + total: 1 + in_progress: 6 + in_review: 7 + progress_pct: 4.965218492984954 + pending: 1 + completed: 1 + skipped: 1 + completed: 5 + skipped: 2 + properties: + total: + title: Total + type: integer + pending: + title: Pending + type: integer + in_progress: + title: In progress + type: integer + in_review: + title: In review + type: integer + completed: + title: Completed + type: integer + skipped: + title: Skipped + type: integer + progress_pct: + title: Progress pct + type: number + annotator_stats: + items: + $ref: '#/components/schemas/QueueProgressAnnotatorStat' + type: array + user_progress: + $ref: '#/components/schemas/QueueProgressUserProgress' + required: + - annotator_stats + - completed + - in_progress + - in_review + - pending + - progress_pct + - skipped + - total + - user_progress + type: object + QueueProgressResponse: + example: + result: + total: 0 + in_progress: 1 + in_review: 5 + progress_pct: 7.061401241503109 + annotator_stats: + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + - in_progress: 2 + in_review: 4 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + pending: 3 + name: name + completed: 9 + annotations_count: 7 + pending: 6 + user_progress: + total: 1 + in_progress: 6 + in_review: 7 + progress_pct: 4.965218492984954 + pending: 1 + completed: 1 + skipped: 1 + completed: 5 + skipped: 2 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueProgressResult' + required: + - result + type: object + QueueRemoveLabelResult: + example: + removed: true + properties: + removed: + title: Removed + type: boolean + required: + - removed + type: object + QueueRemoveLabelResponse: + example: + result: + removed: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueRemoveLabelResult' + required: + - result + type: object + EmptyRequest: + additionalProperties: false + properties: {} + type: object + QueueStatusResponse: + example: + result: + viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AnnotationQueue' + required: + - result + type: object + QueueStatusRequest: + example: + status: draft + properties: + status: + enum: + - draft + - active + - paused + - completed + title: Status + type: string + required: + - status + type: object + AutomationRuleScope: + example: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + project_id: + format: uuid + title: Project id + type: string + is_voice_call: + title: Is voice call + type: boolean + remove_simulation_calls: + title: Remove simulation calls + type: boolean + type: object + AutomationRuleConditions: + example: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + properties: + operator: + default: and + enum: + - and + title: Operator + type: string + filter: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + scope: + $ref: '#/components/schemas/AutomationRuleScope' + rules: + items: + $ref: '#/components/schemas/Rules_inner' + title: Rules + type: array + type: object + AutomationRule: + example: + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + created_by_name: created_by_name + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enabled: true + last_triggered_at: 2000-01-23T04:56:07.000+00:00 + trigger_count: 6 + trigger_frequency: manual + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + conditions: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + queue: + format: uuid + readOnly: true + title: Queue + type: string + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + conditions: + $ref: '#/components/schemas/AutomationRuleConditions' + enabled: + title: Enabled + type: boolean + trigger_frequency: + enum: + - manual + - hourly + - daily + - weekly + - monthly + title: Trigger frequency + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + created_by: + format: uuid + nullable: true + readOnly: true + title: Created by + type: string + created_by_name: + minLength: 1 + readOnly: true + title: Created by name + type: string + last_triggered_at: + format: date-time + nullable: true + readOnly: true + title: Last triggered at + type: string + trigger_count: + readOnly: true + title: Trigger count + type: integer + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - name + - source_type + type: object + AutomationRuleEvaluateResult: + example: + duplicates: 1 + added: 6 + truncated: true + matched: 0 + error: error + properties: + matched: + title: Matched + type: integer + added: + title: Added + type: integer + duplicates: + title: Duplicates + type: integer + truncated: + title: Truncated + type: boolean + error: + title: Error + type: string + required: + - added + - duplicates + - matched + type: object + AutomationRuleEvaluateResponse: + example: + result: + duplicates: 1 + added: 6 + truncated: true + matched: 0 + error: error + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AutomationRuleEvaluateResult' + required: + - result + type: object + AutomationRuleEvaluateAcceptedResponse: + example: + workflow_id: workflow_id + message: message + status: status + properties: + status: + minLength: 1 + title: Status + type: string + workflow_id: + minLength: 1 + title: Workflow id + type: string + message: + minLength: 1 + title: Message + type: string + required: + - message + - status + - workflow_id + type: object + QueueItem: + example: + workflow_status: workflow_status + metadata: + key: "" + reviewed_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + review_notes: review_notes + reviewed_at: 2000-01-23T04:56:07.000+00:00 + reserved_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + assigned_users: assigned_users + priority: 441289069 + workflow_status_label: workflow_status_label + reserved_by_name: reserved_by_name + reviewed_by_name: reviewed_by_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + review_status: review_status + source_preview: source_preview + assigned_to_name: assigned_to_name + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: pending + order: -1517921766 + assigned_to: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + reservation_expires_at: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + queue: + format: uuid + readOnly: true + title: Queue + type: string + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + status: + enum: + - pending + - in_progress + - completed + - skipped + title: Status + type: string + workflow_status: + readOnly: true + title: Workflow status + type: string + workflow_status_label: + readOnly: true + title: Workflow status label + type: string + priority: + maximum: 2147483647 + minimum: -2147483648 + title: Priority + type: integer + order: + maximum: 2147483647 + minimum: -2147483648 + title: Order + type: integer + metadata: + additionalProperties: true + title: Metadata + type: object + assigned_to: + format: uuid + nullable: true + title: Assigned to + type: string + assigned_to_name: + minLength: 1 + readOnly: true + title: Assigned to name + type: string + assigned_users: + readOnly: true + title: Assigned users + type: string + reserved_by: + format: uuid + nullable: true + title: Reserved by + type: string + reserved_by_name: + minLength: 1 + readOnly: true + title: Reserved by name + type: string + reservation_expires_at: + format: date-time + nullable: true + title: Reservation expires at + type: string + review_status: + maxLength: 20 + nullable: true + title: Review status + type: string + reviewed_by: + format: uuid + nullable: true + title: Reviewed by + type: string + reviewed_by_name: + minLength: 1 + readOnly: true + title: Reviewed by name + type: string + reviewed_at: + format: date-time + nullable: true + title: Reviewed at + type: string + review_notes: + nullable: true + title: Review notes + type: string + source_preview: + readOnly: true + title: Source preview + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - source_type + type: object + AddQueueItem: + example: + source_type: call_execution + source_id: source_id + properties: + source_type: + enum: + - call_execution + - dataset_row + - observation_span + - prototype_run + - trace + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + required: + - source_id + - source_type + type: object + Selection: + example: + mode: filter + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + remove_simulation_calls: false + exclude_ids: + - exclude_ids + - exclude_ids + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: false + source_type: call_execution + properties: + mode: + enum: + - filter + title: Mode + type: string + source_type: + enum: + - call_execution + - observation_span + - trace + - trace_session + title: Source type + type: string + project_id: + format: uuid + title: Project id + type: string + filter: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + exclude_ids: + items: + minLength: 1 + type: string + type: array + remove_simulation_calls: + default: false + title: Remove simulation calls + type: boolean + is_voice_call: + default: false + title: Is voice call + type: boolean + required: + - mode + - project_id + - source_type + type: object + AddItems: + example: + selection: + mode: filter + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + remove_simulation_calls: false + exclude_ids: + - exclude_ids + - exclude_ids + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: false + source_type: call_execution + items: + - source_type: call_execution + source_id: source_id + - source_type: call_execution + source_id: source_id + properties: + items: + items: + $ref: '#/components/schemas/AddQueueItem' + type: array + selection: + $ref: '#/components/schemas/Selection' + type: object + QueueAddItemsResult: + example: + duplicates: 6 + total_matching: 1 + queue_status: queue_status + added: 0 + errors: + - errors + - errors + properties: + added: + title: Added + type: integer + duplicates: + title: Duplicates + type: integer + errors: + items: + minLength: 1 + type: string + type: array + queue_status: + minLength: 1 + title: Queue status + type: string + total_matching: + title: Total matching + type: integer + required: + - added + - duplicates + - errors + - queue_status + type: object + QueueAddItemsResponse: + example: + result: + duplicates: 6 + total_matching: 1 + queue_status: queue_status + added: 0 + errors: + - errors + - errors + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAddItemsResult' + required: + - result + type: object + ApiSelectionTooLargeDetail: + example: + total_matching: 5 + cap: 5 + type: selection_too_large + message: message + properties: + type: + enum: + - selection_too_large + title: Type + type: string + message: + minLength: 1 + title: Message + type: string + total_matching: + title: Total matching + type: integer + cap: + title: Cap + type: integer + required: + - cap + - message + - total_matching + - type + type: object + ApiSelectionTooLargeError: + example: + result: result + code: selection_too_large + detail: detail + type: selection_too_large + message: message + error: + total_matching: 5 + cap: 5 + type: selection_too_large + message: message + status: false + properties: + status: + default: false + title: Status + type: boolean + result: + minLength: 1 + nullable: true + title: Result + type: string + type: + enum: + - selection_too_large + title: Type + type: string + code: + default: selection_too_large + minLength: 1 + title: Code + type: string + detail: + minLength: 1 + title: Detail + type: string + message: + minLength: 1 + title: Message + type: string + error: + $ref: '#/components/schemas/ApiSelectionTooLargeDetail' + required: + - error + - message + type: object + AssignItems: + example: + user_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + item_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action: add + properties: + item_ids: + items: + format: uuid + type: string + minItems: 1 + type: array + user_ids: + items: + format: uuid + type: string + type: array + action: + default: add + enum: + - add + - set + - remove + title: Action + type: string + required: + - item_ids + type: object + QueueAssignItemsResult: + example: + assigned: 0 + properties: + assigned: + title: Assigned + type: integer + required: + - assigned + type: object + QueueAssignItemsResponse: + example: + result: + assigned: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAssignItemsResult' + required: + - result + type: object + BulkRemoveItems: + example: + item_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + item_ids: + items: + format: uuid + type: string + minItems: 1 + type: array + required: + - item_ids + type: object + QueueBulkRemoveItemsResult: + example: + removed: 0 + properties: + removed: + title: Removed + type: integer + required: + - removed + type: object + QueueBulkRemoveItemsResponse: + example: + result: + removed: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueBulkRemoveItemsResult' + required: + - result + type: object + QueueNextItemResult: + example: + item: + key: "" + properties: + item: + additionalProperties: true + title: Item + type: object + required: + - item + type: object + QueueNextItemResponse: + example: + result: + item: + key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueNextItemResult' + required: + - result + type: object + QueueAnnotateDetailResult: + example: + span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + key: "" + existing_notes: existing_notes + annotations: + - key: "" + - key: "" + review_comments: + - key: "" + - key: "" + progress: + key: "" + next_item_id: next_item_id + review_threads: + - key: "" + - key: "" + prev_item_id: prev_item_id + queue: + key: "" + labels: + - key: "" + - key: "" + properties: + item: + additionalProperties: true + title: Item + type: object + queue: + additionalProperties: true + title: Queue + type: object + labels: + items: + additionalProperties: true + type: object + type: array + annotations: + items: + additionalProperties: true + type: object + type: array + review_comments: + items: + additionalProperties: true + type: object + type: array + review_threads: + items: + additionalProperties: true + type: object + type: array + existing_notes: + title: Existing notes + type: string + span_notes: + items: + additionalProperties: true + type: object + type: array + span_notes_source_id: + minLength: 1 + nullable: true + title: Span notes source id + type: string + progress: + additionalProperties: true + title: Progress + type: object + next_item_id: + minLength: 1 + nullable: true + title: Next item id + type: string + prev_item_id: + minLength: 1 + nullable: true + title: Prev item id + type: string + required: + - annotations + - existing_notes + - item + - labels + - progress + - queue + - review_comments + - review_threads + - span_notes + type: object + QueueAnnotateDetailResponse: + example: + result: + span_notes: + - key: "" + - key: "" + span_notes_source_id: span_notes_source_id + item: + key: "" + existing_notes: existing_notes + annotations: + - key: "" + - key: "" + review_comments: + - key: "" + - key: "" + progress: + key: "" + next_item_id: next_item_id + review_threads: + - key: "" + - key: "" + prev_item_id: prev_item_id + queue: + key: "" + labels: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueAnnotateDetailResult' + required: + - result + type: object + Score: + example: + notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + readOnly: true + title: Source id + type: string + label_id: + format: uuid + readOnly: true + title: Label id + type: string + label_name: + minLength: 1 + readOnly: true + title: Label name + type: string + label_type: + minLength: 1 + readOnly: true + title: Label type + type: string + label_settings: + additionalProperties: true + readOnly: true + title: Label settings + type: object + label_allow_notes: + readOnly: true + title: Label allow notes + type: boolean + value: + additionalProperties: true + title: Value + type: object + score_source: + enum: + - human + - api + - auto + - imported + title: Score source + type: string + notes: + nullable: true + title: Notes + type: string + annotator: + format: uuid + nullable: true + readOnly: true + title: Annotator + type: string + annotator_name: + minLength: 1 + readOnly: true + title: Annotator name + type: string + annotator_email: + minLength: 1 + readOnly: true + title: Annotator email + type: string + queue_item: + format: uuid + nullable: true + readOnly: true + title: Queue item + type: string + queue_id: + readOnly: true + title: Queue id + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + required: + - source_type + - value + type: object + QueueItemAnnotationsResponse: + example: + result: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/Score' + type: array + required: + - result + type: object + ImportAnnotationEntry: + example: + notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: score_source + properties: + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + title: Notes + type: string + score_source: + title: Score source + type: string + required: + - label_id + - value + type: object + ImportAnnotations: + example: + annotations: + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: score_source + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: score_source + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + annotations: + items: + $ref: '#/components/schemas/ImportAnnotationEntry' + type: array + annotator_id: + format: uuid + title: Annotator id + type: string + required: + - annotations + type: object + QueueImportAnnotationsResult: + example: + imported: 0 + properties: + imported: + title: Imported + type: integer + required: + - imported + type: object + QueueImportAnnotationsResponse: + example: + result: + imported: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueImportAnnotationsResult' + required: + - result + type: object + SubmitAnnotationEntry: + example: + notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + title: Notes + type: string + required: + - label_id + - value + type: object + SubmitAnnotations: + example: + notes: "" + annotations: + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - notes: notes + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + item_notes: item_notes + properties: + annotations: + items: + $ref: '#/components/schemas/SubmitAnnotationEntry' + type: array + notes: + default: "" + title: Notes + type: string + item_notes: + nullable: true + title: Item notes + type: string + required: + - annotations + type: object + QueueSubmitAnnotationsResult: + example: + submitted: 0 + properties: + submitted: + title: Submitted + type: integer + required: + - submitted + type: object + QueueSubmitAnnotationsResponse: + example: + result: + submitted: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueSubmitAnnotationsResult' + required: + - result + type: object + QueueItemNavigationRequest: + example: + include_completed: false + exclude_review_status: exclude_review_status + exclude: + - exclude + - exclude + properties: + exclude: + items: + type: string + type: array + exclude_review_status: + title: Exclude review status + type: string + include_completed: + default: false + title: Include completed + type: boolean + type: object + QueueNavigationResult: + example: + skipped_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + completed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + completed_item_id: + format: uuid + title: Completed item id + type: string + skipped_item_id: + format: uuid + title: Skipped item id + type: string + next_item: + additionalProperties: true + title: Next item + type: object + required: + - next_item + type: object + QueueNavigationResponse: + example: + result: + skipped_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + completed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueNavigationResult' + required: + - result + type: object + QueueDiscussionResult: + example: + review_comments: + - key: "" + - key: "" + comment: + key: "" + thread: + key: "" + review_threads: + - key: "" + - key: "" + properties: + review_comments: + items: + additionalProperties: true + type: object + type: array + review_threads: + items: + additionalProperties: true + type: object + type: array + comment: + additionalProperties: true + title: Comment + type: object + thread: + additionalProperties: true + title: Thread + type: object + required: + - review_comments + - review_threads + type: object + QueueDiscussionResponse: + example: + result: + review_comments: + - key: "" + - key: "" + comment: + key: "" + thread: + key: "" + review_threads: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueDiscussionResult' + required: + - result + type: object + DiscussionCommentRequest: + example: + mentioned_user_ids: + - mentioned_user_ids + - mentioned_user_ids + thread_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + comment: + title: Comment + type: string + label_id: + format: uuid + title: Label id + type: string + target_annotator_id: + format: uuid + title: Target annotator id + type: string + thread_id: + format: uuid + title: Thread id + type: string + mentioned_user_ids: + items: + minLength: 1 + type: string + type: array + type: object + DiscussionReactionRequest: + example: + emoji: emoji + properties: + emoji: + maxLength: 16 + title: Emoji + type: string + type: object + DiscussionThreadStatusRequest: + example: + comment: comment + properties: + comment: + title: Comment + type: string + type: object + QueueReleaseReservationResult: + example: + released: true + properties: + released: + title: Released + type: boolean + required: + - released + type: object + QueueReleaseReservationResponse: + example: + result: + released: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueReleaseReservationResult' + required: + - result + type: object + ReviewLabelCommentRequest: + example: + comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + label_id: + format: uuid + title: Label id + type: string + target_annotator_id: + format: uuid + title: Target annotator id + type: string + comment: + title: Comment + type: string + type: object + ReviewItemRequest: + example: + notes: notes + label_comments: + - comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - comment: comment + target_annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action: approve + properties: + action: + enum: + - approve + - request_changes + - reject + - comment + title: Action + type: string + notes: + title: Notes + type: string + label_comments: + items: + $ref: '#/components/schemas/ReviewLabelCommentRequest' + type: array + required: + - action + type: object + QueueReviewItemResult: + example: + reviewed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + action: action + review_comments: + - key: "" + - key: "" + review_threads: + - key: "" + - key: "" + properties: + reviewed_item_id: + format: uuid + title: Reviewed item id + type: string + action: + minLength: 1 + title: Action + type: string + next_item: + additionalProperties: true + title: Next item + type: object + review_comments: + items: + additionalProperties: true + type: object + type: array + review_threads: + items: + additionalProperties: true + type: object + type: array + required: + - action + - next_item + - review_comments + - review_threads + - reviewed_item_id + type: object + QueueReviewItemResponse: + example: + result: + reviewed_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_item: + key: "" + action: action + review_comments: + - key: "" + - key: "" + review_threads: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/QueueReviewItemResult' + required: + - result + type: object + Organization: + example: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + display_name: + maxLength: 255 + title: Display name + type: string + is_new: + title: Is new + type: boolean + ws_enabled: + title: Ws enabled + type: boolean + region: + maxLength: 16 + minLength: 1 + title: Region + type: string + require_2fa: + title: Require 2fa + type: boolean + require_2fa_grace_period_days: + maximum: 32767 + minimum: 0 + title: Require 2fa grace period days + type: integer + require_2fa_enforced_at: + format: date-time + nullable: true + title: Require 2fa enforced at + type: string + required: + - name + type: object + User: + example: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + email: + format: email + maxLength: 254 + minLength: 1 + title: Email + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + organization_role: + enum: + - Owner + - Admin + - Member + - Viewer + - workspace_admin + - workspace_member + - workspace_viewer + nullable: true + title: Organization role + type: string + organization: + $ref: '#/components/schemas/Organization' + created_at: + format: date-time + readOnly: true + title: Created at + type: string + status: + readOnly: true + title: Status + type: string + role: + description: "User's job role (e.g., Data Scientist, ML Engineer, or custom\ + \ role)" + maxLength: 255 + nullable: true + title: Role + type: string + goals: + additionalProperties: true + description: List of user's goals for using the platform + title: Goals + type: object + required: + - email + - name + type: object + AnnotationsLabels: + example: + settings: + key: "" + allow_notes: true + annotation_count: 6 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: text + trace_annotations_count: 0 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + type: + enum: + - text + - numeric + - categorical + - star + - thumbs_up_down + title: Type + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + settings: + additionalProperties: true + title: Settings + type: object + project: + format: uuid + title: Project + type: string + description: + nullable: true + title: Description + type: string + allow_notes: + title: Allow notes + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + trace_annotations_count: + readOnly: true + title: Trace annotations count + type: integer + annotation_count: + readOnly: true + title: Annotation count + type: integer + required: + - name + - type + type: object + AnnotationLabelRestoreResponse: + example: + result: + settings: + key: "" + allow_notes: true + annotation_count: 6 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: text + trace_annotations_count: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AnnotationsLabels' + required: + - result + type: object + ApiKey: + example: + masked_actual_key: masked_actual_key + config_json: + key: "" + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + key: key + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + provider: + maxLength: 50 + minLength: 1 + title: Provider + type: string + key: + maxLength: 2500 + nullable: true + title: Key + type: string + organization: + format: uuid + nullable: true + readOnly: true + title: Organization + type: string + masked_actual_key: + readOnly: true + title: Masked actual key + type: string + config_json: + additionalProperties: true + title: Config json + type: object + required: + - provider + type: object + ModelHubPaginatedResponse: + example: + next: next + previous: previous + count: 0 + results: + - key: "" + - key: "" + properties: + count: + title: Count + type: integer + next: + nullable: true + title: Next + type: string + previous: + nullable: true + title: Previous + type: string + results: + items: + additionalProperties: true + type: object + type: array + required: + - count + - results + type: object + ModelHubEmptyRequest: + properties: {} + type: object + ModelHubStringResultResponse: + example: + result: result + status: true + properties: + status: + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + - status + type: object + DatasetColumnDetailItem: + example: + name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + data_type: + nullable: true + title: Data type + type: string + required: + - id + - name + type: object + DatasetColumnDetailResult: + example: + columns: + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + columns: + items: + $ref: '#/components/schemas/DatasetColumnDetailItem' + type: array + required: + - columns + type: object + DatasetColumnDetailResponse: + example: + result: + columns: + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: data_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetColumnDetailResult' + required: + - result + - status + type: object + AnnotationSummaryHeader: + example: + dataset_coverage: 0.8008281904610115 + completion_eta: 6.027456183070403 + overall_agreement: 1.4658129805029452 + properties: + dataset_coverage: + nullable: true + title: Dataset coverage + type: number + completion_eta: + nullable: true + title: Completion eta + type: number + overall_agreement: + nullable: true + title: Overall agreement + type: number + type: object + AnnotationSummaryResult: + example: + annotators: + - key: "" + - key: "" + header: + dataset_coverage: 0.8008281904610115 + completion_eta: 6.027456183070403 + overall_agreement: 1.4658129805029452 + labels: + - key: "" + - key: "" + properties: + labels: + items: + additionalProperties: true + type: object + type: array + annotators: + items: + additionalProperties: true + type: object + type: array + header: + $ref: '#/components/schemas/AnnotationSummaryHeader' + type: object + AnnotationSummaryResponse: + example: + result: + annotators: + - key: "" + - key: "" + header: + dataset_coverage: 0.8008281904610115 + completion_eta: 6.027456183070403 + overall_agreement: 1.4658129805029452 + labels: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/AnnotationSummaryResult' + required: + - result + type: object + DatasetEvalStatsMetric: + example: + output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + total_cells: + nullable: true + title: Total cells + type: integer + output: + additionalProperties: true + title: Output + type: object + required: + - name + - output + type: object + DatasetEvalStatsItem: + example: + result: + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + output_type: output_type + name: name + total_choices_avg: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_avg: + key: "" + total_pass_rate: 6.027456183070403 + is_numeric_eval: true + is_numeric_eval_percentage: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + output_type: + minLength: 1 + title: Output type + type: string + result: + items: + $ref: '#/components/schemas/DatasetEvalStatsMetric' + type: array + total_pass_rate: + nullable: true + title: Total pass rate + type: number + total_avg: + additionalProperties: true + title: Total avg + type: object + total_choices_avg: + additionalProperties: true + title: Total choices avg + type: object + is_numeric_eval: + title: Is numeric eval + type: boolean + is_numeric_eval_percentage: + title: Is numeric eval percentage + type: boolean + required: + - id + - name + - output_type + - result + type: object + DatasetEvalStatsResponse: + example: + result: + - result: + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + output_type: output_type + name: name + total_choices_avg: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_avg: + key: "" + total_pass_rate: 6.027456183070403 + is_numeric_eval: true + is_numeric_eval_percentage: true + - result: + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + - output: + key: "" + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_cells: 0 + output_type: output_type + name: name + total_choices_avg: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_avg: + key: "" + total_pass_rate: 6.027456183070403 + is_numeric_eval: true + is_numeric_eval_percentage: true + status: true + properties: + status: + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/DatasetEvalStatsItem' + type: array + required: + - result + - status + type: object + JsonColumnSchemaEntry: + example: + max_array_count: 0 + keys: + - keys + - keys + max_images_count: 6 + name: name + sample: + key: "" + properties: + name: + minLength: 1 + title: Name + type: string + keys: + items: + minLength: 1 + type: string + type: array + sample: + additionalProperties: true + title: Sample + type: object + max_array_count: + title: Max array count + type: integer + max_images_count: + title: Max images count + type: integer + required: + - name + type: object + DatasetJsonSchemaResponse: + example: + result: + key: + max_array_count: 0 + keys: + - keys + - keys + max_images_count: 6 + name: name + sample: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + $ref: '#/components/schemas/JsonColumnSchemaEntry' + title: Result + type: object + required: + - result + - status + type: object + DatasetRunPromptStatsPrompt: + example: + name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + input_token: + title: Input token + type: number + output_token: + title: Output token + type: number + total_token: + title: Total token + type: number + required: + - id + - input_token + - name + - output_token + - total_token + type: object + DatasetRunPromptStatsResult: + example: + avg_cost: 6.027456183070403 + prompts: + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + avg_tokens: 0.8008281904610115 + avg_time: 1.4658129805029452 + properties: + avg_tokens: + title: Avg tokens + type: number + avg_cost: + title: Avg cost + type: number + avg_time: + title: Avg time + type: number + prompts: + items: + $ref: '#/components/schemas/DatasetRunPromptStatsPrompt' + type: array + required: + - avg_cost + - avg_time + - avg_tokens + - prompts + type: object + DatasetRunPromptStatsResponse: + example: + result: + avg_cost: 6.027456183070403 + prompts: + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + - name: name + output_token: 5.637376656633329 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + input_token: 5.962133916683182 + total_token: 2.3021358869347655 + avg_tokens: 0.8008281904610115 + avg_time: 1.4658129805029452 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRunPromptStatsResult' + required: + - result + - status + type: object + CompareEvalsListRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_type: user + search_text: "" + properties: + search_text: + default: "" + title: Search text + type: string + eval_type: + enum: + - user + title: Eval type + type: string + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - dataset_ids + - eval_type + type: object + CompareEvalListResult: + example: + evals: + - key: "" + - key: "" + properties: + evals: + items: + additionalProperties: true + type: object + type: array + required: + - evals + type: object + CompareEvalListResponse: + example: + result: + evals: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareEvalListResult' + required: + - result + - status + type: object + ComparePreviewRunEvalRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_info: + key: "" + model: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: dataset_evaluation + config: + key: "" + properties: + config: + additionalProperties: true + title: Config + type: object + model: + default: "" + title: Model + type: string + template_id: + format: uuid + title: Template id + type: string + dataset_ids: + items: + format: uuid + type: string + type: array + dataset_info: + additionalProperties: true + title: Dataset info + type: object + source: + default: dataset_evaluation + title: Source + type: string + required: + - config + - dataset_ids + - template_id + type: object + EvalPreviewResult: + example: + responses: + - key: "" + - key: "" + properties: + responses: + items: + additionalProperties: true + description: Response + type: object + type: array + required: + - responses + type: object + EvalPreviewResponse: + example: + result: + responses: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalPreviewResult' + required: + - result + - status + type: object + CompareDatasetRowResult: + example: + prev_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + table: + - key: "" + - key: "" + properties: + prev_row_id: + format: uuid + nullable: true + title: Prev row id + type: string + next_row_id: + format: uuid + nullable: true + title: Next row id + type: string + table: + items: + additionalProperties: true + type: object + type: array + required: + - table + type: object + CompareDatasetRowResponse: + example: + result: + prev_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + next_row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + table: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareDatasetRowResult' + required: + - result + - status + type: object + CompareDatasetDeleteResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + CompareDatasetDeleteResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareDatasetDeleteResult' + required: + - result + - status + type: object + DatasetExplanationSummaryResponseResult: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: "" + min_rows_required: 6 + status: status + row_count: 0 + properties: + response: + additionalProperties: true + title: Response + type: object + last_updated: + format: date-time + nullable: true + title: Last updated + type: string + status: + minLength: 1 + title: Status + type: string + row_count: + title: Row count + type: integer + min_rows_required: + title: Min rows required + type: integer + required: + - last_updated + - min_rows_required + - response + - row_count + - status + type: object + DatasetExplanationSummaryResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: "" + min_rows_required: 6 + status: status + row_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetExplanationSummaryResponseResult' + required: + - result + - status + type: object + BaseColumnsResponseResult: + example: + base_columns: + - base_columns + - base_columns + properties: + base_columns: + items: + minLength: 1 + type: string + type: array + required: + - base_columns + type: object + BaseColumnsResponse: + example: + result: + base_columns: + - base_columns + - base_columns + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/BaseColumnsResponseResult' + required: + - result + - status + type: object + HuggingFaceDatasetDetailRequest: + example: + dataset_id: dataset_id + properties: + dataset_id: + minLength: 1 + title: Dataset id + type: string + required: + - dataset_id + type: object + HuggingFaceDatasetDetail: + example: + downloads: 0 + author: author + name: name + description: description + id: id + likes: 6 + tags: + - tags + - tags + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + downloads: + title: Downloads + type: integer + likes: + title: Likes + type: integer + tags: + items: + minLength: 1 + type: string + type: array + author: + minLength: 1 + nullable: true + title: Author + type: string + required: + - description + - downloads + - id + - likes + - name + - tags + type: object + HuggingFaceDatasetDetailResponseResult: + example: + message: message + dataset: + downloads: 0 + author: author + name: name + description: description + id: id + likes: 6 + tags: + - tags + - tags + properties: + message: + minLength: 1 + title: Message + type: string + dataset: + $ref: '#/components/schemas/HuggingFaceDatasetDetail' + required: + - dataset + - message + type: object + HuggingFaceDatasetDetailResponse: + example: + result: + message: message + dataset: + downloads: 0 + author: author + name: name + description: description + id: id + likes: 6 + tags: + - tags + - tags + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/HuggingFaceDatasetDetailResponseResult' + required: + - result + - status + type: object + HuggingFaceDatasetListRequest: + example: + filter_params: + key: "" + search_query: "" + properties: + search_query: + default: "" + title: Search query + type: string + filter_params: + additionalProperties: true + title: Filter params + type: object + type: object + HuggingFaceDatasetListItem: + example: + downloads: 6 + author: author + name: name + id: id + likes: 1 + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + downloads: + title: Downloads + type: integer + likes: + title: Likes + type: integer + author: + minLength: 1 + nullable: true + title: Author + type: string + required: + - downloads + - id + - likes + - name + type: object + HuggingFaceDatasetListResponseResult: + example: + total_datasets: 0 + datasets: + - downloads: 6 + author: author + name: name + id: id + likes: 1 + - downloads: 6 + author: author + name: name + id: id + likes: 1 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + total_datasets: + title: Total datasets + type: integer + datasets: + items: + $ref: '#/components/schemas/HuggingFaceDatasetListItem' + type: array + required: + - datasets + - message + - total_datasets + type: object + HuggingFaceDatasetListResponse: + example: + result: + total_datasets: 0 + datasets: + - downloads: 6 + author: author + name: name + id: id + likes: 1 + - downloads: 6 + author: author + name: name + id: id + likes: 1 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/HuggingFaceDatasetListResponseResult' + required: + - result + - status + type: object + AddApiColumnRequest: + example: + column_name: column_name + config: + key: "" + concurrency: 0 + properties: + column_name: + minLength: 1 + title: Column name + type: string + config: + additionalProperties: true + title: Config + type: object + concurrency: + default: 5 + title: Concurrency + type: integer + required: + - column_name + - config + type: object + DynamicColumnCreateResult: + example: + new_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + new_column_name: new_column_name + properties: + message: + minLength: 1 + title: Message + type: string + new_column_id: + format: uuid + title: New column id + type: string + new_column_name: + minLength: 1 + title: New column name + type: string + required: + - message + - new_column_id + - new_column_name + type: object + DynamicColumnCreateResponse: + example: + result: + new_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + new_column_name: new_column_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DynamicColumnCreateResult' + required: + - result + - status + type: object + VectorDBColumnRequest: + example: + vector_length: 5 + new_column_name: new_column_name + search_type: search_type + url: url + concurrency: 1 + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + embedding_config: + key: "" + sub_type: sub_type + api_key: api_key + top_k: 6 + limit: 0 + namespace: namespace + query_key: query_key + index_name: index_name + collection_name: collection_name + key: key + properties: + column_id: + format: uuid + title: Column id + type: string + new_column_name: + title: New column name + type: string + sub_type: + minLength: 1 + title: Sub type + type: string + api_key: + minLength: 1 + title: Api key + type: string + collection_name: + title: Collection name + type: string + url: + title: Url + type: string + search_type: + title: Search type + type: string + key: + title: Key + type: string + limit: + title: Limit + type: integer + index_name: + title: Index name + type: string + top_k: + title: Top k + type: integer + namespace: + title: Namespace + type: string + embedding_config: + additionalProperties: true + title: Embedding config + type: object + concurrency: + default: 5 + title: Concurrency + type: integer + query_key: + title: Query key + type: string + vector_length: + title: Vector length + type: integer + required: + - api_key + - column_id + - sub_type + type: object + ClassifyColumnRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + language_model_id: gpt-4o + new_column_name: new_column_name + labels: + - labels + - labels + concurrency: 0 + properties: + column_id: + format: uuid + title: Column id + type: string + labels: + items: + minLength: 1 + type: string + type: array + language_model_id: + default: gpt-4o + minLength: 1 + title: Language model id + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + new_column_name: + title: New column name + type: string + required: + - column_id + - labels + type: object + CompareDataset: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + base_column_name: base_column_name + common_column_names: + - common_column_names + - common_column_names + dataset_info: + key: "" + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + page_size: 0 + current_page_index: 6 + properties: + compare_id: + format: uuid + nullable: true + title: Compare id + type: string + page_size: + default: 10 + title: Page size + type: integer + current_page_index: + default: 0 + title: Current page index + type: integer + base_column_name: + minLength: 1 + title: Base column name + type: string + dataset_info: + additionalProperties: true + title: Dataset info + type: object + common_column_names: + items: + minLength: 1 + type: string + type: array + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - base_column_name + - dataset_ids + type: object + CompareDatasetMetadata: + example: + total_rows: 0 + total_pages: 6 + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + compare_id: + format: uuid + title: Compare id + type: string + total_rows: + title: Total rows + type: integer + total_pages: + title: Total pages + type: integer + required: + - compare_id + - total_pages + - total_rows + type: object + CompareDatasetResult: + example: + metadata: + total_rows: 0 + total_pages: 6 + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_config: + - key: "" + - key: "" + table: + - key: "" + - key: "" + properties: + metadata: + $ref: '#/components/schemas/CompareDatasetMetadata' + column_config: + items: + additionalProperties: true + type: object + type: array + table: + items: + additionalProperties: true + type: object + type: array + type: object + CompareDatasetResponse: + example: + result: + metadata: + total_rows: 0 + total_pages: 6 + compare_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_config: + - key: "" + - key: "" + table: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompareDatasetResult' + required: + - result + - status + type: object + CompareExperimentEvalRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: false + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: template_id + model: model + run: false + config: + key: "" + save_as_template: false + eval_type: eval_type + properties: + name: + maxLength: 50 + minLength: 1 + title: Name + type: string + template_id: + maxLength: 500 + minLength: 1 + title: Template id + type: string + config: + additionalProperties: true + title: Config + type: object + kb_id: + format: uuid + title: Kb id + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + model: + maxLength: 100 + title: Model + type: string + eval_type: + title: Eval type + type: string + run: + default: false + title: Run + type: boolean + save_as_template: + default: false + title: Save as template + type: boolean + experiment_id: + format: uuid + title: Experiment id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - config + - name + - template_id + type: object + DevelopDatasetMessageResponse: + example: + result: result + status: true + properties: + status: + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + - status + type: object + CompareStartEvalsRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_names: + - user_eval_names + - user_eval_names + properties: + user_eval_names: + items: + minLength: 1 + type: string + type: array + dataset_ids: + items: + format: uuid + type: string + type: array + required: + - user_eval_names + type: object + CompareDatasetStatsRequest: + example: + dataset_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + base_column_name: base_column_name + stat_type: evaluation + properties: + base_column_name: + minLength: 1 + title: Base column name + type: string + dataset_ids: + items: + format: uuid + type: string + type: array + stat_type: + default: evaluation + enum: + - evaluation + - run_prompt + title: Stat type + type: string + required: + - base_column_name + - dataset_ids + type: object + CompareDatasetStatsResponse: + example: + result: + key: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + items: + additionalProperties: true + type: object + type: array + title: Result + type: object + required: + - result + - status + type: object + ConditionalColumnRequest: + example: + config: + - key: "" + - key: "" + new_column_name: new_column_name + concurrency: 0 + properties: + config: + items: + additionalProperties: true + type: object + type: array + new_column_name: + minLength: 1 + title: New column name + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + required: + - config + - new_column_name + type: object + DerivedVariableDetail: + example: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + properties: + paths: + items: + minLength: 1 + type: string + type: array + schema: + additionalProperties: true + title: Schema + type: object + full_variables: + items: + minLength: 1 + type: string + type: array + raw_sample: + additionalProperties: true + title: Raw sample + type: object + is_json: + title: Is json + type: boolean + type: object + DatasetDerivedVariablesResult: + example: + derived_variables: + key: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + properties: + derived_variables: + additionalProperties: + $ref: '#/components/schemas/DerivedVariableDetail' + title: Derived variables + type: object + required: + - derived_variables + type: object + DatasetDerivedVariablesResponse: + example: + result: + derived_variables: + key: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetDerivedVariablesResult' + required: + - result + - status + type: object + DuplicateRowsRequest: + example: + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_copies: 1 + selected_all_rows: false + properties: + row_ids: + items: + format: uuid + type: string + type: array + selected_all_rows: + default: false + title: Selected all rows + type: boolean + num_copies: + default: 1 + minimum: 1 + title: Num copies + type: integer + type: object + DuplicateRowsResult: + example: + new_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + copies_per_row: 6 + message: message + total_new_rows: 1 + source_rows: 0 + properties: + message: + minLength: 1 + title: Message + type: string + source_rows: + title: Source rows + type: integer + copies_per_row: + title: Copies per row + type: integer + total_new_rows: + title: Total new rows + type: integer + new_row_ids: + items: + format: uuid + type: string + type: array + required: + - copies_per_row + - message + - new_row_ids + - source_rows + - total_new_rows + type: object + DuplicateRowsResponse: + example: + result: + new_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + copies_per_row: 6 + message: message + total_new_rows: 1 + source_rows: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DuplicateRowsResult' + required: + - result + - status + type: object + DuplicateDatasetRequest: + example: + name: name + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_all_rows: false + properties: + row_ids: + items: + format: uuid + type: string + type: array + selected_all_rows: + default: false + title: Selected all rows + type: boolean + name: + minLength: 1 + title: Name + type: string + required: + - name + type: object + DuplicateDatasetResult: + example: + new_dataset_name: new_dataset_name + columns_copied: 0 + new_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + rows_copied: 6 + properties: + message: + minLength: 1 + title: Message + type: string + new_dataset_id: + format: uuid + title: New dataset id + type: string + new_dataset_name: + minLength: 1 + title: New dataset name + type: string + columns_copied: + title: Columns copied + type: integer + rows_copied: + title: Rows copied + type: integer + required: + - columns_copied + - message + - new_dataset_id + - new_dataset_name + - rows_copied + type: object + DuplicateDatasetResponse: + example: + result: + new_dataset_name: new_dataset_name + columns_copied: 0 + new_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + rows_copied: 6 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DuplicateDatasetResult' + required: + - result + - status + type: object + ExtractEntitiesRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + instruction: instruction + language_model_id: gpt-4 + new_column_name: new_column_name + concurrency: 0 + properties: + column_id: + format: uuid + title: Column id + type: string + instruction: + minLength: 1 + title: Instruction + type: string + language_model_id: + default: gpt-4 + minLength: 1 + title: Language model id + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + new_column_name: + title: New column name + type: string + required: + - column_id + - instruction + type: object + DynamicColumnMessageResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + DynamicColumnMessageResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DynamicColumnMessageResult' + required: + - result + - status + type: object + MergeDatasetRequest: + example: + target_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_all_rows: false + properties: + row_ids: + items: + format: uuid + type: string + type: array + selected_all_rows: + default: false + title: Selected all rows + type: boolean + target_dataset_id: + format: uuid + title: Target dataset id + type: string + required: + - target_dataset_id + type: object + MergeDatasetResult: + example: + rows_added: 0 + new_columns_created: 6 + columns_mapped: 1 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + rows_added: + title: Rows added + type: integer + new_columns_created: + title: New columns created + type: integer + columns_mapped: + title: Columns mapped + type: integer + required: + - columns_mapped + - message + - new_columns_created + - rows_added + type: object + MergeDatasetResponse: + example: + result: + rows_added: 0 + new_columns_created: 6 + columns_mapped: 1 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/MergeDatasetResult' + required: + - result + - status + type: object + PreviewDatasetOperationRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + code: code + json_key: json_key + instruction: instruction + language_model_id: language_model_id + config: + key: "" + labels: + - labels + - labels + properties: + column_id: + format: uuid + title: Column id + type: string + json_key: + title: Json key + type: string + labels: + items: + minLength: 1 + type: string + type: array + instruction: + title: Instruction + type: string + language_model_id: + title: Language model id + type: string + config: + additionalProperties: true + title: Config + type: object + code: + title: Code + type: string + type: object + PreviewDatasetOperationResultItem: + example: + output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + row_id: + format: uuid + title: Row id + type: string + input: + additionalProperties: true + title: Input + type: object + output: + additionalProperties: true + title: Output + type: object + details: + additionalProperties: true + title: Details + type: object + required: + - row_id + type: object + PreviewDatasetOperationResult: + example: + sample_size: 0 + preview_results: + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + preview_results: + items: + $ref: '#/components/schemas/PreviewDatasetOperationResultItem' + type: array + sample_size: + title: Sample size + type: integer + required: + - message + - preview_results + - sample_size + type: object + PreviewDatasetOperationResponse: + example: + result: + sample_size: 0 + preview_results: + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - output: + key: "" + input: + key: "" + details: + key: "" + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/PreviewDatasetOperationResult' + required: + - result + - status + type: object + DeleteEvalTemplate: + example: + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + eval_template_id: + format: uuid + title: Eval template id + type: string + required: + - eval_template_id + type: object + AddAsNewDatasetRequest: + example: + columns: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + title: Name + type: string + columns: + additionalProperties: true + title: Columns + type: object + required: + - dataset_id + type: object + DatasetCopyResult: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + dataset_name: dataset_name + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + required: + - dataset_id + - dataset_name + - message + type: object + DatasetCopyResponse: + example: + result: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + dataset_name: dataset_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetCopyResult' + required: + - result + - status + type: object + AddRowsFromFileRequest: + example: + file: https://openapi-generator.tech + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: model_type + properties: + file: + format: uri + readOnly: true + title: File + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + model_type: + title: Model type + type: string + required: + - dataset_id + type: object + DatasetSdkRowsRequest: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + properties: + dataset_name: + title: Dataset name + type: string + dataset_id: + format: uuid + nullable: true + title: Dataset id + type: string + type: object + Dataset: + example: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + organization: + format: uuid + title: Organization + type: string + model_type: + enum: + - Numeric + - ScoreCategorical + - Ranking + - BinaryClassification + - Regression + - ObjectDetection + - Segmentation + - GenerativeLLM + - GenerativeImage + - GenerativeVideo + - TTS + - STT + - MultiModal + title: Model type + type: string + source: + enum: + - demo + - build + - sdk + - observe + - knowledge_base + - scenario + - experiment_snapshot + - graph + title: Source + type: string + user: + format: uuid + nullable: true + title: User + type: string + required: + - name + - organization + type: object + DatasetSdkRowsCode: + example: + python_add_col: python_add_col + curl_add_row: curl_add_row + python_add_row: python_add_row + curl_add_col: curl_add_col + typescript_add_col: typescript_add_col + typescript_add_row: typescript_add_row + properties: + python_add_row: + minLength: 1 + title: Python add row + type: string + python_add_col: + minLength: 1 + title: Python add col + type: string + typescript_add_col: + minLength: 1 + title: Typescript add col + type: string + typescript_add_row: + minLength: 1 + title: Typescript add row + type: string + curl_add_col: + minLength: 1 + title: Curl add col + type: string + curl_add_row: + minLength: 1 + title: Curl add row + type: string + required: + - curl_add_col + - curl_add_row + - python_add_col + - python_add_row + - typescript_add_col + - typescript_add_row + type: object + DatasetSdkRowsResult: + example: + code: + python_add_col: python_add_col + curl_add_row: curl_add_row + python_add_row: python_add_row + curl_add_col: curl_add_col + typescript_add_col: typescript_add_col + typescript_add_row: typescript_add_row + api_keys: + key: "" + dataset: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + api_keys: + additionalProperties: true + title: Api keys + type: object + dataset: + $ref: '#/components/schemas/Dataset' + code: + $ref: '#/components/schemas/DatasetSdkRowsCode' + required: + - api_keys + - code + - dataset + type: object + DatasetSdkRowsResponse: + example: + result: + code: + python_add_col: python_add_col + curl_add_row: curl_add_row + python_add_row: python_add_row + curl_add_col: curl_add_col + typescript_add_col: typescript_add_col + typescript_add_row: typescript_add_row + api_keys: + key: "" + dataset: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetSdkRowsResult' + required: + - result + - status + type: object + PromptConfig: + example: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + model: + maxLength: 255 + title: Model + type: string + run_prompt_config: + additionalProperties: + nullable: true + type: string + title: Run prompt config + type: object + messages: + description: "List of messages with format [{'role': 'user/assistant', 'content':\ + \ 'text'}]" + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + temperature: + description: Controls the randomness. Value between 0 and 2. + maximum: 2 + minimum: 0 + nullable: true + title: Temperature + type: number + frequency_penalty: + description: Penalty for word repetition. Value between -2 and 2. + maximum: 2 + minimum: -2 + nullable: true + title: Frequency penalty + type: number + presence_penalty: + description: Penalty for new word usage. Value between -2 and 2. + maximum: 2 + minimum: -2 + nullable: true + title: Presence penalty + type: number + max_tokens: + description: Maximum number of tokens to generate. Null = use provider default. + maximum: 65536 + minimum: 1 + nullable: true + title: Max tokens + type: integer + top_p: + description: Controls diversity via nucleus sampling. Value between 0 and + 1. + maximum: 1 + minimum: 0 + nullable: true + title: Top p + type: number + response_format: + additionalProperties: true + description: JSON schema for response format if required. Can be a JSON + object or string. Defaults to None. + title: Response format + type: object + tool_choice: + description: "Tool selection mode: 'auto' or 'required'." + enum: + - auto + - required + - null + nullable: true + title: Tool choice + type: string + tools: + description: List of tools with tool properties if available. + items: + additionalProperties: + nullable: true + type: string + type: object + nullable: true + type: array + output_format: + description: Output format type. + enum: + - array + - string + - number + - object + - audio + - image + nullable: true + title: Output format + type: string + concurrency: + description: Number of concurrent operations allowed. Maximum 10. + maximum: 10 + minimum: 1 + nullable: true + title: Concurrency + type: integer + type: object + AddRunPrompt: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + config: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + minLength: 1 + title: Name + type: string + config: + $ref: '#/components/schemas/PromptConfig' + required: + - dataset_id + - name + type: object + CloneDatasetRequest: + example: + new_dataset_name: new_dataset_name + properties: + new_dataset_name: + title: New dataset name + type: string + type: object + HuggingFaceDatasetCreateRequest: + example: + huggingface_dataset_name: huggingface_dataset_name + huggingface_dataset_split: huggingface_dataset_split + name: "" + model_type: "" + num_rows: 0 + huggingface_dataset_config: huggingface_dataset_config + properties: + name: + default: "" + title: Name + type: string + model_type: + default: "" + title: Model type + type: string + num_rows: + minimum: 0 + title: Num rows + type: integer + huggingface_dataset_name: + minLength: 1 + title: Huggingface dataset name + type: string + huggingface_dataset_config: + title: Huggingface dataset config + type: string + huggingface_dataset_split: + minLength: 1 + title: Huggingface dataset split + type: string + required: + - huggingface_dataset_name + - huggingface_dataset_split + type: object + DatasetCreateStartedResult: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + message: message + dataset_name: dataset_name + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + dataset_model_type: + nullable: true + title: Dataset model type + type: string + required: + - dataset_id + - dataset_name + - message + type: object + DatasetCreateStartedResponse: + example: + result: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + message: message + dataset_name: dataset_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetCreateStartedResult' + required: + - result + - status + type: object + CreateDatasetFromLocalFileRequest: + example: + file: https://openapi-generator.tech + new_dataset_name: new_dataset_name + model_type: model_type + source: source + properties: + file: + format: uri + readOnly: true + title: File + type: string + new_dataset_name: + title: New dataset name + type: string + model_type: + title: Model type + type: string + source: + title: Source + type: string + type: object + LocalFileDatasetCreateStartedResult: + example: + estimated_rows: 0 + estimated_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + processing_status: processing_status + message: message + dataset_name: dataset_name + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + dataset_model_type: + nullable: true + title: Dataset model type + type: string + processing_status: + minLength: 1 + title: Processing status + type: string + estimated_rows: + title: Estimated rows + type: integer + estimated_columns: + title: Estimated columns + type: integer + required: + - dataset_id + - dataset_name + - estimated_columns + - estimated_rows + - message + - processing_status + type: object + LocalFileDatasetCreateStartedResponse: + example: + result: + estimated_rows: 0 + estimated_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_model_type: dataset_model_type + processing_status: processing_status + message: message + dataset_name: dataset_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LocalFileDatasetCreateStartedResult' + required: + - result + - status + type: object + ManualDatasetCreateRequest: + example: + number_of_columns: 1 + number_of_rows: 1 + dataset_name: dataset_name + properties: + dataset_name: + minLength: 1 + title: Dataset name + type: string + number_of_rows: + default: 1 + minimum: 1 + title: Number of rows + type: integer + number_of_columns: + default: 1 + minimum: 1 + title: Number of columns + type: integer + required: + - dataset_name + type: object + ManualDatasetCreateResult: + example: + columns_created: 6 + rows_created: 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + rows_created: + title: Rows created + type: integer + columns_created: + title: Columns created + type: integer + required: + - columns_created + - dataset_id + - message + - rows_created + type: object + ManualDatasetCreateResponse: + example: + result: + columns_created: 6 + rows_created: 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ManualDatasetCreateResult' + required: + - result + - status + type: object + CreateEmptyDatasetRequest: + example: + new_dataset_name: new_dataset_name + model_type: model_type + is_sdk: false + row: 0 + properties: + new_dataset_name: + minLength: 1 + title: New dataset name + type: string + model_type: + title: Model type + type: string + is_sdk: + default: false + title: Is sdk + type: boolean + row: + minimum: 0 + title: Row + type: integer + required: + - new_dataset_name + type: object + SyntheticDatasetCreation: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - columns + - columns + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + nullable: true + type: string + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + title: Kb id + type: string + required: + - columns + - dataset + - num_rows + type: object + SyntheticDatasetCreateStartedResult: + example: + data: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + $ref: '#/components/schemas/Dataset' + required: + - data + - message + type: object + SyntheticDatasetCreateStartedResponse: + example: + result: + data: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: Numeric + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: demo + user: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SyntheticDatasetCreateStartedResult' + required: + - result + - status + type: object + DatasetCreationProgressResult: + example: + error_message: error_message + queued_at: queued_at + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + is_completed: true + is_failed: true + completed_at: completed_at + estimated_rows: 0 + original_filename: original_filename + estimated_columns: 6 + processing_status: processing_status + started_at: started_at + is_processing: true + failed_at: failed_at + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + processing_status: + minLength: 1 + title: Processing status + type: string + is_processing: + title: Is processing + type: boolean + is_completed: + title: Is completed + type: boolean + is_failed: + title: Is failed + type: boolean + original_filename: + nullable: true + title: Original filename + type: string + estimated_rows: + nullable: true + title: Estimated rows + type: integer + estimated_columns: + nullable: true + title: Estimated columns + type: integer + queued_at: + nullable: true + title: Queued at + type: string + started_at: + nullable: true + title: Started at + type: string + completed_at: + nullable: true + title: Completed at + type: string + failed_at: + nullable: true + title: Failed at + type: string + error_message: + nullable: true + title: Error message + type: string + required: + - dataset_id + - dataset_name + - is_completed + - is_failed + - is_processing + - processing_status + type: object + DatasetCreationProgressResponse: + example: + result: + error_message: error_message + queued_at: queued_at + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + is_completed: true + is_failed: true + completed_at: completed_at + estimated_rows: 0 + original_filename: original_filename + estimated_columns: 6 + processing_status: processing_status + started_at: started_at + is_processing: true + failed_at: failed_at + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetCreationProgressResult' + required: + - result + - status + type: object + EditRunPromptColumn: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + config: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + column_id: + format: uuid + title: Column id + type: string + name: + minLength: 1 + nullable: true + title: Name + type: string + config: + $ref: '#/components/schemas/PromptConfig' + required: + - column_id + - dataset_id + type: object + DatasetCellDataRequest: + example: + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + row_ids: + items: + format: uuid + type: string + type: array + column_ids: + items: + format: uuid + type: string + type: array + required: + - column_ids + - row_ids + type: object + DatasetCellValue: + example: + value_infos: + key: "" + cell_value: + key: "" + feedback_info: + key: "" + status: status + properties: + cell_value: + additionalProperties: true + title: Cell value + type: object + status: + nullable: true + title: Status + type: string + value_infos: + additionalProperties: true + title: Value infos + type: object + feedback_info: + additionalProperties: true + title: Feedback info + type: object + type: object + DatasetCellDataResponse: + example: + result: + key: + key: + value_infos: + key: "" + cell_value: + key: "" + feedback_info: + key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/DatasetCellValue' + type: object + title: Result + type: object + required: + - result + - status + type: object + DatasetNameItem: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + minLength: 1 + title: Name + type: string + model_type: + title: Model type + type: string + required: + - dataset_id + - name + type: object + DatasetNamesResult: + example: + datasets: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + properties: + datasets: + items: + $ref: '#/components/schemas/DatasetNameItem' + type: array + required: + - datasets + type: object + DatasetNamesResponse: + example: + result: + datasets: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model_type: model_type + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetNamesResult' + required: + - result + - status + type: object + DatasetListItem: + example: + dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + number_of_datapoints: + title: Number of datapoints + type: integer + number_of_experiments: + title: Number of experiments + type: integer + number_of_optimisations: + title: Number of optimisations + type: integer + derived_datasets: + title: Derived datasets + type: integer + created_at: + minLength: 1 + title: Created at + type: string + dataset_type: + minLength: 1 + title: Dataset type + type: string + required: + - created_at + - dataset_type + - derived_datasets + - id + - name + - number_of_datapoints + - number_of_experiments + - number_of_optimisations + type: object + DatasetListResult: + example: + total_count: 2 + datasets: + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + total_pages: 5 + properties: + datasets: + items: + $ref: '#/components/schemas/DatasetListItem' + type: array + total_pages: + title: Total pages + type: integer + total_count: + title: Total count + type: integer + required: + - datasets + - total_count + - total_pages + type: object + DatasetListResponse: + example: + result: + total_count: 2 + datasets: + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + - dataset_type: dataset_type + number_of_experiments: 6 + name: name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + number_of_datapoints: 0 + derived_datasets: 5 + number_of_optimisations: 1 + total_pages: 5 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetListResult' + required: + - result + - status + type: object + HuggingFaceDatasetConfigRequest: + example: + dataset_path: dataset_path + properties: + dataset_path: + minLength: 1 + title: Dataset path + type: string + required: + - dataset_path + type: object + HuggingFaceDatasetConfigResult: + example: + dataset_info: + key: "" + message: message + properties: + message: + minLength: 1 + title: Message + type: string + dataset_info: + additionalProperties: true + title: Dataset info + type: object + required: + - dataset_info + - message + type: object + HuggingFaceDatasetConfigResponse: + example: + result: + dataset_info: + key: "" + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/HuggingFaceDatasetConfigResult' + required: + - result + - status + type: object + DatasetRowDiffRequest: + example: + compare_column_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + column_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + column_ids: + items: + format: uuid + type: string + type: array + row_ids: + items: + format: uuid + type: string + type: array + compare_column_ids: + items: + format: uuid + type: string + type: array + required: + - column_ids + - compare_column_ids + - experiment_id + - row_ids + type: object + ExperimentRowDiffCell: + example: + value_infos: + key: "" + cell_value: + key: "" + cell_diff_value: + key: "" + status: status + properties: + cell_value: + additionalProperties: true + title: Cell value + type: object + cell_diff_value: + additionalProperties: true + title: Cell diff value + type: object + status: + title: Status + type: string + value_infos: + additionalProperties: true + title: Value infos + type: object + type: object + ExperimentRowDiffResponse: + example: + result: + key: + key: + value_infos: + key: "" + cell_value: + key: "" + cell_diff_value: + key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/ExperimentRowDiffCell' + type: object + title: Result + type: object + required: + - result + - status + type: object + EvalFunctionListResult: + example: + functions: + - key: "" + - key: "" + properties: + functions: + items: + additionalProperties: true + type: object + type: array + required: + - functions + type: object + EvalFunctionListResponse: + example: + result: + functions: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalFunctionListResult' + required: + - result + - status + type: object + PreviewRunPrompt: + example: + row_indices: + - 0 + - 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + first_n_rows: 1 + config: + run_prompt_config: + key: run_prompt_config + max_tokens: 39073 + presence_penalty: -1.413674807798822 + tools: + - key: tools + - key: tools + concurrency: 3 + top_p: 0.5637376656633328 + frequency_penalty: 0.4109824732281613 + response_format: + key: "" + output_format: array + temperature: 0.1601656380922023 + messages: + - key: messages + - key: messages + tool_choice: auto + model: model + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + name: + minLength: 1 + title: Name + type: string + config: + $ref: '#/components/schemas/PromptConfig' + first_n_rows: + minimum: 1 + title: First n rows + type: integer + row_indices: + description: List of row indices to preview. Must contain at least one integer. + items: + minimum: 0 + type: integer + type: array + required: + - dataset_id + - name + type: object + RunPromptColumnPreviewResult: + example: + token_usage: + key: "" + cost: + key: "" + responses: + - key: "" + - key: "" + properties: + responses: + items: + additionalProperties: true + description: Response + type: object + type: array + token_usage: + additionalProperties: true + title: Token usage + type: object + cost: + additionalProperties: true + title: Cost + type: object + required: + - cost + - responses + - token_usage + type: object + RunPromptColumnPreviewResponse: + example: + result: + token_usage: + key: "" + cost: + key: "" + responses: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunPromptColumnPreviewResult' + required: + - result + - status + type: object + ProviderStatusItem: + example: + provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + properties: + provider: + minLength: 1 + title: Provider + type: string + display_name: + minLength: 1 + title: Display name + type: string + has_key: + title: Has key + type: boolean + masked_key: + nullable: true + title: Masked key + type: string + logo_url: + nullable: true + title: Logo url + type: string + type: + minLength: 1 + title: Type + type: string + id: + format: uuid + nullable: true + title: Id + type: string + required: + - display_name + - has_key + - provider + - type + type: object + ProviderStatusResult: + example: + providers: + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + properties: + providers: + items: + $ref: '#/components/schemas/ProviderStatusItem' + type: array + required: + - providers + type: object + ProviderStatusResponse: + example: + result: + providers: + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + - provider: provider + has_key: true + logo_url: logo_url + masked_key: masked_key + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + display_name: display_name + type: type + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ProviderStatusResult' + required: + - result + - status + type: object + RunPromptColumnConfigResult: + example: + config: + key: "" + properties: + config: + additionalProperties: true + title: Config + type: object + required: + - config + type: object + RunPromptColumnConfigResponse: + example: + result: + config: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunPromptColumnConfigResult' + required: + - result + - status + type: object + RunPromptToolOption: + example: + yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + yaml_config: + nullable: true + title: Yaml config + type: string + config: + additionalProperties: true + title: Config + type: object + config_type: + nullable: true + title: Config type + type: string + description: + nullable: true + title: Description + type: string + required: + - id + - name + type: object + RunPromptChoiceOption: + example: + label: label + value: + key: "" + properties: + value: + additionalProperties: true + title: Value + type: object + label: + minLength: 1 + title: Label + type: string + required: + - label + - value + type: object + RunPromptOptionsResult: + example: + models: + - key: "" + - key: "" + output_formats: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_choices: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_config: + key: "" + available_tools: + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + properties: + models: + items: + additionalProperties: true + type: object + type: array + tool_config: + additionalProperties: true + title: Tool config + type: object + available_tools: + items: + $ref: '#/components/schemas/RunPromptToolOption' + type: array + output_formats: + items: + $ref: '#/components/schemas/RunPromptChoiceOption' + type: array + tool_choices: + items: + $ref: '#/components/schemas/RunPromptChoiceOption' + type: array + required: + - available_tools + - models + - output_formats + - tool_choices + - tool_config + type: object + RunPromptOptionsResponse: + example: + result: + models: + - key: "" + - key: "" + output_formats: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_choices: + - label: label + value: + key: "" + - label: label + value: + key: "" + tool_config: + key: "" + available_tools: + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + - yaml_config: yaml_config + name: name + description: description + id: id + config_type: config_type + config: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunPromptOptionsResult' + required: + - result + - status + type: object + DatasetAddColumnsRequest: + example: + new_columns_data: + - key: "" + - key: "" + properties: + new_columns_data: + items: + additionalProperties: true + type: object + type: array + required: + - new_columns_data + type: object + Column: + example: + name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + data_type: + enum: + - text + - boolean + - integer + - float + - json + - array + - image + - images + - datetime + - audio + - document + - others + - persona + title: Data type + type: string + dataset: + format: uuid + nullable: true + title: Dataset + type: string + source: + enum: + - evaluation + - evaluation_tags + - evaluation_reason + - run_prompt + - experiment + - optimisation + - experiment_evaluation + - experiment_evaluation_tags + - optimisation_evaluation + - annotation_label + - optimisation_evaluation_tags + - extracted_json + - classification + - extracted_entities + - api_call + - python_code + - vector_db + - conditional + - eval_playground + - OTHERS + title: Source + type: string + source_id: + maxLength: 2000 + nullable: true + title: Source id + type: string + required: + - data_type + - name + - source + type: object + DatasetColumnsMutationResult: + example: + data: + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + items: + $ref: '#/components/schemas/Column' + type: array + required: + - message + type: object + DatasetColumnsMutationResponse: + example: + result: + data: + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + data_type: text + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: evaluation + source_id: source_id + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetColumnsMutationResult' + required: + - result + - status + type: object + DatasetAddEmptyColumnsRequest: + example: + num_cols: 0 + properties: + num_cols: + default: 0 + minimum: 0 + title: Num cols + type: integer + type: object + DatasetAddEmptyRowsRequest: + example: + num_rows: 1 + properties: + num_rows: + default: 1 + minimum: 1 + title: Num rows + type: integer + type: object + DatasetMultipleStaticColumnsRequest: + example: + columns: + - key: "" + - key: "" + properties: + columns: + items: + additionalProperties: true + type: object + type: array + required: + - columns + type: object + DatasetAddRowsRequest: + example: + rows: + - key: "" + - key: "" + properties: + rows: + items: + additionalProperties: true + type: object + type: array + required: + - rows + type: object + DatasetAddRowsFromExistingRequest: + example: + column_mapping: + key: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + source_dataset_id: + format: uuid + title: Source dataset id + type: string + column_mapping: + additionalProperties: + format: uuid + type: string + title: Column mapping + type: object + required: + - column_mapping + - source_dataset_id + type: object + DatasetRowsImportedResult: + example: + rows_added: 0 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + rows_added: + title: Rows added + type: integer + required: + - message + - rows_added + type: object + DatasetRowsImportedResponse: + example: + result: + rows_added: 0 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRowsImportedResult' + required: + - result + - status + type: object + HuggingFaceAddRowsRequest: + example: + huggingface_dataset_name: huggingface_dataset_name + huggingface_dataset_split: huggingface_dataset_split + num_rows: 0 + huggingface_dataset_config: huggingface_dataset_config + properties: + num_rows: + minimum: 0 + title: Num rows + type: integer + huggingface_dataset_name: + minLength: 1 + title: Huggingface dataset name + type: string + huggingface_dataset_config: + minLength: 1 + title: Huggingface dataset config + type: string + huggingface_dataset_split: + minLength: 1 + title: Huggingface dataset split + type: string + required: + - huggingface_dataset_config + - huggingface_dataset_name + - huggingface_dataset_split + type: object + DatasetRowsImportMessageResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + DatasetRowsImportMessageResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRowsImportMessageResult' + required: + - result + - status + type: object + DatasetStaticColumnRequest: + example: + source: source + column_type: column_type + new_column_name: new_column_name + properties: + new_column_name: + minLength: 1 + title: New column name + type: string + column_type: + minLength: 1 + title: Column type + type: string + source: + title: Source + type: string + required: + - column_type + - new_column_name + type: object + SyntheticData: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fill_existing_rows: false + columns: + - columns + - columns + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + nullable: true + type: string + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + title: Kb id + type: string + fill_existing_rows: + default: false + title: Fill existing rows + type: boolean + required: + - columns + - dataset + - num_rows + type: object + UserEvalMutationRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: false + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: template_id + model: model + run: false + config: + key: "" + save_as_template: false + eval_type: eval_type + properties: + name: + maxLength: 50 + minLength: 1 + title: Name + type: string + template_id: + maxLength: 500 + minLength: 1 + title: Template id + type: string + config: + additionalProperties: true + title: Config + type: object + kb_id: + format: uuid + title: Kb id + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + model: + maxLength: 100 + title: Model + type: string + eval_type: + title: Eval type + type: string + run: + default: false + title: Run + type: boolean + save_as_template: + default: false + title: Save as template + type: boolean + experiment_id: + format: uuid + title: Experiment id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + required: + - config + - name + - template_id + type: object + UserEvalUpdateRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: false + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: template_id + model: model + run: false + config: + key: "" + save_as_template: false + eval_type: eval_type + properties: + name: + maxLength: 50 + title: Name + type: string + template_id: + maxLength: 500 + title: Template id + type: string + config: + additionalProperties: true + title: Config + type: object + kb_id: + format: uuid + title: Kb id + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + model: + maxLength: 100 + title: Model + type: string + eval_type: + title: Eval type + type: string + run: + default: false + title: Run + type: boolean + save_as_template: + default: false + title: Save as template + type: boolean + experiment_id: + format: uuid + title: Experiment id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + required: + - config + type: object + DatasetBehaviorRequest: + example: + column_config: + key: "" + dataset_name: dataset_name + dataset_config: + key: "" + column_order: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + dataset_name: + title: Dataset name + type: string + column_order: + items: + format: uuid + type: string + type: array + column_config: + additionalProperties: true + title: Column config + type: object + dataset_config: + additionalProperties: true + title: Dataset config + type: object + type: object + ExtractJsonColumnRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + json_key: json_key + new_column_name: new_column_name + concurrency: 0 + properties: + column_id: + format: uuid + title: Column id + type: string + json_key: + minLength: 1 + title: Json key + type: string + new_column_name: + title: New column name + type: string + concurrency: + default: 5 + title: Concurrency + type: integer + required: + - column_id + - json_key + type: object + DatasetTableMetadata: + example: + total_rows: 0 + total_pages: 6 + dataset_name: dataset_name + error_messages: + - error_messages + - error_messages + status: status + properties: + dataset_name: + minLength: 1 + title: Dataset name + type: string + total_rows: + title: Total rows + type: integer + total_pages: + title: Total pages + type: integer + error_messages: + items: + minLength: 1 + type: string + type: array + status: + nullable: true + title: Status + type: string + required: + - dataset_name + type: object + DatasetTableResult: + example: + metadata: + total_rows: 0 + total_pages: 6 + dataset_name: dataset_name + error_messages: + - error_messages + - error_messages + status: status + synthetic_regenerate: true + synthetic_dataset_percentage: 1.4658129805029452 + is_processing_data: true + column_config: + - key: "" + - key: "" + synthetic_dataset: true + dataset_config: + key: "" + table: + - key: "" + - key: "" + properties: + metadata: + $ref: '#/components/schemas/DatasetTableMetadata' + column_config: + items: + additionalProperties: true + type: object + type: array + table: + items: + additionalProperties: true + type: object + type: array + dataset_config: + additionalProperties: true + title: Dataset config + type: object + synthetic_dataset: + title: Synthetic dataset + type: boolean + synthetic_dataset_percentage: + nullable: true + title: Synthetic dataset percentage + type: number + synthetic_regenerate: + title: Synthetic regenerate + type: boolean + is_processing_data: + title: Is processing data + type: boolean + required: + - column_config + type: object + DatasetTableResponse: + example: + result: + metadata: + total_rows: 0 + total_pages: 6 + dataset_name: dataset_name + error_messages: + - error_messages + - error_messages + status: status + synthetic_regenerate: true + synthetic_dataset_percentage: 1.4658129805029452 + is_processing_data: true + column_config: + - key: "" + - key: "" + synthetic_dataset: true + dataset_config: + key: "" + table: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetTableResult' + required: + - result + - status + type: object + DatasetRowDataRequest: + example: + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + sort: + - column_id: column_id + type: ascending + - column_id: column_id + type: ascending + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + sort: + items: + $ref: '#/components/schemas/DatasetRowDataRequest_sort_inner' + type: array + row_id: + format: uuid + title: Row id + type: string + required: + - row_id + type: object + DatasetRowNavigation: + example: + row_id: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + row_id: + items: + format: uuid + type: string + type: array + type: object + DatasetRowDataResult: + example: + next: + row_id: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current: + key: "" + properties: + next: + $ref: '#/components/schemas/DatasetRowNavigation' + current: + additionalProperties: true + title: Current + type: object + required: + - current + - next + type: object + DatasetRowDataResponse: + example: + result: + next: + row_id: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DatasetRowDataResult' + required: + - result + - status + type: object + EvalStructure: + example: + reason_column: true + config_params_option: + key: "" + description: description + config_params_desc: + key: "" + output: + key: "" + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: true + optional_keys: + - optional_keys + - optional_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_config: + key: "" + eval_tags: + - eval_tags + - eval_tags + models: + key: "" + mapping: + key: "" + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + api_key_available: true + params: + key: "" + function_params_schema: + key: "" + template_name: template_name + run_prompt_column: true + eval_type_id: eval_type_id + name: name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + choices: + key: "" + config: + key: "" + eval_type: eval_type + properties: + id: + format: uuid + title: Id + type: string + template_id: + format: uuid + title: Template id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + eval_tags: + items: + minLength: 1 + type: string + type: array + template_name: + minLength: 1 + title: Template name + type: string + required_keys: + items: + minLength: 1 + type: string + type: array + optional_keys: + items: + minLength: 1 + type: string + type: array + variable_keys: + items: + minLength: 1 + type: string + type: array + run_prompt_column: + title: Run prompt column + type: boolean + mapping: + additionalProperties: true + title: Mapping + type: object + config: + additionalProperties: true + title: Config + type: object + params: + additionalProperties: true + title: Params + type: object + function_params_schema: + additionalProperties: true + title: Function params schema + type: object + eval_type_id: + title: Eval type id + type: string + eval_type: + title: Eval type + type: string + reason_column: + title: Reason column + type: boolean + models: + additionalProperties: true + title: Models + type: object + selected_model: + title: Selected model + type: string + output: + additionalProperties: true + title: Output + type: object + config_params_desc: + additionalProperties: true + title: Config params desc + type: object + config_params_option: + additionalProperties: true + title: Config params option + type: object + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + error_localizer: + title: Error localizer + type: boolean + choices: + additionalProperties: true + title: Choices + type: object + api_key_available: + title: Api key available + type: boolean + run_config: + additionalProperties: true + title: Run config + type: object + required: + - id + - name + - template_id + type: object + EvalStructureResult: + example: + eval: + reason_column: true + config_params_option: + key: "" + description: description + config_params_desc: + key: "" + output: + key: "" + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: true + optional_keys: + - optional_keys + - optional_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_config: + key: "" + eval_tags: + - eval_tags + - eval_tags + models: + key: "" + mapping: + key: "" + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + api_key_available: true + params: + key: "" + function_params_schema: + key: "" + template_name: template_name + run_prompt_column: true + eval_type_id: eval_type_id + name: name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + choices: + key: "" + config: + key: "" + eval_type: eval_type + properties: + eval: + $ref: '#/components/schemas/EvalStructure' + required: + - eval + type: object + EvalStructureResponse: + example: + result: + eval: + reason_column: true + config_params_option: + key: "" + description: description + config_params_desc: + key: "" + output: + key: "" + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_localizer: true + optional_keys: + - optional_keys + - optional_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_config: + key: "" + eval_tags: + - eval_tags + - eval_tags + models: + key: "" + mapping: + key: "" + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + api_key_available: true + params: + key: "" + function_params_schema: + key: "" + template_name: template_name + run_prompt_column: true + eval_type_id: eval_type_id + name: name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + choices: + key: "" + config: + key: "" + eval_type: eval_type + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalStructureResult' + required: + - result + - status + type: object + EvalListResult: + example: + evals: + - key: "" + - key: "" + eval_recommendations: + - eval_recommendations + - eval_recommendations + properties: + evals: + items: + additionalProperties: true + type: object + type: array + eval_recommendations: + items: + minLength: 1 + type: string + type: array + required: + - evals + type: object + EvalListResponse: + example: + result: + evals: + - key: "" + - key: "" + eval_recommendations: + - eval_recommendations + - eval_recommendations + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalListResult' + required: + - result + - status + type: object + PreviewRunEvalRequest: + example: + protect_flash: false + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + source: source + config: + key: "" + sdk_uuid: sdk_uuid + properties: + config: + additionalProperties: true + title: Config + type: object + template_id: + format: uuid + title: Template id + type: string + model: + title: Model + type: string + sdk_uuid: + title: Sdk uuid + type: string + source: + title: Source + type: string + protect_flash: + default: false + title: Protect flash + type: boolean + required: + - config + - template_id + type: object + StartEvalsProcessRequest: + example: + failed_only: false + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + user_eval_ids: + items: + format: uuid + type: string + type: array + experiment_id: + format: uuid + title: Experiment id + type: string + failed_only: + default: false + title: Failed only + type: boolean + required: + - user_eval_ids + type: object + StopUserEvalRequest: + example: + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + type: object + SyntheticDatasetConfigPayload: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - key: "" + - key: "" + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + additionalProperties: true + type: object + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + type: object + SyntheticDatasetConfigResult: + example: + data: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - key: "" + - key: "" + num_rows: 0 + dataset: + key: "" + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + $ref: '#/components/schemas/SyntheticDatasetConfigPayload' + required: + - data + - message + type: object + SyntheticDatasetConfigResponse: + example: + result: + data: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + columns: + - key: "" + - key: "" + num_rows: 0 + dataset: + key: "" + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SyntheticDatasetConfigResult' + required: + - result + - status + type: object + SyntheticDatasetConfig: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + regenerate: false + columns: + - columns + - columns + num_rows: 0 + dataset: + key: "" + properties: + num_rows: + title: Num rows + type: integer + columns: + items: + nullable: true + type: string + type: array + dataset: + additionalProperties: true + title: Dataset + type: object + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + regenerate: + default: false + title: Regenerate + type: boolean + required: + - columns + - dataset + - num_rows + type: object + SyntheticDatasetUpdateData: + example: + num_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + dataset_name: dataset_name + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + num_rows: + title: Num rows + type: integer + num_columns: + title: Num columns + type: integer + required: + - dataset_id + - dataset_name + type: object + SyntheticDatasetUpdateResult: + example: + data: + num_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + dataset_name: dataset_name + message: message + properties: + message: + minLength: 1 + title: Message + type: string + data: + $ref: '#/components/schemas/SyntheticDatasetUpdateData' + required: + - data + - message + type: object + SyntheticDatasetUpdateResponse: + example: + result: + data: + num_columns: 6 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + dataset_name: dataset_name + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SyntheticDatasetUpdateResult' + required: + - result + - status + type: object + DatasetUpdateCellValueRequest: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + new_value: new_value + properties: + row_id: + format: uuid + title: Row id + type: string + column_id: + format: uuid + title: Column id + type: string + new_value: + description: New cell value. Accepts JSON primitives or multipart file uploads. + nullable: true + title: New value + type: string + required: + - column_id + - row_id + type: object + DatasetUpdateColumnNameRequest: + example: + new_column_name: new_column_name + properties: + new_column_name: + minLength: 1 + title: New column name + type: string + required: + - new_column_name + type: object + DatasetUpdateColumnTypeRequest: + example: + preview: true + force_update: false + new_column_type: new_column_type + properties: + new_column_type: + minLength: 1 + title: New column type + type: string + preview: + default: true + title: Preview + type: boolean + force_update: + default: false + title: Force update + type: boolean + required: + - new_column_type + type: object + ColumnTypeConversionResult: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + invalid_count: 0 + new_data_type: new_data_type + valid_conversion_samples: + key: "" + message: message + invalid_values: + - key: "" + - key: "" + status: status + properties: + message: + minLength: 1 + title: Message + type: string + column_id: + format: uuid + title: Column id + type: string + new_data_type: + minLength: 1 + title: New data type + type: string + status: + minLength: 1 + title: Status + type: string + invalid_count: + title: Invalid count + type: integer + invalid_values: + items: + additionalProperties: true + type: object + type: array + valid_conversion_samples: + additionalProperties: true + title: Valid conversion samples + type: object + type: object + ColumnTypeConversionResponse: + example: + result: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + invalid_count: 0 + new_data_type: new_data_type + valid_conversion_samples: + key: "" + message: message + invalid_values: + - key: "" + - key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ColumnTypeConversionResult' + required: + - result + - status + type: object + CreateDatasetFromExperimentRequest: + example: + name: name + model_type: model_type + properties: + name: + title: Name + type: string + model_type: + title: Model type + type: string + type: object + EvalTemplateBulkDeleteRequest: + example: + template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + template_ids: + items: + format: uuid + type: string + type: array + required: + - template_ids + type: object + EvalTemplateBulkDeleteResponseResult: + example: + deleted_count: 0 + properties: + deleted_count: + title: Deleted count + type: integer + required: + - deleted_count + type: object + EvalTemplateBulkDeleteResponse: + example: + result: + deleted_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateBulkDeleteResponseResult' + required: + - result + - status + type: object + CompositeEvalAdhocExecuteRequest: + example: + composite_child_axis: "" + mapping: + key: "" + input_data_types: + key: "" + span_context: + key: "" + pass_threshold: 0.8008281904610115 + session_context: + key: "" + aggregation_function: weighted_avg + row_context: + key: "" + aggregation_enabled: true + error_localizer: false + call_context: + key: "" + child_weights: + key: "" + model: model + trace_context: + key: "" + child_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + mapping: + additionalProperties: true + title: Mapping + type: object + model: + nullable: true + title: Model + type: string + config: + additionalProperties: true + title: Config + type: object + error_localizer: + default: false + title: Error localizer + type: boolean + input_data_types: + additionalProperties: true + title: Input data types + type: object + span_context: + additionalProperties: true + title: Span context + type: object + trace_context: + additionalProperties: true + title: Trace context + type: object + session_context: + additionalProperties: true + title: Session context + type: object + call_context: + additionalProperties: true + title: Call context + type: object + row_context: + additionalProperties: true + title: Row context + type: object + child_template_ids: + items: + format: uuid + type: string + type: array + aggregation_enabled: + default: true + title: Aggregation enabled + type: boolean + aggregation_function: + default: weighted_avg + enum: + - weighted_avg + - avg + - min + - max + - pass_rate + title: Aggregation function + type: string + composite_child_axis: + default: "" + enum: + - "" + - pass_fail + - percentage + - choices + - code + title: Composite child axis + type: string + child_weights: + additionalProperties: true + title: Child weights + type: object + pass_threshold: + default: 0.5 + title: Pass threshold + type: number + required: + - child_template_ids + - mapping + type: object + CompositeChildResult: + example: + output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + properties: + child_id: + format: uuid + title: Child id + type: string + child_name: + minLength: 1 + title: Child name + type: string + order: + title: Order + type: integer + score: + nullable: true + title: Score + type: number + output: + additionalProperties: true + title: Output + type: object + reason: + nullable: true + title: Reason + type: string + output_type: + nullable: true + title: Output type + type: string + status: + minLength: 1 + title: Status + type: string + error: + nullable: true + title: Error + type: string + log_id: + nullable: true + title: Log id + type: string + weight: + title: Weight + type: number + error_localizer_result: + additionalProperties: true + title: Error localizer result + type: object + required: + - child_id + - child_name + - order + - status + type: object + CompositeEvalExecuteResponseResult: + example: + summary: summary + evaluation_id: evaluation_id + aggregation_function: aggregation_function + error_localizer_results: + key: "" + aggregation_enabled: true + aggregate_pass: true + composite_name: composite_name + composite_id: composite_id + completed_children: 2 + children: + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + aggregate_score: 0.8008281904610115 + total_children: 5 + failed_children: 7 + properties: + composite_id: + nullable: true + title: Composite id + type: string + composite_name: + minLength: 1 + title: Composite name + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + nullable: true + title: Aggregation function + type: string + aggregate_score: + nullable: true + title: Aggregate score + type: number + aggregate_pass: + nullable: true + title: Aggregate pass + type: boolean + children: + items: + $ref: '#/components/schemas/CompositeChildResult' + type: array + summary: + nullable: true + title: Summary + type: string + error_localizer_results: + additionalProperties: true + title: Error localizer results + type: object + total_children: + title: Total children + type: integer + completed_children: + title: Completed children + type: integer + failed_children: + title: Failed children + type: integer + evaluation_id: + nullable: true + title: Evaluation id + type: string + required: + - aggregation_enabled + - children + - completed_children + - composite_name + - failed_children + - total_children + type: object + CompositeEvalExecuteResponse: + example: + result: + summary: summary + evaluation_id: evaluation_id + aggregation_function: aggregation_function + error_localizer_results: + key: "" + aggregation_enabled: true + aggregate_pass: true + composite_name: composite_name + composite_id: composite_id + completed_children: 2 + children: + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + - output: + key: "" + score: 1.4658129805029452 + reason: reason + log_id: log_id + error_localizer_result: + key: "" + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_type: output_type + weight: 5.962133916683182 + error: error + child_name: child_name + order: 6 + status: status + aggregate_score: 0.8008281904610115 + total_children: 5 + failed_children: 7 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompositeEvalExecuteResponseResult' + required: + - result + - status + type: object + CompositeEvalCreateRequest: + example: + composite_child_axis: "" + name: name + description: description + aggregation_function: weighted_avg + child_weights: + key: "" + child_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tags: + - tags + - tags + aggregation_enabled: true + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + type: array + child_template_ids: + items: + format: uuid + type: string + type: array + aggregation_enabled: + default: true + title: Aggregation enabled + type: boolean + aggregation_function: + default: weighted_avg + enum: + - weighted_avg + - avg + - min + - max + - pass_rate + title: Aggregation function + type: string + child_weights: + additionalProperties: true + title: Child weights + type: object + composite_child_axis: + default: "" + enum: + - "" + - pass_fail + - percentage + - choices + - code + title: Composite child axis + type: string + required: + - child_template_ids + - name + type: object + CompositeChildItem: + example: + pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + child_id: + format: uuid + title: Child id + type: string + child_name: + minLength: 1 + title: Child name + type: string + order: + title: Order + type: integer + eval_type: + minLength: 1 + title: Eval type + type: string + pinned_version_id: + format: uuid + nullable: true + title: Pinned version id + type: string + pinned_version_number: + nullable: true + title: Pinned version number + type: integer + weight: + title: Weight + type: number + required_keys: + items: + minLength: 1 + type: string + type: array + required: + - child_id + - child_name + - order + type: object + CompositeEvalCreateResponseResult: + example: + composite_child_axis: composite_child_axis + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + template_type: template_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + template_type: + minLength: 1 + title: Template type + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + minLength: 1 + title: Aggregation function + type: string + composite_child_axis: + title: Composite child axis + type: string + children: + items: + $ref: '#/components/schemas/CompositeChildItem' + type: array + required: + - aggregation_enabled + - aggregation_function + - children + - id + - name + type: object + CompositeEvalCreateResponse: + example: + result: + composite_child_axis: composite_child_axis + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + template_type: template_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompositeEvalCreateResponseResult' + required: + - result + - status + type: object + EvalTemplateCreateV2Request: + example: + summary: + key: "" + instructions: instructions + code: code + output_type: pass_fail + check_internet: false + few_shot_examples: + - key: "" + - key: "" + pass_threshold: 0.08008281904610115 + description: description + tools: + key: "" + tags: + - tags + - tags + mode: auto + knowledge_bases: + - knowledge_bases + - knowledge_bases + code_language: python + is_draft: false + name: name + data_injection: + key: "" + messages: + - key: "" + - key: "" + model: turing_large + template_format: mustache + error_localizer_enabled: false + eval_type: llm + choice_scores: + key: "" + properties: + name: + maxLength: 255 + title: Name + type: string + is_draft: + default: false + title: Is draft + type: boolean + eval_type: + default: llm + enum: + - llm + - code + - agent + title: Eval type + type: string + instructions: + maxLength: 100000 + title: Instructions + type: string + model: + default: turing_large + minLength: 1 + title: Model + type: string + output_type: + default: pass_fail + enum: + - pass_fail + - percentage + - deterministic + title: Output type + type: string + pass_threshold: + maximum: 1 + minimum: 0 + title: Pass threshold + type: number + choice_scores: + additionalProperties: true + title: Choice scores + type: object + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + type: array + check_internet: + default: false + title: Check internet + type: boolean + code: + maxLength: 100000 + nullable: true + title: Code + type: string + code_language: + enum: + - python + - javascript + nullable: true + title: Code language + type: string + messages: + items: + additionalProperties: true + type: object + nullable: true + type: array + few_shot_examples: + items: + additionalProperties: true + type: object + nullable: true + type: array + mode: + enum: + - auto + - agent + - quick + nullable: true + title: Mode + type: string + tools: + additionalProperties: true + title: Tools + type: object + knowledge_bases: + items: + minLength: 1 + type: string + nullable: true + type: array + data_injection: + additionalProperties: true + title: Data injection + type: object + summary: + additionalProperties: true + title: Summary + type: object + error_localizer_enabled: + default: false + title: Error localizer enabled + type: boolean + template_format: + default: mustache + enum: + - mustache + - jinja + title: Template format + type: string + type: object + EvalTemplateCreateResponseResult: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + version: + minLength: 1 + title: Version + type: string + required: + - id + - name + - version + type: object + EvalTemplateCreateResponse: + example: + result: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateCreateResponseResult' + required: + - result + - status + type: object + EvalTemplateListChartsRequest: + example: + template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + template_ids: + items: + format: uuid + type: string + type: array + required: + - template_ids + type: object + EvalTemplateChartPoint: + example: + value: 0.8008281904610115 + timestamp: timestamp + properties: + timestamp: + minLength: 1 + title: Timestamp + type: string + value: + title: Value + type: number + required: + - timestamp + - value + type: object + EvalTemplateListChartsItem: + example: + error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + run_count: 6 + properties: + chart: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + error_rate: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + run_count: + title: Run count + type: integer + required: + - chart + - error_rate + - run_count + type: object + EvalTemplateListChartsResponseResult: + example: + charts: + key: + error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + run_count: 6 + properties: + charts: + additionalProperties: + $ref: '#/components/schemas/EvalTemplateListChartsItem' + title: Charts + type: object + required: + - charts + type: object + EvalTemplateListChartsResponse: + example: + result: + charts: + key: + error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + run_count: 6 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateListChartsResponseResult' + required: + - result + - status + type: object + EvalListFilters: + example: + names: + - names + - names + output_type: + - pass_fail + - pass_fail + template_type: + - single + - single + created_by: + - created_by + - created_by + eval_type: + - llm + - llm + tags: + - tags + - tags + properties: + eval_type: + items: + enum: + - llm + - code + - agent + type: string + type: array + output_type: + items: + enum: + - pass_fail + - percentage + - deterministic + type: string + type: array + template_type: + items: + enum: + - single + - composite + type: string + type: array + tags: + items: + minLength: 1 + type: string + type: array + created_by: + items: + minLength: 1 + type: string + type: array + names: + items: + minLength: 1 + type: string + type: array + type: object + EvalListRequest: + example: + search: search + owner_filter: all + page: 0 + filters: + names: + - names + - names + output_type: + - pass_fail + - pass_fail + template_type: + - single + - single + created_by: + - created_by + - created_by + eval_type: + - llm + - llm + tags: + - tags + - tags + sort_by: updated_at + sort_order: desc + page_size: 60 + properties: + page: + default: 0 + minimum: 0 + title: Page + type: integer + page_size: + default: 25 + maximum: 100 + minimum: 1 + title: Page size + type: integer + search: + nullable: true + title: Search + type: string + owner_filter: + default: all + enum: + - all + - user + - system + title: Owner filter + type: string + filters: + $ref: '#/components/schemas/EvalListFilters' + sort_by: + default: updated_at + enum: + - name + - updated_at + - created_at + title: Sort by + type: string + sort_order: + default: desc + enum: + - asc + - desc + title: Sort order + type: string + type: object + EvalTemplateListItem: + example: + owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + template_type: + minLength: 1 + title: Template type + type: string + eval_type: + minLength: 1 + title: Eval type + type: string + output_type: + minLength: 1 + title: Output type + type: string + owner: + minLength: 1 + title: Owner + type: string + created_by_name: + minLength: 1 + title: Created by name + type: string + version_count: + title: Version count + type: integer + current_version: + minLength: 1 + title: Current version + type: string + last_updated: + minLength: 1 + title: Last updated + type: string + thirty_day_chart: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + thirty_day_error_rate: + items: + $ref: '#/components/schemas/EvalTemplateChartPoint' + type: array + thirty_day_run_count: + title: Thirty day run count + type: integer + tags: + items: + minLength: 1 + type: string + type: array + required: + - created_by_name + - current_version + - eval_type + - id + - last_updated + - name + - output_type + - owner + - tags + - template_type + - thirty_day_chart + - thirty_day_error_rate + - thirty_day_run_count + - version_count + type: object + EvalTemplateListResponseResult: + example: + total: 1 + page: 5 + items: + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + page_size: 5 + properties: + items: + items: + $ref: '#/components/schemas/EvalTemplateListItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + page_size: + title: Page size + type: integer + required: + - items + - page + - page_size + - total + type: object + EvalTemplateListResponse: + example: + result: + total: 1 + page: 5 + items: + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + - owner: owner + last_updated: last_updated + output_type: output_type + current_version: current_version + created_by_name: created_by_name + tags: + - tags + - tags + thirty_day_run_count: 6 + thirty_day_error_rate: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + name: name + template_type: template_type + thirty_day_chart: + - value: 0.8008281904610115 + timestamp: timestamp + - value: 0.8008281904610115 + timestamp: timestamp + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 0 + eval_type: eval_type + page_size: 5 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateListResponseResult' + required: + - result + - status + type: object + CompositeEvalDetailResponseResult: + example: + composite_child_axis: composite_child_axis + updated_at: updated_at + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + description: description + created_at: created_at + template_type: template_type + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + tags: + - tags + - tags + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + template_type: + minLength: 1 + title: Template type + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + minLength: 1 + title: Aggregation function + type: string + composite_child_axis: + title: Composite child axis + type: string + children: + items: + $ref: '#/components/schemas/CompositeChildItem' + type: array + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + type: array + created_at: + title: Created at + type: string + updated_at: + title: Updated at + type: string + version_number: + nullable: true + title: Version number + type: integer + required: + - aggregation_enabled + - aggregation_function + - children + - id + - name + type: object + CompositeEvalDetailResponse: + example: + result: + composite_child_axis: composite_child_axis + updated_at: updated_at + children: + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - pinned_version_number: 6 + child_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required_keys: + - required_keys + - required_keys + weight: 1.4658129805029452 + child_name: child_name + eval_type: eval_type + order: 0 + pinned_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + aggregation_function: aggregation_function + description: description + created_at: created_at + template_type: template_type + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + aggregation_enabled: true + tags: + - tags + - tags + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/CompositeEvalDetailResponseResult' + required: + - result + - status + type: object + CompositeEvalUpdateRequest: + example: + composite_child_axis: "" + name: name + description: description + aggregation_function: weighted_avg + child_weights: + key: "" + child_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + tags: + - tags + - tags + aggregation_enabled: true + properties: + name: + maxLength: 255 + minLength: 1 + nullable: true + title: Name + type: string + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + nullable: true + type: array + aggregation_enabled: + nullable: true + title: Aggregation enabled + type: boolean + aggregation_function: + enum: + - weighted_avg + - avg + - min + - max + - pass_rate + nullable: true + title: Aggregation function + type: string + child_template_ids: + items: + format: uuid + type: string + nullable: true + type: array + child_weights: + additionalProperties: true + title: Child weights + type: object + composite_child_axis: + enum: + - "" + - pass_fail + - percentage + - choices + - code + nullable: true + title: Composite child axis + type: string + type: object + CompositeEvalExecuteRequest: + example: + mapping: + key: "" + error_localizer: false + call_context: + key: "" + input_data_types: + key: "" + span_context: + key: "" + session_context: + key: "" + model: model + trace_context: + key: "" + row_context: + key: "" + config: + key: "" + properties: + mapping: + additionalProperties: true + title: Mapping + type: object + model: + nullable: true + title: Model + type: string + config: + additionalProperties: true + title: Config + type: object + error_localizer: + default: false + title: Error localizer + type: boolean + input_data_types: + additionalProperties: true + title: Input data types + type: object + span_context: + additionalProperties: true + title: Span context + type: object + trace_context: + additionalProperties: true + title: Trace context + type: object + session_context: + additionalProperties: true + title: Session context + type: object + call_context: + additionalProperties: true + title: Call context + type: object + row_context: + additionalProperties: true + title: Row context + type: object + required: + - mapping + type: object + EvalTemplateDetailResponseResult: + example: + instructions: instructions + code: code + check_internet: true + description: description + created_at: created_at + created_by_name: created_by_name + aggregation_enabled: true + code_language: code_language + updated_at: updated_at + template_type: template_type + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 6 + owner: owner + composite_child_axis: composite_child_axis + output_type: output_type + required_keys: + - required_keys + - required_keys + pass_threshold: 0.8008281904610115 + multi_choice: true + current_version: current_version + aggregation_function: aggregation_function + tags: + - tags + - tags + name: name + template_format: template_format + choices: + key: "" + error_localizer_enabled: true + config: + key: "" + eval_type: eval_type + choice_scores: + key: "" + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + template_type: + minLength: 1 + title: Template type + type: string + eval_type: + minLength: 1 + title: Eval type + type: string + instructions: + nullable: true + title: Instructions + type: string + model: + nullable: true + title: Model + type: string + output_type: + minLength: 1 + title: Output type + type: string + pass_threshold: + title: Pass threshold + type: number + choice_scores: + additionalProperties: true + title: Choice scores + type: object + choices: + additionalProperties: true + title: Choices + type: object + multi_choice: + title: Multi choice + type: boolean + code: + nullable: true + title: Code + type: string + code_language: + nullable: true + title: Code language + type: string + required_keys: + items: + minLength: 1 + type: string + type: array + owner: + minLength: 1 + title: Owner + type: string + created_by_name: + minLength: 1 + title: Created by name + type: string + version_count: + title: Version count + type: integer + current_version: + minLength: 1 + title: Current version + type: string + tags: + items: + minLength: 1 + type: string + type: array + check_internet: + title: Check internet + type: boolean + error_localizer_enabled: + title: Error localizer enabled + type: boolean + template_format: + minLength: 1 + title: Template format + type: string + aggregation_enabled: + title: Aggregation enabled + type: boolean + aggregation_function: + minLength: 1 + title: Aggregation function + type: string + composite_child_axis: + title: Composite child axis + type: string + config: + additionalProperties: true + title: Config + type: object + created_at: + minLength: 1 + title: Created at + type: string + updated_at: + minLength: 1 + title: Updated at + type: string + required: + - aggregation_enabled + - aggregation_function + - check_internet + - created_at + - created_by_name + - current_version + - error_localizer_enabled + - eval_type + - id + - multi_choice + - name + - output_type + - owner + - pass_threshold + - required_keys + - tags + - template_format + - template_type + - updated_at + - version_count + type: object + EvalTemplateDetailResponse: + example: + result: + instructions: instructions + code: code + check_internet: true + description: description + created_at: created_at + created_by_name: created_by_name + aggregation_enabled: true + code_language: code_language + updated_at: updated_at + template_type: template_type + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version_count: 6 + owner: owner + composite_child_axis: composite_child_axis + output_type: output_type + required_keys: + - required_keys + - required_keys + pass_threshold: 0.8008281904610115 + multi_choice: true + current_version: current_version + aggregation_function: aggregation_function + tags: + - tags + - tags + name: name + template_format: template_format + choices: + key: "" + error_localizer_enabled: true + config: + key: "" + eval_type: eval_type + choice_scores: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateDetailResponseResult' + required: + - result + - status + type: object + EvalFeedbackListItem: + example: + action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + properties: + id: + format: uuid + title: Id + type: string + value: + title: Value + type: string + explanation: + title: Explanation + type: string + source: + title: Source + type: string + source_id: + title: Source id + type: string + action_type: + title: Action type + type: string + user_name: + title: User name + type: string + created_at: + minLength: 1 + title: Created at + type: string + required: + - action_type + - created_at + - explanation + - id + - source + - source_id + - user_name + - value + type: object + EvalFeedbackListResponseResult: + example: + total: 0 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + page: 6 + items: + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + page_size: 1 + properties: + template_id: + format: uuid + title: Template id + type: string + items: + items: + $ref: '#/components/schemas/EvalFeedbackListItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + page_size: + title: Page size + type: integer + required: + - items + - page + - page_size + - template_id + - total + type: object + EvalFeedbackListResponse: + example: + result: + total: 0 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + page: 6 + items: + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + - action_type: action_type + user_name: user_name + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + source_id: source_id + explanation: explanation + value: value + page_size: 1 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalFeedbackListResponseResult' + required: + - result + - status + type: object + GroundTruthConfig: + example: + mode: mode + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 6.027456183070403 + injection_format: injection_format + enabled: true + max_examples: 0 + properties: + enabled: + title: Enabled + type: boolean + ground_truth_id: + format: uuid + nullable: true + title: Ground truth id + type: string + mode: + minLength: 1 + title: Mode + type: string + max_examples: + title: Max examples + type: integer + similarity_threshold: + title: Similarity threshold + type: number + injection_format: + minLength: 1 + title: Injection format + type: string + type: object + GroundTruthConfigResponseResult: + example: + ground_truth: + mode: mode + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 6.027456183070403 + injection_format: injection_format + enabled: true + max_examples: 0 + properties: + ground_truth: + $ref: '#/components/schemas/GroundTruthConfig' + required: + - ground_truth + type: object + GroundTruthConfigResponse: + example: + result: + ground_truth: + mode: mode + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 6.027456183070403 + injection_format: injection_format + enabled: true + max_examples: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/GroundTruthConfigResponseResult' + required: + - result + - status + type: object + GroundTruthConfigRequest: + example: + mode: auto + ground_truth_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + similarity_threshold: 0.6027456183070403 + injection_format: structured + enabled: true + max_examples: 1 + properties: + enabled: + default: true + title: Enabled + type: boolean + ground_truth_id: + format: uuid + nullable: true + title: Ground truth id + type: string + mode: + default: auto + enum: + - auto + - manual + - disabled + title: Mode + type: string + max_examples: + maximum: 10 + minimum: 1 + title: Max examples + type: integer + similarity_threshold: + maximum: 1 + minimum: 0 + title: Similarity threshold + type: number + injection_format: + default: structured + enum: + - structured + - conversational + - xml + title: Injection format + type: string + type: object + GroundTruthItem: + example: + storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + file_name: + title: File name + type: string + columns: + items: + minLength: 1 + type: string + type: array + row_count: + title: Row count + type: integer + variable_mapping: + additionalProperties: true + title: Variable mapping + type: object + role_mapping: + additionalProperties: true + title: Role mapping + type: object + embedding_status: + minLength: 1 + title: Embedding status + type: string + embedded_row_count: + title: Embedded row count + type: integer + storage_type: + minLength: 1 + title: Storage type + type: string + created_at: + title: Created at + type: string + required: + - columns + - id + - name + - row_count + type: object + GroundTruthListResponseResult: + example: + total: 1 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + items: + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + properties: + template_id: + format: uuid + title: Template id + type: string + items: + items: + $ref: '#/components/schemas/GroundTruthItem' + type: array + total: + title: Total + type: integer + required: + - items + - template_id + - total + type: object + GroundTruthListResponse: + example: + result: + total: 1 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + items: + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + - storage_type: storage_type + embedding_status: embedding_status + file_name: file_name + columns: + - columns + - columns + name: name + embedded_row_count: 6 + description: description + role_mapping: + key: "" + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + variable_mapping: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/GroundTruthListResponseResult' + required: + - result + - status + type: object + GroundTruthUploadRequest: + example: + file: https://openapi-generator.tech + data: + - key: "" + - key: "" + file_name: "" + columns: + - columns + - columns + name: name + description: "" + role_mapping: + key: "" + variable_mapping: + key: "" + properties: + file: + format: uri + readOnly: true + title: File + type: string + name: + maxLength: 255 + title: Name + type: string + description: + default: "" + title: Description + type: string + file_name: + default: "" + title: File name + type: string + columns: + items: + minLength: 1 + type: string + type: array + data: + items: + additionalProperties: true + type: object + type: array + variable_mapping: + additionalProperties: true + title: Variable mapping + type: object + role_mapping: + additionalProperties: true + title: Role mapping + type: object + type: object + GroundTruthUploadResponseResult: + example: + embedding_status: embedding_status + columns: + - columns + - columns + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + row_count: + title: Row count + type: integer + columns: + items: + minLength: 1 + type: string + type: array + embedding_status: + minLength: 1 + title: Embedding status + type: string + required: + - columns + - embedding_status + - id + - name + - row_count + type: object + GroundTruthUploadResponse: + example: + result: + embedding_status: embedding_status + columns: + - columns + - columns + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/GroundTruthUploadResponseResult' + required: + - result + - status + type: object + EvalTemplateUpdateV2Request: + example: + summary: + key: "" + instructions: instructions + code: code + output_type: pass_fail + check_internet: true + few_shot_examples: + - key: "" + - key: "" + pass_threshold: 0.08008281904610115 + multi_choice: true + description: description + tools: + key: "" + tags: + - tags + - tags + mode: auto + knowledge_bases: + - knowledge_bases + - knowledge_bases + code_language: python + publish: true + name: name + data_injection: + key: "" + messages: + - key: "" + - key: "" + model: model + template_format: mustache + error_localizer_enabled: true + eval_type: llm + choice_scores: + key: "" + properties: + name: + maxLength: 255 + minLength: 1 + nullable: true + title: Name + type: string + eval_type: + enum: + - llm + - code + - agent + nullable: true + title: Eval type + type: string + instructions: + minLength: 1 + nullable: true + title: Instructions + type: string + model: + minLength: 1 + nullable: true + title: Model + type: string + output_type: + enum: + - pass_fail + - percentage + - deterministic + nullable: true + title: Output type + type: string + pass_threshold: + maximum: 1 + minimum: 0 + nullable: true + title: Pass threshold + type: number + choice_scores: + additionalProperties: true + title: Choice scores + type: object + multi_choice: + nullable: true + title: Multi choice + type: boolean + description: + nullable: true + title: Description + type: string + tags: + items: + minLength: 1 + type: string + nullable: true + type: array + check_internet: + nullable: true + title: Check internet + type: boolean + code: + nullable: true + title: Code + type: string + code_language: + enum: + - python + - javascript + nullable: true + title: Code language + type: string + messages: + items: + additionalProperties: true + type: object + nullable: true + type: array + few_shot_examples: + items: + additionalProperties: true + type: object + nullable: true + type: array + mode: + enum: + - auto + - agent + - quick + nullable: true + title: Mode + type: string + tools: + additionalProperties: true + title: Tools + type: object + knowledge_bases: + items: + minLength: 1 + type: string + nullable: true + type: array + data_injection: + additionalProperties: true + title: Data injection + type: object + summary: + additionalProperties: true + title: Summary + type: object + error_localizer_enabled: + nullable: true + title: Error localizer enabled + type: boolean + publish: + nullable: true + title: Publish + type: boolean + template_format: + enum: + - mustache + - jinja + nullable: true + title: Template format + type: string + type: object + EvalTemplateUpdateResponseResult: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated: true + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + updated: + title: Updated + type: boolean + required: + - id + - name + - updated + type: object + EvalTemplateUpdateResponse: + example: + result: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateUpdateResponseResult' + required: + - result + - status + type: object + EvalUsageStats: + example: + total_runs: 0 + runs_period: 6 + pass_rate: 5.637376656633329 + success_count: 1 + error_count: 5 + properties: + total_runs: + title: Total runs + type: integer + runs_period: + title: Runs period + type: integer + success_count: + title: Success count + type: integer + error_count: + title: Error count + type: integer + pass_rate: + title: Pass rate + type: number + required: + - error_count + - pass_rate + - runs_period + - success_count + - total_runs + type: object + EvalUsageChartPoint: + example: + calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + properties: + timestamp: + minLength: 1 + title: Timestamp + type: string + calls: + title: Calls + type: integer + avg_latency_ms: + title: Avg latency ms + type: integer + avg_score: + nullable: true + title: Avg score + type: number + pass_count: + title: Pass count + type: integer + fail_count: + title: Fail count + type: integer + required: + - timestamp + type: object + EvalUsageFeedback: + example: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + properties: + id: + format: uuid + title: Id + type: string + value: + additionalProperties: true + title: Value + type: object + explanation: + title: Explanation + type: string + action_type: + title: Action type + type: string + created_at: + title: Created at + type: string + user: + title: User + type: string + required: + - id + type: object + EvalUsageLogItem: + example: + result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + properties: + id: + format: uuid + title: Id + type: string + input: + title: Input + type: string + result: + title: Result + type: string + score: + nullable: true + title: Score + type: number + reason: + title: Reason + type: string + status: + minLength: 1 + title: Status + type: string + source: + title: Source + type: string + created_at: + minLength: 1 + title: Created at + type: string + detail: + additionalProperties: true + title: Detail + type: object + feedback: + $ref: '#/components/schemas/EvalUsageFeedback' + composite: + title: Composite + type: boolean + aggregate_pass: + nullable: true + title: Aggregate pass + type: boolean + required: + - created_at + - detail + - id + - input + - status + type: object + EvalUsageLogs: + example: + total: 7 + page: 1 + items: + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + page_size: 1 + properties: + items: + items: + $ref: '#/components/schemas/EvalUsageLogItem' + type: array + total: + title: Total + type: integer + page: + title: Page + type: integer + page_size: + title: Page size + type: integer + required: + - items + - page + - page_size + - total + type: object + EvalUsageStatsResponseResult: + example: + stats: + total_runs: 0 + runs_period: 6 + pass_rate: 5.637376656633329 + success_count: 1 + error_count: 5 + is_composite: true + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + chart: + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + logs: + total: 7 + page: 1 + items: + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + page_size: 1 + properties: + template_id: + format: uuid + title: Template id + type: string + is_composite: + title: Is composite + type: boolean + stats: + $ref: '#/components/schemas/EvalUsageStats' + chart: + items: + $ref: '#/components/schemas/EvalUsageChartPoint' + type: array + logs: + $ref: '#/components/schemas/EvalUsageLogs' + required: + - chart + - is_composite + - logs + - stats + - template_id + type: object + EvalUsageStatsResponse: + example: + result: + stats: + total_runs: 0 + runs_period: 6 + pass_rate: 5.637376656633329 + success_count: 1 + error_count: 5 + is_composite: true + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + chart: + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + - calls: 2 + pass_count: 3 + avg_latency_ms: 7 + timestamp: timestamp + avg_score: 9.301444243932576 + fail_count: 2 + logs: + total: 7 + page: 1 + items: + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + - result: result + feedback: + action_type: action_type + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + user: user + aggregate_pass: true + input: input + score: 4.145608029883936 + reason: reason + composite: true + created_at: created_at + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source: source + detail: + key: "" + status: status + page_size: 1 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalUsageStatsResponseResult' + required: + - result + - status + type: object + EvalTemplateVersionItem: + example: + config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + properties: + id: + format: uuid + title: Id + type: string + version_number: + title: Version number + type: integer + is_default: + title: Is default + type: boolean + criteria: + title: Criteria + type: string + model: + title: Model + type: string + config_snapshot: + additionalProperties: true + title: Config snapshot + type: object + created_by_name: + title: Created by name + type: string + created_at: + title: Created at + type: string + required: + - id + - is_default + - version_number + type: object + EvalTemplateVersionListResponseResult: + example: + total: 6 + versions: + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + template_id: + format: uuid + title: Template id + type: string + versions: + items: + $ref: '#/components/schemas/EvalTemplateVersionItem' + type: array + total: + title: Total + type: integer + required: + - template_id + - total + - versions + type: object + EvalTemplateVersionListResponse: + example: + result: + total: 6 + versions: + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + - config_snapshot: + key: "" + criteria: criteria + created_at: created_at + version_number: 0 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + created_by_name: created_by_name + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateVersionListResponseResult' + required: + - result + - status + type: object + EvalTemplateVersionCreateRequest: + example: + config_snapshot: + key: "" + criteria: criteria + model: model + properties: + criteria: + nullable: true + title: Criteria + type: string + model: + nullable: true + title: Model + type: string + config_snapshot: + additionalProperties: true + title: Config snapshot + type: object + type: object + EvalTemplateVersionResponseResult: + example: + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + properties: + id: + format: uuid + title: Id + type: string + version_number: + title: Version number + type: integer + is_default: + title: Is default + type: boolean + required: + - id + - is_default + - version_number + type: object + EvalTemplateVersionResponse: + example: + result: + version_number: 0 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateVersionResponseResult' + required: + - result + - status + type: object + EvalTemplateVersionRestoreResponseResult: + example: + version_number: 0 + restored_from: 6 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + properties: + id: + format: uuid + title: Id + type: string + version_number: + title: Version number + type: integer + is_default: + title: Is default + type: boolean + restored_from: + title: Restored from + type: integer + required: + - id + - is_default + - restored_from + - version_number + type: object + EvalTemplateVersionRestoreResponse: + example: + result: + version_number: 0 + restored_from: 6 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_default: true + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalTemplateVersionRestoreResponseResult' + required: + - result + - status + type: object + ExperimentStringResultResponse: + example: + result: result + status: true + properties: + status: + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + - status + type: object + ExperimentRerunRequest: + example: + use_temporal: true + max_concurrent_rows: 1 + experiment_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_ids: + items: + format: uuid + type: string + type: array + use_temporal: + default: true + title: Use temporal + type: boolean + max_concurrent_rows: + minimum: 1 + title: Max concurrent rows + type: integer + required: + - experiment_ids + type: object + PromptConfigEntry: + example: + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + nullable: true + title: Id + type: string + name: + title: Name + type: string + prompt_id: + format: uuid + nullable: true + title: Prompt id + type: string + prompt_version: + format: uuid + nullable: true + title: Prompt version + type: string + agent_id: + format: uuid + nullable: true + title: Agent id + type: string + agent_version: + format: uuid + nullable: true + title: Agent version + type: string + model: + additionalProperties: true + title: Model + type: object + model_params: + additionalProperties: + nullable: true + type: string + title: Model params + type: object + configuration: + additionalProperties: + nullable: true + type: string + title: Configuration + type: object + output_format: + default: string + minLength: 1 + title: Output format + type: string + messages: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + voice_input_column_id: + format: uuid + nullable: true + title: Voice input column id + type: string + type: object + EvalMetricEntry: + example: + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + id: + format: uuid + nullable: true + title: Id + type: string + template_id: + format: uuid + title: Template id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + config: + additionalProperties: true + title: Config + type: object + model: + default: "" + maxLength: 255 + title: Model + type: string + error_localizer: + default: false + title: Error localizer + type: boolean + kb_id: + format: uuid + nullable: true + title: Kb id + type: string + composite_weight_overrides: + additionalProperties: true + title: Composite weight overrides + type: object + required: + - config + - name + - template_id + type: object + ExperimentCreateV2: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + prompt_config: + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + experiment_type: llm + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + column_id: + format: uuid + nullable: true + title: Column id + type: string + experiment_type: + default: llm + enum: + - llm + - tts + - stt + - image + title: Experiment type + type: string + prompt_config: + items: + $ref: '#/components/schemas/PromptConfigEntry' + type: array + user_eval_metrics: + items: + $ref: '#/components/schemas/EvalMetricEntry' + type: array + required: + - dataset_id + - name + - prompt_config + - user_eval_metrics + type: object + ExperimentListV2: + example: + agents_count: agents_count + models_count: models_count + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_templates_count: eval_templates_count + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_type: llm + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + experiment_type: + description: "Determines how the experiment executes: llm, tts, stt, or\ + \ image." + enum: + - llm + - tts + - stt + - image + title: Experiment type + type: string + eval_templates_count: + readOnly: true + title: Eval templates count + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + models_count: + readOnly: true + title: Models count + type: string + agents_count: + readOnly: true + title: Agents count + type: string + dataset: + format: uuid + title: Dataset + type: string + required: + - dataset + - name + type: object + ExperimentNameSuggestionResult: + example: + suggested_name: suggested_name + properties: + suggested_name: + minLength: 1 + title: Suggested name + type: string + required: + - suggested_name + type: object + ExperimentNameSuggestionResponse: + example: + result: + suggested_name: suggested_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentNameSuggestionResult' + required: + - result + - status + type: object + ExperimentNameValidationResult: + example: + is_valid: true + message: message + properties: + is_valid: + title: Is valid + type: boolean + message: + title: Message + type: string + required: + - is_valid + type: object + ExperimentNameValidationResponse: + example: + result: + is_valid: true + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentNameValidationResult' + required: + - result + - status + type: object + ExperimentDetailV2: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + snapshot_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + prompt_configs: prompt_configs + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: user_eval_metrics + agent_configs: agent_configs + experiment_type: llm + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + dataset_id: + format: uuid + readOnly: true + title: Dataset id + type: string + column_id: + format: uuid + nullable: true + readOnly: true + title: Column id + type: string + experiment_type: + description: "Determines how the experiment executes: llm, tts, stt, or\ + \ image." + enum: + - llm + - tts + - stt + - image + title: Experiment type + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + snapshot_dataset_id: + format: uuid + nullable: true + readOnly: true + title: Snapshot dataset id + type: string + prompt_configs: + readOnly: true + title: Prompt configs + type: string + agent_configs: + readOnly: true + title: Agent configs + type: string + user_eval_metrics: + readOnly: true + title: User eval metrics + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - name + type: object + ExperimentV2DetailResponse: + example: + result: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + snapshot_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + prompt_configs: prompt_configs + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: user_eval_metrics + agent_configs: agent_configs + experiment_type: llm + status: NotStarted + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentDetailV2' + required: + - result + - status + type: object + ExperimentUpdateV2: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_config: + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + output_format: string + configuration: + key: configuration + voice_input_column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + messages: + - key: messages + - key: messages + model: + key: "" + model_params: + key: model_params + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metrics: + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + - error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + composite_weight_overrides: + key: "" + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + column_id: + format: uuid + nullable: true + title: Column id + type: string + prompt_config: + items: + $ref: '#/components/schemas/PromptConfigEntry' + type: array + user_eval_metrics: + items: + $ref: '#/components/schemas/EvalMetricEntry' + type: array + type: object + ExperimentComparisonWeightsRequest: + example: + eval_template_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + weights: + key: "" + properties: + eval_template_ids: + items: + format: uuid + type: string + type: array + weights: + additionalProperties: true + title: Weights + type: object + type: object + ExperimentComparisonColumnMetric: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + properties: + column_id: + format: uuid + title: Column id + type: string + column_name: + minLength: 1 + title: Column name + type: string + avg_completion_tokens: + title: Avg completion tokens + type: number + avg_total_tokens: + title: Avg total tokens + type: number + avg_response_time: + title: Avg response time + type: number + avg_score: + additionalProperties: true + title: Avg score + type: object + required: + - avg_completion_tokens + - avg_response_time + - avg_total_tokens + - column_id + - column_name + type: object + ExperimentComparisonDatasetMetric: + example: + total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + properties: + dataset_id: + format: uuid + title: Dataset id + type: string + avg_completion_tokens: + nullable: true + title: Avg completion tokens + type: number + avg_total_tokens: + nullable: true + title: Avg total tokens + type: number + avg_response_time: + nullable: true + title: Avg response time + type: number + avg_score: + nullable: true + title: Avg score + type: number + columns: + items: + $ref: '#/components/schemas/ExperimentComparisonColumnMetric' + type: array + normalized_scores: + additionalProperties: true + title: Normalized scores + type: object + overall_rating: + nullable: true + title: Overall rating + type: number + rank: + nullable: true + title: Rank + type: integer + rank_suffix: + title: Rank suffix + type: string + total_datasets: + title: Total datasets + type: integer + required: + - dataset_id + type: object + ExperimentDatasetComparisonResult: + example: + total_datasets: 0 + experiment_name: experiment_name + weights_applied: + key: "" + dataset_comparisons: + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + experiment_name: + minLength: 1 + title: Experiment name + type: string + total_datasets: + title: Total datasets + type: integer + weights_applied: + additionalProperties: true + title: Weights applied + type: object + dataset_comparisons: + items: + $ref: '#/components/schemas/ExperimentComparisonDatasetMetric' + type: array + required: + - dataset_comparisons + - experiment_id + - experiment_name + - total_datasets + type: object + ExperimentDatasetComparisonResponse: + example: + result: + total_datasets: 0 + experiment_name: experiment_name + weights_applied: + key: "" + dataset_comparisons: + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + - total_datasets: 4 + avg_total_tokens: 1.4658129805029452 + columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + avg_total_tokens: 7.061401241503109 + column_name: column_name + avg_completion_tokens: 2.3021358869347655 + avg_response_time: 9.301444243932576 + avg_score: + key: "" + normalized_scores: + key: "" + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 2 + rank_suffix: rank_suffix + overall_rating: 3.616076749251911 + avg_completion_tokens: 6.027456183070403 + avg_response_time: 5.962133916683182 + avg_score: 5.637376656633329 + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentDatasetComparisonResult' + required: + - result + - status + type: object + ExperimentComparisonRawMetrics: + example: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + properties: + avg_completion_tokens: + nullable: true + title: Avg completion tokens + type: number + avg_total_tokens: + nullable: true + title: Avg total tokens + type: number + avg_response_time: + nullable: true + title: Avg response time + type: number + avg_score: + nullable: true + title: Avg score + type: number + type: object + ExperimentComparisonNormalizedMetrics: + example: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + properties: + completion_tokens: + nullable: true + title: Completion tokens + type: number + total_tokens: + nullable: true + title: Total tokens + type: number + response_time: + nullable: true + title: Response time + type: number + score: + nullable: true + title: Score + type: number + type: object + ExperimentComparisonMetrics: + example: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + properties: + raw: + $ref: '#/components/schemas/ExperimentComparisonRawMetrics' + normalized: + $ref: '#/components/schemas/ExperimentComparisonNormalizedMetrics' + required: + - normalized + - raw + type: object + ExperimentComparisonWeights: + example: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + properties: + response_time: + nullable: true + title: Response time + type: number + scores: + additionalProperties: true + title: Scores + type: object + total_tokens: + nullable: true + title: Total tokens + type: number + completion_tokens: + nullable: true + title: Completion tokens + type: number + type: object + ExperimentComparisonDetail: + example: + scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + properties: + scores_weight: + additionalProperties: true + title: Scores weight + type: object + experiment_dataset_id: + format: uuid + nullable: true + title: Experiment dataset id + type: string + rank: + nullable: true + title: Rank + type: integer + rank_suffix: + title: Rank suffix + type: string + metrics: + $ref: '#/components/schemas/ExperimentComparisonMetrics' + weights: + $ref: '#/components/schemas/ExperimentComparisonWeights' + overall_rating: + nullable: true + title: Overall rating + type: number + required: + - metrics + - weights + type: object + ExperimentComparisonDetailsResult: + example: + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comparisons: + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + total_comparisons: 0 + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + total_comparisons: + title: Total comparisons + type: integer + comparisons: + items: + $ref: '#/components/schemas/ExperimentComparisonDetail' + type: array + required: + - comparisons + - experiment_id + - total_comparisons + type: object + ExperimentComparisonDetailsResponse: + example: + result: + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + comparisons: + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + - scores_weight: + key: "" + experiment_dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rank: 6 + rank_suffix: rank_suffix + metrics: + normalized: + score: 2.027123023002322 + completion_tokens: 7.061401241503109 + total_tokens: 9.301444243932576 + response_time: 3.616076749251911 + raw: + avg_total_tokens: 5.962133916683182 + avg_completion_tokens: 1.4658129805029452 + avg_response_time: 5.637376656633329 + avg_score: 2.3021358869347655 + overall_rating: 1.0246457001441578 + weights: + completion_tokens: 1.2315135367772556 + scores: + key: "" + total_tokens: 7.386281948385884 + response_time: 4.145608029883936 + total_comparisons: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentComparisonDetailsResult' + required: + - result + - status + type: object + ExperimentDerivedVariablesResult: + example: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + properties: + version: + title: Version + type: string + derived_variables: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Derived variables + type: object + type: object + ExperimentDerivedVariablesResponse: + example: + result: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentDerivedVariablesResult' + required: + - result + - status + type: object + ExperimentEvaluationTokenUsage: + example: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + properties: + avg_completion_tokens: + title: Avg completion tokens + type: number + avg_prompt_tokens: + title: Avg prompt tokens + type: number + avg_total_tokens: + title: Avg total tokens + type: number + total_tokens: + title: Total tokens + type: integer + required: + - avg_completion_tokens + - avg_prompt_tokens + - avg_total_tokens + - total_tokens + type: object + ExperimentEvaluationColumnStats: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + properties: + column_name: + minLength: 1 + title: Column name + type: string + column_id: + format: uuid + title: Column id + type: string + total_rows: + title: Total rows + type: integer + success_rate: + title: Success rate + type: number + avg_response_time: + title: Avg response time + type: number + token_usage: + $ref: '#/components/schemas/ExperimentEvaluationTokenUsage' + avg_score: + additionalProperties: true + title: Avg score + type: object + required: + - avg_response_time + - column_id + - column_name + - success_rate + - token_usage + - total_rows + type: object + ExperimentEvaluationStatsResult: + example: + evaluation_columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + evaluation_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_name: experiment_name + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evaluation_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + evaluation_name: evaluation_name + properties: + experiment_id: + format: uuid + title: Experiment id + type: string + experiment_name: + minLength: 1 + title: Experiment name + type: string + evaluation_id: + format: uuid + title: Evaluation id + type: string + evaluation_name: + minLength: 1 + title: Evaluation name + type: string + evaluation_template_id: + format: uuid + title: Evaluation template id + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + dataset_name: + minLength: 1 + title: Dataset name + type: string + evaluation_columns: + items: + $ref: '#/components/schemas/ExperimentEvaluationColumnStats' + type: array + required: + - dataset_id + - dataset_name + - evaluation_columns + - evaluation_id + - evaluation_name + - evaluation_template_id + - experiment_id + - experiment_name + type: object + ExperimentEvaluationStatsResponse: + example: + result: + evaluation_columns: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + token_usage: + avg_total_tokens: 2.3021358869347655 + total_tokens: 7 + avg_completion_tokens: 5.962133916683182 + avg_prompt_tokens: 5.637376656633329 + total_rows: 0 + column_name: column_name + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + avg_score: + key: "" + evaluation_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_name: experiment_name + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evaluation_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_name: dataset_name + evaluation_name: evaluation_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentEvaluationStatsResult' + required: + - result + - status + type: object + Feedback: + example: + custom_eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action_type: action_type + user_eval_metric: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + source: dataset + feedback_improvement: feedback_improvement + explanation: explanation + row_id: row_id + value: value + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + source_id: + maxLength: 255 + minLength: 1 + title: Source id + type: string + source: + enum: + - dataset + - prompt + - sdk + - trace + - experiment + - observe + - eval_playground + title: Source + type: string + user_eval_metric: + format: uuid + nullable: true + title: User eval metric + type: string + value: + minLength: 1 + title: Value + type: string + explanation: + nullable: true + title: Explanation + type: string + row_id: + maxLength: 255 + nullable: true + title: Row id + type: string + custom_eval_config_id: + format: uuid + nullable: true + title: Custom eval config id + type: string + feedback_improvement: + nullable: true + title: Feedback improvement + type: string + action_type: + maxLength: 255 + nullable: true + title: Action type + type: string + required: + - source + - source_id + - value + type: object + ExperimentFeedbackCreateResult: + example: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + required: + - id + type: object + ExperimentFeedbackCreateResponse: + example: + result: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackCreateResult' + required: + - result + - status + type: object + ExperimentFeedbackDetailItem: + example: + action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + properties: + id: + format: uuid + title: Id + type: string + value: + additionalProperties: true + title: Value + type: object + comment: + nullable: true + title: Comment + type: string + created_at: + format: date-time + title: Created at + type: string + action_type: + nullable: true + title: Action type + type: string + required: + - created_at + - id + type: object + ExperimentFeedbackDetailsResult: + example: + feedback: + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + total_count: 0 + properties: + feedback: + items: + $ref: '#/components/schemas/ExperimentFeedbackDetailItem' + type: array + total_count: + title: Total count + type: integer + required: + - feedback + - total_count + type: object + ExperimentFeedbackDetailsResponse: + example: + result: + feedback: + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + - action_type: action_type + created_at: 2000-01-23T04:56:07.000+00:00 + comment: comment + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value: + key: "" + total_count: 0 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackDetailsResult' + required: + - result + - status + type: object + ExperimentFeedbackTemplateResult: + example: + user_eval_name: user_eval_name + output_type: output_type + eval_description: eval_description + multi_choice: true + choices: + - choices + - choices + eval_name: eval_name + properties: + output_type: + minLength: 1 + nullable: true + title: Output type + type: string + eval_description: + nullable: true + title: Eval description + type: string + eval_name: + minLength: 1 + title: Eval name + type: string + user_eval_name: + minLength: 1 + title: User eval name + type: string + choices: + items: + type: string + type: array + multi_choice: + title: Multi choice + type: boolean + required: + - eval_name + - user_eval_name + type: object + ExperimentFeedbackTemplateResponse: + example: + result: + user_eval_name: user_eval_name + output_type: output_type + eval_description: eval_description + multi_choice: true + choices: + - choices + - choices + eval_name: eval_name + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackTemplateResult' + required: + - result + - status + type: object + ExperimentFeedbackSubmitRequest: + example: + user_eval_metric_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + action_type: retune + feedback_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + explanation: explanation + value: + key: "" + properties: + action_type: + enum: + - retune + - recalculate_row + - recalculate_dataset + - retune_recalculate + title: Action type + type: string + feedback_id: + format: uuid + title: Feedback id + type: string + user_eval_metric_id: + format: uuid + title: User eval metric id + type: string + value: + additionalProperties: true + title: Value + type: object + explanation: + title: Explanation + type: string + required: + - action_type + - feedback_id + - user_eval_metric_id + type: object + ExperimentFeedbackSubmitResult: + example: + user_eval_metric_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workflow_id: workflow_id + action_type: action_type + message: message + properties: + message: + minLength: 1 + title: Message + type: string + action_type: + minLength: 1 + title: Action type + type: string + user_eval_metric_id: + format: uuid + title: User eval metric id + type: string + workflow_id: + title: Workflow id + type: string + required: + - action_type + - message + - user_eval_metric_id + type: object + ExperimentFeedbackSubmitResponse: + example: + result: + user_eval_metric_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + workflow_id: workflow_id + action_type: action_type + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentFeedbackSubmitResult' + required: + - result + - status + type: object + ExperimentJsonSchemaResponse: + example: + result: + key: + max_array_count: 0 + keys: + - keys + - keys + max_images_count: 6 + name: name + sample: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + additionalProperties: + $ref: '#/components/schemas/JsonColumnSchemaEntry' + title: Result + type: object + required: + - result + - status + type: object + RerunCellEntry: + example: + column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + column_id: + format: uuid + title: Column id + type: string + row_id: + format: uuid + title: Row id + type: string + required: + - column_id + - row_id + type: object + ExperimentRerunCells: + example: + source_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + failed_only: false + cells: + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - column_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + row_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + user_eval_metric_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + source_ids: + items: + format: uuid + type: string + type: array + cells: + items: + $ref: '#/components/schemas/RerunCellEntry' + type: array + user_eval_metric_ids: + items: + format: uuid + type: string + type: array + failed_only: + default: false + title: Failed only + type: boolean + type: object + ExperimentWorkflowResult: + example: + workflow_id: workflow_id + message: message + properties: + message: + minLength: 1 + title: Message + type: string + workflow_id: + title: Workflow id + type: string + required: + - message + type: object + ExperimentWorkflowResponse: + example: + result: + workflow_id: workflow_id + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentWorkflowResult' + required: + - result + - status + type: object + ExperimentTableRowsColumnConfig: + example: + average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + origin_type: + title: Origin type + type: string + data_type: + title: Data type + type: string + status: + title: Status + type: string + group: + additionalProperties: true + title: Group + type: object + average_score: + additionalProperties: true + title: Average score + type: object + dataset_id: + title: Dataset id + type: string + choices_map: + additionalProperties: true + title: Choices map + type: object + is_base_column: + title: Is base column + type: boolean + output_type: + nullable: true + title: Output type + type: string + eval_template_id: + nullable: true + title: Eval template id + type: string + source_id: + title: Source id + type: string + is_agent: + title: Is agent + type: boolean + is_final: + title: Is final + type: boolean + required: + - id + - name + type: object + ExperimentTableRowsMetadata: + example: + total_rows: 0 + column: column + description: + key: description + total_pages: 6 + dataset_name: dataset_name + dataset: dataset + properties: + total_rows: + title: Total rows + type: integer + dataset: + title: Dataset + type: string + dataset_name: + title: Dataset name + type: string + column: + nullable: true + title: Column + type: string + total_pages: + title: Total pages + type: integer + description: + additionalProperties: + type: string + title: Description + type: object + type: object + ExperimentTableRowsResult: + example: + metadata: + total_rows: 0 + column: column + description: + key: description + total_pages: 6 + dataset_name: dataset_name + dataset: dataset + output_format: output_format + column_config: + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + table: + - key: "" + - key: "" + status: status + next_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + column_config: + items: + $ref: '#/components/schemas/ExperimentTableRowsColumnConfig' + type: array + table: + items: + additionalProperties: true + type: object + type: array + metadata: + $ref: '#/components/schemas/ExperimentTableRowsMetadata' + output_format: + title: Output format + type: string + status: + title: Status + type: string + next_row_ids: + items: + format: uuid + type: string + type: array + required: + - column_config + type: object + ExperimentTableRowsResponse: + example: + result: + metadata: + total_rows: 0 + column: column + description: + key: description + total_pages: 6 + dataset_name: dataset_name + dataset: dataset + output_format: output_format + column_config: + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + - average_score: + key: "" + output_type: output_type + dataset_id: dataset_id + is_base_column: true + origin_type: origin_type + is_final: true + name: name + data_type: data_type + id: id + eval_template_id: eval_template_id + source_id: source_id + is_agent: true + choices_map: + key: "" + status: status + group: + key: "" + table: + - key: "" + - key: "" + status: status + next_row_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentTableRowsResult' + required: + - result + - status + type: object + ExperimentStatsColumnConfig: + example: + reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + properties: + status: + title: Status + type: string + name: + minLength: 1 + title: Name + type: string + reverse_output: + title: Reverse output + type: boolean + output_type: + nullable: true + title: Output type + type: string + eval_template_id: + nullable: true + title: Eval template id + type: string + required: + - name + type: object + ExperimentStatsMetadata: + example: + is_winner_chosen: true + properties: + is_winner_chosen: + title: Is winner chosen + type: boolean + required: + - is_winner_chosen + type: object + ExperimentStatsResult: + example: + metadata: + is_winner_chosen: true + table_data: + - key: "" + - key: "" + column_config: + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + properties: + column_config: + items: + $ref: '#/components/schemas/ExperimentStatsColumnConfig' + type: array + table_data: + items: + additionalProperties: true + type: object + type: array + metadata: + $ref: '#/components/schemas/ExperimentStatsMetadata' + required: + - column_config + - metadata + - table_data + type: object + ExperimentStatsResponse: + example: + result: + metadata: + is_winner_chosen: true + table_data: + - key: "" + - key: "" + column_config: + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + - reverse_output: true + output_type: output_type + name: name + eval_template_id: eval_template_id + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentStatsResult' + required: + - result + - status + type: object + ExperimentStopWorkflowsCancelled: + example: + reruns: true + main: true + properties: + main: + title: Main + type: boolean + reruns: + title: Reruns + type: boolean + required: + - main + - reruns + type: object + ExperimentStopResult: + example: + workflows_cancelled: + reruns: true + main: true + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + experiment_id: + format: uuid + title: Experiment id + type: string + workflows_cancelled: + $ref: '#/components/schemas/ExperimentStopWorkflowsCancelled' + required: + - experiment_id + - message + - workflows_cancelled + type: object + ExperimentStopResponse: + example: + result: + workflows_cancelled: + reruns: true + main: true + experiment_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExperimentStopResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseSdkCodeResult: + example: + code: code + properties: + code: + minLength: 1 + title: Code + type: string + required: + - code + type: object + LegacyKnowledgeBaseSdkCodeResponse: + example: + result: + code: code + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseSdkCodeResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseMutationRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + files: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + name: + title: Name + type: string + kb_id: + format: uuid + title: Kb id + type: string + files: + items: + format: uuid + type: string + type: array + type: object + LegacyKnowledgeBaseCreateResult: + example: + kb_name: kb_name + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + file_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + detail: detail + properties: + detail: + minLength: 1 + title: Detail + type: string + kb_id: + format: uuid + title: Kb id + type: string + kb_name: + minLength: 1 + title: Kb name + type: string + file_ids: + items: + format: uuid + type: string + type: array + required: + - detail + - file_ids + - kb_id + - kb_name + type: object + LegacyKnowledgeBaseCreateResponse: + example: + result: + kb_name: kb_name + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + file_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + detail: detail + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseCreateResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseMutationResult: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + files: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_error: last_error + created_by: created_by + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + organization: + format: uuid + title: Organization + type: string + status: + minLength: 1 + title: Status + type: string + files: + items: + format: uuid + type: string + type: array + updated_at: + format: date-time + title: Updated at + type: string + created_by: + nullable: true + title: Created by + type: string + last_error: + nullable: true + title: Last error + type: string + required: + - created_by + - files + - id + - last_error + - name + - organization + - status + - updated_at + type: object + LegacyKnowledgeBaseMutationResponse: + example: + result: + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + files: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_error: last_error + created_by: created_by + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseMutationResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseFilesRequest: + example: + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + search: search + page_number: 0 + sort: + - key: "" + - key: "" + page_size: 6 + properties: + kb_id: + format: uuid + title: Kb id + type: string + search: + nullable: true + title: Search + type: string + sort: + items: + additionalProperties: true + type: object + type: array + page_number: + default: 0 + title: Page number + type: integer + page_size: + default: 10 + title: Page size + type: integer + required: + - kb_id + type: object + LegacyKnowledgeBaseFileRow: + example: + name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + file_size: + title: File size + type: integer + status: + minLength: 1 + title: Status + type: string + updated: + format: date-time + title: Updated + type: string + updated_by: + nullable: true + title: Updated by + type: string + error: + nullable: true + title: Error + type: string + required: + - file_size + - id + - name + - status + - updated + - updated_by + type: object + LegacyKnowledgeBaseFilesResult: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + table_data: + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + total_rows: 1 + status_count: 6 + status: status + properties: + table_data: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseFileRow' + type: array + last_updated: + format: date-time + title: Last updated + type: string + status: + minLength: 1 + title: Status + type: string + status_count: + title: Status count + type: integer + total_rows: + title: Total rows + type: integer + required: + - last_updated + - status + - status_count + - table_data + - total_rows + type: object + LegacyKnowledgeBaseFilesResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + table_data: + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + - name: name + updated_by: updated_by + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + updated: 2000-01-23T04:56:07.000+00:00 + file_size: 0 + status: status + total_rows: 1 + status_count: 6 + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseFilesResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseTableColumn: + example: + name: name + id: id + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + required: + - id + - name + type: object + LegacyKnowledgeBaseTableRow: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + files_uploaded: + title: Files uploaded + type: integer + status: + minLength: 1 + title: Status + type: string + error: + nullable: true + title: Error + type: string + updated_at: + format: date-time + title: Updated at + type: string + created_by: + nullable: true + title: Created by + type: string + required: + - created_by + - files_uploaded + - id + - name + - status + - updated_at + type: object + LegacyKnowledgeBaseTableResult: + example: + table_data: + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + total_rows: 6 + column_config: + - name: name + id: id + - name: name + id: id + properties: + column_config: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableColumn' + type: array + table_data: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableRow' + type: array + total_rows: + title: Total rows + type: integer + type: object + LegacyKnowledgeBaseTableResponse: + example: + result: + table_data: + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + - updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + files_uploaded: 0 + error: error + created_by: created_by + status: status + total_rows: 6 + column_config: + - name: name + id: id + - name: name + id: id + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseTableResult' + required: + - result + - status + type: object + LegacyKnowledgeBaseOption: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + required: + - id + - name + type: object + LegacyKnowledgeBaseListResult: + example: + table_data: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + table_data: + items: + $ref: '#/components/schemas/LegacyKnowledgeBaseOption' + type: array + required: + - table_data + type: object + LegacyKnowledgeBaseListResponse: + example: + result: + table_data: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/LegacyKnowledgeBaseListResult' + required: + - result + - status + type: object + PromptHistoryExecution: + example: + metadata: + key: "" + template_version: template_version + original_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + placeholders: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + evaluation_results: + key: "" + commit_message: commit_message + is_default: true + labels: labels + output: + key: "" + prompt_config_snapshot: prompt_config_snapshot + evaluation_configs: + key: "" + template_name: template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_draft: true + prompt_base_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + variable_names: variable_names + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + template_version: + maxLength: 50 + minLength: 1 + title: Template version + type: string + output: + additionalProperties: true + readOnly: true + title: Output + type: object + prompt_config_snapshot: + readOnly: true + title: Prompt config snapshot + type: string + template_name: + readOnly: true + title: Template name + type: string + original_template: + format: uuid + nullable: true + title: Original template + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + variable_names: + readOnly: true + title: Variable names + type: string + evaluation_results: + additionalProperties: true + title: Evaluation results + type: object + evaluation_configs: + additionalProperties: true + title: Evaluation configs + type: object + created_at: + format: date-time + readOnly: true + title: Created at + type: string + is_default: + title: Is default + type: boolean + commit_message: + nullable: true + title: Commit message + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + is_draft: + title: Is draft + type: boolean + labels: + readOnly: true + title: Labels + type: string + placeholders: + additionalProperties: true + title: Placeholders + type: object + prompt_base_template: + format: uuid + nullable: true + title: Prompt base template + type: string + required: + - template_version + type: object + PromptLabel: + example: + metadata: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: system + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + type: + enum: + - system + - custom + title: Type + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + required: + - name + - type + type: object + ModelHubTextErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + PromptTemplate: + example: + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + placeholders: + key: "" + description: description + variable_names: + key: "" + prompt_folder: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 2000 + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + variable_names: + additionalProperties: true + title: Variable names + type: object + organization: + format: uuid + nullable: true + title: Organization + type: string + prompt_folder: + format: uuid + nullable: true + title: Prompt folder + type: string + placeholders: + additionalProperties: true + title: Placeholders + type: object + created_by: + format: uuid + nullable: true + title: Created by + type: string + required: + - name + type: object + DerivedVariablePreviewRequest: + example: + column_name: output + content: + key: "" + properties: + content: + additionalProperties: true + title: Content + type: object + column_name: + default: output + minLength: 1 + title: Column name + type: string + required: + - content + type: object + DerivedVariableDetailResponse: + example: + result: + schema: + key: "" + full_variables: + - full_variables + - full_variables + raw_sample: + key: "" + is_json: true + paths: + - paths + - paths + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/DerivedVariableDetail' + required: + - result + - status + type: object + PromptDerivedVariablesResult: + example: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + properties: + version: + minLength: 1 + title: Version + type: string + derived_variables: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Derived variables + type: object + required: + - derived_variables + - version + type: object + PromptDerivedVariablesResponse: + example: + result: + version: version + derived_variables: + key: + - derived_variables + - derived_variables + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/PromptDerivedVariablesResult' + required: + - result + - status + type: object + DerivedVariableExtractRequest: + example: + column_name: output + output_index: 0 + version: version + response_format_type: response_format_type + properties: + version: + minLength: 1 + title: Version + type: string + column_name: + default: output + minLength: 1 + title: Column name + type: string + output_index: + default: 0 + title: Output index + type: integer + response_format_type: + title: Response format type + type: string + required: + - version + type: object + CreateScore: + example: + notes: "" + source_type: dataset_row + queue_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + properties: + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + default: "" + title: Notes + type: string + score_source: + default: human + enum: + - human + - api + - auto + - imported + title: Score source + type: string + queue_item_id: + format: uuid + nullable: true + title: Queue item id + type: string + required: + - label_id + - source_id + - source_type + - value + type: object + ScoreResponse: + example: + result: + notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/Score' + required: + - result + type: object + BulkCreateScoreItem: + example: + notes: "" + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + properties: + label_id: + format: uuid + title: Label id + type: string + value: + additionalProperties: true + title: Value + type: object + notes: + default: "" + title: Notes + type: string + score_source: + default: human + enum: + - human + - api + - auto + - imported + title: Score source + type: string + required: + - label_id + - value + type: object + BulkCreateScores: + example: + span_notes: span_notes + span_notes_source_id: span_notes_source_id + notes: "" + scores: + - notes: "" + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + - notes: "" + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + source_type: dataset_row + queue_item_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + properties: + source_type: + enum: + - dataset_row + - trace + - observation_span + - prototype_run + - call_execution + - trace_session + title: Source type + type: string + source_id: + minLength: 1 + title: Source id + type: string + scores: + items: + $ref: '#/components/schemas/BulkCreateScoreItem' + type: array + notes: + default: "" + title: Notes + type: string + span_notes: + nullable: true + title: Span notes + type: string + span_notes_source_id: + nullable: true + title: Span notes source id + type: string + queue_item_id: + format: uuid + nullable: true + title: Queue item id + type: string + required: + - scores + - source_id + - source_type + type: object + BulkCreateScoresResult: + example: + scores: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + errors: + - errors + - errors + properties: + scores: + items: + $ref: '#/components/schemas/Score' + type: array + errors: + items: + minLength: 1 + type: string + type: array + required: + - errors + - scores + type: object + BulkCreateScoresResponse: + example: + result: + scores: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + errors: + - errors + - errors + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/BulkCreateScoresResult' + required: + - result + type: object + ScoreForSourceResponse: + example: + result: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + span_notes: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/Score' + type: array + span_notes: + items: + additionalProperties: true + type: object + type: array + required: + - result + type: object + ScoreDeleteResponse: + example: + result: + key: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + additionalProperties: + type: boolean + title: Result + type: object + required: + - result + type: object + ConfigureEvaluations: + example: + model_name: model_name + eval_templates: eval_templates + inputs: + key: inputs + config: + key: config + properties: + eval_templates: + minLength: 1 + title: Eval templates + type: string + inputs: + additionalProperties: + nullable: true + type: string + title: Inputs + type: object + model_name: + nullable: true + title: Model name + type: string + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + required: + - eval_templates + - inputs + type: object + SDKConfigureEvaluationsRequest: + additionalProperties: + additionalProperties: true + description: Provider-specific credential fields accepted at top level. + type: object + example: + eval_config: + model_name: model_name + eval_templates: eval_templates + inputs: + key: inputs + config: + key: config + custom_eval_name: custom_eval_name + platform: platform + properties: + eval_config: + $ref: '#/components/schemas/ConfigureEvaluations' + platform: + minLength: 1 + title: Platform + type: string + custom_eval_name: + nullable: true + title: Custom eval name + type: string + required: + - eval_config + - platform + type: object + SDKMessageResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + SDKConfigureEvaluationsResponse: + example: + result: + message: message + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKMessageResult' + required: + - result + - status + type: object + SDKErrorResponse: + example: + result: result + message: message + errors: + key: + - errors + - errors + status: true + properties: + status: + title: Status + type: boolean + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + errors: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Errors + type: object + required: + - status + type: object + SDKStandaloneEvalInput: + additionalProperties: + additionalProperties: true + type: object + example: + input: input + max_tokens: 1 + properties: + input: + title: Input + type: string + max_tokens: + minimum: 1 + title: Max tokens + type: integer + type: object + SDKStandaloneEvalRequest: + example: + protect_flash: false + inputs: + - input: input + max_tokens: 1 + - input: input + max_tokens: 1 + config: + key: config + properties: + inputs: + items: + $ref: '#/components/schemas/SDKStandaloneEvalInput' + type: array + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + protect_flash: + default: false + title: Protect flash + type: boolean + required: + - config + - inputs + type: object + SDKStandaloneEvalResultItem: + example: + evaluations: + - key: "" + - key: "" + properties: + evaluations: + items: + additionalProperties: true + type: object + type: array + required: + - evaluations + type: object + SDKStandaloneEvalResponse: + example: + result: + - evaluations: + - key: "" + - key: "" + - evaluations: + - key: "" + - key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/SDKStandaloneEvalResultItem' + type: array + required: + - result + - status + type: object + SDKEvalTemplate: + example: + owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + properties: + id: + minLength: 1 + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + description: + nullable: true + title: Description + type: string + organization: + nullable: true + title: Organization + type: string + owner: + nullable: true + title: Owner + type: string + eval_tags: + additionalProperties: true + title: Eval tags + type: object + config: + additionalProperties: true + title: Config + type: object + eval_id: + nullable: true + title: Eval id + type: string + criteria: + additionalProperties: true + title: Criteria + type: object + choices: + additionalProperties: true + title: Choices + type: object + multi_choice: + nullable: true + title: Multi choice + type: boolean + required: + - description + - eval_id + - id + - name + - organization + - owner + type: object + SDKEvalTemplateResponse: + example: + result: + owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKEvalTemplate' + required: + - result + - status + type: object + SDKCICDEvaluationRunSummary: + example: + results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + properties: + id: + format: uuid + title: Id + type: string + project: + minLength: 1 + title: Project + type: string + version: + minLength: 1 + title: Version + type: string + results_summary: + additionalProperties: + nullable: true + type: string + title: Results summary + type: object + required: + - id + - project + - results_summary + - version + type: object + SDKCICDEvaluationRunsResult: + example: + evaluation_runs: + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + message: message + status: processing + properties: + message: + minLength: 1 + title: Message + type: string + status: + enum: + - processing + - completed + title: Status + type: string + evaluation_runs: + items: + $ref: '#/components/schemas/SDKCICDEvaluationRunSummary' + type: array + required: + - message + - status + type: object + SDKCICDEvaluationRunsResponse: + example: + result: + evaluation_runs: + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + - results_summary: + key: results_summary + project: project + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + version: version + message: message + status: processing + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKCICDEvaluationRunsResult' + required: + - result + - status + type: object + CICDEvaluationItem: + example: + model_name: model_name + inputs: + key: inputs + eval_template: eval_template + config: + key: config + properties: + eval_template: + minLength: 1 + title: Eval template + type: string + inputs: + additionalProperties: + nullable: true + type: string + title: Inputs + type: object + model_name: + nullable: true + title: Model name + type: string + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + required: + - eval_template + - inputs + type: object + CICDJob: + example: + eval_data: + - model_name: model_name + inputs: + key: inputs + eval_template: eval_template + config: + key: config + - model_name: model_name + inputs: + key: inputs + eval_template: eval_template + config: + key: config + project_name: project_name + version: version + properties: + project_name: + minLength: 1 + title: Project name + type: string + version: + minLength: 1 + title: Version + type: string + eval_data: + items: + $ref: '#/components/schemas/CICDEvaluationItem' + type: array + required: + - eval_data + - project_name + - version + type: object + SDKCICDEvaluationRunAccepted: + example: + evaluation_run_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + project_name: project_name + version: version + properties: + message: + minLength: 1 + title: Message + type: string + project_name: + minLength: 1 + title: Project name + type: string + version: + minLength: 1 + title: Version + type: string + evaluation_run_id: + format: uuid + title: Evaluation run id + type: string + required: + - evaluation_run_id + - message + - project_name + - version + type: object + SDKCICDEvaluationRunAcceptedResponse: + example: + result: + evaluation_run_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + project_name: project_name + version: version + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKCICDEvaluationRunAccepted' + required: + - result + - status + type: object + SDKGetEvalsResponse: + example: + result: + - owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + - owner: owner + eval_id: eval_id + criteria: + key: "" + organization: organization + name: name + multi_choice: true + description: description + id: id + choices: + key: "" + config: + key: "" + eval_tags: + key: "" + status: true + properties: + status: + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/SDKEvalTemplate' + type: array + required: + - result + - status + type: object + SDKStandaloneEvalV2Result: + example: + result: + key: "" + eval_status: eval_status + properties: + eval_status: + minLength: 1 + title: Eval status + type: string + result: + additionalProperties: true + title: Result + type: object + required: + - eval_status + - result + type: object + SDKStandaloneEvalV2Response: + example: + result: + result: + key: "" + eval_status: eval_status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKStandaloneEvalV2Result' + required: + - result + - status + type: object + SDKStandaloneEvalV2Request: + example: + error_localizer: false + span_id: span_id + inputs: + key: inputs + is_async: false + custom_eval_name: custom_eval_name + trace_eval: false + model: model + config: + key: config + eval_name: eval_name + properties: + eval_name: + minLength: 1 + title: Eval name + type: string + inputs: + additionalProperties: + nullable: true + type: string + title: Inputs + type: object + model: + nullable: true + title: Model + type: string + span_id: + nullable: true + title: Span id + type: string + custom_eval_name: + nullable: true + title: Custom eval name + type: string + trace_eval: + default: false + title: Trace eval + type: boolean + is_async: + default: false + title: Is async + type: boolean + error_localizer: + default: false + title: Error localizer + type: boolean + config: + additionalProperties: + nullable: true + type: string + title: Config + type: object + required: + - eval_name + - inputs + type: object + SDKSimulationAnalyticsResult: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_name: run_test_name + eval_averages: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + eval_explanation_summary: + key: "" + system_summary: + key: "" + message: message + eval_results: + - key: "" + - key: "" + status: status + properties: + execution_id: + format: uuid + title: Execution id + type: string + run_test_name: + minLength: 1 + title: Run test name + type: string + status: + minLength: 1 + title: Status + type: string + message: + minLength: 1 + title: Message + type: string + eval_results: + items: + additionalProperties: true + type: object + type: array + eval_averages: + additionalProperties: true + title: Eval averages + type: object + system_summary: + additionalProperties: true + title: System summary + type: object + eval_explanation_summary: + additionalProperties: true + title: Eval explanation summary + type: object + eval_explanation_summary_status: + nullable: true + title: Eval explanation summary status + type: string + required: + - eval_averages + - eval_results + - run_test_name + - system_summary + type: object + SDKSimulationAnalyticsResponse: + example: + result: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_name: run_test_name + eval_averages: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + eval_explanation_summary: + key: "" + system_summary: + key: "" + message: message + eval_results: + - key: "" + - key: "" + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKSimulationAnalyticsResult' + required: + - result + - status + type: object + ExecutionMetrics: + example: + completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + properties: + execution_id: + format: uuid + title: Execution id + type: string + status: + description: Current status of the test execution + enum: + - pending + - running + - completed + - failed + - cancelled + - cancelling + - evaluating + readOnly: true + title: Status + type: string + started_at: + description: When the test execution started + format: date-time + readOnly: true + title: Started at + type: string + completed_at: + description: When the test execution completed + format: date-time + nullable: true + readOnly: true + title: Completed at + type: string + total_calls: + description: Total number of calls to be made + readOnly: true + title: Total calls + type: integer + completed_calls: + description: Number of successfully completed calls + readOnly: true + title: Completed calls + type: integer + failed_calls: + description: Number of failed calls + readOnly: true + title: Failed calls + type: integer + metrics: + readOnly: true + title: Metrics + type: string + required: + - execution_id + type: object + SDKSimulationMetricsResult: + example: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + chat_metrics: + key: "" + latency: + key: "" + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: + key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + conversation: + key: "" + current_page: 2 + status: status + properties: + call_execution_id: + format: uuid + title: Call execution id + type: string + execution_id: + format: uuid + title: Execution id + type: string + status: + minLength: 1 + title: Status + type: string + duration_seconds: + nullable: true + title: Duration seconds + type: number + started_at: + format: date-time + nullable: true + title: Started at + type: string + completed_at: + format: date-time + nullable: true + title: Completed at + type: string + total_calls: + title: Total calls + type: integer + completed_calls: + title: Completed calls + type: integer + failed_calls: + title: Failed calls + type: integer + latency: + additionalProperties: true + title: Latency + type: object + cost: + additionalProperties: true + title: Cost + type: object + conversation: + additionalProperties: true + title: Conversation + type: object + chat_metrics: + additionalProperties: true + title: Chat metrics + type: object + metrics: + additionalProperties: true + title: Metrics + type: object + total_pages: + title: Total pages + type: integer + current_page: + title: Current page + type: integer + count: + title: Count + type: integer + results: + items: + $ref: '#/components/schemas/ExecutionMetrics' + type: array + type: object + SDKSimulationMetricsResponse: + example: + result: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + chat_metrics: + key: "" + latency: + key: "" + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: + key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + metrics: metrics + status: pending + conversation: + key: "" + current_page: 2 + status: status + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKSimulationMetricsResult' + required: + - result + - status + type: object + ExecutionRuns: + example: + completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + properties: + execution_id: + format: uuid + title: Execution id + type: string + status: + description: Current status of the test execution + enum: + - pending + - running + - completed + - failed + - cancelled + - cancelling + - evaluating + readOnly: true + title: Status + type: string + started_at: + description: When the test execution started + format: date-time + readOnly: true + title: Started at + type: string + completed_at: + description: When the test execution completed + format: date-time + nullable: true + readOnly: true + title: Completed at + type: string + total_calls: + description: Total number of calls to be made + readOnly: true + title: Total calls + type: integer + completed_calls: + description: Number of successfully completed calls + readOnly: true + title: Completed calls + type: integer + failed_calls: + description: Number of failed calls + readOnly: true + title: Failed calls + type: integer + eval_results: + readOnly: true + title: Eval results + type: string + required: + - execution_id + type: object + SDKSimulationRunsResult: + example: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + call_results: + key: "" + latency: + key: "" + scenario_name: scenario_name + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_summary: call_summary + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + eval_explanation_summary: + key: "" + started_at: 2000-01-23T04:56:07.000+00:00 + eval_outputs: + key: "" + eval_results: + - key: "" + - key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + current_page: 2 + status: status + ended_reason: ended_reason + properties: + call_execution_id: + format: uuid + title: Call execution id + type: string + execution_id: + format: uuid + title: Execution id + type: string + scenario_id: + format: uuid + title: Scenario id + type: string + scenario_name: + title: Scenario name + type: string + status: + minLength: 1 + title: Status + type: string + started_at: + format: date-time + nullable: true + title: Started at + type: string + completed_at: + format: date-time + nullable: true + title: Completed at + type: string + duration_seconds: + nullable: true + title: Duration seconds + type: number + ended_reason: + nullable: true + title: Ended reason + type: string + call_summary: + nullable: true + title: Call summary + type: string + total_calls: + title: Total calls + type: integer + completed_calls: + title: Completed calls + type: integer + failed_calls: + title: Failed calls + type: integer + eval_outputs: + additionalProperties: true + title: Eval outputs + type: object + eval_results: + items: + additionalProperties: true + type: object + type: array + latency: + additionalProperties: true + title: Latency + type: object + cost: + additionalProperties: true + title: Cost + type: object + call_results: + additionalProperties: true + title: Call results + type: object + eval_explanation_summary: + additionalProperties: true + title: Eval explanation summary + type: object + eval_explanation_summary_status: + nullable: true + title: Eval explanation summary status + type: string + total_pages: + title: Total pages + type: integer + current_page: + title: Current page + type: integer + count: + title: Count + type: integer + results: + items: + $ref: '#/components/schemas/ExecutionRuns' + type: array + type: object + SDKSimulationRunsResponse: + example: + result: + duration_seconds: 0.8008281904610115 + completed_calls: 1 + failed_calls: 5 + cost: + key: "" + eval_explanation_summary_status: eval_explanation_summary_status + call_results: + key: "" + latency: + key: "" + scenario_name: scenario_name + count: 7 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_pages: 5 + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_summary: call_summary + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 6 + eval_explanation_summary: + key: "" + started_at: 2000-01-23T04:56:07.000+00:00 + eval_outputs: + key: "" + eval_results: + - key: "" + - key: "" + results: + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + - completed_calls: 3 + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 9 + failed_calls: 2 + started_at: 2000-01-23T04:56:07.000+00:00 + eval_results: eval_results + status: pending + current_page: 2 + status: status + ended_reason: ended_reason + status: true + properties: + status: + title: Status + type: boolean + result: + $ref: '#/components/schemas/SDKSimulationRunsResult' + required: + - result + - status + type: object + AgentDefinitionListResponse: + example: + websocket_headers: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + languages: + - ar + - ar + inbound: true + latest_version_id: latest_version_id + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + contact_number: contact_number + agent_type: voice + updated_at: 2000-01-23T04:56:07.000+00:00 + latest_version: latest_version + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + agent_name: + description: Name of the AI agent + minLength: 1 + readOnly: true + title: Agent name + type: string + agent_type: + enum: + - voice + - text + readOnly: true + title: Agent type + type: string + contact_number: + description: Phone number associated with the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Contact number + type: string + inbound: + description: Whether the agent handles inbound calls + readOnly: true + title: Inbound + type: boolean + description: + description: Detailed description of the AI agent's purpose and capabilities + minLength: 1 + readOnly: true + title: Description + type: string + assistant_id: + description: External identifier for the assistant + minLength: 1 + nullable: true + readOnly: true + title: Assistant id + type: string + provider: + description: Provider of the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Provider + type: string + language: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + nullable: true + readOnly: true + title: Language + type: string + languages: + items: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + title: Languages + type: string + nullable: true + readOnly: true + type: array + websocket_url: + description: WebSocket URL for real-time communication with the agent + format: uri + minLength: 1 + nullable: true + readOnly: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + description: Headers to be sent to the websocket server + readOnly: true + title: Websocket headers + type: object + workspace: + format: uuid + nullable: true + readOnly: true + title: Workspace + type: string + knowledge_base: + format: uuid + nullable: true + readOnly: true + title: Knowledge base + type: string + organization: + description: Organization this agent definition belongs to + format: uuid + readOnly: true + title: Organization + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + latest_version: + readOnly: true + title: Latest version + type: string + latest_version_id: + readOnly: true + title: Latest version id + type: string + model_details: + additionalProperties: true + description: Details of the model + readOnly: true + title: Model details + type: object + model: + description: Model of the agent + minLength: 1 + nullable: true + readOnly: true + title: Model + type: string + type: object + ApiErrorWithDetailsResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + AgentDefinitionBulkDeleteRequest: + example: + agent_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + agent_ids: + description: List of agent definition UUIDs to delete. + items: + format: uuid + type: string + minItems: 1 + type: array + required: + - agent_ids + type: object + AgentDefinitionBulkDeleteResponse: + example: + versions_updated: 6 + message: message + agents_updated: 0 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agents_updated: + readOnly: true + title: Agents updated + type: integer + versions_updated: + readOnly: true + title: Versions updated + type: integer + type: object + AgentDefinitionCreateRequest: + example: + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: "" + language: language + commit_message: commit_message + model_details: + key: "" + authentication_method: api_key + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - languages + - languages + observability_enabled: false + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: 1 + api_key: api_key + replay_session_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_secret: livekit_api_secret + livekit_api_key: livekit_api_key + livekit_config_json: + key: "" + properties: + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_type: + description: "The type of agent. One of: voice, text." + enum: + - voice + - text + title: Agent type + type: string + commit_message: + minLength: 1 + title: Commit message + type: string + inbound: + default: true + title: Inbound + type: boolean + description: + default: "" + title: Description + type: string + provider: + nullable: true + title: Provider + type: string + api_key: + nullable: true + title: Api key + type: string + assistant_id: + nullable: true + title: Assistant id + type: string + authentication_method: + enum: + - api_key + nullable: true + title: Authentication method + type: string + language: + nullable: true + title: Language + type: string + languages: + items: + minLength: 1 + type: string + nullable: true + type: array + contact_number: + nullable: true + title: Contact number + type: string + knowledge_base: + format: uuid + nullable: true + title: Knowledge base + type: string + observability_enabled: + default: false + title: Observability enabled + type: boolean + model: + nullable: true + title: Model + type: string + model_details: + additionalProperties: true + title: Model details + type: object + websocket_url: + format: uri + nullable: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + title: Websocket headers + type: object + replay_session_id: + format: uuid + nullable: true + title: Replay session id + type: string + livekit_url: + maxLength: 500 + nullable: true + title: Livekit url + type: string + livekit_api_key: + nullable: true + title: Livekit api key + type: string + livekit_api_secret: + nullable: true + title: Livekit api secret + type: string + livekit_agent_name: + nullable: true + title: Livekit agent name + type: string + livekit_config_json: + additionalProperties: true + title: Livekit config json + type: object + livekit_max_concurrency: + minimum: 1 + nullable: true + title: Livekit max concurrency + type: integer + required: + - agent_name + - agent_type + - commit_message + type: object + AgentDefinitionResponse: + example: + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + authentication_method: api_key + updated_at: 2000-01-23T04:56:07.000+00:00 + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - ar + - ar + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: livekit_max_concurrency + api_key: api_key + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + observability_provider: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_key: livekit_api_key + livekit_config_json: livekit_config_json + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + agent_name: + description: Name of the AI agent + minLength: 1 + readOnly: true + title: Agent name + type: string + agent_type: + enum: + - voice + - text + readOnly: true + title: Agent type + type: string + contact_number: + description: Phone number associated with the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Contact number + type: string + inbound: + description: Whether the agent handles inbound calls + readOnly: true + title: Inbound + type: boolean + description: + description: Detailed description of the AI agent's purpose and capabilities + minLength: 1 + readOnly: true + title: Description + type: string + assistant_id: + description: External identifier for the assistant + minLength: 1 + nullable: true + readOnly: true + title: Assistant id + type: string + provider: + description: Provider of the AI agent + minLength: 1 + nullable: true + readOnly: true + title: Provider + type: string + language: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + nullable: true + readOnly: true + title: Language + type: string + languages: + items: + description: Language of the agent + enum: + - ar + - bg + - zh + - cs + - da + - nl + - en + - fi + - fr + - de + - el + - hi + - hu + - id + - it + - ja + - ko + - ms + - "no" + - pl + - pt + - ro + - ru + - sk + - es + - sv + - tr + - uk + - vi + title: Languages + type: string + nullable: true + readOnly: true + type: array + authentication_method: + enum: + - api_key + nullable: true + readOnly: true + title: Authentication method + type: string + websocket_url: + description: WebSocket URL for real-time communication with the agent + format: uri + minLength: 1 + nullable: true + readOnly: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + description: Headers to be sent to the websocket server + readOnly: true + title: Websocket headers + type: object + workspace: + format: uuid + nullable: true + readOnly: true + title: Workspace + type: string + knowledge_base: + format: uuid + nullable: true + readOnly: true + title: Knowledge base + type: string + organization: + description: Organization this agent definition belongs to + format: uuid + readOnly: true + title: Organization + type: string + api_key: + description: API key for the agent + minLength: 1 + nullable: true + readOnly: true + title: Api key + type: string + observability_provider: + format: uuid + nullable: true + readOnly: true + title: Observability provider + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + model: + description: Model of the agent + minLength: 1 + nullable: true + readOnly: true + title: Model + type: string + model_details: + additionalProperties: true + description: Details of the model + readOnly: true + title: Model details + type: object + livekit_url: + readOnly: true + title: Livekit url + type: string + livekit_api_key: + readOnly: true + title: Livekit api key + type: string + livekit_agent_name: + readOnly: true + title: Livekit agent name + type: string + livekit_config_json: + readOnly: true + title: Livekit config json + type: string + livekit_max_concurrency: + readOnly: true + title: Livekit max concurrency + type: string + type: object + AgentDefinitionCreateResponse: + example: + agent: + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + authentication_method: api_key + updated_at: 2000-01-23T04:56:07.000+00:00 + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - ar + - ar + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: livekit_max_concurrency + api_key: api_key + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + observability_provider: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_key: livekit_api_key + livekit_config_json: livekit_config_json + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agent: + $ref: '#/components/schemas/AgentDefinitionResponse' + type: object + AgentDefinitionDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + AgentDefinitionEditRequest: + example: + websocket_headers: + key: "" + assistant_id: assistant_id + agent_name: agent_name + languages: + - languages + - languages + inbound: true + description: description + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + language: language + model_details: + key: "" + contact_number: contact_number + agent_type: voice + authentication_method: api_key + livekit_max_concurrency: 1 + provider: provider + api_key: api_key + livekit_api_secret: livekit_api_secret + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + websocket_url: https://openapi-generator.tech + livekit_api_key: livekit_api_key + livekit_config_json: + key: "" + properties: + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_type: + enum: + - voice + - text + title: Agent type + type: string + description: + nullable: true + title: Description + type: string + provider: + nullable: true + title: Provider + type: string + api_key: + nullable: true + title: Api key + type: string + assistant_id: + nullable: true + title: Assistant id + type: string + authentication_method: + enum: + - api_key + nullable: true + title: Authentication method + type: string + language: + nullable: true + title: Language + type: string + languages: + items: + minLength: 1 + type: string + nullable: true + type: array + contact_number: + nullable: true + title: Contact number + type: string + inbound: + title: Inbound + type: boolean + knowledge_base: + format: uuid + nullable: true + title: Knowledge base + type: string + model: + nullable: true + title: Model + type: string + model_details: + additionalProperties: true + title: Model details + type: object + websocket_url: + format: uri + nullable: true + title: Websocket url + type: string + websocket_headers: + additionalProperties: true + title: Websocket headers + type: object + livekit_url: + maxLength: 500 + nullable: true + title: Livekit url + type: string + livekit_api_key: + nullable: true + title: Livekit api key + type: string + livekit_api_secret: + nullable: true + title: Livekit api secret + type: string + livekit_agent_name: + nullable: true + title: Livekit agent name + type: string + livekit_config_json: + additionalProperties: true + title: Livekit config json + type: object + livekit_max_concurrency: + minimum: 1 + nullable: true + title: Livekit max concurrency + type: integer + type: object + AgentDefinitionEditResponse: + example: + agent: + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assistant_id: assistant_id + agent_name: agent_name + inbound: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: ar + model_details: + key: "" + authentication_method: api_key + updated_at: 2000-01-23T04:56:07.000+00:00 + provider: provider + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + websocket_url: https://openapi-generator.tech + websocket_headers: + key: "" + languages: + - ar + - ar + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + contact_number: contact_number + agent_type: voice + livekit_max_concurrency: livekit_max_concurrency + api_key: api_key + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + observability_provider: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + livekit_api_key: livekit_api_key + livekit_config_json: livekit_config_json + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agent: + $ref: '#/components/schemas/AgentDefinitionResponse' + type: object + AgentVersionListResponse: + example: + status_display: status_display + is_active: is_active + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + score: score + pass_rate: pass_rate + version_name: version_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + version_number: + description: Version number of the agent + readOnly: true + title: Version number + type: integer + version_name: + description: "Human-readable version name (e.g., 'v1.2.3')" + minLength: 1 + nullable: true + readOnly: true + title: Version name + type: string + version_name_display: + readOnly: true + title: Version name display + type: string + status: + description: Current status of this version + enum: + - draft + - active + - archived + - deprecated + readOnly: true + title: Status + type: string + status_display: + minLength: 1 + readOnly: true + title: Status display + type: string + score: + description: Performance score (0.0 to 10.0) + format: decimal + nullable: true + readOnly: true + title: Score + type: string + test_count: + description: Number of tests run for this version + readOnly: true + title: Test count + type: integer + pass_rate: + description: Test pass rate percentage + format: decimal + nullable: true + readOnly: true + title: Pass rate + type: string + description: + description: Description of changes in this version + minLength: 1 + readOnly: true + title: Description + type: string + commit_message: + description: Commit message for the agent version + minLength: 1 + nullable: true + readOnly: true + title: Commit message + type: string + is_active: + readOnly: true + title: Is active + type: string + is_latest: + readOnly: true + title: Is latest + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + type: object + AgentVersionCreateRequest: + example: + assistant_id: assistant_id + agent_name: agent_name + languages: + - languages + - languages + inbound: true + observability_enabled: false + description: description + livekit_url: livekit_url + livekit_agent_name: livekit_agent_name + language: language + model_details: + key: "" + commit_message: "" + contact_number: contact_number + agent_type: voice + authentication_method: api_key + livekit_max_concurrency: 1 + provider: provider + api_key: api_key + livekit_api_secret: livekit_api_secret + knowledge_base: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + livekit_api_key: livekit_api_key + livekit_config_json: + key: "" + properties: + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_type: + enum: + - voice + - text + title: Agent type + type: string + description: + nullable: true + title: Description + type: string + provider: + nullable: true + title: Provider + type: string + api_key: + nullable: true + title: Api key + type: string + assistant_id: + nullable: true + title: Assistant id + type: string + authentication_method: + enum: + - api_key + nullable: true + title: Authentication method + type: string + language: + nullable: true + title: Language + type: string + languages: + items: + minLength: 1 + type: string + nullable: true + type: array + contact_number: + nullable: true + title: Contact number + type: string + inbound: + title: Inbound + type: boolean + knowledge_base: + format: uuid + nullable: true + title: Knowledge base + type: string + model: + nullable: true + title: Model + type: string + model_details: + additionalProperties: true + title: Model details + type: object + livekit_url: + maxLength: 500 + title: Livekit url + type: string + livekit_api_key: + maxLength: 255 + title: Livekit api key + type: string + livekit_api_secret: + maxLength: 500 + title: Livekit api secret + type: string + livekit_agent_name: + maxLength: 255 + title: Livekit agent name + type: string + livekit_config_json: + additionalProperties: true + title: Livekit config json + type: object + livekit_max_concurrency: + minimum: 1 + title: Livekit max concurrency + type: integer + commit_message: + default: "" + title: Commit message + type: string + observability_enabled: + default: false + title: Observability enabled + type: boolean + type: object + AgentVersionResponse: + example: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + version_number: + description: Version number of the agent + readOnly: true + title: Version number + type: integer + version_name: + description: "Human-readable version name (e.g., 'v1.2.3')" + minLength: 1 + nullable: true + readOnly: true + title: Version name + type: string + version_name_display: + readOnly: true + title: Version name display + type: string + status: + description: Current status of this version + enum: + - draft + - active + - archived + - deprecated + readOnly: true + title: Status + type: string + status_display: + minLength: 1 + readOnly: true + title: Status display + type: string + score: + description: Performance score (0.0 to 10.0) + format: decimal + nullable: true + readOnly: true + title: Score + type: string + test_count: + description: Number of tests run for this version + readOnly: true + title: Test count + type: integer + pass_rate: + description: Test pass rate percentage + format: decimal + nullable: true + readOnly: true + title: Pass rate + type: string + description: + description: Description of changes in this version + minLength: 1 + readOnly: true + title: Description + type: string + commit_message: + description: Commit message for the agent version + minLength: 1 + nullable: true + readOnly: true + title: Commit message + type: string + release_notes: + description: Detailed release notes for this version + minLength: 1 + nullable: true + readOnly: true + title: Release notes + type: string + agent_definition: + description: Parent agent definition + format: uuid + readOnly: true + title: Agent definition + type: string + organization: + description: Organization this version belongs to + format: uuid + readOnly: true + title: Organization + type: string + configuration_snapshot: + additionalProperties: true + description: Snapshot of agent configuration at this version + readOnly: true + title: Configuration snapshot + type: object + is_active: + readOnly: true + title: Is active + type: string + is_latest: + readOnly: true + title: Is latest + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + type: object + AgentVersionCreateResponse: + example: + message: message + version: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + version: + $ref: '#/components/schemas/AgentVersionResponse' + type: object + AgentVersionActivateResponse: + example: + message: message + version: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + version: + $ref: '#/components/schemas/AgentVersionResponse' + type: object + CallExecution: + example: + evaluation_data: + key: "" + recording_url: https://openapi-generator.tech + assistant_id: assistant_id + customer_number: customer_number + cost_breakdown: cost_breakdown + scenario_name: scenario_name + created_at: 2000-01-23T04:56:07.000+00:00 + stt_cost_cents: -1517921766 + llm_cost_cents: 413233370 + call_summary: call_summary + system_metrics: system_metrics + cost_cents: 441289069 + provider_call_data: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + customer_cost_cents: -594390510 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + response_time_ms: 885365090 + call_type: call_type + ended_reason: ended_reason + analysis_data: + key: "" + duration_seconds: -1803530559 + error_message: error_message + stereo_recording_url: https://openapi-generator.tech + processing_skip_reason: processing_skip_reason + transcripts: transcripts + error_localizer_tasks: error_localizer_tasks + processing_skipped: processing_skipped + response_time_seconds: response_time_seconds + message_count: 1847456234 + overall_score: 2.3021358869347655 + tts_cost_cents: 273751188 + completed_at: 2000-01-23T04:56:07.000+00:00 + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_call_type: voice + call_metadata: + key: "" + recording_available: true + service_provider_call_id: service_provider_call_id + transcript_available: true + customer_call_id: customer_call_id + started_at: 2000-01-23T04:56:07.000+00:00 + phone_number: phone_number + eval_outputs: + key: "" + ended_at: 2000-01-23T04:56:07.000+00:00 + status: pending + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + phone_number: + description: Phone number called (null for TEXT/chat simulations) + maxLength: 20 + nullable: true + title: Phone number + type: string + service_provider_call_id: + minLength: 1 + readOnly: true + title: Service provider call id + type: string + status: + description: Current status of the call + enum: + - pending + - queued + - ongoing + - completed + - failed + - analyzing + - cancelled + title: Status + type: string + started_at: + description: When the call started + format: date-time + nullable: true + title: Started at + type: string + completed_at: + description: When the call completed + format: date-time + nullable: true + title: Completed at + type: string + duration_seconds: + description: Duration of the call in seconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Duration seconds + type: integer + recording_url: + description: URL to the call recording + format: uri + maxLength: 500 + nullable: true + title: Recording url + type: string + cost_cents: + description: Cost of the call in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Cost cents + type: integer + call_metadata: + additionalProperties: true + description: Additional metadata about the call + title: Call metadata + type: object + error_message: + description: Error message if the call failed + nullable: true + title: Error message + type: string + scenario_name: + minLength: 1 + readOnly: true + title: Scenario name + type: string + transcripts: + readOnly: true + title: Transcripts + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + provider_call_data: + additionalProperties: true + description: "Complete call data from the provider. Format: dict[provider_name,\ + \ data] where provider_name must be from SupportedProviders" + title: Provider call data + type: object + stereo_recording_url: + description: Stereo recording URL from Vapi + format: uri + maxLength: 500 + nullable: true + title: Stereo recording url + type: string + ended_reason: + description: Reason why the call ended + maxLength: 10000 + nullable: true + title: Ended reason + type: string + stt_cost_cents: + description: STT cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Stt cost cents + type: integer + llm_cost_cents: + description: LLM cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Llm cost cents + type: integer + tts_cost_cents: + description: TTS cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Tts cost cents + type: integer + overall_score: + description: Overall call performance score + nullable: true + title: Overall score + type: number + response_time_ms: + description: Average response time in milliseconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Response time ms + type: integer + response_time_seconds: + readOnly: true + title: Response time seconds + type: string + assistant_id: + description: Assistant ID used for the call (system side) + maxLength: 255 + nullable: true + title: Assistant id + type: string + customer_number: + description: Customer phone number (E.164 format) + maxLength: 20 + nullable: true + title: Customer number + type: string + call_type: + description: "Type of call (e.g., outboundPhoneCall)" + maxLength: 50 + nullable: true + title: Call type + type: string + ended_at: + description: When the call ended + format: date-time + nullable: true + title: Ended at + type: string + analysis_data: + additionalProperties: true + description: Call analysis data from the service provider + title: Analysis data + type: object + evaluation_data: + additionalProperties: true + description: Call evaluation data from the service provider + title: Evaluation data + type: object + message_count: + description: Number of messages in the call + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Message count + type: integer + transcript_available: + description: Whether transcript is available + title: Transcript available + type: boolean + recording_available: + description: Whether recording is available + title: Recording available + type: boolean + eval_outputs: + additionalProperties: true + description: Evaluation output + title: Eval outputs + type: object + error_localizer_tasks: + readOnly: true + title: Error localizer tasks + type: string + call_summary: + description: Call summary from the service + nullable: true + title: Call summary + type: string + agent_version: + format: uuid + nullable: true + title: Agent version + type: string + customer_cost_cents: + description: Total customer-reported cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Customer cost cents + type: integer + system_metrics: + readOnly: true + title: System metrics + type: string + cost_breakdown: + readOnly: true + title: Cost breakdown + type: string + customer_call_id: + description: Customer call ID if available + maxLength: 255 + nullable: true + title: Customer call id + type: string + simulation_call_type: + description: Type of simulation call + enum: + - voice + - text + title: Simulation call type + type: string + processing_skipped: + readOnly: true + title: Processing skipped + type: string + processing_skip_reason: + readOnly: true + title: Processing skip reason + type: string + type: object + AgentVersionDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + EvalTemplateSummary: + example: + output: + key: "" + name: name + id: id + total_cells: 0 + properties: + name: + minLength: 1 + title: Name + type: string + id: + minLength: 1 + title: Id + type: string + total_cells: + title: Total cells + type: integer + output: + additionalProperties: true + title: Output + type: object + required: + - id + - name + - output + - total_cells + type: object + EvalSummaryResponse: + example: + result: + - output: + key: "" + name: name + id: id + total_cells: 0 + - output: + key: "" + name: name + id: id + total_cells: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/EvalTemplateSummary' + type: array + required: + - result + type: object + EvalErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + AgentVersionRestoreResponse: + example: + agent: + key: agent + message: message + version: + status_display: status_display + is_active: is_active + release_notes: release_notes + version_name_display: version_name_display + test_count: 6 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + version_number: 0 + commit_message: commit_message + configuration_snapshot: + key: "" + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score: score + pass_rate: pass_rate + version_name: version_name + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_latest: is_latest + status: draft + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + agent: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Agent + type: object + version: + $ref: '#/components/schemas/AgentVersionResponse' + type: object + CallExecutionErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + PersonaList: + example: + persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: simulation_type + multilingual: true + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + persona_type: + description: Type of persona (system or workspace-level) + enum: + - system + - workspace + readOnly: true + title: Persona type + type: string + persona_type_display: + minLength: 1 + readOnly: true + title: Persona type display + type: string + name: + description: Name of the persona + minLength: 1 + readOnly: true + title: Name + type: string + description: + description: Description of the persona + minLength: 1 + nullable: true + readOnly: true + title: Description + type: string + gender: + additionalProperties: true + description: "List of genders for the persona (e.g., ['male'], ['female'])" + readOnly: true + title: Gender + type: object + age_group: + additionalProperties: true + description: "List of age groups for the persona (e.g., ['18-25'], ['25-32'])" + readOnly: true + title: Age group + type: object + occupation: + additionalProperties: true + description: "List of occupations/professions for the persona (e.g., ['Engineer'],\ + \ ['Teacher'])" + readOnly: true + title: Occupation + type: object + location: + additionalProperties: true + description: "List of locations for the persona (e.g., ['United States'],\ + \ ['Canada'])" + readOnly: true + title: Location + type: object + personality: + additionalProperties: true + description: "List of personality types for the persona (e.g., ['Friendly\ + \ and cooperative'])" + readOnly: true + title: Personality + type: object + communication_style: + additionalProperties: true + description: "List of communication styles for the persona (e.g., ['Direct\ + \ and concise'])" + readOnly: true + title: Communication style + type: object + multilingual: + description: Whether the persona supports multiple languages + nullable: true + readOnly: true + title: Multilingual + type: boolean + languages: + additionalProperties: true + description: "List of languages the persona speaks (e.g., ['English', 'Hindi'])" + readOnly: true + title: Languages + type: object + accent: + additionalProperties: true + description: "List of accents for the persona (e.g., ['American'], ['Australian'])" + readOnly: true + title: Accent + type: object + conversation_speed: + additionalProperties: true + description: "List of conversation speeds (e.g., ['1.0'], ['1.25'])" + readOnly: true + title: Conversation speed + type: object + background_sound: + description: "Whether background sound is enabled (null=not specified, True/False\ + \ for enabled/disabled)" + nullable: true + readOnly: true + title: Background sound + type: boolean + finished_speaking_sensitivity: + additionalProperties: true + description: "List of sensitivities for detecting when persona finished\ + \ speaking (e.g., ['5'], ['6'])" + readOnly: true + title: Finished speaking sensitivity + type: object + interrupt_sensitivity: + additionalProperties: true + description: "List of sensitivities for allowing interruptions (e.g., ['5'],\ + \ ['6'])" + readOnly: true + title: Interrupt sensitivity + type: object + keywords: + additionalProperties: true + description: "List of keywords/tags describing the persona (e.g., ['Knowledgeable',\ + \ 'Patient', 'Helpful'])" + readOnly: true + title: Keywords + type: object + metadata: + additionalProperties: true + description: "Additional metadata for the persona (speech clarity, base\ + \ emotion, etc.)" + readOnly: true + title: Metadata + type: object + additional_instruction: + description: Additional instructions for how this persona should behave + minLength: 1 + nullable: true + readOnly: true + title: Additional instruction + type: string + is_default: + description: Whether this is a default/recommended persona + nullable: true + readOnly: true + title: Is default + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + simulation_type: + readOnly: true + title: Simulation type + type: string + punctuation: + description: Punctuation style for the persona + enum: + - clean + - minimal + - expressive + - erratic + nullable: true + readOnly: true + title: Punctuation + type: string + slang_usage: + description: Slang usage for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + readOnly: true + title: Slang usage + type: string + typos_frequency: + description: Typos frequency for the persona + enum: + - none + - rare + - occasional + - frequent + nullable: true + readOnly: true + title: Typos frequency + type: string + regional_mix: + description: Regional mix for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + readOnly: true + title: Regional mix + type: string + emoji_usage: + description: Emoji usage for the persona + enum: + - never + - light + - regular + - heavy + nullable: true + readOnly: true + title: Emoji usage + type: string + tone: + description: Tone for the persona + enum: + - formal + - casual + - neutral + nullable: true + readOnly: true + title: Tone + type: string + verbosity: + description: Verbosity for the persona + enum: + - brief + - balanced + - detailed + nullable: true + readOnly: true + title: Verbosity + type: string + type: object + PersonaCreate: + example: + gender: + - gender + - gender + keywords: + - keywords + - keywords + tone: casual + description: description + language: + - language + - language + custom_properties: + key: "" + slang_usage: light + personality: + - personality + - personality + regional_mix: light + communication_style: + - communication_style + - communication_style + simulation_type: voice + multilingual: false + profession: + - profession + - profession + interrupt_sensitivity: + - interrupt_sensitivity + - interrupt_sensitivity + age_group: + - age_group + - age_group + typos_frequency: rare + accent: + - accent + - accent + emoji_usage: light + conversation_speed: + - conversation_speed + - conversation_speed + background_sound: true + name: name + punctuation: clean + location: + - location + - location + finished_speaking_sensitivity: + - finished_speaking_sensitivity + - finished_speaking_sensitivity + additional_instruction: "" + verbosity: balanced + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + minLength: 1 + title: Description + type: string + gender: + items: + minLength: 1 + type: string + nullable: true + type: array + age_group: + items: + minLength: 1 + type: string + nullable: true + type: array + location: + items: + minLength: 1 + type: string + nullable: true + type: array + profession: + items: + minLength: 1 + type: string + nullable: true + type: array + personality: + items: + minLength: 1 + type: string + nullable: true + type: array + communication_style: + items: + minLength: 1 + type: string + nullable: true + type: array + accent: + items: + minLength: 1 + type: string + nullable: true + type: array + multilingual: + default: false + title: Multilingual + type: boolean + language: + items: + minLength: 1 + type: string + nullable: true + type: array + conversation_speed: + items: + minLength: 1 + type: string + nullable: true + type: array + background_sound: + nullable: true + title: Background sound + type: boolean + finished_speaking_sensitivity: + items: + minLength: 1 + type: string + nullable: true + type: array + interrupt_sensitivity: + items: + minLength: 1 + type: string + nullable: true + type: array + keywords: + items: + minLength: 1 + type: string + nullable: true + type: array + custom_properties: + additionalProperties: true + title: Custom properties + type: object + additional_instruction: + default: "" + nullable: true + title: Additional instruction + type: string + simulation_type: + default: voice + nullable: true + title: Simulation type + type: string + tone: + default: casual + nullable: true + title: Tone + type: string + punctuation: + default: clean + nullable: true + title: Punctuation + type: string + slang_usage: + default: light + nullable: true + title: Slang usage + type: string + typos_frequency: + default: rare + nullable: true + title: Typos frequency + type: string + regional_mix: + default: light + nullable: true + title: Regional mix + type: string + emoji_usage: + default: light + nullable: true + title: Emoji usage + type: string + verbosity: + default: balanced + nullable: true + title: Verbosity + type: string + required: + - description + - name + type: object + PersonaDuplicateRequest: + example: + name: name + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + required: + - name + type: object + Persona: + example: + persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + persona_type: + description: Type of persona (system or workspace-level) + enum: + - system + - workspace + readOnly: true + title: Persona type + type: string + persona_type_display: + minLength: 1 + readOnly: true + title: Persona type display + type: string + name: + description: Name of the persona + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + description: Description of the persona + nullable: true + title: Description + type: string + gender: + additionalProperties: true + description: "List of genders for the persona (e.g., ['male'], ['female'])" + title: Gender + type: object + age_group: + additionalProperties: true + description: "List of age groups for the persona (e.g., ['18-25'], ['25-32'])" + title: Age group + type: object + occupation: + additionalProperties: true + description: "List of occupations/professions for the persona (e.g., ['Engineer'],\ + \ ['Teacher'])" + title: Occupation + type: object + location: + additionalProperties: true + description: "List of locations for the persona (e.g., ['United States'],\ + \ ['Canada'])" + title: Location + type: object + personality: + additionalProperties: true + description: "List of personality types for the persona (e.g., ['Friendly\ + \ and cooperative'])" + title: Personality + type: object + communication_style: + additionalProperties: true + description: "List of communication styles for the persona (e.g., ['Direct\ + \ and concise'])" + title: Communication style + type: object + multilingual: + description: Whether the persona supports multiple languages + nullable: true + title: Multilingual + type: boolean + languages: + additionalProperties: true + description: "List of languages the persona speaks (e.g., ['English', 'Hindi'])" + title: Languages + type: object + accent: + additionalProperties: true + description: "List of accents for the persona (e.g., ['American'], ['Australian'])" + title: Accent + type: object + conversation_speed: + additionalProperties: true + description: "List of conversation speeds (e.g., ['1.0'], ['1.25'])" + title: Conversation speed + type: object + background_sound: + description: "Whether background sound is enabled (null=not specified, True/False\ + \ for enabled/disabled)" + nullable: true + title: Background sound + type: boolean + finished_speaking_sensitivity: + additionalProperties: true + description: "List of sensitivities for detecting when persona finished\ + \ speaking (e.g., ['5'], ['6'])" + title: Finished speaking sensitivity + type: object + interrupt_sensitivity: + additionalProperties: true + description: "List of sensitivities for allowing interruptions (e.g., ['5'],\ + \ ['6'])" + title: Interrupt sensitivity + type: object + keywords: + additionalProperties: true + description: "List of keywords/tags describing the persona (e.g., ['Knowledgeable',\ + \ 'Patient', 'Helpful'])" + title: Keywords + type: object + metadata: + additionalProperties: true + description: "Additional metadata for the persona (speech clarity, base\ + \ emotion, etc.)" + title: Metadata + type: object + additional_instruction: + description: Additional instructions for how this persona should behave + nullable: true + title: Additional instruction + type: string + is_default: + description: Whether this is a default/recommended persona + nullable: true + readOnly: true + title: Is default + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + profession: + items: + minLength: 1 + type: string + nullable: true + type: array + language: + items: + minLength: 1 + type: string + nullable: true + type: array + custom_properties: + additionalProperties: true + title: Custom properties + type: object + simulation_type: + description: Type of simulation for the persona + enum: + - voice + - text + readOnly: true + title: Simulation type + type: string + punctuation: + description: Punctuation style for the persona + enum: + - clean + - minimal + - expressive + - erratic + nullable: true + title: Punctuation + type: string + slang_usage: + description: Slang usage for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + title: Slang usage + type: string + typos_frequency: + description: Typos frequency for the persona + enum: + - none + - rare + - occasional + - frequent + nullable: true + title: Typos frequency + type: string + regional_mix: + description: Regional mix for the persona + enum: + - none + - moderate + - heavy + - light + nullable: true + title: Regional mix + type: string + emoji_usage: + description: Emoji usage for the persona + enum: + - never + - light + - regular + - heavy + nullable: true + title: Emoji usage + type: string + tone: + description: Tone for the persona + enum: + - formal + - casual + - neutral + nullable: true + title: Tone + type: string + verbosity: + description: Verbosity for the persona + enum: + - brief + - balanced + - detailed + nullable: true + title: Verbosity + type: string + required: + - name + type: object + PersonaDuplicateResponse: + example: + result: + persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/Persona' + type: object + PersonaFieldOptions: + example: + slang_usage_choices: slang_usage_choices + communication_style_choices: communication_style_choices + verbosity_choices: verbosity_choices + location_choices: location_choices + emoji_usage_choices: emoji_usage_choices + accent_choices: accent_choices + tone_choices: tone_choices + regional_mix_choices: regional_mix_choices + profession_choices: profession_choices + personality_choices: personality_choices + language_choices: language_choices + typos_frequency_choices: typos_frequency_choices + age_group_choices: age_group_choices + punctuation_choices: punctuation_choices + gender_choices: gender_choices + conversation_speed_choices: conversation_speed_choices + properties: + gender_choices: + readOnly: true + title: Gender choices + type: string + age_group_choices: + readOnly: true + title: Age group choices + type: string + location_choices: + readOnly: true + title: Location choices + type: string + profession_choices: + readOnly: true + title: Profession choices + type: string + personality_choices: + readOnly: true + title: Personality choices + type: string + communication_style_choices: + readOnly: true + title: Communication style choices + type: string + accent_choices: + readOnly: true + title: Accent choices + type: string + language_choices: + readOnly: true + title: Language choices + type: string + conversation_speed_choices: + readOnly: true + title: Conversation speed choices + type: string + tone_choices: + readOnly: true + title: Tone choices + type: string + verbosity_choices: + readOnly: true + title: Verbosity choices + type: string + punctuation_choices: + readOnly: true + title: Punctuation choices + type: string + emoji_usage_choices: + readOnly: true + title: Emoji usage choices + type: string + slang_usage_choices: + readOnly: true + title: Slang usage choices + type: string + typos_frequency_choices: + readOnly: true + title: Typos frequency choices + type: string + regional_mix_choices: + readOnly: true + title: Regional mix choices + type: string + type: object + SimulateEvalConfigResponse: + example: + mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + nullable: true + readOnly: true + title: Name + type: string + config: + additionalProperties: true + readOnly: true + title: Config + type: object + mapping: + additionalProperties: true + readOnly: true + title: Mapping + type: object + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + readOnly: true + type: array + error_localizer: + readOnly: true + title: Error localizer + type: boolean + model: + minLength: 1 + nullable: true + readOnly: true + title: Model + type: string + status: + minLength: 1 + nullable: true + readOnly: true + title: Status + type: string + eval_group: + minLength: 1 + nullable: true + readOnly: true + title: Eval group + type: string + template_id: + format: uuid + nullable: true + readOnly: true + title: Template id + type: string + type: object + RunTestResponse: + example: + last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + description: Name of the test run + minLength: 1 + readOnly: true + title: Name + type: string + description: + description: Description of the test run + minLength: 1 + nullable: true + readOnly: true + title: Description + type: string + agent_definition: + description: Agent definition for this test run + format: uuid + nullable: true + readOnly: true + title: Agent definition + type: string + agent_version: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Agent version + type: object + agent_definition_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Agent definition detail + type: object + source_type: + description: "Source type for the test run: agent_definition or prompt" + enum: + - agent_definition + - prompt + readOnly: true + title: Source type + type: string + source_type_display: + minLength: 1 + nullable: true + readOnly: true + title: Source type display + type: string + prompt_template: + description: Prompt template for this test run (only for prompt source type) + format: uuid + nullable: true + readOnly: true + title: Prompt template + type: string + prompt_template_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Prompt template detail + type: object + prompt_version: + description: Prompt version for this test run (only for prompt source type) + format: uuid + nullable: true + readOnly: true + title: Prompt version + type: string + prompt_version_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Prompt version detail + type: object + scenarios: + description: Scenarios to run in this test + items: + description: Scenarios to run in this test + format: uuid + type: string + readOnly: true + type: array + uniqueItems: true + scenarios_detail: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + dataset_row_ids: + description: IDs of dataset rows to run evaluations on + items: + maxLength: 255 + minLength: 1 + title: Dataset row ids + type: string + readOnly: true + type: array + simulator_agent: + description: Simulator agent for this test run (derived from scenarios) + format: uuid + nullable: true + readOnly: true + title: Simulator agent + type: string + simulator_agent_detail: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Simulator agent detail + type: object + simulate_eval_configs: + items: + format: uuid + type: string + readOnly: true + type: array + uniqueItems: true + simulate_eval_configs_detail: + items: + $ref: '#/components/schemas/SimulateEvalConfigResponse' + readOnly: true + type: array + evals_detail: + items: + $ref: '#/components/schemas/SimulateEvalConfigResponse' + readOnly: true + type: array + organization: + description: Organization this test run belongs to + format: uuid + readOnly: true + title: Organization + type: string + enable_tool_evaluation: + description: Enable automatic tool evaluation for this test run + readOnly: true + title: Enable tool evaluation + type: boolean + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + last_run_at: + format: date-time + nullable: true + readOnly: true + title: Last run at + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + type: object + RunTestErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + TestExecution: + example: + completed_calls: -1517921766 + duration_seconds: duration_seconds + total_scenarios: -1803530559 + run_test: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + failed_calls: 413233370 + agent_definition_used_name: agent_definition_used_name + scenario_ids: + key: "" + agent_definition_used_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition_name: agent_definition_name + created_at: 2000-01-23T04:56:07.000+00:00 + simulator_agent_name: simulator_agent_name + execution_metadata: + key: "" + run_test_name: run_test_name + completed_at: 2000-01-23T04:56:07.000+00:00 + total_calls: 441289069 + simulator_agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error_reason: error_reason + calls_attempted: calls_attempted + calls_connected_percentage: calls_connected_percentage + calls: + - evaluation_data: + key: "" + recording_url: https://openapi-generator.tech + assistant_id: assistant_id + customer_number: customer_number + cost_breakdown: cost_breakdown + scenario_name: scenario_name + created_at: 2000-01-23T04:56:07.000+00:00 + stt_cost_cents: -1517921766 + llm_cost_cents: 413233370 + call_summary: call_summary + system_metrics: system_metrics + cost_cents: 441289069 + provider_call_data: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + customer_cost_cents: -594390510 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + response_time_ms: 885365090 + call_type: call_type + ended_reason: ended_reason + analysis_data: + key: "" + duration_seconds: -1803530559 + error_message: error_message + stereo_recording_url: https://openapi-generator.tech + processing_skip_reason: processing_skip_reason + transcripts: transcripts + error_localizer_tasks: error_localizer_tasks + processing_skipped: processing_skipped + response_time_seconds: response_time_seconds + message_count: 1847456234 + overall_score: 2.3021358869347655 + tts_cost_cents: 273751188 + completed_at: 2000-01-23T04:56:07.000+00:00 + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_call_type: voice + call_metadata: + key: "" + recording_available: true + service_provider_call_id: service_provider_call_id + transcript_available: true + customer_call_id: customer_call_id + started_at: 2000-01-23T04:56:07.000+00:00 + phone_number: phone_number + eval_outputs: + key: "" + ended_at: 2000-01-23T04:56:07.000+00:00 + status: pending + - evaluation_data: + key: "" + recording_url: https://openapi-generator.tech + assistant_id: assistant_id + customer_number: customer_number + cost_breakdown: cost_breakdown + scenario_name: scenario_name + created_at: 2000-01-23T04:56:07.000+00:00 + stt_cost_cents: -1517921766 + llm_cost_cents: 413233370 + call_summary: call_summary + system_metrics: system_metrics + cost_cents: 441289069 + provider_call_data: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + customer_cost_cents: -594390510 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + response_time_ms: 885365090 + call_type: call_type + ended_reason: ended_reason + analysis_data: + key: "" + duration_seconds: -1803530559 + error_message: error_message + stereo_recording_url: https://openapi-generator.tech + processing_skip_reason: processing_skip_reason + transcripts: transcripts + error_localizer_tasks: error_localizer_tasks + processing_skipped: processing_skipped + response_time_seconds: response_time_seconds + message_count: 1847456234 + overall_score: 2.3021358869347655 + tts_cost_cents: 273751188 + completed_at: 2000-01-23T04:56:07.000+00:00 + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_call_type: voice + call_metadata: + key: "" + recording_available: true + service_provider_call_id: service_provider_call_id + transcript_available: true + customer_call_id: customer_call_id + started_at: 2000-01-23T04:56:07.000+00:00 + phone_number: phone_number + eval_outputs: + key: "" + ended_at: 2000-01-23T04:56:07.000+00:00 + status: pending + started_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_rate: success_rate + status: pending + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + run_test: + description: The run test being executed + format: uuid + title: Run test + type: string + run_test_name: + minLength: 1 + readOnly: true + title: Run test name + type: string + agent_definition_name: + minLength: 1 + readOnly: true + title: Agent definition name + type: string + status: + description: Current status of the test execution + enum: + - pending + - running + - completed + - failed + - cancelled + - cancelling + - evaluating + title: Status + type: string + error_reason: + nullable: true + title: Error reason + type: string + started_at: + description: When the test execution started + format: date-time + title: Started at + type: string + completed_at: + description: When the test execution completed + format: date-time + nullable: true + title: Completed at + type: string + total_scenarios: + description: Total number of scenarios in this execution + maximum: 2147483647 + minimum: -2147483648 + title: Total scenarios + type: integer + total_calls: + description: Total number of calls to be made + maximum: 2147483647 + minimum: -2147483648 + title: Total calls + type: integer + completed_calls: + description: Number of successfully completed calls + maximum: 2147483647 + minimum: -2147483648 + title: Completed calls + type: integer + failed_calls: + description: Number of failed calls + maximum: 2147483647 + minimum: -2147483648 + title: Failed calls + type: integer + execution_metadata: + additionalProperties: true + description: Additional metadata about the execution + title: Execution metadata + type: object + duration_seconds: + readOnly: true + title: Duration seconds + type: string + success_rate: + readOnly: true + title: Success rate + type: string + calls: + items: + $ref: '#/components/schemas/CallExecution' + readOnly: true + type: array + created_at: + format: date-time + readOnly: true + title: Created at + type: string + scenario_ids: + additionalProperties: true + description: List of scenario IDs that were executed in this run + title: Scenario ids + type: object + simulator_agent_name: + minLength: 1 + readOnly: true + title: Simulator agent name + type: string + simulator_agent_id: + format: uuid + readOnly: true + title: Simulator agent id + type: string + agent_definition_used_name: + minLength: 1 + readOnly: true + title: Agent definition used name + type: string + agent_definition_used_id: + format: uuid + readOnly: true + title: Agent definition used id + type: string + calls_attempted: + readOnly: true + title: Calls attempted + type: string + calls_connected_percentage: + readOnly: true + title: Calls connected percentage + type: string + required: + - run_test + type: object + CallExecutionDetail: + example: + avg_stop_time_after_interruption: 7 + snapshot_timestamp: snapshot_timestamp + rerun_snapshots: rerun_snapshots + scenario_id: scenario_id + is_snapshot: is_snapshot + cost_cents: -1618552611 + ai_interruption_count: -1276840939 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_metrics: eval_metrics + original_call_execution_id: original_call_execution_id + csat_score: csat_score + bot_wpm: 9.301444243932576 + processing_skipped: processing_skipped + agent_talk_percentage: agent_talk_percentage + start_time: start_time + simulation_call_type: voice + service_provider_call_id: service_provider_call_id + avg_agent_latency_ms: 413233370 + audio_url: https://openapi-generator.tech + eval_outputs: eval_outputs + phone_number: phone_number + status: pending + agent_definition_used_name: agent_definition_used_name + talk_ratio: 3.616076749251911 + turn_count: turn_count + ai_interruption_rate: 4.145608029883936 + call_summary: call_summary + user_interruption_rate: 2.3021358869347655 + duration: duration + simulator_agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + transcript: transcript + scenario: scenario + provider: provider + customer_cost_breakdown: + key: "" + output_tokens: output_tokens + customer_cost_cents: -1707401670 + response_time_ms: 441289069 + call_type: call_type + timestamp: 2000-01-23T04:56:07.000+00:00 + ended_reason: ended_reason + duration_seconds: -1803530559 + scenario_columns: scenario_columns + processing_skip_reason: processing_skip_reason + user_wpm: 7.061401241503109 + agent_definition_used_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + session_id: session_id + tool_outputs: + key: "" + simulator_agent_name: simulator_agent_name + input_tokens: input_tokens + overall_score: overall_score + customer_latency_metrics: + key: "" + user_interruption_count: 273751188 + recordings: recordings + avg_agent_latency: 1 + customer_call_id: customer_call_id + total_tokens: total_tokens + rerun_type: rerun_type + response_time: response_time + avg_latency_ms: avg_latency_ms + customer_name: customer_name + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + service_provider_call_id: + minLength: 1 + readOnly: true + title: Service provider call id + type: string + session_id: + readOnly: true + title: Session id + type: string + timestamp: + format: date-time + readOnly: true + title: Timestamp + type: string + call_type: + readOnly: true + title: Call type + type: string + status: + description: Current status of the call + enum: + - pending + - queued + - ongoing + - completed + - failed + - analyzing + - cancelled + title: Status + type: string + duration: + readOnly: true + title: Duration + type: string + duration_seconds: + description: Duration of the call in seconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Duration seconds + type: integer + start_time: + readOnly: true + title: Start time + type: string + transcript: + readOnly: true + title: Transcript + type: string + scenario: + minLength: 1 + readOnly: true + title: Scenario + type: string + overall_score: + readOnly: true + title: Overall score + type: string + response_time: + readOnly: true + title: Response time + type: string + response_time_ms: + description: Average response time in milliseconds + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Response time ms + type: integer + audio_url: + format: uri + minLength: 1 + readOnly: true + title: Audio url + type: string + customer_name: + minLength: 1 + readOnly: true + title: Customer name + type: string + eval_outputs: + readOnly: true + title: Eval outputs + type: string + eval_metrics: + readOnly: true + title: Eval metrics + type: string + scenario_columns: + readOnly: true + title: Scenario columns + type: string + ended_reason: + description: Reason why the call ended + maxLength: 10000 + nullable: true + title: Ended reason + type: string + simulator_agent_name: + minLength: 1 + readOnly: true + title: Simulator agent name + type: string + simulator_agent_id: + format: uuid + readOnly: true + title: Simulator agent id + type: string + agent_definition_used_name: + minLength: 1 + readOnly: true + title: Agent definition used name + type: string + agent_definition_used_id: + format: uuid + readOnly: true + title: Agent definition used id + type: string + call_summary: + description: Call summary from the service + nullable: true + title: Call summary + type: string + recordings: + readOnly: true + title: Recordings + type: string + scenario_id: + readOnly: true + title: Scenario id + type: string + avg_agent_latency: + readOnly: true + title: Avg agent latency + type: integer + avg_agent_latency_ms: + description: Average agent latency in milliseconds (time taken by agent + to respond after user's pause) + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Avg agent latency ms + type: integer + user_interruption_count: + description: Number of times user interrupted the AI + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: User interruption count + type: integer + user_interruption_rate: + description: Rate of user interruptions (interruptions per minute) + nullable: true + title: User interruption rate + type: number + user_wpm: + description: User's words per minute + nullable: true + title: User wpm + type: number + bot_wpm: + description: Bot's words per minute + nullable: true + title: Bot wpm + type: number + talk_ratio: + description: Ratio of bot speaking time to user speaking time + nullable: true + title: Talk ratio + type: number + ai_interruption_count: + description: Number of times AI interrupted the user + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Ai interruption count + type: integer + ai_interruption_rate: + description: Rate of AI interruptions (interruptions per minute) + nullable: true + title: Ai interruption rate + type: number + avg_stop_time_after_interruption: + readOnly: true + title: Avg stop time after interruption + type: integer + total_tokens: + readOnly: true + title: Total tokens + type: string + input_tokens: + readOnly: true + title: Input tokens + type: string + output_tokens: + readOnly: true + title: Output tokens + type: string + avg_latency_ms: + readOnly: true + title: Avg latency ms + type: string + turn_count: + readOnly: true + title: Turn count + type: string + agent_talk_percentage: + readOnly: true + title: Agent talk percentage + type: string + csat_score: + readOnly: true + title: Csat score + type: string + processing_skipped: + readOnly: true + title: Processing skipped + type: string + processing_skip_reason: + readOnly: true + title: Processing skip reason + type: string + rerun_snapshots: + readOnly: true + title: Rerun snapshots + type: string + is_snapshot: + readOnly: true + title: Is snapshot + type: string + snapshot_timestamp: + readOnly: true + title: Snapshot timestamp + type: string + rerun_type: + readOnly: true + title: Rerun type + type: string + original_call_execution_id: + readOnly: true + title: Original call execution id + type: string + tool_outputs: + additionalProperties: true + description: Tool evaluation output - separate from standard evaluations + title: Tool outputs + type: object + cost_cents: + description: Cost of the call in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Cost cents + type: integer + customer_cost_cents: + description: Total customer-reported cost in cents + maximum: 2147483647 + minimum: -2147483648 + nullable: true + title: Customer cost cents + type: integer + customer_cost_breakdown: + additionalProperties: true + description: Detailed cost breakdown from customer call data + title: Customer cost breakdown + type: object + customer_latency_metrics: + additionalProperties: true + description: Latency metrics from customer call data + title: Customer latency metrics + type: object + customer_call_id: + description: Customer call ID if available + maxLength: 255 + nullable: true + title: Customer call id + type: string + simulation_call_type: + description: Type of simulation call + enum: + - voice + - text + title: Simulation call type + type: string + provider: + readOnly: true + title: Provider + type: string + phone_number: + description: Phone number called (null for TEXT/chat simulations) + maxLength: 20 + nullable: true + title: Phone number + type: string + type: object + CallExecutionStatusUpdate: + example: + status: pending + ended_reason: ended_reason + properties: + status: + enum: + - pending + - queued + - ongoing + - completed + - failed + - analyzing + - cancelled + title: Status + type: string + ended_reason: + nullable: true + title: Ended reason + type: string + required: + - status + type: object + CallBranchAnalysisResponse: + example: + scenario_name: scenario_name + analyzed_at: 2000-01-23T04:56:07.000+00:00 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + analysis: + key: analysis + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + scenario_id: + format: uuid + nullable: true + readOnly: true + title: Scenario id + type: string + scenario_name: + minLength: 1 + nullable: true + readOnly: true + title: Scenario name + type: string + analysis: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Analysis + type: object + analyzed_at: + format: date-time + readOnly: true + title: Analyzed at + type: string + type: object + ErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + CallBranchDeviationCreateResponse: + example: + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_graph_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + deviation_data: + key: deviation_data + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + scenario_graph_id: + format: uuid + readOnly: true + title: Scenario graph id + type: string + deviation_data: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Deviation data + type: object + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + ChatToolCallFunction: + example: + name: name + arguments: arguments + properties: + name: + minLength: 1 + title: Name + type: string + arguments: + minLength: 1 + title: Arguments + type: string + required: + - arguments + - name + type: object + ChatToolCall: + example: + function: + name: name + arguments: arguments + id: id + type: type + properties: + id: + minLength: 1 + title: Id + type: string + type: + minLength: 1 + title: Type + type: string + function: + $ref: '#/components/schemas/ChatToolCallFunction' + required: + - function + - id + - type + type: object + ChatMessageContract: + example: + metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + properties: + role: + enum: + - user + - assistant + - tool + title: Role + type: string + content: + nullable: true + title: Content + type: string + tool_call_id: + nullable: true + title: Tool call id + type: string + name: + nullable: true + title: Name + type: string + metadata: + additionalProperties: + nullable: true + type: string + title: Metadata + type: object + tool_calls: + items: + $ref: '#/components/schemas/ChatToolCall' + nullable: true + type: array + required: + - role + type: object + SendChatRequest: + example: + messages: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + metrics: + key: metrics + initiate_chat: false + properties: + messages: + items: + $ref: '#/components/schemas/ChatMessageContract' + nullable: true + type: array + metrics: + additionalProperties: + nullable: true + type: string + title: Metrics + type: object + initiate_chat: + default: false + title: Initiate chat + type: boolean + type: object + ChatSendMessageResult: + example: + chat_ended: false + message_history: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + input_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + output_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + properties: + input_message: + items: + $ref: '#/components/schemas/ChatMessageContract' + nullable: true + type: array + output_message: + items: + $ref: '#/components/schemas/ChatMessageContract' + nullable: true + type: array + message_history: + items: + $ref: '#/components/schemas/ChatMessageContract' + type: array + chat_ended: + default: false + title: Chat ended + type: boolean + required: + - message_history + type: object + ChatSendMessageResponse: + example: + result: + chat_ended: false + message_history: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + input_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + output_message: + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + - metadata: + key: metadata + role: user + tool_call_id: tool_call_id + name: name + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + content: content + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ChatSendMessageResult' + required: + - result + type: object + CallExecutionDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + ErrorLocalizerTaskResponse: + example: + input_data: + key: "" + rule_prompt: rule_prompt + error_message: error_message + input_types: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: eval_config_id + input_keys: + key: "" + eval_template_name: eval_template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + eval_explanation: eval_explanation + error_analysis: + key: "" + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_input_key: selected_input_key + status: status + eval_result: + key: "" + properties: + task_id: + format: uuid + readOnly: true + title: Task id + type: string + eval_config_id: + minLength: 1 + nullable: true + readOnly: true + title: Eval config id + type: string + status: + readOnly: true + title: Status + type: string + eval_result: + additionalProperties: true + readOnly: true + title: Eval result + type: object + eval_explanation: + minLength: 1 + nullable: true + readOnly: true + title: Eval explanation + type: string + input_data: + additionalProperties: true + readOnly: true + title: Input data + type: object + input_keys: + additionalProperties: true + readOnly: true + title: Input keys + type: object + input_types: + additionalProperties: true + readOnly: true + title: Input types + type: object + rule_prompt: + minLength: 1 + nullable: true + readOnly: true + title: Rule prompt + type: string + error_analysis: + additionalProperties: true + readOnly: true + title: Error analysis + type: object + selected_input_key: + minLength: 1 + nullable: true + readOnly: true + title: Selected input key + type: string + error_message: + minLength: 1 + nullable: true + readOnly: true + title: Error message + type: string + created_at: + format: date-time + nullable: true + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + nullable: true + readOnly: true + title: Updated at + type: string + eval_template_name: + minLength: 1 + nullable: true + readOnly: true + title: Eval template name + type: string + eval_template_id: + format: uuid + nullable: true + readOnly: true + title: Eval template id + type: string + type: object + CallExecutionErrorLocalizerTasksResponse: + example: + error_localizer_tasks: + - input_data: + key: "" + rule_prompt: rule_prompt + error_message: error_message + input_types: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: eval_config_id + input_keys: + key: "" + eval_template_name: eval_template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + eval_explanation: eval_explanation + error_analysis: + key: "" + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_input_key: selected_input_key + status: status + eval_result: + key: "" + - input_data: + key: "" + rule_prompt: rule_prompt + error_message: error_message + input_types: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: eval_config_id + input_keys: + key: "" + eval_template_name: eval_template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + eval_explanation: eval_explanation + error_analysis: + key: "" + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_input_key: selected_input_key + status: status + eval_result: + key: "" + total_tasks: 0 + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + error_localizer_tasks: + items: + $ref: '#/components/schemas/ErrorLocalizerTaskResponse' + readOnly: true + type: array + total_tasks: + readOnly: true + title: Total tasks + type: integer + type: object + CallLogEntryResponse: + example: + logged_at: logged_at + level: level + payload: + key: payload + severity_text: severity_text + attributes: + key: attributes + id: id + category: category + body: body + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + logged_at: + minLength: 1 + nullable: true + readOnly: true + title: Logged at + type: string + level: + minLength: 1 + nullable: true + readOnly: true + title: Level + type: string + severity_text: + minLength: 1 + nullable: true + readOnly: true + title: Severity text + type: string + category: + minLength: 1 + nullable: true + readOnly: true + title: Category + type: string + body: + minLength: 1 + nullable: true + readOnly: true + title: Body + type: string + attributes: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Attributes + type: object + payload: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Payload + type: object + type: object + CallExecutionLogsResponse: + example: + ingestion_pending: true + source: source + results: + - logged_at: logged_at + level: level + payload: + key: payload + severity_text: severity_text + attributes: + key: attributes + id: id + category: category + body: body + - logged_at: logged_at + level: level + payload: + key: payload + severity_text: severity_text + attributes: + key: attributes + id: id + category: category + body: body + properties: + results: + items: + $ref: '#/components/schemas/CallLogEntryResponse' + readOnly: true + type: array + source: + minLength: 1 + readOnly: true + title: Source + type: string + ingestion_pending: + readOnly: true + title: Ingestion pending + type: boolean + type: object + SessionComparisonResult: + example: + comparison_metrics: + key: "" + comparison_recordings: + key: "" + comparison_transcripts: + key: "" + properties: + comparison_metrics: + additionalProperties: true + readOnly: true + title: Comparison metrics + type: object + comparison_transcripts: + additionalProperties: true + readOnly: true + title: Comparison transcripts + type: object + comparison_recordings: + additionalProperties: true + readOnly: true + title: Comparison recordings + type: object + type: object + SessionComparisonResponse: + example: + result: + comparison_metrics: + key: "" + comparison_recordings: + key: "" + comparison_transcripts: + key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/SessionComparisonResult' + required: + - result + type: object + CallTranscript: + example: + start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + speaker_role: + description: Role of the speaker (user or assistant) + enum: + - user + - assistant + - system + - tool_calls + - tool_call_result + - unknown + title: Speaker role + type: string + content: + description: Transcript content + minLength: 1 + title: Content + type: string + start_time_ms: + description: Start time of this transcript segment in milliseconds + maximum: 9223372036854776000 + minimum: -9223372036854776000 + title: Start time ms + type: integer + start_time_seconds: + readOnly: true + title: Start time seconds + type: string + end_time_ms: + description: End time of this transcript segment in milliseconds + maximum: 9223372036854776000 + minimum: -9223372036854776000 + title: End time ms + type: integer + end_time_seconds: + readOnly: true + title: End time seconds + type: string + confidence_score: + description: Confidence score for this transcript segment + title: Confidence score + type: number + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - content + type: object + CallTranscriptResponse: + example: + transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 5 + status: status + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + phone_number: + minLength: 1 + nullable: true + readOnly: true + title: Phone number + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + transcripts: + items: + $ref: '#/components/schemas/CallTranscript' + readOnly: true + type: array + total_transcripts: + readOnly: true + title: Total transcripts + type: integer + type: object + PromptSimulationScenarioItem: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + description: + readOnly: true + title: Description + type: string + scenario_type: + minLength: 1 + readOnly: true + title: Scenario type + type: string + dataset_id: + format: uuid + nullable: true + readOnly: true + title: Dataset id + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + type: object + PromptSimulationScenariosResult: + example: + count: 0 + limit: 1 + page: 6 + results: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + properties: + count: + readOnly: true + title: Count + type: integer + page: + readOnly: true + title: Page + type: integer + limit: + readOnly: true + title: Limit + type: integer + results: + items: + $ref: '#/components/schemas/PromptSimulationScenarioItem' + readOnly: true + type: array + type: object + PromptSimulationScenariosResponse: + example: + result: + count: 0 + limit: 1 + page: 6 + results: + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + - dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: scenario_type + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/PromptSimulationScenariosResult' + required: + - result + type: object + PromptSimulationTemplateSummary: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + type: object + PromptSimulationListResult: + example: + count: 0 + limit: 1 + page: 6 + results: + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + prompt_template: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + readOnly: true + title: Count + type: integer + page: + readOnly: true + title: Page + type: integer + limit: + readOnly: true + title: Limit + type: integer + results: + items: + $ref: '#/components/schemas/RunTestResponse' + readOnly: true + type: array + prompt_template: + $ref: '#/components/schemas/PromptSimulationTemplateSummary' + type: object + PromptSimulationListResponse: + example: + result: + count: 0 + limit: 1 + page: 6 + results: + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + - last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + prompt_template: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/PromptSimulationListResult' + required: + - result + type: object + EvalConfigDefinition: + example: + mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + template_id: + description: UUID of the evaluation template to use. + format: uuid + title: Template id + type: string + name: + description: Name for this evaluation configuration. Defaults to 'Eval-' + if omitted. + title: Name + type: string + config: + additionalProperties: true + description: Template-specific configuration parameters. + title: Config + type: object + mapping: + additionalProperties: true + description: Maps test execution data fields to the evaluation template's + expected inputs. + title: Mapping + type: object + filters: + description: Canonical filter list to restrict which test results are evaluated. + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + error_localizer: + default: false + description: Enables granular error localization on evaluation failures. + title: Error localizer + type: boolean + model: + description: Model to use for running this evaluation. + minLength: 1 + nullable: true + title: Model + type: string + kb_id: + description: Knowledge base file to use for this evaluation. + format: uuid + nullable: true + title: Kb id + type: string + eval_group: + description: Eval group that created this evaluation config. + format: uuid + nullable: true + title: Eval group + type: string + required: + - template_id + type: object + CreatePromptSimulationRequest: + example: + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + enable_tool_evaluation: false + prompt_version_id: prompt_version_id + evaluations_config: + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + prompt_version_id: + description: Prompt version ID (UUID) or template_version string + maxLength: 255 + minLength: 1 + title: Prompt version id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + dataset_row_ids: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + evaluations_config: + description: Evaluation configurations to create + items: + $ref: '#/components/schemas/EvalConfigDefinition' + type: array + enable_tool_evaluation: + default: false + description: Enable automatic tool evaluation for this simulation run + title: Enable tool evaluation + type: boolean + required: + - name + - prompt_version_id + - scenario_ids + type: object + PromptSimulationRunResponse: + example: + result: + last_run_at: 2000-01-23T04:56:07.000+00:00 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evals_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + scenarios_detail: + - key: scenarios_detail + - key: scenarios_detail + agent_definition_detail: + key: agent_definition_detail + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + simulator_agent_detail: + key: simulator_agent_detail + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type_display: source_type_display + prompt_version_detail: + key: prompt_version_detail + source_type: agent_definition + simulator_agent: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + prompt_template_detail: + key: prompt_template_detail + agent_version: + key: agent_version + deleted: true + simulate_eval_configs: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulate_eval_configs_detail: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: model + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + status: status + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunTestResponse' + required: + - result + type: object + PromptSimulationUpdateRequest: + example: + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + description: description + enable_tool_evaluation: true + prompt_version_id: prompt_version_id + properties: + prompt_version_id: + maxLength: 255 + minLength: 1 + title: Prompt version id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + enable_tool_evaluation: + title: Enable tool evaluation + type: boolean + type: object + ExecutePromptSimulationRequest: + example: + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + scenario_ids: + items: + format: uuid + type: string + type: array + select_all: + default: false + title: Select all + type: boolean + type: object + ExecutePromptSimulationResult: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_calls: 6 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: 0 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + execution_id: + format: uuid + readOnly: true + title: Execution id + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + total_scenarios: + readOnly: true + title: Total scenarios + type: integer + total_calls: + readOnly: true + title: Total calls + type: integer + scenario_ids: + items: + format: uuid + type: string + type: array + required: + - scenario_ids + type: object + ExecutePromptSimulationResponse: + example: + result: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_calls: 6 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: 0 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ExecutePromptSimulationResult' + required: + - result + type: object + AllActiveTests: + example: + active_tests: + key: active_tests + total_active: 0 + properties: + active_tests: + additionalProperties: + nullable: true + type: string + title: Active tests + type: object + total_active: + title: Total active + type: integer + required: + - active_tests + - total_active + type: object + CreateRunTest: + example: + agent_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + replay_session_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_config_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + enable_tool_evaluation: false + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + evaluations_config: + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + dataset_row_ids: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + eval_config_ids: + items: + format: uuid + type: string + type: array + evaluations_config: + description: Evaluation configurations to create + items: + $ref: '#/components/schemas/EvalConfigDefinition' + type: array + enable_tool_evaluation: + default: false + description: Enable automatic tool evaluation for this test run + title: Enable tool evaluation + type: boolean + replay_session_id: + description: Optional replay session ID to mark as completed after run test + creation + format: uuid + nullable: true + title: Replay session id + type: string + agent_version: + description: Optional agent version to bind to this test run + format: uuid + nullable: true + title: Agent version + type: string + required: + - agent_definition_id + - name + - scenario_ids + type: object + RunTestNameResult: + example: + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + run_test_id: + format: uuid + title: Run test id + type: string + run_test_name: + minLength: 1 + title: Run test name + type: string + required: + - run_test_id + - run_test_name + type: object + RunTestNameResponse: + example: + result: + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunTestNameResult' + required: + - result + type: object + UpdateRunTest: + example: + dataset_row_ids: + - dataset_row_ids + - dataset_row_ids + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_config_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + scenario_ids: + items: + format: uuid + type: string + type: array + dataset_row_ids: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + eval_config_ids: + items: + format: uuid + type: string + type: array + type: object + RunTestMessageResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + RunTestAnalytics: + example: + performance_comparison: + - key: performance_comparison + - key: performance_comparison + run_test_info: + key: run_test_info + evaluation_score_trends: + - key: evaluation_score_trends + - key: evaluation_score_trends + summary_stats: + key: summary_stats + fail_rate_trends: + - key: fail_rate_trends + - key: fail_rate_trends + properties: + run_test_info: + additionalProperties: + nullable: true + type: string + description: Run test metadata + title: Run test info + type: object + fail_rate_trends: + description: Fail-rate trend points + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + evaluation_score_trends: + description: Evaluation score trend points + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + performance_comparison: + description: Per-execution performance rows + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + summary_stats: + additionalProperties: + nullable: true + type: string + description: Aggregate performance summary + title: Summary stats + type: object + required: + - evaluation_score_trends + - fail_rate_trends + - performance_comparison + - run_test_info + type: object + RunTestCallExecutionsResponse: + example: + next: next + previous: previous + count: 0 + total_pages: 6 + results: + - key: results + - key: results + current_page: 1 + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + total_pages: + readOnly: true + title: Total pages + type: integer + current_page: + readOnly: true + title: Current page + type: integer + type: object + RunTestChatExecutionResult: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + properties: + message: + minLength: 1 + title: Message + type: string + execution_id: + format: uuid + title: Execution id + type: string + run_test_id: + format: uuid + title: Run test id + type: string + status: + minLength: 1 + title: Status + type: string + total_scenarios: + items: + format: uuid + type: string + type: array + required: + - execution_id + - message + - run_test_id + - status + - total_scenarios + type: object + RunTestChatExecutionResponse: + example: + result: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/RunTestChatExecutionResult' + required: + - result + type: object + RunTestComponentsUpdate: + example: + simulator_agent_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + agent_definition_id: + format: uuid + title: Agent definition id + type: string + version: + format: uuid + title: Version + type: string + simulator_agent_id: + format: uuid + title: Simulator agent id + type: string + scenarios: + items: + format: uuid + type: string + type: array + enable_tool_evaluation: + title: Enable tool evaluation + type: boolean + type: object + TestExecutionBulkDelete: + example: + test_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + test_execution_ids: + description: List of specific test execution IDs to delete + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to delete all test executions in the run test + title: Select all + type: boolean + type: object + TestExecutionBulkDeleteResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + deleted_count: 0 + deleted_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + deleted_count: + readOnly: true + title: Deleted count + type: integer + deleted_ids: + items: + format: uuid + type: string + readOnly: true + type: array + type: object + AddEvalConfigsRequest: + example: + evaluations_config: + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + - mapping: + key: "" + error_localizer: false + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + eval_group: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: model + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + config: + key: "" + properties: + evaluations_config: + description: Array of evaluation configuration objects to add. At least + one required. + items: + $ref: '#/components/schemas/EvalConfigDefinition' + minItems: 1 + type: array + required: + - evaluations_config + type: object + EvalConfigResponse: + example: + mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: turing_large + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + key: "" + config: + key: "" + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + maxLength: 255 + nullable: true + title: Name + type: string + config: + additionalProperties: true + title: Config + type: object + mapping: + additionalProperties: true + title: Mapping + type: object + filters: + additionalProperties: true + title: Filters + type: object + error_localizer: + title: Error localizer + type: boolean + model: + enum: + - turing_large + - turing_small + - protect + - protect_flash + - turing_flash + nullable: true + title: Model + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + eval_group: + readOnly: true + title: Eval group + type: string + template_id: + format: uuid + readOnly: true + title: Template id + type: string + type: object + AddEvalConfigsResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_eval_configs: + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: turing_large + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + key: "" + config: + key: "" + status: NotStarted + - mapping: + key: "" + error_localizer: true + name: name + eval_group: eval_group + model: turing_large + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + filters: + key: "" + config: + key: "" + status: NotStarted + warnings: + - warnings + - warnings + message: message + properties: + message: + minLength: 1 + title: Message + type: string + created_eval_configs: + items: + $ref: '#/components/schemas/EvalConfigResponse' + type: array + run_test_id: + format: uuid + title: Run test id + type: string + warnings: + description: Non-fatal issues encountered while processing individual configs. + items: + minLength: 1 + type: string + type: array + required: + - created_eval_configs + - message + - run_test_id + type: object + DeleteEvalConfigResponse: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + EvalConfigStructure: + example: + reason_column: true + models: + key: "" + config_params_option: + key: config_params_option + mapping: + key: mapping + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + description: description + api_key_available: true + params: + key: "" + config_params_desc: + key: config_params_desc + function_params_schema: + key: "" + output: + key: "" + template_name: template_name + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_prompt_column: true + name: name + optional_keys: + - optional_keys + - optional_keys + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + config: + key: config + eval_tags: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + template_id: + format: uuid + readOnly: true + title: Template id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + reason_column: + readOnly: true + title: Reason column + type: boolean + eval_tags: + additionalProperties: true + readOnly: true + title: Eval tags + type: object + description: + readOnly: true + title: Description + type: string + required_keys: + items: + minLength: 1 + type: string + type: array + optional_keys: + items: + minLength: 1 + type: string + type: array + variable_keys: + items: + minLength: 1 + type: string + type: array + run_prompt_column: + readOnly: true + title: Run prompt column + type: boolean + template_name: + minLength: 1 + readOnly: true + title: Template name + type: string + mapping: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Mapping + type: object + config: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Config + type: object + params: + additionalProperties: true + readOnly: true + title: Params + type: object + function_params_schema: + additionalProperties: true + readOnly: true + title: Function params schema + type: object + models: + additionalProperties: true + readOnly: true + title: Models + type: object + selected_model: + minLength: 1 + nullable: true + readOnly: true + title: Selected model + type: string + error_localizer: + readOnly: true + title: Error localizer + type: boolean + kb_id: + format: uuid + nullable: true + readOnly: true + title: Kb id + type: string + output: + additionalProperties: true + readOnly: true + title: Output + type: object + config_params_desc: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Config params desc + type: object + config_params_option: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Config params option + type: object + api_key_available: + readOnly: true + title: Api key available + type: boolean + required: + - optional_keys + - required_keys + - variable_keys + type: object + EvalConfigStructureResult: + example: + eval: + reason_column: true + models: + key: "" + config_params_option: + key: config_params_option + mapping: + key: mapping + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + description: description + api_key_available: true + params: + key: "" + config_params_desc: + key: config_params_desc + function_params_schema: + key: "" + output: + key: "" + template_name: template_name + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_prompt_column: true + name: name + optional_keys: + - optional_keys + - optional_keys + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + config: + key: config + eval_tags: + key: "" + properties: + eval: + $ref: '#/components/schemas/EvalConfigStructure' + required: + - eval + type: object + EvalConfigStructureResponse: + example: + result: + eval: + reason_column: true + models: + key: "" + config_params_option: + key: config_params_option + mapping: + key: mapping + variable_keys: + - variable_keys + - variable_keys + required_keys: + - required_keys + - required_keys + description: description + api_key_available: true + params: + key: "" + config_params_desc: + key: config_params_desc + function_params_schema: + key: "" + output: + key: "" + template_name: template_name + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + run_prompt_column: true + name: name + optional_keys: + - optional_keys + - optional_keys + template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + selected_model: selected_model + config: + key: config + eval_tags: + key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalConfigStructureResult' + required: + - result + type: object + EvalConfigUpdateRequest: + example: + mapping: + key: "" + error_localizer: true + kb_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + run: false + config: + key: "" + properties: + config: + additionalProperties: true + description: Updated evaluation configuration parameters. + title: Config + type: object + mapping: + additionalProperties: true + description: Updated field mapping between test data and evaluation inputs. + title: Mapping + type: object + model: + description: Model to use for evaluations. + minLength: 1 + nullable: true + title: Model + type: string + error_localizer: + description: Enable granular error localization in evaluation results. + title: Error localizer + type: boolean + kb_id: + description: UUID of a knowledge base to use for grounding. Pass null to + clear. + format: uuid + nullable: true + title: Kb id + type: string + name: + description: Updated name for the evaluation configuration. + minLength: 1 + title: Name + type: string + run: + default: false + description: "When true, triggers an immediate rerun after updating. Defaults\ + \ to false." + title: Run + type: boolean + test_execution_id: + description: UUID of the test execution to rerun against. Required when + run is true. + format: uuid + nullable: true + title: Test execution id + type: string + type: object + EvalConfigUpdateResponse: + example: + note: note + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + call_execution_count: 0 + properties: + message: + minLength: 1 + title: Message + type: string + eval_config_id: + format: uuid + title: Eval config id + type: string + run_test_id: + format: uuid + title: Run test id + type: string + test_execution_id: + format: uuid + nullable: true + title: Test execution id + type: string + call_execution_count: + nullable: true + title: Call execution count + type: integer + note: + minLength: 1 + nullable: true + title: Note + type: string + required: + - eval_config_id + - message + - run_test_id + type: object + EvalSummaryComparisonResponse: + example: + result: + key: + - output: + key: "" + name: name + id: id + total_cells: 0 + - output: + key: "" + name: name + id: id + total_cells: 0 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + additionalProperties: + items: + $ref: '#/components/schemas/EvalTemplateSummary' + type: array + title: Result + type: object + required: + - result + type: object + ExecuteRunTest: + example: + simulator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + scenario_ids: + items: + format: uuid + type: string + type: array + simulator_id: + format: uuid + nullable: true + title: Simulator id + type: string + select_all: + default: false + title: Select all + type: boolean + type: object + RunTestExecutionResponse: + example: + execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_calls: 6 + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_scenarios: 0 + scenario_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: status + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + execution_id: + format: uuid + readOnly: true + title: Execution id + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + total_scenarios: + readOnly: true + title: Total scenarios + type: integer + total_calls: + readOnly: true + title: Total calls + type: integer + scenario_ids: + items: + format: uuid + type: string + readOnly: true + type: array + type: object + TestExecutionItemResponse: + example: + total_number_of_fagi_agent_turns: 3 + source_type: source_type + scenarios: scenarios + agent_definition: agent_definition + total_chats: 9 + duration: 0 + agent_type: agent_type + start_time: start_time + agent_version: agent_version + error_reason: error_reason + calls_attempted: 5 + connected_calls: 2 + calls_connected_percentage: 7.061401241503109 + calls: 5 + id: id + success_rate: 6.027456183070403 + avg_response_time: 1.4658129805029452 + status: status + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + scenarios: + minLength: 1 + readOnly: true + title: Scenarios + type: string + start_time: + minLength: 1 + nullable: true + readOnly: true + title: Start time + type: string + duration: + readOnly: true + title: Duration + type: integer + error_reason: + minLength: 1 + nullable: true + readOnly: true + title: Error reason + type: string + success_rate: + readOnly: true + title: Success rate + type: number + avg_response_time: + readOnly: true + title: Avg response time + type: number + calls: + readOnly: true + title: Calls + type: integer + calls_attempted: + readOnly: true + title: Calls attempted + type: integer + connected_calls: + readOnly: true + title: Connected calls + type: integer + agent_version: + minLength: 1 + readOnly: true + title: Agent version + type: string + agent_definition: + minLength: 1 + readOnly: true + title: Agent definition + type: string + calls_connected_percentage: + readOnly: true + title: Calls connected percentage + type: number + total_chats: + readOnly: true + title: Total chats + type: integer + agent_type: + minLength: 1 + readOnly: true + title: Agent type + type: string + total_number_of_fagi_agent_turns: + readOnly: true + title: Total number of fagi agent turns + type: integer + source_type: + minLength: 1 + readOnly: true + title: Source type + type: string + type: object + TestExecutionRerun: + example: + rerun_type: eval_only + test_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + rerun_type: + description: "Type of rerun: evaluation only or call plus evaluation" + enum: + - eval_only + - call_and_eval + title: Rerun type + type: string + test_execution_ids: + description: List of specific test execution IDs to rerun + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to rerun all test executions in the run test + title: Select all + type: boolean + required: + - rerun_type + type: object + TestExecutionRerunResult: + example: + reason: reason + failed_reruns: + - key: failed_reruns + - key: failed_reruns + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_count: 6 + failure_count: 1 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + skipped: true + properties: + test_execution_id: + format: uuid + readOnly: true + title: Test execution id + type: string + success_count: + readOnly: true + title: Success count + type: integer + failure_count: + readOnly: true + title: Failure count + type: integer + successful_reruns: + items: + format: uuid + type: string + readOnly: true + type: array + failed_reruns: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + skipped: + readOnly: true + title: Skipped + type: boolean + reason: + minLength: 1 + readOnly: true + title: Reason + type: string + type: object + TestExecutionRerunResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_test_executions: 0 + rerun_type: rerun_type + overall_success_count: 5 + overall_failure_count: 5 + message: message + results: + - reason: reason + failed_reruns: + - key: failed_reruns + - key: failed_reruns + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_count: 6 + failure_count: 1 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + skipped: true + - reason: reason + failed_reruns: + - key: failed_reruns + - key: failed_reruns + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success_count: 6 + failure_count: 1 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + skipped: true + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + run_test_id: + format: uuid + readOnly: true + title: Run test id + type: string + rerun_type: + minLength: 1 + readOnly: true + title: Rerun type + type: string + total_test_executions: + readOnly: true + title: Total test executions + type: integer + results: + items: + $ref: '#/components/schemas/TestExecutionRerunResult' + readOnly: true + type: array + overall_success_count: + readOnly: true + title: Overall success count + type: integer + overall_failure_count: + readOnly: true + title: Overall failure count + type: integer + type: object + RunNewEvalsOnTestExecution: + example: + eval_config_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enable_tool_evaluation: true + test_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + test_execution_ids: + description: List of specific test execution IDs to run evaluations on + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to run evaluations on all test executions in the run + test + title: Select all + type: boolean + eval_config_ids: + description: List of SimulateEvalConfig IDs to run on the test executions + items: + format: uuid + type: string + type: array + enable_tool_evaluation: + description: "Whether to enable tool evaluation for this run (if not provided,\ + \ uses the run test's current setting)" + title: Enable tool evaluation + type: boolean + required: + - eval_config_ids + type: object + RunNewEvalsResponse: + example: + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + call_execution_count: 0 + properties: + message: + minLength: 1 + title: Message + type: string + run_test_id: + format: uuid + title: Run test id + type: string + call_execution_count: + title: Call execution count + type: integer + required: + - call_execution_count + - message + - run_test_id + type: object + RunTestScenarioItemResponse: + example: + name: name + id: id + row_count: 0 + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + row_count: + readOnly: true + title: Row count + type: integer + type: object + ChatSDKCodeResult: + example: + installation_guide: installation_guide + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sdk_code: sdk_code + properties: + installation_guide: + minLength: 1 + title: Installation guide + type: string + sdk_code: + minLength: 1 + title: Sdk code + type: string + run_test_id: + format: uuid + title: Run test id + type: string + run_test_name: + minLength: 1 + title: Run test name + type: string + required: + - installation_guide + - run_test_id + - run_test_name + - sdk_code + type: object + ChatSDKCodeResponse: + example: + result: + installation_guide: installation_guide + run_test_name: run_test_name + run_test_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sdk_code: sdk_code + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ChatSDKCodeResult' + required: + - result + type: object + ScenarioResponse: + example: + dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + description: Name of the scenario + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + description: Optional description of the scenario + nullable: true + title: Description + type: string + source: + description: Source content or reference for the scenario + minLength: 1 + title: Source + type: string + scenario_type: + description: "Type of scenario (graph, script, or dataset)" + enum: + - graph + - script + - dataset + title: Scenario type + type: string + scenario_type_display: + minLength: 1 + readOnly: true + title: Scenario type display + type: string + source_type: + description: "Source type for the scenario: agent_definition or prompt" + enum: + - agent_definition + - prompt + title: Source type + type: string + source_type_display: + minLength: 1 + readOnly: true + title: Source type display + type: string + organization: + description: Organization this scenario belongs to + format: uuid + readOnly: true + title: Organization + type: string + dataset: + description: Dataset associated with this scenario (only for dataset type + scenarios) + format: uuid + nullable: true + title: Dataset + type: string + dataset_rows: + readOnly: true + title: Dataset rows + type: string + dataset_column_config: + readOnly: true + title: Dataset column config + type: string + graph: + readOnly: true + title: Graph + type: string + agent: + readOnly: true + title: Agent + type: string + prompt_template: + description: Prompt template associated with this scenario (only for prompt + source type) + format: uuid + nullable: true + title: Prompt template + type: string + prompt_template_detail: + readOnly: true + title: Prompt template detail + type: string + prompt_version: + description: Prompt version associated with this scenario (only for prompt + source type) + format: uuid + nullable: true + title: Prompt version + type: string + prompt_version_detail: + readOnly: true + title: Prompt version detail + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + status: + description: Status of the scenario + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + title: Status + type: string + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + agent_type: + readOnly: true + title: Agent type + type: string + required: + - name + - source + type: object + ScenarioListResponse: + example: + next: next + previous: previous + count: 0 + results: + - dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + - dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + items: + $ref: '#/components/schemas/ScenarioResponse' + readOnly: true + type: array + type: object + ScenarioErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + minLength: 1 + nullable: true + title: Result + type: string + message: + minLength: 1 + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ColumnDefinition: + example: + name: name + data_type: text + description: description + properties: + name: + maxLength: 50 + minLength: 1 + title: Name + type: string + data_type: + enum: + - text + - boolean + - integer + - float + - json + - array + - image + - images + - datetime + - audio + - document + - others + - persona + title: Data type + type: string + description: + maxLength: 200 + minLength: 1 + title: Description + type: string + required: + - data_type + - description + - name + type: object + ScenarioCreateRequest: + example: + agent_name: agent_name + voice_provider: elevenlabs + initial_message_delay: 7 + description: description + voice_name: marissa + prompt_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + initial_message: initial_message + agent_definition_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + agent_prompt: agent_prompt + custom_instruction: custom_instruction + agent_definition_version_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model: gpt-4 + no_of_rows: 1610 + interrupt_sensitivity: 5.962133916683182 + kind: dataset + llm_temperature: 6.027456183070403 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_type: agent_definition + script_url: https://openapi-generator.tech + personas: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + graph: + key: "" + max_call_duration_in_minutes: 1 + add_persona_automatically: false + custom_columns: + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + conversation_speed: 5.637376656633329 + name: name + generate_graph: false + finished_speaking_sensitivity: 2.3021358869347655 + properties: + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + description: + title: Description + type: string + dataset_id: + format: uuid + title: Dataset id + type: string + kind: + default: dataset + enum: + - graph + - script + - dataset + title: Kind + type: string + script_url: + format: uri + minLength: 1 + nullable: true + title: Script url + type: string + agent_definition_id: + format: uuid + title: Agent definition id + type: string + agent_definition_version_id: + format: uuid + nullable: true + title: Agent definition version id + type: string + custom_instruction: + title: Custom instruction + type: string + no_of_rows: + default: 20 + maximum: 20000 + minimum: 10 + title: No of rows + type: integer + generate_graph: + default: false + title: Generate graph + type: boolean + graph: + additionalProperties: true + title: Graph + type: object + source_type: + default: agent_definition + enum: + - agent_definition + - prompt + title: Source type + type: string + prompt_template_id: + format: uuid + nullable: true + title: Prompt template id + type: string + prompt_version_id: + format: uuid + nullable: true + title: Prompt version id + type: string + add_persona_automatically: + default: false + title: Add persona automatically + type: boolean + personas: + items: + format: uuid + type: string + type: array + custom_columns: + items: + $ref: '#/components/schemas/ColumnDefinition' + maxItems: 10 + type: array + agent_name: + maxLength: 255 + minLength: 1 + title: Agent name + type: string + agent_prompt: + title: Agent prompt + type: string + voice_provider: + default: elevenlabs + maxLength: 100 + minLength: 1 + title: Voice provider + type: string + voice_name: + default: marissa + maxLength: 100 + minLength: 1 + title: Voice name + type: string + model: + default: gpt-4 + maxLength: 100 + minLength: 1 + title: Model + type: string + llm_temperature: + default: 0.7 + title: Llm temperature + type: number + initial_message: + title: Initial message + type: string + max_call_duration_in_minutes: + default: 30 + title: Max call duration in minutes + type: integer + interrupt_sensitivity: + default: 0.5 + title: Interrupt sensitivity + type: number + conversation_speed: + default: 1 + title: Conversation speed + type: number + finished_speaking_sensitivity: + default: 0.5 + title: Finished speaking sensitivity + type: number + initial_message_delay: + default: 0 + title: Initial message delay + type: integer + required: + - name + type: object + ScenarioCreateResponse: + example: + scenario: + dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + message: message + status: processing + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario: + $ref: '#/components/schemas/ScenarioResponse' + status: + enum: + - processing + readOnly: true + title: Status + type: string + type: object + ScenarioPromptItem: + example: + role: system + content: content + properties: + role: + enum: + - system + - user + - assistant + readOnly: true + title: Role + type: string + content: + minLength: 1 + readOnly: true + title: Content + type: string + type: object + ScenarioDetailResponse: + example: + dataset_rows: 0 + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source: source + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: + key: graph + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompts: + - role: system + content: content + - role: system + content: content + status: NotStarted + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + description: + minLength: 1 + nullable: true + readOnly: true + title: Description + type: string + source: + minLength: 1 + readOnly: true + title: Source + type: string + scenario_type: + enum: + - graph + - script + - dataset + readOnly: true + title: Scenario type + type: string + dataset_id: + format: uuid + nullable: true + readOnly: true + title: Dataset id + type: string + organization: + format: uuid + readOnly: true + title: Organization + type: string + dataset: + format: uuid + nullable: true + readOnly: true + title: Dataset + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + status: + enum: + - NotStarted + - Queued + - Running + - Completed + - Editing + - Inactive + - Failed + - PartialRun + - ExperimentEvaluation + - Uploading + - PartialExtracted + - Processing + - Deleting + - PartialCompleted + - OptimizationEvaluation + - Error + - Cancelled + readOnly: true + title: Status + type: string + agent_type: + minLength: 1 + nullable: true + readOnly: true + title: Agent type + type: string + graph: + additionalProperties: + nullable: true + type: string + readOnly: true + title: Graph + type: object + prompts: + items: + $ref: '#/components/schemas/ScenarioPromptItem' + readOnly: true + type: array + dataset_rows: + readOnly: true + title: Dataset rows + type: integer + type: object + ScenarioAddColumnsRequest: + example: + columns: + - name: name + data_type: text + description: description + - name: name + data_type: text + description: description + properties: + columns: + items: + $ref: '#/components/schemas/ColumnDefinition' + type: array + required: + - columns + type: object + ScenarioAddColumnsResponse: + example: + columns: + - columns + - columns + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario_id: + format: uuid + readOnly: true + title: Scenario id + type: string + dataset_id: + format: uuid + readOnly: true + title: Dataset id + type: string + columns: + items: + minLength: 1 + type: string + readOnly: true + type: array + type: object + ScenarioAddRowsRequest: + example: + num_rows: 1610 + description: description + properties: + num_rows: + maximum: 20000 + minimum: 10 + title: Num rows + type: integer + description: + title: Description + type: string + required: + - num_rows + type: object + ScenarioAddRowsResponse: + example: + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + num_rows: 0 + message: message + scenario_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario_id: + format: uuid + readOnly: true + title: Scenario id + type: string + dataset_id: + format: uuid + readOnly: true + title: Dataset id + type: string + num_rows: + readOnly: true + title: Num rows + type: integer + type: object + ScenarioDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + ScenarioEditRequest: + example: + name: name + description: description + prompt: prompt + graph: + key: "" + properties: + name: + maxLength: 255 + title: Name + type: string + description: + title: Description + type: string + graph: + additionalProperties: true + title: Graph + type: object + prompt: + title: Prompt + type: string + type: object + ScenarioEditResponse: + example: + scenario: + dataset_rows: dataset_rows + agent: agent + source_type_display: source_type_display + prompt_version_detail: prompt_version_detail + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: agent_definition + source: source + prompt_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + deleted_at: 2000-01-23T04:56:07.000+00:00 + graph: graph + prompt_template_detail: prompt_template_detail + dataset_column_config: dataset_column_config + agent_type: agent_type + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + scenario_type_display: scenario_type_display + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + scenario_type: graph + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: NotStarted + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + scenario: + $ref: '#/components/schemas/ScenarioResponse' + type: object + ScenarioEditPromptsRequest: + example: + prompts: prompts + properties: + prompts: + maxLength: 10000 + minLength: 1 + title: Prompts + type: string + required: + - prompts + type: object + ScenarioPromptsUpdateResponse: + example: + message: message + prompts: prompts + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + prompts: + minLength: 1 + readOnly: true + title: Prompts + type: string + type: object + SimulatorAgent: + example: + interrupt_sensitivity: 6.630201801377444 + voice_provider: voice_provider + logo_url: logo_url + llm_temperature: 1.1274753313266657 + initial_message_delay: 42 + created_at: 2000-01-23T04:56:07.000+00:00 + voice_name: voice_name + deleted_at: 2000-01-23T04:56:07.000+00:00 + max_call_duration_in_minutes: 41 + initial_message: initial_message + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + conversation_speed: 0.37850446629555956 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt: prompt + finished_speaking_sensitivity: 6.5583473083515 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + name: + description: Name of the simulator agent + maxLength: 255 + minLength: 1 + title: Name + type: string + prompt: + description: System prompt for the agent + minLength: 1 + title: Prompt + type: string + voice_provider: + description: Voice service provider + maxLength: 100 + minLength: 1 + title: Voice provider + type: string + voice_name: + description: Specific voice to use + maxLength: 100 + minLength: 1 + title: Voice name + type: string + interrupt_sensitivity: + description: Sensitivity for interruption detection (0-1) + maximum: 11 + minimum: 0 + title: Interrupt sensitivity + type: number + conversation_speed: + description: Speed of conversation (0.1-3.0) + maximum: 2 + minimum: 0.1 + title: Conversation speed + type: number + finished_speaking_sensitivity: + description: Sensitivity for detecting when speaker has finished (0-1) + maximum: 11 + minimum: 0 + title: Finished speaking sensitivity + type: number + model: + description: LLM model to use + maxLength: 100 + minLength: 1 + title: Model + type: string + llm_temperature: + description: Temperature setting for LLM (0-2) + maximum: 2 + minimum: 0 + title: Llm temperature + type: number + max_call_duration_in_minutes: + description: Maximum call duration in minutes (1-180) + maximum: 180 + minimum: 0 + title: Max call duration in minutes + type: integer + initial_message_delay: + description: Delay before initial message in seconds (0-60) + maximum: 60 + minimum: 0 + title: Initial message delay + type: integer + initial_message: + description: Initial message to send when conversation starts + title: Initial message + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + organization: + description: Organization this simulator agent belongs to + format: uuid + readOnly: true + title: Organization + type: string + deleted: + readOnly: true + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + readOnly: true + title: Deleted at + type: string + logo_url: + readOnly: true + title: Logo url + type: string + required: + - model + - name + - prompt + - voice_name + - voice_provider + type: object + SimulatorAgentListResponse: + example: + next: next + previous: previous + count: 0 + total_pages: 9 + results: + - interrupt_sensitivity: 6.630201801377444 + voice_provider: voice_provider + logo_url: logo_url + llm_temperature: 1.1274753313266657 + initial_message_delay: 42 + created_at: 2000-01-23T04:56:07.000+00:00 + voice_name: voice_name + deleted_at: 2000-01-23T04:56:07.000+00:00 + max_call_duration_in_minutes: 41 + initial_message: initial_message + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + conversation_speed: 0.37850446629555956 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt: prompt + finished_speaking_sensitivity: 6.5583473083515 + - interrupt_sensitivity: 6.630201801377444 + voice_provider: voice_provider + logo_url: logo_url + llm_temperature: 1.1274753313266657 + initial_message_delay: 42 + created_at: 2000-01-23T04:56:07.000+00:00 + voice_name: voice_name + deleted_at: 2000-01-23T04:56:07.000+00:00 + max_call_duration_in_minutes: 41 + initial_message: initial_message + deleted: true + updated_at: 2000-01-23T04:56:07.000+00:00 + conversation_speed: 0.37850446629555956 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + model: model + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + prompt: prompt + finished_speaking_sensitivity: 6.5583473083515 + current_page: 3 + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + items: + $ref: '#/components/schemas/SimulatorAgent' + readOnly: true + type: array + total_pages: + readOnly: true + title: Total pages + type: integer + current_page: + readOnly: true + title: Current page + type: integer + type: object + SimulatorAgentValidationErrorResponse: + additionalProperties: + items: + type: string + type: array + properties: {} + type: object + SimulatorAgentDeleteResponse: + example: + message: message + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + type: object + TestExecutionDetailResponse: + example: + next: next + agent_type: agent_type + previous: previous + provider: provider + count: 0 + total_pages: 6 + results: + - key: results + - key: results + current_page: 1 + error_messages: + - error_messages + - error_messages + column_order: + - key: column_order + - key: column_order + status: status + properties: + count: + readOnly: true + title: Count + type: integer + next: + minLength: 1 + nullable: true + readOnly: true + title: Next + type: string + previous: + minLength: 1 + nullable: true + readOnly: true + title: Previous + type: string + results: + description: Call execution rows may include dynamic eval/scenario columns. + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + total_pages: + readOnly: true + title: Total pages + type: integer + current_page: + readOnly: true + title: Current page + type: integer + column_order: + items: + additionalProperties: + nullable: true + type: string + type: object + readOnly: true + type: array + error_messages: + items: + minLength: 1 + type: string + readOnly: true + type: array + status: + minLength: 1 + readOnly: true + title: Status + type: string + provider: + minLength: 1 + readOnly: true + title: Provider + type: string + agent_type: + minLength: 1 + readOnly: true + title: Agent type + type: string + type: object + TestExecutionAnalytics: + example: + metadata: + key: metadata + evaluation_categories_over_test_runs: + key: evaluation_categories_over_test_runs + fail_rate_over_test_runs: + key: fail_rate_over_test_runs + properties: + fail_rate_over_test_runs: + additionalProperties: + nullable: true + type: string + description: Fail rate data for scatter plot chart + title: Fail rate over test runs + type: object + evaluation_categories_over_test_runs: + additionalProperties: + nullable: true + type: string + description: Evaluation categories data for line graph chart + title: Evaluation categories over test runs + type: object + metadata: + additionalProperties: + nullable: true + type: string + description: Metadata about the analytics data + title: Metadata + type: object + required: + - evaluation_categories_over_test_runs + - fail_rate_over_test_runs + - metadata + type: object + CancelTestExecutionResponse: + example: + success: true + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + success: + title: Success + type: boolean + message: + minLength: 1 + title: Message + type: string + test_execution_id: + format: uuid + nullable: true + title: Test execution id + type: string + required: + - message + - success + - test_execution_id + type: object + TestExecutionChatBatchResult: + example: + batched_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + has_more: true + properties: + call_execution_ids: + items: + format: uuid + type: string + type: array + has_more: + title: Has more + type: boolean + batched_scenarios: + items: + format: uuid + type: string + type: array + required: + - batched_scenarios + - call_execution_ids + - has_more + type: object + TestExecutionChatBatchResponse: + example: + result: + batched_scenarios: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + call_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + has_more: true + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/TestExecutionChatBatchResult' + required: + - result + type: object + ColumnOrder: + example: + visible: true + column_name: column_name + id: id + properties: + column_name: + minLength: 1 + title: Column name + type: string + id: + minLength: 1 + title: Id + type: string + visible: + title: Visible + type: boolean + required: + - column_name + - id + - visible + type: object + TestExecutionColumnOrder: + example: + column_order: + - visible: true + column_name: column_name + id: id + - visible: true + column_name: column_name + id: id + properties: + column_order: + items: + $ref: '#/components/schemas/ColumnOrder' + type: array + required: + - column_order + type: object + TestExecutionColumnOrderResponse: + example: + message: message + column_order: + - visible: true + column_name: column_name + id: id + - visible: true + column_name: column_name + id: id + properties: + message: + minLength: 1 + readOnly: true + title: Message + type: string + column_order: + items: + $ref: '#/components/schemas/ColumnOrder' + readOnly: true + type: array + type: object + EvalExplanationCluster: + example: + guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + properties: + kind: + minLength: 1 + readOnly: true + title: Kind + type: string + confidence: + minLength: 1 + readOnly: true + title: Confidence + type: string + theme: + minLength: 1 + readOnly: true + title: Theme + type: string + guidance: + minLength: 1 + readOnly: true + title: Guidance + type: string + evidenceSummary: + minLength: 1 + readOnly: true + title: Evidencesummary + type: string + eval_config_id: + format: uuid + readOnly: true + title: Eval config id + type: string + eval_template_id: + format: uuid + readOnly: true + title: Eval template id + type: string + eval_name: + minLength: 1 + readOnly: true + title: Eval name + type: string + type: object + EvalExplanationSummaryResult: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + status: status + properties: + response: + additionalProperties: + items: + $ref: '#/components/schemas/EvalExplanationCluster' + type: array + title: Response + type: object + last_updated: + format: date-time + nullable: true + title: Last updated + type: string + status: + minLength: 1 + title: Status + type: string + required: + - last_updated + - response + - status + type: object + EvalExplanationSummaryResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + - guidance: guidance + kind: kind + confidence: confidence + theme: theme + evidenceSummary: evidenceSummary + eval_config_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_template_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_name: eval_name + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalExplanationSummaryResult' + required: + - result + type: object + EvalExplanationSummaryRefreshResult: + example: + message: message + properties: + message: + minLength: 1 + title: Message + type: string + required: + - message + type: object + EvalExplanationSummaryRefreshResponse: + example: + result: + message: message + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/EvalExplanationSummaryRefreshResult' + required: + - result + type: object + RunTestKPIsResponse: + example: + avg_talk_ratio: 7.386281948385884 + avg_stop_time_after_interruption: 1.4894159098541704 + avg_user_wpm: 2.027123023002322 + avg_ai_interruption_rate: 1.0246457001441578 + avg_chat_latency_ms: 9.965781217890562 + is_inbound: true + avg_user_interruption_count: 9.301444243932576 + avg_turn_count: 9.369310271410669 + avg_total_tokens: 1.1730742509559433 + connected_calls: 5 + avg_output_tokens: 5.025004791520295 + avg_score: 6.027456183070403 + failed_calls: 8 + scenario_graphs: + key: + key: + key: "" + avg_response: 1.4658129805029452 + avg_csat_score: 6.683562403749608 + agent_talk_percentage: 6.84685269835264 + agent_type: agent_type + customer_talk_percentage: 7.457744773683766 + total_calls: 0 + avg_ai_interruption_count: 1.2315135367772556 + calls_attempted: 5 + calls_connected_percentage: 2.3021358869347655 + total_duration: 9.018348186070783 + avg_agent_latency: 7.061401241503109 + avg_bot_wpm: 4.145608029883936 + avg_input_tokens: 4.965218492984954 + avg_user_interruption_rate: 3.616076749251911 + properties: + total_calls: + readOnly: true + title: Total calls + type: integer + avg_score: + readOnly: true + title: Avg score + type: number + avg_response: + readOnly: true + title: Avg response + type: number + calls_attempted: + readOnly: true + title: Calls attempted + type: integer + connected_calls: + readOnly: true + title: Connected calls + type: integer + calls_connected_percentage: + readOnly: true + title: Calls connected percentage + type: number + scenario_graphs: + additionalProperties: + additionalProperties: + additionalProperties: true + type: object + type: object + readOnly: true + title: Scenario graphs + type: object + agent_type: + minLength: 1 + readOnly: true + title: Agent type + type: string + is_inbound: + nullable: true + readOnly: true + title: Is inbound + type: boolean + avg_agent_latency: + readOnly: true + title: Avg agent latency + type: number + avg_user_interruption_count: + readOnly: true + title: Avg user interruption count + type: number + avg_user_interruption_rate: + readOnly: true + title: Avg user interruption rate + type: number + avg_user_wpm: + readOnly: true + title: Avg user wpm + type: number + avg_bot_wpm: + readOnly: true + title: Avg bot wpm + type: number + avg_talk_ratio: + readOnly: true + title: Avg talk ratio + type: number + avg_ai_interruption_count: + readOnly: true + title: Avg ai interruption count + type: number + avg_ai_interruption_rate: + readOnly: true + title: Avg ai interruption rate + type: number + avg_stop_time_after_interruption: + readOnly: true + title: Avg stop time after interruption + type: number + agent_talk_percentage: + readOnly: true + title: Agent talk percentage + type: number + customer_talk_percentage: + readOnly: true + title: Customer talk percentage + type: number + avg_total_tokens: + readOnly: true + title: Avg total tokens + type: number + avg_input_tokens: + readOnly: true + title: Avg input tokens + type: number + avg_output_tokens: + readOnly: true + title: Avg output tokens + type: number + avg_chat_latency_ms: + readOnly: true + title: Avg chat latency ms + type: number + avg_turn_count: + readOnly: true + title: Avg turn count + type: number + avg_csat_score: + readOnly: true + title: Avg csat score + type: number + failed_calls: + readOnly: true + title: Failed calls + type: integer + total_duration: + readOnly: true + title: Total duration + type: number + type: object + OptimiserAnalysisResultPayload: + example: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + key: "" + message: message + status: status + properties: + response: + additionalProperties: + additionalProperties: true + type: object + title: Response + type: object + status: + minLength: 1 + title: Status + type: string + last_updated: + format: date-time + title: Last updated + type: string + message: + title: Message + type: string + required: + - response + - status + type: object + OptimiserAnalysisResponse: + example: + result: + last_updated: 2000-01-23T04:56:07.000+00:00 + response: + key: + key: "" + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/OptimiserAnalysisResultPayload' + required: + - result + type: object + OptimiserAnalysisRefreshResult: + example: + message: message + status: status + properties: + message: + minLength: 1 + title: Message + type: string + status: + minLength: 1 + title: Status + type: string + required: + - message + - status + type: object + OptimiserAnalysisRefreshResponse: + example: + result: + message: message + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/OptimiserAnalysisRefreshResult' + required: + - result + type: object + PerformanceSummary: + example: + test_run_performance_metrics: + key: 0.8008281904610115 + top_performing_scenarios: + - key: top_performing_scenarios + - key: top_performing_scenarios + properties: + test_run_performance_metrics: + additionalProperties: + type: number + description: "Performance metrics including pass rate, total test runs,\ + \ and latest fail rate" + title: Test run performance metrics + type: object + top_performing_scenarios: + description: List of top performing scenarios + items: + additionalProperties: + minLength: 1 + type: string + description: List of top performing scenarios with their performance scores + type: object + type: array + required: + - test_run_performance_metrics + - top_performing_scenarios + type: object + CallExecutionRerun: + example: + rerun_type: eval_only + call_execution_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + select_all: false + properties: + rerun_type: + description: "Type of rerun: evaluation only or call plus evaluation" + enum: + - eval_only + - call_and_eval + title: Rerun type + type: string + call_execution_ids: + description: List of specific call execution IDs to rerun + items: + format: uuid + type: string + type: array + select_all: + default: false + description: Whether to rerun all call executions in the test execution + title: Select all + type: boolean + required: + - rerun_type + type: object + FailedRerunItem: + example: + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + properties: + call_execution_id: + format: uuid + title: Call execution id + type: string + error: + minLength: 1 + title: Error + type: string + required: + - call_execution_id + - error + type: object + RerunCallsResponse: + example: + failed_reruns: + - call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + - call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: error + total_processed: 0 + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rerun_type: rerun_type + success_count: 6 + successful_reruns: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + failure_count: 1 + message: message + properties: + message: + minLength: 1 + title: Message + type: string + test_execution_id: + format: uuid + title: Test execution id + type: string + rerun_type: + minLength: 1 + title: Rerun type + type: string + total_processed: + title: Total processed + type: integer + successful_reruns: + items: + format: uuid + type: string + type: array + failed_reruns: + items: + $ref: '#/components/schemas/FailedRerunItem' + type: array + success_count: + title: Success count + type: integer + failure_count: + title: Failure count + type: integer + required: + - failed_reruns + - failure_count + - message + - rerun_type + - success_count + - successful_reruns + - test_execution_id + - total_processed + type: object + TestExecutionTranscriptCall: + example: + transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + scenario_name: scenario_name + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 0 + status: status + properties: + call_execution_id: + format: uuid + readOnly: true + title: Call execution id + type: string + phone_number: + minLength: 1 + nullable: true + readOnly: true + title: Phone number + type: string + status: + minLength: 1 + readOnly: true + title: Status + type: string + transcripts: + items: + $ref: '#/components/schemas/CallTranscript' + readOnly: true + type: array + total_transcripts: + readOnly: true + title: Total transcripts + type: integer + scenario_name: + minLength: 1 + nullable: true + readOnly: true + title: Scenario name + type: string + type: object + TestExecutionTranscriptsResponse: + example: + total_calls: 6 + calls: + - transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + scenario_name: scenario_name + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 0 + status: status + - transcripts: + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + - start_time_seconds: start_time_seconds + end_time_seconds: end_time_seconds + end_time_ms: 2147483647 + confidence_score: 1.4658129805029452 + speaker_role: user + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + start_time_ms: -2147483648 + content: content + scenario_name: scenario_name + call_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + phone_number: phone_number + total_transcripts: 0 + status: status + test_execution_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + total_transcripts: 1 + properties: + test_execution_id: + format: uuid + readOnly: true + title: Test execution id + type: string + calls: + items: + $ref: '#/components/schemas/TestExecutionTranscriptCall' + readOnly: true + type: array + total_calls: + readOnly: true + title: Total calls + type: integer + total_transcripts: + readOnly: true + title: Total transcripts + type: integer + type: object + BulkAnnotationAnnotationRequest: + example: + value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + properties: + annotation_label_id: + format: uuid + title: Annotation label id + type: string + value: + title: Value + type: string + value_float: + title: Value float + type: number + value_bool: + title: Value bool + type: boolean + value_str_list: + items: + minLength: 1 + type: string + type: array + required: + - annotation_label_id + type: object + BulkAnnotationNoteRequest: + example: + text: text + properties: + text: + minLength: 1 + title: Text + type: string + required: + - text + type: object + BulkAnnotationRecordRequest: + example: + notes: + - text: text + - text: text + observation_span_id: observation_span_id + annotations: + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + properties: + observation_span_id: + minLength: 1 + title: Observation span id + type: string + annotations: + items: + $ref: '#/components/schemas/BulkAnnotationAnnotationRequest' + type: array + notes: + items: + $ref: '#/components/schemas/BulkAnnotationNoteRequest' + type: array + required: + - observation_span_id + type: object + BulkAnnotationRequest: + example: + records: + - notes: + - text: text + - text: text + observation_span_id: observation_span_id + annotations: + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - notes: + - text: text + - text: text + observation_span_id: observation_span_id + annotations: + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + - value_float: 0.8008281904610115 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + value_bool: true + value_str_list: + - value_str_list + - value_str_list + value: value + properties: + records: + items: + $ref: '#/components/schemas/BulkAnnotationRecordRequest' + type: array + required: + - records + type: object + BulkAnnotationResponseResult: + example: + notes_created: 1 + succeeded_count: 5 + warnings: + - key: "" + - key: "" + annotations_updated: 6 + warnings_count: 2 + message: message + annotations_created: 0 + errors: + - key: "" + - key: "" + errors_count: 5 + properties: + message: + minLength: 1 + title: Message + type: string + annotations_created: + title: Annotations created + type: integer + annotations_updated: + title: Annotations updated + type: integer + notes_created: + title: Notes created + type: integer + succeeded_count: + title: Succeeded count + type: integer + errors_count: + title: Errors count + type: integer + warnings_count: + title: Warnings count + type: integer + warnings: + items: + additionalProperties: true + type: object + nullable: true + type: array + errors: + items: + additionalProperties: true + type: object + nullable: true + type: array + required: + - annotations_created + - annotations_updated + - errors_count + - message + - notes_created + - succeeded_count + - warnings_count + type: object + BulkAnnotationResponse: + example: + result: + notes_created: 1 + succeeded_count: 5 + warnings: + - key: "" + - key: "" + annotations_updated: 6 + warnings_count: 2 + message: message + annotations_created: 0 + errors: + - key: "" + - key: "" + errors_count: 5 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/BulkAnnotationResponseResult' + required: + - result + type: object + ApiErrorResponse: + example: + result: result + code: code + details: + key: + - details + - details + detail: detail + type: validation_error + message: message + error: error + attr: attr + status: false + properties: + status: + default: false + title: Status + type: boolean + type: + enum: + - validation_error + - authentication_error + - payment_required + - entitlement_error + - permission_error + - not_found + - conflict + - client_error + - rate_limit + - server_error + - service_unavailable + - timeout + - api_error + nullable: true + title: Type + type: string + code: + nullable: true + title: Code + type: string + detail: + nullable: true + title: Detail + type: string + result: + nullable: true + title: Result + type: string + message: + nullable: true + title: Message + type: string + error: + nullable: true + title: Error + type: string + attr: + nullable: true + title: Attr + type: string + details: + additionalProperties: + items: + minLength: 1 + type: string + type: array + title: Details + type: object + type: object + ErrorName: + example: + name: name + type: type + properties: + name: + minLength: 1 + title: Name + type: string + type: + title: Type + type: string + required: + - name + - type + type: object + TrendPoint: + example: + value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + timestamp: + format: date-time + title: Timestamp + type: string + value: + title: Value + type: integer + users: + title: Users + type: integer + required: + - timestamp + - users + - value + type: object + FeedListRow: + example: + severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + properties: + cluster_id: + minLength: 1 + title: Cluster id + type: string + source: + minLength: 1 + title: Source + type: string + error: + $ref: '#/components/schemas/ErrorName' + status: + minLength: 1 + title: Status + type: string + severity: + minLength: 1 + title: Severity + type: string + occurrences: + title: Occurrences + type: integer + trace_count: + title: Trace count + type: integer + fix_layer: + minLength: 1 + nullable: true + title: Fix layer + type: string + users_affected: + title: Users affected + type: integer + sessions: + title: Sessions + type: integer + first_seen: + format: date-time + nullable: true + title: First seen + type: string + last_seen: + format: date-time + nullable: true + title: Last seen + type: string + trends: + items: + $ref: '#/components/schemas/TrendPoint' + type: array + assignees: + items: + minLength: 1 + type: string + type: array + model: + minLength: 1 + nullable: true + title: Model + type: string + model_version: + minLength: 1 + nullable: true + title: Model version + type: string + project: + minLength: 1 + nullable: true + title: Project + type: string + project_id: + minLength: 1 + nullable: true + title: Project id + type: string + environment: + minLength: 1 + nullable: true + title: Environment + type: string + eval_score: + nullable: true + title: Eval score + type: number + trace_id: + minLength: 1 + nullable: true + title: Trace id + type: string + external_issue_url: + minLength: 1 + nullable: true + title: External issue url + type: string + external_issue_id: + minLength: 1 + nullable: true + title: External issue id + type: string + required: + - assignees + - cluster_id + - environment + - error + - eval_score + - external_issue_id + - external_issue_url + - first_seen + - fix_layer + - last_seen + - model + - model_version + - occurrences + - project + - project_id + - sessions + - severity + - source + - status + - trace_count + - trace_id + - trends + - users_affected + type: object + FeedListResponse: + example: + total: 9 + data: + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + offset: 2 + limit: 3 + properties: + data: + items: + $ref: '#/components/schemas/FeedListRow' + type: array + total: + title: Total + type: integer + limit: + title: Limit + type: integer + offset: + title: Offset + type: integer + required: + - data + - limit + - offset + - total + type: object + FeedListApiResponse: + example: + result: + total: 9 + data: + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + - severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + offset: 2 + limit: 3 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedListResponse' + required: + - result + type: object + FeedStats: + example: + total_errors: 0 + acknowledged: 5 + for_review: 1 + escalating: 6 + resolved: 5 + affected_users: 2 + properties: + total_errors: + title: Total errors + type: integer + escalating: + title: Escalating + type: integer + for_review: + title: For review + type: integer + acknowledged: + title: Acknowledged + type: integer + resolved: + title: Resolved + type: integer + affected_users: + title: Affected users + type: integer + required: + - acknowledged + - affected_users + - escalating + - for_review + - resolved + - total_errors + type: object + FeedStatsApiResponse: + example: + result: + total_errors: 0 + acknowledged: 5 + for_review: 1 + escalating: 6 + resolved: 5 + affected_users: 2 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedStats' + required: + - result + type: object + TracePreview: + example: + output: output + input: input + trace_id: trace_id + properties: + trace_id: + minLength: 1 + title: Trace id + type: string + input: + minLength: 1 + nullable: true + title: Input + type: string + output: + minLength: 1 + nullable: true + title: Output + type: string + required: + - input + - output + - trace_id + type: object + FeedDetailCore: + example: + representative_trace: + output: output + input: input + trace_id: trace_id + success_trace: + output: output + input: input + trace_id: trace_id + description: description + row: + severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + properties: + row: + $ref: '#/components/schemas/FeedListRow' + description: + minLength: 1 + nullable: true + title: Description + type: string + success_trace: + $ref: '#/components/schemas/TracePreview' + representative_trace: + $ref: '#/components/schemas/TracePreview' + required: + - description + - representative_trace + - row + - success_trace + type: object + FeedDetailApiResponse: + example: + result: + representative_trace: + output: output + input: input + trace_id: trace_id + success_trace: + output: output + input: input + trace_id: trace_id + description: description + row: + severity: severity + occurrences: 0 + fix_layer: fix_layer + model_version: model_version + sessions: 5 + trace_id: trace_id + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + trace_count: 6 + users_affected: 1 + assignees: + - assignees + - assignees + project: project + external_issue_url: external_issue_url + source: source + error: + name: name + type: type + cluster_id: cluster_id + environment: environment + project_id: project_id + eval_score: 7.061401241503109 + external_issue_id: external_issue_id + model: model + trends: + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + - value: 5 + users: 2 + timestamp: 2000-01-23T04:56:07.000+00:00 + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedDetailCore' + required: + - result + type: object + FeedUpdateBody: + example: + severity: critical + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assignee: assignee + status: escalating + properties: + project_id: + format: uuid + title: Project id + type: string + status: + enum: + - escalating + - for_review + - acknowledged + - resolved + title: Status + type: string + severity: + enum: + - critical + - high + - medium + - low + title: Severity + type: string + assignee: + format: email + minLength: 1 + nullable: true + title: Assignee + type: string + type: object + CreateLinearIssue: + example: + description: description + team_id: team_id + title: title + priority: 0 + properties: + team_id: + minLength: 1 + title: Team id + type: string + title: + title: Title + type: string + description: + title: Description + type: string + priority: + default: 0 + title: Priority + type: integer + required: + - team_id + type: object + CreateLinearIssueResult: + example: + issue_url: issue_url + issue_id: issue_id + already_linked: true + issue_title: issue_title + properties: + already_linked: + title: Already linked + type: boolean + issue_id: + minLength: 1 + nullable: true + title: Issue id + type: string + issue_url: + minLength: 1 + nullable: true + title: Issue url + type: string + issue_title: + minLength: 1 + nullable: true + title: Issue title + type: string + type: object + CreateLinearIssueResponse: + example: + result: + issue_url: issue_url + issue_id: issue_id + already_linked: true + issue_title: issue_title + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/CreateLinearIssueResult' + required: + - result + type: object + DeepAnalysisBody: + example: + trace_id: trace_id + force: false + properties: + trace_id: + minLength: 1 + title: Trace id + type: string + force: + default: false + title: Force + type: boolean + required: + - trace_id + type: object + DeepAnalysisDispatchResponse: + example: + trace_id: trace_id + status: status + properties: + status: + minLength: 1 + title: Status + type: string + trace_id: + minLength: 1 + title: Trace id + type: string + required: + - status + - trace_id + type: object + DeepAnalysisDispatchApiResponse: + example: + result: + trace_id: trace_id + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/DeepAnalysisDispatchResponse' + required: + - result + type: object + EventsOverTimePoint: + example: + date: date + passing: 6 + errors: 0 + users: 1 + properties: + date: + minLength: 1 + title: Date + type: string + errors: + title: Errors + type: integer + passing: + title: Passing + type: integer + users: + title: Users + type: integer + required: + - date + - errors + - passing + - users + type: object + PatternInsight: + example: + caption: caption + value: value + properties: + value: + minLength: 1 + title: Value + type: string + caption: + minLength: 1 + title: Caption + type: string + required: + - caption + - value + type: object + KeyMoment: + example: + kevinified: kevinified + verbatim: verbatim + properties: + kevinified: + minLength: 1 + title: Kevinified + type: string + verbatim: + title: Verbatim + type: string + required: + - kevinified + - verbatim + type: object + PatternSummary: + example: + insights: + - caption: caption + value: value + - caption: caption + value: value + key_moments: + - kevinified: kevinified + verbatim: verbatim + - kevinified: kevinified + verbatim: verbatim + properties: + insights: + items: + $ref: '#/components/schemas/PatternInsight' + type: array + key_moments: + items: + $ref: '#/components/schemas/KeyMoment' + type: array + required: + - insights + - key_moments + type: object + TraceSummary: + example: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + properties: + eval_score: + nullable: true + title: Eval score + type: number + latency_ms: + nullable: true + title: Latency ms + type: integer + turns: + nullable: true + title: Turns + type: integer + model: + minLength: 1 + nullable: true + title: Model + type: string + input_tokens: + nullable: true + title: Input tokens + type: integer + output_tokens: + nullable: true + title: Output tokens + type: integer + required: + - eval_score + - input_tokens + - latency_ms + - model + - output_tokens + - turns + type: object + TraceEvidence: + example: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + properties: + input: + minLength: 1 + nullable: true + title: Input + type: string + output: + minLength: 1 + nullable: true + title: Output + type: string + fail_reel: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + pass_reel: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + required: + - fail_reel + - input + - output + - pass_reel + type: object + AgentFlowGraph: + example: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + properties: + nodes: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + edges: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + required: + - edges + - nodes + type: object + RepresentativeTrace: + example: + summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + id: + minLength: 1 + title: Id + type: string + status: + minLength: 1 + title: Status + type: string + timestamp: + format: date-time + nullable: true + title: Timestamp + type: string + summary: + $ref: '#/components/schemas/TraceSummary' + evidence: + $ref: '#/components/schemas/TraceEvidence' + agent_flow: + $ref: '#/components/schemas/AgentFlowGraph' + root_causes: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + recommendations: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + what_changed: + additionalProperties: + nullable: true + type: string + title: What changed + type: object + required: + - agent_flow + - evidence + - id + - recommendations + - root_causes + - status + - summary + - timestamp + - what_changed + type: object + OverviewResponse: + example: + pattern_summary: + insights: + - caption: caption + value: value + - caption: caption + value: value + key_moments: + - kevinified: kevinified + verbatim: verbatim + - kevinified: kevinified + verbatim: verbatim + representative_traces: + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + properties: + events_over_time: + items: + $ref: '#/components/schemas/EventsOverTimePoint' + type: array + pattern_summary: + $ref: '#/components/schemas/PatternSummary' + representative_traces: + items: + $ref: '#/components/schemas/RepresentativeTrace' + type: array + required: + - events_over_time + - pattern_summary + - representative_traces + type: object + OverviewApiResponse: + example: + result: + pattern_summary: + insights: + - caption: caption + value: value + - caption: caption + value: value + key_moments: + - kevinified: kevinified + verbatim: verbatim + - kevinified: kevinified + verbatim: verbatim + representative_traces: + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + - summary: + eval_score: 5.962133916683182 + model: model + output_tokens: 9 + input_tokens: 7 + latency_ms: 5 + turns: 2 + evidence: + output: output + input: input + fail_reel: + - key: fail_reel + - key: fail_reel + pass_reel: + - key: pass_reel + - key: pass_reel + what_changed: + key: what_changed + agent_flow: + nodes: + - key: nodes + - key: nodes + edges: + - key: edges + - key: edges + root_causes: + - key: root_causes + - key: root_causes + id: id + recommendations: + - key: recommendations + - key: recommendations + status: status + timestamp: 2000-01-23T04:56:07.000+00:00 + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/OverviewResponse' + required: + - result + type: object + RootCause: + example: + rank: 0 + description: description + title: title + properties: + rank: + title: Rank + type: integer + title: + minLength: 1 + title: Title + type: string + description: + minLength: 1 + title: Description + type: string + required: + - description + - rank + - title + type: object + Recommendation: + example: + root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + properties: + id: + minLength: 1 + title: Id + type: string + title: + minLength: 1 + title: Title + type: string + description: + title: Description + type: string + priority: + minLength: 1 + title: Priority + type: string + root_cause_link: + nullable: true + title: Root cause link + type: integer + immediate_fix: + minLength: 1 + nullable: true + title: Immediate fix + type: string + insights: + minLength: 1 + nullable: true + title: Insights + type: string + evidence: + items: + minLength: 1 + type: string + type: array + required: + - description + - evidence + - id + - immediate_fix + - insights + - priority + - root_cause_link + - title + type: object + DeepAnalysisResponse: + example: + trace_id: trace_id + root_causes: + - rank: 0 + description: description + title: title + - rank: 0 + description: description + title: title + immediate_fix: immediate_fix + recommendations: + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + status: status + properties: + status: + minLength: 1 + title: Status + type: string + trace_id: + minLength: 1 + title: Trace id + type: string + root_causes: + items: + $ref: '#/components/schemas/RootCause' + type: array + recommendations: + items: + $ref: '#/components/schemas/Recommendation' + type: array + immediate_fix: + minLength: 1 + nullable: true + title: Immediate fix + type: string + required: + - immediate_fix + - recommendations + - root_causes + - status + - trace_id + type: object + DeepAnalysisApiResponse: + example: + result: + trace_id: trace_id + root_causes: + - rank: 0 + description: description + title: title + - rank: 0 + description: description + title: title + immediate_fix: immediate_fix + recommendations: + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + - root_cause_link: 6 + evidence: + - evidence + - evidence + insights: insights + description: description + id: id + immediate_fix: immediate_fix + title: title + priority: priority + status: status + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/DeepAnalysisResponse' + required: + - result + type: object + SidebarTimeline: + example: + age_days: 0 + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + properties: + first_seen: + format: date-time + nullable: true + title: First seen + type: string + last_seen: + format: date-time + nullable: true + title: Last seen + type: string + age_days: + nullable: true + title: Age days + type: integer + required: + - age_days + - first_seen + - last_seen + type: object + SidebarAIMetadata: + example: + model_version: model_version + trace_id: trace_id + eval_score: 6.027456183070403 + project: project + model: model + properties: + model: + minLength: 1 + nullable: true + title: Model + type: string + model_version: + minLength: 1 + nullable: true + title: Model version + type: string + project: + minLength: 1 + nullable: true + title: Project + type: string + eval_score: + nullable: true + title: Eval score + type: number + trace_id: + minLength: 1 + nullable: true + title: Trace id + type: string + required: + - eval_score + - model + - model_version + - project + - trace_id + type: object + EvaluationResult: + example: + result: result + score: 1.4658129805029452 + label: label + type: type + value: value + properties: + label: + minLength: 1 + title: Label + type: string + type: + minLength: 1 + title: Type + type: string + result: + minLength: 1 + title: Result + type: string + score: + nullable: true + title: Score + type: number + value: + minLength: 1 + nullable: true + title: Value + type: string + required: + - label + - result + - score + - type + - value + type: object + CoOccurringIssue: + example: + severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + properties: + id: + minLength: 1 + title: Id + type: string + title: + minLength: 1 + title: Title + type: string + type: + title: Type + type: string + co_occurrence: + title: Co occurrence + type: number + count: + title: Count + type: integer + severity: + minLength: 1 + title: Severity + type: string + required: + - co_occurrence + - count + - id + - severity + - title + - type + type: object + FeedSidebar: + example: + evaluations: + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + timeline: + age_days: 0 + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + co_occurring_issues: + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + ai_metadata: + model_version: model_version + trace_id: trace_id + eval_score: 6.027456183070403 + project: project + model: model + properties: + timeline: + $ref: '#/components/schemas/SidebarTimeline' + ai_metadata: + $ref: '#/components/schemas/SidebarAIMetadata' + evaluations: + items: + $ref: '#/components/schemas/EvaluationResult' + type: array + co_occurring_issues: + items: + $ref: '#/components/schemas/CoOccurringIssue' + type: array + required: + - ai_metadata + - co_occurring_issues + - evaluations + - timeline + type: object + FeedSidebarApiResponse: + example: + result: + evaluations: + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + - result: result + score: 1.4658129805029452 + label: label + type: type + value: value + timeline: + age_days: 0 + first_seen: 2000-01-23T04:56:07.000+00:00 + last_seen: 2000-01-23T04:56:07.000+00:00 + co_occurring_issues: + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + - severity: severity + count: 5 + id: id + title: title + type: type + co_occurrence: 5.962133916683182 + ai_metadata: + model_version: model_version + trace_id: trace_id + eval_score: 6.027456183070403 + project: project + model: model + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/FeedSidebar' + required: + - result + type: object + TracesAggregates: + example: + passing_traces: 1 + p95_latency: 2 + avg_turns: 7.061401241503109 + p50_latency: 5 + total_traces: 0 + failing_traces: 6 + avg_score: 5.962133916683182 + properties: + total_traces: + title: Total traces + type: integer + failing_traces: + title: Failing traces + type: integer + passing_traces: + title: Passing traces + type: integer + avg_score: + title: Avg score + type: number + p50_latency: + title: P50 latency + type: integer + p95_latency: + title: P95 latency + type: integer + avg_turns: + title: Avg turns + type: number + required: + - avg_score + - avg_turns + - failing_traces + - p50_latency + - p95_latency + - passing_traces + - total_traces + type: object + TracesListRow: + example: + input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + properties: + id: + minLength: 1 + title: Id + type: string + input: + minLength: 1 + nullable: true + title: Input + type: string + timestamp: + format: date-time + nullable: true + title: Timestamp + type: string + latency_ms: + nullable: true + title: Latency ms + type: integer + tokens: + nullable: true + title: Tokens + type: integer + cost: + nullable: true + title: Cost + type: number + score: + nullable: true + title: Score + type: number + turns: + nullable: true + title: Turns + type: integer + required: + - cost + - id + - input + - latency_ms + - score + - timestamp + - tokens + - turns + type: object + TracesTabResponse: + example: + total: 1 + traces: + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + aggregates: + passing_traces: 1 + p95_latency: 2 + avg_turns: 7.061401241503109 + p50_latency: 5 + total_traces: 0 + failing_traces: 6 + avg_score: 5.962133916683182 + properties: + aggregates: + $ref: '#/components/schemas/TracesAggregates' + traces: + items: + $ref: '#/components/schemas/TracesListRow' + type: array + total: + title: Total + type: integer + required: + - aggregates + - total + - traces + type: object + TracesTabApiResponse: + example: + result: + total: 1 + traces: + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + - input: input + score: 4.145608029883936 + cost: 2.027123023002322 + tokens: 3 + id: id + timestamp: 2000-01-23T04:56:07.000+00:00 + latency_ms: 9 + turns: 7 + aggregates: + passing_traces: 1 + p95_latency: 2 + avg_turns: 7.061401241503109 + p50_latency: 5 + total_traces: 0 + failing_traces: 6 + avg_score: 5.962133916683182 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/TracesTabResponse' + required: + - result + type: object + TrendMetric: + example: + unit: unit + delta: 0.8008281904610115 + label: label + value: value + properties: + label: + minLength: 1 + title: Label + type: string + value: + minLength: 1 + title: Value + type: string + delta: + title: Delta + type: number + unit: + title: Unit + type: string + required: + - delta + - label + - unit + - value + type: object + ScoreTrend: + example: + current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + properties: + label: + minLength: 1 + title: Label + type: string + current: + title: Current + type: number + prev: + title: Prev + type: number + sparkline: + items: + type: number + type: array + required: + - current + - label + - prev + - sparkline + type: object + HeatmapCell: + example: + hour: 2 + day: 5 + value: 7 + properties: + day: + title: Day + type: integer + hour: + title: Hour + type: integer + value: + title: Value + type: integer + required: + - day + - hour + - value + type: object + TrendsTabResponse: + example: + activity_heatmap: + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + metrics: + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + score_trends: + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + properties: + metrics: + items: + $ref: '#/components/schemas/TrendMetric' + type: array + events_over_time: + items: + $ref: '#/components/schemas/EventsOverTimePoint' + type: array + score_trends: + items: + $ref: '#/components/schemas/ScoreTrend' + type: array + activity_heatmap: + items: + items: + $ref: '#/components/schemas/HeatmapCell' + type: array + type: array + required: + - activity_heatmap + - events_over_time + - metrics + - score_trends + type: object + TrendsTabApiResponse: + example: + result: + activity_heatmap: + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + - - hour: 2 + day: 5 + value: 7 + - hour: 2 + day: 5 + value: 7 + metrics: + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + - unit: unit + delta: 0.8008281904610115 + label: label + value: value + events_over_time: + - date: date + passing: 6 + errors: 0 + users: 1 + - date: date + passing: 6 + errors: 0 + users: 1 + score_trends: + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + - current: 6.027456183070403 + prev: 1.4658129805029452 + label: label + sparkline: + - 5.962133916683182 + - 5.962133916683182 + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/TrendsTabResponse' + required: + - result + type: object + AnnotationLabelResponse: + example: + settings: + key: "" + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + properties: + id: + format: uuid + title: Id + type: string + name: + minLength: 1 + title: Name + type: string + type: + minLength: 1 + title: Type + type: string + description: + nullable: true + title: Description + type: string + settings: + additionalProperties: true + title: Settings + type: object + required: + - id + - name + - type + type: object + GetAnnotationLabelsResponse: + example: + result: + - settings: + key: "" + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + - settings: + key: "" + name: name + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/AnnotationLabelResponse' + type: array + required: + - result + type: object + ObserveGraphDataRequest: + example: + req_data_config: + filter_value: "" + output_type: output_type + id: id + type: SYSTEM_METRIC + choices: + - choices + - choices + eval_output_type: eval_output_type + value: "" + filter_op: filter_op + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + property: average + interval: day + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + properties: + project_id: + format: uuid + title: Project id + type: string + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + interval: + default: day + enum: + - hour + - day + - week + - month + title: Interval + type: string + property: + default: average + title: Property + type: string + req_data_config: + $ref: '#/components/schemas/Req_data_config' + required: + - project_id + - req_data_config + type: object + ObserveGraphDataPoint: + example: + primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + properties: + timestamp: + minLength: 1 + title: Timestamp + type: string + value: + nullable: true + title: Value + type: number + primary_traffic: + nullable: true + title: Primary traffic + type: number + required: + - timestamp + - value + type: object + ObserveGraphDataResult: + example: + metric_name: metric_name + data: + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + properties: + metric_name: + title: Metric name + type: string + data: + items: + $ref: '#/components/schemas/ObserveGraphDataPoint' + type: array + required: + - data + - metric_name + type: object + ObserveGraphDataResponse: + example: + result: + metric_name: metric_name + data: + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + - primary_traffic: 6.027456183070403 + value: 0.8008281904610115 + timestamp: timestamp + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/ObserveGraphDataResult' + required: + - result + type: object + Project: + example: + metadata: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: Numeric + created_at: 2000-01-23T04:56:07.000+00:00 + source: demo + tags: + key: "" + trace_type: experiment + session_config: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + model_type: + enum: + - Numeric + - ScoreCategorical + - Ranking + - BinaryClassification + - Regression + - ObjectDetection + - Segmentation + - GenerativeLLM + - GenerativeImage + - GenerativeVideo + - TTS + - STT + - MultiModal + title: Model type + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + trace_type: + enum: + - experiment + - observe + title: Trace type + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + organization: + format: uuid + readOnly: true + title: Organization + type: string + workspace: + format: uuid + nullable: true + readOnly: true + title: Workspace + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + config: + additionalProperties: true + description: Any valid JSON value. + title: Config + type: object + x-json-value: true + source: + enum: + - demo + - prototype + - simulator + title: Source + type: string + session_config: + additionalProperties: true + description: Any valid JSON value. + title: Session config + type: object + x-json-value: true + tags: + additionalProperties: true + description: Any valid JSON value. + title: Tags + type: object + x-json-value: true + required: + - model_type + - name + - trace_type + type: object + GetTraceAnnotation: + example: + trace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + exclude_annotators: exclude_annotators + observation_span_id: observation_span_id + annotators: annotators + properties: + observation_span_id: + maxLength: 255 + minLength: 1 + nullable: true + title: Observation span id + type: string + trace_id: + format: uuid + nullable: true + title: Trace id + type: string + annotators: + description: JSON-encoded UUID list. + title: Annotators + type: string + exclude_annotators: + description: JSON-encoded UUID list. + title: Exclude annotators + type: string + type: object + TraceAnnotationValueResponse: + example: + annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + properties: + id: + format: uuid + title: Id + type: string + annotation_label_name: + minLength: 1 + title: Annotation label name + type: string + annotation_value: + additionalProperties: true + title: Annotation value + type: object + annotation_label_id: + format: uuid + title: Annotation label id + type: string + annotator: + minLength: 1 + nullable: true + title: Annotator + type: string + annotator_id: + format: uuid + nullable: true + title: Annotator id + type: string + updated_by: + minLength: 1 + nullable: true + title: Updated by + type: string + updated_at: + format: date-time + nullable: true + title: Updated at + type: string + annotation_type: + minLength: 1 + title: Annotation type + type: string + settings: + additionalProperties: true + title: Settings + type: object + required: + - annotation_label_id + - annotation_label_name + - annotation_type + - annotation_value + - id + type: object + TraceAnnotationNoteResponse: + example: + notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + properties: + id: + format: uuid + title: Id + type: string + notes: + title: Notes + type: string + created_by_annotator: + minLength: 1 + title: Created by annotator + type: string + created_by_user: + minLength: 1 + title: Created by user + type: string + created_by_user_id: + format: uuid + title: Created by user id + type: string + updated_at: + format: date-time + title: Updated at + type: string + required: + - created_by_annotator + - created_by_user + - created_by_user_id + - id + - notes + - updated_at + type: object + GetTraceAnnotationValuesResult: + example: + notes: + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + annotations: + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + properties: + annotations: + items: + $ref: '#/components/schemas/TraceAnnotationValueResponse' + type: array + notes: + items: + $ref: '#/components/schemas/TraceAnnotationNoteResponse' + type: array + required: + - annotations + - notes + type: object + GetTraceAnnotationValuesResponse: + example: + result: + notes: + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + - notes: notes + updated_at: 2000-01-23T04:56:07.000+00:00 + created_by_annotator: created_by_annotator + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by_user: created_by_user + annotations: + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + - annotation_label_name: annotation_label_name + annotation_value: + key: "" + settings: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + annotation_label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_by: updated_by + annotator_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotation_type: annotation_type + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator: annotator + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/GetTraceAnnotationValuesResult' + required: + - result + type: object + TraceSession: + example: + bookmarked: true + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + project: + format: uuid + title: Project + type: string + bookmarked: + title: Bookmarked + type: boolean + name: + maxLength: 255 + nullable: true + title: Name + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + required: + - project + type: object + TraceSessionGraphDataRequest: + example: + req_data_config: + filter_value: "" + output_type: output_type + id: id + type: SYSTEM_METRIC + choices: + - choices + - choices + eval_output_type: eval_output_type + value: "" + filter_op: filter_op + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + property: average + interval: day + filters: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + properties: + project_id: + format: uuid + title: Project id + type: string + filters: + items: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner' + type: array + interval: + default: day + enum: + - hour + - day + - week + - month + title: Interval + type: string + property: + default: average + title: Property + type: string + req_data_config: + $ref: '#/components/schemas/Req_data_config' + required: + - project_id + - req_data_config + type: object + Trace: + example: + output: + key: "" + input: + key: "" + metadata: + key: "" + session: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + external_id: external_id + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: + key: "" + tags: + key: "" + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + project: + format: uuid + title: Project + type: string + project_version: + format: uuid + title: Project version + type: string + name: + maxLength: 2000 + nullable: true + title: Name + type: string + metadata: + additionalProperties: true + title: Metadata + type: object + input: + additionalProperties: true + title: Input + type: object + output: + additionalProperties: true + title: Output + type: object + error: + additionalProperties: true + title: Error + type: object + session: + format: uuid + title: Session + type: string + external_id: + maxLength: 255 + nullable: true + title: External id + type: string + tags: + additionalProperties: true + title: Tags + type: object + required: + - project + type: object + TraceTagsUpdate: + example: + tags: + - tags + - tags + properties: + tags: + items: + minLength: 1 + type: string + type: array + required: + - tags + type: object + UserAlertMonitorLog: + example: + resolved_by: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + time_window_end: 2000-01-23T04:56:07.000+00:00 + resolved_at: 2000-01-23T04:56:07.000+00:00 + time_window_start: 2000-01-23T04:56:07.000+00:00 + link: https://openapi-generator.tech + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: critical + message: message + resolved: true + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + resolved_by: + $ref: '#/components/schemas/User' + created_at: + format: date-time + readOnly: true + title: Created at + type: string + type: + enum: + - critical + - warning + title: Type + type: string + message: + minLength: 1 + title: Message + type: string + resolved: + title: Resolved + type: boolean + resolved_at: + format: date-time + nullable: true + title: Resolved at + type: string + link: + format: uri + maxLength: 200 + nullable: true + title: Link + type: string + time_window_start: + format: date-time + nullable: true + title: Time window start + type: string + time_window_end: + format: date-time + nullable: true + title: Time window end + type: string + required: + - message + - type + type: object + UserAlertMonitor: + example: + slack_notes: slack_notes + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + slack_webhook_url: https://openapi-generator.tech + alert_frequency: 1280358510 + metric_name: metric_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_mute: true + metric_type: count_of_errors + threshold_metric_value: threshold_metric_value + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + logs: + - key: "" + - key: "" + critical_threshold_value: 0.6027456183070403 + auto_threshold_time_window: 1210617418 + filters: + key: "" + warning_threshold_value: 0.14658129805029452 + notification_emails: + - notification_emails + - notification_emails + deleted_at: 2000-01-23T04:56:07.000+00:00 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_checked_at: 2000-01-23T04:56:07.000+00:00 + deleted: true + metric: metric + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + threshold_operator: greater_than + threshold_type: static + properties: + id: + format: uuid + readOnly: true + title: Id + type: string + project: + format: uuid + title: Project + type: string + name: + minLength: 1 + title: Name + type: string + metric_name: + readOnly: true + title: Metric name + type: string + created_at: + format: date-time + readOnly: true + title: Created at + type: string + updated_at: + format: date-time + readOnly: true + title: Updated at + type: string + deleted: + title: Deleted + type: boolean + deleted_at: + format: date-time + nullable: true + title: Deleted at + type: string + metric_type: + enum: + - count_of_errors + - error_rates_for_function_calling + - error_free_session_rates + - service_provider_error_rates + - llm_api_failure_rates + - span_response_time + - llm_response_time + - token_usage + - daily_tokens_spent + - monthly_tokens_spent + - evaluation_metrics + title: Metric type + type: string + metric: + description: Id of the evaluation template. + maxLength: 2556 + nullable: true + title: Metric + type: string + threshold_operator: + enum: + - greater_than + - less_than + title: Threshold operator + type: string + threshold_type: + description: Method to set the threshold for the monitor (Static or Percentage + change). + enum: + - static + - percentage_change + title: Threshold type + type: string + threshold_metric_value: + description: "For choice and pass/fail evals, the specific metric value\ + \ to monitor." + maxLength: 255 + nullable: true + title: Threshold metric value + type: string + critical_threshold_value: + minimum: 0 + nullable: true + title: Critical threshold value + type: number + warning_threshold_value: + minimum: 0 + nullable: true + title: Warning threshold value + type: number + alert_frequency: + description: Frequency of alert checks in minutes. + maximum: 2147483647 + minimum: 5 + title: Alert frequency + type: integer + auto_threshold_time_window: + description: For auto-thresholding. The time window in minutes to calculate + the historical mean + maximum: 2147483647 + minimum: 0 + title: Auto threshold time window + type: integer + last_checked_at: + description: The last time the monitor was checked for alerts. + format: date-time + nullable: true + title: Last checked at + type: string + notification_emails: + items: + format: email + maxLength: 254 + minLength: 1 + title: Notification emails + type: string + type: array + slack_webhook_url: + format: uri + maxLength: 200 + nullable: true + title: Slack webhook url + type: string + slack_notes: + nullable: true + title: Slack notes + type: string + is_mute: + title: Is mute + type: boolean + filters: + additionalProperties: true + title: Filters + type: object + logs: + items: + additionalProperties: true + title: Logs + type: object + nullable: true + type: array + organization: + format: uuid + title: Organization + type: string + workspace: + format: uuid + nullable: true + title: Workspace + type: string + created_by: + format: uuid + nullable: true + title: Created by + type: string + required: + - metric_type + - name + - organization + - project + - threshold_operator + type: object + UserAlertMonitorDuplicate: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + title: Id + type: string + name: + maxLength: 255 + minLength: 1 + title: Name + type: string + required: + - id + - name + type: object + UserAlertMonitorDuplicateResult: + example: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + properties: + id: + format: uuid + title: Id + type: string + message: + minLength: 1 + title: Message + type: string + required: + - id + - message + type: object + UserAlertMonitorDuplicateResponse: + example: + result: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + message: message + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/UserAlertMonitorDuplicateResult' + required: + - result + type: object + UserAlertMonitorMetricOption: + example: + output_type: output_type + name: name + metric_type: metric_type + id: id + properties: + id: + minLength: 1 + readOnly: true + title: Id + type: string + name: + minLength: 1 + readOnly: true + title: Name + type: string + metric_type: + minLength: 1 + readOnly: true + title: Metric type + type: string + output_type: + readOnly: true + title: Output type + type: string + type: object + UserAlertMonitorMetricOptionsResponse: + example: + result: + - output_type: output_type + name: name + metric_type: metric_type + id: id + - output_type: output_type + name: name + metric_type: metric_type + id: id + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + items: + $ref: '#/components/schemas/UserAlertMonitorMetricOption' + readOnly: true + type: array + type: object + UsersResult: + example: + total_count: 0 + total_pages: 6 + table: + - key: "" + - key: "" + properties: + table: + items: + additionalProperties: true + type: object + type: array + total_count: + title: Total count + type: integer + total_pages: + title: Total pages + type: integer + required: + - table + - total_count + - total_pages + type: object + UsersResponse: + example: + result: + total_count: 0 + total_pages: 6 + table: + - key: "" + - key: "" + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + $ref: '#/components/schemas/UsersResult' + required: + - result + type: object + UserCodeExampleResponse: + example: + result: result + status: true + properties: + status: + default: true + title: Status + type: boolean + result: + minLength: 1 + title: Result + type: string + required: + - result + type: object + TestExecutionStatusSummary: + example: + completed_calls: 1 + execution_id: execution_id + total_calls: 6 + start_time: 2000-01-23T04:56:07.000+00:00 + run_test_id: run_test_id + total_scenarios: 0 + failed_calls: 5 + end_time: 2000-01-23T04:56:07.000+00:00 + scenarios: + - key: scenarios + - key: scenarios + error: error + success_rate: 5.637376656633329 + status: status + properties: + run_test_id: + minLength: 1 + title: Run test id + type: string + execution_id: + minLength: 1 + title: Execution id + type: string + status: + minLength: 1 + title: Status + type: string + total_scenarios: + title: Total scenarios + type: integer + total_calls: + title: Total calls + type: integer + completed_calls: + title: Completed calls + type: integer + failed_calls: + title: Failed calls + type: integer + success_rate: + title: Success rate + type: number + start_time: + format: date-time + title: Start time + type: string + end_time: + format: date-time + nullable: true + title: End time + type: string + scenarios: + items: + additionalProperties: + nullable: true + type: string + type: object + type: array + error: + minLength: 1 + nullable: true + title: Error + type: string + required: + - completed_calls + - end_time + - error + - execution_id + - failed_calls + - run_test_id + - scenarios + - start_time + - status + - success_rate + - total_calls + - total_scenarios + type: object + listAnnotationQueues_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + - viewer_role: viewer_role + instructions: instructions + annotators: + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - role: annotator + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + roles: roles + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + description: description + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + assignment_strategy: manual + annotator_count: 2 + created_by_name: created_by_name + annotations_required: 441289069 + agent_definition: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + annotator_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + completed_count: 9 + annotator_roles: + key: + key: "" + item_count: 7 + auto_assign: true + label_ids: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + requires_review: true + is_default: true + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + labels: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: type + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + required: true + order: 413233370 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + reservation_timeout_minutes: -1517921766 + label_count: 5 + viewer_roles: viewer_roles + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: draft + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/AnnotationQueue' + type: array + required: + - count + - results + type: object + model_hub_annotation_queues_automation_rules_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + created_by_name: created_by_name + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enabled: true + last_triggered_at: 2000-01-23T04:56:07.000+00:00 + trigger_count: 6 + trigger_frequency: manual + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + conditions: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + created_by_name: created_by_name + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + enabled: true + last_triggered_at: 2000-01-23T04:56:07.000+00:00 + trigger_count: 6 + trigger_frequency: manual + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + conditions: + filter: + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + - column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + scope: + remove_simulation_calls: true + project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_voice_call: true + dataset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + rules: + - op: eq + field: field + value: "" + - op: eq + field: field + value: "" + operator: and + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/AutomationRule' + type: array + required: + - count + - results + type: object + listAnnotationQueueItems_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - workflow_status: workflow_status + metadata: + key: "" + reviewed_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + review_notes: review_notes + reviewed_at: 2000-01-23T04:56:07.000+00:00 + reserved_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + assigned_users: assigned_users + priority: 441289069 + workflow_status_label: workflow_status_label + reserved_by_name: reserved_by_name + reviewed_by_name: reviewed_by_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + review_status: review_status + source_preview: source_preview + assigned_to_name: assigned_to_name + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: pending + order: -1517921766 + assigned_to: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + reservation_expires_at: 2000-01-23T04:56:07.000+00:00 + - workflow_status: workflow_status + metadata: + key: "" + reviewed_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + review_notes: review_notes + reviewed_at: 2000-01-23T04:56:07.000+00:00 + reserved_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + assigned_users: assigned_users + priority: 441289069 + workflow_status_label: workflow_status_label + reserved_by_name: reserved_by_name + reviewed_by_name: reviewed_by_name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + review_status: review_status + source_preview: source_preview + assigned_to_name: assigned_to_name + queue: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: pending + order: -1517921766 + assigned_to: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + reservation_expires_at: 2000-01-23T04:56:07.000+00:00 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/QueueItem' + type: array + required: + - count + - results + type: object + model_hub_api_keys_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - masked_actual_key: masked_actual_key + config_json: + key: "" + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + key: key + - masked_actual_key: masked_actual_key + config_json: + key: "" + provider: provider + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + key: key + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/ApiKey' + type: array + required: + - count + - results + type: object + listExperiments_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - agents_count: agents_count + models_count: models_count + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_templates_count: eval_templates_count + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_type: llm + status: NotStarted + - agents_count: agents_count + models_count: models_count + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + eval_templates_count: eval_templates_count + dataset: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + experiment_type: llm + status: NotStarted + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/ExperimentListV2' + type: array + required: + - count + - results + type: object + model_hub_prompt_history_executions_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - metadata: + key: "" + template_version: template_version + original_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + placeholders: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + evaluation_results: + key: "" + commit_message: commit_message + is_default: true + labels: labels + output: + key: "" + prompt_config_snapshot: prompt_config_snapshot + evaluation_configs: + key: "" + template_name: template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_draft: true + prompt_base_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + variable_names: variable_names + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - metadata: + key: "" + template_version: template_version + original_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + placeholders: + key: "" + created_at: 2000-01-23T04:56:07.000+00:00 + evaluation_results: + key: "" + commit_message: commit_message + is_default: true + labels: labels + output: + key: "" + prompt_config_snapshot: prompt_config_snapshot + evaluation_configs: + key: "" + template_name: template_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_draft: true + prompt_base_template: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + variable_names: variable_names + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PromptHistoryExecution' + type: array + required: + - count + - results + type: object + model_hub_prompt_labels_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - metadata: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: system + - metadata: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: system + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PromptLabel' + type: array + required: + - count + - results + type: object + model_hub_prompt_templates_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + placeholders: + key: "" + description: description + variable_names: + key: "" + prompt_folder: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + placeholders: + key: "" + description: description + variable_names: + key: "" + prompt_folder: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PromptTemplate' + type: array + required: + - count + - results + type: object + model_hub_scores_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + - notes: notes + queue_item: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + source_type: dataset_row + label_type: label_type + label_allow_notes: true + annotator: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + score_source: human + annotator_name: annotator_name + updated_at: 2000-01-23T04:56:07.000+00:00 + label_settings: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + source_id: source_id + annotator_email: annotator_email + label_name: label_name + value: + key: "" + label_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + queue_id: queue_id + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Score' + type: array + required: + - count + - results + type: object + listPersonas_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: simulation_type + multilingual: true + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: simulation_type + multilingual: true + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PersonaList' + type: array + required: + - count + - results + type: object + simulate_api_personas_field_options_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - slang_usage_choices: slang_usage_choices + communication_style_choices: communication_style_choices + verbosity_choices: verbosity_choices + location_choices: location_choices + emoji_usage_choices: emoji_usage_choices + accent_choices: accent_choices + tone_choices: tone_choices + regional_mix_choices: regional_mix_choices + profession_choices: profession_choices + personality_choices: personality_choices + language_choices: language_choices + typos_frequency_choices: typos_frequency_choices + age_group_choices: age_group_choices + punctuation_choices: punctuation_choices + gender_choices: gender_choices + conversation_speed_choices: conversation_speed_choices + - slang_usage_choices: slang_usage_choices + communication_style_choices: communication_style_choices + verbosity_choices: verbosity_choices + location_choices: location_choices + emoji_usage_choices: emoji_usage_choices + accent_choices: accent_choices + tone_choices: tone_choices + regional_mix_choices: regional_mix_choices + profession_choices: profession_choices + personality_choices: personality_choices + language_choices: language_choices + typos_frequency_choices: typos_frequency_choices + age_group_choices: age_group_choices + punctuation_choices: punctuation_choices + gender_choices: gender_choices + conversation_speed_choices: conversation_speed_choices + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/PersonaFieldOptions' + type: array + required: + - count + - results + type: object + simulate_api_personas_system_personas_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + - persona_type: system + metadata: + key: "" + occupation: + key: "" + gender: + key: "" + keywords: + key: "" + tone: formal + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + language: + - language + - language + custom_properties: + key: "" + slang_usage: none + personality: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + regional_mix: none + persona_type_display: persona_type_display + communication_style: + key: "" + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + simulation_type: voice + multilingual: true + profession: + - profession + - profession + interrupt_sensitivity: + key: "" + languages: + key: "" + age_group: + key: "" + typos_frequency: none + is_default: true + accent: + key: "" + emoji_usage: never + conversation_speed: + key: "" + background_sound: true + name: name + punctuation: clean + location: + key: "" + finished_speaking_sensitivity: + key: "" + additional_instruction: additional_instruction + verbosity: brief + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Persona' + type: array + required: + - count + - results + type: object + listTraceProjects_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - metadata: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: Numeric + created_at: 2000-01-23T04:56:07.000+00:00 + source: demo + tags: + key: "" + trace_type: experiment + session_config: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + - metadata: + key: "" + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + model_type: Numeric + created_at: 2000-01-23T04:56:07.000+00:00 + source: demo + tags: + key: "" + trace_type: experiment + session_config: + key: "" + updated_at: 2000-01-23T04:56:07.000+00:00 + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + config: + key: "" + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Project' + type: array + required: + - count + - results + type: object + tracer_trace_annotation_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - trace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + exclude_annotators: exclude_annotators + observation_span_id: observation_span_id + annotators: annotators + - trace_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + exclude_annotators: exclude_annotators + observation_span_id: observation_span_id + annotators: annotators + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/GetTraceAnnotation' + type: array + required: + - count + - results + type: object + tracer_trace_session_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - bookmarked: true + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - bookmarked: true + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/TraceSession' + type: array + required: + - count + - results + type: object + tracer_trace_list_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - output: + key: "" + input: + key: "" + metadata: + key: "" + session: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + external_id: external_id + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: + key: "" + tags: + key: "" + - output: + key: "" + input: + key: "" + metadata: + key: "" + session: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project_version: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + external_id: external_id + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + error: + key: "" + tags: + key: "" + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/Trace' + type: array + required: + - count + - results + type: object + listAlertLogs_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - resolved_by: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + time_window_end: 2000-01-23T04:56:07.000+00:00 + resolved_at: 2000-01-23T04:56:07.000+00:00 + time_window_start: 2000-01-23T04:56:07.000+00:00 + link: https://openapi-generator.tech + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: critical + message: message + resolved: true + - resolved_by: + role: role + organization: + require_2fa: true + is_new: true + require_2fa_enforced_at: 2000-01-23T04:56:07.000+00:00 + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + require_2fa_grace_period_days: 19750 + display_name: display_name + region: region + ws_enabled: true + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + organization_role: Owner + email: email + status: status + goals: + key: "" + time_window_end: 2000-01-23T04:56:07.000+00:00 + resolved_at: 2000-01-23T04:56:07.000+00:00 + time_window_start: 2000-01-23T04:56:07.000+00:00 + link: https://openapi-generator.tech + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: critical + message: message + resolved: true + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/UserAlertMonitorLog' + type: array + required: + - count + - results + type: object + listAlerts_200_response: + example: + next: https://openapi-generator.tech + previous: https://openapi-generator.tech + count: 0 + results: + - slack_notes: slack_notes + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + slack_webhook_url: https://openapi-generator.tech + alert_frequency: 1280358510 + metric_name: metric_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_mute: true + metric_type: count_of_errors + threshold_metric_value: threshold_metric_value + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + logs: + - key: "" + - key: "" + critical_threshold_value: 0.6027456183070403 + auto_threshold_time_window: 1210617418 + filters: + key: "" + warning_threshold_value: 0.14658129805029452 + notification_emails: + - notification_emails + - notification_emails + deleted_at: 2000-01-23T04:56:07.000+00:00 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_checked_at: 2000-01-23T04:56:07.000+00:00 + deleted: true + metric: metric + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + threshold_operator: greater_than + threshold_type: static + - slack_notes: slack_notes + workspace: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + project: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + created_at: 2000-01-23T04:56:07.000+00:00 + slack_webhook_url: https://openapi-generator.tech + alert_frequency: 1280358510 + metric_name: metric_name + updated_at: 2000-01-23T04:56:07.000+00:00 + is_mute: true + metric_type: count_of_errors + threshold_metric_value: threshold_metric_value + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + logs: + - key: "" + - key: "" + critical_threshold_value: 0.6027456183070403 + auto_threshold_time_window: 1210617418 + filters: + key: "" + warning_threshold_value: 0.14658129805029452 + notification_emails: + - notification_emails + - notification_emails + deleted_at: 2000-01-23T04:56:07.000+00:00 + created_by: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + last_checked_at: 2000-01-23T04:56:07.000+00:00 + deleted: true + metric: metric + organization: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + threshold_operator: greater_than + threshold_type: static + properties: + count: + type: integer + next: + format: uri + nullable: true + type: string + previous: + format: uri + nullable: true + type: string + results: + items: + $ref: '#/components/schemas/UserAlertMonitor' + type: array + required: + - count + - results + type: object + AutomationRuleConditions_filter_inner_filter_config: + additionalProperties: false + example: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + properties: + filter_type: + description: "Canonical field type, for example text, number, boolean, datetime,\ + \ categorical, thumbs, annotator, or array." + type: string + filter_op: + description: "Canonical operator from api_contracts/filter_contract.json,\ + \ for example equals, not_equals, in, not_in, between, not_between, is_null,\ + \ or is_not_null." + type: string + filter_value: + description: "Scalar, list, range tuple, boolean, or null depending on filter_op\ + \ and filter_type." + col_type: + description: "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC,\ + \ ANNOTATION, or NORMAL." + type: string + required: + - filter_op + - filter_type + type: object + AutomationRuleConditions_filter_inner: + additionalProperties: false + example: + column_id: column_id + filter_config: + filter_value: "" + filter_type: filter_type + col_type: col_type + filter_op: filter_op + output_type: output_type + source: source + display_name: display_name + properties: + column_id: + description: Column or attribute id to filter on. + type: string + display_name: + description: Optional UI label for chips and saved views. + type: string + source: + description: "Optional source surface for mixed-source filters, for example\ + \ traces, datasets, or simulation." + type: string + output_type: + description: Optional metric output type metadata used by eval and annotation + filters. + type: string + filter_config: + $ref: '#/components/schemas/AutomationRuleConditions_filter_inner_filter_config' + required: + - column_id + - filter_config + type: object + Rules_inner: + additionalProperties: false + example: + op: eq + field: field + value: "" + properties: + field: + minLength: 1 + type: string + op: + default: eq + minLength: 1 + type: string + value: + description: "Rule comparison value. Can be a scalar, list, object, boolean,\ + \ or null depending on the operator." + required: + - field + type: object + DatasetRowDataRequest_sort_inner: + additionalProperties: false + example: + column_id: column_id + type: ascending + properties: + column_id: + type: string + type: + enum: + - ascending + - descending + type: string + required: + - column_id + type: object + Req_data_config: + additionalProperties: false + example: + filter_value: "" + output_type: output_type + id: id + type: SYSTEM_METRIC + choices: + - choices + - choices + eval_output_type: eval_output_type + value: "" + filter_op: filter_op + properties: + id: + type: string + type: + enum: + - SYSTEM_METRIC + - EVAL + - ANNOTATION + type: string + output_type: + type: string + eval_output_type: + type: string + choices: + items: + type: string + type: array + value: {} + filter_op: + type: string + filter_value: {} + required: + - id + - type + title: Req data config + type: object + securitySchemes: + X-Api-Key: + in: header + name: X-Api-Key + type: apiKey + X-Secret-Key: + in: header + name: X-Secret-Key + type: apiKey + diff --git a/java/futureagi/build.gradle b/java/futureagi/build.gradle new file mode 100644 index 0000000..2316f78 --- /dev/null +++ b/java/futureagi/build.gradle @@ -0,0 +1,107 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'com.diffplug.spotless' + +group = 'com.futureagi' +version = '0.1.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} + +apply plugin: 'java' +apply plugin: 'maven-publish' + +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 + +// Some text from the schema is copy pasted into the source files as UTF-8 +// but the default still seems to be to use platform encoding +tasks.withType(JavaCompile) { + configure(options) { + options.encoding = 'UTF-8' + } +} +javadoc { + options.encoding = 'UTF-8' +} + +publishing { + publications { + maven(MavenPublication) { + artifactId = 'futureagi-sdk' + from components.java + } + } +} + +task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath +} + +task sourcesJar(type: Jar, dependsOn: classes) { + archiveClassifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + archiveClassifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} + + +ext { + jackson_version = "2.17.1" + jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" + junit_version = "5.10.2" +} + +dependencies { + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "org.openapitools:jackson-databind-nullable:0.2.1" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + removeUnusedImports() + importOrder() + } +} diff --git a/java/futureagi/build.sbt b/java/futureagi/build.sbt new file mode 100644 index 0000000..4640904 --- /dev/null +++ b/java/futureagi/build.sbt @@ -0,0 +1 @@ +# TODO diff --git a/java/futureagi/docs/AccountsApi.md b/java/futureagi/docs/AccountsApi.md new file mode 100644 index 0000000..64d6d65 --- /dev/null +++ b/java/futureagi/docs/AccountsApi.md @@ -0,0 +1,886 @@ +# AccountsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**accountsOrganizationMembersReactivateCreate**](AccountsApi.md#accountsOrganizationMembersReactivateCreate) | **POST** /accounts/organization/members/reactivate/ | POST /accounts/organization/members/reactivate/ | +| [**accountsOrganizationMembersReactivateCreateWithHttpInfo**](AccountsApi.md#accountsOrganizationMembersReactivateCreateWithHttpInfo) | **POST** /accounts/organization/members/reactivate/ | POST /accounts/organization/members/reactivate/ | +| [**accountsOrganizationMembersRemoveDelete**](AccountsApi.md#accountsOrganizationMembersRemoveDelete) | **DELETE** /accounts/organization/members/remove/ | DELETE /accounts/organization/members/remove/ | +| [**accountsOrganizationMembersRemoveDeleteWithHttpInfo**](AccountsApi.md#accountsOrganizationMembersRemoveDeleteWithHttpInfo) | **DELETE** /accounts/organization/members/remove/ | DELETE /accounts/organization/members/remove/ | +| [**accountsOrganizationMembersRoleCreate**](AccountsApi.md#accountsOrganizationMembersRoleCreate) | **POST** /accounts/organization/members/role/ | POST /accounts/organization/members/role/ | +| [**accountsOrganizationMembersRoleCreateWithHttpInfo**](AccountsApi.md#accountsOrganizationMembersRoleCreateWithHttpInfo) | **POST** /accounts/organization/members/role/ | POST /accounts/organization/members/role/ | +| [**accountsWorkspaceMembersRemoveDelete**](AccountsApi.md#accountsWorkspaceMembersRemoveDelete) | **DELETE** /accounts/workspace/{workspace_id}/members/remove/ | DELETE /accounts/workspace/<workspace_id>/members/remove/ | +| [**accountsWorkspaceMembersRemoveDeleteWithHttpInfo**](AccountsApi.md#accountsWorkspaceMembersRemoveDeleteWithHttpInfo) | **DELETE** /accounts/workspace/{workspace_id}/members/remove/ | DELETE /accounts/workspace/<workspace_id>/members/remove/ | +| [**accountsWorkspaceMembersRoleCreate**](AccountsApi.md#accountsWorkspaceMembersRoleCreate) | **POST** /accounts/workspace/{workspace_id}/members/role/ | POST /accounts/workspace/<workspace_id>/members/role/ | +| [**accountsWorkspaceMembersRoleCreateWithHttpInfo**](AccountsApi.md#accountsWorkspaceMembersRoleCreateWithHttpInfo) | **POST** /accounts/workspace/{workspace_id}/members/role/ | POST /accounts/workspace/<workspace_id>/members/role/ | + + + +## accountsOrganizationMembersReactivateCreate + +> MemberUserMutationResponse accountsOrganizationMembersReactivateCreate(memberRemove) + +POST /accounts/organization/members/reactivate/ + +Re-activates a deactivated org membership and restores workspace memberships that were soft-deactivated during removal. If no prior workspace memberships exist, the user is added to the default workspace. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + MemberRemove memberRemove = new MemberRemove(); // MemberRemove | + try { + MemberUserMutationResponse result = apiInstance.accountsOrganizationMembersReactivateCreate(memberRemove); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsOrganizationMembersReactivateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **memberRemove** | [**MemberRemove**](MemberRemove.md)| | | + +### Return type + +[**MemberUserMutationResponse**](MemberUserMutationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## accountsOrganizationMembersReactivateCreateWithHttpInfo + +> ApiResponse accountsOrganizationMembersReactivateCreate accountsOrganizationMembersReactivateCreateWithHttpInfo(memberRemove) + +POST /accounts/organization/members/reactivate/ + +Re-activates a deactivated org membership and restores workspace memberships that were soft-deactivated during removal. If no prior workspace memberships exist, the user is added to the default workspace. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + MemberRemove memberRemove = new MemberRemove(); // MemberRemove | + try { + ApiResponse response = apiInstance.accountsOrganizationMembersReactivateCreateWithHttpInfo(memberRemove); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsOrganizationMembersReactivateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **memberRemove** | [**MemberRemove**](MemberRemove.md)| | | + +### Return type + +ApiResponse<[**MemberUserMutationResponse**](MemberUserMutationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## accountsOrganizationMembersRemoveDelete + +> MemberUserMutationResponse accountsOrganizationMembersRemoveDelete(memberRemove) + +DELETE /accounts/organization/members/remove/ + +Soft-deactivates OrganizationMembership and cascades to workspace memberships. Signals handle Redis clear + audit log. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + MemberRemove memberRemove = new MemberRemove(); // MemberRemove | + try { + MemberUserMutationResponse result = apiInstance.accountsOrganizationMembersRemoveDelete(memberRemove); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsOrganizationMembersRemoveDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **memberRemove** | [**MemberRemove**](MemberRemove.md)| | | + +### Return type + +[**MemberUserMutationResponse**](MemberUserMutationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## accountsOrganizationMembersRemoveDeleteWithHttpInfo + +> ApiResponse accountsOrganizationMembersRemoveDelete accountsOrganizationMembersRemoveDeleteWithHttpInfo(memberRemove) + +DELETE /accounts/organization/members/remove/ + +Soft-deactivates OrganizationMembership and cascades to workspace memberships. Signals handle Redis clear + audit log. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + MemberRemove memberRemove = new MemberRemove(); // MemberRemove | + try { + ApiResponse response = apiInstance.accountsOrganizationMembersRemoveDeleteWithHttpInfo(memberRemove); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsOrganizationMembersRemoveDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **memberRemove** | [**MemberRemove**](MemberRemove.md)| | | + +### Return type + +ApiResponse<[**MemberUserMutationResponse**](MemberUserMutationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## accountsOrganizationMembersRoleCreate + +> MemberRoleUpdateResponse accountsOrganizationMembersRoleCreate(memberRoleUpdate) + +POST /accounts/organization/members/role/ + +Update a member's org level and/or workspace level. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + MemberRoleUpdate memberRoleUpdate = new MemberRoleUpdate(); // MemberRoleUpdate | + try { + MemberRoleUpdateResponse result = apiInstance.accountsOrganizationMembersRoleCreate(memberRoleUpdate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsOrganizationMembersRoleCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **memberRoleUpdate** | [**MemberRoleUpdate**](MemberRoleUpdate.md)| | | + +### Return type + +[**MemberRoleUpdateResponse**](MemberRoleUpdateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## accountsOrganizationMembersRoleCreateWithHttpInfo + +> ApiResponse accountsOrganizationMembersRoleCreate accountsOrganizationMembersRoleCreateWithHttpInfo(memberRoleUpdate) + +POST /accounts/organization/members/role/ + +Update a member's org level and/or workspace level. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + MemberRoleUpdate memberRoleUpdate = new MemberRoleUpdate(); // MemberRoleUpdate | + try { + ApiResponse response = apiInstance.accountsOrganizationMembersRoleCreateWithHttpInfo(memberRoleUpdate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsOrganizationMembersRoleCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **memberRoleUpdate** | [**MemberRoleUpdate**](MemberRoleUpdate.md)| | | + +### Return type + +ApiResponse<[**MemberRoleUpdateResponse**](MemberRoleUpdateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## accountsWorkspaceMembersRemoveDelete + +> MemberUserMutationResponse accountsWorkspaceMembersRemoveDelete(workspaceId, workspaceMemberRemove) + +DELETE /accounts/workspace/<workspace_id>/members/remove/ + +Remove a member from a workspace only (keeps org membership). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + String workspaceId = "workspaceId_example"; // String | + WorkspaceMemberRemove workspaceMemberRemove = new WorkspaceMemberRemove(); // WorkspaceMemberRemove | + try { + MemberUserMutationResponse result = apiInstance.accountsWorkspaceMembersRemoveDelete(workspaceId, workspaceMemberRemove); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsWorkspaceMembersRemoveDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **workspaceId** | **String**| | | +| **workspaceMemberRemove** | [**WorkspaceMemberRemove**](WorkspaceMemberRemove.md)| | | + +### Return type + +[**MemberUserMutationResponse**](MemberUserMutationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## accountsWorkspaceMembersRemoveDeleteWithHttpInfo + +> ApiResponse accountsWorkspaceMembersRemoveDelete accountsWorkspaceMembersRemoveDeleteWithHttpInfo(workspaceId, workspaceMemberRemove) + +DELETE /accounts/workspace/<workspace_id>/members/remove/ + +Remove a member from a workspace only (keeps org membership). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + String workspaceId = "workspaceId_example"; // String | + WorkspaceMemberRemove workspaceMemberRemove = new WorkspaceMemberRemove(); // WorkspaceMemberRemove | + try { + ApiResponse response = apiInstance.accountsWorkspaceMembersRemoveDeleteWithHttpInfo(workspaceId, workspaceMemberRemove); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsWorkspaceMembersRemoveDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **workspaceId** | **String**| | | +| **workspaceMemberRemove** | [**WorkspaceMemberRemove**](WorkspaceMemberRemove.md)| | | + +### Return type + +ApiResponse<[**MemberUserMutationResponse**](MemberUserMutationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## accountsWorkspaceMembersRoleCreate + +> WorkspaceMemberRoleUpdateResponse accountsWorkspaceMembersRoleCreate(workspaceId, workspaceMemberRoleUpdate) + +POST /accounts/workspace/<workspace_id>/members/role/ + +Update a member's workspace role. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + String workspaceId = "workspaceId_example"; // String | + WorkspaceMemberRoleUpdate workspaceMemberRoleUpdate = new WorkspaceMemberRoleUpdate(); // WorkspaceMemberRoleUpdate | + try { + WorkspaceMemberRoleUpdateResponse result = apiInstance.accountsWorkspaceMembersRoleCreate(workspaceId, workspaceMemberRoleUpdate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsWorkspaceMembersRoleCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **workspaceId** | **String**| | | +| **workspaceMemberRoleUpdate** | [**WorkspaceMemberRoleUpdate**](WorkspaceMemberRoleUpdate.md)| | | + +### Return type + +[**WorkspaceMemberRoleUpdateResponse**](WorkspaceMemberRoleUpdateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## accountsWorkspaceMembersRoleCreateWithHttpInfo + +> ApiResponse accountsWorkspaceMembersRoleCreate accountsWorkspaceMembersRoleCreateWithHttpInfo(workspaceId, workspaceMemberRoleUpdate) + +POST /accounts/workspace/<workspace_id>/members/role/ + +Update a member's workspace role. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + String workspaceId = "workspaceId_example"; // String | + WorkspaceMemberRoleUpdate workspaceMemberRoleUpdate = new WorkspaceMemberRoleUpdate(); // WorkspaceMemberRoleUpdate | + try { + ApiResponse response = apiInstance.accountsWorkspaceMembersRoleCreateWithHttpInfo(workspaceId, workspaceMemberRoleUpdate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#accountsWorkspaceMembersRoleCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **workspaceId** | **String**| | | +| **workspaceMemberRoleUpdate** | [**WorkspaceMemberRoleUpdate**](WorkspaceMemberRoleUpdate.md)| | | + +### Return type + +ApiResponse<[**WorkspaceMemberRoleUpdateResponse**](WorkspaceMemberRoleUpdateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/AlertsApi.md b/java/futureagi/docs/AlertsApi.md new file mode 100644 index 0000000..652db25 --- /dev/null +++ b/java/futureagi/docs/AlertsApi.md @@ -0,0 +1,2492 @@ +# AlertsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**bulkMuteAlerts**](AlertsApi.md#bulkMuteAlerts) | **POST** /tracer/user-alerts/bulk-mute/ | | +| [**bulkMuteAlertsWithHttpInfo**](AlertsApi.md#bulkMuteAlertsWithHttpInfo) | **POST** /tracer/user-alerts/bulk-mute/ | | +| [**createAlert**](AlertsApi.md#createAlert) | **POST** /tracer/user-alerts/ | | +| [**createAlertWithHttpInfo**](AlertsApi.md#createAlertWithHttpInfo) | **POST** /tracer/user-alerts/ | | +| [**deleteAlert**](AlertsApi.md#deleteAlert) | **DELETE** /tracer/user-alerts/{id}/ | | +| [**deleteAlertWithHttpInfo**](AlertsApi.md#deleteAlertWithHttpInfo) | **DELETE** /tracer/user-alerts/{id}/ | | +| [**getAlert**](AlertsApi.md#getAlert) | **GET** /tracer/user-alerts/{id}/ | | +| [**getAlertWithHttpInfo**](AlertsApi.md#getAlertWithHttpInfo) | **GET** /tracer/user-alerts/{id}/ | | +| [**getAlertDetails**](AlertsApi.md#getAlertDetails) | **GET** /tracer/user-alerts/{id}/details/ | | +| [**getAlertDetailsWithHttpInfo**](AlertsApi.md#getAlertDetailsWithHttpInfo) | **GET** /tracer/user-alerts/{id}/details/ | | +| [**getAlertGraph**](AlertsApi.md#getAlertGraph) | **GET** /tracer/user-alerts/{id}/graph/ | Returns time-series data for a monitor's metric, suitable for graphing. | +| [**getAlertGraphWithHttpInfo**](AlertsApi.md#getAlertGraphWithHttpInfo) | **GET** /tracer/user-alerts/{id}/graph/ | Returns time-series data for a monitor's metric, suitable for graphing. | +| [**getAlertLog**](AlertsApi.md#getAlertLog) | **GET** /tracer/user-alert-logs/{id}/ | | +| [**getAlertLogWithHttpInfo**](AlertsApi.md#getAlertLogWithHttpInfo) | **GET** /tracer/user-alert-logs/{id}/ | | +| [**listAlertLogs**](AlertsApi.md#listAlertLogs) | **GET** /tracer/user-alert-logs/ | | +| [**listAlertLogsWithHttpInfo**](AlertsApi.md#listAlertLogsWithHttpInfo) | **GET** /tracer/user-alert-logs/ | | +| [**listAlertLogsForAlert**](AlertsApi.md#listAlertLogsForAlert) | **GET** /tracer/user-alert-logs/{id}/list/ | | +| [**listAlertLogsForAlertWithHttpInfo**](AlertsApi.md#listAlertLogsForAlertWithHttpInfo) | **GET** /tracer/user-alert-logs/{id}/list/ | | +| [**listAlertMetricOptions**](AlertsApi.md#listAlertMetricOptions) | **GET** /tracer/user-alerts/metric-options/ | | +| [**listAlertMetricOptionsWithHttpInfo**](AlertsApi.md#listAlertMetricOptionsWithHttpInfo) | **GET** /tracer/user-alerts/metric-options/ | | +| [**listAlerts**](AlertsApi.md#listAlerts) | **GET** /tracer/user-alerts/ | | +| [**listAlertsWithHttpInfo**](AlertsApi.md#listAlertsWithHttpInfo) | **GET** /tracer/user-alerts/ | | +| [**listAllAlertLogs**](AlertsApi.md#listAllAlertLogs) | **GET** /tracer/user-alert-logs/all/ | | +| [**listAllAlertLogsWithHttpInfo**](AlertsApi.md#listAllAlertLogsWithHttpInfo) | **GET** /tracer/user-alert-logs/all/ | | +| [**previewAlertGraph**](AlertsApi.md#previewAlertGraph) | **POST** /tracer/user-alerts/preview-graph/ | | +| [**previewAlertGraphWithHttpInfo**](AlertsApi.md#previewAlertGraphWithHttpInfo) | **POST** /tracer/user-alerts/preview-graph/ | | +| [**resolveAlertLogs**](AlertsApi.md#resolveAlertLogs) | **POST** /tracer/user-alert-logs/resolve/ | | +| [**resolveAlertLogsWithHttpInfo**](AlertsApi.md#resolveAlertLogsWithHttpInfo) | **POST** /tracer/user-alert-logs/resolve/ | | +| [**updateAlert**](AlertsApi.md#updateAlert) | **PATCH** /tracer/user-alerts/{id}/ | | +| [**updateAlertWithHttpInfo**](AlertsApi.md#updateAlertWithHttpInfo) | **PATCH** /tracer/user-alerts/{id}/ | | + + + +## bulkMuteAlerts + +> UserAlertMonitor bulkMuteAlerts(userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + UserAlertMonitor result = apiInstance.bulkMuteAlerts(userAlertMonitor); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#bulkMuteAlerts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## bulkMuteAlertsWithHttpInfo + +> ApiResponse bulkMuteAlerts bulkMuteAlertsWithHttpInfo(userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + ApiResponse response = apiInstance.bulkMuteAlertsWithHttpInfo(userAlertMonitor); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#bulkMuteAlerts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## createAlert + +> UserAlertMonitor createAlert(userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + UserAlertMonitor result = apiInstance.createAlert(userAlertMonitor); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#createAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## createAlertWithHttpInfo + +> ApiResponse createAlert createAlertWithHttpInfo(userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + ApiResponse response = apiInstance.createAlertWithHttpInfo(userAlertMonitor); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#createAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## deleteAlert + +> void deleteAlert(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.deleteAlert(id); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#deleteAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## deleteAlertWithHttpInfo + +> ApiResponse deleteAlert deleteAlertWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.deleteAlertWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#deleteAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## getAlert + +> UserAlertMonitor getAlert(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + UserAlertMonitor result = apiInstance.getAlert(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getAlertWithHttpInfo + +> ApiResponse getAlert getAlertWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.getAlertWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## getAlertDetails + +> UserAlertMonitor getAlertDetails(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + UserAlertMonitor result = apiInstance.getAlertDetails(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlertDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getAlertDetailsWithHttpInfo + +> ApiResponse getAlertDetails getAlertDetailsWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.getAlertDetailsWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlertDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## getAlertGraph + +> UserAlertMonitor getAlertGraph(id) + +Returns time-series data for a monitor's metric, suitable for graphing. + +Accepts `start_date` and `end_date` query parameters (ISO 8601 format). If not provided, it defaults to the last 7 days. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + UserAlertMonitor result = apiInstance.getAlertGraph(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlertGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getAlertGraphWithHttpInfo + +> ApiResponse getAlertGraph getAlertGraphWithHttpInfo(id) + +Returns time-series data for a monitor's metric, suitable for graphing. + +Accepts `start_date` and `end_date` query parameters (ISO 8601 format). If not provided, it defaults to the last 7 days. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.getAlertGraphWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlertGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## getAlertLog + +> UserAlertMonitorLog getAlertLog(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + UserAlertMonitorLog result = apiInstance.getAlertLog(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlertLog"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getAlertLogWithHttpInfo + +> ApiResponse getAlertLog getAlertLogWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.getAlertLogWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#getAlertLog"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**UserAlertMonitorLog**](UserAlertMonitorLog.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listAlertLogs + +> ListAlertLogs200Response listAlertLogs(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ListAlertLogs200Response result = apiInstance.listAlertLogs(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlertLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ListAlertLogs200Response**](ListAlertLogs200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listAlertLogsWithHttpInfo + +> ApiResponse listAlertLogs listAlertLogsWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listAlertLogsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlertLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ListAlertLogs200Response**](ListAlertLogs200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listAlertLogsForAlert + +> UserAlertMonitorLog listAlertLogsForAlert(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + UserAlertMonitorLog result = apiInstance.listAlertLogsForAlert(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlertLogsForAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listAlertLogsForAlertWithHttpInfo + +> ApiResponse listAlertLogsForAlert listAlertLogsForAlertWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.listAlertLogsForAlertWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlertLogsForAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**UserAlertMonitorLog**](UserAlertMonitorLog.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listAlertMetricOptions + +> UserAlertMonitorMetricOptionsResponse listAlertMetricOptions(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + UserAlertMonitorMetricOptionsResponse result = apiInstance.listAlertMetricOptions(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlertMetricOptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**UserAlertMonitorMetricOptionsResponse**](UserAlertMonitorMetricOptionsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listAlertMetricOptionsWithHttpInfo + +> ApiResponse listAlertMetricOptions listAlertMetricOptionsWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listAlertMetricOptionsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlertMetricOptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**UserAlertMonitorMetricOptionsResponse**](UserAlertMonitorMetricOptionsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listAlerts + +> ListAlerts200Response listAlerts(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ListAlerts200Response result = apiInstance.listAlerts(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlerts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ListAlerts200Response**](ListAlerts200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listAlertsWithHttpInfo + +> ApiResponse listAlerts listAlertsWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listAlertsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAlerts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ListAlerts200Response**](ListAlerts200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listAllAlertLogs + +> ListAlertLogs200Response listAllAlertLogs(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ListAlertLogs200Response result = apiInstance.listAllAlertLogs(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAllAlertLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ListAlertLogs200Response**](ListAlertLogs200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listAllAlertLogsWithHttpInfo + +> ApiResponse listAllAlertLogs listAllAlertLogsWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listAllAlertLogsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#listAllAlertLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ListAlertLogs200Response**](ListAlertLogs200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## previewAlertGraph + +> UserAlertMonitor previewAlertGraph(userAlertMonitor) + + + +Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. Accepts monitor configuration in the request body. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + UserAlertMonitor result = apiInstance.previewAlertGraph(userAlertMonitor); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#previewAlertGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## previewAlertGraphWithHttpInfo + +> ApiResponse previewAlertGraph previewAlertGraphWithHttpInfo(userAlertMonitor) + + + +Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. Accepts monitor configuration in the request body. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + ApiResponse response = apiInstance.previewAlertGraphWithHttpInfo(userAlertMonitor); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#previewAlertGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## resolveAlertLogs + +> UserAlertMonitorLog resolveAlertLogs(userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + UserAlertMonitorLog result = apiInstance.resolveAlertLogs(userAlertMonitorLog); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#resolveAlertLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## resolveAlertLogsWithHttpInfo + +> ApiResponse resolveAlertLogs resolveAlertLogsWithHttpInfo(userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + ApiResponse response = apiInstance.resolveAlertLogsWithHttpInfo(userAlertMonitorLog); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#resolveAlertLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitorLog**](UserAlertMonitorLog.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## updateAlert + +> UserAlertMonitor updateAlert(id, userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + UserAlertMonitor result = apiInstance.updateAlert(id, userAlertMonitor); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#updateAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## updateAlertWithHttpInfo + +> ApiResponse updateAlert updateAlertWithHttpInfo(id, userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AlertsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AlertsApi apiInstance = new AlertsApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + ApiResponse response = apiInstance.updateAlertWithHttpInfo(id, userAlertMonitor); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AlertsApi#updateAlert"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/AnnotationQueueDiscussionApi.md b/java/futureagi/docs/AnnotationQueueDiscussionApi.md new file mode 100644 index 0000000..1bdcc61 --- /dev/null +++ b/java/futureagi/docs/AnnotationQueueDiscussionApi.md @@ -0,0 +1,926 @@ +# AnnotationQueueDiscussionApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createAnnotationQueueItemComment**](AnnotationQueueDiscussionApi.md#createAnnotationQueueItemComment) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | | +| [**createAnnotationQueueItemCommentWithHttpInfo**](AnnotationQueueDiscussionApi.md#createAnnotationQueueItemCommentWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | | +| [**listAnnotationQueueItemDiscussion**](AnnotationQueueDiscussionApi.md#listAnnotationQueueItemDiscussion) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | | +| [**listAnnotationQueueItemDiscussionWithHttpInfo**](AnnotationQueueDiscussionApi.md#listAnnotationQueueItemDiscussionWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/ | | +| [**reopenAnnotationQueueItemThread**](AnnotationQueueDiscussionApi.md#reopenAnnotationQueueItemThread) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/ | | +| [**reopenAnnotationQueueItemThreadWithHttpInfo**](AnnotationQueueDiscussionApi.md#reopenAnnotationQueueItemThreadWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/ | | +| [**resolveAnnotationQueueItemThread**](AnnotationQueueDiscussionApi.md#resolveAnnotationQueueItemThread) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/ | | +| [**resolveAnnotationQueueItemThreadWithHttpInfo**](AnnotationQueueDiscussionApi.md#resolveAnnotationQueueItemThreadWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/ | | +| [**toggleAnnotationQueueItemCommentReaction**](AnnotationQueueDiscussionApi.md#toggleAnnotationQueueItemCommentReaction) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/ | | +| [**toggleAnnotationQueueItemCommentReactionWithHttpInfo**](AnnotationQueueDiscussionApi.md#toggleAnnotationQueueItemCommentReactionWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/ | | + + + +## createAnnotationQueueItemComment + +> QueueDiscussionResponse createAnnotationQueueItemComment(queueId, id, discussionCommentRequest) + + + +List or create non-blocking discussion comments for a queue item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + DiscussionCommentRequest discussionCommentRequest = new DiscussionCommentRequest(); // DiscussionCommentRequest | + try { + QueueDiscussionResponse result = apiInstance.createAnnotationQueueItemComment(queueId, id, discussionCommentRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#createAnnotationQueueItemComment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **discussionCommentRequest** | [**DiscussionCommentRequest**](DiscussionCommentRequest.md)| | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createAnnotationQueueItemCommentWithHttpInfo + +> ApiResponse createAnnotationQueueItemComment createAnnotationQueueItemCommentWithHttpInfo(queueId, id, discussionCommentRequest) + + + +List or create non-blocking discussion comments for a queue item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + DiscussionCommentRequest discussionCommentRequest = new DiscussionCommentRequest(); // DiscussionCommentRequest | + try { + ApiResponse response = apiInstance.createAnnotationQueueItemCommentWithHttpInfo(queueId, id, discussionCommentRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#createAnnotationQueueItemComment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **discussionCommentRequest** | [**DiscussionCommentRequest**](DiscussionCommentRequest.md)| | | + +### Return type + +ApiResponse<[**QueueDiscussionResponse**](QueueDiscussionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listAnnotationQueueItemDiscussion + +> QueueDiscussionResponse listAnnotationQueueItemDiscussion(queueId, id) + + + +List or create non-blocking discussion comments for a queue item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + QueueDiscussionResponse result = apiInstance.listAnnotationQueueItemDiscussion(queueId, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#listAnnotationQueueItemDiscussion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listAnnotationQueueItemDiscussionWithHttpInfo + +> ApiResponse listAnnotationQueueItemDiscussion listAnnotationQueueItemDiscussionWithHttpInfo(queueId, id) + + + +List or create non-blocking discussion comments for a queue item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + ApiResponse response = apiInstance.listAnnotationQueueItemDiscussionWithHttpInfo(queueId, id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#listAnnotationQueueItemDiscussion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + +ApiResponse<[**QueueDiscussionResponse**](QueueDiscussionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## reopenAnnotationQueueItemThread + +> QueueDiscussionResponse reopenAnnotationQueueItemThread(queueId, id, threadId, discussionThreadStatusRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + String threadId = "threadId_example"; // String | + DiscussionThreadStatusRequest discussionThreadStatusRequest = new DiscussionThreadStatusRequest(); // DiscussionThreadStatusRequest | + try { + QueueDiscussionResponse result = apiInstance.reopenAnnotationQueueItemThread(queueId, id, threadId, discussionThreadStatusRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#reopenAnnotationQueueItemThread"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **threadId** | **String**| | | +| **discussionThreadStatusRequest** | [**DiscussionThreadStatusRequest**](DiscussionThreadStatusRequest.md)| | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## reopenAnnotationQueueItemThreadWithHttpInfo + +> ApiResponse reopenAnnotationQueueItemThread reopenAnnotationQueueItemThreadWithHttpInfo(queueId, id, threadId, discussionThreadStatusRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + String threadId = "threadId_example"; // String | + DiscussionThreadStatusRequest discussionThreadStatusRequest = new DiscussionThreadStatusRequest(); // DiscussionThreadStatusRequest | + try { + ApiResponse response = apiInstance.reopenAnnotationQueueItemThreadWithHttpInfo(queueId, id, threadId, discussionThreadStatusRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#reopenAnnotationQueueItemThread"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **threadId** | **String**| | | +| **discussionThreadStatusRequest** | [**DiscussionThreadStatusRequest**](DiscussionThreadStatusRequest.md)| | | + +### Return type + +ApiResponse<[**QueueDiscussionResponse**](QueueDiscussionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## resolveAnnotationQueueItemThread + +> QueueDiscussionResponse resolveAnnotationQueueItemThread(queueId, id, threadId, discussionThreadStatusRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + String threadId = "threadId_example"; // String | + DiscussionThreadStatusRequest discussionThreadStatusRequest = new DiscussionThreadStatusRequest(); // DiscussionThreadStatusRequest | + try { + QueueDiscussionResponse result = apiInstance.resolveAnnotationQueueItemThread(queueId, id, threadId, discussionThreadStatusRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#resolveAnnotationQueueItemThread"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **threadId** | **String**| | | +| **discussionThreadStatusRequest** | [**DiscussionThreadStatusRequest**](DiscussionThreadStatusRequest.md)| | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## resolveAnnotationQueueItemThreadWithHttpInfo + +> ApiResponse resolveAnnotationQueueItemThread resolveAnnotationQueueItemThreadWithHttpInfo(queueId, id, threadId, discussionThreadStatusRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + String threadId = "threadId_example"; // String | + DiscussionThreadStatusRequest discussionThreadStatusRequest = new DiscussionThreadStatusRequest(); // DiscussionThreadStatusRequest | + try { + ApiResponse response = apiInstance.resolveAnnotationQueueItemThreadWithHttpInfo(queueId, id, threadId, discussionThreadStatusRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#resolveAnnotationQueueItemThread"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **threadId** | **String**| | | +| **discussionThreadStatusRequest** | [**DiscussionThreadStatusRequest**](DiscussionThreadStatusRequest.md)| | | + +### Return type + +ApiResponse<[**QueueDiscussionResponse**](QueueDiscussionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## toggleAnnotationQueueItemCommentReaction + +> QueueDiscussionResponse toggleAnnotationQueueItemCommentReaction(queueId, id, commentId, discussionReactionRequest) + + + +Toggle the current user's reaction on a discussion comment. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + String commentId = "commentId_example"; // String | + DiscussionReactionRequest discussionReactionRequest = new DiscussionReactionRequest(); // DiscussionReactionRequest | + try { + QueueDiscussionResponse result = apiInstance.toggleAnnotationQueueItemCommentReaction(queueId, id, commentId, discussionReactionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#toggleAnnotationQueueItemCommentReaction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **commentId** | **String**| | | +| **discussionReactionRequest** | [**DiscussionReactionRequest**](DiscussionReactionRequest.md)| | | + +### Return type + +[**QueueDiscussionResponse**](QueueDiscussionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## toggleAnnotationQueueItemCommentReactionWithHttpInfo + +> ApiResponse toggleAnnotationQueueItemCommentReaction toggleAnnotationQueueItemCommentReactionWithHttpInfo(queueId, id, commentId, discussionReactionRequest) + + + +Toggle the current user's reaction on a discussion comment. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueDiscussionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueDiscussionApi apiInstance = new AnnotationQueueDiscussionApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + String commentId = "commentId_example"; // String | + DiscussionReactionRequest discussionReactionRequest = new DiscussionReactionRequest(); // DiscussionReactionRequest | + try { + ApiResponse response = apiInstance.toggleAnnotationQueueItemCommentReactionWithHttpInfo(queueId, id, commentId, discussionReactionRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueDiscussionApi#toggleAnnotationQueueItemCommentReaction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **commentId** | **String**| | | +| **discussionReactionRequest** | [**DiscussionReactionRequest**](DiscussionReactionRequest.md)| | | + +### Return type + +ApiResponse<[**QueueDiscussionResponse**](QueueDiscussionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/AnnotationQueueItemsApi.md b/java/futureagi/docs/AnnotationQueueItemsApi.md new file mode 100644 index 0000000..c00acfa --- /dev/null +++ b/java/futureagi/docs/AnnotationQueueItemsApi.md @@ -0,0 +1,2234 @@ +# AnnotationQueueItemsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addAnnotationQueueItems**](AnnotationQueueItemsApi.md#addAnnotationQueueItems) | **POST** /model-hub/annotation-queues/{queue_id}/items/add-items/ | | +| [**addAnnotationQueueItemsWithHttpInfo**](AnnotationQueueItemsApi.md#addAnnotationQueueItemsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/add-items/ | | +| [**assignAnnotationQueueItems**](AnnotationQueueItemsApi.md#assignAnnotationQueueItems) | **POST** /model-hub/annotation-queues/{queue_id}/items/assign/ | | +| [**assignAnnotationQueueItemsWithHttpInfo**](AnnotationQueueItemsApi.md#assignAnnotationQueueItemsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/assign/ | | +| [**completeAnnotationQueueItem**](AnnotationQueueItemsApi.md#completeAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/complete/ | | +| [**completeAnnotationQueueItemWithHttpInfo**](AnnotationQueueItemsApi.md#completeAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/complete/ | | +| [**getAnnotationQueueItemDetail**](AnnotationQueueItemsApi.md#getAnnotationQueueItemDetail) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/ | | +| [**getAnnotationQueueItemDetailWithHttpInfo**](AnnotationQueueItemsApi.md#getAnnotationQueueItemDetailWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/ | | +| [**getNextAnnotationQueueItem**](AnnotationQueueItemsApi.md#getNextAnnotationQueueItem) | **GET** /model-hub/annotation-queues/{queue_id}/items/next-item/ | Get the next or previous item in the queue. | +| [**getNextAnnotationQueueItemWithHttpInfo**](AnnotationQueueItemsApi.md#getNextAnnotationQueueItemWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/next-item/ | Get the next or previous item in the queue. | +| [**importAnnotationQueueItemAnnotations**](AnnotationQueueItemsApi.md#importAnnotationQueueItemAnnotations) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/ | | +| [**importAnnotationQueueItemAnnotationsWithHttpInfo**](AnnotationQueueItemsApi.md#importAnnotationQueueItemAnnotationsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/ | | +| [**listAnnotationQueueItemAnnotations**](AnnotationQueueItemsApi.md#listAnnotationQueueItemAnnotations) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/ | | +| [**listAnnotationQueueItemAnnotationsWithHttpInfo**](AnnotationQueueItemsApi.md#listAnnotationQueueItemAnnotationsWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/ | | +| [**listAnnotationQueueItems**](AnnotationQueueItemsApi.md#listAnnotationQueueItems) | **GET** /model-hub/annotation-queues/{queue_id}/items/ | | +| [**listAnnotationQueueItemsWithHttpInfo**](AnnotationQueueItemsApi.md#listAnnotationQueueItemsWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/ | | +| [**releaseAnnotationQueueItem**](AnnotationQueueItemsApi.md#releaseAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/release/ | | +| [**releaseAnnotationQueueItemWithHttpInfo**](AnnotationQueueItemsApi.md#releaseAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/release/ | | +| [**removeAnnotationQueueItems**](AnnotationQueueItemsApi.md#removeAnnotationQueueItems) | **POST** /model-hub/annotation-queues/{queue_id}/items/bulk-remove/ | | +| [**removeAnnotationQueueItemsWithHttpInfo**](AnnotationQueueItemsApi.md#removeAnnotationQueueItemsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/bulk-remove/ | | +| [**skipAnnotationQueueItem**](AnnotationQueueItemsApi.md#skipAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/skip/ | | +| [**skipAnnotationQueueItemWithHttpInfo**](AnnotationQueueItemsApi.md#skipAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/skip/ | | +| [**submitAnnotationQueueItemAnnotations**](AnnotationQueueItemsApi.md#submitAnnotationQueueItemAnnotations) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/ | | +| [**submitAnnotationQueueItemAnnotationsWithHttpInfo**](AnnotationQueueItemsApi.md#submitAnnotationQueueItemAnnotationsWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/ | | + + + +## addAnnotationQueueItems + +> QueueAddItemsResponse addAnnotationQueueItems(queueId, addItems) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + AddItems addItems = new AddItems(); // AddItems | + try { + QueueAddItemsResponse result = apiInstance.addAnnotationQueueItems(queueId, addItems); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#addAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **addItems** | [**AddItems**](AddItems.md)| | | + +### Return type + +[**QueueAddItemsResponse**](QueueAddItemsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **0** | Default error response | - | + +## addAnnotationQueueItemsWithHttpInfo + +> ApiResponse addAnnotationQueueItems addAnnotationQueueItemsWithHttpInfo(queueId, addItems) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + AddItems addItems = new AddItems(); // AddItems | + try { + ApiResponse response = apiInstance.addAnnotationQueueItemsWithHttpInfo(queueId, addItems); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#addAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **addItems** | [**AddItems**](AddItems.md)| | | + +### Return type + +ApiResponse<[**QueueAddItemsResponse**](QueueAddItemsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **0** | Default error response | - | + + +## assignAnnotationQueueItems + +> QueueAssignItemsResponse assignAnnotationQueueItems(queueId, assignItems) + + + +Assign items to one or more annotators. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + AssignItems assignItems = new AssignItems(); // AssignItems | + try { + QueueAssignItemsResponse result = apiInstance.assignAnnotationQueueItems(queueId, assignItems); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#assignAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **assignItems** | [**AssignItems**](AssignItems.md)| | | + +### Return type + +[**QueueAssignItemsResponse**](QueueAssignItemsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## assignAnnotationQueueItemsWithHttpInfo + +> ApiResponse assignAnnotationQueueItems assignAnnotationQueueItemsWithHttpInfo(queueId, assignItems) + + + +Assign items to one or more annotators. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + AssignItems assignItems = new AssignItems(); // AssignItems | + try { + ApiResponse response = apiInstance.assignAnnotationQueueItemsWithHttpInfo(queueId, assignItems); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#assignAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **assignItems** | [**AssignItems**](AssignItems.md)| | | + +### Return type + +ApiResponse<[**QueueAssignItemsResponse**](QueueAssignItemsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## completeAnnotationQueueItem + +> QueueNavigationResponse completeAnnotationQueueItem(queueId, id, queueItemNavigationRequest) + + + +Mark item as completed and return next pending item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItemNavigationRequest queueItemNavigationRequest = new QueueItemNavigationRequest(); // QueueItemNavigationRequest | + try { + QueueNavigationResponse result = apiInstance.completeAnnotationQueueItem(queueId, id, queueItemNavigationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#completeAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItemNavigationRequest** | [**QueueItemNavigationRequest**](QueueItemNavigationRequest.md)| | | + +### Return type + +[**QueueNavigationResponse**](QueueNavigationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## completeAnnotationQueueItemWithHttpInfo + +> ApiResponse completeAnnotationQueueItem completeAnnotationQueueItemWithHttpInfo(queueId, id, queueItemNavigationRequest) + + + +Mark item as completed and return next pending item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItemNavigationRequest queueItemNavigationRequest = new QueueItemNavigationRequest(); // QueueItemNavigationRequest | + try { + ApiResponse response = apiInstance.completeAnnotationQueueItemWithHttpInfo(queueId, id, queueItemNavigationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#completeAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItemNavigationRequest** | [**QueueItemNavigationRequest**](QueueItemNavigationRequest.md)| | | + +### Return type + +ApiResponse<[**QueueNavigationResponse**](QueueNavigationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getAnnotationQueueItemDetail + +> QueueAnnotateDetailResponse getAnnotationQueueItemDetail(queueId, id, annotatorId, includeCompleted, viewMode, reviewStatus, excludeReviewStatus, includeAllAnnotations, reserve) + + + +Get full annotation workspace data for an item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + UUID annotatorId = UUID.randomUUID(); // UUID | + Boolean includeCompleted = true; // Boolean | + String viewMode = "viewMode_example"; // String | + String reviewStatus = "reviewStatus_example"; // String | + String excludeReviewStatus = "excludeReviewStatus_example"; // String | + Boolean includeAllAnnotations = true; // Boolean | + Boolean reserve = true; // Boolean | + try { + QueueAnnotateDetailResponse result = apiInstance.getAnnotationQueueItemDetail(queueId, id, annotatorId, includeCompleted, viewMode, reviewStatus, excludeReviewStatus, includeAllAnnotations, reserve); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#getAnnotationQueueItemDetail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **annotatorId** | **UUID**| | [optional] | +| **includeCompleted** | **Boolean**| | [optional] | +| **viewMode** | **String**| | [optional] | +| **reviewStatus** | **String**| | [optional] | +| **excludeReviewStatus** | **String**| | [optional] | +| **includeAllAnnotations** | **Boolean**| | [optional] | +| **reserve** | **Boolean**| | [optional] | + +### Return type + +[**QueueAnnotateDetailResponse**](QueueAnnotateDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getAnnotationQueueItemDetailWithHttpInfo + +> ApiResponse getAnnotationQueueItemDetail getAnnotationQueueItemDetailWithHttpInfo(queueId, id, annotatorId, includeCompleted, viewMode, reviewStatus, excludeReviewStatus, includeAllAnnotations, reserve) + + + +Get full annotation workspace data for an item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + UUID annotatorId = UUID.randomUUID(); // UUID | + Boolean includeCompleted = true; // Boolean | + String viewMode = "viewMode_example"; // String | + String reviewStatus = "reviewStatus_example"; // String | + String excludeReviewStatus = "excludeReviewStatus_example"; // String | + Boolean includeAllAnnotations = true; // Boolean | + Boolean reserve = true; // Boolean | + try { + ApiResponse response = apiInstance.getAnnotationQueueItemDetailWithHttpInfo(queueId, id, annotatorId, includeCompleted, viewMode, reviewStatus, excludeReviewStatus, includeAllAnnotations, reserve); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#getAnnotationQueueItemDetail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **annotatorId** | **UUID**| | [optional] | +| **includeCompleted** | **Boolean**| | [optional] | +| **viewMode** | **String**| | [optional] | +| **reviewStatus** | **String**| | [optional] | +| **excludeReviewStatus** | **String**| | [optional] | +| **includeAllAnnotations** | **Boolean**| | [optional] | +| **reserve** | **Boolean**| | [optional] | + +### Return type + +ApiResponse<[**QueueAnnotateDetailResponse**](QueueAnnotateDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getNextAnnotationQueueItem + +> QueueNextItemResponse getNextAnnotationQueueItem(queueId, page, limit, exclude, before, reviewStatus, excludeReviewStatus, includeCompleted, viewMode, includeAllAnnotations) + +Get the next or previous item in the queue. + +Query params: exclude: comma-separated item IDs to skip before: item ID — returns the item immediately before this one in order review_status: optional review status filter (for reviewer queues) exclude_review_status: optional review status to omit (for annotator queues) include_completed: when true, navigation can visit completed items too + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String exclude = "exclude_example"; // String | + UUID before = UUID.randomUUID(); // UUID | + String reviewStatus = "reviewStatus_example"; // String | + String excludeReviewStatus = "excludeReviewStatus_example"; // String | + Boolean includeCompleted = true; // Boolean | + String viewMode = "viewMode_example"; // String | + Boolean includeAllAnnotations = true; // Boolean | + try { + QueueNextItemResponse result = apiInstance.getNextAnnotationQueueItem(queueId, page, limit, exclude, before, reviewStatus, excludeReviewStatus, includeCompleted, viewMode, includeAllAnnotations); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#getNextAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **exclude** | **String**| | [optional] | +| **before** | **UUID**| | [optional] | +| **reviewStatus** | **String**| | [optional] | +| **excludeReviewStatus** | **String**| | [optional] | +| **includeCompleted** | **Boolean**| | [optional] | +| **viewMode** | **String**| | [optional] | +| **includeAllAnnotations** | **Boolean**| | [optional] | + +### Return type + +[**QueueNextItemResponse**](QueueNextItemResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getNextAnnotationQueueItemWithHttpInfo + +> ApiResponse getNextAnnotationQueueItem getNextAnnotationQueueItemWithHttpInfo(queueId, page, limit, exclude, before, reviewStatus, excludeReviewStatus, includeCompleted, viewMode, includeAllAnnotations) + +Get the next or previous item in the queue. + +Query params: exclude: comma-separated item IDs to skip before: item ID — returns the item immediately before this one in order review_status: optional review status filter (for reviewer queues) exclude_review_status: optional review status to omit (for annotator queues) include_completed: when true, navigation can visit completed items too + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String exclude = "exclude_example"; // String | + UUID before = UUID.randomUUID(); // UUID | + String reviewStatus = "reviewStatus_example"; // String | + String excludeReviewStatus = "excludeReviewStatus_example"; // String | + Boolean includeCompleted = true; // Boolean | + String viewMode = "viewMode_example"; // String | + Boolean includeAllAnnotations = true; // Boolean | + try { + ApiResponse response = apiInstance.getNextAnnotationQueueItemWithHttpInfo(queueId, page, limit, exclude, before, reviewStatus, excludeReviewStatus, includeCompleted, viewMode, includeAllAnnotations); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#getNextAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **exclude** | **String**| | [optional] | +| **before** | **UUID**| | [optional] | +| **reviewStatus** | **String**| | [optional] | +| **excludeReviewStatus** | **String**| | [optional] | +| **includeCompleted** | **Boolean**| | [optional] | +| **viewMode** | **String**| | [optional] | +| **includeAllAnnotations** | **Boolean**| | [optional] | + +### Return type + +ApiResponse<[**QueueNextItemResponse**](QueueNextItemResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## importAnnotationQueueItemAnnotations + +> QueueImportAnnotationsResponse importAnnotationQueueItemAnnotations(queueId, id, importAnnotations) + + + +Import annotations from external sources. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + ImportAnnotations importAnnotations = new ImportAnnotations(); // ImportAnnotations | + try { + QueueImportAnnotationsResponse result = apiInstance.importAnnotationQueueItemAnnotations(queueId, id, importAnnotations); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#importAnnotationQueueItemAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **importAnnotations** | [**ImportAnnotations**](ImportAnnotations.md)| | | + +### Return type + +[**QueueImportAnnotationsResponse**](QueueImportAnnotationsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## importAnnotationQueueItemAnnotationsWithHttpInfo + +> ApiResponse importAnnotationQueueItemAnnotations importAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id, importAnnotations) + + + +Import annotations from external sources. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + ImportAnnotations importAnnotations = new ImportAnnotations(); // ImportAnnotations | + try { + ApiResponse response = apiInstance.importAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id, importAnnotations); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#importAnnotationQueueItemAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **importAnnotations** | [**ImportAnnotations**](ImportAnnotations.md)| | | + +### Return type + +ApiResponse<[**QueueImportAnnotationsResponse**](QueueImportAnnotationsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listAnnotationQueueItemAnnotations + +> QueueItemAnnotationsResponse listAnnotationQueueItemAnnotations(queueId, id) + + + +List all annotations for a queue item (across all annotators). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + QueueItemAnnotationsResponse result = apiInstance.listAnnotationQueueItemAnnotations(queueId, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#listAnnotationQueueItemAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + +[**QueueItemAnnotationsResponse**](QueueItemAnnotationsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listAnnotationQueueItemAnnotationsWithHttpInfo + +> ApiResponse listAnnotationQueueItemAnnotations listAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id) + + + +List all annotations for a queue item (across all annotators). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + ApiResponse response = apiInstance.listAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#listAnnotationQueueItemAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + +ApiResponse<[**QueueItemAnnotationsResponse**](QueueItemAnnotationsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listAnnotationQueueItems + +> ListAnnotationQueueItems200Response listAnnotationQueueItems(queueId, page, limit, status, sourceType, assignedTo, reviewStatus, ordering) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + List status = Arrays.asList(); // List | + List sourceType = Arrays.asList(); // List | + String assignedTo = "assignedTo_example"; // String | + String reviewStatus = "reviewStatus_example"; // String | + String ordering = "created_at"; // String | + try { + ListAnnotationQueueItems200Response result = apiInstance.listAnnotationQueueItems(queueId, page, limit, status, sourceType, assignedTo, reviewStatus, ordering); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#listAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **status** | [**List<String>**](String.md)| | [optional] | +| **sourceType** | [**List<String>**](String.md)| | [optional] | +| **assignedTo** | **String**| | [optional] | +| **reviewStatus** | **String**| | [optional] | +| **ordering** | **String**| | [optional] [enum: created_at, -created_at] | + +### Return type + +[**ListAnnotationQueueItems200Response**](ListAnnotationQueueItems200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listAnnotationQueueItemsWithHttpInfo + +> ApiResponse listAnnotationQueueItems listAnnotationQueueItemsWithHttpInfo(queueId, page, limit, status, sourceType, assignedTo, reviewStatus, ordering) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + List status = Arrays.asList(); // List | + List sourceType = Arrays.asList(); // List | + String assignedTo = "assignedTo_example"; // String | + String reviewStatus = "reviewStatus_example"; // String | + String ordering = "created_at"; // String | + try { + ApiResponse response = apiInstance.listAnnotationQueueItemsWithHttpInfo(queueId, page, limit, status, sourceType, assignedTo, reviewStatus, ordering); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#listAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **status** | [**List<String>**](String.md)| | [optional] | +| **sourceType** | [**List<String>**](String.md)| | [optional] | +| **assignedTo** | **String**| | [optional] | +| **reviewStatus** | **String**| | [optional] | +| **ordering** | **String**| | [optional] [enum: created_at, -created_at] | + +### Return type + +ApiResponse<[**ListAnnotationQueueItems200Response**](ListAnnotationQueueItems200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## releaseAnnotationQueueItem + +> QueueReleaseReservationResponse releaseAnnotationQueueItem(queueId, id, body) + + + +Release reservation on an item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + Object body = null; // Object | + try { + QueueReleaseReservationResponse result = apiInstance.releaseAnnotationQueueItem(queueId, id, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#releaseAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **body** | **Object**| | | + +### Return type + +[**QueueReleaseReservationResponse**](QueueReleaseReservationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## releaseAnnotationQueueItemWithHttpInfo + +> ApiResponse releaseAnnotationQueueItem releaseAnnotationQueueItemWithHttpInfo(queueId, id, body) + + + +Release reservation on an item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + Object body = null; // Object | + try { + ApiResponse response = apiInstance.releaseAnnotationQueueItemWithHttpInfo(queueId, id, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#releaseAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**QueueReleaseReservationResponse**](QueueReleaseReservationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## removeAnnotationQueueItems + +> QueueBulkRemoveItemsResponse removeAnnotationQueueItems(queueId, bulkRemoveItems) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + BulkRemoveItems bulkRemoveItems = new BulkRemoveItems(); // BulkRemoveItems | + try { + QueueBulkRemoveItemsResponse result = apiInstance.removeAnnotationQueueItems(queueId, bulkRemoveItems); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#removeAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **bulkRemoveItems** | [**BulkRemoveItems**](BulkRemoveItems.md)| | | + +### Return type + +[**QueueBulkRemoveItemsResponse**](QueueBulkRemoveItemsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## removeAnnotationQueueItemsWithHttpInfo + +> ApiResponse removeAnnotationQueueItems removeAnnotationQueueItemsWithHttpInfo(queueId, bulkRemoveItems) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + BulkRemoveItems bulkRemoveItems = new BulkRemoveItems(); // BulkRemoveItems | + try { + ApiResponse response = apiInstance.removeAnnotationQueueItemsWithHttpInfo(queueId, bulkRemoveItems); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#removeAnnotationQueueItems"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **bulkRemoveItems** | [**BulkRemoveItems**](BulkRemoveItems.md)| | | + +### Return type + +ApiResponse<[**QueueBulkRemoveItemsResponse**](QueueBulkRemoveItemsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## skipAnnotationQueueItem + +> QueueNavigationResponse skipAnnotationQueueItem(queueId, id, queueItemNavigationRequest) + + + +Mark item as skipped and return next pending item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItemNavigationRequest queueItemNavigationRequest = new QueueItemNavigationRequest(); // QueueItemNavigationRequest | + try { + QueueNavigationResponse result = apiInstance.skipAnnotationQueueItem(queueId, id, queueItemNavigationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#skipAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItemNavigationRequest** | [**QueueItemNavigationRequest**](QueueItemNavigationRequest.md)| | | + +### Return type + +[**QueueNavigationResponse**](QueueNavigationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## skipAnnotationQueueItemWithHttpInfo + +> ApiResponse skipAnnotationQueueItem skipAnnotationQueueItemWithHttpInfo(queueId, id, queueItemNavigationRequest) + + + +Mark item as skipped and return next pending item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItemNavigationRequest queueItemNavigationRequest = new QueueItemNavigationRequest(); // QueueItemNavigationRequest | + try { + ApiResponse response = apiInstance.skipAnnotationQueueItemWithHttpInfo(queueId, id, queueItemNavigationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#skipAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItemNavigationRequest** | [**QueueItemNavigationRequest**](QueueItemNavigationRequest.md)| | | + +### Return type + +ApiResponse<[**QueueNavigationResponse**](QueueNavigationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## submitAnnotationQueueItemAnnotations + +> QueueSubmitAnnotationsResponse submitAnnotationQueueItemAnnotations(queueId, id, submitAnnotations) + + + +Submit or update annotations for a queue item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + SubmitAnnotations submitAnnotations = new SubmitAnnotations(); // SubmitAnnotations | + try { + QueueSubmitAnnotationsResponse result = apiInstance.submitAnnotationQueueItemAnnotations(queueId, id, submitAnnotations); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#submitAnnotationQueueItemAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **submitAnnotations** | [**SubmitAnnotations**](SubmitAnnotations.md)| | | + +### Return type + +[**QueueSubmitAnnotationsResponse**](QueueSubmitAnnotationsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## submitAnnotationQueueItemAnnotationsWithHttpInfo + +> ApiResponse submitAnnotationQueueItemAnnotations submitAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id, submitAnnotations) + + + +Submit or update annotations for a queue item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueItemsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueItemsApi apiInstance = new AnnotationQueueItemsApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + SubmitAnnotations submitAnnotations = new SubmitAnnotations(); // SubmitAnnotations | + try { + ApiResponse response = apiInstance.submitAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id, submitAnnotations); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueItemsApi#submitAnnotationQueueItemAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **submitAnnotations** | [**SubmitAnnotations**](SubmitAnnotations.md)| | | + +### Return type + +ApiResponse<[**QueueSubmitAnnotationsResponse**](QueueSubmitAnnotationsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/AnnotationQueueReviewApi.md b/java/futureagi/docs/AnnotationQueueReviewApi.md new file mode 100644 index 0000000..5e3eace --- /dev/null +++ b/java/futureagi/docs/AnnotationQueueReviewApi.md @@ -0,0 +1,190 @@ +# AnnotationQueueReviewApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**reviewAnnotationQueueItem**](AnnotationQueueReviewApi.md#reviewAnnotationQueueItem) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/review/ | | +| [**reviewAnnotationQueueItemWithHttpInfo**](AnnotationQueueReviewApi.md#reviewAnnotationQueueItemWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/{id}/review/ | | + + + +## reviewAnnotationQueueItem + +> QueueReviewItemResponse reviewAnnotationQueueItem(queueId, id, reviewItemRequest) + + + +Approve, request changes, or leave reviewer feedback on an item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueReviewApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueReviewApi apiInstance = new AnnotationQueueReviewApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + ReviewItemRequest reviewItemRequest = new ReviewItemRequest(); // ReviewItemRequest | + try { + QueueReviewItemResponse result = apiInstance.reviewAnnotationQueueItem(queueId, id, reviewItemRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueReviewApi#reviewAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **reviewItemRequest** | [**ReviewItemRequest**](ReviewItemRequest.md)| | | + +### Return type + +[**QueueReviewItemResponse**](QueueReviewItemResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## reviewAnnotationQueueItemWithHttpInfo + +> ApiResponse reviewAnnotationQueueItem reviewAnnotationQueueItemWithHttpInfo(queueId, id, reviewItemRequest) + + + +Approve, request changes, or leave reviewer feedback on an item. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueueReviewApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueueReviewApi apiInstance = new AnnotationQueueReviewApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + ReviewItemRequest reviewItemRequest = new ReviewItemRequest(); // ReviewItemRequest | + try { + ApiResponse response = apiInstance.reviewAnnotationQueueItemWithHttpInfo(queueId, id, reviewItemRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueueReviewApi#reviewAnnotationQueueItem"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **reviewItemRequest** | [**ReviewItemRequest**](ReviewItemRequest.md)| | | + +### Return type + +ApiResponse<[**QueueReviewItemResponse**](QueueReviewItemResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/AnnotationQueuesApi.md b/java/futureagi/docs/AnnotationQueuesApi.md new file mode 100644 index 0000000..bfc15cc --- /dev/null +++ b/java/futureagi/docs/AnnotationQueuesApi.md @@ -0,0 +1,2436 @@ +# AnnotationQueuesApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addAnnotationQueueLabel**](AnnotationQueuesApi.md#addAnnotationQueueLabel) | **POST** /model-hub/annotation-queues/{id}/add-label/ | | +| [**addAnnotationQueueLabelWithHttpInfo**](AnnotationQueuesApi.md#addAnnotationQueueLabelWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/add-label/ | | +| [**archiveAnnotationQueue**](AnnotationQueuesApi.md#archiveAnnotationQueue) | **DELETE** /model-hub/annotation-queues/{id}/ | Archive a queue (soft delete). | +| [**archiveAnnotationQueueWithHttpInfo**](AnnotationQueuesApi.md#archiveAnnotationQueueWithHttpInfo) | **DELETE** /model-hub/annotation-queues/{id}/ | Archive a queue (soft delete). | +| [**createAnnotationQueue**](AnnotationQueuesApi.md#createAnnotationQueue) | **POST** /model-hub/annotation-queues/ | | +| [**createAnnotationQueueWithHttpInfo**](AnnotationQueuesApi.md#createAnnotationQueueWithHttpInfo) | **POST** /model-hub/annotation-queues/ | | +| [**exportAnnotationQueue**](AnnotationQueuesApi.md#exportAnnotationQueue) | **GET** /model-hub/annotation-queues/{id}/export/ | | +| [**exportAnnotationQueueWithHttpInfo**](AnnotationQueuesApi.md#exportAnnotationQueueWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/export/ | | +| [**exportAnnotationQueueToDataset**](AnnotationQueuesApi.md#exportAnnotationQueueToDataset) | **POST** /model-hub/annotation-queues/{id}/export-to-dataset/ | | +| [**exportAnnotationQueueToDatasetWithHttpInfo**](AnnotationQueuesApi.md#exportAnnotationQueueToDatasetWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/export-to-dataset/ | | +| [**getAnnotationQueue**](AnnotationQueuesApi.md#getAnnotationQueue) | **GET** /model-hub/annotation-queues/{id}/ | | +| [**getAnnotationQueueWithHttpInfo**](AnnotationQueuesApi.md#getAnnotationQueueWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/ | | +| [**getAnnotationQueueAgreement**](AnnotationQueuesApi.md#getAnnotationQueueAgreement) | **GET** /model-hub/annotation-queues/{id}/agreement/ | | +| [**getAnnotationQueueAgreementWithHttpInfo**](AnnotationQueuesApi.md#getAnnotationQueueAgreementWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/agreement/ | | +| [**getAnnotationQueueAnalytics**](AnnotationQueuesApi.md#getAnnotationQueueAnalytics) | **GET** /model-hub/annotation-queues/{id}/analytics/ | | +| [**getAnnotationQueueAnalyticsWithHttpInfo**](AnnotationQueuesApi.md#getAnnotationQueueAnalyticsWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/analytics/ | | +| [**getAnnotationQueueProgress**](AnnotationQueuesApi.md#getAnnotationQueueProgress) | **GET** /model-hub/annotation-queues/{id}/progress/ | | +| [**getAnnotationQueueProgressWithHttpInfo**](AnnotationQueuesApi.md#getAnnotationQueueProgressWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/progress/ | | +| [**listAnnotationQueueExportFields**](AnnotationQueuesApi.md#listAnnotationQueueExportFields) | **GET** /model-hub/annotation-queues/{id}/export-fields/ | | +| [**listAnnotationQueueExportFieldsWithHttpInfo**](AnnotationQueuesApi.md#listAnnotationQueueExportFieldsWithHttpInfo) | **GET** /model-hub/annotation-queues/{id}/export-fields/ | | +| [**listAnnotationQueues**](AnnotationQueuesApi.md#listAnnotationQueues) | **GET** /model-hub/annotation-queues/ | | +| [**listAnnotationQueuesWithHttpInfo**](AnnotationQueuesApi.md#listAnnotationQueuesWithHttpInfo) | **GET** /model-hub/annotation-queues/ | | +| [**removeAnnotationQueueLabel**](AnnotationQueuesApi.md#removeAnnotationQueueLabel) | **POST** /model-hub/annotation-queues/{id}/remove-label/ | | +| [**removeAnnotationQueueLabelWithHttpInfo**](AnnotationQueuesApi.md#removeAnnotationQueueLabelWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/remove-label/ | | +| [**updateAnnotationQueue**](AnnotationQueuesApi.md#updateAnnotationQueue) | **PATCH** /model-hub/annotation-queues/{id}/ | | +| [**updateAnnotationQueueWithHttpInfo**](AnnotationQueuesApi.md#updateAnnotationQueueWithHttpInfo) | **PATCH** /model-hub/annotation-queues/{id}/ | | +| [**updateAnnotationQueueStatus**](AnnotationQueuesApi.md#updateAnnotationQueueStatus) | **POST** /model-hub/annotation-queues/{id}/update-status/ | | +| [**updateAnnotationQueueStatusWithHttpInfo**](AnnotationQueuesApi.md#updateAnnotationQueueStatusWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/update-status/ | | + + + +## addAnnotationQueueLabel + +> QueueAddLabelResponse addAnnotationQueueLabel(id, queueLabelRequest) + + + +Add a label to an annotation queue. Labels apply to all sources in the queue's project (for default queues). Queue items are created lazily when someone actually annotates. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueLabelRequest queueLabelRequest = new QueueLabelRequest(); // QueueLabelRequest | + try { + QueueAddLabelResponse result = apiInstance.addAnnotationQueueLabel(id, queueLabelRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#addAnnotationQueueLabel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueLabelRequest** | [**QueueLabelRequest**](QueueLabelRequest.md)| | | + +### Return type + +[**QueueAddLabelResponse**](QueueAddLabelResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## addAnnotationQueueLabelWithHttpInfo + +> ApiResponse addAnnotationQueueLabel addAnnotationQueueLabelWithHttpInfo(id, queueLabelRequest) + + + +Add a label to an annotation queue. Labels apply to all sources in the queue's project (for default queues). Queue items are created lazily when someone actually annotates. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueLabelRequest queueLabelRequest = new QueueLabelRequest(); // QueueLabelRequest | + try { + ApiResponse response = apiInstance.addAnnotationQueueLabelWithHttpInfo(id, queueLabelRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#addAnnotationQueueLabel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueLabelRequest** | [**QueueLabelRequest**](QueueLabelRequest.md)| | | + +### Return type + +ApiResponse<[**QueueAddLabelResponse**](QueueAddLabelResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## archiveAnnotationQueue + +> void archiveAnnotationQueue(id) + +Archive a queue (soft delete). + +``BaseModel.delete()`` flips ``deleted=True`` instead of removing the row. Attached automation rules go dormant (the scheduler filters ``queue__deleted=False``), items stay invisible but recoverable, label bindings preserved. For truly destructive removal, use the ``hard-delete`` action below. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + apiInstance.archiveAnnotationQueue(id); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#archiveAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## archiveAnnotationQueueWithHttpInfo + +> ApiResponse archiveAnnotationQueue archiveAnnotationQueueWithHttpInfo(id) + +Archive a queue (soft delete). + +``BaseModel.delete()`` flips ``deleted=True`` instead of removing the row. Attached automation rules go dormant (the scheduler filters ``queue__deleted=False``), items stay invisible but recoverable, label bindings preserved. For truly destructive removal, use the ``hard-delete`` action below. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + ApiResponse response = apiInstance.archiveAnnotationQueueWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#archiveAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## createAnnotationQueue + +> AnnotationQueue createAnnotationQueue(annotationQueue) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + AnnotationQueue annotationQueue = new AnnotationQueue(); // AnnotationQueue | + try { + AnnotationQueue result = apiInstance.createAnnotationQueue(annotationQueue); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#createAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md)| | | + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## createAnnotationQueueWithHttpInfo + +> ApiResponse createAnnotationQueue createAnnotationQueueWithHttpInfo(annotationQueue) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + AnnotationQueue annotationQueue = new AnnotationQueue(); // AnnotationQueue | + try { + ApiResponse response = apiInstance.createAnnotationQueueWithHttpInfo(annotationQueue); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#createAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md)| | | + +### Return type + +ApiResponse<[**AnnotationQueue**](AnnotationQueue.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## exportAnnotationQueue + +> QueueExportAnnotationsResponse exportAnnotationQueue(id, exportFormat, status) + + + +Export all items with their annotations. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + String exportFormat = "json"; // String | + String status = "status_example"; // String | + try { + QueueExportAnnotationsResponse result = apiInstance.exportAnnotationQueue(id, exportFormat, status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#exportAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **exportFormat** | **String**| | [optional] [enum: json, csv] | +| **status** | **String**| | [optional] | + +### Return type + +[**QueueExportAnnotationsResponse**](QueueExportAnnotationsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## exportAnnotationQueueWithHttpInfo + +> ApiResponse exportAnnotationQueue exportAnnotationQueueWithHttpInfo(id, exportFormat, status) + + + +Export all items with their annotations. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + String exportFormat = "json"; // String | + String status = "status_example"; // String | + try { + ApiResponse response = apiInstance.exportAnnotationQueueWithHttpInfo(id, exportFormat, status); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#exportAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **exportFormat** | **String**| | [optional] [enum: json, csv] | +| **status** | **String**| | [optional] | + +### Return type + +ApiResponse<[**QueueExportAnnotationsResponse**](QueueExportAnnotationsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## exportAnnotationQueueToDataset + +> QueueExportToDatasetResponse exportAnnotationQueueToDataset(id, queueExportToDatasetRequest) + + + +Export queue items to a dataset using a user-editable column mapping. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueExportToDatasetRequest queueExportToDatasetRequest = new QueueExportToDatasetRequest(); // QueueExportToDatasetRequest | + try { + QueueExportToDatasetResponse result = apiInstance.exportAnnotationQueueToDataset(id, queueExportToDatasetRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#exportAnnotationQueueToDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueExportToDatasetRequest** | [**QueueExportToDatasetRequest**](QueueExportToDatasetRequest.md)| | | + +### Return type + +[**QueueExportToDatasetResponse**](QueueExportToDatasetResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## exportAnnotationQueueToDatasetWithHttpInfo + +> ApiResponse exportAnnotationQueueToDataset exportAnnotationQueueToDatasetWithHttpInfo(id, queueExportToDatasetRequest) + + + +Export queue items to a dataset using a user-editable column mapping. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueExportToDatasetRequest queueExportToDatasetRequest = new QueueExportToDatasetRequest(); // QueueExportToDatasetRequest | + try { + ApiResponse response = apiInstance.exportAnnotationQueueToDatasetWithHttpInfo(id, queueExportToDatasetRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#exportAnnotationQueueToDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueExportToDatasetRequest** | [**QueueExportToDatasetRequest**](QueueExportToDatasetRequest.md)| | | + +### Return type + +ApiResponse<[**QueueExportToDatasetResponse**](QueueExportToDatasetResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getAnnotationQueue + +> AnnotationQueue getAnnotationQueue(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + AnnotationQueue result = apiInstance.getAnnotationQueue(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getAnnotationQueueWithHttpInfo + +> ApiResponse getAnnotationQueue getAnnotationQueueWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + ApiResponse response = apiInstance.getAnnotationQueueWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +ApiResponse<[**AnnotationQueue**](AnnotationQueue.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## getAnnotationQueueAgreement + +> QueueAgreementResponse getAnnotationQueueAgreement(id) + + + +Calculate inter-annotator agreement metrics. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + QueueAgreementResponse result = apiInstance.getAnnotationQueueAgreement(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueueAgreement"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +[**QueueAgreementResponse**](QueueAgreementResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getAnnotationQueueAgreementWithHttpInfo + +> ApiResponse getAnnotationQueueAgreement getAnnotationQueueAgreementWithHttpInfo(id) + + + +Calculate inter-annotator agreement metrics. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + ApiResponse response = apiInstance.getAnnotationQueueAgreementWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueueAgreement"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +ApiResponse<[**QueueAgreementResponse**](QueueAgreementResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getAnnotationQueueAnalytics + +> QueueAnalyticsResponse getAnnotationQueueAnalytics(id) + + + +Queue analytics: throughput, annotator performance, label distribution. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + QueueAnalyticsResponse result = apiInstance.getAnnotationQueueAnalytics(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueueAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +[**QueueAnalyticsResponse**](QueueAnalyticsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getAnnotationQueueAnalyticsWithHttpInfo + +> ApiResponse getAnnotationQueueAnalytics getAnnotationQueueAnalyticsWithHttpInfo(id) + + + +Queue analytics: throughput, annotator performance, label distribution. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + ApiResponse response = apiInstance.getAnnotationQueueAnalyticsWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueueAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +ApiResponse<[**QueueAnalyticsResponse**](QueueAnalyticsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getAnnotationQueueProgress + +> QueueProgressResponse getAnnotationQueueProgress(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + QueueProgressResponse result = apiInstance.getAnnotationQueueProgress(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueueProgress"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +[**QueueProgressResponse**](QueueProgressResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getAnnotationQueueProgressWithHttpInfo + +> ApiResponse getAnnotationQueueProgress getAnnotationQueueProgressWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + ApiResponse response = apiInstance.getAnnotationQueueProgressWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#getAnnotationQueueProgress"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +ApiResponse<[**QueueProgressResponse**](QueueProgressResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listAnnotationQueueExportFields + +> QueueExportFieldsResponse listAnnotationQueueExportFields(id) + + + +Return source/label/attribute fields available for dataset export. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + QueueExportFieldsResponse result = apiInstance.listAnnotationQueueExportFields(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#listAnnotationQueueExportFields"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +[**QueueExportFieldsResponse**](QueueExportFieldsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listAnnotationQueueExportFieldsWithHttpInfo + +> ApiResponse listAnnotationQueueExportFields listAnnotationQueueExportFieldsWithHttpInfo(id) + + + +Return source/label/attribute fields available for dataset export. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + try { + ApiResponse response = apiInstance.listAnnotationQueueExportFieldsWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#listAnnotationQueueExportFields"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | + +### Return type + +ApiResponse<[**QueueExportFieldsResponse**](QueueExportFieldsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listAnnotationQueues + +> ListAnnotationQueues200Response listAnnotationQueues(page, limit, status, search, includeCounts) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String status = "status_example"; // String | + String search = "search_example"; // String | + Boolean includeCounts = true; // Boolean | + try { + ListAnnotationQueues200Response result = apiInstance.listAnnotationQueues(page, limit, status, search, includeCounts); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#listAnnotationQueues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **status** | **String**| | [optional] | +| **search** | **String**| | [optional] | +| **includeCounts** | **Boolean**| | [optional] | + +### Return type + +[**ListAnnotationQueues200Response**](ListAnnotationQueues200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listAnnotationQueuesWithHttpInfo + +> ApiResponse listAnnotationQueues listAnnotationQueuesWithHttpInfo(page, limit, status, search, includeCounts) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String status = "status_example"; // String | + String search = "search_example"; // String | + Boolean includeCounts = true; // Boolean | + try { + ApiResponse response = apiInstance.listAnnotationQueuesWithHttpInfo(page, limit, status, search, includeCounts); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#listAnnotationQueues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **status** | **String**| | [optional] | +| **search** | **String**| | [optional] | +| **includeCounts** | **Boolean**| | [optional] | + +### Return type + +ApiResponse<[**ListAnnotationQueues200Response**](ListAnnotationQueues200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## removeAnnotationQueueLabel + +> QueueRemoveLabelResponse removeAnnotationQueueLabel(id, queueLabelRequest) + + + +Remove a label from an annotation queue. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueLabelRequest queueLabelRequest = new QueueLabelRequest(); // QueueLabelRequest | + try { + QueueRemoveLabelResponse result = apiInstance.removeAnnotationQueueLabel(id, queueLabelRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#removeAnnotationQueueLabel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueLabelRequest** | [**QueueLabelRequest**](QueueLabelRequest.md)| | | + +### Return type + +[**QueueRemoveLabelResponse**](QueueRemoveLabelResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## removeAnnotationQueueLabelWithHttpInfo + +> ApiResponse removeAnnotationQueueLabel removeAnnotationQueueLabelWithHttpInfo(id, queueLabelRequest) + + + +Remove a label from an annotation queue. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueLabelRequest queueLabelRequest = new QueueLabelRequest(); // QueueLabelRequest | + try { + ApiResponse response = apiInstance.removeAnnotationQueueLabelWithHttpInfo(id, queueLabelRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#removeAnnotationQueueLabel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueLabelRequest** | [**QueueLabelRequest**](QueueLabelRequest.md)| | | + +### Return type + +ApiResponse<[**QueueRemoveLabelResponse**](QueueRemoveLabelResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## updateAnnotationQueue + +> AnnotationQueue updateAnnotationQueue(id, annotationQueue) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + AnnotationQueue annotationQueue = new AnnotationQueue(); // AnnotationQueue | + try { + AnnotationQueue result = apiInstance.updateAnnotationQueue(id, annotationQueue); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#updateAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md)| | | + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## updateAnnotationQueueWithHttpInfo + +> ApiResponse updateAnnotationQueue updateAnnotationQueueWithHttpInfo(id, annotationQueue) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + AnnotationQueue annotationQueue = new AnnotationQueue(); // AnnotationQueue | + try { + ApiResponse response = apiInstance.updateAnnotationQueueWithHttpInfo(id, annotationQueue); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#updateAnnotationQueue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md)| | | + +### Return type + +ApiResponse<[**AnnotationQueue**](AnnotationQueue.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## updateAnnotationQueueStatus + +> QueueStatusResponse updateAnnotationQueueStatus(id, queueStatusRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueStatusRequest queueStatusRequest = new QueueStatusRequest(); // QueueStatusRequest | + try { + QueueStatusResponse result = apiInstance.updateAnnotationQueueStatus(id, queueStatusRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#updateAnnotationQueueStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueStatusRequest** | [**QueueStatusRequest**](QueueStatusRequest.md)| | | + +### Return type + +[**QueueStatusResponse**](QueueStatusResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## updateAnnotationQueueStatusWithHttpInfo + +> ApiResponse updateAnnotationQueueStatus updateAnnotationQueueStatusWithHttpInfo(id, queueStatusRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.AnnotationQueuesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + AnnotationQueuesApi apiInstance = new AnnotationQueuesApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueStatusRequest queueStatusRequest = new QueueStatusRequest(); // QueueStatusRequest | + try { + ApiResponse response = apiInstance.updateAnnotationQueueStatusWithHttpInfo(id, queueStatusRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationQueuesApi#updateAnnotationQueueStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueStatusRequest** | [**QueueStatusRequest**](QueueStatusRequest.md)| | | + +### Return type + +ApiResponse<[**QueueStatusResponse**](QueueStatusResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/DatasetsApi.md b/java/futureagi/docs/DatasetsApi.md new file mode 100644 index 0000000..8237b5e --- /dev/null +++ b/java/futureagi/docs/DatasetsApi.md @@ -0,0 +1,3504 @@ +# DatasetsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addDatasetColumns**](DatasetsApi.md#addDatasetColumns) | **POST** /model-hub/develops/{dataset_id}/add_columns/ | | +| [**addDatasetColumnsWithHttpInfo**](DatasetsApi.md#addDatasetColumnsWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_columns/ | | +| [**addDatasetRows**](DatasetsApi.md#addDatasetRows) | **POST** /model-hub/develops/{dataset_id}/add_rows/ | | +| [**addDatasetRowsWithHttpInfo**](DatasetsApi.md#addDatasetRowsWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_rows/ | | +| [**createDatasetFromLocalFile**](DatasetsApi.md#createDatasetFromLocalFile) | **POST** /model-hub/develops/create-dataset-from-local-file/ | | +| [**createDatasetFromLocalFileWithHttpInfo**](DatasetsApi.md#createDatasetFromLocalFileWithHttpInfo) | **POST** /model-hub/develops/create-dataset-from-local-file/ | | +| [**createDatasetManually**](DatasetsApi.md#createDatasetManually) | **POST** /model-hub/develops/create-dataset-manually/ | | +| [**createDatasetManuallyWithHttpInfo**](DatasetsApi.md#createDatasetManuallyWithHttpInfo) | **POST** /model-hub/develops/create-dataset-manually/ | | +| [**createEmptyDataset**](DatasetsApi.md#createEmptyDataset) | **POST** /model-hub/develops/create-empty-dataset/ | | +| [**createEmptyDatasetWithHttpInfo**](DatasetsApi.md#createEmptyDatasetWithHttpInfo) | **POST** /model-hub/develops/create-empty-dataset/ | | +| [**deleteDatasetColumn**](DatasetsApi.md#deleteDatasetColumn) | **DELETE** /model-hub/develops/{dataset_id}/delete_column/{column_id}/ | | +| [**deleteDatasetColumnWithHttpInfo**](DatasetsApi.md#deleteDatasetColumnWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_column/{column_id}/ | | +| [**deleteDatasetRow**](DatasetsApi.md#deleteDatasetRow) | **DELETE** /model-hub/develops/{dataset_id}/delete_row/ | | +| [**deleteDatasetRowWithHttpInfo**](DatasetsApi.md#deleteDatasetRowWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_row/ | | +| [**downloadDataset**](DatasetsApi.md#downloadDataset) | **GET** /model-hub/develops/{dataset_id}/download_dataset/ | | +| [**downloadDatasetWithHttpInfo**](DatasetsApi.md#downloadDatasetWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/download_dataset/ | | +| [**duplicateDataset**](DatasetsApi.md#duplicateDataset) | **POST** /model-hub/datasets/{dataset_id}/duplicate/ | | +| [**duplicateDatasetWithHttpInfo**](DatasetsApi.md#duplicateDatasetWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/duplicate/ | | +| [**getDatasetAnnotationSummary**](DatasetsApi.md#getDatasetAnnotationSummary) | **GET** /model-hub/dataset/{dataset_id}/annotation-summary/ | | +| [**getDatasetAnnotationSummaryWithHttpInfo**](DatasetsApi.md#getDatasetAnnotationSummaryWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/annotation-summary/ | | +| [**getDatasetColumns**](DatasetsApi.md#getDatasetColumns) | **GET** /model-hub/dataset/columns/{dataset_id}/ | | +| [**getDatasetColumnsWithHttpInfo**](DatasetsApi.md#getDatasetColumnsWithHttpInfo) | **GET** /model-hub/dataset/columns/{dataset_id}/ | | +| [**getDatasetEvalStats**](DatasetsApi.md#getDatasetEvalStats) | **GET** /model-hub/dataset/{dataset_id}/eval-stats/ | | +| [**getDatasetEvalStatsWithHttpInfo**](DatasetsApi.md#getDatasetEvalStatsWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/eval-stats/ | | +| [**getDatasetJsonSchema**](DatasetsApi.md#getDatasetJsonSchema) | **GET** /model-hub/dataset/{dataset_id}/json-schema/ | | +| [**getDatasetJsonSchemaWithHttpInfo**](DatasetsApi.md#getDatasetJsonSchemaWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/json-schema/ | | +| [**getDatasetRow**](DatasetsApi.md#getDatasetRow) | **POST** /model-hub/develops/{dataset_id}/get-row-data/ | | +| [**getDatasetRowWithHttpInfo**](DatasetsApi.md#getDatasetRowWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/get-row-data/ | | +| [**getDatasetTable**](DatasetsApi.md#getDatasetTable) | **GET** /model-hub/develops/{dataset_id}/get-dataset-table/ | | +| [**getDatasetTableWithHttpInfo**](DatasetsApi.md#getDatasetTableWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/get-dataset-table/ | | +| [**listDatasetBaseColumns**](DatasetsApi.md#listDatasetBaseColumns) | **GET** /model-hub/datasets/get-base-columns/ | | +| [**listDatasetBaseColumnsWithHttpInfo**](DatasetsApi.md#listDatasetBaseColumnsWithHttpInfo) | **GET** /model-hub/datasets/get-base-columns/ | | +| [**listDatasetDerivedVariables**](DatasetsApi.md#listDatasetDerivedVariables) | **GET** /model-hub/datasets/{dataset_id}/derived-variables/ | Get all derived variables from all run prompt columns in a dataset. | +| [**listDatasetDerivedVariablesWithHttpInfo**](DatasetsApi.md#listDatasetDerivedVariablesWithHttpInfo) | **GET** /model-hub/datasets/{dataset_id}/derived-variables/ | Get all derived variables from all run prompt columns in a dataset. | +| [**listDatasetNames**](DatasetsApi.md#listDatasetNames) | **GET** /model-hub/develops/get-datasets-names/ | | +| [**listDatasetNamesWithHttpInfo**](DatasetsApi.md#listDatasetNamesWithHttpInfo) | **GET** /model-hub/develops/get-datasets-names/ | | +| [**listDatasets**](DatasetsApi.md#listDatasets) | **GET** /model-hub/develops/get-datasets/ | | +| [**listDatasetsWithHttpInfo**](DatasetsApi.md#listDatasetsWithHttpInfo) | **GET** /model-hub/develops/get-datasets/ | | +| [**updateDatasetCell**](DatasetsApi.md#updateDatasetCell) | **POST** /model-hub/develops/{dataset_id}/update_cell_value/ | | +| [**updateDatasetCellWithHttpInfo**](DatasetsApi.md#updateDatasetCellWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/update_cell_value/ | | + + + +## addDatasetColumns + +> DatasetColumnsMutationResponse addDatasetColumns(datasetId, datasetAddColumnsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddColumnsRequest datasetAddColumnsRequest = new DatasetAddColumnsRequest(); // DatasetAddColumnsRequest | + try { + DatasetColumnsMutationResponse result = apiInstance.addDatasetColumns(datasetId, datasetAddColumnsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#addDatasetColumns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddColumnsRequest** | [**DatasetAddColumnsRequest**](DatasetAddColumnsRequest.md)| | | + +### Return type + +[**DatasetColumnsMutationResponse**](DatasetColumnsMutationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## addDatasetColumnsWithHttpInfo + +> ApiResponse addDatasetColumns addDatasetColumnsWithHttpInfo(datasetId, datasetAddColumnsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddColumnsRequest datasetAddColumnsRequest = new DatasetAddColumnsRequest(); // DatasetAddColumnsRequest | + try { + ApiResponse response = apiInstance.addDatasetColumnsWithHttpInfo(datasetId, datasetAddColumnsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#addDatasetColumns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddColumnsRequest** | [**DatasetAddColumnsRequest**](DatasetAddColumnsRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetColumnsMutationResponse**](DatasetColumnsMutationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## addDatasetRows + +> DevelopDatasetMessageResponse addDatasetRows(datasetId, datasetAddRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddRowsRequest datasetAddRowsRequest = new DatasetAddRowsRequest(); // DatasetAddRowsRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.addDatasetRows(datasetId, datasetAddRowsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#addDatasetRows"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddRowsRequest** | [**DatasetAddRowsRequest**](DatasetAddRowsRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## addDatasetRowsWithHttpInfo + +> ApiResponse addDatasetRows addDatasetRowsWithHttpInfo(datasetId, datasetAddRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddRowsRequest datasetAddRowsRequest = new DatasetAddRowsRequest(); // DatasetAddRowsRequest | + try { + ApiResponse response = apiInstance.addDatasetRowsWithHttpInfo(datasetId, datasetAddRowsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#addDatasetRows"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddRowsRequest** | [**DatasetAddRowsRequest**](DatasetAddRowsRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## createDatasetFromLocalFile + +> LocalFileDatasetCreateStartedResponse createDatasetFromLocalFile(createDatasetFromLocalFileRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + CreateDatasetFromLocalFileRequest createDatasetFromLocalFileRequest = new CreateDatasetFromLocalFileRequest(); // CreateDatasetFromLocalFileRequest | + try { + LocalFileDatasetCreateStartedResponse result = apiInstance.createDatasetFromLocalFile(createDatasetFromLocalFileRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#createDatasetFromLocalFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createDatasetFromLocalFileRequest** | [**CreateDatasetFromLocalFileRequest**](CreateDatasetFromLocalFileRequest.md)| | | + +### Return type + +[**LocalFileDatasetCreateStartedResponse**](LocalFileDatasetCreateStartedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createDatasetFromLocalFileWithHttpInfo + +> ApiResponse createDatasetFromLocalFile createDatasetFromLocalFileWithHttpInfo(createDatasetFromLocalFileRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + CreateDatasetFromLocalFileRequest createDatasetFromLocalFileRequest = new CreateDatasetFromLocalFileRequest(); // CreateDatasetFromLocalFileRequest | + try { + ApiResponse response = apiInstance.createDatasetFromLocalFileWithHttpInfo(createDatasetFromLocalFileRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#createDatasetFromLocalFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createDatasetFromLocalFileRequest** | [**CreateDatasetFromLocalFileRequest**](CreateDatasetFromLocalFileRequest.md)| | | + +### Return type + +ApiResponse<[**LocalFileDatasetCreateStartedResponse**](LocalFileDatasetCreateStartedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## createDatasetManually + +> ManualDatasetCreateResponse createDatasetManually(manualDatasetCreateRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + ManualDatasetCreateRequest manualDatasetCreateRequest = new ManualDatasetCreateRequest(); // ManualDatasetCreateRequest | + try { + ManualDatasetCreateResponse result = apiInstance.createDatasetManually(manualDatasetCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#createDatasetManually"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **manualDatasetCreateRequest** | [**ManualDatasetCreateRequest**](ManualDatasetCreateRequest.md)| | | + +### Return type + +[**ManualDatasetCreateResponse**](ManualDatasetCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createDatasetManuallyWithHttpInfo + +> ApiResponse createDatasetManually createDatasetManuallyWithHttpInfo(manualDatasetCreateRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + ManualDatasetCreateRequest manualDatasetCreateRequest = new ManualDatasetCreateRequest(); // ManualDatasetCreateRequest | + try { + ApiResponse response = apiInstance.createDatasetManuallyWithHttpInfo(manualDatasetCreateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#createDatasetManually"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **manualDatasetCreateRequest** | [**ManualDatasetCreateRequest**](ManualDatasetCreateRequest.md)| | | + +### Return type + +ApiResponse<[**ManualDatasetCreateResponse**](ManualDatasetCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## createEmptyDataset + +> DatasetCreateStartedResponse createEmptyDataset(createEmptyDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + CreateEmptyDatasetRequest createEmptyDatasetRequest = new CreateEmptyDatasetRequest(); // CreateEmptyDatasetRequest | + try { + DatasetCreateStartedResponse result = apiInstance.createEmptyDataset(createEmptyDatasetRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#createEmptyDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createEmptyDatasetRequest** | [**CreateEmptyDatasetRequest**](CreateEmptyDatasetRequest.md)| | | + +### Return type + +[**DatasetCreateStartedResponse**](DatasetCreateStartedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createEmptyDatasetWithHttpInfo + +> ApiResponse createEmptyDataset createEmptyDatasetWithHttpInfo(createEmptyDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + CreateEmptyDatasetRequest createEmptyDatasetRequest = new CreateEmptyDatasetRequest(); // CreateEmptyDatasetRequest | + try { + ApiResponse response = apiInstance.createEmptyDatasetWithHttpInfo(createEmptyDatasetRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#createEmptyDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createEmptyDatasetRequest** | [**CreateEmptyDatasetRequest**](CreateEmptyDatasetRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetCreateStartedResponse**](DatasetCreateStartedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## deleteDatasetColumn + +> void deleteDatasetColumn(datasetId, columnId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String columnId = "columnId_example"; // String | + try { + apiInstance.deleteDatasetColumn(datasetId, columnId); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#deleteDatasetColumn"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **columnId** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## deleteDatasetColumnWithHttpInfo + +> ApiResponse deleteDatasetColumn deleteDatasetColumnWithHttpInfo(datasetId, columnId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String columnId = "columnId_example"; // String | + try { + ApiResponse response = apiInstance.deleteDatasetColumnWithHttpInfo(datasetId, columnId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#deleteDatasetColumn"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **columnId** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## deleteDatasetRow + +> void deleteDatasetRow(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + apiInstance.deleteDatasetRow(datasetId); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#deleteDatasetRow"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## deleteDatasetRowWithHttpInfo + +> ApiResponse deleteDatasetRow deleteDatasetRowWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.deleteDatasetRowWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#deleteDatasetRow"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## downloadDataset + +> File downloadDataset(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + File result = apiInstance.downloadDataset(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#downloadDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**File**](File.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | CSV export | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## downloadDatasetWithHttpInfo + +> ApiResponse downloadDataset downloadDatasetWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.downloadDatasetWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#downloadDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**File**](File.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | CSV export | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## duplicateDataset + +> DuplicateDatasetResponse duplicateDataset(datasetId, duplicateDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DuplicateDatasetRequest duplicateDatasetRequest = new DuplicateDatasetRequest(); // DuplicateDatasetRequest | + try { + DuplicateDatasetResponse result = apiInstance.duplicateDataset(datasetId, duplicateDatasetRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#duplicateDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **duplicateDatasetRequest** | [**DuplicateDatasetRequest**](DuplicateDatasetRequest.md)| | | + +### Return type + +[**DuplicateDatasetResponse**](DuplicateDatasetResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## duplicateDatasetWithHttpInfo + +> ApiResponse duplicateDataset duplicateDatasetWithHttpInfo(datasetId, duplicateDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DuplicateDatasetRequest duplicateDatasetRequest = new DuplicateDatasetRequest(); // DuplicateDatasetRequest | + try { + ApiResponse response = apiInstance.duplicateDatasetWithHttpInfo(datasetId, duplicateDatasetRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#duplicateDataset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **duplicateDatasetRequest** | [**DuplicateDatasetRequest**](DuplicateDatasetRequest.md)| | | + +### Return type + +ApiResponse<[**DuplicateDatasetResponse**](DuplicateDatasetResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getDatasetAnnotationSummary + +> AnnotationSummaryResponse getDatasetAnnotationSummary(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + AnnotationSummaryResponse result = apiInstance.getDatasetAnnotationSummary(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetAnnotationSummary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**AnnotationSummaryResponse**](AnnotationSummaryResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getDatasetAnnotationSummaryWithHttpInfo + +> ApiResponse getDatasetAnnotationSummary getDatasetAnnotationSummaryWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.getDatasetAnnotationSummaryWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetAnnotationSummary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**AnnotationSummaryResponse**](AnnotationSummaryResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getDatasetColumns + +> DatasetColumnDetailResponse getDatasetColumns(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetColumnDetailResponse result = apiInstance.getDatasetColumns(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetColumns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetColumnDetailResponse**](DatasetColumnDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getDatasetColumnsWithHttpInfo + +> ApiResponse getDatasetColumns getDatasetColumnsWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.getDatasetColumnsWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetColumns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetColumnDetailResponse**](DatasetColumnDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getDatasetEvalStats + +> DatasetEvalStatsResponse getDatasetEvalStats(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetEvalStatsResponse result = apiInstance.getDatasetEvalStats(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetEvalStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetEvalStatsResponse**](DatasetEvalStatsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getDatasetEvalStatsWithHttpInfo + +> ApiResponse getDatasetEvalStats getDatasetEvalStatsWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.getDatasetEvalStatsWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetEvalStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetEvalStatsResponse**](DatasetEvalStatsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getDatasetJsonSchema + +> DatasetJsonSchemaResponse getDatasetJsonSchema(datasetId) + + + +API endpoint to get JSON schemas and images metadata for columns in a dataset. Used by frontend for autocomplete suggestions when accessing JSON properties and for indexed access to images columns. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetJsonSchemaResponse result = apiInstance.getDatasetJsonSchema(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetJsonSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetJsonSchemaResponse**](DatasetJsonSchemaResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getDatasetJsonSchemaWithHttpInfo + +> ApiResponse getDatasetJsonSchema getDatasetJsonSchemaWithHttpInfo(datasetId) + + + +API endpoint to get JSON schemas and images metadata for columns in a dataset. Used by frontend for autocomplete suggestions when accessing JSON properties and for indexed access to images columns. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.getDatasetJsonSchemaWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetJsonSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetJsonSchemaResponse**](DatasetJsonSchemaResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getDatasetRow + +> DatasetRowDataResponse getDatasetRow(datasetId, datasetRowDataRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetRowDataRequest datasetRowDataRequest = new DatasetRowDataRequest(); // DatasetRowDataRequest | + try { + DatasetRowDataResponse result = apiInstance.getDatasetRow(datasetId, datasetRowDataRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetRow"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetRowDataRequest** | [**DatasetRowDataRequest**](DatasetRowDataRequest.md)| | | + +### Return type + +[**DatasetRowDataResponse**](DatasetRowDataResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getDatasetRowWithHttpInfo + +> ApiResponse getDatasetRow getDatasetRowWithHttpInfo(datasetId, datasetRowDataRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetRowDataRequest datasetRowDataRequest = new DatasetRowDataRequest(); // DatasetRowDataRequest | + try { + ApiResponse response = apiInstance.getDatasetRowWithHttpInfo(datasetId, datasetRowDataRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetRow"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetRowDataRequest** | [**DatasetRowDataRequest**](DatasetRowDataRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetRowDataResponse**](DatasetRowDataResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getDatasetTable + +> DatasetTableResponse getDatasetTable(datasetId, filters, sort, search, pageSize, currentPageIndex, columnConfigOnly) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String filters = "[]"; // String | + String sort = "[]"; // String | + String search = "search_example"; // String | + Integer pageSize = 10; // Integer | + Integer currentPageIndex = 0; // Integer | + Boolean columnConfigOnly = false; // Boolean | + try { + DatasetTableResponse result = apiInstance.getDatasetTable(datasetId, filters, sort, search, pageSize, currentPageIndex, columnConfigOnly); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetTable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **filters** | **String**| | [optional] [default to []] | +| **sort** | **String**| | [optional] [default to []] | +| **search** | **String**| | [optional] | +| **pageSize** | **Integer**| | [optional] [default to 10] | +| **currentPageIndex** | **Integer**| | [optional] [default to 0] | +| **columnConfigOnly** | **Boolean**| | [optional] [default to false] | + +### Return type + +[**DatasetTableResponse**](DatasetTableResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getDatasetTableWithHttpInfo + +> ApiResponse getDatasetTable getDatasetTableWithHttpInfo(datasetId, filters, sort, search, pageSize, currentPageIndex, columnConfigOnly) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String filters = "[]"; // String | + String sort = "[]"; // String | + String search = "search_example"; // String | + Integer pageSize = 10; // Integer | + Integer currentPageIndex = 0; // Integer | + Boolean columnConfigOnly = false; // Boolean | + try { + ApiResponse response = apiInstance.getDatasetTableWithHttpInfo(datasetId, filters, sort, search, pageSize, currentPageIndex, columnConfigOnly); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#getDatasetTable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **filters** | **String**| | [optional] [default to []] | +| **sort** | **String**| | [optional] [default to []] | +| **search** | **String**| | [optional] | +| **pageSize** | **Integer**| | [optional] [default to 10] | +| **currentPageIndex** | **Integer**| | [optional] [default to 0] | +| **columnConfigOnly** | **Boolean**| | [optional] [default to false] | + +### Return type + +ApiResponse<[**DatasetTableResponse**](DatasetTableResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listDatasetBaseColumns + +> BaseColumnsResponse listDatasetBaseColumns() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + try { + BaseColumnsResponse result = apiInstance.listDatasetBaseColumns(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasetBaseColumns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**BaseColumnsResponse**](BaseColumnsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listDatasetBaseColumnsWithHttpInfo + +> ApiResponse listDatasetBaseColumns listDatasetBaseColumnsWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + try { + ApiResponse response = apiInstance.listDatasetBaseColumnsWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasetBaseColumns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**BaseColumnsResponse**](BaseColumnsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listDatasetDerivedVariables + +> DatasetDerivedVariablesResponse listDatasetDerivedVariables(datasetId) + +Get all derived variables from all run prompt columns in a dataset. + +This aggregates derived variables from run prompt columns that produce JSON outputs, making them available for use in other prompts, evals, and experiments. Path params: - dataset_id: UUID of the dataset + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetDerivedVariablesResponse result = apiInstance.listDatasetDerivedVariables(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasetDerivedVariables"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetDerivedVariablesResponse**](DatasetDerivedVariablesResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listDatasetDerivedVariablesWithHttpInfo + +> ApiResponse listDatasetDerivedVariables listDatasetDerivedVariablesWithHttpInfo(datasetId) + +Get all derived variables from all run prompt columns in a dataset. + +This aggregates derived variables from run prompt columns that produce JSON outputs, making them available for use in other prompts, evals, and experiments. Path params: - dataset_id: UUID of the dataset + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.listDatasetDerivedVariablesWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasetDerivedVariables"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetDerivedVariablesResponse**](DatasetDerivedVariablesResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listDatasetNames + +> DatasetNamesResponse listDatasetNames() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + try { + DatasetNamesResponse result = apiInstance.listDatasetNames(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasetNames"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**DatasetNamesResponse**](DatasetNamesResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listDatasetNamesWithHttpInfo + +> ApiResponse listDatasetNames listDatasetNamesWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + try { + ApiResponse response = apiInstance.listDatasetNamesWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasetNames"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**DatasetNamesResponse**](DatasetNamesResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listDatasets + +> DatasetListResponse listDatasets(searchText, page, pageSize, sort) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String searchText = ""; // String | + Integer page = 0; // Integer | + Integer pageSize = 10; // Integer | + String sort = "sort_example"; // String | + try { + DatasetListResponse result = apiInstance.listDatasets(searchText, page, pageSize, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **searchText** | **String**| | [optional] [default to ] | +| **page** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 10] | +| **sort** | **String**| | [optional] | + +### Return type + +[**DatasetListResponse**](DatasetListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listDatasetsWithHttpInfo + +> ApiResponse listDatasets listDatasetsWithHttpInfo(searchText, page, pageSize, sort) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String searchText = ""; // String | + Integer page = 0; // Integer | + Integer pageSize = 10; // Integer | + String sort = "sort_example"; // String | + try { + ApiResponse response = apiInstance.listDatasetsWithHttpInfo(searchText, page, pageSize, sort); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#listDatasets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **searchText** | **String**| | [optional] [default to ] | +| **page** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 10] | +| **sort** | **String**| | [optional] | + +### Return type + +ApiResponse<[**DatasetListResponse**](DatasetListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## updateDatasetCell + +> DevelopDatasetMessageResponse updateDatasetCell(datasetId, datasetUpdateCellValueRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetUpdateCellValueRequest datasetUpdateCellValueRequest = new DatasetUpdateCellValueRequest(); // DatasetUpdateCellValueRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.updateDatasetCell(datasetId, datasetUpdateCellValueRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#updateDatasetCell"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetUpdateCellValueRequest** | [**DatasetUpdateCellValueRequest**](DatasetUpdateCellValueRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## updateDatasetCellWithHttpInfo + +> ApiResponse updateDatasetCell updateDatasetCellWithHttpInfo(datasetId, datasetUpdateCellValueRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.DatasetsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + DatasetsApi apiInstance = new DatasetsApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetUpdateCellValueRequest datasetUpdateCellValueRequest = new DatasetUpdateCellValueRequest(); // DatasetUpdateCellValueRequest | + try { + ApiResponse response = apiInstance.updateDatasetCellWithHttpInfo(datasetId, datasetUpdateCellValueRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DatasetsApi#updateDatasetCell"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetUpdateCellValueRequest** | [**DatasetUpdateCellValueRequest**](DatasetUpdateCellValueRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/ExperimentsApi.md b/java/futureagi/docs/ExperimentsApi.md new file mode 100644 index 0000000..bd76595 --- /dev/null +++ b/java/futureagi/docs/ExperimentsApi.md @@ -0,0 +1,2454 @@ +# ExperimentsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**compareExperiments**](ExperimentsApi.md#compareExperiments) | **POST** /model-hub/experiments/v2/{experiment_id}/compare-experiments/ | | +| [**compareExperimentsWithHttpInfo**](ExperimentsApi.md#compareExperimentsWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/compare-experiments/ | | +| [**createExperiment**](ExperimentsApi.md#createExperiment) | **POST** /model-hub/experiments/v2/ | | +| [**createExperimentWithHttpInfo**](ExperimentsApi.md#createExperimentWithHttpInfo) | **POST** /model-hub/experiments/v2/ | | +| [**deleteExperiments**](ExperimentsApi.md#deleteExperiments) | **DELETE** /model-hub/experiments/v2/delete/ | | +| [**deleteExperimentsWithHttpInfo**](ExperimentsApi.md#deleteExperimentsWithHttpInfo) | **DELETE** /model-hub/experiments/v2/delete/ | | +| [**downloadExperiment**](ExperimentsApi.md#downloadExperiment) | **GET** /model-hub/experiments/v2/{experiment_id}/download/ | | +| [**downloadExperimentWithHttpInfo**](ExperimentsApi.md#downloadExperimentWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/download/ | | +| [**getExperiment**](ExperimentsApi.md#getExperiment) | **GET** /model-hub/experiments/v2/{experiment_id}/ | | +| [**getExperimentWithHttpInfo**](ExperimentsApi.md#getExperimentWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/ | | +| [**getExperimentJsonSchema**](ExperimentsApi.md#getExperimentJsonSchema) | **GET** /model-hub/experiments/v2/{experiment_id}/json-schema/ | | +| [**getExperimentJsonSchemaWithHttpInfo**](ExperimentsApi.md#getExperimentJsonSchemaWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/json-schema/ | | +| [**getExperimentRow**](ExperimentsApi.md#getExperimentRow) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/ | | +| [**getExperimentRowWithHttpInfo**](ExperimentsApi.md#getExperimentRowWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/ | | +| [**getExperimentStats**](ExperimentsApi.md#getExperimentStats) | **GET** /model-hub/experiments/v2/{experiment_id}/stats/ | | +| [**getExperimentStatsWithHttpInfo**](ExperimentsApi.md#getExperimentStatsWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/stats/ | | +| [**listExperimentComparisons**](ExperimentsApi.md#listExperimentComparisons) | **GET** /model-hub/experiments/v2/{experiment_id}/comparisons/ | | +| [**listExperimentComparisonsWithHttpInfo**](ExperimentsApi.md#listExperimentComparisonsWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/comparisons/ | | +| [**listExperimentRows**](ExperimentsApi.md#listExperimentRows) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/ | | +| [**listExperimentRowsWithHttpInfo**](ExperimentsApi.md#listExperimentRowsWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/rows/ | | +| [**listExperiments**](ExperimentsApi.md#listExperiments) | **GET** /model-hub/experiments/v2/list/ | | +| [**listExperimentsWithHttpInfo**](ExperimentsApi.md#listExperimentsWithHttpInfo) | **GET** /model-hub/experiments/v2/list/ | | +| [**rerunExperiment**](ExperimentsApi.md#rerunExperiment) | **POST** /model-hub/experiments/v2/re-run/ | V2 re-run: org-scoped, uses V2 Temporal workflow. | +| [**rerunExperimentWithHttpInfo**](ExperimentsApi.md#rerunExperimentWithHttpInfo) | **POST** /model-hub/experiments/v2/re-run/ | V2 re-run: org-scoped, uses V2 Temporal workflow. | +| [**stopExperiment**](ExperimentsApi.md#stopExperiment) | **POST** /model-hub/experiments/v2/{experiment_id}/stop/ | Stop a running V2 experiment. | +| [**stopExperimentWithHttpInfo**](ExperimentsApi.md#stopExperimentWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/stop/ | Stop a running V2 experiment. | +| [**updateExperiment**](ExperimentsApi.md#updateExperiment) | **PUT** /model-hub/experiments/v2/{experiment_id}/ | Update a V2 experiment with diff-based selective re-run. | +| [**updateExperimentWithHttpInfo**](ExperimentsApi.md#updateExperimentWithHttpInfo) | **PUT** /model-hub/experiments/v2/{experiment_id}/ | Update a V2 experiment with diff-based selective re-run. | + + + +## compareExperiments + +> ExperimentDatasetComparisonResponse compareExperiments(experimentId, experimentComparisonWeightsRequest) + + + +V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentComparisonWeightsRequest experimentComparisonWeightsRequest = new ExperimentComparisonWeightsRequest(); // ExperimentComparisonWeightsRequest | + try { + ExperimentDatasetComparisonResponse result = apiInstance.compareExperiments(experimentId, experimentComparisonWeightsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#compareExperiments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentComparisonWeightsRequest** | [**ExperimentComparisonWeightsRequest**](ExperimentComparisonWeightsRequest.md)| | | + +### Return type + +[**ExperimentDatasetComparisonResponse**](ExperimentDatasetComparisonResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## compareExperimentsWithHttpInfo + +> ApiResponse compareExperiments compareExperimentsWithHttpInfo(experimentId, experimentComparisonWeightsRequest) + + + +V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentComparisonWeightsRequest experimentComparisonWeightsRequest = new ExperimentComparisonWeightsRequest(); // ExperimentComparisonWeightsRequest | + try { + ApiResponse response = apiInstance.compareExperimentsWithHttpInfo(experimentId, experimentComparisonWeightsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#compareExperiments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentComparisonWeightsRequest** | [**ExperimentComparisonWeightsRequest**](ExperimentComparisonWeightsRequest.md)| | | + +### Return type + +ApiResponse<[**ExperimentDatasetComparisonResponse**](ExperimentDatasetComparisonResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## createExperiment + +> ExperimentStringResultResponse createExperiment(experimentCreateV2) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + ExperimentCreateV2 experimentCreateV2 = new ExperimentCreateV2(); // ExperimentCreateV2 | + try { + ExperimentStringResultResponse result = apiInstance.createExperiment(experimentCreateV2); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#createExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentCreateV2** | [**ExperimentCreateV2**](ExperimentCreateV2.md)| | | + +### Return type + +[**ExperimentStringResultResponse**](ExperimentStringResultResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createExperimentWithHttpInfo + +> ApiResponse createExperiment createExperimentWithHttpInfo(experimentCreateV2) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + ExperimentCreateV2 experimentCreateV2 = new ExperimentCreateV2(); // ExperimentCreateV2 | + try { + ApiResponse response = apiInstance.createExperimentWithHttpInfo(experimentCreateV2); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#createExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentCreateV2** | [**ExperimentCreateV2**](ExperimentCreateV2.md)| | | + +### Return type + +ApiResponse<[**ExperimentStringResultResponse**](ExperimentStringResultResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## deleteExperiments + +> void deleteExperiments() + + + +V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + try { + apiInstance.deleteExperiments(); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#deleteExperiments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## deleteExperimentsWithHttpInfo + +> ApiResponse deleteExperiments deleteExperimentsWithHttpInfo() + + + +V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + try { + ApiResponse response = apiInstance.deleteExperimentsWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#deleteExperiments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## downloadExperiment + +> File downloadExperiment(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + File result = apiInstance.downloadExperiment(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#downloadExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**File**](File.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## downloadExperimentWithHttpInfo + +> ApiResponse downloadExperiment downloadExperimentWithHttpInfo(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.downloadExperimentWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#downloadExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**File**](File.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getExperiment + +> ExperimentV2DetailResponse getExperiment(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentV2DetailResponse result = apiInstance.getExperiment(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentV2DetailResponse**](ExperimentV2DetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getExperimentWithHttpInfo + +> ApiResponse getExperiment getExperimentWithHttpInfo(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.getExperimentWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentV2DetailResponse**](ExperimentV2DetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getExperimentJsonSchema + +> ExperimentJsonSchemaResponse getExperimentJsonSchema(experimentId) + + + +Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. Delegates to the shared get_json_column_schemas() function. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentJsonSchemaResponse result = apiInstance.getExperimentJsonSchema(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperimentJsonSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentJsonSchemaResponse**](ExperimentJsonSchemaResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getExperimentJsonSchemaWithHttpInfo + +> ApiResponse getExperimentJsonSchema getExperimentJsonSchemaWithHttpInfo(experimentId) + + + +Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. Delegates to the shared get_json_column_schemas() function. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.getExperimentJsonSchemaWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperimentJsonSchema"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentJsonSchemaResponse**](ExperimentJsonSchemaResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getExperimentRow + +> ExperimentTableRowsResponse getExperimentRow(experimentId, rowId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + String rowId = "rowId_example"; // String | + try { + ExperimentTableRowsResponse result = apiInstance.getExperimentRow(experimentId, rowId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperimentRow"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **rowId** | **String**| | | + +### Return type + +[**ExperimentTableRowsResponse**](ExperimentTableRowsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getExperimentRowWithHttpInfo + +> ApiResponse getExperimentRow getExperimentRowWithHttpInfo(experimentId, rowId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + String rowId = "rowId_example"; // String | + try { + ApiResponse response = apiInstance.getExperimentRowWithHttpInfo(experimentId, rowId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperimentRow"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **rowId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentTableRowsResponse**](ExperimentTableRowsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getExperimentStats + +> ExperimentStatsResponse getExperimentStats(experimentId) + + + +Stats view for V2 experiments that read from snapshot_dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentStatsResponse result = apiInstance.getExperimentStats(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperimentStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentStatsResponse**](ExperimentStatsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getExperimentStatsWithHttpInfo + +> ApiResponse getExperimentStats getExperimentStatsWithHttpInfo(experimentId) + + + +Stats view for V2 experiments that read from snapshot_dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.getExperimentStatsWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#getExperimentStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentStatsResponse**](ExperimentStatsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listExperimentComparisons + +> ExperimentComparisonDetailsResponse listExperimentComparisons(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentComparisonDetailsResponse result = apiInstance.listExperimentComparisons(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#listExperimentComparisons"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentComparisonDetailsResponse**](ExperimentComparisonDetailsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listExperimentComparisonsWithHttpInfo + +> ApiResponse listExperimentComparisons listExperimentComparisonsWithHttpInfo(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.listExperimentComparisonsWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#listExperimentComparisons"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentComparisonDetailsResponse**](ExperimentComparisonDetailsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listExperimentRows + +> ExperimentTableRowsResponse listExperimentRows(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentTableRowsResponse result = apiInstance.listExperimentRows(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#listExperimentRows"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentTableRowsResponse**](ExperimentTableRowsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listExperimentRowsWithHttpInfo + +> ApiResponse listExperimentRows listExperimentRowsWithHttpInfo(experimentId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.listExperimentRowsWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#listExperimentRows"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentTableRowsResponse**](ExperimentTableRowsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listExperiments + +> ListExperiments200Response listExperiments(createdAt, status, datasetId, search, ordering, page, limit) + + + +V2 experiment list with filtering, search, and pagination. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String createdAt = "createdAt_example"; // String | + String status = "status_example"; // String | + String datasetId = "datasetId_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ListExperiments200Response result = apiInstance.listExperiments(createdAt, status, datasetId, search, ordering, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#listExperiments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createdAt** | **String**| | [optional] | +| **status** | **String**| | [optional] | +| **datasetId** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ListExperiments200Response**](ListExperiments200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listExperimentsWithHttpInfo + +> ApiResponse listExperiments listExperimentsWithHttpInfo(createdAt, status, datasetId, search, ordering, page, limit) + + + +V2 experiment list with filtering, search, and pagination. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String createdAt = "createdAt_example"; // String | + String status = "status_example"; // String | + String datasetId = "datasetId_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listExperimentsWithHttpInfo(createdAt, status, datasetId, search, ordering, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#listExperiments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createdAt** | **String**| | [optional] | +| **status** | **String**| | [optional] | +| **datasetId** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ListExperiments200Response**](ListExperiments200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## rerunExperiment + +> ExperimentStringResultResponse rerunExperiment(experimentRerunRequest) + +V2 re-run: org-scoped, uses V2 Temporal workflow. + +No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID reuse policy automatically cancels any running workflow with the same ID. Cell reset is handled by the workflow itself (cleanup + setup activities). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + ExperimentRerunRequest experimentRerunRequest = new ExperimentRerunRequest(); // ExperimentRerunRequest | + try { + ExperimentStringResultResponse result = apiInstance.rerunExperiment(experimentRerunRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#rerunExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentRerunRequest** | [**ExperimentRerunRequest**](ExperimentRerunRequest.md)| | | + +### Return type + +[**ExperimentStringResultResponse**](ExperimentStringResultResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## rerunExperimentWithHttpInfo + +> ApiResponse rerunExperiment rerunExperimentWithHttpInfo(experimentRerunRequest) + +V2 re-run: org-scoped, uses V2 Temporal workflow. + +No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID reuse policy automatically cancels any running workflow with the same ID. Cell reset is handled by the workflow itself (cleanup + setup activities). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + ExperimentRerunRequest experimentRerunRequest = new ExperimentRerunRequest(); // ExperimentRerunRequest | + try { + ApiResponse response = apiInstance.rerunExperimentWithHttpInfo(experimentRerunRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#rerunExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentRerunRequest** | [**ExperimentRerunRequest**](ExperimentRerunRequest.md)| | | + +### Return type + +ApiResponse<[**ExperimentStringResultResponse**](ExperimentStringResultResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## stopExperiment + +> ExperimentStopResponse stopExperiment(experimentId, body) + +Stop a running V2 experiment. + +Cancels all Temporal workflows (main + reruns). DB cleanup (marking RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) is handled by each workflow's CancelledError handler via the stop_experiment_cleanup_activity. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + Object body = null; // Object | + try { + ExperimentStopResponse result = apiInstance.stopExperiment(experimentId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#stopExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**ExperimentStopResponse**](ExperimentStopResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## stopExperimentWithHttpInfo + +> ApiResponse stopExperiment stopExperimentWithHttpInfo(experimentId, body) + +Stop a running V2 experiment. + +Cancels all Temporal workflows (main + reruns). DB cleanup (marking RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) is handled by each workflow's CancelledError handler via the stop_experiment_cleanup_activity. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.stopExperimentWithHttpInfo(experimentId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#stopExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**ExperimentStopResponse**](ExperimentStopResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## updateExperiment + +> ExperimentV2DetailResponse updateExperiment(experimentId, experimentUpdateV2) + +Update a V2 experiment with diff-based selective re-run. + +Editable fields: column_id, prompt_config, user_eval_metrics. Re-run triggers (determined by fingerprint diffs, not field presence): - prompt_config has new/modified entries → re-run those configs + ALL dependent evals - user_eval_metrics has new/modified entries → re-run only those evals - column_id changed → delete old base eval columns, re-run base evals - If FE sends unchanged data, diffs return empty → no re-run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentUpdateV2 experimentUpdateV2 = new ExperimentUpdateV2(); // ExperimentUpdateV2 | + try { + ExperimentV2DetailResponse result = apiInstance.updateExperiment(experimentId, experimentUpdateV2); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#updateExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentUpdateV2** | [**ExperimentUpdateV2**](ExperimentUpdateV2.md)| | | + +### Return type + +[**ExperimentV2DetailResponse**](ExperimentV2DetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## updateExperimentWithHttpInfo + +> ApiResponse updateExperiment updateExperimentWithHttpInfo(experimentId, experimentUpdateV2) + +Update a V2 experiment with diff-based selective re-run. + +Editable fields: column_id, prompt_config, user_eval_metrics. Re-run triggers (determined by fingerprint diffs, not field presence): - prompt_config has new/modified entries → re-run those configs + ALL dependent evals - user_eval_metrics has new/modified entries → re-run only those evals - column_id changed → delete old base eval columns, re-run base evals - If FE sends unchanged data, diffs return empty → no re-run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ExperimentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentUpdateV2 experimentUpdateV2 = new ExperimentUpdateV2(); // ExperimentUpdateV2 | + try { + ApiResponse response = apiInstance.updateExperimentWithHttpInfo(experimentId, experimentUpdateV2); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#updateExperiment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentUpdateV2** | [**ExperimentUpdateV2**](ExperimentUpdateV2.md)| | | + +### Return type + +ApiResponse<[**ExperimentV2DetailResponse**](ExperimentV2DetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/ModelHubApi.md b/java/futureagi/docs/ModelHubApi.md new file mode 100644 index 0000000..5f13ac3 --- /dev/null +++ b/java/futureagi/docs/ModelHubApi.md @@ -0,0 +1,34286 @@ +# ModelHubApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**modelHubAnnotationQueuesAutomationRulesCreate**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesCreate) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/ | | +| [**modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/ | | +| [**modelHubAnnotationQueuesAutomationRulesDelete**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesDelete) | **DELETE** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo) | **DELETE** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesAutomationRulesEvaluate**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesEvaluate) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/ | Trigger a manual rule run with a sync-or-async branch. | +| [**modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/ | Trigger a manual rule run with a sync-or-async branch. | +| [**modelHubAnnotationQueuesAutomationRulesList**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesList) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/ | | +| [**modelHubAnnotationQueuesAutomationRulesListWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesListWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/ | | +| [**modelHubAnnotationQueuesAutomationRulesPartialUpdate**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPartialUpdate) | **PATCH** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo) | **PATCH** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesAutomationRulesPreview**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPreview) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/ | | +| [**modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/ | | +| [**modelHubAnnotationQueuesAutomationRulesRead**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesRead) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesAutomationRulesUpdate**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesUpdate) | **PUT** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo) | **PUT** /model-hub/annotation-queues/{queue_id}/automation-rules/{id}/ | | +| [**modelHubAnnotationQueuesForSource**](ModelHubApi.md#modelHubAnnotationQueuesForSource) | **GET** /model-hub/annotation-queues/for-source/ | | +| [**modelHubAnnotationQueuesForSourceWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesForSourceWithHttpInfo) | **GET** /model-hub/annotation-queues/for-source/ | | +| [**modelHubAnnotationQueuesGetOrCreateDefault**](ModelHubApi.md#modelHubAnnotationQueuesGetOrCreateDefault) | **POST** /model-hub/annotation-queues/get-or-create-default/ | | +| [**modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo) | **POST** /model-hub/annotation-queues/get-or-create-default/ | | +| [**modelHubAnnotationQueuesHardDelete**](ModelHubApi.md#modelHubAnnotationQueuesHardDelete) | **POST** /model-hub/annotation-queues/{id}/hard-delete/ | Permanently remove a queue + everything attached. | +| [**modelHubAnnotationQueuesHardDeleteWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesHardDeleteWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/hard-delete/ | Permanently remove a queue + everything attached. | +| [**modelHubAnnotationQueuesItemsCreate**](ModelHubApi.md#modelHubAnnotationQueuesItemsCreate) | **POST** /model-hub/annotation-queues/{queue_id}/items/ | | +| [**modelHubAnnotationQueuesItemsCreateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesItemsCreateWithHttpInfo) | **POST** /model-hub/annotation-queues/{queue_id}/items/ | | +| [**modelHubAnnotationQueuesItemsDelete**](ModelHubApi.md#modelHubAnnotationQueuesItemsDelete) | **DELETE** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesItemsDeleteWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesItemsDeleteWithHttpInfo) | **DELETE** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesItemsPartialUpdate**](ModelHubApi.md#modelHubAnnotationQueuesItemsPartialUpdate) | **PATCH** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo) | **PATCH** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesItemsRead**](ModelHubApi.md#modelHubAnnotationQueuesItemsRead) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesItemsReadWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesItemsReadWithHttpInfo) | **GET** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesItemsUpdate**](ModelHubApi.md#modelHubAnnotationQueuesItemsUpdate) | **PUT** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesItemsUpdateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesItemsUpdateWithHttpInfo) | **PUT** /model-hub/annotation-queues/{queue_id}/items/{id}/ | | +| [**modelHubAnnotationQueuesRestore**](ModelHubApi.md#modelHubAnnotationQueuesRestore) | **POST** /model-hub/annotation-queues/{id}/restore/ | | +| [**modelHubAnnotationQueuesRestoreWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesRestoreWithHttpInfo) | **POST** /model-hub/annotation-queues/{id}/restore/ | | +| [**modelHubAnnotationQueuesUpdate**](ModelHubApi.md#modelHubAnnotationQueuesUpdate) | **PUT** /model-hub/annotation-queues/{id}/ | | +| [**modelHubAnnotationQueuesUpdateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationQueuesUpdateWithHttpInfo) | **PUT** /model-hub/annotation-queues/{id}/ | | +| [**modelHubAnnotationsLabelsCreate**](ModelHubApi.md#modelHubAnnotationsLabelsCreate) | **POST** /model-hub/annotations-labels/ | | +| [**modelHubAnnotationsLabelsCreateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationsLabelsCreateWithHttpInfo) | **POST** /model-hub/annotations-labels/ | | +| [**modelHubAnnotationsLabelsDelete**](ModelHubApi.md#modelHubAnnotationsLabelsDelete) | **DELETE** /model-hub/annotations-labels/{id}/ | | +| [**modelHubAnnotationsLabelsDeleteWithHttpInfo**](ModelHubApi.md#modelHubAnnotationsLabelsDeleteWithHttpInfo) | **DELETE** /model-hub/annotations-labels/{id}/ | | +| [**modelHubAnnotationsLabelsList**](ModelHubApi.md#modelHubAnnotationsLabelsList) | **GET** /model-hub/annotations-labels/ | | +| [**modelHubAnnotationsLabelsListWithHttpInfo**](ModelHubApi.md#modelHubAnnotationsLabelsListWithHttpInfo) | **GET** /model-hub/annotations-labels/ | | +| [**modelHubAnnotationsLabelsPartialUpdate**](ModelHubApi.md#modelHubAnnotationsLabelsPartialUpdate) | **PATCH** /model-hub/annotations-labels/{id}/ | | +| [**modelHubAnnotationsLabelsPartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationsLabelsPartialUpdateWithHttpInfo) | **PATCH** /model-hub/annotations-labels/{id}/ | | +| [**modelHubAnnotationsLabelsRead**](ModelHubApi.md#modelHubAnnotationsLabelsRead) | **GET** /model-hub/annotations-labels/{id}/ | | +| [**modelHubAnnotationsLabelsReadWithHttpInfo**](ModelHubApi.md#modelHubAnnotationsLabelsReadWithHttpInfo) | **GET** /model-hub/annotations-labels/{id}/ | | +| [**modelHubAnnotationsLabelsRestore**](ModelHubApi.md#modelHubAnnotationsLabelsRestore) | **POST** /model-hub/annotations-labels/{id}/restore/ | | +| [**modelHubAnnotationsLabelsRestoreWithHttpInfo**](ModelHubApi.md#modelHubAnnotationsLabelsRestoreWithHttpInfo) | **POST** /model-hub/annotations-labels/{id}/restore/ | | +| [**modelHubAnnotationsLabelsUpdate**](ModelHubApi.md#modelHubAnnotationsLabelsUpdate) | **PUT** /model-hub/annotations-labels/{id}/ | | +| [**modelHubAnnotationsLabelsUpdateWithHttpInfo**](ModelHubApi.md#modelHubAnnotationsLabelsUpdateWithHttpInfo) | **PUT** /model-hub/annotations-labels/{id}/ | | +| [**modelHubApiKeysCreate**](ModelHubApi.md#modelHubApiKeysCreate) | **POST** /model-hub/api-keys/ | | +| [**modelHubApiKeysCreateWithHttpInfo**](ModelHubApi.md#modelHubApiKeysCreateWithHttpInfo) | **POST** /model-hub/api-keys/ | | +| [**modelHubApiKeysDelete**](ModelHubApi.md#modelHubApiKeysDelete) | **DELETE** /model-hub/api-keys/{id}/ | Soft-delete an API key. | +| [**modelHubApiKeysDeleteWithHttpInfo**](ModelHubApi.md#modelHubApiKeysDeleteWithHttpInfo) | **DELETE** /model-hub/api-keys/{id}/ | Soft-delete an API key. | +| [**modelHubApiKeysList**](ModelHubApi.md#modelHubApiKeysList) | **GET** /model-hub/api-keys/ | | +| [**modelHubApiKeysListWithHttpInfo**](ModelHubApi.md#modelHubApiKeysListWithHttpInfo) | **GET** /model-hub/api-keys/ | | +| [**modelHubApiKeysPartialUpdate**](ModelHubApi.md#modelHubApiKeysPartialUpdate) | **PATCH** /model-hub/api-keys/{id}/ | | +| [**modelHubApiKeysPartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubApiKeysPartialUpdateWithHttpInfo) | **PATCH** /model-hub/api-keys/{id}/ | | +| [**modelHubApiKeysRead**](ModelHubApi.md#modelHubApiKeysRead) | **GET** /model-hub/api-keys/{id}/ | | +| [**modelHubApiKeysReadWithHttpInfo**](ModelHubApi.md#modelHubApiKeysReadWithHttpInfo) | **GET** /model-hub/api-keys/{id}/ | | +| [**modelHubApiKeysUpdate**](ModelHubApi.md#modelHubApiKeysUpdate) | **PUT** /model-hub/api-keys/{id}/ | | +| [**modelHubApiKeysUpdateWithHttpInfo**](ModelHubApi.md#modelHubApiKeysUpdateWithHttpInfo) | **PUT** /model-hub/api-keys/{id}/ | | +| [**modelHubApiModelsListList**](ModelHubApi.md#modelHubApiModelsListList) | **GET** /model-hub/api/models_list/ | | +| [**modelHubApiModelsListListWithHttpInfo**](ModelHubApi.md#modelHubApiModelsListListWithHttpInfo) | **GET** /model-hub/api/models_list/ | | +| [**modelHubDatasetRunPromptStatsList**](ModelHubApi.md#modelHubDatasetRunPromptStatsList) | **GET** /model-hub/dataset/{dataset_id}/run-prompt-stats/ | | +| [**modelHubDatasetRunPromptStatsListWithHttpInfo**](ModelHubApi.md#modelHubDatasetRunPromptStatsListWithHttpInfo) | **GET** /model-hub/dataset/{dataset_id}/run-prompt-stats/ | | +| [**modelHubDatasetsAddApiColumnCreate**](ModelHubApi.md#modelHubDatasetsAddApiColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/add-api-column/ | | +| [**modelHubDatasetsAddApiColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsAddApiColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/add-api-column/ | | +| [**modelHubDatasetsAddVectorDbColumnCreate**](ModelHubApi.md#modelHubDatasetsAddVectorDbColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/add_vector_db_column/ | | +| [**modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/add_vector_db_column/ | | +| [**modelHubDatasetsClassifyColumnCreate**](ModelHubApi.md#modelHubDatasetsClassifyColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/classify-column/ | | +| [**modelHubDatasetsClassifyColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsClassifyColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/classify-column/ | | +| [**modelHubDatasetsCompareDatasetsAddEvalCreate**](ModelHubApi.md#modelHubDatasetsCompareDatasetsAddEvalCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/ | | +| [**modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/add-eval/ | | +| [**modelHubDatasetsCompareDatasetsCreate**](ModelHubApi.md#modelHubDatasetsCompareDatasetsCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/ | | +| [**modelHubDatasetsCompareDatasetsCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsCompareDatasetsCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/ | | +| [**modelHubDatasetsCompareDatasetsDownloadCreate**](ModelHubApi.md#modelHubDatasetsCompareDatasetsDownloadCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/download/ | | +| [**modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/download/ | | +| [**modelHubDatasetsCompareDatasetsStartEvalCreate**](ModelHubApi.md#modelHubDatasetsCompareDatasetsStartEvalCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/ | | +| [**modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-datasets/start-eval/ | | +| [**modelHubDatasetsCompareGetEvalsListCreate**](ModelHubApi.md#modelHubDatasetsCompareGetEvalsListCreate) | **POST** /model-hub/datasets/compare/get-evals-list/ | | +| [**modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo) | **POST** /model-hub/datasets/compare/get-evals-list/ | | +| [**modelHubDatasetsComparePreviewRunEvalCreate**](ModelHubApi.md#modelHubDatasetsComparePreviewRunEvalCreate) | **POST** /model-hub/datasets/compare/preview-run-eval/ | | +| [**modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo) | **POST** /model-hub/datasets/compare/preview-run-eval/ | | +| [**modelHubDatasetsCompareStatsCreate**](ModelHubApi.md#modelHubDatasetsCompareStatsCreate) | **POST** /model-hub/datasets/{dataset_id}/compare-stats/ | | +| [**modelHubDatasetsCompareStatsCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsCompareStatsCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/compare-stats/ | | +| [**modelHubDatasetsConditionalColumnCreate**](ModelHubApi.md#modelHubDatasetsConditionalColumnCreate) | **POST** /model-hub/datasets/{dataset_id}/conditional-column/ | | +| [**modelHubDatasetsConditionalColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsConditionalColumnCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/conditional-column/ | | +| [**modelHubDatasetsDeleteCompareDelete**](ModelHubApi.md#modelHubDatasetsDeleteCompareDelete) | **DELETE** /model-hub/datasets/delete-compare/{compare_id}/ | | +| [**modelHubDatasetsDeleteCompareDeleteWithHttpInfo**](ModelHubApi.md#modelHubDatasetsDeleteCompareDeleteWithHttpInfo) | **DELETE** /model-hub/datasets/delete-compare/{compare_id}/ | | +| [**modelHubDatasetsDeleteCompareRead**](ModelHubApi.md#modelHubDatasetsDeleteCompareRead) | **GET** /model-hub/datasets/delete-compare/{compare_id}/ | | +| [**modelHubDatasetsDeleteCompareReadWithHttpInfo**](ModelHubApi.md#modelHubDatasetsDeleteCompareReadWithHttpInfo) | **GET** /model-hub/datasets/delete-compare/{compare_id}/ | | +| [**modelHubDatasetsDuplicateRowsCreate**](ModelHubApi.md#modelHubDatasetsDuplicateRowsCreate) | **POST** /model-hub/datasets/{dataset_id}/duplicate-rows/ | | +| [**modelHubDatasetsDuplicateRowsCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsDuplicateRowsCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/duplicate-rows/ | | +| [**modelHubDatasetsExplanationSummaryRead**](ModelHubApi.md#modelHubDatasetsExplanationSummaryRead) | **GET** /model-hub/datasets/explanation-summary/{dataset_id}/ | | +| [**modelHubDatasetsExplanationSummaryReadWithHttpInfo**](ModelHubApi.md#modelHubDatasetsExplanationSummaryReadWithHttpInfo) | **GET** /model-hub/datasets/explanation-summary/{dataset_id}/ | | +| [**modelHubDatasetsExplanationSummaryRefreshCreate**](ModelHubApi.md#modelHubDatasetsExplanationSummaryRefreshCreate) | **POST** /model-hub/datasets/explanation-summary/{dataset_id}/refresh/ | | +| [**modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo) | **POST** /model-hub/datasets/explanation-summary/{dataset_id}/refresh/ | | +| [**modelHubDatasetsExtractEntitiesCreate**](ModelHubApi.md#modelHubDatasetsExtractEntitiesCreate) | **POST** /model-hub/datasets/{dataset_id}/extract-entities/ | | +| [**modelHubDatasetsExtractEntitiesCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsExtractEntitiesCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/extract-entities/ | | +| [**modelHubDatasetsGetCompareRowDelete**](ModelHubApi.md#modelHubDatasetsGetCompareRowDelete) | **DELETE** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | | +| [**modelHubDatasetsGetCompareRowDeleteWithHttpInfo**](ModelHubApi.md#modelHubDatasetsGetCompareRowDeleteWithHttpInfo) | **DELETE** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | | +| [**modelHubDatasetsGetCompareRowRead**](ModelHubApi.md#modelHubDatasetsGetCompareRowRead) | **GET** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | | +| [**modelHubDatasetsGetCompareRowReadWithHttpInfo**](ModelHubApi.md#modelHubDatasetsGetCompareRowReadWithHttpInfo) | **GET** /model-hub/datasets/get-compare-row/{compare_id}/{row_id}/ | | +| [**modelHubDatasetsHuggingfaceDetailCreate**](ModelHubApi.md#modelHubDatasetsHuggingfaceDetailCreate) | **POST** /model-hub/datasets/huggingface/detail/ | | +| [**modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo) | **POST** /model-hub/datasets/huggingface/detail/ | | +| [**modelHubDatasetsHuggingfaceListCreate**](ModelHubApi.md#modelHubDatasetsHuggingfaceListCreate) | **POST** /model-hub/datasets/huggingface/list/ | | +| [**modelHubDatasetsHuggingfaceListCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsHuggingfaceListCreateWithHttpInfo) | **POST** /model-hub/datasets/huggingface/list/ | | +| [**modelHubDatasetsMergeCreate**](ModelHubApi.md#modelHubDatasetsMergeCreate) | **POST** /model-hub/datasets/{dataset_id}/merge/ | | +| [**modelHubDatasetsMergeCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsMergeCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/merge/ | | +| [**modelHubDatasetsPreviewCreate**](ModelHubApi.md#modelHubDatasetsPreviewCreate) | **POST** /model-hub/datasets/{dataset_id}/preview/{operation_type}/ | | +| [**modelHubDatasetsPreviewCreateWithHttpInfo**](ModelHubApi.md#modelHubDatasetsPreviewCreateWithHttpInfo) | **POST** /model-hub/datasets/{dataset_id}/preview/{operation_type}/ | | +| [**modelHubDeleteEvalTemplateCreate**](ModelHubApi.md#modelHubDeleteEvalTemplateCreate) | **POST** /model-hub/delete-eval-template/ | | +| [**modelHubDeleteEvalTemplateCreateWithHttpInfo**](ModelHubApi.md#modelHubDeleteEvalTemplateCreateWithHttpInfo) | **POST** /model-hub/delete-eval-template/ | | +| [**modelHubDevelopsAddAsNewCreate**](ModelHubApi.md#modelHubDevelopsAddAsNewCreate) | **POST** /model-hub/develops/add-as-new/ | | +| [**modelHubDevelopsAddAsNewCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddAsNewCreateWithHttpInfo) | **POST** /model-hub/develops/add-as-new/ | | +| [**modelHubDevelopsAddEmptyColumnsCreate**](ModelHubApi.md#modelHubDevelopsAddEmptyColumnsCreate) | **POST** /model-hub/develops/{dataset_id}/add_empty_columns/ | | +| [**modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_empty_columns/ | | +| [**modelHubDevelopsAddEmptyRowsCreate**](ModelHubApi.md#modelHubDevelopsAddEmptyRowsCreate) | **POST** /model-hub/develops/{dataset_id}/add_empty_rows/ | | +| [**modelHubDevelopsAddEmptyRowsCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddEmptyRowsCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_empty_rows/ | | +| [**modelHubDevelopsAddMultipleStaticColumnsCreate**](ModelHubApi.md#modelHubDevelopsAddMultipleStaticColumnsCreate) | **POST** /model-hub/develops/{dataset_id}/add_multiple_static_columns/ | Add multiple static columns to a dataset at once. | +| [**modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_multiple_static_columns/ | Add multiple static columns to a dataset at once. | +| [**modelHubDevelopsAddRowsFromExistingDatasetCreate**](ModelHubApi.md#modelHubDevelopsAddRowsFromExistingDatasetCreate) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/ | | +| [**modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/ | | +| [**modelHubDevelopsAddRowsFromFileCreate**](ModelHubApi.md#modelHubDevelopsAddRowsFromFileCreate) | **POST** /model-hub/develops/add_rows_from_file/ | | +| [**modelHubDevelopsAddRowsFromFileCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddRowsFromFileCreateWithHttpInfo) | **POST** /model-hub/develops/add_rows_from_file/ | | +| [**modelHubDevelopsAddRowsFromHuggingfaceCreate**](ModelHubApi.md#modelHubDevelopsAddRowsFromHuggingfaceCreate) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_huggingface/ | | +| [**modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_rows_from_huggingface/ | | +| [**modelHubDevelopsAddRowsSdkCreate**](ModelHubApi.md#modelHubDevelopsAddRowsSdkCreate) | **POST** /model-hub/develops/add_rows_sdk/ | | +| [**modelHubDevelopsAddRowsSdkCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddRowsSdkCreateWithHttpInfo) | **POST** /model-hub/develops/add_rows_sdk/ | | +| [**modelHubDevelopsAddRunPromptColumnCreate**](ModelHubApi.md#modelHubDevelopsAddRunPromptColumnCreate) | **POST** /model-hub/develops/add_run_prompt_column/ | | +| [**modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo) | **POST** /model-hub/develops/add_run_prompt_column/ | | +| [**modelHubDevelopsAddStaticColumnCreate**](ModelHubApi.md#modelHubDevelopsAddStaticColumnCreate) | **POST** /model-hub/develops/{dataset_id}/add_static_column/ | | +| [**modelHubDevelopsAddStaticColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddStaticColumnCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_static_column/ | | +| [**modelHubDevelopsAddSyntheticDataCreate**](ModelHubApi.md#modelHubDevelopsAddSyntheticDataCreate) | **POST** /model-hub/develops/{dataset_id}/add_synthetic_data/ | | +| [**modelHubDevelopsAddSyntheticDataCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddSyntheticDataCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_synthetic_data/ | | +| [**modelHubDevelopsAddUserEvalCreate**](ModelHubApi.md#modelHubDevelopsAddUserEvalCreate) | **POST** /model-hub/develops/{dataset_id}/add_user_eval/ | | +| [**modelHubDevelopsAddUserEvalCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsAddUserEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/add_user_eval/ | | +| [**modelHubDevelopsCloneDatasetCreate**](ModelHubApi.md#modelHubDevelopsCloneDatasetCreate) | **POST** /model-hub/develops/clone-dataset/{dataset_id}/ | | +| [**modelHubDevelopsCloneDatasetCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsCloneDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/clone-dataset/{dataset_id}/ | | +| [**modelHubDevelopsCreateDatasetCreate**](ModelHubApi.md#modelHubDevelopsCreateDatasetCreate) | **POST** /model-hub/develops/{exp_dataset_id}/create-dataset/ | | +| [**modelHubDevelopsCreateDatasetCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsCreateDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/{exp_dataset_id}/create-dataset/ | | +| [**modelHubDevelopsCreateDatasetFromHuggingfaceCreate**](ModelHubApi.md#modelHubDevelopsCreateDatasetFromHuggingfaceCreate) | **POST** /model-hub/develops/create-dataset-from-huggingface/ | | +| [**modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo) | **POST** /model-hub/develops/create-dataset-from-huggingface/ | | +| [**modelHubDevelopsCreateSyntheticDatasetCreate**](ModelHubApi.md#modelHubDevelopsCreateSyntheticDatasetCreate) | **POST** /model-hub/develops/create-synthetic-dataset/ | | +| [**modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo) | **POST** /model-hub/develops/create-synthetic-dataset/ | | +| [**modelHubDevelopsDatasetCreationProgressRead**](ModelHubApi.md#modelHubDevelopsDatasetCreationProgressRead) | **GET** /model-hub/develops/dataset-creation-progress/{dataset_id}/ | | +| [**modelHubDevelopsDatasetCreationProgressReadWithHttpInfo**](ModelHubApi.md#modelHubDevelopsDatasetCreationProgressReadWithHttpInfo) | **GET** /model-hub/develops/dataset-creation-progress/{dataset_id}/ | | +| [**modelHubDevelopsDeleteDatasetDelete**](ModelHubApi.md#modelHubDevelopsDeleteDatasetDelete) | **DELETE** /model-hub/develops/delete_dataset/ | | +| [**modelHubDevelopsDeleteDatasetDeleteWithHttpInfo**](ModelHubApi.md#modelHubDevelopsDeleteDatasetDeleteWithHttpInfo) | **DELETE** /model-hub/develops/delete_dataset/ | | +| [**modelHubDevelopsDeleteTemplateEvalDelete**](ModelHubApi.md#modelHubDevelopsDeleteTemplateEvalDelete) | **DELETE** /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/ | | +| [**modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo**](ModelHubApi.md#modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/ | | +| [**modelHubDevelopsDeleteUserEvalDelete**](ModelHubApi.md#modelHubDevelopsDeleteUserEvalDelete) | **DELETE** /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/ | | +| [**modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo**](ModelHubApi.md#modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo) | **DELETE** /model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/ | | +| [**modelHubDevelopsEditAndRunUserEvalCreate**](ModelHubApi.md#modelHubDevelopsEditAndRunUserEvalCreate) | **POST** /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/ | | +| [**modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/ | | +| [**modelHubDevelopsEditDatasetBehaviorUpdate**](ModelHubApi.md#modelHubDevelopsEditDatasetBehaviorUpdate) | **PUT** /model-hub/develops/{dataset_id}/edit_dataset_behavior/ | | +| [**modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/edit_dataset_behavior/ | | +| [**modelHubDevelopsEditRunPromptColumnCreate**](ModelHubApi.md#modelHubDevelopsEditRunPromptColumnCreate) | **POST** /model-hub/develops/edit_run_prompt_column/ | | +| [**modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo) | **POST** /model-hub/develops/edit_run_prompt_column/ | | +| [**modelHubDevelopsExtractJsonColumnCreate**](ModelHubApi.md#modelHubDevelopsExtractJsonColumnCreate) | **POST** /model-hub/develops/{dataset_id}/extract-json-column/ | | +| [**modelHubDevelopsExtractJsonColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsExtractJsonColumnCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/extract-json-column/ | | +| [**modelHubDevelopsGetCellDataCreate**](ModelHubApi.md#modelHubDevelopsGetCellDataCreate) | **POST** /model-hub/develops/get-cell-data/ | | +| [**modelHubDevelopsGetCellDataCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetCellDataCreateWithHttpInfo) | **POST** /model-hub/develops/get-cell-data/ | | +| [**modelHubDevelopsGetDerivedDatasetsRead**](ModelHubApi.md#modelHubDevelopsGetDerivedDatasetsRead) | **GET** /model-hub/develops/get-derived-datasets/{dataset_id}/ | | +| [**modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo) | **GET** /model-hub/develops/get-derived-datasets/{dataset_id}/ | | +| [**modelHubDevelopsGetEvalStructureRead**](ModelHubApi.md#modelHubDevelopsGetEvalStructureRead) | **GET** /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/ | | +| [**modelHubDevelopsGetEvalStructureReadWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetEvalStructureReadWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/ | | +| [**modelHubDevelopsGetEvalsListList**](ModelHubApi.md#modelHubDevelopsGetEvalsListList) | **GET** /model-hub/develops/{dataset_id}/get_evals_list/ | | +| [**modelHubDevelopsGetEvalsListListWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetEvalsListListWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/get_evals_list/ | | +| [**modelHubDevelopsGetExperimentDatasetTableList**](ModelHubApi.md#modelHubDevelopsGetExperimentDatasetTableList) | **GET** /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/ | | +| [**modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo) | **GET** /model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/ | | +| [**modelHubDevelopsGetFunctionListList**](ModelHubApi.md#modelHubDevelopsGetFunctionListList) | **GET** /model-hub/develops/get_function_list/ | | +| [**modelHubDevelopsGetFunctionListListWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetFunctionListListWithHttpInfo) | **GET** /model-hub/develops/get_function_list/ | | +| [**modelHubDevelopsGetHuggingfaceDatasetConfigCreate**](ModelHubApi.md#modelHubDevelopsGetHuggingfaceDatasetConfigCreate) | **POST** /model-hub/develops/get-huggingface-dataset-config/ | | +| [**modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo) | **POST** /model-hub/develops/get-huggingface-dataset-config/ | | +| [**modelHubDevelopsGetRowDiffCreate**](ModelHubApi.md#modelHubDevelopsGetRowDiffCreate) | **POST** /model-hub/develops/get-row-diff/ | | +| [**modelHubDevelopsGetRowDiffCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsGetRowDiffCreateWithHttpInfo) | **POST** /model-hub/develops/get-row-diff/ | | +| [**modelHubDevelopsPreviewRunEvalCreate**](ModelHubApi.md#modelHubDevelopsPreviewRunEvalCreate) | **POST** /model-hub/develops/{dataset_id}/preview_run_eval/ | | +| [**modelHubDevelopsPreviewRunEvalCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsPreviewRunEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/preview_run_eval/ | | +| [**modelHubDevelopsPreviewRunPromptColumnCreate**](ModelHubApi.md#modelHubDevelopsPreviewRunPromptColumnCreate) | **POST** /model-hub/develops/preview_run_prompt_column/ | | +| [**modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo) | **POST** /model-hub/develops/preview_run_prompt_column/ | | +| [**modelHubDevelopsProviderStatusList**](ModelHubApi.md#modelHubDevelopsProviderStatusList) | **GET** /model-hub/develops/provider-status/ | | +| [**modelHubDevelopsProviderStatusListWithHttpInfo**](ModelHubApi.md#modelHubDevelopsProviderStatusListWithHttpInfo) | **GET** /model-hub/develops/provider-status/ | | +| [**modelHubDevelopsRetrieveRunPromptColumnConfigList**](ModelHubApi.md#modelHubDevelopsRetrieveRunPromptColumnConfigList) | **GET** /model-hub/develops/retrieve_run_prompt_column_config/ | | +| [**modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo**](ModelHubApi.md#modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo) | **GET** /model-hub/develops/retrieve_run_prompt_column_config/ | | +| [**modelHubDevelopsRetrieveRunPromptOptionsList**](ModelHubApi.md#modelHubDevelopsRetrieveRunPromptOptionsList) | **GET** /model-hub/develops/retrieve_run_prompt_options/ | | +| [**modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo**](ModelHubApi.md#modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo) | **GET** /model-hub/develops/retrieve_run_prompt_options/ | | +| [**modelHubDevelopsStartEvalsProcessCreate**](ModelHubApi.md#modelHubDevelopsStartEvalsProcessCreate) | **POST** /model-hub/develops/{dataset_id}/start_evals_process/ | | +| [**modelHubDevelopsStartEvalsProcessCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsStartEvalsProcessCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/start_evals_process/ | | +| [**modelHubDevelopsStopUserEvalCreate**](ModelHubApi.md#modelHubDevelopsStopUserEvalCreate) | **POST** /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/ | POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. | +| [**modelHubDevelopsStopUserEvalCreateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsStopUserEvalCreateWithHttpInfo) | **POST** /model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/ | POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. | +| [**modelHubDevelopsSyntheticConfigList**](ModelHubApi.md#modelHubDevelopsSyntheticConfigList) | **GET** /model-hub/develops/{dataset_id}/synthetic-config/ | | +| [**modelHubDevelopsSyntheticConfigListWithHttpInfo**](ModelHubApi.md#modelHubDevelopsSyntheticConfigListWithHttpInfo) | **GET** /model-hub/develops/{dataset_id}/synthetic-config/ | | +| [**modelHubDevelopsUpdateColumnNameUpdate**](ModelHubApi.md#modelHubDevelopsUpdateColumnNameUpdate) | **PUT** /model-hub/develops/{dataset_id}/update_column_name/{column_id}/ | | +| [**modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/update_column_name/{column_id}/ | | +| [**modelHubDevelopsUpdateColumnTypeUpdate**](ModelHubApi.md#modelHubDevelopsUpdateColumnTypeUpdate) | **PUT** /model-hub/develops/{dataset_id}/update_column_type/{column_id}/ | | +| [**modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/update_column_type/{column_id}/ | | +| [**modelHubDevelopsUpdateSyntheticConfigUpdate**](ModelHubApi.md#modelHubDevelopsUpdateSyntheticConfigUpdate) | **PUT** /model-hub/develops/{dataset_id}/update-synthetic-config/ | | +| [**modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo**](ModelHubApi.md#modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo) | **PUT** /model-hub/develops/{dataset_id}/update-synthetic-config/ | | +| [**modelHubEvalTemplatesBulkDeleteCreate**](ModelHubApi.md#modelHubEvalTemplatesBulkDeleteCreate) | **POST** /model-hub/eval-templates/bulk-delete/ | POST /model-hub/eval-templates/bulk-delete/ | +| [**modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo) | **POST** /model-hub/eval-templates/bulk-delete/ | POST /model-hub/eval-templates/bulk-delete/ | +| [**modelHubEvalTemplatesCompositeExecuteAdhocCreate**](ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteAdhocCreate) | **POST** /model-hub/eval-templates/composite/execute-adhoc/ | POST /model-hub/eval-templates/composite/execute-adhoc/ | +| [**modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo) | **POST** /model-hub/eval-templates/composite/execute-adhoc/ | POST /model-hub/eval-templates/composite/execute-adhoc/ | +| [**modelHubEvalTemplatesCompositeExecuteCreate**](ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteCreate) | **POST** /model-hub/eval-templates/{template_id}/composite/execute/ | POST /model-hub/eval-templates/<template_id>/composite/execute/ | +| [**modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/composite/execute/ | POST /model-hub/eval-templates/<template_id>/composite/execute/ | +| [**modelHubEvalTemplatesCompositeList**](ModelHubApi.md#modelHubEvalTemplatesCompositeList) | **GET** /model-hub/eval-templates/{template_id}/composite/ | GET /model-hub/eval-templates/<id>/composite/ | +| [**modelHubEvalTemplatesCompositeListWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesCompositeListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/composite/ | GET /model-hub/eval-templates/<id>/composite/ | +| [**modelHubEvalTemplatesCompositePartialUpdate**](ModelHubApi.md#modelHubEvalTemplatesCompositePartialUpdate) | **PATCH** /model-hub/eval-templates/{template_id}/composite/ | PATCH — partial update of a composite eval. | +| [**modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo) | **PATCH** /model-hub/eval-templates/{template_id}/composite/ | PATCH — partial update of a composite eval. | +| [**modelHubEvalTemplatesCreateCompositeCreate**](ModelHubApi.md#modelHubEvalTemplatesCreateCompositeCreate) | **POST** /model-hub/eval-templates/create-composite/ | POST /model-hub/eval-templates/create-composite/ | +| [**modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo) | **POST** /model-hub/eval-templates/create-composite/ | POST /model-hub/eval-templates/create-composite/ | +| [**modelHubEvalTemplatesCreateV2Create**](ModelHubApi.md#modelHubEvalTemplatesCreateV2Create) | **POST** /model-hub/eval-templates/create-v2/ | POST /model-hub/eval-templates/create-v2/ | +| [**modelHubEvalTemplatesCreateV2CreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesCreateV2CreateWithHttpInfo) | **POST** /model-hub/eval-templates/create-v2/ | POST /model-hub/eval-templates/create-v2/ | +| [**modelHubEvalTemplatesDetailList**](ModelHubApi.md#modelHubEvalTemplatesDetailList) | **GET** /model-hub/eval-templates/{template_id}/detail/ | GET /model-hub/eval-templates/<id>/detail/ | +| [**modelHubEvalTemplatesDetailListWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesDetailListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/detail/ | GET /model-hub/eval-templates/<id>/detail/ | +| [**modelHubEvalTemplatesFeedbackListList**](ModelHubApi.md#modelHubEvalTemplatesFeedbackListList) | **GET** /model-hub/eval-templates/{template_id}/feedback-list/ | GET /model-hub/eval-templates/<id>/feedback-list/ | +| [**modelHubEvalTemplatesFeedbackListListWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesFeedbackListListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/feedback-list/ | GET /model-hub/eval-templates/<id>/feedback-list/ | +| [**modelHubEvalTemplatesGroundTruthConfigList**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigList) | **GET** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ | +| [**modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ | +| [**modelHubEvalTemplatesGroundTruthConfigUpdate**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigUpdate) | **PUT** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ | +| [**modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo) | **PUT** /model-hub/eval-templates/{template_id}/ground-truth-config/ | GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ | +| [**modelHubEvalTemplatesGroundTruthList**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthList) | **GET** /model-hub/eval-templates/{template_id}/ground-truth/ | | +| [**modelHubEvalTemplatesGroundTruthListWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/ground-truth/ | | +| [**modelHubEvalTemplatesGroundTruthUploadCreate**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthUploadCreate) | **POST** /model-hub/eval-templates/{template_id}/ground-truth/upload/ | POST /model-hub/eval-templates/<id>/ground-truth/upload/ | +| [**modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/ground-truth/upload/ | POST /model-hub/eval-templates/<id>/ground-truth/upload/ | +| [**modelHubEvalTemplatesListChartsCreate**](ModelHubApi.md#modelHubEvalTemplatesListChartsCreate) | **POST** /model-hub/eval-templates/list-charts/ | POST /model-hub/eval-templates/list-charts/ | +| [**modelHubEvalTemplatesListChartsCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesListChartsCreateWithHttpInfo) | **POST** /model-hub/eval-templates/list-charts/ | POST /model-hub/eval-templates/list-charts/ | +| [**modelHubEvalTemplatesListCreate**](ModelHubApi.md#modelHubEvalTemplatesListCreate) | **POST** /model-hub/eval-templates/list/ | POST /model-hub/eval-templates/list/ | +| [**modelHubEvalTemplatesListCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesListCreateWithHttpInfo) | **POST** /model-hub/eval-templates/list/ | POST /model-hub/eval-templates/list/ | +| [**modelHubEvalTemplatesUpdateUpdate**](ModelHubApi.md#modelHubEvalTemplatesUpdateUpdate) | **PUT** /model-hub/eval-templates/{template_id}/update/ | PUT /model-hub/eval-templates/<id>/update/ | +| [**modelHubEvalTemplatesUpdateUpdateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesUpdateUpdateWithHttpInfo) | **PUT** /model-hub/eval-templates/{template_id}/update/ | PUT /model-hub/eval-templates/<id>/update/ | +| [**modelHubEvalTemplatesUsageList**](ModelHubApi.md#modelHubEvalTemplatesUsageList) | **GET** /model-hub/eval-templates/{template_id}/usage/ | GET /model-hub/eval-templates/<id>/usage/ | +| [**modelHubEvalTemplatesUsageListWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesUsageListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/usage/ | GET /model-hub/eval-templates/<id>/usage/ | +| [**modelHubEvalTemplatesVersionsCreateCreate**](ModelHubApi.md#modelHubEvalTemplatesVersionsCreateCreate) | **POST** /model-hub/eval-templates/{template_id}/versions/create/ | POST /model-hub/eval-templates/<id>/versions/create/ | +| [**modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/versions/create/ | POST /model-hub/eval-templates/<id>/versions/create/ | +| [**modelHubEvalTemplatesVersionsList**](ModelHubApi.md#modelHubEvalTemplatesVersionsList) | **GET** /model-hub/eval-templates/{template_id}/versions/ | GET /model-hub/eval-templates/<id>/versions/ | +| [**modelHubEvalTemplatesVersionsListWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesVersionsListWithHttpInfo) | **GET** /model-hub/eval-templates/{template_id}/versions/ | GET /model-hub/eval-templates/<id>/versions/ | +| [**modelHubEvalTemplatesVersionsRestoreCreate**](ModelHubApi.md#modelHubEvalTemplatesVersionsRestoreCreate) | **POST** /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/ | POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ | +| [**modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo) | **POST** /model-hub/eval-templates/{template_id}/versions/{version_id}/restore/ | POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ | +| [**modelHubEvalTemplatesVersionsSetDefaultUpdate**](ModelHubApi.md#modelHubEvalTemplatesVersionsSetDefaultUpdate) | **PUT** /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/ | PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ | +| [**modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo**](ModelHubApi.md#modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo) | **PUT** /model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/ | PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ | +| [**modelHubExperimentsV2DerivedVariablesList**](ModelHubApi.md#modelHubExperimentsV2DerivedVariablesList) | **GET** /model-hub/experiments/v2/{experiment_id}/derived-variables/ | | +| [**modelHubExperimentsV2DerivedVariablesListWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2DerivedVariablesListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/derived-variables/ | | +| [**modelHubExperimentsV2EvaluationsStatsList**](ModelHubApi.md#modelHubExperimentsV2EvaluationsStatsList) | **GET** /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/ | | +| [**modelHubExperimentsV2EvaluationsStatsListWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2EvaluationsStatsListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/ | | +| [**modelHubExperimentsV2FeedbackCreate**](ModelHubApi.md#modelHubExperimentsV2FeedbackCreate) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/ | | +| [**modelHubExperimentsV2FeedbackCreateWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2FeedbackCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/ | | +| [**modelHubExperimentsV2FeedbackGetFeedbackDetailsList**](ModelHubApi.md#modelHubExperimentsV2FeedbackGetFeedbackDetailsList) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/ | | +| [**modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/ | | +| [**modelHubExperimentsV2FeedbackGetTemplateList**](ModelHubApi.md#modelHubExperimentsV2FeedbackGetTemplateList) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-template/ | | +| [**modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo) | **GET** /model-hub/experiments/v2/{experiment_id}/feedback/get-template/ | | +| [**modelHubExperimentsV2FeedbackSubmitFeedbackCreate**](ModelHubApi.md#modelHubExperimentsV2FeedbackSubmitFeedbackCreate) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/ | | +| [**modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/ | | +| [**modelHubExperimentsV2RerunCellsCreate**](ModelHubApi.md#modelHubExperimentsV2RerunCellsCreate) | **POST** /model-hub/experiments/v2/{experiment_id}/rerun-cells/ | Rerun specific cells or columns in a V2 experiment. | +| [**modelHubExperimentsV2RerunCellsCreateWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2RerunCellsCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/{experiment_id}/rerun-cells/ | Rerun specific cells or columns in a V2 experiment. | +| [**modelHubExperimentsV2RowDiffCreate**](ModelHubApi.md#modelHubExperimentsV2RowDiffCreate) | **POST** /model-hub/experiments/v2/row-diff/ | | +| [**modelHubExperimentsV2RowDiffCreateWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2RowDiffCreateWithHttpInfo) | **POST** /model-hub/experiments/v2/row-diff/ | | +| [**modelHubExperimentsV2SuggestNameRead**](ModelHubApi.md#modelHubExperimentsV2SuggestNameRead) | **GET** /model-hub/experiments/v2/suggest-name/{dataset_id}/ | | +| [**modelHubExperimentsV2SuggestNameReadWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2SuggestNameReadWithHttpInfo) | **GET** /model-hub/experiments/v2/suggest-name/{dataset_id}/ | | +| [**modelHubExperimentsV2ValidateNameList**](ModelHubApi.md#modelHubExperimentsV2ValidateNameList) | **GET** /model-hub/experiments/v2/validate-name/ | | +| [**modelHubExperimentsV2ValidateNameListWithHttpInfo**](ModelHubApi.md#modelHubExperimentsV2ValidateNameListWithHttpInfo) | **GET** /model-hub/experiments/v2/validate-name/ | | +| [**modelHubKnowledgeBaseCreate**](ModelHubApi.md#modelHubKnowledgeBaseCreate) | **POST** /model-hub/knowledge-base/ | | +| [**modelHubKnowledgeBaseCreateWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBaseCreateWithHttpInfo) | **POST** /model-hub/knowledge-base/ | | +| [**modelHubKnowledgeBaseDelete**](ModelHubApi.md#modelHubKnowledgeBaseDelete) | **DELETE** /model-hub/knowledge-base/ | | +| [**modelHubKnowledgeBaseDeleteWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBaseDeleteWithHttpInfo) | **DELETE** /model-hub/knowledge-base/ | | +| [**modelHubKnowledgeBaseFilesCreate**](ModelHubApi.md#modelHubKnowledgeBaseFilesCreate) | **POST** /model-hub/knowledge-base/files/ | | +| [**modelHubKnowledgeBaseFilesCreateWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBaseFilesCreateWithHttpInfo) | **POST** /model-hub/knowledge-base/files/ | | +| [**modelHubKnowledgeBaseFilesDelete**](ModelHubApi.md#modelHubKnowledgeBaseFilesDelete) | **DELETE** /model-hub/knowledge-base/files/ | | +| [**modelHubKnowledgeBaseFilesDeleteWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBaseFilesDeleteWithHttpInfo) | **DELETE** /model-hub/knowledge-base/files/ | | +| [**modelHubKnowledgeBaseGetList**](ModelHubApi.md#modelHubKnowledgeBaseGetList) | **GET** /model-hub/knowledge-base/get/ | | +| [**modelHubKnowledgeBaseGetListWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBaseGetListWithHttpInfo) | **GET** /model-hub/knowledge-base/get/ | | +| [**modelHubKnowledgeBaseList**](ModelHubApi.md#modelHubKnowledgeBaseList) | **GET** /model-hub/knowledge-base/ | | +| [**modelHubKnowledgeBaseListWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBaseListWithHttpInfo) | **GET** /model-hub/knowledge-base/ | | +| [**modelHubKnowledgeBaseListList**](ModelHubApi.md#modelHubKnowledgeBaseListList) | **GET** /model-hub/knowledge-base/list/ | | +| [**modelHubKnowledgeBaseListListWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBaseListListWithHttpInfo) | **GET** /model-hub/knowledge-base/list/ | | +| [**modelHubKnowledgeBasePartialUpdate**](ModelHubApi.md#modelHubKnowledgeBasePartialUpdate) | **PATCH** /model-hub/knowledge-base/ | | +| [**modelHubKnowledgeBasePartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubKnowledgeBasePartialUpdateWithHttpInfo) | **PATCH** /model-hub/knowledge-base/ | | +| [**modelHubPromptHistoryExecutionsGetExecutionDetails**](ModelHubApi.md#modelHubPromptHistoryExecutionsGetExecutionDetails) | **GET** /model-hub/prompt-history-executions/execution-details/{execution_id}/ | | +| [**modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo**](ModelHubApi.md#modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo) | **GET** /model-hub/prompt-history-executions/execution-details/{execution_id}/ | | +| [**modelHubPromptHistoryExecutionsList**](ModelHubApi.md#modelHubPromptHistoryExecutionsList) | **GET** /model-hub/prompt-history-executions/ | | +| [**modelHubPromptHistoryExecutionsListWithHttpInfo**](ModelHubApi.md#modelHubPromptHistoryExecutionsListWithHttpInfo) | **GET** /model-hub/prompt-history-executions/ | | +| [**modelHubPromptHistoryExecutionsRead**](ModelHubApi.md#modelHubPromptHistoryExecutionsRead) | **GET** /model-hub/prompt-history-executions/{id}/ | | +| [**modelHubPromptHistoryExecutionsReadWithHttpInfo**](ModelHubApi.md#modelHubPromptHistoryExecutionsReadWithHttpInfo) | **GET** /model-hub/prompt-history-executions/{id}/ | | +| [**modelHubPromptLabelsAssignLabelById**](ModelHubApi.md#modelHubPromptLabelsAssignLabelById) | **POST** /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/ | | +| [**modelHubPromptLabelsAssignLabelByIdWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsAssignLabelByIdWithHttpInfo) | **POST** /model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/ | | +| [**modelHubPromptLabelsAssignMultipleLabels**](ModelHubApi.md#modelHubPromptLabelsAssignMultipleLabels) | **POST** /model-hub/prompt-labels/assign-multiple-labels/ | | +| [**modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo) | **POST** /model-hub/prompt-labels/assign-multiple-labels/ | | +| [**modelHubPromptLabelsCreate**](ModelHubApi.md#modelHubPromptLabelsCreate) | **POST** /model-hub/prompt-labels/ | | +| [**modelHubPromptLabelsCreateWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsCreateWithHttpInfo) | **POST** /model-hub/prompt-labels/ | | +| [**modelHubPromptLabelsCreateSystemLabels**](ModelHubApi.md#modelHubPromptLabelsCreateSystemLabels) | **POST** /model-hub/prompt-labels/create-system-labels/ | | +| [**modelHubPromptLabelsCreateSystemLabelsWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsCreateSystemLabelsWithHttpInfo) | **POST** /model-hub/prompt-labels/create-system-labels/ | | +| [**modelHubPromptLabelsDelete**](ModelHubApi.md#modelHubPromptLabelsDelete) | **DELETE** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptLabelsDeleteWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsDeleteWithHttpInfo) | **DELETE** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptLabelsGetByName**](ModelHubApi.md#modelHubPromptLabelsGetByName) | **GET** /model-hub/prompt-labels/get-by-name/ | Fetch a prompt version by template name and either explicit version or label. | +| [**modelHubPromptLabelsGetByNameWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsGetByNameWithHttpInfo) | **GET** /model-hub/prompt-labels/get-by-name/ | Fetch a prompt version by template name and either explicit version or label. | +| [**modelHubPromptLabelsList**](ModelHubApi.md#modelHubPromptLabelsList) | **GET** /model-hub/prompt-labels/ | | +| [**modelHubPromptLabelsListWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsListWithHttpInfo) | **GET** /model-hub/prompt-labels/ | | +| [**modelHubPromptLabelsPartialUpdate**](ModelHubApi.md#modelHubPromptLabelsPartialUpdate) | **PATCH** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptLabelsPartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsPartialUpdateWithHttpInfo) | **PATCH** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptLabelsRead**](ModelHubApi.md#modelHubPromptLabelsRead) | **GET** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptLabelsReadWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsReadWithHttpInfo) | **GET** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptLabelsRemoveLabelFromVersion**](ModelHubApi.md#modelHubPromptLabelsRemoveLabelFromVersion) | **POST** /model-hub/prompt-labels/remove/ | | +| [**modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo) | **POST** /model-hub/prompt-labels/remove/ | | +| [**modelHubPromptLabelsSetDefault**](ModelHubApi.md#modelHubPromptLabelsSetDefault) | **POST** /model-hub/prompt-labels/set-default/ | | +| [**modelHubPromptLabelsSetDefaultWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsSetDefaultWithHttpInfo) | **POST** /model-hub/prompt-labels/set-default/ | | +| [**modelHubPromptLabelsTemplateLabels**](ModelHubApi.md#modelHubPromptLabelsTemplateLabels) | **GET** /model-hub/prompt-labels/template-labels/ | | +| [**modelHubPromptLabelsTemplateLabelsWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsTemplateLabelsWithHttpInfo) | **GET** /model-hub/prompt-labels/template-labels/ | | +| [**modelHubPromptLabelsUpdate**](ModelHubApi.md#modelHubPromptLabelsUpdate) | **PUT** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptLabelsUpdateWithHttpInfo**](ModelHubApi.md#modelHubPromptLabelsUpdateWithHttpInfo) | **PUT** /model-hub/prompt-labels/{id}/ | | +| [**modelHubPromptTemplatesAddNewDraft**](ModelHubApi.md#modelHubPromptTemplatesAddNewDraft) | **POST** /model-hub/prompt-templates/{id}/add-new-draft/ | | +| [**modelHubPromptTemplatesAddNewDraftWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesAddNewDraftWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/add-new-draft/ | | +| [**modelHubPromptTemplatesAnalyzePrompt**](ModelHubApi.md#modelHubPromptTemplatesAnalyzePrompt) | **POST** /model-hub/prompt-templates/analyze-prompt/ | | +| [**modelHubPromptTemplatesAnalyzePromptWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesAnalyzePromptWithHttpInfo) | **POST** /model-hub/prompt-templates/analyze-prompt/ | | +| [**modelHubPromptTemplatesBulkDelete**](ModelHubApi.md#modelHubPromptTemplatesBulkDelete) | **POST** /model-hub/prompt-templates/bulk-delete/ | | +| [**modelHubPromptTemplatesBulkDeleteWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesBulkDeleteWithHttpInfo) | **POST** /model-hub/prompt-templates/bulk-delete/ | | +| [**modelHubPromptTemplatesCommit**](ModelHubApi.md#modelHubPromptTemplatesCommit) | **POST** /model-hub/prompt-templates/{id}/commit/ | | +| [**modelHubPromptTemplatesCommitWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesCommitWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/commit/ | | +| [**modelHubPromptTemplatesCompareVersions**](ModelHubApi.md#modelHubPromptTemplatesCompareVersions) | **POST** /model-hub/prompt-templates/{id}/compare-versions/ | | +| [**modelHubPromptTemplatesCompareVersionsWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesCompareVersionsWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/compare-versions/ | | +| [**modelHubPromptTemplatesCreate**](ModelHubApi.md#modelHubPromptTemplatesCreate) | **POST** /model-hub/prompt-templates/ | | +| [**modelHubPromptTemplatesCreateWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesCreateWithHttpInfo) | **POST** /model-hub/prompt-templates/ | | +| [**modelHubPromptTemplatesCreateDraft**](ModelHubApi.md#modelHubPromptTemplatesCreateDraft) | **POST** /model-hub/prompt-templates/create-draft/ | | +| [**modelHubPromptTemplatesCreateDraftWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesCreateDraftWithHttpInfo) | **POST** /model-hub/prompt-templates/create-draft/ | | +| [**modelHubPromptTemplatesDelete**](ModelHubApi.md#modelHubPromptTemplatesDelete) | **DELETE** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesDeleteWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesDeleteWithHttpInfo) | **DELETE** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesDeleteEvaluationConfig**](ModelHubApi.md#modelHubPromptTemplatesDeleteEvaluationConfig) | **DELETE** /model-hub/prompt-templates/{id}/delete-evaluation-config/ | Delete an evaluation configuration by name from a PromptTemplate. | +| [**modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo) | **DELETE** /model-hub/prompt-templates/{id}/delete-evaluation-config/ | Delete an evaluation configuration by name from a PromptTemplate. | +| [**modelHubPromptTemplatesDerivedVariablesExtractCreate**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesExtractCreate) | **POST** /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/ | Manually trigger extraction of derived variables from outputs. | +| [**modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo) | **POST** /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/ | Manually trigger extraction of derived variables from outputs. | +| [**modelHubPromptTemplatesDerivedVariablesList**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesList) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/ | Get all derived variables for a prompt template. | +| [**modelHubPromptTemplatesDerivedVariablesListWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesListWithHttpInfo) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/ | Get all derived variables for a prompt template. | +| [**modelHubPromptTemplatesDerivedVariablesPreviewCreate**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesPreviewCreate) | **POST** /model-hub/prompt-templates/derived-variables/preview/ | Preview derived variables from JSON content without saving. | +| [**modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo) | **POST** /model-hub/prompt-templates/derived-variables/preview/ | Preview derived variables from JSON content without saving. | +| [**modelHubPromptTemplatesDerivedVariablesSchemaList**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesSchemaList) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/ | Get the schema for derived variables of a specific column. | +| [**modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo) | **GET** /model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/ | Get the schema for derived variables of a specific column. | +| [**modelHubPromptTemplatesGeneratePrompt**](ModelHubApi.md#modelHubPromptTemplatesGeneratePrompt) | **POST** /model-hub/prompt-templates/generate-prompt/ | | +| [**modelHubPromptTemplatesGeneratePromptWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGeneratePromptWithHttpInfo) | **POST** /model-hub/prompt-templates/generate-prompt/ | | +| [**modelHubPromptTemplatesGenerateVariables**](ModelHubApi.md#modelHubPromptTemplatesGenerateVariables) | **POST** /model-hub/prompt-templates/generate-variables/ | Generate synthetic data for prompt variables using the SyntheticDataAgent. | +| [**modelHubPromptTemplatesGenerateVariablesWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGenerateVariablesWithHttpInfo) | **POST** /model-hub/prompt-templates/generate-variables/ | Generate synthetic data for prompt variables using the SyntheticDataAgent. | +| [**modelHubPromptTemplatesGetAllVariables**](ModelHubApi.md#modelHubPromptTemplatesGetAllVariables) | **GET** /model-hub/prompt-templates/{id}/all-variables/ | | +| [**modelHubPromptTemplatesGetAllVariablesWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGetAllVariablesWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/all-variables/ | | +| [**modelHubPromptTemplatesGetEvaluationConfigs**](ModelHubApi.md#modelHubPromptTemplatesGetEvaluationConfigs) | **GET** /model-hub/prompt-templates/{id}/evaluation-configs/ | | +| [**modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/evaluation-configs/ | | +| [**modelHubPromptTemplatesGetNextVersion**](ModelHubApi.md#modelHubPromptTemplatesGetNextVersion) | **GET** /model-hub/prompt-templates/{id}/get-next-version/ | | +| [**modelHubPromptTemplatesGetNextVersionWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGetNextVersionWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/get-next-version/ | | +| [**modelHubPromptTemplatesGetRunStatus**](ModelHubApi.md#modelHubPromptTemplatesGetRunStatus) | **GET** /model-hub/prompt-templates/{id}/get-run-status/ | | +| [**modelHubPromptTemplatesGetRunStatusWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGetRunStatusWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/get-run-status/ | | +| [**modelHubPromptTemplatesGetSdkCode**](ModelHubApi.md#modelHubPromptTemplatesGetSdkCode) | **GET** /model-hub/prompt-templates/{id}/get-sdk-code/{language}/ | | +| [**modelHubPromptTemplatesGetSdkCodeWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGetSdkCodeWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/get-sdk-code/{language}/ | | +| [**modelHubPromptTemplatesGetTemplateByName**](ModelHubApi.md#modelHubPromptTemplatesGetTemplateByName) | **GET** /model-hub/prompt-templates/get-template-by-name/ | | +| [**modelHubPromptTemplatesGetTemplateByNameWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesGetTemplateByNameWithHttpInfo) | **GET** /model-hub/prompt-templates/get-template-by-name/ | | +| [**modelHubPromptTemplatesImprovePrompt**](ModelHubApi.md#modelHubPromptTemplatesImprovePrompt) | **POST** /model-hub/prompt-templates/improve-prompt/ | | +| [**modelHubPromptTemplatesImprovePromptWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesImprovePromptWithHttpInfo) | **POST** /model-hub/prompt-templates/improve-prompt/ | | +| [**modelHubPromptTemplatesList**](ModelHubApi.md#modelHubPromptTemplatesList) | **GET** /model-hub/prompt-templates/ | | +| [**modelHubPromptTemplatesListWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesListWithHttpInfo) | **GET** /model-hub/prompt-templates/ | | +| [**modelHubPromptTemplatesPartialUpdate**](ModelHubApi.md#modelHubPromptTemplatesPartialUpdate) | **PATCH** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesPartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesPartialUpdateWithHttpInfo) | **PATCH** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesRead**](ModelHubApi.md#modelHubPromptTemplatesRead) | **GET** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesReadWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesReadWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesRetrieveEvaluations**](ModelHubApi.md#modelHubPromptTemplatesRetrieveEvaluations) | **GET** /model-hub/prompt-templates/{id}/evaluations/ | | +| [**modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/evaluations/ | | +| [**modelHubPromptTemplatesRunEvalsOnMultipleVersions**](ModelHubApi.md#modelHubPromptTemplatesRunEvalsOnMultipleVersions) | **POST** /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/ | | +| [**modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/ | | +| [**modelHubPromptTemplatesRunTemplate**](ModelHubApi.md#modelHubPromptTemplatesRunTemplate) | **POST** /model-hub/prompt-templates/{id}/run_template/ | | +| [**modelHubPromptTemplatesRunTemplateWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesRunTemplateWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/run_template/ | | +| [**modelHubPromptTemplatesSaveName**](ModelHubApi.md#modelHubPromptTemplatesSaveName) | **POST** /model-hub/prompt-templates/{id}/save-name/ | | +| [**modelHubPromptTemplatesSaveNameWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesSaveNameWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/save-name/ | | +| [**modelHubPromptTemplatesSavePromptFolder**](ModelHubApi.md#modelHubPromptTemplatesSavePromptFolder) | **POST** /model-hub/prompt-templates/{id}/save-prompt-folder/ | | +| [**modelHubPromptTemplatesSavePromptFolderWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesSavePromptFolderWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/save-prompt-folder/ | | +| [**modelHubPromptTemplatesSetDefault**](ModelHubApi.md#modelHubPromptTemplatesSetDefault) | **POST** /model-hub/prompt-templates/{id}/set_default/ | | +| [**modelHubPromptTemplatesSetDefaultWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesSetDefaultWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/set_default/ | | +| [**modelHubPromptTemplatesStopStreaming**](ModelHubApi.md#modelHubPromptTemplatesStopStreaming) | **GET** /model-hub/prompt-templates/{id}/stop-streaming/ | | +| [**modelHubPromptTemplatesStopStreamingWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesStopStreamingWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/stop-streaming/ | | +| [**modelHubPromptTemplatesUpdate**](ModelHubApi.md#modelHubPromptTemplatesUpdate) | **PUT** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesUpdateWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesUpdateWithHttpInfo) | **PUT** /model-hub/prompt-templates/{id}/ | | +| [**modelHubPromptTemplatesUpdateEvaluationConfigs**](ModelHubApi.md#modelHubPromptTemplatesUpdateEvaluationConfigs) | **POST** /model-hub/prompt-templates/{id}/update-evaluation-configs/ | Add or update evaluation configurations for a PromptTemplate. | +| [**modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo) | **POST** /model-hub/prompt-templates/{id}/update-evaluation-configs/ | Add or update evaluation configurations for a PromptTemplate. | +| [**modelHubPromptTemplatesVersions**](ModelHubApi.md#modelHubPromptTemplatesVersions) | **GET** /model-hub/prompt-templates/{id}/versions/ | | +| [**modelHubPromptTemplatesVersionsWithHttpInfo**](ModelHubApi.md#modelHubPromptTemplatesVersionsWithHttpInfo) | **GET** /model-hub/prompt-templates/{id}/versions/ | | +| [**modelHubScoresBulkCreate**](ModelHubApi.md#modelHubScoresBulkCreate) | **POST** /model-hub/scores/bulk/ | | +| [**modelHubScoresBulkCreateWithHttpInfo**](ModelHubApi.md#modelHubScoresBulkCreateWithHttpInfo) | **POST** /model-hub/scores/bulk/ | | +| [**modelHubScoresCreate**](ModelHubApi.md#modelHubScoresCreate) | **POST** /model-hub/scores/ | | +| [**modelHubScoresCreateWithHttpInfo**](ModelHubApi.md#modelHubScoresCreateWithHttpInfo) | **POST** /model-hub/scores/ | | +| [**modelHubScoresDelete**](ModelHubApi.md#modelHubScoresDelete) | **DELETE** /model-hub/scores/{id}/ | Soft-delete a score. | +| [**modelHubScoresDeleteWithHttpInfo**](ModelHubApi.md#modelHubScoresDeleteWithHttpInfo) | **DELETE** /model-hub/scores/{id}/ | Soft-delete a score. | +| [**modelHubScoresForSource**](ModelHubApi.md#modelHubScoresForSource) | **GET** /model-hub/scores/for-source/ | | +| [**modelHubScoresForSourceWithHttpInfo**](ModelHubApi.md#modelHubScoresForSourceWithHttpInfo) | **GET** /model-hub/scores/for-source/ | | +| [**modelHubScoresList**](ModelHubApi.md#modelHubScoresList) | **GET** /model-hub/scores/ | Universal Score CRUD. | +| [**modelHubScoresListWithHttpInfo**](ModelHubApi.md#modelHubScoresListWithHttpInfo) | **GET** /model-hub/scores/ | Universal Score CRUD. | +| [**modelHubScoresPartialUpdate**](ModelHubApi.md#modelHubScoresPartialUpdate) | **PATCH** /model-hub/scores/{id}/ | Universal Score CRUD. | +| [**modelHubScoresPartialUpdateWithHttpInfo**](ModelHubApi.md#modelHubScoresPartialUpdateWithHttpInfo) | **PATCH** /model-hub/scores/{id}/ | Universal Score CRUD. | +| [**modelHubScoresRead**](ModelHubApi.md#modelHubScoresRead) | **GET** /model-hub/scores/{id}/ | Universal Score CRUD. | +| [**modelHubScoresReadWithHttpInfo**](ModelHubApi.md#modelHubScoresReadWithHttpInfo) | **GET** /model-hub/scores/{id}/ | Universal Score CRUD. | +| [**modelHubScoresUpdate**](ModelHubApi.md#modelHubScoresUpdate) | **PUT** /model-hub/scores/{id}/ | Universal Score CRUD. | +| [**modelHubScoresUpdateWithHttpInfo**](ModelHubApi.md#modelHubScoresUpdateWithHttpInfo) | **PUT** /model-hub/scores/{id}/ | Universal Score CRUD. | + + + +## modelHubAnnotationQueuesAutomationRulesCreate + +> AutomationRule modelHubAnnotationQueuesAutomationRulesCreate(queueId, automationRule) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + AutomationRule automationRule = new AutomationRule(); // AutomationRule | + try { + AutomationRule result = apiInstance.modelHubAnnotationQueuesAutomationRulesCreate(queueId, automationRule); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **automationRule** | [**AutomationRule**](AutomationRule.md)| | | + +### Return type + +[**AutomationRule**](AutomationRule.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesCreate modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo(queueId, automationRule) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + AutomationRule automationRule = new AutomationRule(); // AutomationRule | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo(queueId, automationRule); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **automationRule** | [**AutomationRule**](AutomationRule.md)| | | + +### Return type + +ApiResponse<[**AutomationRule**](AutomationRule.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesAutomationRulesDelete + +> void modelHubAnnotationQueuesAutomationRulesDelete(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + try { + apiInstance.modelHubAnnotationQueuesAutomationRulesDelete(queueId, id); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesDelete modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo(queueId, id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesAutomationRulesEvaluate + +> AutomationRuleEvaluateResponse modelHubAnnotationQueuesAutomationRulesEvaluate(queueId, id, body) + +Trigger a manual rule run with a sync-or-async branch. + +Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish in the HTTP request and return 200 with the result — fast feedback for the common case. Large runs (mostly first-ever runs on backlogs or rules with wide filters) hand the work to a Temporal activity and return 202 immediately. The activity emails creator + queue managers on completion. The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- 100ms even on 10M+ row trace tables — so this branch costs little even when it ends up taking the sync path. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + Object body = null; // Object | + try { + AutomationRuleEvaluateResponse result = apiInstance.modelHubAnnotationQueuesAutomationRulesEvaluate(queueId, id, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesEvaluate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | +| **body** | **Object**| | | + +### Return type + +[**AutomationRuleEvaluateResponse**](AutomationRuleEvaluateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **202** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesEvaluate modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo(queueId, id, body) + +Trigger a manual rule run with a sync-or-async branch. + +Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish in the HTTP request and return 200 with the result — fast feedback for the common case. Large runs (mostly first-ever runs on backlogs or rules with wide filters) hand the work to a Temporal activity and return 202 immediately. The activity emails creator + queue managers on completion. The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- 100ms even on 10M+ row trace tables — so this branch costs little even when it ends up taking the sync path. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + Object body = null; // Object | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo(queueId, id, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesEvaluate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**AutomationRuleEvaluateResponse**](AutomationRuleEvaluateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **202** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesAutomationRulesList + +> ModelHubAnnotationQueuesAutomationRulesList200Response modelHubAnnotationQueuesAutomationRulesList(queueId, page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubAnnotationQueuesAutomationRulesList200Response result = apiInstance.modelHubAnnotationQueuesAutomationRulesList(queueId, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubAnnotationQueuesAutomationRulesList200Response**](ModelHubAnnotationQueuesAutomationRulesList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesListWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesList modelHubAnnotationQueuesAutomationRulesListWithHttpInfo(queueId, page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesListWithHttpInfo(queueId, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubAnnotationQueuesAutomationRulesList200Response**](ModelHubAnnotationQueuesAutomationRulesList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesAutomationRulesPartialUpdate + +> AutomationRule modelHubAnnotationQueuesAutomationRulesPartialUpdate(queueId, id, automationRule) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + AutomationRule automationRule = new AutomationRule(); // AutomationRule | + try { + AutomationRule result = apiInstance.modelHubAnnotationQueuesAutomationRulesPartialUpdate(queueId, id, automationRule); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | +| **automationRule** | [**AutomationRule**](AutomationRule.md)| | | + +### Return type + +[**AutomationRule**](AutomationRule.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesPartialUpdate modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo(queueId, id, automationRule) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + AutomationRule automationRule = new AutomationRule(); // AutomationRule | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo(queueId, id, automationRule); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | +| **automationRule** | [**AutomationRule**](AutomationRule.md)| | | + +### Return type + +ApiResponse<[**AutomationRule**](AutomationRule.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesAutomationRulesPreview + +> AutomationRuleEvaluateResponse modelHubAnnotationQueuesAutomationRulesPreview(queueId, id) + + + +Preview how many items match a rule (dry run). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + try { + AutomationRuleEvaluateResponse result = apiInstance.modelHubAnnotationQueuesAutomationRulesPreview(queueId, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesPreview"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | + +### Return type + +[**AutomationRuleEvaluateResponse**](AutomationRuleEvaluateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesPreview modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo(queueId, id) + + + +Preview how many items match a rule (dry run). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo(queueId, id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesPreview"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | + +### Return type + +ApiResponse<[**AutomationRuleEvaluateResponse**](AutomationRuleEvaluateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesAutomationRulesRead + +> AutomationRule modelHubAnnotationQueuesAutomationRulesRead(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + try { + AutomationRule result = apiInstance.modelHubAnnotationQueuesAutomationRulesRead(queueId, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | + +### Return type + +[**AutomationRule**](AutomationRule.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesRead modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo(queueId, id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | + +### Return type + +ApiResponse<[**AutomationRule**](AutomationRule.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesAutomationRulesUpdate + +> AutomationRule modelHubAnnotationQueuesAutomationRulesUpdate(queueId, id, automationRule) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + AutomationRule automationRule = new AutomationRule(); // AutomationRule | + try { + AutomationRule result = apiInstance.modelHubAnnotationQueuesAutomationRulesUpdate(queueId, id, automationRule); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | +| **automationRule** | [**AutomationRule**](AutomationRule.md)| | | + +### Return type + +[**AutomationRule**](AutomationRule.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesAutomationRulesUpdate modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo(queueId, id, automationRule) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this automation rule. + AutomationRule automationRule = new AutomationRule(); // AutomationRule | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo(queueId, id, automationRule); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesAutomationRulesUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this automation rule. | | +| **automationRule** | [**AutomationRule**](AutomationRule.md)| | | + +### Return type + +ApiResponse<[**AutomationRule**](AutomationRule.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesForSource + +> QueueForSourceResponse modelHubAnnotationQueuesForSource(page, limit, sourceType, sourceId, sources) + + + +Find annotation queues for a given source that the current user can annotate. Includes queues where: - The source is a queue item AND the user is an annotator in that queue (regardless of whether the item is explicitly assigned to them) Query params: - source_type, source_id (single source) - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String sourceType = "call_execution"; // String | + String sourceId = "sourceId_example"; // String | + String sources = "sources_example"; // String | + try { + QueueForSourceResponse result = apiInstance.modelHubAnnotationQueuesForSource(page, limit, sourceType, sourceId, sources); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesForSource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **sourceType** | **String**| | [optional] [enum: call_execution, dataset_row, observation_span, prototype_run, trace, trace_session] | +| **sourceId** | **String**| | [optional] | +| **sources** | **String**| | [optional] | + +### Return type + +[**QueueForSourceResponse**](QueueForSourceResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesForSourceWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesForSource modelHubAnnotationQueuesForSourceWithHttpInfo(page, limit, sourceType, sourceId, sources) + + + +Find annotation queues for a given source that the current user can annotate. Includes queues where: - The source is a queue item AND the user is an annotator in that queue (regardless of whether the item is explicitly assigned to them) Query params: - source_type, source_id (single source) - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String sourceType = "call_execution"; // String | + String sourceId = "sourceId_example"; // String | + String sources = "sources_example"; // String | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesForSourceWithHttpInfo(page, limit, sourceType, sourceId, sources); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesForSource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **sourceType** | **String**| | [optional] [enum: call_execution, dataset_row, observation_span, prototype_run, trace, trace_session] | +| **sourceId** | **String**| | [optional] | +| **sources** | **String**| | [optional] | + +### Return type + +ApiResponse<[**QueueForSourceResponse**](QueueForSourceResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesGetOrCreateDefault + +> QueueDefaultResponse modelHubAnnotationQueuesGetOrCreateDefault(queueDefaultRequest) + + + +Get or create the default annotation queue for a project, dataset, or agent definition. Default queues are open to all org members (no annotator restriction). Body params (one of): - project_id - dataset_id - agent_definition_id + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + QueueDefaultRequest queueDefaultRequest = new QueueDefaultRequest(); // QueueDefaultRequest | + try { + QueueDefaultResponse result = apiInstance.modelHubAnnotationQueuesGetOrCreateDefault(queueDefaultRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesGetOrCreateDefault"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueDefaultRequest** | [**QueueDefaultRequest**](QueueDefaultRequest.md)| | | + +### Return type + +[**QueueDefaultResponse**](QueueDefaultResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesGetOrCreateDefault modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo(queueDefaultRequest) + + + +Get or create the default annotation queue for a project, dataset, or agent definition. Default queues are open to all org members (no annotator restriction). Body params (one of): - project_id - dataset_id - agent_definition_id + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + QueueDefaultRequest queueDefaultRequest = new QueueDefaultRequest(); // QueueDefaultRequest | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo(queueDefaultRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesGetOrCreateDefault"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueDefaultRequest** | [**QueueDefaultRequest**](QueueDefaultRequest.md)| | | + +### Return type + +ApiResponse<[**QueueDefaultResponse**](QueueDefaultResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesHardDelete + +> QueueHardDeleteResponse modelHubAnnotationQueuesHardDelete(id, queueHardDeleteRequest) + +Permanently remove a queue + everything attached. + +Hard delete cascades through the FK graph (rules, items, assignments, scores) via ``on_delete=CASCADE``. There is no recovery — callers must pass ``force=true`` AND the queue's exact name as ``confirm_name`` so the action can't fire from a typo'd request. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueHardDeleteRequest queueHardDeleteRequest = new QueueHardDeleteRequest(); // QueueHardDeleteRequest | + try { + QueueHardDeleteResponse result = apiInstance.modelHubAnnotationQueuesHardDelete(id, queueHardDeleteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesHardDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueHardDeleteRequest** | [**QueueHardDeleteRequest**](QueueHardDeleteRequest.md)| | | + +### Return type + +[**QueueHardDeleteResponse**](QueueHardDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesHardDeleteWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesHardDelete modelHubAnnotationQueuesHardDeleteWithHttpInfo(id, queueHardDeleteRequest) + +Permanently remove a queue + everything attached. + +Hard delete cascades through the FK graph (rules, items, assignments, scores) via ``on_delete=CASCADE``. There is no recovery — callers must pass ``force=true`` AND the queue's exact name as ``confirm_name`` so the action can't fire from a typo'd request. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + QueueHardDeleteRequest queueHardDeleteRequest = new QueueHardDeleteRequest(); // QueueHardDeleteRequest | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesHardDeleteWithHttpInfo(id, queueHardDeleteRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesHardDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **queueHardDeleteRequest** | [**QueueHardDeleteRequest**](QueueHardDeleteRequest.md)| | | + +### Return type + +ApiResponse<[**QueueHardDeleteResponse**](QueueHardDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesItemsCreate + +> QueueItem modelHubAnnotationQueuesItemsCreate(queueId, queueItem) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + QueueItem queueItem = new QueueItem(); // QueueItem | + try { + QueueItem result = apiInstance.modelHubAnnotationQueuesItemsCreate(queueId, queueItem); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **queueItem** | [**QueueItem**](QueueItem.md)| | | + +### Return type + +[**QueueItem**](QueueItem.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesItemsCreateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesItemsCreate modelHubAnnotationQueuesItemsCreateWithHttpInfo(queueId, queueItem) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + QueueItem queueItem = new QueueItem(); // QueueItem | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesItemsCreateWithHttpInfo(queueId, queueItem); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **queueItem** | [**QueueItem**](QueueItem.md)| | | + +### Return type + +ApiResponse<[**QueueItem**](QueueItem.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesItemsDelete + +> void modelHubAnnotationQueuesItemsDelete(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + apiInstance.modelHubAnnotationQueuesItemsDelete(queueId, id); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesItemsDeleteWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesItemsDelete modelHubAnnotationQueuesItemsDeleteWithHttpInfo(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesItemsDeleteWithHttpInfo(queueId, id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesItemsPartialUpdate + +> QueueItem modelHubAnnotationQueuesItemsPartialUpdate(queueId, id, queueItem) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItem queueItem = new QueueItem(); // QueueItem | + try { + QueueItem result = apiInstance.modelHubAnnotationQueuesItemsPartialUpdate(queueId, id, queueItem); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItem** | [**QueueItem**](QueueItem.md)| | | + +### Return type + +[**QueueItem**](QueueItem.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesItemsPartialUpdate modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo(queueId, id, queueItem) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItem queueItem = new QueueItem(); // QueueItem | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo(queueId, id, queueItem); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItem** | [**QueueItem**](QueueItem.md)| | | + +### Return type + +ApiResponse<[**QueueItem**](QueueItem.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesItemsRead + +> QueueItem modelHubAnnotationQueuesItemsRead(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + QueueItem result = apiInstance.modelHubAnnotationQueuesItemsRead(queueId, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + +[**QueueItem**](QueueItem.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesItemsReadWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesItemsRead modelHubAnnotationQueuesItemsReadWithHttpInfo(queueId, id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesItemsReadWithHttpInfo(queueId, id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | + +### Return type + +ApiResponse<[**QueueItem**](QueueItem.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesItemsUpdate + +> QueueItem modelHubAnnotationQueuesItemsUpdate(queueId, id, queueItem) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItem queueItem = new QueueItem(); // QueueItem | + try { + QueueItem result = apiInstance.modelHubAnnotationQueuesItemsUpdate(queueId, id, queueItem); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItem** | [**QueueItem**](QueueItem.md)| | | + +### Return type + +[**QueueItem**](QueueItem.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesItemsUpdateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesItemsUpdate modelHubAnnotationQueuesItemsUpdateWithHttpInfo(queueId, id, queueItem) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String queueId = "queueId_example"; // String | + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this queue item. + QueueItem queueItem = new QueueItem(); // QueueItem | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesItemsUpdateWithHttpInfo(queueId, id, queueItem); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesItemsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queueId** | **String**| | | +| **id** | **UUID**| A UUID string identifying this queue item. | | +| **queueItem** | [**QueueItem**](QueueItem.md)| | | + +### Return type + +ApiResponse<[**QueueItem**](QueueItem.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesRestore + +> QueueStatusResponse modelHubAnnotationQueuesRestore(id, body) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + Object body = null; // Object | + try { + QueueStatusResponse result = apiInstance.modelHubAnnotationQueuesRestore(id, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesRestore"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **body** | **Object**| | | + +### Return type + +[**QueueStatusResponse**](QueueStatusResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesRestoreWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesRestore modelHubAnnotationQueuesRestoreWithHttpInfo(id, body) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + Object body = null; // Object | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesRestoreWithHttpInfo(id, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesRestore"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**QueueStatusResponse**](QueueStatusResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationQueuesUpdate + +> AnnotationQueue modelHubAnnotationQueuesUpdate(id, annotationQueue) + + + +Only managers of the queue may update queue settings. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + AnnotationQueue annotationQueue = new AnnotationQueue(); // AnnotationQueue | + try { + AnnotationQueue result = apiInstance.modelHubAnnotationQueuesUpdate(id, annotationQueue); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md)| | | + +### Return type + +[**AnnotationQueue**](AnnotationQueue.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationQueuesUpdateWithHttpInfo + +> ApiResponse modelHubAnnotationQueuesUpdate modelHubAnnotationQueuesUpdateWithHttpInfo(id, annotationQueue) + + + +Only managers of the queue may update queue settings. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this annotation queue. + AnnotationQueue annotationQueue = new AnnotationQueue(); // AnnotationQueue | + try { + ApiResponse response = apiInstance.modelHubAnnotationQueuesUpdateWithHttpInfo(id, annotationQueue); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationQueuesUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this annotation queue. | | +| **annotationQueue** | [**AnnotationQueue**](AnnotationQueue.md)| | | + +### Return type + +ApiResponse<[**AnnotationQueue**](AnnotationQueue.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationsLabelsCreate + +> AnnotationsLabels modelHubAnnotationsLabelsCreate(annotationsLabels) + + + +Custom create to provide clearer error responses in GM format. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AnnotationsLabels annotationsLabels = new AnnotationsLabels(); // AnnotationsLabels | + try { + AnnotationsLabels result = apiInstance.modelHubAnnotationsLabelsCreate(annotationsLabels); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md)| | | + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationsLabelsCreateWithHttpInfo + +> ApiResponse modelHubAnnotationsLabelsCreate modelHubAnnotationsLabelsCreateWithHttpInfo(annotationsLabels) + + + +Custom create to provide clearer error responses in GM format. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AnnotationsLabels annotationsLabels = new AnnotationsLabels(); // AnnotationsLabels | + try { + ApiResponse response = apiInstance.modelHubAnnotationsLabelsCreateWithHttpInfo(annotationsLabels); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md)| | | + +### Return type + +ApiResponse<[**AnnotationsLabels**](AnnotationsLabels.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationsLabelsDelete + +> void modelHubAnnotationsLabelsDelete(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.modelHubAnnotationsLabelsDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationsLabelsDeleteWithHttpInfo + +> ApiResponse modelHubAnnotationsLabelsDelete modelHubAnnotationsLabelsDeleteWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubAnnotationsLabelsDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationsLabelsList + +> List modelHubAnnotationsLabelsList(page, limit, dataset, projectId, type, search, includeUsageCount, includeArchived) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + UUID dataset = UUID.randomUUID(); // UUID | + UUID projectId = UUID.randomUUID(); // UUID | + String type = "text"; // String | + String search = "search_example"; // String | + Boolean includeUsageCount = true; // Boolean | + Boolean includeArchived = true; // Boolean | + try { + List result = apiInstance.modelHubAnnotationsLabelsList(page, limit, dataset, projectId, type, search, includeUsageCount, includeArchived); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **dataset** | **UUID**| | [optional] | +| **projectId** | **UUID**| | [optional] | +| **type** | **String**| | [optional] [enum: text, numeric, categorical, star, thumbs_up_down] | +| **search** | **String**| | [optional] | +| **includeUsageCount** | **Boolean**| | [optional] | +| **includeArchived** | **Boolean**| | [optional] | + +### Return type + +[**List<AnnotationsLabels>**](AnnotationsLabels.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationsLabelsListWithHttpInfo + +> ApiResponse> modelHubAnnotationsLabelsList modelHubAnnotationsLabelsListWithHttpInfo(page, limit, dataset, projectId, type, search, includeUsageCount, includeArchived) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + UUID dataset = UUID.randomUUID(); // UUID | + UUID projectId = UUID.randomUUID(); // UUID | + String type = "text"; // String | + String search = "search_example"; // String | + Boolean includeUsageCount = true; // Boolean | + Boolean includeArchived = true; // Boolean | + try { + ApiResponse> response = apiInstance.modelHubAnnotationsLabelsListWithHttpInfo(page, limit, dataset, projectId, type, search, includeUsageCount, includeArchived); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **dataset** | **UUID**| | [optional] | +| **projectId** | **UUID**| | [optional] | +| **type** | **String**| | [optional] [enum: text, numeric, categorical, star, thumbs_up_down] | +| **search** | **String**| | [optional] | +| **includeUsageCount** | **Boolean**| | [optional] | +| **includeArchived** | **Boolean**| | [optional] | + +### Return type + +ApiResponse<[**List<AnnotationsLabels>**](AnnotationsLabels.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationsLabelsPartialUpdate + +> AnnotationsLabels modelHubAnnotationsLabelsPartialUpdate(id, annotationsLabels) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + AnnotationsLabels annotationsLabels = new AnnotationsLabels(); // AnnotationsLabels | + try { + AnnotationsLabels result = apiInstance.modelHubAnnotationsLabelsPartialUpdate(id, annotationsLabels); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md)| | | + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationsLabelsPartialUpdateWithHttpInfo + +> ApiResponse modelHubAnnotationsLabelsPartialUpdate modelHubAnnotationsLabelsPartialUpdateWithHttpInfo(id, annotationsLabels) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + AnnotationsLabels annotationsLabels = new AnnotationsLabels(); // AnnotationsLabels | + try { + ApiResponse response = apiInstance.modelHubAnnotationsLabelsPartialUpdateWithHttpInfo(id, annotationsLabels); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md)| | | + +### Return type + +ApiResponse<[**AnnotationsLabels**](AnnotationsLabels.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationsLabelsRead + +> AnnotationsLabels modelHubAnnotationsLabelsRead(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + AnnotationsLabels result = apiInstance.modelHubAnnotationsLabelsRead(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationsLabelsReadWithHttpInfo + +> ApiResponse modelHubAnnotationsLabelsRead modelHubAnnotationsLabelsReadWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubAnnotationsLabelsReadWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**AnnotationsLabels**](AnnotationsLabels.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationsLabelsRestore + +> AnnotationLabelRestoreResponse modelHubAnnotationsLabelsRestore(id, body) + + + +Restore a soft-deleted (archived) annotation label. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + Object body = null; // Object | + try { + AnnotationLabelRestoreResponse result = apiInstance.modelHubAnnotationsLabelsRestore(id, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsRestore"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**AnnotationLabelRestoreResponse**](AnnotationLabelRestoreResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationsLabelsRestoreWithHttpInfo + +> ApiResponse modelHubAnnotationsLabelsRestore modelHubAnnotationsLabelsRestoreWithHttpInfo(id, body) + + + +Restore a soft-deleted (archived) annotation label. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.modelHubAnnotationsLabelsRestoreWithHttpInfo(id, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsRestore"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**AnnotationLabelRestoreResponse**](AnnotationLabelRestoreResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubAnnotationsLabelsUpdate + +> AnnotationsLabels modelHubAnnotationsLabelsUpdate(id, annotationsLabels) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + AnnotationsLabels annotationsLabels = new AnnotationsLabels(); // AnnotationsLabels | + try { + AnnotationsLabels result = apiInstance.modelHubAnnotationsLabelsUpdate(id, annotationsLabels); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md)| | | + +### Return type + +[**AnnotationsLabels**](AnnotationsLabels.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubAnnotationsLabelsUpdateWithHttpInfo + +> ApiResponse modelHubAnnotationsLabelsUpdate modelHubAnnotationsLabelsUpdateWithHttpInfo(id, annotationsLabels) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + AnnotationsLabels annotationsLabels = new AnnotationsLabels(); // AnnotationsLabels | + try { + ApiResponse response = apiInstance.modelHubAnnotationsLabelsUpdateWithHttpInfo(id, annotationsLabels); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubAnnotationsLabelsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **annotationsLabels** | [**AnnotationsLabels**](AnnotationsLabels.md)| | | + +### Return type + +ApiResponse<[**AnnotationsLabels**](AnnotationsLabels.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubApiKeysCreate + +> ApiKey modelHubApiKeysCreate(apiKey) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + ApiKey apiKey = new ApiKey(); // ApiKey | + try { + ApiKey result = apiInstance.modelHubApiKeysCreate(apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **apiKey** | [**ApiKey**](ApiKey.md)| | | + +### Return type + +[**ApiKey**](ApiKey.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubApiKeysCreateWithHttpInfo + +> ApiResponse modelHubApiKeysCreate modelHubApiKeysCreateWithHttpInfo(apiKey) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + ApiKey apiKey = new ApiKey(); // ApiKey | + try { + ApiResponse response = apiInstance.modelHubApiKeysCreateWithHttpInfo(apiKey); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **apiKey** | [**ApiKey**](ApiKey.md)| | | + +### Return type + +ApiResponse<[**ApiKey**](ApiKey.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubApiKeysDelete + +> void modelHubApiKeysDelete(id) + +Soft-delete an API key. + +ApiKey inherits from BaseModel, so `instance.delete()` sets: - deleted=True - deleted_at=<timestamp> and excludes it from the default manager (`objects`) queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.modelHubApiKeysDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubApiKeysDeleteWithHttpInfo + +> ApiResponse modelHubApiKeysDelete modelHubApiKeysDeleteWithHttpInfo(id) + +Soft-delete an API key. + +ApiKey inherits from BaseModel, so `instance.delete()` sets: - deleted=True - deleted_at=<timestamp> and excludes it from the default manager (`objects`) queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubApiKeysDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubApiKeysList + +> ModelHubApiKeysList200Response modelHubApiKeysList(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubApiKeysList200Response result = apiInstance.modelHubApiKeysList(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubApiKeysList200Response**](ModelHubApiKeysList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubApiKeysListWithHttpInfo + +> ApiResponse modelHubApiKeysList modelHubApiKeysListWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubApiKeysListWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubApiKeysList200Response**](ModelHubApiKeysList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubApiKeysPartialUpdate + +> ApiKey modelHubApiKeysPartialUpdate(id, apiKey) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + ApiKey apiKey = new ApiKey(); // ApiKey | + try { + ApiKey result = apiInstance.modelHubApiKeysPartialUpdate(id, apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **apiKey** | [**ApiKey**](ApiKey.md)| | | + +### Return type + +[**ApiKey**](ApiKey.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubApiKeysPartialUpdateWithHttpInfo + +> ApiResponse modelHubApiKeysPartialUpdate modelHubApiKeysPartialUpdateWithHttpInfo(id, apiKey) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + ApiKey apiKey = new ApiKey(); // ApiKey | + try { + ApiResponse response = apiInstance.modelHubApiKeysPartialUpdateWithHttpInfo(id, apiKey); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **apiKey** | [**ApiKey**](ApiKey.md)| | | + +### Return type + +ApiResponse<[**ApiKey**](ApiKey.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubApiKeysRead + +> ApiKey modelHubApiKeysRead(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiKey result = apiInstance.modelHubApiKeysRead(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**ApiKey**](ApiKey.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubApiKeysReadWithHttpInfo + +> ApiResponse modelHubApiKeysRead modelHubApiKeysReadWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubApiKeysReadWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**ApiKey**](ApiKey.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubApiKeysUpdate + +> ApiKey modelHubApiKeysUpdate(id, apiKey) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + ApiKey apiKey = new ApiKey(); // ApiKey | + try { + ApiKey result = apiInstance.modelHubApiKeysUpdate(id, apiKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **apiKey** | [**ApiKey**](ApiKey.md)| | | + +### Return type + +[**ApiKey**](ApiKey.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubApiKeysUpdateWithHttpInfo + +> ApiResponse modelHubApiKeysUpdate modelHubApiKeysUpdateWithHttpInfo(id, apiKey) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + ApiKey apiKey = new ApiKey(); // ApiKey | + try { + ApiResponse response = apiInstance.modelHubApiKeysUpdateWithHttpInfo(id, apiKey); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiKeysUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **apiKey** | [**ApiKey**](ApiKey.md)| | | + +### Return type + +ApiResponse<[**ApiKey**](ApiKey.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubApiModelsListList + +> ModelHubPaginatedResponse modelHubApiModelsListList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ModelHubPaginatedResponse result = apiInstance.modelHubApiModelsListList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiModelsListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ModelHubPaginatedResponse**](ModelHubPaginatedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubApiModelsListListWithHttpInfo + +> ApiResponse modelHubApiModelsListList modelHubApiModelsListListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubApiModelsListListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubApiModelsListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**ModelHubPaginatedResponse**](ModelHubPaginatedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetRunPromptStatsList + +> DatasetRunPromptStatsResponse modelHubDatasetRunPromptStatsList(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetRunPromptStatsResponse result = apiInstance.modelHubDatasetRunPromptStatsList(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetRunPromptStatsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetRunPromptStatsResponse**](DatasetRunPromptStatsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetRunPromptStatsListWithHttpInfo + +> ApiResponse modelHubDatasetRunPromptStatsList modelHubDatasetRunPromptStatsListWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDatasetRunPromptStatsListWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetRunPromptStatsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetRunPromptStatsResponse**](DatasetRunPromptStatsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsAddApiColumnCreate + +> DynamicColumnCreateResponse modelHubDatasetsAddApiColumnCreate(datasetId, addApiColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + AddApiColumnRequest addApiColumnRequest = new AddApiColumnRequest(); // AddApiColumnRequest | + try { + DynamicColumnCreateResponse result = apiInstance.modelHubDatasetsAddApiColumnCreate(datasetId, addApiColumnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsAddApiColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **addApiColumnRequest** | [**AddApiColumnRequest**](AddApiColumnRequest.md)| | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsAddApiColumnCreateWithHttpInfo + +> ApiResponse modelHubDatasetsAddApiColumnCreate modelHubDatasetsAddApiColumnCreateWithHttpInfo(datasetId, addApiColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + AddApiColumnRequest addApiColumnRequest = new AddApiColumnRequest(); // AddApiColumnRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsAddApiColumnCreateWithHttpInfo(datasetId, addApiColumnRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsAddApiColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **addApiColumnRequest** | [**AddApiColumnRequest**](AddApiColumnRequest.md)| | | + +### Return type + +ApiResponse<[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsAddVectorDbColumnCreate + +> DynamicColumnCreateResponse modelHubDatasetsAddVectorDbColumnCreate(datasetId, vectorDBColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + VectorDBColumnRequest vectorDBColumnRequest = new VectorDBColumnRequest(); // VectorDBColumnRequest | + try { + DynamicColumnCreateResponse result = apiInstance.modelHubDatasetsAddVectorDbColumnCreate(datasetId, vectorDBColumnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsAddVectorDbColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **vectorDBColumnRequest** | [**VectorDBColumnRequest**](VectorDBColumnRequest.md)| | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo + +> ApiResponse modelHubDatasetsAddVectorDbColumnCreate modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo(datasetId, vectorDBColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + VectorDBColumnRequest vectorDBColumnRequest = new VectorDBColumnRequest(); // VectorDBColumnRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo(datasetId, vectorDBColumnRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsAddVectorDbColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **vectorDBColumnRequest** | [**VectorDBColumnRequest**](VectorDBColumnRequest.md)| | | + +### Return type + +ApiResponse<[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsClassifyColumnCreate + +> DynamicColumnCreateResponse modelHubDatasetsClassifyColumnCreate(datasetId, classifyColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ClassifyColumnRequest classifyColumnRequest = new ClassifyColumnRequest(); // ClassifyColumnRequest | + try { + DynamicColumnCreateResponse result = apiInstance.modelHubDatasetsClassifyColumnCreate(datasetId, classifyColumnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsClassifyColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **classifyColumnRequest** | [**ClassifyColumnRequest**](ClassifyColumnRequest.md)| | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsClassifyColumnCreateWithHttpInfo + +> ApiResponse modelHubDatasetsClassifyColumnCreate modelHubDatasetsClassifyColumnCreateWithHttpInfo(datasetId, classifyColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ClassifyColumnRequest classifyColumnRequest = new ClassifyColumnRequest(); // ClassifyColumnRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsClassifyColumnCreateWithHttpInfo(datasetId, classifyColumnRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsClassifyColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **classifyColumnRequest** | [**ClassifyColumnRequest**](ClassifyColumnRequest.md)| | | + +### Return type + +ApiResponse<[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsCompareDatasetsAddEvalCreate + +> DevelopDatasetMessageResponse modelHubDatasetsCompareDatasetsAddEvalCreate(datasetId, compareExperimentEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareExperimentEvalRequest compareExperimentEvalRequest = new CompareExperimentEvalRequest(); // CompareExperimentEvalRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDatasetsCompareDatasetsAddEvalCreate(datasetId, compareExperimentEvalRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsAddEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareExperimentEvalRequest** | [**CompareExperimentEvalRequest**](CompareExperimentEvalRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo + +> ApiResponse modelHubDatasetsCompareDatasetsAddEvalCreate modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo(datasetId, compareExperimentEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareExperimentEvalRequest compareExperimentEvalRequest = new CompareExperimentEvalRequest(); // CompareExperimentEvalRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo(datasetId, compareExperimentEvalRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsAddEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareExperimentEvalRequest** | [**CompareExperimentEvalRequest**](CompareExperimentEvalRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsCompareDatasetsCreate + +> CompareDatasetResponse modelHubDatasetsCompareDatasetsCreate(datasetId, compareDataset) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareDataset compareDataset = new CompareDataset(); // CompareDataset | + try { + CompareDatasetResponse result = apiInstance.modelHubDatasetsCompareDatasetsCreate(datasetId, compareDataset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareDataset** | [**CompareDataset**](CompareDataset.md)| | | + +### Return type + +[**CompareDatasetResponse**](CompareDatasetResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsCompareDatasetsCreateWithHttpInfo + +> ApiResponse modelHubDatasetsCompareDatasetsCreate modelHubDatasetsCompareDatasetsCreateWithHttpInfo(datasetId, compareDataset) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareDataset compareDataset = new CompareDataset(); // CompareDataset | + try { + ApiResponse response = apiInstance.modelHubDatasetsCompareDatasetsCreateWithHttpInfo(datasetId, compareDataset); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareDataset** | [**CompareDataset**](CompareDataset.md)| | | + +### Return type + +ApiResponse<[**CompareDatasetResponse**](CompareDatasetResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsCompareDatasetsDownloadCreate + +> File modelHubDatasetsCompareDatasetsDownloadCreate(datasetId, compareDataset) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareDataset compareDataset = new CompareDataset(); // CompareDataset | + try { + File result = apiInstance.modelHubDatasetsCompareDatasetsDownloadCreate(datasetId, compareDataset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsDownloadCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareDataset** | [**CompareDataset**](CompareDataset.md)| | | + +### Return type + +[**File**](File.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | CSV export | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo + +> ApiResponse modelHubDatasetsCompareDatasetsDownloadCreate modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo(datasetId, compareDataset) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareDataset compareDataset = new CompareDataset(); // CompareDataset | + try { + ApiResponse response = apiInstance.modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo(datasetId, compareDataset); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsDownloadCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareDataset** | [**CompareDataset**](CompareDataset.md)| | | + +### Return type + +ApiResponse<[**File**](File.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | CSV export | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsCompareDatasetsStartEvalCreate + +> DevelopDatasetMessageResponse modelHubDatasetsCompareDatasetsStartEvalCreate(datasetId, compareStartEvalsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareStartEvalsRequest compareStartEvalsRequest = new CompareStartEvalsRequest(); // CompareStartEvalsRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDatasetsCompareDatasetsStartEvalCreate(datasetId, compareStartEvalsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsStartEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareStartEvalsRequest** | [**CompareStartEvalsRequest**](CompareStartEvalsRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo + +> ApiResponse modelHubDatasetsCompareDatasetsStartEvalCreate modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo(datasetId, compareStartEvalsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareStartEvalsRequest compareStartEvalsRequest = new CompareStartEvalsRequest(); // CompareStartEvalsRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo(datasetId, compareStartEvalsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareDatasetsStartEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareStartEvalsRequest** | [**CompareStartEvalsRequest**](CompareStartEvalsRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsCompareGetEvalsListCreate + +> CompareEvalListResponse modelHubDatasetsCompareGetEvalsListCreate(compareEvalsListRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CompareEvalsListRequest compareEvalsListRequest = new CompareEvalsListRequest(); // CompareEvalsListRequest | + try { + CompareEvalListResponse result = apiInstance.modelHubDatasetsCompareGetEvalsListCreate(compareEvalsListRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareGetEvalsListCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareEvalsListRequest** | [**CompareEvalsListRequest**](CompareEvalsListRequest.md)| | | + +### Return type + +[**CompareEvalListResponse**](CompareEvalListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo + +> ApiResponse modelHubDatasetsCompareGetEvalsListCreate modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo(compareEvalsListRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CompareEvalsListRequest compareEvalsListRequest = new CompareEvalsListRequest(); // CompareEvalsListRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo(compareEvalsListRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareGetEvalsListCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareEvalsListRequest** | [**CompareEvalsListRequest**](CompareEvalsListRequest.md)| | | + +### Return type + +ApiResponse<[**CompareEvalListResponse**](CompareEvalListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsComparePreviewRunEvalCreate + +> EvalPreviewResponse modelHubDatasetsComparePreviewRunEvalCreate(comparePreviewRunEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + ComparePreviewRunEvalRequest comparePreviewRunEvalRequest = new ComparePreviewRunEvalRequest(); // ComparePreviewRunEvalRequest | + try { + EvalPreviewResponse result = apiInstance.modelHubDatasetsComparePreviewRunEvalCreate(comparePreviewRunEvalRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsComparePreviewRunEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **comparePreviewRunEvalRequest** | [**ComparePreviewRunEvalRequest**](ComparePreviewRunEvalRequest.md)| | | + +### Return type + +[**EvalPreviewResponse**](EvalPreviewResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo + +> ApiResponse modelHubDatasetsComparePreviewRunEvalCreate modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo(comparePreviewRunEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + ComparePreviewRunEvalRequest comparePreviewRunEvalRequest = new ComparePreviewRunEvalRequest(); // ComparePreviewRunEvalRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo(comparePreviewRunEvalRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsComparePreviewRunEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **comparePreviewRunEvalRequest** | [**ComparePreviewRunEvalRequest**](ComparePreviewRunEvalRequest.md)| | | + +### Return type + +ApiResponse<[**EvalPreviewResponse**](EvalPreviewResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsCompareStatsCreate + +> CompareDatasetStatsResponse modelHubDatasetsCompareStatsCreate(datasetId, compareDatasetStatsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareDatasetStatsRequest compareDatasetStatsRequest = new CompareDatasetStatsRequest(); // CompareDatasetStatsRequest | + try { + CompareDatasetStatsResponse result = apiInstance.modelHubDatasetsCompareStatsCreate(datasetId, compareDatasetStatsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareStatsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareDatasetStatsRequest** | [**CompareDatasetStatsRequest**](CompareDatasetStatsRequest.md)| | | + +### Return type + +[**CompareDatasetStatsResponse**](CompareDatasetStatsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsCompareStatsCreateWithHttpInfo + +> ApiResponse modelHubDatasetsCompareStatsCreate modelHubDatasetsCompareStatsCreateWithHttpInfo(datasetId, compareDatasetStatsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CompareDatasetStatsRequest compareDatasetStatsRequest = new CompareDatasetStatsRequest(); // CompareDatasetStatsRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsCompareStatsCreateWithHttpInfo(datasetId, compareDatasetStatsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsCompareStatsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **compareDatasetStatsRequest** | [**CompareDatasetStatsRequest**](CompareDatasetStatsRequest.md)| | | + +### Return type + +ApiResponse<[**CompareDatasetStatsResponse**](CompareDatasetStatsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsConditionalColumnCreate + +> DynamicColumnCreateResponse modelHubDatasetsConditionalColumnCreate(datasetId, conditionalColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ConditionalColumnRequest conditionalColumnRequest = new ConditionalColumnRequest(); // ConditionalColumnRequest | + try { + DynamicColumnCreateResponse result = apiInstance.modelHubDatasetsConditionalColumnCreate(datasetId, conditionalColumnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsConditionalColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **conditionalColumnRequest** | [**ConditionalColumnRequest**](ConditionalColumnRequest.md)| | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsConditionalColumnCreateWithHttpInfo + +> ApiResponse modelHubDatasetsConditionalColumnCreate modelHubDatasetsConditionalColumnCreateWithHttpInfo(datasetId, conditionalColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ConditionalColumnRequest conditionalColumnRequest = new ConditionalColumnRequest(); // ConditionalColumnRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsConditionalColumnCreateWithHttpInfo(datasetId, conditionalColumnRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsConditionalColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **conditionalColumnRequest** | [**ConditionalColumnRequest**](ConditionalColumnRequest.md)| | | + +### Return type + +ApiResponse<[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsDeleteCompareDelete + +> CompareDatasetDeleteResponse modelHubDatasetsDeleteCompareDelete(compareId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + try { + CompareDatasetDeleteResponse result = apiInstance.modelHubDatasetsDeleteCompareDelete(compareId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsDeleteCompareDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | + +### Return type + +[**CompareDatasetDeleteResponse**](CompareDatasetDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsDeleteCompareDeleteWithHttpInfo + +> ApiResponse modelHubDatasetsDeleteCompareDelete modelHubDatasetsDeleteCompareDeleteWithHttpInfo(compareId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDatasetsDeleteCompareDeleteWithHttpInfo(compareId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsDeleteCompareDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | + +### Return type + +ApiResponse<[**CompareDatasetDeleteResponse**](CompareDatasetDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsDeleteCompareRead + +> CompareDatasetRowResponse modelHubDatasetsDeleteCompareRead(compareId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + try { + CompareDatasetRowResponse result = apiInstance.modelHubDatasetsDeleteCompareRead(compareId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsDeleteCompareRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | + +### Return type + +[**CompareDatasetRowResponse**](CompareDatasetRowResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsDeleteCompareReadWithHttpInfo + +> ApiResponse modelHubDatasetsDeleteCompareRead modelHubDatasetsDeleteCompareReadWithHttpInfo(compareId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDatasetsDeleteCompareReadWithHttpInfo(compareId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsDeleteCompareRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | + +### Return type + +ApiResponse<[**CompareDatasetRowResponse**](CompareDatasetRowResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsDuplicateRowsCreate + +> DuplicateRowsResponse modelHubDatasetsDuplicateRowsCreate(datasetId, duplicateRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DuplicateRowsRequest duplicateRowsRequest = new DuplicateRowsRequest(); // DuplicateRowsRequest | + try { + DuplicateRowsResponse result = apiInstance.modelHubDatasetsDuplicateRowsCreate(datasetId, duplicateRowsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsDuplicateRowsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **duplicateRowsRequest** | [**DuplicateRowsRequest**](DuplicateRowsRequest.md)| | | + +### Return type + +[**DuplicateRowsResponse**](DuplicateRowsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsDuplicateRowsCreateWithHttpInfo + +> ApiResponse modelHubDatasetsDuplicateRowsCreate modelHubDatasetsDuplicateRowsCreateWithHttpInfo(datasetId, duplicateRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DuplicateRowsRequest duplicateRowsRequest = new DuplicateRowsRequest(); // DuplicateRowsRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsDuplicateRowsCreateWithHttpInfo(datasetId, duplicateRowsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsDuplicateRowsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **duplicateRowsRequest** | [**DuplicateRowsRequest**](DuplicateRowsRequest.md)| | | + +### Return type + +ApiResponse<[**DuplicateRowsResponse**](DuplicateRowsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsExplanationSummaryRead + +> DatasetExplanationSummaryResponse modelHubDatasetsExplanationSummaryRead(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetExplanationSummaryResponse result = apiInstance.modelHubDatasetsExplanationSummaryRead(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsExplanationSummaryRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsExplanationSummaryReadWithHttpInfo + +> ApiResponse modelHubDatasetsExplanationSummaryRead modelHubDatasetsExplanationSummaryReadWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDatasetsExplanationSummaryReadWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsExplanationSummaryRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsExplanationSummaryRefreshCreate + +> DatasetExplanationSummaryResponse modelHubDatasetsExplanationSummaryRefreshCreate(datasetId, body) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + Object body = null; // Object | + try { + DatasetExplanationSummaryResponse result = apiInstance.modelHubDatasetsExplanationSummaryRefreshCreate(datasetId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsExplanationSummaryRefreshCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo + +> ApiResponse modelHubDatasetsExplanationSummaryRefreshCreate modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo(datasetId, body) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo(datasetId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsExplanationSummaryRefreshCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsExtractEntitiesCreate + +> DynamicColumnMessageResponse modelHubDatasetsExtractEntitiesCreate(datasetId, extractEntitiesRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ExtractEntitiesRequest extractEntitiesRequest = new ExtractEntitiesRequest(); // ExtractEntitiesRequest | + try { + DynamicColumnMessageResponse result = apiInstance.modelHubDatasetsExtractEntitiesCreate(datasetId, extractEntitiesRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsExtractEntitiesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **extractEntitiesRequest** | [**ExtractEntitiesRequest**](ExtractEntitiesRequest.md)| | | + +### Return type + +[**DynamicColumnMessageResponse**](DynamicColumnMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsExtractEntitiesCreateWithHttpInfo + +> ApiResponse modelHubDatasetsExtractEntitiesCreate modelHubDatasetsExtractEntitiesCreateWithHttpInfo(datasetId, extractEntitiesRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ExtractEntitiesRequest extractEntitiesRequest = new ExtractEntitiesRequest(); // ExtractEntitiesRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsExtractEntitiesCreateWithHttpInfo(datasetId, extractEntitiesRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsExtractEntitiesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **extractEntitiesRequest** | [**ExtractEntitiesRequest**](ExtractEntitiesRequest.md)| | | + +### Return type + +ApiResponse<[**DynamicColumnMessageResponse**](DynamicColumnMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsGetCompareRowDelete + +> CompareDatasetDeleteResponse modelHubDatasetsGetCompareRowDelete(compareId, rowId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + String rowId = "rowId_example"; // String | + try { + CompareDatasetDeleteResponse result = apiInstance.modelHubDatasetsGetCompareRowDelete(compareId, rowId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsGetCompareRowDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | +| **rowId** | **String**| | | + +### Return type + +[**CompareDatasetDeleteResponse**](CompareDatasetDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsGetCompareRowDeleteWithHttpInfo + +> ApiResponse modelHubDatasetsGetCompareRowDelete modelHubDatasetsGetCompareRowDeleteWithHttpInfo(compareId, rowId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + String rowId = "rowId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDatasetsGetCompareRowDeleteWithHttpInfo(compareId, rowId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsGetCompareRowDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | +| **rowId** | **String**| | | + +### Return type + +ApiResponse<[**CompareDatasetDeleteResponse**](CompareDatasetDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsGetCompareRowRead + +> CompareDatasetRowResponse modelHubDatasetsGetCompareRowRead(compareId, rowId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + String rowId = "rowId_example"; // String | + try { + CompareDatasetRowResponse result = apiInstance.modelHubDatasetsGetCompareRowRead(compareId, rowId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsGetCompareRowRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | +| **rowId** | **String**| | | + +### Return type + +[**CompareDatasetRowResponse**](CompareDatasetRowResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsGetCompareRowReadWithHttpInfo + +> ApiResponse modelHubDatasetsGetCompareRowRead modelHubDatasetsGetCompareRowReadWithHttpInfo(compareId, rowId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String compareId = "compareId_example"; // String | + String rowId = "rowId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDatasetsGetCompareRowReadWithHttpInfo(compareId, rowId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsGetCompareRowRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compareId** | **String**| | | +| **rowId** | **String**| | | + +### Return type + +ApiResponse<[**CompareDatasetRowResponse**](CompareDatasetRowResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsHuggingfaceDetailCreate + +> HuggingFaceDatasetDetailResponse modelHubDatasetsHuggingfaceDetailCreate(huggingFaceDatasetDetailRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetDetailRequest huggingFaceDatasetDetailRequest = new HuggingFaceDatasetDetailRequest(); // HuggingFaceDatasetDetailRequest | + try { + HuggingFaceDatasetDetailResponse result = apiInstance.modelHubDatasetsHuggingfaceDetailCreate(huggingFaceDatasetDetailRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsHuggingfaceDetailCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetDetailRequest** | [**HuggingFaceDatasetDetailRequest**](HuggingFaceDatasetDetailRequest.md)| | | + +### Return type + +[**HuggingFaceDatasetDetailResponse**](HuggingFaceDatasetDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo + +> ApiResponse modelHubDatasetsHuggingfaceDetailCreate modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo(huggingFaceDatasetDetailRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetDetailRequest huggingFaceDatasetDetailRequest = new HuggingFaceDatasetDetailRequest(); // HuggingFaceDatasetDetailRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo(huggingFaceDatasetDetailRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsHuggingfaceDetailCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetDetailRequest** | [**HuggingFaceDatasetDetailRequest**](HuggingFaceDatasetDetailRequest.md)| | | + +### Return type + +ApiResponse<[**HuggingFaceDatasetDetailResponse**](HuggingFaceDatasetDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsHuggingfaceListCreate + +> HuggingFaceDatasetListResponse modelHubDatasetsHuggingfaceListCreate(huggingFaceDatasetListRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetListRequest huggingFaceDatasetListRequest = new HuggingFaceDatasetListRequest(); // HuggingFaceDatasetListRequest | + try { + HuggingFaceDatasetListResponse result = apiInstance.modelHubDatasetsHuggingfaceListCreate(huggingFaceDatasetListRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsHuggingfaceListCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetListRequest** | [**HuggingFaceDatasetListRequest**](HuggingFaceDatasetListRequest.md)| | | + +### Return type + +[**HuggingFaceDatasetListResponse**](HuggingFaceDatasetListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsHuggingfaceListCreateWithHttpInfo + +> ApiResponse modelHubDatasetsHuggingfaceListCreate modelHubDatasetsHuggingfaceListCreateWithHttpInfo(huggingFaceDatasetListRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetListRequest huggingFaceDatasetListRequest = new HuggingFaceDatasetListRequest(); // HuggingFaceDatasetListRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsHuggingfaceListCreateWithHttpInfo(huggingFaceDatasetListRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsHuggingfaceListCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetListRequest** | [**HuggingFaceDatasetListRequest**](HuggingFaceDatasetListRequest.md)| | | + +### Return type + +ApiResponse<[**HuggingFaceDatasetListResponse**](HuggingFaceDatasetListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsMergeCreate + +> MergeDatasetResponse modelHubDatasetsMergeCreate(datasetId, mergeDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + MergeDatasetRequest mergeDatasetRequest = new MergeDatasetRequest(); // MergeDatasetRequest | + try { + MergeDatasetResponse result = apiInstance.modelHubDatasetsMergeCreate(datasetId, mergeDatasetRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsMergeCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **mergeDatasetRequest** | [**MergeDatasetRequest**](MergeDatasetRequest.md)| | | + +### Return type + +[**MergeDatasetResponse**](MergeDatasetResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsMergeCreateWithHttpInfo + +> ApiResponse modelHubDatasetsMergeCreate modelHubDatasetsMergeCreateWithHttpInfo(datasetId, mergeDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + MergeDatasetRequest mergeDatasetRequest = new MergeDatasetRequest(); // MergeDatasetRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsMergeCreateWithHttpInfo(datasetId, mergeDatasetRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsMergeCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **mergeDatasetRequest** | [**MergeDatasetRequest**](MergeDatasetRequest.md)| | | + +### Return type + +ApiResponse<[**MergeDatasetResponse**](MergeDatasetResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDatasetsPreviewCreate + +> PreviewDatasetOperationResponse modelHubDatasetsPreviewCreate(datasetId, operationType, previewDatasetOperationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String operationType = "operationType_example"; // String | + PreviewDatasetOperationRequest previewDatasetOperationRequest = new PreviewDatasetOperationRequest(); // PreviewDatasetOperationRequest | + try { + PreviewDatasetOperationResponse result = apiInstance.modelHubDatasetsPreviewCreate(datasetId, operationType, previewDatasetOperationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsPreviewCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **operationType** | **String**| | | +| **previewDatasetOperationRequest** | [**PreviewDatasetOperationRequest**](PreviewDatasetOperationRequest.md)| | | + +### Return type + +[**PreviewDatasetOperationResponse**](PreviewDatasetOperationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDatasetsPreviewCreateWithHttpInfo + +> ApiResponse modelHubDatasetsPreviewCreate modelHubDatasetsPreviewCreateWithHttpInfo(datasetId, operationType, previewDatasetOperationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String operationType = "operationType_example"; // String | + PreviewDatasetOperationRequest previewDatasetOperationRequest = new PreviewDatasetOperationRequest(); // PreviewDatasetOperationRequest | + try { + ApiResponse response = apiInstance.modelHubDatasetsPreviewCreateWithHttpInfo(datasetId, operationType, previewDatasetOperationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDatasetsPreviewCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **operationType** | **String**| | | +| **previewDatasetOperationRequest** | [**PreviewDatasetOperationRequest**](PreviewDatasetOperationRequest.md)| | | + +### Return type + +ApiResponse<[**PreviewDatasetOperationResponse**](PreviewDatasetOperationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDeleteEvalTemplateCreate + +> ModelHubStringResultResponse modelHubDeleteEvalTemplateCreate(deleteEvalTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DeleteEvalTemplate deleteEvalTemplate = new DeleteEvalTemplate(); // DeleteEvalTemplate | + try { + ModelHubStringResultResponse result = apiInstance.modelHubDeleteEvalTemplateCreate(deleteEvalTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDeleteEvalTemplateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deleteEvalTemplate** | [**DeleteEvalTemplate**](DeleteEvalTemplate.md)| | | + +### Return type + +[**ModelHubStringResultResponse**](ModelHubStringResultResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDeleteEvalTemplateCreateWithHttpInfo + +> ApiResponse modelHubDeleteEvalTemplateCreate modelHubDeleteEvalTemplateCreateWithHttpInfo(deleteEvalTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DeleteEvalTemplate deleteEvalTemplate = new DeleteEvalTemplate(); // DeleteEvalTemplate | + try { + ApiResponse response = apiInstance.modelHubDeleteEvalTemplateCreateWithHttpInfo(deleteEvalTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDeleteEvalTemplateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deleteEvalTemplate** | [**DeleteEvalTemplate**](DeleteEvalTemplate.md)| | | + +### Return type + +ApiResponse<[**ModelHubStringResultResponse**](ModelHubStringResultResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddAsNewCreate + +> DatasetCopyResponse modelHubDevelopsAddAsNewCreate(addAsNewDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AddAsNewDatasetRequest addAsNewDatasetRequest = new AddAsNewDatasetRequest(); // AddAsNewDatasetRequest | + try { + DatasetCopyResponse result = apiInstance.modelHubDevelopsAddAsNewCreate(addAsNewDatasetRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddAsNewCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addAsNewDatasetRequest** | [**AddAsNewDatasetRequest**](AddAsNewDatasetRequest.md)| | | + +### Return type + +[**DatasetCopyResponse**](DatasetCopyResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddAsNewCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddAsNewCreate modelHubDevelopsAddAsNewCreateWithHttpInfo(addAsNewDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AddAsNewDatasetRequest addAsNewDatasetRequest = new AddAsNewDatasetRequest(); // AddAsNewDatasetRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddAsNewCreateWithHttpInfo(addAsNewDatasetRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddAsNewCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addAsNewDatasetRequest** | [**AddAsNewDatasetRequest**](AddAsNewDatasetRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetCopyResponse**](DatasetCopyResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddEmptyColumnsCreate + +> DatasetColumnsMutationResponse modelHubDevelopsAddEmptyColumnsCreate(datasetId, datasetAddEmptyColumnsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddEmptyColumnsRequest datasetAddEmptyColumnsRequest = new DatasetAddEmptyColumnsRequest(); // DatasetAddEmptyColumnsRequest | + try { + DatasetColumnsMutationResponse result = apiInstance.modelHubDevelopsAddEmptyColumnsCreate(datasetId, datasetAddEmptyColumnsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddEmptyColumnsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddEmptyColumnsRequest** | [**DatasetAddEmptyColumnsRequest**](DatasetAddEmptyColumnsRequest.md)| | | + +### Return type + +[**DatasetColumnsMutationResponse**](DatasetColumnsMutationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddEmptyColumnsCreate modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo(datasetId, datasetAddEmptyColumnsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddEmptyColumnsRequest datasetAddEmptyColumnsRequest = new DatasetAddEmptyColumnsRequest(); // DatasetAddEmptyColumnsRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo(datasetId, datasetAddEmptyColumnsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddEmptyColumnsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddEmptyColumnsRequest** | [**DatasetAddEmptyColumnsRequest**](DatasetAddEmptyColumnsRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetColumnsMutationResponse**](DatasetColumnsMutationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddEmptyRowsCreate + +> DevelopDatasetMessageResponse modelHubDevelopsAddEmptyRowsCreate(datasetId, datasetAddEmptyRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddEmptyRowsRequest datasetAddEmptyRowsRequest = new DatasetAddEmptyRowsRequest(); // DatasetAddEmptyRowsRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsAddEmptyRowsCreate(datasetId, datasetAddEmptyRowsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddEmptyRowsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddEmptyRowsRequest** | [**DatasetAddEmptyRowsRequest**](DatasetAddEmptyRowsRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddEmptyRowsCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddEmptyRowsCreate modelHubDevelopsAddEmptyRowsCreateWithHttpInfo(datasetId, datasetAddEmptyRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddEmptyRowsRequest datasetAddEmptyRowsRequest = new DatasetAddEmptyRowsRequest(); // DatasetAddEmptyRowsRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddEmptyRowsCreateWithHttpInfo(datasetId, datasetAddEmptyRowsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddEmptyRowsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddEmptyRowsRequest** | [**DatasetAddEmptyRowsRequest**](DatasetAddEmptyRowsRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddMultipleStaticColumnsCreate + +> DevelopDatasetMessageResponse modelHubDevelopsAddMultipleStaticColumnsCreate(datasetId, datasetMultipleStaticColumnsRequest) + +Add multiple static columns to a dataset at once. + +Expected request data: { \"columns\": [ { \"new_column_name\": \"column1\", \"column_type\": \"string\", \"source\": \"OTHERS\" # optional }, { \"new_column_name\": \"column2\", \"column_type\": \"number\", \"source\": \"OTHERS\" # optional } ] } + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetMultipleStaticColumnsRequest datasetMultipleStaticColumnsRequest = new DatasetMultipleStaticColumnsRequest(); // DatasetMultipleStaticColumnsRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsAddMultipleStaticColumnsCreate(datasetId, datasetMultipleStaticColumnsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddMultipleStaticColumnsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetMultipleStaticColumnsRequest** | [**DatasetMultipleStaticColumnsRequest**](DatasetMultipleStaticColumnsRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddMultipleStaticColumnsCreate modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo(datasetId, datasetMultipleStaticColumnsRequest) + +Add multiple static columns to a dataset at once. + +Expected request data: { \"columns\": [ { \"new_column_name\": \"column1\", \"column_type\": \"string\", \"source\": \"OTHERS\" # optional }, { \"new_column_name\": \"column2\", \"column_type\": \"number\", \"source\": \"OTHERS\" # optional } ] } + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetMultipleStaticColumnsRequest datasetMultipleStaticColumnsRequest = new DatasetMultipleStaticColumnsRequest(); // DatasetMultipleStaticColumnsRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo(datasetId, datasetMultipleStaticColumnsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddMultipleStaticColumnsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetMultipleStaticColumnsRequest** | [**DatasetMultipleStaticColumnsRequest**](DatasetMultipleStaticColumnsRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddRowsFromExistingDatasetCreate + +> DatasetRowsImportedResponse modelHubDevelopsAddRowsFromExistingDatasetCreate(datasetId, datasetAddRowsFromExistingRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddRowsFromExistingRequest datasetAddRowsFromExistingRequest = new DatasetAddRowsFromExistingRequest(); // DatasetAddRowsFromExistingRequest | + try { + DatasetRowsImportedResponse result = apiInstance.modelHubDevelopsAddRowsFromExistingDatasetCreate(datasetId, datasetAddRowsFromExistingRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsFromExistingDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddRowsFromExistingRequest** | [**DatasetAddRowsFromExistingRequest**](DatasetAddRowsFromExistingRequest.md)| | | + +### Return type + +[**DatasetRowsImportedResponse**](DatasetRowsImportedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddRowsFromExistingDatasetCreate modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo(datasetId, datasetAddRowsFromExistingRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetAddRowsFromExistingRequest datasetAddRowsFromExistingRequest = new DatasetAddRowsFromExistingRequest(); // DatasetAddRowsFromExistingRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo(datasetId, datasetAddRowsFromExistingRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsFromExistingDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetAddRowsFromExistingRequest** | [**DatasetAddRowsFromExistingRequest**](DatasetAddRowsFromExistingRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetRowsImportedResponse**](DatasetRowsImportedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddRowsFromFileCreate + +> DevelopDatasetMessageResponse modelHubDevelopsAddRowsFromFileCreate(addRowsFromFileRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AddRowsFromFileRequest addRowsFromFileRequest = new AddRowsFromFileRequest(); // AddRowsFromFileRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsAddRowsFromFileCreate(addRowsFromFileRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsFromFileCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addRowsFromFileRequest** | [**AddRowsFromFileRequest**](AddRowsFromFileRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddRowsFromFileCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddRowsFromFileCreate modelHubDevelopsAddRowsFromFileCreateWithHttpInfo(addRowsFromFileRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AddRowsFromFileRequest addRowsFromFileRequest = new AddRowsFromFileRequest(); // AddRowsFromFileRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddRowsFromFileCreateWithHttpInfo(addRowsFromFileRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsFromFileCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addRowsFromFileRequest** | [**AddRowsFromFileRequest**](AddRowsFromFileRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddRowsFromHuggingfaceCreate + +> DatasetRowsImportMessageResponse modelHubDevelopsAddRowsFromHuggingfaceCreate(datasetId, huggingFaceAddRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + HuggingFaceAddRowsRequest huggingFaceAddRowsRequest = new HuggingFaceAddRowsRequest(); // HuggingFaceAddRowsRequest | + try { + DatasetRowsImportMessageResponse result = apiInstance.modelHubDevelopsAddRowsFromHuggingfaceCreate(datasetId, huggingFaceAddRowsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsFromHuggingfaceCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **huggingFaceAddRowsRequest** | [**HuggingFaceAddRowsRequest**](HuggingFaceAddRowsRequest.md)| | | + +### Return type + +[**DatasetRowsImportMessageResponse**](DatasetRowsImportMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddRowsFromHuggingfaceCreate modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo(datasetId, huggingFaceAddRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + HuggingFaceAddRowsRequest huggingFaceAddRowsRequest = new HuggingFaceAddRowsRequest(); // HuggingFaceAddRowsRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo(datasetId, huggingFaceAddRowsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsFromHuggingfaceCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **huggingFaceAddRowsRequest** | [**HuggingFaceAddRowsRequest**](HuggingFaceAddRowsRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetRowsImportMessageResponse**](DatasetRowsImportMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddRowsSdkCreate + +> DatasetSdkRowsResponse modelHubDevelopsAddRowsSdkCreate(datasetSdkRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetSdkRowsRequest datasetSdkRowsRequest = new DatasetSdkRowsRequest(); // DatasetSdkRowsRequest | + try { + DatasetSdkRowsResponse result = apiInstance.modelHubDevelopsAddRowsSdkCreate(datasetSdkRowsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsSdkCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetSdkRowsRequest** | [**DatasetSdkRowsRequest**](DatasetSdkRowsRequest.md)| | | + +### Return type + +[**DatasetSdkRowsResponse**](DatasetSdkRowsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddRowsSdkCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddRowsSdkCreate modelHubDevelopsAddRowsSdkCreateWithHttpInfo(datasetSdkRowsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetSdkRowsRequest datasetSdkRowsRequest = new DatasetSdkRowsRequest(); // DatasetSdkRowsRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddRowsSdkCreateWithHttpInfo(datasetSdkRowsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRowsSdkCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetSdkRowsRequest** | [**DatasetSdkRowsRequest**](DatasetSdkRowsRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetSdkRowsResponse**](DatasetSdkRowsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddRunPromptColumnCreate + +> DevelopDatasetMessageResponse modelHubDevelopsAddRunPromptColumnCreate(addRunPrompt) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AddRunPrompt addRunPrompt = new AddRunPrompt(); // AddRunPrompt | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsAddRunPromptColumnCreate(addRunPrompt); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRunPromptColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addRunPrompt** | [**AddRunPrompt**](AddRunPrompt.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddRunPromptColumnCreate modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo(addRunPrompt) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + AddRunPrompt addRunPrompt = new AddRunPrompt(); // AddRunPrompt | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo(addRunPrompt); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddRunPromptColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addRunPrompt** | [**AddRunPrompt**](AddRunPrompt.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddStaticColumnCreate + +> DevelopDatasetMessageResponse modelHubDevelopsAddStaticColumnCreate(datasetId, datasetStaticColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetStaticColumnRequest datasetStaticColumnRequest = new DatasetStaticColumnRequest(); // DatasetStaticColumnRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsAddStaticColumnCreate(datasetId, datasetStaticColumnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddStaticColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetStaticColumnRequest** | [**DatasetStaticColumnRequest**](DatasetStaticColumnRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddStaticColumnCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddStaticColumnCreate modelHubDevelopsAddStaticColumnCreateWithHttpInfo(datasetId, datasetStaticColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetStaticColumnRequest datasetStaticColumnRequest = new DatasetStaticColumnRequest(); // DatasetStaticColumnRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddStaticColumnCreateWithHttpInfo(datasetId, datasetStaticColumnRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddStaticColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetStaticColumnRequest** | [**DatasetStaticColumnRequest**](DatasetStaticColumnRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddSyntheticDataCreate + +> DevelopDatasetMessageResponse modelHubDevelopsAddSyntheticDataCreate(datasetId, syntheticData) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + SyntheticData syntheticData = new SyntheticData(); // SyntheticData | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsAddSyntheticDataCreate(datasetId, syntheticData); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddSyntheticDataCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **syntheticData** | [**SyntheticData**](SyntheticData.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddSyntheticDataCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddSyntheticDataCreate modelHubDevelopsAddSyntheticDataCreateWithHttpInfo(datasetId, syntheticData) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + SyntheticData syntheticData = new SyntheticData(); // SyntheticData | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddSyntheticDataCreateWithHttpInfo(datasetId, syntheticData); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddSyntheticDataCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **syntheticData** | [**SyntheticData**](SyntheticData.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsAddUserEvalCreate + +> DevelopDatasetMessageResponse modelHubDevelopsAddUserEvalCreate(datasetId, userEvalMutationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + UserEvalMutationRequest userEvalMutationRequest = new UserEvalMutationRequest(); // UserEvalMutationRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsAddUserEvalCreate(datasetId, userEvalMutationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddUserEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **userEvalMutationRequest** | [**UserEvalMutationRequest**](UserEvalMutationRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsAddUserEvalCreateWithHttpInfo + +> ApiResponse modelHubDevelopsAddUserEvalCreate modelHubDevelopsAddUserEvalCreateWithHttpInfo(datasetId, userEvalMutationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + UserEvalMutationRequest userEvalMutationRequest = new UserEvalMutationRequest(); // UserEvalMutationRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsAddUserEvalCreateWithHttpInfo(datasetId, userEvalMutationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsAddUserEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **userEvalMutationRequest** | [**UserEvalMutationRequest**](UserEvalMutationRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsCloneDatasetCreate + +> DatasetCopyResponse modelHubDevelopsCloneDatasetCreate(datasetId, cloneDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CloneDatasetRequest cloneDatasetRequest = new CloneDatasetRequest(); // CloneDatasetRequest | + try { + DatasetCopyResponse result = apiInstance.modelHubDevelopsCloneDatasetCreate(datasetId, cloneDatasetRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCloneDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **cloneDatasetRequest** | [**CloneDatasetRequest**](CloneDatasetRequest.md)| | | + +### Return type + +[**DatasetCopyResponse**](DatasetCopyResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsCloneDatasetCreateWithHttpInfo + +> ApiResponse modelHubDevelopsCloneDatasetCreate modelHubDevelopsCloneDatasetCreateWithHttpInfo(datasetId, cloneDatasetRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + CloneDatasetRequest cloneDatasetRequest = new CloneDatasetRequest(); // CloneDatasetRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsCloneDatasetCreateWithHttpInfo(datasetId, cloneDatasetRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCloneDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **cloneDatasetRequest** | [**CloneDatasetRequest**](CloneDatasetRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetCopyResponse**](DatasetCopyResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsCreateDatasetCreate + +> DevelopDatasetMessageResponse modelHubDevelopsCreateDatasetCreate(expDatasetId, createDatasetFromExperimentRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String expDatasetId = "expDatasetId_example"; // String | + CreateDatasetFromExperimentRequest createDatasetFromExperimentRequest = new CreateDatasetFromExperimentRequest(); // CreateDatasetFromExperimentRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsCreateDatasetCreate(expDatasetId, createDatasetFromExperimentRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCreateDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **expDatasetId** | **String**| | | +| **createDatasetFromExperimentRequest** | [**CreateDatasetFromExperimentRequest**](CreateDatasetFromExperimentRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsCreateDatasetCreateWithHttpInfo + +> ApiResponse modelHubDevelopsCreateDatasetCreate modelHubDevelopsCreateDatasetCreateWithHttpInfo(expDatasetId, createDatasetFromExperimentRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String expDatasetId = "expDatasetId_example"; // String | + CreateDatasetFromExperimentRequest createDatasetFromExperimentRequest = new CreateDatasetFromExperimentRequest(); // CreateDatasetFromExperimentRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsCreateDatasetCreateWithHttpInfo(expDatasetId, createDatasetFromExperimentRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCreateDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **expDatasetId** | **String**| | | +| **createDatasetFromExperimentRequest** | [**CreateDatasetFromExperimentRequest**](CreateDatasetFromExperimentRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsCreateDatasetFromHuggingfaceCreate + +> DatasetCreateStartedResponse modelHubDevelopsCreateDatasetFromHuggingfaceCreate(huggingFaceDatasetCreateRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetCreateRequest huggingFaceDatasetCreateRequest = new HuggingFaceDatasetCreateRequest(); // HuggingFaceDatasetCreateRequest | + try { + DatasetCreateStartedResponse result = apiInstance.modelHubDevelopsCreateDatasetFromHuggingfaceCreate(huggingFaceDatasetCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCreateDatasetFromHuggingfaceCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetCreateRequest** | [**HuggingFaceDatasetCreateRequest**](HuggingFaceDatasetCreateRequest.md)| | | + +### Return type + +[**DatasetCreateStartedResponse**](DatasetCreateStartedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo + +> ApiResponse modelHubDevelopsCreateDatasetFromHuggingfaceCreate modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo(huggingFaceDatasetCreateRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetCreateRequest huggingFaceDatasetCreateRequest = new HuggingFaceDatasetCreateRequest(); // HuggingFaceDatasetCreateRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo(huggingFaceDatasetCreateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCreateDatasetFromHuggingfaceCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetCreateRequest** | [**HuggingFaceDatasetCreateRequest**](HuggingFaceDatasetCreateRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetCreateStartedResponse**](DatasetCreateStartedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsCreateSyntheticDatasetCreate + +> SyntheticDatasetCreateStartedResponse modelHubDevelopsCreateSyntheticDatasetCreate(syntheticDatasetCreation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + SyntheticDatasetCreation syntheticDatasetCreation = new SyntheticDatasetCreation(); // SyntheticDatasetCreation | + try { + SyntheticDatasetCreateStartedResponse result = apiInstance.modelHubDevelopsCreateSyntheticDatasetCreate(syntheticDatasetCreation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCreateSyntheticDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **syntheticDatasetCreation** | [**SyntheticDatasetCreation**](SyntheticDatasetCreation.md)| | | + +### Return type + +[**SyntheticDatasetCreateStartedResponse**](SyntheticDatasetCreateStartedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo + +> ApiResponse modelHubDevelopsCreateSyntheticDatasetCreate modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo(syntheticDatasetCreation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + SyntheticDatasetCreation syntheticDatasetCreation = new SyntheticDatasetCreation(); // SyntheticDatasetCreation | + try { + ApiResponse response = apiInstance.modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo(syntheticDatasetCreation); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsCreateSyntheticDatasetCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **syntheticDatasetCreation** | [**SyntheticDatasetCreation**](SyntheticDatasetCreation.md)| | | + +### Return type + +ApiResponse<[**SyntheticDatasetCreateStartedResponse**](SyntheticDatasetCreateStartedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsDatasetCreationProgressRead + +> DatasetCreationProgressResponse modelHubDevelopsDatasetCreationProgressRead(datasetId) + + + +API endpoint to check the progress of dataset creation from file upload + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetCreationProgressResponse result = apiInstance.modelHubDevelopsDatasetCreationProgressRead(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDatasetCreationProgressRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetCreationProgressResponse**](DatasetCreationProgressResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsDatasetCreationProgressReadWithHttpInfo + +> ApiResponse modelHubDevelopsDatasetCreationProgressRead modelHubDevelopsDatasetCreationProgressReadWithHttpInfo(datasetId) + + + +API endpoint to check the progress of dataset creation from file upload + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsDatasetCreationProgressReadWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDatasetCreationProgressRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetCreationProgressResponse**](DatasetCreationProgressResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsDeleteDatasetDelete + +> void modelHubDevelopsDeleteDatasetDelete() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + apiInstance.modelHubDevelopsDeleteDatasetDelete(); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDeleteDatasetDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsDeleteDatasetDeleteWithHttpInfo + +> ApiResponse modelHubDevelopsDeleteDatasetDelete modelHubDevelopsDeleteDatasetDeleteWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubDevelopsDeleteDatasetDeleteWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDeleteDatasetDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsDeleteTemplateEvalDelete + +> void modelHubDevelopsDeleteTemplateEvalDelete(datasetId, evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + try { + apiInstance.modelHubDevelopsDeleteTemplateEvalDelete(datasetId, evalId); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDeleteTemplateEvalDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo + +> ApiResponse modelHubDevelopsDeleteTemplateEvalDelete modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo(datasetId, evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo(datasetId, evalId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDeleteTemplateEvalDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsDeleteUserEvalDelete + +> void modelHubDevelopsDeleteUserEvalDelete(datasetId, evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + try { + apiInstance.modelHubDevelopsDeleteUserEvalDelete(datasetId, evalId); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDeleteUserEvalDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo + +> ApiResponse modelHubDevelopsDeleteUserEvalDelete modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo(datasetId, evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo(datasetId, evalId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsDeleteUserEvalDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsEditAndRunUserEvalCreate + +> DevelopDatasetMessageResponse modelHubDevelopsEditAndRunUserEvalCreate(datasetId, evalId, userEvalUpdateRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + UserEvalUpdateRequest userEvalUpdateRequest = new UserEvalUpdateRequest(); // UserEvalUpdateRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsEditAndRunUserEvalCreate(datasetId, evalId, userEvalUpdateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsEditAndRunUserEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | +| **userEvalUpdateRequest** | [**UserEvalUpdateRequest**](UserEvalUpdateRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo + +> ApiResponse modelHubDevelopsEditAndRunUserEvalCreate modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo(datasetId, evalId, userEvalUpdateRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + UserEvalUpdateRequest userEvalUpdateRequest = new UserEvalUpdateRequest(); // UserEvalUpdateRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo(datasetId, evalId, userEvalUpdateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsEditAndRunUserEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | +| **userEvalUpdateRequest** | [**UserEvalUpdateRequest**](UserEvalUpdateRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsEditDatasetBehaviorUpdate + +> DevelopDatasetMessageResponse modelHubDevelopsEditDatasetBehaviorUpdate(datasetId, datasetBehaviorRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetBehaviorRequest datasetBehaviorRequest = new DatasetBehaviorRequest(); // DatasetBehaviorRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsEditDatasetBehaviorUpdate(datasetId, datasetBehaviorRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsEditDatasetBehaviorUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetBehaviorRequest** | [**DatasetBehaviorRequest**](DatasetBehaviorRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo + +> ApiResponse modelHubDevelopsEditDatasetBehaviorUpdate modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo(datasetId, datasetBehaviorRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + DatasetBehaviorRequest datasetBehaviorRequest = new DatasetBehaviorRequest(); // DatasetBehaviorRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo(datasetId, datasetBehaviorRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsEditDatasetBehaviorUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **datasetBehaviorRequest** | [**DatasetBehaviorRequest**](DatasetBehaviorRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsEditRunPromptColumnCreate + +> DevelopDatasetMessageResponse modelHubDevelopsEditRunPromptColumnCreate(editRunPromptColumn) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EditRunPromptColumn editRunPromptColumn = new EditRunPromptColumn(); // EditRunPromptColumn | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsEditRunPromptColumnCreate(editRunPromptColumn); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsEditRunPromptColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **editRunPromptColumn** | [**EditRunPromptColumn**](EditRunPromptColumn.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo + +> ApiResponse modelHubDevelopsEditRunPromptColumnCreate modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo(editRunPromptColumn) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EditRunPromptColumn editRunPromptColumn = new EditRunPromptColumn(); // EditRunPromptColumn | + try { + ApiResponse response = apiInstance.modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo(editRunPromptColumn); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsEditRunPromptColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **editRunPromptColumn** | [**EditRunPromptColumn**](EditRunPromptColumn.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsExtractJsonColumnCreate + +> DynamicColumnCreateResponse modelHubDevelopsExtractJsonColumnCreate(datasetId, extractJsonColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ExtractJsonColumnRequest extractJsonColumnRequest = new ExtractJsonColumnRequest(); // ExtractJsonColumnRequest | + try { + DynamicColumnCreateResponse result = apiInstance.modelHubDevelopsExtractJsonColumnCreate(datasetId, extractJsonColumnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsExtractJsonColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **extractJsonColumnRequest** | [**ExtractJsonColumnRequest**](ExtractJsonColumnRequest.md)| | | + +### Return type + +[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsExtractJsonColumnCreateWithHttpInfo + +> ApiResponse modelHubDevelopsExtractJsonColumnCreate modelHubDevelopsExtractJsonColumnCreateWithHttpInfo(datasetId, extractJsonColumnRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + ExtractJsonColumnRequest extractJsonColumnRequest = new ExtractJsonColumnRequest(); // ExtractJsonColumnRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsExtractJsonColumnCreateWithHttpInfo(datasetId, extractJsonColumnRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsExtractJsonColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **extractJsonColumnRequest** | [**ExtractJsonColumnRequest**](ExtractJsonColumnRequest.md)| | | + +### Return type + +ApiResponse<[**DynamicColumnCreateResponse**](DynamicColumnCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetCellDataCreate + +> DatasetCellDataResponse modelHubDevelopsGetCellDataCreate(datasetCellDataRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetCellDataRequest datasetCellDataRequest = new DatasetCellDataRequest(); // DatasetCellDataRequest | + try { + DatasetCellDataResponse result = apiInstance.modelHubDevelopsGetCellDataCreate(datasetCellDataRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetCellDataCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetCellDataRequest** | [**DatasetCellDataRequest**](DatasetCellDataRequest.md)| | | + +### Return type + +[**DatasetCellDataResponse**](DatasetCellDataResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetCellDataCreateWithHttpInfo + +> ApiResponse modelHubDevelopsGetCellDataCreate modelHubDevelopsGetCellDataCreateWithHttpInfo(datasetCellDataRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetCellDataRequest datasetCellDataRequest = new DatasetCellDataRequest(); // DatasetCellDataRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsGetCellDataCreateWithHttpInfo(datasetCellDataRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetCellDataCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetCellDataRequest** | [**DatasetCellDataRequest**](DatasetCellDataRequest.md)| | | + +### Return type + +ApiResponse<[**DatasetCellDataResponse**](DatasetCellDataResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetDerivedDatasetsRead + +> DatasetExplanationSummaryResponse modelHubDevelopsGetDerivedDatasetsRead(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + DatasetExplanationSummaryResponse result = apiInstance.modelHubDevelopsGetDerivedDatasetsRead(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetDerivedDatasetsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo + +> ApiResponse modelHubDevelopsGetDerivedDatasetsRead modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetDerivedDatasetsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetExplanationSummaryResponse**](DatasetExplanationSummaryResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetEvalStructureRead + +> EvalStructureResponse modelHubDevelopsGetEvalStructureRead(datasetId, evalId, evalType) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + String evalType = "preset"; // String | + try { + EvalStructureResponse result = apiInstance.modelHubDevelopsGetEvalStructureRead(datasetId, evalId, evalType); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetEvalStructureRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | +| **evalType** | **String**| | [enum: preset, user, previously_configured] | + +### Return type + +[**EvalStructureResponse**](EvalStructureResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetEvalStructureReadWithHttpInfo + +> ApiResponse modelHubDevelopsGetEvalStructureRead modelHubDevelopsGetEvalStructureReadWithHttpInfo(datasetId, evalId, evalType) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + String evalType = "preset"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsGetEvalStructureReadWithHttpInfo(datasetId, evalId, evalType); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetEvalStructureRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | +| **evalType** | **String**| | [enum: preset, user, previously_configured] | + +### Return type + +ApiResponse<[**EvalStructureResponse**](EvalStructureResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetEvalsListList + +> EvalListResponse modelHubDevelopsGetEvalsListList(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + EvalListResponse result = apiInstance.modelHubDevelopsGetEvalsListList(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetEvalsListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**EvalListResponse**](EvalListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetEvalsListListWithHttpInfo + +> ApiResponse modelHubDevelopsGetEvalsListList modelHubDevelopsGetEvalsListListWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsGetEvalsListListWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetEvalsListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**EvalListResponse**](EvalListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetExperimentDatasetTableList + +> DatasetTableResponse modelHubDevelopsGetExperimentDatasetTableList(experimentDatasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentDatasetId = "experimentDatasetId_example"; // String | + try { + DatasetTableResponse result = apiInstance.modelHubDevelopsGetExperimentDatasetTableList(experimentDatasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetExperimentDatasetTableList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentDatasetId** | **String**| | | + +### Return type + +[**DatasetTableResponse**](DatasetTableResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo + +> ApiResponse modelHubDevelopsGetExperimentDatasetTableList modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo(experimentDatasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentDatasetId = "experimentDatasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo(experimentDatasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetExperimentDatasetTableList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentDatasetId** | **String**| | | + +### Return type + +ApiResponse<[**DatasetTableResponse**](DatasetTableResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetFunctionListList + +> EvalFunctionListResponse modelHubDevelopsGetFunctionListList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + EvalFunctionListResponse result = apiInstance.modelHubDevelopsGetFunctionListList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetFunctionListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**EvalFunctionListResponse**](EvalFunctionListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetFunctionListListWithHttpInfo + +> ApiResponse modelHubDevelopsGetFunctionListList modelHubDevelopsGetFunctionListListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubDevelopsGetFunctionListListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetFunctionListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**EvalFunctionListResponse**](EvalFunctionListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetHuggingfaceDatasetConfigCreate + +> HuggingFaceDatasetConfigResponse modelHubDevelopsGetHuggingfaceDatasetConfigCreate(huggingFaceDatasetConfigRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetConfigRequest huggingFaceDatasetConfigRequest = new HuggingFaceDatasetConfigRequest(); // HuggingFaceDatasetConfigRequest | + try { + HuggingFaceDatasetConfigResponse result = apiInstance.modelHubDevelopsGetHuggingfaceDatasetConfigCreate(huggingFaceDatasetConfigRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetHuggingfaceDatasetConfigCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetConfigRequest** | [**HuggingFaceDatasetConfigRequest**](HuggingFaceDatasetConfigRequest.md)| | | + +### Return type + +[**HuggingFaceDatasetConfigResponse**](HuggingFaceDatasetConfigResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo + +> ApiResponse modelHubDevelopsGetHuggingfaceDatasetConfigCreate modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo(huggingFaceDatasetConfigRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + HuggingFaceDatasetConfigRequest huggingFaceDatasetConfigRequest = new HuggingFaceDatasetConfigRequest(); // HuggingFaceDatasetConfigRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo(huggingFaceDatasetConfigRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetHuggingfaceDatasetConfigCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **huggingFaceDatasetConfigRequest** | [**HuggingFaceDatasetConfigRequest**](HuggingFaceDatasetConfigRequest.md)| | | + +### Return type + +ApiResponse<[**HuggingFaceDatasetConfigResponse**](HuggingFaceDatasetConfigResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsGetRowDiffCreate + +> ExperimentRowDiffResponse modelHubDevelopsGetRowDiffCreate(datasetRowDiffRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetRowDiffRequest datasetRowDiffRequest = new DatasetRowDiffRequest(); // DatasetRowDiffRequest | + try { + ExperimentRowDiffResponse result = apiInstance.modelHubDevelopsGetRowDiffCreate(datasetRowDiffRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetRowDiffCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetRowDiffRequest** | [**DatasetRowDiffRequest**](DatasetRowDiffRequest.md)| | | + +### Return type + +[**ExperimentRowDiffResponse**](ExperimentRowDiffResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsGetRowDiffCreateWithHttpInfo + +> ApiResponse modelHubDevelopsGetRowDiffCreate modelHubDevelopsGetRowDiffCreateWithHttpInfo(datasetRowDiffRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetRowDiffRequest datasetRowDiffRequest = new DatasetRowDiffRequest(); // DatasetRowDiffRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsGetRowDiffCreateWithHttpInfo(datasetRowDiffRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsGetRowDiffCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetRowDiffRequest** | [**DatasetRowDiffRequest**](DatasetRowDiffRequest.md)| | | + +### Return type + +ApiResponse<[**ExperimentRowDiffResponse**](ExperimentRowDiffResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsPreviewRunEvalCreate + +> EvalPreviewResponse modelHubDevelopsPreviewRunEvalCreate(datasetId, previewRunEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + PreviewRunEvalRequest previewRunEvalRequest = new PreviewRunEvalRequest(); // PreviewRunEvalRequest | + try { + EvalPreviewResponse result = apiInstance.modelHubDevelopsPreviewRunEvalCreate(datasetId, previewRunEvalRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsPreviewRunEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **previewRunEvalRequest** | [**PreviewRunEvalRequest**](PreviewRunEvalRequest.md)| | | + +### Return type + +[**EvalPreviewResponse**](EvalPreviewResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsPreviewRunEvalCreateWithHttpInfo + +> ApiResponse modelHubDevelopsPreviewRunEvalCreate modelHubDevelopsPreviewRunEvalCreateWithHttpInfo(datasetId, previewRunEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + PreviewRunEvalRequest previewRunEvalRequest = new PreviewRunEvalRequest(); // PreviewRunEvalRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsPreviewRunEvalCreateWithHttpInfo(datasetId, previewRunEvalRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsPreviewRunEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **previewRunEvalRequest** | [**PreviewRunEvalRequest**](PreviewRunEvalRequest.md)| | | + +### Return type + +ApiResponse<[**EvalPreviewResponse**](EvalPreviewResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsPreviewRunPromptColumnCreate + +> RunPromptColumnPreviewResponse modelHubDevelopsPreviewRunPromptColumnCreate(previewRunPrompt) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PreviewRunPrompt previewRunPrompt = new PreviewRunPrompt(); // PreviewRunPrompt | + try { + RunPromptColumnPreviewResponse result = apiInstance.modelHubDevelopsPreviewRunPromptColumnCreate(previewRunPrompt); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsPreviewRunPromptColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **previewRunPrompt** | [**PreviewRunPrompt**](PreviewRunPrompt.md)| | | + +### Return type + +[**RunPromptColumnPreviewResponse**](RunPromptColumnPreviewResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo + +> ApiResponse modelHubDevelopsPreviewRunPromptColumnCreate modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo(previewRunPrompt) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PreviewRunPrompt previewRunPrompt = new PreviewRunPrompt(); // PreviewRunPrompt | + try { + ApiResponse response = apiInstance.modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo(previewRunPrompt); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsPreviewRunPromptColumnCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **previewRunPrompt** | [**PreviewRunPrompt**](PreviewRunPrompt.md)| | | + +### Return type + +ApiResponse<[**RunPromptColumnPreviewResponse**](RunPromptColumnPreviewResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsProviderStatusList + +> ProviderStatusResponse modelHubDevelopsProviderStatusList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ProviderStatusResponse result = apiInstance.modelHubDevelopsProviderStatusList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsProviderStatusList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ProviderStatusResponse**](ProviderStatusResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsProviderStatusListWithHttpInfo + +> ApiResponse modelHubDevelopsProviderStatusList modelHubDevelopsProviderStatusListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubDevelopsProviderStatusListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsProviderStatusList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**ProviderStatusResponse**](ProviderStatusResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsRetrieveRunPromptColumnConfigList + +> RunPromptColumnConfigResponse modelHubDevelopsRetrieveRunPromptColumnConfigList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + RunPromptColumnConfigResponse result = apiInstance.modelHubDevelopsRetrieveRunPromptColumnConfigList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsRetrieveRunPromptColumnConfigList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**RunPromptColumnConfigResponse**](RunPromptColumnConfigResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo + +> ApiResponse modelHubDevelopsRetrieveRunPromptColumnConfigList modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsRetrieveRunPromptColumnConfigList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**RunPromptColumnConfigResponse**](RunPromptColumnConfigResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsRetrieveRunPromptOptionsList + +> RunPromptOptionsResponse modelHubDevelopsRetrieveRunPromptOptionsList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + RunPromptOptionsResponse result = apiInstance.modelHubDevelopsRetrieveRunPromptOptionsList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsRetrieveRunPromptOptionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**RunPromptOptionsResponse**](RunPromptOptionsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo + +> ApiResponse modelHubDevelopsRetrieveRunPromptOptionsList modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsRetrieveRunPromptOptionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**RunPromptOptionsResponse**](RunPromptOptionsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsStartEvalsProcessCreate + +> DevelopDatasetMessageResponse modelHubDevelopsStartEvalsProcessCreate(datasetId, startEvalsProcessRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + StartEvalsProcessRequest startEvalsProcessRequest = new StartEvalsProcessRequest(); // StartEvalsProcessRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsStartEvalsProcessCreate(datasetId, startEvalsProcessRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsStartEvalsProcessCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **startEvalsProcessRequest** | [**StartEvalsProcessRequest**](StartEvalsProcessRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsStartEvalsProcessCreateWithHttpInfo + +> ApiResponse modelHubDevelopsStartEvalsProcessCreate modelHubDevelopsStartEvalsProcessCreateWithHttpInfo(datasetId, startEvalsProcessRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + StartEvalsProcessRequest startEvalsProcessRequest = new StartEvalsProcessRequest(); // StartEvalsProcessRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsStartEvalsProcessCreateWithHttpInfo(datasetId, startEvalsProcessRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsStartEvalsProcessCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **startEvalsProcessRequest** | [**StartEvalsProcessRequest**](StartEvalsProcessRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsStopUserEvalCreate + +> DevelopDatasetMessageResponse modelHubDevelopsStopUserEvalCreate(datasetId, evalId, stopUserEvalRequest) + +POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. + +Accepts optional experiment_id in the body. When present, the eval is looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) and cells are updated across both base columns (source_id=eval_id) and per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + StopUserEvalRequest stopUserEvalRequest = new StopUserEvalRequest(); // StopUserEvalRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsStopUserEvalCreate(datasetId, evalId, stopUserEvalRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsStopUserEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | +| **stopUserEvalRequest** | [**StopUserEvalRequest**](StopUserEvalRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsStopUserEvalCreateWithHttpInfo + +> ApiResponse modelHubDevelopsStopUserEvalCreate modelHubDevelopsStopUserEvalCreateWithHttpInfo(datasetId, evalId, stopUserEvalRequest) + +POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. + +Accepts optional experiment_id in the body. When present, the eval is looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) and cells are updated across both base columns (source_id=eval_id) and per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String evalId = "evalId_example"; // String | + StopUserEvalRequest stopUserEvalRequest = new StopUserEvalRequest(); // StopUserEvalRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsStopUserEvalCreateWithHttpInfo(datasetId, evalId, stopUserEvalRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsStopUserEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **evalId** | **String**| | | +| **stopUserEvalRequest** | [**StopUserEvalRequest**](StopUserEvalRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsSyntheticConfigList + +> SyntheticDatasetConfigResponse modelHubDevelopsSyntheticConfigList(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + SyntheticDatasetConfigResponse result = apiInstance.modelHubDevelopsSyntheticConfigList(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsSyntheticConfigList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**SyntheticDatasetConfigResponse**](SyntheticDatasetConfigResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsSyntheticConfigListWithHttpInfo + +> ApiResponse modelHubDevelopsSyntheticConfigList modelHubDevelopsSyntheticConfigListWithHttpInfo(datasetId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubDevelopsSyntheticConfigListWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsSyntheticConfigList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**SyntheticDatasetConfigResponse**](SyntheticDatasetConfigResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsUpdateColumnNameUpdate + +> DevelopDatasetMessageResponse modelHubDevelopsUpdateColumnNameUpdate(datasetId, columnId, datasetUpdateColumnNameRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String columnId = "columnId_example"; // String | + DatasetUpdateColumnNameRequest datasetUpdateColumnNameRequest = new DatasetUpdateColumnNameRequest(); // DatasetUpdateColumnNameRequest | + try { + DevelopDatasetMessageResponse result = apiInstance.modelHubDevelopsUpdateColumnNameUpdate(datasetId, columnId, datasetUpdateColumnNameRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsUpdateColumnNameUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **columnId** | **String**| | | +| **datasetUpdateColumnNameRequest** | [**DatasetUpdateColumnNameRequest**](DatasetUpdateColumnNameRequest.md)| | | + +### Return type + +[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo + +> ApiResponse modelHubDevelopsUpdateColumnNameUpdate modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo(datasetId, columnId, datasetUpdateColumnNameRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String columnId = "columnId_example"; // String | + DatasetUpdateColumnNameRequest datasetUpdateColumnNameRequest = new DatasetUpdateColumnNameRequest(); // DatasetUpdateColumnNameRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo(datasetId, columnId, datasetUpdateColumnNameRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsUpdateColumnNameUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **columnId** | **String**| | | +| **datasetUpdateColumnNameRequest** | [**DatasetUpdateColumnNameRequest**](DatasetUpdateColumnNameRequest.md)| | | + +### Return type + +ApiResponse<[**DevelopDatasetMessageResponse**](DevelopDatasetMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsUpdateColumnTypeUpdate + +> ColumnTypeConversionResponse modelHubDevelopsUpdateColumnTypeUpdate(datasetId, columnId, datasetUpdateColumnTypeRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String columnId = "columnId_example"; // String | + DatasetUpdateColumnTypeRequest datasetUpdateColumnTypeRequest = new DatasetUpdateColumnTypeRequest(); // DatasetUpdateColumnTypeRequest | + try { + ColumnTypeConversionResponse result = apiInstance.modelHubDevelopsUpdateColumnTypeUpdate(datasetId, columnId, datasetUpdateColumnTypeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsUpdateColumnTypeUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **columnId** | **String**| | | +| **datasetUpdateColumnTypeRequest** | [**DatasetUpdateColumnTypeRequest**](DatasetUpdateColumnTypeRequest.md)| | | + +### Return type + +[**ColumnTypeConversionResponse**](ColumnTypeConversionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo + +> ApiResponse modelHubDevelopsUpdateColumnTypeUpdate modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo(datasetId, columnId, datasetUpdateColumnTypeRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + String columnId = "columnId_example"; // String | + DatasetUpdateColumnTypeRequest datasetUpdateColumnTypeRequest = new DatasetUpdateColumnTypeRequest(); // DatasetUpdateColumnTypeRequest | + try { + ApiResponse response = apiInstance.modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo(datasetId, columnId, datasetUpdateColumnTypeRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsUpdateColumnTypeUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **columnId** | **String**| | | +| **datasetUpdateColumnTypeRequest** | [**DatasetUpdateColumnTypeRequest**](DatasetUpdateColumnTypeRequest.md)| | | + +### Return type + +ApiResponse<[**ColumnTypeConversionResponse**](ColumnTypeConversionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubDevelopsUpdateSyntheticConfigUpdate + +> SyntheticDatasetUpdateResponse modelHubDevelopsUpdateSyntheticConfigUpdate(datasetId, syntheticDatasetConfig) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + SyntheticDatasetConfig syntheticDatasetConfig = new SyntheticDatasetConfig(); // SyntheticDatasetConfig | + try { + SyntheticDatasetUpdateResponse result = apiInstance.modelHubDevelopsUpdateSyntheticConfigUpdate(datasetId, syntheticDatasetConfig); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsUpdateSyntheticConfigUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **syntheticDatasetConfig** | [**SyntheticDatasetConfig**](SyntheticDatasetConfig.md)| | | + +### Return type + +[**SyntheticDatasetUpdateResponse**](SyntheticDatasetUpdateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo + +> ApiResponse modelHubDevelopsUpdateSyntheticConfigUpdate modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo(datasetId, syntheticDatasetConfig) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + SyntheticDatasetConfig syntheticDatasetConfig = new SyntheticDatasetConfig(); // SyntheticDatasetConfig | + try { + ApiResponse response = apiInstance.modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo(datasetId, syntheticDatasetConfig); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubDevelopsUpdateSyntheticConfigUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | +| **syntheticDatasetConfig** | [**SyntheticDatasetConfig**](SyntheticDatasetConfig.md)| | | + +### Return type + +ApiResponse<[**SyntheticDatasetUpdateResponse**](SyntheticDatasetUpdateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesBulkDeleteCreate + +> EvalTemplateBulkDeleteResponse modelHubEvalTemplatesBulkDeleteCreate(evalTemplateBulkDeleteRequest) + +POST /model-hub/eval-templates/bulk-delete/ + +Soft-delete multiple eval templates. Only user-owned templates can be deleted. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalTemplateBulkDeleteRequest evalTemplateBulkDeleteRequest = new EvalTemplateBulkDeleteRequest(); // EvalTemplateBulkDeleteRequest | + try { + EvalTemplateBulkDeleteResponse result = apiInstance.modelHubEvalTemplatesBulkDeleteCreate(evalTemplateBulkDeleteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesBulkDeleteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalTemplateBulkDeleteRequest** | [**EvalTemplateBulkDeleteRequest**](EvalTemplateBulkDeleteRequest.md)| | | + +### Return type + +[**EvalTemplateBulkDeleteResponse**](EvalTemplateBulkDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesBulkDeleteCreate modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo(evalTemplateBulkDeleteRequest) + +POST /model-hub/eval-templates/bulk-delete/ + +Soft-delete multiple eval templates. Only user-owned templates can be deleted. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalTemplateBulkDeleteRequest evalTemplateBulkDeleteRequest = new EvalTemplateBulkDeleteRequest(); // EvalTemplateBulkDeleteRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo(evalTemplateBulkDeleteRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesBulkDeleteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalTemplateBulkDeleteRequest** | [**EvalTemplateBulkDeleteRequest**](EvalTemplateBulkDeleteRequest.md)| | | + +### Return type + +ApiResponse<[**EvalTemplateBulkDeleteResponse**](EvalTemplateBulkDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesCompositeExecuteAdhocCreate + +> CompositeEvalExecuteResponse modelHubEvalTemplatesCompositeExecuteAdhocCreate(compositeEvalAdhocExecuteRequest) + +POST /model-hub/eval-templates/composite/execute-adhoc/ + +Execute a composite eval configuration without persisting it. Used by the eval create page so users can test a composite (selected children + aggregation settings) before clicking Save. Builds an unsaved parent template and unsaved child links in memory and reuses `execute_composite_children_sync` so semantics match the persisted path. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CompositeEvalAdhocExecuteRequest compositeEvalAdhocExecuteRequest = new CompositeEvalAdhocExecuteRequest(); // CompositeEvalAdhocExecuteRequest | + try { + CompositeEvalExecuteResponse result = apiInstance.modelHubEvalTemplatesCompositeExecuteAdhocCreate(compositeEvalAdhocExecuteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositeExecuteAdhocCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compositeEvalAdhocExecuteRequest** | [**CompositeEvalAdhocExecuteRequest**](CompositeEvalAdhocExecuteRequest.md)| | | + +### Return type + +[**CompositeEvalExecuteResponse**](CompositeEvalExecuteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesCompositeExecuteAdhocCreate modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo(compositeEvalAdhocExecuteRequest) + +POST /model-hub/eval-templates/composite/execute-adhoc/ + +Execute a composite eval configuration without persisting it. Used by the eval create page so users can test a composite (selected children + aggregation settings) before clicking Save. Builds an unsaved parent template and unsaved child links in memory and reuses `execute_composite_children_sync` so semantics match the persisted path. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CompositeEvalAdhocExecuteRequest compositeEvalAdhocExecuteRequest = new CompositeEvalAdhocExecuteRequest(); // CompositeEvalAdhocExecuteRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo(compositeEvalAdhocExecuteRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositeExecuteAdhocCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compositeEvalAdhocExecuteRequest** | [**CompositeEvalAdhocExecuteRequest**](CompositeEvalAdhocExecuteRequest.md)| | | + +### Return type + +ApiResponse<[**CompositeEvalExecuteResponse**](CompositeEvalExecuteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesCompositeExecuteCreate + +> CompositeEvalExecuteResponse modelHubEvalTemplatesCompositeExecuteCreate(templateId, compositeEvalExecuteRequest) + +POST /model-hub/eval-templates/<template_id>/composite/execute/ + +Execute all child evals in a composite and optionally aggregate results. Thin wrapper around `execute_composite_children_sync` — the same helper the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation semantics stay consistent across surfaces. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + CompositeEvalExecuteRequest compositeEvalExecuteRequest = new CompositeEvalExecuteRequest(); // CompositeEvalExecuteRequest | + try { + CompositeEvalExecuteResponse result = apiInstance.modelHubEvalTemplatesCompositeExecuteCreate(templateId, compositeEvalExecuteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositeExecuteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **compositeEvalExecuteRequest** | [**CompositeEvalExecuteRequest**](CompositeEvalExecuteRequest.md)| | | + +### Return type + +[**CompositeEvalExecuteResponse**](CompositeEvalExecuteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesCompositeExecuteCreate modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo(templateId, compositeEvalExecuteRequest) + +POST /model-hub/eval-templates/<template_id>/composite/execute/ + +Execute all child evals in a composite and optionally aggregate results. Thin wrapper around `execute_composite_children_sync` — the same helper the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation semantics stay consistent across surfaces. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + CompositeEvalExecuteRequest compositeEvalExecuteRequest = new CompositeEvalExecuteRequest(); // CompositeEvalExecuteRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo(templateId, compositeEvalExecuteRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositeExecuteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **compositeEvalExecuteRequest** | [**CompositeEvalExecuteRequest**](CompositeEvalExecuteRequest.md)| | | + +### Return type + +ApiResponse<[**CompositeEvalExecuteResponse**](CompositeEvalExecuteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesCompositeList + +> CompositeEvalDetailResponse modelHubEvalTemplatesCompositeList(templateId) + +GET /model-hub/eval-templates/<id>/composite/ + +Get composite eval detail with its children. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + CompositeEvalDetailResponse result = apiInstance.modelHubEvalTemplatesCompositeList(templateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositeList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +[**CompositeEvalDetailResponse**](CompositeEvalDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesCompositeListWithHttpInfo + +> ApiResponse modelHubEvalTemplatesCompositeList modelHubEvalTemplatesCompositeListWithHttpInfo(templateId) + +GET /model-hub/eval-templates/<id>/composite/ + +Get composite eval detail with its children. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesCompositeListWithHttpInfo(templateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositeList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +ApiResponse<[**CompositeEvalDetailResponse**](CompositeEvalDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesCompositePartialUpdate + +> CompositeEvalDetailResponse modelHubEvalTemplatesCompositePartialUpdate(templateId, compositeEvalUpdateRequest) + +PATCH — partial update of a composite eval. + +Supported fields (all optional): name, description, tags, aggregation_enabled, aggregation_function, child_template_ids (replaces the child list), child_weights (map of child_id -> weight). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + CompositeEvalUpdateRequest compositeEvalUpdateRequest = new CompositeEvalUpdateRequest(); // CompositeEvalUpdateRequest | + try { + CompositeEvalDetailResponse result = apiInstance.modelHubEvalTemplatesCompositePartialUpdate(templateId, compositeEvalUpdateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositePartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **compositeEvalUpdateRequest** | [**CompositeEvalUpdateRequest**](CompositeEvalUpdateRequest.md)| | | + +### Return type + +[**CompositeEvalDetailResponse**](CompositeEvalDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesCompositePartialUpdate modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo(templateId, compositeEvalUpdateRequest) + +PATCH — partial update of a composite eval. + +Supported fields (all optional): name, description, tags, aggregation_enabled, aggregation_function, child_template_ids (replaces the child list), child_weights (map of child_id -> weight). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + CompositeEvalUpdateRequest compositeEvalUpdateRequest = new CompositeEvalUpdateRequest(); // CompositeEvalUpdateRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo(templateId, compositeEvalUpdateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCompositePartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **compositeEvalUpdateRequest** | [**CompositeEvalUpdateRequest**](CompositeEvalUpdateRequest.md)| | | + +### Return type + +ApiResponse<[**CompositeEvalDetailResponse**](CompositeEvalDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesCreateCompositeCreate + +> CompositeEvalCreateResponse modelHubEvalTemplatesCreateCompositeCreate(compositeEvalCreateRequest) + +POST /model-hub/eval-templates/create-composite/ + +Create a composite eval from a list of existing eval template IDs. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CompositeEvalCreateRequest compositeEvalCreateRequest = new CompositeEvalCreateRequest(); // CompositeEvalCreateRequest | + try { + CompositeEvalCreateResponse result = apiInstance.modelHubEvalTemplatesCreateCompositeCreate(compositeEvalCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCreateCompositeCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compositeEvalCreateRequest** | [**CompositeEvalCreateRequest**](CompositeEvalCreateRequest.md)| | | + +### Return type + +[**CompositeEvalCreateResponse**](CompositeEvalCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesCreateCompositeCreate modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo(compositeEvalCreateRequest) + +POST /model-hub/eval-templates/create-composite/ + +Create a composite eval from a list of existing eval template IDs. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CompositeEvalCreateRequest compositeEvalCreateRequest = new CompositeEvalCreateRequest(); // CompositeEvalCreateRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo(compositeEvalCreateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCreateCompositeCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **compositeEvalCreateRequest** | [**CompositeEvalCreateRequest**](CompositeEvalCreateRequest.md)| | | + +### Return type + +ApiResponse<[**CompositeEvalCreateResponse**](CompositeEvalCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesCreateV2Create + +> EvalTemplateCreateResponse modelHubEvalTemplatesCreateV2Create(evalTemplateCreateV2Request) + +POST /model-hub/eval-templates/create-v2/ + +Create a single eval template with the revamped schema. Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalTemplateCreateV2Request evalTemplateCreateV2Request = new EvalTemplateCreateV2Request(); // EvalTemplateCreateV2Request | + try { + EvalTemplateCreateResponse result = apiInstance.modelHubEvalTemplatesCreateV2Create(evalTemplateCreateV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCreateV2Create"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalTemplateCreateV2Request** | [**EvalTemplateCreateV2Request**](EvalTemplateCreateV2Request.md)| | | + +### Return type + +[**EvalTemplateCreateResponse**](EvalTemplateCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesCreateV2CreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesCreateV2Create modelHubEvalTemplatesCreateV2CreateWithHttpInfo(evalTemplateCreateV2Request) + +POST /model-hub/eval-templates/create-v2/ + +Create a single eval template with the revamped schema. Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalTemplateCreateV2Request evalTemplateCreateV2Request = new EvalTemplateCreateV2Request(); // EvalTemplateCreateV2Request | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesCreateV2CreateWithHttpInfo(evalTemplateCreateV2Request); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesCreateV2Create"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalTemplateCreateV2Request** | [**EvalTemplateCreateV2Request**](EvalTemplateCreateV2Request.md)| | | + +### Return type + +ApiResponse<[**EvalTemplateCreateResponse**](EvalTemplateCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesDetailList + +> EvalTemplateDetailResponse modelHubEvalTemplatesDetailList(templateId) + +GET /model-hub/eval-templates/<id>/detail/ + +Fetch a single eval template with all revamped fields. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + EvalTemplateDetailResponse result = apiInstance.modelHubEvalTemplatesDetailList(templateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesDetailList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +[**EvalTemplateDetailResponse**](EvalTemplateDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesDetailListWithHttpInfo + +> ApiResponse modelHubEvalTemplatesDetailList modelHubEvalTemplatesDetailListWithHttpInfo(templateId) + +GET /model-hub/eval-templates/<id>/detail/ + +Fetch a single eval template with all revamped fields. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesDetailListWithHttpInfo(templateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesDetailList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +ApiResponse<[**EvalTemplateDetailResponse**](EvalTemplateDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesFeedbackListList + +> EvalFeedbackListResponse modelHubEvalTemplatesFeedbackListList(templateId) + +GET /model-hub/eval-templates/<id>/feedback-list/ + +Paginated feedback list with user info. Query params: page (0-based), page_size + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + EvalFeedbackListResponse result = apiInstance.modelHubEvalTemplatesFeedbackListList(templateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesFeedbackListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +[**EvalFeedbackListResponse**](EvalFeedbackListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesFeedbackListListWithHttpInfo + +> ApiResponse modelHubEvalTemplatesFeedbackListList modelHubEvalTemplatesFeedbackListListWithHttpInfo(templateId) + +GET /model-hub/eval-templates/<id>/feedback-list/ + +Paginated feedback list with user info. Query params: page (0-based), page_size + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesFeedbackListListWithHttpInfo(templateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesFeedbackListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +ApiResponse<[**EvalFeedbackListResponse**](EvalFeedbackListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesGroundTruthConfigList + +> GroundTruthConfigResponse modelHubEvalTemplatesGroundTruthConfigList(templateId) + +GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + +Manages ground truth configuration on the eval template's config JSONField. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + GroundTruthConfigResponse result = apiInstance.modelHubEvalTemplatesGroundTruthConfigList(templateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthConfigList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +[**GroundTruthConfigResponse**](GroundTruthConfigResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo + +> ApiResponse modelHubEvalTemplatesGroundTruthConfigList modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo(templateId) + +GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + +Manages ground truth configuration on the eval template's config JSONField. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo(templateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthConfigList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +ApiResponse<[**GroundTruthConfigResponse**](GroundTruthConfigResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesGroundTruthConfigUpdate + +> GroundTruthConfigResponse modelHubEvalTemplatesGroundTruthConfigUpdate(templateId, groundTruthConfigRequest) + +GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + +Manages ground truth configuration on the eval template's config JSONField. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + GroundTruthConfigRequest groundTruthConfigRequest = new GroundTruthConfigRequest(); // GroundTruthConfigRequest | + try { + GroundTruthConfigResponse result = apiInstance.modelHubEvalTemplatesGroundTruthConfigUpdate(templateId, groundTruthConfigRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthConfigUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **groundTruthConfigRequest** | [**GroundTruthConfigRequest**](GroundTruthConfigRequest.md)| | | + +### Return type + +[**GroundTruthConfigResponse**](GroundTruthConfigResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesGroundTruthConfigUpdate modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo(templateId, groundTruthConfigRequest) + +GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + +Manages ground truth configuration on the eval template's config JSONField. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + GroundTruthConfigRequest groundTruthConfigRequest = new GroundTruthConfigRequest(); // GroundTruthConfigRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo(templateId, groundTruthConfigRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthConfigUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **groundTruthConfigRequest** | [**GroundTruthConfigRequest**](GroundTruthConfigRequest.md)| | | + +### Return type + +ApiResponse<[**GroundTruthConfigResponse**](GroundTruthConfigResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesGroundTruthList + +> GroundTruthListResponse modelHubEvalTemplatesGroundTruthList(templateId) + + + +GET /model-hub/eval-templates/<id>/ground-truth/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + GroundTruthListResponse result = apiInstance.modelHubEvalTemplatesGroundTruthList(templateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +[**GroundTruthListResponse**](GroundTruthListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesGroundTruthListWithHttpInfo + +> ApiResponse modelHubEvalTemplatesGroundTruthList modelHubEvalTemplatesGroundTruthListWithHttpInfo(templateId) + + + +GET /model-hub/eval-templates/<id>/ground-truth/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesGroundTruthListWithHttpInfo(templateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +ApiResponse<[**GroundTruthListResponse**](GroundTruthListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesGroundTruthUploadCreate + +> GroundTruthUploadResponse modelHubEvalTemplatesGroundTruthUploadCreate(templateId, groundTruthUploadRequest) + +POST /model-hub/eval-templates/<id>/ground-truth/upload/ + +Supports two modes: 1. JSON body: { name, columns, data, ... } 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + GroundTruthUploadRequest groundTruthUploadRequest = new GroundTruthUploadRequest(); // GroundTruthUploadRequest | + try { + GroundTruthUploadResponse result = apiInstance.modelHubEvalTemplatesGroundTruthUploadCreate(templateId, groundTruthUploadRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthUploadCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **groundTruthUploadRequest** | [**GroundTruthUploadRequest**](GroundTruthUploadRequest.md)| | | + +### Return type + +[**GroundTruthUploadResponse**](GroundTruthUploadResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesGroundTruthUploadCreate modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo(templateId, groundTruthUploadRequest) + +POST /model-hub/eval-templates/<id>/ground-truth/upload/ + +Supports two modes: 1. JSON body: { name, columns, data, ... } 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + GroundTruthUploadRequest groundTruthUploadRequest = new GroundTruthUploadRequest(); // GroundTruthUploadRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo(templateId, groundTruthUploadRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesGroundTruthUploadCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **groundTruthUploadRequest** | [**GroundTruthUploadRequest**](GroundTruthUploadRequest.md)| | | + +### Return type + +ApiResponse<[**GroundTruthUploadResponse**](GroundTruthUploadResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesListChartsCreate + +> EvalTemplateListChartsResponse modelHubEvalTemplatesListChartsCreate(evalTemplateListChartsRequest) + +POST /model-hub/eval-templates/list-charts/ + +Returns 30-day chart data (run counts + error rates) for a list of template IDs. Uses ClickHouse for fast analytics. Called separately from the list API so the table renders instantly while charts load async. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalTemplateListChartsRequest evalTemplateListChartsRequest = new EvalTemplateListChartsRequest(); // EvalTemplateListChartsRequest | + try { + EvalTemplateListChartsResponse result = apiInstance.modelHubEvalTemplatesListChartsCreate(evalTemplateListChartsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesListChartsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalTemplateListChartsRequest** | [**EvalTemplateListChartsRequest**](EvalTemplateListChartsRequest.md)| | | + +### Return type + +[**EvalTemplateListChartsResponse**](EvalTemplateListChartsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesListChartsCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesListChartsCreate modelHubEvalTemplatesListChartsCreateWithHttpInfo(evalTemplateListChartsRequest) + +POST /model-hub/eval-templates/list-charts/ + +Returns 30-day chart data (run counts + error rates) for a list of template IDs. Uses ClickHouse for fast analytics. Called separately from the list API so the table renders instantly while charts load async. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalTemplateListChartsRequest evalTemplateListChartsRequest = new EvalTemplateListChartsRequest(); // EvalTemplateListChartsRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesListChartsCreateWithHttpInfo(evalTemplateListChartsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesListChartsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalTemplateListChartsRequest** | [**EvalTemplateListChartsRequest**](EvalTemplateListChartsRequest.md)| | | + +### Return type + +ApiResponse<[**EvalTemplateListChartsResponse**](EvalTemplateListChartsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesListCreate + +> EvalTemplateListResponse modelHubEvalTemplatesListCreate(evalListRequest) + +POST /model-hub/eval-templates/list/ + +Returns paginated eval template list with filtering, search, and 30-day metrics. All inputs and outputs are validated with Pydantic schemas. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalListRequest evalListRequest = new EvalListRequest(); // EvalListRequest | + try { + EvalTemplateListResponse result = apiInstance.modelHubEvalTemplatesListCreate(evalListRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesListCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalListRequest** | [**EvalListRequest**](EvalListRequest.md)| | | + +### Return type + +[**EvalTemplateListResponse**](EvalTemplateListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesListCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesListCreate modelHubEvalTemplatesListCreateWithHttpInfo(evalListRequest) + +POST /model-hub/eval-templates/list/ + +Returns paginated eval template list with filtering, search, and 30-day metrics. All inputs and outputs are validated with Pydantic schemas. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + EvalListRequest evalListRequest = new EvalListRequest(); // EvalListRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesListCreateWithHttpInfo(evalListRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesListCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalListRequest** | [**EvalListRequest**](EvalListRequest.md)| | | + +### Return type + +ApiResponse<[**EvalTemplateListResponse**](EvalTemplateListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesUpdateUpdate + +> EvalTemplateUpdateResponse modelHubEvalTemplatesUpdateUpdate(templateId, evalTemplateUpdateV2Request) + +PUT /model-hub/eval-templates/<id>/update/ + +Update an eval template. Only user-owned templates can be updated. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + EvalTemplateUpdateV2Request evalTemplateUpdateV2Request = new EvalTemplateUpdateV2Request(); // EvalTemplateUpdateV2Request | + try { + EvalTemplateUpdateResponse result = apiInstance.modelHubEvalTemplatesUpdateUpdate(templateId, evalTemplateUpdateV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesUpdateUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **evalTemplateUpdateV2Request** | [**EvalTemplateUpdateV2Request**](EvalTemplateUpdateV2Request.md)| | | + +### Return type + +[**EvalTemplateUpdateResponse**](EvalTemplateUpdateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesUpdateUpdateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesUpdateUpdate modelHubEvalTemplatesUpdateUpdateWithHttpInfo(templateId, evalTemplateUpdateV2Request) + +PUT /model-hub/eval-templates/<id>/update/ + +Update an eval template. Only user-owned templates can be updated. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + EvalTemplateUpdateV2Request evalTemplateUpdateV2Request = new EvalTemplateUpdateV2Request(); // EvalTemplateUpdateV2Request | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesUpdateUpdateWithHttpInfo(templateId, evalTemplateUpdateV2Request); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesUpdateUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **evalTemplateUpdateV2Request** | [**EvalTemplateUpdateV2Request**](EvalTemplateUpdateV2Request.md)| | | + +### Return type + +ApiResponse<[**EvalTemplateUpdateResponse**](EvalTemplateUpdateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesUsageList + +> EvalUsageStatsResponse modelHubEvalTemplatesUsageList(templateId) + +GET /model-hub/eval-templates/<id>/usage/ + +Returns usage stats, chart data, and paginated eval logs. Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + EvalUsageStatsResponse result = apiInstance.modelHubEvalTemplatesUsageList(templateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesUsageList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +[**EvalUsageStatsResponse**](EvalUsageStatsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesUsageListWithHttpInfo + +> ApiResponse modelHubEvalTemplatesUsageList modelHubEvalTemplatesUsageListWithHttpInfo(templateId) + +GET /model-hub/eval-templates/<id>/usage/ + +Returns usage stats, chart data, and paginated eval logs. Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesUsageListWithHttpInfo(templateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesUsageList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +ApiResponse<[**EvalUsageStatsResponse**](EvalUsageStatsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesVersionsCreateCreate + +> EvalTemplateVersionResponse modelHubEvalTemplatesVersionsCreateCreate(templateId, evalTemplateVersionCreateRequest) + +POST /model-hub/eval-templates/<id>/versions/create/ + +Create a new version snapshot from the current template state. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + EvalTemplateVersionCreateRequest evalTemplateVersionCreateRequest = new EvalTemplateVersionCreateRequest(); // EvalTemplateVersionCreateRequest | + try { + EvalTemplateVersionResponse result = apiInstance.modelHubEvalTemplatesVersionsCreateCreate(templateId, evalTemplateVersionCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsCreateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **evalTemplateVersionCreateRequest** | [**EvalTemplateVersionCreateRequest**](EvalTemplateVersionCreateRequest.md)| | | + +### Return type + +[**EvalTemplateVersionResponse**](EvalTemplateVersionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesVersionsCreateCreate modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo(templateId, evalTemplateVersionCreateRequest) + +POST /model-hub/eval-templates/<id>/versions/create/ + +Create a new version snapshot from the current template state. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + EvalTemplateVersionCreateRequest evalTemplateVersionCreateRequest = new EvalTemplateVersionCreateRequest(); // EvalTemplateVersionCreateRequest | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo(templateId, evalTemplateVersionCreateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsCreateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **evalTemplateVersionCreateRequest** | [**EvalTemplateVersionCreateRequest**](EvalTemplateVersionCreateRequest.md)| | | + +### Return type + +ApiResponse<[**EvalTemplateVersionResponse**](EvalTemplateVersionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesVersionsList + +> EvalTemplateVersionListResponse modelHubEvalTemplatesVersionsList(templateId) + +GET /model-hub/eval-templates/<id>/versions/ + +List all versions for an eval template. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + EvalTemplateVersionListResponse result = apiInstance.modelHubEvalTemplatesVersionsList(templateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +[**EvalTemplateVersionListResponse**](EvalTemplateVersionListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesVersionsListWithHttpInfo + +> ApiResponse modelHubEvalTemplatesVersionsList modelHubEvalTemplatesVersionsListWithHttpInfo(templateId) + +GET /model-hub/eval-templates/<id>/versions/ + +List all versions for an eval template. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesVersionsListWithHttpInfo(templateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | + +### Return type + +ApiResponse<[**EvalTemplateVersionListResponse**](EvalTemplateVersionListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesVersionsRestoreCreate + +> EvalTemplateVersionRestoreResponse modelHubEvalTemplatesVersionsRestoreCreate(templateId, versionId, body) + +POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ + +Restore a version by creating a new version with the old version's config. Does NOT modify the old version — creates a new one on top. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + EvalTemplateVersionRestoreResponse result = apiInstance.modelHubEvalTemplatesVersionsRestoreCreate(templateId, versionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsRestoreCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**EvalTemplateVersionRestoreResponse**](EvalTemplateVersionRestoreResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesVersionsRestoreCreate modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo(templateId, versionId, body) + +POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ + +Restore a version by creating a new version with the old version's config. Does NOT modify the old version — creates a new one on top. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo(templateId, versionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsRestoreCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**EvalTemplateVersionRestoreResponse**](EvalTemplateVersionRestoreResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubEvalTemplatesVersionsSetDefaultUpdate + +> EvalTemplateVersionResponse modelHubEvalTemplatesVersionsSetDefaultUpdate(templateId, versionId, body) + +PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ + +Set a specific version as the default (active) version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + EvalTemplateVersionResponse result = apiInstance.modelHubEvalTemplatesVersionsSetDefaultUpdate(templateId, versionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsSetDefaultUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**EvalTemplateVersionResponse**](EvalTemplateVersionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo + +> ApiResponse modelHubEvalTemplatesVersionsSetDefaultUpdate modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo(templateId, versionId, body) + +PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ + +Set a specific version as the default (active) version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo(templateId, versionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubEvalTemplatesVersionsSetDefaultUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**EvalTemplateVersionResponse**](EvalTemplateVersionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2DerivedVariablesList + +> ExperimentDerivedVariablesResponse modelHubExperimentsV2DerivedVariablesList(experimentId) + + + +Get derived variables from run prompt columns in an experiment's snapshot dataset. Delegates to the existing get_dataset_derived_variables() service function. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentDerivedVariablesResponse result = apiInstance.modelHubExperimentsV2DerivedVariablesList(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2DerivedVariablesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentDerivedVariablesResponse**](ExperimentDerivedVariablesResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2DerivedVariablesListWithHttpInfo + +> ApiResponse modelHubExperimentsV2DerivedVariablesList modelHubExperimentsV2DerivedVariablesListWithHttpInfo(experimentId) + + + +Get derived variables from run prompt columns in an experiment's snapshot dataset. Delegates to the existing get_dataset_derived_variables() service function. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2DerivedVariablesListWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2DerivedVariablesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentDerivedVariablesResponse**](ExperimentDerivedVariablesResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2EvaluationsStatsList + +> ExperimentEvaluationStatsResponse modelHubExperimentsV2EvaluationsStatsList(experimentId, evaluationId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + String evaluationId = "evaluationId_example"; // String | + try { + ExperimentEvaluationStatsResponse result = apiInstance.modelHubExperimentsV2EvaluationsStatsList(experimentId, evaluationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2EvaluationsStatsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **evaluationId** | **String**| | | + +### Return type + +[**ExperimentEvaluationStatsResponse**](ExperimentEvaluationStatsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2EvaluationsStatsListWithHttpInfo + +> ApiResponse modelHubExperimentsV2EvaluationsStatsList modelHubExperimentsV2EvaluationsStatsListWithHttpInfo(experimentId, evaluationId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + String evaluationId = "evaluationId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2EvaluationsStatsListWithHttpInfo(experimentId, evaluationId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2EvaluationsStatsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **evaluationId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentEvaluationStatsResponse**](ExperimentEvaluationStatsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2FeedbackCreate + +> ExperimentFeedbackCreateResponse modelHubExperimentsV2FeedbackCreate(experimentId, feedback) + + + +Create a feedback record scoped to an experiment. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + Feedback feedback = new Feedback(); // Feedback | + try { + ExperimentFeedbackCreateResponse result = apiInstance.modelHubExperimentsV2FeedbackCreate(experimentId, feedback); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **feedback** | [**Feedback**](Feedback.md)| | | + +### Return type + +[**ExperimentFeedbackCreateResponse**](ExperimentFeedbackCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2FeedbackCreateWithHttpInfo + +> ApiResponse modelHubExperimentsV2FeedbackCreate modelHubExperimentsV2FeedbackCreateWithHttpInfo(experimentId, feedback) + + + +Create a feedback record scoped to an experiment. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + Feedback feedback = new Feedback(); // Feedback | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2FeedbackCreateWithHttpInfo(experimentId, feedback); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **feedback** | [**Feedback**](Feedback.md)| | | + +### Return type + +ApiResponse<[**ExperimentFeedbackCreateResponse**](ExperimentFeedbackCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2FeedbackGetFeedbackDetailsList + +> ExperimentFeedbackDetailsResponse modelHubExperimentsV2FeedbackGetFeedbackDetailsList(experimentId) + + + +Get previous feedback details for a metric+row in an experiment. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentFeedbackDetailsResponse result = apiInstance.modelHubExperimentsV2FeedbackGetFeedbackDetailsList(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackGetFeedbackDetailsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentFeedbackDetailsResponse**](ExperimentFeedbackDetailsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo + +> ApiResponse modelHubExperimentsV2FeedbackGetFeedbackDetailsList modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo(experimentId) + + + +Get previous feedback details for a metric+row in an experiment. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackGetFeedbackDetailsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentFeedbackDetailsResponse**](ExperimentFeedbackDetailsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2FeedbackGetTemplateList + +> ExperimentFeedbackTemplateResponse modelHubExperimentsV2FeedbackGetTemplateList(experimentId) + + + +Get evaluation template details for rendering the feedback form. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ExperimentFeedbackTemplateResponse result = apiInstance.modelHubExperimentsV2FeedbackGetTemplateList(experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackGetTemplateList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +[**ExperimentFeedbackTemplateResponse**](ExperimentFeedbackTemplateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo + +> ApiResponse modelHubExperimentsV2FeedbackGetTemplateList modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo(experimentId) + + + +Get evaluation template details for rendering the feedback form. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo(experimentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackGetTemplateList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentFeedbackTemplateResponse**](ExperimentFeedbackTemplateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2FeedbackSubmitFeedbackCreate + +> ExperimentFeedbackSubmitResponse modelHubExperimentsV2FeedbackSubmitFeedbackCreate(experimentId, experimentFeedbackSubmitRequest) + + + +Submit feedback action — triggers temporal eval rerun for experiments. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentFeedbackSubmitRequest experimentFeedbackSubmitRequest = new ExperimentFeedbackSubmitRequest(); // ExperimentFeedbackSubmitRequest | + try { + ExperimentFeedbackSubmitResponse result = apiInstance.modelHubExperimentsV2FeedbackSubmitFeedbackCreate(experimentId, experimentFeedbackSubmitRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackSubmitFeedbackCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentFeedbackSubmitRequest** | [**ExperimentFeedbackSubmitRequest**](ExperimentFeedbackSubmitRequest.md)| | | + +### Return type + +[**ExperimentFeedbackSubmitResponse**](ExperimentFeedbackSubmitResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo + +> ApiResponse modelHubExperimentsV2FeedbackSubmitFeedbackCreate modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo(experimentId, experimentFeedbackSubmitRequest) + + + +Submit feedback action — triggers temporal eval rerun for experiments. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentFeedbackSubmitRequest experimentFeedbackSubmitRequest = new ExperimentFeedbackSubmitRequest(); // ExperimentFeedbackSubmitRequest | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo(experimentId, experimentFeedbackSubmitRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2FeedbackSubmitFeedbackCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentFeedbackSubmitRequest** | [**ExperimentFeedbackSubmitRequest**](ExperimentFeedbackSubmitRequest.md)| | | + +### Return type + +ApiResponse<[**ExperimentFeedbackSubmitResponse**](ExperimentFeedbackSubmitResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2RerunCellsCreate + +> ExperimentWorkflowResponse modelHubExperimentsV2RerunCellsCreate(experimentId, experimentRerunCells) + +Rerun specific cells or columns in a V2 experiment. + +Accepts source_ids (EDT IDs for full column rerun) and/or cells ({source_id, row_id} pairs for individual cell rerun). Resets affected output cells and dependent eval cells to RUNNING, then starts a RerunCellsV2Workflow. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentRerunCells experimentRerunCells = new ExperimentRerunCells(); // ExperimentRerunCells | + try { + ExperimentWorkflowResponse result = apiInstance.modelHubExperimentsV2RerunCellsCreate(experimentId, experimentRerunCells); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2RerunCellsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentRerunCells** | [**ExperimentRerunCells**](ExperimentRerunCells.md)| | | + +### Return type + +[**ExperimentWorkflowResponse**](ExperimentWorkflowResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2RerunCellsCreateWithHttpInfo + +> ApiResponse modelHubExperimentsV2RerunCellsCreate modelHubExperimentsV2RerunCellsCreateWithHttpInfo(experimentId, experimentRerunCells) + +Rerun specific cells or columns in a V2 experiment. + +Accepts source_ids (EDT IDs for full column rerun) and/or cells ({source_id, row_id} pairs for individual cell rerun). Resets affected output cells and dependent eval cells to RUNNING, then starts a RerunCellsV2Workflow. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String experimentId = "experimentId_example"; // String | + ExperimentRerunCells experimentRerunCells = new ExperimentRerunCells(); // ExperimentRerunCells | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2RerunCellsCreateWithHttpInfo(experimentId, experimentRerunCells); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2RerunCellsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **experimentId** | **String**| | | +| **experimentRerunCells** | [**ExperimentRerunCells**](ExperimentRerunCells.md)| | | + +### Return type + +ApiResponse<[**ExperimentWorkflowResponse**](ExperimentWorkflowResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2RowDiffCreate + +> ExperimentRowDiffResponse modelHubExperimentsV2RowDiffCreate(datasetRowDiffRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetRowDiffRequest datasetRowDiffRequest = new DatasetRowDiffRequest(); // DatasetRowDiffRequest | + try { + ExperimentRowDiffResponse result = apiInstance.modelHubExperimentsV2RowDiffCreate(datasetRowDiffRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2RowDiffCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetRowDiffRequest** | [**DatasetRowDiffRequest**](DatasetRowDiffRequest.md)| | | + +### Return type + +[**ExperimentRowDiffResponse**](ExperimentRowDiffResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2RowDiffCreateWithHttpInfo + +> ApiResponse modelHubExperimentsV2RowDiffCreate modelHubExperimentsV2RowDiffCreateWithHttpInfo(datasetRowDiffRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DatasetRowDiffRequest datasetRowDiffRequest = new DatasetRowDiffRequest(); // DatasetRowDiffRequest | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2RowDiffCreateWithHttpInfo(datasetRowDiffRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2RowDiffCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetRowDiffRequest** | [**DatasetRowDiffRequest**](DatasetRowDiffRequest.md)| | | + +### Return type + +ApiResponse<[**ExperimentRowDiffResponse**](ExperimentRowDiffResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2SuggestNameRead + +> ExperimentNameSuggestionResponse modelHubExperimentsV2SuggestNameRead(datasetId) + + + +Generate a suggested experiment name for a dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ExperimentNameSuggestionResponse result = apiInstance.modelHubExperimentsV2SuggestNameRead(datasetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2SuggestNameRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +[**ExperimentNameSuggestionResponse**](ExperimentNameSuggestionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2SuggestNameReadWithHttpInfo + +> ApiResponse modelHubExperimentsV2SuggestNameRead modelHubExperimentsV2SuggestNameReadWithHttpInfo(datasetId) + + + +Generate a suggested experiment name for a dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String datasetId = "datasetId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubExperimentsV2SuggestNameReadWithHttpInfo(datasetId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2SuggestNameRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datasetId** | **String**| | | + +### Return type + +ApiResponse<[**ExperimentNameSuggestionResponse**](ExperimentNameSuggestionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubExperimentsV2ValidateNameList + +> ExperimentNameValidationResponse modelHubExperimentsV2ValidateNameList() + + + +Validate that an experiment name is unique within a dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ExperimentNameValidationResponse result = apiInstance.modelHubExperimentsV2ValidateNameList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2ValidateNameList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ExperimentNameValidationResponse**](ExperimentNameValidationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubExperimentsV2ValidateNameListWithHttpInfo + +> ApiResponse modelHubExperimentsV2ValidateNameList modelHubExperimentsV2ValidateNameListWithHttpInfo() + + + +Validate that an experiment name is unique within a dataset. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubExperimentsV2ValidateNameListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubExperimentsV2ValidateNameList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**ExperimentNameValidationResponse**](ExperimentNameValidationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBaseCreate + +> LegacyKnowledgeBaseCreateResponse modelHubKnowledgeBaseCreate(legacyKnowledgeBaseMutationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest = new LegacyKnowledgeBaseMutationRequest(); // LegacyKnowledgeBaseMutationRequest | + try { + LegacyKnowledgeBaseCreateResponse result = apiInstance.modelHubKnowledgeBaseCreate(legacyKnowledgeBaseMutationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **legacyKnowledgeBaseMutationRequest** | [**LegacyKnowledgeBaseMutationRequest**](LegacyKnowledgeBaseMutationRequest.md)| | | + +### Return type + +[**LegacyKnowledgeBaseCreateResponse**](LegacyKnowledgeBaseCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBaseCreateWithHttpInfo + +> ApiResponse modelHubKnowledgeBaseCreate modelHubKnowledgeBaseCreateWithHttpInfo(legacyKnowledgeBaseMutationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest = new LegacyKnowledgeBaseMutationRequest(); // LegacyKnowledgeBaseMutationRequest | + try { + ApiResponse response = apiInstance.modelHubKnowledgeBaseCreateWithHttpInfo(legacyKnowledgeBaseMutationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **legacyKnowledgeBaseMutationRequest** | [**LegacyKnowledgeBaseMutationRequest**](LegacyKnowledgeBaseMutationRequest.md)| | | + +### Return type + +ApiResponse<[**LegacyKnowledgeBaseCreateResponse**](LegacyKnowledgeBaseCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBaseDelete + +> void modelHubKnowledgeBaseDelete() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + apiInstance.modelHubKnowledgeBaseDelete(); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBaseDeleteWithHttpInfo + +> ApiResponse modelHubKnowledgeBaseDelete modelHubKnowledgeBaseDeleteWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubKnowledgeBaseDeleteWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBaseFilesCreate + +> LegacyKnowledgeBaseFilesResponse modelHubKnowledgeBaseFilesCreate(legacyKnowledgeBaseFilesRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + LegacyKnowledgeBaseFilesRequest legacyKnowledgeBaseFilesRequest = new LegacyKnowledgeBaseFilesRequest(); // LegacyKnowledgeBaseFilesRequest | + try { + LegacyKnowledgeBaseFilesResponse result = apiInstance.modelHubKnowledgeBaseFilesCreate(legacyKnowledgeBaseFilesRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseFilesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **legacyKnowledgeBaseFilesRequest** | [**LegacyKnowledgeBaseFilesRequest**](LegacyKnowledgeBaseFilesRequest.md)| | | + +### Return type + +[**LegacyKnowledgeBaseFilesResponse**](LegacyKnowledgeBaseFilesResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBaseFilesCreateWithHttpInfo + +> ApiResponse modelHubKnowledgeBaseFilesCreate modelHubKnowledgeBaseFilesCreateWithHttpInfo(legacyKnowledgeBaseFilesRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + LegacyKnowledgeBaseFilesRequest legacyKnowledgeBaseFilesRequest = new LegacyKnowledgeBaseFilesRequest(); // LegacyKnowledgeBaseFilesRequest | + try { + ApiResponse response = apiInstance.modelHubKnowledgeBaseFilesCreateWithHttpInfo(legacyKnowledgeBaseFilesRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseFilesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **legacyKnowledgeBaseFilesRequest** | [**LegacyKnowledgeBaseFilesRequest**](LegacyKnowledgeBaseFilesRequest.md)| | | + +### Return type + +ApiResponse<[**LegacyKnowledgeBaseFilesResponse**](LegacyKnowledgeBaseFilesResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBaseFilesDelete + +> void modelHubKnowledgeBaseFilesDelete() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + apiInstance.modelHubKnowledgeBaseFilesDelete(); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseFilesDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBaseFilesDeleteWithHttpInfo + +> ApiResponse modelHubKnowledgeBaseFilesDelete modelHubKnowledgeBaseFilesDeleteWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubKnowledgeBaseFilesDeleteWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseFilesDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBaseGetList + +> LegacyKnowledgeBaseTableResponse modelHubKnowledgeBaseGetList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + LegacyKnowledgeBaseTableResponse result = apiInstance.modelHubKnowledgeBaseGetList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseGetList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**LegacyKnowledgeBaseTableResponse**](LegacyKnowledgeBaseTableResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBaseGetListWithHttpInfo + +> ApiResponse modelHubKnowledgeBaseGetList modelHubKnowledgeBaseGetListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubKnowledgeBaseGetListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseGetList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**LegacyKnowledgeBaseTableResponse**](LegacyKnowledgeBaseTableResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBaseList + +> LegacyKnowledgeBaseSdkCodeResponse modelHubKnowledgeBaseList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + LegacyKnowledgeBaseSdkCodeResponse result = apiInstance.modelHubKnowledgeBaseList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**LegacyKnowledgeBaseSdkCodeResponse**](LegacyKnowledgeBaseSdkCodeResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBaseListWithHttpInfo + +> ApiResponse modelHubKnowledgeBaseList modelHubKnowledgeBaseListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubKnowledgeBaseListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**LegacyKnowledgeBaseSdkCodeResponse**](LegacyKnowledgeBaseSdkCodeResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBaseListList + +> LegacyKnowledgeBaseListResponse modelHubKnowledgeBaseListList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + LegacyKnowledgeBaseListResponse result = apiInstance.modelHubKnowledgeBaseListList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**LegacyKnowledgeBaseListResponse**](LegacyKnowledgeBaseListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBaseListListWithHttpInfo + +> ApiResponse modelHubKnowledgeBaseListList modelHubKnowledgeBaseListListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + try { + ApiResponse response = apiInstance.modelHubKnowledgeBaseListListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBaseListList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**LegacyKnowledgeBaseListResponse**](LegacyKnowledgeBaseListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubKnowledgeBasePartialUpdate + +> LegacyKnowledgeBaseMutationResponse modelHubKnowledgeBasePartialUpdate(legacyKnowledgeBaseMutationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest = new LegacyKnowledgeBaseMutationRequest(); // LegacyKnowledgeBaseMutationRequest | + try { + LegacyKnowledgeBaseMutationResponse result = apiInstance.modelHubKnowledgeBasePartialUpdate(legacyKnowledgeBaseMutationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBasePartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **legacyKnowledgeBaseMutationRequest** | [**LegacyKnowledgeBaseMutationRequest**](LegacyKnowledgeBaseMutationRequest.md)| | | + +### Return type + +[**LegacyKnowledgeBaseMutationResponse**](LegacyKnowledgeBaseMutationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubKnowledgeBasePartialUpdateWithHttpInfo + +> ApiResponse modelHubKnowledgeBasePartialUpdate modelHubKnowledgeBasePartialUpdateWithHttpInfo(legacyKnowledgeBaseMutationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest = new LegacyKnowledgeBaseMutationRequest(); // LegacyKnowledgeBaseMutationRequest | + try { + ApiResponse response = apiInstance.modelHubKnowledgeBasePartialUpdateWithHttpInfo(legacyKnowledgeBaseMutationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubKnowledgeBasePartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **legacyKnowledgeBaseMutationRequest** | [**LegacyKnowledgeBaseMutationRequest**](LegacyKnowledgeBaseMutationRequest.md)| | | + +### Return type + +ApiResponse<[**LegacyKnowledgeBaseMutationResponse**](LegacyKnowledgeBaseMutationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptHistoryExecutionsGetExecutionDetails + +> ModelHubPromptHistoryExecutionsList200Response modelHubPromptHistoryExecutionsGetExecutionDetails(executionId, templateName, templateVersion, createdAt, search, ordering, page, limit) + + + +Get detailed information about a specific PromptVersion + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String executionId = "executionId_example"; // String | + String templateName = "templateName_example"; // String | + String templateVersion = "templateVersion_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubPromptHistoryExecutionsList200Response result = apiInstance.modelHubPromptHistoryExecutionsGetExecutionDetails(executionId, templateName, templateVersion, createdAt, search, ordering, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptHistoryExecutionsGetExecutionDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **executionId** | **String**| | | +| **templateName** | **String**| | [optional] | +| **templateVersion** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubPromptHistoryExecutionsList200Response**](ModelHubPromptHistoryExecutionsList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo + +> ApiResponse modelHubPromptHistoryExecutionsGetExecutionDetails modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo(executionId, templateName, templateVersion, createdAt, search, ordering, page, limit) + + + +Get detailed information about a specific PromptVersion + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String executionId = "executionId_example"; // String | + String templateName = "templateName_example"; // String | + String templateVersion = "templateVersion_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo(executionId, templateName, templateVersion, createdAt, search, ordering, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptHistoryExecutionsGetExecutionDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **executionId** | **String**| | | +| **templateName** | **String**| | [optional] | +| **templateVersion** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubPromptHistoryExecutionsList200Response**](ModelHubPromptHistoryExecutionsList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptHistoryExecutionsList + +> ModelHubPromptHistoryExecutionsList200Response modelHubPromptHistoryExecutionsList(templateName, templateVersion, createdAt, search, ordering, page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateName = "templateName_example"; // String | + String templateVersion = "templateVersion_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubPromptHistoryExecutionsList200Response result = apiInstance.modelHubPromptHistoryExecutionsList(templateName, templateVersion, createdAt, search, ordering, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptHistoryExecutionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateName** | **String**| | [optional] | +| **templateVersion** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubPromptHistoryExecutionsList200Response**](ModelHubPromptHistoryExecutionsList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptHistoryExecutionsListWithHttpInfo + +> ApiResponse modelHubPromptHistoryExecutionsList modelHubPromptHistoryExecutionsListWithHttpInfo(templateName, templateVersion, createdAt, search, ordering, page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateName = "templateName_example"; // String | + String templateVersion = "templateVersion_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubPromptHistoryExecutionsListWithHttpInfo(templateName, templateVersion, createdAt, search, ordering, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptHistoryExecutionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateName** | **String**| | [optional] | +| **templateVersion** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubPromptHistoryExecutionsList200Response**](ModelHubPromptHistoryExecutionsList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptHistoryExecutionsRead + +> PromptHistoryExecution modelHubPromptHistoryExecutionsRead(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt version. + try { + PromptHistoryExecution result = apiInstance.modelHubPromptHistoryExecutionsRead(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptHistoryExecutionsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt version. | | + +### Return type + +[**PromptHistoryExecution**](PromptHistoryExecution.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptHistoryExecutionsReadWithHttpInfo + +> ApiResponse modelHubPromptHistoryExecutionsRead modelHubPromptHistoryExecutionsReadWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt version. + try { + ApiResponse response = apiInstance.modelHubPromptHistoryExecutionsReadWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptHistoryExecutionsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt version. | | + +### Return type + +ApiResponse<[**PromptHistoryExecution**](PromptHistoryExecution.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsAssignLabelById + +> PromptLabel modelHubPromptLabelsAssignLabelById(templateId, labelId, promptLabel) + + + +Assign a label to a specific version by template name and version name. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + String labelId = "labelId_example"; // String | + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsAssignLabelById(templateId, labelId, promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsAssignLabelById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **labelId** | **String**| | | +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsAssignLabelByIdWithHttpInfo + +> ApiResponse modelHubPromptLabelsAssignLabelById modelHubPromptLabelsAssignLabelByIdWithHttpInfo(templateId, labelId, promptLabel) + + + +Assign a label to a specific version by template name and version name. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String templateId = "templateId_example"; // String | + String labelId = "labelId_example"; // String | + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsAssignLabelByIdWithHttpInfo(templateId, labelId, promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsAssignLabelById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **templateId** | **String**| | | +| **labelId** | **String**| | | +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsAssignMultipleLabels + +> PromptLabel modelHubPromptLabelsAssignMultipleLabels(promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsAssignMultipleLabels(promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsAssignMultipleLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo + +> ApiResponse modelHubPromptLabelsAssignMultipleLabels modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo(promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo(promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsAssignMultipleLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsCreate + +> PromptLabel modelHubPromptLabelsCreate(promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsCreate(promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsCreateWithHttpInfo + +> ApiResponse modelHubPromptLabelsCreate modelHubPromptLabelsCreateWithHttpInfo(promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsCreateWithHttpInfo(promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsCreateSystemLabels + +> PromptLabel modelHubPromptLabelsCreateSystemLabels(promptLabel) + + + +Create (idempotently) Production, Staging, Development system labels for the caller's org. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsCreateSystemLabels(promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsCreateSystemLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsCreateSystemLabelsWithHttpInfo + +> ApiResponse modelHubPromptLabelsCreateSystemLabels modelHubPromptLabelsCreateSystemLabelsWithHttpInfo(promptLabel) + + + +Create (idempotently) Production, Staging, Development system labels for the caller's org. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsCreateSystemLabelsWithHttpInfo(promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsCreateSystemLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsDelete + +> void modelHubPromptLabelsDelete(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.modelHubPromptLabelsDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsDeleteWithHttpInfo + +> ApiResponse modelHubPromptLabelsDelete modelHubPromptLabelsDeleteWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsGetByName + +> ModelHubPromptLabelsList200Response modelHubPromptLabelsGetByName(page, limit) + +Fetch a prompt version by template name and either explicit version or label. + +Query params: - name: template name (required) - version: version name like v1 (optional) - label: label name like Production/Staging/Development or custom (optional) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubPromptLabelsList200Response result = apiInstance.modelHubPromptLabelsGetByName(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsGetByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsGetByNameWithHttpInfo + +> ApiResponse modelHubPromptLabelsGetByName modelHubPromptLabelsGetByNameWithHttpInfo(page, limit) + +Fetch a prompt version by template name and either explicit version or label. + +Query params: - name: template name (required) - version: version name like v1 (optional) - label: label name like Production/Staging/Development or custom (optional) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubPromptLabelsGetByNameWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsGetByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsList + +> ModelHubPromptLabelsList200Response modelHubPromptLabelsList(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubPromptLabelsList200Response result = apiInstance.modelHubPromptLabelsList(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsListWithHttpInfo + +> ApiResponse modelHubPromptLabelsList modelHubPromptLabelsListWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubPromptLabelsListWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsPartialUpdate + +> PromptLabel modelHubPromptLabelsPartialUpdate(id, promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsPartialUpdate(id, promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsPartialUpdateWithHttpInfo + +> ApiResponse modelHubPromptLabelsPartialUpdate modelHubPromptLabelsPartialUpdateWithHttpInfo(id, promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsPartialUpdateWithHttpInfo(id, promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsRead + +> PromptLabel modelHubPromptLabelsRead(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsRead(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsReadWithHttpInfo + +> ApiResponse modelHubPromptLabelsRead modelHubPromptLabelsReadWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsReadWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsRemoveLabelFromVersion + +> PromptLabel modelHubPromptLabelsRemoveLabelFromVersion(promptLabel) + + + +Detach label from a prompt version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsRemoveLabelFromVersion(promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsRemoveLabelFromVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo + +> ApiResponse modelHubPromptLabelsRemoveLabelFromVersion modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo(promptLabel) + + + +Detach label from a prompt version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo(promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsRemoveLabelFromVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsSetDefault + +> PromptLabel modelHubPromptLabelsSetDefault(promptLabel) + + + +Set default version for a template by name and version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsSetDefault(promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsSetDefault"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsSetDefaultWithHttpInfo + +> ApiResponse modelHubPromptLabelsSetDefault modelHubPromptLabelsSetDefaultWithHttpInfo(promptLabel) + + + +Set default version for a template by name and version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsSetDefaultWithHttpInfo(promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsSetDefault"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsTemplateLabels + +> ModelHubPromptLabelsList200Response modelHubPromptLabelsTemplateLabels(page, limit) + + + +List versions with labels for a template by name or id. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubPromptLabelsList200Response result = apiInstance.modelHubPromptLabelsTemplateLabels(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsTemplateLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsTemplateLabelsWithHttpInfo + +> ApiResponse modelHubPromptLabelsTemplateLabels modelHubPromptLabelsTemplateLabelsWithHttpInfo(page, limit) + + + +List versions with labels for a template by name or id. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubPromptLabelsTemplateLabelsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsTemplateLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubPromptLabelsList200Response**](ModelHubPromptLabelsList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptLabelsUpdate + +> PromptLabel modelHubPromptLabelsUpdate(id, promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + PromptLabel result = apiInstance.modelHubPromptLabelsUpdate(id, promptLabel); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +[**PromptLabel**](PromptLabel.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptLabelsUpdateWithHttpInfo + +> ApiResponse modelHubPromptLabelsUpdate modelHubPromptLabelsUpdateWithHttpInfo(id, promptLabel) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + PromptLabel promptLabel = new PromptLabel(); // PromptLabel | + try { + ApiResponse response = apiInstance.modelHubPromptLabelsUpdateWithHttpInfo(id, promptLabel); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptLabelsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **promptLabel** | [**PromptLabel**](PromptLabel.md)| | | + +### Return type + +ApiResponse<[**PromptLabel**](PromptLabel.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesAddNewDraft + +> PromptTemplate modelHubPromptTemplatesAddNewDraft(id, promptTemplate) + + + +Create a new draft version of the PromptTemplate and return its details. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesAddNewDraft(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesAddNewDraft"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesAddNewDraftWithHttpInfo + +> ApiResponse modelHubPromptTemplatesAddNewDraft modelHubPromptTemplatesAddNewDraftWithHttpInfo(id, promptTemplate) + + + +Create a new draft version of the PromptTemplate and return its details. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesAddNewDraftWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesAddNewDraft"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesAnalyzePrompt + +> PromptTemplate modelHubPromptTemplatesAnalyzePrompt(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesAnalyzePrompt(promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesAnalyzePrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesAnalyzePromptWithHttpInfo + +> ApiResponse modelHubPromptTemplatesAnalyzePrompt modelHubPromptTemplatesAnalyzePromptWithHttpInfo(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesAnalyzePromptWithHttpInfo(promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesAnalyzePrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesBulkDelete + +> PromptTemplate modelHubPromptTemplatesBulkDelete(promptTemplate) + + + +Bulk delete prompt templates + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesBulkDelete(promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesBulkDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesBulkDeleteWithHttpInfo + +> ApiResponse modelHubPromptTemplatesBulkDelete modelHubPromptTemplatesBulkDeleteWithHttpInfo(promptTemplate) + + + +Bulk delete prompt templates + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesBulkDeleteWithHttpInfo(promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesBulkDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesCommit + +> PromptTemplate modelHubPromptTemplatesCommit(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesCommit(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCommit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesCommitWithHttpInfo + +> ApiResponse modelHubPromptTemplatesCommit modelHubPromptTemplatesCommitWithHttpInfo(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesCommitWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCommit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesCompareVersions + +> PromptTemplate modelHubPromptTemplatesCompareVersions(id, promptTemplate) + + + +Compare different versions of the PromptTemplate. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesCompareVersions(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCompareVersions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesCompareVersionsWithHttpInfo + +> ApiResponse modelHubPromptTemplatesCompareVersions modelHubPromptTemplatesCompareVersionsWithHttpInfo(id, promptTemplate) + + + +Compare different versions of the PromptTemplate. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesCompareVersionsWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCompareVersions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesCreate + +> PromptTemplate modelHubPromptTemplatesCreate(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesCreate(promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesCreateWithHttpInfo + +> ApiResponse modelHubPromptTemplatesCreate modelHubPromptTemplatesCreateWithHttpInfo(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesCreateWithHttpInfo(promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesCreateDraft + +> PromptTemplate modelHubPromptTemplatesCreateDraft(promptTemplate) + + + +Create a draft version of the PromptTemplate and return its details. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesCreateDraft(promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCreateDraft"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesCreateDraftWithHttpInfo + +> ApiResponse modelHubPromptTemplatesCreateDraft modelHubPromptTemplatesCreateDraftWithHttpInfo(promptTemplate) + + + +Create a draft version of the PromptTemplate and return its details. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesCreateDraftWithHttpInfo(promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesCreateDraft"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesDelete + +> void modelHubPromptTemplatesDelete(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + apiInstance.modelHubPromptTemplatesDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesDeleteWithHttpInfo + +> ApiResponse modelHubPromptTemplatesDelete modelHubPromptTemplatesDeleteWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesDeleteEvaluationConfig + +> void modelHubPromptTemplatesDeleteEvaluationConfig(id) + +Delete an evaluation configuration by name from a PromptTemplate. + +This endpoint allows removing an evaluation configuration from a PromptTemplate based on its unique name. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + apiInstance.modelHubPromptTemplatesDeleteEvaluationConfig(id); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDeleteEvaluationConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo + +> ApiResponse modelHubPromptTemplatesDeleteEvaluationConfig modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo(id) + +Delete an evaluation configuration by name from a PromptTemplate. + +This endpoint allows removing an evaluation configuration from a PromptTemplate based on its unique name. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDeleteEvaluationConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesDerivedVariablesExtractCreate + +> DerivedVariableDetailResponse modelHubPromptTemplatesDerivedVariablesExtractCreate(promptId, derivedVariableExtractRequest) + +Manually trigger extraction of derived variables from outputs. + +This is useful when you want to re-extract variables or extract from existing outputs that weren't processed. Request body: - version: Version to extract from - column_name: Name for the output column - output_index: Optional specific output index (default: 0) - response_format_type: Optional response format hint + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String promptId = "promptId_example"; // String | + DerivedVariableExtractRequest derivedVariableExtractRequest = new DerivedVariableExtractRequest(); // DerivedVariableExtractRequest | + try { + DerivedVariableDetailResponse result = apiInstance.modelHubPromptTemplatesDerivedVariablesExtractCreate(promptId, derivedVariableExtractRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesExtractCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptId** | **String**| | | +| **derivedVariableExtractRequest** | [**DerivedVariableExtractRequest**](DerivedVariableExtractRequest.md)| | | + +### Return type + +[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo + +> ApiResponse modelHubPromptTemplatesDerivedVariablesExtractCreate modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo(promptId, derivedVariableExtractRequest) + +Manually trigger extraction of derived variables from outputs. + +This is useful when you want to re-extract variables or extract from existing outputs that weren't processed. Request body: - version: Version to extract from - column_name: Name for the output column - output_index: Optional specific output index (default: 0) - response_format_type: Optional response format hint + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String promptId = "promptId_example"; // String | + DerivedVariableExtractRequest derivedVariableExtractRequest = new DerivedVariableExtractRequest(); // DerivedVariableExtractRequest | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo(promptId, derivedVariableExtractRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesExtractCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptId** | **String**| | | +| **derivedVariableExtractRequest** | [**DerivedVariableExtractRequest**](DerivedVariableExtractRequest.md)| | | + +### Return type + +ApiResponse<[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesDerivedVariablesList + +> PromptDerivedVariablesResponse modelHubPromptTemplatesDerivedVariablesList(promptId) + +Get all derived variables for a prompt template. + +Returns derived variables from JSON outputs across all versions. Query params: - version: Optional version filter - column_name: Optional column name filter + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String promptId = "promptId_example"; // String | + try { + PromptDerivedVariablesResponse result = apiInstance.modelHubPromptTemplatesDerivedVariablesList(promptId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptId** | **String**| | | + +### Return type + +[**PromptDerivedVariablesResponse**](PromptDerivedVariablesResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesDerivedVariablesListWithHttpInfo + +> ApiResponse modelHubPromptTemplatesDerivedVariablesList modelHubPromptTemplatesDerivedVariablesListWithHttpInfo(promptId) + +Get all derived variables for a prompt template. + +Returns derived variables from JSON outputs across all versions. Query params: - version: Optional version filter - column_name: Optional column name filter + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String promptId = "promptId_example"; // String | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesDerivedVariablesListWithHttpInfo(promptId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptId** | **String**| | | + +### Return type + +ApiResponse<[**PromptDerivedVariablesResponse**](PromptDerivedVariablesResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesDerivedVariablesPreviewCreate + +> DerivedVariableDetailResponse modelHubPromptTemplatesDerivedVariablesPreviewCreate(derivedVariablePreviewRequest) + +Preview derived variables from JSON content without saving. + +Useful for showing what variables would be extracted before running. Request body: - content: JSON string or object to analyze - column_name: Name for the variable prefix + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DerivedVariablePreviewRequest derivedVariablePreviewRequest = new DerivedVariablePreviewRequest(); // DerivedVariablePreviewRequest | + try { + DerivedVariableDetailResponse result = apiInstance.modelHubPromptTemplatesDerivedVariablesPreviewCreate(derivedVariablePreviewRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesPreviewCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **derivedVariablePreviewRequest** | [**DerivedVariablePreviewRequest**](DerivedVariablePreviewRequest.md)| | | + +### Return type + +[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo + +> ApiResponse modelHubPromptTemplatesDerivedVariablesPreviewCreate modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo(derivedVariablePreviewRequest) + +Preview derived variables from JSON content without saving. + +Useful for showing what variables would be extracted before running. Request body: - content: JSON string or object to analyze - column_name: Name for the variable prefix + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + DerivedVariablePreviewRequest derivedVariablePreviewRequest = new DerivedVariablePreviewRequest(); // DerivedVariablePreviewRequest | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo(derivedVariablePreviewRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesPreviewCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **derivedVariablePreviewRequest** | [**DerivedVariablePreviewRequest**](DerivedVariablePreviewRequest.md)| | | + +### Return type + +ApiResponse<[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesDerivedVariablesSchemaList + +> DerivedVariableDetailResponse modelHubPromptTemplatesDerivedVariablesSchemaList(promptId, columnName) + +Get the schema for derived variables of a specific column. + +Returns detailed schema information including types and sample values. Path params: - prompt_id: UUID of the prompt template - column_name: Name of the column Query params: - version: Optional version filter + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String promptId = "promptId_example"; // String | + String columnName = "columnName_example"; // String | + try { + DerivedVariableDetailResponse result = apiInstance.modelHubPromptTemplatesDerivedVariablesSchemaList(promptId, columnName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesSchemaList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptId** | **String**| | | +| **columnName** | **String**| | | + +### Return type + +[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo + +> ApiResponse modelHubPromptTemplatesDerivedVariablesSchemaList modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo(promptId, columnName) + +Get the schema for derived variables of a specific column. + +Returns detailed schema information including types and sample values. Path params: - prompt_id: UUID of the prompt template - column_name: Name of the column Query params: - version: Optional version filter + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String promptId = "promptId_example"; // String | + String columnName = "columnName_example"; // String | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo(promptId, columnName); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesDerivedVariablesSchemaList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptId** | **String**| | | +| **columnName** | **String**| | | + +### Return type + +ApiResponse<[**DerivedVariableDetailResponse**](DerivedVariableDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGeneratePrompt + +> PromptTemplate modelHubPromptTemplatesGeneratePrompt(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesGeneratePrompt(promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGeneratePrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGeneratePromptWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGeneratePrompt modelHubPromptTemplatesGeneratePromptWithHttpInfo(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGeneratePromptWithHttpInfo(promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGeneratePrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGenerateVariables + +> PromptTemplate modelHubPromptTemplatesGenerateVariables(promptTemplate) + +Generate synthetic data for prompt variables using the SyntheticDataAgent. + +Expected payload: { \"prompt_name\": \"string\", \"prompt_instructions\": \"list/array\" , \"variable_names\": [\"string\"], \"variable_count\": \"int\", \"generation_type\": \"prompt\" } + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesGenerateVariables(promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGenerateVariables"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGenerateVariablesWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGenerateVariables modelHubPromptTemplatesGenerateVariablesWithHttpInfo(promptTemplate) + +Generate synthetic data for prompt variables using the SyntheticDataAgent. + +Expected payload: { \"prompt_name\": \"string\", \"prompt_instructions\": \"list/array\" , \"variable_names\": [\"string\"], \"variable_count\": \"int\", \"generation_type\": \"prompt\" } + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGenerateVariablesWithHttpInfo(promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGenerateVariables"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGetAllVariables + +> PromptTemplate modelHubPromptTemplatesGetAllVariables(id) + + + +Get all variables from template and its executions + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesGetAllVariables(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetAllVariables"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGetAllVariablesWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGetAllVariables modelHubPromptTemplatesGetAllVariablesWithHttpInfo(id) + + + +Get all variables from template and its executions + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGetAllVariablesWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetAllVariables"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGetEvaluationConfigs + +> PromptTemplate modelHubPromptTemplatesGetEvaluationConfigs(id) + + + +Get the evaluation configurations for a specific prompt template. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesGetEvaluationConfigs(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetEvaluationConfigs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGetEvaluationConfigs modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo(id) + + + +Get the evaluation configurations for a specific prompt template. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetEvaluationConfigs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGetNextVersion + +> PromptTemplate modelHubPromptTemplatesGetNextVersion(id) + + + +Get the next version of the PromptTemplate + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesGetNextVersion(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetNextVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGetNextVersionWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGetNextVersion modelHubPromptTemplatesGetNextVersionWithHttpInfo(id) + + + +Get the next version of the PromptTemplate + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGetNextVersionWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetNextVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGetRunStatus + +> PromptTemplate modelHubPromptTemplatesGetRunStatus(id) + + + +Get the current status and results of a template run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesGetRunStatus(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetRunStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGetRunStatusWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGetRunStatus modelHubPromptTemplatesGetRunStatusWithHttpInfo(id) + + + +Get the current status and results of a template run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGetRunStatusWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetRunStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGetSdkCode + +> PromptTemplate modelHubPromptTemplatesGetSdkCode(id, language) + + + +Get the prompt code in the requested format. If no format is specified, returns all formats. Supported languages: python, typescript, curl, langchain, nodejs, go + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + String language = "language_example"; // String | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesGetSdkCode(id, language); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetSdkCode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **language** | **String**| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGetSdkCodeWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGetSdkCode modelHubPromptTemplatesGetSdkCodeWithHttpInfo(id, language) + + + +Get the prompt code in the requested format. If no format is specified, returns all formats. Supported languages: python, typescript, curl, langchain, nodejs, go + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + String language = "language_example"; // String | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGetSdkCodeWithHttpInfo(id, language); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetSdkCode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **language** | **String**| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesGetTemplateByName + +> ModelHubPromptTemplatesList200Response modelHubPromptTemplatesGetTemplateByName(name, version, createdAt, search, ordering, page, limit) + + + +Retrieve a prompt template by name. If no version is specified, returns the default version (is_default=True). If a version is specified, returns that specific version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String name = "name_example"; // String | + String version = "version_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubPromptTemplatesList200Response result = apiInstance.modelHubPromptTemplatesGetTemplateByName(name, version, createdAt, search, ordering, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetTemplateByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **name** | **String**| | [optional] | +| **version** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubPromptTemplatesList200Response**](ModelHubPromptTemplatesList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesGetTemplateByNameWithHttpInfo + +> ApiResponse modelHubPromptTemplatesGetTemplateByName modelHubPromptTemplatesGetTemplateByNameWithHttpInfo(name, version, createdAt, search, ordering, page, limit) + + + +Retrieve a prompt template by name. If no version is specified, returns the default version (is_default=True). If a version is specified, returns that specific version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String name = "name_example"; // String | + String version = "version_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesGetTemplateByNameWithHttpInfo(name, version, createdAt, search, ordering, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesGetTemplateByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **name** | **String**| | [optional] | +| **version** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubPromptTemplatesList200Response**](ModelHubPromptTemplatesList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesImprovePrompt + +> PromptTemplate modelHubPromptTemplatesImprovePrompt(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesImprovePrompt(promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesImprovePrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesImprovePromptWithHttpInfo + +> ApiResponse modelHubPromptTemplatesImprovePrompt modelHubPromptTemplatesImprovePromptWithHttpInfo(promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesImprovePromptWithHttpInfo(promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesImprovePrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesList + +> ModelHubPromptTemplatesList200Response modelHubPromptTemplatesList(name, version, createdAt, search, ordering, page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String name = "name_example"; // String | + String version = "version_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ModelHubPromptTemplatesList200Response result = apiInstance.modelHubPromptTemplatesList(name, version, createdAt, search, ordering, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **name** | **String**| | [optional] | +| **version** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ModelHubPromptTemplatesList200Response**](ModelHubPromptTemplatesList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesListWithHttpInfo + +> ApiResponse modelHubPromptTemplatesList modelHubPromptTemplatesListWithHttpInfo(name, version, createdAt, search, ordering, page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String name = "name_example"; // String | + String version = "version_example"; // String | + String createdAt = "createdAt_example"; // String | + String search = "search_example"; // String | A search term. + String ordering = "ordering_example"; // String | Which field to use when ordering the results. + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesListWithHttpInfo(name, version, createdAt, search, ordering, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **name** | **String**| | [optional] | +| **version** | **String**| | [optional] | +| **createdAt** | **String**| | [optional] | +| **search** | **String**| A search term. | [optional] | +| **ordering** | **String**| Which field to use when ordering the results. | [optional] | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ModelHubPromptTemplatesList200Response**](ModelHubPromptTemplatesList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesPartialUpdate + +> PromptTemplate modelHubPromptTemplatesPartialUpdate(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesPartialUpdate(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesPartialUpdateWithHttpInfo + +> ApiResponse modelHubPromptTemplatesPartialUpdate modelHubPromptTemplatesPartialUpdateWithHttpInfo(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesPartialUpdateWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesRead + +> PromptTemplate modelHubPromptTemplatesRead(id) + + + +Retrieve a prompt template with version history and execution data. Handles caching and error cases. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesRead(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesReadWithHttpInfo + +> ApiResponse modelHubPromptTemplatesRead modelHubPromptTemplatesReadWithHttpInfo(id) + + + +Retrieve a prompt template with version history and execution data. Handles caching and error cases. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesReadWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesRetrieveEvaluations + +> PromptTemplate modelHubPromptTemplatesRetrieveEvaluations(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesRetrieveEvaluations(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRetrieveEvaluations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo + +> ApiResponse modelHubPromptTemplatesRetrieveEvaluations modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRetrieveEvaluations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesRunEvalsOnMultipleVersions + +> PromptTemplate modelHubPromptTemplatesRunEvalsOnMultipleVersions(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesRunEvalsOnMultipleVersions(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRunEvalsOnMultipleVersions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo + +> ApiResponse modelHubPromptTemplatesRunEvalsOnMultipleVersions modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRunEvalsOnMultipleVersions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesRunTemplate + +> PromptTemplate modelHubPromptTemplatesRunTemplate(id, promptTemplate) + + + +Run a prompt template with the given configuration. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesRunTemplate(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRunTemplate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesRunTemplateWithHttpInfo + +> ApiResponse modelHubPromptTemplatesRunTemplate modelHubPromptTemplatesRunTemplateWithHttpInfo(id, promptTemplate) + + + +Run a prompt template with the given configuration. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesRunTemplateWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesRunTemplate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesSaveName + +> PromptTemplate modelHubPromptTemplatesSaveName(id, promptTemplate) + + + +Save/update the name for a template. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesSaveName(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesSaveName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesSaveNameWithHttpInfo + +> ApiResponse modelHubPromptTemplatesSaveName modelHubPromptTemplatesSaveNameWithHttpInfo(id, promptTemplate) + + + +Save/update the name for a template. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesSaveNameWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesSaveName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesSavePromptFolder + +> PromptTemplate modelHubPromptTemplatesSavePromptFolder(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesSavePromptFolder(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesSavePromptFolder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesSavePromptFolderWithHttpInfo + +> ApiResponse modelHubPromptTemplatesSavePromptFolder modelHubPromptTemplatesSavePromptFolderWithHttpInfo(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesSavePromptFolderWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesSavePromptFolder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesSetDefault + +> PromptTemplate modelHubPromptTemplatesSetDefault(id, promptTemplate) + + + +Set a specific version of a prompt template as default + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesSetDefault(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesSetDefault"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesSetDefaultWithHttpInfo + +> ApiResponse modelHubPromptTemplatesSetDefault modelHubPromptTemplatesSetDefaultWithHttpInfo(id, promptTemplate) + + + +Set a specific version of a prompt template as default + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesSetDefaultWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesSetDefault"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesStopStreaming + +> PromptTemplate modelHubPromptTemplatesStopStreaming(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesStopStreaming(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesStopStreaming"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesStopStreamingWithHttpInfo + +> ApiResponse modelHubPromptTemplatesStopStreaming modelHubPromptTemplatesStopStreamingWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesStopStreamingWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesStopStreaming"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesUpdate + +> PromptTemplate modelHubPromptTemplatesUpdate(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesUpdate(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesUpdateWithHttpInfo + +> ApiResponse modelHubPromptTemplatesUpdate modelHubPromptTemplatesUpdateWithHttpInfo(id, promptTemplate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesUpdateWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesUpdateEvaluationConfigs + +> PromptTemplate modelHubPromptTemplatesUpdateEvaluationConfigs(id, promptTemplate) + +Add or update evaluation configurations for a PromptTemplate. + +This endpoint allows adding new evaluation configurations or updating existing ones in a PromptTemplate. If is_run is true, it will also run evaluations on specified versions (or latest version if none specified). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesUpdateEvaluationConfigs(id, promptTemplate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesUpdateEvaluationConfigs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo + +> ApiResponse modelHubPromptTemplatesUpdateEvaluationConfigs modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo(id, promptTemplate) + +Add or update evaluation configurations for a PromptTemplate. + +This endpoint allows adding new evaluation configurations or updating existing ones in a PromptTemplate. If is_run is true, it will also run evaluations on specified versions (or latest version if none specified). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + PromptTemplate promptTemplate = new PromptTemplate(); // PromptTemplate | + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo(id, promptTemplate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesUpdateEvaluationConfigs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | +| **promptTemplate** | [**PromptTemplate**](PromptTemplate.md)| | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## modelHubPromptTemplatesVersions + +> PromptTemplate modelHubPromptTemplatesVersions(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + PromptTemplate result = apiInstance.modelHubPromptTemplatesVersions(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesVersions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +[**PromptTemplate**](PromptTemplate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubPromptTemplatesVersionsWithHttpInfo + +> ApiResponse modelHubPromptTemplatesVersions modelHubPromptTemplatesVersionsWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + UUID id = UUID.randomUUID(); // UUID | A UUID string identifying this prompt template. + try { + ApiResponse response = apiInstance.modelHubPromptTemplatesVersionsWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubPromptTemplatesVersions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **UUID**| A UUID string identifying this prompt template. | | + +### Return type + +ApiResponse<[**PromptTemplate**](PromptTemplate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresBulkCreate + +> BulkCreateScoresResponse modelHubScoresBulkCreate(bulkCreateScores) + + + +Create multiple scores on a single source (e.g. from inline annotator). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + BulkCreateScores bulkCreateScores = new BulkCreateScores(); // BulkCreateScores | + try { + BulkCreateScoresResponse result = apiInstance.modelHubScoresBulkCreate(bulkCreateScores); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresBulkCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bulkCreateScores** | [**BulkCreateScores**](BulkCreateScores.md)| | | + +### Return type + +[**BulkCreateScoresResponse**](BulkCreateScoresResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresBulkCreateWithHttpInfo + +> ApiResponse modelHubScoresBulkCreate modelHubScoresBulkCreateWithHttpInfo(bulkCreateScores) + + + +Create multiple scores on a single source (e.g. from inline annotator). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + BulkCreateScores bulkCreateScores = new BulkCreateScores(); // BulkCreateScores | + try { + ApiResponse response = apiInstance.modelHubScoresBulkCreateWithHttpInfo(bulkCreateScores); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresBulkCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bulkCreateScores** | [**BulkCreateScores**](BulkCreateScores.md)| | | + +### Return type + +ApiResponse<[**BulkCreateScoresResponse**](BulkCreateScoresResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresCreate + +> ScoreResponse modelHubScoresCreate(createScore) + + + +Create a single score. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CreateScore createScore = new CreateScore(); // CreateScore | + try { + ScoreResponse result = apiInstance.modelHubScoresCreate(createScore); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createScore** | [**CreateScore**](CreateScore.md)| | | + +### Return type + +[**ScoreResponse**](ScoreResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresCreateWithHttpInfo + +> ApiResponse modelHubScoresCreate modelHubScoresCreateWithHttpInfo(createScore) + + + +Create a single score. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + CreateScore createScore = new CreateScore(); // CreateScore | + try { + ApiResponse response = apiInstance.modelHubScoresCreateWithHttpInfo(createScore); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createScore** | [**CreateScore**](CreateScore.md)| | | + +### Return type + +ApiResponse<[**ScoreResponse**](ScoreResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresDelete + +> ScoreDeleteResponse modelHubScoresDelete(id) + +Soft-delete a score. + +Only the annotator who created the score or an org Owner/Admin may delete it. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ScoreDeleteResponse result = apiInstance.modelHubScoresDelete(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**ScoreDeleteResponse**](ScoreDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresDeleteWithHttpInfo + +> ApiResponse modelHubScoresDelete modelHubScoresDeleteWithHttpInfo(id) + +Soft-delete a score. + +Only the annotator who created the score or an org Owner/Admin may delete it. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubScoresDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**ScoreDeleteResponse**](ScoreDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresForSource + +> ScoreForSourceResponse modelHubScoresForSource(sourceType, sourceId, page, limit) + + + +Get all scores for a specific source. GET /model-hub/scores/for-source/?source_type=trace&source_id=<uuid> + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String sourceType = "dataset_row"; // String | + String sourceId = "sourceId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ScoreForSourceResponse result = apiInstance.modelHubScoresForSource(sourceType, sourceId, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresForSource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sourceType** | **String**| | [enum: dataset_row, trace, observation_span, prototype_run, call_execution, trace_session] | +| **sourceId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ScoreForSourceResponse**](ScoreForSourceResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresForSourceWithHttpInfo + +> ApiResponse modelHubScoresForSource modelHubScoresForSourceWithHttpInfo(sourceType, sourceId, page, limit) + + + +Get all scores for a specific source. GET /model-hub/scores/for-source/?source_type=trace&source_id=<uuid> + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String sourceType = "dataset_row"; // String | + String sourceId = "sourceId_example"; // String | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.modelHubScoresForSourceWithHttpInfo(sourceType, sourceId, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresForSource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sourceType** | **String**| | [enum: dataset_row, trace, observation_span, prototype_run, call_execution, trace_session] | +| **sourceId** | **String**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ScoreForSourceResponse**](ScoreForSourceResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **409** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresList + +> ModelHubScoresList200Response modelHubScoresList(page, limit, sourceType, sourceId, labelId, annotatorId) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String sourceType = "dataset_row"; // String | + String sourceId = "sourceId_example"; // String | + UUID labelId = UUID.randomUUID(); // UUID | + UUID annotatorId = UUID.randomUUID(); // UUID | + try { + ModelHubScoresList200Response result = apiInstance.modelHubScoresList(page, limit, sourceType, sourceId, labelId, annotatorId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **sourceType** | **String**| | [optional] [enum: dataset_row, trace, observation_span, prototype_run, call_execution, trace_session] | +| **sourceId** | **String**| | [optional] | +| **labelId** | **UUID**| | [optional] | +| **annotatorId** | **UUID**| | [optional] | + +### Return type + +[**ModelHubScoresList200Response**](ModelHubScoresList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresListWithHttpInfo + +> ApiResponse modelHubScoresList modelHubScoresListWithHttpInfo(page, limit, sourceType, sourceId, labelId, annotatorId) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String sourceType = "dataset_row"; // String | + String sourceId = "sourceId_example"; // String | + UUID labelId = UUID.randomUUID(); // UUID | + UUID annotatorId = UUID.randomUUID(); // UUID | + try { + ApiResponse response = apiInstance.modelHubScoresListWithHttpInfo(page, limit, sourceType, sourceId, labelId, annotatorId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **sourceType** | **String**| | [optional] [enum: dataset_row, trace, observation_span, prototype_run, call_execution, trace_session] | +| **sourceId** | **String**| | [optional] | +| **labelId** | **UUID**| | [optional] | +| **annotatorId** | **UUID**| | [optional] | + +### Return type + +ApiResponse<[**ModelHubScoresList200Response**](ModelHubScoresList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresPartialUpdate + +> Score modelHubScoresPartialUpdate(id, score) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + Score score = new Score(); // Score | + try { + Score result = apiInstance.modelHubScoresPartialUpdate(id, score); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **score** | [**Score**](Score.md)| | | + +### Return type + +[**Score**](Score.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresPartialUpdateWithHttpInfo + +> ApiResponse modelHubScoresPartialUpdate modelHubScoresPartialUpdateWithHttpInfo(id, score) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + Score score = new Score(); // Score | + try { + ApiResponse response = apiInstance.modelHubScoresPartialUpdateWithHttpInfo(id, score); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **score** | [**Score**](Score.md)| | | + +### Return type + +ApiResponse<[**Score**](Score.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresRead + +> Score modelHubScoresRead(id) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + Score result = apiInstance.modelHubScoresRead(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**Score**](Score.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresReadWithHttpInfo + +> ApiResponse modelHubScoresRead modelHubScoresReadWithHttpInfo(id) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.modelHubScoresReadWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**Score**](Score.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## modelHubScoresUpdate + +> Score modelHubScoresUpdate(id, score) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + Score score = new Score(); // Score | + try { + Score result = apiInstance.modelHubScoresUpdate(id, score); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **score** | [**Score**](Score.md)| | | + +### Return type + +[**Score**](Score.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## modelHubScoresUpdateWithHttpInfo + +> ApiResponse modelHubScoresUpdate modelHubScoresUpdateWithHttpInfo(id, score) + +Universal Score CRUD. + +GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ModelHubApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ModelHubApi apiInstance = new ModelHubApi(defaultClient); + String id = "id_example"; // String | + Score score = new Score(); // Score | + try { + ApiResponse response = apiInstance.modelHubScoresUpdateWithHttpInfo(id, score); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ModelHubApi#modelHubScoresUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **score** | [**Score**](Score.md)| | | + +### Return type + +ApiResponse<[**Score**](Score.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/RunTestsEvalConfigsApi.md b/java/futureagi/docs/RunTestsEvalConfigsApi.md new file mode 100644 index 0000000..427f992 --- /dev/null +++ b/java/futureagi/docs/RunTestsEvalConfigsApi.md @@ -0,0 +1,716 @@ +# RunTestsEvalConfigsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**simulateRunTestsEvalConfigsCreate**](RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsCreate) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/ | Add evaluation configurations | +| [**simulateRunTestsEvalConfigsCreateWithHttpInfo**](RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/ | Add evaluation configurations | +| [**simulateRunTestsEvalConfigsDelete**](RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsDelete) | **DELETE** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/ | Delete evaluation configuration | +| [**simulateRunTestsEvalConfigsDeleteWithHttpInfo**](RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsDeleteWithHttpInfo) | **DELETE** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/ | Delete evaluation configuration | +| [**simulateRunTestsEvalConfigsUpdateCreate**](RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsUpdateCreate) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/ | Update evaluation configuration | +| [**simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo**](RunTestsEvalConfigsApi.md#simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/ | Update evaluation configuration | +| [**simulateRunTestsRunNewEvalsCreate**](RunTestsEvalConfigsApi.md#simulateRunTestsRunNewEvalsCreate) | **POST** /simulate/run-tests/{run_test_id}/run-new-evals/ | Run new evaluations on test executions | +| [**simulateRunTestsRunNewEvalsCreateWithHttpInfo**](RunTestsEvalConfigsApi.md#simulateRunTestsRunNewEvalsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/run-new-evals/ | Run new evaluations on test executions | + + + +## simulateRunTestsEvalConfigsCreate + +> AddEvalConfigsResponse simulateRunTestsEvalConfigsCreate(runTestId, addEvalConfigsRequest) + +Add evaluation configurations + +Adds evaluation configurations to a test run. Returns 201 with the created configs. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + AddEvalConfigsRequest addEvalConfigsRequest = new AddEvalConfigsRequest(); // AddEvalConfigsRequest | + try { + AddEvalConfigsResponse result = apiInstance.simulateRunTestsEvalConfigsCreate(runTestId, addEvalConfigsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsEvalConfigsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **addEvalConfigsRequest** | [**AddEvalConfigsRequest**](AddEvalConfigsRequest.md)| | | + +### Return type + +[**AddEvalConfigsResponse**](AddEvalConfigsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsEvalConfigsCreateWithHttpInfo + +> ApiResponse simulateRunTestsEvalConfigsCreate simulateRunTestsEvalConfigsCreateWithHttpInfo(runTestId, addEvalConfigsRequest) + +Add evaluation configurations + +Adds evaluation configurations to a test run. Returns 201 with the created configs. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + AddEvalConfigsRequest addEvalConfigsRequest = new AddEvalConfigsRequest(); // AddEvalConfigsRequest | + try { + ApiResponse response = apiInstance.simulateRunTestsEvalConfigsCreateWithHttpInfo(runTestId, addEvalConfigsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsEvalConfigsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **addEvalConfigsRequest** | [**AddEvalConfigsRequest**](AddEvalConfigsRequest.md)| | | + +### Return type + +ApiResponse<[**AddEvalConfigsResponse**](AddEvalConfigsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsEvalConfigsDelete + +> DeleteEvalConfigResponse simulateRunTestsEvalConfigsDelete(runTestId, evalConfigId) + +Delete evaluation configuration + +Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String evalConfigId = "evalConfigId_example"; // String | + try { + DeleteEvalConfigResponse result = apiInstance.simulateRunTestsEvalConfigsDelete(runTestId, evalConfigId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsEvalConfigsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **evalConfigId** | **String**| | | + +### Return type + +[**DeleteEvalConfigResponse**](DeleteEvalConfigResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsEvalConfigsDeleteWithHttpInfo + +> ApiResponse simulateRunTestsEvalConfigsDelete simulateRunTestsEvalConfigsDeleteWithHttpInfo(runTestId, evalConfigId) + +Delete evaluation configuration + +Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String evalConfigId = "evalConfigId_example"; // String | + try { + ApiResponse response = apiInstance.simulateRunTestsEvalConfigsDeleteWithHttpInfo(runTestId, evalConfigId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsEvalConfigsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **evalConfigId** | **String**| | | + +### Return type + +ApiResponse<[**DeleteEvalConfigResponse**](DeleteEvalConfigResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsEvalConfigsUpdateCreate + +> EvalConfigUpdateResponse simulateRunTestsEvalConfigsUpdateCreate(runTestId, evalConfigId, evalConfigUpdateRequest) + +Update evaluation configuration + +Updates an evaluation configuration and optionally triggers a rerun. When run=true, test_execution_id is required. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String evalConfigId = "evalConfigId_example"; // String | + EvalConfigUpdateRequest evalConfigUpdateRequest = new EvalConfigUpdateRequest(); // EvalConfigUpdateRequest | + try { + EvalConfigUpdateResponse result = apiInstance.simulateRunTestsEvalConfigsUpdateCreate(runTestId, evalConfigId, evalConfigUpdateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsEvalConfigsUpdateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **evalConfigId** | **String**| | | +| **evalConfigUpdateRequest** | [**EvalConfigUpdateRequest**](EvalConfigUpdateRequest.md)| | | + +### Return type + +[**EvalConfigUpdateResponse**](EvalConfigUpdateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo + +> ApiResponse simulateRunTestsEvalConfigsUpdateCreate simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo(runTestId, evalConfigId, evalConfigUpdateRequest) + +Update evaluation configuration + +Updates an evaluation configuration and optionally triggers a rerun. When run=true, test_execution_id is required. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String evalConfigId = "evalConfigId_example"; // String | + EvalConfigUpdateRequest evalConfigUpdateRequest = new EvalConfigUpdateRequest(); // EvalConfigUpdateRequest | + try { + ApiResponse response = apiInstance.simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo(runTestId, evalConfigId, evalConfigUpdateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsEvalConfigsUpdateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **evalConfigId** | **String**| | | +| **evalConfigUpdateRequest** | [**EvalConfigUpdateRequest**](EvalConfigUpdateRequest.md)| | | + +### Return type + +ApiResponse<[**EvalConfigUpdateResponse**](EvalConfigUpdateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsRunNewEvalsCreate + +> RunNewEvalsResponse simulateRunTestsRunNewEvalsCreate(runTestId, runNewEvalsOnTestExecution) + +Run new evaluations on test executions + +Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must be provided. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + RunNewEvalsOnTestExecution runNewEvalsOnTestExecution = new RunNewEvalsOnTestExecution(); // RunNewEvalsOnTestExecution | + try { + RunNewEvalsResponse result = apiInstance.simulateRunTestsRunNewEvalsCreate(runTestId, runNewEvalsOnTestExecution); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsRunNewEvalsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **runNewEvalsOnTestExecution** | [**RunNewEvalsOnTestExecution**](RunNewEvalsOnTestExecution.md)| | | + +### Return type + +[**RunNewEvalsResponse**](RunNewEvalsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsRunNewEvalsCreateWithHttpInfo + +> ApiResponse simulateRunTestsRunNewEvalsCreate simulateRunTestsRunNewEvalsCreateWithHttpInfo(runTestId, runNewEvalsOnTestExecution) + +Run new evaluations on test executions + +Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must be provided. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalConfigsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalConfigsApi apiInstance = new RunTestsEvalConfigsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + RunNewEvalsOnTestExecution runNewEvalsOnTestExecution = new RunNewEvalsOnTestExecution(); // RunNewEvalsOnTestExecution | + try { + ApiResponse response = apiInstance.simulateRunTestsRunNewEvalsCreateWithHttpInfo(runTestId, runNewEvalsOnTestExecution); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalConfigsApi#simulateRunTestsRunNewEvalsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **runNewEvalsOnTestExecution** | [**RunNewEvalsOnTestExecution**](RunNewEvalsOnTestExecution.md)| | | + +### Return type + +ApiResponse<[**RunNewEvalsResponse**](RunNewEvalsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/RunTestsEvalSummaryApi.md b/java/futureagi/docs/RunTestsEvalSummaryApi.md new file mode 100644 index 0000000..43ec8ea --- /dev/null +++ b/java/futureagi/docs/RunTestsEvalSummaryApi.md @@ -0,0 +1,358 @@ +# RunTestsEvalSummaryApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**simulateRunTestsEvalSummaryComparisonList**](RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryComparisonList) | **GET** /simulate/run-tests/{run_test_id}/eval-summary-comparison/ | Compare evaluation summaries | +| [**simulateRunTestsEvalSummaryComparisonListWithHttpInfo**](RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryComparisonListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/eval-summary-comparison/ | Compare evaluation summaries | +| [**simulateRunTestsEvalSummaryList**](RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryList) | **GET** /simulate/run-tests/{run_test_id}/eval-summary/ | Get evaluation summary | +| [**simulateRunTestsEvalSummaryListWithHttpInfo**](RunTestsEvalSummaryApi.md#simulateRunTestsEvalSummaryListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/eval-summary/ | Get evaluation summary | + + + +## simulateRunTestsEvalSummaryComparisonList + +> EvalSummaryComparisonResponse simulateRunTestsEvalSummaryComparisonList(runTestId, executionIds) + +Compare evaluation summaries + +Compares evaluation summary statistics across multiple test executions. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalSummaryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalSummaryApi apiInstance = new RunTestsEvalSummaryApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String executionIds = "executionIds_example"; // String | JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. + try { + EvalSummaryComparisonResponse result = apiInstance.simulateRunTestsEvalSummaryComparisonList(runTestId, executionIds); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalSummaryApi#simulateRunTestsEvalSummaryComparisonList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **executionIds** | **String**| JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. | | + +### Return type + +[**EvalSummaryComparisonResponse**](EvalSummaryComparisonResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsEvalSummaryComparisonListWithHttpInfo + +> ApiResponse simulateRunTestsEvalSummaryComparisonList simulateRunTestsEvalSummaryComparisonListWithHttpInfo(runTestId, executionIds) + +Compare evaluation summaries + +Compares evaluation summary statistics across multiple test executions. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalSummaryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalSummaryApi apiInstance = new RunTestsEvalSummaryApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String executionIds = "executionIds_example"; // String | JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. + try { + ApiResponse response = apiInstance.simulateRunTestsEvalSummaryComparisonListWithHttpInfo(runTestId, executionIds); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalSummaryApi#simulateRunTestsEvalSummaryComparisonList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **executionIds** | **String**| JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. | | + +### Return type + +ApiResponse<[**EvalSummaryComparisonResponse**](EvalSummaryComparisonResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsEvalSummaryList + +> EvalSummaryResponse simulateRunTestsEvalSummaryList(runTestId, executionId) + +Get evaluation summary + +Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalSummaryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalSummaryApi apiInstance = new RunTestsEvalSummaryApi(defaultClient); + String runTestId = "runTestId_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. + try { + EvalSummaryResponse result = apiInstance.simulateRunTestsEvalSummaryList(runTestId, executionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalSummaryApi#simulateRunTestsEvalSummaryList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **executionId** | **UUID**| UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. | [optional] | + +### Return type + +[**EvalSummaryResponse**](EvalSummaryResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsEvalSummaryListWithHttpInfo + +> ApiResponse simulateRunTestsEvalSummaryList simulateRunTestsEvalSummaryListWithHttpInfo(runTestId, executionId) + +Get evaluation summary + +Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.RunTestsEvalSummaryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + RunTestsEvalSummaryApi apiInstance = new RunTestsEvalSummaryApi(defaultClient); + String runTestId = "runTestId_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. + try { + ApiResponse response = apiInstance.simulateRunTestsEvalSummaryListWithHttpInfo(runTestId, executionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling RunTestsEvalSummaryApi#simulateRunTestsEvalSummaryList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **executionId** | **UUID**| UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. | [optional] | + +### Return type + +ApiResponse<[**EvalSummaryResponse**](EvalSummaryResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **401** | Unauthorized | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/ScenariosApi.md b/java/futureagi/docs/ScenariosApi.md new file mode 100644 index 0000000..f9a1944 --- /dev/null +++ b/java/futureagi/docs/ScenariosApi.md @@ -0,0 +1,714 @@ +# ScenariosApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**simulateScenariosAddColumnsCreate**](ScenariosApi.md#simulateScenariosAddColumnsCreate) | **POST** /simulate/scenarios/{scenario_id}/add-columns/ | Add columns to scenario | +| [**simulateScenariosAddColumnsCreateWithHttpInfo**](ScenariosApi.md#simulateScenariosAddColumnsCreateWithHttpInfo) | **POST** /simulate/scenarios/{scenario_id}/add-columns/ | Add columns to scenario | +| [**simulateScenariosAddRowsCreate**](ScenariosApi.md#simulateScenariosAddRowsCreate) | **POST** /simulate/scenarios/{scenario_id}/add-rows/ | Add rows to scenario | +| [**simulateScenariosAddRowsCreateWithHttpInfo**](ScenariosApi.md#simulateScenariosAddRowsCreateWithHttpInfo) | **POST** /simulate/scenarios/{scenario_id}/add-rows/ | Add rows to scenario | +| [**simulateScenariosGetColumnsList**](ScenariosApi.md#simulateScenariosGetColumnsList) | **GET** /simulate/scenarios/get-columns/ | List scenarios | +| [**simulateScenariosGetColumnsListWithHttpInfo**](ScenariosApi.md#simulateScenariosGetColumnsListWithHttpInfo) | **GET** /simulate/scenarios/get-columns/ | List scenarios | +| [**simulateScenariosPromptsUpdate**](ScenariosApi.md#simulateScenariosPromptsUpdate) | **PUT** /simulate/scenarios/{scenario_id}/prompts/ | Edit scenario prompts | +| [**simulateScenariosPromptsUpdateWithHttpInfo**](ScenariosApi.md#simulateScenariosPromptsUpdateWithHttpInfo) | **PUT** /simulate/scenarios/{scenario_id}/prompts/ | Edit scenario prompts | + + + +## simulateScenariosAddColumnsCreate + +> ScenarioAddColumnsResponse simulateScenariosAddColumnsCreate(scenarioId, scenarioAddColumnsRequest) + +Add columns to scenario + +Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioAddColumnsRequest scenarioAddColumnsRequest = new ScenarioAddColumnsRequest(); // ScenarioAddColumnsRequest | + try { + ScenarioAddColumnsResponse result = apiInstance.simulateScenariosAddColumnsCreate(scenarioId, scenarioAddColumnsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosAddColumnsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioAddColumnsRequest** | [**ScenarioAddColumnsRequest**](ScenarioAddColumnsRequest.md)| | | + +### Return type + +[**ScenarioAddColumnsResponse**](ScenarioAddColumnsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateScenariosAddColumnsCreateWithHttpInfo + +> ApiResponse simulateScenariosAddColumnsCreate simulateScenariosAddColumnsCreateWithHttpInfo(scenarioId, scenarioAddColumnsRequest) + +Add columns to scenario + +Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioAddColumnsRequest scenarioAddColumnsRequest = new ScenarioAddColumnsRequest(); // ScenarioAddColumnsRequest | + try { + ApiResponse response = apiInstance.simulateScenariosAddColumnsCreateWithHttpInfo(scenarioId, scenarioAddColumnsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosAddColumnsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioAddColumnsRequest** | [**ScenarioAddColumnsRequest**](ScenarioAddColumnsRequest.md)| | | + +### Return type + +ApiResponse<[**ScenarioAddColumnsResponse**](ScenarioAddColumnsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateScenariosAddRowsCreate + +> ScenarioAddRowsResponse simulateScenariosAddRowsCreate(scenarioId, scenarioAddRowsRequest) + +Add rows to scenario + +Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioAddRowsRequest scenarioAddRowsRequest = new ScenarioAddRowsRequest(); // ScenarioAddRowsRequest | + try { + ScenarioAddRowsResponse result = apiInstance.simulateScenariosAddRowsCreate(scenarioId, scenarioAddRowsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosAddRowsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioAddRowsRequest** | [**ScenarioAddRowsRequest**](ScenarioAddRowsRequest.md)| | | + +### Return type + +[**ScenarioAddRowsResponse**](ScenarioAddRowsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateScenariosAddRowsCreateWithHttpInfo + +> ApiResponse simulateScenariosAddRowsCreate simulateScenariosAddRowsCreateWithHttpInfo(scenarioId, scenarioAddRowsRequest) + +Add rows to scenario + +Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioAddRowsRequest scenarioAddRowsRequest = new ScenarioAddRowsRequest(); // ScenarioAddRowsRequest | + try { + ApiResponse response = apiInstance.simulateScenariosAddRowsCreateWithHttpInfo(scenarioId, scenarioAddRowsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosAddRowsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioAddRowsRequest** | [**ScenarioAddRowsRequest**](ScenarioAddRowsRequest.md)| | | + +### Return type + +ApiResponse<[**ScenarioAddRowsResponse**](ScenarioAddRowsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateScenariosGetColumnsList + +> ScenarioListResponse simulateScenariosGetColumnsList(search, agentDefinitionId, agentType, page, limit) + +List scenarios + +Returns a paginated list of scenarios for the user's organization. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String search = ""; // String | + UUID agentDefinitionId = UUID.randomUUID(); // UUID | + String agentType = "agentType_example"; // String | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ScenarioListResponse result = apiInstance.simulateScenariosGetColumnsList(search, agentDefinitionId, agentType, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosGetColumnsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **agentDefinitionId** | **UUID**| | [optional] | +| **agentType** | **String**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +[**ScenarioListResponse**](ScenarioListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateScenariosGetColumnsListWithHttpInfo + +> ApiResponse simulateScenariosGetColumnsList simulateScenariosGetColumnsListWithHttpInfo(search, agentDefinitionId, agentType, page, limit) + +List scenarios + +Returns a paginated list of scenarios for the user's organization. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String search = ""; // String | + UUID agentDefinitionId = UUID.randomUUID(); // UUID | + String agentType = "agentType_example"; // String | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ApiResponse response = apiInstance.simulateScenariosGetColumnsListWithHttpInfo(search, agentDefinitionId, agentType, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosGetColumnsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **agentDefinitionId** | **UUID**| | [optional] | +| **agentType** | **String**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +ApiResponse<[**ScenarioListResponse**](ScenarioListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateScenariosPromptsUpdate + +> ScenarioPromptsUpdateResponse simulateScenariosPromptsUpdate(scenarioId, scenarioEditPromptsRequest) + +Edit scenario prompts + +Updates the simulator agent prompt for a scenario. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioEditPromptsRequest scenarioEditPromptsRequest = new ScenarioEditPromptsRequest(); // ScenarioEditPromptsRequest | + try { + ScenarioPromptsUpdateResponse result = apiInstance.simulateScenariosPromptsUpdate(scenarioId, scenarioEditPromptsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosPromptsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioEditPromptsRequest** | [**ScenarioEditPromptsRequest**](ScenarioEditPromptsRequest.md)| | | + +### Return type + +[**ScenarioPromptsUpdateResponse**](ScenarioPromptsUpdateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateScenariosPromptsUpdateWithHttpInfo + +> ApiResponse simulateScenariosPromptsUpdate simulateScenariosPromptsUpdateWithHttpInfo(scenarioId, scenarioEditPromptsRequest) + +Edit scenario prompts + +Updates the simulator agent prompt for a scenario. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.ScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + ScenariosApi apiInstance = new ScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioEditPromptsRequest scenarioEditPromptsRequest = new ScenarioEditPromptsRequest(); // ScenarioEditPromptsRequest | + try { + ApiResponse response = apiInstance.simulateScenariosPromptsUpdateWithHttpInfo(scenarioId, scenarioEditPromptsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling ScenariosApi#simulateScenariosPromptsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioEditPromptsRequest** | [**ScenarioEditPromptsRequest**](ScenarioEditPromptsRequest.md)| | | + +### Return type + +ApiResponse<[**ScenarioPromptsUpdateResponse**](ScenarioPromptsUpdateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SdkApi.md b/java/futureagi/docs/SdkApi.md new file mode 100644 index 0000000..6774646 --- /dev/null +++ b/java/futureagi/docs/SdkApi.md @@ -0,0 +1,1346 @@ +# SdkApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**sdkApiV1ConfigureEvaluationsCreate**](SdkApi.md#sdkApiV1ConfigureEvaluationsCreate) | **POST** /sdk/api/v1/configure-evaluations/ | | +| [**sdkApiV1ConfigureEvaluationsCreateWithHttpInfo**](SdkApi.md#sdkApiV1ConfigureEvaluationsCreateWithHttpInfo) | **POST** /sdk/api/v1/configure-evaluations/ | | +| [**sdkApiV1EvalCreate**](SdkApi.md#sdkApiV1EvalCreate) | **POST** /sdk/api/v1/eval/ | | +| [**sdkApiV1EvalCreateWithHttpInfo**](SdkApi.md#sdkApiV1EvalCreateWithHttpInfo) | **POST** /sdk/api/v1/eval/ | | +| [**sdkApiV1EvalRead**](SdkApi.md#sdkApiV1EvalRead) | **GET** /sdk/api/v1/eval/{eval_id}/ | | +| [**sdkApiV1EvalReadWithHttpInfo**](SdkApi.md#sdkApiV1EvalReadWithHttpInfo) | **GET** /sdk/api/v1/eval/{eval_id}/ | | +| [**sdkApiV1EvaluatePipelineCreate**](SdkApi.md#sdkApiV1EvaluatePipelineCreate) | **POST** /sdk/api/v1/evaluate-pipeline/ | | +| [**sdkApiV1EvaluatePipelineCreateWithHttpInfo**](SdkApi.md#sdkApiV1EvaluatePipelineCreateWithHttpInfo) | **POST** /sdk/api/v1/evaluate-pipeline/ | | +| [**sdkApiV1EvaluatePipelineList**](SdkApi.md#sdkApiV1EvaluatePipelineList) | **GET** /sdk/api/v1/evaluate-pipeline/ | | +| [**sdkApiV1EvaluatePipelineListWithHttpInfo**](SdkApi.md#sdkApiV1EvaluatePipelineListWithHttpInfo) | **GET** /sdk/api/v1/evaluate-pipeline/ | | +| [**sdkApiV1GetEvalsList**](SdkApi.md#sdkApiV1GetEvalsList) | **GET** /sdk/api/v1/get-evals/ | | +| [**sdkApiV1GetEvalsListWithHttpInfo**](SdkApi.md#sdkApiV1GetEvalsListWithHttpInfo) | **GET** /sdk/api/v1/get-evals/ | | +| [**sdkApiV1NewEvalCreate**](SdkApi.md#sdkApiV1NewEvalCreate) | **POST** /sdk/api/v1/new-eval/ | | +| [**sdkApiV1NewEvalCreateWithHttpInfo**](SdkApi.md#sdkApiV1NewEvalCreateWithHttpInfo) | **POST** /sdk/api/v1/new-eval/ | | +| [**sdkApiV1NewEvalList**](SdkApi.md#sdkApiV1NewEvalList) | **GET** /sdk/api/v1/new-eval/ | | +| [**sdkApiV1NewEvalListWithHttpInfo**](SdkApi.md#sdkApiV1NewEvalListWithHttpInfo) | **GET** /sdk/api/v1/new-eval/ | | + + + +## sdkApiV1ConfigureEvaluationsCreate + +> SDKConfigureEvaluationsResponse sdkApiV1ConfigureEvaluationsCreate(sdKConfigureEvaluationsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + SDKConfigureEvaluationsRequest sdKConfigureEvaluationsRequest = new SDKConfigureEvaluationsRequest(); // SDKConfigureEvaluationsRequest | + try { + SDKConfigureEvaluationsResponse result = apiInstance.sdkApiV1ConfigureEvaluationsCreate(sdKConfigureEvaluationsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1ConfigureEvaluationsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sdKConfigureEvaluationsRequest** | [**SDKConfigureEvaluationsRequest**](SDKConfigureEvaluationsRequest.md)| | | + +### Return type + +[**SDKConfigureEvaluationsResponse**](SDKConfigureEvaluationsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1ConfigureEvaluationsCreateWithHttpInfo + +> ApiResponse sdkApiV1ConfigureEvaluationsCreate sdkApiV1ConfigureEvaluationsCreateWithHttpInfo(sdKConfigureEvaluationsRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + SDKConfigureEvaluationsRequest sdKConfigureEvaluationsRequest = new SDKConfigureEvaluationsRequest(); // SDKConfigureEvaluationsRequest | + try { + ApiResponse response = apiInstance.sdkApiV1ConfigureEvaluationsCreateWithHttpInfo(sdKConfigureEvaluationsRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1ConfigureEvaluationsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sdKConfigureEvaluationsRequest** | [**SDKConfigureEvaluationsRequest**](SDKConfigureEvaluationsRequest.md)| | | + +### Return type + +ApiResponse<[**SDKConfigureEvaluationsResponse**](SDKConfigureEvaluationsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## sdkApiV1EvalCreate + +> SDKStandaloneEvalResponse sdkApiV1EvalCreate(sdKStandaloneEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + SDKStandaloneEvalRequest sdKStandaloneEvalRequest = new SDKStandaloneEvalRequest(); // SDKStandaloneEvalRequest | + try { + SDKStandaloneEvalResponse result = apiInstance.sdkApiV1EvalCreate(sdKStandaloneEvalRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sdKStandaloneEvalRequest** | [**SDKStandaloneEvalRequest**](SDKStandaloneEvalRequest.md)| | | + +### Return type + +[**SDKStandaloneEvalResponse**](SDKStandaloneEvalResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1EvalCreateWithHttpInfo + +> ApiResponse sdkApiV1EvalCreate sdkApiV1EvalCreateWithHttpInfo(sdKStandaloneEvalRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + SDKStandaloneEvalRequest sdKStandaloneEvalRequest = new SDKStandaloneEvalRequest(); // SDKStandaloneEvalRequest | + try { + ApiResponse response = apiInstance.sdkApiV1EvalCreateWithHttpInfo(sdKStandaloneEvalRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sdKStandaloneEvalRequest** | [**SDKStandaloneEvalRequest**](SDKStandaloneEvalRequest.md)| | | + +### Return type + +ApiResponse<[**SDKStandaloneEvalResponse**](SDKStandaloneEvalResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## sdkApiV1EvalRead + +> SDKEvalTemplateResponse sdkApiV1EvalRead(evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + String evalId = "evalId_example"; // String | + try { + SDKEvalTemplateResponse result = apiInstance.sdkApiV1EvalRead(evalId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvalRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalId** | **String**| | | + +### Return type + +[**SDKEvalTemplateResponse**](SDKEvalTemplateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1EvalReadWithHttpInfo + +> ApiResponse sdkApiV1EvalRead sdkApiV1EvalReadWithHttpInfo(evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + String evalId = "evalId_example"; // String | + try { + ApiResponse response = apiInstance.sdkApiV1EvalReadWithHttpInfo(evalId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvalRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalId** | **String**| | | + +### Return type + +ApiResponse<[**SDKEvalTemplateResponse**](SDKEvalTemplateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## sdkApiV1EvaluatePipelineCreate + +> SDKCICDEvaluationRunAcceptedResponse sdkApiV1EvaluatePipelineCreate(ciCDJob) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + CICDJob ciCDJob = new CICDJob(); // CICDJob | + try { + SDKCICDEvaluationRunAcceptedResponse result = apiInstance.sdkApiV1EvaluatePipelineCreate(ciCDJob); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvaluatePipelineCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ciCDJob** | [**CICDJob**](CICDJob.md)| | | + +### Return type + +[**SDKCICDEvaluationRunAcceptedResponse**](SDKCICDEvaluationRunAcceptedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1EvaluatePipelineCreateWithHttpInfo + +> ApiResponse sdkApiV1EvaluatePipelineCreate sdkApiV1EvaluatePipelineCreateWithHttpInfo(ciCDJob) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + CICDJob ciCDJob = new CICDJob(); // CICDJob | + try { + ApiResponse response = apiInstance.sdkApiV1EvaluatePipelineCreateWithHttpInfo(ciCDJob); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvaluatePipelineCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ciCDJob** | [**CICDJob**](CICDJob.md)| | | + +### Return type + +ApiResponse<[**SDKCICDEvaluationRunAcceptedResponse**](SDKCICDEvaluationRunAcceptedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## sdkApiV1EvaluatePipelineList + +> SDKCICDEvaluationRunsResponse sdkApiV1EvaluatePipelineList(projectName, versions) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + String projectName = "projectName_example"; // String | + String versions = "versions_example"; // String | + try { + SDKCICDEvaluationRunsResponse result = apiInstance.sdkApiV1EvaluatePipelineList(projectName, versions); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvaluatePipelineList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectName** | **String**| | | +| **versions** | **String**| | | + +### Return type + +[**SDKCICDEvaluationRunsResponse**](SDKCICDEvaluationRunsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1EvaluatePipelineListWithHttpInfo + +> ApiResponse sdkApiV1EvaluatePipelineList sdkApiV1EvaluatePipelineListWithHttpInfo(projectName, versions) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + String projectName = "projectName_example"; // String | + String versions = "versions_example"; // String | + try { + ApiResponse response = apiInstance.sdkApiV1EvaluatePipelineListWithHttpInfo(projectName, versions); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1EvaluatePipelineList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectName** | **String**| | | +| **versions** | **String**| | | + +### Return type + +ApiResponse<[**SDKCICDEvaluationRunsResponse**](SDKCICDEvaluationRunsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## sdkApiV1GetEvalsList + +> SDKGetEvalsResponse sdkApiV1GetEvalsList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + try { + SDKGetEvalsResponse result = apiInstance.sdkApiV1GetEvalsList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1GetEvalsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SDKGetEvalsResponse**](SDKGetEvalsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1GetEvalsListWithHttpInfo + +> ApiResponse sdkApiV1GetEvalsList sdkApiV1GetEvalsListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + try { + ApiResponse response = apiInstance.sdkApiV1GetEvalsListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1GetEvalsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**SDKGetEvalsResponse**](SDKGetEvalsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## sdkApiV1NewEvalCreate + +> SDKStandaloneEvalResponse sdkApiV1NewEvalCreate(sdKStandaloneEvalV2Request) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + SDKStandaloneEvalV2Request sdKStandaloneEvalV2Request = new SDKStandaloneEvalV2Request(); // SDKStandaloneEvalV2Request | + try { + SDKStandaloneEvalResponse result = apiInstance.sdkApiV1NewEvalCreate(sdKStandaloneEvalV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1NewEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sdKStandaloneEvalV2Request** | [**SDKStandaloneEvalV2Request**](SDKStandaloneEvalV2Request.md)| | | + +### Return type + +[**SDKStandaloneEvalResponse**](SDKStandaloneEvalResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1NewEvalCreateWithHttpInfo + +> ApiResponse sdkApiV1NewEvalCreate sdkApiV1NewEvalCreateWithHttpInfo(sdKStandaloneEvalV2Request) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + SDKStandaloneEvalV2Request sdKStandaloneEvalV2Request = new SDKStandaloneEvalV2Request(); // SDKStandaloneEvalV2Request | + try { + ApiResponse response = apiInstance.sdkApiV1NewEvalCreateWithHttpInfo(sdKStandaloneEvalV2Request); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1NewEvalCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sdKStandaloneEvalV2Request** | [**SDKStandaloneEvalV2Request**](SDKStandaloneEvalV2Request.md)| | | + +### Return type + +ApiResponse<[**SDKStandaloneEvalResponse**](SDKStandaloneEvalResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## sdkApiV1NewEvalList + +> SDKStandaloneEvalV2Response sdkApiV1NewEvalList(evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + UUID evalId = UUID.randomUUID(); // UUID | + try { + SDKStandaloneEvalV2Response result = apiInstance.sdkApiV1NewEvalList(evalId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1NewEvalList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalId** | **UUID**| | | + +### Return type + +[**SDKStandaloneEvalV2Response**](SDKStandaloneEvalV2Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## sdkApiV1NewEvalListWithHttpInfo + +> ApiResponse sdkApiV1NewEvalList sdkApiV1NewEvalListWithHttpInfo(evalId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SdkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SdkApi apiInstance = new SdkApi(defaultClient); + UUID evalId = UUID.randomUUID(); // UUID | + try { + ApiResponse response = apiInstance.sdkApiV1NewEvalListWithHttpInfo(evalId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SdkApi#sdkApiV1NewEvalList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **evalId** | **UUID**| | | + +### Return type + +ApiResponse<[**SDKStandaloneEvalV2Response**](SDKStandaloneEvalV2Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SimulateApi.md b/java/futureagi/docs/SimulateApi.md new file mode 100644 index 0000000..9df73cc --- /dev/null +++ b/java/futureagi/docs/SimulateApi.md @@ -0,0 +1,9942 @@ +# SimulateApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**simulateAgentDefinitionsDelete**](SimulateApi.md#simulateAgentDefinitionsDelete) | **DELETE** /simulate/agent-definitions/ | | +| [**simulateAgentDefinitionsDeleteWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsDeleteWithHttpInfo) | **DELETE** /simulate/agent-definitions/ | | +| [**simulateAgentDefinitionsVersionsActivateCreate**](SimulateApi.md#simulateAgentDefinitionsVersionsActivateCreate) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/ | | +| [**simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/ | | +| [**simulateAgentDefinitionsVersionsCallExecutionsList**](SimulateApi.md#simulateAgentDefinitionsVersionsCallExecutionsList) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/ | | +| [**simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/ | | +| [**simulateAgentDefinitionsVersionsCreateCreate**](SimulateApi.md#simulateAgentDefinitionsVersionsCreateCreate) | **POST** /simulate/agent-definitions/{agent_id}/versions/create/ | | +| [**simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo) | **POST** /simulate/agent-definitions/{agent_id}/versions/create/ | | +| [**simulateAgentDefinitionsVersionsDeleteDelete**](SimulateApi.md#simulateAgentDefinitionsVersionsDeleteDelete) | **DELETE** /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/ | | +| [**simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/ | | +| [**simulateAgentDefinitionsVersionsEvalSummaryList**](SimulateApi.md#simulateAgentDefinitionsVersionsEvalSummaryList) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/ | | +| [**simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/ | | +| [**simulateAgentDefinitionsVersionsList**](SimulateApi.md#simulateAgentDefinitionsVersionsList) | **GET** /simulate/agent-definitions/{agent_id}/versions/ | | +| [**simulateAgentDefinitionsVersionsListWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsListWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/ | | +| [**simulateAgentDefinitionsVersionsRead**](SimulateApi.md#simulateAgentDefinitionsVersionsRead) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/ | | +| [**simulateAgentDefinitionsVersionsReadWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsReadWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/versions/{version_id}/ | | +| [**simulateAgentDefinitionsVersionsRestoreCreate**](SimulateApi.md#simulateAgentDefinitionsVersionsRestoreCreate) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/ | | +| [**simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo**](SimulateApi.md#simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo) | **POST** /simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/ | | +| [**simulateApiCallExecutionsList**](SimulateApi.md#simulateApiCallExecutionsList) | **GET** /simulate/api/call-executions/ | | +| [**simulateApiCallExecutionsListWithHttpInfo**](SimulateApi.md#simulateApiCallExecutionsListWithHttpInfo) | **GET** /simulate/api/call-executions/ | | +| [**simulateApiPersonasDuplicate**](SimulateApi.md#simulateApiPersonasDuplicate) | **POST** /simulate/api/personas/{id}/duplicate/ | | +| [**simulateApiPersonasDuplicateWithHttpInfo**](SimulateApi.md#simulateApiPersonasDuplicateWithHttpInfo) | **POST** /simulate/api/personas/{id}/duplicate/ | | +| [**simulateApiPersonasDuplicateCreate**](SimulateApi.md#simulateApiPersonasDuplicateCreate) | **POST** /simulate/api/personas/duplicate/{persona_id}/ | | +| [**simulateApiPersonasDuplicateCreateWithHttpInfo**](SimulateApi.md#simulateApiPersonasDuplicateCreateWithHttpInfo) | **POST** /simulate/api/personas/duplicate/{persona_id}/ | | +| [**simulateApiPersonasFieldOptions**](SimulateApi.md#simulateApiPersonasFieldOptions) | **GET** /simulate/api/personas/field-options/ | | +| [**simulateApiPersonasFieldOptionsWithHttpInfo**](SimulateApi.md#simulateApiPersonasFieldOptionsWithHttpInfo) | **GET** /simulate/api/personas/field-options/ | | +| [**simulateApiPersonasSystemPersonas**](SimulateApi.md#simulateApiPersonasSystemPersonas) | **GET** /simulate/api/personas/system/ | | +| [**simulateApiPersonasSystemPersonasWithHttpInfo**](SimulateApi.md#simulateApiPersonasSystemPersonasWithHttpInfo) | **GET** /simulate/api/personas/system/ | | +| [**simulateApiPersonasUpdate**](SimulateApi.md#simulateApiPersonasUpdate) | **PUT** /simulate/api/personas/{id}/ | | +| [**simulateApiPersonasUpdateWithHttpInfo**](SimulateApi.md#simulateApiPersonasUpdateWithHttpInfo) | **PUT** /simulate/api/personas/{id}/ | | +| [**simulateApiPersonasWorkspacePersonas**](SimulateApi.md#simulateApiPersonasWorkspacePersonas) | **GET** /simulate/api/personas/workspace/ | | +| [**simulateApiPersonasWorkspacePersonasWithHttpInfo**](SimulateApi.md#simulateApiPersonasWorkspacePersonasWithHttpInfo) | **GET** /simulate/api/personas/workspace/ | | +| [**simulateApiRunTestsList**](SimulateApi.md#simulateApiRunTestsList) | **GET** /simulate/api/run-tests/ | | +| [**simulateApiRunTestsListWithHttpInfo**](SimulateApi.md#simulateApiRunTestsListWithHttpInfo) | **GET** /simulate/api/run-tests/ | | +| [**simulateCallExecutionsBranchAnalysisCreate**](SimulateApi.md#simulateCallExecutionsBranchAnalysisCreate) | **POST** /simulate/call-executions/{call_execution_id}/branch-analysis/ | | +| [**simulateCallExecutionsBranchAnalysisCreateWithHttpInfo**](SimulateApi.md#simulateCallExecutionsBranchAnalysisCreateWithHttpInfo) | **POST** /simulate/call-executions/{call_execution_id}/branch-analysis/ | | +| [**simulateCallExecutionsBranchAnalysisList**](SimulateApi.md#simulateCallExecutionsBranchAnalysisList) | **GET** /simulate/call-executions/{call_execution_id}/branch-analysis/ | | +| [**simulateCallExecutionsBranchAnalysisListWithHttpInfo**](SimulateApi.md#simulateCallExecutionsBranchAnalysisListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/branch-analysis/ | | +| [**simulateCallExecutionsChatSendMessageCreate**](SimulateApi.md#simulateCallExecutionsChatSendMessageCreate) | **POST** /simulate/call-executions/{call_execution_id}/chat/send-message/ | | +| [**simulateCallExecutionsChatSendMessageCreateWithHttpInfo**](SimulateApi.md#simulateCallExecutionsChatSendMessageCreateWithHttpInfo) | **POST** /simulate/call-executions/{call_execution_id}/chat/send-message/ | | +| [**simulateCallExecutionsDeleteDelete**](SimulateApi.md#simulateCallExecutionsDeleteDelete) | **DELETE** /simulate/call-executions/{call_execution_id}/delete/ | | +| [**simulateCallExecutionsDeleteDeleteWithHttpInfo**](SimulateApi.md#simulateCallExecutionsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/call-executions/{call_execution_id}/delete/ | | +| [**simulateCallExecutionsErrorLocalizerTasksList**](SimulateApi.md#simulateCallExecutionsErrorLocalizerTasksList) | **GET** /simulate/call-executions/{call_execution_id}/error-localizer-tasks/ | | +| [**simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo**](SimulateApi.md#simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/error-localizer-tasks/ | | +| [**simulateCallExecutionsLogsList**](SimulateApi.md#simulateCallExecutionsLogsList) | **GET** /simulate/call-executions/{call_execution_id}/logs/ | | +| [**simulateCallExecutionsLogsListWithHttpInfo**](SimulateApi.md#simulateCallExecutionsLogsListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/logs/ | | +| [**simulateCallExecutionsPartialUpdate**](SimulateApi.md#simulateCallExecutionsPartialUpdate) | **PATCH** /simulate/call-executions/{call_execution_id}/ | | +| [**simulateCallExecutionsPartialUpdateWithHttpInfo**](SimulateApi.md#simulateCallExecutionsPartialUpdateWithHttpInfo) | **PATCH** /simulate/call-executions/{call_execution_id}/ | | +| [**simulateCallExecutionsRead**](SimulateApi.md#simulateCallExecutionsRead) | **GET** /simulate/call-executions/{call_execution_id}/ | | +| [**simulateCallExecutionsReadWithHttpInfo**](SimulateApi.md#simulateCallExecutionsReadWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/ | | +| [**simulateCallExecutionsSessionComparisonList**](SimulateApi.md#simulateCallExecutionsSessionComparisonList) | **GET** /simulate/call-executions/{call_execution_id}/session-comparison/ | | +| [**simulateCallExecutionsSessionComparisonListWithHttpInfo**](SimulateApi.md#simulateCallExecutionsSessionComparisonListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/session-comparison/ | | +| [**simulateCallExecutionsTranscriptsList**](SimulateApi.md#simulateCallExecutionsTranscriptsList) | **GET** /simulate/call-executions/{call_execution_id}/transcripts/ | | +| [**simulateCallExecutionsTranscriptsListWithHttpInfo**](SimulateApi.md#simulateCallExecutionsTranscriptsListWithHttpInfo) | **GET** /simulate/call-executions/{call_execution_id}/transcripts/ | | +| [**simulateExportRead**](SimulateApi.md#simulateExportRead) | **GET** /simulate/export/{item_id}/ | | +| [**simulateExportReadWithHttpInfo**](SimulateApi.md#simulateExportReadWithHttpInfo) | **GET** /simulate/export/{item_id}/ | | +| [**simulatePromptSimulationsScenariosList**](SimulateApi.md#simulatePromptSimulationsScenariosList) | **GET** /simulate/prompt-simulations/scenarios/ | Get list of scenarios available for prompt simulations. | +| [**simulatePromptSimulationsScenariosListWithHttpInfo**](SimulateApi.md#simulatePromptSimulationsScenariosListWithHttpInfo) | **GET** /simulate/prompt-simulations/scenarios/ | Get list of scenarios available for prompt simulations. | +| [**simulatePromptTemplatesSimulationsCreate**](SimulateApi.md#simulatePromptTemplatesSimulationsCreate) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Create a new prompt-based simulation run. | +| [**simulatePromptTemplatesSimulationsCreateWithHttpInfo**](SimulateApi.md#simulatePromptTemplatesSimulationsCreateWithHttpInfo) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Create a new prompt-based simulation run. | +| [**simulatePromptTemplatesSimulationsDelete**](SimulateApi.md#simulatePromptTemplatesSimulationsDelete) | **DELETE** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | | +| [**simulatePromptTemplatesSimulationsDeleteWithHttpInfo**](SimulateApi.md#simulatePromptTemplatesSimulationsDeleteWithHttpInfo) | **DELETE** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | | +| [**simulatePromptTemplatesSimulationsExecuteCreate**](SimulateApi.md#simulatePromptTemplatesSimulationsExecuteCreate) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/ | Execute a prompt-based simulation run. | +| [**simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo**](SimulateApi.md#simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo) | **POST** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/ | Execute a prompt-based simulation run. | +| [**simulatePromptTemplatesSimulationsList**](SimulateApi.md#simulatePromptTemplatesSimulationsList) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Get paginated list of simulation runs for a specific prompt template. | +| [**simulatePromptTemplatesSimulationsListWithHttpInfo**](SimulateApi.md#simulatePromptTemplatesSimulationsListWithHttpInfo) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/ | Get paginated list of simulation runs for a specific prompt template. | +| [**simulatePromptTemplatesSimulationsPartialUpdate**](SimulateApi.md#simulatePromptTemplatesSimulationsPartialUpdate) | **PATCH** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | | +| [**simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo**](SimulateApi.md#simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo) | **PATCH** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | | +| [**simulatePromptTemplatesSimulationsRead**](SimulateApi.md#simulatePromptTemplatesSimulationsRead) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | | +| [**simulatePromptTemplatesSimulationsReadWithHttpInfo**](SimulateApi.md#simulatePromptTemplatesSimulationsReadWithHttpInfo) | **GET** /simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/ | | +| [**simulateRunTestsActiveList**](SimulateApi.md#simulateRunTestsActiveList) | **GET** /simulate/run-tests/active/ | | +| [**simulateRunTestsActiveListWithHttpInfo**](SimulateApi.md#simulateRunTestsActiveListWithHttpInfo) | **GET** /simulate/run-tests/active/ | | +| [**simulateRunTestsChatExecuteCreate**](SimulateApi.md#simulateRunTestsChatExecuteCreate) | **POST** /simulate/run-tests/{run_test_id}/chat-execute/ | | +| [**simulateRunTestsChatExecuteCreateWithHttpInfo**](SimulateApi.md#simulateRunTestsChatExecuteCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/chat-execute/ | | +| [**simulateRunTestsComponentsPartialUpdate**](SimulateApi.md#simulateRunTestsComponentsPartialUpdate) | **PATCH** /simulate/run-tests/{run_test_id}/components/ | | +| [**simulateRunTestsComponentsPartialUpdateWithHttpInfo**](SimulateApi.md#simulateRunTestsComponentsPartialUpdateWithHttpInfo) | **PATCH** /simulate/run-tests/{run_test_id}/components/ | | +| [**simulateRunTestsDeleteDelete**](SimulateApi.md#simulateRunTestsDeleteDelete) | **DELETE** /simulate/run-tests/{run_test_id}/delete/ | | +| [**simulateRunTestsDeleteDeleteWithHttpInfo**](SimulateApi.md#simulateRunTestsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/run-tests/{run_test_id}/delete/ | | +| [**simulateRunTestsDeleteTestExecutionsCreate**](SimulateApi.md#simulateRunTestsDeleteTestExecutionsCreate) | **POST** /simulate/run-tests/{run_test_id}/delete-test-executions/ | | +| [**simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo**](SimulateApi.md#simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/delete-test-executions/ | | +| [**simulateRunTestsEvalConfigsGetStructureList**](SimulateApi.md#simulateRunTestsEvalConfigsGetStructureList) | **GET** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/ | | +| [**simulateRunTestsEvalConfigsGetStructureListWithHttpInfo**](SimulateApi.md#simulateRunTestsEvalConfigsGetStructureListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/ | | +| [**simulateRunTestsGetIdByNameRead**](SimulateApi.md#simulateRunTestsGetIdByNameRead) | **GET** /simulate/run-tests/get-id-by-name/{run_test_name}/ | | +| [**simulateRunTestsGetIdByNameReadWithHttpInfo**](SimulateApi.md#simulateRunTestsGetIdByNameReadWithHttpInfo) | **GET** /simulate/run-tests/get-id-by-name/{run_test_name}/ | | +| [**simulateRunTestsRerunTestExecutionsCreate**](SimulateApi.md#simulateRunTestsRerunTestExecutionsCreate) | **POST** /simulate/run-tests/{run_test_id}/rerun-test-executions/ | | +| [**simulateRunTestsRerunTestExecutionsCreateWithHttpInfo**](SimulateApi.md#simulateRunTestsRerunTestExecutionsCreateWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/rerun-test-executions/ | | +| [**simulateRunTestsScenariosList**](SimulateApi.md#simulateRunTestsScenariosList) | **GET** /simulate/run-tests/{run_test_id}/scenarios/ | | +| [**simulateRunTestsScenariosListWithHttpInfo**](SimulateApi.md#simulateRunTestsScenariosListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/scenarios/ | | +| [**simulateRunTestsSdkCodeList**](SimulateApi.md#simulateRunTestsSdkCodeList) | **GET** /simulate/run-tests/{run_test_id}/sdk-code/ | | +| [**simulateRunTestsSdkCodeListWithHttpInfo**](SimulateApi.md#simulateRunTestsSdkCodeListWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/sdk-code/ | | +| [**simulateSimulatorAgentsCreateCreate**](SimulateApi.md#simulateSimulatorAgentsCreateCreate) | **POST** /simulate/simulator-agents/create/ | | +| [**simulateSimulatorAgentsCreateCreateWithHttpInfo**](SimulateApi.md#simulateSimulatorAgentsCreateCreateWithHttpInfo) | **POST** /simulate/simulator-agents/create/ | | +| [**simulateSimulatorAgentsDeleteDelete**](SimulateApi.md#simulateSimulatorAgentsDeleteDelete) | **DELETE** /simulate/simulator-agents/{agent_id}/delete/ | | +| [**simulateSimulatorAgentsDeleteDeleteWithHttpInfo**](SimulateApi.md#simulateSimulatorAgentsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/simulator-agents/{agent_id}/delete/ | | +| [**simulateSimulatorAgentsEditUpdate**](SimulateApi.md#simulateSimulatorAgentsEditUpdate) | **PUT** /simulate/simulator-agents/{agent_id}/edit/ | | +| [**simulateSimulatorAgentsEditUpdateWithHttpInfo**](SimulateApi.md#simulateSimulatorAgentsEditUpdateWithHttpInfo) | **PUT** /simulate/simulator-agents/{agent_id}/edit/ | | +| [**simulateSimulatorAgentsList**](SimulateApi.md#simulateSimulatorAgentsList) | **GET** /simulate/simulator-agents/ | | +| [**simulateSimulatorAgentsListWithHttpInfo**](SimulateApi.md#simulateSimulatorAgentsListWithHttpInfo) | **GET** /simulate/simulator-agents/ | | +| [**simulateSimulatorAgentsRead**](SimulateApi.md#simulateSimulatorAgentsRead) | **GET** /simulate/simulator-agents/{agent_id}/ | | +| [**simulateSimulatorAgentsReadWithHttpInfo**](SimulateApi.md#simulateSimulatorAgentsReadWithHttpInfo) | **GET** /simulate/simulator-agents/{agent_id}/ | | +| [**simulateTestExecutionsChatCallExecutionsBatchCreate**](SimulateApi.md#simulateTestExecutionsChatCallExecutionsBatchCreate) | **POST** /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/ | Create a batch of CallExecution records for chat execution (exactly 10 per API call). | +| [**simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo**](SimulateApi.md#simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/chat/call-executions/batch/ | Create a batch of CallExecution records for chat execution (exactly 10 per API call). | +| [**simulateTestExecutionsColumnOrderUpdate**](SimulateApi.md#simulateTestExecutionsColumnOrderUpdate) | **PUT** /simulate/test-executions/{test_execution_id}/column-order/ | | +| [**simulateTestExecutionsColumnOrderUpdateWithHttpInfo**](SimulateApi.md#simulateTestExecutionsColumnOrderUpdateWithHttpInfo) | **PUT** /simulate/test-executions/{test_execution_id}/column-order/ | | +| [**simulateTestExecutionsDeleteDelete**](SimulateApi.md#simulateTestExecutionsDeleteDelete) | **DELETE** /simulate/test-executions/{test_execution_id}/delete/ | | +| [**simulateTestExecutionsDeleteDeleteWithHttpInfo**](SimulateApi.md#simulateTestExecutionsDeleteDeleteWithHttpInfo) | **DELETE** /simulate/test-executions/{test_execution_id}/delete/ | | +| [**simulateTestExecutionsEvalExplanationSummaryList**](SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryList) | **GET** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/ | | +| [**simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo**](SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/ | | +| [**simulateTestExecutionsEvalExplanationSummaryRefreshCreate**](SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryRefreshCreate) | **POST** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/ | | +| [**simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo**](SimulateApi.md#simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/ | | +| [**simulateTestExecutionsOptimiserAnalysisList**](SimulateApi.md#simulateTestExecutionsOptimiserAnalysisList) | **GET** /simulate/test-executions/{test_execution_id}/optimiser-analysis/ | | +| [**simulateTestExecutionsOptimiserAnalysisListWithHttpInfo**](SimulateApi.md#simulateTestExecutionsOptimiserAnalysisListWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/optimiser-analysis/ | | +| [**simulateTestExecutionsOptimiserAnalysisRefreshCreate**](SimulateApi.md#simulateTestExecutionsOptimiserAnalysisRefreshCreate) | **POST** /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/ | | +| [**simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo**](SimulateApi.md#simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/ | | +| [**simulateTestExecutionsRerunCallsCreate**](SimulateApi.md#simulateTestExecutionsRerunCallsCreate) | **POST** /simulate/test-executions/{test_execution_id}/rerun-calls/ | | +| [**simulateTestExecutionsRerunCallsCreateWithHttpInfo**](SimulateApi.md#simulateTestExecutionsRerunCallsCreateWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/rerun-calls/ | | + + + +## simulateAgentDefinitionsDelete + +> AgentDefinitionBulkDeleteResponse simulateAgentDefinitionsDelete(agentDefinitionBulkDeleteRequest) + + + +Bulk soft-delete agent definitions. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + AgentDefinitionBulkDeleteRequest agentDefinitionBulkDeleteRequest = new AgentDefinitionBulkDeleteRequest(); // AgentDefinitionBulkDeleteRequest | + try { + AgentDefinitionBulkDeleteResponse result = apiInstance.simulateAgentDefinitionsDelete(agentDefinitionBulkDeleteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentDefinitionBulkDeleteRequest** | [**AgentDefinitionBulkDeleteRequest**](AgentDefinitionBulkDeleteRequest.md)| | | + +### Return type + +[**AgentDefinitionBulkDeleteResponse**](AgentDefinitionBulkDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsDeleteWithHttpInfo + +> ApiResponse simulateAgentDefinitionsDelete simulateAgentDefinitionsDeleteWithHttpInfo(agentDefinitionBulkDeleteRequest) + + + +Bulk soft-delete agent definitions. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + AgentDefinitionBulkDeleteRequest agentDefinitionBulkDeleteRequest = new AgentDefinitionBulkDeleteRequest(); // AgentDefinitionBulkDeleteRequest | + try { + ApiResponse response = apiInstance.simulateAgentDefinitionsDeleteWithHttpInfo(agentDefinitionBulkDeleteRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentDefinitionBulkDeleteRequest** | [**AgentDefinitionBulkDeleteRequest**](AgentDefinitionBulkDeleteRequest.md)| | | + +### Return type + +ApiResponse<[**AgentDefinitionBulkDeleteResponse**](AgentDefinitionBulkDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsActivateCreate + +> AgentVersionActivateResponse simulateAgentDefinitionsVersionsActivateCreate(agentId, versionId, body) + + + +Activate a specific agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + AgentVersionActivateResponse result = apiInstance.simulateAgentDefinitionsVersionsActivateCreate(agentId, versionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsActivateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**AgentVersionActivateResponse**](AgentVersionActivateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo + +> ApiResponse simulateAgentDefinitionsVersionsActivateCreate simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo(agentId, versionId, body) + + + +Activate a specific agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo(agentId, versionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsActivateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**AgentVersionActivateResponse**](AgentVersionActivateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsCallExecutionsList + +> List simulateAgentDefinitionsVersionsCallExecutionsList(agentId, versionId) + + + +Get the call executions of an agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + List result = apiInstance.simulateAgentDefinitionsVersionsCallExecutionsList(agentId, versionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsCallExecutionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +[**List<CallExecution>**](CallExecution.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo + +> ApiResponse> simulateAgentDefinitionsVersionsCallExecutionsList simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo(agentId, versionId) + + + +Get the call executions of an agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + ApiResponse> response = apiInstance.simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo(agentId, versionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsCallExecutionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +ApiResponse<[**List<CallExecution>**](CallExecution.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsCreateCreate + +> AgentVersionCreateResponse simulateAgentDefinitionsVersionsCreateCreate(agentId, agentVersionCreateRequest) + + + +Create a new version of an agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + AgentVersionCreateRequest agentVersionCreateRequest = new AgentVersionCreateRequest(); // AgentVersionCreateRequest | + try { + AgentVersionCreateResponse result = apiInstance.simulateAgentDefinitionsVersionsCreateCreate(agentId, agentVersionCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsCreateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **agentVersionCreateRequest** | [**AgentVersionCreateRequest**](AgentVersionCreateRequest.md)| | | + +### Return type + +[**AgentVersionCreateResponse**](AgentVersionCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo + +> ApiResponse simulateAgentDefinitionsVersionsCreateCreate simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo(agentId, agentVersionCreateRequest) + + + +Create a new version of an agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + AgentVersionCreateRequest agentVersionCreateRequest = new AgentVersionCreateRequest(); // AgentVersionCreateRequest | + try { + ApiResponse response = apiInstance.simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo(agentId, agentVersionCreateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsCreateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **agentVersionCreateRequest** | [**AgentVersionCreateRequest**](AgentVersionCreateRequest.md)| | | + +### Return type + +ApiResponse<[**AgentVersionCreateResponse**](AgentVersionCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsDeleteDelete + +> AgentVersionDeleteResponse simulateAgentDefinitionsVersionsDeleteDelete(agentId, versionId) + + + +Soft delete an agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + AgentVersionDeleteResponse result = apiInstance.simulateAgentDefinitionsVersionsDeleteDelete(agentId, versionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +[**AgentVersionDeleteResponse**](AgentVersionDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo + +> ApiResponse simulateAgentDefinitionsVersionsDeleteDelete simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo(agentId, versionId) + + + +Soft delete an agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo(agentId, versionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +ApiResponse<[**AgentVersionDeleteResponse**](AgentVersionDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsEvalSummaryList + +> EvalSummaryResponse simulateAgentDefinitionsVersionsEvalSummaryList(agentId, versionId) + + + +Get the eval summary of an agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + EvalSummaryResponse result = apiInstance.simulateAgentDefinitionsVersionsEvalSummaryList(agentId, versionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsEvalSummaryList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +[**EvalSummaryResponse**](EvalSummaryResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo + +> ApiResponse simulateAgentDefinitionsVersionsEvalSummaryList simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo(agentId, versionId) + + + +Get the eval summary of an agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo(agentId, versionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsEvalSummaryList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +ApiResponse<[**EvalSummaryResponse**](EvalSummaryResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsList + +> List simulateAgentDefinitionsVersionsList(agentId) + + + +Get all versions of a specific agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + List result = apiInstance.simulateAgentDefinitionsVersionsList(agentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +[**List<AgentVersionListResponse>**](AgentVersionListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsListWithHttpInfo + +> ApiResponse> simulateAgentDefinitionsVersionsList simulateAgentDefinitionsVersionsListWithHttpInfo(agentId) + + + +Get all versions of a specific agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + ApiResponse> response = apiInstance.simulateAgentDefinitionsVersionsListWithHttpInfo(agentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +ApiResponse<[**List<AgentVersionListResponse>**](AgentVersionListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsRead + +> AgentVersionResponse simulateAgentDefinitionsVersionsRead(agentId, versionId) + + + +Get details of a specific agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + AgentVersionResponse result = apiInstance.simulateAgentDefinitionsVersionsRead(agentId, versionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +[**AgentVersionResponse**](AgentVersionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsReadWithHttpInfo + +> ApiResponse simulateAgentDefinitionsVersionsRead simulateAgentDefinitionsVersionsReadWithHttpInfo(agentId, versionId) + + + +Get details of a specific agent version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateAgentDefinitionsVersionsReadWithHttpInfo(agentId, versionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | + +### Return type + +ApiResponse<[**AgentVersionResponse**](AgentVersionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateAgentDefinitionsVersionsRestoreCreate + +> AgentVersionRestoreResponse simulateAgentDefinitionsVersionsRestoreCreate(agentId, versionId, body) + + + +Restore agent definition from a specific version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + AgentVersionRestoreResponse result = apiInstance.simulateAgentDefinitionsVersionsRestoreCreate(agentId, versionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsRestoreCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**AgentVersionRestoreResponse**](AgentVersionRestoreResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo + +> ApiResponse simulateAgentDefinitionsVersionsRestoreCreate simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo(agentId, versionId, body) + + + +Restore agent definition from a specific version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + String versionId = "versionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo(agentId, versionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateAgentDefinitionsVersionsRestoreCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **versionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**AgentVersionRestoreResponse**](AgentVersionRestoreResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateApiCallExecutionsList + +> List simulateApiCallExecutionsList(search, status, testExecutionId, page, limit) + + + +Get paginated list of call executions for the user's organization Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call status - test_execution_id: filter by specific test execution - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String search = ""; // String | + String status = ""; // String | + UUID testExecutionId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + List result = apiInstance.simulateApiCallExecutionsList(search, status, testExecutionId, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiCallExecutionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **status** | **String**| | [optional] [default to ] | +| **testExecutionId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +[**List<CallExecution>**](CallExecution.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateApiCallExecutionsListWithHttpInfo + +> ApiResponse> simulateApiCallExecutionsList simulateApiCallExecutionsListWithHttpInfo(search, status, testExecutionId, page, limit) + + + +Get paginated list of call executions for the user's organization Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call status - test_execution_id: filter by specific test execution - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String search = ""; // String | + String status = ""; // String | + UUID testExecutionId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ApiResponse> response = apiInstance.simulateApiCallExecutionsListWithHttpInfo(search, status, testExecutionId, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiCallExecutionsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **status** | **String**| | [optional] [default to ] | +| **testExecutionId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +ApiResponse<[**List<CallExecution>**](CallExecution.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateApiPersonasDuplicate + +> PersonaDuplicateResponse simulateApiPersonasDuplicate(id, personaDuplicateRequest) + + + +Duplicate a persona (creates a workspace-level copy) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String id = "id_example"; // String | + PersonaDuplicateRequest personaDuplicateRequest = new PersonaDuplicateRequest(); // PersonaDuplicateRequest | + try { + PersonaDuplicateResponse result = apiInstance.simulateApiPersonasDuplicate(id, personaDuplicateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasDuplicate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **personaDuplicateRequest** | [**PersonaDuplicateRequest**](PersonaDuplicateRequest.md)| | | + +### Return type + +[**PersonaDuplicateResponse**](PersonaDuplicateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateApiPersonasDuplicateWithHttpInfo + +> ApiResponse simulateApiPersonasDuplicate simulateApiPersonasDuplicateWithHttpInfo(id, personaDuplicateRequest) + + + +Duplicate a persona (creates a workspace-level copy) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String id = "id_example"; // String | + PersonaDuplicateRequest personaDuplicateRequest = new PersonaDuplicateRequest(); // PersonaDuplicateRequest | + try { + ApiResponse response = apiInstance.simulateApiPersonasDuplicateWithHttpInfo(id, personaDuplicateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasDuplicate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **personaDuplicateRequest** | [**PersonaDuplicateRequest**](PersonaDuplicateRequest.md)| | | + +### Return type + +ApiResponse<[**PersonaDuplicateResponse**](PersonaDuplicateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateApiPersonasDuplicateCreate + +> PersonaDuplicateResponse simulateApiPersonasDuplicateCreate(personaId, personaDuplicateRequest) + + + +Duplicate a persona by ID + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String personaId = "personaId_example"; // String | + PersonaDuplicateRequest personaDuplicateRequest = new PersonaDuplicateRequest(); // PersonaDuplicateRequest | + try { + PersonaDuplicateResponse result = apiInstance.simulateApiPersonasDuplicateCreate(personaId, personaDuplicateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasDuplicateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **personaId** | **String**| | | +| **personaDuplicateRequest** | [**PersonaDuplicateRequest**](PersonaDuplicateRequest.md)| | | + +### Return type + +[**PersonaDuplicateResponse**](PersonaDuplicateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **0** | Default error response | - | + +## simulateApiPersonasDuplicateCreateWithHttpInfo + +> ApiResponse simulateApiPersonasDuplicateCreate simulateApiPersonasDuplicateCreateWithHttpInfo(personaId, personaDuplicateRequest) + + + +Duplicate a persona by ID + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String personaId = "personaId_example"; // String | + PersonaDuplicateRequest personaDuplicateRequest = new PersonaDuplicateRequest(); // PersonaDuplicateRequest | + try { + ApiResponse response = apiInstance.simulateApiPersonasDuplicateCreateWithHttpInfo(personaId, personaDuplicateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasDuplicateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **personaId** | **String**| | | +| **personaDuplicateRequest** | [**PersonaDuplicateRequest**](PersonaDuplicateRequest.md)| | | + +### Return type + +ApiResponse<[**PersonaDuplicateResponse**](PersonaDuplicateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **0** | Default error response | - | + + +## simulateApiPersonasFieldOptions + +> SimulateApiPersonasFieldOptions200Response simulateApiPersonasFieldOptions(page, limit) + + + +Get field options/choices for persona creation + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + SimulateApiPersonasFieldOptions200Response result = apiInstance.simulateApiPersonasFieldOptions(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasFieldOptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**SimulateApiPersonasFieldOptions200Response**](SimulateApiPersonasFieldOptions200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateApiPersonasFieldOptionsWithHttpInfo + +> ApiResponse simulateApiPersonasFieldOptions simulateApiPersonasFieldOptionsWithHttpInfo(page, limit) + + + +Get field options/choices for persona creation + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.simulateApiPersonasFieldOptionsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasFieldOptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**SimulateApiPersonasFieldOptions200Response**](SimulateApiPersonasFieldOptions200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateApiPersonasSystemPersonas + +> SimulateApiPersonasSystemPersonas200Response simulateApiPersonasSystemPersonas(page, limit) + + + +Get only system-level personas + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + SimulateApiPersonasSystemPersonas200Response result = apiInstance.simulateApiPersonasSystemPersonas(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasSystemPersonas"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**SimulateApiPersonasSystemPersonas200Response**](SimulateApiPersonasSystemPersonas200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateApiPersonasSystemPersonasWithHttpInfo + +> ApiResponse simulateApiPersonasSystemPersonas simulateApiPersonasSystemPersonasWithHttpInfo(page, limit) + + + +Get only system-level personas + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.simulateApiPersonasSystemPersonasWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasSystemPersonas"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**SimulateApiPersonasSystemPersonas200Response**](SimulateApiPersonasSystemPersonas200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateApiPersonasUpdate + +> Persona simulateApiPersonasUpdate(id, persona) + + + +Update a persona (workspace-level only) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String id = "id_example"; // String | + Persona persona = new Persona(); // Persona | + try { + Persona result = apiInstance.simulateApiPersonasUpdate(id, persona); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **persona** | [**Persona**](Persona.md)| | | + +### Return type + +[**Persona**](Persona.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateApiPersonasUpdateWithHttpInfo + +> ApiResponse simulateApiPersonasUpdate simulateApiPersonasUpdateWithHttpInfo(id, persona) + + + +Update a persona (workspace-level only) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String id = "id_example"; // String | + Persona persona = new Persona(); // Persona | + try { + ApiResponse response = apiInstance.simulateApiPersonasUpdateWithHttpInfo(id, persona); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **persona** | [**Persona**](Persona.md)| | | + +### Return type + +ApiResponse<[**Persona**](Persona.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateApiPersonasWorkspacePersonas + +> SimulateApiPersonasSystemPersonas200Response simulateApiPersonasWorkspacePersonas(page, limit) + + + +Get only workspace-level personas + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + SimulateApiPersonasSystemPersonas200Response result = apiInstance.simulateApiPersonasWorkspacePersonas(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasWorkspacePersonas"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**SimulateApiPersonasSystemPersonas200Response**](SimulateApiPersonasSystemPersonas200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateApiPersonasWorkspacePersonasWithHttpInfo + +> ApiResponse simulateApiPersonasWorkspacePersonas simulateApiPersonasWorkspacePersonasWithHttpInfo(page, limit) + + + +Get only workspace-level personas + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.simulateApiPersonasWorkspacePersonasWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiPersonasWorkspacePersonas"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**SimulateApiPersonasSystemPersonas200Response**](SimulateApiPersonasSystemPersonas200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateApiRunTestsList + +> List simulateApiRunTestsList(search, simulationType, promptTemplateId, page, limit) + + + +Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String search = ""; // String | + String simulationType = "agent_definition"; // String | + UUID promptTemplateId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + List result = apiInstance.simulateApiRunTestsList(search, simulationType, promptTemplateId, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiRunTestsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **simulationType** | **String**| | [optional] [enum: agent_definition, prompt] | +| **promptTemplateId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +[**List<RunTestResponse>**](RunTestResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateApiRunTestsListWithHttpInfo + +> ApiResponse> simulateApiRunTestsList simulateApiRunTestsListWithHttpInfo(search, simulationType, promptTemplateId, page, limit) + + + +Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String search = ""; // String | + String simulationType = "agent_definition"; // String | + UUID promptTemplateId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ApiResponse> response = apiInstance.simulateApiRunTestsListWithHttpInfo(search, simulationType, promptTemplateId, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateApiRunTestsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **simulationType** | **String**| | [optional] [enum: agent_definition, prompt] | +| **promptTemplateId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +ApiResponse<[**List<RunTestResponse>**](RunTestResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsBranchAnalysisCreate + +> CallBranchDeviationCreateResponse simulateCallExecutionsBranchAnalysisCreate(callExecutionId, body) + + + +Create deviation nodes and edges for a call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + Object body = null; // Object | + try { + CallBranchDeviationCreateResponse result = apiInstance.simulateCallExecutionsBranchAnalysisCreate(callExecutionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsBranchAnalysisCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**CallBranchDeviationCreateResponse**](CallBranchDeviationCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsBranchAnalysisCreateWithHttpInfo + +> ApiResponse simulateCallExecutionsBranchAnalysisCreate simulateCallExecutionsBranchAnalysisCreateWithHttpInfo(callExecutionId, body) + + + +Create deviation nodes and edges for a call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.simulateCallExecutionsBranchAnalysisCreateWithHttpInfo(callExecutionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsBranchAnalysisCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**CallBranchDeviationCreateResponse**](CallBranchDeviationCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsBranchAnalysisList + +> CallBranchAnalysisResponse simulateCallExecutionsBranchAnalysisList(callExecutionId) + + + +Analyze a call execution against graph branches and identify deviations + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + CallBranchAnalysisResponse result = apiInstance.simulateCallExecutionsBranchAnalysisList(callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsBranchAnalysisList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +[**CallBranchAnalysisResponse**](CallBranchAnalysisResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsBranchAnalysisListWithHttpInfo + +> ApiResponse simulateCallExecutionsBranchAnalysisList simulateCallExecutionsBranchAnalysisListWithHttpInfo(callExecutionId) + + + +Analyze a call execution against graph branches and identify deviations + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateCallExecutionsBranchAnalysisListWithHttpInfo(callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsBranchAnalysisList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**CallBranchAnalysisResponse**](CallBranchAnalysisResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsChatSendMessageCreate + +> ChatSendMessageResponse simulateCallExecutionsChatSendMessageCreate(callExecutionId, sendChatRequest) + + + +Send a message to a chat execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + SendChatRequest sendChatRequest = new SendChatRequest(); // SendChatRequest | + try { + ChatSendMessageResponse result = apiInstance.simulateCallExecutionsChatSendMessageCreate(callExecutionId, sendChatRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsChatSendMessageCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | +| **sendChatRequest** | [**SendChatRequest**](SendChatRequest.md)| | | + +### Return type + +[**ChatSendMessageResponse**](ChatSendMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsChatSendMessageCreateWithHttpInfo + +> ApiResponse simulateCallExecutionsChatSendMessageCreate simulateCallExecutionsChatSendMessageCreateWithHttpInfo(callExecutionId, sendChatRequest) + + + +Send a message to a chat execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + SendChatRequest sendChatRequest = new SendChatRequest(); // SendChatRequest | + try { + ApiResponse response = apiInstance.simulateCallExecutionsChatSendMessageCreateWithHttpInfo(callExecutionId, sendChatRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsChatSendMessageCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | +| **sendChatRequest** | [**SendChatRequest**](SendChatRequest.md)| | | + +### Return type + +ApiResponse<[**ChatSendMessageResponse**](ChatSendMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsDeleteDelete + +> CallExecutionDeleteResponse simulateCallExecutionsDeleteDelete(callExecutionId) + + + +Delete a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + CallExecutionDeleteResponse result = apiInstance.simulateCallExecutionsDeleteDelete(callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +[**CallExecutionDeleteResponse**](CallExecutionDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsDeleteDeleteWithHttpInfo + +> ApiResponse simulateCallExecutionsDeleteDelete simulateCallExecutionsDeleteDeleteWithHttpInfo(callExecutionId) + + + +Delete a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateCallExecutionsDeleteDeleteWithHttpInfo(callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**CallExecutionDeleteResponse**](CallExecutionDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsErrorLocalizerTasksList + +> CallExecutionErrorLocalizerTasksResponse simulateCallExecutionsErrorLocalizerTasksList(callExecutionId) + + + +Get error localizer tasks for a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + CallExecutionErrorLocalizerTasksResponse result = apiInstance.simulateCallExecutionsErrorLocalizerTasksList(callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsErrorLocalizerTasksList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +[**CallExecutionErrorLocalizerTasksResponse**](CallExecutionErrorLocalizerTasksResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo + +> ApiResponse simulateCallExecutionsErrorLocalizerTasksList simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo(callExecutionId) + + + +Get error localizer tasks for a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo(callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsErrorLocalizerTasksList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**CallExecutionErrorLocalizerTasksResponse**](CallExecutionErrorLocalizerTasksResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsLogsList + +> CallExecutionLogsResponse simulateCallExecutionsLogsList(callExecutionId) + + + +Paginated API to retrieve stored log entries for a call execution. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + CallExecutionLogsResponse result = apiInstance.simulateCallExecutionsLogsList(callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsLogsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +[**CallExecutionLogsResponse**](CallExecutionLogsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsLogsListWithHttpInfo + +> ApiResponse simulateCallExecutionsLogsList simulateCallExecutionsLogsListWithHttpInfo(callExecutionId) + + + +Paginated API to retrieve stored log entries for a call execution. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateCallExecutionsLogsListWithHttpInfo(callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsLogsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**CallExecutionLogsResponse**](CallExecutionLogsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsPartialUpdate + +> CallExecution simulateCallExecutionsPartialUpdate(callExecutionId, callExecutionStatusUpdate) + + + +Update the status of a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + CallExecutionStatusUpdate callExecutionStatusUpdate = new CallExecutionStatusUpdate(); // CallExecutionStatusUpdate | + try { + CallExecution result = apiInstance.simulateCallExecutionsPartialUpdate(callExecutionId, callExecutionStatusUpdate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | +| **callExecutionStatusUpdate** | [**CallExecutionStatusUpdate**](CallExecutionStatusUpdate.md)| | | + +### Return type + +[**CallExecution**](CallExecution.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsPartialUpdateWithHttpInfo + +> ApiResponse simulateCallExecutionsPartialUpdate simulateCallExecutionsPartialUpdateWithHttpInfo(callExecutionId, callExecutionStatusUpdate) + + + +Update the status of a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + CallExecutionStatusUpdate callExecutionStatusUpdate = new CallExecutionStatusUpdate(); // CallExecutionStatusUpdate | + try { + ApiResponse response = apiInstance.simulateCallExecutionsPartialUpdateWithHttpInfo(callExecutionId, callExecutionStatusUpdate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | +| **callExecutionStatusUpdate** | [**CallExecutionStatusUpdate**](CallExecutionStatusUpdate.md)| | | + +### Return type + +ApiResponse<[**CallExecution**](CallExecution.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsRead + +> CallExecutionDetail simulateCallExecutionsRead(callExecutionId) + + + +Get a specific call execution with all its details + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + CallExecutionDetail result = apiInstance.simulateCallExecutionsRead(callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +[**CallExecutionDetail**](CallExecutionDetail.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsReadWithHttpInfo + +> ApiResponse simulateCallExecutionsRead simulateCallExecutionsReadWithHttpInfo(callExecutionId) + + + +Get a specific call execution with all its details + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateCallExecutionsReadWithHttpInfo(callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**CallExecutionDetail**](CallExecutionDetail.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsSessionComparisonList + +> SessionComparisonResponse simulateCallExecutionsSessionComparisonList(callExecutionId) + + + +API View to compare session chat simulations + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + SessionComparisonResponse result = apiInstance.simulateCallExecutionsSessionComparisonList(callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsSessionComparisonList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +[**SessionComparisonResponse**](SessionComparisonResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsSessionComparisonListWithHttpInfo + +> ApiResponse simulateCallExecutionsSessionComparisonList simulateCallExecutionsSessionComparisonListWithHttpInfo(callExecutionId) + + + +API View to compare session chat simulations + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateCallExecutionsSessionComparisonListWithHttpInfo(callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsSessionComparisonList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**SessionComparisonResponse**](SessionComparisonResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateCallExecutionsTranscriptsList + +> CallTranscriptResponse simulateCallExecutionsTranscriptsList(callExecutionId) + + + +Get transcripts for a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + CallTranscriptResponse result = apiInstance.simulateCallExecutionsTranscriptsList(callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsTranscriptsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +[**CallTranscriptResponse**](CallTranscriptResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateCallExecutionsTranscriptsListWithHttpInfo + +> ApiResponse simulateCallExecutionsTranscriptsList simulateCallExecutionsTranscriptsListWithHttpInfo(callExecutionId) + + + +Get transcripts for a specific call execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String callExecutionId = "callExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateCallExecutionsTranscriptsListWithHttpInfo(callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateCallExecutionsTranscriptsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **callExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**CallTranscriptResponse**](CallTranscriptResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateExportRead + +> File simulateExportRead(itemId, type, search, status) + + + +Export data as CSV based on type parameter Query Parameters: - type: 'runtest' or 'testexecution' (required) - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String itemId = "itemId_example"; // String | + String type = "runtest"; // String | Export source type. + String search = "search_example"; // String | Optional call-execution search term. + String status = "status_example"; // String | Optional call-execution status filter. + try { + File result = apiInstance.simulateExportRead(itemId, type, search, status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateExportRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **itemId** | **String**| | | +| **type** | **String**| Export source type. | [enum: runtest, testexecution] | +| **search** | **String**| Optional call-execution search term. | [optional] | +| **status** | **String**| Optional call-execution status filter. | [optional] | + +### Return type + +[**File**](File.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | CSV export | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateExportReadWithHttpInfo + +> ApiResponse simulateExportRead simulateExportReadWithHttpInfo(itemId, type, search, status) + + + +Export data as CSV based on type parameter Query Parameters: - type: 'runtest' or 'testexecution' (required) - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String itemId = "itemId_example"; // String | + String type = "runtest"; // String | Export source type. + String search = "search_example"; // String | Optional call-execution search term. + String status = "status_example"; // String | Optional call-execution status filter. + try { + ApiResponse response = apiInstance.simulateExportReadWithHttpInfo(itemId, type, search, status); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateExportRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **itemId** | **String**| | | +| **type** | **String**| Export source type. | [enum: runtest, testexecution] | +| **search** | **String**| Optional call-execution search term. | [optional] | +| **status** | **String**| Optional call-execution status filter. | [optional] | + +### Return type + +ApiResponse<[**File**](File.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | CSV export | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulatePromptSimulationsScenariosList + +> PromptSimulationScenariosResponse simulatePromptSimulationsScenariosList() + +Get list of scenarios available for prompt simulations. + +Query Parameters: - limit: number of items per page (default: 20) - page: page number (default: 1) - search: search string to filter scenarios by name + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + try { + PromptSimulationScenariosResponse result = apiInstance.simulatePromptSimulationsScenariosList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptSimulationsScenariosList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**PromptSimulationScenariosResponse**](PromptSimulationScenariosResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulatePromptSimulationsScenariosListWithHttpInfo + +> ApiResponse simulatePromptSimulationsScenariosList simulatePromptSimulationsScenariosListWithHttpInfo() + +Get list of scenarios available for prompt simulations. + +Query Parameters: - limit: number of items per page (default: 20) - page: page number (default: 1) - search: search string to filter scenarios by name + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + try { + ApiResponse response = apiInstance.simulatePromptSimulationsScenariosListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptSimulationsScenariosList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**PromptSimulationScenariosResponse**](PromptSimulationScenariosResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulatePromptTemplatesSimulationsCreate + +> PromptSimulationRunResponse simulatePromptTemplatesSimulationsCreate(promptTemplateId, createPromptSimulationRequest) + +Create a new prompt-based simulation run. + +Request Body: - name: Name of the simulation run - description: Optional description - prompt_version_id: The prompt version to use - scenario_ids: List of scenario IDs to run - dataset_row_ids: Optional list of specific row IDs - evaluations_config: Optional evaluation configurations - enable_tool_evaluation: Optional boolean to enable tool evaluation + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + CreatePromptSimulationRequest createPromptSimulationRequest = new CreatePromptSimulationRequest(); // CreatePromptSimulationRequest | + try { + PromptSimulationRunResponse result = apiInstance.simulatePromptTemplatesSimulationsCreate(promptTemplateId, createPromptSimulationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **createPromptSimulationRequest** | [**CreatePromptSimulationRequest**](CreatePromptSimulationRequest.md)| | | + +### Return type + +[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulatePromptTemplatesSimulationsCreateWithHttpInfo + +> ApiResponse simulatePromptTemplatesSimulationsCreate simulatePromptTemplatesSimulationsCreateWithHttpInfo(promptTemplateId, createPromptSimulationRequest) + +Create a new prompt-based simulation run. + +Request Body: - name: Name of the simulation run - description: Optional description - prompt_version_id: The prompt version to use - scenario_ids: List of scenario IDs to run - dataset_row_ids: Optional list of specific row IDs - evaluations_config: Optional evaluation configurations - enable_tool_evaluation: Optional boolean to enable tool evaluation + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + CreatePromptSimulationRequest createPromptSimulationRequest = new CreatePromptSimulationRequest(); // CreatePromptSimulationRequest | + try { + ApiResponse response = apiInstance.simulatePromptTemplatesSimulationsCreateWithHttpInfo(promptTemplateId, createPromptSimulationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **createPromptSimulationRequest** | [**CreatePromptSimulationRequest**](CreatePromptSimulationRequest.md)| | | + +### Return type + +ApiResponse<[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulatePromptTemplatesSimulationsDelete + +> void simulatePromptTemplatesSimulationsDelete(promptTemplateId, runTestId) + + + +Soft delete a prompt simulation run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + try { + apiInstance.simulatePromptTemplatesSimulationsDelete(promptTemplateId, runTestId); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulatePromptTemplatesSimulationsDeleteWithHttpInfo + +> ApiResponse simulatePromptTemplatesSimulationsDelete simulatePromptTemplatesSimulationsDeleteWithHttpInfo(promptTemplateId, runTestId) + + + +Soft delete a prompt simulation run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.simulatePromptTemplatesSimulationsDeleteWithHttpInfo(promptTemplateId, runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulatePromptTemplatesSimulationsExecuteCreate + +> ExecutePromptSimulationResponse simulatePromptTemplatesSimulationsExecuteCreate(promptTemplateId, runTestId, executePromptSimulationRequest) + +Execute a prompt-based simulation run. + +Request Body (optional): - scenario_ids: List of specific scenario IDs to run (default: all scenarios) - select_all: If true, run all scenarios except ones in scenario_ids + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + ExecutePromptSimulationRequest executePromptSimulationRequest = new ExecutePromptSimulationRequest(); // ExecutePromptSimulationRequest | + try { + ExecutePromptSimulationResponse result = apiInstance.simulatePromptTemplatesSimulationsExecuteCreate(promptTemplateId, runTestId, executePromptSimulationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsExecuteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | +| **executePromptSimulationRequest** | [**ExecutePromptSimulationRequest**](ExecutePromptSimulationRequest.md)| | | + +### Return type + +[**ExecutePromptSimulationResponse**](ExecutePromptSimulationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo + +> ApiResponse simulatePromptTemplatesSimulationsExecuteCreate simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo(promptTemplateId, runTestId, executePromptSimulationRequest) + +Execute a prompt-based simulation run. + +Request Body (optional): - scenario_ids: List of specific scenario IDs to run (default: all scenarios) - select_all: If true, run all scenarios except ones in scenario_ids + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + ExecutePromptSimulationRequest executePromptSimulationRequest = new ExecutePromptSimulationRequest(); // ExecutePromptSimulationRequest | + try { + ApiResponse response = apiInstance.simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo(promptTemplateId, runTestId, executePromptSimulationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsExecuteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | +| **executePromptSimulationRequest** | [**ExecutePromptSimulationRequest**](ExecutePromptSimulationRequest.md)| | | + +### Return type + +ApiResponse<[**ExecutePromptSimulationResponse**](ExecutePromptSimulationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulatePromptTemplatesSimulationsList + +> PromptSimulationListResponse simulatePromptTemplatesSimulationsList(promptTemplateId) + +Get paginated list of simulation runs for a specific prompt template. + +Query Parameters: - limit: number of items per page (default: 10) - page: page number (default: 1) - version_id: filter by specific prompt version + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + try { + PromptSimulationListResponse result = apiInstance.simulatePromptTemplatesSimulationsList(promptTemplateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | + +### Return type + +[**PromptSimulationListResponse**](PromptSimulationListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulatePromptTemplatesSimulationsListWithHttpInfo + +> ApiResponse simulatePromptTemplatesSimulationsList simulatePromptTemplatesSimulationsListWithHttpInfo(promptTemplateId) + +Get paginated list of simulation runs for a specific prompt template. + +Query Parameters: - limit: number of items per page (default: 10) - page: page number (default: 1) - version_id: filter by specific prompt version + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + try { + ApiResponse response = apiInstance.simulatePromptTemplatesSimulationsListWithHttpInfo(promptTemplateId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | + +### Return type + +ApiResponse<[**PromptSimulationListResponse**](PromptSimulationListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulatePromptTemplatesSimulationsPartialUpdate + +> PromptSimulationRunResponse simulatePromptTemplatesSimulationsPartialUpdate(promptTemplateId, runTestId, promptSimulationUpdateRequest) + + + +Update a prompt simulation run (version, scenarios, etc.). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + PromptSimulationUpdateRequest promptSimulationUpdateRequest = new PromptSimulationUpdateRequest(); // PromptSimulationUpdateRequest | + try { + PromptSimulationRunResponse result = apiInstance.simulatePromptTemplatesSimulationsPartialUpdate(promptTemplateId, runTestId, promptSimulationUpdateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | +| **promptSimulationUpdateRequest** | [**PromptSimulationUpdateRequest**](PromptSimulationUpdateRequest.md)| | | + +### Return type + +[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo + +> ApiResponse simulatePromptTemplatesSimulationsPartialUpdate simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo(promptTemplateId, runTestId, promptSimulationUpdateRequest) + + + +Update a prompt simulation run (version, scenarios, etc.). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + PromptSimulationUpdateRequest promptSimulationUpdateRequest = new PromptSimulationUpdateRequest(); // PromptSimulationUpdateRequest | + try { + ApiResponse response = apiInstance.simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo(promptTemplateId, runTestId, promptSimulationUpdateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | +| **promptSimulationUpdateRequest** | [**PromptSimulationUpdateRequest**](PromptSimulationUpdateRequest.md)| | | + +### Return type + +ApiResponse<[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulatePromptTemplatesSimulationsRead + +> PromptSimulationRunResponse simulatePromptTemplatesSimulationsRead(promptTemplateId, runTestId) + + + +Retrieve a specific prompt simulation run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + try { + PromptSimulationRunResponse result = apiInstance.simulatePromptTemplatesSimulationsRead(promptTemplateId, runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | + +### Return type + +[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulatePromptTemplatesSimulationsReadWithHttpInfo + +> ApiResponse simulatePromptTemplatesSimulationsRead simulatePromptTemplatesSimulationsReadWithHttpInfo(promptTemplateId, runTestId) + + + +Retrieve a specific prompt simulation run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String promptTemplateId = "promptTemplateId_example"; // String | + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.simulatePromptTemplatesSimulationsReadWithHttpInfo(promptTemplateId, runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulatePromptTemplatesSimulationsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **promptTemplateId** | **String**| | | +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**PromptSimulationRunResponse**](PromptSimulationRunResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsActiveList + +> AllActiveTests simulateRunTestsActiveList() + + + +Get all active tests + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + try { + AllActiveTests result = apiInstance.simulateRunTestsActiveList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsActiveList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AllActiveTests**](AllActiveTests.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsActiveListWithHttpInfo + +> ApiResponse simulateRunTestsActiveList simulateRunTestsActiveListWithHttpInfo() + + + +Get all active tests + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + try { + ApiResponse response = apiInstance.simulateRunTestsActiveListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsActiveList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**AllActiveTests**](AllActiveTests.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsChatExecuteCreate + +> RunTestChatExecutionResponse simulateRunTestsChatExecuteCreate(runTestId, body) + + + +Execute a test run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + Object body = null; // Object | + try { + RunTestChatExecutionResponse result = apiInstance.simulateRunTestsChatExecuteCreate(runTestId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsChatExecuteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**RunTestChatExecutionResponse**](RunTestChatExecutionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsChatExecuteCreateWithHttpInfo + +> ApiResponse simulateRunTestsChatExecuteCreate simulateRunTestsChatExecuteCreateWithHttpInfo(runTestId, body) + + + +Execute a test run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.simulateRunTestsChatExecuteCreateWithHttpInfo(runTestId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsChatExecuteCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**RunTestChatExecutionResponse**](RunTestChatExecutionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsComponentsPartialUpdate + +> RunTestResponse simulateRunTestsComponentsPartialUpdate(runTestId, runTestComponentsUpdate) + + + +Update components of a specific RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + RunTestComponentsUpdate runTestComponentsUpdate = new RunTestComponentsUpdate(); // RunTestComponentsUpdate | + try { + RunTestResponse result = apiInstance.simulateRunTestsComponentsPartialUpdate(runTestId, runTestComponentsUpdate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsComponentsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **runTestComponentsUpdate** | [**RunTestComponentsUpdate**](RunTestComponentsUpdate.md)| | | + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsComponentsPartialUpdateWithHttpInfo + +> ApiResponse simulateRunTestsComponentsPartialUpdate simulateRunTestsComponentsPartialUpdateWithHttpInfo(runTestId, runTestComponentsUpdate) + + + +Update components of a specific RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + RunTestComponentsUpdate runTestComponentsUpdate = new RunTestComponentsUpdate(); // RunTestComponentsUpdate | + try { + ApiResponse response = apiInstance.simulateRunTestsComponentsPartialUpdateWithHttpInfo(runTestId, runTestComponentsUpdate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsComponentsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **runTestComponentsUpdate** | [**RunTestComponentsUpdate**](RunTestComponentsUpdate.md)| | | + +### Return type + +ApiResponse<[**RunTestResponse**](RunTestResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsDeleteDelete + +> void simulateRunTestsDeleteDelete(runTestId) + + + +Delete a specific run test + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + apiInstance.simulateRunTestsDeleteDelete(runTestId); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsDeleteDeleteWithHttpInfo + +> ApiResponse simulateRunTestsDeleteDelete simulateRunTestsDeleteDeleteWithHttpInfo(runTestId) + + + +Delete a specific run test + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.simulateRunTestsDeleteDeleteWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsDeleteTestExecutionsCreate + +> TestExecutionBulkDeleteResponse simulateRunTestsDeleteTestExecutionsCreate(runTestId, testExecutionBulkDelete) + + + +Delete multiple test executions within a run test. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + TestExecutionBulkDelete testExecutionBulkDelete = new TestExecutionBulkDelete(); // TestExecutionBulkDelete | + try { + TestExecutionBulkDeleteResponse result = apiInstance.simulateRunTestsDeleteTestExecutionsCreate(runTestId, testExecutionBulkDelete); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsDeleteTestExecutionsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **testExecutionBulkDelete** | [**TestExecutionBulkDelete**](TestExecutionBulkDelete.md)| | | + +### Return type + +[**TestExecutionBulkDeleteResponse**](TestExecutionBulkDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo + +> ApiResponse simulateRunTestsDeleteTestExecutionsCreate simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo(runTestId, testExecutionBulkDelete) + + + +Delete multiple test executions within a run test. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + TestExecutionBulkDelete testExecutionBulkDelete = new TestExecutionBulkDelete(); // TestExecutionBulkDelete | + try { + ApiResponse response = apiInstance.simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo(runTestId, testExecutionBulkDelete); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsDeleteTestExecutionsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **testExecutionBulkDelete** | [**TestExecutionBulkDelete**](TestExecutionBulkDelete.md)| | | + +### Return type + +ApiResponse<[**TestExecutionBulkDeleteResponse**](TestExecutionBulkDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsEvalConfigsGetStructureList + +> EvalConfigStructureResponse simulateRunTestsEvalConfigsGetStructureList(runTestId, evalConfigId) + + + +Get the structure of an evaluation config + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String evalConfigId = "evalConfigId_example"; // String | + try { + EvalConfigStructureResponse result = apiInstance.simulateRunTestsEvalConfigsGetStructureList(runTestId, evalConfigId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsEvalConfigsGetStructureList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **evalConfigId** | **String**| | | + +### Return type + +[**EvalConfigStructureResponse**](EvalConfigStructureResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsEvalConfigsGetStructureListWithHttpInfo + +> ApiResponse simulateRunTestsEvalConfigsGetStructureList simulateRunTestsEvalConfigsGetStructureListWithHttpInfo(runTestId, evalConfigId) + + + +Get the structure of an evaluation config + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + String evalConfigId = "evalConfigId_example"; // String | + try { + ApiResponse response = apiInstance.simulateRunTestsEvalConfigsGetStructureListWithHttpInfo(runTestId, evalConfigId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsEvalConfigsGetStructureList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **evalConfigId** | **String**| | | + +### Return type + +ApiResponse<[**EvalConfigStructureResponse**](EvalConfigStructureResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsGetIdByNameRead + +> RunTestNameResponse simulateRunTestsGetIdByNameRead(runTestName) + + + +API View to get the id of a run test by name + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestName = "runTestName_example"; // String | + try { + RunTestNameResponse result = apiInstance.simulateRunTestsGetIdByNameRead(runTestName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsGetIdByNameRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | | + +### Return type + +[**RunTestNameResponse**](RunTestNameResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsGetIdByNameReadWithHttpInfo + +> ApiResponse simulateRunTestsGetIdByNameRead simulateRunTestsGetIdByNameReadWithHttpInfo(runTestName) + + + +API View to get the id of a run test by name + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestName = "runTestName_example"; // String | + try { + ApiResponse response = apiInstance.simulateRunTestsGetIdByNameReadWithHttpInfo(runTestName); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsGetIdByNameRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | | + +### Return type + +ApiResponse<[**RunTestNameResponse**](RunTestNameResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsRerunTestExecutionsCreate + +> TestExecutionRerunResponse simulateRunTestsRerunTestExecutionsCreate(runTestId, testExecutionRerun) + + + +Rerun multiple test executions (either evaluation only or call + evaluation). All call executions within each test execution are rerun. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + TestExecutionRerun testExecutionRerun = new TestExecutionRerun(); // TestExecutionRerun | + try { + TestExecutionRerunResponse result = apiInstance.simulateRunTestsRerunTestExecutionsCreate(runTestId, testExecutionRerun); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsRerunTestExecutionsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **testExecutionRerun** | [**TestExecutionRerun**](TestExecutionRerun.md)| | | + +### Return type + +[**TestExecutionRerunResponse**](TestExecutionRerunResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsRerunTestExecutionsCreateWithHttpInfo + +> ApiResponse simulateRunTestsRerunTestExecutionsCreate simulateRunTestsRerunTestExecutionsCreateWithHttpInfo(runTestId, testExecutionRerun) + + + +Rerun multiple test executions (either evaluation only or call + evaluation). All call executions within each test execution are rerun. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + TestExecutionRerun testExecutionRerun = new TestExecutionRerun(); // TestExecutionRerun | + try { + ApiResponse response = apiInstance.simulateRunTestsRerunTestExecutionsCreateWithHttpInfo(runTestId, testExecutionRerun); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsRerunTestExecutionsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **testExecutionRerun** | [**TestExecutionRerun**](TestExecutionRerun.md)| | | + +### Return type + +ApiResponse<[**TestExecutionRerunResponse**](TestExecutionRerunResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsScenariosList + +> List simulateRunTestsScenariosList(runTestId) + + + +Get paginated list of scenarios for a specific run test Query Parameters: - search: search string to filter scenarios by name - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + List result = apiInstance.simulateRunTestsScenariosList(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsScenariosList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**List<RunTestScenarioItemResponse>**](RunTestScenarioItemResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsScenariosListWithHttpInfo + +> ApiResponse> simulateRunTestsScenariosList simulateRunTestsScenariosListWithHttpInfo(runTestId) + + + +Get paginated list of scenarios for a specific run test Query Parameters: - search: search string to filter scenarios by name - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse> response = apiInstance.simulateRunTestsScenariosListWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsScenariosList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**List<RunTestScenarioItemResponse>**](RunTestScenarioItemResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateRunTestsSdkCodeList + +> ChatSDKCodeResponse simulateRunTestsSdkCodeList(runTestId) + + + +Get the SDK code with placeholders filled + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ChatSDKCodeResponse result = apiInstance.simulateRunTestsSdkCodeList(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsSdkCodeList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**ChatSDKCodeResponse**](ChatSDKCodeResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateRunTestsSdkCodeListWithHttpInfo + +> ApiResponse simulateRunTestsSdkCodeList simulateRunTestsSdkCodeListWithHttpInfo(runTestId) + + + +Get the SDK code with placeholders filled + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.simulateRunTestsSdkCodeListWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateRunTestsSdkCodeList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**ChatSDKCodeResponse**](ChatSDKCodeResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateSimulatorAgentsCreateCreate + +> SimulatorAgent simulateSimulatorAgentsCreateCreate(simulatorAgent) + + + +Create a new simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + SimulatorAgent simulatorAgent = new SimulatorAgent(); // SimulatorAgent | + try { + SimulatorAgent result = apiInstance.simulateSimulatorAgentsCreateCreate(simulatorAgent); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsCreateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **simulatorAgent** | [**SimulatorAgent**](SimulatorAgent.md)| | | + +### Return type + +[**SimulatorAgent**](SimulatorAgent.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **0** | Default error response | - | + +## simulateSimulatorAgentsCreateCreateWithHttpInfo + +> ApiResponse simulateSimulatorAgentsCreateCreate simulateSimulatorAgentsCreateCreateWithHttpInfo(simulatorAgent) + + + +Create a new simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + SimulatorAgent simulatorAgent = new SimulatorAgent(); // SimulatorAgent | + try { + ApiResponse response = apiInstance.simulateSimulatorAgentsCreateCreateWithHttpInfo(simulatorAgent); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsCreateCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **simulatorAgent** | [**SimulatorAgent**](SimulatorAgent.md)| | | + +### Return type + +ApiResponse<[**SimulatorAgent**](SimulatorAgent.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **0** | Default error response | - | + + +## simulateSimulatorAgentsDeleteDelete + +> SimulatorAgentDeleteResponse simulateSimulatorAgentsDeleteDelete(agentId) + + + +Soft delete a simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + SimulatorAgentDeleteResponse result = apiInstance.simulateSimulatorAgentsDeleteDelete(agentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +[**SimulatorAgentDeleteResponse**](SimulatorAgentDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateSimulatorAgentsDeleteDeleteWithHttpInfo + +> ApiResponse simulateSimulatorAgentsDeleteDelete simulateSimulatorAgentsDeleteDeleteWithHttpInfo(agentId) + + + +Soft delete a simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + ApiResponse response = apiInstance.simulateSimulatorAgentsDeleteDeleteWithHttpInfo(agentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +ApiResponse<[**SimulatorAgentDeleteResponse**](SimulatorAgentDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateSimulatorAgentsEditUpdate + +> SimulatorAgent simulateSimulatorAgentsEditUpdate(agentId, simulatorAgent) + + + +Edit an existing simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + SimulatorAgent simulatorAgent = new SimulatorAgent(); // SimulatorAgent | + try { + SimulatorAgent result = apiInstance.simulateSimulatorAgentsEditUpdate(agentId, simulatorAgent); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsEditUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **simulatorAgent** | [**SimulatorAgent**](SimulatorAgent.md)| | | + +### Return type + +[**SimulatorAgent**](SimulatorAgent.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **0** | Default error response | - | + +## simulateSimulatorAgentsEditUpdateWithHttpInfo + +> ApiResponse simulateSimulatorAgentsEditUpdate simulateSimulatorAgentsEditUpdateWithHttpInfo(agentId, simulatorAgent) + + + +Edit an existing simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + SimulatorAgent simulatorAgent = new SimulatorAgent(); // SimulatorAgent | + try { + ApiResponse response = apiInstance.simulateSimulatorAgentsEditUpdateWithHttpInfo(agentId, simulatorAgent); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsEditUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **simulatorAgent** | [**SimulatorAgent**](SimulatorAgent.md)| | | + +### Return type + +ApiResponse<[**SimulatorAgent**](SimulatorAgent.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **0** | Default error response | - | + + +## simulateSimulatorAgentsList + +> SimulatorAgentListResponse simulateSimulatorAgentsList() + + + +List simulator agents with pagination and search + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + try { + SimulatorAgentListResponse result = apiInstance.simulateSimulatorAgentsList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SimulatorAgentListResponse**](SimulatorAgentListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateSimulatorAgentsListWithHttpInfo + +> ApiResponse simulateSimulatorAgentsList simulateSimulatorAgentsListWithHttpInfo() + + + +List simulator agents with pagination and search + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + try { + ApiResponse response = apiInstance.simulateSimulatorAgentsListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**SimulatorAgentListResponse**](SimulatorAgentListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateSimulatorAgentsRead + +> SimulatorAgent simulateSimulatorAgentsRead(agentId) + + + +Get details of a specific simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + SimulatorAgent result = apiInstance.simulateSimulatorAgentsRead(agentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +[**SimulatorAgent**](SimulatorAgent.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateSimulatorAgentsReadWithHttpInfo + +> ApiResponse simulateSimulatorAgentsRead simulateSimulatorAgentsReadWithHttpInfo(agentId) + + + +Get details of a specific simulator agent + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + ApiResponse response = apiInstance.simulateSimulatorAgentsReadWithHttpInfo(agentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateSimulatorAgentsRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +ApiResponse<[**SimulatorAgent**](SimulatorAgent.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsChatCallExecutionsBatchCreate + +> TestExecutionChatBatchResponse simulateTestExecutionsChatCallExecutionsBatchCreate(testExecutionId, body) + +Create a batch of CallExecution records for chat execution (exactly 10 per API call). + +This follows the same flow as inbound/outbound calls: 1. Resolve SimulatorAgent (scenario > run_test > fallback) 2. Extract base_prompt from SimulatorAgent 3. Handle dataset scenarios (create one CallExecution per row) 4. Enhance prompt with row data if applicable 5. Store proper metadata in CallExecution Returns exactly 10 CallExecution objects per API call. hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + TestExecutionChatBatchResponse result = apiInstance.simulateTestExecutionsChatCallExecutionsBatchCreate(testExecutionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsChatCallExecutionsBatchCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**TestExecutionChatBatchResponse**](TestExecutionChatBatchResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo + +> ApiResponse simulateTestExecutionsChatCallExecutionsBatchCreate simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo(testExecutionId, body) + +Create a batch of CallExecution records for chat execution (exactly 10 per API call). + +This follows the same flow as inbound/outbound calls: 1. Resolve SimulatorAgent (scenario > run_test > fallback) 2. Extract base_prompt from SimulatorAgent 3. Handle dataset scenarios (create one CallExecution per row) 4. Enhance prompt with row data if applicable 5. Store proper metadata in CallExecution Returns exactly 10 CallExecution objects per API call. hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo(testExecutionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsChatCallExecutionsBatchCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**TestExecutionChatBatchResponse**](TestExecutionChatBatchResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsColumnOrderUpdate + +> TestExecutionColumnOrderResponse simulateTestExecutionsColumnOrderUpdate(testExecutionId, testExecutionColumnOrder) + + + +Update column order for a test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + TestExecutionColumnOrder testExecutionColumnOrder = new TestExecutionColumnOrder(); // TestExecutionColumnOrder | + try { + TestExecutionColumnOrderResponse result = apiInstance.simulateTestExecutionsColumnOrderUpdate(testExecutionId, testExecutionColumnOrder); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsColumnOrderUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **testExecutionColumnOrder** | [**TestExecutionColumnOrder**](TestExecutionColumnOrder.md)| | | + +### Return type + +[**TestExecutionColumnOrderResponse**](TestExecutionColumnOrderResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsColumnOrderUpdateWithHttpInfo + +> ApiResponse simulateTestExecutionsColumnOrderUpdate simulateTestExecutionsColumnOrderUpdateWithHttpInfo(testExecutionId, testExecutionColumnOrder) + + + +Update column order for a test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + TestExecutionColumnOrder testExecutionColumnOrder = new TestExecutionColumnOrder(); // TestExecutionColumnOrder | + try { + ApiResponse response = apiInstance.simulateTestExecutionsColumnOrderUpdateWithHttpInfo(testExecutionId, testExecutionColumnOrder); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsColumnOrderUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **testExecutionColumnOrder** | [**TestExecutionColumnOrder**](TestExecutionColumnOrder.md)| | | + +### Return type + +ApiResponse<[**TestExecutionColumnOrderResponse**](TestExecutionColumnOrderResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsDeleteDelete + +> void simulateTestExecutionsDeleteDelete(testExecutionId) + + + +Delete a specific test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + apiInstance.simulateTestExecutionsDeleteDelete(testExecutionId); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsDeleteDeleteWithHttpInfo + +> ApiResponse simulateTestExecutionsDeleteDelete simulateTestExecutionsDeleteDeleteWithHttpInfo(testExecutionId) + + + +Delete a specific test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateTestExecutionsDeleteDeleteWithHttpInfo(testExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsDeleteDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsEvalExplanationSummaryList + +> EvalExplanationSummaryResponse simulateTestExecutionsEvalExplanationSummaryList(testExecutionId) + + + +Fetch the evaluation explanation summary from the database. If not present, trigger async calculation and return empty response. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + EvalExplanationSummaryResponse result = apiInstance.simulateTestExecutionsEvalExplanationSummaryList(testExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsEvalExplanationSummaryList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +[**EvalExplanationSummaryResponse**](EvalExplanationSummaryResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo + +> ApiResponse simulateTestExecutionsEvalExplanationSummaryList simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo(testExecutionId) + + + +Fetch the evaluation explanation summary from the database. If not present, trigger async calculation and return empty response. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo(testExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsEvalExplanationSummaryList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**EvalExplanationSummaryResponse**](EvalExplanationSummaryResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsEvalExplanationSummaryRefreshCreate + +> EvalExplanationSummaryRefreshResponse simulateTestExecutionsEvalExplanationSummaryRefreshCreate(testExecutionId, body) + + + +Refresh the evaluation explanation summary by recalculating it. This endpoint triggers the summary calculation task again. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + EvalExplanationSummaryRefreshResponse result = apiInstance.simulateTestExecutionsEvalExplanationSummaryRefreshCreate(testExecutionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsEvalExplanationSummaryRefreshCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**EvalExplanationSummaryRefreshResponse**](EvalExplanationSummaryRefreshResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo + +> ApiResponse simulateTestExecutionsEvalExplanationSummaryRefreshCreate simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo(testExecutionId, body) + + + +Refresh the evaluation explanation summary by recalculating it. This endpoint triggers the summary calculation task again. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo(testExecutionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsEvalExplanationSummaryRefreshCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**EvalExplanationSummaryRefreshResponse**](EvalExplanationSummaryRefreshResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsOptimiserAnalysisList + +> OptimiserAnalysisResponse simulateTestExecutionsOptimiserAnalysisList(testExecutionId) + + + +Fetch the agent optimiser analysis for a test execution. If not present or pending, returns status information. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + OptimiserAnalysisResponse result = apiInstance.simulateTestExecutionsOptimiserAnalysisList(testExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsOptimiserAnalysisList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +[**OptimiserAnalysisResponse**](OptimiserAnalysisResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsOptimiserAnalysisListWithHttpInfo + +> ApiResponse simulateTestExecutionsOptimiserAnalysisList simulateTestExecutionsOptimiserAnalysisListWithHttpInfo(testExecutionId) + + + +Fetch the agent optimiser analysis for a test execution. If not present or pending, returns status information. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.simulateTestExecutionsOptimiserAnalysisListWithHttpInfo(testExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsOptimiserAnalysisList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**OptimiserAnalysisResponse**](OptimiserAnalysisResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsOptimiserAnalysisRefreshCreate + +> OptimiserAnalysisRefreshResponse simulateTestExecutionsOptimiserAnalysisRefreshCreate(testExecutionId, body) + + + +Trigger a new agent optimiser analysis run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + OptimiserAnalysisRefreshResponse result = apiInstance.simulateTestExecutionsOptimiserAnalysisRefreshCreate(testExecutionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsOptimiserAnalysisRefreshCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**OptimiserAnalysisRefreshResponse**](OptimiserAnalysisRefreshResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo + +> ApiResponse simulateTestExecutionsOptimiserAnalysisRefreshCreate simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo(testExecutionId, body) + + + +Trigger a new agent optimiser analysis run. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo(testExecutionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsOptimiserAnalysisRefreshCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**OptimiserAnalysisRefreshResponse**](OptimiserAnalysisRefreshResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## simulateTestExecutionsRerunCallsCreate + +> RerunCallsResponse simulateTestExecutionsRerunCallsCreate(testExecutionId, callExecutionRerun) + + + +Rerun multiple call executions (either evaluation only or call + evaluation) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + CallExecutionRerun callExecutionRerun = new CallExecutionRerun(); // CallExecutionRerun | + try { + RerunCallsResponse result = apiInstance.simulateTestExecutionsRerunCallsCreate(testExecutionId, callExecutionRerun); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsRerunCallsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **callExecutionRerun** | [**CallExecutionRerun**](CallExecutionRerun.md)| | | + +### Return type + +[**RerunCallsResponse**](RerunCallsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## simulateTestExecutionsRerunCallsCreateWithHttpInfo + +> ApiResponse simulateTestExecutionsRerunCallsCreate simulateTestExecutionsRerunCallsCreateWithHttpInfo(testExecutionId, callExecutionRerun) + + + +Rerun multiple call executions (either evaluation only or call + evaluation) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulateApi apiInstance = new SimulateApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + CallExecutionRerun callExecutionRerun = new CallExecutionRerun(); // CallExecutionRerun | + try { + ApiResponse response = apiInstance.simulateTestExecutionsRerunCallsCreateWithHttpInfo(testExecutionId, callExecutionRerun); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulateApi#simulateTestExecutionsRerunCallsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **callExecutionRerun** | [**CallExecutionRerun**](CallExecutionRerun.md)| | | + +### Return type + +ApiResponse<[**RerunCallsResponse**](RerunCallsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SimulationAgentDefinitionsApi.md b/java/futureagi/docs/SimulationAgentDefinitionsApi.md new file mode 100644 index 0000000..607c624 --- /dev/null +++ b/java/futureagi/docs/SimulationAgentDefinitionsApi.md @@ -0,0 +1,874 @@ +# SimulationAgentDefinitionsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createAgentDefinition**](SimulationAgentDefinitionsApi.md#createAgentDefinition) | **POST** /simulate/agent-definitions/create/ | | +| [**createAgentDefinitionWithHttpInfo**](SimulationAgentDefinitionsApi.md#createAgentDefinitionWithHttpInfo) | **POST** /simulate/agent-definitions/create/ | | +| [**deleteAgentDefinition**](SimulationAgentDefinitionsApi.md#deleteAgentDefinition) | **DELETE** /simulate/agent-definitions/{agent_id}/delete/ | | +| [**deleteAgentDefinitionWithHttpInfo**](SimulationAgentDefinitionsApi.md#deleteAgentDefinitionWithHttpInfo) | **DELETE** /simulate/agent-definitions/{agent_id}/delete/ | | +| [**getAgentDefinition**](SimulationAgentDefinitionsApi.md#getAgentDefinition) | **GET** /simulate/agent-definitions/{agent_id}/ | | +| [**getAgentDefinitionWithHttpInfo**](SimulationAgentDefinitionsApi.md#getAgentDefinitionWithHttpInfo) | **GET** /simulate/agent-definitions/{agent_id}/ | | +| [**listAgentDefinitions**](SimulationAgentDefinitionsApi.md#listAgentDefinitions) | **GET** /simulate/agent-definitions/ | | +| [**listAgentDefinitionsWithHttpInfo**](SimulationAgentDefinitionsApi.md#listAgentDefinitionsWithHttpInfo) | **GET** /simulate/agent-definitions/ | | +| [**updateAgentDefinition**](SimulationAgentDefinitionsApi.md#updateAgentDefinition) | **PUT** /simulate/agent-definitions/{agent_id}/edit/ | | +| [**updateAgentDefinitionWithHttpInfo**](SimulationAgentDefinitionsApi.md#updateAgentDefinitionWithHttpInfo) | **PUT** /simulate/agent-definitions/{agent_id}/edit/ | | + + + +## createAgentDefinition + +> AgentDefinitionCreateResponse createAgentDefinition(agentDefinitionCreateRequest) + + + +Create a new agent definition with its first version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + AgentDefinitionCreateRequest agentDefinitionCreateRequest = new AgentDefinitionCreateRequest(); // AgentDefinitionCreateRequest | + try { + AgentDefinitionCreateResponse result = apiInstance.createAgentDefinition(agentDefinitionCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#createAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentDefinitionCreateRequest** | [**AgentDefinitionCreateRequest**](AgentDefinitionCreateRequest.md)| | | + +### Return type + +[**AgentDefinitionCreateResponse**](AgentDefinitionCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createAgentDefinitionWithHttpInfo + +> ApiResponse createAgentDefinition createAgentDefinitionWithHttpInfo(agentDefinitionCreateRequest) + + + +Create a new agent definition with its first version. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + AgentDefinitionCreateRequest agentDefinitionCreateRequest = new AgentDefinitionCreateRequest(); // AgentDefinitionCreateRequest | + try { + ApiResponse response = apiInstance.createAgentDefinitionWithHttpInfo(agentDefinitionCreateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#createAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentDefinitionCreateRequest** | [**AgentDefinitionCreateRequest**](AgentDefinitionCreateRequest.md)| | | + +### Return type + +ApiResponse<[**AgentDefinitionCreateResponse**](AgentDefinitionCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## deleteAgentDefinition + +> AgentDefinitionDeleteResponse deleteAgentDefinition(agentId) + + + +Soft delete an agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + AgentDefinitionDeleteResponse result = apiInstance.deleteAgentDefinition(agentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#deleteAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +[**AgentDefinitionDeleteResponse**](AgentDefinitionDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## deleteAgentDefinitionWithHttpInfo + +> ApiResponse deleteAgentDefinition deleteAgentDefinitionWithHttpInfo(agentId) + + + +Soft delete an agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + ApiResponse response = apiInstance.deleteAgentDefinitionWithHttpInfo(agentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#deleteAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +ApiResponse<[**AgentDefinitionDeleteResponse**](AgentDefinitionDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getAgentDefinition + +> AgentDefinitionResponse getAgentDefinition(agentId) + + + +Get details of a specific agent definition with version information. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + AgentDefinitionResponse result = apiInstance.getAgentDefinition(agentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#getAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +[**AgentDefinitionResponse**](AgentDefinitionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getAgentDefinitionWithHttpInfo + +> ApiResponse getAgentDefinition getAgentDefinitionWithHttpInfo(agentId) + + + +Get details of a specific agent definition with version information. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String agentId = "agentId_example"; // String | + try { + ApiResponse response = apiInstance.getAgentDefinitionWithHttpInfo(agentId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#getAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | + +### Return type + +ApiResponse<[**AgentDefinitionResponse**](AgentDefinitionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listAgentDefinitions + +> List listAgentDefinitions(search, agentType, agentDefinitionId, page, limit) + + + +Get paginated list of agent definitions for the user's organization. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String search = ""; // String | + String agentType = "voice"; // String | + UUID agentDefinitionId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + List result = apiInstance.listAgentDefinitions(search, agentType, agentDefinitionId, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#listAgentDefinitions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **agentType** | **String**| | [optional] [enum: voice, text] | +| **agentDefinitionId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +[**List<AgentDefinitionListResponse>**](AgentDefinitionListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listAgentDefinitionsWithHttpInfo + +> ApiResponse> listAgentDefinitions listAgentDefinitionsWithHttpInfo(search, agentType, agentDefinitionId, page, limit) + + + +Get paginated list of agent definitions for the user's organization. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String search = ""; // String | + String agentType = "voice"; // String | + UUID agentDefinitionId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ApiResponse> response = apiInstance.listAgentDefinitionsWithHttpInfo(search, agentType, agentDefinitionId, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#listAgentDefinitions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **agentType** | **String**| | [optional] [enum: voice, text] | +| **agentDefinitionId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +ApiResponse<[**List<AgentDefinitionListResponse>**](AgentDefinitionListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## updateAgentDefinition + +> AgentDefinitionEditResponse updateAgentDefinition(agentId, agentDefinitionEditRequest) + + + +Update an existing agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String agentId = "agentId_example"; // String | + AgentDefinitionEditRequest agentDefinitionEditRequest = new AgentDefinitionEditRequest(); // AgentDefinitionEditRequest | + try { + AgentDefinitionEditResponse result = apiInstance.updateAgentDefinition(agentId, agentDefinitionEditRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#updateAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **agentDefinitionEditRequest** | [**AgentDefinitionEditRequest**](AgentDefinitionEditRequest.md)| | | + +### Return type + +[**AgentDefinitionEditResponse**](AgentDefinitionEditResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## updateAgentDefinitionWithHttpInfo + +> ApiResponse updateAgentDefinition updateAgentDefinitionWithHttpInfo(agentId, agentDefinitionEditRequest) + + + +Update an existing agent definition. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationAgentDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationAgentDefinitionsApi apiInstance = new SimulationAgentDefinitionsApi(defaultClient); + String agentId = "agentId_example"; // String | + AgentDefinitionEditRequest agentDefinitionEditRequest = new AgentDefinitionEditRequest(); // AgentDefinitionEditRequest | + try { + ApiResponse response = apiInstance.updateAgentDefinitionWithHttpInfo(agentId, agentDefinitionEditRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationAgentDefinitionsApi#updateAgentDefinition"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **agentId** | **String**| | | +| **agentDefinitionEditRequest** | [**AgentDefinitionEditRequest**](AgentDefinitionEditRequest.md)| | | + +### Return type + +ApiResponse<[**AgentDefinitionEditResponse**](AgentDefinitionEditResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SimulationPersonasApi.md b/java/futureagi/docs/SimulationPersonasApi.md new file mode 100644 index 0000000..f1c60ff --- /dev/null +++ b/java/futureagi/docs/SimulationPersonasApi.md @@ -0,0 +1,860 @@ +# SimulationPersonasApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createPersona**](SimulationPersonasApi.md#createPersona) | **POST** /simulate/api/personas/ | | +| [**createPersonaWithHttpInfo**](SimulationPersonasApi.md#createPersonaWithHttpInfo) | **POST** /simulate/api/personas/ | | +| [**deletePersona**](SimulationPersonasApi.md#deletePersona) | **DELETE** /simulate/api/personas/{id}/ | | +| [**deletePersonaWithHttpInfo**](SimulationPersonasApi.md#deletePersonaWithHttpInfo) | **DELETE** /simulate/api/personas/{id}/ | | +| [**getPersona**](SimulationPersonasApi.md#getPersona) | **GET** /simulate/api/personas/{id}/ | | +| [**getPersonaWithHttpInfo**](SimulationPersonasApi.md#getPersonaWithHttpInfo) | **GET** /simulate/api/personas/{id}/ | | +| [**listPersonas**](SimulationPersonasApi.md#listPersonas) | **GET** /simulate/api/personas/ | | +| [**listPersonasWithHttpInfo**](SimulationPersonasApi.md#listPersonasWithHttpInfo) | **GET** /simulate/api/personas/ | | +| [**updatePersona**](SimulationPersonasApi.md#updatePersona) | **PATCH** /simulate/api/personas/{id}/ | | +| [**updatePersonaWithHttpInfo**](SimulationPersonasApi.md#updatePersonaWithHttpInfo) | **PATCH** /simulate/api/personas/{id}/ | | + + + +## createPersona + +> PersonaCreate createPersona(personaCreate) + + + +Create a new workspace-level persona + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + PersonaCreate personaCreate = new PersonaCreate(); // PersonaCreate | + try { + PersonaCreate result = apiInstance.createPersona(personaCreate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#createPersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **personaCreate** | [**PersonaCreate**](PersonaCreate.md)| | | + +### Return type + +[**PersonaCreate**](PersonaCreate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createPersonaWithHttpInfo + +> ApiResponse createPersona createPersonaWithHttpInfo(personaCreate) + + + +Create a new workspace-level persona + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + PersonaCreate personaCreate = new PersonaCreate(); // PersonaCreate | + try { + ApiResponse response = apiInstance.createPersonaWithHttpInfo(personaCreate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#createPersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **personaCreate** | [**PersonaCreate**](PersonaCreate.md)| | | + +### Return type + +ApiResponse<[**PersonaCreate**](PersonaCreate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## deletePersona + +> void deletePersona(id) + + + +Delete a persona (workspace-level only) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.deletePersona(id); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#deletePersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## deletePersonaWithHttpInfo + +> ApiResponse deletePersona deletePersonaWithHttpInfo(id) + + + +Delete a persona (workspace-level only) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.deletePersonaWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#deletePersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getPersona + +> Persona getPersona(id) + + + +Retrieve a specific persona + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + String id = "id_example"; // String | + try { + Persona result = apiInstance.getPersona(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#getPersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**Persona**](Persona.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getPersonaWithHttpInfo + +> ApiResponse getPersona getPersonaWithHttpInfo(id) + + + +Retrieve a specific persona + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.getPersonaWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#getPersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**Persona**](Persona.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listPersonas + +> ListPersonas200Response listPersonas(page, limit) + + + +List personas with pagination + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ListPersonas200Response result = apiInstance.listPersonas(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#listPersonas"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ListPersonas200Response**](ListPersonas200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listPersonasWithHttpInfo + +> ApiResponse listPersonas listPersonasWithHttpInfo(page, limit) + + + +List personas with pagination + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listPersonasWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#listPersonas"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ListPersonas200Response**](ListPersonas200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## updatePersona + +> Persona updatePersona(id, persona) + + + +ViewSet for managing Personas. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + String id = "id_example"; // String | + Persona persona = new Persona(); // Persona | + try { + Persona result = apiInstance.updatePersona(id, persona); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#updatePersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **persona** | [**Persona**](Persona.md)| | | + +### Return type + +[**Persona**](Persona.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## updatePersonaWithHttpInfo + +> ApiResponse updatePersona updatePersonaWithHttpInfo(id, persona) + + + +ViewSet for managing Personas. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationPersonasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationPersonasApi apiInstance = new SimulationPersonasApi(defaultClient); + String id = "id_example"; // String | + Persona persona = new Persona(); // Persona | + try { + ApiResponse response = apiInstance.updatePersonaWithHttpInfo(id, persona); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationPersonasApi#updatePersona"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **persona** | [**Persona**](Persona.md)| | | + +### Return type + +ApiResponse<[**Persona**](Persona.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SimulationRunTestsApi.md b/java/futureagi/docs/SimulationRunTestsApi.md new file mode 100644 index 0000000..0b0fe41 --- /dev/null +++ b/java/futureagi/docs/SimulationRunTestsApi.md @@ -0,0 +1,1716 @@ +# SimulationRunTestsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createRunTest**](SimulationRunTestsApi.md#createRunTest) | **POST** /simulate/run-tests/create/ | | +| [**createRunTestWithHttpInfo**](SimulationRunTestsApi.md#createRunTestWithHttpInfo) | **POST** /simulate/run-tests/create/ | | +| [**deleteRunTest**](SimulationRunTestsApi.md#deleteRunTest) | **DELETE** /simulate/run-tests/{run_test_id}/ | | +| [**deleteRunTestWithHttpInfo**](SimulationRunTestsApi.md#deleteRunTestWithHttpInfo) | **DELETE** /simulate/run-tests/{run_test_id}/ | | +| [**executeRunTest**](SimulationRunTestsApi.md#executeRunTest) | **POST** /simulate/run-tests/{run_test_id}/execute/ | | +| [**executeRunTestWithHttpInfo**](SimulationRunTestsApi.md#executeRunTestWithHttpInfo) | **POST** /simulate/run-tests/{run_test_id}/execute/ | | +| [**getRunTest**](SimulationRunTestsApi.md#getRunTest) | **GET** /simulate/run-tests/{run_test_id}/ | | +| [**getRunTestWithHttpInfo**](SimulationRunTestsApi.md#getRunTestWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/ | | +| [**getRunTestAnalytics**](SimulationRunTestsApi.md#getRunTestAnalytics) | **GET** /simulate/run-tests/{run_test_id}/analytics/ | | +| [**getRunTestAnalyticsWithHttpInfo**](SimulationRunTestsApi.md#getRunTestAnalyticsWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/analytics/ | | +| [**getRunTestStatus**](SimulationRunTestsApi.md#getRunTestStatus) | **GET** /simulate/run-tests/{run_test_id}/status/ | | +| [**getRunTestStatusWithHttpInfo**](SimulationRunTestsApi.md#getRunTestStatusWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/status/ | | +| [**listRunTestCallExecutions**](SimulationRunTestsApi.md#listRunTestCallExecutions) | **GET** /simulate/run-tests/{run_test_id}/call-executions/ | | +| [**listRunTestCallExecutionsWithHttpInfo**](SimulationRunTestsApi.md#listRunTestCallExecutionsWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/call-executions/ | | +| [**listRunTestExecutions**](SimulationRunTestsApi.md#listRunTestExecutions) | **GET** /simulate/run-tests/{run_test_id}/executions/ | | +| [**listRunTestExecutionsWithHttpInfo**](SimulationRunTestsApi.md#listRunTestExecutionsWithHttpInfo) | **GET** /simulate/run-tests/{run_test_id}/executions/ | | +| [**listRunTests**](SimulationRunTestsApi.md#listRunTests) | **GET** /simulate/run-tests/ | | +| [**listRunTestsWithHttpInfo**](SimulationRunTestsApi.md#listRunTestsWithHttpInfo) | **GET** /simulate/run-tests/ | | +| [**updateRunTest**](SimulationRunTestsApi.md#updateRunTest) | **PATCH** /simulate/run-tests/{run_test_id}/ | | +| [**updateRunTestWithHttpInfo**](SimulationRunTestsApi.md#updateRunTestWithHttpInfo) | **PATCH** /simulate/run-tests/{run_test_id}/ | | + + + +## createRunTest + +> RunTestResponse createRunTest(createRunTest) + + + +Create a new RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + CreateRunTest createRunTest = new CreateRunTest(); // CreateRunTest | + try { + RunTestResponse result = apiInstance.createRunTest(createRunTest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#createRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createRunTest** | [**CreateRunTest**](CreateRunTest.md)| | | + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createRunTestWithHttpInfo + +> ApiResponse createRunTest createRunTestWithHttpInfo(createRunTest) + + + +Create a new RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + CreateRunTest createRunTest = new CreateRunTest(); // CreateRunTest | + try { + ApiResponse response = apiInstance.createRunTestWithHttpInfo(createRunTest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#createRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createRunTest** | [**CreateRunTest**](CreateRunTest.md)| | | + +### Return type + +ApiResponse<[**RunTestResponse**](RunTestResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## deleteRunTest + +> RunTestMessageResponse deleteRunTest(runTestId) + + + +Delete a specific RunTest (soft delete) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + RunTestMessageResponse result = apiInstance.deleteRunTest(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#deleteRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**RunTestMessageResponse**](RunTestMessageResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## deleteRunTestWithHttpInfo + +> ApiResponse deleteRunTest deleteRunTestWithHttpInfo(runTestId) + + + +Delete a specific RunTest (soft delete) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.deleteRunTestWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#deleteRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**RunTestMessageResponse**](RunTestMessageResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## executeRunTest + +> RunTestExecutionResponse executeRunTest(runTestId, executeRunTest) + + + +Execute a test run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + ExecuteRunTest executeRunTest = new ExecuteRunTest(); // ExecuteRunTest | + try { + RunTestExecutionResponse result = apiInstance.executeRunTest(runTestId, executeRunTest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#executeRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **executeRunTest** | [**ExecuteRunTest**](ExecuteRunTest.md)| | | + +### Return type + +[**RunTestExecutionResponse**](RunTestExecutionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## executeRunTestWithHttpInfo + +> ApiResponse executeRunTest executeRunTestWithHttpInfo(runTestId, executeRunTest) + + + +Execute a test run + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + ExecuteRunTest executeRunTest = new ExecuteRunTest(); // ExecuteRunTest | + try { + ApiResponse response = apiInstance.executeRunTestWithHttpInfo(runTestId, executeRunTest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#executeRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **executeRunTest** | [**ExecuteRunTest**](ExecuteRunTest.md)| | | + +### Return type + +ApiResponse<[**RunTestExecutionResponse**](RunTestExecutionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getRunTest + +> RunTestResponse getRunTest(runTestId) + + + +Retrieve a specific RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + RunTestResponse result = apiInstance.getRunTest(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#getRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getRunTestWithHttpInfo + +> ApiResponse getRunTest getRunTestWithHttpInfo(runTestId) + + + +Retrieve a specific RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.getRunTestWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#getRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**RunTestResponse**](RunTestResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getRunTestAnalytics + +> RunTestAnalytics getRunTestAnalytics(runTestId) + + + +Get analytics data for a specific run test across multiple test executions + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + RunTestAnalytics result = apiInstance.getRunTestAnalytics(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#getRunTestAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**RunTestAnalytics**](RunTestAnalytics.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getRunTestAnalyticsWithHttpInfo + +> ApiResponse getRunTestAnalytics getRunTestAnalyticsWithHttpInfo(runTestId) + + + +Get analytics data for a specific run test across multiple test executions + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.getRunTestAnalyticsWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#getRunTestAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**RunTestAnalytics**](RunTestAnalytics.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getRunTestStatus + +> TestExecutionStatusSummary getRunTestStatus(runTestId) + + + +Get test execution status + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + TestExecutionStatusSummary result = apiInstance.getRunTestStatus(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#getRunTestStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**TestExecutionStatusSummary**](TestExecutionStatusSummary.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getRunTestStatusWithHttpInfo + +> ApiResponse getRunTestStatus getRunTestStatusWithHttpInfo(runTestId) + + + +Get test execution status + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.getRunTestStatusWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#getRunTestStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**TestExecutionStatusSummary**](TestExecutionStatusSummary.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listRunTestCallExecutions + +> RunTestCallExecutionsResponse listRunTestCallExecutions(runTestId) + + + +Get all call executions for a specific run test with pagination and search Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status - limit: number of call executions per page (default: 10) - page: page number for call executions (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + RunTestCallExecutionsResponse result = apiInstance.listRunTestCallExecutions(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#listRunTestCallExecutions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**RunTestCallExecutionsResponse**](RunTestCallExecutionsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listRunTestCallExecutionsWithHttpInfo + +> ApiResponse listRunTestCallExecutions listRunTestCallExecutionsWithHttpInfo(runTestId) + + + +Get all call executions for a specific run test with pagination and search Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status - limit: number of call executions per page (default: 10) - page: page number for call executions (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse response = apiInstance.listRunTestCallExecutionsWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#listRunTestCallExecutions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**RunTestCallExecutionsResponse**](RunTestCallExecutionsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listRunTestExecutions + +> List listRunTestExecutions(runTestId) + + + +Get test execution data for a specific run test Query Parameters: - search: search string to filter test executions by status or scenario name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + List result = apiInstance.listRunTestExecutions(runTestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#listRunTestExecutions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +[**List<TestExecutionItemResponse>**](TestExecutionItemResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listRunTestExecutionsWithHttpInfo + +> ApiResponse> listRunTestExecutions listRunTestExecutionsWithHttpInfo(runTestId) + + + +Get test execution data for a specific run test Query Parameters: - search: search string to filter test executions by status or scenario name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + try { + ApiResponse> response = apiInstance.listRunTestExecutionsWithHttpInfo(runTestId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#listRunTestExecutions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | + +### Return type + +ApiResponse<[**List<TestExecutionItemResponse>**](TestExecutionItemResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listRunTests + +> List listRunTests(search, simulationType, promptTemplateId, page, limit) + + + +Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) - simulation_type: filter by source type (RunTest.SourceTypes values: 'agent_definition' or 'prompt') - prompt_template_id: filter by prompt template ID (used when simulation_type is 'prompt') + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String search = ""; // String | + String simulationType = "agent_definition"; // String | + UUID promptTemplateId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + List result = apiInstance.listRunTests(search, simulationType, promptTemplateId, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#listRunTests"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **simulationType** | **String**| | [optional] [enum: agent_definition, prompt] | +| **promptTemplateId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +[**List<RunTestResponse>**](RunTestResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listRunTestsWithHttpInfo + +> ApiResponse> listRunTests listRunTestsWithHttpInfo(search, simulationType, promptTemplateId, page, limit) + + + +Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) - simulation_type: filter by source type (RunTest.SourceTypes values: 'agent_definition' or 'prompt') - prompt_template_id: filter by prompt template ID (used when simulation_type is 'prompt') + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String search = ""; // String | + String simulationType = "agent_definition"; // String | + UUID promptTemplateId = UUID.randomUUID(); // UUID | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ApiResponse> response = apiInstance.listRunTestsWithHttpInfo(search, simulationType, promptTemplateId, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#listRunTests"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **simulationType** | **String**| | [optional] [enum: agent_definition, prompt] | +| **promptTemplateId** | **UUID**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +ApiResponse<[**List<RunTestResponse>**](RunTestResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## updateRunTest + +> RunTestResponse updateRunTest(runTestId, updateRunTest) + + + +Update a specific RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + UpdateRunTest updateRunTest = new UpdateRunTest(); // UpdateRunTest | + try { + RunTestResponse result = apiInstance.updateRunTest(runTestId, updateRunTest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#updateRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **updateRunTest** | [**UpdateRunTest**](UpdateRunTest.md)| | | + +### Return type + +[**RunTestResponse**](RunTestResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## updateRunTestWithHttpInfo + +> ApiResponse updateRunTest updateRunTestWithHttpInfo(runTestId, updateRunTest) + + + +Update a specific RunTest + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationRunTestsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationRunTestsApi apiInstance = new SimulationRunTestsApi(defaultClient); + String runTestId = "runTestId_example"; // String | + UpdateRunTest updateRunTest = new UpdateRunTest(); // UpdateRunTest | + try { + ApiResponse response = apiInstance.updateRunTestWithHttpInfo(runTestId, updateRunTest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationRunTestsApi#updateRunTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestId** | **String**| | | +| **updateRunTest** | [**UpdateRunTest**](UpdateRunTest.md)| | | + +### Return type + +ApiResponse<[**RunTestResponse**](RunTestResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SimulationScenariosApi.md b/java/futureagi/docs/SimulationScenariosApi.md new file mode 100644 index 0000000..c91ceb8 --- /dev/null +++ b/java/futureagi/docs/SimulationScenariosApi.md @@ -0,0 +1,870 @@ +# SimulationScenariosApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createScenario**](SimulationScenariosApi.md#createScenario) | **POST** /simulate/scenarios/create/ | Create scenario | +| [**createScenarioWithHttpInfo**](SimulationScenariosApi.md#createScenarioWithHttpInfo) | **POST** /simulate/scenarios/create/ | Create scenario | +| [**deleteScenario**](SimulationScenariosApi.md#deleteScenario) | **DELETE** /simulate/scenarios/{scenario_id}/delete/ | Delete scenario | +| [**deleteScenarioWithHttpInfo**](SimulationScenariosApi.md#deleteScenarioWithHttpInfo) | **DELETE** /simulate/scenarios/{scenario_id}/delete/ | Delete scenario | +| [**getScenario**](SimulationScenariosApi.md#getScenario) | **GET** /simulate/scenarios/{scenario_id}/ | Get scenario detail | +| [**getScenarioWithHttpInfo**](SimulationScenariosApi.md#getScenarioWithHttpInfo) | **GET** /simulate/scenarios/{scenario_id}/ | Get scenario detail | +| [**listScenarios**](SimulationScenariosApi.md#listScenarios) | **GET** /simulate/scenarios/ | List scenarios | +| [**listScenariosWithHttpInfo**](SimulationScenariosApi.md#listScenariosWithHttpInfo) | **GET** /simulate/scenarios/ | List scenarios | +| [**updateScenario**](SimulationScenariosApi.md#updateScenario) | **PUT** /simulate/scenarios/{scenario_id}/edit/ | Edit scenario | +| [**updateScenarioWithHttpInfo**](SimulationScenariosApi.md#updateScenarioWithHttpInfo) | **PUT** /simulate/scenarios/{scenario_id}/edit/ | Edit scenario | + + + +## createScenario + +> ScenarioCreateResponse createScenario(scenarioCreateRequest) + +Create scenario + +Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + ScenarioCreateRequest scenarioCreateRequest = new ScenarioCreateRequest(); // ScenarioCreateRequest | + try { + ScenarioCreateResponse result = apiInstance.createScenario(scenarioCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#createScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioCreateRequest** | [**ScenarioCreateRequest**](ScenarioCreateRequest.md)| | | + +### Return type + +[**ScenarioCreateResponse**](ScenarioCreateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createScenarioWithHttpInfo + +> ApiResponse createScenario createScenarioWithHttpInfo(scenarioCreateRequest) + +Create scenario + +Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + ScenarioCreateRequest scenarioCreateRequest = new ScenarioCreateRequest(); // ScenarioCreateRequest | + try { + ApiResponse response = apiInstance.createScenarioWithHttpInfo(scenarioCreateRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#createScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioCreateRequest** | [**ScenarioCreateRequest**](ScenarioCreateRequest.md)| | | + +### Return type + +ApiResponse<[**ScenarioCreateResponse**](ScenarioCreateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## deleteScenario + +> ScenarioDeleteResponse deleteScenario(scenarioId) + +Delete scenario + +Soft-deletes a scenario by setting deleted=True. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + try { + ScenarioDeleteResponse result = apiInstance.deleteScenario(scenarioId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#deleteScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | + +### Return type + +[**ScenarioDeleteResponse**](ScenarioDeleteResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## deleteScenarioWithHttpInfo + +> ApiResponse deleteScenario deleteScenarioWithHttpInfo(scenarioId) + +Delete scenario + +Soft-deletes a scenario by setting deleted=True. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + try { + ApiResponse response = apiInstance.deleteScenarioWithHttpInfo(scenarioId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#deleteScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | + +### Return type + +ApiResponse<[**ScenarioDeleteResponse**](ScenarioDeleteResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getScenario + +> ScenarioDetailResponse getScenario(scenarioId) + +Get scenario detail + +Returns full detail of a specific scenario including graph data and prompts. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + try { + ScenarioDetailResponse result = apiInstance.getScenario(scenarioId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#getScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | + +### Return type + +[**ScenarioDetailResponse**](ScenarioDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getScenarioWithHttpInfo + +> ApiResponse getScenario getScenarioWithHttpInfo(scenarioId) + +Get scenario detail + +Returns full detail of a specific scenario including graph data and prompts. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + try { + ApiResponse response = apiInstance.getScenarioWithHttpInfo(scenarioId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#getScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | + +### Return type + +ApiResponse<[**ScenarioDetailResponse**](ScenarioDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listScenarios + +> ScenarioListResponse listScenarios(search, agentDefinitionId, agentType, page, limit) + +List scenarios + +Returns a paginated list of scenarios for the user's organization. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String search = ""; // String | + UUID agentDefinitionId = UUID.randomUUID(); // UUID | + String agentType = "agentType_example"; // String | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ScenarioListResponse result = apiInstance.listScenarios(search, agentDefinitionId, agentType, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#listScenarios"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **agentDefinitionId** | **UUID**| | [optional] | +| **agentType** | **String**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +[**ScenarioListResponse**](ScenarioListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listScenariosWithHttpInfo + +> ApiResponse listScenarios listScenariosWithHttpInfo(search, agentDefinitionId, agentType, page, limit) + +List scenarios + +Returns a paginated list of scenarios for the user's organization. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String search = ""; // String | + UUID agentDefinitionId = UUID.randomUUID(); // UUID | + String agentType = "agentType_example"; // String | + Integer page = 1; // Integer | + Integer limit = 56; // Integer | + try { + ApiResponse response = apiInstance.listScenariosWithHttpInfo(search, agentDefinitionId, agentType, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#listScenarios"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| | [optional] [default to ] | +| **agentDefinitionId** | **UUID**| | [optional] | +| **agentType** | **String**| | [optional] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] | + +### Return type + +ApiResponse<[**ScenarioListResponse**](ScenarioListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## updateScenario + +> ScenarioEditResponse updateScenario(scenarioId, scenarioEditRequest) + +Edit scenario + +Updates scenario name, description, graph, or prompt. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioEditRequest scenarioEditRequest = new ScenarioEditRequest(); // ScenarioEditRequest | + try { + ScenarioEditResponse result = apiInstance.updateScenario(scenarioId, scenarioEditRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#updateScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioEditRequest** | [**ScenarioEditRequest**](ScenarioEditRequest.md)| | | + +### Return type + +[**ScenarioEditResponse**](ScenarioEditResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## updateScenarioWithHttpInfo + +> ApiResponse updateScenario updateScenarioWithHttpInfo(scenarioId, scenarioEditRequest) + +Edit scenario + +Updates scenario name, description, graph, or prompt. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationScenariosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationScenariosApi apiInstance = new SimulationScenariosApi(defaultClient); + String scenarioId = "scenarioId_example"; // String | + ScenarioEditRequest scenarioEditRequest = new ScenarioEditRequest(); // ScenarioEditRequest | + try { + ApiResponse response = apiInstance.updateScenarioWithHttpInfo(scenarioId, scenarioEditRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationScenariosApi#updateScenario"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scenarioId** | **String**| | | +| **scenarioEditRequest** | [**ScenarioEditRequest**](ScenarioEditRequest.md)| | | + +### Return type + +ApiResponse<[**ScenarioEditResponse**](ScenarioEditResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SimulationTestExecutionsApi.md b/java/futureagi/docs/SimulationTestExecutionsApi.md new file mode 100644 index 0000000..b93a1d1 --- /dev/null +++ b/java/futureagi/docs/SimulationTestExecutionsApi.md @@ -0,0 +1,1206 @@ +# SimulationTestExecutionsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**cancelTestExecution**](SimulationTestExecutionsApi.md#cancelTestExecution) | **POST** /simulate/test-executions/{test_execution_id}/cancel/ | | +| [**cancelTestExecutionWithHttpInfo**](SimulationTestExecutionsApi.md#cancelTestExecutionWithHttpInfo) | **POST** /simulate/test-executions/{test_execution_id}/cancel/ | | +| [**getTestExecution**](SimulationTestExecutionsApi.md#getTestExecution) | **GET** /simulate/test-executions/{test_execution_id}/ | | +| [**getTestExecutionWithHttpInfo**](SimulationTestExecutionsApi.md#getTestExecutionWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/ | | +| [**getTestExecutionAnalytics**](SimulationTestExecutionsApi.md#getTestExecutionAnalytics) | **GET** /simulate/test-executions/{test_execution_id}/analytics/ | | +| [**getTestExecutionAnalyticsWithHttpInfo**](SimulationTestExecutionsApi.md#getTestExecutionAnalyticsWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/analytics/ | | +| [**getTestExecutionKpis**](SimulationTestExecutionsApi.md#getTestExecutionKpis) | **GET** /simulate/test-executions/{test_execution_id}/kpis/ | | +| [**getTestExecutionKpisWithHttpInfo**](SimulationTestExecutionsApi.md#getTestExecutionKpisWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/kpis/ | | +| [**getTestExecutionPerformanceSummary**](SimulationTestExecutionsApi.md#getTestExecutionPerformanceSummary) | **GET** /simulate/test-executions/{test_execution_id}/performance-summary/ | | +| [**getTestExecutionPerformanceSummaryWithHttpInfo**](SimulationTestExecutionsApi.md#getTestExecutionPerformanceSummaryWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/performance-summary/ | | +| [**getTestExecutionTranscripts**](SimulationTestExecutionsApi.md#getTestExecutionTranscripts) | **GET** /simulate/test-executions/{test_execution_id}/transcripts/ | | +| [**getTestExecutionTranscriptsWithHttpInfo**](SimulationTestExecutionsApi.md#getTestExecutionTranscriptsWithHttpInfo) | **GET** /simulate/test-executions/{test_execution_id}/transcripts/ | | +| [**listTestExecutions**](SimulationTestExecutionsApi.md#listTestExecutions) | **GET** /simulate/api/test-executions/ | | +| [**listTestExecutionsWithHttpInfo**](SimulationTestExecutionsApi.md#listTestExecutionsWithHttpInfo) | **GET** /simulate/api/test-executions/ | | + + + +## cancelTestExecution + +> CancelTestExecutionResponse cancelTestExecution(testExecutionId, body) + + + +Cancel a test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + CancelTestExecutionResponse result = apiInstance.cancelTestExecution(testExecutionId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#cancelTestExecution"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +[**CancelTestExecutionResponse**](CancelTestExecutionResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## cancelTestExecutionWithHttpInfo + +> ApiResponse cancelTestExecution cancelTestExecutionWithHttpInfo(testExecutionId, body) + + + +Cancel a test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + Object body = null; // Object | + try { + ApiResponse response = apiInstance.cancelTestExecutionWithHttpInfo(testExecutionId, body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#cancelTestExecution"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **body** | **Object**| | | + +### Return type + +ApiResponse<[**CancelTestExecutionResponse**](CancelTestExecutionResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getTestExecution + +> TestExecutionDetailResponse getTestExecution(testExecutionId, search, filters, rowGroups, groupKeys, page, limit) + + + +Get a specific test execution with all its details and paginated call executions Query Parameters: - search: search string to filter call executions - page: page number for call executions (default: 1) - filters: JSON array of filter objects - row_groups: JSON array of column IDs to group by - group_keys: JSON array of group keys + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + String search = ""; // String | + String filters = "[]"; // String | + String rowGroups = "[]"; // String | + String groupKeys = "[]"; // String | + Integer page = 1; // Integer | + Integer limit = 30; // Integer | + try { + TestExecutionDetailResponse result = apiInstance.getTestExecution(testExecutionId, search, filters, rowGroups, groupKeys, page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecution"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **search** | **String**| | [optional] [default to ] | +| **filters** | **String**| | [optional] [default to []] | +| **rowGroups** | **String**| | [optional] [default to []] | +| **groupKeys** | **String**| | [optional] [default to []] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 30] | + +### Return type + +[**TestExecutionDetailResponse**](TestExecutionDetailResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getTestExecutionWithHttpInfo + +> ApiResponse getTestExecution getTestExecutionWithHttpInfo(testExecutionId, search, filters, rowGroups, groupKeys, page, limit) + + + +Get a specific test execution with all its details and paginated call executions Query Parameters: - search: search string to filter call executions - page: page number for call executions (default: 1) - filters: JSON array of filter objects - row_groups: JSON array of column IDs to group by - group_keys: JSON array of group keys + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + String search = ""; // String | + String filters = "[]"; // String | + String rowGroups = "[]"; // String | + String groupKeys = "[]"; // String | + Integer page = 1; // Integer | + Integer limit = 30; // Integer | + try { + ApiResponse response = apiInstance.getTestExecutionWithHttpInfo(testExecutionId, search, filters, rowGroups, groupKeys, page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecution"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | +| **search** | **String**| | [optional] [default to ] | +| **filters** | **String**| | [optional] [default to []] | +| **rowGroups** | **String**| | [optional] [default to []] | +| **groupKeys** | **String**| | [optional] [default to []] | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 30] | + +### Return type + +ApiResponse<[**TestExecutionDetailResponse**](TestExecutionDetailResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getTestExecutionAnalytics + +> TestExecutionAnalytics getTestExecutionAnalytics(testExecutionId) + + + +Get analytics data for a specific test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + TestExecutionAnalytics result = apiInstance.getTestExecutionAnalytics(testExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +[**TestExecutionAnalytics**](TestExecutionAnalytics.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getTestExecutionAnalyticsWithHttpInfo + +> ApiResponse getTestExecutionAnalytics getTestExecutionAnalyticsWithHttpInfo(testExecutionId) + + + +Get analytics data for a specific test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.getTestExecutionAnalyticsWithHttpInfo(testExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**TestExecutionAnalytics**](TestExecutionAnalytics.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getTestExecutionKpis + +> RunTestKPIsResponse getTestExecutionKpis(testExecutionId) + + + +Get combined KPI values for a specific run test + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + RunTestKPIsResponse result = apiInstance.getTestExecutionKpis(testExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionKpis"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +[**RunTestKPIsResponse**](RunTestKPIsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getTestExecutionKpisWithHttpInfo + +> ApiResponse getTestExecutionKpis getTestExecutionKpisWithHttpInfo(testExecutionId) + + + +Get combined KPI values for a specific run test + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.getTestExecutionKpisWithHttpInfo(testExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionKpis"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**RunTestKPIsResponse**](RunTestKPIsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getTestExecutionPerformanceSummary + +> PerformanceSummary getTestExecutionPerformanceSummary(testExecutionId) + + + +Get performance summary data for a specific test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + PerformanceSummary result = apiInstance.getTestExecutionPerformanceSummary(testExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionPerformanceSummary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +[**PerformanceSummary**](PerformanceSummary.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getTestExecutionPerformanceSummaryWithHttpInfo + +> ApiResponse getTestExecutionPerformanceSummary getTestExecutionPerformanceSummaryWithHttpInfo(testExecutionId) + + + +Get performance summary data for a specific test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.getTestExecutionPerformanceSummaryWithHttpInfo(testExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionPerformanceSummary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**PerformanceSummary**](PerformanceSummary.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getTestExecutionTranscripts + +> TestExecutionTranscriptsResponse getTestExecutionTranscripts(testExecutionId) + + + +Get all transcripts for a test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + TestExecutionTranscriptsResponse result = apiInstance.getTestExecutionTranscripts(testExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionTranscripts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +[**TestExecutionTranscriptsResponse**](TestExecutionTranscriptsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getTestExecutionTranscriptsWithHttpInfo + +> ApiResponse getTestExecutionTranscripts getTestExecutionTranscriptsWithHttpInfo(testExecutionId) + + + +Get all transcripts for a test execution + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + String testExecutionId = "testExecutionId_example"; // String | + try { + ApiResponse response = apiInstance.getTestExecutionTranscriptsWithHttpInfo(testExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#getTestExecutionTranscripts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **testExecutionId** | **String**| | | + +### Return type + +ApiResponse<[**TestExecutionTranscriptsResponse**](TestExecutionTranscriptsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listTestExecutions + +> List listTestExecutions() + + + +Get paginated list of test executions for the user's organization Query Parameters: - search: search string to filter test executions by run test name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + try { + List result = apiInstance.listTestExecutions(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#listTestExecutions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List<TestExecution>**](TestExecution.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listTestExecutionsWithHttpInfo + +> ApiResponse> listTestExecutions listTestExecutionsWithHttpInfo() + + + +Get paginated list of test executions for the user's organization Query Parameters: - search: search string to filter test executions by run test name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationTestExecutionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationTestExecutionsApi apiInstance = new SimulationTestExecutionsApi(defaultClient); + try { + ApiResponse> response = apiInstance.listTestExecutionsWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationTestExecutionsApi#listTestExecutions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**List<TestExecution>**](TestExecution.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/SimulationsApi.md b/java/futureagi/docs/SimulationsApi.md new file mode 100644 index 0000000..75dfb3b --- /dev/null +++ b/java/futureagi/docs/SimulationsApi.md @@ -0,0 +1,554 @@ +# SimulationsApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getSimulationAnalytics**](SimulationsApi.md#getSimulationAnalytics) | **GET** /sdk/api/v1/simulation/analytics/ | GET /simulation/analytics/ | +| [**getSimulationAnalyticsWithHttpInfo**](SimulationsApi.md#getSimulationAnalyticsWithHttpInfo) | **GET** /sdk/api/v1/simulation/analytics/ | GET /simulation/analytics/ | +| [**listSimulationMetrics**](SimulationsApi.md#listSimulationMetrics) | **GET** /sdk/api/v1/simulation/metrics/ | GET /simulation/metrics/ | +| [**listSimulationMetricsWithHttpInfo**](SimulationsApi.md#listSimulationMetricsWithHttpInfo) | **GET** /sdk/api/v1/simulation/metrics/ | GET /simulation/metrics/ | +| [**listSimulationRuns**](SimulationsApi.md#listSimulationRuns) | **GET** /sdk/api/v1/simulation/runs/ | GET /simulation/runs/ | +| [**listSimulationRunsWithHttpInfo**](SimulationsApi.md#listSimulationRunsWithHttpInfo) | **GET** /sdk/api/v1/simulation/runs/ | GET /simulation/runs/ | + + + +## getSimulationAnalytics + +> SDKSimulationAnalyticsResponse getSimulationAnalytics(runTestName, executionId, evalName, summary) + +GET /simulation/analytics/ + +Aggregated analytics view: eval scores (radar chart data), critical issues, FMA suggestions. Corresponds to the Analytics tab in the UI. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationsApi apiInstance = new SimulationsApi(defaultClient); + String runTestName = "runTestName_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | + String evalName = "evalName_example"; // String | + Boolean summary = true; // Boolean | + try { + SDKSimulationAnalyticsResponse result = apiInstance.getSimulationAnalytics(runTestName, executionId, evalName, summary); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationsApi#getSimulationAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | [optional] | +| **executionId** | **UUID**| | [optional] | +| **evalName** | **String**| | [optional] | +| **summary** | **Boolean**| | [optional] [default to true] | + +### Return type + +[**SDKSimulationAnalyticsResponse**](SDKSimulationAnalyticsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getSimulationAnalyticsWithHttpInfo + +> ApiResponse getSimulationAnalytics getSimulationAnalyticsWithHttpInfo(runTestName, executionId, evalName, summary) + +GET /simulation/analytics/ + +Aggregated analytics view: eval scores (radar chart data), critical issues, FMA suggestions. Corresponds to the Analytics tab in the UI. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationsApi apiInstance = new SimulationsApi(defaultClient); + String runTestName = "runTestName_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | + String evalName = "evalName_example"; // String | + Boolean summary = true; // Boolean | + try { + ApiResponse response = apiInstance.getSimulationAnalyticsWithHttpInfo(runTestName, executionId, evalName, summary); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationsApi#getSimulationAnalytics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | [optional] | +| **executionId** | **UUID**| | [optional] | +| **evalName** | **String**| | [optional] | +| **summary** | **Boolean**| | [optional] [default to true] | + +### Return type + +ApiResponse<[**SDKSimulationAnalyticsResponse**](SDKSimulationAnalyticsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listSimulationMetrics + +> SDKSimulationMetricsResponse listSimulationMetrics(runTestName, executionId, callExecutionId) + +GET /simulation/metrics/ + +Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationsApi apiInstance = new SimulationsApi(defaultClient); + String runTestName = "runTestName_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | + UUID callExecutionId = UUID.randomUUID(); // UUID | + try { + SDKSimulationMetricsResponse result = apiInstance.listSimulationMetrics(runTestName, executionId, callExecutionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationsApi#listSimulationMetrics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | [optional] | +| **executionId** | **UUID**| | [optional] | +| **callExecutionId** | **UUID**| | [optional] | + +### Return type + +[**SDKSimulationMetricsResponse**](SDKSimulationMetricsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listSimulationMetricsWithHttpInfo + +> ApiResponse listSimulationMetrics listSimulationMetricsWithHttpInfo(runTestName, executionId, callExecutionId) + +GET /simulation/metrics/ + +Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationsApi apiInstance = new SimulationsApi(defaultClient); + String runTestName = "runTestName_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | + UUID callExecutionId = UUID.randomUUID(); // UUID | + try { + ApiResponse response = apiInstance.listSimulationMetricsWithHttpInfo(runTestName, executionId, callExecutionId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationsApi#listSimulationMetrics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | [optional] | +| **executionId** | **UUID**| | [optional] | +| **callExecutionId** | **UUID**| | [optional] | + +### Return type + +ApiResponse<[**SDKSimulationMetricsResponse**](SDKSimulationMetricsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listSimulationRuns + +> SDKSimulationRunsResponse listSimulationRuns(runTestName, executionId, callExecutionId, evalName, summary) + +GET /simulation/runs/ + +Run-level records with eval scores, scenario metadata, call details. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationsApi apiInstance = new SimulationsApi(defaultClient); + String runTestName = "runTestName_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | + UUID callExecutionId = UUID.randomUUID(); // UUID | + String evalName = "evalName_example"; // String | + Boolean summary = false; // Boolean | + try { + SDKSimulationRunsResponse result = apiInstance.listSimulationRuns(runTestName, executionId, callExecutionId, evalName, summary); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationsApi#listSimulationRuns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | [optional] | +| **executionId** | **UUID**| | [optional] | +| **callExecutionId** | **UUID**| | [optional] | +| **evalName** | **String**| | [optional] | +| **summary** | **Boolean**| | [optional] [default to false] | + +### Return type + +[**SDKSimulationRunsResponse**](SDKSimulationRunsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listSimulationRunsWithHttpInfo + +> ApiResponse listSimulationRuns listSimulationRunsWithHttpInfo(runTestName, executionId, callExecutionId, evalName, summary) + +GET /simulation/runs/ + +Run-level records with eval scores, scenario metadata, call details. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.SimulationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + SimulationsApi apiInstance = new SimulationsApi(defaultClient); + String runTestName = "runTestName_example"; // String | + UUID executionId = UUID.randomUUID(); // UUID | + UUID callExecutionId = UUID.randomUUID(); // UUID | + String evalName = "evalName_example"; // String | + Boolean summary = false; // Boolean | + try { + ApiResponse response = apiInstance.listSimulationRunsWithHttpInfo(runTestName, executionId, callExecutionId, evalName, summary); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling SimulationsApi#listSimulationRuns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **runTestName** | **String**| | [optional] | +| **executionId** | **UUID**| | [optional] | +| **callExecutionId** | **UUID**| | [optional] | +| **evalName** | **String**| | [optional] | +| **summary** | **Boolean**| | [optional] [default to false] | + +### Return type + +ApiResponse<[**SDKSimulationRunsResponse**](SDKSimulationRunsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/TracerApi.md b/java/futureagi/docs/TracerApi.md new file mode 100644 index 0000000..999e225 --- /dev/null +++ b/java/futureagi/docs/TracerApi.md @@ -0,0 +1,7482 @@ +# TracerApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**tracerFeedIssuesCreateLinearIssueCreate**](TracerApi.md#tracerFeedIssuesCreateLinearIssueCreate) | **POST** /tracer/feed/issues/{cluster_id}/create-linear-issue/ | | +| [**tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo**](TracerApi.md#tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo) | **POST** /tracer/feed/issues/{cluster_id}/create-linear-issue/ | | +| [**tracerFeedIssuesDeepAnalysisCreate**](TracerApi.md#tracerFeedIssuesDeepAnalysisCreate) | **POST** /tracer/feed/issues/{cluster_id}/deep-analysis/ | | +| [**tracerFeedIssuesDeepAnalysisCreateWithHttpInfo**](TracerApi.md#tracerFeedIssuesDeepAnalysisCreateWithHttpInfo) | **POST** /tracer/feed/issues/{cluster_id}/deep-analysis/ | | +| [**tracerFeedIssuesOverviewList**](TracerApi.md#tracerFeedIssuesOverviewList) | **GET** /tracer/feed/issues/{cluster_id}/overview/ | | +| [**tracerFeedIssuesOverviewListWithHttpInfo**](TracerApi.md#tracerFeedIssuesOverviewListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/overview/ | | +| [**tracerFeedIssuesPartialUpdate**](TracerApi.md#tracerFeedIssuesPartialUpdate) | **PATCH** /tracer/feed/issues/{cluster_id}/ | | +| [**tracerFeedIssuesPartialUpdateWithHttpInfo**](TracerApi.md#tracerFeedIssuesPartialUpdateWithHttpInfo) | **PATCH** /tracer/feed/issues/{cluster_id}/ | | +| [**tracerFeedIssuesRootCauseList**](TracerApi.md#tracerFeedIssuesRootCauseList) | **GET** /tracer/feed/issues/{cluster_id}/root-cause/ | GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X | +| [**tracerFeedIssuesRootCauseListWithHttpInfo**](TracerApi.md#tracerFeedIssuesRootCauseListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/root-cause/ | GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X | +| [**tracerFeedIssuesSidebarList**](TracerApi.md#tracerFeedIssuesSidebarList) | **GET** /tracer/feed/issues/{cluster_id}/sidebar/ | GET /tracer/feed/issues/{cluster_id}/sidebar/ | +| [**tracerFeedIssuesSidebarListWithHttpInfo**](TracerApi.md#tracerFeedIssuesSidebarListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/sidebar/ | GET /tracer/feed/issues/{cluster_id}/sidebar/ | +| [**tracerFeedIssuesTracesList**](TracerApi.md#tracerFeedIssuesTracesList) | **GET** /tracer/feed/issues/{cluster_id}/traces/ | | +| [**tracerFeedIssuesTracesListWithHttpInfo**](TracerApi.md#tracerFeedIssuesTracesListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/traces/ | | +| [**tracerFeedIssuesTrendsList**](TracerApi.md#tracerFeedIssuesTrendsList) | **GET** /tracer/feed/issues/{cluster_id}/trends/ | | +| [**tracerFeedIssuesTrendsListWithHttpInfo**](TracerApi.md#tracerFeedIssuesTrendsListWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/trends/ | | +| [**tracerTraceAgentGraph**](TracerApi.md#tracerTraceAgentGraph) | **GET** /tracer/trace/agent_graph/ | Return the aggregate agent graph for a project. | +| [**tracerTraceAgentGraphWithHttpInfo**](TracerApi.md#tracerTraceAgentGraphWithHttpInfo) | **GET** /tracer/trace/agent_graph/ | Return the aggregate agent graph for a project. | +| [**tracerTraceAnnotationCreate**](TracerApi.md#tracerTraceAnnotationCreate) | **POST** /tracer/trace-annotation/ | | +| [**tracerTraceAnnotationCreateWithHttpInfo**](TracerApi.md#tracerTraceAnnotationCreateWithHttpInfo) | **POST** /tracer/trace-annotation/ | | +| [**tracerTraceAnnotationDelete**](TracerApi.md#tracerTraceAnnotationDelete) | **DELETE** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceAnnotationDeleteWithHttpInfo**](TracerApi.md#tracerTraceAnnotationDeleteWithHttpInfo) | **DELETE** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceAnnotationGetAnnotationValues**](TracerApi.md#tracerTraceAnnotationGetAnnotationValues) | **GET** /tracer/trace-annotation/get_annotation_values/ | | +| [**tracerTraceAnnotationGetAnnotationValuesWithHttpInfo**](TracerApi.md#tracerTraceAnnotationGetAnnotationValuesWithHttpInfo) | **GET** /tracer/trace-annotation/get_annotation_values/ | | +| [**tracerTraceAnnotationList**](TracerApi.md#tracerTraceAnnotationList) | **GET** /tracer/trace-annotation/ | | +| [**tracerTraceAnnotationListWithHttpInfo**](TracerApi.md#tracerTraceAnnotationListWithHttpInfo) | **GET** /tracer/trace-annotation/ | | +| [**tracerTraceAnnotationPartialUpdate**](TracerApi.md#tracerTraceAnnotationPartialUpdate) | **PATCH** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceAnnotationPartialUpdateWithHttpInfo**](TracerApi.md#tracerTraceAnnotationPartialUpdateWithHttpInfo) | **PATCH** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceAnnotationRead**](TracerApi.md#tracerTraceAnnotationRead) | **GET** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceAnnotationReadWithHttpInfo**](TracerApi.md#tracerTraceAnnotationReadWithHttpInfo) | **GET** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceAnnotationUpdate**](TracerApi.md#tracerTraceAnnotationUpdate) | **PUT** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceAnnotationUpdateWithHttpInfo**](TracerApi.md#tracerTraceAnnotationUpdateWithHttpInfo) | **PUT** /tracer/trace-annotation/{id}/ | | +| [**tracerTraceBulkCreate**](TracerApi.md#tracerTraceBulkCreate) | **POST** /tracer/trace/bulk_create/ | | +| [**tracerTraceBulkCreateWithHttpInfo**](TracerApi.md#tracerTraceBulkCreateWithHttpInfo) | **POST** /tracer/trace/bulk_create/ | | +| [**tracerTraceCompareTraces**](TracerApi.md#tracerTraceCompareTraces) | **POST** /tracer/trace/compare_traces/ | | +| [**tracerTraceCompareTracesWithHttpInfo**](TracerApi.md#tracerTraceCompareTracesWithHttpInfo) | **POST** /tracer/trace/compare_traces/ | | +| [**tracerTraceCreate**](TracerApi.md#tracerTraceCreate) | **POST** /tracer/trace/ | | +| [**tracerTraceCreateWithHttpInfo**](TracerApi.md#tracerTraceCreateWithHttpInfo) | **POST** /tracer/trace/ | | +| [**tracerTraceDelete**](TracerApi.md#tracerTraceDelete) | **DELETE** /tracer/trace/{id}/ | | +| [**tracerTraceDeleteWithHttpInfo**](TracerApi.md#tracerTraceDeleteWithHttpInfo) | **DELETE** /tracer/trace/{id}/ | | +| [**tracerTraceGetEvalNames**](TracerApi.md#tracerTraceGetEvalNames) | **GET** /tracer/trace/get_eval_names/ | | +| [**tracerTraceGetEvalNamesWithHttpInfo**](TracerApi.md#tracerTraceGetEvalNamesWithHttpInfo) | **GET** /tracer/trace/get_eval_names/ | | +| [**tracerTraceGetTraceExportData**](TracerApi.md#tracerTraceGetTraceExportData) | **GET** /tracer/trace/get_trace_export_data/ | | +| [**tracerTraceGetTraceExportDataWithHttpInfo**](TracerApi.md#tracerTraceGetTraceExportDataWithHttpInfo) | **GET** /tracer/trace/get_trace_export_data/ | | +| [**tracerTraceGetTraceIdByIndex**](TracerApi.md#tracerTraceGetTraceIdByIndex) | **GET** /tracer/trace/get_trace_id_by_index/ | | +| [**tracerTraceGetTraceIdByIndexWithHttpInfo**](TracerApi.md#tracerTraceGetTraceIdByIndexWithHttpInfo) | **GET** /tracer/trace/get_trace_id_by_index/ | | +| [**tracerTraceGetTraceIdByIndexObserve**](TracerApi.md#tracerTraceGetTraceIdByIndexObserve) | **GET** /tracer/trace/get_trace_id_by_index_observe/ | | +| [**tracerTraceGetTraceIdByIndexObserveWithHttpInfo**](TracerApi.md#tracerTraceGetTraceIdByIndexObserveWithHttpInfo) | **GET** /tracer/trace/get_trace_id_by_index_observe/ | | +| [**tracerTraceList**](TracerApi.md#tracerTraceList) | **GET** /tracer/trace/ | | +| [**tracerTraceListWithHttpInfo**](TracerApi.md#tracerTraceListWithHttpInfo) | **GET** /tracer/trace/ | | +| [**tracerTraceListTracesOfSession**](TracerApi.md#tracerTraceListTracesOfSession) | **GET** /tracer/trace/list_traces_of_session/ | | +| [**tracerTraceListTracesOfSessionWithHttpInfo**](TracerApi.md#tracerTraceListTracesOfSessionWithHttpInfo) | **GET** /tracer/trace/list_traces_of_session/ | | +| [**tracerTracePartialUpdate**](TracerApi.md#tracerTracePartialUpdate) | **PATCH** /tracer/trace/{id}/ | | +| [**tracerTracePartialUpdateWithHttpInfo**](TracerApi.md#tracerTracePartialUpdateWithHttpInfo) | **PATCH** /tracer/trace/{id}/ | | +| [**tracerTraceSessionCreate**](TracerApi.md#tracerTraceSessionCreate) | **POST** /tracer/trace-session/ | | +| [**tracerTraceSessionCreateWithHttpInfo**](TracerApi.md#tracerTraceSessionCreateWithHttpInfo) | **POST** /tracer/trace-session/ | | +| [**tracerTraceSessionDelete**](TracerApi.md#tracerTraceSessionDelete) | **DELETE** /tracer/trace-session/{id}/ | | +| [**tracerTraceSessionDeleteWithHttpInfo**](TracerApi.md#tracerTraceSessionDeleteWithHttpInfo) | **DELETE** /tracer/trace-session/{id}/ | | +| [**tracerTraceSessionEvalLogs**](TracerApi.md#tracerTraceSessionEvalLogs) | **GET** /tracer/trace-session/{id}/eval_logs/ | Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. | +| [**tracerTraceSessionEvalLogsWithHttpInfo**](TracerApi.md#tracerTraceSessionEvalLogsWithHttpInfo) | **GET** /tracer/trace-session/{id}/eval_logs/ | Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. | +| [**tracerTraceSessionGetSessionFilterValues**](TracerApi.md#tracerTraceSessionGetSessionFilterValues) | **GET** /tracer/trace-session/get_session_filter_values/ | | +| [**tracerTraceSessionGetSessionFilterValuesWithHttpInfo**](TracerApi.md#tracerTraceSessionGetSessionFilterValuesWithHttpInfo) | **GET** /tracer/trace-session/get_session_filter_values/ | | +| [**tracerTraceSessionGetTraceSessionExportData**](TracerApi.md#tracerTraceSessionGetTraceSessionExportData) | **GET** /tracer/trace-session/get_trace_session_export_data/ | | +| [**tracerTraceSessionGetTraceSessionExportDataWithHttpInfo**](TracerApi.md#tracerTraceSessionGetTraceSessionExportDataWithHttpInfo) | **GET** /tracer/trace-session/get_trace_session_export_data/ | | +| [**tracerTraceSessionList**](TracerApi.md#tracerTraceSessionList) | **GET** /tracer/trace-session/ | | +| [**tracerTraceSessionListWithHttpInfo**](TracerApi.md#tracerTraceSessionListWithHttpInfo) | **GET** /tracer/trace-session/ | | +| [**tracerTraceSessionPartialUpdate**](TracerApi.md#tracerTraceSessionPartialUpdate) | **PATCH** /tracer/trace-session/{id}/ | | +| [**tracerTraceSessionPartialUpdateWithHttpInfo**](TracerApi.md#tracerTraceSessionPartialUpdateWithHttpInfo) | **PATCH** /tracer/trace-session/{id}/ | | +| [**tracerTraceSessionUpdate**](TracerApi.md#tracerTraceSessionUpdate) | **PUT** /tracer/trace-session/{id}/ | | +| [**tracerTraceSessionUpdateWithHttpInfo**](TracerApi.md#tracerTraceSessionUpdateWithHttpInfo) | **PUT** /tracer/trace-session/{id}/ | | +| [**tracerTraceUpdate**](TracerApi.md#tracerTraceUpdate) | **PUT** /tracer/trace/{id}/ | | +| [**tracerTraceUpdateWithHttpInfo**](TracerApi.md#tracerTraceUpdateWithHttpInfo) | **PUT** /tracer/trace/{id}/ | | +| [**tracerUserAlertLogsCreate**](TracerApi.md#tracerUserAlertLogsCreate) | **POST** /tracer/user-alert-logs/ | | +| [**tracerUserAlertLogsCreateWithHttpInfo**](TracerApi.md#tracerUserAlertLogsCreateWithHttpInfo) | **POST** /tracer/user-alert-logs/ | | +| [**tracerUserAlertLogsDelete**](TracerApi.md#tracerUserAlertLogsDelete) | **DELETE** /tracer/user-alert-logs/{id}/ | | +| [**tracerUserAlertLogsDeleteWithHttpInfo**](TracerApi.md#tracerUserAlertLogsDeleteWithHttpInfo) | **DELETE** /tracer/user-alert-logs/{id}/ | | +| [**tracerUserAlertLogsPartialUpdate**](TracerApi.md#tracerUserAlertLogsPartialUpdate) | **PATCH** /tracer/user-alert-logs/{id}/ | | +| [**tracerUserAlertLogsPartialUpdateWithHttpInfo**](TracerApi.md#tracerUserAlertLogsPartialUpdateWithHttpInfo) | **PATCH** /tracer/user-alert-logs/{id}/ | | +| [**tracerUserAlertLogsUpdate**](TracerApi.md#tracerUserAlertLogsUpdate) | **PUT** /tracer/user-alert-logs/{id}/ | | +| [**tracerUserAlertLogsUpdateWithHttpInfo**](TracerApi.md#tracerUserAlertLogsUpdateWithHttpInfo) | **PUT** /tracer/user-alert-logs/{id}/ | | +| [**tracerUserAlertsDuplicate**](TracerApi.md#tracerUserAlertsDuplicate) | **POST** /tracer/user-alerts/duplicate/ | | +| [**tracerUserAlertsDuplicateWithHttpInfo**](TracerApi.md#tracerUserAlertsDuplicateWithHttpInfo) | **POST** /tracer/user-alerts/duplicate/ | | +| [**tracerUserAlertsListMonitors**](TracerApi.md#tracerUserAlertsListMonitors) | **GET** /tracer/user-alerts/list_monitors/ | | +| [**tracerUserAlertsListMonitorsWithHttpInfo**](TracerApi.md#tracerUserAlertsListMonitorsWithHttpInfo) | **GET** /tracer/user-alerts/list_monitors/ | | +| [**tracerUserAlertsUpdate**](TracerApi.md#tracerUserAlertsUpdate) | **PUT** /tracer/user-alerts/{id}/ | | +| [**tracerUserAlertsUpdateWithHttpInfo**](TracerApi.md#tracerUserAlertsUpdateWithHttpInfo) | **PUT** /tracer/user-alerts/{id}/ | | +| [**tracerUsersGetCodeExampleList**](TracerApi.md#tracerUsersGetCodeExampleList) | **GET** /tracer/users/get_code_example/ | | +| [**tracerUsersGetCodeExampleListWithHttpInfo**](TracerApi.md#tracerUsersGetCodeExampleListWithHttpInfo) | **GET** /tracer/users/get_code_example/ | | + + + +## tracerFeedIssuesCreateLinearIssueCreate + +> CreateLinearIssueResponse tracerFeedIssuesCreateLinearIssueCreate(clusterId, createLinearIssue) + + + +POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + CreateLinearIssue createLinearIssue = new CreateLinearIssue(); // CreateLinearIssue | + try { + CreateLinearIssueResponse result = apiInstance.tracerFeedIssuesCreateLinearIssueCreate(clusterId, createLinearIssue); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesCreateLinearIssueCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **createLinearIssue** | [**CreateLinearIssue**](CreateLinearIssue.md)| | | + +### Return type + +[**CreateLinearIssueResponse**](CreateLinearIssueResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo + +> ApiResponse tracerFeedIssuesCreateLinearIssueCreate tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo(clusterId, createLinearIssue) + + + +POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + CreateLinearIssue createLinearIssue = new CreateLinearIssue(); // CreateLinearIssue | + try { + ApiResponse response = apiInstance.tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo(clusterId, createLinearIssue); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesCreateLinearIssueCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **createLinearIssue** | [**CreateLinearIssue**](CreateLinearIssue.md)| | | + +### Return type + +ApiResponse<[**CreateLinearIssueResponse**](CreateLinearIssueResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerFeedIssuesDeepAnalysisCreate + +> DeepAnalysisDispatchApiResponse tracerFeedIssuesDeepAnalysisCreate(clusterId, deepAnalysisBody) + + + +POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + DeepAnalysisBody deepAnalysisBody = new DeepAnalysisBody(); // DeepAnalysisBody | + try { + DeepAnalysisDispatchApiResponse result = apiInstance.tracerFeedIssuesDeepAnalysisCreate(clusterId, deepAnalysisBody); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesDeepAnalysisCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **deepAnalysisBody** | [**DeepAnalysisBody**](DeepAnalysisBody.md)| | | + +### Return type + +[**DeepAnalysisDispatchApiResponse**](DeepAnalysisDispatchApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesDeepAnalysisCreateWithHttpInfo + +> ApiResponse tracerFeedIssuesDeepAnalysisCreate tracerFeedIssuesDeepAnalysisCreateWithHttpInfo(clusterId, deepAnalysisBody) + + + +POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + DeepAnalysisBody deepAnalysisBody = new DeepAnalysisBody(); // DeepAnalysisBody | + try { + ApiResponse response = apiInstance.tracerFeedIssuesDeepAnalysisCreateWithHttpInfo(clusterId, deepAnalysisBody); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesDeepAnalysisCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **deepAnalysisBody** | [**DeepAnalysisBody**](DeepAnalysisBody.md)| | | + +### Return type + +ApiResponse<[**DeepAnalysisDispatchApiResponse**](DeepAnalysisDispatchApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerFeedIssuesOverviewList + +> OverviewApiResponse tracerFeedIssuesOverviewList(clusterId) + + + +GET /tracer/feed/issues/{cluster_id}/overview/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + try { + OverviewApiResponse result = apiInstance.tracerFeedIssuesOverviewList(clusterId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesOverviewList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | + +### Return type + +[**OverviewApiResponse**](OverviewApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesOverviewListWithHttpInfo + +> ApiResponse tracerFeedIssuesOverviewList tracerFeedIssuesOverviewListWithHttpInfo(clusterId) + + + +GET /tracer/feed/issues/{cluster_id}/overview/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + try { + ApiResponse response = apiInstance.tracerFeedIssuesOverviewListWithHttpInfo(clusterId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesOverviewList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | + +### Return type + +ApiResponse<[**OverviewApiResponse**](OverviewApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerFeedIssuesPartialUpdate + +> FeedDetailApiResponse tracerFeedIssuesPartialUpdate(clusterId, feedUpdateBody) + + + +GET + PATCH /tracer/feed/issues/{cluster_id}/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + FeedUpdateBody feedUpdateBody = new FeedUpdateBody(); // FeedUpdateBody | + try { + FeedDetailApiResponse result = apiInstance.tracerFeedIssuesPartialUpdate(clusterId, feedUpdateBody); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **feedUpdateBody** | [**FeedUpdateBody**](FeedUpdateBody.md)| | | + +### Return type + +[**FeedDetailApiResponse**](FeedDetailApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesPartialUpdateWithHttpInfo + +> ApiResponse tracerFeedIssuesPartialUpdate tracerFeedIssuesPartialUpdateWithHttpInfo(clusterId, feedUpdateBody) + + + +GET + PATCH /tracer/feed/issues/{cluster_id}/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + FeedUpdateBody feedUpdateBody = new FeedUpdateBody(); // FeedUpdateBody | + try { + ApiResponse response = apiInstance.tracerFeedIssuesPartialUpdateWithHttpInfo(clusterId, feedUpdateBody); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **feedUpdateBody** | [**FeedUpdateBody**](FeedUpdateBody.md)| | | + +### Return type + +ApiResponse<[**FeedDetailApiResponse**](FeedDetailApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerFeedIssuesRootCauseList + +> DeepAnalysisApiResponse tracerFeedIssuesRootCauseList(clusterId, traceId) + +GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + +Read cached deep-analysis results for a single trace within the cluster. The frontend hits this on mount (to show existing results) and polls it after a POST to /deep-analysis/ until ``status`` flips from ``running`` to ``done`` or ``failed``. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + String traceId = "traceId_example"; // String | + try { + DeepAnalysisApiResponse result = apiInstance.tracerFeedIssuesRootCauseList(clusterId, traceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesRootCauseList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **traceId** | **String**| | | + +### Return type + +[**DeepAnalysisApiResponse**](DeepAnalysisApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesRootCauseListWithHttpInfo + +> ApiResponse tracerFeedIssuesRootCauseList tracerFeedIssuesRootCauseListWithHttpInfo(clusterId, traceId) + +GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + +Read cached deep-analysis results for a single trace within the cluster. The frontend hits this on mount (to show existing results) and polls it after a POST to /deep-analysis/ until ``status`` flips from ``running`` to ``done`` or ``failed``. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + String traceId = "traceId_example"; // String | + try { + ApiResponse response = apiInstance.tracerFeedIssuesRootCauseListWithHttpInfo(clusterId, traceId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesRootCauseList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **traceId** | **String**| | | + +### Return type + +ApiResponse<[**DeepAnalysisApiResponse**](DeepAnalysisApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerFeedIssuesSidebarList + +> FeedSidebarApiResponse tracerFeedIssuesSidebarList(clusterId, traceId) + +GET /tracer/feed/issues/{cluster_id}/sidebar/ + +Accepts an optional ``?trace_id=`` query param. When present, the trace-level sections (AI Metadata + Evaluations) are computed for that trace instead of the cluster's latest, keeping the sidebar in sync with the Overview tab's trace selection. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + String traceId = "traceId_example"; // String | + try { + FeedSidebarApiResponse result = apiInstance.tracerFeedIssuesSidebarList(clusterId, traceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesSidebarList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **traceId** | **String**| | [optional] | + +### Return type + +[**FeedSidebarApiResponse**](FeedSidebarApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesSidebarListWithHttpInfo + +> ApiResponse tracerFeedIssuesSidebarList tracerFeedIssuesSidebarListWithHttpInfo(clusterId, traceId) + +GET /tracer/feed/issues/{cluster_id}/sidebar/ + +Accepts an optional ``?trace_id=`` query param. When present, the trace-level sections (AI Metadata + Evaluations) are computed for that trace instead of the cluster's latest, keeping the sidebar in sync with the Overview tab's trace selection. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + String traceId = "traceId_example"; // String | + try { + ApiResponse response = apiInstance.tracerFeedIssuesSidebarListWithHttpInfo(clusterId, traceId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesSidebarList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **traceId** | **String**| | [optional] | + +### Return type + +ApiResponse<[**FeedSidebarApiResponse**](FeedSidebarApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerFeedIssuesTracesList + +> TracesTabApiResponse tracerFeedIssuesTracesList(clusterId, limit, offset) + + + +GET /tracer/feed/issues/{cluster_id}/traces/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + Integer limit = 50; // Integer | + Integer offset = 0; // Integer | + try { + TracesTabApiResponse result = apiInstance.tracerFeedIssuesTracesList(clusterId, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesTracesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **limit** | **Integer**| | [optional] [default to 50] | +| **offset** | **Integer**| | [optional] [default to 0] | + +### Return type + +[**TracesTabApiResponse**](TracesTabApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesTracesListWithHttpInfo + +> ApiResponse tracerFeedIssuesTracesList tracerFeedIssuesTracesListWithHttpInfo(clusterId, limit, offset) + + + +GET /tracer/feed/issues/{cluster_id}/traces/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + Integer limit = 50; // Integer | + Integer offset = 0; // Integer | + try { + ApiResponse response = apiInstance.tracerFeedIssuesTracesListWithHttpInfo(clusterId, limit, offset); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesTracesList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **limit** | **Integer**| | [optional] [default to 50] | +| **offset** | **Integer**| | [optional] [default to 0] | + +### Return type + +ApiResponse<[**TracesTabApiResponse**](TracesTabApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerFeedIssuesTrendsList + +> TrendsTabApiResponse tracerFeedIssuesTrendsList(clusterId, days) + + + +GET /tracer/feed/issues/{cluster_id}/trends/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + Integer days = 14; // Integer | + try { + TrendsTabApiResponse result = apiInstance.tracerFeedIssuesTrendsList(clusterId, days); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesTrendsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **days** | **Integer**| | [optional] [default to 14] | + +### Return type + +[**TrendsTabApiResponse**](TrendsTabApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerFeedIssuesTrendsListWithHttpInfo + +> ApiResponse tracerFeedIssuesTrendsList tracerFeedIssuesTrendsListWithHttpInfo(clusterId, days) + + + +GET /tracer/feed/issues/{cluster_id}/trends/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String clusterId = "clusterId_example"; // String | + Integer days = 14; // Integer | + try { + ApiResponse response = apiInstance.tracerFeedIssuesTrendsListWithHttpInfo(clusterId, days); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerFeedIssuesTrendsList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **days** | **Integer**| | [optional] [default to 14] | + +### Return type + +ApiResponse<[**TrendsTabApiResponse**](TrendsTabApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAgentGraph + +> TracerTraceList200Response tracerTraceAgentGraph(projectId, page, limit, filters) + +Return the aggregate agent graph for a project. + +Computes nodes (distinct span types/names) and edges (parent→child transitions) across all traces in the given time window. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String filters = "[]"; // String | + try { + TracerTraceList200Response result = apiInstance.tracerTraceAgentGraph(projectId, page, limit, filters); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAgentGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAgentGraphWithHttpInfo + +> ApiResponse tracerTraceAgentGraph tracerTraceAgentGraphWithHttpInfo(projectId, page, limit, filters) + +Return the aggregate agent graph for a project. + +Computes nodes (distinct span types/names) and edges (parent→child transitions) across all traces in the given time window. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String filters = "[]"; // String | + try { + ApiResponse response = apiInstance.tracerTraceAgentGraphWithHttpInfo(projectId, page, limit, filters); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAgentGraph"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAnnotationCreate + +> GetTraceAnnotation tracerTraceAnnotationCreate(getTraceAnnotation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + GetTraceAnnotation getTraceAnnotation = new GetTraceAnnotation(); // GetTraceAnnotation | + try { + GetTraceAnnotation result = apiInstance.tracerTraceAnnotationCreate(getTraceAnnotation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md)| | | + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAnnotationCreateWithHttpInfo + +> ApiResponse tracerTraceAnnotationCreate tracerTraceAnnotationCreateWithHttpInfo(getTraceAnnotation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + GetTraceAnnotation getTraceAnnotation = new GetTraceAnnotation(); // GetTraceAnnotation | + try { + ApiResponse response = apiInstance.tracerTraceAnnotationCreateWithHttpInfo(getTraceAnnotation); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md)| | | + +### Return type + +ApiResponse<[**GetTraceAnnotation**](GetTraceAnnotation.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAnnotationDelete + +> void tracerTraceAnnotationDelete(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.tracerTraceAnnotationDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAnnotationDeleteWithHttpInfo + +> ApiResponse tracerTraceAnnotationDelete tracerTraceAnnotationDeleteWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.tracerTraceAnnotationDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAnnotationGetAnnotationValues + +> GetTraceAnnotationValuesResponse tracerTraceAnnotationGetAnnotationValues(page, limit, observationSpanId, traceId, annotators, excludeAnnotators) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String observationSpanId = "observationSpanId_example"; // String | + UUID traceId = UUID.randomUUID(); // UUID | + String annotators = "annotators_example"; // String | + String excludeAnnotators = "excludeAnnotators_example"; // String | + try { + GetTraceAnnotationValuesResponse result = apiInstance.tracerTraceAnnotationGetAnnotationValues(page, limit, observationSpanId, traceId, annotators, excludeAnnotators); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationGetAnnotationValues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **observationSpanId** | **String**| | [optional] | +| **traceId** | **UUID**| | [optional] | +| **annotators** | **String**| | [optional] | +| **excludeAnnotators** | **String**| | [optional] | + +### Return type + +[**GetTraceAnnotationValuesResponse**](GetTraceAnnotationValuesResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAnnotationGetAnnotationValuesWithHttpInfo + +> ApiResponse tracerTraceAnnotationGetAnnotationValues tracerTraceAnnotationGetAnnotationValuesWithHttpInfo(page, limit, observationSpanId, traceId, annotators, excludeAnnotators) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String observationSpanId = "observationSpanId_example"; // String | + UUID traceId = UUID.randomUUID(); // UUID | + String annotators = "annotators_example"; // String | + String excludeAnnotators = "excludeAnnotators_example"; // String | + try { + ApiResponse response = apiInstance.tracerTraceAnnotationGetAnnotationValuesWithHttpInfo(page, limit, observationSpanId, traceId, annotators, excludeAnnotators); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationGetAnnotationValues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **observationSpanId** | **String**| | [optional] | +| **traceId** | **UUID**| | [optional] | +| **annotators** | **String**| | [optional] | +| **excludeAnnotators** | **String**| | [optional] | + +### Return type + +ApiResponse<[**GetTraceAnnotationValuesResponse**](GetTraceAnnotationValuesResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAnnotationList + +> TracerTraceAnnotationList200Response tracerTraceAnnotationList(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceAnnotationList200Response result = apiInstance.tracerTraceAnnotationList(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceAnnotationList200Response**](TracerTraceAnnotationList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAnnotationListWithHttpInfo + +> ApiResponse tracerTraceAnnotationList tracerTraceAnnotationListWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerTraceAnnotationListWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceAnnotationList200Response**](TracerTraceAnnotationList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAnnotationPartialUpdate + +> GetTraceAnnotation tracerTraceAnnotationPartialUpdate(id, getTraceAnnotation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + GetTraceAnnotation getTraceAnnotation = new GetTraceAnnotation(); // GetTraceAnnotation | + try { + GetTraceAnnotation result = apiInstance.tracerTraceAnnotationPartialUpdate(id, getTraceAnnotation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md)| | | + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAnnotationPartialUpdateWithHttpInfo + +> ApiResponse tracerTraceAnnotationPartialUpdate tracerTraceAnnotationPartialUpdateWithHttpInfo(id, getTraceAnnotation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + GetTraceAnnotation getTraceAnnotation = new GetTraceAnnotation(); // GetTraceAnnotation | + try { + ApiResponse response = apiInstance.tracerTraceAnnotationPartialUpdateWithHttpInfo(id, getTraceAnnotation); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md)| | | + +### Return type + +ApiResponse<[**GetTraceAnnotation**](GetTraceAnnotation.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAnnotationRead + +> GetTraceAnnotation tracerTraceAnnotationRead(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + GetTraceAnnotation result = apiInstance.tracerTraceAnnotationRead(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAnnotationReadWithHttpInfo + +> ApiResponse tracerTraceAnnotationRead tracerTraceAnnotationReadWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.tracerTraceAnnotationReadWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationRead"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**GetTraceAnnotation**](GetTraceAnnotation.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceAnnotationUpdate + +> GetTraceAnnotation tracerTraceAnnotationUpdate(id, getTraceAnnotation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + GetTraceAnnotation getTraceAnnotation = new GetTraceAnnotation(); // GetTraceAnnotation | + try { + GetTraceAnnotation result = apiInstance.tracerTraceAnnotationUpdate(id, getTraceAnnotation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md)| | | + +### Return type + +[**GetTraceAnnotation**](GetTraceAnnotation.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceAnnotationUpdateWithHttpInfo + +> ApiResponse tracerTraceAnnotationUpdate tracerTraceAnnotationUpdateWithHttpInfo(id, getTraceAnnotation) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + GetTraceAnnotation getTraceAnnotation = new GetTraceAnnotation(); // GetTraceAnnotation | + try { + ApiResponse response = apiInstance.tracerTraceAnnotationUpdateWithHttpInfo(id, getTraceAnnotation); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceAnnotationUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **getTraceAnnotation** | [**GetTraceAnnotation**](GetTraceAnnotation.md)| | | + +### Return type + +ApiResponse<[**GetTraceAnnotation**](GetTraceAnnotation.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceBulkCreate + +> Trace tracerTraceBulkCreate(trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Trace trace = new Trace(); // Trace | + try { + Trace result = apiInstance.tracerTraceBulkCreate(trace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceBulkCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +[**Trace**](Trace.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## tracerTraceBulkCreateWithHttpInfo + +> ApiResponse tracerTraceBulkCreate tracerTraceBulkCreateWithHttpInfo(trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Trace trace = new Trace(); // Trace | + try { + ApiResponse response = apiInstance.tracerTraceBulkCreateWithHttpInfo(trace); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceBulkCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +ApiResponse<[**Trace**](Trace.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceCompareTraces + +> Trace tracerTraceCompareTraces(trace) + + + +Compare traces across project versions with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Trace trace = new Trace(); // Trace | + try { + Trace result = apiInstance.tracerTraceCompareTraces(trace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceCompareTraces"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +[**Trace**](Trace.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## tracerTraceCompareTracesWithHttpInfo + +> ApiResponse tracerTraceCompareTraces tracerTraceCompareTracesWithHttpInfo(trace) + + + +Compare traces across project versions with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Trace trace = new Trace(); // Trace | + try { + ApiResponse response = apiInstance.tracerTraceCompareTracesWithHttpInfo(trace); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceCompareTraces"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +ApiResponse<[**Trace**](Trace.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceCreate + +> Trace tracerTraceCreate(trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Trace trace = new Trace(); // Trace | + try { + Trace result = apiInstance.tracerTraceCreate(trace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +[**Trace**](Trace.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## tracerTraceCreateWithHttpInfo + +> ApiResponse tracerTraceCreate tracerTraceCreateWithHttpInfo(trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Trace trace = new Trace(); // Trace | + try { + ApiResponse response = apiInstance.tracerTraceCreateWithHttpInfo(trace); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +ApiResponse<[**Trace**](Trace.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceDelete + +> void tracerTraceDelete(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.tracerTraceDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## tracerTraceDeleteWithHttpInfo + +> ApiResponse tracerTraceDelete tracerTraceDeleteWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.tracerTraceDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceGetEvalNames + +> TracerTraceList200Response tracerTraceGetEvalNames(page, limit) + + + +Fetch all evaluation template names. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceList200Response result = apiInstance.tracerTraceGetEvalNames(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetEvalNames"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceGetEvalNamesWithHttpInfo + +> ApiResponse tracerTraceGetEvalNames tracerTraceGetEvalNamesWithHttpInfo(page, limit) + + + +Fetch all evaluation template names. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerTraceGetEvalNamesWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetEvalNames"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceGetTraceExportData + +> TracerTraceList200Response tracerTraceGetTraceExportData(page, limit) + + + +Export traces filtered by project ID with optimized queries. Auto-detects voice/conversation projects and exports voice-specific fields. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceList200Response result = apiInstance.tracerTraceGetTraceExportData(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetTraceExportData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceGetTraceExportDataWithHttpInfo + +> ApiResponse tracerTraceGetTraceExportData tracerTraceGetTraceExportDataWithHttpInfo(page, limit) + + + +Export traces filtered by project ID with optimized queries. Auto-detects voice/conversation projects and exports voice-specific fields. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerTraceGetTraceExportDataWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetTraceExportData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceGetTraceIdByIndex + +> TracerTraceList200Response tracerTraceGetTraceIdByIndex(traceId, projectVersionId, page, limit, filters) + + + +Get the previous and next trace id by index using efficient database queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UUID traceId = UUID.randomUUID(); // UUID | + UUID projectVersionId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String filters = "[]"; // String | + try { + TracerTraceList200Response result = apiInstance.tracerTraceGetTraceIdByIndex(traceId, projectVersionId, page, limit, filters); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetTraceIdByIndex"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceId** | **UUID**| | | +| **projectVersionId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceGetTraceIdByIndexWithHttpInfo + +> ApiResponse tracerTraceGetTraceIdByIndex tracerTraceGetTraceIdByIndexWithHttpInfo(traceId, projectVersionId, page, limit, filters) + + + +Get the previous and next trace id by index using efficient database queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UUID traceId = UUID.randomUUID(); // UUID | + UUID projectVersionId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String filters = "[]"; // String | + try { + ApiResponse response = apiInstance.tracerTraceGetTraceIdByIndexWithHttpInfo(traceId, projectVersionId, page, limit, filters); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetTraceIdByIndex"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceId** | **UUID**| | | +| **projectVersionId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceGetTraceIdByIndexObserve + +> TracerTraceList200Response tracerTraceGetTraceIdByIndexObserve(traceId, projectId, page, limit, filters) + + + +Get the previous and next trace id by index. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UUID traceId = UUID.randomUUID(); // UUID | + UUID projectId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String filters = "[]"; // String | + try { + TracerTraceList200Response result = apiInstance.tracerTraceGetTraceIdByIndexObserve(traceId, projectId, page, limit, filters); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetTraceIdByIndexObserve"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceId** | **UUID**| | | +| **projectId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceGetTraceIdByIndexObserveWithHttpInfo + +> ApiResponse tracerTraceGetTraceIdByIndexObserve tracerTraceGetTraceIdByIndexObserveWithHttpInfo(traceId, projectId, page, limit, filters) + + + +Get the previous and next trace id by index. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UUID traceId = UUID.randomUUID(); // UUID | + UUID projectId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String filters = "[]"; // String | + try { + ApiResponse response = apiInstance.tracerTraceGetTraceIdByIndexObserveWithHttpInfo(traceId, projectId, page, limit, filters); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceGetTraceIdByIndexObserve"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceId** | **UUID**| | | +| **projectId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceList + +> TracerTraceList200Response tracerTraceList(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceList200Response result = apiInstance.tracerTraceList(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceListWithHttpInfo + +> ApiResponse tracerTraceList tracerTraceListWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerTraceListWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceListTracesOfSession + +> TracerTraceList200Response tracerTraceListTracesOfSession(page, limit, projectId, projectVersionId, sessionId, filters, pageNumber, pageSize, interval) + + + +List traces filtered by project ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + UUID projectId = UUID.randomUUID(); // UUID | + UUID projectVersionId = UUID.randomUUID(); // UUID | + UUID sessionId = UUID.randomUUID(); // UUID | + String filters = "[]"; // String | + Integer pageNumber = 0; // Integer | + Integer pageSize = 30; // Integer | + String interval = "interval_example"; // String | + try { + TracerTraceList200Response result = apiInstance.tracerTraceListTracesOfSession(page, limit, projectId, projectVersionId, sessionId, filters, pageNumber, pageSize, interval); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceListTracesOfSession"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **projectId** | **UUID**| | [optional] | +| **projectVersionId** | **UUID**| | [optional] | +| **sessionId** | **UUID**| | [optional] | +| **filters** | **String**| | [optional] [default to []] | +| **pageNumber** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 30] | +| **interval** | **String**| | [optional] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceListTracesOfSessionWithHttpInfo + +> ApiResponse tracerTraceListTracesOfSession tracerTraceListTracesOfSessionWithHttpInfo(page, limit, projectId, projectVersionId, sessionId, filters, pageNumber, pageSize, interval) + + + +List traces filtered by project ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + UUID projectId = UUID.randomUUID(); // UUID | + UUID projectVersionId = UUID.randomUUID(); // UUID | + UUID sessionId = UUID.randomUUID(); // UUID | + String filters = "[]"; // String | + Integer pageNumber = 0; // Integer | + Integer pageSize = 30; // Integer | + String interval = "interval_example"; // String | + try { + ApiResponse response = apiInstance.tracerTraceListTracesOfSessionWithHttpInfo(page, limit, projectId, projectVersionId, sessionId, filters, pageNumber, pageSize, interval); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceListTracesOfSession"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **projectId** | **UUID**| | [optional] | +| **projectVersionId** | **UUID**| | [optional] | +| **sessionId** | **UUID**| | [optional] | +| **filters** | **String**| | [optional] [default to []] | +| **pageNumber** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 30] | +| **interval** | **String**| | [optional] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTracePartialUpdate + +> Trace tracerTracePartialUpdate(id, trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + Trace trace = new Trace(); // Trace | + try { + Trace result = apiInstance.tracerTracePartialUpdate(id, trace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTracePartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +[**Trace**](Trace.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTracePartialUpdateWithHttpInfo + +> ApiResponse tracerTracePartialUpdate tracerTracePartialUpdateWithHttpInfo(id, trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + Trace trace = new Trace(); // Trace | + try { + ApiResponse response = apiInstance.tracerTracePartialUpdateWithHttpInfo(id, trace); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTracePartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +ApiResponse<[**Trace**](Trace.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionCreate + +> TraceSession tracerTraceSessionCreate(traceSession) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + TraceSession traceSession = new TraceSession(); // TraceSession | + try { + TraceSession result = apiInstance.tracerTraceSessionCreate(traceSession); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceSession** | [**TraceSession**](TraceSession.md)| | | + +### Return type + +[**TraceSession**](TraceSession.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionCreateWithHttpInfo + +> ApiResponse tracerTraceSessionCreate tracerTraceSessionCreateWithHttpInfo(traceSession) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + TraceSession traceSession = new TraceSession(); // TraceSession | + try { + ApiResponse response = apiInstance.tracerTraceSessionCreateWithHttpInfo(traceSession); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceSession** | [**TraceSession**](TraceSession.md)| | | + +### Return type + +ApiResponse<[**TraceSession**](TraceSession.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionDelete + +> void tracerTraceSessionDelete(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.tracerTraceSessionDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionDeleteWithHttpInfo + +> ApiResponse tracerTraceSessionDelete tracerTraceSessionDeleteWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.tracerTraceSessionDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionEvalLogs + +> TraceSession tracerTraceSessionEvalLogs(id) + +Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + +Session-level eval results are walled off from span/trace surfaces by ``target_type='session'`` — this endpoint is the only place they appear. Query params: page (int, 0-indexed, default 0) page_size (int, default 25, max 100) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + TraceSession result = apiInstance.tracerTraceSessionEvalLogs(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionEvalLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**TraceSession**](TraceSession.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionEvalLogsWithHttpInfo + +> ApiResponse tracerTraceSessionEvalLogs tracerTraceSessionEvalLogsWithHttpInfo(id) + +Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + +Session-level eval results are walled off from span/trace surfaces by ``target_type='session'`` — this endpoint is the only place they appear. Query params: page (int, 0-indexed, default 0) page_size (int, default 25, max 100) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.tracerTraceSessionEvalLogsWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionEvalLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**TraceSession**](TraceSession.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionGetSessionFilterValues + +> TracerTraceSessionList200Response tracerTraceSessionGetSessionFilterValues(page, limit) + + + +Return distinct values for a session-level column. Used by the filter panel's value picker for session-specific fields (session_id, user_id, first_message, etc.). Query params: project_id: required column: canonical session column name, e.g. \"session_id\" search: optional search substring page: page number (0-based), default 0 page_size: default 50 + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceSessionList200Response result = apiInstance.tracerTraceSessionGetSessionFilterValues(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionGetSessionFilterValues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionGetSessionFilterValuesWithHttpInfo + +> ApiResponse tracerTraceSessionGetSessionFilterValues tracerTraceSessionGetSessionFilterValuesWithHttpInfo(page, limit) + + + +Return distinct values for a session-level column. Used by the filter panel's value picker for session-specific fields (session_id, user_id, first_message, etc.). Query params: project_id: required column: canonical session column name, e.g. \"session_id\" search: optional search substring page: page number (0-based), default 0 page_size: default 50 + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerTraceSessionGetSessionFilterValuesWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionGetSessionFilterValues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionGetTraceSessionExportData + +> TracerTraceSessionList200Response tracerTraceSessionGetTraceSessionExportData(page, limit) + + + +Export traces filtered by project ID and project version ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceSessionList200Response result = apiInstance.tracerTraceSessionGetTraceSessionExportData(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionGetTraceSessionExportData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionGetTraceSessionExportDataWithHttpInfo + +> ApiResponse tracerTraceSessionGetTraceSessionExportData tracerTraceSessionGetTraceSessionExportDataWithHttpInfo(page, limit) + + + +Export traces filtered by project ID and project version ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerTraceSessionGetTraceSessionExportDataWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionGetTraceSessionExportData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionList + +> TracerTraceSessionList200Response tracerTraceSessionList(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceSessionList200Response result = apiInstance.tracerTraceSessionList(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionListWithHttpInfo + +> ApiResponse tracerTraceSessionList tracerTraceSessionListWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerTraceSessionListWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionPartialUpdate + +> TraceSession tracerTraceSessionPartialUpdate(id, traceSession) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + TraceSession traceSession = new TraceSession(); // TraceSession | + try { + TraceSession result = apiInstance.tracerTraceSessionPartialUpdate(id, traceSession); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **traceSession** | [**TraceSession**](TraceSession.md)| | | + +### Return type + +[**TraceSession**](TraceSession.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionPartialUpdateWithHttpInfo + +> ApiResponse tracerTraceSessionPartialUpdate tracerTraceSessionPartialUpdateWithHttpInfo(id, traceSession) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + TraceSession traceSession = new TraceSession(); // TraceSession | + try { + ApiResponse response = apiInstance.tracerTraceSessionPartialUpdateWithHttpInfo(id, traceSession); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **traceSession** | [**TraceSession**](TraceSession.md)| | | + +### Return type + +ApiResponse<[**TraceSession**](TraceSession.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceSessionUpdate + +> TraceSession tracerTraceSessionUpdate(id, traceSession) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + TraceSession traceSession = new TraceSession(); // TraceSession | + try { + TraceSession result = apiInstance.tracerTraceSessionUpdate(id, traceSession); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **traceSession** | [**TraceSession**](TraceSession.md)| | | + +### Return type + +[**TraceSession**](TraceSession.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceSessionUpdateWithHttpInfo + +> ApiResponse tracerTraceSessionUpdate tracerTraceSessionUpdateWithHttpInfo(id, traceSession) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + TraceSession traceSession = new TraceSession(); // TraceSession | + try { + ApiResponse response = apiInstance.tracerTraceSessionUpdateWithHttpInfo(id, traceSession); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceSessionUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **traceSession** | [**TraceSession**](TraceSession.md)| | | + +### Return type + +ApiResponse<[**TraceSession**](TraceSession.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerTraceUpdate + +> Trace tracerTraceUpdate(id, trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + Trace trace = new Trace(); // Trace | + try { + Trace result = apiInstance.tracerTraceUpdate(id, trace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +[**Trace**](Trace.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerTraceUpdateWithHttpInfo + +> ApiResponse tracerTraceUpdate tracerTraceUpdateWithHttpInfo(id, trace) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + Trace trace = new Trace(); // Trace | + try { + ApiResponse response = apiInstance.tracerTraceUpdateWithHttpInfo(id, trace); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerTraceUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **trace** | [**Trace**](Trace.md)| | | + +### Return type + +ApiResponse<[**Trace**](Trace.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerUserAlertLogsCreate + +> UserAlertMonitorLog tracerUserAlertLogsCreate(userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + UserAlertMonitorLog result = apiInstance.tracerUserAlertLogsCreate(userAlertMonitorLog); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## tracerUserAlertLogsCreateWithHttpInfo + +> ApiResponse tracerUserAlertLogsCreate tracerUserAlertLogsCreateWithHttpInfo(userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + ApiResponse response = apiInstance.tracerUserAlertLogsCreateWithHttpInfo(userAlertMonitorLog); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitorLog**](UserAlertMonitorLog.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## tracerUserAlertLogsDelete + +> void tracerUserAlertLogsDelete(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + apiInstance.tracerUserAlertLogsDelete(id); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +null (empty response body) + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + +## tracerUserAlertLogsDeleteWithHttpInfo + +> ApiResponse tracerUserAlertLogsDelete tracerUserAlertLogsDeleteWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.tracerUserAlertLogsDeleteWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + + +ApiResponse + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Response | - | +| **0** | Default error response | - | + + +## tracerUserAlertLogsPartialUpdate + +> UserAlertMonitorLog tracerUserAlertLogsPartialUpdate(id, userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + UserAlertMonitorLog result = apiInstance.tracerUserAlertLogsPartialUpdate(id, userAlertMonitorLog); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerUserAlertLogsPartialUpdateWithHttpInfo + +> ApiResponse tracerUserAlertLogsPartialUpdate tracerUserAlertLogsPartialUpdateWithHttpInfo(id, userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + ApiResponse response = apiInstance.tracerUserAlertLogsPartialUpdateWithHttpInfo(id, userAlertMonitorLog); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsPartialUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitorLog**](UserAlertMonitorLog.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerUserAlertLogsUpdate + +> UserAlertMonitorLog tracerUserAlertLogsUpdate(id, userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + UserAlertMonitorLog result = apiInstance.tracerUserAlertLogsUpdate(id, userAlertMonitorLog); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +[**UserAlertMonitorLog**](UserAlertMonitorLog.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerUserAlertLogsUpdateWithHttpInfo + +> ApiResponse tracerUserAlertLogsUpdate tracerUserAlertLogsUpdateWithHttpInfo(id, userAlertMonitorLog) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitorLog userAlertMonitorLog = new UserAlertMonitorLog(); // UserAlertMonitorLog | + try { + ApiResponse response = apiInstance.tracerUserAlertLogsUpdateWithHttpInfo(id, userAlertMonitorLog); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertLogsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitorLog** | [**UserAlertMonitorLog**](UserAlertMonitorLog.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitorLog**](UserAlertMonitorLog.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerUserAlertsDuplicate + +> UserAlertMonitorDuplicateResponse tracerUserAlertsDuplicate(userAlertMonitorDuplicate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UserAlertMonitorDuplicate userAlertMonitorDuplicate = new UserAlertMonitorDuplicate(); // UserAlertMonitorDuplicate | + try { + UserAlertMonitorDuplicateResponse result = apiInstance.tracerUserAlertsDuplicate(userAlertMonitorDuplicate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertsDuplicate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitorDuplicate** | [**UserAlertMonitorDuplicate**](UserAlertMonitorDuplicate.md)| | | + +### Return type + +[**UserAlertMonitorDuplicateResponse**](UserAlertMonitorDuplicateResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerUserAlertsDuplicateWithHttpInfo + +> ApiResponse tracerUserAlertsDuplicate tracerUserAlertsDuplicateWithHttpInfo(userAlertMonitorDuplicate) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + UserAlertMonitorDuplicate userAlertMonitorDuplicate = new UserAlertMonitorDuplicate(); // UserAlertMonitorDuplicate | + try { + ApiResponse response = apiInstance.tracerUserAlertsDuplicateWithHttpInfo(userAlertMonitorDuplicate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertsDuplicate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userAlertMonitorDuplicate** | [**UserAlertMonitorDuplicate**](UserAlertMonitorDuplicate.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitorDuplicateResponse**](UserAlertMonitorDuplicateResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## tracerUserAlertsListMonitors + +> ListAlerts200Response tracerUserAlertsListMonitors(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ListAlerts200Response result = apiInstance.tracerUserAlertsListMonitors(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertsListMonitors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ListAlerts200Response**](ListAlerts200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerUserAlertsListMonitorsWithHttpInfo + +> ApiResponse tracerUserAlertsListMonitors tracerUserAlertsListMonitorsWithHttpInfo(page, limit) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.tracerUserAlertsListMonitorsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertsListMonitors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ListAlerts200Response**](ListAlerts200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerUserAlertsUpdate + +> UserAlertMonitor tracerUserAlertsUpdate(id, userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + UserAlertMonitor result = apiInstance.tracerUserAlertsUpdate(id, userAlertMonitor); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +[**UserAlertMonitor**](UserAlertMonitor.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## tracerUserAlertsUpdateWithHttpInfo + +> ApiResponse tracerUserAlertsUpdate tracerUserAlertsUpdateWithHttpInfo(id, userAlertMonitor) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + String id = "id_example"; // String | + UserAlertMonitor userAlertMonitor = new UserAlertMonitor(); // UserAlertMonitor | + try { + ApiResponse response = apiInstance.tracerUserAlertsUpdateWithHttpInfo(id, userAlertMonitor); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUserAlertsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **userAlertMonitor** | [**UserAlertMonitor**](UserAlertMonitor.md)| | | + +### Return type + +ApiResponse<[**UserAlertMonitor**](UserAlertMonitor.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## tracerUsersGetCodeExampleList + +> UserCodeExampleResponse tracerUsersGetCodeExampleList() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + try { + UserCodeExampleResponse result = apiInstance.tracerUsersGetCodeExampleList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUsersGetCodeExampleList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UserCodeExampleResponse**](UserCodeExampleResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## tracerUsersGetCodeExampleListWithHttpInfo + +> ApiResponse tracerUsersGetCodeExampleList tracerUsersGetCodeExampleListWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracerApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracerApi apiInstance = new TracerApi(defaultClient); + try { + ApiResponse response = apiInstance.tracerUsersGetCodeExampleListWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracerApi#tracerUsersGetCodeExampleList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**UserCodeExampleResponse**](UserCodeExampleResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/TracingApi.md b/java/futureagi/docs/TracingApi.md new file mode 100644 index 0000000..79111b8 --- /dev/null +++ b/java/futureagi/docs/TracingApi.md @@ -0,0 +1,2984 @@ +# TracingApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createBulkTraceAnnotation**](TracingApi.md#createBulkTraceAnnotation) | **POST** /tracer/bulk-annotation/ | | +| [**createBulkTraceAnnotationWithHttpInfo**](TracingApi.md#createBulkTraceAnnotationWithHttpInfo) | **POST** /tracer/bulk-annotation/ | | +| [**getErrorFeedIssue**](TracingApi.md#getErrorFeedIssue) | **GET** /tracer/feed/issues/{cluster_id}/ | | +| [**getErrorFeedIssueWithHttpInfo**](TracingApi.md#getErrorFeedIssueWithHttpInfo) | **GET** /tracer/feed/issues/{cluster_id}/ | | +| [**getErrorFeedIssueStats**](TracingApi.md#getErrorFeedIssueStats) | **GET** /tracer/feed/issues/stats/ | | +| [**getErrorFeedIssueStatsWithHttpInfo**](TracingApi.md#getErrorFeedIssueStatsWithHttpInfo) | **GET** /tracer/feed/issues/stats/ | | +| [**getTrace**](TracingApi.md#getTrace) | **GET** /tracer/trace/{id}/ | | +| [**getTraceWithHttpInfo**](TracingApi.md#getTraceWithHttpInfo) | **GET** /tracer/trace/{id}/ | | +| [**getTraceGraphMethods**](TracingApi.md#getTraceGraphMethods) | **POST** /tracer/trace/get_graph_methods/ | | +| [**getTraceGraphMethodsWithHttpInfo**](TracingApi.md#getTraceGraphMethodsWithHttpInfo) | **POST** /tracer/trace/get_graph_methods/ | | +| [**getTraceSession**](TracingApi.md#getTraceSession) | **GET** /tracer/trace-session/{id}/ | | +| [**getTraceSessionWithHttpInfo**](TracingApi.md#getTraceSessionWithHttpInfo) | **GET** /tracer/trace-session/{id}/ | | +| [**getTraceSessionGraphData**](TracingApi.md#getTraceSessionGraphData) | **POST** /tracer/trace-session/get_session_graph_data/ | Fetch time-series session metrics for the observe graph. | +| [**getTraceSessionGraphDataWithHttpInfo**](TracingApi.md#getTraceSessionGraphDataWithHttpInfo) | **POST** /tracer/trace-session/get_session_graph_data/ | Fetch time-series session metrics for the observe graph. | +| [**getVoiceCallDetail**](TracingApi.md#getVoiceCallDetail) | **GET** /tracer/trace/voice_call_detail/ | Return the heavy / detail-only fields for a single voice call. | +| [**getVoiceCallDetailWithHttpInfo**](TracingApi.md#getVoiceCallDetailWithHttpInfo) | **GET** /tracer/trace/voice_call_detail/ | Return the heavy / detail-only fields for a single voice call. | +| [**listErrorFeedIssues**](TracingApi.md#listErrorFeedIssues) | **GET** /tracer/feed/issues/ | | +| [**listErrorFeedIssuesWithHttpInfo**](TracingApi.md#listErrorFeedIssuesWithHttpInfo) | **GET** /tracer/feed/issues/ | | +| [**listTraceAnnotationLabels**](TracingApi.md#listTraceAnnotationLabels) | **GET** /tracer/get-annotation-labels/ | | +| [**listTraceAnnotationLabelsWithHttpInfo**](TracingApi.md#listTraceAnnotationLabelsWithHttpInfo) | **GET** /tracer/get-annotation-labels/ | | +| [**listTraceProjects**](TracingApi.md#listTraceProjects) | **GET** /tracer/project/list_projects/ | List projects filtered by organization ID. | +| [**listTraceProjectsWithHttpInfo**](TracingApi.md#listTraceProjectsWithHttpInfo) | **GET** /tracer/project/list_projects/ | List projects filtered by organization ID. | +| [**listTraceProperties**](TracingApi.md#listTraceProperties) | **GET** /tracer/trace/get_properties/ | | +| [**listTracePropertiesWithHttpInfo**](TracingApi.md#listTracePropertiesWithHttpInfo) | **GET** /tracer/trace/get_properties/ | | +| [**listTraceSessions**](TracingApi.md#listTraceSessions) | **GET** /tracer/trace-session/list_sessions/ | | +| [**listTraceSessionsWithHttpInfo**](TracingApi.md#listTraceSessionsWithHttpInfo) | **GET** /tracer/trace-session/list_sessions/ | | +| [**listTraceUsers**](TracingApi.md#listTraceUsers) | **GET** /tracer/users/ | | +| [**listTraceUsersWithHttpInfo**](TracingApi.md#listTraceUsersWithHttpInfo) | **GET** /tracer/users/ | | +| [**listTraces**](TracingApi.md#listTraces) | **GET** /tracer/trace/list_traces/ | | +| [**listTracesWithHttpInfo**](TracingApi.md#listTracesWithHttpInfo) | **GET** /tracer/trace/list_traces/ | | +| [**listVoiceCalls**](TracingApi.md#listVoiceCalls) | **GET** /tracer/trace/list_voice_calls/ | | +| [**listVoiceCallsWithHttpInfo**](TracingApi.md#listVoiceCallsWithHttpInfo) | **GET** /tracer/trace/list_voice_calls/ | | +| [**updateTraceTags**](TracingApi.md#updateTraceTags) | **PATCH** /tracer/trace/{id}/tags/ | | +| [**updateTraceTagsWithHttpInfo**](TracingApi.md#updateTraceTagsWithHttpInfo) | **PATCH** /tracer/trace/{id}/tags/ | | + + + +## createBulkTraceAnnotation + +> BulkAnnotationResponse createBulkTraceAnnotation(bulkAnnotationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + BulkAnnotationRequest bulkAnnotationRequest = new BulkAnnotationRequest(); // BulkAnnotationRequest | + try { + BulkAnnotationResponse result = apiInstance.createBulkTraceAnnotation(bulkAnnotationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#createBulkTraceAnnotation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bulkAnnotationRequest** | [**BulkAnnotationRequest**](BulkAnnotationRequest.md)| | | + +### Return type + +[**BulkAnnotationResponse**](BulkAnnotationResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## createBulkTraceAnnotationWithHttpInfo + +> ApiResponse createBulkTraceAnnotation createBulkTraceAnnotationWithHttpInfo(bulkAnnotationRequest) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + BulkAnnotationRequest bulkAnnotationRequest = new BulkAnnotationRequest(); // BulkAnnotationRequest | + try { + ApiResponse response = apiInstance.createBulkTraceAnnotationWithHttpInfo(bulkAnnotationRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#createBulkTraceAnnotation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bulkAnnotationRequest** | [**BulkAnnotationRequest**](BulkAnnotationRequest.md)| | | + +### Return type + +ApiResponse<[**BulkAnnotationResponse**](BulkAnnotationResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getErrorFeedIssue + +> FeedDetailApiResponse getErrorFeedIssue(clusterId, projectId) + + + +GET + PATCH /tracer/feed/issues/{cluster_id}/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String clusterId = "clusterId_example"; // String | + UUID projectId = UUID.randomUUID(); // UUID | + try { + FeedDetailApiResponse result = apiInstance.getErrorFeedIssue(clusterId, projectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getErrorFeedIssue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **projectId** | **UUID**| | [optional] | + +### Return type + +[**FeedDetailApiResponse**](FeedDetailApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getErrorFeedIssueWithHttpInfo + +> ApiResponse getErrorFeedIssue getErrorFeedIssueWithHttpInfo(clusterId, projectId) + + + +GET + PATCH /tracer/feed/issues/{cluster_id}/ + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String clusterId = "clusterId_example"; // String | + UUID projectId = UUID.randomUUID(); // UUID | + try { + ApiResponse response = apiInstance.getErrorFeedIssueWithHttpInfo(clusterId, projectId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getErrorFeedIssue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clusterId** | **String**| | | +| **projectId** | **UUID**| | [optional] | + +### Return type + +ApiResponse<[**FeedDetailApiResponse**](FeedDetailApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getErrorFeedIssueStats + +> FeedStatsApiResponse getErrorFeedIssueStats(projectId, timeRangeDays) + + + +GET /tracer/feed/issues/stats/ — top stats bar totals. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + Integer timeRangeDays = 56; // Integer | + try { + FeedStatsApiResponse result = apiInstance.getErrorFeedIssueStats(projectId, timeRangeDays); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getErrorFeedIssueStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | +| **timeRangeDays** | **Integer**| | [optional] | + +### Return type + +[**FeedStatsApiResponse**](FeedStatsApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getErrorFeedIssueStatsWithHttpInfo + +> ApiResponse getErrorFeedIssueStats getErrorFeedIssueStatsWithHttpInfo(projectId, timeRangeDays) + + + +GET /tracer/feed/issues/stats/ — top stats bar totals. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + Integer timeRangeDays = 56; // Integer | + try { + ApiResponse response = apiInstance.getErrorFeedIssueStatsWithHttpInfo(projectId, timeRangeDays); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getErrorFeedIssueStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | +| **timeRangeDays** | **Integer**| | [optional] | + +### Return type + +ApiResponse<[**FeedStatsApiResponse**](FeedStatsApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## getTrace + +> Trace getTrace(id) + + + +Retrieve a trace by its ID. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String id = "id_example"; // String | + try { + Trace result = apiInstance.getTrace(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTrace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**Trace**](Trace.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getTraceWithHttpInfo + +> ApiResponse getTrace getTraceWithHttpInfo(id) + + + +Retrieve a trace by its ID. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.getTraceWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTrace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**Trace**](Trace.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## getTraceGraphMethods + +> ObserveGraphDataResponse getTraceGraphMethods(observeGraphDataRequest) + + + +Fetch data for the observe graph with optimized queries + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + ObserveGraphDataRequest observeGraphDataRequest = new ObserveGraphDataRequest(); // ObserveGraphDataRequest | + try { + ObserveGraphDataResponse result = apiInstance.getTraceGraphMethods(observeGraphDataRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTraceGraphMethods"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **observeGraphDataRequest** | [**ObserveGraphDataRequest**](ObserveGraphDataRequest.md)| | | + +### Return type + +[**ObserveGraphDataResponse**](ObserveGraphDataResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getTraceGraphMethodsWithHttpInfo + +> ApiResponse getTraceGraphMethods getTraceGraphMethodsWithHttpInfo(observeGraphDataRequest) + + + +Fetch data for the observe graph with optimized queries + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + ObserveGraphDataRequest observeGraphDataRequest = new ObserveGraphDataRequest(); // ObserveGraphDataRequest | + try { + ApiResponse response = apiInstance.getTraceGraphMethodsWithHttpInfo(observeGraphDataRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTraceGraphMethods"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **observeGraphDataRequest** | [**ObserveGraphDataRequest**](ObserveGraphDataRequest.md)| | | + +### Return type + +ApiResponse<[**ObserveGraphDataResponse**](ObserveGraphDataResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## getTraceSession + +> TraceSession getTraceSession(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String id = "id_example"; // String | + try { + TraceSession result = apiInstance.getTraceSession(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTraceSession"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**TraceSession**](TraceSession.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getTraceSessionWithHttpInfo + +> ApiResponse getTraceSession getTraceSessionWithHttpInfo(id) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String id = "id_example"; // String | + try { + ApiResponse response = apiInstance.getTraceSessionWithHttpInfo(id); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTraceSession"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +ApiResponse<[**TraceSession**](TraceSession.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## getTraceSessionGraphData + +> TraceSessionGraphDataRequest getTraceSessionGraphData(traceSessionGraphDataRequest) + +Fetch time-series session metrics for the observe graph. + +Supports the same metric types as the trace graph endpoint: - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, avg_duration, avg_traces_per_session — all aggregated at session level - EVAL: eval scores averaged across sessions - ANNOTATION: annotation scores averaged across sessions Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + TraceSessionGraphDataRequest traceSessionGraphDataRequest = new TraceSessionGraphDataRequest(); // TraceSessionGraphDataRequest | + try { + TraceSessionGraphDataRequest result = apiInstance.getTraceSessionGraphData(traceSessionGraphDataRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTraceSessionGraphData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceSessionGraphDataRequest** | [**TraceSessionGraphDataRequest**](TraceSessionGraphDataRequest.md)| | | + +### Return type + +[**TraceSessionGraphDataRequest**](TraceSessionGraphDataRequest.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + +## getTraceSessionGraphDataWithHttpInfo + +> ApiResponse getTraceSessionGraphData getTraceSessionGraphDataWithHttpInfo(traceSessionGraphDataRequest) + +Fetch time-series session metrics for the observe graph. + +Supports the same metric types as the trace graph endpoint: - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, avg_duration, avg_traces_per_session — all aggregated at session level - EVAL: eval scores averaged across sessions - ANNOTATION: annotation scores averaged across sessions Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + TraceSessionGraphDataRequest traceSessionGraphDataRequest = new TraceSessionGraphDataRequest(); // TraceSessionGraphDataRequest | + try { + ApiResponse response = apiInstance.getTraceSessionGraphDataWithHttpInfo(traceSessionGraphDataRequest); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getTraceSessionGraphData"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **traceSessionGraphDataRequest** | [**TraceSessionGraphDataRequest**](TraceSessionGraphDataRequest.md)| | | + +### Return type + +ApiResponse<[**TraceSessionGraphDataRequest**](TraceSessionGraphDataRequest.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Response | - | +| **0** | Default error response | - | + + +## getVoiceCallDetail + +> TracerTraceList200Response getVoiceCallDetail(page, limit) + +Return the heavy / detail-only fields for a single voice call. + +Query params: - trace_id (required) — UUID of the voice call trace. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceList200Response result = apiInstance.getVoiceCallDetail(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getVoiceCallDetail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## getVoiceCallDetailWithHttpInfo + +> ApiResponse getVoiceCallDetail getVoiceCallDetailWithHttpInfo(page, limit) + +Return the heavy / detail-only fields for a single voice call. + +Query params: - trace_id (required) — UUID of the voice call trace. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.getVoiceCallDetailWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#getVoiceCallDetail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listErrorFeedIssues + +> FeedListApiResponse listErrorFeedIssues(projectId, search, status, fixLayer, source, issueGroup, timeRangeDays, sortBy, sortDir, limit, offset) + + + +GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + String search = "search_example"; // String | + String status = "escalating"; // String | + String fixLayer = "fixLayer_example"; // String | + String source = "scanner"; // String | + String issueGroup = "issueGroup_example"; // String | + Integer timeRangeDays = 56; // Integer | + String sortBy = "last_seen"; // String | + String sortDir = "asc"; // String | + Integer limit = 25; // Integer | + Integer offset = 0; // Integer | + try { + FeedListApiResponse result = apiInstance.listErrorFeedIssues(projectId, search, status, fixLayer, source, issueGroup, timeRangeDays, sortBy, sortDir, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listErrorFeedIssues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | +| **search** | **String**| | [optional] | +| **status** | **String**| | [optional] [enum: escalating, for_review, acknowledged, resolved] | +| **fixLayer** | **String**| | [optional] | +| **source** | **String**| | [optional] [enum: scanner, eval] | +| **issueGroup** | **String**| | [optional] | +| **timeRangeDays** | **Integer**| | [optional] | +| **sortBy** | **String**| | [optional] [default to last_seen] [enum: last_seen, first_seen, error_count, unique_traces] | +| **sortDir** | **String**| | [optional] [default to desc] [enum: asc, desc] | +| **limit** | **Integer**| | [optional] [default to 25] | +| **offset** | **Integer**| | [optional] [default to 0] | + +### Return type + +[**FeedListApiResponse**](FeedListApiResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listErrorFeedIssuesWithHttpInfo + +> ApiResponse listErrorFeedIssues listErrorFeedIssuesWithHttpInfo(projectId, search, status, fixLayer, source, issueGroup, timeRangeDays, sortBy, sortDir, limit, offset) + + + +GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + String search = "search_example"; // String | + String status = "escalating"; // String | + String fixLayer = "fixLayer_example"; // String | + String source = "scanner"; // String | + String issueGroup = "issueGroup_example"; // String | + Integer timeRangeDays = 56; // Integer | + String sortBy = "last_seen"; // String | + String sortDir = "asc"; // String | + Integer limit = 25; // Integer | + Integer offset = 0; // Integer | + try { + ApiResponse response = apiInstance.listErrorFeedIssuesWithHttpInfo(projectId, search, status, fixLayer, source, issueGroup, timeRangeDays, sortBy, sortDir, limit, offset); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listErrorFeedIssues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | +| **search** | **String**| | [optional] | +| **status** | **String**| | [optional] [enum: escalating, for_review, acknowledged, resolved] | +| **fixLayer** | **String**| | [optional] | +| **source** | **String**| | [optional] [enum: scanner, eval] | +| **issueGroup** | **String**| | [optional] | +| **timeRangeDays** | **Integer**| | [optional] | +| **sortBy** | **String**| | [optional] [default to last_seen] [enum: last_seen, first_seen, error_count, unique_traces] | +| **sortDir** | **String**| | [optional] [default to desc] [enum: asc, desc] | +| **limit** | **Integer**| | [optional] [default to 25] | +| **offset** | **Integer**| | [optional] [default to 0] | + +### Return type + +ApiResponse<[**FeedListApiResponse**](FeedListApiResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listTraceAnnotationLabels + +> GetAnnotationLabelsResponse listTraceAnnotationLabels(projectId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + try { + GetAnnotationLabelsResponse result = apiInstance.listTraceAnnotationLabels(projectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceAnnotationLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | + +### Return type + +[**GetAnnotationLabelsResponse**](GetAnnotationLabelsResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listTraceAnnotationLabelsWithHttpInfo + +> ApiResponse listTraceAnnotationLabels listTraceAnnotationLabelsWithHttpInfo(projectId) + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + try { + ApiResponse response = apiInstance.listTraceAnnotationLabelsWithHttpInfo(projectId); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceAnnotationLabels"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | + +### Return type + +ApiResponse<[**GetAnnotationLabelsResponse**](GetAnnotationLabelsResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listTraceProjects + +> ListTraceProjects200Response listTraceProjects(page, limit) + +List projects filtered by organization ID. + +Volume counts come from ClickHouse (fast) instead of a PG JOIN on observation_spans (was 12+ seconds). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ListTraceProjects200Response result = apiInstance.listTraceProjects(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceProjects"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**ListTraceProjects200Response**](ListTraceProjects200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listTraceProjectsWithHttpInfo + +> ApiResponse listTraceProjects listTraceProjectsWithHttpInfo(page, limit) + +List projects filtered by organization ID. + +Volume counts come from ClickHouse (fast) instead of a PG JOIN on observation_spans (was 12+ seconds). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listTraceProjectsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceProjects"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**ListTraceProjects200Response**](ListTraceProjects200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listTraceProperties + +> TracerTraceList200Response listTraceProperties(page, limit) + + + +Fetch all properties for graphing. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceList200Response result = apiInstance.listTraceProperties(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listTracePropertiesWithHttpInfo + +> ApiResponse listTraceProperties listTracePropertiesWithHttpInfo(page, limit) + + + +Fetch all properties for graphing. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listTracePropertiesWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listTraceSessions + +> TracerTraceSessionList200Response listTraceSessions(page, limit, projectId, userId, bookmarked, filters, sortParams, pageNumber, pageSize, interval) + + + +List traces filtered by project ID and project version ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + UUID projectId = UUID.randomUUID(); // UUID | + String userId = "userId_example"; // String | + Boolean bookmarked = true; // Boolean | + String filters = "[]"; // String | + String sortParams = "[]"; // String | + Integer pageNumber = 0; // Integer | + Integer pageSize = 30; // Integer | + String interval = "interval_example"; // String | + try { + TracerTraceSessionList200Response result = apiInstance.listTraceSessions(page, limit, projectId, userId, bookmarked, filters, sortParams, pageNumber, pageSize, interval); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceSessions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **projectId** | **UUID**| | [optional] | +| **userId** | **String**| | [optional] | +| **bookmarked** | **Boolean**| | [optional] | +| **filters** | **String**| | [optional] [default to []] | +| **sortParams** | **String**| | [optional] [default to []] | +| **pageNumber** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 30] | +| **interval** | **String**| | [optional] | + +### Return type + +[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listTraceSessionsWithHttpInfo + +> ApiResponse listTraceSessions listTraceSessionsWithHttpInfo(page, limit, projectId, userId, bookmarked, filters, sortParams, pageNumber, pageSize, interval) + + + +List traces filtered by project ID and project version ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + UUID projectId = UUID.randomUUID(); // UUID | + String userId = "userId_example"; // String | + Boolean bookmarked = true; // Boolean | + String filters = "[]"; // String | + String sortParams = "[]"; // String | + Integer pageNumber = 0; // Integer | + Integer pageSize = 30; // Integer | + String interval = "interval_example"; // String | + try { + ApiResponse response = apiInstance.listTraceSessionsWithHttpInfo(page, limit, projectId, userId, bookmarked, filters, sortParams, pageNumber, pageSize, interval); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceSessions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **projectId** | **UUID**| | [optional] | +| **userId** | **String**| | [optional] | +| **bookmarked** | **Boolean**| | [optional] | +| **filters** | **String**| | [optional] [default to []] | +| **sortParams** | **String**| | [optional] [default to []] | +| **pageNumber** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 30] | +| **interval** | **String**| | [optional] | + +### Return type + +ApiResponse<[**TracerTraceSessionList200Response**](TracerTraceSessionList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listTraceUsers + +> UsersResponse listTraceUsers(projectId, search, pageSize, currentPageIndex, sortParams, filters) + + + +List traces filtered by project ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + String search = "search_example"; // String | + Integer pageSize = 56; // Integer | + Integer currentPageIndex = 56; // Integer | + String sortParams = "[]"; // String | + String filters = "[]"; // String | + try { + UsersResponse result = apiInstance.listTraceUsers(projectId, search, pageSize, currentPageIndex, sortParams, filters); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceUsers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | +| **search** | **String**| | [optional] | +| **pageSize** | **Integer**| | [optional] | +| **currentPageIndex** | **Integer**| | [optional] | +| **sortParams** | **String**| | [optional] [default to []] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +[**UsersResponse**](UsersResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listTraceUsersWithHttpInfo + +> ApiResponse listTraceUsers listTraceUsersWithHttpInfo(projectId, search, pageSize, currentPageIndex, sortParams, filters) + + + +List traces filtered by project ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectId = UUID.randomUUID(); // UUID | + String search = "search_example"; // String | + Integer pageSize = 56; // Integer | + Integer currentPageIndex = 56; // Integer | + String sortParams = "[]"; // String | + String filters = "[]"; // String | + try { + ApiResponse response = apiInstance.listTraceUsersWithHttpInfo(projectId, search, pageSize, currentPageIndex, sortParams, filters); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraceUsers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectId** | **UUID**| | [optional] | +| **search** | **String**| | [optional] | +| **pageSize** | **Integer**| | [optional] | +| **currentPageIndex** | **Integer**| | [optional] | +| **sortParams** | **String**| | [optional] [default to []] | +| **filters** | **String**| | [optional] [default to []] | + +### Return type + +ApiResponse<[**UsersResponse**](UsersResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listTraces + +> TracerTraceList200Response listTraces(projectVersionId, page, limit, traceIds, filters, sortParams, pageNumber, pageSize) + + + +List traces filtered by project ID and project version ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectVersionId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String traceIds = "traceIds_example"; // String | + String filters = "[]"; // String | + String sortParams = "[]"; // String | + Integer pageNumber = 0; // Integer | + Integer pageSize = 30; // Integer | + try { + TracerTraceList200Response result = apiInstance.listTraces(projectVersionId, page, limit, traceIds, filters, sortParams, pageNumber, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraces"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectVersionId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **traceIds** | **String**| | [optional] | +| **filters** | **String**| | [optional] [default to []] | +| **sortParams** | **String**| | [optional] [default to []] | +| **pageNumber** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 30] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listTracesWithHttpInfo + +> ApiResponse listTraces listTracesWithHttpInfo(projectVersionId, page, limit, traceIds, filters, sortParams, pageNumber, pageSize) + + + +List traces filtered by project ID and project version ID with optimized queries. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + UUID projectVersionId = UUID.randomUUID(); // UUID | + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + String traceIds = "traceIds_example"; // String | + String filters = "[]"; // String | + String sortParams = "[]"; // String | + Integer pageNumber = 0; // Integer | + Integer pageSize = 30; // Integer | + try { + ApiResponse response = apiInstance.listTracesWithHttpInfo(projectVersionId, page, limit, traceIds, filters, sortParams, pageNumber, pageSize); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listTraces"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **projectVersionId** | **UUID**| | | +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | +| **traceIds** | **String**| | [optional] | +| **filters** | **String**| | [optional] [default to []] | +| **sortParams** | **String**| | [optional] [default to []] | +| **pageNumber** | **Integer**| | [optional] [default to 0] | +| **pageSize** | **Integer**| | [optional] [default to 30] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## listVoiceCalls + +> TracerTraceList200Response listVoiceCalls(page, limit) + + + +List voice/conversation traces for a project in an optimized way and return a response similar to the provided call object schema. Query params: - project_id (required) - page (1-based, optional, default 1) - page_size (optional, default 30) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + TracerTraceList200Response result = apiInstance.listVoiceCalls(page, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listVoiceCalls"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +[**TracerTraceList200Response**](TracerTraceList200Response.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## listVoiceCallsWithHttpInfo + +> ApiResponse listVoiceCalls listVoiceCallsWithHttpInfo(page, limit) + + + +List voice/conversation traces for a project in an optimized way and return a response similar to the provided call object schema. Query params: - project_id (required) - page (1-based, optional, default 1) - page_size (optional, default 30) + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + Integer page = 56; // Integer | A page number within the paginated result set. + Integer limit = 56; // Integer | Number of results to return per page. + try { + ApiResponse response = apiInstance.listVoiceCallsWithHttpInfo(page, limit); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#listVoiceCalls"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| A page number within the paginated result set. | [optional] | +| **limit** | **Integer**| Number of results to return per page. | [optional] | + +### Return type + +ApiResponse<[**TracerTraceList200Response**](TracerTraceList200Response.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + + +## updateTraceTags + +> TraceTagsUpdate updateTraceTags(id, traceTagsUpdate) + + + +Update tags for a trace. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String id = "id_example"; // String | + TraceTagsUpdate traceTagsUpdate = new TraceTagsUpdate(); // TraceTagsUpdate | + try { + TraceTagsUpdate result = apiInstance.updateTraceTags(id, traceTagsUpdate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#updateTraceTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **traceTagsUpdate** | [**TraceTagsUpdate**](TraceTagsUpdate.md)| | | + +### Return type + +[**TraceTagsUpdate**](TraceTagsUpdate.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + +## updateTraceTagsWithHttpInfo + +> ApiResponse updateTraceTags updateTraceTagsWithHttpInfo(id, traceTagsUpdate) + + + +Update tags for a trace. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.TracingApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + TracingApi apiInstance = new TracingApi(defaultClient); + String id = "id_example"; // String | + TraceTagsUpdate traceTagsUpdate = new TraceTagsUpdate(); // TraceTagsUpdate | + try { + ApiResponse response = apiInstance.updateTraceTagsWithHttpInfo(id, traceTagsUpdate); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling TracingApi#updateTraceTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **traceTagsUpdate** | [**TraceTagsUpdate**](TraceTagsUpdate.md)| | | + +### Return type + +ApiResponse<[**TraceTagsUpdate**](TraceTagsUpdate.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/docs/UsersApi.md b/java/futureagi/docs/UsersApi.md new file mode 100644 index 0000000..35bb6b9 --- /dev/null +++ b/java/futureagi/docs/UsersApi.md @@ -0,0 +1,926 @@ +# UsersApi + +All URIs are relative to *https://api.futureagi.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getCurrentUser**](UsersApi.md#getCurrentUser) | **GET** /accounts/user-info/ | | +| [**getCurrentUserWithHttpInfo**](UsersApi.md#getCurrentUserWithHttpInfo) | **GET** /accounts/user-info/ | | +| [**listOrganizationMembers**](UsersApi.md#listOrganizationMembers) | **GET** /accounts/organization/members/ | GET /accounts/organization/members/ | +| [**listOrganizationMembersWithHttpInfo**](UsersApi.md#listOrganizationMembersWithHttpInfo) | **GET** /accounts/organization/members/ | GET /accounts/organization/members/ | +| [**listWorkspaceMembers**](UsersApi.md#listWorkspaceMembers) | **GET** /accounts/workspace/{workspace_id}/members/ | GET /accounts/workspace/<workspace_id>/members/ | +| [**listWorkspaceMembersWithHttpInfo**](UsersApi.md#listWorkspaceMembersWithHttpInfo) | **GET** /accounts/workspace/{workspace_id}/members/ | GET /accounts/workspace/<workspace_id>/members/ | +| [**listWorkspaces**](UsersApi.md#listWorkspaces) | **GET** /accounts/workspace/list/ | | +| [**listWorkspacesWithHttpInfo**](UsersApi.md#listWorkspacesWithHttpInfo) | **GET** /accounts/workspace/list/ | | +| [**switchWorkspace**](UsersApi.md#switchWorkspace) | **POST** /accounts/workspace/switch/ | | +| [**switchWorkspaceWithHttpInfo**](UsersApi.md#switchWorkspaceWithHttpInfo) | **POST** /accounts/workspace/switch/ | | + + + +## getCurrentUser + +> UserInfoResponse getCurrentUser() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + try { + UserInfoResponse result = apiInstance.getCurrentUser(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getCurrentUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UserInfoResponse**](UserInfoResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## getCurrentUserWithHttpInfo + +> ApiResponse getCurrentUser getCurrentUserWithHttpInfo() + + + + + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + try { + ApiResponse response = apiInstance.getCurrentUserWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getCurrentUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**UserInfoResponse**](UserInfoResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listOrganizationMembers + +> MemberListResponse listOrganizationMembers(page, limit, search, filterStatus, filterRole, sort) + +GET /accounts/organization/members/ + +Returns UNION of active members + pending/expired invites. Status is derived at query time (Active / Pending / Expired). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + Integer page = 1; // Integer | + Integer limit = 20; // Integer | + String search = ""; // String | + List filterStatus = Arrays.asList(); // List | + List filterRole = Arrays.asList(); // List | + String sort = "name"; // String | + try { + MemberListResponse result = apiInstance.listOrganizationMembers(page, limit, search, filterStatus, filterRole, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listOrganizationMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 20] | +| **search** | **String**| | [optional] [default to ] | +| **filterStatus** | [**List<String>**](String.md)| | [optional] [enum: Active, Pending, Expired, Deactivated] | +| **filterRole** | [**List<String>**](String.md)| | [optional] | +| **sort** | **String**| | [optional] [default to -created_at] [enum: name, -name, email, -email, status, -status, type, -type, date_joined, -date_joined, created_at, -created_at, org_level, -org_level] | + +### Return type + +[**MemberListResponse**](MemberListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listOrganizationMembersWithHttpInfo + +> ApiResponse listOrganizationMembers listOrganizationMembersWithHttpInfo(page, limit, search, filterStatus, filterRole, sort) + +GET /accounts/organization/members/ + +Returns UNION of active members + pending/expired invites. Status is derived at query time (Active / Pending / Expired). + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + Integer page = 1; // Integer | + Integer limit = 20; // Integer | + String search = ""; // String | + List filterStatus = Arrays.asList(); // List | + List filterRole = Arrays.asList(); // List | + String sort = "name"; // String | + try { + ApiResponse response = apiInstance.listOrganizationMembersWithHttpInfo(page, limit, search, filterStatus, filterRole, sort); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listOrganizationMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 20] | +| **search** | **String**| | [optional] [default to ] | +| **filterStatus** | [**List<String>**](String.md)| | [optional] [enum: Active, Pending, Expired, Deactivated] | +| **filterRole** | [**List<String>**](String.md)| | [optional] | +| **sort** | **String**| | [optional] [default to -created_at] [enum: name, -name, email, -email, status, -status, type, -type, date_joined, -date_joined, created_at, -created_at, org_level, -org_level] | + +### Return type + +ApiResponse<[**MemberListResponse**](MemberListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listWorkspaceMembers + +> MemberListResponse listWorkspaceMembers(workspaceId, page, limit, search, filterStatus, filterRole, sort) + +GET /accounts/workspace/<workspace_id>/members/ + +Returns members of a specific workspace. Org Admin+ users who auto-access are included with derived WS Admin role. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String workspaceId = "workspaceId_example"; // String | + Integer page = 1; // Integer | + Integer limit = 20; // Integer | + String search = ""; // String | + List filterStatus = Arrays.asList(); // List | + List filterRole = Arrays.asList(); // List | + String sort = "name"; // String | + try { + MemberListResponse result = apiInstance.listWorkspaceMembers(workspaceId, page, limit, search, filterStatus, filterRole, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listWorkspaceMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **workspaceId** | **String**| | | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 20] | +| **search** | **String**| | [optional] [default to ] | +| **filterStatus** | [**List<String>**](String.md)| | [optional] [enum: Active, Pending, Expired] | +| **filterRole** | [**List<String>**](String.md)| | [optional] | +| **sort** | **String**| | [optional] [default to -created_at] [enum: name, -name, email, -email, status, -status, type, -type, date_joined, -date_joined, created_at, -created_at, ws_level, -ws_level] | + +### Return type + +[**MemberListResponse**](MemberListResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listWorkspaceMembersWithHttpInfo + +> ApiResponse listWorkspaceMembers listWorkspaceMembersWithHttpInfo(workspaceId, page, limit, search, filterStatus, filterRole, sort) + +GET /accounts/workspace/<workspace_id>/members/ + +Returns members of a specific workspace. Org Admin+ users who auto-access are included with derived WS Admin role. + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String workspaceId = "workspaceId_example"; // String | + Integer page = 1; // Integer | + Integer limit = 20; // Integer | + String search = ""; // String | + List filterStatus = Arrays.asList(); // List | + List filterRole = Arrays.asList(); // List | + String sort = "name"; // String | + try { + ApiResponse response = apiInstance.listWorkspaceMembersWithHttpInfo(workspaceId, page, limit, search, filterStatus, filterRole, sort); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listWorkspaceMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **workspaceId** | **String**| | | +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 20] | +| **search** | **String**| | [optional] [default to ] | +| **filterStatus** | [**List<String>**](String.md)| | [optional] [enum: Active, Pending, Expired] | +| **filterRole** | [**List<String>**](String.md)| | [optional] | +| **sort** | **String**| | [optional] [default to -created_at] [enum: name, -name, email, -email, status, -status, type, -type, date_joined, -date_joined, created_at, -created_at, ws_level, -ws_level] | + +### Return type + +ApiResponse<[**MemberListResponse**](MemberListResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## listWorkspaces + +> WorkspaceListPaginatedResponse listWorkspaces(page, limit, search, sort) + + + +Get paginated list of workspaces + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + Integer page = 1; // Integer | + Integer limit = 10; // Integer | + String search = ""; // String | + String sort = ""; // String | + try { + WorkspaceListPaginatedResponse result = apiInstance.listWorkspaces(page, limit, search, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listWorkspaces"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 10] | +| **search** | **String**| | [optional] [default to ] | +| **sort** | **String**| | [optional] [default to ] | + +### Return type + +[**WorkspaceListPaginatedResponse**](WorkspaceListPaginatedResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## listWorkspacesWithHttpInfo + +> ApiResponse listWorkspaces listWorkspacesWithHttpInfo(page, limit, search, sort) + + + +Get paginated list of workspaces + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + Integer page = 1; // Integer | + Integer limit = 10; // Integer | + String search = ""; // String | + String sort = ""; // String | + try { + ApiResponse response = apiInstance.listWorkspacesWithHttpInfo(page, limit, search, sort); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listWorkspaces"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page** | **Integer**| | [optional] [default to 1] | +| **limit** | **Integer**| | [optional] [default to 10] | +| **search** | **String**| | [optional] [default to ] | +| **sort** | **String**| | [optional] [default to ] | + +### Return type + +ApiResponse<[**WorkspaceListPaginatedResponse**](WorkspaceListPaginatedResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + + +## switchWorkspace + +> SwitchWorkspaceResponse switchWorkspace(switchWorkspace) + + + +Switch to a different workspace with proper validation + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + SwitchWorkspace switchWorkspace = new SwitchWorkspace(); // SwitchWorkspace | + try { + SwitchWorkspaceResponse result = apiInstance.switchWorkspace(switchWorkspace); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#switchWorkspace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **switchWorkspace** | [**SwitchWorkspace**](SwitchWorkspace.md)| | | + +### Return type + +[**SwitchWorkspaceResponse**](SwitchWorkspaceResponse.md) + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + +## switchWorkspaceWithHttpInfo + +> ApiResponse switchWorkspace switchWorkspaceWithHttpInfo(switchWorkspace) + + + +Switch to a different workspace with proper validation + +### Example + +```java +// Import classes: +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.auth.*; +import com.futureagi.sdk.models.*; +import com.futureagi.sdk.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.futureagi.com"); + + // Configure API key authorization: X-Secret-Key + ApiKeyAuth X-Secret-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Secret-Key"); + X-Secret-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Secret-Key.setApiKeyPrefix("Token"); + + // Configure API key authorization: X-Api-Key + ApiKeyAuth X-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("X-Api-Key"); + X-Api-Key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //X-Api-Key.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + SwitchWorkspace switchWorkspace = new SwitchWorkspace(); // SwitchWorkspace | + try { + ApiResponse response = apiInstance.switchWorkspaceWithHttpInfo(switchWorkspace); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#switchWorkspace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **switchWorkspace** | [**SwitchWorkspace**](SwitchWorkspace.md)| | | + +### Return type + +ApiResponse<[**SwitchWorkspaceResponse**](SwitchWorkspaceResponse.md)> + + +### Authorization + +[X-Secret-Key](../README.md#X-Secret-Key), [X-Api-Key](../README.md#X-Api-Key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Response | - | +| **400** | Response | - | +| **401** | Response | - | +| **403** | Response | - | +| **404** | Response | - | +| **500** | Response | - | +| **0** | Default error response | - | + diff --git a/java/futureagi/gradle.properties b/java/futureagi/gradle.properties new file mode 100644 index 0000000..e69de29 diff --git a/java/futureagi/gradle/wrapper/gradle-wrapper.jar b/java/futureagi/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e6441136f3d4ba8a0da8d277868979cfbc8ad796 GIT binary patch literal 43453 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MPpI{oAJCtY~JECm)*m_x>AZEu>DFgUcby z1Qaw8lU4jZpQ_$;*7RME+gq1KySGG#Wql>aL~k9tLrSO()LWn*q&YxHEuzmwd1?aAtI zBJ>P=&$=l1efe1CDU;`Fd+_;&wI07?V0aAIgc(!{a z0Jg6Y=inXc3^n!U0Atk`iCFIQooHqcWhO(qrieUOW8X(x?(RD}iYDLMjSwffH2~tB z)oDgNBLB^AJBM1M^c5HdRx6fBfka`(LD-qrlh5jqH~);#nw|iyp)()xVYak3;Ybik z0j`(+69aK*B>)e_p%=wu8XC&9e{AO4c~O1U`5X9}?0mrd*m$_EUek{R?DNSh(=br# z#Q61gBzEpmy`$pA*6!87 zSDD+=@fTY7<4A?GLqpA?Pb2z$pbCc4B4zL{BeZ?F-8`s$?>*lXXtn*NC61>|*w7J* z$?!iB{6R-0=KFmyp1nnEmLsA-H0a6l+1uaH^g%c(p{iT&YFrbQ$&PRb8Up#X3@Zsk zD^^&LK~111%cqlP%!_gFNa^dTYT?rhkGl}5=fL{a`UViaXWI$k-UcHJwmaH1s=S$4 z%4)PdWJX;hh5UoK?6aWoyLxX&NhNRqKam7tcOkLh{%j3K^4Mgx1@i|Pi&}<^5>hs5 zm8?uOS>%)NzT(%PjVPGa?X%`N2TQCKbeH2l;cTnHiHppPSJ<7y-yEIiC!P*ikl&!B z%+?>VttCOQM@ShFguHVjxX^?mHX^hSaO_;pnyh^v9EumqSZTi+#f&_Vaija0Q-e*| z7ulQj6Fs*bbmsWp{`auM04gGwsYYdNNZcg|ph0OgD>7O}Asn7^Z=eI>`$2*v78;sj-}oMoEj&@)9+ycEOo92xSyY344^ z11Hb8^kdOvbf^GNAK++bYioknrpdN>+u8R?JxG=!2Kd9r=YWCOJYXYuM0cOq^FhEd zBg2puKy__7VT3-r*dG4c62Wgxi52EMCQ`bKgf*#*ou(D4-ZN$+mg&7$u!! z-^+Z%;-3IDwqZ|K=ah85OLwkO zKxNBh+4QHh)u9D?MFtpbl)us}9+V!D%w9jfAMYEb>%$A;u)rrI zuBudh;5PN}_6J_}l55P3l_)&RMlH{m!)ai-i$g)&*M`eN$XQMw{v^r@-125^RRCF0 z^2>|DxhQw(mtNEI2Kj(;KblC7x=JlK$@78`O~>V!`|1Lm-^JR$-5pUANAnb(5}B}JGjBsliK4& zk6y(;$e&h)lh2)L=bvZKbvh@>vLlreBdH8No2>$#%_Wp1U0N7Ank!6$dFSi#xzh|( zRi{Uw%-4W!{IXZ)fWx@XX6;&(m_F%c6~X8hx=BN1&q}*( zoaNjWabE{oUPb!Bt$eyd#$5j9rItB-h*5JiNi(v^e|XKAj*8(k<5-2$&ZBR5fF|JA z9&m4fbzNQnAU}r8ab>fFV%J0z5awe#UZ|bz?Ur)U9bCIKWEzi2%A+5CLqh?}K4JHi z4vtM;+uPsVz{Lfr;78W78gC;z*yTch~4YkLr&m-7%-xc ztw6Mh2d>_iO*$Rd8(-Cr1_V8EO1f*^@wRoSozS) zy1UoC@pruAaC8Z_7~_w4Q6n*&B0AjOmMWa;sIav&gu z|J5&|{=a@vR!~k-OjKEgPFCzcJ>#A1uL&7xTDn;{XBdeM}V=l3B8fE1--DHjSaxoSjNKEM9|U9#m2<3>n{Iuo`r3UZp;>GkT2YBNAh|b z^jTq-hJp(ebZh#Lk8hVBP%qXwv-@vbvoREX$TqRGTgEi$%_F9tZES@z8Bx}$#5eeG zk^UsLBH{bc2VBW)*EdS({yw=?qmevwi?BL6*=12k9zM5gJv1>y#ML4!)iiPzVaH9% zgSImetD@dam~e>{LvVh!phhzpW+iFvWpGT#CVE5TQ40n%F|p(sP5mXxna+Ev7PDwA zamaV4m*^~*xV+&p;W749xhb_X=$|LD;FHuB&JL5?*Y2-oIT(wYY2;73<^#46S~Gx| z^cez%V7x$81}UWqS13Gz80379Rj;6~WdiXWOSsdmzY39L;Hg3MH43o*y8ibNBBH`(av4|u;YPq%{R;IuYow<+GEsf@R?=@tT@!}?#>zIIn0CoyV!hq3mw zHj>OOjfJM3F{RG#6ujzo?y32m^tgSXf@v=J$ELdJ+=5j|=F-~hP$G&}tDZsZE?5rX ztGj`!S>)CFmdkccxM9eGIcGnS2AfK#gXwj%esuIBNJQP1WV~b~+D7PJTmWGTSDrR` zEAu4B8l>NPuhsk5a`rReSya2nfV1EK01+G!x8aBdTs3Io$u5!6n6KX%uv@DxAp3F@{4UYg4SWJtQ-W~0MDb|j-$lwVn znAm*Pl!?Ps&3wO=R115RWKb*JKoexo*)uhhHBncEDMSVa_PyA>k{Zm2(wMQ(5NM3# z)jkza|GoWEQo4^s*wE(gHz?Xsg4`}HUAcs42cM1-qq_=+=!Gk^y710j=66(cSWqUe zklbm8+zB_syQv5A2rj!Vbw8;|$@C!vfNmNV!yJIWDQ>{+2x zKjuFX`~~HKG~^6h5FntRpnnHt=D&rq0>IJ9#F0eM)Y-)GpRjiN7gkA8wvnG#K=q{q z9dBn8_~wm4J<3J_vl|9H{7q6u2A!cW{bp#r*-f{gOV^e=8S{nc1DxMHFwuM$;aVI^ zz6A*}m8N-&x8;aunp1w7_vtB*pa+OYBw=TMc6QK=mbA-|Cf* zvyh8D4LRJImooUaSb7t*fVfih<97Gf@VE0|z>NcBwBQze);Rh!k3K_sfunToZY;f2 z^HmC4KjHRVg+eKYj;PRN^|E0>Gj_zagfRbrki68I^#~6-HaHg3BUW%+clM1xQEdPYt_g<2K+z!$>*$9nQ>; zf9Bei{?zY^-e{q_*|W#2rJG`2fy@{%6u0i_VEWTq$*(ZN37|8lFFFt)nCG({r!q#9 z5VK_kkSJ3?zOH)OezMT{!YkCuSSn!K#-Rhl$uUM(bq*jY? zi1xbMVthJ`E>d>(f3)~fozjg^@eheMF6<)I`oeJYx4*+M&%c9VArn(OM-wp%M<-`x z7sLP1&3^%Nld9Dhm@$3f2}87!quhI@nwd@3~fZl_3LYW-B?Ia>ui`ELg z&Qfe!7m6ze=mZ`Ia9$z|ARSw|IdMpooY4YiPN8K z4B(ts3p%2i(Td=tgEHX z0UQ_>URBtG+-?0E;E7Ld^dyZ;jjw0}XZ(}-QzC6+NN=40oDb2^v!L1g9xRvE#@IBR zO!b-2N7wVfLV;mhEaXQ9XAU+>=XVA6f&T4Z-@AX!leJ8obP^P^wP0aICND?~w&NykJ#54x3_@r7IDMdRNy4Hh;h*!u(Ol(#0bJdwEo$5437-UBjQ+j=Ic>Q2z` zJNDf0yO6@mr6y1#n3)s(W|$iE_i8r@Gd@!DWDqZ7J&~gAm1#~maIGJ1sls^gxL9LLG_NhU!pTGty!TbhzQnu)I*S^54U6Yu%ZeCg`R>Q zhBv$n5j0v%O_j{QYWG!R9W?5_b&67KB$t}&e2LdMvd(PxN6Ir!H4>PNlerpBL>Zvyy!yw z-SOo8caEpDt(}|gKPBd$qND5#a5nju^O>V&;f890?yEOfkSG^HQVmEbM3Ugzu+UtH zC(INPDdraBN?P%kE;*Ae%Wto&sgw(crfZ#Qy(<4nk;S|hD3j{IQRI6Yq|f^basLY; z-HB&Je%Gg}Jt@={_C{L$!RM;$$|iD6vu#3w?v?*;&()uB|I-XqEKqZPS!reW9JkLewLb!70T7n`i!gNtb1%vN- zySZj{8-1>6E%H&=V}LM#xmt`J3XQoaD|@XygXjdZ1+P77-=;=eYpoEQ01B@L*a(uW zrZeZz?HJsw_4g0vhUgkg@VF8<-X$B8pOqCuWAl28uB|@r`19DTUQQsb^pfqB6QtiT z*`_UZ`fT}vtUY#%sq2{rchyfu*pCg;uec2$-$N_xgjZcoumE5vSI{+s@iLWoz^Mf; zuI8kDP{!XY6OP~q5}%1&L}CtfH^N<3o4L@J@zg1-mt{9L`s^z$Vgb|mr{@WiwAqKg zp#t-lhrU>F8o0s1q_9y`gQNf~Vb!F%70f}$>i7o4ho$`uciNf=xgJ>&!gSt0g;M>*x4-`U)ysFW&Vs^Vk6m%?iuWU+o&m(2Jm26Y(3%TL; zA7T)BP{WS!&xmxNw%J=$MPfn(9*^*TV;$JwRy8Zl*yUZi8jWYF>==j~&S|Xinsb%c z2?B+kpet*muEW7@AzjBA^wAJBY8i|#C{WtO_or&Nj2{=6JTTX05}|H>N2B|Wf!*3_ z7hW*j6p3TvpghEc6-wufFiY!%-GvOx*bZrhZu+7?iSrZL5q9}igiF^*R3%DE4aCHZ zqu>xS8LkW+Auv%z-<1Xs92u23R$nk@Pk}MU5!gT|c7vGlEA%G^2th&Q*zfg%-D^=f z&J_}jskj|Q;73NP4<4k*Y%pXPU2Thoqr+5uH1yEYM|VtBPW6lXaetokD0u z9qVek6Q&wk)tFbQ8(^HGf3Wp16gKmr>G;#G(HRBx?F`9AIRboK+;OfHaLJ(P>IP0w zyTbTkx_THEOs%Q&aPrxbZrJlio+hCC_HK<4%f3ZoSAyG7Dn`=X=&h@m*|UYO-4Hq0 z-Bq&+Ie!S##4A6OGoC~>ZW`Y5J)*ouaFl_e9GA*VSL!O_@xGiBw!AF}1{tB)z(w%c zS1Hmrb9OC8>0a_$BzeiN?rkPLc9%&;1CZW*4}CDDNr2gcl_3z+WC15&H1Zc2{o~i) z)LLW=WQ{?ricmC`G1GfJ0Yp4Dy~Ba;j6ZV4r{8xRs`13{dD!xXmr^Aga|C=iSmor% z8hi|pTXH)5Yf&v~exp3o+sY4B^^b*eYkkCYl*T{*=-0HniSA_1F53eCb{x~1k3*`W zr~};p1A`k{1DV9=UPnLDgz{aJH=-LQo<5%+Em!DNN252xwIf*wF_zS^!(XSm(9eoj z=*dXG&n0>)_)N5oc6v!>-bd(2ragD8O=M|wGW z!xJQS<)u70m&6OmrF0WSsr@I%T*c#Qo#Ha4d3COcX+9}hM5!7JIGF>7<~C(Ear^Sn zm^ZFkV6~Ula6+8S?oOROOA6$C&q&dp`>oR-2Ym3(HT@O7Sd5c~+kjrmM)YmgPH*tL zX+znN>`tv;5eOfX?h{AuX^LK~V#gPCu=)Tigtq9&?7Xh$qN|%A$?V*v=&-2F$zTUv z`C#WyIrChS5|Kgm_GeudCFf;)!WH7FI60j^0o#65o6`w*S7R@)88n$1nrgU(oU0M9 zx+EuMkC>(4j1;m6NoGqEkpJYJ?vc|B zOlwT3t&UgL!pX_P*6g36`ZXQ; z9~Cv}ANFnJGp(;ZhS(@FT;3e)0)Kp;h^x;$*xZn*k0U6-&FwI=uOGaODdrsp-!K$Ac32^c{+FhI-HkYd5v=`PGsg%6I`4d9Jy)uW0y%) zm&j^9WBAp*P8#kGJUhB!L?a%h$hJgQrx!6KCB_TRo%9{t0J7KW8!o1B!NC)VGLM5! zpZy5Jc{`r{1e(jd%jsG7k%I+m#CGS*BPA65ZVW~fLYw0dA-H_}O zrkGFL&P1PG9p2(%QiEWm6x;U-U&I#;Em$nx-_I^wtgw3xUPVVu zqSuKnx&dIT-XT+T10p;yjo1Y)z(x1fb8Dzfn8e yu?e%!_ptzGB|8GrCfu%p?(_ zQccdaaVK$5bz;*rnyK{_SQYM>;aES6Qs^lj9lEs6_J+%nIiuQC*fN;z8md>r_~Mfl zU%p5Dt_YT>gQqfr@`cR!$NWr~+`CZb%dn;WtzrAOI>P_JtsB76PYe*<%H(y>qx-`Kq!X_; z<{RpAqYhE=L1r*M)gNF3B8r(<%8mo*SR2hu zccLRZwGARt)Hlo1euqTyM>^!HK*!Q2P;4UYrysje@;(<|$&%vQekbn|0Ruu_Io(w4#%p6ld2Yp7tlA`Y$cciThP zKzNGIMPXX%&Ud0uQh!uQZz|FB`4KGD?3!ND?wQt6!n*f4EmCoJUh&b?;B{|lxs#F- z31~HQ`SF4x$&v00@(P+j1pAaj5!s`)b2RDBp*PB=2IB>oBF!*6vwr7Dp%zpAx*dPr zb@Zjq^XjN?O4QcZ*O+8>)|HlrR>oD*?WQl5ri3R#2?*W6iJ>>kH%KnnME&TT@ZzrHS$Q%LC?n|e>V+D+8D zYc4)QddFz7I8#}y#Wj6>4P%34dZH~OUDb?uP%-E zwjXM(?Sg~1!|wI(RVuxbu)-rH+O=igSho_pDCw(c6b=P zKk4ATlB?bj9+HHlh<_!&z0rx13K3ZrAR8W)!@Y}o`?a*JJsD+twZIv`W)@Y?Amu_u zz``@-e2X}27$i(2=9rvIu5uTUOVhzwu%mNazS|lZb&PT;XE2|B&W1>=B58#*!~D&) zfVmJGg8UdP*fx(>Cj^?yS^zH#o-$Q-*$SnK(ZVFkw+er=>N^7!)FtP3y~Xxnu^nzY zikgB>Nj0%;WOltWIob|}%lo?_C7<``a5hEkx&1ku$|)i>Rh6@3h*`slY=9U}(Ql_< zaNG*J8vb&@zpdhAvv`?{=zDedJ23TD&Zg__snRAH4eh~^oawdYi6A3w8<Ozh@Kw)#bdktM^GVb zrG08?0bG?|NG+w^&JvD*7LAbjED{_Zkc`3H!My>0u5Q}m!+6VokMLXxl`Mkd=g&Xx z-a>m*#G3SLlhbKB!)tnzfWOBV;u;ftU}S!NdD5+YtOjLg?X}dl>7m^gOpihrf1;PY zvll&>dIuUGs{Qnd- zwIR3oIrct8Va^Tm0t#(bJD7c$Z7DO9*7NnRZorrSm`b`cxz>OIC;jSE3DO8`hX955ui`s%||YQtt2 z5DNA&pG-V+4oI2s*x^>-$6J?p=I>C|9wZF8z;VjR??Icg?1w2v5Me+FgAeGGa8(3S z4vg*$>zC-WIVZtJ7}o9{D-7d>zCe|z#<9>CFve-OPAYsneTb^JH!Enaza#j}^mXy1 z+ULn^10+rWLF6j2>Ya@@Kq?26>AqK{A_| zQKb*~F1>sE*=d?A?W7N2j?L09_7n+HGi{VY;MoTGr_)G9)ot$p!-UY5zZ2Xtbm=t z@dpPSGwgH=QtIcEulQNI>S-#ifbnO5EWkI;$A|pxJd885oM+ zGZ0_0gDvG8q2xebj+fbCHYfAXuZStH2j~|d^sBAzo46(K8n59+T6rzBwK)^rfPT+B zyIFw)9YC-V^rhtK`!3jrhmW-sTmM+tPH+;nwjL#-SjQPUZ53L@A>y*rt(#M(qsiB2 zx6B)dI}6Wlsw%bJ8h|(lhkJVogQZA&n{?Vgs6gNSXzuZpEyu*xySy8ro07QZ7Vk1!3tJphN_5V7qOiyK8p z#@jcDD8nmtYi1^l8ml;AF<#IPK?!pqf9D4moYk>d99Im}Jtwj6c#+A;f)CQ*f-hZ< z=p_T86jog%!p)D&5g9taSwYi&eP z#JuEK%+NULWus;0w32-SYFku#i}d~+{Pkho&^{;RxzP&0!RCm3-9K6`>KZpnzS6?L z^H^V*s!8<>x8bomvD%rh>Zp3>Db%kyin;qtl+jAv8Oo~1g~mqGAC&Qi_wy|xEt2iz zWAJEfTV%cl2Cs<1L&DLRVVH05EDq`pH7Oh7sR`NNkL%wi}8n>IXcO40hp+J+sC!W?!krJf!GJNE8uj zg-y~Ns-<~D?yqbzVRB}G>0A^f0!^N7l=$m0OdZuqAOQqLc zX?AEGr1Ht+inZ-Qiwnl@Z0qukd__a!C*CKuGdy5#nD7VUBM^6OCpxCa2A(X;e0&V4 zM&WR8+wErQ7UIc6LY~Q9x%Sn*Tn>>P`^t&idaOEnOd(Ufw#>NoR^1QdhJ8s`h^|R_ zXX`c5*O~Xdvh%q;7L!_!ohf$NfEBmCde|#uVZvEo>OfEq%+Ns7&_f$OR9xsihRpBb z+cjk8LyDm@U{YN>+r46?nn{7Gh(;WhFw6GAxtcKD+YWV?uge>;+q#Xx4!GpRkVZYu zzsF}1)7$?%s9g9CH=Zs+B%M_)+~*j3L0&Q9u7!|+T`^O{xE6qvAP?XWv9_MrZKdo& z%IyU)$Q95AB4!#hT!_dA>4e@zjOBD*Y=XjtMm)V|+IXzjuM;(l+8aA5#Kaz_$rR6! zj>#&^DidYD$nUY(D$mH`9eb|dtV0b{S>H6FBfq>t5`;OxA4Nn{J(+XihF(stSche7$es&~N$epi&PDM_N`As;*9D^L==2Q7Z2zD+CiU(|+-kL*VG+&9!Yb3LgPy?A zm7Z&^qRG_JIxK7-FBzZI3Q<;{`DIxtc48k> zc|0dmX;Z=W$+)qE)~`yn6MdoJ4co;%!`ddy+FV538Y)j(vg}5*k(WK)KWZ3WaOG!8 z!syGn=s{H$odtpqFrT#JGM*utN7B((abXnpDM6w56nhw}OY}0TiTG1#f*VFZr+^-g zbP10`$LPq_;PvrA1XXlyx2uM^mrjTzX}w{yuLo-cOClE8MMk47T25G8M!9Z5ypOSV zAJUBGEg5L2fY)ZGJb^E34R2zJ?}Vf>{~gB!8=5Z) z9y$>5c)=;o0HeHHSuE4U)#vG&KF|I%-cF6f$~pdYJWk_dD}iOA>iA$O$+4%@>JU08 zS`ep)$XLPJ+n0_i@PkF#ri6T8?ZeAot$6JIYHm&P6EB=BiaNY|aA$W0I+nz*zkz_z zkEru!tj!QUffq%)8y0y`T&`fuus-1p>=^hnBiBqD^hXrPs`PY9tU3m0np~rISY09> z`P3s=-kt_cYcxWd{de@}TwSqg*xVhp;E9zCsnXo6z z?f&Sv^U7n4`xr=mXle94HzOdN!2kB~4=%)u&N!+2;z6UYKUDqi-s6AZ!haB;@&B`? z_TRX0%@suz^TRdCb?!vNJYPY8L_}&07uySH9%W^Tc&1pia6y1q#?*Drf}GjGbPjBS zbOPcUY#*$3sL2x4v_i*Y=N7E$mR}J%|GUI(>WEr+28+V z%v5{#e!UF*6~G&%;l*q*$V?&r$Pp^sE^i-0$+RH3ERUUdQ0>rAq2(2QAbG}$y{de( z>{qD~GGuOk559Y@%$?N^1ApVL_a704>8OD%8Y%8B;FCt%AoPu8*D1 zLB5X>b}Syz81pn;xnB}%0FnwazlWfUV)Z-~rZg6~b z6!9J$EcE&sEbzcy?CI~=boWA&eeIa%z(7SE^qgVLz??1Vbc1*aRvc%Mri)AJaAG!p z$X!_9Ds;Zz)f+;%s&dRcJt2==P{^j3bf0M=nJd&xwUGlUFn?H=2W(*2I2Gdu zv!gYCwM10aeus)`RIZSrCK=&oKaO_Ry~D1B5!y0R=%!i2*KfXGYX&gNv_u+n9wiR5 z*e$Zjju&ODRW3phN925%S(jL+bCHv6rZtc?!*`1TyYXT6%Ju=|X;6D@lq$8T zW{Y|e39ioPez(pBH%k)HzFITXHvnD6hw^lIoUMA;qAJ^CU?top1fo@s7xT13Fvn1H z6JWa-6+FJF#x>~+A;D~;VDs26>^oH0EI`IYT2iagy23?nyJ==i{g4%HrAf1-*v zK1)~@&(KkwR7TL}L(A@C_S0G;-GMDy=MJn2$FP5s<%wC)4jC5PXoxrQBFZ_k0P{{s@sz+gX`-!=T8rcB(=7vW}^K6oLWMmp(rwDh}b zwaGGd>yEy6fHv%jM$yJXo5oMAQ>c9j`**}F?MCry;T@47@r?&sKHgVe$MCqk#Z_3S z1GZI~nOEN*P~+UaFGnj{{Jo@16`(qVNtbU>O0Hf57-P>x8Jikp=`s8xWs^dAJ9lCQ z)GFm+=OV%AMVqVATtN@|vp61VVAHRn87}%PC^RAzJ%JngmZTasWBAWsoAqBU+8L8u z4A&Pe?fmTm0?mK-BL9t+{y7o(7jm+RpOhL9KnY#E&qu^}B6=K_dB}*VlSEiC9fn)+V=J;OnN)Ta5v66ic1rG+dGAJ1 z1%Zb_+!$=tQ~lxQrzv3x#CPb?CekEkA}0MYSgx$Jdd}q8+R=ma$|&1a#)TQ=l$1tQ z=tL9&_^vJ)Pk}EDO-va`UCT1m#Uty1{v^A3P~83_#v^ozH}6*9mIjIr;t3Uv%@VeW zGL6(CwCUp)Jq%G0bIG%?{_*Y#5IHf*5M@wPo6A{$Um++Co$wLC=J1aoG93&T7Ho}P z=mGEPP7GbvoG!uD$k(H3A$Z))+i{Hy?QHdk>3xSBXR0j!11O^mEe9RHmw!pvzv?Ua~2_l2Yh~_!s1qS`|0~0)YsbHSz8!mG)WiJE| z2f($6TQtt6L_f~ApQYQKSb=`053LgrQq7G@98#igV>y#i==-nEjQ!XNu9 z~;mE+gtj4IDDNQJ~JVk5Ux6&LCSFL!y=>79kE9=V}J7tD==Ga+IW zX)r7>VZ9dY=V&}DR))xUoV!u(Z|%3ciQi_2jl}3=$Agc(`RPb z8kEBpvY>1FGQ9W$n>Cq=DIpski};nE)`p3IUw1Oz0|wxll^)4dq3;CCY@RyJgFgc# zKouFh!`?Xuo{IMz^xi-h=StCis_M7yq$u) z?XHvw*HP0VgR+KR6wI)jEMX|ssqYvSf*_3W8zVTQzD?3>H!#>InzpSO)@SC8q*ii- z%%h}_#0{4JG;Jm`4zg};BPTGkYamx$Xo#O~lBirRY)q=5M45n{GCfV7h9qwyu1NxOMoP4)jjZMxmT|IQQh0U7C$EbnMN<3)Kk?fFHYq$d|ICu>KbY_hO zTZM+uKHe(cIZfEqyzyYSUBZa8;Fcut-GN!HSA9ius`ltNebF46ZX_BbZNU}}ZOm{M2&nANL9@0qvih15(|`S~z}m&h!u4x~(%MAO$jHRWNfuxWF#B)E&g3ghSQ9|> z(MFaLQj)NE0lowyjvg8z0#m6FIuKE9lDO~Glg}nSb7`~^&#(Lw{}GVOS>U)m8bF}x zVjbXljBm34Cs-yM6TVusr+3kYFjr28STT3g056y3cH5Tmge~ASxBj z%|yb>$eF;WgrcOZf569sDZOVwoo%8>XO>XQOX1OyN9I-SQgrm;U;+#3OI(zrWyow3 zk==|{lt2xrQ%FIXOTejR>;wv(Pb8u8}BUpx?yd(Abh6? zsoO3VYWkeLnF43&@*#MQ9-i-d0t*xN-UEyNKeyNMHw|A(k(_6QKO=nKMCxD(W(Yop zsRQ)QeL4X3Lxp^L%wzi2-WVSsf61dqliPUM7srDB?Wm6Lzn0&{*}|IsKQW;02(Y&| zaTKv|`U(pSzuvR6Rduu$wzK_W-Y-7>7s?G$)U}&uK;<>vU}^^ns@Z!p+9?St1s)dG zK%y6xkPyyS1$~&6v{kl?Md6gwM|>mt6Upm>oa8RLD^8T{0?HC!Z>;(Bob7el(DV6x zi`I)$&E&ngwFS@bi4^xFLAn`=fzTC;aimE^!cMI2n@Vo%Ae-ne`RF((&5y6xsjjAZ zVguVoQ?Z9uk$2ON;ersE%PU*xGO@T*;j1BO5#TuZKEf(mB7|g7pcEA=nYJ{s3vlbg zd4-DUlD{*6o%Gc^N!Nptgay>j6E5;3psI+C3Q!1ZIbeCubW%w4pq9)MSDyB{HLm|k zxv-{$$A*pS@csolri$Ge<4VZ}e~78JOL-EVyrbxKra^d{?|NnPp86!q>t<&IP07?Z z^>~IK^k#OEKgRH+LjllZXk7iA>2cfH6+(e&9ku5poo~6y{GC5>(bRK7hwjiurqAiZ zg*DmtgY}v83IjE&AbiWgMyFbaRUPZ{lYiz$U^&Zt2YjG<%m((&_JUbZcfJ22(>bi5 z!J?<7AySj0JZ&<-qXX;mcV!f~>G=sB0KnjWca4}vrtunD^1TrpfeS^4dvFr!65knK zZh`d;*VOkPs4*-9kL>$GP0`(M!j~B;#x?Ba~&s6CopvO86oM?-? zOw#dIRc;6A6T?B`Qp%^<U5 z19x(ywSH$_N+Io!6;e?`tWaM$`=Db!gzx|lQ${DG!zb1Zl&|{kX0y6xvO1o z220r<-oaS^^R2pEyY;=Qllqpmue|5yI~D|iI!IGt@iod{Opz@*ml^w2bNs)p`M(Io z|E;;m*Xpjd9l)4G#KaWfV(t8YUn@A;nK^#xgv=LtnArX|vWQVuw3}B${h+frU2>9^ z!l6)!Uo4`5k`<<;E(ido7M6lKTgWezNLq>U*=uz&s=cc$1%>VrAeOoUtA|T6gO4>UNqsdK=NF*8|~*sl&wI=x9-EGiq*aqV!(VVXA57 zw9*o6Ir8Lj1npUXvlevtn(_+^X5rzdR>#(}4YcB9O50q97%rW2me5_L=%ffYPUSRc z!vv?Kv>dH994Qi>U(a<0KF6NH5b16enCp+mw^Hb3Xs1^tThFpz!3QuN#}KBbww`(h z7GO)1olDqy6?T$()R7y%NYx*B0k_2IBiZ14&8|JPFxeMF{vSTxF-Vi3+ZOI=Thq2} zyQgjYY1_7^ZQHh{?P))4+qUiQJLi1&{yE>h?~jU%tjdV0h|FENbM3X(KnJdPKc?~k zh=^Ixv*+smUll!DTWH!jrV*wSh*(mx0o6}1@JExzF(#9FXgmTXVoU+>kDe68N)dkQ zH#_98Zv$}lQwjKL@yBd;U(UD0UCl322=pav<=6g>03{O_3oKTq;9bLFX1ia*lw;#K zOiYDcBJf)82->83N_Y(J7Kr_3lE)hAu;)Q(nUVydv+l+nQ$?|%MWTy`t>{havFSQloHwiIkGK9YZ79^9?AZo0ZyQlVR#}lF%dn5n%xYksXf8gnBm=wO7g_^! zauQ-bH1Dc@3ItZ-9D_*pH}p!IG7j8A_o94#~>$LR|TFq zZ-b00*nuw|-5C2lJDCw&8p5N~Z1J&TrcyErds&!l3$eSz%`(*izc;-?HAFD9AHb-| z>)id`QCrzRws^9(#&=pIx9OEf2rmlob8sK&xPCWS+nD~qzU|qG6KwA{zbikcfQrdH z+ zQg>O<`K4L8rN7`GJB0*3<3`z({lWe#K!4AZLsI{%z#ja^OpfjU{!{)x0ZH~RB0W5X zTwN^w=|nA!4PEU2=LR05x~}|B&ZP?#pNgDMwD*ajI6oJqv!L81gu=KpqH22avXf0w zX3HjbCI!n9>l046)5rr5&v5ja!xkKK42zmqHzPx$9Nn_MZk`gLeSLgC=LFf;H1O#B zn=8|^1iRrujHfbgA+8i<9jaXc;CQBAmQvMGQPhFec2H1knCK2x!T`e6soyrqCamX% zTQ4dX_E*8so)E*TB$*io{$c6X)~{aWfaqdTh=xEeGvOAN9H&-t5tEE-qso<+C!2>+ zskX51H-H}#X{A75wqFe-J{?o8Bx|>fTBtl&tcbdR|132Ztqu5X0i-pisB-z8n71%q%>EF}yy5?z=Ve`}hVh{Drv1YWL zW=%ug_&chF11gDv3D6B)Tz5g54H0mDHNjuKZ+)CKFk4Z|$RD zfRuKLW`1B>B?*RUfVd0+u8h3r-{@fZ{k)c!93t1b0+Q9vOaRnEn1*IL>5Z4E4dZ!7 ztp4GP-^1d>8~LMeb}bW!(aAnB1tM_*la=Xx)q(I0Y@__Zd$!KYb8T2VBRw%e$iSdZ zkwdMwd}eV9q*;YvrBFTv1>1+}{H!JK2M*C|TNe$ZSA>UHKk);wz$(F$rXVc|sI^lD zV^?_J!3cLM;GJuBMbftbaRUs$;F}HDEDtIeHQ)^EJJ1F9FKJTGH<(Jj`phE6OuvE) zqK^K`;3S{Y#1M@8yRQwH`?kHMq4tHX#rJ>5lY3DM#o@or4&^_xtBC(|JpGTfrbGkA z2Tu+AyT^pHannww!4^!$5?@5v`LYy~T`qs7SYt$JgrY(w%C+IWA;ZkwEF)u5sDvOK zGk;G>Mh&elvXDcV69J_h02l&O;!{$({fng9Rlc3ID#tmB^FIG^w{HLUpF+iB`|
NnX)EH+Nua)3Y(c z&{(nX_ht=QbJ%DzAya}!&uNu!4V0xI)QE$SY__m)SAKcN0P(&JcoK*Lxr@P zY&P=}&B3*UWNlc|&$Oh{BEqwK2+N2U$4WB7Fd|aIal`FGANUa9E-O)!gV`((ZGCc$ zBJA|FFrlg~9OBp#f7aHodCe{6= zay$6vN~zj1ddMZ9gQ4p32(7wD?(dE>KA2;SOzXRmPBiBc6g`eOsy+pVcHu=;Yd8@{ zSGgXf@%sKKQz~;!J;|2fC@emm#^_rnO0esEn^QxXgJYd`#FPWOUU5b;9eMAF zZhfiZb|gk8aJIw*YLp4!*(=3l8Cp{(%p?ho22*vN9+5NLV0TTazNY$B5L6UKUrd$n zjbX%#m7&F#U?QNOBXkiiWB*_tk+H?N3`vg;1F-I+83{M2!8<^nydGr5XX}tC!10&e z7D36bLaB56WrjL&HiiMVtpff|K%|*{t*ltt^5ood{FOG0<>k&1h95qPio)2`eL${YAGIx(b4VN*~nKn6E~SIQUuRH zQ+5zP6jfnP$S0iJ@~t!Ai3o`X7biohli;E zT#yXyl{bojG@-TGZzpdVDXhbmF%F9+-^YSIv|MT1l3j zrxOFq>gd2%U}?6}8mIj?M zc077Zc9fq(-)4+gXv?Az26IO6eV`RAJz8e3)SC7~>%rlzDwySVx*q$ygTR5kW2ds- z!HBgcq0KON9*8Ff$X0wOq$`T7ml(@TF)VeoF}x1OttjuVHn3~sHrMB++}f7f9H%@f z=|kP_?#+fve@{0MlbkC9tyvQ_R?lRdRJ@$qcB(8*jyMyeME5ns6ypVI1Xm*Zr{DuS zZ!1)rQfa89c~;l~VkCiHI|PCBd`S*2RLNQM8!g9L6?n`^evQNEwfO@&JJRme+uopQX0%Jo zgd5G&#&{nX{o?TQwQvF1<^Cg3?2co;_06=~Hcb6~4XWpNFL!WU{+CK;>gH%|BLOh7@!hsa(>pNDAmpcuVO-?;Bic17R}^|6@8DahH)G z!EmhsfunLL|3b=M0MeK2vqZ|OqUqS8npxwge$w-4pFVXFq$_EKrZY?BuP@Az@(k`L z`ViQBSk`y+YwRT;&W| z2e3UfkCo^uTA4}Qmmtqs+nk#gNr2W4 zTH%hhErhB)pkXR{B!q5P3-OM+M;qu~f>}IjtF%>w{~K-0*jPVLl?Chz&zIdxp}bjx zStp&Iufr58FTQ36AHU)0+CmvaOpKF;W@sMTFpJ`j;3d)J_$tNQI^c<^1o<49Z(~K> z;EZTBaVT%14(bFw2ob@?JLQ2@(1pCdg3S%E4*dJ}dA*v}_a4_P(a`cHnBFJxNobAv zf&Zl-Yt*lhn-wjZsq<9v-IsXxAxMZ58C@e0!rzhJ+D@9^3~?~yllY^s$?&oNwyH!#~6x4gUrfxplCvK#!f z$viuszW>MFEcFL?>ux*((!L$;R?xc*myjRIjgnQX79@UPD$6Dz0jutM@7h_pq z0Zr)#O<^y_K6jfY^X%A-ip>P%3saX{!v;fxT-*0C_j4=UMH+Xth(XVkVGiiKE#f)q z%Jp=JT)uy{&}Iq2E*xr4YsJ5>w^=#-mRZ4vPXpI6q~1aFwi+lQcimO45V-JXP;>(Q zo={U`{=_JF`EQj87Wf}{Qy35s8r1*9Mxg({CvOt}?Vh9d&(}iI-quvs-rm~P;eRA@ zG5?1HO}puruc@S{YNAF3vmUc2B4!k*yi))<5BQmvd3tr}cIs#9)*AX>t`=~{f#Uz0 z0&Nk!7sSZwJe}=)-R^$0{yeS!V`Dh7w{w5rZ9ir!Z7Cd7dwZcK;BT#V0bzTt>;@Cl z#|#A!-IL6CZ@eHH!CG>OO8!%G8&8t4)Ro@}USB*k>oEUo0LsljsJ-%5Mo^MJF2I8- z#v7a5VdJ-Cd%(a+y6QwTmi+?f8Nxtm{g-+WGL>t;s#epv7ug>inqimZCVm!uT5Pf6 ziEgQt7^%xJf#!aPWbuC_3Nxfb&CFbQy!(8ANpkWLI4oSnH?Q3f?0k1t$3d+lkQs{~(>06l&v|MpcFsyAv zin6N!-;pggosR*vV=DO(#+}4ps|5$`udE%Kdmp?G7B#y%H`R|i8skKOd9Xzx8xgR$>Zo2R2Ytktq^w#ul4uicxW#{ zFjG_RNlBroV_n;a7U(KIpcp*{M~e~@>Q#Av90Jc5v%0c>egEdY4v3%|K1XvB{O_8G zkTWLC>OZKf;XguMH2-Pw{BKbFzaY;4v2seZV0>^7Q~d4O=AwaPhP3h|!hw5aqOtT@ z!SNz}$of**Bl3TK209@F=Tn1+mgZa8yh(Png%Zd6Mt}^NSjy)etQrF zme*llAW=N_8R*O~d2!apJnF%(JcN??=`$qs3Y+~xs>L9x`0^NIn!8mMRFA_tg`etw z3k{9JAjnl@ygIiJcNHTy02GMAvBVqEss&t2<2mnw!; zU`J)0>lWiqVqo|ex7!+@0i>B~BSU1A_0w#Ee+2pJx0BFiZ7RDHEvE*ptc9md(B{&+ zKE>TM)+Pd>HEmdJao7U@S>nL(qq*A)#eLOuIfAS@j`_sK0UEY6OAJJ-kOrHG zjHx`g!9j*_jRcJ%>CE9K2MVf?BUZKFHY?EpV6ai7sET-tqk=nDFh-(65rhjtlKEY% z@G&cQ<5BKatfdA1FKuB=i>CCC5(|9TMW%K~GbA4}80I5%B}(gck#Wlq@$nO3%@QP_ z8nvPkJFa|znk>V92cA!K1rKtr)skHEJD;k8P|R8RkCq1Rh^&}Evwa4BUJz2f!2=MH zo4j8Y$YL2313}H~F7@J7mh>u%556Hw0VUOz-Un@ZASCL)y8}4XXS`t1AC*^>PLwIc zUQok5PFS=*#)Z!3JZN&eZ6ZDP^-c@StY*t20JhCnbMxXf=LK#;`4KHEqMZ-Ly9KsS zI2VUJGY&PmdbM+iT)zek)#Qc#_i4uH43 z@T5SZBrhNCiK~~esjsO9!qBpaWK<`>!-`b71Y5ReXQ4AJU~T2Njri1CEp5oKw;Lnm)-Y@Z3sEY}XIgSy%xo=uek(kAAH5MsV$V3uTUsoTzxp_rF=tx zV07vlJNKtJhCu`b}*#m&5LV4TAE&%KtHViDAdv#c^x`J7bg z&N;#I2GkF@SIGht6p-V}`!F_~lCXjl1BdTLIjD2hH$J^YFN`7f{Q?OHPFEM$65^!u zNwkelo*5+$ZT|oQ%o%;rBX$+?xhvjb)SHgNHE_yP%wYkkvXHS{Bf$OiKJ5d1gI0j< zF6N}Aq=(WDo(J{e-uOecxPD>XZ@|u-tgTR<972`q8;&ZD!cep^@B5CaqFz|oU!iFj zU0;6fQX&~15E53EW&w1s9gQQ~Zk16X%6 zjG`j0yq}4deX2?Tr(03kg>C(!7a|b9qFI?jcE^Y>-VhudI@&LI6Qa}WQ>4H_!UVyF z((cm&!3gmq@;BD#5P~0;_2qgZhtJS|>WdtjY=q zLnHH~Fm!cxw|Z?Vw8*~?I$g#9j&uvgm7vPr#&iZgPP~v~BI4jOv;*OQ?jYJtzO<^y z7-#C={r7CO810!^s(MT!@@Vz_SVU)7VBi(e1%1rvS!?PTa}Uv`J!EP3s6Y!xUgM^8 z4f!fq<3Wer_#;u!5ECZ|^c1{|q_lh3m^9|nsMR1#Qm|?4Yp5~|er2?W^7~cl;_r4WSme_o68J9p03~Hc%X#VcX!xAu%1`R!dfGJCp zV*&m47>s^%Ib0~-2f$6oSgn3jg8m%UA;ArcdcRyM5;}|r;)?a^D*lel5C`V5G=c~k zy*w_&BfySOxE!(~PI$*dwG><+-%KT5p?whOUMA*k<9*gi#T{h3DAxzAPxN&Xws8o9Cp*`PA5>d9*Z-ynV# z9yY*1WR^D8|C%I@vo+d8r^pjJ$>eo|j>XiLWvTWLl(^;JHCsoPgem6PvegHb-OTf| zvTgsHSa;BkbG=(NgPO|CZu9gUCGr$8*EoH2_Z#^BnxF0yM~t`|9ws_xZ8X8iZYqh! zAh;HXJ)3P&)Q0(&F>!LN0g#bdbis-cQxyGn9Qgh`q+~49Fqd2epikEUw9caM%V6WgP)532RMRW}8gNS%V%Hx7apSz}tn@bQy!<=lbhmAH=FsMD?leawbnP5BWM0 z5{)@EEIYMu5;u)!+HQWhQ;D3_Cm_NADNeb-f56}<{41aYq8p4=93d=-=q0Yx#knGYfXVt z+kMxlus}t2T5FEyCN~!}90O_X@@PQpuy;kuGz@bWft%diBTx?d)_xWd_-(!LmVrh**oKg!1CNF&LX4{*j|) zIvjCR0I2UUuuEXh<9}oT_zT#jOrJAHNLFT~Ilh9hGJPI1<5`C-WA{tUYlyMeoy!+U zhA#=p!u1R7DNg9u4|QfED-2TuKI}>p#2P9--z;Bbf4Op*;Q9LCbO&aL2i<0O$ByoI z!9;Ght733FC>Pz>$_mw(F`zU?`m@>gE`9_p*=7o=7av`-&ifU(^)UU`Kg3Kw`h9-1 z6`e6+im=|m2v`pN(2dE%%n8YyQz;#3Q-|x`91z?gj68cMrHl}C25|6(_dIGk*8cA3 zRHB|Nwv{@sP4W+YZM)VKI>RlB`n=Oj~Rzx~M+Khz$N$45rLn6k1nvvD^&HtsMA4`s=MmuOJID@$s8Ph4E zAmSV^+s-z8cfv~Yd(40Sh4JG#F~aB>WFoX7ykaOr3JaJ&Lb49=B8Vk-SQT9%7TYhv z?-Pprt{|=Y5ZQ1?od|A<_IJU93|l4oAfBm?3-wk{O<8ea+`}u%(kub(LFo2zFtd?4 zwpN|2mBNywv+d^y_8#<$r>*5+$wRTCygFLcrwT(qc^n&@9r+}Kd_u@Ithz(6Qb4}A zWo_HdBj#V$VE#l6pD0a=NfB0l^6W^g`vm^sta>Tly?$E&{F?TTX~DsKF~poFfmN%2 z4x`Dc{u{Lkqz&y!33;X}weD}&;7p>xiI&ZUb1H9iD25a(gI|`|;G^NwJPv=1S5e)j z;U;`?n}jnY6rA{V^ zxTd{bK)Gi^odL3l989DQlN+Zs39Xe&otGeY(b5>rlIqfc7Ap4}EC?j<{M=hlH{1+d zw|c}}yx88_xQr`{98Z!d^FNH77=u(p-L{W6RvIn40f-BldeF-YD>p6#)(Qzf)lfZj z?3wAMtPPp>vMehkT`3gToPd%|D8~4`5WK{`#+}{L{jRUMt zrFz+O$C7y8$M&E4@+p+oV5c%uYzbqd2Y%SSgYy#xh4G3hQv>V*BnuKQhBa#=oZB~w{azUB+q%bRe_R^ z>fHBilnRTUfaJ201czL8^~Ix#+qOHSO)A|xWLqOxB$dT2W~)e-r9;bm=;p;RjYahB z*1hegN(VKK+ztr~h1}YP@6cfj{e#|sS`;3tJhIJK=tVJ-*h-5y9n*&cYCSdg#EHE# zSIx=r#qOaLJoVVf6v;(okg6?*L_55atl^W(gm^yjR?$GplNP>BZsBYEf_>wM0Lc;T zhf&gpzOWNxS>m+mN92N0{;4uw`P+9^*|-1~$uXpggj4- z^SFc4`uzj2OwdEVT@}Q`(^EcQ_5(ZtXTql*yGzdS&vrS_w>~~ra|Nb5abwf}Y!uq6R5f&6g2ge~2p(%c< z@O)cz%%rr4*cRJ5f`n@lvHNk@lE1a*96Kw6lJ~B-XfJW%?&-y?;E&?1AacU@`N`!O z6}V>8^%RZ7SQnZ-z$(jsX`amu*5Fj8g!3RTRwK^`2_QHe;_2y_n|6gSaGyPmI#kA0sYV<_qOZc#-2BO%hX)f$s-Z3xlI!ub z^;3ru11DA`4heAu%}HIXo&ctujzE2!6DIGE{?Zs>2}J+p&C$rc7gJC35gxhflorvsb%sGOxpuWhF)dL_&7&Z99=5M0b~Qa;Mo!j&Ti_kXW!86N%n= zSC@6Lw>UQ__F&+&Rzv?gscwAz8IP!n63>SP)^62(HK98nGjLY2*e^OwOq`3O|C92? z;TVhZ2SK%9AGW4ZavTB9?)mUbOoF`V7S=XM;#3EUpR+^oHtdV!GK^nXzCu>tpR|89 zdD{fnvCaN^^LL%amZ^}-E+214g&^56rpdc@yv0b<3}Ys?)f|fXN4oHf$six)-@<;W&&_kj z-B}M5U*1sb4)77aR=@%I?|Wkn-QJVuA96an25;~!gq(g1@O-5VGo7y&E_srxL6ZfS z*R%$gR}dyONgju*D&?geiSj7SZ@ftyA|}(*Y4KbvU!YLsi1EDQQCnb+-cM=K1io78o!v*);o<XwjaQH%)uIP&Zm?)Nfbfn;jIr z)d#!$gOe3QHp}2NBak@yYv3m(CPKkwI|{;d=gi552u?xj9ObCU^DJFQp4t4e1tPzM zvsRIGZ6VF+{6PvqsplMZWhz10YwS={?`~O0Ec$`-!klNUYtzWA^f9m7tkEzCy<_nS z=&<(awFeZvt51>@o_~>PLs05CY)$;}Oo$VDO)?l-{CS1Co=nxjqben*O1BR>#9`0^ zkwk^k-wcLCLGh|XLjdWv0_Hg54B&OzCE^3NCP}~OajK-LuRW53CkV~Su0U>zN%yQP zH8UH#W5P3-!ToO-2k&)}nFe`t+mdqCxxAHgcifup^gKpMObbox9LFK;LP3}0dP-UW z?Zo*^nrQ6*$FtZ(>kLCc2LY*|{!dUn$^RW~m9leoF|@Jy|M5p-G~j%+P0_#orRKf8 zvuu5<*XO!B?1E}-*SY~MOa$6c%2cM+xa8}_8x*aVn~57v&W(0mqN1W`5a7*VN{SUH zXz98DDyCnX2EPl-`Lesf`=AQT%YSDb`$%;(jUTrNen$NPJrlpPDP}prI>Ml!r6bCT;mjsg@X^#&<}CGf0JtR{Ecwd&)2zuhr#nqdgHj+g2n}GK9CHuwO zk>oZxy{vcOL)$8-}L^iVfJHAGfwN$prHjYV0ju}8%jWquw>}_W6j~m<}Jf!G?~r5&Rx)!9JNX!ts#SGe2HzobV5); zpj@&`cNcO&q+%*<%D7za|?m5qlmFK$=MJ_iv{aRs+BGVrs)98BlN^nMr{V_fcl_;jkzRju+c-y?gqBC_@J0dFLq-D9@VN&-`R9U;nv$Hg?>$oe4N&Ht$V_(JR3TG^! zzJsbQbi zFE6-{#9{G{+Z}ww!ycl*7rRdmU#_&|DqPfX3CR1I{Kk;bHwF6jh0opI`UV2W{*|nn zf_Y@%wW6APb&9RrbEN=PQRBEpM(N1w`81s=(xQj6 z-eO0k9=Al|>Ej|Mw&G`%q8e$2xVz1v4DXAi8G};R$y)ww638Y=9y$ZYFDM$}vzusg zUf+~BPX>(SjA|tgaFZr_e0{)+z9i6G#lgt=F_n$d=beAt0Sa0a7>z-?vcjl3e+W}+ z1&9=|vC=$co}-Zh*%3588G?v&U7%N1Qf-wNWJ)(v`iO5KHSkC5&g7CrKu8V}uQGcfcz zmBz#Lbqwqy#Z~UzHgOQ;Q-rPxrRNvl(&u6ts4~0=KkeS;zqURz%!-ERppmd%0v>iRlEf+H$yl{_8TMJzo0 z>n)`On|7=WQdsqhXI?#V{>+~}qt-cQbokEbgwV3QvSP7&hK4R{Z{aGHVS3;+h{|Hz z6$Js}_AJr383c_+6sNR|$qu6dqHXQTc6?(XWPCVZv=)D#6_;D_8P-=zOGEN5&?~8S zl5jQ?NL$c%O)*bOohdNwGIKM#jSAC?BVY={@A#c9GmX0=T(0G}xs`-%f3r=m6-cpK z!%waekyAvm9C3%>sixdZj+I(wQlbB4wv9xKI*T13DYG^T%}zZYJ|0$Oj^YtY+d$V$ zAVudSc-)FMl|54n=N{BnZTM|!>=bhaja?o7s+v1*U$!v!qQ%`T-6fBvmdPbVmro&d zk07TOp*KuxRUSTLRrBj{mjsnF8`d}rMViY8j`jo~Hp$fkv9F_g(jUo#Arp;Xw0M$~ zRIN!B22~$kx;QYmOkos@%|5k)!QypDMVe}1M9tZfkpXKGOxvKXB!=lo`p?|R1l=tA zp(1}c6T3Fwj_CPJwVsYtgeRKg?9?}%oRq0F+r+kdB=bFUdVDRPa;E~~>2$w}>O>v=?|e>#(-Lyx?nbg=ckJ#5U6;RT zNvHhXk$P}m9wSvFyU3}=7!y?Y z=fg$PbV8d7g25&-jOcs{%}wTDKm>!Vk);&rr;O1nvO0VrU&Q?TtYVU=ir`te8SLlS zKSNmV=+vF|ATGg`4$N1uS|n??f}C_4Sz!f|4Ly8#yTW-FBfvS48Tef|-46C(wEO_%pPhUC5$-~Y?!0vFZ^Gu`x=m7X99_?C-`|h zfmMM&Y@zdfitA@KPw4Mc(YHcY1)3*1xvW9V-r4n-9ZuBpFcf{yz+SR{ zo$ZSU_|fgwF~aakGr(9Be`~A|3)B=9`$M-TWKipq-NqRDRQc}ABo*s_5kV%doIX7LRLRau_gd@Rd_aLFXGSU+U?uAqh z8qusWWcvgQ&wu{|sRXmv?sl=xc<$6AR$+cl& zFNh5q1~kffG{3lDUdvEZu5c(aAG~+64FxdlfwY^*;JSS|m~CJusvi-!$XR`6@XtY2 znDHSz7}_Bx7zGq-^5{stTRy|I@N=>*y$zz>m^}^{d&~h;0kYiq8<^Wq7Dz0w31ShO^~LUfW6rfitR0(=3;Uue`Y%y@ex#eKPOW zO~V?)M#AeHB2kovn1v=n^D?2{2jhIQd9t|_Q+c|ZFaWt+r&#yrOu-!4pXAJuxM+Cx z*H&>eZ0v8Y`t}8{TV6smOj=__gFC=eah)mZt9gwz>>W$!>b3O;Rm^Ig*POZP8Rl0f zT~o=Nu1J|lO>}xX&#P58%Yl z83`HRs5#32Qm9mdCrMlV|NKNC+Z~ z9OB8xk5HJ>gBLi+m@(pvpw)1(OaVJKs*$Ou#@Knd#bk+V@y;YXT?)4eP9E5{J%KGtYinNYJUH9PU3A}66c>Xn zZ{Bn0<;8$WCOAL$^NqTjwM?5d=RHgw3!72WRo0c;+houoUA@HWLZM;^U$&sycWrFd zE7ekt9;kb0`lps{>R(}YnXlyGY}5pPd9zBpgXeJTY_jwaJGSJQC#-KJqmh-;ad&F- z-Y)E>!&`Rz!HtCz>%yOJ|v(u7P*I$jqEY3}(Z-orn4 zlI?CYKNl`6I){#2P1h)y(6?i;^z`N3bxTV%wNvQW+eu|x=kbj~s8rhCR*0H=iGkSj zk23lr9kr|p7#qKL=UjgO`@UnvzU)`&fI>1Qs7ubq{@+lK{hH* zvl6eSb9%yngRn^T<;jG1SVa)eA>T^XX=yUS@NCKpk?ovCW1D@!=@kn;l_BrG;hOTC z6K&H{<8K#dI(A+zw-MWxS+~{g$tI7|SfP$EYKxA}LlVO^sT#Oby^grkdZ^^lA}uEF zBSj$weBJG{+Bh@Yffzsw=HyChS(dtLE3i*}Zj@~!_T-Ay7z=B)+*~3|?w`Zd)Co2t zC&4DyB!o&YgSw+fJn6`sn$e)29`kUwAc+1MND7YjV%lO;H2}fNy>hD#=gT ze+-aFNpyKIoXY~Vq-}OWPBe?Rfu^{ps8>Xy%42r@RV#*QV~P83jdlFNgkPN=T|Kt7 zV*M`Rh*30&AWlb$;ae130e@}Tqi3zx2^JQHpM>j$6x`#{mu%tZlwx9Gj@Hc92IuY* zarmT|*d0E~vt6<+r?W^UW0&#U&)8B6+1+;k^2|FWBRP9?C4Rk)HAh&=AS8FS|NQaZ z2j!iZ)nbEyg4ZTp-zHwVlfLC~tXIrv(xrP8PAtR{*c;T24ycA-;auWsya-!kF~CWZ zw_uZ|%urXgUbc@x=L=_g@QJ@m#5beS@6W195Hn7>_}z@Xt{DIEA`A&V82bc^#!q8$ zFh?z_Vn|ozJ;NPd^5uu(9tspo8t%&-U9Ckay-s@DnM*R5rtu|4)~e)`z0P-sy?)kc zs_k&J@0&0!q4~%cKL)2l;N*T&0;mqX5T{Qy60%JtKTQZ-xb%KOcgqwJmb%MOOKk7N zgq})R_6**{8A|6H?fO+2`#QU)p$Ei2&nbj6TpLSIT^D$|`TcSeh+)}VMb}LmvZ{O| ze*1IdCt3+yhdYVxcM)Q_V0bIXLgr6~%JS<<&dxIgfL=Vnx4YHuU@I34JXA|+$_S3~ zy~X#gO_X!cSs^XM{yzDGNM>?v(+sF#<0;AH^YrE8smx<36bUsHbN#y57K8WEu(`qHvQ6cAZPo=J5C(lSmUCZ57Rj6cx!e^rfaI5%w}unz}4 zoX=nt)FVNV%QDJH`o!u9olLD4O5fl)xp+#RloZlaA92o3x4->?rB4`gS$;WO{R;Z3>cG3IgFX2EA?PK^M}@%1%A;?f6}s&CV$cIyEr#q5;yHdNZ9h{| z-=dX+a5elJoDo?Eq&Og!nN6A)5yYpnGEp}?=!C-V)(*~z-+?kY1Q7qs#Rsy%hu_60rdbB+QQNr?S1 z?;xtjUv|*E3}HmuNyB9aFL5H~3Ho0UsmuMZELp1a#CA1g`P{-mT?BchuLEtK}!QZ=3AWakRu~?f9V~3F;TV`5%9Pcs_$gq&CcU}r8gOO zC2&SWPsSG{&o-LIGTBqp6SLQZPvYKp$$7L4WRRZ0BR$Kf0I0SCFkqveCp@f)o8W)! z$%7D1R`&j7W9Q9CGus_)b%+B#J2G;l*FLz#s$hw{BHS~WNLODV#(!u_2Pe&tMsq={ zdm7>_WecWF#D=?eMjLj=-_z`aHMZ=3_-&E8;ibPmM}61i6J3is*=dKf%HC>=xbj4$ zS|Q-hWQ8T5mWde6h@;mS+?k=89?1FU<%qH9B(l&O>k|u_aD|DY*@~(`_pb|B#rJ&g zR0(~(68fpUPz6TdS@4JT5MOPrqDh5_H(eX1$P2SQrkvN8sTxwV>l0)Qq z0pzTuvtEAKRDkKGhhv^jk%|HQ1DdF%5oKq5BS>szk-CIke{%js?~%@$uaN3^Uz6Wf z_iyx{bZ(;9y4X&>LPV=L=d+A}7I4GkK0c1Xts{rrW1Q7apHf-))`BgC^0^F(>At1* za@e7{lq%yAkn*NH8Q1{@{lKhRg*^TfGvv!Sn*ed*x@6>M%aaqySxR|oNadYt1mpUZ z6H(rupHYf&Z z29$5g#|0MX#aR6TZ$@eGxxABRKakDYtD%5BmKp;HbG_ZbT+=81E&=XRk6m_3t9PvD zr5Cqy(v?gHcYvYvXkNH@S#Po~q(_7MOuCAB8G$a9BC##gw^5mW16cML=T=ERL7wsk zzNEayTG?mtB=x*wc@ifBCJ|irFVMOvH)AFRW8WE~U()QT=HBCe@s$dA9O!@`zAAT) zaOZ7l6vyR+Nk_OOF!ZlZmjoImKh)dxFbbR~z(cMhfeX1l7S_`;h|v3gI}n9$sSQ>+3@AFAy9=B_y$)q;Wdl|C-X|VV3w8 z2S#>|5dGA8^9%Bu&fhmVRrTX>Z7{~3V&0UpJNEl0=N32euvDGCJ>#6dUSi&PxFW*s zS`}TB>?}H(T2lxBJ!V#2taV;q%zd6fOr=SGHpoSG*4PDaiG0pdb5`jelVipkEk%FV zThLc@Hc_AL1#D&T4D=w@UezYNJ%0=f3iVRuVL5H?eeZM}4W*bomebEU@e2d`M<~uW zf#Bugwf`VezG|^Qbt6R_=U0}|=k;mIIakz99*>FrsQR{0aQRP6ko?5<7bkDN8evZ& zB@_KqQG?ErKL=1*ZM9_5?Pq%lcS4uLSzN(Mr5=t6xHLS~Ym`UgM@D&VNu8e?_=nSFtF$u@hpPSmI4Vo_t&v?>$~K4y(O~Rb*(MFy_igM7 z*~yYUyR6yQgzWnWMUgDov!!g=lInM+=lOmOk4L`O?{i&qxy&D*_qorRbDwj6?)!ef z#JLd7F6Z2I$S0iYI={rZNk*<{HtIl^mx=h>Cim*04K4+Z4IJtd*-)%6XV2(MCscPiw_a+y*?BKbTS@BZ3AUao^%Zi#PhoY9Vib4N>SE%4>=Jco0v zH_Miey{E;FkdlZSq)e<{`+S3W=*ttvD#hB8w=|2aV*D=yOV}(&p%0LbEWH$&@$X3x~CiF-?ejQ*N+-M zc8zT@3iwkdRT2t(XS`d7`tJQAjRmKAhiw{WOqpuvFp`i@Q@!KMhwKgsA}%@sw8Xo5Y=F zhRJZg)O4uqNWj?V&&vth*H#je6T}}p_<>!Dr#89q@uSjWv~JuW(>FqoJ5^ho0%K?E z9?x_Q;kmcsQ@5=}z@tdljMSt9-Z3xn$k)kEjK|qXS>EfuDmu(Z8|(W?gY6-l z@R_#M8=vxKMAoi&PwnaIYw2COJM@atcgfr=zK1bvjW?9B`-+Voe$Q+H$j!1$Tjn+* z&LY<%)L@;zhnJlB^Og6I&BOR-m?{IW;tyYC%FZ!&Z>kGjHJ6cqM-F z&19n+e1=9AH1VrVeHrIzqlC`w9=*zfmrerF?JMzO&|Mmv;!4DKc(sp+jy^Dx?(8>1 zH&yS_4yL7m&GWX~mdfgH*AB4{CKo;+egw=PrvkTaoBU+P-4u?E|&!c z)DKc;>$$B6u*Zr1SjUh2)FeuWLWHl5TH(UHWkf zLs>7px!c5n;rbe^lO@qlYLzlDVp(z?6rPZel=YB)Uv&n!2{+Mb$-vQl=xKw( zve&>xYx+jW_NJh!FV||r?;hdP*jOXYcLCp>DOtJ?2S^)DkM{{Eb zS$!L$e_o0(^}n3tA1R3-$SNvgBq;DOEo}fNc|tB%%#g4RA3{|euq)p+xd3I8^4E&m zFrD%}nvG^HUAIKe9_{tXB;tl|G<%>yk6R;8L2)KUJw4yHJXUOPM>(-+jxq4R;z8H#>rnJy*)8N+$wA$^F zN+H*3t)eFEgxLw+Nw3};4WV$qj&_D`%ADV2%r zJCPCo%{=z7;`F98(us5JnT(G@sKTZ^;2FVitXyLe-S5(hV&Ium+1pIUB(CZ#h|g)u zSLJJ<@HgrDiA-}V_6B^x1>c9B6%~847JkQ!^KLZ2skm;q*edo;UA)~?SghG8;QbHh z_6M;ouo_1rq9=x$<`Y@EA{C%6-pEV}B(1#sDoe_e1s3^Y>n#1Sw;N|}8D|s|VPd+g z-_$QhCz`vLxxrVMx3ape1xu3*wjx=yKSlM~nFgkNWb4?DDr*!?U)L_VeffF<+!j|b zZ$Wn2$TDv3C3V@BHpSgv3JUif8%hk%OsGZ=OxH@8&4`bbf$`aAMchl^qN>Eyu3JH} z9-S!x8-s4fE=lad%Pkp8hAs~u?|uRnL48O|;*DEU! zuS0{cpk%1E0nc__2%;apFsTm0bKtd&A0~S3Cj^?72-*Owk3V!ZG*PswDfS~}2<8le z5+W^`Y(&R)yVF*tU_s!XMcJS`;(Tr`J0%>p=Z&InR%D3@KEzzI+-2)HK zuoNZ&o=wUC&+*?ofPb0a(E6(<2Amd6%uSu_^-<1?hsxs~0K5^f(LsGqgEF^+0_H=uNk9S0bb!|O8d?m5gQjUKevPaO+*VfSn^2892K~%crWM8+6 z25@V?Y@J<9w%@NXh-2!}SK_(X)O4AM1-WTg>sj1{lj5@=q&dxE^9xng1_z9w9DK>| z6Iybcd0e zyi;Ew!KBRIfGPGytQ6}z}MeXCfLY0?9%RiyagSp_D1?N&c{ zyo>VbJ4Gy`@Fv+5cKgUgs~na$>BV{*em7PU3%lloy_aEovR+J7TfQKh8BJXyL6|P8un-Jnq(ghd!_HEOh$zlv2$~y3krgeH;9zC}V3f`uDtW(%mT#944DQa~^8ZI+zAUu4U(j0YcDfKR$bK#gvn_{JZ>|gZ5+)u?T$w7Q%F^;!Wk?G z(le7r!ufT*cxS}PR6hIVtXa)i`d$-_1KkyBU>qmgz-=T};uxx&sKgv48akIWQ89F{ z0XiY?WM^~;|T8zBOr zs#zuOONzH?svv*jokd5SK8wG>+yMC)LYL|vLqm^PMHcT=`}V$=nIRHe2?h)8WQa6O zPAU}d`1y(>kZiP~Gr=mtJLMu`i<2CspL|q2DqAgAD^7*$xzM`PU4^ga`ilE134XBQ z99P(LhHU@7qvl9Yzg$M`+dlS=x^(m-_3t|h>S}E0bcFMn=C|KamQ)=w2^e)35p`zY zRV8X?d;s^>Cof2SPR&nP3E+-LCkS0J$H!eh8~k0qo$}00b=7!H_I2O+Ro@3O$nPdm ztmbOO^B+IHzQ5w>@@@J4cKw5&^_w6s!s=H%&byAbUtczPQ7}wfTqxxtQNfn*u73Qw zGuWsrky_ajPx-5`R<)6xHf>C(oqGf_Fw|-U*GfS?xLML$kv;h_pZ@Kk$y0X(S+K80 z6^|z)*`5VUkawg}=z`S;VhZhxyDfrE0$(PMurAxl~<>lfZa>JZ288ULK7D` zl9|#L^JL}Y$j*j`0-K6kH#?bRmg#5L3iB4Z)%iF@SqT+Lp|{i`m%R-|ZE94Np7Pa5 zCqC^V3}B(FR340pmF*qaa}M}+h6}mqE~7Sh!9bDv9YRT|>vBNAqv09zXHMlcuhKD| zcjjA(b*XCIwJ33?CB!+;{)vX@9xns_b-VO{i0y?}{!sdXj1GM8+$#v>W7nw;+O_9B z_{4L;C6ol?(?W0<6taGEn1^uG=?Q3i29sE`RfYCaV$3DKc_;?HsL?D_fSYg}SuO5U zOB_f4^vZ_x%o`5|C@9C5+o=mFy@au{s)sKw!UgC&L35aH(sgDxRE2De%(%OT=VUdN ziVLEmdOvJ&5*tCMKRyXctCwQu_RH%;m*$YK&m;jtbdH#Ak~13T1^f89tn`A%QEHWs~jnY~E}p_Z$XC z=?YXLCkzVSK+Id`xZYTegb@W8_baLt-Fq`Tv|=)JPbFsKRm)4UW;yT+J`<)%#ue9DPOkje)YF2fsCilK9MIIK>p*`fkoD5nGfmLwt)!KOT+> zOFq*VZktDDyM3P5UOg`~XL#cbzC}eL%qMB=Q5$d89MKuN#$6|4gx_Jt0Gfn8w&q}%lq4QU%6#jT*MRT% zrLz~C8FYKHawn-EQWN1B75O&quS+Z81(zN)G>~vN8VwC+e+y(`>HcxC{MrJ;H1Z4k zZWuv$w_F0-Ub%MVcpIc){4PGL^I7M{>;hS?;eH!;gmcOE66z3;Z1Phqo(t zVP(Hg6q#0gIKgsg7L7WE!{Y#1nI(45tx2{$34dDd#!Z0NIyrm)HOn5W#7;f4pQci# zDW!FI(g4e668kI9{2+mLwB+=#9bfqgX%!B34V-$wwSN(_cm*^{y0jQtv*4}eO^sOV z*9xoNvX)c9isB}Tgx&ZRjp3kwhTVK?r9;n!x>^XYT z@Q^7zp{rkIs{2mUSE^2!Gf6$6;j~&4=-0cSJJDizZp6LTe8b45;{AKM%v99}{{FfC zz709%u0mC=1KXTo(=TqmZQ;c?$M3z(!xah>aywrj40sc2y3rKFw4jCq+Y+u=CH@_V zxz|qeTwa>+<|H%8Dz5u>ZI5MmjTFwXS-Fv!TDd*`>3{krWoNVx$<133`(ftS?ZPyY z&4@ah^3^i`vL$BZa>O|Nt?ucewzsF)0zX3qmM^|waXr=T0pfIb0*$AwU=?Ipl|1Y; z*Pk6{C-p4MY;j@IJ|DW>QHZQJcp;Z~?8(Q+Kk3^0qJ}SCk^*n4W zu9ZFwLHUx-$6xvaQ)SUQcYd6fF8&x)V`1bIuX@>{mE$b|Yd(qomn3;bPwnDUc0F=; zh*6_((%bqAYQWQ~odER?h>1mkL4kpb3s7`0m@rDKGU*oyF)$j~Ffd4fXV$?`f~rHf zB%Y)@5SXZvfwm10RY5X?TEo)PK_`L6qgBp=#>fO49$D zDq8Ozj0q6213tV5Qq=;fZ0$|KroY{Dz=l@lU^J)?Ko@ti20TRplXzphBi>XGx4bou zEWrkNjz0t5j!_ke{g5I#PUlEU$Km8g8TE|XK=MkU@PT4T><2OVamoK;wJ}3X0L$vX zgd7gNa359*nc)R-0!`2X@FOTB`+oETOPc=ubp5R)VQgY+5BTZZJ2?9QwnO=dnulIUF3gFn;BODC2)65)HeVd%t86sL7Rv^Y+nbn+&l z6BAJY(ETvwI)Ts$aiE8rht4KD*qNyE{8{x6R|%akbTBzw;2+6Echkt+W+`u^XX z_z&x%n '} +case $link in #( +/*) app_path=$link ;; #( +*) app_path=$APP_HOME$link ;; +esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { +echo "$*" +} >&2 + +die () { +echo +echo "$*" +echo +exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( +CYGWIN* ) cygwin=true ;; #( +Darwin* ) darwin=true ;; #( +MSYS* | MINGW* ) msys=true ;; #( +NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then +if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +# IBM's JDK on AIX uses strange locations for the executables +JAVACMD=$JAVA_HOME/jre/sh/java +else +JAVACMD=$JAVA_HOME/bin/java +fi +if [ ! -x "$JAVACMD" ] ; then +die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +else +JAVACMD=java +if ! command -v java >/dev/null 2>&1 +then +die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then +case $MAX_FD in #( +max*) +# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +MAX_FD=$( ulimit -H -n ) || +warn "Could not query maximum file descriptor limit" +esac +case $MAX_FD in #( +'' | soft) :;; #( +*) +# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +ulimit -n "$MAX_FD" || +warn "Could not set maximum file descriptor limit to $MAX_FD" +esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then +APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) +CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + +JAVACMD=$( cygpath --unix "$JAVACMD" ) + +# Now convert the arguments - kludge to limit ourselves to /bin/sh +for arg do +if +case $arg in #( +-*) false ;; # don't mess with options #( +/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath +[ -e "$t" ] ;; #( +*) false ;; +esac +then +arg=$( cygpath --path --ignore --mixed "$arg" ) +fi +# Roll the args list around exactly as many times as the number of +# args, so each arg winds up back in the position where it started, but +# possibly modified. +# +# NB: a `for` loop captures its iteration list before it begins, so +# changing the positional parameters here affects neither the number of +# iterations, nor the values presented in `arg`. +shift # remove old arg +set -- "$@" "$arg" # push replacement arg +done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ +"-Dorg.gradle.appname=$APP_BASE_NAME" \ +-classpath "$CLASSPATH" \ +org.gradle.wrapper.GradleWrapperMain \ +"$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then +die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( +printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | +xargs -n1 | +sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | +tr '\n' ' ' +)" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/java/futureagi/gradlew.bat b/java/futureagi/gradlew.bat new file mode 100644 index 0000000..25da30d --- /dev/null +++ b/java/futureagi/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java/futureagi/pom.xml b/java/futureagi/pom.xml new file mode 100644 index 0000000..7077cfc --- /dev/null +++ b/java/futureagi/pom.xml @@ -0,0 +1,258 @@ + + 4.0.0 + com.futureagi + futureagi-sdk + jar + futureagi-sdk + 0.1.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + maven-enforcer-plugin + 3.1.0 + + + enforce-maven + + enforce + + + + + 3 + + + 11 + + + + + + + + maven-surefire-plugin + 3.2.5 + + + conf/log4j.properties + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + 3.3.0 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + maven-compiler-plugin + 3.10.1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + + attach-javadocs + + jar + + + + + + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + sign-artifacts + + + + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + org.junit.jupiter + junit-jupiter-api + ${junit-version} + test + + + + + UTF-8 + 11 + 11 + 2.17.1 + 0.2.6 + 1.3.5 + 2.0.2 + 5.10.2 + 2.27.2 + + diff --git a/java/futureagi/settings.gradle b/java/futureagi/settings.gradle new file mode 100644 index 0000000..991f2ec --- /dev/null +++ b/java/futureagi/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "futureagi-sdk" \ No newline at end of file diff --git a/java/futureagi/src/main/AndroidManifest.xml b/java/futureagi/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a51ea3c --- /dev/null +++ b/java/futureagi/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/ApiClient.java b/java/futureagi/src/main/java/com/futureagi/sdk/ApiClient.java new file mode 100644 index 0000000..fba8aeb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/ApiClient.java @@ -0,0 +1,456 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.openapitools.jackson.nullable.JsonNullableModule; + +import java.io.InputStream; +import java.net.URI; +import java.net.URLEncoder; +import java.net.http.HttpClient; +import java.net.http.HttpConnectTimeoutException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.StringJoiner; +import java.util.function.Consumer; +import java.util.stream.Collectors; + +import static java.nio.charset.StandardCharsets.UTF_8; + +/** + * Configuration and utility class for API clients. + * + *

This class can be constructed and modified, then used to instantiate the + * various API classes. The API classes use the settings in this class to + * configure themselves, but otherwise do not store a link to this class.

+ * + *

This class is mutable and not synchronized, so it is not thread-safe. + * The API classes generated from this are immutable and thread-safe.

+ * + *

The setter methods of this class return the current object to facilitate + * a fluent style of configuration.

+ */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiClient { + + private HttpClient.Builder builder; + private ObjectMapper mapper; + private String scheme; + private String host; + private int port; + private String basePath; + private Consumer interceptor; + private Consumer> responseInterceptor; + private Consumer> asyncResponseInterceptor; + private Duration readTimeout; + private Duration connectTimeout; + + public static String valueToString(Object value) { + if (value == null) { + return ""; + } + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + return value.toString(); + } + + /** + * URL encode a string in the UTF-8 encoding. + * + * @param s String to encode. + * @return URL-encoded representation of the input string. + */ + public static String urlEncode(String s) { + return URLEncoder.encode(s, UTF_8).replaceAll("\\+", "%20"); + } + + /** + * Convert a URL query name/value parameter to a list of encoded {@link Pair} + * objects. + * + *

The value can be null, in which case an empty list is returned.

+ * + * @param name The query name parameter. + * @param value The query value, which may not be a collection but may be + * null. + * @return A singleton list of the {@link Pair} objects representing the input + * parameters, which is encoded for use in a URL. If the value is null, an + * empty list is returned. + */ + public static List parameterToPairs(String name, Object value) { + if (name == null || name.isEmpty() || value == null) { + return Collections.emptyList(); + } + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); + } + + /** + * Convert a URL query name/collection parameter to a list of encoded + * {@link Pair} objects. + * + * @param collectionFormat The swagger collectionFormat string (csv, tsv, etc). + * @param name The query name parameter. + * @param values A collection of values for the given query name, which may be + * null. + * @return A list of {@link Pair} objects representing the input parameters, + * which is encoded for use in a URL. If the values collection is null, an + * empty list is returned. + */ + public static List parameterToPairs( + String collectionFormat, String name, Collection values) { + if (name == null || name.isEmpty() || values == null || values.isEmpty()) { + return Collections.emptyList(); + } + + // get the collection format (default: csv) + String format = collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat; + + // create the params based on the collection format + if ("multi".equals(format)) { + return values.stream() + .map(value -> new Pair(urlEncode(name), urlEncode(valueToString(value)))) + .collect(Collectors.toList()); + } + + String delimiter; + switch(format) { + case "csv": + delimiter = urlEncode(","); + break; + case "ssv": + delimiter = urlEncode(" "); + break; + case "tsv": + delimiter = urlEncode("\t"); + break; + case "pipes": + delimiter = urlEncode("|"); + break; + default: + throw new IllegalArgumentException("Illegal collection format: " + collectionFormat); + } + + StringJoiner joiner = new StringJoiner(delimiter); + for (Object value : values) { + joiner.add(urlEncode(valueToString(value))); + } + + return Collections.singletonList(new Pair(urlEncode(name), joiner.toString())); + } + + /** + * Create an instance of ApiClient. + */ + public ApiClient() { + this.builder = createDefaultHttpClientBuilder(); + this.mapper = createDefaultObjectMapper(); + updateBaseUri(getDefaultBaseUri()); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + /** + * Create an instance of ApiClient. + * + * @param builder Http client builder. + * @param mapper Object mapper. + * @param baseUri Base URI + */ + public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri) { + this.builder = builder; + this.mapper = mapper; + updateBaseUri(baseUri != null ? baseUri : getDefaultBaseUri()); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + public static ObjectMapper createDefaultObjectMapper() { + ObjectMapper mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.registerModule(new JavaTimeModule()); + mapper.registerModule(new JsonNullableModule()); + return mapper; + } + + private String getDefaultBaseUri() { + return "https://api.futureagi.com"; + } + + public static HttpClient.Builder createDefaultHttpClientBuilder() { + return HttpClient.newBuilder(); + } + + public final void updateBaseUri(String baseUri) { + URI uri = URI.create(baseUri); + scheme = uri.getScheme(); + host = uri.getHost(); + port = uri.getPort(); + basePath = uri.getRawPath(); + } + + /** + * Set a custom {@link HttpClient.Builder} object to use when creating the + * {@link HttpClient} that is used by the API client. + * + * @param builder Custom client builder. + * @return This object. + */ + public ApiClient setHttpClientBuilder(HttpClient.Builder builder) { + this.builder = builder; + return this; + } + + /** + * Get an {@link HttpClient} based on the current {@link HttpClient.Builder}. + * + *

The returned object is immutable and thread-safe.

+ * + * @return The HTTP client. + */ + public HttpClient getHttpClient() { + return builder.build(); + } + + /** + * Set a custom {@link ObjectMapper} to serialize and deserialize the request + * and response bodies. + * + * @param mapper Custom object mapper. + * @return This object. + */ + public ApiClient setObjectMapper(ObjectMapper mapper) { + this.mapper = mapper; + return this; + } + + /** + * Get a copy of the current {@link ObjectMapper}. + * + * @return A copy of the current object mapper. + */ + public ObjectMapper getObjectMapper() { + return mapper.copy(); + } + + /** + * Set a custom host name for the target service. + * + * @param host The host name of the target service. + * @return This object. + */ + public ApiClient setHost(String host) { + this.host = host; + return this; + } + + /** + * Set a custom port number for the target service. + * + * @param port The port of the target service. Set this to -1 to reset the + * value to the default for the scheme. + * @return This object. + */ + public ApiClient setPort(int port) { + this.port = port; + return this; + } + + /** + * Set a custom base path for the target service, for example '/v2'. + * + * @param basePath The base path against which the rest of the path is + * resolved. + * @return This object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get the base URI to resolve the endpoint paths against. + * + * @return The complete base URI that the rest of the API parameters are + * resolved against. + */ + public String getBaseUri() { + return scheme + "://" + host + (port == -1 ? "" : ":" + port) + basePath; + } + + /** + * Set a custom scheme for the target service, for example 'https'. + * + * @param scheme The scheme of the target service + * @return This object. + */ + public ApiClient setScheme(String scheme){ + this.scheme = scheme; + return this; + } + + /** + * Set a custom request interceptor. + * + *

A request interceptor is a mechanism for altering each request before it + * is sent. After the request has been fully configured but not yet built, the + * request builder is passed into this function for further modification, + * after which it is sent out.

+ * + *

This is useful for altering the requests in a custom manner, such as + * adding headers. It could also be used for logging and monitoring.

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setRequestInterceptor(Consumer interceptor) { + this.interceptor = interceptor; + return this; + } + + /** + * Get the custom interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer getRequestInterceptor() { + return interceptor; + } + + /** + * Set a custom response interceptor. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setResponseInterceptor(Consumer> interceptor) { + this.responseInterceptor = interceptor; + return this; + } + + /** + * Get the custom response interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getResponseInterceptor() { + return responseInterceptor; + } + + /** + * Set a custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setAsyncResponseInterceptor(Consumer> interceptor) { + this.asyncResponseInterceptor = interceptor; + return this; + } + + /** + * Get the custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getAsyncResponseInterceptor() { + return asyncResponseInterceptor; + } + + /** + * Set the read timeout for the http client. + * + *

This is the value used by default for each request, though it can be + * overridden on a per-request basis with a request interceptor.

+ * + * @param readTimeout The read timeout used by default by the http client. + * Setting this value to null resets the timeout to an + * effectively infinite value. + * @return This object. + */ + public ApiClient setReadTimeout(Duration readTimeout) { + this.readTimeout = readTimeout; + return this; + } + + /** + * Get the read timeout that was set. + * + * @return The read timeout, or null if no timeout was set. Null represents + * an infinite wait time. + */ + public Duration getReadTimeout() { + return readTimeout; + } + /** + * Sets the connect timeout (in milliseconds) for the http client. + * + *

In the case where a new connection needs to be established, if + * the connection cannot be established within the given {@code + * duration}, then {@link HttpClient#send(HttpRequest,BodyHandler) + * HttpClient::send} throws an {@link HttpConnectTimeoutException}, or + * {@link HttpClient#sendAsync(HttpRequest,BodyHandler) + * HttpClient::sendAsync} completes exceptionally with an + * {@code HttpConnectTimeoutException}. If a new connection does not + * need to be established, for example if a connection can be reused + * from a previous request, then this timeout duration has no effect. + * + * @param connectTimeout connection timeout in milliseconds + * + * @return This object. + */ + public ApiClient setConnectTimeout(Duration connectTimeout) { + this.connectTimeout = connectTimeout; + this.builder.connectTimeout(connectTimeout); + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public Duration getConnectTimeout() { + return connectTimeout; + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/ApiException.java b/java/futureagi/src/main/java/com/futureagi/sdk/ApiException.java new file mode 100644 index 0000000..9401155 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/ApiException.java @@ -0,0 +1,92 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk; + +import java.net.http.HttpHeaders; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiException extends RuntimeException { + private static final long serialVersionUID = 1L; + + private int code = 0; + private HttpHeaders responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, HttpHeaders responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, HttpHeaders responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return Headers as an HttpHeaders object + */ + public HttpHeaders getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/ApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/ApiResponse.java new file mode 100644 index 0000000..8adba82 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/ApiResponse.java @@ -0,0 +1,60 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/Configuration.java b/java/futureagi/src/main/java/com/futureagi/sdk/Configuration.java new file mode 100644 index 0000000..b80ccd8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/Configuration.java @@ -0,0 +1,41 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Configuration { + public static final String VERSION = "0.1.0"; + + private static volatile ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/JSON.java b/java/futureagi/src/main/java/com/futureagi/sdk/JSON.java new file mode 100644 index 0000000..7118dd4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/JSON.java @@ -0,0 +1,264 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import org.openapitools.jackson.nullable.JsonNullableModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.futureagi.sdk.model.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class JSON { + private ObjectMapper mapper; + + public JSON() { + mapper = JsonMapper.builder() + .serializationInclusion(JsonInclude.Include.NON_NULL) + .disable(MapperFeature.ALLOW_COERCION_OF_SCALARS) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .defaultDateFormat(new RFC3339DateFormat()) + .addModule(new JavaTimeModule()) + .build(); + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + * + * @return the target model class. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + * + * @return the target model class. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + * @param visitedClasses The set of classes that have already been visited. + * + * @return true if inst is an instance of modelClass in the OpenAPI model hierarchy. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (Class childType : descendants.values()) { + if (isInstanceOf(childType, inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/Pair.java b/java/futureagi/src/main/java/com/futureagi/sdk/Pair.java new file mode 100644 index 0000000..66753cc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/Pair.java @@ -0,0 +1,57 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/RFC3339DateFormat.java b/java/futureagi/src/main/java/com/futureagi/sdk/RFC3339DateFormat.java new file mode 100644 index 0000000..9431b0a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/RFC3339DateFormat.java @@ -0,0 +1,58 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/ServerConfiguration.java b/java/futureagi/src/main/java/com/futureagi/sdk/ServerConfiguration.java new file mode 100644 index 0000000..29fc4c5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/ServerConfiguration.java @@ -0,0 +1,72 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/ServerVariable.java b/java/futureagi/src/main/java/com/futureagi/sdk/ServerVariable.java new file mode 100644 index 0000000..0ba470d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/ServerVariable.java @@ -0,0 +1,37 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/AccountsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/AccountsApi.java new file mode 100644 index 0000000..25eb7cb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/AccountsApi.java @@ -0,0 +1,552 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AccountsErrorResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.MemberRemove; +import com.futureagi.sdk.model.MemberRoleUpdate; +import com.futureagi.sdk.model.MemberRoleUpdateResponse; +import com.futureagi.sdk.model.MemberUserMutationResponse; +import com.futureagi.sdk.model.WorkspaceMemberRemove; +import com.futureagi.sdk.model.WorkspaceMemberRoleUpdate; +import com.futureagi.sdk.model.WorkspaceMemberRoleUpdateResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AccountsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public AccountsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AccountsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * POST /accounts/organization/members/reactivate/ + * Re-activates a deactivated org membership and restores workspace memberships that were soft-deactivated during removal. If no prior workspace memberships exist, the user is added to the default workspace. + * @param memberRemove (required) + * @return MemberUserMutationResponse + * @throws ApiException if fails to make API call + */ + public MemberUserMutationResponse accountsOrganizationMembersReactivateCreate(MemberRemove memberRemove) throws ApiException { + ApiResponse localVarResponse = accountsOrganizationMembersReactivateCreateWithHttpInfo(memberRemove); + return localVarResponse.getData(); + } + + /** + * POST /accounts/organization/members/reactivate/ + * Re-activates a deactivated org membership and restores workspace memberships that were soft-deactivated during removal. If no prior workspace memberships exist, the user is added to the default workspace. + * @param memberRemove (required) + * @return ApiResponse<MemberUserMutationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse accountsOrganizationMembersReactivateCreateWithHttpInfo(MemberRemove memberRemove) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = accountsOrganizationMembersReactivateCreateRequestBuilder(memberRemove); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("accountsOrganizationMembersReactivateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder accountsOrganizationMembersReactivateCreateRequestBuilder(MemberRemove memberRemove) throws ApiException { + // verify the required parameter 'memberRemove' is set + if (memberRemove == null) { + throw new ApiException(400, "Missing the required parameter 'memberRemove' when calling accountsOrganizationMembersReactivateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/organization/members/reactivate/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(memberRemove); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * DELETE /accounts/organization/members/remove/ + * Soft-deactivates OrganizationMembership and cascades to workspace memberships. Signals handle Redis clear + audit log. + * @param memberRemove (required) + * @return MemberUserMutationResponse + * @throws ApiException if fails to make API call + */ + public MemberUserMutationResponse accountsOrganizationMembersRemoveDelete(MemberRemove memberRemove) throws ApiException { + ApiResponse localVarResponse = accountsOrganizationMembersRemoveDeleteWithHttpInfo(memberRemove); + return localVarResponse.getData(); + } + + /** + * DELETE /accounts/organization/members/remove/ + * Soft-deactivates OrganizationMembership and cascades to workspace memberships. Signals handle Redis clear + audit log. + * @param memberRemove (required) + * @return ApiResponse<MemberUserMutationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse accountsOrganizationMembersRemoveDeleteWithHttpInfo(MemberRemove memberRemove) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = accountsOrganizationMembersRemoveDeleteRequestBuilder(memberRemove); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("accountsOrganizationMembersRemoveDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder accountsOrganizationMembersRemoveDeleteRequestBuilder(MemberRemove memberRemove) throws ApiException { + // verify the required parameter 'memberRemove' is set + if (memberRemove == null) { + throw new ApiException(400, "Missing the required parameter 'memberRemove' when calling accountsOrganizationMembersRemoveDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/organization/members/remove/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(memberRemove); + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /accounts/organization/members/role/ + * Update a member's org level and/or workspace level. + * @param memberRoleUpdate (required) + * @return MemberRoleUpdateResponse + * @throws ApiException if fails to make API call + */ + public MemberRoleUpdateResponse accountsOrganizationMembersRoleCreate(MemberRoleUpdate memberRoleUpdate) throws ApiException { + ApiResponse localVarResponse = accountsOrganizationMembersRoleCreateWithHttpInfo(memberRoleUpdate); + return localVarResponse.getData(); + } + + /** + * POST /accounts/organization/members/role/ + * Update a member's org level and/or workspace level. + * @param memberRoleUpdate (required) + * @return ApiResponse<MemberRoleUpdateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse accountsOrganizationMembersRoleCreateWithHttpInfo(MemberRoleUpdate memberRoleUpdate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = accountsOrganizationMembersRoleCreateRequestBuilder(memberRoleUpdate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("accountsOrganizationMembersRoleCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder accountsOrganizationMembersRoleCreateRequestBuilder(MemberRoleUpdate memberRoleUpdate) throws ApiException { + // verify the required parameter 'memberRoleUpdate' is set + if (memberRoleUpdate == null) { + throw new ApiException(400, "Missing the required parameter 'memberRoleUpdate' when calling accountsOrganizationMembersRoleCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/organization/members/role/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(memberRoleUpdate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * DELETE /accounts/workspace/<workspace_id>/members/remove/ + * Remove a member from a workspace only (keeps org membership). + * @param workspaceId (required) + * @param workspaceMemberRemove (required) + * @return MemberUserMutationResponse + * @throws ApiException if fails to make API call + */ + public MemberUserMutationResponse accountsWorkspaceMembersRemoveDelete(String workspaceId, WorkspaceMemberRemove workspaceMemberRemove) throws ApiException { + ApiResponse localVarResponse = accountsWorkspaceMembersRemoveDeleteWithHttpInfo(workspaceId, workspaceMemberRemove); + return localVarResponse.getData(); + } + + /** + * DELETE /accounts/workspace/<workspace_id>/members/remove/ + * Remove a member from a workspace only (keeps org membership). + * @param workspaceId (required) + * @param workspaceMemberRemove (required) + * @return ApiResponse<MemberUserMutationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse accountsWorkspaceMembersRemoveDeleteWithHttpInfo(String workspaceId, WorkspaceMemberRemove workspaceMemberRemove) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = accountsWorkspaceMembersRemoveDeleteRequestBuilder(workspaceId, workspaceMemberRemove); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("accountsWorkspaceMembersRemoveDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder accountsWorkspaceMembersRemoveDeleteRequestBuilder(String workspaceId, WorkspaceMemberRemove workspaceMemberRemove) throws ApiException { + // verify the required parameter 'workspaceId' is set + if (workspaceId == null) { + throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling accountsWorkspaceMembersRemoveDelete"); + } + // verify the required parameter 'workspaceMemberRemove' is set + if (workspaceMemberRemove == null) { + throw new ApiException(400, "Missing the required parameter 'workspaceMemberRemove' when calling accountsWorkspaceMembersRemoveDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/workspace/{workspace_id}/members/remove/" + .replace("{workspace_id}", ApiClient.urlEncode(workspaceId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(workspaceMemberRemove); + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /accounts/workspace/<workspace_id>/members/role/ + * Update a member's workspace role. + * @param workspaceId (required) + * @param workspaceMemberRoleUpdate (required) + * @return WorkspaceMemberRoleUpdateResponse + * @throws ApiException if fails to make API call + */ + public WorkspaceMemberRoleUpdateResponse accountsWorkspaceMembersRoleCreate(String workspaceId, WorkspaceMemberRoleUpdate workspaceMemberRoleUpdate) throws ApiException { + ApiResponse localVarResponse = accountsWorkspaceMembersRoleCreateWithHttpInfo(workspaceId, workspaceMemberRoleUpdate); + return localVarResponse.getData(); + } + + /** + * POST /accounts/workspace/<workspace_id>/members/role/ + * Update a member's workspace role. + * @param workspaceId (required) + * @param workspaceMemberRoleUpdate (required) + * @return ApiResponse<WorkspaceMemberRoleUpdateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse accountsWorkspaceMembersRoleCreateWithHttpInfo(String workspaceId, WorkspaceMemberRoleUpdate workspaceMemberRoleUpdate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = accountsWorkspaceMembersRoleCreateRequestBuilder(workspaceId, workspaceMemberRoleUpdate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("accountsWorkspaceMembersRoleCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder accountsWorkspaceMembersRoleCreateRequestBuilder(String workspaceId, WorkspaceMemberRoleUpdate workspaceMemberRoleUpdate) throws ApiException { + // verify the required parameter 'workspaceId' is set + if (workspaceId == null) { + throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling accountsWorkspaceMembersRoleCreate"); + } + // verify the required parameter 'workspaceMemberRoleUpdate' is set + if (workspaceMemberRoleUpdate == null) { + throw new ApiException(400, "Missing the required parameter 'workspaceMemberRoleUpdate' when calling accountsWorkspaceMembersRoleCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/workspace/{workspace_id}/members/role/" + .replace("{workspace_id}", ApiClient.urlEncode(workspaceId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(workspaceMemberRoleUpdate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/AlertsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/AlertsApi.java new file mode 100644 index 0000000..fbd0d1a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/AlertsApi.java @@ -0,0 +1,1431 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ApiErrorResponse; +import com.futureagi.sdk.model.ListAlertLogs200Response; +import com.futureagi.sdk.model.ListAlerts200Response; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.UserAlertMonitor; +import com.futureagi.sdk.model.UserAlertMonitorLog; +import com.futureagi.sdk.model.UserAlertMonitorMetricOptionsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AlertsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public AlertsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AlertsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @param userAlertMonitor (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor bulkMuteAlerts(UserAlertMonitor userAlertMonitor) throws ApiException { + ApiResponse localVarResponse = bulkMuteAlertsWithHttpInfo(userAlertMonitor); + return localVarResponse.getData(); + } + + /** + * + * + * @param userAlertMonitor (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse bulkMuteAlertsWithHttpInfo(UserAlertMonitor userAlertMonitor) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = bulkMuteAlertsRequestBuilder(userAlertMonitor); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("bulkMuteAlerts", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder bulkMuteAlertsRequestBuilder(UserAlertMonitor userAlertMonitor) throws ApiException { + // verify the required parameter 'userAlertMonitor' is set + if (userAlertMonitor == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitor' when calling bulkMuteAlerts"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/bulk-mute/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitor); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param userAlertMonitor (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor createAlert(UserAlertMonitor userAlertMonitor) throws ApiException { + ApiResponse localVarResponse = createAlertWithHttpInfo(userAlertMonitor); + return localVarResponse.getData(); + } + + /** + * + * + * @param userAlertMonitor (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse createAlertWithHttpInfo(UserAlertMonitor userAlertMonitor) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createAlertRequestBuilder(userAlertMonitor); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createAlert", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createAlertRequestBuilder(UserAlertMonitor userAlertMonitor) throws ApiException { + // verify the required parameter 'userAlertMonitor' is set + if (userAlertMonitor == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitor' when calling createAlert"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitor); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void deleteAlert(String id) throws ApiException { + deleteAlertWithHttpInfo(id); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteAlertWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteAlertRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteAlert", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteAlertRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteAlert"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor getAlert(String id) throws ApiException { + ApiResponse localVarResponse = getAlertWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlertWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlertRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAlert", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAlertRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAlert"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor getAlertDetails(String id) throws ApiException { + ApiResponse localVarResponse = getAlertDetailsWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlertDetailsWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlertDetailsRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAlertDetails", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAlertDetailsRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAlertDetails"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/{id}/details/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Returns time-series data for a monitor's metric, suitable for graphing. + * Accepts `start_date` and `end_date` query parameters (ISO 8601 format). If not provided, it defaults to the last 7 days. + * @param id (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor getAlertGraph(String id) throws ApiException { + ApiResponse localVarResponse = getAlertGraphWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * Returns time-series data for a monitor's metric, suitable for graphing. + * Accepts `start_date` and `end_date` query parameters (ISO 8601 format). If not provided, it defaults to the last 7 days. + * @param id (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlertGraphWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlertGraphRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAlertGraph", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAlertGraphRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAlertGraph"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/{id}/graph/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return UserAlertMonitorLog + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorLog getAlertLog(String id) throws ApiException { + ApiResponse localVarResponse = getAlertLogWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<UserAlertMonitorLog> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlertLogWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlertLogRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAlertLog", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAlertLogRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAlertLog"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ListAlertLogs200Response + * @throws ApiException if fails to make API call + */ + public ListAlertLogs200Response listAlertLogs(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listAlertLogsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ListAlertLogs200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAlertLogsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAlertLogsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAlertLogs", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAlertLogsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return UserAlertMonitorLog + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorLog listAlertLogsForAlert(String id) throws ApiException { + ApiResponse localVarResponse = listAlertLogsForAlertWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<UserAlertMonitorLog> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAlertLogsForAlertWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAlertLogsForAlertRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAlertLogsForAlert", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAlertLogsForAlertRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling listAlertLogsForAlert"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/{id}/list/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return UserAlertMonitorMetricOptionsResponse + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorMetricOptionsResponse listAlertMetricOptions(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listAlertMetricOptionsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<UserAlertMonitorMetricOptionsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAlertMetricOptionsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAlertMetricOptionsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAlertMetricOptions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAlertMetricOptionsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/metric-options/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ListAlerts200Response + * @throws ApiException if fails to make API call + */ + public ListAlerts200Response listAlerts(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listAlertsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ListAlerts200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAlertsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAlertsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAlerts", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAlertsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ListAlertLogs200Response + * @throws ApiException if fails to make API call + */ + public ListAlertLogs200Response listAllAlertLogs(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listAllAlertLogsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ListAlertLogs200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAllAlertLogsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAllAlertLogsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAllAlertLogs", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAllAlertLogsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/all/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. Accepts monitor configuration in the request body. + * @param userAlertMonitor (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor previewAlertGraph(UserAlertMonitor userAlertMonitor) throws ApiException { + ApiResponse localVarResponse = previewAlertGraphWithHttpInfo(userAlertMonitor); + return localVarResponse.getData(); + } + + /** + * + * Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. Accepts monitor configuration in the request body. + * @param userAlertMonitor (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse previewAlertGraphWithHttpInfo(UserAlertMonitor userAlertMonitor) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = previewAlertGraphRequestBuilder(userAlertMonitor); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("previewAlertGraph", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder previewAlertGraphRequestBuilder(UserAlertMonitor userAlertMonitor) throws ApiException { + // verify the required parameter 'userAlertMonitor' is set + if (userAlertMonitor == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitor' when calling previewAlertGraph"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/preview-graph/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitor); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param userAlertMonitorLog (required) + * @return UserAlertMonitorLog + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorLog resolveAlertLogs(UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + ApiResponse localVarResponse = resolveAlertLogsWithHttpInfo(userAlertMonitorLog); + return localVarResponse.getData(); + } + + /** + * + * + * @param userAlertMonitorLog (required) + * @return ApiResponse<UserAlertMonitorLog> + * @throws ApiException if fails to make API call + */ + public ApiResponse resolveAlertLogsWithHttpInfo(UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = resolveAlertLogsRequestBuilder(userAlertMonitorLog); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("resolveAlertLogs", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder resolveAlertLogsRequestBuilder(UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + // verify the required parameter 'userAlertMonitorLog' is set + if (userAlertMonitorLog == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitorLog' when calling resolveAlertLogs"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/resolve/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitorLog); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param userAlertMonitor (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor updateAlert(String id, UserAlertMonitor userAlertMonitor) throws ApiException { + ApiResponse localVarResponse = updateAlertWithHttpInfo(id, userAlertMonitor); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param userAlertMonitor (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateAlertWithHttpInfo(String id, UserAlertMonitor userAlertMonitor) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateAlertRequestBuilder(id, userAlertMonitor); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateAlert", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateAlertRequestBuilder(String id, UserAlertMonitor userAlertMonitor) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateAlert"); + } + // verify the required parameter 'userAlertMonitor' is set + if (userAlertMonitor == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitor' when calling updateAlert"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitor); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueDiscussionApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueDiscussionApi.java new file mode 100644 index 0000000..321d049 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueDiscussionApi.java @@ -0,0 +1,615 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ApiTextErrorResponse; +import com.futureagi.sdk.model.DiscussionCommentRequest; +import com.futureagi.sdk.model.DiscussionReactionRequest; +import com.futureagi.sdk.model.DiscussionThreadStatusRequest; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.QueueDiscussionResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationQueueDiscussionApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public AnnotationQueueDiscussionApi() { + this(Configuration.getDefaultApiClient()); + } + + public AnnotationQueueDiscussionApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * List or create non-blocking discussion comments for a queue item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param discussionCommentRequest (required) + * @return QueueDiscussionResponse + * @throws ApiException if fails to make API call + */ + public QueueDiscussionResponse createAnnotationQueueItemComment(String queueId, UUID id, DiscussionCommentRequest discussionCommentRequest) throws ApiException { + ApiResponse localVarResponse = createAnnotationQueueItemCommentWithHttpInfo(queueId, id, discussionCommentRequest); + return localVarResponse.getData(); + } + + /** + * + * List or create non-blocking discussion comments for a queue item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param discussionCommentRequest (required) + * @return ApiResponse<QueueDiscussionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createAnnotationQueueItemCommentWithHttpInfo(String queueId, UUID id, DiscussionCommentRequest discussionCommentRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createAnnotationQueueItemCommentRequestBuilder(queueId, id, discussionCommentRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createAnnotationQueueItemComment", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createAnnotationQueueItemCommentRequestBuilder(String queueId, UUID id, DiscussionCommentRequest discussionCommentRequest) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling createAnnotationQueueItemComment"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling createAnnotationQueueItemComment"); + } + // verify the required parameter 'discussionCommentRequest' is set + if (discussionCommentRequest == null) { + throw new ApiException(400, "Missing the required parameter 'discussionCommentRequest' when calling createAnnotationQueueItemComment"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(discussionCommentRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List or create non-blocking discussion comments for a queue item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @return QueueDiscussionResponse + * @throws ApiException if fails to make API call + */ + public QueueDiscussionResponse listAnnotationQueueItemDiscussion(String queueId, UUID id) throws ApiException { + ApiResponse localVarResponse = listAnnotationQueueItemDiscussionWithHttpInfo(queueId, id); + return localVarResponse.getData(); + } + + /** + * + * List or create non-blocking discussion comments for a queue item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @return ApiResponse<QueueDiscussionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAnnotationQueueItemDiscussionWithHttpInfo(String queueId, UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAnnotationQueueItemDiscussionRequestBuilder(queueId, id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAnnotationQueueItemDiscussion", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAnnotationQueueItemDiscussionRequestBuilder(String queueId, UUID id) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling listAnnotationQueueItemDiscussion"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling listAnnotationQueueItemDiscussion"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param threadId (required) + * @param discussionThreadStatusRequest (required) + * @return QueueDiscussionResponse + * @throws ApiException if fails to make API call + */ + public QueueDiscussionResponse reopenAnnotationQueueItemThread(String queueId, UUID id, String threadId, DiscussionThreadStatusRequest discussionThreadStatusRequest) throws ApiException { + ApiResponse localVarResponse = reopenAnnotationQueueItemThreadWithHttpInfo(queueId, id, threadId, discussionThreadStatusRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param threadId (required) + * @param discussionThreadStatusRequest (required) + * @return ApiResponse<QueueDiscussionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse reopenAnnotationQueueItemThreadWithHttpInfo(String queueId, UUID id, String threadId, DiscussionThreadStatusRequest discussionThreadStatusRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = reopenAnnotationQueueItemThreadRequestBuilder(queueId, id, threadId, discussionThreadStatusRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("reopenAnnotationQueueItemThread", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder reopenAnnotationQueueItemThreadRequestBuilder(String queueId, UUID id, String threadId, DiscussionThreadStatusRequest discussionThreadStatusRequest) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling reopenAnnotationQueueItemThread"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling reopenAnnotationQueueItemThread"); + } + // verify the required parameter 'threadId' is set + if (threadId == null) { + throw new ApiException(400, "Missing the required parameter 'threadId' when calling reopenAnnotationQueueItemThread"); + } + // verify the required parameter 'discussionThreadStatusRequest' is set + if (discussionThreadStatusRequest == null) { + throw new ApiException(400, "Missing the required parameter 'discussionThreadStatusRequest' when calling reopenAnnotationQueueItemThread"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())) + .replace("{thread_id}", ApiClient.urlEncode(threadId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(discussionThreadStatusRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param threadId (required) + * @param discussionThreadStatusRequest (required) + * @return QueueDiscussionResponse + * @throws ApiException if fails to make API call + */ + public QueueDiscussionResponse resolveAnnotationQueueItemThread(String queueId, UUID id, String threadId, DiscussionThreadStatusRequest discussionThreadStatusRequest) throws ApiException { + ApiResponse localVarResponse = resolveAnnotationQueueItemThreadWithHttpInfo(queueId, id, threadId, discussionThreadStatusRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param threadId (required) + * @param discussionThreadStatusRequest (required) + * @return ApiResponse<QueueDiscussionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse resolveAnnotationQueueItemThreadWithHttpInfo(String queueId, UUID id, String threadId, DiscussionThreadStatusRequest discussionThreadStatusRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = resolveAnnotationQueueItemThreadRequestBuilder(queueId, id, threadId, discussionThreadStatusRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("resolveAnnotationQueueItemThread", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder resolveAnnotationQueueItemThreadRequestBuilder(String queueId, UUID id, String threadId, DiscussionThreadStatusRequest discussionThreadStatusRequest) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling resolveAnnotationQueueItemThread"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling resolveAnnotationQueueItemThread"); + } + // verify the required parameter 'threadId' is set + if (threadId == null) { + throw new ApiException(400, "Missing the required parameter 'threadId' when calling resolveAnnotationQueueItemThread"); + } + // verify the required parameter 'discussionThreadStatusRequest' is set + if (discussionThreadStatusRequest == null) { + throw new ApiException(400, "Missing the required parameter 'discussionThreadStatusRequest' when calling resolveAnnotationQueueItemThread"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())) + .replace("{thread_id}", ApiClient.urlEncode(threadId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(discussionThreadStatusRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Toggle the current user's reaction on a discussion comment. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param commentId (required) + * @param discussionReactionRequest (required) + * @return QueueDiscussionResponse + * @throws ApiException if fails to make API call + */ + public QueueDiscussionResponse toggleAnnotationQueueItemCommentReaction(String queueId, UUID id, String commentId, DiscussionReactionRequest discussionReactionRequest) throws ApiException { + ApiResponse localVarResponse = toggleAnnotationQueueItemCommentReactionWithHttpInfo(queueId, id, commentId, discussionReactionRequest); + return localVarResponse.getData(); + } + + /** + * + * Toggle the current user's reaction on a discussion comment. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param commentId (required) + * @param discussionReactionRequest (required) + * @return ApiResponse<QueueDiscussionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse toggleAnnotationQueueItemCommentReactionWithHttpInfo(String queueId, UUID id, String commentId, DiscussionReactionRequest discussionReactionRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = toggleAnnotationQueueItemCommentReactionRequestBuilder(queueId, id, commentId, discussionReactionRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("toggleAnnotationQueueItemCommentReaction", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder toggleAnnotationQueueItemCommentReactionRequestBuilder(String queueId, UUID id, String commentId, DiscussionReactionRequest discussionReactionRequest) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling toggleAnnotationQueueItemCommentReaction"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling toggleAnnotationQueueItemCommentReaction"); + } + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException(400, "Missing the required parameter 'commentId' when calling toggleAnnotationQueueItemCommentReaction"); + } + // verify the required parameter 'discussionReactionRequest' is set + if (discussionReactionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'discussionReactionRequest' when calling toggleAnnotationQueueItemCommentReaction"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())) + .replace("{comment_id}", ApiClient.urlEncode(commentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(discussionReactionRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueItemsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueItemsApi.java new file mode 100644 index 0000000..8d754b7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueItemsApi.java @@ -0,0 +1,1389 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AddItems; +import com.futureagi.sdk.model.ApiSelectionTooLargeError; +import com.futureagi.sdk.model.ApiTextErrorResponse; +import com.futureagi.sdk.model.AssignItems; +import com.futureagi.sdk.model.BulkRemoveItems; +import com.futureagi.sdk.model.ImportAnnotations; +import com.futureagi.sdk.model.ListAnnotationQueueItems200Response; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.QueueAddItemsResponse; +import com.futureagi.sdk.model.QueueAnnotateDetailResponse; +import com.futureagi.sdk.model.QueueAssignItemsResponse; +import com.futureagi.sdk.model.QueueBulkRemoveItemsResponse; +import com.futureagi.sdk.model.QueueImportAnnotationsResponse; +import com.futureagi.sdk.model.QueueItemAnnotationsResponse; +import com.futureagi.sdk.model.QueueItemNavigationRequest; +import com.futureagi.sdk.model.QueueNavigationResponse; +import com.futureagi.sdk.model.QueueNextItemResponse; +import com.futureagi.sdk.model.QueueReleaseReservationResponse; +import com.futureagi.sdk.model.QueueSubmitAnnotationsResponse; +import com.futureagi.sdk.model.SubmitAnnotations; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationQueueItemsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public AnnotationQueueItemsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AnnotationQueueItemsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @param queueId (required) + * @param addItems (required) + * @return QueueAddItemsResponse + * @throws ApiException if fails to make API call + */ + public QueueAddItemsResponse addAnnotationQueueItems(String queueId, AddItems addItems) throws ApiException { + ApiResponse localVarResponse = addAnnotationQueueItemsWithHttpInfo(queueId, addItems); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param addItems (required) + * @return ApiResponse<QueueAddItemsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse addAnnotationQueueItemsWithHttpInfo(String queueId, AddItems addItems) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = addAnnotationQueueItemsRequestBuilder(queueId, addItems); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("addAnnotationQueueItems", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder addAnnotationQueueItemsRequestBuilder(String queueId, AddItems addItems) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling addAnnotationQueueItems"); + } + // verify the required parameter 'addItems' is set + if (addItems == null) { + throw new ApiException(400, "Missing the required parameter 'addItems' when calling addAnnotationQueueItems"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/add-items/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(addItems); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Assign items to one or more annotators. + * @param queueId (required) + * @param assignItems (required) + * @return QueueAssignItemsResponse + * @throws ApiException if fails to make API call + */ + public QueueAssignItemsResponse assignAnnotationQueueItems(String queueId, AssignItems assignItems) throws ApiException { + ApiResponse localVarResponse = assignAnnotationQueueItemsWithHttpInfo(queueId, assignItems); + return localVarResponse.getData(); + } + + /** + * + * Assign items to one or more annotators. + * @param queueId (required) + * @param assignItems (required) + * @return ApiResponse<QueueAssignItemsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse assignAnnotationQueueItemsWithHttpInfo(String queueId, AssignItems assignItems) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = assignAnnotationQueueItemsRequestBuilder(queueId, assignItems); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("assignAnnotationQueueItems", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder assignAnnotationQueueItemsRequestBuilder(String queueId, AssignItems assignItems) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling assignAnnotationQueueItems"); + } + // verify the required parameter 'assignItems' is set + if (assignItems == null) { + throw new ApiException(400, "Missing the required parameter 'assignItems' when calling assignAnnotationQueueItems"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/assign/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assignItems); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Mark item as completed and return next pending item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItemNavigationRequest (required) + * @return QueueNavigationResponse + * @throws ApiException if fails to make API call + */ + public QueueNavigationResponse completeAnnotationQueueItem(String queueId, UUID id, QueueItemNavigationRequest queueItemNavigationRequest) throws ApiException { + ApiResponse localVarResponse = completeAnnotationQueueItemWithHttpInfo(queueId, id, queueItemNavigationRequest); + return localVarResponse.getData(); + } + + /** + * + * Mark item as completed and return next pending item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItemNavigationRequest (required) + * @return ApiResponse<QueueNavigationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse completeAnnotationQueueItemWithHttpInfo(String queueId, UUID id, QueueItemNavigationRequest queueItemNavigationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = completeAnnotationQueueItemRequestBuilder(queueId, id, queueItemNavigationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("completeAnnotationQueueItem", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder completeAnnotationQueueItemRequestBuilder(String queueId, UUID id, QueueItemNavigationRequest queueItemNavigationRequest) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling completeAnnotationQueueItem"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling completeAnnotationQueueItem"); + } + // verify the required parameter 'queueItemNavigationRequest' is set + if (queueItemNavigationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueItemNavigationRequest' when calling completeAnnotationQueueItem"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/complete/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueItemNavigationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get full annotation workspace data for an item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param annotatorId (optional) + * @param includeCompleted (optional) + * @param viewMode (optional) + * @param reviewStatus (optional) + * @param excludeReviewStatus (optional) + * @param includeAllAnnotations (optional) + * @param reserve (optional) + * @return QueueAnnotateDetailResponse + * @throws ApiException if fails to make API call + */ + public QueueAnnotateDetailResponse getAnnotationQueueItemDetail(String queueId, UUID id, UUID annotatorId, Boolean includeCompleted, String viewMode, String reviewStatus, String excludeReviewStatus, Boolean includeAllAnnotations, Boolean reserve) throws ApiException { + ApiResponse localVarResponse = getAnnotationQueueItemDetailWithHttpInfo(queueId, id, annotatorId, includeCompleted, viewMode, reviewStatus, excludeReviewStatus, includeAllAnnotations, reserve); + return localVarResponse.getData(); + } + + /** + * + * Get full annotation workspace data for an item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param annotatorId (optional) + * @param includeCompleted (optional) + * @param viewMode (optional) + * @param reviewStatus (optional) + * @param excludeReviewStatus (optional) + * @param includeAllAnnotations (optional) + * @param reserve (optional) + * @return ApiResponse<QueueAnnotateDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAnnotationQueueItemDetailWithHttpInfo(String queueId, UUID id, UUID annotatorId, Boolean includeCompleted, String viewMode, String reviewStatus, String excludeReviewStatus, Boolean includeAllAnnotations, Boolean reserve) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAnnotationQueueItemDetailRequestBuilder(queueId, id, annotatorId, includeCompleted, viewMode, reviewStatus, excludeReviewStatus, includeAllAnnotations, reserve); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAnnotationQueueItemDetail", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAnnotationQueueItemDetailRequestBuilder(String queueId, UUID id, UUID annotatorId, Boolean includeCompleted, String viewMode, String reviewStatus, String excludeReviewStatus, Boolean includeAllAnnotations, Boolean reserve) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling getAnnotationQueueItemDetail"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAnnotationQueueItemDetail"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "annotator_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("annotator_id", annotatorId)); + localVarQueryParameterBaseName = "include_completed"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include_completed", includeCompleted)); + localVarQueryParameterBaseName = "view_mode"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("view_mode", viewMode)); + localVarQueryParameterBaseName = "review_status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("review_status", reviewStatus)); + localVarQueryParameterBaseName = "exclude_review_status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("exclude_review_status", excludeReviewStatus)); + localVarQueryParameterBaseName = "include_all_annotations"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include_all_annotations", includeAllAnnotations)); + localVarQueryParameterBaseName = "reserve"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("reserve", reserve)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get the next or previous item in the queue. + * Query params: exclude: comma-separated item IDs to skip before: item ID — returns the item immediately before this one in order review_status: optional review status filter (for reviewer queues) exclude_review_status: optional review status to omit (for annotator queues) include_completed: when true, navigation can visit completed items too + * @param queueId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param exclude (optional) + * @param before (optional) + * @param reviewStatus (optional) + * @param excludeReviewStatus (optional) + * @param includeCompleted (optional) + * @param viewMode (optional) + * @param includeAllAnnotations (optional) + * @return QueueNextItemResponse + * @throws ApiException if fails to make API call + */ + public QueueNextItemResponse getNextAnnotationQueueItem(String queueId, Integer page, Integer limit, String exclude, UUID before, String reviewStatus, String excludeReviewStatus, Boolean includeCompleted, String viewMode, Boolean includeAllAnnotations) throws ApiException { + ApiResponse localVarResponse = getNextAnnotationQueueItemWithHttpInfo(queueId, page, limit, exclude, before, reviewStatus, excludeReviewStatus, includeCompleted, viewMode, includeAllAnnotations); + return localVarResponse.getData(); + } + + /** + * Get the next or previous item in the queue. + * Query params: exclude: comma-separated item IDs to skip before: item ID — returns the item immediately before this one in order review_status: optional review status filter (for reviewer queues) exclude_review_status: optional review status to omit (for annotator queues) include_completed: when true, navigation can visit completed items too + * @param queueId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param exclude (optional) + * @param before (optional) + * @param reviewStatus (optional) + * @param excludeReviewStatus (optional) + * @param includeCompleted (optional) + * @param viewMode (optional) + * @param includeAllAnnotations (optional) + * @return ApiResponse<QueueNextItemResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getNextAnnotationQueueItemWithHttpInfo(String queueId, Integer page, Integer limit, String exclude, UUID before, String reviewStatus, String excludeReviewStatus, Boolean includeCompleted, String viewMode, Boolean includeAllAnnotations) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNextAnnotationQueueItemRequestBuilder(queueId, page, limit, exclude, before, reviewStatus, excludeReviewStatus, includeCompleted, viewMode, includeAllAnnotations); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getNextAnnotationQueueItem", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getNextAnnotationQueueItemRequestBuilder(String queueId, Integer page, Integer limit, String exclude, UUID before, String reviewStatus, String excludeReviewStatus, Boolean includeCompleted, String viewMode, Boolean includeAllAnnotations) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling getNextAnnotationQueueItem"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/next-item/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "exclude"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("exclude", exclude)); + localVarQueryParameterBaseName = "before"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("before", before)); + localVarQueryParameterBaseName = "review_status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("review_status", reviewStatus)); + localVarQueryParameterBaseName = "exclude_review_status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("exclude_review_status", excludeReviewStatus)); + localVarQueryParameterBaseName = "include_completed"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include_completed", includeCompleted)); + localVarQueryParameterBaseName = "view_mode"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("view_mode", viewMode)); + localVarQueryParameterBaseName = "include_all_annotations"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include_all_annotations", includeAllAnnotations)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Import annotations from external sources. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param importAnnotations (required) + * @return QueueImportAnnotationsResponse + * @throws ApiException if fails to make API call + */ + public QueueImportAnnotationsResponse importAnnotationQueueItemAnnotations(String queueId, UUID id, ImportAnnotations importAnnotations) throws ApiException { + ApiResponse localVarResponse = importAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id, importAnnotations); + return localVarResponse.getData(); + } + + /** + * + * Import annotations from external sources. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param importAnnotations (required) + * @return ApiResponse<QueueImportAnnotationsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse importAnnotationQueueItemAnnotationsWithHttpInfo(String queueId, UUID id, ImportAnnotations importAnnotations) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = importAnnotationQueueItemAnnotationsRequestBuilder(queueId, id, importAnnotations); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("importAnnotationQueueItemAnnotations", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder importAnnotationQueueItemAnnotationsRequestBuilder(String queueId, UUID id, ImportAnnotations importAnnotations) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling importAnnotationQueueItemAnnotations"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling importAnnotationQueueItemAnnotations"); + } + // verify the required parameter 'importAnnotations' is set + if (importAnnotations == null) { + throw new ApiException(400, "Missing the required parameter 'importAnnotations' when calling importAnnotationQueueItemAnnotations"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(importAnnotations); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List all annotations for a queue item (across all annotators). + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @return QueueItemAnnotationsResponse + * @throws ApiException if fails to make API call + */ + public QueueItemAnnotationsResponse listAnnotationQueueItemAnnotations(String queueId, UUID id) throws ApiException { + ApiResponse localVarResponse = listAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id); + return localVarResponse.getData(); + } + + /** + * + * List all annotations for a queue item (across all annotators). + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @return ApiResponse<QueueItemAnnotationsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAnnotationQueueItemAnnotationsWithHttpInfo(String queueId, UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAnnotationQueueItemAnnotationsRequestBuilder(queueId, id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAnnotationQueueItemAnnotations", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAnnotationQueueItemAnnotationsRequestBuilder(String queueId, UUID id) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling listAnnotationQueueItemAnnotations"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling listAnnotationQueueItemAnnotations"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param status (optional) + * @param sourceType (optional) + * @param assignedTo (optional) + * @param reviewStatus (optional) + * @param ordering (optional) + * @return ListAnnotationQueueItems200Response + * @throws ApiException if fails to make API call + */ + public ListAnnotationQueueItems200Response listAnnotationQueueItems(String queueId, Integer page, Integer limit, List status, List sourceType, String assignedTo, String reviewStatus, String ordering) throws ApiException { + ApiResponse localVarResponse = listAnnotationQueueItemsWithHttpInfo(queueId, page, limit, status, sourceType, assignedTo, reviewStatus, ordering); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param status (optional) + * @param sourceType (optional) + * @param assignedTo (optional) + * @param reviewStatus (optional) + * @param ordering (optional) + * @return ApiResponse<ListAnnotationQueueItems200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAnnotationQueueItemsWithHttpInfo(String queueId, Integer page, Integer limit, List status, List sourceType, String assignedTo, String reviewStatus, String ordering) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAnnotationQueueItemsRequestBuilder(queueId, page, limit, status, sourceType, assignedTo, reviewStatus, ordering); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAnnotationQueueItems", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAnnotationQueueItemsRequestBuilder(String queueId, Integer page, Integer limit, List status, List sourceType, String assignedTo, String reviewStatus, String ordering) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling listAnnotationQueueItems"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "status", status)); + localVarQueryParameterBaseName = "source_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "source_type", sourceType)); + localVarQueryParameterBaseName = "assigned_to"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("assigned_to", assignedTo)); + localVarQueryParameterBaseName = "review_status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("review_status", reviewStatus)); + localVarQueryParameterBaseName = "ordering"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("ordering", ordering)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Release reservation on an item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param body (required) + * @return QueueReleaseReservationResponse + * @throws ApiException if fails to make API call + */ + public QueueReleaseReservationResponse releaseAnnotationQueueItem(String queueId, UUID id, Object body) throws ApiException { + ApiResponse localVarResponse = releaseAnnotationQueueItemWithHttpInfo(queueId, id, body); + return localVarResponse.getData(); + } + + /** + * + * Release reservation on an item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param body (required) + * @return ApiResponse<QueueReleaseReservationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse releaseAnnotationQueueItemWithHttpInfo(String queueId, UUID id, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = releaseAnnotationQueueItemRequestBuilder(queueId, id, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("releaseAnnotationQueueItem", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder releaseAnnotationQueueItemRequestBuilder(String queueId, UUID id, Object body) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling releaseAnnotationQueueItem"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling releaseAnnotationQueueItem"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling releaseAnnotationQueueItem"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/release/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param bulkRemoveItems (required) + * @return QueueBulkRemoveItemsResponse + * @throws ApiException if fails to make API call + */ + public QueueBulkRemoveItemsResponse removeAnnotationQueueItems(String queueId, BulkRemoveItems bulkRemoveItems) throws ApiException { + ApiResponse localVarResponse = removeAnnotationQueueItemsWithHttpInfo(queueId, bulkRemoveItems); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param bulkRemoveItems (required) + * @return ApiResponse<QueueBulkRemoveItemsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse removeAnnotationQueueItemsWithHttpInfo(String queueId, BulkRemoveItems bulkRemoveItems) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = removeAnnotationQueueItemsRequestBuilder(queueId, bulkRemoveItems); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("removeAnnotationQueueItems", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder removeAnnotationQueueItemsRequestBuilder(String queueId, BulkRemoveItems bulkRemoveItems) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling removeAnnotationQueueItems"); + } + // verify the required parameter 'bulkRemoveItems' is set + if (bulkRemoveItems == null) { + throw new ApiException(400, "Missing the required parameter 'bulkRemoveItems' when calling removeAnnotationQueueItems"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/bulk-remove/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkRemoveItems); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Mark item as skipped and return next pending item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItemNavigationRequest (required) + * @return QueueNavigationResponse + * @throws ApiException if fails to make API call + */ + public QueueNavigationResponse skipAnnotationQueueItem(String queueId, UUID id, QueueItemNavigationRequest queueItemNavigationRequest) throws ApiException { + ApiResponse localVarResponse = skipAnnotationQueueItemWithHttpInfo(queueId, id, queueItemNavigationRequest); + return localVarResponse.getData(); + } + + /** + * + * Mark item as skipped and return next pending item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItemNavigationRequest (required) + * @return ApiResponse<QueueNavigationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse skipAnnotationQueueItemWithHttpInfo(String queueId, UUID id, QueueItemNavigationRequest queueItemNavigationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = skipAnnotationQueueItemRequestBuilder(queueId, id, queueItemNavigationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("skipAnnotationQueueItem", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder skipAnnotationQueueItemRequestBuilder(String queueId, UUID id, QueueItemNavigationRequest queueItemNavigationRequest) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling skipAnnotationQueueItem"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling skipAnnotationQueueItem"); + } + // verify the required parameter 'queueItemNavigationRequest' is set + if (queueItemNavigationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueItemNavigationRequest' when calling skipAnnotationQueueItem"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/skip/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueItemNavigationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Submit or update annotations for a queue item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param submitAnnotations (required) + * @return QueueSubmitAnnotationsResponse + * @throws ApiException if fails to make API call + */ + public QueueSubmitAnnotationsResponse submitAnnotationQueueItemAnnotations(String queueId, UUID id, SubmitAnnotations submitAnnotations) throws ApiException { + ApiResponse localVarResponse = submitAnnotationQueueItemAnnotationsWithHttpInfo(queueId, id, submitAnnotations); + return localVarResponse.getData(); + } + + /** + * + * Submit or update annotations for a queue item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param submitAnnotations (required) + * @return ApiResponse<QueueSubmitAnnotationsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse submitAnnotationQueueItemAnnotationsWithHttpInfo(String queueId, UUID id, SubmitAnnotations submitAnnotations) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = submitAnnotationQueueItemAnnotationsRequestBuilder(queueId, id, submitAnnotations); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("submitAnnotationQueueItemAnnotations", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder submitAnnotationQueueItemAnnotationsRequestBuilder(String queueId, UUID id, SubmitAnnotations submitAnnotations) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling submitAnnotationQueueItemAnnotations"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling submitAnnotationQueueItemAnnotations"); + } + // verify the required parameter 'submitAnnotations' is set + if (submitAnnotations == null) { + throw new ApiException(400, "Missing the required parameter 'submitAnnotations' when calling submitAnnotationQueueItemAnnotations"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(submitAnnotations); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueReviewApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueReviewApi.java new file mode 100644 index 0000000..27b9c4b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueueReviewApi.java @@ -0,0 +1,192 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ApiTextErrorResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.QueueReviewItemResponse; +import com.futureagi.sdk.model.ReviewItemRequest; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationQueueReviewApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public AnnotationQueueReviewApi() { + this(Configuration.getDefaultApiClient()); + } + + public AnnotationQueueReviewApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * Approve, request changes, or leave reviewer feedback on an item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param reviewItemRequest (required) + * @return QueueReviewItemResponse + * @throws ApiException if fails to make API call + */ + public QueueReviewItemResponse reviewAnnotationQueueItem(String queueId, UUID id, ReviewItemRequest reviewItemRequest) throws ApiException { + ApiResponse localVarResponse = reviewAnnotationQueueItemWithHttpInfo(queueId, id, reviewItemRequest); + return localVarResponse.getData(); + } + + /** + * + * Approve, request changes, or leave reviewer feedback on an item. + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param reviewItemRequest (required) + * @return ApiResponse<QueueReviewItemResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse reviewAnnotationQueueItemWithHttpInfo(String queueId, UUID id, ReviewItemRequest reviewItemRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = reviewAnnotationQueueItemRequestBuilder(queueId, id, reviewItemRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("reviewAnnotationQueueItem", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder reviewAnnotationQueueItemRequestBuilder(String queueId, UUID id, ReviewItemRequest reviewItemRequest) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling reviewAnnotationQueueItem"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling reviewAnnotationQueueItem"); + } + // verify the required parameter 'reviewItemRequest' is set + if (reviewItemRequest == null) { + throw new ApiException(400, "Missing the required parameter 'reviewItemRequest' when calling reviewAnnotationQueueItem"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/review/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(reviewItemRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueuesApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueuesApi.java new file mode 100644 index 0000000..c41be9e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/AnnotationQueuesApi.java @@ -0,0 +1,1381 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AnnotationQueue; +import com.futureagi.sdk.model.ApiTextErrorResponse; +import com.futureagi.sdk.model.ListAnnotationQueues200Response; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.QueueAddLabelResponse; +import com.futureagi.sdk.model.QueueAgreementResponse; +import com.futureagi.sdk.model.QueueAnalyticsResponse; +import com.futureagi.sdk.model.QueueExportAnnotationsResponse; +import com.futureagi.sdk.model.QueueExportFieldsResponse; +import com.futureagi.sdk.model.QueueExportToDatasetRequest; +import com.futureagi.sdk.model.QueueExportToDatasetResponse; +import com.futureagi.sdk.model.QueueLabelRequest; +import com.futureagi.sdk.model.QueueProgressResponse; +import com.futureagi.sdk.model.QueueRemoveLabelResponse; +import com.futureagi.sdk.model.QueueStatusRequest; +import com.futureagi.sdk.model.QueueStatusResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationQueuesApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public AnnotationQueuesApi() { + this(Configuration.getDefaultApiClient()); + } + + public AnnotationQueuesApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * Add a label to an annotation queue. Labels apply to all sources in the queue's project (for default queues). Queue items are created lazily when someone actually annotates. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueLabelRequest (required) + * @return QueueAddLabelResponse + * @throws ApiException if fails to make API call + */ + public QueueAddLabelResponse addAnnotationQueueLabel(UUID id, QueueLabelRequest queueLabelRequest) throws ApiException { + ApiResponse localVarResponse = addAnnotationQueueLabelWithHttpInfo(id, queueLabelRequest); + return localVarResponse.getData(); + } + + /** + * + * Add a label to an annotation queue. Labels apply to all sources in the queue's project (for default queues). Queue items are created lazily when someone actually annotates. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueLabelRequest (required) + * @return ApiResponse<QueueAddLabelResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse addAnnotationQueueLabelWithHttpInfo(UUID id, QueueLabelRequest queueLabelRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = addAnnotationQueueLabelRequestBuilder(id, queueLabelRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("addAnnotationQueueLabel", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder addAnnotationQueueLabelRequestBuilder(UUID id, QueueLabelRequest queueLabelRequest) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling addAnnotationQueueLabel"); + } + // verify the required parameter 'queueLabelRequest' is set + if (queueLabelRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueLabelRequest' when calling addAnnotationQueueLabel"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/add-label/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueLabelRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Archive a queue (soft delete). + * ``BaseModel.delete()`` flips ``deleted=True`` instead of removing the row. Attached automation rules go dormant (the scheduler filters ``queue__deleted=False``), items stay invisible but recoverable, label bindings preserved. For truly destructive removal, use the ``hard-delete`` action below. + * @param id A UUID string identifying this annotation queue. (required) + * @throws ApiException if fails to make API call + */ + public void archiveAnnotationQueue(UUID id) throws ApiException { + archiveAnnotationQueueWithHttpInfo(id); + } + + /** + * Archive a queue (soft delete). + * ``BaseModel.delete()`` flips ``deleted=True`` instead of removing the row. Attached automation rules go dormant (the scheduler filters ``queue__deleted=False``), items stay invisible but recoverable, label bindings preserved. For truly destructive removal, use the ``hard-delete`` action below. + * @param id A UUID string identifying this annotation queue. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse archiveAnnotationQueueWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = archiveAnnotationQueueRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("archiveAnnotationQueue", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder archiveAnnotationQueueRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling archiveAnnotationQueue"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param annotationQueue (required) + * @return AnnotationQueue + * @throws ApiException if fails to make API call + */ + public AnnotationQueue createAnnotationQueue(AnnotationQueue annotationQueue) throws ApiException { + ApiResponse localVarResponse = createAnnotationQueueWithHttpInfo(annotationQueue); + return localVarResponse.getData(); + } + + /** + * + * + * @param annotationQueue (required) + * @return ApiResponse<AnnotationQueue> + * @throws ApiException if fails to make API call + */ + public ApiResponse createAnnotationQueueWithHttpInfo(AnnotationQueue annotationQueue) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createAnnotationQueueRequestBuilder(annotationQueue); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createAnnotationQueue", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createAnnotationQueueRequestBuilder(AnnotationQueue annotationQueue) throws ApiException { + // verify the required parameter 'annotationQueue' is set + if (annotationQueue == null) { + throw new ApiException(400, "Missing the required parameter 'annotationQueue' when calling createAnnotationQueue"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(annotationQueue); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Export all items with their annotations. + * @param id A UUID string identifying this annotation queue. (required) + * @param exportFormat (optional) + * @param status (optional) + * @return QueueExportAnnotationsResponse + * @throws ApiException if fails to make API call + */ + public QueueExportAnnotationsResponse exportAnnotationQueue(UUID id, String exportFormat, String status) throws ApiException { + ApiResponse localVarResponse = exportAnnotationQueueWithHttpInfo(id, exportFormat, status); + return localVarResponse.getData(); + } + + /** + * + * Export all items with their annotations. + * @param id A UUID string identifying this annotation queue. (required) + * @param exportFormat (optional) + * @param status (optional) + * @return ApiResponse<QueueExportAnnotationsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse exportAnnotationQueueWithHttpInfo(UUID id, String exportFormat, String status) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = exportAnnotationQueueRequestBuilder(id, exportFormat, status); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("exportAnnotationQueue", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder exportAnnotationQueueRequestBuilder(UUID id, String exportFormat, String status) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling exportAnnotationQueue"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/export/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "export_format"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("export_format", exportFormat)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Export queue items to a dataset using a user-editable column mapping. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueExportToDatasetRequest (required) + * @return QueueExportToDatasetResponse + * @throws ApiException if fails to make API call + */ + public QueueExportToDatasetResponse exportAnnotationQueueToDataset(UUID id, QueueExportToDatasetRequest queueExportToDatasetRequest) throws ApiException { + ApiResponse localVarResponse = exportAnnotationQueueToDatasetWithHttpInfo(id, queueExportToDatasetRequest); + return localVarResponse.getData(); + } + + /** + * + * Export queue items to a dataset using a user-editable column mapping. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueExportToDatasetRequest (required) + * @return ApiResponse<QueueExportToDatasetResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse exportAnnotationQueueToDatasetWithHttpInfo(UUID id, QueueExportToDatasetRequest queueExportToDatasetRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = exportAnnotationQueueToDatasetRequestBuilder(id, queueExportToDatasetRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("exportAnnotationQueueToDataset", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder exportAnnotationQueueToDatasetRequestBuilder(UUID id, QueueExportToDatasetRequest queueExportToDatasetRequest) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling exportAnnotationQueueToDataset"); + } + // verify the required parameter 'queueExportToDatasetRequest' is set + if (queueExportToDatasetRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueExportToDatasetRequest' when calling exportAnnotationQueueToDataset"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/export-to-dataset/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueExportToDatasetRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @return AnnotationQueue + * @throws ApiException if fails to make API call + */ + public AnnotationQueue getAnnotationQueue(UUID id) throws ApiException { + ApiResponse localVarResponse = getAnnotationQueueWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @return ApiResponse<AnnotationQueue> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAnnotationQueueWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAnnotationQueueRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAnnotationQueue", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAnnotationQueueRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAnnotationQueue"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Calculate inter-annotator agreement metrics. + * @param id A UUID string identifying this annotation queue. (required) + * @return QueueAgreementResponse + * @throws ApiException if fails to make API call + */ + public QueueAgreementResponse getAnnotationQueueAgreement(UUID id) throws ApiException { + ApiResponse localVarResponse = getAnnotationQueueAgreementWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Calculate inter-annotator agreement metrics. + * @param id A UUID string identifying this annotation queue. (required) + * @return ApiResponse<QueueAgreementResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAnnotationQueueAgreementWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAnnotationQueueAgreementRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAnnotationQueueAgreement", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAnnotationQueueAgreementRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAnnotationQueueAgreement"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/agreement/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Queue analytics: throughput, annotator performance, label distribution. + * @param id A UUID string identifying this annotation queue. (required) + * @return QueueAnalyticsResponse + * @throws ApiException if fails to make API call + */ + public QueueAnalyticsResponse getAnnotationQueueAnalytics(UUID id) throws ApiException { + ApiResponse localVarResponse = getAnnotationQueueAnalyticsWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Queue analytics: throughput, annotator performance, label distribution. + * @param id A UUID string identifying this annotation queue. (required) + * @return ApiResponse<QueueAnalyticsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAnnotationQueueAnalyticsWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAnnotationQueueAnalyticsRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAnnotationQueueAnalytics", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAnnotationQueueAnalyticsRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAnnotationQueueAnalytics"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/analytics/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @return QueueProgressResponse + * @throws ApiException if fails to make API call + */ + public QueueProgressResponse getAnnotationQueueProgress(UUID id) throws ApiException { + ApiResponse localVarResponse = getAnnotationQueueProgressWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @return ApiResponse<QueueProgressResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAnnotationQueueProgressWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAnnotationQueueProgressRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAnnotationQueueProgress", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAnnotationQueueProgressRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getAnnotationQueueProgress"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/progress/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Return source/label/attribute fields available for dataset export. + * @param id A UUID string identifying this annotation queue. (required) + * @return QueueExportFieldsResponse + * @throws ApiException if fails to make API call + */ + public QueueExportFieldsResponse listAnnotationQueueExportFields(UUID id) throws ApiException { + ApiResponse localVarResponse = listAnnotationQueueExportFieldsWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Return source/label/attribute fields available for dataset export. + * @param id A UUID string identifying this annotation queue. (required) + * @return ApiResponse<QueueExportFieldsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAnnotationQueueExportFieldsWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAnnotationQueueExportFieldsRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAnnotationQueueExportFields", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAnnotationQueueExportFieldsRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling listAnnotationQueueExportFields"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/export-fields/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param status (optional) + * @param search (optional) + * @param includeCounts (optional) + * @return ListAnnotationQueues200Response + * @throws ApiException if fails to make API call + */ + public ListAnnotationQueues200Response listAnnotationQueues(Integer page, Integer limit, String status, String search, Boolean includeCounts) throws ApiException { + ApiResponse localVarResponse = listAnnotationQueuesWithHttpInfo(page, limit, status, search, includeCounts); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param status (optional) + * @param search (optional) + * @param includeCounts (optional) + * @return ApiResponse<ListAnnotationQueues200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listAnnotationQueuesWithHttpInfo(Integer page, Integer limit, String status, String search, Boolean includeCounts) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAnnotationQueuesRequestBuilder(page, limit, status, search, includeCounts); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAnnotationQueues", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAnnotationQueuesRequestBuilder(Integer page, Integer limit, String status, String search, Boolean includeCounts) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "include_counts"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include_counts", includeCounts)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Remove a label from an annotation queue. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueLabelRequest (required) + * @return QueueRemoveLabelResponse + * @throws ApiException if fails to make API call + */ + public QueueRemoveLabelResponse removeAnnotationQueueLabel(UUID id, QueueLabelRequest queueLabelRequest) throws ApiException { + ApiResponse localVarResponse = removeAnnotationQueueLabelWithHttpInfo(id, queueLabelRequest); + return localVarResponse.getData(); + } + + /** + * + * Remove a label from an annotation queue. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueLabelRequest (required) + * @return ApiResponse<QueueRemoveLabelResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse removeAnnotationQueueLabelWithHttpInfo(UUID id, QueueLabelRequest queueLabelRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = removeAnnotationQueueLabelRequestBuilder(id, queueLabelRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("removeAnnotationQueueLabel", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder removeAnnotationQueueLabelRequestBuilder(UUID id, QueueLabelRequest queueLabelRequest) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling removeAnnotationQueueLabel"); + } + // verify the required parameter 'queueLabelRequest' is set + if (queueLabelRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueLabelRequest' when calling removeAnnotationQueueLabel"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/remove-label/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueLabelRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @param annotationQueue (required) + * @return AnnotationQueue + * @throws ApiException if fails to make API call + */ + public AnnotationQueue updateAnnotationQueue(UUID id, AnnotationQueue annotationQueue) throws ApiException { + ApiResponse localVarResponse = updateAnnotationQueueWithHttpInfo(id, annotationQueue); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @param annotationQueue (required) + * @return ApiResponse<AnnotationQueue> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateAnnotationQueueWithHttpInfo(UUID id, AnnotationQueue annotationQueue) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateAnnotationQueueRequestBuilder(id, annotationQueue); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateAnnotationQueue", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateAnnotationQueueRequestBuilder(UUID id, AnnotationQueue annotationQueue) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateAnnotationQueue"); + } + // verify the required parameter 'annotationQueue' is set + if (annotationQueue == null) { + throw new ApiException(400, "Missing the required parameter 'annotationQueue' when calling updateAnnotationQueue"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(annotationQueue); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @param queueStatusRequest (required) + * @return QueueStatusResponse + * @throws ApiException if fails to make API call + */ + public QueueStatusResponse updateAnnotationQueueStatus(UUID id, QueueStatusRequest queueStatusRequest) throws ApiException { + ApiResponse localVarResponse = updateAnnotationQueueStatusWithHttpInfo(id, queueStatusRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @param queueStatusRequest (required) + * @return ApiResponse<QueueStatusResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateAnnotationQueueStatusWithHttpInfo(UUID id, QueueStatusRequest queueStatusRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateAnnotationQueueStatusRequestBuilder(id, queueStatusRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateAnnotationQueueStatus", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateAnnotationQueueStatusRequestBuilder(UUID id, QueueStatusRequest queueStatusRequest) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateAnnotationQueueStatus"); + } + // verify the required parameter 'queueStatusRequest' is set + if (queueStatusRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueStatusRequest' when calling updateAnnotationQueueStatus"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/update-status/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueStatusRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/DatasetsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/DatasetsApi.java new file mode 100644 index 0000000..5825e96 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/DatasetsApi.java @@ -0,0 +1,1903 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AnnotationSummaryResponse; +import com.futureagi.sdk.model.ApiTextErrorResponse; +import com.futureagi.sdk.model.BaseColumnsResponse; +import com.futureagi.sdk.model.CreateDatasetFromLocalFileRequest; +import com.futureagi.sdk.model.CreateEmptyDatasetRequest; +import com.futureagi.sdk.model.DatasetAddColumnsRequest; +import com.futureagi.sdk.model.DatasetAddRowsRequest; +import com.futureagi.sdk.model.DatasetColumnDetailResponse; +import com.futureagi.sdk.model.DatasetColumnsMutationResponse; +import com.futureagi.sdk.model.DatasetCreateStartedResponse; +import com.futureagi.sdk.model.DatasetDerivedVariablesResponse; +import com.futureagi.sdk.model.DatasetEvalStatsResponse; +import com.futureagi.sdk.model.DatasetJsonSchemaResponse; +import com.futureagi.sdk.model.DatasetListResponse; +import com.futureagi.sdk.model.DatasetNamesResponse; +import com.futureagi.sdk.model.DatasetRowDataRequest; +import com.futureagi.sdk.model.DatasetRowDataResponse; +import com.futureagi.sdk.model.DatasetTableResponse; +import com.futureagi.sdk.model.DatasetUpdateCellValueRequest; +import com.futureagi.sdk.model.DevelopDatasetMessageResponse; +import com.futureagi.sdk.model.DuplicateDatasetRequest; +import com.futureagi.sdk.model.DuplicateDatasetResponse; +import java.io.File; +import com.futureagi.sdk.model.LocalFileDatasetCreateStartedResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.ManualDatasetCreateRequest; +import com.futureagi.sdk.model.ManualDatasetCreateResponse; +import com.futureagi.sdk.model.ModelHubErrorResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DatasetsApi() { + this(Configuration.getDefaultApiClient()); + } + + public DatasetsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddColumnsRequest (required) + * @return DatasetColumnsMutationResponse + * @throws ApiException if fails to make API call + */ + public DatasetColumnsMutationResponse addDatasetColumns(String datasetId, DatasetAddColumnsRequest datasetAddColumnsRequest) throws ApiException { + ApiResponse localVarResponse = addDatasetColumnsWithHttpInfo(datasetId, datasetAddColumnsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddColumnsRequest (required) + * @return ApiResponse<DatasetColumnsMutationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse addDatasetColumnsWithHttpInfo(String datasetId, DatasetAddColumnsRequest datasetAddColumnsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = addDatasetColumnsRequestBuilder(datasetId, datasetAddColumnsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("addDatasetColumns", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder addDatasetColumnsRequestBuilder(String datasetId, DatasetAddColumnsRequest datasetAddColumnsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling addDatasetColumns"); + } + // verify the required parameter 'datasetAddColumnsRequest' is set + if (datasetAddColumnsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetAddColumnsRequest' when calling addDatasetColumns"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_columns/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetAddColumnsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddRowsRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse addDatasetRows(String datasetId, DatasetAddRowsRequest datasetAddRowsRequest) throws ApiException { + ApiResponse localVarResponse = addDatasetRowsWithHttpInfo(datasetId, datasetAddRowsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddRowsRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse addDatasetRowsWithHttpInfo(String datasetId, DatasetAddRowsRequest datasetAddRowsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = addDatasetRowsRequestBuilder(datasetId, datasetAddRowsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("addDatasetRows", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder addDatasetRowsRequestBuilder(String datasetId, DatasetAddRowsRequest datasetAddRowsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling addDatasetRows"); + } + // verify the required parameter 'datasetAddRowsRequest' is set + if (datasetAddRowsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetAddRowsRequest' when calling addDatasetRows"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_rows/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetAddRowsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param createDatasetFromLocalFileRequest (required) + * @return LocalFileDatasetCreateStartedResponse + * @throws ApiException if fails to make API call + */ + public LocalFileDatasetCreateStartedResponse createDatasetFromLocalFile(CreateDatasetFromLocalFileRequest createDatasetFromLocalFileRequest) throws ApiException { + ApiResponse localVarResponse = createDatasetFromLocalFileWithHttpInfo(createDatasetFromLocalFileRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param createDatasetFromLocalFileRequest (required) + * @return ApiResponse<LocalFileDatasetCreateStartedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createDatasetFromLocalFileWithHttpInfo(CreateDatasetFromLocalFileRequest createDatasetFromLocalFileRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createDatasetFromLocalFileRequestBuilder(createDatasetFromLocalFileRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createDatasetFromLocalFile", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createDatasetFromLocalFileRequestBuilder(CreateDatasetFromLocalFileRequest createDatasetFromLocalFileRequest) throws ApiException { + // verify the required parameter 'createDatasetFromLocalFileRequest' is set + if (createDatasetFromLocalFileRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createDatasetFromLocalFileRequest' when calling createDatasetFromLocalFile"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/create-dataset-from-local-file/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createDatasetFromLocalFileRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param manualDatasetCreateRequest (required) + * @return ManualDatasetCreateResponse + * @throws ApiException if fails to make API call + */ + public ManualDatasetCreateResponse createDatasetManually(ManualDatasetCreateRequest manualDatasetCreateRequest) throws ApiException { + ApiResponse localVarResponse = createDatasetManuallyWithHttpInfo(manualDatasetCreateRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param manualDatasetCreateRequest (required) + * @return ApiResponse<ManualDatasetCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createDatasetManuallyWithHttpInfo(ManualDatasetCreateRequest manualDatasetCreateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createDatasetManuallyRequestBuilder(manualDatasetCreateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createDatasetManually", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createDatasetManuallyRequestBuilder(ManualDatasetCreateRequest manualDatasetCreateRequest) throws ApiException { + // verify the required parameter 'manualDatasetCreateRequest' is set + if (manualDatasetCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'manualDatasetCreateRequest' when calling createDatasetManually"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/create-dataset-manually/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(manualDatasetCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param createEmptyDatasetRequest (required) + * @return DatasetCreateStartedResponse + * @throws ApiException if fails to make API call + */ + public DatasetCreateStartedResponse createEmptyDataset(CreateEmptyDatasetRequest createEmptyDatasetRequest) throws ApiException { + ApiResponse localVarResponse = createEmptyDatasetWithHttpInfo(createEmptyDatasetRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param createEmptyDatasetRequest (required) + * @return ApiResponse<DatasetCreateStartedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createEmptyDatasetWithHttpInfo(CreateEmptyDatasetRequest createEmptyDatasetRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createEmptyDatasetRequestBuilder(createEmptyDatasetRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createEmptyDataset", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createEmptyDatasetRequestBuilder(CreateEmptyDatasetRequest createEmptyDatasetRequest) throws ApiException { + // verify the required parameter 'createEmptyDatasetRequest' is set + if (createEmptyDatasetRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createEmptyDatasetRequest' when calling createEmptyDataset"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/create-empty-dataset/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createEmptyDatasetRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param columnId (required) + * @throws ApiException if fails to make API call + */ + public void deleteDatasetColumn(String datasetId, String columnId) throws ApiException { + deleteDatasetColumnWithHttpInfo(datasetId, columnId); + } + + /** + * + * + * @param datasetId (required) + * @param columnId (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteDatasetColumnWithHttpInfo(String datasetId, String columnId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteDatasetColumnRequestBuilder(datasetId, columnId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteDatasetColumn", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteDatasetColumnRequestBuilder(String datasetId, String columnId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling deleteDatasetColumn"); + } + // verify the required parameter 'columnId' is set + if (columnId == null) { + throw new ApiException(400, "Missing the required parameter 'columnId' when calling deleteDatasetColumn"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/delete_column/{column_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{column_id}", ApiClient.urlEncode(columnId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @throws ApiException if fails to make API call + */ + public void deleteDatasetRow(String datasetId) throws ApiException { + deleteDatasetRowWithHttpInfo(datasetId); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteDatasetRowWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteDatasetRowRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteDatasetRow", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteDatasetRowRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling deleteDatasetRow"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/delete_row/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File downloadDataset(String datasetId) throws ApiException { + ApiResponse localVarResponse = downloadDatasetWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse downloadDatasetWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = downloadDatasetRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("downloadDataset", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder downloadDatasetRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling downloadDataset"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/download_dataset/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param duplicateDatasetRequest (required) + * @return DuplicateDatasetResponse + * @throws ApiException if fails to make API call + */ + public DuplicateDatasetResponse duplicateDataset(String datasetId, DuplicateDatasetRequest duplicateDatasetRequest) throws ApiException { + ApiResponse localVarResponse = duplicateDatasetWithHttpInfo(datasetId, duplicateDatasetRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param duplicateDatasetRequest (required) + * @return ApiResponse<DuplicateDatasetResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse duplicateDatasetWithHttpInfo(String datasetId, DuplicateDatasetRequest duplicateDatasetRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = duplicateDatasetRequestBuilder(datasetId, duplicateDatasetRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("duplicateDataset", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder duplicateDatasetRequestBuilder(String datasetId, DuplicateDatasetRequest duplicateDatasetRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling duplicateDataset"); + } + // verify the required parameter 'duplicateDatasetRequest' is set + if (duplicateDatasetRequest == null) { + throw new ApiException(400, "Missing the required parameter 'duplicateDatasetRequest' when calling duplicateDataset"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/duplicate/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(duplicateDatasetRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return AnnotationSummaryResponse + * @throws ApiException if fails to make API call + */ + public AnnotationSummaryResponse getDatasetAnnotationSummary(String datasetId) throws ApiException { + ApiResponse localVarResponse = getDatasetAnnotationSummaryWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<AnnotationSummaryResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDatasetAnnotationSummaryWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDatasetAnnotationSummaryRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDatasetAnnotationSummary", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDatasetAnnotationSummaryRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling getDatasetAnnotationSummary"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/dataset/{dataset_id}/annotation-summary/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return DatasetColumnDetailResponse + * @throws ApiException if fails to make API call + */ + public DatasetColumnDetailResponse getDatasetColumns(String datasetId) throws ApiException { + ApiResponse localVarResponse = getDatasetColumnsWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<DatasetColumnDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDatasetColumnsWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDatasetColumnsRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDatasetColumns", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDatasetColumnsRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling getDatasetColumns"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/dataset/columns/{dataset_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return DatasetEvalStatsResponse + * @throws ApiException if fails to make API call + */ + public DatasetEvalStatsResponse getDatasetEvalStats(String datasetId) throws ApiException { + ApiResponse localVarResponse = getDatasetEvalStatsWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<DatasetEvalStatsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDatasetEvalStatsWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDatasetEvalStatsRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDatasetEvalStats", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDatasetEvalStatsRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling getDatasetEvalStats"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/dataset/{dataset_id}/eval-stats/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * API endpoint to get JSON schemas and images metadata for columns in a dataset. Used by frontend for autocomplete suggestions when accessing JSON properties and for indexed access to images columns. + * @param datasetId (required) + * @return DatasetJsonSchemaResponse + * @throws ApiException if fails to make API call + */ + public DatasetJsonSchemaResponse getDatasetJsonSchema(String datasetId) throws ApiException { + ApiResponse localVarResponse = getDatasetJsonSchemaWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * API endpoint to get JSON schemas and images metadata for columns in a dataset. Used by frontend for autocomplete suggestions when accessing JSON properties and for indexed access to images columns. + * @param datasetId (required) + * @return ApiResponse<DatasetJsonSchemaResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDatasetJsonSchemaWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDatasetJsonSchemaRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDatasetJsonSchema", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDatasetJsonSchemaRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling getDatasetJsonSchema"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/dataset/{dataset_id}/json-schema/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetRowDataRequest (required) + * @return DatasetRowDataResponse + * @throws ApiException if fails to make API call + */ + public DatasetRowDataResponse getDatasetRow(String datasetId, DatasetRowDataRequest datasetRowDataRequest) throws ApiException { + ApiResponse localVarResponse = getDatasetRowWithHttpInfo(datasetId, datasetRowDataRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetRowDataRequest (required) + * @return ApiResponse<DatasetRowDataResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDatasetRowWithHttpInfo(String datasetId, DatasetRowDataRequest datasetRowDataRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDatasetRowRequestBuilder(datasetId, datasetRowDataRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDatasetRow", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDatasetRowRequestBuilder(String datasetId, DatasetRowDataRequest datasetRowDataRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling getDatasetRow"); + } + // verify the required parameter 'datasetRowDataRequest' is set + if (datasetRowDataRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetRowDataRequest' when calling getDatasetRow"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/get-row-data/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetRowDataRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param filters (optional, default to []) + * @param sort (optional, default to []) + * @param search (optional) + * @param pageSize (optional, default to 10) + * @param currentPageIndex (optional, default to 0) + * @param columnConfigOnly (optional, default to false) + * @return DatasetTableResponse + * @throws ApiException if fails to make API call + */ + public DatasetTableResponse getDatasetTable(String datasetId, String filters, String sort, String search, Integer pageSize, Integer currentPageIndex, Boolean columnConfigOnly) throws ApiException { + ApiResponse localVarResponse = getDatasetTableWithHttpInfo(datasetId, filters, sort, search, pageSize, currentPageIndex, columnConfigOnly); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param filters (optional, default to []) + * @param sort (optional, default to []) + * @param search (optional) + * @param pageSize (optional, default to 10) + * @param currentPageIndex (optional, default to 0) + * @param columnConfigOnly (optional, default to false) + * @return ApiResponse<DatasetTableResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDatasetTableWithHttpInfo(String datasetId, String filters, String sort, String search, Integer pageSize, Integer currentPageIndex, Boolean columnConfigOnly) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDatasetTableRequestBuilder(datasetId, filters, sort, search, pageSize, currentPageIndex, columnConfigOnly); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDatasetTable", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDatasetTableRequestBuilder(String datasetId, String filters, String sort, String search, Integer pageSize, Integer currentPageIndex, Boolean columnConfigOnly) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling getDatasetTable"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/get-dataset-table/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "page_size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_size", pageSize)); + localVarQueryParameterBaseName = "current_page_index"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("current_page_index", currentPageIndex)); + localVarQueryParameterBaseName = "column_config_only"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("column_config_only", columnConfigOnly)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return BaseColumnsResponse + * @throws ApiException if fails to make API call + */ + public BaseColumnsResponse listDatasetBaseColumns() throws ApiException { + ApiResponse localVarResponse = listDatasetBaseColumnsWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<BaseColumnsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listDatasetBaseColumnsWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listDatasetBaseColumnsRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listDatasetBaseColumns", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listDatasetBaseColumnsRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/get-base-columns/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get all derived variables from all run prompt columns in a dataset. + * This aggregates derived variables from run prompt columns that produce JSON outputs, making them available for use in other prompts, evals, and experiments. Path params: - dataset_id: UUID of the dataset + * @param datasetId (required) + * @return DatasetDerivedVariablesResponse + * @throws ApiException if fails to make API call + */ + public DatasetDerivedVariablesResponse listDatasetDerivedVariables(String datasetId) throws ApiException { + ApiResponse localVarResponse = listDatasetDerivedVariablesWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * Get all derived variables from all run prompt columns in a dataset. + * This aggregates derived variables from run prompt columns that produce JSON outputs, making them available for use in other prompts, evals, and experiments. Path params: - dataset_id: UUID of the dataset + * @param datasetId (required) + * @return ApiResponse<DatasetDerivedVariablesResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listDatasetDerivedVariablesWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listDatasetDerivedVariablesRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listDatasetDerivedVariables", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listDatasetDerivedVariablesRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling listDatasetDerivedVariables"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/derived-variables/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return DatasetNamesResponse + * @throws ApiException if fails to make API call + */ + public DatasetNamesResponse listDatasetNames() throws ApiException { + ApiResponse localVarResponse = listDatasetNamesWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<DatasetNamesResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listDatasetNamesWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listDatasetNamesRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listDatasetNames", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listDatasetNamesRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/get-datasets-names/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param searchText (optional, default to ) + * @param page (optional, default to 0) + * @param pageSize (optional, default to 10) + * @param sort (optional) + * @return DatasetListResponse + * @throws ApiException if fails to make API call + */ + public DatasetListResponse listDatasets(String searchText, Integer page, Integer pageSize, String sort) throws ApiException { + ApiResponse localVarResponse = listDatasetsWithHttpInfo(searchText, page, pageSize, sort); + return localVarResponse.getData(); + } + + /** + * + * + * @param searchText (optional, default to ) + * @param page (optional, default to 0) + * @param pageSize (optional, default to 10) + * @param sort (optional) + * @return ApiResponse<DatasetListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listDatasetsWithHttpInfo(String searchText, Integer page, Integer pageSize, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listDatasetsRequestBuilder(searchText, page, pageSize, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listDatasets", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listDatasetsRequestBuilder(String searchText, Integer page, Integer pageSize, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/get-datasets/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search_text"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search_text", searchText)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "page_size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_size", pageSize)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetUpdateCellValueRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse updateDatasetCell(String datasetId, DatasetUpdateCellValueRequest datasetUpdateCellValueRequest) throws ApiException { + ApiResponse localVarResponse = updateDatasetCellWithHttpInfo(datasetId, datasetUpdateCellValueRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetUpdateCellValueRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateDatasetCellWithHttpInfo(String datasetId, DatasetUpdateCellValueRequest datasetUpdateCellValueRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateDatasetCellRequestBuilder(datasetId, datasetUpdateCellValueRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateDatasetCell", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateDatasetCellRequestBuilder(String datasetId, DatasetUpdateCellValueRequest datasetUpdateCellValueRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling updateDatasetCell"); + } + // verify the required parameter 'datasetUpdateCellValueRequest' is set + if (datasetUpdateCellValueRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetUpdateCellValueRequest' when calling updateDatasetCell"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/update_cell_value/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetUpdateCellValueRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/ExperimentsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/ExperimentsApi.java new file mode 100644 index 0000000..5b18993 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/ExperimentsApi.java @@ -0,0 +1,1348 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ExperimentComparisonDetailsResponse; +import com.futureagi.sdk.model.ExperimentComparisonWeightsRequest; +import com.futureagi.sdk.model.ExperimentCreateV2; +import com.futureagi.sdk.model.ExperimentDatasetComparisonResponse; +import com.futureagi.sdk.model.ExperimentJsonSchemaResponse; +import com.futureagi.sdk.model.ExperimentRerunRequest; +import com.futureagi.sdk.model.ExperimentStatsResponse; +import com.futureagi.sdk.model.ExperimentStopResponse; +import com.futureagi.sdk.model.ExperimentStringResultResponse; +import com.futureagi.sdk.model.ExperimentTableRowsResponse; +import com.futureagi.sdk.model.ExperimentUpdateV2; +import com.futureagi.sdk.model.ExperimentV2DetailResponse; +import java.io.File; +import com.futureagi.sdk.model.ListExperiments200Response; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.ModelHubErrorResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ExperimentsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ExperimentsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + * @param experimentId (required) + * @param experimentComparisonWeightsRequest (required) + * @return ExperimentDatasetComparisonResponse + * @throws ApiException if fails to make API call + */ + public ExperimentDatasetComparisonResponse compareExperiments(String experimentId, ExperimentComparisonWeightsRequest experimentComparisonWeightsRequest) throws ApiException { + ApiResponse localVarResponse = compareExperimentsWithHttpInfo(experimentId, experimentComparisonWeightsRequest); + return localVarResponse.getData(); + } + + /** + * + * V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + * @param experimentId (required) + * @param experimentComparisonWeightsRequest (required) + * @return ApiResponse<ExperimentDatasetComparisonResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse compareExperimentsWithHttpInfo(String experimentId, ExperimentComparisonWeightsRequest experimentComparisonWeightsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = compareExperimentsRequestBuilder(experimentId, experimentComparisonWeightsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("compareExperiments", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder compareExperimentsRequestBuilder(String experimentId, ExperimentComparisonWeightsRequest experimentComparisonWeightsRequest) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling compareExperiments"); + } + // verify the required parameter 'experimentComparisonWeightsRequest' is set + if (experimentComparisonWeightsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'experimentComparisonWeightsRequest' when calling compareExperiments"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/compare-experiments/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(experimentComparisonWeightsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentCreateV2 (required) + * @return ExperimentStringResultResponse + * @throws ApiException if fails to make API call + */ + public ExperimentStringResultResponse createExperiment(ExperimentCreateV2 experimentCreateV2) throws ApiException { + ApiResponse localVarResponse = createExperimentWithHttpInfo(experimentCreateV2); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentCreateV2 (required) + * @return ApiResponse<ExperimentStringResultResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createExperimentWithHttpInfo(ExperimentCreateV2 experimentCreateV2) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createExperimentRequestBuilder(experimentCreateV2); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createExperiment", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createExperimentRequestBuilder(ExperimentCreateV2 experimentCreateV2) throws ApiException { + // verify the required parameter 'experimentCreateV2' is set + if (experimentCreateV2 == null) { + throw new ApiException(400, "Missing the required parameter 'experimentCreateV2' when calling createExperiment"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(experimentCreateV2); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + * @throws ApiException if fails to make API call + */ + public void deleteExperiments() throws ApiException { + deleteExperimentsWithHttpInfo(); + } + + /** + * + * V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteExperimentsWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteExperimentsRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteExperiments", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteExperimentsRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/delete/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentId (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File downloadExperiment(String experimentId) throws ApiException { + ApiResponse localVarResponse = downloadExperimentWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentId (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse downloadExperimentWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = downloadExperimentRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("downloadExperiment", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder downloadExperimentRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling downloadExperiment"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/download/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentId (required) + * @return ExperimentV2DetailResponse + * @throws ApiException if fails to make API call + */ + public ExperimentV2DetailResponse getExperiment(String experimentId) throws ApiException { + ApiResponse localVarResponse = getExperimentWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentId (required) + * @return ApiResponse<ExperimentV2DetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getExperimentWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getExperimentRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getExperiment", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getExperimentRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling getExperiment"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. Delegates to the shared get_json_column_schemas() function. + * @param experimentId (required) + * @return ExperimentJsonSchemaResponse + * @throws ApiException if fails to make API call + */ + public ExperimentJsonSchemaResponse getExperimentJsonSchema(String experimentId) throws ApiException { + ApiResponse localVarResponse = getExperimentJsonSchemaWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. Delegates to the shared get_json_column_schemas() function. + * @param experimentId (required) + * @return ApiResponse<ExperimentJsonSchemaResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getExperimentJsonSchemaWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getExperimentJsonSchemaRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getExperimentJsonSchema", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getExperimentJsonSchemaRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling getExperimentJsonSchema"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/json-schema/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentId (required) + * @param rowId (required) + * @return ExperimentTableRowsResponse + * @throws ApiException if fails to make API call + */ + public ExperimentTableRowsResponse getExperimentRow(String experimentId, String rowId) throws ApiException { + ApiResponse localVarResponse = getExperimentRowWithHttpInfo(experimentId, rowId); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentId (required) + * @param rowId (required) + * @return ApiResponse<ExperimentTableRowsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getExperimentRowWithHttpInfo(String experimentId, String rowId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getExperimentRowRequestBuilder(experimentId, rowId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getExperimentRow", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getExperimentRowRequestBuilder(String experimentId, String rowId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling getExperimentRow"); + } + // verify the required parameter 'rowId' is set + if (rowId == null) { + throw new ApiException(400, "Missing the required parameter 'rowId' when calling getExperimentRow"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/rows/{row_id}/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())) + .replace("{row_id}", ApiClient.urlEncode(rowId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Stats view for V2 experiments that read from snapshot_dataset. + * @param experimentId (required) + * @return ExperimentStatsResponse + * @throws ApiException if fails to make API call + */ + public ExperimentStatsResponse getExperimentStats(String experimentId) throws ApiException { + ApiResponse localVarResponse = getExperimentStatsWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * Stats view for V2 experiments that read from snapshot_dataset. + * @param experimentId (required) + * @return ApiResponse<ExperimentStatsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getExperimentStatsWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getExperimentStatsRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getExperimentStats", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getExperimentStatsRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling getExperimentStats"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/stats/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentId (required) + * @return ExperimentComparisonDetailsResponse + * @throws ApiException if fails to make API call + */ + public ExperimentComparisonDetailsResponse listExperimentComparisons(String experimentId) throws ApiException { + ApiResponse localVarResponse = listExperimentComparisonsWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentId (required) + * @return ApiResponse<ExperimentComparisonDetailsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listExperimentComparisonsWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listExperimentComparisonsRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listExperimentComparisons", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listExperimentComparisonsRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling listExperimentComparisons"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/comparisons/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentId (required) + * @return ExperimentTableRowsResponse + * @throws ApiException if fails to make API call + */ + public ExperimentTableRowsResponse listExperimentRows(String experimentId) throws ApiException { + ApiResponse localVarResponse = listExperimentRowsWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentId (required) + * @return ApiResponse<ExperimentTableRowsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listExperimentRowsWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listExperimentRowsRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listExperimentRows", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listExperimentRowsRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling listExperimentRows"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/rows/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * V2 experiment list with filtering, search, and pagination. + * @param createdAt (optional) + * @param status (optional) + * @param datasetId (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ListExperiments200Response + * @throws ApiException if fails to make API call + */ + public ListExperiments200Response listExperiments(String createdAt, String status, String datasetId, String search, String ordering, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listExperimentsWithHttpInfo(createdAt, status, datasetId, search, ordering, page, limit); + return localVarResponse.getData(); + } + + /** + * + * V2 experiment list with filtering, search, and pagination. + * @param createdAt (optional) + * @param status (optional) + * @param datasetId (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ListExperiments200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listExperimentsWithHttpInfo(String createdAt, String status, String datasetId, String search, String ordering, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listExperimentsRequestBuilder(createdAt, status, datasetId, search, ordering, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listExperiments", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listExperimentsRequestBuilder(String createdAt, String status, String datasetId, String search, String ordering, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/list/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "created_at"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("created_at", createdAt)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + localVarQueryParameterBaseName = "dataset_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("dataset_id", datasetId)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "ordering"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("ordering", ordering)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * V2 re-run: org-scoped, uses V2 Temporal workflow. + * No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID reuse policy automatically cancels any running workflow with the same ID. Cell reset is handled by the workflow itself (cleanup + setup activities). + * @param experimentRerunRequest (required) + * @return ExperimentStringResultResponse + * @throws ApiException if fails to make API call + */ + public ExperimentStringResultResponse rerunExperiment(ExperimentRerunRequest experimentRerunRequest) throws ApiException { + ApiResponse localVarResponse = rerunExperimentWithHttpInfo(experimentRerunRequest); + return localVarResponse.getData(); + } + + /** + * V2 re-run: org-scoped, uses V2 Temporal workflow. + * No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID reuse policy automatically cancels any running workflow with the same ID. Cell reset is handled by the workflow itself (cleanup + setup activities). + * @param experimentRerunRequest (required) + * @return ApiResponse<ExperimentStringResultResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse rerunExperimentWithHttpInfo(ExperimentRerunRequest experimentRerunRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = rerunExperimentRequestBuilder(experimentRerunRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("rerunExperiment", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder rerunExperimentRequestBuilder(ExperimentRerunRequest experimentRerunRequest) throws ApiException { + // verify the required parameter 'experimentRerunRequest' is set + if (experimentRerunRequest == null) { + throw new ApiException(400, "Missing the required parameter 'experimentRerunRequest' when calling rerunExperiment"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/re-run/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(experimentRerunRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Stop a running V2 experiment. + * Cancels all Temporal workflows (main + reruns). DB cleanup (marking RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) is handled by each workflow's CancelledError handler via the stop_experiment_cleanup_activity. + * @param experimentId (required) + * @param body (required) + * @return ExperimentStopResponse + * @throws ApiException if fails to make API call + */ + public ExperimentStopResponse stopExperiment(String experimentId, Object body) throws ApiException { + ApiResponse localVarResponse = stopExperimentWithHttpInfo(experimentId, body); + return localVarResponse.getData(); + } + + /** + * Stop a running V2 experiment. + * Cancels all Temporal workflows (main + reruns). DB cleanup (marking RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) is handled by each workflow's CancelledError handler via the stop_experiment_cleanup_activity. + * @param experimentId (required) + * @param body (required) + * @return ApiResponse<ExperimentStopResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse stopExperimentWithHttpInfo(String experimentId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = stopExperimentRequestBuilder(experimentId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("stopExperiment", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder stopExperimentRequestBuilder(String experimentId, Object body) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling stopExperiment"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling stopExperiment"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/stop/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Update a V2 experiment with diff-based selective re-run. + * Editable fields: column_id, prompt_config, user_eval_metrics. Re-run triggers (determined by fingerprint diffs, not field presence): - prompt_config has new/modified entries → re-run those configs + ALL dependent evals - user_eval_metrics has new/modified entries → re-run only those evals - column_id changed → delete old base eval columns, re-run base evals - If FE sends unchanged data, diffs return empty → no re-run + * @param experimentId (required) + * @param experimentUpdateV2 (required) + * @return ExperimentV2DetailResponse + * @throws ApiException if fails to make API call + */ + public ExperimentV2DetailResponse updateExperiment(String experimentId, ExperimentUpdateV2 experimentUpdateV2) throws ApiException { + ApiResponse localVarResponse = updateExperimentWithHttpInfo(experimentId, experimentUpdateV2); + return localVarResponse.getData(); + } + + /** + * Update a V2 experiment with diff-based selective re-run. + * Editable fields: column_id, prompt_config, user_eval_metrics. Re-run triggers (determined by fingerprint diffs, not field presence): - prompt_config has new/modified entries → re-run those configs + ALL dependent evals - user_eval_metrics has new/modified entries → re-run only those evals - column_id changed → delete old base eval columns, re-run base evals - If FE sends unchanged data, diffs return empty → no re-run + * @param experimentId (required) + * @param experimentUpdateV2 (required) + * @return ApiResponse<ExperimentV2DetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateExperimentWithHttpInfo(String experimentId, ExperimentUpdateV2 experimentUpdateV2) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateExperimentRequestBuilder(experimentId, experimentUpdateV2); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateExperiment", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateExperimentRequestBuilder(String experimentId, ExperimentUpdateV2 experimentUpdateV2) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling updateExperiment"); + } + // verify the required parameter 'experimentUpdateV2' is set + if (experimentUpdateV2 == null) { + throw new ApiException(400, "Missing the required parameter 'experimentUpdateV2' when calling updateExperiment"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(experimentUpdateV2); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/ModelHubApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/ModelHubApi.java new file mode 100644 index 0000000..0a4c2ec --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/ModelHubApi.java @@ -0,0 +1,18391 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AddApiColumnRequest; +import com.futureagi.sdk.model.AddAsNewDatasetRequest; +import com.futureagi.sdk.model.AddRowsFromFileRequest; +import com.futureagi.sdk.model.AddRunPrompt; +import com.futureagi.sdk.model.AnnotationLabelRestoreResponse; +import com.futureagi.sdk.model.AnnotationQueue; +import com.futureagi.sdk.model.AnnotationsLabels; +import com.futureagi.sdk.model.ApiKey; +import com.futureagi.sdk.model.ApiTextErrorResponse; +import com.futureagi.sdk.model.AutomationRule; +import com.futureagi.sdk.model.AutomationRuleEvaluateAcceptedResponse; +import com.futureagi.sdk.model.AutomationRuleEvaluateResponse; +import com.futureagi.sdk.model.BulkCreateScores; +import com.futureagi.sdk.model.BulkCreateScoresResponse; +import com.futureagi.sdk.model.ClassifyColumnRequest; +import com.futureagi.sdk.model.CloneDatasetRequest; +import com.futureagi.sdk.model.ColumnTypeConversionResponse; +import com.futureagi.sdk.model.CompareDataset; +import com.futureagi.sdk.model.CompareDatasetDeleteResponse; +import com.futureagi.sdk.model.CompareDatasetResponse; +import com.futureagi.sdk.model.CompareDatasetRowResponse; +import com.futureagi.sdk.model.CompareDatasetStatsRequest; +import com.futureagi.sdk.model.CompareDatasetStatsResponse; +import com.futureagi.sdk.model.CompareEvalListResponse; +import com.futureagi.sdk.model.CompareEvalsListRequest; +import com.futureagi.sdk.model.CompareExperimentEvalRequest; +import com.futureagi.sdk.model.ComparePreviewRunEvalRequest; +import com.futureagi.sdk.model.CompareStartEvalsRequest; +import com.futureagi.sdk.model.CompositeEvalAdhocExecuteRequest; +import com.futureagi.sdk.model.CompositeEvalCreateRequest; +import com.futureagi.sdk.model.CompositeEvalCreateResponse; +import com.futureagi.sdk.model.CompositeEvalDetailResponse; +import com.futureagi.sdk.model.CompositeEvalExecuteRequest; +import com.futureagi.sdk.model.CompositeEvalExecuteResponse; +import com.futureagi.sdk.model.CompositeEvalUpdateRequest; +import com.futureagi.sdk.model.ConditionalColumnRequest; +import com.futureagi.sdk.model.CreateDatasetFromExperimentRequest; +import com.futureagi.sdk.model.CreateScore; +import com.futureagi.sdk.model.DatasetAddEmptyColumnsRequest; +import com.futureagi.sdk.model.DatasetAddEmptyRowsRequest; +import com.futureagi.sdk.model.DatasetAddRowsFromExistingRequest; +import com.futureagi.sdk.model.DatasetBehaviorRequest; +import com.futureagi.sdk.model.DatasetCellDataRequest; +import com.futureagi.sdk.model.DatasetCellDataResponse; +import com.futureagi.sdk.model.DatasetColumnsMutationResponse; +import com.futureagi.sdk.model.DatasetCopyResponse; +import com.futureagi.sdk.model.DatasetCreateStartedResponse; +import com.futureagi.sdk.model.DatasetCreationProgressResponse; +import com.futureagi.sdk.model.DatasetExplanationSummaryResponse; +import com.futureagi.sdk.model.DatasetMultipleStaticColumnsRequest; +import com.futureagi.sdk.model.DatasetRowDiffRequest; +import com.futureagi.sdk.model.DatasetRowsImportMessageResponse; +import com.futureagi.sdk.model.DatasetRowsImportedResponse; +import com.futureagi.sdk.model.DatasetRunPromptStatsResponse; +import com.futureagi.sdk.model.DatasetSdkRowsRequest; +import com.futureagi.sdk.model.DatasetSdkRowsResponse; +import com.futureagi.sdk.model.DatasetStaticColumnRequest; +import com.futureagi.sdk.model.DatasetTableResponse; +import com.futureagi.sdk.model.DatasetUpdateColumnNameRequest; +import com.futureagi.sdk.model.DatasetUpdateColumnTypeRequest; +import com.futureagi.sdk.model.DeleteEvalTemplate; +import com.futureagi.sdk.model.DerivedVariableDetailResponse; +import com.futureagi.sdk.model.DerivedVariableExtractRequest; +import com.futureagi.sdk.model.DerivedVariablePreviewRequest; +import com.futureagi.sdk.model.DevelopDatasetMessageResponse; +import com.futureagi.sdk.model.DuplicateRowsRequest; +import com.futureagi.sdk.model.DuplicateRowsResponse; +import com.futureagi.sdk.model.DynamicColumnCreateResponse; +import com.futureagi.sdk.model.DynamicColumnMessageResponse; +import com.futureagi.sdk.model.EditRunPromptColumn; +import com.futureagi.sdk.model.EvalFeedbackListResponse; +import com.futureagi.sdk.model.EvalFunctionListResponse; +import com.futureagi.sdk.model.EvalListRequest; +import com.futureagi.sdk.model.EvalListResponse; +import com.futureagi.sdk.model.EvalPreviewResponse; +import com.futureagi.sdk.model.EvalStructureResponse; +import com.futureagi.sdk.model.EvalTemplateBulkDeleteRequest; +import com.futureagi.sdk.model.EvalTemplateBulkDeleteResponse; +import com.futureagi.sdk.model.EvalTemplateCreateResponse; +import com.futureagi.sdk.model.EvalTemplateCreateV2Request; +import com.futureagi.sdk.model.EvalTemplateDetailResponse; +import com.futureagi.sdk.model.EvalTemplateListChartsRequest; +import com.futureagi.sdk.model.EvalTemplateListChartsResponse; +import com.futureagi.sdk.model.EvalTemplateListResponse; +import com.futureagi.sdk.model.EvalTemplateUpdateResponse; +import com.futureagi.sdk.model.EvalTemplateUpdateV2Request; +import com.futureagi.sdk.model.EvalTemplateVersionCreateRequest; +import com.futureagi.sdk.model.EvalTemplateVersionListResponse; +import com.futureagi.sdk.model.EvalTemplateVersionResponse; +import com.futureagi.sdk.model.EvalTemplateVersionRestoreResponse; +import com.futureagi.sdk.model.EvalUsageStatsResponse; +import com.futureagi.sdk.model.ExperimentDerivedVariablesResponse; +import com.futureagi.sdk.model.ExperimentEvaluationStatsResponse; +import com.futureagi.sdk.model.ExperimentFeedbackCreateResponse; +import com.futureagi.sdk.model.ExperimentFeedbackDetailsResponse; +import com.futureagi.sdk.model.ExperimentFeedbackSubmitRequest; +import com.futureagi.sdk.model.ExperimentFeedbackSubmitResponse; +import com.futureagi.sdk.model.ExperimentFeedbackTemplateResponse; +import com.futureagi.sdk.model.ExperimentNameSuggestionResponse; +import com.futureagi.sdk.model.ExperimentNameValidationResponse; +import com.futureagi.sdk.model.ExperimentRerunCells; +import com.futureagi.sdk.model.ExperimentRowDiffResponse; +import com.futureagi.sdk.model.ExperimentWorkflowResponse; +import com.futureagi.sdk.model.ExtractEntitiesRequest; +import com.futureagi.sdk.model.ExtractJsonColumnRequest; +import com.futureagi.sdk.model.Feedback; +import java.io.File; +import com.futureagi.sdk.model.GroundTruthConfigRequest; +import com.futureagi.sdk.model.GroundTruthConfigResponse; +import com.futureagi.sdk.model.GroundTruthListResponse; +import com.futureagi.sdk.model.GroundTruthUploadRequest; +import com.futureagi.sdk.model.GroundTruthUploadResponse; +import com.futureagi.sdk.model.HuggingFaceAddRowsRequest; +import com.futureagi.sdk.model.HuggingFaceDatasetConfigRequest; +import com.futureagi.sdk.model.HuggingFaceDatasetConfigResponse; +import com.futureagi.sdk.model.HuggingFaceDatasetCreateRequest; +import com.futureagi.sdk.model.HuggingFaceDatasetDetailRequest; +import com.futureagi.sdk.model.HuggingFaceDatasetDetailResponse; +import com.futureagi.sdk.model.HuggingFaceDatasetListRequest; +import com.futureagi.sdk.model.HuggingFaceDatasetListResponse; +import com.futureagi.sdk.model.LegacyKnowledgeBaseCreateResponse; +import com.futureagi.sdk.model.LegacyKnowledgeBaseFilesRequest; +import com.futureagi.sdk.model.LegacyKnowledgeBaseFilesResponse; +import com.futureagi.sdk.model.LegacyKnowledgeBaseListResponse; +import com.futureagi.sdk.model.LegacyKnowledgeBaseMutationRequest; +import com.futureagi.sdk.model.LegacyKnowledgeBaseMutationResponse; +import com.futureagi.sdk.model.LegacyKnowledgeBaseSdkCodeResponse; +import com.futureagi.sdk.model.LegacyKnowledgeBaseTableResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.MergeDatasetRequest; +import com.futureagi.sdk.model.MergeDatasetResponse; +import com.futureagi.sdk.model.ModelHubAnnotationQueuesAutomationRulesList200Response; +import com.futureagi.sdk.model.ModelHubApiKeysList200Response; +import com.futureagi.sdk.model.ModelHubErrorResponse; +import com.futureagi.sdk.model.ModelHubPaginatedResponse; +import com.futureagi.sdk.model.ModelHubPromptHistoryExecutionsList200Response; +import com.futureagi.sdk.model.ModelHubPromptLabelsList200Response; +import com.futureagi.sdk.model.ModelHubPromptTemplatesList200Response; +import com.futureagi.sdk.model.ModelHubScoresList200Response; +import com.futureagi.sdk.model.ModelHubStringResultResponse; +import com.futureagi.sdk.model.ModelHubTextErrorResponse; +import com.futureagi.sdk.model.PreviewDatasetOperationRequest; +import com.futureagi.sdk.model.PreviewDatasetOperationResponse; +import com.futureagi.sdk.model.PreviewRunEvalRequest; +import com.futureagi.sdk.model.PreviewRunPrompt; +import com.futureagi.sdk.model.PromptDerivedVariablesResponse; +import com.futureagi.sdk.model.PromptHistoryExecution; +import com.futureagi.sdk.model.PromptLabel; +import com.futureagi.sdk.model.PromptTemplate; +import com.futureagi.sdk.model.ProviderStatusResponse; +import com.futureagi.sdk.model.QueueDefaultRequest; +import com.futureagi.sdk.model.QueueDefaultResponse; +import com.futureagi.sdk.model.QueueForSourceResponse; +import com.futureagi.sdk.model.QueueHardDeleteRequest; +import com.futureagi.sdk.model.QueueHardDeleteResponse; +import com.futureagi.sdk.model.QueueItem; +import com.futureagi.sdk.model.QueueStatusResponse; +import com.futureagi.sdk.model.RunPromptColumnConfigResponse; +import com.futureagi.sdk.model.RunPromptColumnPreviewResponse; +import com.futureagi.sdk.model.RunPromptOptionsResponse; +import com.futureagi.sdk.model.Score; +import com.futureagi.sdk.model.ScoreDeleteResponse; +import com.futureagi.sdk.model.ScoreForSourceResponse; +import com.futureagi.sdk.model.ScoreResponse; +import com.futureagi.sdk.model.StartEvalsProcessRequest; +import com.futureagi.sdk.model.StopUserEvalRequest; +import com.futureagi.sdk.model.SyntheticData; +import com.futureagi.sdk.model.SyntheticDatasetConfig; +import com.futureagi.sdk.model.SyntheticDatasetConfigResponse; +import com.futureagi.sdk.model.SyntheticDatasetCreateStartedResponse; +import com.futureagi.sdk.model.SyntheticDatasetCreation; +import com.futureagi.sdk.model.SyntheticDatasetUpdateResponse; +import java.util.UUID; +import com.futureagi.sdk.model.UserEvalMutationRequest; +import com.futureagi.sdk.model.UserEvalUpdateRequest; +import com.futureagi.sdk.model.VectorDBColumnRequest; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ModelHubApi() { + this(Configuration.getDefaultApiClient()); + } + + public ModelHubApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @param queueId (required) + * @param automationRule (required) + * @return AutomationRule + * @throws ApiException if fails to make API call + */ + public AutomationRule modelHubAnnotationQueuesAutomationRulesCreate(String queueId, AutomationRule automationRule) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo(queueId, automationRule); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param automationRule (required) + * @return ApiResponse<AutomationRule> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesCreateWithHttpInfo(String queueId, AutomationRule automationRule) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesCreateRequestBuilder(queueId, automationRule); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesCreateRequestBuilder(String queueId, AutomationRule automationRule) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesCreate"); + } + // verify the required parameter 'automationRule' is set + if (automationRule == null) { + throw new ApiException(400, "Missing the required parameter 'automationRule' when calling modelHubAnnotationQueuesAutomationRulesCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(automationRule); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @throws ApiException if fails to make API call + */ + public void modelHubAnnotationQueuesAutomationRulesDelete(String queueId, UUID id) throws ApiException { + modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo(queueId, id); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesDeleteWithHttpInfo(String queueId, UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesDeleteRequestBuilder(queueId, id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesDeleteRequestBuilder(String queueId, UUID id) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesDelete"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesAutomationRulesDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Trigger a manual rule run with a sync-or-async branch. + * Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish in the HTTP request and return 200 with the result — fast feedback for the common case. Large runs (mostly first-ever runs on backlogs or rules with wide filters) hand the work to a Temporal activity and return 202 immediately. The activity emails creator + queue managers on completion. The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- 100ms even on 10M+ row trace tables — so this branch costs little even when it ends up taking the sync path. + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @param body (required) + * @return AutomationRuleEvaluateResponse + * @throws ApiException if fails to make API call + */ + public AutomationRuleEvaluateResponse modelHubAnnotationQueuesAutomationRulesEvaluate(String queueId, UUID id, Object body) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo(queueId, id, body); + return localVarResponse.getData(); + } + + /** + * Trigger a manual rule run with a sync-or-async branch. + * Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish in the HTTP request and return 200 with the result — fast feedback for the common case. Large runs (mostly first-ever runs on backlogs or rules with wide filters) hand the work to a Temporal activity and return 202 immediately. The activity emails creator + queue managers on completion. The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- 100ms even on 10M+ row trace tables — so this branch costs little even when it ends up taking the sync path. + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @param body (required) + * @return ApiResponse<AutomationRuleEvaluateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesEvaluateWithHttpInfo(String queueId, UUID id, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesEvaluateRequestBuilder(queueId, id, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesEvaluate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesEvaluateRequestBuilder(String queueId, UUID id, Object body) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesEvaluate"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesAutomationRulesEvaluate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling modelHubAnnotationQueuesAutomationRulesEvaluate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubAnnotationQueuesAutomationRulesList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubAnnotationQueuesAutomationRulesList200Response modelHubAnnotationQueuesAutomationRulesList(String queueId, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesAutomationRulesListWithHttpInfo(queueId, page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubAnnotationQueuesAutomationRulesList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesListWithHttpInfo(String queueId, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesListRequestBuilder(queueId, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesListRequestBuilder(String queueId, Integer page, Integer limit) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @param automationRule (required) + * @return AutomationRule + * @throws ApiException if fails to make API call + */ + public AutomationRule modelHubAnnotationQueuesAutomationRulesPartialUpdate(String queueId, UUID id, AutomationRule automationRule) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo(queueId, id, automationRule); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @param automationRule (required) + * @return ApiResponse<AutomationRule> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesPartialUpdateWithHttpInfo(String queueId, UUID id, AutomationRule automationRule) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesPartialUpdateRequestBuilder(queueId, id, automationRule); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesPartialUpdateRequestBuilder(String queueId, UUID id, AutomationRule automationRule) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesPartialUpdate"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesAutomationRulesPartialUpdate"); + } + // verify the required parameter 'automationRule' is set + if (automationRule == null) { + throw new ApiException(400, "Missing the required parameter 'automationRule' when calling modelHubAnnotationQueuesAutomationRulesPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(automationRule); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Preview how many items match a rule (dry run). + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @return AutomationRuleEvaluateResponse + * @throws ApiException if fails to make API call + */ + public AutomationRuleEvaluateResponse modelHubAnnotationQueuesAutomationRulesPreview(String queueId, UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo(queueId, id); + return localVarResponse.getData(); + } + + /** + * + * Preview how many items match a rule (dry run). + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @return ApiResponse<AutomationRuleEvaluateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesPreviewWithHttpInfo(String queueId, UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesPreviewRequestBuilder(queueId, id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesPreview", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesPreviewRequestBuilder(String queueId, UUID id) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesPreview"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesAutomationRulesPreview"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @return AutomationRule + * @throws ApiException if fails to make API call + */ + public AutomationRule modelHubAnnotationQueuesAutomationRulesRead(String queueId, UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo(queueId, id); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @return ApiResponse<AutomationRule> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesReadWithHttpInfo(String queueId, UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesReadRequestBuilder(queueId, id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesReadRequestBuilder(String queueId, UUID id) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesRead"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesAutomationRulesRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @param automationRule (required) + * @return AutomationRule + * @throws ApiException if fails to make API call + */ + public AutomationRule modelHubAnnotationQueuesAutomationRulesUpdate(String queueId, UUID id, AutomationRule automationRule) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo(queueId, id, automationRule); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this automation rule. (required) + * @param automationRule (required) + * @return ApiResponse<AutomationRule> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesAutomationRulesUpdateWithHttpInfo(String queueId, UUID id, AutomationRule automationRule) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesAutomationRulesUpdateRequestBuilder(queueId, id, automationRule); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesAutomationRulesUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesAutomationRulesUpdateRequestBuilder(String queueId, UUID id, AutomationRule automationRule) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesAutomationRulesUpdate"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesAutomationRulesUpdate"); + } + // verify the required parameter 'automationRule' is set + if (automationRule == null) { + throw new ApiException(400, "Missing the required parameter 'automationRule' when calling modelHubAnnotationQueuesAutomationRulesUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(automationRule); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Find annotation queues for a given source that the current user can annotate. Includes queues where: - The source is a queue item AND the user is an annotator in that queue (regardless of whether the item is explicitly assigned to them) Query params: - source_type, source_id (single source) - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param sourceType (optional) + * @param sourceId (optional) + * @param sources (optional) + * @return QueueForSourceResponse + * @throws ApiException if fails to make API call + */ + public QueueForSourceResponse modelHubAnnotationQueuesForSource(Integer page, Integer limit, String sourceType, String sourceId, String sources) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesForSourceWithHttpInfo(page, limit, sourceType, sourceId, sources); + return localVarResponse.getData(); + } + + /** + * + * Find annotation queues for a given source that the current user can annotate. Includes queues where: - The source is a queue item AND the user is an annotator in that queue (regardless of whether the item is explicitly assigned to them) Query params: - source_type, source_id (single source) - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param sourceType (optional) + * @param sourceId (optional) + * @param sources (optional) + * @return ApiResponse<QueueForSourceResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesForSourceWithHttpInfo(Integer page, Integer limit, String sourceType, String sourceId, String sources) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesForSourceRequestBuilder(page, limit, sourceType, sourceId, sources); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesForSource", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesForSourceRequestBuilder(Integer page, Integer limit, String sourceType, String sourceId, String sources) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/for-source/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "source_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("source_type", sourceType)); + localVarQueryParameterBaseName = "source_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("source_id", sourceId)); + localVarQueryParameterBaseName = "sources"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sources", sources)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get or create the default annotation queue for a project, dataset, or agent definition. Default queues are open to all org members (no annotator restriction). Body params (one of): - project_id - dataset_id - agent_definition_id + * @param queueDefaultRequest (required) + * @return QueueDefaultResponse + * @throws ApiException if fails to make API call + */ + public QueueDefaultResponse modelHubAnnotationQueuesGetOrCreateDefault(QueueDefaultRequest queueDefaultRequest) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo(queueDefaultRequest); + return localVarResponse.getData(); + } + + /** + * + * Get or create the default annotation queue for a project, dataset, or agent definition. Default queues are open to all org members (no annotator restriction). Body params (one of): - project_id - dataset_id - agent_definition_id + * @param queueDefaultRequest (required) + * @return ApiResponse<QueueDefaultResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesGetOrCreateDefaultWithHttpInfo(QueueDefaultRequest queueDefaultRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesGetOrCreateDefaultRequestBuilder(queueDefaultRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesGetOrCreateDefault", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesGetOrCreateDefaultRequestBuilder(QueueDefaultRequest queueDefaultRequest) throws ApiException { + // verify the required parameter 'queueDefaultRequest' is set + if (queueDefaultRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueDefaultRequest' when calling modelHubAnnotationQueuesGetOrCreateDefault"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/get-or-create-default/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueDefaultRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Permanently remove a queue + everything attached. + * Hard delete cascades through the FK graph (rules, items, assignments, scores) via ``on_delete=CASCADE``. There is no recovery — callers must pass ``force=true`` AND the queue's exact name as ``confirm_name`` so the action can't fire from a typo'd request. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueHardDeleteRequest (required) + * @return QueueHardDeleteResponse + * @throws ApiException if fails to make API call + */ + public QueueHardDeleteResponse modelHubAnnotationQueuesHardDelete(UUID id, QueueHardDeleteRequest queueHardDeleteRequest) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesHardDeleteWithHttpInfo(id, queueHardDeleteRequest); + return localVarResponse.getData(); + } + + /** + * Permanently remove a queue + everything attached. + * Hard delete cascades through the FK graph (rules, items, assignments, scores) via ``on_delete=CASCADE``. There is no recovery — callers must pass ``force=true`` AND the queue's exact name as ``confirm_name`` so the action can't fire from a typo'd request. + * @param id A UUID string identifying this annotation queue. (required) + * @param queueHardDeleteRequest (required) + * @return ApiResponse<QueueHardDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesHardDeleteWithHttpInfo(UUID id, QueueHardDeleteRequest queueHardDeleteRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesHardDeleteRequestBuilder(id, queueHardDeleteRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesHardDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesHardDeleteRequestBuilder(UUID id, QueueHardDeleteRequest queueHardDeleteRequest) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesHardDelete"); + } + // verify the required parameter 'queueHardDeleteRequest' is set + if (queueHardDeleteRequest == null) { + throw new ApiException(400, "Missing the required parameter 'queueHardDeleteRequest' when calling modelHubAnnotationQueuesHardDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/hard-delete/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueHardDeleteRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param queueItem (required) + * @return QueueItem + * @throws ApiException if fails to make API call + */ + public QueueItem modelHubAnnotationQueuesItemsCreate(String queueId, QueueItem queueItem) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesItemsCreateWithHttpInfo(queueId, queueItem); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param queueItem (required) + * @return ApiResponse<QueueItem> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesItemsCreateWithHttpInfo(String queueId, QueueItem queueItem) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesItemsCreateRequestBuilder(queueId, queueItem); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesItemsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesItemsCreateRequestBuilder(String queueId, QueueItem queueItem) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesItemsCreate"); + } + // verify the required parameter 'queueItem' is set + if (queueItem == null) { + throw new ApiException(400, "Missing the required parameter 'queueItem' when calling modelHubAnnotationQueuesItemsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueItem); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @throws ApiException if fails to make API call + */ + public void modelHubAnnotationQueuesItemsDelete(String queueId, UUID id) throws ApiException { + modelHubAnnotationQueuesItemsDeleteWithHttpInfo(queueId, id); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesItemsDeleteWithHttpInfo(String queueId, UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesItemsDeleteRequestBuilder(queueId, id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesItemsDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesItemsDeleteRequestBuilder(String queueId, UUID id) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesItemsDelete"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesItemsDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItem (required) + * @return QueueItem + * @throws ApiException if fails to make API call + */ + public QueueItem modelHubAnnotationQueuesItemsPartialUpdate(String queueId, UUID id, QueueItem queueItem) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo(queueId, id, queueItem); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItem (required) + * @return ApiResponse<QueueItem> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesItemsPartialUpdateWithHttpInfo(String queueId, UUID id, QueueItem queueItem) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesItemsPartialUpdateRequestBuilder(queueId, id, queueItem); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesItemsPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesItemsPartialUpdateRequestBuilder(String queueId, UUID id, QueueItem queueItem) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesItemsPartialUpdate"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesItemsPartialUpdate"); + } + // verify the required parameter 'queueItem' is set + if (queueItem == null) { + throw new ApiException(400, "Missing the required parameter 'queueItem' when calling modelHubAnnotationQueuesItemsPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueItem); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @return QueueItem + * @throws ApiException if fails to make API call + */ + public QueueItem modelHubAnnotationQueuesItemsRead(String queueId, UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesItemsReadWithHttpInfo(queueId, id); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @return ApiResponse<QueueItem> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesItemsReadWithHttpInfo(String queueId, UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesItemsReadRequestBuilder(queueId, id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesItemsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesItemsReadRequestBuilder(String queueId, UUID id) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesItemsRead"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesItemsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItem (required) + * @return QueueItem + * @throws ApiException if fails to make API call + */ + public QueueItem modelHubAnnotationQueuesItemsUpdate(String queueId, UUID id, QueueItem queueItem) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesItemsUpdateWithHttpInfo(queueId, id, queueItem); + return localVarResponse.getData(); + } + + /** + * + * + * @param queueId (required) + * @param id A UUID string identifying this queue item. (required) + * @param queueItem (required) + * @return ApiResponse<QueueItem> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesItemsUpdateWithHttpInfo(String queueId, UUID id, QueueItem queueItem) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesItemsUpdateRequestBuilder(queueId, id, queueItem); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesItemsUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesItemsUpdateRequestBuilder(String queueId, UUID id, QueueItem queueItem) throws ApiException { + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException(400, "Missing the required parameter 'queueId' when calling modelHubAnnotationQueuesItemsUpdate"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesItemsUpdate"); + } + // verify the required parameter 'queueItem' is set + if (queueItem == null) { + throw new ApiException(400, "Missing the required parameter 'queueItem' when calling modelHubAnnotationQueuesItemsUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{queue_id}/items/{id}/" + .replace("{queue_id}", ApiClient.urlEncode(queueId.toString())) + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(queueItem); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @param body (required) + * @return QueueStatusResponse + * @throws ApiException if fails to make API call + */ + public QueueStatusResponse modelHubAnnotationQueuesRestore(UUID id, Object body) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesRestoreWithHttpInfo(id, body); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this annotation queue. (required) + * @param body (required) + * @return ApiResponse<QueueStatusResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesRestoreWithHttpInfo(UUID id, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesRestoreRequestBuilder(id, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesRestore", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesRestoreRequestBuilder(UUID id, Object body) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesRestore"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling modelHubAnnotationQueuesRestore"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/restore/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Only managers of the queue may update queue settings. + * @param id A UUID string identifying this annotation queue. (required) + * @param annotationQueue (required) + * @return AnnotationQueue + * @throws ApiException if fails to make API call + */ + public AnnotationQueue modelHubAnnotationQueuesUpdate(UUID id, AnnotationQueue annotationQueue) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationQueuesUpdateWithHttpInfo(id, annotationQueue); + return localVarResponse.getData(); + } + + /** + * + * Only managers of the queue may update queue settings. + * @param id A UUID string identifying this annotation queue. (required) + * @param annotationQueue (required) + * @return ApiResponse<AnnotationQueue> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationQueuesUpdateWithHttpInfo(UUID id, AnnotationQueue annotationQueue) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationQueuesUpdateRequestBuilder(id, annotationQueue); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationQueuesUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationQueuesUpdateRequestBuilder(UUID id, AnnotationQueue annotationQueue) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationQueuesUpdate"); + } + // verify the required parameter 'annotationQueue' is set + if (annotationQueue == null) { + throw new ApiException(400, "Missing the required parameter 'annotationQueue' when calling modelHubAnnotationQueuesUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotation-queues/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(annotationQueue); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Custom create to provide clearer error responses in GM format. + * @param annotationsLabels (required) + * @return AnnotationsLabels + * @throws ApiException if fails to make API call + */ + public AnnotationsLabels modelHubAnnotationsLabelsCreate(AnnotationsLabels annotationsLabels) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationsLabelsCreateWithHttpInfo(annotationsLabels); + return localVarResponse.getData(); + } + + /** + * + * Custom create to provide clearer error responses in GM format. + * @param annotationsLabels (required) + * @return ApiResponse<AnnotationsLabels> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationsLabelsCreateWithHttpInfo(AnnotationsLabels annotationsLabels) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationsLabelsCreateRequestBuilder(annotationsLabels); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationsLabelsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationsLabelsCreateRequestBuilder(AnnotationsLabels annotationsLabels) throws ApiException { + // verify the required parameter 'annotationsLabels' is set + if (annotationsLabels == null) { + throw new ApiException(400, "Missing the required parameter 'annotationsLabels' when calling modelHubAnnotationsLabelsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotations-labels/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(annotationsLabels); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void modelHubAnnotationsLabelsDelete(String id) throws ApiException { + modelHubAnnotationsLabelsDeleteWithHttpInfo(id); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationsLabelsDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationsLabelsDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationsLabelsDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationsLabelsDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationsLabelsDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotations-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param dataset (optional) + * @param projectId (optional) + * @param type (optional) + * @param search (optional) + * @param includeUsageCount (optional) + * @param includeArchived (optional) + * @return List<AnnotationsLabels> + * @throws ApiException if fails to make API call + */ + public List modelHubAnnotationsLabelsList(Integer page, Integer limit, UUID dataset, UUID projectId, String type, String search, Boolean includeUsageCount, Boolean includeArchived) throws ApiException { + ApiResponse> localVarResponse = modelHubAnnotationsLabelsListWithHttpInfo(page, limit, dataset, projectId, type, search, includeUsageCount, includeArchived); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param dataset (optional) + * @param projectId (optional) + * @param type (optional) + * @param search (optional) + * @param includeUsageCount (optional) + * @param includeArchived (optional) + * @return ApiResponse<List<AnnotationsLabels>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> modelHubAnnotationsLabelsListWithHttpInfo(Integer page, Integer limit, UUID dataset, UUID projectId, String type, String search, Boolean includeUsageCount, Boolean includeArchived) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationsLabelsListRequestBuilder(page, limit, dataset, projectId, type, search, includeUsageCount, includeArchived); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationsLabelsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationsLabelsListRequestBuilder(Integer page, Integer limit, UUID dataset, UUID projectId, String type, String search, Boolean includeUsageCount, Boolean includeArchived) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotations-labels/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "dataset"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("dataset", dataset)); + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("type", type)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "include_usage_count"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include_usage_count", includeUsageCount)); + localVarQueryParameterBaseName = "include_archived"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("include_archived", includeArchived)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param annotationsLabels (required) + * @return AnnotationsLabels + * @throws ApiException if fails to make API call + */ + public AnnotationsLabels modelHubAnnotationsLabelsPartialUpdate(String id, AnnotationsLabels annotationsLabels) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationsLabelsPartialUpdateWithHttpInfo(id, annotationsLabels); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param annotationsLabels (required) + * @return ApiResponse<AnnotationsLabels> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationsLabelsPartialUpdateWithHttpInfo(String id, AnnotationsLabels annotationsLabels) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationsLabelsPartialUpdateRequestBuilder(id, annotationsLabels); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationsLabelsPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationsLabelsPartialUpdateRequestBuilder(String id, AnnotationsLabels annotationsLabels) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationsLabelsPartialUpdate"); + } + // verify the required parameter 'annotationsLabels' is set + if (annotationsLabels == null) { + throw new ApiException(400, "Missing the required parameter 'annotationsLabels' when calling modelHubAnnotationsLabelsPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotations-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(annotationsLabels); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return AnnotationsLabels + * @throws ApiException if fails to make API call + */ + public AnnotationsLabels modelHubAnnotationsLabelsRead(String id) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationsLabelsReadWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<AnnotationsLabels> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationsLabelsReadWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationsLabelsReadRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationsLabelsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationsLabelsReadRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationsLabelsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotations-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Restore a soft-deleted (archived) annotation label. + * @param id (required) + * @param body (required) + * @return AnnotationLabelRestoreResponse + * @throws ApiException if fails to make API call + */ + public AnnotationLabelRestoreResponse modelHubAnnotationsLabelsRestore(String id, Object body) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationsLabelsRestoreWithHttpInfo(id, body); + return localVarResponse.getData(); + } + + /** + * + * Restore a soft-deleted (archived) annotation label. + * @param id (required) + * @param body (required) + * @return ApiResponse<AnnotationLabelRestoreResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationsLabelsRestoreWithHttpInfo(String id, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationsLabelsRestoreRequestBuilder(id, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationsLabelsRestore", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationsLabelsRestoreRequestBuilder(String id, Object body) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationsLabelsRestore"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling modelHubAnnotationsLabelsRestore"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotations-labels/{id}/restore/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param annotationsLabels (required) + * @return AnnotationsLabels + * @throws ApiException if fails to make API call + */ + public AnnotationsLabels modelHubAnnotationsLabelsUpdate(String id, AnnotationsLabels annotationsLabels) throws ApiException { + ApiResponse localVarResponse = modelHubAnnotationsLabelsUpdateWithHttpInfo(id, annotationsLabels); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param annotationsLabels (required) + * @return ApiResponse<AnnotationsLabels> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubAnnotationsLabelsUpdateWithHttpInfo(String id, AnnotationsLabels annotationsLabels) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubAnnotationsLabelsUpdateRequestBuilder(id, annotationsLabels); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubAnnotationsLabelsUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubAnnotationsLabelsUpdateRequestBuilder(String id, AnnotationsLabels annotationsLabels) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubAnnotationsLabelsUpdate"); + } + // verify the required parameter 'annotationsLabels' is set + if (annotationsLabels == null) { + throw new ApiException(400, "Missing the required parameter 'annotationsLabels' when calling modelHubAnnotationsLabelsUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/annotations-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(annotationsLabels); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param apiKey (required) + * @return ApiKey + * @throws ApiException if fails to make API call + */ + public ApiKey modelHubApiKeysCreate(ApiKey apiKey) throws ApiException { + ApiResponse localVarResponse = modelHubApiKeysCreateWithHttpInfo(apiKey); + return localVarResponse.getData(); + } + + /** + * + * + * @param apiKey (required) + * @return ApiResponse<ApiKey> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubApiKeysCreateWithHttpInfo(ApiKey apiKey) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubApiKeysCreateRequestBuilder(apiKey); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubApiKeysCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubApiKeysCreateRequestBuilder(ApiKey apiKey) throws ApiException { + // verify the required parameter 'apiKey' is set + if (apiKey == null) { + throw new ApiException(400, "Missing the required parameter 'apiKey' when calling modelHubApiKeysCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/api-keys/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(apiKey); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Soft-delete an API key. + * ApiKey inherits from BaseModel, so `instance.delete()` sets: - deleted=True - deleted_at=<timestamp> and excludes it from the default manager (`objects`) queries. + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void modelHubApiKeysDelete(String id) throws ApiException { + modelHubApiKeysDeleteWithHttpInfo(id); + } + + /** + * Soft-delete an API key. + * ApiKey inherits from BaseModel, so `instance.delete()` sets: - deleted=True - deleted_at=<timestamp> and excludes it from the default manager (`objects`) queries. + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubApiKeysDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubApiKeysDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubApiKeysDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubApiKeysDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubApiKeysDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/api-keys/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubApiKeysList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubApiKeysList200Response modelHubApiKeysList(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubApiKeysListWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubApiKeysList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubApiKeysListWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubApiKeysListRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubApiKeysList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubApiKeysListRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/api-keys/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param apiKey (required) + * @return ApiKey + * @throws ApiException if fails to make API call + */ + public ApiKey modelHubApiKeysPartialUpdate(String id, ApiKey apiKey) throws ApiException { + ApiResponse localVarResponse = modelHubApiKeysPartialUpdateWithHttpInfo(id, apiKey); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param apiKey (required) + * @return ApiResponse<ApiKey> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubApiKeysPartialUpdateWithHttpInfo(String id, ApiKey apiKey) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubApiKeysPartialUpdateRequestBuilder(id, apiKey); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubApiKeysPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubApiKeysPartialUpdateRequestBuilder(String id, ApiKey apiKey) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubApiKeysPartialUpdate"); + } + // verify the required parameter 'apiKey' is set + if (apiKey == null) { + throw new ApiException(400, "Missing the required parameter 'apiKey' when calling modelHubApiKeysPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/api-keys/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(apiKey); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return ApiKey + * @throws ApiException if fails to make API call + */ + public ApiKey modelHubApiKeysRead(String id) throws ApiException { + ApiResponse localVarResponse = modelHubApiKeysReadWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<ApiKey> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubApiKeysReadWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubApiKeysReadRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubApiKeysRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubApiKeysReadRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubApiKeysRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/api-keys/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param apiKey (required) + * @return ApiKey + * @throws ApiException if fails to make API call + */ + public ApiKey modelHubApiKeysUpdate(String id, ApiKey apiKey) throws ApiException { + ApiResponse localVarResponse = modelHubApiKeysUpdateWithHttpInfo(id, apiKey); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param apiKey (required) + * @return ApiResponse<ApiKey> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubApiKeysUpdateWithHttpInfo(String id, ApiKey apiKey) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubApiKeysUpdateRequestBuilder(id, apiKey); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubApiKeysUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubApiKeysUpdateRequestBuilder(String id, ApiKey apiKey) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubApiKeysUpdate"); + } + // verify the required parameter 'apiKey' is set + if (apiKey == null) { + throw new ApiException(400, "Missing the required parameter 'apiKey' when calling modelHubApiKeysUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/api-keys/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(apiKey); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return ModelHubPaginatedResponse + * @throws ApiException if fails to make API call + */ + public ModelHubPaginatedResponse modelHubApiModelsListList() throws ApiException { + ApiResponse localVarResponse = modelHubApiModelsListListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<ModelHubPaginatedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubApiModelsListListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubApiModelsListListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubApiModelsListList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubApiModelsListListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/api/models_list/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return DatasetRunPromptStatsResponse + * @throws ApiException if fails to make API call + */ + public DatasetRunPromptStatsResponse modelHubDatasetRunPromptStatsList(String datasetId) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetRunPromptStatsListWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<DatasetRunPromptStatsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetRunPromptStatsListWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetRunPromptStatsListRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetRunPromptStatsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetRunPromptStatsListRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetRunPromptStatsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/dataset/{dataset_id}/run-prompt-stats/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param addApiColumnRequest (required) + * @return DynamicColumnCreateResponse + * @throws ApiException if fails to make API call + */ + public DynamicColumnCreateResponse modelHubDatasetsAddApiColumnCreate(String datasetId, AddApiColumnRequest addApiColumnRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsAddApiColumnCreateWithHttpInfo(datasetId, addApiColumnRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param addApiColumnRequest (required) + * @return ApiResponse<DynamicColumnCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsAddApiColumnCreateWithHttpInfo(String datasetId, AddApiColumnRequest addApiColumnRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsAddApiColumnCreateRequestBuilder(datasetId, addApiColumnRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsAddApiColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsAddApiColumnCreateRequestBuilder(String datasetId, AddApiColumnRequest addApiColumnRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsAddApiColumnCreate"); + } + // verify the required parameter 'addApiColumnRequest' is set + if (addApiColumnRequest == null) { + throw new ApiException(400, "Missing the required parameter 'addApiColumnRequest' when calling modelHubDatasetsAddApiColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/add-api-column/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(addApiColumnRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param vectorDBColumnRequest (required) + * @return DynamicColumnCreateResponse + * @throws ApiException if fails to make API call + */ + public DynamicColumnCreateResponse modelHubDatasetsAddVectorDbColumnCreate(String datasetId, VectorDBColumnRequest vectorDBColumnRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo(datasetId, vectorDBColumnRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param vectorDBColumnRequest (required) + * @return ApiResponse<DynamicColumnCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsAddVectorDbColumnCreateWithHttpInfo(String datasetId, VectorDBColumnRequest vectorDBColumnRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsAddVectorDbColumnCreateRequestBuilder(datasetId, vectorDBColumnRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsAddVectorDbColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsAddVectorDbColumnCreateRequestBuilder(String datasetId, VectorDBColumnRequest vectorDBColumnRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsAddVectorDbColumnCreate"); + } + // verify the required parameter 'vectorDBColumnRequest' is set + if (vectorDBColumnRequest == null) { + throw new ApiException(400, "Missing the required parameter 'vectorDBColumnRequest' when calling modelHubDatasetsAddVectorDbColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/add_vector_db_column/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(vectorDBColumnRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param classifyColumnRequest (required) + * @return DynamicColumnCreateResponse + * @throws ApiException if fails to make API call + */ + public DynamicColumnCreateResponse modelHubDatasetsClassifyColumnCreate(String datasetId, ClassifyColumnRequest classifyColumnRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsClassifyColumnCreateWithHttpInfo(datasetId, classifyColumnRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param classifyColumnRequest (required) + * @return ApiResponse<DynamicColumnCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsClassifyColumnCreateWithHttpInfo(String datasetId, ClassifyColumnRequest classifyColumnRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsClassifyColumnCreateRequestBuilder(datasetId, classifyColumnRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsClassifyColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsClassifyColumnCreateRequestBuilder(String datasetId, ClassifyColumnRequest classifyColumnRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsClassifyColumnCreate"); + } + // verify the required parameter 'classifyColumnRequest' is set + if (classifyColumnRequest == null) { + throw new ApiException(400, "Missing the required parameter 'classifyColumnRequest' when calling modelHubDatasetsClassifyColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/classify-column/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(classifyColumnRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param compareExperimentEvalRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDatasetsCompareDatasetsAddEvalCreate(String datasetId, CompareExperimentEvalRequest compareExperimentEvalRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo(datasetId, compareExperimentEvalRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param compareExperimentEvalRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsCompareDatasetsAddEvalCreateWithHttpInfo(String datasetId, CompareExperimentEvalRequest compareExperimentEvalRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsCompareDatasetsAddEvalCreateRequestBuilder(datasetId, compareExperimentEvalRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsCompareDatasetsAddEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsCompareDatasetsAddEvalCreateRequestBuilder(String datasetId, CompareExperimentEvalRequest compareExperimentEvalRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsCompareDatasetsAddEvalCreate"); + } + // verify the required parameter 'compareExperimentEvalRequest' is set + if (compareExperimentEvalRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compareExperimentEvalRequest' when calling modelHubDatasetsCompareDatasetsAddEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/compare-datasets/add-eval/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compareExperimentEvalRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param compareDataset (required) + * @return CompareDatasetResponse + * @throws ApiException if fails to make API call + */ + public CompareDatasetResponse modelHubDatasetsCompareDatasetsCreate(String datasetId, CompareDataset compareDataset) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsCompareDatasetsCreateWithHttpInfo(datasetId, compareDataset); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param compareDataset (required) + * @return ApiResponse<CompareDatasetResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsCompareDatasetsCreateWithHttpInfo(String datasetId, CompareDataset compareDataset) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsCompareDatasetsCreateRequestBuilder(datasetId, compareDataset); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsCompareDatasetsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsCompareDatasetsCreateRequestBuilder(String datasetId, CompareDataset compareDataset) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsCompareDatasetsCreate"); + } + // verify the required parameter 'compareDataset' is set + if (compareDataset == null) { + throw new ApiException(400, "Missing the required parameter 'compareDataset' when calling modelHubDatasetsCompareDatasetsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/compare-datasets/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compareDataset); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param compareDataset (required) + * @return File + * @throws ApiException if fails to make API call + */ + public File modelHubDatasetsCompareDatasetsDownloadCreate(String datasetId, CompareDataset compareDataset) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo(datasetId, compareDataset); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param compareDataset (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsCompareDatasetsDownloadCreateWithHttpInfo(String datasetId, CompareDataset compareDataset) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsCompareDatasetsDownloadCreateRequestBuilder(datasetId, compareDataset); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsCompareDatasetsDownloadCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsCompareDatasetsDownloadCreateRequestBuilder(String datasetId, CompareDataset compareDataset) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsCompareDatasetsDownloadCreate"); + } + // verify the required parameter 'compareDataset' is set + if (compareDataset == null) { + throw new ApiException(400, "Missing the required parameter 'compareDataset' when calling modelHubDatasetsCompareDatasetsDownloadCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/compare-datasets/download/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compareDataset); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param compareStartEvalsRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDatasetsCompareDatasetsStartEvalCreate(String datasetId, CompareStartEvalsRequest compareStartEvalsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo(datasetId, compareStartEvalsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param compareStartEvalsRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsCompareDatasetsStartEvalCreateWithHttpInfo(String datasetId, CompareStartEvalsRequest compareStartEvalsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsCompareDatasetsStartEvalCreateRequestBuilder(datasetId, compareStartEvalsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsCompareDatasetsStartEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsCompareDatasetsStartEvalCreateRequestBuilder(String datasetId, CompareStartEvalsRequest compareStartEvalsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsCompareDatasetsStartEvalCreate"); + } + // verify the required parameter 'compareStartEvalsRequest' is set + if (compareStartEvalsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compareStartEvalsRequest' when calling modelHubDatasetsCompareDatasetsStartEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/compare-datasets/start-eval/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compareStartEvalsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param compareEvalsListRequest (required) + * @return CompareEvalListResponse + * @throws ApiException if fails to make API call + */ + public CompareEvalListResponse modelHubDatasetsCompareGetEvalsListCreate(CompareEvalsListRequest compareEvalsListRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo(compareEvalsListRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param compareEvalsListRequest (required) + * @return ApiResponse<CompareEvalListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsCompareGetEvalsListCreateWithHttpInfo(CompareEvalsListRequest compareEvalsListRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsCompareGetEvalsListCreateRequestBuilder(compareEvalsListRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsCompareGetEvalsListCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsCompareGetEvalsListCreateRequestBuilder(CompareEvalsListRequest compareEvalsListRequest) throws ApiException { + // verify the required parameter 'compareEvalsListRequest' is set + if (compareEvalsListRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compareEvalsListRequest' when calling modelHubDatasetsCompareGetEvalsListCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/compare/get-evals-list/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compareEvalsListRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param comparePreviewRunEvalRequest (required) + * @return EvalPreviewResponse + * @throws ApiException if fails to make API call + */ + public EvalPreviewResponse modelHubDatasetsComparePreviewRunEvalCreate(ComparePreviewRunEvalRequest comparePreviewRunEvalRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo(comparePreviewRunEvalRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param comparePreviewRunEvalRequest (required) + * @return ApiResponse<EvalPreviewResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsComparePreviewRunEvalCreateWithHttpInfo(ComparePreviewRunEvalRequest comparePreviewRunEvalRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsComparePreviewRunEvalCreateRequestBuilder(comparePreviewRunEvalRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsComparePreviewRunEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsComparePreviewRunEvalCreateRequestBuilder(ComparePreviewRunEvalRequest comparePreviewRunEvalRequest) throws ApiException { + // verify the required parameter 'comparePreviewRunEvalRequest' is set + if (comparePreviewRunEvalRequest == null) { + throw new ApiException(400, "Missing the required parameter 'comparePreviewRunEvalRequest' when calling modelHubDatasetsComparePreviewRunEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/compare/preview-run-eval/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(comparePreviewRunEvalRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param compareDatasetStatsRequest (required) + * @return CompareDatasetStatsResponse + * @throws ApiException if fails to make API call + */ + public CompareDatasetStatsResponse modelHubDatasetsCompareStatsCreate(String datasetId, CompareDatasetStatsRequest compareDatasetStatsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsCompareStatsCreateWithHttpInfo(datasetId, compareDatasetStatsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param compareDatasetStatsRequest (required) + * @return ApiResponse<CompareDatasetStatsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsCompareStatsCreateWithHttpInfo(String datasetId, CompareDatasetStatsRequest compareDatasetStatsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsCompareStatsCreateRequestBuilder(datasetId, compareDatasetStatsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsCompareStatsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsCompareStatsCreateRequestBuilder(String datasetId, CompareDatasetStatsRequest compareDatasetStatsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsCompareStatsCreate"); + } + // verify the required parameter 'compareDatasetStatsRequest' is set + if (compareDatasetStatsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compareDatasetStatsRequest' when calling modelHubDatasetsCompareStatsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/compare-stats/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compareDatasetStatsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param conditionalColumnRequest (required) + * @return DynamicColumnCreateResponse + * @throws ApiException if fails to make API call + */ + public DynamicColumnCreateResponse modelHubDatasetsConditionalColumnCreate(String datasetId, ConditionalColumnRequest conditionalColumnRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsConditionalColumnCreateWithHttpInfo(datasetId, conditionalColumnRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param conditionalColumnRequest (required) + * @return ApiResponse<DynamicColumnCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsConditionalColumnCreateWithHttpInfo(String datasetId, ConditionalColumnRequest conditionalColumnRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsConditionalColumnCreateRequestBuilder(datasetId, conditionalColumnRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsConditionalColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsConditionalColumnCreateRequestBuilder(String datasetId, ConditionalColumnRequest conditionalColumnRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsConditionalColumnCreate"); + } + // verify the required parameter 'conditionalColumnRequest' is set + if (conditionalColumnRequest == null) { + throw new ApiException(400, "Missing the required parameter 'conditionalColumnRequest' when calling modelHubDatasetsConditionalColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/conditional-column/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(conditionalColumnRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param compareId (required) + * @return CompareDatasetDeleteResponse + * @throws ApiException if fails to make API call + */ + public CompareDatasetDeleteResponse modelHubDatasetsDeleteCompareDelete(String compareId) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsDeleteCompareDeleteWithHttpInfo(compareId); + return localVarResponse.getData(); + } + + /** + * + * + * @param compareId (required) + * @return ApiResponse<CompareDatasetDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsDeleteCompareDeleteWithHttpInfo(String compareId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsDeleteCompareDeleteRequestBuilder(compareId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsDeleteCompareDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsDeleteCompareDeleteRequestBuilder(String compareId) throws ApiException { + // verify the required parameter 'compareId' is set + if (compareId == null) { + throw new ApiException(400, "Missing the required parameter 'compareId' when calling modelHubDatasetsDeleteCompareDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/delete-compare/{compare_id}/" + .replace("{compare_id}", ApiClient.urlEncode(compareId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param compareId (required) + * @return CompareDatasetRowResponse + * @throws ApiException if fails to make API call + */ + public CompareDatasetRowResponse modelHubDatasetsDeleteCompareRead(String compareId) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsDeleteCompareReadWithHttpInfo(compareId); + return localVarResponse.getData(); + } + + /** + * + * + * @param compareId (required) + * @return ApiResponse<CompareDatasetRowResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsDeleteCompareReadWithHttpInfo(String compareId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsDeleteCompareReadRequestBuilder(compareId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsDeleteCompareRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsDeleteCompareReadRequestBuilder(String compareId) throws ApiException { + // verify the required parameter 'compareId' is set + if (compareId == null) { + throw new ApiException(400, "Missing the required parameter 'compareId' when calling modelHubDatasetsDeleteCompareRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/delete-compare/{compare_id}/" + .replace("{compare_id}", ApiClient.urlEncode(compareId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param duplicateRowsRequest (required) + * @return DuplicateRowsResponse + * @throws ApiException if fails to make API call + */ + public DuplicateRowsResponse modelHubDatasetsDuplicateRowsCreate(String datasetId, DuplicateRowsRequest duplicateRowsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsDuplicateRowsCreateWithHttpInfo(datasetId, duplicateRowsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param duplicateRowsRequest (required) + * @return ApiResponse<DuplicateRowsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsDuplicateRowsCreateWithHttpInfo(String datasetId, DuplicateRowsRequest duplicateRowsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsDuplicateRowsCreateRequestBuilder(datasetId, duplicateRowsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsDuplicateRowsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsDuplicateRowsCreateRequestBuilder(String datasetId, DuplicateRowsRequest duplicateRowsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsDuplicateRowsCreate"); + } + // verify the required parameter 'duplicateRowsRequest' is set + if (duplicateRowsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'duplicateRowsRequest' when calling modelHubDatasetsDuplicateRowsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/duplicate-rows/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(duplicateRowsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return DatasetExplanationSummaryResponse + * @throws ApiException if fails to make API call + */ + public DatasetExplanationSummaryResponse modelHubDatasetsExplanationSummaryRead(String datasetId) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsExplanationSummaryReadWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<DatasetExplanationSummaryResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsExplanationSummaryReadWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsExplanationSummaryReadRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsExplanationSummaryRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsExplanationSummaryReadRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsExplanationSummaryRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/explanation-summary/{dataset_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param body (required) + * @return DatasetExplanationSummaryResponse + * @throws ApiException if fails to make API call + */ + public DatasetExplanationSummaryResponse modelHubDatasetsExplanationSummaryRefreshCreate(String datasetId, Object body) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo(datasetId, body); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param body (required) + * @return ApiResponse<DatasetExplanationSummaryResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsExplanationSummaryRefreshCreateWithHttpInfo(String datasetId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsExplanationSummaryRefreshCreateRequestBuilder(datasetId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsExplanationSummaryRefreshCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsExplanationSummaryRefreshCreateRequestBuilder(String datasetId, Object body) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsExplanationSummaryRefreshCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling modelHubDatasetsExplanationSummaryRefreshCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/explanation-summary/{dataset_id}/refresh/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param extractEntitiesRequest (required) + * @return DynamicColumnMessageResponse + * @throws ApiException if fails to make API call + */ + public DynamicColumnMessageResponse modelHubDatasetsExtractEntitiesCreate(String datasetId, ExtractEntitiesRequest extractEntitiesRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsExtractEntitiesCreateWithHttpInfo(datasetId, extractEntitiesRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param extractEntitiesRequest (required) + * @return ApiResponse<DynamicColumnMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsExtractEntitiesCreateWithHttpInfo(String datasetId, ExtractEntitiesRequest extractEntitiesRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsExtractEntitiesCreateRequestBuilder(datasetId, extractEntitiesRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsExtractEntitiesCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsExtractEntitiesCreateRequestBuilder(String datasetId, ExtractEntitiesRequest extractEntitiesRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsExtractEntitiesCreate"); + } + // verify the required parameter 'extractEntitiesRequest' is set + if (extractEntitiesRequest == null) { + throw new ApiException(400, "Missing the required parameter 'extractEntitiesRequest' when calling modelHubDatasetsExtractEntitiesCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/extract-entities/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(extractEntitiesRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param compareId (required) + * @param rowId (required) + * @return CompareDatasetDeleteResponse + * @throws ApiException if fails to make API call + */ + public CompareDatasetDeleteResponse modelHubDatasetsGetCompareRowDelete(String compareId, String rowId) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsGetCompareRowDeleteWithHttpInfo(compareId, rowId); + return localVarResponse.getData(); + } + + /** + * + * + * @param compareId (required) + * @param rowId (required) + * @return ApiResponse<CompareDatasetDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsGetCompareRowDeleteWithHttpInfo(String compareId, String rowId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsGetCompareRowDeleteRequestBuilder(compareId, rowId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsGetCompareRowDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsGetCompareRowDeleteRequestBuilder(String compareId, String rowId) throws ApiException { + // verify the required parameter 'compareId' is set + if (compareId == null) { + throw new ApiException(400, "Missing the required parameter 'compareId' when calling modelHubDatasetsGetCompareRowDelete"); + } + // verify the required parameter 'rowId' is set + if (rowId == null) { + throw new ApiException(400, "Missing the required parameter 'rowId' when calling modelHubDatasetsGetCompareRowDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/" + .replace("{compare_id}", ApiClient.urlEncode(compareId.toString())) + .replace("{row_id}", ApiClient.urlEncode(rowId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param compareId (required) + * @param rowId (required) + * @return CompareDatasetRowResponse + * @throws ApiException if fails to make API call + */ + public CompareDatasetRowResponse modelHubDatasetsGetCompareRowRead(String compareId, String rowId) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsGetCompareRowReadWithHttpInfo(compareId, rowId); + return localVarResponse.getData(); + } + + /** + * + * + * @param compareId (required) + * @param rowId (required) + * @return ApiResponse<CompareDatasetRowResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsGetCompareRowReadWithHttpInfo(String compareId, String rowId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsGetCompareRowReadRequestBuilder(compareId, rowId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsGetCompareRowRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsGetCompareRowReadRequestBuilder(String compareId, String rowId) throws ApiException { + // verify the required parameter 'compareId' is set + if (compareId == null) { + throw new ApiException(400, "Missing the required parameter 'compareId' when calling modelHubDatasetsGetCompareRowRead"); + } + // verify the required parameter 'rowId' is set + if (rowId == null) { + throw new ApiException(400, "Missing the required parameter 'rowId' when calling modelHubDatasetsGetCompareRowRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/" + .replace("{compare_id}", ApiClient.urlEncode(compareId.toString())) + .replace("{row_id}", ApiClient.urlEncode(rowId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param huggingFaceDatasetDetailRequest (required) + * @return HuggingFaceDatasetDetailResponse + * @throws ApiException if fails to make API call + */ + public HuggingFaceDatasetDetailResponse modelHubDatasetsHuggingfaceDetailCreate(HuggingFaceDatasetDetailRequest huggingFaceDatasetDetailRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo(huggingFaceDatasetDetailRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param huggingFaceDatasetDetailRequest (required) + * @return ApiResponse<HuggingFaceDatasetDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsHuggingfaceDetailCreateWithHttpInfo(HuggingFaceDatasetDetailRequest huggingFaceDatasetDetailRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsHuggingfaceDetailCreateRequestBuilder(huggingFaceDatasetDetailRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsHuggingfaceDetailCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsHuggingfaceDetailCreateRequestBuilder(HuggingFaceDatasetDetailRequest huggingFaceDatasetDetailRequest) throws ApiException { + // verify the required parameter 'huggingFaceDatasetDetailRequest' is set + if (huggingFaceDatasetDetailRequest == null) { + throw new ApiException(400, "Missing the required parameter 'huggingFaceDatasetDetailRequest' when calling modelHubDatasetsHuggingfaceDetailCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/huggingface/detail/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(huggingFaceDatasetDetailRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param huggingFaceDatasetListRequest (required) + * @return HuggingFaceDatasetListResponse + * @throws ApiException if fails to make API call + */ + public HuggingFaceDatasetListResponse modelHubDatasetsHuggingfaceListCreate(HuggingFaceDatasetListRequest huggingFaceDatasetListRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsHuggingfaceListCreateWithHttpInfo(huggingFaceDatasetListRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param huggingFaceDatasetListRequest (required) + * @return ApiResponse<HuggingFaceDatasetListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsHuggingfaceListCreateWithHttpInfo(HuggingFaceDatasetListRequest huggingFaceDatasetListRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsHuggingfaceListCreateRequestBuilder(huggingFaceDatasetListRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsHuggingfaceListCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsHuggingfaceListCreateRequestBuilder(HuggingFaceDatasetListRequest huggingFaceDatasetListRequest) throws ApiException { + // verify the required parameter 'huggingFaceDatasetListRequest' is set + if (huggingFaceDatasetListRequest == null) { + throw new ApiException(400, "Missing the required parameter 'huggingFaceDatasetListRequest' when calling modelHubDatasetsHuggingfaceListCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/huggingface/list/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(huggingFaceDatasetListRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param mergeDatasetRequest (required) + * @return MergeDatasetResponse + * @throws ApiException if fails to make API call + */ + public MergeDatasetResponse modelHubDatasetsMergeCreate(String datasetId, MergeDatasetRequest mergeDatasetRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsMergeCreateWithHttpInfo(datasetId, mergeDatasetRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param mergeDatasetRequest (required) + * @return ApiResponse<MergeDatasetResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsMergeCreateWithHttpInfo(String datasetId, MergeDatasetRequest mergeDatasetRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsMergeCreateRequestBuilder(datasetId, mergeDatasetRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsMergeCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsMergeCreateRequestBuilder(String datasetId, MergeDatasetRequest mergeDatasetRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsMergeCreate"); + } + // verify the required parameter 'mergeDatasetRequest' is set + if (mergeDatasetRequest == null) { + throw new ApiException(400, "Missing the required parameter 'mergeDatasetRequest' when calling modelHubDatasetsMergeCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/merge/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(mergeDatasetRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param operationType (required) + * @param previewDatasetOperationRequest (required) + * @return PreviewDatasetOperationResponse + * @throws ApiException if fails to make API call + */ + public PreviewDatasetOperationResponse modelHubDatasetsPreviewCreate(String datasetId, String operationType, PreviewDatasetOperationRequest previewDatasetOperationRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDatasetsPreviewCreateWithHttpInfo(datasetId, operationType, previewDatasetOperationRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param operationType (required) + * @param previewDatasetOperationRequest (required) + * @return ApiResponse<PreviewDatasetOperationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDatasetsPreviewCreateWithHttpInfo(String datasetId, String operationType, PreviewDatasetOperationRequest previewDatasetOperationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDatasetsPreviewCreateRequestBuilder(datasetId, operationType, previewDatasetOperationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDatasetsPreviewCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDatasetsPreviewCreateRequestBuilder(String datasetId, String operationType, PreviewDatasetOperationRequest previewDatasetOperationRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDatasetsPreviewCreate"); + } + // verify the required parameter 'operationType' is set + if (operationType == null) { + throw new ApiException(400, "Missing the required parameter 'operationType' when calling modelHubDatasetsPreviewCreate"); + } + // verify the required parameter 'previewDatasetOperationRequest' is set + if (previewDatasetOperationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'previewDatasetOperationRequest' when calling modelHubDatasetsPreviewCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/datasets/{dataset_id}/preview/{operation_type}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{operation_type}", ApiClient.urlEncode(operationType.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(previewDatasetOperationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param deleteEvalTemplate (required) + * @return ModelHubStringResultResponse + * @throws ApiException if fails to make API call + */ + public ModelHubStringResultResponse modelHubDeleteEvalTemplateCreate(DeleteEvalTemplate deleteEvalTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubDeleteEvalTemplateCreateWithHttpInfo(deleteEvalTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param deleteEvalTemplate (required) + * @return ApiResponse<ModelHubStringResultResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDeleteEvalTemplateCreateWithHttpInfo(DeleteEvalTemplate deleteEvalTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDeleteEvalTemplateCreateRequestBuilder(deleteEvalTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDeleteEvalTemplateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDeleteEvalTemplateCreateRequestBuilder(DeleteEvalTemplate deleteEvalTemplate) throws ApiException { + // verify the required parameter 'deleteEvalTemplate' is set + if (deleteEvalTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'deleteEvalTemplate' when calling modelHubDeleteEvalTemplateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/delete-eval-template/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deleteEvalTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param addAsNewDatasetRequest (required) + * @return DatasetCopyResponse + * @throws ApiException if fails to make API call + */ + public DatasetCopyResponse modelHubDevelopsAddAsNewCreate(AddAsNewDatasetRequest addAsNewDatasetRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddAsNewCreateWithHttpInfo(addAsNewDatasetRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param addAsNewDatasetRequest (required) + * @return ApiResponse<DatasetCopyResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddAsNewCreateWithHttpInfo(AddAsNewDatasetRequest addAsNewDatasetRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddAsNewCreateRequestBuilder(addAsNewDatasetRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddAsNewCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddAsNewCreateRequestBuilder(AddAsNewDatasetRequest addAsNewDatasetRequest) throws ApiException { + // verify the required parameter 'addAsNewDatasetRequest' is set + if (addAsNewDatasetRequest == null) { + throw new ApiException(400, "Missing the required parameter 'addAsNewDatasetRequest' when calling modelHubDevelopsAddAsNewCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/add-as-new/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(addAsNewDatasetRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddEmptyColumnsRequest (required) + * @return DatasetColumnsMutationResponse + * @throws ApiException if fails to make API call + */ + public DatasetColumnsMutationResponse modelHubDevelopsAddEmptyColumnsCreate(String datasetId, DatasetAddEmptyColumnsRequest datasetAddEmptyColumnsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo(datasetId, datasetAddEmptyColumnsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddEmptyColumnsRequest (required) + * @return ApiResponse<DatasetColumnsMutationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddEmptyColumnsCreateWithHttpInfo(String datasetId, DatasetAddEmptyColumnsRequest datasetAddEmptyColumnsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddEmptyColumnsCreateRequestBuilder(datasetId, datasetAddEmptyColumnsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddEmptyColumnsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddEmptyColumnsCreateRequestBuilder(String datasetId, DatasetAddEmptyColumnsRequest datasetAddEmptyColumnsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddEmptyColumnsCreate"); + } + // verify the required parameter 'datasetAddEmptyColumnsRequest' is set + if (datasetAddEmptyColumnsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetAddEmptyColumnsRequest' when calling modelHubDevelopsAddEmptyColumnsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_empty_columns/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetAddEmptyColumnsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddEmptyRowsRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsAddEmptyRowsCreate(String datasetId, DatasetAddEmptyRowsRequest datasetAddEmptyRowsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddEmptyRowsCreateWithHttpInfo(datasetId, datasetAddEmptyRowsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddEmptyRowsRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddEmptyRowsCreateWithHttpInfo(String datasetId, DatasetAddEmptyRowsRequest datasetAddEmptyRowsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddEmptyRowsCreateRequestBuilder(datasetId, datasetAddEmptyRowsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddEmptyRowsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddEmptyRowsCreateRequestBuilder(String datasetId, DatasetAddEmptyRowsRequest datasetAddEmptyRowsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddEmptyRowsCreate"); + } + // verify the required parameter 'datasetAddEmptyRowsRequest' is set + if (datasetAddEmptyRowsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetAddEmptyRowsRequest' when calling modelHubDevelopsAddEmptyRowsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_empty_rows/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetAddEmptyRowsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Add multiple static columns to a dataset at once. + * Expected request data: { \"columns\": [ { \"new_column_name\": \"column1\", \"column_type\": \"string\", \"source\": \"OTHERS\" # optional }, { \"new_column_name\": \"column2\", \"column_type\": \"number\", \"source\": \"OTHERS\" # optional } ] } + * @param datasetId (required) + * @param datasetMultipleStaticColumnsRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsAddMultipleStaticColumnsCreate(String datasetId, DatasetMultipleStaticColumnsRequest datasetMultipleStaticColumnsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo(datasetId, datasetMultipleStaticColumnsRequest); + return localVarResponse.getData(); + } + + /** + * Add multiple static columns to a dataset at once. + * Expected request data: { \"columns\": [ { \"new_column_name\": \"column1\", \"column_type\": \"string\", \"source\": \"OTHERS\" # optional }, { \"new_column_name\": \"column2\", \"column_type\": \"number\", \"source\": \"OTHERS\" # optional } ] } + * @param datasetId (required) + * @param datasetMultipleStaticColumnsRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddMultipleStaticColumnsCreateWithHttpInfo(String datasetId, DatasetMultipleStaticColumnsRequest datasetMultipleStaticColumnsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddMultipleStaticColumnsCreateRequestBuilder(datasetId, datasetMultipleStaticColumnsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddMultipleStaticColumnsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddMultipleStaticColumnsCreateRequestBuilder(String datasetId, DatasetMultipleStaticColumnsRequest datasetMultipleStaticColumnsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddMultipleStaticColumnsCreate"); + } + // verify the required parameter 'datasetMultipleStaticColumnsRequest' is set + if (datasetMultipleStaticColumnsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetMultipleStaticColumnsRequest' when calling modelHubDevelopsAddMultipleStaticColumnsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_multiple_static_columns/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetMultipleStaticColumnsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddRowsFromExistingRequest (required) + * @return DatasetRowsImportedResponse + * @throws ApiException if fails to make API call + */ + public DatasetRowsImportedResponse modelHubDevelopsAddRowsFromExistingDatasetCreate(String datasetId, DatasetAddRowsFromExistingRequest datasetAddRowsFromExistingRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo(datasetId, datasetAddRowsFromExistingRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetAddRowsFromExistingRequest (required) + * @return ApiResponse<DatasetRowsImportedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddRowsFromExistingDatasetCreateWithHttpInfo(String datasetId, DatasetAddRowsFromExistingRequest datasetAddRowsFromExistingRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddRowsFromExistingDatasetCreateRequestBuilder(datasetId, datasetAddRowsFromExistingRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddRowsFromExistingDatasetCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddRowsFromExistingDatasetCreateRequestBuilder(String datasetId, DatasetAddRowsFromExistingRequest datasetAddRowsFromExistingRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddRowsFromExistingDatasetCreate"); + } + // verify the required parameter 'datasetAddRowsFromExistingRequest' is set + if (datasetAddRowsFromExistingRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetAddRowsFromExistingRequest' when calling modelHubDevelopsAddRowsFromExistingDatasetCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetAddRowsFromExistingRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param addRowsFromFileRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsAddRowsFromFileCreate(AddRowsFromFileRequest addRowsFromFileRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddRowsFromFileCreateWithHttpInfo(addRowsFromFileRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param addRowsFromFileRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddRowsFromFileCreateWithHttpInfo(AddRowsFromFileRequest addRowsFromFileRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddRowsFromFileCreateRequestBuilder(addRowsFromFileRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddRowsFromFileCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddRowsFromFileCreateRequestBuilder(AddRowsFromFileRequest addRowsFromFileRequest) throws ApiException { + // verify the required parameter 'addRowsFromFileRequest' is set + if (addRowsFromFileRequest == null) { + throw new ApiException(400, "Missing the required parameter 'addRowsFromFileRequest' when calling modelHubDevelopsAddRowsFromFileCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/add_rows_from_file/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(addRowsFromFileRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param huggingFaceAddRowsRequest (required) + * @return DatasetRowsImportMessageResponse + * @throws ApiException if fails to make API call + */ + public DatasetRowsImportMessageResponse modelHubDevelopsAddRowsFromHuggingfaceCreate(String datasetId, HuggingFaceAddRowsRequest huggingFaceAddRowsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo(datasetId, huggingFaceAddRowsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param huggingFaceAddRowsRequest (required) + * @return ApiResponse<DatasetRowsImportMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddRowsFromHuggingfaceCreateWithHttpInfo(String datasetId, HuggingFaceAddRowsRequest huggingFaceAddRowsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddRowsFromHuggingfaceCreateRequestBuilder(datasetId, huggingFaceAddRowsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddRowsFromHuggingfaceCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddRowsFromHuggingfaceCreateRequestBuilder(String datasetId, HuggingFaceAddRowsRequest huggingFaceAddRowsRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddRowsFromHuggingfaceCreate"); + } + // verify the required parameter 'huggingFaceAddRowsRequest' is set + if (huggingFaceAddRowsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'huggingFaceAddRowsRequest' when calling modelHubDevelopsAddRowsFromHuggingfaceCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_rows_from_huggingface/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(huggingFaceAddRowsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetSdkRowsRequest (required) + * @return DatasetSdkRowsResponse + * @throws ApiException if fails to make API call + */ + public DatasetSdkRowsResponse modelHubDevelopsAddRowsSdkCreate(DatasetSdkRowsRequest datasetSdkRowsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddRowsSdkCreateWithHttpInfo(datasetSdkRowsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetSdkRowsRequest (required) + * @return ApiResponse<DatasetSdkRowsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddRowsSdkCreateWithHttpInfo(DatasetSdkRowsRequest datasetSdkRowsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddRowsSdkCreateRequestBuilder(datasetSdkRowsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddRowsSdkCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddRowsSdkCreateRequestBuilder(DatasetSdkRowsRequest datasetSdkRowsRequest) throws ApiException { + // verify the required parameter 'datasetSdkRowsRequest' is set + if (datasetSdkRowsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetSdkRowsRequest' when calling modelHubDevelopsAddRowsSdkCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/add_rows_sdk/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetSdkRowsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param addRunPrompt (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsAddRunPromptColumnCreate(AddRunPrompt addRunPrompt) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo(addRunPrompt); + return localVarResponse.getData(); + } + + /** + * + * + * @param addRunPrompt (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddRunPromptColumnCreateWithHttpInfo(AddRunPrompt addRunPrompt) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddRunPromptColumnCreateRequestBuilder(addRunPrompt); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddRunPromptColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddRunPromptColumnCreateRequestBuilder(AddRunPrompt addRunPrompt) throws ApiException { + // verify the required parameter 'addRunPrompt' is set + if (addRunPrompt == null) { + throw new ApiException(400, "Missing the required parameter 'addRunPrompt' when calling modelHubDevelopsAddRunPromptColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/add_run_prompt_column/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(addRunPrompt); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetStaticColumnRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsAddStaticColumnCreate(String datasetId, DatasetStaticColumnRequest datasetStaticColumnRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddStaticColumnCreateWithHttpInfo(datasetId, datasetStaticColumnRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetStaticColumnRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddStaticColumnCreateWithHttpInfo(String datasetId, DatasetStaticColumnRequest datasetStaticColumnRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddStaticColumnCreateRequestBuilder(datasetId, datasetStaticColumnRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddStaticColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddStaticColumnCreateRequestBuilder(String datasetId, DatasetStaticColumnRequest datasetStaticColumnRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddStaticColumnCreate"); + } + // verify the required parameter 'datasetStaticColumnRequest' is set + if (datasetStaticColumnRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetStaticColumnRequest' when calling modelHubDevelopsAddStaticColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_static_column/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetStaticColumnRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param syntheticData (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsAddSyntheticDataCreate(String datasetId, SyntheticData syntheticData) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddSyntheticDataCreateWithHttpInfo(datasetId, syntheticData); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param syntheticData (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddSyntheticDataCreateWithHttpInfo(String datasetId, SyntheticData syntheticData) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddSyntheticDataCreateRequestBuilder(datasetId, syntheticData); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddSyntheticDataCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddSyntheticDataCreateRequestBuilder(String datasetId, SyntheticData syntheticData) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddSyntheticDataCreate"); + } + // verify the required parameter 'syntheticData' is set + if (syntheticData == null) { + throw new ApiException(400, "Missing the required parameter 'syntheticData' when calling modelHubDevelopsAddSyntheticDataCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_synthetic_data/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(syntheticData); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param userEvalMutationRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsAddUserEvalCreate(String datasetId, UserEvalMutationRequest userEvalMutationRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsAddUserEvalCreateWithHttpInfo(datasetId, userEvalMutationRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param userEvalMutationRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsAddUserEvalCreateWithHttpInfo(String datasetId, UserEvalMutationRequest userEvalMutationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsAddUserEvalCreateRequestBuilder(datasetId, userEvalMutationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsAddUserEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsAddUserEvalCreateRequestBuilder(String datasetId, UserEvalMutationRequest userEvalMutationRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsAddUserEvalCreate"); + } + // verify the required parameter 'userEvalMutationRequest' is set + if (userEvalMutationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'userEvalMutationRequest' when calling modelHubDevelopsAddUserEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/add_user_eval/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userEvalMutationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param cloneDatasetRequest (required) + * @return DatasetCopyResponse + * @throws ApiException if fails to make API call + */ + public DatasetCopyResponse modelHubDevelopsCloneDatasetCreate(String datasetId, CloneDatasetRequest cloneDatasetRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsCloneDatasetCreateWithHttpInfo(datasetId, cloneDatasetRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param cloneDatasetRequest (required) + * @return ApiResponse<DatasetCopyResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsCloneDatasetCreateWithHttpInfo(String datasetId, CloneDatasetRequest cloneDatasetRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsCloneDatasetCreateRequestBuilder(datasetId, cloneDatasetRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsCloneDatasetCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsCloneDatasetCreateRequestBuilder(String datasetId, CloneDatasetRequest cloneDatasetRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsCloneDatasetCreate"); + } + // verify the required parameter 'cloneDatasetRequest' is set + if (cloneDatasetRequest == null) { + throw new ApiException(400, "Missing the required parameter 'cloneDatasetRequest' when calling modelHubDevelopsCloneDatasetCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/clone-dataset/{dataset_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(cloneDatasetRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param expDatasetId (required) + * @param createDatasetFromExperimentRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsCreateDatasetCreate(String expDatasetId, CreateDatasetFromExperimentRequest createDatasetFromExperimentRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsCreateDatasetCreateWithHttpInfo(expDatasetId, createDatasetFromExperimentRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param expDatasetId (required) + * @param createDatasetFromExperimentRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsCreateDatasetCreateWithHttpInfo(String expDatasetId, CreateDatasetFromExperimentRequest createDatasetFromExperimentRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsCreateDatasetCreateRequestBuilder(expDatasetId, createDatasetFromExperimentRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsCreateDatasetCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsCreateDatasetCreateRequestBuilder(String expDatasetId, CreateDatasetFromExperimentRequest createDatasetFromExperimentRequest) throws ApiException { + // verify the required parameter 'expDatasetId' is set + if (expDatasetId == null) { + throw new ApiException(400, "Missing the required parameter 'expDatasetId' when calling modelHubDevelopsCreateDatasetCreate"); + } + // verify the required parameter 'createDatasetFromExperimentRequest' is set + if (createDatasetFromExperimentRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createDatasetFromExperimentRequest' when calling modelHubDevelopsCreateDatasetCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{exp_dataset_id}/create-dataset/" + .replace("{exp_dataset_id}", ApiClient.urlEncode(expDatasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createDatasetFromExperimentRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param huggingFaceDatasetCreateRequest (required) + * @return DatasetCreateStartedResponse + * @throws ApiException if fails to make API call + */ + public DatasetCreateStartedResponse modelHubDevelopsCreateDatasetFromHuggingfaceCreate(HuggingFaceDatasetCreateRequest huggingFaceDatasetCreateRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo(huggingFaceDatasetCreateRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param huggingFaceDatasetCreateRequest (required) + * @return ApiResponse<DatasetCreateStartedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsCreateDatasetFromHuggingfaceCreateWithHttpInfo(HuggingFaceDatasetCreateRequest huggingFaceDatasetCreateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsCreateDatasetFromHuggingfaceCreateRequestBuilder(huggingFaceDatasetCreateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsCreateDatasetFromHuggingfaceCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsCreateDatasetFromHuggingfaceCreateRequestBuilder(HuggingFaceDatasetCreateRequest huggingFaceDatasetCreateRequest) throws ApiException { + // verify the required parameter 'huggingFaceDatasetCreateRequest' is set + if (huggingFaceDatasetCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'huggingFaceDatasetCreateRequest' when calling modelHubDevelopsCreateDatasetFromHuggingfaceCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/create-dataset-from-huggingface/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(huggingFaceDatasetCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param syntheticDatasetCreation (required) + * @return SyntheticDatasetCreateStartedResponse + * @throws ApiException if fails to make API call + */ + public SyntheticDatasetCreateStartedResponse modelHubDevelopsCreateSyntheticDatasetCreate(SyntheticDatasetCreation syntheticDatasetCreation) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo(syntheticDatasetCreation); + return localVarResponse.getData(); + } + + /** + * + * + * @param syntheticDatasetCreation (required) + * @return ApiResponse<SyntheticDatasetCreateStartedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsCreateSyntheticDatasetCreateWithHttpInfo(SyntheticDatasetCreation syntheticDatasetCreation) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsCreateSyntheticDatasetCreateRequestBuilder(syntheticDatasetCreation); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsCreateSyntheticDatasetCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsCreateSyntheticDatasetCreateRequestBuilder(SyntheticDatasetCreation syntheticDatasetCreation) throws ApiException { + // verify the required parameter 'syntheticDatasetCreation' is set + if (syntheticDatasetCreation == null) { + throw new ApiException(400, "Missing the required parameter 'syntheticDatasetCreation' when calling modelHubDevelopsCreateSyntheticDatasetCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/create-synthetic-dataset/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(syntheticDatasetCreation); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * API endpoint to check the progress of dataset creation from file upload + * @param datasetId (required) + * @return DatasetCreationProgressResponse + * @throws ApiException if fails to make API call + */ + public DatasetCreationProgressResponse modelHubDevelopsDatasetCreationProgressRead(String datasetId) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsDatasetCreationProgressReadWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * API endpoint to check the progress of dataset creation from file upload + * @param datasetId (required) + * @return ApiResponse<DatasetCreationProgressResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsDatasetCreationProgressReadWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsDatasetCreationProgressReadRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsDatasetCreationProgressRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsDatasetCreationProgressReadRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsDatasetCreationProgressRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/dataset-creation-progress/{dataset_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @throws ApiException if fails to make API call + */ + public void modelHubDevelopsDeleteDatasetDelete() throws ApiException { + modelHubDevelopsDeleteDatasetDeleteWithHttpInfo(); + } + + /** + * + * + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsDeleteDatasetDeleteWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsDeleteDatasetDeleteRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsDeleteDatasetDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsDeleteDatasetDeleteRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/delete_dataset/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @throws ApiException if fails to make API call + */ + public void modelHubDevelopsDeleteTemplateEvalDelete(String datasetId, String evalId) throws ApiException { + modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo(datasetId, evalId); + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsDeleteTemplateEvalDeleteWithHttpInfo(String datasetId, String evalId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsDeleteTemplateEvalDeleteRequestBuilder(datasetId, evalId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsDeleteTemplateEvalDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsDeleteTemplateEvalDeleteRequestBuilder(String datasetId, String evalId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsDeleteTemplateEvalDelete"); + } + // verify the required parameter 'evalId' is set + if (evalId == null) { + throw new ApiException(400, "Missing the required parameter 'evalId' when calling modelHubDevelopsDeleteTemplateEvalDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{eval_id}", ApiClient.urlEncode(evalId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @throws ApiException if fails to make API call + */ + public void modelHubDevelopsDeleteUserEvalDelete(String datasetId, String evalId) throws ApiException { + modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo(datasetId, evalId); + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsDeleteUserEvalDeleteWithHttpInfo(String datasetId, String evalId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsDeleteUserEvalDeleteRequestBuilder(datasetId, evalId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsDeleteUserEvalDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsDeleteUserEvalDeleteRequestBuilder(String datasetId, String evalId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsDeleteUserEvalDelete"); + } + // verify the required parameter 'evalId' is set + if (evalId == null) { + throw new ApiException(400, "Missing the required parameter 'evalId' when calling modelHubDevelopsDeleteUserEvalDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{eval_id}", ApiClient.urlEncode(evalId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @param userEvalUpdateRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsEditAndRunUserEvalCreate(String datasetId, String evalId, UserEvalUpdateRequest userEvalUpdateRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo(datasetId, evalId, userEvalUpdateRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @param userEvalUpdateRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsEditAndRunUserEvalCreateWithHttpInfo(String datasetId, String evalId, UserEvalUpdateRequest userEvalUpdateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsEditAndRunUserEvalCreateRequestBuilder(datasetId, evalId, userEvalUpdateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsEditAndRunUserEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsEditAndRunUserEvalCreateRequestBuilder(String datasetId, String evalId, UserEvalUpdateRequest userEvalUpdateRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsEditAndRunUserEvalCreate"); + } + // verify the required parameter 'evalId' is set + if (evalId == null) { + throw new ApiException(400, "Missing the required parameter 'evalId' when calling modelHubDevelopsEditAndRunUserEvalCreate"); + } + // verify the required parameter 'userEvalUpdateRequest' is set + if (userEvalUpdateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'userEvalUpdateRequest' when calling modelHubDevelopsEditAndRunUserEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{eval_id}", ApiClient.urlEncode(evalId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userEvalUpdateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param datasetBehaviorRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsEditDatasetBehaviorUpdate(String datasetId, DatasetBehaviorRequest datasetBehaviorRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo(datasetId, datasetBehaviorRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param datasetBehaviorRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsEditDatasetBehaviorUpdateWithHttpInfo(String datasetId, DatasetBehaviorRequest datasetBehaviorRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsEditDatasetBehaviorUpdateRequestBuilder(datasetId, datasetBehaviorRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsEditDatasetBehaviorUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsEditDatasetBehaviorUpdateRequestBuilder(String datasetId, DatasetBehaviorRequest datasetBehaviorRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsEditDatasetBehaviorUpdate"); + } + // verify the required parameter 'datasetBehaviorRequest' is set + if (datasetBehaviorRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetBehaviorRequest' when calling modelHubDevelopsEditDatasetBehaviorUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/edit_dataset_behavior/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetBehaviorRequest); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param editRunPromptColumn (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsEditRunPromptColumnCreate(EditRunPromptColumn editRunPromptColumn) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo(editRunPromptColumn); + return localVarResponse.getData(); + } + + /** + * + * + * @param editRunPromptColumn (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsEditRunPromptColumnCreateWithHttpInfo(EditRunPromptColumn editRunPromptColumn) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsEditRunPromptColumnCreateRequestBuilder(editRunPromptColumn); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsEditRunPromptColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsEditRunPromptColumnCreateRequestBuilder(EditRunPromptColumn editRunPromptColumn) throws ApiException { + // verify the required parameter 'editRunPromptColumn' is set + if (editRunPromptColumn == null) { + throw new ApiException(400, "Missing the required parameter 'editRunPromptColumn' when calling modelHubDevelopsEditRunPromptColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/edit_run_prompt_column/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(editRunPromptColumn); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param extractJsonColumnRequest (required) + * @return DynamicColumnCreateResponse + * @throws ApiException if fails to make API call + */ + public DynamicColumnCreateResponse modelHubDevelopsExtractJsonColumnCreate(String datasetId, ExtractJsonColumnRequest extractJsonColumnRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsExtractJsonColumnCreateWithHttpInfo(datasetId, extractJsonColumnRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param extractJsonColumnRequest (required) + * @return ApiResponse<DynamicColumnCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsExtractJsonColumnCreateWithHttpInfo(String datasetId, ExtractJsonColumnRequest extractJsonColumnRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsExtractJsonColumnCreateRequestBuilder(datasetId, extractJsonColumnRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsExtractJsonColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsExtractJsonColumnCreateRequestBuilder(String datasetId, ExtractJsonColumnRequest extractJsonColumnRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsExtractJsonColumnCreate"); + } + // verify the required parameter 'extractJsonColumnRequest' is set + if (extractJsonColumnRequest == null) { + throw new ApiException(400, "Missing the required parameter 'extractJsonColumnRequest' when calling modelHubDevelopsExtractJsonColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/extract-json-column/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(extractJsonColumnRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetCellDataRequest (required) + * @return DatasetCellDataResponse + * @throws ApiException if fails to make API call + */ + public DatasetCellDataResponse modelHubDevelopsGetCellDataCreate(DatasetCellDataRequest datasetCellDataRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetCellDataCreateWithHttpInfo(datasetCellDataRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetCellDataRequest (required) + * @return ApiResponse<DatasetCellDataResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetCellDataCreateWithHttpInfo(DatasetCellDataRequest datasetCellDataRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetCellDataCreateRequestBuilder(datasetCellDataRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetCellDataCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetCellDataCreateRequestBuilder(DatasetCellDataRequest datasetCellDataRequest) throws ApiException { + // verify the required parameter 'datasetCellDataRequest' is set + if (datasetCellDataRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetCellDataRequest' when calling modelHubDevelopsGetCellDataCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/get-cell-data/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetCellDataRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return DatasetExplanationSummaryResponse + * @throws ApiException if fails to make API call + */ + public DatasetExplanationSummaryResponse modelHubDevelopsGetDerivedDatasetsRead(String datasetId) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<DatasetExplanationSummaryResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetDerivedDatasetsReadWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetDerivedDatasetsReadRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetDerivedDatasetsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetDerivedDatasetsReadRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsGetDerivedDatasetsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/get-derived-datasets/{dataset_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @param evalType (required) + * @return EvalStructureResponse + * @throws ApiException if fails to make API call + */ + public EvalStructureResponse modelHubDevelopsGetEvalStructureRead(String datasetId, String evalId, String evalType) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetEvalStructureReadWithHttpInfo(datasetId, evalId, evalType); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param evalId (required) + * @param evalType (required) + * @return ApiResponse<EvalStructureResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetEvalStructureReadWithHttpInfo(String datasetId, String evalId, String evalType) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetEvalStructureReadRequestBuilder(datasetId, evalId, evalType); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetEvalStructureRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetEvalStructureReadRequestBuilder(String datasetId, String evalId, String evalType) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsGetEvalStructureRead"); + } + // verify the required parameter 'evalId' is set + if (evalId == null) { + throw new ApiException(400, "Missing the required parameter 'evalId' when calling modelHubDevelopsGetEvalStructureRead"); + } + // verify the required parameter 'evalType' is set + if (evalType == null) { + throw new ApiException(400, "Missing the required parameter 'evalType' when calling modelHubDevelopsGetEvalStructureRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{eval_id}", ApiClient.urlEncode(evalId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "eval_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("eval_type", evalType)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return EvalListResponse + * @throws ApiException if fails to make API call + */ + public EvalListResponse modelHubDevelopsGetEvalsListList(String datasetId) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetEvalsListListWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<EvalListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetEvalsListListWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetEvalsListListRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetEvalsListList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetEvalsListListRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsGetEvalsListList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/get_evals_list/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentDatasetId (required) + * @return DatasetTableResponse + * @throws ApiException if fails to make API call + */ + public DatasetTableResponse modelHubDevelopsGetExperimentDatasetTableList(String experimentDatasetId) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo(experimentDatasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentDatasetId (required) + * @return ApiResponse<DatasetTableResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetExperimentDatasetTableListWithHttpInfo(String experimentDatasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetExperimentDatasetTableListRequestBuilder(experimentDatasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetExperimentDatasetTableList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetExperimentDatasetTableListRequestBuilder(String experimentDatasetId) throws ApiException { + // verify the required parameter 'experimentDatasetId' is set + if (experimentDatasetId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentDatasetId' when calling modelHubDevelopsGetExperimentDatasetTableList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/" + .replace("{experiment_dataset_id}", ApiClient.urlEncode(experimentDatasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return EvalFunctionListResponse + * @throws ApiException if fails to make API call + */ + public EvalFunctionListResponse modelHubDevelopsGetFunctionListList() throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetFunctionListListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<EvalFunctionListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetFunctionListListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetFunctionListListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetFunctionListList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetFunctionListListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/get_function_list/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param huggingFaceDatasetConfigRequest (required) + * @return HuggingFaceDatasetConfigResponse + * @throws ApiException if fails to make API call + */ + public HuggingFaceDatasetConfigResponse modelHubDevelopsGetHuggingfaceDatasetConfigCreate(HuggingFaceDatasetConfigRequest huggingFaceDatasetConfigRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo(huggingFaceDatasetConfigRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param huggingFaceDatasetConfigRequest (required) + * @return ApiResponse<HuggingFaceDatasetConfigResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetHuggingfaceDatasetConfigCreateWithHttpInfo(HuggingFaceDatasetConfigRequest huggingFaceDatasetConfigRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetHuggingfaceDatasetConfigCreateRequestBuilder(huggingFaceDatasetConfigRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetHuggingfaceDatasetConfigCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetHuggingfaceDatasetConfigCreateRequestBuilder(HuggingFaceDatasetConfigRequest huggingFaceDatasetConfigRequest) throws ApiException { + // verify the required parameter 'huggingFaceDatasetConfigRequest' is set + if (huggingFaceDatasetConfigRequest == null) { + throw new ApiException(400, "Missing the required parameter 'huggingFaceDatasetConfigRequest' when calling modelHubDevelopsGetHuggingfaceDatasetConfigCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/get-huggingface-dataset-config/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(huggingFaceDatasetConfigRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetRowDiffRequest (required) + * @return ExperimentRowDiffResponse + * @throws ApiException if fails to make API call + */ + public ExperimentRowDiffResponse modelHubDevelopsGetRowDiffCreate(DatasetRowDiffRequest datasetRowDiffRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsGetRowDiffCreateWithHttpInfo(datasetRowDiffRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetRowDiffRequest (required) + * @return ApiResponse<ExperimentRowDiffResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsGetRowDiffCreateWithHttpInfo(DatasetRowDiffRequest datasetRowDiffRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsGetRowDiffCreateRequestBuilder(datasetRowDiffRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsGetRowDiffCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsGetRowDiffCreateRequestBuilder(DatasetRowDiffRequest datasetRowDiffRequest) throws ApiException { + // verify the required parameter 'datasetRowDiffRequest' is set + if (datasetRowDiffRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetRowDiffRequest' when calling modelHubDevelopsGetRowDiffCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/get-row-diff/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetRowDiffRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param previewRunEvalRequest (required) + * @return EvalPreviewResponse + * @throws ApiException if fails to make API call + */ + public EvalPreviewResponse modelHubDevelopsPreviewRunEvalCreate(String datasetId, PreviewRunEvalRequest previewRunEvalRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsPreviewRunEvalCreateWithHttpInfo(datasetId, previewRunEvalRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param previewRunEvalRequest (required) + * @return ApiResponse<EvalPreviewResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsPreviewRunEvalCreateWithHttpInfo(String datasetId, PreviewRunEvalRequest previewRunEvalRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsPreviewRunEvalCreateRequestBuilder(datasetId, previewRunEvalRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsPreviewRunEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsPreviewRunEvalCreateRequestBuilder(String datasetId, PreviewRunEvalRequest previewRunEvalRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsPreviewRunEvalCreate"); + } + // verify the required parameter 'previewRunEvalRequest' is set + if (previewRunEvalRequest == null) { + throw new ApiException(400, "Missing the required parameter 'previewRunEvalRequest' when calling modelHubDevelopsPreviewRunEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/preview_run_eval/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(previewRunEvalRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param previewRunPrompt (required) + * @return RunPromptColumnPreviewResponse + * @throws ApiException if fails to make API call + */ + public RunPromptColumnPreviewResponse modelHubDevelopsPreviewRunPromptColumnCreate(PreviewRunPrompt previewRunPrompt) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo(previewRunPrompt); + return localVarResponse.getData(); + } + + /** + * + * + * @param previewRunPrompt (required) + * @return ApiResponse<RunPromptColumnPreviewResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsPreviewRunPromptColumnCreateWithHttpInfo(PreviewRunPrompt previewRunPrompt) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsPreviewRunPromptColumnCreateRequestBuilder(previewRunPrompt); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsPreviewRunPromptColumnCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsPreviewRunPromptColumnCreateRequestBuilder(PreviewRunPrompt previewRunPrompt) throws ApiException { + // verify the required parameter 'previewRunPrompt' is set + if (previewRunPrompt == null) { + throw new ApiException(400, "Missing the required parameter 'previewRunPrompt' when calling modelHubDevelopsPreviewRunPromptColumnCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/preview_run_prompt_column/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(previewRunPrompt); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return ProviderStatusResponse + * @throws ApiException if fails to make API call + */ + public ProviderStatusResponse modelHubDevelopsProviderStatusList() throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsProviderStatusListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<ProviderStatusResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsProviderStatusListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsProviderStatusListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsProviderStatusList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsProviderStatusListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/provider-status/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return RunPromptColumnConfigResponse + * @throws ApiException if fails to make API call + */ + public RunPromptColumnConfigResponse modelHubDevelopsRetrieveRunPromptColumnConfigList() throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<RunPromptColumnConfigResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsRetrieveRunPromptColumnConfigListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsRetrieveRunPromptColumnConfigListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsRetrieveRunPromptColumnConfigList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsRetrieveRunPromptColumnConfigListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/retrieve_run_prompt_column_config/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return RunPromptOptionsResponse + * @throws ApiException if fails to make API call + */ + public RunPromptOptionsResponse modelHubDevelopsRetrieveRunPromptOptionsList() throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<RunPromptOptionsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsRetrieveRunPromptOptionsListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsRetrieveRunPromptOptionsListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsRetrieveRunPromptOptionsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsRetrieveRunPromptOptionsListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/retrieve_run_prompt_options/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param startEvalsProcessRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsStartEvalsProcessCreate(String datasetId, StartEvalsProcessRequest startEvalsProcessRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsStartEvalsProcessCreateWithHttpInfo(datasetId, startEvalsProcessRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param startEvalsProcessRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsStartEvalsProcessCreateWithHttpInfo(String datasetId, StartEvalsProcessRequest startEvalsProcessRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsStartEvalsProcessCreateRequestBuilder(datasetId, startEvalsProcessRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsStartEvalsProcessCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsStartEvalsProcessCreateRequestBuilder(String datasetId, StartEvalsProcessRequest startEvalsProcessRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsStartEvalsProcessCreate"); + } + // verify the required parameter 'startEvalsProcessRequest' is set + if (startEvalsProcessRequest == null) { + throw new ApiException(400, "Missing the required parameter 'startEvalsProcessRequest' when calling modelHubDevelopsStartEvalsProcessCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/start_evals_process/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(startEvalsProcessRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. + * Accepts optional experiment_id in the body. When present, the eval is looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) and cells are updated across both base columns (source_id=eval_id) and per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + * @param datasetId (required) + * @param evalId (required) + * @param stopUserEvalRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsStopUserEvalCreate(String datasetId, String evalId, StopUserEvalRequest stopUserEvalRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsStopUserEvalCreateWithHttpInfo(datasetId, evalId, stopUserEvalRequest); + return localVarResponse.getData(); + } + + /** + * POST /develops/<dataset_id>/stop_user_eval/<eval_id>/ Stops a running evaluation by setting its status to Completed. + * Accepts optional experiment_id in the body. When present, the eval is looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) and cells are updated across both base columns (source_id=eval_id) and per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + * @param datasetId (required) + * @param evalId (required) + * @param stopUserEvalRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsStopUserEvalCreateWithHttpInfo(String datasetId, String evalId, StopUserEvalRequest stopUserEvalRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsStopUserEvalCreateRequestBuilder(datasetId, evalId, stopUserEvalRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsStopUserEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsStopUserEvalCreateRequestBuilder(String datasetId, String evalId, StopUserEvalRequest stopUserEvalRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsStopUserEvalCreate"); + } + // verify the required parameter 'evalId' is set + if (evalId == null) { + throw new ApiException(400, "Missing the required parameter 'evalId' when calling modelHubDevelopsStopUserEvalCreate"); + } + // verify the required parameter 'stopUserEvalRequest' is set + if (stopUserEvalRequest == null) { + throw new ApiException(400, "Missing the required parameter 'stopUserEvalRequest' when calling modelHubDevelopsStopUserEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{eval_id}", ApiClient.urlEncode(evalId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(stopUserEvalRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @return SyntheticDatasetConfigResponse + * @throws ApiException if fails to make API call + */ + public SyntheticDatasetConfigResponse modelHubDevelopsSyntheticConfigList(String datasetId) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsSyntheticConfigListWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @return ApiResponse<SyntheticDatasetConfigResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsSyntheticConfigListWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsSyntheticConfigListRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsSyntheticConfigList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsSyntheticConfigListRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsSyntheticConfigList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/synthetic-config/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param columnId (required) + * @param datasetUpdateColumnNameRequest (required) + * @return DevelopDatasetMessageResponse + * @throws ApiException if fails to make API call + */ + public DevelopDatasetMessageResponse modelHubDevelopsUpdateColumnNameUpdate(String datasetId, String columnId, DatasetUpdateColumnNameRequest datasetUpdateColumnNameRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo(datasetId, columnId, datasetUpdateColumnNameRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param columnId (required) + * @param datasetUpdateColumnNameRequest (required) + * @return ApiResponse<DevelopDatasetMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsUpdateColumnNameUpdateWithHttpInfo(String datasetId, String columnId, DatasetUpdateColumnNameRequest datasetUpdateColumnNameRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsUpdateColumnNameUpdateRequestBuilder(datasetId, columnId, datasetUpdateColumnNameRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsUpdateColumnNameUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsUpdateColumnNameUpdateRequestBuilder(String datasetId, String columnId, DatasetUpdateColumnNameRequest datasetUpdateColumnNameRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsUpdateColumnNameUpdate"); + } + // verify the required parameter 'columnId' is set + if (columnId == null) { + throw new ApiException(400, "Missing the required parameter 'columnId' when calling modelHubDevelopsUpdateColumnNameUpdate"); + } + // verify the required parameter 'datasetUpdateColumnNameRequest' is set + if (datasetUpdateColumnNameRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetUpdateColumnNameRequest' when calling modelHubDevelopsUpdateColumnNameUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/update_column_name/{column_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{column_id}", ApiClient.urlEncode(columnId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetUpdateColumnNameRequest); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param columnId (required) + * @param datasetUpdateColumnTypeRequest (required) + * @return ColumnTypeConversionResponse + * @throws ApiException if fails to make API call + */ + public ColumnTypeConversionResponse modelHubDevelopsUpdateColumnTypeUpdate(String datasetId, String columnId, DatasetUpdateColumnTypeRequest datasetUpdateColumnTypeRequest) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo(datasetId, columnId, datasetUpdateColumnTypeRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param columnId (required) + * @param datasetUpdateColumnTypeRequest (required) + * @return ApiResponse<ColumnTypeConversionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsUpdateColumnTypeUpdateWithHttpInfo(String datasetId, String columnId, DatasetUpdateColumnTypeRequest datasetUpdateColumnTypeRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsUpdateColumnTypeUpdateRequestBuilder(datasetId, columnId, datasetUpdateColumnTypeRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsUpdateColumnTypeUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsUpdateColumnTypeUpdateRequestBuilder(String datasetId, String columnId, DatasetUpdateColumnTypeRequest datasetUpdateColumnTypeRequest) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsUpdateColumnTypeUpdate"); + } + // verify the required parameter 'columnId' is set + if (columnId == null) { + throw new ApiException(400, "Missing the required parameter 'columnId' when calling modelHubDevelopsUpdateColumnTypeUpdate"); + } + // verify the required parameter 'datasetUpdateColumnTypeRequest' is set + if (datasetUpdateColumnTypeRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetUpdateColumnTypeRequest' when calling modelHubDevelopsUpdateColumnTypeUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/update_column_type/{column_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())) + .replace("{column_id}", ApiClient.urlEncode(columnId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetUpdateColumnTypeRequest); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetId (required) + * @param syntheticDatasetConfig (required) + * @return SyntheticDatasetUpdateResponse + * @throws ApiException if fails to make API call + */ + public SyntheticDatasetUpdateResponse modelHubDevelopsUpdateSyntheticConfigUpdate(String datasetId, SyntheticDatasetConfig syntheticDatasetConfig) throws ApiException { + ApiResponse localVarResponse = modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo(datasetId, syntheticDatasetConfig); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetId (required) + * @param syntheticDatasetConfig (required) + * @return ApiResponse<SyntheticDatasetUpdateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubDevelopsUpdateSyntheticConfigUpdateWithHttpInfo(String datasetId, SyntheticDatasetConfig syntheticDatasetConfig) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubDevelopsUpdateSyntheticConfigUpdateRequestBuilder(datasetId, syntheticDatasetConfig); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubDevelopsUpdateSyntheticConfigUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubDevelopsUpdateSyntheticConfigUpdateRequestBuilder(String datasetId, SyntheticDatasetConfig syntheticDatasetConfig) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubDevelopsUpdateSyntheticConfigUpdate"); + } + // verify the required parameter 'syntheticDatasetConfig' is set + if (syntheticDatasetConfig == null) { + throw new ApiException(400, "Missing the required parameter 'syntheticDatasetConfig' when calling modelHubDevelopsUpdateSyntheticConfigUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/develops/{dataset_id}/update-synthetic-config/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(syntheticDatasetConfig); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/bulk-delete/ + * Soft-delete multiple eval templates. Only user-owned templates can be deleted. + * @param evalTemplateBulkDeleteRequest (required) + * @return EvalTemplateBulkDeleteResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateBulkDeleteResponse modelHubEvalTemplatesBulkDeleteCreate(EvalTemplateBulkDeleteRequest evalTemplateBulkDeleteRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo(evalTemplateBulkDeleteRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/bulk-delete/ + * Soft-delete multiple eval templates. Only user-owned templates can be deleted. + * @param evalTemplateBulkDeleteRequest (required) + * @return ApiResponse<EvalTemplateBulkDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesBulkDeleteCreateWithHttpInfo(EvalTemplateBulkDeleteRequest evalTemplateBulkDeleteRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesBulkDeleteCreateRequestBuilder(evalTemplateBulkDeleteRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesBulkDeleteCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesBulkDeleteCreateRequestBuilder(EvalTemplateBulkDeleteRequest evalTemplateBulkDeleteRequest) throws ApiException { + // verify the required parameter 'evalTemplateBulkDeleteRequest' is set + if (evalTemplateBulkDeleteRequest == null) { + throw new ApiException(400, "Missing the required parameter 'evalTemplateBulkDeleteRequest' when calling modelHubEvalTemplatesBulkDeleteCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/bulk-delete/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(evalTemplateBulkDeleteRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/composite/execute-adhoc/ + * Execute a composite eval configuration without persisting it. Used by the eval create page so users can test a composite (selected children + aggregation settings) before clicking Save. Builds an unsaved parent template and unsaved child links in memory and reuses `execute_composite_children_sync` so semantics match the persisted path. + * @param compositeEvalAdhocExecuteRequest (required) + * @return CompositeEvalExecuteResponse + * @throws ApiException if fails to make API call + */ + public CompositeEvalExecuteResponse modelHubEvalTemplatesCompositeExecuteAdhocCreate(CompositeEvalAdhocExecuteRequest compositeEvalAdhocExecuteRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo(compositeEvalAdhocExecuteRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/composite/execute-adhoc/ + * Execute a composite eval configuration without persisting it. Used by the eval create page so users can test a composite (selected children + aggregation settings) before clicking Save. Builds an unsaved parent template and unsaved child links in memory and reuses `execute_composite_children_sync` so semantics match the persisted path. + * @param compositeEvalAdhocExecuteRequest (required) + * @return ApiResponse<CompositeEvalExecuteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesCompositeExecuteAdhocCreateWithHttpInfo(CompositeEvalAdhocExecuteRequest compositeEvalAdhocExecuteRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesCompositeExecuteAdhocCreateRequestBuilder(compositeEvalAdhocExecuteRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesCompositeExecuteAdhocCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesCompositeExecuteAdhocCreateRequestBuilder(CompositeEvalAdhocExecuteRequest compositeEvalAdhocExecuteRequest) throws ApiException { + // verify the required parameter 'compositeEvalAdhocExecuteRequest' is set + if (compositeEvalAdhocExecuteRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compositeEvalAdhocExecuteRequest' when calling modelHubEvalTemplatesCompositeExecuteAdhocCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/composite/execute-adhoc/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compositeEvalAdhocExecuteRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/<template_id>/composite/execute/ + * Execute all child evals in a composite and optionally aggregate results. Thin wrapper around `execute_composite_children_sync` — the same helper the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation semantics stay consistent across surfaces. + * @param templateId (required) + * @param compositeEvalExecuteRequest (required) + * @return CompositeEvalExecuteResponse + * @throws ApiException if fails to make API call + */ + public CompositeEvalExecuteResponse modelHubEvalTemplatesCompositeExecuteCreate(String templateId, CompositeEvalExecuteRequest compositeEvalExecuteRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo(templateId, compositeEvalExecuteRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/<template_id>/composite/execute/ + * Execute all child evals in a composite and optionally aggregate results. Thin wrapper around `execute_composite_children_sync` — the same helper the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation semantics stay consistent across surfaces. + * @param templateId (required) + * @param compositeEvalExecuteRequest (required) + * @return ApiResponse<CompositeEvalExecuteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesCompositeExecuteCreateWithHttpInfo(String templateId, CompositeEvalExecuteRequest compositeEvalExecuteRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesCompositeExecuteCreateRequestBuilder(templateId, compositeEvalExecuteRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesCompositeExecuteCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesCompositeExecuteCreateRequestBuilder(String templateId, CompositeEvalExecuteRequest compositeEvalExecuteRequest) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesCompositeExecuteCreate"); + } + // verify the required parameter 'compositeEvalExecuteRequest' is set + if (compositeEvalExecuteRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compositeEvalExecuteRequest' when calling modelHubEvalTemplatesCompositeExecuteCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/composite/execute/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compositeEvalExecuteRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /model-hub/eval-templates/<id>/composite/ + * Get composite eval detail with its children. + * @param templateId (required) + * @return CompositeEvalDetailResponse + * @throws ApiException if fails to make API call + */ + public CompositeEvalDetailResponse modelHubEvalTemplatesCompositeList(String templateId) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesCompositeListWithHttpInfo(templateId); + return localVarResponse.getData(); + } + + /** + * GET /model-hub/eval-templates/<id>/composite/ + * Get composite eval detail with its children. + * @param templateId (required) + * @return ApiResponse<CompositeEvalDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesCompositeListWithHttpInfo(String templateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesCompositeListRequestBuilder(templateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesCompositeList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesCompositeListRequestBuilder(String templateId) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesCompositeList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/composite/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * PATCH — partial update of a composite eval. + * Supported fields (all optional): name, description, tags, aggregation_enabled, aggregation_function, child_template_ids (replaces the child list), child_weights (map of child_id -> weight). + * @param templateId (required) + * @param compositeEvalUpdateRequest (required) + * @return CompositeEvalDetailResponse + * @throws ApiException if fails to make API call + */ + public CompositeEvalDetailResponse modelHubEvalTemplatesCompositePartialUpdate(String templateId, CompositeEvalUpdateRequest compositeEvalUpdateRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo(templateId, compositeEvalUpdateRequest); + return localVarResponse.getData(); + } + + /** + * PATCH — partial update of a composite eval. + * Supported fields (all optional): name, description, tags, aggregation_enabled, aggregation_function, child_template_ids (replaces the child list), child_weights (map of child_id -> weight). + * @param templateId (required) + * @param compositeEvalUpdateRequest (required) + * @return ApiResponse<CompositeEvalDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesCompositePartialUpdateWithHttpInfo(String templateId, CompositeEvalUpdateRequest compositeEvalUpdateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesCompositePartialUpdateRequestBuilder(templateId, compositeEvalUpdateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesCompositePartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesCompositePartialUpdateRequestBuilder(String templateId, CompositeEvalUpdateRequest compositeEvalUpdateRequest) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesCompositePartialUpdate"); + } + // verify the required parameter 'compositeEvalUpdateRequest' is set + if (compositeEvalUpdateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compositeEvalUpdateRequest' when calling modelHubEvalTemplatesCompositePartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/composite/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compositeEvalUpdateRequest); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/create-composite/ + * Create a composite eval from a list of existing eval template IDs. + * @param compositeEvalCreateRequest (required) + * @return CompositeEvalCreateResponse + * @throws ApiException if fails to make API call + */ + public CompositeEvalCreateResponse modelHubEvalTemplatesCreateCompositeCreate(CompositeEvalCreateRequest compositeEvalCreateRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo(compositeEvalCreateRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/create-composite/ + * Create a composite eval from a list of existing eval template IDs. + * @param compositeEvalCreateRequest (required) + * @return ApiResponse<CompositeEvalCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesCreateCompositeCreateWithHttpInfo(CompositeEvalCreateRequest compositeEvalCreateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesCreateCompositeCreateRequestBuilder(compositeEvalCreateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesCreateCompositeCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesCreateCompositeCreateRequestBuilder(CompositeEvalCreateRequest compositeEvalCreateRequest) throws ApiException { + // verify the required parameter 'compositeEvalCreateRequest' is set + if (compositeEvalCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'compositeEvalCreateRequest' when calling modelHubEvalTemplatesCreateCompositeCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/create-composite/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(compositeEvalCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/create-v2/ + * Create a single eval template with the revamped schema. Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + * @param evalTemplateCreateV2Request (required) + * @return EvalTemplateCreateResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateCreateResponse modelHubEvalTemplatesCreateV2Create(EvalTemplateCreateV2Request evalTemplateCreateV2Request) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesCreateV2CreateWithHttpInfo(evalTemplateCreateV2Request); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/create-v2/ + * Create a single eval template with the revamped schema. Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + * @param evalTemplateCreateV2Request (required) + * @return ApiResponse<EvalTemplateCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesCreateV2CreateWithHttpInfo(EvalTemplateCreateV2Request evalTemplateCreateV2Request) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesCreateV2CreateRequestBuilder(evalTemplateCreateV2Request); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesCreateV2Create", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesCreateV2CreateRequestBuilder(EvalTemplateCreateV2Request evalTemplateCreateV2Request) throws ApiException { + // verify the required parameter 'evalTemplateCreateV2Request' is set + if (evalTemplateCreateV2Request == null) { + throw new ApiException(400, "Missing the required parameter 'evalTemplateCreateV2Request' when calling modelHubEvalTemplatesCreateV2Create"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/create-v2/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(evalTemplateCreateV2Request); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /model-hub/eval-templates/<id>/detail/ + * Fetch a single eval template with all revamped fields. + * @param templateId (required) + * @return EvalTemplateDetailResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateDetailResponse modelHubEvalTemplatesDetailList(String templateId) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesDetailListWithHttpInfo(templateId); + return localVarResponse.getData(); + } + + /** + * GET /model-hub/eval-templates/<id>/detail/ + * Fetch a single eval template with all revamped fields. + * @param templateId (required) + * @return ApiResponse<EvalTemplateDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesDetailListWithHttpInfo(String templateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesDetailListRequestBuilder(templateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesDetailList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesDetailListRequestBuilder(String templateId) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesDetailList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/detail/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /model-hub/eval-templates/<id>/feedback-list/ + * Paginated feedback list with user info. Query params: page (0-based), page_size + * @param templateId (required) + * @return EvalFeedbackListResponse + * @throws ApiException if fails to make API call + */ + public EvalFeedbackListResponse modelHubEvalTemplatesFeedbackListList(String templateId) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesFeedbackListListWithHttpInfo(templateId); + return localVarResponse.getData(); + } + + /** + * GET /model-hub/eval-templates/<id>/feedback-list/ + * Paginated feedback list with user info. Query params: page (0-based), page_size + * @param templateId (required) + * @return ApiResponse<EvalFeedbackListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesFeedbackListListWithHttpInfo(String templateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesFeedbackListListRequestBuilder(templateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesFeedbackListList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesFeedbackListListRequestBuilder(String templateId) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesFeedbackListList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/feedback-list/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + * Manages ground truth configuration on the eval template's config JSONField. + * @param templateId (required) + * @return GroundTruthConfigResponse + * @throws ApiException if fails to make API call + */ + public GroundTruthConfigResponse modelHubEvalTemplatesGroundTruthConfigList(String templateId) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo(templateId); + return localVarResponse.getData(); + } + + /** + * GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + * Manages ground truth configuration on the eval template's config JSONField. + * @param templateId (required) + * @return ApiResponse<GroundTruthConfigResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesGroundTruthConfigListWithHttpInfo(String templateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesGroundTruthConfigListRequestBuilder(templateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesGroundTruthConfigList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesGroundTruthConfigListRequestBuilder(String templateId) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesGroundTruthConfigList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/ground-truth-config/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + * Manages ground truth configuration on the eval template's config JSONField. + * @param templateId (required) + * @param groundTruthConfigRequest (required) + * @return GroundTruthConfigResponse + * @throws ApiException if fails to make API call + */ + public GroundTruthConfigResponse modelHubEvalTemplatesGroundTruthConfigUpdate(String templateId, GroundTruthConfigRequest groundTruthConfigRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo(templateId, groundTruthConfigRequest); + return localVarResponse.getData(); + } + + /** + * GET/PUT /model-hub/eval-templates/<id>/ground-truth-config/ + * Manages ground truth configuration on the eval template's config JSONField. + * @param templateId (required) + * @param groundTruthConfigRequest (required) + * @return ApiResponse<GroundTruthConfigResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesGroundTruthConfigUpdateWithHttpInfo(String templateId, GroundTruthConfigRequest groundTruthConfigRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesGroundTruthConfigUpdateRequestBuilder(templateId, groundTruthConfigRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesGroundTruthConfigUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesGroundTruthConfigUpdateRequestBuilder(String templateId, GroundTruthConfigRequest groundTruthConfigRequest) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesGroundTruthConfigUpdate"); + } + // verify the required parameter 'groundTruthConfigRequest' is set + if (groundTruthConfigRequest == null) { + throw new ApiException(400, "Missing the required parameter 'groundTruthConfigRequest' when calling modelHubEvalTemplatesGroundTruthConfigUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/ground-truth-config/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(groundTruthConfigRequest); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET /model-hub/eval-templates/<id>/ground-truth/ + * @param templateId (required) + * @return GroundTruthListResponse + * @throws ApiException if fails to make API call + */ + public GroundTruthListResponse modelHubEvalTemplatesGroundTruthList(String templateId) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesGroundTruthListWithHttpInfo(templateId); + return localVarResponse.getData(); + } + + /** + * + * GET /model-hub/eval-templates/<id>/ground-truth/ + * @param templateId (required) + * @return ApiResponse<GroundTruthListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesGroundTruthListWithHttpInfo(String templateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesGroundTruthListRequestBuilder(templateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesGroundTruthList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesGroundTruthListRequestBuilder(String templateId) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesGroundTruthList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/ground-truth/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/<id>/ground-truth/upload/ + * Supports two modes: 1. JSON body: { name, columns, data, ... } 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + * @param templateId (required) + * @param groundTruthUploadRequest (required) + * @return GroundTruthUploadResponse + * @throws ApiException if fails to make API call + */ + public GroundTruthUploadResponse modelHubEvalTemplatesGroundTruthUploadCreate(String templateId, GroundTruthUploadRequest groundTruthUploadRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo(templateId, groundTruthUploadRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/<id>/ground-truth/upload/ + * Supports two modes: 1. JSON body: { name, columns, data, ... } 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + * @param templateId (required) + * @param groundTruthUploadRequest (required) + * @return ApiResponse<GroundTruthUploadResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesGroundTruthUploadCreateWithHttpInfo(String templateId, GroundTruthUploadRequest groundTruthUploadRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesGroundTruthUploadCreateRequestBuilder(templateId, groundTruthUploadRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesGroundTruthUploadCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesGroundTruthUploadCreateRequestBuilder(String templateId, GroundTruthUploadRequest groundTruthUploadRequest) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesGroundTruthUploadCreate"); + } + // verify the required parameter 'groundTruthUploadRequest' is set + if (groundTruthUploadRequest == null) { + throw new ApiException(400, "Missing the required parameter 'groundTruthUploadRequest' when calling modelHubEvalTemplatesGroundTruthUploadCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/ground-truth/upload/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(groundTruthUploadRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/list-charts/ + * Returns 30-day chart data (run counts + error rates) for a list of template IDs. Uses ClickHouse for fast analytics. Called separately from the list API so the table renders instantly while charts load async. + * @param evalTemplateListChartsRequest (required) + * @return EvalTemplateListChartsResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateListChartsResponse modelHubEvalTemplatesListChartsCreate(EvalTemplateListChartsRequest evalTemplateListChartsRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesListChartsCreateWithHttpInfo(evalTemplateListChartsRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/list-charts/ + * Returns 30-day chart data (run counts + error rates) for a list of template IDs. Uses ClickHouse for fast analytics. Called separately from the list API so the table renders instantly while charts load async. + * @param evalTemplateListChartsRequest (required) + * @return ApiResponse<EvalTemplateListChartsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesListChartsCreateWithHttpInfo(EvalTemplateListChartsRequest evalTemplateListChartsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesListChartsCreateRequestBuilder(evalTemplateListChartsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesListChartsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesListChartsCreateRequestBuilder(EvalTemplateListChartsRequest evalTemplateListChartsRequest) throws ApiException { + // verify the required parameter 'evalTemplateListChartsRequest' is set + if (evalTemplateListChartsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'evalTemplateListChartsRequest' when calling modelHubEvalTemplatesListChartsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/list-charts/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(evalTemplateListChartsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/list/ + * Returns paginated eval template list with filtering, search, and 30-day metrics. All inputs and outputs are validated with Pydantic schemas. + * @param evalListRequest (required) + * @return EvalTemplateListResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateListResponse modelHubEvalTemplatesListCreate(EvalListRequest evalListRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesListCreateWithHttpInfo(evalListRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/list/ + * Returns paginated eval template list with filtering, search, and 30-day metrics. All inputs and outputs are validated with Pydantic schemas. + * @param evalListRequest (required) + * @return ApiResponse<EvalTemplateListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesListCreateWithHttpInfo(EvalListRequest evalListRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesListCreateRequestBuilder(evalListRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesListCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesListCreateRequestBuilder(EvalListRequest evalListRequest) throws ApiException { + // verify the required parameter 'evalListRequest' is set + if (evalListRequest == null) { + throw new ApiException(400, "Missing the required parameter 'evalListRequest' when calling modelHubEvalTemplatesListCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/list/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(evalListRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * PUT /model-hub/eval-templates/<id>/update/ + * Update an eval template. Only user-owned templates can be updated. + * @param templateId (required) + * @param evalTemplateUpdateV2Request (required) + * @return EvalTemplateUpdateResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateUpdateResponse modelHubEvalTemplatesUpdateUpdate(String templateId, EvalTemplateUpdateV2Request evalTemplateUpdateV2Request) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesUpdateUpdateWithHttpInfo(templateId, evalTemplateUpdateV2Request); + return localVarResponse.getData(); + } + + /** + * PUT /model-hub/eval-templates/<id>/update/ + * Update an eval template. Only user-owned templates can be updated. + * @param templateId (required) + * @param evalTemplateUpdateV2Request (required) + * @return ApiResponse<EvalTemplateUpdateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesUpdateUpdateWithHttpInfo(String templateId, EvalTemplateUpdateV2Request evalTemplateUpdateV2Request) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesUpdateUpdateRequestBuilder(templateId, evalTemplateUpdateV2Request); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesUpdateUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesUpdateUpdateRequestBuilder(String templateId, EvalTemplateUpdateV2Request evalTemplateUpdateV2Request) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesUpdateUpdate"); + } + // verify the required parameter 'evalTemplateUpdateV2Request' is set + if (evalTemplateUpdateV2Request == null) { + throw new ApiException(400, "Missing the required parameter 'evalTemplateUpdateV2Request' when calling modelHubEvalTemplatesUpdateUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/update/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(evalTemplateUpdateV2Request); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /model-hub/eval-templates/<id>/usage/ + * Returns usage stats, chart data, and paginated eval logs. Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + * @param templateId (required) + * @return EvalUsageStatsResponse + * @throws ApiException if fails to make API call + */ + public EvalUsageStatsResponse modelHubEvalTemplatesUsageList(String templateId) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesUsageListWithHttpInfo(templateId); + return localVarResponse.getData(); + } + + /** + * GET /model-hub/eval-templates/<id>/usage/ + * Returns usage stats, chart data, and paginated eval logs. Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + * @param templateId (required) + * @return ApiResponse<EvalUsageStatsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesUsageListWithHttpInfo(String templateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesUsageListRequestBuilder(templateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesUsageList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesUsageListRequestBuilder(String templateId) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesUsageList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/usage/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/<id>/versions/create/ + * Create a new version snapshot from the current template state. + * @param templateId (required) + * @param evalTemplateVersionCreateRequest (required) + * @return EvalTemplateVersionResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateVersionResponse modelHubEvalTemplatesVersionsCreateCreate(String templateId, EvalTemplateVersionCreateRequest evalTemplateVersionCreateRequest) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo(templateId, evalTemplateVersionCreateRequest); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/<id>/versions/create/ + * Create a new version snapshot from the current template state. + * @param templateId (required) + * @param evalTemplateVersionCreateRequest (required) + * @return ApiResponse<EvalTemplateVersionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesVersionsCreateCreateWithHttpInfo(String templateId, EvalTemplateVersionCreateRequest evalTemplateVersionCreateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesVersionsCreateCreateRequestBuilder(templateId, evalTemplateVersionCreateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesVersionsCreateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesVersionsCreateCreateRequestBuilder(String templateId, EvalTemplateVersionCreateRequest evalTemplateVersionCreateRequest) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesVersionsCreateCreate"); + } + // verify the required parameter 'evalTemplateVersionCreateRequest' is set + if (evalTemplateVersionCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'evalTemplateVersionCreateRequest' when calling modelHubEvalTemplatesVersionsCreateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/versions/create/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(evalTemplateVersionCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /model-hub/eval-templates/<id>/versions/ + * List all versions for an eval template. + * @param templateId (required) + * @return EvalTemplateVersionListResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateVersionListResponse modelHubEvalTemplatesVersionsList(String templateId) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesVersionsListWithHttpInfo(templateId); + return localVarResponse.getData(); + } + + /** + * GET /model-hub/eval-templates/<id>/versions/ + * List all versions for an eval template. + * @param templateId (required) + * @return ApiResponse<EvalTemplateVersionListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesVersionsListWithHttpInfo(String templateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesVersionsListRequestBuilder(templateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesVersionsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesVersionsListRequestBuilder(String templateId) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesVersionsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/versions/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ + * Restore a version by creating a new version with the old version's config. Does NOT modify the old version — creates a new one on top. + * @param templateId (required) + * @param versionId (required) + * @param body (required) + * @return EvalTemplateVersionRestoreResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateVersionRestoreResponse modelHubEvalTemplatesVersionsRestoreCreate(String templateId, String versionId, Object body) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo(templateId, versionId, body); + return localVarResponse.getData(); + } + + /** + * POST /model-hub/eval-templates/<id>/versions/<version_id>/restore/ + * Restore a version by creating a new version with the old version's config. Does NOT modify the old version — creates a new one on top. + * @param templateId (required) + * @param versionId (required) + * @param body (required) + * @return ApiResponse<EvalTemplateVersionRestoreResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesVersionsRestoreCreateWithHttpInfo(String templateId, String versionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesVersionsRestoreCreateRequestBuilder(templateId, versionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesVersionsRestoreCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesVersionsRestoreCreateRequestBuilder(String templateId, String versionId, Object body) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesVersionsRestoreCreate"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling modelHubEvalTemplatesVersionsRestoreCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling modelHubEvalTemplatesVersionsRestoreCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/versions/{version_id}/restore/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ + * Set a specific version as the default (active) version. + * @param templateId (required) + * @param versionId (required) + * @param body (required) + * @return EvalTemplateVersionResponse + * @throws ApiException if fails to make API call + */ + public EvalTemplateVersionResponse modelHubEvalTemplatesVersionsSetDefaultUpdate(String templateId, String versionId, Object body) throws ApiException { + ApiResponse localVarResponse = modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo(templateId, versionId, body); + return localVarResponse.getData(); + } + + /** + * PUT /model-hub/eval-templates/<id>/versions/<version_id>/set-default/ + * Set a specific version as the default (active) version. + * @param templateId (required) + * @param versionId (required) + * @param body (required) + * @return ApiResponse<EvalTemplateVersionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubEvalTemplatesVersionsSetDefaultUpdateWithHttpInfo(String templateId, String versionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubEvalTemplatesVersionsSetDefaultUpdateRequestBuilder(templateId, versionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubEvalTemplatesVersionsSetDefaultUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubEvalTemplatesVersionsSetDefaultUpdateRequestBuilder(String templateId, String versionId, Object body) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubEvalTemplatesVersionsSetDefaultUpdate"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling modelHubEvalTemplatesVersionsSetDefaultUpdate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling modelHubEvalTemplatesVersionsSetDefaultUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get derived variables from run prompt columns in an experiment's snapshot dataset. Delegates to the existing get_dataset_derived_variables() service function. + * @param experimentId (required) + * @return ExperimentDerivedVariablesResponse + * @throws ApiException if fails to make API call + */ + public ExperimentDerivedVariablesResponse modelHubExperimentsV2DerivedVariablesList(String experimentId) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2DerivedVariablesListWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * Get derived variables from run prompt columns in an experiment's snapshot dataset. Delegates to the existing get_dataset_derived_variables() service function. + * @param experimentId (required) + * @return ApiResponse<ExperimentDerivedVariablesResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2DerivedVariablesListWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2DerivedVariablesListRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2DerivedVariablesList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2DerivedVariablesListRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling modelHubExperimentsV2DerivedVariablesList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/derived-variables/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param experimentId (required) + * @param evaluationId (required) + * @return ExperimentEvaluationStatsResponse + * @throws ApiException if fails to make API call + */ + public ExperimentEvaluationStatsResponse modelHubExperimentsV2EvaluationsStatsList(String experimentId, String evaluationId) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2EvaluationsStatsListWithHttpInfo(experimentId, evaluationId); + return localVarResponse.getData(); + } + + /** + * + * + * @param experimentId (required) + * @param evaluationId (required) + * @return ApiResponse<ExperimentEvaluationStatsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2EvaluationsStatsListWithHttpInfo(String experimentId, String evaluationId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2EvaluationsStatsListRequestBuilder(experimentId, evaluationId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2EvaluationsStatsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2EvaluationsStatsListRequestBuilder(String experimentId, String evaluationId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling modelHubExperimentsV2EvaluationsStatsList"); + } + // verify the required parameter 'evaluationId' is set + if (evaluationId == null) { + throw new ApiException(400, "Missing the required parameter 'evaluationId' when calling modelHubExperimentsV2EvaluationsStatsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())) + .replace("{evaluation_id}", ApiClient.urlEncode(evaluationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create a feedback record scoped to an experiment. + * @param experimentId (required) + * @param feedback (required) + * @return ExperimentFeedbackCreateResponse + * @throws ApiException if fails to make API call + */ + public ExperimentFeedbackCreateResponse modelHubExperimentsV2FeedbackCreate(String experimentId, Feedback feedback) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2FeedbackCreateWithHttpInfo(experimentId, feedback); + return localVarResponse.getData(); + } + + /** + * + * Create a feedback record scoped to an experiment. + * @param experimentId (required) + * @param feedback (required) + * @return ApiResponse<ExperimentFeedbackCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2FeedbackCreateWithHttpInfo(String experimentId, Feedback feedback) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2FeedbackCreateRequestBuilder(experimentId, feedback); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2FeedbackCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2FeedbackCreateRequestBuilder(String experimentId, Feedback feedback) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling modelHubExperimentsV2FeedbackCreate"); + } + // verify the required parameter 'feedback' is set + if (feedback == null) { + throw new ApiException(400, "Missing the required parameter 'feedback' when calling modelHubExperimentsV2FeedbackCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/feedback/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(feedback); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get previous feedback details for a metric+row in an experiment. + * @param experimentId (required) + * @return ExperimentFeedbackDetailsResponse + * @throws ApiException if fails to make API call + */ + public ExperimentFeedbackDetailsResponse modelHubExperimentsV2FeedbackGetFeedbackDetailsList(String experimentId) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * Get previous feedback details for a metric+row in an experiment. + * @param experimentId (required) + * @return ApiResponse<ExperimentFeedbackDetailsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2FeedbackGetFeedbackDetailsListWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2FeedbackGetFeedbackDetailsListRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2FeedbackGetFeedbackDetailsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2FeedbackGetFeedbackDetailsListRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling modelHubExperimentsV2FeedbackGetFeedbackDetailsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get evaluation template details for rendering the feedback form. + * @param experimentId (required) + * @return ExperimentFeedbackTemplateResponse + * @throws ApiException if fails to make API call + */ + public ExperimentFeedbackTemplateResponse modelHubExperimentsV2FeedbackGetTemplateList(String experimentId) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo(experimentId); + return localVarResponse.getData(); + } + + /** + * + * Get evaluation template details for rendering the feedback form. + * @param experimentId (required) + * @return ApiResponse<ExperimentFeedbackTemplateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2FeedbackGetTemplateListWithHttpInfo(String experimentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2FeedbackGetTemplateListRequestBuilder(experimentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2FeedbackGetTemplateList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2FeedbackGetTemplateListRequestBuilder(String experimentId) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling modelHubExperimentsV2FeedbackGetTemplateList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/feedback/get-template/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Submit feedback action — triggers temporal eval rerun for experiments. + * @param experimentId (required) + * @param experimentFeedbackSubmitRequest (required) + * @return ExperimentFeedbackSubmitResponse + * @throws ApiException if fails to make API call + */ + public ExperimentFeedbackSubmitResponse modelHubExperimentsV2FeedbackSubmitFeedbackCreate(String experimentId, ExperimentFeedbackSubmitRequest experimentFeedbackSubmitRequest) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo(experimentId, experimentFeedbackSubmitRequest); + return localVarResponse.getData(); + } + + /** + * + * Submit feedback action — triggers temporal eval rerun for experiments. + * @param experimentId (required) + * @param experimentFeedbackSubmitRequest (required) + * @return ApiResponse<ExperimentFeedbackSubmitResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2FeedbackSubmitFeedbackCreateWithHttpInfo(String experimentId, ExperimentFeedbackSubmitRequest experimentFeedbackSubmitRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2FeedbackSubmitFeedbackCreateRequestBuilder(experimentId, experimentFeedbackSubmitRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2FeedbackSubmitFeedbackCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2FeedbackSubmitFeedbackCreateRequestBuilder(String experimentId, ExperimentFeedbackSubmitRequest experimentFeedbackSubmitRequest) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling modelHubExperimentsV2FeedbackSubmitFeedbackCreate"); + } + // verify the required parameter 'experimentFeedbackSubmitRequest' is set + if (experimentFeedbackSubmitRequest == null) { + throw new ApiException(400, "Missing the required parameter 'experimentFeedbackSubmitRequest' when calling modelHubExperimentsV2FeedbackSubmitFeedbackCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(experimentFeedbackSubmitRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Rerun specific cells or columns in a V2 experiment. + * Accepts source_ids (EDT IDs for full column rerun) and/or cells ({source_id, row_id} pairs for individual cell rerun). Resets affected output cells and dependent eval cells to RUNNING, then starts a RerunCellsV2Workflow. + * @param experimentId (required) + * @param experimentRerunCells (required) + * @return ExperimentWorkflowResponse + * @throws ApiException if fails to make API call + */ + public ExperimentWorkflowResponse modelHubExperimentsV2RerunCellsCreate(String experimentId, ExperimentRerunCells experimentRerunCells) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2RerunCellsCreateWithHttpInfo(experimentId, experimentRerunCells); + return localVarResponse.getData(); + } + + /** + * Rerun specific cells or columns in a V2 experiment. + * Accepts source_ids (EDT IDs for full column rerun) and/or cells ({source_id, row_id} pairs for individual cell rerun). Resets affected output cells and dependent eval cells to RUNNING, then starts a RerunCellsV2Workflow. + * @param experimentId (required) + * @param experimentRerunCells (required) + * @return ApiResponse<ExperimentWorkflowResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2RerunCellsCreateWithHttpInfo(String experimentId, ExperimentRerunCells experimentRerunCells) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2RerunCellsCreateRequestBuilder(experimentId, experimentRerunCells); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2RerunCellsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2RerunCellsCreateRequestBuilder(String experimentId, ExperimentRerunCells experimentRerunCells) throws ApiException { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException(400, "Missing the required parameter 'experimentId' when calling modelHubExperimentsV2RerunCellsCreate"); + } + // verify the required parameter 'experimentRerunCells' is set + if (experimentRerunCells == null) { + throw new ApiException(400, "Missing the required parameter 'experimentRerunCells' when calling modelHubExperimentsV2RerunCellsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/{experiment_id}/rerun-cells/" + .replace("{experiment_id}", ApiClient.urlEncode(experimentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(experimentRerunCells); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param datasetRowDiffRequest (required) + * @return ExperimentRowDiffResponse + * @throws ApiException if fails to make API call + */ + public ExperimentRowDiffResponse modelHubExperimentsV2RowDiffCreate(DatasetRowDiffRequest datasetRowDiffRequest) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2RowDiffCreateWithHttpInfo(datasetRowDiffRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param datasetRowDiffRequest (required) + * @return ApiResponse<ExperimentRowDiffResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2RowDiffCreateWithHttpInfo(DatasetRowDiffRequest datasetRowDiffRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2RowDiffCreateRequestBuilder(datasetRowDiffRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2RowDiffCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2RowDiffCreateRequestBuilder(DatasetRowDiffRequest datasetRowDiffRequest) throws ApiException { + // verify the required parameter 'datasetRowDiffRequest' is set + if (datasetRowDiffRequest == null) { + throw new ApiException(400, "Missing the required parameter 'datasetRowDiffRequest' when calling modelHubExperimentsV2RowDiffCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/row-diff/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(datasetRowDiffRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Generate a suggested experiment name for a dataset. + * @param datasetId (required) + * @return ExperimentNameSuggestionResponse + * @throws ApiException if fails to make API call + */ + public ExperimentNameSuggestionResponse modelHubExperimentsV2SuggestNameRead(String datasetId) throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2SuggestNameReadWithHttpInfo(datasetId); + return localVarResponse.getData(); + } + + /** + * + * Generate a suggested experiment name for a dataset. + * @param datasetId (required) + * @return ApiResponse<ExperimentNameSuggestionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2SuggestNameReadWithHttpInfo(String datasetId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2SuggestNameReadRequestBuilder(datasetId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2SuggestNameRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2SuggestNameReadRequestBuilder(String datasetId) throws ApiException { + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException(400, "Missing the required parameter 'datasetId' when calling modelHubExperimentsV2SuggestNameRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/suggest-name/{dataset_id}/" + .replace("{dataset_id}", ApiClient.urlEncode(datasetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Validate that an experiment name is unique within a dataset. + * @return ExperimentNameValidationResponse + * @throws ApiException if fails to make API call + */ + public ExperimentNameValidationResponse modelHubExperimentsV2ValidateNameList() throws ApiException { + ApiResponse localVarResponse = modelHubExperimentsV2ValidateNameListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * Validate that an experiment name is unique within a dataset. + * @return ApiResponse<ExperimentNameValidationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubExperimentsV2ValidateNameListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubExperimentsV2ValidateNameListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubExperimentsV2ValidateNameList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubExperimentsV2ValidateNameListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/experiments/v2/validate-name/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param legacyKnowledgeBaseMutationRequest (required) + * @return LegacyKnowledgeBaseCreateResponse + * @throws ApiException if fails to make API call + */ + public LegacyKnowledgeBaseCreateResponse modelHubKnowledgeBaseCreate(LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest) throws ApiException { + ApiResponse localVarResponse = modelHubKnowledgeBaseCreateWithHttpInfo(legacyKnowledgeBaseMutationRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param legacyKnowledgeBaseMutationRequest (required) + * @return ApiResponse<LegacyKnowledgeBaseCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBaseCreateWithHttpInfo(LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBaseCreateRequestBuilder(legacyKnowledgeBaseMutationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBaseCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBaseCreateRequestBuilder(LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest) throws ApiException { + // verify the required parameter 'legacyKnowledgeBaseMutationRequest' is set + if (legacyKnowledgeBaseMutationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'legacyKnowledgeBaseMutationRequest' when calling modelHubKnowledgeBaseCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(legacyKnowledgeBaseMutationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @throws ApiException if fails to make API call + */ + public void modelHubKnowledgeBaseDelete() throws ApiException { + modelHubKnowledgeBaseDeleteWithHttpInfo(); + } + + /** + * + * + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBaseDeleteWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBaseDeleteRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBaseDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBaseDeleteRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param legacyKnowledgeBaseFilesRequest (required) + * @return LegacyKnowledgeBaseFilesResponse + * @throws ApiException if fails to make API call + */ + public LegacyKnowledgeBaseFilesResponse modelHubKnowledgeBaseFilesCreate(LegacyKnowledgeBaseFilesRequest legacyKnowledgeBaseFilesRequest) throws ApiException { + ApiResponse localVarResponse = modelHubKnowledgeBaseFilesCreateWithHttpInfo(legacyKnowledgeBaseFilesRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param legacyKnowledgeBaseFilesRequest (required) + * @return ApiResponse<LegacyKnowledgeBaseFilesResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBaseFilesCreateWithHttpInfo(LegacyKnowledgeBaseFilesRequest legacyKnowledgeBaseFilesRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBaseFilesCreateRequestBuilder(legacyKnowledgeBaseFilesRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBaseFilesCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBaseFilesCreateRequestBuilder(LegacyKnowledgeBaseFilesRequest legacyKnowledgeBaseFilesRequest) throws ApiException { + // verify the required parameter 'legacyKnowledgeBaseFilesRequest' is set + if (legacyKnowledgeBaseFilesRequest == null) { + throw new ApiException(400, "Missing the required parameter 'legacyKnowledgeBaseFilesRequest' when calling modelHubKnowledgeBaseFilesCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/files/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(legacyKnowledgeBaseFilesRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @throws ApiException if fails to make API call + */ + public void modelHubKnowledgeBaseFilesDelete() throws ApiException { + modelHubKnowledgeBaseFilesDeleteWithHttpInfo(); + } + + /** + * + * + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBaseFilesDeleteWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBaseFilesDeleteRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBaseFilesDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBaseFilesDeleteRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/files/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return LegacyKnowledgeBaseTableResponse + * @throws ApiException if fails to make API call + */ + public LegacyKnowledgeBaseTableResponse modelHubKnowledgeBaseGetList() throws ApiException { + ApiResponse localVarResponse = modelHubKnowledgeBaseGetListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<LegacyKnowledgeBaseTableResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBaseGetListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBaseGetListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBaseGetList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBaseGetListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/get/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return LegacyKnowledgeBaseSdkCodeResponse + * @throws ApiException if fails to make API call + */ + public LegacyKnowledgeBaseSdkCodeResponse modelHubKnowledgeBaseList() throws ApiException { + ApiResponse localVarResponse = modelHubKnowledgeBaseListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<LegacyKnowledgeBaseSdkCodeResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBaseListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBaseListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBaseList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBaseListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return LegacyKnowledgeBaseListResponse + * @throws ApiException if fails to make API call + */ + public LegacyKnowledgeBaseListResponse modelHubKnowledgeBaseListList() throws ApiException { + ApiResponse localVarResponse = modelHubKnowledgeBaseListListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<LegacyKnowledgeBaseListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBaseListListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBaseListListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBaseListList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBaseListListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/list/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param legacyKnowledgeBaseMutationRequest (required) + * @return LegacyKnowledgeBaseMutationResponse + * @throws ApiException if fails to make API call + */ + public LegacyKnowledgeBaseMutationResponse modelHubKnowledgeBasePartialUpdate(LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest) throws ApiException { + ApiResponse localVarResponse = modelHubKnowledgeBasePartialUpdateWithHttpInfo(legacyKnowledgeBaseMutationRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param legacyKnowledgeBaseMutationRequest (required) + * @return ApiResponse<LegacyKnowledgeBaseMutationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubKnowledgeBasePartialUpdateWithHttpInfo(LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubKnowledgeBasePartialUpdateRequestBuilder(legacyKnowledgeBaseMutationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubKnowledgeBasePartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubKnowledgeBasePartialUpdateRequestBuilder(LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest) throws ApiException { + // verify the required parameter 'legacyKnowledgeBaseMutationRequest' is set + if (legacyKnowledgeBaseMutationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'legacyKnowledgeBaseMutationRequest' when calling modelHubKnowledgeBasePartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/knowledge-base/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(legacyKnowledgeBaseMutationRequest); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get detailed information about a specific PromptVersion + * @param executionId (required) + * @param templateName (optional) + * @param templateVersion (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubPromptHistoryExecutionsList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubPromptHistoryExecutionsList200Response modelHubPromptHistoryExecutionsGetExecutionDetails(String executionId, String templateName, String templateVersion, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo(executionId, templateName, templateVersion, createdAt, search, ordering, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get detailed information about a specific PromptVersion + * @param executionId (required) + * @param templateName (optional) + * @param templateVersion (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubPromptHistoryExecutionsList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptHistoryExecutionsGetExecutionDetailsWithHttpInfo(String executionId, String templateName, String templateVersion, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptHistoryExecutionsGetExecutionDetailsRequestBuilder(executionId, templateName, templateVersion, createdAt, search, ordering, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptHistoryExecutionsGetExecutionDetails", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptHistoryExecutionsGetExecutionDetailsRequestBuilder(String executionId, String templateName, String templateVersion, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + // verify the required parameter 'executionId' is set + if (executionId == null) { + throw new ApiException(400, "Missing the required parameter 'executionId' when calling modelHubPromptHistoryExecutionsGetExecutionDetails"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-history-executions/execution-details/{execution_id}/" + .replace("{execution_id}", ApiClient.urlEncode(executionId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "template_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("template_name", templateName)); + localVarQueryParameterBaseName = "template_version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("template_version", templateVersion)); + localVarQueryParameterBaseName = "created_at"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("created_at", createdAt)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "ordering"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("ordering", ordering)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param templateName (optional) + * @param templateVersion (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubPromptHistoryExecutionsList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubPromptHistoryExecutionsList200Response modelHubPromptHistoryExecutionsList(String templateName, String templateVersion, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubPromptHistoryExecutionsListWithHttpInfo(templateName, templateVersion, createdAt, search, ordering, page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param templateName (optional) + * @param templateVersion (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubPromptHistoryExecutionsList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptHistoryExecutionsListWithHttpInfo(String templateName, String templateVersion, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptHistoryExecutionsListRequestBuilder(templateName, templateVersion, createdAt, search, ordering, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptHistoryExecutionsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptHistoryExecutionsListRequestBuilder(String templateName, String templateVersion, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-history-executions/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "template_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("template_name", templateName)); + localVarQueryParameterBaseName = "template_version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("template_version", templateVersion)); + localVarQueryParameterBaseName = "created_at"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("created_at", createdAt)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "ordering"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("ordering", ordering)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt version. (required) + * @return PromptHistoryExecution + * @throws ApiException if fails to make API call + */ + public PromptHistoryExecution modelHubPromptHistoryExecutionsRead(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptHistoryExecutionsReadWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt version. (required) + * @return ApiResponse<PromptHistoryExecution> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptHistoryExecutionsReadWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptHistoryExecutionsReadRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptHistoryExecutionsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptHistoryExecutionsReadRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptHistoryExecutionsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-history-executions/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Assign a label to a specific version by template name and version name. + * @param templateId (required) + * @param labelId (required) + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsAssignLabelById(String templateId, String labelId, PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsAssignLabelByIdWithHttpInfo(templateId, labelId, promptLabel); + return localVarResponse.getData(); + } + + /** + * + * Assign a label to a specific version by template name and version name. + * @param templateId (required) + * @param labelId (required) + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsAssignLabelByIdWithHttpInfo(String templateId, String labelId, PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsAssignLabelByIdRequestBuilder(templateId, labelId, promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsAssignLabelById", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsAssignLabelByIdRequestBuilder(String templateId, String labelId, PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling modelHubPromptLabelsAssignLabelById"); + } + // verify the required parameter 'labelId' is set + if (labelId == null) { + throw new ApiException(400, "Missing the required parameter 'labelId' when calling modelHubPromptLabelsAssignLabelById"); + } + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsAssignLabelById"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/" + .replace("{template_id}", ApiClient.urlEncode(templateId.toString())) + .replace("{label_id}", ApiClient.urlEncode(labelId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsAssignMultipleLabels(PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo(promptLabel); + return localVarResponse.getData(); + } + + /** + * + * + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsAssignMultipleLabelsWithHttpInfo(PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsAssignMultipleLabelsRequestBuilder(promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsAssignMultipleLabels", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsAssignMultipleLabelsRequestBuilder(PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsAssignMultipleLabels"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/assign-multiple-labels/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsCreate(PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsCreateWithHttpInfo(promptLabel); + return localVarResponse.getData(); + } + + /** + * + * + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsCreateWithHttpInfo(PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsCreateRequestBuilder(promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsCreateRequestBuilder(PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create (idempotently) Production, Staging, Development system labels for the caller's org. + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsCreateSystemLabels(PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsCreateSystemLabelsWithHttpInfo(promptLabel); + return localVarResponse.getData(); + } + + /** + * + * Create (idempotently) Production, Staging, Development system labels for the caller's org. + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsCreateSystemLabelsWithHttpInfo(PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsCreateSystemLabelsRequestBuilder(promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsCreateSystemLabels", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsCreateSystemLabelsRequestBuilder(PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsCreateSystemLabels"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/create-system-labels/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void modelHubPromptLabelsDelete(String id) throws ApiException { + modelHubPromptLabelsDeleteWithHttpInfo(id); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptLabelsDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Fetch a prompt version by template name and either explicit version or label. + * Query params: - name: template name (required) - version: version name like v1 (optional) - label: label name like Production/Staging/Development or custom (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubPromptLabelsList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubPromptLabelsList200Response modelHubPromptLabelsGetByName(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsGetByNameWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * Fetch a prompt version by template name and either explicit version or label. + * Query params: - name: template name (required) - version: version name like v1 (optional) - label: label name like Production/Staging/Development or custom (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubPromptLabelsList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsGetByNameWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsGetByNameRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsGetByName", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsGetByNameRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/get-by-name/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubPromptLabelsList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubPromptLabelsList200Response modelHubPromptLabelsList(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsListWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubPromptLabelsList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsListWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsListRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsListRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsPartialUpdate(String id, PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsPartialUpdateWithHttpInfo(id, promptLabel); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsPartialUpdateWithHttpInfo(String id, PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsPartialUpdateRequestBuilder(id, promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsPartialUpdateRequestBuilder(String id, PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptLabelsPartialUpdate"); + } + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsRead(String id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsReadWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsReadWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsReadRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsReadRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptLabelsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Detach label from a prompt version. + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsRemoveLabelFromVersion(PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo(promptLabel); + return localVarResponse.getData(); + } + + /** + * + * Detach label from a prompt version. + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsRemoveLabelFromVersionWithHttpInfo(PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsRemoveLabelFromVersionRequestBuilder(promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsRemoveLabelFromVersion", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsRemoveLabelFromVersionRequestBuilder(PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsRemoveLabelFromVersion"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/remove/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Set default version for a template by name and version. + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsSetDefault(PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsSetDefaultWithHttpInfo(promptLabel); + return localVarResponse.getData(); + } + + /** + * + * Set default version for a template by name and version. + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsSetDefaultWithHttpInfo(PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsSetDefaultRequestBuilder(promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsSetDefault", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsSetDefaultRequestBuilder(PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsSetDefault"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/set-default/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List versions with labels for a template by name or id. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubPromptLabelsList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubPromptLabelsList200Response modelHubPromptLabelsTemplateLabels(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsTemplateLabelsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * List versions with labels for a template by name or id. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubPromptLabelsList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsTemplateLabelsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsTemplateLabelsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsTemplateLabels", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsTemplateLabelsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/template-labels/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param promptLabel (required) + * @return PromptLabel + * @throws ApiException if fails to make API call + */ + public PromptLabel modelHubPromptLabelsUpdate(String id, PromptLabel promptLabel) throws ApiException { + ApiResponse localVarResponse = modelHubPromptLabelsUpdateWithHttpInfo(id, promptLabel); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param promptLabel (required) + * @return ApiResponse<PromptLabel> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptLabelsUpdateWithHttpInfo(String id, PromptLabel promptLabel) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptLabelsUpdateRequestBuilder(id, promptLabel); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptLabelsUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptLabelsUpdateRequestBuilder(String id, PromptLabel promptLabel) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptLabelsUpdate"); + } + // verify the required parameter 'promptLabel' is set + if (promptLabel == null) { + throw new ApiException(400, "Missing the required parameter 'promptLabel' when calling modelHubPromptLabelsUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-labels/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptLabel); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create a new draft version of the PromptTemplate and return its details. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesAddNewDraft(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesAddNewDraftWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * Create a new draft version of the PromptTemplate and return its details. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesAddNewDraftWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesAddNewDraftRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesAddNewDraft", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesAddNewDraftRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesAddNewDraft"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesAddNewDraft"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/add-new-draft/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesAnalyzePrompt(PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesAnalyzePromptWithHttpInfo(promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesAnalyzePromptWithHttpInfo(PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesAnalyzePromptRequestBuilder(promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesAnalyzePrompt", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesAnalyzePromptRequestBuilder(PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesAnalyzePrompt"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/analyze-prompt/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Bulk delete prompt templates + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesBulkDelete(PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesBulkDeleteWithHttpInfo(promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * Bulk delete prompt templates + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesBulkDeleteWithHttpInfo(PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesBulkDeleteRequestBuilder(promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesBulkDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesBulkDeleteRequestBuilder(PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesBulkDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/bulk-delete/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesCommit(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesCommitWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesCommitWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesCommitRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesCommit", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesCommitRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesCommit"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesCommit"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/commit/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Compare different versions of the PromptTemplate. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesCompareVersions(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesCompareVersionsWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * Compare different versions of the PromptTemplate. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesCompareVersionsWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesCompareVersionsRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesCompareVersions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesCompareVersionsRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesCompareVersions"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesCompareVersions"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/compare-versions/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesCreate(PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesCreateWithHttpInfo(promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesCreateWithHttpInfo(PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesCreateRequestBuilder(promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesCreateRequestBuilder(PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create a draft version of the PromptTemplate and return its details. + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesCreateDraft(PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesCreateDraftWithHttpInfo(promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * Create a draft version of the PromptTemplate and return its details. + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesCreateDraftWithHttpInfo(PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesCreateDraftRequestBuilder(promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesCreateDraft", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesCreateDraftRequestBuilder(PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesCreateDraft"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/create-draft/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @throws ApiException if fails to make API call + */ + public void modelHubPromptTemplatesDelete(UUID id) throws ApiException { + modelHubPromptTemplatesDeleteWithHttpInfo(id); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesDeleteWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesDeleteRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Delete an evaluation configuration by name from a PromptTemplate. + * This endpoint allows removing an evaluation configuration from a PromptTemplate based on its unique name. + * @param id A UUID string identifying this prompt template. (required) + * @throws ApiException if fails to make API call + */ + public void modelHubPromptTemplatesDeleteEvaluationConfig(UUID id) throws ApiException { + modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo(id); + } + + /** + * Delete an evaluation configuration by name from a PromptTemplate. + * This endpoint allows removing an evaluation configuration from a PromptTemplate based on its unique name. + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesDeleteEvaluationConfigWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesDeleteEvaluationConfigRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesDeleteEvaluationConfig", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesDeleteEvaluationConfigRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesDeleteEvaluationConfig"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/delete-evaluation-config/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Manually trigger extraction of derived variables from outputs. + * This is useful when you want to re-extract variables or extract from existing outputs that weren't processed. Request body: - version: Version to extract from - column_name: Name for the output column - output_index: Optional specific output index (default: 0) - response_format_type: Optional response format hint + * @param promptId (required) + * @param derivedVariableExtractRequest (required) + * @return DerivedVariableDetailResponse + * @throws ApiException if fails to make API call + */ + public DerivedVariableDetailResponse modelHubPromptTemplatesDerivedVariablesExtractCreate(String promptId, DerivedVariableExtractRequest derivedVariableExtractRequest) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo(promptId, derivedVariableExtractRequest); + return localVarResponse.getData(); + } + + /** + * Manually trigger extraction of derived variables from outputs. + * This is useful when you want to re-extract variables or extract from existing outputs that weren't processed. Request body: - version: Version to extract from - column_name: Name for the output column - output_index: Optional specific output index (default: 0) - response_format_type: Optional response format hint + * @param promptId (required) + * @param derivedVariableExtractRequest (required) + * @return ApiResponse<DerivedVariableDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesDerivedVariablesExtractCreateWithHttpInfo(String promptId, DerivedVariableExtractRequest derivedVariableExtractRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesDerivedVariablesExtractCreateRequestBuilder(promptId, derivedVariableExtractRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesDerivedVariablesExtractCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesDerivedVariablesExtractCreateRequestBuilder(String promptId, DerivedVariableExtractRequest derivedVariableExtractRequest) throws ApiException { + // verify the required parameter 'promptId' is set + if (promptId == null) { + throw new ApiException(400, "Missing the required parameter 'promptId' when calling modelHubPromptTemplatesDerivedVariablesExtractCreate"); + } + // verify the required parameter 'derivedVariableExtractRequest' is set + if (derivedVariableExtractRequest == null) { + throw new ApiException(400, "Missing the required parameter 'derivedVariableExtractRequest' when calling modelHubPromptTemplatesDerivedVariablesExtractCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/" + .replace("{prompt_id}", ApiClient.urlEncode(promptId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(derivedVariableExtractRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get all derived variables for a prompt template. + * Returns derived variables from JSON outputs across all versions. Query params: - version: Optional version filter - column_name: Optional column name filter + * @param promptId (required) + * @return PromptDerivedVariablesResponse + * @throws ApiException if fails to make API call + */ + public PromptDerivedVariablesResponse modelHubPromptTemplatesDerivedVariablesList(String promptId) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesDerivedVariablesListWithHttpInfo(promptId); + return localVarResponse.getData(); + } + + /** + * Get all derived variables for a prompt template. + * Returns derived variables from JSON outputs across all versions. Query params: - version: Optional version filter - column_name: Optional column name filter + * @param promptId (required) + * @return ApiResponse<PromptDerivedVariablesResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesDerivedVariablesListWithHttpInfo(String promptId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesDerivedVariablesListRequestBuilder(promptId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesDerivedVariablesList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesDerivedVariablesListRequestBuilder(String promptId) throws ApiException { + // verify the required parameter 'promptId' is set + if (promptId == null) { + throw new ApiException(400, "Missing the required parameter 'promptId' when calling modelHubPromptTemplatesDerivedVariablesList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{prompt_id}/derived-variables/" + .replace("{prompt_id}", ApiClient.urlEncode(promptId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Preview derived variables from JSON content without saving. + * Useful for showing what variables would be extracted before running. Request body: - content: JSON string or object to analyze - column_name: Name for the variable prefix + * @param derivedVariablePreviewRequest (required) + * @return DerivedVariableDetailResponse + * @throws ApiException if fails to make API call + */ + public DerivedVariableDetailResponse modelHubPromptTemplatesDerivedVariablesPreviewCreate(DerivedVariablePreviewRequest derivedVariablePreviewRequest) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo(derivedVariablePreviewRequest); + return localVarResponse.getData(); + } + + /** + * Preview derived variables from JSON content without saving. + * Useful for showing what variables would be extracted before running. Request body: - content: JSON string or object to analyze - column_name: Name for the variable prefix + * @param derivedVariablePreviewRequest (required) + * @return ApiResponse<DerivedVariableDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesDerivedVariablesPreviewCreateWithHttpInfo(DerivedVariablePreviewRequest derivedVariablePreviewRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesDerivedVariablesPreviewCreateRequestBuilder(derivedVariablePreviewRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesDerivedVariablesPreviewCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesDerivedVariablesPreviewCreateRequestBuilder(DerivedVariablePreviewRequest derivedVariablePreviewRequest) throws ApiException { + // verify the required parameter 'derivedVariablePreviewRequest' is set + if (derivedVariablePreviewRequest == null) { + throw new ApiException(400, "Missing the required parameter 'derivedVariablePreviewRequest' when calling modelHubPromptTemplatesDerivedVariablesPreviewCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/derived-variables/preview/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(derivedVariablePreviewRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get the schema for derived variables of a specific column. + * Returns detailed schema information including types and sample values. Path params: - prompt_id: UUID of the prompt template - column_name: Name of the column Query params: - version: Optional version filter + * @param promptId (required) + * @param columnName (required) + * @return DerivedVariableDetailResponse + * @throws ApiException if fails to make API call + */ + public DerivedVariableDetailResponse modelHubPromptTemplatesDerivedVariablesSchemaList(String promptId, String columnName) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo(promptId, columnName); + return localVarResponse.getData(); + } + + /** + * Get the schema for derived variables of a specific column. + * Returns detailed schema information including types and sample values. Path params: - prompt_id: UUID of the prompt template - column_name: Name of the column Query params: - version: Optional version filter + * @param promptId (required) + * @param columnName (required) + * @return ApiResponse<DerivedVariableDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesDerivedVariablesSchemaListWithHttpInfo(String promptId, String columnName) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesDerivedVariablesSchemaListRequestBuilder(promptId, columnName); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesDerivedVariablesSchemaList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesDerivedVariablesSchemaListRequestBuilder(String promptId, String columnName) throws ApiException { + // verify the required parameter 'promptId' is set + if (promptId == null) { + throw new ApiException(400, "Missing the required parameter 'promptId' when calling modelHubPromptTemplatesDerivedVariablesSchemaList"); + } + // verify the required parameter 'columnName' is set + if (columnName == null) { + throw new ApiException(400, "Missing the required parameter 'columnName' when calling modelHubPromptTemplatesDerivedVariablesSchemaList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/" + .replace("{prompt_id}", ApiClient.urlEncode(promptId.toString())) + .replace("{column_name}", ApiClient.urlEncode(columnName.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesGeneratePrompt(PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGeneratePromptWithHttpInfo(promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGeneratePromptWithHttpInfo(PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGeneratePromptRequestBuilder(promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGeneratePrompt", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGeneratePromptRequestBuilder(PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesGeneratePrompt"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/generate-prompt/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Generate synthetic data for prompt variables using the SyntheticDataAgent. + * Expected payload: { \"prompt_name\": \"string\", \"prompt_instructions\": \"list/array\" , \"variable_names\": [\"string\"], \"variable_count\": \"int\", \"generation_type\": \"prompt\" } + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesGenerateVariables(PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGenerateVariablesWithHttpInfo(promptTemplate); + return localVarResponse.getData(); + } + + /** + * Generate synthetic data for prompt variables using the SyntheticDataAgent. + * Expected payload: { \"prompt_name\": \"string\", \"prompt_instructions\": \"list/array\" , \"variable_names\": [\"string\"], \"variable_count\": \"int\", \"generation_type\": \"prompt\" } + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGenerateVariablesWithHttpInfo(PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGenerateVariablesRequestBuilder(promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGenerateVariables", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGenerateVariablesRequestBuilder(PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesGenerateVariables"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/generate-variables/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get all variables from template and its executions + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesGetAllVariables(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGetAllVariablesWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Get all variables from template and its executions + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGetAllVariablesWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGetAllVariablesRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGetAllVariables", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGetAllVariablesRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesGetAllVariables"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/all-variables/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the evaluation configurations for a specific prompt template. + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesGetEvaluationConfigs(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Get the evaluation configurations for a specific prompt template. + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGetEvaluationConfigsWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGetEvaluationConfigsRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGetEvaluationConfigs", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGetEvaluationConfigsRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesGetEvaluationConfigs"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/evaluation-configs/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the next version of the PromptTemplate + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesGetNextVersion(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGetNextVersionWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Get the next version of the PromptTemplate + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGetNextVersionWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGetNextVersionRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGetNextVersion", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGetNextVersionRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesGetNextVersion"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/get-next-version/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the current status and results of a template run + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesGetRunStatus(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGetRunStatusWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Get the current status and results of a template run + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGetRunStatusWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGetRunStatusRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGetRunStatus", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGetRunStatusRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesGetRunStatus"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/get-run-status/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the prompt code in the requested format. If no format is specified, returns all formats. Supported languages: python, typescript, curl, langchain, nodejs, go + * @param id A UUID string identifying this prompt template. (required) + * @param language (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesGetSdkCode(UUID id, String language) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGetSdkCodeWithHttpInfo(id, language); + return localVarResponse.getData(); + } + + /** + * + * Get the prompt code in the requested format. If no format is specified, returns all formats. Supported languages: python, typescript, curl, langchain, nodejs, go + * @param id A UUID string identifying this prompt template. (required) + * @param language (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGetSdkCodeWithHttpInfo(UUID id, String language) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGetSdkCodeRequestBuilder(id, language); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGetSdkCode", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGetSdkCodeRequestBuilder(UUID id, String language) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesGetSdkCode"); + } + // verify the required parameter 'language' is set + if (language == null) { + throw new ApiException(400, "Missing the required parameter 'language' when calling modelHubPromptTemplatesGetSdkCode"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/get-sdk-code/{language}/" + .replace("{id}", ApiClient.urlEncode(id.toString())) + .replace("{language}", ApiClient.urlEncode(language.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Retrieve a prompt template by name. If no version is specified, returns the default version (is_default=True). If a version is specified, returns that specific version. + * @param name (optional) + * @param version (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubPromptTemplatesList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubPromptTemplatesList200Response modelHubPromptTemplatesGetTemplateByName(String name, String version, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesGetTemplateByNameWithHttpInfo(name, version, createdAt, search, ordering, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Retrieve a prompt template by name. If no version is specified, returns the default version (is_default=True). If a version is specified, returns that specific version. + * @param name (optional) + * @param version (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubPromptTemplatesList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesGetTemplateByNameWithHttpInfo(String name, String version, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesGetTemplateByNameRequestBuilder(name, version, createdAt, search, ordering, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesGetTemplateByName", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesGetTemplateByNameRequestBuilder(String name, String version, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/get-template-by-name/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("name", name)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "created_at"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("created_at", createdAt)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "ordering"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("ordering", ordering)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesImprovePrompt(PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesImprovePromptWithHttpInfo(promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesImprovePromptWithHttpInfo(PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesImprovePromptRequestBuilder(promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesImprovePrompt", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesImprovePromptRequestBuilder(PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesImprovePrompt"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/improve-prompt/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param name (optional) + * @param version (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ModelHubPromptTemplatesList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubPromptTemplatesList200Response modelHubPromptTemplatesList(String name, String version, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesListWithHttpInfo(name, version, createdAt, search, ordering, page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param name (optional) + * @param version (optional) + * @param createdAt (optional) + * @param search A search term. (optional) + * @param ordering Which field to use when ordering the results. (optional) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ModelHubPromptTemplatesList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesListWithHttpInfo(String name, String version, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesListRequestBuilder(name, version, createdAt, search, ordering, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesListRequestBuilder(String name, String version, String createdAt, String search, String ordering, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("name", name)); + localVarQueryParameterBaseName = "version"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); + localVarQueryParameterBaseName = "created_at"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("created_at", createdAt)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "ordering"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("ordering", ordering)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesPartialUpdate(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesPartialUpdateWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesPartialUpdateWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesPartialUpdateRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesPartialUpdateRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesPartialUpdate"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Retrieve a prompt template with version history and execution data. Handles caching and error cases. + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesRead(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesReadWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Retrieve a prompt template with version history and execution data. Handles caching and error cases. + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesReadWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesReadRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesReadRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesRetrieveEvaluations(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesRetrieveEvaluationsWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesRetrieveEvaluationsRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesRetrieveEvaluations", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesRetrieveEvaluationsRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesRetrieveEvaluations"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/evaluations/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesRunEvalsOnMultipleVersions(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesRunEvalsOnMultipleVersionsWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesRunEvalsOnMultipleVersionsRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesRunEvalsOnMultipleVersions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesRunEvalsOnMultipleVersionsRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesRunEvalsOnMultipleVersions"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesRunEvalsOnMultipleVersions"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Run a prompt template with the given configuration. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesRunTemplate(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesRunTemplateWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * Run a prompt template with the given configuration. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesRunTemplateWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesRunTemplateRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesRunTemplate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesRunTemplateRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesRunTemplate"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesRunTemplate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/run_template/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Save/update the name for a template. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesSaveName(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesSaveNameWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * Save/update the name for a template. + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesSaveNameWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesSaveNameRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesSaveName", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesSaveNameRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesSaveName"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesSaveName"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/save-name/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesSavePromptFolder(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesSavePromptFolderWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesSavePromptFolderWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesSavePromptFolderRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesSavePromptFolder", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesSavePromptFolderRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesSavePromptFolder"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesSavePromptFolder"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/save-prompt-folder/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Set a specific version of a prompt template as default + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesSetDefault(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesSetDefaultWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * Set a specific version of a prompt template as default + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesSetDefaultWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesSetDefaultRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesSetDefault", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesSetDefaultRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesSetDefault"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesSetDefault"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/set_default/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesStopStreaming(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesStopStreamingWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesStopStreamingWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesStopStreamingRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesStopStreaming", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesStopStreamingRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesStopStreaming"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/stop-streaming/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesUpdate(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesUpdateWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesUpdateWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesUpdateRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesUpdateRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesUpdate"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Add or update evaluation configurations for a PromptTemplate. + * This endpoint allows adding new evaluation configurations or updating existing ones in a PromptTemplate. If is_run is true, it will also run evaluations on specified versions (or latest version if none specified). + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesUpdateEvaluationConfigs(UUID id, PromptTemplate promptTemplate) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo(id, promptTemplate); + return localVarResponse.getData(); + } + + /** + * Add or update evaluation configurations for a PromptTemplate. + * This endpoint allows adding new evaluation configurations or updating existing ones in a PromptTemplate. If is_run is true, it will also run evaluations on specified versions (or latest version if none specified). + * @param id A UUID string identifying this prompt template. (required) + * @param promptTemplate (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesUpdateEvaluationConfigsWithHttpInfo(UUID id, PromptTemplate promptTemplate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesUpdateEvaluationConfigsRequestBuilder(id, promptTemplate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesUpdateEvaluationConfigs", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesUpdateEvaluationConfigsRequestBuilder(UUID id, PromptTemplate promptTemplate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesUpdateEvaluationConfigs"); + } + // verify the required parameter 'promptTemplate' is set + if (promptTemplate == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplate' when calling modelHubPromptTemplatesUpdateEvaluationConfigs"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/update-evaluation-configs/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptTemplate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @return PromptTemplate + * @throws ApiException if fails to make API call + */ + public PromptTemplate modelHubPromptTemplatesVersions(UUID id) throws ApiException { + ApiResponse localVarResponse = modelHubPromptTemplatesVersionsWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id A UUID string identifying this prompt template. (required) + * @return ApiResponse<PromptTemplate> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubPromptTemplatesVersionsWithHttpInfo(UUID id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubPromptTemplatesVersionsRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubPromptTemplatesVersions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubPromptTemplatesVersionsRequestBuilder(UUID id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubPromptTemplatesVersions"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/prompt-templates/{id}/versions/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create multiple scores on a single source (e.g. from inline annotator). + * @param bulkCreateScores (required) + * @return BulkCreateScoresResponse + * @throws ApiException if fails to make API call + */ + public BulkCreateScoresResponse modelHubScoresBulkCreate(BulkCreateScores bulkCreateScores) throws ApiException { + ApiResponse localVarResponse = modelHubScoresBulkCreateWithHttpInfo(bulkCreateScores); + return localVarResponse.getData(); + } + + /** + * + * Create multiple scores on a single source (e.g. from inline annotator). + * @param bulkCreateScores (required) + * @return ApiResponse<BulkCreateScoresResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresBulkCreateWithHttpInfo(BulkCreateScores bulkCreateScores) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresBulkCreateRequestBuilder(bulkCreateScores); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresBulkCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresBulkCreateRequestBuilder(BulkCreateScores bulkCreateScores) throws ApiException { + // verify the required parameter 'bulkCreateScores' is set + if (bulkCreateScores == null) { + throw new ApiException(400, "Missing the required parameter 'bulkCreateScores' when calling modelHubScoresBulkCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/bulk/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkCreateScores); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create a single score. + * @param createScore (required) + * @return ScoreResponse + * @throws ApiException if fails to make API call + */ + public ScoreResponse modelHubScoresCreate(CreateScore createScore) throws ApiException { + ApiResponse localVarResponse = modelHubScoresCreateWithHttpInfo(createScore); + return localVarResponse.getData(); + } + + /** + * + * Create a single score. + * @param createScore (required) + * @return ApiResponse<ScoreResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresCreateWithHttpInfo(CreateScore createScore) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresCreateRequestBuilder(createScore); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresCreateRequestBuilder(CreateScore createScore) throws ApiException { + // verify the required parameter 'createScore' is set + if (createScore == null) { + throw new ApiException(400, "Missing the required parameter 'createScore' when calling modelHubScoresCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createScore); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Soft-delete a score. + * Only the annotator who created the score or an org Owner/Admin may delete it. + * @param id (required) + * @return ScoreDeleteResponse + * @throws ApiException if fails to make API call + */ + public ScoreDeleteResponse modelHubScoresDelete(String id) throws ApiException { + ApiResponse localVarResponse = modelHubScoresDeleteWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * Soft-delete a score. + * Only the annotator who created the score or an org Owner/Admin may delete it. + * @param id (required) + * @return ApiResponse<ScoreDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubScoresDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get all scores for a specific source. GET /model-hub/scores/for-source/?source_type=trace&source_id=<uuid> + * @param sourceType (required) + * @param sourceId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ScoreForSourceResponse + * @throws ApiException if fails to make API call + */ + public ScoreForSourceResponse modelHubScoresForSource(String sourceType, String sourceId, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = modelHubScoresForSourceWithHttpInfo(sourceType, sourceId, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get all scores for a specific source. GET /model-hub/scores/for-source/?source_type=trace&source_id=<uuid> + * @param sourceType (required) + * @param sourceId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ScoreForSourceResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresForSourceWithHttpInfo(String sourceType, String sourceId, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresForSourceRequestBuilder(sourceType, sourceId, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresForSource", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresForSourceRequestBuilder(String sourceType, String sourceId, Integer page, Integer limit) throws ApiException { + // verify the required parameter 'sourceType' is set + if (sourceType == null) { + throw new ApiException(400, "Missing the required parameter 'sourceType' when calling modelHubScoresForSource"); + } + // verify the required parameter 'sourceId' is set + if (sourceId == null) { + throw new ApiException(400, "Missing the required parameter 'sourceId' when calling modelHubScoresForSource"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/for-source/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "source_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("source_type", sourceType)); + localVarQueryParameterBaseName = "source_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("source_id", sourceId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param sourceType (optional) + * @param sourceId (optional) + * @param labelId (optional) + * @param annotatorId (optional) + * @return ModelHubScoresList200Response + * @throws ApiException if fails to make API call + */ + public ModelHubScoresList200Response modelHubScoresList(Integer page, Integer limit, String sourceType, String sourceId, UUID labelId, UUID annotatorId) throws ApiException { + ApiResponse localVarResponse = modelHubScoresListWithHttpInfo(page, limit, sourceType, sourceId, labelId, annotatorId); + return localVarResponse.getData(); + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param sourceType (optional) + * @param sourceId (optional) + * @param labelId (optional) + * @param annotatorId (optional) + * @return ApiResponse<ModelHubScoresList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresListWithHttpInfo(Integer page, Integer limit, String sourceType, String sourceId, UUID labelId, UUID annotatorId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresListRequestBuilder(page, limit, sourceType, sourceId, labelId, annotatorId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresListRequestBuilder(Integer page, Integer limit, String sourceType, String sourceId, UUID labelId, UUID annotatorId) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "source_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("source_type", sourceType)); + localVarQueryParameterBaseName = "source_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("source_id", sourceId)); + localVarQueryParameterBaseName = "label_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("label_id", labelId)); + localVarQueryParameterBaseName = "annotator_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("annotator_id", annotatorId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param id (required) + * @param score (required) + * @return Score + * @throws ApiException if fails to make API call + */ + public Score modelHubScoresPartialUpdate(String id, Score score) throws ApiException { + ApiResponse localVarResponse = modelHubScoresPartialUpdateWithHttpInfo(id, score); + return localVarResponse.getData(); + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param id (required) + * @param score (required) + * @return ApiResponse<Score> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresPartialUpdateWithHttpInfo(String id, Score score) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresPartialUpdateRequestBuilder(id, score); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresPartialUpdateRequestBuilder(String id, Score score) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubScoresPartialUpdate"); + } + // verify the required parameter 'score' is set + if (score == null) { + throw new ApiException(400, "Missing the required parameter 'score' when calling modelHubScoresPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(score); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param id (required) + * @return Score + * @throws ApiException if fails to make API call + */ + public Score modelHubScoresRead(String id) throws ApiException { + ApiResponse localVarResponse = modelHubScoresReadWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param id (required) + * @return ApiResponse<Score> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresReadWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresReadRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresReadRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubScoresRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param id (required) + * @param score (required) + * @return Score + * @throws ApiException if fails to make API call + */ + public Score modelHubScoresUpdate(String id, Score score) throws ApiException { + ApiResponse localVarResponse = modelHubScoresUpdateWithHttpInfo(id, score); + return localVarResponse.getData(); + } + + /** + * Universal Score CRUD. + * GET /model-hub/scores/?source_type=trace&source_id=<uuid> POST /model-hub/scores/ (single score) POST /model-hub/scores/bulk/ (multiple scores on one source) DELETE /model-hub/scores/<id>/ + * @param id (required) + * @param score (required) + * @return ApiResponse<Score> + * @throws ApiException if fails to make API call + */ + public ApiResponse modelHubScoresUpdateWithHttpInfo(String id, Score score) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = modelHubScoresUpdateRequestBuilder(id, score); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("modelHubScoresUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder modelHubScoresUpdateRequestBuilder(String id, Score score) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling modelHubScoresUpdate"); + } + // verify the required parameter 'score' is set + if (score == null) { + throw new ApiException(400, "Missing the required parameter 'score' when calling modelHubScoresUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/model-hub/scores/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(score); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalConfigsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalConfigsApi.java new file mode 100644 index 0000000..8623d7f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalConfigsApi.java @@ -0,0 +1,479 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AddEvalConfigsRequest; +import com.futureagi.sdk.model.AddEvalConfigsResponse; +import com.futureagi.sdk.model.DeleteEvalConfigResponse; +import com.futureagi.sdk.model.EvalConfigUpdateRequest; +import com.futureagi.sdk.model.EvalConfigUpdateResponse; +import com.futureagi.sdk.model.EvalErrorResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.RunNewEvalsOnTestExecution; +import com.futureagi.sdk.model.RunNewEvalsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestsEvalConfigsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public RunTestsEvalConfigsApi() { + this(Configuration.getDefaultApiClient()); + } + + public RunTestsEvalConfigsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Add evaluation configurations + * Adds evaluation configurations to a test run. Returns 201 with the created configs. + * @param runTestId (required) + * @param addEvalConfigsRequest (required) + * @return AddEvalConfigsResponse + * @throws ApiException if fails to make API call + */ + public AddEvalConfigsResponse simulateRunTestsEvalConfigsCreate(String runTestId, AddEvalConfigsRequest addEvalConfigsRequest) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsEvalConfigsCreateWithHttpInfo(runTestId, addEvalConfigsRequest); + return localVarResponse.getData(); + } + + /** + * Add evaluation configurations + * Adds evaluation configurations to a test run. Returns 201 with the created configs. + * @param runTestId (required) + * @param addEvalConfigsRequest (required) + * @return ApiResponse<AddEvalConfigsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsEvalConfigsCreateWithHttpInfo(String runTestId, AddEvalConfigsRequest addEvalConfigsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsEvalConfigsCreateRequestBuilder(runTestId, addEvalConfigsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsEvalConfigsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsEvalConfigsCreateRequestBuilder(String runTestId, AddEvalConfigsRequest addEvalConfigsRequest) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsEvalConfigsCreate"); + } + // verify the required parameter 'addEvalConfigsRequest' is set + if (addEvalConfigsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'addEvalConfigsRequest' when calling simulateRunTestsEvalConfigsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/eval-configs/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(addEvalConfigsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Delete evaluation configuration + * Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + * @param runTestId (required) + * @param evalConfigId (required) + * @return DeleteEvalConfigResponse + * @throws ApiException if fails to make API call + */ + public DeleteEvalConfigResponse simulateRunTestsEvalConfigsDelete(String runTestId, String evalConfigId) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsEvalConfigsDeleteWithHttpInfo(runTestId, evalConfigId); + return localVarResponse.getData(); + } + + /** + * Delete evaluation configuration + * Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + * @param runTestId (required) + * @param evalConfigId (required) + * @return ApiResponse<DeleteEvalConfigResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsEvalConfigsDeleteWithHttpInfo(String runTestId, String evalConfigId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsEvalConfigsDeleteRequestBuilder(runTestId, evalConfigId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsEvalConfigsDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsEvalConfigsDeleteRequestBuilder(String runTestId, String evalConfigId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsEvalConfigsDelete"); + } + // verify the required parameter 'evalConfigId' is set + if (evalConfigId == null) { + throw new ApiException(400, "Missing the required parameter 'evalConfigId' when calling simulateRunTestsEvalConfigsDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())) + .replace("{eval_config_id}", ApiClient.urlEncode(evalConfigId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Update evaluation configuration + * Updates an evaluation configuration and optionally triggers a rerun. When run=true, test_execution_id is required. + * @param runTestId (required) + * @param evalConfigId (required) + * @param evalConfigUpdateRequest (required) + * @return EvalConfigUpdateResponse + * @throws ApiException if fails to make API call + */ + public EvalConfigUpdateResponse simulateRunTestsEvalConfigsUpdateCreate(String runTestId, String evalConfigId, EvalConfigUpdateRequest evalConfigUpdateRequest) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo(runTestId, evalConfigId, evalConfigUpdateRequest); + return localVarResponse.getData(); + } + + /** + * Update evaluation configuration + * Updates an evaluation configuration and optionally triggers a rerun. When run=true, test_execution_id is required. + * @param runTestId (required) + * @param evalConfigId (required) + * @param evalConfigUpdateRequest (required) + * @return ApiResponse<EvalConfigUpdateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsEvalConfigsUpdateCreateWithHttpInfo(String runTestId, String evalConfigId, EvalConfigUpdateRequest evalConfigUpdateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsEvalConfigsUpdateCreateRequestBuilder(runTestId, evalConfigId, evalConfigUpdateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsEvalConfigsUpdateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsEvalConfigsUpdateCreateRequestBuilder(String runTestId, String evalConfigId, EvalConfigUpdateRequest evalConfigUpdateRequest) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsEvalConfigsUpdateCreate"); + } + // verify the required parameter 'evalConfigId' is set + if (evalConfigId == null) { + throw new ApiException(400, "Missing the required parameter 'evalConfigId' when calling simulateRunTestsEvalConfigsUpdateCreate"); + } + // verify the required parameter 'evalConfigUpdateRequest' is set + if (evalConfigUpdateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'evalConfigUpdateRequest' when calling simulateRunTestsEvalConfigsUpdateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())) + .replace("{eval_config_id}", ApiClient.urlEncode(evalConfigId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(evalConfigUpdateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Run new evaluations on test executions + * Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must be provided. + * @param runTestId (required) + * @param runNewEvalsOnTestExecution (required) + * @return RunNewEvalsResponse + * @throws ApiException if fails to make API call + */ + public RunNewEvalsResponse simulateRunTestsRunNewEvalsCreate(String runTestId, RunNewEvalsOnTestExecution runNewEvalsOnTestExecution) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsRunNewEvalsCreateWithHttpInfo(runTestId, runNewEvalsOnTestExecution); + return localVarResponse.getData(); + } + + /** + * Run new evaluations on test executions + * Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must be provided. + * @param runTestId (required) + * @param runNewEvalsOnTestExecution (required) + * @return ApiResponse<RunNewEvalsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsRunNewEvalsCreateWithHttpInfo(String runTestId, RunNewEvalsOnTestExecution runNewEvalsOnTestExecution) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsRunNewEvalsCreateRequestBuilder(runTestId, runNewEvalsOnTestExecution); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsRunNewEvalsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsRunNewEvalsCreateRequestBuilder(String runTestId, RunNewEvalsOnTestExecution runNewEvalsOnTestExecution) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsRunNewEvalsCreate"); + } + // verify the required parameter 'runNewEvalsOnTestExecution' is set + if (runNewEvalsOnTestExecution == null) { + throw new ApiException(400, "Missing the required parameter 'runNewEvalsOnTestExecution' when calling simulateRunTestsRunNewEvalsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/run-new-evals/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(runNewEvalsOnTestExecution); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalSummaryApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalSummaryApi.java new file mode 100644 index 0000000..d387c51 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/RunTestsEvalSummaryApi.java @@ -0,0 +1,295 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.EvalErrorResponse; +import com.futureagi.sdk.model.EvalSummaryComparisonResponse; +import com.futureagi.sdk.model.EvalSummaryResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestsEvalSummaryApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public RunTestsEvalSummaryApi() { + this(Configuration.getDefaultApiClient()); + } + + public RunTestsEvalSummaryApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Compare evaluation summaries + * Compares evaluation summary statistics across multiple test executions. + * @param runTestId (required) + * @param executionIds JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. (required) + * @return EvalSummaryComparisonResponse + * @throws ApiException if fails to make API call + */ + public EvalSummaryComparisonResponse simulateRunTestsEvalSummaryComparisonList(String runTestId, String executionIds) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsEvalSummaryComparisonListWithHttpInfo(runTestId, executionIds); + return localVarResponse.getData(); + } + + /** + * Compare evaluation summaries + * Compares evaluation summary statistics across multiple test executions. + * @param runTestId (required) + * @param executionIds JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded. (required) + * @return ApiResponse<EvalSummaryComparisonResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsEvalSummaryComparisonListWithHttpInfo(String runTestId, String executionIds) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsEvalSummaryComparisonListRequestBuilder(runTestId, executionIds); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsEvalSummaryComparisonList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsEvalSummaryComparisonListRequestBuilder(String runTestId, String executionIds) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsEvalSummaryComparisonList"); + } + // verify the required parameter 'executionIds' is set + if (executionIds == null) { + throw new ApiException(400, "Missing the required parameter 'executionIds' when calling simulateRunTestsEvalSummaryComparisonList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/eval-summary-comparison/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "execution_ids"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("execution_ids", executionIds)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get evaluation summary + * Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + * @param runTestId (required) + * @param executionId UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. (optional) + * @return EvalSummaryResponse + * @throws ApiException if fails to make API call + */ + public EvalSummaryResponse simulateRunTestsEvalSummaryList(String runTestId, UUID executionId) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsEvalSummaryListWithHttpInfo(runTestId, executionId); + return localVarResponse.getData(); + } + + /** + * Get evaluation summary + * Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + * @param runTestId (required) + * @param executionId UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. (optional) + * @return ApiResponse<EvalSummaryResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsEvalSummaryListWithHttpInfo(String runTestId, UUID executionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsEvalSummaryListRequestBuilder(runTestId, executionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsEvalSummaryList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsEvalSummaryListRequestBuilder(String runTestId, UUID executionId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsEvalSummaryList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/eval-summary/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "execution_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("execution_id", executionId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/ScenariosApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/ScenariosApi.java new file mode 100644 index 0000000..c9eff52 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/ScenariosApi.java @@ -0,0 +1,492 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.ScenarioAddColumnsRequest; +import com.futureagi.sdk.model.ScenarioAddColumnsResponse; +import com.futureagi.sdk.model.ScenarioAddRowsRequest; +import com.futureagi.sdk.model.ScenarioAddRowsResponse; +import com.futureagi.sdk.model.ScenarioEditPromptsRequest; +import com.futureagi.sdk.model.ScenarioErrorResponse; +import com.futureagi.sdk.model.ScenarioListResponse; +import com.futureagi.sdk.model.ScenarioPromptsUpdateResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenariosApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ScenariosApi() { + this(Configuration.getDefaultApiClient()); + } + + public ScenariosApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Add columns to scenario + * Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + * @param scenarioId (required) + * @param scenarioAddColumnsRequest (required) + * @return ScenarioAddColumnsResponse + * @throws ApiException if fails to make API call + */ + public ScenarioAddColumnsResponse simulateScenariosAddColumnsCreate(String scenarioId, ScenarioAddColumnsRequest scenarioAddColumnsRequest) throws ApiException { + ApiResponse localVarResponse = simulateScenariosAddColumnsCreateWithHttpInfo(scenarioId, scenarioAddColumnsRequest); + return localVarResponse.getData(); + } + + /** + * Add columns to scenario + * Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + * @param scenarioId (required) + * @param scenarioAddColumnsRequest (required) + * @return ApiResponse<ScenarioAddColumnsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateScenariosAddColumnsCreateWithHttpInfo(String scenarioId, ScenarioAddColumnsRequest scenarioAddColumnsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateScenariosAddColumnsCreateRequestBuilder(scenarioId, scenarioAddColumnsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateScenariosAddColumnsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateScenariosAddColumnsCreateRequestBuilder(String scenarioId, ScenarioAddColumnsRequest scenarioAddColumnsRequest) throws ApiException { + // verify the required parameter 'scenarioId' is set + if (scenarioId == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioId' when calling simulateScenariosAddColumnsCreate"); + } + // verify the required parameter 'scenarioAddColumnsRequest' is set + if (scenarioAddColumnsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioAddColumnsRequest' when calling simulateScenariosAddColumnsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/{scenario_id}/add-columns/" + .replace("{scenario_id}", ApiClient.urlEncode(scenarioId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(scenarioAddColumnsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Add rows to scenario + * Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + * @param scenarioId (required) + * @param scenarioAddRowsRequest (required) + * @return ScenarioAddRowsResponse + * @throws ApiException if fails to make API call + */ + public ScenarioAddRowsResponse simulateScenariosAddRowsCreate(String scenarioId, ScenarioAddRowsRequest scenarioAddRowsRequest) throws ApiException { + ApiResponse localVarResponse = simulateScenariosAddRowsCreateWithHttpInfo(scenarioId, scenarioAddRowsRequest); + return localVarResponse.getData(); + } + + /** + * Add rows to scenario + * Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + * @param scenarioId (required) + * @param scenarioAddRowsRequest (required) + * @return ApiResponse<ScenarioAddRowsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateScenariosAddRowsCreateWithHttpInfo(String scenarioId, ScenarioAddRowsRequest scenarioAddRowsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateScenariosAddRowsCreateRequestBuilder(scenarioId, scenarioAddRowsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateScenariosAddRowsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateScenariosAddRowsCreateRequestBuilder(String scenarioId, ScenarioAddRowsRequest scenarioAddRowsRequest) throws ApiException { + // verify the required parameter 'scenarioId' is set + if (scenarioId == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioId' when calling simulateScenariosAddRowsCreate"); + } + // verify the required parameter 'scenarioAddRowsRequest' is set + if (scenarioAddRowsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioAddRowsRequest' when calling simulateScenariosAddRowsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/{scenario_id}/add-rows/" + .replace("{scenario_id}", ApiClient.urlEncode(scenarioId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(scenarioAddRowsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * List scenarios + * Returns a paginated list of scenarios for the user's organization. + * @param search (optional, default to ) + * @param agentDefinitionId (optional) + * @param agentType (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ScenarioListResponse + * @throws ApiException if fails to make API call + */ + public ScenarioListResponse simulateScenariosGetColumnsList(String search, UUID agentDefinitionId, String agentType, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = simulateScenariosGetColumnsListWithHttpInfo(search, agentDefinitionId, agentType, page, limit); + return localVarResponse.getData(); + } + + /** + * List scenarios + * Returns a paginated list of scenarios for the user's organization. + * @param search (optional, default to ) + * @param agentDefinitionId (optional) + * @param agentType (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ApiResponse<ScenarioListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateScenariosGetColumnsListWithHttpInfo(String search, UUID agentDefinitionId, String agentType, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateScenariosGetColumnsListRequestBuilder(search, agentDefinitionId, agentType, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateScenariosGetColumnsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateScenariosGetColumnsListRequestBuilder(String search, UUID agentDefinitionId, String agentType, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/get-columns/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "agent_definition_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("agent_definition_id", agentDefinitionId)); + localVarQueryParameterBaseName = "agent_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("agent_type", agentType)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Edit scenario prompts + * Updates the simulator agent prompt for a scenario. + * @param scenarioId (required) + * @param scenarioEditPromptsRequest (required) + * @return ScenarioPromptsUpdateResponse + * @throws ApiException if fails to make API call + */ + public ScenarioPromptsUpdateResponse simulateScenariosPromptsUpdate(String scenarioId, ScenarioEditPromptsRequest scenarioEditPromptsRequest) throws ApiException { + ApiResponse localVarResponse = simulateScenariosPromptsUpdateWithHttpInfo(scenarioId, scenarioEditPromptsRequest); + return localVarResponse.getData(); + } + + /** + * Edit scenario prompts + * Updates the simulator agent prompt for a scenario. + * @param scenarioId (required) + * @param scenarioEditPromptsRequest (required) + * @return ApiResponse<ScenarioPromptsUpdateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateScenariosPromptsUpdateWithHttpInfo(String scenarioId, ScenarioEditPromptsRequest scenarioEditPromptsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateScenariosPromptsUpdateRequestBuilder(scenarioId, scenarioEditPromptsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateScenariosPromptsUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateScenariosPromptsUpdateRequestBuilder(String scenarioId, ScenarioEditPromptsRequest scenarioEditPromptsRequest) throws ApiException { + // verify the required parameter 'scenarioId' is set + if (scenarioId == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioId' when calling simulateScenariosPromptsUpdate"); + } + // verify the required parameter 'scenarioEditPromptsRequest' is set + if (scenarioEditPromptsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioEditPromptsRequest' when calling simulateScenariosPromptsUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/{scenario_id}/prompts/" + .replace("{scenario_id}", ApiClient.urlEncode(scenarioId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(scenarioEditPromptsRequest); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SdkApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SdkApi.java new file mode 100644 index 0000000..3388363 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SdkApi.java @@ -0,0 +1,819 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.CICDJob; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.SDKCICDEvaluationRunAcceptedResponse; +import com.futureagi.sdk.model.SDKCICDEvaluationRunsResponse; +import com.futureagi.sdk.model.SDKConfigureEvaluationsRequest; +import com.futureagi.sdk.model.SDKConfigureEvaluationsResponse; +import com.futureagi.sdk.model.SDKErrorResponse; +import com.futureagi.sdk.model.SDKEvalTemplateResponse; +import com.futureagi.sdk.model.SDKGetEvalsResponse; +import com.futureagi.sdk.model.SDKStandaloneEvalRequest; +import com.futureagi.sdk.model.SDKStandaloneEvalResponse; +import com.futureagi.sdk.model.SDKStandaloneEvalV2Request; +import com.futureagi.sdk.model.SDKStandaloneEvalV2Response; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SdkApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SdkApi() { + this(Configuration.getDefaultApiClient()); + } + + public SdkApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @param sdKConfigureEvaluationsRequest (required) + * @return SDKConfigureEvaluationsResponse + * @throws ApiException if fails to make API call + */ + public SDKConfigureEvaluationsResponse sdkApiV1ConfigureEvaluationsCreate(SDKConfigureEvaluationsRequest sdKConfigureEvaluationsRequest) throws ApiException { + ApiResponse localVarResponse = sdkApiV1ConfigureEvaluationsCreateWithHttpInfo(sdKConfigureEvaluationsRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param sdKConfigureEvaluationsRequest (required) + * @return ApiResponse<SDKConfigureEvaluationsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1ConfigureEvaluationsCreateWithHttpInfo(SDKConfigureEvaluationsRequest sdKConfigureEvaluationsRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1ConfigureEvaluationsCreateRequestBuilder(sdKConfigureEvaluationsRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1ConfigureEvaluationsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1ConfigureEvaluationsCreateRequestBuilder(SDKConfigureEvaluationsRequest sdKConfigureEvaluationsRequest) throws ApiException { + // verify the required parameter 'sdKConfigureEvaluationsRequest' is set + if (sdKConfigureEvaluationsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'sdKConfigureEvaluationsRequest' when calling sdkApiV1ConfigureEvaluationsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/configure-evaluations/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(sdKConfigureEvaluationsRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param sdKStandaloneEvalRequest (required) + * @return SDKStandaloneEvalResponse + * @throws ApiException if fails to make API call + */ + public SDKStandaloneEvalResponse sdkApiV1EvalCreate(SDKStandaloneEvalRequest sdKStandaloneEvalRequest) throws ApiException { + ApiResponse localVarResponse = sdkApiV1EvalCreateWithHttpInfo(sdKStandaloneEvalRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param sdKStandaloneEvalRequest (required) + * @return ApiResponse<SDKStandaloneEvalResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1EvalCreateWithHttpInfo(SDKStandaloneEvalRequest sdKStandaloneEvalRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1EvalCreateRequestBuilder(sdKStandaloneEvalRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1EvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1EvalCreateRequestBuilder(SDKStandaloneEvalRequest sdKStandaloneEvalRequest) throws ApiException { + // verify the required parameter 'sdKStandaloneEvalRequest' is set + if (sdKStandaloneEvalRequest == null) { + throw new ApiException(400, "Missing the required parameter 'sdKStandaloneEvalRequest' when calling sdkApiV1EvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/eval/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(sdKStandaloneEvalRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param evalId (required) + * @return SDKEvalTemplateResponse + * @throws ApiException if fails to make API call + */ + public SDKEvalTemplateResponse sdkApiV1EvalRead(String evalId) throws ApiException { + ApiResponse localVarResponse = sdkApiV1EvalReadWithHttpInfo(evalId); + return localVarResponse.getData(); + } + + /** + * + * + * @param evalId (required) + * @return ApiResponse<SDKEvalTemplateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1EvalReadWithHttpInfo(String evalId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1EvalReadRequestBuilder(evalId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1EvalRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1EvalReadRequestBuilder(String evalId) throws ApiException { + // verify the required parameter 'evalId' is set + if (evalId == null) { + throw new ApiException(400, "Missing the required parameter 'evalId' when calling sdkApiV1EvalRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/eval/{eval_id}/" + .replace("{eval_id}", ApiClient.urlEncode(evalId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param ciCDJob (required) + * @return SDKCICDEvaluationRunAcceptedResponse + * @throws ApiException if fails to make API call + */ + public SDKCICDEvaluationRunAcceptedResponse sdkApiV1EvaluatePipelineCreate(CICDJob ciCDJob) throws ApiException { + ApiResponse localVarResponse = sdkApiV1EvaluatePipelineCreateWithHttpInfo(ciCDJob); + return localVarResponse.getData(); + } + + /** + * + * + * @param ciCDJob (required) + * @return ApiResponse<SDKCICDEvaluationRunAcceptedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1EvaluatePipelineCreateWithHttpInfo(CICDJob ciCDJob) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1EvaluatePipelineCreateRequestBuilder(ciCDJob); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1EvaluatePipelineCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1EvaluatePipelineCreateRequestBuilder(CICDJob ciCDJob) throws ApiException { + // verify the required parameter 'ciCDJob' is set + if (ciCDJob == null) { + throw new ApiException(400, "Missing the required parameter 'ciCDJob' when calling sdkApiV1EvaluatePipelineCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/evaluate-pipeline/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(ciCDJob); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param projectName (required) + * @param versions (required) + * @return SDKCICDEvaluationRunsResponse + * @throws ApiException if fails to make API call + */ + public SDKCICDEvaluationRunsResponse sdkApiV1EvaluatePipelineList(String projectName, String versions) throws ApiException { + ApiResponse localVarResponse = sdkApiV1EvaluatePipelineListWithHttpInfo(projectName, versions); + return localVarResponse.getData(); + } + + /** + * + * + * @param projectName (required) + * @param versions (required) + * @return ApiResponse<SDKCICDEvaluationRunsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1EvaluatePipelineListWithHttpInfo(String projectName, String versions) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1EvaluatePipelineListRequestBuilder(projectName, versions); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1EvaluatePipelineList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1EvaluatePipelineListRequestBuilder(String projectName, String versions) throws ApiException { + // verify the required parameter 'projectName' is set + if (projectName == null) { + throw new ApiException(400, "Missing the required parameter 'projectName' when calling sdkApiV1EvaluatePipelineList"); + } + // verify the required parameter 'versions' is set + if (versions == null) { + throw new ApiException(400, "Missing the required parameter 'versions' when calling sdkApiV1EvaluatePipelineList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/evaluate-pipeline/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "project_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_name", projectName)); + localVarQueryParameterBaseName = "versions"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("versions", versions)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return SDKGetEvalsResponse + * @throws ApiException if fails to make API call + */ + public SDKGetEvalsResponse sdkApiV1GetEvalsList() throws ApiException { + ApiResponse localVarResponse = sdkApiV1GetEvalsListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<SDKGetEvalsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1GetEvalsListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1GetEvalsListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1GetEvalsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1GetEvalsListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/get-evals/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param sdKStandaloneEvalV2Request (required) + * @return SDKStandaloneEvalResponse + * @throws ApiException if fails to make API call + */ + public SDKStandaloneEvalResponse sdkApiV1NewEvalCreate(SDKStandaloneEvalV2Request sdKStandaloneEvalV2Request) throws ApiException { + ApiResponse localVarResponse = sdkApiV1NewEvalCreateWithHttpInfo(sdKStandaloneEvalV2Request); + return localVarResponse.getData(); + } + + /** + * + * + * @param sdKStandaloneEvalV2Request (required) + * @return ApiResponse<SDKStandaloneEvalResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1NewEvalCreateWithHttpInfo(SDKStandaloneEvalV2Request sdKStandaloneEvalV2Request) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1NewEvalCreateRequestBuilder(sdKStandaloneEvalV2Request); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1NewEvalCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1NewEvalCreateRequestBuilder(SDKStandaloneEvalV2Request sdKStandaloneEvalV2Request) throws ApiException { + // verify the required parameter 'sdKStandaloneEvalV2Request' is set + if (sdKStandaloneEvalV2Request == null) { + throw new ApiException(400, "Missing the required parameter 'sdKStandaloneEvalV2Request' when calling sdkApiV1NewEvalCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/new-eval/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(sdKStandaloneEvalV2Request); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param evalId (required) + * @return SDKStandaloneEvalV2Response + * @throws ApiException if fails to make API call + */ + public SDKStandaloneEvalV2Response sdkApiV1NewEvalList(UUID evalId) throws ApiException { + ApiResponse localVarResponse = sdkApiV1NewEvalListWithHttpInfo(evalId); + return localVarResponse.getData(); + } + + /** + * + * + * @param evalId (required) + * @return ApiResponse<SDKStandaloneEvalV2Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse sdkApiV1NewEvalListWithHttpInfo(UUID evalId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sdkApiV1NewEvalListRequestBuilder(evalId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sdkApiV1NewEvalList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sdkApiV1NewEvalListRequestBuilder(UUID evalId) throws ApiException { + // verify the required parameter 'evalId' is set + if (evalId == null) { + throw new ApiException(400, "Missing the required parameter 'evalId' when calling sdkApiV1NewEvalList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/new-eval/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "eval_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("eval_id", evalId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulateApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulateApi.java new file mode 100644 index 0000000..7d60c6c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulateApi.java @@ -0,0 +1,5452 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AgentDefinitionBulkDeleteRequest; +import com.futureagi.sdk.model.AgentDefinitionBulkDeleteResponse; +import com.futureagi.sdk.model.AgentVersionActivateResponse; +import com.futureagi.sdk.model.AgentVersionCreateRequest; +import com.futureagi.sdk.model.AgentVersionCreateResponse; +import com.futureagi.sdk.model.AgentVersionDeleteResponse; +import com.futureagi.sdk.model.AgentVersionListResponse; +import com.futureagi.sdk.model.AgentVersionResponse; +import com.futureagi.sdk.model.AgentVersionRestoreResponse; +import com.futureagi.sdk.model.AllActiveTests; +import com.futureagi.sdk.model.ApiErrorWithDetailsResponse; +import com.futureagi.sdk.model.ApiTextErrorResponse; +import com.futureagi.sdk.model.CallBranchAnalysisResponse; +import com.futureagi.sdk.model.CallBranchDeviationCreateResponse; +import com.futureagi.sdk.model.CallExecution; +import com.futureagi.sdk.model.CallExecutionDeleteResponse; +import com.futureagi.sdk.model.CallExecutionDetail; +import com.futureagi.sdk.model.CallExecutionErrorLocalizerTasksResponse; +import com.futureagi.sdk.model.CallExecutionErrorResponse; +import com.futureagi.sdk.model.CallExecutionLogsResponse; +import com.futureagi.sdk.model.CallExecutionRerun; +import com.futureagi.sdk.model.CallExecutionStatusUpdate; +import com.futureagi.sdk.model.CallTranscriptResponse; +import com.futureagi.sdk.model.ChatSDKCodeResponse; +import com.futureagi.sdk.model.ChatSendMessageResponse; +import com.futureagi.sdk.model.CreatePromptSimulationRequest; +import com.futureagi.sdk.model.ErrorResponse; +import com.futureagi.sdk.model.EvalConfigStructureResponse; +import com.futureagi.sdk.model.EvalErrorResponse; +import com.futureagi.sdk.model.EvalExplanationSummaryRefreshResponse; +import com.futureagi.sdk.model.EvalExplanationSummaryResponse; +import com.futureagi.sdk.model.EvalSummaryResponse; +import com.futureagi.sdk.model.ExecutePromptSimulationRequest; +import com.futureagi.sdk.model.ExecutePromptSimulationResponse; +import java.io.File; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.OptimiserAnalysisRefreshResponse; +import com.futureagi.sdk.model.OptimiserAnalysisResponse; +import com.futureagi.sdk.model.Persona; +import com.futureagi.sdk.model.PersonaDuplicateRequest; +import com.futureagi.sdk.model.PersonaDuplicateResponse; +import com.futureagi.sdk.model.PromptSimulationListResponse; +import com.futureagi.sdk.model.PromptSimulationRunResponse; +import com.futureagi.sdk.model.PromptSimulationScenariosResponse; +import com.futureagi.sdk.model.PromptSimulationUpdateRequest; +import com.futureagi.sdk.model.RerunCallsResponse; +import com.futureagi.sdk.model.RunTestChatExecutionResponse; +import com.futureagi.sdk.model.RunTestComponentsUpdate; +import com.futureagi.sdk.model.RunTestErrorResponse; +import com.futureagi.sdk.model.RunTestNameResponse; +import com.futureagi.sdk.model.RunTestResponse; +import com.futureagi.sdk.model.RunTestScenarioItemResponse; +import com.futureagi.sdk.model.SendChatRequest; +import com.futureagi.sdk.model.SessionComparisonResponse; +import com.futureagi.sdk.model.SimulateApiPersonasFieldOptions200Response; +import com.futureagi.sdk.model.SimulateApiPersonasSystemPersonas200Response; +import com.futureagi.sdk.model.SimulatorAgent; +import com.futureagi.sdk.model.SimulatorAgentDeleteResponse; +import com.futureagi.sdk.model.SimulatorAgentListResponse; +import com.futureagi.sdk.model.TestExecutionBulkDelete; +import com.futureagi.sdk.model.TestExecutionBulkDeleteResponse; +import com.futureagi.sdk.model.TestExecutionChatBatchResponse; +import com.futureagi.sdk.model.TestExecutionColumnOrder; +import com.futureagi.sdk.model.TestExecutionColumnOrderResponse; +import com.futureagi.sdk.model.TestExecutionRerun; +import com.futureagi.sdk.model.TestExecutionRerunResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulateApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SimulateApi() { + this(Configuration.getDefaultApiClient()); + } + + public SimulateApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * Bulk soft-delete agent definitions. + * @param agentDefinitionBulkDeleteRequest (required) + * @return AgentDefinitionBulkDeleteResponse + * @throws ApiException if fails to make API call + */ + public AgentDefinitionBulkDeleteResponse simulateAgentDefinitionsDelete(AgentDefinitionBulkDeleteRequest agentDefinitionBulkDeleteRequest) throws ApiException { + ApiResponse localVarResponse = simulateAgentDefinitionsDeleteWithHttpInfo(agentDefinitionBulkDeleteRequest); + return localVarResponse.getData(); + } + + /** + * + * Bulk soft-delete agent definitions. + * @param agentDefinitionBulkDeleteRequest (required) + * @return ApiResponse<AgentDefinitionBulkDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateAgentDefinitionsDeleteWithHttpInfo(AgentDefinitionBulkDeleteRequest agentDefinitionBulkDeleteRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsDeleteRequestBuilder(agentDefinitionBulkDeleteRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsDeleteRequestBuilder(AgentDefinitionBulkDeleteRequest agentDefinitionBulkDeleteRequest) throws ApiException { + // verify the required parameter 'agentDefinitionBulkDeleteRequest' is set + if (agentDefinitionBulkDeleteRequest == null) { + throw new ApiException(400, "Missing the required parameter 'agentDefinitionBulkDeleteRequest' when calling simulateAgentDefinitionsDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(agentDefinitionBulkDeleteRequest); + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Activate a specific agent version. + * @param agentId (required) + * @param versionId (required) + * @param body (required) + * @return AgentVersionActivateResponse + * @throws ApiException if fails to make API call + */ + public AgentVersionActivateResponse simulateAgentDefinitionsVersionsActivateCreate(String agentId, String versionId, Object body) throws ApiException { + ApiResponse localVarResponse = simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo(agentId, versionId, body); + return localVarResponse.getData(); + } + + /** + * + * Activate a specific agent version. + * @param agentId (required) + * @param versionId (required) + * @param body (required) + * @return ApiResponse<AgentVersionActivateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateAgentDefinitionsVersionsActivateCreateWithHttpInfo(String agentId, String versionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsActivateCreateRequestBuilder(agentId, versionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsActivateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsActivateCreateRequestBuilder(String agentId, String versionId, Object body) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsActivateCreate"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling simulateAgentDefinitionsVersionsActivateCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling simulateAgentDefinitionsVersionsActivateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the call executions of an agent version. + * @param agentId (required) + * @param versionId (required) + * @return List<CallExecution> + * @throws ApiException if fails to make API call + */ + public List simulateAgentDefinitionsVersionsCallExecutionsList(String agentId, String versionId) throws ApiException { + ApiResponse> localVarResponse = simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo(agentId, versionId); + return localVarResponse.getData(); + } + + /** + * + * Get the call executions of an agent version. + * @param agentId (required) + * @param versionId (required) + * @return ApiResponse<List<CallExecution>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> simulateAgentDefinitionsVersionsCallExecutionsListWithHttpInfo(String agentId, String versionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsCallExecutionsListRequestBuilder(agentId, versionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsCallExecutionsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsCallExecutionsListRequestBuilder(String agentId, String versionId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsCallExecutionsList"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling simulateAgentDefinitionsVersionsCallExecutionsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create a new version of an agent definition. + * @param agentId (required) + * @param agentVersionCreateRequest (required) + * @return AgentVersionCreateResponse + * @throws ApiException if fails to make API call + */ + public AgentVersionCreateResponse simulateAgentDefinitionsVersionsCreateCreate(String agentId, AgentVersionCreateRequest agentVersionCreateRequest) throws ApiException { + ApiResponse localVarResponse = simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo(agentId, agentVersionCreateRequest); + return localVarResponse.getData(); + } + + /** + * + * Create a new version of an agent definition. + * @param agentId (required) + * @param agentVersionCreateRequest (required) + * @return ApiResponse<AgentVersionCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateAgentDefinitionsVersionsCreateCreateWithHttpInfo(String agentId, AgentVersionCreateRequest agentVersionCreateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsCreateCreateRequestBuilder(agentId, agentVersionCreateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsCreateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsCreateCreateRequestBuilder(String agentId, AgentVersionCreateRequest agentVersionCreateRequest) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsCreateCreate"); + } + // verify the required parameter 'agentVersionCreateRequest' is set + if (agentVersionCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'agentVersionCreateRequest' when calling simulateAgentDefinitionsVersionsCreateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/create/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(agentVersionCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Soft delete an agent version. + * @param agentId (required) + * @param versionId (required) + * @return AgentVersionDeleteResponse + * @throws ApiException if fails to make API call + */ + public AgentVersionDeleteResponse simulateAgentDefinitionsVersionsDeleteDelete(String agentId, String versionId) throws ApiException { + ApiResponse localVarResponse = simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo(agentId, versionId); + return localVarResponse.getData(); + } + + /** + * + * Soft delete an agent version. + * @param agentId (required) + * @param versionId (required) + * @return ApiResponse<AgentVersionDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateAgentDefinitionsVersionsDeleteDeleteWithHttpInfo(String agentId, String versionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsDeleteDeleteRequestBuilder(agentId, versionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsDeleteDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsDeleteDeleteRequestBuilder(String agentId, String versionId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsDeleteDelete"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling simulateAgentDefinitionsVersionsDeleteDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the eval summary of an agent version. + * @param agentId (required) + * @param versionId (required) + * @return EvalSummaryResponse + * @throws ApiException if fails to make API call + */ + public EvalSummaryResponse simulateAgentDefinitionsVersionsEvalSummaryList(String agentId, String versionId) throws ApiException { + ApiResponse localVarResponse = simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo(agentId, versionId); + return localVarResponse.getData(); + } + + /** + * + * Get the eval summary of an agent version. + * @param agentId (required) + * @param versionId (required) + * @return ApiResponse<EvalSummaryResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateAgentDefinitionsVersionsEvalSummaryListWithHttpInfo(String agentId, String versionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsEvalSummaryListRequestBuilder(agentId, versionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsEvalSummaryList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsEvalSummaryListRequestBuilder(String agentId, String versionId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsEvalSummaryList"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling simulateAgentDefinitionsVersionsEvalSummaryList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get all versions of a specific agent definition. + * @param agentId (required) + * @return List<AgentVersionListResponse> + * @throws ApiException if fails to make API call + */ + public List simulateAgentDefinitionsVersionsList(String agentId) throws ApiException { + ApiResponse> localVarResponse = simulateAgentDefinitionsVersionsListWithHttpInfo(agentId); + return localVarResponse.getData(); + } + + /** + * + * Get all versions of a specific agent definition. + * @param agentId (required) + * @return ApiResponse<List<AgentVersionListResponse>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> simulateAgentDefinitionsVersionsListWithHttpInfo(String agentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsListRequestBuilder(agentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsListRequestBuilder(String agentId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get details of a specific agent version. + * @param agentId (required) + * @param versionId (required) + * @return AgentVersionResponse + * @throws ApiException if fails to make API call + */ + public AgentVersionResponse simulateAgentDefinitionsVersionsRead(String agentId, String versionId) throws ApiException { + ApiResponse localVarResponse = simulateAgentDefinitionsVersionsReadWithHttpInfo(agentId, versionId); + return localVarResponse.getData(); + } + + /** + * + * Get details of a specific agent version. + * @param agentId (required) + * @param versionId (required) + * @return ApiResponse<AgentVersionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateAgentDefinitionsVersionsReadWithHttpInfo(String agentId, String versionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsReadRequestBuilder(agentId, versionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsReadRequestBuilder(String agentId, String versionId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsRead"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling simulateAgentDefinitionsVersionsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/{version_id}/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Restore agent definition from a specific version. + * @param agentId (required) + * @param versionId (required) + * @param body (required) + * @return AgentVersionRestoreResponse + * @throws ApiException if fails to make API call + */ + public AgentVersionRestoreResponse simulateAgentDefinitionsVersionsRestoreCreate(String agentId, String versionId, Object body) throws ApiException { + ApiResponse localVarResponse = simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo(agentId, versionId, body); + return localVarResponse.getData(); + } + + /** + * + * Restore agent definition from a specific version. + * @param agentId (required) + * @param versionId (required) + * @param body (required) + * @return ApiResponse<AgentVersionRestoreResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateAgentDefinitionsVersionsRestoreCreateWithHttpInfo(String agentId, String versionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateAgentDefinitionsVersionsRestoreCreateRequestBuilder(agentId, versionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateAgentDefinitionsVersionsRestoreCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateAgentDefinitionsVersionsRestoreCreateRequestBuilder(String agentId, String versionId, Object body) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateAgentDefinitionsVersionsRestoreCreate"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling simulateAgentDefinitionsVersionsRestoreCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling simulateAgentDefinitionsVersionsRestoreCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())) + .replace("{version_id}", ApiClient.urlEncode(versionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get paginated list of call executions for the user's organization Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call status - test_execution_id: filter by specific test execution - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param search (optional, default to ) + * @param status (optional, default to ) + * @param testExecutionId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return List<CallExecution> + * @throws ApiException if fails to make API call + */ + public List simulateApiCallExecutionsList(String search, String status, UUID testExecutionId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResponse = simulateApiCallExecutionsListWithHttpInfo(search, status, testExecutionId, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get paginated list of call executions for the user's organization Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call status - test_execution_id: filter by specific test execution - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param search (optional, default to ) + * @param status (optional, default to ) + * @param testExecutionId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ApiResponse<List<CallExecution>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> simulateApiCallExecutionsListWithHttpInfo(String search, String status, UUID testExecutionId, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiCallExecutionsListRequestBuilder(search, status, testExecutionId, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiCallExecutionsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiCallExecutionsListRequestBuilder(String search, String status, UUID testExecutionId, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/call-executions/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + localVarQueryParameterBaseName = "test_execution_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("test_execution_id", testExecutionId)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Duplicate a persona (creates a workspace-level copy) + * @param id (required) + * @param personaDuplicateRequest (required) + * @return PersonaDuplicateResponse + * @throws ApiException if fails to make API call + */ + public PersonaDuplicateResponse simulateApiPersonasDuplicate(String id, PersonaDuplicateRequest personaDuplicateRequest) throws ApiException { + ApiResponse localVarResponse = simulateApiPersonasDuplicateWithHttpInfo(id, personaDuplicateRequest); + return localVarResponse.getData(); + } + + /** + * + * Duplicate a persona (creates a workspace-level copy) + * @param id (required) + * @param personaDuplicateRequest (required) + * @return ApiResponse<PersonaDuplicateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateApiPersonasDuplicateWithHttpInfo(String id, PersonaDuplicateRequest personaDuplicateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiPersonasDuplicateRequestBuilder(id, personaDuplicateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiPersonasDuplicate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiPersonasDuplicateRequestBuilder(String id, PersonaDuplicateRequest personaDuplicateRequest) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling simulateApiPersonasDuplicate"); + } + // verify the required parameter 'personaDuplicateRequest' is set + if (personaDuplicateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'personaDuplicateRequest' when calling simulateApiPersonasDuplicate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/{id}/duplicate/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(personaDuplicateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Duplicate a persona by ID + * @param personaId (required) + * @param personaDuplicateRequest (required) + * @return PersonaDuplicateResponse + * @throws ApiException if fails to make API call + */ + public PersonaDuplicateResponse simulateApiPersonasDuplicateCreate(String personaId, PersonaDuplicateRequest personaDuplicateRequest) throws ApiException { + ApiResponse localVarResponse = simulateApiPersonasDuplicateCreateWithHttpInfo(personaId, personaDuplicateRequest); + return localVarResponse.getData(); + } + + /** + * + * Duplicate a persona by ID + * @param personaId (required) + * @param personaDuplicateRequest (required) + * @return ApiResponse<PersonaDuplicateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateApiPersonasDuplicateCreateWithHttpInfo(String personaId, PersonaDuplicateRequest personaDuplicateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiPersonasDuplicateCreateRequestBuilder(personaId, personaDuplicateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiPersonasDuplicateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiPersonasDuplicateCreateRequestBuilder(String personaId, PersonaDuplicateRequest personaDuplicateRequest) throws ApiException { + // verify the required parameter 'personaId' is set + if (personaId == null) { + throw new ApiException(400, "Missing the required parameter 'personaId' when calling simulateApiPersonasDuplicateCreate"); + } + // verify the required parameter 'personaDuplicateRequest' is set + if (personaDuplicateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'personaDuplicateRequest' when calling simulateApiPersonasDuplicateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/duplicate/{persona_id}/" + .replace("{persona_id}", ApiClient.urlEncode(personaId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(personaDuplicateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get field options/choices for persona creation + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return SimulateApiPersonasFieldOptions200Response + * @throws ApiException if fails to make API call + */ + public SimulateApiPersonasFieldOptions200Response simulateApiPersonasFieldOptions(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = simulateApiPersonasFieldOptionsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get field options/choices for persona creation + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<SimulateApiPersonasFieldOptions200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateApiPersonasFieldOptionsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiPersonasFieldOptionsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiPersonasFieldOptions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiPersonasFieldOptionsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/field-options/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get only system-level personas + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return SimulateApiPersonasSystemPersonas200Response + * @throws ApiException if fails to make API call + */ + public SimulateApiPersonasSystemPersonas200Response simulateApiPersonasSystemPersonas(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = simulateApiPersonasSystemPersonasWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get only system-level personas + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<SimulateApiPersonasSystemPersonas200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateApiPersonasSystemPersonasWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiPersonasSystemPersonasRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiPersonasSystemPersonas", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiPersonasSystemPersonasRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/system/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update a persona (workspace-level only) + * @param id (required) + * @param persona (required) + * @return Persona + * @throws ApiException if fails to make API call + */ + public Persona simulateApiPersonasUpdate(String id, Persona persona) throws ApiException { + ApiResponse localVarResponse = simulateApiPersonasUpdateWithHttpInfo(id, persona); + return localVarResponse.getData(); + } + + /** + * + * Update a persona (workspace-level only) + * @param id (required) + * @param persona (required) + * @return ApiResponse<Persona> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateApiPersonasUpdateWithHttpInfo(String id, Persona persona) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiPersonasUpdateRequestBuilder(id, persona); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiPersonasUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiPersonasUpdateRequestBuilder(String id, Persona persona) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling simulateApiPersonasUpdate"); + } + // verify the required parameter 'persona' is set + if (persona == null) { + throw new ApiException(400, "Missing the required parameter 'persona' when calling simulateApiPersonasUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(persona); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get only workspace-level personas + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return SimulateApiPersonasSystemPersonas200Response + * @throws ApiException if fails to make API call + */ + public SimulateApiPersonasSystemPersonas200Response simulateApiPersonasWorkspacePersonas(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = simulateApiPersonasWorkspacePersonasWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get only workspace-level personas + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<SimulateApiPersonasSystemPersonas200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateApiPersonasWorkspacePersonasWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiPersonasWorkspacePersonasRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiPersonasWorkspacePersonas", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiPersonasWorkspacePersonasRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/workspace/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param search (optional, default to ) + * @param simulationType (optional) + * @param promptTemplateId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return List<RunTestResponse> + * @throws ApiException if fails to make API call + */ + public List simulateApiRunTestsList(String search, String simulationType, UUID promptTemplateId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResponse = simulateApiRunTestsListWithHttpInfo(search, simulationType, promptTemplateId, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param search (optional, default to ) + * @param simulationType (optional) + * @param promptTemplateId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ApiResponse<List<RunTestResponse>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> simulateApiRunTestsListWithHttpInfo(String search, String simulationType, UUID promptTemplateId, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateApiRunTestsListRequestBuilder(search, simulationType, promptTemplateId, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateApiRunTestsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateApiRunTestsListRequestBuilder(String search, String simulationType, UUID promptTemplateId, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/run-tests/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "simulation_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("simulation_type", simulationType)); + localVarQueryParameterBaseName = "prompt_template_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("prompt_template_id", promptTemplateId)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create deviation nodes and edges for a call execution + * @param callExecutionId (required) + * @param body (required) + * @return CallBranchDeviationCreateResponse + * @throws ApiException if fails to make API call + */ + public CallBranchDeviationCreateResponse simulateCallExecutionsBranchAnalysisCreate(String callExecutionId, Object body) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsBranchAnalysisCreateWithHttpInfo(callExecutionId, body); + return localVarResponse.getData(); + } + + /** + * + * Create deviation nodes and edges for a call execution + * @param callExecutionId (required) + * @param body (required) + * @return ApiResponse<CallBranchDeviationCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsBranchAnalysisCreateWithHttpInfo(String callExecutionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsBranchAnalysisCreateRequestBuilder(callExecutionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsBranchAnalysisCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsBranchAnalysisCreateRequestBuilder(String callExecutionId, Object body) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsBranchAnalysisCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling simulateCallExecutionsBranchAnalysisCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/branch-analysis/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Analyze a call execution against graph branches and identify deviations + * @param callExecutionId (required) + * @return CallBranchAnalysisResponse + * @throws ApiException if fails to make API call + */ + public CallBranchAnalysisResponse simulateCallExecutionsBranchAnalysisList(String callExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsBranchAnalysisListWithHttpInfo(callExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Analyze a call execution against graph branches and identify deviations + * @param callExecutionId (required) + * @return ApiResponse<CallBranchAnalysisResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsBranchAnalysisListWithHttpInfo(String callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsBranchAnalysisListRequestBuilder(callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsBranchAnalysisList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsBranchAnalysisListRequestBuilder(String callExecutionId) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsBranchAnalysisList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/branch-analysis/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Send a message to a chat execution + * @param callExecutionId (required) + * @param sendChatRequest (required) + * @return ChatSendMessageResponse + * @throws ApiException if fails to make API call + */ + public ChatSendMessageResponse simulateCallExecutionsChatSendMessageCreate(String callExecutionId, SendChatRequest sendChatRequest) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsChatSendMessageCreateWithHttpInfo(callExecutionId, sendChatRequest); + return localVarResponse.getData(); + } + + /** + * + * Send a message to a chat execution + * @param callExecutionId (required) + * @param sendChatRequest (required) + * @return ApiResponse<ChatSendMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsChatSendMessageCreateWithHttpInfo(String callExecutionId, SendChatRequest sendChatRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsChatSendMessageCreateRequestBuilder(callExecutionId, sendChatRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsChatSendMessageCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsChatSendMessageCreateRequestBuilder(String callExecutionId, SendChatRequest sendChatRequest) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsChatSendMessageCreate"); + } + // verify the required parameter 'sendChatRequest' is set + if (sendChatRequest == null) { + throw new ApiException(400, "Missing the required parameter 'sendChatRequest' when calling simulateCallExecutionsChatSendMessageCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/chat/send-message/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(sendChatRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Delete a specific call execution + * @param callExecutionId (required) + * @return CallExecutionDeleteResponse + * @throws ApiException if fails to make API call + */ + public CallExecutionDeleteResponse simulateCallExecutionsDeleteDelete(String callExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsDeleteDeleteWithHttpInfo(callExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Delete a specific call execution + * @param callExecutionId (required) + * @return ApiResponse<CallExecutionDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsDeleteDeleteWithHttpInfo(String callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsDeleteDeleteRequestBuilder(callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsDeleteDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsDeleteDeleteRequestBuilder(String callExecutionId) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsDeleteDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/delete/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get error localizer tasks for a specific call execution + * @param callExecutionId (required) + * @return CallExecutionErrorLocalizerTasksResponse + * @throws ApiException if fails to make API call + */ + public CallExecutionErrorLocalizerTasksResponse simulateCallExecutionsErrorLocalizerTasksList(String callExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo(callExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Get error localizer tasks for a specific call execution + * @param callExecutionId (required) + * @return ApiResponse<CallExecutionErrorLocalizerTasksResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsErrorLocalizerTasksListWithHttpInfo(String callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsErrorLocalizerTasksListRequestBuilder(callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsErrorLocalizerTasksList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsErrorLocalizerTasksListRequestBuilder(String callExecutionId) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsErrorLocalizerTasksList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/error-localizer-tasks/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Paginated API to retrieve stored log entries for a call execution. + * @param callExecutionId (required) + * @return CallExecutionLogsResponse + * @throws ApiException if fails to make API call + */ + public CallExecutionLogsResponse simulateCallExecutionsLogsList(String callExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsLogsListWithHttpInfo(callExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Paginated API to retrieve stored log entries for a call execution. + * @param callExecutionId (required) + * @return ApiResponse<CallExecutionLogsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsLogsListWithHttpInfo(String callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsLogsListRequestBuilder(callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsLogsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsLogsListRequestBuilder(String callExecutionId) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsLogsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/logs/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update the status of a specific call execution + * @param callExecutionId (required) + * @param callExecutionStatusUpdate (required) + * @return CallExecution + * @throws ApiException if fails to make API call + */ + public CallExecution simulateCallExecutionsPartialUpdate(String callExecutionId, CallExecutionStatusUpdate callExecutionStatusUpdate) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsPartialUpdateWithHttpInfo(callExecutionId, callExecutionStatusUpdate); + return localVarResponse.getData(); + } + + /** + * + * Update the status of a specific call execution + * @param callExecutionId (required) + * @param callExecutionStatusUpdate (required) + * @return ApiResponse<CallExecution> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsPartialUpdateWithHttpInfo(String callExecutionId, CallExecutionStatusUpdate callExecutionStatusUpdate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsPartialUpdateRequestBuilder(callExecutionId, callExecutionStatusUpdate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsPartialUpdateRequestBuilder(String callExecutionId, CallExecutionStatusUpdate callExecutionStatusUpdate) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsPartialUpdate"); + } + // verify the required parameter 'callExecutionStatusUpdate' is set + if (callExecutionStatusUpdate == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionStatusUpdate' when calling simulateCallExecutionsPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(callExecutionStatusUpdate); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get a specific call execution with all its details + * @param callExecutionId (required) + * @return CallExecutionDetail + * @throws ApiException if fails to make API call + */ + public CallExecutionDetail simulateCallExecutionsRead(String callExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsReadWithHttpInfo(callExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Get a specific call execution with all its details + * @param callExecutionId (required) + * @return ApiResponse<CallExecutionDetail> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsReadWithHttpInfo(String callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsReadRequestBuilder(callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsReadRequestBuilder(String callExecutionId) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * API View to compare session chat simulations + * @param callExecutionId (required) + * @return SessionComparisonResponse + * @throws ApiException if fails to make API call + */ + public SessionComparisonResponse simulateCallExecutionsSessionComparisonList(String callExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsSessionComparisonListWithHttpInfo(callExecutionId); + return localVarResponse.getData(); + } + + /** + * + * API View to compare session chat simulations + * @param callExecutionId (required) + * @return ApiResponse<SessionComparisonResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsSessionComparisonListWithHttpInfo(String callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsSessionComparisonListRequestBuilder(callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsSessionComparisonList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsSessionComparisonListRequestBuilder(String callExecutionId) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsSessionComparisonList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/session-comparison/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get transcripts for a specific call execution + * @param callExecutionId (required) + * @return CallTranscriptResponse + * @throws ApiException if fails to make API call + */ + public CallTranscriptResponse simulateCallExecutionsTranscriptsList(String callExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateCallExecutionsTranscriptsListWithHttpInfo(callExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Get transcripts for a specific call execution + * @param callExecutionId (required) + * @return ApiResponse<CallTranscriptResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateCallExecutionsTranscriptsListWithHttpInfo(String callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateCallExecutionsTranscriptsListRequestBuilder(callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateCallExecutionsTranscriptsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateCallExecutionsTranscriptsListRequestBuilder(String callExecutionId) throws ApiException { + // verify the required parameter 'callExecutionId' is set + if (callExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionId' when calling simulateCallExecutionsTranscriptsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/call-executions/{call_execution_id}/transcripts/" + .replace("{call_execution_id}", ApiClient.urlEncode(callExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Export data as CSV based on type parameter Query Parameters: - type: 'runtest' or 'testexecution' (required) - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status + * @param itemId (required) + * @param type Export source type. (required) + * @param search Optional call-execution search term. (optional) + * @param status Optional call-execution status filter. (optional) + * @return File + * @throws ApiException if fails to make API call + */ + public File simulateExportRead(String itemId, String type, String search, String status) throws ApiException { + ApiResponse localVarResponse = simulateExportReadWithHttpInfo(itemId, type, search, status); + return localVarResponse.getData(); + } + + /** + * + * Export data as CSV based on type parameter Query Parameters: - type: 'runtest' or 'testexecution' (required) - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status + * @param itemId (required) + * @param type Export source type. (required) + * @param search Optional call-execution search term. (optional) + * @param status Optional call-execution status filter. (optional) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateExportReadWithHttpInfo(String itemId, String type, String search, String status) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateExportReadRequestBuilder(itemId, type, search, status); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateExportRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateExportReadRequestBuilder(String itemId, String type, String search, String status) throws ApiException { + // verify the required parameter 'itemId' is set + if (itemId == null) { + throw new ApiException(400, "Missing the required parameter 'itemId' when calling simulateExportRead"); + } + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException(400, "Missing the required parameter 'type' when calling simulateExportRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/export/{item_id}/" + .replace("{item_id}", ApiClient.urlEncode(itemId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("type", type)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get list of scenarios available for prompt simulations. + * Query Parameters: - limit: number of items per page (default: 20) - page: page number (default: 1) - search: search string to filter scenarios by name + * @return PromptSimulationScenariosResponse + * @throws ApiException if fails to make API call + */ + public PromptSimulationScenariosResponse simulatePromptSimulationsScenariosList() throws ApiException { + ApiResponse localVarResponse = simulatePromptSimulationsScenariosListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * Get list of scenarios available for prompt simulations. + * Query Parameters: - limit: number of items per page (default: 20) - page: page number (default: 1) - search: search string to filter scenarios by name + * @return ApiResponse<PromptSimulationScenariosResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulatePromptSimulationsScenariosListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulatePromptSimulationsScenariosListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulatePromptSimulationsScenariosList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulatePromptSimulationsScenariosListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/prompt-simulations/scenarios/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Create a new prompt-based simulation run. + * Request Body: - name: Name of the simulation run - description: Optional description - prompt_version_id: The prompt version to use - scenario_ids: List of scenario IDs to run - dataset_row_ids: Optional list of specific row IDs - evaluations_config: Optional evaluation configurations - enable_tool_evaluation: Optional boolean to enable tool evaluation + * @param promptTemplateId (required) + * @param createPromptSimulationRequest (required) + * @return PromptSimulationRunResponse + * @throws ApiException if fails to make API call + */ + public PromptSimulationRunResponse simulatePromptTemplatesSimulationsCreate(String promptTemplateId, CreatePromptSimulationRequest createPromptSimulationRequest) throws ApiException { + ApiResponse localVarResponse = simulatePromptTemplatesSimulationsCreateWithHttpInfo(promptTemplateId, createPromptSimulationRequest); + return localVarResponse.getData(); + } + + /** + * Create a new prompt-based simulation run. + * Request Body: - name: Name of the simulation run - description: Optional description - prompt_version_id: The prompt version to use - scenario_ids: List of scenario IDs to run - dataset_row_ids: Optional list of specific row IDs - evaluations_config: Optional evaluation configurations - enable_tool_evaluation: Optional boolean to enable tool evaluation + * @param promptTemplateId (required) + * @param createPromptSimulationRequest (required) + * @return ApiResponse<PromptSimulationRunResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulatePromptTemplatesSimulationsCreateWithHttpInfo(String promptTemplateId, CreatePromptSimulationRequest createPromptSimulationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulatePromptTemplatesSimulationsCreateRequestBuilder(promptTemplateId, createPromptSimulationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulatePromptTemplatesSimulationsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulatePromptTemplatesSimulationsCreateRequestBuilder(String promptTemplateId, CreatePromptSimulationRequest createPromptSimulationRequest) throws ApiException { + // verify the required parameter 'promptTemplateId' is set + if (promptTemplateId == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplateId' when calling simulatePromptTemplatesSimulationsCreate"); + } + // verify the required parameter 'createPromptSimulationRequest' is set + if (createPromptSimulationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createPromptSimulationRequest' when calling simulatePromptTemplatesSimulationsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/prompt-templates/{prompt_template_id}/simulations/" + .replace("{prompt_template_id}", ApiClient.urlEncode(promptTemplateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createPromptSimulationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Soft delete a prompt simulation run. + * @param promptTemplateId (required) + * @param runTestId (required) + * @throws ApiException if fails to make API call + */ + public void simulatePromptTemplatesSimulationsDelete(String promptTemplateId, String runTestId) throws ApiException { + simulatePromptTemplatesSimulationsDeleteWithHttpInfo(promptTemplateId, runTestId); + } + + /** + * + * Soft delete a prompt simulation run. + * @param promptTemplateId (required) + * @param runTestId (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulatePromptTemplatesSimulationsDeleteWithHttpInfo(String promptTemplateId, String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulatePromptTemplatesSimulationsDeleteRequestBuilder(promptTemplateId, runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulatePromptTemplatesSimulationsDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulatePromptTemplatesSimulationsDeleteRequestBuilder(String promptTemplateId, String runTestId) throws ApiException { + // verify the required parameter 'promptTemplateId' is set + if (promptTemplateId == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplateId' when calling simulatePromptTemplatesSimulationsDelete"); + } + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulatePromptTemplatesSimulationsDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/" + .replace("{prompt_template_id}", ApiClient.urlEncode(promptTemplateId.toString())) + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Execute a prompt-based simulation run. + * Request Body (optional): - scenario_ids: List of specific scenario IDs to run (default: all scenarios) - select_all: If true, run all scenarios except ones in scenario_ids + * @param promptTemplateId (required) + * @param runTestId (required) + * @param executePromptSimulationRequest (required) + * @return ExecutePromptSimulationResponse + * @throws ApiException if fails to make API call + */ + public ExecutePromptSimulationResponse simulatePromptTemplatesSimulationsExecuteCreate(String promptTemplateId, String runTestId, ExecutePromptSimulationRequest executePromptSimulationRequest) throws ApiException { + ApiResponse localVarResponse = simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo(promptTemplateId, runTestId, executePromptSimulationRequest); + return localVarResponse.getData(); + } + + /** + * Execute a prompt-based simulation run. + * Request Body (optional): - scenario_ids: List of specific scenario IDs to run (default: all scenarios) - select_all: If true, run all scenarios except ones in scenario_ids + * @param promptTemplateId (required) + * @param runTestId (required) + * @param executePromptSimulationRequest (required) + * @return ApiResponse<ExecutePromptSimulationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulatePromptTemplatesSimulationsExecuteCreateWithHttpInfo(String promptTemplateId, String runTestId, ExecutePromptSimulationRequest executePromptSimulationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulatePromptTemplatesSimulationsExecuteCreateRequestBuilder(promptTemplateId, runTestId, executePromptSimulationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulatePromptTemplatesSimulationsExecuteCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulatePromptTemplatesSimulationsExecuteCreateRequestBuilder(String promptTemplateId, String runTestId, ExecutePromptSimulationRequest executePromptSimulationRequest) throws ApiException { + // verify the required parameter 'promptTemplateId' is set + if (promptTemplateId == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplateId' when calling simulatePromptTemplatesSimulationsExecuteCreate"); + } + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulatePromptTemplatesSimulationsExecuteCreate"); + } + // verify the required parameter 'executePromptSimulationRequest' is set + if (executePromptSimulationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'executePromptSimulationRequest' when calling simulatePromptTemplatesSimulationsExecuteCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/" + .replace("{prompt_template_id}", ApiClient.urlEncode(promptTemplateId.toString())) + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(executePromptSimulationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get paginated list of simulation runs for a specific prompt template. + * Query Parameters: - limit: number of items per page (default: 10) - page: page number (default: 1) - version_id: filter by specific prompt version + * @param promptTemplateId (required) + * @return PromptSimulationListResponse + * @throws ApiException if fails to make API call + */ + public PromptSimulationListResponse simulatePromptTemplatesSimulationsList(String promptTemplateId) throws ApiException { + ApiResponse localVarResponse = simulatePromptTemplatesSimulationsListWithHttpInfo(promptTemplateId); + return localVarResponse.getData(); + } + + /** + * Get paginated list of simulation runs for a specific prompt template. + * Query Parameters: - limit: number of items per page (default: 10) - page: page number (default: 1) - version_id: filter by specific prompt version + * @param promptTemplateId (required) + * @return ApiResponse<PromptSimulationListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulatePromptTemplatesSimulationsListWithHttpInfo(String promptTemplateId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulatePromptTemplatesSimulationsListRequestBuilder(promptTemplateId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulatePromptTemplatesSimulationsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulatePromptTemplatesSimulationsListRequestBuilder(String promptTemplateId) throws ApiException { + // verify the required parameter 'promptTemplateId' is set + if (promptTemplateId == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplateId' when calling simulatePromptTemplatesSimulationsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/prompt-templates/{prompt_template_id}/simulations/" + .replace("{prompt_template_id}", ApiClient.urlEncode(promptTemplateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update a prompt simulation run (version, scenarios, etc.). + * @param promptTemplateId (required) + * @param runTestId (required) + * @param promptSimulationUpdateRequest (required) + * @return PromptSimulationRunResponse + * @throws ApiException if fails to make API call + */ + public PromptSimulationRunResponse simulatePromptTemplatesSimulationsPartialUpdate(String promptTemplateId, String runTestId, PromptSimulationUpdateRequest promptSimulationUpdateRequest) throws ApiException { + ApiResponse localVarResponse = simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo(promptTemplateId, runTestId, promptSimulationUpdateRequest); + return localVarResponse.getData(); + } + + /** + * + * Update a prompt simulation run (version, scenarios, etc.). + * @param promptTemplateId (required) + * @param runTestId (required) + * @param promptSimulationUpdateRequest (required) + * @return ApiResponse<PromptSimulationRunResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulatePromptTemplatesSimulationsPartialUpdateWithHttpInfo(String promptTemplateId, String runTestId, PromptSimulationUpdateRequest promptSimulationUpdateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulatePromptTemplatesSimulationsPartialUpdateRequestBuilder(promptTemplateId, runTestId, promptSimulationUpdateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulatePromptTemplatesSimulationsPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulatePromptTemplatesSimulationsPartialUpdateRequestBuilder(String promptTemplateId, String runTestId, PromptSimulationUpdateRequest promptSimulationUpdateRequest) throws ApiException { + // verify the required parameter 'promptTemplateId' is set + if (promptTemplateId == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplateId' when calling simulatePromptTemplatesSimulationsPartialUpdate"); + } + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulatePromptTemplatesSimulationsPartialUpdate"); + } + // verify the required parameter 'promptSimulationUpdateRequest' is set + if (promptSimulationUpdateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'promptSimulationUpdateRequest' when calling simulatePromptTemplatesSimulationsPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/" + .replace("{prompt_template_id}", ApiClient.urlEncode(promptTemplateId.toString())) + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(promptSimulationUpdateRequest); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Retrieve a specific prompt simulation run. + * @param promptTemplateId (required) + * @param runTestId (required) + * @return PromptSimulationRunResponse + * @throws ApiException if fails to make API call + */ + public PromptSimulationRunResponse simulatePromptTemplatesSimulationsRead(String promptTemplateId, String runTestId) throws ApiException { + ApiResponse localVarResponse = simulatePromptTemplatesSimulationsReadWithHttpInfo(promptTemplateId, runTestId); + return localVarResponse.getData(); + } + + /** + * + * Retrieve a specific prompt simulation run. + * @param promptTemplateId (required) + * @param runTestId (required) + * @return ApiResponse<PromptSimulationRunResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulatePromptTemplatesSimulationsReadWithHttpInfo(String promptTemplateId, String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulatePromptTemplatesSimulationsReadRequestBuilder(promptTemplateId, runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulatePromptTemplatesSimulationsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulatePromptTemplatesSimulationsReadRequestBuilder(String promptTemplateId, String runTestId) throws ApiException { + // verify the required parameter 'promptTemplateId' is set + if (promptTemplateId == null) { + throw new ApiException(400, "Missing the required parameter 'promptTemplateId' when calling simulatePromptTemplatesSimulationsRead"); + } + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulatePromptTemplatesSimulationsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/" + .replace("{prompt_template_id}", ApiClient.urlEncode(promptTemplateId.toString())) + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get all active tests + * @return AllActiveTests + * @throws ApiException if fails to make API call + */ + public AllActiveTests simulateRunTestsActiveList() throws ApiException { + ApiResponse localVarResponse = simulateRunTestsActiveListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * Get all active tests + * @return ApiResponse<AllActiveTests> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsActiveListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsActiveListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsActiveList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsActiveListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/active/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Execute a test run + * @param runTestId (required) + * @param body (required) + * @return RunTestChatExecutionResponse + * @throws ApiException if fails to make API call + */ + public RunTestChatExecutionResponse simulateRunTestsChatExecuteCreate(String runTestId, Object body) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsChatExecuteCreateWithHttpInfo(runTestId, body); + return localVarResponse.getData(); + } + + /** + * + * Execute a test run + * @param runTestId (required) + * @param body (required) + * @return ApiResponse<RunTestChatExecutionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsChatExecuteCreateWithHttpInfo(String runTestId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsChatExecuteCreateRequestBuilder(runTestId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsChatExecuteCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsChatExecuteCreateRequestBuilder(String runTestId, Object body) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsChatExecuteCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling simulateRunTestsChatExecuteCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/chat-execute/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update components of a specific RunTest + * @param runTestId (required) + * @param runTestComponentsUpdate (required) + * @return RunTestResponse + * @throws ApiException if fails to make API call + */ + public RunTestResponse simulateRunTestsComponentsPartialUpdate(String runTestId, RunTestComponentsUpdate runTestComponentsUpdate) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsComponentsPartialUpdateWithHttpInfo(runTestId, runTestComponentsUpdate); + return localVarResponse.getData(); + } + + /** + * + * Update components of a specific RunTest + * @param runTestId (required) + * @param runTestComponentsUpdate (required) + * @return ApiResponse<RunTestResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsComponentsPartialUpdateWithHttpInfo(String runTestId, RunTestComponentsUpdate runTestComponentsUpdate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsComponentsPartialUpdateRequestBuilder(runTestId, runTestComponentsUpdate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsComponentsPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsComponentsPartialUpdateRequestBuilder(String runTestId, RunTestComponentsUpdate runTestComponentsUpdate) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsComponentsPartialUpdate"); + } + // verify the required parameter 'runTestComponentsUpdate' is set + if (runTestComponentsUpdate == null) { + throw new ApiException(400, "Missing the required parameter 'runTestComponentsUpdate' when calling simulateRunTestsComponentsPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/components/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(runTestComponentsUpdate); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Delete a specific run test + * @param runTestId (required) + * @throws ApiException if fails to make API call + */ + public void simulateRunTestsDeleteDelete(String runTestId) throws ApiException { + simulateRunTestsDeleteDeleteWithHttpInfo(runTestId); + } + + /** + * + * Delete a specific run test + * @param runTestId (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsDeleteDeleteWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsDeleteDeleteRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsDeleteDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsDeleteDeleteRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsDeleteDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/delete/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Delete multiple test executions within a run test. + * @param runTestId (required) + * @param testExecutionBulkDelete (required) + * @return TestExecutionBulkDeleteResponse + * @throws ApiException if fails to make API call + */ + public TestExecutionBulkDeleteResponse simulateRunTestsDeleteTestExecutionsCreate(String runTestId, TestExecutionBulkDelete testExecutionBulkDelete) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo(runTestId, testExecutionBulkDelete); + return localVarResponse.getData(); + } + + /** + * + * Delete multiple test executions within a run test. + * @param runTestId (required) + * @param testExecutionBulkDelete (required) + * @return ApiResponse<TestExecutionBulkDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsDeleteTestExecutionsCreateWithHttpInfo(String runTestId, TestExecutionBulkDelete testExecutionBulkDelete) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsDeleteTestExecutionsCreateRequestBuilder(runTestId, testExecutionBulkDelete); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsDeleteTestExecutionsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsDeleteTestExecutionsCreateRequestBuilder(String runTestId, TestExecutionBulkDelete testExecutionBulkDelete) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsDeleteTestExecutionsCreate"); + } + // verify the required parameter 'testExecutionBulkDelete' is set + if (testExecutionBulkDelete == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionBulkDelete' when calling simulateRunTestsDeleteTestExecutionsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/delete-test-executions/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(testExecutionBulkDelete); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the structure of an evaluation config + * @param runTestId (required) + * @param evalConfigId (required) + * @return EvalConfigStructureResponse + * @throws ApiException if fails to make API call + */ + public EvalConfigStructureResponse simulateRunTestsEvalConfigsGetStructureList(String runTestId, String evalConfigId) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsEvalConfigsGetStructureListWithHttpInfo(runTestId, evalConfigId); + return localVarResponse.getData(); + } + + /** + * + * Get the structure of an evaluation config + * @param runTestId (required) + * @param evalConfigId (required) + * @return ApiResponse<EvalConfigStructureResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsEvalConfigsGetStructureListWithHttpInfo(String runTestId, String evalConfigId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsEvalConfigsGetStructureListRequestBuilder(runTestId, evalConfigId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsEvalConfigsGetStructureList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsEvalConfigsGetStructureListRequestBuilder(String runTestId, String evalConfigId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsEvalConfigsGetStructureList"); + } + // verify the required parameter 'evalConfigId' is set + if (evalConfigId == null) { + throw new ApiException(400, "Missing the required parameter 'evalConfigId' when calling simulateRunTestsEvalConfigsGetStructureList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())) + .replace("{eval_config_id}", ApiClient.urlEncode(evalConfigId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * API View to get the id of a run test by name + * @param runTestName (required) + * @return RunTestNameResponse + * @throws ApiException if fails to make API call + */ + public RunTestNameResponse simulateRunTestsGetIdByNameRead(String runTestName) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsGetIdByNameReadWithHttpInfo(runTestName); + return localVarResponse.getData(); + } + + /** + * + * API View to get the id of a run test by name + * @param runTestName (required) + * @return ApiResponse<RunTestNameResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsGetIdByNameReadWithHttpInfo(String runTestName) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsGetIdByNameReadRequestBuilder(runTestName); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsGetIdByNameRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsGetIdByNameReadRequestBuilder(String runTestName) throws ApiException { + // verify the required parameter 'runTestName' is set + if (runTestName == null) { + throw new ApiException(400, "Missing the required parameter 'runTestName' when calling simulateRunTestsGetIdByNameRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/get-id-by-name/{run_test_name}/" + .replace("{run_test_name}", ApiClient.urlEncode(runTestName.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Rerun multiple test executions (either evaluation only or call + evaluation). All call executions within each test execution are rerun. + * @param runTestId (required) + * @param testExecutionRerun (required) + * @return TestExecutionRerunResponse + * @throws ApiException if fails to make API call + */ + public TestExecutionRerunResponse simulateRunTestsRerunTestExecutionsCreate(String runTestId, TestExecutionRerun testExecutionRerun) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsRerunTestExecutionsCreateWithHttpInfo(runTestId, testExecutionRerun); + return localVarResponse.getData(); + } + + /** + * + * Rerun multiple test executions (either evaluation only or call + evaluation). All call executions within each test execution are rerun. + * @param runTestId (required) + * @param testExecutionRerun (required) + * @return ApiResponse<TestExecutionRerunResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsRerunTestExecutionsCreateWithHttpInfo(String runTestId, TestExecutionRerun testExecutionRerun) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsRerunTestExecutionsCreateRequestBuilder(runTestId, testExecutionRerun); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsRerunTestExecutionsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsRerunTestExecutionsCreateRequestBuilder(String runTestId, TestExecutionRerun testExecutionRerun) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsRerunTestExecutionsCreate"); + } + // verify the required parameter 'testExecutionRerun' is set + if (testExecutionRerun == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionRerun' when calling simulateRunTestsRerunTestExecutionsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/rerun-test-executions/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(testExecutionRerun); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get paginated list of scenarios for a specific run test Query Parameters: - search: search string to filter scenarios by name - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param runTestId (required) + * @return List<RunTestScenarioItemResponse> + * @throws ApiException if fails to make API call + */ + public List simulateRunTestsScenariosList(String runTestId) throws ApiException { + ApiResponse> localVarResponse = simulateRunTestsScenariosListWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Get paginated list of scenarios for a specific run test Query Parameters: - search: search string to filter scenarios by name - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param runTestId (required) + * @return ApiResponse<List<RunTestScenarioItemResponse>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> simulateRunTestsScenariosListWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsScenariosListRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsScenariosList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsScenariosListRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsScenariosList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/scenarios/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the SDK code with placeholders filled + * @param runTestId (required) + * @return ChatSDKCodeResponse + * @throws ApiException if fails to make API call + */ + public ChatSDKCodeResponse simulateRunTestsSdkCodeList(String runTestId) throws ApiException { + ApiResponse localVarResponse = simulateRunTestsSdkCodeListWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Get the SDK code with placeholders filled + * @param runTestId (required) + * @return ApiResponse<ChatSDKCodeResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateRunTestsSdkCodeListWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateRunTestsSdkCodeListRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateRunTestsSdkCodeList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateRunTestsSdkCodeListRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling simulateRunTestsSdkCodeList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/sdk-code/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Create a new simulator agent + * @param simulatorAgent (required) + * @return SimulatorAgent + * @throws ApiException if fails to make API call + */ + public SimulatorAgent simulateSimulatorAgentsCreateCreate(SimulatorAgent simulatorAgent) throws ApiException { + ApiResponse localVarResponse = simulateSimulatorAgentsCreateCreateWithHttpInfo(simulatorAgent); + return localVarResponse.getData(); + } + + /** + * + * Create a new simulator agent + * @param simulatorAgent (required) + * @return ApiResponse<SimulatorAgent> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateSimulatorAgentsCreateCreateWithHttpInfo(SimulatorAgent simulatorAgent) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateSimulatorAgentsCreateCreateRequestBuilder(simulatorAgent); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateSimulatorAgentsCreateCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateSimulatorAgentsCreateCreateRequestBuilder(SimulatorAgent simulatorAgent) throws ApiException { + // verify the required parameter 'simulatorAgent' is set + if (simulatorAgent == null) { + throw new ApiException(400, "Missing the required parameter 'simulatorAgent' when calling simulateSimulatorAgentsCreateCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/simulator-agents/create/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(simulatorAgent); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Soft delete a simulator agent + * @param agentId (required) + * @return SimulatorAgentDeleteResponse + * @throws ApiException if fails to make API call + */ + public SimulatorAgentDeleteResponse simulateSimulatorAgentsDeleteDelete(String agentId) throws ApiException { + ApiResponse localVarResponse = simulateSimulatorAgentsDeleteDeleteWithHttpInfo(agentId); + return localVarResponse.getData(); + } + + /** + * + * Soft delete a simulator agent + * @param agentId (required) + * @return ApiResponse<SimulatorAgentDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateSimulatorAgentsDeleteDeleteWithHttpInfo(String agentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateSimulatorAgentsDeleteDeleteRequestBuilder(agentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateSimulatorAgentsDeleteDelete", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateSimulatorAgentsDeleteDeleteRequestBuilder(String agentId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateSimulatorAgentsDeleteDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/simulator-agents/{agent_id}/delete/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Edit an existing simulator agent + * @param agentId (required) + * @param simulatorAgent (required) + * @return SimulatorAgent + * @throws ApiException if fails to make API call + */ + public SimulatorAgent simulateSimulatorAgentsEditUpdate(String agentId, SimulatorAgent simulatorAgent) throws ApiException { + ApiResponse localVarResponse = simulateSimulatorAgentsEditUpdateWithHttpInfo(agentId, simulatorAgent); + return localVarResponse.getData(); + } + + /** + * + * Edit an existing simulator agent + * @param agentId (required) + * @param simulatorAgent (required) + * @return ApiResponse<SimulatorAgent> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateSimulatorAgentsEditUpdateWithHttpInfo(String agentId, SimulatorAgent simulatorAgent) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateSimulatorAgentsEditUpdateRequestBuilder(agentId, simulatorAgent); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateSimulatorAgentsEditUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateSimulatorAgentsEditUpdateRequestBuilder(String agentId, SimulatorAgent simulatorAgent) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateSimulatorAgentsEditUpdate"); + } + // verify the required parameter 'simulatorAgent' is set + if (simulatorAgent == null) { + throw new ApiException(400, "Missing the required parameter 'simulatorAgent' when calling simulateSimulatorAgentsEditUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/simulator-agents/{agent_id}/edit/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(simulatorAgent); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List simulator agents with pagination and search + * @return SimulatorAgentListResponse + * @throws ApiException if fails to make API call + */ + public SimulatorAgentListResponse simulateSimulatorAgentsList() throws ApiException { + ApiResponse localVarResponse = simulateSimulatorAgentsListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * List simulator agents with pagination and search + * @return ApiResponse<SimulatorAgentListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateSimulatorAgentsListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateSimulatorAgentsListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateSimulatorAgentsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateSimulatorAgentsListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/simulator-agents/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get details of a specific simulator agent + * @param agentId (required) + * @return SimulatorAgent + * @throws ApiException if fails to make API call + */ + public SimulatorAgent simulateSimulatorAgentsRead(String agentId) throws ApiException { + ApiResponse localVarResponse = simulateSimulatorAgentsReadWithHttpInfo(agentId); + return localVarResponse.getData(); + } + + /** + * + * Get details of a specific simulator agent + * @param agentId (required) + * @return ApiResponse<SimulatorAgent> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateSimulatorAgentsReadWithHttpInfo(String agentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateSimulatorAgentsReadRequestBuilder(agentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateSimulatorAgentsRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateSimulatorAgentsReadRequestBuilder(String agentId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling simulateSimulatorAgentsRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/simulator-agents/{agent_id}/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Create a batch of CallExecution records for chat execution (exactly 10 per API call). + * This follows the same flow as inbound/outbound calls: 1. Resolve SimulatorAgent (scenario > run_test > fallback) 2. Extract base_prompt from SimulatorAgent 3. Handle dataset scenarios (create one CallExecution per row) 4. Enhance prompt with row data if applicable 5. Store proper metadata in CallExecution Returns exactly 10 CallExecution objects per API call. hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + * @param testExecutionId (required) + * @param body (required) + * @return TestExecutionChatBatchResponse + * @throws ApiException if fails to make API call + */ + public TestExecutionChatBatchResponse simulateTestExecutionsChatCallExecutionsBatchCreate(String testExecutionId, Object body) throws ApiException { + ApiResponse localVarResponse = simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo(testExecutionId, body); + return localVarResponse.getData(); + } + + /** + * Create a batch of CallExecution records for chat execution (exactly 10 per API call). + * This follows the same flow as inbound/outbound calls: 1. Resolve SimulatorAgent (scenario > run_test > fallback) 2. Extract base_prompt from SimulatorAgent 3. Handle dataset scenarios (create one CallExecution per row) 4. Enhance prompt with row data if applicable 5. Store proper metadata in CallExecution Returns exactly 10 CallExecution objects per API call. hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + * @param testExecutionId (required) + * @param body (required) + * @return ApiResponse<TestExecutionChatBatchResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsChatCallExecutionsBatchCreateWithHttpInfo(String testExecutionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsChatCallExecutionsBatchCreateRequestBuilder(testExecutionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsChatCallExecutionsBatchCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsChatCallExecutionsBatchCreateRequestBuilder(String testExecutionId, Object body) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsChatCallExecutionsBatchCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling simulateTestExecutionsChatCallExecutionsBatchCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/chat/call-executions/batch/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update column order for a test execution + * @param testExecutionId (required) + * @param testExecutionColumnOrder (required) + * @return TestExecutionColumnOrderResponse + * @throws ApiException if fails to make API call + */ + public TestExecutionColumnOrderResponse simulateTestExecutionsColumnOrderUpdate(String testExecutionId, TestExecutionColumnOrder testExecutionColumnOrder) throws ApiException { + ApiResponse localVarResponse = simulateTestExecutionsColumnOrderUpdateWithHttpInfo(testExecutionId, testExecutionColumnOrder); + return localVarResponse.getData(); + } + + /** + * + * Update column order for a test execution + * @param testExecutionId (required) + * @param testExecutionColumnOrder (required) + * @return ApiResponse<TestExecutionColumnOrderResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsColumnOrderUpdateWithHttpInfo(String testExecutionId, TestExecutionColumnOrder testExecutionColumnOrder) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsColumnOrderUpdateRequestBuilder(testExecutionId, testExecutionColumnOrder); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsColumnOrderUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsColumnOrderUpdateRequestBuilder(String testExecutionId, TestExecutionColumnOrder testExecutionColumnOrder) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsColumnOrderUpdate"); + } + // verify the required parameter 'testExecutionColumnOrder' is set + if (testExecutionColumnOrder == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionColumnOrder' when calling simulateTestExecutionsColumnOrderUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/column-order/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(testExecutionColumnOrder); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Delete a specific test execution + * @param testExecutionId (required) + * @throws ApiException if fails to make API call + */ + public void simulateTestExecutionsDeleteDelete(String testExecutionId) throws ApiException { + simulateTestExecutionsDeleteDeleteWithHttpInfo(testExecutionId); + } + + /** + * + * Delete a specific test execution + * @param testExecutionId (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsDeleteDeleteWithHttpInfo(String testExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsDeleteDeleteRequestBuilder(testExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsDeleteDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsDeleteDeleteRequestBuilder(String testExecutionId) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsDeleteDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/delete/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Fetch the evaluation explanation summary from the database. If not present, trigger async calculation and return empty response. + * @param testExecutionId (required) + * @return EvalExplanationSummaryResponse + * @throws ApiException if fails to make API call + */ + public EvalExplanationSummaryResponse simulateTestExecutionsEvalExplanationSummaryList(String testExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo(testExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Fetch the evaluation explanation summary from the database. If not present, trigger async calculation and return empty response. + * @param testExecutionId (required) + * @return ApiResponse<EvalExplanationSummaryResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsEvalExplanationSummaryListWithHttpInfo(String testExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsEvalExplanationSummaryListRequestBuilder(testExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsEvalExplanationSummaryList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsEvalExplanationSummaryListRequestBuilder(String testExecutionId) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsEvalExplanationSummaryList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Refresh the evaluation explanation summary by recalculating it. This endpoint triggers the summary calculation task again. + * @param testExecutionId (required) + * @param body (required) + * @return EvalExplanationSummaryRefreshResponse + * @throws ApiException if fails to make API call + */ + public EvalExplanationSummaryRefreshResponse simulateTestExecutionsEvalExplanationSummaryRefreshCreate(String testExecutionId, Object body) throws ApiException { + ApiResponse localVarResponse = simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo(testExecutionId, body); + return localVarResponse.getData(); + } + + /** + * + * Refresh the evaluation explanation summary by recalculating it. This endpoint triggers the summary calculation task again. + * @param testExecutionId (required) + * @param body (required) + * @return ApiResponse<EvalExplanationSummaryRefreshResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsEvalExplanationSummaryRefreshCreateWithHttpInfo(String testExecutionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsEvalExplanationSummaryRefreshCreateRequestBuilder(testExecutionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsEvalExplanationSummaryRefreshCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsEvalExplanationSummaryRefreshCreateRequestBuilder(String testExecutionId, Object body) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsEvalExplanationSummaryRefreshCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling simulateTestExecutionsEvalExplanationSummaryRefreshCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Fetch the agent optimiser analysis for a test execution. If not present or pending, returns status information. + * @param testExecutionId (required) + * @return OptimiserAnalysisResponse + * @throws ApiException if fails to make API call + */ + public OptimiserAnalysisResponse simulateTestExecutionsOptimiserAnalysisList(String testExecutionId) throws ApiException { + ApiResponse localVarResponse = simulateTestExecutionsOptimiserAnalysisListWithHttpInfo(testExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Fetch the agent optimiser analysis for a test execution. If not present or pending, returns status information. + * @param testExecutionId (required) + * @return ApiResponse<OptimiserAnalysisResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsOptimiserAnalysisListWithHttpInfo(String testExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsOptimiserAnalysisListRequestBuilder(testExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsOptimiserAnalysisList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsOptimiserAnalysisListRequestBuilder(String testExecutionId) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsOptimiserAnalysisList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/optimiser-analysis/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Trigger a new agent optimiser analysis run. + * @param testExecutionId (required) + * @param body (required) + * @return OptimiserAnalysisRefreshResponse + * @throws ApiException if fails to make API call + */ + public OptimiserAnalysisRefreshResponse simulateTestExecutionsOptimiserAnalysisRefreshCreate(String testExecutionId, Object body) throws ApiException { + ApiResponse localVarResponse = simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo(testExecutionId, body); + return localVarResponse.getData(); + } + + /** + * + * Trigger a new agent optimiser analysis run. + * @param testExecutionId (required) + * @param body (required) + * @return ApiResponse<OptimiserAnalysisRefreshResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsOptimiserAnalysisRefreshCreateWithHttpInfo(String testExecutionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsOptimiserAnalysisRefreshCreateRequestBuilder(testExecutionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsOptimiserAnalysisRefreshCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsOptimiserAnalysisRefreshCreateRequestBuilder(String testExecutionId, Object body) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsOptimiserAnalysisRefreshCreate"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling simulateTestExecutionsOptimiserAnalysisRefreshCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Rerun multiple call executions (either evaluation only or call + evaluation) + * @param testExecutionId (required) + * @param callExecutionRerun (required) + * @return RerunCallsResponse + * @throws ApiException if fails to make API call + */ + public RerunCallsResponse simulateTestExecutionsRerunCallsCreate(String testExecutionId, CallExecutionRerun callExecutionRerun) throws ApiException { + ApiResponse localVarResponse = simulateTestExecutionsRerunCallsCreateWithHttpInfo(testExecutionId, callExecutionRerun); + return localVarResponse.getData(); + } + + /** + * + * Rerun multiple call executions (either evaluation only or call + evaluation) + * @param testExecutionId (required) + * @param callExecutionRerun (required) + * @return ApiResponse<RerunCallsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse simulateTestExecutionsRerunCallsCreateWithHttpInfo(String testExecutionId, CallExecutionRerun callExecutionRerun) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = simulateTestExecutionsRerunCallsCreateRequestBuilder(testExecutionId, callExecutionRerun); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("simulateTestExecutionsRerunCallsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder simulateTestExecutionsRerunCallsCreateRequestBuilder(String testExecutionId, CallExecutionRerun callExecutionRerun) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling simulateTestExecutionsRerunCallsCreate"); + } + // verify the required parameter 'callExecutionRerun' is set + if (callExecutionRerun == null) { + throw new ApiException(400, "Missing the required parameter 'callExecutionRerun' when calling simulateTestExecutionsRerunCallsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/rerun-calls/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(callExecutionRerun); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationAgentDefinitionsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationAgentDefinitionsApi.java new file mode 100644 index 0000000..e4fc14d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationAgentDefinitionsApi.java @@ -0,0 +1,557 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AgentDefinitionCreateRequest; +import com.futureagi.sdk.model.AgentDefinitionCreateResponse; +import com.futureagi.sdk.model.AgentDefinitionDeleteResponse; +import com.futureagi.sdk.model.AgentDefinitionEditRequest; +import com.futureagi.sdk.model.AgentDefinitionEditResponse; +import com.futureagi.sdk.model.AgentDefinitionListResponse; +import com.futureagi.sdk.model.AgentDefinitionResponse; +import com.futureagi.sdk.model.ApiErrorWithDetailsResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulationAgentDefinitionsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SimulationAgentDefinitionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SimulationAgentDefinitionsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * Create a new agent definition with its first version. + * @param agentDefinitionCreateRequest (required) + * @return AgentDefinitionCreateResponse + * @throws ApiException if fails to make API call + */ + public AgentDefinitionCreateResponse createAgentDefinition(AgentDefinitionCreateRequest agentDefinitionCreateRequest) throws ApiException { + ApiResponse localVarResponse = createAgentDefinitionWithHttpInfo(agentDefinitionCreateRequest); + return localVarResponse.getData(); + } + + /** + * + * Create a new agent definition with its first version. + * @param agentDefinitionCreateRequest (required) + * @return ApiResponse<AgentDefinitionCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createAgentDefinitionWithHttpInfo(AgentDefinitionCreateRequest agentDefinitionCreateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createAgentDefinitionRequestBuilder(agentDefinitionCreateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createAgentDefinition", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createAgentDefinitionRequestBuilder(AgentDefinitionCreateRequest agentDefinitionCreateRequest) throws ApiException { + // verify the required parameter 'agentDefinitionCreateRequest' is set + if (agentDefinitionCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'agentDefinitionCreateRequest' when calling createAgentDefinition"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/create/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(agentDefinitionCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Soft delete an agent definition. + * @param agentId (required) + * @return AgentDefinitionDeleteResponse + * @throws ApiException if fails to make API call + */ + public AgentDefinitionDeleteResponse deleteAgentDefinition(String agentId) throws ApiException { + ApiResponse localVarResponse = deleteAgentDefinitionWithHttpInfo(agentId); + return localVarResponse.getData(); + } + + /** + * + * Soft delete an agent definition. + * @param agentId (required) + * @return ApiResponse<AgentDefinitionDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteAgentDefinitionWithHttpInfo(String agentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteAgentDefinitionRequestBuilder(agentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteAgentDefinition", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteAgentDefinitionRequestBuilder(String agentId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling deleteAgentDefinition"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/delete/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get details of a specific agent definition with version information. + * @param agentId (required) + * @return AgentDefinitionResponse + * @throws ApiException if fails to make API call + */ + public AgentDefinitionResponse getAgentDefinition(String agentId) throws ApiException { + ApiResponse localVarResponse = getAgentDefinitionWithHttpInfo(agentId); + return localVarResponse.getData(); + } + + /** + * + * Get details of a specific agent definition with version information. + * @param agentId (required) + * @return ApiResponse<AgentDefinitionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAgentDefinitionWithHttpInfo(String agentId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAgentDefinitionRequestBuilder(agentId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAgentDefinition", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAgentDefinitionRequestBuilder(String agentId) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling getAgentDefinition"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get paginated list of agent definitions for the user's organization. + * @param search (optional, default to ) + * @param agentType (optional) + * @param agentDefinitionId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return List<AgentDefinitionListResponse> + * @throws ApiException if fails to make API call + */ + public List listAgentDefinitions(String search, String agentType, UUID agentDefinitionId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResponse = listAgentDefinitionsWithHttpInfo(search, agentType, agentDefinitionId, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get paginated list of agent definitions for the user's organization. + * @param search (optional, default to ) + * @param agentType (optional) + * @param agentDefinitionId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ApiResponse<List<AgentDefinitionListResponse>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> listAgentDefinitionsWithHttpInfo(String search, String agentType, UUID agentDefinitionId, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listAgentDefinitionsRequestBuilder(search, agentType, agentDefinitionId, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listAgentDefinitions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listAgentDefinitionsRequestBuilder(String search, String agentType, UUID agentDefinitionId, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "agent_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("agent_type", agentType)); + localVarQueryParameterBaseName = "agent_definition_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("agent_definition_id", agentDefinitionId)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update an existing agent definition. + * @param agentId (required) + * @param agentDefinitionEditRequest (required) + * @return AgentDefinitionEditResponse + * @throws ApiException if fails to make API call + */ + public AgentDefinitionEditResponse updateAgentDefinition(String agentId, AgentDefinitionEditRequest agentDefinitionEditRequest) throws ApiException { + ApiResponse localVarResponse = updateAgentDefinitionWithHttpInfo(agentId, agentDefinitionEditRequest); + return localVarResponse.getData(); + } + + /** + * + * Update an existing agent definition. + * @param agentId (required) + * @param agentDefinitionEditRequest (required) + * @return ApiResponse<AgentDefinitionEditResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateAgentDefinitionWithHttpInfo(String agentId, AgentDefinitionEditRequest agentDefinitionEditRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateAgentDefinitionRequestBuilder(agentId, agentDefinitionEditRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateAgentDefinition", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateAgentDefinitionRequestBuilder(String agentId, AgentDefinitionEditRequest agentDefinitionEditRequest) throws ApiException { + // verify the required parameter 'agentId' is set + if (agentId == null) { + throw new ApiException(400, "Missing the required parameter 'agentId' when calling updateAgentDefinition"); + } + // verify the required parameter 'agentDefinitionEditRequest' is set + if (agentDefinitionEditRequest == null) { + throw new ApiException(400, "Missing the required parameter 'agentDefinitionEditRequest' when calling updateAgentDefinition"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/agent-definitions/{agent_id}/edit/" + .replace("{agent_id}", ApiClient.urlEncode(agentId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(agentDefinitionEditRequest); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationPersonasApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationPersonasApi.java new file mode 100644 index 0000000..b1a0f3b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationPersonasApi.java @@ -0,0 +1,532 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ApiErrorWithDetailsResponse; +import com.futureagi.sdk.model.ListPersonas200Response; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.Persona; +import com.futureagi.sdk.model.PersonaCreate; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulationPersonasApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SimulationPersonasApi() { + this(Configuration.getDefaultApiClient()); + } + + public SimulationPersonasApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * Create a new workspace-level persona + * @param personaCreate (required) + * @return PersonaCreate + * @throws ApiException if fails to make API call + */ + public PersonaCreate createPersona(PersonaCreate personaCreate) throws ApiException { + ApiResponse localVarResponse = createPersonaWithHttpInfo(personaCreate); + return localVarResponse.getData(); + } + + /** + * + * Create a new workspace-level persona + * @param personaCreate (required) + * @return ApiResponse<PersonaCreate> + * @throws ApiException if fails to make API call + */ + public ApiResponse createPersonaWithHttpInfo(PersonaCreate personaCreate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createPersonaRequestBuilder(personaCreate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createPersona", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createPersonaRequestBuilder(PersonaCreate personaCreate) throws ApiException { + // verify the required parameter 'personaCreate' is set + if (personaCreate == null) { + throw new ApiException(400, "Missing the required parameter 'personaCreate' when calling createPersona"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(personaCreate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Delete a persona (workspace-level only) + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void deletePersona(String id) throws ApiException { + deletePersonaWithHttpInfo(id); + } + + /** + * + * Delete a persona (workspace-level only) + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deletePersonaWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deletePersonaRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deletePersona", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deletePersonaRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deletePersona"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Retrieve a specific persona + * @param id (required) + * @return Persona + * @throws ApiException if fails to make API call + */ + public Persona getPersona(String id) throws ApiException { + ApiResponse localVarResponse = getPersonaWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Retrieve a specific persona + * @param id (required) + * @return ApiResponse<Persona> + * @throws ApiException if fails to make API call + */ + public ApiResponse getPersonaWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getPersonaRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getPersona", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getPersonaRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getPersona"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List personas with pagination + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ListPersonas200Response + * @throws ApiException if fails to make API call + */ + public ListPersonas200Response listPersonas(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listPersonasWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * List personas with pagination + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ListPersonas200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listPersonasWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listPersonasRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listPersonas", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listPersonasRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * ViewSet for managing Personas. + * @param id (required) + * @param persona (required) + * @return Persona + * @throws ApiException if fails to make API call + */ + public Persona updatePersona(String id, Persona persona) throws ApiException { + ApiResponse localVarResponse = updatePersonaWithHttpInfo(id, persona); + return localVarResponse.getData(); + } + + /** + * + * ViewSet for managing Personas. + * @param id (required) + * @param persona (required) + * @return ApiResponse<Persona> + * @throws ApiException if fails to make API call + */ + public ApiResponse updatePersonaWithHttpInfo(String id, Persona persona) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updatePersonaRequestBuilder(id, persona); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updatePersona", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updatePersonaRequestBuilder(String id, Persona persona) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updatePersona"); + } + // verify the required parameter 'persona' is set + if (persona == null) { + throw new ApiException(400, "Missing the required parameter 'persona' when calling updatePersona"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/personas/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(persona); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationRunTestsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationRunTestsApi.java new file mode 100644 index 0000000..2672b58 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationRunTestsApi.java @@ -0,0 +1,994 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.CallExecutionErrorResponse; +import com.futureagi.sdk.model.CreateRunTest; +import com.futureagi.sdk.model.ErrorResponse; +import com.futureagi.sdk.model.ExecuteRunTest; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.RunTestAnalytics; +import com.futureagi.sdk.model.RunTestCallExecutionsResponse; +import com.futureagi.sdk.model.RunTestErrorResponse; +import com.futureagi.sdk.model.RunTestExecutionResponse; +import com.futureagi.sdk.model.RunTestMessageResponse; +import com.futureagi.sdk.model.RunTestResponse; +import com.futureagi.sdk.model.TestExecutionItemResponse; +import com.futureagi.sdk.model.TestExecutionStatusSummary; +import java.util.UUID; +import com.futureagi.sdk.model.UpdateRunTest; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulationRunTestsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SimulationRunTestsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SimulationRunTestsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * Create a new RunTest + * @param createRunTest (required) + * @return RunTestResponse + * @throws ApiException if fails to make API call + */ + public RunTestResponse createRunTest(CreateRunTest createRunTest) throws ApiException { + ApiResponse localVarResponse = createRunTestWithHttpInfo(createRunTest); + return localVarResponse.getData(); + } + + /** + * + * Create a new RunTest + * @param createRunTest (required) + * @return ApiResponse<RunTestResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createRunTestWithHttpInfo(CreateRunTest createRunTest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createRunTestRequestBuilder(createRunTest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createRunTest", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createRunTestRequestBuilder(CreateRunTest createRunTest) throws ApiException { + // verify the required parameter 'createRunTest' is set + if (createRunTest == null) { + throw new ApiException(400, "Missing the required parameter 'createRunTest' when calling createRunTest"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/create/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createRunTest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Delete a specific RunTest (soft delete) + * @param runTestId (required) + * @return RunTestMessageResponse + * @throws ApiException if fails to make API call + */ + public RunTestMessageResponse deleteRunTest(String runTestId) throws ApiException { + ApiResponse localVarResponse = deleteRunTestWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Delete a specific RunTest (soft delete) + * @param runTestId (required) + * @return ApiResponse<RunTestMessageResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteRunTestWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteRunTestRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteRunTest", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteRunTestRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling deleteRunTest"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Execute a test run + * @param runTestId (required) + * @param executeRunTest (required) + * @return RunTestExecutionResponse + * @throws ApiException if fails to make API call + */ + public RunTestExecutionResponse executeRunTest(String runTestId, ExecuteRunTest executeRunTest) throws ApiException { + ApiResponse localVarResponse = executeRunTestWithHttpInfo(runTestId, executeRunTest); + return localVarResponse.getData(); + } + + /** + * + * Execute a test run + * @param runTestId (required) + * @param executeRunTest (required) + * @return ApiResponse<RunTestExecutionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse executeRunTestWithHttpInfo(String runTestId, ExecuteRunTest executeRunTest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = executeRunTestRequestBuilder(runTestId, executeRunTest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("executeRunTest", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder executeRunTestRequestBuilder(String runTestId, ExecuteRunTest executeRunTest) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling executeRunTest"); + } + // verify the required parameter 'executeRunTest' is set + if (executeRunTest == null) { + throw new ApiException(400, "Missing the required parameter 'executeRunTest' when calling executeRunTest"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/execute/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(executeRunTest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Retrieve a specific RunTest + * @param runTestId (required) + * @return RunTestResponse + * @throws ApiException if fails to make API call + */ + public RunTestResponse getRunTest(String runTestId) throws ApiException { + ApiResponse localVarResponse = getRunTestWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Retrieve a specific RunTest + * @param runTestId (required) + * @return ApiResponse<RunTestResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getRunTestWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRunTestRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getRunTest", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getRunTestRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling getRunTest"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get analytics data for a specific run test across multiple test executions + * @param runTestId (required) + * @return RunTestAnalytics + * @throws ApiException if fails to make API call + */ + public RunTestAnalytics getRunTestAnalytics(String runTestId) throws ApiException { + ApiResponse localVarResponse = getRunTestAnalyticsWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Get analytics data for a specific run test across multiple test executions + * @param runTestId (required) + * @return ApiResponse<RunTestAnalytics> + * @throws ApiException if fails to make API call + */ + public ApiResponse getRunTestAnalyticsWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRunTestAnalyticsRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getRunTestAnalytics", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getRunTestAnalyticsRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling getRunTestAnalytics"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/analytics/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get test execution status + * @param runTestId (required) + * @return TestExecutionStatusSummary + * @throws ApiException if fails to make API call + */ + public TestExecutionStatusSummary getRunTestStatus(String runTestId) throws ApiException { + ApiResponse localVarResponse = getRunTestStatusWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Get test execution status + * @param runTestId (required) + * @return ApiResponse<TestExecutionStatusSummary> + * @throws ApiException if fails to make API call + */ + public ApiResponse getRunTestStatusWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRunTestStatusRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getRunTestStatus", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getRunTestStatusRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling getRunTestStatus"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/status/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get all call executions for a specific run test with pagination and search Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status - limit: number of call executions per page (default: 10) - page: page number for call executions (default: 1) + * @param runTestId (required) + * @return RunTestCallExecutionsResponse + * @throws ApiException if fails to make API call + */ + public RunTestCallExecutionsResponse listRunTestCallExecutions(String runTestId) throws ApiException { + ApiResponse localVarResponse = listRunTestCallExecutionsWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Get all call executions for a specific run test with pagination and search Query Parameters: - search: search string to filter call executions by phone number or scenario name - status: filter by call execution status - limit: number of call executions per page (default: 10) - page: page number for call executions (default: 1) + * @param runTestId (required) + * @return ApiResponse<RunTestCallExecutionsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listRunTestCallExecutionsWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listRunTestCallExecutionsRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listRunTestCallExecutions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listRunTestCallExecutionsRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling listRunTestCallExecutions"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/call-executions/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get test execution data for a specific run test Query Parameters: - search: search string to filter test executions by status or scenario name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param runTestId (required) + * @return List<TestExecutionItemResponse> + * @throws ApiException if fails to make API call + */ + public List listRunTestExecutions(String runTestId) throws ApiException { + ApiResponse> localVarResponse = listRunTestExecutionsWithHttpInfo(runTestId); + return localVarResponse.getData(); + } + + /** + * + * Get test execution data for a specific run test Query Parameters: - search: search string to filter test executions by status or scenario name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + * @param runTestId (required) + * @return ApiResponse<List<TestExecutionItemResponse>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> listRunTestExecutionsWithHttpInfo(String runTestId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listRunTestExecutionsRequestBuilder(runTestId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listRunTestExecutions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listRunTestExecutionsRequestBuilder(String runTestId) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling listRunTestExecutions"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/executions/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) - simulation_type: filter by source type (RunTest.SourceTypes values: 'agent_definition' or 'prompt') - prompt_template_id: filter by prompt template ID (used when simulation_type is 'prompt') + * @param search (optional, default to ) + * @param simulationType (optional) + * @param promptTemplateId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return List<RunTestResponse> + * @throws ApiException if fails to make API call + */ + public List listRunTests(String search, String simulationType, UUID promptTemplateId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResponse = listRunTestsWithHttpInfo(search, simulationType, promptTemplateId, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get paginated list of run tests for the user's organization Query Parameters: - search: search string to filter run tests by name - limit: number of items per page (default: 10) - page: page number (default: 1) - simulation_type: filter by source type (RunTest.SourceTypes values: 'agent_definition' or 'prompt') - prompt_template_id: filter by prompt template ID (used when simulation_type is 'prompt') + * @param search (optional, default to ) + * @param simulationType (optional) + * @param promptTemplateId (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ApiResponse<List<RunTestResponse>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> listRunTestsWithHttpInfo(String search, String simulationType, UUID promptTemplateId, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listRunTestsRequestBuilder(search, simulationType, promptTemplateId, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listRunTests", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listRunTestsRequestBuilder(String search, String simulationType, UUID promptTemplateId, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "simulation_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("simulation_type", simulationType)); + localVarQueryParameterBaseName = "prompt_template_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("prompt_template_id", promptTemplateId)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update a specific RunTest + * @param runTestId (required) + * @param updateRunTest (required) + * @return RunTestResponse + * @throws ApiException if fails to make API call + */ + public RunTestResponse updateRunTest(String runTestId, UpdateRunTest updateRunTest) throws ApiException { + ApiResponse localVarResponse = updateRunTestWithHttpInfo(runTestId, updateRunTest); + return localVarResponse.getData(); + } + + /** + * + * Update a specific RunTest + * @param runTestId (required) + * @param updateRunTest (required) + * @return ApiResponse<RunTestResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateRunTestWithHttpInfo(String runTestId, UpdateRunTest updateRunTest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateRunTestRequestBuilder(runTestId, updateRunTest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateRunTest", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateRunTestRequestBuilder(String runTestId, UpdateRunTest updateRunTest) throws ApiException { + // verify the required parameter 'runTestId' is set + if (runTestId == null) { + throw new ApiException(400, "Missing the required parameter 'runTestId' when calling updateRunTest"); + } + // verify the required parameter 'updateRunTest' is set + if (updateRunTest == null) { + throw new ApiException(400, "Missing the required parameter 'updateRunTest' when calling updateRunTest"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/run-tests/{run_test_id}/" + .replace("{run_test_id}", ApiClient.urlEncode(runTestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateRunTest); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationScenariosApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationScenariosApi.java new file mode 100644 index 0000000..65d5be3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationScenariosApi.java @@ -0,0 +1,557 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.ScenarioCreateRequest; +import com.futureagi.sdk.model.ScenarioCreateResponse; +import com.futureagi.sdk.model.ScenarioDeleteResponse; +import com.futureagi.sdk.model.ScenarioDetailResponse; +import com.futureagi.sdk.model.ScenarioEditRequest; +import com.futureagi.sdk.model.ScenarioEditResponse; +import com.futureagi.sdk.model.ScenarioErrorResponse; +import com.futureagi.sdk.model.ScenarioListResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulationScenariosApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SimulationScenariosApi() { + this(Configuration.getDefaultApiClient()); + } + + public SimulationScenariosApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create scenario + * Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + * @param scenarioCreateRequest (required) + * @return ScenarioCreateResponse + * @throws ApiException if fails to make API call + */ + public ScenarioCreateResponse createScenario(ScenarioCreateRequest scenarioCreateRequest) throws ApiException { + ApiResponse localVarResponse = createScenarioWithHttpInfo(scenarioCreateRequest); + return localVarResponse.getData(); + } + + /** + * Create scenario + * Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + * @param scenarioCreateRequest (required) + * @return ApiResponse<ScenarioCreateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createScenarioWithHttpInfo(ScenarioCreateRequest scenarioCreateRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createScenarioRequestBuilder(scenarioCreateRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createScenario", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createScenarioRequestBuilder(ScenarioCreateRequest scenarioCreateRequest) throws ApiException { + // verify the required parameter 'scenarioCreateRequest' is set + if (scenarioCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioCreateRequest' when calling createScenario"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/create/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(scenarioCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Delete scenario + * Soft-deletes a scenario by setting deleted=True. + * @param scenarioId (required) + * @return ScenarioDeleteResponse + * @throws ApiException if fails to make API call + */ + public ScenarioDeleteResponse deleteScenario(String scenarioId) throws ApiException { + ApiResponse localVarResponse = deleteScenarioWithHttpInfo(scenarioId); + return localVarResponse.getData(); + } + + /** + * Delete scenario + * Soft-deletes a scenario by setting deleted=True. + * @param scenarioId (required) + * @return ApiResponse<ScenarioDeleteResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteScenarioWithHttpInfo(String scenarioId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteScenarioRequestBuilder(scenarioId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteScenario", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteScenarioRequestBuilder(String scenarioId) throws ApiException { + // verify the required parameter 'scenarioId' is set + if (scenarioId == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioId' when calling deleteScenario"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/{scenario_id}/delete/" + .replace("{scenario_id}", ApiClient.urlEncode(scenarioId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get scenario detail + * Returns full detail of a specific scenario including graph data and prompts. + * @param scenarioId (required) + * @return ScenarioDetailResponse + * @throws ApiException if fails to make API call + */ + public ScenarioDetailResponse getScenario(String scenarioId) throws ApiException { + ApiResponse localVarResponse = getScenarioWithHttpInfo(scenarioId); + return localVarResponse.getData(); + } + + /** + * Get scenario detail + * Returns full detail of a specific scenario including graph data and prompts. + * @param scenarioId (required) + * @return ApiResponse<ScenarioDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getScenarioWithHttpInfo(String scenarioId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getScenarioRequestBuilder(scenarioId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getScenario", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getScenarioRequestBuilder(String scenarioId) throws ApiException { + // verify the required parameter 'scenarioId' is set + if (scenarioId == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioId' when calling getScenario"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/{scenario_id}/" + .replace("{scenario_id}", ApiClient.urlEncode(scenarioId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * List scenarios + * Returns a paginated list of scenarios for the user's organization. + * @param search (optional, default to ) + * @param agentDefinitionId (optional) + * @param agentType (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ScenarioListResponse + * @throws ApiException if fails to make API call + */ + public ScenarioListResponse listScenarios(String search, UUID agentDefinitionId, String agentType, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listScenariosWithHttpInfo(search, agentDefinitionId, agentType, page, limit); + return localVarResponse.getData(); + } + + /** + * List scenarios + * Returns a paginated list of scenarios for the user's organization. + * @param search (optional, default to ) + * @param agentDefinitionId (optional) + * @param agentType (optional) + * @param page (optional, default to 1) + * @param limit (optional) + * @return ApiResponse<ScenarioListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listScenariosWithHttpInfo(String search, UUID agentDefinitionId, String agentType, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listScenariosRequestBuilder(search, agentDefinitionId, agentType, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listScenarios", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listScenariosRequestBuilder(String search, UUID agentDefinitionId, String agentType, Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "agent_definition_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("agent_definition_id", agentDefinitionId)); + localVarQueryParameterBaseName = "agent_type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("agent_type", agentType)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Edit scenario + * Updates scenario name, description, graph, or prompt. + * @param scenarioId (required) + * @param scenarioEditRequest (required) + * @return ScenarioEditResponse + * @throws ApiException if fails to make API call + */ + public ScenarioEditResponse updateScenario(String scenarioId, ScenarioEditRequest scenarioEditRequest) throws ApiException { + ApiResponse localVarResponse = updateScenarioWithHttpInfo(scenarioId, scenarioEditRequest); + return localVarResponse.getData(); + } + + /** + * Edit scenario + * Updates scenario name, description, graph, or prompt. + * @param scenarioId (required) + * @param scenarioEditRequest (required) + * @return ApiResponse<ScenarioEditResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateScenarioWithHttpInfo(String scenarioId, ScenarioEditRequest scenarioEditRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateScenarioRequestBuilder(scenarioId, scenarioEditRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateScenario", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateScenarioRequestBuilder(String scenarioId, ScenarioEditRequest scenarioEditRequest) throws ApiException { + // verify the required parameter 'scenarioId' is set + if (scenarioId == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioId' when calling updateScenario"); + } + // verify the required parameter 'scenarioEditRequest' is set + if (scenarioEditRequest == null) { + throw new ApiException(400, "Missing the required parameter 'scenarioEditRequest' when calling updateScenario"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/scenarios/{scenario_id}/edit/" + .replace("{scenario_id}", ApiClient.urlEncode(scenarioId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(scenarioEditRequest); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationTestExecutionsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationTestExecutionsApi.java new file mode 100644 index 0000000..31c1d7b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationTestExecutionsApi.java @@ -0,0 +1,724 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.CancelTestExecutionResponse; +import com.futureagi.sdk.model.ErrorResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.PerformanceSummary; +import com.futureagi.sdk.model.RunTestErrorResponse; +import com.futureagi.sdk.model.RunTestKPIsResponse; +import com.futureagi.sdk.model.TestExecution; +import com.futureagi.sdk.model.TestExecutionAnalytics; +import com.futureagi.sdk.model.TestExecutionDetailResponse; +import com.futureagi.sdk.model.TestExecutionTranscriptsResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulationTestExecutionsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SimulationTestExecutionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SimulationTestExecutionsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * Cancel a test execution + * @param testExecutionId (required) + * @param body (required) + * @return CancelTestExecutionResponse + * @throws ApiException if fails to make API call + */ + public CancelTestExecutionResponse cancelTestExecution(String testExecutionId, Object body) throws ApiException { + ApiResponse localVarResponse = cancelTestExecutionWithHttpInfo(testExecutionId, body); + return localVarResponse.getData(); + } + + /** + * + * Cancel a test execution + * @param testExecutionId (required) + * @param body (required) + * @return ApiResponse<CancelTestExecutionResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse cancelTestExecutionWithHttpInfo(String testExecutionId, Object body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = cancelTestExecutionRequestBuilder(testExecutionId, body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("cancelTestExecution", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder cancelTestExecutionRequestBuilder(String testExecutionId, Object body) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling cancelTestExecution"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling cancelTestExecution"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/cancel/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get a specific test execution with all its details and paginated call executions Query Parameters: - search: search string to filter call executions - page: page number for call executions (default: 1) - filters: JSON array of filter objects - row_groups: JSON array of column IDs to group by - group_keys: JSON array of group keys + * @param testExecutionId (required) + * @param search (optional, default to ) + * @param filters (optional, default to []) + * @param rowGroups (optional, default to []) + * @param groupKeys (optional, default to []) + * @param page (optional, default to 1) + * @param limit (optional, default to 30) + * @return TestExecutionDetailResponse + * @throws ApiException if fails to make API call + */ + public TestExecutionDetailResponse getTestExecution(String testExecutionId, String search, String filters, String rowGroups, String groupKeys, Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = getTestExecutionWithHttpInfo(testExecutionId, search, filters, rowGroups, groupKeys, page, limit); + return localVarResponse.getData(); + } + + /** + * + * Get a specific test execution with all its details and paginated call executions Query Parameters: - search: search string to filter call executions - page: page number for call executions (default: 1) - filters: JSON array of filter objects - row_groups: JSON array of column IDs to group by - group_keys: JSON array of group keys + * @param testExecutionId (required) + * @param search (optional, default to ) + * @param filters (optional, default to []) + * @param rowGroups (optional, default to []) + * @param groupKeys (optional, default to []) + * @param page (optional, default to 1) + * @param limit (optional, default to 30) + * @return ApiResponse<TestExecutionDetailResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTestExecutionWithHttpInfo(String testExecutionId, String search, String filters, String rowGroups, String groupKeys, Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTestExecutionRequestBuilder(testExecutionId, search, filters, rowGroups, groupKeys, page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTestExecution", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTestExecutionRequestBuilder(String testExecutionId, String search, String filters, String rowGroups, String groupKeys, Integer page, Integer limit) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling getTestExecution"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + localVarQueryParameterBaseName = "row_groups"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("row_groups", rowGroups)); + localVarQueryParameterBaseName = "group_keys"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("group_keys", groupKeys)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get analytics data for a specific test execution + * @param testExecutionId (required) + * @return TestExecutionAnalytics + * @throws ApiException if fails to make API call + */ + public TestExecutionAnalytics getTestExecutionAnalytics(String testExecutionId) throws ApiException { + ApiResponse localVarResponse = getTestExecutionAnalyticsWithHttpInfo(testExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Get analytics data for a specific test execution + * @param testExecutionId (required) + * @return ApiResponse<TestExecutionAnalytics> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTestExecutionAnalyticsWithHttpInfo(String testExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTestExecutionAnalyticsRequestBuilder(testExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTestExecutionAnalytics", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTestExecutionAnalyticsRequestBuilder(String testExecutionId) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling getTestExecutionAnalytics"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/analytics/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get combined KPI values for a specific run test + * @param testExecutionId (required) + * @return RunTestKPIsResponse + * @throws ApiException if fails to make API call + */ + public RunTestKPIsResponse getTestExecutionKpis(String testExecutionId) throws ApiException { + ApiResponse localVarResponse = getTestExecutionKpisWithHttpInfo(testExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Get combined KPI values for a specific run test + * @param testExecutionId (required) + * @return ApiResponse<RunTestKPIsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTestExecutionKpisWithHttpInfo(String testExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTestExecutionKpisRequestBuilder(testExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTestExecutionKpis", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTestExecutionKpisRequestBuilder(String testExecutionId) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling getTestExecutionKpis"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/kpis/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get performance summary data for a specific test execution + * @param testExecutionId (required) + * @return PerformanceSummary + * @throws ApiException if fails to make API call + */ + public PerformanceSummary getTestExecutionPerformanceSummary(String testExecutionId) throws ApiException { + ApiResponse localVarResponse = getTestExecutionPerformanceSummaryWithHttpInfo(testExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Get performance summary data for a specific test execution + * @param testExecutionId (required) + * @return ApiResponse<PerformanceSummary> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTestExecutionPerformanceSummaryWithHttpInfo(String testExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTestExecutionPerformanceSummaryRequestBuilder(testExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTestExecutionPerformanceSummary", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTestExecutionPerformanceSummaryRequestBuilder(String testExecutionId) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling getTestExecutionPerformanceSummary"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/performance-summary/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get all transcripts for a test execution + * @param testExecutionId (required) + * @return TestExecutionTranscriptsResponse + * @throws ApiException if fails to make API call + */ + public TestExecutionTranscriptsResponse getTestExecutionTranscripts(String testExecutionId) throws ApiException { + ApiResponse localVarResponse = getTestExecutionTranscriptsWithHttpInfo(testExecutionId); + return localVarResponse.getData(); + } + + /** + * + * Get all transcripts for a test execution + * @param testExecutionId (required) + * @return ApiResponse<TestExecutionTranscriptsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTestExecutionTranscriptsWithHttpInfo(String testExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTestExecutionTranscriptsRequestBuilder(testExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTestExecutionTranscripts", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTestExecutionTranscriptsRequestBuilder(String testExecutionId) throws ApiException { + // verify the required parameter 'testExecutionId' is set + if (testExecutionId == null) { + throw new ApiException(400, "Missing the required parameter 'testExecutionId' when calling getTestExecutionTranscripts"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/test-executions/{test_execution_id}/transcripts/" + .replace("{test_execution_id}", ApiClient.urlEncode(testExecutionId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get paginated list of test executions for the user's organization Query Parameters: - search: search string to filter test executions by run test name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + * @return List<TestExecution> + * @throws ApiException if fails to make API call + */ + public List listTestExecutions() throws ApiException { + ApiResponse> localVarResponse = listTestExecutionsWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * Get paginated list of test executions for the user's organization Query Parameters: - search: search string to filter test executions by run test name - status: filter by execution status - limit: number of items per page (default: 10) - page: page number (default: 1) + * @return ApiResponse<List<TestExecution>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> listTestExecutionsWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listTestExecutionsRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listTestExecutions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listTestExecutionsRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/simulate/api/test-executions/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationsApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationsApi.java new file mode 100644 index 0000000..01b3b98 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/SimulationsApi.java @@ -0,0 +1,408 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.SDKErrorResponse; +import com.futureagi.sdk.model.SDKSimulationAnalyticsResponse; +import com.futureagi.sdk.model.SDKSimulationMetricsResponse; +import com.futureagi.sdk.model.SDKSimulationRunsResponse; +import java.util.UUID; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulationsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SimulationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SimulationsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * GET /simulation/analytics/ + * Aggregated analytics view: eval scores (radar chart data), critical issues, FMA suggestions. Corresponds to the Analytics tab in the UI. + * @param runTestName (optional) + * @param executionId (optional) + * @param evalName (optional) + * @param summary (optional, default to true) + * @return SDKSimulationAnalyticsResponse + * @throws ApiException if fails to make API call + */ + public SDKSimulationAnalyticsResponse getSimulationAnalytics(String runTestName, UUID executionId, String evalName, Boolean summary) throws ApiException { + ApiResponse localVarResponse = getSimulationAnalyticsWithHttpInfo(runTestName, executionId, evalName, summary); + return localVarResponse.getData(); + } + + /** + * GET /simulation/analytics/ + * Aggregated analytics view: eval scores (radar chart data), critical issues, FMA suggestions. Corresponds to the Analytics tab in the UI. + * @param runTestName (optional) + * @param executionId (optional) + * @param evalName (optional) + * @param summary (optional, default to true) + * @return ApiResponse<SDKSimulationAnalyticsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getSimulationAnalyticsWithHttpInfo(String runTestName, UUID executionId, String evalName, Boolean summary) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSimulationAnalyticsRequestBuilder(runTestName, executionId, evalName, summary); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getSimulationAnalytics", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getSimulationAnalyticsRequestBuilder(String runTestName, UUID executionId, String evalName, Boolean summary) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/simulation/analytics/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "run_test_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("run_test_name", runTestName)); + localVarQueryParameterBaseName = "execution_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("execution_id", executionId)); + localVarQueryParameterBaseName = "eval_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("eval_name", evalName)); + localVarQueryParameterBaseName = "summary"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("summary", summary)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /simulation/metrics/ + * Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + * @param runTestName (optional) + * @param executionId (optional) + * @param callExecutionId (optional) + * @return SDKSimulationMetricsResponse + * @throws ApiException if fails to make API call + */ + public SDKSimulationMetricsResponse listSimulationMetrics(String runTestName, UUID executionId, UUID callExecutionId) throws ApiException { + ApiResponse localVarResponse = listSimulationMetricsWithHttpInfo(runTestName, executionId, callExecutionId); + return localVarResponse.getData(); + } + + /** + * GET /simulation/metrics/ + * Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + * @param runTestName (optional) + * @param executionId (optional) + * @param callExecutionId (optional) + * @return ApiResponse<SDKSimulationMetricsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listSimulationMetricsWithHttpInfo(String runTestName, UUID executionId, UUID callExecutionId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listSimulationMetricsRequestBuilder(runTestName, executionId, callExecutionId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listSimulationMetrics", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listSimulationMetricsRequestBuilder(String runTestName, UUID executionId, UUID callExecutionId) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/simulation/metrics/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "run_test_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("run_test_name", runTestName)); + localVarQueryParameterBaseName = "execution_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("execution_id", executionId)); + localVarQueryParameterBaseName = "call_execution_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("call_execution_id", callExecutionId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /simulation/runs/ + * Run-level records with eval scores, scenario metadata, call details. + * @param runTestName (optional) + * @param executionId (optional) + * @param callExecutionId (optional) + * @param evalName (optional) + * @param summary (optional, default to false) + * @return SDKSimulationRunsResponse + * @throws ApiException if fails to make API call + */ + public SDKSimulationRunsResponse listSimulationRuns(String runTestName, UUID executionId, UUID callExecutionId, String evalName, Boolean summary) throws ApiException { + ApiResponse localVarResponse = listSimulationRunsWithHttpInfo(runTestName, executionId, callExecutionId, evalName, summary); + return localVarResponse.getData(); + } + + /** + * GET /simulation/runs/ + * Run-level records with eval scores, scenario metadata, call details. + * @param runTestName (optional) + * @param executionId (optional) + * @param callExecutionId (optional) + * @param evalName (optional) + * @param summary (optional, default to false) + * @return ApiResponse<SDKSimulationRunsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listSimulationRunsWithHttpInfo(String runTestName, UUID executionId, UUID callExecutionId, String evalName, Boolean summary) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listSimulationRunsRequestBuilder(runTestName, executionId, callExecutionId, evalName, summary); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listSimulationRuns", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listSimulationRunsRequestBuilder(String runTestName, UUID executionId, UUID callExecutionId, String evalName, Boolean summary) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/sdk/api/v1/simulation/runs/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "run_test_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("run_test_name", runTestName)); + localVarQueryParameterBaseName = "execution_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("execution_id", executionId)); + localVarQueryParameterBaseName = "call_execution_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("call_execution_id", callExecutionId)); + localVarQueryParameterBaseName = "eval_name"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("eval_name", evalName)); + localVarQueryParameterBaseName = "summary"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("summary", summary)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/TracerApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/TracerApi.java new file mode 100644 index 0000000..9d3b7a6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/TracerApi.java @@ -0,0 +1,4301 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ApiErrorResponse; +import com.futureagi.sdk.model.CreateLinearIssue; +import com.futureagi.sdk.model.CreateLinearIssueResponse; +import com.futureagi.sdk.model.DeepAnalysisApiResponse; +import com.futureagi.sdk.model.DeepAnalysisBody; +import com.futureagi.sdk.model.DeepAnalysisDispatchApiResponse; +import com.futureagi.sdk.model.FeedDetailApiResponse; +import com.futureagi.sdk.model.FeedSidebarApiResponse; +import com.futureagi.sdk.model.FeedUpdateBody; +import com.futureagi.sdk.model.GetTraceAnnotation; +import com.futureagi.sdk.model.GetTraceAnnotationValuesResponse; +import com.futureagi.sdk.model.ListAlerts200Response; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.OverviewApiResponse; +import com.futureagi.sdk.model.Trace; +import com.futureagi.sdk.model.TraceSession; +import com.futureagi.sdk.model.TracerTraceAnnotationList200Response; +import com.futureagi.sdk.model.TracerTraceList200Response; +import com.futureagi.sdk.model.TracerTraceSessionList200Response; +import com.futureagi.sdk.model.TracesTabApiResponse; +import com.futureagi.sdk.model.TrendsTabApiResponse; +import java.util.UUID; +import com.futureagi.sdk.model.UserAlertMonitor; +import com.futureagi.sdk.model.UserAlertMonitorDuplicate; +import com.futureagi.sdk.model.UserAlertMonitorDuplicateResponse; +import com.futureagi.sdk.model.UserAlertMonitorLog; +import com.futureagi.sdk.model.UserCodeExampleResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracerApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public TracerApi() { + this(Configuration.getDefaultApiClient()); + } + + public TracerApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + * @param clusterId (required) + * @param createLinearIssue (required) + * @return CreateLinearIssueResponse + * @throws ApiException if fails to make API call + */ + public CreateLinearIssueResponse tracerFeedIssuesCreateLinearIssueCreate(String clusterId, CreateLinearIssue createLinearIssue) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo(clusterId, createLinearIssue); + return localVarResponse.getData(); + } + + /** + * + * POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + * @param clusterId (required) + * @param createLinearIssue (required) + * @return ApiResponse<CreateLinearIssueResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesCreateLinearIssueCreateWithHttpInfo(String clusterId, CreateLinearIssue createLinearIssue) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesCreateLinearIssueCreateRequestBuilder(clusterId, createLinearIssue); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesCreateLinearIssueCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesCreateLinearIssueCreateRequestBuilder(String clusterId, CreateLinearIssue createLinearIssue) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesCreateLinearIssueCreate"); + } + // verify the required parameter 'createLinearIssue' is set + if (createLinearIssue == null) { + throw new ApiException(400, "Missing the required parameter 'createLinearIssue' when calling tracerFeedIssuesCreateLinearIssueCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/create-linear-issue/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createLinearIssue); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + * @param clusterId (required) + * @param deepAnalysisBody (required) + * @return DeepAnalysisDispatchApiResponse + * @throws ApiException if fails to make API call + */ + public DeepAnalysisDispatchApiResponse tracerFeedIssuesDeepAnalysisCreate(String clusterId, DeepAnalysisBody deepAnalysisBody) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesDeepAnalysisCreateWithHttpInfo(clusterId, deepAnalysisBody); + return localVarResponse.getData(); + } + + /** + * + * POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + * @param clusterId (required) + * @param deepAnalysisBody (required) + * @return ApiResponse<DeepAnalysisDispatchApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesDeepAnalysisCreateWithHttpInfo(String clusterId, DeepAnalysisBody deepAnalysisBody) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesDeepAnalysisCreateRequestBuilder(clusterId, deepAnalysisBody); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesDeepAnalysisCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesDeepAnalysisCreateRequestBuilder(String clusterId, DeepAnalysisBody deepAnalysisBody) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesDeepAnalysisCreate"); + } + // verify the required parameter 'deepAnalysisBody' is set + if (deepAnalysisBody == null) { + throw new ApiException(400, "Missing the required parameter 'deepAnalysisBody' when calling tracerFeedIssuesDeepAnalysisCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/deep-analysis/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deepAnalysisBody); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET /tracer/feed/issues/{cluster_id}/overview/ + * @param clusterId (required) + * @return OverviewApiResponse + * @throws ApiException if fails to make API call + */ + public OverviewApiResponse tracerFeedIssuesOverviewList(String clusterId) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesOverviewListWithHttpInfo(clusterId); + return localVarResponse.getData(); + } + + /** + * + * GET /tracer/feed/issues/{cluster_id}/overview/ + * @param clusterId (required) + * @return ApiResponse<OverviewApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesOverviewListWithHttpInfo(String clusterId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesOverviewListRequestBuilder(clusterId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesOverviewList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesOverviewListRequestBuilder(String clusterId) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesOverviewList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/overview/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET + PATCH /tracer/feed/issues/{cluster_id}/ + * @param clusterId (required) + * @param feedUpdateBody (required) + * @return FeedDetailApiResponse + * @throws ApiException if fails to make API call + */ + public FeedDetailApiResponse tracerFeedIssuesPartialUpdate(String clusterId, FeedUpdateBody feedUpdateBody) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesPartialUpdateWithHttpInfo(clusterId, feedUpdateBody); + return localVarResponse.getData(); + } + + /** + * + * GET + PATCH /tracer/feed/issues/{cluster_id}/ + * @param clusterId (required) + * @param feedUpdateBody (required) + * @return ApiResponse<FeedDetailApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesPartialUpdateWithHttpInfo(String clusterId, FeedUpdateBody feedUpdateBody) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesPartialUpdateRequestBuilder(clusterId, feedUpdateBody); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesPartialUpdateRequestBuilder(String clusterId, FeedUpdateBody feedUpdateBody) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesPartialUpdate"); + } + // verify the required parameter 'feedUpdateBody' is set + if (feedUpdateBody == null) { + throw new ApiException(400, "Missing the required parameter 'feedUpdateBody' when calling tracerFeedIssuesPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(feedUpdateBody); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + * Read cached deep-analysis results for a single trace within the cluster. The frontend hits this on mount (to show existing results) and polls it after a POST to /deep-analysis/ until ``status`` flips from ``running`` to ``done`` or ``failed``. + * @param clusterId (required) + * @param traceId (required) + * @return DeepAnalysisApiResponse + * @throws ApiException if fails to make API call + */ + public DeepAnalysisApiResponse tracerFeedIssuesRootCauseList(String clusterId, String traceId) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesRootCauseListWithHttpInfo(clusterId, traceId); + return localVarResponse.getData(); + } + + /** + * GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + * Read cached deep-analysis results for a single trace within the cluster. The frontend hits this on mount (to show existing results) and polls it after a POST to /deep-analysis/ until ``status`` flips from ``running`` to ``done`` or ``failed``. + * @param clusterId (required) + * @param traceId (required) + * @return ApiResponse<DeepAnalysisApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesRootCauseListWithHttpInfo(String clusterId, String traceId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesRootCauseListRequestBuilder(clusterId, traceId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesRootCauseList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesRootCauseListRequestBuilder(String clusterId, String traceId) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesRootCauseList"); + } + // verify the required parameter 'traceId' is set + if (traceId == null) { + throw new ApiException(400, "Missing the required parameter 'traceId' when calling tracerFeedIssuesRootCauseList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/root-cause/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "trace_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("trace_id", traceId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /tracer/feed/issues/{cluster_id}/sidebar/ + * Accepts an optional ``?trace_id=`` query param. When present, the trace-level sections (AI Metadata + Evaluations) are computed for that trace instead of the cluster's latest, keeping the sidebar in sync with the Overview tab's trace selection. + * @param clusterId (required) + * @param traceId (optional) + * @return FeedSidebarApiResponse + * @throws ApiException if fails to make API call + */ + public FeedSidebarApiResponse tracerFeedIssuesSidebarList(String clusterId, String traceId) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesSidebarListWithHttpInfo(clusterId, traceId); + return localVarResponse.getData(); + } + + /** + * GET /tracer/feed/issues/{cluster_id}/sidebar/ + * Accepts an optional ``?trace_id=`` query param. When present, the trace-level sections (AI Metadata + Evaluations) are computed for that trace instead of the cluster's latest, keeping the sidebar in sync with the Overview tab's trace selection. + * @param clusterId (required) + * @param traceId (optional) + * @return ApiResponse<FeedSidebarApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesSidebarListWithHttpInfo(String clusterId, String traceId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesSidebarListRequestBuilder(clusterId, traceId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesSidebarList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesSidebarListRequestBuilder(String clusterId, String traceId) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesSidebarList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/sidebar/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "trace_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("trace_id", traceId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET /tracer/feed/issues/{cluster_id}/traces/ + * @param clusterId (required) + * @param limit (optional, default to 50) + * @param offset (optional, default to 0) + * @return TracesTabApiResponse + * @throws ApiException if fails to make API call + */ + public TracesTabApiResponse tracerFeedIssuesTracesList(String clusterId, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesTracesListWithHttpInfo(clusterId, limit, offset); + return localVarResponse.getData(); + } + + /** + * + * GET /tracer/feed/issues/{cluster_id}/traces/ + * @param clusterId (required) + * @param limit (optional, default to 50) + * @param offset (optional, default to 0) + * @return ApiResponse<TracesTabApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesTracesListWithHttpInfo(String clusterId, Integer limit, Integer offset) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesTracesListRequestBuilder(clusterId, limit, offset); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesTracesList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesTracesListRequestBuilder(String clusterId, Integer limit, Integer offset) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesTracesList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/traces/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "offset"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET /tracer/feed/issues/{cluster_id}/trends/ + * @param clusterId (required) + * @param days (optional, default to 14) + * @return TrendsTabApiResponse + * @throws ApiException if fails to make API call + */ + public TrendsTabApiResponse tracerFeedIssuesTrendsList(String clusterId, Integer days) throws ApiException { + ApiResponse localVarResponse = tracerFeedIssuesTrendsListWithHttpInfo(clusterId, days); + return localVarResponse.getData(); + } + + /** + * + * GET /tracer/feed/issues/{cluster_id}/trends/ + * @param clusterId (required) + * @param days (optional, default to 14) + * @return ApiResponse<TrendsTabApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerFeedIssuesTrendsListWithHttpInfo(String clusterId, Integer days) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerFeedIssuesTrendsListRequestBuilder(clusterId, days); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerFeedIssuesTrendsList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerFeedIssuesTrendsListRequestBuilder(String clusterId, Integer days) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling tracerFeedIssuesTrendsList"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/trends/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "days"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("days", days)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Return the aggregate agent graph for a project. + * Computes nodes (distinct span types/names) and edges (parent→child transitions) across all traces in the given time window. + * @param projectId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param filters (optional, default to []) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response tracerTraceAgentGraph(UUID projectId, Integer page, Integer limit, String filters) throws ApiException { + ApiResponse localVarResponse = tracerTraceAgentGraphWithHttpInfo(projectId, page, limit, filters); + return localVarResponse.getData(); + } + + /** + * Return the aggregate agent graph for a project. + * Computes nodes (distinct span types/names) and edges (parent→child transitions) across all traces in the given time window. + * @param projectId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param filters (optional, default to []) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAgentGraphWithHttpInfo(UUID projectId, Integer page, Integer limit, String filters) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAgentGraphRequestBuilder(projectId, page, limit, filters); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAgentGraph", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAgentGraphRequestBuilder(UUID projectId, Integer page, Integer limit, String filters) throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException(400, "Missing the required parameter 'projectId' when calling tracerTraceAgentGraph"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/agent_graph/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param getTraceAnnotation (required) + * @return GetTraceAnnotation + * @throws ApiException if fails to make API call + */ + public GetTraceAnnotation tracerTraceAnnotationCreate(GetTraceAnnotation getTraceAnnotation) throws ApiException { + ApiResponse localVarResponse = tracerTraceAnnotationCreateWithHttpInfo(getTraceAnnotation); + return localVarResponse.getData(); + } + + /** + * + * + * @param getTraceAnnotation (required) + * @return ApiResponse<GetTraceAnnotation> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAnnotationCreateWithHttpInfo(GetTraceAnnotation getTraceAnnotation) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAnnotationCreateRequestBuilder(getTraceAnnotation); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAnnotationCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAnnotationCreateRequestBuilder(GetTraceAnnotation getTraceAnnotation) throws ApiException { + // verify the required parameter 'getTraceAnnotation' is set + if (getTraceAnnotation == null) { + throw new ApiException(400, "Missing the required parameter 'getTraceAnnotation' when calling tracerTraceAnnotationCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-annotation/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(getTraceAnnotation); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void tracerTraceAnnotationDelete(String id) throws ApiException { + tracerTraceAnnotationDeleteWithHttpInfo(id); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAnnotationDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAnnotationDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAnnotationDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAnnotationDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceAnnotationDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-annotation/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param observationSpanId (optional) + * @param traceId (optional) + * @param annotators (optional) + * @param excludeAnnotators (optional) + * @return GetTraceAnnotationValuesResponse + * @throws ApiException if fails to make API call + */ + public GetTraceAnnotationValuesResponse tracerTraceAnnotationGetAnnotationValues(Integer page, Integer limit, String observationSpanId, UUID traceId, String annotators, String excludeAnnotators) throws ApiException { + ApiResponse localVarResponse = tracerTraceAnnotationGetAnnotationValuesWithHttpInfo(page, limit, observationSpanId, traceId, annotators, excludeAnnotators); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param observationSpanId (optional) + * @param traceId (optional) + * @param annotators (optional) + * @param excludeAnnotators (optional) + * @return ApiResponse<GetTraceAnnotationValuesResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAnnotationGetAnnotationValuesWithHttpInfo(Integer page, Integer limit, String observationSpanId, UUID traceId, String annotators, String excludeAnnotators) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAnnotationGetAnnotationValuesRequestBuilder(page, limit, observationSpanId, traceId, annotators, excludeAnnotators); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAnnotationGetAnnotationValues", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAnnotationGetAnnotationValuesRequestBuilder(Integer page, Integer limit, String observationSpanId, UUID traceId, String annotators, String excludeAnnotators) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-annotation/get_annotation_values/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "observation_span_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("observation_span_id", observationSpanId)); + localVarQueryParameterBaseName = "trace_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("trace_id", traceId)); + localVarQueryParameterBaseName = "annotators"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("annotators", annotators)); + localVarQueryParameterBaseName = "exclude_annotators"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("exclude_annotators", excludeAnnotators)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceAnnotationList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceAnnotationList200Response tracerTraceAnnotationList(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerTraceAnnotationListWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceAnnotationList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAnnotationListWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAnnotationListRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAnnotationList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAnnotationListRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-annotation/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param getTraceAnnotation (required) + * @return GetTraceAnnotation + * @throws ApiException if fails to make API call + */ + public GetTraceAnnotation tracerTraceAnnotationPartialUpdate(String id, GetTraceAnnotation getTraceAnnotation) throws ApiException { + ApiResponse localVarResponse = tracerTraceAnnotationPartialUpdateWithHttpInfo(id, getTraceAnnotation); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param getTraceAnnotation (required) + * @return ApiResponse<GetTraceAnnotation> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAnnotationPartialUpdateWithHttpInfo(String id, GetTraceAnnotation getTraceAnnotation) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAnnotationPartialUpdateRequestBuilder(id, getTraceAnnotation); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAnnotationPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAnnotationPartialUpdateRequestBuilder(String id, GetTraceAnnotation getTraceAnnotation) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceAnnotationPartialUpdate"); + } + // verify the required parameter 'getTraceAnnotation' is set + if (getTraceAnnotation == null) { + throw new ApiException(400, "Missing the required parameter 'getTraceAnnotation' when calling tracerTraceAnnotationPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-annotation/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(getTraceAnnotation); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return GetTraceAnnotation + * @throws ApiException if fails to make API call + */ + public GetTraceAnnotation tracerTraceAnnotationRead(String id) throws ApiException { + ApiResponse localVarResponse = tracerTraceAnnotationReadWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<GetTraceAnnotation> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAnnotationReadWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAnnotationReadRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAnnotationRead", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAnnotationReadRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceAnnotationRead"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-annotation/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param getTraceAnnotation (required) + * @return GetTraceAnnotation + * @throws ApiException if fails to make API call + */ + public GetTraceAnnotation tracerTraceAnnotationUpdate(String id, GetTraceAnnotation getTraceAnnotation) throws ApiException { + ApiResponse localVarResponse = tracerTraceAnnotationUpdateWithHttpInfo(id, getTraceAnnotation); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param getTraceAnnotation (required) + * @return ApiResponse<GetTraceAnnotation> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceAnnotationUpdateWithHttpInfo(String id, GetTraceAnnotation getTraceAnnotation) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceAnnotationUpdateRequestBuilder(id, getTraceAnnotation); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceAnnotationUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceAnnotationUpdateRequestBuilder(String id, GetTraceAnnotation getTraceAnnotation) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceAnnotationUpdate"); + } + // verify the required parameter 'getTraceAnnotation' is set + if (getTraceAnnotation == null) { + throw new ApiException(400, "Missing the required parameter 'getTraceAnnotation' when calling tracerTraceAnnotationUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-annotation/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(getTraceAnnotation); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param trace (required) + * @return Trace + * @throws ApiException if fails to make API call + */ + public Trace tracerTraceBulkCreate(Trace trace) throws ApiException { + ApiResponse localVarResponse = tracerTraceBulkCreateWithHttpInfo(trace); + return localVarResponse.getData(); + } + + /** + * + * + * @param trace (required) + * @return ApiResponse<Trace> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceBulkCreateWithHttpInfo(Trace trace) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceBulkCreateRequestBuilder(trace); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceBulkCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceBulkCreateRequestBuilder(Trace trace) throws ApiException { + // verify the required parameter 'trace' is set + if (trace == null) { + throw new ApiException(400, "Missing the required parameter 'trace' when calling tracerTraceBulkCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/bulk_create/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(trace); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Compare traces across project versions with optimized queries. + * @param trace (required) + * @return Trace + * @throws ApiException if fails to make API call + */ + public Trace tracerTraceCompareTraces(Trace trace) throws ApiException { + ApiResponse localVarResponse = tracerTraceCompareTracesWithHttpInfo(trace); + return localVarResponse.getData(); + } + + /** + * + * Compare traces across project versions with optimized queries. + * @param trace (required) + * @return ApiResponse<Trace> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceCompareTracesWithHttpInfo(Trace trace) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceCompareTracesRequestBuilder(trace); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceCompareTraces", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceCompareTracesRequestBuilder(Trace trace) throws ApiException { + // verify the required parameter 'trace' is set + if (trace == null) { + throw new ApiException(400, "Missing the required parameter 'trace' when calling tracerTraceCompareTraces"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/compare_traces/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(trace); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param trace (required) + * @return Trace + * @throws ApiException if fails to make API call + */ + public Trace tracerTraceCreate(Trace trace) throws ApiException { + ApiResponse localVarResponse = tracerTraceCreateWithHttpInfo(trace); + return localVarResponse.getData(); + } + + /** + * + * + * @param trace (required) + * @return ApiResponse<Trace> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceCreateWithHttpInfo(Trace trace) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceCreateRequestBuilder(trace); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceCreateRequestBuilder(Trace trace) throws ApiException { + // verify the required parameter 'trace' is set + if (trace == null) { + throw new ApiException(400, "Missing the required parameter 'trace' when calling tracerTraceCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(trace); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void tracerTraceDelete(String id) throws ApiException { + tracerTraceDeleteWithHttpInfo(id); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Fetch all evaluation template names. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response tracerTraceGetEvalNames(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerTraceGetEvalNamesWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Fetch all evaluation template names. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceGetEvalNamesWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceGetEvalNamesRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceGetEvalNames", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceGetEvalNamesRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/get_eval_names/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Export traces filtered by project ID with optimized queries. Auto-detects voice/conversation projects and exports voice-specific fields. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response tracerTraceGetTraceExportData(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerTraceGetTraceExportDataWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Export traces filtered by project ID with optimized queries. Auto-detects voice/conversation projects and exports voice-specific fields. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceGetTraceExportDataWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceGetTraceExportDataRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceGetTraceExportData", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceGetTraceExportDataRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/get_trace_export_data/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the previous and next trace id by index using efficient database queries. + * @param traceId (required) + * @param projectVersionId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param filters (optional, default to []) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response tracerTraceGetTraceIdByIndex(UUID traceId, UUID projectVersionId, Integer page, Integer limit, String filters) throws ApiException { + ApiResponse localVarResponse = tracerTraceGetTraceIdByIndexWithHttpInfo(traceId, projectVersionId, page, limit, filters); + return localVarResponse.getData(); + } + + /** + * + * Get the previous and next trace id by index using efficient database queries. + * @param traceId (required) + * @param projectVersionId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param filters (optional, default to []) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceGetTraceIdByIndexWithHttpInfo(UUID traceId, UUID projectVersionId, Integer page, Integer limit, String filters) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceGetTraceIdByIndexRequestBuilder(traceId, projectVersionId, page, limit, filters); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceGetTraceIdByIndex", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceGetTraceIdByIndexRequestBuilder(UUID traceId, UUID projectVersionId, Integer page, Integer limit, String filters) throws ApiException { + // verify the required parameter 'traceId' is set + if (traceId == null) { + throw new ApiException(400, "Missing the required parameter 'traceId' when calling tracerTraceGetTraceIdByIndex"); + } + // verify the required parameter 'projectVersionId' is set + if (projectVersionId == null) { + throw new ApiException(400, "Missing the required parameter 'projectVersionId' when calling tracerTraceGetTraceIdByIndex"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/get_trace_id_by_index/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "trace_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("trace_id", traceId)); + localVarQueryParameterBaseName = "project_version_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_version_id", projectVersionId)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get the previous and next trace id by index. + * @param traceId (required) + * @param projectId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param filters (optional, default to []) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response tracerTraceGetTraceIdByIndexObserve(UUID traceId, UUID projectId, Integer page, Integer limit, String filters) throws ApiException { + ApiResponse localVarResponse = tracerTraceGetTraceIdByIndexObserveWithHttpInfo(traceId, projectId, page, limit, filters); + return localVarResponse.getData(); + } + + /** + * + * Get the previous and next trace id by index. + * @param traceId (required) + * @param projectId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param filters (optional, default to []) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceGetTraceIdByIndexObserveWithHttpInfo(UUID traceId, UUID projectId, Integer page, Integer limit, String filters) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceGetTraceIdByIndexObserveRequestBuilder(traceId, projectId, page, limit, filters); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceGetTraceIdByIndexObserve", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceGetTraceIdByIndexObserveRequestBuilder(UUID traceId, UUID projectId, Integer page, Integer limit, String filters) throws ApiException { + // verify the required parameter 'traceId' is set + if (traceId == null) { + throw new ApiException(400, "Missing the required parameter 'traceId' when calling tracerTraceGetTraceIdByIndexObserve"); + } + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException(400, "Missing the required parameter 'projectId' when calling tracerTraceGetTraceIdByIndexObserve"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/get_trace_id_by_index_observe/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "trace_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("trace_id", traceId)); + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response tracerTraceList(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerTraceListWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceListWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceListRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceListRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List traces filtered by project ID with optimized queries. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param projectId (optional) + * @param projectVersionId (optional) + * @param sessionId (optional) + * @param filters (optional, default to []) + * @param pageNumber (optional, default to 0) + * @param pageSize (optional, default to 30) + * @param interval (optional) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response tracerTraceListTracesOfSession(Integer page, Integer limit, UUID projectId, UUID projectVersionId, UUID sessionId, String filters, Integer pageNumber, Integer pageSize, String interval) throws ApiException { + ApiResponse localVarResponse = tracerTraceListTracesOfSessionWithHttpInfo(page, limit, projectId, projectVersionId, sessionId, filters, pageNumber, pageSize, interval); + return localVarResponse.getData(); + } + + /** + * + * List traces filtered by project ID with optimized queries. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param projectId (optional) + * @param projectVersionId (optional) + * @param sessionId (optional) + * @param filters (optional, default to []) + * @param pageNumber (optional, default to 0) + * @param pageSize (optional, default to 30) + * @param interval (optional) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceListTracesOfSessionWithHttpInfo(Integer page, Integer limit, UUID projectId, UUID projectVersionId, UUID sessionId, String filters, Integer pageNumber, Integer pageSize, String interval) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceListTracesOfSessionRequestBuilder(page, limit, projectId, projectVersionId, sessionId, filters, pageNumber, pageSize, interval); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceListTracesOfSession", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceListTracesOfSessionRequestBuilder(Integer page, Integer limit, UUID projectId, UUID projectVersionId, UUID sessionId, String filters, Integer pageNumber, Integer pageSize, String interval) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/list_traces_of_session/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "project_version_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_version_id", projectVersionId)); + localVarQueryParameterBaseName = "session_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("session_id", sessionId)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + localVarQueryParameterBaseName = "page_number"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_number", pageNumber)); + localVarQueryParameterBaseName = "page_size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_size", pageSize)); + localVarQueryParameterBaseName = "interval"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("interval", interval)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param trace (required) + * @return Trace + * @throws ApiException if fails to make API call + */ + public Trace tracerTracePartialUpdate(String id, Trace trace) throws ApiException { + ApiResponse localVarResponse = tracerTracePartialUpdateWithHttpInfo(id, trace); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param trace (required) + * @return ApiResponse<Trace> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTracePartialUpdateWithHttpInfo(String id, Trace trace) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTracePartialUpdateRequestBuilder(id, trace); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTracePartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTracePartialUpdateRequestBuilder(String id, Trace trace) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTracePartialUpdate"); + } + // verify the required parameter 'trace' is set + if (trace == null) { + throw new ApiException(400, "Missing the required parameter 'trace' when calling tracerTracePartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(trace); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param traceSession (required) + * @return TraceSession + * @throws ApiException if fails to make API call + */ + public TraceSession tracerTraceSessionCreate(TraceSession traceSession) throws ApiException { + ApiResponse localVarResponse = tracerTraceSessionCreateWithHttpInfo(traceSession); + return localVarResponse.getData(); + } + + /** + * + * + * @param traceSession (required) + * @return ApiResponse<TraceSession> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionCreateWithHttpInfo(TraceSession traceSession) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionCreateRequestBuilder(traceSession); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionCreateRequestBuilder(TraceSession traceSession) throws ApiException { + // verify the required parameter 'traceSession' is set + if (traceSession == null) { + throw new ApiException(400, "Missing the required parameter 'traceSession' when calling tracerTraceSessionCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(traceSession); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void tracerTraceSessionDelete(String id) throws ApiException { + tracerTraceSessionDeleteWithHttpInfo(id); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceSessionDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + * Session-level eval results are walled off from span/trace surfaces by ``target_type='session'`` — this endpoint is the only place they appear. Query params: page (int, 0-indexed, default 0) page_size (int, default 25, max 100) + * @param id (required) + * @return TraceSession + * @throws ApiException if fails to make API call + */ + public TraceSession tracerTraceSessionEvalLogs(String id) throws ApiException { + ApiResponse localVarResponse = tracerTraceSessionEvalLogsWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + * Session-level eval results are walled off from span/trace surfaces by ``target_type='session'`` — this endpoint is the only place they appear. Query params: page (int, 0-indexed, default 0) page_size (int, default 25, max 100) + * @param id (required) + * @return ApiResponse<TraceSession> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionEvalLogsWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionEvalLogsRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionEvalLogs", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionEvalLogsRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceSessionEvalLogs"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/{id}/eval_logs/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Return distinct values for a session-level column. Used by the filter panel's value picker for session-specific fields (session_id, user_id, first_message, etc.). Query params: project_id: required column: canonical session column name, e.g. \"session_id\" search: optional search substring page: page number (0-based), default 0 page_size: default 50 + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceSessionList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceSessionList200Response tracerTraceSessionGetSessionFilterValues(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerTraceSessionGetSessionFilterValuesWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Return distinct values for a session-level column. Used by the filter panel's value picker for session-specific fields (session_id, user_id, first_message, etc.). Query params: project_id: required column: canonical session column name, e.g. \"session_id\" search: optional search substring page: page number (0-based), default 0 page_size: default 50 + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceSessionList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionGetSessionFilterValuesWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionGetSessionFilterValuesRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionGetSessionFilterValues", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionGetSessionFilterValuesRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/get_session_filter_values/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Export traces filtered by project ID and project version ID with optimized queries. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceSessionList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceSessionList200Response tracerTraceSessionGetTraceSessionExportData(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerTraceSessionGetTraceSessionExportDataWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Export traces filtered by project ID and project version ID with optimized queries. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceSessionList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionGetTraceSessionExportDataWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionGetTraceSessionExportDataRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionGetTraceSessionExportData", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionGetTraceSessionExportDataRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/get_trace_session_export_data/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceSessionList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceSessionList200Response tracerTraceSessionList(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerTraceSessionListWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceSessionList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionListWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionListRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionListRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param traceSession (required) + * @return TraceSession + * @throws ApiException if fails to make API call + */ + public TraceSession tracerTraceSessionPartialUpdate(String id, TraceSession traceSession) throws ApiException { + ApiResponse localVarResponse = tracerTraceSessionPartialUpdateWithHttpInfo(id, traceSession); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param traceSession (required) + * @return ApiResponse<TraceSession> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionPartialUpdateWithHttpInfo(String id, TraceSession traceSession) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionPartialUpdateRequestBuilder(id, traceSession); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionPartialUpdateRequestBuilder(String id, TraceSession traceSession) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceSessionPartialUpdate"); + } + // verify the required parameter 'traceSession' is set + if (traceSession == null) { + throw new ApiException(400, "Missing the required parameter 'traceSession' when calling tracerTraceSessionPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(traceSession); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param traceSession (required) + * @return TraceSession + * @throws ApiException if fails to make API call + */ + public TraceSession tracerTraceSessionUpdate(String id, TraceSession traceSession) throws ApiException { + ApiResponse localVarResponse = tracerTraceSessionUpdateWithHttpInfo(id, traceSession); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param traceSession (required) + * @return ApiResponse<TraceSession> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceSessionUpdateWithHttpInfo(String id, TraceSession traceSession) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceSessionUpdateRequestBuilder(id, traceSession); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceSessionUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceSessionUpdateRequestBuilder(String id, TraceSession traceSession) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceSessionUpdate"); + } + // verify the required parameter 'traceSession' is set + if (traceSession == null) { + throw new ApiException(400, "Missing the required parameter 'traceSession' when calling tracerTraceSessionUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(traceSession); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param trace (required) + * @return Trace + * @throws ApiException if fails to make API call + */ + public Trace tracerTraceUpdate(String id, Trace trace) throws ApiException { + ApiResponse localVarResponse = tracerTraceUpdateWithHttpInfo(id, trace); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param trace (required) + * @return ApiResponse<Trace> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerTraceUpdateWithHttpInfo(String id, Trace trace) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerTraceUpdateRequestBuilder(id, trace); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerTraceUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerTraceUpdateRequestBuilder(String id, Trace trace) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerTraceUpdate"); + } + // verify the required parameter 'trace' is set + if (trace == null) { + throw new ApiException(400, "Missing the required parameter 'trace' when calling tracerTraceUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(trace); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param userAlertMonitorLog (required) + * @return UserAlertMonitorLog + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorLog tracerUserAlertLogsCreate(UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + ApiResponse localVarResponse = tracerUserAlertLogsCreateWithHttpInfo(userAlertMonitorLog); + return localVarResponse.getData(); + } + + /** + * + * + * @param userAlertMonitorLog (required) + * @return ApiResponse<UserAlertMonitorLog> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUserAlertLogsCreateWithHttpInfo(UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUserAlertLogsCreateRequestBuilder(userAlertMonitorLog); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUserAlertLogsCreate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUserAlertLogsCreateRequestBuilder(UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + // verify the required parameter 'userAlertMonitorLog' is set + if (userAlertMonitorLog == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitorLog' when calling tracerUserAlertLogsCreate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitorLog); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @throws ApiException if fails to make API call + */ + public void tracerUserAlertLogsDelete(String id) throws ApiException { + tracerUserAlertLogsDeleteWithHttpInfo(id); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUserAlertLogsDeleteWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUserAlertLogsDeleteRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUserAlertLogsDelete", localVarResponse); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUserAlertLogsDeleteRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerUserAlertLogsDelete"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param userAlertMonitorLog (required) + * @return UserAlertMonitorLog + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorLog tracerUserAlertLogsPartialUpdate(String id, UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + ApiResponse localVarResponse = tracerUserAlertLogsPartialUpdateWithHttpInfo(id, userAlertMonitorLog); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param userAlertMonitorLog (required) + * @return ApiResponse<UserAlertMonitorLog> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUserAlertLogsPartialUpdateWithHttpInfo(String id, UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUserAlertLogsPartialUpdateRequestBuilder(id, userAlertMonitorLog); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUserAlertLogsPartialUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUserAlertLogsPartialUpdateRequestBuilder(String id, UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerUserAlertLogsPartialUpdate"); + } + // verify the required parameter 'userAlertMonitorLog' is set + if (userAlertMonitorLog == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitorLog' when calling tracerUserAlertLogsPartialUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitorLog); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param userAlertMonitorLog (required) + * @return UserAlertMonitorLog + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorLog tracerUserAlertLogsUpdate(String id, UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + ApiResponse localVarResponse = tracerUserAlertLogsUpdateWithHttpInfo(id, userAlertMonitorLog); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param userAlertMonitorLog (required) + * @return ApiResponse<UserAlertMonitorLog> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUserAlertLogsUpdateWithHttpInfo(String id, UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUserAlertLogsUpdateRequestBuilder(id, userAlertMonitorLog); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUserAlertLogsUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUserAlertLogsUpdateRequestBuilder(String id, UserAlertMonitorLog userAlertMonitorLog) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerUserAlertLogsUpdate"); + } + // verify the required parameter 'userAlertMonitorLog' is set + if (userAlertMonitorLog == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitorLog' when calling tracerUserAlertLogsUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alert-logs/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitorLog); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param userAlertMonitorDuplicate (required) + * @return UserAlertMonitorDuplicateResponse + * @throws ApiException if fails to make API call + */ + public UserAlertMonitorDuplicateResponse tracerUserAlertsDuplicate(UserAlertMonitorDuplicate userAlertMonitorDuplicate) throws ApiException { + ApiResponse localVarResponse = tracerUserAlertsDuplicateWithHttpInfo(userAlertMonitorDuplicate); + return localVarResponse.getData(); + } + + /** + * + * + * @param userAlertMonitorDuplicate (required) + * @return ApiResponse<UserAlertMonitorDuplicateResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUserAlertsDuplicateWithHttpInfo(UserAlertMonitorDuplicate userAlertMonitorDuplicate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUserAlertsDuplicateRequestBuilder(userAlertMonitorDuplicate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUserAlertsDuplicate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUserAlertsDuplicateRequestBuilder(UserAlertMonitorDuplicate userAlertMonitorDuplicate) throws ApiException { + // verify the required parameter 'userAlertMonitorDuplicate' is set + if (userAlertMonitorDuplicate == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitorDuplicate' when calling tracerUserAlertsDuplicate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/duplicate/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitorDuplicate); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ListAlerts200Response + * @throws ApiException if fails to make API call + */ + public ListAlerts200Response tracerUserAlertsListMonitors(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = tracerUserAlertsListMonitorsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ListAlerts200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUserAlertsListMonitorsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUserAlertsListMonitorsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUserAlertsListMonitors", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUserAlertsListMonitorsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/list_monitors/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @param userAlertMonitor (required) + * @return UserAlertMonitor + * @throws ApiException if fails to make API call + */ + public UserAlertMonitor tracerUserAlertsUpdate(String id, UserAlertMonitor userAlertMonitor) throws ApiException { + ApiResponse localVarResponse = tracerUserAlertsUpdateWithHttpInfo(id, userAlertMonitor); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @param userAlertMonitor (required) + * @return ApiResponse<UserAlertMonitor> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUserAlertsUpdateWithHttpInfo(String id, UserAlertMonitor userAlertMonitor) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUserAlertsUpdateRequestBuilder(id, userAlertMonitor); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUserAlertsUpdate", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUserAlertsUpdateRequestBuilder(String id, UserAlertMonitor userAlertMonitor) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling tracerUserAlertsUpdate"); + } + // verify the required parameter 'userAlertMonitor' is set + if (userAlertMonitor == null) { + throw new ApiException(400, "Missing the required parameter 'userAlertMonitor' when calling tracerUserAlertsUpdate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/user-alerts/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(userAlertMonitor); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @return UserCodeExampleResponse + * @throws ApiException if fails to make API call + */ + public UserCodeExampleResponse tracerUsersGetCodeExampleList() throws ApiException { + ApiResponse localVarResponse = tracerUsersGetCodeExampleListWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<UserCodeExampleResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse tracerUsersGetCodeExampleListWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = tracerUsersGetCodeExampleListRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("tracerUsersGetCodeExampleList", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder tracerUsersGetCodeExampleListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/users/get_code_example/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/TracingApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/TracingApi.java new file mode 100644 index 0000000..dd05a12 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/TracingApi.java @@ -0,0 +1,1823 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.ApiErrorResponse; +import com.futureagi.sdk.model.BulkAnnotationRequest; +import com.futureagi.sdk.model.BulkAnnotationResponse; +import com.futureagi.sdk.model.FeedDetailApiResponse; +import com.futureagi.sdk.model.FeedListApiResponse; +import com.futureagi.sdk.model.FeedStatsApiResponse; +import com.futureagi.sdk.model.GetAnnotationLabelsResponse; +import com.futureagi.sdk.model.ListTraceProjects200Response; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.ObserveGraphDataRequest; +import com.futureagi.sdk.model.ObserveGraphDataResponse; +import com.futureagi.sdk.model.Trace; +import com.futureagi.sdk.model.TraceSession; +import com.futureagi.sdk.model.TraceSessionGraphDataRequest; +import com.futureagi.sdk.model.TraceTagsUpdate; +import com.futureagi.sdk.model.TracerTraceList200Response; +import com.futureagi.sdk.model.TracerTraceSessionList200Response; +import java.util.UUID; +import com.futureagi.sdk.model.UsersResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracingApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public TracingApi() { + this(Configuration.getDefaultApiClient()); + } + + public TracingApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @param bulkAnnotationRequest (required) + * @return BulkAnnotationResponse + * @throws ApiException if fails to make API call + */ + public BulkAnnotationResponse createBulkTraceAnnotation(BulkAnnotationRequest bulkAnnotationRequest) throws ApiException { + ApiResponse localVarResponse = createBulkTraceAnnotationWithHttpInfo(bulkAnnotationRequest); + return localVarResponse.getData(); + } + + /** + * + * + * @param bulkAnnotationRequest (required) + * @return ApiResponse<BulkAnnotationResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse createBulkTraceAnnotationWithHttpInfo(BulkAnnotationRequest bulkAnnotationRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createBulkTraceAnnotationRequestBuilder(bulkAnnotationRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("createBulkTraceAnnotation", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder createBulkTraceAnnotationRequestBuilder(BulkAnnotationRequest bulkAnnotationRequest) throws ApiException { + // verify the required parameter 'bulkAnnotationRequest' is set + if (bulkAnnotationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'bulkAnnotationRequest' when calling createBulkTraceAnnotation"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/bulk-annotation/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(bulkAnnotationRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET + PATCH /tracer/feed/issues/{cluster_id}/ + * @param clusterId (required) + * @param projectId (optional) + * @return FeedDetailApiResponse + * @throws ApiException if fails to make API call + */ + public FeedDetailApiResponse getErrorFeedIssue(String clusterId, UUID projectId) throws ApiException { + ApiResponse localVarResponse = getErrorFeedIssueWithHttpInfo(clusterId, projectId); + return localVarResponse.getData(); + } + + /** + * + * GET + PATCH /tracer/feed/issues/{cluster_id}/ + * @param clusterId (required) + * @param projectId (optional) + * @return ApiResponse<FeedDetailApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getErrorFeedIssueWithHttpInfo(String clusterId, UUID projectId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getErrorFeedIssueRequestBuilder(clusterId, projectId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getErrorFeedIssue", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getErrorFeedIssueRequestBuilder(String clusterId, UUID projectId) throws ApiException { + // verify the required parameter 'clusterId' is set + if (clusterId == null) { + throw new ApiException(400, "Missing the required parameter 'clusterId' when calling getErrorFeedIssue"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/{cluster_id}/" + .replace("{cluster_id}", ApiClient.urlEncode(clusterId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET /tracer/feed/issues/stats/ — top stats bar totals. + * @param projectId (optional) + * @param timeRangeDays (optional) + * @return FeedStatsApiResponse + * @throws ApiException if fails to make API call + */ + public FeedStatsApiResponse getErrorFeedIssueStats(UUID projectId, Integer timeRangeDays) throws ApiException { + ApiResponse localVarResponse = getErrorFeedIssueStatsWithHttpInfo(projectId, timeRangeDays); + return localVarResponse.getData(); + } + + /** + * + * GET /tracer/feed/issues/stats/ — top stats bar totals. + * @param projectId (optional) + * @param timeRangeDays (optional) + * @return ApiResponse<FeedStatsApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getErrorFeedIssueStatsWithHttpInfo(UUID projectId, Integer timeRangeDays) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getErrorFeedIssueStatsRequestBuilder(projectId, timeRangeDays); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getErrorFeedIssueStats", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getErrorFeedIssueStatsRequestBuilder(UUID projectId, Integer timeRangeDays) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/stats/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "time_range_days"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("time_range_days", timeRangeDays)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Retrieve a trace by its ID. + * @param id (required) + * @return Trace + * @throws ApiException if fails to make API call + */ + public Trace getTrace(String id) throws ApiException { + ApiResponse localVarResponse = getTraceWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * Retrieve a trace by its ID. + * @param id (required) + * @return ApiResponse<Trace> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTraceWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTraceRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTrace", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTraceRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getTrace"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Fetch data for the observe graph with optimized queries + * @param observeGraphDataRequest (required) + * @return ObserveGraphDataResponse + * @throws ApiException if fails to make API call + */ + public ObserveGraphDataResponse getTraceGraphMethods(ObserveGraphDataRequest observeGraphDataRequest) throws ApiException { + ApiResponse localVarResponse = getTraceGraphMethodsWithHttpInfo(observeGraphDataRequest); + return localVarResponse.getData(); + } + + /** + * + * Fetch data for the observe graph with optimized queries + * @param observeGraphDataRequest (required) + * @return ApiResponse<ObserveGraphDataResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTraceGraphMethodsWithHttpInfo(ObserveGraphDataRequest observeGraphDataRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTraceGraphMethodsRequestBuilder(observeGraphDataRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTraceGraphMethods", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTraceGraphMethodsRequestBuilder(ObserveGraphDataRequest observeGraphDataRequest) throws ApiException { + // verify the required parameter 'observeGraphDataRequest' is set + if (observeGraphDataRequest == null) { + throw new ApiException(400, "Missing the required parameter 'observeGraphDataRequest' when calling getTraceGraphMethods"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/get_graph_methods/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(observeGraphDataRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param id (required) + * @return TraceSession + * @throws ApiException if fails to make API call + */ + public TraceSession getTraceSession(String id) throws ApiException { + ApiResponse localVarResponse = getTraceSessionWithHttpInfo(id); + return localVarResponse.getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<TraceSession> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTraceSessionWithHttpInfo(String id) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTraceSessionRequestBuilder(id); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTraceSession", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTraceSessionRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getTraceSession"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/{id}/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Fetch time-series session metrics for the observe graph. + * Supports the same metric types as the trace graph endpoint: - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, avg_duration, avg_traces_per_session — all aggregated at session level - EVAL: eval scores averaged across sessions - ANNOTATION: annotation scores averaged across sessions Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + * @param traceSessionGraphDataRequest (required) + * @return TraceSessionGraphDataRequest + * @throws ApiException if fails to make API call + */ + public TraceSessionGraphDataRequest getTraceSessionGraphData(TraceSessionGraphDataRequest traceSessionGraphDataRequest) throws ApiException { + ApiResponse localVarResponse = getTraceSessionGraphDataWithHttpInfo(traceSessionGraphDataRequest); + return localVarResponse.getData(); + } + + /** + * Fetch time-series session metrics for the observe graph. + * Supports the same metric types as the trace graph endpoint: - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, avg_duration, avg_traces_per_session — all aggregated at session level - EVAL: eval scores averaged across sessions - ANNOTATION: annotation scores averaged across sessions Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + * @param traceSessionGraphDataRequest (required) + * @return ApiResponse<TraceSessionGraphDataRequest> + * @throws ApiException if fails to make API call + */ + public ApiResponse getTraceSessionGraphDataWithHttpInfo(TraceSessionGraphDataRequest traceSessionGraphDataRequest) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTraceSessionGraphDataRequestBuilder(traceSessionGraphDataRequest); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getTraceSessionGraphData", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getTraceSessionGraphDataRequestBuilder(TraceSessionGraphDataRequest traceSessionGraphDataRequest) throws ApiException { + // verify the required parameter 'traceSessionGraphDataRequest' is set + if (traceSessionGraphDataRequest == null) { + throw new ApiException(400, "Missing the required parameter 'traceSessionGraphDataRequest' when calling getTraceSessionGraphData"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/get_session_graph_data/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(traceSessionGraphDataRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Return the heavy / detail-only fields for a single voice call. + * Query params: - trace_id (required) — UUID of the voice call trace. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response getVoiceCallDetail(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = getVoiceCallDetailWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * Return the heavy / detail-only fields for a single voice call. + * Query params: - trace_id (required) — UUID of the voice call trace. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse getVoiceCallDetailWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getVoiceCallDetailRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getVoiceCallDetail", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getVoiceCallDetailRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/voice_call_detail/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + * @param projectId (optional) + * @param search (optional) + * @param status (optional) + * @param fixLayer (optional) + * @param source (optional) + * @param issueGroup (optional) + * @param timeRangeDays (optional) + * @param sortBy (optional, default to last_seen) + * @param sortDir (optional, default to desc) + * @param limit (optional, default to 25) + * @param offset (optional, default to 0) + * @return FeedListApiResponse + * @throws ApiException if fails to make API call + */ + public FeedListApiResponse listErrorFeedIssues(UUID projectId, String search, String status, String fixLayer, String source, String issueGroup, Integer timeRangeDays, String sortBy, String sortDir, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResponse = listErrorFeedIssuesWithHttpInfo(projectId, search, status, fixLayer, source, issueGroup, timeRangeDays, sortBy, sortDir, limit, offset); + return localVarResponse.getData(); + } + + /** + * + * GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + * @param projectId (optional) + * @param search (optional) + * @param status (optional) + * @param fixLayer (optional) + * @param source (optional) + * @param issueGroup (optional) + * @param timeRangeDays (optional) + * @param sortBy (optional, default to last_seen) + * @param sortDir (optional, default to desc) + * @param limit (optional, default to 25) + * @param offset (optional, default to 0) + * @return ApiResponse<FeedListApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listErrorFeedIssuesWithHttpInfo(UUID projectId, String search, String status, String fixLayer, String source, String issueGroup, Integer timeRangeDays, String sortBy, String sortDir, Integer limit, Integer offset) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listErrorFeedIssuesRequestBuilder(projectId, search, status, fixLayer, source, issueGroup, timeRangeDays, sortBy, sortDir, limit, offset); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listErrorFeedIssues", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listErrorFeedIssuesRequestBuilder(UUID projectId, String search, String status, String fixLayer, String source, String issueGroup, Integer timeRangeDays, String sortBy, String sortDir, Integer limit, Integer offset) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/feed/issues/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + localVarQueryParameterBaseName = "fix_layer"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("fix_layer", fixLayer)); + localVarQueryParameterBaseName = "source"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("source", source)); + localVarQueryParameterBaseName = "issue_group"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("issue_group", issueGroup)); + localVarQueryParameterBaseName = "time_range_days"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("time_range_days", timeRangeDays)); + localVarQueryParameterBaseName = "sort_by"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort_by", sortBy)); + localVarQueryParameterBaseName = "sort_dir"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort_dir", sortDir)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "offset"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * + * @param projectId (optional) + * @return GetAnnotationLabelsResponse + * @throws ApiException if fails to make API call + */ + public GetAnnotationLabelsResponse listTraceAnnotationLabels(UUID projectId) throws ApiException { + ApiResponse localVarResponse = listTraceAnnotationLabelsWithHttpInfo(projectId); + return localVarResponse.getData(); + } + + /** + * + * + * @param projectId (optional) + * @return ApiResponse<GetAnnotationLabelsResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listTraceAnnotationLabelsWithHttpInfo(UUID projectId) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listTraceAnnotationLabelsRequestBuilder(projectId); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listTraceAnnotationLabels", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listTraceAnnotationLabelsRequestBuilder(UUID projectId) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/get-annotation-labels/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * List projects filtered by organization ID. + * Volume counts come from ClickHouse (fast) instead of a PG JOIN on observation_spans (was 12+ seconds). + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ListTraceProjects200Response + * @throws ApiException if fails to make API call + */ + public ListTraceProjects200Response listTraceProjects(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listTraceProjectsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * List projects filtered by organization ID. + * Volume counts come from ClickHouse (fast) instead of a PG JOIN on observation_spans (was 12+ seconds). + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<ListTraceProjects200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listTraceProjectsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listTraceProjectsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listTraceProjects", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listTraceProjectsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/project/list_projects/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Fetch all properties for graphing. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response listTraceProperties(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listTracePropertiesWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * Fetch all properties for graphing. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listTracePropertiesWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listTracePropertiesRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listTraceProperties", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listTracePropertiesRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/get_properties/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List traces filtered by project ID and project version ID with optimized queries. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param projectId (optional) + * @param userId (optional) + * @param bookmarked (optional) + * @param filters (optional, default to []) + * @param sortParams (optional, default to []) + * @param pageNumber (optional, default to 0) + * @param pageSize (optional, default to 30) + * @param interval (optional) + * @return TracerTraceSessionList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceSessionList200Response listTraceSessions(Integer page, Integer limit, UUID projectId, String userId, Boolean bookmarked, String filters, String sortParams, Integer pageNumber, Integer pageSize, String interval) throws ApiException { + ApiResponse localVarResponse = listTraceSessionsWithHttpInfo(page, limit, projectId, userId, bookmarked, filters, sortParams, pageNumber, pageSize, interval); + return localVarResponse.getData(); + } + + /** + * + * List traces filtered by project ID and project version ID with optimized queries. + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param projectId (optional) + * @param userId (optional) + * @param bookmarked (optional) + * @param filters (optional, default to []) + * @param sortParams (optional, default to []) + * @param pageNumber (optional, default to 0) + * @param pageSize (optional, default to 30) + * @param interval (optional) + * @return ApiResponse<TracerTraceSessionList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listTraceSessionsWithHttpInfo(Integer page, Integer limit, UUID projectId, String userId, Boolean bookmarked, String filters, String sortParams, Integer pageNumber, Integer pageSize, String interval) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listTraceSessionsRequestBuilder(page, limit, projectId, userId, bookmarked, filters, sortParams, pageNumber, pageSize, interval); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listTraceSessions", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listTraceSessionsRequestBuilder(Integer page, Integer limit, UUID projectId, String userId, Boolean bookmarked, String filters, String sortParams, Integer pageNumber, Integer pageSize, String interval) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace-session/list_sessions/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "user_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("user_id", userId)); + localVarQueryParameterBaseName = "bookmarked"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("bookmarked", bookmarked)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + localVarQueryParameterBaseName = "sort_params"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort_params", sortParams)); + localVarQueryParameterBaseName = "page_number"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_number", pageNumber)); + localVarQueryParameterBaseName = "page_size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_size", pageSize)); + localVarQueryParameterBaseName = "interval"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("interval", interval)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List traces filtered by project ID with optimized queries. + * @param projectId (optional) + * @param search (optional) + * @param pageSize (optional) + * @param currentPageIndex (optional) + * @param sortParams (optional, default to []) + * @param filters (optional, default to []) + * @return UsersResponse + * @throws ApiException if fails to make API call + */ + public UsersResponse listTraceUsers(UUID projectId, String search, Integer pageSize, Integer currentPageIndex, String sortParams, String filters) throws ApiException { + ApiResponse localVarResponse = listTraceUsersWithHttpInfo(projectId, search, pageSize, currentPageIndex, sortParams, filters); + return localVarResponse.getData(); + } + + /** + * + * List traces filtered by project ID with optimized queries. + * @param projectId (optional) + * @param search (optional) + * @param pageSize (optional) + * @param currentPageIndex (optional) + * @param sortParams (optional, default to []) + * @param filters (optional, default to []) + * @return ApiResponse<UsersResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listTraceUsersWithHttpInfo(UUID projectId, String search, Integer pageSize, Integer currentPageIndex, String sortParams, String filters) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listTraceUsersRequestBuilder(projectId, search, pageSize, currentPageIndex, sortParams, filters); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listTraceUsers", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listTraceUsersRequestBuilder(UUID projectId, String search, Integer pageSize, Integer currentPageIndex, String sortParams, String filters) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/users/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "project_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_id", projectId)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "page_size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_size", pageSize)); + localVarQueryParameterBaseName = "current_page_index"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("current_page_index", currentPageIndex)); + localVarQueryParameterBaseName = "sort_params"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort_params", sortParams)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List traces filtered by project ID and project version ID with optimized queries. + * @param projectVersionId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param traceIds (optional) + * @param filters (optional, default to []) + * @param sortParams (optional, default to []) + * @param pageNumber (optional, default to 0) + * @param pageSize (optional, default to 30) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response listTraces(UUID projectVersionId, Integer page, Integer limit, String traceIds, String filters, String sortParams, Integer pageNumber, Integer pageSize) throws ApiException { + ApiResponse localVarResponse = listTracesWithHttpInfo(projectVersionId, page, limit, traceIds, filters, sortParams, pageNumber, pageSize); + return localVarResponse.getData(); + } + + /** + * + * List traces filtered by project ID and project version ID with optimized queries. + * @param projectVersionId (required) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @param traceIds (optional) + * @param filters (optional, default to []) + * @param sortParams (optional, default to []) + * @param pageNumber (optional, default to 0) + * @param pageSize (optional, default to 30) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listTracesWithHttpInfo(UUID projectVersionId, Integer page, Integer limit, String traceIds, String filters, String sortParams, Integer pageNumber, Integer pageSize) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listTracesRequestBuilder(projectVersionId, page, limit, traceIds, filters, sortParams, pageNumber, pageSize); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listTraces", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listTracesRequestBuilder(UUID projectVersionId, Integer page, Integer limit, String traceIds, String filters, String sortParams, Integer pageNumber, Integer pageSize) throws ApiException { + // verify the required parameter 'projectVersionId' is set + if (projectVersionId == null) { + throw new ApiException(400, "Missing the required parameter 'projectVersionId' when calling listTraces"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/list_traces/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "project_version_id"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("project_version_id", projectVersionId)); + localVarQueryParameterBaseName = "trace_ids"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("trace_ids", traceIds)); + localVarQueryParameterBaseName = "filters"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("filters", filters)); + localVarQueryParameterBaseName = "sort_params"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort_params", sortParams)); + localVarQueryParameterBaseName = "page_number"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_number", pageNumber)); + localVarQueryParameterBaseName = "page_size"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page_size", pageSize)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * List voice/conversation traces for a project in an optimized way and return a response similar to the provided call object schema. Query params: - project_id (required) - page (1-based, optional, default 1) - page_size (optional, default 30) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return TracerTraceList200Response + * @throws ApiException if fails to make API call + */ + public TracerTraceList200Response listVoiceCalls(Integer page, Integer limit) throws ApiException { + ApiResponse localVarResponse = listVoiceCallsWithHttpInfo(page, limit); + return localVarResponse.getData(); + } + + /** + * + * List voice/conversation traces for a project in an optimized way and return a response similar to the provided call object schema. Query params: - project_id (required) - page (1-based, optional, default 1) - page_size (optional, default 30) + * @param page A page number within the paginated result set. (optional) + * @param limit Number of results to return per page. (optional) + * @return ApiResponse<TracerTraceList200Response> + * @throws ApiException if fails to make API call + */ + public ApiResponse listVoiceCallsWithHttpInfo(Integer page, Integer limit) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listVoiceCallsRequestBuilder(page, limit); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listVoiceCalls", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listVoiceCallsRequestBuilder(Integer page, Integer limit) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/list_voice_calls/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Update tags for a trace. + * @param id (required) + * @param traceTagsUpdate (required) + * @return TraceTagsUpdate + * @throws ApiException if fails to make API call + */ + public TraceTagsUpdate updateTraceTags(String id, TraceTagsUpdate traceTagsUpdate) throws ApiException { + ApiResponse localVarResponse = updateTraceTagsWithHttpInfo(id, traceTagsUpdate); + return localVarResponse.getData(); + } + + /** + * + * Update tags for a trace. + * @param id (required) + * @param traceTagsUpdate (required) + * @return ApiResponse<TraceTagsUpdate> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateTraceTagsWithHttpInfo(String id, TraceTagsUpdate traceTagsUpdate) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateTraceTagsRequestBuilder(id, traceTagsUpdate); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateTraceTags", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateTraceTagsRequestBuilder(String id, TraceTagsUpdate traceTagsUpdate) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateTraceTags"); + } + // verify the required parameter 'traceTagsUpdate' is set + if (traceTagsUpdate == null) { + throw new ApiException(400, "Missing the required parameter 'traceTagsUpdate' when calling updateTraceTags"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tracer/trace/{id}/tags/" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(traceTagsUpdate); + localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/api/UsersApi.java b/java/futureagi/src/main/java/com/futureagi/sdk/api/UsersApi.java new file mode 100644 index 0000000..81e7b94 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/api/UsersApi.java @@ -0,0 +1,598 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.futureagi.sdk.api; + +import com.futureagi.sdk.ApiClient; +import com.futureagi.sdk.ApiException; +import com.futureagi.sdk.ApiResponse; +import com.futureagi.sdk.Configuration; +import com.futureagi.sdk.Pair; + +import com.futureagi.sdk.model.AccountsErrorResponse; +import com.futureagi.sdk.model.ManagementAPIErrorResponse; +import com.futureagi.sdk.model.MemberListResponse; +import com.futureagi.sdk.model.SwitchWorkspace; +import com.futureagi.sdk.model.SwitchWorkspaceResponse; +import com.futureagi.sdk.model.UserInfoResponse; +import com.futureagi.sdk.model.WorkspaceListPaginatedResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UsersApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public UsersApi() { + this(Configuration.getDefaultApiClient()); + } + + public UsersApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @return UserInfoResponse + * @throws ApiException if fails to make API call + */ + public UserInfoResponse getCurrentUser() throws ApiException { + ApiResponse localVarResponse = getCurrentUserWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<UserInfoResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse getCurrentUserWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCurrentUserRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getCurrentUser", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getCurrentUserRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/user-info/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /accounts/organization/members/ + * Returns UNION of active members + pending/expired invites. Status is derived at query time (Active / Pending / Expired). + * @param page (optional, default to 1) + * @param limit (optional, default to 20) + * @param search (optional, default to ) + * @param filterStatus (optional) + * @param filterRole (optional) + * @param sort (optional, default to -created_at) + * @return MemberListResponse + * @throws ApiException if fails to make API call + */ + public MemberListResponse listOrganizationMembers(Integer page, Integer limit, String search, List filterStatus, List filterRole, String sort) throws ApiException { + ApiResponse localVarResponse = listOrganizationMembersWithHttpInfo(page, limit, search, filterStatus, filterRole, sort); + return localVarResponse.getData(); + } + + /** + * GET /accounts/organization/members/ + * Returns UNION of active members + pending/expired invites. Status is derived at query time (Active / Pending / Expired). + * @param page (optional, default to 1) + * @param limit (optional, default to 20) + * @param search (optional, default to ) + * @param filterStatus (optional) + * @param filterRole (optional) + * @param sort (optional, default to -created_at) + * @return ApiResponse<MemberListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listOrganizationMembersWithHttpInfo(Integer page, Integer limit, String search, List filterStatus, List filterRole, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listOrganizationMembersRequestBuilder(page, limit, search, filterStatus, filterRole, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listOrganizationMembers", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listOrganizationMembersRequestBuilder(Integer page, Integer limit, String search, List filterStatus, List filterRole, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/organization/members/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "filter_status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "filter_status", filterStatus)); + localVarQueryParameterBaseName = "filter_role"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "filter_role", filterRole)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * GET /accounts/workspace/<workspace_id>/members/ + * Returns members of a specific workspace. Org Admin+ users who auto-access are included with derived WS Admin role. + * @param workspaceId (required) + * @param page (optional, default to 1) + * @param limit (optional, default to 20) + * @param search (optional, default to ) + * @param filterStatus (optional) + * @param filterRole (optional) + * @param sort (optional, default to -created_at) + * @return MemberListResponse + * @throws ApiException if fails to make API call + */ + public MemberListResponse listWorkspaceMembers(String workspaceId, Integer page, Integer limit, String search, List filterStatus, List filterRole, String sort) throws ApiException { + ApiResponse localVarResponse = listWorkspaceMembersWithHttpInfo(workspaceId, page, limit, search, filterStatus, filterRole, sort); + return localVarResponse.getData(); + } + + /** + * GET /accounts/workspace/<workspace_id>/members/ + * Returns members of a specific workspace. Org Admin+ users who auto-access are included with derived WS Admin role. + * @param workspaceId (required) + * @param page (optional, default to 1) + * @param limit (optional, default to 20) + * @param search (optional, default to ) + * @param filterStatus (optional) + * @param filterRole (optional) + * @param sort (optional, default to -created_at) + * @return ApiResponse<MemberListResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listWorkspaceMembersWithHttpInfo(String workspaceId, Integer page, Integer limit, String search, List filterStatus, List filterRole, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listWorkspaceMembersRequestBuilder(workspaceId, page, limit, search, filterStatus, filterRole, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listWorkspaceMembers", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listWorkspaceMembersRequestBuilder(String workspaceId, Integer page, Integer limit, String search, List filterStatus, List filterRole, String sort) throws ApiException { + // verify the required parameter 'workspaceId' is set + if (workspaceId == null) { + throw new ApiException(400, "Missing the required parameter 'workspaceId' when calling listWorkspaceMembers"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/workspace/{workspace_id}/members/" + .replace("{workspace_id}", ApiClient.urlEncode(workspaceId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "filter_status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "filter_status", filterStatus)); + localVarQueryParameterBaseName = "filter_role"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "filter_role", filterRole)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Get paginated list of workspaces + * @param page (optional, default to 1) + * @param limit (optional, default to 10) + * @param search (optional, default to ) + * @param sort (optional, default to ) + * @return WorkspaceListPaginatedResponse + * @throws ApiException if fails to make API call + */ + public WorkspaceListPaginatedResponse listWorkspaces(Integer page, Integer limit, String search, String sort) throws ApiException { + ApiResponse localVarResponse = listWorkspacesWithHttpInfo(page, limit, search, sort); + return localVarResponse.getData(); + } + + /** + * + * Get paginated list of workspaces + * @param page (optional, default to 1) + * @param limit (optional, default to 10) + * @param search (optional, default to ) + * @param sort (optional, default to ) + * @return ApiResponse<WorkspaceListPaginatedResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse listWorkspacesWithHttpInfo(Integer page, Integer limit, String search, String sort) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = listWorkspacesRequestBuilder(page, limit, search, sort); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("listWorkspaces", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder listWorkspacesRequestBuilder(Integer page, Integer limit, String search, String sort) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/workspace/list/"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "sort"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sort", sort)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * + * Switch to a different workspace with proper validation + * @param switchWorkspace (required) + * @return SwitchWorkspaceResponse + * @throws ApiException if fails to make API call + */ + public SwitchWorkspaceResponse switchWorkspace(SwitchWorkspace switchWorkspace) throws ApiException { + ApiResponse localVarResponse = switchWorkspaceWithHttpInfo(switchWorkspace); + return localVarResponse.getData(); + } + + /** + * + * Switch to a different workspace with proper validation + * @param switchWorkspace (required) + * @return ApiResponse<SwitchWorkspaceResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse switchWorkspaceWithHttpInfo(SwitchWorkspace switchWorkspace) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = switchWorkspaceRequestBuilder(switchWorkspace); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("switchWorkspace", localVarResponse); + } + if (localVarResponse.body() == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder switchWorkspaceRequestBuilder(SwitchWorkspace switchWorkspace) throws ApiException { + // verify the required parameter 'switchWorkspace' is set + if (switchWorkspace == null) { + throw new ApiException(400, "Missing the required parameter 'switchWorkspace' when calling switchWorkspace"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/accounts/workspace/switch/"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(switchWorkspace); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AbstractOpenApiSchema.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AbstractOpenApiSchema.java new file mode 100644 index 0000000..80280a6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AbstractOpenApiSchema.java @@ -0,0 +1,147 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AccountsErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AccountsErrorResponse.java new file mode 100644 index 0000000..11e52f0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AccountsErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AccountsErrorResponse + */ +@JsonPropertyOrder({ + AccountsErrorResponse.JSON_PROPERTY_STATUS, + AccountsErrorResponse.JSON_PROPERTY_TYPE, + AccountsErrorResponse.JSON_PROPERTY_CODE, + AccountsErrorResponse.JSON_PROPERTY_DETAIL, + AccountsErrorResponse.JSON_PROPERTY_RESULT, + AccountsErrorResponse.JSON_PROPERTY_MESSAGE, + AccountsErrorResponse.JSON_PROPERTY_ERROR, + AccountsErrorResponse.JSON_PROPERTY_ATTR, + AccountsErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AccountsErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public AccountsErrorResponse() { + } + + public AccountsErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public AccountsErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public AccountsErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public AccountsErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public AccountsErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public AccountsErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public AccountsErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public AccountsErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public AccountsErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public AccountsErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this AccountsErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountsErrorResponse accountsErrorResponse = (AccountsErrorResponse) o; + return Objects.equals(this.status, accountsErrorResponse.status) && + equalsNullable(this.type, accountsErrorResponse.type) && + equalsNullable(this.code, accountsErrorResponse.code) && + equalsNullable(this.detail, accountsErrorResponse.detail) && + equalsNullable(this.result, accountsErrorResponse.result) && + equalsNullable(this.message, accountsErrorResponse.message) && + equalsNullable(this.error, accountsErrorResponse.error) && + equalsNullable(this.attr, accountsErrorResponse.attr) && + Objects.equals(this.details, accountsErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountsErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddApiColumnRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddApiColumnRequest.java new file mode 100644 index 0000000..642a629 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddApiColumnRequest.java @@ -0,0 +1,237 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddApiColumnRequest + */ +@JsonPropertyOrder({ + AddApiColumnRequest.JSON_PROPERTY_COLUMN_NAME, + AddApiColumnRequest.JSON_PROPERTY_CONFIG, + AddApiColumnRequest.JSON_PROPERTY_CONCURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddApiColumnRequest { + public static final String JSON_PROPERTY_COLUMN_NAME = "column_name"; + @javax.annotation.Nonnull + private String columnName; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_CONCURRENCY = "concurrency"; + @javax.annotation.Nullable + private Integer concurrency = 5; + + public AddApiColumnRequest() { + } + + public AddApiColumnRequest columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get columnName + * @return columnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumnName() { + return columnName; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + + public AddApiColumnRequest config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public AddApiColumnRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public AddApiColumnRequest concurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + return this; + } + + /** + * Get concurrency + * @return concurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConcurrency() { + return concurrency; + } + + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConcurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + } + + + /** + * Return true if this AddApiColumnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddApiColumnRequest addApiColumnRequest = (AddApiColumnRequest) o; + return Objects.equals(this.columnName, addApiColumnRequest.columnName) && + Objects.equals(this.config, addApiColumnRequest.config) && + Objects.equals(this.concurrency, addApiColumnRequest.concurrency); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, config, concurrency); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddApiColumnRequest {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" concurrency: ").append(toIndentedString(concurrency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_name` to the URL query string + if (getColumnName() != null) { + joiner.add(String.format("%scolumn_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `concurrency` to the URL query string + if (getConcurrency() != null) { + joiner.add(String.format("%sconcurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConcurrency())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddAsNewDatasetRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddAsNewDatasetRequest.java new file mode 100644 index 0000000..b8d9588 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddAsNewDatasetRequest.java @@ -0,0 +1,238 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddAsNewDatasetRequest + */ +@JsonPropertyOrder({ + AddAsNewDatasetRequest.JSON_PROPERTY_DATASET_ID, + AddAsNewDatasetRequest.JSON_PROPERTY_NAME, + AddAsNewDatasetRequest.JSON_PROPERTY_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddAsNewDatasetRequest { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nullable + private Map columns = new HashMap<>(); + + public AddAsNewDatasetRequest() { + } + + public AddAsNewDatasetRequest datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public AddAsNewDatasetRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public AddAsNewDatasetRequest columns(@javax.annotation.Nullable Map columns) { + this.columns = columns; + return this; + } + + public AddAsNewDatasetRequest putColumnsItem(String key, Object columnsItem) { + if (this.columns == null) { + this.columns = new HashMap<>(); + } + this.columns.put(key, columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setColumns(@javax.annotation.Nullable Map columns) { + this.columns = columns; + } + + + /** + * Return true if this AddAsNewDatasetRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddAsNewDatasetRequest addAsNewDatasetRequest = (AddAsNewDatasetRequest) o; + return Objects.equals(this.datasetId, addAsNewDatasetRequest.datasetId) && + Objects.equals(this.name, addAsNewDatasetRequest.name) && + Objects.equals(this.columns, addAsNewDatasetRequest.columns); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, name, columns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddAsNewDatasetRequest {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (String _key : getColumns().keySet()) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getColumns().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsRequest.java new file mode 100644 index 0000000..a99b3ec --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsRequest.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalConfigDefinition; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddEvalConfigsRequest + */ +@JsonPropertyOrder({ + AddEvalConfigsRequest.JSON_PROPERTY_EVALUATIONS_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddEvalConfigsRequest { + public static final String JSON_PROPERTY_EVALUATIONS_CONFIG = "evaluations_config"; + @javax.annotation.Nonnull + private List evaluationsConfig = new ArrayList<>(); + + public AddEvalConfigsRequest() { + } + + public AddEvalConfigsRequest evaluationsConfig(@javax.annotation.Nonnull List evaluationsConfig) { + this.evaluationsConfig = evaluationsConfig; + return this; + } + + public AddEvalConfigsRequest addEvaluationsConfigItem(EvalConfigDefinition evaluationsConfigItem) { + if (this.evaluationsConfig == null) { + this.evaluationsConfig = new ArrayList<>(); + } + this.evaluationsConfig.add(evaluationsConfigItem); + return this; + } + + /** + * Array of evaluation configuration objects to add. At least one required. + * @return evaluationsConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATIONS_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvaluationsConfig() { + return evaluationsConfig; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATIONS_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluationsConfig(@javax.annotation.Nonnull List evaluationsConfig) { + this.evaluationsConfig = evaluationsConfig; + } + + + /** + * Return true if this AddEvalConfigsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddEvalConfigsRequest addEvalConfigsRequest = (AddEvalConfigsRequest) o; + return Objects.equals(this.evaluationsConfig, addEvalConfigsRequest.evaluationsConfig); + } + + @Override + public int hashCode() { + return Objects.hash(evaluationsConfig); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddEvalConfigsRequest {\n"); + sb.append(" evaluationsConfig: ").append(toIndentedString(evaluationsConfig)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `evaluations_config` to the URL query string + if (getEvaluationsConfig() != null) { + for (int i = 0; i < getEvaluationsConfig().size(); i++) { + if (getEvaluationsConfig().get(i) != null) { + joiner.add(getEvaluationsConfig().get(i).toUrlQueryString(String.format("%sevaluations_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsResponse.java new file mode 100644 index 0000000..9d673c9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddEvalConfigsResponse.java @@ -0,0 +1,288 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalConfigResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddEvalConfigsResponse + */ +@JsonPropertyOrder({ + AddEvalConfigsResponse.JSON_PROPERTY_MESSAGE, + AddEvalConfigsResponse.JSON_PROPERTY_CREATED_EVAL_CONFIGS, + AddEvalConfigsResponse.JSON_PROPERTY_RUN_TEST_ID, + AddEvalConfigsResponse.JSON_PROPERTY_WARNINGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddEvalConfigsResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_CREATED_EVAL_CONFIGS = "created_eval_configs"; + @javax.annotation.Nonnull + private List createdEvalConfigs = new ArrayList<>(); + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nonnull + private UUID runTestId; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @javax.annotation.Nullable + private List warnings = new ArrayList<>(); + + public AddEvalConfigsResponse() { + } + + public AddEvalConfigsResponse message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public AddEvalConfigsResponse createdEvalConfigs(@javax.annotation.Nonnull List createdEvalConfigs) { + this.createdEvalConfigs = createdEvalConfigs; + return this; + } + + public AddEvalConfigsResponse addCreatedEvalConfigsItem(EvalConfigResponse createdEvalConfigsItem) { + if (this.createdEvalConfigs == null) { + this.createdEvalConfigs = new ArrayList<>(); + } + this.createdEvalConfigs.add(createdEvalConfigsItem); + return this; + } + + /** + * Get createdEvalConfigs + * @return createdEvalConfigs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_EVAL_CONFIGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCreatedEvalConfigs() { + return createdEvalConfigs; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_EVAL_CONFIGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedEvalConfigs(@javax.annotation.Nonnull List createdEvalConfigs) { + this.createdEvalConfigs = createdEvalConfigs; + } + + + public AddEvalConfigsResponse runTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + return this; + } + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRunTestId() { + return runTestId; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + } + + + public AddEvalConfigsResponse warnings(@javax.annotation.Nullable List warnings) { + this.warnings = warnings; + return this; + } + + public AddEvalConfigsResponse addWarningsItem(String warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); + return this; + } + + /** + * Non-fatal issues encountered while processing individual configs. + * @return warnings + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } + + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(@javax.annotation.Nullable List warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this AddEvalConfigsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddEvalConfigsResponse addEvalConfigsResponse = (AddEvalConfigsResponse) o; + return Objects.equals(this.message, addEvalConfigsResponse.message) && + Objects.equals(this.createdEvalConfigs, addEvalConfigsResponse.createdEvalConfigs) && + Objects.equals(this.runTestId, addEvalConfigsResponse.runTestId) && + Objects.equals(this.warnings, addEvalConfigsResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(message, createdEvalConfigs, runTestId, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddEvalConfigsResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" createdEvalConfigs: ").append(toIndentedString(createdEvalConfigs)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `created_eval_configs` to the URL query string + if (getCreatedEvalConfigs() != null) { + for (int i = 0; i < getCreatedEvalConfigs().size(); i++) { + if (getCreatedEvalConfigs().get(i) != null) { + joiner.add(getCreatedEvalConfigs().get(i).toUrlQueryString(String.format("%screated_eval_configs%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `warnings` to the URL query string + if (getWarnings() != null) { + for (int i = 0; i < getWarnings().size(); i++) { + joiner.add(String.format("%swarnings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getWarnings().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddItems.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddItems.java new file mode 100644 index 0000000..d850b44 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddItems.java @@ -0,0 +1,204 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AddQueueItem; +import com.futureagi.sdk.model.Selection; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddItems + */ +@JsonPropertyOrder({ + AddItems.JSON_PROPERTY_ITEMS, + AddItems.JSON_PROPERTY_SELECTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddItems { + public static final String JSON_PROPERTY_ITEMS = "items"; + @javax.annotation.Nullable + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECTION = "selection"; + @javax.annotation.Nullable + private Selection selection; + + public AddItems() { + } + + public AddItems items(@javax.annotation.Nullable List items) { + this.items = items; + return this; + } + + public AddItems addItemsItem(AddQueueItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setItems(@javax.annotation.Nullable List items) { + this.items = items; + } + + + public AddItems selection(@javax.annotation.Nullable Selection selection) { + this.selection = selection; + return this; + } + + /** + * Get selection + * @return selection + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Selection getSelection() { + return selection; + } + + + @JsonProperty(JSON_PROPERTY_SELECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelection(@javax.annotation.Nullable Selection selection) { + this.selection = selection; + } + + + /** + * Return true if this AddItems object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddItems addItems = (AddItems) o; + return Objects.equals(this.items, addItems.items) && + Objects.equals(this.selection, addItems.selection); + } + + @Override + public int hashCode() { + return Objects.hash(items, selection); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddItems {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" selection: ").append(toIndentedString(selection)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `items` to the URL query string + if (getItems() != null) { + for (int i = 0; i < getItems().size(); i++) { + if (getItems().get(i) != null) { + joiner.add(getItems().get(i).toUrlQueryString(String.format("%sitems%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `selection` to the URL query string + if (getSelection() != null) { + joiner.add(getSelection().toUrlQueryString(prefix + "selection" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddQueueItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddQueueItem.java new file mode 100644 index 0000000..abbfceb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddQueueItem.java @@ -0,0 +1,230 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddQueueItem + */ +@JsonPropertyOrder({ + AddQueueItem.JSON_PROPERTY_SOURCE_TYPE, + AddQueueItem.JSON_PROPERTY_SOURCE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddQueueItem { + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + CALL_EXECUTION(String.valueOf("call_execution")), + + DATASET_ROW(String.valueOf("dataset_row")), + + OBSERVATION_SPAN(String.valueOf("observation_span")), + + PROTOTYPE_RUN(String.valueOf("prototype_run")), + + TRACE(String.valueOf("trace")), + + TRACE_SESSION(String.valueOf("trace_session")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nonnull + private String sourceId; + + public AddQueueItem() { + } + + public AddQueueItem sourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + public AddQueueItem sourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + } + + + /** + * Return true if this AddQueueItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddQueueItem addQueueItem = (AddQueueItem) o; + return Objects.equals(this.sourceType, addQueueItem.sourceType) && + Objects.equals(this.sourceId, addQueueItem.sourceId); + } + + @Override + public int hashCode() { + return Objects.hash(sourceType, sourceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddQueueItem {\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddRowsFromFileRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddRowsFromFileRequest.java new file mode 100644 index 0000000..ad75448 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddRowsFromFileRequest.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddRowsFromFileRequest + */ +@JsonPropertyOrder({ + AddRowsFromFileRequest.JSON_PROPERTY_FILE, + AddRowsFromFileRequest.JSON_PROPERTY_DATASET_ID, + AddRowsFromFileRequest.JSON_PROPERTY_MODEL_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddRowsFromFileRequest { + public static final String JSON_PROPERTY_FILE = "file"; + @javax.annotation.Nullable + private URI _file; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nullable + private String modelType; + + public AddRowsFromFileRequest() { + } + + @JsonCreator + public AddRowsFromFileRequest( + @JsonProperty(JSON_PROPERTY_FILE) URI _file + ) { + this(); + this._file = _file; + } + + /** + * Get _file + * @return _file + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public URI getFile() { + return _file; + } + + + + + public AddRowsFromFileRequest datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public AddRowsFromFileRequest modelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + } + + + /** + * Return true if this AddRowsFromFileRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddRowsFromFileRequest addRowsFromFileRequest = (AddRowsFromFileRequest) o; + return Objects.equals(this._file, addRowsFromFileRequest._file) && + Objects.equals(this.datasetId, addRowsFromFileRequest.datasetId) && + Objects.equals(this.modelType, addRowsFromFileRequest.modelType); + } + + @Override + public int hashCode() { + return Objects.hash(_file, datasetId, modelType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddRowsFromFileRequest {\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `file` to the URL query string + if (getFile() != null) { + joiner.add(String.format("%sfile%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFile())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AddRunPrompt.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddRunPrompt.java new file mode 100644 index 0000000..c615f1d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AddRunPrompt.java @@ -0,0 +1,225 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptConfig; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AddRunPrompt + */ +@JsonPropertyOrder({ + AddRunPrompt.JSON_PROPERTY_DATASET_ID, + AddRunPrompt.JSON_PROPERTY_NAME, + AddRunPrompt.JSON_PROPERTY_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AddRunPrompt { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private PromptConfig config; + + public AddRunPrompt() { + } + + public AddRunPrompt datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public AddRunPrompt name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AddRunPrompt config(@javax.annotation.Nullable PromptConfig config) { + this.config = config; + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PromptConfig getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable PromptConfig config) { + this.config = config; + } + + + /** + * Return true if this AddRunPrompt object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddRunPrompt addRunPrompt = (AddRunPrompt) o; + return Objects.equals(this.datasetId, addRunPrompt.datasetId) && + Objects.equals(this.name, addRunPrompt.name) && + Objects.equals(this.config, addRunPrompt.config); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, name, config); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddRunPrompt {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + joiner.add(getConfig().toUrlQueryString(prefix + "config" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteRequest.java new file mode 100644 index 0000000..48ad495 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteRequest.java @@ -0,0 +1,168 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionBulkDeleteRequest + */ +@JsonPropertyOrder({ + AgentDefinitionBulkDeleteRequest.JSON_PROPERTY_AGENT_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionBulkDeleteRequest { + public static final String JSON_PROPERTY_AGENT_IDS = "agent_ids"; + @javax.annotation.Nonnull + private List agentIds = new ArrayList<>(); + + public AgentDefinitionBulkDeleteRequest() { + } + + public AgentDefinitionBulkDeleteRequest agentIds(@javax.annotation.Nonnull List agentIds) { + this.agentIds = agentIds; + return this; + } + + public AgentDefinitionBulkDeleteRequest addAgentIdsItem(UUID agentIdsItem) { + if (this.agentIds == null) { + this.agentIds = new ArrayList<>(); + } + this.agentIds.add(agentIdsItem); + return this; + } + + /** + * List of agent definition UUIDs to delete. + * @return agentIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGENT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAgentIds() { + return agentIds; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgentIds(@javax.annotation.Nonnull List agentIds) { + this.agentIds = agentIds; + } + + + /** + * Return true if this AgentDefinitionBulkDeleteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionBulkDeleteRequest agentDefinitionBulkDeleteRequest = (AgentDefinitionBulkDeleteRequest) o; + return Objects.equals(this.agentIds, agentDefinitionBulkDeleteRequest.agentIds); + } + + @Override + public int hashCode() { + return Objects.hash(agentIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionBulkDeleteRequest {\n"); + sb.append(" agentIds: ").append(toIndentedString(agentIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `agent_ids` to the URL query string + if (getAgentIds() != null) { + for (int i = 0; i < getAgentIds().size(); i++) { + if (getAgentIds().get(i) != null) { + joiner.add(String.format("%sagent_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getAgentIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteResponse.java new file mode 100644 index 0000000..9152d48 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionBulkDeleteResponse.java @@ -0,0 +1,205 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionBulkDeleteResponse + */ +@JsonPropertyOrder({ + AgentDefinitionBulkDeleteResponse.JSON_PROPERTY_MESSAGE, + AgentDefinitionBulkDeleteResponse.JSON_PROPERTY_AGENTS_UPDATED, + AgentDefinitionBulkDeleteResponse.JSON_PROPERTY_VERSIONS_UPDATED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionBulkDeleteResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_AGENTS_UPDATED = "agents_updated"; + @javax.annotation.Nullable + private Integer agentsUpdated; + + public static final String JSON_PROPERTY_VERSIONS_UPDATED = "versions_updated"; + @javax.annotation.Nullable + private Integer versionsUpdated; + + public AgentDefinitionBulkDeleteResponse() { + } + + @JsonCreator + public AgentDefinitionBulkDeleteResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_AGENTS_UPDATED) Integer agentsUpdated, + @JsonProperty(JSON_PROPERTY_VERSIONS_UPDATED) Integer versionsUpdated + ) { + this(); + this.message = message; + this.agentsUpdated = agentsUpdated; + this.versionsUpdated = versionsUpdated; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get agentsUpdated + * @return agentsUpdated + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENTS_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAgentsUpdated() { + return agentsUpdated; + } + + + + + /** + * Get versionsUpdated + * @return versionsUpdated + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSIONS_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVersionsUpdated() { + return versionsUpdated; + } + + + + + /** + * Return true if this AgentDefinitionBulkDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionBulkDeleteResponse agentDefinitionBulkDeleteResponse = (AgentDefinitionBulkDeleteResponse) o; + return Objects.equals(this.message, agentDefinitionBulkDeleteResponse.message) && + Objects.equals(this.agentsUpdated, agentDefinitionBulkDeleteResponse.agentsUpdated) && + Objects.equals(this.versionsUpdated, agentDefinitionBulkDeleteResponse.versionsUpdated); + } + + @Override + public int hashCode() { + return Objects.hash(message, agentsUpdated, versionsUpdated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionBulkDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" agentsUpdated: ").append(toIndentedString(agentsUpdated)).append("\n"); + sb.append(" versionsUpdated: ").append(toIndentedString(versionsUpdated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `agents_updated` to the URL query string + if (getAgentsUpdated() != null) { + joiner.add(String.format("%sagents_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentsUpdated())))); + } + + // add `versions_updated` to the URL query string + if (getVersionsUpdated() != null) { + joiner.add(String.format("%sversions_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionsUpdated())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateRequest.java new file mode 100644 index 0000000..89f1a88 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateRequest.java @@ -0,0 +1,1269 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionCreateRequest + */ +@JsonPropertyOrder({ + AgentDefinitionCreateRequest.JSON_PROPERTY_AGENT_NAME, + AgentDefinitionCreateRequest.JSON_PROPERTY_AGENT_TYPE, + AgentDefinitionCreateRequest.JSON_PROPERTY_COMMIT_MESSAGE, + AgentDefinitionCreateRequest.JSON_PROPERTY_INBOUND, + AgentDefinitionCreateRequest.JSON_PROPERTY_DESCRIPTION, + AgentDefinitionCreateRequest.JSON_PROPERTY_PROVIDER, + AgentDefinitionCreateRequest.JSON_PROPERTY_API_KEY, + AgentDefinitionCreateRequest.JSON_PROPERTY_ASSISTANT_ID, + AgentDefinitionCreateRequest.JSON_PROPERTY_AUTHENTICATION_METHOD, + AgentDefinitionCreateRequest.JSON_PROPERTY_LANGUAGE, + AgentDefinitionCreateRequest.JSON_PROPERTY_LANGUAGES, + AgentDefinitionCreateRequest.JSON_PROPERTY_CONTACT_NUMBER, + AgentDefinitionCreateRequest.JSON_PROPERTY_KNOWLEDGE_BASE, + AgentDefinitionCreateRequest.JSON_PROPERTY_OBSERVABILITY_ENABLED, + AgentDefinitionCreateRequest.JSON_PROPERTY_MODEL, + AgentDefinitionCreateRequest.JSON_PROPERTY_MODEL_DETAILS, + AgentDefinitionCreateRequest.JSON_PROPERTY_WEBSOCKET_URL, + AgentDefinitionCreateRequest.JSON_PROPERTY_WEBSOCKET_HEADERS, + AgentDefinitionCreateRequest.JSON_PROPERTY_REPLAY_SESSION_ID, + AgentDefinitionCreateRequest.JSON_PROPERTY_LIVEKIT_URL, + AgentDefinitionCreateRequest.JSON_PROPERTY_LIVEKIT_API_KEY, + AgentDefinitionCreateRequest.JSON_PROPERTY_LIVEKIT_API_SECRET, + AgentDefinitionCreateRequest.JSON_PROPERTY_LIVEKIT_AGENT_NAME, + AgentDefinitionCreateRequest.JSON_PROPERTY_LIVEKIT_CONFIG_JSON, + AgentDefinitionCreateRequest.JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionCreateRequest { + public static final String JSON_PROPERTY_AGENT_NAME = "agent_name"; + @javax.annotation.Nonnull + private String agentName; + + /** + * The type of agent. One of: voice, text. + */ + public enum AgentTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + AgentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AgentTypeEnum fromValue(String value) { + for (AgentTypeEnum b : AgentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nonnull + private AgentTypeEnum agentType; + + public static final String JSON_PROPERTY_COMMIT_MESSAGE = "commit_message"; + @javax.annotation.Nonnull + private String commitMessage; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + @javax.annotation.Nullable + private Boolean inbound = true; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description = ""; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private JsonNullable provider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_API_KEY = "api_key"; + private JsonNullable apiKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ASSISTANT_ID = "assistant_id"; + private JsonNullable assistantId = JsonNullable.undefined(); + + /** + * Gets or Sets authenticationMethod + */ + public enum AuthenticationMethodEnum { + API_KEY(String.valueOf("api_key")); + + private String value; + + AuthenticationMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AuthenticationMethodEnum fromValue(String value) { + for (AuthenticationMethodEnum b : AuthenticationMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_AUTHENTICATION_METHOD = "authentication_method"; + private JsonNullable authenticationMethod = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private JsonNullable language = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGES = "languages"; + private JsonNullable> languages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CONTACT_NUMBER = "contact_number"; + private JsonNullable contactNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_KNOWLEDGE_BASE = "knowledge_base"; + private JsonNullable knowledgeBase = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OBSERVABILITY_ENABLED = "observability_enabled"; + @javax.annotation.Nullable + private Boolean observabilityEnabled = false; + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_DETAILS = "model_details"; + @javax.annotation.Nullable + private Map modelDetails = new HashMap<>(); + + public static final String JSON_PROPERTY_WEBSOCKET_URL = "websocket_url"; + private JsonNullable websocketUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEBSOCKET_HEADERS = "websocket_headers"; + @javax.annotation.Nullable + private Map websocketHeaders = new HashMap<>(); + + public static final String JSON_PROPERTY_REPLAY_SESSION_ID = "replay_session_id"; + private JsonNullable replaySessionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_URL = "livekit_url"; + private JsonNullable livekitUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_API_KEY = "livekit_api_key"; + private JsonNullable livekitApiKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_API_SECRET = "livekit_api_secret"; + private JsonNullable livekitApiSecret = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_AGENT_NAME = "livekit_agent_name"; + private JsonNullable livekitAgentName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_CONFIG_JSON = "livekit_config_json"; + @javax.annotation.Nullable + private Map livekitConfigJson = new HashMap<>(); + + public static final String JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY = "livekit_max_concurrency"; + private JsonNullable livekitMaxConcurrency = JsonNullable.undefined(); + + public AgentDefinitionCreateRequest() { + } + + public AgentDefinitionCreateRequest agentName(@javax.annotation.Nonnull String agentName) { + this.agentName = agentName; + return this; + } + + /** + * Get agentName + * @return agentName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAgentName() { + return agentName; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgentName(@javax.annotation.Nonnull String agentName) { + this.agentName = agentName; + } + + + public AgentDefinitionCreateRequest agentType(@javax.annotation.Nonnull AgentTypeEnum agentType) { + this.agentType = agentType; + return this; + } + + /** + * The type of agent. One of: voice, text. + * @return agentType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AgentTypeEnum getAgentType() { + return agentType; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgentType(@javax.annotation.Nonnull AgentTypeEnum agentType) { + this.agentType = agentType; + } + + + public AgentDefinitionCreateRequest commitMessage(@javax.annotation.Nonnull String commitMessage) { + this.commitMessage = commitMessage; + return this; + } + + /** + * Get commitMessage + * @return commitMessage + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCommitMessage() { + return commitMessage; + } + + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCommitMessage(@javax.annotation.Nonnull String commitMessage) { + this.commitMessage = commitMessage; + } + + + public AgentDefinitionCreateRequest inbound(@javax.annotation.Nullable Boolean inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInbound() { + return inbound; + } + + + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInbound(@javax.annotation.Nullable Boolean inbound) { + this.inbound = inbound; + } + + + public AgentDefinitionCreateRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AgentDefinitionCreateRequest provider(@javax.annotation.Nullable String provider) { + this.provider = JsonNullable.of(provider); + return this; + } + + /** + * Get provider + * @return provider + */ + @javax.annotation.Nullable + @JsonIgnore + public String getProvider() { + return provider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProvider_JsonNullable() { + return provider; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + public void setProvider_JsonNullable(JsonNullable provider) { + this.provider = provider; + } + + public void setProvider(@javax.annotation.Nullable String provider) { + this.provider = JsonNullable.of(provider); + } + + + public AgentDefinitionCreateRequest apiKey(@javax.annotation.Nullable String apiKey) { + this.apiKey = JsonNullable.of(apiKey); + return this; + } + + /** + * Get apiKey + * @return apiKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getApiKey() { + return apiKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getApiKey_JsonNullable() { + return apiKey; + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + public void setApiKey_JsonNullable(JsonNullable apiKey) { + this.apiKey = apiKey; + } + + public void setApiKey(@javax.annotation.Nullable String apiKey) { + this.apiKey = JsonNullable.of(apiKey); + } + + + public AgentDefinitionCreateRequest assistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + return this; + } + + /** + * Get assistantId + * @return assistantId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAssistantId() { + return assistantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssistantId_JsonNullable() { + return assistantId; + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + public void setAssistantId_JsonNullable(JsonNullable assistantId) { + this.assistantId = assistantId; + } + + public void setAssistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + } + + + public AgentDefinitionCreateRequest authenticationMethod(@javax.annotation.Nullable AuthenticationMethodEnum authenticationMethod) { + this.authenticationMethod = JsonNullable.of(authenticationMethod); + return this; + } + + /** + * Get authenticationMethod + * @return authenticationMethod + */ + @javax.annotation.Nullable + @JsonIgnore + public AuthenticationMethodEnum getAuthenticationMethod() { + return authenticationMethod.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAuthenticationMethod_JsonNullable() { + return authenticationMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + public void setAuthenticationMethod_JsonNullable(JsonNullable authenticationMethod) { + this.authenticationMethod = authenticationMethod; + } + + public void setAuthenticationMethod(@javax.annotation.Nullable AuthenticationMethodEnum authenticationMethod) { + this.authenticationMethod = JsonNullable.of(authenticationMethod); + } + + + public AgentDefinitionCreateRequest language(@javax.annotation.Nullable String language) { + this.language = JsonNullable.of(language); + return this; + } + + /** + * Get language + * @return language + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLanguage() { + return language.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLanguage_JsonNullable() { + return language; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + public void setLanguage_JsonNullable(JsonNullable language) { + this.language = language; + } + + public void setLanguage(@javax.annotation.Nullable String language) { + this.language = JsonNullable.of(language); + } + + + public AgentDefinitionCreateRequest languages(@javax.annotation.Nullable List languages) { + this.languages = JsonNullable.>of(languages); + return this; + } + + public AgentDefinitionCreateRequest addLanguagesItem(String languagesItem) { + if (this.languages == null || !this.languages.isPresent()) { + this.languages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.languages.get().add(languagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get languages + * @return languages + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLanguages() { + return languages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLanguages_JsonNullable() { + return languages; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + public void setLanguages_JsonNullable(JsonNullable> languages) { + this.languages = languages; + } + + public void setLanguages(@javax.annotation.Nullable List languages) { + this.languages = JsonNullable.>of(languages); + } + + + public AgentDefinitionCreateRequest contactNumber(@javax.annotation.Nullable String contactNumber) { + this.contactNumber = JsonNullable.of(contactNumber); + return this; + } + + /** + * Get contactNumber + * @return contactNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getContactNumber() { + return contactNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getContactNumber_JsonNullable() { + return contactNumber; + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + public void setContactNumber_JsonNullable(JsonNullable contactNumber) { + this.contactNumber = contactNumber; + } + + public void setContactNumber(@javax.annotation.Nullable String contactNumber) { + this.contactNumber = JsonNullable.of(contactNumber); + } + + + public AgentDefinitionCreateRequest knowledgeBase(@javax.annotation.Nullable UUID knowledgeBase) { + this.knowledgeBase = JsonNullable.of(knowledgeBase); + return this; + } + + /** + * Get knowledgeBase + * @return knowledgeBase + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKnowledgeBase() { + return knowledgeBase.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKnowledgeBase_JsonNullable() { + return knowledgeBase; + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + public void setKnowledgeBase_JsonNullable(JsonNullable knowledgeBase) { + this.knowledgeBase = knowledgeBase; + } + + public void setKnowledgeBase(@javax.annotation.Nullable UUID knowledgeBase) { + this.knowledgeBase = JsonNullable.of(knowledgeBase); + } + + + public AgentDefinitionCreateRequest observabilityEnabled(@javax.annotation.Nullable Boolean observabilityEnabled) { + this.observabilityEnabled = observabilityEnabled; + return this; + } + + /** + * Get observabilityEnabled + * @return observabilityEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getObservabilityEnabled() { + return observabilityEnabled; + } + + + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setObservabilityEnabled(@javax.annotation.Nullable Boolean observabilityEnabled) { + this.observabilityEnabled = observabilityEnabled; + } + + + public AgentDefinitionCreateRequest model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public AgentDefinitionCreateRequest modelDetails(@javax.annotation.Nullable Map modelDetails) { + this.modelDetails = modelDetails; + return this; + } + + public AgentDefinitionCreateRequest putModelDetailsItem(String key, Object modelDetailsItem) { + if (this.modelDetails == null) { + this.modelDetails = new HashMap<>(); + } + this.modelDetails.put(key, modelDetailsItem); + return this; + } + + /** + * Get modelDetails + * @return modelDetails + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModelDetails() { + return modelDetails; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setModelDetails(@javax.annotation.Nullable Map modelDetails) { + this.modelDetails = modelDetails; + } + + + public AgentDefinitionCreateRequest websocketUrl(@javax.annotation.Nullable URI websocketUrl) { + this.websocketUrl = JsonNullable.of(websocketUrl); + return this; + } + + /** + * Get websocketUrl + * @return websocketUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getWebsocketUrl() { + return websocketUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebsocketUrl_JsonNullable() { + return websocketUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + public void setWebsocketUrl_JsonNullable(JsonNullable websocketUrl) { + this.websocketUrl = websocketUrl; + } + + public void setWebsocketUrl(@javax.annotation.Nullable URI websocketUrl) { + this.websocketUrl = JsonNullable.of(websocketUrl); + } + + + public AgentDefinitionCreateRequest websocketHeaders(@javax.annotation.Nullable Map websocketHeaders) { + this.websocketHeaders = websocketHeaders; + return this; + } + + public AgentDefinitionCreateRequest putWebsocketHeadersItem(String key, Object websocketHeadersItem) { + if (this.websocketHeaders == null) { + this.websocketHeaders = new HashMap<>(); + } + this.websocketHeaders.put(key, websocketHeadersItem); + return this; + } + + /** + * Get websocketHeaders + * @return websocketHeaders + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getWebsocketHeaders() { + return websocketHeaders; + } + + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsocketHeaders(@javax.annotation.Nullable Map websocketHeaders) { + this.websocketHeaders = websocketHeaders; + } + + + public AgentDefinitionCreateRequest replaySessionId(@javax.annotation.Nullable UUID replaySessionId) { + this.replaySessionId = JsonNullable.of(replaySessionId); + return this; + } + + /** + * Get replaySessionId + * @return replaySessionId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getReplaySessionId() { + return replaySessionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REPLAY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReplaySessionId_JsonNullable() { + return replaySessionId; + } + + @JsonProperty(JSON_PROPERTY_REPLAY_SESSION_ID) + public void setReplaySessionId_JsonNullable(JsonNullable replaySessionId) { + this.replaySessionId = replaySessionId; + } + + public void setReplaySessionId(@javax.annotation.Nullable UUID replaySessionId) { + this.replaySessionId = JsonNullable.of(replaySessionId); + } + + + public AgentDefinitionCreateRequest livekitUrl(@javax.annotation.Nullable String livekitUrl) { + this.livekitUrl = JsonNullable.of(livekitUrl); + return this; + } + + /** + * Get livekitUrl + * @return livekitUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitUrl() { + return livekitUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitUrl_JsonNullable() { + return livekitUrl; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) + public void setLivekitUrl_JsonNullable(JsonNullable livekitUrl) { + this.livekitUrl = livekitUrl; + } + + public void setLivekitUrl(@javax.annotation.Nullable String livekitUrl) { + this.livekitUrl = JsonNullable.of(livekitUrl); + } + + + public AgentDefinitionCreateRequest livekitApiKey(@javax.annotation.Nullable String livekitApiKey) { + this.livekitApiKey = JsonNullable.of(livekitApiKey); + return this; + } + + /** + * Get livekitApiKey + * @return livekitApiKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitApiKey() { + return livekitApiKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitApiKey_JsonNullable() { + return livekitApiKey; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) + public void setLivekitApiKey_JsonNullable(JsonNullable livekitApiKey) { + this.livekitApiKey = livekitApiKey; + } + + public void setLivekitApiKey(@javax.annotation.Nullable String livekitApiKey) { + this.livekitApiKey = JsonNullable.of(livekitApiKey); + } + + + public AgentDefinitionCreateRequest livekitApiSecret(@javax.annotation.Nullable String livekitApiSecret) { + this.livekitApiSecret = JsonNullable.of(livekitApiSecret); + return this; + } + + /** + * Get livekitApiSecret + * @return livekitApiSecret + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitApiSecret() { + return livekitApiSecret.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitApiSecret_JsonNullable() { + return livekitApiSecret; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_SECRET) + public void setLivekitApiSecret_JsonNullable(JsonNullable livekitApiSecret) { + this.livekitApiSecret = livekitApiSecret; + } + + public void setLivekitApiSecret(@javax.annotation.Nullable String livekitApiSecret) { + this.livekitApiSecret = JsonNullable.of(livekitApiSecret); + } + + + public AgentDefinitionCreateRequest livekitAgentName(@javax.annotation.Nullable String livekitAgentName) { + this.livekitAgentName = JsonNullable.of(livekitAgentName); + return this; + } + + /** + * Get livekitAgentName + * @return livekitAgentName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitAgentName() { + return livekitAgentName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitAgentName_JsonNullable() { + return livekitAgentName; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) + public void setLivekitAgentName_JsonNullable(JsonNullable livekitAgentName) { + this.livekitAgentName = livekitAgentName; + } + + public void setLivekitAgentName(@javax.annotation.Nullable String livekitAgentName) { + this.livekitAgentName = JsonNullable.of(livekitAgentName); + } + + + public AgentDefinitionCreateRequest livekitConfigJson(@javax.annotation.Nullable Map livekitConfigJson) { + this.livekitConfigJson = livekitConfigJson; + return this; + } + + public AgentDefinitionCreateRequest putLivekitConfigJsonItem(String key, Object livekitConfigJsonItem) { + if (this.livekitConfigJson == null) { + this.livekitConfigJson = new HashMap<>(); + } + this.livekitConfigJson.put(key, livekitConfigJsonItem); + return this; + } + + /** + * Get livekitConfigJson + * @return livekitConfigJson + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLivekitConfigJson() { + return livekitConfigJson; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitConfigJson(@javax.annotation.Nullable Map livekitConfigJson) { + this.livekitConfigJson = livekitConfigJson; + } + + + public AgentDefinitionCreateRequest livekitMaxConcurrency(@javax.annotation.Nullable Integer livekitMaxConcurrency) { + this.livekitMaxConcurrency = JsonNullable.of(livekitMaxConcurrency); + return this; + } + + /** + * Get livekitMaxConcurrency + * minimum: 1 + * @return livekitMaxConcurrency + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getLivekitMaxConcurrency() { + return livekitMaxConcurrency.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitMaxConcurrency_JsonNullable() { + return livekitMaxConcurrency; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) + public void setLivekitMaxConcurrency_JsonNullable(JsonNullable livekitMaxConcurrency) { + this.livekitMaxConcurrency = livekitMaxConcurrency; + } + + public void setLivekitMaxConcurrency(@javax.annotation.Nullable Integer livekitMaxConcurrency) { + this.livekitMaxConcurrency = JsonNullable.of(livekitMaxConcurrency); + } + + + /** + * Return true if this AgentDefinitionCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionCreateRequest agentDefinitionCreateRequest = (AgentDefinitionCreateRequest) o; + return Objects.equals(this.agentName, agentDefinitionCreateRequest.agentName) && + Objects.equals(this.agentType, agentDefinitionCreateRequest.agentType) && + Objects.equals(this.commitMessage, agentDefinitionCreateRequest.commitMessage) && + Objects.equals(this.inbound, agentDefinitionCreateRequest.inbound) && + Objects.equals(this.description, agentDefinitionCreateRequest.description) && + equalsNullable(this.provider, agentDefinitionCreateRequest.provider) && + equalsNullable(this.apiKey, agentDefinitionCreateRequest.apiKey) && + equalsNullable(this.assistantId, agentDefinitionCreateRequest.assistantId) && + equalsNullable(this.authenticationMethod, agentDefinitionCreateRequest.authenticationMethod) && + equalsNullable(this.language, agentDefinitionCreateRequest.language) && + equalsNullable(this.languages, agentDefinitionCreateRequest.languages) && + equalsNullable(this.contactNumber, agentDefinitionCreateRequest.contactNumber) && + equalsNullable(this.knowledgeBase, agentDefinitionCreateRequest.knowledgeBase) && + Objects.equals(this.observabilityEnabled, agentDefinitionCreateRequest.observabilityEnabled) && + equalsNullable(this.model, agentDefinitionCreateRequest.model) && + Objects.equals(this.modelDetails, agentDefinitionCreateRequest.modelDetails) && + equalsNullable(this.websocketUrl, agentDefinitionCreateRequest.websocketUrl) && + Objects.equals(this.websocketHeaders, agentDefinitionCreateRequest.websocketHeaders) && + equalsNullable(this.replaySessionId, agentDefinitionCreateRequest.replaySessionId) && + equalsNullable(this.livekitUrl, agentDefinitionCreateRequest.livekitUrl) && + equalsNullable(this.livekitApiKey, agentDefinitionCreateRequest.livekitApiKey) && + equalsNullable(this.livekitApiSecret, agentDefinitionCreateRequest.livekitApiSecret) && + equalsNullable(this.livekitAgentName, agentDefinitionCreateRequest.livekitAgentName) && + Objects.equals(this.livekitConfigJson, agentDefinitionCreateRequest.livekitConfigJson) && + equalsNullable(this.livekitMaxConcurrency, agentDefinitionCreateRequest.livekitMaxConcurrency); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(agentName, agentType, commitMessage, inbound, description, hashCodeNullable(provider), hashCodeNullable(apiKey), hashCodeNullable(assistantId), hashCodeNullable(authenticationMethod), hashCodeNullable(language), hashCodeNullable(languages), hashCodeNullable(contactNumber), hashCodeNullable(knowledgeBase), observabilityEnabled, hashCodeNullable(model), modelDetails, hashCodeNullable(websocketUrl), websocketHeaders, hashCodeNullable(replaySessionId), hashCodeNullable(livekitUrl), hashCodeNullable(livekitApiKey), hashCodeNullable(livekitApiSecret), hashCodeNullable(livekitAgentName), livekitConfigJson, hashCodeNullable(livekitMaxConcurrency)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionCreateRequest {\n"); + sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" commitMessage: ").append(toIndentedString(commitMessage)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" assistantId: ").append(toIndentedString(assistantId)).append("\n"); + sb.append(" authenticationMethod: ").append(toIndentedString(authenticationMethod)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" contactNumber: ").append(toIndentedString(contactNumber)).append("\n"); + sb.append(" knowledgeBase: ").append(toIndentedString(knowledgeBase)).append("\n"); + sb.append(" observabilityEnabled: ").append(toIndentedString(observabilityEnabled)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelDetails: ").append(toIndentedString(modelDetails)).append("\n"); + sb.append(" websocketUrl: ").append(toIndentedString(websocketUrl)).append("\n"); + sb.append(" websocketHeaders: ").append(toIndentedString(websocketHeaders)).append("\n"); + sb.append(" replaySessionId: ").append(toIndentedString(replaySessionId)).append("\n"); + sb.append(" livekitUrl: ").append(toIndentedString(livekitUrl)).append("\n"); + sb.append(" livekitApiKey: ").append(toIndentedString(livekitApiKey)).append("\n"); + sb.append(" livekitApiSecret: ").append(toIndentedString(livekitApiSecret)).append("\n"); + sb.append(" livekitAgentName: ").append(toIndentedString(livekitAgentName)).append("\n"); + sb.append(" livekitConfigJson: ").append(toIndentedString(livekitConfigJson)).append("\n"); + sb.append(" livekitMaxConcurrency: ").append(toIndentedString(livekitMaxConcurrency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `agent_name` to the URL query string + if (getAgentName() != null) { + joiner.add(String.format("%sagent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentName())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `commit_message` to the URL query string + if (getCommitMessage() != null) { + joiner.add(String.format("%scommit_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCommitMessage())))); + } + + // add `inbound` to the URL query string + if (getInbound() != null) { + joiner.add(String.format("%sinbound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInbound())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `api_key` to the URL query string + if (getApiKey() != null) { + joiner.add(String.format("%sapi_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApiKey())))); + } + + // add `assistant_id` to the URL query string + if (getAssistantId() != null) { + joiner.add(String.format("%sassistant_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssistantId())))); + } + + // add `authentication_method` to the URL query string + if (getAuthenticationMethod() != null) { + joiner.add(String.format("%sauthentication_method%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAuthenticationMethod())))); + } + + // add `language` to the URL query string + if (getLanguage() != null) { + joiner.add(String.format("%slanguage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguage())))); + } + + // add `languages` to the URL query string + if (getLanguages() != null) { + for (int i = 0; i < getLanguages().size(); i++) { + joiner.add(String.format("%slanguages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLanguages().get(i))))); + } + } + + // add `contact_number` to the URL query string + if (getContactNumber() != null) { + joiner.add(String.format("%scontact_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContactNumber())))); + } + + // add `knowledge_base` to the URL query string + if (getKnowledgeBase() != null) { + joiner.add(String.format("%sknowledge_base%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKnowledgeBase())))); + } + + // add `observability_enabled` to the URL query string + if (getObservabilityEnabled() != null) { + joiner.add(String.format("%sobservability_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getObservabilityEnabled())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `model_details` to the URL query string + if (getModelDetails() != null) { + for (String _key : getModelDetails().keySet()) { + joiner.add(String.format("%smodel_details%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModelDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModelDetails().get(_key))))); + } + } + + // add `websocket_url` to the URL query string + if (getWebsocketUrl() != null) { + joiner.add(String.format("%swebsocket_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWebsocketUrl())))); + } + + // add `websocket_headers` to the URL query string + if (getWebsocketHeaders() != null) { + for (String _key : getWebsocketHeaders().keySet()) { + joiner.add(String.format("%swebsocket_headers%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getWebsocketHeaders().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getWebsocketHeaders().get(_key))))); + } + } + + // add `replay_session_id` to the URL query string + if (getReplaySessionId() != null) { + joiner.add(String.format("%sreplay_session_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReplaySessionId())))); + } + + // add `livekit_url` to the URL query string + if (getLivekitUrl() != null) { + joiner.add(String.format("%slivekit_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitUrl())))); + } + + // add `livekit_api_key` to the URL query string + if (getLivekitApiKey() != null) { + joiner.add(String.format("%slivekit_api_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitApiKey())))); + } + + // add `livekit_api_secret` to the URL query string + if (getLivekitApiSecret() != null) { + joiner.add(String.format("%slivekit_api_secret%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitApiSecret())))); + } + + // add `livekit_agent_name` to the URL query string + if (getLivekitAgentName() != null) { + joiner.add(String.format("%slivekit_agent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitAgentName())))); + } + + // add `livekit_config_json` to the URL query string + if (getLivekitConfigJson() != null) { + for (String _key : getLivekitConfigJson().keySet()) { + joiner.add(String.format("%slivekit_config_json%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLivekitConfigJson().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLivekitConfigJson().get(_key))))); + } + } + + // add `livekit_max_concurrency` to the URL query string + if (getLivekitMaxConcurrency() != null) { + joiner.add(String.format("%slivekit_max_concurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitMaxConcurrency())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateResponse.java new file mode 100644 index 0000000..18d9413 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionCreateResponse.java @@ -0,0 +1,186 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AgentDefinitionResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionCreateResponse + */ +@JsonPropertyOrder({ + AgentDefinitionCreateResponse.JSON_PROPERTY_MESSAGE, + AgentDefinitionCreateResponse.JSON_PROPERTY_AGENT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionCreateResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_AGENT = "agent"; + @javax.annotation.Nullable + private AgentDefinitionResponse agent; + + public AgentDefinitionCreateResponse() { + } + + @JsonCreator + public AgentDefinitionCreateResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + public AgentDefinitionCreateResponse agent(@javax.annotation.Nullable AgentDefinitionResponse agent) { + this.agent = agent; + return this; + } + + /** + * Get agent + * @return agent + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentDefinitionResponse getAgent() { + return agent; + } + + + @JsonProperty(JSON_PROPERTY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgent(@javax.annotation.Nullable AgentDefinitionResponse agent) { + this.agent = agent; + } + + + /** + * Return true if this AgentDefinitionCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionCreateResponse agentDefinitionCreateResponse = (AgentDefinitionCreateResponse) o; + return Objects.equals(this.message, agentDefinitionCreateResponse.message) && + Objects.equals(this.agent, agentDefinitionCreateResponse.agent); + } + + @Override + public int hashCode() { + return Objects.hash(message, agent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionCreateResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" agent: ").append(toIndentedString(agent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `agent` to the URL query string + if (getAgent() != null) { + joiner.add(getAgent().toUrlQueryString(prefix + "agent" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionDeleteResponse.java new file mode 100644 index 0000000..b841392 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionDeleteResponse.java @@ -0,0 +1,149 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionDeleteResponse + */ +@JsonPropertyOrder({ + AgentDefinitionDeleteResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionDeleteResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public AgentDefinitionDeleteResponse() { + } + + @JsonCreator + public AgentDefinitionDeleteResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Return true if this AgentDefinitionDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionDeleteResponse agentDefinitionDeleteResponse = (AgentDefinitionDeleteResponse) o; + return Objects.equals(this.message, agentDefinitionDeleteResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditRequest.java new file mode 100644 index 0000000..b1b6afd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditRequest.java @@ -0,0 +1,1161 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionEditRequest + */ +@JsonPropertyOrder({ + AgentDefinitionEditRequest.JSON_PROPERTY_AGENT_NAME, + AgentDefinitionEditRequest.JSON_PROPERTY_AGENT_TYPE, + AgentDefinitionEditRequest.JSON_PROPERTY_DESCRIPTION, + AgentDefinitionEditRequest.JSON_PROPERTY_PROVIDER, + AgentDefinitionEditRequest.JSON_PROPERTY_API_KEY, + AgentDefinitionEditRequest.JSON_PROPERTY_ASSISTANT_ID, + AgentDefinitionEditRequest.JSON_PROPERTY_AUTHENTICATION_METHOD, + AgentDefinitionEditRequest.JSON_PROPERTY_LANGUAGE, + AgentDefinitionEditRequest.JSON_PROPERTY_LANGUAGES, + AgentDefinitionEditRequest.JSON_PROPERTY_CONTACT_NUMBER, + AgentDefinitionEditRequest.JSON_PROPERTY_INBOUND, + AgentDefinitionEditRequest.JSON_PROPERTY_KNOWLEDGE_BASE, + AgentDefinitionEditRequest.JSON_PROPERTY_MODEL, + AgentDefinitionEditRequest.JSON_PROPERTY_MODEL_DETAILS, + AgentDefinitionEditRequest.JSON_PROPERTY_WEBSOCKET_URL, + AgentDefinitionEditRequest.JSON_PROPERTY_WEBSOCKET_HEADERS, + AgentDefinitionEditRequest.JSON_PROPERTY_LIVEKIT_URL, + AgentDefinitionEditRequest.JSON_PROPERTY_LIVEKIT_API_KEY, + AgentDefinitionEditRequest.JSON_PROPERTY_LIVEKIT_API_SECRET, + AgentDefinitionEditRequest.JSON_PROPERTY_LIVEKIT_AGENT_NAME, + AgentDefinitionEditRequest.JSON_PROPERTY_LIVEKIT_CONFIG_JSON, + AgentDefinitionEditRequest.JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionEditRequest { + public static final String JSON_PROPERTY_AGENT_NAME = "agent_name"; + @javax.annotation.Nullable + private String agentName; + + /** + * Gets or Sets agentType + */ + public enum AgentTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + AgentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AgentTypeEnum fromValue(String value) { + for (AgentTypeEnum b : AgentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private AgentTypeEnum agentType; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private JsonNullable provider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_API_KEY = "api_key"; + private JsonNullable apiKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ASSISTANT_ID = "assistant_id"; + private JsonNullable assistantId = JsonNullable.undefined(); + + /** + * Gets or Sets authenticationMethod + */ + public enum AuthenticationMethodEnum { + API_KEY(String.valueOf("api_key")); + + private String value; + + AuthenticationMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AuthenticationMethodEnum fromValue(String value) { + for (AuthenticationMethodEnum b : AuthenticationMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_AUTHENTICATION_METHOD = "authentication_method"; + private JsonNullable authenticationMethod = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private JsonNullable language = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGES = "languages"; + private JsonNullable> languages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CONTACT_NUMBER = "contact_number"; + private JsonNullable contactNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + @javax.annotation.Nullable + private Boolean inbound; + + public static final String JSON_PROPERTY_KNOWLEDGE_BASE = "knowledge_base"; + private JsonNullable knowledgeBase = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_DETAILS = "model_details"; + @javax.annotation.Nullable + private Map modelDetails = new HashMap<>(); + + public static final String JSON_PROPERTY_WEBSOCKET_URL = "websocket_url"; + private JsonNullable websocketUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEBSOCKET_HEADERS = "websocket_headers"; + @javax.annotation.Nullable + private Map websocketHeaders = new HashMap<>(); + + public static final String JSON_PROPERTY_LIVEKIT_URL = "livekit_url"; + private JsonNullable livekitUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_API_KEY = "livekit_api_key"; + private JsonNullable livekitApiKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_API_SECRET = "livekit_api_secret"; + private JsonNullable livekitApiSecret = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_AGENT_NAME = "livekit_agent_name"; + private JsonNullable livekitAgentName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIVEKIT_CONFIG_JSON = "livekit_config_json"; + @javax.annotation.Nullable + private Map livekitConfigJson = new HashMap<>(); + + public static final String JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY = "livekit_max_concurrency"; + private JsonNullable livekitMaxConcurrency = JsonNullable.undefined(); + + public AgentDefinitionEditRequest() { + } + + public AgentDefinitionEditRequest agentName(@javax.annotation.Nullable String agentName) { + this.agentName = agentName; + return this; + } + + /** + * Get agentName + * @return agentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentName() { + return agentName; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentName(@javax.annotation.Nullable String agentName) { + this.agentName = agentName; + } + + + public AgentDefinitionEditRequest agentType(@javax.annotation.Nullable AgentTypeEnum agentType) { + this.agentType = agentType; + return this; + } + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentTypeEnum getAgentType() { + return agentType; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentType(@javax.annotation.Nullable AgentTypeEnum agentType) { + this.agentType = agentType; + } + + + public AgentDefinitionEditRequest description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AgentDefinitionEditRequest provider(@javax.annotation.Nullable String provider) { + this.provider = JsonNullable.of(provider); + return this; + } + + /** + * Get provider + * @return provider + */ + @javax.annotation.Nullable + @JsonIgnore + public String getProvider() { + return provider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProvider_JsonNullable() { + return provider; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + public void setProvider_JsonNullable(JsonNullable provider) { + this.provider = provider; + } + + public void setProvider(@javax.annotation.Nullable String provider) { + this.provider = JsonNullable.of(provider); + } + + + public AgentDefinitionEditRequest apiKey(@javax.annotation.Nullable String apiKey) { + this.apiKey = JsonNullable.of(apiKey); + return this; + } + + /** + * Get apiKey + * @return apiKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getApiKey() { + return apiKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getApiKey_JsonNullable() { + return apiKey; + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + public void setApiKey_JsonNullable(JsonNullable apiKey) { + this.apiKey = apiKey; + } + + public void setApiKey(@javax.annotation.Nullable String apiKey) { + this.apiKey = JsonNullable.of(apiKey); + } + + + public AgentDefinitionEditRequest assistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + return this; + } + + /** + * Get assistantId + * @return assistantId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAssistantId() { + return assistantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssistantId_JsonNullable() { + return assistantId; + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + public void setAssistantId_JsonNullable(JsonNullable assistantId) { + this.assistantId = assistantId; + } + + public void setAssistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + } + + + public AgentDefinitionEditRequest authenticationMethod(@javax.annotation.Nullable AuthenticationMethodEnum authenticationMethod) { + this.authenticationMethod = JsonNullable.of(authenticationMethod); + return this; + } + + /** + * Get authenticationMethod + * @return authenticationMethod + */ + @javax.annotation.Nullable + @JsonIgnore + public AuthenticationMethodEnum getAuthenticationMethod() { + return authenticationMethod.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAuthenticationMethod_JsonNullable() { + return authenticationMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + public void setAuthenticationMethod_JsonNullable(JsonNullable authenticationMethod) { + this.authenticationMethod = authenticationMethod; + } + + public void setAuthenticationMethod(@javax.annotation.Nullable AuthenticationMethodEnum authenticationMethod) { + this.authenticationMethod = JsonNullable.of(authenticationMethod); + } + + + public AgentDefinitionEditRequest language(@javax.annotation.Nullable String language) { + this.language = JsonNullable.of(language); + return this; + } + + /** + * Get language + * @return language + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLanguage() { + return language.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLanguage_JsonNullable() { + return language; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + public void setLanguage_JsonNullable(JsonNullable language) { + this.language = language; + } + + public void setLanguage(@javax.annotation.Nullable String language) { + this.language = JsonNullable.of(language); + } + + + public AgentDefinitionEditRequest languages(@javax.annotation.Nullable List languages) { + this.languages = JsonNullable.>of(languages); + return this; + } + + public AgentDefinitionEditRequest addLanguagesItem(String languagesItem) { + if (this.languages == null || !this.languages.isPresent()) { + this.languages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.languages.get().add(languagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get languages + * @return languages + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLanguages() { + return languages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLanguages_JsonNullable() { + return languages; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + public void setLanguages_JsonNullable(JsonNullable> languages) { + this.languages = languages; + } + + public void setLanguages(@javax.annotation.Nullable List languages) { + this.languages = JsonNullable.>of(languages); + } + + + public AgentDefinitionEditRequest contactNumber(@javax.annotation.Nullable String contactNumber) { + this.contactNumber = JsonNullable.of(contactNumber); + return this; + } + + /** + * Get contactNumber + * @return contactNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getContactNumber() { + return contactNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getContactNumber_JsonNullable() { + return contactNumber; + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + public void setContactNumber_JsonNullable(JsonNullable contactNumber) { + this.contactNumber = contactNumber; + } + + public void setContactNumber(@javax.annotation.Nullable String contactNumber) { + this.contactNumber = JsonNullable.of(contactNumber); + } + + + public AgentDefinitionEditRequest inbound(@javax.annotation.Nullable Boolean inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInbound() { + return inbound; + } + + + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInbound(@javax.annotation.Nullable Boolean inbound) { + this.inbound = inbound; + } + + + public AgentDefinitionEditRequest knowledgeBase(@javax.annotation.Nullable UUID knowledgeBase) { + this.knowledgeBase = JsonNullable.of(knowledgeBase); + return this; + } + + /** + * Get knowledgeBase + * @return knowledgeBase + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKnowledgeBase() { + return knowledgeBase.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKnowledgeBase_JsonNullable() { + return knowledgeBase; + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + public void setKnowledgeBase_JsonNullable(JsonNullable knowledgeBase) { + this.knowledgeBase = knowledgeBase; + } + + public void setKnowledgeBase(@javax.annotation.Nullable UUID knowledgeBase) { + this.knowledgeBase = JsonNullable.of(knowledgeBase); + } + + + public AgentDefinitionEditRequest model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public AgentDefinitionEditRequest modelDetails(@javax.annotation.Nullable Map modelDetails) { + this.modelDetails = modelDetails; + return this; + } + + public AgentDefinitionEditRequest putModelDetailsItem(String key, Object modelDetailsItem) { + if (this.modelDetails == null) { + this.modelDetails = new HashMap<>(); + } + this.modelDetails.put(key, modelDetailsItem); + return this; + } + + /** + * Get modelDetails + * @return modelDetails + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModelDetails() { + return modelDetails; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setModelDetails(@javax.annotation.Nullable Map modelDetails) { + this.modelDetails = modelDetails; + } + + + public AgentDefinitionEditRequest websocketUrl(@javax.annotation.Nullable URI websocketUrl) { + this.websocketUrl = JsonNullable.of(websocketUrl); + return this; + } + + /** + * Get websocketUrl + * @return websocketUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getWebsocketUrl() { + return websocketUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebsocketUrl_JsonNullable() { + return websocketUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + public void setWebsocketUrl_JsonNullable(JsonNullable websocketUrl) { + this.websocketUrl = websocketUrl; + } + + public void setWebsocketUrl(@javax.annotation.Nullable URI websocketUrl) { + this.websocketUrl = JsonNullable.of(websocketUrl); + } + + + public AgentDefinitionEditRequest websocketHeaders(@javax.annotation.Nullable Map websocketHeaders) { + this.websocketHeaders = websocketHeaders; + return this; + } + + public AgentDefinitionEditRequest putWebsocketHeadersItem(String key, Object websocketHeadersItem) { + if (this.websocketHeaders == null) { + this.websocketHeaders = new HashMap<>(); + } + this.websocketHeaders.put(key, websocketHeadersItem); + return this; + } + + /** + * Get websocketHeaders + * @return websocketHeaders + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getWebsocketHeaders() { + return websocketHeaders; + } + + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsocketHeaders(@javax.annotation.Nullable Map websocketHeaders) { + this.websocketHeaders = websocketHeaders; + } + + + public AgentDefinitionEditRequest livekitUrl(@javax.annotation.Nullable String livekitUrl) { + this.livekitUrl = JsonNullable.of(livekitUrl); + return this; + } + + /** + * Get livekitUrl + * @return livekitUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitUrl() { + return livekitUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitUrl_JsonNullable() { + return livekitUrl; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) + public void setLivekitUrl_JsonNullable(JsonNullable livekitUrl) { + this.livekitUrl = livekitUrl; + } + + public void setLivekitUrl(@javax.annotation.Nullable String livekitUrl) { + this.livekitUrl = JsonNullable.of(livekitUrl); + } + + + public AgentDefinitionEditRequest livekitApiKey(@javax.annotation.Nullable String livekitApiKey) { + this.livekitApiKey = JsonNullable.of(livekitApiKey); + return this; + } + + /** + * Get livekitApiKey + * @return livekitApiKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitApiKey() { + return livekitApiKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitApiKey_JsonNullable() { + return livekitApiKey; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) + public void setLivekitApiKey_JsonNullable(JsonNullable livekitApiKey) { + this.livekitApiKey = livekitApiKey; + } + + public void setLivekitApiKey(@javax.annotation.Nullable String livekitApiKey) { + this.livekitApiKey = JsonNullable.of(livekitApiKey); + } + + + public AgentDefinitionEditRequest livekitApiSecret(@javax.annotation.Nullable String livekitApiSecret) { + this.livekitApiSecret = JsonNullable.of(livekitApiSecret); + return this; + } + + /** + * Get livekitApiSecret + * @return livekitApiSecret + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitApiSecret() { + return livekitApiSecret.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitApiSecret_JsonNullable() { + return livekitApiSecret; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_SECRET) + public void setLivekitApiSecret_JsonNullable(JsonNullable livekitApiSecret) { + this.livekitApiSecret = livekitApiSecret; + } + + public void setLivekitApiSecret(@javax.annotation.Nullable String livekitApiSecret) { + this.livekitApiSecret = JsonNullable.of(livekitApiSecret); + } + + + public AgentDefinitionEditRequest livekitAgentName(@javax.annotation.Nullable String livekitAgentName) { + this.livekitAgentName = JsonNullable.of(livekitAgentName); + return this; + } + + /** + * Get livekitAgentName + * @return livekitAgentName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLivekitAgentName() { + return livekitAgentName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitAgentName_JsonNullable() { + return livekitAgentName; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) + public void setLivekitAgentName_JsonNullable(JsonNullable livekitAgentName) { + this.livekitAgentName = livekitAgentName; + } + + public void setLivekitAgentName(@javax.annotation.Nullable String livekitAgentName) { + this.livekitAgentName = JsonNullable.of(livekitAgentName); + } + + + public AgentDefinitionEditRequest livekitConfigJson(@javax.annotation.Nullable Map livekitConfigJson) { + this.livekitConfigJson = livekitConfigJson; + return this; + } + + public AgentDefinitionEditRequest putLivekitConfigJsonItem(String key, Object livekitConfigJsonItem) { + if (this.livekitConfigJson == null) { + this.livekitConfigJson = new HashMap<>(); + } + this.livekitConfigJson.put(key, livekitConfigJsonItem); + return this; + } + + /** + * Get livekitConfigJson + * @return livekitConfigJson + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLivekitConfigJson() { + return livekitConfigJson; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitConfigJson(@javax.annotation.Nullable Map livekitConfigJson) { + this.livekitConfigJson = livekitConfigJson; + } + + + public AgentDefinitionEditRequest livekitMaxConcurrency(@javax.annotation.Nullable Integer livekitMaxConcurrency) { + this.livekitMaxConcurrency = JsonNullable.of(livekitMaxConcurrency); + return this; + } + + /** + * Get livekitMaxConcurrency + * minimum: 1 + * @return livekitMaxConcurrency + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getLivekitMaxConcurrency() { + return livekitMaxConcurrency.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLivekitMaxConcurrency_JsonNullable() { + return livekitMaxConcurrency; + } + + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) + public void setLivekitMaxConcurrency_JsonNullable(JsonNullable livekitMaxConcurrency) { + this.livekitMaxConcurrency = livekitMaxConcurrency; + } + + public void setLivekitMaxConcurrency(@javax.annotation.Nullable Integer livekitMaxConcurrency) { + this.livekitMaxConcurrency = JsonNullable.of(livekitMaxConcurrency); + } + + + /** + * Return true if this AgentDefinitionEditRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionEditRequest agentDefinitionEditRequest = (AgentDefinitionEditRequest) o; + return Objects.equals(this.agentName, agentDefinitionEditRequest.agentName) && + Objects.equals(this.agentType, agentDefinitionEditRequest.agentType) && + equalsNullable(this.description, agentDefinitionEditRequest.description) && + equalsNullable(this.provider, agentDefinitionEditRequest.provider) && + equalsNullable(this.apiKey, agentDefinitionEditRequest.apiKey) && + equalsNullable(this.assistantId, agentDefinitionEditRequest.assistantId) && + equalsNullable(this.authenticationMethod, agentDefinitionEditRequest.authenticationMethod) && + equalsNullable(this.language, agentDefinitionEditRequest.language) && + equalsNullable(this.languages, agentDefinitionEditRequest.languages) && + equalsNullable(this.contactNumber, agentDefinitionEditRequest.contactNumber) && + Objects.equals(this.inbound, agentDefinitionEditRequest.inbound) && + equalsNullable(this.knowledgeBase, agentDefinitionEditRequest.knowledgeBase) && + equalsNullable(this.model, agentDefinitionEditRequest.model) && + Objects.equals(this.modelDetails, agentDefinitionEditRequest.modelDetails) && + equalsNullable(this.websocketUrl, agentDefinitionEditRequest.websocketUrl) && + Objects.equals(this.websocketHeaders, agentDefinitionEditRequest.websocketHeaders) && + equalsNullable(this.livekitUrl, agentDefinitionEditRequest.livekitUrl) && + equalsNullable(this.livekitApiKey, agentDefinitionEditRequest.livekitApiKey) && + equalsNullable(this.livekitApiSecret, agentDefinitionEditRequest.livekitApiSecret) && + equalsNullable(this.livekitAgentName, agentDefinitionEditRequest.livekitAgentName) && + Objects.equals(this.livekitConfigJson, agentDefinitionEditRequest.livekitConfigJson) && + equalsNullable(this.livekitMaxConcurrency, agentDefinitionEditRequest.livekitMaxConcurrency); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(agentName, agentType, hashCodeNullable(description), hashCodeNullable(provider), hashCodeNullable(apiKey), hashCodeNullable(assistantId), hashCodeNullable(authenticationMethod), hashCodeNullable(language), hashCodeNullable(languages), hashCodeNullable(contactNumber), inbound, hashCodeNullable(knowledgeBase), hashCodeNullable(model), modelDetails, hashCodeNullable(websocketUrl), websocketHeaders, hashCodeNullable(livekitUrl), hashCodeNullable(livekitApiKey), hashCodeNullable(livekitApiSecret), hashCodeNullable(livekitAgentName), livekitConfigJson, hashCodeNullable(livekitMaxConcurrency)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionEditRequest {\n"); + sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" assistantId: ").append(toIndentedString(assistantId)).append("\n"); + sb.append(" authenticationMethod: ").append(toIndentedString(authenticationMethod)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" contactNumber: ").append(toIndentedString(contactNumber)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" knowledgeBase: ").append(toIndentedString(knowledgeBase)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelDetails: ").append(toIndentedString(modelDetails)).append("\n"); + sb.append(" websocketUrl: ").append(toIndentedString(websocketUrl)).append("\n"); + sb.append(" websocketHeaders: ").append(toIndentedString(websocketHeaders)).append("\n"); + sb.append(" livekitUrl: ").append(toIndentedString(livekitUrl)).append("\n"); + sb.append(" livekitApiKey: ").append(toIndentedString(livekitApiKey)).append("\n"); + sb.append(" livekitApiSecret: ").append(toIndentedString(livekitApiSecret)).append("\n"); + sb.append(" livekitAgentName: ").append(toIndentedString(livekitAgentName)).append("\n"); + sb.append(" livekitConfigJson: ").append(toIndentedString(livekitConfigJson)).append("\n"); + sb.append(" livekitMaxConcurrency: ").append(toIndentedString(livekitMaxConcurrency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `agent_name` to the URL query string + if (getAgentName() != null) { + joiner.add(String.format("%sagent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentName())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `api_key` to the URL query string + if (getApiKey() != null) { + joiner.add(String.format("%sapi_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApiKey())))); + } + + // add `assistant_id` to the URL query string + if (getAssistantId() != null) { + joiner.add(String.format("%sassistant_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssistantId())))); + } + + // add `authentication_method` to the URL query string + if (getAuthenticationMethod() != null) { + joiner.add(String.format("%sauthentication_method%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAuthenticationMethod())))); + } + + // add `language` to the URL query string + if (getLanguage() != null) { + joiner.add(String.format("%slanguage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguage())))); + } + + // add `languages` to the URL query string + if (getLanguages() != null) { + for (int i = 0; i < getLanguages().size(); i++) { + joiner.add(String.format("%slanguages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLanguages().get(i))))); + } + } + + // add `contact_number` to the URL query string + if (getContactNumber() != null) { + joiner.add(String.format("%scontact_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContactNumber())))); + } + + // add `inbound` to the URL query string + if (getInbound() != null) { + joiner.add(String.format("%sinbound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInbound())))); + } + + // add `knowledge_base` to the URL query string + if (getKnowledgeBase() != null) { + joiner.add(String.format("%sknowledge_base%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKnowledgeBase())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `model_details` to the URL query string + if (getModelDetails() != null) { + for (String _key : getModelDetails().keySet()) { + joiner.add(String.format("%smodel_details%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModelDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModelDetails().get(_key))))); + } + } + + // add `websocket_url` to the URL query string + if (getWebsocketUrl() != null) { + joiner.add(String.format("%swebsocket_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWebsocketUrl())))); + } + + // add `websocket_headers` to the URL query string + if (getWebsocketHeaders() != null) { + for (String _key : getWebsocketHeaders().keySet()) { + joiner.add(String.format("%swebsocket_headers%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getWebsocketHeaders().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getWebsocketHeaders().get(_key))))); + } + } + + // add `livekit_url` to the URL query string + if (getLivekitUrl() != null) { + joiner.add(String.format("%slivekit_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitUrl())))); + } + + // add `livekit_api_key` to the URL query string + if (getLivekitApiKey() != null) { + joiner.add(String.format("%slivekit_api_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitApiKey())))); + } + + // add `livekit_api_secret` to the URL query string + if (getLivekitApiSecret() != null) { + joiner.add(String.format("%slivekit_api_secret%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitApiSecret())))); + } + + // add `livekit_agent_name` to the URL query string + if (getLivekitAgentName() != null) { + joiner.add(String.format("%slivekit_agent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitAgentName())))); + } + + // add `livekit_config_json` to the URL query string + if (getLivekitConfigJson() != null) { + for (String _key : getLivekitConfigJson().keySet()) { + joiner.add(String.format("%slivekit_config_json%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLivekitConfigJson().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLivekitConfigJson().get(_key))))); + } + } + + // add `livekit_max_concurrency` to the URL query string + if (getLivekitMaxConcurrency() != null) { + joiner.add(String.format("%slivekit_max_concurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitMaxConcurrency())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditResponse.java new file mode 100644 index 0000000..f857ad3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionEditResponse.java @@ -0,0 +1,186 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AgentDefinitionResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionEditResponse + */ +@JsonPropertyOrder({ + AgentDefinitionEditResponse.JSON_PROPERTY_MESSAGE, + AgentDefinitionEditResponse.JSON_PROPERTY_AGENT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionEditResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_AGENT = "agent"; + @javax.annotation.Nullable + private AgentDefinitionResponse agent; + + public AgentDefinitionEditResponse() { + } + + @JsonCreator + public AgentDefinitionEditResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + public AgentDefinitionEditResponse agent(@javax.annotation.Nullable AgentDefinitionResponse agent) { + this.agent = agent; + return this; + } + + /** + * Get agent + * @return agent + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentDefinitionResponse getAgent() { + return agent; + } + + + @JsonProperty(JSON_PROPERTY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgent(@javax.annotation.Nullable AgentDefinitionResponse agent) { + this.agent = agent; + } + + + /** + * Return true if this AgentDefinitionEditResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionEditResponse agentDefinitionEditResponse = (AgentDefinitionEditResponse) o; + return Objects.equals(this.message, agentDefinitionEditResponse.message) && + Objects.equals(this.agent, agentDefinitionEditResponse.agent); + } + + @Override + public int hashCode() { + return Objects.hash(message, agent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionEditResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" agent: ").append(toIndentedString(agent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `agent` to the URL query string + if (getAgent() != null) { + joiner.add(getAgent().toUrlQueryString(prefix + "agent" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionListResponse.java new file mode 100644 index 0000000..456e9e6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionListResponse.java @@ -0,0 +1,1073 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionListResponse + */ +@JsonPropertyOrder({ + AgentDefinitionListResponse.JSON_PROPERTY_ID, + AgentDefinitionListResponse.JSON_PROPERTY_AGENT_NAME, + AgentDefinitionListResponse.JSON_PROPERTY_AGENT_TYPE, + AgentDefinitionListResponse.JSON_PROPERTY_CONTACT_NUMBER, + AgentDefinitionListResponse.JSON_PROPERTY_INBOUND, + AgentDefinitionListResponse.JSON_PROPERTY_DESCRIPTION, + AgentDefinitionListResponse.JSON_PROPERTY_ASSISTANT_ID, + AgentDefinitionListResponse.JSON_PROPERTY_PROVIDER, + AgentDefinitionListResponse.JSON_PROPERTY_LANGUAGE, + AgentDefinitionListResponse.JSON_PROPERTY_LANGUAGES, + AgentDefinitionListResponse.JSON_PROPERTY_WEBSOCKET_URL, + AgentDefinitionListResponse.JSON_PROPERTY_WEBSOCKET_HEADERS, + AgentDefinitionListResponse.JSON_PROPERTY_WORKSPACE, + AgentDefinitionListResponse.JSON_PROPERTY_KNOWLEDGE_BASE, + AgentDefinitionListResponse.JSON_PROPERTY_ORGANIZATION, + AgentDefinitionListResponse.JSON_PROPERTY_CREATED_AT, + AgentDefinitionListResponse.JSON_PROPERTY_UPDATED_AT, + AgentDefinitionListResponse.JSON_PROPERTY_LATEST_VERSION, + AgentDefinitionListResponse.JSON_PROPERTY_LATEST_VERSION_ID, + AgentDefinitionListResponse.JSON_PROPERTY_MODEL_DETAILS, + AgentDefinitionListResponse.JSON_PROPERTY_MODEL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionListResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_AGENT_NAME = "agent_name"; + @javax.annotation.Nullable + private String agentName; + + /** + * Gets or Sets agentType + */ + public enum AgentTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + AgentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AgentTypeEnum fromValue(String value) { + for (AgentTypeEnum b : AgentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private AgentTypeEnum agentType; + + public static final String JSON_PROPERTY_CONTACT_NUMBER = "contact_number"; + private JsonNullable contactNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + @javax.annotation.Nullable + private Boolean inbound; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_ASSISTANT_ID = "assistant_id"; + private JsonNullable assistantId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private JsonNullable provider = JsonNullable.undefined(); + + /** + * Language of the agent + */ + public enum LanguageEnum { + AR(String.valueOf("ar")), + + BG(String.valueOf("bg")), + + ZH(String.valueOf("zh")), + + CS(String.valueOf("cs")), + + DA(String.valueOf("da")), + + NL(String.valueOf("nl")), + + EN(String.valueOf("en")), + + FI(String.valueOf("fi")), + + FR(String.valueOf("fr")), + + DE(String.valueOf("de")), + + EL(String.valueOf("el")), + + HI(String.valueOf("hi")), + + HU(String.valueOf("hu")), + + ID(String.valueOf("id")), + + IT(String.valueOf("it")), + + JA(String.valueOf("ja")), + + KO(String.valueOf("ko")), + + MS(String.valueOf("ms")), + + NO(String.valueOf("no")), + + PL(String.valueOf("pl")), + + PT(String.valueOf("pt")), + + RO(String.valueOf("ro")), + + RU(String.valueOf("ru")), + + SK(String.valueOf("sk")), + + ES(String.valueOf("es")), + + SV(String.valueOf("sv")), + + TR(String.valueOf("tr")), + + UK(String.valueOf("uk")), + + VI(String.valueOf("vi")); + + private String value; + + LanguageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LanguageEnum fromValue(String value) { + for (LanguageEnum b : LanguageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private JsonNullable language = JsonNullable.undefined(); + + /** + * Language of the agent + */ + public enum LanguagesEnum { + AR(String.valueOf("ar")), + + BG(String.valueOf("bg")), + + ZH(String.valueOf("zh")), + + CS(String.valueOf("cs")), + + DA(String.valueOf("da")), + + NL(String.valueOf("nl")), + + EN(String.valueOf("en")), + + FI(String.valueOf("fi")), + + FR(String.valueOf("fr")), + + DE(String.valueOf("de")), + + EL(String.valueOf("el")), + + HI(String.valueOf("hi")), + + HU(String.valueOf("hu")), + + ID(String.valueOf("id")), + + IT(String.valueOf("it")), + + JA(String.valueOf("ja")), + + KO(String.valueOf("ko")), + + MS(String.valueOf("ms")), + + NO(String.valueOf("no")), + + PL(String.valueOf("pl")), + + PT(String.valueOf("pt")), + + RO(String.valueOf("ro")), + + RU(String.valueOf("ru")), + + SK(String.valueOf("sk")), + + ES(String.valueOf("es")), + + SV(String.valueOf("sv")), + + TR(String.valueOf("tr")), + + UK(String.valueOf("uk")), + + VI(String.valueOf("vi")); + + private String value; + + LanguagesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LanguagesEnum fromValue(String value) { + for (LanguagesEnum b : LanguagesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LANGUAGES = "languages"; + private JsonNullable> languages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_WEBSOCKET_URL = "websocket_url"; + private JsonNullable websocketUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEBSOCKET_HEADERS = "websocket_headers"; + @javax.annotation.Nullable + private Map websocketHeaders = new HashMap<>(); + + public static final String JSON_PROPERTY_WORKSPACE = "workspace"; + private JsonNullable workspace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_KNOWLEDGE_BASE = "knowledge_base"; + private JsonNullable knowledgeBase = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_LATEST_VERSION = "latest_version"; + @javax.annotation.Nullable + private String latestVersion; + + public static final String JSON_PROPERTY_LATEST_VERSION_ID = "latest_version_id"; + @javax.annotation.Nullable + private String latestVersionId; + + public static final String JSON_PROPERTY_MODEL_DETAILS = "model_details"; + @javax.annotation.Nullable + private Map modelDetails = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public AgentDefinitionListResponse() { + } + + @JsonCreator + public AgentDefinitionListResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_AGENT_NAME) String agentName, + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) AgentTypeEnum agentType, + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) String contactNumber, + @JsonProperty(JSON_PROPERTY_INBOUND) Boolean inbound, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) String assistantId, + @JsonProperty(JSON_PROPERTY_PROVIDER) String provider, + @JsonProperty(JSON_PROPERTY_LANGUAGE) LanguageEnum language, + @JsonProperty(JSON_PROPERTY_LANGUAGES) List languages, + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) URI websocketUrl, + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) Map websocketHeaders, + @JsonProperty(JSON_PROPERTY_WORKSPACE) UUID workspace, + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) UUID knowledgeBase, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_LATEST_VERSION) String latestVersion, + @JsonProperty(JSON_PROPERTY_LATEST_VERSION_ID) String latestVersionId, + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) Map modelDetails, + @JsonProperty(JSON_PROPERTY_MODEL) String model + ) { + this(); + this.id = id; + this.agentName = agentName; + this.agentType = agentType; + this.contactNumber = contactNumber == null ? JsonNullable.undefined() : JsonNullable.of(contactNumber); + this.inbound = inbound; + this.description = description; + this.assistantId = assistantId == null ? JsonNullable.undefined() : JsonNullable.of(assistantId); + this.provider = provider == null ? JsonNullable.undefined() : JsonNullable.of(provider); + this.language = language == null ? JsonNullable.undefined() : JsonNullable.of(language); + this.languages = languages == null ? JsonNullable.>undefined() : JsonNullable.of(languages); + this.websocketUrl = websocketUrl == null ? JsonNullable.undefined() : JsonNullable.of(websocketUrl); + this.websocketHeaders = websocketHeaders; + this.workspace = workspace == null ? JsonNullable.undefined() : JsonNullable.of(workspace); + this.knowledgeBase = knowledgeBase == null ? JsonNullable.undefined() : JsonNullable.of(knowledgeBase); + this.organization = organization; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.latestVersion = latestVersion; + this.latestVersionId = latestVersionId; + this.modelDetails = modelDetails; + this.model = model == null ? JsonNullable.undefined() : JsonNullable.of(model); + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Name of the AI agent + * @return agentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentName() { + return agentName; + } + + + + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentTypeEnum getAgentType() { + return agentType; + } + + + + + /** + * Phone number associated with the AI agent + * @return contactNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getContactNumber() { + + if (contactNumber == null) { + contactNumber = JsonNullable.undefined(); + } + return contactNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getContactNumber_JsonNullable() { + return contactNumber; + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + private void setContactNumber_JsonNullable(JsonNullable contactNumber) { + this.contactNumber = contactNumber; + } + + + + /** + * Whether the agent handles inbound calls + * @return inbound + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInbound() { + return inbound; + } + + + + + /** + * Detailed description of the AI agent's purpose and capabilities + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + + + /** + * External identifier for the assistant + * @return assistantId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAssistantId() { + + if (assistantId == null) { + assistantId = JsonNullable.undefined(); + } + return assistantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssistantId_JsonNullable() { + return assistantId; + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + private void setAssistantId_JsonNullable(JsonNullable assistantId) { + this.assistantId = assistantId; + } + + + + /** + * Provider of the AI agent + * @return provider + */ + @javax.annotation.Nullable + @JsonIgnore + public String getProvider() { + + if (provider == null) { + provider = JsonNullable.undefined(); + } + return provider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProvider_JsonNullable() { + return provider; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + private void setProvider_JsonNullable(JsonNullable provider) { + this.provider = provider; + } + + + + /** + * Language of the agent + * @return language + */ + @javax.annotation.Nullable + @JsonIgnore + public LanguageEnum getLanguage() { + + if (language == null) { + language = JsonNullable.undefined(); + } + return language.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLanguage_JsonNullable() { + return language; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + private void setLanguage_JsonNullable(JsonNullable language) { + this.language = language; + } + + + + /** + * Get languages + * @return languages + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLanguages() { + + if (languages == null) { + languages = JsonNullable.>undefined(); + } + return languages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLanguages_JsonNullable() { + return languages; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + private void setLanguages_JsonNullable(JsonNullable> languages) { + this.languages = languages; + } + + + + /** + * WebSocket URL for real-time communication with the agent + * @return websocketUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getWebsocketUrl() { + + if (websocketUrl == null) { + websocketUrl = JsonNullable.undefined(); + } + return websocketUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebsocketUrl_JsonNullable() { + return websocketUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + private void setWebsocketUrl_JsonNullable(JsonNullable websocketUrl) { + this.websocketUrl = websocketUrl; + } + + + + /** + * Headers to be sent to the websocket server + * @return websocketHeaders + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getWebsocketHeaders() { + return websocketHeaders; + } + + + + + /** + * Get workspace + * @return workspace + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getWorkspace() { + + if (workspace == null) { + workspace = JsonNullable.undefined(); + } + return workspace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkspace_JsonNullable() { + return workspace; + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + private void setWorkspace_JsonNullable(JsonNullable workspace) { + this.workspace = workspace; + } + + + + /** + * Get knowledgeBase + * @return knowledgeBase + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKnowledgeBase() { + + if (knowledgeBase == null) { + knowledgeBase = JsonNullable.undefined(); + } + return knowledgeBase.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKnowledgeBase_JsonNullable() { + return knowledgeBase; + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + private void setKnowledgeBase_JsonNullable(JsonNullable knowledgeBase) { + this.knowledgeBase = knowledgeBase; + } + + + + /** + * Organization this agent definition belongs to + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Get latestVersion + * @return latestVersion + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LATEST_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLatestVersion() { + return latestVersion; + } + + + + + /** + * Get latestVersionId + * @return latestVersionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LATEST_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLatestVersionId() { + return latestVersionId; + } + + + + + /** + * Details of the model + * @return modelDetails + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModelDetails() { + return modelDetails; + } + + + + + /** + * Model of the agent + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + + if (model == null) { + model = JsonNullable.undefined(); + } + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + private void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + + + /** + * Return true if this AgentDefinitionListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionListResponse agentDefinitionListResponse = (AgentDefinitionListResponse) o; + return Objects.equals(this.id, agentDefinitionListResponse.id) && + Objects.equals(this.agentName, agentDefinitionListResponse.agentName) && + Objects.equals(this.agentType, agentDefinitionListResponse.agentType) && + equalsNullable(this.contactNumber, agentDefinitionListResponse.contactNumber) && + Objects.equals(this.inbound, agentDefinitionListResponse.inbound) && + Objects.equals(this.description, agentDefinitionListResponse.description) && + equalsNullable(this.assistantId, agentDefinitionListResponse.assistantId) && + equalsNullable(this.provider, agentDefinitionListResponse.provider) && + equalsNullable(this.language, agentDefinitionListResponse.language) && + equalsNullable(this.languages, agentDefinitionListResponse.languages) && + equalsNullable(this.websocketUrl, agentDefinitionListResponse.websocketUrl) && + Objects.equals(this.websocketHeaders, agentDefinitionListResponse.websocketHeaders) && + equalsNullable(this.workspace, agentDefinitionListResponse.workspace) && + equalsNullable(this.knowledgeBase, agentDefinitionListResponse.knowledgeBase) && + Objects.equals(this.organization, agentDefinitionListResponse.organization) && + Objects.equals(this.createdAt, agentDefinitionListResponse.createdAt) && + Objects.equals(this.updatedAt, agentDefinitionListResponse.updatedAt) && + Objects.equals(this.latestVersion, agentDefinitionListResponse.latestVersion) && + Objects.equals(this.latestVersionId, agentDefinitionListResponse.latestVersionId) && + Objects.equals(this.modelDetails, agentDefinitionListResponse.modelDetails) && + equalsNullable(this.model, agentDefinitionListResponse.model); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, agentName, agentType, hashCodeNullable(contactNumber), inbound, description, hashCodeNullable(assistantId), hashCodeNullable(provider), hashCodeNullable(language), hashCodeNullable(languages), hashCodeNullable(websocketUrl), websocketHeaders, hashCodeNullable(workspace), hashCodeNullable(knowledgeBase), organization, createdAt, updatedAt, latestVersion, latestVersionId, modelDetails, hashCodeNullable(model)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionListResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" contactNumber: ").append(toIndentedString(contactNumber)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" assistantId: ").append(toIndentedString(assistantId)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" websocketUrl: ").append(toIndentedString(websocketUrl)).append("\n"); + sb.append(" websocketHeaders: ").append(toIndentedString(websocketHeaders)).append("\n"); + sb.append(" workspace: ").append(toIndentedString(workspace)).append("\n"); + sb.append(" knowledgeBase: ").append(toIndentedString(knowledgeBase)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" latestVersion: ").append(toIndentedString(latestVersion)).append("\n"); + sb.append(" latestVersionId: ").append(toIndentedString(latestVersionId)).append("\n"); + sb.append(" modelDetails: ").append(toIndentedString(modelDetails)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `agent_name` to the URL query string + if (getAgentName() != null) { + joiner.add(String.format("%sagent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentName())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `contact_number` to the URL query string + if (getContactNumber() != null) { + joiner.add(String.format("%scontact_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContactNumber())))); + } + + // add `inbound` to the URL query string + if (getInbound() != null) { + joiner.add(String.format("%sinbound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInbound())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `assistant_id` to the URL query string + if (getAssistantId() != null) { + joiner.add(String.format("%sassistant_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssistantId())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `language` to the URL query string + if (getLanguage() != null) { + joiner.add(String.format("%slanguage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguage())))); + } + + // add `languages` to the URL query string + if (getLanguages() != null) { + for (int i = 0; i < getLanguages().size(); i++) { + joiner.add(String.format("%slanguages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLanguages().get(i))))); + } + } + + // add `websocket_url` to the URL query string + if (getWebsocketUrl() != null) { + joiner.add(String.format("%swebsocket_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWebsocketUrl())))); + } + + // add `websocket_headers` to the URL query string + if (getWebsocketHeaders() != null) { + for (String _key : getWebsocketHeaders().keySet()) { + joiner.add(String.format("%swebsocket_headers%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getWebsocketHeaders().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getWebsocketHeaders().get(_key))))); + } + } + + // add `workspace` to the URL query string + if (getWorkspace() != null) { + joiner.add(String.format("%sworkspace%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspace())))); + } + + // add `knowledge_base` to the URL query string + if (getKnowledgeBase() != null) { + joiner.add(String.format("%sknowledge_base%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKnowledgeBase())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `latest_version` to the URL query string + if (getLatestVersion() != null) { + joiner.add(String.format("%slatest_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLatestVersion())))); + } + + // add `latest_version_id` to the URL query string + if (getLatestVersionId() != null) { + joiner.add(String.format("%slatest_version_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLatestVersionId())))); + } + + // add `model_details` to the URL query string + if (getModelDetails() != null) { + for (String _key : getModelDetails().keySet()) { + joiner.add(String.format("%smodel_details%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModelDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModelDetails().get(_key))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionResponse.java new file mode 100644 index 0000000..b6c5124 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentDefinitionResponse.java @@ -0,0 +1,1313 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentDefinitionResponse + */ +@JsonPropertyOrder({ + AgentDefinitionResponse.JSON_PROPERTY_ID, + AgentDefinitionResponse.JSON_PROPERTY_AGENT_NAME, + AgentDefinitionResponse.JSON_PROPERTY_AGENT_TYPE, + AgentDefinitionResponse.JSON_PROPERTY_CONTACT_NUMBER, + AgentDefinitionResponse.JSON_PROPERTY_INBOUND, + AgentDefinitionResponse.JSON_PROPERTY_DESCRIPTION, + AgentDefinitionResponse.JSON_PROPERTY_ASSISTANT_ID, + AgentDefinitionResponse.JSON_PROPERTY_PROVIDER, + AgentDefinitionResponse.JSON_PROPERTY_LANGUAGE, + AgentDefinitionResponse.JSON_PROPERTY_LANGUAGES, + AgentDefinitionResponse.JSON_PROPERTY_AUTHENTICATION_METHOD, + AgentDefinitionResponse.JSON_PROPERTY_WEBSOCKET_URL, + AgentDefinitionResponse.JSON_PROPERTY_WEBSOCKET_HEADERS, + AgentDefinitionResponse.JSON_PROPERTY_WORKSPACE, + AgentDefinitionResponse.JSON_PROPERTY_KNOWLEDGE_BASE, + AgentDefinitionResponse.JSON_PROPERTY_ORGANIZATION, + AgentDefinitionResponse.JSON_PROPERTY_API_KEY, + AgentDefinitionResponse.JSON_PROPERTY_OBSERVABILITY_PROVIDER, + AgentDefinitionResponse.JSON_PROPERTY_CREATED_AT, + AgentDefinitionResponse.JSON_PROPERTY_UPDATED_AT, + AgentDefinitionResponse.JSON_PROPERTY_MODEL, + AgentDefinitionResponse.JSON_PROPERTY_MODEL_DETAILS, + AgentDefinitionResponse.JSON_PROPERTY_LIVEKIT_URL, + AgentDefinitionResponse.JSON_PROPERTY_LIVEKIT_API_KEY, + AgentDefinitionResponse.JSON_PROPERTY_LIVEKIT_AGENT_NAME, + AgentDefinitionResponse.JSON_PROPERTY_LIVEKIT_CONFIG_JSON, + AgentDefinitionResponse.JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentDefinitionResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_AGENT_NAME = "agent_name"; + @javax.annotation.Nullable + private String agentName; + + /** + * Gets or Sets agentType + */ + public enum AgentTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + AgentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AgentTypeEnum fromValue(String value) { + for (AgentTypeEnum b : AgentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private AgentTypeEnum agentType; + + public static final String JSON_PROPERTY_CONTACT_NUMBER = "contact_number"; + private JsonNullable contactNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + @javax.annotation.Nullable + private Boolean inbound; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_ASSISTANT_ID = "assistant_id"; + private JsonNullable assistantId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private JsonNullable provider = JsonNullable.undefined(); + + /** + * Language of the agent + */ + public enum LanguageEnum { + AR(String.valueOf("ar")), + + BG(String.valueOf("bg")), + + ZH(String.valueOf("zh")), + + CS(String.valueOf("cs")), + + DA(String.valueOf("da")), + + NL(String.valueOf("nl")), + + EN(String.valueOf("en")), + + FI(String.valueOf("fi")), + + FR(String.valueOf("fr")), + + DE(String.valueOf("de")), + + EL(String.valueOf("el")), + + HI(String.valueOf("hi")), + + HU(String.valueOf("hu")), + + ID(String.valueOf("id")), + + IT(String.valueOf("it")), + + JA(String.valueOf("ja")), + + KO(String.valueOf("ko")), + + MS(String.valueOf("ms")), + + NO(String.valueOf("no")), + + PL(String.valueOf("pl")), + + PT(String.valueOf("pt")), + + RO(String.valueOf("ro")), + + RU(String.valueOf("ru")), + + SK(String.valueOf("sk")), + + ES(String.valueOf("es")), + + SV(String.valueOf("sv")), + + TR(String.valueOf("tr")), + + UK(String.valueOf("uk")), + + VI(String.valueOf("vi")); + + private String value; + + LanguageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LanguageEnum fromValue(String value) { + for (LanguageEnum b : LanguageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private JsonNullable language = JsonNullable.undefined(); + + /** + * Language of the agent + */ + public enum LanguagesEnum { + AR(String.valueOf("ar")), + + BG(String.valueOf("bg")), + + ZH(String.valueOf("zh")), + + CS(String.valueOf("cs")), + + DA(String.valueOf("da")), + + NL(String.valueOf("nl")), + + EN(String.valueOf("en")), + + FI(String.valueOf("fi")), + + FR(String.valueOf("fr")), + + DE(String.valueOf("de")), + + EL(String.valueOf("el")), + + HI(String.valueOf("hi")), + + HU(String.valueOf("hu")), + + ID(String.valueOf("id")), + + IT(String.valueOf("it")), + + JA(String.valueOf("ja")), + + KO(String.valueOf("ko")), + + MS(String.valueOf("ms")), + + NO(String.valueOf("no")), + + PL(String.valueOf("pl")), + + PT(String.valueOf("pt")), + + RO(String.valueOf("ro")), + + RU(String.valueOf("ru")), + + SK(String.valueOf("sk")), + + ES(String.valueOf("es")), + + SV(String.valueOf("sv")), + + TR(String.valueOf("tr")), + + UK(String.valueOf("uk")), + + VI(String.valueOf("vi")); + + private String value; + + LanguagesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LanguagesEnum fromValue(String value) { + for (LanguagesEnum b : LanguagesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LANGUAGES = "languages"; + private JsonNullable> languages = JsonNullable.>undefined(); + + /** + * Gets or Sets authenticationMethod + */ + public enum AuthenticationMethodEnum { + API_KEY(String.valueOf("api_key")); + + private String value; + + AuthenticationMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AuthenticationMethodEnum fromValue(String value) { + for (AuthenticationMethodEnum b : AuthenticationMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_AUTHENTICATION_METHOD = "authentication_method"; + private JsonNullable authenticationMethod = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEBSOCKET_URL = "websocket_url"; + private JsonNullable websocketUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEBSOCKET_HEADERS = "websocket_headers"; + @javax.annotation.Nullable + private Map websocketHeaders = new HashMap<>(); + + public static final String JSON_PROPERTY_WORKSPACE = "workspace"; + private JsonNullable workspace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_KNOWLEDGE_BASE = "knowledge_base"; + private JsonNullable knowledgeBase = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_API_KEY = "api_key"; + private JsonNullable apiKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OBSERVABILITY_PROVIDER = "observability_provider"; + private JsonNullable observabilityProvider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_DETAILS = "model_details"; + @javax.annotation.Nullable + private Map modelDetails = new HashMap<>(); + + public static final String JSON_PROPERTY_LIVEKIT_URL = "livekit_url"; + @javax.annotation.Nullable + private String livekitUrl; + + public static final String JSON_PROPERTY_LIVEKIT_API_KEY = "livekit_api_key"; + @javax.annotation.Nullable + private String livekitApiKey; + + public static final String JSON_PROPERTY_LIVEKIT_AGENT_NAME = "livekit_agent_name"; + @javax.annotation.Nullable + private String livekitAgentName; + + public static final String JSON_PROPERTY_LIVEKIT_CONFIG_JSON = "livekit_config_json"; + @javax.annotation.Nullable + private String livekitConfigJson; + + public static final String JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY = "livekit_max_concurrency"; + @javax.annotation.Nullable + private String livekitMaxConcurrency; + + public AgentDefinitionResponse() { + } + + @JsonCreator + public AgentDefinitionResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_AGENT_NAME) String agentName, + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) AgentTypeEnum agentType, + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) String contactNumber, + @JsonProperty(JSON_PROPERTY_INBOUND) Boolean inbound, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) String assistantId, + @JsonProperty(JSON_PROPERTY_PROVIDER) String provider, + @JsonProperty(JSON_PROPERTY_LANGUAGE) LanguageEnum language, + @JsonProperty(JSON_PROPERTY_LANGUAGES) List languages, + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) AuthenticationMethodEnum authenticationMethod, + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) URI websocketUrl, + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) Map websocketHeaders, + @JsonProperty(JSON_PROPERTY_WORKSPACE) UUID workspace, + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) UUID knowledgeBase, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_API_KEY) String apiKey, + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PROVIDER) UUID observabilityProvider, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_MODEL) String model, + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) Map modelDetails, + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) String livekitUrl, + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) String livekitApiKey, + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) String livekitAgentName, + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) String livekitConfigJson, + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) String livekitMaxConcurrency + ) { + this(); + this.id = id; + this.agentName = agentName; + this.agentType = agentType; + this.contactNumber = contactNumber == null ? JsonNullable.undefined() : JsonNullable.of(contactNumber); + this.inbound = inbound; + this.description = description; + this.assistantId = assistantId == null ? JsonNullable.undefined() : JsonNullable.of(assistantId); + this.provider = provider == null ? JsonNullable.undefined() : JsonNullable.of(provider); + this.language = language == null ? JsonNullable.undefined() : JsonNullable.of(language); + this.languages = languages == null ? JsonNullable.>undefined() : JsonNullable.of(languages); + this.authenticationMethod = authenticationMethod == null ? JsonNullable.undefined() : JsonNullable.of(authenticationMethod); + this.websocketUrl = websocketUrl == null ? JsonNullable.undefined() : JsonNullable.of(websocketUrl); + this.websocketHeaders = websocketHeaders; + this.workspace = workspace == null ? JsonNullable.undefined() : JsonNullable.of(workspace); + this.knowledgeBase = knowledgeBase == null ? JsonNullable.undefined() : JsonNullable.of(knowledgeBase); + this.organization = organization; + this.apiKey = apiKey == null ? JsonNullable.undefined() : JsonNullable.of(apiKey); + this.observabilityProvider = observabilityProvider == null ? JsonNullable.undefined() : JsonNullable.of(observabilityProvider); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.model = model == null ? JsonNullable.undefined() : JsonNullable.of(model); + this.modelDetails = modelDetails; + this.livekitUrl = livekitUrl; + this.livekitApiKey = livekitApiKey; + this.livekitAgentName = livekitAgentName; + this.livekitConfigJson = livekitConfigJson; + this.livekitMaxConcurrency = livekitMaxConcurrency; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Name of the AI agent + * @return agentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentName() { + return agentName; + } + + + + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentTypeEnum getAgentType() { + return agentType; + } + + + + + /** + * Phone number associated with the AI agent + * @return contactNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getContactNumber() { + + if (contactNumber == null) { + contactNumber = JsonNullable.undefined(); + } + return contactNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getContactNumber_JsonNullable() { + return contactNumber; + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + private void setContactNumber_JsonNullable(JsonNullable contactNumber) { + this.contactNumber = contactNumber; + } + + + + /** + * Whether the agent handles inbound calls + * @return inbound + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInbound() { + return inbound; + } + + + + + /** + * Detailed description of the AI agent's purpose and capabilities + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + + + /** + * External identifier for the assistant + * @return assistantId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAssistantId() { + + if (assistantId == null) { + assistantId = JsonNullable.undefined(); + } + return assistantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssistantId_JsonNullable() { + return assistantId; + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + private void setAssistantId_JsonNullable(JsonNullable assistantId) { + this.assistantId = assistantId; + } + + + + /** + * Provider of the AI agent + * @return provider + */ + @javax.annotation.Nullable + @JsonIgnore + public String getProvider() { + + if (provider == null) { + provider = JsonNullable.undefined(); + } + return provider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProvider_JsonNullable() { + return provider; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + private void setProvider_JsonNullable(JsonNullable provider) { + this.provider = provider; + } + + + + /** + * Language of the agent + * @return language + */ + @javax.annotation.Nullable + @JsonIgnore + public LanguageEnum getLanguage() { + + if (language == null) { + language = JsonNullable.undefined(); + } + return language.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLanguage_JsonNullable() { + return language; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + private void setLanguage_JsonNullable(JsonNullable language) { + this.language = language; + } + + + + /** + * Get languages + * @return languages + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLanguages() { + + if (languages == null) { + languages = JsonNullable.>undefined(); + } + return languages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLanguages_JsonNullable() { + return languages; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + private void setLanguages_JsonNullable(JsonNullable> languages) { + this.languages = languages; + } + + + + /** + * Get authenticationMethod + * @return authenticationMethod + */ + @javax.annotation.Nullable + @JsonIgnore + public AuthenticationMethodEnum getAuthenticationMethod() { + + if (authenticationMethod == null) { + authenticationMethod = JsonNullable.undefined(); + } + return authenticationMethod.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAuthenticationMethod_JsonNullable() { + return authenticationMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + private void setAuthenticationMethod_JsonNullable(JsonNullable authenticationMethod) { + this.authenticationMethod = authenticationMethod; + } + + + + /** + * WebSocket URL for real-time communication with the agent + * @return websocketUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getWebsocketUrl() { + + if (websocketUrl == null) { + websocketUrl = JsonNullable.undefined(); + } + return websocketUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebsocketUrl_JsonNullable() { + return websocketUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBSOCKET_URL) + private void setWebsocketUrl_JsonNullable(JsonNullable websocketUrl) { + this.websocketUrl = websocketUrl; + } + + + + /** + * Headers to be sent to the websocket server + * @return websocketHeaders + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSOCKET_HEADERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getWebsocketHeaders() { + return websocketHeaders; + } + + + + + /** + * Get workspace + * @return workspace + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getWorkspace() { + + if (workspace == null) { + workspace = JsonNullable.undefined(); + } + return workspace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkspace_JsonNullable() { + return workspace; + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + private void setWorkspace_JsonNullable(JsonNullable workspace) { + this.workspace = workspace; + } + + + + /** + * Get knowledgeBase + * @return knowledgeBase + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKnowledgeBase() { + + if (knowledgeBase == null) { + knowledgeBase = JsonNullable.undefined(); + } + return knowledgeBase.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKnowledgeBase_JsonNullable() { + return knowledgeBase; + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + private void setKnowledgeBase_JsonNullable(JsonNullable knowledgeBase) { + this.knowledgeBase = knowledgeBase; + } + + + + /** + * Organization this agent definition belongs to + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * API key for the agent + * @return apiKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getApiKey() { + + if (apiKey == null) { + apiKey = JsonNullable.undefined(); + } + return apiKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getApiKey_JsonNullable() { + return apiKey; + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + private void setApiKey_JsonNullable(JsonNullable apiKey) { + this.apiKey = apiKey; + } + + + + /** + * Get observabilityProvider + * @return observabilityProvider + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getObservabilityProvider() { + + if (observabilityProvider == null) { + observabilityProvider = JsonNullable.undefined(); + } + return observabilityProvider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getObservabilityProvider_JsonNullable() { + return observabilityProvider; + } + + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_PROVIDER) + private void setObservabilityProvider_JsonNullable(JsonNullable observabilityProvider) { + this.observabilityProvider = observabilityProvider; + } + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Model of the agent + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + + if (model == null) { + model = JsonNullable.undefined(); + } + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + private void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + + + /** + * Details of the model + * @return modelDetails + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModelDetails() { + return modelDetails; + } + + + + + /** + * Get livekitUrl + * @return livekitUrl + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitUrl() { + return livekitUrl; + } + + + + + /** + * Get livekitApiKey + * @return livekitApiKey + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitApiKey() { + return livekitApiKey; + } + + + + + /** + * Get livekitAgentName + * @return livekitAgentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitAgentName() { + return livekitAgentName; + } + + + + + /** + * Get livekitConfigJson + * @return livekitConfigJson + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitConfigJson() { + return livekitConfigJson; + } + + + + + /** + * Get livekitMaxConcurrency + * @return livekitMaxConcurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitMaxConcurrency() { + return livekitMaxConcurrency; + } + + + + + /** + * Return true if this AgentDefinitionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentDefinitionResponse agentDefinitionResponse = (AgentDefinitionResponse) o; + return Objects.equals(this.id, agentDefinitionResponse.id) && + Objects.equals(this.agentName, agentDefinitionResponse.agentName) && + Objects.equals(this.agentType, agentDefinitionResponse.agentType) && + equalsNullable(this.contactNumber, agentDefinitionResponse.contactNumber) && + Objects.equals(this.inbound, agentDefinitionResponse.inbound) && + Objects.equals(this.description, agentDefinitionResponse.description) && + equalsNullable(this.assistantId, agentDefinitionResponse.assistantId) && + equalsNullable(this.provider, agentDefinitionResponse.provider) && + equalsNullable(this.language, agentDefinitionResponse.language) && + equalsNullable(this.languages, agentDefinitionResponse.languages) && + equalsNullable(this.authenticationMethod, agentDefinitionResponse.authenticationMethod) && + equalsNullable(this.websocketUrl, agentDefinitionResponse.websocketUrl) && + Objects.equals(this.websocketHeaders, agentDefinitionResponse.websocketHeaders) && + equalsNullable(this.workspace, agentDefinitionResponse.workspace) && + equalsNullable(this.knowledgeBase, agentDefinitionResponse.knowledgeBase) && + Objects.equals(this.organization, agentDefinitionResponse.organization) && + equalsNullable(this.apiKey, agentDefinitionResponse.apiKey) && + equalsNullable(this.observabilityProvider, agentDefinitionResponse.observabilityProvider) && + Objects.equals(this.createdAt, agentDefinitionResponse.createdAt) && + Objects.equals(this.updatedAt, agentDefinitionResponse.updatedAt) && + equalsNullable(this.model, agentDefinitionResponse.model) && + Objects.equals(this.modelDetails, agentDefinitionResponse.modelDetails) && + Objects.equals(this.livekitUrl, agentDefinitionResponse.livekitUrl) && + Objects.equals(this.livekitApiKey, agentDefinitionResponse.livekitApiKey) && + Objects.equals(this.livekitAgentName, agentDefinitionResponse.livekitAgentName) && + Objects.equals(this.livekitConfigJson, agentDefinitionResponse.livekitConfigJson) && + Objects.equals(this.livekitMaxConcurrency, agentDefinitionResponse.livekitMaxConcurrency); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, agentName, agentType, hashCodeNullable(contactNumber), inbound, description, hashCodeNullable(assistantId), hashCodeNullable(provider), hashCodeNullable(language), hashCodeNullable(languages), hashCodeNullable(authenticationMethod), hashCodeNullable(websocketUrl), websocketHeaders, hashCodeNullable(workspace), hashCodeNullable(knowledgeBase), organization, hashCodeNullable(apiKey), hashCodeNullable(observabilityProvider), createdAt, updatedAt, hashCodeNullable(model), modelDetails, livekitUrl, livekitApiKey, livekitAgentName, livekitConfigJson, livekitMaxConcurrency); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentDefinitionResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" contactNumber: ").append(toIndentedString(contactNumber)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" assistantId: ").append(toIndentedString(assistantId)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" authenticationMethod: ").append(toIndentedString(authenticationMethod)).append("\n"); + sb.append(" websocketUrl: ").append(toIndentedString(websocketUrl)).append("\n"); + sb.append(" websocketHeaders: ").append(toIndentedString(websocketHeaders)).append("\n"); + sb.append(" workspace: ").append(toIndentedString(workspace)).append("\n"); + sb.append(" knowledgeBase: ").append(toIndentedString(knowledgeBase)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" observabilityProvider: ").append(toIndentedString(observabilityProvider)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelDetails: ").append(toIndentedString(modelDetails)).append("\n"); + sb.append(" livekitUrl: ").append(toIndentedString(livekitUrl)).append("\n"); + sb.append(" livekitApiKey: ").append(toIndentedString(livekitApiKey)).append("\n"); + sb.append(" livekitAgentName: ").append(toIndentedString(livekitAgentName)).append("\n"); + sb.append(" livekitConfigJson: ").append(toIndentedString(livekitConfigJson)).append("\n"); + sb.append(" livekitMaxConcurrency: ").append(toIndentedString(livekitMaxConcurrency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `agent_name` to the URL query string + if (getAgentName() != null) { + joiner.add(String.format("%sagent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentName())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `contact_number` to the URL query string + if (getContactNumber() != null) { + joiner.add(String.format("%scontact_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContactNumber())))); + } + + // add `inbound` to the URL query string + if (getInbound() != null) { + joiner.add(String.format("%sinbound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInbound())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `assistant_id` to the URL query string + if (getAssistantId() != null) { + joiner.add(String.format("%sassistant_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssistantId())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `language` to the URL query string + if (getLanguage() != null) { + joiner.add(String.format("%slanguage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguage())))); + } + + // add `languages` to the URL query string + if (getLanguages() != null) { + for (int i = 0; i < getLanguages().size(); i++) { + joiner.add(String.format("%slanguages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLanguages().get(i))))); + } + } + + // add `authentication_method` to the URL query string + if (getAuthenticationMethod() != null) { + joiner.add(String.format("%sauthentication_method%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAuthenticationMethod())))); + } + + // add `websocket_url` to the URL query string + if (getWebsocketUrl() != null) { + joiner.add(String.format("%swebsocket_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWebsocketUrl())))); + } + + // add `websocket_headers` to the URL query string + if (getWebsocketHeaders() != null) { + for (String _key : getWebsocketHeaders().keySet()) { + joiner.add(String.format("%swebsocket_headers%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getWebsocketHeaders().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getWebsocketHeaders().get(_key))))); + } + } + + // add `workspace` to the URL query string + if (getWorkspace() != null) { + joiner.add(String.format("%sworkspace%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspace())))); + } + + // add `knowledge_base` to the URL query string + if (getKnowledgeBase() != null) { + joiner.add(String.format("%sknowledge_base%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKnowledgeBase())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `api_key` to the URL query string + if (getApiKey() != null) { + joiner.add(String.format("%sapi_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApiKey())))); + } + + // add `observability_provider` to the URL query string + if (getObservabilityProvider() != null) { + joiner.add(String.format("%sobservability_provider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getObservabilityProvider())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `model_details` to the URL query string + if (getModelDetails() != null) { + for (String _key : getModelDetails().keySet()) { + joiner.add(String.format("%smodel_details%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModelDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModelDetails().get(_key))))); + } + } + + // add `livekit_url` to the URL query string + if (getLivekitUrl() != null) { + joiner.add(String.format("%slivekit_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitUrl())))); + } + + // add `livekit_api_key` to the URL query string + if (getLivekitApiKey() != null) { + joiner.add(String.format("%slivekit_api_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitApiKey())))); + } + + // add `livekit_agent_name` to the URL query string + if (getLivekitAgentName() != null) { + joiner.add(String.format("%slivekit_agent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitAgentName())))); + } + + // add `livekit_config_json` to the URL query string + if (getLivekitConfigJson() != null) { + joiner.add(String.format("%slivekit_config_json%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitConfigJson())))); + } + + // add `livekit_max_concurrency` to the URL query string + if (getLivekitMaxConcurrency() != null) { + joiner.add(String.format("%slivekit_max_concurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitMaxConcurrency())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentFlowGraph.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentFlowGraph.java new file mode 100644 index 0000000..9f1d0f6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentFlowGraph.java @@ -0,0 +1,214 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentFlowGraph + */ +@JsonPropertyOrder({ + AgentFlowGraph.JSON_PROPERTY_NODES, + AgentFlowGraph.JSON_PROPERTY_EDGES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentFlowGraph { + public static final String JSON_PROPERTY_NODES = "nodes"; + @javax.annotation.Nonnull + private List> nodes = new ArrayList<>(); + + public static final String JSON_PROPERTY_EDGES = "edges"; + @javax.annotation.Nonnull + private List> edges = new ArrayList<>(); + + public AgentFlowGraph() { + } + + public AgentFlowGraph nodes(@javax.annotation.Nonnull List> nodes) { + this.nodes = nodes; + return this; + } + + public AgentFlowGraph addNodesItem(Map nodesItem) { + if (this.nodes == null) { + this.nodes = new ArrayList<>(); + } + this.nodes.add(nodesItem); + return this; + } + + /** + * Get nodes + * @return nodes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NODES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getNodes() { + return nodes; + } + + + @JsonProperty(JSON_PROPERTY_NODES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNodes(@javax.annotation.Nonnull List> nodes) { + this.nodes = nodes; + } + + + public AgentFlowGraph edges(@javax.annotation.Nonnull List> edges) { + this.edges = edges; + return this; + } + + public AgentFlowGraph addEdgesItem(Map edgesItem) { + if (this.edges == null) { + this.edges = new ArrayList<>(); + } + this.edges.add(edgesItem); + return this; + } + + /** + * Get edges + * @return edges + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EDGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEdges() { + return edges; + } + + + @JsonProperty(JSON_PROPERTY_EDGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEdges(@javax.annotation.Nonnull List> edges) { + this.edges = edges; + } + + + /** + * Return true if this AgentFlowGraph object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentFlowGraph agentFlowGraph = (AgentFlowGraph) o; + return Objects.equals(this.nodes, agentFlowGraph.nodes) && + Objects.equals(this.edges, agentFlowGraph.edges); + } + + @Override + public int hashCode() { + return Objects.hash(nodes, edges); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentFlowGraph {\n"); + sb.append(" nodes: ").append(toIndentedString(nodes)).append("\n"); + sb.append(" edges: ").append(toIndentedString(edges)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `nodes` to the URL query string + if (getNodes() != null) { + for (int i = 0; i < getNodes().size(); i++) { + joiner.add(String.format("%snodes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getNodes().get(i))))); + } + } + + // add `edges` to the URL query string + if (getEdges() != null) { + for (int i = 0; i < getEdges().size(); i++) { + joiner.add(String.format("%sedges%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEdges().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionActivateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionActivateResponse.java new file mode 100644 index 0000000..40ad2e9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionActivateResponse.java @@ -0,0 +1,186 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AgentVersionResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentVersionActivateResponse + */ +@JsonPropertyOrder({ + AgentVersionActivateResponse.JSON_PROPERTY_MESSAGE, + AgentVersionActivateResponse.JSON_PROPERTY_VERSION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentVersionActivateResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private AgentVersionResponse version; + + public AgentVersionActivateResponse() { + } + + @JsonCreator + public AgentVersionActivateResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + public AgentVersionActivateResponse version(@javax.annotation.Nullable AgentVersionResponse version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentVersionResponse getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(@javax.annotation.Nullable AgentVersionResponse version) { + this.version = version; + } + + + /** + * Return true if this AgentVersionActivateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentVersionActivateResponse agentVersionActivateResponse = (AgentVersionActivateResponse) o; + return Objects.equals(this.message, agentVersionActivateResponse.message) && + Objects.equals(this.version, agentVersionActivateResponse.version); + } + + @Override + public int hashCode() { + return Objects.hash(message, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentVersionActivateResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(getVersion().toUrlQueryString(prefix + "version" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateRequest.java new file mode 100644 index 0000000..a16105c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateRequest.java @@ -0,0 +1,1106 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentVersionCreateRequest + */ +@JsonPropertyOrder({ + AgentVersionCreateRequest.JSON_PROPERTY_AGENT_NAME, + AgentVersionCreateRequest.JSON_PROPERTY_AGENT_TYPE, + AgentVersionCreateRequest.JSON_PROPERTY_DESCRIPTION, + AgentVersionCreateRequest.JSON_PROPERTY_PROVIDER, + AgentVersionCreateRequest.JSON_PROPERTY_API_KEY, + AgentVersionCreateRequest.JSON_PROPERTY_ASSISTANT_ID, + AgentVersionCreateRequest.JSON_PROPERTY_AUTHENTICATION_METHOD, + AgentVersionCreateRequest.JSON_PROPERTY_LANGUAGE, + AgentVersionCreateRequest.JSON_PROPERTY_LANGUAGES, + AgentVersionCreateRequest.JSON_PROPERTY_CONTACT_NUMBER, + AgentVersionCreateRequest.JSON_PROPERTY_INBOUND, + AgentVersionCreateRequest.JSON_PROPERTY_KNOWLEDGE_BASE, + AgentVersionCreateRequest.JSON_PROPERTY_MODEL, + AgentVersionCreateRequest.JSON_PROPERTY_MODEL_DETAILS, + AgentVersionCreateRequest.JSON_PROPERTY_LIVEKIT_URL, + AgentVersionCreateRequest.JSON_PROPERTY_LIVEKIT_API_KEY, + AgentVersionCreateRequest.JSON_PROPERTY_LIVEKIT_API_SECRET, + AgentVersionCreateRequest.JSON_PROPERTY_LIVEKIT_AGENT_NAME, + AgentVersionCreateRequest.JSON_PROPERTY_LIVEKIT_CONFIG_JSON, + AgentVersionCreateRequest.JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY, + AgentVersionCreateRequest.JSON_PROPERTY_COMMIT_MESSAGE, + AgentVersionCreateRequest.JSON_PROPERTY_OBSERVABILITY_ENABLED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentVersionCreateRequest { + public static final String JSON_PROPERTY_AGENT_NAME = "agent_name"; + @javax.annotation.Nullable + private String agentName; + + /** + * Gets or Sets agentType + */ + public enum AgentTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + AgentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AgentTypeEnum fromValue(String value) { + for (AgentTypeEnum b : AgentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private AgentTypeEnum agentType; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private JsonNullable provider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_API_KEY = "api_key"; + private JsonNullable apiKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ASSISTANT_ID = "assistant_id"; + private JsonNullable assistantId = JsonNullable.undefined(); + + /** + * Gets or Sets authenticationMethod + */ + public enum AuthenticationMethodEnum { + API_KEY(String.valueOf("api_key")); + + private String value; + + AuthenticationMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AuthenticationMethodEnum fromValue(String value) { + for (AuthenticationMethodEnum b : AuthenticationMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_AUTHENTICATION_METHOD = "authentication_method"; + private JsonNullable authenticationMethod = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private JsonNullable language = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGES = "languages"; + private JsonNullable> languages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CONTACT_NUMBER = "contact_number"; + private JsonNullable contactNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + @javax.annotation.Nullable + private Boolean inbound; + + public static final String JSON_PROPERTY_KNOWLEDGE_BASE = "knowledge_base"; + private JsonNullable knowledgeBase = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_DETAILS = "model_details"; + @javax.annotation.Nullable + private Map modelDetails = new HashMap<>(); + + public static final String JSON_PROPERTY_LIVEKIT_URL = "livekit_url"; + @javax.annotation.Nullable + private String livekitUrl; + + public static final String JSON_PROPERTY_LIVEKIT_API_KEY = "livekit_api_key"; + @javax.annotation.Nullable + private String livekitApiKey; + + public static final String JSON_PROPERTY_LIVEKIT_API_SECRET = "livekit_api_secret"; + @javax.annotation.Nullable + private String livekitApiSecret; + + public static final String JSON_PROPERTY_LIVEKIT_AGENT_NAME = "livekit_agent_name"; + @javax.annotation.Nullable + private String livekitAgentName; + + public static final String JSON_PROPERTY_LIVEKIT_CONFIG_JSON = "livekit_config_json"; + @javax.annotation.Nullable + private Map livekitConfigJson = new HashMap<>(); + + public static final String JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY = "livekit_max_concurrency"; + @javax.annotation.Nullable + private Integer livekitMaxConcurrency; + + public static final String JSON_PROPERTY_COMMIT_MESSAGE = "commit_message"; + @javax.annotation.Nullable + private String commitMessage = ""; + + public static final String JSON_PROPERTY_OBSERVABILITY_ENABLED = "observability_enabled"; + @javax.annotation.Nullable + private Boolean observabilityEnabled = false; + + public AgentVersionCreateRequest() { + } + + public AgentVersionCreateRequest agentName(@javax.annotation.Nullable String agentName) { + this.agentName = agentName; + return this; + } + + /** + * Get agentName + * @return agentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentName() { + return agentName; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentName(@javax.annotation.Nullable String agentName) { + this.agentName = agentName; + } + + + public AgentVersionCreateRequest agentType(@javax.annotation.Nullable AgentTypeEnum agentType) { + this.agentType = agentType; + return this; + } + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentTypeEnum getAgentType() { + return agentType; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentType(@javax.annotation.Nullable AgentTypeEnum agentType) { + this.agentType = agentType; + } + + + public AgentVersionCreateRequest description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AgentVersionCreateRequest provider(@javax.annotation.Nullable String provider) { + this.provider = JsonNullable.of(provider); + return this; + } + + /** + * Get provider + * @return provider + */ + @javax.annotation.Nullable + @JsonIgnore + public String getProvider() { + return provider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProvider_JsonNullable() { + return provider; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER) + public void setProvider_JsonNullable(JsonNullable provider) { + this.provider = provider; + } + + public void setProvider(@javax.annotation.Nullable String provider) { + this.provider = JsonNullable.of(provider); + } + + + public AgentVersionCreateRequest apiKey(@javax.annotation.Nullable String apiKey) { + this.apiKey = JsonNullable.of(apiKey); + return this; + } + + /** + * Get apiKey + * @return apiKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getApiKey() { + return apiKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getApiKey_JsonNullable() { + return apiKey; + } + + @JsonProperty(JSON_PROPERTY_API_KEY) + public void setApiKey_JsonNullable(JsonNullable apiKey) { + this.apiKey = apiKey; + } + + public void setApiKey(@javax.annotation.Nullable String apiKey) { + this.apiKey = JsonNullable.of(apiKey); + } + + + public AgentVersionCreateRequest assistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + return this; + } + + /** + * Get assistantId + * @return assistantId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAssistantId() { + return assistantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssistantId_JsonNullable() { + return assistantId; + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + public void setAssistantId_JsonNullable(JsonNullable assistantId) { + this.assistantId = assistantId; + } + + public void setAssistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + } + + + public AgentVersionCreateRequest authenticationMethod(@javax.annotation.Nullable AuthenticationMethodEnum authenticationMethod) { + this.authenticationMethod = JsonNullable.of(authenticationMethod); + return this; + } + + /** + * Get authenticationMethod + * @return authenticationMethod + */ + @javax.annotation.Nullable + @JsonIgnore + public AuthenticationMethodEnum getAuthenticationMethod() { + return authenticationMethod.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAuthenticationMethod_JsonNullable() { + return authenticationMethod; + } + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION_METHOD) + public void setAuthenticationMethod_JsonNullable(JsonNullable authenticationMethod) { + this.authenticationMethod = authenticationMethod; + } + + public void setAuthenticationMethod(@javax.annotation.Nullable AuthenticationMethodEnum authenticationMethod) { + this.authenticationMethod = JsonNullable.of(authenticationMethod); + } + + + public AgentVersionCreateRequest language(@javax.annotation.Nullable String language) { + this.language = JsonNullable.of(language); + return this; + } + + /** + * Get language + * @return language + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLanguage() { + return language.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLanguage_JsonNullable() { + return language; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + public void setLanguage_JsonNullable(JsonNullable language) { + this.language = language; + } + + public void setLanguage(@javax.annotation.Nullable String language) { + this.language = JsonNullable.of(language); + } + + + public AgentVersionCreateRequest languages(@javax.annotation.Nullable List languages) { + this.languages = JsonNullable.>of(languages); + return this; + } + + public AgentVersionCreateRequest addLanguagesItem(String languagesItem) { + if (this.languages == null || !this.languages.isPresent()) { + this.languages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.languages.get().add(languagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get languages + * @return languages + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLanguages() { + return languages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLanguages_JsonNullable() { + return languages; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + public void setLanguages_JsonNullable(JsonNullable> languages) { + this.languages = languages; + } + + public void setLanguages(@javax.annotation.Nullable List languages) { + this.languages = JsonNullable.>of(languages); + } + + + public AgentVersionCreateRequest contactNumber(@javax.annotation.Nullable String contactNumber) { + this.contactNumber = JsonNullable.of(contactNumber); + return this; + } + + /** + * Get contactNumber + * @return contactNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getContactNumber() { + return contactNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getContactNumber_JsonNullable() { + return contactNumber; + } + + @JsonProperty(JSON_PROPERTY_CONTACT_NUMBER) + public void setContactNumber_JsonNullable(JsonNullable contactNumber) { + this.contactNumber = contactNumber; + } + + public void setContactNumber(@javax.annotation.Nullable String contactNumber) { + this.contactNumber = JsonNullable.of(contactNumber); + } + + + public AgentVersionCreateRequest inbound(@javax.annotation.Nullable Boolean inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInbound() { + return inbound; + } + + + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInbound(@javax.annotation.Nullable Boolean inbound) { + this.inbound = inbound; + } + + + public AgentVersionCreateRequest knowledgeBase(@javax.annotation.Nullable UUID knowledgeBase) { + this.knowledgeBase = JsonNullable.of(knowledgeBase); + return this; + } + + /** + * Get knowledgeBase + * @return knowledgeBase + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKnowledgeBase() { + return knowledgeBase.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKnowledgeBase_JsonNullable() { + return knowledgeBase; + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASE) + public void setKnowledgeBase_JsonNullable(JsonNullable knowledgeBase) { + this.knowledgeBase = knowledgeBase; + } + + public void setKnowledgeBase(@javax.annotation.Nullable UUID knowledgeBase) { + this.knowledgeBase = JsonNullable.of(knowledgeBase); + } + + + public AgentVersionCreateRequest model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public AgentVersionCreateRequest modelDetails(@javax.annotation.Nullable Map modelDetails) { + this.modelDetails = modelDetails; + return this; + } + + public AgentVersionCreateRequest putModelDetailsItem(String key, Object modelDetailsItem) { + if (this.modelDetails == null) { + this.modelDetails = new HashMap<>(); + } + this.modelDetails.put(key, modelDetailsItem); + return this; + } + + /** + * Get modelDetails + * @return modelDetails + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModelDetails() { + return modelDetails; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setModelDetails(@javax.annotation.Nullable Map modelDetails) { + this.modelDetails = modelDetails; + } + + + public AgentVersionCreateRequest livekitUrl(@javax.annotation.Nullable String livekitUrl) { + this.livekitUrl = livekitUrl; + return this; + } + + /** + * Get livekitUrl + * @return livekitUrl + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitUrl() { + return livekitUrl; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitUrl(@javax.annotation.Nullable String livekitUrl) { + this.livekitUrl = livekitUrl; + } + + + public AgentVersionCreateRequest livekitApiKey(@javax.annotation.Nullable String livekitApiKey) { + this.livekitApiKey = livekitApiKey; + return this; + } + + /** + * Get livekitApiKey + * @return livekitApiKey + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitApiKey() { + return livekitApiKey; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitApiKey(@javax.annotation.Nullable String livekitApiKey) { + this.livekitApiKey = livekitApiKey; + } + + + public AgentVersionCreateRequest livekitApiSecret(@javax.annotation.Nullable String livekitApiSecret) { + this.livekitApiSecret = livekitApiSecret; + return this; + } + + /** + * Get livekitApiSecret + * @return livekitApiSecret + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitApiSecret() { + return livekitApiSecret; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_API_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitApiSecret(@javax.annotation.Nullable String livekitApiSecret) { + this.livekitApiSecret = livekitApiSecret; + } + + + public AgentVersionCreateRequest livekitAgentName(@javax.annotation.Nullable String livekitAgentName) { + this.livekitAgentName = livekitAgentName; + return this; + } + + /** + * Get livekitAgentName + * @return livekitAgentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLivekitAgentName() { + return livekitAgentName; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitAgentName(@javax.annotation.Nullable String livekitAgentName) { + this.livekitAgentName = livekitAgentName; + } + + + public AgentVersionCreateRequest livekitConfigJson(@javax.annotation.Nullable Map livekitConfigJson) { + this.livekitConfigJson = livekitConfigJson; + return this; + } + + public AgentVersionCreateRequest putLivekitConfigJsonItem(String key, Object livekitConfigJsonItem) { + if (this.livekitConfigJson == null) { + this.livekitConfigJson = new HashMap<>(); + } + this.livekitConfigJson.put(key, livekitConfigJsonItem); + return this; + } + + /** + * Get livekitConfigJson + * @return livekitConfigJson + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLivekitConfigJson() { + return livekitConfigJson; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitConfigJson(@javax.annotation.Nullable Map livekitConfigJson) { + this.livekitConfigJson = livekitConfigJson; + } + + + public AgentVersionCreateRequest livekitMaxConcurrency(@javax.annotation.Nullable Integer livekitMaxConcurrency) { + this.livekitMaxConcurrency = livekitMaxConcurrency; + return this; + } + + /** + * Get livekitMaxConcurrency + * minimum: 1 + * @return livekitMaxConcurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLivekitMaxConcurrency() { + return livekitMaxConcurrency; + } + + + @JsonProperty(JSON_PROPERTY_LIVEKIT_MAX_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLivekitMaxConcurrency(@javax.annotation.Nullable Integer livekitMaxConcurrency) { + this.livekitMaxConcurrency = livekitMaxConcurrency; + } + + + public AgentVersionCreateRequest commitMessage(@javax.annotation.Nullable String commitMessage) { + this.commitMessage = commitMessage; + return this; + } + + /** + * Get commitMessage + * @return commitMessage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCommitMessage() { + return commitMessage; + } + + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCommitMessage(@javax.annotation.Nullable String commitMessage) { + this.commitMessage = commitMessage; + } + + + public AgentVersionCreateRequest observabilityEnabled(@javax.annotation.Nullable Boolean observabilityEnabled) { + this.observabilityEnabled = observabilityEnabled; + return this; + } + + /** + * Get observabilityEnabled + * @return observabilityEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getObservabilityEnabled() { + return observabilityEnabled; + } + + + @JsonProperty(JSON_PROPERTY_OBSERVABILITY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setObservabilityEnabled(@javax.annotation.Nullable Boolean observabilityEnabled) { + this.observabilityEnabled = observabilityEnabled; + } + + + /** + * Return true if this AgentVersionCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentVersionCreateRequest agentVersionCreateRequest = (AgentVersionCreateRequest) o; + return Objects.equals(this.agentName, agentVersionCreateRequest.agentName) && + Objects.equals(this.agentType, agentVersionCreateRequest.agentType) && + equalsNullable(this.description, agentVersionCreateRequest.description) && + equalsNullable(this.provider, agentVersionCreateRequest.provider) && + equalsNullable(this.apiKey, agentVersionCreateRequest.apiKey) && + equalsNullable(this.assistantId, agentVersionCreateRequest.assistantId) && + equalsNullable(this.authenticationMethod, agentVersionCreateRequest.authenticationMethod) && + equalsNullable(this.language, agentVersionCreateRequest.language) && + equalsNullable(this.languages, agentVersionCreateRequest.languages) && + equalsNullable(this.contactNumber, agentVersionCreateRequest.contactNumber) && + Objects.equals(this.inbound, agentVersionCreateRequest.inbound) && + equalsNullable(this.knowledgeBase, agentVersionCreateRequest.knowledgeBase) && + equalsNullable(this.model, agentVersionCreateRequest.model) && + Objects.equals(this.modelDetails, agentVersionCreateRequest.modelDetails) && + Objects.equals(this.livekitUrl, agentVersionCreateRequest.livekitUrl) && + Objects.equals(this.livekitApiKey, agentVersionCreateRequest.livekitApiKey) && + Objects.equals(this.livekitApiSecret, agentVersionCreateRequest.livekitApiSecret) && + Objects.equals(this.livekitAgentName, agentVersionCreateRequest.livekitAgentName) && + Objects.equals(this.livekitConfigJson, agentVersionCreateRequest.livekitConfigJson) && + Objects.equals(this.livekitMaxConcurrency, agentVersionCreateRequest.livekitMaxConcurrency) && + Objects.equals(this.commitMessage, agentVersionCreateRequest.commitMessage) && + Objects.equals(this.observabilityEnabled, agentVersionCreateRequest.observabilityEnabled); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(agentName, agentType, hashCodeNullable(description), hashCodeNullable(provider), hashCodeNullable(apiKey), hashCodeNullable(assistantId), hashCodeNullable(authenticationMethod), hashCodeNullable(language), hashCodeNullable(languages), hashCodeNullable(contactNumber), inbound, hashCodeNullable(knowledgeBase), hashCodeNullable(model), modelDetails, livekitUrl, livekitApiKey, livekitApiSecret, livekitAgentName, livekitConfigJson, livekitMaxConcurrency, commitMessage, observabilityEnabled); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentVersionCreateRequest {\n"); + sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" assistantId: ").append(toIndentedString(assistantId)).append("\n"); + sb.append(" authenticationMethod: ").append(toIndentedString(authenticationMethod)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" contactNumber: ").append(toIndentedString(contactNumber)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" knowledgeBase: ").append(toIndentedString(knowledgeBase)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelDetails: ").append(toIndentedString(modelDetails)).append("\n"); + sb.append(" livekitUrl: ").append(toIndentedString(livekitUrl)).append("\n"); + sb.append(" livekitApiKey: ").append(toIndentedString(livekitApiKey)).append("\n"); + sb.append(" livekitApiSecret: ").append(toIndentedString(livekitApiSecret)).append("\n"); + sb.append(" livekitAgentName: ").append(toIndentedString(livekitAgentName)).append("\n"); + sb.append(" livekitConfigJson: ").append(toIndentedString(livekitConfigJson)).append("\n"); + sb.append(" livekitMaxConcurrency: ").append(toIndentedString(livekitMaxConcurrency)).append("\n"); + sb.append(" commitMessage: ").append(toIndentedString(commitMessage)).append("\n"); + sb.append(" observabilityEnabled: ").append(toIndentedString(observabilityEnabled)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `agent_name` to the URL query string + if (getAgentName() != null) { + joiner.add(String.format("%sagent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentName())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `api_key` to the URL query string + if (getApiKey() != null) { + joiner.add(String.format("%sapi_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApiKey())))); + } + + // add `assistant_id` to the URL query string + if (getAssistantId() != null) { + joiner.add(String.format("%sassistant_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssistantId())))); + } + + // add `authentication_method` to the URL query string + if (getAuthenticationMethod() != null) { + joiner.add(String.format("%sauthentication_method%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAuthenticationMethod())))); + } + + // add `language` to the URL query string + if (getLanguage() != null) { + joiner.add(String.format("%slanguage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguage())))); + } + + // add `languages` to the URL query string + if (getLanguages() != null) { + for (int i = 0; i < getLanguages().size(); i++) { + joiner.add(String.format("%slanguages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLanguages().get(i))))); + } + } + + // add `contact_number` to the URL query string + if (getContactNumber() != null) { + joiner.add(String.format("%scontact_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContactNumber())))); + } + + // add `inbound` to the URL query string + if (getInbound() != null) { + joiner.add(String.format("%sinbound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInbound())))); + } + + // add `knowledge_base` to the URL query string + if (getKnowledgeBase() != null) { + joiner.add(String.format("%sknowledge_base%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKnowledgeBase())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `model_details` to the URL query string + if (getModelDetails() != null) { + for (String _key : getModelDetails().keySet()) { + joiner.add(String.format("%smodel_details%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModelDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModelDetails().get(_key))))); + } + } + + // add `livekit_url` to the URL query string + if (getLivekitUrl() != null) { + joiner.add(String.format("%slivekit_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitUrl())))); + } + + // add `livekit_api_key` to the URL query string + if (getLivekitApiKey() != null) { + joiner.add(String.format("%slivekit_api_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitApiKey())))); + } + + // add `livekit_api_secret` to the URL query string + if (getLivekitApiSecret() != null) { + joiner.add(String.format("%slivekit_api_secret%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitApiSecret())))); + } + + // add `livekit_agent_name` to the URL query string + if (getLivekitAgentName() != null) { + joiner.add(String.format("%slivekit_agent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitAgentName())))); + } + + // add `livekit_config_json` to the URL query string + if (getLivekitConfigJson() != null) { + for (String _key : getLivekitConfigJson().keySet()) { + joiner.add(String.format("%slivekit_config_json%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLivekitConfigJson().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLivekitConfigJson().get(_key))))); + } + } + + // add `livekit_max_concurrency` to the URL query string + if (getLivekitMaxConcurrency() != null) { + joiner.add(String.format("%slivekit_max_concurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLivekitMaxConcurrency())))); + } + + // add `commit_message` to the URL query string + if (getCommitMessage() != null) { + joiner.add(String.format("%scommit_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCommitMessage())))); + } + + // add `observability_enabled` to the URL query string + if (getObservabilityEnabled() != null) { + joiner.add(String.format("%sobservability_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getObservabilityEnabled())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateResponse.java new file mode 100644 index 0000000..1249717 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionCreateResponse.java @@ -0,0 +1,186 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AgentVersionResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentVersionCreateResponse + */ +@JsonPropertyOrder({ + AgentVersionCreateResponse.JSON_PROPERTY_MESSAGE, + AgentVersionCreateResponse.JSON_PROPERTY_VERSION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentVersionCreateResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private AgentVersionResponse version; + + public AgentVersionCreateResponse() { + } + + @JsonCreator + public AgentVersionCreateResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + public AgentVersionCreateResponse version(@javax.annotation.Nullable AgentVersionResponse version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentVersionResponse getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(@javax.annotation.Nullable AgentVersionResponse version) { + this.version = version; + } + + + /** + * Return true if this AgentVersionCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentVersionCreateResponse agentVersionCreateResponse = (AgentVersionCreateResponse) o; + return Objects.equals(this.message, agentVersionCreateResponse.message) && + Objects.equals(this.version, agentVersionCreateResponse.version); + } + + @Override + public int hashCode() { + return Objects.hash(message, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentVersionCreateResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(getVersion().toUrlQueryString(prefix + "version" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionDeleteResponse.java new file mode 100644 index 0000000..9fa201d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionDeleteResponse.java @@ -0,0 +1,149 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentVersionDeleteResponse + */ +@JsonPropertyOrder({ + AgentVersionDeleteResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentVersionDeleteResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public AgentVersionDeleteResponse() { + } + + @JsonCreator + public AgentVersionDeleteResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Return true if this AgentVersionDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentVersionDeleteResponse agentVersionDeleteResponse = (AgentVersionDeleteResponse) o; + return Objects.equals(this.message, agentVersionDeleteResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentVersionDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionListResponse.java new file mode 100644 index 0000000..d7bbb9f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionListResponse.java @@ -0,0 +1,622 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentVersionListResponse + */ +@JsonPropertyOrder({ + AgentVersionListResponse.JSON_PROPERTY_ID, + AgentVersionListResponse.JSON_PROPERTY_VERSION_NUMBER, + AgentVersionListResponse.JSON_PROPERTY_VERSION_NAME, + AgentVersionListResponse.JSON_PROPERTY_VERSION_NAME_DISPLAY, + AgentVersionListResponse.JSON_PROPERTY_STATUS, + AgentVersionListResponse.JSON_PROPERTY_STATUS_DISPLAY, + AgentVersionListResponse.JSON_PROPERTY_SCORE, + AgentVersionListResponse.JSON_PROPERTY_TEST_COUNT, + AgentVersionListResponse.JSON_PROPERTY_PASS_RATE, + AgentVersionListResponse.JSON_PROPERTY_DESCRIPTION, + AgentVersionListResponse.JSON_PROPERTY_COMMIT_MESSAGE, + AgentVersionListResponse.JSON_PROPERTY_IS_ACTIVE, + AgentVersionListResponse.JSON_PROPERTY_IS_LATEST, + AgentVersionListResponse.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentVersionListResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_VERSION_NUMBER = "version_number"; + @javax.annotation.Nullable + private Integer versionNumber; + + public static final String JSON_PROPERTY_VERSION_NAME = "version_name"; + private JsonNullable versionName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_VERSION_NAME_DISPLAY = "version_name_display"; + @javax.annotation.Nullable + private String versionNameDisplay; + + /** + * Current status of this version + */ + public enum StatusEnum { + DRAFT(String.valueOf("draft")), + + ACTIVE(String.valueOf("active")), + + ARCHIVED(String.valueOf("archived")), + + DEPRECATED(String.valueOf("deprecated")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_STATUS_DISPLAY = "status_display"; + @javax.annotation.Nullable + private String statusDisplay; + + public static final String JSON_PROPERTY_SCORE = "score"; + private JsonNullable score = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_COUNT = "test_count"; + @javax.annotation.Nullable + private Integer testCount; + + public static final String JSON_PROPERTY_PASS_RATE = "pass_rate"; + private JsonNullable passRate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_COMMIT_MESSAGE = "commit_message"; + private JsonNullable commitMessage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_ACTIVE = "is_active"; + @javax.annotation.Nullable + private String isActive; + + public static final String JSON_PROPERTY_IS_LATEST = "is_latest"; + @javax.annotation.Nullable + private String isLatest; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public AgentVersionListResponse() { + } + + @JsonCreator + public AgentVersionListResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) Integer versionNumber, + @JsonProperty(JSON_PROPERTY_VERSION_NAME) String versionName, + @JsonProperty(JSON_PROPERTY_VERSION_NAME_DISPLAY) String versionNameDisplay, + @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, + @JsonProperty(JSON_PROPERTY_STATUS_DISPLAY) String statusDisplay, + @JsonProperty(JSON_PROPERTY_SCORE) BigDecimal score, + @JsonProperty(JSON_PROPERTY_TEST_COUNT) Integer testCount, + @JsonProperty(JSON_PROPERTY_PASS_RATE) BigDecimal passRate, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) String commitMessage, + @JsonProperty(JSON_PROPERTY_IS_ACTIVE) String isActive, + @JsonProperty(JSON_PROPERTY_IS_LATEST) String isLatest, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.versionNumber = versionNumber; + this.versionName = versionName == null ? JsonNullable.undefined() : JsonNullable.of(versionName); + this.versionNameDisplay = versionNameDisplay; + this.status = status; + this.statusDisplay = statusDisplay; + this.score = score == null ? JsonNullable.undefined() : JsonNullable.of(score); + this.testCount = testCount; + this.passRate = passRate == null ? JsonNullable.undefined() : JsonNullable.of(passRate); + this.description = description; + this.commitMessage = commitMessage == null ? JsonNullable.undefined() : JsonNullable.of(commitMessage); + this.isActive = isActive; + this.isLatest = isLatest; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Version number of the agent + * @return versionNumber + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVersionNumber() { + return versionNumber; + } + + + + + /** + * Human-readable version name (e.g., 'v1.2.3') + * @return versionName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getVersionName() { + + if (versionName == null) { + versionName = JsonNullable.undefined(); + } + return versionName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VERSION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getVersionName_JsonNullable() { + return versionName; + } + + @JsonProperty(JSON_PROPERTY_VERSION_NAME) + private void setVersionName_JsonNullable(JsonNullable versionName) { + this.versionName = versionName; + } + + + + /** + * Get versionNameDisplay + * @return versionNameDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_NAME_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersionNameDisplay() { + return versionNameDisplay; + } + + + + + /** + * Current status of this version + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + + + /** + * Get statusDisplay + * @return statusDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusDisplay() { + return statusDisplay; + } + + + + + /** + * Performance score (0.0 to 10.0) + * @return score + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getScore() { + + if (score == null) { + score = JsonNullable.undefined(); + } + return score.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScore_JsonNullable() { + return score; + } + + @JsonProperty(JSON_PROPERTY_SCORE) + private void setScore_JsonNullable(JsonNullable score) { + this.score = score; + } + + + + /** + * Number of tests run for this version + * @return testCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTestCount() { + return testCount; + } + + + + + /** + * Test pass rate percentage + * @return passRate + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getPassRate() { + + if (passRate == null) { + passRate = JsonNullable.undefined(); + } + return passRate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PASS_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPassRate_JsonNullable() { + return passRate; + } + + @JsonProperty(JSON_PROPERTY_PASS_RATE) + private void setPassRate_JsonNullable(JsonNullable passRate) { + this.passRate = passRate; + } + + + + /** + * Description of changes in this version + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + + + /** + * Commit message for the agent version + * @return commitMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCommitMessage() { + + if (commitMessage == null) { + commitMessage = JsonNullable.undefined(); + } + return commitMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCommitMessage_JsonNullable() { + return commitMessage; + } + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + private void setCommitMessage_JsonNullable(JsonNullable commitMessage) { + this.commitMessage = commitMessage; + } + + + + /** + * Get isActive + * @return isActive + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIsActive() { + return isActive; + } + + + + + /** + * Get isLatest + * @return isLatest + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_LATEST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIsLatest() { + return isLatest; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this AgentVersionListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentVersionListResponse agentVersionListResponse = (AgentVersionListResponse) o; + return Objects.equals(this.id, agentVersionListResponse.id) && + Objects.equals(this.versionNumber, agentVersionListResponse.versionNumber) && + equalsNullable(this.versionName, agentVersionListResponse.versionName) && + Objects.equals(this.versionNameDisplay, agentVersionListResponse.versionNameDisplay) && + Objects.equals(this.status, agentVersionListResponse.status) && + Objects.equals(this.statusDisplay, agentVersionListResponse.statusDisplay) && + equalsNullable(this.score, agentVersionListResponse.score) && + Objects.equals(this.testCount, agentVersionListResponse.testCount) && + equalsNullable(this.passRate, agentVersionListResponse.passRate) && + Objects.equals(this.description, agentVersionListResponse.description) && + equalsNullable(this.commitMessage, agentVersionListResponse.commitMessage) && + Objects.equals(this.isActive, agentVersionListResponse.isActive) && + Objects.equals(this.isLatest, agentVersionListResponse.isLatest) && + Objects.equals(this.createdAt, agentVersionListResponse.createdAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, versionNumber, hashCodeNullable(versionName), versionNameDisplay, status, statusDisplay, hashCodeNullable(score), testCount, hashCodeNullable(passRate), description, hashCodeNullable(commitMessage), isActive, isLatest, createdAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentVersionListResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" versionNumber: ").append(toIndentedString(versionNumber)).append("\n"); + sb.append(" versionName: ").append(toIndentedString(versionName)).append("\n"); + sb.append(" versionNameDisplay: ").append(toIndentedString(versionNameDisplay)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusDisplay: ").append(toIndentedString(statusDisplay)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" testCount: ").append(toIndentedString(testCount)).append("\n"); + sb.append(" passRate: ").append(toIndentedString(passRate)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" commitMessage: ").append(toIndentedString(commitMessage)).append("\n"); + sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); + sb.append(" isLatest: ").append(toIndentedString(isLatest)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `version_number` to the URL query string + if (getVersionNumber() != null) { + joiner.add(String.format("%sversion_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNumber())))); + } + + // add `version_name` to the URL query string + if (getVersionName() != null) { + joiner.add(String.format("%sversion_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionName())))); + } + + // add `version_name_display` to the URL query string + if (getVersionNameDisplay() != null) { + joiner.add(String.format("%sversion_name_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNameDisplay())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `status_display` to the URL query string + if (getStatusDisplay() != null) { + joiner.add(String.format("%sstatus_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusDisplay())))); + } + + // add `score` to the URL query string + if (getScore() != null) { + joiner.add(String.format("%sscore%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScore())))); + } + + // add `test_count` to the URL query string + if (getTestCount() != null) { + joiner.add(String.format("%stest_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestCount())))); + } + + // add `pass_rate` to the URL query string + if (getPassRate() != null) { + joiner.add(String.format("%spass_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassRate())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `commit_message` to the URL query string + if (getCommitMessage() != null) { + joiner.add(String.format("%scommit_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCommitMessage())))); + } + + // add `is_active` to the URL query string + if (getIsActive() != null) { + joiner.add(String.format("%sis_active%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsActive())))); + } + + // add `is_latest` to the URL query string + if (getIsLatest() != null) { + joiner.add(String.format("%sis_latest%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsLatest())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionResponse.java new file mode 100644 index 0000000..56eb749 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionResponse.java @@ -0,0 +1,781 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentVersionResponse + */ +@JsonPropertyOrder({ + AgentVersionResponse.JSON_PROPERTY_ID, + AgentVersionResponse.JSON_PROPERTY_VERSION_NUMBER, + AgentVersionResponse.JSON_PROPERTY_VERSION_NAME, + AgentVersionResponse.JSON_PROPERTY_VERSION_NAME_DISPLAY, + AgentVersionResponse.JSON_PROPERTY_STATUS, + AgentVersionResponse.JSON_PROPERTY_STATUS_DISPLAY, + AgentVersionResponse.JSON_PROPERTY_SCORE, + AgentVersionResponse.JSON_PROPERTY_TEST_COUNT, + AgentVersionResponse.JSON_PROPERTY_PASS_RATE, + AgentVersionResponse.JSON_PROPERTY_DESCRIPTION, + AgentVersionResponse.JSON_PROPERTY_COMMIT_MESSAGE, + AgentVersionResponse.JSON_PROPERTY_RELEASE_NOTES, + AgentVersionResponse.JSON_PROPERTY_AGENT_DEFINITION, + AgentVersionResponse.JSON_PROPERTY_ORGANIZATION, + AgentVersionResponse.JSON_PROPERTY_CONFIGURATION_SNAPSHOT, + AgentVersionResponse.JSON_PROPERTY_IS_ACTIVE, + AgentVersionResponse.JSON_PROPERTY_IS_LATEST, + AgentVersionResponse.JSON_PROPERTY_CREATED_AT, + AgentVersionResponse.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentVersionResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_VERSION_NUMBER = "version_number"; + @javax.annotation.Nullable + private Integer versionNumber; + + public static final String JSON_PROPERTY_VERSION_NAME = "version_name"; + private JsonNullable versionName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_VERSION_NAME_DISPLAY = "version_name_display"; + @javax.annotation.Nullable + private String versionNameDisplay; + + /** + * Current status of this version + */ + public enum StatusEnum { + DRAFT(String.valueOf("draft")), + + ACTIVE(String.valueOf("active")), + + ARCHIVED(String.valueOf("archived")), + + DEPRECATED(String.valueOf("deprecated")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_STATUS_DISPLAY = "status_display"; + @javax.annotation.Nullable + private String statusDisplay; + + public static final String JSON_PROPERTY_SCORE = "score"; + private JsonNullable score = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_COUNT = "test_count"; + @javax.annotation.Nullable + private Integer testCount; + + public static final String JSON_PROPERTY_PASS_RATE = "pass_rate"; + private JsonNullable passRate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_COMMIT_MESSAGE = "commit_message"; + private JsonNullable commitMessage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RELEASE_NOTES = "release_notes"; + private JsonNullable releaseNotes = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_DEFINITION = "agent_definition"; + @javax.annotation.Nullable + private UUID agentDefinition; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_CONFIGURATION_SNAPSHOT = "configuration_snapshot"; + @javax.annotation.Nullable + private Map configurationSnapshot = new HashMap<>(); + + public static final String JSON_PROPERTY_IS_ACTIVE = "is_active"; + @javax.annotation.Nullable + private String isActive; + + public static final String JSON_PROPERTY_IS_LATEST = "is_latest"; + @javax.annotation.Nullable + private String isLatest; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public AgentVersionResponse() { + } + + @JsonCreator + public AgentVersionResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) Integer versionNumber, + @JsonProperty(JSON_PROPERTY_VERSION_NAME) String versionName, + @JsonProperty(JSON_PROPERTY_VERSION_NAME_DISPLAY) String versionNameDisplay, + @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, + @JsonProperty(JSON_PROPERTY_STATUS_DISPLAY) String statusDisplay, + @JsonProperty(JSON_PROPERTY_SCORE) BigDecimal score, + @JsonProperty(JSON_PROPERTY_TEST_COUNT) Integer testCount, + @JsonProperty(JSON_PROPERTY_PASS_RATE) BigDecimal passRate, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) String commitMessage, + @JsonProperty(JSON_PROPERTY_RELEASE_NOTES) String releaseNotes, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) UUID agentDefinition, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_CONFIGURATION_SNAPSHOT) Map configurationSnapshot, + @JsonProperty(JSON_PROPERTY_IS_ACTIVE) String isActive, + @JsonProperty(JSON_PROPERTY_IS_LATEST) String isLatest, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.versionNumber = versionNumber; + this.versionName = versionName == null ? JsonNullable.undefined() : JsonNullable.of(versionName); + this.versionNameDisplay = versionNameDisplay; + this.status = status; + this.statusDisplay = statusDisplay; + this.score = score == null ? JsonNullable.undefined() : JsonNullable.of(score); + this.testCount = testCount; + this.passRate = passRate == null ? JsonNullable.undefined() : JsonNullable.of(passRate); + this.description = description; + this.commitMessage = commitMessage == null ? JsonNullable.undefined() : JsonNullable.of(commitMessage); + this.releaseNotes = releaseNotes == null ? JsonNullable.undefined() : JsonNullable.of(releaseNotes); + this.agentDefinition = agentDefinition; + this.organization = organization; + this.configurationSnapshot = configurationSnapshot; + this.isActive = isActive; + this.isLatest = isLatest; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Version number of the agent + * @return versionNumber + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVersionNumber() { + return versionNumber; + } + + + + + /** + * Human-readable version name (e.g., 'v1.2.3') + * @return versionName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getVersionName() { + + if (versionName == null) { + versionName = JsonNullable.undefined(); + } + return versionName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VERSION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getVersionName_JsonNullable() { + return versionName; + } + + @JsonProperty(JSON_PROPERTY_VERSION_NAME) + private void setVersionName_JsonNullable(JsonNullable versionName) { + this.versionName = versionName; + } + + + + /** + * Get versionNameDisplay + * @return versionNameDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_NAME_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersionNameDisplay() { + return versionNameDisplay; + } + + + + + /** + * Current status of this version + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + + + /** + * Get statusDisplay + * @return statusDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusDisplay() { + return statusDisplay; + } + + + + + /** + * Performance score (0.0 to 10.0) + * @return score + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getScore() { + + if (score == null) { + score = JsonNullable.undefined(); + } + return score.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScore_JsonNullable() { + return score; + } + + @JsonProperty(JSON_PROPERTY_SCORE) + private void setScore_JsonNullable(JsonNullable score) { + this.score = score; + } + + + + /** + * Number of tests run for this version + * @return testCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTestCount() { + return testCount; + } + + + + + /** + * Test pass rate percentage + * @return passRate + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getPassRate() { + + if (passRate == null) { + passRate = JsonNullable.undefined(); + } + return passRate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PASS_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPassRate_JsonNullable() { + return passRate; + } + + @JsonProperty(JSON_PROPERTY_PASS_RATE) + private void setPassRate_JsonNullable(JsonNullable passRate) { + this.passRate = passRate; + } + + + + /** + * Description of changes in this version + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + + + /** + * Commit message for the agent version + * @return commitMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCommitMessage() { + + if (commitMessage == null) { + commitMessage = JsonNullable.undefined(); + } + return commitMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCommitMessage_JsonNullable() { + return commitMessage; + } + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + private void setCommitMessage_JsonNullable(JsonNullable commitMessage) { + this.commitMessage = commitMessage; + } + + + + /** + * Detailed release notes for this version + * @return releaseNotes + */ + @javax.annotation.Nullable + @JsonIgnore + public String getReleaseNotes() { + + if (releaseNotes == null) { + releaseNotes = JsonNullable.undefined(); + } + return releaseNotes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RELEASE_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReleaseNotes_JsonNullable() { + return releaseNotes; + } + + @JsonProperty(JSON_PROPERTY_RELEASE_NOTES) + private void setReleaseNotes_JsonNullable(JsonNullable releaseNotes) { + this.releaseNotes = releaseNotes; + } + + + + /** + * Parent agent definition + * @return agentDefinition + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAgentDefinition() { + return agentDefinition; + } + + + + + /** + * Organization this version belongs to + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Snapshot of agent configuration at this version + * @return configurationSnapshot + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIGURATION_SNAPSHOT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigurationSnapshot() { + return configurationSnapshot; + } + + + + + /** + * Get isActive + * @return isActive + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIsActive() { + return isActive; + } + + + + + /** + * Get isLatest + * @return isLatest + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_LATEST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIsLatest() { + return isLatest; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Return true if this AgentVersionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentVersionResponse agentVersionResponse = (AgentVersionResponse) o; + return Objects.equals(this.id, agentVersionResponse.id) && + Objects.equals(this.versionNumber, agentVersionResponse.versionNumber) && + equalsNullable(this.versionName, agentVersionResponse.versionName) && + Objects.equals(this.versionNameDisplay, agentVersionResponse.versionNameDisplay) && + Objects.equals(this.status, agentVersionResponse.status) && + Objects.equals(this.statusDisplay, agentVersionResponse.statusDisplay) && + equalsNullable(this.score, agentVersionResponse.score) && + Objects.equals(this.testCount, agentVersionResponse.testCount) && + equalsNullable(this.passRate, agentVersionResponse.passRate) && + Objects.equals(this.description, agentVersionResponse.description) && + equalsNullable(this.commitMessage, agentVersionResponse.commitMessage) && + equalsNullable(this.releaseNotes, agentVersionResponse.releaseNotes) && + Objects.equals(this.agentDefinition, agentVersionResponse.agentDefinition) && + Objects.equals(this.organization, agentVersionResponse.organization) && + Objects.equals(this.configurationSnapshot, agentVersionResponse.configurationSnapshot) && + Objects.equals(this.isActive, agentVersionResponse.isActive) && + Objects.equals(this.isLatest, agentVersionResponse.isLatest) && + Objects.equals(this.createdAt, agentVersionResponse.createdAt) && + Objects.equals(this.updatedAt, agentVersionResponse.updatedAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, versionNumber, hashCodeNullable(versionName), versionNameDisplay, status, statusDisplay, hashCodeNullable(score), testCount, hashCodeNullable(passRate), description, hashCodeNullable(commitMessage), hashCodeNullable(releaseNotes), agentDefinition, organization, configurationSnapshot, isActive, isLatest, createdAt, updatedAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentVersionResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" versionNumber: ").append(toIndentedString(versionNumber)).append("\n"); + sb.append(" versionName: ").append(toIndentedString(versionName)).append("\n"); + sb.append(" versionNameDisplay: ").append(toIndentedString(versionNameDisplay)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusDisplay: ").append(toIndentedString(statusDisplay)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" testCount: ").append(toIndentedString(testCount)).append("\n"); + sb.append(" passRate: ").append(toIndentedString(passRate)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" commitMessage: ").append(toIndentedString(commitMessage)).append("\n"); + sb.append(" releaseNotes: ").append(toIndentedString(releaseNotes)).append("\n"); + sb.append(" agentDefinition: ").append(toIndentedString(agentDefinition)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" configurationSnapshot: ").append(toIndentedString(configurationSnapshot)).append("\n"); + sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); + sb.append(" isLatest: ").append(toIndentedString(isLatest)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `version_number` to the URL query string + if (getVersionNumber() != null) { + joiner.add(String.format("%sversion_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNumber())))); + } + + // add `version_name` to the URL query string + if (getVersionName() != null) { + joiner.add(String.format("%sversion_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionName())))); + } + + // add `version_name_display` to the URL query string + if (getVersionNameDisplay() != null) { + joiner.add(String.format("%sversion_name_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNameDisplay())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `status_display` to the URL query string + if (getStatusDisplay() != null) { + joiner.add(String.format("%sstatus_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusDisplay())))); + } + + // add `score` to the URL query string + if (getScore() != null) { + joiner.add(String.format("%sscore%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScore())))); + } + + // add `test_count` to the URL query string + if (getTestCount() != null) { + joiner.add(String.format("%stest_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestCount())))); + } + + // add `pass_rate` to the URL query string + if (getPassRate() != null) { + joiner.add(String.format("%spass_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassRate())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `commit_message` to the URL query string + if (getCommitMessage() != null) { + joiner.add(String.format("%scommit_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCommitMessage())))); + } + + // add `release_notes` to the URL query string + if (getReleaseNotes() != null) { + joiner.add(String.format("%srelease_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReleaseNotes())))); + } + + // add `agent_definition` to the URL query string + if (getAgentDefinition() != null) { + joiner.add(String.format("%sagent_definition%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinition())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `configuration_snapshot` to the URL query string + if (getConfigurationSnapshot() != null) { + for (String _key : getConfigurationSnapshot().keySet()) { + joiner.add(String.format("%sconfiguration_snapshot%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigurationSnapshot().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigurationSnapshot().get(_key))))); + } + } + + // add `is_active` to the URL query string + if (getIsActive() != null) { + joiner.add(String.format("%sis_active%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsActive())))); + } + + // add `is_latest` to the URL query string + if (getIsLatest() != null) { + joiner.add(String.format("%sis_latest%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsLatest())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionRestoreResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionRestoreResponse.java new file mode 100644 index 0000000..2547401 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AgentVersionRestoreResponse.java @@ -0,0 +1,220 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AgentVersionResponse; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AgentVersionRestoreResponse + */ +@JsonPropertyOrder({ + AgentVersionRestoreResponse.JSON_PROPERTY_MESSAGE, + AgentVersionRestoreResponse.JSON_PROPERTY_AGENT, + AgentVersionRestoreResponse.JSON_PROPERTY_VERSION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AgentVersionRestoreResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_AGENT = "agent"; + @javax.annotation.Nullable + private Map agent = new HashMap<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private AgentVersionResponse version; + + public AgentVersionRestoreResponse() { + } + + @JsonCreator + public AgentVersionRestoreResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_AGENT) Map agent + ) { + this(); + this.message = message; + this.agent = agent; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get agent + * @return agent + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAgent() { + return agent; + } + + + + + public AgentVersionRestoreResponse version(@javax.annotation.Nullable AgentVersionResponse version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AgentVersionResponse getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(@javax.annotation.Nullable AgentVersionResponse version) { + this.version = version; + } + + + /** + * Return true if this AgentVersionRestoreResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentVersionRestoreResponse agentVersionRestoreResponse = (AgentVersionRestoreResponse) o; + return Objects.equals(this.message, agentVersionRestoreResponse.message) && + Objects.equals(this.agent, agentVersionRestoreResponse.agent) && + Objects.equals(this.version, agentVersionRestoreResponse.version); + } + + @Override + public int hashCode() { + return Objects.hash(message, agent, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgentVersionRestoreResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" agent: ").append(toIndentedString(agent)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `agent` to the URL query string + if (getAgent() != null) { + for (String _key : getAgent().keySet()) { + joiner.add(String.format("%sagent%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAgent().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAgent().get(_key))))); + } + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(getVersion().toUrlQueryString(prefix + "version" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AllActiveTests.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AllActiveTests.java new file mode 100644 index 0000000..5740ff3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AllActiveTests.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AllActiveTests + */ +@JsonPropertyOrder({ + AllActiveTests.JSON_PROPERTY_ACTIVE_TESTS, + AllActiveTests.JSON_PROPERTY_TOTAL_ACTIVE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AllActiveTests { + public static final String JSON_PROPERTY_ACTIVE_TESTS = "active_tests"; + @javax.annotation.Nonnull + private Map activeTests = new HashMap<>(); + + public static final String JSON_PROPERTY_TOTAL_ACTIVE = "total_active"; + @javax.annotation.Nonnull + private Integer totalActive; + + public AllActiveTests() { + } + + public AllActiveTests activeTests(@javax.annotation.Nonnull Map activeTests) { + this.activeTests = activeTests; + return this; + } + + public AllActiveTests putActiveTestsItem(String key, String activeTestsItem) { + if (this.activeTests == null) { + this.activeTests = new HashMap<>(); + } + this.activeTests.put(key, activeTestsItem); + return this; + } + + /** + * Get activeTests + * @return activeTests + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTIVE_TESTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getActiveTests() { + return activeTests; + } + + + @JsonProperty(JSON_PROPERTY_ACTIVE_TESTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setActiveTests(@javax.annotation.Nonnull Map activeTests) { + this.activeTests = activeTests; + } + + + public AllActiveTests totalActive(@javax.annotation.Nonnull Integer totalActive) { + this.totalActive = totalActive; + return this; + } + + /** + * Get totalActive + * @return totalActive + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_ACTIVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalActive() { + return totalActive; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ACTIVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalActive(@javax.annotation.Nonnull Integer totalActive) { + this.totalActive = totalActive; + } + + + /** + * Return true if this AllActiveTests object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllActiveTests allActiveTests = (AllActiveTests) o; + return Objects.equals(this.activeTests, allActiveTests.activeTests) && + Objects.equals(this.totalActive, allActiveTests.totalActive); + } + + @Override + public int hashCode() { + return Objects.hash(activeTests, totalActive); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllActiveTests {\n"); + sb.append(" activeTests: ").append(toIndentedString(activeTests)).append("\n"); + sb.append(" totalActive: ").append(toIndentedString(totalActive)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `active_tests` to the URL query string + if (getActiveTests() != null) { + for (String _key : getActiveTests().keySet()) { + joiner.add(String.format("%sactive_tests%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getActiveTests().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getActiveTests().get(_key))))); + } + } + + // add `total_active` to the URL query string + if (getTotalActive() != null) { + joiner.add(String.format("%stotal_active%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalActive())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelResponse.java new file mode 100644 index 0000000..70385d7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelResponse.java @@ -0,0 +1,332 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AnnotationLabelResponse + */ +@JsonPropertyOrder({ + AnnotationLabelResponse.JSON_PROPERTY_ID, + AnnotationLabelResponse.JSON_PROPERTY_NAME, + AnnotationLabelResponse.JSON_PROPERTY_TYPE, + AnnotationLabelResponse.JSON_PROPERTY_DESCRIPTION, + AnnotationLabelResponse.JSON_PROPERTY_SETTINGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationLabelResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @javax.annotation.Nullable + private Map settings = new HashMap<>(); + + public AnnotationLabelResponse() { + } + + public AnnotationLabelResponse id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public AnnotationLabelResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AnnotationLabelResponse type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public AnnotationLabelResponse description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AnnotationLabelResponse settings(@javax.annotation.Nullable Map settings) { + this.settings = settings; + return this; + } + + public AnnotationLabelResponse putSettingsItem(String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Get settings + * @return settings + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSettings(@javax.annotation.Nullable Map settings) { + this.settings = settings; + } + + + /** + * Return true if this AnnotationLabelResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnnotationLabelResponse annotationLabelResponse = (AnnotationLabelResponse) o; + return Objects.equals(this.id, annotationLabelResponse.id) && + Objects.equals(this.name, annotationLabelResponse.name) && + Objects.equals(this.type, annotationLabelResponse.type) && + equalsNullable(this.description, annotationLabelResponse.description) && + Objects.equals(this.settings, annotationLabelResponse.settings); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type, hashCodeNullable(description), settings); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotationLabelResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `settings` to the URL query string + if (getSettings() != null) { + for (String _key : getSettings().keySet()) { + joiner.add(String.format("%ssettings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSettings().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSettings().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelRestoreResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelRestoreResponse.java new file mode 100644 index 0000000..40ded94 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationLabelRestoreResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AnnotationsLabels; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AnnotationLabelRestoreResponse + */ +@JsonPropertyOrder({ + AnnotationLabelRestoreResponse.JSON_PROPERTY_STATUS, + AnnotationLabelRestoreResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationLabelRestoreResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private AnnotationsLabels result; + + public AnnotationLabelRestoreResponse() { + } + + public AnnotationLabelRestoreResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public AnnotationLabelRestoreResponse result(@javax.annotation.Nonnull AnnotationsLabels result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AnnotationsLabels getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull AnnotationsLabels result) { + this.result = result; + } + + + /** + * Return true if this AnnotationLabelRestoreResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnnotationLabelRestoreResponse annotationLabelRestoreResponse = (AnnotationLabelRestoreResponse) o; + return Objects.equals(this.status, annotationLabelRestoreResponse.status) && + Objects.equals(this.result, annotationLabelRestoreResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotationLabelRestoreResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationQueue.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationQueue.java new file mode 100644 index 0000000..38c9d1b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationQueue.java @@ -0,0 +1,1240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAnnotatorNested; +import com.futureagi.sdk.model.QueueLabelNested; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AnnotationQueue + */ +@JsonPropertyOrder({ + AnnotationQueue.JSON_PROPERTY_ID, + AnnotationQueue.JSON_PROPERTY_NAME, + AnnotationQueue.JSON_PROPERTY_DESCRIPTION, + AnnotationQueue.JSON_PROPERTY_INSTRUCTIONS, + AnnotationQueue.JSON_PROPERTY_STATUS, + AnnotationQueue.JSON_PROPERTY_ASSIGNMENT_STRATEGY, + AnnotationQueue.JSON_PROPERTY_ANNOTATIONS_REQUIRED, + AnnotationQueue.JSON_PROPERTY_RESERVATION_TIMEOUT_MINUTES, + AnnotationQueue.JSON_PROPERTY_REQUIRES_REVIEW, + AnnotationQueue.JSON_PROPERTY_AUTO_ASSIGN, + AnnotationQueue.JSON_PROPERTY_ORGANIZATION, + AnnotationQueue.JSON_PROPERTY_PROJECT, + AnnotationQueue.JSON_PROPERTY_DATASET, + AnnotationQueue.JSON_PROPERTY_AGENT_DEFINITION, + AnnotationQueue.JSON_PROPERTY_IS_DEFAULT, + AnnotationQueue.JSON_PROPERTY_LABELS, + AnnotationQueue.JSON_PROPERTY_ANNOTATORS, + AnnotationQueue.JSON_PROPERTY_LABEL_IDS, + AnnotationQueue.JSON_PROPERTY_ANNOTATOR_IDS, + AnnotationQueue.JSON_PROPERTY_ANNOTATOR_ROLES, + AnnotationQueue.JSON_PROPERTY_LABEL_COUNT, + AnnotationQueue.JSON_PROPERTY_ANNOTATOR_COUNT, + AnnotationQueue.JSON_PROPERTY_ITEM_COUNT, + AnnotationQueue.JSON_PROPERTY_COMPLETED_COUNT, + AnnotationQueue.JSON_PROPERTY_CREATED_BY, + AnnotationQueue.JSON_PROPERTY_CREATED_BY_NAME, + AnnotationQueue.JSON_PROPERTY_VIEWER_ROLE, + AnnotationQueue.JSON_PROPERTY_VIEWER_ROLES, + AnnotationQueue.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationQueue { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + private JsonNullable instructions = JsonNullable.undefined(); + + /** + * Gets or Sets status + */ + public enum StatusEnum { + DRAFT(String.valueOf("draft")), + + ACTIVE(String.valueOf("active")), + + PAUSED(String.valueOf("paused")), + + COMPLETED(String.valueOf("completed")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + /** + * Gets or Sets assignmentStrategy + */ + public enum AssignmentStrategyEnum { + MANUAL(String.valueOf("manual")), + + ROUND_ROBIN(String.valueOf("round_robin")), + + LOAD_BALANCED(String.valueOf("load_balanced")); + + private String value; + + AssignmentStrategyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssignmentStrategyEnum fromValue(String value) { + for (AssignmentStrategyEnum b : AssignmentStrategyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSIGNMENT_STRATEGY = "assignment_strategy"; + @javax.annotation.Nullable + private AssignmentStrategyEnum assignmentStrategy; + + public static final String JSON_PROPERTY_ANNOTATIONS_REQUIRED = "annotations_required"; + @javax.annotation.Nullable + private Integer annotationsRequired; + + public static final String JSON_PROPERTY_RESERVATION_TIMEOUT_MINUTES = "reservation_timeout_minutes"; + @javax.annotation.Nullable + private Integer reservationTimeoutMinutes; + + public static final String JSON_PROPERTY_REQUIRES_REVIEW = "requires_review"; + @javax.annotation.Nullable + private Boolean requiresReview; + + public static final String JSON_PROPERTY_AUTO_ASSIGN = "auto_assign"; + @javax.annotation.Nullable + private Boolean autoAssign; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_PROJECT = "project"; + private JsonNullable project = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATASET = "dataset"; + private JsonNullable dataset = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_DEFINITION = "agent_definition"; + private JsonNullable agentDefinition = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nullable + private Boolean isDefault; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nullable + private List labels = new ArrayList<>(); + + public static final String JSON_PROPERTY_ANNOTATORS = "annotators"; + @javax.annotation.Nullable + private List annotators = new ArrayList<>(); + + public static final String JSON_PROPERTY_LABEL_IDS = "label_ids"; + @javax.annotation.Nullable + private List labelIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_ANNOTATOR_IDS = "annotator_ids"; + @javax.annotation.Nullable + private List annotatorIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_ANNOTATOR_ROLES = "annotator_roles"; + @javax.annotation.Nullable + private Map> annotatorRoles = new HashMap<>(); + + public static final String JSON_PROPERTY_LABEL_COUNT = "label_count"; + @javax.annotation.Nullable + private Integer labelCount; + + public static final String JSON_PROPERTY_ANNOTATOR_COUNT = "annotator_count"; + @javax.annotation.Nullable + private Integer annotatorCount; + + public static final String JSON_PROPERTY_ITEM_COUNT = "item_count"; + @javax.annotation.Nullable + private Integer itemCount; + + public static final String JSON_PROPERTY_COMPLETED_COUNT = "completed_count"; + @javax.annotation.Nullable + private Integer completedCount; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private JsonNullable createdBy = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_BY_NAME = "created_by_name"; + @javax.annotation.Nullable + private String createdByName; + + public static final String JSON_PROPERTY_VIEWER_ROLE = "viewer_role"; + @javax.annotation.Nullable + private String viewerRole; + + public static final String JSON_PROPERTY_VIEWER_ROLES = "viewer_roles"; + @javax.annotation.Nullable + private String viewerRoles; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public AnnotationQueue() { + } + + @JsonCreator + public AnnotationQueue( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_PROJECT) UUID project, + @JsonProperty(JSON_PROPERTY_DATASET) UUID dataset, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) UUID agentDefinition, + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) Boolean isDefault, + @JsonProperty(JSON_PROPERTY_LABELS) List labels, + @JsonProperty(JSON_PROPERTY_ANNOTATORS) List annotators, + @JsonProperty(JSON_PROPERTY_LABEL_COUNT) Integer labelCount, + @JsonProperty(JSON_PROPERTY_ANNOTATOR_COUNT) Integer annotatorCount, + @JsonProperty(JSON_PROPERTY_ITEM_COUNT) Integer itemCount, + @JsonProperty(JSON_PROPERTY_COMPLETED_COUNT) Integer completedCount, + @JsonProperty(JSON_PROPERTY_CREATED_BY) UUID createdBy, + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) String createdByName, + @JsonProperty(JSON_PROPERTY_VIEWER_ROLE) String viewerRole, + @JsonProperty(JSON_PROPERTY_VIEWER_ROLES) String viewerRoles, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.status = status; + this.organization = organization; + this.project = project == null ? JsonNullable.undefined() : JsonNullable.of(project); + this.dataset = dataset == null ? JsonNullable.undefined() : JsonNullable.of(dataset); + this.agentDefinition = agentDefinition == null ? JsonNullable.undefined() : JsonNullable.of(agentDefinition); + this.isDefault = isDefault; + this.labels = labels; + this.annotators = annotators; + this.labelCount = labelCount; + this.annotatorCount = annotatorCount; + this.itemCount = itemCount; + this.completedCount = completedCount; + this.createdBy = createdBy == null ? JsonNullable.undefined() : JsonNullable.of(createdBy); + this.createdByName = createdByName; + this.viewerRole = viewerRole; + this.viewerRoles = viewerRoles; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public AnnotationQueue name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AnnotationQueue description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AnnotationQueue instructions(@javax.annotation.Nullable String instructions) { + this.instructions = JsonNullable.of(instructions); + return this; + } + + /** + * Get instructions + * @return instructions + */ + @javax.annotation.Nullable + @JsonIgnore + public String getInstructions() { + return instructions.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInstructions_JsonNullable() { + return instructions; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + public void setInstructions_JsonNullable(JsonNullable instructions) { + this.instructions = instructions; + } + + public void setInstructions(@javax.annotation.Nullable String instructions) { + this.instructions = JsonNullable.of(instructions); + } + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + + + public AnnotationQueue assignmentStrategy(@javax.annotation.Nullable AssignmentStrategyEnum assignmentStrategy) { + this.assignmentStrategy = assignmentStrategy; + return this; + } + + /** + * Get assignmentStrategy + * @return assignmentStrategy + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSIGNMENT_STRATEGY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssignmentStrategyEnum getAssignmentStrategy() { + return assignmentStrategy; + } + + + @JsonProperty(JSON_PROPERTY_ASSIGNMENT_STRATEGY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssignmentStrategy(@javax.annotation.Nullable AssignmentStrategyEnum assignmentStrategy) { + this.assignmentStrategy = assignmentStrategy; + } + + + public AnnotationQueue annotationsRequired(@javax.annotation.Nullable Integer annotationsRequired) { + this.annotationsRequired = annotationsRequired; + return this; + } + + /** + * Get annotationsRequired + * minimum: -2147483648 + * maximum: 2147483647 + * @return annotationsRequired + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAnnotationsRequired() { + return annotationsRequired; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnotationsRequired(@javax.annotation.Nullable Integer annotationsRequired) { + this.annotationsRequired = annotationsRequired; + } + + + public AnnotationQueue reservationTimeoutMinutes(@javax.annotation.Nullable Integer reservationTimeoutMinutes) { + this.reservationTimeoutMinutes = reservationTimeoutMinutes; + return this; + } + + /** + * Get reservationTimeoutMinutes + * minimum: -2147483648 + * maximum: 2147483647 + * @return reservationTimeoutMinutes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESERVATION_TIMEOUT_MINUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getReservationTimeoutMinutes() { + return reservationTimeoutMinutes; + } + + + @JsonProperty(JSON_PROPERTY_RESERVATION_TIMEOUT_MINUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReservationTimeoutMinutes(@javax.annotation.Nullable Integer reservationTimeoutMinutes) { + this.reservationTimeoutMinutes = reservationTimeoutMinutes; + } + + + public AnnotationQueue requiresReview(@javax.annotation.Nullable Boolean requiresReview) { + this.requiresReview = requiresReview; + return this; + } + + /** + * Get requiresReview + * @return requiresReview + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRES_REVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequiresReview() { + return requiresReview; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRES_REVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiresReview(@javax.annotation.Nullable Boolean requiresReview) { + this.requiresReview = requiresReview; + } + + + public AnnotationQueue autoAssign(@javax.annotation.Nullable Boolean autoAssign) { + this.autoAssign = autoAssign; + return this; + } + + /** + * When enabled, all queue members can annotate any item without explicit assignment. + * @return autoAssign + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTO_ASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutoAssign() { + return autoAssign; + } + + + @JsonProperty(JSON_PROPERTY_AUTO_ASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutoAssign(@javax.annotation.Nullable Boolean autoAssign) { + this.autoAssign = autoAssign; + } + + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getProject() { + + if (project == null) { + project = JsonNullable.undefined(); + } + return project.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProject_JsonNullable() { + return project; + } + + @JsonProperty(JSON_PROPERTY_PROJECT) + private void setProject_JsonNullable(JsonNullable project) { + this.project = project; + } + + + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getDataset() { + + if (dataset == null) { + dataset = JsonNullable.undefined(); + } + return dataset.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDataset_JsonNullable() { + return dataset; + } + + @JsonProperty(JSON_PROPERTY_DATASET) + private void setDataset_JsonNullable(JsonNullable dataset) { + this.dataset = dataset; + } + + + + /** + * Get agentDefinition + * @return agentDefinition + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAgentDefinition() { + + if (agentDefinition == null) { + agentDefinition = JsonNullable.undefined(); + } + return agentDefinition.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentDefinition_JsonNullable() { + return agentDefinition; + } + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) + private void setAgentDefinition_JsonNullable(JsonNullable agentDefinition) { + this.agentDefinition = agentDefinition; + } + + + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDefault() { + return isDefault; + } + + + + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + + + + /** + * Get annotators + * @return annotators + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAnnotators() { + return annotators; + } + + + + + public AnnotationQueue labelIds(@javax.annotation.Nullable List labelIds) { + this.labelIds = labelIds; + return this; + } + + public AnnotationQueue addLabelIdsItem(UUID labelIdsItem) { + if (this.labelIds == null) { + this.labelIds = new ArrayList<>(); + } + this.labelIds.add(labelIdsItem); + return this; + } + + /** + * Get labelIds + * @return labelIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabelIds() { + return labelIds; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabelIds(@javax.annotation.Nullable List labelIds) { + this.labelIds = labelIds; + } + + + public AnnotationQueue annotatorIds(@javax.annotation.Nullable List annotatorIds) { + this.annotatorIds = annotatorIds; + return this; + } + + public AnnotationQueue addAnnotatorIdsItem(UUID annotatorIdsItem) { + if (this.annotatorIds == null) { + this.annotatorIds = new ArrayList<>(); + } + this.annotatorIds.add(annotatorIdsItem); + return this; + } + + /** + * Get annotatorIds + * @return annotatorIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATOR_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAnnotatorIds() { + return annotatorIds; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnotatorIds(@javax.annotation.Nullable List annotatorIds) { + this.annotatorIds = annotatorIds; + } + + + public AnnotationQueue annotatorRoles(@javax.annotation.Nullable Map> annotatorRoles) { + this.annotatorRoles = annotatorRoles; + return this; + } + + public AnnotationQueue putAnnotatorRolesItem(String key, Map annotatorRolesItem) { + if (this.annotatorRoles == null) { + this.annotatorRoles = new HashMap<>(); + } + this.annotatorRoles.put(key, annotatorRolesItem); + return this; + } + + /** + * Get annotatorRoles + * @return annotatorRoles + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATOR_ROLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getAnnotatorRoles() { + return annotatorRoles; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_ROLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnotatorRoles(@javax.annotation.Nullable Map> annotatorRoles) { + this.annotatorRoles = annotatorRoles; + } + + + /** + * Get labelCount + * @return labelCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLabelCount() { + return labelCount; + } + + + + + /** + * Get annotatorCount + * @return annotatorCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATOR_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAnnotatorCount() { + return annotatorCount; + } + + + + + /** + * Get itemCount + * @return itemCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ITEM_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getItemCount() { + return itemCount; + } + + + + + /** + * Get completedCount + * @return completedCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCompletedCount() { + return completedCount; + } + + + + + /** + * Get createdBy + * @return createdBy + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getCreatedBy() { + + if (createdBy == null) { + createdBy = JsonNullable.undefined(); + } + return createdBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCreatedBy_JsonNullable() { + return createdBy; + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + private void setCreatedBy_JsonNullable(JsonNullable createdBy) { + this.createdBy = createdBy; + } + + + + /** + * Get createdByName + * @return createdByName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedByName() { + return createdByName; + } + + + + + /** + * Get viewerRole + * @return viewerRole + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VIEWER_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getViewerRole() { + return viewerRole; + } + + + + + /** + * Get viewerRoles + * @return viewerRoles + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VIEWER_ROLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getViewerRoles() { + return viewerRoles; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this AnnotationQueue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnnotationQueue annotationQueue = (AnnotationQueue) o; + return Objects.equals(this.id, annotationQueue.id) && + Objects.equals(this.name, annotationQueue.name) && + equalsNullable(this.description, annotationQueue.description) && + equalsNullable(this.instructions, annotationQueue.instructions) && + Objects.equals(this.status, annotationQueue.status) && + Objects.equals(this.assignmentStrategy, annotationQueue.assignmentStrategy) && + Objects.equals(this.annotationsRequired, annotationQueue.annotationsRequired) && + Objects.equals(this.reservationTimeoutMinutes, annotationQueue.reservationTimeoutMinutes) && + Objects.equals(this.requiresReview, annotationQueue.requiresReview) && + Objects.equals(this.autoAssign, annotationQueue.autoAssign) && + Objects.equals(this.organization, annotationQueue.organization) && + equalsNullable(this.project, annotationQueue.project) && + equalsNullable(this.dataset, annotationQueue.dataset) && + equalsNullable(this.agentDefinition, annotationQueue.agentDefinition) && + Objects.equals(this.isDefault, annotationQueue.isDefault) && + Objects.equals(this.labels, annotationQueue.labels) && + Objects.equals(this.annotators, annotationQueue.annotators) && + Objects.equals(this.labelIds, annotationQueue.labelIds) && + Objects.equals(this.annotatorIds, annotationQueue.annotatorIds) && + Objects.equals(this.annotatorRoles, annotationQueue.annotatorRoles) && + Objects.equals(this.labelCount, annotationQueue.labelCount) && + Objects.equals(this.annotatorCount, annotationQueue.annotatorCount) && + Objects.equals(this.itemCount, annotationQueue.itemCount) && + Objects.equals(this.completedCount, annotationQueue.completedCount) && + equalsNullable(this.createdBy, annotationQueue.createdBy) && + Objects.equals(this.createdByName, annotationQueue.createdByName) && + Objects.equals(this.viewerRole, annotationQueue.viewerRole) && + Objects.equals(this.viewerRoles, annotationQueue.viewerRoles) && + Objects.equals(this.createdAt, annotationQueue.createdAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(description), hashCodeNullable(instructions), status, assignmentStrategy, annotationsRequired, reservationTimeoutMinutes, requiresReview, autoAssign, organization, hashCodeNullable(project), hashCodeNullable(dataset), hashCodeNullable(agentDefinition), isDefault, labels, annotators, labelIds, annotatorIds, annotatorRoles, labelCount, annotatorCount, itemCount, completedCount, hashCodeNullable(createdBy), createdByName, viewerRole, viewerRoles, createdAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotationQueue {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" assignmentStrategy: ").append(toIndentedString(assignmentStrategy)).append("\n"); + sb.append(" annotationsRequired: ").append(toIndentedString(annotationsRequired)).append("\n"); + sb.append(" reservationTimeoutMinutes: ").append(toIndentedString(reservationTimeoutMinutes)).append("\n"); + sb.append(" requiresReview: ").append(toIndentedString(requiresReview)).append("\n"); + sb.append(" autoAssign: ").append(toIndentedString(autoAssign)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" agentDefinition: ").append(toIndentedString(agentDefinition)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" annotators: ").append(toIndentedString(annotators)).append("\n"); + sb.append(" labelIds: ").append(toIndentedString(labelIds)).append("\n"); + sb.append(" annotatorIds: ").append(toIndentedString(annotatorIds)).append("\n"); + sb.append(" annotatorRoles: ").append(toIndentedString(annotatorRoles)).append("\n"); + sb.append(" labelCount: ").append(toIndentedString(labelCount)).append("\n"); + sb.append(" annotatorCount: ").append(toIndentedString(annotatorCount)).append("\n"); + sb.append(" itemCount: ").append(toIndentedString(itemCount)).append("\n"); + sb.append(" completedCount: ").append(toIndentedString(completedCount)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" createdByName: ").append(toIndentedString(createdByName)).append("\n"); + sb.append(" viewerRole: ").append(toIndentedString(viewerRole)).append("\n"); + sb.append(" viewerRoles: ").append(toIndentedString(viewerRoles)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `instructions` to the URL query string + if (getInstructions() != null) { + joiner.add(String.format("%sinstructions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstructions())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `assignment_strategy` to the URL query string + if (getAssignmentStrategy() != null) { + joiner.add(String.format("%sassignment_strategy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignmentStrategy())))); + } + + // add `annotations_required` to the URL query string + if (getAnnotationsRequired() != null) { + joiner.add(String.format("%sannotations_required%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationsRequired())))); + } + + // add `reservation_timeout_minutes` to the URL query string + if (getReservationTimeoutMinutes() != null) { + joiner.add(String.format("%sreservation_timeout_minutes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReservationTimeoutMinutes())))); + } + + // add `requires_review` to the URL query string + if (getRequiresReview() != null) { + joiner.add(String.format("%srequires_review%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequiresReview())))); + } + + // add `auto_assign` to the URL query string + if (getAutoAssign() != null) { + joiner.add(String.format("%sauto_assign%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAutoAssign())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(String.format("%sdataset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataset())))); + } + + // add `agent_definition` to the URL query string + if (getAgentDefinition() != null) { + joiner.add(String.format("%sagent_definition%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinition())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + // add `labels` to the URL query string + if (getLabels() != null) { + for (int i = 0; i < getLabels().size(); i++) { + if (getLabels().get(i) != null) { + joiner.add(getLabels().get(i).toUrlQueryString(String.format("%slabels%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `annotators` to the URL query string + if (getAnnotators() != null) { + for (int i = 0; i < getAnnotators().size(); i++) { + if (getAnnotators().get(i) != null) { + joiner.add(getAnnotators().get(i).toUrlQueryString(String.format("%sannotators%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `label_ids` to the URL query string + if (getLabelIds() != null) { + for (int i = 0; i < getLabelIds().size(); i++) { + if (getLabelIds().get(i) != null) { + joiner.add(String.format("%slabel_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLabelIds().get(i))))); + } + } + } + + // add `annotator_ids` to the URL query string + if (getAnnotatorIds() != null) { + for (int i = 0; i < getAnnotatorIds().size(); i++) { + if (getAnnotatorIds().get(i) != null) { + joiner.add(String.format("%sannotator_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getAnnotatorIds().get(i))))); + } + } + } + + // add `annotator_roles` to the URL query string + if (getAnnotatorRoles() != null) { + for (String _key : getAnnotatorRoles().keySet()) { + joiner.add(String.format("%sannotator_roles%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAnnotatorRoles().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAnnotatorRoles().get(_key))))); + } + } + + // add `label_count` to the URL query string + if (getLabelCount() != null) { + joiner.add(String.format("%slabel_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelCount())))); + } + + // add `annotator_count` to the URL query string + if (getAnnotatorCount() != null) { + joiner.add(String.format("%sannotator_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotatorCount())))); + } + + // add `item_count` to the URL query string + if (getItemCount() != null) { + joiner.add(String.format("%sitem_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getItemCount())))); + } + + // add `completed_count` to the URL query string + if (getCompletedCount() != null) { + joiner.add(String.format("%scompleted_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedCount())))); + } + + // add `created_by` to the URL query string + if (getCreatedBy() != null) { + joiner.add(String.format("%screated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); + } + + // add `created_by_name` to the URL query string + if (getCreatedByName() != null) { + joiner.add(String.format("%screated_by_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByName())))); + } + + // add `viewer_role` to the URL query string + if (getViewerRole() != null) { + joiner.add(String.format("%sviewer_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getViewerRole())))); + } + + // add `viewer_roles` to the URL query string + if (getViewerRoles() != null) { + joiner.add(String.format("%sviewer_roles%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getViewerRoles())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryHeader.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryHeader.java new file mode 100644 index 0000000..7b4c453 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryHeader.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AnnotationSummaryHeader + */ +@JsonPropertyOrder({ + AnnotationSummaryHeader.JSON_PROPERTY_DATASET_COVERAGE, + AnnotationSummaryHeader.JSON_PROPERTY_COMPLETION_ETA, + AnnotationSummaryHeader.JSON_PROPERTY_OVERALL_AGREEMENT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationSummaryHeader { + public static final String JSON_PROPERTY_DATASET_COVERAGE = "dataset_coverage"; + private JsonNullable datasetCoverage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETION_ETA = "completion_eta"; + private JsonNullable completionEta = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OVERALL_AGREEMENT = "overall_agreement"; + private JsonNullable overallAgreement = JsonNullable.undefined(); + + public AnnotationSummaryHeader() { + } + + public AnnotationSummaryHeader datasetCoverage(@javax.annotation.Nullable BigDecimal datasetCoverage) { + this.datasetCoverage = JsonNullable.of(datasetCoverage); + return this; + } + + /** + * Get datasetCoverage + * @return datasetCoverage + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getDatasetCoverage() { + return datasetCoverage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET_COVERAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatasetCoverage_JsonNullable() { + return datasetCoverage; + } + + @JsonProperty(JSON_PROPERTY_DATASET_COVERAGE) + public void setDatasetCoverage_JsonNullable(JsonNullable datasetCoverage) { + this.datasetCoverage = datasetCoverage; + } + + public void setDatasetCoverage(@javax.annotation.Nullable BigDecimal datasetCoverage) { + this.datasetCoverage = JsonNullable.of(datasetCoverage); + } + + + public AnnotationSummaryHeader completionEta(@javax.annotation.Nullable BigDecimal completionEta) { + this.completionEta = JsonNullable.of(completionEta); + return this; + } + + /** + * Get completionEta + * @return completionEta + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getCompletionEta() { + return completionEta.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETION_ETA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletionEta_JsonNullable() { + return completionEta; + } + + @JsonProperty(JSON_PROPERTY_COMPLETION_ETA) + public void setCompletionEta_JsonNullable(JsonNullable completionEta) { + this.completionEta = completionEta; + } + + public void setCompletionEta(@javax.annotation.Nullable BigDecimal completionEta) { + this.completionEta = JsonNullable.of(completionEta); + } + + + public AnnotationSummaryHeader overallAgreement(@javax.annotation.Nullable BigDecimal overallAgreement) { + this.overallAgreement = JsonNullable.of(overallAgreement); + return this; + } + + /** + * Get overallAgreement + * @return overallAgreement + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getOverallAgreement() { + return overallAgreement.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OVERALL_AGREEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOverallAgreement_JsonNullable() { + return overallAgreement; + } + + @JsonProperty(JSON_PROPERTY_OVERALL_AGREEMENT) + public void setOverallAgreement_JsonNullable(JsonNullable overallAgreement) { + this.overallAgreement = overallAgreement; + } + + public void setOverallAgreement(@javax.annotation.Nullable BigDecimal overallAgreement) { + this.overallAgreement = JsonNullable.of(overallAgreement); + } + + + /** + * Return true if this AnnotationSummaryHeader object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnnotationSummaryHeader annotationSummaryHeader = (AnnotationSummaryHeader) o; + return equalsNullable(this.datasetCoverage, annotationSummaryHeader.datasetCoverage) && + equalsNullable(this.completionEta, annotationSummaryHeader.completionEta) && + equalsNullable(this.overallAgreement, annotationSummaryHeader.overallAgreement); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(datasetCoverage), hashCodeNullable(completionEta), hashCodeNullable(overallAgreement)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotationSummaryHeader {\n"); + sb.append(" datasetCoverage: ").append(toIndentedString(datasetCoverage)).append("\n"); + sb.append(" completionEta: ").append(toIndentedString(completionEta)).append("\n"); + sb.append(" overallAgreement: ").append(toIndentedString(overallAgreement)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_coverage` to the URL query string + if (getDatasetCoverage() != null) { + joiner.add(String.format("%sdataset_coverage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetCoverage())))); + } + + // add `completion_eta` to the URL query string + if (getCompletionEta() != null) { + joiner.add(String.format("%scompletion_eta%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletionEta())))); + } + + // add `overall_agreement` to the URL query string + if (getOverallAgreement() != null) { + joiner.add(String.format("%soverall_agreement%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallAgreement())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResponse.java new file mode 100644 index 0000000..aa7afff --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AnnotationSummaryResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AnnotationSummaryResponse + */ +@JsonPropertyOrder({ + AnnotationSummaryResponse.JSON_PROPERTY_STATUS, + AnnotationSummaryResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationSummaryResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private AnnotationSummaryResult result; + + public AnnotationSummaryResponse() { + } + + public AnnotationSummaryResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public AnnotationSummaryResponse result(@javax.annotation.Nonnull AnnotationSummaryResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AnnotationSummaryResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull AnnotationSummaryResult result) { + this.result = result; + } + + + /** + * Return true if this AnnotationSummaryResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnnotationSummaryResponse annotationSummaryResponse = (AnnotationSummaryResponse) o; + return Objects.equals(this.status, annotationSummaryResponse.status) && + Objects.equals(this.result, annotationSummaryResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotationSummaryResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResult.java new file mode 100644 index 0000000..f7c9909 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationSummaryResult.java @@ -0,0 +1,251 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AnnotationSummaryHeader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AnnotationSummaryResult + */ +@JsonPropertyOrder({ + AnnotationSummaryResult.JSON_PROPERTY_LABELS, + AnnotationSummaryResult.JSON_PROPERTY_ANNOTATORS, + AnnotationSummaryResult.JSON_PROPERTY_HEADER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationSummaryResult { + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nullable + private List> labels = new ArrayList<>(); + + public static final String JSON_PROPERTY_ANNOTATORS = "annotators"; + @javax.annotation.Nullable + private List> annotators = new ArrayList<>(); + + public static final String JSON_PROPERTY_HEADER = "header"; + @javax.annotation.Nullable + private AnnotationSummaryHeader header; + + public AnnotationSummaryResult() { + } + + public AnnotationSummaryResult labels(@javax.annotation.Nullable List> labels) { + this.labels = labels; + return this; + } + + public AnnotationSummaryResult addLabelsItem(Map labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getLabels() { + return labels; + } + + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabels(@javax.annotation.Nullable List> labels) { + this.labels = labels; + } + + + public AnnotationSummaryResult annotators(@javax.annotation.Nullable List> annotators) { + this.annotators = annotators; + return this; + } + + public AnnotationSummaryResult addAnnotatorsItem(Map annotatorsItem) { + if (this.annotators == null) { + this.annotators = new ArrayList<>(); + } + this.annotators.add(annotatorsItem); + return this; + } + + /** + * Get annotators + * @return annotators + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getAnnotators() { + return annotators; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnotators(@javax.annotation.Nullable List> annotators) { + this.annotators = annotators; + } + + + public AnnotationSummaryResult header(@javax.annotation.Nullable AnnotationSummaryHeader header) { + this.header = header; + return this; + } + + /** + * Get header + * @return header + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEADER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AnnotationSummaryHeader getHeader() { + return header; + } + + + @JsonProperty(JSON_PROPERTY_HEADER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHeader(@javax.annotation.Nullable AnnotationSummaryHeader header) { + this.header = header; + } + + + /** + * Return true if this AnnotationSummaryResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnnotationSummaryResult annotationSummaryResult = (AnnotationSummaryResult) o; + return Objects.equals(this.labels, annotationSummaryResult.labels) && + Objects.equals(this.annotators, annotationSummaryResult.annotators) && + Objects.equals(this.header, annotationSummaryResult.header); + } + + @Override + public int hashCode() { + return Objects.hash(labels, annotators, header); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotationSummaryResult {\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" annotators: ").append(toIndentedString(annotators)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `labels` to the URL query string + if (getLabels() != null) { + for (int i = 0; i < getLabels().size(); i++) { + joiner.add(String.format("%slabels%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLabels().get(i))))); + } + } + + // add `annotators` to the URL query string + if (getAnnotators() != null) { + for (int i = 0; i < getAnnotators().size(); i++) { + joiner.add(String.format("%sannotators%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getAnnotators().get(i))))); + } + } + + // add `header` to the URL query string + if (getHeader() != null) { + joiner.add(getHeader().toUrlQueryString(prefix + "header" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationsLabels.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationsLabels.java new file mode 100644 index 0000000..d1ebae4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AnnotationsLabels.java @@ -0,0 +1,556 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AnnotationsLabels + */ +@JsonPropertyOrder({ + AnnotationsLabels.JSON_PROPERTY_ID, + AnnotationsLabels.JSON_PROPERTY_NAME, + AnnotationsLabels.JSON_PROPERTY_TYPE, + AnnotationsLabels.JSON_PROPERTY_ORGANIZATION, + AnnotationsLabels.JSON_PROPERTY_SETTINGS, + AnnotationsLabels.JSON_PROPERTY_PROJECT, + AnnotationsLabels.JSON_PROPERTY_DESCRIPTION, + AnnotationsLabels.JSON_PROPERTY_ALLOW_NOTES, + AnnotationsLabels.JSON_PROPERTY_CREATED_AT, + AnnotationsLabels.JSON_PROPERTY_TRACE_ANNOTATIONS_COUNT, + AnnotationsLabels.JSON_PROPERTY_ANNOTATION_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AnnotationsLabels { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + TEXT(String.valueOf("text")), + + NUMERIC(String.valueOf("numeric")), + + CATEGORICAL(String.valueOf("categorical")), + + STAR(String.valueOf("star")), + + THUMBS_UP_DOWN(String.valueOf("thumbs_up_down")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @javax.annotation.Nullable + private Map settings = new HashMap<>(); + + public static final String JSON_PROPERTY_PROJECT = "project"; + @javax.annotation.Nullable + private UUID project; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ALLOW_NOTES = "allow_notes"; + @javax.annotation.Nullable + private Boolean allowNotes; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_TRACE_ANNOTATIONS_COUNT = "trace_annotations_count"; + @javax.annotation.Nullable + private Integer traceAnnotationsCount; + + public static final String JSON_PROPERTY_ANNOTATION_COUNT = "annotation_count"; + @javax.annotation.Nullable + private Integer annotationCount; + + public AnnotationsLabels() { + } + + @JsonCreator + public AnnotationsLabels( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_TRACE_ANNOTATIONS_COUNT) Integer traceAnnotationsCount, + @JsonProperty(JSON_PROPERTY_ANNOTATION_COUNT) Integer annotationCount + ) { + this(); + this.id = id; + this.organization = organization; + this.createdAt = createdAt; + this.traceAnnotationsCount = traceAnnotationsCount; + this.annotationCount = annotationCount; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public AnnotationsLabels name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AnnotationsLabels type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + public AnnotationsLabels settings(@javax.annotation.Nullable Map settings) { + this.settings = settings; + return this; + } + + public AnnotationsLabels putSettingsItem(String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Get settings + * @return settings + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSettings(@javax.annotation.Nullable Map settings) { + this.settings = settings; + } + + + public AnnotationsLabels project(@javax.annotation.Nullable UUID project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getProject() { + return project; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProject(@javax.annotation.Nullable UUID project) { + this.project = project; + } + + + public AnnotationsLabels description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AnnotationsLabels allowNotes(@javax.annotation.Nullable Boolean allowNotes) { + this.allowNotes = allowNotes; + return this; + } + + /** + * Get allowNotes + * @return allowNotes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowNotes() { + return allowNotes; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowNotes(@javax.annotation.Nullable Boolean allowNotes) { + this.allowNotes = allowNotes; + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get traceAnnotationsCount + * @return traceAnnotationsCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_ANNOTATIONS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTraceAnnotationsCount() { + return traceAnnotationsCount; + } + + + + + /** + * Get annotationCount + * @return annotationCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATION_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAnnotationCount() { + return annotationCount; + } + + + + + /** + * Return true if this AnnotationsLabels object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnnotationsLabels annotationsLabels = (AnnotationsLabels) o; + return Objects.equals(this.id, annotationsLabels.id) && + Objects.equals(this.name, annotationsLabels.name) && + Objects.equals(this.type, annotationsLabels.type) && + Objects.equals(this.organization, annotationsLabels.organization) && + Objects.equals(this.settings, annotationsLabels.settings) && + Objects.equals(this.project, annotationsLabels.project) && + equalsNullable(this.description, annotationsLabels.description) && + Objects.equals(this.allowNotes, annotationsLabels.allowNotes) && + Objects.equals(this.createdAt, annotationsLabels.createdAt) && + Objects.equals(this.traceAnnotationsCount, annotationsLabels.traceAnnotationsCount) && + Objects.equals(this.annotationCount, annotationsLabels.annotationCount); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type, organization, settings, project, hashCodeNullable(description), allowNotes, createdAt, traceAnnotationsCount, annotationCount); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotationsLabels {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" allowNotes: ").append(toIndentedString(allowNotes)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" traceAnnotationsCount: ").append(toIndentedString(traceAnnotationsCount)).append("\n"); + sb.append(" annotationCount: ").append(toIndentedString(annotationCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `settings` to the URL query string + if (getSettings() != null) { + for (String _key : getSettings().keySet()) { + joiner.add(String.format("%ssettings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSettings().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSettings().get(_key))))); + } + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `allow_notes` to the URL query string + if (getAllowNotes() != null) { + joiner.add(String.format("%sallow_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowNotes())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `trace_annotations_count` to the URL query string + if (getTraceAnnotationsCount() != null) { + joiner.add(String.format("%strace_annotations_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceAnnotationsCount())))); + } + + // add `annotation_count` to the URL query string + if (getAnnotationCount() != null) { + joiner.add(String.format("%sannotation_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorResponse.java new file mode 100644 index 0000000..34a81b8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ApiErrorResponse + */ +@JsonPropertyOrder({ + ApiErrorResponse.JSON_PROPERTY_STATUS, + ApiErrorResponse.JSON_PROPERTY_TYPE, + ApiErrorResponse.JSON_PROPERTY_CODE, + ApiErrorResponse.JSON_PROPERTY_DETAIL, + ApiErrorResponse.JSON_PROPERTY_RESULT, + ApiErrorResponse.JSON_PROPERTY_MESSAGE, + ApiErrorResponse.JSON_PROPERTY_ERROR, + ApiErrorResponse.JSON_PROPERTY_ATTR, + ApiErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ApiErrorResponse() { + } + + public ApiErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ApiErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ApiErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ApiErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ApiErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ApiErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ApiErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ApiErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ApiErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ApiErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ApiErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiErrorResponse apiErrorResponse = (ApiErrorResponse) o; + return Objects.equals(this.status, apiErrorResponse.status) && + equalsNullable(this.type, apiErrorResponse.type) && + equalsNullable(this.code, apiErrorResponse.code) && + equalsNullable(this.detail, apiErrorResponse.detail) && + equalsNullable(this.result, apiErrorResponse.result) && + equalsNullable(this.message, apiErrorResponse.message) && + equalsNullable(this.error, apiErrorResponse.error) && + equalsNullable(this.attr, apiErrorResponse.attr) && + Objects.equals(this.details, apiErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorWithDetailsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorWithDetailsResponse.java new file mode 100644 index 0000000..54b8e08 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiErrorWithDetailsResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ApiErrorWithDetailsResponse + */ +@JsonPropertyOrder({ + ApiErrorWithDetailsResponse.JSON_PROPERTY_STATUS, + ApiErrorWithDetailsResponse.JSON_PROPERTY_TYPE, + ApiErrorWithDetailsResponse.JSON_PROPERTY_CODE, + ApiErrorWithDetailsResponse.JSON_PROPERTY_DETAIL, + ApiErrorWithDetailsResponse.JSON_PROPERTY_RESULT, + ApiErrorWithDetailsResponse.JSON_PROPERTY_MESSAGE, + ApiErrorWithDetailsResponse.JSON_PROPERTY_ERROR, + ApiErrorWithDetailsResponse.JSON_PROPERTY_ATTR, + ApiErrorWithDetailsResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiErrorWithDetailsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ApiErrorWithDetailsResponse() { + } + + public ApiErrorWithDetailsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ApiErrorWithDetailsResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ApiErrorWithDetailsResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ApiErrorWithDetailsResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ApiErrorWithDetailsResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ApiErrorWithDetailsResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ApiErrorWithDetailsResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ApiErrorWithDetailsResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ApiErrorWithDetailsResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ApiErrorWithDetailsResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ApiErrorWithDetailsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiErrorWithDetailsResponse apiErrorWithDetailsResponse = (ApiErrorWithDetailsResponse) o; + return Objects.equals(this.status, apiErrorWithDetailsResponse.status) && + equalsNullable(this.type, apiErrorWithDetailsResponse.type) && + equalsNullable(this.code, apiErrorWithDetailsResponse.code) && + equalsNullable(this.detail, apiErrorWithDetailsResponse.detail) && + equalsNullable(this.result, apiErrorWithDetailsResponse.result) && + equalsNullable(this.message, apiErrorWithDetailsResponse.message) && + equalsNullable(this.error, apiErrorWithDetailsResponse.error) && + equalsNullable(this.attr, apiErrorWithDetailsResponse.attr) && + Objects.equals(this.details, apiErrorWithDetailsResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiErrorWithDetailsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiKey.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiKey.java new file mode 100644 index 0000000..810934c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiKey.java @@ -0,0 +1,363 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ApiKey + */ +@JsonPropertyOrder({ + ApiKey.JSON_PROPERTY_ID, + ApiKey.JSON_PROPERTY_PROVIDER, + ApiKey.JSON_PROPERTY_KEY, + ApiKey.JSON_PROPERTY_ORGANIZATION, + ApiKey.JSON_PROPERTY_MASKED_ACTUAL_KEY, + ApiKey.JSON_PROPERTY_CONFIG_JSON +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiKey { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + @javax.annotation.Nonnull + private String provider; + + public static final String JSON_PROPERTY_KEY = "key"; + private JsonNullable key = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + private JsonNullable organization = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MASKED_ACTUAL_KEY = "masked_actual_key"; + @javax.annotation.Nullable + private String maskedActualKey; + + public static final String JSON_PROPERTY_CONFIG_JSON = "config_json"; + @javax.annotation.Nullable + private Map configJson = new HashMap<>(); + + public ApiKey() { + } + + @JsonCreator + public ApiKey( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_MASKED_ACTUAL_KEY) String maskedActualKey + ) { + this(); + this.id = id; + this.organization = organization == null ? JsonNullable.undefined() : JsonNullable.of(organization); + this.maskedActualKey = maskedActualKey; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public ApiKey provider(@javax.annotation.Nonnull String provider) { + this.provider = provider; + return this; + } + + /** + * Get provider + * @return provider + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProvider() { + return provider; + } + + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProvider(@javax.annotation.Nonnull String provider) { + this.provider = provider; + } + + + public ApiKey key(@javax.annotation.Nullable String key) { + this.key = JsonNullable.of(key); + return this; + } + + /** + * Get key + * @return key + */ + @javax.annotation.Nullable + @JsonIgnore + public String getKey() { + return key.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKey_JsonNullable() { + return key; + } + + @JsonProperty(JSON_PROPERTY_KEY) + public void setKey_JsonNullable(JsonNullable key) { + this.key = key; + } + + public void setKey(@javax.annotation.Nullable String key) { + this.key = JsonNullable.of(key); + } + + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getOrganization() { + + if (organization == null) { + organization = JsonNullable.undefined(); + } + return organization.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOrganization_JsonNullable() { + return organization; + } + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + private void setOrganization_JsonNullable(JsonNullable organization) { + this.organization = organization; + } + + + + /** + * Get maskedActualKey + * @return maskedActualKey + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MASKED_ACTUAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMaskedActualKey() { + return maskedActualKey; + } + + + + + public ApiKey configJson(@javax.annotation.Nullable Map configJson) { + this.configJson = configJson; + return this; + } + + public ApiKey putConfigJsonItem(String key, Object configJsonItem) { + if (this.configJson == null) { + this.configJson = new HashMap<>(); + } + this.configJson.put(key, configJsonItem); + return this; + } + + /** + * Get configJson + * @return configJson + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigJson() { + return configJson; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG_JSON) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigJson(@javax.annotation.Nullable Map configJson) { + this.configJson = configJson; + } + + + /** + * Return true if this ApiKey object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiKey apiKey = (ApiKey) o; + return Objects.equals(this.id, apiKey.id) && + Objects.equals(this.provider, apiKey.provider) && + equalsNullable(this.key, apiKey.key) && + equalsNullable(this.organization, apiKey.organization) && + Objects.equals(this.maskedActualKey, apiKey.maskedActualKey) && + Objects.equals(this.configJson, apiKey.configJson); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, provider, hashCodeNullable(key), hashCodeNullable(organization), maskedActualKey, configJson); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiKey {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" maskedActualKey: ").append(toIndentedString(maskedActualKey)).append("\n"); + sb.append(" configJson: ").append(toIndentedString(configJson)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `key` to the URL query string + if (getKey() != null) { + joiner.add(String.format("%skey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKey())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `masked_actual_key` to the URL query string + if (getMaskedActualKey() != null) { + joiner.add(String.format("%smasked_actual_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaskedActualKey())))); + } + + // add `config_json` to the URL query string + if (getConfigJson() != null) { + for (String _key : getConfigJson().keySet()) { + joiner.add(String.format("%sconfig_json%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigJson().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigJson().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeDetail.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeDetail.java new file mode 100644 index 0000000..b4fd133 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeDetail.java @@ -0,0 +1,292 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ApiSelectionTooLargeDetail + */ +@JsonPropertyOrder({ + ApiSelectionTooLargeDetail.JSON_PROPERTY_TYPE, + ApiSelectionTooLargeDetail.JSON_PROPERTY_MESSAGE, + ApiSelectionTooLargeDetail.JSON_PROPERTY_TOTAL_MATCHING, + ApiSelectionTooLargeDetail.JSON_PROPERTY_CAP +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiSelectionTooLargeDetail { + /** + * Gets or Sets type + */ + public enum TypeEnum { + SELECTION_TOO_LARGE(String.valueOf("selection_too_large")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_TOTAL_MATCHING = "total_matching"; + @javax.annotation.Nonnull + private Integer totalMatching; + + public static final String JSON_PROPERTY_CAP = "cap"; + @javax.annotation.Nonnull + private Integer cap; + + public ApiSelectionTooLargeDetail() { + } + + public ApiSelectionTooLargeDetail type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public ApiSelectionTooLargeDetail message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public ApiSelectionTooLargeDetail totalMatching(@javax.annotation.Nonnull Integer totalMatching) { + this.totalMatching = totalMatching; + return this; + } + + /** + * Get totalMatching + * @return totalMatching + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_MATCHING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalMatching() { + return totalMatching; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_MATCHING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalMatching(@javax.annotation.Nonnull Integer totalMatching) { + this.totalMatching = totalMatching; + } + + + public ApiSelectionTooLargeDetail cap(@javax.annotation.Nonnull Integer cap) { + this.cap = cap; + return this; + } + + /** + * Get cap + * @return cap + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CAP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCap() { + return cap; + } + + + @JsonProperty(JSON_PROPERTY_CAP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCap(@javax.annotation.Nonnull Integer cap) { + this.cap = cap; + } + + + /** + * Return true if this ApiSelectionTooLargeDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiSelectionTooLargeDetail apiSelectionTooLargeDetail = (ApiSelectionTooLargeDetail) o; + return Objects.equals(this.type, apiSelectionTooLargeDetail.type) && + Objects.equals(this.message, apiSelectionTooLargeDetail.message) && + Objects.equals(this.totalMatching, apiSelectionTooLargeDetail.totalMatching) && + Objects.equals(this.cap, apiSelectionTooLargeDetail.cap); + } + + @Override + public int hashCode() { + return Objects.hash(type, message, totalMatching, cap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiSelectionTooLargeDetail {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" totalMatching: ").append(toIndentedString(totalMatching)).append("\n"); + sb.append(" cap: ").append(toIndentedString(cap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `total_matching` to the URL query string + if (getTotalMatching() != null) { + joiner.add(String.format("%stotal_matching%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalMatching())))); + } + + // add `cap` to the URL query string + if (getCap() != null) { + joiner.add(String.format("%scap%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCap())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeError.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeError.java new file mode 100644 index 0000000..5e254c7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiSelectionTooLargeError.java @@ -0,0 +1,423 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ApiSelectionTooLargeDetail; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ApiSelectionTooLargeError + */ +@JsonPropertyOrder({ + ApiSelectionTooLargeError.JSON_PROPERTY_STATUS, + ApiSelectionTooLargeError.JSON_PROPERTY_RESULT, + ApiSelectionTooLargeError.JSON_PROPERTY_TYPE, + ApiSelectionTooLargeError.JSON_PROPERTY_CODE, + ApiSelectionTooLargeError.JSON_PROPERTY_DETAIL, + ApiSelectionTooLargeError.JSON_PROPERTY_MESSAGE, + ApiSelectionTooLargeError.JSON_PROPERTY_ERROR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiSelectionTooLargeError { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + /** + * Gets or Sets type + */ + public enum TypeEnum { + SELECTION_TOO_LARGE(String.valueOf("selection_too_large")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nullable + private TypeEnum type; + + public static final String JSON_PROPERTY_CODE = "code"; + @javax.annotation.Nullable + private String code = "selection_too_large"; + + public static final String JSON_PROPERTY_DETAIL = "detail"; + @javax.annotation.Nullable + private String detail; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_ERROR = "error"; + @javax.annotation.Nonnull + private ApiSelectionTooLargeDetail error; + + public ApiSelectionTooLargeError() { + } + + public ApiSelectionTooLargeError status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ApiSelectionTooLargeError result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ApiSelectionTooLargeError type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public ApiSelectionTooLargeError code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + public ApiSelectionTooLargeError detail(@javax.annotation.Nullable String detail) { + this.detail = detail; + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } + + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = detail; + } + + + public ApiSelectionTooLargeError message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public ApiSelectionTooLargeError error(@javax.annotation.Nonnull ApiSelectionTooLargeDetail error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ApiSelectionTooLargeDetail getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setError(@javax.annotation.Nonnull ApiSelectionTooLargeDetail error) { + this.error = error; + } + + + /** + * Return true if this ApiSelectionTooLargeError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiSelectionTooLargeError apiSelectionTooLargeError = (ApiSelectionTooLargeError) o; + return Objects.equals(this.status, apiSelectionTooLargeError.status) && + equalsNullable(this.result, apiSelectionTooLargeError.result) && + Objects.equals(this.type, apiSelectionTooLargeError.type) && + Objects.equals(this.code, apiSelectionTooLargeError.code) && + Objects.equals(this.detail, apiSelectionTooLargeError.detail) && + Objects.equals(this.message, apiSelectionTooLargeError.message) && + Objects.equals(this.error, apiSelectionTooLargeError.error); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(result), type, code, detail, message, error); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiSelectionTooLargeError {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(getError().toUrlQueryString(prefix + "error" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiTextErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiTextErrorResponse.java new file mode 100644 index 0000000..1f8491b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ApiTextErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ApiTextErrorResponse + */ +@JsonPropertyOrder({ + ApiTextErrorResponse.JSON_PROPERTY_STATUS, + ApiTextErrorResponse.JSON_PROPERTY_TYPE, + ApiTextErrorResponse.JSON_PROPERTY_CODE, + ApiTextErrorResponse.JSON_PROPERTY_DETAIL, + ApiTextErrorResponse.JSON_PROPERTY_RESULT, + ApiTextErrorResponse.JSON_PROPERTY_MESSAGE, + ApiTextErrorResponse.JSON_PROPERTY_ERROR, + ApiTextErrorResponse.JSON_PROPERTY_ATTR, + ApiTextErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ApiTextErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ApiTextErrorResponse() { + } + + public ApiTextErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ApiTextErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ApiTextErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ApiTextErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ApiTextErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ApiTextErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ApiTextErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ApiTextErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ApiTextErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ApiTextErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ApiTextErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiTextErrorResponse apiTextErrorResponse = (ApiTextErrorResponse) o; + return Objects.equals(this.status, apiTextErrorResponse.status) && + equalsNullable(this.type, apiTextErrorResponse.type) && + equalsNullable(this.code, apiTextErrorResponse.code) && + equalsNullable(this.detail, apiTextErrorResponse.detail) && + equalsNullable(this.result, apiTextErrorResponse.result) && + equalsNullable(this.message, apiTextErrorResponse.message) && + equalsNullable(this.error, apiTextErrorResponse.error) && + equalsNullable(this.attr, apiTextErrorResponse.attr) && + Objects.equals(this.details, apiTextErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiTextErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AssignItems.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AssignItems.java new file mode 100644 index 0000000..e1bec41 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AssignItems.java @@ -0,0 +1,291 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AssignItems + */ +@JsonPropertyOrder({ + AssignItems.JSON_PROPERTY_ITEM_IDS, + AssignItems.JSON_PROPERTY_USER_IDS, + AssignItems.JSON_PROPERTY_ACTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AssignItems { + public static final String JSON_PROPERTY_ITEM_IDS = "item_ids"; + @javax.annotation.Nonnull + private List itemIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_USER_IDS = "user_ids"; + @javax.annotation.Nullable + private List userIds = new ArrayList<>(); + + /** + * Gets or Sets action + */ + public enum ActionEnum { + ADD(String.valueOf("add")), + + SET(String.valueOf("set")), + + REMOVE(String.valueOf("remove")); + + private String value; + + ActionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ActionEnum fromValue(String value) { + for (ActionEnum b : ActionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACTION = "action"; + @javax.annotation.Nullable + private ActionEnum action = ActionEnum.ADD; + + public AssignItems() { + } + + public AssignItems itemIds(@javax.annotation.Nonnull List itemIds) { + this.itemIds = itemIds; + return this; + } + + public AssignItems addItemIdsItem(UUID itemIdsItem) { + if (this.itemIds == null) { + this.itemIds = new ArrayList<>(); + } + this.itemIds.add(itemIdsItem); + return this; + } + + /** + * Get itemIds + * @return itemIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEM_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItemIds() { + return itemIds; + } + + + @JsonProperty(JSON_PROPERTY_ITEM_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setItemIds(@javax.annotation.Nonnull List itemIds) { + this.itemIds = itemIds; + } + + + public AssignItems userIds(@javax.annotation.Nullable List userIds) { + this.userIds = userIds; + return this; + } + + public AssignItems addUserIdsItem(UUID userIdsItem) { + if (this.userIds == null) { + this.userIds = new ArrayList<>(); + } + this.userIds.add(userIdsItem); + return this; + } + + /** + * Get userIds + * @return userIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUserIds() { + return userIds; + } + + + @JsonProperty(JSON_PROPERTY_USER_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserIds(@javax.annotation.Nullable List userIds) { + this.userIds = userIds; + } + + + public AssignItems action(@javax.annotation.Nullable ActionEnum action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ActionEnum getAction() { + return action; + } + + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAction(@javax.annotation.Nullable ActionEnum action) { + this.action = action; + } + + + /** + * Return true if this AssignItems object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignItems assignItems = (AssignItems) o; + return Objects.equals(this.itemIds, assignItems.itemIds) && + Objects.equals(this.userIds, assignItems.userIds) && + Objects.equals(this.action, assignItems.action); + } + + @Override + public int hashCode() { + return Objects.hash(itemIds, userIds, action); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignItems {\n"); + sb.append(" itemIds: ").append(toIndentedString(itemIds)).append("\n"); + sb.append(" userIds: ").append(toIndentedString(userIds)).append("\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `item_ids` to the URL query string + if (getItemIds() != null) { + for (int i = 0; i < getItemIds().size(); i++) { + if (getItemIds().get(i) != null) { + joiner.add(String.format("%sitem_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getItemIds().get(i))))); + } + } + } + + // add `user_ids` to the URL query string + if (getUserIds() != null) { + for (int i = 0; i < getUserIds().size(); i++) { + if (getUserIds().get(i) != null) { + joiner.add(String.format("%suser_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getUserIds().get(i))))); + } + } + } + + // add `action` to the URL query string + if (getAction() != null) { + joiner.add(String.format("%saction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAction())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRule.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRule.java new file mode 100644 index 0000000..cbfa9b0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRule.java @@ -0,0 +1,653 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditions; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRule + */ +@JsonPropertyOrder({ + AutomationRule.JSON_PROPERTY_ID, + AutomationRule.JSON_PROPERTY_NAME, + AutomationRule.JSON_PROPERTY_QUEUE, + AutomationRule.JSON_PROPERTY_SOURCE_TYPE, + AutomationRule.JSON_PROPERTY_CONDITIONS, + AutomationRule.JSON_PROPERTY_ENABLED, + AutomationRule.JSON_PROPERTY_TRIGGER_FREQUENCY, + AutomationRule.JSON_PROPERTY_ORGANIZATION, + AutomationRule.JSON_PROPERTY_CREATED_BY, + AutomationRule.JSON_PROPERTY_CREATED_BY_NAME, + AutomationRule.JSON_PROPERTY_LAST_TRIGGERED_AT, + AutomationRule.JSON_PROPERTY_TRIGGER_COUNT, + AutomationRule.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRule { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_QUEUE = "queue"; + @javax.annotation.Nullable + private UUID queue; + + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + DATASET_ROW(String.valueOf("dataset_row")), + + TRACE(String.valueOf("trace")), + + OBSERVATION_SPAN(String.valueOf("observation_span")), + + PROTOTYPE_RUN(String.valueOf("prototype_run")), + + CALL_EXECUTION(String.valueOf("call_execution")), + + TRACE_SESSION(String.valueOf("trace_session")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_CONDITIONS = "conditions"; + @javax.annotation.Nullable + private AutomationRuleConditions conditions; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + @javax.annotation.Nullable + private Boolean enabled; + + /** + * Gets or Sets triggerFrequency + */ + public enum TriggerFrequencyEnum { + MANUAL(String.valueOf("manual")), + + HOURLY(String.valueOf("hourly")), + + DAILY(String.valueOf("daily")), + + WEEKLY(String.valueOf("weekly")), + + MONTHLY(String.valueOf("monthly")); + + private String value; + + TriggerFrequencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TriggerFrequencyEnum fromValue(String value) { + for (TriggerFrequencyEnum b : TriggerFrequencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TRIGGER_FREQUENCY = "trigger_frequency"; + @javax.annotation.Nullable + private TriggerFrequencyEnum triggerFrequency; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private JsonNullable createdBy = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_BY_NAME = "created_by_name"; + @javax.annotation.Nullable + private String createdByName; + + public static final String JSON_PROPERTY_LAST_TRIGGERED_AT = "last_triggered_at"; + private JsonNullable lastTriggeredAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRIGGER_COUNT = "trigger_count"; + @javax.annotation.Nullable + private Integer triggerCount; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public AutomationRule() { + } + + @JsonCreator + public AutomationRule( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_QUEUE) UUID queue, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_CREATED_BY) UUID createdBy, + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) String createdByName, + @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_AT) OffsetDateTime lastTriggeredAt, + @JsonProperty(JSON_PROPERTY_TRIGGER_COUNT) Integer triggerCount, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.queue = queue; + this.organization = organization; + this.createdBy = createdBy == null ? JsonNullable.undefined() : JsonNullable.of(createdBy); + this.createdByName = createdByName; + this.lastTriggeredAt = lastTriggeredAt == null ? JsonNullable.undefined() : JsonNullable.of(lastTriggeredAt); + this.triggerCount = triggerCount; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public AutomationRule name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Get queue + * @return queue + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getQueue() { + return queue; + } + + + + + public AutomationRule sourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + public AutomationRule conditions(@javax.annotation.Nullable AutomationRuleConditions conditions) { + this.conditions = conditions; + return this; + } + + /** + * Get conditions + * @return conditions + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AutomationRuleConditions getConditions() { + return conditions; + } + + + @JsonProperty(JSON_PROPERTY_CONDITIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConditions(@javax.annotation.Nullable AutomationRuleConditions conditions) { + this.conditions = conditions; + } + + + public AutomationRule enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + } + + + public AutomationRule triggerFrequency(@javax.annotation.Nullable TriggerFrequencyEnum triggerFrequency) { + this.triggerFrequency = triggerFrequency; + return this; + } + + /** + * Get triggerFrequency + * @return triggerFrequency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRIGGER_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TriggerFrequencyEnum getTriggerFrequency() { + return triggerFrequency; + } + + + @JsonProperty(JSON_PROPERTY_TRIGGER_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTriggerFrequency(@javax.annotation.Nullable TriggerFrequencyEnum triggerFrequency) { + this.triggerFrequency = triggerFrequency; + } + + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Get createdBy + * @return createdBy + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getCreatedBy() { + + if (createdBy == null) { + createdBy = JsonNullable.undefined(); + } + return createdBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCreatedBy_JsonNullable() { + return createdBy; + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + private void setCreatedBy_JsonNullable(JsonNullable createdBy) { + this.createdBy = createdBy; + } + + + + /** + * Get createdByName + * @return createdByName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedByName() { + return createdByName; + } + + + + + /** + * Get lastTriggeredAt + * @return lastTriggeredAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getLastTriggeredAt() { + + if (lastTriggeredAt == null) { + lastTriggeredAt = JsonNullable.undefined(); + } + return lastTriggeredAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastTriggeredAt_JsonNullable() { + return lastTriggeredAt; + } + + @JsonProperty(JSON_PROPERTY_LAST_TRIGGERED_AT) + private void setLastTriggeredAt_JsonNullable(JsonNullable lastTriggeredAt) { + this.lastTriggeredAt = lastTriggeredAt; + } + + + + /** + * Get triggerCount + * @return triggerCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRIGGER_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTriggerCount() { + return triggerCount; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this AutomationRule object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRule automationRule = (AutomationRule) o; + return Objects.equals(this.id, automationRule.id) && + Objects.equals(this.name, automationRule.name) && + Objects.equals(this.queue, automationRule.queue) && + Objects.equals(this.sourceType, automationRule.sourceType) && + Objects.equals(this.conditions, automationRule.conditions) && + Objects.equals(this.enabled, automationRule.enabled) && + Objects.equals(this.triggerFrequency, automationRule.triggerFrequency) && + Objects.equals(this.organization, automationRule.organization) && + equalsNullable(this.createdBy, automationRule.createdBy) && + Objects.equals(this.createdByName, automationRule.createdByName) && + equalsNullable(this.lastTriggeredAt, automationRule.lastTriggeredAt) && + Objects.equals(this.triggerCount, automationRule.triggerCount) && + Objects.equals(this.createdAt, automationRule.createdAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, queue, sourceType, conditions, enabled, triggerFrequency, organization, hashCodeNullable(createdBy), createdByName, hashCodeNullable(lastTriggeredAt), triggerCount, createdAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRule {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" queue: ").append(toIndentedString(queue)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" triggerFrequency: ").append(toIndentedString(triggerFrequency)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" createdByName: ").append(toIndentedString(createdByName)).append("\n"); + sb.append(" lastTriggeredAt: ").append(toIndentedString(lastTriggeredAt)).append("\n"); + sb.append(" triggerCount: ").append(toIndentedString(triggerCount)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `queue` to the URL query string + if (getQueue() != null) { + joiner.add(String.format("%squeue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueue())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `conditions` to the URL query string + if (getConditions() != null) { + joiner.add(getConditions().toUrlQueryString(prefix + "conditions" + suffix)); + } + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format("%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + } + + // add `trigger_frequency` to the URL query string + if (getTriggerFrequency() != null) { + joiner.add(String.format("%strigger_frequency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerFrequency())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `created_by` to the URL query string + if (getCreatedBy() != null) { + joiner.add(String.format("%screated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); + } + + // add `created_by_name` to the URL query string + if (getCreatedByName() != null) { + joiner.add(String.format("%screated_by_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByName())))); + } + + // add `last_triggered_at` to the URL query string + if (getLastTriggeredAt() != null) { + joiner.add(String.format("%slast_triggered_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastTriggeredAt())))); + } + + // add `trigger_count` to the URL query string + if (getTriggerCount() != null) { + joiner.add(String.format("%strigger_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerCount())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditions.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditions.java new file mode 100644 index 0000000..3690a0f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditions.java @@ -0,0 +1,323 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInner; +import com.futureagi.sdk.model.AutomationRuleScope; +import com.futureagi.sdk.model.RulesInner; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRuleConditions + */ +@JsonPropertyOrder({ + AutomationRuleConditions.JSON_PROPERTY_OPERATOR, + AutomationRuleConditions.JSON_PROPERTY_FILTER, + AutomationRuleConditions.JSON_PROPERTY_SCOPE, + AutomationRuleConditions.JSON_PROPERTY_RULES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRuleConditions { + /** + * Gets or Sets operator + */ + public enum OperatorEnum { + AND(String.valueOf("and")); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_OPERATOR = "operator"; + @javax.annotation.Nullable + private OperatorEnum operator = OperatorEnum.AND; + + public static final String JSON_PROPERTY_FILTER = "filter"; + @javax.annotation.Nullable + private List filter = new ArrayList<>(); + + public static final String JSON_PROPERTY_SCOPE = "scope"; + @javax.annotation.Nullable + private AutomationRuleScope scope; + + public static final String JSON_PROPERTY_RULES = "rules"; + @javax.annotation.Nullable + private List rules = new ArrayList<>(); + + public AutomationRuleConditions() { + } + + public AutomationRuleConditions operator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Get operator + * @return operator + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OperatorEnum getOperator() { + return operator; + } + + + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOperator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + } + + + public AutomationRuleConditions filter(@javax.annotation.Nullable List filter) { + this.filter = filter; + return this; + } + + public AutomationRuleConditions addFilterItem(AutomationRuleConditionsFilterInner filterItem) { + if (this.filter == null) { + this.filter = new ArrayList<>(); + } + this.filter.add(filterItem); + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFilter() { + return filter; + } + + + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilter(@javax.annotation.Nullable List filter) { + this.filter = filter; + } + + + public AutomationRuleConditions scope(@javax.annotation.Nullable AutomationRuleScope scope) { + this.scope = scope; + return this; + } + + /** + * Get scope + * @return scope + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AutomationRuleScope getScope() { + return scope; + } + + + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScope(@javax.annotation.Nullable AutomationRuleScope scope) { + this.scope = scope; + } + + + public AutomationRuleConditions rules(@javax.annotation.Nullable List rules) { + this.rules = rules; + return this; + } + + public AutomationRuleConditions addRulesItem(RulesInner rulesItem) { + if (this.rules == null) { + this.rules = new ArrayList<>(); + } + this.rules.add(rulesItem); + return this; + } + + /** + * Get rules + * @return rules + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRules() { + return rules; + } + + + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRules(@javax.annotation.Nullable List rules) { + this.rules = rules; + } + + + /** + * Return true if this AutomationRuleConditions object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRuleConditions automationRuleConditions = (AutomationRuleConditions) o; + return Objects.equals(this.operator, automationRuleConditions.operator) && + Objects.equals(this.filter, automationRuleConditions.filter) && + Objects.equals(this.scope, automationRuleConditions.scope) && + Objects.equals(this.rules, automationRuleConditions.rules); + } + + @Override + public int hashCode() { + return Objects.hash(operator, filter, scope, rules); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRuleConditions {\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `operator` to the URL query string + if (getOperator() != null) { + joiner.add(String.format("%soperator%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOperator())))); + } + + // add `filter` to the URL query string + if (getFilter() != null) { + for (int i = 0; i < getFilter().size(); i++) { + if (getFilter().get(i) != null) { + joiner.add(getFilter().get(i).toUrlQueryString(String.format("%sfilter%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `scope` to the URL query string + if (getScope() != null) { + joiner.add(getScope().toUrlQueryString(prefix + "scope" + suffix)); + } + + // add `rules` to the URL query string + if (getRules() != null) { + for (int i = 0; i < getRules().size(); i++) { + if (getRules().get(i) != null) { + joiner.add(getRules().get(i).toUrlQueryString(String.format("%srules%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInner.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInner.java new file mode 100644 index 0000000..913a136 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInner.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInnerFilterConfig; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRuleConditionsFilterInner + */ +@JsonPropertyOrder({ + AutomationRuleConditionsFilterInner.JSON_PROPERTY_COLUMN_ID, + AutomationRuleConditionsFilterInner.JSON_PROPERTY_DISPLAY_NAME, + AutomationRuleConditionsFilterInner.JSON_PROPERTY_SOURCE, + AutomationRuleConditionsFilterInner.JSON_PROPERTY_OUTPUT_TYPE, + AutomationRuleConditionsFilterInner.JSON_PROPERTY_FILTER_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRuleConditionsFilterInner { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private String columnId; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + @javax.annotation.Nullable + private String displayName; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source; + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nullable + private String outputType; + + public static final String JSON_PROPERTY_FILTER_CONFIG = "filter_config"; + @javax.annotation.Nonnull + private AutomationRuleConditionsFilterInnerFilterConfig filterConfig; + + public AutomationRuleConditionsFilterInner() { + } + + public AutomationRuleConditionsFilterInner columnId(@javax.annotation.Nonnull String columnId) { + this.columnId = columnId; + return this; + } + + /** + * Column or attribute id to filter on. + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull String columnId) { + this.columnId = columnId; + } + + + public AutomationRuleConditionsFilterInner displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Optional UI label for chips and saved views. + * @return displayName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public AutomationRuleConditionsFilterInner source(@javax.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable String source) { + this.source = source; + } + + + public AutomationRuleConditionsFilterInner outputType(@javax.annotation.Nullable String outputType) { + this.outputType = outputType; + return this; + } + + /** + * Optional metric output type metadata used by eval and annotation filters. + * @return outputType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOutputType() { + return outputType; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputType(@javax.annotation.Nullable String outputType) { + this.outputType = outputType; + } + + + public AutomationRuleConditionsFilterInner filterConfig(@javax.annotation.Nonnull AutomationRuleConditionsFilterInnerFilterConfig filterConfig) { + this.filterConfig = filterConfig; + return this; + } + + /** + * Get filterConfig + * @return filterConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILTER_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AutomationRuleConditionsFilterInnerFilterConfig getFilterConfig() { + return filterConfig; + } + + + @JsonProperty(JSON_PROPERTY_FILTER_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilterConfig(@javax.annotation.Nonnull AutomationRuleConditionsFilterInnerFilterConfig filterConfig) { + this.filterConfig = filterConfig; + } + + + /** + * Return true if this AutomationRuleConditions_filter_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRuleConditionsFilterInner automationRuleConditionsFilterInner = (AutomationRuleConditionsFilterInner) o; + return Objects.equals(this.columnId, automationRuleConditionsFilterInner.columnId) && + Objects.equals(this.displayName, automationRuleConditionsFilterInner.displayName) && + Objects.equals(this.source, automationRuleConditionsFilterInner.source) && + Objects.equals(this.outputType, automationRuleConditionsFilterInner.outputType) && + Objects.equals(this.filterConfig, automationRuleConditionsFilterInner.filterConfig); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, displayName, source, outputType, filterConfig); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRuleConditionsFilterInner {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" filterConfig: ").append(toIndentedString(filterConfig)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `display_name` to the URL query string + if (getDisplayName() != null) { + joiner.add(String.format("%sdisplay_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDisplayName())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `filter_config` to the URL query string + if (getFilterConfig() != null) { + joiner.add(getFilterConfig().toUrlQueryString(prefix + "filter_config" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInnerFilterConfig.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInnerFilterConfig.java new file mode 100644 index 0000000..c4694c9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleConditionsFilterInnerFilterConfig.java @@ -0,0 +1,281 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRuleConditionsFilterInnerFilterConfig + */ +@JsonPropertyOrder({ + AutomationRuleConditionsFilterInnerFilterConfig.JSON_PROPERTY_FILTER_TYPE, + AutomationRuleConditionsFilterInnerFilterConfig.JSON_PROPERTY_FILTER_OP, + AutomationRuleConditionsFilterInnerFilterConfig.JSON_PROPERTY_FILTER_VALUE, + AutomationRuleConditionsFilterInnerFilterConfig.JSON_PROPERTY_COL_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRuleConditionsFilterInnerFilterConfig { + public static final String JSON_PROPERTY_FILTER_TYPE = "filter_type"; + @javax.annotation.Nonnull + private String filterType; + + public static final String JSON_PROPERTY_FILTER_OP = "filter_op"; + @javax.annotation.Nonnull + private String filterOp; + + public static final String JSON_PROPERTY_FILTER_VALUE = "filter_value"; + private JsonNullable filterValue = JsonNullable.of(null); + + public static final String JSON_PROPERTY_COL_TYPE = "col_type"; + @javax.annotation.Nullable + private String colType; + + public AutomationRuleConditionsFilterInnerFilterConfig() { + } + + public AutomationRuleConditionsFilterInnerFilterConfig filterType(@javax.annotation.Nonnull String filterType) { + this.filterType = filterType; + return this; + } + + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + * @return filterType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILTER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFilterType() { + return filterType; + } + + + @JsonProperty(JSON_PROPERTY_FILTER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilterType(@javax.annotation.Nonnull String filterType) { + this.filterType = filterType; + } + + + public AutomationRuleConditionsFilterInnerFilterConfig filterOp(@javax.annotation.Nonnull String filterOp) { + this.filterOp = filterOp; + return this; + } + + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + * @return filterOp + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILTER_OP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFilterOp() { + return filterOp; + } + + + @JsonProperty(JSON_PROPERTY_FILTER_OP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilterOp(@javax.annotation.Nonnull String filterOp) { + this.filterOp = filterOp; + } + + + public AutomationRuleConditionsFilterInnerFilterConfig filterValue(@javax.annotation.Nullable Object filterValue) { + this.filterValue = JsonNullable.of(filterValue); + return this; + } + + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + * @return filterValue + */ + @javax.annotation.Nullable + @JsonIgnore + public Object getFilterValue() { + return filterValue.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FILTER_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFilterValue_JsonNullable() { + return filterValue; + } + + @JsonProperty(JSON_PROPERTY_FILTER_VALUE) + public void setFilterValue_JsonNullable(JsonNullable filterValue) { + this.filterValue = filterValue; + } + + public void setFilterValue(@javax.annotation.Nullable Object filterValue) { + this.filterValue = JsonNullable.of(filterValue); + } + + + public AutomationRuleConditionsFilterInnerFilterConfig colType(@javax.annotation.Nullable String colType) { + this.colType = colType; + return this; + } + + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + * @return colType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getColType() { + return colType; + } + + + @JsonProperty(JSON_PROPERTY_COL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColType(@javax.annotation.Nullable String colType) { + this.colType = colType; + } + + + /** + * Return true if this AutomationRuleConditions_filter_inner_filter_config object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRuleConditionsFilterInnerFilterConfig automationRuleConditionsFilterInnerFilterConfig = (AutomationRuleConditionsFilterInnerFilterConfig) o; + return Objects.equals(this.filterType, automationRuleConditionsFilterInnerFilterConfig.filterType) && + Objects.equals(this.filterOp, automationRuleConditionsFilterInnerFilterConfig.filterOp) && + equalsNullable(this.filterValue, automationRuleConditionsFilterInnerFilterConfig.filterValue) && + Objects.equals(this.colType, automationRuleConditionsFilterInnerFilterConfig.colType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(filterType, filterOp, hashCodeNullable(filterValue), colType); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRuleConditionsFilterInnerFilterConfig {\n"); + sb.append(" filterType: ").append(toIndentedString(filterType)).append("\n"); + sb.append(" filterOp: ").append(toIndentedString(filterOp)).append("\n"); + sb.append(" filterValue: ").append(toIndentedString(filterValue)).append("\n"); + sb.append(" colType: ").append(toIndentedString(colType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `filter_type` to the URL query string + if (getFilterType() != null) { + joiner.add(String.format("%sfilter_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFilterType())))); + } + + // add `filter_op` to the URL query string + if (getFilterOp() != null) { + joiner.add(String.format("%sfilter_op%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFilterOp())))); + } + + // add `filter_value` to the URL query string + if (getFilterValue() != null) { + joiner.add(String.format("%sfilter_value%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFilterValue())))); + } + + // add `col_type` to the URL query string + if (getColType() != null) { + joiner.add(String.format("%scol_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateAcceptedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateAcceptedResponse.java new file mode 100644 index 0000000..f9a6cdc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateAcceptedResponse.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRuleEvaluateAcceptedResponse + */ +@JsonPropertyOrder({ + AutomationRuleEvaluateAcceptedResponse.JSON_PROPERTY_STATUS, + AutomationRuleEvaluateAcceptedResponse.JSON_PROPERTY_WORKFLOW_ID, + AutomationRuleEvaluateAcceptedResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRuleEvaluateAcceptedResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_WORKFLOW_ID = "workflow_id"; + @javax.annotation.Nonnull + private String workflowId; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public AutomationRuleEvaluateAcceptedResponse() { + } + + public AutomationRuleEvaluateAcceptedResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public AutomationRuleEvaluateAcceptedResponse workflowId(@javax.annotation.Nonnull String workflowId) { + this.workflowId = workflowId; + return this; + } + + /** + * Get workflowId + * @return workflowId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getWorkflowId() { + return workflowId; + } + + + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkflowId(@javax.annotation.Nonnull String workflowId) { + this.workflowId = workflowId; + } + + + public AutomationRuleEvaluateAcceptedResponse message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this AutomationRuleEvaluateAcceptedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRuleEvaluateAcceptedResponse automationRuleEvaluateAcceptedResponse = (AutomationRuleEvaluateAcceptedResponse) o; + return Objects.equals(this.status, automationRuleEvaluateAcceptedResponse.status) && + Objects.equals(this.workflowId, automationRuleEvaluateAcceptedResponse.workflowId) && + Objects.equals(this.message, automationRuleEvaluateAcceptedResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(status, workflowId, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRuleEvaluateAcceptedResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `workflow_id` to the URL query string + if (getWorkflowId() != null) { + joiner.add(String.format("%sworkflow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkflowId())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResponse.java new file mode 100644 index 0000000..1205024 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleEvaluateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRuleEvaluateResponse + */ +@JsonPropertyOrder({ + AutomationRuleEvaluateResponse.JSON_PROPERTY_STATUS, + AutomationRuleEvaluateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRuleEvaluateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private AutomationRuleEvaluateResult result; + + public AutomationRuleEvaluateResponse() { + } + + public AutomationRuleEvaluateResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public AutomationRuleEvaluateResponse result(@javax.annotation.Nonnull AutomationRuleEvaluateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AutomationRuleEvaluateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull AutomationRuleEvaluateResult result) { + this.result = result; + } + + + /** + * Return true if this AutomationRuleEvaluateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRuleEvaluateResponse automationRuleEvaluateResponse = (AutomationRuleEvaluateResponse) o; + return Objects.equals(this.status, automationRuleEvaluateResponse.status) && + Objects.equals(this.result, automationRuleEvaluateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRuleEvaluateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResult.java new file mode 100644 index 0000000..6f0600b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleEvaluateResult.java @@ -0,0 +1,295 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRuleEvaluateResult + */ +@JsonPropertyOrder({ + AutomationRuleEvaluateResult.JSON_PROPERTY_MATCHED, + AutomationRuleEvaluateResult.JSON_PROPERTY_ADDED, + AutomationRuleEvaluateResult.JSON_PROPERTY_DUPLICATES, + AutomationRuleEvaluateResult.JSON_PROPERTY_TRUNCATED, + AutomationRuleEvaluateResult.JSON_PROPERTY_ERROR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRuleEvaluateResult { + public static final String JSON_PROPERTY_MATCHED = "matched"; + @javax.annotation.Nonnull + private Integer matched; + + public static final String JSON_PROPERTY_ADDED = "added"; + @javax.annotation.Nonnull + private Integer added; + + public static final String JSON_PROPERTY_DUPLICATES = "duplicates"; + @javax.annotation.Nonnull + private Integer duplicates; + + public static final String JSON_PROPERTY_TRUNCATED = "truncated"; + @javax.annotation.Nullable + private Boolean truncated; + + public static final String JSON_PROPERTY_ERROR = "error"; + @javax.annotation.Nullable + private String error; + + public AutomationRuleEvaluateResult() { + } + + public AutomationRuleEvaluateResult matched(@javax.annotation.Nonnull Integer matched) { + this.matched = matched; + return this; + } + + /** + * Get matched + * @return matched + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MATCHED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getMatched() { + return matched; + } + + + @JsonProperty(JSON_PROPERTY_MATCHED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMatched(@javax.annotation.Nonnull Integer matched) { + this.matched = matched; + } + + + public AutomationRuleEvaluateResult added(@javax.annotation.Nonnull Integer added) { + this.added = added; + return this; + } + + /** + * Get added + * @return added + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAdded() { + return added; + } + + + @JsonProperty(JSON_PROPERTY_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdded(@javax.annotation.Nonnull Integer added) { + this.added = added; + } + + + public AutomationRuleEvaluateResult duplicates(@javax.annotation.Nonnull Integer duplicates) { + this.duplicates = duplicates; + return this; + } + + /** + * Get duplicates + * @return duplicates + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DUPLICATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDuplicates() { + return duplicates; + } + + + @JsonProperty(JSON_PROPERTY_DUPLICATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuplicates(@javax.annotation.Nonnull Integer duplicates) { + this.duplicates = duplicates; + } + + + public AutomationRuleEvaluateResult truncated(@javax.annotation.Nullable Boolean truncated) { + this.truncated = truncated; + return this; + } + + /** + * Get truncated + * @return truncated + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRUNCATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTruncated() { + return truncated; + } + + + @JsonProperty(JSON_PROPERTY_TRUNCATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTruncated(@javax.annotation.Nullable Boolean truncated) { + this.truncated = truncated; + } + + + public AutomationRuleEvaluateResult error(@javax.annotation.Nullable String error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(@javax.annotation.Nullable String error) { + this.error = error; + } + + + /** + * Return true if this AutomationRuleEvaluateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRuleEvaluateResult automationRuleEvaluateResult = (AutomationRuleEvaluateResult) o; + return Objects.equals(this.matched, automationRuleEvaluateResult.matched) && + Objects.equals(this.added, automationRuleEvaluateResult.added) && + Objects.equals(this.duplicates, automationRuleEvaluateResult.duplicates) && + Objects.equals(this.truncated, automationRuleEvaluateResult.truncated) && + Objects.equals(this.error, automationRuleEvaluateResult.error); + } + + @Override + public int hashCode() { + return Objects.hash(matched, added, duplicates, truncated, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRuleEvaluateResult {\n"); + sb.append(" matched: ").append(toIndentedString(matched)).append("\n"); + sb.append(" added: ").append(toIndentedString(added)).append("\n"); + sb.append(" duplicates: ").append(toIndentedString(duplicates)).append("\n"); + sb.append(" truncated: ").append(toIndentedString(truncated)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `matched` to the URL query string + if (getMatched() != null) { + joiner.add(String.format("%smatched%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMatched())))); + } + + // add `added` to the URL query string + if (getAdded() != null) { + joiner.add(String.format("%sadded%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdded())))); + } + + // add `duplicates` to the URL query string + if (getDuplicates() != null) { + joiner.add(String.format("%sduplicates%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDuplicates())))); + } + + // add `truncated` to the URL query string + if (getTruncated() != null) { + joiner.add(String.format("%struncated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTruncated())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleScope.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleScope.java new file mode 100644 index 0000000..8f92138 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/AutomationRuleScope.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * AutomationRuleScope + */ +@JsonPropertyOrder({ + AutomationRuleScope.JSON_PROPERTY_DATASET_ID, + AutomationRuleScope.JSON_PROPERTY_PROJECT_ID, + AutomationRuleScope.JSON_PROPERTY_IS_VOICE_CALL, + AutomationRuleScope.JSON_PROPERTY_REMOVE_SIMULATION_CALLS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class AutomationRuleScope { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private UUID datasetId; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + @javax.annotation.Nullable + private UUID projectId; + + public static final String JSON_PROPERTY_IS_VOICE_CALL = "is_voice_call"; + @javax.annotation.Nullable + private Boolean isVoiceCall; + + public static final String JSON_PROPERTY_REMOVE_SIMULATION_CALLS = "remove_simulation_calls"; + @javax.annotation.Nullable + private Boolean removeSimulationCalls; + + public AutomationRuleScope() { + } + + public AutomationRuleScope datasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + } + + + public AutomationRuleScope projectId(@javax.annotation.Nullable UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProjectId(@javax.annotation.Nullable UUID projectId) { + this.projectId = projectId; + } + + + public AutomationRuleScope isVoiceCall(@javax.annotation.Nullable Boolean isVoiceCall) { + this.isVoiceCall = isVoiceCall; + return this; + } + + /** + * Get isVoiceCall + * @return isVoiceCall + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_VOICE_CALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsVoiceCall() { + return isVoiceCall; + } + + + @JsonProperty(JSON_PROPERTY_IS_VOICE_CALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsVoiceCall(@javax.annotation.Nullable Boolean isVoiceCall) { + this.isVoiceCall = isVoiceCall; + } + + + public AutomationRuleScope removeSimulationCalls(@javax.annotation.Nullable Boolean removeSimulationCalls) { + this.removeSimulationCalls = removeSimulationCalls; + return this; + } + + /** + * Get removeSimulationCalls + * @return removeSimulationCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOVE_SIMULATION_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemoveSimulationCalls() { + return removeSimulationCalls; + } + + + @JsonProperty(JSON_PROPERTY_REMOVE_SIMULATION_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemoveSimulationCalls(@javax.annotation.Nullable Boolean removeSimulationCalls) { + this.removeSimulationCalls = removeSimulationCalls; + } + + + /** + * Return true if this AutomationRuleScope object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutomationRuleScope automationRuleScope = (AutomationRuleScope) o; + return Objects.equals(this.datasetId, automationRuleScope.datasetId) && + Objects.equals(this.projectId, automationRuleScope.projectId) && + Objects.equals(this.isVoiceCall, automationRuleScope.isVoiceCall) && + Objects.equals(this.removeSimulationCalls, automationRuleScope.removeSimulationCalls); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, projectId, isVoiceCall, removeSimulationCalls); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutomationRuleScope {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" isVoiceCall: ").append(toIndentedString(isVoiceCall)).append("\n"); + sb.append(" removeSimulationCalls: ").append(toIndentedString(removeSimulationCalls)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `project_id` to the URL query string + if (getProjectId() != null) { + joiner.add(String.format("%sproject_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectId())))); + } + + // add `is_voice_call` to the URL query string + if (getIsVoiceCall() != null) { + joiner.add(String.format("%sis_voice_call%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsVoiceCall())))); + } + + // add `remove_simulation_calls` to the URL query string + if (getRemoveSimulationCalls() != null) { + joiner.add(String.format("%sremove_simulation_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemoveSimulationCalls())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponse.java new file mode 100644 index 0000000..cd86a75 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.BaseColumnsResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BaseColumnsResponse + */ +@JsonPropertyOrder({ + BaseColumnsResponse.JSON_PROPERTY_STATUS, + BaseColumnsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BaseColumnsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private BaseColumnsResponseResult result; + + public BaseColumnsResponse() { + } + + public BaseColumnsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public BaseColumnsResponse result(@javax.annotation.Nonnull BaseColumnsResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BaseColumnsResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull BaseColumnsResponseResult result) { + this.result = result; + } + + + /** + * Return true if this BaseColumnsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BaseColumnsResponse baseColumnsResponse = (BaseColumnsResponse) o; + return Objects.equals(this.status, baseColumnsResponse.status) && + Objects.equals(this.result, baseColumnsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BaseColumnsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponseResult.java new file mode 100644 index 0000000..d60055a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BaseColumnsResponseResult.java @@ -0,0 +1,165 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BaseColumnsResponseResult + */ +@JsonPropertyOrder({ + BaseColumnsResponseResult.JSON_PROPERTY_BASE_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BaseColumnsResponseResult { + public static final String JSON_PROPERTY_BASE_COLUMNS = "base_columns"; + @javax.annotation.Nonnull + private List baseColumns = new ArrayList<>(); + + public BaseColumnsResponseResult() { + } + + public BaseColumnsResponseResult baseColumns(@javax.annotation.Nonnull List baseColumns) { + this.baseColumns = baseColumns; + return this; + } + + public BaseColumnsResponseResult addBaseColumnsItem(String baseColumnsItem) { + if (this.baseColumns == null) { + this.baseColumns = new ArrayList<>(); + } + this.baseColumns.add(baseColumnsItem); + return this; + } + + /** + * Get baseColumns + * @return baseColumns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getBaseColumns() { + return baseColumns; + } + + + @JsonProperty(JSON_PROPERTY_BASE_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseColumns(@javax.annotation.Nonnull List baseColumns) { + this.baseColumns = baseColumns; + } + + + /** + * Return true if this BaseColumnsResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BaseColumnsResponseResult baseColumnsResponseResult = (BaseColumnsResponseResult) o; + return Objects.equals(this.baseColumns, baseColumnsResponseResult.baseColumns); + } + + @Override + public int hashCode() { + return Objects.hash(baseColumns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BaseColumnsResponseResult {\n"); + sb.append(" baseColumns: ").append(toIndentedString(baseColumns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `base_columns` to the URL query string + if (getBaseColumns() != null) { + for (int i = 0; i < getBaseColumns().size(); i++) { + joiner.add(String.format("%sbase_columns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getBaseColumns().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationAnnotationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationAnnotationRequest.java new file mode 100644 index 0000000..e731e80 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationAnnotationRequest.java @@ -0,0 +1,311 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkAnnotationAnnotationRequest + */ +@JsonPropertyOrder({ + BulkAnnotationAnnotationRequest.JSON_PROPERTY_ANNOTATION_LABEL_ID, + BulkAnnotationAnnotationRequest.JSON_PROPERTY_VALUE, + BulkAnnotationAnnotationRequest.JSON_PROPERTY_VALUE_FLOAT, + BulkAnnotationAnnotationRequest.JSON_PROPERTY_VALUE_BOOL, + BulkAnnotationAnnotationRequest.JSON_PROPERTY_VALUE_STR_LIST +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkAnnotationAnnotationRequest { + public static final String JSON_PROPERTY_ANNOTATION_LABEL_ID = "annotation_label_id"; + @javax.annotation.Nonnull + private UUID annotationLabelId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable + private String value; + + public static final String JSON_PROPERTY_VALUE_FLOAT = "value_float"; + @javax.annotation.Nullable + private BigDecimal valueFloat; + + public static final String JSON_PROPERTY_VALUE_BOOL = "value_bool"; + @javax.annotation.Nullable + private Boolean valueBool; + + public static final String JSON_PROPERTY_VALUE_STR_LIST = "value_str_list"; + @javax.annotation.Nullable + private List valueStrList = new ArrayList<>(); + + public BulkAnnotationAnnotationRequest() { + } + + public BulkAnnotationAnnotationRequest annotationLabelId(@javax.annotation.Nonnull UUID annotationLabelId) { + this.annotationLabelId = annotationLabelId; + return this; + } + + /** + * Get annotationLabelId + * @return annotationLabelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATION_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getAnnotationLabelId() { + return annotationLabelId; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATION_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotationLabelId(@javax.annotation.Nonnull UUID annotationLabelId) { + this.annotationLabelId = annotationLabelId; + } + + + public BulkAnnotationAnnotationRequest value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + public BulkAnnotationAnnotationRequest valueFloat(@javax.annotation.Nullable BigDecimal valueFloat) { + this.valueFloat = valueFloat; + return this; + } + + /** + * Get valueFloat + * @return valueFloat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getValueFloat() { + return valueFloat; + } + + + @JsonProperty(JSON_PROPERTY_VALUE_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValueFloat(@javax.annotation.Nullable BigDecimal valueFloat) { + this.valueFloat = valueFloat; + } + + + public BulkAnnotationAnnotationRequest valueBool(@javax.annotation.Nullable Boolean valueBool) { + this.valueBool = valueBool; + return this; + } + + /** + * Get valueBool + * @return valueBool + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE_BOOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getValueBool() { + return valueBool; + } + + + @JsonProperty(JSON_PROPERTY_VALUE_BOOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValueBool(@javax.annotation.Nullable Boolean valueBool) { + this.valueBool = valueBool; + } + + + public BulkAnnotationAnnotationRequest valueStrList(@javax.annotation.Nullable List valueStrList) { + this.valueStrList = valueStrList; + return this; + } + + public BulkAnnotationAnnotationRequest addValueStrListItem(String valueStrListItem) { + if (this.valueStrList == null) { + this.valueStrList = new ArrayList<>(); + } + this.valueStrList.add(valueStrListItem); + return this; + } + + /** + * Get valueStrList + * @return valueStrList + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE_STR_LIST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getValueStrList() { + return valueStrList; + } + + + @JsonProperty(JSON_PROPERTY_VALUE_STR_LIST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValueStrList(@javax.annotation.Nullable List valueStrList) { + this.valueStrList = valueStrList; + } + + + /** + * Return true if this BulkAnnotationAnnotationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkAnnotationAnnotationRequest bulkAnnotationAnnotationRequest = (BulkAnnotationAnnotationRequest) o; + return Objects.equals(this.annotationLabelId, bulkAnnotationAnnotationRequest.annotationLabelId) && + Objects.equals(this.value, bulkAnnotationAnnotationRequest.value) && + Objects.equals(this.valueFloat, bulkAnnotationAnnotationRequest.valueFloat) && + Objects.equals(this.valueBool, bulkAnnotationAnnotationRequest.valueBool) && + Objects.equals(this.valueStrList, bulkAnnotationAnnotationRequest.valueStrList); + } + + @Override + public int hashCode() { + return Objects.hash(annotationLabelId, value, valueFloat, valueBool, valueStrList); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkAnnotationAnnotationRequest {\n"); + sb.append(" annotationLabelId: ").append(toIndentedString(annotationLabelId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" valueFloat: ").append(toIndentedString(valueFloat)).append("\n"); + sb.append(" valueBool: ").append(toIndentedString(valueBool)).append("\n"); + sb.append(" valueStrList: ").append(toIndentedString(valueStrList)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `annotation_label_id` to the URL query string + if (getAnnotationLabelId() != null) { + joiner.add(String.format("%sannotation_label_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationLabelId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `value_float` to the URL query string + if (getValueFloat() != null) { + joiner.add(String.format("%svalue_float%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueFloat())))); + } + + // add `value_bool` to the URL query string + if (getValueBool() != null) { + joiner.add(String.format("%svalue_bool%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueBool())))); + } + + // add `value_str_list` to the URL query string + if (getValueStrList() != null) { + for (int i = 0; i < getValueStrList().size(); i++) { + joiner.add(String.format("%svalue_str_list%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getValueStrList().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationNoteRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationNoteRequest.java new file mode 100644 index 0000000..0dad9e8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationNoteRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkAnnotationNoteRequest + */ +@JsonPropertyOrder({ + BulkAnnotationNoteRequest.JSON_PROPERTY_TEXT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkAnnotationNoteRequest { + public static final String JSON_PROPERTY_TEXT = "text"; + @javax.annotation.Nonnull + private String text; + + public BulkAnnotationNoteRequest() { + } + + public BulkAnnotationNoteRequest text(@javax.annotation.Nonnull String text) { + this.text = text; + return this; + } + + /** + * Get text + * @return text + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getText() { + return text; + } + + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setText(@javax.annotation.Nonnull String text) { + this.text = text; + } + + + /** + * Return true if this BulkAnnotationNoteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkAnnotationNoteRequest bulkAnnotationNoteRequest = (BulkAnnotationNoteRequest) o; + return Objects.equals(this.text, bulkAnnotationNoteRequest.text); + } + + @Override + public int hashCode() { + return Objects.hash(text); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkAnnotationNoteRequest {\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `text` to the URL query string + if (getText() != null) { + joiner.add(String.format("%stext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getText())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRecordRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRecordRequest.java new file mode 100644 index 0000000..e2b8293 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRecordRequest.java @@ -0,0 +1,253 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.BulkAnnotationAnnotationRequest; +import com.futureagi.sdk.model.BulkAnnotationNoteRequest; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkAnnotationRecordRequest + */ +@JsonPropertyOrder({ + BulkAnnotationRecordRequest.JSON_PROPERTY_OBSERVATION_SPAN_ID, + BulkAnnotationRecordRequest.JSON_PROPERTY_ANNOTATIONS, + BulkAnnotationRecordRequest.JSON_PROPERTY_NOTES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkAnnotationRecordRequest { + public static final String JSON_PROPERTY_OBSERVATION_SPAN_ID = "observation_span_id"; + @javax.annotation.Nonnull + private String observationSpanId; + + public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; + @javax.annotation.Nullable + private List annotations = new ArrayList<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private List notes = new ArrayList<>(); + + public BulkAnnotationRecordRequest() { + } + + public BulkAnnotationRecordRequest observationSpanId(@javax.annotation.Nonnull String observationSpanId) { + this.observationSpanId = observationSpanId; + return this; + } + + /** + * Get observationSpanId + * @return observationSpanId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OBSERVATION_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getObservationSpanId() { + return observationSpanId; + } + + + @JsonProperty(JSON_PROPERTY_OBSERVATION_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setObservationSpanId(@javax.annotation.Nonnull String observationSpanId) { + this.observationSpanId = observationSpanId; + } + + + public BulkAnnotationRecordRequest annotations(@javax.annotation.Nullable List annotations) { + this.annotations = annotations; + return this; + } + + public BulkAnnotationRecordRequest addAnnotationsItem(BulkAnnotationAnnotationRequest annotationsItem) { + if (this.annotations == null) { + this.annotations = new ArrayList<>(); + } + this.annotations.add(annotationsItem); + return this; + } + + /** + * Get annotations + * @return annotations + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAnnotations() { + return annotations; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnotations(@javax.annotation.Nullable List annotations) { + this.annotations = annotations; + } + + + public BulkAnnotationRecordRequest notes(@javax.annotation.Nullable List notes) { + this.notes = notes; + return this; + } + + public BulkAnnotationRecordRequest addNotesItem(BulkAnnotationNoteRequest notesItem) { + if (this.notes == null) { + this.notes = new ArrayList<>(); + } + this.notes.add(notesItem); + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable List notes) { + this.notes = notes; + } + + + /** + * Return true if this BulkAnnotationRecordRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkAnnotationRecordRequest bulkAnnotationRecordRequest = (BulkAnnotationRecordRequest) o; + return Objects.equals(this.observationSpanId, bulkAnnotationRecordRequest.observationSpanId) && + Objects.equals(this.annotations, bulkAnnotationRecordRequest.annotations) && + Objects.equals(this.notes, bulkAnnotationRecordRequest.notes); + } + + @Override + public int hashCode() { + return Objects.hash(observationSpanId, annotations, notes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkAnnotationRecordRequest {\n"); + sb.append(" observationSpanId: ").append(toIndentedString(observationSpanId)).append("\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `observation_span_id` to the URL query string + if (getObservationSpanId() != null) { + joiner.add(String.format("%sobservation_span_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getObservationSpanId())))); + } + + // add `annotations` to the URL query string + if (getAnnotations() != null) { + for (int i = 0; i < getAnnotations().size(); i++) { + if (getAnnotations().get(i) != null) { + joiner.add(getAnnotations().get(i).toUrlQueryString(String.format("%sannotations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + for (int i = 0; i < getNotes().size(); i++) { + if (getNotes().get(i) != null) { + joiner.add(getNotes().get(i).toUrlQueryString(String.format("%snotes%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRequest.java new file mode 100644 index 0000000..8776ec2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationRequest.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.BulkAnnotationRecordRequest; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkAnnotationRequest + */ +@JsonPropertyOrder({ + BulkAnnotationRequest.JSON_PROPERTY_RECORDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkAnnotationRequest { + public static final String JSON_PROPERTY_RECORDS = "records"; + @javax.annotation.Nonnull + private List records = new ArrayList<>(); + + public BulkAnnotationRequest() { + } + + public BulkAnnotationRequest records(@javax.annotation.Nonnull List records) { + this.records = records; + return this; + } + + public BulkAnnotationRequest addRecordsItem(BulkAnnotationRecordRequest recordsItem) { + if (this.records == null) { + this.records = new ArrayList<>(); + } + this.records.add(recordsItem); + return this; + } + + /** + * Get records + * @return records + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRecords() { + return records; + } + + + @JsonProperty(JSON_PROPERTY_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecords(@javax.annotation.Nonnull List records) { + this.records = records; + } + + + /** + * Return true if this BulkAnnotationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkAnnotationRequest bulkAnnotationRequest = (BulkAnnotationRequest) o; + return Objects.equals(this.records, bulkAnnotationRequest.records); + } + + @Override + public int hashCode() { + return Objects.hash(records); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkAnnotationRequest {\n"); + sb.append(" records: ").append(toIndentedString(records)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `records` to the URL query string + if (getRecords() != null) { + for (int i = 0; i < getRecords().size(); i++) { + if (getRecords().get(i) != null) { + joiner.add(getRecords().get(i).toUrlQueryString(String.format("%srecords%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponse.java new file mode 100644 index 0000000..af111cf --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.BulkAnnotationResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkAnnotationResponse + */ +@JsonPropertyOrder({ + BulkAnnotationResponse.JSON_PROPERTY_STATUS, + BulkAnnotationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkAnnotationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private BulkAnnotationResponseResult result; + + public BulkAnnotationResponse() { + } + + public BulkAnnotationResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public BulkAnnotationResponse result(@javax.annotation.Nonnull BulkAnnotationResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BulkAnnotationResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull BulkAnnotationResponseResult result) { + this.result = result; + } + + + /** + * Return true if this BulkAnnotationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkAnnotationResponse bulkAnnotationResponse = (BulkAnnotationResponse) o; + return Objects.equals(this.status, bulkAnnotationResponse.status) && + Objects.equals(this.result, bulkAnnotationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkAnnotationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponseResult.java new file mode 100644 index 0000000..0dd50ed --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkAnnotationResponseResult.java @@ -0,0 +1,503 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkAnnotationResponseResult + */ +@JsonPropertyOrder({ + BulkAnnotationResponseResult.JSON_PROPERTY_MESSAGE, + BulkAnnotationResponseResult.JSON_PROPERTY_ANNOTATIONS_CREATED, + BulkAnnotationResponseResult.JSON_PROPERTY_ANNOTATIONS_UPDATED, + BulkAnnotationResponseResult.JSON_PROPERTY_NOTES_CREATED, + BulkAnnotationResponseResult.JSON_PROPERTY_SUCCEEDED_COUNT, + BulkAnnotationResponseResult.JSON_PROPERTY_ERRORS_COUNT, + BulkAnnotationResponseResult.JSON_PROPERTY_WARNINGS_COUNT, + BulkAnnotationResponseResult.JSON_PROPERTY_WARNINGS, + BulkAnnotationResponseResult.JSON_PROPERTY_ERRORS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkAnnotationResponseResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_ANNOTATIONS_CREATED = "annotations_created"; + @javax.annotation.Nonnull + private Integer annotationsCreated; + + public static final String JSON_PROPERTY_ANNOTATIONS_UPDATED = "annotations_updated"; + @javax.annotation.Nonnull + private Integer annotationsUpdated; + + public static final String JSON_PROPERTY_NOTES_CREATED = "notes_created"; + @javax.annotation.Nonnull + private Integer notesCreated; + + public static final String JSON_PROPERTY_SUCCEEDED_COUNT = "succeeded_count"; + @javax.annotation.Nonnull + private Integer succeededCount; + + public static final String JSON_PROPERTY_ERRORS_COUNT = "errors_count"; + @javax.annotation.Nonnull + private Integer errorsCount; + + public static final String JSON_PROPERTY_WARNINGS_COUNT = "warnings_count"; + @javax.annotation.Nonnull + private Integer warningsCount; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private JsonNullable>> warnings = JsonNullable.>>undefined(); + + public static final String JSON_PROPERTY_ERRORS = "errors"; + private JsonNullable>> errors = JsonNullable.>>undefined(); + + public BulkAnnotationResponseResult() { + } + + public BulkAnnotationResponseResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public BulkAnnotationResponseResult annotationsCreated(@javax.annotation.Nonnull Integer annotationsCreated) { + this.annotationsCreated = annotationsCreated; + return this; + } + + /** + * Get annotationsCreated + * @return annotationsCreated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAnnotationsCreated() { + return annotationsCreated; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotationsCreated(@javax.annotation.Nonnull Integer annotationsCreated) { + this.annotationsCreated = annotationsCreated; + } + + + public BulkAnnotationResponseResult annotationsUpdated(@javax.annotation.Nonnull Integer annotationsUpdated) { + this.annotationsUpdated = annotationsUpdated; + return this; + } + + /** + * Get annotationsUpdated + * @return annotationsUpdated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAnnotationsUpdated() { + return annotationsUpdated; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotationsUpdated(@javax.annotation.Nonnull Integer annotationsUpdated) { + this.annotationsUpdated = annotationsUpdated; + } + + + public BulkAnnotationResponseResult notesCreated(@javax.annotation.Nonnull Integer notesCreated) { + this.notesCreated = notesCreated; + return this; + } + + /** + * Get notesCreated + * @return notesCreated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NOTES_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNotesCreated() { + return notesCreated; + } + + + @JsonProperty(JSON_PROPERTY_NOTES_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotesCreated(@javax.annotation.Nonnull Integer notesCreated) { + this.notesCreated = notesCreated; + } + + + public BulkAnnotationResponseResult succeededCount(@javax.annotation.Nonnull Integer succeededCount) { + this.succeededCount = succeededCount; + return this; + } + + /** + * Get succeededCount + * @return succeededCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCEEDED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSucceededCount() { + return succeededCount; + } + + + @JsonProperty(JSON_PROPERTY_SUCCEEDED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSucceededCount(@javax.annotation.Nonnull Integer succeededCount) { + this.succeededCount = succeededCount; + } + + + public BulkAnnotationResponseResult errorsCount(@javax.annotation.Nonnull Integer errorsCount) { + this.errorsCount = errorsCount; + return this; + } + + /** + * Get errorsCount + * @return errorsCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERRORS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getErrorsCount() { + return errorsCount; + } + + + @JsonProperty(JSON_PROPERTY_ERRORS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorsCount(@javax.annotation.Nonnull Integer errorsCount) { + this.errorsCount = errorsCount; + } + + + public BulkAnnotationResponseResult warningsCount(@javax.annotation.Nonnull Integer warningsCount) { + this.warningsCount = warningsCount; + return this; + } + + /** + * Get warningsCount + * @return warningsCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WARNINGS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getWarningsCount() { + return warningsCount; + } + + + @JsonProperty(JSON_PROPERTY_WARNINGS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWarningsCount(@javax.annotation.Nonnull Integer warningsCount) { + this.warningsCount = warningsCount; + } + + + public BulkAnnotationResponseResult warnings(@javax.annotation.Nullable List> warnings) { + this.warnings = JsonNullable.>>of(warnings); + return this; + } + + public BulkAnnotationResponseResult addWarningsItem(Map warningsItem) { + if (this.warnings == null || !this.warnings.isPresent()) { + this.warnings = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.warnings.get().add(warningsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get warnings + * @return warnings + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getWarnings() { + return warnings.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getWarnings_JsonNullable() { + return warnings; + } + + @JsonProperty(JSON_PROPERTY_WARNINGS) + public void setWarnings_JsonNullable(JsonNullable>> warnings) { + this.warnings = warnings; + } + + public void setWarnings(@javax.annotation.Nullable List> warnings) { + this.warnings = JsonNullable.>>of(warnings); + } + + + public BulkAnnotationResponseResult errors(@javax.annotation.Nullable List> errors) { + this.errors = JsonNullable.>>of(errors); + return this; + } + + public BulkAnnotationResponseResult addErrorsItem(Map errorsItem) { + if (this.errors == null || !this.errors.isPresent()) { + this.errors = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.errors.get().add(errorsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getErrors() { + return errors.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getErrors_JsonNullable() { + return errors; + } + + @JsonProperty(JSON_PROPERTY_ERRORS) + public void setErrors_JsonNullable(JsonNullable>> errors) { + this.errors = errors; + } + + public void setErrors(@javax.annotation.Nullable List> errors) { + this.errors = JsonNullable.>>of(errors); + } + + + /** + * Return true if this BulkAnnotationResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkAnnotationResponseResult bulkAnnotationResponseResult = (BulkAnnotationResponseResult) o; + return Objects.equals(this.message, bulkAnnotationResponseResult.message) && + Objects.equals(this.annotationsCreated, bulkAnnotationResponseResult.annotationsCreated) && + Objects.equals(this.annotationsUpdated, bulkAnnotationResponseResult.annotationsUpdated) && + Objects.equals(this.notesCreated, bulkAnnotationResponseResult.notesCreated) && + Objects.equals(this.succeededCount, bulkAnnotationResponseResult.succeededCount) && + Objects.equals(this.errorsCount, bulkAnnotationResponseResult.errorsCount) && + Objects.equals(this.warningsCount, bulkAnnotationResponseResult.warningsCount) && + equalsNullable(this.warnings, bulkAnnotationResponseResult.warnings) && + equalsNullable(this.errors, bulkAnnotationResponseResult.errors); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(message, annotationsCreated, annotationsUpdated, notesCreated, succeededCount, errorsCount, warningsCount, hashCodeNullable(warnings), hashCodeNullable(errors)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkAnnotationResponseResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" annotationsCreated: ").append(toIndentedString(annotationsCreated)).append("\n"); + sb.append(" annotationsUpdated: ").append(toIndentedString(annotationsUpdated)).append("\n"); + sb.append(" notesCreated: ").append(toIndentedString(notesCreated)).append("\n"); + sb.append(" succeededCount: ").append(toIndentedString(succeededCount)).append("\n"); + sb.append(" errorsCount: ").append(toIndentedString(errorsCount)).append("\n"); + sb.append(" warningsCount: ").append(toIndentedString(warningsCount)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `annotations_created` to the URL query string + if (getAnnotationsCreated() != null) { + joiner.add(String.format("%sannotations_created%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationsCreated())))); + } + + // add `annotations_updated` to the URL query string + if (getAnnotationsUpdated() != null) { + joiner.add(String.format("%sannotations_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationsUpdated())))); + } + + // add `notes_created` to the URL query string + if (getNotesCreated() != null) { + joiner.add(String.format("%snotes_created%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotesCreated())))); + } + + // add `succeeded_count` to the URL query string + if (getSucceededCount() != null) { + joiner.add(String.format("%ssucceeded_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSucceededCount())))); + } + + // add `errors_count` to the URL query string + if (getErrorsCount() != null) { + joiner.add(String.format("%serrors_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorsCount())))); + } + + // add `warnings_count` to the URL query string + if (getWarningsCount() != null) { + joiner.add(String.format("%swarnings_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWarningsCount())))); + } + + // add `warnings` to the URL query string + if (getWarnings() != null) { + for (int i = 0; i < getWarnings().size(); i++) { + joiner.add(String.format("%swarnings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getWarnings().get(i))))); + } + } + + // add `errors` to the URL query string + if (getErrors() != null) { + for (int i = 0; i < getErrors().size(); i++) { + joiner.add(String.format("%serrors%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getErrors().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoreItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoreItem.java new file mode 100644 index 0000000..40c980b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoreItem.java @@ -0,0 +1,313 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkCreateScoreItem + */ +@JsonPropertyOrder({ + BulkCreateScoreItem.JSON_PROPERTY_LABEL_ID, + BulkCreateScoreItem.JSON_PROPERTY_VALUE, + BulkCreateScoreItem.JSON_PROPERTY_NOTES, + BulkCreateScoreItem.JSON_PROPERTY_SCORE_SOURCE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkCreateScoreItem { + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nonnull + private UUID labelId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private String notes = ""; + + /** + * Gets or Sets scoreSource + */ + public enum ScoreSourceEnum { + HUMAN(String.valueOf("human")), + + API(String.valueOf("api")), + + AUTO(String.valueOf("auto")), + + IMPORTED(String.valueOf("imported")); + + private String value; + + ScoreSourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScoreSourceEnum fromValue(String value) { + for (ScoreSourceEnum b : ScoreSourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCORE_SOURCE = "score_source"; + @javax.annotation.Nullable + private ScoreSourceEnum scoreSource = ScoreSourceEnum.HUMAN; + + public BulkCreateScoreItem() { + } + + public BulkCreateScoreItem labelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + } + + + public BulkCreateScoreItem value(@javax.annotation.Nonnull Map value) { + this.value = value; + return this; + } + + public BulkCreateScoreItem putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Map value) { + this.value = value; + } + + + public BulkCreateScoreItem notes(@javax.annotation.Nullable String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = notes; + } + + + public BulkCreateScoreItem scoreSource(@javax.annotation.Nullable ScoreSourceEnum scoreSource) { + this.scoreSource = scoreSource; + return this; + } + + /** + * Get scoreSource + * @return scoreSource + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScoreSourceEnum getScoreSource() { + return scoreSource; + } + + + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScoreSource(@javax.annotation.Nullable ScoreSourceEnum scoreSource) { + this.scoreSource = scoreSource; + } + + + /** + * Return true if this BulkCreateScoreItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkCreateScoreItem bulkCreateScoreItem = (BulkCreateScoreItem) o; + return Objects.equals(this.labelId, bulkCreateScoreItem.labelId) && + Objects.equals(this.value, bulkCreateScoreItem.value) && + Objects.equals(this.notes, bulkCreateScoreItem.notes) && + Objects.equals(this.scoreSource, bulkCreateScoreItem.scoreSource); + } + + @Override + public int hashCode() { + return Objects.hash(labelId, value, notes, scoreSource); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkCreateScoreItem {\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" scoreSource: ").append(toIndentedString(scoreSource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `score_source` to the URL query string + if (getScoreSource() != null) { + joiner.add(String.format("%sscore_source%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScoreSource())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScores.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScores.java new file mode 100644 index 0000000..98a9658 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScores.java @@ -0,0 +1,463 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.BulkCreateScoreItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkCreateScores + */ +@JsonPropertyOrder({ + BulkCreateScores.JSON_PROPERTY_SOURCE_TYPE, + BulkCreateScores.JSON_PROPERTY_SOURCE_ID, + BulkCreateScores.JSON_PROPERTY_SCORES, + BulkCreateScores.JSON_PROPERTY_NOTES, + BulkCreateScores.JSON_PROPERTY_SPAN_NOTES, + BulkCreateScores.JSON_PROPERTY_SPAN_NOTES_SOURCE_ID, + BulkCreateScores.JSON_PROPERTY_QUEUE_ITEM_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkCreateScores { + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + DATASET_ROW(String.valueOf("dataset_row")), + + TRACE(String.valueOf("trace")), + + OBSERVATION_SPAN(String.valueOf("observation_span")), + + PROTOTYPE_RUN(String.valueOf("prototype_run")), + + CALL_EXECUTION(String.valueOf("call_execution")), + + TRACE_SESSION(String.valueOf("trace_session")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nonnull + private String sourceId; + + public static final String JSON_PROPERTY_SCORES = "scores"; + @javax.annotation.Nonnull + private List scores = new ArrayList<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private String notes = ""; + + public static final String JSON_PROPERTY_SPAN_NOTES = "span_notes"; + private JsonNullable spanNotes = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SPAN_NOTES_SOURCE_ID = "span_notes_source_id"; + private JsonNullable spanNotesSourceId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_QUEUE_ITEM_ID = "queue_item_id"; + private JsonNullable queueItemId = JsonNullable.undefined(); + + public BulkCreateScores() { + } + + public BulkCreateScores sourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + public BulkCreateScores sourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + } + + + public BulkCreateScores scores(@javax.annotation.Nonnull List scores) { + this.scores = scores; + return this; + } + + public BulkCreateScores addScoresItem(BulkCreateScoreItem scoresItem) { + if (this.scores == null) { + this.scores = new ArrayList<>(); + } + this.scores.add(scoresItem); + return this; + } + + /** + * Get scores + * @return scores + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCORES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScores() { + return scores; + } + + + @JsonProperty(JSON_PROPERTY_SCORES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScores(@javax.annotation.Nonnull List scores) { + this.scores = scores; + } + + + public BulkCreateScores notes(@javax.annotation.Nullable String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = notes; + } + + + public BulkCreateScores spanNotes(@javax.annotation.Nullable String spanNotes) { + this.spanNotes = JsonNullable.of(spanNotes); + return this; + } + + /** + * Get spanNotes + * @return spanNotes + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSpanNotes() { + return spanNotes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSpanNotes_JsonNullable() { + return spanNotes; + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + public void setSpanNotes_JsonNullable(JsonNullable spanNotes) { + this.spanNotes = spanNotes; + } + + public void setSpanNotes(@javax.annotation.Nullable String spanNotes) { + this.spanNotes = JsonNullable.of(spanNotes); + } + + + public BulkCreateScores spanNotesSourceId(@javax.annotation.Nullable String spanNotesSourceId) { + this.spanNotesSourceId = JsonNullable.of(spanNotesSourceId); + return this; + } + + /** + * Get spanNotesSourceId + * @return spanNotesSourceId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSpanNotesSourceId() { + return spanNotesSourceId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSpanNotesSourceId_JsonNullable() { + return spanNotesSourceId; + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES_SOURCE_ID) + public void setSpanNotesSourceId_JsonNullable(JsonNullable spanNotesSourceId) { + this.spanNotesSourceId = spanNotesSourceId; + } + + public void setSpanNotesSourceId(@javax.annotation.Nullable String spanNotesSourceId) { + this.spanNotesSourceId = JsonNullable.of(spanNotesSourceId); + } + + + public BulkCreateScores queueItemId(@javax.annotation.Nullable UUID queueItemId) { + this.queueItemId = JsonNullable.of(queueItemId); + return this; + } + + /** + * Get queueItemId + * @return queueItemId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getQueueItemId() { + return queueItemId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_QUEUE_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getQueueItemId_JsonNullable() { + return queueItemId; + } + + @JsonProperty(JSON_PROPERTY_QUEUE_ITEM_ID) + public void setQueueItemId_JsonNullable(JsonNullable queueItemId) { + this.queueItemId = queueItemId; + } + + public void setQueueItemId(@javax.annotation.Nullable UUID queueItemId) { + this.queueItemId = JsonNullable.of(queueItemId); + } + + + /** + * Return true if this BulkCreateScores object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkCreateScores bulkCreateScores = (BulkCreateScores) o; + return Objects.equals(this.sourceType, bulkCreateScores.sourceType) && + Objects.equals(this.sourceId, bulkCreateScores.sourceId) && + Objects.equals(this.scores, bulkCreateScores.scores) && + Objects.equals(this.notes, bulkCreateScores.notes) && + equalsNullable(this.spanNotes, bulkCreateScores.spanNotes) && + equalsNullable(this.spanNotesSourceId, bulkCreateScores.spanNotesSourceId) && + equalsNullable(this.queueItemId, bulkCreateScores.queueItemId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(sourceType, sourceId, scores, notes, hashCodeNullable(spanNotes), hashCodeNullable(spanNotesSourceId), hashCodeNullable(queueItemId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkCreateScores {\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" scores: ").append(toIndentedString(scores)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" spanNotes: ").append(toIndentedString(spanNotes)).append("\n"); + sb.append(" spanNotesSourceId: ").append(toIndentedString(spanNotesSourceId)).append("\n"); + sb.append(" queueItemId: ").append(toIndentedString(queueItemId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + // add `scores` to the URL query string + if (getScores() != null) { + for (int i = 0; i < getScores().size(); i++) { + if (getScores().get(i) != null) { + joiner.add(getScores().get(i).toUrlQueryString(String.format("%sscores%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `span_notes` to the URL query string + if (getSpanNotes() != null) { + joiner.add(String.format("%sspan_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSpanNotes())))); + } + + // add `span_notes_source_id` to the URL query string + if (getSpanNotesSourceId() != null) { + joiner.add(String.format("%sspan_notes_source_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSpanNotesSourceId())))); + } + + // add `queue_item_id` to the URL query string + if (getQueueItemId() != null) { + joiner.add(String.format("%squeue_item_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueueItemId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResponse.java new file mode 100644 index 0000000..6cf10c2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.BulkCreateScoresResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkCreateScoresResponse + */ +@JsonPropertyOrder({ + BulkCreateScoresResponse.JSON_PROPERTY_STATUS, + BulkCreateScoresResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkCreateScoresResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private BulkCreateScoresResult result; + + public BulkCreateScoresResponse() { + } + + public BulkCreateScoresResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public BulkCreateScoresResponse result(@javax.annotation.Nonnull BulkCreateScoresResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BulkCreateScoresResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull BulkCreateScoresResult result) { + this.result = result; + } + + + /** + * Return true if this BulkCreateScoresResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkCreateScoresResponse bulkCreateScoresResponse = (BulkCreateScoresResponse) o; + return Objects.equals(this.status, bulkCreateScoresResponse.status) && + Objects.equals(this.result, bulkCreateScoresResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkCreateScoresResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResult.java new file mode 100644 index 0000000..fd762c0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkCreateScoresResult.java @@ -0,0 +1,215 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Score; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkCreateScoresResult + */ +@JsonPropertyOrder({ + BulkCreateScoresResult.JSON_PROPERTY_SCORES, + BulkCreateScoresResult.JSON_PROPERTY_ERRORS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkCreateScoresResult { + public static final String JSON_PROPERTY_SCORES = "scores"; + @javax.annotation.Nonnull + private List scores = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERRORS = "errors"; + @javax.annotation.Nonnull + private List errors = new ArrayList<>(); + + public BulkCreateScoresResult() { + } + + public BulkCreateScoresResult scores(@javax.annotation.Nonnull List scores) { + this.scores = scores; + return this; + } + + public BulkCreateScoresResult addScoresItem(Score scoresItem) { + if (this.scores == null) { + this.scores = new ArrayList<>(); + } + this.scores.add(scoresItem); + return this; + } + + /** + * Get scores + * @return scores + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCORES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScores() { + return scores; + } + + + @JsonProperty(JSON_PROPERTY_SCORES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScores(@javax.annotation.Nonnull List scores) { + this.scores = scores; + } + + + public BulkCreateScoresResult errors(@javax.annotation.Nonnull List errors) { + this.errors = errors; + return this; + } + + public BulkCreateScoresResult addErrorsItem(String errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getErrors() { + return errors; + } + + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrors(@javax.annotation.Nonnull List errors) { + this.errors = errors; + } + + + /** + * Return true if this BulkCreateScoresResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkCreateScoresResult bulkCreateScoresResult = (BulkCreateScoresResult) o; + return Objects.equals(this.scores, bulkCreateScoresResult.scores) && + Objects.equals(this.errors, bulkCreateScoresResult.errors); + } + + @Override + public int hashCode() { + return Objects.hash(scores, errors); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkCreateScoresResult {\n"); + sb.append(" scores: ").append(toIndentedString(scores)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `scores` to the URL query string + if (getScores() != null) { + for (int i = 0; i < getScores().size(); i++) { + if (getScores().get(i) != null) { + joiner.add(getScores().get(i).toUrlQueryString(String.format("%sscores%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `errors` to the URL query string + if (getErrors() != null) { + for (int i = 0; i < getErrors().size(); i++) { + joiner.add(String.format("%serrors%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getErrors().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkRemoveItems.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkRemoveItems.java new file mode 100644 index 0000000..decc676 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/BulkRemoveItems.java @@ -0,0 +1,168 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * BulkRemoveItems + */ +@JsonPropertyOrder({ + BulkRemoveItems.JSON_PROPERTY_ITEM_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class BulkRemoveItems { + public static final String JSON_PROPERTY_ITEM_IDS = "item_ids"; + @javax.annotation.Nonnull + private List itemIds = new ArrayList<>(); + + public BulkRemoveItems() { + } + + public BulkRemoveItems itemIds(@javax.annotation.Nonnull List itemIds) { + this.itemIds = itemIds; + return this; + } + + public BulkRemoveItems addItemIdsItem(UUID itemIdsItem) { + if (this.itemIds == null) { + this.itemIds = new ArrayList<>(); + } + this.itemIds.add(itemIdsItem); + return this; + } + + /** + * Get itemIds + * @return itemIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEM_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItemIds() { + return itemIds; + } + + + @JsonProperty(JSON_PROPERTY_ITEM_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setItemIds(@javax.annotation.Nonnull List itemIds) { + this.itemIds = itemIds; + } + + + /** + * Return true if this BulkRemoveItems object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkRemoveItems bulkRemoveItems = (BulkRemoveItems) o; + return Objects.equals(this.itemIds, bulkRemoveItems.itemIds); + } + + @Override + public int hashCode() { + return Objects.hash(itemIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkRemoveItems {\n"); + sb.append(" itemIds: ").append(toIndentedString(itemIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `item_ids` to the URL query string + if (getItemIds() != null) { + for (int i = 0; i < getItemIds().size(); i++) { + if (getItemIds().get(i) != null) { + joiner.add(String.format("%sitem_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getItemIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CICDEvaluationItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CICDEvaluationItem.java new file mode 100644 index 0000000..3b2c63f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CICDEvaluationItem.java @@ -0,0 +1,307 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CICDEvaluationItem + */ +@JsonPropertyOrder({ + CICDEvaluationItem.JSON_PROPERTY_EVAL_TEMPLATE, + CICDEvaluationItem.JSON_PROPERTY_INPUTS, + CICDEvaluationItem.JSON_PROPERTY_MODEL_NAME, + CICDEvaluationItem.JSON_PROPERTY_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CICDEvaluationItem { + public static final String JSON_PROPERTY_EVAL_TEMPLATE = "eval_template"; + @javax.annotation.Nonnull + private String evalTemplate; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + @javax.annotation.Nonnull + private Map inputs = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private JsonNullable modelName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public CICDEvaluationItem() { + } + + public CICDEvaluationItem evalTemplate(@javax.annotation.Nonnull String evalTemplate) { + this.evalTemplate = evalTemplate; + return this; + } + + /** + * Get evalTemplate + * @return evalTemplate + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalTemplate() { + return evalTemplate; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalTemplate(@javax.annotation.Nonnull String evalTemplate) { + this.evalTemplate = evalTemplate; + } + + + public CICDEvaluationItem inputs(@javax.annotation.Nonnull Map inputs) { + this.inputs = inputs; + return this; + } + + public CICDEvaluationItem putInputsItem(String key, String inputsItem) { + if (this.inputs == null) { + this.inputs = new HashMap<>(); + } + this.inputs.put(key, inputsItem); + return this; + } + + /** + * Get inputs + * @return inputs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getInputs() { + return inputs; + } + + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setInputs(@javax.annotation.Nonnull Map inputs) { + this.inputs = inputs; + } + + + public CICDEvaluationItem modelName(@javax.annotation.Nullable String modelName) { + this.modelName = JsonNullable.of(modelName); + return this; + } + + /** + * Get modelName + * @return modelName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModelName() { + return modelName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModelName_JsonNullable() { + return modelName; + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + public void setModelName_JsonNullable(JsonNullable modelName) { + this.modelName = modelName; + } + + public void setModelName(@javax.annotation.Nullable String modelName) { + this.modelName = JsonNullable.of(modelName); + } + + + public CICDEvaluationItem config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public CICDEvaluationItem putConfigItem(String key, String configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + /** + * Return true if this CICDEvaluationItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CICDEvaluationItem ciCDEvaluationItem = (CICDEvaluationItem) o; + return Objects.equals(this.evalTemplate, ciCDEvaluationItem.evalTemplate) && + Objects.equals(this.inputs, ciCDEvaluationItem.inputs) && + equalsNullable(this.modelName, ciCDEvaluationItem.modelName) && + Objects.equals(this.config, ciCDEvaluationItem.config); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(evalTemplate, inputs, hashCodeNullable(modelName), config); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CICDEvaluationItem {\n"); + sb.append(" evalTemplate: ").append(toIndentedString(evalTemplate)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_template` to the URL query string + if (getEvalTemplate() != null) { + joiner.add(String.format("%seval_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplate())))); + } + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (String _key : getInputs().keySet()) { + joiner.add(String.format("%sinputs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputs().get(_key))))); + } + } + + // add `model_name` to the URL query string + if (getModelName() != null) { + joiner.add(String.format("%smodel_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CICDJob.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CICDJob.java new file mode 100644 index 0000000..c12ef8c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CICDJob.java @@ -0,0 +1,239 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CICDEvaluationItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CICDJob + */ +@JsonPropertyOrder({ + CICDJob.JSON_PROPERTY_PROJECT_NAME, + CICDJob.JSON_PROPERTY_VERSION, + CICDJob.JSON_PROPERTY_EVAL_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CICDJob { + public static final String JSON_PROPERTY_PROJECT_NAME = "project_name"; + @javax.annotation.Nonnull + private String projectName; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nonnull + private String version; + + public static final String JSON_PROPERTY_EVAL_DATA = "eval_data"; + @javax.annotation.Nonnull + private List evalData = new ArrayList<>(); + + public CICDJob() { + } + + public CICDJob projectName(@javax.annotation.Nonnull String projectName) { + this.projectName = projectName; + return this; + } + + /** + * Get projectName + * @return projectName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectName() { + return projectName; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectName(@javax.annotation.Nonnull String projectName) { + this.projectName = projectName; + } + + + public CICDJob version(@javax.annotation.Nonnull String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersion(@javax.annotation.Nonnull String version) { + this.version = version; + } + + + public CICDJob evalData(@javax.annotation.Nonnull List evalData) { + this.evalData = evalData; + return this; + } + + public CICDJob addEvalDataItem(CICDEvaluationItem evalDataItem) { + if (this.evalData == null) { + this.evalData = new ArrayList<>(); + } + this.evalData.add(evalDataItem); + return this; + } + + /** + * Get evalData + * @return evalData + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvalData() { + return evalData; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalData(@javax.annotation.Nonnull List evalData) { + this.evalData = evalData; + } + + + /** + * Return true if this CICDJob object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CICDJob ciCDJob = (CICDJob) o; + return Objects.equals(this.projectName, ciCDJob.projectName) && + Objects.equals(this.version, ciCDJob.version) && + Objects.equals(this.evalData, ciCDJob.evalData); + } + + @Override + public int hashCode() { + return Objects.hash(projectName, version, evalData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CICDJob {\n"); + sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" evalData: ").append(toIndentedString(evalData)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `project_name` to the URL query string + if (getProjectName() != null) { + joiner.add(String.format("%sproject_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectName())))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `eval_data` to the URL query string + if (getEvalData() != null) { + for (int i = 0; i < getEvalData().size(); i++) { + if (getEvalData().get(i) != null) { + joiner.add(getEvalData().get(i).toUrlQueryString(String.format("%seval_data%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchAnalysisResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchAnalysisResponse.java new file mode 100644 index 0000000..5d00be9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchAnalysisResponse.java @@ -0,0 +1,310 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallBranchAnalysisResponse + */ +@JsonPropertyOrder({ + CallBranchAnalysisResponse.JSON_PROPERTY_CALL_EXECUTION_ID, + CallBranchAnalysisResponse.JSON_PROPERTY_SCENARIO_ID, + CallBranchAnalysisResponse.JSON_PROPERTY_SCENARIO_NAME, + CallBranchAnalysisResponse.JSON_PROPERTY_ANALYSIS, + CallBranchAnalysisResponse.JSON_PROPERTY_ANALYZED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallBranchAnalysisResponse { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nullable + private UUID callExecutionId; + + public static final String JSON_PROPERTY_SCENARIO_ID = "scenario_id"; + private JsonNullable scenarioId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SCENARIO_NAME = "scenario_name"; + private JsonNullable scenarioName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANALYSIS = "analysis"; + @javax.annotation.Nullable + private Map analysis = new HashMap<>(); + + public static final String JSON_PROPERTY_ANALYZED_AT = "analyzed_at"; + @javax.annotation.Nullable + private OffsetDateTime analyzedAt; + + public CallBranchAnalysisResponse() { + } + + @JsonCreator + public CallBranchAnalysisResponse( + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) UUID callExecutionId, + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) UUID scenarioId, + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) String scenarioName, + @JsonProperty(JSON_PROPERTY_ANALYSIS) Map analysis, + @JsonProperty(JSON_PROPERTY_ANALYZED_AT) OffsetDateTime analyzedAt + ) { + this(); + this.callExecutionId = callExecutionId; + this.scenarioId = scenarioId == null ? JsonNullable.undefined() : JsonNullable.of(scenarioId); + this.scenarioName = scenarioName == null ? JsonNullable.undefined() : JsonNullable.of(scenarioName); + this.analysis = analysis; + this.analyzedAt = analyzedAt; + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + + + /** + * Get scenarioId + * @return scenarioId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getScenarioId() { + + if (scenarioId == null) { + scenarioId = JsonNullable.undefined(); + } + return scenarioId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScenarioId_JsonNullable() { + return scenarioId; + } + + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) + private void setScenarioId_JsonNullable(JsonNullable scenarioId) { + this.scenarioId = scenarioId; + } + + + + /** + * Get scenarioName + * @return scenarioName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getScenarioName() { + + if (scenarioName == null) { + scenarioName = JsonNullable.undefined(); + } + return scenarioName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScenarioName_JsonNullable() { + return scenarioName; + } + + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) + private void setScenarioName_JsonNullable(JsonNullable scenarioName) { + this.scenarioName = scenarioName; + } + + + + /** + * Get analysis + * @return analysis + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANALYSIS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAnalysis() { + return analysis; + } + + + + + /** + * Get analyzedAt + * @return analyzedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANALYZED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getAnalyzedAt() { + return analyzedAt; + } + + + + + /** + * Return true if this CallBranchAnalysisResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallBranchAnalysisResponse callBranchAnalysisResponse = (CallBranchAnalysisResponse) o; + return Objects.equals(this.callExecutionId, callBranchAnalysisResponse.callExecutionId) && + equalsNullable(this.scenarioId, callBranchAnalysisResponse.scenarioId) && + equalsNullable(this.scenarioName, callBranchAnalysisResponse.scenarioName) && + Objects.equals(this.analysis, callBranchAnalysisResponse.analysis) && + Objects.equals(this.analyzedAt, callBranchAnalysisResponse.analyzedAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, hashCodeNullable(scenarioId), hashCodeNullable(scenarioName), analysis, analyzedAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallBranchAnalysisResponse {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" scenarioId: ").append(toIndentedString(scenarioId)).append("\n"); + sb.append(" scenarioName: ").append(toIndentedString(scenarioName)).append("\n"); + sb.append(" analysis: ").append(toIndentedString(analysis)).append("\n"); + sb.append(" analyzedAt: ").append(toIndentedString(analyzedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `scenario_id` to the URL query string + if (getScenarioId() != null) { + joiner.add(String.format("%sscenario_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioId())))); + } + + // add `scenario_name` to the URL query string + if (getScenarioName() != null) { + joiner.add(String.format("%sscenario_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioName())))); + } + + // add `analysis` to the URL query string + if (getAnalysis() != null) { + for (String _key : getAnalysis().keySet()) { + joiner.add(String.format("%sanalysis%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAnalysis().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAnalysis().get(_key))))); + } + } + + // add `analyzed_at` to the URL query string + if (getAnalyzedAt() != null) { + joiner.add(String.format("%sanalyzed_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnalyzedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchDeviationCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchDeviationCreateResponse.java new file mode 100644 index 0000000..1c59cfc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallBranchDeviationCreateResponse.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallBranchDeviationCreateResponse + */ +@JsonPropertyOrder({ + CallBranchDeviationCreateResponse.JSON_PROPERTY_CALL_EXECUTION_ID, + CallBranchDeviationCreateResponse.JSON_PROPERTY_SCENARIO_GRAPH_ID, + CallBranchDeviationCreateResponse.JSON_PROPERTY_DEVIATION_DATA, + CallBranchDeviationCreateResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallBranchDeviationCreateResponse { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nullable + private UUID callExecutionId; + + public static final String JSON_PROPERTY_SCENARIO_GRAPH_ID = "scenario_graph_id"; + @javax.annotation.Nullable + private UUID scenarioGraphId; + + public static final String JSON_PROPERTY_DEVIATION_DATA = "deviation_data"; + @javax.annotation.Nullable + private Map deviationData = new HashMap<>(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public CallBranchDeviationCreateResponse() { + } + + @JsonCreator + public CallBranchDeviationCreateResponse( + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) UUID callExecutionId, + @JsonProperty(JSON_PROPERTY_SCENARIO_GRAPH_ID) UUID scenarioGraphId, + @JsonProperty(JSON_PROPERTY_DEVIATION_DATA) Map deviationData, + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.callExecutionId = callExecutionId; + this.scenarioGraphId = scenarioGraphId; + this.deviationData = deviationData; + this.message = message; + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + + + /** + * Get scenarioGraphId + * @return scenarioGraphId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_GRAPH_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getScenarioGraphId() { + return scenarioGraphId; + } + + + + + /** + * Get deviationData + * @return deviationData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEVIATION_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDeviationData() { + return deviationData; + } + + + + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Return true if this CallBranchDeviationCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallBranchDeviationCreateResponse callBranchDeviationCreateResponse = (CallBranchDeviationCreateResponse) o; + return Objects.equals(this.callExecutionId, callBranchDeviationCreateResponse.callExecutionId) && + Objects.equals(this.scenarioGraphId, callBranchDeviationCreateResponse.scenarioGraphId) && + Objects.equals(this.deviationData, callBranchDeviationCreateResponse.deviationData) && + Objects.equals(this.message, callBranchDeviationCreateResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, scenarioGraphId, deviationData, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallBranchDeviationCreateResponse {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" scenarioGraphId: ").append(toIndentedString(scenarioGraphId)).append("\n"); + sb.append(" deviationData: ").append(toIndentedString(deviationData)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `scenario_graph_id` to the URL query string + if (getScenarioGraphId() != null) { + joiner.add(String.format("%sscenario_graph_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioGraphId())))); + } + + // add `deviation_data` to the URL query string + if (getDeviationData() != null) { + for (String _key : getDeviationData().keySet()) { + joiner.add(String.format("%sdeviation_data%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDeviationData().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDeviationData().get(_key))))); + } + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecution.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecution.java new file mode 100644 index 0000000..6bf6a2b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecution.java @@ -0,0 +1,1947 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecution + */ +@JsonPropertyOrder({ + CallExecution.JSON_PROPERTY_ID, + CallExecution.JSON_PROPERTY_PHONE_NUMBER, + CallExecution.JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID, + CallExecution.JSON_PROPERTY_STATUS, + CallExecution.JSON_PROPERTY_STARTED_AT, + CallExecution.JSON_PROPERTY_COMPLETED_AT, + CallExecution.JSON_PROPERTY_DURATION_SECONDS, + CallExecution.JSON_PROPERTY_RECORDING_URL, + CallExecution.JSON_PROPERTY_COST_CENTS, + CallExecution.JSON_PROPERTY_CALL_METADATA, + CallExecution.JSON_PROPERTY_ERROR_MESSAGE, + CallExecution.JSON_PROPERTY_SCENARIO_NAME, + CallExecution.JSON_PROPERTY_TRANSCRIPTS, + CallExecution.JSON_PROPERTY_CREATED_AT, + CallExecution.JSON_PROPERTY_UPDATED_AT, + CallExecution.JSON_PROPERTY_PROVIDER_CALL_DATA, + CallExecution.JSON_PROPERTY_STEREO_RECORDING_URL, + CallExecution.JSON_PROPERTY_ENDED_REASON, + CallExecution.JSON_PROPERTY_STT_COST_CENTS, + CallExecution.JSON_PROPERTY_LLM_COST_CENTS, + CallExecution.JSON_PROPERTY_TTS_COST_CENTS, + CallExecution.JSON_PROPERTY_OVERALL_SCORE, + CallExecution.JSON_PROPERTY_RESPONSE_TIME_MS, + CallExecution.JSON_PROPERTY_RESPONSE_TIME_SECONDS, + CallExecution.JSON_PROPERTY_ASSISTANT_ID, + CallExecution.JSON_PROPERTY_CUSTOMER_NUMBER, + CallExecution.JSON_PROPERTY_CALL_TYPE, + CallExecution.JSON_PROPERTY_ENDED_AT, + CallExecution.JSON_PROPERTY_ANALYSIS_DATA, + CallExecution.JSON_PROPERTY_EVALUATION_DATA, + CallExecution.JSON_PROPERTY_MESSAGE_COUNT, + CallExecution.JSON_PROPERTY_TRANSCRIPT_AVAILABLE, + CallExecution.JSON_PROPERTY_RECORDING_AVAILABLE, + CallExecution.JSON_PROPERTY_EVAL_OUTPUTS, + CallExecution.JSON_PROPERTY_ERROR_LOCALIZER_TASKS, + CallExecution.JSON_PROPERTY_CALL_SUMMARY, + CallExecution.JSON_PROPERTY_AGENT_VERSION, + CallExecution.JSON_PROPERTY_CUSTOMER_COST_CENTS, + CallExecution.JSON_PROPERTY_SYSTEM_METRICS, + CallExecution.JSON_PROPERTY_COST_BREAKDOWN, + CallExecution.JSON_PROPERTY_CUSTOMER_CALL_ID, + CallExecution.JSON_PROPERTY_SIMULATION_CALL_TYPE, + CallExecution.JSON_PROPERTY_PROCESSING_SKIPPED, + CallExecution.JSON_PROPERTY_PROCESSING_SKIP_REASON +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecution { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phone_number"; + private JsonNullable phoneNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID = "service_provider_call_id"; + @javax.annotation.Nullable + private String serviceProviderCallId; + + /** + * Current status of the call + */ + public enum StatusEnum { + PENDING(String.valueOf("pending")), + + QUEUED(String.valueOf("queued")), + + ONGOING(String.valueOf("ongoing")), + + COMPLETED(String.valueOf("completed")), + + FAILED(String.valueOf("failed")), + + ANALYZING(String.valueOf("analyzing")), + + CANCELLED(String.valueOf("cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private JsonNullable startedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION_SECONDS = "duration_seconds"; + private JsonNullable durationSeconds = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RECORDING_URL = "recording_url"; + private JsonNullable recordingUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COST_CENTS = "cost_cents"; + private JsonNullable costCents = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CALL_METADATA = "call_metadata"; + @javax.annotation.Nullable + private Map callMetadata = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private JsonNullable errorMessage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SCENARIO_NAME = "scenario_name"; + @javax.annotation.Nullable + private String scenarioName; + + public static final String JSON_PROPERTY_TRANSCRIPTS = "transcripts"; + @javax.annotation.Nullable + private String transcripts; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_PROVIDER_CALL_DATA = "provider_call_data"; + @javax.annotation.Nullable + private Map providerCallData = new HashMap<>(); + + public static final String JSON_PROPERTY_STEREO_RECORDING_URL = "stereo_recording_url"; + private JsonNullable stereoRecordingUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENDED_REASON = "ended_reason"; + private JsonNullable endedReason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STT_COST_CENTS = "stt_cost_cents"; + private JsonNullable sttCostCents = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LLM_COST_CENTS = "llm_cost_cents"; + private JsonNullable llmCostCents = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TTS_COST_CENTS = "tts_cost_cents"; + private JsonNullable ttsCostCents = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OVERALL_SCORE = "overall_score"; + private JsonNullable overallScore = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESPONSE_TIME_MS = "response_time_ms"; + private JsonNullable responseTimeMs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESPONSE_TIME_SECONDS = "response_time_seconds"; + @javax.annotation.Nullable + private String responseTimeSeconds; + + public static final String JSON_PROPERTY_ASSISTANT_ID = "assistant_id"; + private JsonNullable assistantId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CUSTOMER_NUMBER = "customer_number"; + private JsonNullable customerNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CALL_TYPE = "call_type"; + private JsonNullable callType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENDED_AT = "ended_at"; + private JsonNullable endedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANALYSIS_DATA = "analysis_data"; + @javax.annotation.Nullable + private Map analysisData = new HashMap<>(); + + public static final String JSON_PROPERTY_EVALUATION_DATA = "evaluation_data"; + @javax.annotation.Nullable + private Map evaluationData = new HashMap<>(); + + public static final String JSON_PROPERTY_MESSAGE_COUNT = "message_count"; + private JsonNullable messageCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRANSCRIPT_AVAILABLE = "transcript_available"; + @javax.annotation.Nullable + private Boolean transcriptAvailable; + + public static final String JSON_PROPERTY_RECORDING_AVAILABLE = "recording_available"; + @javax.annotation.Nullable + private Boolean recordingAvailable; + + public static final String JSON_PROPERTY_EVAL_OUTPUTS = "eval_outputs"; + @javax.annotation.Nullable + private Map evalOutputs = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER_TASKS = "error_localizer_tasks"; + @javax.annotation.Nullable + private String errorLocalizerTasks; + + public static final String JSON_PROPERTY_CALL_SUMMARY = "call_summary"; + private JsonNullable callSummary = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + private JsonNullable agentVersion = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CUSTOMER_COST_CENTS = "customer_cost_cents"; + private JsonNullable customerCostCents = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SYSTEM_METRICS = "system_metrics"; + @javax.annotation.Nullable + private String systemMetrics; + + public static final String JSON_PROPERTY_COST_BREAKDOWN = "cost_breakdown"; + @javax.annotation.Nullable + private String costBreakdown; + + public static final String JSON_PROPERTY_CUSTOMER_CALL_ID = "customer_call_id"; + private JsonNullable customerCallId = JsonNullable.undefined(); + + /** + * Type of simulation call + */ + public enum SimulationCallTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + SimulationCallTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SimulationCallTypeEnum fromValue(String value) { + for (SimulationCallTypeEnum b : SimulationCallTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIMULATION_CALL_TYPE = "simulation_call_type"; + @javax.annotation.Nullable + private SimulationCallTypeEnum simulationCallType; + + public static final String JSON_PROPERTY_PROCESSING_SKIPPED = "processing_skipped"; + @javax.annotation.Nullable + private String processingSkipped; + + public static final String JSON_PROPERTY_PROCESSING_SKIP_REASON = "processing_skip_reason"; + @javax.annotation.Nullable + private String processingSkipReason; + + public CallExecution() { + } + + @JsonCreator + public CallExecution( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID) String serviceProviderCallId, + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) String scenarioName, + @JsonProperty(JSON_PROPERTY_TRANSCRIPTS) String transcripts, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME_SECONDS) String responseTimeSeconds, + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_TASKS) String errorLocalizerTasks, + @JsonProperty(JSON_PROPERTY_SYSTEM_METRICS) String systemMetrics, + @JsonProperty(JSON_PROPERTY_COST_BREAKDOWN) String costBreakdown, + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIPPED) String processingSkipped, + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIP_REASON) String processingSkipReason + ) { + this(); + this.id = id; + this.serviceProviderCallId = serviceProviderCallId; + this.scenarioName = scenarioName; + this.transcripts = transcripts; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.responseTimeSeconds = responseTimeSeconds; + this.errorLocalizerTasks = errorLocalizerTasks; + this.systemMetrics = systemMetrics; + this.costBreakdown = costBreakdown; + this.processingSkipped = processingSkipped; + this.processingSkipReason = processingSkipReason; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public CallExecution phoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = JsonNullable.of(phoneNumber); + return this; + } + + /** + * Phone number called (null for TEXT/chat simulations) + * @return phoneNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPhoneNumber() { + return phoneNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPhoneNumber_JsonNullable() { + return phoneNumber; + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + public void setPhoneNumber_JsonNullable(JsonNullable phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public void setPhoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = JsonNullable.of(phoneNumber); + } + + + /** + * Get serviceProviderCallId + * @return serviceProviderCallId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceProviderCallId() { + return serviceProviderCallId; + } + + + + + public CallExecution status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current status of the call + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public CallExecution startedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + return this; + } + + /** + * When the call started + * @return startedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getStartedAt() { + return startedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedAt_JsonNullable() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + public void setStartedAt_JsonNullable(JsonNullable startedAt) { + this.startedAt = startedAt; + } + + public void setStartedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + } + + + public CallExecution completedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * When the call completed + * @return completedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + + public CallExecution durationSeconds(@javax.annotation.Nullable Integer durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + return this; + } + + /** + * Duration of the call in seconds + * minimum: -2147483648 + * maximum: 2147483647 + * @return durationSeconds + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getDurationSeconds() { + return durationSeconds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDurationSeconds_JsonNullable() { + return durationSeconds; + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + public void setDurationSeconds_JsonNullable(JsonNullable durationSeconds) { + this.durationSeconds = durationSeconds; + } + + public void setDurationSeconds(@javax.annotation.Nullable Integer durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + } + + + public CallExecution recordingUrl(@javax.annotation.Nullable URI recordingUrl) { + this.recordingUrl = JsonNullable.of(recordingUrl); + return this; + } + + /** + * URL to the call recording + * @return recordingUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getRecordingUrl() { + return recordingUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RECORDING_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRecordingUrl_JsonNullable() { + return recordingUrl; + } + + @JsonProperty(JSON_PROPERTY_RECORDING_URL) + public void setRecordingUrl_JsonNullable(JsonNullable recordingUrl) { + this.recordingUrl = recordingUrl; + } + + public void setRecordingUrl(@javax.annotation.Nullable URI recordingUrl) { + this.recordingUrl = JsonNullable.of(recordingUrl); + } + + + public CallExecution costCents(@javax.annotation.Nullable Integer costCents) { + this.costCents = JsonNullable.of(costCents); + return this; + } + + /** + * Cost of the call in cents + * minimum: -2147483648 + * maximum: 2147483647 + * @return costCents + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getCostCents() { + return costCents.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COST_CENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCostCents_JsonNullable() { + return costCents; + } + + @JsonProperty(JSON_PROPERTY_COST_CENTS) + public void setCostCents_JsonNullable(JsonNullable costCents) { + this.costCents = costCents; + } + + public void setCostCents(@javax.annotation.Nullable Integer costCents) { + this.costCents = JsonNullable.of(costCents); + } + + + public CallExecution callMetadata(@javax.annotation.Nullable Map callMetadata) { + this.callMetadata = callMetadata; + return this; + } + + public CallExecution putCallMetadataItem(String key, Object callMetadataItem) { + if (this.callMetadata == null) { + this.callMetadata = new HashMap<>(); + } + this.callMetadata.put(key, callMetadataItem); + return this; + } + + /** + * Additional metadata about the call + * @return callMetadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCallMetadata() { + return callMetadata; + } + + + @JsonProperty(JSON_PROPERTY_CALL_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCallMetadata(@javax.annotation.Nullable Map callMetadata) { + this.callMetadata = callMetadata; + } + + + public CallExecution errorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = JsonNullable.of(errorMessage); + return this; + } + + /** + * Error message if the call failed + * @return errorMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getErrorMessage() { + return errorMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getErrorMessage_JsonNullable() { + return errorMessage; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + public void setErrorMessage_JsonNullable(JsonNullable errorMessage) { + this.errorMessage = errorMessage; + } + + public void setErrorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = JsonNullable.of(errorMessage); + } + + + /** + * Get scenarioName + * @return scenarioName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenarioName() { + return scenarioName; + } + + + + + /** + * Get transcripts + * @return transcripts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSCRIPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTranscripts() { + return transcripts; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + public CallExecution providerCallData(@javax.annotation.Nullable Map providerCallData) { + this.providerCallData = providerCallData; + return this; + } + + public CallExecution putProviderCallDataItem(String key, Object providerCallDataItem) { + if (this.providerCallData == null) { + this.providerCallData = new HashMap<>(); + } + this.providerCallData.put(key, providerCallDataItem); + return this; + } + + /** + * Complete call data from the provider. Format: dict[provider_name, data] where provider_name must be from SupportedProviders + * @return providerCallData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_CALL_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getProviderCallData() { + return providerCallData; + } + + + @JsonProperty(JSON_PROPERTY_PROVIDER_CALL_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setProviderCallData(@javax.annotation.Nullable Map providerCallData) { + this.providerCallData = providerCallData; + } + + + public CallExecution stereoRecordingUrl(@javax.annotation.Nullable URI stereoRecordingUrl) { + this.stereoRecordingUrl = JsonNullable.of(stereoRecordingUrl); + return this; + } + + /** + * Stereo recording URL from Vapi + * @return stereoRecordingUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getStereoRecordingUrl() { + return stereoRecordingUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEREO_RECORDING_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStereoRecordingUrl_JsonNullable() { + return stereoRecordingUrl; + } + + @JsonProperty(JSON_PROPERTY_STEREO_RECORDING_URL) + public void setStereoRecordingUrl_JsonNullable(JsonNullable stereoRecordingUrl) { + this.stereoRecordingUrl = stereoRecordingUrl; + } + + public void setStereoRecordingUrl(@javax.annotation.Nullable URI stereoRecordingUrl) { + this.stereoRecordingUrl = JsonNullable.of(stereoRecordingUrl); + } + + + public CallExecution endedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + return this; + } + + /** + * Reason why the call ended + * @return endedReason + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEndedReason() { + return endedReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEndedReason_JsonNullable() { + return endedReason; + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + public void setEndedReason_JsonNullable(JsonNullable endedReason) { + this.endedReason = endedReason; + } + + public void setEndedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + } + + + public CallExecution sttCostCents(@javax.annotation.Nullable Integer sttCostCents) { + this.sttCostCents = JsonNullable.of(sttCostCents); + return this; + } + + /** + * STT cost in cents + * minimum: -2147483648 + * maximum: 2147483647 + * @return sttCostCents + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getSttCostCents() { + return sttCostCents.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STT_COST_CENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSttCostCents_JsonNullable() { + return sttCostCents; + } + + @JsonProperty(JSON_PROPERTY_STT_COST_CENTS) + public void setSttCostCents_JsonNullable(JsonNullable sttCostCents) { + this.sttCostCents = sttCostCents; + } + + public void setSttCostCents(@javax.annotation.Nullable Integer sttCostCents) { + this.sttCostCents = JsonNullable.of(sttCostCents); + } + + + public CallExecution llmCostCents(@javax.annotation.Nullable Integer llmCostCents) { + this.llmCostCents = JsonNullable.of(llmCostCents); + return this; + } + + /** + * LLM cost in cents + * minimum: -2147483648 + * maximum: 2147483647 + * @return llmCostCents + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getLlmCostCents() { + return llmCostCents.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LLM_COST_CENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLlmCostCents_JsonNullable() { + return llmCostCents; + } + + @JsonProperty(JSON_PROPERTY_LLM_COST_CENTS) + public void setLlmCostCents_JsonNullable(JsonNullable llmCostCents) { + this.llmCostCents = llmCostCents; + } + + public void setLlmCostCents(@javax.annotation.Nullable Integer llmCostCents) { + this.llmCostCents = JsonNullable.of(llmCostCents); + } + + + public CallExecution ttsCostCents(@javax.annotation.Nullable Integer ttsCostCents) { + this.ttsCostCents = JsonNullable.of(ttsCostCents); + return this; + } + + /** + * TTS cost in cents + * minimum: -2147483648 + * maximum: 2147483647 + * @return ttsCostCents + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getTtsCostCents() { + return ttsCostCents.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TTS_COST_CENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTtsCostCents_JsonNullable() { + return ttsCostCents; + } + + @JsonProperty(JSON_PROPERTY_TTS_COST_CENTS) + public void setTtsCostCents_JsonNullable(JsonNullable ttsCostCents) { + this.ttsCostCents = ttsCostCents; + } + + public void setTtsCostCents(@javax.annotation.Nullable Integer ttsCostCents) { + this.ttsCostCents = JsonNullable.of(ttsCostCents); + } + + + public CallExecution overallScore(@javax.annotation.Nullable BigDecimal overallScore) { + this.overallScore = JsonNullable.of(overallScore); + return this; + } + + /** + * Overall call performance score + * @return overallScore + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getOverallScore() { + return overallScore.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OVERALL_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOverallScore_JsonNullable() { + return overallScore; + } + + @JsonProperty(JSON_PROPERTY_OVERALL_SCORE) + public void setOverallScore_JsonNullable(JsonNullable overallScore) { + this.overallScore = overallScore; + } + + public void setOverallScore(@javax.annotation.Nullable BigDecimal overallScore) { + this.overallScore = JsonNullable.of(overallScore); + } + + + public CallExecution responseTimeMs(@javax.annotation.Nullable Integer responseTimeMs) { + this.responseTimeMs = JsonNullable.of(responseTimeMs); + return this; + } + + /** + * Average response time in milliseconds + * minimum: -2147483648 + * maximum: 2147483647 + * @return responseTimeMs + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getResponseTimeMs() { + return responseTimeMs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResponseTimeMs_JsonNullable() { + return responseTimeMs; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME_MS) + public void setResponseTimeMs_JsonNullable(JsonNullable responseTimeMs) { + this.responseTimeMs = responseTimeMs; + } + + public void setResponseTimeMs(@javax.annotation.Nullable Integer responseTimeMs) { + this.responseTimeMs = JsonNullable.of(responseTimeMs); + } + + + /** + * Get responseTimeSeconds + * @return responseTimeSeconds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResponseTimeSeconds() { + return responseTimeSeconds; + } + + + + + public CallExecution assistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + return this; + } + + /** + * Assistant ID used for the call (system side) + * @return assistantId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAssistantId() { + return assistantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssistantId_JsonNullable() { + return assistantId; + } + + @JsonProperty(JSON_PROPERTY_ASSISTANT_ID) + public void setAssistantId_JsonNullable(JsonNullable assistantId) { + this.assistantId = assistantId; + } + + public void setAssistantId(@javax.annotation.Nullable String assistantId) { + this.assistantId = JsonNullable.of(assistantId); + } + + + public CallExecution customerNumber(@javax.annotation.Nullable String customerNumber) { + this.customerNumber = JsonNullable.of(customerNumber); + return this; + } + + /** + * Customer phone number (E.164 format) + * @return customerNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCustomerNumber() { + return customerNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomerNumber_JsonNullable() { + return customerNumber; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_NUMBER) + public void setCustomerNumber_JsonNullable(JsonNullable customerNumber) { + this.customerNumber = customerNumber; + } + + public void setCustomerNumber(@javax.annotation.Nullable String customerNumber) { + this.customerNumber = JsonNullable.of(customerNumber); + } + + + public CallExecution callType(@javax.annotation.Nullable String callType) { + this.callType = JsonNullable.of(callType); + return this; + } + + /** + * Type of call (e.g., outboundPhoneCall) + * @return callType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCallType() { + return callType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CALL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCallType_JsonNullable() { + return callType; + } + + @JsonProperty(JSON_PROPERTY_CALL_TYPE) + public void setCallType_JsonNullable(JsonNullable callType) { + this.callType = callType; + } + + public void setCallType(@javax.annotation.Nullable String callType) { + this.callType = JsonNullable.of(callType); + } + + + public CallExecution endedAt(@javax.annotation.Nullable OffsetDateTime endedAt) { + this.endedAt = JsonNullable.of(endedAt); + return this; + } + + /** + * When the call ended + * @return endedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getEndedAt() { + return endedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENDED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEndedAt_JsonNullable() { + return endedAt; + } + + @JsonProperty(JSON_PROPERTY_ENDED_AT) + public void setEndedAt_JsonNullable(JsonNullable endedAt) { + this.endedAt = endedAt; + } + + public void setEndedAt(@javax.annotation.Nullable OffsetDateTime endedAt) { + this.endedAt = JsonNullable.of(endedAt); + } + + + public CallExecution analysisData(@javax.annotation.Nullable Map analysisData) { + this.analysisData = analysisData; + return this; + } + + public CallExecution putAnalysisDataItem(String key, Object analysisDataItem) { + if (this.analysisData == null) { + this.analysisData = new HashMap<>(); + } + this.analysisData.put(key, analysisDataItem); + return this; + } + + /** + * Call analysis data from the service provider + * @return analysisData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANALYSIS_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAnalysisData() { + return analysisData; + } + + + @JsonProperty(JSON_PROPERTY_ANALYSIS_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setAnalysisData(@javax.annotation.Nullable Map analysisData) { + this.analysisData = analysisData; + } + + + public CallExecution evaluationData(@javax.annotation.Nullable Map evaluationData) { + this.evaluationData = evaluationData; + return this; + } + + public CallExecution putEvaluationDataItem(String key, Object evaluationDataItem) { + if (this.evaluationData == null) { + this.evaluationData = new HashMap<>(); + } + this.evaluationData.put(key, evaluationDataItem); + return this; + } + + /** + * Call evaluation data from the service provider + * @return evaluationData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvaluationData() { + return evaluationData; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationData(@javax.annotation.Nullable Map evaluationData) { + this.evaluationData = evaluationData; + } + + + public CallExecution messageCount(@javax.annotation.Nullable Integer messageCount) { + this.messageCount = JsonNullable.of(messageCount); + return this; + } + + /** + * Number of messages in the call + * minimum: -2147483648 + * maximum: 2147483647 + * @return messageCount + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getMessageCount() { + return messageCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessageCount_JsonNullable() { + return messageCount; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE_COUNT) + public void setMessageCount_JsonNullable(JsonNullable messageCount) { + this.messageCount = messageCount; + } + + public void setMessageCount(@javax.annotation.Nullable Integer messageCount) { + this.messageCount = JsonNullable.of(messageCount); + } + + + public CallExecution transcriptAvailable(@javax.annotation.Nullable Boolean transcriptAvailable) { + this.transcriptAvailable = transcriptAvailable; + return this; + } + + /** + * Whether transcript is available + * @return transcriptAvailable + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSCRIPT_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTranscriptAvailable() { + return transcriptAvailable; + } + + + @JsonProperty(JSON_PROPERTY_TRANSCRIPT_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTranscriptAvailable(@javax.annotation.Nullable Boolean transcriptAvailable) { + this.transcriptAvailable = transcriptAvailable; + } + + + public CallExecution recordingAvailable(@javax.annotation.Nullable Boolean recordingAvailable) { + this.recordingAvailable = recordingAvailable; + return this; + } + + /** + * Whether recording is available + * @return recordingAvailable + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECORDING_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRecordingAvailable() { + return recordingAvailable; + } + + + @JsonProperty(JSON_PROPERTY_RECORDING_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecordingAvailable(@javax.annotation.Nullable Boolean recordingAvailable) { + this.recordingAvailable = recordingAvailable; + } + + + public CallExecution evalOutputs(@javax.annotation.Nullable Map evalOutputs) { + this.evalOutputs = evalOutputs; + return this; + } + + public CallExecution putEvalOutputsItem(String key, Object evalOutputsItem) { + if (this.evalOutputs == null) { + this.evalOutputs = new HashMap<>(); + } + this.evalOutputs.put(key, evalOutputsItem); + return this; + } + + /** + * Evaluation output + * @return evalOutputs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvalOutputs() { + return evalOutputs; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalOutputs(@javax.annotation.Nullable Map evalOutputs) { + this.evalOutputs = evalOutputs; + } + + + /** + * Get errorLocalizerTasks + * @return errorLocalizerTasks + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_TASKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorLocalizerTasks() { + return errorLocalizerTasks; + } + + + + + public CallExecution callSummary(@javax.annotation.Nullable String callSummary) { + this.callSummary = JsonNullable.of(callSummary); + return this; + } + + /** + * Call summary from the service + * @return callSummary + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCallSummary() { + return callSummary.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CALL_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCallSummary_JsonNullable() { + return callSummary; + } + + @JsonProperty(JSON_PROPERTY_CALL_SUMMARY) + public void setCallSummary_JsonNullable(JsonNullable callSummary) { + this.callSummary = callSummary; + } + + public void setCallSummary(@javax.annotation.Nullable String callSummary) { + this.callSummary = JsonNullable.of(callSummary); + } + + + public CallExecution agentVersion(@javax.annotation.Nullable UUID agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + return this; + } + + /** + * Get agentVersion + * @return agentVersion + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAgentVersion() { + return agentVersion.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentVersion_JsonNullable() { + return agentVersion; + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + public void setAgentVersion_JsonNullable(JsonNullable agentVersion) { + this.agentVersion = agentVersion; + } + + public void setAgentVersion(@javax.annotation.Nullable UUID agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + } + + + public CallExecution customerCostCents(@javax.annotation.Nullable Integer customerCostCents) { + this.customerCostCents = JsonNullable.of(customerCostCents); + return this; + } + + /** + * Total customer-reported cost in cents + * minimum: -2147483648 + * maximum: 2147483647 + * @return customerCostCents + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getCustomerCostCents() { + return customerCostCents.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_COST_CENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomerCostCents_JsonNullable() { + return customerCostCents; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_COST_CENTS) + public void setCustomerCostCents_JsonNullable(JsonNullable customerCostCents) { + this.customerCostCents = customerCostCents; + } + + public void setCustomerCostCents(@javax.annotation.Nullable Integer customerCostCents) { + this.customerCostCents = JsonNullable.of(customerCostCents); + } + + + /** + * Get systemMetrics + * @return systemMetrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYSTEM_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSystemMetrics() { + return systemMetrics; + } + + + + + /** + * Get costBreakdown + * @return costBreakdown + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COST_BREAKDOWN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCostBreakdown() { + return costBreakdown; + } + + + + + public CallExecution customerCallId(@javax.annotation.Nullable String customerCallId) { + this.customerCallId = JsonNullable.of(customerCallId); + return this; + } + + /** + * Customer call ID if available + * @return customerCallId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCustomerCallId() { + return customerCallId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_CALL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomerCallId_JsonNullable() { + return customerCallId; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_CALL_ID) + public void setCustomerCallId_JsonNullable(JsonNullable customerCallId) { + this.customerCallId = customerCallId; + } + + public void setCustomerCallId(@javax.annotation.Nullable String customerCallId) { + this.customerCallId = JsonNullable.of(customerCallId); + } + + + public CallExecution simulationCallType(@javax.annotation.Nullable SimulationCallTypeEnum simulationCallType) { + this.simulationCallType = simulationCallType; + return this; + } + + /** + * Type of simulation call + * @return simulationCallType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATION_CALL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SimulationCallTypeEnum getSimulationCallType() { + return simulationCallType; + } + + + @JsonProperty(JSON_PROPERTY_SIMULATION_CALL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSimulationCallType(@javax.annotation.Nullable SimulationCallTypeEnum simulationCallType) { + this.simulationCallType = simulationCallType; + } + + + /** + * Get processingSkipped + * @return processingSkipped + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIPPED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProcessingSkipped() { + return processingSkipped; + } + + + + + /** + * Get processingSkipReason + * @return processingSkipReason + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIP_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProcessingSkipReason() { + return processingSkipReason; + } + + + + + /** + * Return true if this CallExecution object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecution callExecution = (CallExecution) o; + return Objects.equals(this.id, callExecution.id) && + equalsNullable(this.phoneNumber, callExecution.phoneNumber) && + Objects.equals(this.serviceProviderCallId, callExecution.serviceProviderCallId) && + Objects.equals(this.status, callExecution.status) && + equalsNullable(this.startedAt, callExecution.startedAt) && + equalsNullable(this.completedAt, callExecution.completedAt) && + equalsNullable(this.durationSeconds, callExecution.durationSeconds) && + equalsNullable(this.recordingUrl, callExecution.recordingUrl) && + equalsNullable(this.costCents, callExecution.costCents) && + Objects.equals(this.callMetadata, callExecution.callMetadata) && + equalsNullable(this.errorMessage, callExecution.errorMessage) && + Objects.equals(this.scenarioName, callExecution.scenarioName) && + Objects.equals(this.transcripts, callExecution.transcripts) && + Objects.equals(this.createdAt, callExecution.createdAt) && + Objects.equals(this.updatedAt, callExecution.updatedAt) && + Objects.equals(this.providerCallData, callExecution.providerCallData) && + equalsNullable(this.stereoRecordingUrl, callExecution.stereoRecordingUrl) && + equalsNullable(this.endedReason, callExecution.endedReason) && + equalsNullable(this.sttCostCents, callExecution.sttCostCents) && + equalsNullable(this.llmCostCents, callExecution.llmCostCents) && + equalsNullable(this.ttsCostCents, callExecution.ttsCostCents) && + equalsNullable(this.overallScore, callExecution.overallScore) && + equalsNullable(this.responseTimeMs, callExecution.responseTimeMs) && + Objects.equals(this.responseTimeSeconds, callExecution.responseTimeSeconds) && + equalsNullable(this.assistantId, callExecution.assistantId) && + equalsNullable(this.customerNumber, callExecution.customerNumber) && + equalsNullable(this.callType, callExecution.callType) && + equalsNullable(this.endedAt, callExecution.endedAt) && + Objects.equals(this.analysisData, callExecution.analysisData) && + Objects.equals(this.evaluationData, callExecution.evaluationData) && + equalsNullable(this.messageCount, callExecution.messageCount) && + Objects.equals(this.transcriptAvailable, callExecution.transcriptAvailable) && + Objects.equals(this.recordingAvailable, callExecution.recordingAvailable) && + Objects.equals(this.evalOutputs, callExecution.evalOutputs) && + Objects.equals(this.errorLocalizerTasks, callExecution.errorLocalizerTasks) && + equalsNullable(this.callSummary, callExecution.callSummary) && + equalsNullable(this.agentVersion, callExecution.agentVersion) && + equalsNullable(this.customerCostCents, callExecution.customerCostCents) && + Objects.equals(this.systemMetrics, callExecution.systemMetrics) && + Objects.equals(this.costBreakdown, callExecution.costBreakdown) && + equalsNullable(this.customerCallId, callExecution.customerCallId) && + Objects.equals(this.simulationCallType, callExecution.simulationCallType) && + Objects.equals(this.processingSkipped, callExecution.processingSkipped) && + Objects.equals(this.processingSkipReason, callExecution.processingSkipReason); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(phoneNumber), serviceProviderCallId, status, hashCodeNullable(startedAt), hashCodeNullable(completedAt), hashCodeNullable(durationSeconds), hashCodeNullable(recordingUrl), hashCodeNullable(costCents), callMetadata, hashCodeNullable(errorMessage), scenarioName, transcripts, createdAt, updatedAt, providerCallData, hashCodeNullable(stereoRecordingUrl), hashCodeNullable(endedReason), hashCodeNullable(sttCostCents), hashCodeNullable(llmCostCents), hashCodeNullable(ttsCostCents), hashCodeNullable(overallScore), hashCodeNullable(responseTimeMs), responseTimeSeconds, hashCodeNullable(assistantId), hashCodeNullable(customerNumber), hashCodeNullable(callType), hashCodeNullable(endedAt), analysisData, evaluationData, hashCodeNullable(messageCount), transcriptAvailable, recordingAvailable, evalOutputs, errorLocalizerTasks, hashCodeNullable(callSummary), hashCodeNullable(agentVersion), hashCodeNullable(customerCostCents), systemMetrics, costBreakdown, hashCodeNullable(customerCallId), simulationCallType, processingSkipped, processingSkipReason); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecution {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" serviceProviderCallId: ").append(toIndentedString(serviceProviderCallId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" durationSeconds: ").append(toIndentedString(durationSeconds)).append("\n"); + sb.append(" recordingUrl: ").append(toIndentedString(recordingUrl)).append("\n"); + sb.append(" costCents: ").append(toIndentedString(costCents)).append("\n"); + sb.append(" callMetadata: ").append(toIndentedString(callMetadata)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" scenarioName: ").append(toIndentedString(scenarioName)).append("\n"); + sb.append(" transcripts: ").append(toIndentedString(transcripts)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" providerCallData: ").append(toIndentedString(providerCallData)).append("\n"); + sb.append(" stereoRecordingUrl: ").append(toIndentedString(stereoRecordingUrl)).append("\n"); + sb.append(" endedReason: ").append(toIndentedString(endedReason)).append("\n"); + sb.append(" sttCostCents: ").append(toIndentedString(sttCostCents)).append("\n"); + sb.append(" llmCostCents: ").append(toIndentedString(llmCostCents)).append("\n"); + sb.append(" ttsCostCents: ").append(toIndentedString(ttsCostCents)).append("\n"); + sb.append(" overallScore: ").append(toIndentedString(overallScore)).append("\n"); + sb.append(" responseTimeMs: ").append(toIndentedString(responseTimeMs)).append("\n"); + sb.append(" responseTimeSeconds: ").append(toIndentedString(responseTimeSeconds)).append("\n"); + sb.append(" assistantId: ").append(toIndentedString(assistantId)).append("\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append(" callType: ").append(toIndentedString(callType)).append("\n"); + sb.append(" endedAt: ").append(toIndentedString(endedAt)).append("\n"); + sb.append(" analysisData: ").append(toIndentedString(analysisData)).append("\n"); + sb.append(" evaluationData: ").append(toIndentedString(evaluationData)).append("\n"); + sb.append(" messageCount: ").append(toIndentedString(messageCount)).append("\n"); + sb.append(" transcriptAvailable: ").append(toIndentedString(transcriptAvailable)).append("\n"); + sb.append(" recordingAvailable: ").append(toIndentedString(recordingAvailable)).append("\n"); + sb.append(" evalOutputs: ").append(toIndentedString(evalOutputs)).append("\n"); + sb.append(" errorLocalizerTasks: ").append(toIndentedString(errorLocalizerTasks)).append("\n"); + sb.append(" callSummary: ").append(toIndentedString(callSummary)).append("\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" customerCostCents: ").append(toIndentedString(customerCostCents)).append("\n"); + sb.append(" systemMetrics: ").append(toIndentedString(systemMetrics)).append("\n"); + sb.append(" costBreakdown: ").append(toIndentedString(costBreakdown)).append("\n"); + sb.append(" customerCallId: ").append(toIndentedString(customerCallId)).append("\n"); + sb.append(" simulationCallType: ").append(toIndentedString(simulationCallType)).append("\n"); + sb.append(" processingSkipped: ").append(toIndentedString(processingSkipped)).append("\n"); + sb.append(" processingSkipReason: ").append(toIndentedString(processingSkipReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `phone_number` to the URL query string + if (getPhoneNumber() != null) { + joiner.add(String.format("%sphone_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPhoneNumber())))); + } + + // add `service_provider_call_id` to the URL query string + if (getServiceProviderCallId() != null) { + joiner.add(String.format("%sservice_provider_call_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServiceProviderCallId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `started_at` to the URL query string + if (getStartedAt() != null) { + joiner.add(String.format("%sstarted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartedAt())))); + } + + // add `completed_at` to the URL query string + if (getCompletedAt() != null) { + joiner.add(String.format("%scompleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedAt())))); + } + + // add `duration_seconds` to the URL query string + if (getDurationSeconds() != null) { + joiner.add(String.format("%sduration_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDurationSeconds())))); + } + + // add `recording_url` to the URL query string + if (getRecordingUrl() != null) { + joiner.add(String.format("%srecording_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRecordingUrl())))); + } + + // add `cost_cents` to the URL query string + if (getCostCents() != null) { + joiner.add(String.format("%scost_cents%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCostCents())))); + } + + // add `call_metadata` to the URL query string + if (getCallMetadata() != null) { + for (String _key : getCallMetadata().keySet()) { + joiner.add(String.format("%scall_metadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCallMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCallMetadata().get(_key))))); + } + } + + // add `error_message` to the URL query string + if (getErrorMessage() != null) { + joiner.add(String.format("%serror_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorMessage())))); + } + + // add `scenario_name` to the URL query string + if (getScenarioName() != null) { + joiner.add(String.format("%sscenario_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioName())))); + } + + // add `transcripts` to the URL query string + if (getTranscripts() != null) { + joiner.add(String.format("%stranscripts%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTranscripts())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `provider_call_data` to the URL query string + if (getProviderCallData() != null) { + for (String _key : getProviderCallData().keySet()) { + joiner.add(String.format("%sprovider_call_data%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getProviderCallData().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getProviderCallData().get(_key))))); + } + } + + // add `stereo_recording_url` to the URL query string + if (getStereoRecordingUrl() != null) { + joiner.add(String.format("%sstereo_recording_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStereoRecordingUrl())))); + } + + // add `ended_reason` to the URL query string + if (getEndedReason() != null) { + joiner.add(String.format("%sended_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndedReason())))); + } + + // add `stt_cost_cents` to the URL query string + if (getSttCostCents() != null) { + joiner.add(String.format("%sstt_cost_cents%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSttCostCents())))); + } + + // add `llm_cost_cents` to the URL query string + if (getLlmCostCents() != null) { + joiner.add(String.format("%sllm_cost_cents%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLlmCostCents())))); + } + + // add `tts_cost_cents` to the URL query string + if (getTtsCostCents() != null) { + joiner.add(String.format("%stts_cost_cents%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTtsCostCents())))); + } + + // add `overall_score` to the URL query string + if (getOverallScore() != null) { + joiner.add(String.format("%soverall_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallScore())))); + } + + // add `response_time_ms` to the URL query string + if (getResponseTimeMs() != null) { + joiner.add(String.format("%sresponse_time_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResponseTimeMs())))); + } + + // add `response_time_seconds` to the URL query string + if (getResponseTimeSeconds() != null) { + joiner.add(String.format("%sresponse_time_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResponseTimeSeconds())))); + } + + // add `assistant_id` to the URL query string + if (getAssistantId() != null) { + joiner.add(String.format("%sassistant_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssistantId())))); + } + + // add `customer_number` to the URL query string + if (getCustomerNumber() != null) { + joiner.add(String.format("%scustomer_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerNumber())))); + } + + // add `call_type` to the URL query string + if (getCallType() != null) { + joiner.add(String.format("%scall_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallType())))); + } + + // add `ended_at` to the URL query string + if (getEndedAt() != null) { + joiner.add(String.format("%sended_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndedAt())))); + } + + // add `analysis_data` to the URL query string + if (getAnalysisData() != null) { + for (String _key : getAnalysisData().keySet()) { + joiner.add(String.format("%sanalysis_data%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAnalysisData().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAnalysisData().get(_key))))); + } + } + + // add `evaluation_data` to the URL query string + if (getEvaluationData() != null) { + for (String _key : getEvaluationData().keySet()) { + joiner.add(String.format("%sevaluation_data%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvaluationData().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvaluationData().get(_key))))); + } + } + + // add `message_count` to the URL query string + if (getMessageCount() != null) { + joiner.add(String.format("%smessage_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessageCount())))); + } + + // add `transcript_available` to the URL query string + if (getTranscriptAvailable() != null) { + joiner.add(String.format("%stranscript_available%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTranscriptAvailable())))); + } + + // add `recording_available` to the URL query string + if (getRecordingAvailable() != null) { + joiner.add(String.format("%srecording_available%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRecordingAvailable())))); + } + + // add `eval_outputs` to the URL query string + if (getEvalOutputs() != null) { + for (String _key : getEvalOutputs().keySet()) { + joiner.add(String.format("%seval_outputs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalOutputs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalOutputs().get(_key))))); + } + } + + // add `error_localizer_tasks` to the URL query string + if (getErrorLocalizerTasks() != null) { + joiner.add(String.format("%serror_localizer_tasks%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizerTasks())))); + } + + // add `call_summary` to the URL query string + if (getCallSummary() != null) { + joiner.add(String.format("%scall_summary%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallSummary())))); + } + + // add `agent_version` to the URL query string + if (getAgentVersion() != null) { + joiner.add(String.format("%sagent_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentVersion())))); + } + + // add `customer_cost_cents` to the URL query string + if (getCustomerCostCents() != null) { + joiner.add(String.format("%scustomer_cost_cents%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerCostCents())))); + } + + // add `system_metrics` to the URL query string + if (getSystemMetrics() != null) { + joiner.add(String.format("%ssystem_metrics%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSystemMetrics())))); + } + + // add `cost_breakdown` to the URL query string + if (getCostBreakdown() != null) { + joiner.add(String.format("%scost_breakdown%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCostBreakdown())))); + } + + // add `customer_call_id` to the URL query string + if (getCustomerCallId() != null) { + joiner.add(String.format("%scustomer_call_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerCallId())))); + } + + // add `simulation_call_type` to the URL query string + if (getSimulationCallType() != null) { + joiner.add(String.format("%ssimulation_call_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulationCallType())))); + } + + // add `processing_skipped` to the URL query string + if (getProcessingSkipped() != null) { + joiner.add(String.format("%sprocessing_skipped%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProcessingSkipped())))); + } + + // add `processing_skip_reason` to the URL query string + if (getProcessingSkipReason() != null) { + joiner.add(String.format("%sprocessing_skip_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProcessingSkipReason())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDeleteResponse.java new file mode 100644 index 0000000..2e8d18c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDeleteResponse.java @@ -0,0 +1,149 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecutionDeleteResponse + */ +@JsonPropertyOrder({ + CallExecutionDeleteResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecutionDeleteResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public CallExecutionDeleteResponse() { + } + + @JsonCreator + public CallExecutionDeleteResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Return true if this CallExecutionDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecutionDeleteResponse callExecutionDeleteResponse = (CallExecutionDeleteResponse) o; + return Objects.equals(this.message, callExecutionDeleteResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecutionDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDetail.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDetail.java new file mode 100644 index 0000000..c1121c8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionDetail.java @@ -0,0 +1,2232 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecutionDetail + */ +@JsonPropertyOrder({ + CallExecutionDetail.JSON_PROPERTY_ID, + CallExecutionDetail.JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID, + CallExecutionDetail.JSON_PROPERTY_SESSION_ID, + CallExecutionDetail.JSON_PROPERTY_TIMESTAMP, + CallExecutionDetail.JSON_PROPERTY_CALL_TYPE, + CallExecutionDetail.JSON_PROPERTY_STATUS, + CallExecutionDetail.JSON_PROPERTY_DURATION, + CallExecutionDetail.JSON_PROPERTY_DURATION_SECONDS, + CallExecutionDetail.JSON_PROPERTY_START_TIME, + CallExecutionDetail.JSON_PROPERTY_TRANSCRIPT, + CallExecutionDetail.JSON_PROPERTY_SCENARIO, + CallExecutionDetail.JSON_PROPERTY_OVERALL_SCORE, + CallExecutionDetail.JSON_PROPERTY_RESPONSE_TIME, + CallExecutionDetail.JSON_PROPERTY_RESPONSE_TIME_MS, + CallExecutionDetail.JSON_PROPERTY_AUDIO_URL, + CallExecutionDetail.JSON_PROPERTY_CUSTOMER_NAME, + CallExecutionDetail.JSON_PROPERTY_EVAL_OUTPUTS, + CallExecutionDetail.JSON_PROPERTY_EVAL_METRICS, + CallExecutionDetail.JSON_PROPERTY_SCENARIO_COLUMNS, + CallExecutionDetail.JSON_PROPERTY_ENDED_REASON, + CallExecutionDetail.JSON_PROPERTY_SIMULATOR_AGENT_NAME, + CallExecutionDetail.JSON_PROPERTY_SIMULATOR_AGENT_ID, + CallExecutionDetail.JSON_PROPERTY_AGENT_DEFINITION_USED_NAME, + CallExecutionDetail.JSON_PROPERTY_AGENT_DEFINITION_USED_ID, + CallExecutionDetail.JSON_PROPERTY_CALL_SUMMARY, + CallExecutionDetail.JSON_PROPERTY_RECORDINGS, + CallExecutionDetail.JSON_PROPERTY_SCENARIO_ID, + CallExecutionDetail.JSON_PROPERTY_AVG_AGENT_LATENCY, + CallExecutionDetail.JSON_PROPERTY_AVG_AGENT_LATENCY_MS, + CallExecutionDetail.JSON_PROPERTY_USER_INTERRUPTION_COUNT, + CallExecutionDetail.JSON_PROPERTY_USER_INTERRUPTION_RATE, + CallExecutionDetail.JSON_PROPERTY_USER_WPM, + CallExecutionDetail.JSON_PROPERTY_BOT_WPM, + CallExecutionDetail.JSON_PROPERTY_TALK_RATIO, + CallExecutionDetail.JSON_PROPERTY_AI_INTERRUPTION_COUNT, + CallExecutionDetail.JSON_PROPERTY_AI_INTERRUPTION_RATE, + CallExecutionDetail.JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION, + CallExecutionDetail.JSON_PROPERTY_TOTAL_TOKENS, + CallExecutionDetail.JSON_PROPERTY_INPUT_TOKENS, + CallExecutionDetail.JSON_PROPERTY_OUTPUT_TOKENS, + CallExecutionDetail.JSON_PROPERTY_AVG_LATENCY_MS, + CallExecutionDetail.JSON_PROPERTY_TURN_COUNT, + CallExecutionDetail.JSON_PROPERTY_AGENT_TALK_PERCENTAGE, + CallExecutionDetail.JSON_PROPERTY_CSAT_SCORE, + CallExecutionDetail.JSON_PROPERTY_PROCESSING_SKIPPED, + CallExecutionDetail.JSON_PROPERTY_PROCESSING_SKIP_REASON, + CallExecutionDetail.JSON_PROPERTY_RERUN_SNAPSHOTS, + CallExecutionDetail.JSON_PROPERTY_IS_SNAPSHOT, + CallExecutionDetail.JSON_PROPERTY_SNAPSHOT_TIMESTAMP, + CallExecutionDetail.JSON_PROPERTY_RERUN_TYPE, + CallExecutionDetail.JSON_PROPERTY_ORIGINAL_CALL_EXECUTION_ID, + CallExecutionDetail.JSON_PROPERTY_TOOL_OUTPUTS, + CallExecutionDetail.JSON_PROPERTY_COST_CENTS, + CallExecutionDetail.JSON_PROPERTY_CUSTOMER_COST_CENTS, + CallExecutionDetail.JSON_PROPERTY_CUSTOMER_COST_BREAKDOWN, + CallExecutionDetail.JSON_PROPERTY_CUSTOMER_LATENCY_METRICS, + CallExecutionDetail.JSON_PROPERTY_CUSTOMER_CALL_ID, + CallExecutionDetail.JSON_PROPERTY_SIMULATION_CALL_TYPE, + CallExecutionDetail.JSON_PROPERTY_PROVIDER, + CallExecutionDetail.JSON_PROPERTY_PHONE_NUMBER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecutionDetail { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID = "service_provider_call_id"; + @javax.annotation.Nullable + private String serviceProviderCallId; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + @javax.annotation.Nullable + private String sessionId; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @javax.annotation.Nullable + private OffsetDateTime timestamp; + + public static final String JSON_PROPERTY_CALL_TYPE = "call_type"; + @javax.annotation.Nullable + private String callType; + + /** + * Current status of the call + */ + public enum StatusEnum { + PENDING(String.valueOf("pending")), + + QUEUED(String.valueOf("queued")), + + ONGOING(String.valueOf("ongoing")), + + COMPLETED(String.valueOf("completed")), + + FAILED(String.valueOf("failed")), + + ANALYZING(String.valueOf("analyzing")), + + CANCELLED(String.valueOf("cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nullable + private String duration; + + public static final String JSON_PROPERTY_DURATION_SECONDS = "duration_seconds"; + private JsonNullable durationSeconds = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_START_TIME = "start_time"; + @javax.annotation.Nullable + private String startTime; + + public static final String JSON_PROPERTY_TRANSCRIPT = "transcript"; + @javax.annotation.Nullable + private String transcript; + + public static final String JSON_PROPERTY_SCENARIO = "scenario"; + @javax.annotation.Nullable + private String scenario; + + public static final String JSON_PROPERTY_OVERALL_SCORE = "overall_score"; + @javax.annotation.Nullable + private String overallScore; + + public static final String JSON_PROPERTY_RESPONSE_TIME = "response_time"; + @javax.annotation.Nullable + private String responseTime; + + public static final String JSON_PROPERTY_RESPONSE_TIME_MS = "response_time_ms"; + private JsonNullable responseTimeMs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AUDIO_URL = "audio_url"; + @javax.annotation.Nullable + private URI audioUrl; + + public static final String JSON_PROPERTY_CUSTOMER_NAME = "customer_name"; + @javax.annotation.Nullable + private String customerName; + + public static final String JSON_PROPERTY_EVAL_OUTPUTS = "eval_outputs"; + @javax.annotation.Nullable + private String evalOutputs; + + public static final String JSON_PROPERTY_EVAL_METRICS = "eval_metrics"; + @javax.annotation.Nullable + private String evalMetrics; + + public static final String JSON_PROPERTY_SCENARIO_COLUMNS = "scenario_columns"; + @javax.annotation.Nullable + private String scenarioColumns; + + public static final String JSON_PROPERTY_ENDED_REASON = "ended_reason"; + private JsonNullable endedReason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SIMULATOR_AGENT_NAME = "simulator_agent_name"; + @javax.annotation.Nullable + private String simulatorAgentName; + + public static final String JSON_PROPERTY_SIMULATOR_AGENT_ID = "simulator_agent_id"; + @javax.annotation.Nullable + private UUID simulatorAgentId; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_USED_NAME = "agent_definition_used_name"; + @javax.annotation.Nullable + private String agentDefinitionUsedName; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_USED_ID = "agent_definition_used_id"; + @javax.annotation.Nullable + private UUID agentDefinitionUsedId; + + public static final String JSON_PROPERTY_CALL_SUMMARY = "call_summary"; + private JsonNullable callSummary = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RECORDINGS = "recordings"; + @javax.annotation.Nullable + private String recordings; + + public static final String JSON_PROPERTY_SCENARIO_ID = "scenario_id"; + @javax.annotation.Nullable + private String scenarioId; + + public static final String JSON_PROPERTY_AVG_AGENT_LATENCY = "avg_agent_latency"; + @javax.annotation.Nullable + private Integer avgAgentLatency; + + public static final String JSON_PROPERTY_AVG_AGENT_LATENCY_MS = "avg_agent_latency_ms"; + private JsonNullable avgAgentLatencyMs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_INTERRUPTION_COUNT = "user_interruption_count"; + private JsonNullable userInterruptionCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_INTERRUPTION_RATE = "user_interruption_rate"; + private JsonNullable userInterruptionRate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_WPM = "user_wpm"; + private JsonNullable userWpm = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOT_WPM = "bot_wpm"; + private JsonNullable botWpm = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TALK_RATIO = "talk_ratio"; + private JsonNullable talkRatio = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AI_INTERRUPTION_COUNT = "ai_interruption_count"; + private JsonNullable aiInterruptionCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AI_INTERRUPTION_RATE = "ai_interruption_rate"; + private JsonNullable aiInterruptionRate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION = "avg_stop_time_after_interruption"; + @javax.annotation.Nullable + private Integer avgStopTimeAfterInterruption; + + public static final String JSON_PROPERTY_TOTAL_TOKENS = "total_tokens"; + @javax.annotation.Nullable + private String totalTokens; + + public static final String JSON_PROPERTY_INPUT_TOKENS = "input_tokens"; + @javax.annotation.Nullable + private String inputTokens; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS = "output_tokens"; + @javax.annotation.Nullable + private String outputTokens; + + public static final String JSON_PROPERTY_AVG_LATENCY_MS = "avg_latency_ms"; + @javax.annotation.Nullable + private String avgLatencyMs; + + public static final String JSON_PROPERTY_TURN_COUNT = "turn_count"; + @javax.annotation.Nullable + private String turnCount; + + public static final String JSON_PROPERTY_AGENT_TALK_PERCENTAGE = "agent_talk_percentage"; + @javax.annotation.Nullable + private String agentTalkPercentage; + + public static final String JSON_PROPERTY_CSAT_SCORE = "csat_score"; + @javax.annotation.Nullable + private String csatScore; + + public static final String JSON_PROPERTY_PROCESSING_SKIPPED = "processing_skipped"; + @javax.annotation.Nullable + private String processingSkipped; + + public static final String JSON_PROPERTY_PROCESSING_SKIP_REASON = "processing_skip_reason"; + @javax.annotation.Nullable + private String processingSkipReason; + + public static final String JSON_PROPERTY_RERUN_SNAPSHOTS = "rerun_snapshots"; + @javax.annotation.Nullable + private String rerunSnapshots; + + public static final String JSON_PROPERTY_IS_SNAPSHOT = "is_snapshot"; + @javax.annotation.Nullable + private String isSnapshot; + + public static final String JSON_PROPERTY_SNAPSHOT_TIMESTAMP = "snapshot_timestamp"; + @javax.annotation.Nullable + private String snapshotTimestamp; + + public static final String JSON_PROPERTY_RERUN_TYPE = "rerun_type"; + @javax.annotation.Nullable + private String rerunType; + + public static final String JSON_PROPERTY_ORIGINAL_CALL_EXECUTION_ID = "original_call_execution_id"; + @javax.annotation.Nullable + private String originalCallExecutionId; + + public static final String JSON_PROPERTY_TOOL_OUTPUTS = "tool_outputs"; + @javax.annotation.Nullable + private Map toolOutputs = new HashMap<>(); + + public static final String JSON_PROPERTY_COST_CENTS = "cost_cents"; + private JsonNullable costCents = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CUSTOMER_COST_CENTS = "customer_cost_cents"; + private JsonNullable customerCostCents = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CUSTOMER_COST_BREAKDOWN = "customer_cost_breakdown"; + @javax.annotation.Nullable + private Map customerCostBreakdown = new HashMap<>(); + + public static final String JSON_PROPERTY_CUSTOMER_LATENCY_METRICS = "customer_latency_metrics"; + @javax.annotation.Nullable + private Map customerLatencyMetrics = new HashMap<>(); + + public static final String JSON_PROPERTY_CUSTOMER_CALL_ID = "customer_call_id"; + private JsonNullable customerCallId = JsonNullable.undefined(); + + /** + * Type of simulation call + */ + public enum SimulationCallTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + SimulationCallTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SimulationCallTypeEnum fromValue(String value) { + for (SimulationCallTypeEnum b : SimulationCallTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIMULATION_CALL_TYPE = "simulation_call_type"; + @javax.annotation.Nullable + private SimulationCallTypeEnum simulationCallType; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + @javax.annotation.Nullable + private String provider; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phone_number"; + private JsonNullable phoneNumber = JsonNullable.undefined(); + + public CallExecutionDetail() { + } + + @JsonCreator + public CallExecutionDetail( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID) String serviceProviderCallId, + @JsonProperty(JSON_PROPERTY_SESSION_ID) String sessionId, + @JsonProperty(JSON_PROPERTY_TIMESTAMP) OffsetDateTime timestamp, + @JsonProperty(JSON_PROPERTY_CALL_TYPE) String callType, + @JsonProperty(JSON_PROPERTY_DURATION) String duration, + @JsonProperty(JSON_PROPERTY_START_TIME) String startTime, + @JsonProperty(JSON_PROPERTY_TRANSCRIPT) String transcript, + @JsonProperty(JSON_PROPERTY_SCENARIO) String scenario, + @JsonProperty(JSON_PROPERTY_OVERALL_SCORE) String overallScore, + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME) String responseTime, + @JsonProperty(JSON_PROPERTY_AUDIO_URL) URI audioUrl, + @JsonProperty(JSON_PROPERTY_CUSTOMER_NAME) String customerName, + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUTS) String evalOutputs, + @JsonProperty(JSON_PROPERTY_EVAL_METRICS) String evalMetrics, + @JsonProperty(JSON_PROPERTY_SCENARIO_COLUMNS) String scenarioColumns, + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_NAME) String simulatorAgentName, + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_ID) UUID simulatorAgentId, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_NAME) String agentDefinitionUsedName, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_ID) UUID agentDefinitionUsedId, + @JsonProperty(JSON_PROPERTY_RECORDINGS) String recordings, + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) String scenarioId, + @JsonProperty(JSON_PROPERTY_AVG_AGENT_LATENCY) Integer avgAgentLatency, + @JsonProperty(JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION) Integer avgStopTimeAfterInterruption, + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) String totalTokens, + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS) String inputTokens, + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS) String outputTokens, + @JsonProperty(JSON_PROPERTY_AVG_LATENCY_MS) String avgLatencyMs, + @JsonProperty(JSON_PROPERTY_TURN_COUNT) String turnCount, + @JsonProperty(JSON_PROPERTY_AGENT_TALK_PERCENTAGE) String agentTalkPercentage, + @JsonProperty(JSON_PROPERTY_CSAT_SCORE) String csatScore, + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIPPED) String processingSkipped, + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIP_REASON) String processingSkipReason, + @JsonProperty(JSON_PROPERTY_RERUN_SNAPSHOTS) String rerunSnapshots, + @JsonProperty(JSON_PROPERTY_IS_SNAPSHOT) String isSnapshot, + @JsonProperty(JSON_PROPERTY_SNAPSHOT_TIMESTAMP) String snapshotTimestamp, + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) String rerunType, + @JsonProperty(JSON_PROPERTY_ORIGINAL_CALL_EXECUTION_ID) String originalCallExecutionId, + @JsonProperty(JSON_PROPERTY_PROVIDER) String provider + ) { + this(); + this.id = id; + this.serviceProviderCallId = serviceProviderCallId; + this.sessionId = sessionId; + this.timestamp = timestamp; + this.callType = callType; + this.duration = duration; + this.startTime = startTime; + this.transcript = transcript; + this.scenario = scenario; + this.overallScore = overallScore; + this.responseTime = responseTime; + this.audioUrl = audioUrl; + this.customerName = customerName; + this.evalOutputs = evalOutputs; + this.evalMetrics = evalMetrics; + this.scenarioColumns = scenarioColumns; + this.simulatorAgentName = simulatorAgentName; + this.simulatorAgentId = simulatorAgentId; + this.agentDefinitionUsedName = agentDefinitionUsedName; + this.agentDefinitionUsedId = agentDefinitionUsedId; + this.recordings = recordings; + this.scenarioId = scenarioId; + this.avgAgentLatency = avgAgentLatency; + this.avgStopTimeAfterInterruption = avgStopTimeAfterInterruption; + this.totalTokens = totalTokens; + this.inputTokens = inputTokens; + this.outputTokens = outputTokens; + this.avgLatencyMs = avgLatencyMs; + this.turnCount = turnCount; + this.agentTalkPercentage = agentTalkPercentage; + this.csatScore = csatScore; + this.processingSkipped = processingSkipped; + this.processingSkipReason = processingSkipReason; + this.rerunSnapshots = rerunSnapshots; + this.isSnapshot = isSnapshot; + this.snapshotTimestamp = snapshotTimestamp; + this.rerunType = rerunType; + this.originalCallExecutionId = originalCallExecutionId; + this.provider = provider; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get serviceProviderCallId + * @return serviceProviderCallId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_PROVIDER_CALL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceProviderCallId() { + return serviceProviderCallId; + } + + + + + /** + * Get sessionId + * @return sessionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSessionId() { + return sessionId; + } + + + + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTimestamp() { + return timestamp; + } + + + + + /** + * Get callType + * @return callType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCallType() { + return callType; + } + + + + + public CallExecutionDetail status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current status of the call + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDuration() { + return duration; + } + + + + + public CallExecutionDetail durationSeconds(@javax.annotation.Nullable Integer durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + return this; + } + + /** + * Duration of the call in seconds + * minimum: -2147483648 + * maximum: 2147483647 + * @return durationSeconds + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getDurationSeconds() { + return durationSeconds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDurationSeconds_JsonNullable() { + return durationSeconds; + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + public void setDurationSeconds_JsonNullable(JsonNullable durationSeconds) { + this.durationSeconds = durationSeconds; + } + + public void setDurationSeconds(@javax.annotation.Nullable Integer durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + } + + + /** + * Get startTime + * @return startTime + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStartTime() { + return startTime; + } + + + + + /** + * Get transcript + * @return transcript + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSCRIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTranscript() { + return transcript; + } + + + + + /** + * Get scenario + * @return scenario + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenario() { + return scenario; + } + + + + + /** + * Get overallScore + * @return overallScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOverallScore() { + return overallScore; + } + + + + + /** + * Get responseTime + * @return responseTime + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResponseTime() { + return responseTime; + } + + + + + public CallExecutionDetail responseTimeMs(@javax.annotation.Nullable Integer responseTimeMs) { + this.responseTimeMs = JsonNullable.of(responseTimeMs); + return this; + } + + /** + * Average response time in milliseconds + * minimum: -2147483648 + * maximum: 2147483647 + * @return responseTimeMs + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getResponseTimeMs() { + return responseTimeMs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResponseTimeMs_JsonNullable() { + return responseTimeMs; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME_MS) + public void setResponseTimeMs_JsonNullable(JsonNullable responseTimeMs) { + this.responseTimeMs = responseTimeMs; + } + + public void setResponseTimeMs(@javax.annotation.Nullable Integer responseTimeMs) { + this.responseTimeMs = JsonNullable.of(responseTimeMs); + } + + + /** + * Get audioUrl + * @return audioUrl + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIO_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public URI getAudioUrl() { + return audioUrl; + } + + + + + /** + * Get customerName + * @return customerName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerName() { + return customerName; + } + + + + + /** + * Get evalOutputs + * @return evalOutputs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalOutputs() { + return evalOutputs; + } + + + + + /** + * Get evalMetrics + * @return evalMetrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalMetrics() { + return evalMetrics; + } + + + + + /** + * Get scenarioColumns + * @return scenarioColumns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenarioColumns() { + return scenarioColumns; + } + + + + + public CallExecutionDetail endedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + return this; + } + + /** + * Reason why the call ended + * @return endedReason + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEndedReason() { + return endedReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEndedReason_JsonNullable() { + return endedReason; + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + public void setEndedReason_JsonNullable(JsonNullable endedReason) { + this.endedReason = endedReason; + } + + public void setEndedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + } + + + /** + * Get simulatorAgentName + * @return simulatorAgentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSimulatorAgentName() { + return simulatorAgentName; + } + + + + + /** + * Get simulatorAgentId + * @return simulatorAgentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getSimulatorAgentId() { + return simulatorAgentId; + } + + + + + /** + * Get agentDefinitionUsedName + * @return agentDefinitionUsedName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentDefinitionUsedName() { + return agentDefinitionUsedName; + } + + + + + /** + * Get agentDefinitionUsedId + * @return agentDefinitionUsedId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAgentDefinitionUsedId() { + return agentDefinitionUsedId; + } + + + + + public CallExecutionDetail callSummary(@javax.annotation.Nullable String callSummary) { + this.callSummary = JsonNullable.of(callSummary); + return this; + } + + /** + * Call summary from the service + * @return callSummary + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCallSummary() { + return callSummary.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CALL_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCallSummary_JsonNullable() { + return callSummary; + } + + @JsonProperty(JSON_PROPERTY_CALL_SUMMARY) + public void setCallSummary_JsonNullable(JsonNullable callSummary) { + this.callSummary = callSummary; + } + + public void setCallSummary(@javax.annotation.Nullable String callSummary) { + this.callSummary = JsonNullable.of(callSummary); + } + + + /** + * Get recordings + * @return recordings + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECORDINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecordings() { + return recordings; + } + + + + + /** + * Get scenarioId + * @return scenarioId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenarioId() { + return scenarioId; + } + + + + + /** + * Get avgAgentLatency + * @return avgAgentLatency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_AGENT_LATENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAvgAgentLatency() { + return avgAgentLatency; + } + + + + + public CallExecutionDetail avgAgentLatencyMs(@javax.annotation.Nullable Integer avgAgentLatencyMs) { + this.avgAgentLatencyMs = JsonNullable.of(avgAgentLatencyMs); + return this; + } + + /** + * Average agent latency in milliseconds (time taken by agent to respond after user's pause) + * minimum: -2147483648 + * maximum: 2147483647 + * @return avgAgentLatencyMs + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getAvgAgentLatencyMs() { + return avgAgentLatencyMs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_AGENT_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgAgentLatencyMs_JsonNullable() { + return avgAgentLatencyMs; + } + + @JsonProperty(JSON_PROPERTY_AVG_AGENT_LATENCY_MS) + public void setAvgAgentLatencyMs_JsonNullable(JsonNullable avgAgentLatencyMs) { + this.avgAgentLatencyMs = avgAgentLatencyMs; + } + + public void setAvgAgentLatencyMs(@javax.annotation.Nullable Integer avgAgentLatencyMs) { + this.avgAgentLatencyMs = JsonNullable.of(avgAgentLatencyMs); + } + + + public CallExecutionDetail userInterruptionCount(@javax.annotation.Nullable Integer userInterruptionCount) { + this.userInterruptionCount = JsonNullable.of(userInterruptionCount); + return this; + } + + /** + * Number of times user interrupted the AI + * minimum: -2147483648 + * maximum: 2147483647 + * @return userInterruptionCount + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getUserInterruptionCount() { + return userInterruptionCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_INTERRUPTION_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUserInterruptionCount_JsonNullable() { + return userInterruptionCount; + } + + @JsonProperty(JSON_PROPERTY_USER_INTERRUPTION_COUNT) + public void setUserInterruptionCount_JsonNullable(JsonNullable userInterruptionCount) { + this.userInterruptionCount = userInterruptionCount; + } + + public void setUserInterruptionCount(@javax.annotation.Nullable Integer userInterruptionCount) { + this.userInterruptionCount = JsonNullable.of(userInterruptionCount); + } + + + public CallExecutionDetail userInterruptionRate(@javax.annotation.Nullable BigDecimal userInterruptionRate) { + this.userInterruptionRate = JsonNullable.of(userInterruptionRate); + return this; + } + + /** + * Rate of user interruptions (interruptions per minute) + * @return userInterruptionRate + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getUserInterruptionRate() { + return userInterruptionRate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_INTERRUPTION_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUserInterruptionRate_JsonNullable() { + return userInterruptionRate; + } + + @JsonProperty(JSON_PROPERTY_USER_INTERRUPTION_RATE) + public void setUserInterruptionRate_JsonNullable(JsonNullable userInterruptionRate) { + this.userInterruptionRate = userInterruptionRate; + } + + public void setUserInterruptionRate(@javax.annotation.Nullable BigDecimal userInterruptionRate) { + this.userInterruptionRate = JsonNullable.of(userInterruptionRate); + } + + + public CallExecutionDetail userWpm(@javax.annotation.Nullable BigDecimal userWpm) { + this.userWpm = JsonNullable.of(userWpm); + return this; + } + + /** + * User's words per minute + * @return userWpm + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getUserWpm() { + return userWpm.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_WPM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUserWpm_JsonNullable() { + return userWpm; + } + + @JsonProperty(JSON_PROPERTY_USER_WPM) + public void setUserWpm_JsonNullable(JsonNullable userWpm) { + this.userWpm = userWpm; + } + + public void setUserWpm(@javax.annotation.Nullable BigDecimal userWpm) { + this.userWpm = JsonNullable.of(userWpm); + } + + + public CallExecutionDetail botWpm(@javax.annotation.Nullable BigDecimal botWpm) { + this.botWpm = JsonNullable.of(botWpm); + return this; + } + + /** + * Bot's words per minute + * @return botWpm + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getBotWpm() { + return botWpm.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOT_WPM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBotWpm_JsonNullable() { + return botWpm; + } + + @JsonProperty(JSON_PROPERTY_BOT_WPM) + public void setBotWpm_JsonNullable(JsonNullable botWpm) { + this.botWpm = botWpm; + } + + public void setBotWpm(@javax.annotation.Nullable BigDecimal botWpm) { + this.botWpm = JsonNullable.of(botWpm); + } + + + public CallExecutionDetail talkRatio(@javax.annotation.Nullable BigDecimal talkRatio) { + this.talkRatio = JsonNullable.of(talkRatio); + return this; + } + + /** + * Ratio of bot speaking time to user speaking time + * @return talkRatio + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getTalkRatio() { + return talkRatio.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TALK_RATIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTalkRatio_JsonNullable() { + return talkRatio; + } + + @JsonProperty(JSON_PROPERTY_TALK_RATIO) + public void setTalkRatio_JsonNullable(JsonNullable talkRatio) { + this.talkRatio = talkRatio; + } + + public void setTalkRatio(@javax.annotation.Nullable BigDecimal talkRatio) { + this.talkRatio = JsonNullable.of(talkRatio); + } + + + public CallExecutionDetail aiInterruptionCount(@javax.annotation.Nullable Integer aiInterruptionCount) { + this.aiInterruptionCount = JsonNullable.of(aiInterruptionCount); + return this; + } + + /** + * Number of times AI interrupted the user + * minimum: -2147483648 + * maximum: 2147483647 + * @return aiInterruptionCount + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getAiInterruptionCount() { + return aiInterruptionCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AI_INTERRUPTION_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAiInterruptionCount_JsonNullable() { + return aiInterruptionCount; + } + + @JsonProperty(JSON_PROPERTY_AI_INTERRUPTION_COUNT) + public void setAiInterruptionCount_JsonNullable(JsonNullable aiInterruptionCount) { + this.aiInterruptionCount = aiInterruptionCount; + } + + public void setAiInterruptionCount(@javax.annotation.Nullable Integer aiInterruptionCount) { + this.aiInterruptionCount = JsonNullable.of(aiInterruptionCount); + } + + + public CallExecutionDetail aiInterruptionRate(@javax.annotation.Nullable BigDecimal aiInterruptionRate) { + this.aiInterruptionRate = JsonNullable.of(aiInterruptionRate); + return this; + } + + /** + * Rate of AI interruptions (interruptions per minute) + * @return aiInterruptionRate + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAiInterruptionRate() { + return aiInterruptionRate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AI_INTERRUPTION_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAiInterruptionRate_JsonNullable() { + return aiInterruptionRate; + } + + @JsonProperty(JSON_PROPERTY_AI_INTERRUPTION_RATE) + public void setAiInterruptionRate_JsonNullable(JsonNullable aiInterruptionRate) { + this.aiInterruptionRate = aiInterruptionRate; + } + + public void setAiInterruptionRate(@javax.annotation.Nullable BigDecimal aiInterruptionRate) { + this.aiInterruptionRate = JsonNullable.of(aiInterruptionRate); + } + + + /** + * Get avgStopTimeAfterInterruption + * @return avgStopTimeAfterInterruption + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAvgStopTimeAfterInterruption() { + return avgStopTimeAfterInterruption; + } + + + + + /** + * Get totalTokens + * @return totalTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTotalTokens() { + return totalTokens; + } + + + + + /** + * Get inputTokens + * @return inputTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInputTokens() { + return inputTokens; + } + + + + + /** + * Get outputTokens + * @return outputTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOutputTokens() { + return outputTokens; + } + + + + + /** + * Get avgLatencyMs + * @return avgLatencyMs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAvgLatencyMs() { + return avgLatencyMs; + } + + + + + /** + * Get turnCount + * @return turnCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TURN_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTurnCount() { + return turnCount; + } + + + + + /** + * Get agentTalkPercentage + * @return agentTalkPercentage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TALK_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentTalkPercentage() { + return agentTalkPercentage; + } + + + + + /** + * Get csatScore + * @return csatScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CSAT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCsatScore() { + return csatScore; + } + + + + + /** + * Get processingSkipped + * @return processingSkipped + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIPPED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProcessingSkipped() { + return processingSkipped; + } + + + + + /** + * Get processingSkipReason + * @return processingSkipReason + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_SKIP_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProcessingSkipReason() { + return processingSkipReason; + } + + + + + /** + * Get rerunSnapshots + * @return rerunSnapshots + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RERUN_SNAPSHOTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRerunSnapshots() { + return rerunSnapshots; + } + + + + + /** + * Get isSnapshot + * @return isSnapshot + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIsSnapshot() { + return isSnapshot; + } + + + + + /** + * Get snapshotTimestamp + * @return snapshotTimestamp + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNAPSHOT_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSnapshotTimestamp() { + return snapshotTimestamp; + } + + + + + /** + * Get rerunType + * @return rerunType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRerunType() { + return rerunType; + } + + + + + /** + * Get originalCallExecutionId + * @return originalCallExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGINAL_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOriginalCallExecutionId() { + return originalCallExecutionId; + } + + + + + public CallExecutionDetail toolOutputs(@javax.annotation.Nullable Map toolOutputs) { + this.toolOutputs = toolOutputs; + return this; + } + + public CallExecutionDetail putToolOutputsItem(String key, Object toolOutputsItem) { + if (this.toolOutputs == null) { + this.toolOutputs = new HashMap<>(); + } + this.toolOutputs.put(key, toolOutputsItem); + return this; + } + + /** + * Tool evaluation output - separate from standard evaluations + * @return toolOutputs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOOL_OUTPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getToolOutputs() { + return toolOutputs; + } + + + @JsonProperty(JSON_PROPERTY_TOOL_OUTPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setToolOutputs(@javax.annotation.Nullable Map toolOutputs) { + this.toolOutputs = toolOutputs; + } + + + public CallExecutionDetail costCents(@javax.annotation.Nullable Integer costCents) { + this.costCents = JsonNullable.of(costCents); + return this; + } + + /** + * Cost of the call in cents + * minimum: -2147483648 + * maximum: 2147483647 + * @return costCents + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getCostCents() { + return costCents.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COST_CENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCostCents_JsonNullable() { + return costCents; + } + + @JsonProperty(JSON_PROPERTY_COST_CENTS) + public void setCostCents_JsonNullable(JsonNullable costCents) { + this.costCents = costCents; + } + + public void setCostCents(@javax.annotation.Nullable Integer costCents) { + this.costCents = JsonNullable.of(costCents); + } + + + public CallExecutionDetail customerCostCents(@javax.annotation.Nullable Integer customerCostCents) { + this.customerCostCents = JsonNullable.of(customerCostCents); + return this; + } + + /** + * Total customer-reported cost in cents + * minimum: -2147483648 + * maximum: 2147483647 + * @return customerCostCents + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getCustomerCostCents() { + return customerCostCents.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_COST_CENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomerCostCents_JsonNullable() { + return customerCostCents; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_COST_CENTS) + public void setCustomerCostCents_JsonNullable(JsonNullable customerCostCents) { + this.customerCostCents = customerCostCents; + } + + public void setCustomerCostCents(@javax.annotation.Nullable Integer customerCostCents) { + this.customerCostCents = JsonNullable.of(customerCostCents); + } + + + public CallExecutionDetail customerCostBreakdown(@javax.annotation.Nullable Map customerCostBreakdown) { + this.customerCostBreakdown = customerCostBreakdown; + return this; + } + + public CallExecutionDetail putCustomerCostBreakdownItem(String key, Object customerCostBreakdownItem) { + if (this.customerCostBreakdown == null) { + this.customerCostBreakdown = new HashMap<>(); + } + this.customerCostBreakdown.put(key, customerCostBreakdownItem); + return this; + } + + /** + * Detailed cost breakdown from customer call data + * @return customerCostBreakdown + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_COST_BREAKDOWN) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomerCostBreakdown() { + return customerCostBreakdown; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_COST_BREAKDOWN) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerCostBreakdown(@javax.annotation.Nullable Map customerCostBreakdown) { + this.customerCostBreakdown = customerCostBreakdown; + } + + + public CallExecutionDetail customerLatencyMetrics(@javax.annotation.Nullable Map customerLatencyMetrics) { + this.customerLatencyMetrics = customerLatencyMetrics; + return this; + } + + public CallExecutionDetail putCustomerLatencyMetricsItem(String key, Object customerLatencyMetricsItem) { + if (this.customerLatencyMetrics == null) { + this.customerLatencyMetrics = new HashMap<>(); + } + this.customerLatencyMetrics.put(key, customerLatencyMetricsItem); + return this; + } + + /** + * Latency metrics from customer call data + * @return customerLatencyMetrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_LATENCY_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomerLatencyMetrics() { + return customerLatencyMetrics; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_LATENCY_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerLatencyMetrics(@javax.annotation.Nullable Map customerLatencyMetrics) { + this.customerLatencyMetrics = customerLatencyMetrics; + } + + + public CallExecutionDetail customerCallId(@javax.annotation.Nullable String customerCallId) { + this.customerCallId = JsonNullable.of(customerCallId); + return this; + } + + /** + * Customer call ID if available + * @return customerCallId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCustomerCallId() { + return customerCallId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_CALL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomerCallId_JsonNullable() { + return customerCallId; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_CALL_ID) + public void setCustomerCallId_JsonNullable(JsonNullable customerCallId) { + this.customerCallId = customerCallId; + } + + public void setCustomerCallId(@javax.annotation.Nullable String customerCallId) { + this.customerCallId = JsonNullable.of(customerCallId); + } + + + public CallExecutionDetail simulationCallType(@javax.annotation.Nullable SimulationCallTypeEnum simulationCallType) { + this.simulationCallType = simulationCallType; + return this; + } + + /** + * Type of simulation call + * @return simulationCallType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATION_CALL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SimulationCallTypeEnum getSimulationCallType() { + return simulationCallType; + } + + + @JsonProperty(JSON_PROPERTY_SIMULATION_CALL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSimulationCallType(@javax.annotation.Nullable SimulationCallTypeEnum simulationCallType) { + this.simulationCallType = simulationCallType; + } + + + /** + * Get provider + * @return provider + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProvider() { + return provider; + } + + + + + public CallExecutionDetail phoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = JsonNullable.of(phoneNumber); + return this; + } + + /** + * Phone number called (null for TEXT/chat simulations) + * @return phoneNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPhoneNumber() { + return phoneNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPhoneNumber_JsonNullable() { + return phoneNumber; + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + public void setPhoneNumber_JsonNullable(JsonNullable phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public void setPhoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = JsonNullable.of(phoneNumber); + } + + + /** + * Return true if this CallExecutionDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecutionDetail callExecutionDetail = (CallExecutionDetail) o; + return Objects.equals(this.id, callExecutionDetail.id) && + Objects.equals(this.serviceProviderCallId, callExecutionDetail.serviceProviderCallId) && + Objects.equals(this.sessionId, callExecutionDetail.sessionId) && + Objects.equals(this.timestamp, callExecutionDetail.timestamp) && + Objects.equals(this.callType, callExecutionDetail.callType) && + Objects.equals(this.status, callExecutionDetail.status) && + Objects.equals(this.duration, callExecutionDetail.duration) && + equalsNullable(this.durationSeconds, callExecutionDetail.durationSeconds) && + Objects.equals(this.startTime, callExecutionDetail.startTime) && + Objects.equals(this.transcript, callExecutionDetail.transcript) && + Objects.equals(this.scenario, callExecutionDetail.scenario) && + Objects.equals(this.overallScore, callExecutionDetail.overallScore) && + Objects.equals(this.responseTime, callExecutionDetail.responseTime) && + equalsNullable(this.responseTimeMs, callExecutionDetail.responseTimeMs) && + Objects.equals(this.audioUrl, callExecutionDetail.audioUrl) && + Objects.equals(this.customerName, callExecutionDetail.customerName) && + Objects.equals(this.evalOutputs, callExecutionDetail.evalOutputs) && + Objects.equals(this.evalMetrics, callExecutionDetail.evalMetrics) && + Objects.equals(this.scenarioColumns, callExecutionDetail.scenarioColumns) && + equalsNullable(this.endedReason, callExecutionDetail.endedReason) && + Objects.equals(this.simulatorAgentName, callExecutionDetail.simulatorAgentName) && + Objects.equals(this.simulatorAgentId, callExecutionDetail.simulatorAgentId) && + Objects.equals(this.agentDefinitionUsedName, callExecutionDetail.agentDefinitionUsedName) && + Objects.equals(this.agentDefinitionUsedId, callExecutionDetail.agentDefinitionUsedId) && + equalsNullable(this.callSummary, callExecutionDetail.callSummary) && + Objects.equals(this.recordings, callExecutionDetail.recordings) && + Objects.equals(this.scenarioId, callExecutionDetail.scenarioId) && + Objects.equals(this.avgAgentLatency, callExecutionDetail.avgAgentLatency) && + equalsNullable(this.avgAgentLatencyMs, callExecutionDetail.avgAgentLatencyMs) && + equalsNullable(this.userInterruptionCount, callExecutionDetail.userInterruptionCount) && + equalsNullable(this.userInterruptionRate, callExecutionDetail.userInterruptionRate) && + equalsNullable(this.userWpm, callExecutionDetail.userWpm) && + equalsNullable(this.botWpm, callExecutionDetail.botWpm) && + equalsNullable(this.talkRatio, callExecutionDetail.talkRatio) && + equalsNullable(this.aiInterruptionCount, callExecutionDetail.aiInterruptionCount) && + equalsNullable(this.aiInterruptionRate, callExecutionDetail.aiInterruptionRate) && + Objects.equals(this.avgStopTimeAfterInterruption, callExecutionDetail.avgStopTimeAfterInterruption) && + Objects.equals(this.totalTokens, callExecutionDetail.totalTokens) && + Objects.equals(this.inputTokens, callExecutionDetail.inputTokens) && + Objects.equals(this.outputTokens, callExecutionDetail.outputTokens) && + Objects.equals(this.avgLatencyMs, callExecutionDetail.avgLatencyMs) && + Objects.equals(this.turnCount, callExecutionDetail.turnCount) && + Objects.equals(this.agentTalkPercentage, callExecutionDetail.agentTalkPercentage) && + Objects.equals(this.csatScore, callExecutionDetail.csatScore) && + Objects.equals(this.processingSkipped, callExecutionDetail.processingSkipped) && + Objects.equals(this.processingSkipReason, callExecutionDetail.processingSkipReason) && + Objects.equals(this.rerunSnapshots, callExecutionDetail.rerunSnapshots) && + Objects.equals(this.isSnapshot, callExecutionDetail.isSnapshot) && + Objects.equals(this.snapshotTimestamp, callExecutionDetail.snapshotTimestamp) && + Objects.equals(this.rerunType, callExecutionDetail.rerunType) && + Objects.equals(this.originalCallExecutionId, callExecutionDetail.originalCallExecutionId) && + Objects.equals(this.toolOutputs, callExecutionDetail.toolOutputs) && + equalsNullable(this.costCents, callExecutionDetail.costCents) && + equalsNullable(this.customerCostCents, callExecutionDetail.customerCostCents) && + Objects.equals(this.customerCostBreakdown, callExecutionDetail.customerCostBreakdown) && + Objects.equals(this.customerLatencyMetrics, callExecutionDetail.customerLatencyMetrics) && + equalsNullable(this.customerCallId, callExecutionDetail.customerCallId) && + Objects.equals(this.simulationCallType, callExecutionDetail.simulationCallType) && + Objects.equals(this.provider, callExecutionDetail.provider) && + equalsNullable(this.phoneNumber, callExecutionDetail.phoneNumber); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, serviceProviderCallId, sessionId, timestamp, callType, status, duration, hashCodeNullable(durationSeconds), startTime, transcript, scenario, overallScore, responseTime, hashCodeNullable(responseTimeMs), audioUrl, customerName, evalOutputs, evalMetrics, scenarioColumns, hashCodeNullable(endedReason), simulatorAgentName, simulatorAgentId, agentDefinitionUsedName, agentDefinitionUsedId, hashCodeNullable(callSummary), recordings, scenarioId, avgAgentLatency, hashCodeNullable(avgAgentLatencyMs), hashCodeNullable(userInterruptionCount), hashCodeNullable(userInterruptionRate), hashCodeNullable(userWpm), hashCodeNullable(botWpm), hashCodeNullable(talkRatio), hashCodeNullable(aiInterruptionCount), hashCodeNullable(aiInterruptionRate), avgStopTimeAfterInterruption, totalTokens, inputTokens, outputTokens, avgLatencyMs, turnCount, agentTalkPercentage, csatScore, processingSkipped, processingSkipReason, rerunSnapshots, isSnapshot, snapshotTimestamp, rerunType, originalCallExecutionId, toolOutputs, hashCodeNullable(costCents), hashCodeNullable(customerCostCents), customerCostBreakdown, customerLatencyMetrics, hashCodeNullable(customerCallId), simulationCallType, provider, hashCodeNullable(phoneNumber)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecutionDetail {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" serviceProviderCallId: ").append(toIndentedString(serviceProviderCallId)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" callType: ").append(toIndentedString(callType)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" durationSeconds: ").append(toIndentedString(durationSeconds)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" transcript: ").append(toIndentedString(transcript)).append("\n"); + sb.append(" scenario: ").append(toIndentedString(scenario)).append("\n"); + sb.append(" overallScore: ").append(toIndentedString(overallScore)).append("\n"); + sb.append(" responseTime: ").append(toIndentedString(responseTime)).append("\n"); + sb.append(" responseTimeMs: ").append(toIndentedString(responseTimeMs)).append("\n"); + sb.append(" audioUrl: ").append(toIndentedString(audioUrl)).append("\n"); + sb.append(" customerName: ").append(toIndentedString(customerName)).append("\n"); + sb.append(" evalOutputs: ").append(toIndentedString(evalOutputs)).append("\n"); + sb.append(" evalMetrics: ").append(toIndentedString(evalMetrics)).append("\n"); + sb.append(" scenarioColumns: ").append(toIndentedString(scenarioColumns)).append("\n"); + sb.append(" endedReason: ").append(toIndentedString(endedReason)).append("\n"); + sb.append(" simulatorAgentName: ").append(toIndentedString(simulatorAgentName)).append("\n"); + sb.append(" simulatorAgentId: ").append(toIndentedString(simulatorAgentId)).append("\n"); + sb.append(" agentDefinitionUsedName: ").append(toIndentedString(agentDefinitionUsedName)).append("\n"); + sb.append(" agentDefinitionUsedId: ").append(toIndentedString(agentDefinitionUsedId)).append("\n"); + sb.append(" callSummary: ").append(toIndentedString(callSummary)).append("\n"); + sb.append(" recordings: ").append(toIndentedString(recordings)).append("\n"); + sb.append(" scenarioId: ").append(toIndentedString(scenarioId)).append("\n"); + sb.append(" avgAgentLatency: ").append(toIndentedString(avgAgentLatency)).append("\n"); + sb.append(" avgAgentLatencyMs: ").append(toIndentedString(avgAgentLatencyMs)).append("\n"); + sb.append(" userInterruptionCount: ").append(toIndentedString(userInterruptionCount)).append("\n"); + sb.append(" userInterruptionRate: ").append(toIndentedString(userInterruptionRate)).append("\n"); + sb.append(" userWpm: ").append(toIndentedString(userWpm)).append("\n"); + sb.append(" botWpm: ").append(toIndentedString(botWpm)).append("\n"); + sb.append(" talkRatio: ").append(toIndentedString(talkRatio)).append("\n"); + sb.append(" aiInterruptionCount: ").append(toIndentedString(aiInterruptionCount)).append("\n"); + sb.append(" aiInterruptionRate: ").append(toIndentedString(aiInterruptionRate)).append("\n"); + sb.append(" avgStopTimeAfterInterruption: ").append(toIndentedString(avgStopTimeAfterInterruption)).append("\n"); + sb.append(" totalTokens: ").append(toIndentedString(totalTokens)).append("\n"); + sb.append(" inputTokens: ").append(toIndentedString(inputTokens)).append("\n"); + sb.append(" outputTokens: ").append(toIndentedString(outputTokens)).append("\n"); + sb.append(" avgLatencyMs: ").append(toIndentedString(avgLatencyMs)).append("\n"); + sb.append(" turnCount: ").append(toIndentedString(turnCount)).append("\n"); + sb.append(" agentTalkPercentage: ").append(toIndentedString(agentTalkPercentage)).append("\n"); + sb.append(" csatScore: ").append(toIndentedString(csatScore)).append("\n"); + sb.append(" processingSkipped: ").append(toIndentedString(processingSkipped)).append("\n"); + sb.append(" processingSkipReason: ").append(toIndentedString(processingSkipReason)).append("\n"); + sb.append(" rerunSnapshots: ").append(toIndentedString(rerunSnapshots)).append("\n"); + sb.append(" isSnapshot: ").append(toIndentedString(isSnapshot)).append("\n"); + sb.append(" snapshotTimestamp: ").append(toIndentedString(snapshotTimestamp)).append("\n"); + sb.append(" rerunType: ").append(toIndentedString(rerunType)).append("\n"); + sb.append(" originalCallExecutionId: ").append(toIndentedString(originalCallExecutionId)).append("\n"); + sb.append(" toolOutputs: ").append(toIndentedString(toolOutputs)).append("\n"); + sb.append(" costCents: ").append(toIndentedString(costCents)).append("\n"); + sb.append(" customerCostCents: ").append(toIndentedString(customerCostCents)).append("\n"); + sb.append(" customerCostBreakdown: ").append(toIndentedString(customerCostBreakdown)).append("\n"); + sb.append(" customerLatencyMetrics: ").append(toIndentedString(customerLatencyMetrics)).append("\n"); + sb.append(" customerCallId: ").append(toIndentedString(customerCallId)).append("\n"); + sb.append(" simulationCallType: ").append(toIndentedString(simulationCallType)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `service_provider_call_id` to the URL query string + if (getServiceProviderCallId() != null) { + joiner.add(String.format("%sservice_provider_call_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getServiceProviderCallId())))); + } + + // add `session_id` to the URL query string + if (getSessionId() != null) { + joiner.add(String.format("%ssession_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSessionId())))); + } + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimestamp())))); + } + + // add `call_type` to the URL query string + if (getCallType() != null) { + joiner.add(String.format("%scall_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallType())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `duration` to the URL query string + if (getDuration() != null) { + joiner.add(String.format("%sduration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDuration())))); + } + + // add `duration_seconds` to the URL query string + if (getDurationSeconds() != null) { + joiner.add(String.format("%sduration_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDurationSeconds())))); + } + + // add `start_time` to the URL query string + if (getStartTime() != null) { + joiner.add(String.format("%sstart_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartTime())))); + } + + // add `transcript` to the URL query string + if (getTranscript() != null) { + joiner.add(String.format("%stranscript%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTranscript())))); + } + + // add `scenario` to the URL query string + if (getScenario() != null) { + joiner.add(String.format("%sscenario%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenario())))); + } + + // add `overall_score` to the URL query string + if (getOverallScore() != null) { + joiner.add(String.format("%soverall_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallScore())))); + } + + // add `response_time` to the URL query string + if (getResponseTime() != null) { + joiner.add(String.format("%sresponse_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResponseTime())))); + } + + // add `response_time_ms` to the URL query string + if (getResponseTimeMs() != null) { + joiner.add(String.format("%sresponse_time_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResponseTimeMs())))); + } + + // add `audio_url` to the URL query string + if (getAudioUrl() != null) { + joiner.add(String.format("%saudio_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAudioUrl())))); + } + + // add `customer_name` to the URL query string + if (getCustomerName() != null) { + joiner.add(String.format("%scustomer_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerName())))); + } + + // add `eval_outputs` to the URL query string + if (getEvalOutputs() != null) { + joiner.add(String.format("%seval_outputs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalOutputs())))); + } + + // add `eval_metrics` to the URL query string + if (getEvalMetrics() != null) { + joiner.add(String.format("%seval_metrics%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalMetrics())))); + } + + // add `scenario_columns` to the URL query string + if (getScenarioColumns() != null) { + joiner.add(String.format("%sscenario_columns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioColumns())))); + } + + // add `ended_reason` to the URL query string + if (getEndedReason() != null) { + joiner.add(String.format("%sended_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndedReason())))); + } + + // add `simulator_agent_name` to the URL query string + if (getSimulatorAgentName() != null) { + joiner.add(String.format("%ssimulator_agent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulatorAgentName())))); + } + + // add `simulator_agent_id` to the URL query string + if (getSimulatorAgentId() != null) { + joiner.add(String.format("%ssimulator_agent_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulatorAgentId())))); + } + + // add `agent_definition_used_name` to the URL query string + if (getAgentDefinitionUsedName() != null) { + joiner.add(String.format("%sagent_definition_used_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionUsedName())))); + } + + // add `agent_definition_used_id` to the URL query string + if (getAgentDefinitionUsedId() != null) { + joiner.add(String.format("%sagent_definition_used_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionUsedId())))); + } + + // add `call_summary` to the URL query string + if (getCallSummary() != null) { + joiner.add(String.format("%scall_summary%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallSummary())))); + } + + // add `recordings` to the URL query string + if (getRecordings() != null) { + joiner.add(String.format("%srecordings%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRecordings())))); + } + + // add `scenario_id` to the URL query string + if (getScenarioId() != null) { + joiner.add(String.format("%sscenario_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioId())))); + } + + // add `avg_agent_latency` to the URL query string + if (getAvgAgentLatency() != null) { + joiner.add(String.format("%savg_agent_latency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgAgentLatency())))); + } + + // add `avg_agent_latency_ms` to the URL query string + if (getAvgAgentLatencyMs() != null) { + joiner.add(String.format("%savg_agent_latency_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgAgentLatencyMs())))); + } + + // add `user_interruption_count` to the URL query string + if (getUserInterruptionCount() != null) { + joiner.add(String.format("%suser_interruption_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserInterruptionCount())))); + } + + // add `user_interruption_rate` to the URL query string + if (getUserInterruptionRate() != null) { + joiner.add(String.format("%suser_interruption_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserInterruptionRate())))); + } + + // add `user_wpm` to the URL query string + if (getUserWpm() != null) { + joiner.add(String.format("%suser_wpm%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserWpm())))); + } + + // add `bot_wpm` to the URL query string + if (getBotWpm() != null) { + joiner.add(String.format("%sbot_wpm%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBotWpm())))); + } + + // add `talk_ratio` to the URL query string + if (getTalkRatio() != null) { + joiner.add(String.format("%stalk_ratio%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTalkRatio())))); + } + + // add `ai_interruption_count` to the URL query string + if (getAiInterruptionCount() != null) { + joiner.add(String.format("%sai_interruption_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiInterruptionCount())))); + } + + // add `ai_interruption_rate` to the URL query string + if (getAiInterruptionRate() != null) { + joiner.add(String.format("%sai_interruption_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAiInterruptionRate())))); + } + + // add `avg_stop_time_after_interruption` to the URL query string + if (getAvgStopTimeAfterInterruption() != null) { + joiner.add(String.format("%savg_stop_time_after_interruption%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgStopTimeAfterInterruption())))); + } + + // add `total_tokens` to the URL query string + if (getTotalTokens() != null) { + joiner.add(String.format("%stotal_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTokens())))); + } + + // add `input_tokens` to the URL query string + if (getInputTokens() != null) { + joiner.add(String.format("%sinput_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInputTokens())))); + } + + // add `output_tokens` to the URL query string + if (getOutputTokens() != null) { + joiner.add(String.format("%soutput_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputTokens())))); + } + + // add `avg_latency_ms` to the URL query string + if (getAvgLatencyMs() != null) { + joiner.add(String.format("%savg_latency_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgLatencyMs())))); + } + + // add `turn_count` to the URL query string + if (getTurnCount() != null) { + joiner.add(String.format("%sturn_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTurnCount())))); + } + + // add `agent_talk_percentage` to the URL query string + if (getAgentTalkPercentage() != null) { + joiner.add(String.format("%sagent_talk_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentTalkPercentage())))); + } + + // add `csat_score` to the URL query string + if (getCsatScore() != null) { + joiner.add(String.format("%scsat_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCsatScore())))); + } + + // add `processing_skipped` to the URL query string + if (getProcessingSkipped() != null) { + joiner.add(String.format("%sprocessing_skipped%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProcessingSkipped())))); + } + + // add `processing_skip_reason` to the URL query string + if (getProcessingSkipReason() != null) { + joiner.add(String.format("%sprocessing_skip_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProcessingSkipReason())))); + } + + // add `rerun_snapshots` to the URL query string + if (getRerunSnapshots() != null) { + joiner.add(String.format("%srerun_snapshots%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRerunSnapshots())))); + } + + // add `is_snapshot` to the URL query string + if (getIsSnapshot() != null) { + joiner.add(String.format("%sis_snapshot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsSnapshot())))); + } + + // add `snapshot_timestamp` to the URL query string + if (getSnapshotTimestamp() != null) { + joiner.add(String.format("%ssnapshot_timestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSnapshotTimestamp())))); + } + + // add `rerun_type` to the URL query string + if (getRerunType() != null) { + joiner.add(String.format("%srerun_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRerunType())))); + } + + // add `original_call_execution_id` to the URL query string + if (getOriginalCallExecutionId() != null) { + joiner.add(String.format("%soriginal_call_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOriginalCallExecutionId())))); + } + + // add `tool_outputs` to the URL query string + if (getToolOutputs() != null) { + for (String _key : getToolOutputs().keySet()) { + joiner.add(String.format("%stool_outputs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getToolOutputs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getToolOutputs().get(_key))))); + } + } + + // add `cost_cents` to the URL query string + if (getCostCents() != null) { + joiner.add(String.format("%scost_cents%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCostCents())))); + } + + // add `customer_cost_cents` to the URL query string + if (getCustomerCostCents() != null) { + joiner.add(String.format("%scustomer_cost_cents%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerCostCents())))); + } + + // add `customer_cost_breakdown` to the URL query string + if (getCustomerCostBreakdown() != null) { + for (String _key : getCustomerCostBreakdown().keySet()) { + joiner.add(String.format("%scustomer_cost_breakdown%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCustomerCostBreakdown().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCustomerCostBreakdown().get(_key))))); + } + } + + // add `customer_latency_metrics` to the URL query string + if (getCustomerLatencyMetrics() != null) { + for (String _key : getCustomerLatencyMetrics().keySet()) { + joiner.add(String.format("%scustomer_latency_metrics%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCustomerLatencyMetrics().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCustomerLatencyMetrics().get(_key))))); + } + } + + // add `customer_call_id` to the URL query string + if (getCustomerCallId() != null) { + joiner.add(String.format("%scustomer_call_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerCallId())))); + } + + // add `simulation_call_type` to the URL query string + if (getSimulationCallType() != null) { + joiner.add(String.format("%ssimulation_call_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulationCallType())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `phone_number` to the URL query string + if (getPhoneNumber() != null) { + joiner.add(String.format("%sphone_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPhoneNumber())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorLocalizerTasksResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorLocalizerTasksResponse.java new file mode 100644 index 0000000..dd36945 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorLocalizerTasksResponse.java @@ -0,0 +1,214 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ErrorLocalizerTaskResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecutionErrorLocalizerTasksResponse + */ +@JsonPropertyOrder({ + CallExecutionErrorLocalizerTasksResponse.JSON_PROPERTY_CALL_EXECUTION_ID, + CallExecutionErrorLocalizerTasksResponse.JSON_PROPERTY_ERROR_LOCALIZER_TASKS, + CallExecutionErrorLocalizerTasksResponse.JSON_PROPERTY_TOTAL_TASKS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecutionErrorLocalizerTasksResponse { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nullable + private UUID callExecutionId; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER_TASKS = "error_localizer_tasks"; + @javax.annotation.Nullable + private List errorLocalizerTasks = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_TASKS = "total_tasks"; + @javax.annotation.Nullable + private Integer totalTasks; + + public CallExecutionErrorLocalizerTasksResponse() { + } + + @JsonCreator + public CallExecutionErrorLocalizerTasksResponse( + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) UUID callExecutionId, + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_TASKS) List errorLocalizerTasks, + @JsonProperty(JSON_PROPERTY_TOTAL_TASKS) Integer totalTasks + ) { + this(); + this.callExecutionId = callExecutionId; + this.errorLocalizerTasks = errorLocalizerTasks; + this.totalTasks = totalTasks; + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + + + /** + * Get errorLocalizerTasks + * @return errorLocalizerTasks + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_TASKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getErrorLocalizerTasks() { + return errorLocalizerTasks; + } + + + + + /** + * Get totalTasks + * @return totalTasks + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TASKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalTasks() { + return totalTasks; + } + + + + + /** + * Return true if this CallExecutionErrorLocalizerTasksResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecutionErrorLocalizerTasksResponse callExecutionErrorLocalizerTasksResponse = (CallExecutionErrorLocalizerTasksResponse) o; + return Objects.equals(this.callExecutionId, callExecutionErrorLocalizerTasksResponse.callExecutionId) && + Objects.equals(this.errorLocalizerTasks, callExecutionErrorLocalizerTasksResponse.errorLocalizerTasks) && + Objects.equals(this.totalTasks, callExecutionErrorLocalizerTasksResponse.totalTasks); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, errorLocalizerTasks, totalTasks); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecutionErrorLocalizerTasksResponse {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" errorLocalizerTasks: ").append(toIndentedString(errorLocalizerTasks)).append("\n"); + sb.append(" totalTasks: ").append(toIndentedString(totalTasks)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `error_localizer_tasks` to the URL query string + if (getErrorLocalizerTasks() != null) { + for (int i = 0; i < getErrorLocalizerTasks().size(); i++) { + if (getErrorLocalizerTasks().get(i) != null) { + joiner.add(getErrorLocalizerTasks().get(i).toUrlQueryString(String.format("%serror_localizer_tasks%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_tasks` to the URL query string + if (getTotalTasks() != null) { + joiner.add(String.format("%stotal_tasks%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTasks())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorResponse.java new file mode 100644 index 0000000..6d42dab --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecutionErrorResponse + */ +@JsonPropertyOrder({ + CallExecutionErrorResponse.JSON_PROPERTY_STATUS, + CallExecutionErrorResponse.JSON_PROPERTY_TYPE, + CallExecutionErrorResponse.JSON_PROPERTY_CODE, + CallExecutionErrorResponse.JSON_PROPERTY_DETAIL, + CallExecutionErrorResponse.JSON_PROPERTY_RESULT, + CallExecutionErrorResponse.JSON_PROPERTY_MESSAGE, + CallExecutionErrorResponse.JSON_PROPERTY_ERROR, + CallExecutionErrorResponse.JSON_PROPERTY_ATTR, + CallExecutionErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecutionErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public CallExecutionErrorResponse() { + } + + public CallExecutionErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public CallExecutionErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public CallExecutionErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public CallExecutionErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public CallExecutionErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public CallExecutionErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public CallExecutionErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public CallExecutionErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public CallExecutionErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public CallExecutionErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this CallExecutionErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecutionErrorResponse callExecutionErrorResponse = (CallExecutionErrorResponse) o; + return Objects.equals(this.status, callExecutionErrorResponse.status) && + equalsNullable(this.type, callExecutionErrorResponse.type) && + equalsNullable(this.code, callExecutionErrorResponse.code) && + equalsNullable(this.detail, callExecutionErrorResponse.detail) && + equalsNullable(this.result, callExecutionErrorResponse.result) && + equalsNullable(this.message, callExecutionErrorResponse.message) && + equalsNullable(this.error, callExecutionErrorResponse.error) && + equalsNullable(this.attr, callExecutionErrorResponse.attr) && + Objects.equals(this.details, callExecutionErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecutionErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionLogsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionLogsResponse.java new file mode 100644 index 0000000..236fd00 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionLogsResponse.java @@ -0,0 +1,213 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CallLogEntryResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecutionLogsResponse + */ +@JsonPropertyOrder({ + CallExecutionLogsResponse.JSON_PROPERTY_RESULTS, + CallExecutionLogsResponse.JSON_PROPERTY_SOURCE, + CallExecutionLogsResponse.JSON_PROPERTY_INGESTION_PENDING +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecutionLogsResponse { + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source; + + public static final String JSON_PROPERTY_INGESTION_PENDING = "ingestion_pending"; + @javax.annotation.Nullable + private Boolean ingestionPending; + + public CallExecutionLogsResponse() { + } + + @JsonCreator + public CallExecutionLogsResponse( + @JsonProperty(JSON_PROPERTY_RESULTS) List results, + @JsonProperty(JSON_PROPERTY_SOURCE) String source, + @JsonProperty(JSON_PROPERTY_INGESTION_PENDING) Boolean ingestionPending + ) { + this(); + this.results = results; + this.source = source; + this.ingestionPending = ingestionPending; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + + + /** + * Get ingestionPending + * @return ingestionPending + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTION_PENDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIngestionPending() { + return ingestionPending; + } + + + + + /** + * Return true if this CallExecutionLogsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecutionLogsResponse callExecutionLogsResponse = (CallExecutionLogsResponse) o; + return Objects.equals(this.results, callExecutionLogsResponse.results) && + Objects.equals(this.source, callExecutionLogsResponse.source) && + Objects.equals(this.ingestionPending, callExecutionLogsResponse.ingestionPending); + } + + @Override + public int hashCode() { + return Objects.hash(results, source, ingestionPending); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecutionLogsResponse {\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" ingestionPending: ").append(toIndentedString(ingestionPending)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `ingestion_pending` to the URL query string + if (getIngestionPending() != null) { + joiner.add(String.format("%singestion_pending%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIngestionPending())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionRerun.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionRerun.java new file mode 100644 index 0000000..d1ac908 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionRerun.java @@ -0,0 +1,275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecutionRerun + */ +@JsonPropertyOrder({ + CallExecutionRerun.JSON_PROPERTY_RERUN_TYPE, + CallExecutionRerun.JSON_PROPERTY_CALL_EXECUTION_IDS, + CallExecutionRerun.JSON_PROPERTY_SELECT_ALL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecutionRerun { + /** + * Type of rerun: evaluation only or call plus evaluation + */ + public enum RerunTypeEnum { + EVAL_ONLY(String.valueOf("eval_only")), + + CALL_AND_EVAL(String.valueOf("call_and_eval")); + + private String value; + + RerunTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RerunTypeEnum fromValue(String value) { + for (RerunTypeEnum b : RerunTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RERUN_TYPE = "rerun_type"; + @javax.annotation.Nonnull + private RerunTypeEnum rerunType; + + public static final String JSON_PROPERTY_CALL_EXECUTION_IDS = "call_execution_ids"; + @javax.annotation.Nullable + private List callExecutionIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECT_ALL = "select_all"; + @javax.annotation.Nullable + private Boolean selectAll = false; + + public CallExecutionRerun() { + } + + public CallExecutionRerun rerunType(@javax.annotation.Nonnull RerunTypeEnum rerunType) { + this.rerunType = rerunType; + return this; + } + + /** + * Type of rerun: evaluation only or call plus evaluation + * @return rerunType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RerunTypeEnum getRerunType() { + return rerunType; + } + + + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRerunType(@javax.annotation.Nonnull RerunTypeEnum rerunType) { + this.rerunType = rerunType; + } + + + public CallExecutionRerun callExecutionIds(@javax.annotation.Nullable List callExecutionIds) { + this.callExecutionIds = callExecutionIds; + return this; + } + + public CallExecutionRerun addCallExecutionIdsItem(UUID callExecutionIdsItem) { + if (this.callExecutionIds == null) { + this.callExecutionIds = new ArrayList<>(); + } + this.callExecutionIds.add(callExecutionIdsItem); + return this; + } + + /** + * List of specific call execution IDs to rerun + * @return callExecutionIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCallExecutionIds() { + return callExecutionIds; + } + + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallExecutionIds(@javax.annotation.Nullable List callExecutionIds) { + this.callExecutionIds = callExecutionIds; + } + + + public CallExecutionRerun selectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + return this; + } + + /** + * Whether to rerun all call executions in the test execution + * @return selectAll + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectAll() { + return selectAll; + } + + + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + } + + + /** + * Return true if this CallExecutionRerun object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecutionRerun callExecutionRerun = (CallExecutionRerun) o; + return Objects.equals(this.rerunType, callExecutionRerun.rerunType) && + Objects.equals(this.callExecutionIds, callExecutionRerun.callExecutionIds) && + Objects.equals(this.selectAll, callExecutionRerun.selectAll); + } + + @Override + public int hashCode() { + return Objects.hash(rerunType, callExecutionIds, selectAll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecutionRerun {\n"); + sb.append(" rerunType: ").append(toIndentedString(rerunType)).append("\n"); + sb.append(" callExecutionIds: ").append(toIndentedString(callExecutionIds)).append("\n"); + sb.append(" selectAll: ").append(toIndentedString(selectAll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rerun_type` to the URL query string + if (getRerunType() != null) { + joiner.add(String.format("%srerun_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRerunType())))); + } + + // add `call_execution_ids` to the URL query string + if (getCallExecutionIds() != null) { + for (int i = 0; i < getCallExecutionIds().size(); i++) { + if (getCallExecutionIds().get(i) != null) { + joiner.add(String.format("%scall_execution_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionIds().get(i))))); + } + } + } + + // add `select_all` to the URL query string + if (getSelectAll() != null) { + joiner.add(String.format("%sselect_all%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectAll())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionStatusUpdate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionStatusUpdate.java new file mode 100644 index 0000000..2d9f279 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallExecutionStatusUpdate.java @@ -0,0 +1,254 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallExecutionStatusUpdate + */ +@JsonPropertyOrder({ + CallExecutionStatusUpdate.JSON_PROPERTY_STATUS, + CallExecutionStatusUpdate.JSON_PROPERTY_ENDED_REASON +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallExecutionStatusUpdate { + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING(String.valueOf("pending")), + + QUEUED(String.valueOf("queued")), + + ONGOING(String.valueOf("ongoing")), + + COMPLETED(String.valueOf("completed")), + + FAILED(String.valueOf("failed")), + + ANALYZING(String.valueOf("analyzing")), + + CANCELLED(String.valueOf("cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private StatusEnum status; + + public static final String JSON_PROPERTY_ENDED_REASON = "ended_reason"; + private JsonNullable endedReason = JsonNullable.undefined(); + + public CallExecutionStatusUpdate() { + } + + public CallExecutionStatusUpdate status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + + public CallExecutionStatusUpdate endedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + return this; + } + + /** + * Get endedReason + * @return endedReason + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEndedReason() { + return endedReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEndedReason_JsonNullable() { + return endedReason; + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + public void setEndedReason_JsonNullable(JsonNullable endedReason) { + this.endedReason = endedReason; + } + + public void setEndedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + } + + + /** + * Return true if this CallExecutionStatusUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallExecutionStatusUpdate callExecutionStatusUpdate = (CallExecutionStatusUpdate) o; + return Objects.equals(this.status, callExecutionStatusUpdate.status) && + equalsNullable(this.endedReason, callExecutionStatusUpdate.endedReason); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(endedReason)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallExecutionStatusUpdate {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" endedReason: ").append(toIndentedString(endedReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `ended_reason` to the URL query string + if (getEndedReason() != null) { + joiner.add(String.format("%sended_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndedReason())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallLogEntryResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallLogEntryResponse.java new file mode 100644 index 0000000..6f6d359 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallLogEntryResponse.java @@ -0,0 +1,435 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallLogEntryResponse + */ +@JsonPropertyOrder({ + CallLogEntryResponse.JSON_PROPERTY_ID, + CallLogEntryResponse.JSON_PROPERTY_LOGGED_AT, + CallLogEntryResponse.JSON_PROPERTY_LEVEL, + CallLogEntryResponse.JSON_PROPERTY_SEVERITY_TEXT, + CallLogEntryResponse.JSON_PROPERTY_CATEGORY, + CallLogEntryResponse.JSON_PROPERTY_BODY, + CallLogEntryResponse.JSON_PROPERTY_ATTRIBUTES, + CallLogEntryResponse.JSON_PROPERTY_PAYLOAD +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallLogEntryResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private String id; + + public static final String JSON_PROPERTY_LOGGED_AT = "logged_at"; + private JsonNullable loggedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LEVEL = "level"; + private JsonNullable level = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SEVERITY_TEXT = "severity_text"; + private JsonNullable severityText = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private JsonNullable category = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BODY = "body"; + private JsonNullable body = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + @javax.annotation.Nullable + private Map attributes = new HashMap<>(); + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + @javax.annotation.Nullable + private Map payload = new HashMap<>(); + + public CallLogEntryResponse() { + } + + @JsonCreator + public CallLogEntryResponse( + @JsonProperty(JSON_PROPERTY_ID) String id, + @JsonProperty(JSON_PROPERTY_LOGGED_AT) String loggedAt, + @JsonProperty(JSON_PROPERTY_LEVEL) String level, + @JsonProperty(JSON_PROPERTY_SEVERITY_TEXT) String severityText, + @JsonProperty(JSON_PROPERTY_CATEGORY) String category, + @JsonProperty(JSON_PROPERTY_BODY) String body, + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) Map attributes, + @JsonProperty(JSON_PROPERTY_PAYLOAD) Map payload + ) { + this(); + this.id = id; + this.loggedAt = loggedAt == null ? JsonNullable.undefined() : JsonNullable.of(loggedAt); + this.level = level == null ? JsonNullable.undefined() : JsonNullable.of(level); + this.severityText = severityText == null ? JsonNullable.undefined() : JsonNullable.of(severityText); + this.category = category == null ? JsonNullable.undefined() : JsonNullable.of(category); + this.body = body == null ? JsonNullable.undefined() : JsonNullable.of(body); + this.attributes = attributes; + this.payload = payload; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + + + + /** + * Get loggedAt + * @return loggedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLoggedAt() { + + if (loggedAt == null) { + loggedAt = JsonNullable.undefined(); + } + return loggedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LOGGED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLoggedAt_JsonNullable() { + return loggedAt; + } + + @JsonProperty(JSON_PROPERTY_LOGGED_AT) + private void setLoggedAt_JsonNullable(JsonNullable loggedAt) { + this.loggedAt = loggedAt; + } + + + + /** + * Get level + * @return level + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLevel() { + + if (level == null) { + level = JsonNullable.undefined(); + } + return level.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLevel_JsonNullable() { + return level; + } + + @JsonProperty(JSON_PROPERTY_LEVEL) + private void setLevel_JsonNullable(JsonNullable level) { + this.level = level; + } + + + + /** + * Get severityText + * @return severityText + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSeverityText() { + + if (severityText == null) { + severityText = JsonNullable.undefined(); + } + return severityText.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SEVERITY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSeverityText_JsonNullable() { + return severityText; + } + + @JsonProperty(JSON_PROPERTY_SEVERITY_TEXT) + private void setSeverityText_JsonNullable(JsonNullable severityText) { + this.severityText = severityText; + } + + + + /** + * Get category + * @return category + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCategory() { + + if (category == null) { + category = JsonNullable.undefined(); + } + return category.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCategory_JsonNullable() { + return category; + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + private void setCategory_JsonNullable(JsonNullable category) { + this.category = category; + } + + + + /** + * Get body + * @return body + */ + @javax.annotation.Nullable + @JsonIgnore + public String getBody() { + + if (body == null) { + body = JsonNullable.undefined(); + } + return body.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BODY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBody_JsonNullable() { + return body; + } + + @JsonProperty(JSON_PROPERTY_BODY) + private void setBody_JsonNullable(JsonNullable body) { + this.body = body; + } + + + + /** + * Get attributes + * @return attributes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAttributes() { + return attributes; + } + + + + + /** + * Get payload + * @return payload + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPayload() { + return payload; + } + + + + + /** + * Return true if this CallLogEntryResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallLogEntryResponse callLogEntryResponse = (CallLogEntryResponse) o; + return Objects.equals(this.id, callLogEntryResponse.id) && + equalsNullable(this.loggedAt, callLogEntryResponse.loggedAt) && + equalsNullable(this.level, callLogEntryResponse.level) && + equalsNullable(this.severityText, callLogEntryResponse.severityText) && + equalsNullable(this.category, callLogEntryResponse.category) && + equalsNullable(this.body, callLogEntryResponse.body) && + Objects.equals(this.attributes, callLogEntryResponse.attributes) && + Objects.equals(this.payload, callLogEntryResponse.payload); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(loggedAt), hashCodeNullable(level), hashCodeNullable(severityText), hashCodeNullable(category), hashCodeNullable(body), attributes, payload); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallLogEntryResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" loggedAt: ").append(toIndentedString(loggedAt)).append("\n"); + sb.append(" level: ").append(toIndentedString(level)).append("\n"); + sb.append(" severityText: ").append(toIndentedString(severityText)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `logged_at` to the URL query string + if (getLoggedAt() != null) { + joiner.add(String.format("%slogged_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLoggedAt())))); + } + + // add `level` to the URL query string + if (getLevel() != null) { + joiner.add(String.format("%slevel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLevel())))); + } + + // add `severity_text` to the URL query string + if (getSeverityText() != null) { + joiner.add(String.format("%sseverity_text%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSeverityText())))); + } + + // add `category` to the URL query string + if (getCategory() != null) { + joiner.add(String.format("%scategory%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCategory())))); + } + + // add `body` to the URL query string + if (getBody() != null) { + joiner.add(String.format("%sbody%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBody())))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format("%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `payload` to the URL query string + if (getPayload() != null) { + for (String _key : getPayload().keySet()) { + joiner.add(String.format("%spayload%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getPayload().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getPayload().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscript.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscript.java new file mode 100644 index 0000000..f7dfb2c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscript.java @@ -0,0 +1,463 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallTranscript + */ +@JsonPropertyOrder({ + CallTranscript.JSON_PROPERTY_ID, + CallTranscript.JSON_PROPERTY_SPEAKER_ROLE, + CallTranscript.JSON_PROPERTY_CONTENT, + CallTranscript.JSON_PROPERTY_START_TIME_MS, + CallTranscript.JSON_PROPERTY_START_TIME_SECONDS, + CallTranscript.JSON_PROPERTY_END_TIME_MS, + CallTranscript.JSON_PROPERTY_END_TIME_SECONDS, + CallTranscript.JSON_PROPERTY_CONFIDENCE_SCORE, + CallTranscript.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallTranscript { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + /** + * Role of the speaker (user or assistant) + */ + public enum SpeakerRoleEnum { + USER(String.valueOf("user")), + + ASSISTANT(String.valueOf("assistant")), + + SYSTEM(String.valueOf("system")), + + TOOL_CALLS(String.valueOf("tool_calls")), + + TOOL_CALL_RESULT(String.valueOf("tool_call_result")), + + UNKNOWN(String.valueOf("unknown")); + + private String value; + + SpeakerRoleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SpeakerRoleEnum fromValue(String value) { + for (SpeakerRoleEnum b : SpeakerRoleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SPEAKER_ROLE = "speaker_role"; + @javax.annotation.Nullable + private SpeakerRoleEnum speakerRole; + + public static final String JSON_PROPERTY_CONTENT = "content"; + @javax.annotation.Nonnull + private String content; + + public static final String JSON_PROPERTY_START_TIME_MS = "start_time_ms"; + @javax.annotation.Nullable + private Integer startTimeMs; + + public static final String JSON_PROPERTY_START_TIME_SECONDS = "start_time_seconds"; + @javax.annotation.Nullable + private String startTimeSeconds; + + public static final String JSON_PROPERTY_END_TIME_MS = "end_time_ms"; + @javax.annotation.Nullable + private Integer endTimeMs; + + public static final String JSON_PROPERTY_END_TIME_SECONDS = "end_time_seconds"; + @javax.annotation.Nullable + private String endTimeSeconds; + + public static final String JSON_PROPERTY_CONFIDENCE_SCORE = "confidence_score"; + @javax.annotation.Nullable + private BigDecimal confidenceScore; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public CallTranscript() { + } + + @JsonCreator + public CallTranscript( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_START_TIME_SECONDS) String startTimeSeconds, + @JsonProperty(JSON_PROPERTY_END_TIME_SECONDS) String endTimeSeconds, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.startTimeSeconds = startTimeSeconds; + this.endTimeSeconds = endTimeSeconds; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public CallTranscript speakerRole(@javax.annotation.Nullable SpeakerRoleEnum speakerRole) { + this.speakerRole = speakerRole; + return this; + } + + /** + * Role of the speaker (user or assistant) + * @return speakerRole + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPEAKER_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SpeakerRoleEnum getSpeakerRole() { + return speakerRole; + } + + + @JsonProperty(JSON_PROPERTY_SPEAKER_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSpeakerRole(@javax.annotation.Nullable SpeakerRoleEnum speakerRole) { + this.speakerRole = speakerRole; + } + + + public CallTranscript content(@javax.annotation.Nonnull String content) { + this.content = content; + return this; + } + + /** + * Transcript content + * @return content + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContent(@javax.annotation.Nonnull String content) { + this.content = content; + } + + + public CallTranscript startTimeMs(@javax.annotation.Nullable Integer startTimeMs) { + this.startTimeMs = startTimeMs; + return this; + } + + /** + * Start time of this transcript segment in milliseconds + * minimum: 9223372036854775616 + * maximum: -9223372036854775616 + * @return startTimeMs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_TIME_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStartTimeMs() { + return startTimeMs; + } + + + @JsonProperty(JSON_PROPERTY_START_TIME_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStartTimeMs(@javax.annotation.Nullable Integer startTimeMs) { + this.startTimeMs = startTimeMs; + } + + + /** + * Get startTimeSeconds + * @return startTimeSeconds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStartTimeSeconds() { + return startTimeSeconds; + } + + + + + public CallTranscript endTimeMs(@javax.annotation.Nullable Integer endTimeMs) { + this.endTimeMs = endTimeMs; + return this; + } + + /** + * End time of this transcript segment in milliseconds + * minimum: 9223372036854775616 + * maximum: -9223372036854775616 + * @return endTimeMs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_TIME_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getEndTimeMs() { + return endTimeMs; + } + + + @JsonProperty(JSON_PROPERTY_END_TIME_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEndTimeMs(@javax.annotation.Nullable Integer endTimeMs) { + this.endTimeMs = endTimeMs; + } + + + /** + * Get endTimeSeconds + * @return endTimeSeconds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_TIME_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEndTimeSeconds() { + return endTimeSeconds; + } + + + + + public CallTranscript confidenceScore(@javax.annotation.Nullable BigDecimal confidenceScore) { + this.confidenceScore = confidenceScore; + return this; + } + + /** + * Confidence score for this transcript segment + * @return confidenceScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIDENCE_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getConfidenceScore() { + return confidenceScore; + } + + + @JsonProperty(JSON_PROPERTY_CONFIDENCE_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfidenceScore(@javax.annotation.Nullable BigDecimal confidenceScore) { + this.confidenceScore = confidenceScore; + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this CallTranscript object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallTranscript callTranscript = (CallTranscript) o; + return Objects.equals(this.id, callTranscript.id) && + Objects.equals(this.speakerRole, callTranscript.speakerRole) && + Objects.equals(this.content, callTranscript.content) && + Objects.equals(this.startTimeMs, callTranscript.startTimeMs) && + Objects.equals(this.startTimeSeconds, callTranscript.startTimeSeconds) && + Objects.equals(this.endTimeMs, callTranscript.endTimeMs) && + Objects.equals(this.endTimeSeconds, callTranscript.endTimeSeconds) && + Objects.equals(this.confidenceScore, callTranscript.confidenceScore) && + Objects.equals(this.createdAt, callTranscript.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, speakerRole, content, startTimeMs, startTimeSeconds, endTimeMs, endTimeSeconds, confidenceScore, createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallTranscript {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" speakerRole: ").append(toIndentedString(speakerRole)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" startTimeMs: ").append(toIndentedString(startTimeMs)).append("\n"); + sb.append(" startTimeSeconds: ").append(toIndentedString(startTimeSeconds)).append("\n"); + sb.append(" endTimeMs: ").append(toIndentedString(endTimeMs)).append("\n"); + sb.append(" endTimeSeconds: ").append(toIndentedString(endTimeSeconds)).append("\n"); + sb.append(" confidenceScore: ").append(toIndentedString(confidenceScore)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `speaker_role` to the URL query string + if (getSpeakerRole() != null) { + joiner.add(String.format("%sspeaker_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSpeakerRole())))); + } + + // add `content` to the URL query string + if (getContent() != null) { + joiner.add(String.format("%scontent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContent())))); + } + + // add `start_time_ms` to the URL query string + if (getStartTimeMs() != null) { + joiner.add(String.format("%sstart_time_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartTimeMs())))); + } + + // add `start_time_seconds` to the URL query string + if (getStartTimeSeconds() != null) { + joiner.add(String.format("%sstart_time_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartTimeSeconds())))); + } + + // add `end_time_ms` to the URL query string + if (getEndTimeMs() != null) { + joiner.add(String.format("%send_time_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndTimeMs())))); + } + + // add `end_time_seconds` to the URL query string + if (getEndTimeSeconds() != null) { + joiner.add(String.format("%send_time_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndTimeSeconds())))); + } + + // add `confidence_score` to the URL query string + if (getConfidenceScore() != null) { + joiner.add(String.format("%sconfidence_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfidenceScore())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscriptResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscriptResponse.java new file mode 100644 index 0000000..785dea5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CallTranscriptResponse.java @@ -0,0 +1,298 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CallTranscript; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CallTranscriptResponse + */ +@JsonPropertyOrder({ + CallTranscriptResponse.JSON_PROPERTY_CALL_EXECUTION_ID, + CallTranscriptResponse.JSON_PROPERTY_PHONE_NUMBER, + CallTranscriptResponse.JSON_PROPERTY_STATUS, + CallTranscriptResponse.JSON_PROPERTY_TRANSCRIPTS, + CallTranscriptResponse.JSON_PROPERTY_TOTAL_TRANSCRIPTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CallTranscriptResponse { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nullable + private UUID callExecutionId; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phone_number"; + private JsonNullable phoneNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_TRANSCRIPTS = "transcripts"; + @javax.annotation.Nullable + private List transcripts = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_TRANSCRIPTS = "total_transcripts"; + @javax.annotation.Nullable + private Integer totalTranscripts; + + public CallTranscriptResponse() { + } + + @JsonCreator + public CallTranscriptResponse( + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) UUID callExecutionId, + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) String phoneNumber, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_TRANSCRIPTS) List transcripts, + @JsonProperty(JSON_PROPERTY_TOTAL_TRANSCRIPTS) Integer totalTranscripts + ) { + this(); + this.callExecutionId = callExecutionId; + this.phoneNumber = phoneNumber == null ? JsonNullable.undefined() : JsonNullable.of(phoneNumber); + this.status = status; + this.transcripts = transcripts; + this.totalTranscripts = totalTranscripts; + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + + + /** + * Get phoneNumber + * @return phoneNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPhoneNumber() { + + if (phoneNumber == null) { + phoneNumber = JsonNullable.undefined(); + } + return phoneNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPhoneNumber_JsonNullable() { + return phoneNumber; + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + private void setPhoneNumber_JsonNullable(JsonNullable phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + /** + * Get transcripts + * @return transcripts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSCRIPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTranscripts() { + return transcripts; + } + + + + + /** + * Get totalTranscripts + * @return totalTranscripts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TRANSCRIPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalTranscripts() { + return totalTranscripts; + } + + + + + /** + * Return true if this CallTranscriptResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallTranscriptResponse callTranscriptResponse = (CallTranscriptResponse) o; + return Objects.equals(this.callExecutionId, callTranscriptResponse.callExecutionId) && + equalsNullable(this.phoneNumber, callTranscriptResponse.phoneNumber) && + Objects.equals(this.status, callTranscriptResponse.status) && + Objects.equals(this.transcripts, callTranscriptResponse.transcripts) && + Objects.equals(this.totalTranscripts, callTranscriptResponse.totalTranscripts); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, hashCodeNullable(phoneNumber), status, transcripts, totalTranscripts); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallTranscriptResponse {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" transcripts: ").append(toIndentedString(transcripts)).append("\n"); + sb.append(" totalTranscripts: ").append(toIndentedString(totalTranscripts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `phone_number` to the URL query string + if (getPhoneNumber() != null) { + joiner.add(String.format("%sphone_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPhoneNumber())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `transcripts` to the URL query string + if (getTranscripts() != null) { + for (int i = 0; i < getTranscripts().size(); i++) { + if (getTranscripts().get(i) != null) { + joiner.add(getTranscripts().get(i).toUrlQueryString(String.format("%stranscripts%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_transcripts` to the URL query string + if (getTotalTranscripts() != null) { + joiner.add(String.format("%stotal_transcripts%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTranscripts())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CancelTestExecutionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CancelTestExecutionResponse.java new file mode 100644 index 0000000..b2bfd93 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CancelTestExecutionResponse.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CancelTestExecutionResponse + */ +@JsonPropertyOrder({ + CancelTestExecutionResponse.JSON_PROPERTY_SUCCESS, + CancelTestExecutionResponse.JSON_PROPERTY_MESSAGE, + CancelTestExecutionResponse.JSON_PROPERTY_TEST_EXECUTION_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CancelTestExecutionResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + @javax.annotation.Nonnull + private Boolean success; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_TEST_EXECUTION_ID = "test_execution_id"; + @javax.annotation.Nullable + private UUID testExecutionId; + + public CancelTestExecutionResponse() { + } + + public CancelTestExecutionResponse success(@javax.annotation.Nonnull Boolean success) { + this.success = success; + return this; + } + + /** + * Get success + * @return success + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(@javax.annotation.Nonnull Boolean success) { + this.success = success; + } + + + public CancelTestExecutionResponse message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public CancelTestExecutionResponse testExecutionId(@javax.annotation.Nullable UUID testExecutionId) { + this.testExecutionId = testExecutionId; + return this; + } + + /** + * Get testExecutionId + * @return testExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTestExecutionId() { + return testExecutionId; + } + + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTestExecutionId(@javax.annotation.Nullable UUID testExecutionId) { + this.testExecutionId = testExecutionId; + } + + + /** + * Return true if this CancelTestExecutionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CancelTestExecutionResponse cancelTestExecutionResponse = (CancelTestExecutionResponse) o; + return Objects.equals(this.success, cancelTestExecutionResponse.success) && + Objects.equals(this.message, cancelTestExecutionResponse.message) && + Objects.equals(this.testExecutionId, cancelTestExecutionResponse.testExecutionId); + } + + @Override + public int hashCode() { + return Objects.hash(success, message, testExecutionId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CancelTestExecutionResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" testExecutionId: ").append(toIndentedString(testExecutionId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `success` to the URL query string + if (getSuccess() != null) { + joiner.add(String.format("%ssuccess%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccess())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `test_execution_id` to the URL query string + if (getTestExecutionId() != null) { + joiner.add(String.format("%stest_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatMessageContract.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatMessageContract.java new file mode 100644 index 0000000..44d5ff1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatMessageContract.java @@ -0,0 +1,445 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ChatToolCall; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ChatMessageContract + */ +@JsonPropertyOrder({ + ChatMessageContract.JSON_PROPERTY_ROLE, + ChatMessageContract.JSON_PROPERTY_CONTENT, + ChatMessageContract.JSON_PROPERTY_TOOL_CALL_ID, + ChatMessageContract.JSON_PROPERTY_NAME, + ChatMessageContract.JSON_PROPERTY_METADATA, + ChatMessageContract.JSON_PROPERTY_TOOL_CALLS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChatMessageContract { + /** + * Gets or Sets role + */ + public enum RoleEnum { + USER(String.valueOf("user")), + + ASSISTANT(String.valueOf("assistant")), + + TOOL(String.valueOf("tool")); + + private String value; + + RoleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RoleEnum fromValue(String value) { + for (RoleEnum b : RoleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ROLE = "role"; + @javax.annotation.Nonnull + private RoleEnum role; + + public static final String JSON_PROPERTY_CONTENT = "content"; + private JsonNullable content = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOOL_CALL_ID = "tool_call_id"; + private JsonNullable toolCallId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_TOOL_CALLS = "tool_calls"; + private JsonNullable> toolCalls = JsonNullable.>undefined(); + + public ChatMessageContract() { + } + + public ChatMessageContract role(@javax.annotation.Nonnull RoleEnum role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RoleEnum getRole() { + return role; + } + + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRole(@javax.annotation.Nonnull RoleEnum role) { + this.role = role; + } + + + public ChatMessageContract content(@javax.annotation.Nullable String content) { + this.content = JsonNullable.of(content); + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nullable + @JsonIgnore + public String getContent() { + return content.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getContent_JsonNullable() { + return content; + } + + @JsonProperty(JSON_PROPERTY_CONTENT) + public void setContent_JsonNullable(JsonNullable content) { + this.content = content; + } + + public void setContent(@javax.annotation.Nullable String content) { + this.content = JsonNullable.of(content); + } + + + public ChatMessageContract toolCallId(@javax.annotation.Nullable String toolCallId) { + this.toolCallId = JsonNullable.of(toolCallId); + return this; + } + + /** + * Get toolCallId + * @return toolCallId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getToolCallId() { + return toolCallId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOOL_CALL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getToolCallId_JsonNullable() { + return toolCallId; + } + + @JsonProperty(JSON_PROPERTY_TOOL_CALL_ID) + public void setToolCallId_JsonNullable(JsonNullable toolCallId) { + this.toolCallId = toolCallId; + } + + public void setToolCallId(@javax.annotation.Nullable String toolCallId) { + this.toolCallId = JsonNullable.of(toolCallId); + } + + + public ChatMessageContract name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public ChatMessageContract metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public ChatMessageContract putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public ChatMessageContract toolCalls(@javax.annotation.Nullable List toolCalls) { + this.toolCalls = JsonNullable.>of(toolCalls); + return this; + } + + public ChatMessageContract addToolCallsItem(ChatToolCall toolCallsItem) { + if (this.toolCalls == null || !this.toolCalls.isPresent()) { + this.toolCalls = JsonNullable.>of(new ArrayList<>()); + } + try { + this.toolCalls.get().add(toolCallsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get toolCalls + * @return toolCalls + */ + @javax.annotation.Nullable + @JsonIgnore + public List getToolCalls() { + return toolCalls.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOOL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getToolCalls_JsonNullable() { + return toolCalls; + } + + @JsonProperty(JSON_PROPERTY_TOOL_CALLS) + public void setToolCalls_JsonNullable(JsonNullable> toolCalls) { + this.toolCalls = toolCalls; + } + + public void setToolCalls(@javax.annotation.Nullable List toolCalls) { + this.toolCalls = JsonNullable.>of(toolCalls); + } + + + /** + * Return true if this ChatMessageContract object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatMessageContract chatMessageContract = (ChatMessageContract) o; + return Objects.equals(this.role, chatMessageContract.role) && + equalsNullable(this.content, chatMessageContract.content) && + equalsNullable(this.toolCallId, chatMessageContract.toolCallId) && + equalsNullable(this.name, chatMessageContract.name) && + Objects.equals(this.metadata, chatMessageContract.metadata) && + equalsNullable(this.toolCalls, chatMessageContract.toolCalls); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(role, hashCodeNullable(content), hashCodeNullable(toolCallId), hashCodeNullable(name), metadata, hashCodeNullable(toolCalls)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatMessageContract {\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" toolCallId: ").append(toIndentedString(toolCallId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" toolCalls: ").append(toIndentedString(toolCalls)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `role` to the URL query string + if (getRole() != null) { + joiner.add(String.format("%srole%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRole())))); + } + + // add `content` to the URL query string + if (getContent() != null) { + joiner.add(String.format("%scontent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContent())))); + } + + // add `tool_call_id` to the URL query string + if (getToolCallId() != null) { + joiner.add(String.format("%stool_call_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getToolCallId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `tool_calls` to the URL query string + if (getToolCalls() != null) { + for (int i = 0; i < getToolCalls().size(); i++) { + if (getToolCalls().get(i) != null) { + joiner.add(getToolCalls().get(i).toUrlQueryString(String.format("%stool_calls%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResponse.java new file mode 100644 index 0000000..c2c4f53 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ChatSDKCodeResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ChatSDKCodeResponse + */ +@JsonPropertyOrder({ + ChatSDKCodeResponse.JSON_PROPERTY_STATUS, + ChatSDKCodeResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChatSDKCodeResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ChatSDKCodeResult result; + + public ChatSDKCodeResponse() { + } + + public ChatSDKCodeResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ChatSDKCodeResponse result(@javax.annotation.Nonnull ChatSDKCodeResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatSDKCodeResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ChatSDKCodeResult result) { + this.result = result; + } + + + /** + * Return true if this ChatSDKCodeResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatSDKCodeResponse chatSDKCodeResponse = (ChatSDKCodeResponse) o; + return Objects.equals(this.status, chatSDKCodeResponse.status) && + Objects.equals(this.result, chatSDKCodeResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatSDKCodeResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResult.java new file mode 100644 index 0000000..acce539 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSDKCodeResult.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ChatSDKCodeResult + */ +@JsonPropertyOrder({ + ChatSDKCodeResult.JSON_PROPERTY_INSTALLATION_GUIDE, + ChatSDKCodeResult.JSON_PROPERTY_SDK_CODE, + ChatSDKCodeResult.JSON_PROPERTY_RUN_TEST_ID, + ChatSDKCodeResult.JSON_PROPERTY_RUN_TEST_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChatSDKCodeResult { + public static final String JSON_PROPERTY_INSTALLATION_GUIDE = "installation_guide"; + @javax.annotation.Nonnull + private String installationGuide; + + public static final String JSON_PROPERTY_SDK_CODE = "sdk_code"; + @javax.annotation.Nonnull + private String sdkCode; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nonnull + private UUID runTestId; + + public static final String JSON_PROPERTY_RUN_TEST_NAME = "run_test_name"; + @javax.annotation.Nonnull + private String runTestName; + + public ChatSDKCodeResult() { + } + + public ChatSDKCodeResult installationGuide(@javax.annotation.Nonnull String installationGuide) { + this.installationGuide = installationGuide; + return this; + } + + /** + * Get installationGuide + * @return installationGuide + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTALLATION_GUIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInstallationGuide() { + return installationGuide; + } + + + @JsonProperty(JSON_PROPERTY_INSTALLATION_GUIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstallationGuide(@javax.annotation.Nonnull String installationGuide) { + this.installationGuide = installationGuide; + } + + + public ChatSDKCodeResult sdkCode(@javax.annotation.Nonnull String sdkCode) { + this.sdkCode = sdkCode; + return this; + } + + /** + * Get sdkCode + * @return sdkCode + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SDK_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSdkCode() { + return sdkCode; + } + + + @JsonProperty(JSON_PROPERTY_SDK_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSdkCode(@javax.annotation.Nonnull String sdkCode) { + this.sdkCode = sdkCode; + } + + + public ChatSDKCodeResult runTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + return this; + } + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRunTestId() { + return runTestId; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + } + + + public ChatSDKCodeResult runTestName(@javax.annotation.Nonnull String runTestName) { + this.runTestName = runTestName; + return this; + } + + /** + * Get runTestName + * @return runTestName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunTestName() { + return runTestName; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestName(@javax.annotation.Nonnull String runTestName) { + this.runTestName = runTestName; + } + + + /** + * Return true if this ChatSDKCodeResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatSDKCodeResult chatSDKCodeResult = (ChatSDKCodeResult) o; + return Objects.equals(this.installationGuide, chatSDKCodeResult.installationGuide) && + Objects.equals(this.sdkCode, chatSDKCodeResult.sdkCode) && + Objects.equals(this.runTestId, chatSDKCodeResult.runTestId) && + Objects.equals(this.runTestName, chatSDKCodeResult.runTestName); + } + + @Override + public int hashCode() { + return Objects.hash(installationGuide, sdkCode, runTestId, runTestName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatSDKCodeResult {\n"); + sb.append(" installationGuide: ").append(toIndentedString(installationGuide)).append("\n"); + sb.append(" sdkCode: ").append(toIndentedString(sdkCode)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" runTestName: ").append(toIndentedString(runTestName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `installation_guide` to the URL query string + if (getInstallationGuide() != null) { + joiner.add(String.format("%sinstallation_guide%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstallationGuide())))); + } + + // add `sdk_code` to the URL query string + if (getSdkCode() != null) { + joiner.add(String.format("%ssdk_code%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSdkCode())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `run_test_name` to the URL query string + if (getRunTestName() != null) { + joiner.add(String.format("%srun_test_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResponse.java new file mode 100644 index 0000000..79c0b33 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ChatSendMessageResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ChatSendMessageResponse + */ +@JsonPropertyOrder({ + ChatSendMessageResponse.JSON_PROPERTY_STATUS, + ChatSendMessageResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChatSendMessageResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ChatSendMessageResult result; + + public ChatSendMessageResponse() { + } + + public ChatSendMessageResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ChatSendMessageResponse result(@javax.annotation.Nonnull ChatSendMessageResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatSendMessageResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ChatSendMessageResult result) { + this.result = result; + } + + + /** + * Return true if this ChatSendMessageResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatSendMessageResponse chatSendMessageResponse = (ChatSendMessageResponse) o; + return Objects.equals(this.status, chatSendMessageResponse.status) && + Objects.equals(this.result, chatSendMessageResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatSendMessageResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResult.java new file mode 100644 index 0000000..a3cea5c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatSendMessageResult.java @@ -0,0 +1,338 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ChatMessageContract; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ChatSendMessageResult + */ +@JsonPropertyOrder({ + ChatSendMessageResult.JSON_PROPERTY_INPUT_MESSAGE, + ChatSendMessageResult.JSON_PROPERTY_OUTPUT_MESSAGE, + ChatSendMessageResult.JSON_PROPERTY_MESSAGE_HISTORY, + ChatSendMessageResult.JSON_PROPERTY_CHAT_ENDED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChatSendMessageResult { + public static final String JSON_PROPERTY_INPUT_MESSAGE = "input_message"; + private JsonNullable> inputMessage = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OUTPUT_MESSAGE = "output_message"; + private JsonNullable> outputMessage = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_MESSAGE_HISTORY = "message_history"; + @javax.annotation.Nonnull + private List messageHistory = new ArrayList<>(); + + public static final String JSON_PROPERTY_CHAT_ENDED = "chat_ended"; + @javax.annotation.Nullable + private Boolean chatEnded = false; + + public ChatSendMessageResult() { + } + + public ChatSendMessageResult inputMessage(@javax.annotation.Nullable List inputMessage) { + this.inputMessage = JsonNullable.>of(inputMessage); + return this; + } + + public ChatSendMessageResult addInputMessageItem(ChatMessageContract inputMessageItem) { + if (this.inputMessage == null || !this.inputMessage.isPresent()) { + this.inputMessage = JsonNullable.>of(new ArrayList<>()); + } + try { + this.inputMessage.get().add(inputMessageItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get inputMessage + * @return inputMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public List getInputMessage() { + return inputMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INPUT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getInputMessage_JsonNullable() { + return inputMessage; + } + + @JsonProperty(JSON_PROPERTY_INPUT_MESSAGE) + public void setInputMessage_JsonNullable(JsonNullable> inputMessage) { + this.inputMessage = inputMessage; + } + + public void setInputMessage(@javax.annotation.Nullable List inputMessage) { + this.inputMessage = JsonNullable.>of(inputMessage); + } + + + public ChatSendMessageResult outputMessage(@javax.annotation.Nullable List outputMessage) { + this.outputMessage = JsonNullable.>of(outputMessage); + return this; + } + + public ChatSendMessageResult addOutputMessageItem(ChatMessageContract outputMessageItem) { + if (this.outputMessage == null || !this.outputMessage.isPresent()) { + this.outputMessage = JsonNullable.>of(new ArrayList<>()); + } + try { + this.outputMessage.get().add(outputMessageItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get outputMessage + * @return outputMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public List getOutputMessage() { + return outputMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getOutputMessage_JsonNullable() { + return outputMessage; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_MESSAGE) + public void setOutputMessage_JsonNullable(JsonNullable> outputMessage) { + this.outputMessage = outputMessage; + } + + public void setOutputMessage(@javax.annotation.Nullable List outputMessage) { + this.outputMessage = JsonNullable.>of(outputMessage); + } + + + public ChatSendMessageResult messageHistory(@javax.annotation.Nonnull List messageHistory) { + this.messageHistory = messageHistory; + return this; + } + + public ChatSendMessageResult addMessageHistoryItem(ChatMessageContract messageHistoryItem) { + if (this.messageHistory == null) { + this.messageHistory = new ArrayList<>(); + } + this.messageHistory.add(messageHistoryItem); + return this; + } + + /** + * Get messageHistory + * @return messageHistory + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE_HISTORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getMessageHistory() { + return messageHistory; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE_HISTORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessageHistory(@javax.annotation.Nonnull List messageHistory) { + this.messageHistory = messageHistory; + } + + + public ChatSendMessageResult chatEnded(@javax.annotation.Nullable Boolean chatEnded) { + this.chatEnded = chatEnded; + return this; + } + + /** + * Get chatEnded + * @return chatEnded + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHAT_ENDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getChatEnded() { + return chatEnded; + } + + + @JsonProperty(JSON_PROPERTY_CHAT_ENDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChatEnded(@javax.annotation.Nullable Boolean chatEnded) { + this.chatEnded = chatEnded; + } + + + /** + * Return true if this ChatSendMessageResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatSendMessageResult chatSendMessageResult = (ChatSendMessageResult) o; + return equalsNullable(this.inputMessage, chatSendMessageResult.inputMessage) && + equalsNullable(this.outputMessage, chatSendMessageResult.outputMessage) && + Objects.equals(this.messageHistory, chatSendMessageResult.messageHistory) && + Objects.equals(this.chatEnded, chatSendMessageResult.chatEnded); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(inputMessage), hashCodeNullable(outputMessage), messageHistory, chatEnded); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatSendMessageResult {\n"); + sb.append(" inputMessage: ").append(toIndentedString(inputMessage)).append("\n"); + sb.append(" outputMessage: ").append(toIndentedString(outputMessage)).append("\n"); + sb.append(" messageHistory: ").append(toIndentedString(messageHistory)).append("\n"); + sb.append(" chatEnded: ").append(toIndentedString(chatEnded)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `input_message` to the URL query string + if (getInputMessage() != null) { + for (int i = 0; i < getInputMessage().size(); i++) { + if (getInputMessage().get(i) != null) { + joiner.add(getInputMessage().get(i).toUrlQueryString(String.format("%sinput_message%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `output_message` to the URL query string + if (getOutputMessage() != null) { + for (int i = 0; i < getOutputMessage().size(); i++) { + if (getOutputMessage().get(i) != null) { + joiner.add(getOutputMessage().get(i).toUrlQueryString(String.format("%soutput_message%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `message_history` to the URL query string + if (getMessageHistory() != null) { + for (int i = 0; i < getMessageHistory().size(); i++) { + if (getMessageHistory().get(i) != null) { + joiner.add(getMessageHistory().get(i).toUrlQueryString(String.format("%smessage_history%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `chat_ended` to the URL query string + if (getChatEnded() != null) { + joiner.add(String.format("%schat_ended%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChatEnded())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCall.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCall.java new file mode 100644 index 0000000..f73a84e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCall.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ChatToolCallFunction; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ChatToolCall + */ +@JsonPropertyOrder({ + ChatToolCall.JSON_PROPERTY_ID, + ChatToolCall.JSON_PROPERTY_TYPE, + ChatToolCall.JSON_PROPERTY_FUNCTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChatToolCall { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_FUNCTION = "function"; + @javax.annotation.Nonnull + private ChatToolCallFunction function; + + public ChatToolCall() { + } + + public ChatToolCall id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ChatToolCall type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public ChatToolCall function(@javax.annotation.Nonnull ChatToolCallFunction function) { + this.function = function; + return this; + } + + /** + * Get function + * @return function + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatToolCallFunction getFunction() { + return function; + } + + + @JsonProperty(JSON_PROPERTY_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFunction(@javax.annotation.Nonnull ChatToolCallFunction function) { + this.function = function; + } + + + /** + * Return true if this ChatToolCall object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatToolCall chatToolCall = (ChatToolCall) o; + return Objects.equals(this.id, chatToolCall.id) && + Objects.equals(this.type, chatToolCall.type) && + Objects.equals(this.function, chatToolCall.function); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, function); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatToolCall {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" function: ").append(toIndentedString(function)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `function` to the URL query string + if (getFunction() != null) { + joiner.add(getFunction().toUrlQueryString(prefix + "function" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCallFunction.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCallFunction.java new file mode 100644 index 0000000..70ca84d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ChatToolCallFunction.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ChatToolCallFunction + */ +@JsonPropertyOrder({ + ChatToolCallFunction.JSON_PROPERTY_NAME, + ChatToolCallFunction.JSON_PROPERTY_ARGUMENTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ChatToolCallFunction { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ARGUMENTS = "arguments"; + @javax.annotation.Nonnull + private String arguments; + + public ChatToolCallFunction() { + } + + public ChatToolCallFunction name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ChatToolCallFunction arguments(@javax.annotation.Nonnull String arguments) { + this.arguments = arguments; + return this; + } + + /** + * Get arguments + * @return arguments + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ARGUMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getArguments() { + return arguments; + } + + + @JsonProperty(JSON_PROPERTY_ARGUMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArguments(@javax.annotation.Nonnull String arguments) { + this.arguments = arguments; + } + + + /** + * Return true if this ChatToolCallFunction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatToolCallFunction chatToolCallFunction = (ChatToolCallFunction) o; + return Objects.equals(this.name, chatToolCallFunction.name) && + Objects.equals(this.arguments, chatToolCallFunction.arguments); + } + + @Override + public int hashCode() { + return Objects.hash(name, arguments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatToolCallFunction {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `arguments` to the URL query string + if (getArguments() != null) { + joiner.add(String.format("%sarguments%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getArguments())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ClassifyColumnRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ClassifyColumnRequest.java new file mode 100644 index 0000000..91a391f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ClassifyColumnRequest.java @@ -0,0 +1,310 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ClassifyColumnRequest + */ +@JsonPropertyOrder({ + ClassifyColumnRequest.JSON_PROPERTY_COLUMN_ID, + ClassifyColumnRequest.JSON_PROPERTY_LABELS, + ClassifyColumnRequest.JSON_PROPERTY_LANGUAGE_MODEL_ID, + ClassifyColumnRequest.JSON_PROPERTY_CONCURRENCY, + ClassifyColumnRequest.JSON_PROPERTY_NEW_COLUMN_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ClassifyColumnRequest { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nonnull + private List labels = new ArrayList<>(); + + public static final String JSON_PROPERTY_LANGUAGE_MODEL_ID = "language_model_id"; + @javax.annotation.Nullable + private String languageModelId = "gpt-4o"; + + public static final String JSON_PROPERTY_CONCURRENCY = "concurrency"; + @javax.annotation.Nullable + private Integer concurrency = 5; + + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nullable + private String newColumnName; + + public ClassifyColumnRequest() { + } + + public ClassifyColumnRequest columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public ClassifyColumnRequest labels(@javax.annotation.Nonnull List labels) { + this.labels = labels; + return this; + } + + public ClassifyColumnRequest addLabelsItem(String labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLabels() { + return labels; + } + + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabels(@javax.annotation.Nonnull List labels) { + this.labels = labels; + } + + + public ClassifyColumnRequest languageModelId(@javax.annotation.Nullable String languageModelId) { + this.languageModelId = languageModelId; + return this; + } + + /** + * Get languageModelId + * @return languageModelId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguageModelId() { + return languageModelId; + } + + + @JsonProperty(JSON_PROPERTY_LANGUAGE_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLanguageModelId(@javax.annotation.Nullable String languageModelId) { + this.languageModelId = languageModelId; + } + + + public ClassifyColumnRequest concurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + return this; + } + + /** + * Get concurrency + * @return concurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConcurrency() { + return concurrency; + } + + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConcurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + } + + + public ClassifyColumnRequest newColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + } + + + /** + * Return true if this ClassifyColumnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassifyColumnRequest classifyColumnRequest = (ClassifyColumnRequest) o; + return Objects.equals(this.columnId, classifyColumnRequest.columnId) && + Objects.equals(this.labels, classifyColumnRequest.labels) && + Objects.equals(this.languageModelId, classifyColumnRequest.languageModelId) && + Objects.equals(this.concurrency, classifyColumnRequest.concurrency) && + Objects.equals(this.newColumnName, classifyColumnRequest.newColumnName); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, labels, languageModelId, concurrency, newColumnName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassifyColumnRequest {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" languageModelId: ").append(toIndentedString(languageModelId)).append("\n"); + sb.append(" concurrency: ").append(toIndentedString(concurrency)).append("\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `labels` to the URL query string + if (getLabels() != null) { + for (int i = 0; i < getLabels().size(); i++) { + joiner.add(String.format("%slabels%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLabels().get(i))))); + } + } + + // add `language_model_id` to the URL query string + if (getLanguageModelId() != null) { + joiner.add(String.format("%slanguage_model_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguageModelId())))); + } + + // add `concurrency` to the URL query string + if (getConcurrency() != null) { + joiner.add(String.format("%sconcurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConcurrency())))); + } + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CloneDatasetRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CloneDatasetRequest.java new file mode 100644 index 0000000..3c25f93 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CloneDatasetRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CloneDatasetRequest + */ +@JsonPropertyOrder({ + CloneDatasetRequest.JSON_PROPERTY_NEW_DATASET_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CloneDatasetRequest { + public static final String JSON_PROPERTY_NEW_DATASET_NAME = "new_dataset_name"; + @javax.annotation.Nullable + private String newDatasetName; + + public CloneDatasetRequest() { + } + + public CloneDatasetRequest newDatasetName(@javax.annotation.Nullable String newDatasetName) { + this.newDatasetName = newDatasetName; + return this; + } + + /** + * Get newDatasetName + * @return newDatasetName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNewDatasetName() { + return newDatasetName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewDatasetName(@javax.annotation.Nullable String newDatasetName) { + this.newDatasetName = newDatasetName; + } + + + /** + * Return true if this CloneDatasetRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloneDatasetRequest cloneDatasetRequest = (CloneDatasetRequest) o; + return Objects.equals(this.newDatasetName, cloneDatasetRequest.newDatasetName); + } + + @Override + public int hashCode() { + return Objects.hash(newDatasetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloneDatasetRequest {\n"); + sb.append(" newDatasetName: ").append(toIndentedString(newDatasetName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `new_dataset_name` to the URL query string + if (getNewDatasetName() != null) { + joiner.add(String.format("%snew_dataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewDatasetName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CoOccurringIssue.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CoOccurringIssue.java new file mode 100644 index 0000000..4c5bbaa --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CoOccurringIssue.java @@ -0,0 +1,332 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CoOccurringIssue + */ +@JsonPropertyOrder({ + CoOccurringIssue.JSON_PROPERTY_ID, + CoOccurringIssue.JSON_PROPERTY_TITLE, + CoOccurringIssue.JSON_PROPERTY_TYPE, + CoOccurringIssue.JSON_PROPERTY_CO_OCCURRENCE, + CoOccurringIssue.JSON_PROPERTY_COUNT, + CoOccurringIssue.JSON_PROPERTY_SEVERITY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CoOccurringIssue { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nonnull + private String title; + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_CO_OCCURRENCE = "co_occurrence"; + @javax.annotation.Nonnull + private BigDecimal coOccurrence; + + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + @javax.annotation.Nonnull + private String severity; + + public CoOccurringIssue() { + } + + public CoOccurringIssue id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public CoOccurringIssue title(@javax.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@javax.annotation.Nonnull String title) { + this.title = title; + } + + + public CoOccurringIssue type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public CoOccurringIssue coOccurrence(@javax.annotation.Nonnull BigDecimal coOccurrence) { + this.coOccurrence = coOccurrence; + return this; + } + + /** + * Get coOccurrence + * @return coOccurrence + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CO_OCCURRENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCoOccurrence() { + return coOccurrence; + } + + + @JsonProperty(JSON_PROPERTY_CO_OCCURRENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCoOccurrence(@javax.annotation.Nonnull BigDecimal coOccurrence) { + this.coOccurrence = coOccurrence; + } + + + public CoOccurringIssue count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public CoOccurringIssue severity(@javax.annotation.Nonnull String severity) { + this.severity = severity; + return this; + } + + /** + * Get severity + * @return severity + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSeverity() { + return severity; + } + + + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSeverity(@javax.annotation.Nonnull String severity) { + this.severity = severity; + } + + + /** + * Return true if this CoOccurringIssue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CoOccurringIssue coOccurringIssue = (CoOccurringIssue) o; + return Objects.equals(this.id, coOccurringIssue.id) && + Objects.equals(this.title, coOccurringIssue.title) && + Objects.equals(this.type, coOccurringIssue.type) && + Objects.equals(this.coOccurrence, coOccurringIssue.coOccurrence) && + Objects.equals(this.count, coOccurringIssue.count) && + Objects.equals(this.severity, coOccurringIssue.severity); + } + + @Override + public int hashCode() { + return Objects.hash(id, title, type, coOccurrence, count, severity); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CoOccurringIssue {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" coOccurrence: ").append(toIndentedString(coOccurrence)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format("%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `co_occurrence` to the URL query string + if (getCoOccurrence() != null) { + joiner.add(String.format("%sco_occurrence%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCoOccurrence())))); + } + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `severity` to the URL query string + if (getSeverity() != null) { + joiner.add(String.format("%sseverity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSeverity())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Column.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Column.java new file mode 100644 index 0000000..92f2405 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Column.java @@ -0,0 +1,487 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Column + */ +@JsonPropertyOrder({ + Column.JSON_PROPERTY_ID, + Column.JSON_PROPERTY_NAME, + Column.JSON_PROPERTY_DATA_TYPE, + Column.JSON_PROPERTY_DATASET, + Column.JSON_PROPERTY_SOURCE, + Column.JSON_PROPERTY_SOURCE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Column { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + /** + * Gets or Sets dataType + */ + public enum DataTypeEnum { + TEXT(String.valueOf("text")), + + BOOLEAN(String.valueOf("boolean")), + + INTEGER(String.valueOf("integer")), + + FLOAT(String.valueOf("float")), + + JSON(String.valueOf("json")), + + ARRAY(String.valueOf("array")), + + IMAGE(String.valueOf("image")), + + IMAGES(String.valueOf("images")), + + DATETIME(String.valueOf("datetime")), + + AUDIO(String.valueOf("audio")), + + DOCUMENT(String.valueOf("document")), + + OTHERS(String.valueOf("others")), + + PERSONA(String.valueOf("persona")); + + private String value; + + DataTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DataTypeEnum fromValue(String value) { + for (DataTypeEnum b : DataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DATA_TYPE = "data_type"; + @javax.annotation.Nonnull + private DataTypeEnum dataType; + + public static final String JSON_PROPERTY_DATASET = "dataset"; + private JsonNullable dataset = JsonNullable.undefined(); + + /** + * Gets or Sets source + */ + public enum SourceEnum { + EVALUATION(String.valueOf("evaluation")), + + EVALUATION_TAGS(String.valueOf("evaluation_tags")), + + EVALUATION_REASON(String.valueOf("evaluation_reason")), + + RUN_PROMPT(String.valueOf("run_prompt")), + + EXPERIMENT(String.valueOf("experiment")), + + OPTIMISATION(String.valueOf("optimisation")), + + EXPERIMENT_EVALUATION(String.valueOf("experiment_evaluation")), + + EXPERIMENT_EVALUATION_TAGS(String.valueOf("experiment_evaluation_tags")), + + OPTIMISATION_EVALUATION(String.valueOf("optimisation_evaluation")), + + ANNOTATION_LABEL(String.valueOf("annotation_label")), + + OPTIMISATION_EVALUATION_TAGS(String.valueOf("optimisation_evaluation_tags")), + + EXTRACTED_JSON(String.valueOf("extracted_json")), + + CLASSIFICATION(String.valueOf("classification")), + + EXTRACTED_ENTITIES(String.valueOf("extracted_entities")), + + API_CALL(String.valueOf("api_call")), + + PYTHON_CODE(String.valueOf("python_code")), + + VECTOR_DB(String.valueOf("vector_db")), + + CONDITIONAL(String.valueOf("conditional")), + + EVAL_PLAYGROUND(String.valueOf("eval_playground")), + + OTHERS(String.valueOf("OTHERS")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nonnull + private SourceEnum source; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + private JsonNullable sourceId = JsonNullable.undefined(); + + public Column() { + } + + @JsonCreator + public Column( + @JsonProperty(JSON_PROPERTY_ID) UUID id + ) { + this(); + this.id = id; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public Column name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Column dataType(@javax.annotation.Nonnull DataTypeEnum dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get dataType + * @return dataType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DataTypeEnum getDataType() { + return dataType; + } + + + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataType(@javax.annotation.Nonnull DataTypeEnum dataType) { + this.dataType = dataType; + } + + + public Column dataset(@javax.annotation.Nullable UUID dataset) { + this.dataset = JsonNullable.of(dataset); + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getDataset() { + return dataset.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDataset_JsonNullable() { + return dataset; + } + + @JsonProperty(JSON_PROPERTY_DATASET) + public void setDataset_JsonNullable(JsonNullable dataset) { + this.dataset = dataset; + } + + public void setDataset(@javax.annotation.Nullable UUID dataset) { + this.dataset = JsonNullable.of(dataset); + } + + + public Column source(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceEnum getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + } + + + public Column sourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = JsonNullable.of(sourceId); + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSourceId() { + return sourceId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSourceId_JsonNullable() { + return sourceId; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + public void setSourceId_JsonNullable(JsonNullable sourceId) { + this.sourceId = sourceId; + } + + public void setSourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = JsonNullable.of(sourceId); + } + + + /** + * Return true if this Column object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Column column = (Column) o; + return Objects.equals(this.id, column.id) && + Objects.equals(this.name, column.name) && + Objects.equals(this.dataType, column.dataType) && + equalsNullable(this.dataset, column.dataset) && + Objects.equals(this.source, column.source) && + equalsNullable(this.sourceId, column.sourceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, dataType, hashCodeNullable(dataset), source, hashCodeNullable(sourceId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Column {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `data_type` to the URL query string + if (getDataType() != null) { + joiner.add(String.format("%sdata_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(String.format("%sdataset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataset())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnDefinition.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnDefinition.java new file mode 100644 index 0000000..203b33b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnDefinition.java @@ -0,0 +1,280 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ColumnDefinition + */ +@JsonPropertyOrder({ + ColumnDefinition.JSON_PROPERTY_NAME, + ColumnDefinition.JSON_PROPERTY_DATA_TYPE, + ColumnDefinition.JSON_PROPERTY_DESCRIPTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnDefinition { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + /** + * Gets or Sets dataType + */ + public enum DataTypeEnum { + TEXT(String.valueOf("text")), + + BOOLEAN(String.valueOf("boolean")), + + INTEGER(String.valueOf("integer")), + + FLOAT(String.valueOf("float")), + + JSON(String.valueOf("json")), + + ARRAY(String.valueOf("array")), + + IMAGE(String.valueOf("image")), + + IMAGES(String.valueOf("images")), + + DATETIME(String.valueOf("datetime")), + + AUDIO(String.valueOf("audio")), + + DOCUMENT(String.valueOf("document")), + + OTHERS(String.valueOf("others")), + + PERSONA(String.valueOf("persona")); + + private String value; + + DataTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DataTypeEnum fromValue(String value) { + for (DataTypeEnum b : DataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DATA_TYPE = "data_type"; + @javax.annotation.Nonnull + private DataTypeEnum dataType; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nonnull + private String description; + + public ColumnDefinition() { + } + + public ColumnDefinition name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ColumnDefinition dataType(@javax.annotation.Nonnull DataTypeEnum dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get dataType + * @return dataType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DataTypeEnum getDataType() { + return dataType; + } + + + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataType(@javax.annotation.Nonnull DataTypeEnum dataType) { + this.dataType = dataType; + } + + + public ColumnDefinition description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + /** + * Return true if this ColumnDefinition object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnDefinition columnDefinition = (ColumnDefinition) o; + return Objects.equals(this.name, columnDefinition.name) && + Objects.equals(this.dataType, columnDefinition.dataType) && + Objects.equals(this.description, columnDefinition.description); + } + + @Override + public int hashCode() { + return Objects.hash(name, dataType, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnDefinition {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `data_type` to the URL query string + if (getDataType() != null) { + joiner.add(String.format("%sdata_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnOrder.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnOrder.java new file mode 100644 index 0000000..15dc5a3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnOrder.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ColumnOrder + */ +@JsonPropertyOrder({ + ColumnOrder.JSON_PROPERTY_COLUMN_NAME, + ColumnOrder.JSON_PROPERTY_ID, + ColumnOrder.JSON_PROPERTY_VISIBLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnOrder { + public static final String JSON_PROPERTY_COLUMN_NAME = "column_name"; + @javax.annotation.Nonnull + private String columnName; + + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_VISIBLE = "visible"; + @javax.annotation.Nonnull + private Boolean visible; + + public ColumnOrder() { + } + + public ColumnOrder columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get columnName + * @return columnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumnName() { + return columnName; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + + public ColumnOrder id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ColumnOrder visible(@javax.annotation.Nonnull Boolean visible) { + this.visible = visible; + return this; + } + + /** + * Get visible + * @return visible + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VISIBLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getVisible() { + return visible; + } + + + @JsonProperty(JSON_PROPERTY_VISIBLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVisible(@javax.annotation.Nonnull Boolean visible) { + this.visible = visible; + } + + + /** + * Return true if this ColumnOrder object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnOrder columnOrder = (ColumnOrder) o; + return Objects.equals(this.columnName, columnOrder.columnName) && + Objects.equals(this.id, columnOrder.id) && + Objects.equals(this.visible, columnOrder.visible); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, id, visible); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnOrder {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" visible: ").append(toIndentedString(visible)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_name` to the URL query string + if (getColumnName() != null) { + joiner.add(String.format("%scolumn_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnName())))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `visible` to the URL query string + if (getVisible() != null) { + joiner.add(String.format("%svisible%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVisible())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResponse.java new file mode 100644 index 0000000..a6ca702 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ColumnTypeConversionResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ColumnTypeConversionResponse + */ +@JsonPropertyOrder({ + ColumnTypeConversionResponse.JSON_PROPERTY_STATUS, + ColumnTypeConversionResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnTypeConversionResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ColumnTypeConversionResult result; + + public ColumnTypeConversionResponse() { + } + + public ColumnTypeConversionResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ColumnTypeConversionResponse result(@javax.annotation.Nonnull ColumnTypeConversionResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ColumnTypeConversionResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ColumnTypeConversionResult result) { + this.result = result; + } + + + /** + * Return true if this ColumnTypeConversionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnTypeConversionResponse columnTypeConversionResponse = (ColumnTypeConversionResponse) o; + return Objects.equals(this.status, columnTypeConversionResponse.status) && + Objects.equals(this.result, columnTypeConversionResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnTypeConversionResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResult.java new file mode 100644 index 0000000..690f4b9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ColumnTypeConversionResult.java @@ -0,0 +1,396 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ColumnTypeConversionResult + */ +@JsonPropertyOrder({ + ColumnTypeConversionResult.JSON_PROPERTY_MESSAGE, + ColumnTypeConversionResult.JSON_PROPERTY_COLUMN_ID, + ColumnTypeConversionResult.JSON_PROPERTY_NEW_DATA_TYPE, + ColumnTypeConversionResult.JSON_PROPERTY_STATUS, + ColumnTypeConversionResult.JSON_PROPERTY_INVALID_COUNT, + ColumnTypeConversionResult.JSON_PROPERTY_INVALID_VALUES, + ColumnTypeConversionResult.JSON_PROPERTY_VALID_CONVERSION_SAMPLES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ColumnTypeConversionResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nullable + private UUID columnId; + + public static final String JSON_PROPERTY_NEW_DATA_TYPE = "new_data_type"; + @javax.annotation.Nullable + private String newDataType; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_INVALID_COUNT = "invalid_count"; + @javax.annotation.Nullable + private Integer invalidCount; + + public static final String JSON_PROPERTY_INVALID_VALUES = "invalid_values"; + @javax.annotation.Nullable + private List> invalidValues = new ArrayList<>(); + + public static final String JSON_PROPERTY_VALID_CONVERSION_SAMPLES = "valid_conversion_samples"; + @javax.annotation.Nullable + private Map validConversionSamples = new HashMap<>(); + + public ColumnTypeConversionResult() { + } + + public ColumnTypeConversionResult message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + public ColumnTypeConversionResult columnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = columnId; + } + + + public ColumnTypeConversionResult newDataType(@javax.annotation.Nullable String newDataType) { + this.newDataType = newDataType; + return this; + } + + /** + * Get newDataType + * @return newDataType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNewDataType() { + return newDataType; + } + + + @JsonProperty(JSON_PROPERTY_NEW_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewDataType(@javax.annotation.Nullable String newDataType) { + this.newDataType = newDataType; + } + + + public ColumnTypeConversionResult status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public ColumnTypeConversionResult invalidCount(@javax.annotation.Nullable Integer invalidCount) { + this.invalidCount = invalidCount; + return this; + } + + /** + * Get invalidCount + * @return invalidCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVALID_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getInvalidCount() { + return invalidCount; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidCount(@javax.annotation.Nullable Integer invalidCount) { + this.invalidCount = invalidCount; + } + + + public ColumnTypeConversionResult invalidValues(@javax.annotation.Nullable List> invalidValues) { + this.invalidValues = invalidValues; + return this; + } + + public ColumnTypeConversionResult addInvalidValuesItem(Map invalidValuesItem) { + if (this.invalidValues == null) { + this.invalidValues = new ArrayList<>(); + } + this.invalidValues.add(invalidValuesItem); + return this; + } + + /** + * Get invalidValues + * @return invalidValues + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVALID_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getInvalidValues() { + return invalidValues; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidValues(@javax.annotation.Nullable List> invalidValues) { + this.invalidValues = invalidValues; + } + + + public ColumnTypeConversionResult validConversionSamples(@javax.annotation.Nullable Map validConversionSamples) { + this.validConversionSamples = validConversionSamples; + return this; + } + + public ColumnTypeConversionResult putValidConversionSamplesItem(String key, Object validConversionSamplesItem) { + if (this.validConversionSamples == null) { + this.validConversionSamples = new HashMap<>(); + } + this.validConversionSamples.put(key, validConversionSamplesItem); + return this; + } + + /** + * Get validConversionSamples + * @return validConversionSamples + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALID_CONVERSION_SAMPLES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getValidConversionSamples() { + return validConversionSamples; + } + + + @JsonProperty(JSON_PROPERTY_VALID_CONVERSION_SAMPLES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setValidConversionSamples(@javax.annotation.Nullable Map validConversionSamples) { + this.validConversionSamples = validConversionSamples; + } + + + /** + * Return true if this ColumnTypeConversionResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ColumnTypeConversionResult columnTypeConversionResult = (ColumnTypeConversionResult) o; + return Objects.equals(this.message, columnTypeConversionResult.message) && + Objects.equals(this.columnId, columnTypeConversionResult.columnId) && + Objects.equals(this.newDataType, columnTypeConversionResult.newDataType) && + Objects.equals(this.status, columnTypeConversionResult.status) && + Objects.equals(this.invalidCount, columnTypeConversionResult.invalidCount) && + Objects.equals(this.invalidValues, columnTypeConversionResult.invalidValues) && + Objects.equals(this.validConversionSamples, columnTypeConversionResult.validConversionSamples); + } + + @Override + public int hashCode() { + return Objects.hash(message, columnId, newDataType, status, invalidCount, invalidValues, validConversionSamples); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ColumnTypeConversionResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" newDataType: ").append(toIndentedString(newDataType)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" invalidCount: ").append(toIndentedString(invalidCount)).append("\n"); + sb.append(" invalidValues: ").append(toIndentedString(invalidValues)).append("\n"); + sb.append(" validConversionSamples: ").append(toIndentedString(validConversionSamples)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `new_data_type` to the URL query string + if (getNewDataType() != null) { + joiner.add(String.format("%snew_data_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewDataType())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `invalid_count` to the URL query string + if (getInvalidCount() != null) { + joiner.add(String.format("%sinvalid_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInvalidCount())))); + } + + // add `invalid_values` to the URL query string + if (getInvalidValues() != null) { + for (int i = 0; i < getInvalidValues().size(); i++) { + joiner.add(String.format("%sinvalid_values%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getInvalidValues().get(i))))); + } + } + + // add `valid_conversion_samples` to the URL query string + if (getValidConversionSamples() != null) { + for (String _key : getValidConversionSamples().keySet()) { + joiner.add(String.format("%svalid_conversion_samples%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValidConversionSamples().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValidConversionSamples().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDataset.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDataset.java new file mode 100644 index 0000000..5aacf5d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDataset.java @@ -0,0 +1,432 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDataset + */ +@JsonPropertyOrder({ + CompareDataset.JSON_PROPERTY_COMPARE_ID, + CompareDataset.JSON_PROPERTY_PAGE_SIZE, + CompareDataset.JSON_PROPERTY_CURRENT_PAGE_INDEX, + CompareDataset.JSON_PROPERTY_BASE_COLUMN_NAME, + CompareDataset.JSON_PROPERTY_DATASET_INFO, + CompareDataset.JSON_PROPERTY_COMMON_COLUMN_NAMES, + CompareDataset.JSON_PROPERTY_DATASET_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDataset { + public static final String JSON_PROPERTY_COMPARE_ID = "compare_id"; + private JsonNullable compareId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + @javax.annotation.Nullable + private Integer pageSize = 10; + + public static final String JSON_PROPERTY_CURRENT_PAGE_INDEX = "current_page_index"; + @javax.annotation.Nullable + private Integer currentPageIndex = 0; + + public static final String JSON_PROPERTY_BASE_COLUMN_NAME = "base_column_name"; + @javax.annotation.Nonnull + private String baseColumnName; + + public static final String JSON_PROPERTY_DATASET_INFO = "dataset_info"; + @javax.annotation.Nullable + private Map datasetInfo = new HashMap<>(); + + public static final String JSON_PROPERTY_COMMON_COLUMN_NAMES = "common_column_names"; + @javax.annotation.Nullable + private List commonColumnNames = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_IDS = "dataset_ids"; + @javax.annotation.Nonnull + private List datasetIds = new ArrayList<>(); + + public CompareDataset() { + } + + public CompareDataset compareId(@javax.annotation.Nullable UUID compareId) { + this.compareId = JsonNullable.of(compareId); + return this; + } + + /** + * Get compareId + * @return compareId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getCompareId() { + return compareId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPARE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompareId_JsonNullable() { + return compareId; + } + + @JsonProperty(JSON_PROPERTY_COMPARE_ID) + public void setCompareId_JsonNullable(JsonNullable compareId) { + this.compareId = compareId; + } + + public void setCompareId(@javax.annotation.Nullable UUID compareId) { + this.compareId = JsonNullable.of(compareId); + } + + + public CompareDataset pageSize(@javax.annotation.Nullable Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Get pageSize + * @return pageSize + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPageSize() { + return pageSize; + } + + + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPageSize(@javax.annotation.Nullable Integer pageSize) { + this.pageSize = pageSize; + } + + + public CompareDataset currentPageIndex(@javax.annotation.Nullable Integer currentPageIndex) { + this.currentPageIndex = currentPageIndex; + return this; + } + + /** + * Get currentPageIndex + * @return currentPageIndex + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCurrentPageIndex() { + return currentPageIndex; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrentPageIndex(@javax.annotation.Nullable Integer currentPageIndex) { + this.currentPageIndex = currentPageIndex; + } + + + public CompareDataset baseColumnName(@javax.annotation.Nonnull String baseColumnName) { + this.baseColumnName = baseColumnName; + return this; + } + + /** + * Get baseColumnName + * @return baseColumnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseColumnName() { + return baseColumnName; + } + + + @JsonProperty(JSON_PROPERTY_BASE_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseColumnName(@javax.annotation.Nonnull String baseColumnName) { + this.baseColumnName = baseColumnName; + } + + + public CompareDataset datasetInfo(@javax.annotation.Nullable Map datasetInfo) { + this.datasetInfo = datasetInfo; + return this; + } + + public CompareDataset putDatasetInfoItem(String key, Object datasetInfoItem) { + if (this.datasetInfo == null) { + this.datasetInfo = new HashMap<>(); + } + this.datasetInfo.put(key, datasetInfoItem); + return this; + } + + /** + * Get datasetInfo + * @return datasetInfo + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDatasetInfo() { + return datasetInfo; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetInfo(@javax.annotation.Nullable Map datasetInfo) { + this.datasetInfo = datasetInfo; + } + + + public CompareDataset commonColumnNames(@javax.annotation.Nullable List commonColumnNames) { + this.commonColumnNames = commonColumnNames; + return this; + } + + public CompareDataset addCommonColumnNamesItem(String commonColumnNamesItem) { + if (this.commonColumnNames == null) { + this.commonColumnNames = new ArrayList<>(); + } + this.commonColumnNames.add(commonColumnNamesItem); + return this; + } + + /** + * Get commonColumnNames + * @return commonColumnNames + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMON_COLUMN_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCommonColumnNames() { + return commonColumnNames; + } + + + @JsonProperty(JSON_PROPERTY_COMMON_COLUMN_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCommonColumnNames(@javax.annotation.Nullable List commonColumnNames) { + this.commonColumnNames = commonColumnNames; + } + + + public CompareDataset datasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + return this; + } + + public CompareDataset addDatasetIdsItem(UUID datasetIdsItem) { + if (this.datasetIds == null) { + this.datasetIds = new ArrayList<>(); + } + this.datasetIds.add(datasetIdsItem); + return this; + } + + /** + * Get datasetIds + * @return datasetIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasetIds() { + return datasetIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + } + + + /** + * Return true if this CompareDataset object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDataset compareDataset = (CompareDataset) o; + return equalsNullable(this.compareId, compareDataset.compareId) && + Objects.equals(this.pageSize, compareDataset.pageSize) && + Objects.equals(this.currentPageIndex, compareDataset.currentPageIndex) && + Objects.equals(this.baseColumnName, compareDataset.baseColumnName) && + Objects.equals(this.datasetInfo, compareDataset.datasetInfo) && + Objects.equals(this.commonColumnNames, compareDataset.commonColumnNames) && + Objects.equals(this.datasetIds, compareDataset.datasetIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(compareId), pageSize, currentPageIndex, baseColumnName, datasetInfo, commonColumnNames, datasetIds); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDataset {\n"); + sb.append(" compareId: ").append(toIndentedString(compareId)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" currentPageIndex: ").append(toIndentedString(currentPageIndex)).append("\n"); + sb.append(" baseColumnName: ").append(toIndentedString(baseColumnName)).append("\n"); + sb.append(" datasetInfo: ").append(toIndentedString(datasetInfo)).append("\n"); + sb.append(" commonColumnNames: ").append(toIndentedString(commonColumnNames)).append("\n"); + sb.append(" datasetIds: ").append(toIndentedString(datasetIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `compare_id` to the URL query string + if (getCompareId() != null) { + joiner.add(String.format("%scompare_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompareId())))); + } + + // add `page_size` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format("%spage_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + } + + // add `current_page_index` to the URL query string + if (getCurrentPageIndex() != null) { + joiner.add(String.format("%scurrent_page_index%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentPageIndex())))); + } + + // add `base_column_name` to the URL query string + if (getBaseColumnName() != null) { + joiner.add(String.format("%sbase_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBaseColumnName())))); + } + + // add `dataset_info` to the URL query string + if (getDatasetInfo() != null) { + for (String _key : getDatasetInfo().keySet()) { + joiner.add(String.format("%sdataset_info%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDatasetInfo().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDatasetInfo().get(_key))))); + } + } + + // add `common_column_names` to the URL query string + if (getCommonColumnNames() != null) { + for (int i = 0; i < getCommonColumnNames().size(); i++) { + joiner.add(String.format("%scommon_column_names%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getCommonColumnNames().get(i))))); + } + } + + // add `dataset_ids` to the URL query string + if (getDatasetIds() != null) { + for (int i = 0; i < getDatasetIds().size(); i++) { + if (getDatasetIds().get(i) != null) { + joiner.add(String.format("%sdataset_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResponse.java new file mode 100644 index 0000000..05b885b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompareDatasetDeleteResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetDeleteResponse + */ +@JsonPropertyOrder({ + CompareDatasetDeleteResponse.JSON_PROPERTY_STATUS, + CompareDatasetDeleteResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetDeleteResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CompareDatasetDeleteResult result; + + public CompareDatasetDeleteResponse() { + } + + public CompareDatasetDeleteResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompareDatasetDeleteResponse result(@javax.annotation.Nonnull CompareDatasetDeleteResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CompareDatasetDeleteResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CompareDatasetDeleteResult result) { + this.result = result; + } + + + /** + * Return true if this CompareDatasetDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetDeleteResponse compareDatasetDeleteResponse = (CompareDatasetDeleteResponse) o; + return Objects.equals(this.status, compareDatasetDeleteResponse.status) && + Objects.equals(this.result, compareDatasetDeleteResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetDeleteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResult.java new file mode 100644 index 0000000..b13c74a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetDeleteResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetDeleteResult + */ +@JsonPropertyOrder({ + CompareDatasetDeleteResult.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetDeleteResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public CompareDatasetDeleteResult() { + } + + public CompareDatasetDeleteResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this CompareDatasetDeleteResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetDeleteResult compareDatasetDeleteResult = (CompareDatasetDeleteResult) o; + return Objects.equals(this.message, compareDatasetDeleteResult.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetDeleteResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetMetadata.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetMetadata.java new file mode 100644 index 0000000..32e6ec4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetMetadata.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetMetadata + */ +@JsonPropertyOrder({ + CompareDatasetMetadata.JSON_PROPERTY_COMPARE_ID, + CompareDatasetMetadata.JSON_PROPERTY_TOTAL_ROWS, + CompareDatasetMetadata.JSON_PROPERTY_TOTAL_PAGES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetMetadata { + public static final String JSON_PROPERTY_COMPARE_ID = "compare_id"; + @javax.annotation.Nonnull + private UUID compareId; + + public static final String JSON_PROPERTY_TOTAL_ROWS = "total_rows"; + @javax.annotation.Nonnull + private Integer totalRows; + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nonnull + private Integer totalPages; + + public CompareDatasetMetadata() { + } + + public CompareDatasetMetadata compareId(@javax.annotation.Nonnull UUID compareId) { + this.compareId = compareId; + return this; + } + + /** + * Get compareId + * @return compareId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPARE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getCompareId() { + return compareId; + } + + + @JsonProperty(JSON_PROPERTY_COMPARE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompareId(@javax.annotation.Nonnull UUID compareId) { + this.compareId = compareId; + } + + + public CompareDatasetMetadata totalRows(@javax.annotation.Nonnull Integer totalRows) { + this.totalRows = totalRows; + return this; + } + + /** + * Get totalRows + * @return totalRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalRows() { + return totalRows; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalRows(@javax.annotation.Nonnull Integer totalRows) { + this.totalRows = totalRows; + } + + + public CompareDatasetMetadata totalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + } + + + /** + * Return true if this CompareDatasetMetadata object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetMetadata compareDatasetMetadata = (CompareDatasetMetadata) o; + return Objects.equals(this.compareId, compareDatasetMetadata.compareId) && + Objects.equals(this.totalRows, compareDatasetMetadata.totalRows) && + Objects.equals(this.totalPages, compareDatasetMetadata.totalPages); + } + + @Override + public int hashCode() { + return Objects.hash(compareId, totalRows, totalPages); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetMetadata {\n"); + sb.append(" compareId: ").append(toIndentedString(compareId)).append("\n"); + sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `compare_id` to the URL query string + if (getCompareId() != null) { + joiner.add(String.format("%scompare_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompareId())))); + } + + // add `total_rows` to the URL query string + if (getTotalRows() != null) { + joiner.add(String.format("%stotal_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalRows())))); + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResponse.java new file mode 100644 index 0000000..0a33969 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompareDatasetResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetResponse + */ +@JsonPropertyOrder({ + CompareDatasetResponse.JSON_PROPERTY_STATUS, + CompareDatasetResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CompareDatasetResult result; + + public CompareDatasetResponse() { + } + + public CompareDatasetResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompareDatasetResponse result(@javax.annotation.Nonnull CompareDatasetResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CompareDatasetResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CompareDatasetResult result) { + this.result = result; + } + + + /** + * Return true if this CompareDatasetResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetResponse compareDatasetResponse = (CompareDatasetResponse) o; + return Objects.equals(this.status, compareDatasetResponse.status) && + Objects.equals(this.result, compareDatasetResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResult.java new file mode 100644 index 0000000..c599484 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetResult.java @@ -0,0 +1,251 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompareDatasetMetadata; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetResult + */ +@JsonPropertyOrder({ + CompareDatasetResult.JSON_PROPERTY_METADATA, + CompareDatasetResult.JSON_PROPERTY_COLUMN_CONFIG, + CompareDatasetResult.JSON_PROPERTY_TABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetResult { + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private CompareDatasetMetadata metadata; + + public static final String JSON_PROPERTY_COLUMN_CONFIG = "column_config"; + @javax.annotation.Nullable + private List> columnConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE = "table"; + @javax.annotation.Nullable + private List> table = new ArrayList<>(); + + public CompareDatasetResult() { + } + + public CompareDatasetResult metadata(@javax.annotation.Nullable CompareDatasetMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CompareDatasetMetadata getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable CompareDatasetMetadata metadata) { + this.metadata = metadata; + } + + + public CompareDatasetResult columnConfig(@javax.annotation.Nullable List> columnConfig) { + this.columnConfig = columnConfig; + return this; + } + + public CompareDatasetResult addColumnConfigItem(Map columnConfigItem) { + if (this.columnConfig == null) { + this.columnConfig = new ArrayList<>(); + } + this.columnConfig.add(columnConfigItem); + return this; + } + + /** + * Get columnConfig + * @return columnConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getColumnConfig() { + return columnConfig; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnConfig(@javax.annotation.Nullable List> columnConfig) { + this.columnConfig = columnConfig; + } + + + public CompareDatasetResult table(@javax.annotation.Nullable List> table) { + this.table = table; + return this; + } + + public CompareDatasetResult addTableItem(Map tableItem) { + if (this.table == null) { + this.table = new ArrayList<>(); + } + this.table.add(tableItem); + return this; + } + + /** + * Get table + * @return table + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getTable() { + return table; + } + + + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTable(@javax.annotation.Nullable List> table) { + this.table = table; + } + + + /** + * Return true if this CompareDatasetResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetResult compareDatasetResult = (CompareDatasetResult) o; + return Objects.equals(this.metadata, compareDatasetResult.metadata) && + Objects.equals(this.columnConfig, compareDatasetResult.columnConfig) && + Objects.equals(this.table, compareDatasetResult.table); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, columnConfig, table); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetResult {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" columnConfig: ").append(toIndentedString(columnConfig)).append("\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + // add `column_config` to the URL query string + if (getColumnConfig() != null) { + for (int i = 0; i < getColumnConfig().size(); i++) { + joiner.add(String.format("%scolumn_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumnConfig().get(i))))); + } + } + + // add `table` to the URL query string + if (getTable() != null) { + for (int i = 0; i < getTable().size(); i++) { + joiner.add(String.format("%stable%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTable().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResponse.java new file mode 100644 index 0000000..f9e73e4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompareDatasetRowResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetRowResponse + */ +@JsonPropertyOrder({ + CompareDatasetRowResponse.JSON_PROPERTY_STATUS, + CompareDatasetRowResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetRowResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CompareDatasetRowResult result; + + public CompareDatasetRowResponse() { + } + + public CompareDatasetRowResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompareDatasetRowResponse result(@javax.annotation.Nonnull CompareDatasetRowResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CompareDatasetRowResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CompareDatasetRowResult result) { + this.result = result; + } + + + /** + * Return true if this CompareDatasetRowResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetRowResponse compareDatasetRowResponse = (CompareDatasetRowResponse) o; + return Objects.equals(this.status, compareDatasetRowResponse.status) && + Objects.equals(this.result, compareDatasetRowResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetRowResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResult.java new file mode 100644 index 0000000..6acc345 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetRowResult.java @@ -0,0 +1,268 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetRowResult + */ +@JsonPropertyOrder({ + CompareDatasetRowResult.JSON_PROPERTY_PREV_ROW_ID, + CompareDatasetRowResult.JSON_PROPERTY_NEXT_ROW_ID, + CompareDatasetRowResult.JSON_PROPERTY_TABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetRowResult { + public static final String JSON_PROPERTY_PREV_ROW_ID = "prev_row_id"; + private JsonNullable prevRowId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NEXT_ROW_ID = "next_row_id"; + private JsonNullable nextRowId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TABLE = "table"; + @javax.annotation.Nonnull + private List> table = new ArrayList<>(); + + public CompareDatasetRowResult() { + } + + public CompareDatasetRowResult prevRowId(@javax.annotation.Nullable UUID prevRowId) { + this.prevRowId = JsonNullable.of(prevRowId); + return this; + } + + /** + * Get prevRowId + * @return prevRowId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPrevRowId() { + return prevRowId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREV_ROW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevRowId_JsonNullable() { + return prevRowId; + } + + @JsonProperty(JSON_PROPERTY_PREV_ROW_ID) + public void setPrevRowId_JsonNullable(JsonNullable prevRowId) { + this.prevRowId = prevRowId; + } + + public void setPrevRowId(@javax.annotation.Nullable UUID prevRowId) { + this.prevRowId = JsonNullable.of(prevRowId); + } + + + public CompareDatasetRowResult nextRowId(@javax.annotation.Nullable UUID nextRowId) { + this.nextRowId = JsonNullable.of(nextRowId); + return this; + } + + /** + * Get nextRowId + * @return nextRowId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getNextRowId() { + return nextRowId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT_ROW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNextRowId_JsonNullable() { + return nextRowId; + } + + @JsonProperty(JSON_PROPERTY_NEXT_ROW_ID) + public void setNextRowId_JsonNullable(JsonNullable nextRowId) { + this.nextRowId = nextRowId; + } + + public void setNextRowId(@javax.annotation.Nullable UUID nextRowId) { + this.nextRowId = JsonNullable.of(nextRowId); + } + + + public CompareDatasetRowResult table(@javax.annotation.Nonnull List> table) { + this.table = table; + return this; + } + + public CompareDatasetRowResult addTableItem(Map tableItem) { + if (this.table == null) { + this.table = new ArrayList<>(); + } + this.table.add(tableItem); + return this; + } + + /** + * Get table + * @return table + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getTable() { + return table; + } + + + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTable(@javax.annotation.Nonnull List> table) { + this.table = table; + } + + + /** + * Return true if this CompareDatasetRowResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetRowResult compareDatasetRowResult = (CompareDatasetRowResult) o; + return equalsNullable(this.prevRowId, compareDatasetRowResult.prevRowId) && + equalsNullable(this.nextRowId, compareDatasetRowResult.nextRowId) && + Objects.equals(this.table, compareDatasetRowResult.table); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(prevRowId), hashCodeNullable(nextRowId), table); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetRowResult {\n"); + sb.append(" prevRowId: ").append(toIndentedString(prevRowId)).append("\n"); + sb.append(" nextRowId: ").append(toIndentedString(nextRowId)).append("\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `prev_row_id` to the URL query string + if (getPrevRowId() != null) { + joiner.add(String.format("%sprev_row_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevRowId())))); + } + + // add `next_row_id` to the URL query string + if (getNextRowId() != null) { + joiner.add(String.format("%snext_row_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNextRowId())))); + } + + // add `table` to the URL query string + if (getTable() != null) { + for (int i = 0; i < getTable().size(); i++) { + joiner.add(String.format("%stable%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTable().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsRequest.java new file mode 100644 index 0000000..807a9b9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsRequest.java @@ -0,0 +1,275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetStatsRequest + */ +@JsonPropertyOrder({ + CompareDatasetStatsRequest.JSON_PROPERTY_BASE_COLUMN_NAME, + CompareDatasetStatsRequest.JSON_PROPERTY_DATASET_IDS, + CompareDatasetStatsRequest.JSON_PROPERTY_STAT_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetStatsRequest { + public static final String JSON_PROPERTY_BASE_COLUMN_NAME = "base_column_name"; + @javax.annotation.Nonnull + private String baseColumnName; + + public static final String JSON_PROPERTY_DATASET_IDS = "dataset_ids"; + @javax.annotation.Nonnull + private List datasetIds = new ArrayList<>(); + + /** + * Gets or Sets statType + */ + public enum StatTypeEnum { + EVALUATION(String.valueOf("evaluation")), + + RUN_PROMPT(String.valueOf("run_prompt")); + + private String value; + + StatTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatTypeEnum fromValue(String value) { + for (StatTypeEnum b : StatTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STAT_TYPE = "stat_type"; + @javax.annotation.Nullable + private StatTypeEnum statType = StatTypeEnum.EVALUATION; + + public CompareDatasetStatsRequest() { + } + + public CompareDatasetStatsRequest baseColumnName(@javax.annotation.Nonnull String baseColumnName) { + this.baseColumnName = baseColumnName; + return this; + } + + /** + * Get baseColumnName + * @return baseColumnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseColumnName() { + return baseColumnName; + } + + + @JsonProperty(JSON_PROPERTY_BASE_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseColumnName(@javax.annotation.Nonnull String baseColumnName) { + this.baseColumnName = baseColumnName; + } + + + public CompareDatasetStatsRequest datasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + return this; + } + + public CompareDatasetStatsRequest addDatasetIdsItem(UUID datasetIdsItem) { + if (this.datasetIds == null) { + this.datasetIds = new ArrayList<>(); + } + this.datasetIds.add(datasetIdsItem); + return this; + } + + /** + * Get datasetIds + * @return datasetIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasetIds() { + return datasetIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + } + + + public CompareDatasetStatsRequest statType(@javax.annotation.Nullable StatTypeEnum statType) { + this.statType = statType; + return this; + } + + /** + * Get statType + * @return statType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STAT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatTypeEnum getStatType() { + return statType; + } + + + @JsonProperty(JSON_PROPERTY_STAT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatType(@javax.annotation.Nullable StatTypeEnum statType) { + this.statType = statType; + } + + + /** + * Return true if this CompareDatasetStatsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetStatsRequest compareDatasetStatsRequest = (CompareDatasetStatsRequest) o; + return Objects.equals(this.baseColumnName, compareDatasetStatsRequest.baseColumnName) && + Objects.equals(this.datasetIds, compareDatasetStatsRequest.datasetIds) && + Objects.equals(this.statType, compareDatasetStatsRequest.statType); + } + + @Override + public int hashCode() { + return Objects.hash(baseColumnName, datasetIds, statType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetStatsRequest {\n"); + sb.append(" baseColumnName: ").append(toIndentedString(baseColumnName)).append("\n"); + sb.append(" datasetIds: ").append(toIndentedString(datasetIds)).append("\n"); + sb.append(" statType: ").append(toIndentedString(statType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `base_column_name` to the URL query string + if (getBaseColumnName() != null) { + joiner.add(String.format("%sbase_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBaseColumnName())))); + } + + // add `dataset_ids` to the URL query string + if (getDatasetIds() != null) { + for (int i = 0; i < getDatasetIds().size(); i++) { + if (getDatasetIds().get(i) != null) { + joiner.add(String.format("%sdataset_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetIds().get(i))))); + } + } + } + + // add `stat_type` to the URL query string + if (getStatType() != null) { + joiner.add(String.format("%sstat_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsResponse.java new file mode 100644 index 0000000..e47f1a8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareDatasetStatsResponse.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareDatasetStatsResponse + */ +@JsonPropertyOrder({ + CompareDatasetStatsResponse.JSON_PROPERTY_STATUS, + CompareDatasetStatsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareDatasetStatsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map>> result = new HashMap<>(); + + public CompareDatasetStatsResponse() { + } + + public CompareDatasetStatsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompareDatasetStatsResponse result(@javax.annotation.Nonnull Map>> result) { + this.result = result; + return this; + } + + public CompareDatasetStatsResponse putResultItem(String key, List> resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map>> getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map>> result) { + this.result = result; + } + + + /** + * Return true if this CompareDatasetStatsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareDatasetStatsResponse compareDatasetStatsResponse = (CompareDatasetStatsResponse) o; + return Objects.equals(this.status, compareDatasetStatsResponse.status) && + Objects.equals(this.result, compareDatasetStatsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareDatasetStatsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + joiner.add(String.format("%sresult%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResult().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResponse.java new file mode 100644 index 0000000..e1e7277 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompareEvalListResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareEvalListResponse + */ +@JsonPropertyOrder({ + CompareEvalListResponse.JSON_PROPERTY_STATUS, + CompareEvalListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareEvalListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CompareEvalListResult result; + + public CompareEvalListResponse() { + } + + public CompareEvalListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompareEvalListResponse result(@javax.annotation.Nonnull CompareEvalListResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CompareEvalListResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CompareEvalListResult result) { + this.result = result; + } + + + /** + * Return true if this CompareEvalListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareEvalListResponse compareEvalListResponse = (CompareEvalListResponse) o; + return Objects.equals(this.status, compareEvalListResponse.status) && + Objects.equals(this.result, compareEvalListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareEvalListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResult.java new file mode 100644 index 0000000..86b013e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalListResult.java @@ -0,0 +1,166 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareEvalListResult + */ +@JsonPropertyOrder({ + CompareEvalListResult.JSON_PROPERTY_EVALS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareEvalListResult { + public static final String JSON_PROPERTY_EVALS = "evals"; + @javax.annotation.Nonnull + private List> evals = new ArrayList<>(); + + public CompareEvalListResult() { + } + + public CompareEvalListResult evals(@javax.annotation.Nonnull List> evals) { + this.evals = evals; + return this; + } + + public CompareEvalListResult addEvalsItem(Map evalsItem) { + if (this.evals == null) { + this.evals = new ArrayList<>(); + } + this.evals.add(evalsItem); + return this; + } + + /** + * Get evals + * @return evals + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvals() { + return evals; + } + + + @JsonProperty(JSON_PROPERTY_EVALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvals(@javax.annotation.Nonnull List> evals) { + this.evals = evals; + } + + + /** + * Return true if this CompareEvalListResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareEvalListResult compareEvalListResult = (CompareEvalListResult) o; + return Objects.equals(this.evals, compareEvalListResult.evals); + } + + @Override + public int hashCode() { + return Objects.hash(evals); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareEvalListResult {\n"); + sb.append(" evals: ").append(toIndentedString(evals)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `evals` to the URL query string + if (getEvals() != null) { + for (int i = 0; i < getEvals().size(); i++) { + joiner.add(String.format("%sevals%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvals().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalsListRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalsListRequest.java new file mode 100644 index 0000000..0e90653 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareEvalsListRequest.java @@ -0,0 +1,273 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareEvalsListRequest + */ +@JsonPropertyOrder({ + CompareEvalsListRequest.JSON_PROPERTY_SEARCH_TEXT, + CompareEvalsListRequest.JSON_PROPERTY_EVAL_TYPE, + CompareEvalsListRequest.JSON_PROPERTY_DATASET_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareEvalsListRequest { + public static final String JSON_PROPERTY_SEARCH_TEXT = "search_text"; + @javax.annotation.Nullable + private String searchText = ""; + + /** + * Gets or Sets evalType + */ + public enum EvalTypeEnum { + USER(String.valueOf("user")); + + private String value; + + EvalTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EvalTypeEnum fromValue(String value) { + for (EvalTypeEnum b : EvalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nonnull + private EvalTypeEnum evalType; + + public static final String JSON_PROPERTY_DATASET_IDS = "dataset_ids"; + @javax.annotation.Nonnull + private List datasetIds = new ArrayList<>(); + + public CompareEvalsListRequest() { + } + + public CompareEvalsListRequest searchText(@javax.annotation.Nullable String searchText) { + this.searchText = searchText; + return this; + } + + /** + * Get searchText + * @return searchText + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSearchText() { + return searchText; + } + + + @JsonProperty(JSON_PROPERTY_SEARCH_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSearchText(@javax.annotation.Nullable String searchText) { + this.searchText = searchText; + } + + + public CompareEvalsListRequest evalType(@javax.annotation.Nonnull EvalTypeEnum evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTypeEnum getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalType(@javax.annotation.Nonnull EvalTypeEnum evalType) { + this.evalType = evalType; + } + + + public CompareEvalsListRequest datasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + return this; + } + + public CompareEvalsListRequest addDatasetIdsItem(UUID datasetIdsItem) { + if (this.datasetIds == null) { + this.datasetIds = new ArrayList<>(); + } + this.datasetIds.add(datasetIdsItem); + return this; + } + + /** + * Get datasetIds + * @return datasetIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasetIds() { + return datasetIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + } + + + /** + * Return true if this CompareEvalsListRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareEvalsListRequest compareEvalsListRequest = (CompareEvalsListRequest) o; + return Objects.equals(this.searchText, compareEvalsListRequest.searchText) && + Objects.equals(this.evalType, compareEvalsListRequest.evalType) && + Objects.equals(this.datasetIds, compareEvalsListRequest.datasetIds); + } + + @Override + public int hashCode() { + return Objects.hash(searchText, evalType, datasetIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareEvalsListRequest {\n"); + sb.append(" searchText: ").append(toIndentedString(searchText)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" datasetIds: ").append(toIndentedString(datasetIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `search_text` to the URL query string + if (getSearchText() != null) { + joiner.add(String.format("%ssearch_text%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSearchText())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `dataset_ids` to the URL query string + if (getDatasetIds() != null) { + for (int i = 0; i < getDatasetIds().size(); i++) { + if (getDatasetIds().get(i) != null) { + joiner.add(String.format("%sdataset_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareExperimentEvalRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareExperimentEvalRequest.java new file mode 100644 index 0000000..be3643b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareExperimentEvalRequest.java @@ -0,0 +1,590 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareExperimentEvalRequest + */ +@JsonPropertyOrder({ + CompareExperimentEvalRequest.JSON_PROPERTY_NAME, + CompareExperimentEvalRequest.JSON_PROPERTY_TEMPLATE_ID, + CompareExperimentEvalRequest.JSON_PROPERTY_CONFIG, + CompareExperimentEvalRequest.JSON_PROPERTY_KB_ID, + CompareExperimentEvalRequest.JSON_PROPERTY_ERROR_LOCALIZER, + CompareExperimentEvalRequest.JSON_PROPERTY_MODEL, + CompareExperimentEvalRequest.JSON_PROPERTY_EVAL_TYPE, + CompareExperimentEvalRequest.JSON_PROPERTY_RUN, + CompareExperimentEvalRequest.JSON_PROPERTY_SAVE_AS_TEMPLATE, + CompareExperimentEvalRequest.JSON_PROPERTY_EXPERIMENT_ID, + CompareExperimentEvalRequest.JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES, + CompareExperimentEvalRequest.JSON_PROPERTY_DATASET_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareExperimentEvalRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private String templateId; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nullable + private UUID kbId; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nullable + private String evalType; + + public static final String JSON_PROPERTY_RUN = "run"; + @javax.annotation.Nullable + private Boolean run = false; + + public static final String JSON_PROPERTY_SAVE_AS_TEMPLATE = "save_as_template"; + @javax.annotation.Nullable + private Boolean saveAsTemplate = false; + + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nullable + private UUID experimentId; + + public static final String JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES = "composite_weight_overrides"; + @javax.annotation.Nullable + private Map compositeWeightOverrides = new HashMap<>(); + + public static final String JSON_PROPERTY_DATASET_IDS = "dataset_ids"; + @javax.annotation.Nullable + private List datasetIds = new ArrayList<>(); + + public CompareExperimentEvalRequest() { + } + + public CompareExperimentEvalRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CompareExperimentEvalRequest templateId(@javax.annotation.Nonnull String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull String templateId) { + this.templateId = templateId; + } + + + public CompareExperimentEvalRequest config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public CompareExperimentEvalRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public CompareExperimentEvalRequest kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + } + + + public CompareExperimentEvalRequest errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public CompareExperimentEvalRequest model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public CompareExperimentEvalRequest evalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + } + + + public CompareExperimentEvalRequest run(@javax.annotation.Nullable Boolean run) { + this.run = run; + return this; + } + + /** + * Get run + * @return run + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRun() { + return run; + } + + + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRun(@javax.annotation.Nullable Boolean run) { + this.run = run; + } + + + public CompareExperimentEvalRequest saveAsTemplate(@javax.annotation.Nullable Boolean saveAsTemplate) { + this.saveAsTemplate = saveAsTemplate; + return this; + } + + /** + * Get saveAsTemplate + * @return saveAsTemplate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAVE_AS_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSaveAsTemplate() { + return saveAsTemplate; + } + + + @JsonProperty(JSON_PROPERTY_SAVE_AS_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSaveAsTemplate(@javax.annotation.Nullable Boolean saveAsTemplate) { + this.saveAsTemplate = saveAsTemplate; + } + + + public CompareExperimentEvalRequest experimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + } + + + public CompareExperimentEvalRequest compositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + return this; + } + + public CompareExperimentEvalRequest putCompositeWeightOverridesItem(String key, Object compositeWeightOverridesItem) { + if (this.compositeWeightOverrides == null) { + this.compositeWeightOverrides = new HashMap<>(); + } + this.compositeWeightOverrides.put(key, compositeWeightOverridesItem); + return this; + } + + /** + * Get compositeWeightOverrides + * @return compositeWeightOverrides + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCompositeWeightOverrides() { + return compositeWeightOverrides; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + } + + + public CompareExperimentEvalRequest datasetIds(@javax.annotation.Nullable List datasetIds) { + this.datasetIds = datasetIds; + return this; + } + + public CompareExperimentEvalRequest addDatasetIdsItem(UUID datasetIdsItem) { + if (this.datasetIds == null) { + this.datasetIds = new ArrayList<>(); + } + this.datasetIds.add(datasetIdsItem); + return this; + } + + /** + * Get datasetIds + * @return datasetIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasetIds() { + return datasetIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetIds(@javax.annotation.Nullable List datasetIds) { + this.datasetIds = datasetIds; + } + + + /** + * Return true if this CompareExperimentEvalRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareExperimentEvalRequest compareExperimentEvalRequest = (CompareExperimentEvalRequest) o; + return Objects.equals(this.name, compareExperimentEvalRequest.name) && + Objects.equals(this.templateId, compareExperimentEvalRequest.templateId) && + Objects.equals(this.config, compareExperimentEvalRequest.config) && + Objects.equals(this.kbId, compareExperimentEvalRequest.kbId) && + Objects.equals(this.errorLocalizer, compareExperimentEvalRequest.errorLocalizer) && + Objects.equals(this.model, compareExperimentEvalRequest.model) && + Objects.equals(this.evalType, compareExperimentEvalRequest.evalType) && + Objects.equals(this.run, compareExperimentEvalRequest.run) && + Objects.equals(this.saveAsTemplate, compareExperimentEvalRequest.saveAsTemplate) && + Objects.equals(this.experimentId, compareExperimentEvalRequest.experimentId) && + Objects.equals(this.compositeWeightOverrides, compareExperimentEvalRequest.compositeWeightOverrides) && + Objects.equals(this.datasetIds, compareExperimentEvalRequest.datasetIds); + } + + @Override + public int hashCode() { + return Objects.hash(name, templateId, config, kbId, errorLocalizer, model, evalType, run, saveAsTemplate, experimentId, compositeWeightOverrides, datasetIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareExperimentEvalRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" run: ").append(toIndentedString(run)).append("\n"); + sb.append(" saveAsTemplate: ").append(toIndentedString(saveAsTemplate)).append("\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" compositeWeightOverrides: ").append(toIndentedString(compositeWeightOverrides)).append("\n"); + sb.append(" datasetIds: ").append(toIndentedString(datasetIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `run` to the URL query string + if (getRun() != null) { + joiner.add(String.format("%srun%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRun())))); + } + + // add `save_as_template` to the URL query string + if (getSaveAsTemplate() != null) { + joiner.add(String.format("%ssave_as_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSaveAsTemplate())))); + } + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `composite_weight_overrides` to the URL query string + if (getCompositeWeightOverrides() != null) { + for (String _key : getCompositeWeightOverrides().keySet()) { + joiner.add(String.format("%scomposite_weight_overrides%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCompositeWeightOverrides().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCompositeWeightOverrides().get(_key))))); + } + } + + // add `dataset_ids` to the URL query string + if (getDatasetIds() != null) { + for (int i = 0; i < getDatasetIds().size(); i++) { + if (getDatasetIds().get(i) != null) { + joiner.add(String.format("%sdataset_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ComparePreviewRunEvalRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ComparePreviewRunEvalRequest.java new file mode 100644 index 0000000..a36add2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ComparePreviewRunEvalRequest.java @@ -0,0 +1,374 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ComparePreviewRunEvalRequest + */ +@JsonPropertyOrder({ + ComparePreviewRunEvalRequest.JSON_PROPERTY_CONFIG, + ComparePreviewRunEvalRequest.JSON_PROPERTY_MODEL, + ComparePreviewRunEvalRequest.JSON_PROPERTY_TEMPLATE_ID, + ComparePreviewRunEvalRequest.JSON_PROPERTY_DATASET_IDS, + ComparePreviewRunEvalRequest.JSON_PROPERTY_DATASET_INFO, + ComparePreviewRunEvalRequest.JSON_PROPERTY_SOURCE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ComparePreviewRunEvalRequest { + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model = ""; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_DATASET_IDS = "dataset_ids"; + @javax.annotation.Nonnull + private List datasetIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_INFO = "dataset_info"; + @javax.annotation.Nullable + private Map datasetInfo = new HashMap<>(); + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source = "dataset_evaluation"; + + public ComparePreviewRunEvalRequest() { + } + + public ComparePreviewRunEvalRequest config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public ComparePreviewRunEvalRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public ComparePreviewRunEvalRequest model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public ComparePreviewRunEvalRequest templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public ComparePreviewRunEvalRequest datasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + return this; + } + + public ComparePreviewRunEvalRequest addDatasetIdsItem(UUID datasetIdsItem) { + if (this.datasetIds == null) { + this.datasetIds = new ArrayList<>(); + } + this.datasetIds.add(datasetIdsItem); + return this; + } + + /** + * Get datasetIds + * @return datasetIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasetIds() { + return datasetIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetIds(@javax.annotation.Nonnull List datasetIds) { + this.datasetIds = datasetIds; + } + + + public ComparePreviewRunEvalRequest datasetInfo(@javax.annotation.Nullable Map datasetInfo) { + this.datasetInfo = datasetInfo; + return this; + } + + public ComparePreviewRunEvalRequest putDatasetInfoItem(String key, Object datasetInfoItem) { + if (this.datasetInfo == null) { + this.datasetInfo = new HashMap<>(); + } + this.datasetInfo.put(key, datasetInfoItem); + return this; + } + + /** + * Get datasetInfo + * @return datasetInfo + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDatasetInfo() { + return datasetInfo; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetInfo(@javax.annotation.Nullable Map datasetInfo) { + this.datasetInfo = datasetInfo; + } + + + public ComparePreviewRunEvalRequest source(@javax.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable String source) { + this.source = source; + } + + + /** + * Return true if this ComparePreviewRunEvalRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComparePreviewRunEvalRequest comparePreviewRunEvalRequest = (ComparePreviewRunEvalRequest) o; + return Objects.equals(this.config, comparePreviewRunEvalRequest.config) && + Objects.equals(this.model, comparePreviewRunEvalRequest.model) && + Objects.equals(this.templateId, comparePreviewRunEvalRequest.templateId) && + Objects.equals(this.datasetIds, comparePreviewRunEvalRequest.datasetIds) && + Objects.equals(this.datasetInfo, comparePreviewRunEvalRequest.datasetInfo) && + Objects.equals(this.source, comparePreviewRunEvalRequest.source); + } + + @Override + public int hashCode() { + return Objects.hash(config, model, templateId, datasetIds, datasetInfo, source); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ComparePreviewRunEvalRequest {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" datasetIds: ").append(toIndentedString(datasetIds)).append("\n"); + sb.append(" datasetInfo: ").append(toIndentedString(datasetInfo)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `dataset_ids` to the URL query string + if (getDatasetIds() != null) { + for (int i = 0; i < getDatasetIds().size(); i++) { + if (getDatasetIds().get(i) != null) { + joiner.add(String.format("%sdataset_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetIds().get(i))))); + } + } + } + + // add `dataset_info` to the URL query string + if (getDatasetInfo() != null) { + for (String _key : getDatasetInfo().keySet()) { + joiner.add(String.format("%sdataset_info%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDatasetInfo().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDatasetInfo().get(_key))))); + } + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareStartEvalsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareStartEvalsRequest.java new file mode 100644 index 0000000..f4b3c30 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompareStartEvalsRequest.java @@ -0,0 +1,216 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompareStartEvalsRequest + */ +@JsonPropertyOrder({ + CompareStartEvalsRequest.JSON_PROPERTY_USER_EVAL_NAMES, + CompareStartEvalsRequest.JSON_PROPERTY_DATASET_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompareStartEvalsRequest { + public static final String JSON_PROPERTY_USER_EVAL_NAMES = "user_eval_names"; + @javax.annotation.Nonnull + private List userEvalNames = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_IDS = "dataset_ids"; + @javax.annotation.Nullable + private List datasetIds = new ArrayList<>(); + + public CompareStartEvalsRequest() { + } + + public CompareStartEvalsRequest userEvalNames(@javax.annotation.Nonnull List userEvalNames) { + this.userEvalNames = userEvalNames; + return this; + } + + public CompareStartEvalsRequest addUserEvalNamesItem(String userEvalNamesItem) { + if (this.userEvalNames == null) { + this.userEvalNames = new ArrayList<>(); + } + this.userEvalNames.add(userEvalNamesItem); + return this; + } + + /** + * Get userEvalNames + * @return userEvalNames + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_EVAL_NAMES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getUserEvalNames() { + return userEvalNames; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_NAMES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserEvalNames(@javax.annotation.Nonnull List userEvalNames) { + this.userEvalNames = userEvalNames; + } + + + public CompareStartEvalsRequest datasetIds(@javax.annotation.Nullable List datasetIds) { + this.datasetIds = datasetIds; + return this; + } + + public CompareStartEvalsRequest addDatasetIdsItem(UUID datasetIdsItem) { + if (this.datasetIds == null) { + this.datasetIds = new ArrayList<>(); + } + this.datasetIds.add(datasetIdsItem); + return this; + } + + /** + * Get datasetIds + * @return datasetIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasetIds() { + return datasetIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetIds(@javax.annotation.Nullable List datasetIds) { + this.datasetIds = datasetIds; + } + + + /** + * Return true if this CompareStartEvalsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompareStartEvalsRequest compareStartEvalsRequest = (CompareStartEvalsRequest) o; + return Objects.equals(this.userEvalNames, compareStartEvalsRequest.userEvalNames) && + Objects.equals(this.datasetIds, compareStartEvalsRequest.datasetIds); + } + + @Override + public int hashCode() { + return Objects.hash(userEvalNames, datasetIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompareStartEvalsRequest {\n"); + sb.append(" userEvalNames: ").append(toIndentedString(userEvalNames)).append("\n"); + sb.append(" datasetIds: ").append(toIndentedString(datasetIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_eval_names` to the URL query string + if (getUserEvalNames() != null) { + for (int i = 0; i < getUserEvalNames().size(); i++) { + joiner.add(String.format("%suser_eval_names%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getUserEvalNames().get(i))))); + } + } + + // add `dataset_ids` to the URL query string + if (getDatasetIds() != null) { + for (int i = 0; i < getDatasetIds().size(); i++) { + if (getDatasetIds().get(i) != null) { + joiner.add(String.format("%sdataset_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildItem.java new file mode 100644 index 0000000..4479434 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildItem.java @@ -0,0 +1,448 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeChildItem + */ +@JsonPropertyOrder({ + CompositeChildItem.JSON_PROPERTY_CHILD_ID, + CompositeChildItem.JSON_PROPERTY_CHILD_NAME, + CompositeChildItem.JSON_PROPERTY_ORDER, + CompositeChildItem.JSON_PROPERTY_EVAL_TYPE, + CompositeChildItem.JSON_PROPERTY_PINNED_VERSION_ID, + CompositeChildItem.JSON_PROPERTY_PINNED_VERSION_NUMBER, + CompositeChildItem.JSON_PROPERTY_WEIGHT, + CompositeChildItem.JSON_PROPERTY_REQUIRED_KEYS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeChildItem { + public static final String JSON_PROPERTY_CHILD_ID = "child_id"; + @javax.annotation.Nonnull + private UUID childId; + + public static final String JSON_PROPERTY_CHILD_NAME = "child_name"; + @javax.annotation.Nonnull + private String childName; + + public static final String JSON_PROPERTY_ORDER = "order"; + @javax.annotation.Nonnull + private Integer order; + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nullable + private String evalType; + + public static final String JSON_PROPERTY_PINNED_VERSION_ID = "pinned_version_id"; + private JsonNullable pinnedVersionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PINNED_VERSION_NUMBER = "pinned_version_number"; + private JsonNullable pinnedVersionNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEIGHT = "weight"; + @javax.annotation.Nullable + private BigDecimal weight; + + public static final String JSON_PROPERTY_REQUIRED_KEYS = "required_keys"; + @javax.annotation.Nullable + private List requiredKeys = new ArrayList<>(); + + public CompositeChildItem() { + } + + public CompositeChildItem childId(@javax.annotation.Nonnull UUID childId) { + this.childId = childId; + return this; + } + + /** + * Get childId + * @return childId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILD_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getChildId() { + return childId; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildId(@javax.annotation.Nonnull UUID childId) { + this.childId = childId; + } + + + public CompositeChildItem childName(@javax.annotation.Nonnull String childName) { + this.childName = childName; + return this; + } + + /** + * Get childName + * @return childName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILD_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChildName() { + return childName; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildName(@javax.annotation.Nonnull String childName) { + this.childName = childName; + } + + + public CompositeChildItem order(@javax.annotation.Nonnull Integer order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getOrder() { + return order; + } + + + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrder(@javax.annotation.Nonnull Integer order) { + this.order = order; + } + + + public CompositeChildItem evalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + } + + + public CompositeChildItem pinnedVersionId(@javax.annotation.Nullable UUID pinnedVersionId) { + this.pinnedVersionId = JsonNullable.of(pinnedVersionId); + return this; + } + + /** + * Get pinnedVersionId + * @return pinnedVersionId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPinnedVersionId() { + return pinnedVersionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PINNED_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPinnedVersionId_JsonNullable() { + return pinnedVersionId; + } + + @JsonProperty(JSON_PROPERTY_PINNED_VERSION_ID) + public void setPinnedVersionId_JsonNullable(JsonNullable pinnedVersionId) { + this.pinnedVersionId = pinnedVersionId; + } + + public void setPinnedVersionId(@javax.annotation.Nullable UUID pinnedVersionId) { + this.pinnedVersionId = JsonNullable.of(pinnedVersionId); + } + + + public CompositeChildItem pinnedVersionNumber(@javax.annotation.Nullable Integer pinnedVersionNumber) { + this.pinnedVersionNumber = JsonNullable.of(pinnedVersionNumber); + return this; + } + + /** + * Get pinnedVersionNumber + * @return pinnedVersionNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getPinnedVersionNumber() { + return pinnedVersionNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PINNED_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPinnedVersionNumber_JsonNullable() { + return pinnedVersionNumber; + } + + @JsonProperty(JSON_PROPERTY_PINNED_VERSION_NUMBER) + public void setPinnedVersionNumber_JsonNullable(JsonNullable pinnedVersionNumber) { + this.pinnedVersionNumber = pinnedVersionNumber; + } + + public void setPinnedVersionNumber(@javax.annotation.Nullable Integer pinnedVersionNumber) { + this.pinnedVersionNumber = JsonNullable.of(pinnedVersionNumber); + } + + + public CompositeChildItem weight(@javax.annotation.Nullable BigDecimal weight) { + this.weight = weight; + return this; + } + + /** + * Get weight + * @return weight + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEIGHT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getWeight() { + return weight; + } + + + @JsonProperty(JSON_PROPERTY_WEIGHT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWeight(@javax.annotation.Nullable BigDecimal weight) { + this.weight = weight; + } + + + public CompositeChildItem requiredKeys(@javax.annotation.Nullable List requiredKeys) { + this.requiredKeys = requiredKeys; + return this; + } + + public CompositeChildItem addRequiredKeysItem(String requiredKeysItem) { + if (this.requiredKeys == null) { + this.requiredKeys = new ArrayList<>(); + } + this.requiredKeys.add(requiredKeysItem); + return this; + } + + /** + * Get requiredKeys + * @return requiredKeys + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRequiredKeys() { + return requiredKeys; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiredKeys(@javax.annotation.Nullable List requiredKeys) { + this.requiredKeys = requiredKeys; + } + + + /** + * Return true if this CompositeChildItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeChildItem compositeChildItem = (CompositeChildItem) o; + return Objects.equals(this.childId, compositeChildItem.childId) && + Objects.equals(this.childName, compositeChildItem.childName) && + Objects.equals(this.order, compositeChildItem.order) && + Objects.equals(this.evalType, compositeChildItem.evalType) && + equalsNullable(this.pinnedVersionId, compositeChildItem.pinnedVersionId) && + equalsNullable(this.pinnedVersionNumber, compositeChildItem.pinnedVersionNumber) && + Objects.equals(this.weight, compositeChildItem.weight) && + Objects.equals(this.requiredKeys, compositeChildItem.requiredKeys); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(childId, childName, order, evalType, hashCodeNullable(pinnedVersionId), hashCodeNullable(pinnedVersionNumber), weight, requiredKeys); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeChildItem {\n"); + sb.append(" childId: ").append(toIndentedString(childId)).append("\n"); + sb.append(" childName: ").append(toIndentedString(childName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" pinnedVersionId: ").append(toIndentedString(pinnedVersionId)).append("\n"); + sb.append(" pinnedVersionNumber: ").append(toIndentedString(pinnedVersionNumber)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append(" requiredKeys: ").append(toIndentedString(requiredKeys)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `child_id` to the URL query string + if (getChildId() != null) { + joiner.add(String.format("%schild_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChildId())))); + } + + // add `child_name` to the URL query string + if (getChildName() != null) { + joiner.add(String.format("%schild_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChildName())))); + } + + // add `order` to the URL query string + if (getOrder() != null) { + joiner.add(String.format("%sorder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrder())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `pinned_version_id` to the URL query string + if (getPinnedVersionId() != null) { + joiner.add(String.format("%spinned_version_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPinnedVersionId())))); + } + + // add `pinned_version_number` to the URL query string + if (getPinnedVersionNumber() != null) { + joiner.add(String.format("%spinned_version_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPinnedVersionNumber())))); + } + + // add `weight` to the URL query string + if (getWeight() != null) { + joiner.add(String.format("%sweight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWeight())))); + } + + // add `required_keys` to the URL query string + if (getRequiredKeys() != null) { + for (int i = 0; i < getRequiredKeys().size(); i++) { + joiner.add(String.format("%srequired_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRequiredKeys().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildResult.java new file mode 100644 index 0000000..a718e8b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeChildResult.java @@ -0,0 +1,625 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeChildResult + */ +@JsonPropertyOrder({ + CompositeChildResult.JSON_PROPERTY_CHILD_ID, + CompositeChildResult.JSON_PROPERTY_CHILD_NAME, + CompositeChildResult.JSON_PROPERTY_ORDER, + CompositeChildResult.JSON_PROPERTY_SCORE, + CompositeChildResult.JSON_PROPERTY_OUTPUT, + CompositeChildResult.JSON_PROPERTY_REASON, + CompositeChildResult.JSON_PROPERTY_OUTPUT_TYPE, + CompositeChildResult.JSON_PROPERTY_STATUS, + CompositeChildResult.JSON_PROPERTY_ERROR, + CompositeChildResult.JSON_PROPERTY_LOG_ID, + CompositeChildResult.JSON_PROPERTY_WEIGHT, + CompositeChildResult.JSON_PROPERTY_ERROR_LOCALIZER_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeChildResult { + public static final String JSON_PROPERTY_CHILD_ID = "child_id"; + @javax.annotation.Nonnull + private UUID childId; + + public static final String JSON_PROPERTY_CHILD_NAME = "child_name"; + @javax.annotation.Nonnull + private String childName; + + public static final String JSON_PROPERTY_ORDER = "order"; + @javax.annotation.Nonnull + private Integer order; + + public static final String JSON_PROPERTY_SCORE = "score"; + private JsonNullable score = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private Map output = new HashMap<>(); + + public static final String JSON_PROPERTY_REASON = "reason"; + private JsonNullable reason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + private JsonNullable outputType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LOG_ID = "log_id"; + private JsonNullable logId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEIGHT = "weight"; + @javax.annotation.Nullable + private BigDecimal weight; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER_RESULT = "error_localizer_result"; + @javax.annotation.Nullable + private Map errorLocalizerResult = new HashMap<>(); + + public CompositeChildResult() { + } + + public CompositeChildResult childId(@javax.annotation.Nonnull UUID childId) { + this.childId = childId; + return this; + } + + /** + * Get childId + * @return childId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILD_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getChildId() { + return childId; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildId(@javax.annotation.Nonnull UUID childId) { + this.childId = childId; + } + + + public CompositeChildResult childName(@javax.annotation.Nonnull String childName) { + this.childName = childName; + return this; + } + + /** + * Get childName + * @return childName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILD_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChildName() { + return childName; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildName(@javax.annotation.Nonnull String childName) { + this.childName = childName; + } + + + public CompositeChildResult order(@javax.annotation.Nonnull Integer order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getOrder() { + return order; + } + + + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrder(@javax.annotation.Nonnull Integer order) { + this.order = order; + } + + + public CompositeChildResult score(@javax.annotation.Nullable BigDecimal score) { + this.score = JsonNullable.of(score); + return this; + } + + /** + * Get score + * @return score + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getScore() { + return score.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScore_JsonNullable() { + return score; + } + + @JsonProperty(JSON_PROPERTY_SCORE) + public void setScore_JsonNullable(JsonNullable score) { + this.score = score; + } + + public void setScore(@javax.annotation.Nullable BigDecimal score) { + this.score = JsonNullable.of(score); + } + + + public CompositeChildResult output(@javax.annotation.Nullable Map output) { + this.output = output; + return this; + } + + public CompositeChildResult putOutputItem(String key, Object outputItem) { + if (this.output == null) { + this.output = new HashMap<>(); + } + this.output.put(key, outputItem); + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(@javax.annotation.Nullable Map output) { + this.output = output; + } + + + public CompositeChildResult reason(@javax.annotation.Nullable String reason) { + this.reason = JsonNullable.of(reason); + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + @JsonIgnore + public String getReason() { + return reason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReason_JsonNullable() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + public void setReason_JsonNullable(JsonNullable reason) { + this.reason = reason; + } + + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = JsonNullable.of(reason); + } + + + public CompositeChildResult outputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getOutputType() { + return outputType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutputType_JsonNullable() { + return outputType; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + public void setOutputType_JsonNullable(JsonNullable outputType) { + this.outputType = outputType; + } + + public void setOutputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + } + + + public CompositeChildResult status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public CompositeChildResult error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public CompositeChildResult logId(@javax.annotation.Nullable String logId) { + this.logId = JsonNullable.of(logId); + return this; + } + + /** + * Get logId + * @return logId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLogId() { + return logId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LOG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLogId_JsonNullable() { + return logId; + } + + @JsonProperty(JSON_PROPERTY_LOG_ID) + public void setLogId_JsonNullable(JsonNullable logId) { + this.logId = logId; + } + + public void setLogId(@javax.annotation.Nullable String logId) { + this.logId = JsonNullable.of(logId); + } + + + public CompositeChildResult weight(@javax.annotation.Nullable BigDecimal weight) { + this.weight = weight; + return this; + } + + /** + * Get weight + * @return weight + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEIGHT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getWeight() { + return weight; + } + + + @JsonProperty(JSON_PROPERTY_WEIGHT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWeight(@javax.annotation.Nullable BigDecimal weight) { + this.weight = weight; + } + + + public CompositeChildResult errorLocalizerResult(@javax.annotation.Nullable Map errorLocalizerResult) { + this.errorLocalizerResult = errorLocalizerResult; + return this; + } + + public CompositeChildResult putErrorLocalizerResultItem(String key, Object errorLocalizerResultItem) { + if (this.errorLocalizerResult == null) { + this.errorLocalizerResult = new HashMap<>(); + } + this.errorLocalizerResult.put(key, errorLocalizerResultItem); + return this; + } + + /** + * Get errorLocalizerResult + * @return errorLocalizerResult + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_RESULT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getErrorLocalizerResult() { + return errorLocalizerResult; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_RESULT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizerResult(@javax.annotation.Nullable Map errorLocalizerResult) { + this.errorLocalizerResult = errorLocalizerResult; + } + + + /** + * Return true if this CompositeChildResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeChildResult compositeChildResult = (CompositeChildResult) o; + return Objects.equals(this.childId, compositeChildResult.childId) && + Objects.equals(this.childName, compositeChildResult.childName) && + Objects.equals(this.order, compositeChildResult.order) && + equalsNullable(this.score, compositeChildResult.score) && + Objects.equals(this.output, compositeChildResult.output) && + equalsNullable(this.reason, compositeChildResult.reason) && + equalsNullable(this.outputType, compositeChildResult.outputType) && + Objects.equals(this.status, compositeChildResult.status) && + equalsNullable(this.error, compositeChildResult.error) && + equalsNullable(this.logId, compositeChildResult.logId) && + Objects.equals(this.weight, compositeChildResult.weight) && + Objects.equals(this.errorLocalizerResult, compositeChildResult.errorLocalizerResult); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(childId, childName, order, hashCodeNullable(score), output, hashCodeNullable(reason), hashCodeNullable(outputType), status, hashCodeNullable(error), hashCodeNullable(logId), weight, errorLocalizerResult); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeChildResult {\n"); + sb.append(" childId: ").append(toIndentedString(childId)).append("\n"); + sb.append(" childName: ").append(toIndentedString(childName)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" logId: ").append(toIndentedString(logId)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append(" errorLocalizerResult: ").append(toIndentedString(errorLocalizerResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `child_id` to the URL query string + if (getChildId() != null) { + joiner.add(String.format("%schild_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChildId())))); + } + + // add `child_name` to the URL query string + if (getChildName() != null) { + joiner.add(String.format("%schild_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getChildName())))); + } + + // add `order` to the URL query string + if (getOrder() != null) { + joiner.add(String.format("%sorder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrder())))); + } + + // add `score` to the URL query string + if (getScore() != null) { + joiner.add(String.format("%sscore%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScore())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReason())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `log_id` to the URL query string + if (getLogId() != null) { + joiner.add(String.format("%slog_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLogId())))); + } + + // add `weight` to the URL query string + if (getWeight() != null) { + joiner.add(String.format("%sweight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWeight())))); + } + + // add `error_localizer_result` to the URL query string + if (getErrorLocalizerResult() != null) { + for (String _key : getErrorLocalizerResult().keySet()) { + joiner.add(String.format("%serror_localizer_result%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getErrorLocalizerResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizerResult().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalAdhocExecuteRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalAdhocExecuteRequest.java new file mode 100644 index 0000000..10bf73e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalAdhocExecuteRequest.java @@ -0,0 +1,923 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalAdhocExecuteRequest + */ +@JsonPropertyOrder({ + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_MAPPING, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_MODEL, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_CONFIG, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_ERROR_LOCALIZER, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_INPUT_DATA_TYPES, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_SPAN_CONTEXT, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_TRACE_CONTEXT, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_SESSION_CONTEXT, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_CALL_CONTEXT, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_ROW_CONTEXT, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_CHILD_TEMPLATE_IDS, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_AGGREGATION_ENABLED, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_AGGREGATION_FUNCTION, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_COMPOSITE_CHILD_AXIS, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_CHILD_WEIGHTS, + CompositeEvalAdhocExecuteRequest.JSON_PROPERTY_PASS_THRESHOLD +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalAdhocExecuteRequest { + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nonnull + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_INPUT_DATA_TYPES = "input_data_types"; + @javax.annotation.Nullable + private Map inputDataTypes = new HashMap<>(); + + public static final String JSON_PROPERTY_SPAN_CONTEXT = "span_context"; + @javax.annotation.Nullable + private Map spanContext = new HashMap<>(); + + public static final String JSON_PROPERTY_TRACE_CONTEXT = "trace_context"; + @javax.annotation.Nullable + private Map traceContext = new HashMap<>(); + + public static final String JSON_PROPERTY_SESSION_CONTEXT = "session_context"; + @javax.annotation.Nullable + private Map sessionContext = new HashMap<>(); + + public static final String JSON_PROPERTY_CALL_CONTEXT = "call_context"; + @javax.annotation.Nullable + private Map callContext = new HashMap<>(); + + public static final String JSON_PROPERTY_ROW_CONTEXT = "row_context"; + @javax.annotation.Nullable + private Map rowContext = new HashMap<>(); + + public static final String JSON_PROPERTY_CHILD_TEMPLATE_IDS = "child_template_ids"; + @javax.annotation.Nonnull + private List childTemplateIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_AGGREGATION_ENABLED = "aggregation_enabled"; + @javax.annotation.Nullable + private Boolean aggregationEnabled = true; + + /** + * Gets or Sets aggregationFunction + */ + public enum AggregationFunctionEnum { + WEIGHTED_AVG(String.valueOf("weighted_avg")), + + AVG(String.valueOf("avg")), + + MIN(String.valueOf("min")), + + MAX(String.valueOf("max")), + + PASS_RATE(String.valueOf("pass_rate")); + + private String value; + + AggregationFunctionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AggregationFunctionEnum fromValue(String value) { + for (AggregationFunctionEnum b : AggregationFunctionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AGGREGATION_FUNCTION = "aggregation_function"; + @javax.annotation.Nullable + private AggregationFunctionEnum aggregationFunction = AggregationFunctionEnum.WEIGHTED_AVG; + + /** + * Gets or Sets compositeChildAxis + */ + public enum CompositeChildAxisEnum { + EMPTY(String.valueOf("")), + + PASS_FAIL(String.valueOf("pass_fail")), + + PERCENTAGE(String.valueOf("percentage")), + + CHOICES(String.valueOf("choices")), + + CODE(String.valueOf("code")); + + private String value; + + CompositeChildAxisEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CompositeChildAxisEnum fromValue(String value) { + for (CompositeChildAxisEnum b : CompositeChildAxisEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_COMPOSITE_CHILD_AXIS = "composite_child_axis"; + @javax.annotation.Nullable + private CompositeChildAxisEnum compositeChildAxis = CompositeChildAxisEnum.EMPTY; + + public static final String JSON_PROPERTY_CHILD_WEIGHTS = "child_weights"; + @javax.annotation.Nullable + private Map childWeights = new HashMap<>(); + + public static final String JSON_PROPERTY_PASS_THRESHOLD = "pass_threshold"; + @javax.annotation.Nullable + private BigDecimal passThreshold = new BigDecimal("0.5"); + + public CompositeEvalAdhocExecuteRequest() { + } + + public CompositeEvalAdhocExecuteRequest mapping(@javax.annotation.Nonnull Map mapping) { + this.mapping = mapping; + return this; + } + + public CompositeEvalAdhocExecuteRequest putMappingItem(String key, Object mappingItem) { + if (this.mapping == null) { + this.mapping = new HashMap<>(); + } + this.mapping.put(key, mappingItem); + return this; + } + + /** + * Get mapping + * @return mapping + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getMapping() { + return mapping; + } + + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setMapping(@javax.annotation.Nonnull Map mapping) { + this.mapping = mapping; + } + + + public CompositeEvalAdhocExecuteRequest model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public CompositeEvalAdhocExecuteRequest config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public CompositeEvalAdhocExecuteRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public CompositeEvalAdhocExecuteRequest errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public CompositeEvalAdhocExecuteRequest inputDataTypes(@javax.annotation.Nullable Map inputDataTypes) { + this.inputDataTypes = inputDataTypes; + return this; + } + + public CompositeEvalAdhocExecuteRequest putInputDataTypesItem(String key, Object inputDataTypesItem) { + if (this.inputDataTypes == null) { + this.inputDataTypes = new HashMap<>(); + } + this.inputDataTypes.put(key, inputDataTypesItem); + return this; + } + + /** + * Get inputDataTypes + * @return inputDataTypes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_DATA_TYPES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInputDataTypes() { + return inputDataTypes; + } + + + @JsonProperty(JSON_PROPERTY_INPUT_DATA_TYPES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setInputDataTypes(@javax.annotation.Nullable Map inputDataTypes) { + this.inputDataTypes = inputDataTypes; + } + + + public CompositeEvalAdhocExecuteRequest spanContext(@javax.annotation.Nullable Map spanContext) { + this.spanContext = spanContext; + return this; + } + + public CompositeEvalAdhocExecuteRequest putSpanContextItem(String key, Object spanContextItem) { + if (this.spanContext == null) { + this.spanContext = new HashMap<>(); + } + this.spanContext.put(key, spanContextItem); + return this; + } + + /** + * Get spanContext + * @return spanContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPAN_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSpanContext() { + return spanContext; + } + + + @JsonProperty(JSON_PROPERTY_SPAN_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSpanContext(@javax.annotation.Nullable Map spanContext) { + this.spanContext = spanContext; + } + + + public CompositeEvalAdhocExecuteRequest traceContext(@javax.annotation.Nullable Map traceContext) { + this.traceContext = traceContext; + return this; + } + + public CompositeEvalAdhocExecuteRequest putTraceContextItem(String key, Object traceContextItem) { + if (this.traceContext == null) { + this.traceContext = new HashMap<>(); + } + this.traceContext.put(key, traceContextItem); + return this; + } + + /** + * Get traceContext + * @return traceContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTraceContext() { + return traceContext; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTraceContext(@javax.annotation.Nullable Map traceContext) { + this.traceContext = traceContext; + } + + + public CompositeEvalAdhocExecuteRequest sessionContext(@javax.annotation.Nullable Map sessionContext) { + this.sessionContext = sessionContext; + return this; + } + + public CompositeEvalAdhocExecuteRequest putSessionContextItem(String key, Object sessionContextItem) { + if (this.sessionContext == null) { + this.sessionContext = new HashMap<>(); + } + this.sessionContext.put(key, sessionContextItem); + return this; + } + + /** + * Get sessionContext + * @return sessionContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSessionContext() { + return sessionContext; + } + + + @JsonProperty(JSON_PROPERTY_SESSION_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSessionContext(@javax.annotation.Nullable Map sessionContext) { + this.sessionContext = sessionContext; + } + + + public CompositeEvalAdhocExecuteRequest callContext(@javax.annotation.Nullable Map callContext) { + this.callContext = callContext; + return this; + } + + public CompositeEvalAdhocExecuteRequest putCallContextItem(String key, Object callContextItem) { + if (this.callContext == null) { + this.callContext = new HashMap<>(); + } + this.callContext.put(key, callContextItem); + return this; + } + + /** + * Get callContext + * @return callContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCallContext() { + return callContext; + } + + + @JsonProperty(JSON_PROPERTY_CALL_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCallContext(@javax.annotation.Nullable Map callContext) { + this.callContext = callContext; + } + + + public CompositeEvalAdhocExecuteRequest rowContext(@javax.annotation.Nullable Map rowContext) { + this.rowContext = rowContext; + return this; + } + + public CompositeEvalAdhocExecuteRequest putRowContextItem(String key, Object rowContextItem) { + if (this.rowContext == null) { + this.rowContext = new HashMap<>(); + } + this.rowContext.put(key, rowContextItem); + return this; + } + + /** + * Get rowContext + * @return rowContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRowContext() { + return rowContext; + } + + + @JsonProperty(JSON_PROPERTY_ROW_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRowContext(@javax.annotation.Nullable Map rowContext) { + this.rowContext = rowContext; + } + + + public CompositeEvalAdhocExecuteRequest childTemplateIds(@javax.annotation.Nonnull List childTemplateIds) { + this.childTemplateIds = childTemplateIds; + return this; + } + + public CompositeEvalAdhocExecuteRequest addChildTemplateIdsItem(UUID childTemplateIdsItem) { + if (this.childTemplateIds == null) { + this.childTemplateIds = new ArrayList<>(); + } + this.childTemplateIds.add(childTemplateIdsItem); + return this; + } + + /** + * Get childTemplateIds + * @return childTemplateIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILD_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChildTemplateIds() { + return childTemplateIds; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildTemplateIds(@javax.annotation.Nonnull List childTemplateIds) { + this.childTemplateIds = childTemplateIds; + } + + + public CompositeEvalAdhocExecuteRequest aggregationEnabled(@javax.annotation.Nullable Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + return this; + } + + /** + * Get aggregationEnabled + * @return aggregationEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAggregationEnabled() { + return aggregationEnabled; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAggregationEnabled(@javax.annotation.Nullable Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + } + + + public CompositeEvalAdhocExecuteRequest aggregationFunction(@javax.annotation.Nullable AggregationFunctionEnum aggregationFunction) { + this.aggregationFunction = aggregationFunction; + return this; + } + + /** + * Get aggregationFunction + * @return aggregationFunction + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AggregationFunctionEnum getAggregationFunction() { + return aggregationFunction; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAggregationFunction(@javax.annotation.Nullable AggregationFunctionEnum aggregationFunction) { + this.aggregationFunction = aggregationFunction; + } + + + public CompositeEvalAdhocExecuteRequest compositeChildAxis(@javax.annotation.Nullable CompositeChildAxisEnum compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + return this; + } + + /** + * Get compositeChildAxis + * @return compositeChildAxis + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CompositeChildAxisEnum getCompositeChildAxis() { + return compositeChildAxis; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeChildAxis(@javax.annotation.Nullable CompositeChildAxisEnum compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + } + + + public CompositeEvalAdhocExecuteRequest childWeights(@javax.annotation.Nullable Map childWeights) { + this.childWeights = childWeights; + return this; + } + + public CompositeEvalAdhocExecuteRequest putChildWeightsItem(String key, Object childWeightsItem) { + if (this.childWeights == null) { + this.childWeights = new HashMap<>(); + } + this.childWeights.put(key, childWeightsItem); + return this; + } + + /** + * Get childWeights + * @return childWeights + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHILD_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChildWeights() { + return childWeights; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChildWeights(@javax.annotation.Nullable Map childWeights) { + this.childWeights = childWeights; + } + + + public CompositeEvalAdhocExecuteRequest passThreshold(@javax.annotation.Nullable BigDecimal passThreshold) { + this.passThreshold = passThreshold; + return this; + } + + /** + * Get passThreshold + * @return passThreshold + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getPassThreshold() { + return passThreshold; + } + + + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassThreshold(@javax.annotation.Nullable BigDecimal passThreshold) { + this.passThreshold = passThreshold; + } + + + /** + * Return true if this CompositeEvalAdhocExecuteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalAdhocExecuteRequest compositeEvalAdhocExecuteRequest = (CompositeEvalAdhocExecuteRequest) o; + return Objects.equals(this.mapping, compositeEvalAdhocExecuteRequest.mapping) && + equalsNullable(this.model, compositeEvalAdhocExecuteRequest.model) && + Objects.equals(this.config, compositeEvalAdhocExecuteRequest.config) && + Objects.equals(this.errorLocalizer, compositeEvalAdhocExecuteRequest.errorLocalizer) && + Objects.equals(this.inputDataTypes, compositeEvalAdhocExecuteRequest.inputDataTypes) && + Objects.equals(this.spanContext, compositeEvalAdhocExecuteRequest.spanContext) && + Objects.equals(this.traceContext, compositeEvalAdhocExecuteRequest.traceContext) && + Objects.equals(this.sessionContext, compositeEvalAdhocExecuteRequest.sessionContext) && + Objects.equals(this.callContext, compositeEvalAdhocExecuteRequest.callContext) && + Objects.equals(this.rowContext, compositeEvalAdhocExecuteRequest.rowContext) && + Objects.equals(this.childTemplateIds, compositeEvalAdhocExecuteRequest.childTemplateIds) && + Objects.equals(this.aggregationEnabled, compositeEvalAdhocExecuteRequest.aggregationEnabled) && + Objects.equals(this.aggregationFunction, compositeEvalAdhocExecuteRequest.aggregationFunction) && + Objects.equals(this.compositeChildAxis, compositeEvalAdhocExecuteRequest.compositeChildAxis) && + Objects.equals(this.childWeights, compositeEvalAdhocExecuteRequest.childWeights) && + Objects.equals(this.passThreshold, compositeEvalAdhocExecuteRequest.passThreshold); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mapping, hashCodeNullable(model), config, errorLocalizer, inputDataTypes, spanContext, traceContext, sessionContext, callContext, rowContext, childTemplateIds, aggregationEnabled, aggregationFunction, compositeChildAxis, childWeights, passThreshold); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalAdhocExecuteRequest {\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" inputDataTypes: ").append(toIndentedString(inputDataTypes)).append("\n"); + sb.append(" spanContext: ").append(toIndentedString(spanContext)).append("\n"); + sb.append(" traceContext: ").append(toIndentedString(traceContext)).append("\n"); + sb.append(" sessionContext: ").append(toIndentedString(sessionContext)).append("\n"); + sb.append(" callContext: ").append(toIndentedString(callContext)).append("\n"); + sb.append(" rowContext: ").append(toIndentedString(rowContext)).append("\n"); + sb.append(" childTemplateIds: ").append(toIndentedString(childTemplateIds)).append("\n"); + sb.append(" aggregationEnabled: ").append(toIndentedString(aggregationEnabled)).append("\n"); + sb.append(" aggregationFunction: ").append(toIndentedString(aggregationFunction)).append("\n"); + sb.append(" compositeChildAxis: ").append(toIndentedString(compositeChildAxis)).append("\n"); + sb.append(" childWeights: ").append(toIndentedString(childWeights)).append("\n"); + sb.append(" passThreshold: ").append(toIndentedString(passThreshold)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `input_data_types` to the URL query string + if (getInputDataTypes() != null) { + for (String _key : getInputDataTypes().keySet()) { + joiner.add(String.format("%sinput_data_types%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputDataTypes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputDataTypes().get(_key))))); + } + } + + // add `span_context` to the URL query string + if (getSpanContext() != null) { + for (String _key : getSpanContext().keySet()) { + joiner.add(String.format("%sspan_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSpanContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSpanContext().get(_key))))); + } + } + + // add `trace_context` to the URL query string + if (getTraceContext() != null) { + for (String _key : getTraceContext().keySet()) { + joiner.add(String.format("%strace_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTraceContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTraceContext().get(_key))))); + } + } + + // add `session_context` to the URL query string + if (getSessionContext() != null) { + for (String _key : getSessionContext().keySet()) { + joiner.add(String.format("%ssession_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSessionContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSessionContext().get(_key))))); + } + } + + // add `call_context` to the URL query string + if (getCallContext() != null) { + for (String _key : getCallContext().keySet()) { + joiner.add(String.format("%scall_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCallContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCallContext().get(_key))))); + } + } + + // add `row_context` to the URL query string + if (getRowContext() != null) { + for (String _key : getRowContext().keySet()) { + joiner.add(String.format("%srow_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRowContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRowContext().get(_key))))); + } + } + + // add `child_template_ids` to the URL query string + if (getChildTemplateIds() != null) { + for (int i = 0; i < getChildTemplateIds().size(); i++) { + if (getChildTemplateIds().get(i) != null) { + joiner.add(String.format("%schild_template_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getChildTemplateIds().get(i))))); + } + } + } + + // add `aggregation_enabled` to the URL query string + if (getAggregationEnabled() != null) { + joiner.add(String.format("%saggregation_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationEnabled())))); + } + + // add `aggregation_function` to the URL query string + if (getAggregationFunction() != null) { + joiner.add(String.format("%saggregation_function%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationFunction())))); + } + + // add `composite_child_axis` to the URL query string + if (getCompositeChildAxis() != null) { + joiner.add(String.format("%scomposite_child_axis%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeChildAxis())))); + } + + // add `child_weights` to the URL query string + if (getChildWeights() != null) { + for (String _key : getChildWeights().keySet()) { + joiner.add(String.format("%schild_weights%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChildWeights().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChildWeights().get(_key))))); + } + } + + // add `pass_threshold` to the URL query string + if (getPassThreshold() != null) { + joiner.add(String.format("%spass_threshold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassThreshold())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateRequest.java new file mode 100644 index 0000000..eeb6bec --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateRequest.java @@ -0,0 +1,550 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalCreateRequest + */ +@JsonPropertyOrder({ + CompositeEvalCreateRequest.JSON_PROPERTY_NAME, + CompositeEvalCreateRequest.JSON_PROPERTY_DESCRIPTION, + CompositeEvalCreateRequest.JSON_PROPERTY_TAGS, + CompositeEvalCreateRequest.JSON_PROPERTY_CHILD_TEMPLATE_IDS, + CompositeEvalCreateRequest.JSON_PROPERTY_AGGREGATION_ENABLED, + CompositeEvalCreateRequest.JSON_PROPERTY_AGGREGATION_FUNCTION, + CompositeEvalCreateRequest.JSON_PROPERTY_CHILD_WEIGHTS, + CompositeEvalCreateRequest.JSON_PROPERTY_COMPOSITE_CHILD_AXIS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalCreateRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_CHILD_TEMPLATE_IDS = "child_template_ids"; + @javax.annotation.Nonnull + private List childTemplateIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_AGGREGATION_ENABLED = "aggregation_enabled"; + @javax.annotation.Nullable + private Boolean aggregationEnabled = true; + + /** + * Gets or Sets aggregationFunction + */ + public enum AggregationFunctionEnum { + WEIGHTED_AVG(String.valueOf("weighted_avg")), + + AVG(String.valueOf("avg")), + + MIN(String.valueOf("min")), + + MAX(String.valueOf("max")), + + PASS_RATE(String.valueOf("pass_rate")); + + private String value; + + AggregationFunctionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AggregationFunctionEnum fromValue(String value) { + for (AggregationFunctionEnum b : AggregationFunctionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AGGREGATION_FUNCTION = "aggregation_function"; + @javax.annotation.Nullable + private AggregationFunctionEnum aggregationFunction = AggregationFunctionEnum.WEIGHTED_AVG; + + public static final String JSON_PROPERTY_CHILD_WEIGHTS = "child_weights"; + @javax.annotation.Nullable + private Map childWeights = new HashMap<>(); + + /** + * Gets or Sets compositeChildAxis + */ + public enum CompositeChildAxisEnum { + EMPTY(String.valueOf("")), + + PASS_FAIL(String.valueOf("pass_fail")), + + PERCENTAGE(String.valueOf("percentage")), + + CHOICES(String.valueOf("choices")), + + CODE(String.valueOf("code")); + + private String value; + + CompositeChildAxisEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CompositeChildAxisEnum fromValue(String value) { + for (CompositeChildAxisEnum b : CompositeChildAxisEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_COMPOSITE_CHILD_AXIS = "composite_child_axis"; + @javax.annotation.Nullable + private CompositeChildAxisEnum compositeChildAxis = CompositeChildAxisEnum.EMPTY; + + public CompositeEvalCreateRequest() { + } + + public CompositeEvalCreateRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CompositeEvalCreateRequest description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public CompositeEvalCreateRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public CompositeEvalCreateRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public CompositeEvalCreateRequest childTemplateIds(@javax.annotation.Nonnull List childTemplateIds) { + this.childTemplateIds = childTemplateIds; + return this; + } + + public CompositeEvalCreateRequest addChildTemplateIdsItem(UUID childTemplateIdsItem) { + if (this.childTemplateIds == null) { + this.childTemplateIds = new ArrayList<>(); + } + this.childTemplateIds.add(childTemplateIdsItem); + return this; + } + + /** + * Get childTemplateIds + * @return childTemplateIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILD_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChildTemplateIds() { + return childTemplateIds; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildTemplateIds(@javax.annotation.Nonnull List childTemplateIds) { + this.childTemplateIds = childTemplateIds; + } + + + public CompositeEvalCreateRequest aggregationEnabled(@javax.annotation.Nullable Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + return this; + } + + /** + * Get aggregationEnabled + * @return aggregationEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAggregationEnabled() { + return aggregationEnabled; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAggregationEnabled(@javax.annotation.Nullable Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + } + + + public CompositeEvalCreateRequest aggregationFunction(@javax.annotation.Nullable AggregationFunctionEnum aggregationFunction) { + this.aggregationFunction = aggregationFunction; + return this; + } + + /** + * Get aggregationFunction + * @return aggregationFunction + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AggregationFunctionEnum getAggregationFunction() { + return aggregationFunction; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAggregationFunction(@javax.annotation.Nullable AggregationFunctionEnum aggregationFunction) { + this.aggregationFunction = aggregationFunction; + } + + + public CompositeEvalCreateRequest childWeights(@javax.annotation.Nullable Map childWeights) { + this.childWeights = childWeights; + return this; + } + + public CompositeEvalCreateRequest putChildWeightsItem(String key, Object childWeightsItem) { + if (this.childWeights == null) { + this.childWeights = new HashMap<>(); + } + this.childWeights.put(key, childWeightsItem); + return this; + } + + /** + * Get childWeights + * @return childWeights + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHILD_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChildWeights() { + return childWeights; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChildWeights(@javax.annotation.Nullable Map childWeights) { + this.childWeights = childWeights; + } + + + public CompositeEvalCreateRequest compositeChildAxis(@javax.annotation.Nullable CompositeChildAxisEnum compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + return this; + } + + /** + * Get compositeChildAxis + * @return compositeChildAxis + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CompositeChildAxisEnum getCompositeChildAxis() { + return compositeChildAxis; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeChildAxis(@javax.annotation.Nullable CompositeChildAxisEnum compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + } + + + /** + * Return true if this CompositeEvalCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalCreateRequest compositeEvalCreateRequest = (CompositeEvalCreateRequest) o; + return Objects.equals(this.name, compositeEvalCreateRequest.name) && + equalsNullable(this.description, compositeEvalCreateRequest.description) && + Objects.equals(this.tags, compositeEvalCreateRequest.tags) && + Objects.equals(this.childTemplateIds, compositeEvalCreateRequest.childTemplateIds) && + Objects.equals(this.aggregationEnabled, compositeEvalCreateRequest.aggregationEnabled) && + Objects.equals(this.aggregationFunction, compositeEvalCreateRequest.aggregationFunction) && + Objects.equals(this.childWeights, compositeEvalCreateRequest.childWeights) && + Objects.equals(this.compositeChildAxis, compositeEvalCreateRequest.compositeChildAxis); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, hashCodeNullable(description), tags, childTemplateIds, aggregationEnabled, aggregationFunction, childWeights, compositeChildAxis); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalCreateRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" childTemplateIds: ").append(toIndentedString(childTemplateIds)).append("\n"); + sb.append(" aggregationEnabled: ").append(toIndentedString(aggregationEnabled)).append("\n"); + sb.append(" aggregationFunction: ").append(toIndentedString(aggregationFunction)).append("\n"); + sb.append(" childWeights: ").append(toIndentedString(childWeights)).append("\n"); + sb.append(" compositeChildAxis: ").append(toIndentedString(compositeChildAxis)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `child_template_ids` to the URL query string + if (getChildTemplateIds() != null) { + for (int i = 0; i < getChildTemplateIds().size(); i++) { + if (getChildTemplateIds().get(i) != null) { + joiner.add(String.format("%schild_template_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getChildTemplateIds().get(i))))); + } + } + } + + // add `aggregation_enabled` to the URL query string + if (getAggregationEnabled() != null) { + joiner.add(String.format("%saggregation_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationEnabled())))); + } + + // add `aggregation_function` to the URL query string + if (getAggregationFunction() != null) { + joiner.add(String.format("%saggregation_function%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationFunction())))); + } + + // add `child_weights` to the URL query string + if (getChildWeights() != null) { + for (String _key : getChildWeights().keySet()) { + joiner.add(String.format("%schild_weights%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChildWeights().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChildWeights().get(_key))))); + } + } + + // add `composite_child_axis` to the URL query string + if (getCompositeChildAxis() != null) { + joiner.add(String.format("%scomposite_child_axis%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeChildAxis())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponse.java new file mode 100644 index 0000000..43914f0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompositeEvalCreateResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalCreateResponse + */ +@JsonPropertyOrder({ + CompositeEvalCreateResponse.JSON_PROPERTY_STATUS, + CompositeEvalCreateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalCreateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CompositeEvalCreateResponseResult result; + + public CompositeEvalCreateResponse() { + } + + public CompositeEvalCreateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompositeEvalCreateResponse result(@javax.annotation.Nonnull CompositeEvalCreateResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CompositeEvalCreateResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CompositeEvalCreateResponseResult result) { + this.result = result; + } + + + /** + * Return true if this CompositeEvalCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalCreateResponse compositeEvalCreateResponse = (CompositeEvalCreateResponse) o; + return Objects.equals(this.status, compositeEvalCreateResponse.status) && + Objects.equals(this.result, compositeEvalCreateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalCreateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponseResult.java new file mode 100644 index 0000000..dba48a5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalCreateResponseResult.java @@ -0,0 +1,384 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompositeChildItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalCreateResponseResult + */ +@JsonPropertyOrder({ + CompositeEvalCreateResponseResult.JSON_PROPERTY_ID, + CompositeEvalCreateResponseResult.JSON_PROPERTY_NAME, + CompositeEvalCreateResponseResult.JSON_PROPERTY_TEMPLATE_TYPE, + CompositeEvalCreateResponseResult.JSON_PROPERTY_AGGREGATION_ENABLED, + CompositeEvalCreateResponseResult.JSON_PROPERTY_AGGREGATION_FUNCTION, + CompositeEvalCreateResponseResult.JSON_PROPERTY_COMPOSITE_CHILD_AXIS, + CompositeEvalCreateResponseResult.JSON_PROPERTY_CHILDREN +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalCreateResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TEMPLATE_TYPE = "template_type"; + @javax.annotation.Nullable + private String templateType; + + public static final String JSON_PROPERTY_AGGREGATION_ENABLED = "aggregation_enabled"; + @javax.annotation.Nonnull + private Boolean aggregationEnabled; + + public static final String JSON_PROPERTY_AGGREGATION_FUNCTION = "aggregation_function"; + @javax.annotation.Nonnull + private String aggregationFunction; + + public static final String JSON_PROPERTY_COMPOSITE_CHILD_AXIS = "composite_child_axis"; + @javax.annotation.Nullable + private String compositeChildAxis; + + public static final String JSON_PROPERTY_CHILDREN = "children"; + @javax.annotation.Nonnull + private List children = new ArrayList<>(); + + public CompositeEvalCreateResponseResult() { + } + + public CompositeEvalCreateResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public CompositeEvalCreateResponseResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CompositeEvalCreateResponseResult templateType(@javax.annotation.Nullable String templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplateType() { + return templateType; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateType(@javax.annotation.Nullable String templateType) { + this.templateType = templateType; + } + + + public CompositeEvalCreateResponseResult aggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + return this; + } + + /** + * Get aggregationEnabled + * @return aggregationEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAggregationEnabled() { + return aggregationEnabled; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + } + + + public CompositeEvalCreateResponseResult aggregationFunction(@javax.annotation.Nonnull String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + return this; + } + + /** + * Get aggregationFunction + * @return aggregationFunction + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAggregationFunction() { + return aggregationFunction; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregationFunction(@javax.annotation.Nonnull String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + } + + + public CompositeEvalCreateResponseResult compositeChildAxis(@javax.annotation.Nullable String compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + return this; + } + + /** + * Get compositeChildAxis + * @return compositeChildAxis + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompositeChildAxis() { + return compositeChildAxis; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeChildAxis(@javax.annotation.Nullable String compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + } + + + public CompositeEvalCreateResponseResult children(@javax.annotation.Nonnull List children) { + this.children = children; + return this; + } + + public CompositeEvalCreateResponseResult addChildrenItem(CompositeChildItem childrenItem) { + if (this.children == null) { + this.children = new ArrayList<>(); + } + this.children.add(childrenItem); + return this; + } + + /** + * Get children + * @return children + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChildren() { + return children; + } + + + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildren(@javax.annotation.Nonnull List children) { + this.children = children; + } + + + /** + * Return true if this CompositeEvalCreateResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalCreateResponseResult compositeEvalCreateResponseResult = (CompositeEvalCreateResponseResult) o; + return Objects.equals(this.id, compositeEvalCreateResponseResult.id) && + Objects.equals(this.name, compositeEvalCreateResponseResult.name) && + Objects.equals(this.templateType, compositeEvalCreateResponseResult.templateType) && + Objects.equals(this.aggregationEnabled, compositeEvalCreateResponseResult.aggregationEnabled) && + Objects.equals(this.aggregationFunction, compositeEvalCreateResponseResult.aggregationFunction) && + Objects.equals(this.compositeChildAxis, compositeEvalCreateResponseResult.compositeChildAxis) && + Objects.equals(this.children, compositeEvalCreateResponseResult.children); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, templateType, aggregationEnabled, aggregationFunction, compositeChildAxis, children); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalCreateResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" aggregationEnabled: ").append(toIndentedString(aggregationEnabled)).append("\n"); + sb.append(" aggregationFunction: ").append(toIndentedString(aggregationFunction)).append("\n"); + sb.append(" compositeChildAxis: ").append(toIndentedString(compositeChildAxis)).append("\n"); + sb.append(" children: ").append(toIndentedString(children)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `template_type` to the URL query string + if (getTemplateType() != null) { + joiner.add(String.format("%stemplate_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateType())))); + } + + // add `aggregation_enabled` to the URL query string + if (getAggregationEnabled() != null) { + joiner.add(String.format("%saggregation_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationEnabled())))); + } + + // add `aggregation_function` to the URL query string + if (getAggregationFunction() != null) { + joiner.add(String.format("%saggregation_function%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationFunction())))); + } + + // add `composite_child_axis` to the URL query string + if (getCompositeChildAxis() != null) { + joiner.add(String.format("%scomposite_child_axis%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeChildAxis())))); + } + + // add `children` to the URL query string + if (getChildren() != null) { + for (int i = 0; i < getChildren().size(); i++) { + if (getChildren().get(i) != null) { + joiner.add(getChildren().get(i).toUrlQueryString(String.format("%schildren%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponse.java new file mode 100644 index 0000000..6f21ef1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompositeEvalDetailResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalDetailResponse + */ +@JsonPropertyOrder({ + CompositeEvalDetailResponse.JSON_PROPERTY_STATUS, + CompositeEvalDetailResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalDetailResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CompositeEvalDetailResponseResult result; + + public CompositeEvalDetailResponse() { + } + + public CompositeEvalDetailResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompositeEvalDetailResponse result(@javax.annotation.Nonnull CompositeEvalDetailResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CompositeEvalDetailResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CompositeEvalDetailResponseResult result) { + this.result = result; + } + + + /** + * Return true if this CompositeEvalDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalDetailResponse compositeEvalDetailResponse = (CompositeEvalDetailResponse) o; + return Objects.equals(this.status, compositeEvalDetailResponse.status) && + Objects.equals(this.result, compositeEvalDetailResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalDetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponseResult.java new file mode 100644 index 0000000..869da44 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalDetailResponseResult.java @@ -0,0 +1,605 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompositeChildItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalDetailResponseResult + */ +@JsonPropertyOrder({ + CompositeEvalDetailResponseResult.JSON_PROPERTY_ID, + CompositeEvalDetailResponseResult.JSON_PROPERTY_NAME, + CompositeEvalDetailResponseResult.JSON_PROPERTY_TEMPLATE_TYPE, + CompositeEvalDetailResponseResult.JSON_PROPERTY_AGGREGATION_ENABLED, + CompositeEvalDetailResponseResult.JSON_PROPERTY_AGGREGATION_FUNCTION, + CompositeEvalDetailResponseResult.JSON_PROPERTY_COMPOSITE_CHILD_AXIS, + CompositeEvalDetailResponseResult.JSON_PROPERTY_CHILDREN, + CompositeEvalDetailResponseResult.JSON_PROPERTY_DESCRIPTION, + CompositeEvalDetailResponseResult.JSON_PROPERTY_TAGS, + CompositeEvalDetailResponseResult.JSON_PROPERTY_CREATED_AT, + CompositeEvalDetailResponseResult.JSON_PROPERTY_UPDATED_AT, + CompositeEvalDetailResponseResult.JSON_PROPERTY_VERSION_NUMBER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalDetailResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TEMPLATE_TYPE = "template_type"; + @javax.annotation.Nullable + private String templateType; + + public static final String JSON_PROPERTY_AGGREGATION_ENABLED = "aggregation_enabled"; + @javax.annotation.Nonnull + private Boolean aggregationEnabled; + + public static final String JSON_PROPERTY_AGGREGATION_FUNCTION = "aggregation_function"; + @javax.annotation.Nonnull + private String aggregationFunction; + + public static final String JSON_PROPERTY_COMPOSITE_CHILD_AXIS = "composite_child_axis"; + @javax.annotation.Nullable + private String compositeChildAxis; + + public static final String JSON_PROPERTY_CHILDREN = "children"; + @javax.annotation.Nonnull + private List children = new ArrayList<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private String updatedAt; + + public static final String JSON_PROPERTY_VERSION_NUMBER = "version_number"; + private JsonNullable versionNumber = JsonNullable.undefined(); + + public CompositeEvalDetailResponseResult() { + } + + public CompositeEvalDetailResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public CompositeEvalDetailResponseResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CompositeEvalDetailResponseResult templateType(@javax.annotation.Nullable String templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplateType() { + return templateType; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateType(@javax.annotation.Nullable String templateType) { + this.templateType = templateType; + } + + + public CompositeEvalDetailResponseResult aggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + return this; + } + + /** + * Get aggregationEnabled + * @return aggregationEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAggregationEnabled() { + return aggregationEnabled; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + } + + + public CompositeEvalDetailResponseResult aggregationFunction(@javax.annotation.Nonnull String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + return this; + } + + /** + * Get aggregationFunction + * @return aggregationFunction + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAggregationFunction() { + return aggregationFunction; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregationFunction(@javax.annotation.Nonnull String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + } + + + public CompositeEvalDetailResponseResult compositeChildAxis(@javax.annotation.Nullable String compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + return this; + } + + /** + * Get compositeChildAxis + * @return compositeChildAxis + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompositeChildAxis() { + return compositeChildAxis; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeChildAxis(@javax.annotation.Nullable String compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + } + + + public CompositeEvalDetailResponseResult children(@javax.annotation.Nonnull List children) { + this.children = children; + return this; + } + + public CompositeEvalDetailResponseResult addChildrenItem(CompositeChildItem childrenItem) { + if (this.children == null) { + this.children = new ArrayList<>(); + } + this.children.add(childrenItem); + return this; + } + + /** + * Get children + * @return children + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChildren() { + return children; + } + + + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildren(@javax.annotation.Nonnull List children) { + this.children = children; + } + + + public CompositeEvalDetailResponseResult description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public CompositeEvalDetailResponseResult tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public CompositeEvalDetailResponseResult addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public CompositeEvalDetailResponseResult createdAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + } + + + public CompositeEvalDetailResponseResult updatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; + } + + + public CompositeEvalDetailResponseResult versionNumber(@javax.annotation.Nullable Integer versionNumber) { + this.versionNumber = JsonNullable.of(versionNumber); + return this; + } + + /** + * Get versionNumber + * @return versionNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getVersionNumber() { + return versionNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getVersionNumber_JsonNullable() { + return versionNumber; + } + + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + public void setVersionNumber_JsonNullable(JsonNullable versionNumber) { + this.versionNumber = versionNumber; + } + + public void setVersionNumber(@javax.annotation.Nullable Integer versionNumber) { + this.versionNumber = JsonNullable.of(versionNumber); + } + + + /** + * Return true if this CompositeEvalDetailResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalDetailResponseResult compositeEvalDetailResponseResult = (CompositeEvalDetailResponseResult) o; + return Objects.equals(this.id, compositeEvalDetailResponseResult.id) && + Objects.equals(this.name, compositeEvalDetailResponseResult.name) && + Objects.equals(this.templateType, compositeEvalDetailResponseResult.templateType) && + Objects.equals(this.aggregationEnabled, compositeEvalDetailResponseResult.aggregationEnabled) && + Objects.equals(this.aggregationFunction, compositeEvalDetailResponseResult.aggregationFunction) && + Objects.equals(this.compositeChildAxis, compositeEvalDetailResponseResult.compositeChildAxis) && + Objects.equals(this.children, compositeEvalDetailResponseResult.children) && + equalsNullable(this.description, compositeEvalDetailResponseResult.description) && + Objects.equals(this.tags, compositeEvalDetailResponseResult.tags) && + Objects.equals(this.createdAt, compositeEvalDetailResponseResult.createdAt) && + Objects.equals(this.updatedAt, compositeEvalDetailResponseResult.updatedAt) && + equalsNullable(this.versionNumber, compositeEvalDetailResponseResult.versionNumber); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, templateType, aggregationEnabled, aggregationFunction, compositeChildAxis, children, hashCodeNullable(description), tags, createdAt, updatedAt, hashCodeNullable(versionNumber)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalDetailResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" aggregationEnabled: ").append(toIndentedString(aggregationEnabled)).append("\n"); + sb.append(" aggregationFunction: ").append(toIndentedString(aggregationFunction)).append("\n"); + sb.append(" compositeChildAxis: ").append(toIndentedString(compositeChildAxis)).append("\n"); + sb.append(" children: ").append(toIndentedString(children)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" versionNumber: ").append(toIndentedString(versionNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `template_type` to the URL query string + if (getTemplateType() != null) { + joiner.add(String.format("%stemplate_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateType())))); + } + + // add `aggregation_enabled` to the URL query string + if (getAggregationEnabled() != null) { + joiner.add(String.format("%saggregation_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationEnabled())))); + } + + // add `aggregation_function` to the URL query string + if (getAggregationFunction() != null) { + joiner.add(String.format("%saggregation_function%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationFunction())))); + } + + // add `composite_child_axis` to the URL query string + if (getCompositeChildAxis() != null) { + joiner.add(String.format("%scomposite_child_axis%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeChildAxis())))); + } + + // add `children` to the URL query string + if (getChildren() != null) { + for (int i = 0; i < getChildren().size(); i++) { + if (getChildren().get(i) != null) { + joiner.add(getChildren().get(i).toUrlQueryString(String.format("%schildren%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `version_number` to the URL query string + if (getVersionNumber() != null) { + joiner.add(String.format("%sversion_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNumber())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteRequest.java new file mode 100644 index 0000000..013ee7c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteRequest.java @@ -0,0 +1,595 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalExecuteRequest + */ +@JsonPropertyOrder({ + CompositeEvalExecuteRequest.JSON_PROPERTY_MAPPING, + CompositeEvalExecuteRequest.JSON_PROPERTY_MODEL, + CompositeEvalExecuteRequest.JSON_PROPERTY_CONFIG, + CompositeEvalExecuteRequest.JSON_PROPERTY_ERROR_LOCALIZER, + CompositeEvalExecuteRequest.JSON_PROPERTY_INPUT_DATA_TYPES, + CompositeEvalExecuteRequest.JSON_PROPERTY_SPAN_CONTEXT, + CompositeEvalExecuteRequest.JSON_PROPERTY_TRACE_CONTEXT, + CompositeEvalExecuteRequest.JSON_PROPERTY_SESSION_CONTEXT, + CompositeEvalExecuteRequest.JSON_PROPERTY_CALL_CONTEXT, + CompositeEvalExecuteRequest.JSON_PROPERTY_ROW_CONTEXT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalExecuteRequest { + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nonnull + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_INPUT_DATA_TYPES = "input_data_types"; + @javax.annotation.Nullable + private Map inputDataTypes = new HashMap<>(); + + public static final String JSON_PROPERTY_SPAN_CONTEXT = "span_context"; + @javax.annotation.Nullable + private Map spanContext = new HashMap<>(); + + public static final String JSON_PROPERTY_TRACE_CONTEXT = "trace_context"; + @javax.annotation.Nullable + private Map traceContext = new HashMap<>(); + + public static final String JSON_PROPERTY_SESSION_CONTEXT = "session_context"; + @javax.annotation.Nullable + private Map sessionContext = new HashMap<>(); + + public static final String JSON_PROPERTY_CALL_CONTEXT = "call_context"; + @javax.annotation.Nullable + private Map callContext = new HashMap<>(); + + public static final String JSON_PROPERTY_ROW_CONTEXT = "row_context"; + @javax.annotation.Nullable + private Map rowContext = new HashMap<>(); + + public CompositeEvalExecuteRequest() { + } + + public CompositeEvalExecuteRequest mapping(@javax.annotation.Nonnull Map mapping) { + this.mapping = mapping; + return this; + } + + public CompositeEvalExecuteRequest putMappingItem(String key, Object mappingItem) { + if (this.mapping == null) { + this.mapping = new HashMap<>(); + } + this.mapping.put(key, mappingItem); + return this; + } + + /** + * Get mapping + * @return mapping + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getMapping() { + return mapping; + } + + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setMapping(@javax.annotation.Nonnull Map mapping) { + this.mapping = mapping; + } + + + public CompositeEvalExecuteRequest model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public CompositeEvalExecuteRequest config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public CompositeEvalExecuteRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public CompositeEvalExecuteRequest errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public CompositeEvalExecuteRequest inputDataTypes(@javax.annotation.Nullable Map inputDataTypes) { + this.inputDataTypes = inputDataTypes; + return this; + } + + public CompositeEvalExecuteRequest putInputDataTypesItem(String key, Object inputDataTypesItem) { + if (this.inputDataTypes == null) { + this.inputDataTypes = new HashMap<>(); + } + this.inputDataTypes.put(key, inputDataTypesItem); + return this; + } + + /** + * Get inputDataTypes + * @return inputDataTypes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_DATA_TYPES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInputDataTypes() { + return inputDataTypes; + } + + + @JsonProperty(JSON_PROPERTY_INPUT_DATA_TYPES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setInputDataTypes(@javax.annotation.Nullable Map inputDataTypes) { + this.inputDataTypes = inputDataTypes; + } + + + public CompositeEvalExecuteRequest spanContext(@javax.annotation.Nullable Map spanContext) { + this.spanContext = spanContext; + return this; + } + + public CompositeEvalExecuteRequest putSpanContextItem(String key, Object spanContextItem) { + if (this.spanContext == null) { + this.spanContext = new HashMap<>(); + } + this.spanContext.put(key, spanContextItem); + return this; + } + + /** + * Get spanContext + * @return spanContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPAN_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSpanContext() { + return spanContext; + } + + + @JsonProperty(JSON_PROPERTY_SPAN_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSpanContext(@javax.annotation.Nullable Map spanContext) { + this.spanContext = spanContext; + } + + + public CompositeEvalExecuteRequest traceContext(@javax.annotation.Nullable Map traceContext) { + this.traceContext = traceContext; + return this; + } + + public CompositeEvalExecuteRequest putTraceContextItem(String key, Object traceContextItem) { + if (this.traceContext == null) { + this.traceContext = new HashMap<>(); + } + this.traceContext.put(key, traceContextItem); + return this; + } + + /** + * Get traceContext + * @return traceContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTraceContext() { + return traceContext; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTraceContext(@javax.annotation.Nullable Map traceContext) { + this.traceContext = traceContext; + } + + + public CompositeEvalExecuteRequest sessionContext(@javax.annotation.Nullable Map sessionContext) { + this.sessionContext = sessionContext; + return this; + } + + public CompositeEvalExecuteRequest putSessionContextItem(String key, Object sessionContextItem) { + if (this.sessionContext == null) { + this.sessionContext = new HashMap<>(); + } + this.sessionContext.put(key, sessionContextItem); + return this; + } + + /** + * Get sessionContext + * @return sessionContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSessionContext() { + return sessionContext; + } + + + @JsonProperty(JSON_PROPERTY_SESSION_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSessionContext(@javax.annotation.Nullable Map sessionContext) { + this.sessionContext = sessionContext; + } + + + public CompositeEvalExecuteRequest callContext(@javax.annotation.Nullable Map callContext) { + this.callContext = callContext; + return this; + } + + public CompositeEvalExecuteRequest putCallContextItem(String key, Object callContextItem) { + if (this.callContext == null) { + this.callContext = new HashMap<>(); + } + this.callContext.put(key, callContextItem); + return this; + } + + /** + * Get callContext + * @return callContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCallContext() { + return callContext; + } + + + @JsonProperty(JSON_PROPERTY_CALL_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCallContext(@javax.annotation.Nullable Map callContext) { + this.callContext = callContext; + } + + + public CompositeEvalExecuteRequest rowContext(@javax.annotation.Nullable Map rowContext) { + this.rowContext = rowContext; + return this; + } + + public CompositeEvalExecuteRequest putRowContextItem(String key, Object rowContextItem) { + if (this.rowContext == null) { + this.rowContext = new HashMap<>(); + } + this.rowContext.put(key, rowContextItem); + return this; + } + + /** + * Get rowContext + * @return rowContext + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRowContext() { + return rowContext; + } + + + @JsonProperty(JSON_PROPERTY_ROW_CONTEXT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRowContext(@javax.annotation.Nullable Map rowContext) { + this.rowContext = rowContext; + } + + + /** + * Return true if this CompositeEvalExecuteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalExecuteRequest compositeEvalExecuteRequest = (CompositeEvalExecuteRequest) o; + return Objects.equals(this.mapping, compositeEvalExecuteRequest.mapping) && + equalsNullable(this.model, compositeEvalExecuteRequest.model) && + Objects.equals(this.config, compositeEvalExecuteRequest.config) && + Objects.equals(this.errorLocalizer, compositeEvalExecuteRequest.errorLocalizer) && + Objects.equals(this.inputDataTypes, compositeEvalExecuteRequest.inputDataTypes) && + Objects.equals(this.spanContext, compositeEvalExecuteRequest.spanContext) && + Objects.equals(this.traceContext, compositeEvalExecuteRequest.traceContext) && + Objects.equals(this.sessionContext, compositeEvalExecuteRequest.sessionContext) && + Objects.equals(this.callContext, compositeEvalExecuteRequest.callContext) && + Objects.equals(this.rowContext, compositeEvalExecuteRequest.rowContext); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mapping, hashCodeNullable(model), config, errorLocalizer, inputDataTypes, spanContext, traceContext, sessionContext, callContext, rowContext); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalExecuteRequest {\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" inputDataTypes: ").append(toIndentedString(inputDataTypes)).append("\n"); + sb.append(" spanContext: ").append(toIndentedString(spanContext)).append("\n"); + sb.append(" traceContext: ").append(toIndentedString(traceContext)).append("\n"); + sb.append(" sessionContext: ").append(toIndentedString(sessionContext)).append("\n"); + sb.append(" callContext: ").append(toIndentedString(callContext)).append("\n"); + sb.append(" rowContext: ").append(toIndentedString(rowContext)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `input_data_types` to the URL query string + if (getInputDataTypes() != null) { + for (String _key : getInputDataTypes().keySet()) { + joiner.add(String.format("%sinput_data_types%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputDataTypes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputDataTypes().get(_key))))); + } + } + + // add `span_context` to the URL query string + if (getSpanContext() != null) { + for (String _key : getSpanContext().keySet()) { + joiner.add(String.format("%sspan_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSpanContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSpanContext().get(_key))))); + } + } + + // add `trace_context` to the URL query string + if (getTraceContext() != null) { + for (String _key : getTraceContext().keySet()) { + joiner.add(String.format("%strace_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTraceContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTraceContext().get(_key))))); + } + } + + // add `session_context` to the URL query string + if (getSessionContext() != null) { + for (String _key : getSessionContext().keySet()) { + joiner.add(String.format("%ssession_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSessionContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSessionContext().get(_key))))); + } + } + + // add `call_context` to the URL query string + if (getCallContext() != null) { + for (String _key : getCallContext().keySet()) { + joiner.add(String.format("%scall_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCallContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCallContext().get(_key))))); + } + } + + // add `row_context` to the URL query string + if (getRowContext() != null) { + for (String _key : getRowContext().keySet()) { + joiner.add(String.format("%srow_context%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRowContext().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRowContext().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponse.java new file mode 100644 index 0000000..ed693b2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompositeEvalExecuteResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalExecuteResponse + */ +@JsonPropertyOrder({ + CompositeEvalExecuteResponse.JSON_PROPERTY_STATUS, + CompositeEvalExecuteResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalExecuteResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CompositeEvalExecuteResponseResult result; + + public CompositeEvalExecuteResponse() { + } + + public CompositeEvalExecuteResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public CompositeEvalExecuteResponse result(@javax.annotation.Nonnull CompositeEvalExecuteResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CompositeEvalExecuteResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CompositeEvalExecuteResponseResult result) { + this.result = result; + } + + + /** + * Return true if this CompositeEvalExecuteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalExecuteResponse compositeEvalExecuteResponse = (CompositeEvalExecuteResponse) o; + return Objects.equals(this.status, compositeEvalExecuteResponse.status) && + Objects.equals(this.result, compositeEvalExecuteResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalExecuteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponseResult.java new file mode 100644 index 0000000..c8a3052 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalExecuteResponseResult.java @@ -0,0 +1,671 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CompositeChildResult; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalExecuteResponseResult + */ +@JsonPropertyOrder({ + CompositeEvalExecuteResponseResult.JSON_PROPERTY_COMPOSITE_ID, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_COMPOSITE_NAME, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_AGGREGATION_ENABLED, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_AGGREGATION_FUNCTION, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_AGGREGATE_SCORE, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_AGGREGATE_PASS, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_CHILDREN, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_SUMMARY, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_ERROR_LOCALIZER_RESULTS, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_TOTAL_CHILDREN, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_COMPLETED_CHILDREN, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_FAILED_CHILDREN, + CompositeEvalExecuteResponseResult.JSON_PROPERTY_EVALUATION_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalExecuteResponseResult { + public static final String JSON_PROPERTY_COMPOSITE_ID = "composite_id"; + private JsonNullable compositeId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPOSITE_NAME = "composite_name"; + @javax.annotation.Nonnull + private String compositeName; + + public static final String JSON_PROPERTY_AGGREGATION_ENABLED = "aggregation_enabled"; + @javax.annotation.Nonnull + private Boolean aggregationEnabled; + + public static final String JSON_PROPERTY_AGGREGATION_FUNCTION = "aggregation_function"; + private JsonNullable aggregationFunction = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGGREGATE_SCORE = "aggregate_score"; + private JsonNullable aggregateScore = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGGREGATE_PASS = "aggregate_pass"; + private JsonNullable aggregatePass = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CHILDREN = "children"; + @javax.annotation.Nonnull + private List children = new ArrayList<>(); + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private JsonNullable summary = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER_RESULTS = "error_localizer_results"; + @javax.annotation.Nullable + private Map errorLocalizerResults = new HashMap<>(); + + public static final String JSON_PROPERTY_TOTAL_CHILDREN = "total_children"; + @javax.annotation.Nonnull + private Integer totalChildren; + + public static final String JSON_PROPERTY_COMPLETED_CHILDREN = "completed_children"; + @javax.annotation.Nonnull + private Integer completedChildren; + + public static final String JSON_PROPERTY_FAILED_CHILDREN = "failed_children"; + @javax.annotation.Nonnull + private Integer failedChildren; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluation_id"; + private JsonNullable evaluationId = JsonNullable.undefined(); + + public CompositeEvalExecuteResponseResult() { + } + + public CompositeEvalExecuteResponseResult compositeId(@javax.annotation.Nullable String compositeId) { + this.compositeId = JsonNullable.of(compositeId); + return this; + } + + /** + * Get compositeId + * @return compositeId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCompositeId() { + return compositeId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPOSITE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompositeId_JsonNullable() { + return compositeId; + } + + @JsonProperty(JSON_PROPERTY_COMPOSITE_ID) + public void setCompositeId_JsonNullable(JsonNullable compositeId) { + this.compositeId = compositeId; + } + + public void setCompositeId(@javax.annotation.Nullable String compositeId) { + this.compositeId = JsonNullable.of(compositeId); + } + + + public CompositeEvalExecuteResponseResult compositeName(@javax.annotation.Nonnull String compositeName) { + this.compositeName = compositeName; + return this; + } + + /** + * Get compositeName + * @return compositeName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPOSITE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCompositeName() { + return compositeName; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompositeName(@javax.annotation.Nonnull String compositeName) { + this.compositeName = compositeName; + } + + + public CompositeEvalExecuteResponseResult aggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + return this; + } + + /** + * Get aggregationEnabled + * @return aggregationEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAggregationEnabled() { + return aggregationEnabled; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + } + + + public CompositeEvalExecuteResponseResult aggregationFunction(@javax.annotation.Nullable String aggregationFunction) { + this.aggregationFunction = JsonNullable.of(aggregationFunction); + return this; + } + + /** + * Get aggregationFunction + * @return aggregationFunction + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAggregationFunction() { + return aggregationFunction.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAggregationFunction_JsonNullable() { + return aggregationFunction; + } + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + public void setAggregationFunction_JsonNullable(JsonNullable aggregationFunction) { + this.aggregationFunction = aggregationFunction; + } + + public void setAggregationFunction(@javax.annotation.Nullable String aggregationFunction) { + this.aggregationFunction = JsonNullable.of(aggregationFunction); + } + + + public CompositeEvalExecuteResponseResult aggregateScore(@javax.annotation.Nullable BigDecimal aggregateScore) { + this.aggregateScore = JsonNullable.of(aggregateScore); + return this; + } + + /** + * Get aggregateScore + * @return aggregateScore + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAggregateScore() { + return aggregateScore.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAggregateScore_JsonNullable() { + return aggregateScore; + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_SCORE) + public void setAggregateScore_JsonNullable(JsonNullable aggregateScore) { + this.aggregateScore = aggregateScore; + } + + public void setAggregateScore(@javax.annotation.Nullable BigDecimal aggregateScore) { + this.aggregateScore = JsonNullable.of(aggregateScore); + } + + + public CompositeEvalExecuteResponseResult aggregatePass(@javax.annotation.Nullable Boolean aggregatePass) { + this.aggregatePass = JsonNullable.of(aggregatePass); + return this; + } + + /** + * Get aggregatePass + * @return aggregatePass + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getAggregatePass() { + return aggregatePass.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_PASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAggregatePass_JsonNullable() { + return aggregatePass; + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_PASS) + public void setAggregatePass_JsonNullable(JsonNullable aggregatePass) { + this.aggregatePass = aggregatePass; + } + + public void setAggregatePass(@javax.annotation.Nullable Boolean aggregatePass) { + this.aggregatePass = JsonNullable.of(aggregatePass); + } + + + public CompositeEvalExecuteResponseResult children(@javax.annotation.Nonnull List children) { + this.children = children; + return this; + } + + public CompositeEvalExecuteResponseResult addChildrenItem(CompositeChildResult childrenItem) { + if (this.children == null) { + this.children = new ArrayList<>(); + } + this.children.add(childrenItem); + return this; + } + + /** + * Get children + * @return children + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChildren() { + return children; + } + + + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildren(@javax.annotation.Nonnull List children) { + this.children = children; + } + + + public CompositeEvalExecuteResponseResult summary(@javax.annotation.Nullable String summary) { + this.summary = JsonNullable.of(summary); + return this; + } + + /** + * Get summary + * @return summary + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSummary() { + return summary.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSummary_JsonNullable() { + return summary; + } + + @JsonProperty(JSON_PROPERTY_SUMMARY) + public void setSummary_JsonNullable(JsonNullable summary) { + this.summary = summary; + } + + public void setSummary(@javax.annotation.Nullable String summary) { + this.summary = JsonNullable.of(summary); + } + + + public CompositeEvalExecuteResponseResult errorLocalizerResults(@javax.annotation.Nullable Map errorLocalizerResults) { + this.errorLocalizerResults = errorLocalizerResults; + return this; + } + + public CompositeEvalExecuteResponseResult putErrorLocalizerResultsItem(String key, Object errorLocalizerResultsItem) { + if (this.errorLocalizerResults == null) { + this.errorLocalizerResults = new HashMap<>(); + } + this.errorLocalizerResults.put(key, errorLocalizerResultsItem); + return this; + } + + /** + * Get errorLocalizerResults + * @return errorLocalizerResults + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_RESULTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getErrorLocalizerResults() { + return errorLocalizerResults; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_RESULTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizerResults(@javax.annotation.Nullable Map errorLocalizerResults) { + this.errorLocalizerResults = errorLocalizerResults; + } + + + public CompositeEvalExecuteResponseResult totalChildren(@javax.annotation.Nonnull Integer totalChildren) { + this.totalChildren = totalChildren; + return this; + } + + /** + * Get totalChildren + * @return totalChildren + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalChildren() { + return totalChildren; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalChildren(@javax.annotation.Nonnull Integer totalChildren) { + this.totalChildren = totalChildren; + } + + + public CompositeEvalExecuteResponseResult completedChildren(@javax.annotation.Nonnull Integer completedChildren) { + this.completedChildren = completedChildren; + return this; + } + + /** + * Get completedChildren + * @return completedChildren + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLETED_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCompletedChildren() { + return completedChildren; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompletedChildren(@javax.annotation.Nonnull Integer completedChildren) { + this.completedChildren = completedChildren; + } + + + public CompositeEvalExecuteResponseResult failedChildren(@javax.annotation.Nonnull Integer failedChildren) { + this.failedChildren = failedChildren; + return this; + } + + /** + * Get failedChildren + * @return failedChildren + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILED_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getFailedChildren() { + return failedChildren; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_CHILDREN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailedChildren(@javax.annotation.Nonnull Integer failedChildren) { + this.failedChildren = failedChildren; + } + + + public CompositeEvalExecuteResponseResult evaluationId(@javax.annotation.Nullable String evaluationId) { + this.evaluationId = JsonNullable.of(evaluationId); + return this; + } + + /** + * Get evaluationId + * @return evaluationId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvaluationId() { + return evaluationId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvaluationId_JsonNullable() { + return evaluationId; + } + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + public void setEvaluationId_JsonNullable(JsonNullable evaluationId) { + this.evaluationId = evaluationId; + } + + public void setEvaluationId(@javax.annotation.Nullable String evaluationId) { + this.evaluationId = JsonNullable.of(evaluationId); + } + + + /** + * Return true if this CompositeEvalExecuteResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalExecuteResponseResult compositeEvalExecuteResponseResult = (CompositeEvalExecuteResponseResult) o; + return equalsNullable(this.compositeId, compositeEvalExecuteResponseResult.compositeId) && + Objects.equals(this.compositeName, compositeEvalExecuteResponseResult.compositeName) && + Objects.equals(this.aggregationEnabled, compositeEvalExecuteResponseResult.aggregationEnabled) && + equalsNullable(this.aggregationFunction, compositeEvalExecuteResponseResult.aggregationFunction) && + equalsNullable(this.aggregateScore, compositeEvalExecuteResponseResult.aggregateScore) && + equalsNullable(this.aggregatePass, compositeEvalExecuteResponseResult.aggregatePass) && + Objects.equals(this.children, compositeEvalExecuteResponseResult.children) && + equalsNullable(this.summary, compositeEvalExecuteResponseResult.summary) && + Objects.equals(this.errorLocalizerResults, compositeEvalExecuteResponseResult.errorLocalizerResults) && + Objects.equals(this.totalChildren, compositeEvalExecuteResponseResult.totalChildren) && + Objects.equals(this.completedChildren, compositeEvalExecuteResponseResult.completedChildren) && + Objects.equals(this.failedChildren, compositeEvalExecuteResponseResult.failedChildren) && + equalsNullable(this.evaluationId, compositeEvalExecuteResponseResult.evaluationId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(compositeId), compositeName, aggregationEnabled, hashCodeNullable(aggregationFunction), hashCodeNullable(aggregateScore), hashCodeNullable(aggregatePass), children, hashCodeNullable(summary), errorLocalizerResults, totalChildren, completedChildren, failedChildren, hashCodeNullable(evaluationId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalExecuteResponseResult {\n"); + sb.append(" compositeId: ").append(toIndentedString(compositeId)).append("\n"); + sb.append(" compositeName: ").append(toIndentedString(compositeName)).append("\n"); + sb.append(" aggregationEnabled: ").append(toIndentedString(aggregationEnabled)).append("\n"); + sb.append(" aggregationFunction: ").append(toIndentedString(aggregationFunction)).append("\n"); + sb.append(" aggregateScore: ").append(toIndentedString(aggregateScore)).append("\n"); + sb.append(" aggregatePass: ").append(toIndentedString(aggregatePass)).append("\n"); + sb.append(" children: ").append(toIndentedString(children)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" errorLocalizerResults: ").append(toIndentedString(errorLocalizerResults)).append("\n"); + sb.append(" totalChildren: ").append(toIndentedString(totalChildren)).append("\n"); + sb.append(" completedChildren: ").append(toIndentedString(completedChildren)).append("\n"); + sb.append(" failedChildren: ").append(toIndentedString(failedChildren)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `composite_id` to the URL query string + if (getCompositeId() != null) { + joiner.add(String.format("%scomposite_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeId())))); + } + + // add `composite_name` to the URL query string + if (getCompositeName() != null) { + joiner.add(String.format("%scomposite_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeName())))); + } + + // add `aggregation_enabled` to the URL query string + if (getAggregationEnabled() != null) { + joiner.add(String.format("%saggregation_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationEnabled())))); + } + + // add `aggregation_function` to the URL query string + if (getAggregationFunction() != null) { + joiner.add(String.format("%saggregation_function%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationFunction())))); + } + + // add `aggregate_score` to the URL query string + if (getAggregateScore() != null) { + joiner.add(String.format("%saggregate_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregateScore())))); + } + + // add `aggregate_pass` to the URL query string + if (getAggregatePass() != null) { + joiner.add(String.format("%saggregate_pass%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregatePass())))); + } + + // add `children` to the URL query string + if (getChildren() != null) { + for (int i = 0; i < getChildren().size(); i++) { + if (getChildren().get(i) != null) { + joiner.add(getChildren().get(i).toUrlQueryString(String.format("%schildren%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(String.format("%ssummary%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSummary())))); + } + + // add `error_localizer_results` to the URL query string + if (getErrorLocalizerResults() != null) { + for (String _key : getErrorLocalizerResults().keySet()) { + joiner.add(String.format("%serror_localizer_results%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getErrorLocalizerResults().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizerResults().get(_key))))); + } + } + + // add `total_children` to the URL query string + if (getTotalChildren() != null) { + joiner.add(String.format("%stotal_children%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalChildren())))); + } + + // add `completed_children` to the URL query string + if (getCompletedChildren() != null) { + joiner.add(String.format("%scompleted_children%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedChildren())))); + } + + // add `failed_children` to the URL query string + if (getFailedChildren() != null) { + joiner.add(String.format("%sfailed_children%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedChildren())))); + } + + // add `evaluation_id` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluation_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvaluationId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalUpdateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalUpdateRequest.java new file mode 100644 index 0000000..1c18b4d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CompositeEvalUpdateRequest.java @@ -0,0 +1,600 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CompositeEvalUpdateRequest + */ +@JsonPropertyOrder({ + CompositeEvalUpdateRequest.JSON_PROPERTY_NAME, + CompositeEvalUpdateRequest.JSON_PROPERTY_DESCRIPTION, + CompositeEvalUpdateRequest.JSON_PROPERTY_TAGS, + CompositeEvalUpdateRequest.JSON_PROPERTY_AGGREGATION_ENABLED, + CompositeEvalUpdateRequest.JSON_PROPERTY_AGGREGATION_FUNCTION, + CompositeEvalUpdateRequest.JSON_PROPERTY_CHILD_TEMPLATE_IDS, + CompositeEvalUpdateRequest.JSON_PROPERTY_CHILD_WEIGHTS, + CompositeEvalUpdateRequest.JSON_PROPERTY_COMPOSITE_CHILD_AXIS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CompositeEvalUpdateRequest { + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_AGGREGATION_ENABLED = "aggregation_enabled"; + private JsonNullable aggregationEnabled = JsonNullable.undefined(); + + /** + * Gets or Sets aggregationFunction + */ + public enum AggregationFunctionEnum { + WEIGHTED_AVG(String.valueOf("weighted_avg")), + + AVG(String.valueOf("avg")), + + MIN(String.valueOf("min")), + + MAX(String.valueOf("max")), + + PASS_RATE(String.valueOf("pass_rate")); + + private String value; + + AggregationFunctionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AggregationFunctionEnum fromValue(String value) { + for (AggregationFunctionEnum b : AggregationFunctionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_AGGREGATION_FUNCTION = "aggregation_function"; + private JsonNullable aggregationFunction = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CHILD_TEMPLATE_IDS = "child_template_ids"; + private JsonNullable> childTemplateIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CHILD_WEIGHTS = "child_weights"; + @javax.annotation.Nullable + private Map childWeights = new HashMap<>(); + + /** + * Gets or Sets compositeChildAxis + */ + public enum CompositeChildAxisEnum { + EMPTY(String.valueOf("")), + + PASS_FAIL(String.valueOf("pass_fail")), + + PERCENTAGE(String.valueOf("percentage")), + + CHOICES(String.valueOf("choices")), + + CODE(String.valueOf("code")); + + private String value; + + CompositeChildAxisEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CompositeChildAxisEnum fromValue(String value) { + for (CompositeChildAxisEnum b : CompositeChildAxisEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_COMPOSITE_CHILD_AXIS = "composite_child_axis"; + private JsonNullable compositeChildAxis = JsonNullable.undefined(); + + public CompositeEvalUpdateRequest() { + } + + public CompositeEvalUpdateRequest name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public CompositeEvalUpdateRequest description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public CompositeEvalUpdateRequest tags(@javax.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public CompositeEvalUpdateRequest addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + @JsonIgnore + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + public CompositeEvalUpdateRequest aggregationEnabled(@javax.annotation.Nullable Boolean aggregationEnabled) { + this.aggregationEnabled = JsonNullable.of(aggregationEnabled); + return this; + } + + /** + * Get aggregationEnabled + * @return aggregationEnabled + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getAggregationEnabled() { + return aggregationEnabled.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAggregationEnabled_JsonNullable() { + return aggregationEnabled; + } + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + public void setAggregationEnabled_JsonNullable(JsonNullable aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + } + + public void setAggregationEnabled(@javax.annotation.Nullable Boolean aggregationEnabled) { + this.aggregationEnabled = JsonNullable.of(aggregationEnabled); + } + + + public CompositeEvalUpdateRequest aggregationFunction(@javax.annotation.Nullable AggregationFunctionEnum aggregationFunction) { + this.aggregationFunction = JsonNullable.of(aggregationFunction); + return this; + } + + /** + * Get aggregationFunction + * @return aggregationFunction + */ + @javax.annotation.Nullable + @JsonIgnore + public AggregationFunctionEnum getAggregationFunction() { + return aggregationFunction.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAggregationFunction_JsonNullable() { + return aggregationFunction; + } + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + public void setAggregationFunction_JsonNullable(JsonNullable aggregationFunction) { + this.aggregationFunction = aggregationFunction; + } + + public void setAggregationFunction(@javax.annotation.Nullable AggregationFunctionEnum aggregationFunction) { + this.aggregationFunction = JsonNullable.of(aggregationFunction); + } + + + public CompositeEvalUpdateRequest childTemplateIds(@javax.annotation.Nullable List childTemplateIds) { + this.childTemplateIds = JsonNullable.>of(childTemplateIds); + return this; + } + + public CompositeEvalUpdateRequest addChildTemplateIdsItem(UUID childTemplateIdsItem) { + if (this.childTemplateIds == null || !this.childTemplateIds.isPresent()) { + this.childTemplateIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.childTemplateIds.get().add(childTemplateIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get childTemplateIds + * @return childTemplateIds + */ + @javax.annotation.Nullable + @JsonIgnore + public List getChildTemplateIds() { + return childTemplateIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CHILD_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getChildTemplateIds_JsonNullable() { + return childTemplateIds; + } + + @JsonProperty(JSON_PROPERTY_CHILD_TEMPLATE_IDS) + public void setChildTemplateIds_JsonNullable(JsonNullable> childTemplateIds) { + this.childTemplateIds = childTemplateIds; + } + + public void setChildTemplateIds(@javax.annotation.Nullable List childTemplateIds) { + this.childTemplateIds = JsonNullable.>of(childTemplateIds); + } + + + public CompositeEvalUpdateRequest childWeights(@javax.annotation.Nullable Map childWeights) { + this.childWeights = childWeights; + return this; + } + + public CompositeEvalUpdateRequest putChildWeightsItem(String key, Object childWeightsItem) { + if (this.childWeights == null) { + this.childWeights = new HashMap<>(); + } + this.childWeights.put(key, childWeightsItem); + return this; + } + + /** + * Get childWeights + * @return childWeights + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHILD_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChildWeights() { + return childWeights; + } + + + @JsonProperty(JSON_PROPERTY_CHILD_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChildWeights(@javax.annotation.Nullable Map childWeights) { + this.childWeights = childWeights; + } + + + public CompositeEvalUpdateRequest compositeChildAxis(@javax.annotation.Nullable CompositeChildAxisEnum compositeChildAxis) { + this.compositeChildAxis = JsonNullable.of(compositeChildAxis); + return this; + } + + /** + * Get compositeChildAxis + * @return compositeChildAxis + */ + @javax.annotation.Nullable + @JsonIgnore + public CompositeChildAxisEnum getCompositeChildAxis() { + return compositeChildAxis.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompositeChildAxis_JsonNullable() { + return compositeChildAxis; + } + + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + public void setCompositeChildAxis_JsonNullable(JsonNullable compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + } + + public void setCompositeChildAxis(@javax.annotation.Nullable CompositeChildAxisEnum compositeChildAxis) { + this.compositeChildAxis = JsonNullable.of(compositeChildAxis); + } + + + /** + * Return true if this CompositeEvalUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompositeEvalUpdateRequest compositeEvalUpdateRequest = (CompositeEvalUpdateRequest) o; + return equalsNullable(this.name, compositeEvalUpdateRequest.name) && + equalsNullable(this.description, compositeEvalUpdateRequest.description) && + equalsNullable(this.tags, compositeEvalUpdateRequest.tags) && + equalsNullable(this.aggregationEnabled, compositeEvalUpdateRequest.aggregationEnabled) && + equalsNullable(this.aggregationFunction, compositeEvalUpdateRequest.aggregationFunction) && + equalsNullable(this.childTemplateIds, compositeEvalUpdateRequest.childTemplateIds) && + Objects.equals(this.childWeights, compositeEvalUpdateRequest.childWeights) && + equalsNullable(this.compositeChildAxis, compositeEvalUpdateRequest.compositeChildAxis); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(name), hashCodeNullable(description), hashCodeNullable(tags), hashCodeNullable(aggregationEnabled), hashCodeNullable(aggregationFunction), hashCodeNullable(childTemplateIds), childWeights, hashCodeNullable(compositeChildAxis)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompositeEvalUpdateRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" aggregationEnabled: ").append(toIndentedString(aggregationEnabled)).append("\n"); + sb.append(" aggregationFunction: ").append(toIndentedString(aggregationFunction)).append("\n"); + sb.append(" childTemplateIds: ").append(toIndentedString(childTemplateIds)).append("\n"); + sb.append(" childWeights: ").append(toIndentedString(childWeights)).append("\n"); + sb.append(" compositeChildAxis: ").append(toIndentedString(compositeChildAxis)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `aggregation_enabled` to the URL query string + if (getAggregationEnabled() != null) { + joiner.add(String.format("%saggregation_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationEnabled())))); + } + + // add `aggregation_function` to the URL query string + if (getAggregationFunction() != null) { + joiner.add(String.format("%saggregation_function%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationFunction())))); + } + + // add `child_template_ids` to the URL query string + if (getChildTemplateIds() != null) { + for (int i = 0; i < getChildTemplateIds().size(); i++) { + if (getChildTemplateIds().get(i) != null) { + joiner.add(String.format("%schild_template_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getChildTemplateIds().get(i))))); + } + } + } + + // add `child_weights` to the URL query string + if (getChildWeights() != null) { + for (String _key : getChildWeights().keySet()) { + joiner.add(String.format("%schild_weights%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChildWeights().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChildWeights().get(_key))))); + } + } + + // add `composite_child_axis` to the URL query string + if (getCompositeChildAxis() != null) { + joiner.add(String.format("%scomposite_child_axis%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeChildAxis())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ConditionalColumnRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ConditionalColumnRequest.java new file mode 100644 index 0000000..bbb8f4c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ConditionalColumnRequest.java @@ -0,0 +1,238 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ConditionalColumnRequest + */ +@JsonPropertyOrder({ + ConditionalColumnRequest.JSON_PROPERTY_CONFIG, + ConditionalColumnRequest.JSON_PROPERTY_NEW_COLUMN_NAME, + ConditionalColumnRequest.JSON_PROPERTY_CONCURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ConditionalColumnRequest { + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private List> config = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nonnull + private String newColumnName; + + public static final String JSON_PROPERTY_CONCURRENCY = "concurrency"; + @javax.annotation.Nullable + private Integer concurrency = 5; + + public ConditionalColumnRequest() { + } + + public ConditionalColumnRequest config(@javax.annotation.Nonnull List> config) { + this.config = config; + return this; + } + + public ConditionalColumnRequest addConfigItem(Map configItem) { + if (this.config == null) { + this.config = new ArrayList<>(); + } + this.config.add(configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull List> config) { + this.config = config; + } + + + public ConditionalColumnRequest newColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + } + + + public ConditionalColumnRequest concurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + return this; + } + + /** + * Get concurrency + * @return concurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConcurrency() { + return concurrency; + } + + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConcurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + } + + + /** + * Return true if this ConditionalColumnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConditionalColumnRequest conditionalColumnRequest = (ConditionalColumnRequest) o; + return Objects.equals(this.config, conditionalColumnRequest.config) && + Objects.equals(this.newColumnName, conditionalColumnRequest.newColumnName) && + Objects.equals(this.concurrency, conditionalColumnRequest.concurrency); + } + + @Override + public int hashCode() { + return Objects.hash(config, newColumnName, concurrency); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConditionalColumnRequest {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append(" concurrency: ").append(toIndentedString(concurrency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `config` to the URL query string + if (getConfig() != null) { + for (int i = 0; i < getConfig().size(); i++) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(i))))); + } + } + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + // add `concurrency` to the URL query string + if (getConcurrency() != null) { + joiner.add(String.format("%sconcurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConcurrency())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ConfigureEvaluations.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ConfigureEvaluations.java new file mode 100644 index 0000000..8ccf604 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ConfigureEvaluations.java @@ -0,0 +1,307 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ConfigureEvaluations + */ +@JsonPropertyOrder({ + ConfigureEvaluations.JSON_PROPERTY_EVAL_TEMPLATES, + ConfigureEvaluations.JSON_PROPERTY_INPUTS, + ConfigureEvaluations.JSON_PROPERTY_MODEL_NAME, + ConfigureEvaluations.JSON_PROPERTY_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ConfigureEvaluations { + public static final String JSON_PROPERTY_EVAL_TEMPLATES = "eval_templates"; + @javax.annotation.Nonnull + private String evalTemplates; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + @javax.annotation.Nonnull + private Map inputs = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private JsonNullable modelName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public ConfigureEvaluations() { + } + + public ConfigureEvaluations evalTemplates(@javax.annotation.Nonnull String evalTemplates) { + this.evalTemplates = evalTemplates; + return this; + } + + /** + * Get evalTemplates + * @return evalTemplates + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalTemplates() { + return evalTemplates; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalTemplates(@javax.annotation.Nonnull String evalTemplates) { + this.evalTemplates = evalTemplates; + } + + + public ConfigureEvaluations inputs(@javax.annotation.Nonnull Map inputs) { + this.inputs = inputs; + return this; + } + + public ConfigureEvaluations putInputsItem(String key, String inputsItem) { + if (this.inputs == null) { + this.inputs = new HashMap<>(); + } + this.inputs.put(key, inputsItem); + return this; + } + + /** + * Get inputs + * @return inputs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getInputs() { + return inputs; + } + + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setInputs(@javax.annotation.Nonnull Map inputs) { + this.inputs = inputs; + } + + + public ConfigureEvaluations modelName(@javax.annotation.Nullable String modelName) { + this.modelName = JsonNullable.of(modelName); + return this; + } + + /** + * Get modelName + * @return modelName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModelName() { + return modelName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModelName_JsonNullable() { + return modelName; + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + public void setModelName_JsonNullable(JsonNullable modelName) { + this.modelName = modelName; + } + + public void setModelName(@javax.annotation.Nullable String modelName) { + this.modelName = JsonNullable.of(modelName); + } + + + public ConfigureEvaluations config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public ConfigureEvaluations putConfigItem(String key, String configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + /** + * Return true if this ConfigureEvaluations object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureEvaluations configureEvaluations = (ConfigureEvaluations) o; + return Objects.equals(this.evalTemplates, configureEvaluations.evalTemplates) && + Objects.equals(this.inputs, configureEvaluations.inputs) && + equalsNullable(this.modelName, configureEvaluations.modelName) && + Objects.equals(this.config, configureEvaluations.config); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(evalTemplates, inputs, hashCodeNullable(modelName), config); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigureEvaluations {\n"); + sb.append(" evalTemplates: ").append(toIndentedString(evalTemplates)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_templates` to the URL query string + if (getEvalTemplates() != null) { + joiner.add(String.format("%seval_templates%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplates())))); + } + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (String _key : getInputs().keySet()) { + joiner.add(String.format("%sinputs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputs().get(_key))))); + } + } + + // add `model_name` to the URL query string + if (getModelName() != null) { + joiner.add(String.format("%smodel_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromExperimentRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromExperimentRequest.java new file mode 100644 index 0000000..23c76ec --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromExperimentRequest.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateDatasetFromExperimentRequest + */ +@JsonPropertyOrder({ + CreateDatasetFromExperimentRequest.JSON_PROPERTY_NAME, + CreateDatasetFromExperimentRequest.JSON_PROPERTY_MODEL_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateDatasetFromExperimentRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nullable + private String modelType; + + public CreateDatasetFromExperimentRequest() { + } + + public CreateDatasetFromExperimentRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public CreateDatasetFromExperimentRequest modelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + } + + + /** + * Return true if this CreateDatasetFromExperimentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDatasetFromExperimentRequest createDatasetFromExperimentRequest = (CreateDatasetFromExperimentRequest) o; + return Objects.equals(this.name, createDatasetFromExperimentRequest.name) && + Objects.equals(this.modelType, createDatasetFromExperimentRequest.modelType); + } + + @Override + public int hashCode() { + return Objects.hash(name, modelType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDatasetFromExperimentRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromLocalFileRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromLocalFileRequest.java new file mode 100644 index 0000000..d371a68 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateDatasetFromLocalFileRequest.java @@ -0,0 +1,258 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URI; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateDatasetFromLocalFileRequest + */ +@JsonPropertyOrder({ + CreateDatasetFromLocalFileRequest.JSON_PROPERTY_FILE, + CreateDatasetFromLocalFileRequest.JSON_PROPERTY_NEW_DATASET_NAME, + CreateDatasetFromLocalFileRequest.JSON_PROPERTY_MODEL_TYPE, + CreateDatasetFromLocalFileRequest.JSON_PROPERTY_SOURCE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateDatasetFromLocalFileRequest { + public static final String JSON_PROPERTY_FILE = "file"; + @javax.annotation.Nullable + private URI _file; + + public static final String JSON_PROPERTY_NEW_DATASET_NAME = "new_dataset_name"; + @javax.annotation.Nullable + private String newDatasetName; + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nullable + private String modelType; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source; + + public CreateDatasetFromLocalFileRequest() { + } + + @JsonCreator + public CreateDatasetFromLocalFileRequest( + @JsonProperty(JSON_PROPERTY_FILE) URI _file + ) { + this(); + this._file = _file; + } + + /** + * Get _file + * @return _file + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public URI getFile() { + return _file; + } + + + + + public CreateDatasetFromLocalFileRequest newDatasetName(@javax.annotation.Nullable String newDatasetName) { + this.newDatasetName = newDatasetName; + return this; + } + + /** + * Get newDatasetName + * @return newDatasetName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNewDatasetName() { + return newDatasetName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewDatasetName(@javax.annotation.Nullable String newDatasetName) { + this.newDatasetName = newDatasetName; + } + + + public CreateDatasetFromLocalFileRequest modelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + } + + + public CreateDatasetFromLocalFileRequest source(@javax.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable String source) { + this.source = source; + } + + + /** + * Return true if this CreateDatasetFromLocalFileRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDatasetFromLocalFileRequest createDatasetFromLocalFileRequest = (CreateDatasetFromLocalFileRequest) o; + return Objects.equals(this._file, createDatasetFromLocalFileRequest._file) && + Objects.equals(this.newDatasetName, createDatasetFromLocalFileRequest.newDatasetName) && + Objects.equals(this.modelType, createDatasetFromLocalFileRequest.modelType) && + Objects.equals(this.source, createDatasetFromLocalFileRequest.source); + } + + @Override + public int hashCode() { + return Objects.hash(_file, newDatasetName, modelType, source); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDatasetFromLocalFileRequest {\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); + sb.append(" newDatasetName: ").append(toIndentedString(newDatasetName)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `file` to the URL query string + if (getFile() != null) { + joiner.add(String.format("%sfile%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFile())))); + } + + // add `new_dataset_name` to the URL query string + if (getNewDatasetName() != null) { + joiner.add(String.format("%snew_dataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewDatasetName())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateEmptyDatasetRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateEmptyDatasetRequest.java new file mode 100644 index 0000000..e1ba1f1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateEmptyDatasetRequest.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateEmptyDatasetRequest + */ +@JsonPropertyOrder({ + CreateEmptyDatasetRequest.JSON_PROPERTY_NEW_DATASET_NAME, + CreateEmptyDatasetRequest.JSON_PROPERTY_MODEL_TYPE, + CreateEmptyDatasetRequest.JSON_PROPERTY_IS_SDK, + CreateEmptyDatasetRequest.JSON_PROPERTY_ROW +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateEmptyDatasetRequest { + public static final String JSON_PROPERTY_NEW_DATASET_NAME = "new_dataset_name"; + @javax.annotation.Nonnull + private String newDatasetName; + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nullable + private String modelType; + + public static final String JSON_PROPERTY_IS_SDK = "is_sdk"; + @javax.annotation.Nullable + private Boolean isSdk = false; + + public static final String JSON_PROPERTY_ROW = "row"; + @javax.annotation.Nullable + private Integer row; + + public CreateEmptyDatasetRequest() { + } + + public CreateEmptyDatasetRequest newDatasetName(@javax.annotation.Nonnull String newDatasetName) { + this.newDatasetName = newDatasetName; + return this; + } + + /** + * Get newDatasetName + * @return newDatasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNewDatasetName() { + return newDatasetName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewDatasetName(@javax.annotation.Nonnull String newDatasetName) { + this.newDatasetName = newDatasetName; + } + + + public CreateEmptyDatasetRequest modelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + } + + + public CreateEmptyDatasetRequest isSdk(@javax.annotation.Nullable Boolean isSdk) { + this.isSdk = isSdk; + return this; + } + + /** + * Get isSdk + * @return isSdk + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SDK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsSdk() { + return isSdk; + } + + + @JsonProperty(JSON_PROPERTY_IS_SDK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsSdk(@javax.annotation.Nullable Boolean isSdk) { + this.isSdk = isSdk; + } + + + public CreateEmptyDatasetRequest row(@javax.annotation.Nullable Integer row) { + this.row = row; + return this; + } + + /** + * Get row + * minimum: 0 + * @return row + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRow() { + return row; + } + + + @JsonProperty(JSON_PROPERTY_ROW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRow(@javax.annotation.Nullable Integer row) { + this.row = row; + } + + + /** + * Return true if this CreateEmptyDatasetRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEmptyDatasetRequest createEmptyDatasetRequest = (CreateEmptyDatasetRequest) o; + return Objects.equals(this.newDatasetName, createEmptyDatasetRequest.newDatasetName) && + Objects.equals(this.modelType, createEmptyDatasetRequest.modelType) && + Objects.equals(this.isSdk, createEmptyDatasetRequest.isSdk) && + Objects.equals(this.row, createEmptyDatasetRequest.row); + } + + @Override + public int hashCode() { + return Objects.hash(newDatasetName, modelType, isSdk, row); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmptyDatasetRequest {\n"); + sb.append(" newDatasetName: ").append(toIndentedString(newDatasetName)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append(" isSdk: ").append(toIndentedString(isSdk)).append("\n"); + sb.append(" row: ").append(toIndentedString(row)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `new_dataset_name` to the URL query string + if (getNewDatasetName() != null) { + joiner.add(String.format("%snew_dataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewDatasetName())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + // add `is_sdk` to the URL query string + if (getIsSdk() != null) { + joiner.add(String.format("%sis_sdk%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsSdk())))); + } + + // add `row` to the URL query string + if (getRow() != null) { + joiner.add(String.format("%srow%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRow())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssue.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssue.java new file mode 100644 index 0000000..1041a17 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssue.java @@ -0,0 +1,259 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateLinearIssue + */ +@JsonPropertyOrder({ + CreateLinearIssue.JSON_PROPERTY_TEAM_ID, + CreateLinearIssue.JSON_PROPERTY_TITLE, + CreateLinearIssue.JSON_PROPERTY_DESCRIPTION, + CreateLinearIssue.JSON_PROPERTY_PRIORITY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateLinearIssue { + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @javax.annotation.Nonnull + private String teamId; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable + private String title; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + @javax.annotation.Nullable + private Integer priority = 0; + + public CreateLinearIssue() { + } + + public CreateLinearIssue teamId(@javax.annotation.Nonnull String teamId) { + this.teamId = teamId; + return this; + } + + /** + * Get teamId + * @return teamId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTeamId() { + return teamId; + } + + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTeamId(@javax.annotation.Nonnull String teamId) { + this.teamId = teamId; + } + + + public CreateLinearIssue title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + + public CreateLinearIssue description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateLinearIssue priority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get priority + * @return priority + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPriority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + } + + + /** + * Return true if this CreateLinearIssue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateLinearIssue createLinearIssue = (CreateLinearIssue) o; + return Objects.equals(this.teamId, createLinearIssue.teamId) && + Objects.equals(this.title, createLinearIssue.title) && + Objects.equals(this.description, createLinearIssue.description) && + Objects.equals(this.priority, createLinearIssue.priority); + } + + @Override + public int hashCode() { + return Objects.hash(teamId, title, description, priority); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateLinearIssue {\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `team_id` to the URL query string + if (getTeamId() != null) { + joiner.add(String.format("%steam_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTeamId())))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format("%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `priority` to the URL query string + if (getPriority() != null) { + joiner.add(String.format("%spriority%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPriority())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResponse.java new file mode 100644 index 0000000..c01eb7b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CreateLinearIssueResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateLinearIssueResponse + */ +@JsonPropertyOrder({ + CreateLinearIssueResponse.JSON_PROPERTY_STATUS, + CreateLinearIssueResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateLinearIssueResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private CreateLinearIssueResult result; + + public CreateLinearIssueResponse() { + } + + public CreateLinearIssueResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public CreateLinearIssueResponse result(@javax.annotation.Nonnull CreateLinearIssueResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateLinearIssueResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull CreateLinearIssueResult result) { + this.result = result; + } + + + /** + * Return true if this CreateLinearIssueResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateLinearIssueResponse createLinearIssueResponse = (CreateLinearIssueResponse) o; + return Objects.equals(this.status, createLinearIssueResponse.status) && + Objects.equals(this.result, createLinearIssueResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateLinearIssueResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResult.java new file mode 100644 index 0000000..48e035c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateLinearIssueResult.java @@ -0,0 +1,295 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateLinearIssueResult + */ +@JsonPropertyOrder({ + CreateLinearIssueResult.JSON_PROPERTY_ALREADY_LINKED, + CreateLinearIssueResult.JSON_PROPERTY_ISSUE_ID, + CreateLinearIssueResult.JSON_PROPERTY_ISSUE_URL, + CreateLinearIssueResult.JSON_PROPERTY_ISSUE_TITLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateLinearIssueResult { + public static final String JSON_PROPERTY_ALREADY_LINKED = "already_linked"; + @javax.annotation.Nullable + private Boolean alreadyLinked; + + public static final String JSON_PROPERTY_ISSUE_ID = "issue_id"; + private JsonNullable issueId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ISSUE_URL = "issue_url"; + private JsonNullable issueUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ISSUE_TITLE = "issue_title"; + private JsonNullable issueTitle = JsonNullable.undefined(); + + public CreateLinearIssueResult() { + } + + public CreateLinearIssueResult alreadyLinked(@javax.annotation.Nullable Boolean alreadyLinked) { + this.alreadyLinked = alreadyLinked; + return this; + } + + /** + * Get alreadyLinked + * @return alreadyLinked + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALREADY_LINKED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAlreadyLinked() { + return alreadyLinked; + } + + + @JsonProperty(JSON_PROPERTY_ALREADY_LINKED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAlreadyLinked(@javax.annotation.Nullable Boolean alreadyLinked) { + this.alreadyLinked = alreadyLinked; + } + + + public CreateLinearIssueResult issueId(@javax.annotation.Nullable String issueId) { + this.issueId = JsonNullable.of(issueId); + return this; + } + + /** + * Get issueId + * @return issueId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getIssueId() { + return issueId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ISSUE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIssueId_JsonNullable() { + return issueId; + } + + @JsonProperty(JSON_PROPERTY_ISSUE_ID) + public void setIssueId_JsonNullable(JsonNullable issueId) { + this.issueId = issueId; + } + + public void setIssueId(@javax.annotation.Nullable String issueId) { + this.issueId = JsonNullable.of(issueId); + } + + + public CreateLinearIssueResult issueUrl(@javax.annotation.Nullable String issueUrl) { + this.issueUrl = JsonNullable.of(issueUrl); + return this; + } + + /** + * Get issueUrl + * @return issueUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public String getIssueUrl() { + return issueUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ISSUE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIssueUrl_JsonNullable() { + return issueUrl; + } + + @JsonProperty(JSON_PROPERTY_ISSUE_URL) + public void setIssueUrl_JsonNullable(JsonNullable issueUrl) { + this.issueUrl = issueUrl; + } + + public void setIssueUrl(@javax.annotation.Nullable String issueUrl) { + this.issueUrl = JsonNullable.of(issueUrl); + } + + + public CreateLinearIssueResult issueTitle(@javax.annotation.Nullable String issueTitle) { + this.issueTitle = JsonNullable.of(issueTitle); + return this; + } + + /** + * Get issueTitle + * @return issueTitle + */ + @javax.annotation.Nullable + @JsonIgnore + public String getIssueTitle() { + return issueTitle.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ISSUE_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIssueTitle_JsonNullable() { + return issueTitle; + } + + @JsonProperty(JSON_PROPERTY_ISSUE_TITLE) + public void setIssueTitle_JsonNullable(JsonNullable issueTitle) { + this.issueTitle = issueTitle; + } + + public void setIssueTitle(@javax.annotation.Nullable String issueTitle) { + this.issueTitle = JsonNullable.of(issueTitle); + } + + + /** + * Return true if this CreateLinearIssueResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateLinearIssueResult createLinearIssueResult = (CreateLinearIssueResult) o; + return Objects.equals(this.alreadyLinked, createLinearIssueResult.alreadyLinked) && + equalsNullable(this.issueId, createLinearIssueResult.issueId) && + equalsNullable(this.issueUrl, createLinearIssueResult.issueUrl) && + equalsNullable(this.issueTitle, createLinearIssueResult.issueTitle); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(alreadyLinked, hashCodeNullable(issueId), hashCodeNullable(issueUrl), hashCodeNullable(issueTitle)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateLinearIssueResult {\n"); + sb.append(" alreadyLinked: ").append(toIndentedString(alreadyLinked)).append("\n"); + sb.append(" issueId: ").append(toIndentedString(issueId)).append("\n"); + sb.append(" issueUrl: ").append(toIndentedString(issueUrl)).append("\n"); + sb.append(" issueTitle: ").append(toIndentedString(issueTitle)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `already_linked` to the URL query string + if (getAlreadyLinked() != null) { + joiner.add(String.format("%salready_linked%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAlreadyLinked())))); + } + + // add `issue_id` to the URL query string + if (getIssueId() != null) { + joiner.add(String.format("%sissue_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIssueId())))); + } + + // add `issue_url` to the URL query string + if (getIssueUrl() != null) { + joiner.add(String.format("%sissue_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIssueUrl())))); + } + + // add `issue_title` to the URL query string + if (getIssueTitle() != null) { + joiner.add(String.format("%sissue_title%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIssueTitle())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreatePromptSimulationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreatePromptSimulationRequest.java new file mode 100644 index 0000000..3ecad5b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreatePromptSimulationRequest.java @@ -0,0 +1,410 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalConfigDefinition; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreatePromptSimulationRequest + */ +@JsonPropertyOrder({ + CreatePromptSimulationRequest.JSON_PROPERTY_NAME, + CreatePromptSimulationRequest.JSON_PROPERTY_DESCRIPTION, + CreatePromptSimulationRequest.JSON_PROPERTY_PROMPT_VERSION_ID, + CreatePromptSimulationRequest.JSON_PROPERTY_SCENARIO_IDS, + CreatePromptSimulationRequest.JSON_PROPERTY_DATASET_ROW_IDS, + CreatePromptSimulationRequest.JSON_PROPERTY_EVALUATIONS_CONFIG, + CreatePromptSimulationRequest.JSON_PROPERTY_ENABLE_TOOL_EVALUATION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreatePromptSimulationRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_PROMPT_VERSION_ID = "prompt_version_id"; + @javax.annotation.Nonnull + private String promptVersionId; + + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nonnull + private List scenarioIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_ROW_IDS = "dataset_row_ids"; + @javax.annotation.Nullable + private List datasetRowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVALUATIONS_CONFIG = "evaluations_config"; + @javax.annotation.Nullable + private List evaluationsConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_ENABLE_TOOL_EVALUATION = "enable_tool_evaluation"; + @javax.annotation.Nullable + private Boolean enableToolEvaluation = false; + + public CreatePromptSimulationRequest() { + } + + public CreatePromptSimulationRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreatePromptSimulationRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreatePromptSimulationRequest promptVersionId(@javax.annotation.Nonnull String promptVersionId) { + this.promptVersionId = promptVersionId; + return this; + } + + /** + * Prompt version ID (UUID) or template_version string + * @return promptVersionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptVersionId() { + return promptVersionId; + } + + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPromptVersionId(@javax.annotation.Nonnull String promptVersionId) { + this.promptVersionId = promptVersionId; + } + + + public CreatePromptSimulationRequest scenarioIds(@javax.annotation.Nonnull List scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public CreatePromptSimulationRequest addScenarioIdsItem(UUID scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new ArrayList<>(); + } + this.scenarioIds.add(scenarioIdsItem); + return this; + } + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScenarioIds(@javax.annotation.Nonnull List scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + public CreatePromptSimulationRequest datasetRowIds(@javax.annotation.Nullable List datasetRowIds) { + this.datasetRowIds = datasetRowIds; + return this; + } + + public CreatePromptSimulationRequest addDatasetRowIdsItem(String datasetRowIdsItem) { + if (this.datasetRowIds == null) { + this.datasetRowIds = new ArrayList<>(); + } + this.datasetRowIds.add(datasetRowIdsItem); + return this; + } + + /** + * Get datasetRowIds + * @return datasetRowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasetRowIds() { + return datasetRowIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetRowIds(@javax.annotation.Nullable List datasetRowIds) { + this.datasetRowIds = datasetRowIds; + } + + + public CreatePromptSimulationRequest evaluationsConfig(@javax.annotation.Nullable List evaluationsConfig) { + this.evaluationsConfig = evaluationsConfig; + return this; + } + + public CreatePromptSimulationRequest addEvaluationsConfigItem(EvalConfigDefinition evaluationsConfigItem) { + if (this.evaluationsConfig == null) { + this.evaluationsConfig = new ArrayList<>(); + } + this.evaluationsConfig.add(evaluationsConfigItem); + return this; + } + + /** + * Evaluation configurations to create + * @return evaluationsConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATIONS_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvaluationsConfig() { + return evaluationsConfig; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATIONS_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationsConfig(@javax.annotation.Nullable List evaluationsConfig) { + this.evaluationsConfig = evaluationsConfig; + } + + + public CreatePromptSimulationRequest enableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + return this; + } + + /** + * Enable automatic tool evaluation for this simulation run + * @return enableToolEvaluation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableToolEvaluation() { + return enableToolEvaluation; + } + + + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + } + + + /** + * Return true if this CreatePromptSimulationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePromptSimulationRequest createPromptSimulationRequest = (CreatePromptSimulationRequest) o; + return Objects.equals(this.name, createPromptSimulationRequest.name) && + Objects.equals(this.description, createPromptSimulationRequest.description) && + Objects.equals(this.promptVersionId, createPromptSimulationRequest.promptVersionId) && + Objects.equals(this.scenarioIds, createPromptSimulationRequest.scenarioIds) && + Objects.equals(this.datasetRowIds, createPromptSimulationRequest.datasetRowIds) && + Objects.equals(this.evaluationsConfig, createPromptSimulationRequest.evaluationsConfig) && + Objects.equals(this.enableToolEvaluation, createPromptSimulationRequest.enableToolEvaluation); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, promptVersionId, scenarioIds, datasetRowIds, evaluationsConfig, enableToolEvaluation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePromptSimulationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" promptVersionId: ").append(toIndentedString(promptVersionId)).append("\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append(" datasetRowIds: ").append(toIndentedString(datasetRowIds)).append("\n"); + sb.append(" evaluationsConfig: ").append(toIndentedString(evaluationsConfig)).append("\n"); + sb.append(" enableToolEvaluation: ").append(toIndentedString(enableToolEvaluation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `prompt_version_id` to the URL query string + if (getPromptVersionId() != null) { + joiner.add(String.format("%sprompt_version_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptVersionId())))); + } + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + // add `dataset_row_ids` to the URL query string + if (getDatasetRowIds() != null) { + for (int i = 0; i < getDatasetRowIds().size(); i++) { + joiner.add(String.format("%sdataset_row_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetRowIds().get(i))))); + } + } + + // add `evaluations_config` to the URL query string + if (getEvaluationsConfig() != null) { + for (int i = 0; i < getEvaluationsConfig().size(); i++) { + if (getEvaluationsConfig().get(i) != null) { + joiner.add(getEvaluationsConfig().get(i).toUrlQueryString(String.format("%sevaluations_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `enable_tool_evaluation` to the URL query string + if (getEnableToolEvaluation() != null) { + joiner.add(String.format("%senable_tool_evaluation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnableToolEvaluation())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateRunTest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateRunTest.java new file mode 100644 index 0000000..316d713 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateRunTest.java @@ -0,0 +1,561 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalConfigDefinition; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateRunTest + */ +@JsonPropertyOrder({ + CreateRunTest.JSON_PROPERTY_NAME, + CreateRunTest.JSON_PROPERTY_DESCRIPTION, + CreateRunTest.JSON_PROPERTY_AGENT_DEFINITION_ID, + CreateRunTest.JSON_PROPERTY_SCENARIO_IDS, + CreateRunTest.JSON_PROPERTY_DATASET_ROW_IDS, + CreateRunTest.JSON_PROPERTY_EVAL_CONFIG_IDS, + CreateRunTest.JSON_PROPERTY_EVALUATIONS_CONFIG, + CreateRunTest.JSON_PROPERTY_ENABLE_TOOL_EVALUATION, + CreateRunTest.JSON_PROPERTY_REPLAY_SESSION_ID, + CreateRunTest.JSON_PROPERTY_AGENT_VERSION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateRunTest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_ID = "agent_definition_id"; + @javax.annotation.Nonnull + private UUID agentDefinitionId; + + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nonnull + private List scenarioIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_ROW_IDS = "dataset_row_ids"; + @javax.annotation.Nullable + private List datasetRowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVAL_CONFIG_IDS = "eval_config_ids"; + @javax.annotation.Nullable + private List evalConfigIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVALUATIONS_CONFIG = "evaluations_config"; + @javax.annotation.Nullable + private List evaluationsConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_ENABLE_TOOL_EVALUATION = "enable_tool_evaluation"; + @javax.annotation.Nullable + private Boolean enableToolEvaluation = false; + + public static final String JSON_PROPERTY_REPLAY_SESSION_ID = "replay_session_id"; + private JsonNullable replaySessionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + private JsonNullable agentVersion = JsonNullable.undefined(); + + public CreateRunTest() { + } + + public CreateRunTest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateRunTest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateRunTest agentDefinitionId(@javax.annotation.Nonnull UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + return this; + } + + /** + * Get agentDefinitionId + * @return agentDefinitionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getAgentDefinitionId() { + return agentDefinitionId; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgentDefinitionId(@javax.annotation.Nonnull UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + } + + + public CreateRunTest scenarioIds(@javax.annotation.Nonnull List scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public CreateRunTest addScenarioIdsItem(UUID scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new ArrayList<>(); + } + this.scenarioIds.add(scenarioIdsItem); + return this; + } + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScenarioIds(@javax.annotation.Nonnull List scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + public CreateRunTest datasetRowIds(@javax.annotation.Nullable List datasetRowIds) { + this.datasetRowIds = datasetRowIds; + return this; + } + + public CreateRunTest addDatasetRowIdsItem(String datasetRowIdsItem) { + if (this.datasetRowIds == null) { + this.datasetRowIds = new ArrayList<>(); + } + this.datasetRowIds.add(datasetRowIdsItem); + return this; + } + + /** + * Get datasetRowIds + * @return datasetRowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasetRowIds() { + return datasetRowIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetRowIds(@javax.annotation.Nullable List datasetRowIds) { + this.datasetRowIds = datasetRowIds; + } + + + public CreateRunTest evalConfigIds(@javax.annotation.Nullable List evalConfigIds) { + this.evalConfigIds = evalConfigIds; + return this; + } + + public CreateRunTest addEvalConfigIdsItem(UUID evalConfigIdsItem) { + if (this.evalConfigIds == null) { + this.evalConfigIds = new ArrayList<>(); + } + this.evalConfigIds.add(evalConfigIdsItem); + return this; + } + + /** + * Get evalConfigIds + * @return evalConfigIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvalConfigIds() { + return evalConfigIds; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalConfigIds(@javax.annotation.Nullable List evalConfigIds) { + this.evalConfigIds = evalConfigIds; + } + + + public CreateRunTest evaluationsConfig(@javax.annotation.Nullable List evaluationsConfig) { + this.evaluationsConfig = evaluationsConfig; + return this; + } + + public CreateRunTest addEvaluationsConfigItem(EvalConfigDefinition evaluationsConfigItem) { + if (this.evaluationsConfig == null) { + this.evaluationsConfig = new ArrayList<>(); + } + this.evaluationsConfig.add(evaluationsConfigItem); + return this; + } + + /** + * Evaluation configurations to create + * @return evaluationsConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATIONS_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvaluationsConfig() { + return evaluationsConfig; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATIONS_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationsConfig(@javax.annotation.Nullable List evaluationsConfig) { + this.evaluationsConfig = evaluationsConfig; + } + + + public CreateRunTest enableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + return this; + } + + /** + * Enable automatic tool evaluation for this test run + * @return enableToolEvaluation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableToolEvaluation() { + return enableToolEvaluation; + } + + + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + } + + + public CreateRunTest replaySessionId(@javax.annotation.Nullable UUID replaySessionId) { + this.replaySessionId = JsonNullable.of(replaySessionId); + return this; + } + + /** + * Optional replay session ID to mark as completed after run test creation + * @return replaySessionId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getReplaySessionId() { + return replaySessionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REPLAY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReplaySessionId_JsonNullable() { + return replaySessionId; + } + + @JsonProperty(JSON_PROPERTY_REPLAY_SESSION_ID) + public void setReplaySessionId_JsonNullable(JsonNullable replaySessionId) { + this.replaySessionId = replaySessionId; + } + + public void setReplaySessionId(@javax.annotation.Nullable UUID replaySessionId) { + this.replaySessionId = JsonNullable.of(replaySessionId); + } + + + public CreateRunTest agentVersion(@javax.annotation.Nullable UUID agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + return this; + } + + /** + * Optional agent version to bind to this test run + * @return agentVersion + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAgentVersion() { + return agentVersion.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentVersion_JsonNullable() { + return agentVersion; + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + public void setAgentVersion_JsonNullable(JsonNullable agentVersion) { + this.agentVersion = agentVersion; + } + + public void setAgentVersion(@javax.annotation.Nullable UUID agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + } + + + /** + * Return true if this CreateRunTest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRunTest createRunTest = (CreateRunTest) o; + return Objects.equals(this.name, createRunTest.name) && + Objects.equals(this.description, createRunTest.description) && + Objects.equals(this.agentDefinitionId, createRunTest.agentDefinitionId) && + Objects.equals(this.scenarioIds, createRunTest.scenarioIds) && + Objects.equals(this.datasetRowIds, createRunTest.datasetRowIds) && + Objects.equals(this.evalConfigIds, createRunTest.evalConfigIds) && + Objects.equals(this.evaluationsConfig, createRunTest.evaluationsConfig) && + Objects.equals(this.enableToolEvaluation, createRunTest.enableToolEvaluation) && + equalsNullable(this.replaySessionId, createRunTest.replaySessionId) && + equalsNullable(this.agentVersion, createRunTest.agentVersion); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, agentDefinitionId, scenarioIds, datasetRowIds, evalConfigIds, evaluationsConfig, enableToolEvaluation, hashCodeNullable(replaySessionId), hashCodeNullable(agentVersion)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRunTest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" agentDefinitionId: ").append(toIndentedString(agentDefinitionId)).append("\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append(" datasetRowIds: ").append(toIndentedString(datasetRowIds)).append("\n"); + sb.append(" evalConfigIds: ").append(toIndentedString(evalConfigIds)).append("\n"); + sb.append(" evaluationsConfig: ").append(toIndentedString(evaluationsConfig)).append("\n"); + sb.append(" enableToolEvaluation: ").append(toIndentedString(enableToolEvaluation)).append("\n"); + sb.append(" replaySessionId: ").append(toIndentedString(replaySessionId)).append("\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `agent_definition_id` to the URL query string + if (getAgentDefinitionId() != null) { + joiner.add(String.format("%sagent_definition_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionId())))); + } + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + // add `dataset_row_ids` to the URL query string + if (getDatasetRowIds() != null) { + for (int i = 0; i < getDatasetRowIds().size(); i++) { + joiner.add(String.format("%sdataset_row_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetRowIds().get(i))))); + } + } + + // add `eval_config_ids` to the URL query string + if (getEvalConfigIds() != null) { + for (int i = 0; i < getEvalConfigIds().size(); i++) { + if (getEvalConfigIds().get(i) != null) { + joiner.add(String.format("%seval_config_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalConfigIds().get(i))))); + } + } + } + + // add `evaluations_config` to the URL query string + if (getEvaluationsConfig() != null) { + for (int i = 0; i < getEvaluationsConfig().size(); i++) { + if (getEvaluationsConfig().get(i) != null) { + joiner.add(getEvaluationsConfig().get(i).toUrlQueryString(String.format("%sevaluations_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `enable_tool_evaluation` to the URL query string + if (getEnableToolEvaluation() != null) { + joiner.add(String.format("%senable_tool_evaluation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnableToolEvaluation())))); + } + + // add `replay_session_id` to the URL query string + if (getReplaySessionId() != null) { + joiner.add(String.format("%sreplay_session_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReplaySessionId())))); + } + + // add `agent_version` to the URL query string + if (getAgentVersion() != null) { + joiner.add(String.format("%sagent_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentVersion())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateScore.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateScore.java new file mode 100644 index 0000000..5274e2f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/CreateScore.java @@ -0,0 +1,486 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * CreateScore + */ +@JsonPropertyOrder({ + CreateScore.JSON_PROPERTY_SOURCE_TYPE, + CreateScore.JSON_PROPERTY_SOURCE_ID, + CreateScore.JSON_PROPERTY_LABEL_ID, + CreateScore.JSON_PROPERTY_VALUE, + CreateScore.JSON_PROPERTY_NOTES, + CreateScore.JSON_PROPERTY_SCORE_SOURCE, + CreateScore.JSON_PROPERTY_QUEUE_ITEM_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class CreateScore { + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + DATASET_ROW(String.valueOf("dataset_row")), + + TRACE(String.valueOf("trace")), + + OBSERVATION_SPAN(String.valueOf("observation_span")), + + PROTOTYPE_RUN(String.valueOf("prototype_run")), + + CALL_EXECUTION(String.valueOf("call_execution")), + + TRACE_SESSION(String.valueOf("trace_session")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nonnull + private String sourceId; + + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nonnull + private UUID labelId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private String notes = ""; + + /** + * Gets or Sets scoreSource + */ + public enum ScoreSourceEnum { + HUMAN(String.valueOf("human")), + + API(String.valueOf("api")), + + AUTO(String.valueOf("auto")), + + IMPORTED(String.valueOf("imported")); + + private String value; + + ScoreSourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScoreSourceEnum fromValue(String value) { + for (ScoreSourceEnum b : ScoreSourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCORE_SOURCE = "score_source"; + @javax.annotation.Nullable + private ScoreSourceEnum scoreSource = ScoreSourceEnum.HUMAN; + + public static final String JSON_PROPERTY_QUEUE_ITEM_ID = "queue_item_id"; + private JsonNullable queueItemId = JsonNullable.undefined(); + + public CreateScore() { + } + + public CreateScore sourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + public CreateScore sourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + } + + + public CreateScore labelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + } + + + public CreateScore value(@javax.annotation.Nonnull Map value) { + this.value = value; + return this; + } + + public CreateScore putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Map value) { + this.value = value; + } + + + public CreateScore notes(@javax.annotation.Nullable String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = notes; + } + + + public CreateScore scoreSource(@javax.annotation.Nullable ScoreSourceEnum scoreSource) { + this.scoreSource = scoreSource; + return this; + } + + /** + * Get scoreSource + * @return scoreSource + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScoreSourceEnum getScoreSource() { + return scoreSource; + } + + + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScoreSource(@javax.annotation.Nullable ScoreSourceEnum scoreSource) { + this.scoreSource = scoreSource; + } + + + public CreateScore queueItemId(@javax.annotation.Nullable UUID queueItemId) { + this.queueItemId = JsonNullable.of(queueItemId); + return this; + } + + /** + * Get queueItemId + * @return queueItemId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getQueueItemId() { + return queueItemId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_QUEUE_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getQueueItemId_JsonNullable() { + return queueItemId; + } + + @JsonProperty(JSON_PROPERTY_QUEUE_ITEM_ID) + public void setQueueItemId_JsonNullable(JsonNullable queueItemId) { + this.queueItemId = queueItemId; + } + + public void setQueueItemId(@javax.annotation.Nullable UUID queueItemId) { + this.queueItemId = JsonNullable.of(queueItemId); + } + + + /** + * Return true if this CreateScore object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateScore createScore = (CreateScore) o; + return Objects.equals(this.sourceType, createScore.sourceType) && + Objects.equals(this.sourceId, createScore.sourceId) && + Objects.equals(this.labelId, createScore.labelId) && + Objects.equals(this.value, createScore.value) && + Objects.equals(this.notes, createScore.notes) && + Objects.equals(this.scoreSource, createScore.scoreSource) && + equalsNullable(this.queueItemId, createScore.queueItemId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(sourceType, sourceId, labelId, value, notes, scoreSource, hashCodeNullable(queueItemId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateScore {\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" scoreSource: ").append(toIndentedString(scoreSource)).append("\n"); + sb.append(" queueItemId: ").append(toIndentedString(queueItemId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `score_source` to the URL query string + if (getScoreSource() != null) { + joiner.add(String.format("%sscore_source%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScoreSource())))); + } + + // add `queue_item_id` to the URL query string + if (getQueueItemId() != null) { + joiner.add(String.format("%squeue_item_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueueItemId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Dataset.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Dataset.java new file mode 100644 index 0000000..f6cd8a1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Dataset.java @@ -0,0 +1,456 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Dataset + */ +@JsonPropertyOrder({ + Dataset.JSON_PROPERTY_ID, + Dataset.JSON_PROPERTY_NAME, + Dataset.JSON_PROPERTY_ORGANIZATION, + Dataset.JSON_PROPERTY_MODEL_TYPE, + Dataset.JSON_PROPERTY_SOURCE, + Dataset.JSON_PROPERTY_USER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Dataset { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nonnull + private UUID organization; + + /** + * Gets or Sets modelType + */ + public enum ModelTypeEnum { + NUMERIC(String.valueOf("Numeric")), + + SCORE_CATEGORICAL(String.valueOf("ScoreCategorical")), + + RANKING(String.valueOf("Ranking")), + + BINARY_CLASSIFICATION(String.valueOf("BinaryClassification")), + + REGRESSION(String.valueOf("Regression")), + + OBJECT_DETECTION(String.valueOf("ObjectDetection")), + + SEGMENTATION(String.valueOf("Segmentation")), + + GENERATIVE_LLM(String.valueOf("GenerativeLLM")), + + GENERATIVE_IMAGE(String.valueOf("GenerativeImage")), + + GENERATIVE_VIDEO(String.valueOf("GenerativeVideo")), + + TTS(String.valueOf("TTS")), + + STT(String.valueOf("STT")), + + MULTI_MODAL(String.valueOf("MultiModal")); + + private String value; + + ModelTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModelTypeEnum fromValue(String value) { + for (ModelTypeEnum b : ModelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nullable + private ModelTypeEnum modelType; + + /** + * Gets or Sets source + */ + public enum SourceEnum { + DEMO(String.valueOf("demo")), + + BUILD(String.valueOf("build")), + + SDK(String.valueOf("sdk")), + + OBSERVE(String.valueOf("observe")), + + KNOWLEDGE_BASE(String.valueOf("knowledge_base")), + + SCENARIO(String.valueOf("scenario")), + + EXPERIMENT_SNAPSHOT(String.valueOf("experiment_snapshot")), + + GRAPH(String.valueOf("graph")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private SourceEnum source; + + public static final String JSON_PROPERTY_USER = "user"; + private JsonNullable user = JsonNullable.undefined(); + + public Dataset() { + } + + @JsonCreator + public Dataset( + @JsonProperty(JSON_PROPERTY_ID) UUID id + ) { + this(); + this.id = id; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public Dataset name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Dataset organization(@javax.annotation.Nonnull UUID organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getOrganization() { + return organization; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrganization(@javax.annotation.Nonnull UUID organization) { + this.organization = organization; + } + + + public Dataset modelType(@javax.annotation.Nullable ModelTypeEnum modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ModelTypeEnum getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@javax.annotation.Nullable ModelTypeEnum modelType) { + this.modelType = modelType; + } + + + public Dataset source(@javax.annotation.Nullable SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SourceEnum getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable SourceEnum source) { + this.source = source; + } + + + public Dataset user(@javax.annotation.Nullable UUID user) { + this.user = JsonNullable.of(user); + return this; + } + + /** + * Get user + * @return user + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getUser() { + return user.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUser_JsonNullable() { + return user; + } + + @JsonProperty(JSON_PROPERTY_USER) + public void setUser_JsonNullable(JsonNullable user) { + this.user = user; + } + + public void setUser(@javax.annotation.Nullable UUID user) { + this.user = JsonNullable.of(user); + } + + + /** + * Return true if this Dataset object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dataset dataset = (Dataset) o; + return Objects.equals(this.id, dataset.id) && + Objects.equals(this.name, dataset.name) && + Objects.equals(this.organization, dataset.organization) && + Objects.equals(this.modelType, dataset.modelType) && + Objects.equals(this.source, dataset.source) && + equalsNullable(this.user, dataset.user); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, organization, modelType, source, hashCodeNullable(user)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dataset {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `user` to the URL query string + if (getUser() != null) { + joiner.add(String.format("%suser%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUser())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddColumnsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddColumnsRequest.java new file mode 100644 index 0000000..6347033 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddColumnsRequest.java @@ -0,0 +1,166 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetAddColumnsRequest + */ +@JsonPropertyOrder({ + DatasetAddColumnsRequest.JSON_PROPERTY_NEW_COLUMNS_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetAddColumnsRequest { + public static final String JSON_PROPERTY_NEW_COLUMNS_DATA = "new_columns_data"; + @javax.annotation.Nonnull + private List> newColumnsData = new ArrayList<>(); + + public DatasetAddColumnsRequest() { + } + + public DatasetAddColumnsRequest newColumnsData(@javax.annotation.Nonnull List> newColumnsData) { + this.newColumnsData = newColumnsData; + return this; + } + + public DatasetAddColumnsRequest addNewColumnsDataItem(Map newColumnsDataItem) { + if (this.newColumnsData == null) { + this.newColumnsData = new ArrayList<>(); + } + this.newColumnsData.add(newColumnsDataItem); + return this; + } + + /** + * Get newColumnsData + * @return newColumnsData + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMNS_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getNewColumnsData() { + return newColumnsData; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMNS_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnsData(@javax.annotation.Nonnull List> newColumnsData) { + this.newColumnsData = newColumnsData; + } + + + /** + * Return true if this DatasetAddColumnsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetAddColumnsRequest datasetAddColumnsRequest = (DatasetAddColumnsRequest) o; + return Objects.equals(this.newColumnsData, datasetAddColumnsRequest.newColumnsData); + } + + @Override + public int hashCode() { + return Objects.hash(newColumnsData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetAddColumnsRequest {\n"); + sb.append(" newColumnsData: ").append(toIndentedString(newColumnsData)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `new_columns_data` to the URL query string + if (getNewColumnsData() != null) { + for (int i = 0; i < getNewColumnsData().size(); i++) { + joiner.add(String.format("%snew_columns_data%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getNewColumnsData().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyColumnsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyColumnsRequest.java new file mode 100644 index 0000000..7f94ffc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyColumnsRequest.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetAddEmptyColumnsRequest + */ +@JsonPropertyOrder({ + DatasetAddEmptyColumnsRequest.JSON_PROPERTY_NUM_COLS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetAddEmptyColumnsRequest { + public static final String JSON_PROPERTY_NUM_COLS = "num_cols"; + @javax.annotation.Nullable + private Integer numCols = 0; + + public DatasetAddEmptyColumnsRequest() { + } + + public DatasetAddEmptyColumnsRequest numCols(@javax.annotation.Nullable Integer numCols) { + this.numCols = numCols; + return this; + } + + /** + * Get numCols + * minimum: 0 + * @return numCols + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_COLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumCols() { + return numCols; + } + + + @JsonProperty(JSON_PROPERTY_NUM_COLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumCols(@javax.annotation.Nullable Integer numCols) { + this.numCols = numCols; + } + + + /** + * Return true if this DatasetAddEmptyColumnsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetAddEmptyColumnsRequest datasetAddEmptyColumnsRequest = (DatasetAddEmptyColumnsRequest) o; + return Objects.equals(this.numCols, datasetAddEmptyColumnsRequest.numCols); + } + + @Override + public int hashCode() { + return Objects.hash(numCols); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetAddEmptyColumnsRequest {\n"); + sb.append(" numCols: ").append(toIndentedString(numCols)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_cols` to the URL query string + if (getNumCols() != null) { + joiner.add(String.format("%snum_cols%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumCols())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyRowsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyRowsRequest.java new file mode 100644 index 0000000..5647215 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddEmptyRowsRequest.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetAddEmptyRowsRequest + */ +@JsonPropertyOrder({ + DatasetAddEmptyRowsRequest.JSON_PROPERTY_NUM_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetAddEmptyRowsRequest { + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nullable + private Integer numRows = 1; + + public DatasetAddEmptyRowsRequest() { + } + + public DatasetAddEmptyRowsRequest numRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * minimum: 1 + * @return numRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + } + + + /** + * Return true if this DatasetAddEmptyRowsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetAddEmptyRowsRequest datasetAddEmptyRowsRequest = (DatasetAddEmptyRowsRequest) o; + return Objects.equals(this.numRows, datasetAddEmptyRowsRequest.numRows); + } + + @Override + public int hashCode() { + return Objects.hash(numRows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetAddEmptyRowsRequest {\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsFromExistingRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsFromExistingRequest.java new file mode 100644 index 0000000..7b7b500 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsFromExistingRequest.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetAddRowsFromExistingRequest + */ +@JsonPropertyOrder({ + DatasetAddRowsFromExistingRequest.JSON_PROPERTY_SOURCE_DATASET_ID, + DatasetAddRowsFromExistingRequest.JSON_PROPERTY_COLUMN_MAPPING +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetAddRowsFromExistingRequest { + public static final String JSON_PROPERTY_SOURCE_DATASET_ID = "source_dataset_id"; + @javax.annotation.Nonnull + private UUID sourceDatasetId; + + public static final String JSON_PROPERTY_COLUMN_MAPPING = "column_mapping"; + @javax.annotation.Nonnull + private Map columnMapping = new HashMap<>(); + + public DatasetAddRowsFromExistingRequest() { + } + + public DatasetAddRowsFromExistingRequest sourceDatasetId(@javax.annotation.Nonnull UUID sourceDatasetId) { + this.sourceDatasetId = sourceDatasetId; + return this; + } + + /** + * Get sourceDatasetId + * @return sourceDatasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getSourceDatasetId() { + return sourceDatasetId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceDatasetId(@javax.annotation.Nonnull UUID sourceDatasetId) { + this.sourceDatasetId = sourceDatasetId; + } + + + public DatasetAddRowsFromExistingRequest columnMapping(@javax.annotation.Nonnull Map columnMapping) { + this.columnMapping = columnMapping; + return this; + } + + public DatasetAddRowsFromExistingRequest putColumnMappingItem(String key, UUID columnMappingItem) { + if (this.columnMapping == null) { + this.columnMapping = new HashMap<>(); + } + this.columnMapping.put(key, columnMappingItem); + return this; + } + + /** + * Get columnMapping + * @return columnMapping + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_MAPPING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getColumnMapping() { + return columnMapping; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_MAPPING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnMapping(@javax.annotation.Nonnull Map columnMapping) { + this.columnMapping = columnMapping; + } + + + /** + * Return true if this DatasetAddRowsFromExistingRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetAddRowsFromExistingRequest datasetAddRowsFromExistingRequest = (DatasetAddRowsFromExistingRequest) o; + return Objects.equals(this.sourceDatasetId, datasetAddRowsFromExistingRequest.sourceDatasetId) && + Objects.equals(this.columnMapping, datasetAddRowsFromExistingRequest.columnMapping); + } + + @Override + public int hashCode() { + return Objects.hash(sourceDatasetId, columnMapping); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetAddRowsFromExistingRequest {\n"); + sb.append(" sourceDatasetId: ").append(toIndentedString(sourceDatasetId)).append("\n"); + sb.append(" columnMapping: ").append(toIndentedString(columnMapping)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `source_dataset_id` to the URL query string + if (getSourceDatasetId() != null) { + joiner.add(String.format("%ssource_dataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceDatasetId())))); + } + + // add `column_mapping` to the URL query string + if (getColumnMapping() != null) { + for (String _key : getColumnMapping().keySet()) { + joiner.add(String.format("%scolumn_mapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getColumnMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getColumnMapping().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsRequest.java new file mode 100644 index 0000000..a666909 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetAddRowsRequest.java @@ -0,0 +1,166 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetAddRowsRequest + */ +@JsonPropertyOrder({ + DatasetAddRowsRequest.JSON_PROPERTY_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetAddRowsRequest { + public static final String JSON_PROPERTY_ROWS = "rows"; + @javax.annotation.Nonnull + private List> rows = new ArrayList<>(); + + public DatasetAddRowsRequest() { + } + + public DatasetAddRowsRequest rows(@javax.annotation.Nonnull List> rows) { + this.rows = rows; + return this; + } + + public DatasetAddRowsRequest addRowsItem(Map rowsItem) { + if (this.rows == null) { + this.rows = new ArrayList<>(); + } + this.rows.add(rowsItem); + return this; + } + + /** + * Get rows + * @return rows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getRows() { + return rows; + } + + + @JsonProperty(JSON_PROPERTY_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRows(@javax.annotation.Nonnull List> rows) { + this.rows = rows; + } + + + /** + * Return true if this DatasetAddRowsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetAddRowsRequest datasetAddRowsRequest = (DatasetAddRowsRequest) o; + return Objects.equals(this.rows, datasetAddRowsRequest.rows); + } + + @Override + public int hashCode() { + return Objects.hash(rows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetAddRowsRequest {\n"); + sb.append(" rows: ").append(toIndentedString(rows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rows` to the URL query string + if (getRows() != null) { + for (int i = 0; i < getRows().size(); i++) { + joiner.add(String.format("%srows%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRows().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetBehaviorRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetBehaviorRequest.java new file mode 100644 index 0000000..daefee5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetBehaviorRequest.java @@ -0,0 +1,302 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetBehaviorRequest + */ +@JsonPropertyOrder({ + DatasetBehaviorRequest.JSON_PROPERTY_DATASET_NAME, + DatasetBehaviorRequest.JSON_PROPERTY_COLUMN_ORDER, + DatasetBehaviorRequest.JSON_PROPERTY_COLUMN_CONFIG, + DatasetBehaviorRequest.JSON_PROPERTY_DATASET_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetBehaviorRequest { + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nullable + private String datasetName; + + public static final String JSON_PROPERTY_COLUMN_ORDER = "column_order"; + @javax.annotation.Nullable + private List columnOrder = new ArrayList<>(); + + public static final String JSON_PROPERTY_COLUMN_CONFIG = "column_config"; + @javax.annotation.Nullable + private Map columnConfig = new HashMap<>(); + + public static final String JSON_PROPERTY_DATASET_CONFIG = "dataset_config"; + @javax.annotation.Nullable + private Map datasetConfig = new HashMap<>(); + + public DatasetBehaviorRequest() { + } + + public DatasetBehaviorRequest datasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + } + + + public DatasetBehaviorRequest columnOrder(@javax.annotation.Nullable List columnOrder) { + this.columnOrder = columnOrder; + return this; + } + + public DatasetBehaviorRequest addColumnOrderItem(UUID columnOrderItem) { + if (this.columnOrder == null) { + this.columnOrder = new ArrayList<>(); + } + this.columnOrder.add(columnOrderItem); + return this; + } + + /** + * Get columnOrder + * @return columnOrder + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumnOrder() { + return columnOrder; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnOrder(@javax.annotation.Nullable List columnOrder) { + this.columnOrder = columnOrder; + } + + + public DatasetBehaviorRequest columnConfig(@javax.annotation.Nullable Map columnConfig) { + this.columnConfig = columnConfig; + return this; + } + + public DatasetBehaviorRequest putColumnConfigItem(String key, Object columnConfigItem) { + if (this.columnConfig == null) { + this.columnConfig = new HashMap<>(); + } + this.columnConfig.put(key, columnConfigItem); + return this; + } + + /** + * Get columnConfig + * @return columnConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getColumnConfig() { + return columnConfig; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnConfig(@javax.annotation.Nullable Map columnConfig) { + this.columnConfig = columnConfig; + } + + + public DatasetBehaviorRequest datasetConfig(@javax.annotation.Nullable Map datasetConfig) { + this.datasetConfig = datasetConfig; + return this; + } + + public DatasetBehaviorRequest putDatasetConfigItem(String key, Object datasetConfigItem) { + if (this.datasetConfig == null) { + this.datasetConfig = new HashMap<>(); + } + this.datasetConfig.put(key, datasetConfigItem); + return this; + } + + /** + * Get datasetConfig + * @return datasetConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDatasetConfig() { + return datasetConfig; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetConfig(@javax.annotation.Nullable Map datasetConfig) { + this.datasetConfig = datasetConfig; + } + + + /** + * Return true if this DatasetBehaviorRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetBehaviorRequest datasetBehaviorRequest = (DatasetBehaviorRequest) o; + return Objects.equals(this.datasetName, datasetBehaviorRequest.datasetName) && + Objects.equals(this.columnOrder, datasetBehaviorRequest.columnOrder) && + Objects.equals(this.columnConfig, datasetBehaviorRequest.columnConfig) && + Objects.equals(this.datasetConfig, datasetBehaviorRequest.datasetConfig); + } + + @Override + public int hashCode() { + return Objects.hash(datasetName, columnOrder, columnConfig, datasetConfig); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetBehaviorRequest {\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" columnOrder: ").append(toIndentedString(columnOrder)).append("\n"); + sb.append(" columnConfig: ").append(toIndentedString(columnConfig)).append("\n"); + sb.append(" datasetConfig: ").append(toIndentedString(datasetConfig)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `column_order` to the URL query string + if (getColumnOrder() != null) { + for (int i = 0; i < getColumnOrder().size(); i++) { + if (getColumnOrder().get(i) != null) { + joiner.add(String.format("%scolumn_order%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumnOrder().get(i))))); + } + } + } + + // add `column_config` to the URL query string + if (getColumnConfig() != null) { + for (String _key : getColumnConfig().keySet()) { + joiner.add(String.format("%scolumn_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getColumnConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getColumnConfig().get(_key))))); + } + } + + // add `dataset_config` to the URL query string + if (getDatasetConfig() != null) { + for (String _key : getDatasetConfig().keySet()) { + joiner.add(String.format("%sdataset_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDatasetConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDatasetConfig().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataRequest.java new file mode 100644 index 0000000..089c37b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataRequest.java @@ -0,0 +1,218 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCellDataRequest + */ +@JsonPropertyOrder({ + DatasetCellDataRequest.JSON_PROPERTY_ROW_IDS, + DatasetCellDataRequest.JSON_PROPERTY_COLUMN_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCellDataRequest { + public static final String JSON_PROPERTY_ROW_IDS = "row_ids"; + @javax.annotation.Nonnull + private List rowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_COLUMN_IDS = "column_ids"; + @javax.annotation.Nonnull + private List columnIds = new ArrayList<>(); + + public DatasetCellDataRequest() { + } + + public DatasetCellDataRequest rowIds(@javax.annotation.Nonnull List rowIds) { + this.rowIds = rowIds; + return this; + } + + public DatasetCellDataRequest addRowIdsItem(UUID rowIdsItem) { + if (this.rowIds == null) { + this.rowIds = new ArrayList<>(); + } + this.rowIds.add(rowIdsItem); + return this; + } + + /** + * Get rowIds + * @return rowIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRowIds() { + return rowIds; + } + + + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowIds(@javax.annotation.Nonnull List rowIds) { + this.rowIds = rowIds; + } + + + public DatasetCellDataRequest columnIds(@javax.annotation.Nonnull List columnIds) { + this.columnIds = columnIds; + return this; + } + + public DatasetCellDataRequest addColumnIdsItem(UUID columnIdsItem) { + if (this.columnIds == null) { + this.columnIds = new ArrayList<>(); + } + this.columnIds.add(columnIdsItem); + return this; + } + + /** + * Get columnIds + * @return columnIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumnIds() { + return columnIds; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnIds(@javax.annotation.Nonnull List columnIds) { + this.columnIds = columnIds; + } + + + /** + * Return true if this DatasetCellDataRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCellDataRequest datasetCellDataRequest = (DatasetCellDataRequest) o; + return Objects.equals(this.rowIds, datasetCellDataRequest.rowIds) && + Objects.equals(this.columnIds, datasetCellDataRequest.columnIds); + } + + @Override + public int hashCode() { + return Objects.hash(rowIds, columnIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCellDataRequest {\n"); + sb.append(" rowIds: ").append(toIndentedString(rowIds)).append("\n"); + sb.append(" columnIds: ").append(toIndentedString(columnIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row_ids` to the URL query string + if (getRowIds() != null) { + for (int i = 0; i < getRowIds().size(); i++) { + if (getRowIds().get(i) != null) { + joiner.add(String.format("%srow_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRowIds().get(i))))); + } + } + } + + // add `column_ids` to the URL query string + if (getColumnIds() != null) { + for (int i = 0; i < getColumnIds().size(); i++) { + if (getColumnIds().get(i) != null) { + joiner.add(String.format("%scolumn_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumnIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataResponse.java new file mode 100644 index 0000000..3a81fbb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellDataResponse.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetCellValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCellDataResponse + */ +@JsonPropertyOrder({ + DatasetCellDataResponse.JSON_PROPERTY_STATUS, + DatasetCellDataResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCellDataResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map> result = new HashMap<>(); + + public DatasetCellDataResponse() { + } + + public DatasetCellDataResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetCellDataResponse result(@javax.annotation.Nonnull Map> result) { + this.result = result; + return this; + } + + public DatasetCellDataResponse putResultItem(String key, Map resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map> result) { + this.result = result; + } + + + /** + * Return true if this DatasetCellDataResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCellDataResponse datasetCellDataResponse = (DatasetCellDataResponse) o; + return Objects.equals(this.status, datasetCellDataResponse.status) && + Objects.equals(this.result, datasetCellDataResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCellDataResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + joiner.add(String.format("%sresult%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResult().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellValue.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellValue.java new file mode 100644 index 0000000..19af867 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCellValue.java @@ -0,0 +1,319 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCellValue + */ +@JsonPropertyOrder({ + DatasetCellValue.JSON_PROPERTY_CELL_VALUE, + DatasetCellValue.JSON_PROPERTY_STATUS, + DatasetCellValue.JSON_PROPERTY_VALUE_INFOS, + DatasetCellValue.JSON_PROPERTY_FEEDBACK_INFO +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCellValue { + public static final String JSON_PROPERTY_CELL_VALUE = "cell_value"; + @javax.annotation.Nullable + private Map cellValue = new HashMap<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private JsonNullable status = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_VALUE_INFOS = "value_infos"; + @javax.annotation.Nullable + private Map valueInfos = new HashMap<>(); + + public static final String JSON_PROPERTY_FEEDBACK_INFO = "feedback_info"; + @javax.annotation.Nullable + private Map feedbackInfo = new HashMap<>(); + + public DatasetCellValue() { + } + + public DatasetCellValue cellValue(@javax.annotation.Nullable Map cellValue) { + this.cellValue = cellValue; + return this; + } + + public DatasetCellValue putCellValueItem(String key, Object cellValueItem) { + if (this.cellValue == null) { + this.cellValue = new HashMap<>(); + } + this.cellValue.put(key, cellValueItem); + return this; + } + + /** + * Get cellValue + * @return cellValue + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELL_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCellValue() { + return cellValue; + } + + + @JsonProperty(JSON_PROPERTY_CELL_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCellValue(@javax.annotation.Nullable Map cellValue) { + this.cellValue = cellValue; + } + + + public DatasetCellValue status(@javax.annotation.Nullable String status) { + this.status = JsonNullable.of(status); + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonIgnore + public String getStatus() { + return status.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatus_JsonNullable() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + public void setStatus_JsonNullable(JsonNullable status) { + this.status = status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = JsonNullable.of(status); + } + + + public DatasetCellValue valueInfos(@javax.annotation.Nullable Map valueInfos) { + this.valueInfos = valueInfos; + return this; + } + + public DatasetCellValue putValueInfosItem(String key, Object valueInfosItem) { + if (this.valueInfos == null) { + this.valueInfos = new HashMap<>(); + } + this.valueInfos.put(key, valueInfosItem); + return this; + } + + /** + * Get valueInfos + * @return valueInfos + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE_INFOS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getValueInfos() { + return valueInfos; + } + + + @JsonProperty(JSON_PROPERTY_VALUE_INFOS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setValueInfos(@javax.annotation.Nullable Map valueInfos) { + this.valueInfos = valueInfos; + } + + + public DatasetCellValue feedbackInfo(@javax.annotation.Nullable Map feedbackInfo) { + this.feedbackInfo = feedbackInfo; + return this; + } + + public DatasetCellValue putFeedbackInfoItem(String key, Object feedbackInfoItem) { + if (this.feedbackInfo == null) { + this.feedbackInfo = new HashMap<>(); + } + this.feedbackInfo.put(key, feedbackInfoItem); + return this; + } + + /** + * Get feedbackInfo + * @return feedbackInfo + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEEDBACK_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFeedbackInfo() { + return feedbackInfo; + } + + + @JsonProperty(JSON_PROPERTY_FEEDBACK_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setFeedbackInfo(@javax.annotation.Nullable Map feedbackInfo) { + this.feedbackInfo = feedbackInfo; + } + + + /** + * Return true if this DatasetCellValue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCellValue datasetCellValue = (DatasetCellValue) o; + return Objects.equals(this.cellValue, datasetCellValue.cellValue) && + equalsNullable(this.status, datasetCellValue.status) && + Objects.equals(this.valueInfos, datasetCellValue.valueInfos) && + Objects.equals(this.feedbackInfo, datasetCellValue.feedbackInfo); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(cellValue, hashCodeNullable(status), valueInfos, feedbackInfo); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCellValue {\n"); + sb.append(" cellValue: ").append(toIndentedString(cellValue)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" valueInfos: ").append(toIndentedString(valueInfos)).append("\n"); + sb.append(" feedbackInfo: ").append(toIndentedString(feedbackInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `cell_value` to the URL query string + if (getCellValue() != null) { + for (String _key : getCellValue().keySet()) { + joiner.add(String.format("%scell_value%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCellValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCellValue().get(_key))))); + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `value_infos` to the URL query string + if (getValueInfos() != null) { + for (String _key : getValueInfos().keySet()) { + joiner.add(String.format("%svalue_infos%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValueInfos().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValueInfos().get(_key))))); + } + } + + // add `feedback_info` to the URL query string + if (getFeedbackInfo() != null) { + for (String _key : getFeedbackInfo().keySet()) { + joiner.add(String.format("%sfeedback_info%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFeedbackInfo().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFeedbackInfo().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailItem.java new file mode 100644 index 0000000..eb92767 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailItem.java @@ -0,0 +1,246 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetColumnDetailItem + */ +@JsonPropertyOrder({ + DatasetColumnDetailItem.JSON_PROPERTY_ID, + DatasetColumnDetailItem.JSON_PROPERTY_NAME, + DatasetColumnDetailItem.JSON_PROPERTY_DATA_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetColumnDetailItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DATA_TYPE = "data_type"; + private JsonNullable dataType = JsonNullable.undefined(); + + public DatasetColumnDetailItem() { + } + + public DatasetColumnDetailItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public DatasetColumnDetailItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public DatasetColumnDetailItem dataType(@javax.annotation.Nullable String dataType) { + this.dataType = JsonNullable.of(dataType); + return this; + } + + /** + * Get dataType + * @return dataType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDataType() { + return dataType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDataType_JsonNullable() { + return dataType; + } + + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + public void setDataType_JsonNullable(JsonNullable dataType) { + this.dataType = dataType; + } + + public void setDataType(@javax.annotation.Nullable String dataType) { + this.dataType = JsonNullable.of(dataType); + } + + + /** + * Return true if this DatasetColumnDetailItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetColumnDetailItem datasetColumnDetailItem = (DatasetColumnDetailItem) o; + return Objects.equals(this.id, datasetColumnDetailItem.id) && + Objects.equals(this.name, datasetColumnDetailItem.name) && + equalsNullable(this.dataType, datasetColumnDetailItem.dataType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(dataType)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetColumnDetailItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `data_type` to the URL query string + if (getDataType() != null) { + joiner.add(String.format("%sdata_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResponse.java new file mode 100644 index 0000000..af09c19 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetColumnDetailResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetColumnDetailResponse + */ +@JsonPropertyOrder({ + DatasetColumnDetailResponse.JSON_PROPERTY_STATUS, + DatasetColumnDetailResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetColumnDetailResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetColumnDetailResult result; + + public DatasetColumnDetailResponse() { + } + + public DatasetColumnDetailResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetColumnDetailResponse result(@javax.annotation.Nonnull DatasetColumnDetailResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetColumnDetailResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetColumnDetailResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetColumnDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetColumnDetailResponse datasetColumnDetailResponse = (DatasetColumnDetailResponse) o; + return Objects.equals(this.status, datasetColumnDetailResponse.status) && + Objects.equals(this.result, datasetColumnDetailResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetColumnDetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResult.java new file mode 100644 index 0000000..e689aae --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnDetailResult.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetColumnDetailItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetColumnDetailResult + */ +@JsonPropertyOrder({ + DatasetColumnDetailResult.JSON_PROPERTY_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetColumnDetailResult { + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public DatasetColumnDetailResult() { + } + + public DatasetColumnDetailResult columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public DatasetColumnDetailResult addColumnsItem(DatasetColumnDetailItem columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + /** + * Return true if this DatasetColumnDetailResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetColumnDetailResult datasetColumnDetailResult = (DatasetColumnDetailResult) o; + return Objects.equals(this.columns, datasetColumnDetailResult.columns); + } + + @Override + public int hashCode() { + return Objects.hash(columns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetColumnDetailResult {\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + if (getColumns().get(i) != null) { + joiner.add(getColumns().get(i).toUrlQueryString(String.format("%scolumns%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResponse.java new file mode 100644 index 0000000..fba8d64 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetColumnsMutationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetColumnsMutationResponse + */ +@JsonPropertyOrder({ + DatasetColumnsMutationResponse.JSON_PROPERTY_STATUS, + DatasetColumnsMutationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetColumnsMutationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetColumnsMutationResult result; + + public DatasetColumnsMutationResponse() { + } + + public DatasetColumnsMutationResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetColumnsMutationResponse result(@javax.annotation.Nonnull DatasetColumnsMutationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetColumnsMutationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetColumnsMutationResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetColumnsMutationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetColumnsMutationResponse datasetColumnsMutationResponse = (DatasetColumnsMutationResponse) o; + return Objects.equals(this.status, datasetColumnsMutationResponse.status) && + Objects.equals(this.result, datasetColumnsMutationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetColumnsMutationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResult.java new file mode 100644 index 0000000..0c5ba9e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetColumnsMutationResult.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Column; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetColumnsMutationResult + */ +@JsonPropertyOrder({ + DatasetColumnsMutationResult.JSON_PROPERTY_MESSAGE, + DatasetColumnsMutationResult.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetColumnsMutationResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATA = "data"; + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public DatasetColumnsMutationResult() { + } + + public DatasetColumnsMutationResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public DatasetColumnsMutationResult data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public DatasetColumnsMutationResult addDataItem(Column dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + + /** + * Return true if this DatasetColumnsMutationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetColumnsMutationResult datasetColumnsMutationResult = (DatasetColumnsMutationResult) o; + return Objects.equals(this.message, datasetColumnsMutationResult.message) && + Objects.equals(this.data, datasetColumnsMutationResult.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetColumnsMutationResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResponse.java new file mode 100644 index 0000000..fc1e7d1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetCopyResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCopyResponse + */ +@JsonPropertyOrder({ + DatasetCopyResponse.JSON_PROPERTY_STATUS, + DatasetCopyResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCopyResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetCopyResult result; + + public DatasetCopyResponse() { + } + + public DatasetCopyResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetCopyResponse result(@javax.annotation.Nonnull DatasetCopyResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetCopyResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetCopyResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetCopyResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCopyResponse datasetCopyResponse = (DatasetCopyResponse) o; + return Objects.equals(this.status, datasetCopyResponse.status) && + Objects.equals(this.result, datasetCopyResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCopyResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResult.java new file mode 100644 index 0000000..c3413e9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCopyResult.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCopyResult + */ +@JsonPropertyOrder({ + DatasetCopyResult.JSON_PROPERTY_MESSAGE, + DatasetCopyResult.JSON_PROPERTY_DATASET_ID, + DatasetCopyResult.JSON_PROPERTY_DATASET_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCopyResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public DatasetCopyResult() { + } + + public DatasetCopyResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public DatasetCopyResult datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public DatasetCopyResult datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + /** + * Return true if this DatasetCopyResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCopyResult datasetCopyResult = (DatasetCopyResult) o; + return Objects.equals(this.message, datasetCopyResult.message) && + Objects.equals(this.datasetId, datasetCopyResult.datasetId) && + Objects.equals(this.datasetName, datasetCopyResult.datasetName); + } + + @Override + public int hashCode() { + return Objects.hash(message, datasetId, datasetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCopyResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResponse.java new file mode 100644 index 0000000..229b374 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetCreateStartedResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCreateStartedResponse + */ +@JsonPropertyOrder({ + DatasetCreateStartedResponse.JSON_PROPERTY_STATUS, + DatasetCreateStartedResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCreateStartedResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetCreateStartedResult result; + + public DatasetCreateStartedResponse() { + } + + public DatasetCreateStartedResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetCreateStartedResponse result(@javax.annotation.Nonnull DatasetCreateStartedResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetCreateStartedResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetCreateStartedResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetCreateStartedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCreateStartedResponse datasetCreateStartedResponse = (DatasetCreateStartedResponse) o; + return Objects.equals(this.status, datasetCreateStartedResponse.status) && + Objects.equals(this.result, datasetCreateStartedResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCreateStartedResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResult.java new file mode 100644 index 0000000..36ebc3c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreateStartedResult.java @@ -0,0 +1,282 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCreateStartedResult + */ +@JsonPropertyOrder({ + DatasetCreateStartedResult.JSON_PROPERTY_MESSAGE, + DatasetCreateStartedResult.JSON_PROPERTY_DATASET_ID, + DatasetCreateStartedResult.JSON_PROPERTY_DATASET_NAME, + DatasetCreateStartedResult.JSON_PROPERTY_DATASET_MODEL_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCreateStartedResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_DATASET_MODEL_TYPE = "dataset_model_type"; + private JsonNullable datasetModelType = JsonNullable.undefined(); + + public DatasetCreateStartedResult() { + } + + public DatasetCreateStartedResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public DatasetCreateStartedResult datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public DatasetCreateStartedResult datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public DatasetCreateStartedResult datasetModelType(@javax.annotation.Nullable String datasetModelType) { + this.datasetModelType = JsonNullable.of(datasetModelType); + return this; + } + + /** + * Get datasetModelType + * @return datasetModelType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDatasetModelType() { + return datasetModelType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatasetModelType_JsonNullable() { + return datasetModelType; + } + + @JsonProperty(JSON_PROPERTY_DATASET_MODEL_TYPE) + public void setDatasetModelType_JsonNullable(JsonNullable datasetModelType) { + this.datasetModelType = datasetModelType; + } + + public void setDatasetModelType(@javax.annotation.Nullable String datasetModelType) { + this.datasetModelType = JsonNullable.of(datasetModelType); + } + + + /** + * Return true if this DatasetCreateStartedResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCreateStartedResult datasetCreateStartedResult = (DatasetCreateStartedResult) o; + return Objects.equals(this.message, datasetCreateStartedResult.message) && + Objects.equals(this.datasetId, datasetCreateStartedResult.datasetId) && + Objects.equals(this.datasetName, datasetCreateStartedResult.datasetName) && + equalsNullable(this.datasetModelType, datasetCreateStartedResult.datasetModelType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(message, datasetId, datasetName, hashCodeNullable(datasetModelType)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCreateStartedResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" datasetModelType: ").append(toIndentedString(datasetModelType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `dataset_model_type` to the URL query string + if (getDatasetModelType() != null) { + joiner.add(String.format("%sdataset_model_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetModelType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResponse.java new file mode 100644 index 0000000..71991cc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetCreationProgressResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCreationProgressResponse + */ +@JsonPropertyOrder({ + DatasetCreationProgressResponse.JSON_PROPERTY_STATUS, + DatasetCreationProgressResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCreationProgressResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetCreationProgressResult result; + + public DatasetCreationProgressResponse() { + } + + public DatasetCreationProgressResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetCreationProgressResponse result(@javax.annotation.Nonnull DatasetCreationProgressResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetCreationProgressResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetCreationProgressResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetCreationProgressResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCreationProgressResponse datasetCreationProgressResponse = (DatasetCreationProgressResponse) o; + return Objects.equals(this.status, datasetCreationProgressResponse.status) && + Objects.equals(this.result, datasetCreationProgressResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCreationProgressResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResult.java new file mode 100644 index 0000000..4942aa2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetCreationProgressResult.java @@ -0,0 +1,691 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetCreationProgressResult + */ +@JsonPropertyOrder({ + DatasetCreationProgressResult.JSON_PROPERTY_DATASET_ID, + DatasetCreationProgressResult.JSON_PROPERTY_DATASET_NAME, + DatasetCreationProgressResult.JSON_PROPERTY_PROCESSING_STATUS, + DatasetCreationProgressResult.JSON_PROPERTY_IS_PROCESSING, + DatasetCreationProgressResult.JSON_PROPERTY_IS_COMPLETED, + DatasetCreationProgressResult.JSON_PROPERTY_IS_FAILED, + DatasetCreationProgressResult.JSON_PROPERTY_ORIGINAL_FILENAME, + DatasetCreationProgressResult.JSON_PROPERTY_ESTIMATED_ROWS, + DatasetCreationProgressResult.JSON_PROPERTY_ESTIMATED_COLUMNS, + DatasetCreationProgressResult.JSON_PROPERTY_QUEUED_AT, + DatasetCreationProgressResult.JSON_PROPERTY_STARTED_AT, + DatasetCreationProgressResult.JSON_PROPERTY_COMPLETED_AT, + DatasetCreationProgressResult.JSON_PROPERTY_FAILED_AT, + DatasetCreationProgressResult.JSON_PROPERTY_ERROR_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetCreationProgressResult { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + @javax.annotation.Nonnull + private String processingStatus; + + public static final String JSON_PROPERTY_IS_PROCESSING = "is_processing"; + @javax.annotation.Nonnull + private Boolean isProcessing; + + public static final String JSON_PROPERTY_IS_COMPLETED = "is_completed"; + @javax.annotation.Nonnull + private Boolean isCompleted; + + public static final String JSON_PROPERTY_IS_FAILED = "is_failed"; + @javax.annotation.Nonnull + private Boolean isFailed; + + public static final String JSON_PROPERTY_ORIGINAL_FILENAME = "original_filename"; + private JsonNullable originalFilename = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ESTIMATED_ROWS = "estimated_rows"; + private JsonNullable estimatedRows = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ESTIMATED_COLUMNS = "estimated_columns"; + private JsonNullable estimatedColumns = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_QUEUED_AT = "queued_at"; + private JsonNullable queuedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private JsonNullable startedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FAILED_AT = "failed_at"; + private JsonNullable failedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private JsonNullable errorMessage = JsonNullable.undefined(); + + public DatasetCreationProgressResult() { + } + + public DatasetCreationProgressResult datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public DatasetCreationProgressResult datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public DatasetCreationProgressResult processingStatus(@javax.annotation.Nonnull String processingStatus) { + this.processingStatus = processingStatus; + return this; + } + + /** + * Get processingStatus + * @return processingStatus + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProcessingStatus() { + return processingStatus; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProcessingStatus(@javax.annotation.Nonnull String processingStatus) { + this.processingStatus = processingStatus; + } + + + public DatasetCreationProgressResult isProcessing(@javax.annotation.Nonnull Boolean isProcessing) { + this.isProcessing = isProcessing; + return this; + } + + /** + * Get isProcessing + * @return isProcessing + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_PROCESSING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsProcessing() { + return isProcessing; + } + + + @JsonProperty(JSON_PROPERTY_IS_PROCESSING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsProcessing(@javax.annotation.Nonnull Boolean isProcessing) { + this.isProcessing = isProcessing; + } + + + public DatasetCreationProgressResult isCompleted(@javax.annotation.Nonnull Boolean isCompleted) { + this.isCompleted = isCompleted; + return this; + } + + /** + * Get isCompleted + * @return isCompleted + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsCompleted() { + return isCompleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsCompleted(@javax.annotation.Nonnull Boolean isCompleted) { + this.isCompleted = isCompleted; + } + + + public DatasetCreationProgressResult isFailed(@javax.annotation.Nonnull Boolean isFailed) { + this.isFailed = isFailed; + return this; + } + + /** + * Get isFailed + * @return isFailed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsFailed() { + return isFailed; + } + + + @JsonProperty(JSON_PROPERTY_IS_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsFailed(@javax.annotation.Nonnull Boolean isFailed) { + this.isFailed = isFailed; + } + + + public DatasetCreationProgressResult originalFilename(@javax.annotation.Nullable String originalFilename) { + this.originalFilename = JsonNullable.of(originalFilename); + return this; + } + + /** + * Get originalFilename + * @return originalFilename + */ + @javax.annotation.Nullable + @JsonIgnore + public String getOriginalFilename() { + return originalFilename.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORIGINAL_FILENAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOriginalFilename_JsonNullable() { + return originalFilename; + } + + @JsonProperty(JSON_PROPERTY_ORIGINAL_FILENAME) + public void setOriginalFilename_JsonNullable(JsonNullable originalFilename) { + this.originalFilename = originalFilename; + } + + public void setOriginalFilename(@javax.annotation.Nullable String originalFilename) { + this.originalFilename = JsonNullable.of(originalFilename); + } + + + public DatasetCreationProgressResult estimatedRows(@javax.annotation.Nullable Integer estimatedRows) { + this.estimatedRows = JsonNullable.of(estimatedRows); + return this; + } + + /** + * Get estimatedRows + * @return estimatedRows + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getEstimatedRows() { + return estimatedRows.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ESTIMATED_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEstimatedRows_JsonNullable() { + return estimatedRows; + } + + @JsonProperty(JSON_PROPERTY_ESTIMATED_ROWS) + public void setEstimatedRows_JsonNullable(JsonNullable estimatedRows) { + this.estimatedRows = estimatedRows; + } + + public void setEstimatedRows(@javax.annotation.Nullable Integer estimatedRows) { + this.estimatedRows = JsonNullable.of(estimatedRows); + } + + + public DatasetCreationProgressResult estimatedColumns(@javax.annotation.Nullable Integer estimatedColumns) { + this.estimatedColumns = JsonNullable.of(estimatedColumns); + return this; + } + + /** + * Get estimatedColumns + * @return estimatedColumns + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getEstimatedColumns() { + return estimatedColumns.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ESTIMATED_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEstimatedColumns_JsonNullable() { + return estimatedColumns; + } + + @JsonProperty(JSON_PROPERTY_ESTIMATED_COLUMNS) + public void setEstimatedColumns_JsonNullable(JsonNullable estimatedColumns) { + this.estimatedColumns = estimatedColumns; + } + + public void setEstimatedColumns(@javax.annotation.Nullable Integer estimatedColumns) { + this.estimatedColumns = JsonNullable.of(estimatedColumns); + } + + + public DatasetCreationProgressResult queuedAt(@javax.annotation.Nullable String queuedAt) { + this.queuedAt = JsonNullable.of(queuedAt); + return this; + } + + /** + * Get queuedAt + * @return queuedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public String getQueuedAt() { + return queuedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_QUEUED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getQueuedAt_JsonNullable() { + return queuedAt; + } + + @JsonProperty(JSON_PROPERTY_QUEUED_AT) + public void setQueuedAt_JsonNullable(JsonNullable queuedAt) { + this.queuedAt = queuedAt; + } + + public void setQueuedAt(@javax.annotation.Nullable String queuedAt) { + this.queuedAt = JsonNullable.of(queuedAt); + } + + + public DatasetCreationProgressResult startedAt(@javax.annotation.Nullable String startedAt) { + this.startedAt = JsonNullable.of(startedAt); + return this; + } + + /** + * Get startedAt + * @return startedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public String getStartedAt() { + return startedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedAt_JsonNullable() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + public void setStartedAt_JsonNullable(JsonNullable startedAt) { + this.startedAt = startedAt; + } + + public void setStartedAt(@javax.annotation.Nullable String startedAt) { + this.startedAt = JsonNullable.of(startedAt); + } + + + public DatasetCreationProgressResult completedAt(@javax.annotation.Nullable String completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Get completedAt + * @return completedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable String completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + + public DatasetCreationProgressResult failedAt(@javax.annotation.Nullable String failedAt) { + this.failedAt = JsonNullable.of(failedAt); + return this; + } + + /** + * Get failedAt + * @return failedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public String getFailedAt() { + return failedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FAILED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFailedAt_JsonNullable() { + return failedAt; + } + + @JsonProperty(JSON_PROPERTY_FAILED_AT) + public void setFailedAt_JsonNullable(JsonNullable failedAt) { + this.failedAt = failedAt; + } + + public void setFailedAt(@javax.annotation.Nullable String failedAt) { + this.failedAt = JsonNullable.of(failedAt); + } + + + public DatasetCreationProgressResult errorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = JsonNullable.of(errorMessage); + return this; + } + + /** + * Get errorMessage + * @return errorMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getErrorMessage() { + return errorMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getErrorMessage_JsonNullable() { + return errorMessage; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + public void setErrorMessage_JsonNullable(JsonNullable errorMessage) { + this.errorMessage = errorMessage; + } + + public void setErrorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = JsonNullable.of(errorMessage); + } + + + /** + * Return true if this DatasetCreationProgressResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetCreationProgressResult datasetCreationProgressResult = (DatasetCreationProgressResult) o; + return Objects.equals(this.datasetId, datasetCreationProgressResult.datasetId) && + Objects.equals(this.datasetName, datasetCreationProgressResult.datasetName) && + Objects.equals(this.processingStatus, datasetCreationProgressResult.processingStatus) && + Objects.equals(this.isProcessing, datasetCreationProgressResult.isProcessing) && + Objects.equals(this.isCompleted, datasetCreationProgressResult.isCompleted) && + Objects.equals(this.isFailed, datasetCreationProgressResult.isFailed) && + equalsNullable(this.originalFilename, datasetCreationProgressResult.originalFilename) && + equalsNullable(this.estimatedRows, datasetCreationProgressResult.estimatedRows) && + equalsNullable(this.estimatedColumns, datasetCreationProgressResult.estimatedColumns) && + equalsNullable(this.queuedAt, datasetCreationProgressResult.queuedAt) && + equalsNullable(this.startedAt, datasetCreationProgressResult.startedAt) && + equalsNullable(this.completedAt, datasetCreationProgressResult.completedAt) && + equalsNullable(this.failedAt, datasetCreationProgressResult.failedAt) && + equalsNullable(this.errorMessage, datasetCreationProgressResult.errorMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, datasetName, processingStatus, isProcessing, isCompleted, isFailed, hashCodeNullable(originalFilename), hashCodeNullable(estimatedRows), hashCodeNullable(estimatedColumns), hashCodeNullable(queuedAt), hashCodeNullable(startedAt), hashCodeNullable(completedAt), hashCodeNullable(failedAt), hashCodeNullable(errorMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetCreationProgressResult {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" processingStatus: ").append(toIndentedString(processingStatus)).append("\n"); + sb.append(" isProcessing: ").append(toIndentedString(isProcessing)).append("\n"); + sb.append(" isCompleted: ").append(toIndentedString(isCompleted)).append("\n"); + sb.append(" isFailed: ").append(toIndentedString(isFailed)).append("\n"); + sb.append(" originalFilename: ").append(toIndentedString(originalFilename)).append("\n"); + sb.append(" estimatedRows: ").append(toIndentedString(estimatedRows)).append("\n"); + sb.append(" estimatedColumns: ").append(toIndentedString(estimatedColumns)).append("\n"); + sb.append(" queuedAt: ").append(toIndentedString(queuedAt)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" failedAt: ").append(toIndentedString(failedAt)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `processing_status` to the URL query string + if (getProcessingStatus() != null) { + joiner.add(String.format("%sprocessing_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProcessingStatus())))); + } + + // add `is_processing` to the URL query string + if (getIsProcessing() != null) { + joiner.add(String.format("%sis_processing%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsProcessing())))); + } + + // add `is_completed` to the URL query string + if (getIsCompleted() != null) { + joiner.add(String.format("%sis_completed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsCompleted())))); + } + + // add `is_failed` to the URL query string + if (getIsFailed() != null) { + joiner.add(String.format("%sis_failed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsFailed())))); + } + + // add `original_filename` to the URL query string + if (getOriginalFilename() != null) { + joiner.add(String.format("%soriginal_filename%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOriginalFilename())))); + } + + // add `estimated_rows` to the URL query string + if (getEstimatedRows() != null) { + joiner.add(String.format("%sestimated_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEstimatedRows())))); + } + + // add `estimated_columns` to the URL query string + if (getEstimatedColumns() != null) { + joiner.add(String.format("%sestimated_columns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEstimatedColumns())))); + } + + // add `queued_at` to the URL query string + if (getQueuedAt() != null) { + joiner.add(String.format("%squeued_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueuedAt())))); + } + + // add `started_at` to the URL query string + if (getStartedAt() != null) { + joiner.add(String.format("%sstarted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartedAt())))); + } + + // add `completed_at` to the URL query string + if (getCompletedAt() != null) { + joiner.add(String.format("%scompleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedAt())))); + } + + // add `failed_at` to the URL query string + if (getFailedAt() != null) { + joiner.add(String.format("%sfailed_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedAt())))); + } + + // add `error_message` to the URL query string + if (getErrorMessage() != null) { + joiner.add(String.format("%serror_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResponse.java new file mode 100644 index 0000000..4a8d149 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetDerivedVariablesResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetDerivedVariablesResponse + */ +@JsonPropertyOrder({ + DatasetDerivedVariablesResponse.JSON_PROPERTY_STATUS, + DatasetDerivedVariablesResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetDerivedVariablesResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetDerivedVariablesResult result; + + public DatasetDerivedVariablesResponse() { + } + + public DatasetDerivedVariablesResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetDerivedVariablesResponse result(@javax.annotation.Nonnull DatasetDerivedVariablesResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetDerivedVariablesResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetDerivedVariablesResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetDerivedVariablesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetDerivedVariablesResponse datasetDerivedVariablesResponse = (DatasetDerivedVariablesResponse) o; + return Objects.equals(this.status, datasetDerivedVariablesResponse.status) && + Objects.equals(this.result, datasetDerivedVariablesResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetDerivedVariablesResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResult.java new file mode 100644 index 0000000..de8e904 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetDerivedVariablesResult.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DerivedVariableDetail; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetDerivedVariablesResult + */ +@JsonPropertyOrder({ + DatasetDerivedVariablesResult.JSON_PROPERTY_DERIVED_VARIABLES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetDerivedVariablesResult { + public static final String JSON_PROPERTY_DERIVED_VARIABLES = "derived_variables"; + @javax.annotation.Nonnull + private Map derivedVariables = new HashMap<>(); + + public DatasetDerivedVariablesResult() { + } + + public DatasetDerivedVariablesResult derivedVariables(@javax.annotation.Nonnull Map derivedVariables) { + this.derivedVariables = derivedVariables; + return this; + } + + public DatasetDerivedVariablesResult putDerivedVariablesItem(String key, DerivedVariableDetail derivedVariablesItem) { + if (this.derivedVariables == null) { + this.derivedVariables = new HashMap<>(); + } + this.derivedVariables.put(key, derivedVariablesItem); + return this; + } + + /** + * Get derivedVariables + * @return derivedVariables + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DERIVED_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getDerivedVariables() { + return derivedVariables; + } + + + @JsonProperty(JSON_PROPERTY_DERIVED_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDerivedVariables(@javax.annotation.Nonnull Map derivedVariables) { + this.derivedVariables = derivedVariables; + } + + + /** + * Return true if this DatasetDerivedVariablesResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetDerivedVariablesResult datasetDerivedVariablesResult = (DatasetDerivedVariablesResult) o; + return Objects.equals(this.derivedVariables, datasetDerivedVariablesResult.derivedVariables); + } + + @Override + public int hashCode() { + return Objects.hash(derivedVariables); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetDerivedVariablesResult {\n"); + sb.append(" derivedVariables: ").append(toIndentedString(derivedVariables)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `derived_variables` to the URL query string + if (getDerivedVariables() != null) { + for (String _key : getDerivedVariables().keySet()) { + if (getDerivedVariables().get(_key) != null) { + joiner.add(getDerivedVariables().get(_key).toUrlQueryString(String.format("%sderived_variables%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsItem.java new file mode 100644 index 0000000..a848ab6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsItem.java @@ -0,0 +1,505 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetEvalStatsMetric; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetEvalStatsItem + */ +@JsonPropertyOrder({ + DatasetEvalStatsItem.JSON_PROPERTY_ID, + DatasetEvalStatsItem.JSON_PROPERTY_NAME, + DatasetEvalStatsItem.JSON_PROPERTY_OUTPUT_TYPE, + DatasetEvalStatsItem.JSON_PROPERTY_RESULT, + DatasetEvalStatsItem.JSON_PROPERTY_TOTAL_PASS_RATE, + DatasetEvalStatsItem.JSON_PROPERTY_TOTAL_AVG, + DatasetEvalStatsItem.JSON_PROPERTY_TOTAL_CHOICES_AVG, + DatasetEvalStatsItem.JSON_PROPERTY_IS_NUMERIC_EVAL, + DatasetEvalStatsItem.JSON_PROPERTY_IS_NUMERIC_EVAL_PERCENTAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetEvalStatsItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nonnull + private String outputType; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PASS_RATE = "total_pass_rate"; + private JsonNullable totalPassRate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_AVG = "total_avg"; + @javax.annotation.Nullable + private Map totalAvg = new HashMap<>(); + + public static final String JSON_PROPERTY_TOTAL_CHOICES_AVG = "total_choices_avg"; + @javax.annotation.Nullable + private Map totalChoicesAvg = new HashMap<>(); + + public static final String JSON_PROPERTY_IS_NUMERIC_EVAL = "is_numeric_eval"; + @javax.annotation.Nullable + private Boolean isNumericEval; + + public static final String JSON_PROPERTY_IS_NUMERIC_EVAL_PERCENTAGE = "is_numeric_eval_percentage"; + @javax.annotation.Nullable + private Boolean isNumericEvalPercentage; + + public DatasetEvalStatsItem() { + } + + public DatasetEvalStatsItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public DatasetEvalStatsItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public DatasetEvalStatsItem outputType(@javax.annotation.Nonnull String outputType) { + this.outputType = outputType; + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutputType() { + return outputType; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutputType(@javax.annotation.Nonnull String outputType) { + this.outputType = outputType; + } + + + public DatasetEvalStatsItem result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public DatasetEvalStatsItem addResultItem(DatasetEvalStatsMetric resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + public DatasetEvalStatsItem totalPassRate(@javax.annotation.Nullable BigDecimal totalPassRate) { + this.totalPassRate = JsonNullable.of(totalPassRate); + return this; + } + + /** + * Get totalPassRate + * @return totalPassRate + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getTotalPassRate() { + return totalPassRate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOTAL_PASS_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTotalPassRate_JsonNullable() { + return totalPassRate; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_PASS_RATE) + public void setTotalPassRate_JsonNullable(JsonNullable totalPassRate) { + this.totalPassRate = totalPassRate; + } + + public void setTotalPassRate(@javax.annotation.Nullable BigDecimal totalPassRate) { + this.totalPassRate = JsonNullable.of(totalPassRate); + } + + + public DatasetEvalStatsItem totalAvg(@javax.annotation.Nullable Map totalAvg) { + this.totalAvg = totalAvg; + return this; + } + + public DatasetEvalStatsItem putTotalAvgItem(String key, Object totalAvgItem) { + if (this.totalAvg == null) { + this.totalAvg = new HashMap<>(); + } + this.totalAvg.put(key, totalAvgItem); + return this; + } + + /** + * Get totalAvg + * @return totalAvg + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_AVG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTotalAvg() { + return totalAvg; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_AVG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalAvg(@javax.annotation.Nullable Map totalAvg) { + this.totalAvg = totalAvg; + } + + + public DatasetEvalStatsItem totalChoicesAvg(@javax.annotation.Nullable Map totalChoicesAvg) { + this.totalChoicesAvg = totalChoicesAvg; + return this; + } + + public DatasetEvalStatsItem putTotalChoicesAvgItem(String key, Object totalChoicesAvgItem) { + if (this.totalChoicesAvg == null) { + this.totalChoicesAvg = new HashMap<>(); + } + this.totalChoicesAvg.put(key, totalChoicesAvgItem); + return this; + } + + /** + * Get totalChoicesAvg + * @return totalChoicesAvg + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CHOICES_AVG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTotalChoicesAvg() { + return totalChoicesAvg; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_CHOICES_AVG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalChoicesAvg(@javax.annotation.Nullable Map totalChoicesAvg) { + this.totalChoicesAvg = totalChoicesAvg; + } + + + public DatasetEvalStatsItem isNumericEval(@javax.annotation.Nullable Boolean isNumericEval) { + this.isNumericEval = isNumericEval; + return this; + } + + /** + * Get isNumericEval + * @return isNumericEval + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_NUMERIC_EVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsNumericEval() { + return isNumericEval; + } + + + @JsonProperty(JSON_PROPERTY_IS_NUMERIC_EVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsNumericEval(@javax.annotation.Nullable Boolean isNumericEval) { + this.isNumericEval = isNumericEval; + } + + + public DatasetEvalStatsItem isNumericEvalPercentage(@javax.annotation.Nullable Boolean isNumericEvalPercentage) { + this.isNumericEvalPercentage = isNumericEvalPercentage; + return this; + } + + /** + * Get isNumericEvalPercentage + * @return isNumericEvalPercentage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_NUMERIC_EVAL_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsNumericEvalPercentage() { + return isNumericEvalPercentage; + } + + + @JsonProperty(JSON_PROPERTY_IS_NUMERIC_EVAL_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsNumericEvalPercentage(@javax.annotation.Nullable Boolean isNumericEvalPercentage) { + this.isNumericEvalPercentage = isNumericEvalPercentage; + } + + + /** + * Return true if this DatasetEvalStatsItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetEvalStatsItem datasetEvalStatsItem = (DatasetEvalStatsItem) o; + return Objects.equals(this.id, datasetEvalStatsItem.id) && + Objects.equals(this.name, datasetEvalStatsItem.name) && + Objects.equals(this.outputType, datasetEvalStatsItem.outputType) && + Objects.equals(this.result, datasetEvalStatsItem.result) && + equalsNullable(this.totalPassRate, datasetEvalStatsItem.totalPassRate) && + Objects.equals(this.totalAvg, datasetEvalStatsItem.totalAvg) && + Objects.equals(this.totalChoicesAvg, datasetEvalStatsItem.totalChoicesAvg) && + Objects.equals(this.isNumericEval, datasetEvalStatsItem.isNumericEval) && + Objects.equals(this.isNumericEvalPercentage, datasetEvalStatsItem.isNumericEvalPercentage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, outputType, result, hashCodeNullable(totalPassRate), totalAvg, totalChoicesAvg, isNumericEval, isNumericEvalPercentage); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetEvalStatsItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" totalPassRate: ").append(toIndentedString(totalPassRate)).append("\n"); + sb.append(" totalAvg: ").append(toIndentedString(totalAvg)).append("\n"); + sb.append(" totalChoicesAvg: ").append(toIndentedString(totalChoicesAvg)).append("\n"); + sb.append(" isNumericEval: ").append(toIndentedString(isNumericEval)).append("\n"); + sb.append(" isNumericEvalPercentage: ").append(toIndentedString(isNumericEvalPercentage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_pass_rate` to the URL query string + if (getTotalPassRate() != null) { + joiner.add(String.format("%stotal_pass_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPassRate())))); + } + + // add `total_avg` to the URL query string + if (getTotalAvg() != null) { + for (String _key : getTotalAvg().keySet()) { + joiner.add(String.format("%stotal_avg%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTotalAvg().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTotalAvg().get(_key))))); + } + } + + // add `total_choices_avg` to the URL query string + if (getTotalChoicesAvg() != null) { + for (String _key : getTotalChoicesAvg().keySet()) { + joiner.add(String.format("%stotal_choices_avg%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTotalChoicesAvg().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTotalChoicesAvg().get(_key))))); + } + } + + // add `is_numeric_eval` to the URL query string + if (getIsNumericEval() != null) { + joiner.add(String.format("%sis_numeric_eval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsNumericEval())))); + } + + // add `is_numeric_eval_percentage` to the URL query string + if (getIsNumericEvalPercentage() != null) { + joiner.add(String.format("%sis_numeric_eval_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsNumericEvalPercentage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsMetric.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsMetric.java new file mode 100644 index 0000000..ef567d3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsMetric.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetEvalStatsMetric + */ +@JsonPropertyOrder({ + DatasetEvalStatsMetric.JSON_PROPERTY_ID, + DatasetEvalStatsMetric.JSON_PROPERTY_NAME, + DatasetEvalStatsMetric.JSON_PROPERTY_TOTAL_CELLS, + DatasetEvalStatsMetric.JSON_PROPERTY_OUTPUT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetEvalStatsMetric { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TOTAL_CELLS = "total_cells"; + private JsonNullable totalCells = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nonnull + private Map output = new HashMap<>(); + + public DatasetEvalStatsMetric() { + } + + public DatasetEvalStatsMetric id(@javax.annotation.Nullable UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable UUID id) { + this.id = id; + } + + + public DatasetEvalStatsMetric name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public DatasetEvalStatsMetric totalCells(@javax.annotation.Nullable Integer totalCells) { + this.totalCells = JsonNullable.of(totalCells); + return this; + } + + /** + * Get totalCells + * @return totalCells + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getTotalCells() { + return totalCells.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOTAL_CELLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTotalCells_JsonNullable() { + return totalCells; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_CELLS) + public void setTotalCells_JsonNullable(JsonNullable totalCells) { + this.totalCells = totalCells; + } + + public void setTotalCells(@javax.annotation.Nullable Integer totalCells) { + this.totalCells = JsonNullable.of(totalCells); + } + + + public DatasetEvalStatsMetric output(@javax.annotation.Nonnull Map output) { + this.output = output; + return this; + } + + public DatasetEvalStatsMetric putOutputItem(String key, Object outputItem) { + if (this.output == null) { + this.output = new HashMap<>(); + } + this.output.put(key, outputItem); + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setOutput(@javax.annotation.Nonnull Map output) { + this.output = output; + } + + + /** + * Return true if this DatasetEvalStatsMetric object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetEvalStatsMetric datasetEvalStatsMetric = (DatasetEvalStatsMetric) o; + return Objects.equals(this.id, datasetEvalStatsMetric.id) && + Objects.equals(this.name, datasetEvalStatsMetric.name) && + equalsNullable(this.totalCells, datasetEvalStatsMetric.totalCells) && + Objects.equals(this.output, datasetEvalStatsMetric.output); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(totalCells), output); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetEvalStatsMetric {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" totalCells: ").append(toIndentedString(totalCells)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `total_cells` to the URL query string + if (getTotalCells() != null) { + joiner.add(String.format("%stotal_cells%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCells())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsResponse.java new file mode 100644 index 0000000..45e58dc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetEvalStatsResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetEvalStatsItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetEvalStatsResponse + */ +@JsonPropertyOrder({ + DatasetEvalStatsResponse.JSON_PROPERTY_STATUS, + DatasetEvalStatsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetEvalStatsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public DatasetEvalStatsResponse() { + } + + public DatasetEvalStatsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetEvalStatsResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public DatasetEvalStatsResponse addResultItem(DatasetEvalStatsItem resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + /** + * Return true if this DatasetEvalStatsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetEvalStatsResponse datasetEvalStatsResponse = (DatasetEvalStatsResponse) o; + return Objects.equals(this.status, datasetEvalStatsResponse.status) && + Objects.equals(this.result, datasetEvalStatsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetEvalStatsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponse.java new file mode 100644 index 0000000..b20f662 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetExplanationSummaryResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetExplanationSummaryResponse + */ +@JsonPropertyOrder({ + DatasetExplanationSummaryResponse.JSON_PROPERTY_STATUS, + DatasetExplanationSummaryResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetExplanationSummaryResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetExplanationSummaryResponseResult result; + + public DatasetExplanationSummaryResponse() { + } + + public DatasetExplanationSummaryResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetExplanationSummaryResponse result(@javax.annotation.Nonnull DatasetExplanationSummaryResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetExplanationSummaryResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetExplanationSummaryResponseResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetExplanationSummaryResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetExplanationSummaryResponse datasetExplanationSummaryResponse = (DatasetExplanationSummaryResponse) o; + return Objects.equals(this.status, datasetExplanationSummaryResponse.status) && + Objects.equals(this.result, datasetExplanationSummaryResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetExplanationSummaryResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponseResult.java new file mode 100644 index 0000000..2e644c2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetExplanationSummaryResponseResult.java @@ -0,0 +1,310 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetExplanationSummaryResponseResult + */ +@JsonPropertyOrder({ + DatasetExplanationSummaryResponseResult.JSON_PROPERTY_RESPONSE, + DatasetExplanationSummaryResponseResult.JSON_PROPERTY_LAST_UPDATED, + DatasetExplanationSummaryResponseResult.JSON_PROPERTY_STATUS, + DatasetExplanationSummaryResponseResult.JSON_PROPERTY_ROW_COUNT, + DatasetExplanationSummaryResponseResult.JSON_PROPERTY_MIN_ROWS_REQUIRED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetExplanationSummaryResponseResult { + public static final String JSON_PROPERTY_RESPONSE = "response"; + @javax.annotation.Nonnull + private Map response = new HashMap<>(); + + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; + @javax.annotation.Nullable + private OffsetDateTime lastUpdated; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_ROW_COUNT = "row_count"; + @javax.annotation.Nonnull + private Integer rowCount; + + public static final String JSON_PROPERTY_MIN_ROWS_REQUIRED = "min_rows_required"; + @javax.annotation.Nonnull + private Integer minRowsRequired; + + public DatasetExplanationSummaryResponseResult() { + } + + public DatasetExplanationSummaryResponseResult response(@javax.annotation.Nonnull Map response) { + this.response = response; + return this; + } + + public DatasetExplanationSummaryResponseResult putResponseItem(String key, Object responseItem) { + if (this.response == null) { + this.response = new HashMap<>(); + } + this.response.put(key, responseItem); + return this; + } + + /** + * Get response + * @return response + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getResponse() { + return response; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setResponse(@javax.annotation.Nonnull Map response) { + this.response = response; + } + + + public DatasetExplanationSummaryResponseResult lastUpdated(@javax.annotation.Nullable OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get lastUpdated + * @return lastUpdated + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastUpdated() { + return lastUpdated; + } + + + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastUpdated(@javax.annotation.Nullable OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + } + + + public DatasetExplanationSummaryResponseResult status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public DatasetExplanationSummaryResponseResult rowCount(@javax.annotation.Nonnull Integer rowCount) { + this.rowCount = rowCount; + return this; + } + + /** + * Get rowCount + * @return rowCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowCount() { + return rowCount; + } + + + @JsonProperty(JSON_PROPERTY_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowCount(@javax.annotation.Nonnull Integer rowCount) { + this.rowCount = rowCount; + } + + + public DatasetExplanationSummaryResponseResult minRowsRequired(@javax.annotation.Nonnull Integer minRowsRequired) { + this.minRowsRequired = minRowsRequired; + return this; + } + + /** + * Get minRowsRequired + * @return minRowsRequired + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MIN_ROWS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getMinRowsRequired() { + return minRowsRequired; + } + + + @JsonProperty(JSON_PROPERTY_MIN_ROWS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMinRowsRequired(@javax.annotation.Nonnull Integer minRowsRequired) { + this.minRowsRequired = minRowsRequired; + } + + + /** + * Return true if this DatasetExplanationSummaryResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetExplanationSummaryResponseResult datasetExplanationSummaryResponseResult = (DatasetExplanationSummaryResponseResult) o; + return Objects.equals(this.response, datasetExplanationSummaryResponseResult.response) && + Objects.equals(this.lastUpdated, datasetExplanationSummaryResponseResult.lastUpdated) && + Objects.equals(this.status, datasetExplanationSummaryResponseResult.status) && + Objects.equals(this.rowCount, datasetExplanationSummaryResponseResult.rowCount) && + Objects.equals(this.minRowsRequired, datasetExplanationSummaryResponseResult.minRowsRequired); + } + + @Override + public int hashCode() { + return Objects.hash(response, lastUpdated, status, rowCount, minRowsRequired); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetExplanationSummaryResponseResult {\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" rowCount: ").append(toIndentedString(rowCount)).append("\n"); + sb.append(" minRowsRequired: ").append(toIndentedString(minRowsRequired)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `response` to the URL query string + if (getResponse() != null) { + for (String _key : getResponse().keySet()) { + joiner.add(String.format("%sresponse%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResponse().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResponse().get(_key))))); + } + } + + // add `last_updated` to the URL query string + if (getLastUpdated() != null) { + joiner.add(String.format("%slast_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastUpdated())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `row_count` to the URL query string + if (getRowCount() != null) { + joiner.add(String.format("%srow_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowCount())))); + } + + // add `min_rows_required` to the URL query string + if (getMinRowsRequired() != null) { + joiner.add(String.format("%smin_rows_required%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMinRowsRequired())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetJsonSchemaResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetJsonSchemaResponse.java new file mode 100644 index 0000000..40cdc6d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetJsonSchemaResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.JsonColumnSchemaEntry; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetJsonSchemaResponse + */ +@JsonPropertyOrder({ + DatasetJsonSchemaResponse.JSON_PROPERTY_STATUS, + DatasetJsonSchemaResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetJsonSchemaResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map result = new HashMap<>(); + + public DatasetJsonSchemaResponse() { + } + + public DatasetJsonSchemaResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetJsonSchemaResponse result(@javax.annotation.Nonnull Map result) { + this.result = result; + return this; + } + + public DatasetJsonSchemaResponse putResultItem(String key, JsonColumnSchemaEntry resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map result) { + this.result = result; + } + + + /** + * Return true if this DatasetJsonSchemaResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetJsonSchemaResponse datasetJsonSchemaResponse = (DatasetJsonSchemaResponse) o; + return Objects.equals(this.status, datasetJsonSchemaResponse.status) && + Objects.equals(this.result, datasetJsonSchemaResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetJsonSchemaResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + if (getResult().get(_key) != null) { + joiner.add(getResult().get(_key).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListItem.java new file mode 100644 index 0000000..3644b98 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListItem.java @@ -0,0 +1,404 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetListItem + */ +@JsonPropertyOrder({ + DatasetListItem.JSON_PROPERTY_ID, + DatasetListItem.JSON_PROPERTY_NAME, + DatasetListItem.JSON_PROPERTY_NUMBER_OF_DATAPOINTS, + DatasetListItem.JSON_PROPERTY_NUMBER_OF_EXPERIMENTS, + DatasetListItem.JSON_PROPERTY_NUMBER_OF_OPTIMISATIONS, + DatasetListItem.JSON_PROPERTY_DERIVED_DATASETS, + DatasetListItem.JSON_PROPERTY_CREATED_AT, + DatasetListItem.JSON_PROPERTY_DATASET_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetListItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_NUMBER_OF_DATAPOINTS = "number_of_datapoints"; + @javax.annotation.Nonnull + private Integer numberOfDatapoints; + + public static final String JSON_PROPERTY_NUMBER_OF_EXPERIMENTS = "number_of_experiments"; + @javax.annotation.Nonnull + private Integer numberOfExperiments; + + public static final String JSON_PROPERTY_NUMBER_OF_OPTIMISATIONS = "number_of_optimisations"; + @javax.annotation.Nonnull + private Integer numberOfOptimisations; + + public static final String JSON_PROPERTY_DERIVED_DATASETS = "derived_datasets"; + @javax.annotation.Nonnull + private Integer derivedDatasets; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nonnull + private String createdAt; + + public static final String JSON_PROPERTY_DATASET_TYPE = "dataset_type"; + @javax.annotation.Nonnull + private String datasetType; + + public DatasetListItem() { + } + + public DatasetListItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public DatasetListItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public DatasetListItem numberOfDatapoints(@javax.annotation.Nonnull Integer numberOfDatapoints) { + this.numberOfDatapoints = numberOfDatapoints; + return this; + } + + /** + * Get numberOfDatapoints + * @return numberOfDatapoints + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUMBER_OF_DATAPOINTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumberOfDatapoints() { + return numberOfDatapoints; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_DATAPOINTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberOfDatapoints(@javax.annotation.Nonnull Integer numberOfDatapoints) { + this.numberOfDatapoints = numberOfDatapoints; + } + + + public DatasetListItem numberOfExperiments(@javax.annotation.Nonnull Integer numberOfExperiments) { + this.numberOfExperiments = numberOfExperiments; + return this; + } + + /** + * Get numberOfExperiments + * @return numberOfExperiments + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EXPERIMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumberOfExperiments() { + return numberOfExperiments; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_EXPERIMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberOfExperiments(@javax.annotation.Nonnull Integer numberOfExperiments) { + this.numberOfExperiments = numberOfExperiments; + } + + + public DatasetListItem numberOfOptimisations(@javax.annotation.Nonnull Integer numberOfOptimisations) { + this.numberOfOptimisations = numberOfOptimisations; + return this; + } + + /** + * Get numberOfOptimisations + * @return numberOfOptimisations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUMBER_OF_OPTIMISATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumberOfOptimisations() { + return numberOfOptimisations; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_OPTIMISATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumberOfOptimisations(@javax.annotation.Nonnull Integer numberOfOptimisations) { + this.numberOfOptimisations = numberOfOptimisations; + } + + + public DatasetListItem derivedDatasets(@javax.annotation.Nonnull Integer derivedDatasets) { + this.derivedDatasets = derivedDatasets; + return this; + } + + /** + * Get derivedDatasets + * @return derivedDatasets + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DERIVED_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDerivedDatasets() { + return derivedDatasets; + } + + + @JsonProperty(JSON_PROPERTY_DERIVED_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDerivedDatasets(@javax.annotation.Nonnull Integer derivedDatasets) { + this.derivedDatasets = derivedDatasets; + } + + + public DatasetListItem createdAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + } + + + public DatasetListItem datasetType(@javax.annotation.Nonnull String datasetType) { + this.datasetType = datasetType; + return this; + } + + /** + * Get datasetType + * @return datasetType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetType() { + return datasetType; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetType(@javax.annotation.Nonnull String datasetType) { + this.datasetType = datasetType; + } + + + /** + * Return true if this DatasetListItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetListItem datasetListItem = (DatasetListItem) o; + return Objects.equals(this.id, datasetListItem.id) && + Objects.equals(this.name, datasetListItem.name) && + Objects.equals(this.numberOfDatapoints, datasetListItem.numberOfDatapoints) && + Objects.equals(this.numberOfExperiments, datasetListItem.numberOfExperiments) && + Objects.equals(this.numberOfOptimisations, datasetListItem.numberOfOptimisations) && + Objects.equals(this.derivedDatasets, datasetListItem.derivedDatasets) && + Objects.equals(this.createdAt, datasetListItem.createdAt) && + Objects.equals(this.datasetType, datasetListItem.datasetType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, numberOfDatapoints, numberOfExperiments, numberOfOptimisations, derivedDatasets, createdAt, datasetType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetListItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" numberOfDatapoints: ").append(toIndentedString(numberOfDatapoints)).append("\n"); + sb.append(" numberOfExperiments: ").append(toIndentedString(numberOfExperiments)).append("\n"); + sb.append(" numberOfOptimisations: ").append(toIndentedString(numberOfOptimisations)).append("\n"); + sb.append(" derivedDatasets: ").append(toIndentedString(derivedDatasets)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" datasetType: ").append(toIndentedString(datasetType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `number_of_datapoints` to the URL query string + if (getNumberOfDatapoints() != null) { + joiner.add(String.format("%snumber_of_datapoints%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumberOfDatapoints())))); + } + + // add `number_of_experiments` to the URL query string + if (getNumberOfExperiments() != null) { + joiner.add(String.format("%snumber_of_experiments%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumberOfExperiments())))); + } + + // add `number_of_optimisations` to the URL query string + if (getNumberOfOptimisations() != null) { + joiner.add(String.format("%snumber_of_optimisations%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumberOfOptimisations())))); + } + + // add `derived_datasets` to the URL query string + if (getDerivedDatasets() != null) { + joiner.add(String.format("%sderived_datasets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDerivedDatasets())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `dataset_type` to the URL query string + if (getDatasetType() != null) { + joiner.add(String.format("%sdataset_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResponse.java new file mode 100644 index 0000000..7ccc6c3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetListResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetListResponse + */ +@JsonPropertyOrder({ + DatasetListResponse.JSON_PROPERTY_STATUS, + DatasetListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetListResult result; + + public DatasetListResponse() { + } + + public DatasetListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetListResponse result(@javax.annotation.Nonnull DatasetListResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetListResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetListResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetListResponse datasetListResponse = (DatasetListResponse) o; + return Objects.equals(this.status, datasetListResponse.status) && + Objects.equals(this.result, datasetListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResult.java new file mode 100644 index 0000000..926c0a3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetListResult.java @@ -0,0 +1,239 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetListItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetListResult + */ +@JsonPropertyOrder({ + DatasetListResult.JSON_PROPERTY_DATASETS, + DatasetListResult.JSON_PROPERTY_TOTAL_PAGES, + DatasetListResult.JSON_PROPERTY_TOTAL_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetListResult { + public static final String JSON_PROPERTY_DATASETS = "datasets"; + @javax.annotation.Nonnull + private List datasets = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nonnull + private Integer totalPages; + + public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; + @javax.annotation.Nonnull + private Integer totalCount; + + public DatasetListResult() { + } + + public DatasetListResult datasets(@javax.annotation.Nonnull List datasets) { + this.datasets = datasets; + return this; + } + + public DatasetListResult addDatasetsItem(DatasetListItem datasetsItem) { + if (this.datasets == null) { + this.datasets = new ArrayList<>(); + } + this.datasets.add(datasetsItem); + return this; + } + + /** + * Get datasets + * @return datasets + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasets() { + return datasets; + } + + + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasets(@javax.annotation.Nonnull List datasets) { + this.datasets = datasets; + } + + + public DatasetListResult totalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + } + + + public DatasetListResult totalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * @return totalCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalCount() { + return totalCount; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + } + + + /** + * Return true if this DatasetListResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetListResult datasetListResult = (DatasetListResult) o; + return Objects.equals(this.datasets, datasetListResult.datasets) && + Objects.equals(this.totalPages, datasetListResult.totalPages) && + Objects.equals(this.totalCount, datasetListResult.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(datasets, totalPages, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetListResult {\n"); + sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `datasets` to the URL query string + if (getDatasets() != null) { + for (int i = 0; i < getDatasets().size(); i++) { + if (getDatasets().get(i) != null) { + joiner.add(getDatasets().get(i).toUrlQueryString(String.format("%sdatasets%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `total_count` to the URL query string + if (getTotalCount() != null) { + joiner.add(String.format("%stotal_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetMultipleStaticColumnsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetMultipleStaticColumnsRequest.java new file mode 100644 index 0000000..c8e71d0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetMultipleStaticColumnsRequest.java @@ -0,0 +1,166 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetMultipleStaticColumnsRequest + */ +@JsonPropertyOrder({ + DatasetMultipleStaticColumnsRequest.JSON_PROPERTY_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetMultipleStaticColumnsRequest { + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List> columns = new ArrayList<>(); + + public DatasetMultipleStaticColumnsRequest() { + } + + public DatasetMultipleStaticColumnsRequest columns(@javax.annotation.Nonnull List> columns) { + this.columns = columns; + return this; + } + + public DatasetMultipleStaticColumnsRequest addColumnsItem(Map columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List> columns) { + this.columns = columns; + } + + + /** + * Return true if this DatasetMultipleStaticColumnsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetMultipleStaticColumnsRequest datasetMultipleStaticColumnsRequest = (DatasetMultipleStaticColumnsRequest) o; + return Objects.equals(this.columns, datasetMultipleStaticColumnsRequest.columns); + } + + @Override + public int hashCode() { + return Objects.hash(columns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetMultipleStaticColumnsRequest {\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNameItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNameItem.java new file mode 100644 index 0000000..189795c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNameItem.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetNameItem + */ +@JsonPropertyOrder({ + DatasetNameItem.JSON_PROPERTY_DATASET_ID, + DatasetNameItem.JSON_PROPERTY_NAME, + DatasetNameItem.JSON_PROPERTY_MODEL_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetNameItem { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nullable + private String modelType; + + public DatasetNameItem() { + } + + public DatasetNameItem datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public DatasetNameItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public DatasetNameItem modelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + } + + + /** + * Return true if this DatasetNameItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetNameItem datasetNameItem = (DatasetNameItem) o; + return Objects.equals(this.datasetId, datasetNameItem.datasetId) && + Objects.equals(this.name, datasetNameItem.name) && + Objects.equals(this.modelType, datasetNameItem.modelType); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, name, modelType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetNameItem {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResponse.java new file mode 100644 index 0000000..afc5c90 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetNamesResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetNamesResponse + */ +@JsonPropertyOrder({ + DatasetNamesResponse.JSON_PROPERTY_STATUS, + DatasetNamesResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetNamesResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetNamesResult result; + + public DatasetNamesResponse() { + } + + public DatasetNamesResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetNamesResponse result(@javax.annotation.Nonnull DatasetNamesResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetNamesResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetNamesResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetNamesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetNamesResponse datasetNamesResponse = (DatasetNamesResponse) o; + return Objects.equals(this.status, datasetNamesResponse.status) && + Objects.equals(this.result, datasetNamesResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetNamesResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResult.java new file mode 100644 index 0000000..ad83c59 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetNamesResult.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetNameItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetNamesResult + */ +@JsonPropertyOrder({ + DatasetNamesResult.JSON_PROPERTY_DATASETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetNamesResult { + public static final String JSON_PROPERTY_DATASETS = "datasets"; + @javax.annotation.Nonnull + private List datasets = new ArrayList<>(); + + public DatasetNamesResult() { + } + + public DatasetNamesResult datasets(@javax.annotation.Nonnull List datasets) { + this.datasets = datasets; + return this; + } + + public DatasetNamesResult addDatasetsItem(DatasetNameItem datasetsItem) { + if (this.datasets == null) { + this.datasets = new ArrayList<>(); + } + this.datasets.add(datasetsItem); + return this; + } + + /** + * Get datasets + * @return datasets + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasets() { + return datasets; + } + + + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasets(@javax.annotation.Nonnull List datasets) { + this.datasets = datasets; + } + + + /** + * Return true if this DatasetNamesResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetNamesResult datasetNamesResult = (DatasetNamesResult) o; + return Objects.equals(this.datasets, datasetNamesResult.datasets); + } + + @Override + public int hashCode() { + return Objects.hash(datasets); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetNamesResult {\n"); + sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `datasets` to the URL query string + if (getDatasets() != null) { + for (int i = 0; i < getDatasets().size(); i++) { + if (getDatasets().get(i) != null) { + joiner.add(getDatasets().get(i).toUrlQueryString(String.format("%sdatasets%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequest.java new file mode 100644 index 0000000..a49e1a5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequest.java @@ -0,0 +1,254 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInner; +import com.futureagi.sdk.model.DatasetRowDataRequestSortInner; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowDataRequest + */ +@JsonPropertyOrder({ + DatasetRowDataRequest.JSON_PROPERTY_FILTERS, + DatasetRowDataRequest.JSON_PROPERTY_SORT, + DatasetRowDataRequest.JSON_PROPERTY_ROW_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowDataRequest { + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private List filters = new ArrayList<>(); + + public static final String JSON_PROPERTY_SORT = "sort"; + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public static final String JSON_PROPERTY_ROW_ID = "row_id"; + @javax.annotation.Nonnull + private UUID rowId; + + public DatasetRowDataRequest() { + } + + public DatasetRowDataRequest filters(@javax.annotation.Nullable List filters) { + this.filters = filters; + return this; + } + + public DatasetRowDataRequest addFiltersItem(AutomationRuleConditionsFilterInner filtersItem) { + if (this.filters == null) { + this.filters = new ArrayList<>(); + } + this.filters.add(filtersItem); + return this; + } + + /** + * Get filters + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } + + + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilters(@javax.annotation.Nullable List filters) { + this.filters = filters; + } + + + public DatasetRowDataRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public DatasetRowDataRequest addSortItem(DatasetRowDataRequestSortInner sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSort() { + return sort; + } + + + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + + public DatasetRowDataRequest rowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + return this; + } + + /** + * Get rowId + * @return rowId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRowId() { + return rowId; + } + + + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + } + + + /** + * Return true if this DatasetRowDataRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowDataRequest datasetRowDataRequest = (DatasetRowDataRequest) o; + return Objects.equals(this.filters, datasetRowDataRequest.filters) && + Objects.equals(this.sort, datasetRowDataRequest.sort) && + Objects.equals(this.rowId, datasetRowDataRequest.rowId); + } + + @Override + public int hashCode() { + return Objects.hash(filters, sort, rowId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowDataRequest {\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" rowId: ").append(toIndentedString(rowId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `filters` to the URL query string + if (getFilters() != null) { + for (int i = 0; i < getFilters().size(); i++) { + if (getFilters().get(i) != null) { + joiner.add(getFilters().get(i).toUrlQueryString(String.format("%sfilters%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `sort` to the URL query string + if (getSort() != null) { + for (int i = 0; i < getSort().size(); i++) { + if (getSort().get(i) != null) { + joiner.add(getSort().get(i).toUrlQueryString(String.format("%ssort%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `row_id` to the URL query string + if (getRowId() != null) { + joiner.add(String.format("%srow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequestSortInner.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequestSortInner.java new file mode 100644 index 0000000..4c891d5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataRequestSortInner.java @@ -0,0 +1,222 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowDataRequestSortInner + */ +@JsonPropertyOrder({ + DatasetRowDataRequestSortInner.JSON_PROPERTY_COLUMN_ID, + DatasetRowDataRequestSortInner.JSON_PROPERTY_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowDataRequestSortInner { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private String columnId; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + ASCENDING(String.valueOf("ascending")), + + DESCENDING(String.valueOf("descending")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nullable + private TypeEnum type; + + public DatasetRowDataRequestSortInner() { + } + + public DatasetRowDataRequestSortInner columnId(@javax.annotation.Nonnull String columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull String columnId) { + this.columnId = columnId; + } + + + public DatasetRowDataRequestSortInner type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this DatasetRowDataRequest_sort_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowDataRequestSortInner datasetRowDataRequestSortInner = (DatasetRowDataRequestSortInner) o; + return Objects.equals(this.columnId, datasetRowDataRequestSortInner.columnId) && + Objects.equals(this.type, datasetRowDataRequestSortInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowDataRequestSortInner {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResponse.java new file mode 100644 index 0000000..b2f3cf0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetRowDataResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowDataResponse + */ +@JsonPropertyOrder({ + DatasetRowDataResponse.JSON_PROPERTY_STATUS, + DatasetRowDataResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowDataResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetRowDataResult result; + + public DatasetRowDataResponse() { + } + + public DatasetRowDataResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetRowDataResponse result(@javax.annotation.Nonnull DatasetRowDataResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetRowDataResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetRowDataResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetRowDataResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowDataResponse datasetRowDataResponse = (DatasetRowDataResponse) o; + return Objects.equals(this.status, datasetRowDataResponse.status) && + Objects.equals(this.result, datasetRowDataResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowDataResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResult.java new file mode 100644 index 0000000..7202fb8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDataResult.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetRowNavigation; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowDataResult + */ +@JsonPropertyOrder({ + DatasetRowDataResult.JSON_PROPERTY_NEXT, + DatasetRowDataResult.JSON_PROPERTY_CURRENT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowDataResult { + public static final String JSON_PROPERTY_NEXT = "next"; + @javax.annotation.Nonnull + private DatasetRowNavigation next; + + public static final String JSON_PROPERTY_CURRENT = "current"; + @javax.annotation.Nonnull + private Map current = new HashMap<>(); + + public DatasetRowDataResult() { + } + + public DatasetRowDataResult next(@javax.annotation.Nonnull DatasetRowNavigation next) { + this.next = next; + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetRowNavigation getNext() { + return next; + } + + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNext(@javax.annotation.Nonnull DatasetRowNavigation next) { + this.next = next; + } + + + public DatasetRowDataResult current(@javax.annotation.Nonnull Map current) { + this.current = current; + return this; + } + + public DatasetRowDataResult putCurrentItem(String key, Object currentItem) { + if (this.current == null) { + this.current = new HashMap<>(); + } + this.current.put(key, currentItem); + return this; + } + + /** + * Get current + * @return current + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getCurrent() { + return current; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setCurrent(@javax.annotation.Nonnull Map current) { + this.current = current; + } + + + /** + * Return true if this DatasetRowDataResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowDataResult datasetRowDataResult = (DatasetRowDataResult) o; + return Objects.equals(this.next, datasetRowDataResult.next) && + Objects.equals(this.current, datasetRowDataResult.current); + } + + @Override + public int hashCode() { + return Objects.hash(next, current); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowDataResult {\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" current: ").append(toIndentedString(current)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(getNext().toUrlQueryString(prefix + "next" + suffix)); + } + + // add `current` to the URL query string + if (getCurrent() != null) { + for (String _key : getCurrent().keySet()) { + joiner.add(String.format("%scurrent%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCurrent().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCurrent().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDiffRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDiffRequest.java new file mode 100644 index 0000000..e36ea35 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowDiffRequest.java @@ -0,0 +1,304 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowDiffRequest + */ +@JsonPropertyOrder({ + DatasetRowDiffRequest.JSON_PROPERTY_EXPERIMENT_ID, + DatasetRowDiffRequest.JSON_PROPERTY_COLUMN_IDS, + DatasetRowDiffRequest.JSON_PROPERTY_ROW_IDS, + DatasetRowDiffRequest.JSON_PROPERTY_COMPARE_COLUMN_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowDiffRequest { + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nonnull + private UUID experimentId; + + public static final String JSON_PROPERTY_COLUMN_IDS = "column_ids"; + @javax.annotation.Nonnull + private List columnIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_ROW_IDS = "row_ids"; + @javax.annotation.Nonnull + private List rowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_COMPARE_COLUMN_IDS = "compare_column_ids"; + @javax.annotation.Nonnull + private List compareColumnIds = new ArrayList<>(); + + public DatasetRowDiffRequest() { + } + + public DatasetRowDiffRequest experimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + } + + + public DatasetRowDiffRequest columnIds(@javax.annotation.Nonnull List columnIds) { + this.columnIds = columnIds; + return this; + } + + public DatasetRowDiffRequest addColumnIdsItem(UUID columnIdsItem) { + if (this.columnIds == null) { + this.columnIds = new ArrayList<>(); + } + this.columnIds.add(columnIdsItem); + return this; + } + + /** + * Get columnIds + * @return columnIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumnIds() { + return columnIds; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnIds(@javax.annotation.Nonnull List columnIds) { + this.columnIds = columnIds; + } + + + public DatasetRowDiffRequest rowIds(@javax.annotation.Nonnull List rowIds) { + this.rowIds = rowIds; + return this; + } + + public DatasetRowDiffRequest addRowIdsItem(UUID rowIdsItem) { + if (this.rowIds == null) { + this.rowIds = new ArrayList<>(); + } + this.rowIds.add(rowIdsItem); + return this; + } + + /** + * Get rowIds + * @return rowIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRowIds() { + return rowIds; + } + + + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowIds(@javax.annotation.Nonnull List rowIds) { + this.rowIds = rowIds; + } + + + public DatasetRowDiffRequest compareColumnIds(@javax.annotation.Nonnull List compareColumnIds) { + this.compareColumnIds = compareColumnIds; + return this; + } + + public DatasetRowDiffRequest addCompareColumnIdsItem(UUID compareColumnIdsItem) { + if (this.compareColumnIds == null) { + this.compareColumnIds = new ArrayList<>(); + } + this.compareColumnIds.add(compareColumnIdsItem); + return this; + } + + /** + * Get compareColumnIds + * @return compareColumnIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPARE_COLUMN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCompareColumnIds() { + return compareColumnIds; + } + + + @JsonProperty(JSON_PROPERTY_COMPARE_COLUMN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompareColumnIds(@javax.annotation.Nonnull List compareColumnIds) { + this.compareColumnIds = compareColumnIds; + } + + + /** + * Return true if this DatasetRowDiffRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowDiffRequest datasetRowDiffRequest = (DatasetRowDiffRequest) o; + return Objects.equals(this.experimentId, datasetRowDiffRequest.experimentId) && + Objects.equals(this.columnIds, datasetRowDiffRequest.columnIds) && + Objects.equals(this.rowIds, datasetRowDiffRequest.rowIds) && + Objects.equals(this.compareColumnIds, datasetRowDiffRequest.compareColumnIds); + } + + @Override + public int hashCode() { + return Objects.hash(experimentId, columnIds, rowIds, compareColumnIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowDiffRequest {\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" columnIds: ").append(toIndentedString(columnIds)).append("\n"); + sb.append(" rowIds: ").append(toIndentedString(rowIds)).append("\n"); + sb.append(" compareColumnIds: ").append(toIndentedString(compareColumnIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `column_ids` to the URL query string + if (getColumnIds() != null) { + for (int i = 0; i < getColumnIds().size(); i++) { + if (getColumnIds().get(i) != null) { + joiner.add(String.format("%scolumn_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumnIds().get(i))))); + } + } + } + + // add `row_ids` to the URL query string + if (getRowIds() != null) { + for (int i = 0; i < getRowIds().size(); i++) { + if (getRowIds().get(i) != null) { + joiner.add(String.format("%srow_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRowIds().get(i))))); + } + } + } + + // add `compare_column_ids` to the URL query string + if (getCompareColumnIds() != null) { + for (int i = 0; i < getCompareColumnIds().size(); i++) { + if (getCompareColumnIds().get(i) != null) { + joiner.add(String.format("%scompare_column_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getCompareColumnIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowNavigation.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowNavigation.java new file mode 100644 index 0000000..4a29244 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowNavigation.java @@ -0,0 +1,168 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowNavigation + */ +@JsonPropertyOrder({ + DatasetRowNavigation.JSON_PROPERTY_ROW_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowNavigation { + public static final String JSON_PROPERTY_ROW_ID = "row_id"; + @javax.annotation.Nullable + private List rowId = new ArrayList<>(); + + public DatasetRowNavigation() { + } + + public DatasetRowNavigation rowId(@javax.annotation.Nullable List rowId) { + this.rowId = rowId; + return this; + } + + public DatasetRowNavigation addRowIdItem(UUID rowIdItem) { + if (this.rowId == null) { + this.rowId = new ArrayList<>(); + } + this.rowId.add(rowIdItem); + return this; + } + + /** + * Get rowId + * @return rowId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRowId() { + return rowId; + } + + + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRowId(@javax.annotation.Nullable List rowId) { + this.rowId = rowId; + } + + + /** + * Return true if this DatasetRowNavigation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowNavigation datasetRowNavigation = (DatasetRowNavigation) o; + return Objects.equals(this.rowId, datasetRowNavigation.rowId); + } + + @Override + public int hashCode() { + return Objects.hash(rowId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowNavigation {\n"); + sb.append(" rowId: ").append(toIndentedString(rowId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row_id` to the URL query string + if (getRowId() != null) { + for (int i = 0; i < getRowId().size(); i++) { + if (getRowId().get(i) != null) { + joiner.add(String.format("%srow_id%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRowId().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResponse.java new file mode 100644 index 0000000..e5a2b01 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetRowsImportMessageResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowsImportMessageResponse + */ +@JsonPropertyOrder({ + DatasetRowsImportMessageResponse.JSON_PROPERTY_STATUS, + DatasetRowsImportMessageResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowsImportMessageResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetRowsImportMessageResult result; + + public DatasetRowsImportMessageResponse() { + } + + public DatasetRowsImportMessageResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetRowsImportMessageResponse result(@javax.annotation.Nonnull DatasetRowsImportMessageResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetRowsImportMessageResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetRowsImportMessageResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetRowsImportMessageResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowsImportMessageResponse datasetRowsImportMessageResponse = (DatasetRowsImportMessageResponse) o; + return Objects.equals(this.status, datasetRowsImportMessageResponse.status) && + Objects.equals(this.result, datasetRowsImportMessageResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowsImportMessageResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResult.java new file mode 100644 index 0000000..416dd53 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportMessageResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowsImportMessageResult + */ +@JsonPropertyOrder({ + DatasetRowsImportMessageResult.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowsImportMessageResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public DatasetRowsImportMessageResult() { + } + + public DatasetRowsImportMessageResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this DatasetRowsImportMessageResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowsImportMessageResult datasetRowsImportMessageResult = (DatasetRowsImportMessageResult) o; + return Objects.equals(this.message, datasetRowsImportMessageResult.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowsImportMessageResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResponse.java new file mode 100644 index 0000000..f604599 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetRowsImportedResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowsImportedResponse + */ +@JsonPropertyOrder({ + DatasetRowsImportedResponse.JSON_PROPERTY_STATUS, + DatasetRowsImportedResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowsImportedResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetRowsImportedResult result; + + public DatasetRowsImportedResponse() { + } + + public DatasetRowsImportedResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetRowsImportedResponse result(@javax.annotation.Nonnull DatasetRowsImportedResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetRowsImportedResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetRowsImportedResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetRowsImportedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowsImportedResponse datasetRowsImportedResponse = (DatasetRowsImportedResponse) o; + return Objects.equals(this.status, datasetRowsImportedResponse.status) && + Objects.equals(this.result, datasetRowsImportedResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowsImportedResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResult.java new file mode 100644 index 0000000..5132550 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRowsImportedResult.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRowsImportedResult + */ +@JsonPropertyOrder({ + DatasetRowsImportedResult.JSON_PROPERTY_MESSAGE, + DatasetRowsImportedResult.JSON_PROPERTY_ROWS_ADDED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRowsImportedResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_ROWS_ADDED = "rows_added"; + @javax.annotation.Nonnull + private Integer rowsAdded; + + public DatasetRowsImportedResult() { + } + + public DatasetRowsImportedResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public DatasetRowsImportedResult rowsAdded(@javax.annotation.Nonnull Integer rowsAdded) { + this.rowsAdded = rowsAdded; + return this; + } + + /** + * Get rowsAdded + * @return rowsAdded + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROWS_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowsAdded() { + return rowsAdded; + } + + + @JsonProperty(JSON_PROPERTY_ROWS_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowsAdded(@javax.annotation.Nonnull Integer rowsAdded) { + this.rowsAdded = rowsAdded; + } + + + /** + * Return true if this DatasetRowsImportedResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRowsImportedResult datasetRowsImportedResult = (DatasetRowsImportedResult) o; + return Objects.equals(this.message, datasetRowsImportedResult.message) && + Objects.equals(this.rowsAdded, datasetRowsImportedResult.rowsAdded); + } + + @Override + public int hashCode() { + return Objects.hash(message, rowsAdded); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRowsImportedResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" rowsAdded: ").append(toIndentedString(rowsAdded)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `rows_added` to the URL query string + if (getRowsAdded() != null) { + joiner.add(String.format("%srows_added%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowsAdded())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsPrompt.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsPrompt.java new file mode 100644 index 0000000..7c422a5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsPrompt.java @@ -0,0 +1,297 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRunPromptStatsPrompt + */ +@JsonPropertyOrder({ + DatasetRunPromptStatsPrompt.JSON_PROPERTY_ID, + DatasetRunPromptStatsPrompt.JSON_PROPERTY_NAME, + DatasetRunPromptStatsPrompt.JSON_PROPERTY_INPUT_TOKEN, + DatasetRunPromptStatsPrompt.JSON_PROPERTY_OUTPUT_TOKEN, + DatasetRunPromptStatsPrompt.JSON_PROPERTY_TOTAL_TOKEN +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRunPromptStatsPrompt { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_INPUT_TOKEN = "input_token"; + @javax.annotation.Nonnull + private BigDecimal inputToken; + + public static final String JSON_PROPERTY_OUTPUT_TOKEN = "output_token"; + @javax.annotation.Nonnull + private BigDecimal outputToken; + + public static final String JSON_PROPERTY_TOTAL_TOKEN = "total_token"; + @javax.annotation.Nonnull + private BigDecimal totalToken; + + public DatasetRunPromptStatsPrompt() { + } + + public DatasetRunPromptStatsPrompt id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public DatasetRunPromptStatsPrompt name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public DatasetRunPromptStatsPrompt inputToken(@javax.annotation.Nonnull BigDecimal inputToken) { + this.inputToken = inputToken; + return this; + } + + /** + * Get inputToken + * @return inputToken + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getInputToken() { + return inputToken; + } + + + @JsonProperty(JSON_PROPERTY_INPUT_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputToken(@javax.annotation.Nonnull BigDecimal inputToken) { + this.inputToken = inputToken; + } + + + public DatasetRunPromptStatsPrompt outputToken(@javax.annotation.Nonnull BigDecimal outputToken) { + this.outputToken = outputToken; + return this; + } + + /** + * Get outputToken + * @return outputToken + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getOutputToken() { + return outputToken; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutputToken(@javax.annotation.Nonnull BigDecimal outputToken) { + this.outputToken = outputToken; + } + + + public DatasetRunPromptStatsPrompt totalToken(@javax.annotation.Nonnull BigDecimal totalToken) { + this.totalToken = totalToken; + return this; + } + + /** + * Get totalToken + * @return totalToken + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getTotalToken() { + return totalToken; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalToken(@javax.annotation.Nonnull BigDecimal totalToken) { + this.totalToken = totalToken; + } + + + /** + * Return true if this DatasetRunPromptStatsPrompt object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRunPromptStatsPrompt datasetRunPromptStatsPrompt = (DatasetRunPromptStatsPrompt) o; + return Objects.equals(this.id, datasetRunPromptStatsPrompt.id) && + Objects.equals(this.name, datasetRunPromptStatsPrompt.name) && + Objects.equals(this.inputToken, datasetRunPromptStatsPrompt.inputToken) && + Objects.equals(this.outputToken, datasetRunPromptStatsPrompt.outputToken) && + Objects.equals(this.totalToken, datasetRunPromptStatsPrompt.totalToken); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, inputToken, outputToken, totalToken); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRunPromptStatsPrompt {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" inputToken: ").append(toIndentedString(inputToken)).append("\n"); + sb.append(" outputToken: ").append(toIndentedString(outputToken)).append("\n"); + sb.append(" totalToken: ").append(toIndentedString(totalToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `input_token` to the URL query string + if (getInputToken() != null) { + joiner.add(String.format("%sinput_token%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInputToken())))); + } + + // add `output_token` to the URL query string + if (getOutputToken() != null) { + joiner.add(String.format("%soutput_token%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputToken())))); + } + + // add `total_token` to the URL query string + if (getTotalToken() != null) { + joiner.add(String.format("%stotal_token%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalToken())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResponse.java new file mode 100644 index 0000000..d156235 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetRunPromptStatsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRunPromptStatsResponse + */ +@JsonPropertyOrder({ + DatasetRunPromptStatsResponse.JSON_PROPERTY_STATUS, + DatasetRunPromptStatsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRunPromptStatsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetRunPromptStatsResult result; + + public DatasetRunPromptStatsResponse() { + } + + public DatasetRunPromptStatsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetRunPromptStatsResponse result(@javax.annotation.Nonnull DatasetRunPromptStatsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetRunPromptStatsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetRunPromptStatsResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetRunPromptStatsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRunPromptStatsResponse datasetRunPromptStatsResponse = (DatasetRunPromptStatsResponse) o; + return Objects.equals(this.status, datasetRunPromptStatsResponse.status) && + Objects.equals(this.result, datasetRunPromptStatsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRunPromptStatsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResult.java new file mode 100644 index 0000000..324159a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetRunPromptStatsResult.java @@ -0,0 +1,276 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetRunPromptStatsPrompt; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetRunPromptStatsResult + */ +@JsonPropertyOrder({ + DatasetRunPromptStatsResult.JSON_PROPERTY_AVG_TOKENS, + DatasetRunPromptStatsResult.JSON_PROPERTY_AVG_COST, + DatasetRunPromptStatsResult.JSON_PROPERTY_AVG_TIME, + DatasetRunPromptStatsResult.JSON_PROPERTY_PROMPTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetRunPromptStatsResult { + public static final String JSON_PROPERTY_AVG_TOKENS = "avg_tokens"; + @javax.annotation.Nonnull + private BigDecimal avgTokens; + + public static final String JSON_PROPERTY_AVG_COST = "avg_cost"; + @javax.annotation.Nonnull + private BigDecimal avgCost; + + public static final String JSON_PROPERTY_AVG_TIME = "avg_time"; + @javax.annotation.Nonnull + private BigDecimal avgTime; + + public static final String JSON_PROPERTY_PROMPTS = "prompts"; + @javax.annotation.Nonnull + private List prompts = new ArrayList<>(); + + public DatasetRunPromptStatsResult() { + } + + public DatasetRunPromptStatsResult avgTokens(@javax.annotation.Nonnull BigDecimal avgTokens) { + this.avgTokens = avgTokens; + return this; + } + + /** + * Get avgTokens + * @return avgTokens + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgTokens() { + return avgTokens; + } + + + @JsonProperty(JSON_PROPERTY_AVG_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgTokens(@javax.annotation.Nonnull BigDecimal avgTokens) { + this.avgTokens = avgTokens; + } + + + public DatasetRunPromptStatsResult avgCost(@javax.annotation.Nonnull BigDecimal avgCost) { + this.avgCost = avgCost; + return this; + } + + /** + * Get avgCost + * @return avgCost + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_COST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgCost() { + return avgCost; + } + + + @JsonProperty(JSON_PROPERTY_AVG_COST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgCost(@javax.annotation.Nonnull BigDecimal avgCost) { + this.avgCost = avgCost; + } + + + public DatasetRunPromptStatsResult avgTime(@javax.annotation.Nonnull BigDecimal avgTime) { + this.avgTime = avgTime; + return this; + } + + /** + * Get avgTime + * @return avgTime + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgTime() { + return avgTime; + } + + + @JsonProperty(JSON_PROPERTY_AVG_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgTime(@javax.annotation.Nonnull BigDecimal avgTime) { + this.avgTime = avgTime; + } + + + public DatasetRunPromptStatsResult prompts(@javax.annotation.Nonnull List prompts) { + this.prompts = prompts; + return this; + } + + public DatasetRunPromptStatsResult addPromptsItem(DatasetRunPromptStatsPrompt promptsItem) { + if (this.prompts == null) { + this.prompts = new ArrayList<>(); + } + this.prompts.add(promptsItem); + return this; + } + + /** + * Get prompts + * @return prompts + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROMPTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPrompts() { + return prompts; + } + + + @JsonProperty(JSON_PROPERTY_PROMPTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPrompts(@javax.annotation.Nonnull List prompts) { + this.prompts = prompts; + } + + + /** + * Return true if this DatasetRunPromptStatsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetRunPromptStatsResult datasetRunPromptStatsResult = (DatasetRunPromptStatsResult) o; + return Objects.equals(this.avgTokens, datasetRunPromptStatsResult.avgTokens) && + Objects.equals(this.avgCost, datasetRunPromptStatsResult.avgCost) && + Objects.equals(this.avgTime, datasetRunPromptStatsResult.avgTime) && + Objects.equals(this.prompts, datasetRunPromptStatsResult.prompts); + } + + @Override + public int hashCode() { + return Objects.hash(avgTokens, avgCost, avgTime, prompts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetRunPromptStatsResult {\n"); + sb.append(" avgTokens: ").append(toIndentedString(avgTokens)).append("\n"); + sb.append(" avgCost: ").append(toIndentedString(avgCost)).append("\n"); + sb.append(" avgTime: ").append(toIndentedString(avgTime)).append("\n"); + sb.append(" prompts: ").append(toIndentedString(prompts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `avg_tokens` to the URL query string + if (getAvgTokens() != null) { + joiner.add(String.format("%savg_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTokens())))); + } + + // add `avg_cost` to the URL query string + if (getAvgCost() != null) { + joiner.add(String.format("%savg_cost%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgCost())))); + } + + // add `avg_time` to the URL query string + if (getAvgTime() != null) { + joiner.add(String.format("%savg_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTime())))); + } + + // add `prompts` to the URL query string + if (getPrompts() != null) { + for (int i = 0; i < getPrompts().size(); i++) { + if (getPrompts().get(i) != null) { + joiner.add(getPrompts().get(i).toUrlQueryString(String.format("%sprompts%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsCode.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsCode.java new file mode 100644 index 0000000..0e129a4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsCode.java @@ -0,0 +1,331 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetSdkRowsCode + */ +@JsonPropertyOrder({ + DatasetSdkRowsCode.JSON_PROPERTY_PYTHON_ADD_ROW, + DatasetSdkRowsCode.JSON_PROPERTY_PYTHON_ADD_COL, + DatasetSdkRowsCode.JSON_PROPERTY_TYPESCRIPT_ADD_COL, + DatasetSdkRowsCode.JSON_PROPERTY_TYPESCRIPT_ADD_ROW, + DatasetSdkRowsCode.JSON_PROPERTY_CURL_ADD_COL, + DatasetSdkRowsCode.JSON_PROPERTY_CURL_ADD_ROW +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetSdkRowsCode { + public static final String JSON_PROPERTY_PYTHON_ADD_ROW = "python_add_row"; + @javax.annotation.Nonnull + private String pythonAddRow; + + public static final String JSON_PROPERTY_PYTHON_ADD_COL = "python_add_col"; + @javax.annotation.Nonnull + private String pythonAddCol; + + public static final String JSON_PROPERTY_TYPESCRIPT_ADD_COL = "typescript_add_col"; + @javax.annotation.Nonnull + private String typescriptAddCol; + + public static final String JSON_PROPERTY_TYPESCRIPT_ADD_ROW = "typescript_add_row"; + @javax.annotation.Nonnull + private String typescriptAddRow; + + public static final String JSON_PROPERTY_CURL_ADD_COL = "curl_add_col"; + @javax.annotation.Nonnull + private String curlAddCol; + + public static final String JSON_PROPERTY_CURL_ADD_ROW = "curl_add_row"; + @javax.annotation.Nonnull + private String curlAddRow; + + public DatasetSdkRowsCode() { + } + + public DatasetSdkRowsCode pythonAddRow(@javax.annotation.Nonnull String pythonAddRow) { + this.pythonAddRow = pythonAddRow; + return this; + } + + /** + * Get pythonAddRow + * @return pythonAddRow + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PYTHON_ADD_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPythonAddRow() { + return pythonAddRow; + } + + + @JsonProperty(JSON_PROPERTY_PYTHON_ADD_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPythonAddRow(@javax.annotation.Nonnull String pythonAddRow) { + this.pythonAddRow = pythonAddRow; + } + + + public DatasetSdkRowsCode pythonAddCol(@javax.annotation.Nonnull String pythonAddCol) { + this.pythonAddCol = pythonAddCol; + return this; + } + + /** + * Get pythonAddCol + * @return pythonAddCol + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PYTHON_ADD_COL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPythonAddCol() { + return pythonAddCol; + } + + + @JsonProperty(JSON_PROPERTY_PYTHON_ADD_COL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPythonAddCol(@javax.annotation.Nonnull String pythonAddCol) { + this.pythonAddCol = pythonAddCol; + } + + + public DatasetSdkRowsCode typescriptAddCol(@javax.annotation.Nonnull String typescriptAddCol) { + this.typescriptAddCol = typescriptAddCol; + return this; + } + + /** + * Get typescriptAddCol + * @return typescriptAddCol + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPESCRIPT_ADD_COL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTypescriptAddCol() { + return typescriptAddCol; + } + + + @JsonProperty(JSON_PROPERTY_TYPESCRIPT_ADD_COL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTypescriptAddCol(@javax.annotation.Nonnull String typescriptAddCol) { + this.typescriptAddCol = typescriptAddCol; + } + + + public DatasetSdkRowsCode typescriptAddRow(@javax.annotation.Nonnull String typescriptAddRow) { + this.typescriptAddRow = typescriptAddRow; + return this; + } + + /** + * Get typescriptAddRow + * @return typescriptAddRow + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPESCRIPT_ADD_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTypescriptAddRow() { + return typescriptAddRow; + } + + + @JsonProperty(JSON_PROPERTY_TYPESCRIPT_ADD_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTypescriptAddRow(@javax.annotation.Nonnull String typescriptAddRow) { + this.typescriptAddRow = typescriptAddRow; + } + + + public DatasetSdkRowsCode curlAddCol(@javax.annotation.Nonnull String curlAddCol) { + this.curlAddCol = curlAddCol; + return this; + } + + /** + * Get curlAddCol + * @return curlAddCol + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURL_ADD_COL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCurlAddCol() { + return curlAddCol; + } + + + @JsonProperty(JSON_PROPERTY_CURL_ADD_COL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurlAddCol(@javax.annotation.Nonnull String curlAddCol) { + this.curlAddCol = curlAddCol; + } + + + public DatasetSdkRowsCode curlAddRow(@javax.annotation.Nonnull String curlAddRow) { + this.curlAddRow = curlAddRow; + return this; + } + + /** + * Get curlAddRow + * @return curlAddRow + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURL_ADD_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCurlAddRow() { + return curlAddRow; + } + + + @JsonProperty(JSON_PROPERTY_CURL_ADD_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurlAddRow(@javax.annotation.Nonnull String curlAddRow) { + this.curlAddRow = curlAddRow; + } + + + /** + * Return true if this DatasetSdkRowsCode object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetSdkRowsCode datasetSdkRowsCode = (DatasetSdkRowsCode) o; + return Objects.equals(this.pythonAddRow, datasetSdkRowsCode.pythonAddRow) && + Objects.equals(this.pythonAddCol, datasetSdkRowsCode.pythonAddCol) && + Objects.equals(this.typescriptAddCol, datasetSdkRowsCode.typescriptAddCol) && + Objects.equals(this.typescriptAddRow, datasetSdkRowsCode.typescriptAddRow) && + Objects.equals(this.curlAddCol, datasetSdkRowsCode.curlAddCol) && + Objects.equals(this.curlAddRow, datasetSdkRowsCode.curlAddRow); + } + + @Override + public int hashCode() { + return Objects.hash(pythonAddRow, pythonAddCol, typescriptAddCol, typescriptAddRow, curlAddCol, curlAddRow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetSdkRowsCode {\n"); + sb.append(" pythonAddRow: ").append(toIndentedString(pythonAddRow)).append("\n"); + sb.append(" pythonAddCol: ").append(toIndentedString(pythonAddCol)).append("\n"); + sb.append(" typescriptAddCol: ").append(toIndentedString(typescriptAddCol)).append("\n"); + sb.append(" typescriptAddRow: ").append(toIndentedString(typescriptAddRow)).append("\n"); + sb.append(" curlAddCol: ").append(toIndentedString(curlAddCol)).append("\n"); + sb.append(" curlAddRow: ").append(toIndentedString(curlAddRow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `python_add_row` to the URL query string + if (getPythonAddRow() != null) { + joiner.add(String.format("%spython_add_row%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPythonAddRow())))); + } + + // add `python_add_col` to the URL query string + if (getPythonAddCol() != null) { + joiner.add(String.format("%spython_add_col%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPythonAddCol())))); + } + + // add `typescript_add_col` to the URL query string + if (getTypescriptAddCol() != null) { + joiner.add(String.format("%stypescript_add_col%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTypescriptAddCol())))); + } + + // add `typescript_add_row` to the URL query string + if (getTypescriptAddRow() != null) { + joiner.add(String.format("%stypescript_add_row%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTypescriptAddRow())))); + } + + // add `curl_add_col` to the URL query string + if (getCurlAddCol() != null) { + joiner.add(String.format("%scurl_add_col%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurlAddCol())))); + } + + // add `curl_add_row` to the URL query string + if (getCurlAddRow() != null) { + joiner.add(String.format("%scurl_add_row%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurlAddRow())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsRequest.java new file mode 100644 index 0000000..6c35d2b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsRequest.java @@ -0,0 +1,210 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetSdkRowsRequest + */ +@JsonPropertyOrder({ + DatasetSdkRowsRequest.JSON_PROPERTY_DATASET_NAME, + DatasetSdkRowsRequest.JSON_PROPERTY_DATASET_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetSdkRowsRequest { + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nullable + private String datasetName; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + private JsonNullable datasetId = JsonNullable.undefined(); + + public DatasetSdkRowsRequest() { + } + + public DatasetSdkRowsRequest datasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + } + + + public DatasetSdkRowsRequest datasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = JsonNullable.of(datasetId); + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getDatasetId() { + return datasetId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatasetId_JsonNullable() { + return datasetId; + } + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + public void setDatasetId_JsonNullable(JsonNullable datasetId) { + this.datasetId = datasetId; + } + + public void setDatasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = JsonNullable.of(datasetId); + } + + + /** + * Return true if this DatasetSdkRowsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetSdkRowsRequest datasetSdkRowsRequest = (DatasetSdkRowsRequest) o; + return Objects.equals(this.datasetName, datasetSdkRowsRequest.datasetName) && + equalsNullable(this.datasetId, datasetSdkRowsRequest.datasetId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(datasetName, hashCodeNullable(datasetId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetSdkRowsRequest {\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResponse.java new file mode 100644 index 0000000..dc6579f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetSdkRowsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetSdkRowsResponse + */ +@JsonPropertyOrder({ + DatasetSdkRowsResponse.JSON_PROPERTY_STATUS, + DatasetSdkRowsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetSdkRowsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetSdkRowsResult result; + + public DatasetSdkRowsResponse() { + } + + public DatasetSdkRowsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetSdkRowsResponse result(@javax.annotation.Nonnull DatasetSdkRowsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetSdkRowsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetSdkRowsResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetSdkRowsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetSdkRowsResponse datasetSdkRowsResponse = (DatasetSdkRowsResponse) o; + return Objects.equals(this.status, datasetSdkRowsResponse.status) && + Objects.equals(this.result, datasetSdkRowsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetSdkRowsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResult.java new file mode 100644 index 0000000..b0486b0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetSdkRowsResult.java @@ -0,0 +1,239 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Dataset; +import com.futureagi.sdk.model.DatasetSdkRowsCode; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetSdkRowsResult + */ +@JsonPropertyOrder({ + DatasetSdkRowsResult.JSON_PROPERTY_API_KEYS, + DatasetSdkRowsResult.JSON_PROPERTY_DATASET, + DatasetSdkRowsResult.JSON_PROPERTY_CODE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetSdkRowsResult { + public static final String JSON_PROPERTY_API_KEYS = "api_keys"; + @javax.annotation.Nonnull + private Map apiKeys = new HashMap<>(); + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nonnull + private Dataset dataset; + + public static final String JSON_PROPERTY_CODE = "code"; + @javax.annotation.Nonnull + private DatasetSdkRowsCode code; + + public DatasetSdkRowsResult() { + } + + public DatasetSdkRowsResult apiKeys(@javax.annotation.Nonnull Map apiKeys) { + this.apiKeys = apiKeys; + return this; + } + + public DatasetSdkRowsResult putApiKeysItem(String key, Object apiKeysItem) { + if (this.apiKeys == null) { + this.apiKeys = new HashMap<>(); + } + this.apiKeys.put(key, apiKeysItem); + return this; + } + + /** + * Get apiKeys + * @return apiKeys + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_API_KEYS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getApiKeys() { + return apiKeys; + } + + + @JsonProperty(JSON_PROPERTY_API_KEYS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setApiKeys(@javax.annotation.Nonnull Map apiKeys) { + this.apiKeys = apiKeys; + } + + + public DatasetSdkRowsResult dataset(@javax.annotation.Nonnull Dataset dataset) { + this.dataset = dataset; + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Dataset getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataset(@javax.annotation.Nonnull Dataset dataset) { + this.dataset = dataset; + } + + + public DatasetSdkRowsResult code(@javax.annotation.Nonnull DatasetSdkRowsCode code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetSdkRowsCode getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(@javax.annotation.Nonnull DatasetSdkRowsCode code) { + this.code = code; + } + + + /** + * Return true if this DatasetSdkRowsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetSdkRowsResult datasetSdkRowsResult = (DatasetSdkRowsResult) o; + return Objects.equals(this.apiKeys, datasetSdkRowsResult.apiKeys) && + Objects.equals(this.dataset, datasetSdkRowsResult.dataset) && + Objects.equals(this.code, datasetSdkRowsResult.code); + } + + @Override + public int hashCode() { + return Objects.hash(apiKeys, dataset, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetSdkRowsResult {\n"); + sb.append(" apiKeys: ").append(toIndentedString(apiKeys)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `api_keys` to the URL query string + if (getApiKeys() != null) { + for (String _key : getApiKeys().keySet()) { + joiner.add(String.format("%sapi_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getApiKeys().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getApiKeys().get(_key))))); + } + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(getDataset().toUrlQueryString(prefix + "dataset" + suffix)); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(getCode().toUrlQueryString(prefix + "code" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetStaticColumnRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetStaticColumnRequest.java new file mode 100644 index 0000000..34ca079 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetStaticColumnRequest.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetStaticColumnRequest + */ +@JsonPropertyOrder({ + DatasetStaticColumnRequest.JSON_PROPERTY_NEW_COLUMN_NAME, + DatasetStaticColumnRequest.JSON_PROPERTY_COLUMN_TYPE, + DatasetStaticColumnRequest.JSON_PROPERTY_SOURCE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetStaticColumnRequest { + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nonnull + private String newColumnName; + + public static final String JSON_PROPERTY_COLUMN_TYPE = "column_type"; + @javax.annotation.Nonnull + private String columnType; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source; + + public DatasetStaticColumnRequest() { + } + + public DatasetStaticColumnRequest newColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + } + + + public DatasetStaticColumnRequest columnType(@javax.annotation.Nonnull String columnType) { + this.columnType = columnType; + return this; + } + + /** + * Get columnType + * @return columnType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumnType() { + return columnType; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnType(@javax.annotation.Nonnull String columnType) { + this.columnType = columnType; + } + + + public DatasetStaticColumnRequest source(@javax.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable String source) { + this.source = source; + } + + + /** + * Return true if this DatasetStaticColumnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetStaticColumnRequest datasetStaticColumnRequest = (DatasetStaticColumnRequest) o; + return Objects.equals(this.newColumnName, datasetStaticColumnRequest.newColumnName) && + Objects.equals(this.columnType, datasetStaticColumnRequest.columnType) && + Objects.equals(this.source, datasetStaticColumnRequest.source); + } + + @Override + public int hashCode() { + return Objects.hash(newColumnName, columnType, source); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetStaticColumnRequest {\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append(" columnType: ").append(toIndentedString(columnType)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + // add `column_type` to the URL query string + if (getColumnType() != null) { + joiner.add(String.format("%scolumn_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnType())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableMetadata.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableMetadata.java new file mode 100644 index 0000000..06d5af6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableMetadata.java @@ -0,0 +1,331 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetTableMetadata + */ +@JsonPropertyOrder({ + DatasetTableMetadata.JSON_PROPERTY_DATASET_NAME, + DatasetTableMetadata.JSON_PROPERTY_TOTAL_ROWS, + DatasetTableMetadata.JSON_PROPERTY_TOTAL_PAGES, + DatasetTableMetadata.JSON_PROPERTY_ERROR_MESSAGES, + DatasetTableMetadata.JSON_PROPERTY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetTableMetadata { + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_TOTAL_ROWS = "total_rows"; + @javax.annotation.Nullable + private Integer totalRows; + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; + @javax.annotation.Nullable + private List errorMessages = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private JsonNullable status = JsonNullable.undefined(); + + public DatasetTableMetadata() { + } + + public DatasetTableMetadata datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public DatasetTableMetadata totalRows(@javax.annotation.Nullable Integer totalRows) { + this.totalRows = totalRows; + return this; + } + + /** + * Get totalRows + * @return totalRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalRows() { + return totalRows; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalRows(@javax.annotation.Nullable Integer totalRows) { + this.totalRows = totalRows; + } + + + public DatasetTableMetadata totalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + } + + + public DatasetTableMetadata errorMessages(@javax.annotation.Nullable List errorMessages) { + this.errorMessages = errorMessages; + return this; + } + + public DatasetTableMetadata addErrorMessagesItem(String errorMessagesItem) { + if (this.errorMessages == null) { + this.errorMessages = new ArrayList<>(); + } + this.errorMessages.add(errorMessagesItem); + return this; + } + + /** + * Get errorMessages + * @return errorMessages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getErrorMessages() { + return errorMessages; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorMessages(@javax.annotation.Nullable List errorMessages) { + this.errorMessages = errorMessages; + } + + + public DatasetTableMetadata status(@javax.annotation.Nullable String status) { + this.status = JsonNullable.of(status); + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonIgnore + public String getStatus() { + return status.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatus_JsonNullable() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + public void setStatus_JsonNullable(JsonNullable status) { + this.status = status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = JsonNullable.of(status); + } + + + /** + * Return true if this DatasetTableMetadata object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetTableMetadata datasetTableMetadata = (DatasetTableMetadata) o; + return Objects.equals(this.datasetName, datasetTableMetadata.datasetName) && + Objects.equals(this.totalRows, datasetTableMetadata.totalRows) && + Objects.equals(this.totalPages, datasetTableMetadata.totalPages) && + Objects.equals(this.errorMessages, datasetTableMetadata.errorMessages) && + equalsNullable(this.status, datasetTableMetadata.status); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(datasetName, totalRows, totalPages, errorMessages, hashCodeNullable(status)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetTableMetadata {\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `total_rows` to the URL query string + if (getTotalRows() != null) { + joiner.add(String.format("%stotal_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalRows())))); + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `error_messages` to the URL query string + if (getErrorMessages() != null) { + for (int i = 0; i < getErrorMessages().size(); i++) { + joiner.add(String.format("%serror_messages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getErrorMessages().get(i))))); + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResponse.java new file mode 100644 index 0000000..4924d34 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetTableResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetTableResponse + */ +@JsonPropertyOrder({ + DatasetTableResponse.JSON_PROPERTY_STATUS, + DatasetTableResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetTableResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DatasetTableResult result; + + public DatasetTableResponse() { + } + + public DatasetTableResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DatasetTableResponse result(@javax.annotation.Nonnull DatasetTableResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetTableResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DatasetTableResult result) { + this.result = result; + } + + + /** + * Return true if this DatasetTableResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetTableResponse datasetTableResponse = (DatasetTableResponse) o; + return Objects.equals(this.status, datasetTableResponse.status) && + Objects.equals(this.result, datasetTableResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetTableResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResult.java new file mode 100644 index 0000000..aadcb6b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetTableResult.java @@ -0,0 +1,467 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DatasetTableMetadata; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetTableResult + */ +@JsonPropertyOrder({ + DatasetTableResult.JSON_PROPERTY_METADATA, + DatasetTableResult.JSON_PROPERTY_COLUMN_CONFIG, + DatasetTableResult.JSON_PROPERTY_TABLE, + DatasetTableResult.JSON_PROPERTY_DATASET_CONFIG, + DatasetTableResult.JSON_PROPERTY_SYNTHETIC_DATASET, + DatasetTableResult.JSON_PROPERTY_SYNTHETIC_DATASET_PERCENTAGE, + DatasetTableResult.JSON_PROPERTY_SYNTHETIC_REGENERATE, + DatasetTableResult.JSON_PROPERTY_IS_PROCESSING_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetTableResult { + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private DatasetTableMetadata metadata; + + public static final String JSON_PROPERTY_COLUMN_CONFIG = "column_config"; + @javax.annotation.Nonnull + private List> columnConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE = "table"; + @javax.annotation.Nullable + private List> table = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_CONFIG = "dataset_config"; + @javax.annotation.Nullable + private Map datasetConfig = new HashMap<>(); + + public static final String JSON_PROPERTY_SYNTHETIC_DATASET = "synthetic_dataset"; + @javax.annotation.Nullable + private Boolean syntheticDataset; + + public static final String JSON_PROPERTY_SYNTHETIC_DATASET_PERCENTAGE = "synthetic_dataset_percentage"; + private JsonNullable syntheticDatasetPercentage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SYNTHETIC_REGENERATE = "synthetic_regenerate"; + @javax.annotation.Nullable + private Boolean syntheticRegenerate; + + public static final String JSON_PROPERTY_IS_PROCESSING_DATA = "is_processing_data"; + @javax.annotation.Nullable + private Boolean isProcessingData; + + public DatasetTableResult() { + } + + public DatasetTableResult metadata(@javax.annotation.Nullable DatasetTableMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatasetTableMetadata getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable DatasetTableMetadata metadata) { + this.metadata = metadata; + } + + + public DatasetTableResult columnConfig(@javax.annotation.Nonnull List> columnConfig) { + this.columnConfig = columnConfig; + return this; + } + + public DatasetTableResult addColumnConfigItem(Map columnConfigItem) { + if (this.columnConfig == null) { + this.columnConfig = new ArrayList<>(); + } + this.columnConfig.add(columnConfigItem); + return this; + } + + /** + * Get columnConfig + * @return columnConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getColumnConfig() { + return columnConfig; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnConfig(@javax.annotation.Nonnull List> columnConfig) { + this.columnConfig = columnConfig; + } + + + public DatasetTableResult table(@javax.annotation.Nullable List> table) { + this.table = table; + return this; + } + + public DatasetTableResult addTableItem(Map tableItem) { + if (this.table == null) { + this.table = new ArrayList<>(); + } + this.table.add(tableItem); + return this; + } + + /** + * Get table + * @return table + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getTable() { + return table; + } + + + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTable(@javax.annotation.Nullable List> table) { + this.table = table; + } + + + public DatasetTableResult datasetConfig(@javax.annotation.Nullable Map datasetConfig) { + this.datasetConfig = datasetConfig; + return this; + } + + public DatasetTableResult putDatasetConfigItem(String key, Object datasetConfigItem) { + if (this.datasetConfig == null) { + this.datasetConfig = new HashMap<>(); + } + this.datasetConfig.put(key, datasetConfigItem); + return this; + } + + /** + * Get datasetConfig + * @return datasetConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDatasetConfig() { + return datasetConfig; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetConfig(@javax.annotation.Nullable Map datasetConfig) { + this.datasetConfig = datasetConfig; + } + + + public DatasetTableResult syntheticDataset(@javax.annotation.Nullable Boolean syntheticDataset) { + this.syntheticDataset = syntheticDataset; + return this; + } + + /** + * Get syntheticDataset + * @return syntheticDataset + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETIC_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSyntheticDataset() { + return syntheticDataset; + } + + + @JsonProperty(JSON_PROPERTY_SYNTHETIC_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSyntheticDataset(@javax.annotation.Nullable Boolean syntheticDataset) { + this.syntheticDataset = syntheticDataset; + } + + + public DatasetTableResult syntheticDatasetPercentage(@javax.annotation.Nullable BigDecimal syntheticDatasetPercentage) { + this.syntheticDatasetPercentage = JsonNullable.of(syntheticDatasetPercentage); + return this; + } + + /** + * Get syntheticDatasetPercentage + * @return syntheticDatasetPercentage + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getSyntheticDatasetPercentage() { + return syntheticDatasetPercentage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SYNTHETIC_DATASET_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSyntheticDatasetPercentage_JsonNullable() { + return syntheticDatasetPercentage; + } + + @JsonProperty(JSON_PROPERTY_SYNTHETIC_DATASET_PERCENTAGE) + public void setSyntheticDatasetPercentage_JsonNullable(JsonNullable syntheticDatasetPercentage) { + this.syntheticDatasetPercentage = syntheticDatasetPercentage; + } + + public void setSyntheticDatasetPercentage(@javax.annotation.Nullable BigDecimal syntheticDatasetPercentage) { + this.syntheticDatasetPercentage = JsonNullable.of(syntheticDatasetPercentage); + } + + + public DatasetTableResult syntheticRegenerate(@javax.annotation.Nullable Boolean syntheticRegenerate) { + this.syntheticRegenerate = syntheticRegenerate; + return this; + } + + /** + * Get syntheticRegenerate + * @return syntheticRegenerate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNTHETIC_REGENERATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSyntheticRegenerate() { + return syntheticRegenerate; + } + + + @JsonProperty(JSON_PROPERTY_SYNTHETIC_REGENERATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSyntheticRegenerate(@javax.annotation.Nullable Boolean syntheticRegenerate) { + this.syntheticRegenerate = syntheticRegenerate; + } + + + public DatasetTableResult isProcessingData(@javax.annotation.Nullable Boolean isProcessingData) { + this.isProcessingData = isProcessingData; + return this; + } + + /** + * Get isProcessingData + * @return isProcessingData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_PROCESSING_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsProcessingData() { + return isProcessingData; + } + + + @JsonProperty(JSON_PROPERTY_IS_PROCESSING_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsProcessingData(@javax.annotation.Nullable Boolean isProcessingData) { + this.isProcessingData = isProcessingData; + } + + + /** + * Return true if this DatasetTableResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetTableResult datasetTableResult = (DatasetTableResult) o; + return Objects.equals(this.metadata, datasetTableResult.metadata) && + Objects.equals(this.columnConfig, datasetTableResult.columnConfig) && + Objects.equals(this.table, datasetTableResult.table) && + Objects.equals(this.datasetConfig, datasetTableResult.datasetConfig) && + Objects.equals(this.syntheticDataset, datasetTableResult.syntheticDataset) && + equalsNullable(this.syntheticDatasetPercentage, datasetTableResult.syntheticDatasetPercentage) && + Objects.equals(this.syntheticRegenerate, datasetTableResult.syntheticRegenerate) && + Objects.equals(this.isProcessingData, datasetTableResult.isProcessingData); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, columnConfig, table, datasetConfig, syntheticDataset, hashCodeNullable(syntheticDatasetPercentage), syntheticRegenerate, isProcessingData); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetTableResult {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" columnConfig: ").append(toIndentedString(columnConfig)).append("\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append(" datasetConfig: ").append(toIndentedString(datasetConfig)).append("\n"); + sb.append(" syntheticDataset: ").append(toIndentedString(syntheticDataset)).append("\n"); + sb.append(" syntheticDatasetPercentage: ").append(toIndentedString(syntheticDatasetPercentage)).append("\n"); + sb.append(" syntheticRegenerate: ").append(toIndentedString(syntheticRegenerate)).append("\n"); + sb.append(" isProcessingData: ").append(toIndentedString(isProcessingData)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + // add `column_config` to the URL query string + if (getColumnConfig() != null) { + for (int i = 0; i < getColumnConfig().size(); i++) { + joiner.add(String.format("%scolumn_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumnConfig().get(i))))); + } + } + + // add `table` to the URL query string + if (getTable() != null) { + for (int i = 0; i < getTable().size(); i++) { + joiner.add(String.format("%stable%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTable().get(i))))); + } + } + + // add `dataset_config` to the URL query string + if (getDatasetConfig() != null) { + for (String _key : getDatasetConfig().keySet()) { + joiner.add(String.format("%sdataset_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDatasetConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDatasetConfig().get(_key))))); + } + } + + // add `synthetic_dataset` to the URL query string + if (getSyntheticDataset() != null) { + joiner.add(String.format("%ssynthetic_dataset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSyntheticDataset())))); + } + + // add `synthetic_dataset_percentage` to the URL query string + if (getSyntheticDatasetPercentage() != null) { + joiner.add(String.format("%ssynthetic_dataset_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSyntheticDatasetPercentage())))); + } + + // add `synthetic_regenerate` to the URL query string + if (getSyntheticRegenerate() != null) { + joiner.add(String.format("%ssynthetic_regenerate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSyntheticRegenerate())))); + } + + // add `is_processing_data` to the URL query string + if (getIsProcessingData() != null) { + joiner.add(String.format("%sis_processing_data%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsProcessingData())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateCellValueRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateCellValueRequest.java new file mode 100644 index 0000000..e2544d5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateCellValueRequest.java @@ -0,0 +1,246 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetUpdateCellValueRequest + */ +@JsonPropertyOrder({ + DatasetUpdateCellValueRequest.JSON_PROPERTY_ROW_ID, + DatasetUpdateCellValueRequest.JSON_PROPERTY_COLUMN_ID, + DatasetUpdateCellValueRequest.JSON_PROPERTY_NEW_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetUpdateCellValueRequest { + public static final String JSON_PROPERTY_ROW_ID = "row_id"; + @javax.annotation.Nonnull + private UUID rowId; + + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_NEW_VALUE = "new_value"; + private JsonNullable newValue = JsonNullable.undefined(); + + public DatasetUpdateCellValueRequest() { + } + + public DatasetUpdateCellValueRequest rowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + return this; + } + + /** + * Get rowId + * @return rowId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRowId() { + return rowId; + } + + + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + } + + + public DatasetUpdateCellValueRequest columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public DatasetUpdateCellValueRequest newValue(@javax.annotation.Nullable String newValue) { + this.newValue = JsonNullable.of(newValue); + return this; + } + + /** + * New cell value. Accepts JSON primitives or multipart file uploads. + * @return newValue + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNewValue() { + return newValue.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEW_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNewValue_JsonNullable() { + return newValue; + } + + @JsonProperty(JSON_PROPERTY_NEW_VALUE) + public void setNewValue_JsonNullable(JsonNullable newValue) { + this.newValue = newValue; + } + + public void setNewValue(@javax.annotation.Nullable String newValue) { + this.newValue = JsonNullable.of(newValue); + } + + + /** + * Return true if this DatasetUpdateCellValueRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetUpdateCellValueRequest datasetUpdateCellValueRequest = (DatasetUpdateCellValueRequest) o; + return Objects.equals(this.rowId, datasetUpdateCellValueRequest.rowId) && + Objects.equals(this.columnId, datasetUpdateCellValueRequest.columnId) && + equalsNullable(this.newValue, datasetUpdateCellValueRequest.newValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(rowId, columnId, hashCodeNullable(newValue)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetUpdateCellValueRequest {\n"); + sb.append(" rowId: ").append(toIndentedString(rowId)).append("\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" newValue: ").append(toIndentedString(newValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row_id` to the URL query string + if (getRowId() != null) { + joiner.add(String.format("%srow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowId())))); + } + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `new_value` to the URL query string + if (getNewValue() != null) { + joiner.add(String.format("%snew_value%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewValue())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnNameRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnNameRequest.java new file mode 100644 index 0000000..7341708 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnNameRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetUpdateColumnNameRequest + */ +@JsonPropertyOrder({ + DatasetUpdateColumnNameRequest.JSON_PROPERTY_NEW_COLUMN_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetUpdateColumnNameRequest { + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nonnull + private String newColumnName; + + public DatasetUpdateColumnNameRequest() { + } + + public DatasetUpdateColumnNameRequest newColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + } + + + /** + * Return true if this DatasetUpdateColumnNameRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetUpdateColumnNameRequest datasetUpdateColumnNameRequest = (DatasetUpdateColumnNameRequest) o; + return Objects.equals(this.newColumnName, datasetUpdateColumnNameRequest.newColumnName); + } + + @Override + public int hashCode() { + return Objects.hash(newColumnName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetUpdateColumnNameRequest {\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnTypeRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnTypeRequest.java new file mode 100644 index 0000000..1ba83e1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DatasetUpdateColumnTypeRequest.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DatasetUpdateColumnTypeRequest + */ +@JsonPropertyOrder({ + DatasetUpdateColumnTypeRequest.JSON_PROPERTY_NEW_COLUMN_TYPE, + DatasetUpdateColumnTypeRequest.JSON_PROPERTY_PREVIEW, + DatasetUpdateColumnTypeRequest.JSON_PROPERTY_FORCE_UPDATE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DatasetUpdateColumnTypeRequest { + public static final String JSON_PROPERTY_NEW_COLUMN_TYPE = "new_column_type"; + @javax.annotation.Nonnull + private String newColumnType; + + public static final String JSON_PROPERTY_PREVIEW = "preview"; + @javax.annotation.Nullable + private Boolean preview = true; + + public static final String JSON_PROPERTY_FORCE_UPDATE = "force_update"; + @javax.annotation.Nullable + private Boolean forceUpdate = false; + + public DatasetUpdateColumnTypeRequest() { + } + + public DatasetUpdateColumnTypeRequest newColumnType(@javax.annotation.Nonnull String newColumnType) { + this.newColumnType = newColumnType; + return this; + } + + /** + * Get newColumnType + * @return newColumnType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNewColumnType() { + return newColumnType; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnType(@javax.annotation.Nonnull String newColumnType) { + this.newColumnType = newColumnType; + } + + + public DatasetUpdateColumnTypeRequest preview(@javax.annotation.Nullable Boolean preview) { + this.preview = preview; + return this; + } + + /** + * Get preview + * @return preview + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPreview() { + return preview; + } + + + @JsonProperty(JSON_PROPERTY_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPreview(@javax.annotation.Nullable Boolean preview) { + this.preview = preview; + } + + + public DatasetUpdateColumnTypeRequest forceUpdate(@javax.annotation.Nullable Boolean forceUpdate) { + this.forceUpdate = forceUpdate; + return this; + } + + /** + * Get forceUpdate + * @return forceUpdate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORCE_UPDATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getForceUpdate() { + return forceUpdate; + } + + + @JsonProperty(JSON_PROPERTY_FORCE_UPDATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setForceUpdate(@javax.annotation.Nullable Boolean forceUpdate) { + this.forceUpdate = forceUpdate; + } + + + /** + * Return true if this DatasetUpdateColumnTypeRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetUpdateColumnTypeRequest datasetUpdateColumnTypeRequest = (DatasetUpdateColumnTypeRequest) o; + return Objects.equals(this.newColumnType, datasetUpdateColumnTypeRequest.newColumnType) && + Objects.equals(this.preview, datasetUpdateColumnTypeRequest.preview) && + Objects.equals(this.forceUpdate, datasetUpdateColumnTypeRequest.forceUpdate); + } + + @Override + public int hashCode() { + return Objects.hash(newColumnType, preview, forceUpdate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetUpdateColumnTypeRequest {\n"); + sb.append(" newColumnType: ").append(toIndentedString(newColumnType)).append("\n"); + sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); + sb.append(" forceUpdate: ").append(toIndentedString(forceUpdate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `new_column_type` to the URL query string + if (getNewColumnType() != null) { + joiner.add(String.format("%snew_column_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnType())))); + } + + // add `preview` to the URL query string + if (getPreview() != null) { + joiner.add(String.format("%spreview%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPreview())))); + } + + // add `force_update` to the URL query string + if (getForceUpdate() != null) { + joiner.add(String.format("%sforce_update%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getForceUpdate())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisApiResponse.java new file mode 100644 index 0000000..1354864 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DeepAnalysisResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DeepAnalysisApiResponse + */ +@JsonPropertyOrder({ + DeepAnalysisApiResponse.JSON_PROPERTY_STATUS, + DeepAnalysisApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeepAnalysisApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DeepAnalysisResponse result; + + public DeepAnalysisApiResponse() { + } + + public DeepAnalysisApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public DeepAnalysisApiResponse result(@javax.annotation.Nonnull DeepAnalysisResponse result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DeepAnalysisResponse getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DeepAnalysisResponse result) { + this.result = result; + } + + + /** + * Return true if this DeepAnalysisApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeepAnalysisApiResponse deepAnalysisApiResponse = (DeepAnalysisApiResponse) o; + return Objects.equals(this.status, deepAnalysisApiResponse.status) && + Objects.equals(this.result, deepAnalysisApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeepAnalysisApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisBody.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisBody.java new file mode 100644 index 0000000..e92dc50 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisBody.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DeepAnalysisBody + */ +@JsonPropertyOrder({ + DeepAnalysisBody.JSON_PROPERTY_TRACE_ID, + DeepAnalysisBody.JSON_PROPERTY_FORCE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeepAnalysisBody { + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + @javax.annotation.Nonnull + private String traceId; + + public static final String JSON_PROPERTY_FORCE = "force"; + @javax.annotation.Nullable + private Boolean force = false; + + public DeepAnalysisBody() { + } + + public DeepAnalysisBody traceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + return this; + } + + /** + * Get traceId + * @return traceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTraceId() { + return traceId; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + } + + + public DeepAnalysisBody force(@javax.annotation.Nullable Boolean force) { + this.force = force; + return this; + } + + /** + * Get force + * @return force + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getForce() { + return force; + } + + + @JsonProperty(JSON_PROPERTY_FORCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setForce(@javax.annotation.Nullable Boolean force) { + this.force = force; + } + + + /** + * Return true if this DeepAnalysisBody object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeepAnalysisBody deepAnalysisBody = (DeepAnalysisBody) o; + return Objects.equals(this.traceId, deepAnalysisBody.traceId) && + Objects.equals(this.force, deepAnalysisBody.force); + } + + @Override + public int hashCode() { + return Objects.hash(traceId, force); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeepAnalysisBody {\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append(" force: ").append(toIndentedString(force)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `trace_id` to the URL query string + if (getTraceId() != null) { + joiner.add(String.format("%strace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceId())))); + } + + // add `force` to the URL query string + if (getForce() != null) { + joiner.add(String.format("%sforce%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getForce())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchApiResponse.java new file mode 100644 index 0000000..5d42674 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DeepAnalysisDispatchResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DeepAnalysisDispatchApiResponse + */ +@JsonPropertyOrder({ + DeepAnalysisDispatchApiResponse.JSON_PROPERTY_STATUS, + DeepAnalysisDispatchApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeepAnalysisDispatchApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DeepAnalysisDispatchResponse result; + + public DeepAnalysisDispatchApiResponse() { + } + + public DeepAnalysisDispatchApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public DeepAnalysisDispatchApiResponse result(@javax.annotation.Nonnull DeepAnalysisDispatchResponse result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DeepAnalysisDispatchResponse getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DeepAnalysisDispatchResponse result) { + this.result = result; + } + + + /** + * Return true if this DeepAnalysisDispatchApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeepAnalysisDispatchApiResponse deepAnalysisDispatchApiResponse = (DeepAnalysisDispatchApiResponse) o; + return Objects.equals(this.status, deepAnalysisDispatchApiResponse.status) && + Objects.equals(this.result, deepAnalysisDispatchApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeepAnalysisDispatchApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchResponse.java new file mode 100644 index 0000000..a77d56b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisDispatchResponse.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DeepAnalysisDispatchResponse + */ +@JsonPropertyOrder({ + DeepAnalysisDispatchResponse.JSON_PROPERTY_STATUS, + DeepAnalysisDispatchResponse.JSON_PROPERTY_TRACE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeepAnalysisDispatchResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + @javax.annotation.Nonnull + private String traceId; + + public DeepAnalysisDispatchResponse() { + } + + public DeepAnalysisDispatchResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public DeepAnalysisDispatchResponse traceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + return this; + } + + /** + * Get traceId + * @return traceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTraceId() { + return traceId; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + } + + + /** + * Return true if this DeepAnalysisDispatchResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeepAnalysisDispatchResponse deepAnalysisDispatchResponse = (DeepAnalysisDispatchResponse) o; + return Objects.equals(this.status, deepAnalysisDispatchResponse.status) && + Objects.equals(this.traceId, deepAnalysisDispatchResponse.traceId); + } + + @Override + public int hashCode() { + return Objects.hash(status, traceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeepAnalysisDispatchResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `trace_id` to the URL query string + if (getTraceId() != null) { + joiner.add(String.format("%strace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisResponse.java new file mode 100644 index 0000000..d75a53f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeepAnalysisResponse.java @@ -0,0 +1,325 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Recommendation; +import com.futureagi.sdk.model.RootCause; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DeepAnalysisResponse + */ +@JsonPropertyOrder({ + DeepAnalysisResponse.JSON_PROPERTY_STATUS, + DeepAnalysisResponse.JSON_PROPERTY_TRACE_ID, + DeepAnalysisResponse.JSON_PROPERTY_ROOT_CAUSES, + DeepAnalysisResponse.JSON_PROPERTY_RECOMMENDATIONS, + DeepAnalysisResponse.JSON_PROPERTY_IMMEDIATE_FIX +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeepAnalysisResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + @javax.annotation.Nonnull + private String traceId; + + public static final String JSON_PROPERTY_ROOT_CAUSES = "root_causes"; + @javax.annotation.Nonnull + private List rootCauses = new ArrayList<>(); + + public static final String JSON_PROPERTY_RECOMMENDATIONS = "recommendations"; + @javax.annotation.Nonnull + private List recommendations = new ArrayList<>(); + + public static final String JSON_PROPERTY_IMMEDIATE_FIX = "immediate_fix"; + @javax.annotation.Nullable + private String immediateFix; + + public DeepAnalysisResponse() { + } + + public DeepAnalysisResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public DeepAnalysisResponse traceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + return this; + } + + /** + * Get traceId + * @return traceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTraceId() { + return traceId; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + } + + + public DeepAnalysisResponse rootCauses(@javax.annotation.Nonnull List rootCauses) { + this.rootCauses = rootCauses; + return this; + } + + public DeepAnalysisResponse addRootCausesItem(RootCause rootCausesItem) { + if (this.rootCauses == null) { + this.rootCauses = new ArrayList<>(); + } + this.rootCauses.add(rootCausesItem); + return this; + } + + /** + * Get rootCauses + * @return rootCauses + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROOT_CAUSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRootCauses() { + return rootCauses; + } + + + @JsonProperty(JSON_PROPERTY_ROOT_CAUSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRootCauses(@javax.annotation.Nonnull List rootCauses) { + this.rootCauses = rootCauses; + } + + + public DeepAnalysisResponse recommendations(@javax.annotation.Nonnull List recommendations) { + this.recommendations = recommendations; + return this; + } + + public DeepAnalysisResponse addRecommendationsItem(Recommendation recommendationsItem) { + if (this.recommendations == null) { + this.recommendations = new ArrayList<>(); + } + this.recommendations.add(recommendationsItem); + return this; + } + + /** + * Get recommendations + * @return recommendations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECOMMENDATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRecommendations() { + return recommendations; + } + + + @JsonProperty(JSON_PROPERTY_RECOMMENDATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecommendations(@javax.annotation.Nonnull List recommendations) { + this.recommendations = recommendations; + } + + + public DeepAnalysisResponse immediateFix(@javax.annotation.Nullable String immediateFix) { + this.immediateFix = immediateFix; + return this; + } + + /** + * Get immediateFix + * @return immediateFix + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMMEDIATE_FIX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getImmediateFix() { + return immediateFix; + } + + + @JsonProperty(JSON_PROPERTY_IMMEDIATE_FIX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setImmediateFix(@javax.annotation.Nullable String immediateFix) { + this.immediateFix = immediateFix; + } + + + /** + * Return true if this DeepAnalysisResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeepAnalysisResponse deepAnalysisResponse = (DeepAnalysisResponse) o; + return Objects.equals(this.status, deepAnalysisResponse.status) && + Objects.equals(this.traceId, deepAnalysisResponse.traceId) && + Objects.equals(this.rootCauses, deepAnalysisResponse.rootCauses) && + Objects.equals(this.recommendations, deepAnalysisResponse.recommendations) && + Objects.equals(this.immediateFix, deepAnalysisResponse.immediateFix); + } + + @Override + public int hashCode() { + return Objects.hash(status, traceId, rootCauses, recommendations, immediateFix); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeepAnalysisResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append(" rootCauses: ").append(toIndentedString(rootCauses)).append("\n"); + sb.append(" recommendations: ").append(toIndentedString(recommendations)).append("\n"); + sb.append(" immediateFix: ").append(toIndentedString(immediateFix)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `trace_id` to the URL query string + if (getTraceId() != null) { + joiner.add(String.format("%strace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceId())))); + } + + // add `root_causes` to the URL query string + if (getRootCauses() != null) { + for (int i = 0; i < getRootCauses().size(); i++) { + if (getRootCauses().get(i) != null) { + joiner.add(getRootCauses().get(i).toUrlQueryString(String.format("%sroot_causes%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `recommendations` to the URL query string + if (getRecommendations() != null) { + for (int i = 0; i < getRecommendations().size(); i++) { + if (getRecommendations().get(i) != null) { + joiner.add(getRecommendations().get(i).toUrlQueryString(String.format("%srecommendations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `immediate_fix` to the URL query string + if (getImmediateFix() != null) { + joiner.add(String.format("%simmediate_fix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImmediateFix())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalConfigResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalConfigResponse.java new file mode 100644 index 0000000..fa9582b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalConfigResponse.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DeleteEvalConfigResponse + */ +@JsonPropertyOrder({ + DeleteEvalConfigResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeleteEvalConfigResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public DeleteEvalConfigResponse() { + } + + public DeleteEvalConfigResponse message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this DeleteEvalConfigResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteEvalConfigResponse deleteEvalConfigResponse = (DeleteEvalConfigResponse) o; + return Objects.equals(this.message, deleteEvalConfigResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteEvalConfigResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalTemplate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalTemplate.java new file mode 100644 index 0000000..13e1b74 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DeleteEvalTemplate.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DeleteEvalTemplate + */ +@JsonPropertyOrder({ + DeleteEvalTemplate.JSON_PROPERTY_EVAL_TEMPLATE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DeleteEvalTemplate { + public static final String JSON_PROPERTY_EVAL_TEMPLATE_ID = "eval_template_id"; + @javax.annotation.Nonnull + private UUID evalTemplateId; + + public DeleteEvalTemplate() { + } + + public DeleteEvalTemplate evalTemplateId(@javax.annotation.Nonnull UUID evalTemplateId) { + this.evalTemplateId = evalTemplateId; + return this; + } + + /** + * Get evalTemplateId + * @return evalTemplateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getEvalTemplateId() { + return evalTemplateId; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalTemplateId(@javax.annotation.Nonnull UUID evalTemplateId) { + this.evalTemplateId = evalTemplateId; + } + + + /** + * Return true if this DeleteEvalTemplate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteEvalTemplate deleteEvalTemplate = (DeleteEvalTemplate) o; + return Objects.equals(this.evalTemplateId, deleteEvalTemplate.evalTemplateId); + } + + @Override + public int hashCode() { + return Objects.hash(evalTemplateId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteEvalTemplate {\n"); + sb.append(" evalTemplateId: ").append(toIndentedString(evalTemplateId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_template_id` to the URL query string + if (getEvalTemplateId() != null) { + joiner.add(String.format("%seval_template_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplateId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetail.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetail.java new file mode 100644 index 0000000..2cb1c3e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetail.java @@ -0,0 +1,347 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DerivedVariableDetail + */ +@JsonPropertyOrder({ + DerivedVariableDetail.JSON_PROPERTY_PATHS, + DerivedVariableDetail.JSON_PROPERTY_SCHEMA, + DerivedVariableDetail.JSON_PROPERTY_FULL_VARIABLES, + DerivedVariableDetail.JSON_PROPERTY_RAW_SAMPLE, + DerivedVariableDetail.JSON_PROPERTY_IS_JSON +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DerivedVariableDetail { + public static final String JSON_PROPERTY_PATHS = "paths"; + @javax.annotation.Nullable + private List paths = new ArrayList<>(); + + public static final String JSON_PROPERTY_SCHEMA = "schema"; + @javax.annotation.Nullable + private Map schema = new HashMap<>(); + + public static final String JSON_PROPERTY_FULL_VARIABLES = "full_variables"; + @javax.annotation.Nullable + private List fullVariables = new ArrayList<>(); + + public static final String JSON_PROPERTY_RAW_SAMPLE = "raw_sample"; + @javax.annotation.Nullable + private Map rawSample = new HashMap<>(); + + public static final String JSON_PROPERTY_IS_JSON = "is_json"; + @javax.annotation.Nullable + private Boolean isJson; + + public DerivedVariableDetail() { + } + + public DerivedVariableDetail paths(@javax.annotation.Nullable List paths) { + this.paths = paths; + return this; + } + + public DerivedVariableDetail addPathsItem(String pathsItem) { + if (this.paths == null) { + this.paths = new ArrayList<>(); + } + this.paths.add(pathsItem); + return this; + } + + /** + * Get paths + * @return paths + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATHS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPaths() { + return paths; + } + + + @JsonProperty(JSON_PROPERTY_PATHS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaths(@javax.annotation.Nullable List paths) { + this.paths = paths; + } + + + public DerivedVariableDetail schema(@javax.annotation.Nullable Map schema) { + this.schema = schema; + return this; + } + + public DerivedVariableDetail putSchemaItem(String key, Object schemaItem) { + if (this.schema == null) { + this.schema = new HashMap<>(); + } + this.schema.put(key, schemaItem); + return this; + } + + /** + * Get schema + * @return schema + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCHEMA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSchema() { + return schema; + } + + + @JsonProperty(JSON_PROPERTY_SCHEMA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSchema(@javax.annotation.Nullable Map schema) { + this.schema = schema; + } + + + public DerivedVariableDetail fullVariables(@javax.annotation.Nullable List fullVariables) { + this.fullVariables = fullVariables; + return this; + } + + public DerivedVariableDetail addFullVariablesItem(String fullVariablesItem) { + if (this.fullVariables == null) { + this.fullVariables = new ArrayList<>(); + } + this.fullVariables.add(fullVariablesItem); + return this; + } + + /** + * Get fullVariables + * @return fullVariables + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FULL_VARIABLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFullVariables() { + return fullVariables; + } + + + @JsonProperty(JSON_PROPERTY_FULL_VARIABLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullVariables(@javax.annotation.Nullable List fullVariables) { + this.fullVariables = fullVariables; + } + + + public DerivedVariableDetail rawSample(@javax.annotation.Nullable Map rawSample) { + this.rawSample = rawSample; + return this; + } + + public DerivedVariableDetail putRawSampleItem(String key, Object rawSampleItem) { + if (this.rawSample == null) { + this.rawSample = new HashMap<>(); + } + this.rawSample.put(key, rawSampleItem); + return this; + } + + /** + * Get rawSample + * @return rawSample + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RAW_SAMPLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRawSample() { + return rawSample; + } + + + @JsonProperty(JSON_PROPERTY_RAW_SAMPLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRawSample(@javax.annotation.Nullable Map rawSample) { + this.rawSample = rawSample; + } + + + public DerivedVariableDetail isJson(@javax.annotation.Nullable Boolean isJson) { + this.isJson = isJson; + return this; + } + + /** + * Get isJson + * @return isJson + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_JSON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsJson() { + return isJson; + } + + + @JsonProperty(JSON_PROPERTY_IS_JSON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsJson(@javax.annotation.Nullable Boolean isJson) { + this.isJson = isJson; + } + + + /** + * Return true if this DerivedVariableDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DerivedVariableDetail derivedVariableDetail = (DerivedVariableDetail) o; + return Objects.equals(this.paths, derivedVariableDetail.paths) && + Objects.equals(this.schema, derivedVariableDetail.schema) && + Objects.equals(this.fullVariables, derivedVariableDetail.fullVariables) && + Objects.equals(this.rawSample, derivedVariableDetail.rawSample) && + Objects.equals(this.isJson, derivedVariableDetail.isJson); + } + + @Override + public int hashCode() { + return Objects.hash(paths, schema, fullVariables, rawSample, isJson); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DerivedVariableDetail {\n"); + sb.append(" paths: ").append(toIndentedString(paths)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).append("\n"); + sb.append(" fullVariables: ").append(toIndentedString(fullVariables)).append("\n"); + sb.append(" rawSample: ").append(toIndentedString(rawSample)).append("\n"); + sb.append(" isJson: ").append(toIndentedString(isJson)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `paths` to the URL query string + if (getPaths() != null) { + for (int i = 0; i < getPaths().size(); i++) { + joiner.add(String.format("%spaths%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getPaths().get(i))))); + } + } + + // add `schema` to the URL query string + if (getSchema() != null) { + for (String _key : getSchema().keySet()) { + joiner.add(String.format("%sschema%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSchema().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSchema().get(_key))))); + } + } + + // add `full_variables` to the URL query string + if (getFullVariables() != null) { + for (int i = 0; i < getFullVariables().size(); i++) { + joiner.add(String.format("%sfull_variables%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFullVariables().get(i))))); + } + } + + // add `raw_sample` to the URL query string + if (getRawSample() != null) { + for (String _key : getRawSample().keySet()) { + joiner.add(String.format("%sraw_sample%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRawSample().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRawSample().get(_key))))); + } + } + + // add `is_json` to the URL query string + if (getIsJson() != null) { + joiner.add(String.format("%sis_json%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsJson())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetailResponse.java new file mode 100644 index 0000000..bfaa789 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableDetailResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DerivedVariableDetail; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DerivedVariableDetailResponse + */ +@JsonPropertyOrder({ + DerivedVariableDetailResponse.JSON_PROPERTY_STATUS, + DerivedVariableDetailResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DerivedVariableDetailResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DerivedVariableDetail result; + + public DerivedVariableDetailResponse() { + } + + public DerivedVariableDetailResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DerivedVariableDetailResponse result(@javax.annotation.Nonnull DerivedVariableDetail result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DerivedVariableDetail getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DerivedVariableDetail result) { + this.result = result; + } + + + /** + * Return true if this DerivedVariableDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DerivedVariableDetailResponse derivedVariableDetailResponse = (DerivedVariableDetailResponse) o; + return Objects.equals(this.status, derivedVariableDetailResponse.status) && + Objects.equals(this.result, derivedVariableDetailResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DerivedVariableDetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableExtractRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableExtractRequest.java new file mode 100644 index 0000000..1ed88f2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariableExtractRequest.java @@ -0,0 +1,259 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DerivedVariableExtractRequest + */ +@JsonPropertyOrder({ + DerivedVariableExtractRequest.JSON_PROPERTY_VERSION, + DerivedVariableExtractRequest.JSON_PROPERTY_COLUMN_NAME, + DerivedVariableExtractRequest.JSON_PROPERTY_OUTPUT_INDEX, + DerivedVariableExtractRequest.JSON_PROPERTY_RESPONSE_FORMAT_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DerivedVariableExtractRequest { + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nonnull + private String version; + + public static final String JSON_PROPERTY_COLUMN_NAME = "column_name"; + @javax.annotation.Nullable + private String columnName = "output"; + + public static final String JSON_PROPERTY_OUTPUT_INDEX = "output_index"; + @javax.annotation.Nullable + private Integer outputIndex = 0; + + public static final String JSON_PROPERTY_RESPONSE_FORMAT_TYPE = "response_format_type"; + @javax.annotation.Nullable + private String responseFormatType; + + public DerivedVariableExtractRequest() { + } + + public DerivedVariableExtractRequest version(@javax.annotation.Nonnull String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersion(@javax.annotation.Nonnull String version) { + this.version = version; + } + + + public DerivedVariableExtractRequest columnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get columnName + * @return columnName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getColumnName() { + return columnName; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + } + + + public DerivedVariableExtractRequest outputIndex(@javax.annotation.Nullable Integer outputIndex) { + this.outputIndex = outputIndex; + return this; + } + + /** + * Get outputIndex + * @return outputIndex + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getOutputIndex() { + return outputIndex; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputIndex(@javax.annotation.Nullable Integer outputIndex) { + this.outputIndex = outputIndex; + } + + + public DerivedVariableExtractRequest responseFormatType(@javax.annotation.Nullable String responseFormatType) { + this.responseFormatType = responseFormatType; + return this; + } + + /** + * Get responseFormatType + * @return responseFormatType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResponseFormatType() { + return responseFormatType; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResponseFormatType(@javax.annotation.Nullable String responseFormatType) { + this.responseFormatType = responseFormatType; + } + + + /** + * Return true if this DerivedVariableExtractRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DerivedVariableExtractRequest derivedVariableExtractRequest = (DerivedVariableExtractRequest) o; + return Objects.equals(this.version, derivedVariableExtractRequest.version) && + Objects.equals(this.columnName, derivedVariableExtractRequest.columnName) && + Objects.equals(this.outputIndex, derivedVariableExtractRequest.outputIndex) && + Objects.equals(this.responseFormatType, derivedVariableExtractRequest.responseFormatType); + } + + @Override + public int hashCode() { + return Objects.hash(version, columnName, outputIndex, responseFormatType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DerivedVariableExtractRequest {\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" outputIndex: ").append(toIndentedString(outputIndex)).append("\n"); + sb.append(" responseFormatType: ").append(toIndentedString(responseFormatType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `column_name` to the URL query string + if (getColumnName() != null) { + joiner.add(String.format("%scolumn_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnName())))); + } + + // add `output_index` to the URL query string + if (getOutputIndex() != null) { + joiner.add(String.format("%soutput_index%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputIndex())))); + } + + // add `response_format_type` to the URL query string + if (getResponseFormatType() != null) { + joiner.add(String.format("%sresponse_format_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResponseFormatType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariablePreviewRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariablePreviewRequest.java new file mode 100644 index 0000000..2b054f2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DerivedVariablePreviewRequest.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DerivedVariablePreviewRequest + */ +@JsonPropertyOrder({ + DerivedVariablePreviewRequest.JSON_PROPERTY_CONTENT, + DerivedVariablePreviewRequest.JSON_PROPERTY_COLUMN_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DerivedVariablePreviewRequest { + public static final String JSON_PROPERTY_CONTENT = "content"; + @javax.annotation.Nonnull + private Map content = new HashMap<>(); + + public static final String JSON_PROPERTY_COLUMN_NAME = "column_name"; + @javax.annotation.Nullable + private String columnName = "output"; + + public DerivedVariablePreviewRequest() { + } + + public DerivedVariablePreviewRequest content(@javax.annotation.Nonnull Map content) { + this.content = content; + return this; + } + + public DerivedVariablePreviewRequest putContentItem(String key, Object contentItem) { + if (this.content == null) { + this.content = new HashMap<>(); + } + this.content.put(key, contentItem); + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setContent(@javax.annotation.Nonnull Map content) { + this.content = content; + } + + + public DerivedVariablePreviewRequest columnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get columnName + * @return columnName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getColumnName() { + return columnName; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnName(@javax.annotation.Nullable String columnName) { + this.columnName = columnName; + } + + + /** + * Return true if this DerivedVariablePreviewRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DerivedVariablePreviewRequest derivedVariablePreviewRequest = (DerivedVariablePreviewRequest) o; + return Objects.equals(this.content, derivedVariablePreviewRequest.content) && + Objects.equals(this.columnName, derivedVariablePreviewRequest.columnName); + } + + @Override + public int hashCode() { + return Objects.hash(content, columnName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DerivedVariablePreviewRequest {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `content` to the URL query string + if (getContent() != null) { + for (String _key : getContent().keySet()) { + joiner.add(String.format("%scontent%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getContent().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getContent().get(_key))))); + } + } + + // add `column_name` to the URL query string + if (getColumnName() != null) { + joiner.add(String.format("%scolumn_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DevelopDatasetMessageResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DevelopDatasetMessageResponse.java new file mode 100644 index 0000000..f9b2a7b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DevelopDatasetMessageResponse.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DevelopDatasetMessageResponse + */ +@JsonPropertyOrder({ + DevelopDatasetMessageResponse.JSON_PROPERTY_STATUS, + DevelopDatasetMessageResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DevelopDatasetMessageResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private String result; + + public DevelopDatasetMessageResponse() { + } + + public DevelopDatasetMessageResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DevelopDatasetMessageResponse result(@javax.annotation.Nonnull String result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull String result) { + this.result = result; + } + + + /** + * Return true if this DevelopDatasetMessageResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DevelopDatasetMessageResponse developDatasetMessageResponse = (DevelopDatasetMessageResponse) o; + return Objects.equals(this.status, developDatasetMessageResponse.status) && + Objects.equals(this.result, developDatasetMessageResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DevelopDatasetMessageResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionCommentRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionCommentRequest.java new file mode 100644 index 0000000..6663ff2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionCommentRequest.java @@ -0,0 +1,310 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DiscussionCommentRequest + */ +@JsonPropertyOrder({ + DiscussionCommentRequest.JSON_PROPERTY_COMMENT, + DiscussionCommentRequest.JSON_PROPERTY_LABEL_ID, + DiscussionCommentRequest.JSON_PROPERTY_TARGET_ANNOTATOR_ID, + DiscussionCommentRequest.JSON_PROPERTY_THREAD_ID, + DiscussionCommentRequest.JSON_PROPERTY_MENTIONED_USER_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DiscussionCommentRequest { + public static final String JSON_PROPERTY_COMMENT = "comment"; + @javax.annotation.Nullable + private String comment; + + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nullable + private UUID labelId; + + public static final String JSON_PROPERTY_TARGET_ANNOTATOR_ID = "target_annotator_id"; + @javax.annotation.Nullable + private UUID targetAnnotatorId; + + public static final String JSON_PROPERTY_THREAD_ID = "thread_id"; + @javax.annotation.Nullable + private UUID threadId; + + public static final String JSON_PROPERTY_MENTIONED_USER_IDS = "mentioned_user_ids"; + @javax.annotation.Nullable + private List mentionedUserIds = new ArrayList<>(); + + public DiscussionCommentRequest() { + } + + public DiscussionCommentRequest comment(@javax.annotation.Nullable String comment) { + this.comment = comment; + return this; + } + + /** + * Get comment + * @return comment + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getComment() { + return comment; + } + + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = comment; + } + + + public DiscussionCommentRequest labelId(@javax.annotation.Nullable UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabelId(@javax.annotation.Nullable UUID labelId) { + this.labelId = labelId; + } + + + public DiscussionCommentRequest targetAnnotatorId(@javax.annotation.Nullable UUID targetAnnotatorId) { + this.targetAnnotatorId = targetAnnotatorId; + return this; + } + + /** + * Get targetAnnotatorId + * @return targetAnnotatorId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_ANNOTATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTargetAnnotatorId() { + return targetAnnotatorId; + } + + + @JsonProperty(JSON_PROPERTY_TARGET_ANNOTATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTargetAnnotatorId(@javax.annotation.Nullable UUID targetAnnotatorId) { + this.targetAnnotatorId = targetAnnotatorId; + } + + + public DiscussionCommentRequest threadId(@javax.annotation.Nullable UUID threadId) { + this.threadId = threadId; + return this; + } + + /** + * Get threadId + * @return threadId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THREAD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getThreadId() { + return threadId; + } + + + @JsonProperty(JSON_PROPERTY_THREAD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setThreadId(@javax.annotation.Nullable UUID threadId) { + this.threadId = threadId; + } + + + public DiscussionCommentRequest mentionedUserIds(@javax.annotation.Nullable List mentionedUserIds) { + this.mentionedUserIds = mentionedUserIds; + return this; + } + + public DiscussionCommentRequest addMentionedUserIdsItem(String mentionedUserIdsItem) { + if (this.mentionedUserIds == null) { + this.mentionedUserIds = new ArrayList<>(); + } + this.mentionedUserIds.add(mentionedUserIdsItem); + return this; + } + + /** + * Get mentionedUserIds + * @return mentionedUserIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MENTIONED_USER_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMentionedUserIds() { + return mentionedUserIds; + } + + + @JsonProperty(JSON_PROPERTY_MENTIONED_USER_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMentionedUserIds(@javax.annotation.Nullable List mentionedUserIds) { + this.mentionedUserIds = mentionedUserIds; + } + + + /** + * Return true if this DiscussionCommentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiscussionCommentRequest discussionCommentRequest = (DiscussionCommentRequest) o; + return Objects.equals(this.comment, discussionCommentRequest.comment) && + Objects.equals(this.labelId, discussionCommentRequest.labelId) && + Objects.equals(this.targetAnnotatorId, discussionCommentRequest.targetAnnotatorId) && + Objects.equals(this.threadId, discussionCommentRequest.threadId) && + Objects.equals(this.mentionedUserIds, discussionCommentRequest.mentionedUserIds); + } + + @Override + public int hashCode() { + return Objects.hash(comment, labelId, targetAnnotatorId, threadId, mentionedUserIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DiscussionCommentRequest {\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" targetAnnotatorId: ").append(toIndentedString(targetAnnotatorId)).append("\n"); + sb.append(" threadId: ").append(toIndentedString(threadId)).append("\n"); + sb.append(" mentionedUserIds: ").append(toIndentedString(mentionedUserIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `comment` to the URL query string + if (getComment() != null) { + joiner.add(String.format("%scomment%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getComment())))); + } + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `target_annotator_id` to the URL query string + if (getTargetAnnotatorId() != null) { + joiner.add(String.format("%starget_annotator_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTargetAnnotatorId())))); + } + + // add `thread_id` to the URL query string + if (getThreadId() != null) { + joiner.add(String.format("%sthread_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getThreadId())))); + } + + // add `mentioned_user_ids` to the URL query string + if (getMentionedUserIds() != null) { + for (int i = 0; i < getMentionedUserIds().size(); i++) { + joiner.add(String.format("%smentioned_user_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMentionedUserIds().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionReactionRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionReactionRequest.java new file mode 100644 index 0000000..a02e200 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionReactionRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DiscussionReactionRequest + */ +@JsonPropertyOrder({ + DiscussionReactionRequest.JSON_PROPERTY_EMOJI +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DiscussionReactionRequest { + public static final String JSON_PROPERTY_EMOJI = "emoji"; + @javax.annotation.Nullable + private String emoji; + + public DiscussionReactionRequest() { + } + + public DiscussionReactionRequest emoji(@javax.annotation.Nullable String emoji) { + this.emoji = emoji; + return this; + } + + /** + * Get emoji + * @return emoji + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMOJI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmoji() { + return emoji; + } + + + @JsonProperty(JSON_PROPERTY_EMOJI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmoji(@javax.annotation.Nullable String emoji) { + this.emoji = emoji; + } + + + /** + * Return true if this DiscussionReactionRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiscussionReactionRequest discussionReactionRequest = (DiscussionReactionRequest) o; + return Objects.equals(this.emoji, discussionReactionRequest.emoji); + } + + @Override + public int hashCode() { + return Objects.hash(emoji); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DiscussionReactionRequest {\n"); + sb.append(" emoji: ").append(toIndentedString(emoji)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `emoji` to the URL query string + if (getEmoji() != null) { + joiner.add(String.format("%semoji%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmoji())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionThreadStatusRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionThreadStatusRequest.java new file mode 100644 index 0000000..85023be --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DiscussionThreadStatusRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DiscussionThreadStatusRequest + */ +@JsonPropertyOrder({ + DiscussionThreadStatusRequest.JSON_PROPERTY_COMMENT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DiscussionThreadStatusRequest { + public static final String JSON_PROPERTY_COMMENT = "comment"; + @javax.annotation.Nullable + private String comment; + + public DiscussionThreadStatusRequest() { + } + + public DiscussionThreadStatusRequest comment(@javax.annotation.Nullable String comment) { + this.comment = comment; + return this; + } + + /** + * Get comment + * @return comment + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getComment() { + return comment; + } + + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = comment; + } + + + /** + * Return true if this DiscussionThreadStatusRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiscussionThreadStatusRequest discussionThreadStatusRequest = (DiscussionThreadStatusRequest) o; + return Objects.equals(this.comment, discussionThreadStatusRequest.comment); + } + + @Override + public int hashCode() { + return Objects.hash(comment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DiscussionThreadStatusRequest {\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `comment` to the URL query string + if (getComment() != null) { + joiner.add(String.format("%scomment%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getComment())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetRequest.java new file mode 100644 index 0000000..47f13f3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetRequest.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DuplicateDatasetRequest + */ +@JsonPropertyOrder({ + DuplicateDatasetRequest.JSON_PROPERTY_ROW_IDS, + DuplicateDatasetRequest.JSON_PROPERTY_SELECTED_ALL_ROWS, + DuplicateDatasetRequest.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DuplicateDatasetRequest { + public static final String JSON_PROPERTY_ROW_IDS = "row_ids"; + @javax.annotation.Nullable + private List rowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECTED_ALL_ROWS = "selected_all_rows"; + @javax.annotation.Nullable + private Boolean selectedAllRows = false; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public DuplicateDatasetRequest() { + } + + public DuplicateDatasetRequest rowIds(@javax.annotation.Nullable List rowIds) { + this.rowIds = rowIds; + return this; + } + + public DuplicateDatasetRequest addRowIdsItem(UUID rowIdsItem) { + if (this.rowIds == null) { + this.rowIds = new ArrayList<>(); + } + this.rowIds.add(rowIdsItem); + return this; + } + + /** + * Get rowIds + * @return rowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRowIds() { + return rowIds; + } + + + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRowIds(@javax.annotation.Nullable List rowIds) { + this.rowIds = rowIds; + } + + + public DuplicateDatasetRequest selectedAllRows(@javax.annotation.Nullable Boolean selectedAllRows) { + this.selectedAllRows = selectedAllRows; + return this; + } + + /** + * Get selectedAllRows + * @return selectedAllRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECTED_ALL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectedAllRows() { + return selectedAllRows; + } + + + @JsonProperty(JSON_PROPERTY_SELECTED_ALL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectedAllRows(@javax.annotation.Nullable Boolean selectedAllRows) { + this.selectedAllRows = selectedAllRows; + } + + + public DuplicateDatasetRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this DuplicateDatasetRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DuplicateDatasetRequest duplicateDatasetRequest = (DuplicateDatasetRequest) o; + return Objects.equals(this.rowIds, duplicateDatasetRequest.rowIds) && + Objects.equals(this.selectedAllRows, duplicateDatasetRequest.selectedAllRows) && + Objects.equals(this.name, duplicateDatasetRequest.name); + } + + @Override + public int hashCode() { + return Objects.hash(rowIds, selectedAllRows, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DuplicateDatasetRequest {\n"); + sb.append(" rowIds: ").append(toIndentedString(rowIds)).append("\n"); + sb.append(" selectedAllRows: ").append(toIndentedString(selectedAllRows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row_ids` to the URL query string + if (getRowIds() != null) { + for (int i = 0; i < getRowIds().size(); i++) { + if (getRowIds().get(i) != null) { + joiner.add(String.format("%srow_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRowIds().get(i))))); + } + } + } + + // add `selected_all_rows` to the URL query string + if (getSelectedAllRows() != null) { + joiner.add(String.format("%sselected_all_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectedAllRows())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResponse.java new file mode 100644 index 0000000..8d1fec0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DuplicateDatasetResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DuplicateDatasetResponse + */ +@JsonPropertyOrder({ + DuplicateDatasetResponse.JSON_PROPERTY_STATUS, + DuplicateDatasetResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DuplicateDatasetResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DuplicateDatasetResult result; + + public DuplicateDatasetResponse() { + } + + public DuplicateDatasetResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DuplicateDatasetResponse result(@javax.annotation.Nonnull DuplicateDatasetResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DuplicateDatasetResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DuplicateDatasetResult result) { + this.result = result; + } + + + /** + * Return true if this DuplicateDatasetResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DuplicateDatasetResponse duplicateDatasetResponse = (DuplicateDatasetResponse) o; + return Objects.equals(this.status, duplicateDatasetResponse.status) && + Objects.equals(this.result, duplicateDatasetResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DuplicateDatasetResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResult.java new file mode 100644 index 0000000..14624b0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateDatasetResult.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DuplicateDatasetResult + */ +@JsonPropertyOrder({ + DuplicateDatasetResult.JSON_PROPERTY_MESSAGE, + DuplicateDatasetResult.JSON_PROPERTY_NEW_DATASET_ID, + DuplicateDatasetResult.JSON_PROPERTY_NEW_DATASET_NAME, + DuplicateDatasetResult.JSON_PROPERTY_COLUMNS_COPIED, + DuplicateDatasetResult.JSON_PROPERTY_ROWS_COPIED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DuplicateDatasetResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_NEW_DATASET_ID = "new_dataset_id"; + @javax.annotation.Nonnull + private UUID newDatasetId; + + public static final String JSON_PROPERTY_NEW_DATASET_NAME = "new_dataset_name"; + @javax.annotation.Nonnull + private String newDatasetName; + + public static final String JSON_PROPERTY_COLUMNS_COPIED = "columns_copied"; + @javax.annotation.Nonnull + private Integer columnsCopied; + + public static final String JSON_PROPERTY_ROWS_COPIED = "rows_copied"; + @javax.annotation.Nonnull + private Integer rowsCopied; + + public DuplicateDatasetResult() { + } + + public DuplicateDatasetResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public DuplicateDatasetResult newDatasetId(@javax.annotation.Nonnull UUID newDatasetId) { + this.newDatasetId = newDatasetId; + return this; + } + + /** + * Get newDatasetId + * @return newDatasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getNewDatasetId() { + return newDatasetId; + } + + + @JsonProperty(JSON_PROPERTY_NEW_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewDatasetId(@javax.annotation.Nonnull UUID newDatasetId) { + this.newDatasetId = newDatasetId; + } + + + public DuplicateDatasetResult newDatasetName(@javax.annotation.Nonnull String newDatasetName) { + this.newDatasetName = newDatasetName; + return this; + } + + /** + * Get newDatasetName + * @return newDatasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNewDatasetName() { + return newDatasetName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewDatasetName(@javax.annotation.Nonnull String newDatasetName) { + this.newDatasetName = newDatasetName; + } + + + public DuplicateDatasetResult columnsCopied(@javax.annotation.Nonnull Integer columnsCopied) { + this.columnsCopied = columnsCopied; + return this; + } + + /** + * Get columnsCopied + * @return columnsCopied + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS_COPIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getColumnsCopied() { + return columnsCopied; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS_COPIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnsCopied(@javax.annotation.Nonnull Integer columnsCopied) { + this.columnsCopied = columnsCopied; + } + + + public DuplicateDatasetResult rowsCopied(@javax.annotation.Nonnull Integer rowsCopied) { + this.rowsCopied = rowsCopied; + return this; + } + + /** + * Get rowsCopied + * @return rowsCopied + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROWS_COPIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowsCopied() { + return rowsCopied; + } + + + @JsonProperty(JSON_PROPERTY_ROWS_COPIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowsCopied(@javax.annotation.Nonnull Integer rowsCopied) { + this.rowsCopied = rowsCopied; + } + + + /** + * Return true if this DuplicateDatasetResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DuplicateDatasetResult duplicateDatasetResult = (DuplicateDatasetResult) o; + return Objects.equals(this.message, duplicateDatasetResult.message) && + Objects.equals(this.newDatasetId, duplicateDatasetResult.newDatasetId) && + Objects.equals(this.newDatasetName, duplicateDatasetResult.newDatasetName) && + Objects.equals(this.columnsCopied, duplicateDatasetResult.columnsCopied) && + Objects.equals(this.rowsCopied, duplicateDatasetResult.rowsCopied); + } + + @Override + public int hashCode() { + return Objects.hash(message, newDatasetId, newDatasetName, columnsCopied, rowsCopied); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DuplicateDatasetResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" newDatasetId: ").append(toIndentedString(newDatasetId)).append("\n"); + sb.append(" newDatasetName: ").append(toIndentedString(newDatasetName)).append("\n"); + sb.append(" columnsCopied: ").append(toIndentedString(columnsCopied)).append("\n"); + sb.append(" rowsCopied: ").append(toIndentedString(rowsCopied)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `new_dataset_id` to the URL query string + if (getNewDatasetId() != null) { + joiner.add(String.format("%snew_dataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewDatasetId())))); + } + + // add `new_dataset_name` to the URL query string + if (getNewDatasetName() != null) { + joiner.add(String.format("%snew_dataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewDatasetName())))); + } + + // add `columns_copied` to the URL query string + if (getColumnsCopied() != null) { + joiner.add(String.format("%scolumns_copied%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnsCopied())))); + } + + // add `rows_copied` to the URL query string + if (getRowsCopied() != null) { + joiner.add(String.format("%srows_copied%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowsCopied())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsRequest.java new file mode 100644 index 0000000..3a1fb7f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsRequest.java @@ -0,0 +1,241 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DuplicateRowsRequest + */ +@JsonPropertyOrder({ + DuplicateRowsRequest.JSON_PROPERTY_ROW_IDS, + DuplicateRowsRequest.JSON_PROPERTY_SELECTED_ALL_ROWS, + DuplicateRowsRequest.JSON_PROPERTY_NUM_COPIES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DuplicateRowsRequest { + public static final String JSON_PROPERTY_ROW_IDS = "row_ids"; + @javax.annotation.Nullable + private List rowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECTED_ALL_ROWS = "selected_all_rows"; + @javax.annotation.Nullable + private Boolean selectedAllRows = false; + + public static final String JSON_PROPERTY_NUM_COPIES = "num_copies"; + @javax.annotation.Nullable + private Integer numCopies = 1; + + public DuplicateRowsRequest() { + } + + public DuplicateRowsRequest rowIds(@javax.annotation.Nullable List rowIds) { + this.rowIds = rowIds; + return this; + } + + public DuplicateRowsRequest addRowIdsItem(UUID rowIdsItem) { + if (this.rowIds == null) { + this.rowIds = new ArrayList<>(); + } + this.rowIds.add(rowIdsItem); + return this; + } + + /** + * Get rowIds + * @return rowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRowIds() { + return rowIds; + } + + + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRowIds(@javax.annotation.Nullable List rowIds) { + this.rowIds = rowIds; + } + + + public DuplicateRowsRequest selectedAllRows(@javax.annotation.Nullable Boolean selectedAllRows) { + this.selectedAllRows = selectedAllRows; + return this; + } + + /** + * Get selectedAllRows + * @return selectedAllRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECTED_ALL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectedAllRows() { + return selectedAllRows; + } + + + @JsonProperty(JSON_PROPERTY_SELECTED_ALL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectedAllRows(@javax.annotation.Nullable Boolean selectedAllRows) { + this.selectedAllRows = selectedAllRows; + } + + + public DuplicateRowsRequest numCopies(@javax.annotation.Nullable Integer numCopies) { + this.numCopies = numCopies; + return this; + } + + /** + * Get numCopies + * minimum: 1 + * @return numCopies + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_COPIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumCopies() { + return numCopies; + } + + + @JsonProperty(JSON_PROPERTY_NUM_COPIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumCopies(@javax.annotation.Nullable Integer numCopies) { + this.numCopies = numCopies; + } + + + /** + * Return true if this DuplicateRowsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DuplicateRowsRequest duplicateRowsRequest = (DuplicateRowsRequest) o; + return Objects.equals(this.rowIds, duplicateRowsRequest.rowIds) && + Objects.equals(this.selectedAllRows, duplicateRowsRequest.selectedAllRows) && + Objects.equals(this.numCopies, duplicateRowsRequest.numCopies); + } + + @Override + public int hashCode() { + return Objects.hash(rowIds, selectedAllRows, numCopies); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DuplicateRowsRequest {\n"); + sb.append(" rowIds: ").append(toIndentedString(rowIds)).append("\n"); + sb.append(" selectedAllRows: ").append(toIndentedString(selectedAllRows)).append("\n"); + sb.append(" numCopies: ").append(toIndentedString(numCopies)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row_ids` to the URL query string + if (getRowIds() != null) { + for (int i = 0; i < getRowIds().size(); i++) { + if (getRowIds().get(i) != null) { + joiner.add(String.format("%srow_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRowIds().get(i))))); + } + } + } + + // add `selected_all_rows` to the URL query string + if (getSelectedAllRows() != null) { + joiner.add(String.format("%sselected_all_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectedAllRows())))); + } + + // add `num_copies` to the URL query string + if (getNumCopies() != null) { + joiner.add(String.format("%snum_copies%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumCopies())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResponse.java new file mode 100644 index 0000000..3b72b49 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DuplicateRowsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DuplicateRowsResponse + */ +@JsonPropertyOrder({ + DuplicateRowsResponse.JSON_PROPERTY_STATUS, + DuplicateRowsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DuplicateRowsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DuplicateRowsResult result; + + public DuplicateRowsResponse() { + } + + public DuplicateRowsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DuplicateRowsResponse result(@javax.annotation.Nonnull DuplicateRowsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DuplicateRowsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DuplicateRowsResult result) { + this.result = result; + } + + + /** + * Return true if this DuplicateRowsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DuplicateRowsResponse duplicateRowsResponse = (DuplicateRowsResponse) o; + return Objects.equals(this.status, duplicateRowsResponse.status) && + Objects.equals(this.result, duplicateRowsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DuplicateRowsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResult.java new file mode 100644 index 0000000..6ec5f1d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DuplicateRowsResult.java @@ -0,0 +1,312 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DuplicateRowsResult + */ +@JsonPropertyOrder({ + DuplicateRowsResult.JSON_PROPERTY_MESSAGE, + DuplicateRowsResult.JSON_PROPERTY_SOURCE_ROWS, + DuplicateRowsResult.JSON_PROPERTY_COPIES_PER_ROW, + DuplicateRowsResult.JSON_PROPERTY_TOTAL_NEW_ROWS, + DuplicateRowsResult.JSON_PROPERTY_NEW_ROW_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DuplicateRowsResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_SOURCE_ROWS = "source_rows"; + @javax.annotation.Nonnull + private Integer sourceRows; + + public static final String JSON_PROPERTY_COPIES_PER_ROW = "copies_per_row"; + @javax.annotation.Nonnull + private Integer copiesPerRow; + + public static final String JSON_PROPERTY_TOTAL_NEW_ROWS = "total_new_rows"; + @javax.annotation.Nonnull + private Integer totalNewRows; + + public static final String JSON_PROPERTY_NEW_ROW_IDS = "new_row_ids"; + @javax.annotation.Nonnull + private List newRowIds = new ArrayList<>(); + + public DuplicateRowsResult() { + } + + public DuplicateRowsResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public DuplicateRowsResult sourceRows(@javax.annotation.Nonnull Integer sourceRows) { + this.sourceRows = sourceRows; + return this; + } + + /** + * Get sourceRows + * @return sourceRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSourceRows() { + return sourceRows; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceRows(@javax.annotation.Nonnull Integer sourceRows) { + this.sourceRows = sourceRows; + } + + + public DuplicateRowsResult copiesPerRow(@javax.annotation.Nonnull Integer copiesPerRow) { + this.copiesPerRow = copiesPerRow; + return this; + } + + /** + * Get copiesPerRow + * @return copiesPerRow + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COPIES_PER_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCopiesPerRow() { + return copiesPerRow; + } + + + @JsonProperty(JSON_PROPERTY_COPIES_PER_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCopiesPerRow(@javax.annotation.Nonnull Integer copiesPerRow) { + this.copiesPerRow = copiesPerRow; + } + + + public DuplicateRowsResult totalNewRows(@javax.annotation.Nonnull Integer totalNewRows) { + this.totalNewRows = totalNewRows; + return this; + } + + /** + * Get totalNewRows + * @return totalNewRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_NEW_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalNewRows() { + return totalNewRows; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_NEW_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalNewRows(@javax.annotation.Nonnull Integer totalNewRows) { + this.totalNewRows = totalNewRows; + } + + + public DuplicateRowsResult newRowIds(@javax.annotation.Nonnull List newRowIds) { + this.newRowIds = newRowIds; + return this; + } + + public DuplicateRowsResult addNewRowIdsItem(UUID newRowIdsItem) { + if (this.newRowIds == null) { + this.newRowIds = new ArrayList<>(); + } + this.newRowIds.add(newRowIdsItem); + return this; + } + + /** + * Get newRowIds + * @return newRowIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getNewRowIds() { + return newRowIds; + } + + + @JsonProperty(JSON_PROPERTY_NEW_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewRowIds(@javax.annotation.Nonnull List newRowIds) { + this.newRowIds = newRowIds; + } + + + /** + * Return true if this DuplicateRowsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DuplicateRowsResult duplicateRowsResult = (DuplicateRowsResult) o; + return Objects.equals(this.message, duplicateRowsResult.message) && + Objects.equals(this.sourceRows, duplicateRowsResult.sourceRows) && + Objects.equals(this.copiesPerRow, duplicateRowsResult.copiesPerRow) && + Objects.equals(this.totalNewRows, duplicateRowsResult.totalNewRows) && + Objects.equals(this.newRowIds, duplicateRowsResult.newRowIds); + } + + @Override + public int hashCode() { + return Objects.hash(message, sourceRows, copiesPerRow, totalNewRows, newRowIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DuplicateRowsResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" sourceRows: ").append(toIndentedString(sourceRows)).append("\n"); + sb.append(" copiesPerRow: ").append(toIndentedString(copiesPerRow)).append("\n"); + sb.append(" totalNewRows: ").append(toIndentedString(totalNewRows)).append("\n"); + sb.append(" newRowIds: ").append(toIndentedString(newRowIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `source_rows` to the URL query string + if (getSourceRows() != null) { + joiner.add(String.format("%ssource_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceRows())))); + } + + // add `copies_per_row` to the URL query string + if (getCopiesPerRow() != null) { + joiner.add(String.format("%scopies_per_row%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCopiesPerRow())))); + } + + // add `total_new_rows` to the URL query string + if (getTotalNewRows() != null) { + joiner.add(String.format("%stotal_new_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalNewRows())))); + } + + // add `new_row_ids` to the URL query string + if (getNewRowIds() != null) { + for (int i = 0; i < getNewRowIds().size(); i++) { + if (getNewRowIds().get(i) != null) { + joiner.add(String.format("%snew_row_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getNewRowIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResponse.java new file mode 100644 index 0000000..82b151a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DynamicColumnCreateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DynamicColumnCreateResponse + */ +@JsonPropertyOrder({ + DynamicColumnCreateResponse.JSON_PROPERTY_STATUS, + DynamicColumnCreateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DynamicColumnCreateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DynamicColumnCreateResult result; + + public DynamicColumnCreateResponse() { + } + + public DynamicColumnCreateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DynamicColumnCreateResponse result(@javax.annotation.Nonnull DynamicColumnCreateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DynamicColumnCreateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DynamicColumnCreateResult result) { + this.result = result; + } + + + /** + * Return true if this DynamicColumnCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DynamicColumnCreateResponse dynamicColumnCreateResponse = (DynamicColumnCreateResponse) o; + return Objects.equals(this.status, dynamicColumnCreateResponse.status) && + Objects.equals(this.result, dynamicColumnCreateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicColumnCreateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResult.java new file mode 100644 index 0000000..ffac217 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnCreateResult.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DynamicColumnCreateResult + */ +@JsonPropertyOrder({ + DynamicColumnCreateResult.JSON_PROPERTY_MESSAGE, + DynamicColumnCreateResult.JSON_PROPERTY_NEW_COLUMN_ID, + DynamicColumnCreateResult.JSON_PROPERTY_NEW_COLUMN_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DynamicColumnCreateResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_NEW_COLUMN_ID = "new_column_id"; + @javax.annotation.Nonnull + private UUID newColumnId; + + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nonnull + private String newColumnName; + + public DynamicColumnCreateResult() { + } + + public DynamicColumnCreateResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public DynamicColumnCreateResult newColumnId(@javax.annotation.Nonnull UUID newColumnId) { + this.newColumnId = newColumnId; + return this; + } + + /** + * Get newColumnId + * @return newColumnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getNewColumnId() { + return newColumnId; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnId(@javax.annotation.Nonnull UUID newColumnId) { + this.newColumnId = newColumnId; + } + + + public DynamicColumnCreateResult newColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnName(@javax.annotation.Nonnull String newColumnName) { + this.newColumnName = newColumnName; + } + + + /** + * Return true if this DynamicColumnCreateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DynamicColumnCreateResult dynamicColumnCreateResult = (DynamicColumnCreateResult) o; + return Objects.equals(this.message, dynamicColumnCreateResult.message) && + Objects.equals(this.newColumnId, dynamicColumnCreateResult.newColumnId) && + Objects.equals(this.newColumnName, dynamicColumnCreateResult.newColumnName); + } + + @Override + public int hashCode() { + return Objects.hash(message, newColumnId, newColumnName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicColumnCreateResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" newColumnId: ").append(toIndentedString(newColumnId)).append("\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `new_column_id` to the URL query string + if (getNewColumnId() != null) { + joiner.add(String.format("%snew_column_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnId())))); + } + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResponse.java new file mode 100644 index 0000000..4589b11 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.DynamicColumnMessageResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DynamicColumnMessageResponse + */ +@JsonPropertyOrder({ + DynamicColumnMessageResponse.JSON_PROPERTY_STATUS, + DynamicColumnMessageResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DynamicColumnMessageResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private DynamicColumnMessageResult result; + + public DynamicColumnMessageResponse() { + } + + public DynamicColumnMessageResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public DynamicColumnMessageResponse result(@javax.annotation.Nonnull DynamicColumnMessageResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DynamicColumnMessageResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull DynamicColumnMessageResult result) { + this.result = result; + } + + + /** + * Return true if this DynamicColumnMessageResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DynamicColumnMessageResponse dynamicColumnMessageResponse = (DynamicColumnMessageResponse) o; + return Objects.equals(this.status, dynamicColumnMessageResponse.status) && + Objects.equals(this.result, dynamicColumnMessageResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicColumnMessageResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResult.java new file mode 100644 index 0000000..3304969 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/DynamicColumnMessageResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * DynamicColumnMessageResult + */ +@JsonPropertyOrder({ + DynamicColumnMessageResult.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class DynamicColumnMessageResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public DynamicColumnMessageResult() { + } + + public DynamicColumnMessageResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this DynamicColumnMessageResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DynamicColumnMessageResult dynamicColumnMessageResult = (DynamicColumnMessageResult) o; + return Objects.equals(this.message, dynamicColumnMessageResult.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicColumnMessageResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EditRunPromptColumn.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EditRunPromptColumn.java new file mode 100644 index 0000000..7293f2e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EditRunPromptColumn.java @@ -0,0 +1,283 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptConfig; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EditRunPromptColumn + */ +@JsonPropertyOrder({ + EditRunPromptColumn.JSON_PROPERTY_DATASET_ID, + EditRunPromptColumn.JSON_PROPERTY_COLUMN_ID, + EditRunPromptColumn.JSON_PROPERTY_NAME, + EditRunPromptColumn.JSON_PROPERTY_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EditRunPromptColumn { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private PromptConfig config; + + public EditRunPromptColumn() { + } + + public EditRunPromptColumn datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public EditRunPromptColumn columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public EditRunPromptColumn name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public EditRunPromptColumn config(@javax.annotation.Nullable PromptConfig config) { + this.config = config; + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PromptConfig getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable PromptConfig config) { + this.config = config; + } + + + /** + * Return true if this EditRunPromptColumn object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditRunPromptColumn editRunPromptColumn = (EditRunPromptColumn) o; + return Objects.equals(this.datasetId, editRunPromptColumn.datasetId) && + Objects.equals(this.columnId, editRunPromptColumn.columnId) && + equalsNullable(this.name, editRunPromptColumn.name) && + Objects.equals(this.config, editRunPromptColumn.config); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, columnId, hashCodeNullable(name), config); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EditRunPromptColumn {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + joiner.add(getConfig().toUrlQueryString(prefix + "config" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorLocalizerTaskResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorLocalizerTaskResponse.java new file mode 100644 index 0000000..3f773b7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorLocalizerTaskResponse.java @@ -0,0 +1,725 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ErrorLocalizerTaskResponse + */ +@JsonPropertyOrder({ + ErrorLocalizerTaskResponse.JSON_PROPERTY_TASK_ID, + ErrorLocalizerTaskResponse.JSON_PROPERTY_EVAL_CONFIG_ID, + ErrorLocalizerTaskResponse.JSON_PROPERTY_STATUS, + ErrorLocalizerTaskResponse.JSON_PROPERTY_EVAL_RESULT, + ErrorLocalizerTaskResponse.JSON_PROPERTY_EVAL_EXPLANATION, + ErrorLocalizerTaskResponse.JSON_PROPERTY_INPUT_DATA, + ErrorLocalizerTaskResponse.JSON_PROPERTY_INPUT_KEYS, + ErrorLocalizerTaskResponse.JSON_PROPERTY_INPUT_TYPES, + ErrorLocalizerTaskResponse.JSON_PROPERTY_RULE_PROMPT, + ErrorLocalizerTaskResponse.JSON_PROPERTY_ERROR_ANALYSIS, + ErrorLocalizerTaskResponse.JSON_PROPERTY_SELECTED_INPUT_KEY, + ErrorLocalizerTaskResponse.JSON_PROPERTY_ERROR_MESSAGE, + ErrorLocalizerTaskResponse.JSON_PROPERTY_CREATED_AT, + ErrorLocalizerTaskResponse.JSON_PROPERTY_UPDATED_AT, + ErrorLocalizerTaskResponse.JSON_PROPERTY_EVAL_TEMPLATE_NAME, + ErrorLocalizerTaskResponse.JSON_PROPERTY_EVAL_TEMPLATE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ErrorLocalizerTaskResponse { + public static final String JSON_PROPERTY_TASK_ID = "task_id"; + @javax.annotation.Nullable + private UUID taskId; + + public static final String JSON_PROPERTY_EVAL_CONFIG_ID = "eval_config_id"; + private JsonNullable evalConfigId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_EVAL_RESULT = "eval_result"; + @javax.annotation.Nullable + private Map evalResult = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_EXPLANATION = "eval_explanation"; + private JsonNullable evalExplanation = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INPUT_DATA = "input_data"; + @javax.annotation.Nullable + private Map inputData = new HashMap<>(); + + public static final String JSON_PROPERTY_INPUT_KEYS = "input_keys"; + @javax.annotation.Nullable + private Map inputKeys = new HashMap<>(); + + public static final String JSON_PROPERTY_INPUT_TYPES = "input_types"; + @javax.annotation.Nullable + private Map inputTypes = new HashMap<>(); + + public static final String JSON_PROPERTY_RULE_PROMPT = "rule_prompt"; + private JsonNullable rulePrompt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR_ANALYSIS = "error_analysis"; + @javax.annotation.Nullable + private Map errorAnalysis = new HashMap<>(); + + public static final String JSON_PROPERTY_SELECTED_INPUT_KEY = "selected_input_key"; + private JsonNullable selectedInputKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private JsonNullable errorMessage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private JsonNullable createdAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private JsonNullable updatedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_TEMPLATE_NAME = "eval_template_name"; + private JsonNullable evalTemplateName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_TEMPLATE_ID = "eval_template_id"; + private JsonNullable evalTemplateId = JsonNullable.undefined(); + + public ErrorLocalizerTaskResponse() { + } + + @JsonCreator + public ErrorLocalizerTaskResponse( + @JsonProperty(JSON_PROPERTY_TASK_ID) UUID taskId, + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_ID) String evalConfigId, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_EVAL_RESULT) Map evalResult, + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION) String evalExplanation, + @JsonProperty(JSON_PROPERTY_INPUT_DATA) Map inputData, + @JsonProperty(JSON_PROPERTY_INPUT_KEYS) Map inputKeys, + @JsonProperty(JSON_PROPERTY_INPUT_TYPES) Map inputTypes, + @JsonProperty(JSON_PROPERTY_RULE_PROMPT) String rulePrompt, + @JsonProperty(JSON_PROPERTY_ERROR_ANALYSIS) Map errorAnalysis, + @JsonProperty(JSON_PROPERTY_SELECTED_INPUT_KEY) String selectedInputKey, + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) String errorMessage, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_NAME) String evalTemplateName, + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) UUID evalTemplateId + ) { + this(); + this.taskId = taskId; + this.evalConfigId = evalConfigId == null ? JsonNullable.undefined() : JsonNullable.of(evalConfigId); + this.status = status; + this.evalResult = evalResult; + this.evalExplanation = evalExplanation == null ? JsonNullable.undefined() : JsonNullable.of(evalExplanation); + this.inputData = inputData; + this.inputKeys = inputKeys; + this.inputTypes = inputTypes; + this.rulePrompt = rulePrompt == null ? JsonNullable.undefined() : JsonNullable.of(rulePrompt); + this.errorAnalysis = errorAnalysis; + this.selectedInputKey = selectedInputKey == null ? JsonNullable.undefined() : JsonNullable.of(selectedInputKey); + this.errorMessage = errorMessage == null ? JsonNullable.undefined() : JsonNullable.of(errorMessage); + this.createdAt = createdAt == null ? JsonNullable.undefined() : JsonNullable.of(createdAt); + this.updatedAt = updatedAt == null ? JsonNullable.undefined() : JsonNullable.of(updatedAt); + this.evalTemplateName = evalTemplateName == null ? JsonNullable.undefined() : JsonNullable.of(evalTemplateName); + this.evalTemplateId = evalTemplateId == null ? JsonNullable.undefined() : JsonNullable.of(evalTemplateId); + } + + /** + * Get taskId + * @return taskId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TASK_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTaskId() { + return taskId; + } + + + + + /** + * Get evalConfigId + * @return evalConfigId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalConfigId() { + + if (evalConfigId == null) { + evalConfigId = JsonNullable.undefined(); + } + return evalConfigId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalConfigId_JsonNullable() { + return evalConfigId; + } + + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_ID) + private void setEvalConfigId_JsonNullable(JsonNullable evalConfigId) { + this.evalConfigId = evalConfigId; + } + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + /** + * Get evalResult + * @return evalResult + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_RESULT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvalResult() { + return evalResult; + } + + + + + /** + * Get evalExplanation + * @return evalExplanation + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalExplanation() { + + if (evalExplanation == null) { + evalExplanation = JsonNullable.undefined(); + } + return evalExplanation.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalExplanation_JsonNullable() { + return evalExplanation; + } + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION) + private void setEvalExplanation_JsonNullable(JsonNullable evalExplanation) { + this.evalExplanation = evalExplanation; + } + + + + /** + * Get inputData + * @return inputData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInputData() { + return inputData; + } + + + + + /** + * Get inputKeys + * @return inputKeys + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_KEYS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInputKeys() { + return inputKeys; + } + + + + + /** + * Get inputTypes + * @return inputTypes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_TYPES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInputTypes() { + return inputTypes; + } + + + + + /** + * Get rulePrompt + * @return rulePrompt + */ + @javax.annotation.Nullable + @JsonIgnore + public String getRulePrompt() { + + if (rulePrompt == null) { + rulePrompt = JsonNullable.undefined(); + } + return rulePrompt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RULE_PROMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRulePrompt_JsonNullable() { + return rulePrompt; + } + + @JsonProperty(JSON_PROPERTY_RULE_PROMPT) + private void setRulePrompt_JsonNullable(JsonNullable rulePrompt) { + this.rulePrompt = rulePrompt; + } + + + + /** + * Get errorAnalysis + * @return errorAnalysis + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_ANALYSIS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getErrorAnalysis() { + return errorAnalysis; + } + + + + + /** + * Get selectedInputKey + * @return selectedInputKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSelectedInputKey() { + + if (selectedInputKey == null) { + selectedInputKey = JsonNullable.undefined(); + } + return selectedInputKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SELECTED_INPUT_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSelectedInputKey_JsonNullable() { + return selectedInputKey; + } + + @JsonProperty(JSON_PROPERTY_SELECTED_INPUT_KEY) + private void setSelectedInputKey_JsonNullable(JsonNullable selectedInputKey) { + this.selectedInputKey = selectedInputKey; + } + + + + /** + * Get errorMessage + * @return errorMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getErrorMessage() { + + if (errorMessage == null) { + errorMessage = JsonNullable.undefined(); + } + return errorMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getErrorMessage_JsonNullable() { + return errorMessage; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + private void setErrorMessage_JsonNullable(JsonNullable errorMessage) { + this.errorMessage = errorMessage; + } + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCreatedAt() { + + if (createdAt == null) { + createdAt = JsonNullable.undefined(); + } + return createdAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCreatedAt_JsonNullable() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + private void setCreatedAt_JsonNullable(JsonNullable createdAt) { + this.createdAt = createdAt; + } + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getUpdatedAt() { + + if (updatedAt == null) { + updatedAt = JsonNullable.undefined(); + } + return updatedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUpdatedAt_JsonNullable() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + private void setUpdatedAt_JsonNullable(JsonNullable updatedAt) { + this.updatedAt = updatedAt; + } + + + + /** + * Get evalTemplateName + * @return evalTemplateName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalTemplateName() { + + if (evalTemplateName == null) { + evalTemplateName = JsonNullable.undefined(); + } + return evalTemplateName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalTemplateName_JsonNullable() { + return evalTemplateName; + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_NAME) + private void setEvalTemplateName_JsonNullable(JsonNullable evalTemplateName) { + this.evalTemplateName = evalTemplateName; + } + + + + /** + * Get evalTemplateId + * @return evalTemplateId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getEvalTemplateId() { + + if (evalTemplateId == null) { + evalTemplateId = JsonNullable.undefined(); + } + return evalTemplateId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalTemplateId_JsonNullable() { + return evalTemplateId; + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + private void setEvalTemplateId_JsonNullable(JsonNullable evalTemplateId) { + this.evalTemplateId = evalTemplateId; + } + + + + /** + * Return true if this ErrorLocalizerTaskResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorLocalizerTaskResponse errorLocalizerTaskResponse = (ErrorLocalizerTaskResponse) o; + return Objects.equals(this.taskId, errorLocalizerTaskResponse.taskId) && + equalsNullable(this.evalConfigId, errorLocalizerTaskResponse.evalConfigId) && + Objects.equals(this.status, errorLocalizerTaskResponse.status) && + Objects.equals(this.evalResult, errorLocalizerTaskResponse.evalResult) && + equalsNullable(this.evalExplanation, errorLocalizerTaskResponse.evalExplanation) && + Objects.equals(this.inputData, errorLocalizerTaskResponse.inputData) && + Objects.equals(this.inputKeys, errorLocalizerTaskResponse.inputKeys) && + Objects.equals(this.inputTypes, errorLocalizerTaskResponse.inputTypes) && + equalsNullable(this.rulePrompt, errorLocalizerTaskResponse.rulePrompt) && + Objects.equals(this.errorAnalysis, errorLocalizerTaskResponse.errorAnalysis) && + equalsNullable(this.selectedInputKey, errorLocalizerTaskResponse.selectedInputKey) && + equalsNullable(this.errorMessage, errorLocalizerTaskResponse.errorMessage) && + equalsNullable(this.createdAt, errorLocalizerTaskResponse.createdAt) && + equalsNullable(this.updatedAt, errorLocalizerTaskResponse.updatedAt) && + equalsNullable(this.evalTemplateName, errorLocalizerTaskResponse.evalTemplateName) && + equalsNullable(this.evalTemplateId, errorLocalizerTaskResponse.evalTemplateId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(taskId, hashCodeNullable(evalConfigId), status, evalResult, hashCodeNullable(evalExplanation), inputData, inputKeys, inputTypes, hashCodeNullable(rulePrompt), errorAnalysis, hashCodeNullable(selectedInputKey), hashCodeNullable(errorMessage), hashCodeNullable(createdAt), hashCodeNullable(updatedAt), hashCodeNullable(evalTemplateName), hashCodeNullable(evalTemplateId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorLocalizerTaskResponse {\n"); + sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); + sb.append(" evalConfigId: ").append(toIndentedString(evalConfigId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" evalResult: ").append(toIndentedString(evalResult)).append("\n"); + sb.append(" evalExplanation: ").append(toIndentedString(evalExplanation)).append("\n"); + sb.append(" inputData: ").append(toIndentedString(inputData)).append("\n"); + sb.append(" inputKeys: ").append(toIndentedString(inputKeys)).append("\n"); + sb.append(" inputTypes: ").append(toIndentedString(inputTypes)).append("\n"); + sb.append(" rulePrompt: ").append(toIndentedString(rulePrompt)).append("\n"); + sb.append(" errorAnalysis: ").append(toIndentedString(errorAnalysis)).append("\n"); + sb.append(" selectedInputKey: ").append(toIndentedString(selectedInputKey)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" evalTemplateName: ").append(toIndentedString(evalTemplateName)).append("\n"); + sb.append(" evalTemplateId: ").append(toIndentedString(evalTemplateId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `task_id` to the URL query string + if (getTaskId() != null) { + joiner.add(String.format("%stask_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTaskId())))); + } + + // add `eval_config_id` to the URL query string + if (getEvalConfigId() != null) { + joiner.add(String.format("%seval_config_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalConfigId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `eval_result` to the URL query string + if (getEvalResult() != null) { + for (String _key : getEvalResult().keySet()) { + joiner.add(String.format("%seval_result%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalResult().get(_key))))); + } + } + + // add `eval_explanation` to the URL query string + if (getEvalExplanation() != null) { + joiner.add(String.format("%seval_explanation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalExplanation())))); + } + + // add `input_data` to the URL query string + if (getInputData() != null) { + for (String _key : getInputData().keySet()) { + joiner.add(String.format("%sinput_data%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputData().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputData().get(_key))))); + } + } + + // add `input_keys` to the URL query string + if (getInputKeys() != null) { + for (String _key : getInputKeys().keySet()) { + joiner.add(String.format("%sinput_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputKeys().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputKeys().get(_key))))); + } + } + + // add `input_types` to the URL query string + if (getInputTypes() != null) { + for (String _key : getInputTypes().keySet()) { + joiner.add(String.format("%sinput_types%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputTypes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputTypes().get(_key))))); + } + } + + // add `rule_prompt` to the URL query string + if (getRulePrompt() != null) { + joiner.add(String.format("%srule_prompt%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRulePrompt())))); + } + + // add `error_analysis` to the URL query string + if (getErrorAnalysis() != null) { + for (String _key : getErrorAnalysis().keySet()) { + joiner.add(String.format("%serror_analysis%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getErrorAnalysis().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getErrorAnalysis().get(_key))))); + } + } + + // add `selected_input_key` to the URL query string + if (getSelectedInputKey() != null) { + joiner.add(String.format("%sselected_input_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectedInputKey())))); + } + + // add `error_message` to the URL query string + if (getErrorMessage() != null) { + joiner.add(String.format("%serror_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorMessage())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `eval_template_name` to the URL query string + if (getEvalTemplateName() != null) { + joiner.add(String.format("%seval_template_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplateName())))); + } + + // add `eval_template_id` to the URL query string + if (getEvalTemplateId() != null) { + joiner.add(String.format("%seval_template_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplateId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorName.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorName.java new file mode 100644 index 0000000..c77e771 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorName.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ErrorName + */ +@JsonPropertyOrder({ + ErrorName.JSON_PROPERTY_NAME, + ErrorName.JSON_PROPERTY_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ErrorName { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private String type; + + public ErrorName() { + } + + public ErrorName name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ErrorName type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + /** + * Return true if this ErrorName object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorName errorName = (ErrorName) o; + return Objects.equals(this.name, errorName.name) && + Objects.equals(this.type, errorName.type); + } + + @Override + public int hashCode() { + return Objects.hash(name, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorName {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorResponse.java new file mode 100644 index 0000000..0411cae --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ErrorResponse + */ +@JsonPropertyOrder({ + ErrorResponse.JSON_PROPERTY_STATUS, + ErrorResponse.JSON_PROPERTY_TYPE, + ErrorResponse.JSON_PROPERTY_CODE, + ErrorResponse.JSON_PROPERTY_DETAIL, + ErrorResponse.JSON_PROPERTY_RESULT, + ErrorResponse.JSON_PROPERTY_MESSAGE, + ErrorResponse.JSON_PROPERTY_ERROR, + ErrorResponse.JSON_PROPERTY_ATTR, + ErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ErrorResponse() { + } + + public ErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.status, errorResponse.status) && + equalsNullable(this.type, errorResponse.type) && + equalsNullable(this.code, errorResponse.code) && + equalsNullable(this.detail, errorResponse.detail) && + equalsNullable(this.result, errorResponse.result) && + equalsNullable(this.message, errorResponse.message) && + equalsNullable(this.error, errorResponse.error) && + equalsNullable(this.attr, errorResponse.attr) && + Objects.equals(this.details, errorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigDefinition.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigDefinition.java new file mode 100644 index 0000000..73d1828 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigDefinition.java @@ -0,0 +1,518 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInner; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalConfigDefinition + */ +@JsonPropertyOrder({ + EvalConfigDefinition.JSON_PROPERTY_TEMPLATE_ID, + EvalConfigDefinition.JSON_PROPERTY_NAME, + EvalConfigDefinition.JSON_PROPERTY_CONFIG, + EvalConfigDefinition.JSON_PROPERTY_MAPPING, + EvalConfigDefinition.JSON_PROPERTY_FILTERS, + EvalConfigDefinition.JSON_PROPERTY_ERROR_LOCALIZER, + EvalConfigDefinition.JSON_PROPERTY_MODEL, + EvalConfigDefinition.JSON_PROPERTY_KB_ID, + EvalConfigDefinition.JSON_PROPERTY_EVAL_GROUP +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalConfigDefinition { + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nullable + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private List filters = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + private JsonNullable kbId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_GROUP = "eval_group"; + private JsonNullable evalGroup = JsonNullable.undefined(); + + public EvalConfigDefinition() { + } + + public EvalConfigDefinition templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * UUID of the evaluation template to use. + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public EvalConfigDefinition name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name for this evaluation configuration. Defaults to 'Eval-<template_id>' if omitted. + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public EvalConfigDefinition config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public EvalConfigDefinition putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Template-specific configuration parameters. + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public EvalConfigDefinition mapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + return this; + } + + public EvalConfigDefinition putMappingItem(String key, Object mappingItem) { + if (this.mapping == null) { + this.mapping = new HashMap<>(); + } + this.mapping.put(key, mappingItem); + return this; + } + + /** + * Maps test execution data fields to the evaluation template's expected inputs. + * @return mapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapping() { + return mapping; + } + + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + } + + + public EvalConfigDefinition filters(@javax.annotation.Nullable List filters) { + this.filters = filters; + return this; + } + + public EvalConfigDefinition addFiltersItem(AutomationRuleConditionsFilterInner filtersItem) { + if (this.filters == null) { + this.filters = new ArrayList<>(); + } + this.filters.add(filtersItem); + return this; + } + + /** + * Canonical filter list to restrict which test results are evaluated. + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } + + + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilters(@javax.annotation.Nullable List filters) { + this.filters = filters; + } + + + public EvalConfigDefinition errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Enables granular error localization on evaluation failures. + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public EvalConfigDefinition model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Model to use for running this evaluation. + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public EvalConfigDefinition kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + return this; + } + + /** + * Knowledge base file to use for this evaluation. + * @return kbId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKbId() { + return kbId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKbId_JsonNullable() { + return kbId; + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + public void setKbId_JsonNullable(JsonNullable kbId) { + this.kbId = kbId; + } + + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + } + + + public EvalConfigDefinition evalGroup(@javax.annotation.Nullable UUID evalGroup) { + this.evalGroup = JsonNullable.of(evalGroup); + return this; + } + + /** + * Eval group that created this evaluation config. + * @return evalGroup + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getEvalGroup() { + return evalGroup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalGroup_JsonNullable() { + return evalGroup; + } + + @JsonProperty(JSON_PROPERTY_EVAL_GROUP) + public void setEvalGroup_JsonNullable(JsonNullable evalGroup) { + this.evalGroup = evalGroup; + } + + public void setEvalGroup(@javax.annotation.Nullable UUID evalGroup) { + this.evalGroup = JsonNullable.of(evalGroup); + } + + + /** + * Return true if this EvalConfigDefinition object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalConfigDefinition evalConfigDefinition = (EvalConfigDefinition) o; + return Objects.equals(this.templateId, evalConfigDefinition.templateId) && + Objects.equals(this.name, evalConfigDefinition.name) && + Objects.equals(this.config, evalConfigDefinition.config) && + Objects.equals(this.mapping, evalConfigDefinition.mapping) && + Objects.equals(this.filters, evalConfigDefinition.filters) && + Objects.equals(this.errorLocalizer, evalConfigDefinition.errorLocalizer) && + equalsNullable(this.model, evalConfigDefinition.model) && + equalsNullable(this.kbId, evalConfigDefinition.kbId) && + equalsNullable(this.evalGroup, evalConfigDefinition.evalGroup); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(templateId, name, config, mapping, filters, errorLocalizer, hashCodeNullable(model), hashCodeNullable(kbId), hashCodeNullable(evalGroup)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalConfigDefinition {\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" evalGroup: ").append(toIndentedString(evalGroup)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `filters` to the URL query string + if (getFilters() != null) { + for (int i = 0; i < getFilters().size(); i++) { + if (getFilters().get(i) != null) { + joiner.add(getFilters().get(i).toUrlQueryString(String.format("%sfilters%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `eval_group` to the URL query string + if (getEvalGroup() != null) { + joiner.add(String.format("%seval_group%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalGroup())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigResponse.java new file mode 100644 index 0000000..a140acd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigResponse.java @@ -0,0 +1,631 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalConfigResponse + */ +@JsonPropertyOrder({ + EvalConfigResponse.JSON_PROPERTY_ID, + EvalConfigResponse.JSON_PROPERTY_NAME, + EvalConfigResponse.JSON_PROPERTY_CONFIG, + EvalConfigResponse.JSON_PROPERTY_MAPPING, + EvalConfigResponse.JSON_PROPERTY_FILTERS, + EvalConfigResponse.JSON_PROPERTY_ERROR_LOCALIZER, + EvalConfigResponse.JSON_PROPERTY_MODEL, + EvalConfigResponse.JSON_PROPERTY_STATUS, + EvalConfigResponse.JSON_PROPERTY_EVAL_GROUP, + EvalConfigResponse.JSON_PROPERTY_TEMPLATE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalConfigResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nullable + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private Map filters = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer; + + /** + * Gets or Sets model + */ + public enum ModelEnum { + TURING_LARGE(String.valueOf("turing_large")), + + TURING_SMALL(String.valueOf("turing_small")), + + PROTECT(String.valueOf("protect")), + + PROTECT_FLASH(String.valueOf("protect_flash")), + + TURING_FLASH(String.valueOf("turing_flash")); + + private String value; + + ModelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModelEnum fromValue(String value) { + for (ModelEnum b : ModelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + /** + * Gets or Sets status + */ + public enum StatusEnum { + NOT_STARTED(String.valueOf("NotStarted")), + + QUEUED(String.valueOf("Queued")), + + RUNNING(String.valueOf("Running")), + + COMPLETED(String.valueOf("Completed")), + + EDITING(String.valueOf("Editing")), + + INACTIVE(String.valueOf("Inactive")), + + FAILED(String.valueOf("Failed")), + + PARTIAL_RUN(String.valueOf("PartialRun")), + + EXPERIMENT_EVALUATION(String.valueOf("ExperimentEvaluation")), + + UPLOADING(String.valueOf("Uploading")), + + PARTIAL_EXTRACTED(String.valueOf("PartialExtracted")), + + PROCESSING(String.valueOf("Processing")), + + DELETING(String.valueOf("Deleting")), + + PARTIAL_COMPLETED(String.valueOf("PartialCompleted")), + + OPTIMIZATION_EVALUATION(String.valueOf("OptimizationEvaluation")), + + ERROR(String.valueOf("Error")), + + CANCELLED(String.valueOf("Cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_EVAL_GROUP = "eval_group"; + @javax.annotation.Nullable + private String evalGroup; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nullable + private UUID templateId; + + public EvalConfigResponse() { + } + + @JsonCreator + public EvalConfigResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_EVAL_GROUP) String evalGroup, + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) UUID templateId + ) { + this(); + this.id = id; + this.evalGroup = evalGroup; + this.templateId = templateId; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public EvalConfigResponse name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public EvalConfigResponse config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public EvalConfigResponse putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public EvalConfigResponse mapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + return this; + } + + public EvalConfigResponse putMappingItem(String key, Object mappingItem) { + if (this.mapping == null) { + this.mapping = new HashMap<>(); + } + this.mapping.put(key, mappingItem); + return this; + } + + /** + * Get mapping + * @return mapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapping() { + return mapping; + } + + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + } + + + public EvalConfigResponse filters(@javax.annotation.Nullable Map filters) { + this.filters = filters; + return this; + } + + public EvalConfigResponse putFiltersItem(String key, Object filtersItem) { + if (this.filters == null) { + this.filters = new HashMap<>(); + } + this.filters.put(key, filtersItem); + return this; + } + + /** + * Get filters + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFilters() { + return filters; + } + + + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setFilters(@javax.annotation.Nullable Map filters) { + this.filters = filters; + } + + + public EvalConfigResponse errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public EvalConfigResponse model(@javax.annotation.Nullable ModelEnum model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public ModelEnum getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable ModelEnum model) { + this.model = JsonNullable.of(model); + } + + + public EvalConfigResponse status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + /** + * Get evalGroup + * @return evalGroup + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalGroup() { + return evalGroup; + } + + + + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTemplateId() { + return templateId; + } + + + + + /** + * Return true if this EvalConfigResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalConfigResponse evalConfigResponse = (EvalConfigResponse) o; + return Objects.equals(this.id, evalConfigResponse.id) && + equalsNullable(this.name, evalConfigResponse.name) && + Objects.equals(this.config, evalConfigResponse.config) && + Objects.equals(this.mapping, evalConfigResponse.mapping) && + Objects.equals(this.filters, evalConfigResponse.filters) && + Objects.equals(this.errorLocalizer, evalConfigResponse.errorLocalizer) && + equalsNullable(this.model, evalConfigResponse.model) && + Objects.equals(this.status, evalConfigResponse.status) && + Objects.equals(this.evalGroup, evalConfigResponse.evalGroup) && + Objects.equals(this.templateId, evalConfigResponse.templateId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(name), config, mapping, filters, errorLocalizer, hashCodeNullable(model), status, evalGroup, templateId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalConfigResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" evalGroup: ").append(toIndentedString(evalGroup)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `filters` to the URL query string + if (getFilters() != null) { + for (String _key : getFilters().keySet()) { + joiner.add(String.format("%sfilters%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFilters().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFilters().get(_key))))); + } + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `eval_group` to the URL query string + if (getEvalGroup() != null) { + joiner.add(String.format("%seval_group%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalGroup())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructure.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructure.java new file mode 100644 index 0000000..87c491a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructure.java @@ -0,0 +1,907 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalConfigStructure + */ +@JsonPropertyOrder({ + EvalConfigStructure.JSON_PROPERTY_ID, + EvalConfigStructure.JSON_PROPERTY_TEMPLATE_ID, + EvalConfigStructure.JSON_PROPERTY_NAME, + EvalConfigStructure.JSON_PROPERTY_REASON_COLUMN, + EvalConfigStructure.JSON_PROPERTY_EVAL_TAGS, + EvalConfigStructure.JSON_PROPERTY_DESCRIPTION, + EvalConfigStructure.JSON_PROPERTY_REQUIRED_KEYS, + EvalConfigStructure.JSON_PROPERTY_OPTIONAL_KEYS, + EvalConfigStructure.JSON_PROPERTY_VARIABLE_KEYS, + EvalConfigStructure.JSON_PROPERTY_RUN_PROMPT_COLUMN, + EvalConfigStructure.JSON_PROPERTY_TEMPLATE_NAME, + EvalConfigStructure.JSON_PROPERTY_MAPPING, + EvalConfigStructure.JSON_PROPERTY_CONFIG, + EvalConfigStructure.JSON_PROPERTY_PARAMS, + EvalConfigStructure.JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA, + EvalConfigStructure.JSON_PROPERTY_MODELS, + EvalConfigStructure.JSON_PROPERTY_SELECTED_MODEL, + EvalConfigStructure.JSON_PROPERTY_ERROR_LOCALIZER, + EvalConfigStructure.JSON_PROPERTY_KB_ID, + EvalConfigStructure.JSON_PROPERTY_OUTPUT, + EvalConfigStructure.JSON_PROPERTY_CONFIG_PARAMS_DESC, + EvalConfigStructure.JSON_PROPERTY_CONFIG_PARAMS_OPTION, + EvalConfigStructure.JSON_PROPERTY_API_KEY_AVAILABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalConfigStructure { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nullable + private UUID templateId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_REASON_COLUMN = "reason_column"; + @javax.annotation.Nullable + private Boolean reasonColumn; + + public static final String JSON_PROPERTY_EVAL_TAGS = "eval_tags"; + @javax.annotation.Nullable + private Map evalTags = new HashMap<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_REQUIRED_KEYS = "required_keys"; + @javax.annotation.Nonnull + private List requiredKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_OPTIONAL_KEYS = "optional_keys"; + @javax.annotation.Nonnull + private List optionalKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_VARIABLE_KEYS = "variable_keys"; + @javax.annotation.Nonnull + private List variableKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_RUN_PROMPT_COLUMN = "run_prompt_column"; + @javax.annotation.Nullable + private Boolean runPromptColumn; + + public static final String JSON_PROPERTY_TEMPLATE_NAME = "template_name"; + @javax.annotation.Nullable + private String templateName; + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nullable + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_PARAMS = "params"; + @javax.annotation.Nullable + private Map params = new HashMap<>(); + + public static final String JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA = "function_params_schema"; + @javax.annotation.Nullable + private Map functionParamsSchema = new HashMap<>(); + + public static final String JSON_PROPERTY_MODELS = "models"; + @javax.annotation.Nullable + private Map models = new HashMap<>(); + + public static final String JSON_PROPERTY_SELECTED_MODEL = "selected_model"; + private JsonNullable selectedModel = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer; + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + private JsonNullable kbId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private Map output = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG_PARAMS_DESC = "config_params_desc"; + @javax.annotation.Nullable + private Map configParamsDesc = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG_PARAMS_OPTION = "config_params_option"; + @javax.annotation.Nullable + private Map configParamsOption = new HashMap<>(); + + public static final String JSON_PROPERTY_API_KEY_AVAILABLE = "api_key_available"; + @javax.annotation.Nullable + private Boolean apiKeyAvailable; + + public EvalConfigStructure() { + } + + @JsonCreator + public EvalConfigStructure( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) UUID templateId, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_REASON_COLUMN) Boolean reasonColumn, + @JsonProperty(JSON_PROPERTY_EVAL_TAGS) Map evalTags, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_RUN_PROMPT_COLUMN) Boolean runPromptColumn, + @JsonProperty(JSON_PROPERTY_TEMPLATE_NAME) String templateName, + @JsonProperty(JSON_PROPERTY_MAPPING) Map mapping, + @JsonProperty(JSON_PROPERTY_CONFIG) Map config, + @JsonProperty(JSON_PROPERTY_PARAMS) Map params, + @JsonProperty(JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA) Map functionParamsSchema, + @JsonProperty(JSON_PROPERTY_MODELS) Map models, + @JsonProperty(JSON_PROPERTY_SELECTED_MODEL) String selectedModel, + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) Boolean errorLocalizer, + @JsonProperty(JSON_PROPERTY_KB_ID) UUID kbId, + @JsonProperty(JSON_PROPERTY_OUTPUT) Map output, + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_DESC) Map configParamsDesc, + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_OPTION) Map configParamsOption, + @JsonProperty(JSON_PROPERTY_API_KEY_AVAILABLE) Boolean apiKeyAvailable + ) { + this(); + this.id = id; + this.templateId = templateId; + this.name = name; + this.reasonColumn = reasonColumn; + this.evalTags = evalTags; + this.description = description; + this.runPromptColumn = runPromptColumn; + this.templateName = templateName; + this.mapping = mapping; + this.config = config; + this.params = params; + this.functionParamsSchema = functionParamsSchema; + this.models = models; + this.selectedModel = selectedModel == null ? JsonNullable.undefined() : JsonNullable.of(selectedModel); + this.errorLocalizer = errorLocalizer; + this.kbId = kbId == null ? JsonNullable.undefined() : JsonNullable.of(kbId); + this.output = output; + this.configParamsDesc = configParamsDesc; + this.configParamsOption = configParamsOption; + this.apiKeyAvailable = apiKeyAvailable; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTemplateId() { + return templateId; + } + + + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Get reasonColumn + * @return reasonColumn + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getReasonColumn() { + return reasonColumn; + } + + + + + /** + * Get evalTags + * @return evalTags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TAGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvalTags() { + return evalTags; + } + + + + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + + + public EvalConfigStructure requiredKeys(@javax.annotation.Nonnull List requiredKeys) { + this.requiredKeys = requiredKeys; + return this; + } + + public EvalConfigStructure addRequiredKeysItem(String requiredKeysItem) { + if (this.requiredKeys == null) { + this.requiredKeys = new ArrayList<>(); + } + this.requiredKeys.add(requiredKeysItem); + return this; + } + + /** + * Get requiredKeys + * @return requiredKeys + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRequiredKeys() { + return requiredKeys; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequiredKeys(@javax.annotation.Nonnull List requiredKeys) { + this.requiredKeys = requiredKeys; + } + + + public EvalConfigStructure optionalKeys(@javax.annotation.Nonnull List optionalKeys) { + this.optionalKeys = optionalKeys; + return this; + } + + public EvalConfigStructure addOptionalKeysItem(String optionalKeysItem) { + if (this.optionalKeys == null) { + this.optionalKeys = new ArrayList<>(); + } + this.optionalKeys.add(optionalKeysItem); + return this; + } + + /** + * Get optionalKeys + * @return optionalKeys + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPTIONAL_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getOptionalKeys() { + return optionalKeys; + } + + + @JsonProperty(JSON_PROPERTY_OPTIONAL_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOptionalKeys(@javax.annotation.Nonnull List optionalKeys) { + this.optionalKeys = optionalKeys; + } + + + public EvalConfigStructure variableKeys(@javax.annotation.Nonnull List variableKeys) { + this.variableKeys = variableKeys; + return this; + } + + public EvalConfigStructure addVariableKeysItem(String variableKeysItem) { + if (this.variableKeys == null) { + this.variableKeys = new ArrayList<>(); + } + this.variableKeys.add(variableKeysItem); + return this; + } + + /** + * Get variableKeys + * @return variableKeys + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VARIABLE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVariableKeys() { + return variableKeys; + } + + + @JsonProperty(JSON_PROPERTY_VARIABLE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVariableKeys(@javax.annotation.Nonnull List variableKeys) { + this.variableKeys = variableKeys; + } + + + /** + * Get runPromptColumn + * @return runPromptColumn + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_PROMPT_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRunPromptColumn() { + return runPromptColumn; + } + + + + + /** + * Get templateName + * @return templateName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplateName() { + return templateName; + } + + + + + /** + * Get mapping + * @return mapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapping() { + return mapping; + } + + + + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + + + /** + * Get params + * @return params + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getParams() { + return params; + } + + + + + /** + * Get functionParamsSchema + * @return functionParamsSchema + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFunctionParamsSchema() { + return functionParamsSchema; + } + + + + + /** + * Get models + * @return models + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModels() { + return models; + } + + + + + /** + * Get selectedModel + * @return selectedModel + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSelectedModel() { + + if (selectedModel == null) { + selectedModel = JsonNullable.undefined(); + } + return selectedModel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SELECTED_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSelectedModel_JsonNullable() { + return selectedModel; + } + + @JsonProperty(JSON_PROPERTY_SELECTED_MODEL) + private void setSelectedModel_JsonNullable(JsonNullable selectedModel) { + this.selectedModel = selectedModel; + } + + + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKbId() { + + if (kbId == null) { + kbId = JsonNullable.undefined(); + } + return kbId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKbId_JsonNullable() { + return kbId; + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + private void setKbId_JsonNullable(JsonNullable kbId) { + this.kbId = kbId; + } + + + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOutput() { + return output; + } + + + + + /** + * Get configParamsDesc + * @return configParamsDesc + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_DESC) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigParamsDesc() { + return configParamsDesc; + } + + + + + /** + * Get configParamsOption + * @return configParamsOption + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_OPTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigParamsOption() { + return configParamsOption; + } + + + + + /** + * Get apiKeyAvailable + * @return apiKeyAvailable + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApiKeyAvailable() { + return apiKeyAvailable; + } + + + + + /** + * Return true if this EvalConfigStructure object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalConfigStructure evalConfigStructure = (EvalConfigStructure) o; + return Objects.equals(this.id, evalConfigStructure.id) && + Objects.equals(this.templateId, evalConfigStructure.templateId) && + Objects.equals(this.name, evalConfigStructure.name) && + Objects.equals(this.reasonColumn, evalConfigStructure.reasonColumn) && + Objects.equals(this.evalTags, evalConfigStructure.evalTags) && + Objects.equals(this.description, evalConfigStructure.description) && + Objects.equals(this.requiredKeys, evalConfigStructure.requiredKeys) && + Objects.equals(this.optionalKeys, evalConfigStructure.optionalKeys) && + Objects.equals(this.variableKeys, evalConfigStructure.variableKeys) && + Objects.equals(this.runPromptColumn, evalConfigStructure.runPromptColumn) && + Objects.equals(this.templateName, evalConfigStructure.templateName) && + Objects.equals(this.mapping, evalConfigStructure.mapping) && + Objects.equals(this.config, evalConfigStructure.config) && + Objects.equals(this.params, evalConfigStructure.params) && + Objects.equals(this.functionParamsSchema, evalConfigStructure.functionParamsSchema) && + Objects.equals(this.models, evalConfigStructure.models) && + equalsNullable(this.selectedModel, evalConfigStructure.selectedModel) && + Objects.equals(this.errorLocalizer, evalConfigStructure.errorLocalizer) && + equalsNullable(this.kbId, evalConfigStructure.kbId) && + Objects.equals(this.output, evalConfigStructure.output) && + Objects.equals(this.configParamsDesc, evalConfigStructure.configParamsDesc) && + Objects.equals(this.configParamsOption, evalConfigStructure.configParamsOption) && + Objects.equals(this.apiKeyAvailable, evalConfigStructure.apiKeyAvailable); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, templateId, name, reasonColumn, evalTags, description, requiredKeys, optionalKeys, variableKeys, runPromptColumn, templateName, mapping, config, params, functionParamsSchema, models, hashCodeNullable(selectedModel), errorLocalizer, hashCodeNullable(kbId), output, configParamsDesc, configParamsOption, apiKeyAvailable); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalConfigStructure {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" reasonColumn: ").append(toIndentedString(reasonColumn)).append("\n"); + sb.append(" evalTags: ").append(toIndentedString(evalTags)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" requiredKeys: ").append(toIndentedString(requiredKeys)).append("\n"); + sb.append(" optionalKeys: ").append(toIndentedString(optionalKeys)).append("\n"); + sb.append(" variableKeys: ").append(toIndentedString(variableKeys)).append("\n"); + sb.append(" runPromptColumn: ").append(toIndentedString(runPromptColumn)).append("\n"); + sb.append(" templateName: ").append(toIndentedString(templateName)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append(" functionParamsSchema: ").append(toIndentedString(functionParamsSchema)).append("\n"); + sb.append(" models: ").append(toIndentedString(models)).append("\n"); + sb.append(" selectedModel: ").append(toIndentedString(selectedModel)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" configParamsDesc: ").append(toIndentedString(configParamsDesc)).append("\n"); + sb.append(" configParamsOption: ").append(toIndentedString(configParamsOption)).append("\n"); + sb.append(" apiKeyAvailable: ").append(toIndentedString(apiKeyAvailable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `reason_column` to the URL query string + if (getReasonColumn() != null) { + joiner.add(String.format("%sreason_column%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReasonColumn())))); + } + + // add `eval_tags` to the URL query string + if (getEvalTags() != null) { + for (String _key : getEvalTags().keySet()) { + joiner.add(String.format("%seval_tags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalTags().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalTags().get(_key))))); + } + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `required_keys` to the URL query string + if (getRequiredKeys() != null) { + for (int i = 0; i < getRequiredKeys().size(); i++) { + joiner.add(String.format("%srequired_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRequiredKeys().get(i))))); + } + } + + // add `optional_keys` to the URL query string + if (getOptionalKeys() != null) { + for (int i = 0; i < getOptionalKeys().size(); i++) { + joiner.add(String.format("%soptional_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getOptionalKeys().get(i))))); + } + } + + // add `variable_keys` to the URL query string + if (getVariableKeys() != null) { + for (int i = 0; i < getVariableKeys().size(); i++) { + joiner.add(String.format("%svariable_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getVariableKeys().get(i))))); + } + } + + // add `run_prompt_column` to the URL query string + if (getRunPromptColumn() != null) { + joiner.add(String.format("%srun_prompt_column%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunPromptColumn())))); + } + + // add `template_name` to the URL query string + if (getTemplateName() != null) { + joiner.add(String.format("%stemplate_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateName())))); + } + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `params` to the URL query string + if (getParams() != null) { + for (String _key : getParams().keySet()) { + joiner.add(String.format("%sparams%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getParams().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getParams().get(_key))))); + } + } + + // add `function_params_schema` to the URL query string + if (getFunctionParamsSchema() != null) { + for (String _key : getFunctionParamsSchema().keySet()) { + joiner.add(String.format("%sfunction_params_schema%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFunctionParamsSchema().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFunctionParamsSchema().get(_key))))); + } + } + + // add `models` to the URL query string + if (getModels() != null) { + for (String _key : getModels().keySet()) { + joiner.add(String.format("%smodels%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModels().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModels().get(_key))))); + } + } + + // add `selected_model` to the URL query string + if (getSelectedModel() != null) { + joiner.add(String.format("%sselected_model%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectedModel())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + // add `config_params_desc` to the URL query string + if (getConfigParamsDesc() != null) { + for (String _key : getConfigParamsDesc().keySet()) { + joiner.add(String.format("%sconfig_params_desc%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigParamsDesc().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigParamsDesc().get(_key))))); + } + } + + // add `config_params_option` to the URL query string + if (getConfigParamsOption() != null) { + for (String _key : getConfigParamsOption().keySet()) { + joiner.add(String.format("%sconfig_params_option%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigParamsOption().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigParamsOption().get(_key))))); + } + } + + // add `api_key_available` to the URL query string + if (getApiKeyAvailable() != null) { + joiner.add(String.format("%sapi_key_available%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApiKeyAvailable())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResponse.java new file mode 100644 index 0000000..f1a0aa2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalConfigStructureResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalConfigStructureResponse + */ +@JsonPropertyOrder({ + EvalConfigStructureResponse.JSON_PROPERTY_STATUS, + EvalConfigStructureResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalConfigStructureResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalConfigStructureResult result; + + public EvalConfigStructureResponse() { + } + + public EvalConfigStructureResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public EvalConfigStructureResponse result(@javax.annotation.Nonnull EvalConfigStructureResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalConfigStructureResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalConfigStructureResult result) { + this.result = result; + } + + + /** + * Return true if this EvalConfigStructureResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalConfigStructureResponse evalConfigStructureResponse = (EvalConfigStructureResponse) o; + return Objects.equals(this.status, evalConfigStructureResponse.status) && + Objects.equals(this.result, evalConfigStructureResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalConfigStructureResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResult.java new file mode 100644 index 0000000..3a03052 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigStructureResult.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalConfigStructure; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalConfigStructureResult + */ +@JsonPropertyOrder({ + EvalConfigStructureResult.JSON_PROPERTY_EVAL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalConfigStructureResult { + public static final String JSON_PROPERTY_EVAL = "eval"; + @javax.annotation.Nonnull + private EvalConfigStructure eval; + + public EvalConfigStructureResult() { + } + + public EvalConfigStructureResult eval(@javax.annotation.Nonnull EvalConfigStructure eval) { + this.eval = eval; + return this; + } + + /** + * Get eval + * @return eval + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalConfigStructure getEval() { + return eval; + } + + + @JsonProperty(JSON_PROPERTY_EVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEval(@javax.annotation.Nonnull EvalConfigStructure eval) { + this.eval = eval; + } + + + /** + * Return true if this EvalConfigStructureResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalConfigStructureResult evalConfigStructureResult = (EvalConfigStructureResult) o; + return Objects.equals(this.eval, evalConfigStructureResult.eval); + } + + @Override + public int hashCode() { + return Objects.hash(eval); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalConfigStructureResult {\n"); + sb.append(" eval: ").append(toIndentedString(eval)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval` to the URL query string + if (getEval() != null) { + joiner.add(getEval().toUrlQueryString(prefix + "eval" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateRequest.java new file mode 100644 index 0000000..c43d404 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateRequest.java @@ -0,0 +1,466 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalConfigUpdateRequest + */ +@JsonPropertyOrder({ + EvalConfigUpdateRequest.JSON_PROPERTY_CONFIG, + EvalConfigUpdateRequest.JSON_PROPERTY_MAPPING, + EvalConfigUpdateRequest.JSON_PROPERTY_MODEL, + EvalConfigUpdateRequest.JSON_PROPERTY_ERROR_LOCALIZER, + EvalConfigUpdateRequest.JSON_PROPERTY_KB_ID, + EvalConfigUpdateRequest.JSON_PROPERTY_NAME, + EvalConfigUpdateRequest.JSON_PROPERTY_RUN, + EvalConfigUpdateRequest.JSON_PROPERTY_TEST_EXECUTION_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalConfigUpdateRequest { + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nullable + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer; + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + private JsonNullable kbId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_RUN = "run"; + @javax.annotation.Nullable + private Boolean run = false; + + public static final String JSON_PROPERTY_TEST_EXECUTION_ID = "test_execution_id"; + private JsonNullable testExecutionId = JsonNullable.undefined(); + + public EvalConfigUpdateRequest() { + } + + public EvalConfigUpdateRequest config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public EvalConfigUpdateRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Updated evaluation configuration parameters. + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public EvalConfigUpdateRequest mapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + return this; + } + + public EvalConfigUpdateRequest putMappingItem(String key, Object mappingItem) { + if (this.mapping == null) { + this.mapping = new HashMap<>(); + } + this.mapping.put(key, mappingItem); + return this; + } + + /** + * Updated field mapping between test data and evaluation inputs. + * @return mapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapping() { + return mapping; + } + + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + } + + + public EvalConfigUpdateRequest model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Model to use for evaluations. + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public EvalConfigUpdateRequest errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Enable granular error localization in evaluation results. + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public EvalConfigUpdateRequest kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + return this; + } + + /** + * UUID of a knowledge base to use for grounding. Pass null to clear. + * @return kbId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKbId() { + return kbId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKbId_JsonNullable() { + return kbId; + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + public void setKbId_JsonNullable(JsonNullable kbId) { + this.kbId = kbId; + } + + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + } + + + public EvalConfigUpdateRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Updated name for the evaluation configuration. + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public EvalConfigUpdateRequest run(@javax.annotation.Nullable Boolean run) { + this.run = run; + return this; + } + + /** + * When true, triggers an immediate rerun after updating. Defaults to false. + * @return run + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRun() { + return run; + } + + + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRun(@javax.annotation.Nullable Boolean run) { + this.run = run; + } + + + public EvalConfigUpdateRequest testExecutionId(@javax.annotation.Nullable UUID testExecutionId) { + this.testExecutionId = JsonNullable.of(testExecutionId); + return this; + } + + /** + * UUID of the test execution to rerun against. Required when run is true. + * @return testExecutionId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getTestExecutionId() { + return testExecutionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTestExecutionId_JsonNullable() { + return testExecutionId; + } + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + public void setTestExecutionId_JsonNullable(JsonNullable testExecutionId) { + this.testExecutionId = testExecutionId; + } + + public void setTestExecutionId(@javax.annotation.Nullable UUID testExecutionId) { + this.testExecutionId = JsonNullable.of(testExecutionId); + } + + + /** + * Return true if this EvalConfigUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalConfigUpdateRequest evalConfigUpdateRequest = (EvalConfigUpdateRequest) o; + return Objects.equals(this.config, evalConfigUpdateRequest.config) && + Objects.equals(this.mapping, evalConfigUpdateRequest.mapping) && + equalsNullable(this.model, evalConfigUpdateRequest.model) && + Objects.equals(this.errorLocalizer, evalConfigUpdateRequest.errorLocalizer) && + equalsNullable(this.kbId, evalConfigUpdateRequest.kbId) && + Objects.equals(this.name, evalConfigUpdateRequest.name) && + Objects.equals(this.run, evalConfigUpdateRequest.run) && + equalsNullable(this.testExecutionId, evalConfigUpdateRequest.testExecutionId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(config, mapping, hashCodeNullable(model), errorLocalizer, hashCodeNullable(kbId), name, run, hashCodeNullable(testExecutionId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalConfigUpdateRequest {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" run: ").append(toIndentedString(run)).append("\n"); + sb.append(" testExecutionId: ").append(toIndentedString(testExecutionId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `run` to the URL query string + if (getRun() != null) { + joiner.add(String.format("%srun%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRun())))); + } + + // add `test_execution_id` to the URL query string + if (getTestExecutionId() != null) { + joiner.add(String.format("%stest_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateResponse.java new file mode 100644 index 0000000..a2912c4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalConfigUpdateResponse.java @@ -0,0 +1,368 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalConfigUpdateResponse + */ +@JsonPropertyOrder({ + EvalConfigUpdateResponse.JSON_PROPERTY_MESSAGE, + EvalConfigUpdateResponse.JSON_PROPERTY_EVAL_CONFIG_ID, + EvalConfigUpdateResponse.JSON_PROPERTY_RUN_TEST_ID, + EvalConfigUpdateResponse.JSON_PROPERTY_TEST_EXECUTION_ID, + EvalConfigUpdateResponse.JSON_PROPERTY_CALL_EXECUTION_COUNT, + EvalConfigUpdateResponse.JSON_PROPERTY_NOTE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalConfigUpdateResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_EVAL_CONFIG_ID = "eval_config_id"; + @javax.annotation.Nonnull + private UUID evalConfigId; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nonnull + private UUID runTestId; + + public static final String JSON_PROPERTY_TEST_EXECUTION_ID = "test_execution_id"; + private JsonNullable testExecutionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CALL_EXECUTION_COUNT = "call_execution_count"; + private JsonNullable callExecutionCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NOTE = "note"; + private JsonNullable note = JsonNullable.undefined(); + + public EvalConfigUpdateResponse() { + } + + public EvalConfigUpdateResponse message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public EvalConfigUpdateResponse evalConfigId(@javax.annotation.Nonnull UUID evalConfigId) { + this.evalConfigId = evalConfigId; + return this; + } + + /** + * Get evalConfigId + * @return evalConfigId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getEvalConfigId() { + return evalConfigId; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalConfigId(@javax.annotation.Nonnull UUID evalConfigId) { + this.evalConfigId = evalConfigId; + } + + + public EvalConfigUpdateResponse runTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + return this; + } + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRunTestId() { + return runTestId; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + } + + + public EvalConfigUpdateResponse testExecutionId(@javax.annotation.Nullable UUID testExecutionId) { + this.testExecutionId = JsonNullable.of(testExecutionId); + return this; + } + + /** + * Get testExecutionId + * @return testExecutionId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getTestExecutionId() { + return testExecutionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTestExecutionId_JsonNullable() { + return testExecutionId; + } + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + public void setTestExecutionId_JsonNullable(JsonNullable testExecutionId) { + this.testExecutionId = testExecutionId; + } + + public void setTestExecutionId(@javax.annotation.Nullable UUID testExecutionId) { + this.testExecutionId = JsonNullable.of(testExecutionId); + } + + + public EvalConfigUpdateResponse callExecutionCount(@javax.annotation.Nullable Integer callExecutionCount) { + this.callExecutionCount = JsonNullable.of(callExecutionCount); + return this; + } + + /** + * Get callExecutionCount + * @return callExecutionCount + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getCallExecutionCount() { + return callExecutionCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCallExecutionCount_JsonNullable() { + return callExecutionCount; + } + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_COUNT) + public void setCallExecutionCount_JsonNullable(JsonNullable callExecutionCount) { + this.callExecutionCount = callExecutionCount; + } + + public void setCallExecutionCount(@javax.annotation.Nullable Integer callExecutionCount) { + this.callExecutionCount = JsonNullable.of(callExecutionCount); + } + + + public EvalConfigUpdateResponse note(@javax.annotation.Nullable String note) { + this.note = JsonNullable.of(note); + return this; + } + + /** + * Get note + * @return note + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNote() { + return note.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNote_JsonNullable() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + public void setNote_JsonNullable(JsonNullable note) { + this.note = note; + } + + public void setNote(@javax.annotation.Nullable String note) { + this.note = JsonNullable.of(note); + } + + + /** + * Return true if this EvalConfigUpdateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalConfigUpdateResponse evalConfigUpdateResponse = (EvalConfigUpdateResponse) o; + return Objects.equals(this.message, evalConfigUpdateResponse.message) && + Objects.equals(this.evalConfigId, evalConfigUpdateResponse.evalConfigId) && + Objects.equals(this.runTestId, evalConfigUpdateResponse.runTestId) && + equalsNullable(this.testExecutionId, evalConfigUpdateResponse.testExecutionId) && + equalsNullable(this.callExecutionCount, evalConfigUpdateResponse.callExecutionCount) && + equalsNullable(this.note, evalConfigUpdateResponse.note); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(message, evalConfigId, runTestId, hashCodeNullable(testExecutionId), hashCodeNullable(callExecutionCount), hashCodeNullable(note)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalConfigUpdateResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" evalConfigId: ").append(toIndentedString(evalConfigId)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" testExecutionId: ").append(toIndentedString(testExecutionId)).append("\n"); + sb.append(" callExecutionCount: ").append(toIndentedString(callExecutionCount)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `eval_config_id` to the URL query string + if (getEvalConfigId() != null) { + joiner.add(String.format("%seval_config_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalConfigId())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `test_execution_id` to the URL query string + if (getTestExecutionId() != null) { + joiner.add(String.format("%stest_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionId())))); + } + + // add `call_execution_count` to the URL query string + if (getCallExecutionCount() != null) { + joiner.add(String.format("%scall_execution_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionCount())))); + } + + // add `note` to the URL query string + if (getNote() != null) { + joiner.add(String.format("%snote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNote())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalErrorResponse.java new file mode 100644 index 0000000..9359eb0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalErrorResponse + */ +@JsonPropertyOrder({ + EvalErrorResponse.JSON_PROPERTY_STATUS, + EvalErrorResponse.JSON_PROPERTY_TYPE, + EvalErrorResponse.JSON_PROPERTY_CODE, + EvalErrorResponse.JSON_PROPERTY_DETAIL, + EvalErrorResponse.JSON_PROPERTY_RESULT, + EvalErrorResponse.JSON_PROPERTY_MESSAGE, + EvalErrorResponse.JSON_PROPERTY_ERROR, + EvalErrorResponse.JSON_PROPERTY_ATTR, + EvalErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public EvalErrorResponse() { + } + + public EvalErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public EvalErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public EvalErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public EvalErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public EvalErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public EvalErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public EvalErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public EvalErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public EvalErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public EvalErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this EvalErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalErrorResponse evalErrorResponse = (EvalErrorResponse) o; + return Objects.equals(this.status, evalErrorResponse.status) && + equalsNullable(this.type, evalErrorResponse.type) && + equalsNullable(this.code, evalErrorResponse.code) && + equalsNullable(this.detail, evalErrorResponse.detail) && + equalsNullable(this.result, evalErrorResponse.result) && + equalsNullable(this.message, evalErrorResponse.message) && + equalsNullable(this.error, evalErrorResponse.error) && + equalsNullable(this.attr, evalErrorResponse.attr) && + Objects.equals(this.details, evalErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationCluster.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationCluster.java new file mode 100644 index 0000000..a19d9ed --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationCluster.java @@ -0,0 +1,346 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalExplanationCluster + */ +@JsonPropertyOrder({ + EvalExplanationCluster.JSON_PROPERTY_KIND, + EvalExplanationCluster.JSON_PROPERTY_CONFIDENCE, + EvalExplanationCluster.JSON_PROPERTY_THEME, + EvalExplanationCluster.JSON_PROPERTY_GUIDANCE, + EvalExplanationCluster.JSON_PROPERTY_EVIDENCE_SUMMARY, + EvalExplanationCluster.JSON_PROPERTY_EVAL_CONFIG_ID, + EvalExplanationCluster.JSON_PROPERTY_EVAL_TEMPLATE_ID, + EvalExplanationCluster.JSON_PROPERTY_EVAL_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalExplanationCluster { + public static final String JSON_PROPERTY_KIND = "kind"; + @javax.annotation.Nullable + private String kind; + + public static final String JSON_PROPERTY_CONFIDENCE = "confidence"; + @javax.annotation.Nullable + private String confidence; + + public static final String JSON_PROPERTY_THEME = "theme"; + @javax.annotation.Nullable + private String theme; + + public static final String JSON_PROPERTY_GUIDANCE = "guidance"; + @javax.annotation.Nullable + private String guidance; + + public static final String JSON_PROPERTY_EVIDENCE_SUMMARY = "evidenceSummary"; + @javax.annotation.Nullable + private String evidenceSummary; + + public static final String JSON_PROPERTY_EVAL_CONFIG_ID = "eval_config_id"; + @javax.annotation.Nullable + private UUID evalConfigId; + + public static final String JSON_PROPERTY_EVAL_TEMPLATE_ID = "eval_template_id"; + @javax.annotation.Nullable + private UUID evalTemplateId; + + public static final String JSON_PROPERTY_EVAL_NAME = "eval_name"; + @javax.annotation.Nullable + private String evalName; + + public EvalExplanationCluster() { + } + + @JsonCreator + public EvalExplanationCluster( + @JsonProperty(JSON_PROPERTY_KIND) String kind, + @JsonProperty(JSON_PROPERTY_CONFIDENCE) String confidence, + @JsonProperty(JSON_PROPERTY_THEME) String theme, + @JsonProperty(JSON_PROPERTY_GUIDANCE) String guidance, + @JsonProperty(JSON_PROPERTY_EVIDENCE_SUMMARY) String evidenceSummary, + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_ID) UUID evalConfigId, + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) UUID evalTemplateId, + @JsonProperty(JSON_PROPERTY_EVAL_NAME) String evalName + ) { + this(); + this.kind = kind; + this.confidence = confidence; + this.theme = theme; + this.guidance = guidance; + this.evidenceSummary = evidenceSummary; + this.evalConfigId = evalConfigId; + this.evalTemplateId = evalTemplateId; + this.evalName = evalName; + } + + /** + * Get kind + * @return kind + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKind() { + return kind; + } + + + + + /** + * Get confidence + * @return confidence + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIDENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getConfidence() { + return confidence; + } + + + + + /** + * Get theme + * @return theme + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THEME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTheme() { + return theme; + } + + + + + /** + * Get guidance + * @return guidance + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GUIDANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGuidance() { + return guidance; + } + + + + + /** + * Get evidenceSummary + * @return evidenceSummary + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVIDENCE_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvidenceSummary() { + return evidenceSummary; + } + + + + + /** + * Get evalConfigId + * @return evalConfigId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getEvalConfigId() { + return evalConfigId; + } + + + + + /** + * Get evalTemplateId + * @return evalTemplateId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getEvalTemplateId() { + return evalTemplateId; + } + + + + + /** + * Get evalName + * @return evalName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalName() { + return evalName; + } + + + + + /** + * Return true if this EvalExplanationCluster object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalExplanationCluster evalExplanationCluster = (EvalExplanationCluster) o; + return Objects.equals(this.kind, evalExplanationCluster.kind) && + Objects.equals(this.confidence, evalExplanationCluster.confidence) && + Objects.equals(this.theme, evalExplanationCluster.theme) && + Objects.equals(this.guidance, evalExplanationCluster.guidance) && + Objects.equals(this.evidenceSummary, evalExplanationCluster.evidenceSummary) && + Objects.equals(this.evalConfigId, evalExplanationCluster.evalConfigId) && + Objects.equals(this.evalTemplateId, evalExplanationCluster.evalTemplateId) && + Objects.equals(this.evalName, evalExplanationCluster.evalName); + } + + @Override + public int hashCode() { + return Objects.hash(kind, confidence, theme, guidance, evidenceSummary, evalConfigId, evalTemplateId, evalName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalExplanationCluster {\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" theme: ").append(toIndentedString(theme)).append("\n"); + sb.append(" guidance: ").append(toIndentedString(guidance)).append("\n"); + sb.append(" evidenceSummary: ").append(toIndentedString(evidenceSummary)).append("\n"); + sb.append(" evalConfigId: ").append(toIndentedString(evalConfigId)).append("\n"); + sb.append(" evalTemplateId: ").append(toIndentedString(evalTemplateId)).append("\n"); + sb.append(" evalName: ").append(toIndentedString(evalName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `kind` to the URL query string + if (getKind() != null) { + joiner.add(String.format("%skind%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKind())))); + } + + // add `confidence` to the URL query string + if (getConfidence() != null) { + joiner.add(String.format("%sconfidence%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfidence())))); + } + + // add `theme` to the URL query string + if (getTheme() != null) { + joiner.add(String.format("%stheme%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTheme())))); + } + + // add `guidance` to the URL query string + if (getGuidance() != null) { + joiner.add(String.format("%sguidance%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGuidance())))); + } + + // add `evidenceSummary` to the URL query string + if (getEvidenceSummary() != null) { + joiner.add(String.format("%sevidenceSummary%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvidenceSummary())))); + } + + // add `eval_config_id` to the URL query string + if (getEvalConfigId() != null) { + joiner.add(String.format("%seval_config_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalConfigId())))); + } + + // add `eval_template_id` to the URL query string + if (getEvalTemplateId() != null) { + joiner.add(String.format("%seval_template_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplateId())))); + } + + // add `eval_name` to the URL query string + if (getEvalName() != null) { + joiner.add(String.format("%seval_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResponse.java new file mode 100644 index 0000000..1d89f91 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalExplanationSummaryRefreshResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalExplanationSummaryRefreshResponse + */ +@JsonPropertyOrder({ + EvalExplanationSummaryRefreshResponse.JSON_PROPERTY_STATUS, + EvalExplanationSummaryRefreshResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalExplanationSummaryRefreshResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalExplanationSummaryRefreshResult result; + + public EvalExplanationSummaryRefreshResponse() { + } + + public EvalExplanationSummaryRefreshResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public EvalExplanationSummaryRefreshResponse result(@javax.annotation.Nonnull EvalExplanationSummaryRefreshResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalExplanationSummaryRefreshResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalExplanationSummaryRefreshResult result) { + this.result = result; + } + + + /** + * Return true if this EvalExplanationSummaryRefreshResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalExplanationSummaryRefreshResponse evalExplanationSummaryRefreshResponse = (EvalExplanationSummaryRefreshResponse) o; + return Objects.equals(this.status, evalExplanationSummaryRefreshResponse.status) && + Objects.equals(this.result, evalExplanationSummaryRefreshResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalExplanationSummaryRefreshResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResult.java new file mode 100644 index 0000000..465c802 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryRefreshResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalExplanationSummaryRefreshResult + */ +@JsonPropertyOrder({ + EvalExplanationSummaryRefreshResult.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalExplanationSummaryRefreshResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public EvalExplanationSummaryRefreshResult() { + } + + public EvalExplanationSummaryRefreshResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this EvalExplanationSummaryRefreshResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalExplanationSummaryRefreshResult evalExplanationSummaryRefreshResult = (EvalExplanationSummaryRefreshResult) o; + return Objects.equals(this.message, evalExplanationSummaryRefreshResult.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalExplanationSummaryRefreshResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResponse.java new file mode 100644 index 0000000..f3c893f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalExplanationSummaryResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalExplanationSummaryResponse + */ +@JsonPropertyOrder({ + EvalExplanationSummaryResponse.JSON_PROPERTY_STATUS, + EvalExplanationSummaryResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalExplanationSummaryResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalExplanationSummaryResult result; + + public EvalExplanationSummaryResponse() { + } + + public EvalExplanationSummaryResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public EvalExplanationSummaryResponse result(@javax.annotation.Nonnull EvalExplanationSummaryResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalExplanationSummaryResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalExplanationSummaryResult result) { + this.result = result; + } + + + /** + * Return true if this EvalExplanationSummaryResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalExplanationSummaryResponse evalExplanationSummaryResponse = (EvalExplanationSummaryResponse) o; + return Objects.equals(this.status, evalExplanationSummaryResponse.status) && + Objects.equals(this.result, evalExplanationSummaryResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalExplanationSummaryResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResult.java new file mode 100644 index 0000000..66d1236 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalExplanationSummaryResult.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalExplanationCluster; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalExplanationSummaryResult + */ +@JsonPropertyOrder({ + EvalExplanationSummaryResult.JSON_PROPERTY_RESPONSE, + EvalExplanationSummaryResult.JSON_PROPERTY_LAST_UPDATED, + EvalExplanationSummaryResult.JSON_PROPERTY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalExplanationSummaryResult { + public static final String JSON_PROPERTY_RESPONSE = "response"; + @javax.annotation.Nonnull + private Map> response = new HashMap<>(); + + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; + @javax.annotation.Nullable + private OffsetDateTime lastUpdated; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public EvalExplanationSummaryResult() { + } + + public EvalExplanationSummaryResult response(@javax.annotation.Nonnull Map> response) { + this.response = response; + return this; + } + + public EvalExplanationSummaryResult putResponseItem(String key, List responseItem) { + if (this.response == null) { + this.response = new HashMap<>(); + } + this.response.put(key, responseItem); + return this; + } + + /** + * Get response + * @return response + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getResponse() { + return response; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponse(@javax.annotation.Nonnull Map> response) { + this.response = response; + } + + + public EvalExplanationSummaryResult lastUpdated(@javax.annotation.Nullable OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get lastUpdated + * @return lastUpdated + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastUpdated() { + return lastUpdated; + } + + + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastUpdated(@javax.annotation.Nullable OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + } + + + public EvalExplanationSummaryResult status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + /** + * Return true if this EvalExplanationSummaryResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalExplanationSummaryResult evalExplanationSummaryResult = (EvalExplanationSummaryResult) o; + return Objects.equals(this.response, evalExplanationSummaryResult.response) && + Objects.equals(this.lastUpdated, evalExplanationSummaryResult.lastUpdated) && + Objects.equals(this.status, evalExplanationSummaryResult.status); + } + + @Override + public int hashCode() { + return Objects.hash(response, lastUpdated, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalExplanationSummaryResult {\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `response` to the URL query string + if (getResponse() != null) { + for (String _key : getResponse().keySet()) { + joiner.add(String.format("%sresponse%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResponse().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResponse().get(_key))))); + } + } + + // add `last_updated` to the URL query string + if (getLastUpdated() != null) { + joiner.add(String.format("%slast_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastUpdated())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListItem.java new file mode 100644 index 0000000..6d336e2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListItem.java @@ -0,0 +1,404 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalFeedbackListItem + */ +@JsonPropertyOrder({ + EvalFeedbackListItem.JSON_PROPERTY_ID, + EvalFeedbackListItem.JSON_PROPERTY_VALUE, + EvalFeedbackListItem.JSON_PROPERTY_EXPLANATION, + EvalFeedbackListItem.JSON_PROPERTY_SOURCE, + EvalFeedbackListItem.JSON_PROPERTY_SOURCE_ID, + EvalFeedbackListItem.JSON_PROPERTY_ACTION_TYPE, + EvalFeedbackListItem.JSON_PROPERTY_USER_NAME, + EvalFeedbackListItem.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalFeedbackListItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_EXPLANATION = "explanation"; + @javax.annotation.Nonnull + private String explanation; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nonnull + private String source; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nonnull + private String sourceId; + + public static final String JSON_PROPERTY_ACTION_TYPE = "action_type"; + @javax.annotation.Nonnull + private String actionType; + + public static final String JSON_PROPERTY_USER_NAME = "user_name"; + @javax.annotation.Nonnull + private String userName; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nonnull + private String createdAt; + + public EvalFeedbackListItem() { + } + + public EvalFeedbackListItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalFeedbackListItem value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + + public EvalFeedbackListItem explanation(@javax.annotation.Nonnull String explanation) { + this.explanation = explanation; + return this; + } + + /** + * Get explanation + * @return explanation + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExplanation() { + return explanation; + } + + + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExplanation(@javax.annotation.Nonnull String explanation) { + this.explanation = explanation; + } + + + public EvalFeedbackListItem source(@javax.annotation.Nonnull String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@javax.annotation.Nonnull String source) { + this.source = source; + } + + + public EvalFeedbackListItem sourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + } + + + public EvalFeedbackListItem actionType(@javax.annotation.Nonnull String actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get actionType + * @return actionType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getActionType() { + return actionType; + } + + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setActionType(@javax.annotation.Nonnull String actionType) { + this.actionType = actionType; + } + + + public EvalFeedbackListItem userName(@javax.annotation.Nonnull String userName) { + this.userName = userName; + return this; + } + + /** + * Get userName + * @return userName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserName() { + return userName; + } + + + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserName(@javax.annotation.Nonnull String userName) { + this.userName = userName; + } + + + public EvalFeedbackListItem createdAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + } + + + /** + * Return true if this EvalFeedbackListItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalFeedbackListItem evalFeedbackListItem = (EvalFeedbackListItem) o; + return Objects.equals(this.id, evalFeedbackListItem.id) && + Objects.equals(this.value, evalFeedbackListItem.value) && + Objects.equals(this.explanation, evalFeedbackListItem.explanation) && + Objects.equals(this.source, evalFeedbackListItem.source) && + Objects.equals(this.sourceId, evalFeedbackListItem.sourceId) && + Objects.equals(this.actionType, evalFeedbackListItem.actionType) && + Objects.equals(this.userName, evalFeedbackListItem.userName) && + Objects.equals(this.createdAt, evalFeedbackListItem.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, value, explanation, source, sourceId, actionType, userName, createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalFeedbackListItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" explanation: ").append(toIndentedString(explanation)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n"); + sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `explanation` to the URL query string + if (getExplanation() != null) { + joiner.add(String.format("%sexplanation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExplanation())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + // add `action_type` to the URL query string + if (getActionType() != null) { + joiner.add(String.format("%saction_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActionType())))); + } + + // add `user_name` to the URL query string + if (getUserName() != null) { + joiner.add(String.format("%suser_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserName())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponse.java new file mode 100644 index 0000000..968c31c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalFeedbackListResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalFeedbackListResponse + */ +@JsonPropertyOrder({ + EvalFeedbackListResponse.JSON_PROPERTY_STATUS, + EvalFeedbackListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalFeedbackListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalFeedbackListResponseResult result; + + public EvalFeedbackListResponse() { + } + + public EvalFeedbackListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalFeedbackListResponse result(@javax.annotation.Nonnull EvalFeedbackListResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalFeedbackListResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalFeedbackListResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalFeedbackListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalFeedbackListResponse evalFeedbackListResponse = (EvalFeedbackListResponse) o; + return Objects.equals(this.status, evalFeedbackListResponse.status) && + Objects.equals(this.result, evalFeedbackListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalFeedbackListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponseResult.java new file mode 100644 index 0000000..6e6545e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFeedbackListResponseResult.java @@ -0,0 +1,312 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalFeedbackListItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalFeedbackListResponseResult + */ +@JsonPropertyOrder({ + EvalFeedbackListResponseResult.JSON_PROPERTY_TEMPLATE_ID, + EvalFeedbackListResponseResult.JSON_PROPERTY_ITEMS, + EvalFeedbackListResponseResult.JSON_PROPERTY_TOTAL, + EvalFeedbackListResponseResult.JSON_PROPERTY_PAGE, + EvalFeedbackListResponseResult.JSON_PROPERTY_PAGE_SIZE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalFeedbackListResponseResult { + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_ITEMS = "items"; + @javax.annotation.Nonnull + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public static final String JSON_PROPERTY_PAGE = "page"; + @javax.annotation.Nonnull + private Integer page; + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + @javax.annotation.Nonnull + private Integer pageSize; + + public EvalFeedbackListResponseResult() { + } + + public EvalFeedbackListResponseResult templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public EvalFeedbackListResponseResult items(@javax.annotation.Nonnull List items) { + this.items = items; + return this; + } + + public EvalFeedbackListResponseResult addItemsItem(EvalFeedbackListItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setItems(@javax.annotation.Nonnull List items) { + this.items = items; + } + + + public EvalFeedbackListResponseResult total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + public EvalFeedbackListResponseResult page(@javax.annotation.Nonnull Integer page) { + this.page = page; + return this; + } + + /** + * Get page + * @return page + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPage() { + return page; + } + + + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPage(@javax.annotation.Nonnull Integer page) { + this.page = page; + } + + + public EvalFeedbackListResponseResult pageSize(@javax.annotation.Nonnull Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Get pageSize + * @return pageSize + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPageSize() { + return pageSize; + } + + + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPageSize(@javax.annotation.Nonnull Integer pageSize) { + this.pageSize = pageSize; + } + + + /** + * Return true if this EvalFeedbackListResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalFeedbackListResponseResult evalFeedbackListResponseResult = (EvalFeedbackListResponseResult) o; + return Objects.equals(this.templateId, evalFeedbackListResponseResult.templateId) && + Objects.equals(this.items, evalFeedbackListResponseResult.items) && + Objects.equals(this.total, evalFeedbackListResponseResult.total) && + Objects.equals(this.page, evalFeedbackListResponseResult.page) && + Objects.equals(this.pageSize, evalFeedbackListResponseResult.pageSize); + } + + @Override + public int hashCode() { + return Objects.hash(templateId, items, total, page, pageSize); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalFeedbackListResponseResult {\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `items` to the URL query string + if (getItems() != null) { + for (int i = 0; i < getItems().size(); i++) { + if (getItems().get(i) != null) { + joiner.add(getItems().get(i).toUrlQueryString(String.format("%sitems%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `page` to the URL query string + if (getPage() != null) { + joiner.add(String.format("%spage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPage())))); + } + + // add `page_size` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format("%spage_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResponse.java new file mode 100644 index 0000000..256f343 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalFunctionListResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalFunctionListResponse + */ +@JsonPropertyOrder({ + EvalFunctionListResponse.JSON_PROPERTY_STATUS, + EvalFunctionListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalFunctionListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalFunctionListResult result; + + public EvalFunctionListResponse() { + } + + public EvalFunctionListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalFunctionListResponse result(@javax.annotation.Nonnull EvalFunctionListResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalFunctionListResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalFunctionListResult result) { + this.result = result; + } + + + /** + * Return true if this EvalFunctionListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalFunctionListResponse evalFunctionListResponse = (EvalFunctionListResponse) o; + return Objects.equals(this.status, evalFunctionListResponse.status) && + Objects.equals(this.result, evalFunctionListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalFunctionListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResult.java new file mode 100644 index 0000000..8698e12 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalFunctionListResult.java @@ -0,0 +1,166 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalFunctionListResult + */ +@JsonPropertyOrder({ + EvalFunctionListResult.JSON_PROPERTY_FUNCTIONS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalFunctionListResult { + public static final String JSON_PROPERTY_FUNCTIONS = "functions"; + @javax.annotation.Nonnull + private List> functions = new ArrayList<>(); + + public EvalFunctionListResult() { + } + + public EvalFunctionListResult functions(@javax.annotation.Nonnull List> functions) { + this.functions = functions; + return this; + } + + public EvalFunctionListResult addFunctionsItem(Map functionsItem) { + if (this.functions == null) { + this.functions = new ArrayList<>(); + } + this.functions.add(functionsItem); + return this; + } + + /** + * Get functions + * @return functions + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FUNCTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getFunctions() { + return functions; + } + + + @JsonProperty(JSON_PROPERTY_FUNCTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFunctions(@javax.annotation.Nonnull List> functions) { + this.functions = functions; + } + + + /** + * Return true if this EvalFunctionListResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalFunctionListResult evalFunctionListResult = (EvalFunctionListResult) o; + return Objects.equals(this.functions, evalFunctionListResult.functions); + } + + @Override + public int hashCode() { + return Objects.hash(functions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalFunctionListResult {\n"); + sb.append(" functions: ").append(toIndentedString(functions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `functions` to the URL query string + if (getFunctions() != null) { + for (int i = 0; i < getFunctions().size(); i++) { + joiner.add(String.format("%sfunctions%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFunctions().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListFilters.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListFilters.java new file mode 100644 index 0000000..663f32a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListFilters.java @@ -0,0 +1,514 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalListFilters + */ +@JsonPropertyOrder({ + EvalListFilters.JSON_PROPERTY_EVAL_TYPE, + EvalListFilters.JSON_PROPERTY_OUTPUT_TYPE, + EvalListFilters.JSON_PROPERTY_TEMPLATE_TYPE, + EvalListFilters.JSON_PROPERTY_TAGS, + EvalListFilters.JSON_PROPERTY_CREATED_BY, + EvalListFilters.JSON_PROPERTY_NAMES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalListFilters { + /** + * Gets or Sets evalType + */ + public enum EvalTypeEnum { + LLM(String.valueOf("llm")), + + CODE(String.valueOf("code")), + + AGENT(String.valueOf("agent")); + + private String value; + + EvalTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EvalTypeEnum fromValue(String value) { + for (EvalTypeEnum b : EvalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nullable + private List evalType = new ArrayList<>(); + + /** + * Gets or Sets outputType + */ + public enum OutputTypeEnum { + PASS_FAIL(String.valueOf("pass_fail")), + + PERCENTAGE(String.valueOf("percentage")), + + DETERMINISTIC(String.valueOf("deterministic")); + + private String value; + + OutputTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OutputTypeEnum fromValue(String value) { + for (OutputTypeEnum b : OutputTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nullable + private List outputType = new ArrayList<>(); + + /** + * Gets or Sets templateType + */ + public enum TemplateTypeEnum { + SINGLE(String.valueOf("single")), + + COMPOSITE(String.valueOf("composite")); + + private String value; + + TemplateTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TemplateTypeEnum fromValue(String value) { + for (TemplateTypeEnum b : TemplateTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TEMPLATE_TYPE = "template_type"; + @javax.annotation.Nullable + private List templateType = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + @javax.annotation.Nullable + private List createdBy = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAMES = "names"; + @javax.annotation.Nullable + private List names = new ArrayList<>(); + + public EvalListFilters() { + } + + public EvalListFilters evalType(@javax.annotation.Nullable List evalType) { + this.evalType = evalType; + return this; + } + + public EvalListFilters addEvalTypeItem(EvalTypeEnum evalTypeItem) { + if (this.evalType == null) { + this.evalType = new ArrayList<>(); + } + this.evalType.add(evalTypeItem); + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalType(@javax.annotation.Nullable List evalType) { + this.evalType = evalType; + } + + + public EvalListFilters outputType(@javax.annotation.Nullable List outputType) { + this.outputType = outputType; + return this; + } + + public EvalListFilters addOutputTypeItem(OutputTypeEnum outputTypeItem) { + if (this.outputType == null) { + this.outputType = new ArrayList<>(); + } + this.outputType.add(outputTypeItem); + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOutputType() { + return outputType; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputType(@javax.annotation.Nullable List outputType) { + this.outputType = outputType; + } + + + public EvalListFilters templateType(@javax.annotation.Nullable List templateType) { + this.templateType = templateType; + return this; + } + + public EvalListFilters addTemplateTypeItem(TemplateTypeEnum templateTypeItem) { + if (this.templateType == null) { + this.templateType = new ArrayList<>(); + } + this.templateType.add(templateTypeItem); + return this; + } + + /** + * Get templateType + * @return templateType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTemplateType() { + return templateType; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateType(@javax.annotation.Nullable List templateType) { + this.templateType = templateType; + } + + + public EvalListFilters tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public EvalListFilters addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public EvalListFilters createdBy(@javax.annotation.Nullable List createdBy) { + this.createdBy = createdBy; + return this; + } + + public EvalListFilters addCreatedByItem(String createdByItem) { + if (this.createdBy == null) { + this.createdBy = new ArrayList<>(); + } + this.createdBy.add(createdByItem); + return this; + } + + /** + * Get createdBy + * @return createdBy + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCreatedBy() { + return createdBy; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedBy(@javax.annotation.Nullable List createdBy) { + this.createdBy = createdBy; + } + + + public EvalListFilters names(@javax.annotation.Nullable List names) { + this.names = names; + return this; + } + + public EvalListFilters addNamesItem(String namesItem) { + if (this.names == null) { + this.names = new ArrayList<>(); + } + this.names.add(namesItem); + return this; + } + + /** + * Get names + * @return names + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNames() { + return names; + } + + + @JsonProperty(JSON_PROPERTY_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNames(@javax.annotation.Nullable List names) { + this.names = names; + } + + + /** + * Return true if this EvalListFilters object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalListFilters evalListFilters = (EvalListFilters) o; + return Objects.equals(this.evalType, evalListFilters.evalType) && + Objects.equals(this.outputType, evalListFilters.outputType) && + Objects.equals(this.templateType, evalListFilters.templateType) && + Objects.equals(this.tags, evalListFilters.tags) && + Objects.equals(this.createdBy, evalListFilters.createdBy) && + Objects.equals(this.names, evalListFilters.names); + } + + @Override + public int hashCode() { + return Objects.hash(evalType, outputType, templateType, tags, createdBy, names); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalListFilters {\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" names: ").append(toIndentedString(names)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + for (int i = 0; i < getEvalType().size(); i++) { + joiner.add(String.format("%seval_type%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalType().get(i))))); + } + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + for (int i = 0; i < getOutputType().size(); i++) { + joiner.add(String.format("%soutput_type%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getOutputType().get(i))))); + } + } + + // add `template_type` to the URL query string + if (getTemplateType() != null) { + for (int i = 0; i < getTemplateType().size(); i++) { + joiner.add(String.format("%stemplate_type%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTemplateType().get(i))))); + } + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `created_by` to the URL query string + if (getCreatedBy() != null) { + for (int i = 0; i < getCreatedBy().size(); i++) { + joiner.add(String.format("%screated_by%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy().get(i))))); + } + } + + // add `names` to the URL query string + if (getNames() != null) { + for (int i = 0; i < getNames().size(); i++) { + joiner.add(String.format("%snames%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getNames().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListRequest.java new file mode 100644 index 0000000..58d5b29 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListRequest.java @@ -0,0 +1,502 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalListFilters; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalListRequest + */ +@JsonPropertyOrder({ + EvalListRequest.JSON_PROPERTY_PAGE, + EvalListRequest.JSON_PROPERTY_PAGE_SIZE, + EvalListRequest.JSON_PROPERTY_SEARCH, + EvalListRequest.JSON_PROPERTY_OWNER_FILTER, + EvalListRequest.JSON_PROPERTY_FILTERS, + EvalListRequest.JSON_PROPERTY_SORT_BY, + EvalListRequest.JSON_PROPERTY_SORT_ORDER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalListRequest { + public static final String JSON_PROPERTY_PAGE = "page"; + @javax.annotation.Nullable + private Integer page = 0; + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + @javax.annotation.Nullable + private Integer pageSize = 25; + + public static final String JSON_PROPERTY_SEARCH = "search"; + private JsonNullable search = JsonNullable.undefined(); + + /** + * Gets or Sets ownerFilter + */ + public enum OwnerFilterEnum { + ALL(String.valueOf("all")), + + USER(String.valueOf("user")), + + SYSTEM(String.valueOf("system")); + + private String value; + + OwnerFilterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OwnerFilterEnum fromValue(String value) { + for (OwnerFilterEnum b : OwnerFilterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_OWNER_FILTER = "owner_filter"; + @javax.annotation.Nullable + private OwnerFilterEnum ownerFilter = OwnerFilterEnum.ALL; + + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private EvalListFilters filters; + + /** + * Gets or Sets sortBy + */ + public enum SortByEnum { + NAME(String.valueOf("name")), + + UPDATED_AT(String.valueOf("updated_at")), + + CREATED_AT(String.valueOf("created_at")); + + private String value; + + SortByEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SortByEnum fromValue(String value) { + for (SortByEnum b : SortByEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SORT_BY = "sort_by"; + @javax.annotation.Nullable + private SortByEnum sortBy = SortByEnum.UPDATED_AT; + + /** + * Gets or Sets sortOrder + */ + public enum SortOrderEnum { + ASC(String.valueOf("asc")), + + DESC(String.valueOf("desc")); + + private String value; + + SortOrderEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SortOrderEnum fromValue(String value) { + for (SortOrderEnum b : SortOrderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SORT_ORDER = "sort_order"; + @javax.annotation.Nullable + private SortOrderEnum sortOrder = SortOrderEnum.DESC; + + public EvalListRequest() { + } + + public EvalListRequest page(@javax.annotation.Nullable Integer page) { + this.page = page; + return this; + } + + /** + * Get page + * minimum: 0 + * @return page + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPage() { + return page; + } + + + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPage(@javax.annotation.Nullable Integer page) { + this.page = page; + } + + + public EvalListRequest pageSize(@javax.annotation.Nullable Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Get pageSize + * minimum: 1 + * maximum: 100 + * @return pageSize + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPageSize() { + return pageSize; + } + + + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPageSize(@javax.annotation.Nullable Integer pageSize) { + this.pageSize = pageSize; + } + + + public EvalListRequest search(@javax.annotation.Nullable String search) { + this.search = JsonNullable.of(search); + return this; + } + + /** + * Get search + * @return search + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSearch() { + return search.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSearch_JsonNullable() { + return search; + } + + @JsonProperty(JSON_PROPERTY_SEARCH) + public void setSearch_JsonNullable(JsonNullable search) { + this.search = search; + } + + public void setSearch(@javax.annotation.Nullable String search) { + this.search = JsonNullable.of(search); + } + + + public EvalListRequest ownerFilter(@javax.annotation.Nullable OwnerFilterEnum ownerFilter) { + this.ownerFilter = ownerFilter; + return this; + } + + /** + * Get ownerFilter + * @return ownerFilter + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNER_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OwnerFilterEnum getOwnerFilter() { + return ownerFilter; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerFilter(@javax.annotation.Nullable OwnerFilterEnum ownerFilter) { + this.ownerFilter = ownerFilter; + } + + + public EvalListRequest filters(@javax.annotation.Nullable EvalListFilters filters) { + this.filters = filters; + return this; + } + + /** + * Get filters + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EvalListFilters getFilters() { + return filters; + } + + + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilters(@javax.annotation.Nullable EvalListFilters filters) { + this.filters = filters; + } + + + public EvalListRequest sortBy(@javax.annotation.Nullable SortByEnum sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Get sortBy + * @return sortBy + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SortByEnum getSortBy() { + return sortBy; + } + + + @JsonProperty(JSON_PROPERTY_SORT_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSortBy(@javax.annotation.Nullable SortByEnum sortBy) { + this.sortBy = sortBy; + } + + + public EvalListRequest sortOrder(@javax.annotation.Nullable SortOrderEnum sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Get sortOrder + * @return sortOrder + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SortOrderEnum getSortOrder() { + return sortOrder; + } + + + @JsonProperty(JSON_PROPERTY_SORT_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSortOrder(@javax.annotation.Nullable SortOrderEnum sortOrder) { + this.sortOrder = sortOrder; + } + + + /** + * Return true if this EvalListRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalListRequest evalListRequest = (EvalListRequest) o; + return Objects.equals(this.page, evalListRequest.page) && + Objects.equals(this.pageSize, evalListRequest.pageSize) && + equalsNullable(this.search, evalListRequest.search) && + Objects.equals(this.ownerFilter, evalListRequest.ownerFilter) && + Objects.equals(this.filters, evalListRequest.filters) && + Objects.equals(this.sortBy, evalListRequest.sortBy) && + Objects.equals(this.sortOrder, evalListRequest.sortOrder); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(page, pageSize, hashCodeNullable(search), ownerFilter, filters, sortBy, sortOrder); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalListRequest {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" search: ").append(toIndentedString(search)).append("\n"); + sb.append(" ownerFilter: ").append(toIndentedString(ownerFilter)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" sortBy: ").append(toIndentedString(sortBy)).append("\n"); + sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `page` to the URL query string + if (getPage() != null) { + joiner.add(String.format("%spage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPage())))); + } + + // add `page_size` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format("%spage_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + } + + // add `search` to the URL query string + if (getSearch() != null) { + joiner.add(String.format("%ssearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSearch())))); + } + + // add `owner_filter` to the URL query string + if (getOwnerFilter() != null) { + joiner.add(String.format("%sowner_filter%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOwnerFilter())))); + } + + // add `filters` to the URL query string + if (getFilters() != null) { + joiner.add(getFilters().toUrlQueryString(prefix + "filters" + suffix)); + } + + // add `sort_by` to the URL query string + if (getSortBy() != null) { + joiner.add(String.format("%ssort_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSortBy())))); + } + + // add `sort_order` to the URL query string + if (getSortOrder() != null) { + joiner.add(String.format("%ssort_order%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSortOrder())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResponse.java new file mode 100644 index 0000000..805105d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalListResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalListResponse + */ +@JsonPropertyOrder({ + EvalListResponse.JSON_PROPERTY_STATUS, + EvalListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalListResult result; + + public EvalListResponse() { + } + + public EvalListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalListResponse result(@javax.annotation.Nonnull EvalListResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalListResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalListResult result) { + this.result = result; + } + + + /** + * Return true if this EvalListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalListResponse evalListResponse = (EvalListResponse) o; + return Objects.equals(this.status, evalListResponse.status) && + Objects.equals(this.result, evalListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResult.java new file mode 100644 index 0000000..e910a48 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalListResult.java @@ -0,0 +1,214 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalListResult + */ +@JsonPropertyOrder({ + EvalListResult.JSON_PROPERTY_EVALS, + EvalListResult.JSON_PROPERTY_EVAL_RECOMMENDATIONS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalListResult { + public static final String JSON_PROPERTY_EVALS = "evals"; + @javax.annotation.Nonnull + private List> evals = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVAL_RECOMMENDATIONS = "eval_recommendations"; + @javax.annotation.Nullable + private List evalRecommendations = new ArrayList<>(); + + public EvalListResult() { + } + + public EvalListResult evals(@javax.annotation.Nonnull List> evals) { + this.evals = evals; + return this; + } + + public EvalListResult addEvalsItem(Map evalsItem) { + if (this.evals == null) { + this.evals = new ArrayList<>(); + } + this.evals.add(evalsItem); + return this; + } + + /** + * Get evals + * @return evals + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvals() { + return evals; + } + + + @JsonProperty(JSON_PROPERTY_EVALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvals(@javax.annotation.Nonnull List> evals) { + this.evals = evals; + } + + + public EvalListResult evalRecommendations(@javax.annotation.Nullable List evalRecommendations) { + this.evalRecommendations = evalRecommendations; + return this; + } + + public EvalListResult addEvalRecommendationsItem(String evalRecommendationsItem) { + if (this.evalRecommendations == null) { + this.evalRecommendations = new ArrayList<>(); + } + this.evalRecommendations.add(evalRecommendationsItem); + return this; + } + + /** + * Get evalRecommendations + * @return evalRecommendations + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_RECOMMENDATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvalRecommendations() { + return evalRecommendations; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_RECOMMENDATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalRecommendations(@javax.annotation.Nullable List evalRecommendations) { + this.evalRecommendations = evalRecommendations; + } + + + /** + * Return true if this EvalListResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalListResult evalListResult = (EvalListResult) o; + return Objects.equals(this.evals, evalListResult.evals) && + Objects.equals(this.evalRecommendations, evalListResult.evalRecommendations); + } + + @Override + public int hashCode() { + return Objects.hash(evals, evalRecommendations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalListResult {\n"); + sb.append(" evals: ").append(toIndentedString(evals)).append("\n"); + sb.append(" evalRecommendations: ").append(toIndentedString(evalRecommendations)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `evals` to the URL query string + if (getEvals() != null) { + for (int i = 0; i < getEvals().size(); i++) { + joiner.add(String.format("%sevals%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvals().get(i))))); + } + } + + // add `eval_recommendations` to the URL query string + if (getEvalRecommendations() != null) { + for (int i = 0; i < getEvalRecommendations().size(); i++) { + joiner.add(String.format("%seval_recommendations%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalRecommendations().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalMetricEntry.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalMetricEntry.java new file mode 100644 index 0000000..7abb50d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalMetricEntry.java @@ -0,0 +1,459 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalMetricEntry + */ +@JsonPropertyOrder({ + EvalMetricEntry.JSON_PROPERTY_ID, + EvalMetricEntry.JSON_PROPERTY_TEMPLATE_ID, + EvalMetricEntry.JSON_PROPERTY_NAME, + EvalMetricEntry.JSON_PROPERTY_CONFIG, + EvalMetricEntry.JSON_PROPERTY_MODEL, + EvalMetricEntry.JSON_PROPERTY_ERROR_LOCALIZER, + EvalMetricEntry.JSON_PROPERTY_KB_ID, + EvalMetricEntry.JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalMetricEntry { + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model = ""; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + private JsonNullable kbId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES = "composite_weight_overrides"; + @javax.annotation.Nullable + private Map compositeWeightOverrides = new HashMap<>(); + + public EvalMetricEntry() { + } + + public EvalMetricEntry id(@javax.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@javax.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public EvalMetricEntry templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public EvalMetricEntry name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public EvalMetricEntry config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public EvalMetricEntry putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public EvalMetricEntry model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public EvalMetricEntry errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public EvalMetricEntry kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKbId() { + return kbId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKbId_JsonNullable() { + return kbId; + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + public void setKbId_JsonNullable(JsonNullable kbId) { + this.kbId = kbId; + } + + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + } + + + public EvalMetricEntry compositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + return this; + } + + public EvalMetricEntry putCompositeWeightOverridesItem(String key, Object compositeWeightOverridesItem) { + if (this.compositeWeightOverrides == null) { + this.compositeWeightOverrides = new HashMap<>(); + } + this.compositeWeightOverrides.put(key, compositeWeightOverridesItem); + return this; + } + + /** + * Get compositeWeightOverrides + * @return compositeWeightOverrides + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCompositeWeightOverrides() { + return compositeWeightOverrides; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + } + + + /** + * Return true if this EvalMetricEntry object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalMetricEntry evalMetricEntry = (EvalMetricEntry) o; + return equalsNullable(this.id, evalMetricEntry.id) && + Objects.equals(this.templateId, evalMetricEntry.templateId) && + Objects.equals(this.name, evalMetricEntry.name) && + Objects.equals(this.config, evalMetricEntry.config) && + Objects.equals(this.model, evalMetricEntry.model) && + Objects.equals(this.errorLocalizer, evalMetricEntry.errorLocalizer) && + equalsNullable(this.kbId, evalMetricEntry.kbId) && + Objects.equals(this.compositeWeightOverrides, evalMetricEntry.compositeWeightOverrides); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(id), templateId, name, config, model, errorLocalizer, hashCodeNullable(kbId), compositeWeightOverrides); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalMetricEntry {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" compositeWeightOverrides: ").append(toIndentedString(compositeWeightOverrides)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `composite_weight_overrides` to the URL query string + if (getCompositeWeightOverrides() != null) { + for (String _key : getCompositeWeightOverrides().keySet()) { + joiner.add(String.format("%scomposite_weight_overrides%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCompositeWeightOverrides().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCompositeWeightOverrides().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResponse.java new file mode 100644 index 0000000..e63021e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalPreviewResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalPreviewResponse + */ +@JsonPropertyOrder({ + EvalPreviewResponse.JSON_PROPERTY_STATUS, + EvalPreviewResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalPreviewResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalPreviewResult result; + + public EvalPreviewResponse() { + } + + public EvalPreviewResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalPreviewResponse result(@javax.annotation.Nonnull EvalPreviewResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalPreviewResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalPreviewResult result) { + this.result = result; + } + + + /** + * Return true if this EvalPreviewResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalPreviewResponse evalPreviewResponse = (EvalPreviewResponse) o; + return Objects.equals(this.status, evalPreviewResponse.status) && + Objects.equals(this.result, evalPreviewResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalPreviewResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResult.java new file mode 100644 index 0000000..9118bcc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalPreviewResult.java @@ -0,0 +1,166 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalPreviewResult + */ +@JsonPropertyOrder({ + EvalPreviewResult.JSON_PROPERTY_RESPONSES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalPreviewResult { + public static final String JSON_PROPERTY_RESPONSES = "responses"; + @javax.annotation.Nonnull + private List> responses = new ArrayList<>(); + + public EvalPreviewResult() { + } + + public EvalPreviewResult responses(@javax.annotation.Nonnull List> responses) { + this.responses = responses; + return this; + } + + public EvalPreviewResult addResponsesItem(Map responsesItem) { + if (this.responses == null) { + this.responses = new ArrayList<>(); + } + this.responses.add(responsesItem); + return this; + } + + /** + * Get responses + * @return responses + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getResponses() { + return responses; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponses(@javax.annotation.Nonnull List> responses) { + this.responses = responses; + } + + + /** + * Return true if this EvalPreviewResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalPreviewResult evalPreviewResult = (EvalPreviewResult) o; + return Objects.equals(this.responses, evalPreviewResult.responses); + } + + @Override + public int hashCode() { + return Objects.hash(responses); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalPreviewResult {\n"); + sb.append(" responses: ").append(toIndentedString(responses)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `responses` to the URL query string + if (getResponses() != null) { + for (int i = 0; i < getResponses().size(); i++) { + joiner.add(String.format("%sresponses%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getResponses().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructure.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructure.java new file mode 100644 index 0000000..a28d616 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructure.java @@ -0,0 +1,1282 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalStructure + */ +@JsonPropertyOrder({ + EvalStructure.JSON_PROPERTY_ID, + EvalStructure.JSON_PROPERTY_TEMPLATE_ID, + EvalStructure.JSON_PROPERTY_NAME, + EvalStructure.JSON_PROPERTY_DESCRIPTION, + EvalStructure.JSON_PROPERTY_EVAL_TAGS, + EvalStructure.JSON_PROPERTY_TEMPLATE_NAME, + EvalStructure.JSON_PROPERTY_REQUIRED_KEYS, + EvalStructure.JSON_PROPERTY_OPTIONAL_KEYS, + EvalStructure.JSON_PROPERTY_VARIABLE_KEYS, + EvalStructure.JSON_PROPERTY_RUN_PROMPT_COLUMN, + EvalStructure.JSON_PROPERTY_MAPPING, + EvalStructure.JSON_PROPERTY_CONFIG, + EvalStructure.JSON_PROPERTY_PARAMS, + EvalStructure.JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA, + EvalStructure.JSON_PROPERTY_EVAL_TYPE_ID, + EvalStructure.JSON_PROPERTY_EVAL_TYPE, + EvalStructure.JSON_PROPERTY_REASON_COLUMN, + EvalStructure.JSON_PROPERTY_MODELS, + EvalStructure.JSON_PROPERTY_SELECTED_MODEL, + EvalStructure.JSON_PROPERTY_OUTPUT, + EvalStructure.JSON_PROPERTY_CONFIG_PARAMS_DESC, + EvalStructure.JSON_PROPERTY_CONFIG_PARAMS_OPTION, + EvalStructure.JSON_PROPERTY_KB_ID, + EvalStructure.JSON_PROPERTY_ERROR_LOCALIZER, + EvalStructure.JSON_PROPERTY_CHOICES, + EvalStructure.JSON_PROPERTY_API_KEY_AVAILABLE, + EvalStructure.JSON_PROPERTY_RUN_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalStructure { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_EVAL_TAGS = "eval_tags"; + @javax.annotation.Nullable + private List evalTags = new ArrayList<>(); + + public static final String JSON_PROPERTY_TEMPLATE_NAME = "template_name"; + @javax.annotation.Nullable + private String templateName; + + public static final String JSON_PROPERTY_REQUIRED_KEYS = "required_keys"; + @javax.annotation.Nullable + private List requiredKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_OPTIONAL_KEYS = "optional_keys"; + @javax.annotation.Nullable + private List optionalKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_VARIABLE_KEYS = "variable_keys"; + @javax.annotation.Nullable + private List variableKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_RUN_PROMPT_COLUMN = "run_prompt_column"; + @javax.annotation.Nullable + private Boolean runPromptColumn; + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nullable + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_PARAMS = "params"; + @javax.annotation.Nullable + private Map params = new HashMap<>(); + + public static final String JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA = "function_params_schema"; + @javax.annotation.Nullable + private Map functionParamsSchema = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_TYPE_ID = "eval_type_id"; + @javax.annotation.Nullable + private String evalTypeId; + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nullable + private String evalType; + + public static final String JSON_PROPERTY_REASON_COLUMN = "reason_column"; + @javax.annotation.Nullable + private Boolean reasonColumn; + + public static final String JSON_PROPERTY_MODELS = "models"; + @javax.annotation.Nullable + private Map models = new HashMap<>(); + + public static final String JSON_PROPERTY_SELECTED_MODEL = "selected_model"; + @javax.annotation.Nullable + private String selectedModel; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private Map output = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG_PARAMS_DESC = "config_params_desc"; + @javax.annotation.Nullable + private Map configParamsDesc = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG_PARAMS_OPTION = "config_params_option"; + @javax.annotation.Nullable + private Map configParamsOption = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + private JsonNullable kbId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer; + + public static final String JSON_PROPERTY_CHOICES = "choices"; + @javax.annotation.Nullable + private Map choices = new HashMap<>(); + + public static final String JSON_PROPERTY_API_KEY_AVAILABLE = "api_key_available"; + @javax.annotation.Nullable + private Boolean apiKeyAvailable; + + public static final String JSON_PROPERTY_RUN_CONFIG = "run_config"; + @javax.annotation.Nullable + private Map runConfig = new HashMap<>(); + + public EvalStructure() { + } + + public EvalStructure id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalStructure templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public EvalStructure name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public EvalStructure description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public EvalStructure evalTags(@javax.annotation.Nullable List evalTags) { + this.evalTags = evalTags; + return this; + } + + public EvalStructure addEvalTagsItem(String evalTagsItem) { + if (this.evalTags == null) { + this.evalTags = new ArrayList<>(); + } + this.evalTags.add(evalTagsItem); + return this; + } + + /** + * Get evalTags + * @return evalTags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvalTags() { + return evalTags; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalTags(@javax.annotation.Nullable List evalTags) { + this.evalTags = evalTags; + } + + + public EvalStructure templateName(@javax.annotation.Nullable String templateName) { + this.templateName = templateName; + return this; + } + + /** + * Get templateName + * @return templateName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplateName() { + return templateName; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateName(@javax.annotation.Nullable String templateName) { + this.templateName = templateName; + } + + + public EvalStructure requiredKeys(@javax.annotation.Nullable List requiredKeys) { + this.requiredKeys = requiredKeys; + return this; + } + + public EvalStructure addRequiredKeysItem(String requiredKeysItem) { + if (this.requiredKeys == null) { + this.requiredKeys = new ArrayList<>(); + } + this.requiredKeys.add(requiredKeysItem); + return this; + } + + /** + * Get requiredKeys + * @return requiredKeys + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRequiredKeys() { + return requiredKeys; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiredKeys(@javax.annotation.Nullable List requiredKeys) { + this.requiredKeys = requiredKeys; + } + + + public EvalStructure optionalKeys(@javax.annotation.Nullable List optionalKeys) { + this.optionalKeys = optionalKeys; + return this; + } + + public EvalStructure addOptionalKeysItem(String optionalKeysItem) { + if (this.optionalKeys == null) { + this.optionalKeys = new ArrayList<>(); + } + this.optionalKeys.add(optionalKeysItem); + return this; + } + + /** + * Get optionalKeys + * @return optionalKeys + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONAL_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOptionalKeys() { + return optionalKeys; + } + + + @JsonProperty(JSON_PROPERTY_OPTIONAL_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOptionalKeys(@javax.annotation.Nullable List optionalKeys) { + this.optionalKeys = optionalKeys; + } + + + public EvalStructure variableKeys(@javax.annotation.Nullable List variableKeys) { + this.variableKeys = variableKeys; + return this; + } + + public EvalStructure addVariableKeysItem(String variableKeysItem) { + if (this.variableKeys == null) { + this.variableKeys = new ArrayList<>(); + } + this.variableKeys.add(variableKeysItem); + return this; + } + + /** + * Get variableKeys + * @return variableKeys + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLE_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getVariableKeys() { + return variableKeys; + } + + + @JsonProperty(JSON_PROPERTY_VARIABLE_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVariableKeys(@javax.annotation.Nullable List variableKeys) { + this.variableKeys = variableKeys; + } + + + public EvalStructure runPromptColumn(@javax.annotation.Nullable Boolean runPromptColumn) { + this.runPromptColumn = runPromptColumn; + return this; + } + + /** + * Get runPromptColumn + * @return runPromptColumn + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_PROMPT_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRunPromptColumn() { + return runPromptColumn; + } + + + @JsonProperty(JSON_PROPERTY_RUN_PROMPT_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRunPromptColumn(@javax.annotation.Nullable Boolean runPromptColumn) { + this.runPromptColumn = runPromptColumn; + } + + + public EvalStructure mapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + return this; + } + + public EvalStructure putMappingItem(String key, Object mappingItem) { + if (this.mapping == null) { + this.mapping = new HashMap<>(); + } + this.mapping.put(key, mappingItem); + return this; + } + + /** + * Get mapping + * @return mapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapping() { + return mapping; + } + + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMapping(@javax.annotation.Nullable Map mapping) { + this.mapping = mapping; + } + + + public EvalStructure config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public EvalStructure putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public EvalStructure params(@javax.annotation.Nullable Map params) { + this.params = params; + return this; + } + + public EvalStructure putParamsItem(String key, Object paramsItem) { + if (this.params == null) { + this.params = new HashMap<>(); + } + this.params.put(key, paramsItem); + return this; + } + + /** + * Get params + * @return params + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getParams() { + return params; + } + + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setParams(@javax.annotation.Nullable Map params) { + this.params = params; + } + + + public EvalStructure functionParamsSchema(@javax.annotation.Nullable Map functionParamsSchema) { + this.functionParamsSchema = functionParamsSchema; + return this; + } + + public EvalStructure putFunctionParamsSchemaItem(String key, Object functionParamsSchemaItem) { + if (this.functionParamsSchema == null) { + this.functionParamsSchema = new HashMap<>(); + } + this.functionParamsSchema.put(key, functionParamsSchemaItem); + return this; + } + + /** + * Get functionParamsSchema + * @return functionParamsSchema + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFunctionParamsSchema() { + return functionParamsSchema; + } + + + @JsonProperty(JSON_PROPERTY_FUNCTION_PARAMS_SCHEMA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setFunctionParamsSchema(@javax.annotation.Nullable Map functionParamsSchema) { + this.functionParamsSchema = functionParamsSchema; + } + + + public EvalStructure evalTypeId(@javax.annotation.Nullable String evalTypeId) { + this.evalTypeId = evalTypeId; + return this; + } + + /** + * Get evalTypeId + * @return evalTypeId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalTypeId() { + return evalTypeId; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalTypeId(@javax.annotation.Nullable String evalTypeId) { + this.evalTypeId = evalTypeId; + } + + + public EvalStructure evalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + } + + + public EvalStructure reasonColumn(@javax.annotation.Nullable Boolean reasonColumn) { + this.reasonColumn = reasonColumn; + return this; + } + + /** + * Get reasonColumn + * @return reasonColumn + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getReasonColumn() { + return reasonColumn; + } + + + @JsonProperty(JSON_PROPERTY_REASON_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReasonColumn(@javax.annotation.Nullable Boolean reasonColumn) { + this.reasonColumn = reasonColumn; + } + + + public EvalStructure models(@javax.annotation.Nullable Map models) { + this.models = models; + return this; + } + + public EvalStructure putModelsItem(String key, Object modelsItem) { + if (this.models == null) { + this.models = new HashMap<>(); + } + this.models.put(key, modelsItem); + return this; + } + + /** + * Get models + * @return models + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModels() { + return models; + } + + + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setModels(@javax.annotation.Nullable Map models) { + this.models = models; + } + + + public EvalStructure selectedModel(@javax.annotation.Nullable String selectedModel) { + this.selectedModel = selectedModel; + return this; + } + + /** + * Get selectedModel + * @return selectedModel + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECTED_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSelectedModel() { + return selectedModel; + } + + + @JsonProperty(JSON_PROPERTY_SELECTED_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectedModel(@javax.annotation.Nullable String selectedModel) { + this.selectedModel = selectedModel; + } + + + public EvalStructure output(@javax.annotation.Nullable Map output) { + this.output = output; + return this; + } + + public EvalStructure putOutputItem(String key, Object outputItem) { + if (this.output == null) { + this.output = new HashMap<>(); + } + this.output.put(key, outputItem); + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(@javax.annotation.Nullable Map output) { + this.output = output; + } + + + public EvalStructure configParamsDesc(@javax.annotation.Nullable Map configParamsDesc) { + this.configParamsDesc = configParamsDesc; + return this; + } + + public EvalStructure putConfigParamsDescItem(String key, Object configParamsDescItem) { + if (this.configParamsDesc == null) { + this.configParamsDesc = new HashMap<>(); + } + this.configParamsDesc.put(key, configParamsDescItem); + return this; + } + + /** + * Get configParamsDesc + * @return configParamsDesc + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_DESC) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigParamsDesc() { + return configParamsDesc; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_DESC) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigParamsDesc(@javax.annotation.Nullable Map configParamsDesc) { + this.configParamsDesc = configParamsDesc; + } + + + public EvalStructure configParamsOption(@javax.annotation.Nullable Map configParamsOption) { + this.configParamsOption = configParamsOption; + return this; + } + + public EvalStructure putConfigParamsOptionItem(String key, Object configParamsOptionItem) { + if (this.configParamsOption == null) { + this.configParamsOption = new HashMap<>(); + } + this.configParamsOption.put(key, configParamsOptionItem); + return this; + } + + /** + * Get configParamsOption + * @return configParamsOption + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_OPTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigParamsOption() { + return configParamsOption; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG_PARAMS_OPTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigParamsOption(@javax.annotation.Nullable Map configParamsOption) { + this.configParamsOption = configParamsOption; + } + + + public EvalStructure kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKbId() { + return kbId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKbId_JsonNullable() { + return kbId; + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + public void setKbId_JsonNullable(JsonNullable kbId) { + this.kbId = kbId; + } + + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + } + + + public EvalStructure errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public EvalStructure choices(@javax.annotation.Nullable Map choices) { + this.choices = choices; + return this; + } + + public EvalStructure putChoicesItem(String key, Object choicesItem) { + if (this.choices == null) { + this.choices = new HashMap<>(); + } + this.choices.put(key, choicesItem); + return this; + } + + /** + * Get choices + * @return choices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChoices() { + return choices; + } + + + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChoices(@javax.annotation.Nullable Map choices) { + this.choices = choices; + } + + + public EvalStructure apiKeyAvailable(@javax.annotation.Nullable Boolean apiKeyAvailable) { + this.apiKeyAvailable = apiKeyAvailable; + return this; + } + + /** + * Get apiKeyAvailable + * @return apiKeyAvailable + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApiKeyAvailable() { + return apiKeyAvailable; + } + + + @JsonProperty(JSON_PROPERTY_API_KEY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApiKeyAvailable(@javax.annotation.Nullable Boolean apiKeyAvailable) { + this.apiKeyAvailable = apiKeyAvailable; + } + + + public EvalStructure runConfig(@javax.annotation.Nullable Map runConfig) { + this.runConfig = runConfig; + return this; + } + + public EvalStructure putRunConfigItem(String key, Object runConfigItem) { + if (this.runConfig == null) { + this.runConfig = new HashMap<>(); + } + this.runConfig.put(key, runConfigItem); + return this; + } + + /** + * Get runConfig + * @return runConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRunConfig() { + return runConfig; + } + + + @JsonProperty(JSON_PROPERTY_RUN_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRunConfig(@javax.annotation.Nullable Map runConfig) { + this.runConfig = runConfig; + } + + + /** + * Return true if this EvalStructure object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalStructure evalStructure = (EvalStructure) o; + return Objects.equals(this.id, evalStructure.id) && + Objects.equals(this.templateId, evalStructure.templateId) && + Objects.equals(this.name, evalStructure.name) && + Objects.equals(this.description, evalStructure.description) && + Objects.equals(this.evalTags, evalStructure.evalTags) && + Objects.equals(this.templateName, evalStructure.templateName) && + Objects.equals(this.requiredKeys, evalStructure.requiredKeys) && + Objects.equals(this.optionalKeys, evalStructure.optionalKeys) && + Objects.equals(this.variableKeys, evalStructure.variableKeys) && + Objects.equals(this.runPromptColumn, evalStructure.runPromptColumn) && + Objects.equals(this.mapping, evalStructure.mapping) && + Objects.equals(this.config, evalStructure.config) && + Objects.equals(this.params, evalStructure.params) && + Objects.equals(this.functionParamsSchema, evalStructure.functionParamsSchema) && + Objects.equals(this.evalTypeId, evalStructure.evalTypeId) && + Objects.equals(this.evalType, evalStructure.evalType) && + Objects.equals(this.reasonColumn, evalStructure.reasonColumn) && + Objects.equals(this.models, evalStructure.models) && + Objects.equals(this.selectedModel, evalStructure.selectedModel) && + Objects.equals(this.output, evalStructure.output) && + Objects.equals(this.configParamsDesc, evalStructure.configParamsDesc) && + Objects.equals(this.configParamsOption, evalStructure.configParamsOption) && + equalsNullable(this.kbId, evalStructure.kbId) && + Objects.equals(this.errorLocalizer, evalStructure.errorLocalizer) && + Objects.equals(this.choices, evalStructure.choices) && + Objects.equals(this.apiKeyAvailable, evalStructure.apiKeyAvailable) && + Objects.equals(this.runConfig, evalStructure.runConfig); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, templateId, name, description, evalTags, templateName, requiredKeys, optionalKeys, variableKeys, runPromptColumn, mapping, config, params, functionParamsSchema, evalTypeId, evalType, reasonColumn, models, selectedModel, output, configParamsDesc, configParamsOption, hashCodeNullable(kbId), errorLocalizer, choices, apiKeyAvailable, runConfig); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalStructure {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" evalTags: ").append(toIndentedString(evalTags)).append("\n"); + sb.append(" templateName: ").append(toIndentedString(templateName)).append("\n"); + sb.append(" requiredKeys: ").append(toIndentedString(requiredKeys)).append("\n"); + sb.append(" optionalKeys: ").append(toIndentedString(optionalKeys)).append("\n"); + sb.append(" variableKeys: ").append(toIndentedString(variableKeys)).append("\n"); + sb.append(" runPromptColumn: ").append(toIndentedString(runPromptColumn)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append(" functionParamsSchema: ").append(toIndentedString(functionParamsSchema)).append("\n"); + sb.append(" evalTypeId: ").append(toIndentedString(evalTypeId)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" reasonColumn: ").append(toIndentedString(reasonColumn)).append("\n"); + sb.append(" models: ").append(toIndentedString(models)).append("\n"); + sb.append(" selectedModel: ").append(toIndentedString(selectedModel)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" configParamsDesc: ").append(toIndentedString(configParamsDesc)).append("\n"); + sb.append(" configParamsOption: ").append(toIndentedString(configParamsOption)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" choices: ").append(toIndentedString(choices)).append("\n"); + sb.append(" apiKeyAvailable: ").append(toIndentedString(apiKeyAvailable)).append("\n"); + sb.append(" runConfig: ").append(toIndentedString(runConfig)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `eval_tags` to the URL query string + if (getEvalTags() != null) { + for (int i = 0; i < getEvalTags().size(); i++) { + joiner.add(String.format("%seval_tags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalTags().get(i))))); + } + } + + // add `template_name` to the URL query string + if (getTemplateName() != null) { + joiner.add(String.format("%stemplate_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateName())))); + } + + // add `required_keys` to the URL query string + if (getRequiredKeys() != null) { + for (int i = 0; i < getRequiredKeys().size(); i++) { + joiner.add(String.format("%srequired_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRequiredKeys().get(i))))); + } + } + + // add `optional_keys` to the URL query string + if (getOptionalKeys() != null) { + for (int i = 0; i < getOptionalKeys().size(); i++) { + joiner.add(String.format("%soptional_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getOptionalKeys().get(i))))); + } + } + + // add `variable_keys` to the URL query string + if (getVariableKeys() != null) { + for (int i = 0; i < getVariableKeys().size(); i++) { + joiner.add(String.format("%svariable_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getVariableKeys().get(i))))); + } + } + + // add `run_prompt_column` to the URL query string + if (getRunPromptColumn() != null) { + joiner.add(String.format("%srun_prompt_column%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunPromptColumn())))); + } + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `params` to the URL query string + if (getParams() != null) { + for (String _key : getParams().keySet()) { + joiner.add(String.format("%sparams%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getParams().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getParams().get(_key))))); + } + } + + // add `function_params_schema` to the URL query string + if (getFunctionParamsSchema() != null) { + for (String _key : getFunctionParamsSchema().keySet()) { + joiner.add(String.format("%sfunction_params_schema%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFunctionParamsSchema().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFunctionParamsSchema().get(_key))))); + } + } + + // add `eval_type_id` to the URL query string + if (getEvalTypeId() != null) { + joiner.add(String.format("%seval_type_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTypeId())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `reason_column` to the URL query string + if (getReasonColumn() != null) { + joiner.add(String.format("%sreason_column%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReasonColumn())))); + } + + // add `models` to the URL query string + if (getModels() != null) { + for (String _key : getModels().keySet()) { + joiner.add(String.format("%smodels%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModels().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModels().get(_key))))); + } + } + + // add `selected_model` to the URL query string + if (getSelectedModel() != null) { + joiner.add(String.format("%sselected_model%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectedModel())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + // add `config_params_desc` to the URL query string + if (getConfigParamsDesc() != null) { + for (String _key : getConfigParamsDesc().keySet()) { + joiner.add(String.format("%sconfig_params_desc%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigParamsDesc().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigParamsDesc().get(_key))))); + } + } + + // add `config_params_option` to the URL query string + if (getConfigParamsOption() != null) { + for (String _key : getConfigParamsOption().keySet()) { + joiner.add(String.format("%sconfig_params_option%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigParamsOption().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigParamsOption().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `choices` to the URL query string + if (getChoices() != null) { + for (String _key : getChoices().keySet()) { + joiner.add(String.format("%schoices%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChoices().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChoices().get(_key))))); + } + } + + // add `api_key_available` to the URL query string + if (getApiKeyAvailable() != null) { + joiner.add(String.format("%sapi_key_available%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApiKeyAvailable())))); + } + + // add `run_config` to the URL query string + if (getRunConfig() != null) { + for (String _key : getRunConfig().keySet()) { + joiner.add(String.format("%srun_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRunConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRunConfig().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResponse.java new file mode 100644 index 0000000..fe393fb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalStructureResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalStructureResponse + */ +@JsonPropertyOrder({ + EvalStructureResponse.JSON_PROPERTY_STATUS, + EvalStructureResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalStructureResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalStructureResult result; + + public EvalStructureResponse() { + } + + public EvalStructureResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalStructureResponse result(@javax.annotation.Nonnull EvalStructureResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalStructureResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalStructureResult result) { + this.result = result; + } + + + /** + * Return true if this EvalStructureResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalStructureResponse evalStructureResponse = (EvalStructureResponse) o; + return Objects.equals(this.status, evalStructureResponse.status) && + Objects.equals(this.result, evalStructureResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalStructureResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResult.java new file mode 100644 index 0000000..f2176d2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalStructureResult.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalStructure; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalStructureResult + */ +@JsonPropertyOrder({ + EvalStructureResult.JSON_PROPERTY_EVAL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalStructureResult { + public static final String JSON_PROPERTY_EVAL = "eval"; + @javax.annotation.Nonnull + private EvalStructure eval; + + public EvalStructureResult() { + } + + public EvalStructureResult eval(@javax.annotation.Nonnull EvalStructure eval) { + this.eval = eval; + return this; + } + + /** + * Get eval + * @return eval + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalStructure getEval() { + return eval; + } + + + @JsonProperty(JSON_PROPERTY_EVAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEval(@javax.annotation.Nonnull EvalStructure eval) { + this.eval = eval; + } + + + /** + * Return true if this EvalStructureResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalStructureResult evalStructureResult = (EvalStructureResult) o; + return Objects.equals(this.eval, evalStructureResult.eval); + } + + @Override + public int hashCode() { + return Objects.hash(eval); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalStructureResult {\n"); + sb.append(" eval: ").append(toIndentedString(eval)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval` to the URL query string + if (getEval() != null) { + joiner.add(getEval().toUrlQueryString(prefix + "eval" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryComparisonResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryComparisonResponse.java new file mode 100644 index 0000000..b2312a4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryComparisonResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateSummary; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalSummaryComparisonResponse + */ +@JsonPropertyOrder({ + EvalSummaryComparisonResponse.JSON_PROPERTY_STATUS, + EvalSummaryComparisonResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalSummaryComparisonResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map> result = new HashMap<>(); + + public EvalSummaryComparisonResponse() { + } + + public EvalSummaryComparisonResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public EvalSummaryComparisonResponse result(@javax.annotation.Nonnull Map> result) { + this.result = result; + return this; + } + + public EvalSummaryComparisonResponse putResultItem(String key, List resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map> result) { + this.result = result; + } + + + /** + * Return true if this EvalSummaryComparisonResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalSummaryComparisonResponse evalSummaryComparisonResponse = (EvalSummaryComparisonResponse) o; + return Objects.equals(this.status, evalSummaryComparisonResponse.status) && + Objects.equals(this.result, evalSummaryComparisonResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalSummaryComparisonResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + joiner.add(String.format("%sresult%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResult().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryResponse.java new file mode 100644 index 0000000..3d3dbe2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalSummaryResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateSummary; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalSummaryResponse + */ +@JsonPropertyOrder({ + EvalSummaryResponse.JSON_PROPERTY_STATUS, + EvalSummaryResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalSummaryResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public EvalSummaryResponse() { + } + + public EvalSummaryResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public EvalSummaryResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public EvalSummaryResponse addResultItem(EvalTemplateSummary resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + /** + * Return true if this EvalSummaryResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalSummaryResponse evalSummaryResponse = (EvalSummaryResponse) o; + return Objects.equals(this.status, evalSummaryResponse.status) && + Objects.equals(this.result, evalSummaryResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalSummaryResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteRequest.java new file mode 100644 index 0000000..cc20a9c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteRequest.java @@ -0,0 +1,168 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateBulkDeleteRequest + */ +@JsonPropertyOrder({ + EvalTemplateBulkDeleteRequest.JSON_PROPERTY_TEMPLATE_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateBulkDeleteRequest { + public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @javax.annotation.Nonnull + private List templateIds = new ArrayList<>(); + + public EvalTemplateBulkDeleteRequest() { + } + + public EvalTemplateBulkDeleteRequest templateIds(@javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + return this; + } + + public EvalTemplateBulkDeleteRequest addTemplateIdsItem(UUID templateIdsItem) { + if (this.templateIds == null) { + this.templateIds = new ArrayList<>(); + } + this.templateIds.add(templateIdsItem); + return this; + } + + /** + * Get templateIds + * @return templateIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateIds() { + return templateIds; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + } + + + /** + * Return true if this EvalTemplateBulkDeleteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateBulkDeleteRequest evalTemplateBulkDeleteRequest = (EvalTemplateBulkDeleteRequest) o; + return Objects.equals(this.templateIds, evalTemplateBulkDeleteRequest.templateIds); + } + + @Override + public int hashCode() { + return Objects.hash(templateIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateBulkDeleteRequest {\n"); + sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `template_ids` to the URL query string + if (getTemplateIds() != null) { + for (int i = 0; i < getTemplateIds().size(); i++) { + if (getTemplateIds().get(i) != null) { + joiner.add(String.format("%stemplate_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTemplateIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponse.java new file mode 100644 index 0000000..2bf1427 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateBulkDeleteResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateBulkDeleteResponse + */ +@JsonPropertyOrder({ + EvalTemplateBulkDeleteResponse.JSON_PROPERTY_STATUS, + EvalTemplateBulkDeleteResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateBulkDeleteResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateBulkDeleteResponseResult result; + + public EvalTemplateBulkDeleteResponse() { + } + + public EvalTemplateBulkDeleteResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateBulkDeleteResponse result(@javax.annotation.Nonnull EvalTemplateBulkDeleteResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateBulkDeleteResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateBulkDeleteResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateBulkDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateBulkDeleteResponse evalTemplateBulkDeleteResponse = (EvalTemplateBulkDeleteResponse) o; + return Objects.equals(this.status, evalTemplateBulkDeleteResponse.status) && + Objects.equals(this.result, evalTemplateBulkDeleteResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateBulkDeleteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponseResult.java new file mode 100644 index 0000000..63a98a7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateBulkDeleteResponseResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateBulkDeleteResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateBulkDeleteResponseResult.JSON_PROPERTY_DELETED_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateBulkDeleteResponseResult { + public static final String JSON_PROPERTY_DELETED_COUNT = "deleted_count"; + @javax.annotation.Nonnull + private Integer deletedCount; + + public EvalTemplateBulkDeleteResponseResult() { + } + + public EvalTemplateBulkDeleteResponseResult deletedCount(@javax.annotation.Nonnull Integer deletedCount) { + this.deletedCount = deletedCount; + return this; + } + + /** + * Get deletedCount + * @return deletedCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DELETED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDeletedCount() { + return deletedCount; + } + + + @JsonProperty(JSON_PROPERTY_DELETED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeletedCount(@javax.annotation.Nonnull Integer deletedCount) { + this.deletedCount = deletedCount; + } + + + /** + * Return true if this EvalTemplateBulkDeleteResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateBulkDeleteResponseResult evalTemplateBulkDeleteResponseResult = (EvalTemplateBulkDeleteResponseResult) o; + return Objects.equals(this.deletedCount, evalTemplateBulkDeleteResponseResult.deletedCount); + } + + @Override + public int hashCode() { + return Objects.hash(deletedCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateBulkDeleteResponseResult {\n"); + sb.append(" deletedCount: ").append(toIndentedString(deletedCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `deleted_count` to the URL query string + if (getDeletedCount() != null) { + joiner.add(String.format("%sdeleted_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeletedCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateChartPoint.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateChartPoint.java new file mode 100644 index 0000000..d8c75bc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateChartPoint.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateChartPoint + */ +@JsonPropertyOrder({ + EvalTemplateChartPoint.JSON_PROPERTY_TIMESTAMP, + EvalTemplateChartPoint.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateChartPoint { + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @javax.annotation.Nonnull + private String timestamp; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private BigDecimal value; + + public EvalTemplateChartPoint() { + } + + public EvalTemplateChartPoint timestamp(@javax.annotation.Nonnull String timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimestamp() { + return timestamp; + } + + + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@javax.annotation.Nonnull String timestamp) { + this.timestamp = timestamp; + } + + + public EvalTemplateChartPoint value(@javax.annotation.Nonnull BigDecimal value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull BigDecimal value) { + this.value = value; + } + + + /** + * Return true if this EvalTemplateChartPoint object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateChartPoint evalTemplateChartPoint = (EvalTemplateChartPoint) o; + return Objects.equals(this.timestamp, evalTemplateChartPoint.timestamp) && + Objects.equals(this.value, evalTemplateChartPoint.value); + } + + @Override + public int hashCode() { + return Objects.hash(timestamp, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateChartPoint {\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimestamp())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponse.java new file mode 100644 index 0000000..f039cee --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateCreateResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateCreateResponse + */ +@JsonPropertyOrder({ + EvalTemplateCreateResponse.JSON_PROPERTY_STATUS, + EvalTemplateCreateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateCreateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateCreateResponseResult result; + + public EvalTemplateCreateResponse() { + } + + public EvalTemplateCreateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateCreateResponse result(@javax.annotation.Nonnull EvalTemplateCreateResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateCreateResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateCreateResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateCreateResponse evalTemplateCreateResponse = (EvalTemplateCreateResponse) o; + return Objects.equals(this.status, evalTemplateCreateResponse.status) && + Objects.equals(this.result, evalTemplateCreateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateCreateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponseResult.java new file mode 100644 index 0000000..ffd5618 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateResponseResult.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateCreateResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateCreateResponseResult.JSON_PROPERTY_ID, + EvalTemplateCreateResponseResult.JSON_PROPERTY_NAME, + EvalTemplateCreateResponseResult.JSON_PROPERTY_VERSION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateCreateResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nonnull + private String version; + + public EvalTemplateCreateResponseResult() { + } + + public EvalTemplateCreateResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalTemplateCreateResponseResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public EvalTemplateCreateResponseResult version(@javax.annotation.Nonnull String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersion(@javax.annotation.Nonnull String version) { + this.version = version; + } + + + /** + * Return true if this EvalTemplateCreateResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateCreateResponseResult evalTemplateCreateResponseResult = (EvalTemplateCreateResponseResult) o; + return Objects.equals(this.id, evalTemplateCreateResponseResult.id) && + Objects.equals(this.name, evalTemplateCreateResponseResult.name) && + Objects.equals(this.version, evalTemplateCreateResponseResult.version); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateCreateResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateV2Request.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateV2Request.java new file mode 100644 index 0000000..8e9bcd4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateCreateV2Request.java @@ -0,0 +1,1267 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateCreateV2Request + */ +@JsonPropertyOrder({ + EvalTemplateCreateV2Request.JSON_PROPERTY_NAME, + EvalTemplateCreateV2Request.JSON_PROPERTY_IS_DRAFT, + EvalTemplateCreateV2Request.JSON_PROPERTY_EVAL_TYPE, + EvalTemplateCreateV2Request.JSON_PROPERTY_INSTRUCTIONS, + EvalTemplateCreateV2Request.JSON_PROPERTY_MODEL, + EvalTemplateCreateV2Request.JSON_PROPERTY_OUTPUT_TYPE, + EvalTemplateCreateV2Request.JSON_PROPERTY_PASS_THRESHOLD, + EvalTemplateCreateV2Request.JSON_PROPERTY_CHOICE_SCORES, + EvalTemplateCreateV2Request.JSON_PROPERTY_DESCRIPTION, + EvalTemplateCreateV2Request.JSON_PROPERTY_TAGS, + EvalTemplateCreateV2Request.JSON_PROPERTY_CHECK_INTERNET, + EvalTemplateCreateV2Request.JSON_PROPERTY_CODE, + EvalTemplateCreateV2Request.JSON_PROPERTY_CODE_LANGUAGE, + EvalTemplateCreateV2Request.JSON_PROPERTY_MESSAGES, + EvalTemplateCreateV2Request.JSON_PROPERTY_FEW_SHOT_EXAMPLES, + EvalTemplateCreateV2Request.JSON_PROPERTY_MODE, + EvalTemplateCreateV2Request.JSON_PROPERTY_TOOLS, + EvalTemplateCreateV2Request.JSON_PROPERTY_KNOWLEDGE_BASES, + EvalTemplateCreateV2Request.JSON_PROPERTY_DATA_INJECTION, + EvalTemplateCreateV2Request.JSON_PROPERTY_SUMMARY, + EvalTemplateCreateV2Request.JSON_PROPERTY_ERROR_LOCALIZER_ENABLED, + EvalTemplateCreateV2Request.JSON_PROPERTY_TEMPLATE_FORMAT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateCreateV2Request { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_IS_DRAFT = "is_draft"; + @javax.annotation.Nullable + private Boolean isDraft = false; + + /** + * Gets or Sets evalType + */ + public enum EvalTypeEnum { + LLM(String.valueOf("llm")), + + CODE(String.valueOf("code")), + + AGENT(String.valueOf("agent")); + + private String value; + + EvalTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EvalTypeEnum fromValue(String value) { + for (EvalTypeEnum b : EvalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nullable + private EvalTypeEnum evalType = EvalTypeEnum.LLM; + + public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + @javax.annotation.Nullable + private String instructions; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model = "turing_large"; + + /** + * Gets or Sets outputType + */ + public enum OutputTypeEnum { + PASS_FAIL(String.valueOf("pass_fail")), + + PERCENTAGE(String.valueOf("percentage")), + + DETERMINISTIC(String.valueOf("deterministic")); + + private String value; + + OutputTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OutputTypeEnum fromValue(String value) { + for (OutputTypeEnum b : OutputTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nullable + private OutputTypeEnum outputType = OutputTypeEnum.PASS_FAIL; + + public static final String JSON_PROPERTY_PASS_THRESHOLD = "pass_threshold"; + @javax.annotation.Nullable + private BigDecimal passThreshold; + + public static final String JSON_PROPERTY_CHOICE_SCORES = "choice_scores"; + @javax.annotation.Nullable + private Map choiceScores = new HashMap<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_CHECK_INTERNET = "check_internet"; + @javax.annotation.Nullable + private Boolean checkInternet = false; + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + /** + * Gets or Sets codeLanguage + */ + public enum CodeLanguageEnum { + PYTHON(String.valueOf("python")), + + JAVASCRIPT(String.valueOf("javascript")); + + private String value; + + CodeLanguageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CodeLanguageEnum fromValue(String value) { + for (CodeLanguageEnum b : CodeLanguageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_CODE_LANGUAGE = "code_language"; + private JsonNullable codeLanguage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGES = "messages"; + private JsonNullable>> messages = JsonNullable.>>undefined(); + + public static final String JSON_PROPERTY_FEW_SHOT_EXAMPLES = "few_shot_examples"; + private JsonNullable>> fewShotExamples = JsonNullable.>>undefined(); + + /** + * Gets or Sets mode + */ + public enum ModeEnum { + AUTO(String.valueOf("auto")), + + AGENT(String.valueOf("agent")), + + QUICK(String.valueOf("quick")); + + private String value; + + ModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModeEnum fromValue(String value) { + for (ModeEnum b : ModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_MODE = "mode"; + private JsonNullable mode = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOOLS = "tools"; + @javax.annotation.Nullable + private Map tools = new HashMap<>(); + + public static final String JSON_PROPERTY_KNOWLEDGE_BASES = "knowledge_bases"; + private JsonNullable> knowledgeBases = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_DATA_INJECTION = "data_injection"; + @javax.annotation.Nullable + private Map dataInjection = new HashMap<>(); + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + @javax.annotation.Nullable + private Map summary = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER_ENABLED = "error_localizer_enabled"; + @javax.annotation.Nullable + private Boolean errorLocalizerEnabled = false; + + /** + * Gets or Sets templateFormat + */ + public enum TemplateFormatEnum { + MUSTACHE(String.valueOf("mustache")), + + JINJA(String.valueOf("jinja")); + + private String value; + + TemplateFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TemplateFormatEnum fromValue(String value) { + for (TemplateFormatEnum b : TemplateFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TEMPLATE_FORMAT = "template_format"; + @javax.annotation.Nullable + private TemplateFormatEnum templateFormat = TemplateFormatEnum.MUSTACHE; + + public EvalTemplateCreateV2Request() { + } + + public EvalTemplateCreateV2Request name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public EvalTemplateCreateV2Request isDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + return this; + } + + /** + * Get isDraft + * @return isDraft + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DRAFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDraft() { + return isDraft; + } + + + @JsonProperty(JSON_PROPERTY_IS_DRAFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + } + + + public EvalTemplateCreateV2Request evalType(@javax.annotation.Nullable EvalTypeEnum evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EvalTypeEnum getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalType(@javax.annotation.Nullable EvalTypeEnum evalType) { + this.evalType = evalType; + } + + + public EvalTemplateCreateV2Request instructions(@javax.annotation.Nullable String instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get instructions + * @return instructions + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstructions() { + return instructions; + } + + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstructions(@javax.annotation.Nullable String instructions) { + this.instructions = instructions; + } + + + public EvalTemplateCreateV2Request model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public EvalTemplateCreateV2Request outputType(@javax.annotation.Nullable OutputTypeEnum outputType) { + this.outputType = outputType; + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OutputTypeEnum getOutputType() { + return outputType; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputType(@javax.annotation.Nullable OutputTypeEnum outputType) { + this.outputType = outputType; + } + + + public EvalTemplateCreateV2Request passThreshold(@javax.annotation.Nullable BigDecimal passThreshold) { + this.passThreshold = passThreshold; + return this; + } + + /** + * Get passThreshold + * minimum: 0 + * maximum: 1 + * @return passThreshold + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getPassThreshold() { + return passThreshold; + } + + + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassThreshold(@javax.annotation.Nullable BigDecimal passThreshold) { + this.passThreshold = passThreshold; + } + + + public EvalTemplateCreateV2Request choiceScores(@javax.annotation.Nullable Map choiceScores) { + this.choiceScores = choiceScores; + return this; + } + + public EvalTemplateCreateV2Request putChoiceScoresItem(String key, Object choiceScoresItem) { + if (this.choiceScores == null) { + this.choiceScores = new HashMap<>(); + } + this.choiceScores.put(key, choiceScoresItem); + return this; + } + + /** + * Get choiceScores + * @return choiceScores + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICE_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChoiceScores() { + return choiceScores; + } + + + @JsonProperty(JSON_PROPERTY_CHOICE_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChoiceScores(@javax.annotation.Nullable Map choiceScores) { + this.choiceScores = choiceScores; + } + + + public EvalTemplateCreateV2Request description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public EvalTemplateCreateV2Request tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public EvalTemplateCreateV2Request addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public EvalTemplateCreateV2Request checkInternet(@javax.annotation.Nullable Boolean checkInternet) { + this.checkInternet = checkInternet; + return this; + } + + /** + * Get checkInternet + * @return checkInternet + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECK_INTERNET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCheckInternet() { + return checkInternet; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_INTERNET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckInternet(@javax.annotation.Nullable Boolean checkInternet) { + this.checkInternet = checkInternet; + } + + + public EvalTemplateCreateV2Request code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public EvalTemplateCreateV2Request codeLanguage(@javax.annotation.Nullable CodeLanguageEnum codeLanguage) { + this.codeLanguage = JsonNullable.of(codeLanguage); + return this; + } + + /** + * Get codeLanguage + * @return codeLanguage + */ + @javax.annotation.Nullable + @JsonIgnore + public CodeLanguageEnum getCodeLanguage() { + return codeLanguage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCodeLanguage_JsonNullable() { + return codeLanguage; + } + + @JsonProperty(JSON_PROPERTY_CODE_LANGUAGE) + public void setCodeLanguage_JsonNullable(JsonNullable codeLanguage) { + this.codeLanguage = codeLanguage; + } + + public void setCodeLanguage(@javax.annotation.Nullable CodeLanguageEnum codeLanguage) { + this.codeLanguage = JsonNullable.of(codeLanguage); + } + + + public EvalTemplateCreateV2Request messages(@javax.annotation.Nullable List> messages) { + this.messages = JsonNullable.>>of(messages); + return this; + } + + public EvalTemplateCreateV2Request addMessagesItem(Map messagesItem) { + if (this.messages == null || !this.messages.isPresent()) { + this.messages = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.messages.get().add(messagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get messages + * @return messages + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getMessages() { + return messages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getMessages_JsonNullable() { + return messages; + } + + @JsonProperty(JSON_PROPERTY_MESSAGES) + public void setMessages_JsonNullable(JsonNullable>> messages) { + this.messages = messages; + } + + public void setMessages(@javax.annotation.Nullable List> messages) { + this.messages = JsonNullable.>>of(messages); + } + + + public EvalTemplateCreateV2Request fewShotExamples(@javax.annotation.Nullable List> fewShotExamples) { + this.fewShotExamples = JsonNullable.>>of(fewShotExamples); + return this; + } + + public EvalTemplateCreateV2Request addFewShotExamplesItem(Map fewShotExamplesItem) { + if (this.fewShotExamples == null || !this.fewShotExamples.isPresent()) { + this.fewShotExamples = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.fewShotExamples.get().add(fewShotExamplesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get fewShotExamples + * @return fewShotExamples + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getFewShotExamples() { + return fewShotExamples.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FEW_SHOT_EXAMPLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getFewShotExamples_JsonNullable() { + return fewShotExamples; + } + + @JsonProperty(JSON_PROPERTY_FEW_SHOT_EXAMPLES) + public void setFewShotExamples_JsonNullable(JsonNullable>> fewShotExamples) { + this.fewShotExamples = fewShotExamples; + } + + public void setFewShotExamples(@javax.annotation.Nullable List> fewShotExamples) { + this.fewShotExamples = JsonNullable.>>of(fewShotExamples); + } + + + public EvalTemplateCreateV2Request mode(@javax.annotation.Nullable ModeEnum mode) { + this.mode = JsonNullable.of(mode); + return this; + } + + /** + * Get mode + * @return mode + */ + @javax.annotation.Nullable + @JsonIgnore + public ModeEnum getMode() { + return mode.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMode_JsonNullable() { + return mode; + } + + @JsonProperty(JSON_PROPERTY_MODE) + public void setMode_JsonNullable(JsonNullable mode) { + this.mode = mode; + } + + public void setMode(@javax.annotation.Nullable ModeEnum mode) { + this.mode = JsonNullable.of(mode); + } + + + public EvalTemplateCreateV2Request tools(@javax.annotation.Nullable Map tools) { + this.tools = tools; + return this; + } + + public EvalTemplateCreateV2Request putToolsItem(String key, Object toolsItem) { + if (this.tools == null) { + this.tools = new HashMap<>(); + } + this.tools.put(key, toolsItem); + return this; + } + + /** + * Get tools + * @return tools + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOOLS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTools() { + return tools; + } + + + @JsonProperty(JSON_PROPERTY_TOOLS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTools(@javax.annotation.Nullable Map tools) { + this.tools = tools; + } + + + public EvalTemplateCreateV2Request knowledgeBases(@javax.annotation.Nullable List knowledgeBases) { + this.knowledgeBases = JsonNullable.>of(knowledgeBases); + return this; + } + + public EvalTemplateCreateV2Request addKnowledgeBasesItem(String knowledgeBasesItem) { + if (this.knowledgeBases == null || !this.knowledgeBases.isPresent()) { + this.knowledgeBases = JsonNullable.>of(new ArrayList<>()); + } + try { + this.knowledgeBases.get().add(knowledgeBasesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get knowledgeBases + * @return knowledgeBases + */ + @javax.annotation.Nullable + @JsonIgnore + public List getKnowledgeBases() { + return knowledgeBases.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getKnowledgeBases_JsonNullable() { + return knowledgeBases; + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASES) + public void setKnowledgeBases_JsonNullable(JsonNullable> knowledgeBases) { + this.knowledgeBases = knowledgeBases; + } + + public void setKnowledgeBases(@javax.annotation.Nullable List knowledgeBases) { + this.knowledgeBases = JsonNullable.>of(knowledgeBases); + } + + + public EvalTemplateCreateV2Request dataInjection(@javax.annotation.Nullable Map dataInjection) { + this.dataInjection = dataInjection; + return this; + } + + public EvalTemplateCreateV2Request putDataInjectionItem(String key, Object dataInjectionItem) { + if (this.dataInjection == null) { + this.dataInjection = new HashMap<>(); + } + this.dataInjection.put(key, dataInjectionItem); + return this; + } + + /** + * Get dataInjection + * @return dataInjection + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_INJECTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDataInjection() { + return dataInjection; + } + + + @JsonProperty(JSON_PROPERTY_DATA_INJECTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDataInjection(@javax.annotation.Nullable Map dataInjection) { + this.dataInjection = dataInjection; + } + + + public EvalTemplateCreateV2Request summary(@javax.annotation.Nullable Map summary) { + this.summary = summary; + return this; + } + + public EvalTemplateCreateV2Request putSummaryItem(String key, Object summaryItem) { + if (this.summary == null) { + this.summary = new HashMap<>(); + } + this.summary.put(key, summaryItem); + return this; + } + + /** + * Get summary + * @return summary + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSummary(@javax.annotation.Nullable Map summary) { + this.summary = summary; + } + + + public EvalTemplateCreateV2Request errorLocalizerEnabled(@javax.annotation.Nullable Boolean errorLocalizerEnabled) { + this.errorLocalizerEnabled = errorLocalizerEnabled; + return this; + } + + /** + * Get errorLocalizerEnabled + * @return errorLocalizerEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizerEnabled() { + return errorLocalizerEnabled; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizerEnabled(@javax.annotation.Nullable Boolean errorLocalizerEnabled) { + this.errorLocalizerEnabled = errorLocalizerEnabled; + } + + + public EvalTemplateCreateV2Request templateFormat(@javax.annotation.Nullable TemplateFormatEnum templateFormat) { + this.templateFormat = templateFormat; + return this; + } + + /** + * Get templateFormat + * @return templateFormat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TemplateFormatEnum getTemplateFormat() { + return templateFormat; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateFormat(@javax.annotation.Nullable TemplateFormatEnum templateFormat) { + this.templateFormat = templateFormat; + } + + + /** + * Return true if this EvalTemplateCreateV2Request object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateCreateV2Request evalTemplateCreateV2Request = (EvalTemplateCreateV2Request) o; + return Objects.equals(this.name, evalTemplateCreateV2Request.name) && + Objects.equals(this.isDraft, evalTemplateCreateV2Request.isDraft) && + Objects.equals(this.evalType, evalTemplateCreateV2Request.evalType) && + Objects.equals(this.instructions, evalTemplateCreateV2Request.instructions) && + Objects.equals(this.model, evalTemplateCreateV2Request.model) && + Objects.equals(this.outputType, evalTemplateCreateV2Request.outputType) && + Objects.equals(this.passThreshold, evalTemplateCreateV2Request.passThreshold) && + Objects.equals(this.choiceScores, evalTemplateCreateV2Request.choiceScores) && + equalsNullable(this.description, evalTemplateCreateV2Request.description) && + Objects.equals(this.tags, evalTemplateCreateV2Request.tags) && + Objects.equals(this.checkInternet, evalTemplateCreateV2Request.checkInternet) && + equalsNullable(this.code, evalTemplateCreateV2Request.code) && + equalsNullable(this.codeLanguage, evalTemplateCreateV2Request.codeLanguage) && + equalsNullable(this.messages, evalTemplateCreateV2Request.messages) && + equalsNullable(this.fewShotExamples, evalTemplateCreateV2Request.fewShotExamples) && + equalsNullable(this.mode, evalTemplateCreateV2Request.mode) && + Objects.equals(this.tools, evalTemplateCreateV2Request.tools) && + equalsNullable(this.knowledgeBases, evalTemplateCreateV2Request.knowledgeBases) && + Objects.equals(this.dataInjection, evalTemplateCreateV2Request.dataInjection) && + Objects.equals(this.summary, evalTemplateCreateV2Request.summary) && + Objects.equals(this.errorLocalizerEnabled, evalTemplateCreateV2Request.errorLocalizerEnabled) && + Objects.equals(this.templateFormat, evalTemplateCreateV2Request.templateFormat); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, isDraft, evalType, instructions, model, outputType, passThreshold, choiceScores, hashCodeNullable(description), tags, checkInternet, hashCodeNullable(code), hashCodeNullable(codeLanguage), hashCodeNullable(messages), hashCodeNullable(fewShotExamples), hashCodeNullable(mode), tools, hashCodeNullable(knowledgeBases), dataInjection, summary, errorLocalizerEnabled, templateFormat); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateCreateV2Request {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isDraft: ").append(toIndentedString(isDraft)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" passThreshold: ").append(toIndentedString(passThreshold)).append("\n"); + sb.append(" choiceScores: ").append(toIndentedString(choiceScores)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" checkInternet: ").append(toIndentedString(checkInternet)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" codeLanguage: ").append(toIndentedString(codeLanguage)).append("\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" fewShotExamples: ").append(toIndentedString(fewShotExamples)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" tools: ").append(toIndentedString(tools)).append("\n"); + sb.append(" knowledgeBases: ").append(toIndentedString(knowledgeBases)).append("\n"); + sb.append(" dataInjection: ").append(toIndentedString(dataInjection)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" errorLocalizerEnabled: ").append(toIndentedString(errorLocalizerEnabled)).append("\n"); + sb.append(" templateFormat: ").append(toIndentedString(templateFormat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `is_draft` to the URL query string + if (getIsDraft() != null) { + joiner.add(String.format("%sis_draft%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDraft())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `instructions` to the URL query string + if (getInstructions() != null) { + joiner.add(String.format("%sinstructions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstructions())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `pass_threshold` to the URL query string + if (getPassThreshold() != null) { + joiner.add(String.format("%spass_threshold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassThreshold())))); + } + + // add `choice_scores` to the URL query string + if (getChoiceScores() != null) { + for (String _key : getChoiceScores().keySet()) { + joiner.add(String.format("%schoice_scores%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChoiceScores().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChoiceScores().get(_key))))); + } + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `check_internet` to the URL query string + if (getCheckInternet() != null) { + joiner.add(String.format("%scheck_internet%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCheckInternet())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `code_language` to the URL query string + if (getCodeLanguage() != null) { + joiner.add(String.format("%scode_language%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCodeLanguage())))); + } + + // add `messages` to the URL query string + if (getMessages() != null) { + for (int i = 0; i < getMessages().size(); i++) { + joiner.add(String.format("%smessages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMessages().get(i))))); + } + } + + // add `few_shot_examples` to the URL query string + if (getFewShotExamples() != null) { + for (int i = 0; i < getFewShotExamples().size(); i++) { + joiner.add(String.format("%sfew_shot_examples%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFewShotExamples().get(i))))); + } + } + + // add `mode` to the URL query string + if (getMode() != null) { + joiner.add(String.format("%smode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMode())))); + } + + // add `tools` to the URL query string + if (getTools() != null) { + for (String _key : getTools().keySet()) { + joiner.add(String.format("%stools%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTools().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTools().get(_key))))); + } + } + + // add `knowledge_bases` to the URL query string + if (getKnowledgeBases() != null) { + for (int i = 0; i < getKnowledgeBases().size(); i++) { + joiner.add(String.format("%sknowledge_bases%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getKnowledgeBases().get(i))))); + } + } + + // add `data_injection` to the URL query string + if (getDataInjection() != null) { + for (String _key : getDataInjection().keySet()) { + joiner.add(String.format("%sdata_injection%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDataInjection().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDataInjection().get(_key))))); + } + } + + // add `summary` to the URL query string + if (getSummary() != null) { + for (String _key : getSummary().keySet()) { + joiner.add(String.format("%ssummary%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSummary().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSummary().get(_key))))); + } + } + + // add `error_localizer_enabled` to the URL query string + if (getErrorLocalizerEnabled() != null) { + joiner.add(String.format("%serror_localizer_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizerEnabled())))); + } + + // add `template_format` to the URL query string + if (getTemplateFormat() != null) { + joiner.add(String.format("%stemplate_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateFormat())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponse.java new file mode 100644 index 0000000..e1c8f9f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateDetailResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateDetailResponse + */ +@JsonPropertyOrder({ + EvalTemplateDetailResponse.JSON_PROPERTY_STATUS, + EvalTemplateDetailResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateDetailResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateDetailResponseResult result; + + public EvalTemplateDetailResponse() { + } + + public EvalTemplateDetailResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateDetailResponse result(@javax.annotation.Nonnull EvalTemplateDetailResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateDetailResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateDetailResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateDetailResponse evalTemplateDetailResponse = (EvalTemplateDetailResponse) o; + return Objects.equals(this.status, evalTemplateDetailResponse.status) && + Objects.equals(this.result, evalTemplateDetailResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateDetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponseResult.java new file mode 100644 index 0000000..8c42cd4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateDetailResponseResult.java @@ -0,0 +1,1275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateDetailResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateDetailResponseResult.JSON_PROPERTY_ID, + EvalTemplateDetailResponseResult.JSON_PROPERTY_NAME, + EvalTemplateDetailResponseResult.JSON_PROPERTY_DESCRIPTION, + EvalTemplateDetailResponseResult.JSON_PROPERTY_TEMPLATE_TYPE, + EvalTemplateDetailResponseResult.JSON_PROPERTY_EVAL_TYPE, + EvalTemplateDetailResponseResult.JSON_PROPERTY_INSTRUCTIONS, + EvalTemplateDetailResponseResult.JSON_PROPERTY_MODEL, + EvalTemplateDetailResponseResult.JSON_PROPERTY_OUTPUT_TYPE, + EvalTemplateDetailResponseResult.JSON_PROPERTY_PASS_THRESHOLD, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CHOICE_SCORES, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CHOICES, + EvalTemplateDetailResponseResult.JSON_PROPERTY_MULTI_CHOICE, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CODE, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CODE_LANGUAGE, + EvalTemplateDetailResponseResult.JSON_PROPERTY_REQUIRED_KEYS, + EvalTemplateDetailResponseResult.JSON_PROPERTY_OWNER, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CREATED_BY_NAME, + EvalTemplateDetailResponseResult.JSON_PROPERTY_VERSION_COUNT, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CURRENT_VERSION, + EvalTemplateDetailResponseResult.JSON_PROPERTY_TAGS, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CHECK_INTERNET, + EvalTemplateDetailResponseResult.JSON_PROPERTY_ERROR_LOCALIZER_ENABLED, + EvalTemplateDetailResponseResult.JSON_PROPERTY_TEMPLATE_FORMAT, + EvalTemplateDetailResponseResult.JSON_PROPERTY_AGGREGATION_ENABLED, + EvalTemplateDetailResponseResult.JSON_PROPERTY_AGGREGATION_FUNCTION, + EvalTemplateDetailResponseResult.JSON_PROPERTY_COMPOSITE_CHILD_AXIS, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CONFIG, + EvalTemplateDetailResponseResult.JSON_PROPERTY_CREATED_AT, + EvalTemplateDetailResponseResult.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateDetailResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEMPLATE_TYPE = "template_type"; + @javax.annotation.Nonnull + private String templateType; + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nonnull + private String evalType; + + public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + private JsonNullable instructions = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nonnull + private String outputType; + + public static final String JSON_PROPERTY_PASS_THRESHOLD = "pass_threshold"; + @javax.annotation.Nonnull + private BigDecimal passThreshold; + + public static final String JSON_PROPERTY_CHOICE_SCORES = "choice_scores"; + @javax.annotation.Nullable + private Map choiceScores = new HashMap<>(); + + public static final String JSON_PROPERTY_CHOICES = "choices"; + @javax.annotation.Nullable + private Map choices = new HashMap<>(); + + public static final String JSON_PROPERTY_MULTI_CHOICE = "multi_choice"; + @javax.annotation.Nonnull + private Boolean multiChoice; + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE_LANGUAGE = "code_language"; + private JsonNullable codeLanguage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REQUIRED_KEYS = "required_keys"; + @javax.annotation.Nonnull + private List requiredKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_OWNER = "owner"; + @javax.annotation.Nonnull + private String owner; + + public static final String JSON_PROPERTY_CREATED_BY_NAME = "created_by_name"; + @javax.annotation.Nonnull + private String createdByName; + + public static final String JSON_PROPERTY_VERSION_COUNT = "version_count"; + @javax.annotation.Nonnull + private Integer versionCount; + + public static final String JSON_PROPERTY_CURRENT_VERSION = "current_version"; + @javax.annotation.Nonnull + private String currentVersion; + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nonnull + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_CHECK_INTERNET = "check_internet"; + @javax.annotation.Nonnull + private Boolean checkInternet; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER_ENABLED = "error_localizer_enabled"; + @javax.annotation.Nonnull + private Boolean errorLocalizerEnabled; + + public static final String JSON_PROPERTY_TEMPLATE_FORMAT = "template_format"; + @javax.annotation.Nonnull + private String templateFormat; + + public static final String JSON_PROPERTY_AGGREGATION_ENABLED = "aggregation_enabled"; + @javax.annotation.Nonnull + private Boolean aggregationEnabled; + + public static final String JSON_PROPERTY_AGGREGATION_FUNCTION = "aggregation_function"; + @javax.annotation.Nonnull + private String aggregationFunction; + + public static final String JSON_PROPERTY_COMPOSITE_CHILD_AXIS = "composite_child_axis"; + @javax.annotation.Nullable + private String compositeChildAxis; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nonnull + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nonnull + private String updatedAt; + + public EvalTemplateDetailResponseResult() { + } + + public EvalTemplateDetailResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalTemplateDetailResponseResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public EvalTemplateDetailResponseResult description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public EvalTemplateDetailResponseResult templateType(@javax.annotation.Nonnull String templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTemplateType() { + return templateType; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateType(@javax.annotation.Nonnull String templateType) { + this.templateType = templateType; + } + + + public EvalTemplateDetailResponseResult evalType(@javax.annotation.Nonnull String evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalType(@javax.annotation.Nonnull String evalType) { + this.evalType = evalType; + } + + + public EvalTemplateDetailResponseResult instructions(@javax.annotation.Nullable String instructions) { + this.instructions = JsonNullable.of(instructions); + return this; + } + + /** + * Get instructions + * @return instructions + */ + @javax.annotation.Nullable + @JsonIgnore + public String getInstructions() { + return instructions.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInstructions_JsonNullable() { + return instructions; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + public void setInstructions_JsonNullable(JsonNullable instructions) { + this.instructions = instructions; + } + + public void setInstructions(@javax.annotation.Nullable String instructions) { + this.instructions = JsonNullable.of(instructions); + } + + + public EvalTemplateDetailResponseResult model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public EvalTemplateDetailResponseResult outputType(@javax.annotation.Nonnull String outputType) { + this.outputType = outputType; + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutputType() { + return outputType; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutputType(@javax.annotation.Nonnull String outputType) { + this.outputType = outputType; + } + + + public EvalTemplateDetailResponseResult passThreshold(@javax.annotation.Nonnull BigDecimal passThreshold) { + this.passThreshold = passThreshold; + return this; + } + + /** + * Get passThreshold + * @return passThreshold + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getPassThreshold() { + return passThreshold; + } + + + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassThreshold(@javax.annotation.Nonnull BigDecimal passThreshold) { + this.passThreshold = passThreshold; + } + + + public EvalTemplateDetailResponseResult choiceScores(@javax.annotation.Nullable Map choiceScores) { + this.choiceScores = choiceScores; + return this; + } + + public EvalTemplateDetailResponseResult putChoiceScoresItem(String key, Object choiceScoresItem) { + if (this.choiceScores == null) { + this.choiceScores = new HashMap<>(); + } + this.choiceScores.put(key, choiceScoresItem); + return this; + } + + /** + * Get choiceScores + * @return choiceScores + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICE_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChoiceScores() { + return choiceScores; + } + + + @JsonProperty(JSON_PROPERTY_CHOICE_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChoiceScores(@javax.annotation.Nullable Map choiceScores) { + this.choiceScores = choiceScores; + } + + + public EvalTemplateDetailResponseResult choices(@javax.annotation.Nullable Map choices) { + this.choices = choices; + return this; + } + + public EvalTemplateDetailResponseResult putChoicesItem(String key, Object choicesItem) { + if (this.choices == null) { + this.choices = new HashMap<>(); + } + this.choices.put(key, choicesItem); + return this; + } + + /** + * Get choices + * @return choices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChoices() { + return choices; + } + + + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChoices(@javax.annotation.Nullable Map choices) { + this.choices = choices; + } + + + public EvalTemplateDetailResponseResult multiChoice(@javax.annotation.Nonnull Boolean multiChoice) { + this.multiChoice = multiChoice; + return this; + } + + /** + * Get multiChoice + * @return multiChoice + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getMultiChoice() { + return multiChoice; + } + + + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMultiChoice(@javax.annotation.Nonnull Boolean multiChoice) { + this.multiChoice = multiChoice; + } + + + public EvalTemplateDetailResponseResult code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public EvalTemplateDetailResponseResult codeLanguage(@javax.annotation.Nullable String codeLanguage) { + this.codeLanguage = JsonNullable.of(codeLanguage); + return this; + } + + /** + * Get codeLanguage + * @return codeLanguage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCodeLanguage() { + return codeLanguage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCodeLanguage_JsonNullable() { + return codeLanguage; + } + + @JsonProperty(JSON_PROPERTY_CODE_LANGUAGE) + public void setCodeLanguage_JsonNullable(JsonNullable codeLanguage) { + this.codeLanguage = codeLanguage; + } + + public void setCodeLanguage(@javax.annotation.Nullable String codeLanguage) { + this.codeLanguage = JsonNullable.of(codeLanguage); + } + + + public EvalTemplateDetailResponseResult requiredKeys(@javax.annotation.Nonnull List requiredKeys) { + this.requiredKeys = requiredKeys; + return this; + } + + public EvalTemplateDetailResponseResult addRequiredKeysItem(String requiredKeysItem) { + if (this.requiredKeys == null) { + this.requiredKeys = new ArrayList<>(); + } + this.requiredKeys.add(requiredKeysItem); + return this; + } + + /** + * Get requiredKeys + * @return requiredKeys + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRequiredKeys() { + return requiredKeys; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequiredKeys(@javax.annotation.Nonnull List requiredKeys) { + this.requiredKeys = requiredKeys; + } + + + public EvalTemplateDetailResponseResult owner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + return this; + } + + /** + * Get owner + * @return owner + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOwner() { + return owner; + } + + + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOwner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + } + + + public EvalTemplateDetailResponseResult createdByName(@javax.annotation.Nonnull String createdByName) { + this.createdByName = createdByName; + return this; + } + + /** + * Get createdByName + * @return createdByName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedByName() { + return createdByName; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedByName(@javax.annotation.Nonnull String createdByName) { + this.createdByName = createdByName; + } + + + public EvalTemplateDetailResponseResult versionCount(@javax.annotation.Nonnull Integer versionCount) { + this.versionCount = versionCount; + return this; + } + + /** + * Get versionCount + * @return versionCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getVersionCount() { + return versionCount; + } + + + @JsonProperty(JSON_PROPERTY_VERSION_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersionCount(@javax.annotation.Nonnull Integer versionCount) { + this.versionCount = versionCount; + } + + + public EvalTemplateDetailResponseResult currentVersion(@javax.annotation.Nonnull String currentVersion) { + this.currentVersion = currentVersion; + return this; + } + + /** + * Get currentVersion + * @return currentVersion + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCurrentVersion() { + return currentVersion; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrentVersion(@javax.annotation.Nonnull String currentVersion) { + this.currentVersion = currentVersion; + } + + + public EvalTemplateDetailResponseResult tags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public EvalTemplateDetailResponseResult addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public EvalTemplateDetailResponseResult checkInternet(@javax.annotation.Nonnull Boolean checkInternet) { + this.checkInternet = checkInternet; + return this; + } + + /** + * Get checkInternet + * @return checkInternet + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHECK_INTERNET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCheckInternet() { + return checkInternet; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_INTERNET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCheckInternet(@javax.annotation.Nonnull Boolean checkInternet) { + this.checkInternet = checkInternet; + } + + + public EvalTemplateDetailResponseResult errorLocalizerEnabled(@javax.annotation.Nonnull Boolean errorLocalizerEnabled) { + this.errorLocalizerEnabled = errorLocalizerEnabled; + return this; + } + + /** + * Get errorLocalizerEnabled + * @return errorLocalizerEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getErrorLocalizerEnabled() { + return errorLocalizerEnabled; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorLocalizerEnabled(@javax.annotation.Nonnull Boolean errorLocalizerEnabled) { + this.errorLocalizerEnabled = errorLocalizerEnabled; + } + + + public EvalTemplateDetailResponseResult templateFormat(@javax.annotation.Nonnull String templateFormat) { + this.templateFormat = templateFormat; + return this; + } + + /** + * Get templateFormat + * @return templateFormat + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTemplateFormat() { + return templateFormat; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateFormat(@javax.annotation.Nonnull String templateFormat) { + this.templateFormat = templateFormat; + } + + + public EvalTemplateDetailResponseResult aggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + return this; + } + + /** + * Get aggregationEnabled + * @return aggregationEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAggregationEnabled() { + return aggregationEnabled; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregationEnabled(@javax.annotation.Nonnull Boolean aggregationEnabled) { + this.aggregationEnabled = aggregationEnabled; + } + + + public EvalTemplateDetailResponseResult aggregationFunction(@javax.annotation.Nonnull String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + return this; + } + + /** + * Get aggregationFunction + * @return aggregationFunction + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAggregationFunction() { + return aggregationFunction; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATION_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregationFunction(@javax.annotation.Nonnull String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + } + + + public EvalTemplateDetailResponseResult compositeChildAxis(@javax.annotation.Nullable String compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + return this; + } + + /** + * Get compositeChildAxis + * @return compositeChildAxis + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompositeChildAxis() { + return compositeChildAxis; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_CHILD_AXIS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeChildAxis(@javax.annotation.Nullable String compositeChildAxis) { + this.compositeChildAxis = compositeChildAxis; + } + + + public EvalTemplateDetailResponseResult config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public EvalTemplateDetailResponseResult putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public EvalTemplateDetailResponseResult createdAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + } + + + public EvalTemplateDetailResponseResult updatedAt(@javax.annotation.Nonnull String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(@javax.annotation.Nonnull String updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this EvalTemplateDetailResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateDetailResponseResult evalTemplateDetailResponseResult = (EvalTemplateDetailResponseResult) o; + return Objects.equals(this.id, evalTemplateDetailResponseResult.id) && + Objects.equals(this.name, evalTemplateDetailResponseResult.name) && + equalsNullable(this.description, evalTemplateDetailResponseResult.description) && + Objects.equals(this.templateType, evalTemplateDetailResponseResult.templateType) && + Objects.equals(this.evalType, evalTemplateDetailResponseResult.evalType) && + equalsNullable(this.instructions, evalTemplateDetailResponseResult.instructions) && + equalsNullable(this.model, evalTemplateDetailResponseResult.model) && + Objects.equals(this.outputType, evalTemplateDetailResponseResult.outputType) && + Objects.equals(this.passThreshold, evalTemplateDetailResponseResult.passThreshold) && + Objects.equals(this.choiceScores, evalTemplateDetailResponseResult.choiceScores) && + Objects.equals(this.choices, evalTemplateDetailResponseResult.choices) && + Objects.equals(this.multiChoice, evalTemplateDetailResponseResult.multiChoice) && + equalsNullable(this.code, evalTemplateDetailResponseResult.code) && + equalsNullable(this.codeLanguage, evalTemplateDetailResponseResult.codeLanguage) && + Objects.equals(this.requiredKeys, evalTemplateDetailResponseResult.requiredKeys) && + Objects.equals(this.owner, evalTemplateDetailResponseResult.owner) && + Objects.equals(this.createdByName, evalTemplateDetailResponseResult.createdByName) && + Objects.equals(this.versionCount, evalTemplateDetailResponseResult.versionCount) && + Objects.equals(this.currentVersion, evalTemplateDetailResponseResult.currentVersion) && + Objects.equals(this.tags, evalTemplateDetailResponseResult.tags) && + Objects.equals(this.checkInternet, evalTemplateDetailResponseResult.checkInternet) && + Objects.equals(this.errorLocalizerEnabled, evalTemplateDetailResponseResult.errorLocalizerEnabled) && + Objects.equals(this.templateFormat, evalTemplateDetailResponseResult.templateFormat) && + Objects.equals(this.aggregationEnabled, evalTemplateDetailResponseResult.aggregationEnabled) && + Objects.equals(this.aggregationFunction, evalTemplateDetailResponseResult.aggregationFunction) && + Objects.equals(this.compositeChildAxis, evalTemplateDetailResponseResult.compositeChildAxis) && + Objects.equals(this.config, evalTemplateDetailResponseResult.config) && + Objects.equals(this.createdAt, evalTemplateDetailResponseResult.createdAt) && + Objects.equals(this.updatedAt, evalTemplateDetailResponseResult.updatedAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(description), templateType, evalType, hashCodeNullable(instructions), hashCodeNullable(model), outputType, passThreshold, choiceScores, choices, multiChoice, hashCodeNullable(code), hashCodeNullable(codeLanguage), requiredKeys, owner, createdByName, versionCount, currentVersion, tags, checkInternet, errorLocalizerEnabled, templateFormat, aggregationEnabled, aggregationFunction, compositeChildAxis, config, createdAt, updatedAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateDetailResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" passThreshold: ").append(toIndentedString(passThreshold)).append("\n"); + sb.append(" choiceScores: ").append(toIndentedString(choiceScores)).append("\n"); + sb.append(" choices: ").append(toIndentedString(choices)).append("\n"); + sb.append(" multiChoice: ").append(toIndentedString(multiChoice)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" codeLanguage: ").append(toIndentedString(codeLanguage)).append("\n"); + sb.append(" requiredKeys: ").append(toIndentedString(requiredKeys)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" createdByName: ").append(toIndentedString(createdByName)).append("\n"); + sb.append(" versionCount: ").append(toIndentedString(versionCount)).append("\n"); + sb.append(" currentVersion: ").append(toIndentedString(currentVersion)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" checkInternet: ").append(toIndentedString(checkInternet)).append("\n"); + sb.append(" errorLocalizerEnabled: ").append(toIndentedString(errorLocalizerEnabled)).append("\n"); + sb.append(" templateFormat: ").append(toIndentedString(templateFormat)).append("\n"); + sb.append(" aggregationEnabled: ").append(toIndentedString(aggregationEnabled)).append("\n"); + sb.append(" aggregationFunction: ").append(toIndentedString(aggregationFunction)).append("\n"); + sb.append(" compositeChildAxis: ").append(toIndentedString(compositeChildAxis)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `template_type` to the URL query string + if (getTemplateType() != null) { + joiner.add(String.format("%stemplate_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateType())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `instructions` to the URL query string + if (getInstructions() != null) { + joiner.add(String.format("%sinstructions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstructions())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `pass_threshold` to the URL query string + if (getPassThreshold() != null) { + joiner.add(String.format("%spass_threshold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassThreshold())))); + } + + // add `choice_scores` to the URL query string + if (getChoiceScores() != null) { + for (String _key : getChoiceScores().keySet()) { + joiner.add(String.format("%schoice_scores%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChoiceScores().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChoiceScores().get(_key))))); + } + } + + // add `choices` to the URL query string + if (getChoices() != null) { + for (String _key : getChoices().keySet()) { + joiner.add(String.format("%schoices%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChoices().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChoices().get(_key))))); + } + } + + // add `multi_choice` to the URL query string + if (getMultiChoice() != null) { + joiner.add(String.format("%smulti_choice%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiChoice())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `code_language` to the URL query string + if (getCodeLanguage() != null) { + joiner.add(String.format("%scode_language%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCodeLanguage())))); + } + + // add `required_keys` to the URL query string + if (getRequiredKeys() != null) { + for (int i = 0; i < getRequiredKeys().size(); i++) { + joiner.add(String.format("%srequired_keys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRequiredKeys().get(i))))); + } + } + + // add `owner` to the URL query string + if (getOwner() != null) { + joiner.add(String.format("%sowner%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOwner())))); + } + + // add `created_by_name` to the URL query string + if (getCreatedByName() != null) { + joiner.add(String.format("%screated_by_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByName())))); + } + + // add `version_count` to the URL query string + if (getVersionCount() != null) { + joiner.add(String.format("%sversion_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionCount())))); + } + + // add `current_version` to the URL query string + if (getCurrentVersion() != null) { + joiner.add(String.format("%scurrent_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentVersion())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `check_internet` to the URL query string + if (getCheckInternet() != null) { + joiner.add(String.format("%scheck_internet%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCheckInternet())))); + } + + // add `error_localizer_enabled` to the URL query string + if (getErrorLocalizerEnabled() != null) { + joiner.add(String.format("%serror_localizer_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizerEnabled())))); + } + + // add `template_format` to the URL query string + if (getTemplateFormat() != null) { + joiner.add(String.format("%stemplate_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateFormat())))); + } + + // add `aggregation_enabled` to the URL query string + if (getAggregationEnabled() != null) { + joiner.add(String.format("%saggregation_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationEnabled())))); + } + + // add `aggregation_function` to the URL query string + if (getAggregationFunction() != null) { + joiner.add(String.format("%saggregation_function%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregationFunction())))); + } + + // add `composite_child_axis` to the URL query string + if (getCompositeChildAxis() != null) { + joiner.add(String.format("%scomposite_child_axis%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompositeChildAxis())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsItem.java new file mode 100644 index 0000000..83f2660 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsItem.java @@ -0,0 +1,252 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateChartPoint; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateListChartsItem + */ +@JsonPropertyOrder({ + EvalTemplateListChartsItem.JSON_PROPERTY_CHART, + EvalTemplateListChartsItem.JSON_PROPERTY_ERROR_RATE, + EvalTemplateListChartsItem.JSON_PROPERTY_RUN_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateListChartsItem { + public static final String JSON_PROPERTY_CHART = "chart"; + @javax.annotation.Nonnull + private List chart = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERROR_RATE = "error_rate"; + @javax.annotation.Nonnull + private List errorRate = new ArrayList<>(); + + public static final String JSON_PROPERTY_RUN_COUNT = "run_count"; + @javax.annotation.Nonnull + private Integer runCount; + + public EvalTemplateListChartsItem() { + } + + public EvalTemplateListChartsItem chart(@javax.annotation.Nonnull List chart) { + this.chart = chart; + return this; + } + + public EvalTemplateListChartsItem addChartItem(EvalTemplateChartPoint chartItem) { + if (this.chart == null) { + this.chart = new ArrayList<>(); + } + this.chart.add(chartItem); + return this; + } + + /** + * Get chart + * @return chart + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHART) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChart() { + return chart; + } + + + @JsonProperty(JSON_PROPERTY_CHART) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChart(@javax.annotation.Nonnull List chart) { + this.chart = chart; + } + + + public EvalTemplateListChartsItem errorRate(@javax.annotation.Nonnull List errorRate) { + this.errorRate = errorRate; + return this; + } + + public EvalTemplateListChartsItem addErrorRateItem(EvalTemplateChartPoint errorRateItem) { + if (this.errorRate == null) { + this.errorRate = new ArrayList<>(); + } + this.errorRate.add(errorRateItem); + return this; + } + + /** + * Get errorRate + * @return errorRate + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getErrorRate() { + return errorRate; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorRate(@javax.annotation.Nonnull List errorRate) { + this.errorRate = errorRate; + } + + + public EvalTemplateListChartsItem runCount(@javax.annotation.Nonnull Integer runCount) { + this.runCount = runCount; + return this; + } + + /** + * Get runCount + * @return runCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRunCount() { + return runCount; + } + + + @JsonProperty(JSON_PROPERTY_RUN_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunCount(@javax.annotation.Nonnull Integer runCount) { + this.runCount = runCount; + } + + + /** + * Return true if this EvalTemplateListChartsItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateListChartsItem evalTemplateListChartsItem = (EvalTemplateListChartsItem) o; + return Objects.equals(this.chart, evalTemplateListChartsItem.chart) && + Objects.equals(this.errorRate, evalTemplateListChartsItem.errorRate) && + Objects.equals(this.runCount, evalTemplateListChartsItem.runCount); + } + + @Override + public int hashCode() { + return Objects.hash(chart, errorRate, runCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateListChartsItem {\n"); + sb.append(" chart: ").append(toIndentedString(chart)).append("\n"); + sb.append(" errorRate: ").append(toIndentedString(errorRate)).append("\n"); + sb.append(" runCount: ").append(toIndentedString(runCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `chart` to the URL query string + if (getChart() != null) { + for (int i = 0; i < getChart().size(); i++) { + if (getChart().get(i) != null) { + joiner.add(getChart().get(i).toUrlQueryString(String.format("%schart%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `error_rate` to the URL query string + if (getErrorRate() != null) { + for (int i = 0; i < getErrorRate().size(); i++) { + if (getErrorRate().get(i) != null) { + joiner.add(getErrorRate().get(i).toUrlQueryString(String.format("%serror_rate%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `run_count` to the URL query string + if (getRunCount() != null) { + joiner.add(String.format("%srun_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsRequest.java new file mode 100644 index 0000000..8865ca1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsRequest.java @@ -0,0 +1,168 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateListChartsRequest + */ +@JsonPropertyOrder({ + EvalTemplateListChartsRequest.JSON_PROPERTY_TEMPLATE_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateListChartsRequest { + public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @javax.annotation.Nonnull + private List templateIds = new ArrayList<>(); + + public EvalTemplateListChartsRequest() { + } + + public EvalTemplateListChartsRequest templateIds(@javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + return this; + } + + public EvalTemplateListChartsRequest addTemplateIdsItem(UUID templateIdsItem) { + if (this.templateIds == null) { + this.templateIds = new ArrayList<>(); + } + this.templateIds.add(templateIdsItem); + return this; + } + + /** + * Get templateIds + * @return templateIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateIds() { + return templateIds; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + } + + + /** + * Return true if this EvalTemplateListChartsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateListChartsRequest evalTemplateListChartsRequest = (EvalTemplateListChartsRequest) o; + return Objects.equals(this.templateIds, evalTemplateListChartsRequest.templateIds); + } + + @Override + public int hashCode() { + return Objects.hash(templateIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateListChartsRequest {\n"); + sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `template_ids` to the URL query string + if (getTemplateIds() != null) { + for (int i = 0; i < getTemplateIds().size(); i++) { + if (getTemplateIds().get(i) != null) { + joiner.add(String.format("%stemplate_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTemplateIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponse.java new file mode 100644 index 0000000..ec4da4a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateListChartsResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateListChartsResponse + */ +@JsonPropertyOrder({ + EvalTemplateListChartsResponse.JSON_PROPERTY_STATUS, + EvalTemplateListChartsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateListChartsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateListChartsResponseResult result; + + public EvalTemplateListChartsResponse() { + } + + public EvalTemplateListChartsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateListChartsResponse result(@javax.annotation.Nonnull EvalTemplateListChartsResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateListChartsResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateListChartsResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateListChartsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateListChartsResponse evalTemplateListChartsResponse = (EvalTemplateListChartsResponse) o; + return Objects.equals(this.status, evalTemplateListChartsResponse.status) && + Objects.equals(this.result, evalTemplateListChartsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateListChartsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponseResult.java new file mode 100644 index 0000000..eeb1022 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListChartsResponseResult.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateListChartsItem; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateListChartsResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateListChartsResponseResult.JSON_PROPERTY_CHARTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateListChartsResponseResult { + public static final String JSON_PROPERTY_CHARTS = "charts"; + @javax.annotation.Nonnull + private Map charts = new HashMap<>(); + + public EvalTemplateListChartsResponseResult() { + } + + public EvalTemplateListChartsResponseResult charts(@javax.annotation.Nonnull Map charts) { + this.charts = charts; + return this; + } + + public EvalTemplateListChartsResponseResult putChartsItem(String key, EvalTemplateListChartsItem chartsItem) { + if (this.charts == null) { + this.charts = new HashMap<>(); + } + this.charts.put(key, chartsItem); + return this; + } + + /** + * Get charts + * @return charts + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHARTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getCharts() { + return charts; + } + + + @JsonProperty(JSON_PROPERTY_CHARTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCharts(@javax.annotation.Nonnull Map charts) { + this.charts = charts; + } + + + /** + * Return true if this EvalTemplateListChartsResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateListChartsResponseResult evalTemplateListChartsResponseResult = (EvalTemplateListChartsResponseResult) o; + return Objects.equals(this.charts, evalTemplateListChartsResponseResult.charts); + } + + @Override + public int hashCode() { + return Objects.hash(charts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateListChartsResponseResult {\n"); + sb.append(" charts: ").append(toIndentedString(charts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `charts` to the URL query string + if (getCharts() != null) { + for (String _key : getCharts().keySet()) { + if (getCharts().get(_key) != null) { + joiner.add(getCharts().get(_key).toUrlQueryString(String.format("%scharts%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListItem.java new file mode 100644 index 0000000..10bf1e3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListItem.java @@ -0,0 +1,661 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateChartPoint; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateListItem + */ +@JsonPropertyOrder({ + EvalTemplateListItem.JSON_PROPERTY_ID, + EvalTemplateListItem.JSON_PROPERTY_NAME, + EvalTemplateListItem.JSON_PROPERTY_TEMPLATE_TYPE, + EvalTemplateListItem.JSON_PROPERTY_EVAL_TYPE, + EvalTemplateListItem.JSON_PROPERTY_OUTPUT_TYPE, + EvalTemplateListItem.JSON_PROPERTY_OWNER, + EvalTemplateListItem.JSON_PROPERTY_CREATED_BY_NAME, + EvalTemplateListItem.JSON_PROPERTY_VERSION_COUNT, + EvalTemplateListItem.JSON_PROPERTY_CURRENT_VERSION, + EvalTemplateListItem.JSON_PROPERTY_LAST_UPDATED, + EvalTemplateListItem.JSON_PROPERTY_THIRTY_DAY_CHART, + EvalTemplateListItem.JSON_PROPERTY_THIRTY_DAY_ERROR_RATE, + EvalTemplateListItem.JSON_PROPERTY_THIRTY_DAY_RUN_COUNT, + EvalTemplateListItem.JSON_PROPERTY_TAGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateListItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TEMPLATE_TYPE = "template_type"; + @javax.annotation.Nonnull + private String templateType; + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nonnull + private String evalType; + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nonnull + private String outputType; + + public static final String JSON_PROPERTY_OWNER = "owner"; + @javax.annotation.Nonnull + private String owner; + + public static final String JSON_PROPERTY_CREATED_BY_NAME = "created_by_name"; + @javax.annotation.Nonnull + private String createdByName; + + public static final String JSON_PROPERTY_VERSION_COUNT = "version_count"; + @javax.annotation.Nonnull + private Integer versionCount; + + public static final String JSON_PROPERTY_CURRENT_VERSION = "current_version"; + @javax.annotation.Nonnull + private String currentVersion; + + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; + @javax.annotation.Nonnull + private String lastUpdated; + + public static final String JSON_PROPERTY_THIRTY_DAY_CHART = "thirty_day_chart"; + @javax.annotation.Nonnull + private List thirtyDayChart = new ArrayList<>(); + + public static final String JSON_PROPERTY_THIRTY_DAY_ERROR_RATE = "thirty_day_error_rate"; + @javax.annotation.Nonnull + private List thirtyDayErrorRate = new ArrayList<>(); + + public static final String JSON_PROPERTY_THIRTY_DAY_RUN_COUNT = "thirty_day_run_count"; + @javax.annotation.Nonnull + private Integer thirtyDayRunCount; + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nonnull + private List tags = new ArrayList<>(); + + public EvalTemplateListItem() { + } + + public EvalTemplateListItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalTemplateListItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public EvalTemplateListItem templateType(@javax.annotation.Nonnull String templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTemplateType() { + return templateType; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateType(@javax.annotation.Nonnull String templateType) { + this.templateType = templateType; + } + + + public EvalTemplateListItem evalType(@javax.annotation.Nonnull String evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalType(@javax.annotation.Nonnull String evalType) { + this.evalType = evalType; + } + + + public EvalTemplateListItem outputType(@javax.annotation.Nonnull String outputType) { + this.outputType = outputType; + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutputType() { + return outputType; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutputType(@javax.annotation.Nonnull String outputType) { + this.outputType = outputType; + } + + + public EvalTemplateListItem owner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + return this; + } + + /** + * Get owner + * @return owner + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOwner() { + return owner; + } + + + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOwner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + } + + + public EvalTemplateListItem createdByName(@javax.annotation.Nonnull String createdByName) { + this.createdByName = createdByName; + return this; + } + + /** + * Get createdByName + * @return createdByName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedByName() { + return createdByName; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedByName(@javax.annotation.Nonnull String createdByName) { + this.createdByName = createdByName; + } + + + public EvalTemplateListItem versionCount(@javax.annotation.Nonnull Integer versionCount) { + this.versionCount = versionCount; + return this; + } + + /** + * Get versionCount + * @return versionCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getVersionCount() { + return versionCount; + } + + + @JsonProperty(JSON_PROPERTY_VERSION_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersionCount(@javax.annotation.Nonnull Integer versionCount) { + this.versionCount = versionCount; + } + + + public EvalTemplateListItem currentVersion(@javax.annotation.Nonnull String currentVersion) { + this.currentVersion = currentVersion; + return this; + } + + /** + * Get currentVersion + * @return currentVersion + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCurrentVersion() { + return currentVersion; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrentVersion(@javax.annotation.Nonnull String currentVersion) { + this.currentVersion = currentVersion; + } + + + public EvalTemplateListItem lastUpdated(@javax.annotation.Nonnull String lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get lastUpdated + * @return lastUpdated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLastUpdated() { + return lastUpdated; + } + + + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastUpdated(@javax.annotation.Nonnull String lastUpdated) { + this.lastUpdated = lastUpdated; + } + + + public EvalTemplateListItem thirtyDayChart(@javax.annotation.Nonnull List thirtyDayChart) { + this.thirtyDayChart = thirtyDayChart; + return this; + } + + public EvalTemplateListItem addThirtyDayChartItem(EvalTemplateChartPoint thirtyDayChartItem) { + if (this.thirtyDayChart == null) { + this.thirtyDayChart = new ArrayList<>(); + } + this.thirtyDayChart.add(thirtyDayChartItem); + return this; + } + + /** + * Get thirtyDayChart + * @return thirtyDayChart + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_THIRTY_DAY_CHART) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getThirtyDayChart() { + return thirtyDayChart; + } + + + @JsonProperty(JSON_PROPERTY_THIRTY_DAY_CHART) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setThirtyDayChart(@javax.annotation.Nonnull List thirtyDayChart) { + this.thirtyDayChart = thirtyDayChart; + } + + + public EvalTemplateListItem thirtyDayErrorRate(@javax.annotation.Nonnull List thirtyDayErrorRate) { + this.thirtyDayErrorRate = thirtyDayErrorRate; + return this; + } + + public EvalTemplateListItem addThirtyDayErrorRateItem(EvalTemplateChartPoint thirtyDayErrorRateItem) { + if (this.thirtyDayErrorRate == null) { + this.thirtyDayErrorRate = new ArrayList<>(); + } + this.thirtyDayErrorRate.add(thirtyDayErrorRateItem); + return this; + } + + /** + * Get thirtyDayErrorRate + * @return thirtyDayErrorRate + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_THIRTY_DAY_ERROR_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getThirtyDayErrorRate() { + return thirtyDayErrorRate; + } + + + @JsonProperty(JSON_PROPERTY_THIRTY_DAY_ERROR_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setThirtyDayErrorRate(@javax.annotation.Nonnull List thirtyDayErrorRate) { + this.thirtyDayErrorRate = thirtyDayErrorRate; + } + + + public EvalTemplateListItem thirtyDayRunCount(@javax.annotation.Nonnull Integer thirtyDayRunCount) { + this.thirtyDayRunCount = thirtyDayRunCount; + return this; + } + + /** + * Get thirtyDayRunCount + * @return thirtyDayRunCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_THIRTY_DAY_RUN_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getThirtyDayRunCount() { + return thirtyDayRunCount; + } + + + @JsonProperty(JSON_PROPERTY_THIRTY_DAY_RUN_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setThirtyDayRunCount(@javax.annotation.Nonnull Integer thirtyDayRunCount) { + this.thirtyDayRunCount = thirtyDayRunCount; + } + + + public EvalTemplateListItem tags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public EvalTemplateListItem addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + /** + * Return true if this EvalTemplateListItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateListItem evalTemplateListItem = (EvalTemplateListItem) o; + return Objects.equals(this.id, evalTemplateListItem.id) && + Objects.equals(this.name, evalTemplateListItem.name) && + Objects.equals(this.templateType, evalTemplateListItem.templateType) && + Objects.equals(this.evalType, evalTemplateListItem.evalType) && + Objects.equals(this.outputType, evalTemplateListItem.outputType) && + Objects.equals(this.owner, evalTemplateListItem.owner) && + Objects.equals(this.createdByName, evalTemplateListItem.createdByName) && + Objects.equals(this.versionCount, evalTemplateListItem.versionCount) && + Objects.equals(this.currentVersion, evalTemplateListItem.currentVersion) && + Objects.equals(this.lastUpdated, evalTemplateListItem.lastUpdated) && + Objects.equals(this.thirtyDayChart, evalTemplateListItem.thirtyDayChart) && + Objects.equals(this.thirtyDayErrorRate, evalTemplateListItem.thirtyDayErrorRate) && + Objects.equals(this.thirtyDayRunCount, evalTemplateListItem.thirtyDayRunCount) && + Objects.equals(this.tags, evalTemplateListItem.tags); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, templateType, evalType, outputType, owner, createdByName, versionCount, currentVersion, lastUpdated, thirtyDayChart, thirtyDayErrorRate, thirtyDayRunCount, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateListItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" createdByName: ").append(toIndentedString(createdByName)).append("\n"); + sb.append(" versionCount: ").append(toIndentedString(versionCount)).append("\n"); + sb.append(" currentVersion: ").append(toIndentedString(currentVersion)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append(" thirtyDayChart: ").append(toIndentedString(thirtyDayChart)).append("\n"); + sb.append(" thirtyDayErrorRate: ").append(toIndentedString(thirtyDayErrorRate)).append("\n"); + sb.append(" thirtyDayRunCount: ").append(toIndentedString(thirtyDayRunCount)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `template_type` to the URL query string + if (getTemplateType() != null) { + joiner.add(String.format("%stemplate_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateType())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `owner` to the URL query string + if (getOwner() != null) { + joiner.add(String.format("%sowner%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOwner())))); + } + + // add `created_by_name` to the URL query string + if (getCreatedByName() != null) { + joiner.add(String.format("%screated_by_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByName())))); + } + + // add `version_count` to the URL query string + if (getVersionCount() != null) { + joiner.add(String.format("%sversion_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionCount())))); + } + + // add `current_version` to the URL query string + if (getCurrentVersion() != null) { + joiner.add(String.format("%scurrent_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentVersion())))); + } + + // add `last_updated` to the URL query string + if (getLastUpdated() != null) { + joiner.add(String.format("%slast_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastUpdated())))); + } + + // add `thirty_day_chart` to the URL query string + if (getThirtyDayChart() != null) { + for (int i = 0; i < getThirtyDayChart().size(); i++) { + if (getThirtyDayChart().get(i) != null) { + joiner.add(getThirtyDayChart().get(i).toUrlQueryString(String.format("%sthirty_day_chart%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `thirty_day_error_rate` to the URL query string + if (getThirtyDayErrorRate() != null) { + for (int i = 0; i < getThirtyDayErrorRate().size(); i++) { + if (getThirtyDayErrorRate().get(i) != null) { + joiner.add(getThirtyDayErrorRate().get(i).toUrlQueryString(String.format("%sthirty_day_error_rate%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `thirty_day_run_count` to the URL query string + if (getThirtyDayRunCount() != null) { + joiner.add(String.format("%sthirty_day_run_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getThirtyDayRunCount())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponse.java new file mode 100644 index 0000000..4f37131 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateListResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateListResponse + */ +@JsonPropertyOrder({ + EvalTemplateListResponse.JSON_PROPERTY_STATUS, + EvalTemplateListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateListResponseResult result; + + public EvalTemplateListResponse() { + } + + public EvalTemplateListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateListResponse result(@javax.annotation.Nonnull EvalTemplateListResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateListResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateListResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateListResponse evalTemplateListResponse = (EvalTemplateListResponse) o; + return Objects.equals(this.status, evalTemplateListResponse.status) && + Objects.equals(this.result, evalTemplateListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponseResult.java new file mode 100644 index 0000000..6af1e3d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateListResponseResult.java @@ -0,0 +1,275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateListItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateListResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateListResponseResult.JSON_PROPERTY_ITEMS, + EvalTemplateListResponseResult.JSON_PROPERTY_TOTAL, + EvalTemplateListResponseResult.JSON_PROPERTY_PAGE, + EvalTemplateListResponseResult.JSON_PROPERTY_PAGE_SIZE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateListResponseResult { + public static final String JSON_PROPERTY_ITEMS = "items"; + @javax.annotation.Nonnull + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public static final String JSON_PROPERTY_PAGE = "page"; + @javax.annotation.Nonnull + private Integer page; + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + @javax.annotation.Nonnull + private Integer pageSize; + + public EvalTemplateListResponseResult() { + } + + public EvalTemplateListResponseResult items(@javax.annotation.Nonnull List items) { + this.items = items; + return this; + } + + public EvalTemplateListResponseResult addItemsItem(EvalTemplateListItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setItems(@javax.annotation.Nonnull List items) { + this.items = items; + } + + + public EvalTemplateListResponseResult total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + public EvalTemplateListResponseResult page(@javax.annotation.Nonnull Integer page) { + this.page = page; + return this; + } + + /** + * Get page + * @return page + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPage() { + return page; + } + + + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPage(@javax.annotation.Nonnull Integer page) { + this.page = page; + } + + + public EvalTemplateListResponseResult pageSize(@javax.annotation.Nonnull Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Get pageSize + * @return pageSize + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPageSize() { + return pageSize; + } + + + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPageSize(@javax.annotation.Nonnull Integer pageSize) { + this.pageSize = pageSize; + } + + + /** + * Return true if this EvalTemplateListResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateListResponseResult evalTemplateListResponseResult = (EvalTemplateListResponseResult) o; + return Objects.equals(this.items, evalTemplateListResponseResult.items) && + Objects.equals(this.total, evalTemplateListResponseResult.total) && + Objects.equals(this.page, evalTemplateListResponseResult.page) && + Objects.equals(this.pageSize, evalTemplateListResponseResult.pageSize); + } + + @Override + public int hashCode() { + return Objects.hash(items, total, page, pageSize); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateListResponseResult {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `items` to the URL query string + if (getItems() != null) { + for (int i = 0; i < getItems().size(); i++) { + if (getItems().get(i) != null) { + joiner.add(getItems().get(i).toUrlQueryString(String.format("%sitems%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `page` to the URL query string + if (getPage() != null) { + joiner.add(String.format("%spage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPage())))); + } + + // add `page_size` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format("%spage_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateSummary.java new file mode 100644 index 0000000..a866ad3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateSummary.java @@ -0,0 +1,273 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateSummary + */ +@JsonPropertyOrder({ + EvalTemplateSummary.JSON_PROPERTY_NAME, + EvalTemplateSummary.JSON_PROPERTY_ID, + EvalTemplateSummary.JSON_PROPERTY_TOTAL_CELLS, + EvalTemplateSummary.JSON_PROPERTY_OUTPUT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateSummary { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_TOTAL_CELLS = "total_cells"; + @javax.annotation.Nonnull + private Integer totalCells; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nonnull + private Map output = new HashMap<>(); + + public EvalTemplateSummary() { + } + + public EvalTemplateSummary name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public EvalTemplateSummary id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public EvalTemplateSummary totalCells(@javax.annotation.Nonnull Integer totalCells) { + this.totalCells = totalCells; + return this; + } + + /** + * Get totalCells + * @return totalCells + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_CELLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalCells() { + return totalCells; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_CELLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalCells(@javax.annotation.Nonnull Integer totalCells) { + this.totalCells = totalCells; + } + + + public EvalTemplateSummary output(@javax.annotation.Nonnull Map output) { + this.output = output; + return this; + } + + public EvalTemplateSummary putOutputItem(String key, Object outputItem) { + if (this.output == null) { + this.output = new HashMap<>(); + } + this.output.put(key, outputItem); + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setOutput(@javax.annotation.Nonnull Map output) { + this.output = output; + } + + + /** + * Return true if this EvalTemplateSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateSummary evalTemplateSummary = (EvalTemplateSummary) o; + return Objects.equals(this.name, evalTemplateSummary.name) && + Objects.equals(this.id, evalTemplateSummary.id) && + Objects.equals(this.totalCells, evalTemplateSummary.totalCells) && + Objects.equals(this.output, evalTemplateSummary.output); + } + + @Override + public int hashCode() { + return Objects.hash(name, id, totalCells, output); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateSummary {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" totalCells: ").append(toIndentedString(totalCells)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `total_cells` to the URL query string + if (getTotalCells() != null) { + joiner.add(String.format("%stotal_cells%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCells())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponse.java new file mode 100644 index 0000000..74df942 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateUpdateResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateUpdateResponse + */ +@JsonPropertyOrder({ + EvalTemplateUpdateResponse.JSON_PROPERTY_STATUS, + EvalTemplateUpdateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateUpdateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateUpdateResponseResult result; + + public EvalTemplateUpdateResponse() { + } + + public EvalTemplateUpdateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateUpdateResponse result(@javax.annotation.Nonnull EvalTemplateUpdateResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateUpdateResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateUpdateResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateUpdateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateUpdateResponse evalTemplateUpdateResponse = (EvalTemplateUpdateResponse) o; + return Objects.equals(this.status, evalTemplateUpdateResponse.status) && + Objects.equals(this.result, evalTemplateUpdateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateUpdateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponseResult.java new file mode 100644 index 0000000..b0786ed --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateResponseResult.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateUpdateResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateUpdateResponseResult.JSON_PROPERTY_ID, + EvalTemplateUpdateResponseResult.JSON_PROPERTY_NAME, + EvalTemplateUpdateResponseResult.JSON_PROPERTY_UPDATED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateUpdateResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_UPDATED = "updated"; + @javax.annotation.Nonnull + private Boolean updated; + + public EvalTemplateUpdateResponseResult() { + } + + public EvalTemplateUpdateResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalTemplateUpdateResponseResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public EvalTemplateUpdateResponseResult updated(@javax.annotation.Nonnull Boolean updated) { + this.updated = updated; + return this; + } + + /** + * Get updated + * @return updated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getUpdated() { + return updated; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdated(@javax.annotation.Nonnull Boolean updated) { + this.updated = updated; + } + + + /** + * Return true if this EvalTemplateUpdateResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateUpdateResponseResult evalTemplateUpdateResponseResult = (EvalTemplateUpdateResponseResult) o; + return Objects.equals(this.id, evalTemplateUpdateResponseResult.id) && + Objects.equals(this.name, evalTemplateUpdateResponseResult.name) && + Objects.equals(this.updated, evalTemplateUpdateResponseResult.updated); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, updated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateUpdateResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `updated` to the URL query string + if (getUpdated() != null) { + joiner.add(String.format("%supdated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdated())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateV2Request.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateV2Request.java new file mode 100644 index 0000000..bb99607 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateUpdateV2Request.java @@ -0,0 +1,1391 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateUpdateV2Request + */ +@JsonPropertyOrder({ + EvalTemplateUpdateV2Request.JSON_PROPERTY_NAME, + EvalTemplateUpdateV2Request.JSON_PROPERTY_EVAL_TYPE, + EvalTemplateUpdateV2Request.JSON_PROPERTY_INSTRUCTIONS, + EvalTemplateUpdateV2Request.JSON_PROPERTY_MODEL, + EvalTemplateUpdateV2Request.JSON_PROPERTY_OUTPUT_TYPE, + EvalTemplateUpdateV2Request.JSON_PROPERTY_PASS_THRESHOLD, + EvalTemplateUpdateV2Request.JSON_PROPERTY_CHOICE_SCORES, + EvalTemplateUpdateV2Request.JSON_PROPERTY_MULTI_CHOICE, + EvalTemplateUpdateV2Request.JSON_PROPERTY_DESCRIPTION, + EvalTemplateUpdateV2Request.JSON_PROPERTY_TAGS, + EvalTemplateUpdateV2Request.JSON_PROPERTY_CHECK_INTERNET, + EvalTemplateUpdateV2Request.JSON_PROPERTY_CODE, + EvalTemplateUpdateV2Request.JSON_PROPERTY_CODE_LANGUAGE, + EvalTemplateUpdateV2Request.JSON_PROPERTY_MESSAGES, + EvalTemplateUpdateV2Request.JSON_PROPERTY_FEW_SHOT_EXAMPLES, + EvalTemplateUpdateV2Request.JSON_PROPERTY_MODE, + EvalTemplateUpdateV2Request.JSON_PROPERTY_TOOLS, + EvalTemplateUpdateV2Request.JSON_PROPERTY_KNOWLEDGE_BASES, + EvalTemplateUpdateV2Request.JSON_PROPERTY_DATA_INJECTION, + EvalTemplateUpdateV2Request.JSON_PROPERTY_SUMMARY, + EvalTemplateUpdateV2Request.JSON_PROPERTY_ERROR_LOCALIZER_ENABLED, + EvalTemplateUpdateV2Request.JSON_PROPERTY_PUBLISH, + EvalTemplateUpdateV2Request.JSON_PROPERTY_TEMPLATE_FORMAT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateUpdateV2Request { + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + /** + * Gets or Sets evalType + */ + public enum EvalTypeEnum { + LLM(String.valueOf("llm")), + + CODE(String.valueOf("code")), + + AGENT(String.valueOf("agent")); + + private String value; + + EvalTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EvalTypeEnum fromValue(String value) { + for (EvalTypeEnum b : EvalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + private JsonNullable evalType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + private JsonNullable instructions = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + /** + * Gets or Sets outputType + */ + public enum OutputTypeEnum { + PASS_FAIL(String.valueOf("pass_fail")), + + PERCENTAGE(String.valueOf("percentage")), + + DETERMINISTIC(String.valueOf("deterministic")); + + private String value; + + OutputTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OutputTypeEnum fromValue(String value) { + for (OutputTypeEnum b : OutputTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + private JsonNullable outputType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PASS_THRESHOLD = "pass_threshold"; + private JsonNullable passThreshold = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CHOICE_SCORES = "choice_scores"; + @javax.annotation.Nullable + private Map choiceScores = new HashMap<>(); + + public static final String JSON_PROPERTY_MULTI_CHOICE = "multi_choice"; + private JsonNullable multiChoice = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CHECK_INTERNET = "check_internet"; + private JsonNullable checkInternet = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + /** + * Gets or Sets codeLanguage + */ + public enum CodeLanguageEnum { + PYTHON(String.valueOf("python")), + + JAVASCRIPT(String.valueOf("javascript")); + + private String value; + + CodeLanguageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CodeLanguageEnum fromValue(String value) { + for (CodeLanguageEnum b : CodeLanguageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_CODE_LANGUAGE = "code_language"; + private JsonNullable codeLanguage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGES = "messages"; + private JsonNullable>> messages = JsonNullable.>>undefined(); + + public static final String JSON_PROPERTY_FEW_SHOT_EXAMPLES = "few_shot_examples"; + private JsonNullable>> fewShotExamples = JsonNullable.>>undefined(); + + /** + * Gets or Sets mode + */ + public enum ModeEnum { + AUTO(String.valueOf("auto")), + + AGENT(String.valueOf("agent")), + + QUICK(String.valueOf("quick")); + + private String value; + + ModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModeEnum fromValue(String value) { + for (ModeEnum b : ModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_MODE = "mode"; + private JsonNullable mode = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOOLS = "tools"; + @javax.annotation.Nullable + private Map tools = new HashMap<>(); + + public static final String JSON_PROPERTY_KNOWLEDGE_BASES = "knowledge_bases"; + private JsonNullable> knowledgeBases = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_DATA_INJECTION = "data_injection"; + @javax.annotation.Nullable + private Map dataInjection = new HashMap<>(); + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + @javax.annotation.Nullable + private Map summary = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER_ENABLED = "error_localizer_enabled"; + private JsonNullable errorLocalizerEnabled = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PUBLISH = "publish"; + private JsonNullable publish = JsonNullable.undefined(); + + /** + * Gets or Sets templateFormat + */ + public enum TemplateFormatEnum { + MUSTACHE(String.valueOf("mustache")), + + JINJA(String.valueOf("jinja")); + + private String value; + + TemplateFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TemplateFormatEnum fromValue(String value) { + for (TemplateFormatEnum b : TemplateFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TEMPLATE_FORMAT = "template_format"; + private JsonNullable templateFormat = JsonNullable.undefined(); + + public EvalTemplateUpdateV2Request() { + } + + public EvalTemplateUpdateV2Request name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public EvalTemplateUpdateV2Request evalType(@javax.annotation.Nullable EvalTypeEnum evalType) { + this.evalType = JsonNullable.of(evalType); + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonIgnore + public EvalTypeEnum getEvalType() { + return evalType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalType_JsonNullable() { + return evalType; + } + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + public void setEvalType_JsonNullable(JsonNullable evalType) { + this.evalType = evalType; + } + + public void setEvalType(@javax.annotation.Nullable EvalTypeEnum evalType) { + this.evalType = JsonNullable.of(evalType); + } + + + public EvalTemplateUpdateV2Request instructions(@javax.annotation.Nullable String instructions) { + this.instructions = JsonNullable.of(instructions); + return this; + } + + /** + * Get instructions + * @return instructions + */ + @javax.annotation.Nullable + @JsonIgnore + public String getInstructions() { + return instructions.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInstructions_JsonNullable() { + return instructions; + } + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + public void setInstructions_JsonNullable(JsonNullable instructions) { + this.instructions = instructions; + } + + public void setInstructions(@javax.annotation.Nullable String instructions) { + this.instructions = JsonNullable.of(instructions); + } + + + public EvalTemplateUpdateV2Request model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public EvalTemplateUpdateV2Request outputType(@javax.annotation.Nullable OutputTypeEnum outputType) { + this.outputType = JsonNullable.of(outputType); + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonIgnore + public OutputTypeEnum getOutputType() { + return outputType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutputType_JsonNullable() { + return outputType; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + public void setOutputType_JsonNullable(JsonNullable outputType) { + this.outputType = outputType; + } + + public void setOutputType(@javax.annotation.Nullable OutputTypeEnum outputType) { + this.outputType = JsonNullable.of(outputType); + } + + + public EvalTemplateUpdateV2Request passThreshold(@javax.annotation.Nullable BigDecimal passThreshold) { + this.passThreshold = JsonNullable.of(passThreshold); + return this; + } + + /** + * Get passThreshold + * minimum: 0 + * maximum: 1 + * @return passThreshold + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getPassThreshold() { + return passThreshold.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPassThreshold_JsonNullable() { + return passThreshold; + } + + @JsonProperty(JSON_PROPERTY_PASS_THRESHOLD) + public void setPassThreshold_JsonNullable(JsonNullable passThreshold) { + this.passThreshold = passThreshold; + } + + public void setPassThreshold(@javax.annotation.Nullable BigDecimal passThreshold) { + this.passThreshold = JsonNullable.of(passThreshold); + } + + + public EvalTemplateUpdateV2Request choiceScores(@javax.annotation.Nullable Map choiceScores) { + this.choiceScores = choiceScores; + return this; + } + + public EvalTemplateUpdateV2Request putChoiceScoresItem(String key, Object choiceScoresItem) { + if (this.choiceScores == null) { + this.choiceScores = new HashMap<>(); + } + this.choiceScores.put(key, choiceScoresItem); + return this; + } + + /** + * Get choiceScores + * @return choiceScores + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICE_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChoiceScores() { + return choiceScores; + } + + + @JsonProperty(JSON_PROPERTY_CHOICE_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChoiceScores(@javax.annotation.Nullable Map choiceScores) { + this.choiceScores = choiceScores; + } + + + public EvalTemplateUpdateV2Request multiChoice(@javax.annotation.Nullable Boolean multiChoice) { + this.multiChoice = JsonNullable.of(multiChoice); + return this; + } + + /** + * Get multiChoice + * @return multiChoice + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getMultiChoice() { + return multiChoice.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMultiChoice_JsonNullable() { + return multiChoice; + } + + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + public void setMultiChoice_JsonNullable(JsonNullable multiChoice) { + this.multiChoice = multiChoice; + } + + public void setMultiChoice(@javax.annotation.Nullable Boolean multiChoice) { + this.multiChoice = JsonNullable.of(multiChoice); + } + + + public EvalTemplateUpdateV2Request description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public EvalTemplateUpdateV2Request tags(@javax.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public EvalTemplateUpdateV2Request addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + @JsonIgnore + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + public EvalTemplateUpdateV2Request checkInternet(@javax.annotation.Nullable Boolean checkInternet) { + this.checkInternet = JsonNullable.of(checkInternet); + return this; + } + + /** + * Get checkInternet + * @return checkInternet + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getCheckInternet() { + return checkInternet.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CHECK_INTERNET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCheckInternet_JsonNullable() { + return checkInternet; + } + + @JsonProperty(JSON_PROPERTY_CHECK_INTERNET) + public void setCheckInternet_JsonNullable(JsonNullable checkInternet) { + this.checkInternet = checkInternet; + } + + public void setCheckInternet(@javax.annotation.Nullable Boolean checkInternet) { + this.checkInternet = JsonNullable.of(checkInternet); + } + + + public EvalTemplateUpdateV2Request code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public EvalTemplateUpdateV2Request codeLanguage(@javax.annotation.Nullable CodeLanguageEnum codeLanguage) { + this.codeLanguage = JsonNullable.of(codeLanguage); + return this; + } + + /** + * Get codeLanguage + * @return codeLanguage + */ + @javax.annotation.Nullable + @JsonIgnore + public CodeLanguageEnum getCodeLanguage() { + return codeLanguage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCodeLanguage_JsonNullable() { + return codeLanguage; + } + + @JsonProperty(JSON_PROPERTY_CODE_LANGUAGE) + public void setCodeLanguage_JsonNullable(JsonNullable codeLanguage) { + this.codeLanguage = codeLanguage; + } + + public void setCodeLanguage(@javax.annotation.Nullable CodeLanguageEnum codeLanguage) { + this.codeLanguage = JsonNullable.of(codeLanguage); + } + + + public EvalTemplateUpdateV2Request messages(@javax.annotation.Nullable List> messages) { + this.messages = JsonNullable.>>of(messages); + return this; + } + + public EvalTemplateUpdateV2Request addMessagesItem(Map messagesItem) { + if (this.messages == null || !this.messages.isPresent()) { + this.messages = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.messages.get().add(messagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get messages + * @return messages + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getMessages() { + return messages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getMessages_JsonNullable() { + return messages; + } + + @JsonProperty(JSON_PROPERTY_MESSAGES) + public void setMessages_JsonNullable(JsonNullable>> messages) { + this.messages = messages; + } + + public void setMessages(@javax.annotation.Nullable List> messages) { + this.messages = JsonNullable.>>of(messages); + } + + + public EvalTemplateUpdateV2Request fewShotExamples(@javax.annotation.Nullable List> fewShotExamples) { + this.fewShotExamples = JsonNullable.>>of(fewShotExamples); + return this; + } + + public EvalTemplateUpdateV2Request addFewShotExamplesItem(Map fewShotExamplesItem) { + if (this.fewShotExamples == null || !this.fewShotExamples.isPresent()) { + this.fewShotExamples = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.fewShotExamples.get().add(fewShotExamplesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get fewShotExamples + * @return fewShotExamples + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getFewShotExamples() { + return fewShotExamples.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FEW_SHOT_EXAMPLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getFewShotExamples_JsonNullable() { + return fewShotExamples; + } + + @JsonProperty(JSON_PROPERTY_FEW_SHOT_EXAMPLES) + public void setFewShotExamples_JsonNullable(JsonNullable>> fewShotExamples) { + this.fewShotExamples = fewShotExamples; + } + + public void setFewShotExamples(@javax.annotation.Nullable List> fewShotExamples) { + this.fewShotExamples = JsonNullable.>>of(fewShotExamples); + } + + + public EvalTemplateUpdateV2Request mode(@javax.annotation.Nullable ModeEnum mode) { + this.mode = JsonNullable.of(mode); + return this; + } + + /** + * Get mode + * @return mode + */ + @javax.annotation.Nullable + @JsonIgnore + public ModeEnum getMode() { + return mode.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMode_JsonNullable() { + return mode; + } + + @JsonProperty(JSON_PROPERTY_MODE) + public void setMode_JsonNullable(JsonNullable mode) { + this.mode = mode; + } + + public void setMode(@javax.annotation.Nullable ModeEnum mode) { + this.mode = JsonNullable.of(mode); + } + + + public EvalTemplateUpdateV2Request tools(@javax.annotation.Nullable Map tools) { + this.tools = tools; + return this; + } + + public EvalTemplateUpdateV2Request putToolsItem(String key, Object toolsItem) { + if (this.tools == null) { + this.tools = new HashMap<>(); + } + this.tools.put(key, toolsItem); + return this; + } + + /** + * Get tools + * @return tools + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOOLS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTools() { + return tools; + } + + + @JsonProperty(JSON_PROPERTY_TOOLS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTools(@javax.annotation.Nullable Map tools) { + this.tools = tools; + } + + + public EvalTemplateUpdateV2Request knowledgeBases(@javax.annotation.Nullable List knowledgeBases) { + this.knowledgeBases = JsonNullable.>of(knowledgeBases); + return this; + } + + public EvalTemplateUpdateV2Request addKnowledgeBasesItem(String knowledgeBasesItem) { + if (this.knowledgeBases == null || !this.knowledgeBases.isPresent()) { + this.knowledgeBases = JsonNullable.>of(new ArrayList<>()); + } + try { + this.knowledgeBases.get().add(knowledgeBasesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get knowledgeBases + * @return knowledgeBases + */ + @javax.annotation.Nullable + @JsonIgnore + public List getKnowledgeBases() { + return knowledgeBases.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getKnowledgeBases_JsonNullable() { + return knowledgeBases; + } + + @JsonProperty(JSON_PROPERTY_KNOWLEDGE_BASES) + public void setKnowledgeBases_JsonNullable(JsonNullable> knowledgeBases) { + this.knowledgeBases = knowledgeBases; + } + + public void setKnowledgeBases(@javax.annotation.Nullable List knowledgeBases) { + this.knowledgeBases = JsonNullable.>of(knowledgeBases); + } + + + public EvalTemplateUpdateV2Request dataInjection(@javax.annotation.Nullable Map dataInjection) { + this.dataInjection = dataInjection; + return this; + } + + public EvalTemplateUpdateV2Request putDataInjectionItem(String key, Object dataInjectionItem) { + if (this.dataInjection == null) { + this.dataInjection = new HashMap<>(); + } + this.dataInjection.put(key, dataInjectionItem); + return this; + } + + /** + * Get dataInjection + * @return dataInjection + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_INJECTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDataInjection() { + return dataInjection; + } + + + @JsonProperty(JSON_PROPERTY_DATA_INJECTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDataInjection(@javax.annotation.Nullable Map dataInjection) { + this.dataInjection = dataInjection; + } + + + public EvalTemplateUpdateV2Request summary(@javax.annotation.Nullable Map summary) { + this.summary = summary; + return this; + } + + public EvalTemplateUpdateV2Request putSummaryItem(String key, Object summaryItem) { + if (this.summary == null) { + this.summary = new HashMap<>(); + } + this.summary.put(key, summaryItem); + return this; + } + + /** + * Get summary + * @return summary + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSummary(@javax.annotation.Nullable Map summary) { + this.summary = summary; + } + + + public EvalTemplateUpdateV2Request errorLocalizerEnabled(@javax.annotation.Nullable Boolean errorLocalizerEnabled) { + this.errorLocalizerEnabled = JsonNullable.of(errorLocalizerEnabled); + return this; + } + + /** + * Get errorLocalizerEnabled + * @return errorLocalizerEnabled + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getErrorLocalizerEnabled() { + return errorLocalizerEnabled.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getErrorLocalizerEnabled_JsonNullable() { + return errorLocalizerEnabled; + } + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER_ENABLED) + public void setErrorLocalizerEnabled_JsonNullable(JsonNullable errorLocalizerEnabled) { + this.errorLocalizerEnabled = errorLocalizerEnabled; + } + + public void setErrorLocalizerEnabled(@javax.annotation.Nullable Boolean errorLocalizerEnabled) { + this.errorLocalizerEnabled = JsonNullable.of(errorLocalizerEnabled); + } + + + public EvalTemplateUpdateV2Request publish(@javax.annotation.Nullable Boolean publish) { + this.publish = JsonNullable.of(publish); + return this; + } + + /** + * Get publish + * @return publish + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getPublish() { + return publish.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PUBLISH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPublish_JsonNullable() { + return publish; + } + + @JsonProperty(JSON_PROPERTY_PUBLISH) + public void setPublish_JsonNullable(JsonNullable publish) { + this.publish = publish; + } + + public void setPublish(@javax.annotation.Nullable Boolean publish) { + this.publish = JsonNullable.of(publish); + } + + + public EvalTemplateUpdateV2Request templateFormat(@javax.annotation.Nullable TemplateFormatEnum templateFormat) { + this.templateFormat = JsonNullable.of(templateFormat); + return this; + } + + /** + * Get templateFormat + * @return templateFormat + */ + @javax.annotation.Nullable + @JsonIgnore + public TemplateFormatEnum getTemplateFormat() { + return templateFormat.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTemplateFormat_JsonNullable() { + return templateFormat; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_FORMAT) + public void setTemplateFormat_JsonNullable(JsonNullable templateFormat) { + this.templateFormat = templateFormat; + } + + public void setTemplateFormat(@javax.annotation.Nullable TemplateFormatEnum templateFormat) { + this.templateFormat = JsonNullable.of(templateFormat); + } + + + /** + * Return true if this EvalTemplateUpdateV2Request object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateUpdateV2Request evalTemplateUpdateV2Request = (EvalTemplateUpdateV2Request) o; + return equalsNullable(this.name, evalTemplateUpdateV2Request.name) && + equalsNullable(this.evalType, evalTemplateUpdateV2Request.evalType) && + equalsNullable(this.instructions, evalTemplateUpdateV2Request.instructions) && + equalsNullable(this.model, evalTemplateUpdateV2Request.model) && + equalsNullable(this.outputType, evalTemplateUpdateV2Request.outputType) && + equalsNullable(this.passThreshold, evalTemplateUpdateV2Request.passThreshold) && + Objects.equals(this.choiceScores, evalTemplateUpdateV2Request.choiceScores) && + equalsNullable(this.multiChoice, evalTemplateUpdateV2Request.multiChoice) && + equalsNullable(this.description, evalTemplateUpdateV2Request.description) && + equalsNullable(this.tags, evalTemplateUpdateV2Request.tags) && + equalsNullable(this.checkInternet, evalTemplateUpdateV2Request.checkInternet) && + equalsNullable(this.code, evalTemplateUpdateV2Request.code) && + equalsNullable(this.codeLanguage, evalTemplateUpdateV2Request.codeLanguage) && + equalsNullable(this.messages, evalTemplateUpdateV2Request.messages) && + equalsNullable(this.fewShotExamples, evalTemplateUpdateV2Request.fewShotExamples) && + equalsNullable(this.mode, evalTemplateUpdateV2Request.mode) && + Objects.equals(this.tools, evalTemplateUpdateV2Request.tools) && + equalsNullable(this.knowledgeBases, evalTemplateUpdateV2Request.knowledgeBases) && + Objects.equals(this.dataInjection, evalTemplateUpdateV2Request.dataInjection) && + Objects.equals(this.summary, evalTemplateUpdateV2Request.summary) && + equalsNullable(this.errorLocalizerEnabled, evalTemplateUpdateV2Request.errorLocalizerEnabled) && + equalsNullable(this.publish, evalTemplateUpdateV2Request.publish) && + equalsNullable(this.templateFormat, evalTemplateUpdateV2Request.templateFormat); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(name), hashCodeNullable(evalType), hashCodeNullable(instructions), hashCodeNullable(model), hashCodeNullable(outputType), hashCodeNullable(passThreshold), choiceScores, hashCodeNullable(multiChoice), hashCodeNullable(description), hashCodeNullable(tags), hashCodeNullable(checkInternet), hashCodeNullable(code), hashCodeNullable(codeLanguage), hashCodeNullable(messages), hashCodeNullable(fewShotExamples), hashCodeNullable(mode), tools, hashCodeNullable(knowledgeBases), dataInjection, summary, hashCodeNullable(errorLocalizerEnabled), hashCodeNullable(publish), hashCodeNullable(templateFormat)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateUpdateV2Request {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" passThreshold: ").append(toIndentedString(passThreshold)).append("\n"); + sb.append(" choiceScores: ").append(toIndentedString(choiceScores)).append("\n"); + sb.append(" multiChoice: ").append(toIndentedString(multiChoice)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" checkInternet: ").append(toIndentedString(checkInternet)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" codeLanguage: ").append(toIndentedString(codeLanguage)).append("\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" fewShotExamples: ").append(toIndentedString(fewShotExamples)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" tools: ").append(toIndentedString(tools)).append("\n"); + sb.append(" knowledgeBases: ").append(toIndentedString(knowledgeBases)).append("\n"); + sb.append(" dataInjection: ").append(toIndentedString(dataInjection)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" errorLocalizerEnabled: ").append(toIndentedString(errorLocalizerEnabled)).append("\n"); + sb.append(" publish: ").append(toIndentedString(publish)).append("\n"); + sb.append(" templateFormat: ").append(toIndentedString(templateFormat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `instructions` to the URL query string + if (getInstructions() != null) { + joiner.add(String.format("%sinstructions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstructions())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `pass_threshold` to the URL query string + if (getPassThreshold() != null) { + joiner.add(String.format("%spass_threshold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassThreshold())))); + } + + // add `choice_scores` to the URL query string + if (getChoiceScores() != null) { + for (String _key : getChoiceScores().keySet()) { + joiner.add(String.format("%schoice_scores%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChoiceScores().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChoiceScores().get(_key))))); + } + } + + // add `multi_choice` to the URL query string + if (getMultiChoice() != null) { + joiner.add(String.format("%smulti_choice%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiChoice())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `check_internet` to the URL query string + if (getCheckInternet() != null) { + joiner.add(String.format("%scheck_internet%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCheckInternet())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `code_language` to the URL query string + if (getCodeLanguage() != null) { + joiner.add(String.format("%scode_language%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCodeLanguage())))); + } + + // add `messages` to the URL query string + if (getMessages() != null) { + for (int i = 0; i < getMessages().size(); i++) { + joiner.add(String.format("%smessages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMessages().get(i))))); + } + } + + // add `few_shot_examples` to the URL query string + if (getFewShotExamples() != null) { + for (int i = 0; i < getFewShotExamples().size(); i++) { + joiner.add(String.format("%sfew_shot_examples%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFewShotExamples().get(i))))); + } + } + + // add `mode` to the URL query string + if (getMode() != null) { + joiner.add(String.format("%smode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMode())))); + } + + // add `tools` to the URL query string + if (getTools() != null) { + for (String _key : getTools().keySet()) { + joiner.add(String.format("%stools%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTools().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTools().get(_key))))); + } + } + + // add `knowledge_bases` to the URL query string + if (getKnowledgeBases() != null) { + for (int i = 0; i < getKnowledgeBases().size(); i++) { + joiner.add(String.format("%sknowledge_bases%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getKnowledgeBases().get(i))))); + } + } + + // add `data_injection` to the URL query string + if (getDataInjection() != null) { + for (String _key : getDataInjection().keySet()) { + joiner.add(String.format("%sdata_injection%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDataInjection().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDataInjection().get(_key))))); + } + } + + // add `summary` to the URL query string + if (getSummary() != null) { + for (String _key : getSummary().keySet()) { + joiner.add(String.format("%ssummary%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSummary().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSummary().get(_key))))); + } + } + + // add `error_localizer_enabled` to the URL query string + if (getErrorLocalizerEnabled() != null) { + joiner.add(String.format("%serror_localizer_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizerEnabled())))); + } + + // add `publish` to the URL query string + if (getPublish() != null) { + joiner.add(String.format("%spublish%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublish())))); + } + + // add `template_format` to the URL query string + if (getTemplateFormat() != null) { + joiner.add(String.format("%stemplate_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateFormat())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionCreateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionCreateRequest.java new file mode 100644 index 0000000..9177ff1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionCreateRequest.java @@ -0,0 +1,266 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionCreateRequest + */ +@JsonPropertyOrder({ + EvalTemplateVersionCreateRequest.JSON_PROPERTY_CRITERIA, + EvalTemplateVersionCreateRequest.JSON_PROPERTY_MODEL, + EvalTemplateVersionCreateRequest.JSON_PROPERTY_CONFIG_SNAPSHOT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionCreateRequest { + public static final String JSON_PROPERTY_CRITERIA = "criteria"; + private JsonNullable criteria = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + @javax.annotation.Nullable + private Map configSnapshot = new HashMap<>(); + + public EvalTemplateVersionCreateRequest() { + } + + public EvalTemplateVersionCreateRequest criteria(@javax.annotation.Nullable String criteria) { + this.criteria = JsonNullable.of(criteria); + return this; + } + + /** + * Get criteria + * @return criteria + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCriteria() { + return criteria.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CRITERIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCriteria_JsonNullable() { + return criteria; + } + + @JsonProperty(JSON_PROPERTY_CRITERIA) + public void setCriteria_JsonNullable(JsonNullable criteria) { + this.criteria = criteria; + } + + public void setCriteria(@javax.annotation.Nullable String criteria) { + this.criteria = JsonNullable.of(criteria); + } + + + public EvalTemplateVersionCreateRequest model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public EvalTemplateVersionCreateRequest configSnapshot(@javax.annotation.Nullable Map configSnapshot) { + this.configSnapshot = configSnapshot; + return this; + } + + public EvalTemplateVersionCreateRequest putConfigSnapshotItem(String key, Object configSnapshotItem) { + if (this.configSnapshot == null) { + this.configSnapshot = new HashMap<>(); + } + this.configSnapshot.put(key, configSnapshotItem); + return this; + } + + /** + * Get configSnapshot + * @return configSnapshot + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigSnapshot() { + return configSnapshot; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigSnapshot(@javax.annotation.Nullable Map configSnapshot) { + this.configSnapshot = configSnapshot; + } + + + /** + * Return true if this EvalTemplateVersionCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionCreateRequest evalTemplateVersionCreateRequest = (EvalTemplateVersionCreateRequest) o; + return equalsNullable(this.criteria, evalTemplateVersionCreateRequest.criteria) && + equalsNullable(this.model, evalTemplateVersionCreateRequest.model) && + Objects.equals(this.configSnapshot, evalTemplateVersionCreateRequest.configSnapshot); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(criteria), hashCodeNullable(model), configSnapshot); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionCreateRequest {\n"); + sb.append(" criteria: ").append(toIndentedString(criteria)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `criteria` to the URL query string + if (getCriteria() != null) { + joiner.add(String.format("%scriteria%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCriteria())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `config_snapshot` to the URL query string + if (getConfigSnapshot() != null) { + for (String _key : getConfigSnapshot().keySet()) { + joiner.add(String.format("%sconfig_snapshot%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigSnapshot().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigSnapshot().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionItem.java new file mode 100644 index 0000000..5f47397 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionItem.java @@ -0,0 +1,418 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionItem + */ +@JsonPropertyOrder({ + EvalTemplateVersionItem.JSON_PROPERTY_ID, + EvalTemplateVersionItem.JSON_PROPERTY_VERSION_NUMBER, + EvalTemplateVersionItem.JSON_PROPERTY_IS_DEFAULT, + EvalTemplateVersionItem.JSON_PROPERTY_CRITERIA, + EvalTemplateVersionItem.JSON_PROPERTY_MODEL, + EvalTemplateVersionItem.JSON_PROPERTY_CONFIG_SNAPSHOT, + EvalTemplateVersionItem.JSON_PROPERTY_CREATED_BY_NAME, + EvalTemplateVersionItem.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_VERSION_NUMBER = "version_number"; + @javax.annotation.Nonnull + private Integer versionNumber; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nonnull + private Boolean isDefault; + + public static final String JSON_PROPERTY_CRITERIA = "criteria"; + @javax.annotation.Nullable + private String criteria; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + @javax.annotation.Nullable + private Map configSnapshot = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_BY_NAME = "created_by_name"; + @javax.annotation.Nullable + private String createdByName; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private String createdAt; + + public EvalTemplateVersionItem() { + } + + public EvalTemplateVersionItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalTemplateVersionItem versionNumber(@javax.annotation.Nonnull Integer versionNumber) { + this.versionNumber = versionNumber; + return this; + } + + /** + * Get versionNumber + * @return versionNumber + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getVersionNumber() { + return versionNumber; + } + + + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersionNumber(@javax.annotation.Nonnull Integer versionNumber) { + this.versionNumber = versionNumber; + } + + + public EvalTemplateVersionItem isDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + public EvalTemplateVersionItem criteria(@javax.annotation.Nullable String criteria) { + this.criteria = criteria; + return this; + } + + /** + * Get criteria + * @return criteria + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CRITERIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCriteria() { + return criteria; + } + + + @JsonProperty(JSON_PROPERTY_CRITERIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCriteria(@javax.annotation.Nullable String criteria) { + this.criteria = criteria; + } + + + public EvalTemplateVersionItem model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public EvalTemplateVersionItem configSnapshot(@javax.annotation.Nullable Map configSnapshot) { + this.configSnapshot = configSnapshot; + return this; + } + + public EvalTemplateVersionItem putConfigSnapshotItem(String key, Object configSnapshotItem) { + if (this.configSnapshot == null) { + this.configSnapshot = new HashMap<>(); + } + this.configSnapshot.put(key, configSnapshotItem); + return this; + } + + /** + * Get configSnapshot + * @return configSnapshot + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfigSnapshot() { + return configSnapshot; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigSnapshot(@javax.annotation.Nullable Map configSnapshot) { + this.configSnapshot = configSnapshot; + } + + + public EvalTemplateVersionItem createdByName(@javax.annotation.Nullable String createdByName) { + this.createdByName = createdByName; + return this; + } + + /** + * Get createdByName + * @return createdByName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedByName() { + return createdByName; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedByName(@javax.annotation.Nullable String createdByName) { + this.createdByName = createdByName; + } + + + public EvalTemplateVersionItem createdAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + } + + + /** + * Return true if this EvalTemplateVersionItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionItem evalTemplateVersionItem = (EvalTemplateVersionItem) o; + return Objects.equals(this.id, evalTemplateVersionItem.id) && + Objects.equals(this.versionNumber, evalTemplateVersionItem.versionNumber) && + Objects.equals(this.isDefault, evalTemplateVersionItem.isDefault) && + Objects.equals(this.criteria, evalTemplateVersionItem.criteria) && + Objects.equals(this.model, evalTemplateVersionItem.model) && + Objects.equals(this.configSnapshot, evalTemplateVersionItem.configSnapshot) && + Objects.equals(this.createdByName, evalTemplateVersionItem.createdByName) && + Objects.equals(this.createdAt, evalTemplateVersionItem.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, versionNumber, isDefault, criteria, model, configSnapshot, createdByName, createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" versionNumber: ").append(toIndentedString(versionNumber)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" criteria: ").append(toIndentedString(criteria)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append(" createdByName: ").append(toIndentedString(createdByName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `version_number` to the URL query string + if (getVersionNumber() != null) { + joiner.add(String.format("%sversion_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNumber())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + // add `criteria` to the URL query string + if (getCriteria() != null) { + joiner.add(String.format("%scriteria%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCriteria())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `config_snapshot` to the URL query string + if (getConfigSnapshot() != null) { + for (String _key : getConfigSnapshot().keySet()) { + joiner.add(String.format("%sconfig_snapshot%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfigSnapshot().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfigSnapshot().get(_key))))); + } + } + + // add `created_by_name` to the URL query string + if (getCreatedByName() != null) { + joiner.add(String.format("%screated_by_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByName())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponse.java new file mode 100644 index 0000000..96cf927 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateVersionListResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionListResponse + */ +@JsonPropertyOrder({ + EvalTemplateVersionListResponse.JSON_PROPERTY_STATUS, + EvalTemplateVersionListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateVersionListResponseResult result; + + public EvalTemplateVersionListResponse() { + } + + public EvalTemplateVersionListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateVersionListResponse result(@javax.annotation.Nonnull EvalTemplateVersionListResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateVersionListResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateVersionListResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateVersionListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionListResponse evalTemplateVersionListResponse = (EvalTemplateVersionListResponse) o; + return Objects.equals(this.status, evalTemplateVersionListResponse.status) && + Objects.equals(this.result, evalTemplateVersionListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponseResult.java new file mode 100644 index 0000000..272a33b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionListResponseResult.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateVersionItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionListResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateVersionListResponseResult.JSON_PROPERTY_TEMPLATE_ID, + EvalTemplateVersionListResponseResult.JSON_PROPERTY_VERSIONS, + EvalTemplateVersionListResponseResult.JSON_PROPERTY_TOTAL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionListResponseResult { + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_VERSIONS = "versions"; + @javax.annotation.Nonnull + private List versions = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public EvalTemplateVersionListResponseResult() { + } + + public EvalTemplateVersionListResponseResult templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public EvalTemplateVersionListResponseResult versions(@javax.annotation.Nonnull List versions) { + this.versions = versions; + return this; + } + + public EvalTemplateVersionListResponseResult addVersionsItem(EvalTemplateVersionItem versionsItem) { + if (this.versions == null) { + this.versions = new ArrayList<>(); + } + this.versions.add(versionsItem); + return this; + } + + /** + * Get versions + * @return versions + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVersions() { + return versions; + } + + + @JsonProperty(JSON_PROPERTY_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersions(@javax.annotation.Nonnull List versions) { + this.versions = versions; + } + + + public EvalTemplateVersionListResponseResult total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + /** + * Return true if this EvalTemplateVersionListResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionListResponseResult evalTemplateVersionListResponseResult = (EvalTemplateVersionListResponseResult) o; + return Objects.equals(this.templateId, evalTemplateVersionListResponseResult.templateId) && + Objects.equals(this.versions, evalTemplateVersionListResponseResult.versions) && + Objects.equals(this.total, evalTemplateVersionListResponseResult.total); + } + + @Override + public int hashCode() { + return Objects.hash(templateId, versions, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionListResponseResult {\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" versions: ").append(toIndentedString(versions)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `versions` to the URL query string + if (getVersions() != null) { + for (int i = 0; i < getVersions().size(); i++) { + if (getVersions().get(i) != null) { + joiner.add(getVersions().get(i).toUrlQueryString(String.format("%sversions%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponse.java new file mode 100644 index 0000000..33958f4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateVersionResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionResponse + */ +@JsonPropertyOrder({ + EvalTemplateVersionResponse.JSON_PROPERTY_STATUS, + EvalTemplateVersionResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateVersionResponseResult result; + + public EvalTemplateVersionResponse() { + } + + public EvalTemplateVersionResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateVersionResponse result(@javax.annotation.Nonnull EvalTemplateVersionResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateVersionResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateVersionResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateVersionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionResponse evalTemplateVersionResponse = (EvalTemplateVersionResponse) o; + return Objects.equals(this.status, evalTemplateVersionResponse.status) && + Objects.equals(this.result, evalTemplateVersionResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponseResult.java new file mode 100644 index 0000000..e9d072c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionResponseResult.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateVersionResponseResult.JSON_PROPERTY_ID, + EvalTemplateVersionResponseResult.JSON_PROPERTY_VERSION_NUMBER, + EvalTemplateVersionResponseResult.JSON_PROPERTY_IS_DEFAULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_VERSION_NUMBER = "version_number"; + @javax.annotation.Nonnull + private Integer versionNumber; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nonnull + private Boolean isDefault; + + public EvalTemplateVersionResponseResult() { + } + + public EvalTemplateVersionResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalTemplateVersionResponseResult versionNumber(@javax.annotation.Nonnull Integer versionNumber) { + this.versionNumber = versionNumber; + return this; + } + + /** + * Get versionNumber + * @return versionNumber + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getVersionNumber() { + return versionNumber; + } + + + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersionNumber(@javax.annotation.Nonnull Integer versionNumber) { + this.versionNumber = versionNumber; + } + + + public EvalTemplateVersionResponseResult isDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + /** + * Return true if this EvalTemplateVersionResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionResponseResult evalTemplateVersionResponseResult = (EvalTemplateVersionResponseResult) o; + return Objects.equals(this.id, evalTemplateVersionResponseResult.id) && + Objects.equals(this.versionNumber, evalTemplateVersionResponseResult.versionNumber) && + Objects.equals(this.isDefault, evalTemplateVersionResponseResult.isDefault); + } + + @Override + public int hashCode() { + return Objects.hash(id, versionNumber, isDefault); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" versionNumber: ").append(toIndentedString(versionNumber)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `version_number` to the URL query string + if (getVersionNumber() != null) { + joiner.add(String.format("%sversion_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNumber())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponse.java new file mode 100644 index 0000000..08a02bf --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalTemplateVersionRestoreResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionRestoreResponse + */ +@JsonPropertyOrder({ + EvalTemplateVersionRestoreResponse.JSON_PROPERTY_STATUS, + EvalTemplateVersionRestoreResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionRestoreResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalTemplateVersionRestoreResponseResult result; + + public EvalTemplateVersionRestoreResponse() { + } + + public EvalTemplateVersionRestoreResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalTemplateVersionRestoreResponse result(@javax.annotation.Nonnull EvalTemplateVersionRestoreResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalTemplateVersionRestoreResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalTemplateVersionRestoreResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalTemplateVersionRestoreResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionRestoreResponse evalTemplateVersionRestoreResponse = (EvalTemplateVersionRestoreResponse) o; + return Objects.equals(this.status, evalTemplateVersionRestoreResponse.status) && + Objects.equals(this.result, evalTemplateVersionRestoreResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionRestoreResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponseResult.java new file mode 100644 index 0000000..05796d7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalTemplateVersionRestoreResponseResult.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalTemplateVersionRestoreResponseResult + */ +@JsonPropertyOrder({ + EvalTemplateVersionRestoreResponseResult.JSON_PROPERTY_ID, + EvalTemplateVersionRestoreResponseResult.JSON_PROPERTY_VERSION_NUMBER, + EvalTemplateVersionRestoreResponseResult.JSON_PROPERTY_IS_DEFAULT, + EvalTemplateVersionRestoreResponseResult.JSON_PROPERTY_RESTORED_FROM +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalTemplateVersionRestoreResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_VERSION_NUMBER = "version_number"; + @javax.annotation.Nonnull + private Integer versionNumber; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nonnull + private Boolean isDefault; + + public static final String JSON_PROPERTY_RESTORED_FROM = "restored_from"; + @javax.annotation.Nonnull + private Integer restoredFrom; + + public EvalTemplateVersionRestoreResponseResult() { + } + + public EvalTemplateVersionRestoreResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalTemplateVersionRestoreResponseResult versionNumber(@javax.annotation.Nonnull Integer versionNumber) { + this.versionNumber = versionNumber; + return this; + } + + /** + * Get versionNumber + * @return versionNumber + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getVersionNumber() { + return versionNumber; + } + + + @JsonProperty(JSON_PROPERTY_VERSION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersionNumber(@javax.annotation.Nonnull Integer versionNumber) { + this.versionNumber = versionNumber; + } + + + public EvalTemplateVersionRestoreResponseResult isDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + public EvalTemplateVersionRestoreResponseResult restoredFrom(@javax.annotation.Nonnull Integer restoredFrom) { + this.restoredFrom = restoredFrom; + return this; + } + + /** + * Get restoredFrom + * @return restoredFrom + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESTORED_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRestoredFrom() { + return restoredFrom; + } + + + @JsonProperty(JSON_PROPERTY_RESTORED_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRestoredFrom(@javax.annotation.Nonnull Integer restoredFrom) { + this.restoredFrom = restoredFrom; + } + + + /** + * Return true if this EvalTemplateVersionRestoreResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalTemplateVersionRestoreResponseResult evalTemplateVersionRestoreResponseResult = (EvalTemplateVersionRestoreResponseResult) o; + return Objects.equals(this.id, evalTemplateVersionRestoreResponseResult.id) && + Objects.equals(this.versionNumber, evalTemplateVersionRestoreResponseResult.versionNumber) && + Objects.equals(this.isDefault, evalTemplateVersionRestoreResponseResult.isDefault) && + Objects.equals(this.restoredFrom, evalTemplateVersionRestoreResponseResult.restoredFrom); + } + + @Override + public int hashCode() { + return Objects.hash(id, versionNumber, isDefault, restoredFrom); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalTemplateVersionRestoreResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" versionNumber: ").append(toIndentedString(versionNumber)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" restoredFrom: ").append(toIndentedString(restoredFrom)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `version_number` to the URL query string + if (getVersionNumber() != null) { + joiner.add(String.format("%sversion_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersionNumber())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + // add `restored_from` to the URL query string + if (getRestoredFrom() != null) { + joiner.add(String.format("%srestored_from%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRestoredFrom())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageChartPoint.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageChartPoint.java new file mode 100644 index 0000000..94fdd58 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageChartPoint.java @@ -0,0 +1,354 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalUsageChartPoint + */ +@JsonPropertyOrder({ + EvalUsageChartPoint.JSON_PROPERTY_TIMESTAMP, + EvalUsageChartPoint.JSON_PROPERTY_CALLS, + EvalUsageChartPoint.JSON_PROPERTY_AVG_LATENCY_MS, + EvalUsageChartPoint.JSON_PROPERTY_AVG_SCORE, + EvalUsageChartPoint.JSON_PROPERTY_PASS_COUNT, + EvalUsageChartPoint.JSON_PROPERTY_FAIL_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalUsageChartPoint { + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @javax.annotation.Nonnull + private String timestamp; + + public static final String JSON_PROPERTY_CALLS = "calls"; + @javax.annotation.Nullable + private Integer calls; + + public static final String JSON_PROPERTY_AVG_LATENCY_MS = "avg_latency_ms"; + @javax.annotation.Nullable + private Integer avgLatencyMs; + + public static final String JSON_PROPERTY_AVG_SCORE = "avg_score"; + private JsonNullable avgScore = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PASS_COUNT = "pass_count"; + @javax.annotation.Nullable + private Integer passCount; + + public static final String JSON_PROPERTY_FAIL_COUNT = "fail_count"; + @javax.annotation.Nullable + private Integer failCount; + + public EvalUsageChartPoint() { + } + + public EvalUsageChartPoint timestamp(@javax.annotation.Nonnull String timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimestamp() { + return timestamp; + } + + + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@javax.annotation.Nonnull String timestamp) { + this.timestamp = timestamp; + } + + + public EvalUsageChartPoint calls(@javax.annotation.Nullable Integer calls) { + this.calls = calls; + return this; + } + + /** + * Get calls + * @return calls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCalls() { + return calls; + } + + + @JsonProperty(JSON_PROPERTY_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCalls(@javax.annotation.Nullable Integer calls) { + this.calls = calls; + } + + + public EvalUsageChartPoint avgLatencyMs(@javax.annotation.Nullable Integer avgLatencyMs) { + this.avgLatencyMs = avgLatencyMs; + return this; + } + + /** + * Get avgLatencyMs + * @return avgLatencyMs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAvgLatencyMs() { + return avgLatencyMs; + } + + + @JsonProperty(JSON_PROPERTY_AVG_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAvgLatencyMs(@javax.annotation.Nullable Integer avgLatencyMs) { + this.avgLatencyMs = avgLatencyMs; + } + + + public EvalUsageChartPoint avgScore(@javax.annotation.Nullable BigDecimal avgScore) { + this.avgScore = JsonNullable.of(avgScore); + return this; + } + + /** + * Get avgScore + * @return avgScore + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgScore() { + return avgScore.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgScore_JsonNullable() { + return avgScore; + } + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + public void setAvgScore_JsonNullable(JsonNullable avgScore) { + this.avgScore = avgScore; + } + + public void setAvgScore(@javax.annotation.Nullable BigDecimal avgScore) { + this.avgScore = JsonNullable.of(avgScore); + } + + + public EvalUsageChartPoint passCount(@javax.annotation.Nullable Integer passCount) { + this.passCount = passCount; + return this; + } + + /** + * Get passCount + * @return passCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PASS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPassCount() { + return passCount; + } + + + @JsonProperty(JSON_PROPERTY_PASS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassCount(@javax.annotation.Nullable Integer passCount) { + this.passCount = passCount; + } + + + public EvalUsageChartPoint failCount(@javax.annotation.Nullable Integer failCount) { + this.failCount = failCount; + return this; + } + + /** + * Get failCount + * @return failCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAIL_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailCount() { + return failCount; + } + + + @JsonProperty(JSON_PROPERTY_FAIL_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailCount(@javax.annotation.Nullable Integer failCount) { + this.failCount = failCount; + } + + + /** + * Return true if this EvalUsageChartPoint object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalUsageChartPoint evalUsageChartPoint = (EvalUsageChartPoint) o; + return Objects.equals(this.timestamp, evalUsageChartPoint.timestamp) && + Objects.equals(this.calls, evalUsageChartPoint.calls) && + Objects.equals(this.avgLatencyMs, evalUsageChartPoint.avgLatencyMs) && + equalsNullable(this.avgScore, evalUsageChartPoint.avgScore) && + Objects.equals(this.passCount, evalUsageChartPoint.passCount) && + Objects.equals(this.failCount, evalUsageChartPoint.failCount); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(timestamp, calls, avgLatencyMs, hashCodeNullable(avgScore), passCount, failCount); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalUsageChartPoint {\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" calls: ").append(toIndentedString(calls)).append("\n"); + sb.append(" avgLatencyMs: ").append(toIndentedString(avgLatencyMs)).append("\n"); + sb.append(" avgScore: ").append(toIndentedString(avgScore)).append("\n"); + sb.append(" passCount: ").append(toIndentedString(passCount)).append("\n"); + sb.append(" failCount: ").append(toIndentedString(failCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimestamp())))); + } + + // add `calls` to the URL query string + if (getCalls() != null) { + joiner.add(String.format("%scalls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCalls())))); + } + + // add `avg_latency_ms` to the URL query string + if (getAvgLatencyMs() != null) { + joiner.add(String.format("%savg_latency_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgLatencyMs())))); + } + + // add `avg_score` to the URL query string + if (getAvgScore() != null) { + joiner.add(String.format("%savg_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgScore())))); + } + + // add `pass_count` to the URL query string + if (getPassCount() != null) { + joiner.add(String.format("%spass_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassCount())))); + } + + // add `fail_count` to the URL query string + if (getFailCount() != null) { + joiner.add(String.format("%sfail_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageFeedback.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageFeedback.java new file mode 100644 index 0000000..935c52b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageFeedback.java @@ -0,0 +1,346 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalUsageFeedback + */ +@JsonPropertyOrder({ + EvalUsageFeedback.JSON_PROPERTY_ID, + EvalUsageFeedback.JSON_PROPERTY_VALUE, + EvalUsageFeedback.JSON_PROPERTY_EXPLANATION, + EvalUsageFeedback.JSON_PROPERTY_ACTION_TYPE, + EvalUsageFeedback.JSON_PROPERTY_CREATED_AT, + EvalUsageFeedback.JSON_PROPERTY_USER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalUsageFeedback { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_EXPLANATION = "explanation"; + @javax.annotation.Nullable + private String explanation; + + public static final String JSON_PROPERTY_ACTION_TYPE = "action_type"; + @javax.annotation.Nullable + private String actionType; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private String createdAt; + + public static final String JSON_PROPERTY_USER = "user"; + @javax.annotation.Nullable + private String user; + + public EvalUsageFeedback() { + } + + public EvalUsageFeedback id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalUsageFeedback value(@javax.annotation.Nullable Map value) { + this.value = value; + return this; + } + + public EvalUsageFeedback putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable Map value) { + this.value = value; + } + + + public EvalUsageFeedback explanation(@javax.annotation.Nullable String explanation) { + this.explanation = explanation; + return this; + } + + /** + * Get explanation + * @return explanation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExplanation() { + return explanation; + } + + + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExplanation(@javax.annotation.Nullable String explanation) { + this.explanation = explanation; + } + + + public EvalUsageFeedback actionType(@javax.annotation.Nullable String actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get actionType + * @return actionType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getActionType() { + return actionType; + } + + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setActionType(@javax.annotation.Nullable String actionType) { + this.actionType = actionType; + } + + + public EvalUsageFeedback createdAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + } + + + public EvalUsageFeedback user(@javax.annotation.Nullable String user) { + this.user = user; + return this; + } + + /** + * Get user + * @return user + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUser() { + return user; + } + + + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUser(@javax.annotation.Nullable String user) { + this.user = user; + } + + + /** + * Return true if this EvalUsageFeedback object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalUsageFeedback evalUsageFeedback = (EvalUsageFeedback) o; + return Objects.equals(this.id, evalUsageFeedback.id) && + Objects.equals(this.value, evalUsageFeedback.value) && + Objects.equals(this.explanation, evalUsageFeedback.explanation) && + Objects.equals(this.actionType, evalUsageFeedback.actionType) && + Objects.equals(this.createdAt, evalUsageFeedback.createdAt) && + Objects.equals(this.user, evalUsageFeedback.user); + } + + @Override + public int hashCode() { + return Objects.hash(id, value, explanation, actionType, createdAt, user); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalUsageFeedback {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" explanation: ").append(toIndentedString(explanation)).append("\n"); + sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `explanation` to the URL query string + if (getExplanation() != null) { + joiner.add(String.format("%sexplanation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExplanation())))); + } + + // add `action_type` to the URL query string + if (getActionType() != null) { + joiner.add(String.format("%saction_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActionType())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `user` to the URL query string + if (getUser() != null) { + joiner.add(String.format("%suser%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUser())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogItem.java new file mode 100644 index 0000000..fc8dda7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogItem.java @@ -0,0 +1,593 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalUsageFeedback; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalUsageLogItem + */ +@JsonPropertyOrder({ + EvalUsageLogItem.JSON_PROPERTY_ID, + EvalUsageLogItem.JSON_PROPERTY_INPUT, + EvalUsageLogItem.JSON_PROPERTY_RESULT, + EvalUsageLogItem.JSON_PROPERTY_SCORE, + EvalUsageLogItem.JSON_PROPERTY_REASON, + EvalUsageLogItem.JSON_PROPERTY_STATUS, + EvalUsageLogItem.JSON_PROPERTY_SOURCE, + EvalUsageLogItem.JSON_PROPERTY_CREATED_AT, + EvalUsageLogItem.JSON_PROPERTY_DETAIL, + EvalUsageLogItem.JSON_PROPERTY_FEEDBACK, + EvalUsageLogItem.JSON_PROPERTY_COMPOSITE, + EvalUsageLogItem.JSON_PROPERTY_AGGREGATE_PASS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalUsageLogItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_INPUT = "input"; + @javax.annotation.Nonnull + private String input; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nullable + private String result; + + public static final String JSON_PROPERTY_SCORE = "score"; + private JsonNullable score = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REASON = "reason"; + @javax.annotation.Nullable + private String reason; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nonnull + private String createdAt; + + public static final String JSON_PROPERTY_DETAIL = "detail"; + @javax.annotation.Nonnull + private Map detail = new HashMap<>(); + + public static final String JSON_PROPERTY_FEEDBACK = "feedback"; + @javax.annotation.Nullable + private EvalUsageFeedback feedback; + + public static final String JSON_PROPERTY_COMPOSITE = "composite"; + @javax.annotation.Nullable + private Boolean composite; + + public static final String JSON_PROPERTY_AGGREGATE_PASS = "aggregate_pass"; + private JsonNullable aggregatePass = JsonNullable.undefined(); + + public EvalUsageLogItem() { + } + + public EvalUsageLogItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public EvalUsageLogItem input(@javax.annotation.Nonnull String input) { + this.input = input; + return this; + } + + /** + * Get input + * @return input + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(@javax.annotation.Nonnull String input) { + this.input = input; + } + + + public EvalUsageLogItem result(@javax.annotation.Nullable String result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResult(@javax.annotation.Nullable String result) { + this.result = result; + } + + + public EvalUsageLogItem score(@javax.annotation.Nullable BigDecimal score) { + this.score = JsonNullable.of(score); + return this; + } + + /** + * Get score + * @return score + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getScore() { + return score.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScore_JsonNullable() { + return score; + } + + @JsonProperty(JSON_PROPERTY_SCORE) + public void setScore_JsonNullable(JsonNullable score) { + this.score = score; + } + + public void setScore(@javax.annotation.Nullable BigDecimal score) { + this.score = JsonNullable.of(score); + } + + + public EvalUsageLogItem reason(@javax.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = reason; + } + + + public EvalUsageLogItem status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public EvalUsageLogItem source(@javax.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable String source) { + this.source = source; + } + + + public EvalUsageLogItem createdAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + } + + + public EvalUsageLogItem detail(@javax.annotation.Nonnull Map detail) { + this.detail = detail; + return this; + } + + public EvalUsageLogItem putDetailItem(String key, Object detailItem) { + if (this.detail == null) { + this.detail = new HashMap<>(); + } + this.detail.put(key, detailItem); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getDetail() { + return detail; + } + + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setDetail(@javax.annotation.Nonnull Map detail) { + this.detail = detail; + } + + + public EvalUsageLogItem feedback(@javax.annotation.Nullable EvalUsageFeedback feedback) { + this.feedback = feedback; + return this; + } + + /** + * Get feedback + * @return feedback + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEEDBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EvalUsageFeedback getFeedback() { + return feedback; + } + + + @JsonProperty(JSON_PROPERTY_FEEDBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeedback(@javax.annotation.Nullable EvalUsageFeedback feedback) { + this.feedback = feedback; + } + + + public EvalUsageLogItem composite(@javax.annotation.Nullable Boolean composite) { + this.composite = composite; + return this; + } + + /** + * Get composite + * @return composite + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getComposite() { + return composite; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComposite(@javax.annotation.Nullable Boolean composite) { + this.composite = composite; + } + + + public EvalUsageLogItem aggregatePass(@javax.annotation.Nullable Boolean aggregatePass) { + this.aggregatePass = JsonNullable.of(aggregatePass); + return this; + } + + /** + * Get aggregatePass + * @return aggregatePass + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getAggregatePass() { + return aggregatePass.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_PASS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAggregatePass_JsonNullable() { + return aggregatePass; + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_PASS) + public void setAggregatePass_JsonNullable(JsonNullable aggregatePass) { + this.aggregatePass = aggregatePass; + } + + public void setAggregatePass(@javax.annotation.Nullable Boolean aggregatePass) { + this.aggregatePass = JsonNullable.of(aggregatePass); + } + + + /** + * Return true if this EvalUsageLogItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalUsageLogItem evalUsageLogItem = (EvalUsageLogItem) o; + return Objects.equals(this.id, evalUsageLogItem.id) && + Objects.equals(this.input, evalUsageLogItem.input) && + Objects.equals(this.result, evalUsageLogItem.result) && + equalsNullable(this.score, evalUsageLogItem.score) && + Objects.equals(this.reason, evalUsageLogItem.reason) && + Objects.equals(this.status, evalUsageLogItem.status) && + Objects.equals(this.source, evalUsageLogItem.source) && + Objects.equals(this.createdAt, evalUsageLogItem.createdAt) && + Objects.equals(this.detail, evalUsageLogItem.detail) && + Objects.equals(this.feedback, evalUsageLogItem.feedback) && + Objects.equals(this.composite, evalUsageLogItem.composite) && + equalsNullable(this.aggregatePass, evalUsageLogItem.aggregatePass); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, input, result, hashCodeNullable(score), reason, status, source, createdAt, detail, feedback, composite, hashCodeNullable(aggregatePass)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalUsageLogItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" feedback: ").append(toIndentedString(feedback)).append("\n"); + sb.append(" composite: ").append(toIndentedString(composite)).append("\n"); + sb.append(" aggregatePass: ").append(toIndentedString(aggregatePass)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `input` to the URL query string + if (getInput() != null) { + joiner.add(String.format("%sinput%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInput())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `score` to the URL query string + if (getScore() != null) { + joiner.add(String.format("%sscore%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScore())))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReason())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + for (String _key : getDetail().keySet()) { + joiner.add(String.format("%sdetail%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetail().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetail().get(_key))))); + } + } + + // add `feedback` to the URL query string + if (getFeedback() != null) { + joiner.add(getFeedback().toUrlQueryString(prefix + "feedback" + suffix)); + } + + // add `composite` to the URL query string + if (getComposite() != null) { + joiner.add(String.format("%scomposite%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getComposite())))); + } + + // add `aggregate_pass` to the URL query string + if (getAggregatePass() != null) { + joiner.add(String.format("%saggregate_pass%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAggregatePass())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogs.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogs.java new file mode 100644 index 0000000..61eb2db --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageLogs.java @@ -0,0 +1,275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalUsageLogItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalUsageLogs + */ +@JsonPropertyOrder({ + EvalUsageLogs.JSON_PROPERTY_ITEMS, + EvalUsageLogs.JSON_PROPERTY_TOTAL, + EvalUsageLogs.JSON_PROPERTY_PAGE, + EvalUsageLogs.JSON_PROPERTY_PAGE_SIZE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalUsageLogs { + public static final String JSON_PROPERTY_ITEMS = "items"; + @javax.annotation.Nonnull + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public static final String JSON_PROPERTY_PAGE = "page"; + @javax.annotation.Nonnull + private Integer page; + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + @javax.annotation.Nonnull + private Integer pageSize; + + public EvalUsageLogs() { + } + + public EvalUsageLogs items(@javax.annotation.Nonnull List items) { + this.items = items; + return this; + } + + public EvalUsageLogs addItemsItem(EvalUsageLogItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setItems(@javax.annotation.Nonnull List items) { + this.items = items; + } + + + public EvalUsageLogs total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + public EvalUsageLogs page(@javax.annotation.Nonnull Integer page) { + this.page = page; + return this; + } + + /** + * Get page + * @return page + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPage() { + return page; + } + + + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPage(@javax.annotation.Nonnull Integer page) { + this.page = page; + } + + + public EvalUsageLogs pageSize(@javax.annotation.Nonnull Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Get pageSize + * @return pageSize + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPageSize() { + return pageSize; + } + + + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPageSize(@javax.annotation.Nonnull Integer pageSize) { + this.pageSize = pageSize; + } + + + /** + * Return true if this EvalUsageLogs object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalUsageLogs evalUsageLogs = (EvalUsageLogs) o; + return Objects.equals(this.items, evalUsageLogs.items) && + Objects.equals(this.total, evalUsageLogs.total) && + Objects.equals(this.page, evalUsageLogs.page) && + Objects.equals(this.pageSize, evalUsageLogs.pageSize); + } + + @Override + public int hashCode() { + return Objects.hash(items, total, page, pageSize); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalUsageLogs {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `items` to the URL query string + if (getItems() != null) { + for (int i = 0; i < getItems().size(); i++) { + if (getItems().get(i) != null) { + joiner.add(getItems().get(i).toUrlQueryString(String.format("%sitems%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `page` to the URL query string + if (getPage() != null) { + joiner.add(String.format("%spage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPage())))); + } + + // add `page_size` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format("%spage_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStats.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStats.java new file mode 100644 index 0000000..d04f87f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStats.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalUsageStats + */ +@JsonPropertyOrder({ + EvalUsageStats.JSON_PROPERTY_TOTAL_RUNS, + EvalUsageStats.JSON_PROPERTY_RUNS_PERIOD, + EvalUsageStats.JSON_PROPERTY_SUCCESS_COUNT, + EvalUsageStats.JSON_PROPERTY_ERROR_COUNT, + EvalUsageStats.JSON_PROPERTY_PASS_RATE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalUsageStats { + public static final String JSON_PROPERTY_TOTAL_RUNS = "total_runs"; + @javax.annotation.Nonnull + private Integer totalRuns; + + public static final String JSON_PROPERTY_RUNS_PERIOD = "runs_period"; + @javax.annotation.Nonnull + private Integer runsPeriod; + + public static final String JSON_PROPERTY_SUCCESS_COUNT = "success_count"; + @javax.annotation.Nonnull + private Integer successCount; + + public static final String JSON_PROPERTY_ERROR_COUNT = "error_count"; + @javax.annotation.Nonnull + private Integer errorCount; + + public static final String JSON_PROPERTY_PASS_RATE = "pass_rate"; + @javax.annotation.Nonnull + private BigDecimal passRate; + + public EvalUsageStats() { + } + + public EvalUsageStats totalRuns(@javax.annotation.Nonnull Integer totalRuns) { + this.totalRuns = totalRuns; + return this; + } + + /** + * Get totalRuns + * @return totalRuns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_RUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalRuns() { + return totalRuns; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_RUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalRuns(@javax.annotation.Nonnull Integer totalRuns) { + this.totalRuns = totalRuns; + } + + + public EvalUsageStats runsPeriod(@javax.annotation.Nonnull Integer runsPeriod) { + this.runsPeriod = runsPeriod; + return this; + } + + /** + * Get runsPeriod + * @return runsPeriod + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUNS_PERIOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRunsPeriod() { + return runsPeriod; + } + + + @JsonProperty(JSON_PROPERTY_RUNS_PERIOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunsPeriod(@javax.annotation.Nonnull Integer runsPeriod) { + this.runsPeriod = runsPeriod; + } + + + public EvalUsageStats successCount(@javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + return this; + } + + /** + * Get successCount + * @return successCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSuccessCount() { + return successCount; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccessCount(@javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + } + + + public EvalUsageStats errorCount(@javax.annotation.Nonnull Integer errorCount) { + this.errorCount = errorCount; + return this; + } + + /** + * Get errorCount + * @return errorCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getErrorCount() { + return errorCount; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorCount(@javax.annotation.Nonnull Integer errorCount) { + this.errorCount = errorCount; + } + + + public EvalUsageStats passRate(@javax.annotation.Nonnull BigDecimal passRate) { + this.passRate = passRate; + return this; + } + + /** + * Get passRate + * @return passRate + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PASS_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getPassRate() { + return passRate; + } + + + @JsonProperty(JSON_PROPERTY_PASS_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassRate(@javax.annotation.Nonnull BigDecimal passRate) { + this.passRate = passRate; + } + + + /** + * Return true if this EvalUsageStats object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalUsageStats evalUsageStats = (EvalUsageStats) o; + return Objects.equals(this.totalRuns, evalUsageStats.totalRuns) && + Objects.equals(this.runsPeriod, evalUsageStats.runsPeriod) && + Objects.equals(this.successCount, evalUsageStats.successCount) && + Objects.equals(this.errorCount, evalUsageStats.errorCount) && + Objects.equals(this.passRate, evalUsageStats.passRate); + } + + @Override + public int hashCode() { + return Objects.hash(totalRuns, runsPeriod, successCount, errorCount, passRate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalUsageStats {\n"); + sb.append(" totalRuns: ").append(toIndentedString(totalRuns)).append("\n"); + sb.append(" runsPeriod: ").append(toIndentedString(runsPeriod)).append("\n"); + sb.append(" successCount: ").append(toIndentedString(successCount)).append("\n"); + sb.append(" errorCount: ").append(toIndentedString(errorCount)).append("\n"); + sb.append(" passRate: ").append(toIndentedString(passRate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total_runs` to the URL query string + if (getTotalRuns() != null) { + joiner.add(String.format("%stotal_runs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalRuns())))); + } + + // add `runs_period` to the URL query string + if (getRunsPeriod() != null) { + joiner.add(String.format("%sruns_period%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunsPeriod())))); + } + + // add `success_count` to the URL query string + if (getSuccessCount() != null) { + joiner.add(String.format("%ssuccess_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccessCount())))); + } + + // add `error_count` to the URL query string + if (getErrorCount() != null) { + joiner.add(String.format("%serror_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorCount())))); + } + + // add `pass_rate` to the URL query string + if (getPassRate() != null) { + joiner.add(String.format("%spass_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassRate())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponse.java new file mode 100644 index 0000000..ec319b5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalUsageStatsResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalUsageStatsResponse + */ +@JsonPropertyOrder({ + EvalUsageStatsResponse.JSON_PROPERTY_STATUS, + EvalUsageStatsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalUsageStatsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private EvalUsageStatsResponseResult result; + + public EvalUsageStatsResponse() { + } + + public EvalUsageStatsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public EvalUsageStatsResponse result(@javax.annotation.Nonnull EvalUsageStatsResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalUsageStatsResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull EvalUsageStatsResponseResult result) { + this.result = result; + } + + + /** + * Return true if this EvalUsageStatsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalUsageStatsResponse evalUsageStatsResponse = (EvalUsageStatsResponse) o; + return Objects.equals(this.status, evalUsageStatsResponse.status) && + Objects.equals(this.result, evalUsageStatsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalUsageStatsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponseResult.java new file mode 100644 index 0000000..189b336 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvalUsageStatsResponseResult.java @@ -0,0 +1,314 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalUsageChartPoint; +import com.futureagi.sdk.model.EvalUsageLogs; +import com.futureagi.sdk.model.EvalUsageStats; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvalUsageStatsResponseResult + */ +@JsonPropertyOrder({ + EvalUsageStatsResponseResult.JSON_PROPERTY_TEMPLATE_ID, + EvalUsageStatsResponseResult.JSON_PROPERTY_IS_COMPOSITE, + EvalUsageStatsResponseResult.JSON_PROPERTY_STATS, + EvalUsageStatsResponseResult.JSON_PROPERTY_CHART, + EvalUsageStatsResponseResult.JSON_PROPERTY_LOGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvalUsageStatsResponseResult { + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_IS_COMPOSITE = "is_composite"; + @javax.annotation.Nonnull + private Boolean isComposite; + + public static final String JSON_PROPERTY_STATS = "stats"; + @javax.annotation.Nonnull + private EvalUsageStats stats; + + public static final String JSON_PROPERTY_CHART = "chart"; + @javax.annotation.Nonnull + private List chart = new ArrayList<>(); + + public static final String JSON_PROPERTY_LOGS = "logs"; + @javax.annotation.Nonnull + private EvalUsageLogs logs; + + public EvalUsageStatsResponseResult() { + } + + public EvalUsageStatsResponseResult templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public EvalUsageStatsResponseResult isComposite(@javax.annotation.Nonnull Boolean isComposite) { + this.isComposite = isComposite; + return this; + } + + /** + * Get isComposite + * @return isComposite + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_COMPOSITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsComposite() { + return isComposite; + } + + + @JsonProperty(JSON_PROPERTY_IS_COMPOSITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsComposite(@javax.annotation.Nonnull Boolean isComposite) { + this.isComposite = isComposite; + } + + + public EvalUsageStatsResponseResult stats(@javax.annotation.Nonnull EvalUsageStats stats) { + this.stats = stats; + return this; + } + + /** + * Get stats + * @return stats + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalUsageStats getStats() { + return stats; + } + + + @JsonProperty(JSON_PROPERTY_STATS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStats(@javax.annotation.Nonnull EvalUsageStats stats) { + this.stats = stats; + } + + + public EvalUsageStatsResponseResult chart(@javax.annotation.Nonnull List chart) { + this.chart = chart; + return this; + } + + public EvalUsageStatsResponseResult addChartItem(EvalUsageChartPoint chartItem) { + if (this.chart == null) { + this.chart = new ArrayList<>(); + } + this.chart.add(chartItem); + return this; + } + + /** + * Get chart + * @return chart + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHART) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChart() { + return chart; + } + + + @JsonProperty(JSON_PROPERTY_CHART) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChart(@javax.annotation.Nonnull List chart) { + this.chart = chart; + } + + + public EvalUsageStatsResponseResult logs(@javax.annotation.Nonnull EvalUsageLogs logs) { + this.logs = logs; + return this; + } + + /** + * Get logs + * @return logs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EvalUsageLogs getLogs() { + return logs; + } + + + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLogs(@javax.annotation.Nonnull EvalUsageLogs logs) { + this.logs = logs; + } + + + /** + * Return true if this EvalUsageStatsResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvalUsageStatsResponseResult evalUsageStatsResponseResult = (EvalUsageStatsResponseResult) o; + return Objects.equals(this.templateId, evalUsageStatsResponseResult.templateId) && + Objects.equals(this.isComposite, evalUsageStatsResponseResult.isComposite) && + Objects.equals(this.stats, evalUsageStatsResponseResult.stats) && + Objects.equals(this.chart, evalUsageStatsResponseResult.chart) && + Objects.equals(this.logs, evalUsageStatsResponseResult.logs); + } + + @Override + public int hashCode() { + return Objects.hash(templateId, isComposite, stats, chart, logs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvalUsageStatsResponseResult {\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" isComposite: ").append(toIndentedString(isComposite)).append("\n"); + sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append(" chart: ").append(toIndentedString(chart)).append("\n"); + sb.append(" logs: ").append(toIndentedString(logs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `is_composite` to the URL query string + if (getIsComposite() != null) { + joiner.add(String.format("%sis_composite%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsComposite())))); + } + + // add `stats` to the URL query string + if (getStats() != null) { + joiner.add(getStats().toUrlQueryString(prefix + "stats" + suffix)); + } + + // add `chart` to the URL query string + if (getChart() != null) { + for (int i = 0; i < getChart().size(); i++) { + if (getChart().get(i) != null) { + joiner.add(getChart().get(i).toUrlQueryString(String.format("%schart%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `logs` to the URL query string + if (getLogs() != null) { + joiner.add(getLogs().toUrlQueryString(prefix + "logs" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EvaluationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvaluationResult.java new file mode 100644 index 0000000..c6e7843 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EvaluationResult.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EvaluationResult + */ +@JsonPropertyOrder({ + EvaluationResult.JSON_PROPERTY_LABEL, + EvaluationResult.JSON_PROPERTY_TYPE, + EvaluationResult.JSON_PROPERTY_RESULT, + EvaluationResult.JSON_PROPERTY_SCORE, + EvaluationResult.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EvaluationResult { + public static final String JSON_PROPERTY_LABEL = "label"; + @javax.annotation.Nonnull + private String label; + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private String result; + + public static final String JSON_PROPERTY_SCORE = "score"; + @javax.annotation.Nullable + private BigDecimal score; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable + private String value; + + public EvaluationResult() { + } + + public EvaluationResult label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + public EvaluationResult type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public EvaluationResult result(@javax.annotation.Nonnull String result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull String result) { + this.result = result; + } + + + public EvaluationResult score(@javax.annotation.Nullable BigDecimal score) { + this.score = score; + return this; + } + + /** + * Get score + * @return score + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getScore() { + return score; + } + + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScore(@javax.annotation.Nullable BigDecimal score) { + this.score = score; + } + + + public EvaluationResult value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + + /** + * Return true if this EvaluationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EvaluationResult evaluationResult = (EvaluationResult) o; + return Objects.equals(this.label, evaluationResult.label) && + Objects.equals(this.type, evaluationResult.type) && + Objects.equals(this.result, evaluationResult.result) && + Objects.equals(this.score, evaluationResult.score) && + Objects.equals(this.value, evaluationResult.value); + } + + @Override + public int hashCode() { + return Objects.hash(label, type, result, score, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EvaluationResult {\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(String.format("%slabel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabel())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `score` to the URL query string + if (getScore() != null) { + joiner.add(String.format("%sscore%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScore())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/EventsOverTimePoint.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/EventsOverTimePoint.java new file mode 100644 index 0000000..dc275a6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/EventsOverTimePoint.java @@ -0,0 +1,259 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * EventsOverTimePoint + */ +@JsonPropertyOrder({ + EventsOverTimePoint.JSON_PROPERTY_DATE, + EventsOverTimePoint.JSON_PROPERTY_ERRORS, + EventsOverTimePoint.JSON_PROPERTY_PASSING, + EventsOverTimePoint.JSON_PROPERTY_USERS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class EventsOverTimePoint { + public static final String JSON_PROPERTY_DATE = "date"; + @javax.annotation.Nonnull + private String date; + + public static final String JSON_PROPERTY_ERRORS = "errors"; + @javax.annotation.Nonnull + private Integer errors; + + public static final String JSON_PROPERTY_PASSING = "passing"; + @javax.annotation.Nonnull + private Integer passing; + + public static final String JSON_PROPERTY_USERS = "users"; + @javax.annotation.Nonnull + private Integer users; + + public EventsOverTimePoint() { + } + + public EventsOverTimePoint date(@javax.annotation.Nonnull String date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDate() { + return date; + } + + + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDate(@javax.annotation.Nonnull String date) { + this.date = date; + } + + + public EventsOverTimePoint errors(@javax.annotation.Nonnull Integer errors) { + this.errors = errors; + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getErrors() { + return errors; + } + + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrors(@javax.annotation.Nonnull Integer errors) { + this.errors = errors; + } + + + public EventsOverTimePoint passing(@javax.annotation.Nonnull Integer passing) { + this.passing = passing; + return this; + } + + /** + * Get passing + * @return passing + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PASSING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPassing() { + return passing; + } + + + @JsonProperty(JSON_PROPERTY_PASSING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassing(@javax.annotation.Nonnull Integer passing) { + this.passing = passing; + } + + + public EventsOverTimePoint users(@javax.annotation.Nonnull Integer users) { + this.users = users; + return this; + } + + /** + * Get users + * @return users + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getUsers() { + return users; + } + + + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUsers(@javax.annotation.Nonnull Integer users) { + this.users = users; + } + + + /** + * Return true if this EventsOverTimePoint object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventsOverTimePoint eventsOverTimePoint = (EventsOverTimePoint) o; + return Objects.equals(this.date, eventsOverTimePoint.date) && + Objects.equals(this.errors, eventsOverTimePoint.errors) && + Objects.equals(this.passing, eventsOverTimePoint.passing) && + Objects.equals(this.users, eventsOverTimePoint.users); + } + + @Override + public int hashCode() { + return Objects.hash(date, errors, passing, users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventsOverTimePoint {\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" passing: ").append(toIndentedString(passing)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `date` to the URL query string + if (getDate() != null) { + joiner.add(String.format("%sdate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDate())))); + } + + // add `errors` to the URL query string + if (getErrors() != null) { + joiner.add(String.format("%serrors%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrors())))); + } + + // add `passing` to the URL query string + if (getPassing() != null) { + joiner.add(String.format("%spassing%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassing())))); + } + + // add `users` to the URL query string + if (getUsers() != null) { + joiner.add(String.format("%susers%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUsers())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationRequest.java new file mode 100644 index 0000000..c64ac1f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationRequest.java @@ -0,0 +1,204 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExecutePromptSimulationRequest + */ +@JsonPropertyOrder({ + ExecutePromptSimulationRequest.JSON_PROPERTY_SCENARIO_IDS, + ExecutePromptSimulationRequest.JSON_PROPERTY_SELECT_ALL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExecutePromptSimulationRequest { + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nullable + private List scenarioIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECT_ALL = "select_all"; + @javax.annotation.Nullable + private Boolean selectAll = false; + + public ExecutePromptSimulationRequest() { + } + + public ExecutePromptSimulationRequest scenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public ExecutePromptSimulationRequest addScenarioIdsItem(UUID scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new ArrayList<>(); + } + this.scenarioIds.add(scenarioIdsItem); + return this; + } + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + public ExecutePromptSimulationRequest selectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + return this; + } + + /** + * Get selectAll + * @return selectAll + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectAll() { + return selectAll; + } + + + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + } + + + /** + * Return true if this ExecutePromptSimulationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutePromptSimulationRequest executePromptSimulationRequest = (ExecutePromptSimulationRequest) o; + return Objects.equals(this.scenarioIds, executePromptSimulationRequest.scenarioIds) && + Objects.equals(this.selectAll, executePromptSimulationRequest.selectAll); + } + + @Override + public int hashCode() { + return Objects.hash(scenarioIds, selectAll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutePromptSimulationRequest {\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append(" selectAll: ").append(toIndentedString(selectAll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + // add `select_all` to the URL query string + if (getSelectAll() != null) { + joiner.add(String.format("%sselect_all%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectAll())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResponse.java new file mode 100644 index 0000000..99440d9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExecutePromptSimulationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExecutePromptSimulationResponse + */ +@JsonPropertyOrder({ + ExecutePromptSimulationResponse.JSON_PROPERTY_STATUS, + ExecutePromptSimulationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExecutePromptSimulationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExecutePromptSimulationResult result; + + public ExecutePromptSimulationResponse() { + } + + public ExecutePromptSimulationResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ExecutePromptSimulationResponse result(@javax.annotation.Nonnull ExecutePromptSimulationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutePromptSimulationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExecutePromptSimulationResult result) { + this.result = result; + } + + + /** + * Return true if this ExecutePromptSimulationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutePromptSimulationResponse executePromptSimulationResponse = (ExecutePromptSimulationResponse) o; + return Objects.equals(this.status, executePromptSimulationResponse.status) && + Objects.equals(this.result, executePromptSimulationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutePromptSimulationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResult.java new file mode 100644 index 0000000..ee746d2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutePromptSimulationResult.java @@ -0,0 +1,342 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExecutePromptSimulationResult + */ +@JsonPropertyOrder({ + ExecutePromptSimulationResult.JSON_PROPERTY_MESSAGE, + ExecutePromptSimulationResult.JSON_PROPERTY_EXECUTION_ID, + ExecutePromptSimulationResult.JSON_PROPERTY_RUN_TEST_ID, + ExecutePromptSimulationResult.JSON_PROPERTY_STATUS, + ExecutePromptSimulationResult.JSON_PROPERTY_TOTAL_SCENARIOS, + ExecutePromptSimulationResult.JSON_PROPERTY_TOTAL_CALLS, + ExecutePromptSimulationResult.JSON_PROPERTY_SCENARIO_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExecutePromptSimulationResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nullable + private UUID executionId; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nullable + private UUID runTestId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_TOTAL_SCENARIOS = "total_scenarios"; + @javax.annotation.Nullable + private Integer totalScenarios; + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nonnull + private List scenarioIds = new ArrayList<>(); + + public ExecutePromptSimulationResult() { + } + + @JsonCreator + public ExecutePromptSimulationResult( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) UUID executionId, + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) UUID runTestId, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) Integer totalScenarios, + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) Integer totalCalls + ) { + this(); + this.message = message; + this.executionId = executionId; + this.runTestId = runTestId; + this.status = status; + this.totalScenarios = totalScenarios; + this.totalCalls = totalCalls; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExecutionId() { + return executionId; + } + + + + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getRunTestId() { + return runTestId; + } + + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + /** + * Get totalScenarios + * @return totalScenarios + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalScenarios() { + return totalScenarios; + } + + + + + /** + * Get totalCalls + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + + + public ExecutePromptSimulationResult scenarioIds(@javax.annotation.Nonnull List scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public ExecutePromptSimulationResult addScenarioIdsItem(UUID scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new ArrayList<>(); + } + this.scenarioIds.add(scenarioIdsItem); + return this; + } + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScenarioIds(@javax.annotation.Nonnull List scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + /** + * Return true if this ExecutePromptSimulationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutePromptSimulationResult executePromptSimulationResult = (ExecutePromptSimulationResult) o; + return Objects.equals(this.message, executePromptSimulationResult.message) && + Objects.equals(this.executionId, executePromptSimulationResult.executionId) && + Objects.equals(this.runTestId, executePromptSimulationResult.runTestId) && + Objects.equals(this.status, executePromptSimulationResult.status) && + Objects.equals(this.totalScenarios, executePromptSimulationResult.totalScenarios) && + Objects.equals(this.totalCalls, executePromptSimulationResult.totalCalls) && + Objects.equals(this.scenarioIds, executePromptSimulationResult.scenarioIds); + } + + @Override + public int hashCode() { + return Objects.hash(message, executionId, runTestId, status, totalScenarios, totalCalls, scenarioIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutePromptSimulationResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalScenarios: ").append(toIndentedString(totalScenarios)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `total_scenarios` to the URL query string + if (getTotalScenarios() != null) { + joiner.add(String.format("%stotal_scenarios%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalScenarios())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecuteRunTest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecuteRunTest.java new file mode 100644 index 0000000..ebd7fe4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecuteRunTest.java @@ -0,0 +1,262 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExecuteRunTest + */ +@JsonPropertyOrder({ + ExecuteRunTest.JSON_PROPERTY_SCENARIO_IDS, + ExecuteRunTest.JSON_PROPERTY_SIMULATOR_ID, + ExecuteRunTest.JSON_PROPERTY_SELECT_ALL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExecuteRunTest { + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nullable + private List scenarioIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SIMULATOR_ID = "simulator_id"; + private JsonNullable simulatorId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SELECT_ALL = "select_all"; + @javax.annotation.Nullable + private Boolean selectAll = false; + + public ExecuteRunTest() { + } + + public ExecuteRunTest scenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public ExecuteRunTest addScenarioIdsItem(UUID scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new ArrayList<>(); + } + this.scenarioIds.add(scenarioIdsItem); + return this; + } + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + public ExecuteRunTest simulatorId(@javax.annotation.Nullable UUID simulatorId) { + this.simulatorId = JsonNullable.of(simulatorId); + return this; + } + + /** + * Get simulatorId + * @return simulatorId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getSimulatorId() { + return simulatorId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SIMULATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSimulatorId_JsonNullable() { + return simulatorId; + } + + @JsonProperty(JSON_PROPERTY_SIMULATOR_ID) + public void setSimulatorId_JsonNullable(JsonNullable simulatorId) { + this.simulatorId = simulatorId; + } + + public void setSimulatorId(@javax.annotation.Nullable UUID simulatorId) { + this.simulatorId = JsonNullable.of(simulatorId); + } + + + public ExecuteRunTest selectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + return this; + } + + /** + * Get selectAll + * @return selectAll + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectAll() { + return selectAll; + } + + + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + } + + + /** + * Return true if this ExecuteRunTest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecuteRunTest executeRunTest = (ExecuteRunTest) o; + return Objects.equals(this.scenarioIds, executeRunTest.scenarioIds) && + equalsNullable(this.simulatorId, executeRunTest.simulatorId) && + Objects.equals(this.selectAll, executeRunTest.selectAll); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(scenarioIds, hashCodeNullable(simulatorId), selectAll); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecuteRunTest {\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append(" simulatorId: ").append(toIndentedString(simulatorId)).append("\n"); + sb.append(" selectAll: ").append(toIndentedString(selectAll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + // add `simulator_id` to the URL query string + if (getSimulatorId() != null) { + joiner.add(String.format("%ssimulator_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulatorId())))); + } + + // add `select_all` to the URL query string + if (getSelectAll() != null) { + joiner.add(String.format("%sselect_all%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectAll())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionMetrics.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionMetrics.java new file mode 100644 index 0000000..f463b7b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionMetrics.java @@ -0,0 +1,428 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExecutionMetrics + */ +@JsonPropertyOrder({ + ExecutionMetrics.JSON_PROPERTY_EXECUTION_ID, + ExecutionMetrics.JSON_PROPERTY_STATUS, + ExecutionMetrics.JSON_PROPERTY_STARTED_AT, + ExecutionMetrics.JSON_PROPERTY_COMPLETED_AT, + ExecutionMetrics.JSON_PROPERTY_TOTAL_CALLS, + ExecutionMetrics.JSON_PROPERTY_COMPLETED_CALLS, + ExecutionMetrics.JSON_PROPERTY_FAILED_CALLS, + ExecutionMetrics.JSON_PROPERTY_METRICS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExecutionMetrics { + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nonnull + private UUID executionId; + + /** + * Current status of the test execution + */ + public enum StatusEnum { + PENDING(String.valueOf("pending")), + + RUNNING(String.valueOf("running")), + + COMPLETED(String.valueOf("completed")), + + FAILED(String.valueOf("failed")), + + CANCELLED(String.valueOf("cancelled")), + + CANCELLING(String.valueOf("cancelling")), + + EVALUATING(String.valueOf("evaluating")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + @javax.annotation.Nullable + private OffsetDateTime startedAt; + + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_COMPLETED_CALLS = "completed_calls"; + @javax.annotation.Nullable + private Integer completedCalls; + + public static final String JSON_PROPERTY_FAILED_CALLS = "failed_calls"; + @javax.annotation.Nullable + private Integer failedCalls; + + public static final String JSON_PROPERTY_METRICS = "metrics"; + @javax.annotation.Nullable + private String metrics; + + public ExecutionMetrics() { + } + + @JsonCreator + public ExecutionMetrics( + @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, + @JsonProperty(JSON_PROPERTY_STARTED_AT) OffsetDateTime startedAt, + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) OffsetDateTime completedAt, + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) Integer totalCalls, + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) Integer completedCalls, + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) Integer failedCalls, + @JsonProperty(JSON_PROPERTY_METRICS) String metrics + ) { + this(); + this.status = status; + this.startedAt = startedAt; + this.completedAt = completedAt == null ? JsonNullable.undefined() : JsonNullable.of(completedAt); + this.totalCalls = totalCalls; + this.completedCalls = completedCalls; + this.failedCalls = failedCalls; + this.metrics = metrics; + } + + public ExecutionMetrics executionId(@javax.annotation.Nonnull UUID executionId) { + this.executionId = executionId; + return this; + } + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExecutionId() { + return executionId; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionId(@javax.annotation.Nonnull UUID executionId) { + this.executionId = executionId; + } + + + /** + * Current status of the test execution + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + + + /** + * When the test execution started + * @return startedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getStartedAt() { + return startedAt; + } + + + + + /** + * When the test execution completed + * @return completedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + + if (completedAt == null) { + completedAt = JsonNullable.undefined(); + } + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + private void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + + + /** + * Total number of calls to be made + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + + + /** + * Number of successfully completed calls + * @return completedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCompletedCalls() { + return completedCalls; + } + + + + + /** + * Number of failed calls + * @return failedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailedCalls() { + return failedCalls; + } + + + + + /** + * Get metrics + * @return metrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMetrics() { + return metrics; + } + + + + + /** + * Return true if this ExecutionMetrics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionMetrics executionMetrics = (ExecutionMetrics) o; + return Objects.equals(this.executionId, executionMetrics.executionId) && + Objects.equals(this.status, executionMetrics.status) && + Objects.equals(this.startedAt, executionMetrics.startedAt) && + equalsNullable(this.completedAt, executionMetrics.completedAt) && + Objects.equals(this.totalCalls, executionMetrics.totalCalls) && + Objects.equals(this.completedCalls, executionMetrics.completedCalls) && + Objects.equals(this.failedCalls, executionMetrics.failedCalls) && + Objects.equals(this.metrics, executionMetrics.metrics); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(executionId, status, startedAt, hashCodeNullable(completedAt), totalCalls, completedCalls, failedCalls, metrics); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionMetrics {\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" completedCalls: ").append(toIndentedString(completedCalls)).append("\n"); + sb.append(" failedCalls: ").append(toIndentedString(failedCalls)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `started_at` to the URL query string + if (getStartedAt() != null) { + joiner.add(String.format("%sstarted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartedAt())))); + } + + // add `completed_at` to the URL query string + if (getCompletedAt() != null) { + joiner.add(String.format("%scompleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedAt())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `completed_calls` to the URL query string + if (getCompletedCalls() != null) { + joiner.add(String.format("%scompleted_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedCalls())))); + } + + // add `failed_calls` to the URL query string + if (getFailedCalls() != null) { + joiner.add(String.format("%sfailed_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedCalls())))); + } + + // add `metrics` to the URL query string + if (getMetrics() != null) { + joiner.add(String.format("%smetrics%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetrics())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionRuns.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionRuns.java new file mode 100644 index 0000000..2af3dd7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExecutionRuns.java @@ -0,0 +1,428 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExecutionRuns + */ +@JsonPropertyOrder({ + ExecutionRuns.JSON_PROPERTY_EXECUTION_ID, + ExecutionRuns.JSON_PROPERTY_STATUS, + ExecutionRuns.JSON_PROPERTY_STARTED_AT, + ExecutionRuns.JSON_PROPERTY_COMPLETED_AT, + ExecutionRuns.JSON_PROPERTY_TOTAL_CALLS, + ExecutionRuns.JSON_PROPERTY_COMPLETED_CALLS, + ExecutionRuns.JSON_PROPERTY_FAILED_CALLS, + ExecutionRuns.JSON_PROPERTY_EVAL_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExecutionRuns { + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nonnull + private UUID executionId; + + /** + * Current status of the test execution + */ + public enum StatusEnum { + PENDING(String.valueOf("pending")), + + RUNNING(String.valueOf("running")), + + COMPLETED(String.valueOf("completed")), + + FAILED(String.valueOf("failed")), + + CANCELLED(String.valueOf("cancelled")), + + CANCELLING(String.valueOf("cancelling")), + + EVALUATING(String.valueOf("evaluating")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + @javax.annotation.Nullable + private OffsetDateTime startedAt; + + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_COMPLETED_CALLS = "completed_calls"; + @javax.annotation.Nullable + private Integer completedCalls; + + public static final String JSON_PROPERTY_FAILED_CALLS = "failed_calls"; + @javax.annotation.Nullable + private Integer failedCalls; + + public static final String JSON_PROPERTY_EVAL_RESULTS = "eval_results"; + @javax.annotation.Nullable + private String evalResults; + + public ExecutionRuns() { + } + + @JsonCreator + public ExecutionRuns( + @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, + @JsonProperty(JSON_PROPERTY_STARTED_AT) OffsetDateTime startedAt, + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) OffsetDateTime completedAt, + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) Integer totalCalls, + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) Integer completedCalls, + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) Integer failedCalls, + @JsonProperty(JSON_PROPERTY_EVAL_RESULTS) String evalResults + ) { + this(); + this.status = status; + this.startedAt = startedAt; + this.completedAt = completedAt == null ? JsonNullable.undefined() : JsonNullable.of(completedAt); + this.totalCalls = totalCalls; + this.completedCalls = completedCalls; + this.failedCalls = failedCalls; + this.evalResults = evalResults; + } + + public ExecutionRuns executionId(@javax.annotation.Nonnull UUID executionId) { + this.executionId = executionId; + return this; + } + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExecutionId() { + return executionId; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionId(@javax.annotation.Nonnull UUID executionId) { + this.executionId = executionId; + } + + + /** + * Current status of the test execution + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + + + /** + * When the test execution started + * @return startedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getStartedAt() { + return startedAt; + } + + + + + /** + * When the test execution completed + * @return completedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + + if (completedAt == null) { + completedAt = JsonNullable.undefined(); + } + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + private void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + + + /** + * Total number of calls to be made + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + + + /** + * Number of successfully completed calls + * @return completedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCompletedCalls() { + return completedCalls; + } + + + + + /** + * Number of failed calls + * @return failedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailedCalls() { + return failedCalls; + } + + + + + /** + * Get evalResults + * @return evalResults + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalResults() { + return evalResults; + } + + + + + /** + * Return true if this ExecutionRuns object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionRuns executionRuns = (ExecutionRuns) o; + return Objects.equals(this.executionId, executionRuns.executionId) && + Objects.equals(this.status, executionRuns.status) && + Objects.equals(this.startedAt, executionRuns.startedAt) && + equalsNullable(this.completedAt, executionRuns.completedAt) && + Objects.equals(this.totalCalls, executionRuns.totalCalls) && + Objects.equals(this.completedCalls, executionRuns.completedCalls) && + Objects.equals(this.failedCalls, executionRuns.failedCalls) && + Objects.equals(this.evalResults, executionRuns.evalResults); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(executionId, status, startedAt, hashCodeNullable(completedAt), totalCalls, completedCalls, failedCalls, evalResults); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionRuns {\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" completedCalls: ").append(toIndentedString(completedCalls)).append("\n"); + sb.append(" failedCalls: ").append(toIndentedString(failedCalls)).append("\n"); + sb.append(" evalResults: ").append(toIndentedString(evalResults)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `started_at` to the URL query string + if (getStartedAt() != null) { + joiner.add(String.format("%sstarted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartedAt())))); + } + + // add `completed_at` to the URL query string + if (getCompletedAt() != null) { + joiner.add(String.format("%scompleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedAt())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `completed_calls` to the URL query string + if (getCompletedCalls() != null) { + joiner.add(String.format("%scompleted_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedCalls())))); + } + + // add `failed_calls` to the URL query string + if (getFailedCalls() != null) { + joiner.add(String.format("%sfailed_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedCalls())))); + } + + // add `eval_results` to the URL query string + if (getEvalResults() != null) { + joiner.add(String.format("%seval_results%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalResults())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonColumnMetric.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonColumnMetric.java new file mode 100644 index 0000000..c9c9fe4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonColumnMetric.java @@ -0,0 +1,347 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonColumnMetric + */ +@JsonPropertyOrder({ + ExperimentComparisonColumnMetric.JSON_PROPERTY_COLUMN_ID, + ExperimentComparisonColumnMetric.JSON_PROPERTY_COLUMN_NAME, + ExperimentComparisonColumnMetric.JSON_PROPERTY_AVG_COMPLETION_TOKENS, + ExperimentComparisonColumnMetric.JSON_PROPERTY_AVG_TOTAL_TOKENS, + ExperimentComparisonColumnMetric.JSON_PROPERTY_AVG_RESPONSE_TIME, + ExperimentComparisonColumnMetric.JSON_PROPERTY_AVG_SCORE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonColumnMetric { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_COLUMN_NAME = "column_name"; + @javax.annotation.Nonnull + private String columnName; + + public static final String JSON_PROPERTY_AVG_COMPLETION_TOKENS = "avg_completion_tokens"; + @javax.annotation.Nonnull + private BigDecimal avgCompletionTokens; + + public static final String JSON_PROPERTY_AVG_TOTAL_TOKENS = "avg_total_tokens"; + @javax.annotation.Nonnull + private BigDecimal avgTotalTokens; + + public static final String JSON_PROPERTY_AVG_RESPONSE_TIME = "avg_response_time"; + @javax.annotation.Nonnull + private BigDecimal avgResponseTime; + + public static final String JSON_PROPERTY_AVG_SCORE = "avg_score"; + @javax.annotation.Nullable + private Map avgScore = new HashMap<>(); + + public ExperimentComparisonColumnMetric() { + } + + public ExperimentComparisonColumnMetric columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public ExperimentComparisonColumnMetric columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get columnName + * @return columnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumnName() { + return columnName; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + + public ExperimentComparisonColumnMetric avgCompletionTokens(@javax.annotation.Nonnull BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = avgCompletionTokens; + return this; + } + + /** + * Get avgCompletionTokens + * @return avgCompletionTokens + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgCompletionTokens() { + return avgCompletionTokens; + } + + + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgCompletionTokens(@javax.annotation.Nonnull BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = avgCompletionTokens; + } + + + public ExperimentComparisonColumnMetric avgTotalTokens(@javax.annotation.Nonnull BigDecimal avgTotalTokens) { + this.avgTotalTokens = avgTotalTokens; + return this; + } + + /** + * Get avgTotalTokens + * @return avgTotalTokens + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgTotalTokens() { + return avgTotalTokens; + } + + + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgTotalTokens(@javax.annotation.Nonnull BigDecimal avgTotalTokens) { + this.avgTotalTokens = avgTotalTokens; + } + + + public ExperimentComparisonColumnMetric avgResponseTime(@javax.annotation.Nonnull BigDecimal avgResponseTime) { + this.avgResponseTime = avgResponseTime; + return this; + } + + /** + * Get avgResponseTime + * @return avgResponseTime + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgResponseTime() { + return avgResponseTime; + } + + + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgResponseTime(@javax.annotation.Nonnull BigDecimal avgResponseTime) { + this.avgResponseTime = avgResponseTime; + } + + + public ExperimentComparisonColumnMetric avgScore(@javax.annotation.Nullable Map avgScore) { + this.avgScore = avgScore; + return this; + } + + public ExperimentComparisonColumnMetric putAvgScoreItem(String key, Object avgScoreItem) { + if (this.avgScore == null) { + this.avgScore = new HashMap<>(); + } + this.avgScore.put(key, avgScoreItem); + return this; + } + + /** + * Get avgScore + * @return avgScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAvgScore() { + return avgScore; + } + + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setAvgScore(@javax.annotation.Nullable Map avgScore) { + this.avgScore = avgScore; + } + + + /** + * Return true if this ExperimentComparisonColumnMetric object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonColumnMetric experimentComparisonColumnMetric = (ExperimentComparisonColumnMetric) o; + return Objects.equals(this.columnId, experimentComparisonColumnMetric.columnId) && + Objects.equals(this.columnName, experimentComparisonColumnMetric.columnName) && + Objects.equals(this.avgCompletionTokens, experimentComparisonColumnMetric.avgCompletionTokens) && + Objects.equals(this.avgTotalTokens, experimentComparisonColumnMetric.avgTotalTokens) && + Objects.equals(this.avgResponseTime, experimentComparisonColumnMetric.avgResponseTime) && + Objects.equals(this.avgScore, experimentComparisonColumnMetric.avgScore); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, columnName, avgCompletionTokens, avgTotalTokens, avgResponseTime, avgScore); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonColumnMetric {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" avgCompletionTokens: ").append(toIndentedString(avgCompletionTokens)).append("\n"); + sb.append(" avgTotalTokens: ").append(toIndentedString(avgTotalTokens)).append("\n"); + sb.append(" avgResponseTime: ").append(toIndentedString(avgResponseTime)).append("\n"); + sb.append(" avgScore: ").append(toIndentedString(avgScore)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `column_name` to the URL query string + if (getColumnName() != null) { + joiner.add(String.format("%scolumn_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnName())))); + } + + // add `avg_completion_tokens` to the URL query string + if (getAvgCompletionTokens() != null) { + joiner.add(String.format("%savg_completion_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgCompletionTokens())))); + } + + // add `avg_total_tokens` to the URL query string + if (getAvgTotalTokens() != null) { + joiner.add(String.format("%savg_total_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTotalTokens())))); + } + + // add `avg_response_time` to the URL query string + if (getAvgResponseTime() != null) { + joiner.add(String.format("%savg_response_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgResponseTime())))); + } + + // add `avg_score` to the URL query string + if (getAvgScore() != null) { + for (String _key : getAvgScore().keySet()) { + joiner.add(String.format("%savg_score%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAvgScore().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAvgScore().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDatasetMetric.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDatasetMetric.java new file mode 100644 index 0000000..15064fe --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDatasetMetric.java @@ -0,0 +1,600 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentComparisonColumnMetric; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonDatasetMetric + */ +@JsonPropertyOrder({ + ExperimentComparisonDatasetMetric.JSON_PROPERTY_DATASET_ID, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_AVG_COMPLETION_TOKENS, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_AVG_TOTAL_TOKENS, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_AVG_RESPONSE_TIME, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_AVG_SCORE, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_COLUMNS, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_NORMALIZED_SCORES, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_OVERALL_RATING, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_RANK, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_RANK_SUFFIX, + ExperimentComparisonDatasetMetric.JSON_PROPERTY_TOTAL_DATASETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonDatasetMetric { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_AVG_COMPLETION_TOKENS = "avg_completion_tokens"; + private JsonNullable avgCompletionTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_TOTAL_TOKENS = "avg_total_tokens"; + private JsonNullable avgTotalTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_RESPONSE_TIME = "avg_response_time"; + private JsonNullable avgResponseTime = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_SCORE = "avg_score"; + private JsonNullable avgScore = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nullable + private List columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_NORMALIZED_SCORES = "normalized_scores"; + @javax.annotation.Nullable + private Map normalizedScores = new HashMap<>(); + + public static final String JSON_PROPERTY_OVERALL_RATING = "overall_rating"; + private JsonNullable overallRating = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RANK = "rank"; + private JsonNullable rank = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RANK_SUFFIX = "rank_suffix"; + @javax.annotation.Nullable + private String rankSuffix; + + public static final String JSON_PROPERTY_TOTAL_DATASETS = "total_datasets"; + @javax.annotation.Nullable + private Integer totalDatasets; + + public ExperimentComparisonDatasetMetric() { + } + + public ExperimentComparisonDatasetMetric datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public ExperimentComparisonDatasetMetric avgCompletionTokens(@javax.annotation.Nullable BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = JsonNullable.of(avgCompletionTokens); + return this; + } + + /** + * Get avgCompletionTokens + * @return avgCompletionTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgCompletionTokens() { + return avgCompletionTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgCompletionTokens_JsonNullable() { + return avgCompletionTokens; + } + + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + public void setAvgCompletionTokens_JsonNullable(JsonNullable avgCompletionTokens) { + this.avgCompletionTokens = avgCompletionTokens; + } + + public void setAvgCompletionTokens(@javax.annotation.Nullable BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = JsonNullable.of(avgCompletionTokens); + } + + + public ExperimentComparisonDatasetMetric avgTotalTokens(@javax.annotation.Nullable BigDecimal avgTotalTokens) { + this.avgTotalTokens = JsonNullable.of(avgTotalTokens); + return this; + } + + /** + * Get avgTotalTokens + * @return avgTotalTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgTotalTokens() { + return avgTotalTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgTotalTokens_JsonNullable() { + return avgTotalTokens; + } + + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + public void setAvgTotalTokens_JsonNullable(JsonNullable avgTotalTokens) { + this.avgTotalTokens = avgTotalTokens; + } + + public void setAvgTotalTokens(@javax.annotation.Nullable BigDecimal avgTotalTokens) { + this.avgTotalTokens = JsonNullable.of(avgTotalTokens); + } + + + public ExperimentComparisonDatasetMetric avgResponseTime(@javax.annotation.Nullable BigDecimal avgResponseTime) { + this.avgResponseTime = JsonNullable.of(avgResponseTime); + return this; + } + + /** + * Get avgResponseTime + * @return avgResponseTime + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgResponseTime() { + return avgResponseTime.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgResponseTime_JsonNullable() { + return avgResponseTime; + } + + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + public void setAvgResponseTime_JsonNullable(JsonNullable avgResponseTime) { + this.avgResponseTime = avgResponseTime; + } + + public void setAvgResponseTime(@javax.annotation.Nullable BigDecimal avgResponseTime) { + this.avgResponseTime = JsonNullable.of(avgResponseTime); + } + + + public ExperimentComparisonDatasetMetric avgScore(@javax.annotation.Nullable BigDecimal avgScore) { + this.avgScore = JsonNullable.of(avgScore); + return this; + } + + /** + * Get avgScore + * @return avgScore + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgScore() { + return avgScore.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgScore_JsonNullable() { + return avgScore; + } + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + public void setAvgScore_JsonNullable(JsonNullable avgScore) { + this.avgScore = avgScore; + } + + public void setAvgScore(@javax.annotation.Nullable BigDecimal avgScore) { + this.avgScore = JsonNullable.of(avgScore); + } + + + public ExperimentComparisonDatasetMetric columns(@javax.annotation.Nullable List columns) { + this.columns = columns; + return this; + } + + public ExperimentComparisonDatasetMetric addColumnsItem(ExperimentComparisonColumnMetric columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumns(@javax.annotation.Nullable List columns) { + this.columns = columns; + } + + + public ExperimentComparisonDatasetMetric normalizedScores(@javax.annotation.Nullable Map normalizedScores) { + this.normalizedScores = normalizedScores; + return this; + } + + public ExperimentComparisonDatasetMetric putNormalizedScoresItem(String key, Object normalizedScoresItem) { + if (this.normalizedScores == null) { + this.normalizedScores = new HashMap<>(); + } + this.normalizedScores.put(key, normalizedScoresItem); + return this; + } + + /** + * Get normalizedScores + * @return normalizedScores + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NORMALIZED_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getNormalizedScores() { + return normalizedScores; + } + + + @JsonProperty(JSON_PROPERTY_NORMALIZED_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setNormalizedScores(@javax.annotation.Nullable Map normalizedScores) { + this.normalizedScores = normalizedScores; + } + + + public ExperimentComparisonDatasetMetric overallRating(@javax.annotation.Nullable BigDecimal overallRating) { + this.overallRating = JsonNullable.of(overallRating); + return this; + } + + /** + * Get overallRating + * @return overallRating + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getOverallRating() { + return overallRating.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OVERALL_RATING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOverallRating_JsonNullable() { + return overallRating; + } + + @JsonProperty(JSON_PROPERTY_OVERALL_RATING) + public void setOverallRating_JsonNullable(JsonNullable overallRating) { + this.overallRating = overallRating; + } + + public void setOverallRating(@javax.annotation.Nullable BigDecimal overallRating) { + this.overallRating = JsonNullable.of(overallRating); + } + + + public ExperimentComparisonDatasetMetric rank(@javax.annotation.Nullable Integer rank) { + this.rank = JsonNullable.of(rank); + return this; + } + + /** + * Get rank + * @return rank + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getRank() { + return rank.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRank_JsonNullable() { + return rank; + } + + @JsonProperty(JSON_PROPERTY_RANK) + public void setRank_JsonNullable(JsonNullable rank) { + this.rank = rank; + } + + public void setRank(@javax.annotation.Nullable Integer rank) { + this.rank = JsonNullable.of(rank); + } + + + public ExperimentComparisonDatasetMetric rankSuffix(@javax.annotation.Nullable String rankSuffix) { + this.rankSuffix = rankSuffix; + return this; + } + + /** + * Get rankSuffix + * @return rankSuffix + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RANK_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRankSuffix() { + return rankSuffix; + } + + + @JsonProperty(JSON_PROPERTY_RANK_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRankSuffix(@javax.annotation.Nullable String rankSuffix) { + this.rankSuffix = rankSuffix; + } + + + public ExperimentComparisonDatasetMetric totalDatasets(@javax.annotation.Nullable Integer totalDatasets) { + this.totalDatasets = totalDatasets; + return this; + } + + /** + * Get totalDatasets + * @return totalDatasets + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_DATASETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalDatasets() { + return totalDatasets; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_DATASETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalDatasets(@javax.annotation.Nullable Integer totalDatasets) { + this.totalDatasets = totalDatasets; + } + + + /** + * Return true if this ExperimentComparisonDatasetMetric object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonDatasetMetric experimentComparisonDatasetMetric = (ExperimentComparisonDatasetMetric) o; + return Objects.equals(this.datasetId, experimentComparisonDatasetMetric.datasetId) && + equalsNullable(this.avgCompletionTokens, experimentComparisonDatasetMetric.avgCompletionTokens) && + equalsNullable(this.avgTotalTokens, experimentComparisonDatasetMetric.avgTotalTokens) && + equalsNullable(this.avgResponseTime, experimentComparisonDatasetMetric.avgResponseTime) && + equalsNullable(this.avgScore, experimentComparisonDatasetMetric.avgScore) && + Objects.equals(this.columns, experimentComparisonDatasetMetric.columns) && + Objects.equals(this.normalizedScores, experimentComparisonDatasetMetric.normalizedScores) && + equalsNullable(this.overallRating, experimentComparisonDatasetMetric.overallRating) && + equalsNullable(this.rank, experimentComparisonDatasetMetric.rank) && + Objects.equals(this.rankSuffix, experimentComparisonDatasetMetric.rankSuffix) && + Objects.equals(this.totalDatasets, experimentComparisonDatasetMetric.totalDatasets); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, hashCodeNullable(avgCompletionTokens), hashCodeNullable(avgTotalTokens), hashCodeNullable(avgResponseTime), hashCodeNullable(avgScore), columns, normalizedScores, hashCodeNullable(overallRating), hashCodeNullable(rank), rankSuffix, totalDatasets); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonDatasetMetric {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" avgCompletionTokens: ").append(toIndentedString(avgCompletionTokens)).append("\n"); + sb.append(" avgTotalTokens: ").append(toIndentedString(avgTotalTokens)).append("\n"); + sb.append(" avgResponseTime: ").append(toIndentedString(avgResponseTime)).append("\n"); + sb.append(" avgScore: ").append(toIndentedString(avgScore)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" normalizedScores: ").append(toIndentedString(normalizedScores)).append("\n"); + sb.append(" overallRating: ").append(toIndentedString(overallRating)).append("\n"); + sb.append(" rank: ").append(toIndentedString(rank)).append("\n"); + sb.append(" rankSuffix: ").append(toIndentedString(rankSuffix)).append("\n"); + sb.append(" totalDatasets: ").append(toIndentedString(totalDatasets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `avg_completion_tokens` to the URL query string + if (getAvgCompletionTokens() != null) { + joiner.add(String.format("%savg_completion_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgCompletionTokens())))); + } + + // add `avg_total_tokens` to the URL query string + if (getAvgTotalTokens() != null) { + joiner.add(String.format("%savg_total_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTotalTokens())))); + } + + // add `avg_response_time` to the URL query string + if (getAvgResponseTime() != null) { + joiner.add(String.format("%savg_response_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgResponseTime())))); + } + + // add `avg_score` to the URL query string + if (getAvgScore() != null) { + joiner.add(String.format("%savg_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgScore())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + if (getColumns().get(i) != null) { + joiner.add(getColumns().get(i).toUrlQueryString(String.format("%scolumns%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `normalized_scores` to the URL query string + if (getNormalizedScores() != null) { + for (String _key : getNormalizedScores().keySet()) { + joiner.add(String.format("%snormalized_scores%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getNormalizedScores().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getNormalizedScores().get(_key))))); + } + } + + // add `overall_rating` to the URL query string + if (getOverallRating() != null) { + joiner.add(String.format("%soverall_rating%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallRating())))); + } + + // add `rank` to the URL query string + if (getRank() != null) { + joiner.add(String.format("%srank%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRank())))); + } + + // add `rank_suffix` to the URL query string + if (getRankSuffix() != null) { + joiner.add(String.format("%srank_suffix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRankSuffix())))); + } + + // add `total_datasets` to the URL query string + if (getTotalDatasets() != null) { + joiner.add(String.format("%stotal_datasets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalDatasets())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetail.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetail.java new file mode 100644 index 0000000..a762b53 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetail.java @@ -0,0 +1,421 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentComparisonMetrics; +import com.futureagi.sdk.model.ExperimentComparisonWeights; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonDetail + */ +@JsonPropertyOrder({ + ExperimentComparisonDetail.JSON_PROPERTY_SCORES_WEIGHT, + ExperimentComparisonDetail.JSON_PROPERTY_EXPERIMENT_DATASET_ID, + ExperimentComparisonDetail.JSON_PROPERTY_RANK, + ExperimentComparisonDetail.JSON_PROPERTY_RANK_SUFFIX, + ExperimentComparisonDetail.JSON_PROPERTY_METRICS, + ExperimentComparisonDetail.JSON_PROPERTY_WEIGHTS, + ExperimentComparisonDetail.JSON_PROPERTY_OVERALL_RATING +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonDetail { + public static final String JSON_PROPERTY_SCORES_WEIGHT = "scores_weight"; + @javax.annotation.Nullable + private Map scoresWeight = new HashMap<>(); + + public static final String JSON_PROPERTY_EXPERIMENT_DATASET_ID = "experiment_dataset_id"; + private JsonNullable experimentDatasetId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RANK = "rank"; + private JsonNullable rank = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RANK_SUFFIX = "rank_suffix"; + @javax.annotation.Nullable + private String rankSuffix; + + public static final String JSON_PROPERTY_METRICS = "metrics"; + @javax.annotation.Nonnull + private ExperimentComparisonMetrics metrics; + + public static final String JSON_PROPERTY_WEIGHTS = "weights"; + @javax.annotation.Nonnull + private ExperimentComparisonWeights weights; + + public static final String JSON_PROPERTY_OVERALL_RATING = "overall_rating"; + private JsonNullable overallRating = JsonNullable.undefined(); + + public ExperimentComparisonDetail() { + } + + public ExperimentComparisonDetail scoresWeight(@javax.annotation.Nullable Map scoresWeight) { + this.scoresWeight = scoresWeight; + return this; + } + + public ExperimentComparisonDetail putScoresWeightItem(String key, Object scoresWeightItem) { + if (this.scoresWeight == null) { + this.scoresWeight = new HashMap<>(); + } + this.scoresWeight.put(key, scoresWeightItem); + return this; + } + + /** + * Get scoresWeight + * @return scoresWeight + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORES_WEIGHT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getScoresWeight() { + return scoresWeight; + } + + + @JsonProperty(JSON_PROPERTY_SCORES_WEIGHT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setScoresWeight(@javax.annotation.Nullable Map scoresWeight) { + this.scoresWeight = scoresWeight; + } + + + public ExperimentComparisonDetail experimentDatasetId(@javax.annotation.Nullable UUID experimentDatasetId) { + this.experimentDatasetId = JsonNullable.of(experimentDatasetId); + return this; + } + + /** + * Get experimentDatasetId + * @return experimentDatasetId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getExperimentDatasetId() { + return experimentDatasetId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExperimentDatasetId_JsonNullable() { + return experimentDatasetId; + } + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_DATASET_ID) + public void setExperimentDatasetId_JsonNullable(JsonNullable experimentDatasetId) { + this.experimentDatasetId = experimentDatasetId; + } + + public void setExperimentDatasetId(@javax.annotation.Nullable UUID experimentDatasetId) { + this.experimentDatasetId = JsonNullable.of(experimentDatasetId); + } + + + public ExperimentComparisonDetail rank(@javax.annotation.Nullable Integer rank) { + this.rank = JsonNullable.of(rank); + return this; + } + + /** + * Get rank + * @return rank + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getRank() { + return rank.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRank_JsonNullable() { + return rank; + } + + @JsonProperty(JSON_PROPERTY_RANK) + public void setRank_JsonNullable(JsonNullable rank) { + this.rank = rank; + } + + public void setRank(@javax.annotation.Nullable Integer rank) { + this.rank = JsonNullable.of(rank); + } + + + public ExperimentComparisonDetail rankSuffix(@javax.annotation.Nullable String rankSuffix) { + this.rankSuffix = rankSuffix; + return this; + } + + /** + * Get rankSuffix + * @return rankSuffix + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RANK_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRankSuffix() { + return rankSuffix; + } + + + @JsonProperty(JSON_PROPERTY_RANK_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRankSuffix(@javax.annotation.Nullable String rankSuffix) { + this.rankSuffix = rankSuffix; + } + + + public ExperimentComparisonDetail metrics(@javax.annotation.Nonnull ExperimentComparisonMetrics metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get metrics + * @return metrics + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentComparisonMetrics getMetrics() { + return metrics; + } + + + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetrics(@javax.annotation.Nonnull ExperimentComparisonMetrics metrics) { + this.metrics = metrics; + } + + + public ExperimentComparisonDetail weights(@javax.annotation.Nonnull ExperimentComparisonWeights weights) { + this.weights = weights; + return this; + } + + /** + * Get weights + * @return weights + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WEIGHTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentComparisonWeights getWeights() { + return weights; + } + + + @JsonProperty(JSON_PROPERTY_WEIGHTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWeights(@javax.annotation.Nonnull ExperimentComparisonWeights weights) { + this.weights = weights; + } + + + public ExperimentComparisonDetail overallRating(@javax.annotation.Nullable BigDecimal overallRating) { + this.overallRating = JsonNullable.of(overallRating); + return this; + } + + /** + * Get overallRating + * @return overallRating + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getOverallRating() { + return overallRating.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OVERALL_RATING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOverallRating_JsonNullable() { + return overallRating; + } + + @JsonProperty(JSON_PROPERTY_OVERALL_RATING) + public void setOverallRating_JsonNullable(JsonNullable overallRating) { + this.overallRating = overallRating; + } + + public void setOverallRating(@javax.annotation.Nullable BigDecimal overallRating) { + this.overallRating = JsonNullable.of(overallRating); + } + + + /** + * Return true if this ExperimentComparisonDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonDetail experimentComparisonDetail = (ExperimentComparisonDetail) o; + return Objects.equals(this.scoresWeight, experimentComparisonDetail.scoresWeight) && + equalsNullable(this.experimentDatasetId, experimentComparisonDetail.experimentDatasetId) && + equalsNullable(this.rank, experimentComparisonDetail.rank) && + Objects.equals(this.rankSuffix, experimentComparisonDetail.rankSuffix) && + Objects.equals(this.metrics, experimentComparisonDetail.metrics) && + Objects.equals(this.weights, experimentComparisonDetail.weights) && + equalsNullable(this.overallRating, experimentComparisonDetail.overallRating); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(scoresWeight, hashCodeNullable(experimentDatasetId), hashCodeNullable(rank), rankSuffix, metrics, weights, hashCodeNullable(overallRating)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonDetail {\n"); + sb.append(" scoresWeight: ").append(toIndentedString(scoresWeight)).append("\n"); + sb.append(" experimentDatasetId: ").append(toIndentedString(experimentDatasetId)).append("\n"); + sb.append(" rank: ").append(toIndentedString(rank)).append("\n"); + sb.append(" rankSuffix: ").append(toIndentedString(rankSuffix)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append(" weights: ").append(toIndentedString(weights)).append("\n"); + sb.append(" overallRating: ").append(toIndentedString(overallRating)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `scores_weight` to the URL query string + if (getScoresWeight() != null) { + for (String _key : getScoresWeight().keySet()) { + joiner.add(String.format("%sscores_weight%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getScoresWeight().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getScoresWeight().get(_key))))); + } + } + + // add `experiment_dataset_id` to the URL query string + if (getExperimentDatasetId() != null) { + joiner.add(String.format("%sexperiment_dataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentDatasetId())))); + } + + // add `rank` to the URL query string + if (getRank() != null) { + joiner.add(String.format("%srank%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRank())))); + } + + // add `rank_suffix` to the URL query string + if (getRankSuffix() != null) { + joiner.add(String.format("%srank_suffix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRankSuffix())))); + } + + // add `metrics` to the URL query string + if (getMetrics() != null) { + joiner.add(getMetrics().toUrlQueryString(prefix + "metrics" + suffix)); + } + + // add `weights` to the URL query string + if (getWeights() != null) { + joiner.add(getWeights().toUrlQueryString(prefix + "weights" + suffix)); + } + + // add `overall_rating` to the URL query string + if (getOverallRating() != null) { + joiner.add(String.format("%soverall_rating%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallRating())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResponse.java new file mode 100644 index 0000000..7979a04 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentComparisonDetailsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonDetailsResponse + */ +@JsonPropertyOrder({ + ExperimentComparisonDetailsResponse.JSON_PROPERTY_STATUS, + ExperimentComparisonDetailsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonDetailsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentComparisonDetailsResult result; + + public ExperimentComparisonDetailsResponse() { + } + + public ExperimentComparisonDetailsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentComparisonDetailsResponse result(@javax.annotation.Nonnull ExperimentComparisonDetailsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentComparisonDetailsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentComparisonDetailsResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentComparisonDetailsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonDetailsResponse experimentComparisonDetailsResponse = (ExperimentComparisonDetailsResponse) o; + return Objects.equals(this.status, experimentComparisonDetailsResponse.status) && + Objects.equals(this.result, experimentComparisonDetailsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonDetailsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResult.java new file mode 100644 index 0000000..96d419d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonDetailsResult.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentComparisonDetail; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonDetailsResult + */ +@JsonPropertyOrder({ + ExperimentComparisonDetailsResult.JSON_PROPERTY_EXPERIMENT_ID, + ExperimentComparisonDetailsResult.JSON_PROPERTY_TOTAL_COMPARISONS, + ExperimentComparisonDetailsResult.JSON_PROPERTY_COMPARISONS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonDetailsResult { + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nonnull + private UUID experimentId; + + public static final String JSON_PROPERTY_TOTAL_COMPARISONS = "total_comparisons"; + @javax.annotation.Nonnull + private Integer totalComparisons; + + public static final String JSON_PROPERTY_COMPARISONS = "comparisons"; + @javax.annotation.Nonnull + private List comparisons = new ArrayList<>(); + + public ExperimentComparisonDetailsResult() { + } + + public ExperimentComparisonDetailsResult experimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + } + + + public ExperimentComparisonDetailsResult totalComparisons(@javax.annotation.Nonnull Integer totalComparisons) { + this.totalComparisons = totalComparisons; + return this; + } + + /** + * Get totalComparisons + * @return totalComparisons + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalComparisons() { + return totalComparisons; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalComparisons(@javax.annotation.Nonnull Integer totalComparisons) { + this.totalComparisons = totalComparisons; + } + + + public ExperimentComparisonDetailsResult comparisons(@javax.annotation.Nonnull List comparisons) { + this.comparisons = comparisons; + return this; + } + + public ExperimentComparisonDetailsResult addComparisonsItem(ExperimentComparisonDetail comparisonsItem) { + if (this.comparisons == null) { + this.comparisons = new ArrayList<>(); + } + this.comparisons.add(comparisonsItem); + return this; + } + + /** + * Get comparisons + * @return comparisons + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getComparisons() { + return comparisons; + } + + + @JsonProperty(JSON_PROPERTY_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setComparisons(@javax.annotation.Nonnull List comparisons) { + this.comparisons = comparisons; + } + + + /** + * Return true if this ExperimentComparisonDetailsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonDetailsResult experimentComparisonDetailsResult = (ExperimentComparisonDetailsResult) o; + return Objects.equals(this.experimentId, experimentComparisonDetailsResult.experimentId) && + Objects.equals(this.totalComparisons, experimentComparisonDetailsResult.totalComparisons) && + Objects.equals(this.comparisons, experimentComparisonDetailsResult.comparisons); + } + + @Override + public int hashCode() { + return Objects.hash(experimentId, totalComparisons, comparisons); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonDetailsResult {\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" totalComparisons: ").append(toIndentedString(totalComparisons)).append("\n"); + sb.append(" comparisons: ").append(toIndentedString(comparisons)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `total_comparisons` to the URL query string + if (getTotalComparisons() != null) { + joiner.add(String.format("%stotal_comparisons%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalComparisons())))); + } + + // add `comparisons` to the URL query string + if (getComparisons() != null) { + for (int i = 0; i < getComparisons().size(); i++) { + if (getComparisons().get(i) != null) { + joiner.add(getComparisons().get(i).toUrlQueryString(String.format("%scomparisons%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonMetrics.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonMetrics.java new file mode 100644 index 0000000..5873aba --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonMetrics.java @@ -0,0 +1,189 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentComparisonNormalizedMetrics; +import com.futureagi.sdk.model.ExperimentComparisonRawMetrics; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonMetrics + */ +@JsonPropertyOrder({ + ExperimentComparisonMetrics.JSON_PROPERTY_RAW, + ExperimentComparisonMetrics.JSON_PROPERTY_NORMALIZED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonMetrics { + public static final String JSON_PROPERTY_RAW = "raw"; + @javax.annotation.Nonnull + private ExperimentComparisonRawMetrics raw; + + public static final String JSON_PROPERTY_NORMALIZED = "normalized"; + @javax.annotation.Nonnull + private ExperimentComparisonNormalizedMetrics normalized; + + public ExperimentComparisonMetrics() { + } + + public ExperimentComparisonMetrics raw(@javax.annotation.Nonnull ExperimentComparisonRawMetrics raw) { + this.raw = raw; + return this; + } + + /** + * Get raw + * @return raw + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentComparisonRawMetrics getRaw() { + return raw; + } + + + @JsonProperty(JSON_PROPERTY_RAW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRaw(@javax.annotation.Nonnull ExperimentComparisonRawMetrics raw) { + this.raw = raw; + } + + + public ExperimentComparisonMetrics normalized(@javax.annotation.Nonnull ExperimentComparisonNormalizedMetrics normalized) { + this.normalized = normalized; + return this; + } + + /** + * Get normalized + * @return normalized + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NORMALIZED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentComparisonNormalizedMetrics getNormalized() { + return normalized; + } + + + @JsonProperty(JSON_PROPERTY_NORMALIZED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNormalized(@javax.annotation.Nonnull ExperimentComparisonNormalizedMetrics normalized) { + this.normalized = normalized; + } + + + /** + * Return true if this ExperimentComparisonMetrics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonMetrics experimentComparisonMetrics = (ExperimentComparisonMetrics) o; + return Objects.equals(this.raw, experimentComparisonMetrics.raw) && + Objects.equals(this.normalized, experimentComparisonMetrics.normalized); + } + + @Override + public int hashCode() { + return Objects.hash(raw, normalized); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonMetrics {\n"); + sb.append(" raw: ").append(toIndentedString(raw)).append("\n"); + sb.append(" normalized: ").append(toIndentedString(normalized)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `raw` to the URL query string + if (getRaw() != null) { + joiner.add(getRaw().toUrlQueryString(prefix + "raw" + suffix)); + } + + // add `normalized` to the URL query string + if (getNormalized() != null) { + joiner.add(getNormalized().toUrlQueryString(prefix + "normalized" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonNormalizedMetrics.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonNormalizedMetrics.java new file mode 100644 index 0000000..355330a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonNormalizedMetrics.java @@ -0,0 +1,303 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonNormalizedMetrics + */ +@JsonPropertyOrder({ + ExperimentComparisonNormalizedMetrics.JSON_PROPERTY_COMPLETION_TOKENS, + ExperimentComparisonNormalizedMetrics.JSON_PROPERTY_TOTAL_TOKENS, + ExperimentComparisonNormalizedMetrics.JSON_PROPERTY_RESPONSE_TIME, + ExperimentComparisonNormalizedMetrics.JSON_PROPERTY_SCORE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonNormalizedMetrics { + public static final String JSON_PROPERTY_COMPLETION_TOKENS = "completion_tokens"; + private JsonNullable completionTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_TOKENS = "total_tokens"; + private JsonNullable totalTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESPONSE_TIME = "response_time"; + private JsonNullable responseTime = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SCORE = "score"; + private JsonNullable score = JsonNullable.undefined(); + + public ExperimentComparisonNormalizedMetrics() { + } + + public ExperimentComparisonNormalizedMetrics completionTokens(@javax.annotation.Nullable BigDecimal completionTokens) { + this.completionTokens = JsonNullable.of(completionTokens); + return this; + } + + /** + * Get completionTokens + * @return completionTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getCompletionTokens() { + return completionTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletionTokens_JsonNullable() { + return completionTokens; + } + + @JsonProperty(JSON_PROPERTY_COMPLETION_TOKENS) + public void setCompletionTokens_JsonNullable(JsonNullable completionTokens) { + this.completionTokens = completionTokens; + } + + public void setCompletionTokens(@javax.annotation.Nullable BigDecimal completionTokens) { + this.completionTokens = JsonNullable.of(completionTokens); + } + + + public ExperimentComparisonNormalizedMetrics totalTokens(@javax.annotation.Nullable BigDecimal totalTokens) { + this.totalTokens = JsonNullable.of(totalTokens); + return this; + } + + /** + * Get totalTokens + * @return totalTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getTotalTokens() { + return totalTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTotalTokens_JsonNullable() { + return totalTokens; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + public void setTotalTokens_JsonNullable(JsonNullable totalTokens) { + this.totalTokens = totalTokens; + } + + public void setTotalTokens(@javax.annotation.Nullable BigDecimal totalTokens) { + this.totalTokens = JsonNullable.of(totalTokens); + } + + + public ExperimentComparisonNormalizedMetrics responseTime(@javax.annotation.Nullable BigDecimal responseTime) { + this.responseTime = JsonNullable.of(responseTime); + return this; + } + + /** + * Get responseTime + * @return responseTime + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getResponseTime() { + return responseTime.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResponseTime_JsonNullable() { + return responseTime; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME) + public void setResponseTime_JsonNullable(JsonNullable responseTime) { + this.responseTime = responseTime; + } + + public void setResponseTime(@javax.annotation.Nullable BigDecimal responseTime) { + this.responseTime = JsonNullable.of(responseTime); + } + + + public ExperimentComparisonNormalizedMetrics score(@javax.annotation.Nullable BigDecimal score) { + this.score = JsonNullable.of(score); + return this; + } + + /** + * Get score + * @return score + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getScore() { + return score.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScore_JsonNullable() { + return score; + } + + @JsonProperty(JSON_PROPERTY_SCORE) + public void setScore_JsonNullable(JsonNullable score) { + this.score = score; + } + + public void setScore(@javax.annotation.Nullable BigDecimal score) { + this.score = JsonNullable.of(score); + } + + + /** + * Return true if this ExperimentComparisonNormalizedMetrics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonNormalizedMetrics experimentComparisonNormalizedMetrics = (ExperimentComparisonNormalizedMetrics) o; + return equalsNullable(this.completionTokens, experimentComparisonNormalizedMetrics.completionTokens) && + equalsNullable(this.totalTokens, experimentComparisonNormalizedMetrics.totalTokens) && + equalsNullable(this.responseTime, experimentComparisonNormalizedMetrics.responseTime) && + equalsNullable(this.score, experimentComparisonNormalizedMetrics.score); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(completionTokens), hashCodeNullable(totalTokens), hashCodeNullable(responseTime), hashCodeNullable(score)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonNormalizedMetrics {\n"); + sb.append(" completionTokens: ").append(toIndentedString(completionTokens)).append("\n"); + sb.append(" totalTokens: ").append(toIndentedString(totalTokens)).append("\n"); + sb.append(" responseTime: ").append(toIndentedString(responseTime)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `completion_tokens` to the URL query string + if (getCompletionTokens() != null) { + joiner.add(String.format("%scompletion_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletionTokens())))); + } + + // add `total_tokens` to the URL query string + if (getTotalTokens() != null) { + joiner.add(String.format("%stotal_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTokens())))); + } + + // add `response_time` to the URL query string + if (getResponseTime() != null) { + joiner.add(String.format("%sresponse_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResponseTime())))); + } + + // add `score` to the URL query string + if (getScore() != null) { + joiner.add(String.format("%sscore%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScore())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonRawMetrics.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonRawMetrics.java new file mode 100644 index 0000000..3c076a6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonRawMetrics.java @@ -0,0 +1,303 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonRawMetrics + */ +@JsonPropertyOrder({ + ExperimentComparisonRawMetrics.JSON_PROPERTY_AVG_COMPLETION_TOKENS, + ExperimentComparisonRawMetrics.JSON_PROPERTY_AVG_TOTAL_TOKENS, + ExperimentComparisonRawMetrics.JSON_PROPERTY_AVG_RESPONSE_TIME, + ExperimentComparisonRawMetrics.JSON_PROPERTY_AVG_SCORE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonRawMetrics { + public static final String JSON_PROPERTY_AVG_COMPLETION_TOKENS = "avg_completion_tokens"; + private JsonNullable avgCompletionTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_TOTAL_TOKENS = "avg_total_tokens"; + private JsonNullable avgTotalTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_RESPONSE_TIME = "avg_response_time"; + private JsonNullable avgResponseTime = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_SCORE = "avg_score"; + private JsonNullable avgScore = JsonNullable.undefined(); + + public ExperimentComparisonRawMetrics() { + } + + public ExperimentComparisonRawMetrics avgCompletionTokens(@javax.annotation.Nullable BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = JsonNullable.of(avgCompletionTokens); + return this; + } + + /** + * Get avgCompletionTokens + * @return avgCompletionTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgCompletionTokens() { + return avgCompletionTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgCompletionTokens_JsonNullable() { + return avgCompletionTokens; + } + + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + public void setAvgCompletionTokens_JsonNullable(JsonNullable avgCompletionTokens) { + this.avgCompletionTokens = avgCompletionTokens; + } + + public void setAvgCompletionTokens(@javax.annotation.Nullable BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = JsonNullable.of(avgCompletionTokens); + } + + + public ExperimentComparisonRawMetrics avgTotalTokens(@javax.annotation.Nullable BigDecimal avgTotalTokens) { + this.avgTotalTokens = JsonNullable.of(avgTotalTokens); + return this; + } + + /** + * Get avgTotalTokens + * @return avgTotalTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgTotalTokens() { + return avgTotalTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgTotalTokens_JsonNullable() { + return avgTotalTokens; + } + + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + public void setAvgTotalTokens_JsonNullable(JsonNullable avgTotalTokens) { + this.avgTotalTokens = avgTotalTokens; + } + + public void setAvgTotalTokens(@javax.annotation.Nullable BigDecimal avgTotalTokens) { + this.avgTotalTokens = JsonNullable.of(avgTotalTokens); + } + + + public ExperimentComparisonRawMetrics avgResponseTime(@javax.annotation.Nullable BigDecimal avgResponseTime) { + this.avgResponseTime = JsonNullable.of(avgResponseTime); + return this; + } + + /** + * Get avgResponseTime + * @return avgResponseTime + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgResponseTime() { + return avgResponseTime.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgResponseTime_JsonNullable() { + return avgResponseTime; + } + + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + public void setAvgResponseTime_JsonNullable(JsonNullable avgResponseTime) { + this.avgResponseTime = avgResponseTime; + } + + public void setAvgResponseTime(@javax.annotation.Nullable BigDecimal avgResponseTime) { + this.avgResponseTime = JsonNullable.of(avgResponseTime); + } + + + public ExperimentComparisonRawMetrics avgScore(@javax.annotation.Nullable BigDecimal avgScore) { + this.avgScore = JsonNullable.of(avgScore); + return this; + } + + /** + * Get avgScore + * @return avgScore + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getAvgScore() { + return avgScore.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAvgScore_JsonNullable() { + return avgScore; + } + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + public void setAvgScore_JsonNullable(JsonNullable avgScore) { + this.avgScore = avgScore; + } + + public void setAvgScore(@javax.annotation.Nullable BigDecimal avgScore) { + this.avgScore = JsonNullable.of(avgScore); + } + + + /** + * Return true if this ExperimentComparisonRawMetrics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonRawMetrics experimentComparisonRawMetrics = (ExperimentComparisonRawMetrics) o; + return equalsNullable(this.avgCompletionTokens, experimentComparisonRawMetrics.avgCompletionTokens) && + equalsNullable(this.avgTotalTokens, experimentComparisonRawMetrics.avgTotalTokens) && + equalsNullable(this.avgResponseTime, experimentComparisonRawMetrics.avgResponseTime) && + equalsNullable(this.avgScore, experimentComparisonRawMetrics.avgScore); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(avgCompletionTokens), hashCodeNullable(avgTotalTokens), hashCodeNullable(avgResponseTime), hashCodeNullable(avgScore)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonRawMetrics {\n"); + sb.append(" avgCompletionTokens: ").append(toIndentedString(avgCompletionTokens)).append("\n"); + sb.append(" avgTotalTokens: ").append(toIndentedString(avgTotalTokens)).append("\n"); + sb.append(" avgResponseTime: ").append(toIndentedString(avgResponseTime)).append("\n"); + sb.append(" avgScore: ").append(toIndentedString(avgScore)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `avg_completion_tokens` to the URL query string + if (getAvgCompletionTokens() != null) { + joiner.add(String.format("%savg_completion_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgCompletionTokens())))); + } + + // add `avg_total_tokens` to the URL query string + if (getAvgTotalTokens() != null) { + joiner.add(String.format("%savg_total_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTotalTokens())))); + } + + // add `avg_response_time` to the URL query string + if (getAvgResponseTime() != null) { + joiner.add(String.format("%savg_response_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgResponseTime())))); + } + + // add `avg_score` to the URL query string + if (getAvgScore() != null) { + joiner.add(String.format("%savg_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgScore())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeights.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeights.java new file mode 100644 index 0000000..bd1b09d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeights.java @@ -0,0 +1,310 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonWeights + */ +@JsonPropertyOrder({ + ExperimentComparisonWeights.JSON_PROPERTY_RESPONSE_TIME, + ExperimentComparisonWeights.JSON_PROPERTY_SCORES, + ExperimentComparisonWeights.JSON_PROPERTY_TOTAL_TOKENS, + ExperimentComparisonWeights.JSON_PROPERTY_COMPLETION_TOKENS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonWeights { + public static final String JSON_PROPERTY_RESPONSE_TIME = "response_time"; + private JsonNullable responseTime = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SCORES = "scores"; + @javax.annotation.Nullable + private Map scores = new HashMap<>(); + + public static final String JSON_PROPERTY_TOTAL_TOKENS = "total_tokens"; + private JsonNullable totalTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETION_TOKENS = "completion_tokens"; + private JsonNullable completionTokens = JsonNullable.undefined(); + + public ExperimentComparisonWeights() { + } + + public ExperimentComparisonWeights responseTime(@javax.annotation.Nullable BigDecimal responseTime) { + this.responseTime = JsonNullable.of(responseTime); + return this; + } + + /** + * Get responseTime + * @return responseTime + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getResponseTime() { + return responseTime.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResponseTime_JsonNullable() { + return responseTime; + } + + @JsonProperty(JSON_PROPERTY_RESPONSE_TIME) + public void setResponseTime_JsonNullable(JsonNullable responseTime) { + this.responseTime = responseTime; + } + + public void setResponseTime(@javax.annotation.Nullable BigDecimal responseTime) { + this.responseTime = JsonNullable.of(responseTime); + } + + + public ExperimentComparisonWeights scores(@javax.annotation.Nullable Map scores) { + this.scores = scores; + return this; + } + + public ExperimentComparisonWeights putScoresItem(String key, Object scoresItem) { + if (this.scores == null) { + this.scores = new HashMap<>(); + } + this.scores.put(key, scoresItem); + return this; + } + + /** + * Get scores + * @return scores + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getScores() { + return scores; + } + + + @JsonProperty(JSON_PROPERTY_SCORES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setScores(@javax.annotation.Nullable Map scores) { + this.scores = scores; + } + + + public ExperimentComparisonWeights totalTokens(@javax.annotation.Nullable BigDecimal totalTokens) { + this.totalTokens = JsonNullable.of(totalTokens); + return this; + } + + /** + * Get totalTokens + * @return totalTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getTotalTokens() { + return totalTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTotalTokens_JsonNullable() { + return totalTokens; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + public void setTotalTokens_JsonNullable(JsonNullable totalTokens) { + this.totalTokens = totalTokens; + } + + public void setTotalTokens(@javax.annotation.Nullable BigDecimal totalTokens) { + this.totalTokens = JsonNullable.of(totalTokens); + } + + + public ExperimentComparisonWeights completionTokens(@javax.annotation.Nullable BigDecimal completionTokens) { + this.completionTokens = JsonNullable.of(completionTokens); + return this; + } + + /** + * Get completionTokens + * @return completionTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getCompletionTokens() { + return completionTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletionTokens_JsonNullable() { + return completionTokens; + } + + @JsonProperty(JSON_PROPERTY_COMPLETION_TOKENS) + public void setCompletionTokens_JsonNullable(JsonNullable completionTokens) { + this.completionTokens = completionTokens; + } + + public void setCompletionTokens(@javax.annotation.Nullable BigDecimal completionTokens) { + this.completionTokens = JsonNullable.of(completionTokens); + } + + + /** + * Return true if this ExperimentComparisonWeights object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonWeights experimentComparisonWeights = (ExperimentComparisonWeights) o; + return equalsNullable(this.responseTime, experimentComparisonWeights.responseTime) && + Objects.equals(this.scores, experimentComparisonWeights.scores) && + equalsNullable(this.totalTokens, experimentComparisonWeights.totalTokens) && + equalsNullable(this.completionTokens, experimentComparisonWeights.completionTokens); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(responseTime), scores, hashCodeNullable(totalTokens), hashCodeNullable(completionTokens)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonWeights {\n"); + sb.append(" responseTime: ").append(toIndentedString(responseTime)).append("\n"); + sb.append(" scores: ").append(toIndentedString(scores)).append("\n"); + sb.append(" totalTokens: ").append(toIndentedString(totalTokens)).append("\n"); + sb.append(" completionTokens: ").append(toIndentedString(completionTokens)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `response_time` to the URL query string + if (getResponseTime() != null) { + joiner.add(String.format("%sresponse_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResponseTime())))); + } + + // add `scores` to the URL query string + if (getScores() != null) { + for (String _key : getScores().keySet()) { + joiner.add(String.format("%sscores%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getScores().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getScores().get(_key))))); + } + } + + // add `total_tokens` to the URL query string + if (getTotalTokens() != null) { + joiner.add(String.format("%stotal_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTokens())))); + } + + // add `completion_tokens` to the URL query string + if (getCompletionTokens() != null) { + joiner.add(String.format("%scompletion_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletionTokens())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeightsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeightsRequest.java new file mode 100644 index 0000000..90df5e1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentComparisonWeightsRequest.java @@ -0,0 +1,218 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentComparisonWeightsRequest + */ +@JsonPropertyOrder({ + ExperimentComparisonWeightsRequest.JSON_PROPERTY_EVAL_TEMPLATE_IDS, + ExperimentComparisonWeightsRequest.JSON_PROPERTY_WEIGHTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentComparisonWeightsRequest { + public static final String JSON_PROPERTY_EVAL_TEMPLATE_IDS = "eval_template_ids"; + @javax.annotation.Nullable + private List evalTemplateIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_WEIGHTS = "weights"; + @javax.annotation.Nullable + private Map weights = new HashMap<>(); + + public ExperimentComparisonWeightsRequest() { + } + + public ExperimentComparisonWeightsRequest evalTemplateIds(@javax.annotation.Nullable List evalTemplateIds) { + this.evalTemplateIds = evalTemplateIds; + return this; + } + + public ExperimentComparisonWeightsRequest addEvalTemplateIdsItem(UUID evalTemplateIdsItem) { + if (this.evalTemplateIds == null) { + this.evalTemplateIds = new ArrayList<>(); + } + this.evalTemplateIds.add(evalTemplateIdsItem); + return this; + } + + /** + * Get evalTemplateIds + * @return evalTemplateIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvalTemplateIds() { + return evalTemplateIds; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalTemplateIds(@javax.annotation.Nullable List evalTemplateIds) { + this.evalTemplateIds = evalTemplateIds; + } + + + public ExperimentComparisonWeightsRequest weights(@javax.annotation.Nullable Map weights) { + this.weights = weights; + return this; + } + + public ExperimentComparisonWeightsRequest putWeightsItem(String key, Object weightsItem) { + if (this.weights == null) { + this.weights = new HashMap<>(); + } + this.weights.put(key, weightsItem); + return this; + } + + /** + * Get weights + * @return weights + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getWeights() { + return weights; + } + + + @JsonProperty(JSON_PROPERTY_WEIGHTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setWeights(@javax.annotation.Nullable Map weights) { + this.weights = weights; + } + + + /** + * Return true if this ExperimentComparisonWeightsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentComparisonWeightsRequest experimentComparisonWeightsRequest = (ExperimentComparisonWeightsRequest) o; + return Objects.equals(this.evalTemplateIds, experimentComparisonWeightsRequest.evalTemplateIds) && + Objects.equals(this.weights, experimentComparisonWeightsRequest.weights); + } + + @Override + public int hashCode() { + return Objects.hash(evalTemplateIds, weights); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentComparisonWeightsRequest {\n"); + sb.append(" evalTemplateIds: ").append(toIndentedString(evalTemplateIds)).append("\n"); + sb.append(" weights: ").append(toIndentedString(weights)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_template_ids` to the URL query string + if (getEvalTemplateIds() != null) { + for (int i = 0; i < getEvalTemplateIds().size(); i++) { + if (getEvalTemplateIds().get(i) != null) { + joiner.add(String.format("%seval_template_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplateIds().get(i))))); + } + } + } + + // add `weights` to the URL query string + if (getWeights() != null) { + for (String _key : getWeights().keySet()) { + joiner.add(String.format("%sweights%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getWeights().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getWeights().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentCreateV2.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentCreateV2.java new file mode 100644 index 0000000..838143f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentCreateV2.java @@ -0,0 +1,423 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalMetricEntry; +import com.futureagi.sdk.model.PromptConfigEntry; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentCreateV2 + */ +@JsonPropertyOrder({ + ExperimentCreateV2.JSON_PROPERTY_NAME, + ExperimentCreateV2.JSON_PROPERTY_DATASET_ID, + ExperimentCreateV2.JSON_PROPERTY_COLUMN_ID, + ExperimentCreateV2.JSON_PROPERTY_EXPERIMENT_TYPE, + ExperimentCreateV2.JSON_PROPERTY_PROMPT_CONFIG, + ExperimentCreateV2.JSON_PROPERTY_USER_EVAL_METRICS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentCreateV2 { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + private JsonNullable columnId = JsonNullable.undefined(); + + /** + * Gets or Sets experimentType + */ + public enum ExperimentTypeEnum { + LLM(String.valueOf("llm")), + + TTS(String.valueOf("tts")), + + STT(String.valueOf("stt")), + + IMAGE(String.valueOf("image")); + + private String value; + + ExperimentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExperimentTypeEnum fromValue(String value) { + for (ExperimentTypeEnum b : ExperimentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EXPERIMENT_TYPE = "experiment_type"; + @javax.annotation.Nullable + private ExperimentTypeEnum experimentType = ExperimentTypeEnum.LLM; + + public static final String JSON_PROPERTY_PROMPT_CONFIG = "prompt_config"; + @javax.annotation.Nonnull + private List promptConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_USER_EVAL_METRICS = "user_eval_metrics"; + @javax.annotation.Nonnull + private List userEvalMetrics = new ArrayList<>(); + + public ExperimentCreateV2() { + } + + public ExperimentCreateV2 name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ExperimentCreateV2 datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public ExperimentCreateV2 columnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = JsonNullable.of(columnId); + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getColumnId() { + return columnId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getColumnId_JsonNullable() { + return columnId; + } + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + public void setColumnId_JsonNullable(JsonNullable columnId) { + this.columnId = columnId; + } + + public void setColumnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = JsonNullable.of(columnId); + } + + + public ExperimentCreateV2 experimentType(@javax.annotation.Nullable ExperimentTypeEnum experimentType) { + this.experimentType = experimentType; + return this; + } + + /** + * Get experimentType + * @return experimentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExperimentTypeEnum getExperimentType() { + return experimentType; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentType(@javax.annotation.Nullable ExperimentTypeEnum experimentType) { + this.experimentType = experimentType; + } + + + public ExperimentCreateV2 promptConfig(@javax.annotation.Nonnull List promptConfig) { + this.promptConfig = promptConfig; + return this; + } + + public ExperimentCreateV2 addPromptConfigItem(PromptConfigEntry promptConfigItem) { + if (this.promptConfig == null) { + this.promptConfig = new ArrayList<>(); + } + this.promptConfig.add(promptConfigItem); + return this; + } + + /** + * Get promptConfig + * @return promptConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPromptConfig() { + return promptConfig; + } + + + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPromptConfig(@javax.annotation.Nonnull List promptConfig) { + this.promptConfig = promptConfig; + } + + + public ExperimentCreateV2 userEvalMetrics(@javax.annotation.Nonnull List userEvalMetrics) { + this.userEvalMetrics = userEvalMetrics; + return this; + } + + public ExperimentCreateV2 addUserEvalMetricsItem(EvalMetricEntry userEvalMetricsItem) { + if (this.userEvalMetrics == null) { + this.userEvalMetrics = new ArrayList<>(); + } + this.userEvalMetrics.add(userEvalMetricsItem); + return this; + } + + /** + * Get userEvalMetrics + * @return userEvalMetrics + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getUserEvalMetrics() { + return userEvalMetrics; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserEvalMetrics(@javax.annotation.Nonnull List userEvalMetrics) { + this.userEvalMetrics = userEvalMetrics; + } + + + /** + * Return true if this ExperimentCreateV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentCreateV2 experimentCreateV2 = (ExperimentCreateV2) o; + return Objects.equals(this.name, experimentCreateV2.name) && + Objects.equals(this.datasetId, experimentCreateV2.datasetId) && + equalsNullable(this.columnId, experimentCreateV2.columnId) && + Objects.equals(this.experimentType, experimentCreateV2.experimentType) && + Objects.equals(this.promptConfig, experimentCreateV2.promptConfig) && + Objects.equals(this.userEvalMetrics, experimentCreateV2.userEvalMetrics); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, datasetId, hashCodeNullable(columnId), experimentType, promptConfig, userEvalMetrics); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentCreateV2 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" experimentType: ").append(toIndentedString(experimentType)).append("\n"); + sb.append(" promptConfig: ").append(toIndentedString(promptConfig)).append("\n"); + sb.append(" userEvalMetrics: ").append(toIndentedString(userEvalMetrics)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `experiment_type` to the URL query string + if (getExperimentType() != null) { + joiner.add(String.format("%sexperiment_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentType())))); + } + + // add `prompt_config` to the URL query string + if (getPromptConfig() != null) { + for (int i = 0; i < getPromptConfig().size(); i++) { + if (getPromptConfig().get(i) != null) { + joiner.add(getPromptConfig().get(i).toUrlQueryString(String.format("%sprompt_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `user_eval_metrics` to the URL query string + if (getUserEvalMetrics() != null) { + for (int i = 0; i < getUserEvalMetrics().size(); i++) { + if (getUserEvalMetrics().get(i) != null) { + joiner.add(getUserEvalMetrics().get(i).toUrlQueryString(String.format("%suser_eval_metrics%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResponse.java new file mode 100644 index 0000000..4316757 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentDatasetComparisonResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentDatasetComparisonResponse + */ +@JsonPropertyOrder({ + ExperimentDatasetComparisonResponse.JSON_PROPERTY_STATUS, + ExperimentDatasetComparisonResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentDatasetComparisonResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentDatasetComparisonResult result; + + public ExperimentDatasetComparisonResponse() { + } + + public ExperimentDatasetComparisonResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentDatasetComparisonResponse result(@javax.annotation.Nonnull ExperimentDatasetComparisonResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentDatasetComparisonResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentDatasetComparisonResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentDatasetComparisonResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentDatasetComparisonResponse experimentDatasetComparisonResponse = (ExperimentDatasetComparisonResponse) o; + return Objects.equals(this.status, experimentDatasetComparisonResponse.status) && + Objects.equals(this.result, experimentDatasetComparisonResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentDatasetComparisonResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResult.java new file mode 100644 index 0000000..86f823b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDatasetComparisonResult.java @@ -0,0 +1,326 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentComparisonDatasetMetric; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentDatasetComparisonResult + */ +@JsonPropertyOrder({ + ExperimentDatasetComparisonResult.JSON_PROPERTY_EXPERIMENT_ID, + ExperimentDatasetComparisonResult.JSON_PROPERTY_EXPERIMENT_NAME, + ExperimentDatasetComparisonResult.JSON_PROPERTY_TOTAL_DATASETS, + ExperimentDatasetComparisonResult.JSON_PROPERTY_WEIGHTS_APPLIED, + ExperimentDatasetComparisonResult.JSON_PROPERTY_DATASET_COMPARISONS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentDatasetComparisonResult { + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nonnull + private UUID experimentId; + + public static final String JSON_PROPERTY_EXPERIMENT_NAME = "experiment_name"; + @javax.annotation.Nonnull + private String experimentName; + + public static final String JSON_PROPERTY_TOTAL_DATASETS = "total_datasets"; + @javax.annotation.Nonnull + private Integer totalDatasets; + + public static final String JSON_PROPERTY_WEIGHTS_APPLIED = "weights_applied"; + @javax.annotation.Nullable + private Map weightsApplied = new HashMap<>(); + + public static final String JSON_PROPERTY_DATASET_COMPARISONS = "dataset_comparisons"; + @javax.annotation.Nonnull + private List datasetComparisons = new ArrayList<>(); + + public ExperimentDatasetComparisonResult() { + } + + public ExperimentDatasetComparisonResult experimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + } + + + public ExperimentDatasetComparisonResult experimentName(@javax.annotation.Nonnull String experimentName) { + this.experimentName = experimentName; + return this; + } + + /** + * Get experimentName + * @return experimentName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExperimentName() { + return experimentName; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentName(@javax.annotation.Nonnull String experimentName) { + this.experimentName = experimentName; + } + + + public ExperimentDatasetComparisonResult totalDatasets(@javax.annotation.Nonnull Integer totalDatasets) { + this.totalDatasets = totalDatasets; + return this; + } + + /** + * Get totalDatasets + * @return totalDatasets + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalDatasets() { + return totalDatasets; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalDatasets(@javax.annotation.Nonnull Integer totalDatasets) { + this.totalDatasets = totalDatasets; + } + + + public ExperimentDatasetComparisonResult weightsApplied(@javax.annotation.Nullable Map weightsApplied) { + this.weightsApplied = weightsApplied; + return this; + } + + public ExperimentDatasetComparisonResult putWeightsAppliedItem(String key, Object weightsAppliedItem) { + if (this.weightsApplied == null) { + this.weightsApplied = new HashMap<>(); + } + this.weightsApplied.put(key, weightsAppliedItem); + return this; + } + + /** + * Get weightsApplied + * @return weightsApplied + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEIGHTS_APPLIED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getWeightsApplied() { + return weightsApplied; + } + + + @JsonProperty(JSON_PROPERTY_WEIGHTS_APPLIED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setWeightsApplied(@javax.annotation.Nullable Map weightsApplied) { + this.weightsApplied = weightsApplied; + } + + + public ExperimentDatasetComparisonResult datasetComparisons(@javax.annotation.Nonnull List datasetComparisons) { + this.datasetComparisons = datasetComparisons; + return this; + } + + public ExperimentDatasetComparisonResult addDatasetComparisonsItem(ExperimentComparisonDatasetMetric datasetComparisonsItem) { + if (this.datasetComparisons == null) { + this.datasetComparisons = new ArrayList<>(); + } + this.datasetComparisons.add(datasetComparisonsItem); + return this; + } + + /** + * Get datasetComparisons + * @return datasetComparisons + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasetComparisons() { + return datasetComparisons; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetComparisons(@javax.annotation.Nonnull List datasetComparisons) { + this.datasetComparisons = datasetComparisons; + } + + + /** + * Return true if this ExperimentDatasetComparisonResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentDatasetComparisonResult experimentDatasetComparisonResult = (ExperimentDatasetComparisonResult) o; + return Objects.equals(this.experimentId, experimentDatasetComparisonResult.experimentId) && + Objects.equals(this.experimentName, experimentDatasetComparisonResult.experimentName) && + Objects.equals(this.totalDatasets, experimentDatasetComparisonResult.totalDatasets) && + Objects.equals(this.weightsApplied, experimentDatasetComparisonResult.weightsApplied) && + Objects.equals(this.datasetComparisons, experimentDatasetComparisonResult.datasetComparisons); + } + + @Override + public int hashCode() { + return Objects.hash(experimentId, experimentName, totalDatasets, weightsApplied, datasetComparisons); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentDatasetComparisonResult {\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" experimentName: ").append(toIndentedString(experimentName)).append("\n"); + sb.append(" totalDatasets: ").append(toIndentedString(totalDatasets)).append("\n"); + sb.append(" weightsApplied: ").append(toIndentedString(weightsApplied)).append("\n"); + sb.append(" datasetComparisons: ").append(toIndentedString(datasetComparisons)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `experiment_name` to the URL query string + if (getExperimentName() != null) { + joiner.add(String.format("%sexperiment_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentName())))); + } + + // add `total_datasets` to the URL query string + if (getTotalDatasets() != null) { + joiner.add(String.format("%stotal_datasets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalDatasets())))); + } + + // add `weights_applied` to the URL query string + if (getWeightsApplied() != null) { + for (String _key : getWeightsApplied().keySet()) { + joiner.add(String.format("%sweights_applied%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getWeightsApplied().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getWeightsApplied().get(_key))))); + } + } + + // add `dataset_comparisons` to the URL query string + if (getDatasetComparisons() != null) { + for (int i = 0; i < getDatasetComparisons().size(); i++) { + if (getDatasetComparisons().get(i) != null) { + joiner.add(getDatasetComparisons().get(i).toUrlQueryString(String.format("%sdataset_comparisons%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResponse.java new file mode 100644 index 0000000..a48726a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentDerivedVariablesResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentDerivedVariablesResponse + */ +@JsonPropertyOrder({ + ExperimentDerivedVariablesResponse.JSON_PROPERTY_STATUS, + ExperimentDerivedVariablesResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentDerivedVariablesResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentDerivedVariablesResult result; + + public ExperimentDerivedVariablesResponse() { + } + + public ExperimentDerivedVariablesResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentDerivedVariablesResponse result(@javax.annotation.Nonnull ExperimentDerivedVariablesResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentDerivedVariablesResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentDerivedVariablesResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentDerivedVariablesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentDerivedVariablesResponse experimentDerivedVariablesResponse = (ExperimentDerivedVariablesResponse) o; + return Objects.equals(this.status, experimentDerivedVariablesResponse.status) && + Objects.equals(this.result, experimentDerivedVariablesResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentDerivedVariablesResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResult.java new file mode 100644 index 0000000..0cb5aad --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDerivedVariablesResult.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentDerivedVariablesResult + */ +@JsonPropertyOrder({ + ExperimentDerivedVariablesResult.JSON_PROPERTY_VERSION, + ExperimentDerivedVariablesResult.JSON_PROPERTY_DERIVED_VARIABLES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentDerivedVariablesResult { + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private String version; + + public static final String JSON_PROPERTY_DERIVED_VARIABLES = "derived_variables"; + @javax.annotation.Nullable + private Map> derivedVariables = new HashMap<>(); + + public ExperimentDerivedVariablesResult() { + } + + public ExperimentDerivedVariablesResult version(@javax.annotation.Nullable String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(@javax.annotation.Nullable String version) { + this.version = version; + } + + + public ExperimentDerivedVariablesResult derivedVariables(@javax.annotation.Nullable Map> derivedVariables) { + this.derivedVariables = derivedVariables; + return this; + } + + public ExperimentDerivedVariablesResult putDerivedVariablesItem(String key, List derivedVariablesItem) { + if (this.derivedVariables == null) { + this.derivedVariables = new HashMap<>(); + } + this.derivedVariables.put(key, derivedVariablesItem); + return this; + } + + /** + * Get derivedVariables + * @return derivedVariables + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DERIVED_VARIABLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDerivedVariables() { + return derivedVariables; + } + + + @JsonProperty(JSON_PROPERTY_DERIVED_VARIABLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDerivedVariables(@javax.annotation.Nullable Map> derivedVariables) { + this.derivedVariables = derivedVariables; + } + + + /** + * Return true if this ExperimentDerivedVariablesResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentDerivedVariablesResult experimentDerivedVariablesResult = (ExperimentDerivedVariablesResult) o; + return Objects.equals(this.version, experimentDerivedVariablesResult.version) && + Objects.equals(this.derivedVariables, experimentDerivedVariablesResult.derivedVariables); + } + + @Override + public int hashCode() { + return Objects.hash(version, derivedVariables); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentDerivedVariablesResult {\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" derivedVariables: ").append(toIndentedString(derivedVariables)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `derived_variables` to the URL query string + if (getDerivedVariables() != null) { + for (String _key : getDerivedVariables().keySet()) { + joiner.add(String.format("%sderived_variables%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDerivedVariables().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDerivedVariables().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDetailV2.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDetailV2.java new file mode 100644 index 0000000..7dc5d4f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentDetailV2.java @@ -0,0 +1,600 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentDetailV2 + */ +@JsonPropertyOrder({ + ExperimentDetailV2.JSON_PROPERTY_ID, + ExperimentDetailV2.JSON_PROPERTY_NAME, + ExperimentDetailV2.JSON_PROPERTY_DATASET_ID, + ExperimentDetailV2.JSON_PROPERTY_COLUMN_ID, + ExperimentDetailV2.JSON_PROPERTY_EXPERIMENT_TYPE, + ExperimentDetailV2.JSON_PROPERTY_STATUS, + ExperimentDetailV2.JSON_PROPERTY_SNAPSHOT_DATASET_ID, + ExperimentDetailV2.JSON_PROPERTY_PROMPT_CONFIGS, + ExperimentDetailV2.JSON_PROPERTY_AGENT_CONFIGS, + ExperimentDetailV2.JSON_PROPERTY_USER_EVAL_METRICS, + ExperimentDetailV2.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentDetailV2 { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private UUID datasetId; + + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + private JsonNullable columnId = JsonNullable.undefined(); + + /** + * Determines how the experiment executes: llm, tts, stt, or image. + */ + public enum ExperimentTypeEnum { + LLM(String.valueOf("llm")), + + TTS(String.valueOf("tts")), + + STT(String.valueOf("stt")), + + IMAGE(String.valueOf("image")); + + private String value; + + ExperimentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExperimentTypeEnum fromValue(String value) { + for (ExperimentTypeEnum b : ExperimentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EXPERIMENT_TYPE = "experiment_type"; + @javax.annotation.Nullable + private ExperimentTypeEnum experimentType; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + NOT_STARTED(String.valueOf("NotStarted")), + + QUEUED(String.valueOf("Queued")), + + RUNNING(String.valueOf("Running")), + + COMPLETED(String.valueOf("Completed")), + + EDITING(String.valueOf("Editing")), + + INACTIVE(String.valueOf("Inactive")), + + FAILED(String.valueOf("Failed")), + + PARTIAL_RUN(String.valueOf("PartialRun")), + + EXPERIMENT_EVALUATION(String.valueOf("ExperimentEvaluation")), + + UPLOADING(String.valueOf("Uploading")), + + PARTIAL_EXTRACTED(String.valueOf("PartialExtracted")), + + PROCESSING(String.valueOf("Processing")), + + DELETING(String.valueOf("Deleting")), + + PARTIAL_COMPLETED(String.valueOf("PartialCompleted")), + + OPTIMIZATION_EVALUATION(String.valueOf("OptimizationEvaluation")), + + ERROR(String.valueOf("Error")), + + CANCELLED(String.valueOf("Cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_SNAPSHOT_DATASET_ID = "snapshot_dataset_id"; + private JsonNullable snapshotDatasetId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_CONFIGS = "prompt_configs"; + @javax.annotation.Nullable + private String promptConfigs; + + public static final String JSON_PROPERTY_AGENT_CONFIGS = "agent_configs"; + @javax.annotation.Nullable + private String agentConfigs; + + public static final String JSON_PROPERTY_USER_EVAL_METRICS = "user_eval_metrics"; + @javax.annotation.Nullable + private String userEvalMetrics; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public ExperimentDetailV2() { + } + + @JsonCreator + public ExperimentDetailV2( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_DATASET_ID) UUID datasetId, + @JsonProperty(JSON_PROPERTY_COLUMN_ID) UUID columnId, + @JsonProperty(JSON_PROPERTY_SNAPSHOT_DATASET_ID) UUID snapshotDatasetId, + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIGS) String promptConfigs, + @JsonProperty(JSON_PROPERTY_AGENT_CONFIGS) String agentConfigs, + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRICS) String userEvalMetrics, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.datasetId = datasetId; + this.columnId = columnId == null ? JsonNullable.undefined() : JsonNullable.of(columnId); + this.snapshotDatasetId = snapshotDatasetId == null ? JsonNullable.undefined() : JsonNullable.of(snapshotDatasetId); + this.promptConfigs = promptConfigs; + this.agentConfigs = agentConfigs; + this.userEvalMetrics = userEvalMetrics; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public ExperimentDetailV2 name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getDatasetId() { + return datasetId; + } + + + + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getColumnId() { + + if (columnId == null) { + columnId = JsonNullable.undefined(); + } + return columnId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getColumnId_JsonNullable() { + return columnId; + } + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + private void setColumnId_JsonNullable(JsonNullable columnId) { + this.columnId = columnId; + } + + + + public ExperimentDetailV2 experimentType(@javax.annotation.Nullable ExperimentTypeEnum experimentType) { + this.experimentType = experimentType; + return this; + } + + /** + * Determines how the experiment executes: llm, tts, stt, or image. + * @return experimentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExperimentTypeEnum getExperimentType() { + return experimentType; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentType(@javax.annotation.Nullable ExperimentTypeEnum experimentType) { + this.experimentType = experimentType; + } + + + public ExperimentDetailV2 status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + /** + * Get snapshotDatasetId + * @return snapshotDatasetId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getSnapshotDatasetId() { + + if (snapshotDatasetId == null) { + snapshotDatasetId = JsonNullable.undefined(); + } + return snapshotDatasetId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SNAPSHOT_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSnapshotDatasetId_JsonNullable() { + return snapshotDatasetId; + } + + @JsonProperty(JSON_PROPERTY_SNAPSHOT_DATASET_ID) + private void setSnapshotDatasetId_JsonNullable(JsonNullable snapshotDatasetId) { + this.snapshotDatasetId = snapshotDatasetId; + } + + + + /** + * Get promptConfigs + * @return promptConfigs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPromptConfigs() { + return promptConfigs; + } + + + + + /** + * Get agentConfigs + * @return agentConfigs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_CONFIGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentConfigs() { + return agentConfigs; + } + + + + + /** + * Get userEvalMetrics + * @return userEvalMetrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserEvalMetrics() { + return userEvalMetrics; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this ExperimentDetailV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentDetailV2 experimentDetailV2 = (ExperimentDetailV2) o; + return Objects.equals(this.id, experimentDetailV2.id) && + Objects.equals(this.name, experimentDetailV2.name) && + Objects.equals(this.datasetId, experimentDetailV2.datasetId) && + equalsNullable(this.columnId, experimentDetailV2.columnId) && + Objects.equals(this.experimentType, experimentDetailV2.experimentType) && + Objects.equals(this.status, experimentDetailV2.status) && + equalsNullable(this.snapshotDatasetId, experimentDetailV2.snapshotDatasetId) && + Objects.equals(this.promptConfigs, experimentDetailV2.promptConfigs) && + Objects.equals(this.agentConfigs, experimentDetailV2.agentConfigs) && + Objects.equals(this.userEvalMetrics, experimentDetailV2.userEvalMetrics) && + Objects.equals(this.createdAt, experimentDetailV2.createdAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, datasetId, hashCodeNullable(columnId), experimentType, status, hashCodeNullable(snapshotDatasetId), promptConfigs, agentConfigs, userEvalMetrics, createdAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentDetailV2 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" experimentType: ").append(toIndentedString(experimentType)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" snapshotDatasetId: ").append(toIndentedString(snapshotDatasetId)).append("\n"); + sb.append(" promptConfigs: ").append(toIndentedString(promptConfigs)).append("\n"); + sb.append(" agentConfigs: ").append(toIndentedString(agentConfigs)).append("\n"); + sb.append(" userEvalMetrics: ").append(toIndentedString(userEvalMetrics)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `experiment_type` to the URL query string + if (getExperimentType() != null) { + joiner.add(String.format("%sexperiment_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentType())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `snapshot_dataset_id` to the URL query string + if (getSnapshotDatasetId() != null) { + joiner.add(String.format("%ssnapshot_dataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSnapshotDatasetId())))); + } + + // add `prompt_configs` to the URL query string + if (getPromptConfigs() != null) { + joiner.add(String.format("%sprompt_configs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptConfigs())))); + } + + // add `agent_configs` to the URL query string + if (getAgentConfigs() != null) { + joiner.add(String.format("%sagent_configs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentConfigs())))); + } + + // add `user_eval_metrics` to the URL query string + if (getUserEvalMetrics() != null) { + joiner.add(String.format("%suser_eval_metrics%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserEvalMetrics())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationColumnStats.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationColumnStats.java new file mode 100644 index 0000000..52ff493 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationColumnStats.java @@ -0,0 +1,384 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentEvaluationTokenUsage; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentEvaluationColumnStats + */ +@JsonPropertyOrder({ + ExperimentEvaluationColumnStats.JSON_PROPERTY_COLUMN_NAME, + ExperimentEvaluationColumnStats.JSON_PROPERTY_COLUMN_ID, + ExperimentEvaluationColumnStats.JSON_PROPERTY_TOTAL_ROWS, + ExperimentEvaluationColumnStats.JSON_PROPERTY_SUCCESS_RATE, + ExperimentEvaluationColumnStats.JSON_PROPERTY_AVG_RESPONSE_TIME, + ExperimentEvaluationColumnStats.JSON_PROPERTY_TOKEN_USAGE, + ExperimentEvaluationColumnStats.JSON_PROPERTY_AVG_SCORE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentEvaluationColumnStats { + public static final String JSON_PROPERTY_COLUMN_NAME = "column_name"; + @javax.annotation.Nonnull + private String columnName; + + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_TOTAL_ROWS = "total_rows"; + @javax.annotation.Nonnull + private Integer totalRows; + + public static final String JSON_PROPERTY_SUCCESS_RATE = "success_rate"; + @javax.annotation.Nonnull + private BigDecimal successRate; + + public static final String JSON_PROPERTY_AVG_RESPONSE_TIME = "avg_response_time"; + @javax.annotation.Nonnull + private BigDecimal avgResponseTime; + + public static final String JSON_PROPERTY_TOKEN_USAGE = "token_usage"; + @javax.annotation.Nonnull + private ExperimentEvaluationTokenUsage tokenUsage; + + public static final String JSON_PROPERTY_AVG_SCORE = "avg_score"; + @javax.annotation.Nullable + private Map avgScore = new HashMap<>(); + + public ExperimentEvaluationColumnStats() { + } + + public ExperimentEvaluationColumnStats columnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get columnName + * @return columnName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumnName() { + return columnName; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnName(@javax.annotation.Nonnull String columnName) { + this.columnName = columnName; + } + + + public ExperimentEvaluationColumnStats columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public ExperimentEvaluationColumnStats totalRows(@javax.annotation.Nonnull Integer totalRows) { + this.totalRows = totalRows; + return this; + } + + /** + * Get totalRows + * @return totalRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalRows() { + return totalRows; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalRows(@javax.annotation.Nonnull Integer totalRows) { + this.totalRows = totalRows; + } + + + public ExperimentEvaluationColumnStats successRate(@javax.annotation.Nonnull BigDecimal successRate) { + this.successRate = successRate; + return this; + } + + /** + * Get successRate + * @return successRate + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getSuccessRate() { + return successRate; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccessRate(@javax.annotation.Nonnull BigDecimal successRate) { + this.successRate = successRate; + } + + + public ExperimentEvaluationColumnStats avgResponseTime(@javax.annotation.Nonnull BigDecimal avgResponseTime) { + this.avgResponseTime = avgResponseTime; + return this; + } + + /** + * Get avgResponseTime + * @return avgResponseTime + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgResponseTime() { + return avgResponseTime; + } + + + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgResponseTime(@javax.annotation.Nonnull BigDecimal avgResponseTime) { + this.avgResponseTime = avgResponseTime; + } + + + public ExperimentEvaluationColumnStats tokenUsage(@javax.annotation.Nonnull ExperimentEvaluationTokenUsage tokenUsage) { + this.tokenUsage = tokenUsage; + return this; + } + + /** + * Get tokenUsage + * @return tokenUsage + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN_USAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentEvaluationTokenUsage getTokenUsage() { + return tokenUsage; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN_USAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTokenUsage(@javax.annotation.Nonnull ExperimentEvaluationTokenUsage tokenUsage) { + this.tokenUsage = tokenUsage; + } + + + public ExperimentEvaluationColumnStats avgScore(@javax.annotation.Nullable Map avgScore) { + this.avgScore = avgScore; + return this; + } + + public ExperimentEvaluationColumnStats putAvgScoreItem(String key, Object avgScoreItem) { + if (this.avgScore == null) { + this.avgScore = new HashMap<>(); + } + this.avgScore.put(key, avgScoreItem); + return this; + } + + /** + * Get avgScore + * @return avgScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAvgScore() { + return avgScore; + } + + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setAvgScore(@javax.annotation.Nullable Map avgScore) { + this.avgScore = avgScore; + } + + + /** + * Return true if this ExperimentEvaluationColumnStats object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentEvaluationColumnStats experimentEvaluationColumnStats = (ExperimentEvaluationColumnStats) o; + return Objects.equals(this.columnName, experimentEvaluationColumnStats.columnName) && + Objects.equals(this.columnId, experimentEvaluationColumnStats.columnId) && + Objects.equals(this.totalRows, experimentEvaluationColumnStats.totalRows) && + Objects.equals(this.successRate, experimentEvaluationColumnStats.successRate) && + Objects.equals(this.avgResponseTime, experimentEvaluationColumnStats.avgResponseTime) && + Objects.equals(this.tokenUsage, experimentEvaluationColumnStats.tokenUsage) && + Objects.equals(this.avgScore, experimentEvaluationColumnStats.avgScore); + } + + @Override + public int hashCode() { + return Objects.hash(columnName, columnId, totalRows, successRate, avgResponseTime, tokenUsage, avgScore); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentEvaluationColumnStats {\n"); + sb.append(" columnName: ").append(toIndentedString(columnName)).append("\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n"); + sb.append(" successRate: ").append(toIndentedString(successRate)).append("\n"); + sb.append(" avgResponseTime: ").append(toIndentedString(avgResponseTime)).append("\n"); + sb.append(" tokenUsage: ").append(toIndentedString(tokenUsage)).append("\n"); + sb.append(" avgScore: ").append(toIndentedString(avgScore)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_name` to the URL query string + if (getColumnName() != null) { + joiner.add(String.format("%scolumn_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnName())))); + } + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `total_rows` to the URL query string + if (getTotalRows() != null) { + joiner.add(String.format("%stotal_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalRows())))); + } + + // add `success_rate` to the URL query string + if (getSuccessRate() != null) { + joiner.add(String.format("%ssuccess_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccessRate())))); + } + + // add `avg_response_time` to the URL query string + if (getAvgResponseTime() != null) { + joiner.add(String.format("%savg_response_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgResponseTime())))); + } + + // add `token_usage` to the URL query string + if (getTokenUsage() != null) { + joiner.add(getTokenUsage().toUrlQueryString(prefix + "token_usage" + suffix)); + } + + // add `avg_score` to the URL query string + if (getAvgScore() != null) { + for (String _key : getAvgScore().keySet()) { + joiner.add(String.format("%savg_score%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAvgScore().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAvgScore().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResponse.java new file mode 100644 index 0000000..d3185bd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentEvaluationStatsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentEvaluationStatsResponse + */ +@JsonPropertyOrder({ + ExperimentEvaluationStatsResponse.JSON_PROPERTY_STATUS, + ExperimentEvaluationStatsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentEvaluationStatsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentEvaluationStatsResult result; + + public ExperimentEvaluationStatsResponse() { + } + + public ExperimentEvaluationStatsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentEvaluationStatsResponse result(@javax.annotation.Nonnull ExperimentEvaluationStatsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentEvaluationStatsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentEvaluationStatsResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentEvaluationStatsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentEvaluationStatsResponse experimentEvaluationStatsResponse = (ExperimentEvaluationStatsResponse) o; + return Objects.equals(this.status, experimentEvaluationStatsResponse.status) && + Objects.equals(this.result, experimentEvaluationStatsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentEvaluationStatsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResult.java new file mode 100644 index 0000000..cbe794d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationStatsResult.java @@ -0,0 +1,420 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentEvaluationColumnStats; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentEvaluationStatsResult + */ +@JsonPropertyOrder({ + ExperimentEvaluationStatsResult.JSON_PROPERTY_EXPERIMENT_ID, + ExperimentEvaluationStatsResult.JSON_PROPERTY_EXPERIMENT_NAME, + ExperimentEvaluationStatsResult.JSON_PROPERTY_EVALUATION_ID, + ExperimentEvaluationStatsResult.JSON_PROPERTY_EVALUATION_NAME, + ExperimentEvaluationStatsResult.JSON_PROPERTY_EVALUATION_TEMPLATE_ID, + ExperimentEvaluationStatsResult.JSON_PROPERTY_DATASET_ID, + ExperimentEvaluationStatsResult.JSON_PROPERTY_DATASET_NAME, + ExperimentEvaluationStatsResult.JSON_PROPERTY_EVALUATION_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentEvaluationStatsResult { + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nonnull + private UUID experimentId; + + public static final String JSON_PROPERTY_EXPERIMENT_NAME = "experiment_name"; + @javax.annotation.Nonnull + private String experimentName; + + public static final String JSON_PROPERTY_EVALUATION_ID = "evaluation_id"; + @javax.annotation.Nonnull + private UUID evaluationId; + + public static final String JSON_PROPERTY_EVALUATION_NAME = "evaluation_name"; + @javax.annotation.Nonnull + private String evaluationName; + + public static final String JSON_PROPERTY_EVALUATION_TEMPLATE_ID = "evaluation_template_id"; + @javax.annotation.Nonnull + private UUID evaluationTemplateId; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_EVALUATION_COLUMNS = "evaluation_columns"; + @javax.annotation.Nonnull + private List evaluationColumns = new ArrayList<>(); + + public ExperimentEvaluationStatsResult() { + } + + public ExperimentEvaluationStatsResult experimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + } + + + public ExperimentEvaluationStatsResult experimentName(@javax.annotation.Nonnull String experimentName) { + this.experimentName = experimentName; + return this; + } + + /** + * Get experimentName + * @return experimentName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExperimentName() { + return experimentName; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentName(@javax.annotation.Nonnull String experimentName) { + this.experimentName = experimentName; + } + + + public ExperimentEvaluationStatsResult evaluationId(@javax.annotation.Nonnull UUID evaluationId) { + this.evaluationId = evaluationId; + return this; + } + + /** + * Get evaluationId + * @return evaluationId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getEvaluationId() { + return evaluationId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluationId(@javax.annotation.Nonnull UUID evaluationId) { + this.evaluationId = evaluationId; + } + + + public ExperimentEvaluationStatsResult evaluationName(@javax.annotation.Nonnull String evaluationName) { + this.evaluationName = evaluationName; + return this; + } + + /** + * Get evaluationName + * @return evaluationName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvaluationName() { + return evaluationName; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluationName(@javax.annotation.Nonnull String evaluationName) { + this.evaluationName = evaluationName; + } + + + public ExperimentEvaluationStatsResult evaluationTemplateId(@javax.annotation.Nonnull UUID evaluationTemplateId) { + this.evaluationTemplateId = evaluationTemplateId; + return this; + } + + /** + * Get evaluationTemplateId + * @return evaluationTemplateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATION_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getEvaluationTemplateId() { + return evaluationTemplateId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluationTemplateId(@javax.annotation.Nonnull UUID evaluationTemplateId) { + this.evaluationTemplateId = evaluationTemplateId; + } + + + public ExperimentEvaluationStatsResult datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public ExperimentEvaluationStatsResult datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public ExperimentEvaluationStatsResult evaluationColumns(@javax.annotation.Nonnull List evaluationColumns) { + this.evaluationColumns = evaluationColumns; + return this; + } + + public ExperimentEvaluationStatsResult addEvaluationColumnsItem(ExperimentEvaluationColumnStats evaluationColumnsItem) { + if (this.evaluationColumns == null) { + this.evaluationColumns = new ArrayList<>(); + } + this.evaluationColumns.add(evaluationColumnsItem); + return this; + } + + /** + * Get evaluationColumns + * @return evaluationColumns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATION_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvaluationColumns() { + return evaluationColumns; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluationColumns(@javax.annotation.Nonnull List evaluationColumns) { + this.evaluationColumns = evaluationColumns; + } + + + /** + * Return true if this ExperimentEvaluationStatsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentEvaluationStatsResult experimentEvaluationStatsResult = (ExperimentEvaluationStatsResult) o; + return Objects.equals(this.experimentId, experimentEvaluationStatsResult.experimentId) && + Objects.equals(this.experimentName, experimentEvaluationStatsResult.experimentName) && + Objects.equals(this.evaluationId, experimentEvaluationStatsResult.evaluationId) && + Objects.equals(this.evaluationName, experimentEvaluationStatsResult.evaluationName) && + Objects.equals(this.evaluationTemplateId, experimentEvaluationStatsResult.evaluationTemplateId) && + Objects.equals(this.datasetId, experimentEvaluationStatsResult.datasetId) && + Objects.equals(this.datasetName, experimentEvaluationStatsResult.datasetName) && + Objects.equals(this.evaluationColumns, experimentEvaluationStatsResult.evaluationColumns); + } + + @Override + public int hashCode() { + return Objects.hash(experimentId, experimentName, evaluationId, evaluationName, evaluationTemplateId, datasetId, datasetName, evaluationColumns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentEvaluationStatsResult {\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" experimentName: ").append(toIndentedString(experimentName)).append("\n"); + sb.append(" evaluationId: ").append(toIndentedString(evaluationId)).append("\n"); + sb.append(" evaluationName: ").append(toIndentedString(evaluationName)).append("\n"); + sb.append(" evaluationTemplateId: ").append(toIndentedString(evaluationTemplateId)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" evaluationColumns: ").append(toIndentedString(evaluationColumns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `experiment_name` to the URL query string + if (getExperimentName() != null) { + joiner.add(String.format("%sexperiment_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentName())))); + } + + // add `evaluation_id` to the URL query string + if (getEvaluationId() != null) { + joiner.add(String.format("%sevaluation_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvaluationId())))); + } + + // add `evaluation_name` to the URL query string + if (getEvaluationName() != null) { + joiner.add(String.format("%sevaluation_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvaluationName())))); + } + + // add `evaluation_template_id` to the URL query string + if (getEvaluationTemplateId() != null) { + joiner.add(String.format("%sevaluation_template_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvaluationTemplateId())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `evaluation_columns` to the URL query string + if (getEvaluationColumns() != null) { + for (int i = 0; i < getEvaluationColumns().size(); i++) { + if (getEvaluationColumns().get(i) != null) { + joiner.add(getEvaluationColumns().get(i).toUrlQueryString(String.format("%sevaluation_columns%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationTokenUsage.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationTokenUsage.java new file mode 100644 index 0000000..cabfd5d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentEvaluationTokenUsage.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentEvaluationTokenUsage + */ +@JsonPropertyOrder({ + ExperimentEvaluationTokenUsage.JSON_PROPERTY_AVG_COMPLETION_TOKENS, + ExperimentEvaluationTokenUsage.JSON_PROPERTY_AVG_PROMPT_TOKENS, + ExperimentEvaluationTokenUsage.JSON_PROPERTY_AVG_TOTAL_TOKENS, + ExperimentEvaluationTokenUsage.JSON_PROPERTY_TOTAL_TOKENS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentEvaluationTokenUsage { + public static final String JSON_PROPERTY_AVG_COMPLETION_TOKENS = "avg_completion_tokens"; + @javax.annotation.Nonnull + private BigDecimal avgCompletionTokens; + + public static final String JSON_PROPERTY_AVG_PROMPT_TOKENS = "avg_prompt_tokens"; + @javax.annotation.Nonnull + private BigDecimal avgPromptTokens; + + public static final String JSON_PROPERTY_AVG_TOTAL_TOKENS = "avg_total_tokens"; + @javax.annotation.Nonnull + private BigDecimal avgTotalTokens; + + public static final String JSON_PROPERTY_TOTAL_TOKENS = "total_tokens"; + @javax.annotation.Nonnull + private Integer totalTokens; + + public ExperimentEvaluationTokenUsage() { + } + + public ExperimentEvaluationTokenUsage avgCompletionTokens(@javax.annotation.Nonnull BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = avgCompletionTokens; + return this; + } + + /** + * Get avgCompletionTokens + * @return avgCompletionTokens + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgCompletionTokens() { + return avgCompletionTokens; + } + + + @JsonProperty(JSON_PROPERTY_AVG_COMPLETION_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgCompletionTokens(@javax.annotation.Nonnull BigDecimal avgCompletionTokens) { + this.avgCompletionTokens = avgCompletionTokens; + } + + + public ExperimentEvaluationTokenUsage avgPromptTokens(@javax.annotation.Nonnull BigDecimal avgPromptTokens) { + this.avgPromptTokens = avgPromptTokens; + return this; + } + + /** + * Get avgPromptTokens + * @return avgPromptTokens + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_PROMPT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgPromptTokens() { + return avgPromptTokens; + } + + + @JsonProperty(JSON_PROPERTY_AVG_PROMPT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgPromptTokens(@javax.annotation.Nonnull BigDecimal avgPromptTokens) { + this.avgPromptTokens = avgPromptTokens; + } + + + public ExperimentEvaluationTokenUsage avgTotalTokens(@javax.annotation.Nonnull BigDecimal avgTotalTokens) { + this.avgTotalTokens = avgTotalTokens; + return this; + } + + /** + * Get avgTotalTokens + * @return avgTotalTokens + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgTotalTokens() { + return avgTotalTokens; + } + + + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgTotalTokens(@javax.annotation.Nonnull BigDecimal avgTotalTokens) { + this.avgTotalTokens = avgTotalTokens; + } + + + public ExperimentEvaluationTokenUsage totalTokens(@javax.annotation.Nonnull Integer totalTokens) { + this.totalTokens = totalTokens; + return this; + } + + /** + * Get totalTokens + * @return totalTokens + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalTokens() { + return totalTokens; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalTokens(@javax.annotation.Nonnull Integer totalTokens) { + this.totalTokens = totalTokens; + } + + + /** + * Return true if this ExperimentEvaluationTokenUsage object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentEvaluationTokenUsage experimentEvaluationTokenUsage = (ExperimentEvaluationTokenUsage) o; + return Objects.equals(this.avgCompletionTokens, experimentEvaluationTokenUsage.avgCompletionTokens) && + Objects.equals(this.avgPromptTokens, experimentEvaluationTokenUsage.avgPromptTokens) && + Objects.equals(this.avgTotalTokens, experimentEvaluationTokenUsage.avgTotalTokens) && + Objects.equals(this.totalTokens, experimentEvaluationTokenUsage.totalTokens); + } + + @Override + public int hashCode() { + return Objects.hash(avgCompletionTokens, avgPromptTokens, avgTotalTokens, totalTokens); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentEvaluationTokenUsage {\n"); + sb.append(" avgCompletionTokens: ").append(toIndentedString(avgCompletionTokens)).append("\n"); + sb.append(" avgPromptTokens: ").append(toIndentedString(avgPromptTokens)).append("\n"); + sb.append(" avgTotalTokens: ").append(toIndentedString(avgTotalTokens)).append("\n"); + sb.append(" totalTokens: ").append(toIndentedString(totalTokens)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `avg_completion_tokens` to the URL query string + if (getAvgCompletionTokens() != null) { + joiner.add(String.format("%savg_completion_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgCompletionTokens())))); + } + + // add `avg_prompt_tokens` to the URL query string + if (getAvgPromptTokens() != null) { + joiner.add(String.format("%savg_prompt_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgPromptTokens())))); + } + + // add `avg_total_tokens` to the URL query string + if (getAvgTotalTokens() != null) { + joiner.add(String.format("%savg_total_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTotalTokens())))); + } + + // add `total_tokens` to the URL query string + if (getTotalTokens() != null) { + joiner.add(String.format("%stotal_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTokens())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResponse.java new file mode 100644 index 0000000..f8fd133 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentFeedbackCreateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackCreateResponse + */ +@JsonPropertyOrder({ + ExperimentFeedbackCreateResponse.JSON_PROPERTY_STATUS, + ExperimentFeedbackCreateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackCreateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentFeedbackCreateResult result; + + public ExperimentFeedbackCreateResponse() { + } + + public ExperimentFeedbackCreateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentFeedbackCreateResponse result(@javax.annotation.Nonnull ExperimentFeedbackCreateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentFeedbackCreateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentFeedbackCreateResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentFeedbackCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackCreateResponse experimentFeedbackCreateResponse = (ExperimentFeedbackCreateResponse) o; + return Objects.equals(this.status, experimentFeedbackCreateResponse.status) && + Objects.equals(this.result, experimentFeedbackCreateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackCreateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResult.java new file mode 100644 index 0000000..db5ddee --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackCreateResult.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackCreateResult + */ +@JsonPropertyOrder({ + ExperimentFeedbackCreateResult.JSON_PROPERTY_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackCreateResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public ExperimentFeedbackCreateResult() { + } + + public ExperimentFeedbackCreateResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this ExperimentFeedbackCreateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackCreateResult experimentFeedbackCreateResult = (ExperimentFeedbackCreateResult) o; + return Objects.equals(this.id, experimentFeedbackCreateResult.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackCreateResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailItem.java new file mode 100644 index 0000000..9e4fed8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailItem.java @@ -0,0 +1,340 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackDetailItem + */ +@JsonPropertyOrder({ + ExperimentFeedbackDetailItem.JSON_PROPERTY_ID, + ExperimentFeedbackDetailItem.JSON_PROPERTY_VALUE, + ExperimentFeedbackDetailItem.JSON_PROPERTY_COMMENT, + ExperimentFeedbackDetailItem.JSON_PROPERTY_CREATED_AT, + ExperimentFeedbackDetailItem.JSON_PROPERTY_ACTION_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackDetailItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_COMMENT = "comment"; + private JsonNullable comment = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ACTION_TYPE = "action_type"; + private JsonNullable actionType = JsonNullable.undefined(); + + public ExperimentFeedbackDetailItem() { + } + + public ExperimentFeedbackDetailItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ExperimentFeedbackDetailItem value(@javax.annotation.Nullable Map value) { + this.value = value; + return this; + } + + public ExperimentFeedbackDetailItem putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable Map value) { + this.value = value; + } + + + public ExperimentFeedbackDetailItem comment(@javax.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + return this; + } + + /** + * Get comment + * @return comment + */ + @javax.annotation.Nullable + @JsonIgnore + public String getComment() { + return comment.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComment_JsonNullable() { + return comment; + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + public void setComment_JsonNullable(JsonNullable comment) { + this.comment = comment; + } + + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + } + + + public ExperimentFeedbackDetailItem createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ExperimentFeedbackDetailItem actionType(@javax.annotation.Nullable String actionType) { + this.actionType = JsonNullable.of(actionType); + return this; + } + + /** + * Get actionType + * @return actionType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getActionType() { + return actionType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getActionType_JsonNullable() { + return actionType; + } + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + public void setActionType_JsonNullable(JsonNullable actionType) { + this.actionType = actionType; + } + + public void setActionType(@javax.annotation.Nullable String actionType) { + this.actionType = JsonNullable.of(actionType); + } + + + /** + * Return true if this ExperimentFeedbackDetailItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackDetailItem experimentFeedbackDetailItem = (ExperimentFeedbackDetailItem) o; + return Objects.equals(this.id, experimentFeedbackDetailItem.id) && + Objects.equals(this.value, experimentFeedbackDetailItem.value) && + equalsNullable(this.comment, experimentFeedbackDetailItem.comment) && + Objects.equals(this.createdAt, experimentFeedbackDetailItem.createdAt) && + equalsNullable(this.actionType, experimentFeedbackDetailItem.actionType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, value, hashCodeNullable(comment), createdAt, hashCodeNullable(actionType)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackDetailItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `comment` to the URL query string + if (getComment() != null) { + joiner.add(String.format("%scomment%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getComment())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `action_type` to the URL query string + if (getActionType() != null) { + joiner.add(String.format("%saction_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActionType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResponse.java new file mode 100644 index 0000000..0f17b84 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentFeedbackDetailsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackDetailsResponse + */ +@JsonPropertyOrder({ + ExperimentFeedbackDetailsResponse.JSON_PROPERTY_STATUS, + ExperimentFeedbackDetailsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackDetailsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentFeedbackDetailsResult result; + + public ExperimentFeedbackDetailsResponse() { + } + + public ExperimentFeedbackDetailsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentFeedbackDetailsResponse result(@javax.annotation.Nonnull ExperimentFeedbackDetailsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentFeedbackDetailsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentFeedbackDetailsResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentFeedbackDetailsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackDetailsResponse experimentFeedbackDetailsResponse = (ExperimentFeedbackDetailsResponse) o; + return Objects.equals(this.status, experimentFeedbackDetailsResponse.status) && + Objects.equals(this.result, experimentFeedbackDetailsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackDetailsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResult.java new file mode 100644 index 0000000..3194b26 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackDetailsResult.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentFeedbackDetailItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackDetailsResult + */ +@JsonPropertyOrder({ + ExperimentFeedbackDetailsResult.JSON_PROPERTY_FEEDBACK, + ExperimentFeedbackDetailsResult.JSON_PROPERTY_TOTAL_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackDetailsResult { + public static final String JSON_PROPERTY_FEEDBACK = "feedback"; + @javax.annotation.Nonnull + private List feedback = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; + @javax.annotation.Nonnull + private Integer totalCount; + + public ExperimentFeedbackDetailsResult() { + } + + public ExperimentFeedbackDetailsResult feedback(@javax.annotation.Nonnull List feedback) { + this.feedback = feedback; + return this; + } + + public ExperimentFeedbackDetailsResult addFeedbackItem(ExperimentFeedbackDetailItem feedbackItem) { + if (this.feedback == null) { + this.feedback = new ArrayList<>(); + } + this.feedback.add(feedbackItem); + return this; + } + + /** + * Get feedback + * @return feedback + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEEDBACK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFeedback() { + return feedback; + } + + + @JsonProperty(JSON_PROPERTY_FEEDBACK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFeedback(@javax.annotation.Nonnull List feedback) { + this.feedback = feedback; + } + + + public ExperimentFeedbackDetailsResult totalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * @return totalCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalCount() { + return totalCount; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + } + + + /** + * Return true if this ExperimentFeedbackDetailsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackDetailsResult experimentFeedbackDetailsResult = (ExperimentFeedbackDetailsResult) o; + return Objects.equals(this.feedback, experimentFeedbackDetailsResult.feedback) && + Objects.equals(this.totalCount, experimentFeedbackDetailsResult.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(feedback, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackDetailsResult {\n"); + sb.append(" feedback: ").append(toIndentedString(feedback)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `feedback` to the URL query string + if (getFeedback() != null) { + for (int i = 0; i < getFeedback().size(); i++) { + if (getFeedback().get(i) != null) { + joiner.add(getFeedback().get(i).toUrlQueryString(String.format("%sfeedback%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_count` to the URL query string + if (getTotalCount() != null) { + joiner.add(String.format("%stotal_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitRequest.java new file mode 100644 index 0000000..7f6f0d6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitRequest.java @@ -0,0 +1,349 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackSubmitRequest + */ +@JsonPropertyOrder({ + ExperimentFeedbackSubmitRequest.JSON_PROPERTY_ACTION_TYPE, + ExperimentFeedbackSubmitRequest.JSON_PROPERTY_FEEDBACK_ID, + ExperimentFeedbackSubmitRequest.JSON_PROPERTY_USER_EVAL_METRIC_ID, + ExperimentFeedbackSubmitRequest.JSON_PROPERTY_VALUE, + ExperimentFeedbackSubmitRequest.JSON_PROPERTY_EXPLANATION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackSubmitRequest { + /** + * Gets or Sets actionType + */ + public enum ActionTypeEnum { + RETUNE(String.valueOf("retune")), + + RECALCULATE_ROW(String.valueOf("recalculate_row")), + + RECALCULATE_DATASET(String.valueOf("recalculate_dataset")), + + RETUNE_RECALCULATE(String.valueOf("retune_recalculate")); + + private String value; + + ActionTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ActionTypeEnum fromValue(String value) { + for (ActionTypeEnum b : ActionTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACTION_TYPE = "action_type"; + @javax.annotation.Nonnull + private ActionTypeEnum actionType; + + public static final String JSON_PROPERTY_FEEDBACK_ID = "feedback_id"; + @javax.annotation.Nonnull + private UUID feedbackId; + + public static final String JSON_PROPERTY_USER_EVAL_METRIC_ID = "user_eval_metric_id"; + @javax.annotation.Nonnull + private UUID userEvalMetricId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_EXPLANATION = "explanation"; + @javax.annotation.Nullable + private String explanation; + + public ExperimentFeedbackSubmitRequest() { + } + + public ExperimentFeedbackSubmitRequest actionType(@javax.annotation.Nonnull ActionTypeEnum actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get actionType + * @return actionType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ActionTypeEnum getActionType() { + return actionType; + } + + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setActionType(@javax.annotation.Nonnull ActionTypeEnum actionType) { + this.actionType = actionType; + } + + + public ExperimentFeedbackSubmitRequest feedbackId(@javax.annotation.Nonnull UUID feedbackId) { + this.feedbackId = feedbackId; + return this; + } + + /** + * Get feedbackId + * @return feedbackId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEEDBACK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getFeedbackId() { + return feedbackId; + } + + + @JsonProperty(JSON_PROPERTY_FEEDBACK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFeedbackId(@javax.annotation.Nonnull UUID feedbackId) { + this.feedbackId = feedbackId; + } + + + public ExperimentFeedbackSubmitRequest userEvalMetricId(@javax.annotation.Nonnull UUID userEvalMetricId) { + this.userEvalMetricId = userEvalMetricId; + return this; + } + + /** + * Get userEvalMetricId + * @return userEvalMetricId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserEvalMetricId() { + return userEvalMetricId; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserEvalMetricId(@javax.annotation.Nonnull UUID userEvalMetricId) { + this.userEvalMetricId = userEvalMetricId; + } + + + public ExperimentFeedbackSubmitRequest value(@javax.annotation.Nullable Map value) { + this.value = value; + return this; + } + + public ExperimentFeedbackSubmitRequest putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable Map value) { + this.value = value; + } + + + public ExperimentFeedbackSubmitRequest explanation(@javax.annotation.Nullable String explanation) { + this.explanation = explanation; + return this; + } + + /** + * Get explanation + * @return explanation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExplanation() { + return explanation; + } + + + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExplanation(@javax.annotation.Nullable String explanation) { + this.explanation = explanation; + } + + + /** + * Return true if this ExperimentFeedbackSubmitRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackSubmitRequest experimentFeedbackSubmitRequest = (ExperimentFeedbackSubmitRequest) o; + return Objects.equals(this.actionType, experimentFeedbackSubmitRequest.actionType) && + Objects.equals(this.feedbackId, experimentFeedbackSubmitRequest.feedbackId) && + Objects.equals(this.userEvalMetricId, experimentFeedbackSubmitRequest.userEvalMetricId) && + Objects.equals(this.value, experimentFeedbackSubmitRequest.value) && + Objects.equals(this.explanation, experimentFeedbackSubmitRequest.explanation); + } + + @Override + public int hashCode() { + return Objects.hash(actionType, feedbackId, userEvalMetricId, value, explanation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackSubmitRequest {\n"); + sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n"); + sb.append(" feedbackId: ").append(toIndentedString(feedbackId)).append("\n"); + sb.append(" userEvalMetricId: ").append(toIndentedString(userEvalMetricId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" explanation: ").append(toIndentedString(explanation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `action_type` to the URL query string + if (getActionType() != null) { + joiner.add(String.format("%saction_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActionType())))); + } + + // add `feedback_id` to the URL query string + if (getFeedbackId() != null) { + joiner.add(String.format("%sfeedback_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFeedbackId())))); + } + + // add `user_eval_metric_id` to the URL query string + if (getUserEvalMetricId() != null) { + joiner.add(String.format("%suser_eval_metric_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserEvalMetricId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `explanation` to the URL query string + if (getExplanation() != null) { + joiner.add(String.format("%sexplanation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExplanation())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResponse.java new file mode 100644 index 0000000..8f329ea --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentFeedbackSubmitResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackSubmitResponse + */ +@JsonPropertyOrder({ + ExperimentFeedbackSubmitResponse.JSON_PROPERTY_STATUS, + ExperimentFeedbackSubmitResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackSubmitResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentFeedbackSubmitResult result; + + public ExperimentFeedbackSubmitResponse() { + } + + public ExperimentFeedbackSubmitResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentFeedbackSubmitResponse result(@javax.annotation.Nonnull ExperimentFeedbackSubmitResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentFeedbackSubmitResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentFeedbackSubmitResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentFeedbackSubmitResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackSubmitResponse experimentFeedbackSubmitResponse = (ExperimentFeedbackSubmitResponse) o; + return Objects.equals(this.status, experimentFeedbackSubmitResponse.status) && + Objects.equals(this.result, experimentFeedbackSubmitResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackSubmitResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResult.java new file mode 100644 index 0000000..871ace8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackSubmitResult.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackSubmitResult + */ +@JsonPropertyOrder({ + ExperimentFeedbackSubmitResult.JSON_PROPERTY_MESSAGE, + ExperimentFeedbackSubmitResult.JSON_PROPERTY_ACTION_TYPE, + ExperimentFeedbackSubmitResult.JSON_PROPERTY_USER_EVAL_METRIC_ID, + ExperimentFeedbackSubmitResult.JSON_PROPERTY_WORKFLOW_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackSubmitResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_ACTION_TYPE = "action_type"; + @javax.annotation.Nonnull + private String actionType; + + public static final String JSON_PROPERTY_USER_EVAL_METRIC_ID = "user_eval_metric_id"; + @javax.annotation.Nonnull + private UUID userEvalMetricId; + + public static final String JSON_PROPERTY_WORKFLOW_ID = "workflow_id"; + @javax.annotation.Nullable + private String workflowId; + + public ExperimentFeedbackSubmitResult() { + } + + public ExperimentFeedbackSubmitResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public ExperimentFeedbackSubmitResult actionType(@javax.annotation.Nonnull String actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get actionType + * @return actionType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getActionType() { + return actionType; + } + + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setActionType(@javax.annotation.Nonnull String actionType) { + this.actionType = actionType; + } + + + public ExperimentFeedbackSubmitResult userEvalMetricId(@javax.annotation.Nonnull UUID userEvalMetricId) { + this.userEvalMetricId = userEvalMetricId; + return this; + } + + /** + * Get userEvalMetricId + * @return userEvalMetricId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserEvalMetricId() { + return userEvalMetricId; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserEvalMetricId(@javax.annotation.Nonnull UUID userEvalMetricId) { + this.userEvalMetricId = userEvalMetricId; + } + + + public ExperimentFeedbackSubmitResult workflowId(@javax.annotation.Nullable String workflowId) { + this.workflowId = workflowId; + return this; + } + + /** + * Get workflowId + * @return workflowId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWorkflowId() { + return workflowId; + } + + + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWorkflowId(@javax.annotation.Nullable String workflowId) { + this.workflowId = workflowId; + } + + + /** + * Return true if this ExperimentFeedbackSubmitResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackSubmitResult experimentFeedbackSubmitResult = (ExperimentFeedbackSubmitResult) o; + return Objects.equals(this.message, experimentFeedbackSubmitResult.message) && + Objects.equals(this.actionType, experimentFeedbackSubmitResult.actionType) && + Objects.equals(this.userEvalMetricId, experimentFeedbackSubmitResult.userEvalMetricId) && + Objects.equals(this.workflowId, experimentFeedbackSubmitResult.workflowId); + } + + @Override + public int hashCode() { + return Objects.hash(message, actionType, userEvalMetricId, workflowId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackSubmitResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n"); + sb.append(" userEvalMetricId: ").append(toIndentedString(userEvalMetricId)).append("\n"); + sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `action_type` to the URL query string + if (getActionType() != null) { + joiner.add(String.format("%saction_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActionType())))); + } + + // add `user_eval_metric_id` to the URL query string + if (getUserEvalMetricId() != null) { + joiner.add(String.format("%suser_eval_metric_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserEvalMetricId())))); + } + + // add `workflow_id` to the URL query string + if (getWorkflowId() != null) { + joiner.add(String.format("%sworkflow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkflowId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResponse.java new file mode 100644 index 0000000..1335102 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentFeedbackTemplateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackTemplateResponse + */ +@JsonPropertyOrder({ + ExperimentFeedbackTemplateResponse.JSON_PROPERTY_STATUS, + ExperimentFeedbackTemplateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackTemplateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentFeedbackTemplateResult result; + + public ExperimentFeedbackTemplateResponse() { + } + + public ExperimentFeedbackTemplateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentFeedbackTemplateResponse result(@javax.annotation.Nonnull ExperimentFeedbackTemplateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentFeedbackTemplateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentFeedbackTemplateResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentFeedbackTemplateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackTemplateResponse experimentFeedbackTemplateResponse = (ExperimentFeedbackTemplateResponse) o; + return Objects.equals(this.status, experimentFeedbackTemplateResponse.status) && + Objects.equals(this.result, experimentFeedbackTemplateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackTemplateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResult.java new file mode 100644 index 0000000..3fc599a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentFeedbackTemplateResult.java @@ -0,0 +1,374 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentFeedbackTemplateResult + */ +@JsonPropertyOrder({ + ExperimentFeedbackTemplateResult.JSON_PROPERTY_OUTPUT_TYPE, + ExperimentFeedbackTemplateResult.JSON_PROPERTY_EVAL_DESCRIPTION, + ExperimentFeedbackTemplateResult.JSON_PROPERTY_EVAL_NAME, + ExperimentFeedbackTemplateResult.JSON_PROPERTY_USER_EVAL_NAME, + ExperimentFeedbackTemplateResult.JSON_PROPERTY_CHOICES, + ExperimentFeedbackTemplateResult.JSON_PROPERTY_MULTI_CHOICE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentFeedbackTemplateResult { + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + private JsonNullable outputType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_DESCRIPTION = "eval_description"; + private JsonNullable evalDescription = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_NAME = "eval_name"; + @javax.annotation.Nonnull + private String evalName; + + public static final String JSON_PROPERTY_USER_EVAL_NAME = "user_eval_name"; + @javax.annotation.Nonnull + private String userEvalName; + + public static final String JSON_PROPERTY_CHOICES = "choices"; + @javax.annotation.Nullable + private List choices = new ArrayList<>(); + + public static final String JSON_PROPERTY_MULTI_CHOICE = "multi_choice"; + @javax.annotation.Nullable + private Boolean multiChoice; + + public ExperimentFeedbackTemplateResult() { + } + + public ExperimentFeedbackTemplateResult outputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getOutputType() { + return outputType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutputType_JsonNullable() { + return outputType; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + public void setOutputType_JsonNullable(JsonNullable outputType) { + this.outputType = outputType; + } + + public void setOutputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + } + + + public ExperimentFeedbackTemplateResult evalDescription(@javax.annotation.Nullable String evalDescription) { + this.evalDescription = JsonNullable.of(evalDescription); + return this; + } + + /** + * Get evalDescription + * @return evalDescription + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalDescription() { + return evalDescription.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalDescription_JsonNullable() { + return evalDescription; + } + + @JsonProperty(JSON_PROPERTY_EVAL_DESCRIPTION) + public void setEvalDescription_JsonNullable(JsonNullable evalDescription) { + this.evalDescription = evalDescription; + } + + public void setEvalDescription(@javax.annotation.Nullable String evalDescription) { + this.evalDescription = JsonNullable.of(evalDescription); + } + + + public ExperimentFeedbackTemplateResult evalName(@javax.annotation.Nonnull String evalName) { + this.evalName = evalName; + return this; + } + + /** + * Get evalName + * @return evalName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalName() { + return evalName; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalName(@javax.annotation.Nonnull String evalName) { + this.evalName = evalName; + } + + + public ExperimentFeedbackTemplateResult userEvalName(@javax.annotation.Nonnull String userEvalName) { + this.userEvalName = userEvalName; + return this; + } + + /** + * Get userEvalName + * @return userEvalName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserEvalName() { + return userEvalName; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserEvalName(@javax.annotation.Nonnull String userEvalName) { + this.userEvalName = userEvalName; + } + + + public ExperimentFeedbackTemplateResult choices(@javax.annotation.Nullable List choices) { + this.choices = choices; + return this; + } + + public ExperimentFeedbackTemplateResult addChoicesItem(String choicesItem) { + if (this.choices == null) { + this.choices = new ArrayList<>(); + } + this.choices.add(choicesItem); + return this; + } + + /** + * Get choices + * @return choices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getChoices() { + return choices; + } + + + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChoices(@javax.annotation.Nullable List choices) { + this.choices = choices; + } + + + public ExperimentFeedbackTemplateResult multiChoice(@javax.annotation.Nullable Boolean multiChoice) { + this.multiChoice = multiChoice; + return this; + } + + /** + * Get multiChoice + * @return multiChoice + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMultiChoice() { + return multiChoice; + } + + + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultiChoice(@javax.annotation.Nullable Boolean multiChoice) { + this.multiChoice = multiChoice; + } + + + /** + * Return true if this ExperimentFeedbackTemplateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentFeedbackTemplateResult experimentFeedbackTemplateResult = (ExperimentFeedbackTemplateResult) o; + return equalsNullable(this.outputType, experimentFeedbackTemplateResult.outputType) && + equalsNullable(this.evalDescription, experimentFeedbackTemplateResult.evalDescription) && + Objects.equals(this.evalName, experimentFeedbackTemplateResult.evalName) && + Objects.equals(this.userEvalName, experimentFeedbackTemplateResult.userEvalName) && + Objects.equals(this.choices, experimentFeedbackTemplateResult.choices) && + Objects.equals(this.multiChoice, experimentFeedbackTemplateResult.multiChoice); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(outputType), hashCodeNullable(evalDescription), evalName, userEvalName, choices, multiChoice); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentFeedbackTemplateResult {\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" evalDescription: ").append(toIndentedString(evalDescription)).append("\n"); + sb.append(" evalName: ").append(toIndentedString(evalName)).append("\n"); + sb.append(" userEvalName: ").append(toIndentedString(userEvalName)).append("\n"); + sb.append(" choices: ").append(toIndentedString(choices)).append("\n"); + sb.append(" multiChoice: ").append(toIndentedString(multiChoice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `eval_description` to the URL query string + if (getEvalDescription() != null) { + joiner.add(String.format("%seval_description%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalDescription())))); + } + + // add `eval_name` to the URL query string + if (getEvalName() != null) { + joiner.add(String.format("%seval_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalName())))); + } + + // add `user_eval_name` to the URL query string + if (getUserEvalName() != null) { + joiner.add(String.format("%suser_eval_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserEvalName())))); + } + + // add `choices` to the URL query string + if (getChoices() != null) { + for (int i = 0; i < getChoices().size(); i++) { + joiner.add(String.format("%schoices%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getChoices().get(i))))); + } + } + + // add `multi_choice` to the URL query string + if (getMultiChoice() != null) { + joiner.add(String.format("%smulti_choice%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiChoice())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentJsonSchemaResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentJsonSchemaResponse.java new file mode 100644 index 0000000..b4e67f4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentJsonSchemaResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.JsonColumnSchemaEntry; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentJsonSchemaResponse + */ +@JsonPropertyOrder({ + ExperimentJsonSchemaResponse.JSON_PROPERTY_STATUS, + ExperimentJsonSchemaResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentJsonSchemaResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map result = new HashMap<>(); + + public ExperimentJsonSchemaResponse() { + } + + public ExperimentJsonSchemaResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentJsonSchemaResponse result(@javax.annotation.Nonnull Map result) { + this.result = result; + return this; + } + + public ExperimentJsonSchemaResponse putResultItem(String key, JsonColumnSchemaEntry resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map result) { + this.result = result; + } + + + /** + * Return true if this ExperimentJsonSchemaResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentJsonSchemaResponse experimentJsonSchemaResponse = (ExperimentJsonSchemaResponse) o; + return Objects.equals(this.status, experimentJsonSchemaResponse.status) && + Objects.equals(this.result, experimentJsonSchemaResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentJsonSchemaResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + if (getResult().get(_key) != null) { + joiner.add(getResult().get(_key).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentListV2.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentListV2.java new file mode 100644 index 0000000..0523066 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentListV2.java @@ -0,0 +1,511 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentListV2 + */ +@JsonPropertyOrder({ + ExperimentListV2.JSON_PROPERTY_ID, + ExperimentListV2.JSON_PROPERTY_NAME, + ExperimentListV2.JSON_PROPERTY_STATUS, + ExperimentListV2.JSON_PROPERTY_EXPERIMENT_TYPE, + ExperimentListV2.JSON_PROPERTY_EVAL_TEMPLATES_COUNT, + ExperimentListV2.JSON_PROPERTY_CREATED_AT, + ExperimentListV2.JSON_PROPERTY_MODELS_COUNT, + ExperimentListV2.JSON_PROPERTY_AGENTS_COUNT, + ExperimentListV2.JSON_PROPERTY_DATASET +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentListV2 { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + NOT_STARTED(String.valueOf("NotStarted")), + + QUEUED(String.valueOf("Queued")), + + RUNNING(String.valueOf("Running")), + + COMPLETED(String.valueOf("Completed")), + + EDITING(String.valueOf("Editing")), + + INACTIVE(String.valueOf("Inactive")), + + FAILED(String.valueOf("Failed")), + + PARTIAL_RUN(String.valueOf("PartialRun")), + + EXPERIMENT_EVALUATION(String.valueOf("ExperimentEvaluation")), + + UPLOADING(String.valueOf("Uploading")), + + PARTIAL_EXTRACTED(String.valueOf("PartialExtracted")), + + PROCESSING(String.valueOf("Processing")), + + DELETING(String.valueOf("Deleting")), + + PARTIAL_COMPLETED(String.valueOf("PartialCompleted")), + + OPTIMIZATION_EVALUATION(String.valueOf("OptimizationEvaluation")), + + ERROR(String.valueOf("Error")), + + CANCELLED(String.valueOf("Cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + /** + * Determines how the experiment executes: llm, tts, stt, or image. + */ + public enum ExperimentTypeEnum { + LLM(String.valueOf("llm")), + + TTS(String.valueOf("tts")), + + STT(String.valueOf("stt")), + + IMAGE(String.valueOf("image")); + + private String value; + + ExperimentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExperimentTypeEnum fromValue(String value) { + for (ExperimentTypeEnum b : ExperimentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EXPERIMENT_TYPE = "experiment_type"; + @javax.annotation.Nullable + private ExperimentTypeEnum experimentType; + + public static final String JSON_PROPERTY_EVAL_TEMPLATES_COUNT = "eval_templates_count"; + @javax.annotation.Nullable + private String evalTemplatesCount; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MODELS_COUNT = "models_count"; + @javax.annotation.Nullable + private String modelsCount; + + public static final String JSON_PROPERTY_AGENTS_COUNT = "agents_count"; + @javax.annotation.Nullable + private String agentsCount; + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nonnull + private UUID dataset; + + public ExperimentListV2() { + } + + @JsonCreator + public ExperimentListV2( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATES_COUNT) String evalTemplatesCount, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_MODELS_COUNT) String modelsCount, + @JsonProperty(JSON_PROPERTY_AGENTS_COUNT) String agentsCount + ) { + this(); + this.id = id; + this.evalTemplatesCount = evalTemplatesCount; + this.createdAt = createdAt; + this.modelsCount = modelsCount; + this.agentsCount = agentsCount; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public ExperimentListV2 name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ExperimentListV2 status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public ExperimentListV2 experimentType(@javax.annotation.Nullable ExperimentTypeEnum experimentType) { + this.experimentType = experimentType; + return this; + } + + /** + * Determines how the experiment executes: llm, tts, stt, or image. + * @return experimentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExperimentTypeEnum getExperimentType() { + return experimentType; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentType(@javax.annotation.Nullable ExperimentTypeEnum experimentType) { + this.experimentType = experimentType; + } + + + /** + * Get evalTemplatesCount + * @return evalTemplatesCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATES_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalTemplatesCount() { + return evalTemplatesCount; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get modelsCount + * @return modelsCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODELS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelsCount() { + return modelsCount; + } + + + + + /** + * Get agentsCount + * @return agentsCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENTS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentsCount() { + return agentsCount; + } + + + + + public ExperimentListV2 dataset(@javax.annotation.Nonnull UUID dataset) { + this.dataset = dataset; + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataset(@javax.annotation.Nonnull UUID dataset) { + this.dataset = dataset; + } + + + /** + * Return true if this ExperimentListV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentListV2 experimentListV2 = (ExperimentListV2) o; + return Objects.equals(this.id, experimentListV2.id) && + Objects.equals(this.name, experimentListV2.name) && + Objects.equals(this.status, experimentListV2.status) && + Objects.equals(this.experimentType, experimentListV2.experimentType) && + Objects.equals(this.evalTemplatesCount, experimentListV2.evalTemplatesCount) && + Objects.equals(this.createdAt, experimentListV2.createdAt) && + Objects.equals(this.modelsCount, experimentListV2.modelsCount) && + Objects.equals(this.agentsCount, experimentListV2.agentsCount) && + Objects.equals(this.dataset, experimentListV2.dataset); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, experimentType, evalTemplatesCount, createdAt, modelsCount, agentsCount, dataset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentListV2 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" experimentType: ").append(toIndentedString(experimentType)).append("\n"); + sb.append(" evalTemplatesCount: ").append(toIndentedString(evalTemplatesCount)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modelsCount: ").append(toIndentedString(modelsCount)).append("\n"); + sb.append(" agentsCount: ").append(toIndentedString(agentsCount)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `experiment_type` to the URL query string + if (getExperimentType() != null) { + joiner.add(String.format("%sexperiment_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentType())))); + } + + // add `eval_templates_count` to the URL query string + if (getEvalTemplatesCount() != null) { + joiner.add(String.format("%seval_templates_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplatesCount())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `models_count` to the URL query string + if (getModelsCount() != null) { + joiner.add(String.format("%smodels_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelsCount())))); + } + + // add `agents_count` to the URL query string + if (getAgentsCount() != null) { + joiner.add(String.format("%sagents_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentsCount())))); + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(String.format("%sdataset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataset())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResponse.java new file mode 100644 index 0000000..67deb54 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentNameSuggestionResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentNameSuggestionResponse + */ +@JsonPropertyOrder({ + ExperimentNameSuggestionResponse.JSON_PROPERTY_STATUS, + ExperimentNameSuggestionResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentNameSuggestionResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentNameSuggestionResult result; + + public ExperimentNameSuggestionResponse() { + } + + public ExperimentNameSuggestionResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentNameSuggestionResponse result(@javax.annotation.Nonnull ExperimentNameSuggestionResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentNameSuggestionResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentNameSuggestionResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentNameSuggestionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentNameSuggestionResponse experimentNameSuggestionResponse = (ExperimentNameSuggestionResponse) o; + return Objects.equals(this.status, experimentNameSuggestionResponse.status) && + Objects.equals(this.result, experimentNameSuggestionResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentNameSuggestionResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResult.java new file mode 100644 index 0000000..e467132 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameSuggestionResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentNameSuggestionResult + */ +@JsonPropertyOrder({ + ExperimentNameSuggestionResult.JSON_PROPERTY_SUGGESTED_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentNameSuggestionResult { + public static final String JSON_PROPERTY_SUGGESTED_NAME = "suggested_name"; + @javax.annotation.Nonnull + private String suggestedName; + + public ExperimentNameSuggestionResult() { + } + + public ExperimentNameSuggestionResult suggestedName(@javax.annotation.Nonnull String suggestedName) { + this.suggestedName = suggestedName; + return this; + } + + /** + * Get suggestedName + * @return suggestedName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUGGESTED_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSuggestedName() { + return suggestedName; + } + + + @JsonProperty(JSON_PROPERTY_SUGGESTED_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuggestedName(@javax.annotation.Nonnull String suggestedName) { + this.suggestedName = suggestedName; + } + + + /** + * Return true if this ExperimentNameSuggestionResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentNameSuggestionResult experimentNameSuggestionResult = (ExperimentNameSuggestionResult) o; + return Objects.equals(this.suggestedName, experimentNameSuggestionResult.suggestedName); + } + + @Override + public int hashCode() { + return Objects.hash(suggestedName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentNameSuggestionResult {\n"); + sb.append(" suggestedName: ").append(toIndentedString(suggestedName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `suggested_name` to the URL query string + if (getSuggestedName() != null) { + joiner.add(String.format("%ssuggested_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuggestedName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResponse.java new file mode 100644 index 0000000..e09204b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentNameValidationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentNameValidationResponse + */ +@JsonPropertyOrder({ + ExperimentNameValidationResponse.JSON_PROPERTY_STATUS, + ExperimentNameValidationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentNameValidationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentNameValidationResult result; + + public ExperimentNameValidationResponse() { + } + + public ExperimentNameValidationResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentNameValidationResponse result(@javax.annotation.Nonnull ExperimentNameValidationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentNameValidationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentNameValidationResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentNameValidationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentNameValidationResponse experimentNameValidationResponse = (ExperimentNameValidationResponse) o; + return Objects.equals(this.status, experimentNameValidationResponse.status) && + Objects.equals(this.result, experimentNameValidationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentNameValidationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResult.java new file mode 100644 index 0000000..d96a34f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentNameValidationResult.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentNameValidationResult + */ +@JsonPropertyOrder({ + ExperimentNameValidationResult.JSON_PROPERTY_IS_VALID, + ExperimentNameValidationResult.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentNameValidationResult { + public static final String JSON_PROPERTY_IS_VALID = "is_valid"; + @javax.annotation.Nonnull + private Boolean isValid; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public ExperimentNameValidationResult() { + } + + public ExperimentNameValidationResult isValid(@javax.annotation.Nonnull Boolean isValid) { + this.isValid = isValid; + return this; + } + + /** + * Get isValid + * @return isValid + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_VALID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsValid() { + return isValid; + } + + + @JsonProperty(JSON_PROPERTY_IS_VALID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsValid(@javax.annotation.Nonnull Boolean isValid) { + this.isValid = isValid; + } + + + public ExperimentNameValidationResult message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + /** + * Return true if this ExperimentNameValidationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentNameValidationResult experimentNameValidationResult = (ExperimentNameValidationResult) o; + return Objects.equals(this.isValid, experimentNameValidationResult.isValid) && + Objects.equals(this.message, experimentNameValidationResult.message); + } + + @Override + public int hashCode() { + return Objects.hash(isValid, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentNameValidationResult {\n"); + sb.append(" isValid: ").append(toIndentedString(isValid)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `is_valid` to the URL query string + if (getIsValid() != null) { + joiner.add(String.format("%sis_valid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsValid())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunCells.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunCells.java new file mode 100644 index 0000000..de2c7f0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunCells.java @@ -0,0 +1,304 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RerunCellEntry; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentRerunCells + */ +@JsonPropertyOrder({ + ExperimentRerunCells.JSON_PROPERTY_SOURCE_IDS, + ExperimentRerunCells.JSON_PROPERTY_CELLS, + ExperimentRerunCells.JSON_PROPERTY_USER_EVAL_METRIC_IDS, + ExperimentRerunCells.JSON_PROPERTY_FAILED_ONLY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentRerunCells { + public static final String JSON_PROPERTY_SOURCE_IDS = "source_ids"; + @javax.annotation.Nullable + private List sourceIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_CELLS = "cells"; + @javax.annotation.Nullable + private List cells = new ArrayList<>(); + + public static final String JSON_PROPERTY_USER_EVAL_METRIC_IDS = "user_eval_metric_ids"; + @javax.annotation.Nullable + private List userEvalMetricIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_FAILED_ONLY = "failed_only"; + @javax.annotation.Nullable + private Boolean failedOnly = false; + + public ExperimentRerunCells() { + } + + public ExperimentRerunCells sourceIds(@javax.annotation.Nullable List sourceIds) { + this.sourceIds = sourceIds; + return this; + } + + public ExperimentRerunCells addSourceIdsItem(UUID sourceIdsItem) { + if (this.sourceIds == null) { + this.sourceIds = new ArrayList<>(); + } + this.sourceIds.add(sourceIdsItem); + return this; + } + + /** + * Get sourceIds + * @return sourceIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSourceIds() { + return sourceIds; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceIds(@javax.annotation.Nullable List sourceIds) { + this.sourceIds = sourceIds; + } + + + public ExperimentRerunCells cells(@javax.annotation.Nullable List cells) { + this.cells = cells; + return this; + } + + public ExperimentRerunCells addCellsItem(RerunCellEntry cellsItem) { + if (this.cells == null) { + this.cells = new ArrayList<>(); + } + this.cells.add(cellsItem); + return this; + } + + /** + * Get cells + * @return cells + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCells() { + return cells; + } + + + @JsonProperty(JSON_PROPERTY_CELLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCells(@javax.annotation.Nullable List cells) { + this.cells = cells; + } + + + public ExperimentRerunCells userEvalMetricIds(@javax.annotation.Nullable List userEvalMetricIds) { + this.userEvalMetricIds = userEvalMetricIds; + return this; + } + + public ExperimentRerunCells addUserEvalMetricIdsItem(UUID userEvalMetricIdsItem) { + if (this.userEvalMetricIds == null) { + this.userEvalMetricIds = new ArrayList<>(); + } + this.userEvalMetricIds.add(userEvalMetricIdsItem); + return this; + } + + /** + * Get userEvalMetricIds + * @return userEvalMetricIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUserEvalMetricIds() { + return userEvalMetricIds; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserEvalMetricIds(@javax.annotation.Nullable List userEvalMetricIds) { + this.userEvalMetricIds = userEvalMetricIds; + } + + + public ExperimentRerunCells failedOnly(@javax.annotation.Nullable Boolean failedOnly) { + this.failedOnly = failedOnly; + return this; + } + + /** + * Get failedOnly + * @return failedOnly + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_ONLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFailedOnly() { + return failedOnly; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_ONLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailedOnly(@javax.annotation.Nullable Boolean failedOnly) { + this.failedOnly = failedOnly; + } + + + /** + * Return true if this ExperimentRerunCells object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentRerunCells experimentRerunCells = (ExperimentRerunCells) o; + return Objects.equals(this.sourceIds, experimentRerunCells.sourceIds) && + Objects.equals(this.cells, experimentRerunCells.cells) && + Objects.equals(this.userEvalMetricIds, experimentRerunCells.userEvalMetricIds) && + Objects.equals(this.failedOnly, experimentRerunCells.failedOnly); + } + + @Override + public int hashCode() { + return Objects.hash(sourceIds, cells, userEvalMetricIds, failedOnly); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentRerunCells {\n"); + sb.append(" sourceIds: ").append(toIndentedString(sourceIds)).append("\n"); + sb.append(" cells: ").append(toIndentedString(cells)).append("\n"); + sb.append(" userEvalMetricIds: ").append(toIndentedString(userEvalMetricIds)).append("\n"); + sb.append(" failedOnly: ").append(toIndentedString(failedOnly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `source_ids` to the URL query string + if (getSourceIds() != null) { + for (int i = 0; i < getSourceIds().size(); i++) { + if (getSourceIds().get(i) != null) { + joiner.add(String.format("%ssource_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSourceIds().get(i))))); + } + } + } + + // add `cells` to the URL query string + if (getCells() != null) { + for (int i = 0; i < getCells().size(); i++) { + if (getCells().get(i) != null) { + joiner.add(getCells().get(i).toUrlQueryString(String.format("%scells%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `user_eval_metric_ids` to the URL query string + if (getUserEvalMetricIds() != null) { + for (int i = 0; i < getUserEvalMetricIds().size(); i++) { + if (getUserEvalMetricIds().get(i) != null) { + joiner.add(String.format("%suser_eval_metric_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getUserEvalMetricIds().get(i))))); + } + } + } + + // add `failed_only` to the URL query string + if (getFailedOnly() != null) { + joiner.add(String.format("%sfailed_only%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedOnly())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunRequest.java new file mode 100644 index 0000000..b6fa7be --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRerunRequest.java @@ -0,0 +1,241 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentRerunRequest + */ +@JsonPropertyOrder({ + ExperimentRerunRequest.JSON_PROPERTY_EXPERIMENT_IDS, + ExperimentRerunRequest.JSON_PROPERTY_USE_TEMPORAL, + ExperimentRerunRequest.JSON_PROPERTY_MAX_CONCURRENT_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentRerunRequest { + public static final String JSON_PROPERTY_EXPERIMENT_IDS = "experiment_ids"; + @javax.annotation.Nonnull + private List experimentIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_USE_TEMPORAL = "use_temporal"; + @javax.annotation.Nullable + private Boolean useTemporal = true; + + public static final String JSON_PROPERTY_MAX_CONCURRENT_ROWS = "max_concurrent_rows"; + @javax.annotation.Nullable + private Integer maxConcurrentRows; + + public ExperimentRerunRequest() { + } + + public ExperimentRerunRequest experimentIds(@javax.annotation.Nonnull List experimentIds) { + this.experimentIds = experimentIds; + return this; + } + + public ExperimentRerunRequest addExperimentIdsItem(UUID experimentIdsItem) { + if (this.experimentIds == null) { + this.experimentIds = new ArrayList<>(); + } + this.experimentIds.add(experimentIdsItem); + return this; + } + + /** + * Get experimentIds + * @return experimentIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getExperimentIds() { + return experimentIds; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentIds(@javax.annotation.Nonnull List experimentIds) { + this.experimentIds = experimentIds; + } + + + public ExperimentRerunRequest useTemporal(@javax.annotation.Nullable Boolean useTemporal) { + this.useTemporal = useTemporal; + return this; + } + + /** + * Get useTemporal + * @return useTemporal + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_TEMPORAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseTemporal() { + return useTemporal; + } + + + @JsonProperty(JSON_PROPERTY_USE_TEMPORAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseTemporal(@javax.annotation.Nullable Boolean useTemporal) { + this.useTemporal = useTemporal; + } + + + public ExperimentRerunRequest maxConcurrentRows(@javax.annotation.Nullable Integer maxConcurrentRows) { + this.maxConcurrentRows = maxConcurrentRows; + return this; + } + + /** + * Get maxConcurrentRows + * minimum: 1 + * @return maxConcurrentRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_CONCURRENT_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxConcurrentRows() { + return maxConcurrentRows; + } + + + @JsonProperty(JSON_PROPERTY_MAX_CONCURRENT_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxConcurrentRows(@javax.annotation.Nullable Integer maxConcurrentRows) { + this.maxConcurrentRows = maxConcurrentRows; + } + + + /** + * Return true if this ExperimentRerunRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentRerunRequest experimentRerunRequest = (ExperimentRerunRequest) o; + return Objects.equals(this.experimentIds, experimentRerunRequest.experimentIds) && + Objects.equals(this.useTemporal, experimentRerunRequest.useTemporal) && + Objects.equals(this.maxConcurrentRows, experimentRerunRequest.maxConcurrentRows); + } + + @Override + public int hashCode() { + return Objects.hash(experimentIds, useTemporal, maxConcurrentRows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentRerunRequest {\n"); + sb.append(" experimentIds: ").append(toIndentedString(experimentIds)).append("\n"); + sb.append(" useTemporal: ").append(toIndentedString(useTemporal)).append("\n"); + sb.append(" maxConcurrentRows: ").append(toIndentedString(maxConcurrentRows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `experiment_ids` to the URL query string + if (getExperimentIds() != null) { + for (int i = 0; i < getExperimentIds().size(); i++) { + if (getExperimentIds().get(i) != null) { + joiner.add(String.format("%sexperiment_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getExperimentIds().get(i))))); + } + } + } + + // add `use_temporal` to the URL query string + if (getUseTemporal() != null) { + joiner.add(String.format("%suse_temporal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUseTemporal())))); + } + + // add `max_concurrent_rows` to the URL query string + if (getMaxConcurrentRows() != null) { + joiner.add(String.format("%smax_concurrent_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxConcurrentRows())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffCell.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffCell.java new file mode 100644 index 0000000..aadf349 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffCell.java @@ -0,0 +1,297 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentRowDiffCell + */ +@JsonPropertyOrder({ + ExperimentRowDiffCell.JSON_PROPERTY_CELL_VALUE, + ExperimentRowDiffCell.JSON_PROPERTY_CELL_DIFF_VALUE, + ExperimentRowDiffCell.JSON_PROPERTY_STATUS, + ExperimentRowDiffCell.JSON_PROPERTY_VALUE_INFOS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentRowDiffCell { + public static final String JSON_PROPERTY_CELL_VALUE = "cell_value"; + @javax.annotation.Nullable + private Map cellValue = new HashMap<>(); + + public static final String JSON_PROPERTY_CELL_DIFF_VALUE = "cell_diff_value"; + @javax.annotation.Nullable + private Map cellDiffValue = new HashMap<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_VALUE_INFOS = "value_infos"; + @javax.annotation.Nullable + private Map valueInfos = new HashMap<>(); + + public ExperimentRowDiffCell() { + } + + public ExperimentRowDiffCell cellValue(@javax.annotation.Nullable Map cellValue) { + this.cellValue = cellValue; + return this; + } + + public ExperimentRowDiffCell putCellValueItem(String key, Object cellValueItem) { + if (this.cellValue == null) { + this.cellValue = new HashMap<>(); + } + this.cellValue.put(key, cellValueItem); + return this; + } + + /** + * Get cellValue + * @return cellValue + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELL_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCellValue() { + return cellValue; + } + + + @JsonProperty(JSON_PROPERTY_CELL_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCellValue(@javax.annotation.Nullable Map cellValue) { + this.cellValue = cellValue; + } + + + public ExperimentRowDiffCell cellDiffValue(@javax.annotation.Nullable Map cellDiffValue) { + this.cellDiffValue = cellDiffValue; + return this; + } + + public ExperimentRowDiffCell putCellDiffValueItem(String key, Object cellDiffValueItem) { + if (this.cellDiffValue == null) { + this.cellDiffValue = new HashMap<>(); + } + this.cellDiffValue.put(key, cellDiffValueItem); + return this; + } + + /** + * Get cellDiffValue + * @return cellDiffValue + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELL_DIFF_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCellDiffValue() { + return cellDiffValue; + } + + + @JsonProperty(JSON_PROPERTY_CELL_DIFF_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCellDiffValue(@javax.annotation.Nullable Map cellDiffValue) { + this.cellDiffValue = cellDiffValue; + } + + + public ExperimentRowDiffCell status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public ExperimentRowDiffCell valueInfos(@javax.annotation.Nullable Map valueInfos) { + this.valueInfos = valueInfos; + return this; + } + + public ExperimentRowDiffCell putValueInfosItem(String key, Object valueInfosItem) { + if (this.valueInfos == null) { + this.valueInfos = new HashMap<>(); + } + this.valueInfos.put(key, valueInfosItem); + return this; + } + + /** + * Get valueInfos + * @return valueInfos + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE_INFOS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getValueInfos() { + return valueInfos; + } + + + @JsonProperty(JSON_PROPERTY_VALUE_INFOS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setValueInfos(@javax.annotation.Nullable Map valueInfos) { + this.valueInfos = valueInfos; + } + + + /** + * Return true if this ExperimentRowDiffCell object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentRowDiffCell experimentRowDiffCell = (ExperimentRowDiffCell) o; + return Objects.equals(this.cellValue, experimentRowDiffCell.cellValue) && + Objects.equals(this.cellDiffValue, experimentRowDiffCell.cellDiffValue) && + Objects.equals(this.status, experimentRowDiffCell.status) && + Objects.equals(this.valueInfos, experimentRowDiffCell.valueInfos); + } + + @Override + public int hashCode() { + return Objects.hash(cellValue, cellDiffValue, status, valueInfos); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentRowDiffCell {\n"); + sb.append(" cellValue: ").append(toIndentedString(cellValue)).append("\n"); + sb.append(" cellDiffValue: ").append(toIndentedString(cellDiffValue)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" valueInfos: ").append(toIndentedString(valueInfos)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `cell_value` to the URL query string + if (getCellValue() != null) { + for (String _key : getCellValue().keySet()) { + joiner.add(String.format("%scell_value%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCellValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCellValue().get(_key))))); + } + } + + // add `cell_diff_value` to the URL query string + if (getCellDiffValue() != null) { + for (String _key : getCellDiffValue().keySet()) { + joiner.add(String.format("%scell_diff_value%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCellDiffValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCellDiffValue().get(_key))))); + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `value_infos` to the URL query string + if (getValueInfos() != null) { + for (String _key : getValueInfos().keySet()) { + joiner.add(String.format("%svalue_infos%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValueInfos().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValueInfos().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffResponse.java new file mode 100644 index 0000000..937c116 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentRowDiffResponse.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentRowDiffCell; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentRowDiffResponse + */ +@JsonPropertyOrder({ + ExperimentRowDiffResponse.JSON_PROPERTY_STATUS, + ExperimentRowDiffResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentRowDiffResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map> result = new HashMap<>(); + + public ExperimentRowDiffResponse() { + } + + public ExperimentRowDiffResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentRowDiffResponse result(@javax.annotation.Nonnull Map> result) { + this.result = result; + return this; + } + + public ExperimentRowDiffResponse putResultItem(String key, Map resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map> result) { + this.result = result; + } + + + /** + * Return true if this ExperimentRowDiffResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentRowDiffResponse experimentRowDiffResponse = (ExperimentRowDiffResponse) o; + return Objects.equals(this.status, experimentRowDiffResponse.status) && + Objects.equals(this.result, experimentRowDiffResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentRowDiffResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + joiner.add(String.format("%sresult%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResult().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsColumnConfig.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsColumnConfig.java new file mode 100644 index 0000000..8db3fe7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsColumnConfig.java @@ -0,0 +1,324 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStatsColumnConfig + */ +@JsonPropertyOrder({ + ExperimentStatsColumnConfig.JSON_PROPERTY_STATUS, + ExperimentStatsColumnConfig.JSON_PROPERTY_NAME, + ExperimentStatsColumnConfig.JSON_PROPERTY_REVERSE_OUTPUT, + ExperimentStatsColumnConfig.JSON_PROPERTY_OUTPUT_TYPE, + ExperimentStatsColumnConfig.JSON_PROPERTY_EVAL_TEMPLATE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStatsColumnConfig { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_REVERSE_OUTPUT = "reverse_output"; + @javax.annotation.Nullable + private Boolean reverseOutput; + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + private JsonNullable outputType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_TEMPLATE_ID = "eval_template_id"; + private JsonNullable evalTemplateId = JsonNullable.undefined(); + + public ExperimentStatsColumnConfig() { + } + + public ExperimentStatsColumnConfig status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public ExperimentStatsColumnConfig name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ExperimentStatsColumnConfig reverseOutput(@javax.annotation.Nullable Boolean reverseOutput) { + this.reverseOutput = reverseOutput; + return this; + } + + /** + * Get reverseOutput + * @return reverseOutput + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVERSE_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getReverseOutput() { + return reverseOutput; + } + + + @JsonProperty(JSON_PROPERTY_REVERSE_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReverseOutput(@javax.annotation.Nullable Boolean reverseOutput) { + this.reverseOutput = reverseOutput; + } + + + public ExperimentStatsColumnConfig outputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getOutputType() { + return outputType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutputType_JsonNullable() { + return outputType; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + public void setOutputType_JsonNullable(JsonNullable outputType) { + this.outputType = outputType; + } + + public void setOutputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + } + + + public ExperimentStatsColumnConfig evalTemplateId(@javax.annotation.Nullable String evalTemplateId) { + this.evalTemplateId = JsonNullable.of(evalTemplateId); + return this; + } + + /** + * Get evalTemplateId + * @return evalTemplateId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalTemplateId() { + return evalTemplateId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalTemplateId_JsonNullable() { + return evalTemplateId; + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + public void setEvalTemplateId_JsonNullable(JsonNullable evalTemplateId) { + this.evalTemplateId = evalTemplateId; + } + + public void setEvalTemplateId(@javax.annotation.Nullable String evalTemplateId) { + this.evalTemplateId = JsonNullable.of(evalTemplateId); + } + + + /** + * Return true if this ExperimentStatsColumnConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStatsColumnConfig experimentStatsColumnConfig = (ExperimentStatsColumnConfig) o; + return Objects.equals(this.status, experimentStatsColumnConfig.status) && + Objects.equals(this.name, experimentStatsColumnConfig.name) && + Objects.equals(this.reverseOutput, experimentStatsColumnConfig.reverseOutput) && + equalsNullable(this.outputType, experimentStatsColumnConfig.outputType) && + equalsNullable(this.evalTemplateId, experimentStatsColumnConfig.evalTemplateId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, name, reverseOutput, hashCodeNullable(outputType), hashCodeNullable(evalTemplateId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStatsColumnConfig {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" reverseOutput: ").append(toIndentedString(reverseOutput)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" evalTemplateId: ").append(toIndentedString(evalTemplateId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `reverse_output` to the URL query string + if (getReverseOutput() != null) { + joiner.add(String.format("%sreverse_output%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReverseOutput())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `eval_template_id` to the URL query string + if (getEvalTemplateId() != null) { + joiner.add(String.format("%seval_template_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplateId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsMetadata.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsMetadata.java new file mode 100644 index 0000000..c69e369 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsMetadata.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStatsMetadata + */ +@JsonPropertyOrder({ + ExperimentStatsMetadata.JSON_PROPERTY_IS_WINNER_CHOSEN +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStatsMetadata { + public static final String JSON_PROPERTY_IS_WINNER_CHOSEN = "is_winner_chosen"; + @javax.annotation.Nonnull + private Boolean isWinnerChosen; + + public ExperimentStatsMetadata() { + } + + public ExperimentStatsMetadata isWinnerChosen(@javax.annotation.Nonnull Boolean isWinnerChosen) { + this.isWinnerChosen = isWinnerChosen; + return this; + } + + /** + * Get isWinnerChosen + * @return isWinnerChosen + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_WINNER_CHOSEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsWinnerChosen() { + return isWinnerChosen; + } + + + @JsonProperty(JSON_PROPERTY_IS_WINNER_CHOSEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsWinnerChosen(@javax.annotation.Nonnull Boolean isWinnerChosen) { + this.isWinnerChosen = isWinnerChosen; + } + + + /** + * Return true if this ExperimentStatsMetadata object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStatsMetadata experimentStatsMetadata = (ExperimentStatsMetadata) o; + return Objects.equals(this.isWinnerChosen, experimentStatsMetadata.isWinnerChosen); + } + + @Override + public int hashCode() { + return Objects.hash(isWinnerChosen); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStatsMetadata {\n"); + sb.append(" isWinnerChosen: ").append(toIndentedString(isWinnerChosen)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `is_winner_chosen` to the URL query string + if (getIsWinnerChosen() != null) { + joiner.add(String.format("%sis_winner_chosen%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsWinnerChosen())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResponse.java new file mode 100644 index 0000000..56c203e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentStatsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStatsResponse + */ +@JsonPropertyOrder({ + ExperimentStatsResponse.JSON_PROPERTY_STATUS, + ExperimentStatsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStatsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentStatsResult result; + + public ExperimentStatsResponse() { + } + + public ExperimentStatsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentStatsResponse result(@javax.annotation.Nonnull ExperimentStatsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentStatsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentStatsResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentStatsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStatsResponse experimentStatsResponse = (ExperimentStatsResponse) o; + return Objects.equals(this.status, experimentStatsResponse.status) && + Objects.equals(this.result, experimentStatsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStatsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResult.java new file mode 100644 index 0000000..41fe598 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStatsResult.java @@ -0,0 +1,253 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentStatsColumnConfig; +import com.futureagi.sdk.model.ExperimentStatsMetadata; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStatsResult + */ +@JsonPropertyOrder({ + ExperimentStatsResult.JSON_PROPERTY_COLUMN_CONFIG, + ExperimentStatsResult.JSON_PROPERTY_TABLE_DATA, + ExperimentStatsResult.JSON_PROPERTY_METADATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStatsResult { + public static final String JSON_PROPERTY_COLUMN_CONFIG = "column_config"; + @javax.annotation.Nonnull + private List columnConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE_DATA = "table_data"; + @javax.annotation.Nonnull + private List> tableData = new ArrayList<>(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nonnull + private ExperimentStatsMetadata metadata; + + public ExperimentStatsResult() { + } + + public ExperimentStatsResult columnConfig(@javax.annotation.Nonnull List columnConfig) { + this.columnConfig = columnConfig; + return this; + } + + public ExperimentStatsResult addColumnConfigItem(ExperimentStatsColumnConfig columnConfigItem) { + if (this.columnConfig == null) { + this.columnConfig = new ArrayList<>(); + } + this.columnConfig.add(columnConfigItem); + return this; + } + + /** + * Get columnConfig + * @return columnConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumnConfig() { + return columnConfig; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnConfig(@javax.annotation.Nonnull List columnConfig) { + this.columnConfig = columnConfig; + } + + + public ExperimentStatsResult tableData(@javax.annotation.Nonnull List> tableData) { + this.tableData = tableData; + return this; + } + + public ExperimentStatsResult addTableDataItem(Map tableDataItem) { + if (this.tableData == null) { + this.tableData = new ArrayList<>(); + } + this.tableData.add(tableDataItem); + return this; + } + + /** + * Get tableData + * @return tableData + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getTableData() { + return tableData; + } + + + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTableData(@javax.annotation.Nonnull List> tableData) { + this.tableData = tableData; + } + + + public ExperimentStatsResult metadata(@javax.annotation.Nonnull ExperimentStatsMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentStatsMetadata getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetadata(@javax.annotation.Nonnull ExperimentStatsMetadata metadata) { + this.metadata = metadata; + } + + + /** + * Return true if this ExperimentStatsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStatsResult experimentStatsResult = (ExperimentStatsResult) o; + return Objects.equals(this.columnConfig, experimentStatsResult.columnConfig) && + Objects.equals(this.tableData, experimentStatsResult.tableData) && + Objects.equals(this.metadata, experimentStatsResult.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(columnConfig, tableData, metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStatsResult {\n"); + sb.append(" columnConfig: ").append(toIndentedString(columnConfig)).append("\n"); + sb.append(" tableData: ").append(toIndentedString(tableData)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_config` to the URL query string + if (getColumnConfig() != null) { + for (int i = 0; i < getColumnConfig().size(); i++) { + if (getColumnConfig().get(i) != null) { + joiner.add(getColumnConfig().get(i).toUrlQueryString(String.format("%scolumn_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `table_data` to the URL query string + if (getTableData() != null) { + for (int i = 0; i < getTableData().size(); i++) { + joiner.add(String.format("%stable_data%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTableData().get(i))))); + } + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResponse.java new file mode 100644 index 0000000..108eef4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentStopResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStopResponse + */ +@JsonPropertyOrder({ + ExperimentStopResponse.JSON_PROPERTY_STATUS, + ExperimentStopResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStopResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentStopResult result; + + public ExperimentStopResponse() { + } + + public ExperimentStopResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentStopResponse result(@javax.annotation.Nonnull ExperimentStopResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentStopResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentStopResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentStopResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStopResponse experimentStopResponse = (ExperimentStopResponse) o; + return Objects.equals(this.status, experimentStopResponse.status) && + Objects.equals(this.result, experimentStopResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStopResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResult.java new file mode 100644 index 0000000..31ec2db --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopResult.java @@ -0,0 +1,225 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentStopWorkflowsCancelled; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStopResult + */ +@JsonPropertyOrder({ + ExperimentStopResult.JSON_PROPERTY_MESSAGE, + ExperimentStopResult.JSON_PROPERTY_EXPERIMENT_ID, + ExperimentStopResult.JSON_PROPERTY_WORKFLOWS_CANCELLED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStopResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nonnull + private UUID experimentId; + + public static final String JSON_PROPERTY_WORKFLOWS_CANCELLED = "workflows_cancelled"; + @javax.annotation.Nonnull + private ExperimentStopWorkflowsCancelled workflowsCancelled; + + public ExperimentStopResult() { + } + + public ExperimentStopResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public ExperimentStopResult experimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExperimentId(@javax.annotation.Nonnull UUID experimentId) { + this.experimentId = experimentId; + } + + + public ExperimentStopResult workflowsCancelled(@javax.annotation.Nonnull ExperimentStopWorkflowsCancelled workflowsCancelled) { + this.workflowsCancelled = workflowsCancelled; + return this; + } + + /** + * Get workflowsCancelled + * @return workflowsCancelled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKFLOWS_CANCELLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentStopWorkflowsCancelled getWorkflowsCancelled() { + return workflowsCancelled; + } + + + @JsonProperty(JSON_PROPERTY_WORKFLOWS_CANCELLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkflowsCancelled(@javax.annotation.Nonnull ExperimentStopWorkflowsCancelled workflowsCancelled) { + this.workflowsCancelled = workflowsCancelled; + } + + + /** + * Return true if this ExperimentStopResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStopResult experimentStopResult = (ExperimentStopResult) o; + return Objects.equals(this.message, experimentStopResult.message) && + Objects.equals(this.experimentId, experimentStopResult.experimentId) && + Objects.equals(this.workflowsCancelled, experimentStopResult.workflowsCancelled); + } + + @Override + public int hashCode() { + return Objects.hash(message, experimentId, workflowsCancelled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStopResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" workflowsCancelled: ").append(toIndentedString(workflowsCancelled)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `workflows_cancelled` to the URL query string + if (getWorkflowsCancelled() != null) { + joiner.add(getWorkflowsCancelled().toUrlQueryString(prefix + "workflows_cancelled" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopWorkflowsCancelled.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopWorkflowsCancelled.java new file mode 100644 index 0000000..fd990f2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStopWorkflowsCancelled.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStopWorkflowsCancelled + */ +@JsonPropertyOrder({ + ExperimentStopWorkflowsCancelled.JSON_PROPERTY_MAIN, + ExperimentStopWorkflowsCancelled.JSON_PROPERTY_RERUNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStopWorkflowsCancelled { + public static final String JSON_PROPERTY_MAIN = "main"; + @javax.annotation.Nonnull + private Boolean main; + + public static final String JSON_PROPERTY_RERUNS = "reruns"; + @javax.annotation.Nonnull + private Boolean reruns; + + public ExperimentStopWorkflowsCancelled() { + } + + public ExperimentStopWorkflowsCancelled main(@javax.annotation.Nonnull Boolean main) { + this.main = main; + return this; + } + + /** + * Get main + * @return main + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getMain() { + return main; + } + + + @JsonProperty(JSON_PROPERTY_MAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMain(@javax.annotation.Nonnull Boolean main) { + this.main = main; + } + + + public ExperimentStopWorkflowsCancelled reruns(@javax.annotation.Nonnull Boolean reruns) { + this.reruns = reruns; + return this; + } + + /** + * Get reruns + * @return reruns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RERUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getReruns() { + return reruns; + } + + + @JsonProperty(JSON_PROPERTY_RERUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReruns(@javax.annotation.Nonnull Boolean reruns) { + this.reruns = reruns; + } + + + /** + * Return true if this ExperimentStopWorkflowsCancelled object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStopWorkflowsCancelled experimentStopWorkflowsCancelled = (ExperimentStopWorkflowsCancelled) o; + return Objects.equals(this.main, experimentStopWorkflowsCancelled.main) && + Objects.equals(this.reruns, experimentStopWorkflowsCancelled.reruns); + } + + @Override + public int hashCode() { + return Objects.hash(main, reruns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStopWorkflowsCancelled {\n"); + sb.append(" main: ").append(toIndentedString(main)).append("\n"); + sb.append(" reruns: ").append(toIndentedString(reruns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `main` to the URL query string + if (getMain() != null) { + joiner.add(String.format("%smain%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMain())))); + } + + // add `reruns` to the URL query string + if (getReruns() != null) { + joiner.add(String.format("%sreruns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReruns())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStringResultResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStringResultResponse.java new file mode 100644 index 0000000..32abcbf --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentStringResultResponse.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentStringResultResponse + */ +@JsonPropertyOrder({ + ExperimentStringResultResponse.JSON_PROPERTY_STATUS, + ExperimentStringResultResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentStringResultResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private String result; + + public ExperimentStringResultResponse() { + } + + public ExperimentStringResultResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentStringResultResponse result(@javax.annotation.Nonnull String result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull String result) { + this.result = result; + } + + + /** + * Return true if this ExperimentStringResultResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentStringResultResponse experimentStringResultResponse = (ExperimentStringResultResponse) o; + return Objects.equals(this.status, experimentStringResultResponse.status) && + Objects.equals(this.result, experimentStringResultResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentStringResultResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsColumnConfig.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsColumnConfig.java new file mode 100644 index 0000000..d24eafb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsColumnConfig.java @@ -0,0 +1,722 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentTableRowsColumnConfig + */ +@JsonPropertyOrder({ + ExperimentTableRowsColumnConfig.JSON_PROPERTY_ID, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_NAME, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_ORIGIN_TYPE, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_DATA_TYPE, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_STATUS, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_GROUP, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_AVERAGE_SCORE, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_DATASET_ID, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_CHOICES_MAP, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_IS_BASE_COLUMN, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_OUTPUT_TYPE, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_EVAL_TEMPLATE_ID, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_SOURCE_ID, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_IS_AGENT, + ExperimentTableRowsColumnConfig.JSON_PROPERTY_IS_FINAL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentTableRowsColumnConfig { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ORIGIN_TYPE = "origin_type"; + @javax.annotation.Nullable + private String originType; + + public static final String JSON_PROPERTY_DATA_TYPE = "data_type"; + @javax.annotation.Nullable + private String dataType; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_GROUP = "group"; + @javax.annotation.Nullable + private Map group = new HashMap<>(); + + public static final String JSON_PROPERTY_AVERAGE_SCORE = "average_score"; + @javax.annotation.Nullable + private Map averageScore = new HashMap<>(); + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private String datasetId; + + public static final String JSON_PROPERTY_CHOICES_MAP = "choices_map"; + @javax.annotation.Nullable + private Map choicesMap = new HashMap<>(); + + public static final String JSON_PROPERTY_IS_BASE_COLUMN = "is_base_column"; + @javax.annotation.Nullable + private Boolean isBaseColumn; + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + private JsonNullable outputType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_TEMPLATE_ID = "eval_template_id"; + private JsonNullable evalTemplateId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nullable + private String sourceId; + + public static final String JSON_PROPERTY_IS_AGENT = "is_agent"; + @javax.annotation.Nullable + private Boolean isAgent; + + public static final String JSON_PROPERTY_IS_FINAL = "is_final"; + @javax.annotation.Nullable + private Boolean isFinal; + + public ExperimentTableRowsColumnConfig() { + } + + public ExperimentTableRowsColumnConfig id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ExperimentTableRowsColumnConfig name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ExperimentTableRowsColumnConfig originType(@javax.annotation.Nullable String originType) { + this.originType = originType; + return this; + } + + /** + * Get originType + * @return originType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGIN_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOriginType() { + return originType; + } + + + @JsonProperty(JSON_PROPERTY_ORIGIN_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginType(@javax.annotation.Nullable String originType) { + this.originType = originType; + } + + + public ExperimentTableRowsColumnConfig dataType(@javax.annotation.Nullable String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get dataType + * @return dataType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDataType() { + return dataType; + } + + + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDataType(@javax.annotation.Nullable String dataType) { + this.dataType = dataType; + } + + + public ExperimentTableRowsColumnConfig status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public ExperimentTableRowsColumnConfig group(@javax.annotation.Nullable Map group) { + this.group = group; + return this; + } + + public ExperimentTableRowsColumnConfig putGroupItem(String key, Object groupItem) { + if (this.group == null) { + this.group = new HashMap<>(); + } + this.group.put(key, groupItem); + return this; + } + + /** + * Get group + * @return group + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(@javax.annotation.Nullable Map group) { + this.group = group; + } + + + public ExperimentTableRowsColumnConfig averageScore(@javax.annotation.Nullable Map averageScore) { + this.averageScore = averageScore; + return this; + } + + public ExperimentTableRowsColumnConfig putAverageScoreItem(String key, Object averageScoreItem) { + if (this.averageScore == null) { + this.averageScore = new HashMap<>(); + } + this.averageScore.put(key, averageScoreItem); + return this; + } + + /** + * Get averageScore + * @return averageScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVERAGE_SCORE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAverageScore() { + return averageScore; + } + + + @JsonProperty(JSON_PROPERTY_AVERAGE_SCORE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setAverageScore(@javax.annotation.Nullable Map averageScore) { + this.averageScore = averageScore; + } + + + public ExperimentTableRowsColumnConfig datasetId(@javax.annotation.Nullable String datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetId(@javax.annotation.Nullable String datasetId) { + this.datasetId = datasetId; + } + + + public ExperimentTableRowsColumnConfig choicesMap(@javax.annotation.Nullable Map choicesMap) { + this.choicesMap = choicesMap; + return this; + } + + public ExperimentTableRowsColumnConfig putChoicesMapItem(String key, Object choicesMapItem) { + if (this.choicesMap == null) { + this.choicesMap = new HashMap<>(); + } + this.choicesMap.put(key, choicesMapItem); + return this; + } + + /** + * Get choicesMap + * @return choicesMap + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICES_MAP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChoicesMap() { + return choicesMap; + } + + + @JsonProperty(JSON_PROPERTY_CHOICES_MAP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChoicesMap(@javax.annotation.Nullable Map choicesMap) { + this.choicesMap = choicesMap; + } + + + public ExperimentTableRowsColumnConfig isBaseColumn(@javax.annotation.Nullable Boolean isBaseColumn) { + this.isBaseColumn = isBaseColumn; + return this; + } + + /** + * Get isBaseColumn + * @return isBaseColumn + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_BASE_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsBaseColumn() { + return isBaseColumn; + } + + + @JsonProperty(JSON_PROPERTY_IS_BASE_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsBaseColumn(@javax.annotation.Nullable Boolean isBaseColumn) { + this.isBaseColumn = isBaseColumn; + } + + + public ExperimentTableRowsColumnConfig outputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getOutputType() { + return outputType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutputType_JsonNullable() { + return outputType; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + public void setOutputType_JsonNullable(JsonNullable outputType) { + this.outputType = outputType; + } + + public void setOutputType(@javax.annotation.Nullable String outputType) { + this.outputType = JsonNullable.of(outputType); + } + + + public ExperimentTableRowsColumnConfig evalTemplateId(@javax.annotation.Nullable String evalTemplateId) { + this.evalTemplateId = JsonNullable.of(evalTemplateId); + return this; + } + + /** + * Get evalTemplateId + * @return evalTemplateId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalTemplateId() { + return evalTemplateId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalTemplateId_JsonNullable() { + return evalTemplateId; + } + + @JsonProperty(JSON_PROPERTY_EVAL_TEMPLATE_ID) + public void setEvalTemplateId_JsonNullable(JsonNullable evalTemplateId) { + this.evalTemplateId = evalTemplateId; + } + + public void setEvalTemplateId(@javax.annotation.Nullable String evalTemplateId) { + this.evalTemplateId = JsonNullable.of(evalTemplateId); + } + + + public ExperimentTableRowsColumnConfig sourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = sourceId; + } + + + public ExperimentTableRowsColumnConfig isAgent(@javax.annotation.Nullable Boolean isAgent) { + this.isAgent = isAgent; + return this; + } + + /** + * Get isAgent + * @return isAgent + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsAgent() { + return isAgent; + } + + + @JsonProperty(JSON_PROPERTY_IS_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsAgent(@javax.annotation.Nullable Boolean isAgent) { + this.isAgent = isAgent; + } + + + public ExperimentTableRowsColumnConfig isFinal(@javax.annotation.Nullable Boolean isFinal) { + this.isFinal = isFinal; + return this; + } + + /** + * Get isFinal + * @return isFinal + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_FINAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsFinal() { + return isFinal; + } + + + @JsonProperty(JSON_PROPERTY_IS_FINAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsFinal(@javax.annotation.Nullable Boolean isFinal) { + this.isFinal = isFinal; + } + + + /** + * Return true if this ExperimentTableRowsColumnConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentTableRowsColumnConfig experimentTableRowsColumnConfig = (ExperimentTableRowsColumnConfig) o; + return Objects.equals(this.id, experimentTableRowsColumnConfig.id) && + Objects.equals(this.name, experimentTableRowsColumnConfig.name) && + Objects.equals(this.originType, experimentTableRowsColumnConfig.originType) && + Objects.equals(this.dataType, experimentTableRowsColumnConfig.dataType) && + Objects.equals(this.status, experimentTableRowsColumnConfig.status) && + Objects.equals(this.group, experimentTableRowsColumnConfig.group) && + Objects.equals(this.averageScore, experimentTableRowsColumnConfig.averageScore) && + Objects.equals(this.datasetId, experimentTableRowsColumnConfig.datasetId) && + Objects.equals(this.choicesMap, experimentTableRowsColumnConfig.choicesMap) && + Objects.equals(this.isBaseColumn, experimentTableRowsColumnConfig.isBaseColumn) && + equalsNullable(this.outputType, experimentTableRowsColumnConfig.outputType) && + equalsNullable(this.evalTemplateId, experimentTableRowsColumnConfig.evalTemplateId) && + Objects.equals(this.sourceId, experimentTableRowsColumnConfig.sourceId) && + Objects.equals(this.isAgent, experimentTableRowsColumnConfig.isAgent) && + Objects.equals(this.isFinal, experimentTableRowsColumnConfig.isFinal); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, originType, dataType, status, group, averageScore, datasetId, choicesMap, isBaseColumn, hashCodeNullable(outputType), hashCodeNullable(evalTemplateId), sourceId, isAgent, isFinal); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentTableRowsColumnConfig {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" originType: ").append(toIndentedString(originType)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); + sb.append(" averageScore: ").append(toIndentedString(averageScore)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" choicesMap: ").append(toIndentedString(choicesMap)).append("\n"); + sb.append(" isBaseColumn: ").append(toIndentedString(isBaseColumn)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" evalTemplateId: ").append(toIndentedString(evalTemplateId)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" isAgent: ").append(toIndentedString(isAgent)).append("\n"); + sb.append(" isFinal: ").append(toIndentedString(isFinal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `origin_type` to the URL query string + if (getOriginType() != null) { + joiner.add(String.format("%sorigin_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOriginType())))); + } + + // add `data_type` to the URL query string + if (getDataType() != null) { + joiner.add(String.format("%sdata_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `group` to the URL query string + if (getGroup() != null) { + for (String _key : getGroup().keySet()) { + joiner.add(String.format("%sgroup%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getGroup().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getGroup().get(_key))))); + } + } + + // add `average_score` to the URL query string + if (getAverageScore() != null) { + for (String _key : getAverageScore().keySet()) { + joiner.add(String.format("%saverage_score%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAverageScore().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAverageScore().get(_key))))); + } + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `choices_map` to the URL query string + if (getChoicesMap() != null) { + for (String _key : getChoicesMap().keySet()) { + joiner.add(String.format("%schoices_map%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChoicesMap().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChoicesMap().get(_key))))); + } + } + + // add `is_base_column` to the URL query string + if (getIsBaseColumn() != null) { + joiner.add(String.format("%sis_base_column%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsBaseColumn())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `eval_template_id` to the URL query string + if (getEvalTemplateId() != null) { + joiner.add(String.format("%seval_template_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalTemplateId())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + // add `is_agent` to the URL query string + if (getIsAgent() != null) { + joiner.add(String.format("%sis_agent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsAgent())))); + } + + // add `is_final` to the URL query string + if (getIsFinal() != null) { + joiner.add(String.format("%sis_final%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsFinal())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsMetadata.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsMetadata.java new file mode 100644 index 0000000..91fd713 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsMetadata.java @@ -0,0 +1,367 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentTableRowsMetadata + */ +@JsonPropertyOrder({ + ExperimentTableRowsMetadata.JSON_PROPERTY_TOTAL_ROWS, + ExperimentTableRowsMetadata.JSON_PROPERTY_DATASET, + ExperimentTableRowsMetadata.JSON_PROPERTY_DATASET_NAME, + ExperimentTableRowsMetadata.JSON_PROPERTY_COLUMN, + ExperimentTableRowsMetadata.JSON_PROPERTY_TOTAL_PAGES, + ExperimentTableRowsMetadata.JSON_PROPERTY_DESCRIPTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentTableRowsMetadata { + public static final String JSON_PROPERTY_TOTAL_ROWS = "total_rows"; + @javax.annotation.Nullable + private Integer totalRows; + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nullable + private String dataset; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nullable + private String datasetName; + + public static final String JSON_PROPERTY_COLUMN = "column"; + private JsonNullable column = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private Map description = new HashMap<>(); + + public ExperimentTableRowsMetadata() { + } + + public ExperimentTableRowsMetadata totalRows(@javax.annotation.Nullable Integer totalRows) { + this.totalRows = totalRows; + return this; + } + + /** + * Get totalRows + * @return totalRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalRows() { + return totalRows; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalRows(@javax.annotation.Nullable Integer totalRows) { + this.totalRows = totalRows; + } + + + public ExperimentTableRowsMetadata dataset(@javax.annotation.Nullable String dataset) { + this.dataset = dataset; + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDataset(@javax.annotation.Nullable String dataset) { + this.dataset = dataset; + } + + + public ExperimentTableRowsMetadata datasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + } + + + public ExperimentTableRowsMetadata column(@javax.annotation.Nullable String column) { + this.column = JsonNullable.of(column); + return this; + } + + /** + * Get column + * @return column + */ + @javax.annotation.Nullable + @JsonIgnore + public String getColumn() { + return column.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getColumn_JsonNullable() { + return column; + } + + @JsonProperty(JSON_PROPERTY_COLUMN) + public void setColumn_JsonNullable(JsonNullable column) { + this.column = column; + } + + public void setColumn(@javax.annotation.Nullable String column) { + this.column = JsonNullable.of(column); + } + + + public ExperimentTableRowsMetadata totalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + } + + + public ExperimentTableRowsMetadata description(@javax.annotation.Nullable Map description) { + this.description = description; + return this; + } + + public ExperimentTableRowsMetadata putDescriptionItem(String key, String descriptionItem) { + if (this.description == null) { + this.description = new HashMap<>(); + } + this.description.put(key, descriptionItem); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable Map description) { + this.description = description; + } + + + /** + * Return true if this ExperimentTableRowsMetadata object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentTableRowsMetadata experimentTableRowsMetadata = (ExperimentTableRowsMetadata) o; + return Objects.equals(this.totalRows, experimentTableRowsMetadata.totalRows) && + Objects.equals(this.dataset, experimentTableRowsMetadata.dataset) && + Objects.equals(this.datasetName, experimentTableRowsMetadata.datasetName) && + equalsNullable(this.column, experimentTableRowsMetadata.column) && + Objects.equals(this.totalPages, experimentTableRowsMetadata.totalPages) && + Objects.equals(this.description, experimentTableRowsMetadata.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(totalRows, dataset, datasetName, hashCodeNullable(column), totalPages, description); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentTableRowsMetadata {\n"); + sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total_rows` to the URL query string + if (getTotalRows() != null) { + joiner.add(String.format("%stotal_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalRows())))); + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(String.format("%sdataset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataset())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `column` to the URL query string + if (getColumn() != null) { + joiner.add(String.format("%scolumn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumn())))); + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + for (String _key : getDescription().keySet()) { + joiner.add(String.format("%sdescription%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDescription().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDescription().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResponse.java new file mode 100644 index 0000000..49b3fda --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentTableRowsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentTableRowsResponse + */ +@JsonPropertyOrder({ + ExperimentTableRowsResponse.JSON_PROPERTY_STATUS, + ExperimentTableRowsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentTableRowsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentTableRowsResult result; + + public ExperimentTableRowsResponse() { + } + + public ExperimentTableRowsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentTableRowsResponse result(@javax.annotation.Nonnull ExperimentTableRowsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentTableRowsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentTableRowsResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentTableRowsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentTableRowsResponse experimentTableRowsResponse = (ExperimentTableRowsResponse) o; + return Objects.equals(this.status, experimentTableRowsResponse.status) && + Objects.equals(this.result, experimentTableRowsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentTableRowsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResult.java new file mode 100644 index 0000000..4ab399c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentTableRowsResult.java @@ -0,0 +1,376 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentTableRowsColumnConfig; +import com.futureagi.sdk.model.ExperimentTableRowsMetadata; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentTableRowsResult + */ +@JsonPropertyOrder({ + ExperimentTableRowsResult.JSON_PROPERTY_COLUMN_CONFIG, + ExperimentTableRowsResult.JSON_PROPERTY_TABLE, + ExperimentTableRowsResult.JSON_PROPERTY_METADATA, + ExperimentTableRowsResult.JSON_PROPERTY_OUTPUT_FORMAT, + ExperimentTableRowsResult.JSON_PROPERTY_STATUS, + ExperimentTableRowsResult.JSON_PROPERTY_NEXT_ROW_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentTableRowsResult { + public static final String JSON_PROPERTY_COLUMN_CONFIG = "column_config"; + @javax.annotation.Nonnull + private List columnConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE = "table"; + @javax.annotation.Nullable + private List> table = new ArrayList<>(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private ExperimentTableRowsMetadata metadata; + + public static final String JSON_PROPERTY_OUTPUT_FORMAT = "output_format"; + @javax.annotation.Nullable + private String outputFormat; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_NEXT_ROW_IDS = "next_row_ids"; + @javax.annotation.Nullable + private List nextRowIds = new ArrayList<>(); + + public ExperimentTableRowsResult() { + } + + public ExperimentTableRowsResult columnConfig(@javax.annotation.Nonnull List columnConfig) { + this.columnConfig = columnConfig; + return this; + } + + public ExperimentTableRowsResult addColumnConfigItem(ExperimentTableRowsColumnConfig columnConfigItem) { + if (this.columnConfig == null) { + this.columnConfig = new ArrayList<>(); + } + this.columnConfig.add(columnConfigItem); + return this; + } + + /** + * Get columnConfig + * @return columnConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumnConfig() { + return columnConfig; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnConfig(@javax.annotation.Nonnull List columnConfig) { + this.columnConfig = columnConfig; + } + + + public ExperimentTableRowsResult table(@javax.annotation.Nullable List> table) { + this.table = table; + return this; + } + + public ExperimentTableRowsResult addTableItem(Map tableItem) { + if (this.table == null) { + this.table = new ArrayList<>(); + } + this.table.add(tableItem); + return this; + } + + /** + * Get table + * @return table + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getTable() { + return table; + } + + + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTable(@javax.annotation.Nullable List> table) { + this.table = table; + } + + + public ExperimentTableRowsResult metadata(@javax.annotation.Nullable ExperimentTableRowsMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExperimentTableRowsMetadata getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable ExperimentTableRowsMetadata metadata) { + this.metadata = metadata; + } + + + public ExperimentTableRowsResult outputFormat(@javax.annotation.Nullable String outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOutputFormat() { + return outputFormat; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputFormat(@javax.annotation.Nullable String outputFormat) { + this.outputFormat = outputFormat; + } + + + public ExperimentTableRowsResult status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public ExperimentTableRowsResult nextRowIds(@javax.annotation.Nullable List nextRowIds) { + this.nextRowIds = nextRowIds; + return this; + } + + public ExperimentTableRowsResult addNextRowIdsItem(UUID nextRowIdsItem) { + if (this.nextRowIds == null) { + this.nextRowIds = new ArrayList<>(); + } + this.nextRowIds.add(nextRowIdsItem); + return this; + } + + /** + * Get nextRowIds + * @return nextRowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNextRowIds() { + return nextRowIds; + } + + + @JsonProperty(JSON_PROPERTY_NEXT_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNextRowIds(@javax.annotation.Nullable List nextRowIds) { + this.nextRowIds = nextRowIds; + } + + + /** + * Return true if this ExperimentTableRowsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentTableRowsResult experimentTableRowsResult = (ExperimentTableRowsResult) o; + return Objects.equals(this.columnConfig, experimentTableRowsResult.columnConfig) && + Objects.equals(this.table, experimentTableRowsResult.table) && + Objects.equals(this.metadata, experimentTableRowsResult.metadata) && + Objects.equals(this.outputFormat, experimentTableRowsResult.outputFormat) && + Objects.equals(this.status, experimentTableRowsResult.status) && + Objects.equals(this.nextRowIds, experimentTableRowsResult.nextRowIds); + } + + @Override + public int hashCode() { + return Objects.hash(columnConfig, table, metadata, outputFormat, status, nextRowIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentTableRowsResult {\n"); + sb.append(" columnConfig: ").append(toIndentedString(columnConfig)).append("\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" nextRowIds: ").append(toIndentedString(nextRowIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_config` to the URL query string + if (getColumnConfig() != null) { + for (int i = 0; i < getColumnConfig().size(); i++) { + if (getColumnConfig().get(i) != null) { + joiner.add(getColumnConfig().get(i).toUrlQueryString(String.format("%scolumn_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `table` to the URL query string + if (getTable() != null) { + for (int i = 0; i < getTable().size(); i++) { + joiner.add(String.format("%stable%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTable().get(i))))); + } + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + // add `output_format` to the URL query string + if (getOutputFormat() != null) { + joiner.add(String.format("%soutput_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputFormat())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `next_row_ids` to the URL query string + if (getNextRowIds() != null) { + for (int i = 0; i < getNextRowIds().size(); i++) { + if (getNextRowIds().get(i) != null) { + joiner.add(String.format("%snext_row_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getNextRowIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentUpdateV2.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentUpdateV2.java new file mode 100644 index 0000000..565c772 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentUpdateV2.java @@ -0,0 +1,276 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EvalMetricEntry; +import com.futureagi.sdk.model.PromptConfigEntry; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentUpdateV2 + */ +@JsonPropertyOrder({ + ExperimentUpdateV2.JSON_PROPERTY_COLUMN_ID, + ExperimentUpdateV2.JSON_PROPERTY_PROMPT_CONFIG, + ExperimentUpdateV2.JSON_PROPERTY_USER_EVAL_METRICS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentUpdateV2 { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + private JsonNullable columnId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_CONFIG = "prompt_config"; + @javax.annotation.Nullable + private List promptConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_USER_EVAL_METRICS = "user_eval_metrics"; + @javax.annotation.Nullable + private List userEvalMetrics = new ArrayList<>(); + + public ExperimentUpdateV2() { + } + + public ExperimentUpdateV2 columnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = JsonNullable.of(columnId); + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getColumnId() { + return columnId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getColumnId_JsonNullable() { + return columnId; + } + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + public void setColumnId_JsonNullable(JsonNullable columnId) { + this.columnId = columnId; + } + + public void setColumnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = JsonNullable.of(columnId); + } + + + public ExperimentUpdateV2 promptConfig(@javax.annotation.Nullable List promptConfig) { + this.promptConfig = promptConfig; + return this; + } + + public ExperimentUpdateV2 addPromptConfigItem(PromptConfigEntry promptConfigItem) { + if (this.promptConfig == null) { + this.promptConfig = new ArrayList<>(); + } + this.promptConfig.add(promptConfigItem); + return this; + } + + /** + * Get promptConfig + * @return promptConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPromptConfig() { + return promptConfig; + } + + + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPromptConfig(@javax.annotation.Nullable List promptConfig) { + this.promptConfig = promptConfig; + } + + + public ExperimentUpdateV2 userEvalMetrics(@javax.annotation.Nullable List userEvalMetrics) { + this.userEvalMetrics = userEvalMetrics; + return this; + } + + public ExperimentUpdateV2 addUserEvalMetricsItem(EvalMetricEntry userEvalMetricsItem) { + if (this.userEvalMetrics == null) { + this.userEvalMetrics = new ArrayList<>(); + } + this.userEvalMetrics.add(userEvalMetricsItem); + return this; + } + + /** + * Get userEvalMetrics + * @return userEvalMetrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUserEvalMetrics() { + return userEvalMetrics; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserEvalMetrics(@javax.annotation.Nullable List userEvalMetrics) { + this.userEvalMetrics = userEvalMetrics; + } + + + /** + * Return true if this ExperimentUpdateV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentUpdateV2 experimentUpdateV2 = (ExperimentUpdateV2) o; + return equalsNullable(this.columnId, experimentUpdateV2.columnId) && + Objects.equals(this.promptConfig, experimentUpdateV2.promptConfig) && + Objects.equals(this.userEvalMetrics, experimentUpdateV2.userEvalMetrics); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(columnId), promptConfig, userEvalMetrics); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentUpdateV2 {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" promptConfig: ").append(toIndentedString(promptConfig)).append("\n"); + sb.append(" userEvalMetrics: ").append(toIndentedString(userEvalMetrics)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `prompt_config` to the URL query string + if (getPromptConfig() != null) { + for (int i = 0; i < getPromptConfig().size(); i++) { + if (getPromptConfig().get(i) != null) { + joiner.add(getPromptConfig().get(i).toUrlQueryString(String.format("%sprompt_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `user_eval_metrics` to the URL query string + if (getUserEvalMetrics() != null) { + for (int i = 0; i < getUserEvalMetrics().size(); i++) { + if (getUserEvalMetrics().get(i) != null) { + joiner.add(getUserEvalMetrics().get(i).toUrlQueryString(String.format("%suser_eval_metrics%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentV2DetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentV2DetailResponse.java new file mode 100644 index 0000000..8565823 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentV2DetailResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentDetailV2; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentV2DetailResponse + */ +@JsonPropertyOrder({ + ExperimentV2DetailResponse.JSON_PROPERTY_STATUS, + ExperimentV2DetailResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentV2DetailResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentDetailV2 result; + + public ExperimentV2DetailResponse() { + } + + public ExperimentV2DetailResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentV2DetailResponse result(@javax.annotation.Nonnull ExperimentDetailV2 result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentDetailV2 getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentDetailV2 result) { + this.result = result; + } + + + /** + * Return true if this ExperimentV2DetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentV2DetailResponse experimentV2DetailResponse = (ExperimentV2DetailResponse) o; + return Objects.equals(this.status, experimentV2DetailResponse.status) && + Objects.equals(this.result, experimentV2DetailResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentV2DetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResponse.java new file mode 100644 index 0000000..8327d67 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentWorkflowResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentWorkflowResponse + */ +@JsonPropertyOrder({ + ExperimentWorkflowResponse.JSON_PROPERTY_STATUS, + ExperimentWorkflowResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentWorkflowResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ExperimentWorkflowResult result; + + public ExperimentWorkflowResponse() { + } + + public ExperimentWorkflowResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ExperimentWorkflowResponse result(@javax.annotation.Nonnull ExperimentWorkflowResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentWorkflowResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ExperimentWorkflowResult result) { + this.result = result; + } + + + /** + * Return true if this ExperimentWorkflowResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentWorkflowResponse experimentWorkflowResponse = (ExperimentWorkflowResponse) o; + return Objects.equals(this.status, experimentWorkflowResponse.status) && + Objects.equals(this.result, experimentWorkflowResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentWorkflowResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResult.java new file mode 100644 index 0000000..567a5c4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExperimentWorkflowResult.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExperimentWorkflowResult + */ +@JsonPropertyOrder({ + ExperimentWorkflowResult.JSON_PROPERTY_MESSAGE, + ExperimentWorkflowResult.JSON_PROPERTY_WORKFLOW_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExperimentWorkflowResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_WORKFLOW_ID = "workflow_id"; + @javax.annotation.Nullable + private String workflowId; + + public ExperimentWorkflowResult() { + } + + public ExperimentWorkflowResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public ExperimentWorkflowResult workflowId(@javax.annotation.Nullable String workflowId) { + this.workflowId = workflowId; + return this; + } + + /** + * Get workflowId + * @return workflowId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWorkflowId() { + return workflowId; + } + + + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWorkflowId(@javax.annotation.Nullable String workflowId) { + this.workflowId = workflowId; + } + + + /** + * Return true if this ExperimentWorkflowResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentWorkflowResult experimentWorkflowResult = (ExperimentWorkflowResult) o; + return Objects.equals(this.message, experimentWorkflowResult.message) && + Objects.equals(this.workflowId, experimentWorkflowResult.workflowId); + } + + @Override + public int hashCode() { + return Objects.hash(message, workflowId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentWorkflowResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `workflow_id` to the URL query string + if (getWorkflowId() != null) { + joiner.add(String.format("%sworkflow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkflowId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractEntitiesRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractEntitiesRequest.java new file mode 100644 index 0000000..e64d737 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractEntitiesRequest.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExtractEntitiesRequest + */ +@JsonPropertyOrder({ + ExtractEntitiesRequest.JSON_PROPERTY_COLUMN_ID, + ExtractEntitiesRequest.JSON_PROPERTY_INSTRUCTION, + ExtractEntitiesRequest.JSON_PROPERTY_LANGUAGE_MODEL_ID, + ExtractEntitiesRequest.JSON_PROPERTY_CONCURRENCY, + ExtractEntitiesRequest.JSON_PROPERTY_NEW_COLUMN_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExtractEntitiesRequest { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_INSTRUCTION = "instruction"; + @javax.annotation.Nonnull + private String instruction; + + public static final String JSON_PROPERTY_LANGUAGE_MODEL_ID = "language_model_id"; + @javax.annotation.Nullable + private String languageModelId = "gpt-4"; + + public static final String JSON_PROPERTY_CONCURRENCY = "concurrency"; + @javax.annotation.Nullable + private Integer concurrency = 5; + + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nullable + private String newColumnName; + + public ExtractEntitiesRequest() { + } + + public ExtractEntitiesRequest columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public ExtractEntitiesRequest instruction(@javax.annotation.Nonnull String instruction) { + this.instruction = instruction; + return this; + } + + /** + * Get instruction + * @return instruction + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInstruction() { + return instruction; + } + + + @JsonProperty(JSON_PROPERTY_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstruction(@javax.annotation.Nonnull String instruction) { + this.instruction = instruction; + } + + + public ExtractEntitiesRequest languageModelId(@javax.annotation.Nullable String languageModelId) { + this.languageModelId = languageModelId; + return this; + } + + /** + * Get languageModelId + * @return languageModelId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguageModelId() { + return languageModelId; + } + + + @JsonProperty(JSON_PROPERTY_LANGUAGE_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLanguageModelId(@javax.annotation.Nullable String languageModelId) { + this.languageModelId = languageModelId; + } + + + public ExtractEntitiesRequest concurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + return this; + } + + /** + * Get concurrency + * @return concurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConcurrency() { + return concurrency; + } + + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConcurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + } + + + public ExtractEntitiesRequest newColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + } + + + /** + * Return true if this ExtractEntitiesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExtractEntitiesRequest extractEntitiesRequest = (ExtractEntitiesRequest) o; + return Objects.equals(this.columnId, extractEntitiesRequest.columnId) && + Objects.equals(this.instruction, extractEntitiesRequest.instruction) && + Objects.equals(this.languageModelId, extractEntitiesRequest.languageModelId) && + Objects.equals(this.concurrency, extractEntitiesRequest.concurrency) && + Objects.equals(this.newColumnName, extractEntitiesRequest.newColumnName); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, instruction, languageModelId, concurrency, newColumnName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExtractEntitiesRequest {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" instruction: ").append(toIndentedString(instruction)).append("\n"); + sb.append(" languageModelId: ").append(toIndentedString(languageModelId)).append("\n"); + sb.append(" concurrency: ").append(toIndentedString(concurrency)).append("\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `instruction` to the URL query string + if (getInstruction() != null) { + joiner.add(String.format("%sinstruction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstruction())))); + } + + // add `language_model_id` to the URL query string + if (getLanguageModelId() != null) { + joiner.add(String.format("%slanguage_model_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguageModelId())))); + } + + // add `concurrency` to the URL query string + if (getConcurrency() != null) { + joiner.add(String.format("%sconcurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConcurrency())))); + } + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractJsonColumnRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractJsonColumnRequest.java new file mode 100644 index 0000000..0e618ca --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ExtractJsonColumnRequest.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ExtractJsonColumnRequest + */ +@JsonPropertyOrder({ + ExtractJsonColumnRequest.JSON_PROPERTY_COLUMN_ID, + ExtractJsonColumnRequest.JSON_PROPERTY_JSON_KEY, + ExtractJsonColumnRequest.JSON_PROPERTY_NEW_COLUMN_NAME, + ExtractJsonColumnRequest.JSON_PROPERTY_CONCURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ExtractJsonColumnRequest { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_JSON_KEY = "json_key"; + @javax.annotation.Nonnull + private String jsonKey; + + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nullable + private String newColumnName; + + public static final String JSON_PROPERTY_CONCURRENCY = "concurrency"; + @javax.annotation.Nullable + private Integer concurrency = 5; + + public ExtractJsonColumnRequest() { + } + + public ExtractJsonColumnRequest columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public ExtractJsonColumnRequest jsonKey(@javax.annotation.Nonnull String jsonKey) { + this.jsonKey = jsonKey; + return this; + } + + /** + * Get jsonKey + * @return jsonKey + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_JSON_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJsonKey() { + return jsonKey; + } + + + @JsonProperty(JSON_PROPERTY_JSON_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setJsonKey(@javax.annotation.Nonnull String jsonKey) { + this.jsonKey = jsonKey; + } + + + public ExtractJsonColumnRequest newColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + } + + + public ExtractJsonColumnRequest concurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + return this; + } + + /** + * Get concurrency + * @return concurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConcurrency() { + return concurrency; + } + + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConcurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + } + + + /** + * Return true if this ExtractJsonColumnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExtractJsonColumnRequest extractJsonColumnRequest = (ExtractJsonColumnRequest) o; + return Objects.equals(this.columnId, extractJsonColumnRequest.columnId) && + Objects.equals(this.jsonKey, extractJsonColumnRequest.jsonKey) && + Objects.equals(this.newColumnName, extractJsonColumnRequest.newColumnName) && + Objects.equals(this.concurrency, extractJsonColumnRequest.concurrency); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, jsonKey, newColumnName, concurrency); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExtractJsonColumnRequest {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" jsonKey: ").append(toIndentedString(jsonKey)).append("\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append(" concurrency: ").append(toIndentedString(concurrency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `json_key` to the URL query string + if (getJsonKey() != null) { + joiner.add(String.format("%sjson_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getJsonKey())))); + } + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + // add `concurrency` to the URL query string + if (getConcurrency() != null) { + joiner.add(String.format("%sconcurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConcurrency())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FailedRerunItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FailedRerunItem.java new file mode 100644 index 0000000..279b405 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FailedRerunItem.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FailedRerunItem + */ +@JsonPropertyOrder({ + FailedRerunItem.JSON_PROPERTY_CALL_EXECUTION_ID, + FailedRerunItem.JSON_PROPERTY_ERROR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FailedRerunItem { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nonnull + private UUID callExecutionId; + + public static final String JSON_PROPERTY_ERROR = "error"; + @javax.annotation.Nonnull + private String error; + + public FailedRerunItem() { + } + + public FailedRerunItem callExecutionId(@javax.annotation.Nonnull UUID callExecutionId) { + this.callExecutionId = callExecutionId; + return this; + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCallExecutionId(@javax.annotation.Nonnull UUID callExecutionId) { + this.callExecutionId = callExecutionId; + } + + + public FailedRerunItem error(@javax.annotation.Nonnull String error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setError(@javax.annotation.Nonnull String error) { + this.error = error; + } + + + /** + * Return true if this FailedRerunItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FailedRerunItem failedRerunItem = (FailedRerunItem) o; + return Objects.equals(this.callExecutionId, failedRerunItem.callExecutionId) && + Objects.equals(this.error, failedRerunItem.error); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FailedRerunItem {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailApiResponse.java new file mode 100644 index 0000000..13f5f0b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.FeedDetailCore; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedDetailApiResponse + */ +@JsonPropertyOrder({ + FeedDetailApiResponse.JSON_PROPERTY_STATUS, + FeedDetailApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedDetailApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private FeedDetailCore result; + + public FeedDetailApiResponse() { + } + + public FeedDetailApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public FeedDetailApiResponse result(@javax.annotation.Nonnull FeedDetailCore result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FeedDetailCore getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull FeedDetailCore result) { + this.result = result; + } + + + /** + * Return true if this FeedDetailApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedDetailApiResponse feedDetailApiResponse = (FeedDetailApiResponse) o; + return Objects.equals(this.status, feedDetailApiResponse.status) && + Objects.equals(this.result, feedDetailApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedDetailApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailCore.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailCore.java new file mode 100644 index 0000000..fcafafd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedDetailCore.java @@ -0,0 +1,261 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.FeedListRow; +import com.futureagi.sdk.model.TracePreview; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedDetailCore + */ +@JsonPropertyOrder({ + FeedDetailCore.JSON_PROPERTY_ROW, + FeedDetailCore.JSON_PROPERTY_DESCRIPTION, + FeedDetailCore.JSON_PROPERTY_SUCCESS_TRACE, + FeedDetailCore.JSON_PROPERTY_REPRESENTATIVE_TRACE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedDetailCore { + public static final String JSON_PROPERTY_ROW = "row"; + @javax.annotation.Nonnull + private FeedListRow row; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_SUCCESS_TRACE = "success_trace"; + @javax.annotation.Nonnull + private TracePreview successTrace; + + public static final String JSON_PROPERTY_REPRESENTATIVE_TRACE = "representative_trace"; + @javax.annotation.Nonnull + private TracePreview representativeTrace; + + public FeedDetailCore() { + } + + public FeedDetailCore row(@javax.annotation.Nonnull FeedListRow row) { + this.row = row; + return this; + } + + /** + * Get row + * @return row + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FeedListRow getRow() { + return row; + } + + + @JsonProperty(JSON_PROPERTY_ROW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRow(@javax.annotation.Nonnull FeedListRow row) { + this.row = row; + } + + + public FeedDetailCore description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public FeedDetailCore successTrace(@javax.annotation.Nonnull TracePreview successTrace) { + this.successTrace = successTrace; + return this; + } + + /** + * Get successTrace + * @return successTrace + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS_TRACE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TracePreview getSuccessTrace() { + return successTrace; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS_TRACE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccessTrace(@javax.annotation.Nonnull TracePreview successTrace) { + this.successTrace = successTrace; + } + + + public FeedDetailCore representativeTrace(@javax.annotation.Nonnull TracePreview representativeTrace) { + this.representativeTrace = representativeTrace; + return this; + } + + /** + * Get representativeTrace + * @return representativeTrace + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REPRESENTATIVE_TRACE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TracePreview getRepresentativeTrace() { + return representativeTrace; + } + + + @JsonProperty(JSON_PROPERTY_REPRESENTATIVE_TRACE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRepresentativeTrace(@javax.annotation.Nonnull TracePreview representativeTrace) { + this.representativeTrace = representativeTrace; + } + + + /** + * Return true if this FeedDetailCore object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedDetailCore feedDetailCore = (FeedDetailCore) o; + return Objects.equals(this.row, feedDetailCore.row) && + Objects.equals(this.description, feedDetailCore.description) && + Objects.equals(this.successTrace, feedDetailCore.successTrace) && + Objects.equals(this.representativeTrace, feedDetailCore.representativeTrace); + } + + @Override + public int hashCode() { + return Objects.hash(row, description, successTrace, representativeTrace); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedDetailCore {\n"); + sb.append(" row: ").append(toIndentedString(row)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" successTrace: ").append(toIndentedString(successTrace)).append("\n"); + sb.append(" representativeTrace: ").append(toIndentedString(representativeTrace)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row` to the URL query string + if (getRow() != null) { + joiner.add(getRow().toUrlQueryString(prefix + "row" + suffix)); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `success_trace` to the URL query string + if (getSuccessTrace() != null) { + joiner.add(getSuccessTrace().toUrlQueryString(prefix + "success_trace" + suffix)); + } + + // add `representative_trace` to the URL query string + if (getRepresentativeTrace() != null) { + joiner.add(getRepresentativeTrace().toUrlQueryString(prefix + "representative_trace" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListApiResponse.java new file mode 100644 index 0000000..36919d8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.FeedListResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedListApiResponse + */ +@JsonPropertyOrder({ + FeedListApiResponse.JSON_PROPERTY_STATUS, + FeedListApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedListApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private FeedListResponse result; + + public FeedListApiResponse() { + } + + public FeedListApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public FeedListApiResponse result(@javax.annotation.Nonnull FeedListResponse result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FeedListResponse getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull FeedListResponse result) { + this.result = result; + } + + + /** + * Return true if this FeedListApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedListApiResponse feedListApiResponse = (FeedListApiResponse) o; + return Objects.equals(this.status, feedListApiResponse.status) && + Objects.equals(this.result, feedListApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedListApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListResponse.java new file mode 100644 index 0000000..87e9c52 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListResponse.java @@ -0,0 +1,275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.FeedListRow; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedListResponse + */ +@JsonPropertyOrder({ + FeedListResponse.JSON_PROPERTY_DATA, + FeedListResponse.JSON_PROPERTY_TOTAL, + FeedListResponse.JSON_PROPERTY_LIMIT, + FeedListResponse.JSON_PROPERTY_OFFSET +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedListResponse { + public static final String JSON_PROPERTY_DATA = "data"; + @javax.annotation.Nonnull + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + @javax.annotation.Nonnull + private Integer limit; + + public static final String JSON_PROPERTY_OFFSET = "offset"; + @javax.annotation.Nonnull + private Integer offset; + + public FeedListResponse() { + } + + public FeedListResponse data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public FeedListResponse addDataItem(FeedListRow dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + + public FeedListResponse total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + public FeedListResponse limit(@javax.annotation.Nonnull Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * @return limit + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getLimit() { + return limit; + } + + + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLimit(@javax.annotation.Nonnull Integer limit) { + this.limit = limit; + } + + + public FeedListResponse offset(@javax.annotation.Nonnull Integer offset) { + this.offset = offset; + return this; + } + + /** + * Get offset + * @return offset + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getOffset() { + return offset; + } + + + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOffset(@javax.annotation.Nonnull Integer offset) { + this.offset = offset; + } + + + /** + * Return true if this FeedListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedListResponse feedListResponse = (FeedListResponse) o; + return Objects.equals(this.data, feedListResponse.data) && + Objects.equals(this.total, feedListResponse.total) && + Objects.equals(this.limit, feedListResponse.limit) && + Objects.equals(this.offset, feedListResponse.offset); + } + + @Override + public int hashCode() { + return Objects.hash(data, total, limit, offset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `limit` to the URL query string + if (getLimit() != null) { + joiner.add(String.format("%slimit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLimit())))); + } + + // add `offset` to the URL query string + if (getOffset() != null) { + joiner.add(String.format("%soffset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOffset())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListRow.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListRow.java new file mode 100644 index 0000000..9fd5893 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedListRow.java @@ -0,0 +1,974 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ErrorName; +import com.futureagi.sdk.model.TrendPoint; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedListRow + */ +@JsonPropertyOrder({ + FeedListRow.JSON_PROPERTY_CLUSTER_ID, + FeedListRow.JSON_PROPERTY_SOURCE, + FeedListRow.JSON_PROPERTY_ERROR, + FeedListRow.JSON_PROPERTY_STATUS, + FeedListRow.JSON_PROPERTY_SEVERITY, + FeedListRow.JSON_PROPERTY_OCCURRENCES, + FeedListRow.JSON_PROPERTY_TRACE_COUNT, + FeedListRow.JSON_PROPERTY_FIX_LAYER, + FeedListRow.JSON_PROPERTY_USERS_AFFECTED, + FeedListRow.JSON_PROPERTY_SESSIONS, + FeedListRow.JSON_PROPERTY_FIRST_SEEN, + FeedListRow.JSON_PROPERTY_LAST_SEEN, + FeedListRow.JSON_PROPERTY_TRENDS, + FeedListRow.JSON_PROPERTY_ASSIGNEES, + FeedListRow.JSON_PROPERTY_MODEL, + FeedListRow.JSON_PROPERTY_MODEL_VERSION, + FeedListRow.JSON_PROPERTY_PROJECT, + FeedListRow.JSON_PROPERTY_PROJECT_ID, + FeedListRow.JSON_PROPERTY_ENVIRONMENT, + FeedListRow.JSON_PROPERTY_EVAL_SCORE, + FeedListRow.JSON_PROPERTY_TRACE_ID, + FeedListRow.JSON_PROPERTY_EXTERNAL_ISSUE_URL, + FeedListRow.JSON_PROPERTY_EXTERNAL_ISSUE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedListRow { + public static final String JSON_PROPERTY_CLUSTER_ID = "cluster_id"; + @javax.annotation.Nonnull + private String clusterId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nonnull + private String source; + + public static final String JSON_PROPERTY_ERROR = "error"; + @javax.annotation.Nonnull + private ErrorName error; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + @javax.annotation.Nonnull + private String severity; + + public static final String JSON_PROPERTY_OCCURRENCES = "occurrences"; + @javax.annotation.Nonnull + private Integer occurrences; + + public static final String JSON_PROPERTY_TRACE_COUNT = "trace_count"; + @javax.annotation.Nonnull + private Integer traceCount; + + public static final String JSON_PROPERTY_FIX_LAYER = "fix_layer"; + @javax.annotation.Nullable + private String fixLayer; + + public static final String JSON_PROPERTY_USERS_AFFECTED = "users_affected"; + @javax.annotation.Nonnull + private Integer usersAffected; + + public static final String JSON_PROPERTY_SESSIONS = "sessions"; + @javax.annotation.Nonnull + private Integer sessions; + + public static final String JSON_PROPERTY_FIRST_SEEN = "first_seen"; + @javax.annotation.Nullable + private OffsetDateTime firstSeen; + + public static final String JSON_PROPERTY_LAST_SEEN = "last_seen"; + @javax.annotation.Nullable + private OffsetDateTime lastSeen; + + public static final String JSON_PROPERTY_TRENDS = "trends"; + @javax.annotation.Nonnull + private List trends = new ArrayList<>(); + + public static final String JSON_PROPERTY_ASSIGNEES = "assignees"; + @javax.annotation.Nonnull + private List assignees = new ArrayList<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_MODEL_VERSION = "model_version"; + @javax.annotation.Nullable + private String modelVersion; + + public static final String JSON_PROPERTY_PROJECT = "project"; + @javax.annotation.Nullable + private String project; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + @javax.annotation.Nullable + private String projectId; + + public static final String JSON_PROPERTY_ENVIRONMENT = "environment"; + @javax.annotation.Nullable + private String environment; + + public static final String JSON_PROPERTY_EVAL_SCORE = "eval_score"; + @javax.annotation.Nullable + private BigDecimal evalScore; + + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + @javax.annotation.Nullable + private String traceId; + + public static final String JSON_PROPERTY_EXTERNAL_ISSUE_URL = "external_issue_url"; + @javax.annotation.Nullable + private String externalIssueUrl; + + public static final String JSON_PROPERTY_EXTERNAL_ISSUE_ID = "external_issue_id"; + @javax.annotation.Nullable + private String externalIssueId; + + public FeedListRow() { + } + + public FeedListRow clusterId(@javax.annotation.Nonnull String clusterId) { + this.clusterId = clusterId; + return this; + } + + /** + * Get clusterId + * @return clusterId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLUSTER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClusterId() { + return clusterId; + } + + + @JsonProperty(JSON_PROPERTY_CLUSTER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClusterId(@javax.annotation.Nonnull String clusterId) { + this.clusterId = clusterId; + } + + + public FeedListRow source(@javax.annotation.Nonnull String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@javax.annotation.Nonnull String source) { + this.source = source; + } + + + public FeedListRow error(@javax.annotation.Nonnull ErrorName error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ErrorName getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setError(@javax.annotation.Nonnull ErrorName error) { + this.error = error; + } + + + public FeedListRow status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public FeedListRow severity(@javax.annotation.Nonnull String severity) { + this.severity = severity; + return this; + } + + /** + * Get severity + * @return severity + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSeverity() { + return severity; + } + + + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSeverity(@javax.annotation.Nonnull String severity) { + this.severity = severity; + } + + + public FeedListRow occurrences(@javax.annotation.Nonnull Integer occurrences) { + this.occurrences = occurrences; + return this; + } + + /** + * Get occurrences + * @return occurrences + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OCCURRENCES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getOccurrences() { + return occurrences; + } + + + @JsonProperty(JSON_PROPERTY_OCCURRENCES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOccurrences(@javax.annotation.Nonnull Integer occurrences) { + this.occurrences = occurrences; + } + + + public FeedListRow traceCount(@javax.annotation.Nonnull Integer traceCount) { + this.traceCount = traceCount; + return this; + } + + /** + * Get traceCount + * @return traceCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACE_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTraceCount() { + return traceCount; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceCount(@javax.annotation.Nonnull Integer traceCount) { + this.traceCount = traceCount; + } + + + public FeedListRow fixLayer(@javax.annotation.Nullable String fixLayer) { + this.fixLayer = fixLayer; + return this; + } + + /** + * Get fixLayer + * @return fixLayer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIX_LAYER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFixLayer() { + return fixLayer; + } + + + @JsonProperty(JSON_PROPERTY_FIX_LAYER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFixLayer(@javax.annotation.Nullable String fixLayer) { + this.fixLayer = fixLayer; + } + + + public FeedListRow usersAffected(@javax.annotation.Nonnull Integer usersAffected) { + this.usersAffected = usersAffected; + return this; + } + + /** + * Get usersAffected + * @return usersAffected + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USERS_AFFECTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getUsersAffected() { + return usersAffected; + } + + + @JsonProperty(JSON_PROPERTY_USERS_AFFECTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUsersAffected(@javax.annotation.Nonnull Integer usersAffected) { + this.usersAffected = usersAffected; + } + + + public FeedListRow sessions(@javax.annotation.Nonnull Integer sessions) { + this.sessions = sessions; + return this; + } + + /** + * Get sessions + * @return sessions + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSessions() { + return sessions; + } + + + @JsonProperty(JSON_PROPERTY_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSessions(@javax.annotation.Nonnull Integer sessions) { + this.sessions = sessions; + } + + + public FeedListRow firstSeen(@javax.annotation.Nullable OffsetDateTime firstSeen) { + this.firstSeen = firstSeen; + return this; + } + + /** + * Get firstSeen + * @return firstSeen + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getFirstSeen() { + return firstSeen; + } + + + @JsonProperty(JSON_PROPERTY_FIRST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFirstSeen(@javax.annotation.Nullable OffsetDateTime firstSeen) { + this.firstSeen = firstSeen; + } + + + public FeedListRow lastSeen(@javax.annotation.Nullable OffsetDateTime lastSeen) { + this.lastSeen = lastSeen; + return this; + } + + /** + * Get lastSeen + * @return lastSeen + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastSeen() { + return lastSeen; + } + + + @JsonProperty(JSON_PROPERTY_LAST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastSeen(@javax.annotation.Nullable OffsetDateTime lastSeen) { + this.lastSeen = lastSeen; + } + + + public FeedListRow trends(@javax.annotation.Nonnull List trends) { + this.trends = trends; + return this; + } + + public FeedListRow addTrendsItem(TrendPoint trendsItem) { + if (this.trends == null) { + this.trends = new ArrayList<>(); + } + this.trends.add(trendsItem); + return this; + } + + /** + * Get trends + * @return trends + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTrends() { + return trends; + } + + + @JsonProperty(JSON_PROPERTY_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTrends(@javax.annotation.Nonnull List trends) { + this.trends = trends; + } + + + public FeedListRow assignees(@javax.annotation.Nonnull List assignees) { + this.assignees = assignees; + return this; + } + + public FeedListRow addAssigneesItem(String assigneesItem) { + if (this.assignees == null) { + this.assignees = new ArrayList<>(); + } + this.assignees.add(assigneesItem); + return this; + } + + /** + * Get assignees + * @return assignees + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSIGNEES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAssignees() { + return assignees; + } + + + @JsonProperty(JSON_PROPERTY_ASSIGNEES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssignees(@javax.annotation.Nonnull List assignees) { + this.assignees = assignees; + } + + + public FeedListRow model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public FeedListRow modelVersion(@javax.annotation.Nullable String modelVersion) { + this.modelVersion = modelVersion; + return this; + } + + /** + * Get modelVersion + * @return modelVersion + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelVersion() { + return modelVersion; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModelVersion(@javax.annotation.Nullable String modelVersion) { + this.modelVersion = modelVersion; + } + + + public FeedListRow project(@javax.annotation.Nullable String project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProject() { + return project; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProject(@javax.annotation.Nullable String project) { + this.project = project; + } + + + public FeedListRow projectId(@javax.annotation.Nullable String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@javax.annotation.Nullable String projectId) { + this.projectId = projectId; + } + + + public FeedListRow environment(@javax.annotation.Nullable String environment) { + this.environment = environment; + return this; + } + + /** + * Get environment + * @return environment + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENVIRONMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEnvironment() { + return environment; + } + + + @JsonProperty(JSON_PROPERTY_ENVIRONMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnvironment(@javax.annotation.Nullable String environment) { + this.environment = environment; + } + + + public FeedListRow evalScore(@javax.annotation.Nullable BigDecimal evalScore) { + this.evalScore = evalScore; + return this; + } + + /** + * Get evalScore + * @return evalScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getEvalScore() { + return evalScore; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalScore(@javax.annotation.Nullable BigDecimal evalScore) { + this.evalScore = evalScore; + } + + + public FeedListRow traceId(@javax.annotation.Nullable String traceId) { + this.traceId = traceId; + return this; + } + + /** + * Get traceId + * @return traceId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTraceId() { + return traceId; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceId(@javax.annotation.Nullable String traceId) { + this.traceId = traceId; + } + + + public FeedListRow externalIssueUrl(@javax.annotation.Nullable String externalIssueUrl) { + this.externalIssueUrl = externalIssueUrl; + return this; + } + + /** + * Get externalIssueUrl + * @return externalIssueUrl + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_ISSUE_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExternalIssueUrl() { + return externalIssueUrl; + } + + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ISSUE_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalIssueUrl(@javax.annotation.Nullable String externalIssueUrl) { + this.externalIssueUrl = externalIssueUrl; + } + + + public FeedListRow externalIssueId(@javax.annotation.Nullable String externalIssueId) { + this.externalIssueId = externalIssueId; + return this; + } + + /** + * Get externalIssueId + * @return externalIssueId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_ISSUE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExternalIssueId() { + return externalIssueId; + } + + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ISSUE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalIssueId(@javax.annotation.Nullable String externalIssueId) { + this.externalIssueId = externalIssueId; + } + + + /** + * Return true if this FeedListRow object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedListRow feedListRow = (FeedListRow) o; + return Objects.equals(this.clusterId, feedListRow.clusterId) && + Objects.equals(this.source, feedListRow.source) && + Objects.equals(this.error, feedListRow.error) && + Objects.equals(this.status, feedListRow.status) && + Objects.equals(this.severity, feedListRow.severity) && + Objects.equals(this.occurrences, feedListRow.occurrences) && + Objects.equals(this.traceCount, feedListRow.traceCount) && + Objects.equals(this.fixLayer, feedListRow.fixLayer) && + Objects.equals(this.usersAffected, feedListRow.usersAffected) && + Objects.equals(this.sessions, feedListRow.sessions) && + Objects.equals(this.firstSeen, feedListRow.firstSeen) && + Objects.equals(this.lastSeen, feedListRow.lastSeen) && + Objects.equals(this.trends, feedListRow.trends) && + Objects.equals(this.assignees, feedListRow.assignees) && + Objects.equals(this.model, feedListRow.model) && + Objects.equals(this.modelVersion, feedListRow.modelVersion) && + Objects.equals(this.project, feedListRow.project) && + Objects.equals(this.projectId, feedListRow.projectId) && + Objects.equals(this.environment, feedListRow.environment) && + Objects.equals(this.evalScore, feedListRow.evalScore) && + Objects.equals(this.traceId, feedListRow.traceId) && + Objects.equals(this.externalIssueUrl, feedListRow.externalIssueUrl) && + Objects.equals(this.externalIssueId, feedListRow.externalIssueId); + } + + @Override + public int hashCode() { + return Objects.hash(clusterId, source, error, status, severity, occurrences, traceCount, fixLayer, usersAffected, sessions, firstSeen, lastSeen, trends, assignees, model, modelVersion, project, projectId, environment, evalScore, traceId, externalIssueUrl, externalIssueId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedListRow {\n"); + sb.append(" clusterId: ").append(toIndentedString(clusterId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" occurrences: ").append(toIndentedString(occurrences)).append("\n"); + sb.append(" traceCount: ").append(toIndentedString(traceCount)).append("\n"); + sb.append(" fixLayer: ").append(toIndentedString(fixLayer)).append("\n"); + sb.append(" usersAffected: ").append(toIndentedString(usersAffected)).append("\n"); + sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n"); + sb.append(" firstSeen: ").append(toIndentedString(firstSeen)).append("\n"); + sb.append(" lastSeen: ").append(toIndentedString(lastSeen)).append("\n"); + sb.append(" trends: ").append(toIndentedString(trends)).append("\n"); + sb.append(" assignees: ").append(toIndentedString(assignees)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelVersion: ").append(toIndentedString(modelVersion)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); + sb.append(" evalScore: ").append(toIndentedString(evalScore)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append(" externalIssueUrl: ").append(toIndentedString(externalIssueUrl)).append("\n"); + sb.append(" externalIssueId: ").append(toIndentedString(externalIssueId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `cluster_id` to the URL query string + if (getClusterId() != null) { + joiner.add(String.format("%scluster_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getClusterId())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(getError().toUrlQueryString(prefix + "error" + suffix)); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `severity` to the URL query string + if (getSeverity() != null) { + joiner.add(String.format("%sseverity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSeverity())))); + } + + // add `occurrences` to the URL query string + if (getOccurrences() != null) { + joiner.add(String.format("%soccurrences%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOccurrences())))); + } + + // add `trace_count` to the URL query string + if (getTraceCount() != null) { + joiner.add(String.format("%strace_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceCount())))); + } + + // add `fix_layer` to the URL query string + if (getFixLayer() != null) { + joiner.add(String.format("%sfix_layer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFixLayer())))); + } + + // add `users_affected` to the URL query string + if (getUsersAffected() != null) { + joiner.add(String.format("%susers_affected%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUsersAffected())))); + } + + // add `sessions` to the URL query string + if (getSessions() != null) { + joiner.add(String.format("%ssessions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSessions())))); + } + + // add `first_seen` to the URL query string + if (getFirstSeen() != null) { + joiner.add(String.format("%sfirst_seen%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFirstSeen())))); + } + + // add `last_seen` to the URL query string + if (getLastSeen() != null) { + joiner.add(String.format("%slast_seen%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastSeen())))); + } + + // add `trends` to the URL query string + if (getTrends() != null) { + for (int i = 0; i < getTrends().size(); i++) { + if (getTrends().get(i) != null) { + joiner.add(getTrends().get(i).toUrlQueryString(String.format("%strends%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `assignees` to the URL query string + if (getAssignees() != null) { + for (int i = 0; i < getAssignees().size(); i++) { + joiner.add(String.format("%sassignees%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getAssignees().get(i))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `model_version` to the URL query string + if (getModelVersion() != null) { + joiner.add(String.format("%smodel_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelVersion())))); + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `project_id` to the URL query string + if (getProjectId() != null) { + joiner.add(String.format("%sproject_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectId())))); + } + + // add `environment` to the URL query string + if (getEnvironment() != null) { + joiner.add(String.format("%senvironment%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnvironment())))); + } + + // add `eval_score` to the URL query string + if (getEvalScore() != null) { + joiner.add(String.format("%seval_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalScore())))); + } + + // add `trace_id` to the URL query string + if (getTraceId() != null) { + joiner.add(String.format("%strace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceId())))); + } + + // add `external_issue_url` to the URL query string + if (getExternalIssueUrl() != null) { + joiner.add(String.format("%sexternal_issue_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExternalIssueUrl())))); + } + + // add `external_issue_id` to the URL query string + if (getExternalIssueId() != null) { + joiner.add(String.format("%sexternal_issue_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExternalIssueId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebar.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebar.java new file mode 100644 index 0000000..03bbaf9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebar.java @@ -0,0 +1,291 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CoOccurringIssue; +import com.futureagi.sdk.model.EvaluationResult; +import com.futureagi.sdk.model.SidebarAIMetadata; +import com.futureagi.sdk.model.SidebarTimeline; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedSidebar + */ +@JsonPropertyOrder({ + FeedSidebar.JSON_PROPERTY_TIMELINE, + FeedSidebar.JSON_PROPERTY_AI_METADATA, + FeedSidebar.JSON_PROPERTY_EVALUATIONS, + FeedSidebar.JSON_PROPERTY_CO_OCCURRING_ISSUES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedSidebar { + public static final String JSON_PROPERTY_TIMELINE = "timeline"; + @javax.annotation.Nonnull + private SidebarTimeline timeline; + + public static final String JSON_PROPERTY_AI_METADATA = "ai_metadata"; + @javax.annotation.Nonnull + private SidebarAIMetadata aiMetadata; + + public static final String JSON_PROPERTY_EVALUATIONS = "evaluations"; + @javax.annotation.Nonnull + private List evaluations = new ArrayList<>(); + + public static final String JSON_PROPERTY_CO_OCCURRING_ISSUES = "co_occurring_issues"; + @javax.annotation.Nonnull + private List coOccurringIssues = new ArrayList<>(); + + public FeedSidebar() { + } + + public FeedSidebar timeline(@javax.annotation.Nonnull SidebarTimeline timeline) { + this.timeline = timeline; + return this; + } + + /** + * Get timeline + * @return timeline + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIMELINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SidebarTimeline getTimeline() { + return timeline; + } + + + @JsonProperty(JSON_PROPERTY_TIMELINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimeline(@javax.annotation.Nonnull SidebarTimeline timeline) { + this.timeline = timeline; + } + + + public FeedSidebar aiMetadata(@javax.annotation.Nonnull SidebarAIMetadata aiMetadata) { + this.aiMetadata = aiMetadata; + return this; + } + + /** + * Get aiMetadata + * @return aiMetadata + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AI_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SidebarAIMetadata getAiMetadata() { + return aiMetadata; + } + + + @JsonProperty(JSON_PROPERTY_AI_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAiMetadata(@javax.annotation.Nonnull SidebarAIMetadata aiMetadata) { + this.aiMetadata = aiMetadata; + } + + + public FeedSidebar evaluations(@javax.annotation.Nonnull List evaluations) { + this.evaluations = evaluations; + return this; + } + + public FeedSidebar addEvaluationsItem(EvaluationResult evaluationsItem) { + if (this.evaluations == null) { + this.evaluations = new ArrayList<>(); + } + this.evaluations.add(evaluationsItem); + return this; + } + + /** + * Get evaluations + * @return evaluations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvaluations() { + return evaluations; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluations(@javax.annotation.Nonnull List evaluations) { + this.evaluations = evaluations; + } + + + public FeedSidebar coOccurringIssues(@javax.annotation.Nonnull List coOccurringIssues) { + this.coOccurringIssues = coOccurringIssues; + return this; + } + + public FeedSidebar addCoOccurringIssuesItem(CoOccurringIssue coOccurringIssuesItem) { + if (this.coOccurringIssues == null) { + this.coOccurringIssues = new ArrayList<>(); + } + this.coOccurringIssues.add(coOccurringIssuesItem); + return this; + } + + /** + * Get coOccurringIssues + * @return coOccurringIssues + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CO_OCCURRING_ISSUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCoOccurringIssues() { + return coOccurringIssues; + } + + + @JsonProperty(JSON_PROPERTY_CO_OCCURRING_ISSUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCoOccurringIssues(@javax.annotation.Nonnull List coOccurringIssues) { + this.coOccurringIssues = coOccurringIssues; + } + + + /** + * Return true if this FeedSidebar object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedSidebar feedSidebar = (FeedSidebar) o; + return Objects.equals(this.timeline, feedSidebar.timeline) && + Objects.equals(this.aiMetadata, feedSidebar.aiMetadata) && + Objects.equals(this.evaluations, feedSidebar.evaluations) && + Objects.equals(this.coOccurringIssues, feedSidebar.coOccurringIssues); + } + + @Override + public int hashCode() { + return Objects.hash(timeline, aiMetadata, evaluations, coOccurringIssues); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedSidebar {\n"); + sb.append(" timeline: ").append(toIndentedString(timeline)).append("\n"); + sb.append(" aiMetadata: ").append(toIndentedString(aiMetadata)).append("\n"); + sb.append(" evaluations: ").append(toIndentedString(evaluations)).append("\n"); + sb.append(" coOccurringIssues: ").append(toIndentedString(coOccurringIssues)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `timeline` to the URL query string + if (getTimeline() != null) { + joiner.add(getTimeline().toUrlQueryString(prefix + "timeline" + suffix)); + } + + // add `ai_metadata` to the URL query string + if (getAiMetadata() != null) { + joiner.add(getAiMetadata().toUrlQueryString(prefix + "ai_metadata" + suffix)); + } + + // add `evaluations` to the URL query string + if (getEvaluations() != null) { + for (int i = 0; i < getEvaluations().size(); i++) { + if (getEvaluations().get(i) != null) { + joiner.add(getEvaluations().get(i).toUrlQueryString(String.format("%sevaluations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `co_occurring_issues` to the URL query string + if (getCoOccurringIssues() != null) { + for (int i = 0; i < getCoOccurringIssues().size(); i++) { + if (getCoOccurringIssues().get(i) != null) { + joiner.add(getCoOccurringIssues().get(i).toUrlQueryString(String.format("%sco_occurring_issues%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebarApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebarApiResponse.java new file mode 100644 index 0000000..5ed5b3d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedSidebarApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.FeedSidebar; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedSidebarApiResponse + */ +@JsonPropertyOrder({ + FeedSidebarApiResponse.JSON_PROPERTY_STATUS, + FeedSidebarApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedSidebarApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private FeedSidebar result; + + public FeedSidebarApiResponse() { + } + + public FeedSidebarApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public FeedSidebarApiResponse result(@javax.annotation.Nonnull FeedSidebar result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FeedSidebar getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull FeedSidebar result) { + this.result = result; + } + + + /** + * Return true if this FeedSidebarApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedSidebarApiResponse feedSidebarApiResponse = (FeedSidebarApiResponse) o; + return Objects.equals(this.status, feedSidebarApiResponse.status) && + Objects.equals(this.result, feedSidebarApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedSidebarApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStats.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStats.java new file mode 100644 index 0000000..fbeee24 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStats.java @@ -0,0 +1,331 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedStats + */ +@JsonPropertyOrder({ + FeedStats.JSON_PROPERTY_TOTAL_ERRORS, + FeedStats.JSON_PROPERTY_ESCALATING, + FeedStats.JSON_PROPERTY_FOR_REVIEW, + FeedStats.JSON_PROPERTY_ACKNOWLEDGED, + FeedStats.JSON_PROPERTY_RESOLVED, + FeedStats.JSON_PROPERTY_AFFECTED_USERS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedStats { + public static final String JSON_PROPERTY_TOTAL_ERRORS = "total_errors"; + @javax.annotation.Nonnull + private Integer totalErrors; + + public static final String JSON_PROPERTY_ESCALATING = "escalating"; + @javax.annotation.Nonnull + private Integer escalating; + + public static final String JSON_PROPERTY_FOR_REVIEW = "for_review"; + @javax.annotation.Nonnull + private Integer forReview; + + public static final String JSON_PROPERTY_ACKNOWLEDGED = "acknowledged"; + @javax.annotation.Nonnull + private Integer acknowledged; + + public static final String JSON_PROPERTY_RESOLVED = "resolved"; + @javax.annotation.Nonnull + private Integer resolved; + + public static final String JSON_PROPERTY_AFFECTED_USERS = "affected_users"; + @javax.annotation.Nonnull + private Integer affectedUsers; + + public FeedStats() { + } + + public FeedStats totalErrors(@javax.annotation.Nonnull Integer totalErrors) { + this.totalErrors = totalErrors; + return this; + } + + /** + * Get totalErrors + * @return totalErrors + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalErrors() { + return totalErrors; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalErrors(@javax.annotation.Nonnull Integer totalErrors) { + this.totalErrors = totalErrors; + } + + + public FeedStats escalating(@javax.annotation.Nonnull Integer escalating) { + this.escalating = escalating; + return this; + } + + /** + * Get escalating + * @return escalating + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ESCALATING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getEscalating() { + return escalating; + } + + + @JsonProperty(JSON_PROPERTY_ESCALATING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEscalating(@javax.annotation.Nonnull Integer escalating) { + this.escalating = escalating; + } + + + public FeedStats forReview(@javax.annotation.Nonnull Integer forReview) { + this.forReview = forReview; + return this; + } + + /** + * Get forReview + * @return forReview + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FOR_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getForReview() { + return forReview; + } + + + @JsonProperty(JSON_PROPERTY_FOR_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setForReview(@javax.annotation.Nonnull Integer forReview) { + this.forReview = forReview; + } + + + public FeedStats acknowledged(@javax.annotation.Nonnull Integer acknowledged) { + this.acknowledged = acknowledged; + return this; + } + + /** + * Get acknowledged + * @return acknowledged + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACKNOWLEDGED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAcknowledged() { + return acknowledged; + } + + + @JsonProperty(JSON_PROPERTY_ACKNOWLEDGED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAcknowledged(@javax.annotation.Nonnull Integer acknowledged) { + this.acknowledged = acknowledged; + } + + + public FeedStats resolved(@javax.annotation.Nonnull Integer resolved) { + this.resolved = resolved; + return this; + } + + /** + * Get resolved + * @return resolved + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESOLVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getResolved() { + return resolved; + } + + + @JsonProperty(JSON_PROPERTY_RESOLVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResolved(@javax.annotation.Nonnull Integer resolved) { + this.resolved = resolved; + } + + + public FeedStats affectedUsers(@javax.annotation.Nonnull Integer affectedUsers) { + this.affectedUsers = affectedUsers; + return this; + } + + /** + * Get affectedUsers + * @return affectedUsers + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AFFECTED_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAffectedUsers() { + return affectedUsers; + } + + + @JsonProperty(JSON_PROPERTY_AFFECTED_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAffectedUsers(@javax.annotation.Nonnull Integer affectedUsers) { + this.affectedUsers = affectedUsers; + } + + + /** + * Return true if this FeedStats object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedStats feedStats = (FeedStats) o; + return Objects.equals(this.totalErrors, feedStats.totalErrors) && + Objects.equals(this.escalating, feedStats.escalating) && + Objects.equals(this.forReview, feedStats.forReview) && + Objects.equals(this.acknowledged, feedStats.acknowledged) && + Objects.equals(this.resolved, feedStats.resolved) && + Objects.equals(this.affectedUsers, feedStats.affectedUsers); + } + + @Override + public int hashCode() { + return Objects.hash(totalErrors, escalating, forReview, acknowledged, resolved, affectedUsers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedStats {\n"); + sb.append(" totalErrors: ").append(toIndentedString(totalErrors)).append("\n"); + sb.append(" escalating: ").append(toIndentedString(escalating)).append("\n"); + sb.append(" forReview: ").append(toIndentedString(forReview)).append("\n"); + sb.append(" acknowledged: ").append(toIndentedString(acknowledged)).append("\n"); + sb.append(" resolved: ").append(toIndentedString(resolved)).append("\n"); + sb.append(" affectedUsers: ").append(toIndentedString(affectedUsers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total_errors` to the URL query string + if (getTotalErrors() != null) { + joiner.add(String.format("%stotal_errors%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalErrors())))); + } + + // add `escalating` to the URL query string + if (getEscalating() != null) { + joiner.add(String.format("%sescalating%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEscalating())))); + } + + // add `for_review` to the URL query string + if (getForReview() != null) { + joiner.add(String.format("%sfor_review%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getForReview())))); + } + + // add `acknowledged` to the URL query string + if (getAcknowledged() != null) { + joiner.add(String.format("%sacknowledged%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAcknowledged())))); + } + + // add `resolved` to the URL query string + if (getResolved() != null) { + joiner.add(String.format("%sresolved%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResolved())))); + } + + // add `affected_users` to the URL query string + if (getAffectedUsers() != null) { + joiner.add(String.format("%saffected_users%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAffectedUsers())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStatsApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStatsApiResponse.java new file mode 100644 index 0000000..4d8bb42 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedStatsApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.FeedStats; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedStatsApiResponse + */ +@JsonPropertyOrder({ + FeedStatsApiResponse.JSON_PROPERTY_STATUS, + FeedStatsApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedStatsApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private FeedStats result; + + public FeedStatsApiResponse() { + } + + public FeedStatsApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public FeedStatsApiResponse result(@javax.annotation.Nonnull FeedStats result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FeedStats getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull FeedStats result) { + this.result = result; + } + + + /** + * Return true if this FeedStatsApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedStatsApiResponse feedStatsApiResponse = (FeedStatsApiResponse) o; + return Objects.equals(this.status, feedStatsApiResponse.status) && + Objects.equals(this.result, feedStatsApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedStatsApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedUpdateBody.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedUpdateBody.java new file mode 100644 index 0000000..4683e14 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/FeedUpdateBody.java @@ -0,0 +1,360 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * FeedUpdateBody + */ +@JsonPropertyOrder({ + FeedUpdateBody.JSON_PROPERTY_PROJECT_ID, + FeedUpdateBody.JSON_PROPERTY_STATUS, + FeedUpdateBody.JSON_PROPERTY_SEVERITY, + FeedUpdateBody.JSON_PROPERTY_ASSIGNEE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class FeedUpdateBody { + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + @javax.annotation.Nullable + private UUID projectId; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + ESCALATING(String.valueOf("escalating")), + + FOR_REVIEW(String.valueOf("for_review")), + + ACKNOWLEDGED(String.valueOf("acknowledged")), + + RESOLVED(String.valueOf("resolved")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + /** + * Gets or Sets severity + */ + public enum SeverityEnum { + CRITICAL(String.valueOf("critical")), + + HIGH(String.valueOf("high")), + + MEDIUM(String.valueOf("medium")), + + LOW(String.valueOf("low")); + + private String value; + + SeverityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SeverityEnum fromValue(String value) { + for (SeverityEnum b : SeverityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + @javax.annotation.Nullable + private SeverityEnum severity; + + public static final String JSON_PROPERTY_ASSIGNEE = "assignee"; + private JsonNullable assignee = JsonNullable.undefined(); + + public FeedUpdateBody() { + } + + public FeedUpdateBody projectId(@javax.annotation.Nullable UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProjectId(@javax.annotation.Nullable UUID projectId) { + this.projectId = projectId; + } + + + public FeedUpdateBody status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public FeedUpdateBody severity(@javax.annotation.Nullable SeverityEnum severity) { + this.severity = severity; + return this; + } + + /** + * Get severity + * @return severity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SeverityEnum getSeverity() { + return severity; + } + + + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSeverity(@javax.annotation.Nullable SeverityEnum severity) { + this.severity = severity; + } + + + public FeedUpdateBody assignee(@javax.annotation.Nullable String assignee) { + this.assignee = JsonNullable.of(assignee); + return this; + } + + /** + * Get assignee + * @return assignee + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAssignee() { + return assignee.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSIGNEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssignee_JsonNullable() { + return assignee; + } + + @JsonProperty(JSON_PROPERTY_ASSIGNEE) + public void setAssignee_JsonNullable(JsonNullable assignee) { + this.assignee = assignee; + } + + public void setAssignee(@javax.annotation.Nullable String assignee) { + this.assignee = JsonNullable.of(assignee); + } + + + /** + * Return true if this FeedUpdateBody object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeedUpdateBody feedUpdateBody = (FeedUpdateBody) o; + return Objects.equals(this.projectId, feedUpdateBody.projectId) && + Objects.equals(this.status, feedUpdateBody.status) && + Objects.equals(this.severity, feedUpdateBody.severity) && + equalsNullable(this.assignee, feedUpdateBody.assignee); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, status, severity, hashCodeNullable(assignee)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeedUpdateBody {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `project_id` to the URL query string + if (getProjectId() != null) { + joiner.add(String.format("%sproject_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `severity` to the URL query string + if (getSeverity() != null) { + joiner.add(String.format("%sseverity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSeverity())))); + } + + // add `assignee` to the URL query string + if (getAssignee() != null) { + joiner.add(String.format("%sassignee%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignee())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Feedback.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Feedback.java new file mode 100644 index 0000000..3456360 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Feedback.java @@ -0,0 +1,576 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Feedback + */ +@JsonPropertyOrder({ + Feedback.JSON_PROPERTY_ID, + Feedback.JSON_PROPERTY_SOURCE_ID, + Feedback.JSON_PROPERTY_SOURCE, + Feedback.JSON_PROPERTY_USER_EVAL_METRIC, + Feedback.JSON_PROPERTY_VALUE, + Feedback.JSON_PROPERTY_EXPLANATION, + Feedback.JSON_PROPERTY_ROW_ID, + Feedback.JSON_PROPERTY_CUSTOM_EVAL_CONFIG_ID, + Feedback.JSON_PROPERTY_FEEDBACK_IMPROVEMENT, + Feedback.JSON_PROPERTY_ACTION_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Feedback { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nonnull + private String sourceId; + + /** + * Gets or Sets source + */ + public enum SourceEnum { + DATASET(String.valueOf("dataset")), + + PROMPT(String.valueOf("prompt")), + + SDK(String.valueOf("sdk")), + + TRACE(String.valueOf("trace")), + + EXPERIMENT(String.valueOf("experiment")), + + OBSERVE(String.valueOf("observe")), + + EVAL_PLAYGROUND(String.valueOf("eval_playground")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nonnull + private SourceEnum source; + + public static final String JSON_PROPERTY_USER_EVAL_METRIC = "user_eval_metric"; + private JsonNullable userEvalMetric = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_EXPLANATION = "explanation"; + private JsonNullable explanation = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ROW_ID = "row_id"; + private JsonNullable rowId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CUSTOM_EVAL_CONFIG_ID = "custom_eval_config_id"; + private JsonNullable customEvalConfigId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FEEDBACK_IMPROVEMENT = "feedback_improvement"; + private JsonNullable feedbackImprovement = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ACTION_TYPE = "action_type"; + private JsonNullable actionType = JsonNullable.undefined(); + + public Feedback() { + } + + @JsonCreator + public Feedback( + @JsonProperty(JSON_PROPERTY_ID) UUID id + ) { + this(); + this.id = id; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public Feedback sourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceId(@javax.annotation.Nonnull String sourceId) { + this.sourceId = sourceId; + } + + + public Feedback source(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceEnum getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + } + + + public Feedback userEvalMetric(@javax.annotation.Nullable UUID userEvalMetric) { + this.userEvalMetric = JsonNullable.of(userEvalMetric); + return this; + } + + /** + * Get userEvalMetric + * @return userEvalMetric + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getUserEvalMetric() { + return userEvalMetric.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUserEvalMetric_JsonNullable() { + return userEvalMetric; + } + + @JsonProperty(JSON_PROPERTY_USER_EVAL_METRIC) + public void setUserEvalMetric_JsonNullable(JsonNullable userEvalMetric) { + this.userEvalMetric = userEvalMetric; + } + + public void setUserEvalMetric(@javax.annotation.Nullable UUID userEvalMetric) { + this.userEvalMetric = JsonNullable.of(userEvalMetric); + } + + + public Feedback value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + + public Feedback explanation(@javax.annotation.Nullable String explanation) { + this.explanation = JsonNullable.of(explanation); + return this; + } + + /** + * Get explanation + * @return explanation + */ + @javax.annotation.Nullable + @JsonIgnore + public String getExplanation() { + return explanation.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExplanation_JsonNullable() { + return explanation; + } + + @JsonProperty(JSON_PROPERTY_EXPLANATION) + public void setExplanation_JsonNullable(JsonNullable explanation) { + this.explanation = explanation; + } + + public void setExplanation(@javax.annotation.Nullable String explanation) { + this.explanation = JsonNullable.of(explanation); + } + + + public Feedback rowId(@javax.annotation.Nullable String rowId) { + this.rowId = JsonNullable.of(rowId); + return this; + } + + /** + * Get rowId + * @return rowId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getRowId() { + return rowId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRowId_JsonNullable() { + return rowId; + } + + @JsonProperty(JSON_PROPERTY_ROW_ID) + public void setRowId_JsonNullable(JsonNullable rowId) { + this.rowId = rowId; + } + + public void setRowId(@javax.annotation.Nullable String rowId) { + this.rowId = JsonNullable.of(rowId); + } + + + public Feedback customEvalConfigId(@javax.annotation.Nullable UUID customEvalConfigId) { + this.customEvalConfigId = JsonNullable.of(customEvalConfigId); + return this; + } + + /** + * Get customEvalConfigId + * @return customEvalConfigId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getCustomEvalConfigId() { + return customEvalConfigId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_EVAL_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomEvalConfigId_JsonNullable() { + return customEvalConfigId; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_EVAL_CONFIG_ID) + public void setCustomEvalConfigId_JsonNullable(JsonNullable customEvalConfigId) { + this.customEvalConfigId = customEvalConfigId; + } + + public void setCustomEvalConfigId(@javax.annotation.Nullable UUID customEvalConfigId) { + this.customEvalConfigId = JsonNullable.of(customEvalConfigId); + } + + + public Feedback feedbackImprovement(@javax.annotation.Nullable String feedbackImprovement) { + this.feedbackImprovement = JsonNullable.of(feedbackImprovement); + return this; + } + + /** + * Get feedbackImprovement + * @return feedbackImprovement + */ + @javax.annotation.Nullable + @JsonIgnore + public String getFeedbackImprovement() { + return feedbackImprovement.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FEEDBACK_IMPROVEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFeedbackImprovement_JsonNullable() { + return feedbackImprovement; + } + + @JsonProperty(JSON_PROPERTY_FEEDBACK_IMPROVEMENT) + public void setFeedbackImprovement_JsonNullable(JsonNullable feedbackImprovement) { + this.feedbackImprovement = feedbackImprovement; + } + + public void setFeedbackImprovement(@javax.annotation.Nullable String feedbackImprovement) { + this.feedbackImprovement = JsonNullable.of(feedbackImprovement); + } + + + public Feedback actionType(@javax.annotation.Nullable String actionType) { + this.actionType = JsonNullable.of(actionType); + return this; + } + + /** + * Get actionType + * @return actionType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getActionType() { + return actionType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getActionType_JsonNullable() { + return actionType; + } + + @JsonProperty(JSON_PROPERTY_ACTION_TYPE) + public void setActionType_JsonNullable(JsonNullable actionType) { + this.actionType = actionType; + } + + public void setActionType(@javax.annotation.Nullable String actionType) { + this.actionType = JsonNullable.of(actionType); + } + + + /** + * Return true if this Feedback object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Feedback feedback = (Feedback) o; + return Objects.equals(this.id, feedback.id) && + Objects.equals(this.sourceId, feedback.sourceId) && + Objects.equals(this.source, feedback.source) && + equalsNullable(this.userEvalMetric, feedback.userEvalMetric) && + Objects.equals(this.value, feedback.value) && + equalsNullable(this.explanation, feedback.explanation) && + equalsNullable(this.rowId, feedback.rowId) && + equalsNullable(this.customEvalConfigId, feedback.customEvalConfigId) && + equalsNullable(this.feedbackImprovement, feedback.feedbackImprovement) && + equalsNullable(this.actionType, feedback.actionType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, sourceId, source, hashCodeNullable(userEvalMetric), value, hashCodeNullable(explanation), hashCodeNullable(rowId), hashCodeNullable(customEvalConfigId), hashCodeNullable(feedbackImprovement), hashCodeNullable(actionType)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Feedback {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" userEvalMetric: ").append(toIndentedString(userEvalMetric)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" explanation: ").append(toIndentedString(explanation)).append("\n"); + sb.append(" rowId: ").append(toIndentedString(rowId)).append("\n"); + sb.append(" customEvalConfigId: ").append(toIndentedString(customEvalConfigId)).append("\n"); + sb.append(" feedbackImprovement: ").append(toIndentedString(feedbackImprovement)).append("\n"); + sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `user_eval_metric` to the URL query string + if (getUserEvalMetric() != null) { + joiner.add(String.format("%suser_eval_metric%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserEvalMetric())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `explanation` to the URL query string + if (getExplanation() != null) { + joiner.add(String.format("%sexplanation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExplanation())))); + } + + // add `row_id` to the URL query string + if (getRowId() != null) { + joiner.add(String.format("%srow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowId())))); + } + + // add `custom_eval_config_id` to the URL query string + if (getCustomEvalConfigId() != null) { + joiner.add(String.format("%scustom_eval_config_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomEvalConfigId())))); + } + + // add `feedback_improvement` to the URL query string + if (getFeedbackImprovement() != null) { + joiner.add(String.format("%sfeedback_improvement%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFeedbackImprovement())))); + } + + // add `action_type` to the URL query string + if (getActionType() != null) { + joiner.add(String.format("%saction_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getActionType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GetAnnotationLabelsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetAnnotationLabelsResponse.java new file mode 100644 index 0000000..e4e6efd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetAnnotationLabelsResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AnnotationLabelResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GetAnnotationLabelsResponse + */ +@JsonPropertyOrder({ + GetAnnotationLabelsResponse.JSON_PROPERTY_STATUS, + GetAnnotationLabelsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetAnnotationLabelsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public GetAnnotationLabelsResponse() { + } + + public GetAnnotationLabelsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public GetAnnotationLabelsResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public GetAnnotationLabelsResponse addResultItem(AnnotationLabelResponse resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + /** + * Return true if this GetAnnotationLabelsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAnnotationLabelsResponse getAnnotationLabelsResponse = (GetAnnotationLabelsResponse) o; + return Objects.equals(this.status, getAnnotationLabelsResponse.status) && + Objects.equals(this.result, getAnnotationLabelsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAnnotationLabelsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotation.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotation.java new file mode 100644 index 0000000..d9549c3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotation.java @@ -0,0 +1,289 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GetTraceAnnotation + */ +@JsonPropertyOrder({ + GetTraceAnnotation.JSON_PROPERTY_OBSERVATION_SPAN_ID, + GetTraceAnnotation.JSON_PROPERTY_TRACE_ID, + GetTraceAnnotation.JSON_PROPERTY_ANNOTATORS, + GetTraceAnnotation.JSON_PROPERTY_EXCLUDE_ANNOTATORS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetTraceAnnotation { + public static final String JSON_PROPERTY_OBSERVATION_SPAN_ID = "observation_span_id"; + private JsonNullable observationSpanId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + private JsonNullable traceId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANNOTATORS = "annotators"; + @javax.annotation.Nullable + private String annotators; + + public static final String JSON_PROPERTY_EXCLUDE_ANNOTATORS = "exclude_annotators"; + @javax.annotation.Nullable + private String excludeAnnotators; + + public GetTraceAnnotation() { + } + + public GetTraceAnnotation observationSpanId(@javax.annotation.Nullable String observationSpanId) { + this.observationSpanId = JsonNullable.of(observationSpanId); + return this; + } + + /** + * Get observationSpanId + * @return observationSpanId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getObservationSpanId() { + return observationSpanId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBSERVATION_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getObservationSpanId_JsonNullable() { + return observationSpanId; + } + + @JsonProperty(JSON_PROPERTY_OBSERVATION_SPAN_ID) + public void setObservationSpanId_JsonNullable(JsonNullable observationSpanId) { + this.observationSpanId = observationSpanId; + } + + public void setObservationSpanId(@javax.annotation.Nullable String observationSpanId) { + this.observationSpanId = JsonNullable.of(observationSpanId); + } + + + public GetTraceAnnotation traceId(@javax.annotation.Nullable UUID traceId) { + this.traceId = JsonNullable.of(traceId); + return this; + } + + /** + * Get traceId + * @return traceId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getTraceId() { + return traceId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTraceId_JsonNullable() { + return traceId; + } + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + public void setTraceId_JsonNullable(JsonNullable traceId) { + this.traceId = traceId; + } + + public void setTraceId(@javax.annotation.Nullable UUID traceId) { + this.traceId = JsonNullable.of(traceId); + } + + + public GetTraceAnnotation annotators(@javax.annotation.Nullable String annotators) { + this.annotators = annotators; + return this; + } + + /** + * JSON-encoded UUID list. + * @return annotators + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAnnotators() { + return annotators; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnotators(@javax.annotation.Nullable String annotators) { + this.annotators = annotators; + } + + + public GetTraceAnnotation excludeAnnotators(@javax.annotation.Nullable String excludeAnnotators) { + this.excludeAnnotators = excludeAnnotators; + return this; + } + + /** + * JSON-encoded UUID list. + * @return excludeAnnotators + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_ANNOTATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExcludeAnnotators() { + return excludeAnnotators; + } + + + @JsonProperty(JSON_PROPERTY_EXCLUDE_ANNOTATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExcludeAnnotators(@javax.annotation.Nullable String excludeAnnotators) { + this.excludeAnnotators = excludeAnnotators; + } + + + /** + * Return true if this GetTraceAnnotation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTraceAnnotation getTraceAnnotation = (GetTraceAnnotation) o; + return equalsNullable(this.observationSpanId, getTraceAnnotation.observationSpanId) && + equalsNullable(this.traceId, getTraceAnnotation.traceId) && + Objects.equals(this.annotators, getTraceAnnotation.annotators) && + Objects.equals(this.excludeAnnotators, getTraceAnnotation.excludeAnnotators); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(observationSpanId), hashCodeNullable(traceId), annotators, excludeAnnotators); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTraceAnnotation {\n"); + sb.append(" observationSpanId: ").append(toIndentedString(observationSpanId)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append(" annotators: ").append(toIndentedString(annotators)).append("\n"); + sb.append(" excludeAnnotators: ").append(toIndentedString(excludeAnnotators)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `observation_span_id` to the URL query string + if (getObservationSpanId() != null) { + joiner.add(String.format("%sobservation_span_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getObservationSpanId())))); + } + + // add `trace_id` to the URL query string + if (getTraceId() != null) { + joiner.add(String.format("%strace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceId())))); + } + + // add `annotators` to the URL query string + if (getAnnotators() != null) { + joiner.add(String.format("%sannotators%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotators())))); + } + + // add `exclude_annotators` to the URL query string + if (getExcludeAnnotators() != null) { + joiner.add(String.format("%sexclude_annotators%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExcludeAnnotators())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResponse.java new file mode 100644 index 0000000..a59a295 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.GetTraceAnnotationValuesResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GetTraceAnnotationValuesResponse + */ +@JsonPropertyOrder({ + GetTraceAnnotationValuesResponse.JSON_PROPERTY_STATUS, + GetTraceAnnotationValuesResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetTraceAnnotationValuesResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private GetTraceAnnotationValuesResult result; + + public GetTraceAnnotationValuesResponse() { + } + + public GetTraceAnnotationValuesResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public GetTraceAnnotationValuesResponse result(@javax.annotation.Nonnull GetTraceAnnotationValuesResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetTraceAnnotationValuesResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull GetTraceAnnotationValuesResult result) { + this.result = result; + } + + + /** + * Return true if this GetTraceAnnotationValuesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTraceAnnotationValuesResponse getTraceAnnotationValuesResponse = (GetTraceAnnotationValuesResponse) o; + return Objects.equals(this.status, getTraceAnnotationValuesResponse.status) && + Objects.equals(this.result, getTraceAnnotationValuesResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTraceAnnotationValuesResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResult.java new file mode 100644 index 0000000..94a347e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GetTraceAnnotationValuesResult.java @@ -0,0 +1,217 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TraceAnnotationNoteResponse; +import com.futureagi.sdk.model.TraceAnnotationValueResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GetTraceAnnotationValuesResult + */ +@JsonPropertyOrder({ + GetTraceAnnotationValuesResult.JSON_PROPERTY_ANNOTATIONS, + GetTraceAnnotationValuesResult.JSON_PROPERTY_NOTES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GetTraceAnnotationValuesResult { + public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; + @javax.annotation.Nonnull + private List annotations = new ArrayList<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nonnull + private List notes = new ArrayList<>(); + + public GetTraceAnnotationValuesResult() { + } + + public GetTraceAnnotationValuesResult annotations(@javax.annotation.Nonnull List annotations) { + this.annotations = annotations; + return this; + } + + public GetTraceAnnotationValuesResult addAnnotationsItem(TraceAnnotationValueResponse annotationsItem) { + if (this.annotations == null) { + this.annotations = new ArrayList<>(); + } + this.annotations.add(annotationsItem); + return this; + } + + /** + * Get annotations + * @return annotations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotations() { + return annotations; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotations(@javax.annotation.Nonnull List annotations) { + this.annotations = annotations; + } + + + public GetTraceAnnotationValuesResult notes(@javax.annotation.Nonnull List notes) { + this.notes = notes; + return this; + } + + public GetTraceAnnotationValuesResult addNotesItem(TraceAnnotationNoteResponse notesItem) { + if (this.notes == null) { + this.notes = new ArrayList<>(); + } + this.notes.add(notesItem); + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotes(@javax.annotation.Nonnull List notes) { + this.notes = notes; + } + + + /** + * Return true if this GetTraceAnnotationValuesResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTraceAnnotationValuesResult getTraceAnnotationValuesResult = (GetTraceAnnotationValuesResult) o; + return Objects.equals(this.annotations, getTraceAnnotationValuesResult.annotations) && + Objects.equals(this.notes, getTraceAnnotationValuesResult.notes); + } + + @Override + public int hashCode() { + return Objects.hash(annotations, notes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTraceAnnotationValuesResult {\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `annotations` to the URL query string + if (getAnnotations() != null) { + for (int i = 0; i < getAnnotations().size(); i++) { + if (getAnnotations().get(i) != null) { + joiner.add(getAnnotations().get(i).toUrlQueryString(String.format("%sannotations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + for (int i = 0; i < getNotes().size(); i++) { + if (getNotes().get(i) != null) { + joiner.add(getNotes().get(i).toUrlQueryString(String.format("%snotes%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfig.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfig.java new file mode 100644 index 0000000..6f3b4ac --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfig.java @@ -0,0 +1,355 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthConfig + */ +@JsonPropertyOrder({ + GroundTruthConfig.JSON_PROPERTY_ENABLED, + GroundTruthConfig.JSON_PROPERTY_GROUND_TRUTH_ID, + GroundTruthConfig.JSON_PROPERTY_MODE, + GroundTruthConfig.JSON_PROPERTY_MAX_EXAMPLES, + GroundTruthConfig.JSON_PROPERTY_SIMILARITY_THRESHOLD, + GroundTruthConfig.JSON_PROPERTY_INJECTION_FORMAT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthConfig { + public static final String JSON_PROPERTY_ENABLED = "enabled"; + @javax.annotation.Nullable + private Boolean enabled; + + public static final String JSON_PROPERTY_GROUND_TRUTH_ID = "ground_truth_id"; + private JsonNullable groundTruthId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODE = "mode"; + @javax.annotation.Nullable + private String mode; + + public static final String JSON_PROPERTY_MAX_EXAMPLES = "max_examples"; + @javax.annotation.Nullable + private Integer maxExamples; + + public static final String JSON_PROPERTY_SIMILARITY_THRESHOLD = "similarity_threshold"; + @javax.annotation.Nullable + private BigDecimal similarityThreshold; + + public static final String JSON_PROPERTY_INJECTION_FORMAT = "injection_format"; + @javax.annotation.Nullable + private String injectionFormat; + + public GroundTruthConfig() { + } + + public GroundTruthConfig enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + } + + + public GroundTruthConfig groundTruthId(@javax.annotation.Nullable UUID groundTruthId) { + this.groundTruthId = JsonNullable.of(groundTruthId); + return this; + } + + /** + * Get groundTruthId + * @return groundTruthId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getGroundTruthId() { + return groundTruthId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_GROUND_TRUTH_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getGroundTruthId_JsonNullable() { + return groundTruthId; + } + + @JsonProperty(JSON_PROPERTY_GROUND_TRUTH_ID) + public void setGroundTruthId_JsonNullable(JsonNullable groundTruthId) { + this.groundTruthId = groundTruthId; + } + + public void setGroundTruthId(@javax.annotation.Nullable UUID groundTruthId) { + this.groundTruthId = JsonNullable.of(groundTruthId); + } + + + public GroundTruthConfig mode(@javax.annotation.Nullable String mode) { + this.mode = mode; + return this; + } + + /** + * Get mode + * @return mode + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMode() { + return mode; + } + + + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(@javax.annotation.Nullable String mode) { + this.mode = mode; + } + + + public GroundTruthConfig maxExamples(@javax.annotation.Nullable Integer maxExamples) { + this.maxExamples = maxExamples; + return this; + } + + /** + * Get maxExamples + * @return maxExamples + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_EXAMPLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxExamples() { + return maxExamples; + } + + + @JsonProperty(JSON_PROPERTY_MAX_EXAMPLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxExamples(@javax.annotation.Nullable Integer maxExamples) { + this.maxExamples = maxExamples; + } + + + public GroundTruthConfig similarityThreshold(@javax.annotation.Nullable BigDecimal similarityThreshold) { + this.similarityThreshold = similarityThreshold; + return this; + } + + /** + * Get similarityThreshold + * @return similarityThreshold + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMILARITY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getSimilarityThreshold() { + return similarityThreshold; + } + + + @JsonProperty(JSON_PROPERTY_SIMILARITY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSimilarityThreshold(@javax.annotation.Nullable BigDecimal similarityThreshold) { + this.similarityThreshold = similarityThreshold; + } + + + public GroundTruthConfig injectionFormat(@javax.annotation.Nullable String injectionFormat) { + this.injectionFormat = injectionFormat; + return this; + } + + /** + * Get injectionFormat + * @return injectionFormat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INJECTION_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInjectionFormat() { + return injectionFormat; + } + + + @JsonProperty(JSON_PROPERTY_INJECTION_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInjectionFormat(@javax.annotation.Nullable String injectionFormat) { + this.injectionFormat = injectionFormat; + } + + + /** + * Return true if this GroundTruthConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthConfig groundTruthConfig = (GroundTruthConfig) o; + return Objects.equals(this.enabled, groundTruthConfig.enabled) && + equalsNullable(this.groundTruthId, groundTruthConfig.groundTruthId) && + Objects.equals(this.mode, groundTruthConfig.mode) && + Objects.equals(this.maxExamples, groundTruthConfig.maxExamples) && + Objects.equals(this.similarityThreshold, groundTruthConfig.similarityThreshold) && + Objects.equals(this.injectionFormat, groundTruthConfig.injectionFormat); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, hashCodeNullable(groundTruthId), mode, maxExamples, similarityThreshold, injectionFormat); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthConfig {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" groundTruthId: ").append(toIndentedString(groundTruthId)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" maxExamples: ").append(toIndentedString(maxExamples)).append("\n"); + sb.append(" similarityThreshold: ").append(toIndentedString(similarityThreshold)).append("\n"); + sb.append(" injectionFormat: ").append(toIndentedString(injectionFormat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format("%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + } + + // add `ground_truth_id` to the URL query string + if (getGroundTruthId() != null) { + joiner.add(String.format("%sground_truth_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGroundTruthId())))); + } + + // add `mode` to the URL query string + if (getMode() != null) { + joiner.add(String.format("%smode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMode())))); + } + + // add `max_examples` to the URL query string + if (getMaxExamples() != null) { + joiner.add(String.format("%smax_examples%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxExamples())))); + } + + // add `similarity_threshold` to the URL query string + if (getSimilarityThreshold() != null) { + joiner.add(String.format("%ssimilarity_threshold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimilarityThreshold())))); + } + + // add `injection_format` to the URL query string + if (getInjectionFormat() != null) { + joiner.add(String.format("%sinjection_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInjectionFormat())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigRequest.java new file mode 100644 index 0000000..96b56e6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigRequest.java @@ -0,0 +1,433 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthConfigRequest + */ +@JsonPropertyOrder({ + GroundTruthConfigRequest.JSON_PROPERTY_ENABLED, + GroundTruthConfigRequest.JSON_PROPERTY_GROUND_TRUTH_ID, + GroundTruthConfigRequest.JSON_PROPERTY_MODE, + GroundTruthConfigRequest.JSON_PROPERTY_MAX_EXAMPLES, + GroundTruthConfigRequest.JSON_PROPERTY_SIMILARITY_THRESHOLD, + GroundTruthConfigRequest.JSON_PROPERTY_INJECTION_FORMAT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthConfigRequest { + public static final String JSON_PROPERTY_ENABLED = "enabled"; + @javax.annotation.Nullable + private Boolean enabled = true; + + public static final String JSON_PROPERTY_GROUND_TRUTH_ID = "ground_truth_id"; + private JsonNullable groundTruthId = JsonNullable.undefined(); + + /** + * Gets or Sets mode + */ + public enum ModeEnum { + AUTO(String.valueOf("auto")), + + MANUAL(String.valueOf("manual")), + + DISABLED(String.valueOf("disabled")); + + private String value; + + ModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModeEnum fromValue(String value) { + for (ModeEnum b : ModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_MODE = "mode"; + @javax.annotation.Nullable + private ModeEnum mode = ModeEnum.AUTO; + + public static final String JSON_PROPERTY_MAX_EXAMPLES = "max_examples"; + @javax.annotation.Nullable + private Integer maxExamples; + + public static final String JSON_PROPERTY_SIMILARITY_THRESHOLD = "similarity_threshold"; + @javax.annotation.Nullable + private BigDecimal similarityThreshold; + + /** + * Gets or Sets injectionFormat + */ + public enum InjectionFormatEnum { + STRUCTURED(String.valueOf("structured")), + + CONVERSATIONAL(String.valueOf("conversational")), + + XML(String.valueOf("xml")); + + private String value; + + InjectionFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InjectionFormatEnum fromValue(String value) { + for (InjectionFormatEnum b : InjectionFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INJECTION_FORMAT = "injection_format"; + @javax.annotation.Nullable + private InjectionFormatEnum injectionFormat = InjectionFormatEnum.STRUCTURED; + + public GroundTruthConfigRequest() { + } + + public GroundTruthConfigRequest enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + } + + + public GroundTruthConfigRequest groundTruthId(@javax.annotation.Nullable UUID groundTruthId) { + this.groundTruthId = JsonNullable.of(groundTruthId); + return this; + } + + /** + * Get groundTruthId + * @return groundTruthId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getGroundTruthId() { + return groundTruthId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_GROUND_TRUTH_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getGroundTruthId_JsonNullable() { + return groundTruthId; + } + + @JsonProperty(JSON_PROPERTY_GROUND_TRUTH_ID) + public void setGroundTruthId_JsonNullable(JsonNullable groundTruthId) { + this.groundTruthId = groundTruthId; + } + + public void setGroundTruthId(@javax.annotation.Nullable UUID groundTruthId) { + this.groundTruthId = JsonNullable.of(groundTruthId); + } + + + public GroundTruthConfigRequest mode(@javax.annotation.Nullable ModeEnum mode) { + this.mode = mode; + return this; + } + + /** + * Get mode + * @return mode + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ModeEnum getMode() { + return mode; + } + + + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(@javax.annotation.Nullable ModeEnum mode) { + this.mode = mode; + } + + + public GroundTruthConfigRequest maxExamples(@javax.annotation.Nullable Integer maxExamples) { + this.maxExamples = maxExamples; + return this; + } + + /** + * Get maxExamples + * minimum: 1 + * maximum: 10 + * @return maxExamples + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_EXAMPLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxExamples() { + return maxExamples; + } + + + @JsonProperty(JSON_PROPERTY_MAX_EXAMPLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxExamples(@javax.annotation.Nullable Integer maxExamples) { + this.maxExamples = maxExamples; + } + + + public GroundTruthConfigRequest similarityThreshold(@javax.annotation.Nullable BigDecimal similarityThreshold) { + this.similarityThreshold = similarityThreshold; + return this; + } + + /** + * Get similarityThreshold + * minimum: 0 + * maximum: 1 + * @return similarityThreshold + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMILARITY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getSimilarityThreshold() { + return similarityThreshold; + } + + + @JsonProperty(JSON_PROPERTY_SIMILARITY_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSimilarityThreshold(@javax.annotation.Nullable BigDecimal similarityThreshold) { + this.similarityThreshold = similarityThreshold; + } + + + public GroundTruthConfigRequest injectionFormat(@javax.annotation.Nullable InjectionFormatEnum injectionFormat) { + this.injectionFormat = injectionFormat; + return this; + } + + /** + * Get injectionFormat + * @return injectionFormat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INJECTION_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public InjectionFormatEnum getInjectionFormat() { + return injectionFormat; + } + + + @JsonProperty(JSON_PROPERTY_INJECTION_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInjectionFormat(@javax.annotation.Nullable InjectionFormatEnum injectionFormat) { + this.injectionFormat = injectionFormat; + } + + + /** + * Return true if this GroundTruthConfigRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthConfigRequest groundTruthConfigRequest = (GroundTruthConfigRequest) o; + return Objects.equals(this.enabled, groundTruthConfigRequest.enabled) && + equalsNullable(this.groundTruthId, groundTruthConfigRequest.groundTruthId) && + Objects.equals(this.mode, groundTruthConfigRequest.mode) && + Objects.equals(this.maxExamples, groundTruthConfigRequest.maxExamples) && + Objects.equals(this.similarityThreshold, groundTruthConfigRequest.similarityThreshold) && + Objects.equals(this.injectionFormat, groundTruthConfigRequest.injectionFormat); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, hashCodeNullable(groundTruthId), mode, maxExamples, similarityThreshold, injectionFormat); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthConfigRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" groundTruthId: ").append(toIndentedString(groundTruthId)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" maxExamples: ").append(toIndentedString(maxExamples)).append("\n"); + sb.append(" similarityThreshold: ").append(toIndentedString(similarityThreshold)).append("\n"); + sb.append(" injectionFormat: ").append(toIndentedString(injectionFormat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format("%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + } + + // add `ground_truth_id` to the URL query string + if (getGroundTruthId() != null) { + joiner.add(String.format("%sground_truth_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGroundTruthId())))); + } + + // add `mode` to the URL query string + if (getMode() != null) { + joiner.add(String.format("%smode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMode())))); + } + + // add `max_examples` to the URL query string + if (getMaxExamples() != null) { + joiner.add(String.format("%smax_examples%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxExamples())))); + } + + // add `similarity_threshold` to the URL query string + if (getSimilarityThreshold() != null) { + joiner.add(String.format("%ssimilarity_threshold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimilarityThreshold())))); + } + + // add `injection_format` to the URL query string + if (getInjectionFormat() != null) { + joiner.add(String.format("%sinjection_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInjectionFormat())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponse.java new file mode 100644 index 0000000..6b7bfc9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.GroundTruthConfigResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthConfigResponse + */ +@JsonPropertyOrder({ + GroundTruthConfigResponse.JSON_PROPERTY_STATUS, + GroundTruthConfigResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthConfigResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private GroundTruthConfigResponseResult result; + + public GroundTruthConfigResponse() { + } + + public GroundTruthConfigResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public GroundTruthConfigResponse result(@javax.annotation.Nonnull GroundTruthConfigResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GroundTruthConfigResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull GroundTruthConfigResponseResult result) { + this.result = result; + } + + + /** + * Return true if this GroundTruthConfigResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthConfigResponse groundTruthConfigResponse = (GroundTruthConfigResponse) o; + return Objects.equals(this.status, groundTruthConfigResponse.status) && + Objects.equals(this.result, groundTruthConfigResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthConfigResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponseResult.java new file mode 100644 index 0000000..66df48e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthConfigResponseResult.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.GroundTruthConfig; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthConfigResponseResult + */ +@JsonPropertyOrder({ + GroundTruthConfigResponseResult.JSON_PROPERTY_GROUND_TRUTH +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthConfigResponseResult { + public static final String JSON_PROPERTY_GROUND_TRUTH = "ground_truth"; + @javax.annotation.Nonnull + private GroundTruthConfig groundTruth; + + public GroundTruthConfigResponseResult() { + } + + public GroundTruthConfigResponseResult groundTruth(@javax.annotation.Nonnull GroundTruthConfig groundTruth) { + this.groundTruth = groundTruth; + return this; + } + + /** + * Get groundTruth + * @return groundTruth + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GROUND_TRUTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GroundTruthConfig getGroundTruth() { + return groundTruth; + } + + + @JsonProperty(JSON_PROPERTY_GROUND_TRUTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGroundTruth(@javax.annotation.Nonnull GroundTruthConfig groundTruth) { + this.groundTruth = groundTruth; + } + + + /** + * Return true if this GroundTruthConfigResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthConfigResponseResult groundTruthConfigResponseResult = (GroundTruthConfigResponseResult) o; + return Objects.equals(this.groundTruth, groundTruthConfigResponseResult.groundTruth); + } + + @Override + public int hashCode() { + return Objects.hash(groundTruth); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthConfigResponseResult {\n"); + sb.append(" groundTruth: ").append(toIndentedString(groundTruth)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `ground_truth` to the URL query string + if (getGroundTruth() != null) { + joiner.add(getGroundTruth().toUrlQueryString(prefix + "ground_truth" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthItem.java new file mode 100644 index 0000000..b9500e2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthItem.java @@ -0,0 +1,588 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthItem + */ +@JsonPropertyOrder({ + GroundTruthItem.JSON_PROPERTY_ID, + GroundTruthItem.JSON_PROPERTY_NAME, + GroundTruthItem.JSON_PROPERTY_DESCRIPTION, + GroundTruthItem.JSON_PROPERTY_FILE_NAME, + GroundTruthItem.JSON_PROPERTY_COLUMNS, + GroundTruthItem.JSON_PROPERTY_ROW_COUNT, + GroundTruthItem.JSON_PROPERTY_VARIABLE_MAPPING, + GroundTruthItem.JSON_PROPERTY_ROLE_MAPPING, + GroundTruthItem.JSON_PROPERTY_EMBEDDING_STATUS, + GroundTruthItem.JSON_PROPERTY_EMBEDDED_ROW_COUNT, + GroundTruthItem.JSON_PROPERTY_STORAGE_TYPE, + GroundTruthItem.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + @javax.annotation.Nullable + private String fileName; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_ROW_COUNT = "row_count"; + @javax.annotation.Nonnull + private Integer rowCount; + + public static final String JSON_PROPERTY_VARIABLE_MAPPING = "variable_mapping"; + @javax.annotation.Nullable + private Map variableMapping = new HashMap<>(); + + public static final String JSON_PROPERTY_ROLE_MAPPING = "role_mapping"; + @javax.annotation.Nullable + private Map roleMapping = new HashMap<>(); + + public static final String JSON_PROPERTY_EMBEDDING_STATUS = "embedding_status"; + @javax.annotation.Nullable + private String embeddingStatus; + + public static final String JSON_PROPERTY_EMBEDDED_ROW_COUNT = "embedded_row_count"; + @javax.annotation.Nullable + private Integer embeddedRowCount; + + public static final String JSON_PROPERTY_STORAGE_TYPE = "storage_type"; + @javax.annotation.Nullable + private String storageType; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private String createdAt; + + public GroundTruthItem() { + } + + public GroundTruthItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public GroundTruthItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public GroundTruthItem description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public GroundTruthItem fileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get fileName + * @return fileName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + } + + + public GroundTruthItem columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public GroundTruthItem addColumnsItem(String columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + public GroundTruthItem rowCount(@javax.annotation.Nonnull Integer rowCount) { + this.rowCount = rowCount; + return this; + } + + /** + * Get rowCount + * @return rowCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowCount() { + return rowCount; + } + + + @JsonProperty(JSON_PROPERTY_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowCount(@javax.annotation.Nonnull Integer rowCount) { + this.rowCount = rowCount; + } + + + public GroundTruthItem variableMapping(@javax.annotation.Nullable Map variableMapping) { + this.variableMapping = variableMapping; + return this; + } + + public GroundTruthItem putVariableMappingItem(String key, Object variableMappingItem) { + if (this.variableMapping == null) { + this.variableMapping = new HashMap<>(); + } + this.variableMapping.put(key, variableMappingItem); + return this; + } + + /** + * Get variableMapping + * @return variableMapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getVariableMapping() { + return variableMapping; + } + + + @JsonProperty(JSON_PROPERTY_VARIABLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setVariableMapping(@javax.annotation.Nullable Map variableMapping) { + this.variableMapping = variableMapping; + } + + + public GroundTruthItem roleMapping(@javax.annotation.Nullable Map roleMapping) { + this.roleMapping = roleMapping; + return this; + } + + public GroundTruthItem putRoleMappingItem(String key, Object roleMappingItem) { + if (this.roleMapping == null) { + this.roleMapping = new HashMap<>(); + } + this.roleMapping.put(key, roleMappingItem); + return this; + } + + /** + * Get roleMapping + * @return roleMapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRoleMapping() { + return roleMapping; + } + + + @JsonProperty(JSON_PROPERTY_ROLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRoleMapping(@javax.annotation.Nullable Map roleMapping) { + this.roleMapping = roleMapping; + } + + + public GroundTruthItem embeddingStatus(@javax.annotation.Nullable String embeddingStatus) { + this.embeddingStatus = embeddingStatus; + return this; + } + + /** + * Get embeddingStatus + * @return embeddingStatus + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMBEDDING_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmbeddingStatus() { + return embeddingStatus; + } + + + @JsonProperty(JSON_PROPERTY_EMBEDDING_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmbeddingStatus(@javax.annotation.Nullable String embeddingStatus) { + this.embeddingStatus = embeddingStatus; + } + + + public GroundTruthItem embeddedRowCount(@javax.annotation.Nullable Integer embeddedRowCount) { + this.embeddedRowCount = embeddedRowCount; + return this; + } + + /** + * Get embeddedRowCount + * @return embeddedRowCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMBEDDED_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getEmbeddedRowCount() { + return embeddedRowCount; + } + + + @JsonProperty(JSON_PROPERTY_EMBEDDED_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmbeddedRowCount(@javax.annotation.Nullable Integer embeddedRowCount) { + this.embeddedRowCount = embeddedRowCount; + } + + + public GroundTruthItem storageType(@javax.annotation.Nullable String storageType) { + this.storageType = storageType; + return this; + } + + /** + * Get storageType + * @return storageType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STORAGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStorageType() { + return storageType; + } + + + @JsonProperty(JSON_PROPERTY_STORAGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStorageType(@javax.annotation.Nullable String storageType) { + this.storageType = storageType; + } + + + public GroundTruthItem createdAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + } + + + /** + * Return true if this GroundTruthItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthItem groundTruthItem = (GroundTruthItem) o; + return Objects.equals(this.id, groundTruthItem.id) && + Objects.equals(this.name, groundTruthItem.name) && + Objects.equals(this.description, groundTruthItem.description) && + Objects.equals(this.fileName, groundTruthItem.fileName) && + Objects.equals(this.columns, groundTruthItem.columns) && + Objects.equals(this.rowCount, groundTruthItem.rowCount) && + Objects.equals(this.variableMapping, groundTruthItem.variableMapping) && + Objects.equals(this.roleMapping, groundTruthItem.roleMapping) && + Objects.equals(this.embeddingStatus, groundTruthItem.embeddingStatus) && + Objects.equals(this.embeddedRowCount, groundTruthItem.embeddedRowCount) && + Objects.equals(this.storageType, groundTruthItem.storageType) && + Objects.equals(this.createdAt, groundTruthItem.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, fileName, columns, rowCount, variableMapping, roleMapping, embeddingStatus, embeddedRowCount, storageType, createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" rowCount: ").append(toIndentedString(rowCount)).append("\n"); + sb.append(" variableMapping: ").append(toIndentedString(variableMapping)).append("\n"); + sb.append(" roleMapping: ").append(toIndentedString(roleMapping)).append("\n"); + sb.append(" embeddingStatus: ").append(toIndentedString(embeddingStatus)).append("\n"); + sb.append(" embeddedRowCount: ").append(toIndentedString(embeddedRowCount)).append("\n"); + sb.append(" storageType: ").append(toIndentedString(storageType)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `file_name` to the URL query string + if (getFileName() != null) { + joiner.add(String.format("%sfile_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFileName())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + // add `row_count` to the URL query string + if (getRowCount() != null) { + joiner.add(String.format("%srow_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowCount())))); + } + + // add `variable_mapping` to the URL query string + if (getVariableMapping() != null) { + for (String _key : getVariableMapping().keySet()) { + joiner.add(String.format("%svariable_mapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getVariableMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getVariableMapping().get(_key))))); + } + } + + // add `role_mapping` to the URL query string + if (getRoleMapping() != null) { + for (String _key : getRoleMapping().keySet()) { + joiner.add(String.format("%srole_mapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRoleMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRoleMapping().get(_key))))); + } + } + + // add `embedding_status` to the URL query string + if (getEmbeddingStatus() != null) { + joiner.add(String.format("%sembedding_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmbeddingStatus())))); + } + + // add `embedded_row_count` to the URL query string + if (getEmbeddedRowCount() != null) { + joiner.add(String.format("%sembedded_row_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmbeddedRowCount())))); + } + + // add `storage_type` to the URL query string + if (getStorageType() != null) { + joiner.add(String.format("%sstorage_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStorageType())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponse.java new file mode 100644 index 0000000..f6ea14a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.GroundTruthListResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthListResponse + */ +@JsonPropertyOrder({ + GroundTruthListResponse.JSON_PROPERTY_STATUS, + GroundTruthListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private GroundTruthListResponseResult result; + + public GroundTruthListResponse() { + } + + public GroundTruthListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public GroundTruthListResponse result(@javax.annotation.Nonnull GroundTruthListResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GroundTruthListResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull GroundTruthListResponseResult result) { + this.result = result; + } + + + /** + * Return true if this GroundTruthListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthListResponse groundTruthListResponse = (GroundTruthListResponse) o; + return Objects.equals(this.status, groundTruthListResponse.status) && + Objects.equals(this.result, groundTruthListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponseResult.java new file mode 100644 index 0000000..d4a7a12 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthListResponseResult.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.GroundTruthItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthListResponseResult + */ +@JsonPropertyOrder({ + GroundTruthListResponseResult.JSON_PROPERTY_TEMPLATE_ID, + GroundTruthListResponseResult.JSON_PROPERTY_ITEMS, + GroundTruthListResponseResult.JSON_PROPERTY_TOTAL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthListResponseResult { + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_ITEMS = "items"; + @javax.annotation.Nonnull + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public GroundTruthListResponseResult() { + } + + public GroundTruthListResponseResult templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public GroundTruthListResponseResult items(@javax.annotation.Nonnull List items) { + this.items = items; + return this; + } + + public GroundTruthListResponseResult addItemsItem(GroundTruthItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setItems(@javax.annotation.Nonnull List items) { + this.items = items; + } + + + public GroundTruthListResponseResult total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + /** + * Return true if this GroundTruthListResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthListResponseResult groundTruthListResponseResult = (GroundTruthListResponseResult) o; + return Objects.equals(this.templateId, groundTruthListResponseResult.templateId) && + Objects.equals(this.items, groundTruthListResponseResult.items) && + Objects.equals(this.total, groundTruthListResponseResult.total); + } + + @Override + public int hashCode() { + return Objects.hash(templateId, items, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthListResponseResult {\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `items` to the URL query string + if (getItems() != null) { + for (int i = 0; i < getItems().size(); i++) { + if (getItems().get(i) != null) { + joiner.add(getItems().get(i).toUrlQueryString(String.format("%sitems%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadRequest.java new file mode 100644 index 0000000..413a0cc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadRequest.java @@ -0,0 +1,454 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthUploadRequest + */ +@JsonPropertyOrder({ + GroundTruthUploadRequest.JSON_PROPERTY_FILE, + GroundTruthUploadRequest.JSON_PROPERTY_NAME, + GroundTruthUploadRequest.JSON_PROPERTY_DESCRIPTION, + GroundTruthUploadRequest.JSON_PROPERTY_FILE_NAME, + GroundTruthUploadRequest.JSON_PROPERTY_COLUMNS, + GroundTruthUploadRequest.JSON_PROPERTY_DATA, + GroundTruthUploadRequest.JSON_PROPERTY_VARIABLE_MAPPING, + GroundTruthUploadRequest.JSON_PROPERTY_ROLE_MAPPING +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthUploadRequest { + public static final String JSON_PROPERTY_FILE = "file"; + @javax.annotation.Nullable + private URI _file; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description = ""; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + @javax.annotation.Nullable + private String fileName = ""; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nullable + private List columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATA = "data"; + @javax.annotation.Nullable + private List> data = new ArrayList<>(); + + public static final String JSON_PROPERTY_VARIABLE_MAPPING = "variable_mapping"; + @javax.annotation.Nullable + private Map variableMapping = new HashMap<>(); + + public static final String JSON_PROPERTY_ROLE_MAPPING = "role_mapping"; + @javax.annotation.Nullable + private Map roleMapping = new HashMap<>(); + + public GroundTruthUploadRequest() { + } + + @JsonCreator + public GroundTruthUploadRequest( + @JsonProperty(JSON_PROPERTY_FILE) URI _file + ) { + this(); + this._file = _file; + } + + /** + * Get _file + * @return _file + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public URI getFile() { + return _file; + } + + + + + public GroundTruthUploadRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public GroundTruthUploadRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public GroundTruthUploadRequest fileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get fileName + * @return fileName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + } + + + public GroundTruthUploadRequest columns(@javax.annotation.Nullable List columns) { + this.columns = columns; + return this; + } + + public GroundTruthUploadRequest addColumnsItem(String columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumns(@javax.annotation.Nullable List columns) { + this.columns = columns; + } + + + public GroundTruthUploadRequest data(@javax.annotation.Nullable List> data) { + this.data = data; + return this; + } + + public GroundTruthUploadRequest addDataItem(Map dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(@javax.annotation.Nullable List> data) { + this.data = data; + } + + + public GroundTruthUploadRequest variableMapping(@javax.annotation.Nullable Map variableMapping) { + this.variableMapping = variableMapping; + return this; + } + + public GroundTruthUploadRequest putVariableMappingItem(String key, Object variableMappingItem) { + if (this.variableMapping == null) { + this.variableMapping = new HashMap<>(); + } + this.variableMapping.put(key, variableMappingItem); + return this; + } + + /** + * Get variableMapping + * @return variableMapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getVariableMapping() { + return variableMapping; + } + + + @JsonProperty(JSON_PROPERTY_VARIABLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setVariableMapping(@javax.annotation.Nullable Map variableMapping) { + this.variableMapping = variableMapping; + } + + + public GroundTruthUploadRequest roleMapping(@javax.annotation.Nullable Map roleMapping) { + this.roleMapping = roleMapping; + return this; + } + + public GroundTruthUploadRequest putRoleMappingItem(String key, Object roleMappingItem) { + if (this.roleMapping == null) { + this.roleMapping = new HashMap<>(); + } + this.roleMapping.put(key, roleMappingItem); + return this; + } + + /** + * Get roleMapping + * @return roleMapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRoleMapping() { + return roleMapping; + } + + + @JsonProperty(JSON_PROPERTY_ROLE_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRoleMapping(@javax.annotation.Nullable Map roleMapping) { + this.roleMapping = roleMapping; + } + + + /** + * Return true if this GroundTruthUploadRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthUploadRequest groundTruthUploadRequest = (GroundTruthUploadRequest) o; + return Objects.equals(this._file, groundTruthUploadRequest._file) && + Objects.equals(this.name, groundTruthUploadRequest.name) && + Objects.equals(this.description, groundTruthUploadRequest.description) && + Objects.equals(this.fileName, groundTruthUploadRequest.fileName) && + Objects.equals(this.columns, groundTruthUploadRequest.columns) && + Objects.equals(this.data, groundTruthUploadRequest.data) && + Objects.equals(this.variableMapping, groundTruthUploadRequest.variableMapping) && + Objects.equals(this.roleMapping, groundTruthUploadRequest.roleMapping); + } + + @Override + public int hashCode() { + return Objects.hash(_file, name, description, fileName, columns, data, variableMapping, roleMapping); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthUploadRequest {\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" variableMapping: ").append(toIndentedString(variableMapping)).append("\n"); + sb.append(" roleMapping: ").append(toIndentedString(roleMapping)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `file` to the URL query string + if (getFile() != null) { + joiner.add(String.format("%sfile%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFile())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `file_name` to the URL query string + if (getFileName() != null) { + joiner.add(String.format("%sfile_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFileName())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + joiner.add(String.format("%sdata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getData().get(i))))); + } + } + + // add `variable_mapping` to the URL query string + if (getVariableMapping() != null) { + for (String _key : getVariableMapping().keySet()) { + joiner.add(String.format("%svariable_mapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getVariableMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getVariableMapping().get(_key))))); + } + } + + // add `role_mapping` to the URL query string + if (getRoleMapping() != null) { + for (String _key : getRoleMapping().keySet()) { + joiner.add(String.format("%srole_mapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRoleMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRoleMapping().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponse.java new file mode 100644 index 0000000..505c7c0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.GroundTruthUploadResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthUploadResponse + */ +@JsonPropertyOrder({ + GroundTruthUploadResponse.JSON_PROPERTY_STATUS, + GroundTruthUploadResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthUploadResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private GroundTruthUploadResponseResult result; + + public GroundTruthUploadResponse() { + } + + public GroundTruthUploadResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public GroundTruthUploadResponse result(@javax.annotation.Nonnull GroundTruthUploadResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GroundTruthUploadResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull GroundTruthUploadResponseResult result) { + this.result = result; + } + + + /** + * Return true if this GroundTruthUploadResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthUploadResponse groundTruthUploadResponse = (GroundTruthUploadResponse) o; + return Objects.equals(this.status, groundTruthUploadResponse.status) && + Objects.equals(this.result, groundTruthUploadResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthUploadResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponseResult.java new file mode 100644 index 0000000..8e7e254 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/GroundTruthUploadResponseResult.java @@ -0,0 +1,310 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * GroundTruthUploadResponseResult + */ +@JsonPropertyOrder({ + GroundTruthUploadResponseResult.JSON_PROPERTY_ID, + GroundTruthUploadResponseResult.JSON_PROPERTY_NAME, + GroundTruthUploadResponseResult.JSON_PROPERTY_ROW_COUNT, + GroundTruthUploadResponseResult.JSON_PROPERTY_COLUMNS, + GroundTruthUploadResponseResult.JSON_PROPERTY_EMBEDDING_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class GroundTruthUploadResponseResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ROW_COUNT = "row_count"; + @javax.annotation.Nonnull + private Integer rowCount; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_EMBEDDING_STATUS = "embedding_status"; + @javax.annotation.Nonnull + private String embeddingStatus; + + public GroundTruthUploadResponseResult() { + } + + public GroundTruthUploadResponseResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public GroundTruthUploadResponseResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public GroundTruthUploadResponseResult rowCount(@javax.annotation.Nonnull Integer rowCount) { + this.rowCount = rowCount; + return this; + } + + /** + * Get rowCount + * @return rowCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowCount() { + return rowCount; + } + + + @JsonProperty(JSON_PROPERTY_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowCount(@javax.annotation.Nonnull Integer rowCount) { + this.rowCount = rowCount; + } + + + public GroundTruthUploadResponseResult columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public GroundTruthUploadResponseResult addColumnsItem(String columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + public GroundTruthUploadResponseResult embeddingStatus(@javax.annotation.Nonnull String embeddingStatus) { + this.embeddingStatus = embeddingStatus; + return this; + } + + /** + * Get embeddingStatus + * @return embeddingStatus + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMBEDDING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmbeddingStatus() { + return embeddingStatus; + } + + + @JsonProperty(JSON_PROPERTY_EMBEDDING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmbeddingStatus(@javax.annotation.Nonnull String embeddingStatus) { + this.embeddingStatus = embeddingStatus; + } + + + /** + * Return true if this GroundTruthUploadResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroundTruthUploadResponseResult groundTruthUploadResponseResult = (GroundTruthUploadResponseResult) o; + return Objects.equals(this.id, groundTruthUploadResponseResult.id) && + Objects.equals(this.name, groundTruthUploadResponseResult.name) && + Objects.equals(this.rowCount, groundTruthUploadResponseResult.rowCount) && + Objects.equals(this.columns, groundTruthUploadResponseResult.columns) && + Objects.equals(this.embeddingStatus, groundTruthUploadResponseResult.embeddingStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, rowCount, columns, embeddingStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroundTruthUploadResponseResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rowCount: ").append(toIndentedString(rowCount)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" embeddingStatus: ").append(toIndentedString(embeddingStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `row_count` to the URL query string + if (getRowCount() != null) { + joiner.add(String.format("%srow_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowCount())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + // add `embedding_status` to the URL query string + if (getEmbeddingStatus() != null) { + joiner.add(String.format("%sembedding_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmbeddingStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HeatmapCell.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HeatmapCell.java new file mode 100644 index 0000000..474fc5f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HeatmapCell.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HeatmapCell + */ +@JsonPropertyOrder({ + HeatmapCell.JSON_PROPERTY_DAY, + HeatmapCell.JSON_PROPERTY_HOUR, + HeatmapCell.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HeatmapCell { + public static final String JSON_PROPERTY_DAY = "day"; + @javax.annotation.Nonnull + private Integer day; + + public static final String JSON_PROPERTY_HOUR = "hour"; + @javax.annotation.Nonnull + private Integer hour; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Integer value; + + public HeatmapCell() { + } + + public HeatmapCell day(@javax.annotation.Nonnull Integer day) { + this.day = day; + return this; + } + + /** + * Get day + * @return day + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDay() { + return day; + } + + + @JsonProperty(JSON_PROPERTY_DAY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDay(@javax.annotation.Nonnull Integer day) { + this.day = day; + } + + + public HeatmapCell hour(@javax.annotation.Nonnull Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get hour + * @return hour + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getHour() { + return hour; + } + + + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHour(@javax.annotation.Nonnull Integer hour) { + this.hour = hour; + } + + + public HeatmapCell value(@javax.annotation.Nonnull Integer value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Integer value) { + this.value = value; + } + + + /** + * Return true if this HeatmapCell object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HeatmapCell heatmapCell = (HeatmapCell) o; + return Objects.equals(this.day, heatmapCell.day) && + Objects.equals(this.hour, heatmapCell.hour) && + Objects.equals(this.value, heatmapCell.value); + } + + @Override + public int hashCode() { + return Objects.hash(day, hour, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HeatmapCell {\n"); + sb.append(" day: ").append(toIndentedString(day)).append("\n"); + sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `day` to the URL query string + if (getDay() != null) { + joiner.add(String.format("%sday%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDay())))); + } + + // add `hour` to the URL query string + if (getHour() != null) { + joiner.add(String.format("%shour%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHour())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceAddRowsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceAddRowsRequest.java new file mode 100644 index 0000000..d0da5b9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceAddRowsRequest.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceAddRowsRequest + */ +@JsonPropertyOrder({ + HuggingFaceAddRowsRequest.JSON_PROPERTY_NUM_ROWS, + HuggingFaceAddRowsRequest.JSON_PROPERTY_HUGGINGFACE_DATASET_NAME, + HuggingFaceAddRowsRequest.JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG, + HuggingFaceAddRowsRequest.JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceAddRowsRequest { + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nullable + private Integer numRows; + + public static final String JSON_PROPERTY_HUGGINGFACE_DATASET_NAME = "huggingface_dataset_name"; + @javax.annotation.Nonnull + private String huggingfaceDatasetName; + + public static final String JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG = "huggingface_dataset_config"; + @javax.annotation.Nonnull + private String huggingfaceDatasetConfig; + + public static final String JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT = "huggingface_dataset_split"; + @javax.annotation.Nonnull + private String huggingfaceDatasetSplit; + + public HuggingFaceAddRowsRequest() { + } + + public HuggingFaceAddRowsRequest numRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * minimum: 0 + * @return numRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + } + + + public HuggingFaceAddRowsRequest huggingfaceDatasetName(@javax.annotation.Nonnull String huggingfaceDatasetName) { + this.huggingfaceDatasetName = huggingfaceDatasetName; + return this; + } + + /** + * Get huggingfaceDatasetName + * @return huggingfaceDatasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHuggingfaceDatasetName() { + return huggingfaceDatasetName; + } + + + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHuggingfaceDatasetName(@javax.annotation.Nonnull String huggingfaceDatasetName) { + this.huggingfaceDatasetName = huggingfaceDatasetName; + } + + + public HuggingFaceAddRowsRequest huggingfaceDatasetConfig(@javax.annotation.Nonnull String huggingfaceDatasetConfig) { + this.huggingfaceDatasetConfig = huggingfaceDatasetConfig; + return this; + } + + /** + * Get huggingfaceDatasetConfig + * @return huggingfaceDatasetConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHuggingfaceDatasetConfig() { + return huggingfaceDatasetConfig; + } + + + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHuggingfaceDatasetConfig(@javax.annotation.Nonnull String huggingfaceDatasetConfig) { + this.huggingfaceDatasetConfig = huggingfaceDatasetConfig; + } + + + public HuggingFaceAddRowsRequest huggingfaceDatasetSplit(@javax.annotation.Nonnull String huggingfaceDatasetSplit) { + this.huggingfaceDatasetSplit = huggingfaceDatasetSplit; + return this; + } + + /** + * Get huggingfaceDatasetSplit + * @return huggingfaceDatasetSplit + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHuggingfaceDatasetSplit() { + return huggingfaceDatasetSplit; + } + + + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHuggingfaceDatasetSplit(@javax.annotation.Nonnull String huggingfaceDatasetSplit) { + this.huggingfaceDatasetSplit = huggingfaceDatasetSplit; + } + + + /** + * Return true if this HuggingFaceAddRowsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceAddRowsRequest huggingFaceAddRowsRequest = (HuggingFaceAddRowsRequest) o; + return Objects.equals(this.numRows, huggingFaceAddRowsRequest.numRows) && + Objects.equals(this.huggingfaceDatasetName, huggingFaceAddRowsRequest.huggingfaceDatasetName) && + Objects.equals(this.huggingfaceDatasetConfig, huggingFaceAddRowsRequest.huggingfaceDatasetConfig) && + Objects.equals(this.huggingfaceDatasetSplit, huggingFaceAddRowsRequest.huggingfaceDatasetSplit); + } + + @Override + public int hashCode() { + return Objects.hash(numRows, huggingfaceDatasetName, huggingfaceDatasetConfig, huggingfaceDatasetSplit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceAddRowsRequest {\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" huggingfaceDatasetName: ").append(toIndentedString(huggingfaceDatasetName)).append("\n"); + sb.append(" huggingfaceDatasetConfig: ").append(toIndentedString(huggingfaceDatasetConfig)).append("\n"); + sb.append(" huggingfaceDatasetSplit: ").append(toIndentedString(huggingfaceDatasetSplit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `huggingface_dataset_name` to the URL query string + if (getHuggingfaceDatasetName() != null) { + joiner.add(String.format("%shuggingface_dataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHuggingfaceDatasetName())))); + } + + // add `huggingface_dataset_config` to the URL query string + if (getHuggingfaceDatasetConfig() != null) { + joiner.add(String.format("%shuggingface_dataset_config%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHuggingfaceDatasetConfig())))); + } + + // add `huggingface_dataset_split` to the URL query string + if (getHuggingfaceDatasetSplit() != null) { + joiner.add(String.format("%shuggingface_dataset_split%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHuggingfaceDatasetSplit())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigRequest.java new file mode 100644 index 0000000..87a69f0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetConfigRequest + */ +@JsonPropertyOrder({ + HuggingFaceDatasetConfigRequest.JSON_PROPERTY_DATASET_PATH +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetConfigRequest { + public static final String JSON_PROPERTY_DATASET_PATH = "dataset_path"; + @javax.annotation.Nonnull + private String datasetPath; + + public HuggingFaceDatasetConfigRequest() { + } + + public HuggingFaceDatasetConfigRequest datasetPath(@javax.annotation.Nonnull String datasetPath) { + this.datasetPath = datasetPath; + return this; + } + + /** + * Get datasetPath + * @return datasetPath + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_PATH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetPath() { + return datasetPath; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_PATH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetPath(@javax.annotation.Nonnull String datasetPath) { + this.datasetPath = datasetPath; + } + + + /** + * Return true if this HuggingFaceDatasetConfigRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetConfigRequest huggingFaceDatasetConfigRequest = (HuggingFaceDatasetConfigRequest) o; + return Objects.equals(this.datasetPath, huggingFaceDatasetConfigRequest.datasetPath); + } + + @Override + public int hashCode() { + return Objects.hash(datasetPath); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetConfigRequest {\n"); + sb.append(" datasetPath: ").append(toIndentedString(datasetPath)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_path` to the URL query string + if (getDatasetPath() != null) { + joiner.add(String.format("%sdataset_path%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetPath())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResponse.java new file mode 100644 index 0000000..151a461 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.HuggingFaceDatasetConfigResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetConfigResponse + */ +@JsonPropertyOrder({ + HuggingFaceDatasetConfigResponse.JSON_PROPERTY_STATUS, + HuggingFaceDatasetConfigResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetConfigResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private HuggingFaceDatasetConfigResult result; + + public HuggingFaceDatasetConfigResponse() { + } + + public HuggingFaceDatasetConfigResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public HuggingFaceDatasetConfigResponse result(@javax.annotation.Nonnull HuggingFaceDatasetConfigResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public HuggingFaceDatasetConfigResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull HuggingFaceDatasetConfigResult result) { + this.result = result; + } + + + /** + * Return true if this HuggingFaceDatasetConfigResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetConfigResponse huggingFaceDatasetConfigResponse = (HuggingFaceDatasetConfigResponse) o; + return Objects.equals(this.status, huggingFaceDatasetConfigResponse.status) && + Objects.equals(this.result, huggingFaceDatasetConfigResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetConfigResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResult.java new file mode 100644 index 0000000..2e62d9a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetConfigResult.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetConfigResult + */ +@JsonPropertyOrder({ + HuggingFaceDatasetConfigResult.JSON_PROPERTY_MESSAGE, + HuggingFaceDatasetConfigResult.JSON_PROPERTY_DATASET_INFO +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetConfigResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATASET_INFO = "dataset_info"; + @javax.annotation.Nonnull + private Map datasetInfo = new HashMap<>(); + + public HuggingFaceDatasetConfigResult() { + } + + public HuggingFaceDatasetConfigResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public HuggingFaceDatasetConfigResult datasetInfo(@javax.annotation.Nonnull Map datasetInfo) { + this.datasetInfo = datasetInfo; + return this; + } + + public HuggingFaceDatasetConfigResult putDatasetInfoItem(String key, Object datasetInfoItem) { + if (this.datasetInfo == null) { + this.datasetInfo = new HashMap<>(); + } + this.datasetInfo.put(key, datasetInfoItem); + return this; + } + + /** + * Get datasetInfo + * @return datasetInfo + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getDatasetInfo() { + return datasetInfo; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setDatasetInfo(@javax.annotation.Nonnull Map datasetInfo) { + this.datasetInfo = datasetInfo; + } + + + /** + * Return true if this HuggingFaceDatasetConfigResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetConfigResult huggingFaceDatasetConfigResult = (HuggingFaceDatasetConfigResult) o; + return Objects.equals(this.message, huggingFaceDatasetConfigResult.message) && + Objects.equals(this.datasetInfo, huggingFaceDatasetConfigResult.datasetInfo); + } + + @Override + public int hashCode() { + return Objects.hash(message, datasetInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetConfigResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" datasetInfo: ").append(toIndentedString(datasetInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `dataset_info` to the URL query string + if (getDatasetInfo() != null) { + for (String _key : getDatasetInfo().keySet()) { + joiner.add(String.format("%sdataset_info%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDatasetInfo().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDatasetInfo().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetCreateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetCreateRequest.java new file mode 100644 index 0000000..b0d757e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetCreateRequest.java @@ -0,0 +1,332 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetCreateRequest + */ +@JsonPropertyOrder({ + HuggingFaceDatasetCreateRequest.JSON_PROPERTY_NAME, + HuggingFaceDatasetCreateRequest.JSON_PROPERTY_MODEL_TYPE, + HuggingFaceDatasetCreateRequest.JSON_PROPERTY_NUM_ROWS, + HuggingFaceDatasetCreateRequest.JSON_PROPERTY_HUGGINGFACE_DATASET_NAME, + HuggingFaceDatasetCreateRequest.JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG, + HuggingFaceDatasetCreateRequest.JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetCreateRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name = ""; + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nullable + private String modelType = ""; + + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nullable + private Integer numRows; + + public static final String JSON_PROPERTY_HUGGINGFACE_DATASET_NAME = "huggingface_dataset_name"; + @javax.annotation.Nonnull + private String huggingfaceDatasetName; + + public static final String JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG = "huggingface_dataset_config"; + @javax.annotation.Nullable + private String huggingfaceDatasetConfig; + + public static final String JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT = "huggingface_dataset_split"; + @javax.annotation.Nonnull + private String huggingfaceDatasetSplit; + + public HuggingFaceDatasetCreateRequest() { + } + + public HuggingFaceDatasetCreateRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public HuggingFaceDatasetCreateRequest modelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@javax.annotation.Nullable String modelType) { + this.modelType = modelType; + } + + + public HuggingFaceDatasetCreateRequest numRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * minimum: 0 + * @return numRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + } + + + public HuggingFaceDatasetCreateRequest huggingfaceDatasetName(@javax.annotation.Nonnull String huggingfaceDatasetName) { + this.huggingfaceDatasetName = huggingfaceDatasetName; + return this; + } + + /** + * Get huggingfaceDatasetName + * @return huggingfaceDatasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHuggingfaceDatasetName() { + return huggingfaceDatasetName; + } + + + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHuggingfaceDatasetName(@javax.annotation.Nonnull String huggingfaceDatasetName) { + this.huggingfaceDatasetName = huggingfaceDatasetName; + } + + + public HuggingFaceDatasetCreateRequest huggingfaceDatasetConfig(@javax.annotation.Nullable String huggingfaceDatasetConfig) { + this.huggingfaceDatasetConfig = huggingfaceDatasetConfig; + return this; + } + + /** + * Get huggingfaceDatasetConfig + * @return huggingfaceDatasetConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHuggingfaceDatasetConfig() { + return huggingfaceDatasetConfig; + } + + + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHuggingfaceDatasetConfig(@javax.annotation.Nullable String huggingfaceDatasetConfig) { + this.huggingfaceDatasetConfig = huggingfaceDatasetConfig; + } + + + public HuggingFaceDatasetCreateRequest huggingfaceDatasetSplit(@javax.annotation.Nonnull String huggingfaceDatasetSplit) { + this.huggingfaceDatasetSplit = huggingfaceDatasetSplit; + return this; + } + + /** + * Get huggingfaceDatasetSplit + * @return huggingfaceDatasetSplit + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHuggingfaceDatasetSplit() { + return huggingfaceDatasetSplit; + } + + + @JsonProperty(JSON_PROPERTY_HUGGINGFACE_DATASET_SPLIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHuggingfaceDatasetSplit(@javax.annotation.Nonnull String huggingfaceDatasetSplit) { + this.huggingfaceDatasetSplit = huggingfaceDatasetSplit; + } + + + /** + * Return true if this HuggingFaceDatasetCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetCreateRequest huggingFaceDatasetCreateRequest = (HuggingFaceDatasetCreateRequest) o; + return Objects.equals(this.name, huggingFaceDatasetCreateRequest.name) && + Objects.equals(this.modelType, huggingFaceDatasetCreateRequest.modelType) && + Objects.equals(this.numRows, huggingFaceDatasetCreateRequest.numRows) && + Objects.equals(this.huggingfaceDatasetName, huggingFaceDatasetCreateRequest.huggingfaceDatasetName) && + Objects.equals(this.huggingfaceDatasetConfig, huggingFaceDatasetCreateRequest.huggingfaceDatasetConfig) && + Objects.equals(this.huggingfaceDatasetSplit, huggingFaceDatasetCreateRequest.huggingfaceDatasetSplit); + } + + @Override + public int hashCode() { + return Objects.hash(name, modelType, numRows, huggingfaceDatasetName, huggingfaceDatasetConfig, huggingfaceDatasetSplit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetCreateRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" huggingfaceDatasetName: ").append(toIndentedString(huggingfaceDatasetName)).append("\n"); + sb.append(" huggingfaceDatasetConfig: ").append(toIndentedString(huggingfaceDatasetConfig)).append("\n"); + sb.append(" huggingfaceDatasetSplit: ").append(toIndentedString(huggingfaceDatasetSplit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `huggingface_dataset_name` to the URL query string + if (getHuggingfaceDatasetName() != null) { + joiner.add(String.format("%shuggingface_dataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHuggingfaceDatasetName())))); + } + + // add `huggingface_dataset_config` to the URL query string + if (getHuggingfaceDatasetConfig() != null) { + joiner.add(String.format("%shuggingface_dataset_config%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHuggingfaceDatasetConfig())))); + } + + // add `huggingface_dataset_split` to the URL query string + if (getHuggingfaceDatasetSplit() != null) { + joiner.add(String.format("%shuggingface_dataset_split%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHuggingfaceDatasetSplit())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetail.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetail.java new file mode 100644 index 0000000..e19bcaa --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetail.java @@ -0,0 +1,403 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetDetail + */ +@JsonPropertyOrder({ + HuggingFaceDatasetDetail.JSON_PROPERTY_ID, + HuggingFaceDatasetDetail.JSON_PROPERTY_NAME, + HuggingFaceDatasetDetail.JSON_PROPERTY_DESCRIPTION, + HuggingFaceDatasetDetail.JSON_PROPERTY_DOWNLOADS, + HuggingFaceDatasetDetail.JSON_PROPERTY_LIKES, + HuggingFaceDatasetDetail.JSON_PROPERTY_TAGS, + HuggingFaceDatasetDetail.JSON_PROPERTY_AUTHOR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetDetail { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nonnull + private String description; + + public static final String JSON_PROPERTY_DOWNLOADS = "downloads"; + @javax.annotation.Nonnull + private Integer downloads; + + public static final String JSON_PROPERTY_LIKES = "likes"; + @javax.annotation.Nonnull + private Integer likes; + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nonnull + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_AUTHOR = "author"; + private JsonNullable author = JsonNullable.undefined(); + + public HuggingFaceDatasetDetail() { + } + + public HuggingFaceDatasetDetail id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public HuggingFaceDatasetDetail name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public HuggingFaceDatasetDetail description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public HuggingFaceDatasetDetail downloads(@javax.annotation.Nonnull Integer downloads) { + this.downloads = downloads; + return this; + } + + /** + * Get downloads + * @return downloads + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DOWNLOADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDownloads() { + return downloads; + } + + + @JsonProperty(JSON_PROPERTY_DOWNLOADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDownloads(@javax.annotation.Nonnull Integer downloads) { + this.downloads = downloads; + } + + + public HuggingFaceDatasetDetail likes(@javax.annotation.Nonnull Integer likes) { + this.likes = likes; + return this; + } + + /** + * Get likes + * @return likes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIKES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getLikes() { + return likes; + } + + + @JsonProperty(JSON_PROPERTY_LIKES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLikes(@javax.annotation.Nonnull Integer likes) { + this.likes = likes; + } + + + public HuggingFaceDatasetDetail tags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public HuggingFaceDatasetDetail addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public HuggingFaceDatasetDetail author(@javax.annotation.Nullable String author) { + this.author = JsonNullable.of(author); + return this; + } + + /** + * Get author + * @return author + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAuthor() { + return author.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAuthor_JsonNullable() { + return author; + } + + @JsonProperty(JSON_PROPERTY_AUTHOR) + public void setAuthor_JsonNullable(JsonNullable author) { + this.author = author; + } + + public void setAuthor(@javax.annotation.Nullable String author) { + this.author = JsonNullable.of(author); + } + + + /** + * Return true if this HuggingFaceDatasetDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetDetail huggingFaceDatasetDetail = (HuggingFaceDatasetDetail) o; + return Objects.equals(this.id, huggingFaceDatasetDetail.id) && + Objects.equals(this.name, huggingFaceDatasetDetail.name) && + Objects.equals(this.description, huggingFaceDatasetDetail.description) && + Objects.equals(this.downloads, huggingFaceDatasetDetail.downloads) && + Objects.equals(this.likes, huggingFaceDatasetDetail.likes) && + Objects.equals(this.tags, huggingFaceDatasetDetail.tags) && + equalsNullable(this.author, huggingFaceDatasetDetail.author); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, downloads, likes, tags, hashCodeNullable(author)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetDetail {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" downloads: ").append(toIndentedString(downloads)).append("\n"); + sb.append(" likes: ").append(toIndentedString(likes)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `downloads` to the URL query string + if (getDownloads() != null) { + joiner.add(String.format("%sdownloads%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDownloads())))); + } + + // add `likes` to the URL query string + if (getLikes() != null) { + joiner.add(String.format("%slikes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLikes())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + // add `author` to the URL query string + if (getAuthor() != null) { + joiner.add(String.format("%sauthor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAuthor())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailRequest.java new file mode 100644 index 0000000..21e12ed --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetDetailRequest + */ +@JsonPropertyOrder({ + HuggingFaceDatasetDetailRequest.JSON_PROPERTY_DATASET_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetDetailRequest { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private String datasetId; + + public HuggingFaceDatasetDetailRequest() { + } + + public HuggingFaceDatasetDetailRequest datasetId(@javax.annotation.Nonnull String datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull String datasetId) { + this.datasetId = datasetId; + } + + + /** + * Return true if this HuggingFaceDatasetDetailRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetDetailRequest huggingFaceDatasetDetailRequest = (HuggingFaceDatasetDetailRequest) o; + return Objects.equals(this.datasetId, huggingFaceDatasetDetailRequest.datasetId); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetDetailRequest {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponse.java new file mode 100644 index 0000000..1f59f3e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.HuggingFaceDatasetDetailResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetDetailResponse + */ +@JsonPropertyOrder({ + HuggingFaceDatasetDetailResponse.JSON_PROPERTY_STATUS, + HuggingFaceDatasetDetailResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetDetailResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private HuggingFaceDatasetDetailResponseResult result; + + public HuggingFaceDatasetDetailResponse() { + } + + public HuggingFaceDatasetDetailResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public HuggingFaceDatasetDetailResponse result(@javax.annotation.Nonnull HuggingFaceDatasetDetailResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public HuggingFaceDatasetDetailResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull HuggingFaceDatasetDetailResponseResult result) { + this.result = result; + } + + + /** + * Return true if this HuggingFaceDatasetDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetDetailResponse huggingFaceDatasetDetailResponse = (HuggingFaceDatasetDetailResponse) o; + return Objects.equals(this.status, huggingFaceDatasetDetailResponse.status) && + Objects.equals(this.result, huggingFaceDatasetDetailResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetDetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponseResult.java new file mode 100644 index 0000000..85e59e6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetDetailResponseResult.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.HuggingFaceDatasetDetail; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetDetailResponseResult + */ +@JsonPropertyOrder({ + HuggingFaceDatasetDetailResponseResult.JSON_PROPERTY_MESSAGE, + HuggingFaceDatasetDetailResponseResult.JSON_PROPERTY_DATASET +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetDetailResponseResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nonnull + private HuggingFaceDatasetDetail dataset; + + public HuggingFaceDatasetDetailResponseResult() { + } + + public HuggingFaceDatasetDetailResponseResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public HuggingFaceDatasetDetailResponseResult dataset(@javax.annotation.Nonnull HuggingFaceDatasetDetail dataset) { + this.dataset = dataset; + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public HuggingFaceDatasetDetail getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataset(@javax.annotation.Nonnull HuggingFaceDatasetDetail dataset) { + this.dataset = dataset; + } + + + /** + * Return true if this HuggingFaceDatasetDetailResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetDetailResponseResult huggingFaceDatasetDetailResponseResult = (HuggingFaceDatasetDetailResponseResult) o; + return Objects.equals(this.message, huggingFaceDatasetDetailResponseResult.message) && + Objects.equals(this.dataset, huggingFaceDatasetDetailResponseResult.dataset); + } + + @Override + public int hashCode() { + return Objects.hash(message, dataset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetDetailResponseResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(getDataset().toUrlQueryString(prefix + "dataset" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListItem.java new file mode 100644 index 0000000..34c4398 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListItem.java @@ -0,0 +1,317 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetListItem + */ +@JsonPropertyOrder({ + HuggingFaceDatasetListItem.JSON_PROPERTY_ID, + HuggingFaceDatasetListItem.JSON_PROPERTY_NAME, + HuggingFaceDatasetListItem.JSON_PROPERTY_DOWNLOADS, + HuggingFaceDatasetListItem.JSON_PROPERTY_LIKES, + HuggingFaceDatasetListItem.JSON_PROPERTY_AUTHOR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetListItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DOWNLOADS = "downloads"; + @javax.annotation.Nonnull + private Integer downloads; + + public static final String JSON_PROPERTY_LIKES = "likes"; + @javax.annotation.Nonnull + private Integer likes; + + public static final String JSON_PROPERTY_AUTHOR = "author"; + private JsonNullable author = JsonNullable.undefined(); + + public HuggingFaceDatasetListItem() { + } + + public HuggingFaceDatasetListItem id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public HuggingFaceDatasetListItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public HuggingFaceDatasetListItem downloads(@javax.annotation.Nonnull Integer downloads) { + this.downloads = downloads; + return this; + } + + /** + * Get downloads + * @return downloads + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DOWNLOADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDownloads() { + return downloads; + } + + + @JsonProperty(JSON_PROPERTY_DOWNLOADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDownloads(@javax.annotation.Nonnull Integer downloads) { + this.downloads = downloads; + } + + + public HuggingFaceDatasetListItem likes(@javax.annotation.Nonnull Integer likes) { + this.likes = likes; + return this; + } + + /** + * Get likes + * @return likes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIKES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getLikes() { + return likes; + } + + + @JsonProperty(JSON_PROPERTY_LIKES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLikes(@javax.annotation.Nonnull Integer likes) { + this.likes = likes; + } + + + public HuggingFaceDatasetListItem author(@javax.annotation.Nullable String author) { + this.author = JsonNullable.of(author); + return this; + } + + /** + * Get author + * @return author + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAuthor() { + return author.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAuthor_JsonNullable() { + return author; + } + + @JsonProperty(JSON_PROPERTY_AUTHOR) + public void setAuthor_JsonNullable(JsonNullable author) { + this.author = author; + } + + public void setAuthor(@javax.annotation.Nullable String author) { + this.author = JsonNullable.of(author); + } + + + /** + * Return true if this HuggingFaceDatasetListItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetListItem huggingFaceDatasetListItem = (HuggingFaceDatasetListItem) o; + return Objects.equals(this.id, huggingFaceDatasetListItem.id) && + Objects.equals(this.name, huggingFaceDatasetListItem.name) && + Objects.equals(this.downloads, huggingFaceDatasetListItem.downloads) && + Objects.equals(this.likes, huggingFaceDatasetListItem.likes) && + equalsNullable(this.author, huggingFaceDatasetListItem.author); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, downloads, likes, hashCodeNullable(author)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetListItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" downloads: ").append(toIndentedString(downloads)).append("\n"); + sb.append(" likes: ").append(toIndentedString(likes)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `downloads` to the URL query string + if (getDownloads() != null) { + joiner.add(String.format("%sdownloads%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDownloads())))); + } + + // add `likes` to the URL query string + if (getLikes() != null) { + joiner.add(String.format("%slikes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLikes())))); + } + + // add `author` to the URL query string + if (getAuthor() != null) { + joiner.add(String.format("%sauthor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAuthor())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListRequest.java new file mode 100644 index 0000000..77ba1cc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListRequest.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetListRequest + */ +@JsonPropertyOrder({ + HuggingFaceDatasetListRequest.JSON_PROPERTY_SEARCH_QUERY, + HuggingFaceDatasetListRequest.JSON_PROPERTY_FILTER_PARAMS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetListRequest { + public static final String JSON_PROPERTY_SEARCH_QUERY = "search_query"; + @javax.annotation.Nullable + private String searchQuery = ""; + + public static final String JSON_PROPERTY_FILTER_PARAMS = "filter_params"; + @javax.annotation.Nullable + private Map filterParams = new HashMap<>(); + + public HuggingFaceDatasetListRequest() { + } + + public HuggingFaceDatasetListRequest searchQuery(@javax.annotation.Nullable String searchQuery) { + this.searchQuery = searchQuery; + return this; + } + + /** + * Get searchQuery + * @return searchQuery + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSearchQuery() { + return searchQuery; + } + + + @JsonProperty(JSON_PROPERTY_SEARCH_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSearchQuery(@javax.annotation.Nullable String searchQuery) { + this.searchQuery = searchQuery; + } + + + public HuggingFaceDatasetListRequest filterParams(@javax.annotation.Nullable Map filterParams) { + this.filterParams = filterParams; + return this; + } + + public HuggingFaceDatasetListRequest putFilterParamsItem(String key, Object filterParamsItem) { + if (this.filterParams == null) { + this.filterParams = new HashMap<>(); + } + this.filterParams.put(key, filterParamsItem); + return this; + } + + /** + * Get filterParams + * @return filterParams + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFilterParams() { + return filterParams; + } + + + @JsonProperty(JSON_PROPERTY_FILTER_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setFilterParams(@javax.annotation.Nullable Map filterParams) { + this.filterParams = filterParams; + } + + + /** + * Return true if this HuggingFaceDatasetListRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetListRequest huggingFaceDatasetListRequest = (HuggingFaceDatasetListRequest) o; + return Objects.equals(this.searchQuery, huggingFaceDatasetListRequest.searchQuery) && + Objects.equals(this.filterParams, huggingFaceDatasetListRequest.filterParams); + } + + @Override + public int hashCode() { + return Objects.hash(searchQuery, filterParams); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetListRequest {\n"); + sb.append(" searchQuery: ").append(toIndentedString(searchQuery)).append("\n"); + sb.append(" filterParams: ").append(toIndentedString(filterParams)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `search_query` to the URL query string + if (getSearchQuery() != null) { + joiner.add(String.format("%ssearch_query%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSearchQuery())))); + } + + // add `filter_params` to the URL query string + if (getFilterParams() != null) { + for (String _key : getFilterParams().keySet()) { + joiner.add(String.format("%sfilter_params%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFilterParams().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFilterParams().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponse.java new file mode 100644 index 0000000..083211c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.HuggingFaceDatasetListResponseResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetListResponse + */ +@JsonPropertyOrder({ + HuggingFaceDatasetListResponse.JSON_PROPERTY_STATUS, + HuggingFaceDatasetListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private HuggingFaceDatasetListResponseResult result; + + public HuggingFaceDatasetListResponse() { + } + + public HuggingFaceDatasetListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public HuggingFaceDatasetListResponse result(@javax.annotation.Nonnull HuggingFaceDatasetListResponseResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public HuggingFaceDatasetListResponseResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull HuggingFaceDatasetListResponseResult result) { + this.result = result; + } + + + /** + * Return true if this HuggingFaceDatasetListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetListResponse huggingFaceDatasetListResponse = (HuggingFaceDatasetListResponse) o; + return Objects.equals(this.status, huggingFaceDatasetListResponse.status) && + Objects.equals(this.result, huggingFaceDatasetListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponseResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponseResult.java new file mode 100644 index 0000000..ae72b63 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/HuggingFaceDatasetListResponseResult.java @@ -0,0 +1,239 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.HuggingFaceDatasetListItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * HuggingFaceDatasetListResponseResult + */ +@JsonPropertyOrder({ + HuggingFaceDatasetListResponseResult.JSON_PROPERTY_MESSAGE, + HuggingFaceDatasetListResponseResult.JSON_PROPERTY_TOTAL_DATASETS, + HuggingFaceDatasetListResponseResult.JSON_PROPERTY_DATASETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class HuggingFaceDatasetListResponseResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_TOTAL_DATASETS = "total_datasets"; + @javax.annotation.Nonnull + private Integer totalDatasets; + + public static final String JSON_PROPERTY_DATASETS = "datasets"; + @javax.annotation.Nonnull + private List datasets = new ArrayList<>(); + + public HuggingFaceDatasetListResponseResult() { + } + + public HuggingFaceDatasetListResponseResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public HuggingFaceDatasetListResponseResult totalDatasets(@javax.annotation.Nonnull Integer totalDatasets) { + this.totalDatasets = totalDatasets; + return this; + } + + /** + * Get totalDatasets + * @return totalDatasets + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalDatasets() { + return totalDatasets; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalDatasets(@javax.annotation.Nonnull Integer totalDatasets) { + this.totalDatasets = totalDatasets; + } + + + public HuggingFaceDatasetListResponseResult datasets(@javax.annotation.Nonnull List datasets) { + this.datasets = datasets; + return this; + } + + public HuggingFaceDatasetListResponseResult addDatasetsItem(HuggingFaceDatasetListItem datasetsItem) { + if (this.datasets == null) { + this.datasets = new ArrayList<>(); + } + this.datasets.add(datasetsItem); + return this; + } + + /** + * Get datasets + * @return datasets + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDatasets() { + return datasets; + } + + + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasets(@javax.annotation.Nonnull List datasets) { + this.datasets = datasets; + } + + + /** + * Return true if this HuggingFaceDatasetListResponseResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HuggingFaceDatasetListResponseResult huggingFaceDatasetListResponseResult = (HuggingFaceDatasetListResponseResult) o; + return Objects.equals(this.message, huggingFaceDatasetListResponseResult.message) && + Objects.equals(this.totalDatasets, huggingFaceDatasetListResponseResult.totalDatasets) && + Objects.equals(this.datasets, huggingFaceDatasetListResponseResult.datasets); + } + + @Override + public int hashCode() { + return Objects.hash(message, totalDatasets, datasets); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HuggingFaceDatasetListResponseResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" totalDatasets: ").append(toIndentedString(totalDatasets)).append("\n"); + sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `total_datasets` to the URL query string + if (getTotalDatasets() != null) { + joiner.add(String.format("%stotal_datasets%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalDatasets())))); + } + + // add `datasets` to the URL query string + if (getDatasets() != null) { + for (int i = 0; i < getDatasets().size(); i++) { + if (getDatasets().get(i) != null) { + joiner.add(getDatasets().get(i).toUrlQueryString(String.format("%sdatasets%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotationEntry.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotationEntry.java new file mode 100644 index 0000000..dcbf00a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotationEntry.java @@ -0,0 +1,274 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ImportAnnotationEntry + */ +@JsonPropertyOrder({ + ImportAnnotationEntry.JSON_PROPERTY_LABEL_ID, + ImportAnnotationEntry.JSON_PROPERTY_VALUE, + ImportAnnotationEntry.JSON_PROPERTY_NOTES, + ImportAnnotationEntry.JSON_PROPERTY_SCORE_SOURCE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportAnnotationEntry { + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nonnull + private UUID labelId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private String notes; + + public static final String JSON_PROPERTY_SCORE_SOURCE = "score_source"; + @javax.annotation.Nullable + private String scoreSource; + + public ImportAnnotationEntry() { + } + + public ImportAnnotationEntry labelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + } + + + public ImportAnnotationEntry value(@javax.annotation.Nonnull Map value) { + this.value = value; + return this; + } + + public ImportAnnotationEntry putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Map value) { + this.value = value; + } + + + public ImportAnnotationEntry notes(@javax.annotation.Nullable String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = notes; + } + + + public ImportAnnotationEntry scoreSource(@javax.annotation.Nullable String scoreSource) { + this.scoreSource = scoreSource; + return this; + } + + /** + * Get scoreSource + * @return scoreSource + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScoreSource() { + return scoreSource; + } + + + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScoreSource(@javax.annotation.Nullable String scoreSource) { + this.scoreSource = scoreSource; + } + + + /** + * Return true if this ImportAnnotationEntry object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportAnnotationEntry importAnnotationEntry = (ImportAnnotationEntry) o; + return Objects.equals(this.labelId, importAnnotationEntry.labelId) && + Objects.equals(this.value, importAnnotationEntry.value) && + Objects.equals(this.notes, importAnnotationEntry.notes) && + Objects.equals(this.scoreSource, importAnnotationEntry.scoreSource); + } + + @Override + public int hashCode() { + return Objects.hash(labelId, value, notes, scoreSource); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportAnnotationEntry {\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" scoreSource: ").append(toIndentedString(scoreSource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `score_source` to the URL query string + if (getScoreSource() != null) { + joiner.add(String.format("%sscore_source%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScoreSource())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotations.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotations.java new file mode 100644 index 0000000..900d037 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ImportAnnotations.java @@ -0,0 +1,204 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ImportAnnotationEntry; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ImportAnnotations + */ +@JsonPropertyOrder({ + ImportAnnotations.JSON_PROPERTY_ANNOTATIONS, + ImportAnnotations.JSON_PROPERTY_ANNOTATOR_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ImportAnnotations { + public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; + @javax.annotation.Nonnull + private List annotations = new ArrayList<>(); + + public static final String JSON_PROPERTY_ANNOTATOR_ID = "annotator_id"; + @javax.annotation.Nullable + private UUID annotatorId; + + public ImportAnnotations() { + } + + public ImportAnnotations annotations(@javax.annotation.Nonnull List annotations) { + this.annotations = annotations; + return this; + } + + public ImportAnnotations addAnnotationsItem(ImportAnnotationEntry annotationsItem) { + if (this.annotations == null) { + this.annotations = new ArrayList<>(); + } + this.annotations.add(annotationsItem); + return this; + } + + /** + * Get annotations + * @return annotations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotations() { + return annotations; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotations(@javax.annotation.Nonnull List annotations) { + this.annotations = annotations; + } + + + public ImportAnnotations annotatorId(@javax.annotation.Nullable UUID annotatorId) { + this.annotatorId = annotatorId; + return this; + } + + /** + * Get annotatorId + * @return annotatorId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAnnotatorId() { + return annotatorId; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnotatorId(@javax.annotation.Nullable UUID annotatorId) { + this.annotatorId = annotatorId; + } + + + /** + * Return true if this ImportAnnotations object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImportAnnotations importAnnotations = (ImportAnnotations) o; + return Objects.equals(this.annotations, importAnnotations.annotations) && + Objects.equals(this.annotatorId, importAnnotations.annotatorId); + } + + @Override + public int hashCode() { + return Objects.hash(annotations, annotatorId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImportAnnotations {\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" annotatorId: ").append(toIndentedString(annotatorId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `annotations` to the URL query string + if (getAnnotations() != null) { + for (int i = 0; i < getAnnotations().size(); i++) { + if (getAnnotations().get(i) != null) { + joiner.add(getAnnotations().get(i).toUrlQueryString(String.format("%sannotations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `annotator_id` to the URL query string + if (getAnnotatorId() != null) { + joiner.add(String.format("%sannotator_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotatorId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/JsonColumnSchemaEntry.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/JsonColumnSchemaEntry.java new file mode 100644 index 0000000..061182b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/JsonColumnSchemaEntry.java @@ -0,0 +1,323 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * JsonColumnSchemaEntry + */ +@JsonPropertyOrder({ + JsonColumnSchemaEntry.JSON_PROPERTY_NAME, + JsonColumnSchemaEntry.JSON_PROPERTY_KEYS, + JsonColumnSchemaEntry.JSON_PROPERTY_SAMPLE, + JsonColumnSchemaEntry.JSON_PROPERTY_MAX_ARRAY_COUNT, + JsonColumnSchemaEntry.JSON_PROPERTY_MAX_IMAGES_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class JsonColumnSchemaEntry { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_KEYS = "keys"; + @javax.annotation.Nullable + private List keys = new ArrayList<>(); + + public static final String JSON_PROPERTY_SAMPLE = "sample"; + @javax.annotation.Nullable + private Map sample = new HashMap<>(); + + public static final String JSON_PROPERTY_MAX_ARRAY_COUNT = "max_array_count"; + @javax.annotation.Nullable + private Integer maxArrayCount; + + public static final String JSON_PROPERTY_MAX_IMAGES_COUNT = "max_images_count"; + @javax.annotation.Nullable + private Integer maxImagesCount; + + public JsonColumnSchemaEntry() { + } + + public JsonColumnSchemaEntry name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public JsonColumnSchemaEntry keys(@javax.annotation.Nullable List keys) { + this.keys = keys; + return this; + } + + public JsonColumnSchemaEntry addKeysItem(String keysItem) { + if (this.keys == null) { + this.keys = new ArrayList<>(); + } + this.keys.add(keysItem); + return this; + } + + /** + * Get keys + * @return keys + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getKeys() { + return keys; + } + + + @JsonProperty(JSON_PROPERTY_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKeys(@javax.annotation.Nullable List keys) { + this.keys = keys; + } + + + public JsonColumnSchemaEntry sample(@javax.annotation.Nullable Map sample) { + this.sample = sample; + return this; + } + + public JsonColumnSchemaEntry putSampleItem(String key, Object sampleItem) { + if (this.sample == null) { + this.sample = new HashMap<>(); + } + this.sample.put(key, sampleItem); + return this; + } + + /** + * Get sample + * @return sample + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAMPLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSample() { + return sample; + } + + + @JsonProperty(JSON_PROPERTY_SAMPLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSample(@javax.annotation.Nullable Map sample) { + this.sample = sample; + } + + + public JsonColumnSchemaEntry maxArrayCount(@javax.annotation.Nullable Integer maxArrayCount) { + this.maxArrayCount = maxArrayCount; + return this; + } + + /** + * Get maxArrayCount + * @return maxArrayCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_ARRAY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxArrayCount() { + return maxArrayCount; + } + + + @JsonProperty(JSON_PROPERTY_MAX_ARRAY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxArrayCount(@javax.annotation.Nullable Integer maxArrayCount) { + this.maxArrayCount = maxArrayCount; + } + + + public JsonColumnSchemaEntry maxImagesCount(@javax.annotation.Nullable Integer maxImagesCount) { + this.maxImagesCount = maxImagesCount; + return this; + } + + /** + * Get maxImagesCount + * @return maxImagesCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_IMAGES_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxImagesCount() { + return maxImagesCount; + } + + + @JsonProperty(JSON_PROPERTY_MAX_IMAGES_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxImagesCount(@javax.annotation.Nullable Integer maxImagesCount) { + this.maxImagesCount = maxImagesCount; + } + + + /** + * Return true if this JsonColumnSchemaEntry object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JsonColumnSchemaEntry jsonColumnSchemaEntry = (JsonColumnSchemaEntry) o; + return Objects.equals(this.name, jsonColumnSchemaEntry.name) && + Objects.equals(this.keys, jsonColumnSchemaEntry.keys) && + Objects.equals(this.sample, jsonColumnSchemaEntry.sample) && + Objects.equals(this.maxArrayCount, jsonColumnSchemaEntry.maxArrayCount) && + Objects.equals(this.maxImagesCount, jsonColumnSchemaEntry.maxImagesCount); + } + + @Override + public int hashCode() { + return Objects.hash(name, keys, sample, maxArrayCount, maxImagesCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JsonColumnSchemaEntry {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" keys: ").append(toIndentedString(keys)).append("\n"); + sb.append(" sample: ").append(toIndentedString(sample)).append("\n"); + sb.append(" maxArrayCount: ").append(toIndentedString(maxArrayCount)).append("\n"); + sb.append(" maxImagesCount: ").append(toIndentedString(maxImagesCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `keys` to the URL query string + if (getKeys() != null) { + for (int i = 0; i < getKeys().size(); i++) { + joiner.add(String.format("%skeys%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getKeys().get(i))))); + } + } + + // add `sample` to the URL query string + if (getSample() != null) { + for (String _key : getSample().keySet()) { + joiner.add(String.format("%ssample%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSample().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSample().get(_key))))); + } + } + + // add `max_array_count` to the URL query string + if (getMaxArrayCount() != null) { + joiner.add(String.format("%smax_array_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxArrayCount())))); + } + + // add `max_images_count` to the URL query string + if (getMaxImagesCount() != null) { + joiner.add(String.format("%smax_images_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxImagesCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/KeyMoment.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/KeyMoment.java new file mode 100644 index 0000000..a0293c8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/KeyMoment.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * KeyMoment + */ +@JsonPropertyOrder({ + KeyMoment.JSON_PROPERTY_KEVINIFIED, + KeyMoment.JSON_PROPERTY_VERBATIM +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class KeyMoment { + public static final String JSON_PROPERTY_KEVINIFIED = "kevinified"; + @javax.annotation.Nonnull + private String kevinified; + + public static final String JSON_PROPERTY_VERBATIM = "verbatim"; + @javax.annotation.Nonnull + private String verbatim; + + public KeyMoment() { + } + + public KeyMoment kevinified(@javax.annotation.Nonnull String kevinified) { + this.kevinified = kevinified; + return this; + } + + /** + * Get kevinified + * @return kevinified + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KEVINIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKevinified() { + return kevinified; + } + + + @JsonProperty(JSON_PROPERTY_KEVINIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKevinified(@javax.annotation.Nonnull String kevinified) { + this.kevinified = kevinified; + } + + + public KeyMoment verbatim(@javax.annotation.Nonnull String verbatim) { + this.verbatim = verbatim; + return this; + } + + /** + * Get verbatim + * @return verbatim + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERBATIM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVerbatim() { + return verbatim; + } + + + @JsonProperty(JSON_PROPERTY_VERBATIM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVerbatim(@javax.annotation.Nonnull String verbatim) { + this.verbatim = verbatim; + } + + + /** + * Return true if this KeyMoment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KeyMoment keyMoment = (KeyMoment) o; + return Objects.equals(this.kevinified, keyMoment.kevinified) && + Objects.equals(this.verbatim, keyMoment.verbatim); + } + + @Override + public int hashCode() { + return Objects.hash(kevinified, verbatim); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KeyMoment {\n"); + sb.append(" kevinified: ").append(toIndentedString(kevinified)).append("\n"); + sb.append(" verbatim: ").append(toIndentedString(verbatim)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `kevinified` to the URL query string + if (getKevinified() != null) { + joiner.add(String.format("%skevinified%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKevinified())))); + } + + // add `verbatim` to the URL query string + if (getVerbatim() != null) { + joiner.add(String.format("%sverbatim%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVerbatim())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResponse.java new file mode 100644 index 0000000..30f9d2b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseCreateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseCreateResponse + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseCreateResponse.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseCreateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseCreateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private LegacyKnowledgeBaseCreateResult result; + + public LegacyKnowledgeBaseCreateResponse() { + } + + public LegacyKnowledgeBaseCreateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public LegacyKnowledgeBaseCreateResponse result(@javax.annotation.Nonnull LegacyKnowledgeBaseCreateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LegacyKnowledgeBaseCreateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull LegacyKnowledgeBaseCreateResult result) { + this.result = result; + } + + + /** + * Return true if this LegacyKnowledgeBaseCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseCreateResponse legacyKnowledgeBaseCreateResponse = (LegacyKnowledgeBaseCreateResponse) o; + return Objects.equals(this.status, legacyKnowledgeBaseCreateResponse.status) && + Objects.equals(this.result, legacyKnowledgeBaseCreateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseCreateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResult.java new file mode 100644 index 0000000..ae9e463 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseCreateResult.java @@ -0,0 +1,276 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseCreateResult + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseCreateResult.JSON_PROPERTY_DETAIL, + LegacyKnowledgeBaseCreateResult.JSON_PROPERTY_KB_ID, + LegacyKnowledgeBaseCreateResult.JSON_PROPERTY_KB_NAME, + LegacyKnowledgeBaseCreateResult.JSON_PROPERTY_FILE_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseCreateResult { + public static final String JSON_PROPERTY_DETAIL = "detail"; + @javax.annotation.Nonnull + private String detail; + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nonnull + private UUID kbId; + + public static final String JSON_PROPERTY_KB_NAME = "kb_name"; + @javax.annotation.Nonnull + private String kbName; + + public static final String JSON_PROPERTY_FILE_IDS = "file_ids"; + @javax.annotation.Nonnull + private List fileIds = new ArrayList<>(); + + public LegacyKnowledgeBaseCreateResult() { + } + + public LegacyKnowledgeBaseCreateResult detail(@javax.annotation.Nonnull String detail) { + this.detail = detail; + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDetail() { + return detail; + } + + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDetail(@javax.annotation.Nonnull String detail) { + this.detail = detail; + } + + + public LegacyKnowledgeBaseCreateResult kbId(@javax.annotation.Nonnull UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKbId(@javax.annotation.Nonnull UUID kbId) { + this.kbId = kbId; + } + + + public LegacyKnowledgeBaseCreateResult kbName(@javax.annotation.Nonnull String kbName) { + this.kbName = kbName; + return this; + } + + /** + * Get kbName + * @return kbName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KB_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKbName() { + return kbName; + } + + + @JsonProperty(JSON_PROPERTY_KB_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKbName(@javax.annotation.Nonnull String kbName) { + this.kbName = kbName; + } + + + public LegacyKnowledgeBaseCreateResult fileIds(@javax.annotation.Nonnull List fileIds) { + this.fileIds = fileIds; + return this; + } + + public LegacyKnowledgeBaseCreateResult addFileIdsItem(UUID fileIdsItem) { + if (this.fileIds == null) { + this.fileIds = new ArrayList<>(); + } + this.fileIds.add(fileIdsItem); + return this; + } + + /** + * Get fileIds + * @return fileIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFileIds() { + return fileIds; + } + + + @JsonProperty(JSON_PROPERTY_FILE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFileIds(@javax.annotation.Nonnull List fileIds) { + this.fileIds = fileIds; + } + + + /** + * Return true if this LegacyKnowledgeBaseCreateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseCreateResult legacyKnowledgeBaseCreateResult = (LegacyKnowledgeBaseCreateResult) o; + return Objects.equals(this.detail, legacyKnowledgeBaseCreateResult.detail) && + Objects.equals(this.kbId, legacyKnowledgeBaseCreateResult.kbId) && + Objects.equals(this.kbName, legacyKnowledgeBaseCreateResult.kbName) && + Objects.equals(this.fileIds, legacyKnowledgeBaseCreateResult.fileIds); + } + + @Override + public int hashCode() { + return Objects.hash(detail, kbId, kbName, fileIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseCreateResult {\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" kbName: ").append(toIndentedString(kbName)).append("\n"); + sb.append(" fileIds: ").append(toIndentedString(fileIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `kb_name` to the URL query string + if (getKbName() != null) { + joiner.add(String.format("%skb_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbName())))); + } + + // add `file_ids` to the URL query string + if (getFileIds() != null) { + for (int i = 0; i < getFileIds().size(); i++) { + if (getFileIds().get(i) != null) { + joiner.add(String.format("%sfile_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFileIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFileRow.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFileRow.java new file mode 100644 index 0000000..89a84cb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFileRow.java @@ -0,0 +1,391 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseFileRow + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseFileRow.JSON_PROPERTY_ID, + LegacyKnowledgeBaseFileRow.JSON_PROPERTY_NAME, + LegacyKnowledgeBaseFileRow.JSON_PROPERTY_FILE_SIZE, + LegacyKnowledgeBaseFileRow.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseFileRow.JSON_PROPERTY_UPDATED, + LegacyKnowledgeBaseFileRow.JSON_PROPERTY_UPDATED_BY, + LegacyKnowledgeBaseFileRow.JSON_PROPERTY_ERROR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseFileRow { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_FILE_SIZE = "file_size"; + @javax.annotation.Nonnull + private Integer fileSize; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_UPDATED = "updated"; + @javax.annotation.Nonnull + private OffsetDateTime updated; + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + @javax.annotation.Nullable + private String updatedBy; + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public LegacyKnowledgeBaseFileRow() { + } + + public LegacyKnowledgeBaseFileRow id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public LegacyKnowledgeBaseFileRow name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public LegacyKnowledgeBaseFileRow fileSize(@javax.annotation.Nonnull Integer fileSize) { + this.fileSize = fileSize; + return this; + } + + /** + * Get fileSize + * @return fileSize + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getFileSize() { + return fileSize; + } + + + @JsonProperty(JSON_PROPERTY_FILE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFileSize(@javax.annotation.Nonnull Integer fileSize) { + this.fileSize = fileSize; + } + + + public LegacyKnowledgeBaseFileRow status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public LegacyKnowledgeBaseFileRow updated(@javax.annotation.Nonnull OffsetDateTime updated) { + this.updated = updated; + return this; + } + + /** + * Get updated + * @return updated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdated() { + return updated; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdated(@javax.annotation.Nonnull OffsetDateTime updated) { + this.updated = updated; + } + + + public LegacyKnowledgeBaseFileRow updatedBy(@javax.annotation.Nullable String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + /** + * Get updatedBy + * @return updatedBy + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUpdatedBy() { + return updatedBy; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedBy(@javax.annotation.Nullable String updatedBy) { + this.updatedBy = updatedBy; + } + + + public LegacyKnowledgeBaseFileRow error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + /** + * Return true if this LegacyKnowledgeBaseFileRow object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseFileRow legacyKnowledgeBaseFileRow = (LegacyKnowledgeBaseFileRow) o; + return Objects.equals(this.id, legacyKnowledgeBaseFileRow.id) && + Objects.equals(this.name, legacyKnowledgeBaseFileRow.name) && + Objects.equals(this.fileSize, legacyKnowledgeBaseFileRow.fileSize) && + Objects.equals(this.status, legacyKnowledgeBaseFileRow.status) && + Objects.equals(this.updated, legacyKnowledgeBaseFileRow.updated) && + Objects.equals(this.updatedBy, legacyKnowledgeBaseFileRow.updatedBy) && + equalsNullable(this.error, legacyKnowledgeBaseFileRow.error); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, fileSize, status, updated, updatedBy, hashCodeNullable(error)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseFileRow {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" fileSize: ").append(toIndentedString(fileSize)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `file_size` to the URL query string + if (getFileSize() != null) { + joiner.add(String.format("%sfile_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFileSize())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `updated` to the URL query string + if (getUpdated() != null) { + joiner.add(String.format("%supdated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdated())))); + } + + // add `updated_by` to the URL query string + if (getUpdatedBy() != null) { + joiner.add(String.format("%supdated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedBy())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesRequest.java new file mode 100644 index 0000000..c52b464 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesRequest.java @@ -0,0 +1,333 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseFilesRequest + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseFilesRequest.JSON_PROPERTY_KB_ID, + LegacyKnowledgeBaseFilesRequest.JSON_PROPERTY_SEARCH, + LegacyKnowledgeBaseFilesRequest.JSON_PROPERTY_SORT, + LegacyKnowledgeBaseFilesRequest.JSON_PROPERTY_PAGE_NUMBER, + LegacyKnowledgeBaseFilesRequest.JSON_PROPERTY_PAGE_SIZE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseFilesRequest { + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nonnull + private UUID kbId; + + public static final String JSON_PROPERTY_SEARCH = "search"; + private JsonNullable search = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SORT = "sort"; + @javax.annotation.Nullable + private List> sort = new ArrayList<>(); + + public static final String JSON_PROPERTY_PAGE_NUMBER = "page_number"; + @javax.annotation.Nullable + private Integer pageNumber = 0; + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + @javax.annotation.Nullable + private Integer pageSize = 10; + + public LegacyKnowledgeBaseFilesRequest() { + } + + public LegacyKnowledgeBaseFilesRequest kbId(@javax.annotation.Nonnull UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKbId(@javax.annotation.Nonnull UUID kbId) { + this.kbId = kbId; + } + + + public LegacyKnowledgeBaseFilesRequest search(@javax.annotation.Nullable String search) { + this.search = JsonNullable.of(search); + return this; + } + + /** + * Get search + * @return search + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSearch() { + return search.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSearch_JsonNullable() { + return search; + } + + @JsonProperty(JSON_PROPERTY_SEARCH) + public void setSearch_JsonNullable(JsonNullable search) { + this.search = search; + } + + public void setSearch(@javax.annotation.Nullable String search) { + this.search = JsonNullable.of(search); + } + + + public LegacyKnowledgeBaseFilesRequest sort(@javax.annotation.Nullable List> sort) { + this.sort = sort; + return this; + } + + public LegacyKnowledgeBaseFilesRequest addSortItem(Map sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getSort() { + return sort; + } + + + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSort(@javax.annotation.Nullable List> sort) { + this.sort = sort; + } + + + public LegacyKnowledgeBaseFilesRequest pageNumber(@javax.annotation.Nullable Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Get pageNumber + * @return pageNumber + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPageNumber() { + return pageNumber; + } + + + @JsonProperty(JSON_PROPERTY_PAGE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPageNumber(@javax.annotation.Nullable Integer pageNumber) { + this.pageNumber = pageNumber; + } + + + public LegacyKnowledgeBaseFilesRequest pageSize(@javax.annotation.Nullable Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Get pageSize + * @return pageSize + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPageSize() { + return pageSize; + } + + + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPageSize(@javax.annotation.Nullable Integer pageSize) { + this.pageSize = pageSize; + } + + + /** + * Return true if this LegacyKnowledgeBaseFilesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseFilesRequest legacyKnowledgeBaseFilesRequest = (LegacyKnowledgeBaseFilesRequest) o; + return Objects.equals(this.kbId, legacyKnowledgeBaseFilesRequest.kbId) && + equalsNullable(this.search, legacyKnowledgeBaseFilesRequest.search) && + Objects.equals(this.sort, legacyKnowledgeBaseFilesRequest.sort) && + Objects.equals(this.pageNumber, legacyKnowledgeBaseFilesRequest.pageNumber) && + Objects.equals(this.pageSize, legacyKnowledgeBaseFilesRequest.pageSize); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(kbId, hashCodeNullable(search), sort, pageNumber, pageSize); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseFilesRequest {\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" search: ").append(toIndentedString(search)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `search` to the URL query string + if (getSearch() != null) { + joiner.add(String.format("%ssearch%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSearch())))); + } + + // add `sort` to the URL query string + if (getSort() != null) { + for (int i = 0; i < getSort().size(); i++) { + joiner.add(String.format("%ssort%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSort().get(i))))); + } + } + + // add `page_number` to the URL query string + if (getPageNumber() != null) { + joiner.add(String.format("%spage_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageNumber())))); + } + + // add `page_size` to the URL query string + if (getPageSize() != null) { + joiner.add(String.format("%spage_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPageSize())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResponse.java new file mode 100644 index 0000000..64508c4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseFilesResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseFilesResponse + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseFilesResponse.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseFilesResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseFilesResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private LegacyKnowledgeBaseFilesResult result; + + public LegacyKnowledgeBaseFilesResponse() { + } + + public LegacyKnowledgeBaseFilesResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public LegacyKnowledgeBaseFilesResponse result(@javax.annotation.Nonnull LegacyKnowledgeBaseFilesResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LegacyKnowledgeBaseFilesResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull LegacyKnowledgeBaseFilesResult result) { + this.result = result; + } + + + /** + * Return true if this LegacyKnowledgeBaseFilesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseFilesResponse legacyKnowledgeBaseFilesResponse = (LegacyKnowledgeBaseFilesResponse) o; + return Objects.equals(this.status, legacyKnowledgeBaseFilesResponse.status) && + Objects.equals(this.result, legacyKnowledgeBaseFilesResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseFilesResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResult.java new file mode 100644 index 0000000..b553ec9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseFilesResult.java @@ -0,0 +1,312 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseFileRow; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseFilesResult + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseFilesResult.JSON_PROPERTY_TABLE_DATA, + LegacyKnowledgeBaseFilesResult.JSON_PROPERTY_LAST_UPDATED, + LegacyKnowledgeBaseFilesResult.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseFilesResult.JSON_PROPERTY_STATUS_COUNT, + LegacyKnowledgeBaseFilesResult.JSON_PROPERTY_TOTAL_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseFilesResult { + public static final String JSON_PROPERTY_TABLE_DATA = "table_data"; + @javax.annotation.Nonnull + private List tableData = new ArrayList<>(); + + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; + @javax.annotation.Nonnull + private OffsetDateTime lastUpdated; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_STATUS_COUNT = "status_count"; + @javax.annotation.Nonnull + private Integer statusCount; + + public static final String JSON_PROPERTY_TOTAL_ROWS = "total_rows"; + @javax.annotation.Nonnull + private Integer totalRows; + + public LegacyKnowledgeBaseFilesResult() { + } + + public LegacyKnowledgeBaseFilesResult tableData(@javax.annotation.Nonnull List tableData) { + this.tableData = tableData; + return this; + } + + public LegacyKnowledgeBaseFilesResult addTableDataItem(LegacyKnowledgeBaseFileRow tableDataItem) { + if (this.tableData == null) { + this.tableData = new ArrayList<>(); + } + this.tableData.add(tableDataItem); + return this; + } + + /** + * Get tableData + * @return tableData + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTableData() { + return tableData; + } + + + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTableData(@javax.annotation.Nonnull List tableData) { + this.tableData = tableData; + } + + + public LegacyKnowledgeBaseFilesResult lastUpdated(@javax.annotation.Nonnull OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get lastUpdated + * @return lastUpdated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastUpdated() { + return lastUpdated; + } + + + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastUpdated(@javax.annotation.Nonnull OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + } + + + public LegacyKnowledgeBaseFilesResult status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public LegacyKnowledgeBaseFilesResult statusCount(@javax.annotation.Nonnull Integer statusCount) { + this.statusCount = statusCount; + return this; + } + + /** + * Get statusCount + * @return statusCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getStatusCount() { + return statusCount; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatusCount(@javax.annotation.Nonnull Integer statusCount) { + this.statusCount = statusCount; + } + + + public LegacyKnowledgeBaseFilesResult totalRows(@javax.annotation.Nonnull Integer totalRows) { + this.totalRows = totalRows; + return this; + } + + /** + * Get totalRows + * @return totalRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalRows() { + return totalRows; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalRows(@javax.annotation.Nonnull Integer totalRows) { + this.totalRows = totalRows; + } + + + /** + * Return true if this LegacyKnowledgeBaseFilesResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseFilesResult legacyKnowledgeBaseFilesResult = (LegacyKnowledgeBaseFilesResult) o; + return Objects.equals(this.tableData, legacyKnowledgeBaseFilesResult.tableData) && + Objects.equals(this.lastUpdated, legacyKnowledgeBaseFilesResult.lastUpdated) && + Objects.equals(this.status, legacyKnowledgeBaseFilesResult.status) && + Objects.equals(this.statusCount, legacyKnowledgeBaseFilesResult.statusCount) && + Objects.equals(this.totalRows, legacyKnowledgeBaseFilesResult.totalRows); + } + + @Override + public int hashCode() { + return Objects.hash(tableData, lastUpdated, status, statusCount, totalRows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseFilesResult {\n"); + sb.append(" tableData: ").append(toIndentedString(tableData)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusCount: ").append(toIndentedString(statusCount)).append("\n"); + sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `table_data` to the URL query string + if (getTableData() != null) { + for (int i = 0; i < getTableData().size(); i++) { + if (getTableData().get(i) != null) { + joiner.add(getTableData().get(i).toUrlQueryString(String.format("%stable_data%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `last_updated` to the URL query string + if (getLastUpdated() != null) { + joiner.add(String.format("%slast_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastUpdated())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `status_count` to the URL query string + if (getStatusCount() != null) { + joiner.add(String.format("%sstatus_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusCount())))); + } + + // add `total_rows` to the URL query string + if (getTotalRows() != null) { + joiner.add(String.format("%stotal_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalRows())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResponse.java new file mode 100644 index 0000000..5def526 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseListResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseListResponse + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseListResponse.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private LegacyKnowledgeBaseListResult result; + + public LegacyKnowledgeBaseListResponse() { + } + + public LegacyKnowledgeBaseListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public LegacyKnowledgeBaseListResponse result(@javax.annotation.Nonnull LegacyKnowledgeBaseListResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LegacyKnowledgeBaseListResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull LegacyKnowledgeBaseListResult result) { + this.result = result; + } + + + /** + * Return true if this LegacyKnowledgeBaseListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseListResponse legacyKnowledgeBaseListResponse = (LegacyKnowledgeBaseListResponse) o; + return Objects.equals(this.status, legacyKnowledgeBaseListResponse.status) && + Objects.equals(this.result, legacyKnowledgeBaseListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResult.java new file mode 100644 index 0000000..502583b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseListResult.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseOption; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseListResult + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseListResult.JSON_PROPERTY_TABLE_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseListResult { + public static final String JSON_PROPERTY_TABLE_DATA = "table_data"; + @javax.annotation.Nonnull + private List tableData = new ArrayList<>(); + + public LegacyKnowledgeBaseListResult() { + } + + public LegacyKnowledgeBaseListResult tableData(@javax.annotation.Nonnull List tableData) { + this.tableData = tableData; + return this; + } + + public LegacyKnowledgeBaseListResult addTableDataItem(LegacyKnowledgeBaseOption tableDataItem) { + if (this.tableData == null) { + this.tableData = new ArrayList<>(); + } + this.tableData.add(tableDataItem); + return this; + } + + /** + * Get tableData + * @return tableData + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTableData() { + return tableData; + } + + + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTableData(@javax.annotation.Nonnull List tableData) { + this.tableData = tableData; + } + + + /** + * Return true if this LegacyKnowledgeBaseListResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseListResult legacyKnowledgeBaseListResult = (LegacyKnowledgeBaseListResult) o; + return Objects.equals(this.tableData, legacyKnowledgeBaseListResult.tableData); + } + + @Override + public int hashCode() { + return Objects.hash(tableData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseListResult {\n"); + sb.append(" tableData: ").append(toIndentedString(tableData)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `table_data` to the URL query string + if (getTableData() != null) { + for (int i = 0; i < getTableData().size(); i++) { + if (getTableData().get(i) != null) { + joiner.add(getTableData().get(i).toUrlQueryString(String.format("%stable_data%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationRequest.java new file mode 100644 index 0000000..6a649eb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationRequest.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseMutationRequest + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseMutationRequest.JSON_PROPERTY_NAME, + LegacyKnowledgeBaseMutationRequest.JSON_PROPERTY_KB_ID, + LegacyKnowledgeBaseMutationRequest.JSON_PROPERTY_FILES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseMutationRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nullable + private UUID kbId; + + public static final String JSON_PROPERTY_FILES = "files"; + @javax.annotation.Nullable + private List files = new ArrayList<>(); + + public LegacyKnowledgeBaseMutationRequest() { + } + + public LegacyKnowledgeBaseMutationRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public LegacyKnowledgeBaseMutationRequest kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + } + + + public LegacyKnowledgeBaseMutationRequest files(@javax.annotation.Nullable List files) { + this.files = files; + return this; + } + + public LegacyKnowledgeBaseMutationRequest addFilesItem(UUID filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFiles() { + return files; + } + + + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFiles(@javax.annotation.Nullable List files) { + this.files = files; + } + + + /** + * Return true if this LegacyKnowledgeBaseMutationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseMutationRequest legacyKnowledgeBaseMutationRequest = (LegacyKnowledgeBaseMutationRequest) o; + return Objects.equals(this.name, legacyKnowledgeBaseMutationRequest.name) && + Objects.equals(this.kbId, legacyKnowledgeBaseMutationRequest.kbId) && + Objects.equals(this.files, legacyKnowledgeBaseMutationRequest.files); + } + + @Override + public int hashCode() { + return Objects.hash(name, kbId, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseMutationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `files` to the URL query string + if (getFiles() != null) { + for (int i = 0; i < getFiles().size(); i++) { + if (getFiles().get(i) != null) { + joiner.add(String.format("%sfiles%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFiles().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResponse.java new file mode 100644 index 0000000..d61f5e2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseMutationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseMutationResponse + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseMutationResponse.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseMutationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseMutationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private LegacyKnowledgeBaseMutationResult result; + + public LegacyKnowledgeBaseMutationResponse() { + } + + public LegacyKnowledgeBaseMutationResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public LegacyKnowledgeBaseMutationResponse result(@javax.annotation.Nonnull LegacyKnowledgeBaseMutationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LegacyKnowledgeBaseMutationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull LegacyKnowledgeBaseMutationResult result) { + this.result = result; + } + + + /** + * Return true if this LegacyKnowledgeBaseMutationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseMutationResponse legacyKnowledgeBaseMutationResponse = (LegacyKnowledgeBaseMutationResponse) o; + return Objects.equals(this.status, legacyKnowledgeBaseMutationResponse.status) && + Objects.equals(this.result, legacyKnowledgeBaseMutationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseMutationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResult.java new file mode 100644 index 0000000..935628a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseMutationResult.java @@ -0,0 +1,421 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseMutationResult + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_ID, + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_NAME, + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_ORGANIZATION, + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_FILES, + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_UPDATED_AT, + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_CREATED_BY, + LegacyKnowledgeBaseMutationResult.JSON_PROPERTY_LAST_ERROR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseMutationResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nonnull + private UUID organization; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_FILES = "files"; + @javax.annotation.Nonnull + private List files = new ArrayList<>(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nonnull + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + @javax.annotation.Nullable + private String createdBy; + + public static final String JSON_PROPERTY_LAST_ERROR = "last_error"; + @javax.annotation.Nullable + private String lastError; + + public LegacyKnowledgeBaseMutationResult() { + } + + public LegacyKnowledgeBaseMutationResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public LegacyKnowledgeBaseMutationResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public LegacyKnowledgeBaseMutationResult organization(@javax.annotation.Nonnull UUID organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getOrganization() { + return organization; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrganization(@javax.annotation.Nonnull UUID organization) { + this.organization = organization; + } + + + public LegacyKnowledgeBaseMutationResult status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public LegacyKnowledgeBaseMutationResult files(@javax.annotation.Nonnull List files) { + this.files = files; + return this; + } + + public LegacyKnowledgeBaseMutationResult addFilesItem(UUID filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFiles() { + return files; + } + + + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFiles(@javax.annotation.Nonnull List files) { + this.files = files; + } + + + public LegacyKnowledgeBaseMutationResult updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public LegacyKnowledgeBaseMutationResult createdBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Get createdBy + * @return createdBy + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + } + + + public LegacyKnowledgeBaseMutationResult lastError(@javax.annotation.Nullable String lastError) { + this.lastError = lastError; + return this; + } + + /** + * Get lastError + * @return lastError + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLastError() { + return lastError; + } + + + @JsonProperty(JSON_PROPERTY_LAST_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastError(@javax.annotation.Nullable String lastError) { + this.lastError = lastError; + } + + + /** + * Return true if this LegacyKnowledgeBaseMutationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseMutationResult legacyKnowledgeBaseMutationResult = (LegacyKnowledgeBaseMutationResult) o; + return Objects.equals(this.id, legacyKnowledgeBaseMutationResult.id) && + Objects.equals(this.name, legacyKnowledgeBaseMutationResult.name) && + Objects.equals(this.organization, legacyKnowledgeBaseMutationResult.organization) && + Objects.equals(this.status, legacyKnowledgeBaseMutationResult.status) && + Objects.equals(this.files, legacyKnowledgeBaseMutationResult.files) && + Objects.equals(this.updatedAt, legacyKnowledgeBaseMutationResult.updatedAt) && + Objects.equals(this.createdBy, legacyKnowledgeBaseMutationResult.createdBy) && + Objects.equals(this.lastError, legacyKnowledgeBaseMutationResult.lastError); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, organization, status, files, updatedAt, createdBy, lastError); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseMutationResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" lastError: ").append(toIndentedString(lastError)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `files` to the URL query string + if (getFiles() != null) { + for (int i = 0; i < getFiles().size(); i++) { + if (getFiles().get(i) != null) { + joiner.add(String.format("%sfiles%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFiles().get(i))))); + } + } + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `created_by` to the URL query string + if (getCreatedBy() != null) { + joiner.add(String.format("%screated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); + } + + // add `last_error` to the URL query string + if (getLastError() != null) { + joiner.add(String.format("%slast_error%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastError())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseOption.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseOption.java new file mode 100644 index 0000000..7b54138 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseOption.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseOption + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseOption.JSON_PROPERTY_ID, + LegacyKnowledgeBaseOption.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseOption { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public LegacyKnowledgeBaseOption() { + } + + public LegacyKnowledgeBaseOption id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public LegacyKnowledgeBaseOption name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this LegacyKnowledgeBaseOption object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseOption legacyKnowledgeBaseOption = (LegacyKnowledgeBaseOption) o; + return Objects.equals(this.id, legacyKnowledgeBaseOption.id) && + Objects.equals(this.name, legacyKnowledgeBaseOption.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseOption {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResponse.java new file mode 100644 index 0000000..1fbd19a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseSdkCodeResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseSdkCodeResponse + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseSdkCodeResponse.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseSdkCodeResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseSdkCodeResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private LegacyKnowledgeBaseSdkCodeResult result; + + public LegacyKnowledgeBaseSdkCodeResponse() { + } + + public LegacyKnowledgeBaseSdkCodeResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public LegacyKnowledgeBaseSdkCodeResponse result(@javax.annotation.Nonnull LegacyKnowledgeBaseSdkCodeResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LegacyKnowledgeBaseSdkCodeResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull LegacyKnowledgeBaseSdkCodeResult result) { + this.result = result; + } + + + /** + * Return true if this LegacyKnowledgeBaseSdkCodeResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseSdkCodeResponse legacyKnowledgeBaseSdkCodeResponse = (LegacyKnowledgeBaseSdkCodeResponse) o; + return Objects.equals(this.status, legacyKnowledgeBaseSdkCodeResponse.status) && + Objects.equals(this.result, legacyKnowledgeBaseSdkCodeResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseSdkCodeResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResult.java new file mode 100644 index 0000000..5403270 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseSdkCodeResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseSdkCodeResult + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseSdkCodeResult.JSON_PROPERTY_CODE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseSdkCodeResult { + public static final String JSON_PROPERTY_CODE = "code"; + @javax.annotation.Nonnull + private String code; + + public LegacyKnowledgeBaseSdkCodeResult() { + } + + public LegacyKnowledgeBaseSdkCodeResult code(@javax.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(@javax.annotation.Nonnull String code) { + this.code = code; + } + + + /** + * Return true if this LegacyKnowledgeBaseSdkCodeResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseSdkCodeResult legacyKnowledgeBaseSdkCodeResult = (LegacyKnowledgeBaseSdkCodeResult) o; + return Objects.equals(this.code, legacyKnowledgeBaseSdkCodeResult.code); + } + + @Override + public int hashCode() { + return Objects.hash(code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseSdkCodeResult {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableColumn.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableColumn.java new file mode 100644 index 0000000..80d646b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableColumn.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseTableColumn + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseTableColumn.JSON_PROPERTY_ID, + LegacyKnowledgeBaseTableColumn.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseTableColumn { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public LegacyKnowledgeBaseTableColumn() { + } + + public LegacyKnowledgeBaseTableColumn id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public LegacyKnowledgeBaseTableColumn name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this LegacyKnowledgeBaseTableColumn object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseTableColumn legacyKnowledgeBaseTableColumn = (LegacyKnowledgeBaseTableColumn) o; + return Objects.equals(this.id, legacyKnowledgeBaseTableColumn.id) && + Objects.equals(this.name, legacyKnowledgeBaseTableColumn.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseTableColumn {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResponse.java new file mode 100644 index 0000000..671d726 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseTableResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseTableResponse + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseTableResponse.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseTableResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseTableResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private LegacyKnowledgeBaseTableResult result; + + public LegacyKnowledgeBaseTableResponse() { + } + + public LegacyKnowledgeBaseTableResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public LegacyKnowledgeBaseTableResponse result(@javax.annotation.Nonnull LegacyKnowledgeBaseTableResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LegacyKnowledgeBaseTableResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull LegacyKnowledgeBaseTableResult result) { + this.result = result; + } + + + /** + * Return true if this LegacyKnowledgeBaseTableResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseTableResponse legacyKnowledgeBaseTableResponse = (LegacyKnowledgeBaseTableResponse) o; + return Objects.equals(this.status, legacyKnowledgeBaseTableResponse.status) && + Objects.equals(this.result, legacyKnowledgeBaseTableResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseTableResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResult.java new file mode 100644 index 0000000..022ddc6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableResult.java @@ -0,0 +1,253 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LegacyKnowledgeBaseTableColumn; +import com.futureagi.sdk.model.LegacyKnowledgeBaseTableRow; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseTableResult + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseTableResult.JSON_PROPERTY_COLUMN_CONFIG, + LegacyKnowledgeBaseTableResult.JSON_PROPERTY_TABLE_DATA, + LegacyKnowledgeBaseTableResult.JSON_PROPERTY_TOTAL_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseTableResult { + public static final String JSON_PROPERTY_COLUMN_CONFIG = "column_config"; + @javax.annotation.Nullable + private List columnConfig = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE_DATA = "table_data"; + @javax.annotation.Nullable + private List tableData = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_ROWS = "total_rows"; + @javax.annotation.Nullable + private Integer totalRows; + + public LegacyKnowledgeBaseTableResult() { + } + + public LegacyKnowledgeBaseTableResult columnConfig(@javax.annotation.Nullable List columnConfig) { + this.columnConfig = columnConfig; + return this; + } + + public LegacyKnowledgeBaseTableResult addColumnConfigItem(LegacyKnowledgeBaseTableColumn columnConfigItem) { + if (this.columnConfig == null) { + this.columnConfig = new ArrayList<>(); + } + this.columnConfig.add(columnConfigItem); + return this; + } + + /** + * Get columnConfig + * @return columnConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumnConfig() { + return columnConfig; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnConfig(@javax.annotation.Nullable List columnConfig) { + this.columnConfig = columnConfig; + } + + + public LegacyKnowledgeBaseTableResult tableData(@javax.annotation.Nullable List tableData) { + this.tableData = tableData; + return this; + } + + public LegacyKnowledgeBaseTableResult addTableDataItem(LegacyKnowledgeBaseTableRow tableDataItem) { + if (this.tableData == null) { + this.tableData = new ArrayList<>(); + } + this.tableData.add(tableDataItem); + return this; + } + + /** + * Get tableData + * @return tableData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTableData() { + return tableData; + } + + + @JsonProperty(JSON_PROPERTY_TABLE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTableData(@javax.annotation.Nullable List tableData) { + this.tableData = tableData; + } + + + public LegacyKnowledgeBaseTableResult totalRows(@javax.annotation.Nullable Integer totalRows) { + this.totalRows = totalRows; + return this; + } + + /** + * Get totalRows + * @return totalRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalRows() { + return totalRows; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalRows(@javax.annotation.Nullable Integer totalRows) { + this.totalRows = totalRows; + } + + + /** + * Return true if this LegacyKnowledgeBaseTableResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseTableResult legacyKnowledgeBaseTableResult = (LegacyKnowledgeBaseTableResult) o; + return Objects.equals(this.columnConfig, legacyKnowledgeBaseTableResult.columnConfig) && + Objects.equals(this.tableData, legacyKnowledgeBaseTableResult.tableData) && + Objects.equals(this.totalRows, legacyKnowledgeBaseTableResult.totalRows); + } + + @Override + public int hashCode() { + return Objects.hash(columnConfig, tableData, totalRows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseTableResult {\n"); + sb.append(" columnConfig: ").append(toIndentedString(columnConfig)).append("\n"); + sb.append(" tableData: ").append(toIndentedString(tableData)).append("\n"); + sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_config` to the URL query string + if (getColumnConfig() != null) { + for (int i = 0; i < getColumnConfig().size(); i++) { + if (getColumnConfig().get(i) != null) { + joiner.add(getColumnConfig().get(i).toUrlQueryString(String.format("%scolumn_config%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `table_data` to the URL query string + if (getTableData() != null) { + for (int i = 0; i < getTableData().size(); i++) { + if (getTableData().get(i) != null) { + joiner.add(getTableData().get(i).toUrlQueryString(String.format("%stable_data%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_rows` to the URL query string + if (getTotalRows() != null) { + joiner.add(String.format("%stotal_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalRows())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableRow.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableRow.java new file mode 100644 index 0000000..4b3fc07 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LegacyKnowledgeBaseTableRow.java @@ -0,0 +1,391 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LegacyKnowledgeBaseTableRow + */ +@JsonPropertyOrder({ + LegacyKnowledgeBaseTableRow.JSON_PROPERTY_ID, + LegacyKnowledgeBaseTableRow.JSON_PROPERTY_NAME, + LegacyKnowledgeBaseTableRow.JSON_PROPERTY_FILES_UPLOADED, + LegacyKnowledgeBaseTableRow.JSON_PROPERTY_STATUS, + LegacyKnowledgeBaseTableRow.JSON_PROPERTY_ERROR, + LegacyKnowledgeBaseTableRow.JSON_PROPERTY_UPDATED_AT, + LegacyKnowledgeBaseTableRow.JSON_PROPERTY_CREATED_BY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LegacyKnowledgeBaseTableRow { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_FILES_UPLOADED = "files_uploaded"; + @javax.annotation.Nonnull + private Integer filesUploaded; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nonnull + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + @javax.annotation.Nullable + private String createdBy; + + public LegacyKnowledgeBaseTableRow() { + } + + public LegacyKnowledgeBaseTableRow id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public LegacyKnowledgeBaseTableRow name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public LegacyKnowledgeBaseTableRow filesUploaded(@javax.annotation.Nonnull Integer filesUploaded) { + this.filesUploaded = filesUploaded; + return this; + } + + /** + * Get filesUploaded + * @return filesUploaded + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILES_UPLOADED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getFilesUploaded() { + return filesUploaded; + } + + + @JsonProperty(JSON_PROPERTY_FILES_UPLOADED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilesUploaded(@javax.annotation.Nonnull Integer filesUploaded) { + this.filesUploaded = filesUploaded; + } + + + public LegacyKnowledgeBaseTableRow status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public LegacyKnowledgeBaseTableRow error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public LegacyKnowledgeBaseTableRow updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public LegacyKnowledgeBaseTableRow createdBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Get createdBy + * @return createdBy + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + } + + + /** + * Return true if this LegacyKnowledgeBaseTableRow object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegacyKnowledgeBaseTableRow legacyKnowledgeBaseTableRow = (LegacyKnowledgeBaseTableRow) o; + return Objects.equals(this.id, legacyKnowledgeBaseTableRow.id) && + Objects.equals(this.name, legacyKnowledgeBaseTableRow.name) && + Objects.equals(this.filesUploaded, legacyKnowledgeBaseTableRow.filesUploaded) && + Objects.equals(this.status, legacyKnowledgeBaseTableRow.status) && + equalsNullable(this.error, legacyKnowledgeBaseTableRow.error) && + Objects.equals(this.updatedAt, legacyKnowledgeBaseTableRow.updatedAt) && + Objects.equals(this.createdBy, legacyKnowledgeBaseTableRow.createdBy); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, filesUploaded, status, hashCodeNullable(error), updatedAt, createdBy); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegacyKnowledgeBaseTableRow {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" filesUploaded: ").append(toIndentedString(filesUploaded)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `files_uploaded` to the URL query string + if (getFilesUploaded() != null) { + joiner.add(String.format("%sfiles_uploaded%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFilesUploaded())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `created_by` to the URL query string + if (getCreatedBy() != null) { + joiner.add(String.format("%screated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlertLogs200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlertLogs200Response.java new file mode 100644 index 0000000..11b894e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlertLogs200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.UserAlertMonitorLog; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ListAlertLogs200Response + */ +@JsonPropertyOrder({ + ListAlertLogs200Response.JSON_PROPERTY_COUNT, + ListAlertLogs200Response.JSON_PROPERTY_NEXT, + ListAlertLogs200Response.JSON_PROPERTY_PREVIOUS, + ListAlertLogs200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ListAlertLogs200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ListAlertLogs200Response() { + } + + public ListAlertLogs200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ListAlertLogs200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ListAlertLogs200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ListAlertLogs200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ListAlertLogs200Response addResultsItem(UserAlertMonitorLog resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this listAlertLogs_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListAlertLogs200Response listAlertLogs200Response = (ListAlertLogs200Response) o; + return Objects.equals(this.count, listAlertLogs200Response.count) && + equalsNullable(this.next, listAlertLogs200Response.next) && + equalsNullable(this.previous, listAlertLogs200Response.previous) && + Objects.equals(this.results, listAlertLogs200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListAlertLogs200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlerts200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlerts200Response.java new file mode 100644 index 0000000..7e8f892 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAlerts200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.UserAlertMonitor; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ListAlerts200Response + */ +@JsonPropertyOrder({ + ListAlerts200Response.JSON_PROPERTY_COUNT, + ListAlerts200Response.JSON_PROPERTY_NEXT, + ListAlerts200Response.JSON_PROPERTY_PREVIOUS, + ListAlerts200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ListAlerts200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ListAlerts200Response() { + } + + public ListAlerts200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ListAlerts200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ListAlerts200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ListAlerts200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ListAlerts200Response addResultsItem(UserAlertMonitor resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this listAlerts_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListAlerts200Response listAlerts200Response = (ListAlerts200Response) o; + return Objects.equals(this.count, listAlerts200Response.count) && + equalsNullable(this.next, listAlerts200Response.next) && + equalsNullable(this.previous, listAlerts200Response.previous) && + Objects.equals(this.results, listAlerts200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListAlerts200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueueItems200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueueItems200Response.java new file mode 100644 index 0000000..8a4f9cd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueueItems200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueItem; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ListAnnotationQueueItems200Response + */ +@JsonPropertyOrder({ + ListAnnotationQueueItems200Response.JSON_PROPERTY_COUNT, + ListAnnotationQueueItems200Response.JSON_PROPERTY_NEXT, + ListAnnotationQueueItems200Response.JSON_PROPERTY_PREVIOUS, + ListAnnotationQueueItems200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ListAnnotationQueueItems200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ListAnnotationQueueItems200Response() { + } + + public ListAnnotationQueueItems200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ListAnnotationQueueItems200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ListAnnotationQueueItems200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ListAnnotationQueueItems200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ListAnnotationQueueItems200Response addResultsItem(QueueItem resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this listAnnotationQueueItems_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListAnnotationQueueItems200Response listAnnotationQueueItems200Response = (ListAnnotationQueueItems200Response) o; + return Objects.equals(this.count, listAnnotationQueueItems200Response.count) && + equalsNullable(this.next, listAnnotationQueueItems200Response.next) && + equalsNullable(this.previous, listAnnotationQueueItems200Response.previous) && + Objects.equals(this.results, listAnnotationQueueItems200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListAnnotationQueueItems200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueues200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueues200Response.java new file mode 100644 index 0000000..b7bb996 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListAnnotationQueues200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AnnotationQueue; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ListAnnotationQueues200Response + */ +@JsonPropertyOrder({ + ListAnnotationQueues200Response.JSON_PROPERTY_COUNT, + ListAnnotationQueues200Response.JSON_PROPERTY_NEXT, + ListAnnotationQueues200Response.JSON_PROPERTY_PREVIOUS, + ListAnnotationQueues200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ListAnnotationQueues200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ListAnnotationQueues200Response() { + } + + public ListAnnotationQueues200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ListAnnotationQueues200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ListAnnotationQueues200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ListAnnotationQueues200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ListAnnotationQueues200Response addResultsItem(AnnotationQueue resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this listAnnotationQueues_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListAnnotationQueues200Response listAnnotationQueues200Response = (ListAnnotationQueues200Response) o; + return Objects.equals(this.count, listAnnotationQueues200Response.count) && + equalsNullable(this.next, listAnnotationQueues200Response.next) && + equalsNullable(this.previous, listAnnotationQueues200Response.previous) && + Objects.equals(this.results, listAnnotationQueues200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListAnnotationQueues200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ListExperiments200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListExperiments200Response.java new file mode 100644 index 0000000..9147369 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListExperiments200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExperimentListV2; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ListExperiments200Response + */ +@JsonPropertyOrder({ + ListExperiments200Response.JSON_PROPERTY_COUNT, + ListExperiments200Response.JSON_PROPERTY_NEXT, + ListExperiments200Response.JSON_PROPERTY_PREVIOUS, + ListExperiments200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ListExperiments200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ListExperiments200Response() { + } + + public ListExperiments200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ListExperiments200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ListExperiments200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ListExperiments200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ListExperiments200Response addResultsItem(ExperimentListV2 resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this listExperiments_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListExperiments200Response listExperiments200Response = (ListExperiments200Response) o; + return Objects.equals(this.count, listExperiments200Response.count) && + equalsNullable(this.next, listExperiments200Response.next) && + equalsNullable(this.previous, listExperiments200Response.previous) && + Objects.equals(this.results, listExperiments200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListExperiments200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ListPersonas200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListPersonas200Response.java new file mode 100644 index 0000000..5e63961 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListPersonas200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PersonaList; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ListPersonas200Response + */ +@JsonPropertyOrder({ + ListPersonas200Response.JSON_PROPERTY_COUNT, + ListPersonas200Response.JSON_PROPERTY_NEXT, + ListPersonas200Response.JSON_PROPERTY_PREVIOUS, + ListPersonas200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ListPersonas200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ListPersonas200Response() { + } + + public ListPersonas200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ListPersonas200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ListPersonas200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ListPersonas200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ListPersonas200Response addResultsItem(PersonaList resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this listPersonas_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPersonas200Response listPersonas200Response = (ListPersonas200Response) o; + return Objects.equals(this.count, listPersonas200Response.count) && + equalsNullable(this.next, listPersonas200Response.next) && + equalsNullable(this.previous, listPersonas200Response.previous) && + Objects.equals(this.results, listPersonas200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListPersonas200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ListTraceProjects200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListTraceProjects200Response.java new file mode 100644 index 0000000..d7f9a1e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ListTraceProjects200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Project; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ListTraceProjects200Response + */ +@JsonPropertyOrder({ + ListTraceProjects200Response.JSON_PROPERTY_COUNT, + ListTraceProjects200Response.JSON_PROPERTY_NEXT, + ListTraceProjects200Response.JSON_PROPERTY_PREVIOUS, + ListTraceProjects200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ListTraceProjects200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ListTraceProjects200Response() { + } + + public ListTraceProjects200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ListTraceProjects200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ListTraceProjects200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ListTraceProjects200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ListTraceProjects200Response addResultsItem(Project resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this listTraceProjects_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListTraceProjects200Response listTraceProjects200Response = (ListTraceProjects200Response) o; + return Objects.equals(this.count, listTraceProjects200Response.count) && + equalsNullable(this.next, listTraceProjects200Response.next) && + equalsNullable(this.previous, listTraceProjects200Response.previous) && + Objects.equals(this.results, listTraceProjects200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListTraceProjects200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResponse.java new file mode 100644 index 0000000..b06263b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.LocalFileDatasetCreateStartedResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LocalFileDatasetCreateStartedResponse + */ +@JsonPropertyOrder({ + LocalFileDatasetCreateStartedResponse.JSON_PROPERTY_STATUS, + LocalFileDatasetCreateStartedResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LocalFileDatasetCreateStartedResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private LocalFileDatasetCreateStartedResult result; + + public LocalFileDatasetCreateStartedResponse() { + } + + public LocalFileDatasetCreateStartedResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public LocalFileDatasetCreateStartedResponse result(@javax.annotation.Nonnull LocalFileDatasetCreateStartedResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LocalFileDatasetCreateStartedResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull LocalFileDatasetCreateStartedResult result) { + this.result = result; + } + + + /** + * Return true if this LocalFileDatasetCreateStartedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocalFileDatasetCreateStartedResponse localFileDatasetCreateStartedResponse = (LocalFileDatasetCreateStartedResponse) o; + return Objects.equals(this.status, localFileDatasetCreateStartedResponse.status) && + Objects.equals(this.result, localFileDatasetCreateStartedResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocalFileDatasetCreateStartedResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResult.java new file mode 100644 index 0000000..1baf283 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/LocalFileDatasetCreateStartedResult.java @@ -0,0 +1,390 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * LocalFileDatasetCreateStartedResult + */ +@JsonPropertyOrder({ + LocalFileDatasetCreateStartedResult.JSON_PROPERTY_MESSAGE, + LocalFileDatasetCreateStartedResult.JSON_PROPERTY_DATASET_ID, + LocalFileDatasetCreateStartedResult.JSON_PROPERTY_DATASET_NAME, + LocalFileDatasetCreateStartedResult.JSON_PROPERTY_DATASET_MODEL_TYPE, + LocalFileDatasetCreateStartedResult.JSON_PROPERTY_PROCESSING_STATUS, + LocalFileDatasetCreateStartedResult.JSON_PROPERTY_ESTIMATED_ROWS, + LocalFileDatasetCreateStartedResult.JSON_PROPERTY_ESTIMATED_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class LocalFileDatasetCreateStartedResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_DATASET_MODEL_TYPE = "dataset_model_type"; + private JsonNullable datasetModelType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + @javax.annotation.Nonnull + private String processingStatus; + + public static final String JSON_PROPERTY_ESTIMATED_ROWS = "estimated_rows"; + @javax.annotation.Nonnull + private Integer estimatedRows; + + public static final String JSON_PROPERTY_ESTIMATED_COLUMNS = "estimated_columns"; + @javax.annotation.Nonnull + private Integer estimatedColumns; + + public LocalFileDatasetCreateStartedResult() { + } + + public LocalFileDatasetCreateStartedResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public LocalFileDatasetCreateStartedResult datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public LocalFileDatasetCreateStartedResult datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public LocalFileDatasetCreateStartedResult datasetModelType(@javax.annotation.Nullable String datasetModelType) { + this.datasetModelType = JsonNullable.of(datasetModelType); + return this; + } + + /** + * Get datasetModelType + * @return datasetModelType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDatasetModelType() { + return datasetModelType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatasetModelType_JsonNullable() { + return datasetModelType; + } + + @JsonProperty(JSON_PROPERTY_DATASET_MODEL_TYPE) + public void setDatasetModelType_JsonNullable(JsonNullable datasetModelType) { + this.datasetModelType = datasetModelType; + } + + public void setDatasetModelType(@javax.annotation.Nullable String datasetModelType) { + this.datasetModelType = JsonNullable.of(datasetModelType); + } + + + public LocalFileDatasetCreateStartedResult processingStatus(@javax.annotation.Nonnull String processingStatus) { + this.processingStatus = processingStatus; + return this; + } + + /** + * Get processingStatus + * @return processingStatus + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProcessingStatus() { + return processingStatus; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProcessingStatus(@javax.annotation.Nonnull String processingStatus) { + this.processingStatus = processingStatus; + } + + + public LocalFileDatasetCreateStartedResult estimatedRows(@javax.annotation.Nonnull Integer estimatedRows) { + this.estimatedRows = estimatedRows; + return this; + } + + /** + * Get estimatedRows + * @return estimatedRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ESTIMATED_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getEstimatedRows() { + return estimatedRows; + } + + + @JsonProperty(JSON_PROPERTY_ESTIMATED_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEstimatedRows(@javax.annotation.Nonnull Integer estimatedRows) { + this.estimatedRows = estimatedRows; + } + + + public LocalFileDatasetCreateStartedResult estimatedColumns(@javax.annotation.Nonnull Integer estimatedColumns) { + this.estimatedColumns = estimatedColumns; + return this; + } + + /** + * Get estimatedColumns + * @return estimatedColumns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ESTIMATED_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getEstimatedColumns() { + return estimatedColumns; + } + + + @JsonProperty(JSON_PROPERTY_ESTIMATED_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEstimatedColumns(@javax.annotation.Nonnull Integer estimatedColumns) { + this.estimatedColumns = estimatedColumns; + } + + + /** + * Return true if this LocalFileDatasetCreateStartedResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocalFileDatasetCreateStartedResult localFileDatasetCreateStartedResult = (LocalFileDatasetCreateStartedResult) o; + return Objects.equals(this.message, localFileDatasetCreateStartedResult.message) && + Objects.equals(this.datasetId, localFileDatasetCreateStartedResult.datasetId) && + Objects.equals(this.datasetName, localFileDatasetCreateStartedResult.datasetName) && + equalsNullable(this.datasetModelType, localFileDatasetCreateStartedResult.datasetModelType) && + Objects.equals(this.processingStatus, localFileDatasetCreateStartedResult.processingStatus) && + Objects.equals(this.estimatedRows, localFileDatasetCreateStartedResult.estimatedRows) && + Objects.equals(this.estimatedColumns, localFileDatasetCreateStartedResult.estimatedColumns); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(message, datasetId, datasetName, hashCodeNullable(datasetModelType), processingStatus, estimatedRows, estimatedColumns); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocalFileDatasetCreateStartedResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" datasetModelType: ").append(toIndentedString(datasetModelType)).append("\n"); + sb.append(" processingStatus: ").append(toIndentedString(processingStatus)).append("\n"); + sb.append(" estimatedRows: ").append(toIndentedString(estimatedRows)).append("\n"); + sb.append(" estimatedColumns: ").append(toIndentedString(estimatedColumns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `dataset_model_type` to the URL query string + if (getDatasetModelType() != null) { + joiner.add(String.format("%sdataset_model_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetModelType())))); + } + + // add `processing_status` to the URL query string + if (getProcessingStatus() != null) { + joiner.add(String.format("%sprocessing_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProcessingStatus())))); + } + + // add `estimated_rows` to the URL query string + if (getEstimatedRows() != null) { + joiner.add(String.format("%sestimated_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEstimatedRows())))); + } + + // add `estimated_columns` to the URL query string + if (getEstimatedColumns() != null) { + joiner.add(String.format("%sestimated_columns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEstimatedColumns())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ManagementAPIErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManagementAPIErrorResponse.java new file mode 100644 index 0000000..4d76b5a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManagementAPIErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ManagementAPIErrorResponse + */ +@JsonPropertyOrder({ + ManagementAPIErrorResponse.JSON_PROPERTY_STATUS, + ManagementAPIErrorResponse.JSON_PROPERTY_TYPE, + ManagementAPIErrorResponse.JSON_PROPERTY_CODE, + ManagementAPIErrorResponse.JSON_PROPERTY_DETAIL, + ManagementAPIErrorResponse.JSON_PROPERTY_RESULT, + ManagementAPIErrorResponse.JSON_PROPERTY_MESSAGE, + ManagementAPIErrorResponse.JSON_PROPERTY_ERROR, + ManagementAPIErrorResponse.JSON_PROPERTY_ATTR, + ManagementAPIErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ManagementAPIErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ManagementAPIErrorResponse() { + } + + public ManagementAPIErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ManagementAPIErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ManagementAPIErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ManagementAPIErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ManagementAPIErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ManagementAPIErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ManagementAPIErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ManagementAPIErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ManagementAPIErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ManagementAPIErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ManagementAPIErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManagementAPIErrorResponse managementAPIErrorResponse = (ManagementAPIErrorResponse) o; + return Objects.equals(this.status, managementAPIErrorResponse.status) && + equalsNullable(this.type, managementAPIErrorResponse.type) && + equalsNullable(this.code, managementAPIErrorResponse.code) && + equalsNullable(this.detail, managementAPIErrorResponse.detail) && + equalsNullable(this.result, managementAPIErrorResponse.result) && + equalsNullable(this.message, managementAPIErrorResponse.message) && + equalsNullable(this.error, managementAPIErrorResponse.error) && + equalsNullable(this.attr, managementAPIErrorResponse.attr) && + Objects.equals(this.details, managementAPIErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManagementAPIErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateRequest.java new file mode 100644 index 0000000..2f02d7d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateRequest.java @@ -0,0 +1,225 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ManualDatasetCreateRequest + */ +@JsonPropertyOrder({ + ManualDatasetCreateRequest.JSON_PROPERTY_DATASET_NAME, + ManualDatasetCreateRequest.JSON_PROPERTY_NUMBER_OF_ROWS, + ManualDatasetCreateRequest.JSON_PROPERTY_NUMBER_OF_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ManualDatasetCreateRequest { + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_NUMBER_OF_ROWS = "number_of_rows"; + @javax.annotation.Nullable + private Integer numberOfRows = 1; + + public static final String JSON_PROPERTY_NUMBER_OF_COLUMNS = "number_of_columns"; + @javax.annotation.Nullable + private Integer numberOfColumns = 1; + + public ManualDatasetCreateRequest() { + } + + public ManualDatasetCreateRequest datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public ManualDatasetCreateRequest numberOfRows(@javax.annotation.Nullable Integer numberOfRows) { + this.numberOfRows = numberOfRows; + return this; + } + + /** + * Get numberOfRows + * minimum: 1 + * @return numberOfRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumberOfRows() { + return numberOfRows; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfRows(@javax.annotation.Nullable Integer numberOfRows) { + this.numberOfRows = numberOfRows; + } + + + public ManualDatasetCreateRequest numberOfColumns(@javax.annotation.Nullable Integer numberOfColumns) { + this.numberOfColumns = numberOfColumns; + return this; + } + + /** + * Get numberOfColumns + * minimum: 1 + * @return numberOfColumns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumberOfColumns() { + return numberOfColumns; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfColumns(@javax.annotation.Nullable Integer numberOfColumns) { + this.numberOfColumns = numberOfColumns; + } + + + /** + * Return true if this ManualDatasetCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManualDatasetCreateRequest manualDatasetCreateRequest = (ManualDatasetCreateRequest) o; + return Objects.equals(this.datasetName, manualDatasetCreateRequest.datasetName) && + Objects.equals(this.numberOfRows, manualDatasetCreateRequest.numberOfRows) && + Objects.equals(this.numberOfColumns, manualDatasetCreateRequest.numberOfColumns); + } + + @Override + public int hashCode() { + return Objects.hash(datasetName, numberOfRows, numberOfColumns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManualDatasetCreateRequest {\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" numberOfRows: ").append(toIndentedString(numberOfRows)).append("\n"); + sb.append(" numberOfColumns: ").append(toIndentedString(numberOfColumns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `number_of_rows` to the URL query string + if (getNumberOfRows() != null) { + joiner.add(String.format("%snumber_of_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumberOfRows())))); + } + + // add `number_of_columns` to the URL query string + if (getNumberOfColumns() != null) { + joiner.add(String.format("%snumber_of_columns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumberOfColumns())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResponse.java new file mode 100644 index 0000000..2dccdec --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ManualDatasetCreateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ManualDatasetCreateResponse + */ +@JsonPropertyOrder({ + ManualDatasetCreateResponse.JSON_PROPERTY_STATUS, + ManualDatasetCreateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ManualDatasetCreateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ManualDatasetCreateResult result; + + public ManualDatasetCreateResponse() { + } + + public ManualDatasetCreateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ManualDatasetCreateResponse result(@javax.annotation.Nonnull ManualDatasetCreateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ManualDatasetCreateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ManualDatasetCreateResult result) { + this.result = result; + } + + + /** + * Return true if this ManualDatasetCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManualDatasetCreateResponse manualDatasetCreateResponse = (ManualDatasetCreateResponse) o; + return Objects.equals(this.status, manualDatasetCreateResponse.status) && + Objects.equals(this.result, manualDatasetCreateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManualDatasetCreateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResult.java new file mode 100644 index 0000000..5e64960 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ManualDatasetCreateResult.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ManualDatasetCreateResult + */ +@JsonPropertyOrder({ + ManualDatasetCreateResult.JSON_PROPERTY_MESSAGE, + ManualDatasetCreateResult.JSON_PROPERTY_DATASET_ID, + ManualDatasetCreateResult.JSON_PROPERTY_ROWS_CREATED, + ManualDatasetCreateResult.JSON_PROPERTY_COLUMNS_CREATED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ManualDatasetCreateResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_ROWS_CREATED = "rows_created"; + @javax.annotation.Nonnull + private Integer rowsCreated; + + public static final String JSON_PROPERTY_COLUMNS_CREATED = "columns_created"; + @javax.annotation.Nonnull + private Integer columnsCreated; + + public ManualDatasetCreateResult() { + } + + public ManualDatasetCreateResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public ManualDatasetCreateResult datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public ManualDatasetCreateResult rowsCreated(@javax.annotation.Nonnull Integer rowsCreated) { + this.rowsCreated = rowsCreated; + return this; + } + + /** + * Get rowsCreated + * @return rowsCreated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROWS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowsCreated() { + return rowsCreated; + } + + + @JsonProperty(JSON_PROPERTY_ROWS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowsCreated(@javax.annotation.Nonnull Integer rowsCreated) { + this.rowsCreated = rowsCreated; + } + + + public ManualDatasetCreateResult columnsCreated(@javax.annotation.Nonnull Integer columnsCreated) { + this.columnsCreated = columnsCreated; + return this; + } + + /** + * Get columnsCreated + * @return columnsCreated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getColumnsCreated() { + return columnsCreated; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnsCreated(@javax.annotation.Nonnull Integer columnsCreated) { + this.columnsCreated = columnsCreated; + } + + + /** + * Return true if this ManualDatasetCreateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManualDatasetCreateResult manualDatasetCreateResult = (ManualDatasetCreateResult) o; + return Objects.equals(this.message, manualDatasetCreateResult.message) && + Objects.equals(this.datasetId, manualDatasetCreateResult.datasetId) && + Objects.equals(this.rowsCreated, manualDatasetCreateResult.rowsCreated) && + Objects.equals(this.columnsCreated, manualDatasetCreateResult.columnsCreated); + } + + @Override + public int hashCode() { + return Objects.hash(message, datasetId, rowsCreated, columnsCreated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManualDatasetCreateResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" rowsCreated: ").append(toIndentedString(rowsCreated)).append("\n"); + sb.append(" columnsCreated: ").append(toIndentedString(columnsCreated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `rows_created` to the URL query string + if (getRowsCreated() != null) { + joiner.add(String.format("%srows_created%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowsCreated())))); + } + + // add `columns_created` to the URL query string + if (getColumnsCreated() != null) { + joiner.add(String.format("%scolumns_created%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnsCreated())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListItem.java new file mode 100644 index 0000000..f71b16a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListItem.java @@ -0,0 +1,642 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.MemberWorkspaceAccess; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberListItem + */ +@JsonPropertyOrder({ + MemberListItem.JSON_PROPERTY_ID, + MemberListItem.JSON_PROPERTY_NAME, + MemberListItem.JSON_PROPERTY_EMAIL, + MemberListItem.JSON_PROPERTY_ORG_LEVEL, + MemberListItem.JSON_PROPERTY_ORG_ROLE, + MemberListItem.JSON_PROPERTY_WS_LEVEL, + MemberListItem.JSON_PROPERTY_WS_ROLE, + MemberListItem.JSON_PROPERTY_WORKSPACES, + MemberListItem.JSON_PROPERTY_STATUS, + MemberListItem.JSON_PROPERTY_CREATED_AT, + MemberListItem.JSON_PROPERTY_TYPE, + MemberListItem.JSON_PROPERTY_AUTO_ACCESS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberListItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_EMAIL = "email"; + @javax.annotation.Nonnull + private String email; + + public static final String JSON_PROPERTY_ORG_LEVEL = "org_level"; + private JsonNullable orgLevel = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ORG_ROLE = "org_role"; + private JsonNullable orgRole = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WS_LEVEL = "ws_level"; + private JsonNullable wsLevel = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WS_ROLE = "ws_role"; + private JsonNullable wsRole = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WORKSPACES = "workspaces"; + @javax.annotation.Nullable + private List workspaces = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nonnull + private String createdAt; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + MEMBER(String.valueOf("member")), + + INVITE(String.valueOf("invite")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String JSON_PROPERTY_AUTO_ACCESS = "auto_access"; + @javax.annotation.Nullable + private Boolean autoAccess; + + public MemberListItem() { + } + + public MemberListItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public MemberListItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public MemberListItem email(@javax.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; + } + + + public MemberListItem orgLevel(@javax.annotation.Nullable Integer orgLevel) { + this.orgLevel = JsonNullable.of(orgLevel); + return this; + } + + /** + * Get orgLevel + * @return orgLevel + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getOrgLevel() { + return orgLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORG_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOrgLevel_JsonNullable() { + return orgLevel; + } + + @JsonProperty(JSON_PROPERTY_ORG_LEVEL) + public void setOrgLevel_JsonNullable(JsonNullable orgLevel) { + this.orgLevel = orgLevel; + } + + public void setOrgLevel(@javax.annotation.Nullable Integer orgLevel) { + this.orgLevel = JsonNullable.of(orgLevel); + } + + + public MemberListItem orgRole(@javax.annotation.Nullable String orgRole) { + this.orgRole = JsonNullable.of(orgRole); + return this; + } + + /** + * Get orgRole + * @return orgRole + */ + @javax.annotation.Nullable + @JsonIgnore + public String getOrgRole() { + return orgRole.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORG_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOrgRole_JsonNullable() { + return orgRole; + } + + @JsonProperty(JSON_PROPERTY_ORG_ROLE) + public void setOrgRole_JsonNullable(JsonNullable orgRole) { + this.orgRole = orgRole; + } + + public void setOrgRole(@javax.annotation.Nullable String orgRole) { + this.orgRole = JsonNullable.of(orgRole); + } + + + public MemberListItem wsLevel(@javax.annotation.Nullable Integer wsLevel) { + this.wsLevel = JsonNullable.of(wsLevel); + return this; + } + + /** + * Get wsLevel + * @return wsLevel + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getWsLevel() { + return wsLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWsLevel_JsonNullable() { + return wsLevel; + } + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + public void setWsLevel_JsonNullable(JsonNullable wsLevel) { + this.wsLevel = wsLevel; + } + + public void setWsLevel(@javax.annotation.Nullable Integer wsLevel) { + this.wsLevel = JsonNullable.of(wsLevel); + } + + + public MemberListItem wsRole(@javax.annotation.Nullable String wsRole) { + this.wsRole = JsonNullable.of(wsRole); + return this; + } + + /** + * Get wsRole + * @return wsRole + */ + @javax.annotation.Nullable + @JsonIgnore + public String getWsRole() { + return wsRole.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WS_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWsRole_JsonNullable() { + return wsRole; + } + + @JsonProperty(JSON_PROPERTY_WS_ROLE) + public void setWsRole_JsonNullable(JsonNullable wsRole) { + this.wsRole = wsRole; + } + + public void setWsRole(@javax.annotation.Nullable String wsRole) { + this.wsRole = JsonNullable.of(wsRole); + } + + + public MemberListItem workspaces(@javax.annotation.Nullable List workspaces) { + this.workspaces = workspaces; + return this; + } + + public MemberListItem addWorkspacesItem(MemberWorkspaceAccess workspacesItem) { + if (this.workspaces == null) { + this.workspaces = new ArrayList<>(); + } + this.workspaces.add(workspacesItem); + return this; + } + + /** + * Get workspaces + * @return workspaces + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKSPACES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWorkspaces() { + return workspaces; + } + + + @JsonProperty(JSON_PROPERTY_WORKSPACES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWorkspaces(@javax.annotation.Nullable List workspaces) { + this.workspaces = workspaces; + } + + + public MemberListItem status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public MemberListItem createdAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@javax.annotation.Nonnull String createdAt) { + this.createdAt = createdAt; + } + + + public MemberListItem type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public MemberListItem autoAccess(@javax.annotation.Nullable Boolean autoAccess) { + this.autoAccess = autoAccess; + return this; + } + + /** + * Get autoAccess + * @return autoAccess + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTO_ACCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutoAccess() { + return autoAccess; + } + + + @JsonProperty(JSON_PROPERTY_AUTO_ACCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutoAccess(@javax.annotation.Nullable Boolean autoAccess) { + this.autoAccess = autoAccess; + } + + + /** + * Return true if this MemberListItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberListItem memberListItem = (MemberListItem) o; + return Objects.equals(this.id, memberListItem.id) && + Objects.equals(this.name, memberListItem.name) && + Objects.equals(this.email, memberListItem.email) && + equalsNullable(this.orgLevel, memberListItem.orgLevel) && + equalsNullable(this.orgRole, memberListItem.orgRole) && + equalsNullable(this.wsLevel, memberListItem.wsLevel) && + equalsNullable(this.wsRole, memberListItem.wsRole) && + Objects.equals(this.workspaces, memberListItem.workspaces) && + Objects.equals(this.status, memberListItem.status) && + Objects.equals(this.createdAt, memberListItem.createdAt) && + Objects.equals(this.type, memberListItem.type) && + Objects.equals(this.autoAccess, memberListItem.autoAccess); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, email, hashCodeNullable(orgLevel), hashCodeNullable(orgRole), hashCodeNullable(wsLevel), hashCodeNullable(wsRole), workspaces, status, createdAt, type, autoAccess); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberListItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" orgLevel: ").append(toIndentedString(orgLevel)).append("\n"); + sb.append(" orgRole: ").append(toIndentedString(orgRole)).append("\n"); + sb.append(" wsLevel: ").append(toIndentedString(wsLevel)).append("\n"); + sb.append(" wsRole: ").append(toIndentedString(wsRole)).append("\n"); + sb.append(" workspaces: ").append(toIndentedString(workspaces)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" autoAccess: ").append(toIndentedString(autoAccess)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); + } + + // add `org_level` to the URL query string + if (getOrgLevel() != null) { + joiner.add(String.format("%sorg_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrgLevel())))); + } + + // add `org_role` to the URL query string + if (getOrgRole() != null) { + joiner.add(String.format("%sorg_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrgRole())))); + } + + // add `ws_level` to the URL query string + if (getWsLevel() != null) { + joiner.add(String.format("%sws_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsLevel())))); + } + + // add `ws_role` to the URL query string + if (getWsRole() != null) { + joiner.add(String.format("%sws_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsRole())))); + } + + // add `workspaces` to the URL query string + if (getWorkspaces() != null) { + for (int i = 0; i < getWorkspaces().size(); i++) { + if (getWorkspaces().get(i) != null) { + joiner.add(getWorkspaces().get(i).toUrlQueryString(String.format("%sworkspaces%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `auto_access` to the URL query string + if (getAutoAccess() != null) { + joiner.add(String.format("%sauto_access%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAutoAccess())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResponse.java new file mode 100644 index 0000000..b64c3b7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.MemberListResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberListResponse + */ +@JsonPropertyOrder({ + MemberListResponse.JSON_PROPERTY_STATUS, + MemberListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private MemberListResult result; + + public MemberListResponse() { + } + + public MemberListResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public MemberListResponse result(@javax.annotation.Nonnull MemberListResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MemberListResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull MemberListResult result) { + this.result = result; + } + + + /** + * Return true if this MemberListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberListResponse memberListResponse = (MemberListResponse) o; + return Objects.equals(this.status, memberListResponse.status) && + Objects.equals(this.result, memberListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResult.java new file mode 100644 index 0000000..e6680b8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberListResult.java @@ -0,0 +1,275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.MemberListItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberListResult + */ +@JsonPropertyOrder({ + MemberListResult.JSON_PROPERTY_RESULTS, + MemberListResult.JSON_PROPERTY_TOTAL, + MemberListResult.JSON_PROPERTY_PAGE, + MemberListResult.JSON_PROPERTY_LIMIT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberListResult { + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public static final String JSON_PROPERTY_PAGE = "page"; + @javax.annotation.Nonnull + private Integer page; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + @javax.annotation.Nonnull + private Integer limit; + + public MemberListResult() { + } + + public MemberListResult results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public MemberListResult addResultsItem(MemberListItem resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + public MemberListResult total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + public MemberListResult page(@javax.annotation.Nonnull Integer page) { + this.page = page; + return this; + } + + /** + * Get page + * @return page + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPage() { + return page; + } + + + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPage(@javax.annotation.Nonnull Integer page) { + this.page = page; + } + + + public MemberListResult limit(@javax.annotation.Nonnull Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * @return limit + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getLimit() { + return limit; + } + + + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLimit(@javax.annotation.Nonnull Integer limit) { + this.limit = limit; + } + + + /** + * Return true if this MemberListResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberListResult memberListResult = (MemberListResult) o; + return Objects.equals(this.results, memberListResult.results) && + Objects.equals(this.total, memberListResult.total) && + Objects.equals(this.page, memberListResult.page) && + Objects.equals(this.limit, memberListResult.limit); + } + + @Override + public int hashCode() { + return Objects.hash(results, total, page, limit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberListResult {\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `page` to the URL query string + if (getPage() != null) { + joiner.add(String.format("%spage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPage())))); + } + + // add `limit` to the URL query string + if (getLimit() != null) { + joiner.add(String.format("%slimit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLimit())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRemove.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRemove.java new file mode 100644 index 0000000..da841ca --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRemove.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberRemove + */ +@JsonPropertyOrder({ + MemberRemove.JSON_PROPERTY_USER_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberRemove { + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + public MemberRemove() { + } + + public MemberRemove userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + /** + * Return true if this MemberRemove object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberRemove memberRemove = (MemberRemove) o; + return Objects.equals(this.userId, memberRemove.userId); + } + + @Override + public int hashCode() { + return Objects.hash(userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberRemove {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdate.java new file mode 100644 index 0000000..91bd26d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdate.java @@ -0,0 +1,424 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.WorkspaceAccessInput; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberRoleUpdate + */ +@JsonPropertyOrder({ + MemberRoleUpdate.JSON_PROPERTY_USER_ID, + MemberRoleUpdate.JSON_PROPERTY_ORG_LEVEL, + MemberRoleUpdate.JSON_PROPERTY_WS_LEVEL, + MemberRoleUpdate.JSON_PROPERTY_WORKSPACE_ID, + MemberRoleUpdate.JSON_PROPERTY_WORKSPACE_ACCESS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberRoleUpdate { + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + /** + * Gets or Sets orgLevel + */ + public enum OrgLevelEnum { + NUMBER_15(Integer.valueOf(15)), + + NUMBER_8(Integer.valueOf(8)), + + NUMBER_3(Integer.valueOf(3)), + + NUMBER_1(Integer.valueOf(1)); + + private Integer value; + + OrgLevelEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrgLevelEnum fromValue(Integer value) { + for (OrgLevelEnum b : OrgLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_ORG_LEVEL = "org_level"; + private JsonNullable orgLevel = JsonNullable.undefined(); + + /** + * Gets or Sets wsLevel + */ + public enum WsLevelEnum { + NUMBER_8(Integer.valueOf(8)), + + NUMBER_3(Integer.valueOf(3)), + + NUMBER_1(Integer.valueOf(1)); + + private Integer value; + + WsLevelEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WsLevelEnum fromValue(Integer value) { + for (WsLevelEnum b : WsLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_WS_LEVEL = "ws_level"; + private JsonNullable wsLevel = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WORKSPACE_ID = "workspace_id"; + private JsonNullable workspaceId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WORKSPACE_ACCESS = "workspace_access"; + @javax.annotation.Nullable + private List workspaceAccess = new ArrayList<>(); + + public MemberRoleUpdate() { + } + + public MemberRoleUpdate userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + public MemberRoleUpdate orgLevel(@javax.annotation.Nullable OrgLevelEnum orgLevel) { + this.orgLevel = JsonNullable.of(orgLevel); + return this; + } + + /** + * Get orgLevel + * @return orgLevel + */ + @javax.annotation.Nullable + @JsonIgnore + public OrgLevelEnum getOrgLevel() { + return orgLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORG_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOrgLevel_JsonNullable() { + return orgLevel; + } + + @JsonProperty(JSON_PROPERTY_ORG_LEVEL) + public void setOrgLevel_JsonNullable(JsonNullable orgLevel) { + this.orgLevel = orgLevel; + } + + public void setOrgLevel(@javax.annotation.Nullable OrgLevelEnum orgLevel) { + this.orgLevel = JsonNullable.of(orgLevel); + } + + + public MemberRoleUpdate wsLevel(@javax.annotation.Nullable WsLevelEnum wsLevel) { + this.wsLevel = JsonNullable.of(wsLevel); + return this; + } + + /** + * Get wsLevel + * @return wsLevel + */ + @javax.annotation.Nullable + @JsonIgnore + public WsLevelEnum getWsLevel() { + return wsLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWsLevel_JsonNullable() { + return wsLevel; + } + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + public void setWsLevel_JsonNullable(JsonNullable wsLevel) { + this.wsLevel = wsLevel; + } + + public void setWsLevel(@javax.annotation.Nullable WsLevelEnum wsLevel) { + this.wsLevel = JsonNullable.of(wsLevel); + } + + + public MemberRoleUpdate workspaceId(@javax.annotation.Nullable UUID workspaceId) { + this.workspaceId = JsonNullable.of(workspaceId); + return this; + } + + /** + * Required when updating ws_level. + * @return workspaceId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getWorkspaceId() { + return workspaceId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkspaceId_JsonNullable() { + return workspaceId; + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE_ID) + public void setWorkspaceId_JsonNullable(JsonNullable workspaceId) { + this.workspaceId = workspaceId; + } + + public void setWorkspaceId(@javax.annotation.Nullable UUID workspaceId) { + this.workspaceId = JsonNullable.of(workspaceId); + } + + + public MemberRoleUpdate workspaceAccess(@javax.annotation.Nullable List workspaceAccess) { + this.workspaceAccess = workspaceAccess; + return this; + } + + public MemberRoleUpdate addWorkspaceAccessItem(WorkspaceAccessInput workspaceAccessItem) { + if (this.workspaceAccess == null) { + this.workspaceAccess = new ArrayList<>(); + } + this.workspaceAccess.add(workspaceAccessItem); + return this; + } + + /** + * List of {workspace_id, level} for explicit workspace grants on demotion. + * @return workspaceAccess + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKSPACE_ACCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWorkspaceAccess() { + return workspaceAccess; + } + + + @JsonProperty(JSON_PROPERTY_WORKSPACE_ACCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWorkspaceAccess(@javax.annotation.Nullable List workspaceAccess) { + this.workspaceAccess = workspaceAccess; + } + + + /** + * Return true if this MemberRoleUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberRoleUpdate memberRoleUpdate = (MemberRoleUpdate) o; + return Objects.equals(this.userId, memberRoleUpdate.userId) && + equalsNullable(this.orgLevel, memberRoleUpdate.orgLevel) && + equalsNullable(this.wsLevel, memberRoleUpdate.wsLevel) && + equalsNullable(this.workspaceId, memberRoleUpdate.workspaceId) && + Objects.equals(this.workspaceAccess, memberRoleUpdate.workspaceAccess); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(userId, hashCodeNullable(orgLevel), hashCodeNullable(wsLevel), hashCodeNullable(workspaceId), workspaceAccess); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberRoleUpdate {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" orgLevel: ").append(toIndentedString(orgLevel)).append("\n"); + sb.append(" wsLevel: ").append(toIndentedString(wsLevel)).append("\n"); + sb.append(" workspaceId: ").append(toIndentedString(workspaceId)).append("\n"); + sb.append(" workspaceAccess: ").append(toIndentedString(workspaceAccess)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + // add `org_level` to the URL query string + if (getOrgLevel() != null) { + joiner.add(String.format("%sorg_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrgLevel())))); + } + + // add `ws_level` to the URL query string + if (getWsLevel() != null) { + joiner.add(String.format("%sws_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsLevel())))); + } + + // add `workspace_id` to the URL query string + if (getWorkspaceId() != null) { + joiner.add(String.format("%sworkspace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspaceId())))); + } + + // add `workspace_access` to the URL query string + if (getWorkspaceAccess() != null) { + for (int i = 0; i < getWorkspaceAccess().size(); i++) { + if (getWorkspaceAccess().get(i) != null) { + joiner.add(getWorkspaceAccess().get(i).toUrlQueryString(String.format("%sworkspace_access%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResponse.java new file mode 100644 index 0000000..030d790 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.MemberRoleUpdateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberRoleUpdateResponse + */ +@JsonPropertyOrder({ + MemberRoleUpdateResponse.JSON_PROPERTY_STATUS, + MemberRoleUpdateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberRoleUpdateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private MemberRoleUpdateResult result; + + public MemberRoleUpdateResponse() { + } + + public MemberRoleUpdateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public MemberRoleUpdateResponse result(@javax.annotation.Nonnull MemberRoleUpdateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MemberRoleUpdateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull MemberRoleUpdateResult result) { + this.result = result; + } + + + /** + * Return true if this MemberRoleUpdateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberRoleUpdateResponse memberRoleUpdateResponse = (MemberRoleUpdateResponse) o; + return Objects.equals(this.status, memberRoleUpdateResponse.status) && + Objects.equals(this.result, memberRoleUpdateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberRoleUpdateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResult.java new file mode 100644 index 0000000..f692c6f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberRoleUpdateResult.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberRoleUpdateResult + */ +@JsonPropertyOrder({ + MemberRoleUpdateResult.JSON_PROPERTY_MESSAGE, + MemberRoleUpdateResult.JSON_PROPERTY_CHANGES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberRoleUpdateResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_CHANGES = "changes"; + @javax.annotation.Nonnull + private Map changes = new HashMap<>(); + + public MemberRoleUpdateResult() { + } + + public MemberRoleUpdateResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public MemberRoleUpdateResult changes(@javax.annotation.Nonnull Map changes) { + this.changes = changes; + return this; + } + + public MemberRoleUpdateResult putChangesItem(String key, Object changesItem) { + if (this.changes == null) { + this.changes = new HashMap<>(); + } + this.changes.put(key, changesItem); + return this; + } + + /** + * Get changes + * @return changes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHANGES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getChanges() { + return changes; + } + + + @JsonProperty(JSON_PROPERTY_CHANGES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setChanges(@javax.annotation.Nonnull Map changes) { + this.changes = changes; + } + + + /** + * Return true if this MemberRoleUpdateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberRoleUpdateResult memberRoleUpdateResult = (MemberRoleUpdateResult) o; + return Objects.equals(this.message, memberRoleUpdateResult.message) && + Objects.equals(this.changes, memberRoleUpdateResult.changes); + } + + @Override + public int hashCode() { + return Objects.hash(message, changes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberRoleUpdateResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" changes: ").append(toIndentedString(changes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `changes` to the URL query string + if (getChanges() != null) { + for (String _key : getChanges().keySet()) { + joiner.add(String.format("%schanges%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChanges().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChanges().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResponse.java new file mode 100644 index 0000000..ded0101 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.MemberUserMutationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberUserMutationResponse + */ +@JsonPropertyOrder({ + MemberUserMutationResponse.JSON_PROPERTY_STATUS, + MemberUserMutationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberUserMutationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private MemberUserMutationResult result; + + public MemberUserMutationResponse() { + } + + public MemberUserMutationResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public MemberUserMutationResponse result(@javax.annotation.Nonnull MemberUserMutationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MemberUserMutationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull MemberUserMutationResult result) { + this.result = result; + } + + + /** + * Return true if this MemberUserMutationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberUserMutationResponse memberUserMutationResponse = (MemberUserMutationResponse) o; + return Objects.equals(this.status, memberUserMutationResponse.status) && + Objects.equals(this.result, memberUserMutationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberUserMutationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResult.java new file mode 100644 index 0000000..a7e2411 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberUserMutationResult.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberUserMutationResult + */ +@JsonPropertyOrder({ + MemberUserMutationResult.JSON_PROPERTY_MESSAGE, + MemberUserMutationResult.JSON_PROPERTY_USER_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberUserMutationResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + public MemberUserMutationResult() { + } + + public MemberUserMutationResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public MemberUserMutationResult userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + /** + * Return true if this MemberUserMutationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberUserMutationResult memberUserMutationResult = (MemberUserMutationResult) o; + return Objects.equals(this.message, memberUserMutationResult.message) && + Objects.equals(this.userId, memberUserMutationResult.userId); + } + + @Override + public int hashCode() { + return Objects.hash(message, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberUserMutationResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberWorkspaceAccess.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberWorkspaceAccess.java new file mode 100644 index 0000000..8b99fc8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MemberWorkspaceAccess.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MemberWorkspaceAccess + */ +@JsonPropertyOrder({ + MemberWorkspaceAccess.JSON_PROPERTY_WORKSPACE_ID, + MemberWorkspaceAccess.JSON_PROPERTY_WORKSPACE_NAME, + MemberWorkspaceAccess.JSON_PROPERTY_WS_LEVEL, + MemberWorkspaceAccess.JSON_PROPERTY_WS_ROLE, + MemberWorkspaceAccess.JSON_PROPERTY_AUTO_ACCESS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MemberWorkspaceAccess { + public static final String JSON_PROPERTY_WORKSPACE_ID = "workspace_id"; + @javax.annotation.Nonnull + private UUID workspaceId; + + public static final String JSON_PROPERTY_WORKSPACE_NAME = "workspace_name"; + @javax.annotation.Nonnull + private String workspaceName; + + public static final String JSON_PROPERTY_WS_LEVEL = "ws_level"; + @javax.annotation.Nonnull + private Integer wsLevel; + + public static final String JSON_PROPERTY_WS_ROLE = "ws_role"; + @javax.annotation.Nonnull + private String wsRole; + + public static final String JSON_PROPERTY_AUTO_ACCESS = "auto_access"; + @javax.annotation.Nullable + private Boolean autoAccess; + + public MemberWorkspaceAccess() { + } + + public MemberWorkspaceAccess workspaceId(@javax.annotation.Nonnull UUID workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get workspaceId + * @return workspaceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getWorkspaceId() { + return workspaceId; + } + + + @JsonProperty(JSON_PROPERTY_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkspaceId(@javax.annotation.Nonnull UUID workspaceId) { + this.workspaceId = workspaceId; + } + + + public MemberWorkspaceAccess workspaceName(@javax.annotation.Nonnull String workspaceName) { + this.workspaceName = workspaceName; + return this; + } + + /** + * Get workspaceName + * @return workspaceName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKSPACE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getWorkspaceName() { + return workspaceName; + } + + + @JsonProperty(JSON_PROPERTY_WORKSPACE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkspaceName(@javax.annotation.Nonnull String workspaceName) { + this.workspaceName = workspaceName; + } + + + public MemberWorkspaceAccess wsLevel(@javax.annotation.Nonnull Integer wsLevel) { + this.wsLevel = wsLevel; + return this; + } + + /** + * Get wsLevel + * @return wsLevel + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getWsLevel() { + return wsLevel; + } + + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWsLevel(@javax.annotation.Nonnull Integer wsLevel) { + this.wsLevel = wsLevel; + } + + + public MemberWorkspaceAccess wsRole(@javax.annotation.Nonnull String wsRole) { + this.wsRole = wsRole; + return this; + } + + /** + * Get wsRole + * @return wsRole + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WS_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getWsRole() { + return wsRole; + } + + + @JsonProperty(JSON_PROPERTY_WS_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWsRole(@javax.annotation.Nonnull String wsRole) { + this.wsRole = wsRole; + } + + + public MemberWorkspaceAccess autoAccess(@javax.annotation.Nullable Boolean autoAccess) { + this.autoAccess = autoAccess; + return this; + } + + /** + * Get autoAccess + * @return autoAccess + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTO_ACCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutoAccess() { + return autoAccess; + } + + + @JsonProperty(JSON_PROPERTY_AUTO_ACCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutoAccess(@javax.annotation.Nullable Boolean autoAccess) { + this.autoAccess = autoAccess; + } + + + /** + * Return true if this MemberWorkspaceAccess object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberWorkspaceAccess memberWorkspaceAccess = (MemberWorkspaceAccess) o; + return Objects.equals(this.workspaceId, memberWorkspaceAccess.workspaceId) && + Objects.equals(this.workspaceName, memberWorkspaceAccess.workspaceName) && + Objects.equals(this.wsLevel, memberWorkspaceAccess.wsLevel) && + Objects.equals(this.wsRole, memberWorkspaceAccess.wsRole) && + Objects.equals(this.autoAccess, memberWorkspaceAccess.autoAccess); + } + + @Override + public int hashCode() { + return Objects.hash(workspaceId, workspaceName, wsLevel, wsRole, autoAccess); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberWorkspaceAccess {\n"); + sb.append(" workspaceId: ").append(toIndentedString(workspaceId)).append("\n"); + sb.append(" workspaceName: ").append(toIndentedString(workspaceName)).append("\n"); + sb.append(" wsLevel: ").append(toIndentedString(wsLevel)).append("\n"); + sb.append(" wsRole: ").append(toIndentedString(wsRole)).append("\n"); + sb.append(" autoAccess: ").append(toIndentedString(autoAccess)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `workspace_id` to the URL query string + if (getWorkspaceId() != null) { + joiner.add(String.format("%sworkspace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspaceId())))); + } + + // add `workspace_name` to the URL query string + if (getWorkspaceName() != null) { + joiner.add(String.format("%sworkspace_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspaceName())))); + } + + // add `ws_level` to the URL query string + if (getWsLevel() != null) { + joiner.add(String.format("%sws_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsLevel())))); + } + + // add `ws_role` to the URL query string + if (getWsRole() != null) { + joiner.add(String.format("%sws_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsRole())))); + } + + // add `auto_access` to the URL query string + if (getAutoAccess() != null) { + joiner.add(String.format("%sauto_access%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAutoAccess())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetRequest.java new file mode 100644 index 0000000..0ee2593 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetRequest.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MergeDatasetRequest + */ +@JsonPropertyOrder({ + MergeDatasetRequest.JSON_PROPERTY_ROW_IDS, + MergeDatasetRequest.JSON_PROPERTY_SELECTED_ALL_ROWS, + MergeDatasetRequest.JSON_PROPERTY_TARGET_DATASET_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MergeDatasetRequest { + public static final String JSON_PROPERTY_ROW_IDS = "row_ids"; + @javax.annotation.Nullable + private List rowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECTED_ALL_ROWS = "selected_all_rows"; + @javax.annotation.Nullable + private Boolean selectedAllRows = false; + + public static final String JSON_PROPERTY_TARGET_DATASET_ID = "target_dataset_id"; + @javax.annotation.Nonnull + private UUID targetDatasetId; + + public MergeDatasetRequest() { + } + + public MergeDatasetRequest rowIds(@javax.annotation.Nullable List rowIds) { + this.rowIds = rowIds; + return this; + } + + public MergeDatasetRequest addRowIdsItem(UUID rowIdsItem) { + if (this.rowIds == null) { + this.rowIds = new ArrayList<>(); + } + this.rowIds.add(rowIdsItem); + return this; + } + + /** + * Get rowIds + * @return rowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRowIds() { + return rowIds; + } + + + @JsonProperty(JSON_PROPERTY_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRowIds(@javax.annotation.Nullable List rowIds) { + this.rowIds = rowIds; + } + + + public MergeDatasetRequest selectedAllRows(@javax.annotation.Nullable Boolean selectedAllRows) { + this.selectedAllRows = selectedAllRows; + return this; + } + + /** + * Get selectedAllRows + * @return selectedAllRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECTED_ALL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectedAllRows() { + return selectedAllRows; + } + + + @JsonProperty(JSON_PROPERTY_SELECTED_ALL_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectedAllRows(@javax.annotation.Nullable Boolean selectedAllRows) { + this.selectedAllRows = selectedAllRows; + } + + + public MergeDatasetRequest targetDatasetId(@javax.annotation.Nonnull UUID targetDatasetId) { + this.targetDatasetId = targetDatasetId; + return this; + } + + /** + * Get targetDatasetId + * @return targetDatasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TARGET_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTargetDatasetId() { + return targetDatasetId; + } + + + @JsonProperty(JSON_PROPERTY_TARGET_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargetDatasetId(@javax.annotation.Nonnull UUID targetDatasetId) { + this.targetDatasetId = targetDatasetId; + } + + + /** + * Return true if this MergeDatasetRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeDatasetRequest mergeDatasetRequest = (MergeDatasetRequest) o; + return Objects.equals(this.rowIds, mergeDatasetRequest.rowIds) && + Objects.equals(this.selectedAllRows, mergeDatasetRequest.selectedAllRows) && + Objects.equals(this.targetDatasetId, mergeDatasetRequest.targetDatasetId); + } + + @Override + public int hashCode() { + return Objects.hash(rowIds, selectedAllRows, targetDatasetId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeDatasetRequest {\n"); + sb.append(" rowIds: ").append(toIndentedString(rowIds)).append("\n"); + sb.append(" selectedAllRows: ").append(toIndentedString(selectedAllRows)).append("\n"); + sb.append(" targetDatasetId: ").append(toIndentedString(targetDatasetId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row_ids` to the URL query string + if (getRowIds() != null) { + for (int i = 0; i < getRowIds().size(); i++) { + if (getRowIds().get(i) != null) { + joiner.add(String.format("%srow_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRowIds().get(i))))); + } + } + } + + // add `selected_all_rows` to the URL query string + if (getSelectedAllRows() != null) { + joiner.add(String.format("%sselected_all_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectedAllRows())))); + } + + // add `target_dataset_id` to the URL query string + if (getTargetDatasetId() != null) { + joiner.add(String.format("%starget_dataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTargetDatasetId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResponse.java new file mode 100644 index 0000000..fdcbdf5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.MergeDatasetResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MergeDatasetResponse + */ +@JsonPropertyOrder({ + MergeDatasetResponse.JSON_PROPERTY_STATUS, + MergeDatasetResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MergeDatasetResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private MergeDatasetResult result; + + public MergeDatasetResponse() { + } + + public MergeDatasetResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public MergeDatasetResponse result(@javax.annotation.Nonnull MergeDatasetResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MergeDatasetResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull MergeDatasetResult result) { + this.result = result; + } + + + /** + * Return true if this MergeDatasetResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeDatasetResponse mergeDatasetResponse = (MergeDatasetResponse) o; + return Objects.equals(this.status, mergeDatasetResponse.status) && + Objects.equals(this.result, mergeDatasetResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeDatasetResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResult.java new file mode 100644 index 0000000..e40427f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/MergeDatasetResult.java @@ -0,0 +1,259 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * MergeDatasetResult + */ +@JsonPropertyOrder({ + MergeDatasetResult.JSON_PROPERTY_MESSAGE, + MergeDatasetResult.JSON_PROPERTY_ROWS_ADDED, + MergeDatasetResult.JSON_PROPERTY_NEW_COLUMNS_CREATED, + MergeDatasetResult.JSON_PROPERTY_COLUMNS_MAPPED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class MergeDatasetResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_ROWS_ADDED = "rows_added"; + @javax.annotation.Nonnull + private Integer rowsAdded; + + public static final String JSON_PROPERTY_NEW_COLUMNS_CREATED = "new_columns_created"; + @javax.annotation.Nonnull + private Integer newColumnsCreated; + + public static final String JSON_PROPERTY_COLUMNS_MAPPED = "columns_mapped"; + @javax.annotation.Nonnull + private Integer columnsMapped; + + public MergeDatasetResult() { + } + + public MergeDatasetResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public MergeDatasetResult rowsAdded(@javax.annotation.Nonnull Integer rowsAdded) { + this.rowsAdded = rowsAdded; + return this; + } + + /** + * Get rowsAdded + * @return rowsAdded + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROWS_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowsAdded() { + return rowsAdded; + } + + + @JsonProperty(JSON_PROPERTY_ROWS_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowsAdded(@javax.annotation.Nonnull Integer rowsAdded) { + this.rowsAdded = rowsAdded; + } + + + public MergeDatasetResult newColumnsCreated(@javax.annotation.Nonnull Integer newColumnsCreated) { + this.newColumnsCreated = newColumnsCreated; + return this; + } + + /** + * Get newColumnsCreated + * @return newColumnsCreated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_COLUMNS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNewColumnsCreated() { + return newColumnsCreated; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMNS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewColumnsCreated(@javax.annotation.Nonnull Integer newColumnsCreated) { + this.newColumnsCreated = newColumnsCreated; + } + + + public MergeDatasetResult columnsMapped(@javax.annotation.Nonnull Integer columnsMapped) { + this.columnsMapped = columnsMapped; + return this; + } + + /** + * Get columnsMapped + * @return columnsMapped + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS_MAPPED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getColumnsMapped() { + return columnsMapped; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS_MAPPED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnsMapped(@javax.annotation.Nonnull Integer columnsMapped) { + this.columnsMapped = columnsMapped; + } + + + /** + * Return true if this MergeDatasetResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeDatasetResult mergeDatasetResult = (MergeDatasetResult) o; + return Objects.equals(this.message, mergeDatasetResult.message) && + Objects.equals(this.rowsAdded, mergeDatasetResult.rowsAdded) && + Objects.equals(this.newColumnsCreated, mergeDatasetResult.newColumnsCreated) && + Objects.equals(this.columnsMapped, mergeDatasetResult.columnsMapped); + } + + @Override + public int hashCode() { + return Objects.hash(message, rowsAdded, newColumnsCreated, columnsMapped); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeDatasetResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" rowsAdded: ").append(toIndentedString(rowsAdded)).append("\n"); + sb.append(" newColumnsCreated: ").append(toIndentedString(newColumnsCreated)).append("\n"); + sb.append(" columnsMapped: ").append(toIndentedString(columnsMapped)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `rows_added` to the URL query string + if (getRowsAdded() != null) { + joiner.add(String.format("%srows_added%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowsAdded())))); + } + + // add `new_columns_created` to the URL query string + if (getNewColumnsCreated() != null) { + joiner.add(String.format("%snew_columns_created%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnsCreated())))); + } + + // add `columns_mapped` to the URL query string + if (getColumnsMapped() != null) { + joiner.add(String.format("%scolumns_mapped%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnsMapped())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubAnnotationQueuesAutomationRulesList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubAnnotationQueuesAutomationRulesList200Response.java new file mode 100644 index 0000000..d7bbf6c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubAnnotationQueuesAutomationRulesList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRule; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubAnnotationQueuesAutomationRulesList200Response + */ +@JsonPropertyOrder({ + ModelHubAnnotationQueuesAutomationRulesList200Response.JSON_PROPERTY_COUNT, + ModelHubAnnotationQueuesAutomationRulesList200Response.JSON_PROPERTY_NEXT, + ModelHubAnnotationQueuesAutomationRulesList200Response.JSON_PROPERTY_PREVIOUS, + ModelHubAnnotationQueuesAutomationRulesList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubAnnotationQueuesAutomationRulesList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ModelHubAnnotationQueuesAutomationRulesList200Response() { + } + + public ModelHubAnnotationQueuesAutomationRulesList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ModelHubAnnotationQueuesAutomationRulesList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ModelHubAnnotationQueuesAutomationRulesList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ModelHubAnnotationQueuesAutomationRulesList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ModelHubAnnotationQueuesAutomationRulesList200Response addResultsItem(AutomationRule resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this model_hub_annotation_queues_automation_rules_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubAnnotationQueuesAutomationRulesList200Response modelHubAnnotationQueuesAutomationRulesList200Response = (ModelHubAnnotationQueuesAutomationRulesList200Response) o; + return Objects.equals(this.count, modelHubAnnotationQueuesAutomationRulesList200Response.count) && + equalsNullable(this.next, modelHubAnnotationQueuesAutomationRulesList200Response.next) && + equalsNullable(this.previous, modelHubAnnotationQueuesAutomationRulesList200Response.previous) && + Objects.equals(this.results, modelHubAnnotationQueuesAutomationRulesList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubAnnotationQueuesAutomationRulesList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubApiKeysList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubApiKeysList200Response.java new file mode 100644 index 0000000..e46fb67 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubApiKeysList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ApiKey; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubApiKeysList200Response + */ +@JsonPropertyOrder({ + ModelHubApiKeysList200Response.JSON_PROPERTY_COUNT, + ModelHubApiKeysList200Response.JSON_PROPERTY_NEXT, + ModelHubApiKeysList200Response.JSON_PROPERTY_PREVIOUS, + ModelHubApiKeysList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubApiKeysList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ModelHubApiKeysList200Response() { + } + + public ModelHubApiKeysList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ModelHubApiKeysList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ModelHubApiKeysList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ModelHubApiKeysList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ModelHubApiKeysList200Response addResultsItem(ApiKey resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this model_hub_api_keys_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubApiKeysList200Response modelHubApiKeysList200Response = (ModelHubApiKeysList200Response) o; + return Objects.equals(this.count, modelHubApiKeysList200Response.count) && + equalsNullable(this.next, modelHubApiKeysList200Response.next) && + equalsNullable(this.previous, modelHubApiKeysList200Response.previous) && + Objects.equals(this.results, modelHubApiKeysList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubApiKeysList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubErrorResponse.java new file mode 100644 index 0000000..7b2349c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubErrorResponse + */ +@JsonPropertyOrder({ + ModelHubErrorResponse.JSON_PROPERTY_STATUS, + ModelHubErrorResponse.JSON_PROPERTY_TYPE, + ModelHubErrorResponse.JSON_PROPERTY_CODE, + ModelHubErrorResponse.JSON_PROPERTY_DETAIL, + ModelHubErrorResponse.JSON_PROPERTY_RESULT, + ModelHubErrorResponse.JSON_PROPERTY_MESSAGE, + ModelHubErrorResponse.JSON_PROPERTY_ERROR, + ModelHubErrorResponse.JSON_PROPERTY_ATTR, + ModelHubErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ModelHubErrorResponse() { + } + + public ModelHubErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ModelHubErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ModelHubErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ModelHubErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ModelHubErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ModelHubErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ModelHubErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ModelHubErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ModelHubErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ModelHubErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ModelHubErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubErrorResponse modelHubErrorResponse = (ModelHubErrorResponse) o; + return Objects.equals(this.status, modelHubErrorResponse.status) && + equalsNullable(this.type, modelHubErrorResponse.type) && + equalsNullable(this.code, modelHubErrorResponse.code) && + equalsNullable(this.detail, modelHubErrorResponse.detail) && + equalsNullable(this.result, modelHubErrorResponse.result) && + equalsNullable(this.message, modelHubErrorResponse.message) && + equalsNullable(this.error, modelHubErrorResponse.error) && + equalsNullable(this.attr, modelHubErrorResponse.attr) && + Objects.equals(this.details, modelHubErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPaginatedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPaginatedResponse.java new file mode 100644 index 0000000..722a6c9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPaginatedResponse.java @@ -0,0 +1,303 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubPaginatedResponse + */ +@JsonPropertyOrder({ + ModelHubPaginatedResponse.JSON_PROPERTY_COUNT, + ModelHubPaginatedResponse.JSON_PROPERTY_NEXT, + ModelHubPaginatedResponse.JSON_PROPERTY_PREVIOUS, + ModelHubPaginatedResponse.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubPaginatedResponse { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List> results = new ArrayList<>(); + + public ModelHubPaginatedResponse() { + } + + public ModelHubPaginatedResponse count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ModelHubPaginatedResponse next(@javax.annotation.Nullable String next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable String next) { + this.next = JsonNullable.of(next); + } + + + public ModelHubPaginatedResponse previous(@javax.annotation.Nullable String previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable String previous) { + this.previous = JsonNullable.of(previous); + } + + + public ModelHubPaginatedResponse results(@javax.annotation.Nonnull List> results) { + this.results = results; + return this; + } + + public ModelHubPaginatedResponse addResultsItem(Map resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List> results) { + this.results = results; + } + + + /** + * Return true if this ModelHubPaginatedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubPaginatedResponse modelHubPaginatedResponse = (ModelHubPaginatedResponse) o; + return Objects.equals(this.count, modelHubPaginatedResponse.count) && + equalsNullable(this.next, modelHubPaginatedResponse.next) && + equalsNullable(this.previous, modelHubPaginatedResponse.previous) && + Objects.equals(this.results, modelHubPaginatedResponse.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubPaginatedResponse {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + joiner.add(String.format("%sresults%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getResults().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptHistoryExecutionsList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptHistoryExecutionsList200Response.java new file mode 100644 index 0000000..d1dd78a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptHistoryExecutionsList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptHistoryExecution; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubPromptHistoryExecutionsList200Response + */ +@JsonPropertyOrder({ + ModelHubPromptHistoryExecutionsList200Response.JSON_PROPERTY_COUNT, + ModelHubPromptHistoryExecutionsList200Response.JSON_PROPERTY_NEXT, + ModelHubPromptHistoryExecutionsList200Response.JSON_PROPERTY_PREVIOUS, + ModelHubPromptHistoryExecutionsList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubPromptHistoryExecutionsList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ModelHubPromptHistoryExecutionsList200Response() { + } + + public ModelHubPromptHistoryExecutionsList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ModelHubPromptHistoryExecutionsList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ModelHubPromptHistoryExecutionsList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ModelHubPromptHistoryExecutionsList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ModelHubPromptHistoryExecutionsList200Response addResultsItem(PromptHistoryExecution resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this model_hub_prompt_history_executions_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubPromptHistoryExecutionsList200Response modelHubPromptHistoryExecutionsList200Response = (ModelHubPromptHistoryExecutionsList200Response) o; + return Objects.equals(this.count, modelHubPromptHistoryExecutionsList200Response.count) && + equalsNullable(this.next, modelHubPromptHistoryExecutionsList200Response.next) && + equalsNullable(this.previous, modelHubPromptHistoryExecutionsList200Response.previous) && + Objects.equals(this.results, modelHubPromptHistoryExecutionsList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubPromptHistoryExecutionsList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptLabelsList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptLabelsList200Response.java new file mode 100644 index 0000000..3164755 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptLabelsList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptLabel; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubPromptLabelsList200Response + */ +@JsonPropertyOrder({ + ModelHubPromptLabelsList200Response.JSON_PROPERTY_COUNT, + ModelHubPromptLabelsList200Response.JSON_PROPERTY_NEXT, + ModelHubPromptLabelsList200Response.JSON_PROPERTY_PREVIOUS, + ModelHubPromptLabelsList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubPromptLabelsList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ModelHubPromptLabelsList200Response() { + } + + public ModelHubPromptLabelsList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ModelHubPromptLabelsList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ModelHubPromptLabelsList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ModelHubPromptLabelsList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ModelHubPromptLabelsList200Response addResultsItem(PromptLabel resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this model_hub_prompt_labels_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubPromptLabelsList200Response modelHubPromptLabelsList200Response = (ModelHubPromptLabelsList200Response) o; + return Objects.equals(this.count, modelHubPromptLabelsList200Response.count) && + equalsNullable(this.next, modelHubPromptLabelsList200Response.next) && + equalsNullable(this.previous, modelHubPromptLabelsList200Response.previous) && + Objects.equals(this.results, modelHubPromptLabelsList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubPromptLabelsList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptTemplatesList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptTemplatesList200Response.java new file mode 100644 index 0000000..fc2d942 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubPromptTemplatesList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptTemplate; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubPromptTemplatesList200Response + */ +@JsonPropertyOrder({ + ModelHubPromptTemplatesList200Response.JSON_PROPERTY_COUNT, + ModelHubPromptTemplatesList200Response.JSON_PROPERTY_NEXT, + ModelHubPromptTemplatesList200Response.JSON_PROPERTY_PREVIOUS, + ModelHubPromptTemplatesList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubPromptTemplatesList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ModelHubPromptTemplatesList200Response() { + } + + public ModelHubPromptTemplatesList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ModelHubPromptTemplatesList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ModelHubPromptTemplatesList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ModelHubPromptTemplatesList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ModelHubPromptTemplatesList200Response addResultsItem(PromptTemplate resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this model_hub_prompt_templates_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubPromptTemplatesList200Response modelHubPromptTemplatesList200Response = (ModelHubPromptTemplatesList200Response) o; + return Objects.equals(this.count, modelHubPromptTemplatesList200Response.count) && + equalsNullable(this.next, modelHubPromptTemplatesList200Response.next) && + equalsNullable(this.previous, modelHubPromptTemplatesList200Response.previous) && + Objects.equals(this.results, modelHubPromptTemplatesList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubPromptTemplatesList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubScoresList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubScoresList200Response.java new file mode 100644 index 0000000..ad0b936 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubScoresList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Score; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubScoresList200Response + */ +@JsonPropertyOrder({ + ModelHubScoresList200Response.JSON_PROPERTY_COUNT, + ModelHubScoresList200Response.JSON_PROPERTY_NEXT, + ModelHubScoresList200Response.JSON_PROPERTY_PREVIOUS, + ModelHubScoresList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubScoresList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public ModelHubScoresList200Response() { + } + + public ModelHubScoresList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public ModelHubScoresList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public ModelHubScoresList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public ModelHubScoresList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public ModelHubScoresList200Response addResultsItem(Score resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this model_hub_scores_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubScoresList200Response modelHubScoresList200Response = (ModelHubScoresList200Response) o; + return Objects.equals(this.count, modelHubScoresList200Response.count) && + equalsNullable(this.next, modelHubScoresList200Response.next) && + equalsNullable(this.previous, modelHubScoresList200Response.previous) && + Objects.equals(this.results, modelHubScoresList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubScoresList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubStringResultResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubStringResultResponse.java new file mode 100644 index 0000000..d056fe3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubStringResultResponse.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubStringResultResponse + */ +@JsonPropertyOrder({ + ModelHubStringResultResponse.JSON_PROPERTY_STATUS, + ModelHubStringResultResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubStringResultResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private String result; + + public ModelHubStringResultResponse() { + } + + public ModelHubStringResultResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ModelHubStringResultResponse result(@javax.annotation.Nonnull String result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull String result) { + this.result = result; + } + + + /** + * Return true if this ModelHubStringResultResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubStringResultResponse modelHubStringResultResponse = (ModelHubStringResultResponse) o; + return Objects.equals(this.status, modelHubStringResultResponse.status) && + Objects.equals(this.result, modelHubStringResultResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubStringResultResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubTextErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubTextErrorResponse.java new file mode 100644 index 0000000..06e7ad9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ModelHubTextErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ModelHubTextErrorResponse + */ +@JsonPropertyOrder({ + ModelHubTextErrorResponse.JSON_PROPERTY_STATUS, + ModelHubTextErrorResponse.JSON_PROPERTY_TYPE, + ModelHubTextErrorResponse.JSON_PROPERTY_CODE, + ModelHubTextErrorResponse.JSON_PROPERTY_DETAIL, + ModelHubTextErrorResponse.JSON_PROPERTY_RESULT, + ModelHubTextErrorResponse.JSON_PROPERTY_MESSAGE, + ModelHubTextErrorResponse.JSON_PROPERTY_ERROR, + ModelHubTextErrorResponse.JSON_PROPERTY_ATTR, + ModelHubTextErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ModelHubTextErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ModelHubTextErrorResponse() { + } + + public ModelHubTextErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ModelHubTextErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ModelHubTextErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ModelHubTextErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ModelHubTextErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ModelHubTextErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ModelHubTextErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ModelHubTextErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ModelHubTextErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ModelHubTextErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ModelHubTextErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelHubTextErrorResponse modelHubTextErrorResponse = (ModelHubTextErrorResponse) o; + return Objects.equals(this.status, modelHubTextErrorResponse.status) && + equalsNullable(this.type, modelHubTextErrorResponse.type) && + equalsNullable(this.code, modelHubTextErrorResponse.code) && + equalsNullable(this.detail, modelHubTextErrorResponse.detail) && + equalsNullable(this.result, modelHubTextErrorResponse.result) && + equalsNullable(this.message, modelHubTextErrorResponse.message) && + equalsNullable(this.error, modelHubTextErrorResponse.error) && + equalsNullable(this.attr, modelHubTextErrorResponse.attr) && + Objects.equals(this.details, modelHubTextErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelHubTextErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataPoint.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataPoint.java new file mode 100644 index 0000000..a7d729e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataPoint.java @@ -0,0 +1,246 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ObserveGraphDataPoint + */ +@JsonPropertyOrder({ + ObserveGraphDataPoint.JSON_PROPERTY_TIMESTAMP, + ObserveGraphDataPoint.JSON_PROPERTY_VALUE, + ObserveGraphDataPoint.JSON_PROPERTY_PRIMARY_TRAFFIC +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ObserveGraphDataPoint { + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @javax.annotation.Nonnull + private String timestamp; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable + private BigDecimal value; + + public static final String JSON_PROPERTY_PRIMARY_TRAFFIC = "primary_traffic"; + private JsonNullable primaryTraffic = JsonNullable.undefined(); + + public ObserveGraphDataPoint() { + } + + public ObserveGraphDataPoint timestamp(@javax.annotation.Nonnull String timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimestamp() { + return timestamp; + } + + + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@javax.annotation.Nonnull String timestamp) { + this.timestamp = timestamp; + } + + + public ObserveGraphDataPoint value(@javax.annotation.Nullable BigDecimal value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nullable BigDecimal value) { + this.value = value; + } + + + public ObserveGraphDataPoint primaryTraffic(@javax.annotation.Nullable BigDecimal primaryTraffic) { + this.primaryTraffic = JsonNullable.of(primaryTraffic); + return this; + } + + /** + * Get primaryTraffic + * @return primaryTraffic + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getPrimaryTraffic() { + return primaryTraffic.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_TRAFFIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrimaryTraffic_JsonNullable() { + return primaryTraffic; + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_TRAFFIC) + public void setPrimaryTraffic_JsonNullable(JsonNullable primaryTraffic) { + this.primaryTraffic = primaryTraffic; + } + + public void setPrimaryTraffic(@javax.annotation.Nullable BigDecimal primaryTraffic) { + this.primaryTraffic = JsonNullable.of(primaryTraffic); + } + + + /** + * Return true if this ObserveGraphDataPoint object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObserveGraphDataPoint observeGraphDataPoint = (ObserveGraphDataPoint) o; + return Objects.equals(this.timestamp, observeGraphDataPoint.timestamp) && + Objects.equals(this.value, observeGraphDataPoint.value) && + equalsNullable(this.primaryTraffic, observeGraphDataPoint.primaryTraffic); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(timestamp, value, hashCodeNullable(primaryTraffic)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObserveGraphDataPoint {\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" primaryTraffic: ").append(toIndentedString(primaryTraffic)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimestamp())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `primary_traffic` to the URL query string + if (getPrimaryTraffic() != null) { + joiner.add(String.format("%sprimary_traffic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrimaryTraffic())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataRequest.java new file mode 100644 index 0000000..7bbf83a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataRequest.java @@ -0,0 +1,352 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInner; +import com.futureagi.sdk.model.ReqDataConfig; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ObserveGraphDataRequest + */ +@JsonPropertyOrder({ + ObserveGraphDataRequest.JSON_PROPERTY_PROJECT_ID, + ObserveGraphDataRequest.JSON_PROPERTY_FILTERS, + ObserveGraphDataRequest.JSON_PROPERTY_INTERVAL, + ObserveGraphDataRequest.JSON_PROPERTY_PROPERTY, + ObserveGraphDataRequest.JSON_PROPERTY_REQ_DATA_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ObserveGraphDataRequest { + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + @javax.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private List filters = new ArrayList<>(); + + /** + * Gets or Sets interval + */ + public enum IntervalEnum { + HOUR(String.valueOf("hour")), + + DAY(String.valueOf("day")), + + WEEK(String.valueOf("week")), + + MONTH(String.valueOf("month")); + + private String value; + + IntervalEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IntervalEnum fromValue(String value) { + for (IntervalEnum b : IntervalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INTERVAL = "interval"; + @javax.annotation.Nullable + private IntervalEnum interval = IntervalEnum.DAY; + + public static final String JSON_PROPERTY_PROPERTY = "property"; + @javax.annotation.Nullable + private String property = "average"; + + public static final String JSON_PROPERTY_REQ_DATA_CONFIG = "req_data_config"; + @javax.annotation.Nonnull + private ReqDataConfig reqDataConfig; + + public ObserveGraphDataRequest() { + } + + public ObserveGraphDataRequest projectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public ObserveGraphDataRequest filters(@javax.annotation.Nullable List filters) { + this.filters = filters; + return this; + } + + public ObserveGraphDataRequest addFiltersItem(AutomationRuleConditionsFilterInner filtersItem) { + if (this.filters == null) { + this.filters = new ArrayList<>(); + } + this.filters.add(filtersItem); + return this; + } + + /** + * Get filters + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } + + + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilters(@javax.annotation.Nullable List filters) { + this.filters = filters; + } + + + public ObserveGraphDataRequest interval(@javax.annotation.Nullable IntervalEnum interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * @return interval + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntervalEnum getInterval() { + return interval; + } + + + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInterval(@javax.annotation.Nullable IntervalEnum interval) { + this.interval = interval; + } + + + public ObserveGraphDataRequest property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProperty() { + return property; + } + + + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public ObserveGraphDataRequest reqDataConfig(@javax.annotation.Nonnull ReqDataConfig reqDataConfig) { + this.reqDataConfig = reqDataConfig; + return this; + } + + /** + * Get reqDataConfig + * @return reqDataConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQ_DATA_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReqDataConfig getReqDataConfig() { + return reqDataConfig; + } + + + @JsonProperty(JSON_PROPERTY_REQ_DATA_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReqDataConfig(@javax.annotation.Nonnull ReqDataConfig reqDataConfig) { + this.reqDataConfig = reqDataConfig; + } + + + /** + * Return true if this ObserveGraphDataRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObserveGraphDataRequest observeGraphDataRequest = (ObserveGraphDataRequest) o; + return Objects.equals(this.projectId, observeGraphDataRequest.projectId) && + Objects.equals(this.filters, observeGraphDataRequest.filters) && + Objects.equals(this.interval, observeGraphDataRequest.interval) && + Objects.equals(this.property, observeGraphDataRequest.property) && + Objects.equals(this.reqDataConfig, observeGraphDataRequest.reqDataConfig); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, filters, interval, property, reqDataConfig); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObserveGraphDataRequest {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" reqDataConfig: ").append(toIndentedString(reqDataConfig)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `project_id` to the URL query string + if (getProjectId() != null) { + joiner.add(String.format("%sproject_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectId())))); + } + + // add `filters` to the URL query string + if (getFilters() != null) { + for (int i = 0; i < getFilters().size(); i++) { + if (getFilters().get(i) != null) { + joiner.add(getFilters().get(i).toUrlQueryString(String.format("%sfilters%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `interval` to the URL query string + if (getInterval() != null) { + joiner.add(String.format("%sinterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterval())))); + } + + // add `property` to the URL query string + if (getProperty() != null) { + joiner.add(String.format("%sproperty%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProperty())))); + } + + // add `req_data_config` to the URL query string + if (getReqDataConfig() != null) { + joiner.add(getReqDataConfig().toUrlQueryString(prefix + "req_data_config" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResponse.java new file mode 100644 index 0000000..1be7d8f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ObserveGraphDataResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ObserveGraphDataResponse + */ +@JsonPropertyOrder({ + ObserveGraphDataResponse.JSON_PROPERTY_STATUS, + ObserveGraphDataResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ObserveGraphDataResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ObserveGraphDataResult result; + + public ObserveGraphDataResponse() { + } + + public ObserveGraphDataResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ObserveGraphDataResponse result(@javax.annotation.Nonnull ObserveGraphDataResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObserveGraphDataResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ObserveGraphDataResult result) { + this.result = result; + } + + + /** + * Return true if this ObserveGraphDataResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObserveGraphDataResponse observeGraphDataResponse = (ObserveGraphDataResponse) o; + return Objects.equals(this.status, observeGraphDataResponse.status) && + Objects.equals(this.result, observeGraphDataResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObserveGraphDataResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResult.java new file mode 100644 index 0000000..22c26a7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ObserveGraphDataResult.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ObserveGraphDataPoint; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ObserveGraphDataResult + */ +@JsonPropertyOrder({ + ObserveGraphDataResult.JSON_PROPERTY_METRIC_NAME, + ObserveGraphDataResult.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ObserveGraphDataResult { + public static final String JSON_PROPERTY_METRIC_NAME = "metric_name"; + @javax.annotation.Nonnull + private String metricName; + + public static final String JSON_PROPERTY_DATA = "data"; + @javax.annotation.Nonnull + private List data = new ArrayList<>(); + + public ObserveGraphDataResult() { + } + + public ObserveGraphDataResult metricName(@javax.annotation.Nonnull String metricName) { + this.metricName = metricName; + return this; + } + + /** + * Get metricName + * @return metricName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METRIC_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMetricName() { + return metricName; + } + + + @JsonProperty(JSON_PROPERTY_METRIC_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetricName(@javax.annotation.Nonnull String metricName) { + this.metricName = metricName; + } + + + public ObserveGraphDataResult data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ObserveGraphDataResult addDataItem(ObserveGraphDataPoint dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + + /** + * Return true if this ObserveGraphDataResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObserveGraphDataResult observeGraphDataResult = (ObserveGraphDataResult) o; + return Objects.equals(this.metricName, observeGraphDataResult.metricName) && + Objects.equals(this.data, observeGraphDataResult.data); + } + + @Override + public int hashCode() { + return Objects.hash(metricName, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObserveGraphDataResult {\n"); + sb.append(" metricName: ").append(toIndentedString(metricName)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `metric_name` to the URL query string + if (getMetricName() != null) { + joiner.add(String.format("%smetric_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetricName())))); + } + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format("%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResponse.java new file mode 100644 index 0000000..1a6c05f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.OptimiserAnalysisRefreshResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * OptimiserAnalysisRefreshResponse + */ +@JsonPropertyOrder({ + OptimiserAnalysisRefreshResponse.JSON_PROPERTY_STATUS, + OptimiserAnalysisRefreshResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OptimiserAnalysisRefreshResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private OptimiserAnalysisRefreshResult result; + + public OptimiserAnalysisRefreshResponse() { + } + + public OptimiserAnalysisRefreshResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public OptimiserAnalysisRefreshResponse result(@javax.annotation.Nonnull OptimiserAnalysisRefreshResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OptimiserAnalysisRefreshResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull OptimiserAnalysisRefreshResult result) { + this.result = result; + } + + + /** + * Return true if this OptimiserAnalysisRefreshResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptimiserAnalysisRefreshResponse optimiserAnalysisRefreshResponse = (OptimiserAnalysisRefreshResponse) o; + return Objects.equals(this.status, optimiserAnalysisRefreshResponse.status) && + Objects.equals(this.result, optimiserAnalysisRefreshResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OptimiserAnalysisRefreshResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResult.java new file mode 100644 index 0000000..5bc9f2c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisRefreshResult.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * OptimiserAnalysisRefreshResult + */ +@JsonPropertyOrder({ + OptimiserAnalysisRefreshResult.JSON_PROPERTY_MESSAGE, + OptimiserAnalysisRefreshResult.JSON_PROPERTY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OptimiserAnalysisRefreshResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public OptimiserAnalysisRefreshResult() { + } + + public OptimiserAnalysisRefreshResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public OptimiserAnalysisRefreshResult status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + /** + * Return true if this OptimiserAnalysisRefreshResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptimiserAnalysisRefreshResult optimiserAnalysisRefreshResult = (OptimiserAnalysisRefreshResult) o; + return Objects.equals(this.message, optimiserAnalysisRefreshResult.message) && + Objects.equals(this.status, optimiserAnalysisRefreshResult.status); + } + + @Override + public int hashCode() { + return Objects.hash(message, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OptimiserAnalysisRefreshResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResponse.java new file mode 100644 index 0000000..037691c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.OptimiserAnalysisResultPayload; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * OptimiserAnalysisResponse + */ +@JsonPropertyOrder({ + OptimiserAnalysisResponse.JSON_PROPERTY_STATUS, + OptimiserAnalysisResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OptimiserAnalysisResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private OptimiserAnalysisResultPayload result; + + public OptimiserAnalysisResponse() { + } + + public OptimiserAnalysisResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public OptimiserAnalysisResponse result(@javax.annotation.Nonnull OptimiserAnalysisResultPayload result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OptimiserAnalysisResultPayload getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull OptimiserAnalysisResultPayload result) { + this.result = result; + } + + + /** + * Return true if this OptimiserAnalysisResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptimiserAnalysisResponse optimiserAnalysisResponse = (OptimiserAnalysisResponse) o; + return Objects.equals(this.status, optimiserAnalysisResponse.status) && + Objects.equals(this.result, optimiserAnalysisResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OptimiserAnalysisResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResultPayload.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResultPayload.java new file mode 100644 index 0000000..562fbe9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/OptimiserAnalysisResultPayload.java @@ -0,0 +1,274 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * OptimiserAnalysisResultPayload + */ +@JsonPropertyOrder({ + OptimiserAnalysisResultPayload.JSON_PROPERTY_RESPONSE, + OptimiserAnalysisResultPayload.JSON_PROPERTY_STATUS, + OptimiserAnalysisResultPayload.JSON_PROPERTY_LAST_UPDATED, + OptimiserAnalysisResultPayload.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OptimiserAnalysisResultPayload { + public static final String JSON_PROPERTY_RESPONSE = "response"; + @javax.annotation.Nonnull + private Map> response = new HashMap<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; + @javax.annotation.Nullable + private OffsetDateTime lastUpdated; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public OptimiserAnalysisResultPayload() { + } + + public OptimiserAnalysisResultPayload response(@javax.annotation.Nonnull Map> response) { + this.response = response; + return this; + } + + public OptimiserAnalysisResultPayload putResponseItem(String key, Map responseItem) { + if (this.response == null) { + this.response = new HashMap<>(); + } + this.response.put(key, responseItem); + return this; + } + + /** + * Get response + * @return response + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getResponse() { + return response; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponse(@javax.annotation.Nonnull Map> response) { + this.response = response; + } + + + public OptimiserAnalysisResultPayload status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public OptimiserAnalysisResultPayload lastUpdated(@javax.annotation.Nullable OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get lastUpdated + * @return lastUpdated + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastUpdated() { + return lastUpdated; + } + + + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastUpdated(@javax.annotation.Nullable OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + } + + + public OptimiserAnalysisResultPayload message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + /** + * Return true if this OptimiserAnalysisResultPayload object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OptimiserAnalysisResultPayload optimiserAnalysisResultPayload = (OptimiserAnalysisResultPayload) o; + return Objects.equals(this.response, optimiserAnalysisResultPayload.response) && + Objects.equals(this.status, optimiserAnalysisResultPayload.status) && + Objects.equals(this.lastUpdated, optimiserAnalysisResultPayload.lastUpdated) && + Objects.equals(this.message, optimiserAnalysisResultPayload.message); + } + + @Override + public int hashCode() { + return Objects.hash(response, status, lastUpdated, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OptimiserAnalysisResultPayload {\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `response` to the URL query string + if (getResponse() != null) { + for (String _key : getResponse().keySet()) { + joiner.add(String.format("%sresponse%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResponse().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResponse().get(_key))))); + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `last_updated` to the URL query string + if (getLastUpdated() != null) { + joiner.add(String.format("%slast_updated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastUpdated())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Organization.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Organization.java new file mode 100644 index 0000000..a0531d9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Organization.java @@ -0,0 +1,491 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Organization + */ +@JsonPropertyOrder({ + Organization.JSON_PROPERTY_ID, + Organization.JSON_PROPERTY_CREATED_AT, + Organization.JSON_PROPERTY_NAME, + Organization.JSON_PROPERTY_DISPLAY_NAME, + Organization.JSON_PROPERTY_IS_NEW, + Organization.JSON_PROPERTY_WS_ENABLED, + Organization.JSON_PROPERTY_REGION, + Organization.JSON_PROPERTY_REQUIRE2FA, + Organization.JSON_PROPERTY_REQUIRE2FA_GRACE_PERIOD_DAYS, + Organization.JSON_PROPERTY_REQUIRE2FA_ENFORCED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Organization { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + @javax.annotation.Nullable + private String displayName; + + public static final String JSON_PROPERTY_IS_NEW = "is_new"; + @javax.annotation.Nullable + private Boolean isNew; + + public static final String JSON_PROPERTY_WS_ENABLED = "ws_enabled"; + @javax.annotation.Nullable + private Boolean wsEnabled; + + public static final String JSON_PROPERTY_REGION = "region"; + @javax.annotation.Nullable + private String region; + + public static final String JSON_PROPERTY_REQUIRE2FA = "require_2fa"; + @javax.annotation.Nullable + private Boolean require2fa; + + public static final String JSON_PROPERTY_REQUIRE2FA_GRACE_PERIOD_DAYS = "require_2fa_grace_period_days"; + @javax.annotation.Nullable + private Integer require2faGracePeriodDays; + + public static final String JSON_PROPERTY_REQUIRE2FA_ENFORCED_AT = "require_2fa_enforced_at"; + private JsonNullable require2faEnforcedAt = JsonNullable.undefined(); + + public Organization() { + } + + @JsonCreator + public Organization( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + public Organization name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Organization displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public Organization isNew(@javax.annotation.Nullable Boolean isNew) { + this.isNew = isNew; + return this; + } + + /** + * Get isNew + * @return isNew + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_NEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsNew() { + return isNew; + } + + + @JsonProperty(JSON_PROPERTY_IS_NEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsNew(@javax.annotation.Nullable Boolean isNew) { + this.isNew = isNew; + } + + + public Organization wsEnabled(@javax.annotation.Nullable Boolean wsEnabled) { + this.wsEnabled = wsEnabled; + return this; + } + + /** + * Get wsEnabled + * @return wsEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getWsEnabled() { + return wsEnabled; + } + + + @JsonProperty(JSON_PROPERTY_WS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWsEnabled(@javax.annotation.Nullable Boolean wsEnabled) { + this.wsEnabled = wsEnabled; + } + + + public Organization region(@javax.annotation.Nullable String region) { + this.region = region; + return this; + } + + /** + * Get region + * @return region + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } + + + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegion(@javax.annotation.Nullable String region) { + this.region = region; + } + + + public Organization require2fa(@javax.annotation.Nullable Boolean require2fa) { + this.require2fa = require2fa; + return this; + } + + /** + * Get require2fa + * @return require2fa + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRE2FA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequire2fa() { + return require2fa; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRE2FA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequire2fa(@javax.annotation.Nullable Boolean require2fa) { + this.require2fa = require2fa; + } + + + public Organization require2faGracePeriodDays(@javax.annotation.Nullable Integer require2faGracePeriodDays) { + this.require2faGracePeriodDays = require2faGracePeriodDays; + return this; + } + + /** + * Get require2faGracePeriodDays + * minimum: 0 + * maximum: 32767 + * @return require2faGracePeriodDays + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRE2FA_GRACE_PERIOD_DAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRequire2faGracePeriodDays() { + return require2faGracePeriodDays; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRE2FA_GRACE_PERIOD_DAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequire2faGracePeriodDays(@javax.annotation.Nullable Integer require2faGracePeriodDays) { + this.require2faGracePeriodDays = require2faGracePeriodDays; + } + + + public Organization require2faEnforcedAt(@javax.annotation.Nullable OffsetDateTime require2faEnforcedAt) { + this.require2faEnforcedAt = JsonNullable.of(require2faEnforcedAt); + return this; + } + + /** + * Get require2faEnforcedAt + * @return require2faEnforcedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getRequire2faEnforcedAt() { + return require2faEnforcedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REQUIRE2FA_ENFORCED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRequire2faEnforcedAt_JsonNullable() { + return require2faEnforcedAt; + } + + @JsonProperty(JSON_PROPERTY_REQUIRE2FA_ENFORCED_AT) + public void setRequire2faEnforcedAt_JsonNullable(JsonNullable require2faEnforcedAt) { + this.require2faEnforcedAt = require2faEnforcedAt; + } + + public void setRequire2faEnforcedAt(@javax.annotation.Nullable OffsetDateTime require2faEnforcedAt) { + this.require2faEnforcedAt = JsonNullable.of(require2faEnforcedAt); + } + + + /** + * Return true if this Organization object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Organization organization = (Organization) o; + return Objects.equals(this.id, organization.id) && + Objects.equals(this.createdAt, organization.createdAt) && + Objects.equals(this.name, organization.name) && + Objects.equals(this.displayName, organization.displayName) && + Objects.equals(this.isNew, organization.isNew) && + Objects.equals(this.wsEnabled, organization.wsEnabled) && + Objects.equals(this.region, organization.region) && + Objects.equals(this.require2fa, organization.require2fa) && + Objects.equals(this.require2faGracePeriodDays, organization.require2faGracePeriodDays) && + equalsNullable(this.require2faEnforcedAt, organization.require2faEnforcedAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, createdAt, name, displayName, isNew, wsEnabled, region, require2fa, require2faGracePeriodDays, hashCodeNullable(require2faEnforcedAt)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Organization {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" isNew: ").append(toIndentedString(isNew)).append("\n"); + sb.append(" wsEnabled: ").append(toIndentedString(wsEnabled)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" require2fa: ").append(toIndentedString(require2fa)).append("\n"); + sb.append(" require2faGracePeriodDays: ").append(toIndentedString(require2faGracePeriodDays)).append("\n"); + sb.append(" require2faEnforcedAt: ").append(toIndentedString(require2faEnforcedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `display_name` to the URL query string + if (getDisplayName() != null) { + joiner.add(String.format("%sdisplay_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDisplayName())))); + } + + // add `is_new` to the URL query string + if (getIsNew() != null) { + joiner.add(String.format("%sis_new%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsNew())))); + } + + // add `ws_enabled` to the URL query string + if (getWsEnabled() != null) { + joiner.add(String.format("%sws_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsEnabled())))); + } + + // add `region` to the URL query string + if (getRegion() != null) { + joiner.add(String.format("%sregion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRegion())))); + } + + // add `require_2fa` to the URL query string + if (getRequire2fa() != null) { + joiner.add(String.format("%srequire_2fa%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequire2fa())))); + } + + // add `require_2fa_grace_period_days` to the URL query string + if (getRequire2faGracePeriodDays() != null) { + joiner.add(String.format("%srequire_2fa_grace_period_days%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequire2faGracePeriodDays())))); + } + + // add `require_2fa_enforced_at` to the URL query string + if (getRequire2faEnforcedAt() != null) { + joiner.add(String.format("%srequire_2fa_enforced_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequire2faEnforcedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewApiResponse.java new file mode 100644 index 0000000..e045dab --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.OverviewResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * OverviewApiResponse + */ +@JsonPropertyOrder({ + OverviewApiResponse.JSON_PROPERTY_STATUS, + OverviewApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OverviewApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private OverviewResponse result; + + public OverviewApiResponse() { + } + + public OverviewApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public OverviewApiResponse result(@javax.annotation.Nonnull OverviewResponse result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OverviewResponse getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull OverviewResponse result) { + this.result = result; + } + + + /** + * Return true if this OverviewApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OverviewApiResponse overviewApiResponse = (OverviewApiResponse) o; + return Objects.equals(this.status, overviewApiResponse.status) && + Objects.equals(this.result, overviewApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OverviewApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewResponse.java new file mode 100644 index 0000000..2dcdf47 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/OverviewResponse.java @@ -0,0 +1,254 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EventsOverTimePoint; +import com.futureagi.sdk.model.PatternSummary; +import com.futureagi.sdk.model.RepresentativeTrace; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * OverviewResponse + */ +@JsonPropertyOrder({ + OverviewResponse.JSON_PROPERTY_EVENTS_OVER_TIME, + OverviewResponse.JSON_PROPERTY_PATTERN_SUMMARY, + OverviewResponse.JSON_PROPERTY_REPRESENTATIVE_TRACES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class OverviewResponse { + public static final String JSON_PROPERTY_EVENTS_OVER_TIME = "events_over_time"; + @javax.annotation.Nonnull + private List eventsOverTime = new ArrayList<>(); + + public static final String JSON_PROPERTY_PATTERN_SUMMARY = "pattern_summary"; + @javax.annotation.Nonnull + private PatternSummary patternSummary; + + public static final String JSON_PROPERTY_REPRESENTATIVE_TRACES = "representative_traces"; + @javax.annotation.Nonnull + private List representativeTraces = new ArrayList<>(); + + public OverviewResponse() { + } + + public OverviewResponse eventsOverTime(@javax.annotation.Nonnull List eventsOverTime) { + this.eventsOverTime = eventsOverTime; + return this; + } + + public OverviewResponse addEventsOverTimeItem(EventsOverTimePoint eventsOverTimeItem) { + if (this.eventsOverTime == null) { + this.eventsOverTime = new ArrayList<>(); + } + this.eventsOverTime.add(eventsOverTimeItem); + return this; + } + + /** + * Get eventsOverTime + * @return eventsOverTime + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVENTS_OVER_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEventsOverTime() { + return eventsOverTime; + } + + + @JsonProperty(JSON_PROPERTY_EVENTS_OVER_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventsOverTime(@javax.annotation.Nonnull List eventsOverTime) { + this.eventsOverTime = eventsOverTime; + } + + + public OverviewResponse patternSummary(@javax.annotation.Nonnull PatternSummary patternSummary) { + this.patternSummary = patternSummary; + return this; + } + + /** + * Get patternSummary + * @return patternSummary + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PATTERN_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PatternSummary getPatternSummary() { + return patternSummary; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPatternSummary(@javax.annotation.Nonnull PatternSummary patternSummary) { + this.patternSummary = patternSummary; + } + + + public OverviewResponse representativeTraces(@javax.annotation.Nonnull List representativeTraces) { + this.representativeTraces = representativeTraces; + return this; + } + + public OverviewResponse addRepresentativeTracesItem(RepresentativeTrace representativeTracesItem) { + if (this.representativeTraces == null) { + this.representativeTraces = new ArrayList<>(); + } + this.representativeTraces.add(representativeTracesItem); + return this; + } + + /** + * Get representativeTraces + * @return representativeTraces + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REPRESENTATIVE_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRepresentativeTraces() { + return representativeTraces; + } + + + @JsonProperty(JSON_PROPERTY_REPRESENTATIVE_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRepresentativeTraces(@javax.annotation.Nonnull List representativeTraces) { + this.representativeTraces = representativeTraces; + } + + + /** + * Return true if this OverviewResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OverviewResponse overviewResponse = (OverviewResponse) o; + return Objects.equals(this.eventsOverTime, overviewResponse.eventsOverTime) && + Objects.equals(this.patternSummary, overviewResponse.patternSummary) && + Objects.equals(this.representativeTraces, overviewResponse.representativeTraces); + } + + @Override + public int hashCode() { + return Objects.hash(eventsOverTime, patternSummary, representativeTraces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OverviewResponse {\n"); + sb.append(" eventsOverTime: ").append(toIndentedString(eventsOverTime)).append("\n"); + sb.append(" patternSummary: ").append(toIndentedString(patternSummary)).append("\n"); + sb.append(" representativeTraces: ").append(toIndentedString(representativeTraces)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `events_over_time` to the URL query string + if (getEventsOverTime() != null) { + for (int i = 0; i < getEventsOverTime().size(); i++) { + if (getEventsOverTime().get(i) != null) { + joiner.add(getEventsOverTime().get(i).toUrlQueryString(String.format("%sevents_over_time%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `pattern_summary` to the URL query string + if (getPatternSummary() != null) { + joiner.add(getPatternSummary().toUrlQueryString(prefix + "pattern_summary" + suffix)); + } + + // add `representative_traces` to the URL query string + if (getRepresentativeTraces() != null) { + for (int i = 0; i < getRepresentativeTraces().size(); i++) { + if (getRepresentativeTraces().get(i) != null) { + joiner.add(getRepresentativeTraces().get(i).toUrlQueryString(String.format("%srepresentative_traces%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PatternInsight.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PatternInsight.java new file mode 100644 index 0000000..8ae975f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PatternInsight.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PatternInsight + */ +@JsonPropertyOrder({ + PatternInsight.JSON_PROPERTY_VALUE, + PatternInsight.JSON_PROPERTY_CAPTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PatternInsight { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_CAPTION = "caption"; + @javax.annotation.Nonnull + private String caption; + + public PatternInsight() { + } + + public PatternInsight value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + + public PatternInsight caption(@javax.annotation.Nonnull String caption) { + this.caption = caption; + return this; + } + + /** + * Get caption + * @return caption + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CAPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCaption() { + return caption; + } + + + @JsonProperty(JSON_PROPERTY_CAPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCaption(@javax.annotation.Nonnull String caption) { + this.caption = caption; + } + + + /** + * Return true if this PatternInsight object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatternInsight patternInsight = (PatternInsight) o; + return Objects.equals(this.value, patternInsight.value) && + Objects.equals(this.caption, patternInsight.caption); + } + + @Override + public int hashCode() { + return Objects.hash(value, caption); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatternInsight {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" caption: ").append(toIndentedString(caption)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `caption` to the URL query string + if (getCaption() != null) { + joiner.add(String.format("%scaption%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCaption())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PatternSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PatternSummary.java new file mode 100644 index 0000000..d277864 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PatternSummary.java @@ -0,0 +1,217 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.KeyMoment; +import com.futureagi.sdk.model.PatternInsight; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PatternSummary + */ +@JsonPropertyOrder({ + PatternSummary.JSON_PROPERTY_INSIGHTS, + PatternSummary.JSON_PROPERTY_KEY_MOMENTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PatternSummary { + public static final String JSON_PROPERTY_INSIGHTS = "insights"; + @javax.annotation.Nonnull + private List insights = new ArrayList<>(); + + public static final String JSON_PROPERTY_KEY_MOMENTS = "key_moments"; + @javax.annotation.Nonnull + private List keyMoments = new ArrayList<>(); + + public PatternSummary() { + } + + public PatternSummary insights(@javax.annotation.Nonnull List insights) { + this.insights = insights; + return this; + } + + public PatternSummary addInsightsItem(PatternInsight insightsItem) { + if (this.insights == null) { + this.insights = new ArrayList<>(); + } + this.insights.add(insightsItem); + return this; + } + + /** + * Get insights + * @return insights + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSIGHTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInsights() { + return insights; + } + + + @JsonProperty(JSON_PROPERTY_INSIGHTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInsights(@javax.annotation.Nonnull List insights) { + this.insights = insights; + } + + + public PatternSummary keyMoments(@javax.annotation.Nonnull List keyMoments) { + this.keyMoments = keyMoments; + return this; + } + + public PatternSummary addKeyMomentsItem(KeyMoment keyMomentsItem) { + if (this.keyMoments == null) { + this.keyMoments = new ArrayList<>(); + } + this.keyMoments.add(keyMomentsItem); + return this; + } + + /** + * Get keyMoments + * @return keyMoments + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KEY_MOMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getKeyMoments() { + return keyMoments; + } + + + @JsonProperty(JSON_PROPERTY_KEY_MOMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKeyMoments(@javax.annotation.Nonnull List keyMoments) { + this.keyMoments = keyMoments; + } + + + /** + * Return true if this PatternSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatternSummary patternSummary = (PatternSummary) o; + return Objects.equals(this.insights, patternSummary.insights) && + Objects.equals(this.keyMoments, patternSummary.keyMoments); + } + + @Override + public int hashCode() { + return Objects.hash(insights, keyMoments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatternSummary {\n"); + sb.append(" insights: ").append(toIndentedString(insights)).append("\n"); + sb.append(" keyMoments: ").append(toIndentedString(keyMoments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `insights` to the URL query string + if (getInsights() != null) { + for (int i = 0; i < getInsights().size(); i++) { + if (getInsights().get(i) != null) { + joiner.add(getInsights().get(i).toUrlQueryString(String.format("%sinsights%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `key_moments` to the URL query string + if (getKeyMoments() != null) { + for (int i = 0; i < getKeyMoments().size(); i++) { + if (getKeyMoments().get(i) != null) { + joiner.add(getKeyMoments().get(i).toUrlQueryString(String.format("%skey_moments%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PerformanceSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PerformanceSummary.java new file mode 100644 index 0000000..7dd1cad --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PerformanceSummary.java @@ -0,0 +1,216 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PerformanceSummary + */ +@JsonPropertyOrder({ + PerformanceSummary.JSON_PROPERTY_TEST_RUN_PERFORMANCE_METRICS, + PerformanceSummary.JSON_PROPERTY_TOP_PERFORMING_SCENARIOS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PerformanceSummary { + public static final String JSON_PROPERTY_TEST_RUN_PERFORMANCE_METRICS = "test_run_performance_metrics"; + @javax.annotation.Nonnull + private Map testRunPerformanceMetrics = new HashMap<>(); + + public static final String JSON_PROPERTY_TOP_PERFORMING_SCENARIOS = "top_performing_scenarios"; + @javax.annotation.Nonnull + private List> topPerformingScenarios = new ArrayList<>(); + + public PerformanceSummary() { + } + + public PerformanceSummary testRunPerformanceMetrics(@javax.annotation.Nonnull Map testRunPerformanceMetrics) { + this.testRunPerformanceMetrics = testRunPerformanceMetrics; + return this; + } + + public PerformanceSummary putTestRunPerformanceMetricsItem(String key, BigDecimal testRunPerformanceMetricsItem) { + if (this.testRunPerformanceMetrics == null) { + this.testRunPerformanceMetrics = new HashMap<>(); + } + this.testRunPerformanceMetrics.put(key, testRunPerformanceMetricsItem); + return this; + } + + /** + * Performance metrics including pass rate, total test runs, and latest fail rate + * @return testRunPerformanceMetrics + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST_RUN_PERFORMANCE_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getTestRunPerformanceMetrics() { + return testRunPerformanceMetrics; + } + + + @JsonProperty(JSON_PROPERTY_TEST_RUN_PERFORMANCE_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTestRunPerformanceMetrics(@javax.annotation.Nonnull Map testRunPerformanceMetrics) { + this.testRunPerformanceMetrics = testRunPerformanceMetrics; + } + + + public PerformanceSummary topPerformingScenarios(@javax.annotation.Nonnull List> topPerformingScenarios) { + this.topPerformingScenarios = topPerformingScenarios; + return this; + } + + public PerformanceSummary addTopPerformingScenariosItem(Map topPerformingScenariosItem) { + if (this.topPerformingScenarios == null) { + this.topPerformingScenarios = new ArrayList<>(); + } + this.topPerformingScenarios.add(topPerformingScenariosItem); + return this; + } + + /** + * List of top performing scenarios + * @return topPerformingScenarios + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOP_PERFORMING_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getTopPerformingScenarios() { + return topPerformingScenarios; + } + + + @JsonProperty(JSON_PROPERTY_TOP_PERFORMING_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTopPerformingScenarios(@javax.annotation.Nonnull List> topPerformingScenarios) { + this.topPerformingScenarios = topPerformingScenarios; + } + + + /** + * Return true if this PerformanceSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceSummary performanceSummary = (PerformanceSummary) o; + return Objects.equals(this.testRunPerformanceMetrics, performanceSummary.testRunPerformanceMetrics) && + Objects.equals(this.topPerformingScenarios, performanceSummary.topPerformingScenarios); + } + + @Override + public int hashCode() { + return Objects.hash(testRunPerformanceMetrics, topPerformingScenarios); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceSummary {\n"); + sb.append(" testRunPerformanceMetrics: ").append(toIndentedString(testRunPerformanceMetrics)).append("\n"); + sb.append(" topPerformingScenarios: ").append(toIndentedString(topPerformingScenarios)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `test_run_performance_metrics` to the URL query string + if (getTestRunPerformanceMetrics() != null) { + for (String _key : getTestRunPerformanceMetrics().keySet()) { + joiner.add(String.format("%stest_run_performance_metrics%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTestRunPerformanceMetrics().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTestRunPerformanceMetrics().get(_key))))); + } + } + + // add `top_performing_scenarios` to the URL query string + if (getTopPerformingScenarios() != null) { + for (int i = 0; i < getTopPerformingScenarios().size(); i++) { + joiner.add(String.format("%stop_performing_scenarios%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTopPerformingScenarios().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Persona.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Persona.java new file mode 100644 index 0000000..c467312 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Persona.java @@ -0,0 +1,1989 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Persona + */ +@JsonPropertyOrder({ + Persona.JSON_PROPERTY_ID, + Persona.JSON_PROPERTY_PERSONA_TYPE, + Persona.JSON_PROPERTY_PERSONA_TYPE_DISPLAY, + Persona.JSON_PROPERTY_NAME, + Persona.JSON_PROPERTY_DESCRIPTION, + Persona.JSON_PROPERTY_GENDER, + Persona.JSON_PROPERTY_AGE_GROUP, + Persona.JSON_PROPERTY_OCCUPATION, + Persona.JSON_PROPERTY_LOCATION, + Persona.JSON_PROPERTY_PERSONALITY, + Persona.JSON_PROPERTY_COMMUNICATION_STYLE, + Persona.JSON_PROPERTY_MULTILINGUAL, + Persona.JSON_PROPERTY_LANGUAGES, + Persona.JSON_PROPERTY_ACCENT, + Persona.JSON_PROPERTY_CONVERSATION_SPEED, + Persona.JSON_PROPERTY_BACKGROUND_SOUND, + Persona.JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY, + Persona.JSON_PROPERTY_INTERRUPT_SENSITIVITY, + Persona.JSON_PROPERTY_KEYWORDS, + Persona.JSON_PROPERTY_METADATA, + Persona.JSON_PROPERTY_ADDITIONAL_INSTRUCTION, + Persona.JSON_PROPERTY_IS_DEFAULT, + Persona.JSON_PROPERTY_CREATED_AT, + Persona.JSON_PROPERTY_UPDATED_AT, + Persona.JSON_PROPERTY_PROFESSION, + Persona.JSON_PROPERTY_LANGUAGE, + Persona.JSON_PROPERTY_CUSTOM_PROPERTIES, + Persona.JSON_PROPERTY_SIMULATION_TYPE, + Persona.JSON_PROPERTY_PUNCTUATION, + Persona.JSON_PROPERTY_SLANG_USAGE, + Persona.JSON_PROPERTY_TYPOS_FREQUENCY, + Persona.JSON_PROPERTY_REGIONAL_MIX, + Persona.JSON_PROPERTY_EMOJI_USAGE, + Persona.JSON_PROPERTY_TONE, + Persona.JSON_PROPERTY_VERBOSITY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Persona { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + /** + * Type of persona (system or workspace-level) + */ + public enum PersonaTypeEnum { + SYSTEM(String.valueOf("system")), + + WORKSPACE(String.valueOf("workspace")); + + private String value; + + PersonaTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PersonaTypeEnum fromValue(String value) { + for (PersonaTypeEnum b : PersonaTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PERSONA_TYPE = "persona_type"; + @javax.annotation.Nullable + private PersonaTypeEnum personaType; + + public static final String JSON_PROPERTY_PERSONA_TYPE_DISPLAY = "persona_type_display"; + @javax.annotation.Nullable + private String personaTypeDisplay; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_GENDER = "gender"; + @javax.annotation.Nullable + private Map gender = new HashMap<>(); + + public static final String JSON_PROPERTY_AGE_GROUP = "age_group"; + @javax.annotation.Nullable + private Map ageGroup = new HashMap<>(); + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + @javax.annotation.Nullable + private Map occupation = new HashMap<>(); + + public static final String JSON_PROPERTY_LOCATION = "location"; + @javax.annotation.Nullable + private Map location = new HashMap<>(); + + public static final String JSON_PROPERTY_PERSONALITY = "personality"; + @javax.annotation.Nullable + private Map personality = new HashMap<>(); + + public static final String JSON_PROPERTY_COMMUNICATION_STYLE = "communication_style"; + @javax.annotation.Nullable + private Map communicationStyle = new HashMap<>(); + + public static final String JSON_PROPERTY_MULTILINGUAL = "multilingual"; + private JsonNullable multilingual = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGES = "languages"; + @javax.annotation.Nullable + private Map languages = new HashMap<>(); + + public static final String JSON_PROPERTY_ACCENT = "accent"; + @javax.annotation.Nullable + private Map accent = new HashMap<>(); + + public static final String JSON_PROPERTY_CONVERSATION_SPEED = "conversation_speed"; + @javax.annotation.Nullable + private Map conversationSpeed = new HashMap<>(); + + public static final String JSON_PROPERTY_BACKGROUND_SOUND = "background_sound"; + private JsonNullable backgroundSound = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY = "finished_speaking_sensitivity"; + @javax.annotation.Nullable + private Map finishedSpeakingSensitivity = new HashMap<>(); + + public static final String JSON_PROPERTY_INTERRUPT_SENSITIVITY = "interrupt_sensitivity"; + @javax.annotation.Nullable + private Map interruptSensitivity = new HashMap<>(); + + public static final String JSON_PROPERTY_KEYWORDS = "keywords"; + @javax.annotation.Nullable + private Map keywords = new HashMap<>(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_ADDITIONAL_INSTRUCTION = "additional_instruction"; + private JsonNullable additionalInstruction = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + private JsonNullable isDefault = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_PROFESSION = "profession"; + private JsonNullable> profession = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private JsonNullable> language = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CUSTOM_PROPERTIES = "custom_properties"; + @javax.annotation.Nullable + private Map customProperties = new HashMap<>(); + + /** + * Type of simulation for the persona + */ + public enum SimulationTypeEnum { + VOICE(String.valueOf("voice")), + + TEXT(String.valueOf("text")); + + private String value; + + SimulationTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SimulationTypeEnum fromValue(String value) { + for (SimulationTypeEnum b : SimulationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIMULATION_TYPE = "simulation_type"; + @javax.annotation.Nullable + private SimulationTypeEnum simulationType; + + /** + * Punctuation style for the persona + */ + public enum PunctuationEnum { + CLEAN(String.valueOf("clean")), + + MINIMAL(String.valueOf("minimal")), + + EXPRESSIVE(String.valueOf("expressive")), + + ERRATIC(String.valueOf("erratic")); + + private String value; + + PunctuationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PunctuationEnum fromValue(String value) { + for (PunctuationEnum b : PunctuationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_PUNCTUATION = "punctuation"; + private JsonNullable punctuation = JsonNullable.undefined(); + + /** + * Slang usage for the persona + */ + public enum SlangUsageEnum { + NONE(String.valueOf("none")), + + MODERATE(String.valueOf("moderate")), + + HEAVY(String.valueOf("heavy")), + + LIGHT(String.valueOf("light")); + + private String value; + + SlangUsageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SlangUsageEnum fromValue(String value) { + for (SlangUsageEnum b : SlangUsageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_SLANG_USAGE = "slang_usage"; + private JsonNullable slangUsage = JsonNullable.undefined(); + + /** + * Typos frequency for the persona + */ + public enum TyposFrequencyEnum { + NONE(String.valueOf("none")), + + RARE(String.valueOf("rare")), + + OCCASIONAL(String.valueOf("occasional")), + + FREQUENT(String.valueOf("frequent")); + + private String value; + + TyposFrequencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TyposFrequencyEnum fromValue(String value) { + for (TyposFrequencyEnum b : TyposFrequencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPOS_FREQUENCY = "typos_frequency"; + private JsonNullable typosFrequency = JsonNullable.undefined(); + + /** + * Regional mix for the persona + */ + public enum RegionalMixEnum { + NONE(String.valueOf("none")), + + MODERATE(String.valueOf("moderate")), + + HEAVY(String.valueOf("heavy")), + + LIGHT(String.valueOf("light")); + + private String value; + + RegionalMixEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RegionalMixEnum fromValue(String value) { + for (RegionalMixEnum b : RegionalMixEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_REGIONAL_MIX = "regional_mix"; + private JsonNullable regionalMix = JsonNullable.undefined(); + + /** + * Emoji usage for the persona + */ + public enum EmojiUsageEnum { + NEVER(String.valueOf("never")), + + LIGHT(String.valueOf("light")), + + REGULAR(String.valueOf("regular")), + + HEAVY(String.valueOf("heavy")); + + private String value; + + EmojiUsageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EmojiUsageEnum fromValue(String value) { + for (EmojiUsageEnum b : EmojiUsageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_EMOJI_USAGE = "emoji_usage"; + private JsonNullable emojiUsage = JsonNullable.undefined(); + + /** + * Tone for the persona + */ + public enum ToneEnum { + FORMAL(String.valueOf("formal")), + + CASUAL(String.valueOf("casual")), + + NEUTRAL(String.valueOf("neutral")); + + private String value; + + ToneEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToneEnum fromValue(String value) { + for (ToneEnum b : ToneEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TONE = "tone"; + private JsonNullable tone = JsonNullable.undefined(); + + /** + * Verbosity for the persona + */ + public enum VerbosityEnum { + BRIEF(String.valueOf("brief")), + + BALANCED(String.valueOf("balanced")), + + DETAILED(String.valueOf("detailed")); + + private String value; + + VerbosityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VerbosityEnum fromValue(String value) { + for (VerbosityEnum b : VerbosityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_VERBOSITY = "verbosity"; + private JsonNullable verbosity = JsonNullable.undefined(); + + public Persona() { + } + + @JsonCreator + public Persona( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE) PersonaTypeEnum personaType, + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE_DISPLAY) String personaTypeDisplay, + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) Boolean isDefault, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_SIMULATION_TYPE) SimulationTypeEnum simulationType + ) { + this(); + this.id = id; + this.personaType = personaType; + this.personaTypeDisplay = personaTypeDisplay; + this.isDefault = isDefault == null ? JsonNullable.undefined() : JsonNullable.of(isDefault); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.simulationType = simulationType; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Type of persona (system or workspace-level) + * @return personaType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PersonaTypeEnum getPersonaType() { + return personaType; + } + + + + + /** + * Get personaTypeDisplay + * @return personaTypeDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPersonaTypeDisplay() { + return personaTypeDisplay; + } + + + + + public Persona name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the persona + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Persona description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the persona + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public Persona gender(@javax.annotation.Nullable Map gender) { + this.gender = gender; + return this; + } + + public Persona putGenderItem(String key, Object genderItem) { + if (this.gender == null) { + this.gender = new HashMap<>(); + } + this.gender.put(key, genderItem); + return this; + } + + /** + * List of genders for the persona (e.g., ['male'], ['female']) + * @return gender + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GENDER) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getGender() { + return gender; + } + + + @JsonProperty(JSON_PROPERTY_GENDER) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setGender(@javax.annotation.Nullable Map gender) { + this.gender = gender; + } + + + public Persona ageGroup(@javax.annotation.Nullable Map ageGroup) { + this.ageGroup = ageGroup; + return this; + } + + public Persona putAgeGroupItem(String key, Object ageGroupItem) { + if (this.ageGroup == null) { + this.ageGroup = new HashMap<>(); + } + this.ageGroup.put(key, ageGroupItem); + return this; + } + + /** + * List of age groups for the persona (e.g., ['18-25'], ['25-32']) + * @return ageGroup + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGE_GROUP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAgeGroup() { + return ageGroup; + } + + + @JsonProperty(JSON_PROPERTY_AGE_GROUP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setAgeGroup(@javax.annotation.Nullable Map ageGroup) { + this.ageGroup = ageGroup; + } + + + public Persona occupation(@javax.annotation.Nullable Map occupation) { + this.occupation = occupation; + return this; + } + + public Persona putOccupationItem(String key, Object occupationItem) { + if (this.occupation == null) { + this.occupation = new HashMap<>(); + } + this.occupation.put(key, occupationItem); + return this; + } + + /** + * List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher']) + * @return occupation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOccupation() { + return occupation; + } + + + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setOccupation(@javax.annotation.Nullable Map occupation) { + this.occupation = occupation; + } + + + public Persona location(@javax.annotation.Nullable Map location) { + this.location = location; + return this; + } + + public Persona putLocationItem(String key, Object locationItem) { + if (this.location == null) { + this.location = new HashMap<>(); + } + this.location.put(key, locationItem); + return this; + } + + /** + * List of locations for the persona (e.g., ['United States'], ['Canada']) + * @return location + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLocation() { + return location; + } + + + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setLocation(@javax.annotation.Nullable Map location) { + this.location = location; + } + + + public Persona personality(@javax.annotation.Nullable Map personality) { + this.personality = personality; + return this; + } + + public Persona putPersonalityItem(String key, Object personalityItem) { + if (this.personality == null) { + this.personality = new HashMap<>(); + } + this.personality.put(key, personalityItem); + return this; + } + + /** + * List of personality types for the persona (e.g., ['Friendly and cooperative']) + * @return personality + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONALITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPersonality() { + return personality; + } + + + @JsonProperty(JSON_PROPERTY_PERSONALITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setPersonality(@javax.annotation.Nullable Map personality) { + this.personality = personality; + } + + + public Persona communicationStyle(@javax.annotation.Nullable Map communicationStyle) { + this.communicationStyle = communicationStyle; + return this; + } + + public Persona putCommunicationStyleItem(String key, Object communicationStyleItem) { + if (this.communicationStyle == null) { + this.communicationStyle = new HashMap<>(); + } + this.communicationStyle.put(key, communicationStyleItem); + return this; + } + + /** + * List of communication styles for the persona (e.g., ['Direct and concise']) + * @return communicationStyle + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCommunicationStyle() { + return communicationStyle; + } + + + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCommunicationStyle(@javax.annotation.Nullable Map communicationStyle) { + this.communicationStyle = communicationStyle; + } + + + public Persona multilingual(@javax.annotation.Nullable Boolean multilingual) { + this.multilingual = JsonNullable.of(multilingual); + return this; + } + + /** + * Whether the persona supports multiple languages + * @return multilingual + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getMultilingual() { + return multilingual.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MULTILINGUAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMultilingual_JsonNullable() { + return multilingual; + } + + @JsonProperty(JSON_PROPERTY_MULTILINGUAL) + public void setMultilingual_JsonNullable(JsonNullable multilingual) { + this.multilingual = multilingual; + } + + public void setMultilingual(@javax.annotation.Nullable Boolean multilingual) { + this.multilingual = JsonNullable.of(multilingual); + } + + + public Persona languages(@javax.annotation.Nullable Map languages) { + this.languages = languages; + return this; + } + + public Persona putLanguagesItem(String key, Object languagesItem) { + if (this.languages == null) { + this.languages = new HashMap<>(); + } + this.languages.put(key, languagesItem); + return this; + } + + /** + * List of languages the persona speaks (e.g., ['English', 'Hindi']) + * @return languages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLanguages() { + return languages; + } + + + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setLanguages(@javax.annotation.Nullable Map languages) { + this.languages = languages; + } + + + public Persona accent(@javax.annotation.Nullable Map accent) { + this.accent = accent; + return this; + } + + public Persona putAccentItem(String key, Object accentItem) { + if (this.accent == null) { + this.accent = new HashMap<>(); + } + this.accent.put(key, accentItem); + return this; + } + + /** + * List of accents for the persona (e.g., ['American'], ['Australian']) + * @return accent + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAccent() { + return accent; + } + + + @JsonProperty(JSON_PROPERTY_ACCENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setAccent(@javax.annotation.Nullable Map accent) { + this.accent = accent; + } + + + public Persona conversationSpeed(@javax.annotation.Nullable Map conversationSpeed) { + this.conversationSpeed = conversationSpeed; + return this; + } + + public Persona putConversationSpeedItem(String key, Object conversationSpeedItem) { + if (this.conversationSpeed == null) { + this.conversationSpeed = new HashMap<>(); + } + this.conversationSpeed.put(key, conversationSpeedItem); + return this; + } + + /** + * List of conversation speeds (e.g., ['1.0'], ['1.25']) + * @return conversationSpeed + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConversationSpeed() { + return conversationSpeed; + } + + + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConversationSpeed(@javax.annotation.Nullable Map conversationSpeed) { + this.conversationSpeed = conversationSpeed; + } + + + public Persona backgroundSound(@javax.annotation.Nullable Boolean backgroundSound) { + this.backgroundSound = JsonNullable.of(backgroundSound); + return this; + } + + /** + * Whether background sound is enabled (null=not specified, True/False for enabled/disabled) + * @return backgroundSound + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getBackgroundSound() { + return backgroundSound.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BACKGROUND_SOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBackgroundSound_JsonNullable() { + return backgroundSound; + } + + @JsonProperty(JSON_PROPERTY_BACKGROUND_SOUND) + public void setBackgroundSound_JsonNullable(JsonNullable backgroundSound) { + this.backgroundSound = backgroundSound; + } + + public void setBackgroundSound(@javax.annotation.Nullable Boolean backgroundSound) { + this.backgroundSound = JsonNullable.of(backgroundSound); + } + + + public Persona finishedSpeakingSensitivity(@javax.annotation.Nullable Map finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + return this; + } + + public Persona putFinishedSpeakingSensitivityItem(String key, Object finishedSpeakingSensitivityItem) { + if (this.finishedSpeakingSensitivity == null) { + this.finishedSpeakingSensitivity = new HashMap<>(); + } + this.finishedSpeakingSensitivity.put(key, finishedSpeakingSensitivityItem); + return this; + } + + /** + * List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6']) + * @return finishedSpeakingSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFinishedSpeakingSensitivity() { + return finishedSpeakingSensitivity; + } + + + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setFinishedSpeakingSensitivity(@javax.annotation.Nullable Map finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + } + + + public Persona interruptSensitivity(@javax.annotation.Nullable Map interruptSensitivity) { + this.interruptSensitivity = interruptSensitivity; + return this; + } + + public Persona putInterruptSensitivityItem(String key, Object interruptSensitivityItem) { + if (this.interruptSensitivity == null) { + this.interruptSensitivity = new HashMap<>(); + } + this.interruptSensitivity.put(key, interruptSensitivityItem); + return this; + } + + /** + * List of sensitivities for allowing interruptions (e.g., ['5'], ['6']) + * @return interruptSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInterruptSensitivity() { + return interruptSensitivity; + } + + + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setInterruptSensitivity(@javax.annotation.Nullable Map interruptSensitivity) { + this.interruptSensitivity = interruptSensitivity; + } + + + public Persona keywords(@javax.annotation.Nullable Map keywords) { + this.keywords = keywords; + return this; + } + + public Persona putKeywordsItem(String key, Object keywordsItem) { + if (this.keywords == null) { + this.keywords = new HashMap<>(); + } + this.keywords.put(key, keywordsItem); + return this; + } + + /** + * List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful']) + * @return keywords + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEYWORDS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getKeywords() { + return keywords; + } + + + @JsonProperty(JSON_PROPERTY_KEYWORDS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setKeywords(@javax.annotation.Nullable Map keywords) { + this.keywords = keywords; + } + + + public Persona metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public Persona putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Additional metadata for the persona (speech clarity, base emotion, etc.) + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public Persona additionalInstruction(@javax.annotation.Nullable String additionalInstruction) { + this.additionalInstruction = JsonNullable.of(additionalInstruction); + return this; + } + + /** + * Additional instructions for how this persona should behave + * @return additionalInstruction + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAdditionalInstruction() { + return additionalInstruction.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAdditionalInstruction_JsonNullable() { + return additionalInstruction; + } + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_INSTRUCTION) + public void setAdditionalInstruction_JsonNullable(JsonNullable additionalInstruction) { + this.additionalInstruction = additionalInstruction; + } + + public void setAdditionalInstruction(@javax.annotation.Nullable String additionalInstruction) { + this.additionalInstruction = JsonNullable.of(additionalInstruction); + } + + + /** + * Whether this is a default/recommended persona + * @return isDefault + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getIsDefault() { + + if (isDefault == null) { + isDefault = JsonNullable.undefined(); + } + return isDefault.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsDefault_JsonNullable() { + return isDefault; + } + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + private void setIsDefault_JsonNullable(JsonNullable isDefault) { + this.isDefault = isDefault; + } + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + public Persona profession(@javax.annotation.Nullable List profession) { + this.profession = JsonNullable.>of(profession); + return this; + } + + public Persona addProfessionItem(String professionItem) { + if (this.profession == null || !this.profession.isPresent()) { + this.profession = JsonNullable.>of(new ArrayList<>()); + } + try { + this.profession.get().add(professionItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get profession + * @return profession + */ + @javax.annotation.Nullable + @JsonIgnore + public List getProfession() { + return profession.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROFESSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProfession_JsonNullable() { + return profession; + } + + @JsonProperty(JSON_PROPERTY_PROFESSION) + public void setProfession_JsonNullable(JsonNullable> profession) { + this.profession = profession; + } + + public void setProfession(@javax.annotation.Nullable List profession) { + this.profession = JsonNullable.>of(profession); + } + + + public Persona language(@javax.annotation.Nullable List language) { + this.language = JsonNullable.>of(language); + return this; + } + + public Persona addLanguageItem(String languageItem) { + if (this.language == null || !this.language.isPresent()) { + this.language = JsonNullable.>of(new ArrayList<>()); + } + try { + this.language.get().add(languageItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get language + * @return language + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLanguage() { + return language.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLanguage_JsonNullable() { + return language; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + public void setLanguage_JsonNullable(JsonNullable> language) { + this.language = language; + } + + public void setLanguage(@javax.annotation.Nullable List language) { + this.language = JsonNullable.>of(language); + } + + + public Persona customProperties(@javax.annotation.Nullable Map customProperties) { + this.customProperties = customProperties; + return this; + } + + public Persona putCustomPropertiesItem(String key, Object customPropertiesItem) { + if (this.customProperties == null) { + this.customProperties = new HashMap<>(); + } + this.customProperties.put(key, customPropertiesItem); + return this; + } + + /** + * Get customProperties + * @return customProperties + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_PROPERTIES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomProperties() { + return customProperties; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_PROPERTIES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomProperties(@javax.annotation.Nullable Map customProperties) { + this.customProperties = customProperties; + } + + + /** + * Type of simulation for the persona + * @return simulationType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SimulationTypeEnum getSimulationType() { + return simulationType; + } + + + + + public Persona punctuation(@javax.annotation.Nullable PunctuationEnum punctuation) { + this.punctuation = JsonNullable.of(punctuation); + return this; + } + + /** + * Punctuation style for the persona + * @return punctuation + */ + @javax.annotation.Nullable + @JsonIgnore + public PunctuationEnum getPunctuation() { + return punctuation.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PUNCTUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPunctuation_JsonNullable() { + return punctuation; + } + + @JsonProperty(JSON_PROPERTY_PUNCTUATION) + public void setPunctuation_JsonNullable(JsonNullable punctuation) { + this.punctuation = punctuation; + } + + public void setPunctuation(@javax.annotation.Nullable PunctuationEnum punctuation) { + this.punctuation = JsonNullable.of(punctuation); + } + + + public Persona slangUsage(@javax.annotation.Nullable SlangUsageEnum slangUsage) { + this.slangUsage = JsonNullable.of(slangUsage); + return this; + } + + /** + * Slang usage for the persona + * @return slangUsage + */ + @javax.annotation.Nullable + @JsonIgnore + public SlangUsageEnum getSlangUsage() { + return slangUsage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SLANG_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSlangUsage_JsonNullable() { + return slangUsage; + } + + @JsonProperty(JSON_PROPERTY_SLANG_USAGE) + public void setSlangUsage_JsonNullable(JsonNullable slangUsage) { + this.slangUsage = slangUsage; + } + + public void setSlangUsage(@javax.annotation.Nullable SlangUsageEnum slangUsage) { + this.slangUsage = JsonNullable.of(slangUsage); + } + + + public Persona typosFrequency(@javax.annotation.Nullable TyposFrequencyEnum typosFrequency) { + this.typosFrequency = JsonNullable.of(typosFrequency); + return this; + } + + /** + * Typos frequency for the persona + * @return typosFrequency + */ + @javax.annotation.Nullable + @JsonIgnore + public TyposFrequencyEnum getTyposFrequency() { + return typosFrequency.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTyposFrequency_JsonNullable() { + return typosFrequency; + } + + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY) + public void setTyposFrequency_JsonNullable(JsonNullable typosFrequency) { + this.typosFrequency = typosFrequency; + } + + public void setTyposFrequency(@javax.annotation.Nullable TyposFrequencyEnum typosFrequency) { + this.typosFrequency = JsonNullable.of(typosFrequency); + } + + + public Persona regionalMix(@javax.annotation.Nullable RegionalMixEnum regionalMix) { + this.regionalMix = JsonNullable.of(regionalMix); + return this; + } + + /** + * Regional mix for the persona + * @return regionalMix + */ + @javax.annotation.Nullable + @JsonIgnore + public RegionalMixEnum getRegionalMix() { + return regionalMix.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRegionalMix_JsonNullable() { + return regionalMix; + } + + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX) + public void setRegionalMix_JsonNullable(JsonNullable regionalMix) { + this.regionalMix = regionalMix; + } + + public void setRegionalMix(@javax.annotation.Nullable RegionalMixEnum regionalMix) { + this.regionalMix = JsonNullable.of(regionalMix); + } + + + public Persona emojiUsage(@javax.annotation.Nullable EmojiUsageEnum emojiUsage) { + this.emojiUsage = JsonNullable.of(emojiUsage); + return this; + } + + /** + * Emoji usage for the persona + * @return emojiUsage + */ + @javax.annotation.Nullable + @JsonIgnore + public EmojiUsageEnum getEmojiUsage() { + return emojiUsage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEmojiUsage_JsonNullable() { + return emojiUsage; + } + + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE) + public void setEmojiUsage_JsonNullable(JsonNullable emojiUsage) { + this.emojiUsage = emojiUsage; + } + + public void setEmojiUsage(@javax.annotation.Nullable EmojiUsageEnum emojiUsage) { + this.emojiUsage = JsonNullable.of(emojiUsage); + } + + + public Persona tone(@javax.annotation.Nullable ToneEnum tone) { + this.tone = JsonNullable.of(tone); + return this; + } + + /** + * Tone for the persona + * @return tone + */ + @javax.annotation.Nullable + @JsonIgnore + public ToneEnum getTone() { + return tone.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTone_JsonNullable() { + return tone; + } + + @JsonProperty(JSON_PROPERTY_TONE) + public void setTone_JsonNullable(JsonNullable tone) { + this.tone = tone; + } + + public void setTone(@javax.annotation.Nullable ToneEnum tone) { + this.tone = JsonNullable.of(tone); + } + + + public Persona verbosity(@javax.annotation.Nullable VerbosityEnum verbosity) { + this.verbosity = JsonNullable.of(verbosity); + return this; + } + + /** + * Verbosity for the persona + * @return verbosity + */ + @javax.annotation.Nullable + @JsonIgnore + public VerbosityEnum getVerbosity() { + return verbosity.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VERBOSITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getVerbosity_JsonNullable() { + return verbosity; + } + + @JsonProperty(JSON_PROPERTY_VERBOSITY) + public void setVerbosity_JsonNullable(JsonNullable verbosity) { + this.verbosity = verbosity; + } + + public void setVerbosity(@javax.annotation.Nullable VerbosityEnum verbosity) { + this.verbosity = JsonNullable.of(verbosity); + } + + + /** + * Return true if this Persona object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Persona persona = (Persona) o; + return Objects.equals(this.id, persona.id) && + Objects.equals(this.personaType, persona.personaType) && + Objects.equals(this.personaTypeDisplay, persona.personaTypeDisplay) && + Objects.equals(this.name, persona.name) && + equalsNullable(this.description, persona.description) && + Objects.equals(this.gender, persona.gender) && + Objects.equals(this.ageGroup, persona.ageGroup) && + Objects.equals(this.occupation, persona.occupation) && + Objects.equals(this.location, persona.location) && + Objects.equals(this.personality, persona.personality) && + Objects.equals(this.communicationStyle, persona.communicationStyle) && + equalsNullable(this.multilingual, persona.multilingual) && + Objects.equals(this.languages, persona.languages) && + Objects.equals(this.accent, persona.accent) && + Objects.equals(this.conversationSpeed, persona.conversationSpeed) && + equalsNullable(this.backgroundSound, persona.backgroundSound) && + Objects.equals(this.finishedSpeakingSensitivity, persona.finishedSpeakingSensitivity) && + Objects.equals(this.interruptSensitivity, persona.interruptSensitivity) && + Objects.equals(this.keywords, persona.keywords) && + Objects.equals(this.metadata, persona.metadata) && + equalsNullable(this.additionalInstruction, persona.additionalInstruction) && + equalsNullable(this.isDefault, persona.isDefault) && + Objects.equals(this.createdAt, persona.createdAt) && + Objects.equals(this.updatedAt, persona.updatedAt) && + equalsNullable(this.profession, persona.profession) && + equalsNullable(this.language, persona.language) && + Objects.equals(this.customProperties, persona.customProperties) && + Objects.equals(this.simulationType, persona.simulationType) && + equalsNullable(this.punctuation, persona.punctuation) && + equalsNullable(this.slangUsage, persona.slangUsage) && + equalsNullable(this.typosFrequency, persona.typosFrequency) && + equalsNullable(this.regionalMix, persona.regionalMix) && + equalsNullable(this.emojiUsage, persona.emojiUsage) && + equalsNullable(this.tone, persona.tone) && + equalsNullable(this.verbosity, persona.verbosity); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, personaType, personaTypeDisplay, name, hashCodeNullable(description), gender, ageGroup, occupation, location, personality, communicationStyle, hashCodeNullable(multilingual), languages, accent, conversationSpeed, hashCodeNullable(backgroundSound), finishedSpeakingSensitivity, interruptSensitivity, keywords, metadata, hashCodeNullable(additionalInstruction), hashCodeNullable(isDefault), createdAt, updatedAt, hashCodeNullable(profession), hashCodeNullable(language), customProperties, simulationType, hashCodeNullable(punctuation), hashCodeNullable(slangUsage), hashCodeNullable(typosFrequency), hashCodeNullable(regionalMix), hashCodeNullable(emojiUsage), hashCodeNullable(tone), hashCodeNullable(verbosity)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Persona {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" personaType: ").append(toIndentedString(personaType)).append("\n"); + sb.append(" personaTypeDisplay: ").append(toIndentedString(personaTypeDisplay)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" ageGroup: ").append(toIndentedString(ageGroup)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" personality: ").append(toIndentedString(personality)).append("\n"); + sb.append(" communicationStyle: ").append(toIndentedString(communicationStyle)).append("\n"); + sb.append(" multilingual: ").append(toIndentedString(multilingual)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" accent: ").append(toIndentedString(accent)).append("\n"); + sb.append(" conversationSpeed: ").append(toIndentedString(conversationSpeed)).append("\n"); + sb.append(" backgroundSound: ").append(toIndentedString(backgroundSound)).append("\n"); + sb.append(" finishedSpeakingSensitivity: ").append(toIndentedString(finishedSpeakingSensitivity)).append("\n"); + sb.append(" interruptSensitivity: ").append(toIndentedString(interruptSensitivity)).append("\n"); + sb.append(" keywords: ").append(toIndentedString(keywords)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" additionalInstruction: ").append(toIndentedString(additionalInstruction)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" profession: ").append(toIndentedString(profession)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" customProperties: ").append(toIndentedString(customProperties)).append("\n"); + sb.append(" simulationType: ").append(toIndentedString(simulationType)).append("\n"); + sb.append(" punctuation: ").append(toIndentedString(punctuation)).append("\n"); + sb.append(" slangUsage: ").append(toIndentedString(slangUsage)).append("\n"); + sb.append(" typosFrequency: ").append(toIndentedString(typosFrequency)).append("\n"); + sb.append(" regionalMix: ").append(toIndentedString(regionalMix)).append("\n"); + sb.append(" emojiUsage: ").append(toIndentedString(emojiUsage)).append("\n"); + sb.append(" tone: ").append(toIndentedString(tone)).append("\n"); + sb.append(" verbosity: ").append(toIndentedString(verbosity)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `persona_type` to the URL query string + if (getPersonaType() != null) { + joiner.add(String.format("%spersona_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPersonaType())))); + } + + // add `persona_type_display` to the URL query string + if (getPersonaTypeDisplay() != null) { + joiner.add(String.format("%spersona_type_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPersonaTypeDisplay())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `gender` to the URL query string + if (getGender() != null) { + for (String _key : getGender().keySet()) { + joiner.add(String.format("%sgender%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getGender().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getGender().get(_key))))); + } + } + + // add `age_group` to the URL query string + if (getAgeGroup() != null) { + for (String _key : getAgeGroup().keySet()) { + joiner.add(String.format("%sage_group%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAgeGroup().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAgeGroup().get(_key))))); + } + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + for (String _key : getOccupation().keySet()) { + joiner.add(String.format("%soccupation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOccupation().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOccupation().get(_key))))); + } + } + + // add `location` to the URL query string + if (getLocation() != null) { + for (String _key : getLocation().keySet()) { + joiner.add(String.format("%slocation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLocation().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLocation().get(_key))))); + } + } + + // add `personality` to the URL query string + if (getPersonality() != null) { + for (String _key : getPersonality().keySet()) { + joiner.add(String.format("%spersonality%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getPersonality().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getPersonality().get(_key))))); + } + } + + // add `communication_style` to the URL query string + if (getCommunicationStyle() != null) { + for (String _key : getCommunicationStyle().keySet()) { + joiner.add(String.format("%scommunication_style%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCommunicationStyle().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCommunicationStyle().get(_key))))); + } + } + + // add `multilingual` to the URL query string + if (getMultilingual() != null) { + joiner.add(String.format("%smultilingual%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultilingual())))); + } + + // add `languages` to the URL query string + if (getLanguages() != null) { + for (String _key : getLanguages().keySet()) { + joiner.add(String.format("%slanguages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLanguages().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLanguages().get(_key))))); + } + } + + // add `accent` to the URL query string + if (getAccent() != null) { + for (String _key : getAccent().keySet()) { + joiner.add(String.format("%saccent%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAccent().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAccent().get(_key))))); + } + } + + // add `conversation_speed` to the URL query string + if (getConversationSpeed() != null) { + for (String _key : getConversationSpeed().keySet()) { + joiner.add(String.format("%sconversation_speed%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConversationSpeed().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConversationSpeed().get(_key))))); + } + } + + // add `background_sound` to the URL query string + if (getBackgroundSound() != null) { + joiner.add(String.format("%sbackground_sound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBackgroundSound())))); + } + + // add `finished_speaking_sensitivity` to the URL query string + if (getFinishedSpeakingSensitivity() != null) { + for (String _key : getFinishedSpeakingSensitivity().keySet()) { + joiner.add(String.format("%sfinished_speaking_sensitivity%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFinishedSpeakingSensitivity().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFinishedSpeakingSensitivity().get(_key))))); + } + } + + // add `interrupt_sensitivity` to the URL query string + if (getInterruptSensitivity() != null) { + for (String _key : getInterruptSensitivity().keySet()) { + joiner.add(String.format("%sinterrupt_sensitivity%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInterruptSensitivity().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInterruptSensitivity().get(_key))))); + } + } + + // add `keywords` to the URL query string + if (getKeywords() != null) { + for (String _key : getKeywords().keySet()) { + joiner.add(String.format("%skeywords%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getKeywords().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getKeywords().get(_key))))); + } + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `additional_instruction` to the URL query string + if (getAdditionalInstruction() != null) { + joiner.add(String.format("%sadditional_instruction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInstruction())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `profession` to the URL query string + if (getProfession() != null) { + for (int i = 0; i < getProfession().size(); i++) { + joiner.add(String.format("%sprofession%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getProfession().get(i))))); + } + } + + // add `language` to the URL query string + if (getLanguage() != null) { + for (int i = 0; i < getLanguage().size(); i++) { + joiner.add(String.format("%slanguage%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLanguage().get(i))))); + } + } + + // add `custom_properties` to the URL query string + if (getCustomProperties() != null) { + for (String _key : getCustomProperties().keySet()) { + joiner.add(String.format("%scustom_properties%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCustomProperties().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCustomProperties().get(_key))))); + } + } + + // add `simulation_type` to the URL query string + if (getSimulationType() != null) { + joiner.add(String.format("%ssimulation_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulationType())))); + } + + // add `punctuation` to the URL query string + if (getPunctuation() != null) { + joiner.add(String.format("%spunctuation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPunctuation())))); + } + + // add `slang_usage` to the URL query string + if (getSlangUsage() != null) { + joiner.add(String.format("%sslang_usage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSlangUsage())))); + } + + // add `typos_frequency` to the URL query string + if (getTyposFrequency() != null) { + joiner.add(String.format("%stypos_frequency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTyposFrequency())))); + } + + // add `regional_mix` to the URL query string + if (getRegionalMix() != null) { + joiner.add(String.format("%sregional_mix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRegionalMix())))); + } + + // add `emoji_usage` to the URL query string + if (getEmojiUsage() != null) { + joiner.add(String.format("%semoji_usage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmojiUsage())))); + } + + // add `tone` to the URL query string + if (getTone() != null) { + joiner.add(String.format("%stone%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTone())))); + } + + // add `verbosity` to the URL query string + if (getVerbosity() != null) { + joiner.add(String.format("%sverbosity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVerbosity())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaCreate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaCreate.java new file mode 100644 index 0000000..00dc6c6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaCreate.java @@ -0,0 +1,1428 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PersonaCreate + */ +@JsonPropertyOrder({ + PersonaCreate.JSON_PROPERTY_NAME, + PersonaCreate.JSON_PROPERTY_DESCRIPTION, + PersonaCreate.JSON_PROPERTY_GENDER, + PersonaCreate.JSON_PROPERTY_AGE_GROUP, + PersonaCreate.JSON_PROPERTY_LOCATION, + PersonaCreate.JSON_PROPERTY_PROFESSION, + PersonaCreate.JSON_PROPERTY_PERSONALITY, + PersonaCreate.JSON_PROPERTY_COMMUNICATION_STYLE, + PersonaCreate.JSON_PROPERTY_ACCENT, + PersonaCreate.JSON_PROPERTY_MULTILINGUAL, + PersonaCreate.JSON_PROPERTY_LANGUAGE, + PersonaCreate.JSON_PROPERTY_CONVERSATION_SPEED, + PersonaCreate.JSON_PROPERTY_BACKGROUND_SOUND, + PersonaCreate.JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY, + PersonaCreate.JSON_PROPERTY_INTERRUPT_SENSITIVITY, + PersonaCreate.JSON_PROPERTY_KEYWORDS, + PersonaCreate.JSON_PROPERTY_CUSTOM_PROPERTIES, + PersonaCreate.JSON_PROPERTY_ADDITIONAL_INSTRUCTION, + PersonaCreate.JSON_PROPERTY_SIMULATION_TYPE, + PersonaCreate.JSON_PROPERTY_TONE, + PersonaCreate.JSON_PROPERTY_PUNCTUATION, + PersonaCreate.JSON_PROPERTY_SLANG_USAGE, + PersonaCreate.JSON_PROPERTY_TYPOS_FREQUENCY, + PersonaCreate.JSON_PROPERTY_REGIONAL_MIX, + PersonaCreate.JSON_PROPERTY_EMOJI_USAGE, + PersonaCreate.JSON_PROPERTY_VERBOSITY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PersonaCreate { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nonnull + private String description; + + public static final String JSON_PROPERTY_GENDER = "gender"; + private JsonNullable> gender = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_AGE_GROUP = "age_group"; + private JsonNullable> ageGroup = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LOCATION = "location"; + private JsonNullable> location = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PROFESSION = "profession"; + private JsonNullable> profession = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PERSONALITY = "personality"; + private JsonNullable> personality = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_COMMUNICATION_STYLE = "communication_style"; + private JsonNullable> communicationStyle = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ACCENT = "accent"; + private JsonNullable> accent = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_MULTILINGUAL = "multilingual"; + @javax.annotation.Nullable + private Boolean multilingual = false; + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private JsonNullable> language = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CONVERSATION_SPEED = "conversation_speed"; + private JsonNullable> conversationSpeed = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_BACKGROUND_SOUND = "background_sound"; + private JsonNullable backgroundSound = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY = "finished_speaking_sensitivity"; + private JsonNullable> finishedSpeakingSensitivity = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_INTERRUPT_SENSITIVITY = "interrupt_sensitivity"; + private JsonNullable> interruptSensitivity = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_KEYWORDS = "keywords"; + private JsonNullable> keywords = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CUSTOM_PROPERTIES = "custom_properties"; + @javax.annotation.Nullable + private Map customProperties = new HashMap<>(); + + public static final String JSON_PROPERTY_ADDITIONAL_INSTRUCTION = "additional_instruction"; + private JsonNullable additionalInstruction = JsonNullable.of(""); + + public static final String JSON_PROPERTY_SIMULATION_TYPE = "simulation_type"; + private JsonNullable simulationType = JsonNullable.of("voice"); + + public static final String JSON_PROPERTY_TONE = "tone"; + private JsonNullable tone = JsonNullable.of("casual"); + + public static final String JSON_PROPERTY_PUNCTUATION = "punctuation"; + private JsonNullable punctuation = JsonNullable.of("clean"); + + public static final String JSON_PROPERTY_SLANG_USAGE = "slang_usage"; + private JsonNullable slangUsage = JsonNullable.of("light"); + + public static final String JSON_PROPERTY_TYPOS_FREQUENCY = "typos_frequency"; + private JsonNullable typosFrequency = JsonNullable.of("rare"); + + public static final String JSON_PROPERTY_REGIONAL_MIX = "regional_mix"; + private JsonNullable regionalMix = JsonNullable.of("light"); + + public static final String JSON_PROPERTY_EMOJI_USAGE = "emoji_usage"; + private JsonNullable emojiUsage = JsonNullable.of("light"); + + public static final String JSON_PROPERTY_VERBOSITY = "verbosity"; + private JsonNullable verbosity = JsonNullable.of("balanced"); + + public PersonaCreate() { + } + + public PersonaCreate name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public PersonaCreate description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public PersonaCreate gender(@javax.annotation.Nullable List gender) { + this.gender = JsonNullable.>of(gender); + return this; + } + + public PersonaCreate addGenderItem(String genderItem) { + if (this.gender == null || !this.gender.isPresent()) { + this.gender = JsonNullable.>of(new ArrayList<>()); + } + try { + this.gender.get().add(genderItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get gender + * @return gender + */ + @javax.annotation.Nullable + @JsonIgnore + public List getGender() { + return gender.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_GENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getGender_JsonNullable() { + return gender; + } + + @JsonProperty(JSON_PROPERTY_GENDER) + public void setGender_JsonNullable(JsonNullable> gender) { + this.gender = gender; + } + + public void setGender(@javax.annotation.Nullable List gender) { + this.gender = JsonNullable.>of(gender); + } + + + public PersonaCreate ageGroup(@javax.annotation.Nullable List ageGroup) { + this.ageGroup = JsonNullable.>of(ageGroup); + return this; + } + + public PersonaCreate addAgeGroupItem(String ageGroupItem) { + if (this.ageGroup == null || !this.ageGroup.isPresent()) { + this.ageGroup = JsonNullable.>of(new ArrayList<>()); + } + try { + this.ageGroup.get().add(ageGroupItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get ageGroup + * @return ageGroup + */ + @javax.annotation.Nullable + @JsonIgnore + public List getAgeGroup() { + return ageGroup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGE_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAgeGroup_JsonNullable() { + return ageGroup; + } + + @JsonProperty(JSON_PROPERTY_AGE_GROUP) + public void setAgeGroup_JsonNullable(JsonNullable> ageGroup) { + this.ageGroup = ageGroup; + } + + public void setAgeGroup(@javax.annotation.Nullable List ageGroup) { + this.ageGroup = JsonNullable.>of(ageGroup); + } + + + public PersonaCreate location(@javax.annotation.Nullable List location) { + this.location = JsonNullable.>of(location); + return this; + } + + public PersonaCreate addLocationItem(String locationItem) { + if (this.location == null || !this.location.isPresent()) { + this.location = JsonNullable.>of(new ArrayList<>()); + } + try { + this.location.get().add(locationItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLocation() { + return location.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLocation_JsonNullable() { + return location; + } + + @JsonProperty(JSON_PROPERTY_LOCATION) + public void setLocation_JsonNullable(JsonNullable> location) { + this.location = location; + } + + public void setLocation(@javax.annotation.Nullable List location) { + this.location = JsonNullable.>of(location); + } + + + public PersonaCreate profession(@javax.annotation.Nullable List profession) { + this.profession = JsonNullable.>of(profession); + return this; + } + + public PersonaCreate addProfessionItem(String professionItem) { + if (this.profession == null || !this.profession.isPresent()) { + this.profession = JsonNullable.>of(new ArrayList<>()); + } + try { + this.profession.get().add(professionItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get profession + * @return profession + */ + @javax.annotation.Nullable + @JsonIgnore + public List getProfession() { + return profession.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROFESSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProfession_JsonNullable() { + return profession; + } + + @JsonProperty(JSON_PROPERTY_PROFESSION) + public void setProfession_JsonNullable(JsonNullable> profession) { + this.profession = profession; + } + + public void setProfession(@javax.annotation.Nullable List profession) { + this.profession = JsonNullable.>of(profession); + } + + + public PersonaCreate personality(@javax.annotation.Nullable List personality) { + this.personality = JsonNullable.>of(personality); + return this; + } + + public PersonaCreate addPersonalityItem(String personalityItem) { + if (this.personality == null || !this.personality.isPresent()) { + this.personality = JsonNullable.>of(new ArrayList<>()); + } + try { + this.personality.get().add(personalityItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get personality + * @return personality + */ + @javax.annotation.Nullable + @JsonIgnore + public List getPersonality() { + return personality.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PERSONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPersonality_JsonNullable() { + return personality; + } + + @JsonProperty(JSON_PROPERTY_PERSONALITY) + public void setPersonality_JsonNullable(JsonNullable> personality) { + this.personality = personality; + } + + public void setPersonality(@javax.annotation.Nullable List personality) { + this.personality = JsonNullable.>of(personality); + } + + + public PersonaCreate communicationStyle(@javax.annotation.Nullable List communicationStyle) { + this.communicationStyle = JsonNullable.>of(communicationStyle); + return this; + } + + public PersonaCreate addCommunicationStyleItem(String communicationStyleItem) { + if (this.communicationStyle == null || !this.communicationStyle.isPresent()) { + this.communicationStyle = JsonNullable.>of(new ArrayList<>()); + } + try { + this.communicationStyle.get().add(communicationStyleItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get communicationStyle + * @return communicationStyle + */ + @javax.annotation.Nullable + @JsonIgnore + public List getCommunicationStyle() { + return communicationStyle.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getCommunicationStyle_JsonNullable() { + return communicationStyle; + } + + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE) + public void setCommunicationStyle_JsonNullable(JsonNullable> communicationStyle) { + this.communicationStyle = communicationStyle; + } + + public void setCommunicationStyle(@javax.annotation.Nullable List communicationStyle) { + this.communicationStyle = JsonNullable.>of(communicationStyle); + } + + + public PersonaCreate accent(@javax.annotation.Nullable List accent) { + this.accent = JsonNullable.>of(accent); + return this; + } + + public PersonaCreate addAccentItem(String accentItem) { + if (this.accent == null || !this.accent.isPresent()) { + this.accent = JsonNullable.>of(new ArrayList<>()); + } + try { + this.accent.get().add(accentItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get accent + * @return accent + */ + @javax.annotation.Nullable + @JsonIgnore + public List getAccent() { + return accent.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACCENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAccent_JsonNullable() { + return accent; + } + + @JsonProperty(JSON_PROPERTY_ACCENT) + public void setAccent_JsonNullable(JsonNullable> accent) { + this.accent = accent; + } + + public void setAccent(@javax.annotation.Nullable List accent) { + this.accent = JsonNullable.>of(accent); + } + + + public PersonaCreate multilingual(@javax.annotation.Nullable Boolean multilingual) { + this.multilingual = multilingual; + return this; + } + + /** + * Get multilingual + * @return multilingual + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTILINGUAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMultilingual() { + return multilingual; + } + + + @JsonProperty(JSON_PROPERTY_MULTILINGUAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultilingual(@javax.annotation.Nullable Boolean multilingual) { + this.multilingual = multilingual; + } + + + public PersonaCreate language(@javax.annotation.Nullable List language) { + this.language = JsonNullable.>of(language); + return this; + } + + public PersonaCreate addLanguageItem(String languageItem) { + if (this.language == null || !this.language.isPresent()) { + this.language = JsonNullable.>of(new ArrayList<>()); + } + try { + this.language.get().add(languageItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get language + * @return language + */ + @javax.annotation.Nullable + @JsonIgnore + public List getLanguage() { + return language.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLanguage_JsonNullable() { + return language; + } + + @JsonProperty(JSON_PROPERTY_LANGUAGE) + public void setLanguage_JsonNullable(JsonNullable> language) { + this.language = language; + } + + public void setLanguage(@javax.annotation.Nullable List language) { + this.language = JsonNullable.>of(language); + } + + + public PersonaCreate conversationSpeed(@javax.annotation.Nullable List conversationSpeed) { + this.conversationSpeed = JsonNullable.>of(conversationSpeed); + return this; + } + + public PersonaCreate addConversationSpeedItem(String conversationSpeedItem) { + if (this.conversationSpeed == null || !this.conversationSpeed.isPresent()) { + this.conversationSpeed = JsonNullable.>of(new ArrayList<>()); + } + try { + this.conversationSpeed.get().add(conversationSpeedItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get conversationSpeed + * @return conversationSpeed + */ + @javax.annotation.Nullable + @JsonIgnore + public List getConversationSpeed() { + return conversationSpeed.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getConversationSpeed_JsonNullable() { + return conversationSpeed; + } + + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + public void setConversationSpeed_JsonNullable(JsonNullable> conversationSpeed) { + this.conversationSpeed = conversationSpeed; + } + + public void setConversationSpeed(@javax.annotation.Nullable List conversationSpeed) { + this.conversationSpeed = JsonNullable.>of(conversationSpeed); + } + + + public PersonaCreate backgroundSound(@javax.annotation.Nullable Boolean backgroundSound) { + this.backgroundSound = JsonNullable.of(backgroundSound); + return this; + } + + /** + * Get backgroundSound + * @return backgroundSound + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getBackgroundSound() { + return backgroundSound.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BACKGROUND_SOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBackgroundSound_JsonNullable() { + return backgroundSound; + } + + @JsonProperty(JSON_PROPERTY_BACKGROUND_SOUND) + public void setBackgroundSound_JsonNullable(JsonNullable backgroundSound) { + this.backgroundSound = backgroundSound; + } + + public void setBackgroundSound(@javax.annotation.Nullable Boolean backgroundSound) { + this.backgroundSound = JsonNullable.of(backgroundSound); + } + + + public PersonaCreate finishedSpeakingSensitivity(@javax.annotation.Nullable List finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = JsonNullable.>of(finishedSpeakingSensitivity); + return this; + } + + public PersonaCreate addFinishedSpeakingSensitivityItem(String finishedSpeakingSensitivityItem) { + if (this.finishedSpeakingSensitivity == null || !this.finishedSpeakingSensitivity.isPresent()) { + this.finishedSpeakingSensitivity = JsonNullable.>of(new ArrayList<>()); + } + try { + this.finishedSpeakingSensitivity.get().add(finishedSpeakingSensitivityItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get finishedSpeakingSensitivity + * @return finishedSpeakingSensitivity + */ + @javax.annotation.Nullable + @JsonIgnore + public List getFinishedSpeakingSensitivity() { + return finishedSpeakingSensitivity.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getFinishedSpeakingSensitivity_JsonNullable() { + return finishedSpeakingSensitivity; + } + + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + public void setFinishedSpeakingSensitivity_JsonNullable(JsonNullable> finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + } + + public void setFinishedSpeakingSensitivity(@javax.annotation.Nullable List finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = JsonNullable.>of(finishedSpeakingSensitivity); + } + + + public PersonaCreate interruptSensitivity(@javax.annotation.Nullable List interruptSensitivity) { + this.interruptSensitivity = JsonNullable.>of(interruptSensitivity); + return this; + } + + public PersonaCreate addInterruptSensitivityItem(String interruptSensitivityItem) { + if (this.interruptSensitivity == null || !this.interruptSensitivity.isPresent()) { + this.interruptSensitivity = JsonNullable.>of(new ArrayList<>()); + } + try { + this.interruptSensitivity.get().add(interruptSensitivityItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get interruptSensitivity + * @return interruptSensitivity + */ + @javax.annotation.Nullable + @JsonIgnore + public List getInterruptSensitivity() { + return interruptSensitivity.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getInterruptSensitivity_JsonNullable() { + return interruptSensitivity; + } + + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + public void setInterruptSensitivity_JsonNullable(JsonNullable> interruptSensitivity) { + this.interruptSensitivity = interruptSensitivity; + } + + public void setInterruptSensitivity(@javax.annotation.Nullable List interruptSensitivity) { + this.interruptSensitivity = JsonNullable.>of(interruptSensitivity); + } + + + public PersonaCreate keywords(@javax.annotation.Nullable List keywords) { + this.keywords = JsonNullable.>of(keywords); + return this; + } + + public PersonaCreate addKeywordsItem(String keywordsItem) { + if (this.keywords == null || !this.keywords.isPresent()) { + this.keywords = JsonNullable.>of(new ArrayList<>()); + } + try { + this.keywords.get().add(keywordsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get keywords + * @return keywords + */ + @javax.annotation.Nullable + @JsonIgnore + public List getKeywords() { + return keywords.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KEYWORDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getKeywords_JsonNullable() { + return keywords; + } + + @JsonProperty(JSON_PROPERTY_KEYWORDS) + public void setKeywords_JsonNullable(JsonNullable> keywords) { + this.keywords = keywords; + } + + public void setKeywords(@javax.annotation.Nullable List keywords) { + this.keywords = JsonNullable.>of(keywords); + } + + + public PersonaCreate customProperties(@javax.annotation.Nullable Map customProperties) { + this.customProperties = customProperties; + return this; + } + + public PersonaCreate putCustomPropertiesItem(String key, Object customPropertiesItem) { + if (this.customProperties == null) { + this.customProperties = new HashMap<>(); + } + this.customProperties.put(key, customPropertiesItem); + return this; + } + + /** + * Get customProperties + * @return customProperties + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_PROPERTIES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCustomProperties() { + return customProperties; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_PROPERTIES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomProperties(@javax.annotation.Nullable Map customProperties) { + this.customProperties = customProperties; + } + + + public PersonaCreate additionalInstruction(@javax.annotation.Nullable String additionalInstruction) { + this.additionalInstruction = JsonNullable.of(additionalInstruction); + return this; + } + + /** + * Get additionalInstruction + * @return additionalInstruction + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAdditionalInstruction() { + return additionalInstruction.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAdditionalInstruction_JsonNullable() { + return additionalInstruction; + } + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_INSTRUCTION) + public void setAdditionalInstruction_JsonNullable(JsonNullable additionalInstruction) { + this.additionalInstruction = additionalInstruction; + } + + public void setAdditionalInstruction(@javax.annotation.Nullable String additionalInstruction) { + this.additionalInstruction = JsonNullable.of(additionalInstruction); + } + + + public PersonaCreate simulationType(@javax.annotation.Nullable String simulationType) { + this.simulationType = JsonNullable.of(simulationType); + return this; + } + + /** + * Get simulationType + * @return simulationType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSimulationType() { + return simulationType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SIMULATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSimulationType_JsonNullable() { + return simulationType; + } + + @JsonProperty(JSON_PROPERTY_SIMULATION_TYPE) + public void setSimulationType_JsonNullable(JsonNullable simulationType) { + this.simulationType = simulationType; + } + + public void setSimulationType(@javax.annotation.Nullable String simulationType) { + this.simulationType = JsonNullable.of(simulationType); + } + + + public PersonaCreate tone(@javax.annotation.Nullable String tone) { + this.tone = JsonNullable.of(tone); + return this; + } + + /** + * Get tone + * @return tone + */ + @javax.annotation.Nullable + @JsonIgnore + public String getTone() { + return tone.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTone_JsonNullable() { + return tone; + } + + @JsonProperty(JSON_PROPERTY_TONE) + public void setTone_JsonNullable(JsonNullable tone) { + this.tone = tone; + } + + public void setTone(@javax.annotation.Nullable String tone) { + this.tone = JsonNullable.of(tone); + } + + + public PersonaCreate punctuation(@javax.annotation.Nullable String punctuation) { + this.punctuation = JsonNullable.of(punctuation); + return this; + } + + /** + * Get punctuation + * @return punctuation + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPunctuation() { + return punctuation.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PUNCTUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPunctuation_JsonNullable() { + return punctuation; + } + + @JsonProperty(JSON_PROPERTY_PUNCTUATION) + public void setPunctuation_JsonNullable(JsonNullable punctuation) { + this.punctuation = punctuation; + } + + public void setPunctuation(@javax.annotation.Nullable String punctuation) { + this.punctuation = JsonNullable.of(punctuation); + } + + + public PersonaCreate slangUsage(@javax.annotation.Nullable String slangUsage) { + this.slangUsage = JsonNullable.of(slangUsage); + return this; + } + + /** + * Get slangUsage + * @return slangUsage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSlangUsage() { + return slangUsage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SLANG_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSlangUsage_JsonNullable() { + return slangUsage; + } + + @JsonProperty(JSON_PROPERTY_SLANG_USAGE) + public void setSlangUsage_JsonNullable(JsonNullable slangUsage) { + this.slangUsage = slangUsage; + } + + public void setSlangUsage(@javax.annotation.Nullable String slangUsage) { + this.slangUsage = JsonNullable.of(slangUsage); + } + + + public PersonaCreate typosFrequency(@javax.annotation.Nullable String typosFrequency) { + this.typosFrequency = JsonNullable.of(typosFrequency); + return this; + } + + /** + * Get typosFrequency + * @return typosFrequency + */ + @javax.annotation.Nullable + @JsonIgnore + public String getTyposFrequency() { + return typosFrequency.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTyposFrequency_JsonNullable() { + return typosFrequency; + } + + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY) + public void setTyposFrequency_JsonNullable(JsonNullable typosFrequency) { + this.typosFrequency = typosFrequency; + } + + public void setTyposFrequency(@javax.annotation.Nullable String typosFrequency) { + this.typosFrequency = JsonNullable.of(typosFrequency); + } + + + public PersonaCreate regionalMix(@javax.annotation.Nullable String regionalMix) { + this.regionalMix = JsonNullable.of(regionalMix); + return this; + } + + /** + * Get regionalMix + * @return regionalMix + */ + @javax.annotation.Nullable + @JsonIgnore + public String getRegionalMix() { + return regionalMix.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRegionalMix_JsonNullable() { + return regionalMix; + } + + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX) + public void setRegionalMix_JsonNullable(JsonNullable regionalMix) { + this.regionalMix = regionalMix; + } + + public void setRegionalMix(@javax.annotation.Nullable String regionalMix) { + this.regionalMix = JsonNullable.of(regionalMix); + } + + + public PersonaCreate emojiUsage(@javax.annotation.Nullable String emojiUsage) { + this.emojiUsage = JsonNullable.of(emojiUsage); + return this; + } + + /** + * Get emojiUsage + * @return emojiUsage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEmojiUsage() { + return emojiUsage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEmojiUsage_JsonNullable() { + return emojiUsage; + } + + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE) + public void setEmojiUsage_JsonNullable(JsonNullable emojiUsage) { + this.emojiUsage = emojiUsage; + } + + public void setEmojiUsage(@javax.annotation.Nullable String emojiUsage) { + this.emojiUsage = JsonNullable.of(emojiUsage); + } + + + public PersonaCreate verbosity(@javax.annotation.Nullable String verbosity) { + this.verbosity = JsonNullable.of(verbosity); + return this; + } + + /** + * Get verbosity + * @return verbosity + */ + @javax.annotation.Nullable + @JsonIgnore + public String getVerbosity() { + return verbosity.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VERBOSITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getVerbosity_JsonNullable() { + return verbosity; + } + + @JsonProperty(JSON_PROPERTY_VERBOSITY) + public void setVerbosity_JsonNullable(JsonNullable verbosity) { + this.verbosity = verbosity; + } + + public void setVerbosity(@javax.annotation.Nullable String verbosity) { + this.verbosity = JsonNullable.of(verbosity); + } + + + /** + * Return true if this PersonaCreate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonaCreate personaCreate = (PersonaCreate) o; + return Objects.equals(this.name, personaCreate.name) && + Objects.equals(this.description, personaCreate.description) && + equalsNullable(this.gender, personaCreate.gender) && + equalsNullable(this.ageGroup, personaCreate.ageGroup) && + equalsNullable(this.location, personaCreate.location) && + equalsNullable(this.profession, personaCreate.profession) && + equalsNullable(this.personality, personaCreate.personality) && + equalsNullable(this.communicationStyle, personaCreate.communicationStyle) && + equalsNullable(this.accent, personaCreate.accent) && + Objects.equals(this.multilingual, personaCreate.multilingual) && + equalsNullable(this.language, personaCreate.language) && + equalsNullable(this.conversationSpeed, personaCreate.conversationSpeed) && + equalsNullable(this.backgroundSound, personaCreate.backgroundSound) && + equalsNullable(this.finishedSpeakingSensitivity, personaCreate.finishedSpeakingSensitivity) && + equalsNullable(this.interruptSensitivity, personaCreate.interruptSensitivity) && + equalsNullable(this.keywords, personaCreate.keywords) && + Objects.equals(this.customProperties, personaCreate.customProperties) && + equalsNullable(this.additionalInstruction, personaCreate.additionalInstruction) && + equalsNullable(this.simulationType, personaCreate.simulationType) && + equalsNullable(this.tone, personaCreate.tone) && + equalsNullable(this.punctuation, personaCreate.punctuation) && + equalsNullable(this.slangUsage, personaCreate.slangUsage) && + equalsNullable(this.typosFrequency, personaCreate.typosFrequency) && + equalsNullable(this.regionalMix, personaCreate.regionalMix) && + equalsNullable(this.emojiUsage, personaCreate.emojiUsage) && + equalsNullable(this.verbosity, personaCreate.verbosity); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, hashCodeNullable(gender), hashCodeNullable(ageGroup), hashCodeNullable(location), hashCodeNullable(profession), hashCodeNullable(personality), hashCodeNullable(communicationStyle), hashCodeNullable(accent), multilingual, hashCodeNullable(language), hashCodeNullable(conversationSpeed), hashCodeNullable(backgroundSound), hashCodeNullable(finishedSpeakingSensitivity), hashCodeNullable(interruptSensitivity), hashCodeNullable(keywords), customProperties, hashCodeNullable(additionalInstruction), hashCodeNullable(simulationType), hashCodeNullable(tone), hashCodeNullable(punctuation), hashCodeNullable(slangUsage), hashCodeNullable(typosFrequency), hashCodeNullable(regionalMix), hashCodeNullable(emojiUsage), hashCodeNullable(verbosity)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonaCreate {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" ageGroup: ").append(toIndentedString(ageGroup)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" profession: ").append(toIndentedString(profession)).append("\n"); + sb.append(" personality: ").append(toIndentedString(personality)).append("\n"); + sb.append(" communicationStyle: ").append(toIndentedString(communicationStyle)).append("\n"); + sb.append(" accent: ").append(toIndentedString(accent)).append("\n"); + sb.append(" multilingual: ").append(toIndentedString(multilingual)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" conversationSpeed: ").append(toIndentedString(conversationSpeed)).append("\n"); + sb.append(" backgroundSound: ").append(toIndentedString(backgroundSound)).append("\n"); + sb.append(" finishedSpeakingSensitivity: ").append(toIndentedString(finishedSpeakingSensitivity)).append("\n"); + sb.append(" interruptSensitivity: ").append(toIndentedString(interruptSensitivity)).append("\n"); + sb.append(" keywords: ").append(toIndentedString(keywords)).append("\n"); + sb.append(" customProperties: ").append(toIndentedString(customProperties)).append("\n"); + sb.append(" additionalInstruction: ").append(toIndentedString(additionalInstruction)).append("\n"); + sb.append(" simulationType: ").append(toIndentedString(simulationType)).append("\n"); + sb.append(" tone: ").append(toIndentedString(tone)).append("\n"); + sb.append(" punctuation: ").append(toIndentedString(punctuation)).append("\n"); + sb.append(" slangUsage: ").append(toIndentedString(slangUsage)).append("\n"); + sb.append(" typosFrequency: ").append(toIndentedString(typosFrequency)).append("\n"); + sb.append(" regionalMix: ").append(toIndentedString(regionalMix)).append("\n"); + sb.append(" emojiUsage: ").append(toIndentedString(emojiUsage)).append("\n"); + sb.append(" verbosity: ").append(toIndentedString(verbosity)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `gender` to the URL query string + if (getGender() != null) { + for (int i = 0; i < getGender().size(); i++) { + joiner.add(String.format("%sgender%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getGender().get(i))))); + } + } + + // add `age_group` to the URL query string + if (getAgeGroup() != null) { + for (int i = 0; i < getAgeGroup().size(); i++) { + joiner.add(String.format("%sage_group%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getAgeGroup().get(i))))); + } + } + + // add `location` to the URL query string + if (getLocation() != null) { + for (int i = 0; i < getLocation().size(); i++) { + joiner.add(String.format("%slocation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLocation().get(i))))); + } + } + + // add `profession` to the URL query string + if (getProfession() != null) { + for (int i = 0; i < getProfession().size(); i++) { + joiner.add(String.format("%sprofession%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getProfession().get(i))))); + } + } + + // add `personality` to the URL query string + if (getPersonality() != null) { + for (int i = 0; i < getPersonality().size(); i++) { + joiner.add(String.format("%spersonality%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getPersonality().get(i))))); + } + } + + // add `communication_style` to the URL query string + if (getCommunicationStyle() != null) { + for (int i = 0; i < getCommunicationStyle().size(); i++) { + joiner.add(String.format("%scommunication_style%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getCommunicationStyle().get(i))))); + } + } + + // add `accent` to the URL query string + if (getAccent() != null) { + for (int i = 0; i < getAccent().size(); i++) { + joiner.add(String.format("%saccent%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getAccent().get(i))))); + } + } + + // add `multilingual` to the URL query string + if (getMultilingual() != null) { + joiner.add(String.format("%smultilingual%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultilingual())))); + } + + // add `language` to the URL query string + if (getLanguage() != null) { + for (int i = 0; i < getLanguage().size(); i++) { + joiner.add(String.format("%slanguage%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLanguage().get(i))))); + } + } + + // add `conversation_speed` to the URL query string + if (getConversationSpeed() != null) { + for (int i = 0; i < getConversationSpeed().size(); i++) { + joiner.add(String.format("%sconversation_speed%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getConversationSpeed().get(i))))); + } + } + + // add `background_sound` to the URL query string + if (getBackgroundSound() != null) { + joiner.add(String.format("%sbackground_sound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBackgroundSound())))); + } + + // add `finished_speaking_sensitivity` to the URL query string + if (getFinishedSpeakingSensitivity() != null) { + for (int i = 0; i < getFinishedSpeakingSensitivity().size(); i++) { + joiner.add(String.format("%sfinished_speaking_sensitivity%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFinishedSpeakingSensitivity().get(i))))); + } + } + + // add `interrupt_sensitivity` to the URL query string + if (getInterruptSensitivity() != null) { + for (int i = 0; i < getInterruptSensitivity().size(); i++) { + joiner.add(String.format("%sinterrupt_sensitivity%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getInterruptSensitivity().get(i))))); + } + } + + // add `keywords` to the URL query string + if (getKeywords() != null) { + for (int i = 0; i < getKeywords().size(); i++) { + joiner.add(String.format("%skeywords%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getKeywords().get(i))))); + } + } + + // add `custom_properties` to the URL query string + if (getCustomProperties() != null) { + for (String _key : getCustomProperties().keySet()) { + joiner.add(String.format("%scustom_properties%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCustomProperties().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCustomProperties().get(_key))))); + } + } + + // add `additional_instruction` to the URL query string + if (getAdditionalInstruction() != null) { + joiner.add(String.format("%sadditional_instruction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInstruction())))); + } + + // add `simulation_type` to the URL query string + if (getSimulationType() != null) { + joiner.add(String.format("%ssimulation_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulationType())))); + } + + // add `tone` to the URL query string + if (getTone() != null) { + joiner.add(String.format("%stone%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTone())))); + } + + // add `punctuation` to the URL query string + if (getPunctuation() != null) { + joiner.add(String.format("%spunctuation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPunctuation())))); + } + + // add `slang_usage` to the URL query string + if (getSlangUsage() != null) { + joiner.add(String.format("%sslang_usage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSlangUsage())))); + } + + // add `typos_frequency` to the URL query string + if (getTyposFrequency() != null) { + joiner.add(String.format("%stypos_frequency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTyposFrequency())))); + } + + // add `regional_mix` to the URL query string + if (getRegionalMix() != null) { + joiner.add(String.format("%sregional_mix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRegionalMix())))); + } + + // add `emoji_usage` to the URL query string + if (getEmojiUsage() != null) { + joiner.add(String.format("%semoji_usage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmojiUsage())))); + } + + // add `verbosity` to the URL query string + if (getVerbosity() != null) { + joiner.add(String.format("%sverbosity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVerbosity())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateRequest.java new file mode 100644 index 0000000..14fc7af --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PersonaDuplicateRequest + */ +@JsonPropertyOrder({ + PersonaDuplicateRequest.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PersonaDuplicateRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public PersonaDuplicateRequest() { + } + + public PersonaDuplicateRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this PersonaDuplicateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonaDuplicateRequest personaDuplicateRequest = (PersonaDuplicateRequest) o; + return Objects.equals(this.name, personaDuplicateRequest.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonaDuplicateRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateResponse.java new file mode 100644 index 0000000..5c7d91f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaDuplicateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Persona; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PersonaDuplicateResponse + */ +@JsonPropertyOrder({ + PersonaDuplicateResponse.JSON_PROPERTY_STATUS, + PersonaDuplicateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PersonaDuplicateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nullable + private Persona result; + + public PersonaDuplicateResponse() { + } + + public PersonaDuplicateResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public PersonaDuplicateResponse result(@javax.annotation.Nullable Persona result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Persona getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResult(@javax.annotation.Nullable Persona result) { + this.result = result; + } + + + /** + * Return true if this PersonaDuplicateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonaDuplicateResponse personaDuplicateResponse = (PersonaDuplicateResponse) o; + return Objects.equals(this.status, personaDuplicateResponse.status) && + Objects.equals(this.result, personaDuplicateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonaDuplicateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaFieldOptions.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaFieldOptions.java new file mode 100644 index 0000000..9dd0e85 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaFieldOptions.java @@ -0,0 +1,569 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PersonaFieldOptions + */ +@JsonPropertyOrder({ + PersonaFieldOptions.JSON_PROPERTY_GENDER_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_AGE_GROUP_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_LOCATION_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_PROFESSION_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_PERSONALITY_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_COMMUNICATION_STYLE_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_ACCENT_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_LANGUAGE_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_CONVERSATION_SPEED_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_TONE_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_VERBOSITY_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_PUNCTUATION_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_EMOJI_USAGE_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_SLANG_USAGE_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_TYPOS_FREQUENCY_CHOICES, + PersonaFieldOptions.JSON_PROPERTY_REGIONAL_MIX_CHOICES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PersonaFieldOptions { + public static final String JSON_PROPERTY_GENDER_CHOICES = "gender_choices"; + @javax.annotation.Nullable + private String genderChoices; + + public static final String JSON_PROPERTY_AGE_GROUP_CHOICES = "age_group_choices"; + @javax.annotation.Nullable + private String ageGroupChoices; + + public static final String JSON_PROPERTY_LOCATION_CHOICES = "location_choices"; + @javax.annotation.Nullable + private String locationChoices; + + public static final String JSON_PROPERTY_PROFESSION_CHOICES = "profession_choices"; + @javax.annotation.Nullable + private String professionChoices; + + public static final String JSON_PROPERTY_PERSONALITY_CHOICES = "personality_choices"; + @javax.annotation.Nullable + private String personalityChoices; + + public static final String JSON_PROPERTY_COMMUNICATION_STYLE_CHOICES = "communication_style_choices"; + @javax.annotation.Nullable + private String communicationStyleChoices; + + public static final String JSON_PROPERTY_ACCENT_CHOICES = "accent_choices"; + @javax.annotation.Nullable + private String accentChoices; + + public static final String JSON_PROPERTY_LANGUAGE_CHOICES = "language_choices"; + @javax.annotation.Nullable + private String languageChoices; + + public static final String JSON_PROPERTY_CONVERSATION_SPEED_CHOICES = "conversation_speed_choices"; + @javax.annotation.Nullable + private String conversationSpeedChoices; + + public static final String JSON_PROPERTY_TONE_CHOICES = "tone_choices"; + @javax.annotation.Nullable + private String toneChoices; + + public static final String JSON_PROPERTY_VERBOSITY_CHOICES = "verbosity_choices"; + @javax.annotation.Nullable + private String verbosityChoices; + + public static final String JSON_PROPERTY_PUNCTUATION_CHOICES = "punctuation_choices"; + @javax.annotation.Nullable + private String punctuationChoices; + + public static final String JSON_PROPERTY_EMOJI_USAGE_CHOICES = "emoji_usage_choices"; + @javax.annotation.Nullable + private String emojiUsageChoices; + + public static final String JSON_PROPERTY_SLANG_USAGE_CHOICES = "slang_usage_choices"; + @javax.annotation.Nullable + private String slangUsageChoices; + + public static final String JSON_PROPERTY_TYPOS_FREQUENCY_CHOICES = "typos_frequency_choices"; + @javax.annotation.Nullable + private String typosFrequencyChoices; + + public static final String JSON_PROPERTY_REGIONAL_MIX_CHOICES = "regional_mix_choices"; + @javax.annotation.Nullable + private String regionalMixChoices; + + public PersonaFieldOptions() { + } + + @JsonCreator + public PersonaFieldOptions( + @JsonProperty(JSON_PROPERTY_GENDER_CHOICES) String genderChoices, + @JsonProperty(JSON_PROPERTY_AGE_GROUP_CHOICES) String ageGroupChoices, + @JsonProperty(JSON_PROPERTY_LOCATION_CHOICES) String locationChoices, + @JsonProperty(JSON_PROPERTY_PROFESSION_CHOICES) String professionChoices, + @JsonProperty(JSON_PROPERTY_PERSONALITY_CHOICES) String personalityChoices, + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE_CHOICES) String communicationStyleChoices, + @JsonProperty(JSON_PROPERTY_ACCENT_CHOICES) String accentChoices, + @JsonProperty(JSON_PROPERTY_LANGUAGE_CHOICES) String languageChoices, + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED_CHOICES) String conversationSpeedChoices, + @JsonProperty(JSON_PROPERTY_TONE_CHOICES) String toneChoices, + @JsonProperty(JSON_PROPERTY_VERBOSITY_CHOICES) String verbosityChoices, + @JsonProperty(JSON_PROPERTY_PUNCTUATION_CHOICES) String punctuationChoices, + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE_CHOICES) String emojiUsageChoices, + @JsonProperty(JSON_PROPERTY_SLANG_USAGE_CHOICES) String slangUsageChoices, + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY_CHOICES) String typosFrequencyChoices, + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX_CHOICES) String regionalMixChoices + ) { + this(); + this.genderChoices = genderChoices; + this.ageGroupChoices = ageGroupChoices; + this.locationChoices = locationChoices; + this.professionChoices = professionChoices; + this.personalityChoices = personalityChoices; + this.communicationStyleChoices = communicationStyleChoices; + this.accentChoices = accentChoices; + this.languageChoices = languageChoices; + this.conversationSpeedChoices = conversationSpeedChoices; + this.toneChoices = toneChoices; + this.verbosityChoices = verbosityChoices; + this.punctuationChoices = punctuationChoices; + this.emojiUsageChoices = emojiUsageChoices; + this.slangUsageChoices = slangUsageChoices; + this.typosFrequencyChoices = typosFrequencyChoices; + this.regionalMixChoices = regionalMixChoices; + } + + /** + * Get genderChoices + * @return genderChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GENDER_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGenderChoices() { + return genderChoices; + } + + + + + /** + * Get ageGroupChoices + * @return ageGroupChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGE_GROUP_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgeGroupChoices() { + return ageGroupChoices; + } + + + + + /** + * Get locationChoices + * @return locationChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLocationChoices() { + return locationChoices; + } + + + + + /** + * Get professionChoices + * @return professionChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFESSION_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProfessionChoices() { + return professionChoices; + } + + + + + /** + * Get personalityChoices + * @return personalityChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONALITY_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPersonalityChoices() { + return personalityChoices; + } + + + + + /** + * Get communicationStyleChoices + * @return communicationStyleChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCommunicationStyleChoices() { + return communicationStyleChoices; + } + + + + + /** + * Get accentChoices + * @return accentChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCENT_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccentChoices() { + return accentChoices; + } + + + + + /** + * Get languageChoices + * @return languageChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguageChoices() { + return languageChoices; + } + + + + + /** + * Get conversationSpeedChoices + * @return conversationSpeedChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getConversationSpeedChoices() { + return conversationSpeedChoices; + } + + + + + /** + * Get toneChoices + * @return toneChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TONE_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getToneChoices() { + return toneChoices; + } + + + + + /** + * Get verbosityChoices + * @return verbosityChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERBOSITY_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVerbosityChoices() { + return verbosityChoices; + } + + + + + /** + * Get punctuationChoices + * @return punctuationChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUNCTUATION_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPunctuationChoices() { + return punctuationChoices; + } + + + + + /** + * Get emojiUsageChoices + * @return emojiUsageChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmojiUsageChoices() { + return emojiUsageChoices; + } + + + + + /** + * Get slangUsageChoices + * @return slangUsageChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLANG_USAGE_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSlangUsageChoices() { + return slangUsageChoices; + } + + + + + /** + * Get typosFrequencyChoices + * @return typosFrequencyChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTyposFrequencyChoices() { + return typosFrequencyChoices; + } + + + + + /** + * Get regionalMixChoices + * @return regionalMixChoices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRegionalMixChoices() { + return regionalMixChoices; + } + + + + + /** + * Return true if this PersonaFieldOptions object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonaFieldOptions personaFieldOptions = (PersonaFieldOptions) o; + return Objects.equals(this.genderChoices, personaFieldOptions.genderChoices) && + Objects.equals(this.ageGroupChoices, personaFieldOptions.ageGroupChoices) && + Objects.equals(this.locationChoices, personaFieldOptions.locationChoices) && + Objects.equals(this.professionChoices, personaFieldOptions.professionChoices) && + Objects.equals(this.personalityChoices, personaFieldOptions.personalityChoices) && + Objects.equals(this.communicationStyleChoices, personaFieldOptions.communicationStyleChoices) && + Objects.equals(this.accentChoices, personaFieldOptions.accentChoices) && + Objects.equals(this.languageChoices, personaFieldOptions.languageChoices) && + Objects.equals(this.conversationSpeedChoices, personaFieldOptions.conversationSpeedChoices) && + Objects.equals(this.toneChoices, personaFieldOptions.toneChoices) && + Objects.equals(this.verbosityChoices, personaFieldOptions.verbosityChoices) && + Objects.equals(this.punctuationChoices, personaFieldOptions.punctuationChoices) && + Objects.equals(this.emojiUsageChoices, personaFieldOptions.emojiUsageChoices) && + Objects.equals(this.slangUsageChoices, personaFieldOptions.slangUsageChoices) && + Objects.equals(this.typosFrequencyChoices, personaFieldOptions.typosFrequencyChoices) && + Objects.equals(this.regionalMixChoices, personaFieldOptions.regionalMixChoices); + } + + @Override + public int hashCode() { + return Objects.hash(genderChoices, ageGroupChoices, locationChoices, professionChoices, personalityChoices, communicationStyleChoices, accentChoices, languageChoices, conversationSpeedChoices, toneChoices, verbosityChoices, punctuationChoices, emojiUsageChoices, slangUsageChoices, typosFrequencyChoices, regionalMixChoices); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonaFieldOptions {\n"); + sb.append(" genderChoices: ").append(toIndentedString(genderChoices)).append("\n"); + sb.append(" ageGroupChoices: ").append(toIndentedString(ageGroupChoices)).append("\n"); + sb.append(" locationChoices: ").append(toIndentedString(locationChoices)).append("\n"); + sb.append(" professionChoices: ").append(toIndentedString(professionChoices)).append("\n"); + sb.append(" personalityChoices: ").append(toIndentedString(personalityChoices)).append("\n"); + sb.append(" communicationStyleChoices: ").append(toIndentedString(communicationStyleChoices)).append("\n"); + sb.append(" accentChoices: ").append(toIndentedString(accentChoices)).append("\n"); + sb.append(" languageChoices: ").append(toIndentedString(languageChoices)).append("\n"); + sb.append(" conversationSpeedChoices: ").append(toIndentedString(conversationSpeedChoices)).append("\n"); + sb.append(" toneChoices: ").append(toIndentedString(toneChoices)).append("\n"); + sb.append(" verbosityChoices: ").append(toIndentedString(verbosityChoices)).append("\n"); + sb.append(" punctuationChoices: ").append(toIndentedString(punctuationChoices)).append("\n"); + sb.append(" emojiUsageChoices: ").append(toIndentedString(emojiUsageChoices)).append("\n"); + sb.append(" slangUsageChoices: ").append(toIndentedString(slangUsageChoices)).append("\n"); + sb.append(" typosFrequencyChoices: ").append(toIndentedString(typosFrequencyChoices)).append("\n"); + sb.append(" regionalMixChoices: ").append(toIndentedString(regionalMixChoices)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `gender_choices` to the URL query string + if (getGenderChoices() != null) { + joiner.add(String.format("%sgender_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGenderChoices())))); + } + + // add `age_group_choices` to the URL query string + if (getAgeGroupChoices() != null) { + joiner.add(String.format("%sage_group_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgeGroupChoices())))); + } + + // add `location_choices` to the URL query string + if (getLocationChoices() != null) { + joiner.add(String.format("%slocation_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLocationChoices())))); + } + + // add `profession_choices` to the URL query string + if (getProfessionChoices() != null) { + joiner.add(String.format("%sprofession_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProfessionChoices())))); + } + + // add `personality_choices` to the URL query string + if (getPersonalityChoices() != null) { + joiner.add(String.format("%spersonality_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPersonalityChoices())))); + } + + // add `communication_style_choices` to the URL query string + if (getCommunicationStyleChoices() != null) { + joiner.add(String.format("%scommunication_style_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCommunicationStyleChoices())))); + } + + // add `accent_choices` to the URL query string + if (getAccentChoices() != null) { + joiner.add(String.format("%saccent_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAccentChoices())))); + } + + // add `language_choices` to the URL query string + if (getLanguageChoices() != null) { + joiner.add(String.format("%slanguage_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguageChoices())))); + } + + // add `conversation_speed_choices` to the URL query string + if (getConversationSpeedChoices() != null) { + joiner.add(String.format("%sconversation_speed_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConversationSpeedChoices())))); + } + + // add `tone_choices` to the URL query string + if (getToneChoices() != null) { + joiner.add(String.format("%stone_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getToneChoices())))); + } + + // add `verbosity_choices` to the URL query string + if (getVerbosityChoices() != null) { + joiner.add(String.format("%sverbosity_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVerbosityChoices())))); + } + + // add `punctuation_choices` to the URL query string + if (getPunctuationChoices() != null) { + joiner.add(String.format("%spunctuation_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPunctuationChoices())))); + } + + // add `emoji_usage_choices` to the URL query string + if (getEmojiUsageChoices() != null) { + joiner.add(String.format("%semoji_usage_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmojiUsageChoices())))); + } + + // add `slang_usage_choices` to the URL query string + if (getSlangUsageChoices() != null) { + joiner.add(String.format("%sslang_usage_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSlangUsageChoices())))); + } + + // add `typos_frequency_choices` to the URL query string + if (getTyposFrequencyChoices() != null) { + joiner.add(String.format("%stypos_frequency_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTyposFrequencyChoices())))); + } + + // add `regional_mix_choices` to the URL query string + if (getRegionalMixChoices() != null) { + joiner.add(String.format("%sregional_mix_choices%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRegionalMixChoices())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaList.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaList.java new file mode 100644 index 0000000..1ede1e2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PersonaList.java @@ -0,0 +1,1548 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PersonaList + */ +@JsonPropertyOrder({ + PersonaList.JSON_PROPERTY_ID, + PersonaList.JSON_PROPERTY_PERSONA_TYPE, + PersonaList.JSON_PROPERTY_PERSONA_TYPE_DISPLAY, + PersonaList.JSON_PROPERTY_NAME, + PersonaList.JSON_PROPERTY_DESCRIPTION, + PersonaList.JSON_PROPERTY_GENDER, + PersonaList.JSON_PROPERTY_AGE_GROUP, + PersonaList.JSON_PROPERTY_OCCUPATION, + PersonaList.JSON_PROPERTY_LOCATION, + PersonaList.JSON_PROPERTY_PERSONALITY, + PersonaList.JSON_PROPERTY_COMMUNICATION_STYLE, + PersonaList.JSON_PROPERTY_MULTILINGUAL, + PersonaList.JSON_PROPERTY_LANGUAGES, + PersonaList.JSON_PROPERTY_ACCENT, + PersonaList.JSON_PROPERTY_CONVERSATION_SPEED, + PersonaList.JSON_PROPERTY_BACKGROUND_SOUND, + PersonaList.JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY, + PersonaList.JSON_PROPERTY_INTERRUPT_SENSITIVITY, + PersonaList.JSON_PROPERTY_KEYWORDS, + PersonaList.JSON_PROPERTY_METADATA, + PersonaList.JSON_PROPERTY_ADDITIONAL_INSTRUCTION, + PersonaList.JSON_PROPERTY_IS_DEFAULT, + PersonaList.JSON_PROPERTY_CREATED_AT, + PersonaList.JSON_PROPERTY_UPDATED_AT, + PersonaList.JSON_PROPERTY_SIMULATION_TYPE, + PersonaList.JSON_PROPERTY_PUNCTUATION, + PersonaList.JSON_PROPERTY_SLANG_USAGE, + PersonaList.JSON_PROPERTY_TYPOS_FREQUENCY, + PersonaList.JSON_PROPERTY_REGIONAL_MIX, + PersonaList.JSON_PROPERTY_EMOJI_USAGE, + PersonaList.JSON_PROPERTY_TONE, + PersonaList.JSON_PROPERTY_VERBOSITY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PersonaList { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + /** + * Type of persona (system or workspace-level) + */ + public enum PersonaTypeEnum { + SYSTEM(String.valueOf("system")), + + WORKSPACE(String.valueOf("workspace")); + + private String value; + + PersonaTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PersonaTypeEnum fromValue(String value) { + for (PersonaTypeEnum b : PersonaTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PERSONA_TYPE = "persona_type"; + @javax.annotation.Nullable + private PersonaTypeEnum personaType; + + public static final String JSON_PROPERTY_PERSONA_TYPE_DISPLAY = "persona_type_display"; + @javax.annotation.Nullable + private String personaTypeDisplay; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_GENDER = "gender"; + @javax.annotation.Nullable + private Map gender = new HashMap<>(); + + public static final String JSON_PROPERTY_AGE_GROUP = "age_group"; + @javax.annotation.Nullable + private Map ageGroup = new HashMap<>(); + + public static final String JSON_PROPERTY_OCCUPATION = "occupation"; + @javax.annotation.Nullable + private Map occupation = new HashMap<>(); + + public static final String JSON_PROPERTY_LOCATION = "location"; + @javax.annotation.Nullable + private Map location = new HashMap<>(); + + public static final String JSON_PROPERTY_PERSONALITY = "personality"; + @javax.annotation.Nullable + private Map personality = new HashMap<>(); + + public static final String JSON_PROPERTY_COMMUNICATION_STYLE = "communication_style"; + @javax.annotation.Nullable + private Map communicationStyle = new HashMap<>(); + + public static final String JSON_PROPERTY_MULTILINGUAL = "multilingual"; + private JsonNullable multilingual = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LANGUAGES = "languages"; + @javax.annotation.Nullable + private Map languages = new HashMap<>(); + + public static final String JSON_PROPERTY_ACCENT = "accent"; + @javax.annotation.Nullable + private Map accent = new HashMap<>(); + + public static final String JSON_PROPERTY_CONVERSATION_SPEED = "conversation_speed"; + @javax.annotation.Nullable + private Map conversationSpeed = new HashMap<>(); + + public static final String JSON_PROPERTY_BACKGROUND_SOUND = "background_sound"; + private JsonNullable backgroundSound = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY = "finished_speaking_sensitivity"; + @javax.annotation.Nullable + private Map finishedSpeakingSensitivity = new HashMap<>(); + + public static final String JSON_PROPERTY_INTERRUPT_SENSITIVITY = "interrupt_sensitivity"; + @javax.annotation.Nullable + private Map interruptSensitivity = new HashMap<>(); + + public static final String JSON_PROPERTY_KEYWORDS = "keywords"; + @javax.annotation.Nullable + private Map keywords = new HashMap<>(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_ADDITIONAL_INSTRUCTION = "additional_instruction"; + private JsonNullable additionalInstruction = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + private JsonNullable isDefault = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_SIMULATION_TYPE = "simulation_type"; + @javax.annotation.Nullable + private String simulationType; + + /** + * Punctuation style for the persona + */ + public enum PunctuationEnum { + CLEAN(String.valueOf("clean")), + + MINIMAL(String.valueOf("minimal")), + + EXPRESSIVE(String.valueOf("expressive")), + + ERRATIC(String.valueOf("erratic")); + + private String value; + + PunctuationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PunctuationEnum fromValue(String value) { + for (PunctuationEnum b : PunctuationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_PUNCTUATION = "punctuation"; + private JsonNullable punctuation = JsonNullable.undefined(); + + /** + * Slang usage for the persona + */ + public enum SlangUsageEnum { + NONE(String.valueOf("none")), + + MODERATE(String.valueOf("moderate")), + + HEAVY(String.valueOf("heavy")), + + LIGHT(String.valueOf("light")); + + private String value; + + SlangUsageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SlangUsageEnum fromValue(String value) { + for (SlangUsageEnum b : SlangUsageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_SLANG_USAGE = "slang_usage"; + private JsonNullable slangUsage = JsonNullable.undefined(); + + /** + * Typos frequency for the persona + */ + public enum TyposFrequencyEnum { + NONE(String.valueOf("none")), + + RARE(String.valueOf("rare")), + + OCCASIONAL(String.valueOf("occasional")), + + FREQUENT(String.valueOf("frequent")); + + private String value; + + TyposFrequencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TyposFrequencyEnum fromValue(String value) { + for (TyposFrequencyEnum b : TyposFrequencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPOS_FREQUENCY = "typos_frequency"; + private JsonNullable typosFrequency = JsonNullable.undefined(); + + /** + * Regional mix for the persona + */ + public enum RegionalMixEnum { + NONE(String.valueOf("none")), + + MODERATE(String.valueOf("moderate")), + + HEAVY(String.valueOf("heavy")), + + LIGHT(String.valueOf("light")); + + private String value; + + RegionalMixEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RegionalMixEnum fromValue(String value) { + for (RegionalMixEnum b : RegionalMixEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_REGIONAL_MIX = "regional_mix"; + private JsonNullable regionalMix = JsonNullable.undefined(); + + /** + * Emoji usage for the persona + */ + public enum EmojiUsageEnum { + NEVER(String.valueOf("never")), + + LIGHT(String.valueOf("light")), + + REGULAR(String.valueOf("regular")), + + HEAVY(String.valueOf("heavy")); + + private String value; + + EmojiUsageEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EmojiUsageEnum fromValue(String value) { + for (EmojiUsageEnum b : EmojiUsageEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_EMOJI_USAGE = "emoji_usage"; + private JsonNullable emojiUsage = JsonNullable.undefined(); + + /** + * Tone for the persona + */ + public enum ToneEnum { + FORMAL(String.valueOf("formal")), + + CASUAL(String.valueOf("casual")), + + NEUTRAL(String.valueOf("neutral")); + + private String value; + + ToneEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToneEnum fromValue(String value) { + for (ToneEnum b : ToneEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TONE = "tone"; + private JsonNullable tone = JsonNullable.undefined(); + + /** + * Verbosity for the persona + */ + public enum VerbosityEnum { + BRIEF(String.valueOf("brief")), + + BALANCED(String.valueOf("balanced")), + + DETAILED(String.valueOf("detailed")); + + private String value; + + VerbosityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VerbosityEnum fromValue(String value) { + for (VerbosityEnum b : VerbosityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_VERBOSITY = "verbosity"; + private JsonNullable verbosity = JsonNullable.undefined(); + + public PersonaList() { + } + + @JsonCreator + public PersonaList( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE) PersonaTypeEnum personaType, + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE_DISPLAY) String personaTypeDisplay, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_GENDER) Map gender, + @JsonProperty(JSON_PROPERTY_AGE_GROUP) Map ageGroup, + @JsonProperty(JSON_PROPERTY_OCCUPATION) Map occupation, + @JsonProperty(JSON_PROPERTY_LOCATION) Map location, + @JsonProperty(JSON_PROPERTY_PERSONALITY) Map personality, + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE) Map communicationStyle, + @JsonProperty(JSON_PROPERTY_MULTILINGUAL) Boolean multilingual, + @JsonProperty(JSON_PROPERTY_LANGUAGES) Map languages, + @JsonProperty(JSON_PROPERTY_ACCENT) Map accent, + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) Map conversationSpeed, + @JsonProperty(JSON_PROPERTY_BACKGROUND_SOUND) Boolean backgroundSound, + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) Map finishedSpeakingSensitivity, + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) Map interruptSensitivity, + @JsonProperty(JSON_PROPERTY_KEYWORDS) Map keywords, + @JsonProperty(JSON_PROPERTY_METADATA) Map metadata, + @JsonProperty(JSON_PROPERTY_ADDITIONAL_INSTRUCTION) String additionalInstruction, + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) Boolean isDefault, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_SIMULATION_TYPE) String simulationType, + @JsonProperty(JSON_PROPERTY_PUNCTUATION) PunctuationEnum punctuation, + @JsonProperty(JSON_PROPERTY_SLANG_USAGE) SlangUsageEnum slangUsage, + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY) TyposFrequencyEnum typosFrequency, + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX) RegionalMixEnum regionalMix, + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE) EmojiUsageEnum emojiUsage, + @JsonProperty(JSON_PROPERTY_TONE) ToneEnum tone, + @JsonProperty(JSON_PROPERTY_VERBOSITY) VerbosityEnum verbosity + ) { + this(); + this.id = id; + this.personaType = personaType; + this.personaTypeDisplay = personaTypeDisplay; + this.name = name; + this.description = description == null ? JsonNullable.undefined() : JsonNullable.of(description); + this.gender = gender; + this.ageGroup = ageGroup; + this.occupation = occupation; + this.location = location; + this.personality = personality; + this.communicationStyle = communicationStyle; + this.multilingual = multilingual == null ? JsonNullable.undefined() : JsonNullable.of(multilingual); + this.languages = languages; + this.accent = accent; + this.conversationSpeed = conversationSpeed; + this.backgroundSound = backgroundSound == null ? JsonNullable.undefined() : JsonNullable.of(backgroundSound); + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + this.interruptSensitivity = interruptSensitivity; + this.keywords = keywords; + this.metadata = metadata; + this.additionalInstruction = additionalInstruction == null ? JsonNullable.undefined() : JsonNullable.of(additionalInstruction); + this.isDefault = isDefault == null ? JsonNullable.undefined() : JsonNullable.of(isDefault); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.simulationType = simulationType; + this.punctuation = punctuation == null ? JsonNullable.undefined() : JsonNullable.of(punctuation); + this.slangUsage = slangUsage == null ? JsonNullable.undefined() : JsonNullable.of(slangUsage); + this.typosFrequency = typosFrequency == null ? JsonNullable.undefined() : JsonNullable.of(typosFrequency); + this.regionalMix = regionalMix == null ? JsonNullable.undefined() : JsonNullable.of(regionalMix); + this.emojiUsage = emojiUsage == null ? JsonNullable.undefined() : JsonNullable.of(emojiUsage); + this.tone = tone == null ? JsonNullable.undefined() : JsonNullable.of(tone); + this.verbosity = verbosity == null ? JsonNullable.undefined() : JsonNullable.of(verbosity); + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Type of persona (system or workspace-level) + * @return personaType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PersonaTypeEnum getPersonaType() { + return personaType; + } + + + + + /** + * Get personaTypeDisplay + * @return personaTypeDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONA_TYPE_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPersonaTypeDisplay() { + return personaTypeDisplay; + } + + + + + /** + * Name of the persona + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Description of the persona + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + + if (description == null) { + description = JsonNullable.undefined(); + } + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + private void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + + + /** + * List of genders for the persona (e.g., ['male'], ['female']) + * @return gender + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GENDER) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getGender() { + return gender; + } + + + + + /** + * List of age groups for the persona (e.g., ['18-25'], ['25-32']) + * @return ageGroup + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGE_GROUP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAgeGroup() { + return ageGroup; + } + + + + + /** + * List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher']) + * @return occupation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCUPATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOccupation() { + return occupation; + } + + + + + /** + * List of locations for the persona (e.g., ['United States'], ['Canada']) + * @return location + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLocation() { + return location; + } + + + + + /** + * List of personality types for the persona (e.g., ['Friendly and cooperative']) + * @return personality + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONALITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPersonality() { + return personality; + } + + + + + /** + * List of communication styles for the persona (e.g., ['Direct and concise']) + * @return communicationStyle + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMUNICATION_STYLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCommunicationStyle() { + return communicationStyle; + } + + + + + /** + * Whether the persona supports multiple languages + * @return multilingual + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getMultilingual() { + + if (multilingual == null) { + multilingual = JsonNullable.undefined(); + } + return multilingual.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MULTILINGUAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMultilingual_JsonNullable() { + return multilingual; + } + + @JsonProperty(JSON_PROPERTY_MULTILINGUAL) + private void setMultilingual_JsonNullable(JsonNullable multilingual) { + this.multilingual = multilingual; + } + + + + /** + * List of languages the persona speaks (e.g., ['English', 'Hindi']) + * @return languages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLanguages() { + return languages; + } + + + + + /** + * List of accents for the persona (e.g., ['American'], ['Australian']) + * @return accent + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAccent() { + return accent; + } + + + + + /** + * List of conversation speeds (e.g., ['1.0'], ['1.25']) + * @return conversationSpeed + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConversationSpeed() { + return conversationSpeed; + } + + + + + /** + * Whether background sound is enabled (null=not specified, True/False for enabled/disabled) + * @return backgroundSound + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getBackgroundSound() { + + if (backgroundSound == null) { + backgroundSound = JsonNullable.undefined(); + } + return backgroundSound.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BACKGROUND_SOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBackgroundSound_JsonNullable() { + return backgroundSound; + } + + @JsonProperty(JSON_PROPERTY_BACKGROUND_SOUND) + private void setBackgroundSound_JsonNullable(JsonNullable backgroundSound) { + this.backgroundSound = backgroundSound; + } + + + + /** + * List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6']) + * @return finishedSpeakingSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFinishedSpeakingSensitivity() { + return finishedSpeakingSensitivity; + } + + + + + /** + * List of sensitivities for allowing interruptions (e.g., ['5'], ['6']) + * @return interruptSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInterruptSensitivity() { + return interruptSensitivity; + } + + + + + /** + * List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful']) + * @return keywords + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEYWORDS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getKeywords() { + return keywords; + } + + + + + /** + * Additional metadata for the persona (speech clarity, base emotion, etc.) + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + + + /** + * Additional instructions for how this persona should behave + * @return additionalInstruction + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAdditionalInstruction() { + + if (additionalInstruction == null) { + additionalInstruction = JsonNullable.undefined(); + } + return additionalInstruction.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAdditionalInstruction_JsonNullable() { + return additionalInstruction; + } + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_INSTRUCTION) + private void setAdditionalInstruction_JsonNullable(JsonNullable additionalInstruction) { + this.additionalInstruction = additionalInstruction; + } + + + + /** + * Whether this is a default/recommended persona + * @return isDefault + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getIsDefault() { + + if (isDefault == null) { + isDefault = JsonNullable.undefined(); + } + return isDefault.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsDefault_JsonNullable() { + return isDefault; + } + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + private void setIsDefault_JsonNullable(JsonNullable isDefault) { + this.isDefault = isDefault; + } + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Get simulationType + * @return simulationType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSimulationType() { + return simulationType; + } + + + + + /** + * Punctuation style for the persona + * @return punctuation + */ + @javax.annotation.Nullable + @JsonIgnore + public PunctuationEnum getPunctuation() { + + if (punctuation == null) { + punctuation = JsonNullable.undefined(); + } + return punctuation.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PUNCTUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPunctuation_JsonNullable() { + return punctuation; + } + + @JsonProperty(JSON_PROPERTY_PUNCTUATION) + private void setPunctuation_JsonNullable(JsonNullable punctuation) { + this.punctuation = punctuation; + } + + + + /** + * Slang usage for the persona + * @return slangUsage + */ + @javax.annotation.Nullable + @JsonIgnore + public SlangUsageEnum getSlangUsage() { + + if (slangUsage == null) { + slangUsage = JsonNullable.undefined(); + } + return slangUsage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SLANG_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSlangUsage_JsonNullable() { + return slangUsage; + } + + @JsonProperty(JSON_PROPERTY_SLANG_USAGE) + private void setSlangUsage_JsonNullable(JsonNullable slangUsage) { + this.slangUsage = slangUsage; + } + + + + /** + * Typos frequency for the persona + * @return typosFrequency + */ + @javax.annotation.Nullable + @JsonIgnore + public TyposFrequencyEnum getTyposFrequency() { + + if (typosFrequency == null) { + typosFrequency = JsonNullable.undefined(); + } + return typosFrequency.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTyposFrequency_JsonNullable() { + return typosFrequency; + } + + @JsonProperty(JSON_PROPERTY_TYPOS_FREQUENCY) + private void setTyposFrequency_JsonNullable(JsonNullable typosFrequency) { + this.typosFrequency = typosFrequency; + } + + + + /** + * Regional mix for the persona + * @return regionalMix + */ + @javax.annotation.Nullable + @JsonIgnore + public RegionalMixEnum getRegionalMix() { + + if (regionalMix == null) { + regionalMix = JsonNullable.undefined(); + } + return regionalMix.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRegionalMix_JsonNullable() { + return regionalMix; + } + + @JsonProperty(JSON_PROPERTY_REGIONAL_MIX) + private void setRegionalMix_JsonNullable(JsonNullable regionalMix) { + this.regionalMix = regionalMix; + } + + + + /** + * Emoji usage for the persona + * @return emojiUsage + */ + @javax.annotation.Nullable + @JsonIgnore + public EmojiUsageEnum getEmojiUsage() { + + if (emojiUsage == null) { + emojiUsage = JsonNullable.undefined(); + } + return emojiUsage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEmojiUsage_JsonNullable() { + return emojiUsage; + } + + @JsonProperty(JSON_PROPERTY_EMOJI_USAGE) + private void setEmojiUsage_JsonNullable(JsonNullable emojiUsage) { + this.emojiUsage = emojiUsage; + } + + + + /** + * Tone for the persona + * @return tone + */ + @javax.annotation.Nullable + @JsonIgnore + public ToneEnum getTone() { + + if (tone == null) { + tone = JsonNullable.undefined(); + } + return tone.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTone_JsonNullable() { + return tone; + } + + @JsonProperty(JSON_PROPERTY_TONE) + private void setTone_JsonNullable(JsonNullable tone) { + this.tone = tone; + } + + + + /** + * Verbosity for the persona + * @return verbosity + */ + @javax.annotation.Nullable + @JsonIgnore + public VerbosityEnum getVerbosity() { + + if (verbosity == null) { + verbosity = JsonNullable.undefined(); + } + return verbosity.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VERBOSITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getVerbosity_JsonNullable() { + return verbosity; + } + + @JsonProperty(JSON_PROPERTY_VERBOSITY) + private void setVerbosity_JsonNullable(JsonNullable verbosity) { + this.verbosity = verbosity; + } + + + + /** + * Return true if this PersonaList object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonaList personaList = (PersonaList) o; + return Objects.equals(this.id, personaList.id) && + Objects.equals(this.personaType, personaList.personaType) && + Objects.equals(this.personaTypeDisplay, personaList.personaTypeDisplay) && + Objects.equals(this.name, personaList.name) && + equalsNullable(this.description, personaList.description) && + Objects.equals(this.gender, personaList.gender) && + Objects.equals(this.ageGroup, personaList.ageGroup) && + Objects.equals(this.occupation, personaList.occupation) && + Objects.equals(this.location, personaList.location) && + Objects.equals(this.personality, personaList.personality) && + Objects.equals(this.communicationStyle, personaList.communicationStyle) && + equalsNullable(this.multilingual, personaList.multilingual) && + Objects.equals(this.languages, personaList.languages) && + Objects.equals(this.accent, personaList.accent) && + Objects.equals(this.conversationSpeed, personaList.conversationSpeed) && + equalsNullable(this.backgroundSound, personaList.backgroundSound) && + Objects.equals(this.finishedSpeakingSensitivity, personaList.finishedSpeakingSensitivity) && + Objects.equals(this.interruptSensitivity, personaList.interruptSensitivity) && + Objects.equals(this.keywords, personaList.keywords) && + Objects.equals(this.metadata, personaList.metadata) && + equalsNullable(this.additionalInstruction, personaList.additionalInstruction) && + equalsNullable(this.isDefault, personaList.isDefault) && + Objects.equals(this.createdAt, personaList.createdAt) && + Objects.equals(this.updatedAt, personaList.updatedAt) && + Objects.equals(this.simulationType, personaList.simulationType) && + equalsNullable(this.punctuation, personaList.punctuation) && + equalsNullable(this.slangUsage, personaList.slangUsage) && + equalsNullable(this.typosFrequency, personaList.typosFrequency) && + equalsNullable(this.regionalMix, personaList.regionalMix) && + equalsNullable(this.emojiUsage, personaList.emojiUsage) && + equalsNullable(this.tone, personaList.tone) && + equalsNullable(this.verbosity, personaList.verbosity); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, personaType, personaTypeDisplay, name, hashCodeNullable(description), gender, ageGroup, occupation, location, personality, communicationStyle, hashCodeNullable(multilingual), languages, accent, conversationSpeed, hashCodeNullable(backgroundSound), finishedSpeakingSensitivity, interruptSensitivity, keywords, metadata, hashCodeNullable(additionalInstruction), hashCodeNullable(isDefault), createdAt, updatedAt, simulationType, hashCodeNullable(punctuation), hashCodeNullable(slangUsage), hashCodeNullable(typosFrequency), hashCodeNullable(regionalMix), hashCodeNullable(emojiUsage), hashCodeNullable(tone), hashCodeNullable(verbosity)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonaList {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" personaType: ").append(toIndentedString(personaType)).append("\n"); + sb.append(" personaTypeDisplay: ").append(toIndentedString(personaTypeDisplay)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" ageGroup: ").append(toIndentedString(ageGroup)).append("\n"); + sb.append(" occupation: ").append(toIndentedString(occupation)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" personality: ").append(toIndentedString(personality)).append("\n"); + sb.append(" communicationStyle: ").append(toIndentedString(communicationStyle)).append("\n"); + sb.append(" multilingual: ").append(toIndentedString(multilingual)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" accent: ").append(toIndentedString(accent)).append("\n"); + sb.append(" conversationSpeed: ").append(toIndentedString(conversationSpeed)).append("\n"); + sb.append(" backgroundSound: ").append(toIndentedString(backgroundSound)).append("\n"); + sb.append(" finishedSpeakingSensitivity: ").append(toIndentedString(finishedSpeakingSensitivity)).append("\n"); + sb.append(" interruptSensitivity: ").append(toIndentedString(interruptSensitivity)).append("\n"); + sb.append(" keywords: ").append(toIndentedString(keywords)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" additionalInstruction: ").append(toIndentedString(additionalInstruction)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" simulationType: ").append(toIndentedString(simulationType)).append("\n"); + sb.append(" punctuation: ").append(toIndentedString(punctuation)).append("\n"); + sb.append(" slangUsage: ").append(toIndentedString(slangUsage)).append("\n"); + sb.append(" typosFrequency: ").append(toIndentedString(typosFrequency)).append("\n"); + sb.append(" regionalMix: ").append(toIndentedString(regionalMix)).append("\n"); + sb.append(" emojiUsage: ").append(toIndentedString(emojiUsage)).append("\n"); + sb.append(" tone: ").append(toIndentedString(tone)).append("\n"); + sb.append(" verbosity: ").append(toIndentedString(verbosity)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `persona_type` to the URL query string + if (getPersonaType() != null) { + joiner.add(String.format("%spersona_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPersonaType())))); + } + + // add `persona_type_display` to the URL query string + if (getPersonaTypeDisplay() != null) { + joiner.add(String.format("%spersona_type_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPersonaTypeDisplay())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `gender` to the URL query string + if (getGender() != null) { + for (String _key : getGender().keySet()) { + joiner.add(String.format("%sgender%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getGender().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getGender().get(_key))))); + } + } + + // add `age_group` to the URL query string + if (getAgeGroup() != null) { + for (String _key : getAgeGroup().keySet()) { + joiner.add(String.format("%sage_group%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAgeGroup().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAgeGroup().get(_key))))); + } + } + + // add `occupation` to the URL query string + if (getOccupation() != null) { + for (String _key : getOccupation().keySet()) { + joiner.add(String.format("%soccupation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOccupation().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOccupation().get(_key))))); + } + } + + // add `location` to the URL query string + if (getLocation() != null) { + for (String _key : getLocation().keySet()) { + joiner.add(String.format("%slocation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLocation().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLocation().get(_key))))); + } + } + + // add `personality` to the URL query string + if (getPersonality() != null) { + for (String _key : getPersonality().keySet()) { + joiner.add(String.format("%spersonality%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getPersonality().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getPersonality().get(_key))))); + } + } + + // add `communication_style` to the URL query string + if (getCommunicationStyle() != null) { + for (String _key : getCommunicationStyle().keySet()) { + joiner.add(String.format("%scommunication_style%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCommunicationStyle().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCommunicationStyle().get(_key))))); + } + } + + // add `multilingual` to the URL query string + if (getMultilingual() != null) { + joiner.add(String.format("%smultilingual%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultilingual())))); + } + + // add `languages` to the URL query string + if (getLanguages() != null) { + for (String _key : getLanguages().keySet()) { + joiner.add(String.format("%slanguages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLanguages().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLanguages().get(_key))))); + } + } + + // add `accent` to the URL query string + if (getAccent() != null) { + for (String _key : getAccent().keySet()) { + joiner.add(String.format("%saccent%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAccent().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAccent().get(_key))))); + } + } + + // add `conversation_speed` to the URL query string + if (getConversationSpeed() != null) { + for (String _key : getConversationSpeed().keySet()) { + joiner.add(String.format("%sconversation_speed%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConversationSpeed().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConversationSpeed().get(_key))))); + } + } + + // add `background_sound` to the URL query string + if (getBackgroundSound() != null) { + joiner.add(String.format("%sbackground_sound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBackgroundSound())))); + } + + // add `finished_speaking_sensitivity` to the URL query string + if (getFinishedSpeakingSensitivity() != null) { + for (String _key : getFinishedSpeakingSensitivity().keySet()) { + joiner.add(String.format("%sfinished_speaking_sensitivity%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFinishedSpeakingSensitivity().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFinishedSpeakingSensitivity().get(_key))))); + } + } + + // add `interrupt_sensitivity` to the URL query string + if (getInterruptSensitivity() != null) { + for (String _key : getInterruptSensitivity().keySet()) { + joiner.add(String.format("%sinterrupt_sensitivity%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInterruptSensitivity().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInterruptSensitivity().get(_key))))); + } + } + + // add `keywords` to the URL query string + if (getKeywords() != null) { + for (String _key : getKeywords().keySet()) { + joiner.add(String.format("%skeywords%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getKeywords().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getKeywords().get(_key))))); + } + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `additional_instruction` to the URL query string + if (getAdditionalInstruction() != null) { + joiner.add(String.format("%sadditional_instruction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInstruction())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `simulation_type` to the URL query string + if (getSimulationType() != null) { + joiner.add(String.format("%ssimulation_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulationType())))); + } + + // add `punctuation` to the URL query string + if (getPunctuation() != null) { + joiner.add(String.format("%spunctuation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPunctuation())))); + } + + // add `slang_usage` to the URL query string + if (getSlangUsage() != null) { + joiner.add(String.format("%sslang_usage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSlangUsage())))); + } + + // add `typos_frequency` to the URL query string + if (getTyposFrequency() != null) { + joiner.add(String.format("%stypos_frequency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTyposFrequency())))); + } + + // add `regional_mix` to the URL query string + if (getRegionalMix() != null) { + joiner.add(String.format("%sregional_mix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRegionalMix())))); + } + + // add `emoji_usage` to the URL query string + if (getEmojiUsage() != null) { + joiner.add(String.format("%semoji_usage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmojiUsage())))); + } + + // add `tone` to the URL query string + if (getTone() != null) { + joiner.add(String.format("%stone%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTone())))); + } + + // add `verbosity` to the URL query string + if (getVerbosity() != null) { + joiner.add(String.format("%sverbosity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVerbosity())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationRequest.java new file mode 100644 index 0000000..9938b9b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationRequest.java @@ -0,0 +1,396 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PreviewDatasetOperationRequest + */ +@JsonPropertyOrder({ + PreviewDatasetOperationRequest.JSON_PROPERTY_COLUMN_ID, + PreviewDatasetOperationRequest.JSON_PROPERTY_JSON_KEY, + PreviewDatasetOperationRequest.JSON_PROPERTY_LABELS, + PreviewDatasetOperationRequest.JSON_PROPERTY_INSTRUCTION, + PreviewDatasetOperationRequest.JSON_PROPERTY_LANGUAGE_MODEL_ID, + PreviewDatasetOperationRequest.JSON_PROPERTY_CONFIG, + PreviewDatasetOperationRequest.JSON_PROPERTY_CODE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PreviewDatasetOperationRequest { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nullable + private UUID columnId; + + public static final String JSON_PROPERTY_JSON_KEY = "json_key"; + @javax.annotation.Nullable + private String jsonKey; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nullable + private List labels = new ArrayList<>(); + + public static final String JSON_PROPERTY_INSTRUCTION = "instruction"; + @javax.annotation.Nullable + private String instruction; + + public static final String JSON_PROPERTY_LANGUAGE_MODEL_ID = "language_model_id"; + @javax.annotation.Nullable + private String languageModelId; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_CODE = "code"; + @javax.annotation.Nullable + private String code; + + public PreviewDatasetOperationRequest() { + } + + public PreviewDatasetOperationRequest columnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnId(@javax.annotation.Nullable UUID columnId) { + this.columnId = columnId; + } + + + public PreviewDatasetOperationRequest jsonKey(@javax.annotation.Nullable String jsonKey) { + this.jsonKey = jsonKey; + return this; + } + + /** + * Get jsonKey + * @return jsonKey + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JSON_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getJsonKey() { + return jsonKey; + } + + + @JsonProperty(JSON_PROPERTY_JSON_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJsonKey(@javax.annotation.Nullable String jsonKey) { + this.jsonKey = jsonKey; + } + + + public PreviewDatasetOperationRequest labels(@javax.annotation.Nullable List labels) { + this.labels = labels; + return this; + } + + public PreviewDatasetOperationRequest addLabelsItem(String labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabels(@javax.annotation.Nullable List labels) { + this.labels = labels; + } + + + public PreviewDatasetOperationRequest instruction(@javax.annotation.Nullable String instruction) { + this.instruction = instruction; + return this; + } + + /** + * Get instruction + * @return instruction + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstruction() { + return instruction; + } + + + @JsonProperty(JSON_PROPERTY_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstruction(@javax.annotation.Nullable String instruction) { + this.instruction = instruction; + } + + + public PreviewDatasetOperationRequest languageModelId(@javax.annotation.Nullable String languageModelId) { + this.languageModelId = languageModelId; + return this; + } + + /** + * Get languageModelId + * @return languageModelId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguageModelId() { + return languageModelId; + } + + + @JsonProperty(JSON_PROPERTY_LANGUAGE_MODEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLanguageModelId(@javax.annotation.Nullable String languageModelId) { + this.languageModelId = languageModelId; + } + + + public PreviewDatasetOperationRequest config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public PreviewDatasetOperationRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public PreviewDatasetOperationRequest code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + /** + * Return true if this PreviewDatasetOperationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewDatasetOperationRequest previewDatasetOperationRequest = (PreviewDatasetOperationRequest) o; + return Objects.equals(this.columnId, previewDatasetOperationRequest.columnId) && + Objects.equals(this.jsonKey, previewDatasetOperationRequest.jsonKey) && + Objects.equals(this.labels, previewDatasetOperationRequest.labels) && + Objects.equals(this.instruction, previewDatasetOperationRequest.instruction) && + Objects.equals(this.languageModelId, previewDatasetOperationRequest.languageModelId) && + Objects.equals(this.config, previewDatasetOperationRequest.config) && + Objects.equals(this.code, previewDatasetOperationRequest.code); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, jsonKey, labels, instruction, languageModelId, config, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewDatasetOperationRequest {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" jsonKey: ").append(toIndentedString(jsonKey)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" instruction: ").append(toIndentedString(instruction)).append("\n"); + sb.append(" languageModelId: ").append(toIndentedString(languageModelId)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `json_key` to the URL query string + if (getJsonKey() != null) { + joiner.add(String.format("%sjson_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getJsonKey())))); + } + + // add `labels` to the URL query string + if (getLabels() != null) { + for (int i = 0; i < getLabels().size(); i++) { + joiner.add(String.format("%slabels%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLabels().get(i))))); + } + } + + // add `instruction` to the URL query string + if (getInstruction() != null) { + joiner.add(String.format("%sinstruction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstruction())))); + } + + // add `language_model_id` to the URL query string + if (getLanguageModelId() != null) { + joiner.add(String.format("%slanguage_model_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLanguageModelId())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResponse.java new file mode 100644 index 0000000..dbec23b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PreviewDatasetOperationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PreviewDatasetOperationResponse + */ +@JsonPropertyOrder({ + PreviewDatasetOperationResponse.JSON_PROPERTY_STATUS, + PreviewDatasetOperationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PreviewDatasetOperationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private PreviewDatasetOperationResult result; + + public PreviewDatasetOperationResponse() { + } + + public PreviewDatasetOperationResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public PreviewDatasetOperationResponse result(@javax.annotation.Nonnull PreviewDatasetOperationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PreviewDatasetOperationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull PreviewDatasetOperationResult result) { + this.result = result; + } + + + /** + * Return true if this PreviewDatasetOperationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewDatasetOperationResponse previewDatasetOperationResponse = (PreviewDatasetOperationResponse) o; + return Objects.equals(this.status, previewDatasetOperationResponse.status) && + Objects.equals(this.result, previewDatasetOperationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewDatasetOperationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResult.java new file mode 100644 index 0000000..d032d3c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResult.java @@ -0,0 +1,239 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PreviewDatasetOperationResultItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PreviewDatasetOperationResult + */ +@JsonPropertyOrder({ + PreviewDatasetOperationResult.JSON_PROPERTY_MESSAGE, + PreviewDatasetOperationResult.JSON_PROPERTY_PREVIEW_RESULTS, + PreviewDatasetOperationResult.JSON_PROPERTY_SAMPLE_SIZE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PreviewDatasetOperationResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_PREVIEW_RESULTS = "preview_results"; + @javax.annotation.Nonnull + private List previewResults = new ArrayList<>(); + + public static final String JSON_PROPERTY_SAMPLE_SIZE = "sample_size"; + @javax.annotation.Nonnull + private Integer sampleSize; + + public PreviewDatasetOperationResult() { + } + + public PreviewDatasetOperationResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public PreviewDatasetOperationResult previewResults(@javax.annotation.Nonnull List previewResults) { + this.previewResults = previewResults; + return this; + } + + public PreviewDatasetOperationResult addPreviewResultsItem(PreviewDatasetOperationResultItem previewResultsItem) { + if (this.previewResults == null) { + this.previewResults = new ArrayList<>(); + } + this.previewResults.add(previewResultsItem); + return this; + } + + /** + * Get previewResults + * @return previewResults + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PREVIEW_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPreviewResults() { + return previewResults; + } + + + @JsonProperty(JSON_PROPERTY_PREVIEW_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPreviewResults(@javax.annotation.Nonnull List previewResults) { + this.previewResults = previewResults; + } + + + public PreviewDatasetOperationResult sampleSize(@javax.annotation.Nonnull Integer sampleSize) { + this.sampleSize = sampleSize; + return this; + } + + /** + * Get sampleSize + * @return sampleSize + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SAMPLE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSampleSize() { + return sampleSize; + } + + + @JsonProperty(JSON_PROPERTY_SAMPLE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSampleSize(@javax.annotation.Nonnull Integer sampleSize) { + this.sampleSize = sampleSize; + } + + + /** + * Return true if this PreviewDatasetOperationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewDatasetOperationResult previewDatasetOperationResult = (PreviewDatasetOperationResult) o; + return Objects.equals(this.message, previewDatasetOperationResult.message) && + Objects.equals(this.previewResults, previewDatasetOperationResult.previewResults) && + Objects.equals(this.sampleSize, previewDatasetOperationResult.sampleSize); + } + + @Override + public int hashCode() { + return Objects.hash(message, previewResults, sampleSize); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewDatasetOperationResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" previewResults: ").append(toIndentedString(previewResults)).append("\n"); + sb.append(" sampleSize: ").append(toIndentedString(sampleSize)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `preview_results` to the URL query string + if (getPreviewResults() != null) { + for (int i = 0; i < getPreviewResults().size(); i++) { + if (getPreviewResults().get(i) != null) { + joiner.add(getPreviewResults().get(i).toUrlQueryString(String.format("%spreview_results%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `sample_size` to the URL query string + if (getSampleSize() != null) { + joiner.add(String.format("%ssample_size%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSampleSize())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResultItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResultItem.java new file mode 100644 index 0000000..3304620 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewDatasetOperationResultItem.java @@ -0,0 +1,298 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PreviewDatasetOperationResultItem + */ +@JsonPropertyOrder({ + PreviewDatasetOperationResultItem.JSON_PROPERTY_ROW_ID, + PreviewDatasetOperationResultItem.JSON_PROPERTY_INPUT, + PreviewDatasetOperationResultItem.JSON_PROPERTY_OUTPUT, + PreviewDatasetOperationResultItem.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PreviewDatasetOperationResultItem { + public static final String JSON_PROPERTY_ROW_ID = "row_id"; + @javax.annotation.Nonnull + private UUID rowId; + + public static final String JSON_PROPERTY_INPUT = "input"; + @javax.annotation.Nullable + private Map input = new HashMap<>(); + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private Map output = new HashMap<>(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map details = new HashMap<>(); + + public PreviewDatasetOperationResultItem() { + } + + public PreviewDatasetOperationResultItem rowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + return this; + } + + /** + * Get rowId + * @return rowId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRowId() { + return rowId; + } + + + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + } + + + public PreviewDatasetOperationResultItem input(@javax.annotation.Nullable Map input) { + this.input = input; + return this; + } + + public PreviewDatasetOperationResultItem putInputItem(String key, Object inputItem) { + if (this.input == null) { + this.input = new HashMap<>(); + } + this.input.put(key, inputItem); + return this; + } + + /** + * Get input + * @return input + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInput() { + return input; + } + + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setInput(@javax.annotation.Nullable Map input) { + this.input = input; + } + + + public PreviewDatasetOperationResultItem output(@javax.annotation.Nullable Map output) { + this.output = output; + return this; + } + + public PreviewDatasetOperationResultItem putOutputItem(String key, Object outputItem) { + if (this.output == null) { + this.output = new HashMap<>(); + } + this.output.put(key, outputItem); + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(@javax.annotation.Nullable Map output) { + this.output = output; + } + + + public PreviewDatasetOperationResultItem details(@javax.annotation.Nullable Map details) { + this.details = details; + return this; + } + + public PreviewDatasetOperationResultItem putDetailsItem(String key, Object detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map details) { + this.details = details; + } + + + /** + * Return true if this PreviewDatasetOperationResultItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewDatasetOperationResultItem previewDatasetOperationResultItem = (PreviewDatasetOperationResultItem) o; + return Objects.equals(this.rowId, previewDatasetOperationResultItem.rowId) && + Objects.equals(this.input, previewDatasetOperationResultItem.input) && + Objects.equals(this.output, previewDatasetOperationResultItem.output) && + Objects.equals(this.details, previewDatasetOperationResultItem.details); + } + + @Override + public int hashCode() { + return Objects.hash(rowId, input, output, details); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewDatasetOperationResultItem {\n"); + sb.append(" rowId: ").append(toIndentedString(rowId)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `row_id` to the URL query string + if (getRowId() != null) { + joiner.add(String.format("%srow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowId())))); + } + + // add `input` to the URL query string + if (getInput() != null) { + for (String _key : getInput().keySet()) { + joiner.add(String.format("%sinput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInput().get(_key))))); + } + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunEvalRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunEvalRequest.java new file mode 100644 index 0000000..91da8bd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunEvalRequest.java @@ -0,0 +1,346 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PreviewRunEvalRequest + */ +@JsonPropertyOrder({ + PreviewRunEvalRequest.JSON_PROPERTY_CONFIG, + PreviewRunEvalRequest.JSON_PROPERTY_TEMPLATE_ID, + PreviewRunEvalRequest.JSON_PROPERTY_MODEL, + PreviewRunEvalRequest.JSON_PROPERTY_SDK_UUID, + PreviewRunEvalRequest.JSON_PROPERTY_SOURCE, + PreviewRunEvalRequest.JSON_PROPERTY_PROTECT_FLASH +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PreviewRunEvalRequest { + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private UUID templateId; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_SDK_UUID = "sdk_uuid"; + @javax.annotation.Nullable + private String sdkUuid; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source; + + public static final String JSON_PROPERTY_PROTECT_FLASH = "protect_flash"; + @javax.annotation.Nullable + private Boolean protectFlash = false; + + public PreviewRunEvalRequest() { + } + + public PreviewRunEvalRequest config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public PreviewRunEvalRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public PreviewRunEvalRequest templateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull UUID templateId) { + this.templateId = templateId; + } + + + public PreviewRunEvalRequest model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public PreviewRunEvalRequest sdkUuid(@javax.annotation.Nullable String sdkUuid) { + this.sdkUuid = sdkUuid; + return this; + } + + /** + * Get sdkUuid + * @return sdkUuid + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDK_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSdkUuid() { + return sdkUuid; + } + + + @JsonProperty(JSON_PROPERTY_SDK_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkUuid(@javax.annotation.Nullable String sdkUuid) { + this.sdkUuid = sdkUuid; + } + + + public PreviewRunEvalRequest source(@javax.annotation.Nullable String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable String source) { + this.source = source; + } + + + public PreviewRunEvalRequest protectFlash(@javax.annotation.Nullable Boolean protectFlash) { + this.protectFlash = protectFlash; + return this; + } + + /** + * Get protectFlash + * @return protectFlash + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROTECT_FLASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getProtectFlash() { + return protectFlash; + } + + + @JsonProperty(JSON_PROPERTY_PROTECT_FLASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProtectFlash(@javax.annotation.Nullable Boolean protectFlash) { + this.protectFlash = protectFlash; + } + + + /** + * Return true if this PreviewRunEvalRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewRunEvalRequest previewRunEvalRequest = (PreviewRunEvalRequest) o; + return Objects.equals(this.config, previewRunEvalRequest.config) && + Objects.equals(this.templateId, previewRunEvalRequest.templateId) && + Objects.equals(this.model, previewRunEvalRequest.model) && + Objects.equals(this.sdkUuid, previewRunEvalRequest.sdkUuid) && + Objects.equals(this.source, previewRunEvalRequest.source) && + Objects.equals(this.protectFlash, previewRunEvalRequest.protectFlash); + } + + @Override + public int hashCode() { + return Objects.hash(config, templateId, model, sdkUuid, source, protectFlash); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewRunEvalRequest {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" sdkUuid: ").append(toIndentedString(sdkUuid)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" protectFlash: ").append(toIndentedString(protectFlash)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `sdk_uuid` to the URL query string + if (getSdkUuid() != null) { + joiner.add(String.format("%ssdk_uuid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSdkUuid())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `protect_flash` to the URL query string + if (getProtectFlash() != null) { + joiner.add(String.format("%sprotect_flash%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProtectFlash())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunPrompt.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunPrompt.java new file mode 100644 index 0000000..42c134b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PreviewRunPrompt.java @@ -0,0 +1,312 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptConfig; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PreviewRunPrompt + */ +@JsonPropertyOrder({ + PreviewRunPrompt.JSON_PROPERTY_DATASET_ID, + PreviewRunPrompt.JSON_PROPERTY_NAME, + PreviewRunPrompt.JSON_PROPERTY_CONFIG, + PreviewRunPrompt.JSON_PROPERTY_FIRST_N_ROWS, + PreviewRunPrompt.JSON_PROPERTY_ROW_INDICES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PreviewRunPrompt { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private PromptConfig config; + + public static final String JSON_PROPERTY_FIRST_N_ROWS = "first_n_rows"; + @javax.annotation.Nullable + private Integer firstNRows; + + public static final String JSON_PROPERTY_ROW_INDICES = "row_indices"; + @javax.annotation.Nullable + private List rowIndices = new ArrayList<>(); + + public PreviewRunPrompt() { + } + + public PreviewRunPrompt datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public PreviewRunPrompt name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public PreviewRunPrompt config(@javax.annotation.Nullable PromptConfig config) { + this.config = config; + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PromptConfig getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable PromptConfig config) { + this.config = config; + } + + + public PreviewRunPrompt firstNRows(@javax.annotation.Nullable Integer firstNRows) { + this.firstNRows = firstNRows; + return this; + } + + /** + * Get firstNRows + * minimum: 1 + * @return firstNRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_N_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFirstNRows() { + return firstNRows; + } + + + @JsonProperty(JSON_PROPERTY_FIRST_N_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstNRows(@javax.annotation.Nullable Integer firstNRows) { + this.firstNRows = firstNRows; + } + + + public PreviewRunPrompt rowIndices(@javax.annotation.Nullable List rowIndices) { + this.rowIndices = rowIndices; + return this; + } + + public PreviewRunPrompt addRowIndicesItem(Integer rowIndicesItem) { + if (this.rowIndices == null) { + this.rowIndices = new ArrayList<>(); + } + this.rowIndices.add(rowIndicesItem); + return this; + } + + /** + * List of row indices to preview. Must contain at least one integer. + * @return rowIndices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_INDICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRowIndices() { + return rowIndices; + } + + + @JsonProperty(JSON_PROPERTY_ROW_INDICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRowIndices(@javax.annotation.Nullable List rowIndices) { + this.rowIndices = rowIndices; + } + + + /** + * Return true if this PreviewRunPrompt object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewRunPrompt previewRunPrompt = (PreviewRunPrompt) o; + return Objects.equals(this.datasetId, previewRunPrompt.datasetId) && + Objects.equals(this.name, previewRunPrompt.name) && + Objects.equals(this.config, previewRunPrompt.config) && + Objects.equals(this.firstNRows, previewRunPrompt.firstNRows) && + Objects.equals(this.rowIndices, previewRunPrompt.rowIndices); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, name, config, firstNRows, rowIndices); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewRunPrompt {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" firstNRows: ").append(toIndentedString(firstNRows)).append("\n"); + sb.append(" rowIndices: ").append(toIndentedString(rowIndices)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + joiner.add(getConfig().toUrlQueryString(prefix + "config" + suffix)); + } + + // add `first_n_rows` to the URL query string + if (getFirstNRows() != null) { + joiner.add(String.format("%sfirst_n_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFirstNRows())))); + } + + // add `row_indices` to the URL query string + if (getRowIndices() != null) { + for (int i = 0; i < getRowIndices().size(); i++) { + joiner.add(String.format("%srow_indices%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRowIndices().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Project.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Project.java new file mode 100644 index 0000000..f64cbbd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Project.java @@ -0,0 +1,758 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Project + */ +@JsonPropertyOrder({ + Project.JSON_PROPERTY_ID, + Project.JSON_PROPERTY_MODEL_TYPE, + Project.JSON_PROPERTY_NAME, + Project.JSON_PROPERTY_TRACE_TYPE, + Project.JSON_PROPERTY_METADATA, + Project.JSON_PROPERTY_ORGANIZATION, + Project.JSON_PROPERTY_WORKSPACE, + Project.JSON_PROPERTY_CREATED_AT, + Project.JSON_PROPERTY_UPDATED_AT, + Project.JSON_PROPERTY_CONFIG, + Project.JSON_PROPERTY_SOURCE, + Project.JSON_PROPERTY_SESSION_CONFIG, + Project.JSON_PROPERTY_TAGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Project { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + /** + * Gets or Sets modelType + */ + public enum ModelTypeEnum { + NUMERIC(String.valueOf("Numeric")), + + SCORE_CATEGORICAL(String.valueOf("ScoreCategorical")), + + RANKING(String.valueOf("Ranking")), + + BINARY_CLASSIFICATION(String.valueOf("BinaryClassification")), + + REGRESSION(String.valueOf("Regression")), + + OBJECT_DETECTION(String.valueOf("ObjectDetection")), + + SEGMENTATION(String.valueOf("Segmentation")), + + GENERATIVE_LLM(String.valueOf("GenerativeLLM")), + + GENERATIVE_IMAGE(String.valueOf("GenerativeImage")), + + GENERATIVE_VIDEO(String.valueOf("GenerativeVideo")), + + TTS(String.valueOf("TTS")), + + STT(String.valueOf("STT")), + + MULTI_MODAL(String.valueOf("MultiModal")); + + private String value; + + ModelTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModelTypeEnum fromValue(String value) { + for (ModelTypeEnum b : ModelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_MODEL_TYPE = "model_type"; + @javax.annotation.Nonnull + private ModelTypeEnum modelType; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + /** + * Gets or Sets traceType + */ + public enum TraceTypeEnum { + EXPERIMENT(String.valueOf("experiment")), + + OBSERVE(String.valueOf("observe")); + + private String value; + + TraceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TraceTypeEnum fromValue(String value) { + for (TraceTypeEnum b : TraceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TRACE_TYPE = "trace_type"; + @javax.annotation.Nonnull + private TraceTypeEnum traceType; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_WORKSPACE = "workspace"; + private JsonNullable workspace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + /** + * Gets or Sets source + */ + public enum SourceEnum { + DEMO(String.valueOf("demo")), + + PROTOTYPE(String.valueOf("prototype")), + + SIMULATOR(String.valueOf("simulator")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private SourceEnum source; + + public static final String JSON_PROPERTY_SESSION_CONFIG = "session_config"; + @javax.annotation.Nullable + private Map sessionConfig = new HashMap<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nullable + private Map tags = new HashMap<>(); + + public Project() { + } + + @JsonCreator + public Project( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_WORKSPACE) UUID workspace, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.organization = organization; + this.workspace = workspace == null ? JsonNullable.undefined() : JsonNullable.of(workspace); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public Project modelType(@javax.annotation.Nonnull ModelTypeEnum modelType) { + this.modelType = modelType; + return this; + } + + /** + * Get modelType + * @return modelType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ModelTypeEnum getModelType() { + return modelType; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModelType(@javax.annotation.Nonnull ModelTypeEnum modelType) { + this.modelType = modelType; + } + + + public Project name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Project traceType(@javax.annotation.Nonnull TraceTypeEnum traceType) { + this.traceType = traceType; + return this; + } + + /** + * Get traceType + * @return traceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TraceTypeEnum getTraceType() { + return traceType; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceType(@javax.annotation.Nonnull TraceTypeEnum traceType) { + this.traceType = traceType; + } + + + public Project metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public Project putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Get workspace + * @return workspace + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getWorkspace() { + + if (workspace == null) { + workspace = JsonNullable.undefined(); + } + return workspace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkspace_JsonNullable() { + return workspace; + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + private void setWorkspace_JsonNullable(JsonNullable workspace) { + this.workspace = workspace; + } + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + public Project config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public Project putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Any valid JSON value. + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public Project source(@javax.annotation.Nullable SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SourceEnum getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@javax.annotation.Nullable SourceEnum source) { + this.source = source; + } + + + public Project sessionConfig(@javax.annotation.Nullable Map sessionConfig) { + this.sessionConfig = sessionConfig; + return this; + } + + public Project putSessionConfigItem(String key, Object sessionConfigItem) { + if (this.sessionConfig == null) { + this.sessionConfig = new HashMap<>(); + } + this.sessionConfig.put(key, sessionConfigItem); + return this; + } + + /** + * Any valid JSON value. + * @return sessionConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSessionConfig() { + return sessionConfig; + } + + + @JsonProperty(JSON_PROPERTY_SESSION_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSessionConfig(@javax.annotation.Nullable Map sessionConfig) { + this.sessionConfig = sessionConfig; + } + + + public Project tags(@javax.annotation.Nullable Map tags) { + this.tags = tags; + return this; + } + + public Project putTagsItem(String key, Object tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Any valid JSON value. + * @return tags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@javax.annotation.Nullable Map tags) { + this.tags = tags; + } + + + /** + * Return true if this Project object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Project project = (Project) o; + return Objects.equals(this.id, project.id) && + Objects.equals(this.modelType, project.modelType) && + Objects.equals(this.name, project.name) && + Objects.equals(this.traceType, project.traceType) && + Objects.equals(this.metadata, project.metadata) && + Objects.equals(this.organization, project.organization) && + equalsNullable(this.workspace, project.workspace) && + Objects.equals(this.createdAt, project.createdAt) && + Objects.equals(this.updatedAt, project.updatedAt) && + Objects.equals(this.config, project.config) && + Objects.equals(this.source, project.source) && + Objects.equals(this.sessionConfig, project.sessionConfig) && + Objects.equals(this.tags, project.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, modelType, name, traceType, metadata, organization, hashCodeNullable(workspace), createdAt, updatedAt, config, source, sessionConfig, tags); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Project {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" traceType: ").append(toIndentedString(traceType)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" workspace: ").append(toIndentedString(workspace)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" sessionConfig: ").append(toIndentedString(sessionConfig)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `model_type` to the URL query string + if (getModelType() != null) { + joiner.add(String.format("%smodel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `trace_type` to the URL query string + if (getTraceType() != null) { + joiner.add(String.format("%strace_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceType())))); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `workspace` to the URL query string + if (getWorkspace() != null) { + joiner.add(String.format("%sworkspace%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspace())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `session_config` to the URL query string + if (getSessionConfig() != null) { + for (String _key : getSessionConfig().keySet()) { + joiner.add(String.format("%ssession_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSessionConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSessionConfig().get(_key))))); + } + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTags().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfig.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfig.java new file mode 100644 index 0000000..8013642 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfig.java @@ -0,0 +1,808 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptConfig + */ +@JsonPropertyOrder({ + PromptConfig.JSON_PROPERTY_MODEL, + PromptConfig.JSON_PROPERTY_RUN_PROMPT_CONFIG, + PromptConfig.JSON_PROPERTY_MESSAGES, + PromptConfig.JSON_PROPERTY_TEMPERATURE, + PromptConfig.JSON_PROPERTY_FREQUENCY_PENALTY, + PromptConfig.JSON_PROPERTY_PRESENCE_PENALTY, + PromptConfig.JSON_PROPERTY_MAX_TOKENS, + PromptConfig.JSON_PROPERTY_TOP_P, + PromptConfig.JSON_PROPERTY_RESPONSE_FORMAT, + PromptConfig.JSON_PROPERTY_TOOL_CHOICE, + PromptConfig.JSON_PROPERTY_TOOLS, + PromptConfig.JSON_PROPERTY_OUTPUT_FORMAT, + PromptConfig.JSON_PROPERTY_CONCURRENCY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptConfig { + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_RUN_PROMPT_CONFIG = "run_prompt_config"; + @javax.annotation.Nullable + private Map runPromptConfig = new HashMap<>(); + + public static final String JSON_PROPERTY_MESSAGES = "messages"; + @javax.annotation.Nullable + private List> messages = new ArrayList<>(); + + public static final String JSON_PROPERTY_TEMPERATURE = "temperature"; + private JsonNullable temperature = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FREQUENCY_PENALTY = "frequency_penalty"; + private JsonNullable frequencyPenalty = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PRESENCE_PENALTY = "presence_penalty"; + private JsonNullable presencePenalty = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MAX_TOKENS = "max_tokens"; + private JsonNullable maxTokens = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOP_P = "top_p"; + private JsonNullable topP = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESPONSE_FORMAT = "response_format"; + @javax.annotation.Nullable + private Map responseFormat = new HashMap<>(); + + /** + * Tool selection mode: 'auto' or 'required'. + */ + public enum ToolChoiceEnum { + AUTO(String.valueOf("auto")), + + REQUIRED(String.valueOf("required")); + + private String value; + + ToolChoiceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ToolChoiceEnum fromValue(String value) { + for (ToolChoiceEnum b : ToolChoiceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TOOL_CHOICE = "tool_choice"; + private JsonNullable toolChoice = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOOLS = "tools"; + private JsonNullable>> tools = JsonNullable.>>undefined(); + + /** + * Output format type. + */ + public enum OutputFormatEnum { + ARRAY(String.valueOf("array")), + + STRING(String.valueOf("string")), + + NUMBER(String.valueOf("number")), + + OBJECT(String.valueOf("object")), + + AUDIO(String.valueOf("audio")), + + IMAGE(String.valueOf("image")); + + private String value; + + OutputFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OutputFormatEnum fromValue(String value) { + for (OutputFormatEnum b : OutputFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_OUTPUT_FORMAT = "output_format"; + private JsonNullable outputFormat = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONCURRENCY = "concurrency"; + private JsonNullable concurrency = JsonNullable.undefined(); + + public PromptConfig() { + } + + public PromptConfig model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public PromptConfig runPromptConfig(@javax.annotation.Nullable Map runPromptConfig) { + this.runPromptConfig = runPromptConfig; + return this; + } + + public PromptConfig putRunPromptConfigItem(String key, String runPromptConfigItem) { + if (this.runPromptConfig == null) { + this.runPromptConfig = new HashMap<>(); + } + this.runPromptConfig.put(key, runPromptConfigItem); + return this; + } + + /** + * Get runPromptConfig + * @return runPromptConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_PROMPT_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRunPromptConfig() { + return runPromptConfig; + } + + + @JsonProperty(JSON_PROPERTY_RUN_PROMPT_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRunPromptConfig(@javax.annotation.Nullable Map runPromptConfig) { + this.runPromptConfig = runPromptConfig; + } + + + public PromptConfig messages(@javax.annotation.Nullable List> messages) { + this.messages = messages; + return this; + } + + public PromptConfig addMessagesItem(Map messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * List of messages with format [{'role': 'user/assistant', 'content': 'text'}] + * @return messages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getMessages() { + return messages; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessages(@javax.annotation.Nullable List> messages) { + this.messages = messages; + } + + + public PromptConfig temperature(@javax.annotation.Nullable BigDecimal temperature) { + this.temperature = JsonNullable.of(temperature); + return this; + } + + /** + * Controls the randomness. Value between 0 and 2. + * minimum: 0 + * maximum: 2 + * @return temperature + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getTemperature() { + return temperature.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEMPERATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTemperature_JsonNullable() { + return temperature; + } + + @JsonProperty(JSON_PROPERTY_TEMPERATURE) + public void setTemperature_JsonNullable(JsonNullable temperature) { + this.temperature = temperature; + } + + public void setTemperature(@javax.annotation.Nullable BigDecimal temperature) { + this.temperature = JsonNullable.of(temperature); + } + + + public PromptConfig frequencyPenalty(@javax.annotation.Nullable BigDecimal frequencyPenalty) { + this.frequencyPenalty = JsonNullable.of(frequencyPenalty); + return this; + } + + /** + * Penalty for word repetition. Value between -2 and 2. + * minimum: -2 + * maximum: 2 + * @return frequencyPenalty + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getFrequencyPenalty() { + return frequencyPenalty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FREQUENCY_PENALTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFrequencyPenalty_JsonNullable() { + return frequencyPenalty; + } + + @JsonProperty(JSON_PROPERTY_FREQUENCY_PENALTY) + public void setFrequencyPenalty_JsonNullable(JsonNullable frequencyPenalty) { + this.frequencyPenalty = frequencyPenalty; + } + + public void setFrequencyPenalty(@javax.annotation.Nullable BigDecimal frequencyPenalty) { + this.frequencyPenalty = JsonNullable.of(frequencyPenalty); + } + + + public PromptConfig presencePenalty(@javax.annotation.Nullable BigDecimal presencePenalty) { + this.presencePenalty = JsonNullable.of(presencePenalty); + return this; + } + + /** + * Penalty for new word usage. Value between -2 and 2. + * minimum: -2 + * maximum: 2 + * @return presencePenalty + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getPresencePenalty() { + return presencePenalty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRESENCE_PENALTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPresencePenalty_JsonNullable() { + return presencePenalty; + } + + @JsonProperty(JSON_PROPERTY_PRESENCE_PENALTY) + public void setPresencePenalty_JsonNullable(JsonNullable presencePenalty) { + this.presencePenalty = presencePenalty; + } + + public void setPresencePenalty(@javax.annotation.Nullable BigDecimal presencePenalty) { + this.presencePenalty = JsonNullable.of(presencePenalty); + } + + + public PromptConfig maxTokens(@javax.annotation.Nullable Integer maxTokens) { + this.maxTokens = JsonNullable.of(maxTokens); + return this; + } + + /** + * Maximum number of tokens to generate. Null = use provider default. + * minimum: 1 + * maximum: 65536 + * @return maxTokens + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getMaxTokens() { + return maxTokens.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MAX_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMaxTokens_JsonNullable() { + return maxTokens; + } + + @JsonProperty(JSON_PROPERTY_MAX_TOKENS) + public void setMaxTokens_JsonNullable(JsonNullable maxTokens) { + this.maxTokens = maxTokens; + } + + public void setMaxTokens(@javax.annotation.Nullable Integer maxTokens) { + this.maxTokens = JsonNullable.of(maxTokens); + } + + + public PromptConfig topP(@javax.annotation.Nullable BigDecimal topP) { + this.topP = JsonNullable.of(topP); + return this; + } + + /** + * Controls diversity via nucleus sampling. Value between 0 and 1. + * minimum: 0 + * maximum: 1 + * @return topP + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getTopP() { + return topP.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOP_P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTopP_JsonNullable() { + return topP; + } + + @JsonProperty(JSON_PROPERTY_TOP_P) + public void setTopP_JsonNullable(JsonNullable topP) { + this.topP = topP; + } + + public void setTopP(@javax.annotation.Nullable BigDecimal topP) { + this.topP = JsonNullable.of(topP); + } + + + public PromptConfig responseFormat(@javax.annotation.Nullable Map responseFormat) { + this.responseFormat = responseFormat; + return this; + } + + public PromptConfig putResponseFormatItem(String key, Object responseFormatItem) { + if (this.responseFormat == null) { + this.responseFormat = new HashMap<>(); + } + this.responseFormat.put(key, responseFormatItem); + return this; + } + + /** + * JSON schema for response format if required. Can be a JSON object or string. Defaults to None. + * @return responseFormat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getResponseFormat() { + return responseFormat; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSE_FORMAT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setResponseFormat(@javax.annotation.Nullable Map responseFormat) { + this.responseFormat = responseFormat; + } + + + public PromptConfig toolChoice(@javax.annotation.Nullable ToolChoiceEnum toolChoice) { + this.toolChoice = JsonNullable.of(toolChoice); + return this; + } + + /** + * Tool selection mode: 'auto' or 'required'. + * @return toolChoice + */ + @javax.annotation.Nullable + @JsonIgnore + public ToolChoiceEnum getToolChoice() { + return toolChoice.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOOL_CHOICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getToolChoice_JsonNullable() { + return toolChoice; + } + + @JsonProperty(JSON_PROPERTY_TOOL_CHOICE) + public void setToolChoice_JsonNullable(JsonNullable toolChoice) { + this.toolChoice = toolChoice; + } + + public void setToolChoice(@javax.annotation.Nullable ToolChoiceEnum toolChoice) { + this.toolChoice = JsonNullable.of(toolChoice); + } + + + public PromptConfig tools(@javax.annotation.Nullable List> tools) { + this.tools = JsonNullable.>>of(tools); + return this; + } + + public PromptConfig addToolsItem(Map toolsItem) { + if (this.tools == null || !this.tools.isPresent()) { + this.tools = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.tools.get().add(toolsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * List of tools with tool properties if available. + * @return tools + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getTools() { + return tools.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOOLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getTools_JsonNullable() { + return tools; + } + + @JsonProperty(JSON_PROPERTY_TOOLS) + public void setTools_JsonNullable(JsonNullable>> tools) { + this.tools = tools; + } + + public void setTools(@javax.annotation.Nullable List> tools) { + this.tools = JsonNullable.>>of(tools); + } + + + public PromptConfig outputFormat(@javax.annotation.Nullable OutputFormatEnum outputFormat) { + this.outputFormat = JsonNullable.of(outputFormat); + return this; + } + + /** + * Output format type. + * @return outputFormat + */ + @javax.annotation.Nullable + @JsonIgnore + public OutputFormatEnum getOutputFormat() { + return outputFormat.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutputFormat_JsonNullable() { + return outputFormat; + } + + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) + public void setOutputFormat_JsonNullable(JsonNullable outputFormat) { + this.outputFormat = outputFormat; + } + + public void setOutputFormat(@javax.annotation.Nullable OutputFormatEnum outputFormat) { + this.outputFormat = JsonNullable.of(outputFormat); + } + + + public PromptConfig concurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = JsonNullable.of(concurrency); + return this; + } + + /** + * Number of concurrent operations allowed. Maximum 10. + * minimum: 1 + * maximum: 10 + * @return concurrency + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getConcurrency() { + return concurrency.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getConcurrency_JsonNullable() { + return concurrency; + } + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + public void setConcurrency_JsonNullable(JsonNullable concurrency) { + this.concurrency = concurrency; + } + + public void setConcurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = JsonNullable.of(concurrency); + } + + + /** + * Return true if this PromptConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptConfig promptConfig = (PromptConfig) o; + return Objects.equals(this.model, promptConfig.model) && + Objects.equals(this.runPromptConfig, promptConfig.runPromptConfig) && + Objects.equals(this.messages, promptConfig.messages) && + equalsNullable(this.temperature, promptConfig.temperature) && + equalsNullable(this.frequencyPenalty, promptConfig.frequencyPenalty) && + equalsNullable(this.presencePenalty, promptConfig.presencePenalty) && + equalsNullable(this.maxTokens, promptConfig.maxTokens) && + equalsNullable(this.topP, promptConfig.topP) && + Objects.equals(this.responseFormat, promptConfig.responseFormat) && + equalsNullable(this.toolChoice, promptConfig.toolChoice) && + equalsNullable(this.tools, promptConfig.tools) && + equalsNullable(this.outputFormat, promptConfig.outputFormat) && + equalsNullable(this.concurrency, promptConfig.concurrency); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(model, runPromptConfig, messages, hashCodeNullable(temperature), hashCodeNullable(frequencyPenalty), hashCodeNullable(presencePenalty), hashCodeNullable(maxTokens), hashCodeNullable(topP), responseFormat, hashCodeNullable(toolChoice), hashCodeNullable(tools), hashCodeNullable(outputFormat), hashCodeNullable(concurrency)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptConfig {\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" runPromptConfig: ").append(toIndentedString(runPromptConfig)).append("\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); + sb.append(" frequencyPenalty: ").append(toIndentedString(frequencyPenalty)).append("\n"); + sb.append(" presencePenalty: ").append(toIndentedString(presencePenalty)).append("\n"); + sb.append(" maxTokens: ").append(toIndentedString(maxTokens)).append("\n"); + sb.append(" topP: ").append(toIndentedString(topP)).append("\n"); + sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); + sb.append(" toolChoice: ").append(toIndentedString(toolChoice)).append("\n"); + sb.append(" tools: ").append(toIndentedString(tools)).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); + sb.append(" concurrency: ").append(toIndentedString(concurrency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `run_prompt_config` to the URL query string + if (getRunPromptConfig() != null) { + for (String _key : getRunPromptConfig().keySet()) { + joiner.add(String.format("%srun_prompt_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRunPromptConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRunPromptConfig().get(_key))))); + } + } + + // add `messages` to the URL query string + if (getMessages() != null) { + for (int i = 0; i < getMessages().size(); i++) { + joiner.add(String.format("%smessages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMessages().get(i))))); + } + } + + // add `temperature` to the URL query string + if (getTemperature() != null) { + joiner.add(String.format("%stemperature%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemperature())))); + } + + // add `frequency_penalty` to the URL query string + if (getFrequencyPenalty() != null) { + joiner.add(String.format("%sfrequency_penalty%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFrequencyPenalty())))); + } + + // add `presence_penalty` to the URL query string + if (getPresencePenalty() != null) { + joiner.add(String.format("%spresence_penalty%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPresencePenalty())))); + } + + // add `max_tokens` to the URL query string + if (getMaxTokens() != null) { + joiner.add(String.format("%smax_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxTokens())))); + } + + // add `top_p` to the URL query string + if (getTopP() != null) { + joiner.add(String.format("%stop_p%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTopP())))); + } + + // add `response_format` to the URL query string + if (getResponseFormat() != null) { + for (String _key : getResponseFormat().keySet()) { + joiner.add(String.format("%sresponse_format%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResponseFormat().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResponseFormat().get(_key))))); + } + } + + // add `tool_choice` to the URL query string + if (getToolChoice() != null) { + joiner.add(String.format("%stool_choice%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getToolChoice())))); + } + + // add `tools` to the URL query string + if (getTools() != null) { + for (int i = 0; i < getTools().size(); i++) { + joiner.add(String.format("%stools%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTools().get(i))))); + } + } + + // add `output_format` to the URL query string + if (getOutputFormat() != null) { + joiner.add(String.format("%soutput_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputFormat())))); + } + + // add `concurrency` to the URL query string + if (getConcurrency() != null) { + joiner.add(String.format("%sconcurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConcurrency())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfigEntry.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfigEntry.java new file mode 100644 index 0000000..01d7f22 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptConfigEntry.java @@ -0,0 +1,657 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptConfigEntry + */ +@JsonPropertyOrder({ + PromptConfigEntry.JSON_PROPERTY_ID, + PromptConfigEntry.JSON_PROPERTY_NAME, + PromptConfigEntry.JSON_PROPERTY_PROMPT_ID, + PromptConfigEntry.JSON_PROPERTY_PROMPT_VERSION, + PromptConfigEntry.JSON_PROPERTY_AGENT_ID, + PromptConfigEntry.JSON_PROPERTY_AGENT_VERSION, + PromptConfigEntry.JSON_PROPERTY_MODEL, + PromptConfigEntry.JSON_PROPERTY_MODEL_PARAMS, + PromptConfigEntry.JSON_PROPERTY_CONFIGURATION, + PromptConfigEntry.JSON_PROPERTY_OUTPUT_FORMAT, + PromptConfigEntry.JSON_PROPERTY_MESSAGES, + PromptConfigEntry.JSON_PROPERTY_VOICE_INPUT_COLUMN_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptConfigEntry { + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private JsonNullable promptId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_VERSION = "prompt_version"; + private JsonNullable promptVersion = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_ID = "agent_id"; + private JsonNullable agentId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + private JsonNullable agentVersion = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private Map model = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL_PARAMS = "model_params"; + @javax.annotation.Nullable + private Map modelParams = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + @javax.annotation.Nullable + private Map _configuration = new HashMap<>(); + + public static final String JSON_PROPERTY_OUTPUT_FORMAT = "output_format"; + @javax.annotation.Nullable + private String outputFormat = "string"; + + public static final String JSON_PROPERTY_MESSAGES = "messages"; + @javax.annotation.Nullable + private List> messages = new ArrayList<>(); + + public static final String JSON_PROPERTY_VOICE_INPUT_COLUMN_ID = "voice_input_column_id"; + private JsonNullable voiceInputColumnId = JsonNullable.undefined(); + + public PromptConfigEntry() { + } + + public PromptConfigEntry id(@javax.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@javax.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public PromptConfigEntry name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public PromptConfigEntry promptId(@javax.annotation.Nullable UUID promptId) { + this.promptId = JsonNullable.of(promptId); + return this; + } + + /** + * Get promptId + * @return promptId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptId() { + return promptId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptId_JsonNullable() { + return promptId; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + public void setPromptId_JsonNullable(JsonNullable promptId) { + this.promptId = promptId; + } + + public void setPromptId(@javax.annotation.Nullable UUID promptId) { + this.promptId = JsonNullable.of(promptId); + } + + + public PromptConfigEntry promptVersion(@javax.annotation.Nullable UUID promptVersion) { + this.promptVersion = JsonNullable.of(promptVersion); + return this; + } + + /** + * Get promptVersion + * @return promptVersion + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptVersion() { + return promptVersion.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptVersion_JsonNullable() { + return promptVersion; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION) + public void setPromptVersion_JsonNullable(JsonNullable promptVersion) { + this.promptVersion = promptVersion; + } + + public void setPromptVersion(@javax.annotation.Nullable UUID promptVersion) { + this.promptVersion = JsonNullable.of(promptVersion); + } + + + public PromptConfigEntry agentId(@javax.annotation.Nullable UUID agentId) { + this.agentId = JsonNullable.of(agentId); + return this; + } + + /** + * Get agentId + * @return agentId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAgentId() { + return agentId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentId_JsonNullable() { + return agentId; + } + + @JsonProperty(JSON_PROPERTY_AGENT_ID) + public void setAgentId_JsonNullable(JsonNullable agentId) { + this.agentId = agentId; + } + + public void setAgentId(@javax.annotation.Nullable UUID agentId) { + this.agentId = JsonNullable.of(agentId); + } + + + public PromptConfigEntry agentVersion(@javax.annotation.Nullable UUID agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + return this; + } + + /** + * Get agentVersion + * @return agentVersion + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAgentVersion() { + return agentVersion.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentVersion_JsonNullable() { + return agentVersion; + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + public void setAgentVersion_JsonNullable(JsonNullable agentVersion) { + this.agentVersion = agentVersion; + } + + public void setAgentVersion(@javax.annotation.Nullable UUID agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + } + + + public PromptConfigEntry model(@javax.annotation.Nullable Map model) { + this.model = model; + return this; + } + + public PromptConfigEntry putModelItem(String key, Object modelItem) { + if (this.model == null) { + this.model = new HashMap<>(); + } + this.model.put(key, modelItem); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable Map model) { + this.model = model; + } + + + public PromptConfigEntry modelParams(@javax.annotation.Nullable Map modelParams) { + this.modelParams = modelParams; + return this; + } + + public PromptConfigEntry putModelParamsItem(String key, String modelParamsItem) { + if (this.modelParams == null) { + this.modelParams = new HashMap<>(); + } + this.modelParams.put(key, modelParamsItem); + return this; + } + + /** + * Get modelParams + * @return modelParams + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getModelParams() { + return modelParams; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_PARAMS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setModelParams(@javax.annotation.Nullable Map modelParams) { + this.modelParams = modelParams; + } + + + public PromptConfigEntry _configuration(@javax.annotation.Nullable Map _configuration) { + this._configuration = _configuration; + return this; + } + + public PromptConfigEntry putConfigurationItem(String key, String _configurationItem) { + if (this._configuration == null) { + this._configuration = new HashMap<>(); + } + this._configuration.put(key, _configurationItem); + return this; + } + + /** + * Get _configuration + * @return _configuration + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIGURATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfiguration() { + return _configuration; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfiguration(@javax.annotation.Nullable Map _configuration) { + this._configuration = _configuration; + } + + + public PromptConfigEntry outputFormat(@javax.annotation.Nullable String outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOutputFormat() { + return outputFormat; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputFormat(@javax.annotation.Nullable String outputFormat) { + this.outputFormat = outputFormat; + } + + + public PromptConfigEntry messages(@javax.annotation.Nullable List> messages) { + this.messages = messages; + return this; + } + + public PromptConfigEntry addMessagesItem(Map messagesItem) { + if (this.messages == null) { + this.messages = new ArrayList<>(); + } + this.messages.add(messagesItem); + return this; + } + + /** + * Get messages + * @return messages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getMessages() { + return messages; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessages(@javax.annotation.Nullable List> messages) { + this.messages = messages; + } + + + public PromptConfigEntry voiceInputColumnId(@javax.annotation.Nullable UUID voiceInputColumnId) { + this.voiceInputColumnId = JsonNullable.of(voiceInputColumnId); + return this; + } + + /** + * Get voiceInputColumnId + * @return voiceInputColumnId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getVoiceInputColumnId() { + return voiceInputColumnId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VOICE_INPUT_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getVoiceInputColumnId_JsonNullable() { + return voiceInputColumnId; + } + + @JsonProperty(JSON_PROPERTY_VOICE_INPUT_COLUMN_ID) + public void setVoiceInputColumnId_JsonNullable(JsonNullable voiceInputColumnId) { + this.voiceInputColumnId = voiceInputColumnId; + } + + public void setVoiceInputColumnId(@javax.annotation.Nullable UUID voiceInputColumnId) { + this.voiceInputColumnId = JsonNullable.of(voiceInputColumnId); + } + + + /** + * Return true if this PromptConfigEntry object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptConfigEntry promptConfigEntry = (PromptConfigEntry) o; + return equalsNullable(this.id, promptConfigEntry.id) && + Objects.equals(this.name, promptConfigEntry.name) && + equalsNullable(this.promptId, promptConfigEntry.promptId) && + equalsNullable(this.promptVersion, promptConfigEntry.promptVersion) && + equalsNullable(this.agentId, promptConfigEntry.agentId) && + equalsNullable(this.agentVersion, promptConfigEntry.agentVersion) && + Objects.equals(this.model, promptConfigEntry.model) && + Objects.equals(this.modelParams, promptConfigEntry.modelParams) && + Objects.equals(this._configuration, promptConfigEntry._configuration) && + Objects.equals(this.outputFormat, promptConfigEntry.outputFormat) && + Objects.equals(this.messages, promptConfigEntry.messages) && + equalsNullable(this.voiceInputColumnId, promptConfigEntry.voiceInputColumnId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(id), name, hashCodeNullable(promptId), hashCodeNullable(promptVersion), hashCodeNullable(agentId), hashCodeNullable(agentVersion), model, modelParams, _configuration, outputFormat, messages, hashCodeNullable(voiceInputColumnId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptConfigEntry {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" promptVersion: ").append(toIndentedString(promptVersion)).append("\n"); + sb.append(" agentId: ").append(toIndentedString(agentId)).append("\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelParams: ").append(toIndentedString(modelParams)).append("\n"); + sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" voiceInputColumnId: ").append(toIndentedString(voiceInputColumnId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `prompt_id` to the URL query string + if (getPromptId() != null) { + joiner.add(String.format("%sprompt_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptId())))); + } + + // add `prompt_version` to the URL query string + if (getPromptVersion() != null) { + joiner.add(String.format("%sprompt_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptVersion())))); + } + + // add `agent_id` to the URL query string + if (getAgentId() != null) { + joiner.add(String.format("%sagent_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentId())))); + } + + // add `agent_version` to the URL query string + if (getAgentVersion() != null) { + joiner.add(String.format("%sagent_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentVersion())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + for (String _key : getModel().keySet()) { + joiner.add(String.format("%smodel%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModel().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModel().get(_key))))); + } + } + + // add `model_params` to the URL query string + if (getModelParams() != null) { + for (String _key : getModelParams().keySet()) { + joiner.add(String.format("%smodel_params%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getModelParams().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getModelParams().get(_key))))); + } + } + + // add `configuration` to the URL query string + if (getConfiguration() != null) { + for (String _key : getConfiguration().keySet()) { + joiner.add(String.format("%sconfiguration%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfiguration().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfiguration().get(_key))))); + } + } + + // add `output_format` to the URL query string + if (getOutputFormat() != null) { + joiner.add(String.format("%soutput_format%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputFormat())))); + } + + // add `messages` to the URL query string + if (getMessages() != null) { + for (int i = 0; i < getMessages().size(); i++) { + joiner.add(String.format("%smessages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMessages().get(i))))); + } + } + + // add `voice_input_column_id` to the URL query string + if (getVoiceInputColumnId() != null) { + joiner.add(String.format("%svoice_input_column_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVoiceInputColumnId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResponse.java new file mode 100644 index 0000000..0fdb6b6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptDerivedVariablesResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptDerivedVariablesResponse + */ +@JsonPropertyOrder({ + PromptDerivedVariablesResponse.JSON_PROPERTY_STATUS, + PromptDerivedVariablesResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptDerivedVariablesResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private PromptDerivedVariablesResult result; + + public PromptDerivedVariablesResponse() { + } + + public PromptDerivedVariablesResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public PromptDerivedVariablesResponse result(@javax.annotation.Nonnull PromptDerivedVariablesResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PromptDerivedVariablesResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull PromptDerivedVariablesResult result) { + this.result = result; + } + + + /** + * Return true if this PromptDerivedVariablesResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptDerivedVariablesResponse promptDerivedVariablesResponse = (PromptDerivedVariablesResponse) o; + return Objects.equals(this.status, promptDerivedVariablesResponse.status) && + Objects.equals(this.result, promptDerivedVariablesResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptDerivedVariablesResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResult.java new file mode 100644 index 0000000..4fa830e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptDerivedVariablesResult.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptDerivedVariablesResult + */ +@JsonPropertyOrder({ + PromptDerivedVariablesResult.JSON_PROPERTY_VERSION, + PromptDerivedVariablesResult.JSON_PROPERTY_DERIVED_VARIABLES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptDerivedVariablesResult { + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nonnull + private String version; + + public static final String JSON_PROPERTY_DERIVED_VARIABLES = "derived_variables"; + @javax.annotation.Nonnull + private Map> derivedVariables = new HashMap<>(); + + public PromptDerivedVariablesResult() { + } + + public PromptDerivedVariablesResult version(@javax.annotation.Nonnull String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersion(@javax.annotation.Nonnull String version) { + this.version = version; + } + + + public PromptDerivedVariablesResult derivedVariables(@javax.annotation.Nonnull Map> derivedVariables) { + this.derivedVariables = derivedVariables; + return this; + } + + public PromptDerivedVariablesResult putDerivedVariablesItem(String key, List derivedVariablesItem) { + if (this.derivedVariables == null) { + this.derivedVariables = new HashMap<>(); + } + this.derivedVariables.put(key, derivedVariablesItem); + return this; + } + + /** + * Get derivedVariables + * @return derivedVariables + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DERIVED_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getDerivedVariables() { + return derivedVariables; + } + + + @JsonProperty(JSON_PROPERTY_DERIVED_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDerivedVariables(@javax.annotation.Nonnull Map> derivedVariables) { + this.derivedVariables = derivedVariables; + } + + + /** + * Return true if this PromptDerivedVariablesResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptDerivedVariablesResult promptDerivedVariablesResult = (PromptDerivedVariablesResult) o; + return Objects.equals(this.version, promptDerivedVariablesResult.version) && + Objects.equals(this.derivedVariables, promptDerivedVariablesResult.derivedVariables); + } + + @Override + public int hashCode() { + return Objects.hash(version, derivedVariables); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptDerivedVariablesResult {\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" derivedVariables: ").append(toIndentedString(derivedVariables)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `derived_variables` to the URL query string + if (getDerivedVariables() != null) { + for (String _key : getDerivedVariables().keySet()) { + joiner.add(String.format("%sderived_variables%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDerivedVariables().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDerivedVariables().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptHistoryExecution.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptHistoryExecution.java new file mode 100644 index 0000000..f1ffd81 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptHistoryExecution.java @@ -0,0 +1,797 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptHistoryExecution + */ +@JsonPropertyOrder({ + PromptHistoryExecution.JSON_PROPERTY_ID, + PromptHistoryExecution.JSON_PROPERTY_TEMPLATE_VERSION, + PromptHistoryExecution.JSON_PROPERTY_OUTPUT, + PromptHistoryExecution.JSON_PROPERTY_PROMPT_CONFIG_SNAPSHOT, + PromptHistoryExecution.JSON_PROPERTY_TEMPLATE_NAME, + PromptHistoryExecution.JSON_PROPERTY_ORIGINAL_TEMPLATE, + PromptHistoryExecution.JSON_PROPERTY_METADATA, + PromptHistoryExecution.JSON_PROPERTY_VARIABLE_NAMES, + PromptHistoryExecution.JSON_PROPERTY_EVALUATION_RESULTS, + PromptHistoryExecution.JSON_PROPERTY_EVALUATION_CONFIGS, + PromptHistoryExecution.JSON_PROPERTY_CREATED_AT, + PromptHistoryExecution.JSON_PROPERTY_IS_DEFAULT, + PromptHistoryExecution.JSON_PROPERTY_COMMIT_MESSAGE, + PromptHistoryExecution.JSON_PROPERTY_UPDATED_AT, + PromptHistoryExecution.JSON_PROPERTY_IS_DRAFT, + PromptHistoryExecution.JSON_PROPERTY_LABELS, + PromptHistoryExecution.JSON_PROPERTY_PLACEHOLDERS, + PromptHistoryExecution.JSON_PROPERTY_PROMPT_BASE_TEMPLATE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptHistoryExecution { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_TEMPLATE_VERSION = "template_version"; + @javax.annotation.Nonnull + private String templateVersion; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private Map output = new HashMap<>(); + + public static final String JSON_PROPERTY_PROMPT_CONFIG_SNAPSHOT = "prompt_config_snapshot"; + @javax.annotation.Nullable + private String promptConfigSnapshot; + + public static final String JSON_PROPERTY_TEMPLATE_NAME = "template_name"; + @javax.annotation.Nullable + private String templateName; + + public static final String JSON_PROPERTY_ORIGINAL_TEMPLATE = "original_template"; + private JsonNullable originalTemplate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_VARIABLE_NAMES = "variable_names"; + @javax.annotation.Nullable + private String variableNames; + + public static final String JSON_PROPERTY_EVALUATION_RESULTS = "evaluation_results"; + @javax.annotation.Nullable + private Map evaluationResults = new HashMap<>(); + + public static final String JSON_PROPERTY_EVALUATION_CONFIGS = "evaluation_configs"; + @javax.annotation.Nullable + private Map evaluationConfigs = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nullable + private Boolean isDefault; + + public static final String JSON_PROPERTY_COMMIT_MESSAGE = "commit_message"; + private JsonNullable commitMessage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_IS_DRAFT = "is_draft"; + @javax.annotation.Nullable + private Boolean isDraft; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nullable + private String labels; + + public static final String JSON_PROPERTY_PLACEHOLDERS = "placeholders"; + @javax.annotation.Nullable + private Map placeholders = new HashMap<>(); + + public static final String JSON_PROPERTY_PROMPT_BASE_TEMPLATE = "prompt_base_template"; + private JsonNullable promptBaseTemplate = JsonNullable.undefined(); + + public PromptHistoryExecution() { + } + + @JsonCreator + public PromptHistoryExecution( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_OUTPUT) Map output, + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIG_SNAPSHOT) String promptConfigSnapshot, + @JsonProperty(JSON_PROPERTY_TEMPLATE_NAME) String templateName, + @JsonProperty(JSON_PROPERTY_VARIABLE_NAMES) String variableNames, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_LABELS) String labels + ) { + this(); + this.id = id; + this.output = output; + this.promptConfigSnapshot = promptConfigSnapshot; + this.templateName = templateName; + this.variableNames = variableNames; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.labels = labels; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public PromptHistoryExecution templateVersion(@javax.annotation.Nonnull String templateVersion) { + this.templateVersion = templateVersion; + return this; + } + + /** + * Get templateVersion + * @return templateVersion + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTemplateVersion() { + return templateVersion; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateVersion(@javax.annotation.Nonnull String templateVersion) { + this.templateVersion = templateVersion; + } + + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOutput() { + return output; + } + + + + + /** + * Get promptConfigSnapshot + * @return promptConfigSnapshot + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_CONFIG_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPromptConfigSnapshot() { + return promptConfigSnapshot; + } + + + + + /** + * Get templateName + * @return templateName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplateName() { + return templateName; + } + + + + + public PromptHistoryExecution originalTemplate(@javax.annotation.Nullable UUID originalTemplate) { + this.originalTemplate = JsonNullable.of(originalTemplate); + return this; + } + + /** + * Get originalTemplate + * @return originalTemplate + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getOriginalTemplate() { + return originalTemplate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORIGINAL_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOriginalTemplate_JsonNullable() { + return originalTemplate; + } + + @JsonProperty(JSON_PROPERTY_ORIGINAL_TEMPLATE) + public void setOriginalTemplate_JsonNullable(JsonNullable originalTemplate) { + this.originalTemplate = originalTemplate; + } + + public void setOriginalTemplate(@javax.annotation.Nullable UUID originalTemplate) { + this.originalTemplate = JsonNullable.of(originalTemplate); + } + + + public PromptHistoryExecution metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public PromptHistoryExecution putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + /** + * Get variableNames + * @return variableNames + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLE_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVariableNames() { + return variableNames; + } + + + + + public PromptHistoryExecution evaluationResults(@javax.annotation.Nullable Map evaluationResults) { + this.evaluationResults = evaluationResults; + return this; + } + + public PromptHistoryExecution putEvaluationResultsItem(String key, Object evaluationResultsItem) { + if (this.evaluationResults == null) { + this.evaluationResults = new HashMap<>(); + } + this.evaluationResults.put(key, evaluationResultsItem); + return this; + } + + /** + * Get evaluationResults + * @return evaluationResults + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_RESULTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvaluationResults() { + return evaluationResults; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_RESULTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationResults(@javax.annotation.Nullable Map evaluationResults) { + this.evaluationResults = evaluationResults; + } + + + public PromptHistoryExecution evaluationConfigs(@javax.annotation.Nullable Map evaluationConfigs) { + this.evaluationConfigs = evaluationConfigs; + return this; + } + + public PromptHistoryExecution putEvaluationConfigsItem(String key, Object evaluationConfigsItem) { + if (this.evaluationConfigs == null) { + this.evaluationConfigs = new HashMap<>(); + } + this.evaluationConfigs.put(key, evaluationConfigsItem); + return this; + } + + /** + * Get evaluationConfigs + * @return evaluationConfigs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_CONFIGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvaluationConfigs() { + return evaluationConfigs; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_CONFIGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationConfigs(@javax.annotation.Nullable Map evaluationConfigs) { + this.evaluationConfigs = evaluationConfigs; + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + public PromptHistoryExecution isDefault(@javax.annotation.Nullable Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsDefault(@javax.annotation.Nullable Boolean isDefault) { + this.isDefault = isDefault; + } + + + public PromptHistoryExecution commitMessage(@javax.annotation.Nullable String commitMessage) { + this.commitMessage = JsonNullable.of(commitMessage); + return this; + } + + /** + * Get commitMessage + * @return commitMessage + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCommitMessage() { + return commitMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCommitMessage_JsonNullable() { + return commitMessage; + } + + @JsonProperty(JSON_PROPERTY_COMMIT_MESSAGE) + public void setCommitMessage_JsonNullable(JsonNullable commitMessage) { + this.commitMessage = commitMessage; + } + + public void setCommitMessage(@javax.annotation.Nullable String commitMessage) { + this.commitMessage = JsonNullable.of(commitMessage); + } + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + public PromptHistoryExecution isDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + return this; + } + + /** + * Get isDraft + * @return isDraft + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DRAFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDraft() { + return isDraft; + } + + + @JsonProperty(JSON_PROPERTY_IS_DRAFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + } + + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLabels() { + return labels; + } + + + + + public PromptHistoryExecution placeholders(@javax.annotation.Nullable Map placeholders) { + this.placeholders = placeholders; + return this; + } + + public PromptHistoryExecution putPlaceholdersItem(String key, Object placeholdersItem) { + if (this.placeholders == null) { + this.placeholders = new HashMap<>(); + } + this.placeholders.put(key, placeholdersItem); + return this; + } + + /** + * Get placeholders + * @return placeholders + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLACEHOLDERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPlaceholders() { + return placeholders; + } + + + @JsonProperty(JSON_PROPERTY_PLACEHOLDERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setPlaceholders(@javax.annotation.Nullable Map placeholders) { + this.placeholders = placeholders; + } + + + public PromptHistoryExecution promptBaseTemplate(@javax.annotation.Nullable UUID promptBaseTemplate) { + this.promptBaseTemplate = JsonNullable.of(promptBaseTemplate); + return this; + } + + /** + * Get promptBaseTemplate + * @return promptBaseTemplate + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptBaseTemplate() { + return promptBaseTemplate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_BASE_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptBaseTemplate_JsonNullable() { + return promptBaseTemplate; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_BASE_TEMPLATE) + public void setPromptBaseTemplate_JsonNullable(JsonNullable promptBaseTemplate) { + this.promptBaseTemplate = promptBaseTemplate; + } + + public void setPromptBaseTemplate(@javax.annotation.Nullable UUID promptBaseTemplate) { + this.promptBaseTemplate = JsonNullable.of(promptBaseTemplate); + } + + + /** + * Return true if this PromptHistoryExecution object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptHistoryExecution promptHistoryExecution = (PromptHistoryExecution) o; + return Objects.equals(this.id, promptHistoryExecution.id) && + Objects.equals(this.templateVersion, promptHistoryExecution.templateVersion) && + Objects.equals(this.output, promptHistoryExecution.output) && + Objects.equals(this.promptConfigSnapshot, promptHistoryExecution.promptConfigSnapshot) && + Objects.equals(this.templateName, promptHistoryExecution.templateName) && + equalsNullable(this.originalTemplate, promptHistoryExecution.originalTemplate) && + Objects.equals(this.metadata, promptHistoryExecution.metadata) && + Objects.equals(this.variableNames, promptHistoryExecution.variableNames) && + Objects.equals(this.evaluationResults, promptHistoryExecution.evaluationResults) && + Objects.equals(this.evaluationConfigs, promptHistoryExecution.evaluationConfigs) && + Objects.equals(this.createdAt, promptHistoryExecution.createdAt) && + Objects.equals(this.isDefault, promptHistoryExecution.isDefault) && + equalsNullable(this.commitMessage, promptHistoryExecution.commitMessage) && + Objects.equals(this.updatedAt, promptHistoryExecution.updatedAt) && + Objects.equals(this.isDraft, promptHistoryExecution.isDraft) && + Objects.equals(this.labels, promptHistoryExecution.labels) && + Objects.equals(this.placeholders, promptHistoryExecution.placeholders) && + equalsNullable(this.promptBaseTemplate, promptHistoryExecution.promptBaseTemplate); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, templateVersion, output, promptConfigSnapshot, templateName, hashCodeNullable(originalTemplate), metadata, variableNames, evaluationResults, evaluationConfigs, createdAt, isDefault, hashCodeNullable(commitMessage), updatedAt, isDraft, labels, placeholders, hashCodeNullable(promptBaseTemplate)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptHistoryExecution {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" templateVersion: ").append(toIndentedString(templateVersion)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" promptConfigSnapshot: ").append(toIndentedString(promptConfigSnapshot)).append("\n"); + sb.append(" templateName: ").append(toIndentedString(templateName)).append("\n"); + sb.append(" originalTemplate: ").append(toIndentedString(originalTemplate)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" variableNames: ").append(toIndentedString(variableNames)).append("\n"); + sb.append(" evaluationResults: ").append(toIndentedString(evaluationResults)).append("\n"); + sb.append(" evaluationConfigs: ").append(toIndentedString(evaluationConfigs)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" commitMessage: ").append(toIndentedString(commitMessage)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" isDraft: ").append(toIndentedString(isDraft)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" placeholders: ").append(toIndentedString(placeholders)).append("\n"); + sb.append(" promptBaseTemplate: ").append(toIndentedString(promptBaseTemplate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `template_version` to the URL query string + if (getTemplateVersion() != null) { + joiner.add(String.format("%stemplate_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateVersion())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + // add `prompt_config_snapshot` to the URL query string + if (getPromptConfigSnapshot() != null) { + joiner.add(String.format("%sprompt_config_snapshot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptConfigSnapshot())))); + } + + // add `template_name` to the URL query string + if (getTemplateName() != null) { + joiner.add(String.format("%stemplate_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateName())))); + } + + // add `original_template` to the URL query string + if (getOriginalTemplate() != null) { + joiner.add(String.format("%soriginal_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOriginalTemplate())))); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `variable_names` to the URL query string + if (getVariableNames() != null) { + joiner.add(String.format("%svariable_names%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVariableNames())))); + } + + // add `evaluation_results` to the URL query string + if (getEvaluationResults() != null) { + for (String _key : getEvaluationResults().keySet()) { + joiner.add(String.format("%sevaluation_results%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvaluationResults().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvaluationResults().get(_key))))); + } + } + + // add `evaluation_configs` to the URL query string + if (getEvaluationConfigs() != null) { + for (String _key : getEvaluationConfigs().keySet()) { + joiner.add(String.format("%sevaluation_configs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvaluationConfigs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvaluationConfigs().get(_key))))); + } + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + // add `commit_message` to the URL query string + if (getCommitMessage() != null) { + joiner.add(String.format("%scommit_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCommitMessage())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `is_draft` to the URL query string + if (getIsDraft() != null) { + joiner.add(String.format("%sis_draft%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDraft())))); + } + + // add `labels` to the URL query string + if (getLabels() != null) { + joiner.add(String.format("%slabels%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabels())))); + } + + // add `placeholders` to the URL query string + if (getPlaceholders() != null) { + for (String _key : getPlaceholders().keySet()) { + joiner.add(String.format("%splaceholders%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getPlaceholders().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getPlaceholders().get(_key))))); + } + } + + // add `prompt_base_template` to the URL query string + if (getPromptBaseTemplate() != null) { + joiner.add(String.format("%sprompt_base_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptBaseTemplate())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptLabel.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptLabel.java new file mode 100644 index 0000000..35d5b50 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptLabel.java @@ -0,0 +1,392 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptLabel + */ +@JsonPropertyOrder({ + PromptLabel.JSON_PROPERTY_ID, + PromptLabel.JSON_PROPERTY_ORGANIZATION, + PromptLabel.JSON_PROPERTY_NAME, + PromptLabel.JSON_PROPERTY_TYPE, + PromptLabel.JSON_PROPERTY_METADATA, + PromptLabel.JSON_PROPERTY_CREATED_AT, + PromptLabel.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptLabel { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + SYSTEM(String.valueOf("system")), + + CUSTOM(String.valueOf("custom")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public PromptLabel() { + } + + @JsonCreator + public PromptLabel( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.organization = organization; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + public PromptLabel name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public PromptLabel type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public PromptLabel metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public PromptLabel putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Return true if this PromptLabel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptLabel promptLabel = (PromptLabel) o; + return Objects.equals(this.id, promptLabel.id) && + Objects.equals(this.organization, promptLabel.organization) && + Objects.equals(this.name, promptLabel.name) && + Objects.equals(this.type, promptLabel.type) && + Objects.equals(this.metadata, promptLabel.metadata) && + Objects.equals(this.createdAt, promptLabel.createdAt) && + Objects.equals(this.updatedAt, promptLabel.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, organization, name, type, metadata, createdAt, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptLabel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResponse.java new file mode 100644 index 0000000..fab762d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptSimulationListResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationListResponse + */ +@JsonPropertyOrder({ + PromptSimulationListResponse.JSON_PROPERTY_STATUS, + PromptSimulationListResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationListResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private PromptSimulationListResult result; + + public PromptSimulationListResponse() { + } + + public PromptSimulationListResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public PromptSimulationListResponse result(@javax.annotation.Nonnull PromptSimulationListResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PromptSimulationListResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull PromptSimulationListResult result) { + this.result = result; + } + + + /** + * Return true if this PromptSimulationListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationListResponse promptSimulationListResponse = (PromptSimulationListResponse) o; + return Objects.equals(this.status, promptSimulationListResponse.status) && + Objects.equals(this.result, promptSimulationListResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationListResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResult.java new file mode 100644 index 0000000..f11d4b2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationListResult.java @@ -0,0 +1,278 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptSimulationTemplateSummary; +import com.futureagi.sdk.model.RunTestResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationListResult + */ +@JsonPropertyOrder({ + PromptSimulationListResult.JSON_PROPERTY_COUNT, + PromptSimulationListResult.JSON_PROPERTY_PAGE, + PromptSimulationListResult.JSON_PROPERTY_LIMIT, + PromptSimulationListResult.JSON_PROPERTY_RESULTS, + PromptSimulationListResult.JSON_PROPERTY_PROMPT_TEMPLATE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationListResult { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_PAGE = "page"; + @javax.annotation.Nullable + private Integer page; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + @javax.annotation.Nullable + private Integer limit; + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public static final String JSON_PROPERTY_PROMPT_TEMPLATE = "prompt_template"; + @javax.annotation.Nullable + private PromptSimulationTemplateSummary promptTemplate; + + public PromptSimulationListResult() { + } + + @JsonCreator + public PromptSimulationListResult( + @JsonProperty(JSON_PROPERTY_COUNT) Integer count, + @JsonProperty(JSON_PROPERTY_PAGE) Integer page, + @JsonProperty(JSON_PROPERTY_LIMIT) Integer limit, + @JsonProperty(JSON_PROPERTY_RESULTS) List results + ) { + this(); + this.count = count; + this.page = page; + this.limit = limit; + this.results = results; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + + + /** + * Get page + * @return page + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPage() { + return page; + } + + + + + /** + * Get limit + * @return limit + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } + + + + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + + + public PromptSimulationListResult promptTemplate(@javax.annotation.Nullable PromptSimulationTemplateSummary promptTemplate) { + this.promptTemplate = promptTemplate; + return this; + } + + /** + * Get promptTemplate + * @return promptTemplate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PromptSimulationTemplateSummary getPromptTemplate() { + return promptTemplate; + } + + + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPromptTemplate(@javax.annotation.Nullable PromptSimulationTemplateSummary promptTemplate) { + this.promptTemplate = promptTemplate; + } + + + /** + * Return true if this PromptSimulationListResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationListResult promptSimulationListResult = (PromptSimulationListResult) o; + return Objects.equals(this.count, promptSimulationListResult.count) && + Objects.equals(this.page, promptSimulationListResult.page) && + Objects.equals(this.limit, promptSimulationListResult.limit) && + Objects.equals(this.results, promptSimulationListResult.results) && + Objects.equals(this.promptTemplate, promptSimulationListResult.promptTemplate); + } + + @Override + public int hashCode() { + return Objects.hash(count, page, limit, results, promptTemplate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationListResult {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" promptTemplate: ").append(toIndentedString(promptTemplate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `page` to the URL query string + if (getPage() != null) { + joiner.add(String.format("%spage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPage())))); + } + + // add `limit` to the URL query string + if (getLimit() != null) { + joiner.add(String.format("%slimit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLimit())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `prompt_template` to the URL query string + if (getPromptTemplate() != null) { + joiner.add(getPromptTemplate().toUrlQueryString(prefix + "prompt_template" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationRunResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationRunResponse.java new file mode 100644 index 0000000..88411da --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationRunResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RunTestResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationRunResponse + */ +@JsonPropertyOrder({ + PromptSimulationRunResponse.JSON_PROPERTY_STATUS, + PromptSimulationRunResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationRunResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private RunTestResponse result; + + public PromptSimulationRunResponse() { + } + + public PromptSimulationRunResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public PromptSimulationRunResponse result(@javax.annotation.Nonnull RunTestResponse result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RunTestResponse getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull RunTestResponse result) { + this.result = result; + } + + + /** + * Return true if this PromptSimulationRunResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationRunResponse promptSimulationRunResponse = (PromptSimulationRunResponse) o; + return Objects.equals(this.status, promptSimulationRunResponse.status) && + Objects.equals(this.result, promptSimulationRunResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationRunResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenarioItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenarioItem.java new file mode 100644 index 0000000..40dda9a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenarioItem.java @@ -0,0 +1,319 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationScenarioItem + */ +@JsonPropertyOrder({ + PromptSimulationScenarioItem.JSON_PROPERTY_ID, + PromptSimulationScenarioItem.JSON_PROPERTY_NAME, + PromptSimulationScenarioItem.JSON_PROPERTY_DESCRIPTION, + PromptSimulationScenarioItem.JSON_PROPERTY_SCENARIO_TYPE, + PromptSimulationScenarioItem.JSON_PROPERTY_DATASET_ID, + PromptSimulationScenarioItem.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationScenarioItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_SCENARIO_TYPE = "scenario_type"; + @javax.annotation.Nullable + private String scenarioType; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + private JsonNullable datasetId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public PromptSimulationScenarioItem() { + } + + @JsonCreator + public PromptSimulationScenarioItem( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE) String scenarioType, + @JsonProperty(JSON_PROPERTY_DATASET_ID) UUID datasetId, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.name = name; + this.description = description; + this.scenarioType = scenarioType; + this.datasetId = datasetId == null ? JsonNullable.undefined() : JsonNullable.of(datasetId); + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + + + /** + * Get scenarioType + * @return scenarioType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenarioType() { + return scenarioType; + } + + + + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getDatasetId() { + + if (datasetId == null) { + datasetId = JsonNullable.undefined(); + } + return datasetId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatasetId_JsonNullable() { + return datasetId; + } + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + private void setDatasetId_JsonNullable(JsonNullable datasetId) { + this.datasetId = datasetId; + } + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this PromptSimulationScenarioItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationScenarioItem promptSimulationScenarioItem = (PromptSimulationScenarioItem) o; + return Objects.equals(this.id, promptSimulationScenarioItem.id) && + Objects.equals(this.name, promptSimulationScenarioItem.name) && + Objects.equals(this.description, promptSimulationScenarioItem.description) && + Objects.equals(this.scenarioType, promptSimulationScenarioItem.scenarioType) && + equalsNullable(this.datasetId, promptSimulationScenarioItem.datasetId) && + Objects.equals(this.createdAt, promptSimulationScenarioItem.createdAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, scenarioType, hashCodeNullable(datasetId), createdAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationScenarioItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" scenarioType: ").append(toIndentedString(scenarioType)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `scenario_type` to the URL query string + if (getScenarioType() != null) { + joiner.add(String.format("%sscenario_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioType())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResponse.java new file mode 100644 index 0000000..52e3f38 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptSimulationScenariosResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationScenariosResponse + */ +@JsonPropertyOrder({ + PromptSimulationScenariosResponse.JSON_PROPERTY_STATUS, + PromptSimulationScenariosResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationScenariosResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private PromptSimulationScenariosResult result; + + public PromptSimulationScenariosResponse() { + } + + public PromptSimulationScenariosResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public PromptSimulationScenariosResponse result(@javax.annotation.Nonnull PromptSimulationScenariosResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PromptSimulationScenariosResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull PromptSimulationScenariosResult result) { + this.result = result; + } + + + /** + * Return true if this PromptSimulationScenariosResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationScenariosResponse promptSimulationScenariosResponse = (PromptSimulationScenariosResponse) o; + return Objects.equals(this.status, promptSimulationScenariosResponse.status) && + Objects.equals(this.result, promptSimulationScenariosResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationScenariosResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResult.java new file mode 100644 index 0000000..1f223b0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationScenariosResult.java @@ -0,0 +1,241 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PromptSimulationScenarioItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationScenariosResult + */ +@JsonPropertyOrder({ + PromptSimulationScenariosResult.JSON_PROPERTY_COUNT, + PromptSimulationScenariosResult.JSON_PROPERTY_PAGE, + PromptSimulationScenariosResult.JSON_PROPERTY_LIMIT, + PromptSimulationScenariosResult.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationScenariosResult { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_PAGE = "page"; + @javax.annotation.Nullable + private Integer page; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + @javax.annotation.Nullable + private Integer limit; + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public PromptSimulationScenariosResult() { + } + + @JsonCreator + public PromptSimulationScenariosResult( + @JsonProperty(JSON_PROPERTY_COUNT) Integer count, + @JsonProperty(JSON_PROPERTY_PAGE) Integer page, + @JsonProperty(JSON_PROPERTY_LIMIT) Integer limit, + @JsonProperty(JSON_PROPERTY_RESULTS) List results + ) { + this(); + this.count = count; + this.page = page; + this.limit = limit; + this.results = results; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + + + /** + * Get page + * @return page + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPage() { + return page; + } + + + + + /** + * Get limit + * @return limit + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } + + + + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + + + /** + * Return true if this PromptSimulationScenariosResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationScenariosResult promptSimulationScenariosResult = (PromptSimulationScenariosResult) o; + return Objects.equals(this.count, promptSimulationScenariosResult.count) && + Objects.equals(this.page, promptSimulationScenariosResult.page) && + Objects.equals(this.limit, promptSimulationScenariosResult.limit) && + Objects.equals(this.results, promptSimulationScenariosResult.results); + } + + @Override + public int hashCode() { + return Objects.hash(count, page, limit, results); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationScenariosResult {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `page` to the URL query string + if (getPage() != null) { + joiner.add(String.format("%spage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPage())))); + } + + // add `limit` to the URL query string + if (getLimit() != null) { + joiner.add(String.format("%slimit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLimit())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationTemplateSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationTemplateSummary.java new file mode 100644 index 0000000..0dd857d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationTemplateSummary.java @@ -0,0 +1,178 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationTemplateSummary + */ +@JsonPropertyOrder({ + PromptSimulationTemplateSummary.JSON_PROPERTY_ID, + PromptSimulationTemplateSummary.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationTemplateSummary { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public PromptSimulationTemplateSummary() { + } + + @JsonCreator + public PromptSimulationTemplateSummary( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_NAME) String name + ) { + this(); + this.id = id; + this.name = name; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Return true if this PromptSimulationTemplateSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationTemplateSummary promptSimulationTemplateSummary = (PromptSimulationTemplateSummary) o; + return Objects.equals(this.id, promptSimulationTemplateSummary.id) && + Objects.equals(this.name, promptSimulationTemplateSummary.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationTemplateSummary {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationUpdateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationUpdateRequest.java new file mode 100644 index 0000000..abf65df --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptSimulationUpdateRequest.java @@ -0,0 +1,312 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptSimulationUpdateRequest + */ +@JsonPropertyOrder({ + PromptSimulationUpdateRequest.JSON_PROPERTY_PROMPT_VERSION_ID, + PromptSimulationUpdateRequest.JSON_PROPERTY_SCENARIO_IDS, + PromptSimulationUpdateRequest.JSON_PROPERTY_NAME, + PromptSimulationUpdateRequest.JSON_PROPERTY_DESCRIPTION, + PromptSimulationUpdateRequest.JSON_PROPERTY_ENABLE_TOOL_EVALUATION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptSimulationUpdateRequest { + public static final String JSON_PROPERTY_PROMPT_VERSION_ID = "prompt_version_id"; + @javax.annotation.Nullable + private String promptVersionId; + + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nullable + private List scenarioIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_ENABLE_TOOL_EVALUATION = "enable_tool_evaluation"; + @javax.annotation.Nullable + private Boolean enableToolEvaluation; + + public PromptSimulationUpdateRequest() { + } + + public PromptSimulationUpdateRequest promptVersionId(@javax.annotation.Nullable String promptVersionId) { + this.promptVersionId = promptVersionId; + return this; + } + + /** + * Get promptVersionId + * @return promptVersionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPromptVersionId() { + return promptVersionId; + } + + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPromptVersionId(@javax.annotation.Nullable String promptVersionId) { + this.promptVersionId = promptVersionId; + } + + + public PromptSimulationUpdateRequest scenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public PromptSimulationUpdateRequest addScenarioIdsItem(UUID scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new ArrayList<>(); + } + this.scenarioIds.add(scenarioIdsItem); + return this; + } + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + public PromptSimulationUpdateRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public PromptSimulationUpdateRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public PromptSimulationUpdateRequest enableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + return this; + } + + /** + * Get enableToolEvaluation + * @return enableToolEvaluation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableToolEvaluation() { + return enableToolEvaluation; + } + + + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + } + + + /** + * Return true if this PromptSimulationUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptSimulationUpdateRequest promptSimulationUpdateRequest = (PromptSimulationUpdateRequest) o; + return Objects.equals(this.promptVersionId, promptSimulationUpdateRequest.promptVersionId) && + Objects.equals(this.scenarioIds, promptSimulationUpdateRequest.scenarioIds) && + Objects.equals(this.name, promptSimulationUpdateRequest.name) && + Objects.equals(this.description, promptSimulationUpdateRequest.description) && + Objects.equals(this.enableToolEvaluation, promptSimulationUpdateRequest.enableToolEvaluation); + } + + @Override + public int hashCode() { + return Objects.hash(promptVersionId, scenarioIds, name, description, enableToolEvaluation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptSimulationUpdateRequest {\n"); + sb.append(" promptVersionId: ").append(toIndentedString(promptVersionId)).append("\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" enableToolEvaluation: ").append(toIndentedString(enableToolEvaluation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `prompt_version_id` to the URL query string + if (getPromptVersionId() != null) { + joiner.add(String.format("%sprompt_version_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptVersionId())))); + } + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `enable_tool_evaluation` to the URL query string + if (getEnableToolEvaluation() != null) { + joiner.add(String.format("%senable_tool_evaluation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnableToolEvaluation())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptTemplate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptTemplate.java new file mode 100644 index 0000000..046965b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/PromptTemplate.java @@ -0,0 +1,471 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * PromptTemplate + */ +@JsonPropertyOrder({ + PromptTemplate.JSON_PROPERTY_ID, + PromptTemplate.JSON_PROPERTY_NAME, + PromptTemplate.JSON_PROPERTY_DESCRIPTION, + PromptTemplate.JSON_PROPERTY_VARIABLE_NAMES, + PromptTemplate.JSON_PROPERTY_ORGANIZATION, + PromptTemplate.JSON_PROPERTY_PROMPT_FOLDER, + PromptTemplate.JSON_PROPERTY_PLACEHOLDERS, + PromptTemplate.JSON_PROPERTY_CREATED_BY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class PromptTemplate { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_VARIABLE_NAMES = "variable_names"; + @javax.annotation.Nullable + private Map variableNames = new HashMap<>(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + private JsonNullable organization = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_FOLDER = "prompt_folder"; + private JsonNullable promptFolder = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PLACEHOLDERS = "placeholders"; + @javax.annotation.Nullable + private Map placeholders = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private JsonNullable createdBy = JsonNullable.undefined(); + + public PromptTemplate() { + } + + @JsonCreator + public PromptTemplate( + @JsonProperty(JSON_PROPERTY_ID) UUID id + ) { + this(); + this.id = id; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public PromptTemplate name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public PromptTemplate description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public PromptTemplate variableNames(@javax.annotation.Nullable Map variableNames) { + this.variableNames = variableNames; + return this; + } + + public PromptTemplate putVariableNamesItem(String key, Object variableNamesItem) { + if (this.variableNames == null) { + this.variableNames = new HashMap<>(); + } + this.variableNames.put(key, variableNamesItem); + return this; + } + + /** + * Get variableNames + * @return variableNames + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIABLE_NAMES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getVariableNames() { + return variableNames; + } + + + @JsonProperty(JSON_PROPERTY_VARIABLE_NAMES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setVariableNames(@javax.annotation.Nullable Map variableNames) { + this.variableNames = variableNames; + } + + + public PromptTemplate organization(@javax.annotation.Nullable UUID organization) { + this.organization = JsonNullable.of(organization); + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getOrganization() { + return organization.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOrganization_JsonNullable() { + return organization; + } + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + public void setOrganization_JsonNullable(JsonNullable organization) { + this.organization = organization; + } + + public void setOrganization(@javax.annotation.Nullable UUID organization) { + this.organization = JsonNullable.of(organization); + } + + + public PromptTemplate promptFolder(@javax.annotation.Nullable UUID promptFolder) { + this.promptFolder = JsonNullable.of(promptFolder); + return this; + } + + /** + * Get promptFolder + * @return promptFolder + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptFolder() { + return promptFolder.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_FOLDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptFolder_JsonNullable() { + return promptFolder; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_FOLDER) + public void setPromptFolder_JsonNullable(JsonNullable promptFolder) { + this.promptFolder = promptFolder; + } + + public void setPromptFolder(@javax.annotation.Nullable UUID promptFolder) { + this.promptFolder = JsonNullable.of(promptFolder); + } + + + public PromptTemplate placeholders(@javax.annotation.Nullable Map placeholders) { + this.placeholders = placeholders; + return this; + } + + public PromptTemplate putPlaceholdersItem(String key, Object placeholdersItem) { + if (this.placeholders == null) { + this.placeholders = new HashMap<>(); + } + this.placeholders.put(key, placeholdersItem); + return this; + } + + /** + * Get placeholders + * @return placeholders + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLACEHOLDERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPlaceholders() { + return placeholders; + } + + + @JsonProperty(JSON_PROPERTY_PLACEHOLDERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setPlaceholders(@javax.annotation.Nullable Map placeholders) { + this.placeholders = placeholders; + } + + + public PromptTemplate createdBy(@javax.annotation.Nullable UUID createdBy) { + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * Get createdBy + * @return createdBy + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getCreatedBy() { + return createdBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCreatedBy_JsonNullable() { + return createdBy; + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + public void setCreatedBy_JsonNullable(JsonNullable createdBy) { + this.createdBy = createdBy; + } + + public void setCreatedBy(@javax.annotation.Nullable UUID createdBy) { + this.createdBy = JsonNullable.of(createdBy); + } + + + /** + * Return true if this PromptTemplate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromptTemplate promptTemplate = (PromptTemplate) o; + return Objects.equals(this.id, promptTemplate.id) && + Objects.equals(this.name, promptTemplate.name) && + equalsNullable(this.description, promptTemplate.description) && + Objects.equals(this.variableNames, promptTemplate.variableNames) && + equalsNullable(this.organization, promptTemplate.organization) && + equalsNullable(this.promptFolder, promptTemplate.promptFolder) && + Objects.equals(this.placeholders, promptTemplate.placeholders) && + equalsNullable(this.createdBy, promptTemplate.createdBy); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(description), variableNames, hashCodeNullable(organization), hashCodeNullable(promptFolder), placeholders, hashCodeNullable(createdBy)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromptTemplate {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" variableNames: ").append(toIndentedString(variableNames)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" promptFolder: ").append(toIndentedString(promptFolder)).append("\n"); + sb.append(" placeholders: ").append(toIndentedString(placeholders)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `variable_names` to the URL query string + if (getVariableNames() != null) { + for (String _key : getVariableNames().keySet()) { + joiner.add(String.format("%svariable_names%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getVariableNames().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getVariableNames().get(_key))))); + } + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `prompt_folder` to the URL query string + if (getPromptFolder() != null) { + joiner.add(String.format("%sprompt_folder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptFolder())))); + } + + // add `placeholders` to the URL query string + if (getPlaceholders() != null) { + for (String _key : getPlaceholders().keySet()) { + joiner.add(String.format("%splaceholders%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getPlaceholders().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getPlaceholders().get(_key))))); + } + } + + // add `created_by` to the URL query string + if (getCreatedBy() != null) { + joiner.add(String.format("%screated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusItem.java new file mode 100644 index 0000000..7185090 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusItem.java @@ -0,0 +1,404 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ProviderStatusItem + */ +@JsonPropertyOrder({ + ProviderStatusItem.JSON_PROPERTY_PROVIDER, + ProviderStatusItem.JSON_PROPERTY_DISPLAY_NAME, + ProviderStatusItem.JSON_PROPERTY_HAS_KEY, + ProviderStatusItem.JSON_PROPERTY_MASKED_KEY, + ProviderStatusItem.JSON_PROPERTY_LOGO_URL, + ProviderStatusItem.JSON_PROPERTY_TYPE, + ProviderStatusItem.JSON_PROPERTY_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ProviderStatusItem { + public static final String JSON_PROPERTY_PROVIDER = "provider"; + @javax.annotation.Nonnull + private String provider; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + @javax.annotation.Nonnull + private String displayName; + + public static final String JSON_PROPERTY_HAS_KEY = "has_key"; + @javax.annotation.Nonnull + private Boolean hasKey; + + public static final String JSON_PROPERTY_MASKED_KEY = "masked_key"; + private JsonNullable maskedKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LOGO_URL = "logo_url"; + private JsonNullable logoUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public ProviderStatusItem() { + } + + public ProviderStatusItem provider(@javax.annotation.Nonnull String provider) { + this.provider = provider; + return this; + } + + /** + * Get provider + * @return provider + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProvider() { + return provider; + } + + + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProvider(@javax.annotation.Nonnull String provider) { + this.provider = provider; + } + + + public ProviderStatusItem displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public ProviderStatusItem hasKey(@javax.annotation.Nonnull Boolean hasKey) { + this.hasKey = hasKey; + return this; + } + + /** + * Get hasKey + * @return hasKey + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasKey() { + return hasKey; + } + + + @JsonProperty(JSON_PROPERTY_HAS_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasKey(@javax.annotation.Nonnull Boolean hasKey) { + this.hasKey = hasKey; + } + + + public ProviderStatusItem maskedKey(@javax.annotation.Nullable String maskedKey) { + this.maskedKey = JsonNullable.of(maskedKey); + return this; + } + + /** + * Get maskedKey + * @return maskedKey + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMaskedKey() { + return maskedKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MASKED_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMaskedKey_JsonNullable() { + return maskedKey; + } + + @JsonProperty(JSON_PROPERTY_MASKED_KEY) + public void setMaskedKey_JsonNullable(JsonNullable maskedKey) { + this.maskedKey = maskedKey; + } + + public void setMaskedKey(@javax.annotation.Nullable String maskedKey) { + this.maskedKey = JsonNullable.of(maskedKey); + } + + + public ProviderStatusItem logoUrl(@javax.annotation.Nullable String logoUrl) { + this.logoUrl = JsonNullable.of(logoUrl); + return this; + } + + /** + * Get logoUrl + * @return logoUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public String getLogoUrl() { + return logoUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LOGO_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLogoUrl_JsonNullable() { + return logoUrl; + } + + @JsonProperty(JSON_PROPERTY_LOGO_URL) + public void setLogoUrl_JsonNullable(JsonNullable logoUrl) { + this.logoUrl = logoUrl; + } + + public void setLogoUrl(@javax.annotation.Nullable String logoUrl) { + this.logoUrl = JsonNullable.of(logoUrl); + } + + + public ProviderStatusItem type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public ProviderStatusItem id(@javax.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@javax.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + /** + * Return true if this ProviderStatusItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProviderStatusItem providerStatusItem = (ProviderStatusItem) o; + return Objects.equals(this.provider, providerStatusItem.provider) && + Objects.equals(this.displayName, providerStatusItem.displayName) && + Objects.equals(this.hasKey, providerStatusItem.hasKey) && + equalsNullable(this.maskedKey, providerStatusItem.maskedKey) && + equalsNullable(this.logoUrl, providerStatusItem.logoUrl) && + Objects.equals(this.type, providerStatusItem.type) && + equalsNullable(this.id, providerStatusItem.id); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(provider, displayName, hasKey, hashCodeNullable(maskedKey), hashCodeNullable(logoUrl), type, hashCodeNullable(id)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProviderStatusItem {\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" hasKey: ").append(toIndentedString(hasKey)).append("\n"); + sb.append(" maskedKey: ").append(toIndentedString(maskedKey)).append("\n"); + sb.append(" logoUrl: ").append(toIndentedString(logoUrl)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `display_name` to the URL query string + if (getDisplayName() != null) { + joiner.add(String.format("%sdisplay_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDisplayName())))); + } + + // add `has_key` to the URL query string + if (getHasKey() != null) { + joiner.add(String.format("%shas_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHasKey())))); + } + + // add `masked_key` to the URL query string + if (getMaskedKey() != null) { + joiner.add(String.format("%smasked_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaskedKey())))); + } + + // add `logo_url` to the URL query string + if (getLogoUrl() != null) { + joiner.add(String.format("%slogo_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLogoUrl())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResponse.java new file mode 100644 index 0000000..99b1cdc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ProviderStatusResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ProviderStatusResponse + */ +@JsonPropertyOrder({ + ProviderStatusResponse.JSON_PROPERTY_STATUS, + ProviderStatusResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ProviderStatusResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private ProviderStatusResult result; + + public ProviderStatusResponse() { + } + + public ProviderStatusResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public ProviderStatusResponse result(@javax.annotation.Nonnull ProviderStatusResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ProviderStatusResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull ProviderStatusResult result) { + this.result = result; + } + + + /** + * Return true if this ProviderStatusResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProviderStatusResponse providerStatusResponse = (ProviderStatusResponse) o; + return Objects.equals(this.status, providerStatusResponse.status) && + Objects.equals(this.result, providerStatusResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProviderStatusResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResult.java new file mode 100644 index 0000000..d8a9fc2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ProviderStatusResult.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ProviderStatusItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ProviderStatusResult + */ +@JsonPropertyOrder({ + ProviderStatusResult.JSON_PROPERTY_PROVIDERS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ProviderStatusResult { + public static final String JSON_PROPERTY_PROVIDERS = "providers"; + @javax.annotation.Nonnull + private List providers = new ArrayList<>(); + + public ProviderStatusResult() { + } + + public ProviderStatusResult providers(@javax.annotation.Nonnull List providers) { + this.providers = providers; + return this; + } + + public ProviderStatusResult addProvidersItem(ProviderStatusItem providersItem) { + if (this.providers == null) { + this.providers = new ArrayList<>(); + } + this.providers.add(providersItem); + return this; + } + + /** + * Get providers + * @return providers + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProviders() { + return providers; + } + + + @JsonProperty(JSON_PROPERTY_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProviders(@javax.annotation.Nonnull List providers) { + this.providers = providers; + } + + + /** + * Return true if this ProviderStatusResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProviderStatusResult providerStatusResult = (ProviderStatusResult) o; + return Objects.equals(this.providers, providerStatusResult.providers); + } + + @Override + public int hashCode() { + return Objects.hash(providers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProviderStatusResult {\n"); + sb.append(" providers: ").append(toIndentedString(providers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `providers` to the URL query string + if (getProviders() != null) { + for (int i = 0; i < getProviders().size(); i++) { + if (getProviders().get(i) != null) { + joiner.add(getProviders().get(i).toUrlQueryString(String.format("%sproviders%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResponse.java new file mode 100644 index 0000000..ed606d3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAddItemsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAddItemsResponse + */ +@JsonPropertyOrder({ + QueueAddItemsResponse.JSON_PROPERTY_STATUS, + QueueAddItemsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAddItemsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueAddItemsResult result; + + public QueueAddItemsResponse() { + } + + public QueueAddItemsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueAddItemsResponse result(@javax.annotation.Nonnull QueueAddItemsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueAddItemsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueAddItemsResult result) { + this.result = result; + } + + + /** + * Return true if this QueueAddItemsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAddItemsResponse queueAddItemsResponse = (QueueAddItemsResponse) o; + return Objects.equals(this.status, queueAddItemsResponse.status) && + Objects.equals(this.result, queueAddItemsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAddItemsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResult.java new file mode 100644 index 0000000..1403042 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddItemsResult.java @@ -0,0 +1,309 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAddItemsResult + */ +@JsonPropertyOrder({ + QueueAddItemsResult.JSON_PROPERTY_ADDED, + QueueAddItemsResult.JSON_PROPERTY_DUPLICATES, + QueueAddItemsResult.JSON_PROPERTY_ERRORS, + QueueAddItemsResult.JSON_PROPERTY_QUEUE_STATUS, + QueueAddItemsResult.JSON_PROPERTY_TOTAL_MATCHING +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAddItemsResult { + public static final String JSON_PROPERTY_ADDED = "added"; + @javax.annotation.Nonnull + private Integer added; + + public static final String JSON_PROPERTY_DUPLICATES = "duplicates"; + @javax.annotation.Nonnull + private Integer duplicates; + + public static final String JSON_PROPERTY_ERRORS = "errors"; + @javax.annotation.Nonnull + private List errors = new ArrayList<>(); + + public static final String JSON_PROPERTY_QUEUE_STATUS = "queue_status"; + @javax.annotation.Nonnull + private String queueStatus; + + public static final String JSON_PROPERTY_TOTAL_MATCHING = "total_matching"; + @javax.annotation.Nullable + private Integer totalMatching; + + public QueueAddItemsResult() { + } + + public QueueAddItemsResult added(@javax.annotation.Nonnull Integer added) { + this.added = added; + return this; + } + + /** + * Get added + * @return added + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAdded() { + return added; + } + + + @JsonProperty(JSON_PROPERTY_ADDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdded(@javax.annotation.Nonnull Integer added) { + this.added = added; + } + + + public QueueAddItemsResult duplicates(@javax.annotation.Nonnull Integer duplicates) { + this.duplicates = duplicates; + return this; + } + + /** + * Get duplicates + * @return duplicates + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DUPLICATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDuplicates() { + return duplicates; + } + + + @JsonProperty(JSON_PROPERTY_DUPLICATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuplicates(@javax.annotation.Nonnull Integer duplicates) { + this.duplicates = duplicates; + } + + + public QueueAddItemsResult errors(@javax.annotation.Nonnull List errors) { + this.errors = errors; + return this; + } + + public QueueAddItemsResult addErrorsItem(String errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getErrors() { + return errors; + } + + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrors(@javax.annotation.Nonnull List errors) { + this.errors = errors; + } + + + public QueueAddItemsResult queueStatus(@javax.annotation.Nonnull String queueStatus) { + this.queueStatus = queueStatus; + return this; + } + + /** + * Get queueStatus + * @return queueStatus + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUEUE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQueueStatus() { + return queueStatus; + } + + + @JsonProperty(JSON_PROPERTY_QUEUE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQueueStatus(@javax.annotation.Nonnull String queueStatus) { + this.queueStatus = queueStatus; + } + + + public QueueAddItemsResult totalMatching(@javax.annotation.Nullable Integer totalMatching) { + this.totalMatching = totalMatching; + return this; + } + + /** + * Get totalMatching + * @return totalMatching + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_MATCHING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalMatching() { + return totalMatching; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_MATCHING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalMatching(@javax.annotation.Nullable Integer totalMatching) { + this.totalMatching = totalMatching; + } + + + /** + * Return true if this QueueAddItemsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAddItemsResult queueAddItemsResult = (QueueAddItemsResult) o; + return Objects.equals(this.added, queueAddItemsResult.added) && + Objects.equals(this.duplicates, queueAddItemsResult.duplicates) && + Objects.equals(this.errors, queueAddItemsResult.errors) && + Objects.equals(this.queueStatus, queueAddItemsResult.queueStatus) && + Objects.equals(this.totalMatching, queueAddItemsResult.totalMatching); + } + + @Override + public int hashCode() { + return Objects.hash(added, duplicates, errors, queueStatus, totalMatching); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAddItemsResult {\n"); + sb.append(" added: ").append(toIndentedString(added)).append("\n"); + sb.append(" duplicates: ").append(toIndentedString(duplicates)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" queueStatus: ").append(toIndentedString(queueStatus)).append("\n"); + sb.append(" totalMatching: ").append(toIndentedString(totalMatching)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `added` to the URL query string + if (getAdded() != null) { + joiner.add(String.format("%sadded%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdded())))); + } + + // add `duplicates` to the URL query string + if (getDuplicates() != null) { + joiner.add(String.format("%sduplicates%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDuplicates())))); + } + + // add `errors` to the URL query string + if (getErrors() != null) { + for (int i = 0; i < getErrors().size(); i++) { + joiner.add(String.format("%serrors%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getErrors().get(i))))); + } + } + + // add `queue_status` to the URL query string + if (getQueueStatus() != null) { + joiner.add(String.format("%squeue_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueueStatus())))); + } + + // add `total_matching` to the URL query string + if (getTotalMatching() != null) { + joiner.add(String.format("%stotal_matching%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalMatching())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResponse.java new file mode 100644 index 0000000..1ce3b40 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAddLabelResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAddLabelResponse + */ +@JsonPropertyOrder({ + QueueAddLabelResponse.JSON_PROPERTY_STATUS, + QueueAddLabelResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAddLabelResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueAddLabelResult result; + + public QueueAddLabelResponse() { + } + + public QueueAddLabelResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueAddLabelResponse result(@javax.annotation.Nonnull QueueAddLabelResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueAddLabelResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueAddLabelResult result) { + this.result = result; + } + + + /** + * Return true if this QueueAddLabelResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAddLabelResponse queueAddLabelResponse = (QueueAddLabelResponse) o; + return Objects.equals(this.status, queueAddLabelResponse.status) && + Objects.equals(this.result, queueAddLabelResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAddLabelResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResult.java new file mode 100644 index 0000000..f72699c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAddLabelResult.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueLabelResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAddLabelResult + */ +@JsonPropertyOrder({ + QueueAddLabelResult.JSON_PROPERTY_LABEL, + QueueAddLabelResult.JSON_PROPERTY_CREATED, + QueueAddLabelResult.JSON_PROPERTY_REOPENED_ITEMS, + QueueAddLabelResult.JSON_PROPERTY_QUEUE_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAddLabelResult { + public static final String JSON_PROPERTY_LABEL = "label"; + @javax.annotation.Nonnull + private QueueLabelResult label; + + public static final String JSON_PROPERTY_CREATED = "created"; + @javax.annotation.Nonnull + private Boolean created; + + public static final String JSON_PROPERTY_REOPENED_ITEMS = "reopened_items"; + @javax.annotation.Nonnull + private Integer reopenedItems; + + public static final String JSON_PROPERTY_QUEUE_STATUS = "queue_status"; + @javax.annotation.Nonnull + private String queueStatus; + + public QueueAddLabelResult() { + } + + public QueueAddLabelResult label(@javax.annotation.Nonnull QueueLabelResult label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueLabelResult getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(@javax.annotation.Nonnull QueueLabelResult label) { + this.label = label; + } + + + public QueueAddLabelResult created(@javax.annotation.Nonnull Boolean created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCreated() { + return created; + } + + + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreated(@javax.annotation.Nonnull Boolean created) { + this.created = created; + } + + + public QueueAddLabelResult reopenedItems(@javax.annotation.Nonnull Integer reopenedItems) { + this.reopenedItems = reopenedItems; + return this; + } + + /** + * Get reopenedItems + * @return reopenedItems + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REOPENED_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getReopenedItems() { + return reopenedItems; + } + + + @JsonProperty(JSON_PROPERTY_REOPENED_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReopenedItems(@javax.annotation.Nonnull Integer reopenedItems) { + this.reopenedItems = reopenedItems; + } + + + public QueueAddLabelResult queueStatus(@javax.annotation.Nonnull String queueStatus) { + this.queueStatus = queueStatus; + return this; + } + + /** + * Get queueStatus + * @return queueStatus + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUEUE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQueueStatus() { + return queueStatus; + } + + + @JsonProperty(JSON_PROPERTY_QUEUE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQueueStatus(@javax.annotation.Nonnull String queueStatus) { + this.queueStatus = queueStatus; + } + + + /** + * Return true if this QueueAddLabelResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAddLabelResult queueAddLabelResult = (QueueAddLabelResult) o; + return Objects.equals(this.label, queueAddLabelResult.label) && + Objects.equals(this.created, queueAddLabelResult.created) && + Objects.equals(this.reopenedItems, queueAddLabelResult.reopenedItems) && + Objects.equals(this.queueStatus, queueAddLabelResult.queueStatus); + } + + @Override + public int hashCode() { + return Objects.hash(label, created, reopenedItems, queueStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAddLabelResult {\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" reopenedItems: ").append(toIndentedString(reopenedItems)).append("\n"); + sb.append(" queueStatus: ").append(toIndentedString(queueStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(getLabel().toUrlQueryString(prefix + "label" + suffix)); + } + + // add `created` to the URL query string + if (getCreated() != null) { + joiner.add(String.format("%screated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreated())))); + } + + // add `reopened_items` to the URL query string + if (getReopenedItems() != null) { + joiner.add(String.format("%sreopened_items%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReopenedItems())))); + } + + // add `queue_status` to the URL query string + if (getQueueStatus() != null) { + joiner.add(String.format("%squeue_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueueStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementAnnotatorPair.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementAnnotatorPair.java new file mode 100644 index 0000000..7c4897d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementAnnotatorPair.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAgreementAnnotatorPair + */ +@JsonPropertyOrder({ + QueueAgreementAnnotatorPair.JSON_PROPERTY_ANNOTATOR1_ID, + QueueAgreementAnnotatorPair.JSON_PROPERTY_ANNOTATOR2_ID, + QueueAgreementAnnotatorPair.JSON_PROPERTY_AGREEMENT_PCT, + QueueAgreementAnnotatorPair.JSON_PROPERTY_TOTAL_COMPARISONS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAgreementAnnotatorPair { + public static final String JSON_PROPERTY_ANNOTATOR1_ID = "annotator_1_id"; + @javax.annotation.Nonnull + private String annotator1Id; + + public static final String JSON_PROPERTY_ANNOTATOR2_ID = "annotator_2_id"; + @javax.annotation.Nonnull + private String annotator2Id; + + public static final String JSON_PROPERTY_AGREEMENT_PCT = "agreement_pct"; + @javax.annotation.Nonnull + private BigDecimal agreementPct; + + public static final String JSON_PROPERTY_TOTAL_COMPARISONS = "total_comparisons"; + @javax.annotation.Nonnull + private Integer totalComparisons; + + public QueueAgreementAnnotatorPair() { + } + + public QueueAgreementAnnotatorPair annotator1Id(@javax.annotation.Nonnull String annotator1Id) { + this.annotator1Id = annotator1Id; + return this; + } + + /** + * Get annotator1Id + * @return annotator1Id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATOR1_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAnnotator1Id() { + return annotator1Id; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR1_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotator1Id(@javax.annotation.Nonnull String annotator1Id) { + this.annotator1Id = annotator1Id; + } + + + public QueueAgreementAnnotatorPair annotator2Id(@javax.annotation.Nonnull String annotator2Id) { + this.annotator2Id = annotator2Id; + return this; + } + + /** + * Get annotator2Id + * @return annotator2Id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATOR2_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAnnotator2Id() { + return annotator2Id; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR2_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotator2Id(@javax.annotation.Nonnull String annotator2Id) { + this.annotator2Id = annotator2Id; + } + + + public QueueAgreementAnnotatorPair agreementPct(@javax.annotation.Nonnull BigDecimal agreementPct) { + this.agreementPct = agreementPct; + return this; + } + + /** + * Get agreementPct + * @return agreementPct + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGREEMENT_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAgreementPct() { + return agreementPct; + } + + + @JsonProperty(JSON_PROPERTY_AGREEMENT_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgreementPct(@javax.annotation.Nonnull BigDecimal agreementPct) { + this.agreementPct = agreementPct; + } + + + public QueueAgreementAnnotatorPair totalComparisons(@javax.annotation.Nonnull Integer totalComparisons) { + this.totalComparisons = totalComparisons; + return this; + } + + /** + * Get totalComparisons + * @return totalComparisons + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalComparisons() { + return totalComparisons; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_COMPARISONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalComparisons(@javax.annotation.Nonnull Integer totalComparisons) { + this.totalComparisons = totalComparisons; + } + + + /** + * Return true if this QueueAgreementAnnotatorPair object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAgreementAnnotatorPair queueAgreementAnnotatorPair = (QueueAgreementAnnotatorPair) o; + return Objects.equals(this.annotator1Id, queueAgreementAnnotatorPair.annotator1Id) && + Objects.equals(this.annotator2Id, queueAgreementAnnotatorPair.annotator2Id) && + Objects.equals(this.agreementPct, queueAgreementAnnotatorPair.agreementPct) && + Objects.equals(this.totalComparisons, queueAgreementAnnotatorPair.totalComparisons); + } + + @Override + public int hashCode() { + return Objects.hash(annotator1Id, annotator2Id, agreementPct, totalComparisons); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAgreementAnnotatorPair {\n"); + sb.append(" annotator1Id: ").append(toIndentedString(annotator1Id)).append("\n"); + sb.append(" annotator2Id: ").append(toIndentedString(annotator2Id)).append("\n"); + sb.append(" agreementPct: ").append(toIndentedString(agreementPct)).append("\n"); + sb.append(" totalComparisons: ").append(toIndentedString(totalComparisons)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `annotator_1_id` to the URL query string + if (getAnnotator1Id() != null) { + joiner.add(String.format("%sannotator_1_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotator1Id())))); + } + + // add `annotator_2_id` to the URL query string + if (getAnnotator2Id() != null) { + joiner.add(String.format("%sannotator_2_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotator2Id())))); + } + + // add `agreement_pct` to the URL query string + if (getAgreementPct() != null) { + joiner.add(String.format("%sagreement_pct%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgreementPct())))); + } + + // add `total_comparisons` to the URL query string + if (getTotalComparisons() != null) { + joiner.add(String.format("%stotal_comparisons%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalComparisons())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementLabel.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementLabel.java new file mode 100644 index 0000000..17cfca2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementLabel.java @@ -0,0 +1,346 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAgreementLabel + */ +@JsonPropertyOrder({ + QueueAgreementLabel.JSON_PROPERTY_LABEL_NAME, + QueueAgreementLabel.JSON_PROPERTY_LABEL_TYPE, + QueueAgreementLabel.JSON_PROPERTY_AGREEMENT_PCT, + QueueAgreementLabel.JSON_PROPERTY_COHENS_KAPPA, + QueueAgreementLabel.JSON_PROPERTY_DISAGREEMENT_COUNT, + QueueAgreementLabel.JSON_PROPERTY_DISAGREEMENT_ITEMS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAgreementLabel { + public static final String JSON_PROPERTY_LABEL_NAME = "label_name"; + @javax.annotation.Nullable + private String labelName; + + public static final String JSON_PROPERTY_LABEL_TYPE = "label_type"; + @javax.annotation.Nullable + private String labelType; + + public static final String JSON_PROPERTY_AGREEMENT_PCT = "agreement_pct"; + @javax.annotation.Nullable + private BigDecimal agreementPct; + + public static final String JSON_PROPERTY_COHENS_KAPPA = "cohens_kappa"; + @javax.annotation.Nullable + private BigDecimal cohensKappa; + + public static final String JSON_PROPERTY_DISAGREEMENT_COUNT = "disagreement_count"; + @javax.annotation.Nonnull + private Integer disagreementCount; + + public static final String JSON_PROPERTY_DISAGREEMENT_ITEMS = "disagreement_items"; + @javax.annotation.Nonnull + private List disagreementItems = new ArrayList<>(); + + public QueueAgreementLabel() { + } + + public QueueAgreementLabel labelName(@javax.annotation.Nullable String labelName) { + this.labelName = labelName; + return this; + } + + /** + * Get labelName + * @return labelName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabelName() { + return labelName; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelName(@javax.annotation.Nullable String labelName) { + this.labelName = labelName; + } + + + public QueueAgreementLabel labelType(@javax.annotation.Nullable String labelType) { + this.labelType = labelType; + return this; + } + + /** + * Get labelType + * @return labelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabelType() { + return labelType; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelType(@javax.annotation.Nullable String labelType) { + this.labelType = labelType; + } + + + public QueueAgreementLabel agreementPct(@javax.annotation.Nullable BigDecimal agreementPct) { + this.agreementPct = agreementPct; + return this; + } + + /** + * Get agreementPct + * @return agreementPct + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGREEMENT_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAgreementPct() { + return agreementPct; + } + + + @JsonProperty(JSON_PROPERTY_AGREEMENT_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgreementPct(@javax.annotation.Nullable BigDecimal agreementPct) { + this.agreementPct = agreementPct; + } + + + public QueueAgreementLabel cohensKappa(@javax.annotation.Nullable BigDecimal cohensKappa) { + this.cohensKappa = cohensKappa; + return this; + } + + /** + * Get cohensKappa + * @return cohensKappa + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COHENS_KAPPA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCohensKappa() { + return cohensKappa; + } + + + @JsonProperty(JSON_PROPERTY_COHENS_KAPPA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCohensKappa(@javax.annotation.Nullable BigDecimal cohensKappa) { + this.cohensKappa = cohensKappa; + } + + + public QueueAgreementLabel disagreementCount(@javax.annotation.Nonnull Integer disagreementCount) { + this.disagreementCount = disagreementCount; + return this; + } + + /** + * Get disagreementCount + * @return disagreementCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISAGREEMENT_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDisagreementCount() { + return disagreementCount; + } + + + @JsonProperty(JSON_PROPERTY_DISAGREEMENT_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisagreementCount(@javax.annotation.Nonnull Integer disagreementCount) { + this.disagreementCount = disagreementCount; + } + + + public QueueAgreementLabel disagreementItems(@javax.annotation.Nonnull List disagreementItems) { + this.disagreementItems = disagreementItems; + return this; + } + + public QueueAgreementLabel addDisagreementItemsItem(String disagreementItemsItem) { + if (this.disagreementItems == null) { + this.disagreementItems = new ArrayList<>(); + } + this.disagreementItems.add(disagreementItemsItem); + return this; + } + + /** + * Get disagreementItems + * @return disagreementItems + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISAGREEMENT_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDisagreementItems() { + return disagreementItems; + } + + + @JsonProperty(JSON_PROPERTY_DISAGREEMENT_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisagreementItems(@javax.annotation.Nonnull List disagreementItems) { + this.disagreementItems = disagreementItems; + } + + + /** + * Return true if this QueueAgreementLabel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAgreementLabel queueAgreementLabel = (QueueAgreementLabel) o; + return Objects.equals(this.labelName, queueAgreementLabel.labelName) && + Objects.equals(this.labelType, queueAgreementLabel.labelType) && + Objects.equals(this.agreementPct, queueAgreementLabel.agreementPct) && + Objects.equals(this.cohensKappa, queueAgreementLabel.cohensKappa) && + Objects.equals(this.disagreementCount, queueAgreementLabel.disagreementCount) && + Objects.equals(this.disagreementItems, queueAgreementLabel.disagreementItems); + } + + @Override + public int hashCode() { + return Objects.hash(labelName, labelType, agreementPct, cohensKappa, disagreementCount, disagreementItems); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAgreementLabel {\n"); + sb.append(" labelName: ").append(toIndentedString(labelName)).append("\n"); + sb.append(" labelType: ").append(toIndentedString(labelType)).append("\n"); + sb.append(" agreementPct: ").append(toIndentedString(agreementPct)).append("\n"); + sb.append(" cohensKappa: ").append(toIndentedString(cohensKappa)).append("\n"); + sb.append(" disagreementCount: ").append(toIndentedString(disagreementCount)).append("\n"); + sb.append(" disagreementItems: ").append(toIndentedString(disagreementItems)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label_name` to the URL query string + if (getLabelName() != null) { + joiner.add(String.format("%slabel_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelName())))); + } + + // add `label_type` to the URL query string + if (getLabelType() != null) { + joiner.add(String.format("%slabel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelType())))); + } + + // add `agreement_pct` to the URL query string + if (getAgreementPct() != null) { + joiner.add(String.format("%sagreement_pct%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgreementPct())))); + } + + // add `cohens_kappa` to the URL query string + if (getCohensKappa() != null) { + joiner.add(String.format("%scohens_kappa%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCohensKappa())))); + } + + // add `disagreement_count` to the URL query string + if (getDisagreementCount() != null) { + joiner.add(String.format("%sdisagreement_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDisagreementCount())))); + } + + // add `disagreement_items` to the URL query string + if (getDisagreementItems() != null) { + for (int i = 0; i < getDisagreementItems().size(); i++) { + joiner.add(String.format("%sdisagreement_items%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDisagreementItems().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResponse.java new file mode 100644 index 0000000..a900b43 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAgreementResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAgreementResponse + */ +@JsonPropertyOrder({ + QueueAgreementResponse.JSON_PROPERTY_STATUS, + QueueAgreementResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAgreementResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueAgreementResult result; + + public QueueAgreementResponse() { + } + + public QueueAgreementResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueAgreementResponse result(@javax.annotation.Nonnull QueueAgreementResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueAgreementResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueAgreementResult result) { + this.result = result; + } + + + /** + * Return true if this QueueAgreementResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAgreementResponse queueAgreementResponse = (QueueAgreementResponse) o; + return Objects.equals(this.status, queueAgreementResponse.status) && + Objects.equals(this.result, queueAgreementResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAgreementResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResult.java new file mode 100644 index 0000000..037da28 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAgreementResult.java @@ -0,0 +1,256 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAgreementAnnotatorPair; +import com.futureagi.sdk.model.QueueAgreementLabel; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAgreementResult + */ +@JsonPropertyOrder({ + QueueAgreementResult.JSON_PROPERTY_OVERALL_AGREEMENT, + QueueAgreementResult.JSON_PROPERTY_LABELS, + QueueAgreementResult.JSON_PROPERTY_ANNOTATOR_PAIRS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAgreementResult { + public static final String JSON_PROPERTY_OVERALL_AGREEMENT = "overall_agreement"; + @javax.annotation.Nullable + private BigDecimal overallAgreement; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nonnull + private Map labels = new HashMap<>(); + + public static final String JSON_PROPERTY_ANNOTATOR_PAIRS = "annotator_pairs"; + @javax.annotation.Nonnull + private List annotatorPairs = new ArrayList<>(); + + public QueueAgreementResult() { + } + + public QueueAgreementResult overallAgreement(@javax.annotation.Nullable BigDecimal overallAgreement) { + this.overallAgreement = overallAgreement; + return this; + } + + /** + * Get overallAgreement + * @return overallAgreement + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL_AGREEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getOverallAgreement() { + return overallAgreement; + } + + + @JsonProperty(JSON_PROPERTY_OVERALL_AGREEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOverallAgreement(@javax.annotation.Nullable BigDecimal overallAgreement) { + this.overallAgreement = overallAgreement; + } + + + public QueueAgreementResult labels(@javax.annotation.Nonnull Map labels) { + this.labels = labels; + return this; + } + + public QueueAgreementResult putLabelsItem(String key, QueueAgreementLabel labelsItem) { + if (this.labels == null) { + this.labels = new HashMap<>(); + } + this.labels.put(key, labelsItem); + return this; + } + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getLabels() { + return labels; + } + + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabels(@javax.annotation.Nonnull Map labels) { + this.labels = labels; + } + + + public QueueAgreementResult annotatorPairs(@javax.annotation.Nonnull List annotatorPairs) { + this.annotatorPairs = annotatorPairs; + return this; + } + + public QueueAgreementResult addAnnotatorPairsItem(QueueAgreementAnnotatorPair annotatorPairsItem) { + if (this.annotatorPairs == null) { + this.annotatorPairs = new ArrayList<>(); + } + this.annotatorPairs.add(annotatorPairsItem); + return this; + } + + /** + * Get annotatorPairs + * @return annotatorPairs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATOR_PAIRS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotatorPairs() { + return annotatorPairs; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_PAIRS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotatorPairs(@javax.annotation.Nonnull List annotatorPairs) { + this.annotatorPairs = annotatorPairs; + } + + + /** + * Return true if this QueueAgreementResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAgreementResult queueAgreementResult = (QueueAgreementResult) o; + return Objects.equals(this.overallAgreement, queueAgreementResult.overallAgreement) && + Objects.equals(this.labels, queueAgreementResult.labels) && + Objects.equals(this.annotatorPairs, queueAgreementResult.annotatorPairs); + } + + @Override + public int hashCode() { + return Objects.hash(overallAgreement, labels, annotatorPairs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAgreementResult {\n"); + sb.append(" overallAgreement: ").append(toIndentedString(overallAgreement)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" annotatorPairs: ").append(toIndentedString(annotatorPairs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `overall_agreement` to the URL query string + if (getOverallAgreement() != null) { + joiner.add(String.format("%soverall_agreement%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallAgreement())))); + } + + // add `labels` to the URL query string + if (getLabels() != null) { + for (String _key : getLabels().keySet()) { + if (getLabels().get(_key) != null) { + joiner.add(getLabels().get(_key).toUrlQueryString(String.format("%slabels%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + + // add `annotator_pairs` to the URL query string + if (getAnnotatorPairs() != null) { + for (int i = 0; i < getAnnotatorPairs().size(); i++) { + if (getAnnotatorPairs().get(i) != null) { + joiner.add(getAnnotatorPairs().get(i).toUrlQueryString(String.format("%sannotator_pairs%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsAnnotatorPerformance.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsAnnotatorPerformance.java new file mode 100644 index 0000000..f9e6367 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsAnnotatorPerformance.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnalyticsAnnotatorPerformance + */ +@JsonPropertyOrder({ + QueueAnalyticsAnnotatorPerformance.JSON_PROPERTY_USER_ID, + QueueAnalyticsAnnotatorPerformance.JSON_PROPERTY_NAME, + QueueAnalyticsAnnotatorPerformance.JSON_PROPERTY_COMPLETED, + QueueAnalyticsAnnotatorPerformance.JSON_PROPERTY_LAST_ACTIVE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnalyticsAnnotatorPerformance { + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private JsonNullable userId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED = "completed"; + @javax.annotation.Nonnull + private Integer completed; + + public static final String JSON_PROPERTY_LAST_ACTIVE = "last_active"; + private JsonNullable lastActive = JsonNullable.undefined(); + + public QueueAnalyticsAnnotatorPerformance() { + } + + public QueueAnalyticsAnnotatorPerformance userId(@javax.annotation.Nullable String userId) { + this.userId = JsonNullable.of(userId); + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getUserId() { + return userId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUserId_JsonNullable() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + public void setUserId_JsonNullable(JsonNullable userId) { + this.userId = userId; + } + + public void setUserId(@javax.annotation.Nullable String userId) { + this.userId = JsonNullable.of(userId); + } + + + public QueueAnalyticsAnnotatorPerformance name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public QueueAnalyticsAnnotatorPerformance completed(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + return this; + } + + /** + * Get completed + * @return completed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCompleted() { + return completed; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompleted(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + } + + + public QueueAnalyticsAnnotatorPerformance lastActive(@javax.annotation.Nullable OffsetDateTime lastActive) { + this.lastActive = JsonNullable.of(lastActive); + return this; + } + + /** + * Get lastActive + * @return lastActive + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getLastActive() { + return lastActive.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastActive_JsonNullable() { + return lastActive; + } + + @JsonProperty(JSON_PROPERTY_LAST_ACTIVE) + public void setLastActive_JsonNullable(JsonNullable lastActive) { + this.lastActive = lastActive; + } + + public void setLastActive(@javax.annotation.Nullable OffsetDateTime lastActive) { + this.lastActive = JsonNullable.of(lastActive); + } + + + /** + * Return true if this QueueAnalyticsAnnotatorPerformance object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnalyticsAnnotatorPerformance queueAnalyticsAnnotatorPerformance = (QueueAnalyticsAnnotatorPerformance) o; + return equalsNullable(this.userId, queueAnalyticsAnnotatorPerformance.userId) && + equalsNullable(this.name, queueAnalyticsAnnotatorPerformance.name) && + Objects.equals(this.completed, queueAnalyticsAnnotatorPerformance.completed) && + equalsNullable(this.lastActive, queueAnalyticsAnnotatorPerformance.lastActive); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(userId), hashCodeNullable(name), completed, hashCodeNullable(lastActive)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnalyticsAnnotatorPerformance {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" completed: ").append(toIndentedString(completed)).append("\n"); + sb.append(" lastActive: ").append(toIndentedString(lastActive)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `completed` to the URL query string + if (getCompleted() != null) { + joiner.add(String.format("%scompleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompleted())))); + } + + // add `last_active` to the URL query string + if (getLastActive() != null) { + joiner.add(String.format("%slast_active%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastActive())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResponse.java new file mode 100644 index 0000000..3bc31ba --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAnalyticsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnalyticsResponse + */ +@JsonPropertyOrder({ + QueueAnalyticsResponse.JSON_PROPERTY_STATUS, + QueueAnalyticsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnalyticsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueAnalyticsResult result; + + public QueueAnalyticsResponse() { + } + + public QueueAnalyticsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueAnalyticsResponse result(@javax.annotation.Nonnull QueueAnalyticsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueAnalyticsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueAnalyticsResult result) { + this.result = result; + } + + + /** + * Return true if this QueueAnalyticsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnalyticsResponse queueAnalyticsResponse = (QueueAnalyticsResponse) o; + return Objects.equals(this.status, queueAnalyticsResponse.status) && + Objects.equals(this.result, queueAnalyticsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnalyticsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResult.java new file mode 100644 index 0000000..f03a331 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsResult.java @@ -0,0 +1,338 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAnalyticsAnnotatorPerformance; +import com.futureagi.sdk.model.QueueAnalyticsThroughput; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnalyticsResult + */ +@JsonPropertyOrder({ + QueueAnalyticsResult.JSON_PROPERTY_THROUGHPUT, + QueueAnalyticsResult.JSON_PROPERTY_ANNOTATOR_PERFORMANCE, + QueueAnalyticsResult.JSON_PROPERTY_LABEL_DISTRIBUTION, + QueueAnalyticsResult.JSON_PROPERTY_STATUS_BREAKDOWN, + QueueAnalyticsResult.JSON_PROPERTY_TOTAL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnalyticsResult { + public static final String JSON_PROPERTY_THROUGHPUT = "throughput"; + @javax.annotation.Nonnull + private QueueAnalyticsThroughput throughput; + + public static final String JSON_PROPERTY_ANNOTATOR_PERFORMANCE = "annotator_performance"; + @javax.annotation.Nonnull + private List annotatorPerformance = new ArrayList<>(); + + public static final String JSON_PROPERTY_LABEL_DISTRIBUTION = "label_distribution"; + @javax.annotation.Nonnull + private Map> labelDistribution = new HashMap<>(); + + public static final String JSON_PROPERTY_STATUS_BREAKDOWN = "status_breakdown"; + @javax.annotation.Nonnull + private Map statusBreakdown = new HashMap<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public QueueAnalyticsResult() { + } + + public QueueAnalyticsResult throughput(@javax.annotation.Nonnull QueueAnalyticsThroughput throughput) { + this.throughput = throughput; + return this; + } + + /** + * Get throughput + * @return throughput + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_THROUGHPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueAnalyticsThroughput getThroughput() { + return throughput; + } + + + @JsonProperty(JSON_PROPERTY_THROUGHPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setThroughput(@javax.annotation.Nonnull QueueAnalyticsThroughput throughput) { + this.throughput = throughput; + } + + + public QueueAnalyticsResult annotatorPerformance(@javax.annotation.Nonnull List annotatorPerformance) { + this.annotatorPerformance = annotatorPerformance; + return this; + } + + public QueueAnalyticsResult addAnnotatorPerformanceItem(QueueAnalyticsAnnotatorPerformance annotatorPerformanceItem) { + if (this.annotatorPerformance == null) { + this.annotatorPerformance = new ArrayList<>(); + } + this.annotatorPerformance.add(annotatorPerformanceItem); + return this; + } + + /** + * Get annotatorPerformance + * @return annotatorPerformance + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATOR_PERFORMANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotatorPerformance() { + return annotatorPerformance; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_PERFORMANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotatorPerformance(@javax.annotation.Nonnull List annotatorPerformance) { + this.annotatorPerformance = annotatorPerformance; + } + + + public QueueAnalyticsResult labelDistribution(@javax.annotation.Nonnull Map> labelDistribution) { + this.labelDistribution = labelDistribution; + return this; + } + + public QueueAnalyticsResult putLabelDistributionItem(String key, Map labelDistributionItem) { + if (this.labelDistribution == null) { + this.labelDistribution = new HashMap<>(); + } + this.labelDistribution.put(key, labelDistributionItem); + return this; + } + + /** + * Get labelDistribution + * @return labelDistribution + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL_DISTRIBUTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getLabelDistribution() { + return labelDistribution; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_DISTRIBUTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelDistribution(@javax.annotation.Nonnull Map> labelDistribution) { + this.labelDistribution = labelDistribution; + } + + + public QueueAnalyticsResult statusBreakdown(@javax.annotation.Nonnull Map statusBreakdown) { + this.statusBreakdown = statusBreakdown; + return this; + } + + public QueueAnalyticsResult putStatusBreakdownItem(String key, Integer statusBreakdownItem) { + if (this.statusBreakdown == null) { + this.statusBreakdown = new HashMap<>(); + } + this.statusBreakdown.put(key, statusBreakdownItem); + return this; + } + + /** + * Get statusBreakdown + * @return statusBreakdown + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS_BREAKDOWN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getStatusBreakdown() { + return statusBreakdown; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_BREAKDOWN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatusBreakdown(@javax.annotation.Nonnull Map statusBreakdown) { + this.statusBreakdown = statusBreakdown; + } + + + public QueueAnalyticsResult total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + /** + * Return true if this QueueAnalyticsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnalyticsResult queueAnalyticsResult = (QueueAnalyticsResult) o; + return Objects.equals(this.throughput, queueAnalyticsResult.throughput) && + Objects.equals(this.annotatorPerformance, queueAnalyticsResult.annotatorPerformance) && + Objects.equals(this.labelDistribution, queueAnalyticsResult.labelDistribution) && + Objects.equals(this.statusBreakdown, queueAnalyticsResult.statusBreakdown) && + Objects.equals(this.total, queueAnalyticsResult.total); + } + + @Override + public int hashCode() { + return Objects.hash(throughput, annotatorPerformance, labelDistribution, statusBreakdown, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnalyticsResult {\n"); + sb.append(" throughput: ").append(toIndentedString(throughput)).append("\n"); + sb.append(" annotatorPerformance: ").append(toIndentedString(annotatorPerformance)).append("\n"); + sb.append(" labelDistribution: ").append(toIndentedString(labelDistribution)).append("\n"); + sb.append(" statusBreakdown: ").append(toIndentedString(statusBreakdown)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `throughput` to the URL query string + if (getThroughput() != null) { + joiner.add(getThroughput().toUrlQueryString(prefix + "throughput" + suffix)); + } + + // add `annotator_performance` to the URL query string + if (getAnnotatorPerformance() != null) { + for (int i = 0; i < getAnnotatorPerformance().size(); i++) { + if (getAnnotatorPerformance().get(i) != null) { + joiner.add(getAnnotatorPerformance().get(i).toUrlQueryString(String.format("%sannotator_performance%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `label_distribution` to the URL query string + if (getLabelDistribution() != null) { + for (String _key : getLabelDistribution().keySet()) { + joiner.add(String.format("%slabel_distribution%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLabelDistribution().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLabelDistribution().get(_key))))); + } + } + + // add `status_breakdown` to the URL query string + if (getStatusBreakdown() != null) { + for (String _key : getStatusBreakdown().keySet()) { + joiner.add(String.format("%sstatus_breakdown%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getStatusBreakdown().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getStatusBreakdown().get(_key))))); + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughput.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughput.java new file mode 100644 index 0000000..48f7be8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughput.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAnalyticsThroughputDaily; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnalyticsThroughput + */ +@JsonPropertyOrder({ + QueueAnalyticsThroughput.JSON_PROPERTY_DAILY, + QueueAnalyticsThroughput.JSON_PROPERTY_TOTAL_COMPLETED, + QueueAnalyticsThroughput.JSON_PROPERTY_AVG_PER_DAY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnalyticsThroughput { + public static final String JSON_PROPERTY_DAILY = "daily"; + @javax.annotation.Nonnull + private List daily = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_COMPLETED = "total_completed"; + @javax.annotation.Nonnull + private Integer totalCompleted; + + public static final String JSON_PROPERTY_AVG_PER_DAY = "avg_per_day"; + @javax.annotation.Nonnull + private BigDecimal avgPerDay; + + public QueueAnalyticsThroughput() { + } + + public QueueAnalyticsThroughput daily(@javax.annotation.Nonnull List daily) { + this.daily = daily; + return this; + } + + public QueueAnalyticsThroughput addDailyItem(QueueAnalyticsThroughputDaily dailyItem) { + if (this.daily == null) { + this.daily = new ArrayList<>(); + } + this.daily.add(dailyItem); + return this; + } + + /** + * Get daily + * @return daily + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDaily() { + return daily; + } + + + @JsonProperty(JSON_PROPERTY_DAILY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDaily(@javax.annotation.Nonnull List daily) { + this.daily = daily; + } + + + public QueueAnalyticsThroughput totalCompleted(@javax.annotation.Nonnull Integer totalCompleted) { + this.totalCompleted = totalCompleted; + return this; + } + + /** + * Get totalCompleted + * @return totalCompleted + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalCompleted() { + return totalCompleted; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalCompleted(@javax.annotation.Nonnull Integer totalCompleted) { + this.totalCompleted = totalCompleted; + } + + + public QueueAnalyticsThroughput avgPerDay(@javax.annotation.Nonnull BigDecimal avgPerDay) { + this.avgPerDay = avgPerDay; + return this; + } + + /** + * Get avgPerDay + * @return avgPerDay + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_PER_DAY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgPerDay() { + return avgPerDay; + } + + + @JsonProperty(JSON_PROPERTY_AVG_PER_DAY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgPerDay(@javax.annotation.Nonnull BigDecimal avgPerDay) { + this.avgPerDay = avgPerDay; + } + + + /** + * Return true if this QueueAnalyticsThroughput object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnalyticsThroughput queueAnalyticsThroughput = (QueueAnalyticsThroughput) o; + return Objects.equals(this.daily, queueAnalyticsThroughput.daily) && + Objects.equals(this.totalCompleted, queueAnalyticsThroughput.totalCompleted) && + Objects.equals(this.avgPerDay, queueAnalyticsThroughput.avgPerDay); + } + + @Override + public int hashCode() { + return Objects.hash(daily, totalCompleted, avgPerDay); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnalyticsThroughput {\n"); + sb.append(" daily: ").append(toIndentedString(daily)).append("\n"); + sb.append(" totalCompleted: ").append(toIndentedString(totalCompleted)).append("\n"); + sb.append(" avgPerDay: ").append(toIndentedString(avgPerDay)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `daily` to the URL query string + if (getDaily() != null) { + for (int i = 0; i < getDaily().size(); i++) { + if (getDaily().get(i) != null) { + joiner.add(getDaily().get(i).toUrlQueryString(String.format("%sdaily%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_completed` to the URL query string + if (getTotalCompleted() != null) { + joiner.add(String.format("%stotal_completed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCompleted())))); + } + + // add `avg_per_day` to the URL query string + if (getAvgPerDay() != null) { + joiner.add(String.format("%savg_per_day%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgPerDay())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughputDaily.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughputDaily.java new file mode 100644 index 0000000..817341f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnalyticsThroughputDaily.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnalyticsThroughputDaily + */ +@JsonPropertyOrder({ + QueueAnalyticsThroughputDaily.JSON_PROPERTY_DATE, + QueueAnalyticsThroughputDaily.JSON_PROPERTY_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnalyticsThroughputDaily { + public static final String JSON_PROPERTY_DATE = "date"; + @javax.annotation.Nonnull + private String date; + + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public QueueAnalyticsThroughputDaily() { + } + + public QueueAnalyticsThroughputDaily date(@javax.annotation.Nonnull String date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDate() { + return date; + } + + + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDate(@javax.annotation.Nonnull String date) { + this.date = date; + } + + + public QueueAnalyticsThroughputDaily count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + /** + * Return true if this QueueAnalyticsThroughputDaily object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnalyticsThroughputDaily queueAnalyticsThroughputDaily = (QueueAnalyticsThroughputDaily) o; + return Objects.equals(this.date, queueAnalyticsThroughputDaily.date) && + Objects.equals(this.count, queueAnalyticsThroughputDaily.count); + } + + @Override + public int hashCode() { + return Objects.hash(date, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnalyticsThroughputDaily {\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `date` to the URL query string + if (getDate() != null) { + joiner.add(String.format("%sdate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDate())))); + } + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResponse.java new file mode 100644 index 0000000..657eb76 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAnnotateDetailResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnnotateDetailResponse + */ +@JsonPropertyOrder({ + QueueAnnotateDetailResponse.JSON_PROPERTY_STATUS, + QueueAnnotateDetailResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnnotateDetailResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueAnnotateDetailResult result; + + public QueueAnnotateDetailResponse() { + } + + public QueueAnnotateDetailResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueAnnotateDetailResponse result(@javax.annotation.Nonnull QueueAnnotateDetailResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueAnnotateDetailResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueAnnotateDetailResult result) { + this.result = result; + } + + + /** + * Return true if this QueueAnnotateDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnnotateDetailResponse queueAnnotateDetailResponse = (QueueAnnotateDetailResponse) o; + return Objects.equals(this.status, queueAnnotateDetailResponse.status) && + Objects.equals(this.result, queueAnnotateDetailResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnnotateDetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResult.java new file mode 100644 index 0000000..1237ccc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotateDetailResult.java @@ -0,0 +1,683 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnnotateDetailResult + */ +@JsonPropertyOrder({ + QueueAnnotateDetailResult.JSON_PROPERTY_ITEM, + QueueAnnotateDetailResult.JSON_PROPERTY_QUEUE, + QueueAnnotateDetailResult.JSON_PROPERTY_LABELS, + QueueAnnotateDetailResult.JSON_PROPERTY_ANNOTATIONS, + QueueAnnotateDetailResult.JSON_PROPERTY_REVIEW_COMMENTS, + QueueAnnotateDetailResult.JSON_PROPERTY_REVIEW_THREADS, + QueueAnnotateDetailResult.JSON_PROPERTY_EXISTING_NOTES, + QueueAnnotateDetailResult.JSON_PROPERTY_SPAN_NOTES, + QueueAnnotateDetailResult.JSON_PROPERTY_SPAN_NOTES_SOURCE_ID, + QueueAnnotateDetailResult.JSON_PROPERTY_PROGRESS, + QueueAnnotateDetailResult.JSON_PROPERTY_NEXT_ITEM_ID, + QueueAnnotateDetailResult.JSON_PROPERTY_PREV_ITEM_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnnotateDetailResult { + public static final String JSON_PROPERTY_ITEM = "item"; + @javax.annotation.Nonnull + private Map item = new HashMap<>(); + + public static final String JSON_PROPERTY_QUEUE = "queue"; + @javax.annotation.Nonnull + private Map queue = new HashMap<>(); + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nonnull + private List> labels = new ArrayList<>(); + + public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; + @javax.annotation.Nonnull + private List> annotations = new ArrayList<>(); + + public static final String JSON_PROPERTY_REVIEW_COMMENTS = "review_comments"; + @javax.annotation.Nonnull + private List> reviewComments = new ArrayList<>(); + + public static final String JSON_PROPERTY_REVIEW_THREADS = "review_threads"; + @javax.annotation.Nonnull + private List> reviewThreads = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXISTING_NOTES = "existing_notes"; + @javax.annotation.Nonnull + private String existingNotes; + + public static final String JSON_PROPERTY_SPAN_NOTES = "span_notes"; + @javax.annotation.Nonnull + private List> spanNotes = new ArrayList<>(); + + public static final String JSON_PROPERTY_SPAN_NOTES_SOURCE_ID = "span_notes_source_id"; + private JsonNullable spanNotesSourceId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROGRESS = "progress"; + @javax.annotation.Nonnull + private Map progress = new HashMap<>(); + + public static final String JSON_PROPERTY_NEXT_ITEM_ID = "next_item_id"; + private JsonNullable nextItemId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREV_ITEM_ID = "prev_item_id"; + private JsonNullable prevItemId = JsonNullable.undefined(); + + public QueueAnnotateDetailResult() { + } + + public QueueAnnotateDetailResult item(@javax.annotation.Nonnull Map item) { + this.item = item; + return this; + } + + public QueueAnnotateDetailResult putItemItem(String key, Object itemItem) { + if (this.item == null) { + this.item = new HashMap<>(); + } + this.item.put(key, itemItem); + return this; + } + + /** + * Get item + * @return item + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getItem() { + return item; + } + + + @JsonProperty(JSON_PROPERTY_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setItem(@javax.annotation.Nonnull Map item) { + this.item = item; + } + + + public QueueAnnotateDetailResult queue(@javax.annotation.Nonnull Map queue) { + this.queue = queue; + return this; + } + + public QueueAnnotateDetailResult putQueueItem(String key, Object queueItem) { + if (this.queue == null) { + this.queue = new HashMap<>(); + } + this.queue.put(key, queueItem); + return this; + } + + /** + * Get queue + * @return queue + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getQueue() { + return queue; + } + + + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setQueue(@javax.annotation.Nonnull Map queue) { + this.queue = queue; + } + + + public QueueAnnotateDetailResult labels(@javax.annotation.Nonnull List> labels) { + this.labels = labels; + return this; + } + + public QueueAnnotateDetailResult addLabelsItem(Map labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getLabels() { + return labels; + } + + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabels(@javax.annotation.Nonnull List> labels) { + this.labels = labels; + } + + + public QueueAnnotateDetailResult annotations(@javax.annotation.Nonnull List> annotations) { + this.annotations = annotations; + return this; + } + + public QueueAnnotateDetailResult addAnnotationsItem(Map annotationsItem) { + if (this.annotations == null) { + this.annotations = new ArrayList<>(); + } + this.annotations.add(annotationsItem); + return this; + } + + /** + * Get annotations + * @return annotations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getAnnotations() { + return annotations; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotations(@javax.annotation.Nonnull List> annotations) { + this.annotations = annotations; + } + + + public QueueAnnotateDetailResult reviewComments(@javax.annotation.Nonnull List> reviewComments) { + this.reviewComments = reviewComments; + return this; + } + + public QueueAnnotateDetailResult addReviewCommentsItem(Map reviewCommentsItem) { + if (this.reviewComments == null) { + this.reviewComments = new ArrayList<>(); + } + this.reviewComments.add(reviewCommentsItem); + return this; + } + + /** + * Get reviewComments + * @return reviewComments + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVIEW_COMMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getReviewComments() { + return reviewComments; + } + + + @JsonProperty(JSON_PROPERTY_REVIEW_COMMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReviewComments(@javax.annotation.Nonnull List> reviewComments) { + this.reviewComments = reviewComments; + } + + + public QueueAnnotateDetailResult reviewThreads(@javax.annotation.Nonnull List> reviewThreads) { + this.reviewThreads = reviewThreads; + return this; + } + + public QueueAnnotateDetailResult addReviewThreadsItem(Map reviewThreadsItem) { + if (this.reviewThreads == null) { + this.reviewThreads = new ArrayList<>(); + } + this.reviewThreads.add(reviewThreadsItem); + return this; + } + + /** + * Get reviewThreads + * @return reviewThreads + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVIEW_THREADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getReviewThreads() { + return reviewThreads; + } + + + @JsonProperty(JSON_PROPERTY_REVIEW_THREADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReviewThreads(@javax.annotation.Nonnull List> reviewThreads) { + this.reviewThreads = reviewThreads; + } + + + public QueueAnnotateDetailResult existingNotes(@javax.annotation.Nonnull String existingNotes) { + this.existingNotes = existingNotes; + return this; + } + + /** + * Get existingNotes + * @return existingNotes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXISTING_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExistingNotes() { + return existingNotes; + } + + + @JsonProperty(JSON_PROPERTY_EXISTING_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExistingNotes(@javax.annotation.Nonnull String existingNotes) { + this.existingNotes = existingNotes; + } + + + public QueueAnnotateDetailResult spanNotes(@javax.annotation.Nonnull List> spanNotes) { + this.spanNotes = spanNotes; + return this; + } + + public QueueAnnotateDetailResult addSpanNotesItem(Map spanNotesItem) { + if (this.spanNotes == null) { + this.spanNotes = new ArrayList<>(); + } + this.spanNotes.add(spanNotesItem); + return this; + } + + /** + * Get spanNotes + * @return spanNotes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getSpanNotes() { + return spanNotes; + } + + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSpanNotes(@javax.annotation.Nonnull List> spanNotes) { + this.spanNotes = spanNotes; + } + + + public QueueAnnotateDetailResult spanNotesSourceId(@javax.annotation.Nullable String spanNotesSourceId) { + this.spanNotesSourceId = JsonNullable.of(spanNotesSourceId); + return this; + } + + /** + * Get spanNotesSourceId + * @return spanNotesSourceId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSpanNotesSourceId() { + return spanNotesSourceId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSpanNotesSourceId_JsonNullable() { + return spanNotesSourceId; + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES_SOURCE_ID) + public void setSpanNotesSourceId_JsonNullable(JsonNullable spanNotesSourceId) { + this.spanNotesSourceId = spanNotesSourceId; + } + + public void setSpanNotesSourceId(@javax.annotation.Nullable String spanNotesSourceId) { + this.spanNotesSourceId = JsonNullable.of(spanNotesSourceId); + } + + + public QueueAnnotateDetailResult progress(@javax.annotation.Nonnull Map progress) { + this.progress = progress; + return this; + } + + public QueueAnnotateDetailResult putProgressItem(String key, Object progressItem) { + if (this.progress == null) { + this.progress = new HashMap<>(); + } + this.progress.put(key, progressItem); + return this; + } + + /** + * Get progress + * @return progress + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROGRESS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getProgress() { + return progress; + } + + + @JsonProperty(JSON_PROPERTY_PROGRESS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setProgress(@javax.annotation.Nonnull Map progress) { + this.progress = progress; + } + + + public QueueAnnotateDetailResult nextItemId(@javax.annotation.Nullable String nextItemId) { + this.nextItemId = JsonNullable.of(nextItemId); + return this; + } + + /** + * Get nextItemId + * @return nextItemId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNextItemId() { + return nextItemId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNextItemId_JsonNullable() { + return nextItemId; + } + + @JsonProperty(JSON_PROPERTY_NEXT_ITEM_ID) + public void setNextItemId_JsonNullable(JsonNullable nextItemId) { + this.nextItemId = nextItemId; + } + + public void setNextItemId(@javax.annotation.Nullable String nextItemId) { + this.nextItemId = JsonNullable.of(nextItemId); + } + + + public QueueAnnotateDetailResult prevItemId(@javax.annotation.Nullable String prevItemId) { + this.prevItemId = JsonNullable.of(prevItemId); + return this; + } + + /** + * Get prevItemId + * @return prevItemId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPrevItemId() { + return prevItemId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREV_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevItemId_JsonNullable() { + return prevItemId; + } + + @JsonProperty(JSON_PROPERTY_PREV_ITEM_ID) + public void setPrevItemId_JsonNullable(JsonNullable prevItemId) { + this.prevItemId = prevItemId; + } + + public void setPrevItemId(@javax.annotation.Nullable String prevItemId) { + this.prevItemId = JsonNullable.of(prevItemId); + } + + + /** + * Return true if this QueueAnnotateDetailResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnnotateDetailResult queueAnnotateDetailResult = (QueueAnnotateDetailResult) o; + return Objects.equals(this.item, queueAnnotateDetailResult.item) && + Objects.equals(this.queue, queueAnnotateDetailResult.queue) && + Objects.equals(this.labels, queueAnnotateDetailResult.labels) && + Objects.equals(this.annotations, queueAnnotateDetailResult.annotations) && + Objects.equals(this.reviewComments, queueAnnotateDetailResult.reviewComments) && + Objects.equals(this.reviewThreads, queueAnnotateDetailResult.reviewThreads) && + Objects.equals(this.existingNotes, queueAnnotateDetailResult.existingNotes) && + Objects.equals(this.spanNotes, queueAnnotateDetailResult.spanNotes) && + equalsNullable(this.spanNotesSourceId, queueAnnotateDetailResult.spanNotesSourceId) && + Objects.equals(this.progress, queueAnnotateDetailResult.progress) && + equalsNullable(this.nextItemId, queueAnnotateDetailResult.nextItemId) && + equalsNullable(this.prevItemId, queueAnnotateDetailResult.prevItemId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(item, queue, labels, annotations, reviewComments, reviewThreads, existingNotes, spanNotes, hashCodeNullable(spanNotesSourceId), progress, hashCodeNullable(nextItemId), hashCodeNullable(prevItemId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnnotateDetailResult {\n"); + sb.append(" item: ").append(toIndentedString(item)).append("\n"); + sb.append(" queue: ").append(toIndentedString(queue)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" reviewComments: ").append(toIndentedString(reviewComments)).append("\n"); + sb.append(" reviewThreads: ").append(toIndentedString(reviewThreads)).append("\n"); + sb.append(" existingNotes: ").append(toIndentedString(existingNotes)).append("\n"); + sb.append(" spanNotes: ").append(toIndentedString(spanNotes)).append("\n"); + sb.append(" spanNotesSourceId: ").append(toIndentedString(spanNotesSourceId)).append("\n"); + sb.append(" progress: ").append(toIndentedString(progress)).append("\n"); + sb.append(" nextItemId: ").append(toIndentedString(nextItemId)).append("\n"); + sb.append(" prevItemId: ").append(toIndentedString(prevItemId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `item` to the URL query string + if (getItem() != null) { + for (String _key : getItem().keySet()) { + joiner.add(String.format("%sitem%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getItem().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getItem().get(_key))))); + } + } + + // add `queue` to the URL query string + if (getQueue() != null) { + for (String _key : getQueue().keySet()) { + joiner.add(String.format("%squeue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getQueue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getQueue().get(_key))))); + } + } + + // add `labels` to the URL query string + if (getLabels() != null) { + for (int i = 0; i < getLabels().size(); i++) { + joiner.add(String.format("%slabels%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLabels().get(i))))); + } + } + + // add `annotations` to the URL query string + if (getAnnotations() != null) { + for (int i = 0; i < getAnnotations().size(); i++) { + joiner.add(String.format("%sannotations%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getAnnotations().get(i))))); + } + } + + // add `review_comments` to the URL query string + if (getReviewComments() != null) { + for (int i = 0; i < getReviewComments().size(); i++) { + joiner.add(String.format("%sreview_comments%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getReviewComments().get(i))))); + } + } + + // add `review_threads` to the URL query string + if (getReviewThreads() != null) { + for (int i = 0; i < getReviewThreads().size(); i++) { + joiner.add(String.format("%sreview_threads%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getReviewThreads().get(i))))); + } + } + + // add `existing_notes` to the URL query string + if (getExistingNotes() != null) { + joiner.add(String.format("%sexisting_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExistingNotes())))); + } + + // add `span_notes` to the URL query string + if (getSpanNotes() != null) { + for (int i = 0; i < getSpanNotes().size(); i++) { + joiner.add(String.format("%sspan_notes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSpanNotes().get(i))))); + } + } + + // add `span_notes_source_id` to the URL query string + if (getSpanNotesSourceId() != null) { + joiner.add(String.format("%sspan_notes_source_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSpanNotesSourceId())))); + } + + // add `progress` to the URL query string + if (getProgress() != null) { + for (String _key : getProgress().keySet()) { + joiner.add(String.format("%sprogress%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getProgress().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getProgress().get(_key))))); + } + } + + // add `next_item_id` to the URL query string + if (getNextItemId() != null) { + joiner.add(String.format("%snext_item_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNextItemId())))); + } + + // add `prev_item_id` to the URL query string + if (getPrevItemId() != null) { + joiner.add(String.format("%sprev_item_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevItemId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotatorNested.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotatorNested.java new file mode 100644 index 0000000..79ced91 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAnnotatorNested.java @@ -0,0 +1,306 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAnnotatorNested + */ +@JsonPropertyOrder({ + QueueAnnotatorNested.JSON_PROPERTY_ID, + QueueAnnotatorNested.JSON_PROPERTY_USER_ID, + QueueAnnotatorNested.JSON_PROPERTY_NAME, + QueueAnnotatorNested.JSON_PROPERTY_EMAIL, + QueueAnnotatorNested.JSON_PROPERTY_ROLE, + QueueAnnotatorNested.JSON_PROPERTY_ROLES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAnnotatorNested { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_EMAIL = "email"; + @javax.annotation.Nullable + private String email; + + public static final String JSON_PROPERTY_ROLE = "role"; + @javax.annotation.Nullable + private String role = "annotator"; + + public static final String JSON_PROPERTY_ROLES = "roles"; + @javax.annotation.Nullable + private String roles; + + public QueueAnnotatorNested() { + } + + @JsonCreator + public QueueAnnotatorNested( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_EMAIL) String email, + @JsonProperty(JSON_PROPERTY_ROLES) String roles + ) { + this(); + this.id = id; + this.name = name; + this.email = email; + this.roles = roles; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public QueueAnnotatorNested userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + + + + public QueueAnnotatorNested role(@javax.annotation.Nullable String role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRole() { + return role; + } + + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRole(@javax.annotation.Nullable String role) { + this.role = role; + } + + + /** + * Get roles + * @return roles + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRoles() { + return roles; + } + + + + + /** + * Return true if this QueueAnnotatorNested object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAnnotatorNested queueAnnotatorNested = (QueueAnnotatorNested) o; + return Objects.equals(this.id, queueAnnotatorNested.id) && + Objects.equals(this.userId, queueAnnotatorNested.userId) && + Objects.equals(this.name, queueAnnotatorNested.name) && + Objects.equals(this.email, queueAnnotatorNested.email) && + Objects.equals(this.role, queueAnnotatorNested.role) && + Objects.equals(this.roles, queueAnnotatorNested.roles); + } + + @Override + public int hashCode() { + return Objects.hash(id, userId, name, email, role, roles); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAnnotatorNested {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); + } + + // add `role` to the URL query string + if (getRole() != null) { + joiner.add(String.format("%srole%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRole())))); + } + + // add `roles` to the URL query string + if (getRoles() != null) { + joiner.add(String.format("%sroles%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRoles())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResponse.java new file mode 100644 index 0000000..ad5d760 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueAssignItemsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAssignItemsResponse + */ +@JsonPropertyOrder({ + QueueAssignItemsResponse.JSON_PROPERTY_STATUS, + QueueAssignItemsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAssignItemsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueAssignItemsResult result; + + public QueueAssignItemsResponse() { + } + + public QueueAssignItemsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueAssignItemsResponse result(@javax.annotation.Nonnull QueueAssignItemsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueAssignItemsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueAssignItemsResult result) { + this.result = result; + } + + + /** + * Return true if this QueueAssignItemsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAssignItemsResponse queueAssignItemsResponse = (QueueAssignItemsResponse) o; + return Objects.equals(this.status, queueAssignItemsResponse.status) && + Objects.equals(this.result, queueAssignItemsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAssignItemsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResult.java new file mode 100644 index 0000000..ad4b47f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueAssignItemsResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueAssignItemsResult + */ +@JsonPropertyOrder({ + QueueAssignItemsResult.JSON_PROPERTY_ASSIGNED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueAssignItemsResult { + public static final String JSON_PROPERTY_ASSIGNED = "assigned"; + @javax.annotation.Nonnull + private Integer assigned; + + public QueueAssignItemsResult() { + } + + public QueueAssignItemsResult assigned(@javax.annotation.Nonnull Integer assigned) { + this.assigned = assigned; + return this; + } + + /** + * Get assigned + * @return assigned + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSIGNED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAssigned() { + return assigned; + } + + + @JsonProperty(JSON_PROPERTY_ASSIGNED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssigned(@javax.annotation.Nonnull Integer assigned) { + this.assigned = assigned; + } + + + /** + * Return true if this QueueAssignItemsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueAssignItemsResult queueAssignItemsResult = (QueueAssignItemsResult) o; + return Objects.equals(this.assigned, queueAssignItemsResult.assigned); + } + + @Override + public int hashCode() { + return Objects.hash(assigned); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueAssignItemsResult {\n"); + sb.append(" assigned: ").append(toIndentedString(assigned)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `assigned` to the URL query string + if (getAssigned() != null) { + joiner.add(String.format("%sassigned%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssigned())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResponse.java new file mode 100644 index 0000000..9404a14 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueBulkRemoveItemsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueBulkRemoveItemsResponse + */ +@JsonPropertyOrder({ + QueueBulkRemoveItemsResponse.JSON_PROPERTY_STATUS, + QueueBulkRemoveItemsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueBulkRemoveItemsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueBulkRemoveItemsResult result; + + public QueueBulkRemoveItemsResponse() { + } + + public QueueBulkRemoveItemsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueBulkRemoveItemsResponse result(@javax.annotation.Nonnull QueueBulkRemoveItemsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueBulkRemoveItemsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueBulkRemoveItemsResult result) { + this.result = result; + } + + + /** + * Return true if this QueueBulkRemoveItemsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueBulkRemoveItemsResponse queueBulkRemoveItemsResponse = (QueueBulkRemoveItemsResponse) o; + return Objects.equals(this.status, queueBulkRemoveItemsResponse.status) && + Objects.equals(this.result, queueBulkRemoveItemsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueBulkRemoveItemsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResult.java new file mode 100644 index 0000000..a8cbb5a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueBulkRemoveItemsResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueBulkRemoveItemsResult + */ +@JsonPropertyOrder({ + QueueBulkRemoveItemsResult.JSON_PROPERTY_REMOVED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueBulkRemoveItemsResult { + public static final String JSON_PROPERTY_REMOVED = "removed"; + @javax.annotation.Nonnull + private Integer removed; + + public QueueBulkRemoveItemsResult() { + } + + public QueueBulkRemoveItemsResult removed(@javax.annotation.Nonnull Integer removed) { + this.removed = removed; + return this; + } + + /** + * Get removed + * @return removed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REMOVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRemoved() { + return removed; + } + + + @JsonProperty(JSON_PROPERTY_REMOVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRemoved(@javax.annotation.Nonnull Integer removed) { + this.removed = removed; + } + + + /** + * Return true if this QueueBulkRemoveItemsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueBulkRemoveItemsResult queueBulkRemoveItemsResult = (QueueBulkRemoveItemsResult) o; + return Objects.equals(this.removed, queueBulkRemoveItemsResult.removed); + } + + @Override + public int hashCode() { + return Objects.hash(removed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueBulkRemoveItemsResult {\n"); + sb.append(" removed: ").append(toIndentedString(removed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `removed` to the URL query string + if (getRemoved() != null) { + joiner.add(String.format("%sremoved%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemoved())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultQueue.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultQueue.java new file mode 100644 index 0000000..0f37707 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultQueue.java @@ -0,0 +1,332 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueDefaultQueue + */ +@JsonPropertyOrder({ + QueueDefaultQueue.JSON_PROPERTY_ID, + QueueDefaultQueue.JSON_PROPERTY_NAME, + QueueDefaultQueue.JSON_PROPERTY_DESCRIPTION, + QueueDefaultQueue.JSON_PROPERTY_INSTRUCTIONS, + QueueDefaultQueue.JSON_PROPERTY_STATUS, + QueueDefaultQueue.JSON_PROPERTY_IS_DEFAULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueDefaultQueue { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + @javax.annotation.Nullable + private String instructions; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nonnull + private Boolean isDefault; + + public QueueDefaultQueue() { + } + + public QueueDefaultQueue id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public QueueDefaultQueue name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public QueueDefaultQueue description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public QueueDefaultQueue instructions(@javax.annotation.Nullable String instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get instructions + * @return instructions + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstructions() { + return instructions; + } + + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstructions(@javax.annotation.Nullable String instructions) { + this.instructions = instructions; + } + + + public QueueDefaultQueue status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public QueueDefaultQueue isDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + /** + * Return true if this QueueDefaultQueue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueDefaultQueue queueDefaultQueue = (QueueDefaultQueue) o; + return Objects.equals(this.id, queueDefaultQueue.id) && + Objects.equals(this.name, queueDefaultQueue.name) && + Objects.equals(this.description, queueDefaultQueue.description) && + Objects.equals(this.instructions, queueDefaultQueue.instructions) && + Objects.equals(this.status, queueDefaultQueue.status) && + Objects.equals(this.isDefault, queueDefaultQueue.isDefault); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, instructions, status, isDefault); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueDefaultQueue {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `instructions` to the URL query string + if (getInstructions() != null) { + joiner.add(String.format("%sinstructions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstructions())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultRequest.java new file mode 100644 index 0000000..90815cf --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultRequest.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueDefaultRequest + */ +@JsonPropertyOrder({ + QueueDefaultRequest.JSON_PROPERTY_PROJECT_ID, + QueueDefaultRequest.JSON_PROPERTY_DATASET_ID, + QueueDefaultRequest.JSON_PROPERTY_AGENT_DEFINITION_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueDefaultRequest { + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + @javax.annotation.Nullable + private UUID projectId; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private UUID datasetId; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_ID = "agent_definition_id"; + @javax.annotation.Nullable + private UUID agentDefinitionId; + + public QueueDefaultRequest() { + } + + public QueueDefaultRequest projectId(@javax.annotation.Nullable UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProjectId(@javax.annotation.Nullable UUID projectId) { + this.projectId = projectId; + } + + + public QueueDefaultRequest datasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + } + + + public QueueDefaultRequest agentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + return this; + } + + /** + * Get agentDefinitionId + * @return agentDefinitionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAgentDefinitionId() { + return agentDefinitionId; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + } + + + /** + * Return true if this QueueDefaultRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueDefaultRequest queueDefaultRequest = (QueueDefaultRequest) o; + return Objects.equals(this.projectId, queueDefaultRequest.projectId) && + Objects.equals(this.datasetId, queueDefaultRequest.datasetId) && + Objects.equals(this.agentDefinitionId, queueDefaultRequest.agentDefinitionId); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, datasetId, agentDefinitionId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueDefaultRequest {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" agentDefinitionId: ").append(toIndentedString(agentDefinitionId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `project_id` to the URL query string + if (getProjectId() != null) { + joiner.add(String.format("%sproject_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectId())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `agent_definition_id` to the URL query string + if (getAgentDefinitionId() != null) { + joiner.add(String.format("%sagent_definition_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResponse.java new file mode 100644 index 0000000..48394d2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueDefaultResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueDefaultResponse + */ +@JsonPropertyOrder({ + QueueDefaultResponse.JSON_PROPERTY_STATUS, + QueueDefaultResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueDefaultResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueDefaultResult result; + + public QueueDefaultResponse() { + } + + public QueueDefaultResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueDefaultResponse result(@javax.annotation.Nonnull QueueDefaultResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueDefaultResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueDefaultResult result) { + this.result = result; + } + + + /** + * Return true if this QueueDefaultResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueDefaultResponse queueDefaultResponse = (QueueDefaultResponse) o; + return Objects.equals(this.status, queueDefaultResponse.status) && + Objects.equals(this.result, queueDefaultResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueDefaultResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResult.java new file mode 100644 index 0000000..d4b996e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDefaultResult.java @@ -0,0 +1,313 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueDefaultQueue; +import com.futureagi.sdk.model.QueueLabelResult; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueDefaultResult + */ +@JsonPropertyOrder({ + QueueDefaultResult.JSON_PROPERTY_QUEUE, + QueueDefaultResult.JSON_PROPERTY_LABELS, + QueueDefaultResult.JSON_PROPERTY_CREATED, + QueueDefaultResult.JSON_PROPERTY_ACTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueDefaultResult { + public static final String JSON_PROPERTY_QUEUE = "queue"; + @javax.annotation.Nonnull + private QueueDefaultQueue queue; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nonnull + private List labels = new ArrayList<>(); + + public static final String JSON_PROPERTY_CREATED = "created"; + @javax.annotation.Nonnull + private Boolean created; + + /** + * Gets or Sets action + */ + public enum ActionEnum { + CREATED(String.valueOf("created")), + + RESTORED(String.valueOf("restored")), + + FETCHED(String.valueOf("fetched")); + + private String value; + + ActionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ActionEnum fromValue(String value) { + for (ActionEnum b : ActionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACTION = "action"; + @javax.annotation.Nonnull + private ActionEnum action; + + public QueueDefaultResult() { + } + + public QueueDefaultResult queue(@javax.annotation.Nonnull QueueDefaultQueue queue) { + this.queue = queue; + return this; + } + + /** + * Get queue + * @return queue + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueDefaultQueue getQueue() { + return queue; + } + + + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQueue(@javax.annotation.Nonnull QueueDefaultQueue queue) { + this.queue = queue; + } + + + public QueueDefaultResult labels(@javax.annotation.Nonnull List labels) { + this.labels = labels; + return this; + } + + public QueueDefaultResult addLabelsItem(QueueLabelResult labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLabels() { + return labels; + } + + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabels(@javax.annotation.Nonnull List labels) { + this.labels = labels; + } + + + public QueueDefaultResult created(@javax.annotation.Nonnull Boolean created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCreated() { + return created; + } + + + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreated(@javax.annotation.Nonnull Boolean created) { + this.created = created; + } + + + public QueueDefaultResult action(@javax.annotation.Nonnull ActionEnum action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ActionEnum getAction() { + return action; + } + + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAction(@javax.annotation.Nonnull ActionEnum action) { + this.action = action; + } + + + /** + * Return true if this QueueDefaultResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueDefaultResult queueDefaultResult = (QueueDefaultResult) o; + return Objects.equals(this.queue, queueDefaultResult.queue) && + Objects.equals(this.labels, queueDefaultResult.labels) && + Objects.equals(this.created, queueDefaultResult.created) && + Objects.equals(this.action, queueDefaultResult.action); + } + + @Override + public int hashCode() { + return Objects.hash(queue, labels, created, action); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueDefaultResult {\n"); + sb.append(" queue: ").append(toIndentedString(queue)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `queue` to the URL query string + if (getQueue() != null) { + joiner.add(getQueue().toUrlQueryString(prefix + "queue" + suffix)); + } + + // add `labels` to the URL query string + if (getLabels() != null) { + for (int i = 0; i < getLabels().size(); i++) { + if (getLabels().get(i) != null) { + joiner.add(getLabels().get(i).toUrlQueryString(String.format("%slabels%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `created` to the URL query string + if (getCreated() != null) { + joiner.add(String.format("%screated%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreated())))); + } + + // add `action` to the URL query string + if (getAction() != null) { + joiner.add(String.format("%saction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAction())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResponse.java new file mode 100644 index 0000000..eefe650 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueDiscussionResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueDiscussionResponse + */ +@JsonPropertyOrder({ + QueueDiscussionResponse.JSON_PROPERTY_STATUS, + QueueDiscussionResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueDiscussionResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueDiscussionResult result; + + public QueueDiscussionResponse() { + } + + public QueueDiscussionResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueDiscussionResponse result(@javax.annotation.Nonnull QueueDiscussionResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueDiscussionResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueDiscussionResult result) { + this.result = result; + } + + + /** + * Return true if this QueueDiscussionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueDiscussionResponse queueDiscussionResponse = (QueueDiscussionResponse) o; + return Objects.equals(this.status, queueDiscussionResponse.status) && + Objects.equals(this.result, queueDiscussionResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueDiscussionResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResult.java new file mode 100644 index 0000000..e1b2049 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueDiscussionResult.java @@ -0,0 +1,311 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueDiscussionResult + */ +@JsonPropertyOrder({ + QueueDiscussionResult.JSON_PROPERTY_REVIEW_COMMENTS, + QueueDiscussionResult.JSON_PROPERTY_REVIEW_THREADS, + QueueDiscussionResult.JSON_PROPERTY_COMMENT, + QueueDiscussionResult.JSON_PROPERTY_THREAD +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueDiscussionResult { + public static final String JSON_PROPERTY_REVIEW_COMMENTS = "review_comments"; + @javax.annotation.Nonnull + private List> reviewComments = new ArrayList<>(); + + public static final String JSON_PROPERTY_REVIEW_THREADS = "review_threads"; + @javax.annotation.Nonnull + private List> reviewThreads = new ArrayList<>(); + + public static final String JSON_PROPERTY_COMMENT = "comment"; + @javax.annotation.Nullable + private Map comment = new HashMap<>(); + + public static final String JSON_PROPERTY_THREAD = "thread"; + @javax.annotation.Nullable + private Map thread = new HashMap<>(); + + public QueueDiscussionResult() { + } + + public QueueDiscussionResult reviewComments(@javax.annotation.Nonnull List> reviewComments) { + this.reviewComments = reviewComments; + return this; + } + + public QueueDiscussionResult addReviewCommentsItem(Map reviewCommentsItem) { + if (this.reviewComments == null) { + this.reviewComments = new ArrayList<>(); + } + this.reviewComments.add(reviewCommentsItem); + return this; + } + + /** + * Get reviewComments + * @return reviewComments + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVIEW_COMMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getReviewComments() { + return reviewComments; + } + + + @JsonProperty(JSON_PROPERTY_REVIEW_COMMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReviewComments(@javax.annotation.Nonnull List> reviewComments) { + this.reviewComments = reviewComments; + } + + + public QueueDiscussionResult reviewThreads(@javax.annotation.Nonnull List> reviewThreads) { + this.reviewThreads = reviewThreads; + return this; + } + + public QueueDiscussionResult addReviewThreadsItem(Map reviewThreadsItem) { + if (this.reviewThreads == null) { + this.reviewThreads = new ArrayList<>(); + } + this.reviewThreads.add(reviewThreadsItem); + return this; + } + + /** + * Get reviewThreads + * @return reviewThreads + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVIEW_THREADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getReviewThreads() { + return reviewThreads; + } + + + @JsonProperty(JSON_PROPERTY_REVIEW_THREADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReviewThreads(@javax.annotation.Nonnull List> reviewThreads) { + this.reviewThreads = reviewThreads; + } + + + public QueueDiscussionResult comment(@javax.annotation.Nullable Map comment) { + this.comment = comment; + return this; + } + + public QueueDiscussionResult putCommentItem(String key, Object commentItem) { + if (this.comment == null) { + this.comment = new HashMap<>(); + } + this.comment.put(key, commentItem); + return this; + } + + /** + * Get comment + * @return comment + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getComment() { + return comment; + } + + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setComment(@javax.annotation.Nullable Map comment) { + this.comment = comment; + } + + + public QueueDiscussionResult thread(@javax.annotation.Nullable Map thread) { + this.thread = thread; + return this; + } + + public QueueDiscussionResult putThreadItem(String key, Object threadItem) { + if (this.thread == null) { + this.thread = new HashMap<>(); + } + this.thread.put(key, threadItem); + return this; + } + + /** + * Get thread + * @return thread + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THREAD) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getThread() { + return thread; + } + + + @JsonProperty(JSON_PROPERTY_THREAD) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setThread(@javax.annotation.Nullable Map thread) { + this.thread = thread; + } + + + /** + * Return true if this QueueDiscussionResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueDiscussionResult queueDiscussionResult = (QueueDiscussionResult) o; + return Objects.equals(this.reviewComments, queueDiscussionResult.reviewComments) && + Objects.equals(this.reviewThreads, queueDiscussionResult.reviewThreads) && + Objects.equals(this.comment, queueDiscussionResult.comment) && + Objects.equals(this.thread, queueDiscussionResult.thread); + } + + @Override + public int hashCode() { + return Objects.hash(reviewComments, reviewThreads, comment, thread); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueDiscussionResult {\n"); + sb.append(" reviewComments: ").append(toIndentedString(reviewComments)).append("\n"); + sb.append(" reviewThreads: ").append(toIndentedString(reviewThreads)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" thread: ").append(toIndentedString(thread)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `review_comments` to the URL query string + if (getReviewComments() != null) { + for (int i = 0; i < getReviewComments().size(); i++) { + joiner.add(String.format("%sreview_comments%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getReviewComments().get(i))))); + } + } + + // add `review_threads` to the URL query string + if (getReviewThreads() != null) { + for (int i = 0; i < getReviewThreads().size(); i++) { + joiner.add(String.format("%sreview_threads%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getReviewThreads().get(i))))); + } + } + + // add `comment` to the URL query string + if (getComment() != null) { + for (String _key : getComment().keySet()) { + joiner.add(String.format("%scomment%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getComment().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getComment().get(_key))))); + } + } + + // add `thread` to the URL query string + if (getThread() != null) { + for (String _key : getThread().keySet()) { + joiner.add(String.format("%sthread%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getThread().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getThread().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportAnnotationsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportAnnotationsResponse.java new file mode 100644 index 0000000..d0b9385 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportAnnotationsResponse.java @@ -0,0 +1,202 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportAnnotationsResponse + */ +@JsonPropertyOrder({ + QueueExportAnnotationsResponse.JSON_PROPERTY_STATUS, + QueueExportAnnotationsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportAnnotationsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List> result = new ArrayList<>(); + + public QueueExportAnnotationsResponse() { + } + + public QueueExportAnnotationsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueExportAnnotationsResponse result(@javax.annotation.Nonnull List> result) { + this.result = result; + return this; + } + + public QueueExportAnnotationsResponse addResultItem(Map resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List> result) { + this.result = result; + } + + + /** + * Return true if this QueueExportAnnotationsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportAnnotationsResponse queueExportAnnotationsResponse = (QueueExportAnnotationsResponse) o; + return Objects.equals(this.status, queueExportAnnotationsResponse.status) && + Objects.equals(this.result, queueExportAnnotationsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportAnnotationsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + joiner.add(String.format("%sresult%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getResult().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportColumnMapping.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportColumnMapping.java new file mode 100644 index 0000000..f57ec57 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportColumnMapping.java @@ -0,0 +1,259 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportColumnMapping + */ +@JsonPropertyOrder({ + QueueExportColumnMapping.JSON_PROPERTY_FIELD, + QueueExportColumnMapping.JSON_PROPERTY_ID, + QueueExportColumnMapping.JSON_PROPERTY_COLUMN, + QueueExportColumnMapping.JSON_PROPERTY_ENABLED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportColumnMapping { + public static final String JSON_PROPERTY_FIELD = "field"; + @javax.annotation.Nullable + private String field; + + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private String id; + + public static final String JSON_PROPERTY_COLUMN = "column"; + @javax.annotation.Nullable + private String column; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + @javax.annotation.Nullable + private Boolean enabled = true; + + public QueueExportColumnMapping() { + } + + public QueueExportColumnMapping field(@javax.annotation.Nullable String field) { + this.field = field; + return this; + } + + /** + * Get field + * @return field + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setField(@javax.annotation.Nullable String field) { + this.field = field; + } + + + public QueueExportColumnMapping id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public QueueExportColumnMapping column(@javax.annotation.Nullable String column) { + this.column = column; + return this; + } + + /** + * Get column + * @return column + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getColumn() { + return column; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumn(@javax.annotation.Nullable String column) { + this.column = column; + } + + + public QueueExportColumnMapping enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + } + + + /** + * Return true if this QueueExportColumnMapping object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportColumnMapping queueExportColumnMapping = (QueueExportColumnMapping) o; + return Objects.equals(this.field, queueExportColumnMapping.field) && + Objects.equals(this.id, queueExportColumnMapping.id) && + Objects.equals(this.column, queueExportColumnMapping.column) && + Objects.equals(this.enabled, queueExportColumnMapping.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(field, id, column, enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportColumnMapping {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `field` to the URL query string + if (getField() != null) { + joiner.add(String.format("%sfield%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getField())))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `column` to the URL query string + if (getColumn() != null) { + joiner.add(String.format("%scolumn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumn())))); + } + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format("%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportDefaultMapping.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportDefaultMapping.java new file mode 100644 index 0000000..4c78b26 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportDefaultMapping.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportDefaultMapping + */ +@JsonPropertyOrder({ + QueueExportDefaultMapping.JSON_PROPERTY_FIELD, + QueueExportDefaultMapping.JSON_PROPERTY_COLUMN, + QueueExportDefaultMapping.JSON_PROPERTY_ENABLED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportDefaultMapping { + public static final String JSON_PROPERTY_FIELD = "field"; + @javax.annotation.Nonnull + private String field; + + public static final String JSON_PROPERTY_COLUMN = "column"; + @javax.annotation.Nonnull + private String column; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + @javax.annotation.Nonnull + private Boolean enabled; + + public QueueExportDefaultMapping() { + } + + public QueueExportDefaultMapping field(@javax.annotation.Nonnull String field) { + this.field = field; + return this; + } + + /** + * Get field + * @return field + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setField(@javax.annotation.Nonnull String field) { + this.field = field; + } + + + public QueueExportDefaultMapping column(@javax.annotation.Nonnull String column) { + this.column = column; + return this; + } + + /** + * Get column + * @return column + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumn() { + return column; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumn(@javax.annotation.Nonnull String column) { + this.column = column; + } + + + public QueueExportDefaultMapping enabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + } + + + /** + * Return true if this QueueExportDefaultMapping object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportDefaultMapping queueExportDefaultMapping = (QueueExportDefaultMapping) o; + return Objects.equals(this.field, queueExportDefaultMapping.field) && + Objects.equals(this.column, queueExportDefaultMapping.column) && + Objects.equals(this.enabled, queueExportDefaultMapping.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(field, column, enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportDefaultMapping {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `field` to the URL query string + if (getField() != null) { + joiner.add(String.format("%sfield%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getField())))); + } + + // add `column` to the URL query string + if (getColumn() != null) { + joiner.add(String.format("%scolumn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumn())))); + } + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add(String.format("%senabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnabled())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportField.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportField.java new file mode 100644 index 0000000..6d8c357 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportField.java @@ -0,0 +1,598 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportField + */ +@JsonPropertyOrder({ + QueueExportField.JSON_PROPERTY_ID, + QueueExportField.JSON_PROPERTY_LABEL, + QueueExportField.JSON_PROPERTY_COLUMN, + QueueExportField.JSON_PROPERTY_DATA_TYPE, + QueueExportField.JSON_PROPERTY_GROUP, + QueueExportField.JSON_PROPERTY_DEFAULT, + QueueExportField.JSON_PROPERTY_PATH, + QueueExportField.JSON_PROPERTY_SOURCE_TYPE, + QueueExportField.JSON_PROPERTY_KIND, + QueueExportField.JSON_PROPERTY_LABEL_ID, + QueueExportField.JSON_PROPERTY_SLOT, + QueueExportField.JSON_PROPERTY_EVAL_KEY, + QueueExportField.JSON_PROPERTY_EXPAND_FIELDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportField { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_LABEL = "label"; + @javax.annotation.Nonnull + private String label; + + public static final String JSON_PROPERTY_COLUMN = "column"; + @javax.annotation.Nonnull + private String column; + + public static final String JSON_PROPERTY_DATA_TYPE = "data_type"; + @javax.annotation.Nonnull + private String dataType; + + public static final String JSON_PROPERTY_GROUP = "group"; + @javax.annotation.Nonnull + private String group; + + public static final String JSON_PROPERTY_DEFAULT = "default"; + @javax.annotation.Nonnull + private Boolean _default; + + public static final String JSON_PROPERTY_PATH = "path"; + @javax.annotation.Nullable + private String path; + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nullable + private String sourceType; + + public static final String JSON_PROPERTY_KIND = "kind"; + @javax.annotation.Nullable + private String kind; + + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nullable + private UUID labelId; + + public static final String JSON_PROPERTY_SLOT = "slot"; + @javax.annotation.Nullable + private Integer slot; + + public static final String JSON_PROPERTY_EVAL_KEY = "eval_key"; + @javax.annotation.Nullable + private String evalKey; + + public static final String JSON_PROPERTY_EXPAND_FIELDS = "expand_fields"; + @javax.annotation.Nullable + private List expandFields = new ArrayList<>(); + + public QueueExportField() { + } + + public QueueExportField id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public QueueExportField label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + public QueueExportField column(@javax.annotation.Nonnull String column) { + this.column = column; + return this; + } + + /** + * Get column + * @return column + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getColumn() { + return column; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumn(@javax.annotation.Nonnull String column) { + this.column = column; + } + + + public QueueExportField dataType(@javax.annotation.Nonnull String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get dataType + * @return dataType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDataType() { + return dataType; + } + + + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataType(@javax.annotation.Nonnull String dataType) { + this.dataType = dataType; + } + + + public QueueExportField group(@javax.annotation.Nonnull String group) { + this.group = group; + return this; + } + + /** + * Get group + * @return group + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGroup(@javax.annotation.Nonnull String group) { + this.group = group; + } + + + public QueueExportField _default(@javax.annotation.Nonnull Boolean _default) { + this._default = _default; + return this; + } + + /** + * Get _default + * @return _default + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getDefault() { + return _default; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDefault(@javax.annotation.Nonnull Boolean _default) { + this._default = _default; + } + + + public QueueExportField path(@javax.annotation.Nullable String path) { + this.path = path; + return this; + } + + /** + * Get path + * @return path + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPath() { + return path; + } + + + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPath(@javax.annotation.Nullable String path) { + this.path = path; + } + + + public QueueExportField sourceType(@javax.annotation.Nullable String sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceType(@javax.annotation.Nullable String sourceType) { + this.sourceType = sourceType; + } + + + public QueueExportField kind(@javax.annotation.Nullable String kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKind() { + return kind; + } + + + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKind(@javax.annotation.Nullable String kind) { + this.kind = kind; + } + + + public QueueExportField labelId(@javax.annotation.Nullable UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabelId(@javax.annotation.Nullable UUID labelId) { + this.labelId = labelId; + } + + + public QueueExportField slot(@javax.annotation.Nullable Integer slot) { + this.slot = slot; + return this; + } + + /** + * Get slot + * @return slot + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSlot() { + return slot; + } + + + @JsonProperty(JSON_PROPERTY_SLOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSlot(@javax.annotation.Nullable Integer slot) { + this.slot = slot; + } + + + public QueueExportField evalKey(@javax.annotation.Nullable String evalKey) { + this.evalKey = evalKey; + return this; + } + + /** + * Get evalKey + * @return evalKey + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalKey() { + return evalKey; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalKey(@javax.annotation.Nullable String evalKey) { + this.evalKey = evalKey; + } + + + public QueueExportField expandFields(@javax.annotation.Nullable List expandFields) { + this.expandFields = expandFields; + return this; + } + + public QueueExportField addExpandFieldsItem(String expandFieldsItem) { + if (this.expandFields == null) { + this.expandFields = new ArrayList<>(); + } + this.expandFields.add(expandFieldsItem); + return this; + } + + /** + * Get expandFields + * @return expandFields + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPAND_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExpandFields() { + return expandFields; + } + + + @JsonProperty(JSON_PROPERTY_EXPAND_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpandFields(@javax.annotation.Nullable List expandFields) { + this.expandFields = expandFields; + } + + + /** + * Return true if this QueueExportField object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportField queueExportField = (QueueExportField) o; + return Objects.equals(this.id, queueExportField.id) && + Objects.equals(this.label, queueExportField.label) && + Objects.equals(this.column, queueExportField.column) && + Objects.equals(this.dataType, queueExportField.dataType) && + Objects.equals(this.group, queueExportField.group) && + Objects.equals(this._default, queueExportField._default) && + Objects.equals(this.path, queueExportField.path) && + Objects.equals(this.sourceType, queueExportField.sourceType) && + Objects.equals(this.kind, queueExportField.kind) && + Objects.equals(this.labelId, queueExportField.labelId) && + Objects.equals(this.slot, queueExportField.slot) && + Objects.equals(this.evalKey, queueExportField.evalKey) && + Objects.equals(this.expandFields, queueExportField.expandFields); + } + + @Override + public int hashCode() { + return Objects.hash(id, label, column, dataType, group, _default, path, sourceType, kind, labelId, slot, evalKey, expandFields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportField {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); + sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" slot: ").append(toIndentedString(slot)).append("\n"); + sb.append(" evalKey: ").append(toIndentedString(evalKey)).append("\n"); + sb.append(" expandFields: ").append(toIndentedString(expandFields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(String.format("%slabel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabel())))); + } + + // add `column` to the URL query string + if (getColumn() != null) { + joiner.add(String.format("%scolumn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumn())))); + } + + // add `data_type` to the URL query string + if (getDataType() != null) { + joiner.add(String.format("%sdata_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); + } + + // add `group` to the URL query string + if (getGroup() != null) { + joiner.add(String.format("%sgroup%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGroup())))); + } + + // add `default` to the URL query string + if (getDefault() != null) { + joiner.add(String.format("%sdefault%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDefault())))); + } + + // add `path` to the URL query string + if (getPath() != null) { + joiner.add(String.format("%spath%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPath())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `kind` to the URL query string + if (getKind() != null) { + joiner.add(String.format("%skind%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKind())))); + } + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `slot` to the URL query string + if (getSlot() != null) { + joiner.add(String.format("%sslot%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSlot())))); + } + + // add `eval_key` to the URL query string + if (getEvalKey() != null) { + joiner.add(String.format("%seval_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalKey())))); + } + + // add `expand_fields` to the URL query string + if (getExpandFields() != null) { + for (int i = 0; i < getExpandFields().size(); i++) { + joiner.add(String.format("%sexpand_fields%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getExpandFields().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResponse.java new file mode 100644 index 0000000..716489c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueExportFieldsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportFieldsResponse + */ +@JsonPropertyOrder({ + QueueExportFieldsResponse.JSON_PROPERTY_STATUS, + QueueExportFieldsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportFieldsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueExportFieldsResult result; + + public QueueExportFieldsResponse() { + } + + public QueueExportFieldsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueExportFieldsResponse result(@javax.annotation.Nonnull QueueExportFieldsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueExportFieldsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueExportFieldsResult result) { + this.result = result; + } + + + /** + * Return true if this QueueExportFieldsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportFieldsResponse queueExportFieldsResponse = (QueueExportFieldsResponse) o; + return Objects.equals(this.status, queueExportFieldsResponse.status) && + Objects.equals(this.result, queueExportFieldsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportFieldsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResult.java new file mode 100644 index 0000000..5dded98 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportFieldsResult.java @@ -0,0 +1,217 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueExportDefaultMapping; +import com.futureagi.sdk.model.QueueExportField; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportFieldsResult + */ +@JsonPropertyOrder({ + QueueExportFieldsResult.JSON_PROPERTY_FIELDS, + QueueExportFieldsResult.JSON_PROPERTY_DEFAULT_MAPPING +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportFieldsResult { + public static final String JSON_PROPERTY_FIELDS = "fields"; + @javax.annotation.Nonnull + private List fields = new ArrayList<>(); + + public static final String JSON_PROPERTY_DEFAULT_MAPPING = "default_mapping"; + @javax.annotation.Nonnull + private List defaultMapping = new ArrayList<>(); + + public QueueExportFieldsResult() { + } + + public QueueExportFieldsResult fields(@javax.annotation.Nonnull List fields) { + this.fields = fields; + return this; + } + + public QueueExportFieldsResult addFieldsItem(QueueExportField fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * Get fields + * @return fields + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFields() { + return fields; + } + + + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFields(@javax.annotation.Nonnull List fields) { + this.fields = fields; + } + + + public QueueExportFieldsResult defaultMapping(@javax.annotation.Nonnull List defaultMapping) { + this.defaultMapping = defaultMapping; + return this; + } + + public QueueExportFieldsResult addDefaultMappingItem(QueueExportDefaultMapping defaultMappingItem) { + if (this.defaultMapping == null) { + this.defaultMapping = new ArrayList<>(); + } + this.defaultMapping.add(defaultMappingItem); + return this; + } + + /** + * Get defaultMapping + * @return defaultMapping + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEFAULT_MAPPING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDefaultMapping() { + return defaultMapping; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_MAPPING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDefaultMapping(@javax.annotation.Nonnull List defaultMapping) { + this.defaultMapping = defaultMapping; + } + + + /** + * Return true if this QueueExportFieldsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportFieldsResult queueExportFieldsResult = (QueueExportFieldsResult) o; + return Objects.equals(this.fields, queueExportFieldsResult.fields) && + Objects.equals(this.defaultMapping, queueExportFieldsResult.defaultMapping); + } + + @Override + public int hashCode() { + return Objects.hash(fields, defaultMapping); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportFieldsResult {\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" defaultMapping: ").append(toIndentedString(defaultMapping)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fields` to the URL query string + if (getFields() != null) { + for (int i = 0; i < getFields().size(); i++) { + if (getFields().get(i) != null) { + joiner.add(getFields().get(i).toUrlQueryString(String.format("%sfields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `default_mapping` to the URL query string + if (getDefaultMapping() != null) { + for (int i = 0; i < getDefaultMapping().size(); i++) { + if (getDefaultMapping().get(i) != null) { + joiner.add(getDefaultMapping().get(i).toUrlQueryString(String.format("%sdefault_mapping%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetRequest.java new file mode 100644 index 0000000..a2c46b5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetRequest.java @@ -0,0 +1,276 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueExportColumnMapping; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportToDatasetRequest + */ +@JsonPropertyOrder({ + QueueExportToDatasetRequest.JSON_PROPERTY_DATASET_ID, + QueueExportToDatasetRequest.JSON_PROPERTY_DATASET_NAME, + QueueExportToDatasetRequest.JSON_PROPERTY_STATUS_FILTER, + QueueExportToDatasetRequest.JSON_PROPERTY_COLUMN_MAPPING +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportToDatasetRequest { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nullable + private String datasetName; + + public static final String JSON_PROPERTY_STATUS_FILTER = "status_filter"; + @javax.annotation.Nullable + private String statusFilter = "completed"; + + public static final String JSON_PROPERTY_COLUMN_MAPPING = "column_mapping"; + @javax.annotation.Nullable + private List columnMapping = new ArrayList<>(); + + public QueueExportToDatasetRequest() { + } + + public QueueExportToDatasetRequest datasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + } + + + public QueueExportToDatasetRequest datasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetName(@javax.annotation.Nullable String datasetName) { + this.datasetName = datasetName; + } + + + public QueueExportToDatasetRequest statusFilter(@javax.annotation.Nullable String statusFilter) { + this.statusFilter = statusFilter; + return this; + } + + /** + * Get statusFilter + * @return statusFilter + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusFilter() { + return statusFilter; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusFilter(@javax.annotation.Nullable String statusFilter) { + this.statusFilter = statusFilter; + } + + + public QueueExportToDatasetRequest columnMapping(@javax.annotation.Nullable List columnMapping) { + this.columnMapping = columnMapping; + return this; + } + + public QueueExportToDatasetRequest addColumnMappingItem(QueueExportColumnMapping columnMappingItem) { + if (this.columnMapping == null) { + this.columnMapping = new ArrayList<>(); + } + this.columnMapping.add(columnMappingItem); + return this; + } + + /** + * Get columnMapping + * @return columnMapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_MAPPING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumnMapping() { + return columnMapping; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_MAPPING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumnMapping(@javax.annotation.Nullable List columnMapping) { + this.columnMapping = columnMapping; + } + + + /** + * Return true if this QueueExportToDatasetRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportToDatasetRequest queueExportToDatasetRequest = (QueueExportToDatasetRequest) o; + return Objects.equals(this.datasetId, queueExportToDatasetRequest.datasetId) && + Objects.equals(this.datasetName, queueExportToDatasetRequest.datasetName) && + Objects.equals(this.statusFilter, queueExportToDatasetRequest.statusFilter) && + Objects.equals(this.columnMapping, queueExportToDatasetRequest.columnMapping); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, datasetName, statusFilter, columnMapping); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportToDatasetRequest {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" statusFilter: ").append(toIndentedString(statusFilter)).append("\n"); + sb.append(" columnMapping: ").append(toIndentedString(columnMapping)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `status_filter` to the URL query string + if (getStatusFilter() != null) { + joiner.add(String.format("%sstatus_filter%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatusFilter())))); + } + + // add `column_mapping` to the URL query string + if (getColumnMapping() != null) { + for (int i = 0; i < getColumnMapping().size(); i++) { + if (getColumnMapping().get(i) != null) { + joiner.add(getColumnMapping().get(i).toUrlQueryString(String.format("%scolumn_mapping%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResponse.java new file mode 100644 index 0000000..e6a5428 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueExportToDatasetResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportToDatasetResponse + */ +@JsonPropertyOrder({ + QueueExportToDatasetResponse.JSON_PROPERTY_STATUS, + QueueExportToDatasetResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportToDatasetResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueExportToDatasetResult result; + + public QueueExportToDatasetResponse() { + } + + public QueueExportToDatasetResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueExportToDatasetResponse result(@javax.annotation.Nonnull QueueExportToDatasetResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueExportToDatasetResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueExportToDatasetResult result) { + this.result = result; + } + + + /** + * Return true if this QueueExportToDatasetResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportToDatasetResponse queueExportToDatasetResponse = (QueueExportToDatasetResponse) o; + return Objects.equals(this.status, queueExportToDatasetResponse.status) && + Objects.equals(this.result, queueExportToDatasetResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportToDatasetResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResult.java new file mode 100644 index 0000000..5bab142 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueExportToDatasetResult.java @@ -0,0 +1,274 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueExportToDatasetResult + */ +@JsonPropertyOrder({ + QueueExportToDatasetResult.JSON_PROPERTY_DATASET_ID, + QueueExportToDatasetResult.JSON_PROPERTY_DATASET_NAME, + QueueExportToDatasetResult.JSON_PROPERTY_ROWS_CREATED, + QueueExportToDatasetResult.JSON_PROPERTY_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueExportToDatasetResult { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_ROWS_CREATED = "rows_created"; + @javax.annotation.Nonnull + private Integer rowsCreated; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public QueueExportToDatasetResult() { + } + + public QueueExportToDatasetResult datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public QueueExportToDatasetResult datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public QueueExportToDatasetResult rowsCreated(@javax.annotation.Nonnull Integer rowsCreated) { + this.rowsCreated = rowsCreated; + return this; + } + + /** + * Get rowsCreated + * @return rowsCreated + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROWS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRowsCreated() { + return rowsCreated; + } + + + @JsonProperty(JSON_PROPERTY_ROWS_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowsCreated(@javax.annotation.Nonnull Integer rowsCreated) { + this.rowsCreated = rowsCreated; + } + + + public QueueExportToDatasetResult columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public QueueExportToDatasetResult addColumnsItem(String columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + /** + * Return true if this QueueExportToDatasetResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueExportToDatasetResult queueExportToDatasetResult = (QueueExportToDatasetResult) o; + return Objects.equals(this.datasetId, queueExportToDatasetResult.datasetId) && + Objects.equals(this.datasetName, queueExportToDatasetResult.datasetName) && + Objects.equals(this.rowsCreated, queueExportToDatasetResult.rowsCreated) && + Objects.equals(this.columns, queueExportToDatasetResult.columns); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, datasetName, rowsCreated, columns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueExportToDatasetResult {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" rowsCreated: ").append(toIndentedString(rowsCreated)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `rows_created` to the URL query string + if (getRowsCreated() != null) { + joiner.add(String.format("%srows_created%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowsCreated())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceEntry.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceEntry.java new file mode 100644 index 0000000..45f5c4e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceEntry.java @@ -0,0 +1,481 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueForSourceItem; +import com.futureagi.sdk.model.QueueForSourceQueue; +import com.futureagi.sdk.model.QueueLabelResult; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueForSourceEntry + */ +@JsonPropertyOrder({ + QueueForSourceEntry.JSON_PROPERTY_QUEUE, + QueueForSourceEntry.JSON_PROPERTY_ITEM, + QueueForSourceEntry.JSON_PROPERTY_LABELS, + QueueForSourceEntry.JSON_PROPERTY_EXISTING_SCORES, + QueueForSourceEntry.JSON_PROPERTY_EXISTING_NOTES, + QueueForSourceEntry.JSON_PROPERTY_EXISTING_LABEL_NOTES, + QueueForSourceEntry.JSON_PROPERTY_SPAN_NOTES, + QueueForSourceEntry.JSON_PROPERTY_SPAN_NOTES_SOURCE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueForSourceEntry { + public static final String JSON_PROPERTY_QUEUE = "queue"; + @javax.annotation.Nonnull + private QueueForSourceQueue queue; + + public static final String JSON_PROPERTY_ITEM = "item"; + @javax.annotation.Nonnull + private QueueForSourceItem item; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @javax.annotation.Nonnull + private List labels = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXISTING_SCORES = "existing_scores"; + @javax.annotation.Nonnull + private Map> existingScores = new HashMap<>(); + + public static final String JSON_PROPERTY_EXISTING_NOTES = "existing_notes"; + @javax.annotation.Nonnull + private String existingNotes; + + public static final String JSON_PROPERTY_EXISTING_LABEL_NOTES = "existing_label_notes"; + @javax.annotation.Nonnull + private Map existingLabelNotes = new HashMap<>(); + + public static final String JSON_PROPERTY_SPAN_NOTES = "span_notes"; + @javax.annotation.Nonnull + private List> spanNotes = new ArrayList<>(); + + public static final String JSON_PROPERTY_SPAN_NOTES_SOURCE_ID = "span_notes_source_id"; + private JsonNullable spanNotesSourceId = JsonNullable.undefined(); + + public QueueForSourceEntry() { + } + + public QueueForSourceEntry queue(@javax.annotation.Nonnull QueueForSourceQueue queue) { + this.queue = queue; + return this; + } + + /** + * Get queue + * @return queue + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueForSourceQueue getQueue() { + return queue; + } + + + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQueue(@javax.annotation.Nonnull QueueForSourceQueue queue) { + this.queue = queue; + } + + + public QueueForSourceEntry item(@javax.annotation.Nonnull QueueForSourceItem item) { + this.item = item; + return this; + } + + /** + * Get item + * @return item + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueForSourceItem getItem() { + return item; + } + + + @JsonProperty(JSON_PROPERTY_ITEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setItem(@javax.annotation.Nonnull QueueForSourceItem item) { + this.item = item; + } + + + public QueueForSourceEntry labels(@javax.annotation.Nonnull List labels) { + this.labels = labels; + return this; + } + + public QueueForSourceEntry addLabelsItem(QueueLabelResult labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Get labels + * @return labels + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLabels() { + return labels; + } + + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabels(@javax.annotation.Nonnull List labels) { + this.labels = labels; + } + + + public QueueForSourceEntry existingScores(@javax.annotation.Nonnull Map> existingScores) { + this.existingScores = existingScores; + return this; + } + + public QueueForSourceEntry putExistingScoresItem(String key, Map existingScoresItem) { + if (this.existingScores == null) { + this.existingScores = new HashMap<>(); + } + this.existingScores.put(key, existingScoresItem); + return this; + } + + /** + * Get existingScores + * @return existingScores + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXISTING_SCORES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map> getExistingScores() { + return existingScores; + } + + + @JsonProperty(JSON_PROPERTY_EXISTING_SCORES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExistingScores(@javax.annotation.Nonnull Map> existingScores) { + this.existingScores = existingScores; + } + + + public QueueForSourceEntry existingNotes(@javax.annotation.Nonnull String existingNotes) { + this.existingNotes = existingNotes; + return this; + } + + /** + * Get existingNotes + * @return existingNotes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXISTING_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExistingNotes() { + return existingNotes; + } + + + @JsonProperty(JSON_PROPERTY_EXISTING_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExistingNotes(@javax.annotation.Nonnull String existingNotes) { + this.existingNotes = existingNotes; + } + + + public QueueForSourceEntry existingLabelNotes(@javax.annotation.Nonnull Map existingLabelNotes) { + this.existingLabelNotes = existingLabelNotes; + return this; + } + + public QueueForSourceEntry putExistingLabelNotesItem(String key, String existingLabelNotesItem) { + if (this.existingLabelNotes == null) { + this.existingLabelNotes = new HashMap<>(); + } + this.existingLabelNotes.put(key, existingLabelNotesItem); + return this; + } + + /** + * Get existingLabelNotes + * @return existingLabelNotes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXISTING_LABEL_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getExistingLabelNotes() { + return existingLabelNotes; + } + + + @JsonProperty(JSON_PROPERTY_EXISTING_LABEL_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExistingLabelNotes(@javax.annotation.Nonnull Map existingLabelNotes) { + this.existingLabelNotes = existingLabelNotes; + } + + + public QueueForSourceEntry spanNotes(@javax.annotation.Nonnull List> spanNotes) { + this.spanNotes = spanNotes; + return this; + } + + public QueueForSourceEntry addSpanNotesItem(Map spanNotesItem) { + if (this.spanNotes == null) { + this.spanNotes = new ArrayList<>(); + } + this.spanNotes.add(spanNotesItem); + return this; + } + + /** + * Get spanNotes + * @return spanNotes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getSpanNotes() { + return spanNotes; + } + + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSpanNotes(@javax.annotation.Nonnull List> spanNotes) { + this.spanNotes = spanNotes; + } + + + public QueueForSourceEntry spanNotesSourceId(@javax.annotation.Nullable String spanNotesSourceId) { + this.spanNotesSourceId = JsonNullable.of(spanNotesSourceId); + return this; + } + + /** + * Get spanNotesSourceId + * @return spanNotesSourceId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSpanNotesSourceId() { + return spanNotesSourceId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSpanNotesSourceId_JsonNullable() { + return spanNotesSourceId; + } + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES_SOURCE_ID) + public void setSpanNotesSourceId_JsonNullable(JsonNullable spanNotesSourceId) { + this.spanNotesSourceId = spanNotesSourceId; + } + + public void setSpanNotesSourceId(@javax.annotation.Nullable String spanNotesSourceId) { + this.spanNotesSourceId = JsonNullable.of(spanNotesSourceId); + } + + + /** + * Return true if this QueueForSourceEntry object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueForSourceEntry queueForSourceEntry = (QueueForSourceEntry) o; + return Objects.equals(this.queue, queueForSourceEntry.queue) && + Objects.equals(this.item, queueForSourceEntry.item) && + Objects.equals(this.labels, queueForSourceEntry.labels) && + Objects.equals(this.existingScores, queueForSourceEntry.existingScores) && + Objects.equals(this.existingNotes, queueForSourceEntry.existingNotes) && + Objects.equals(this.existingLabelNotes, queueForSourceEntry.existingLabelNotes) && + Objects.equals(this.spanNotes, queueForSourceEntry.spanNotes) && + equalsNullable(this.spanNotesSourceId, queueForSourceEntry.spanNotesSourceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(queue, item, labels, existingScores, existingNotes, existingLabelNotes, spanNotes, hashCodeNullable(spanNotesSourceId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueForSourceEntry {\n"); + sb.append(" queue: ").append(toIndentedString(queue)).append("\n"); + sb.append(" item: ").append(toIndentedString(item)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" existingScores: ").append(toIndentedString(existingScores)).append("\n"); + sb.append(" existingNotes: ").append(toIndentedString(existingNotes)).append("\n"); + sb.append(" existingLabelNotes: ").append(toIndentedString(existingLabelNotes)).append("\n"); + sb.append(" spanNotes: ").append(toIndentedString(spanNotes)).append("\n"); + sb.append(" spanNotesSourceId: ").append(toIndentedString(spanNotesSourceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `queue` to the URL query string + if (getQueue() != null) { + joiner.add(getQueue().toUrlQueryString(prefix + "queue" + suffix)); + } + + // add `item` to the URL query string + if (getItem() != null) { + joiner.add(getItem().toUrlQueryString(prefix + "item" + suffix)); + } + + // add `labels` to the URL query string + if (getLabels() != null) { + for (int i = 0; i < getLabels().size(); i++) { + if (getLabels().get(i) != null) { + joiner.add(getLabels().get(i).toUrlQueryString(String.format("%slabels%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `existing_scores` to the URL query string + if (getExistingScores() != null) { + for (String _key : getExistingScores().keySet()) { + joiner.add(String.format("%sexisting_scores%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getExistingScores().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getExistingScores().get(_key))))); + } + } + + // add `existing_notes` to the URL query string + if (getExistingNotes() != null) { + joiner.add(String.format("%sexisting_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExistingNotes())))); + } + + // add `existing_label_notes` to the URL query string + if (getExistingLabelNotes() != null) { + for (String _key : getExistingLabelNotes().keySet()) { + joiner.add(String.format("%sexisting_label_notes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getExistingLabelNotes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getExistingLabelNotes().get(_key))))); + } + } + + // add `span_notes` to the URL query string + if (getSpanNotes() != null) { + for (int i = 0; i < getSpanNotes().size(); i++) { + joiner.add(String.format("%sspan_notes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSpanNotes().get(i))))); + } + } + + // add `span_notes_source_id` to the URL query string + if (getSpanNotesSourceId() != null) { + joiner.add(String.format("%sspan_notes_source_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSpanNotesSourceId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceItem.java new file mode 100644 index 0000000..de4211e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceItem.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueForSourceItem + */ +@JsonPropertyOrder({ + QueueForSourceItem.JSON_PROPERTY_ID, + QueueForSourceItem.JSON_PROPERTY_STATUS, + QueueForSourceItem.JSON_PROPERTY_SOURCE_TYPE, + QueueForSourceItem.JSON_PROPERTY_SOURCE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueForSourceItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private String sourceType; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nullable + private String sourceId; + + public QueueForSourceItem() { + } + + public QueueForSourceItem id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public QueueForSourceItem status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public QueueForSourceItem sourceType(@javax.annotation.Nonnull String sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull String sourceType) { + this.sourceType = sourceType; + } + + + public QueueForSourceItem sourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = sourceId; + } + + + /** + * Return true if this QueueForSourceItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueForSourceItem queueForSourceItem = (QueueForSourceItem) o; + return Objects.equals(this.id, queueForSourceItem.id) && + Objects.equals(this.status, queueForSourceItem.status) && + Objects.equals(this.sourceType, queueForSourceItem.sourceType) && + Objects.equals(this.sourceId, queueForSourceItem.sourceId); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, sourceType, sourceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueForSourceItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceQueue.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceQueue.java new file mode 100644 index 0000000..9fec79b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceQueue.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueForSourceQueue + */ +@JsonPropertyOrder({ + QueueForSourceQueue.JSON_PROPERTY_ID, + QueueForSourceQueue.JSON_PROPERTY_NAME, + QueueForSourceQueue.JSON_PROPERTY_INSTRUCTIONS, + QueueForSourceQueue.JSON_PROPERTY_IS_DEFAULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueForSourceQueue { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + @javax.annotation.Nonnull + private String instructions; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nonnull + private Boolean isDefault; + + public QueueForSourceQueue() { + } + + public QueueForSourceQueue id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public QueueForSourceQueue name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public QueueForSourceQueue instructions(@javax.annotation.Nonnull String instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get instructions + * @return instructions + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInstructions() { + return instructions; + } + + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInstructions(@javax.annotation.Nonnull String instructions) { + this.instructions = instructions; + } + + + public QueueForSourceQueue isDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@javax.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + /** + * Return true if this QueueForSourceQueue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueForSourceQueue queueForSourceQueue = (QueueForSourceQueue) o; + return Objects.equals(this.id, queueForSourceQueue.id) && + Objects.equals(this.name, queueForSourceQueue.name) && + Objects.equals(this.instructions, queueForSourceQueue.instructions) && + Objects.equals(this.isDefault, queueForSourceQueue.isDefault); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, instructions, isDefault); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueForSourceQueue {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `instructions` to the URL query string + if (getInstructions() != null) { + joiner.add(String.format("%sinstructions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstructions())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceResponse.java new file mode 100644 index 0000000..1d9e624 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueForSourceResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueForSourceEntry; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueForSourceResponse + */ +@JsonPropertyOrder({ + QueueForSourceResponse.JSON_PROPERTY_STATUS, + QueueForSourceResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueForSourceResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public QueueForSourceResponse() { + } + + public QueueForSourceResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueForSourceResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public QueueForSourceResponse addResultItem(QueueForSourceEntry resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + /** + * Return true if this QueueForSourceResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueForSourceResponse queueForSourceResponse = (QueueForSourceResponse) o; + return Objects.equals(this.status, queueForSourceResponse.status) && + Objects.equals(this.result, queueForSourceResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueForSourceResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteRequest.java new file mode 100644 index 0000000..b1d6ee8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteRequest.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueHardDeleteRequest + */ +@JsonPropertyOrder({ + QueueHardDeleteRequest.JSON_PROPERTY_FORCE, + QueueHardDeleteRequest.JSON_PROPERTY_CONFIRM_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueHardDeleteRequest { + public static final String JSON_PROPERTY_FORCE = "force"; + @javax.annotation.Nonnull + private Boolean force; + + public static final String JSON_PROPERTY_CONFIRM_NAME = "confirm_name"; + @javax.annotation.Nonnull + private String confirmName; + + public QueueHardDeleteRequest() { + } + + public QueueHardDeleteRequest force(@javax.annotation.Nonnull Boolean force) { + this.force = force; + return this; + } + + /** + * Get force + * @return force + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FORCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getForce() { + return force; + } + + + @JsonProperty(JSON_PROPERTY_FORCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setForce(@javax.annotation.Nonnull Boolean force) { + this.force = force; + } + + + public QueueHardDeleteRequest confirmName(@javax.annotation.Nonnull String confirmName) { + this.confirmName = confirmName; + return this; + } + + /** + * Get confirmName + * @return confirmName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIRM_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfirmName() { + return confirmName; + } + + + @JsonProperty(JSON_PROPERTY_CONFIRM_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfirmName(@javax.annotation.Nonnull String confirmName) { + this.confirmName = confirmName; + } + + + /** + * Return true if this QueueHardDeleteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueHardDeleteRequest queueHardDeleteRequest = (QueueHardDeleteRequest) o; + return Objects.equals(this.force, queueHardDeleteRequest.force) && + Objects.equals(this.confirmName, queueHardDeleteRequest.confirmName); + } + + @Override + public int hashCode() { + return Objects.hash(force, confirmName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueHardDeleteRequest {\n"); + sb.append(" force: ").append(toIndentedString(force)).append("\n"); + sb.append(" confirmName: ").append(toIndentedString(confirmName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `force` to the URL query string + if (getForce() != null) { + joiner.add(String.format("%sforce%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getForce())))); + } + + // add `confirm_name` to the URL query string + if (getConfirmName() != null) { + joiner.add(String.format("%sconfirm_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfirmName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResponse.java new file mode 100644 index 0000000..8a8c760 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueHardDeleteResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueHardDeleteResponse + */ +@JsonPropertyOrder({ + QueueHardDeleteResponse.JSON_PROPERTY_STATUS, + QueueHardDeleteResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueHardDeleteResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueHardDeleteResult result; + + public QueueHardDeleteResponse() { + } + + public QueueHardDeleteResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueHardDeleteResponse result(@javax.annotation.Nonnull QueueHardDeleteResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueHardDeleteResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueHardDeleteResult result) { + this.result = result; + } + + + /** + * Return true if this QueueHardDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueHardDeleteResponse queueHardDeleteResponse = (QueueHardDeleteResponse) o; + return Objects.equals(this.status, queueHardDeleteResponse.status) && + Objects.equals(this.result, queueHardDeleteResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueHardDeleteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResult.java new file mode 100644 index 0000000..176e26c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueHardDeleteResult.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueHardDeleteResult + */ +@JsonPropertyOrder({ + QueueHardDeleteResult.JSON_PROPERTY_DELETED, + QueueHardDeleteResult.JSON_PROPERTY_HARD_DELETED, + QueueHardDeleteResult.JSON_PROPERTY_ARCHIVED, + QueueHardDeleteResult.JSON_PROPERTY_QUEUE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueHardDeleteResult { + public static final String JSON_PROPERTY_DELETED = "deleted"; + @javax.annotation.Nonnull + private Boolean deleted; + + public static final String JSON_PROPERTY_HARD_DELETED = "hard_deleted"; + @javax.annotation.Nullable + private Boolean hardDeleted; + + public static final String JSON_PROPERTY_ARCHIVED = "archived"; + @javax.annotation.Nullable + private Boolean archived; + + public static final String JSON_PROPERTY_QUEUE_ID = "queue_id"; + @javax.annotation.Nonnull + private UUID queueId; + + public QueueHardDeleteResult() { + } + + public QueueHardDeleteResult deleted(@javax.annotation.Nonnull Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * @return deleted + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getDeleted() { + return deleted; + } + + + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeleted(@javax.annotation.Nonnull Boolean deleted) { + this.deleted = deleted; + } + + + public QueueHardDeleteResult hardDeleted(@javax.annotation.Nullable Boolean hardDeleted) { + this.hardDeleted = hardDeleted; + return this; + } + + /** + * Get hardDeleted + * @return hardDeleted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HARD_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHardDeleted() { + return hardDeleted; + } + + + @JsonProperty(JSON_PROPERTY_HARD_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHardDeleted(@javax.annotation.Nullable Boolean hardDeleted) { + this.hardDeleted = hardDeleted; + } + + + public QueueHardDeleteResult archived(@javax.annotation.Nullable Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Get archived + * @return archived + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getArchived() { + return archived; + } + + + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArchived(@javax.annotation.Nullable Boolean archived) { + this.archived = archived; + } + + + public QueueHardDeleteResult queueId(@javax.annotation.Nonnull UUID queueId) { + this.queueId = queueId; + return this; + } + + /** + * Get queueId + * @return queueId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUEUE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getQueueId() { + return queueId; + } + + + @JsonProperty(JSON_PROPERTY_QUEUE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQueueId(@javax.annotation.Nonnull UUID queueId) { + this.queueId = queueId; + } + + + /** + * Return true if this QueueHardDeleteResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueHardDeleteResult queueHardDeleteResult = (QueueHardDeleteResult) o; + return Objects.equals(this.deleted, queueHardDeleteResult.deleted) && + Objects.equals(this.hardDeleted, queueHardDeleteResult.hardDeleted) && + Objects.equals(this.archived, queueHardDeleteResult.archived) && + Objects.equals(this.queueId, queueHardDeleteResult.queueId); + } + + @Override + public int hashCode() { + return Objects.hash(deleted, hardDeleted, archived, queueId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueHardDeleteResult {\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" hardDeleted: ").append(toIndentedString(hardDeleted)).append("\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" queueId: ").append(toIndentedString(queueId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `deleted` to the URL query string + if (getDeleted() != null) { + joiner.add(String.format("%sdeleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeleted())))); + } + + // add `hard_deleted` to the URL query string + if (getHardDeleted() != null) { + joiner.add(String.format("%shard_deleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHardDeleted())))); + } + + // add `archived` to the URL query string + if (getArchived() != null) { + joiner.add(String.format("%sarchived%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getArchived())))); + } + + // add `queue_id` to the URL query string + if (getQueueId() != null) { + joiner.add(String.format("%squeue_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueueId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResponse.java new file mode 100644 index 0000000..3f206cd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueImportAnnotationsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueImportAnnotationsResponse + */ +@JsonPropertyOrder({ + QueueImportAnnotationsResponse.JSON_PROPERTY_STATUS, + QueueImportAnnotationsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueImportAnnotationsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueImportAnnotationsResult result; + + public QueueImportAnnotationsResponse() { + } + + public QueueImportAnnotationsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueImportAnnotationsResponse result(@javax.annotation.Nonnull QueueImportAnnotationsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueImportAnnotationsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueImportAnnotationsResult result) { + this.result = result; + } + + + /** + * Return true if this QueueImportAnnotationsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueImportAnnotationsResponse queueImportAnnotationsResponse = (QueueImportAnnotationsResponse) o; + return Objects.equals(this.status, queueImportAnnotationsResponse.status) && + Objects.equals(this.result, queueImportAnnotationsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueImportAnnotationsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResult.java new file mode 100644 index 0000000..89f1607 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueImportAnnotationsResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueImportAnnotationsResult + */ +@JsonPropertyOrder({ + QueueImportAnnotationsResult.JSON_PROPERTY_IMPORTED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueImportAnnotationsResult { + public static final String JSON_PROPERTY_IMPORTED = "imported"; + @javax.annotation.Nonnull + private Integer imported; + + public QueueImportAnnotationsResult() { + } + + public QueueImportAnnotationsResult imported(@javax.annotation.Nonnull Integer imported) { + this.imported = imported; + return this; + } + + /** + * Get imported + * @return imported + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IMPORTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getImported() { + return imported; + } + + + @JsonProperty(JSON_PROPERTY_IMPORTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setImported(@javax.annotation.Nonnull Integer imported) { + this.imported = imported; + } + + + /** + * Return true if this QueueImportAnnotationsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueImportAnnotationsResult queueImportAnnotationsResult = (QueueImportAnnotationsResult) o; + return Objects.equals(this.imported, queueImportAnnotationsResult.imported); + } + + @Override + public int hashCode() { + return Objects.hash(imported); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueImportAnnotationsResult {\n"); + sb.append(" imported: ").append(toIndentedString(imported)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `imported` to the URL query string + if (getImported() != null) { + joiner.add(String.format("%simported%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImported())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItem.java new file mode 100644 index 0000000..d83b1ea --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItem.java @@ -0,0 +1,1035 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueItem + */ +@JsonPropertyOrder({ + QueueItem.JSON_PROPERTY_ID, + QueueItem.JSON_PROPERTY_QUEUE, + QueueItem.JSON_PROPERTY_SOURCE_TYPE, + QueueItem.JSON_PROPERTY_SOURCE_ID, + QueueItem.JSON_PROPERTY_STATUS, + QueueItem.JSON_PROPERTY_WORKFLOW_STATUS, + QueueItem.JSON_PROPERTY_WORKFLOW_STATUS_LABEL, + QueueItem.JSON_PROPERTY_PRIORITY, + QueueItem.JSON_PROPERTY_ORDER, + QueueItem.JSON_PROPERTY_METADATA, + QueueItem.JSON_PROPERTY_ASSIGNED_TO, + QueueItem.JSON_PROPERTY_ASSIGNED_TO_NAME, + QueueItem.JSON_PROPERTY_ASSIGNED_USERS, + QueueItem.JSON_PROPERTY_RESERVED_BY, + QueueItem.JSON_PROPERTY_RESERVED_BY_NAME, + QueueItem.JSON_PROPERTY_RESERVATION_EXPIRES_AT, + QueueItem.JSON_PROPERTY_REVIEW_STATUS, + QueueItem.JSON_PROPERTY_REVIEWED_BY, + QueueItem.JSON_PROPERTY_REVIEWED_BY_NAME, + QueueItem.JSON_PROPERTY_REVIEWED_AT, + QueueItem.JSON_PROPERTY_REVIEW_NOTES, + QueueItem.JSON_PROPERTY_SOURCE_PREVIEW, + QueueItem.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueItem { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_QUEUE = "queue"; + @javax.annotation.Nullable + private UUID queue; + + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + DATASET_ROW(String.valueOf("dataset_row")), + + TRACE(String.valueOf("trace")), + + OBSERVATION_SPAN(String.valueOf("observation_span")), + + PROTOTYPE_RUN(String.valueOf("prototype_run")), + + CALL_EXECUTION(String.valueOf("call_execution")), + + TRACE_SESSION(String.valueOf("trace_session")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nullable + private String sourceId; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PENDING(String.valueOf("pending")), + + IN_PROGRESS(String.valueOf("in_progress")), + + COMPLETED(String.valueOf("completed")), + + SKIPPED(String.valueOf("skipped")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_WORKFLOW_STATUS = "workflow_status"; + @javax.annotation.Nullable + private String workflowStatus; + + public static final String JSON_PROPERTY_WORKFLOW_STATUS_LABEL = "workflow_status_label"; + @javax.annotation.Nullable + private String workflowStatusLabel; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + @javax.annotation.Nullable + private Integer priority; + + public static final String JSON_PROPERTY_ORDER = "order"; + @javax.annotation.Nullable + private Integer order; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_ASSIGNED_TO = "assigned_to"; + private JsonNullable assignedTo = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ASSIGNED_TO_NAME = "assigned_to_name"; + @javax.annotation.Nullable + private String assignedToName; + + public static final String JSON_PROPERTY_ASSIGNED_USERS = "assigned_users"; + @javax.annotation.Nullable + private String assignedUsers; + + public static final String JSON_PROPERTY_RESERVED_BY = "reserved_by"; + private JsonNullable reservedBy = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESERVED_BY_NAME = "reserved_by_name"; + @javax.annotation.Nullable + private String reservedByName; + + public static final String JSON_PROPERTY_RESERVATION_EXPIRES_AT = "reservation_expires_at"; + private JsonNullable reservationExpiresAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REVIEW_STATUS = "review_status"; + private JsonNullable reviewStatus = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REVIEWED_BY = "reviewed_by"; + private JsonNullable reviewedBy = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REVIEWED_BY_NAME = "reviewed_by_name"; + @javax.annotation.Nullable + private String reviewedByName; + + public static final String JSON_PROPERTY_REVIEWED_AT = "reviewed_at"; + private JsonNullable reviewedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REVIEW_NOTES = "review_notes"; + private JsonNullable reviewNotes = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCE_PREVIEW = "source_preview"; + @javax.annotation.Nullable + private String sourcePreview; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public QueueItem() { + } + + @JsonCreator + public QueueItem( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_QUEUE) UUID queue, + @JsonProperty(JSON_PROPERTY_WORKFLOW_STATUS) String workflowStatus, + @JsonProperty(JSON_PROPERTY_WORKFLOW_STATUS_LABEL) String workflowStatusLabel, + @JsonProperty(JSON_PROPERTY_ASSIGNED_TO_NAME) String assignedToName, + @JsonProperty(JSON_PROPERTY_ASSIGNED_USERS) String assignedUsers, + @JsonProperty(JSON_PROPERTY_RESERVED_BY_NAME) String reservedByName, + @JsonProperty(JSON_PROPERTY_REVIEWED_BY_NAME) String reviewedByName, + @JsonProperty(JSON_PROPERTY_SOURCE_PREVIEW) String sourcePreview, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.queue = queue; + this.workflowStatus = workflowStatus; + this.workflowStatusLabel = workflowStatusLabel; + this.assignedToName = assignedToName; + this.assignedUsers = assignedUsers; + this.reservedByName = reservedByName; + this.reviewedByName = reviewedByName; + this.sourcePreview = sourcePreview; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get queue + * @return queue + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUEUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getQueue() { + return queue; + } + + + + + public QueueItem sourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + public QueueItem sourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceId() { + return sourceId; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceId(@javax.annotation.Nullable String sourceId) { + this.sourceId = sourceId; + } + + + public QueueItem status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + /** + * Get workflowStatus + * @return workflowStatus + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKFLOW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWorkflowStatus() { + return workflowStatus; + } + + + + + /** + * Get workflowStatusLabel + * @return workflowStatusLabel + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKFLOW_STATUS_LABEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWorkflowStatusLabel() { + return workflowStatusLabel; + } + + + + + public QueueItem priority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get priority + * minimum: -2147483648 + * maximum: 2147483647 + * @return priority + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPriority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + } + + + public QueueItem order(@javax.annotation.Nullable Integer order) { + this.order = order; + return this; + } + + /** + * Get order + * minimum: -2147483648 + * maximum: 2147483647 + * @return order + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getOrder() { + return order; + } + + + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrder(@javax.annotation.Nullable Integer order) { + this.order = order; + } + + + public QueueItem metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public QueueItem putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public QueueItem assignedTo(@javax.annotation.Nullable UUID assignedTo) { + this.assignedTo = JsonNullable.of(assignedTo); + return this; + } + + /** + * Get assignedTo + * @return assignedTo + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAssignedTo() { + return assignedTo.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ASSIGNED_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAssignedTo_JsonNullable() { + return assignedTo; + } + + @JsonProperty(JSON_PROPERTY_ASSIGNED_TO) + public void setAssignedTo_JsonNullable(JsonNullable assignedTo) { + this.assignedTo = assignedTo; + } + + public void setAssignedTo(@javax.annotation.Nullable UUID assignedTo) { + this.assignedTo = JsonNullable.of(assignedTo); + } + + + /** + * Get assignedToName + * @return assignedToName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSIGNED_TO_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssignedToName() { + return assignedToName; + } + + + + + /** + * Get assignedUsers + * @return assignedUsers + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSIGNED_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssignedUsers() { + return assignedUsers; + } + + + + + public QueueItem reservedBy(@javax.annotation.Nullable UUID reservedBy) { + this.reservedBy = JsonNullable.of(reservedBy); + return this; + } + + /** + * Get reservedBy + * @return reservedBy + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getReservedBy() { + return reservedBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESERVED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReservedBy_JsonNullable() { + return reservedBy; + } + + @JsonProperty(JSON_PROPERTY_RESERVED_BY) + public void setReservedBy_JsonNullable(JsonNullable reservedBy) { + this.reservedBy = reservedBy; + } + + public void setReservedBy(@javax.annotation.Nullable UUID reservedBy) { + this.reservedBy = JsonNullable.of(reservedBy); + } + + + /** + * Get reservedByName + * @return reservedByName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESERVED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReservedByName() { + return reservedByName; + } + + + + + public QueueItem reservationExpiresAt(@javax.annotation.Nullable OffsetDateTime reservationExpiresAt) { + this.reservationExpiresAt = JsonNullable.of(reservationExpiresAt); + return this; + } + + /** + * Get reservationExpiresAt + * @return reservationExpiresAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getReservationExpiresAt() { + return reservationExpiresAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESERVATION_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReservationExpiresAt_JsonNullable() { + return reservationExpiresAt; + } + + @JsonProperty(JSON_PROPERTY_RESERVATION_EXPIRES_AT) + public void setReservationExpiresAt_JsonNullable(JsonNullable reservationExpiresAt) { + this.reservationExpiresAt = reservationExpiresAt; + } + + public void setReservationExpiresAt(@javax.annotation.Nullable OffsetDateTime reservationExpiresAt) { + this.reservationExpiresAt = JsonNullable.of(reservationExpiresAt); + } + + + public QueueItem reviewStatus(@javax.annotation.Nullable String reviewStatus) { + this.reviewStatus = JsonNullable.of(reviewStatus); + return this; + } + + /** + * Get reviewStatus + * @return reviewStatus + */ + @javax.annotation.Nullable + @JsonIgnore + public String getReviewStatus() { + return reviewStatus.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REVIEW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReviewStatus_JsonNullable() { + return reviewStatus; + } + + @JsonProperty(JSON_PROPERTY_REVIEW_STATUS) + public void setReviewStatus_JsonNullable(JsonNullable reviewStatus) { + this.reviewStatus = reviewStatus; + } + + public void setReviewStatus(@javax.annotation.Nullable String reviewStatus) { + this.reviewStatus = JsonNullable.of(reviewStatus); + } + + + public QueueItem reviewedBy(@javax.annotation.Nullable UUID reviewedBy) { + this.reviewedBy = JsonNullable.of(reviewedBy); + return this; + } + + /** + * Get reviewedBy + * @return reviewedBy + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getReviewedBy() { + return reviewedBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REVIEWED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReviewedBy_JsonNullable() { + return reviewedBy; + } + + @JsonProperty(JSON_PROPERTY_REVIEWED_BY) + public void setReviewedBy_JsonNullable(JsonNullable reviewedBy) { + this.reviewedBy = reviewedBy; + } + + public void setReviewedBy(@javax.annotation.Nullable UUID reviewedBy) { + this.reviewedBy = JsonNullable.of(reviewedBy); + } + + + /** + * Get reviewedByName + * @return reviewedByName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVIEWED_BY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReviewedByName() { + return reviewedByName; + } + + + + + public QueueItem reviewedAt(@javax.annotation.Nullable OffsetDateTime reviewedAt) { + this.reviewedAt = JsonNullable.of(reviewedAt); + return this; + } + + /** + * Get reviewedAt + * @return reviewedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getReviewedAt() { + return reviewedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REVIEWED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReviewedAt_JsonNullable() { + return reviewedAt; + } + + @JsonProperty(JSON_PROPERTY_REVIEWED_AT) + public void setReviewedAt_JsonNullable(JsonNullable reviewedAt) { + this.reviewedAt = reviewedAt; + } + + public void setReviewedAt(@javax.annotation.Nullable OffsetDateTime reviewedAt) { + this.reviewedAt = JsonNullable.of(reviewedAt); + } + + + public QueueItem reviewNotes(@javax.annotation.Nullable String reviewNotes) { + this.reviewNotes = JsonNullable.of(reviewNotes); + return this; + } + + /** + * Get reviewNotes + * @return reviewNotes + */ + @javax.annotation.Nullable + @JsonIgnore + public String getReviewNotes() { + return reviewNotes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REVIEW_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getReviewNotes_JsonNullable() { + return reviewNotes; + } + + @JsonProperty(JSON_PROPERTY_REVIEW_NOTES) + public void setReviewNotes_JsonNullable(JsonNullable reviewNotes) { + this.reviewNotes = reviewNotes; + } + + public void setReviewNotes(@javax.annotation.Nullable String reviewNotes) { + this.reviewNotes = JsonNullable.of(reviewNotes); + } + + + /** + * Get sourcePreview + * @return sourcePreview + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_PREVIEW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourcePreview() { + return sourcePreview; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this QueueItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueItem queueItem = (QueueItem) o; + return Objects.equals(this.id, queueItem.id) && + Objects.equals(this.queue, queueItem.queue) && + Objects.equals(this.sourceType, queueItem.sourceType) && + Objects.equals(this.sourceId, queueItem.sourceId) && + Objects.equals(this.status, queueItem.status) && + Objects.equals(this.workflowStatus, queueItem.workflowStatus) && + Objects.equals(this.workflowStatusLabel, queueItem.workflowStatusLabel) && + Objects.equals(this.priority, queueItem.priority) && + Objects.equals(this.order, queueItem.order) && + Objects.equals(this.metadata, queueItem.metadata) && + equalsNullable(this.assignedTo, queueItem.assignedTo) && + Objects.equals(this.assignedToName, queueItem.assignedToName) && + Objects.equals(this.assignedUsers, queueItem.assignedUsers) && + equalsNullable(this.reservedBy, queueItem.reservedBy) && + Objects.equals(this.reservedByName, queueItem.reservedByName) && + equalsNullable(this.reservationExpiresAt, queueItem.reservationExpiresAt) && + equalsNullable(this.reviewStatus, queueItem.reviewStatus) && + equalsNullable(this.reviewedBy, queueItem.reviewedBy) && + Objects.equals(this.reviewedByName, queueItem.reviewedByName) && + equalsNullable(this.reviewedAt, queueItem.reviewedAt) && + equalsNullable(this.reviewNotes, queueItem.reviewNotes) && + Objects.equals(this.sourcePreview, queueItem.sourcePreview) && + Objects.equals(this.createdAt, queueItem.createdAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, queue, sourceType, sourceId, status, workflowStatus, workflowStatusLabel, priority, order, metadata, hashCodeNullable(assignedTo), assignedToName, assignedUsers, hashCodeNullable(reservedBy), reservedByName, hashCodeNullable(reservationExpiresAt), hashCodeNullable(reviewStatus), hashCodeNullable(reviewedBy), reviewedByName, hashCodeNullable(reviewedAt), hashCodeNullable(reviewNotes), sourcePreview, createdAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueItem {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" queue: ").append(toIndentedString(queue)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" workflowStatus: ").append(toIndentedString(workflowStatus)).append("\n"); + sb.append(" workflowStatusLabel: ").append(toIndentedString(workflowStatusLabel)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" assignedTo: ").append(toIndentedString(assignedTo)).append("\n"); + sb.append(" assignedToName: ").append(toIndentedString(assignedToName)).append("\n"); + sb.append(" assignedUsers: ").append(toIndentedString(assignedUsers)).append("\n"); + sb.append(" reservedBy: ").append(toIndentedString(reservedBy)).append("\n"); + sb.append(" reservedByName: ").append(toIndentedString(reservedByName)).append("\n"); + sb.append(" reservationExpiresAt: ").append(toIndentedString(reservationExpiresAt)).append("\n"); + sb.append(" reviewStatus: ").append(toIndentedString(reviewStatus)).append("\n"); + sb.append(" reviewedBy: ").append(toIndentedString(reviewedBy)).append("\n"); + sb.append(" reviewedByName: ").append(toIndentedString(reviewedByName)).append("\n"); + sb.append(" reviewedAt: ").append(toIndentedString(reviewedAt)).append("\n"); + sb.append(" reviewNotes: ").append(toIndentedString(reviewNotes)).append("\n"); + sb.append(" sourcePreview: ").append(toIndentedString(sourcePreview)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `queue` to the URL query string + if (getQueue() != null) { + joiner.add(String.format("%squeue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueue())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `workflow_status` to the URL query string + if (getWorkflowStatus() != null) { + joiner.add(String.format("%sworkflow_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkflowStatus())))); + } + + // add `workflow_status_label` to the URL query string + if (getWorkflowStatusLabel() != null) { + joiner.add(String.format("%sworkflow_status_label%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkflowStatusLabel())))); + } + + // add `priority` to the URL query string + if (getPriority() != null) { + joiner.add(String.format("%spriority%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPriority())))); + } + + // add `order` to the URL query string + if (getOrder() != null) { + joiner.add(String.format("%sorder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrder())))); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `assigned_to` to the URL query string + if (getAssignedTo() != null) { + joiner.add(String.format("%sassigned_to%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignedTo())))); + } + + // add `assigned_to_name` to the URL query string + if (getAssignedToName() != null) { + joiner.add(String.format("%sassigned_to_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignedToName())))); + } + + // add `assigned_users` to the URL query string + if (getAssignedUsers() != null) { + joiner.add(String.format("%sassigned_users%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAssignedUsers())))); + } + + // add `reserved_by` to the URL query string + if (getReservedBy() != null) { + joiner.add(String.format("%sreserved_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReservedBy())))); + } + + // add `reserved_by_name` to the URL query string + if (getReservedByName() != null) { + joiner.add(String.format("%sreserved_by_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReservedByName())))); + } + + // add `reservation_expires_at` to the URL query string + if (getReservationExpiresAt() != null) { + joiner.add(String.format("%sreservation_expires_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReservationExpiresAt())))); + } + + // add `review_status` to the URL query string + if (getReviewStatus() != null) { + joiner.add(String.format("%sreview_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReviewStatus())))); + } + + // add `reviewed_by` to the URL query string + if (getReviewedBy() != null) { + joiner.add(String.format("%sreviewed_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReviewedBy())))); + } + + // add `reviewed_by_name` to the URL query string + if (getReviewedByName() != null) { + joiner.add(String.format("%sreviewed_by_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReviewedByName())))); + } + + // add `reviewed_at` to the URL query string + if (getReviewedAt() != null) { + joiner.add(String.format("%sreviewed_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReviewedAt())))); + } + + // add `review_notes` to the URL query string + if (getReviewNotes() != null) { + joiner.add(String.format("%sreview_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReviewNotes())))); + } + + // add `source_preview` to the URL query string + if (getSourcePreview() != null) { + joiner.add(String.format("%ssource_preview%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourcePreview())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemAnnotationsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemAnnotationsResponse.java new file mode 100644 index 0000000..790611b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemAnnotationsResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Score; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueItemAnnotationsResponse + */ +@JsonPropertyOrder({ + QueueItemAnnotationsResponse.JSON_PROPERTY_STATUS, + QueueItemAnnotationsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueItemAnnotationsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public QueueItemAnnotationsResponse() { + } + + public QueueItemAnnotationsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueItemAnnotationsResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public QueueItemAnnotationsResponse addResultItem(Score resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + /** + * Return true if this QueueItemAnnotationsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueItemAnnotationsResponse queueItemAnnotationsResponse = (QueueItemAnnotationsResponse) o; + return Objects.equals(this.status, queueItemAnnotationsResponse.status) && + Objects.equals(this.result, queueItemAnnotationsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueItemAnnotationsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemNavigationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemNavigationRequest.java new file mode 100644 index 0000000..d1ee223 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueItemNavigationRequest.java @@ -0,0 +1,237 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueItemNavigationRequest + */ +@JsonPropertyOrder({ + QueueItemNavigationRequest.JSON_PROPERTY_EXCLUDE, + QueueItemNavigationRequest.JSON_PROPERTY_EXCLUDE_REVIEW_STATUS, + QueueItemNavigationRequest.JSON_PROPERTY_INCLUDE_COMPLETED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueItemNavigationRequest { + public static final String JSON_PROPERTY_EXCLUDE = "exclude"; + @javax.annotation.Nullable + private List exclude = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXCLUDE_REVIEW_STATUS = "exclude_review_status"; + @javax.annotation.Nullable + private String excludeReviewStatus; + + public static final String JSON_PROPERTY_INCLUDE_COMPLETED = "include_completed"; + @javax.annotation.Nullable + private Boolean includeCompleted = false; + + public QueueItemNavigationRequest() { + } + + public QueueItemNavigationRequest exclude(@javax.annotation.Nullable List exclude) { + this.exclude = exclude; + return this; + } + + public QueueItemNavigationRequest addExcludeItem(String excludeItem) { + if (this.exclude == null) { + this.exclude = new ArrayList<>(); + } + this.exclude.add(excludeItem); + return this; + } + + /** + * Get exclude + * @return exclude + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExclude() { + return exclude; + } + + + @JsonProperty(JSON_PROPERTY_EXCLUDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExclude(@javax.annotation.Nullable List exclude) { + this.exclude = exclude; + } + + + public QueueItemNavigationRequest excludeReviewStatus(@javax.annotation.Nullable String excludeReviewStatus) { + this.excludeReviewStatus = excludeReviewStatus; + return this; + } + + /** + * Get excludeReviewStatus + * @return excludeReviewStatus + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_REVIEW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExcludeReviewStatus() { + return excludeReviewStatus; + } + + + @JsonProperty(JSON_PROPERTY_EXCLUDE_REVIEW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExcludeReviewStatus(@javax.annotation.Nullable String excludeReviewStatus) { + this.excludeReviewStatus = excludeReviewStatus; + } + + + public QueueItemNavigationRequest includeCompleted(@javax.annotation.Nullable Boolean includeCompleted) { + this.includeCompleted = includeCompleted; + return this; + } + + /** + * Get includeCompleted + * @return includeCompleted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_COMPLETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeCompleted() { + return includeCompleted; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDE_COMPLETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncludeCompleted(@javax.annotation.Nullable Boolean includeCompleted) { + this.includeCompleted = includeCompleted; + } + + + /** + * Return true if this QueueItemNavigationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueItemNavigationRequest queueItemNavigationRequest = (QueueItemNavigationRequest) o; + return Objects.equals(this.exclude, queueItemNavigationRequest.exclude) && + Objects.equals(this.excludeReviewStatus, queueItemNavigationRequest.excludeReviewStatus) && + Objects.equals(this.includeCompleted, queueItemNavigationRequest.includeCompleted); + } + + @Override + public int hashCode() { + return Objects.hash(exclude, excludeReviewStatus, includeCompleted); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueItemNavigationRequest {\n"); + sb.append(" exclude: ").append(toIndentedString(exclude)).append("\n"); + sb.append(" excludeReviewStatus: ").append(toIndentedString(excludeReviewStatus)).append("\n"); + sb.append(" includeCompleted: ").append(toIndentedString(includeCompleted)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `exclude` to the URL query string + if (getExclude() != null) { + for (int i = 0; i < getExclude().size(); i++) { + joiner.add(String.format("%sexclude%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getExclude().get(i))))); + } + } + + // add `exclude_review_status` to the URL query string + if (getExcludeReviewStatus() != null) { + joiner.add(String.format("%sexclude_review_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExcludeReviewStatus())))); + } + + // add `include_completed` to the URL query string + if (getIncludeCompleted() != null) { + joiner.add(String.format("%sinclude_completed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIncludeCompleted())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelNested.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelNested.java new file mode 100644 index 0000000..fc0ff5a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelNested.java @@ -0,0 +1,316 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueLabelNested + */ +@JsonPropertyOrder({ + QueueLabelNested.JSON_PROPERTY_ID, + QueueLabelNested.JSON_PROPERTY_LABEL_ID, + QueueLabelNested.JSON_PROPERTY_NAME, + QueueLabelNested.JSON_PROPERTY_TYPE, + QueueLabelNested.JSON_PROPERTY_REQUIRED, + QueueLabelNested.JSON_PROPERTY_ORDER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueLabelNested { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nonnull + private UUID labelId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nullable + private String type; + + public static final String JSON_PROPERTY_REQUIRED = "required"; + @javax.annotation.Nullable + private Boolean required; + + public static final String JSON_PROPERTY_ORDER = "order"; + @javax.annotation.Nullable + private Integer order; + + public QueueLabelNested() { + } + + @JsonCreator + public QueueLabelNested( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_TYPE) String type + ) { + this(); + this.id = id; + this.name = name; + this.type = type; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public QueueLabelNested labelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + } + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + + + + public QueueLabelNested required(@javax.annotation.Nullable Boolean required) { + this.required = required; + return this; + } + + /** + * Get required + * @return required + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequired() { + return required; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequired(@javax.annotation.Nullable Boolean required) { + this.required = required; + } + + + public QueueLabelNested order(@javax.annotation.Nullable Integer order) { + this.order = order; + return this; + } + + /** + * Get order + * minimum: -2147483648 + * maximum: 2147483647 + * @return order + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getOrder() { + return order; + } + + + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrder(@javax.annotation.Nullable Integer order) { + this.order = order; + } + + + /** + * Return true if this QueueLabelNested object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueLabelNested queueLabelNested = (QueueLabelNested) o; + return Objects.equals(this.id, queueLabelNested.id) && + Objects.equals(this.labelId, queueLabelNested.labelId) && + Objects.equals(this.name, queueLabelNested.name) && + Objects.equals(this.type, queueLabelNested.type) && + Objects.equals(this.required, queueLabelNested.required) && + Objects.equals(this.order, queueLabelNested.order); + } + + @Override + public int hashCode() { + return Objects.hash(id, labelId, name, type, required, order); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueLabelNested {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `required` to the URL query string + if (getRequired() != null) { + joiner.add(String.format("%srequired%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequired())))); + } + + // add `order` to the URL query string + if (getOrder() != null) { + joiner.add(String.format("%sorder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrder())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelRequest.java new file mode 100644 index 0000000..f1b0679 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelRequest.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueLabelRequest + */ +@JsonPropertyOrder({ + QueueLabelRequest.JSON_PROPERTY_LABEL_ID, + QueueLabelRequest.JSON_PROPERTY_REQUIRED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueLabelRequest { + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nonnull + private UUID labelId; + + public static final String JSON_PROPERTY_REQUIRED = "required"; + @javax.annotation.Nullable + private Boolean required = true; + + public QueueLabelRequest() { + } + + public QueueLabelRequest labelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + } + + + public QueueLabelRequest required(@javax.annotation.Nullable Boolean required) { + this.required = required; + return this; + } + + /** + * Get required + * @return required + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequired() { + return required; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequired(@javax.annotation.Nullable Boolean required) { + this.required = required; + } + + + /** + * Return true if this QueueLabelRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueLabelRequest queueLabelRequest = (QueueLabelRequest) o; + return Objects.equals(this.labelId, queueLabelRequest.labelId) && + Objects.equals(this.required, queueLabelRequest.required); + } + + @Override + public int hashCode() { + return Objects.hash(labelId, required); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueLabelRequest {\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `required` to the URL query string + if (getRequired() != null) { + joiner.add(String.format("%srequired%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequired())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelResult.java new file mode 100644 index 0000000..87a3cc4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueLabelResult.java @@ -0,0 +1,418 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueLabelResult + */ +@JsonPropertyOrder({ + QueueLabelResult.JSON_PROPERTY_ID, + QueueLabelResult.JSON_PROPERTY_NAME, + QueueLabelResult.JSON_PROPERTY_TYPE, + QueueLabelResult.JSON_PROPERTY_SETTINGS, + QueueLabelResult.JSON_PROPERTY_DESCRIPTION, + QueueLabelResult.JSON_PROPERTY_ALLOW_NOTES, + QueueLabelResult.JSON_PROPERTY_REQUIRED, + QueueLabelResult.JSON_PROPERTY_ORDER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueLabelResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @javax.annotation.Nonnull + private Map settings = new HashMap<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_ALLOW_NOTES = "allow_notes"; + @javax.annotation.Nonnull + private Boolean allowNotes; + + public static final String JSON_PROPERTY_REQUIRED = "required"; + @javax.annotation.Nonnull + private Boolean required; + + public static final String JSON_PROPERTY_ORDER = "order"; + @javax.annotation.Nonnull + private Integer order; + + public QueueLabelResult() { + } + + public QueueLabelResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public QueueLabelResult name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public QueueLabelResult type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public QueueLabelResult settings(@javax.annotation.Nonnull Map settings) { + this.settings = settings; + return this; + } + + public QueueLabelResult putSettingsItem(String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Get settings + * @return settings + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getSettings() { + return settings; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setSettings(@javax.annotation.Nonnull Map settings) { + this.settings = settings; + } + + + public QueueLabelResult description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public QueueLabelResult allowNotes(@javax.annotation.Nonnull Boolean allowNotes) { + this.allowNotes = allowNotes; + return this; + } + + /** + * Get allowNotes + * @return allowNotes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALLOW_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAllowNotes() { + return allowNotes; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAllowNotes(@javax.annotation.Nonnull Boolean allowNotes) { + this.allowNotes = allowNotes; + } + + + public QueueLabelResult required(@javax.annotation.Nonnull Boolean required) { + this.required = required; + return this; + } + + /** + * Get required + * @return required + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRequired() { + return required; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequired(@javax.annotation.Nonnull Boolean required) { + this.required = required; + } + + + public QueueLabelResult order(@javax.annotation.Nonnull Integer order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getOrder() { + return order; + } + + + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrder(@javax.annotation.Nonnull Integer order) { + this.order = order; + } + + + /** + * Return true if this QueueLabelResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueLabelResult queueLabelResult = (QueueLabelResult) o; + return Objects.equals(this.id, queueLabelResult.id) && + Objects.equals(this.name, queueLabelResult.name) && + Objects.equals(this.type, queueLabelResult.type) && + Objects.equals(this.settings, queueLabelResult.settings) && + Objects.equals(this.description, queueLabelResult.description) && + Objects.equals(this.allowNotes, queueLabelResult.allowNotes) && + Objects.equals(this.required, queueLabelResult.required) && + Objects.equals(this.order, queueLabelResult.order); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type, settings, description, allowNotes, required, order); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueLabelResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" allowNotes: ").append(toIndentedString(allowNotes)).append("\n"); + sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `settings` to the URL query string + if (getSettings() != null) { + for (String _key : getSettings().keySet()) { + joiner.add(String.format("%ssettings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSettings().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSettings().get(_key))))); + } + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `allow_notes` to the URL query string + if (getAllowNotes() != null) { + joiner.add(String.format("%sallow_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAllowNotes())))); + } + + // add `required` to the URL query string + if (getRequired() != null) { + joiner.add(String.format("%srequired%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequired())))); + } + + // add `order` to the URL query string + if (getOrder() != null) { + joiner.add(String.format("%sorder%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrder())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResponse.java new file mode 100644 index 0000000..3742e30 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueNavigationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueNavigationResponse + */ +@JsonPropertyOrder({ + QueueNavigationResponse.JSON_PROPERTY_STATUS, + QueueNavigationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueNavigationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueNavigationResult result; + + public QueueNavigationResponse() { + } + + public QueueNavigationResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueNavigationResponse result(@javax.annotation.Nonnull QueueNavigationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueNavigationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueNavigationResult result) { + this.result = result; + } + + + /** + * Return true if this QueueNavigationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueNavigationResponse queueNavigationResponse = (QueueNavigationResponse) o; + return Objects.equals(this.status, queueNavigationResponse.status) && + Objects.equals(this.result, queueNavigationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueNavigationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResult.java new file mode 100644 index 0000000..8b592ac --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNavigationResult.java @@ -0,0 +1,238 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueNavigationResult + */ +@JsonPropertyOrder({ + QueueNavigationResult.JSON_PROPERTY_COMPLETED_ITEM_ID, + QueueNavigationResult.JSON_PROPERTY_SKIPPED_ITEM_ID, + QueueNavigationResult.JSON_PROPERTY_NEXT_ITEM +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueNavigationResult { + public static final String JSON_PROPERTY_COMPLETED_ITEM_ID = "completed_item_id"; + @javax.annotation.Nullable + private UUID completedItemId; + + public static final String JSON_PROPERTY_SKIPPED_ITEM_ID = "skipped_item_id"; + @javax.annotation.Nullable + private UUID skippedItemId; + + public static final String JSON_PROPERTY_NEXT_ITEM = "next_item"; + @javax.annotation.Nonnull + private Map nextItem = new HashMap<>(); + + public QueueNavigationResult() { + } + + public QueueNavigationResult completedItemId(@javax.annotation.Nullable UUID completedItemId) { + this.completedItemId = completedItemId; + return this; + } + + /** + * Get completedItemId + * @return completedItemId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETED_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCompletedItemId() { + return completedItemId; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompletedItemId(@javax.annotation.Nullable UUID completedItemId) { + this.completedItemId = completedItemId; + } + + + public QueueNavigationResult skippedItemId(@javax.annotation.Nullable UUID skippedItemId) { + this.skippedItemId = skippedItemId; + return this; + } + + /** + * Get skippedItemId + * @return skippedItemId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SKIPPED_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getSkippedItemId() { + return skippedItemId; + } + + + @JsonProperty(JSON_PROPERTY_SKIPPED_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSkippedItemId(@javax.annotation.Nullable UUID skippedItemId) { + this.skippedItemId = skippedItemId; + } + + + public QueueNavigationResult nextItem(@javax.annotation.Nonnull Map nextItem) { + this.nextItem = nextItem; + return this; + } + + public QueueNavigationResult putNextItemItem(String key, Object nextItemItem) { + if (this.nextItem == null) { + this.nextItem = new HashMap<>(); + } + this.nextItem.put(key, nextItemItem); + return this; + } + + /** + * Get nextItem + * @return nextItem + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEXT_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getNextItem() { + return nextItem; + } + + + @JsonProperty(JSON_PROPERTY_NEXT_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setNextItem(@javax.annotation.Nonnull Map nextItem) { + this.nextItem = nextItem; + } + + + /** + * Return true if this QueueNavigationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueNavigationResult queueNavigationResult = (QueueNavigationResult) o; + return Objects.equals(this.completedItemId, queueNavigationResult.completedItemId) && + Objects.equals(this.skippedItemId, queueNavigationResult.skippedItemId) && + Objects.equals(this.nextItem, queueNavigationResult.nextItem); + } + + @Override + public int hashCode() { + return Objects.hash(completedItemId, skippedItemId, nextItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueNavigationResult {\n"); + sb.append(" completedItemId: ").append(toIndentedString(completedItemId)).append("\n"); + sb.append(" skippedItemId: ").append(toIndentedString(skippedItemId)).append("\n"); + sb.append(" nextItem: ").append(toIndentedString(nextItem)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `completed_item_id` to the URL query string + if (getCompletedItemId() != null) { + joiner.add(String.format("%scompleted_item_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedItemId())))); + } + + // add `skipped_item_id` to the URL query string + if (getSkippedItemId() != null) { + joiner.add(String.format("%sskipped_item_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSkippedItemId())))); + } + + // add `next_item` to the URL query string + if (getNextItem() != null) { + for (String _key : getNextItem().keySet()) { + joiner.add(String.format("%snext_item%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getNextItem().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getNextItem().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResponse.java new file mode 100644 index 0000000..bb92144 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueNextItemResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueNextItemResponse + */ +@JsonPropertyOrder({ + QueueNextItemResponse.JSON_PROPERTY_STATUS, + QueueNextItemResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueNextItemResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueNextItemResult result; + + public QueueNextItemResponse() { + } + + public QueueNextItemResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueNextItemResponse result(@javax.annotation.Nonnull QueueNextItemResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueNextItemResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueNextItemResult result) { + this.result = result; + } + + + /** + * Return true if this QueueNextItemResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueNextItemResponse queueNextItemResponse = (QueueNextItemResponse) o; + return Objects.equals(this.status, queueNextItemResponse.status) && + Objects.equals(this.result, queueNextItemResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueNextItemResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResult.java new file mode 100644 index 0000000..3447bbb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueNextItemResult.java @@ -0,0 +1,165 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueNextItemResult + */ +@JsonPropertyOrder({ + QueueNextItemResult.JSON_PROPERTY_ITEM +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueNextItemResult { + public static final String JSON_PROPERTY_ITEM = "item"; + @javax.annotation.Nonnull + private Map item = new HashMap<>(); + + public QueueNextItemResult() { + } + + public QueueNextItemResult item(@javax.annotation.Nonnull Map item) { + this.item = item; + return this; + } + + public QueueNextItemResult putItemItem(String key, Object itemItem) { + if (this.item == null) { + this.item = new HashMap<>(); + } + this.item.put(key, itemItem); + return this; + } + + /** + * Get item + * @return item + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getItem() { + return item; + } + + + @JsonProperty(JSON_PROPERTY_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setItem(@javax.annotation.Nonnull Map item) { + this.item = item; + } + + + /** + * Return true if this QueueNextItemResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueNextItemResult queueNextItemResult = (QueueNextItemResult) o; + return Objects.equals(this.item, queueNextItemResult.item); + } + + @Override + public int hashCode() { + return Objects.hash(item); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueNextItemResult {\n"); + sb.append(" item: ").append(toIndentedString(item)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `item` to the URL query string + if (getItem() != null) { + for (String _key : getItem().keySet()) { + joiner.add(String.format("%sitem%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getItem().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getItem().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressAnnotatorStat.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressAnnotatorStat.java new file mode 100644 index 0000000..4609d6f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressAnnotatorStat.java @@ -0,0 +1,390 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueProgressAnnotatorStat + */ +@JsonPropertyOrder({ + QueueProgressAnnotatorStat.JSON_PROPERTY_USER_ID, + QueueProgressAnnotatorStat.JSON_PROPERTY_NAME, + QueueProgressAnnotatorStat.JSON_PROPERTY_COMPLETED, + QueueProgressAnnotatorStat.JSON_PROPERTY_PENDING, + QueueProgressAnnotatorStat.JSON_PROPERTY_IN_PROGRESS, + QueueProgressAnnotatorStat.JSON_PROPERTY_IN_REVIEW, + QueueProgressAnnotatorStat.JSON_PROPERTY_ANNOTATIONS_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueProgressAnnotatorStat { + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED = "completed"; + @javax.annotation.Nonnull + private Integer completed; + + public static final String JSON_PROPERTY_PENDING = "pending"; + @javax.annotation.Nonnull + private Integer pending; + + public static final String JSON_PROPERTY_IN_PROGRESS = "in_progress"; + @javax.annotation.Nonnull + private Integer inProgress; + + public static final String JSON_PROPERTY_IN_REVIEW = "in_review"; + @javax.annotation.Nonnull + private Integer inReview; + + public static final String JSON_PROPERTY_ANNOTATIONS_COUNT = "annotations_count"; + @javax.annotation.Nonnull + private Integer annotationsCount; + + public QueueProgressAnnotatorStat() { + } + + public QueueProgressAnnotatorStat userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + public QueueProgressAnnotatorStat name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public QueueProgressAnnotatorStat completed(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + return this; + } + + /** + * Get completed + * @return completed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCompleted() { + return completed; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompleted(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + } + + + public QueueProgressAnnotatorStat pending(@javax.annotation.Nonnull Integer pending) { + this.pending = pending; + return this; + } + + /** + * Get pending + * @return pending + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPending() { + return pending; + } + + + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPending(@javax.annotation.Nonnull Integer pending) { + this.pending = pending; + } + + + public QueueProgressAnnotatorStat inProgress(@javax.annotation.Nonnull Integer inProgress) { + this.inProgress = inProgress; + return this; + } + + /** + * Get inProgress + * @return inProgress + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getInProgress() { + return inProgress; + } + + + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInProgress(@javax.annotation.Nonnull Integer inProgress) { + this.inProgress = inProgress; + } + + + public QueueProgressAnnotatorStat inReview(@javax.annotation.Nonnull Integer inReview) { + this.inReview = inReview; + return this; + } + + /** + * Get inReview + * @return inReview + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IN_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getInReview() { + return inReview; + } + + + @JsonProperty(JSON_PROPERTY_IN_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInReview(@javax.annotation.Nonnull Integer inReview) { + this.inReview = inReview; + } + + + public QueueProgressAnnotatorStat annotationsCount(@javax.annotation.Nonnull Integer annotationsCount) { + this.annotationsCount = annotationsCount; + return this; + } + + /** + * Get annotationsCount + * @return annotationsCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAnnotationsCount() { + return annotationsCount; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotationsCount(@javax.annotation.Nonnull Integer annotationsCount) { + this.annotationsCount = annotationsCount; + } + + + /** + * Return true if this QueueProgressAnnotatorStat object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueProgressAnnotatorStat queueProgressAnnotatorStat = (QueueProgressAnnotatorStat) o; + return Objects.equals(this.userId, queueProgressAnnotatorStat.userId) && + equalsNullable(this.name, queueProgressAnnotatorStat.name) && + Objects.equals(this.completed, queueProgressAnnotatorStat.completed) && + Objects.equals(this.pending, queueProgressAnnotatorStat.pending) && + Objects.equals(this.inProgress, queueProgressAnnotatorStat.inProgress) && + Objects.equals(this.inReview, queueProgressAnnotatorStat.inReview) && + Objects.equals(this.annotationsCount, queueProgressAnnotatorStat.annotationsCount); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(userId, hashCodeNullable(name), completed, pending, inProgress, inReview, annotationsCount); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueProgressAnnotatorStat {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" completed: ").append(toIndentedString(completed)).append("\n"); + sb.append(" pending: ").append(toIndentedString(pending)).append("\n"); + sb.append(" inProgress: ").append(toIndentedString(inProgress)).append("\n"); + sb.append(" inReview: ").append(toIndentedString(inReview)).append("\n"); + sb.append(" annotationsCount: ").append(toIndentedString(annotationsCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `completed` to the URL query string + if (getCompleted() != null) { + joiner.add(String.format("%scompleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompleted())))); + } + + // add `pending` to the URL query string + if (getPending() != null) { + joiner.add(String.format("%spending%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPending())))); + } + + // add `in_progress` to the URL query string + if (getInProgress() != null) { + joiner.add(String.format("%sin_progress%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInProgress())))); + } + + // add `in_review` to the URL query string + if (getInReview() != null) { + joiner.add(String.format("%sin_review%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInReview())))); + } + + // add `annotations_count` to the URL query string + if (getAnnotationsCount() != null) { + joiner.add(String.format("%sannotations_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationsCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResponse.java new file mode 100644 index 0000000..a8605b9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueProgressResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueProgressResponse + */ +@JsonPropertyOrder({ + QueueProgressResponse.JSON_PROPERTY_STATUS, + QueueProgressResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueProgressResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueProgressResult result; + + public QueueProgressResponse() { + } + + public QueueProgressResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueProgressResponse result(@javax.annotation.Nonnull QueueProgressResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueProgressResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueProgressResult result) { + this.result = result; + } + + + /** + * Return true if this QueueProgressResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueProgressResponse queueProgressResponse = (QueueProgressResponse) o; + return Objects.equals(this.status, queueProgressResponse.status) && + Objects.equals(this.result, queueProgressResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueProgressResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResult.java new file mode 100644 index 0000000..d6fa90a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressResult.java @@ -0,0 +1,457 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueProgressAnnotatorStat; +import com.futureagi.sdk.model.QueueProgressUserProgress; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueProgressResult + */ +@JsonPropertyOrder({ + QueueProgressResult.JSON_PROPERTY_TOTAL, + QueueProgressResult.JSON_PROPERTY_PENDING, + QueueProgressResult.JSON_PROPERTY_IN_PROGRESS, + QueueProgressResult.JSON_PROPERTY_IN_REVIEW, + QueueProgressResult.JSON_PROPERTY_COMPLETED, + QueueProgressResult.JSON_PROPERTY_SKIPPED, + QueueProgressResult.JSON_PROPERTY_PROGRESS_PCT, + QueueProgressResult.JSON_PROPERTY_ANNOTATOR_STATS, + QueueProgressResult.JSON_PROPERTY_USER_PROGRESS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueProgressResult { + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public static final String JSON_PROPERTY_PENDING = "pending"; + @javax.annotation.Nonnull + private Integer pending; + + public static final String JSON_PROPERTY_IN_PROGRESS = "in_progress"; + @javax.annotation.Nonnull + private Integer inProgress; + + public static final String JSON_PROPERTY_IN_REVIEW = "in_review"; + @javax.annotation.Nonnull + private Integer inReview; + + public static final String JSON_PROPERTY_COMPLETED = "completed"; + @javax.annotation.Nonnull + private Integer completed; + + public static final String JSON_PROPERTY_SKIPPED = "skipped"; + @javax.annotation.Nonnull + private Integer skipped; + + public static final String JSON_PROPERTY_PROGRESS_PCT = "progress_pct"; + @javax.annotation.Nonnull + private BigDecimal progressPct; + + public static final String JSON_PROPERTY_ANNOTATOR_STATS = "annotator_stats"; + @javax.annotation.Nonnull + private List annotatorStats = new ArrayList<>(); + + public static final String JSON_PROPERTY_USER_PROGRESS = "user_progress"; + @javax.annotation.Nonnull + private QueueProgressUserProgress userProgress; + + public QueueProgressResult() { + } + + public QueueProgressResult total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + public QueueProgressResult pending(@javax.annotation.Nonnull Integer pending) { + this.pending = pending; + return this; + } + + /** + * Get pending + * @return pending + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPending() { + return pending; + } + + + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPending(@javax.annotation.Nonnull Integer pending) { + this.pending = pending; + } + + + public QueueProgressResult inProgress(@javax.annotation.Nonnull Integer inProgress) { + this.inProgress = inProgress; + return this; + } + + /** + * Get inProgress + * @return inProgress + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getInProgress() { + return inProgress; + } + + + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInProgress(@javax.annotation.Nonnull Integer inProgress) { + this.inProgress = inProgress; + } + + + public QueueProgressResult inReview(@javax.annotation.Nonnull Integer inReview) { + this.inReview = inReview; + return this; + } + + /** + * Get inReview + * @return inReview + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IN_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getInReview() { + return inReview; + } + + + @JsonProperty(JSON_PROPERTY_IN_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInReview(@javax.annotation.Nonnull Integer inReview) { + this.inReview = inReview; + } + + + public QueueProgressResult completed(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + return this; + } + + /** + * Get completed + * @return completed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCompleted() { + return completed; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompleted(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + } + + + public QueueProgressResult skipped(@javax.annotation.Nonnull Integer skipped) { + this.skipped = skipped; + return this; + } + + /** + * Get skipped + * @return skipped + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SKIPPED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSkipped() { + return skipped; + } + + + @JsonProperty(JSON_PROPERTY_SKIPPED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSkipped(@javax.annotation.Nonnull Integer skipped) { + this.skipped = skipped; + } + + + public QueueProgressResult progressPct(@javax.annotation.Nonnull BigDecimal progressPct) { + this.progressPct = progressPct; + return this; + } + + /** + * Get progressPct + * @return progressPct + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROGRESS_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getProgressPct() { + return progressPct; + } + + + @JsonProperty(JSON_PROPERTY_PROGRESS_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProgressPct(@javax.annotation.Nonnull BigDecimal progressPct) { + this.progressPct = progressPct; + } + + + public QueueProgressResult annotatorStats(@javax.annotation.Nonnull List annotatorStats) { + this.annotatorStats = annotatorStats; + return this; + } + + public QueueProgressResult addAnnotatorStatsItem(QueueProgressAnnotatorStat annotatorStatsItem) { + if (this.annotatorStats == null) { + this.annotatorStats = new ArrayList<>(); + } + this.annotatorStats.add(annotatorStatsItem); + return this; + } + + /** + * Get annotatorStats + * @return annotatorStats + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATOR_STATS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotatorStats() { + return annotatorStats; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_STATS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotatorStats(@javax.annotation.Nonnull List annotatorStats) { + this.annotatorStats = annotatorStats; + } + + + public QueueProgressResult userProgress(@javax.annotation.Nonnull QueueProgressUserProgress userProgress) { + this.userProgress = userProgress; + return this; + } + + /** + * Get userProgress + * @return userProgress + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueProgressUserProgress getUserProgress() { + return userProgress; + } + + + @JsonProperty(JSON_PROPERTY_USER_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserProgress(@javax.annotation.Nonnull QueueProgressUserProgress userProgress) { + this.userProgress = userProgress; + } + + + /** + * Return true if this QueueProgressResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueProgressResult queueProgressResult = (QueueProgressResult) o; + return Objects.equals(this.total, queueProgressResult.total) && + Objects.equals(this.pending, queueProgressResult.pending) && + Objects.equals(this.inProgress, queueProgressResult.inProgress) && + Objects.equals(this.inReview, queueProgressResult.inReview) && + Objects.equals(this.completed, queueProgressResult.completed) && + Objects.equals(this.skipped, queueProgressResult.skipped) && + Objects.equals(this.progressPct, queueProgressResult.progressPct) && + Objects.equals(this.annotatorStats, queueProgressResult.annotatorStats) && + Objects.equals(this.userProgress, queueProgressResult.userProgress); + } + + @Override + public int hashCode() { + return Objects.hash(total, pending, inProgress, inReview, completed, skipped, progressPct, annotatorStats, userProgress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueProgressResult {\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" pending: ").append(toIndentedString(pending)).append("\n"); + sb.append(" inProgress: ").append(toIndentedString(inProgress)).append("\n"); + sb.append(" inReview: ").append(toIndentedString(inReview)).append("\n"); + sb.append(" completed: ").append(toIndentedString(completed)).append("\n"); + sb.append(" skipped: ").append(toIndentedString(skipped)).append("\n"); + sb.append(" progressPct: ").append(toIndentedString(progressPct)).append("\n"); + sb.append(" annotatorStats: ").append(toIndentedString(annotatorStats)).append("\n"); + sb.append(" userProgress: ").append(toIndentedString(userProgress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `pending` to the URL query string + if (getPending() != null) { + joiner.add(String.format("%spending%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPending())))); + } + + // add `in_progress` to the URL query string + if (getInProgress() != null) { + joiner.add(String.format("%sin_progress%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInProgress())))); + } + + // add `in_review` to the URL query string + if (getInReview() != null) { + joiner.add(String.format("%sin_review%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInReview())))); + } + + // add `completed` to the URL query string + if (getCompleted() != null) { + joiner.add(String.format("%scompleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompleted())))); + } + + // add `skipped` to the URL query string + if (getSkipped() != null) { + joiner.add(String.format("%sskipped%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSkipped())))); + } + + // add `progress_pct` to the URL query string + if (getProgressPct() != null) { + joiner.add(String.format("%sprogress_pct%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProgressPct())))); + } + + // add `annotator_stats` to the URL query string + if (getAnnotatorStats() != null) { + for (int i = 0; i < getAnnotatorStats().size(); i++) { + if (getAnnotatorStats().get(i) != null) { + joiner.add(getAnnotatorStats().get(i).toUrlQueryString(String.format("%sannotator_stats%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `user_progress` to the URL query string + if (getUserProgress() != null) { + joiner.add(getUserProgress().toUrlQueryString(prefix + "user_progress" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressUserProgress.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressUserProgress.java new file mode 100644 index 0000000..a082d8e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueProgressUserProgress.java @@ -0,0 +1,368 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueProgressUserProgress + */ +@JsonPropertyOrder({ + QueueProgressUserProgress.JSON_PROPERTY_TOTAL, + QueueProgressUserProgress.JSON_PROPERTY_COMPLETED, + QueueProgressUserProgress.JSON_PROPERTY_PENDING, + QueueProgressUserProgress.JSON_PROPERTY_IN_PROGRESS, + QueueProgressUserProgress.JSON_PROPERTY_IN_REVIEW, + QueueProgressUserProgress.JSON_PROPERTY_SKIPPED, + QueueProgressUserProgress.JSON_PROPERTY_PROGRESS_PCT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueProgressUserProgress { + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public static final String JSON_PROPERTY_COMPLETED = "completed"; + @javax.annotation.Nonnull + private Integer completed; + + public static final String JSON_PROPERTY_PENDING = "pending"; + @javax.annotation.Nonnull + private Integer pending; + + public static final String JSON_PROPERTY_IN_PROGRESS = "in_progress"; + @javax.annotation.Nonnull + private Integer inProgress; + + public static final String JSON_PROPERTY_IN_REVIEW = "in_review"; + @javax.annotation.Nonnull + private Integer inReview; + + public static final String JSON_PROPERTY_SKIPPED = "skipped"; + @javax.annotation.Nonnull + private Integer skipped; + + public static final String JSON_PROPERTY_PROGRESS_PCT = "progress_pct"; + @javax.annotation.Nonnull + private BigDecimal progressPct; + + public QueueProgressUserProgress() { + } + + public QueueProgressUserProgress total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + public QueueProgressUserProgress completed(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + return this; + } + + /** + * Get completed + * @return completed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCompleted() { + return completed; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompleted(@javax.annotation.Nonnull Integer completed) { + this.completed = completed; + } + + + public QueueProgressUserProgress pending(@javax.annotation.Nonnull Integer pending) { + this.pending = pending; + return this; + } + + /** + * Get pending + * @return pending + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPending() { + return pending; + } + + + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPending(@javax.annotation.Nonnull Integer pending) { + this.pending = pending; + } + + + public QueueProgressUserProgress inProgress(@javax.annotation.Nonnull Integer inProgress) { + this.inProgress = inProgress; + return this; + } + + /** + * Get inProgress + * @return inProgress + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getInProgress() { + return inProgress; + } + + + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInProgress(@javax.annotation.Nonnull Integer inProgress) { + this.inProgress = inProgress; + } + + + public QueueProgressUserProgress inReview(@javax.annotation.Nonnull Integer inReview) { + this.inReview = inReview; + return this; + } + + /** + * Get inReview + * @return inReview + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IN_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getInReview() { + return inReview; + } + + + @JsonProperty(JSON_PROPERTY_IN_REVIEW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInReview(@javax.annotation.Nonnull Integer inReview) { + this.inReview = inReview; + } + + + public QueueProgressUserProgress skipped(@javax.annotation.Nonnull Integer skipped) { + this.skipped = skipped; + return this; + } + + /** + * Get skipped + * @return skipped + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SKIPPED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSkipped() { + return skipped; + } + + + @JsonProperty(JSON_PROPERTY_SKIPPED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSkipped(@javax.annotation.Nonnull Integer skipped) { + this.skipped = skipped; + } + + + public QueueProgressUserProgress progressPct(@javax.annotation.Nonnull BigDecimal progressPct) { + this.progressPct = progressPct; + return this; + } + + /** + * Get progressPct + * @return progressPct + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROGRESS_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getProgressPct() { + return progressPct; + } + + + @JsonProperty(JSON_PROPERTY_PROGRESS_PCT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProgressPct(@javax.annotation.Nonnull BigDecimal progressPct) { + this.progressPct = progressPct; + } + + + /** + * Return true if this QueueProgressUserProgress object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueProgressUserProgress queueProgressUserProgress = (QueueProgressUserProgress) o; + return Objects.equals(this.total, queueProgressUserProgress.total) && + Objects.equals(this.completed, queueProgressUserProgress.completed) && + Objects.equals(this.pending, queueProgressUserProgress.pending) && + Objects.equals(this.inProgress, queueProgressUserProgress.inProgress) && + Objects.equals(this.inReview, queueProgressUserProgress.inReview) && + Objects.equals(this.skipped, queueProgressUserProgress.skipped) && + Objects.equals(this.progressPct, queueProgressUserProgress.progressPct); + } + + @Override + public int hashCode() { + return Objects.hash(total, completed, pending, inProgress, inReview, skipped, progressPct); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueProgressUserProgress {\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" completed: ").append(toIndentedString(completed)).append("\n"); + sb.append(" pending: ").append(toIndentedString(pending)).append("\n"); + sb.append(" inProgress: ").append(toIndentedString(inProgress)).append("\n"); + sb.append(" inReview: ").append(toIndentedString(inReview)).append("\n"); + sb.append(" skipped: ").append(toIndentedString(skipped)).append("\n"); + sb.append(" progressPct: ").append(toIndentedString(progressPct)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `completed` to the URL query string + if (getCompleted() != null) { + joiner.add(String.format("%scompleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompleted())))); + } + + // add `pending` to the URL query string + if (getPending() != null) { + joiner.add(String.format("%spending%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPending())))); + } + + // add `in_progress` to the URL query string + if (getInProgress() != null) { + joiner.add(String.format("%sin_progress%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInProgress())))); + } + + // add `in_review` to the URL query string + if (getInReview() != null) { + joiner.add(String.format("%sin_review%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInReview())))); + } + + // add `skipped` to the URL query string + if (getSkipped() != null) { + joiner.add(String.format("%sskipped%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSkipped())))); + } + + // add `progress_pct` to the URL query string + if (getProgressPct() != null) { + joiner.add(String.format("%sprogress_pct%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProgressPct())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResponse.java new file mode 100644 index 0000000..c25c4a0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueReleaseReservationResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueReleaseReservationResponse + */ +@JsonPropertyOrder({ + QueueReleaseReservationResponse.JSON_PROPERTY_STATUS, + QueueReleaseReservationResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueReleaseReservationResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueReleaseReservationResult result; + + public QueueReleaseReservationResponse() { + } + + public QueueReleaseReservationResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueReleaseReservationResponse result(@javax.annotation.Nonnull QueueReleaseReservationResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueReleaseReservationResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueReleaseReservationResult result) { + this.result = result; + } + + + /** + * Return true if this QueueReleaseReservationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueReleaseReservationResponse queueReleaseReservationResponse = (QueueReleaseReservationResponse) o; + return Objects.equals(this.status, queueReleaseReservationResponse.status) && + Objects.equals(this.result, queueReleaseReservationResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueReleaseReservationResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResult.java new file mode 100644 index 0000000..51868e2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReleaseReservationResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueReleaseReservationResult + */ +@JsonPropertyOrder({ + QueueReleaseReservationResult.JSON_PROPERTY_RELEASED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueReleaseReservationResult { + public static final String JSON_PROPERTY_RELEASED = "released"; + @javax.annotation.Nonnull + private Boolean released; + + public QueueReleaseReservationResult() { + } + + public QueueReleaseReservationResult released(@javax.annotation.Nonnull Boolean released) { + this.released = released; + return this; + } + + /** + * Get released + * @return released + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RELEASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getReleased() { + return released; + } + + + @JsonProperty(JSON_PROPERTY_RELEASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReleased(@javax.annotation.Nonnull Boolean released) { + this.released = released; + } + + + /** + * Return true if this QueueReleaseReservationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueReleaseReservationResult queueReleaseReservationResult = (QueueReleaseReservationResult) o; + return Objects.equals(this.released, queueReleaseReservationResult.released); + } + + @Override + public int hashCode() { + return Objects.hash(released); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueReleaseReservationResult {\n"); + sb.append(" released: ").append(toIndentedString(released)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `released` to the URL query string + if (getReleased() != null) { + joiner.add(String.format("%sreleased%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReleased())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResponse.java new file mode 100644 index 0000000..ee8f459 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueRemoveLabelResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueRemoveLabelResponse + */ +@JsonPropertyOrder({ + QueueRemoveLabelResponse.JSON_PROPERTY_STATUS, + QueueRemoveLabelResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueRemoveLabelResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueRemoveLabelResult result; + + public QueueRemoveLabelResponse() { + } + + public QueueRemoveLabelResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueRemoveLabelResponse result(@javax.annotation.Nonnull QueueRemoveLabelResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueRemoveLabelResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueRemoveLabelResult result) { + this.result = result; + } + + + /** + * Return true if this QueueRemoveLabelResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueRemoveLabelResponse queueRemoveLabelResponse = (QueueRemoveLabelResponse) o; + return Objects.equals(this.status, queueRemoveLabelResponse.status) && + Objects.equals(this.result, queueRemoveLabelResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueRemoveLabelResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResult.java new file mode 100644 index 0000000..6c4fc99 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueRemoveLabelResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueRemoveLabelResult + */ +@JsonPropertyOrder({ + QueueRemoveLabelResult.JSON_PROPERTY_REMOVED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueRemoveLabelResult { + public static final String JSON_PROPERTY_REMOVED = "removed"; + @javax.annotation.Nonnull + private Boolean removed; + + public QueueRemoveLabelResult() { + } + + public QueueRemoveLabelResult removed(@javax.annotation.Nonnull Boolean removed) { + this.removed = removed; + return this; + } + + /** + * Get removed + * @return removed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REMOVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRemoved() { + return removed; + } + + + @JsonProperty(JSON_PROPERTY_REMOVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRemoved(@javax.annotation.Nonnull Boolean removed) { + this.removed = removed; + } + + + /** + * Return true if this QueueRemoveLabelResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueRemoveLabelResult queueRemoveLabelResult = (QueueRemoveLabelResult) o; + return Objects.equals(this.removed, queueRemoveLabelResult.removed); + } + + @Override + public int hashCode() { + return Objects.hash(removed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueRemoveLabelResult {\n"); + sb.append(" removed: ").append(toIndentedString(removed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `removed` to the URL query string + if (getRemoved() != null) { + joiner.add(String.format("%sremoved%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemoved())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResponse.java new file mode 100644 index 0000000..f10f40d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueReviewItemResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueReviewItemResponse + */ +@JsonPropertyOrder({ + QueueReviewItemResponse.JSON_PROPERTY_STATUS, + QueueReviewItemResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueReviewItemResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueReviewItemResult result; + + public QueueReviewItemResponse() { + } + + public QueueReviewItemResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueReviewItemResponse result(@javax.annotation.Nonnull QueueReviewItemResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueReviewItemResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueReviewItemResult result) { + this.result = result; + } + + + /** + * Return true if this QueueReviewItemResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueReviewItemResponse queueReviewItemResponse = (QueueReviewItemResponse) o; + return Objects.equals(this.status, queueReviewItemResponse.status) && + Objects.equals(this.result, queueReviewItemResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueReviewItemResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResult.java new file mode 100644 index 0000000..c9ae68d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueReviewItemResult.java @@ -0,0 +1,336 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueReviewItemResult + */ +@JsonPropertyOrder({ + QueueReviewItemResult.JSON_PROPERTY_REVIEWED_ITEM_ID, + QueueReviewItemResult.JSON_PROPERTY_ACTION, + QueueReviewItemResult.JSON_PROPERTY_NEXT_ITEM, + QueueReviewItemResult.JSON_PROPERTY_REVIEW_COMMENTS, + QueueReviewItemResult.JSON_PROPERTY_REVIEW_THREADS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueReviewItemResult { + public static final String JSON_PROPERTY_REVIEWED_ITEM_ID = "reviewed_item_id"; + @javax.annotation.Nonnull + private UUID reviewedItemId; + + public static final String JSON_PROPERTY_ACTION = "action"; + @javax.annotation.Nonnull + private String action; + + public static final String JSON_PROPERTY_NEXT_ITEM = "next_item"; + @javax.annotation.Nonnull + private Map nextItem = new HashMap<>(); + + public static final String JSON_PROPERTY_REVIEW_COMMENTS = "review_comments"; + @javax.annotation.Nonnull + private List> reviewComments = new ArrayList<>(); + + public static final String JSON_PROPERTY_REVIEW_THREADS = "review_threads"; + @javax.annotation.Nonnull + private List> reviewThreads = new ArrayList<>(); + + public QueueReviewItemResult() { + } + + public QueueReviewItemResult reviewedItemId(@javax.annotation.Nonnull UUID reviewedItemId) { + this.reviewedItemId = reviewedItemId; + return this; + } + + /** + * Get reviewedItemId + * @return reviewedItemId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVIEWED_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getReviewedItemId() { + return reviewedItemId; + } + + + @JsonProperty(JSON_PROPERTY_REVIEWED_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReviewedItemId(@javax.annotation.Nonnull UUID reviewedItemId) { + this.reviewedItemId = reviewedItemId; + } + + + public QueueReviewItemResult action(@javax.annotation.Nonnull String action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAction() { + return action; + } + + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAction(@javax.annotation.Nonnull String action) { + this.action = action; + } + + + public QueueReviewItemResult nextItem(@javax.annotation.Nonnull Map nextItem) { + this.nextItem = nextItem; + return this; + } + + public QueueReviewItemResult putNextItemItem(String key, Object nextItemItem) { + if (this.nextItem == null) { + this.nextItem = new HashMap<>(); + } + this.nextItem.put(key, nextItemItem); + return this; + } + + /** + * Get nextItem + * @return nextItem + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEXT_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getNextItem() { + return nextItem; + } + + + @JsonProperty(JSON_PROPERTY_NEXT_ITEM) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setNextItem(@javax.annotation.Nonnull Map nextItem) { + this.nextItem = nextItem; + } + + + public QueueReviewItemResult reviewComments(@javax.annotation.Nonnull List> reviewComments) { + this.reviewComments = reviewComments; + return this; + } + + public QueueReviewItemResult addReviewCommentsItem(Map reviewCommentsItem) { + if (this.reviewComments == null) { + this.reviewComments = new ArrayList<>(); + } + this.reviewComments.add(reviewCommentsItem); + return this; + } + + /** + * Get reviewComments + * @return reviewComments + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVIEW_COMMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getReviewComments() { + return reviewComments; + } + + + @JsonProperty(JSON_PROPERTY_REVIEW_COMMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReviewComments(@javax.annotation.Nonnull List> reviewComments) { + this.reviewComments = reviewComments; + } + + + public QueueReviewItemResult reviewThreads(@javax.annotation.Nonnull List> reviewThreads) { + this.reviewThreads = reviewThreads; + return this; + } + + public QueueReviewItemResult addReviewThreadsItem(Map reviewThreadsItem) { + if (this.reviewThreads == null) { + this.reviewThreads = new ArrayList<>(); + } + this.reviewThreads.add(reviewThreadsItem); + return this; + } + + /** + * Get reviewThreads + * @return reviewThreads + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REVIEW_THREADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getReviewThreads() { + return reviewThreads; + } + + + @JsonProperty(JSON_PROPERTY_REVIEW_THREADS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReviewThreads(@javax.annotation.Nonnull List> reviewThreads) { + this.reviewThreads = reviewThreads; + } + + + /** + * Return true if this QueueReviewItemResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueReviewItemResult queueReviewItemResult = (QueueReviewItemResult) o; + return Objects.equals(this.reviewedItemId, queueReviewItemResult.reviewedItemId) && + Objects.equals(this.action, queueReviewItemResult.action) && + Objects.equals(this.nextItem, queueReviewItemResult.nextItem) && + Objects.equals(this.reviewComments, queueReviewItemResult.reviewComments) && + Objects.equals(this.reviewThreads, queueReviewItemResult.reviewThreads); + } + + @Override + public int hashCode() { + return Objects.hash(reviewedItemId, action, nextItem, reviewComments, reviewThreads); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueReviewItemResult {\n"); + sb.append(" reviewedItemId: ").append(toIndentedString(reviewedItemId)).append("\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" nextItem: ").append(toIndentedString(nextItem)).append("\n"); + sb.append(" reviewComments: ").append(toIndentedString(reviewComments)).append("\n"); + sb.append(" reviewThreads: ").append(toIndentedString(reviewThreads)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `reviewed_item_id` to the URL query string + if (getReviewedItemId() != null) { + joiner.add(String.format("%sreviewed_item_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReviewedItemId())))); + } + + // add `action` to the URL query string + if (getAction() != null) { + joiner.add(String.format("%saction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAction())))); + } + + // add `next_item` to the URL query string + if (getNextItem() != null) { + for (String _key : getNextItem().keySet()) { + joiner.add(String.format("%snext_item%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getNextItem().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getNextItem().get(_key))))); + } + } + + // add `review_comments` to the URL query string + if (getReviewComments() != null) { + for (int i = 0; i < getReviewComments().size(); i++) { + joiner.add(String.format("%sreview_comments%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getReviewComments().get(i))))); + } + } + + // add `review_threads` to the URL query string + if (getReviewThreads() != null) { + for (int i = 0; i < getReviewThreads().size(); i++) { + joiner.add(String.format("%sreview_threads%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getReviewThreads().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusRequest.java new file mode 100644 index 0000000..530ce94 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusRequest.java @@ -0,0 +1,190 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueStatusRequest + */ +@JsonPropertyOrder({ + QueueStatusRequest.JSON_PROPERTY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueStatusRequest { + /** + * Gets or Sets status + */ + public enum StatusEnum { + DRAFT(String.valueOf("draft")), + + ACTIVE(String.valueOf("active")), + + PAUSED(String.valueOf("paused")), + + COMPLETED(String.valueOf("completed")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private StatusEnum status; + + public QueueStatusRequest() { + } + + public QueueStatusRequest status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + + /** + * Return true if this QueueStatusRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueStatusRequest queueStatusRequest = (QueueStatusRequest) o; + return Objects.equals(this.status, queueStatusRequest.status); + } + + @Override + public int hashCode() { + return Objects.hash(status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueStatusRequest {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusResponse.java new file mode 100644 index 0000000..7248889 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueStatusResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AnnotationQueue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueStatusResponse + */ +@JsonPropertyOrder({ + QueueStatusResponse.JSON_PROPERTY_STATUS, + QueueStatusResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueStatusResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private AnnotationQueue result; + + public QueueStatusResponse() { + } + + public QueueStatusResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueStatusResponse result(@javax.annotation.Nonnull AnnotationQueue result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AnnotationQueue getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull AnnotationQueue result) { + this.result = result; + } + + + /** + * Return true if this QueueStatusResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueStatusResponse queueStatusResponse = (QueueStatusResponse) o; + return Objects.equals(this.status, queueStatusResponse.status) && + Objects.equals(this.result, queueStatusResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueStatusResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResponse.java new file mode 100644 index 0000000..c6ea526 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.QueueSubmitAnnotationsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueSubmitAnnotationsResponse + */ +@JsonPropertyOrder({ + QueueSubmitAnnotationsResponse.JSON_PROPERTY_STATUS, + QueueSubmitAnnotationsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueSubmitAnnotationsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private QueueSubmitAnnotationsResult result; + + public QueueSubmitAnnotationsResponse() { + } + + public QueueSubmitAnnotationsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public QueueSubmitAnnotationsResponse result(@javax.annotation.Nonnull QueueSubmitAnnotationsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueueSubmitAnnotationsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull QueueSubmitAnnotationsResult result) { + this.result = result; + } + + + /** + * Return true if this QueueSubmitAnnotationsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueSubmitAnnotationsResponse queueSubmitAnnotationsResponse = (QueueSubmitAnnotationsResponse) o; + return Objects.equals(this.status, queueSubmitAnnotationsResponse.status) && + Objects.equals(this.result, queueSubmitAnnotationsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueSubmitAnnotationsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResult.java new file mode 100644 index 0000000..d29945d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/QueueSubmitAnnotationsResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * QueueSubmitAnnotationsResult + */ +@JsonPropertyOrder({ + QueueSubmitAnnotationsResult.JSON_PROPERTY_SUBMITTED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class QueueSubmitAnnotationsResult { + public static final String JSON_PROPERTY_SUBMITTED = "submitted"; + @javax.annotation.Nonnull + private Integer submitted; + + public QueueSubmitAnnotationsResult() { + } + + public QueueSubmitAnnotationsResult submitted(@javax.annotation.Nonnull Integer submitted) { + this.submitted = submitted; + return this; + } + + /** + * Get submitted + * @return submitted + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUBMITTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSubmitted() { + return submitted; + } + + + @JsonProperty(JSON_PROPERTY_SUBMITTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSubmitted(@javax.annotation.Nonnull Integer submitted) { + this.submitted = submitted; + } + + + /** + * Return true if this QueueSubmitAnnotationsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueueSubmitAnnotationsResult queueSubmitAnnotationsResult = (QueueSubmitAnnotationsResult) o; + return Objects.equals(this.submitted, queueSubmitAnnotationsResult.submitted); + } + + @Override + public int hashCode() { + return Objects.hash(submitted); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueueSubmitAnnotationsResult {\n"); + sb.append(" submitted: ").append(toIndentedString(submitted)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `submitted` to the URL query string + if (getSubmitted() != null) { + joiner.add(String.format("%ssubmitted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSubmitted())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Recommendation.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Recommendation.java new file mode 100644 index 0000000..d6017c8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Recommendation.java @@ -0,0 +1,417 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Recommendation + */ +@JsonPropertyOrder({ + Recommendation.JSON_PROPERTY_ID, + Recommendation.JSON_PROPERTY_TITLE, + Recommendation.JSON_PROPERTY_DESCRIPTION, + Recommendation.JSON_PROPERTY_PRIORITY, + Recommendation.JSON_PROPERTY_ROOT_CAUSE_LINK, + Recommendation.JSON_PROPERTY_IMMEDIATE_FIX, + Recommendation.JSON_PROPERTY_INSIGHTS, + Recommendation.JSON_PROPERTY_EVIDENCE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Recommendation { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nonnull + private String title; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nonnull + private String description; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + @javax.annotation.Nonnull + private String priority; + + public static final String JSON_PROPERTY_ROOT_CAUSE_LINK = "root_cause_link"; + @javax.annotation.Nullable + private Integer rootCauseLink; + + public static final String JSON_PROPERTY_IMMEDIATE_FIX = "immediate_fix"; + @javax.annotation.Nullable + private String immediateFix; + + public static final String JSON_PROPERTY_INSIGHTS = "insights"; + @javax.annotation.Nullable + private String insights; + + public static final String JSON_PROPERTY_EVIDENCE = "evidence"; + @javax.annotation.Nonnull + private List evidence = new ArrayList<>(); + + public Recommendation() { + } + + public Recommendation id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Recommendation title(@javax.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@javax.annotation.Nonnull String title) { + this.title = title; + } + + + public Recommendation description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public Recommendation priority(@javax.annotation.Nonnull String priority) { + this.priority = priority; + return this; + } + + /** + * Get priority + * @return priority + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPriority(@javax.annotation.Nonnull String priority) { + this.priority = priority; + } + + + public Recommendation rootCauseLink(@javax.annotation.Nullable Integer rootCauseLink) { + this.rootCauseLink = rootCauseLink; + return this; + } + + /** + * Get rootCauseLink + * @return rootCauseLink + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROOT_CAUSE_LINK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRootCauseLink() { + return rootCauseLink; + } + + + @JsonProperty(JSON_PROPERTY_ROOT_CAUSE_LINK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRootCauseLink(@javax.annotation.Nullable Integer rootCauseLink) { + this.rootCauseLink = rootCauseLink; + } + + + public Recommendation immediateFix(@javax.annotation.Nullable String immediateFix) { + this.immediateFix = immediateFix; + return this; + } + + /** + * Get immediateFix + * @return immediateFix + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMMEDIATE_FIX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getImmediateFix() { + return immediateFix; + } + + + @JsonProperty(JSON_PROPERTY_IMMEDIATE_FIX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setImmediateFix(@javax.annotation.Nullable String immediateFix) { + this.immediateFix = immediateFix; + } + + + public Recommendation insights(@javax.annotation.Nullable String insights) { + this.insights = insights; + return this; + } + + /** + * Get insights + * @return insights + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSIGHTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInsights() { + return insights; + } + + + @JsonProperty(JSON_PROPERTY_INSIGHTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInsights(@javax.annotation.Nullable String insights) { + this.insights = insights; + } + + + public Recommendation evidence(@javax.annotation.Nonnull List evidence) { + this.evidence = evidence; + return this; + } + + public Recommendation addEvidenceItem(String evidenceItem) { + if (this.evidence == null) { + this.evidence = new ArrayList<>(); + } + this.evidence.add(evidenceItem); + return this; + } + + /** + * Get evidence + * @return evidence + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVIDENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvidence() { + return evidence; + } + + + @JsonProperty(JSON_PROPERTY_EVIDENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvidence(@javax.annotation.Nonnull List evidence) { + this.evidence = evidence; + } + + + /** + * Return true if this Recommendation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Recommendation recommendation = (Recommendation) o; + return Objects.equals(this.id, recommendation.id) && + Objects.equals(this.title, recommendation.title) && + Objects.equals(this.description, recommendation.description) && + Objects.equals(this.priority, recommendation.priority) && + Objects.equals(this.rootCauseLink, recommendation.rootCauseLink) && + Objects.equals(this.immediateFix, recommendation.immediateFix) && + Objects.equals(this.insights, recommendation.insights) && + Objects.equals(this.evidence, recommendation.evidence); + } + + @Override + public int hashCode() { + return Objects.hash(id, title, description, priority, rootCauseLink, immediateFix, insights, evidence); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Recommendation {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" rootCauseLink: ").append(toIndentedString(rootCauseLink)).append("\n"); + sb.append(" immediateFix: ").append(toIndentedString(immediateFix)).append("\n"); + sb.append(" insights: ").append(toIndentedString(insights)).append("\n"); + sb.append(" evidence: ").append(toIndentedString(evidence)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format("%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `priority` to the URL query string + if (getPriority() != null) { + joiner.add(String.format("%spriority%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPriority())))); + } + + // add `root_cause_link` to the URL query string + if (getRootCauseLink() != null) { + joiner.add(String.format("%sroot_cause_link%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRootCauseLink())))); + } + + // add `immediate_fix` to the URL query string + if (getImmediateFix() != null) { + joiner.add(String.format("%simmediate_fix%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getImmediateFix())))); + } + + // add `insights` to the URL query string + if (getInsights() != null) { + joiner.add(String.format("%sinsights%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInsights())))); + } + + // add `evidence` to the URL query string + if (getEvidence() != null) { + for (int i = 0; i < getEvidence().size(); i++) { + joiner.add(String.format("%sevidence%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvidence().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RepresentativeTrace.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RepresentativeTrace.java new file mode 100644 index 0000000..edb9ce7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RepresentativeTrace.java @@ -0,0 +1,483 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AgentFlowGraph; +import com.futureagi.sdk.model.TraceEvidence; +import com.futureagi.sdk.model.TraceSummary; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RepresentativeTrace + */ +@JsonPropertyOrder({ + RepresentativeTrace.JSON_PROPERTY_ID, + RepresentativeTrace.JSON_PROPERTY_STATUS, + RepresentativeTrace.JSON_PROPERTY_TIMESTAMP, + RepresentativeTrace.JSON_PROPERTY_SUMMARY, + RepresentativeTrace.JSON_PROPERTY_EVIDENCE, + RepresentativeTrace.JSON_PROPERTY_AGENT_FLOW, + RepresentativeTrace.JSON_PROPERTY_ROOT_CAUSES, + RepresentativeTrace.JSON_PROPERTY_RECOMMENDATIONS, + RepresentativeTrace.JSON_PROPERTY_WHAT_CHANGED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RepresentativeTrace { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @javax.annotation.Nullable + private OffsetDateTime timestamp; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + @javax.annotation.Nonnull + private TraceSummary summary; + + public static final String JSON_PROPERTY_EVIDENCE = "evidence"; + @javax.annotation.Nonnull + private TraceEvidence evidence; + + public static final String JSON_PROPERTY_AGENT_FLOW = "agent_flow"; + @javax.annotation.Nonnull + private AgentFlowGraph agentFlow; + + public static final String JSON_PROPERTY_ROOT_CAUSES = "root_causes"; + @javax.annotation.Nonnull + private List> rootCauses = new ArrayList<>(); + + public static final String JSON_PROPERTY_RECOMMENDATIONS = "recommendations"; + @javax.annotation.Nonnull + private List> recommendations = new ArrayList<>(); + + public static final String JSON_PROPERTY_WHAT_CHANGED = "what_changed"; + @javax.annotation.Nonnull + private Map whatChanged = new HashMap<>(); + + public RepresentativeTrace() { + } + + public RepresentativeTrace id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public RepresentativeTrace status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public RepresentativeTrace timestamp(@javax.annotation.Nullable OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getTimestamp() { + return timestamp; + } + + + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@javax.annotation.Nullable OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + + public RepresentativeTrace summary(@javax.annotation.Nonnull TraceSummary summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TraceSummary getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSummary(@javax.annotation.Nonnull TraceSummary summary) { + this.summary = summary; + } + + + public RepresentativeTrace evidence(@javax.annotation.Nonnull TraceEvidence evidence) { + this.evidence = evidence; + return this; + } + + /** + * Get evidence + * @return evidence + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVIDENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TraceEvidence getEvidence() { + return evidence; + } + + + @JsonProperty(JSON_PROPERTY_EVIDENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvidence(@javax.annotation.Nonnull TraceEvidence evidence) { + this.evidence = evidence; + } + + + public RepresentativeTrace agentFlow(@javax.annotation.Nonnull AgentFlowGraph agentFlow) { + this.agentFlow = agentFlow; + return this; + } + + /** + * Get agentFlow + * @return agentFlow + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGENT_FLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AgentFlowGraph getAgentFlow() { + return agentFlow; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_FLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgentFlow(@javax.annotation.Nonnull AgentFlowGraph agentFlow) { + this.agentFlow = agentFlow; + } + + + public RepresentativeTrace rootCauses(@javax.annotation.Nonnull List> rootCauses) { + this.rootCauses = rootCauses; + return this; + } + + public RepresentativeTrace addRootCausesItem(Map rootCausesItem) { + if (this.rootCauses == null) { + this.rootCauses = new ArrayList<>(); + } + this.rootCauses.add(rootCausesItem); + return this; + } + + /** + * Get rootCauses + * @return rootCauses + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROOT_CAUSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getRootCauses() { + return rootCauses; + } + + + @JsonProperty(JSON_PROPERTY_ROOT_CAUSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRootCauses(@javax.annotation.Nonnull List> rootCauses) { + this.rootCauses = rootCauses; + } + + + public RepresentativeTrace recommendations(@javax.annotation.Nonnull List> recommendations) { + this.recommendations = recommendations; + return this; + } + + public RepresentativeTrace addRecommendationsItem(Map recommendationsItem) { + if (this.recommendations == null) { + this.recommendations = new ArrayList<>(); + } + this.recommendations.add(recommendationsItem); + return this; + } + + /** + * Get recommendations + * @return recommendations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECOMMENDATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getRecommendations() { + return recommendations; + } + + + @JsonProperty(JSON_PROPERTY_RECOMMENDATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecommendations(@javax.annotation.Nonnull List> recommendations) { + this.recommendations = recommendations; + } + + + public RepresentativeTrace whatChanged(@javax.annotation.Nonnull Map whatChanged) { + this.whatChanged = whatChanged; + return this; + } + + public RepresentativeTrace putWhatChangedItem(String key, String whatChangedItem) { + if (this.whatChanged == null) { + this.whatChanged = new HashMap<>(); + } + this.whatChanged.put(key, whatChangedItem); + return this; + } + + /** + * Get whatChanged + * @return whatChanged + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WHAT_CHANGED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getWhatChanged() { + return whatChanged; + } + + + @JsonProperty(JSON_PROPERTY_WHAT_CHANGED) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setWhatChanged(@javax.annotation.Nonnull Map whatChanged) { + this.whatChanged = whatChanged; + } + + + /** + * Return true if this RepresentativeTrace object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepresentativeTrace representativeTrace = (RepresentativeTrace) o; + return Objects.equals(this.id, representativeTrace.id) && + Objects.equals(this.status, representativeTrace.status) && + Objects.equals(this.timestamp, representativeTrace.timestamp) && + Objects.equals(this.summary, representativeTrace.summary) && + Objects.equals(this.evidence, representativeTrace.evidence) && + Objects.equals(this.agentFlow, representativeTrace.agentFlow) && + Objects.equals(this.rootCauses, representativeTrace.rootCauses) && + Objects.equals(this.recommendations, representativeTrace.recommendations) && + Objects.equals(this.whatChanged, representativeTrace.whatChanged); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, timestamp, summary, evidence, agentFlow, rootCauses, recommendations, whatChanged); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepresentativeTrace {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" evidence: ").append(toIndentedString(evidence)).append("\n"); + sb.append(" agentFlow: ").append(toIndentedString(agentFlow)).append("\n"); + sb.append(" rootCauses: ").append(toIndentedString(rootCauses)).append("\n"); + sb.append(" recommendations: ").append(toIndentedString(recommendations)).append("\n"); + sb.append(" whatChanged: ").append(toIndentedString(whatChanged)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimestamp())))); + } + + // add `summary` to the URL query string + if (getSummary() != null) { + joiner.add(getSummary().toUrlQueryString(prefix + "summary" + suffix)); + } + + // add `evidence` to the URL query string + if (getEvidence() != null) { + joiner.add(getEvidence().toUrlQueryString(prefix + "evidence" + suffix)); + } + + // add `agent_flow` to the URL query string + if (getAgentFlow() != null) { + joiner.add(getAgentFlow().toUrlQueryString(prefix + "agent_flow" + suffix)); + } + + // add `root_causes` to the URL query string + if (getRootCauses() != null) { + for (int i = 0; i < getRootCauses().size(); i++) { + joiner.add(String.format("%sroot_causes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRootCauses().get(i))))); + } + } + + // add `recommendations` to the URL query string + if (getRecommendations() != null) { + for (int i = 0; i < getRecommendations().size(); i++) { + joiner.add(String.format("%srecommendations%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getRecommendations().get(i))))); + } + } + + // add `what_changed` to the URL query string + if (getWhatChanged() != null) { + for (String _key : getWhatChanged().keySet()) { + joiner.add(String.format("%swhat_changed%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getWhatChanged().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getWhatChanged().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ReqDataConfig.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ReqDataConfig.java new file mode 100644 index 0000000..107ce85 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ReqDataConfig.java @@ -0,0 +1,483 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ReqDataConfig + */ +@JsonPropertyOrder({ + ReqDataConfig.JSON_PROPERTY_ID, + ReqDataConfig.JSON_PROPERTY_TYPE, + ReqDataConfig.JSON_PROPERTY_OUTPUT_TYPE, + ReqDataConfig.JSON_PROPERTY_EVAL_OUTPUT_TYPE, + ReqDataConfig.JSON_PROPERTY_CHOICES, + ReqDataConfig.JSON_PROPERTY_VALUE, + ReqDataConfig.JSON_PROPERTY_FILTER_OP, + ReqDataConfig.JSON_PROPERTY_FILTER_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ReqDataConfig { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + SYSTEM_METRIC(String.valueOf("SYSTEM_METRIC")), + + EVAL(String.valueOf("EVAL")), + + ANNOTATION(String.valueOf("ANNOTATION")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nullable + private String outputType; + + public static final String JSON_PROPERTY_EVAL_OUTPUT_TYPE = "eval_output_type"; + @javax.annotation.Nullable + private String evalOutputType; + + public static final String JSON_PROPERTY_CHOICES = "choices"; + @javax.annotation.Nullable + private List choices = new ArrayList<>(); + + public static final String JSON_PROPERTY_VALUE = "value"; + private JsonNullable value = JsonNullable.of(null); + + public static final String JSON_PROPERTY_FILTER_OP = "filter_op"; + @javax.annotation.Nullable + private String filterOp; + + public static final String JSON_PROPERTY_FILTER_VALUE = "filter_value"; + private JsonNullable filterValue = JsonNullable.of(null); + + public ReqDataConfig() { + } + + public ReqDataConfig id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ReqDataConfig type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public ReqDataConfig outputType(@javax.annotation.Nullable String outputType) { + this.outputType = outputType; + return this; + } + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOutputType() { + return outputType; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputType(@javax.annotation.Nullable String outputType) { + this.outputType = outputType; + } + + + public ReqDataConfig evalOutputType(@javax.annotation.Nullable String evalOutputType) { + this.evalOutputType = evalOutputType; + return this; + } + + /** + * Get evalOutputType + * @return evalOutputType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalOutputType() { + return evalOutputType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalOutputType(@javax.annotation.Nullable String evalOutputType) { + this.evalOutputType = evalOutputType; + } + + + public ReqDataConfig choices(@javax.annotation.Nullable List choices) { + this.choices = choices; + return this; + } + + public ReqDataConfig addChoicesItem(String choicesItem) { + if (this.choices == null) { + this.choices = new ArrayList<>(); + } + this.choices.add(choicesItem); + return this; + } + + /** + * Get choices + * @return choices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getChoices() { + return choices; + } + + + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChoices(@javax.annotation.Nullable List choices) { + this.choices = choices; + } + + + public ReqDataConfig value(@javax.annotation.Nullable Object value) { + this.value = JsonNullable.of(value); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + @JsonIgnore + public Object getValue() { + return value.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getValue_JsonNullable() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + public void setValue_JsonNullable(JsonNullable value) { + this.value = value; + } + + public void setValue(@javax.annotation.Nullable Object value) { + this.value = JsonNullable.of(value); + } + + + public ReqDataConfig filterOp(@javax.annotation.Nullable String filterOp) { + this.filterOp = filterOp; + return this; + } + + /** + * Get filterOp + * @return filterOp + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER_OP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilterOp() { + return filterOp; + } + + + @JsonProperty(JSON_PROPERTY_FILTER_OP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilterOp(@javax.annotation.Nullable String filterOp) { + this.filterOp = filterOp; + } + + + public ReqDataConfig filterValue(@javax.annotation.Nullable Object filterValue) { + this.filterValue = JsonNullable.of(filterValue); + return this; + } + + /** + * Get filterValue + * @return filterValue + */ + @javax.annotation.Nullable + @JsonIgnore + public Object getFilterValue() { + return filterValue.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FILTER_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFilterValue_JsonNullable() { + return filterValue; + } + + @JsonProperty(JSON_PROPERTY_FILTER_VALUE) + public void setFilterValue_JsonNullable(JsonNullable filterValue) { + this.filterValue = filterValue; + } + + public void setFilterValue(@javax.annotation.Nullable Object filterValue) { + this.filterValue = JsonNullable.of(filterValue); + } + + + /** + * Return true if this Req_data_config object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReqDataConfig reqDataConfig = (ReqDataConfig) o; + return Objects.equals(this.id, reqDataConfig.id) && + Objects.equals(this.type, reqDataConfig.type) && + Objects.equals(this.outputType, reqDataConfig.outputType) && + Objects.equals(this.evalOutputType, reqDataConfig.evalOutputType) && + Objects.equals(this.choices, reqDataConfig.choices) && + equalsNullable(this.value, reqDataConfig.value) && + Objects.equals(this.filterOp, reqDataConfig.filterOp) && + equalsNullable(this.filterValue, reqDataConfig.filterValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, outputType, evalOutputType, choices, hashCodeNullable(value), filterOp, hashCodeNullable(filterValue)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReqDataConfig {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append(" evalOutputType: ").append(toIndentedString(evalOutputType)).append("\n"); + sb.append(" choices: ").append(toIndentedString(choices)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" filterOp: ").append(toIndentedString(filterOp)).append("\n"); + sb.append(" filterValue: ").append(toIndentedString(filterValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + // add `eval_output_type` to the URL query string + if (getEvalOutputType() != null) { + joiner.add(String.format("%seval_output_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalOutputType())))); + } + + // add `choices` to the URL query string + if (getChoices() != null) { + for (int i = 0; i < getChoices().size(); i++) { + joiner.add(String.format("%schoices%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getChoices().get(i))))); + } + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `filter_op` to the URL query string + if (getFilterOp() != null) { + joiner.add(String.format("%sfilter_op%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFilterOp())))); + } + + // add `filter_value` to the URL query string + if (getFilterValue() != null) { + joiner.add(String.format("%sfilter_value%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFilterValue())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCallsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCallsResponse.java new file mode 100644 index 0000000..66f794e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCallsResponse.java @@ -0,0 +1,434 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.FailedRerunItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RerunCallsResponse + */ +@JsonPropertyOrder({ + RerunCallsResponse.JSON_PROPERTY_MESSAGE, + RerunCallsResponse.JSON_PROPERTY_TEST_EXECUTION_ID, + RerunCallsResponse.JSON_PROPERTY_RERUN_TYPE, + RerunCallsResponse.JSON_PROPERTY_TOTAL_PROCESSED, + RerunCallsResponse.JSON_PROPERTY_SUCCESSFUL_RERUNS, + RerunCallsResponse.JSON_PROPERTY_FAILED_RERUNS, + RerunCallsResponse.JSON_PROPERTY_SUCCESS_COUNT, + RerunCallsResponse.JSON_PROPERTY_FAILURE_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RerunCallsResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_TEST_EXECUTION_ID = "test_execution_id"; + @javax.annotation.Nonnull + private UUID testExecutionId; + + public static final String JSON_PROPERTY_RERUN_TYPE = "rerun_type"; + @javax.annotation.Nonnull + private String rerunType; + + public static final String JSON_PROPERTY_TOTAL_PROCESSED = "total_processed"; + @javax.annotation.Nonnull + private Integer totalProcessed; + + public static final String JSON_PROPERTY_SUCCESSFUL_RERUNS = "successful_reruns"; + @javax.annotation.Nonnull + private List successfulReruns = new ArrayList<>(); + + public static final String JSON_PROPERTY_FAILED_RERUNS = "failed_reruns"; + @javax.annotation.Nonnull + private List failedReruns = new ArrayList<>(); + + public static final String JSON_PROPERTY_SUCCESS_COUNT = "success_count"; + @javax.annotation.Nonnull + private Integer successCount; + + public static final String JSON_PROPERTY_FAILURE_COUNT = "failure_count"; + @javax.annotation.Nonnull + private Integer failureCount; + + public RerunCallsResponse() { + } + + public RerunCallsResponse message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public RerunCallsResponse testExecutionId(@javax.annotation.Nonnull UUID testExecutionId) { + this.testExecutionId = testExecutionId; + return this; + } + + /** + * Get testExecutionId + * @return testExecutionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTestExecutionId() { + return testExecutionId; + } + + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTestExecutionId(@javax.annotation.Nonnull UUID testExecutionId) { + this.testExecutionId = testExecutionId; + } + + + public RerunCallsResponse rerunType(@javax.annotation.Nonnull String rerunType) { + this.rerunType = rerunType; + return this; + } + + /** + * Get rerunType + * @return rerunType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRerunType() { + return rerunType; + } + + + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRerunType(@javax.annotation.Nonnull String rerunType) { + this.rerunType = rerunType; + } + + + public RerunCallsResponse totalProcessed(@javax.annotation.Nonnull Integer totalProcessed) { + this.totalProcessed = totalProcessed; + return this; + } + + /** + * Get totalProcessed + * @return totalProcessed + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_PROCESSED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalProcessed() { + return totalProcessed; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PROCESSED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalProcessed(@javax.annotation.Nonnull Integer totalProcessed) { + this.totalProcessed = totalProcessed; + } + + + public RerunCallsResponse successfulReruns(@javax.annotation.Nonnull List successfulReruns) { + this.successfulReruns = successfulReruns; + return this; + } + + public RerunCallsResponse addSuccessfulRerunsItem(UUID successfulRerunsItem) { + if (this.successfulReruns == null) { + this.successfulReruns = new ArrayList<>(); + } + this.successfulReruns.add(successfulRerunsItem); + return this; + } + + /** + * Get successfulReruns + * @return successfulReruns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESSFUL_RERUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSuccessfulReruns() { + return successfulReruns; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESSFUL_RERUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccessfulReruns(@javax.annotation.Nonnull List successfulReruns) { + this.successfulReruns = successfulReruns; + } + + + public RerunCallsResponse failedReruns(@javax.annotation.Nonnull List failedReruns) { + this.failedReruns = failedReruns; + return this; + } + + public RerunCallsResponse addFailedRerunsItem(FailedRerunItem failedRerunsItem) { + if (this.failedReruns == null) { + this.failedReruns = new ArrayList<>(); + } + this.failedReruns.add(failedRerunsItem); + return this; + } + + /** + * Get failedReruns + * @return failedReruns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILED_RERUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFailedReruns() { + return failedReruns; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_RERUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailedReruns(@javax.annotation.Nonnull List failedReruns) { + this.failedReruns = failedReruns; + } + + + public RerunCallsResponse successCount(@javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + return this; + } + + /** + * Get successCount + * @return successCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getSuccessCount() { + return successCount; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccessCount(@javax.annotation.Nonnull Integer successCount) { + this.successCount = successCount; + } + + + public RerunCallsResponse failureCount(@javax.annotation.Nonnull Integer failureCount) { + this.failureCount = failureCount; + return this; + } + + /** + * Get failureCount + * @return failureCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILURE_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getFailureCount() { + return failureCount; + } + + + @JsonProperty(JSON_PROPERTY_FAILURE_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailureCount(@javax.annotation.Nonnull Integer failureCount) { + this.failureCount = failureCount; + } + + + /** + * Return true if this RerunCallsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RerunCallsResponse rerunCallsResponse = (RerunCallsResponse) o; + return Objects.equals(this.message, rerunCallsResponse.message) && + Objects.equals(this.testExecutionId, rerunCallsResponse.testExecutionId) && + Objects.equals(this.rerunType, rerunCallsResponse.rerunType) && + Objects.equals(this.totalProcessed, rerunCallsResponse.totalProcessed) && + Objects.equals(this.successfulReruns, rerunCallsResponse.successfulReruns) && + Objects.equals(this.failedReruns, rerunCallsResponse.failedReruns) && + Objects.equals(this.successCount, rerunCallsResponse.successCount) && + Objects.equals(this.failureCount, rerunCallsResponse.failureCount); + } + + @Override + public int hashCode() { + return Objects.hash(message, testExecutionId, rerunType, totalProcessed, successfulReruns, failedReruns, successCount, failureCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RerunCallsResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" testExecutionId: ").append(toIndentedString(testExecutionId)).append("\n"); + sb.append(" rerunType: ").append(toIndentedString(rerunType)).append("\n"); + sb.append(" totalProcessed: ").append(toIndentedString(totalProcessed)).append("\n"); + sb.append(" successfulReruns: ").append(toIndentedString(successfulReruns)).append("\n"); + sb.append(" failedReruns: ").append(toIndentedString(failedReruns)).append("\n"); + sb.append(" successCount: ").append(toIndentedString(successCount)).append("\n"); + sb.append(" failureCount: ").append(toIndentedString(failureCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `test_execution_id` to the URL query string + if (getTestExecutionId() != null) { + joiner.add(String.format("%stest_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionId())))); + } + + // add `rerun_type` to the URL query string + if (getRerunType() != null) { + joiner.add(String.format("%srerun_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRerunType())))); + } + + // add `total_processed` to the URL query string + if (getTotalProcessed() != null) { + joiner.add(String.format("%stotal_processed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalProcessed())))); + } + + // add `successful_reruns` to the URL query string + if (getSuccessfulReruns() != null) { + for (int i = 0; i < getSuccessfulReruns().size(); i++) { + if (getSuccessfulReruns().get(i) != null) { + joiner.add(String.format("%ssuccessful_reruns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSuccessfulReruns().get(i))))); + } + } + } + + // add `failed_reruns` to the URL query string + if (getFailedReruns() != null) { + for (int i = 0; i < getFailedReruns().size(); i++) { + if (getFailedReruns().get(i) != null) { + joiner.add(getFailedReruns().get(i).toUrlQueryString(String.format("%sfailed_reruns%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `success_count` to the URL query string + if (getSuccessCount() != null) { + joiner.add(String.format("%ssuccess_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccessCount())))); + } + + // add `failure_count` to the URL query string + if (getFailureCount() != null) { + joiner.add(String.format("%sfailure_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailureCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCellEntry.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCellEntry.java new file mode 100644 index 0000000..264012e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RerunCellEntry.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RerunCellEntry + */ +@JsonPropertyOrder({ + RerunCellEntry.JSON_PROPERTY_COLUMN_ID, + RerunCellEntry.JSON_PROPERTY_ROW_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RerunCellEntry { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_ROW_ID = "row_id"; + @javax.annotation.Nonnull + private UUID rowId; + + public RerunCellEntry() { + } + + public RerunCellEntry columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public RerunCellEntry rowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + return this; + } + + /** + * Get rowId + * @return rowId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRowId() { + return rowId; + } + + + @JsonProperty(JSON_PROPERTY_ROW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRowId(@javax.annotation.Nonnull UUID rowId) { + this.rowId = rowId; + } + + + /** + * Return true if this RerunCellEntry object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RerunCellEntry rerunCellEntry = (RerunCellEntry) o; + return Objects.equals(this.columnId, rerunCellEntry.columnId) && + Objects.equals(this.rowId, rerunCellEntry.rowId); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, rowId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RerunCellEntry {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" rowId: ").append(toIndentedString(rowId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `row_id` to the URL query string + if (getRowId() != null) { + joiner.add(String.format("%srow_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewItemRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewItemRequest.java new file mode 100644 index 0000000..fb3e989 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewItemRequest.java @@ -0,0 +1,278 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ReviewLabelCommentRequest; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ReviewItemRequest + */ +@JsonPropertyOrder({ + ReviewItemRequest.JSON_PROPERTY_ACTION, + ReviewItemRequest.JSON_PROPERTY_NOTES, + ReviewItemRequest.JSON_PROPERTY_LABEL_COMMENTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ReviewItemRequest { + /** + * Gets or Sets action + */ + public enum ActionEnum { + APPROVE(String.valueOf("approve")), + + REQUEST_CHANGES(String.valueOf("request_changes")), + + REJECT(String.valueOf("reject")), + + COMMENT(String.valueOf("comment")); + + private String value; + + ActionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ActionEnum fromValue(String value) { + for (ActionEnum b : ActionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACTION = "action"; + @javax.annotation.Nonnull + private ActionEnum action; + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private String notes; + + public static final String JSON_PROPERTY_LABEL_COMMENTS = "label_comments"; + @javax.annotation.Nullable + private List labelComments = new ArrayList<>(); + + public ReviewItemRequest() { + } + + public ReviewItemRequest action(@javax.annotation.Nonnull ActionEnum action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ActionEnum getAction() { + return action; + } + + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAction(@javax.annotation.Nonnull ActionEnum action) { + this.action = action; + } + + + public ReviewItemRequest notes(@javax.annotation.Nullable String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = notes; + } + + + public ReviewItemRequest labelComments(@javax.annotation.Nullable List labelComments) { + this.labelComments = labelComments; + return this; + } + + public ReviewItemRequest addLabelCommentsItem(ReviewLabelCommentRequest labelCommentsItem) { + if (this.labelComments == null) { + this.labelComments = new ArrayList<>(); + } + this.labelComments.add(labelCommentsItem); + return this; + } + + /** + * Get labelComments + * @return labelComments + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_COMMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabelComments() { + return labelComments; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_COMMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabelComments(@javax.annotation.Nullable List labelComments) { + this.labelComments = labelComments; + } + + + /** + * Return true if this ReviewItemRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReviewItemRequest reviewItemRequest = (ReviewItemRequest) o; + return Objects.equals(this.action, reviewItemRequest.action) && + Objects.equals(this.notes, reviewItemRequest.notes) && + Objects.equals(this.labelComments, reviewItemRequest.labelComments); + } + + @Override + public int hashCode() { + return Objects.hash(action, notes, labelComments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReviewItemRequest {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" labelComments: ").append(toIndentedString(labelComments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `action` to the URL query string + if (getAction() != null) { + joiner.add(String.format("%saction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAction())))); + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `label_comments` to the URL query string + if (getLabelComments() != null) { + for (int i = 0; i < getLabelComments().size(); i++) { + if (getLabelComments().get(i) != null) { + joiner.add(getLabelComments().get(i).toUrlQueryString(String.format("%slabel_comments%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewLabelCommentRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewLabelCommentRequest.java new file mode 100644 index 0000000..4e96794 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ReviewLabelCommentRequest.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ReviewLabelCommentRequest + */ +@JsonPropertyOrder({ + ReviewLabelCommentRequest.JSON_PROPERTY_LABEL_ID, + ReviewLabelCommentRequest.JSON_PROPERTY_TARGET_ANNOTATOR_ID, + ReviewLabelCommentRequest.JSON_PROPERTY_COMMENT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ReviewLabelCommentRequest { + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nullable + private UUID labelId; + + public static final String JSON_PROPERTY_TARGET_ANNOTATOR_ID = "target_annotator_id"; + @javax.annotation.Nullable + private UUID targetAnnotatorId; + + public static final String JSON_PROPERTY_COMMENT = "comment"; + @javax.annotation.Nullable + private String comment; + + public ReviewLabelCommentRequest() { + } + + public ReviewLabelCommentRequest labelId(@javax.annotation.Nullable UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabelId(@javax.annotation.Nullable UUID labelId) { + this.labelId = labelId; + } + + + public ReviewLabelCommentRequest targetAnnotatorId(@javax.annotation.Nullable UUID targetAnnotatorId) { + this.targetAnnotatorId = targetAnnotatorId; + return this; + } + + /** + * Get targetAnnotatorId + * @return targetAnnotatorId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_ANNOTATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTargetAnnotatorId() { + return targetAnnotatorId; + } + + + @JsonProperty(JSON_PROPERTY_TARGET_ANNOTATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTargetAnnotatorId(@javax.annotation.Nullable UUID targetAnnotatorId) { + this.targetAnnotatorId = targetAnnotatorId; + } + + + public ReviewLabelCommentRequest comment(@javax.annotation.Nullable String comment) { + this.comment = comment; + return this; + } + + /** + * Get comment + * @return comment + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getComment() { + return comment; + } + + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComment(@javax.annotation.Nullable String comment) { + this.comment = comment; + } + + + /** + * Return true if this ReviewLabelCommentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReviewLabelCommentRequest reviewLabelCommentRequest = (ReviewLabelCommentRequest) o; + return Objects.equals(this.labelId, reviewLabelCommentRequest.labelId) && + Objects.equals(this.targetAnnotatorId, reviewLabelCommentRequest.targetAnnotatorId) && + Objects.equals(this.comment, reviewLabelCommentRequest.comment); + } + + @Override + public int hashCode() { + return Objects.hash(labelId, targetAnnotatorId, comment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReviewLabelCommentRequest {\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" targetAnnotatorId: ").append(toIndentedString(targetAnnotatorId)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `target_annotator_id` to the URL query string + if (getTargetAnnotatorId() != null) { + joiner.add(String.format("%starget_annotator_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTargetAnnotatorId())))); + } + + // add `comment` to the URL query string + if (getComment() != null) { + joiner.add(String.format("%scomment%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getComment())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RootCause.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RootCause.java new file mode 100644 index 0000000..c07a48a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RootCause.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RootCause + */ +@JsonPropertyOrder({ + RootCause.JSON_PROPERTY_RANK, + RootCause.JSON_PROPERTY_TITLE, + RootCause.JSON_PROPERTY_DESCRIPTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RootCause { + public static final String JSON_PROPERTY_RANK = "rank"; + @javax.annotation.Nonnull + private Integer rank; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nonnull + private String title; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nonnull + private String description; + + public RootCause() { + } + + public RootCause rank(@javax.annotation.Nonnull Integer rank) { + this.rank = rank; + return this; + } + + /** + * Get rank + * @return rank + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RANK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getRank() { + return rank; + } + + + @JsonProperty(JSON_PROPERTY_RANK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRank(@javax.annotation.Nonnull Integer rank) { + this.rank = rank; + } + + + public RootCause title(@javax.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@javax.annotation.Nonnull String title) { + this.title = title; + } + + + public RootCause description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + /** + * Return true if this RootCause object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RootCause rootCause = (RootCause) o; + return Objects.equals(this.rank, rootCause.rank) && + Objects.equals(this.title, rootCause.title) && + Objects.equals(this.description, rootCause.description); + } + + @Override + public int hashCode() { + return Objects.hash(rank, title, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RootCause {\n"); + sb.append(" rank: ").append(toIndentedString(rank)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rank` to the URL query string + if (getRank() != null) { + joiner.add(String.format("%srank%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRank())))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add(String.format("%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RulesInner.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RulesInner.java new file mode 100644 index 0000000..daa8910 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RulesInner.java @@ -0,0 +1,245 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RulesInner + */ +@JsonPropertyOrder({ + RulesInner.JSON_PROPERTY_FIELD, + RulesInner.JSON_PROPERTY_OP, + RulesInner.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RulesInner { + public static final String JSON_PROPERTY_FIELD = "field"; + @javax.annotation.Nonnull + private String field; + + public static final String JSON_PROPERTY_OP = "op"; + @javax.annotation.Nullable + private String op = "eq"; + + public static final String JSON_PROPERTY_VALUE = "value"; + private JsonNullable value = JsonNullable.of(null); + + public RulesInner() { + } + + public RulesInner field(@javax.annotation.Nonnull String field) { + this.field = field; + return this; + } + + /** + * Get field + * @return field + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setField(@javax.annotation.Nonnull String field) { + this.field = field; + } + + + public RulesInner op(@javax.annotation.Nullable String op) { + this.op = op; + return this; + } + + /** + * Get op + * @return op + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOp() { + return op; + } + + + @JsonProperty(JSON_PROPERTY_OP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOp(@javax.annotation.Nullable String op) { + this.op = op; + } + + + public RulesInner value(@javax.annotation.Nullable Object value) { + this.value = JsonNullable.of(value); + return this; + } + + /** + * Rule comparison value. Can be a scalar, list, object, boolean, or null depending on the operator. + * @return value + */ + @javax.annotation.Nullable + @JsonIgnore + public Object getValue() { + return value.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getValue_JsonNullable() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + public void setValue_JsonNullable(JsonNullable value) { + this.value = value; + } + + public void setValue(@javax.annotation.Nullable Object value) { + this.value = JsonNullable.of(value); + } + + + /** + * Return true if this Rules_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesInner rulesInner = (RulesInner) o; + return Objects.equals(this.field, rulesInner.field) && + Objects.equals(this.op, rulesInner.op) && + equalsNullable(this.value, rulesInner.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(field, op, hashCodeNullable(value)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesInner {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `field` to the URL query string + if (getField() != null) { + joiner.add(String.format("%sfield%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getField())))); + } + + // add `op` to the URL query string + if (getOp() != null) { + joiner.add(String.format("%sop%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOp())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsOnTestExecution.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsOnTestExecution.java new file mode 100644 index 0000000..157202a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsOnTestExecution.java @@ -0,0 +1,290 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunNewEvalsOnTestExecution + */ +@JsonPropertyOrder({ + RunNewEvalsOnTestExecution.JSON_PROPERTY_TEST_EXECUTION_IDS, + RunNewEvalsOnTestExecution.JSON_PROPERTY_SELECT_ALL, + RunNewEvalsOnTestExecution.JSON_PROPERTY_EVAL_CONFIG_IDS, + RunNewEvalsOnTestExecution.JSON_PROPERTY_ENABLE_TOOL_EVALUATION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunNewEvalsOnTestExecution { + public static final String JSON_PROPERTY_TEST_EXECUTION_IDS = "test_execution_ids"; + @javax.annotation.Nullable + private List testExecutionIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECT_ALL = "select_all"; + @javax.annotation.Nullable + private Boolean selectAll = false; + + public static final String JSON_PROPERTY_EVAL_CONFIG_IDS = "eval_config_ids"; + @javax.annotation.Nonnull + private List evalConfigIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_ENABLE_TOOL_EVALUATION = "enable_tool_evaluation"; + @javax.annotation.Nullable + private Boolean enableToolEvaluation; + + public RunNewEvalsOnTestExecution() { + } + + public RunNewEvalsOnTestExecution testExecutionIds(@javax.annotation.Nullable List testExecutionIds) { + this.testExecutionIds = testExecutionIds; + return this; + } + + public RunNewEvalsOnTestExecution addTestExecutionIdsItem(UUID testExecutionIdsItem) { + if (this.testExecutionIds == null) { + this.testExecutionIds = new ArrayList<>(); + } + this.testExecutionIds.add(testExecutionIdsItem); + return this; + } + + /** + * List of specific test execution IDs to run evaluations on + * @return testExecutionIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTestExecutionIds() { + return testExecutionIds; + } + + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTestExecutionIds(@javax.annotation.Nullable List testExecutionIds) { + this.testExecutionIds = testExecutionIds; + } + + + public RunNewEvalsOnTestExecution selectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + return this; + } + + /** + * Whether to run evaluations on all test executions in the run test + * @return selectAll + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectAll() { + return selectAll; + } + + + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + } + + + public RunNewEvalsOnTestExecution evalConfigIds(@javax.annotation.Nonnull List evalConfigIds) { + this.evalConfigIds = evalConfigIds; + return this; + } + + public RunNewEvalsOnTestExecution addEvalConfigIdsItem(UUID evalConfigIdsItem) { + if (this.evalConfigIds == null) { + this.evalConfigIds = new ArrayList<>(); + } + this.evalConfigIds.add(evalConfigIdsItem); + return this; + } + + /** + * List of SimulateEvalConfig IDs to run on the test executions + * @return evalConfigIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvalConfigIds() { + return evalConfigIds; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalConfigIds(@javax.annotation.Nonnull List evalConfigIds) { + this.evalConfigIds = evalConfigIds; + } + + + public RunNewEvalsOnTestExecution enableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + return this; + } + + /** + * Whether to enable tool evaluation for this run (if not provided, uses the run test's current setting) + * @return enableToolEvaluation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableToolEvaluation() { + return enableToolEvaluation; + } + + + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + } + + + /** + * Return true if this RunNewEvalsOnTestExecution object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunNewEvalsOnTestExecution runNewEvalsOnTestExecution = (RunNewEvalsOnTestExecution) o; + return Objects.equals(this.testExecutionIds, runNewEvalsOnTestExecution.testExecutionIds) && + Objects.equals(this.selectAll, runNewEvalsOnTestExecution.selectAll) && + Objects.equals(this.evalConfigIds, runNewEvalsOnTestExecution.evalConfigIds) && + Objects.equals(this.enableToolEvaluation, runNewEvalsOnTestExecution.enableToolEvaluation); + } + + @Override + public int hashCode() { + return Objects.hash(testExecutionIds, selectAll, evalConfigIds, enableToolEvaluation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunNewEvalsOnTestExecution {\n"); + sb.append(" testExecutionIds: ").append(toIndentedString(testExecutionIds)).append("\n"); + sb.append(" selectAll: ").append(toIndentedString(selectAll)).append("\n"); + sb.append(" evalConfigIds: ").append(toIndentedString(evalConfigIds)).append("\n"); + sb.append(" enableToolEvaluation: ").append(toIndentedString(enableToolEvaluation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `test_execution_ids` to the URL query string + if (getTestExecutionIds() != null) { + for (int i = 0; i < getTestExecutionIds().size(); i++) { + if (getTestExecutionIds().get(i) != null) { + joiner.add(String.format("%stest_execution_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionIds().get(i))))); + } + } + } + + // add `select_all` to the URL query string + if (getSelectAll() != null) { + joiner.add(String.format("%sselect_all%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectAll())))); + } + + // add `eval_config_ids` to the URL query string + if (getEvalConfigIds() != null) { + for (int i = 0; i < getEvalConfigIds().size(); i++) { + if (getEvalConfigIds().get(i) != null) { + joiner.add(String.format("%seval_config_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalConfigIds().get(i))))); + } + } + } + + // add `enable_tool_evaluation` to the URL query string + if (getEnableToolEvaluation() != null) { + joiner.add(String.format("%senable_tool_evaluation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnableToolEvaluation())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsResponse.java new file mode 100644 index 0000000..3e55853 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunNewEvalsResponse.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunNewEvalsResponse + */ +@JsonPropertyOrder({ + RunNewEvalsResponse.JSON_PROPERTY_MESSAGE, + RunNewEvalsResponse.JSON_PROPERTY_RUN_TEST_ID, + RunNewEvalsResponse.JSON_PROPERTY_CALL_EXECUTION_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunNewEvalsResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nonnull + private UUID runTestId; + + public static final String JSON_PROPERTY_CALL_EXECUTION_COUNT = "call_execution_count"; + @javax.annotation.Nonnull + private Integer callExecutionCount; + + public RunNewEvalsResponse() { + } + + public RunNewEvalsResponse message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public RunNewEvalsResponse runTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + return this; + } + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRunTestId() { + return runTestId; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + } + + + public RunNewEvalsResponse callExecutionCount(@javax.annotation.Nonnull Integer callExecutionCount) { + this.callExecutionCount = callExecutionCount; + return this; + } + + /** + * Get callExecutionCount + * @return callExecutionCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCallExecutionCount() { + return callExecutionCount; + } + + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCallExecutionCount(@javax.annotation.Nonnull Integer callExecutionCount) { + this.callExecutionCount = callExecutionCount; + } + + + /** + * Return true if this RunNewEvalsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunNewEvalsResponse runNewEvalsResponse = (RunNewEvalsResponse) o; + return Objects.equals(this.message, runNewEvalsResponse.message) && + Objects.equals(this.runTestId, runNewEvalsResponse.runTestId) && + Objects.equals(this.callExecutionCount, runNewEvalsResponse.callExecutionCount); + } + + @Override + public int hashCode() { + return Objects.hash(message, runTestId, callExecutionCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunNewEvalsResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" callExecutionCount: ").append(toIndentedString(callExecutionCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `call_execution_count` to the URL query string + if (getCallExecutionCount() != null) { + joiner.add(String.format("%scall_execution_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptChoiceOption.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptChoiceOption.java new file mode 100644 index 0000000..236b5e5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptChoiceOption.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptChoiceOption + */ +@JsonPropertyOrder({ + RunPromptChoiceOption.JSON_PROPERTY_VALUE, + RunPromptChoiceOption.JSON_PROPERTY_LABEL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptChoiceOption { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_LABEL = "label"; + @javax.annotation.Nonnull + private String label; + + public RunPromptChoiceOption() { + } + + public RunPromptChoiceOption value(@javax.annotation.Nonnull Map value) { + this.value = value; + return this; + } + + public RunPromptChoiceOption putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Map value) { + this.value = value; + } + + + public RunPromptChoiceOption label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + /** + * Return true if this RunPromptChoiceOption object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptChoiceOption runPromptChoiceOption = (RunPromptChoiceOption) o; + return Objects.equals(this.value, runPromptChoiceOption.value) && + Objects.equals(this.label, runPromptChoiceOption.label); + } + + @Override + public int hashCode() { + return Objects.hash(value, label); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptChoiceOption {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(String.format("%slabel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabel())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResponse.java new file mode 100644 index 0000000..29edb93 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RunPromptColumnConfigResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptColumnConfigResponse + */ +@JsonPropertyOrder({ + RunPromptColumnConfigResponse.JSON_PROPERTY_STATUS, + RunPromptColumnConfigResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptColumnConfigResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private RunPromptColumnConfigResult result; + + public RunPromptColumnConfigResponse() { + } + + public RunPromptColumnConfigResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public RunPromptColumnConfigResponse result(@javax.annotation.Nonnull RunPromptColumnConfigResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RunPromptColumnConfigResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull RunPromptColumnConfigResult result) { + this.result = result; + } + + + /** + * Return true if this RunPromptColumnConfigResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptColumnConfigResponse runPromptColumnConfigResponse = (RunPromptColumnConfigResponse) o; + return Objects.equals(this.status, runPromptColumnConfigResponse.status) && + Objects.equals(this.result, runPromptColumnConfigResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptColumnConfigResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResult.java new file mode 100644 index 0000000..ffb159c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnConfigResult.java @@ -0,0 +1,165 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptColumnConfigResult + */ +@JsonPropertyOrder({ + RunPromptColumnConfigResult.JSON_PROPERTY_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptColumnConfigResult { + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public RunPromptColumnConfigResult() { + } + + public RunPromptColumnConfigResult config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public RunPromptColumnConfigResult putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + /** + * Return true if this RunPromptColumnConfigResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptColumnConfigResult runPromptColumnConfigResult = (RunPromptColumnConfigResult) o; + return Objects.equals(this.config, runPromptColumnConfigResult.config); + } + + @Override + public int hashCode() { + return Objects.hash(config); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptColumnConfigResult {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResponse.java new file mode 100644 index 0000000..109e53c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RunPromptColumnPreviewResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptColumnPreviewResponse + */ +@JsonPropertyOrder({ + RunPromptColumnPreviewResponse.JSON_PROPERTY_STATUS, + RunPromptColumnPreviewResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptColumnPreviewResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private RunPromptColumnPreviewResult result; + + public RunPromptColumnPreviewResponse() { + } + + public RunPromptColumnPreviewResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public RunPromptColumnPreviewResponse result(@javax.annotation.Nonnull RunPromptColumnPreviewResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RunPromptColumnPreviewResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull RunPromptColumnPreviewResult result) { + this.result = result; + } + + + /** + * Return true if this RunPromptColumnPreviewResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptColumnPreviewResponse runPromptColumnPreviewResponse = (RunPromptColumnPreviewResponse) o; + return Objects.equals(this.status, runPromptColumnPreviewResponse.status) && + Objects.equals(this.result, runPromptColumnPreviewResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptColumnPreviewResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResult.java new file mode 100644 index 0000000..0f64bca --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptColumnPreviewResult.java @@ -0,0 +1,263 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptColumnPreviewResult + */ +@JsonPropertyOrder({ + RunPromptColumnPreviewResult.JSON_PROPERTY_RESPONSES, + RunPromptColumnPreviewResult.JSON_PROPERTY_TOKEN_USAGE, + RunPromptColumnPreviewResult.JSON_PROPERTY_COST +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptColumnPreviewResult { + public static final String JSON_PROPERTY_RESPONSES = "responses"; + @javax.annotation.Nonnull + private List> responses = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOKEN_USAGE = "token_usage"; + @javax.annotation.Nonnull + private Map tokenUsage = new HashMap<>(); + + public static final String JSON_PROPERTY_COST = "cost"; + @javax.annotation.Nonnull + private Map cost = new HashMap<>(); + + public RunPromptColumnPreviewResult() { + } + + public RunPromptColumnPreviewResult responses(@javax.annotation.Nonnull List> responses) { + this.responses = responses; + return this; + } + + public RunPromptColumnPreviewResult addResponsesItem(Map responsesItem) { + if (this.responses == null) { + this.responses = new ArrayList<>(); + } + this.responses.add(responsesItem); + return this; + } + + /** + * Get responses + * @return responses + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESPONSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getResponses() { + return responses; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResponses(@javax.annotation.Nonnull List> responses) { + this.responses = responses; + } + + + public RunPromptColumnPreviewResult tokenUsage(@javax.annotation.Nonnull Map tokenUsage) { + this.tokenUsage = tokenUsage; + return this; + } + + public RunPromptColumnPreviewResult putTokenUsageItem(String key, Object tokenUsageItem) { + if (this.tokenUsage == null) { + this.tokenUsage = new HashMap<>(); + } + this.tokenUsage.put(key, tokenUsageItem); + return this; + } + + /** + * Get tokenUsage + * @return tokenUsage + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN_USAGE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getTokenUsage() { + return tokenUsage; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN_USAGE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setTokenUsage(@javax.annotation.Nonnull Map tokenUsage) { + this.tokenUsage = tokenUsage; + } + + + public RunPromptColumnPreviewResult cost(@javax.annotation.Nonnull Map cost) { + this.cost = cost; + return this; + } + + public RunPromptColumnPreviewResult putCostItem(String key, Object costItem) { + if (this.cost == null) { + this.cost = new HashMap<>(); + } + this.cost.put(key, costItem); + return this; + } + + /** + * Get cost + * @return cost + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getCost() { + return cost; + } + + + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setCost(@javax.annotation.Nonnull Map cost) { + this.cost = cost; + } + + + /** + * Return true if this RunPromptColumnPreviewResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptColumnPreviewResult runPromptColumnPreviewResult = (RunPromptColumnPreviewResult) o; + return Objects.equals(this.responses, runPromptColumnPreviewResult.responses) && + Objects.equals(this.tokenUsage, runPromptColumnPreviewResult.tokenUsage) && + Objects.equals(this.cost, runPromptColumnPreviewResult.cost); + } + + @Override + public int hashCode() { + return Objects.hash(responses, tokenUsage, cost); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptColumnPreviewResult {\n"); + sb.append(" responses: ").append(toIndentedString(responses)).append("\n"); + sb.append(" tokenUsage: ").append(toIndentedString(tokenUsage)).append("\n"); + sb.append(" cost: ").append(toIndentedString(cost)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `responses` to the URL query string + if (getResponses() != null) { + for (int i = 0; i < getResponses().size(); i++) { + joiner.add(String.format("%sresponses%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getResponses().get(i))))); + } + } + + // add `token_usage` to the URL query string + if (getTokenUsage() != null) { + for (String _key : getTokenUsage().keySet()) { + joiner.add(String.format("%stoken_usage%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTokenUsage().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTokenUsage().get(_key))))); + } + } + + // add `cost` to the URL query string + if (getCost() != null) { + for (String _key : getCost().keySet()) { + joiner.add(String.format("%scost%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCost().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCost().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResponse.java new file mode 100644 index 0000000..7d2820b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RunPromptOptionsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptOptionsResponse + */ +@JsonPropertyOrder({ + RunPromptOptionsResponse.JSON_PROPERTY_STATUS, + RunPromptOptionsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptOptionsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private RunPromptOptionsResult result; + + public RunPromptOptionsResponse() { + } + + public RunPromptOptionsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public RunPromptOptionsResponse result(@javax.annotation.Nonnull RunPromptOptionsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RunPromptOptionsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull RunPromptOptionsResult result) { + this.result = result; + } + + + /** + * Return true if this RunPromptOptionsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptOptionsResponse runPromptOptionsResponse = (RunPromptOptionsResponse) o; + return Objects.equals(this.status, runPromptOptionsResponse.status) && + Objects.equals(this.result, runPromptOptionsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptOptionsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResult.java new file mode 100644 index 0000000..9831ca8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptOptionsResult.java @@ -0,0 +1,364 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RunPromptChoiceOption; +import com.futureagi.sdk.model.RunPromptToolOption; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptOptionsResult + */ +@JsonPropertyOrder({ + RunPromptOptionsResult.JSON_PROPERTY_MODELS, + RunPromptOptionsResult.JSON_PROPERTY_TOOL_CONFIG, + RunPromptOptionsResult.JSON_PROPERTY_AVAILABLE_TOOLS, + RunPromptOptionsResult.JSON_PROPERTY_OUTPUT_FORMATS, + RunPromptOptionsResult.JSON_PROPERTY_TOOL_CHOICES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptOptionsResult { + public static final String JSON_PROPERTY_MODELS = "models"; + @javax.annotation.Nonnull + private List> models = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOOL_CONFIG = "tool_config"; + @javax.annotation.Nonnull + private Map toolConfig = new HashMap<>(); + + public static final String JSON_PROPERTY_AVAILABLE_TOOLS = "available_tools"; + @javax.annotation.Nonnull + private List availableTools = new ArrayList<>(); + + public static final String JSON_PROPERTY_OUTPUT_FORMATS = "output_formats"; + @javax.annotation.Nonnull + private List outputFormats = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOOL_CHOICES = "tool_choices"; + @javax.annotation.Nonnull + private List toolChoices = new ArrayList<>(); + + public RunPromptOptionsResult() { + } + + public RunPromptOptionsResult models(@javax.annotation.Nonnull List> models) { + this.models = models; + return this; + } + + public RunPromptOptionsResult addModelsItem(Map modelsItem) { + if (this.models == null) { + this.models = new ArrayList<>(); + } + this.models.add(modelsItem); + return this; + } + + /** + * Get models + * @return models + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getModels() { + return models; + } + + + @JsonProperty(JSON_PROPERTY_MODELS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModels(@javax.annotation.Nonnull List> models) { + this.models = models; + } + + + public RunPromptOptionsResult toolConfig(@javax.annotation.Nonnull Map toolConfig) { + this.toolConfig = toolConfig; + return this; + } + + public RunPromptOptionsResult putToolConfigItem(String key, Object toolConfigItem) { + if (this.toolConfig == null) { + this.toolConfig = new HashMap<>(); + } + this.toolConfig.put(key, toolConfigItem); + return this; + } + + /** + * Get toolConfig + * @return toolConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOOL_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getToolConfig() { + return toolConfig; + } + + + @JsonProperty(JSON_PROPERTY_TOOL_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setToolConfig(@javax.annotation.Nonnull Map toolConfig) { + this.toolConfig = toolConfig; + } + + + public RunPromptOptionsResult availableTools(@javax.annotation.Nonnull List availableTools) { + this.availableTools = availableTools; + return this; + } + + public RunPromptOptionsResult addAvailableToolsItem(RunPromptToolOption availableToolsItem) { + if (this.availableTools == null) { + this.availableTools = new ArrayList<>(); + } + this.availableTools.add(availableToolsItem); + return this; + } + + /** + * Get availableTools + * @return availableTools + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVAILABLE_TOOLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAvailableTools() { + return availableTools; + } + + + @JsonProperty(JSON_PROPERTY_AVAILABLE_TOOLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvailableTools(@javax.annotation.Nonnull List availableTools) { + this.availableTools = availableTools; + } + + + public RunPromptOptionsResult outputFormats(@javax.annotation.Nonnull List outputFormats) { + this.outputFormats = outputFormats; + return this; + } + + public RunPromptOptionsResult addOutputFormatsItem(RunPromptChoiceOption outputFormatsItem) { + if (this.outputFormats == null) { + this.outputFormats = new ArrayList<>(); + } + this.outputFormats.add(outputFormatsItem); + return this; + } + + /** + * Get outputFormats + * @return outputFormats + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMATS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getOutputFormats() { + return outputFormats; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_FORMATS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutputFormats(@javax.annotation.Nonnull List outputFormats) { + this.outputFormats = outputFormats; + } + + + public RunPromptOptionsResult toolChoices(@javax.annotation.Nonnull List toolChoices) { + this.toolChoices = toolChoices; + return this; + } + + public RunPromptOptionsResult addToolChoicesItem(RunPromptChoiceOption toolChoicesItem) { + if (this.toolChoices == null) { + this.toolChoices = new ArrayList<>(); + } + this.toolChoices.add(toolChoicesItem); + return this; + } + + /** + * Get toolChoices + * @return toolChoices + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOOL_CHOICES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getToolChoices() { + return toolChoices; + } + + + @JsonProperty(JSON_PROPERTY_TOOL_CHOICES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setToolChoices(@javax.annotation.Nonnull List toolChoices) { + this.toolChoices = toolChoices; + } + + + /** + * Return true if this RunPromptOptionsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptOptionsResult runPromptOptionsResult = (RunPromptOptionsResult) o; + return Objects.equals(this.models, runPromptOptionsResult.models) && + Objects.equals(this.toolConfig, runPromptOptionsResult.toolConfig) && + Objects.equals(this.availableTools, runPromptOptionsResult.availableTools) && + Objects.equals(this.outputFormats, runPromptOptionsResult.outputFormats) && + Objects.equals(this.toolChoices, runPromptOptionsResult.toolChoices); + } + + @Override + public int hashCode() { + return Objects.hash(models, toolConfig, availableTools, outputFormats, toolChoices); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptOptionsResult {\n"); + sb.append(" models: ").append(toIndentedString(models)).append("\n"); + sb.append(" toolConfig: ").append(toIndentedString(toolConfig)).append("\n"); + sb.append(" availableTools: ").append(toIndentedString(availableTools)).append("\n"); + sb.append(" outputFormats: ").append(toIndentedString(outputFormats)).append("\n"); + sb.append(" toolChoices: ").append(toIndentedString(toolChoices)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `models` to the URL query string + if (getModels() != null) { + for (int i = 0; i < getModels().size(); i++) { + joiner.add(String.format("%smodels%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getModels().get(i))))); + } + } + + // add `tool_config` to the URL query string + if (getToolConfig() != null) { + for (String _key : getToolConfig().keySet()) { + joiner.add(String.format("%stool_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getToolConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getToolConfig().get(_key))))); + } + } + + // add `available_tools` to the URL query string + if (getAvailableTools() != null) { + for (int i = 0; i < getAvailableTools().size(); i++) { + if (getAvailableTools().get(i) != null) { + joiner.add(getAvailableTools().get(i).toUrlQueryString(String.format("%savailable_tools%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `output_formats` to the URL query string + if (getOutputFormats() != null) { + for (int i = 0; i < getOutputFormats().size(); i++) { + if (getOutputFormats().get(i) != null) { + joiner.add(getOutputFormats().get(i).toUrlQueryString(String.format("%soutput_formats%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `tool_choices` to the URL query string + if (getToolChoices() != null) { + for (int i = 0; i < getToolChoices().size(); i++) { + if (getToolChoices().get(i) != null) { + joiner.add(getToolChoices().get(i).toUrlQueryString(String.format("%stool_choices%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptToolOption.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptToolOption.java new file mode 100644 index 0000000..97bead1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunPromptToolOption.java @@ -0,0 +1,381 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunPromptToolOption + */ +@JsonPropertyOrder({ + RunPromptToolOption.JSON_PROPERTY_ID, + RunPromptToolOption.JSON_PROPERTY_NAME, + RunPromptToolOption.JSON_PROPERTY_YAML_CONFIG, + RunPromptToolOption.JSON_PROPERTY_CONFIG, + RunPromptToolOption.JSON_PROPERTY_CONFIG_TYPE, + RunPromptToolOption.JSON_PROPERTY_DESCRIPTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunPromptToolOption { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_YAML_CONFIG = "yaml_config"; + private JsonNullable yamlConfig = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG_TYPE = "config_type"; + private JsonNullable configType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public RunPromptToolOption() { + } + + public RunPromptToolOption id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public RunPromptToolOption name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public RunPromptToolOption yamlConfig(@javax.annotation.Nullable String yamlConfig) { + this.yamlConfig = JsonNullable.of(yamlConfig); + return this; + } + + /** + * Get yamlConfig + * @return yamlConfig + */ + @javax.annotation.Nullable + @JsonIgnore + public String getYamlConfig() { + return yamlConfig.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_YAML_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getYamlConfig_JsonNullable() { + return yamlConfig; + } + + @JsonProperty(JSON_PROPERTY_YAML_CONFIG) + public void setYamlConfig_JsonNullable(JsonNullable yamlConfig) { + this.yamlConfig = yamlConfig; + } + + public void setYamlConfig(@javax.annotation.Nullable String yamlConfig) { + this.yamlConfig = JsonNullable.of(yamlConfig); + } + + + public RunPromptToolOption config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public RunPromptToolOption putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public RunPromptToolOption configType(@javax.annotation.Nullable String configType) { + this.configType = JsonNullable.of(configType); + return this; + } + + /** + * Get configType + * @return configType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getConfigType() { + return configType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONFIG_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getConfigType_JsonNullable() { + return configType; + } + + @JsonProperty(JSON_PROPERTY_CONFIG_TYPE) + public void setConfigType_JsonNullable(JsonNullable configType) { + this.configType = configType; + } + + public void setConfigType(@javax.annotation.Nullable String configType) { + this.configType = JsonNullable.of(configType); + } + + + public RunPromptToolOption description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this RunPromptToolOption object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunPromptToolOption runPromptToolOption = (RunPromptToolOption) o; + return Objects.equals(this.id, runPromptToolOption.id) && + Objects.equals(this.name, runPromptToolOption.name) && + equalsNullable(this.yamlConfig, runPromptToolOption.yamlConfig) && + Objects.equals(this.config, runPromptToolOption.config) && + equalsNullable(this.configType, runPromptToolOption.configType) && + equalsNullable(this.description, runPromptToolOption.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(yamlConfig), config, hashCodeNullable(configType), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunPromptToolOption {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" yamlConfig: ").append(toIndentedString(yamlConfig)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" configType: ").append(toIndentedString(configType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `yaml_config` to the URL query string + if (getYamlConfig() != null) { + joiner.add(String.format("%syaml_config%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getYamlConfig())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `config_type` to the URL query string + if (getConfigType() != null) { + joiner.add(String.format("%sconfig_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfigType())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestAnalytics.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestAnalytics.java new file mode 100644 index 0000000..ffc3f7e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestAnalytics.java @@ -0,0 +1,359 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestAnalytics + */ +@JsonPropertyOrder({ + RunTestAnalytics.JSON_PROPERTY_RUN_TEST_INFO, + RunTestAnalytics.JSON_PROPERTY_FAIL_RATE_TRENDS, + RunTestAnalytics.JSON_PROPERTY_EVALUATION_SCORE_TRENDS, + RunTestAnalytics.JSON_PROPERTY_PERFORMANCE_COMPARISON, + RunTestAnalytics.JSON_PROPERTY_SUMMARY_STATS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestAnalytics { + public static final String JSON_PROPERTY_RUN_TEST_INFO = "run_test_info"; + @javax.annotation.Nonnull + private Map runTestInfo = new HashMap<>(); + + public static final String JSON_PROPERTY_FAIL_RATE_TRENDS = "fail_rate_trends"; + @javax.annotation.Nonnull + private List> failRateTrends = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVALUATION_SCORE_TRENDS = "evaluation_score_trends"; + @javax.annotation.Nonnull + private List> evaluationScoreTrends = new ArrayList<>(); + + public static final String JSON_PROPERTY_PERFORMANCE_COMPARISON = "performance_comparison"; + @javax.annotation.Nonnull + private List> performanceComparison = new ArrayList<>(); + + public static final String JSON_PROPERTY_SUMMARY_STATS = "summary_stats"; + @javax.annotation.Nullable + private Map summaryStats = new HashMap<>(); + + public RunTestAnalytics() { + } + + public RunTestAnalytics runTestInfo(@javax.annotation.Nonnull Map runTestInfo) { + this.runTestInfo = runTestInfo; + return this; + } + + public RunTestAnalytics putRunTestInfoItem(String key, String runTestInfoItem) { + if (this.runTestInfo == null) { + this.runTestInfo = new HashMap<>(); + } + this.runTestInfo.put(key, runTestInfoItem); + return this; + } + + /** + * Run test metadata + * @return runTestInfo + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getRunTestInfo() { + return runTestInfo; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_INFO) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setRunTestInfo(@javax.annotation.Nonnull Map runTestInfo) { + this.runTestInfo = runTestInfo; + } + + + public RunTestAnalytics failRateTrends(@javax.annotation.Nonnull List> failRateTrends) { + this.failRateTrends = failRateTrends; + return this; + } + + public RunTestAnalytics addFailRateTrendsItem(Map failRateTrendsItem) { + if (this.failRateTrends == null) { + this.failRateTrends = new ArrayList<>(); + } + this.failRateTrends.add(failRateTrendsItem); + return this; + } + + /** + * Fail-rate trend points + * @return failRateTrends + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAIL_RATE_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getFailRateTrends() { + return failRateTrends; + } + + + @JsonProperty(JSON_PROPERTY_FAIL_RATE_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailRateTrends(@javax.annotation.Nonnull List> failRateTrends) { + this.failRateTrends = failRateTrends; + } + + + public RunTestAnalytics evaluationScoreTrends(@javax.annotation.Nonnull List> evaluationScoreTrends) { + this.evaluationScoreTrends = evaluationScoreTrends; + return this; + } + + public RunTestAnalytics addEvaluationScoreTrendsItem(Map evaluationScoreTrendsItem) { + if (this.evaluationScoreTrends == null) { + this.evaluationScoreTrends = new ArrayList<>(); + } + this.evaluationScoreTrends.add(evaluationScoreTrendsItem); + return this; + } + + /** + * Evaluation score trend points + * @return evaluationScoreTrends + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATION_SCORE_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvaluationScoreTrends() { + return evaluationScoreTrends; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_SCORE_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluationScoreTrends(@javax.annotation.Nonnull List> evaluationScoreTrends) { + this.evaluationScoreTrends = evaluationScoreTrends; + } + + + public RunTestAnalytics performanceComparison(@javax.annotation.Nonnull List> performanceComparison) { + this.performanceComparison = performanceComparison; + return this; + } + + public RunTestAnalytics addPerformanceComparisonItem(Map performanceComparisonItem) { + if (this.performanceComparison == null) { + this.performanceComparison = new ArrayList<>(); + } + this.performanceComparison.add(performanceComparisonItem); + return this; + } + + /** + * Per-execution performance rows + * @return performanceComparison + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PERFORMANCE_COMPARISON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getPerformanceComparison() { + return performanceComparison; + } + + + @JsonProperty(JSON_PROPERTY_PERFORMANCE_COMPARISON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPerformanceComparison(@javax.annotation.Nonnull List> performanceComparison) { + this.performanceComparison = performanceComparison; + } + + + public RunTestAnalytics summaryStats(@javax.annotation.Nullable Map summaryStats) { + this.summaryStats = summaryStats; + return this; + } + + public RunTestAnalytics putSummaryStatsItem(String key, String summaryStatsItem) { + if (this.summaryStats == null) { + this.summaryStats = new HashMap<>(); + } + this.summaryStats.put(key, summaryStatsItem); + return this; + } + + /** + * Aggregate performance summary + * @return summaryStats + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUMMARY_STATS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSummaryStats() { + return summaryStats; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY_STATS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSummaryStats(@javax.annotation.Nullable Map summaryStats) { + this.summaryStats = summaryStats; + } + + + /** + * Return true if this RunTestAnalytics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestAnalytics runTestAnalytics = (RunTestAnalytics) o; + return Objects.equals(this.runTestInfo, runTestAnalytics.runTestInfo) && + Objects.equals(this.failRateTrends, runTestAnalytics.failRateTrends) && + Objects.equals(this.evaluationScoreTrends, runTestAnalytics.evaluationScoreTrends) && + Objects.equals(this.performanceComparison, runTestAnalytics.performanceComparison) && + Objects.equals(this.summaryStats, runTestAnalytics.summaryStats); + } + + @Override + public int hashCode() { + return Objects.hash(runTestInfo, failRateTrends, evaluationScoreTrends, performanceComparison, summaryStats); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestAnalytics {\n"); + sb.append(" runTestInfo: ").append(toIndentedString(runTestInfo)).append("\n"); + sb.append(" failRateTrends: ").append(toIndentedString(failRateTrends)).append("\n"); + sb.append(" evaluationScoreTrends: ").append(toIndentedString(evaluationScoreTrends)).append("\n"); + sb.append(" performanceComparison: ").append(toIndentedString(performanceComparison)).append("\n"); + sb.append(" summaryStats: ").append(toIndentedString(summaryStats)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `run_test_info` to the URL query string + if (getRunTestInfo() != null) { + for (String _key : getRunTestInfo().keySet()) { + joiner.add(String.format("%srun_test_info%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getRunTestInfo().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getRunTestInfo().get(_key))))); + } + } + + // add `fail_rate_trends` to the URL query string + if (getFailRateTrends() != null) { + for (int i = 0; i < getFailRateTrends().size(); i++) { + joiner.add(String.format("%sfail_rate_trends%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFailRateTrends().get(i))))); + } + } + + // add `evaluation_score_trends` to the URL query string + if (getEvaluationScoreTrends() != null) { + for (int i = 0; i < getEvaluationScoreTrends().size(); i++) { + joiner.add(String.format("%sevaluation_score_trends%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvaluationScoreTrends().get(i))))); + } + } + + // add `performance_comparison` to the URL query string + if (getPerformanceComparison() != null) { + for (int i = 0; i < getPerformanceComparison().size(); i++) { + joiner.add(String.format("%sperformance_comparison%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getPerformanceComparison().get(i))))); + } + } + + // add `summary_stats` to the URL query string + if (getSummaryStats() != null) { + for (String _key : getSummaryStats().keySet()) { + joiner.add(String.format("%ssummary_stats%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSummaryStats().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSummaryStats().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestCallExecutionsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestCallExecutionsResponse.java new file mode 100644 index 0000000..d7ecb71 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestCallExecutionsResponse.java @@ -0,0 +1,337 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestCallExecutionsResponse + */ +@JsonPropertyOrder({ + RunTestCallExecutionsResponse.JSON_PROPERTY_COUNT, + RunTestCallExecutionsResponse.JSON_PROPERTY_NEXT, + RunTestCallExecutionsResponse.JSON_PROPERTY_PREVIOUS, + RunTestCallExecutionsResponse.JSON_PROPERTY_RESULTS, + RunTestCallExecutionsResponse.JSON_PROPERTY_TOTAL_PAGES, + RunTestCallExecutionsResponse.JSON_PROPERTY_CURRENT_PAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestCallExecutionsResponse { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List> results = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_CURRENT_PAGE = "current_page"; + @javax.annotation.Nullable + private Integer currentPage; + + public RunTestCallExecutionsResponse() { + } + + @JsonCreator + public RunTestCallExecutionsResponse( + @JsonProperty(JSON_PROPERTY_COUNT) Integer count, + @JsonProperty(JSON_PROPERTY_NEXT) String next, + @JsonProperty(JSON_PROPERTY_PREVIOUS) String previous, + @JsonProperty(JSON_PROPERTY_RESULTS) List> results, + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) Integer totalPages, + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) Integer currentPage + ) { + this(); + this.count = count; + this.next = next == null ? JsonNullable.undefined() : JsonNullable.of(next); + this.previous = previous == null ? JsonNullable.undefined() : JsonNullable.of(previous); + this.results = results; + this.totalPages = totalPages; + this.currentPage = currentPage; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNext() { + + if (next == null) { + next = JsonNullable.undefined(); + } + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + private void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPrevious() { + + if (previous == null) { + previous = JsonNullable.undefined(); + } + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + private void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getResults() { + return results; + } + + + + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + + + /** + * Get currentPage + * @return currentPage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCurrentPage() { + return currentPage; + } + + + + + /** + * Return true if this RunTestCallExecutionsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestCallExecutionsResponse runTestCallExecutionsResponse = (RunTestCallExecutionsResponse) o; + return Objects.equals(this.count, runTestCallExecutionsResponse.count) && + equalsNullable(this.next, runTestCallExecutionsResponse.next) && + equalsNullable(this.previous, runTestCallExecutionsResponse.previous) && + Objects.equals(this.results, runTestCallExecutionsResponse.results) && + Objects.equals(this.totalPages, runTestCallExecutionsResponse.totalPages) && + Objects.equals(this.currentPage, runTestCallExecutionsResponse.currentPage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results, totalPages, currentPage); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestCallExecutionsResponse {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + joiner.add(String.format("%sresults%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getResults().get(i))))); + } + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `current_page` to the URL query string + if (getCurrentPage() != null) { + joiner.add(String.format("%scurrent_page%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentPage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResponse.java new file mode 100644 index 0000000..9039b34 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RunTestChatExecutionResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestChatExecutionResponse + */ +@JsonPropertyOrder({ + RunTestChatExecutionResponse.JSON_PROPERTY_STATUS, + RunTestChatExecutionResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestChatExecutionResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private RunTestChatExecutionResult result; + + public RunTestChatExecutionResponse() { + } + + public RunTestChatExecutionResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public RunTestChatExecutionResponse result(@javax.annotation.Nonnull RunTestChatExecutionResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RunTestChatExecutionResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull RunTestChatExecutionResult result) { + this.result = result; + } + + + /** + * Return true if this RunTestChatExecutionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestChatExecutionResponse runTestChatExecutionResponse = (RunTestChatExecutionResponse) o; + return Objects.equals(this.status, runTestChatExecutionResponse.status) && + Objects.equals(this.result, runTestChatExecutionResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestChatExecutionResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResult.java new file mode 100644 index 0000000..13a5b85 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestChatExecutionResult.java @@ -0,0 +1,312 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestChatExecutionResult + */ +@JsonPropertyOrder({ + RunTestChatExecutionResult.JSON_PROPERTY_MESSAGE, + RunTestChatExecutionResult.JSON_PROPERTY_EXECUTION_ID, + RunTestChatExecutionResult.JSON_PROPERTY_RUN_TEST_ID, + RunTestChatExecutionResult.JSON_PROPERTY_STATUS, + RunTestChatExecutionResult.JSON_PROPERTY_TOTAL_SCENARIOS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestChatExecutionResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nonnull + private UUID executionId; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nonnull + private UUID runTestId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_TOTAL_SCENARIOS = "total_scenarios"; + @javax.annotation.Nonnull + private List totalScenarios = new ArrayList<>(); + + public RunTestChatExecutionResult() { + } + + public RunTestChatExecutionResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public RunTestChatExecutionResult executionId(@javax.annotation.Nonnull UUID executionId) { + this.executionId = executionId; + return this; + } + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getExecutionId() { + return executionId; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionId(@javax.annotation.Nonnull UUID executionId) { + this.executionId = executionId; + } + + + public RunTestChatExecutionResult runTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + return this; + } + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRunTestId() { + return runTestId; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + } + + + public RunTestChatExecutionResult status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public RunTestChatExecutionResult totalScenarios(@javax.annotation.Nonnull List totalScenarios) { + this.totalScenarios = totalScenarios; + return this; + } + + public RunTestChatExecutionResult addTotalScenariosItem(UUID totalScenariosItem) { + if (this.totalScenarios == null) { + this.totalScenarios = new ArrayList<>(); + } + this.totalScenarios.add(totalScenariosItem); + return this; + } + + /** + * Get totalScenarios + * @return totalScenarios + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTotalScenarios() { + return totalScenarios; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalScenarios(@javax.annotation.Nonnull List totalScenarios) { + this.totalScenarios = totalScenarios; + } + + + /** + * Return true if this RunTestChatExecutionResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestChatExecutionResult runTestChatExecutionResult = (RunTestChatExecutionResult) o; + return Objects.equals(this.message, runTestChatExecutionResult.message) && + Objects.equals(this.executionId, runTestChatExecutionResult.executionId) && + Objects.equals(this.runTestId, runTestChatExecutionResult.runTestId) && + Objects.equals(this.status, runTestChatExecutionResult.status) && + Objects.equals(this.totalScenarios, runTestChatExecutionResult.totalScenarios); + } + + @Override + public int hashCode() { + return Objects.hash(message, executionId, runTestId, status, totalScenarios); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestChatExecutionResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalScenarios: ").append(toIndentedString(totalScenarios)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `total_scenarios` to the URL query string + if (getTotalScenarios() != null) { + for (int i = 0; i < getTotalScenarios().size(); i++) { + if (getTotalScenarios().get(i) != null) { + joiner.add(String.format("%stotal_scenarios%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTotalScenarios().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestComponentsUpdate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestComponentsUpdate.java new file mode 100644 index 0000000..0ec4a60 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestComponentsUpdate.java @@ -0,0 +1,312 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestComponentsUpdate + */ +@JsonPropertyOrder({ + RunTestComponentsUpdate.JSON_PROPERTY_AGENT_DEFINITION_ID, + RunTestComponentsUpdate.JSON_PROPERTY_VERSION, + RunTestComponentsUpdate.JSON_PROPERTY_SIMULATOR_AGENT_ID, + RunTestComponentsUpdate.JSON_PROPERTY_SCENARIOS, + RunTestComponentsUpdate.JSON_PROPERTY_ENABLE_TOOL_EVALUATION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestComponentsUpdate { + public static final String JSON_PROPERTY_AGENT_DEFINITION_ID = "agent_definition_id"; + @javax.annotation.Nullable + private UUID agentDefinitionId; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nullable + private UUID version; + + public static final String JSON_PROPERTY_SIMULATOR_AGENT_ID = "simulator_agent_id"; + @javax.annotation.Nullable + private UUID simulatorAgentId; + + public static final String JSON_PROPERTY_SCENARIOS = "scenarios"; + @javax.annotation.Nullable + private List scenarios = new ArrayList<>(); + + public static final String JSON_PROPERTY_ENABLE_TOOL_EVALUATION = "enable_tool_evaluation"; + @javax.annotation.Nullable + private Boolean enableToolEvaluation; + + public RunTestComponentsUpdate() { + } + + public RunTestComponentsUpdate agentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + return this; + } + + /** + * Get agentDefinitionId + * @return agentDefinitionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAgentDefinitionId() { + return agentDefinitionId; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + } + + + public RunTestComponentsUpdate version(@javax.annotation.Nullable UUID version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(@javax.annotation.Nullable UUID version) { + this.version = version; + } + + + public RunTestComponentsUpdate simulatorAgentId(@javax.annotation.Nullable UUID simulatorAgentId) { + this.simulatorAgentId = simulatorAgentId; + return this; + } + + /** + * Get simulatorAgentId + * @return simulatorAgentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getSimulatorAgentId() { + return simulatorAgentId; + } + + + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSimulatorAgentId(@javax.annotation.Nullable UUID simulatorAgentId) { + this.simulatorAgentId = simulatorAgentId; + } + + + public RunTestComponentsUpdate scenarios(@javax.annotation.Nullable List scenarios) { + this.scenarios = scenarios; + return this; + } + + public RunTestComponentsUpdate addScenariosItem(UUID scenariosItem) { + if (this.scenarios == null) { + this.scenarios = new ArrayList<>(); + } + this.scenarios.add(scenariosItem); + return this; + } + + /** + * Get scenarios + * @return scenarios + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScenarios() { + return scenarios; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarios(@javax.annotation.Nullable List scenarios) { + this.scenarios = scenarios; + } + + + public RunTestComponentsUpdate enableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + return this; + } + + /** + * Get enableToolEvaluation + * @return enableToolEvaluation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableToolEvaluation() { + return enableToolEvaluation; + } + + + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnableToolEvaluation(@javax.annotation.Nullable Boolean enableToolEvaluation) { + this.enableToolEvaluation = enableToolEvaluation; + } + + + /** + * Return true if this RunTestComponentsUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestComponentsUpdate runTestComponentsUpdate = (RunTestComponentsUpdate) o; + return Objects.equals(this.agentDefinitionId, runTestComponentsUpdate.agentDefinitionId) && + Objects.equals(this.version, runTestComponentsUpdate.version) && + Objects.equals(this.simulatorAgentId, runTestComponentsUpdate.simulatorAgentId) && + Objects.equals(this.scenarios, runTestComponentsUpdate.scenarios) && + Objects.equals(this.enableToolEvaluation, runTestComponentsUpdate.enableToolEvaluation); + } + + @Override + public int hashCode() { + return Objects.hash(agentDefinitionId, version, simulatorAgentId, scenarios, enableToolEvaluation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestComponentsUpdate {\n"); + sb.append(" agentDefinitionId: ").append(toIndentedString(agentDefinitionId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" simulatorAgentId: ").append(toIndentedString(simulatorAgentId)).append("\n"); + sb.append(" scenarios: ").append(toIndentedString(scenarios)).append("\n"); + sb.append(" enableToolEvaluation: ").append(toIndentedString(enableToolEvaluation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `agent_definition_id` to the URL query string + if (getAgentDefinitionId() != null) { + joiner.add(String.format("%sagent_definition_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionId())))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `simulator_agent_id` to the URL query string + if (getSimulatorAgentId() != null) { + joiner.add(String.format("%ssimulator_agent_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulatorAgentId())))); + } + + // add `scenarios` to the URL query string + if (getScenarios() != null) { + for (int i = 0; i < getScenarios().size(); i++) { + if (getScenarios().get(i) != null) { + joiner.add(String.format("%sscenarios%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarios().get(i))))); + } + } + } + + // add `enable_tool_evaluation` to the URL query string + if (getEnableToolEvaluation() != null) { + joiner.add(String.format("%senable_tool_evaluation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnableToolEvaluation())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestErrorResponse.java new file mode 100644 index 0000000..7ff1639 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestErrorResponse + */ +@JsonPropertyOrder({ + RunTestErrorResponse.JSON_PROPERTY_STATUS, + RunTestErrorResponse.JSON_PROPERTY_TYPE, + RunTestErrorResponse.JSON_PROPERTY_CODE, + RunTestErrorResponse.JSON_PROPERTY_DETAIL, + RunTestErrorResponse.JSON_PROPERTY_RESULT, + RunTestErrorResponse.JSON_PROPERTY_MESSAGE, + RunTestErrorResponse.JSON_PROPERTY_ERROR, + RunTestErrorResponse.JSON_PROPERTY_ATTR, + RunTestErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public RunTestErrorResponse() { + } + + public RunTestErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public RunTestErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public RunTestErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public RunTestErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public RunTestErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public RunTestErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public RunTestErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public RunTestErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public RunTestErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public RunTestErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this RunTestErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestErrorResponse runTestErrorResponse = (RunTestErrorResponse) o; + return Objects.equals(this.status, runTestErrorResponse.status) && + equalsNullable(this.type, runTestErrorResponse.type) && + equalsNullable(this.code, runTestErrorResponse.code) && + equalsNullable(this.detail, runTestErrorResponse.detail) && + equalsNullable(this.result, runTestErrorResponse.result) && + equalsNullable(this.message, runTestErrorResponse.message) && + equalsNullable(this.error, runTestErrorResponse.error) && + equalsNullable(this.attr, runTestErrorResponse.attr) && + Objects.equals(this.details, runTestErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestExecutionResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestExecutionResponse.java new file mode 100644 index 0000000..c727191 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestExecutionResponse.java @@ -0,0 +1,326 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestExecutionResponse + */ +@JsonPropertyOrder({ + RunTestExecutionResponse.JSON_PROPERTY_MESSAGE, + RunTestExecutionResponse.JSON_PROPERTY_EXECUTION_ID, + RunTestExecutionResponse.JSON_PROPERTY_RUN_TEST_ID, + RunTestExecutionResponse.JSON_PROPERTY_STATUS, + RunTestExecutionResponse.JSON_PROPERTY_TOTAL_SCENARIOS, + RunTestExecutionResponse.JSON_PROPERTY_TOTAL_CALLS, + RunTestExecutionResponse.JSON_PROPERTY_SCENARIO_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestExecutionResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nullable + private UUID executionId; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nullable + private UUID runTestId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_TOTAL_SCENARIOS = "total_scenarios"; + @javax.annotation.Nullable + private Integer totalScenarios; + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nullable + private List scenarioIds = new ArrayList<>(); + + public RunTestExecutionResponse() { + } + + @JsonCreator + public RunTestExecutionResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) UUID executionId, + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) UUID runTestId, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) Integer totalScenarios, + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) Integer totalCalls, + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) List scenarioIds + ) { + this(); + this.message = message; + this.executionId = executionId; + this.runTestId = runTestId; + this.status = status; + this.totalScenarios = totalScenarios; + this.totalCalls = totalCalls; + this.scenarioIds = scenarioIds; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExecutionId() { + return executionId; + } + + + + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getRunTestId() { + return runTestId; + } + + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + /** + * Get totalScenarios + * @return totalScenarios + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalScenarios() { + return totalScenarios; + } + + + + + /** + * Get totalCalls + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScenarioIds() { + return scenarioIds; + } + + + + + /** + * Return true if this RunTestExecutionResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestExecutionResponse runTestExecutionResponse = (RunTestExecutionResponse) o; + return Objects.equals(this.message, runTestExecutionResponse.message) && + Objects.equals(this.executionId, runTestExecutionResponse.executionId) && + Objects.equals(this.runTestId, runTestExecutionResponse.runTestId) && + Objects.equals(this.status, runTestExecutionResponse.status) && + Objects.equals(this.totalScenarios, runTestExecutionResponse.totalScenarios) && + Objects.equals(this.totalCalls, runTestExecutionResponse.totalCalls) && + Objects.equals(this.scenarioIds, runTestExecutionResponse.scenarioIds); + } + + @Override + public int hashCode() { + return Objects.hash(message, executionId, runTestId, status, totalScenarios, totalCalls, scenarioIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestExecutionResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalScenarios: ").append(toIndentedString(totalScenarios)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `total_scenarios` to the URL query string + if (getTotalScenarios() != null) { + joiner.add(String.format("%stotal_scenarios%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalScenarios())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestKPIsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestKPIsResponse.java new file mode 100644 index 0000000..3dc7ad7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestKPIsResponse.java @@ -0,0 +1,940 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestKPIsResponse + */ +@JsonPropertyOrder({ + RunTestKPIsResponse.JSON_PROPERTY_TOTAL_CALLS, + RunTestKPIsResponse.JSON_PROPERTY_AVG_SCORE, + RunTestKPIsResponse.JSON_PROPERTY_AVG_RESPONSE, + RunTestKPIsResponse.JSON_PROPERTY_CALLS_ATTEMPTED, + RunTestKPIsResponse.JSON_PROPERTY_CONNECTED_CALLS, + RunTestKPIsResponse.JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE, + RunTestKPIsResponse.JSON_PROPERTY_SCENARIO_GRAPHS, + RunTestKPIsResponse.JSON_PROPERTY_AGENT_TYPE, + RunTestKPIsResponse.JSON_PROPERTY_IS_INBOUND, + RunTestKPIsResponse.JSON_PROPERTY_AVG_AGENT_LATENCY, + RunTestKPIsResponse.JSON_PROPERTY_AVG_USER_INTERRUPTION_COUNT, + RunTestKPIsResponse.JSON_PROPERTY_AVG_USER_INTERRUPTION_RATE, + RunTestKPIsResponse.JSON_PROPERTY_AVG_USER_WPM, + RunTestKPIsResponse.JSON_PROPERTY_AVG_BOT_WPM, + RunTestKPIsResponse.JSON_PROPERTY_AVG_TALK_RATIO, + RunTestKPIsResponse.JSON_PROPERTY_AVG_AI_INTERRUPTION_COUNT, + RunTestKPIsResponse.JSON_PROPERTY_AVG_AI_INTERRUPTION_RATE, + RunTestKPIsResponse.JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION, + RunTestKPIsResponse.JSON_PROPERTY_AGENT_TALK_PERCENTAGE, + RunTestKPIsResponse.JSON_PROPERTY_CUSTOMER_TALK_PERCENTAGE, + RunTestKPIsResponse.JSON_PROPERTY_AVG_TOTAL_TOKENS, + RunTestKPIsResponse.JSON_PROPERTY_AVG_INPUT_TOKENS, + RunTestKPIsResponse.JSON_PROPERTY_AVG_OUTPUT_TOKENS, + RunTestKPIsResponse.JSON_PROPERTY_AVG_CHAT_LATENCY_MS, + RunTestKPIsResponse.JSON_PROPERTY_AVG_TURN_COUNT, + RunTestKPIsResponse.JSON_PROPERTY_AVG_CSAT_SCORE, + RunTestKPIsResponse.JSON_PROPERTY_FAILED_CALLS, + RunTestKPIsResponse.JSON_PROPERTY_TOTAL_DURATION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestKPIsResponse { + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_AVG_SCORE = "avg_score"; + @javax.annotation.Nullable + private BigDecimal avgScore; + + public static final String JSON_PROPERTY_AVG_RESPONSE = "avg_response"; + @javax.annotation.Nullable + private BigDecimal avgResponse; + + public static final String JSON_PROPERTY_CALLS_ATTEMPTED = "calls_attempted"; + @javax.annotation.Nullable + private Integer callsAttempted; + + public static final String JSON_PROPERTY_CONNECTED_CALLS = "connected_calls"; + @javax.annotation.Nullable + private Integer connectedCalls; + + public static final String JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE = "calls_connected_percentage"; + @javax.annotation.Nullable + private BigDecimal callsConnectedPercentage; + + public static final String JSON_PROPERTY_SCENARIO_GRAPHS = "scenario_graphs"; + @javax.annotation.Nullable + private Map>> scenarioGraphs = new HashMap<>(); + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private String agentType; + + public static final String JSON_PROPERTY_IS_INBOUND = "is_inbound"; + private JsonNullable isInbound = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AVG_AGENT_LATENCY = "avg_agent_latency"; + @javax.annotation.Nullable + private BigDecimal avgAgentLatency; + + public static final String JSON_PROPERTY_AVG_USER_INTERRUPTION_COUNT = "avg_user_interruption_count"; + @javax.annotation.Nullable + private BigDecimal avgUserInterruptionCount; + + public static final String JSON_PROPERTY_AVG_USER_INTERRUPTION_RATE = "avg_user_interruption_rate"; + @javax.annotation.Nullable + private BigDecimal avgUserInterruptionRate; + + public static final String JSON_PROPERTY_AVG_USER_WPM = "avg_user_wpm"; + @javax.annotation.Nullable + private BigDecimal avgUserWpm; + + public static final String JSON_PROPERTY_AVG_BOT_WPM = "avg_bot_wpm"; + @javax.annotation.Nullable + private BigDecimal avgBotWpm; + + public static final String JSON_PROPERTY_AVG_TALK_RATIO = "avg_talk_ratio"; + @javax.annotation.Nullable + private BigDecimal avgTalkRatio; + + public static final String JSON_PROPERTY_AVG_AI_INTERRUPTION_COUNT = "avg_ai_interruption_count"; + @javax.annotation.Nullable + private BigDecimal avgAiInterruptionCount; + + public static final String JSON_PROPERTY_AVG_AI_INTERRUPTION_RATE = "avg_ai_interruption_rate"; + @javax.annotation.Nullable + private BigDecimal avgAiInterruptionRate; + + public static final String JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION = "avg_stop_time_after_interruption"; + @javax.annotation.Nullable + private BigDecimal avgStopTimeAfterInterruption; + + public static final String JSON_PROPERTY_AGENT_TALK_PERCENTAGE = "agent_talk_percentage"; + @javax.annotation.Nullable + private BigDecimal agentTalkPercentage; + + public static final String JSON_PROPERTY_CUSTOMER_TALK_PERCENTAGE = "customer_talk_percentage"; + @javax.annotation.Nullable + private BigDecimal customerTalkPercentage; + + public static final String JSON_PROPERTY_AVG_TOTAL_TOKENS = "avg_total_tokens"; + @javax.annotation.Nullable + private BigDecimal avgTotalTokens; + + public static final String JSON_PROPERTY_AVG_INPUT_TOKENS = "avg_input_tokens"; + @javax.annotation.Nullable + private BigDecimal avgInputTokens; + + public static final String JSON_PROPERTY_AVG_OUTPUT_TOKENS = "avg_output_tokens"; + @javax.annotation.Nullable + private BigDecimal avgOutputTokens; + + public static final String JSON_PROPERTY_AVG_CHAT_LATENCY_MS = "avg_chat_latency_ms"; + @javax.annotation.Nullable + private BigDecimal avgChatLatencyMs; + + public static final String JSON_PROPERTY_AVG_TURN_COUNT = "avg_turn_count"; + @javax.annotation.Nullable + private BigDecimal avgTurnCount; + + public static final String JSON_PROPERTY_AVG_CSAT_SCORE = "avg_csat_score"; + @javax.annotation.Nullable + private BigDecimal avgCsatScore; + + public static final String JSON_PROPERTY_FAILED_CALLS = "failed_calls"; + @javax.annotation.Nullable + private Integer failedCalls; + + public static final String JSON_PROPERTY_TOTAL_DURATION = "total_duration"; + @javax.annotation.Nullable + private BigDecimal totalDuration; + + public RunTestKPIsResponse() { + } + + @JsonCreator + public RunTestKPIsResponse( + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) Integer totalCalls, + @JsonProperty(JSON_PROPERTY_AVG_SCORE) BigDecimal avgScore, + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE) BigDecimal avgResponse, + @JsonProperty(JSON_PROPERTY_CALLS_ATTEMPTED) Integer callsAttempted, + @JsonProperty(JSON_PROPERTY_CONNECTED_CALLS) Integer connectedCalls, + @JsonProperty(JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE) BigDecimal callsConnectedPercentage, + @JsonProperty(JSON_PROPERTY_SCENARIO_GRAPHS) Map>> scenarioGraphs, + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) String agentType, + @JsonProperty(JSON_PROPERTY_IS_INBOUND) Boolean isInbound, + @JsonProperty(JSON_PROPERTY_AVG_AGENT_LATENCY) BigDecimal avgAgentLatency, + @JsonProperty(JSON_PROPERTY_AVG_USER_INTERRUPTION_COUNT) BigDecimal avgUserInterruptionCount, + @JsonProperty(JSON_PROPERTY_AVG_USER_INTERRUPTION_RATE) BigDecimal avgUserInterruptionRate, + @JsonProperty(JSON_PROPERTY_AVG_USER_WPM) BigDecimal avgUserWpm, + @JsonProperty(JSON_PROPERTY_AVG_BOT_WPM) BigDecimal avgBotWpm, + @JsonProperty(JSON_PROPERTY_AVG_TALK_RATIO) BigDecimal avgTalkRatio, + @JsonProperty(JSON_PROPERTY_AVG_AI_INTERRUPTION_COUNT) BigDecimal avgAiInterruptionCount, + @JsonProperty(JSON_PROPERTY_AVG_AI_INTERRUPTION_RATE) BigDecimal avgAiInterruptionRate, + @JsonProperty(JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION) BigDecimal avgStopTimeAfterInterruption, + @JsonProperty(JSON_PROPERTY_AGENT_TALK_PERCENTAGE) BigDecimal agentTalkPercentage, + @JsonProperty(JSON_PROPERTY_CUSTOMER_TALK_PERCENTAGE) BigDecimal customerTalkPercentage, + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) BigDecimal avgTotalTokens, + @JsonProperty(JSON_PROPERTY_AVG_INPUT_TOKENS) BigDecimal avgInputTokens, + @JsonProperty(JSON_PROPERTY_AVG_OUTPUT_TOKENS) BigDecimal avgOutputTokens, + @JsonProperty(JSON_PROPERTY_AVG_CHAT_LATENCY_MS) BigDecimal avgChatLatencyMs, + @JsonProperty(JSON_PROPERTY_AVG_TURN_COUNT) BigDecimal avgTurnCount, + @JsonProperty(JSON_PROPERTY_AVG_CSAT_SCORE) BigDecimal avgCsatScore, + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) Integer failedCalls, + @JsonProperty(JSON_PROPERTY_TOTAL_DURATION) BigDecimal totalDuration + ) { + this(); + this.totalCalls = totalCalls; + this.avgScore = avgScore; + this.avgResponse = avgResponse; + this.callsAttempted = callsAttempted; + this.connectedCalls = connectedCalls; + this.callsConnectedPercentage = callsConnectedPercentage; + this.scenarioGraphs = scenarioGraphs; + this.agentType = agentType; + this.isInbound = isInbound == null ? JsonNullable.undefined() : JsonNullable.of(isInbound); + this.avgAgentLatency = avgAgentLatency; + this.avgUserInterruptionCount = avgUserInterruptionCount; + this.avgUserInterruptionRate = avgUserInterruptionRate; + this.avgUserWpm = avgUserWpm; + this.avgBotWpm = avgBotWpm; + this.avgTalkRatio = avgTalkRatio; + this.avgAiInterruptionCount = avgAiInterruptionCount; + this.avgAiInterruptionRate = avgAiInterruptionRate; + this.avgStopTimeAfterInterruption = avgStopTimeAfterInterruption; + this.agentTalkPercentage = agentTalkPercentage; + this.customerTalkPercentage = customerTalkPercentage; + this.avgTotalTokens = avgTotalTokens; + this.avgInputTokens = avgInputTokens; + this.avgOutputTokens = avgOutputTokens; + this.avgChatLatencyMs = avgChatLatencyMs; + this.avgTurnCount = avgTurnCount; + this.avgCsatScore = avgCsatScore; + this.failedCalls = failedCalls; + this.totalDuration = totalDuration; + } + + /** + * Get totalCalls + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + + + /** + * Get avgScore + * @return avgScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgScore() { + return avgScore; + } + + + + + /** + * Get avgResponse + * @return avgResponse + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgResponse() { + return avgResponse; + } + + + + + /** + * Get callsAttempted + * @return callsAttempted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS_ATTEMPTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCallsAttempted() { + return callsAttempted; + } + + + + + /** + * Get connectedCalls + * @return connectedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONNECTED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConnectedCalls() { + return connectedCalls; + } + + + + + /** + * Get callsConnectedPercentage + * @return callsConnectedPercentage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getCallsConnectedPercentage() { + return callsConnectedPercentage; + } + + + + + /** + * Get scenarioGraphs + * @return scenarioGraphs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_GRAPHS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map>> getScenarioGraphs() { + return scenarioGraphs; + } + + + + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentType() { + return agentType; + } + + + + + /** + * Get isInbound + * @return isInbound + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getIsInbound() { + + if (isInbound == null) { + isInbound = JsonNullable.undefined(); + } + return isInbound.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsInbound_JsonNullable() { + return isInbound; + } + + @JsonProperty(JSON_PROPERTY_IS_INBOUND) + private void setIsInbound_JsonNullable(JsonNullable isInbound) { + this.isInbound = isInbound; + } + + + + /** + * Get avgAgentLatency + * @return avgAgentLatency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_AGENT_LATENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgAgentLatency() { + return avgAgentLatency; + } + + + + + /** + * Get avgUserInterruptionCount + * @return avgUserInterruptionCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_USER_INTERRUPTION_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgUserInterruptionCount() { + return avgUserInterruptionCount; + } + + + + + /** + * Get avgUserInterruptionRate + * @return avgUserInterruptionRate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_USER_INTERRUPTION_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgUserInterruptionRate() { + return avgUserInterruptionRate; + } + + + + + /** + * Get avgUserWpm + * @return avgUserWpm + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_USER_WPM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgUserWpm() { + return avgUserWpm; + } + + + + + /** + * Get avgBotWpm + * @return avgBotWpm + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_BOT_WPM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgBotWpm() { + return avgBotWpm; + } + + + + + /** + * Get avgTalkRatio + * @return avgTalkRatio + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_TALK_RATIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgTalkRatio() { + return avgTalkRatio; + } + + + + + /** + * Get avgAiInterruptionCount + * @return avgAiInterruptionCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_AI_INTERRUPTION_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgAiInterruptionCount() { + return avgAiInterruptionCount; + } + + + + + /** + * Get avgAiInterruptionRate + * @return avgAiInterruptionRate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_AI_INTERRUPTION_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgAiInterruptionRate() { + return avgAiInterruptionRate; + } + + + + + /** + * Get avgStopTimeAfterInterruption + * @return avgStopTimeAfterInterruption + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_STOP_TIME_AFTER_INTERRUPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgStopTimeAfterInterruption() { + return avgStopTimeAfterInterruption; + } + + + + + /** + * Get agentTalkPercentage + * @return agentTalkPercentage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TALK_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAgentTalkPercentage() { + return agentTalkPercentage; + } + + + + + /** + * Get customerTalkPercentage + * @return customerTalkPercentage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_TALK_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getCustomerTalkPercentage() { + return customerTalkPercentage; + } + + + + + /** + * Get avgTotalTokens + * @return avgTotalTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgTotalTokens() { + return avgTotalTokens; + } + + + + + /** + * Get avgInputTokens + * @return avgInputTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgInputTokens() { + return avgInputTokens; + } + + + + + /** + * Get avgOutputTokens + * @return avgOutputTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgOutputTokens() { + return avgOutputTokens; + } + + + + + /** + * Get avgChatLatencyMs + * @return avgChatLatencyMs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_CHAT_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgChatLatencyMs() { + return avgChatLatencyMs; + } + + + + + /** + * Get avgTurnCount + * @return avgTurnCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_TURN_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgTurnCount() { + return avgTurnCount; + } + + + + + /** + * Get avgCsatScore + * @return avgCsatScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_CSAT_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgCsatScore() { + return avgCsatScore; + } + + + + + /** + * Get failedCalls + * @return failedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailedCalls() { + return failedCalls; + } + + + + + /** + * Get totalDuration + * @return totalDuration + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getTotalDuration() { + return totalDuration; + } + + + + + /** + * Return true if this RunTestKPIsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestKPIsResponse runTestKPIsResponse = (RunTestKPIsResponse) o; + return Objects.equals(this.totalCalls, runTestKPIsResponse.totalCalls) && + Objects.equals(this.avgScore, runTestKPIsResponse.avgScore) && + Objects.equals(this.avgResponse, runTestKPIsResponse.avgResponse) && + Objects.equals(this.callsAttempted, runTestKPIsResponse.callsAttempted) && + Objects.equals(this.connectedCalls, runTestKPIsResponse.connectedCalls) && + Objects.equals(this.callsConnectedPercentage, runTestKPIsResponse.callsConnectedPercentage) && + Objects.equals(this.scenarioGraphs, runTestKPIsResponse.scenarioGraphs) && + Objects.equals(this.agentType, runTestKPIsResponse.agentType) && + equalsNullable(this.isInbound, runTestKPIsResponse.isInbound) && + Objects.equals(this.avgAgentLatency, runTestKPIsResponse.avgAgentLatency) && + Objects.equals(this.avgUserInterruptionCount, runTestKPIsResponse.avgUserInterruptionCount) && + Objects.equals(this.avgUserInterruptionRate, runTestKPIsResponse.avgUserInterruptionRate) && + Objects.equals(this.avgUserWpm, runTestKPIsResponse.avgUserWpm) && + Objects.equals(this.avgBotWpm, runTestKPIsResponse.avgBotWpm) && + Objects.equals(this.avgTalkRatio, runTestKPIsResponse.avgTalkRatio) && + Objects.equals(this.avgAiInterruptionCount, runTestKPIsResponse.avgAiInterruptionCount) && + Objects.equals(this.avgAiInterruptionRate, runTestKPIsResponse.avgAiInterruptionRate) && + Objects.equals(this.avgStopTimeAfterInterruption, runTestKPIsResponse.avgStopTimeAfterInterruption) && + Objects.equals(this.agentTalkPercentage, runTestKPIsResponse.agentTalkPercentage) && + Objects.equals(this.customerTalkPercentage, runTestKPIsResponse.customerTalkPercentage) && + Objects.equals(this.avgTotalTokens, runTestKPIsResponse.avgTotalTokens) && + Objects.equals(this.avgInputTokens, runTestKPIsResponse.avgInputTokens) && + Objects.equals(this.avgOutputTokens, runTestKPIsResponse.avgOutputTokens) && + Objects.equals(this.avgChatLatencyMs, runTestKPIsResponse.avgChatLatencyMs) && + Objects.equals(this.avgTurnCount, runTestKPIsResponse.avgTurnCount) && + Objects.equals(this.avgCsatScore, runTestKPIsResponse.avgCsatScore) && + Objects.equals(this.failedCalls, runTestKPIsResponse.failedCalls) && + Objects.equals(this.totalDuration, runTestKPIsResponse.totalDuration); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(totalCalls, avgScore, avgResponse, callsAttempted, connectedCalls, callsConnectedPercentage, scenarioGraphs, agentType, hashCodeNullable(isInbound), avgAgentLatency, avgUserInterruptionCount, avgUserInterruptionRate, avgUserWpm, avgBotWpm, avgTalkRatio, avgAiInterruptionCount, avgAiInterruptionRate, avgStopTimeAfterInterruption, agentTalkPercentage, customerTalkPercentage, avgTotalTokens, avgInputTokens, avgOutputTokens, avgChatLatencyMs, avgTurnCount, avgCsatScore, failedCalls, totalDuration); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestKPIsResponse {\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" avgScore: ").append(toIndentedString(avgScore)).append("\n"); + sb.append(" avgResponse: ").append(toIndentedString(avgResponse)).append("\n"); + sb.append(" callsAttempted: ").append(toIndentedString(callsAttempted)).append("\n"); + sb.append(" connectedCalls: ").append(toIndentedString(connectedCalls)).append("\n"); + sb.append(" callsConnectedPercentage: ").append(toIndentedString(callsConnectedPercentage)).append("\n"); + sb.append(" scenarioGraphs: ").append(toIndentedString(scenarioGraphs)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" isInbound: ").append(toIndentedString(isInbound)).append("\n"); + sb.append(" avgAgentLatency: ").append(toIndentedString(avgAgentLatency)).append("\n"); + sb.append(" avgUserInterruptionCount: ").append(toIndentedString(avgUserInterruptionCount)).append("\n"); + sb.append(" avgUserInterruptionRate: ").append(toIndentedString(avgUserInterruptionRate)).append("\n"); + sb.append(" avgUserWpm: ").append(toIndentedString(avgUserWpm)).append("\n"); + sb.append(" avgBotWpm: ").append(toIndentedString(avgBotWpm)).append("\n"); + sb.append(" avgTalkRatio: ").append(toIndentedString(avgTalkRatio)).append("\n"); + sb.append(" avgAiInterruptionCount: ").append(toIndentedString(avgAiInterruptionCount)).append("\n"); + sb.append(" avgAiInterruptionRate: ").append(toIndentedString(avgAiInterruptionRate)).append("\n"); + sb.append(" avgStopTimeAfterInterruption: ").append(toIndentedString(avgStopTimeAfterInterruption)).append("\n"); + sb.append(" agentTalkPercentage: ").append(toIndentedString(agentTalkPercentage)).append("\n"); + sb.append(" customerTalkPercentage: ").append(toIndentedString(customerTalkPercentage)).append("\n"); + sb.append(" avgTotalTokens: ").append(toIndentedString(avgTotalTokens)).append("\n"); + sb.append(" avgInputTokens: ").append(toIndentedString(avgInputTokens)).append("\n"); + sb.append(" avgOutputTokens: ").append(toIndentedString(avgOutputTokens)).append("\n"); + sb.append(" avgChatLatencyMs: ").append(toIndentedString(avgChatLatencyMs)).append("\n"); + sb.append(" avgTurnCount: ").append(toIndentedString(avgTurnCount)).append("\n"); + sb.append(" avgCsatScore: ").append(toIndentedString(avgCsatScore)).append("\n"); + sb.append(" failedCalls: ").append(toIndentedString(failedCalls)).append("\n"); + sb.append(" totalDuration: ").append(toIndentedString(totalDuration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `avg_score` to the URL query string + if (getAvgScore() != null) { + joiner.add(String.format("%savg_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgScore())))); + } + + // add `avg_response` to the URL query string + if (getAvgResponse() != null) { + joiner.add(String.format("%savg_response%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgResponse())))); + } + + // add `calls_attempted` to the URL query string + if (getCallsAttempted() != null) { + joiner.add(String.format("%scalls_attempted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallsAttempted())))); + } + + // add `connected_calls` to the URL query string + if (getConnectedCalls() != null) { + joiner.add(String.format("%sconnected_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConnectedCalls())))); + } + + // add `calls_connected_percentage` to the URL query string + if (getCallsConnectedPercentage() != null) { + joiner.add(String.format("%scalls_connected_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallsConnectedPercentage())))); + } + + // add `scenario_graphs` to the URL query string + if (getScenarioGraphs() != null) { + for (String _key : getScenarioGraphs().keySet()) { + joiner.add(String.format("%sscenario_graphs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getScenarioGraphs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getScenarioGraphs().get(_key))))); + } + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `is_inbound` to the URL query string + if (getIsInbound() != null) { + joiner.add(String.format("%sis_inbound%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsInbound())))); + } + + // add `avg_agent_latency` to the URL query string + if (getAvgAgentLatency() != null) { + joiner.add(String.format("%savg_agent_latency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgAgentLatency())))); + } + + // add `avg_user_interruption_count` to the URL query string + if (getAvgUserInterruptionCount() != null) { + joiner.add(String.format("%savg_user_interruption_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgUserInterruptionCount())))); + } + + // add `avg_user_interruption_rate` to the URL query string + if (getAvgUserInterruptionRate() != null) { + joiner.add(String.format("%savg_user_interruption_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgUserInterruptionRate())))); + } + + // add `avg_user_wpm` to the URL query string + if (getAvgUserWpm() != null) { + joiner.add(String.format("%savg_user_wpm%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgUserWpm())))); + } + + // add `avg_bot_wpm` to the URL query string + if (getAvgBotWpm() != null) { + joiner.add(String.format("%savg_bot_wpm%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgBotWpm())))); + } + + // add `avg_talk_ratio` to the URL query string + if (getAvgTalkRatio() != null) { + joiner.add(String.format("%savg_talk_ratio%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTalkRatio())))); + } + + // add `avg_ai_interruption_count` to the URL query string + if (getAvgAiInterruptionCount() != null) { + joiner.add(String.format("%savg_ai_interruption_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgAiInterruptionCount())))); + } + + // add `avg_ai_interruption_rate` to the URL query string + if (getAvgAiInterruptionRate() != null) { + joiner.add(String.format("%savg_ai_interruption_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgAiInterruptionRate())))); + } + + // add `avg_stop_time_after_interruption` to the URL query string + if (getAvgStopTimeAfterInterruption() != null) { + joiner.add(String.format("%savg_stop_time_after_interruption%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgStopTimeAfterInterruption())))); + } + + // add `agent_talk_percentage` to the URL query string + if (getAgentTalkPercentage() != null) { + joiner.add(String.format("%sagent_talk_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentTalkPercentage())))); + } + + // add `customer_talk_percentage` to the URL query string + if (getCustomerTalkPercentage() != null) { + joiner.add(String.format("%scustomer_talk_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomerTalkPercentage())))); + } + + // add `avg_total_tokens` to the URL query string + if (getAvgTotalTokens() != null) { + joiner.add(String.format("%savg_total_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTotalTokens())))); + } + + // add `avg_input_tokens` to the URL query string + if (getAvgInputTokens() != null) { + joiner.add(String.format("%savg_input_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgInputTokens())))); + } + + // add `avg_output_tokens` to the URL query string + if (getAvgOutputTokens() != null) { + joiner.add(String.format("%savg_output_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgOutputTokens())))); + } + + // add `avg_chat_latency_ms` to the URL query string + if (getAvgChatLatencyMs() != null) { + joiner.add(String.format("%savg_chat_latency_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgChatLatencyMs())))); + } + + // add `avg_turn_count` to the URL query string + if (getAvgTurnCount() != null) { + joiner.add(String.format("%savg_turn_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTurnCount())))); + } + + // add `avg_csat_score` to the URL query string + if (getAvgCsatScore() != null) { + joiner.add(String.format("%savg_csat_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgCsatScore())))); + } + + // add `failed_calls` to the URL query string + if (getFailedCalls() != null) { + joiner.add(String.format("%sfailed_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedCalls())))); + } + + // add `total_duration` to the URL query string + if (getTotalDuration() != null) { + joiner.add(String.format("%stotal_duration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalDuration())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestMessageResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestMessageResponse.java new file mode 100644 index 0000000..53dc2c3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestMessageResponse.java @@ -0,0 +1,149 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestMessageResponse + */ +@JsonPropertyOrder({ + RunTestMessageResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestMessageResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public RunTestMessageResponse() { + } + + @JsonCreator + public RunTestMessageResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Return true if this RunTestMessageResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestMessageResponse runTestMessageResponse = (RunTestMessageResponse) o; + return Objects.equals(this.message, runTestMessageResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestMessageResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResponse.java new file mode 100644 index 0000000..b3229f3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.RunTestNameResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestNameResponse + */ +@JsonPropertyOrder({ + RunTestNameResponse.JSON_PROPERTY_STATUS, + RunTestNameResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestNameResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private RunTestNameResult result; + + public RunTestNameResponse() { + } + + public RunTestNameResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public RunTestNameResponse result(@javax.annotation.Nonnull RunTestNameResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RunTestNameResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull RunTestNameResult result) { + this.result = result; + } + + + /** + * Return true if this RunTestNameResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestNameResponse runTestNameResponse = (RunTestNameResponse) o; + return Objects.equals(this.status, runTestNameResponse.status) && + Objects.equals(this.result, runTestNameResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestNameResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResult.java new file mode 100644 index 0000000..ee27e51 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestNameResult.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestNameResult + */ +@JsonPropertyOrder({ + RunTestNameResult.JSON_PROPERTY_RUN_TEST_ID, + RunTestNameResult.JSON_PROPERTY_RUN_TEST_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestNameResult { + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nonnull + private UUID runTestId; + + public static final String JSON_PROPERTY_RUN_TEST_NAME = "run_test_name"; + @javax.annotation.Nonnull + private String runTestName; + + public RunTestNameResult() { + } + + public RunTestNameResult runTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + return this; + } + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRunTestId() { + return runTestId; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestId(@javax.annotation.Nonnull UUID runTestId) { + this.runTestId = runTestId; + } + + + public RunTestNameResult runTestName(@javax.annotation.Nonnull String runTestName) { + this.runTestName = runTestName; + return this; + } + + /** + * Get runTestName + * @return runTestName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunTestName() { + return runTestName; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestName(@javax.annotation.Nonnull String runTestName) { + this.runTestName = runTestName; + } + + + /** + * Return true if this RunTestNameResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestNameResult runTestNameResult = (RunTestNameResult) o; + return Objects.equals(this.runTestId, runTestNameResult.runTestId) && + Objects.equals(this.runTestName, runTestNameResult.runTestName); + } + + @Override + public int hashCode() { + return Objects.hash(runTestId, runTestName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestNameResult {\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" runTestName: ").append(toIndentedString(runTestName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `run_test_name` to the URL query string + if (getRunTestName() != null) { + joiner.add(String.format("%srun_test_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestResponse.java new file mode 100644 index 0000000..f5070c3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestResponse.java @@ -0,0 +1,1095 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.futureagi.sdk.model.SimulateEvalConfigResponse; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestResponse + */ +@JsonPropertyOrder({ + RunTestResponse.JSON_PROPERTY_ID, + RunTestResponse.JSON_PROPERTY_NAME, + RunTestResponse.JSON_PROPERTY_DESCRIPTION, + RunTestResponse.JSON_PROPERTY_AGENT_DEFINITION, + RunTestResponse.JSON_PROPERTY_AGENT_VERSION, + RunTestResponse.JSON_PROPERTY_AGENT_DEFINITION_DETAIL, + RunTestResponse.JSON_PROPERTY_SOURCE_TYPE, + RunTestResponse.JSON_PROPERTY_SOURCE_TYPE_DISPLAY, + RunTestResponse.JSON_PROPERTY_PROMPT_TEMPLATE, + RunTestResponse.JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL, + RunTestResponse.JSON_PROPERTY_PROMPT_VERSION, + RunTestResponse.JSON_PROPERTY_PROMPT_VERSION_DETAIL, + RunTestResponse.JSON_PROPERTY_SCENARIOS, + RunTestResponse.JSON_PROPERTY_SCENARIOS_DETAIL, + RunTestResponse.JSON_PROPERTY_DATASET_ROW_IDS, + RunTestResponse.JSON_PROPERTY_SIMULATOR_AGENT, + RunTestResponse.JSON_PROPERTY_SIMULATOR_AGENT_DETAIL, + RunTestResponse.JSON_PROPERTY_SIMULATE_EVAL_CONFIGS, + RunTestResponse.JSON_PROPERTY_SIMULATE_EVAL_CONFIGS_DETAIL, + RunTestResponse.JSON_PROPERTY_EVALS_DETAIL, + RunTestResponse.JSON_PROPERTY_ORGANIZATION, + RunTestResponse.JSON_PROPERTY_ENABLE_TOOL_EVALUATION, + RunTestResponse.JSON_PROPERTY_CREATED_AT, + RunTestResponse.JSON_PROPERTY_UPDATED_AT, + RunTestResponse.JSON_PROPERTY_LAST_RUN_AT, + RunTestResponse.JSON_PROPERTY_DELETED, + RunTestResponse.JSON_PROPERTY_DELETED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_DEFINITION = "agent_definition"; + private JsonNullable agentDefinition = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + @javax.annotation.Nullable + private Map agentVersion = new HashMap<>(); + + public static final String JSON_PROPERTY_AGENT_DEFINITION_DETAIL = "agent_definition_detail"; + @javax.annotation.Nullable + private Map agentDefinitionDetail = new HashMap<>(); + + /** + * Source type for the test run: agent_definition or prompt + */ + public enum SourceTypeEnum { + AGENT_DEFINITION(String.valueOf("agent_definition")), + + PROMPT(String.valueOf("prompt")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nullable + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_SOURCE_TYPE_DISPLAY = "source_type_display"; + private JsonNullable sourceTypeDisplay = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_TEMPLATE = "prompt_template"; + private JsonNullable promptTemplate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL = "prompt_template_detail"; + @javax.annotation.Nullable + private Map promptTemplateDetail = new HashMap<>(); + + public static final String JSON_PROPERTY_PROMPT_VERSION = "prompt_version"; + private JsonNullable promptVersion = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_VERSION_DETAIL = "prompt_version_detail"; + @javax.annotation.Nullable + private Map promptVersionDetail = new HashMap<>(); + + public static final String JSON_PROPERTY_SCENARIOS = "scenarios"; + @javax.annotation.Nullable + private Set scenarios = new LinkedHashSet<>(); + + public static final String JSON_PROPERTY_SCENARIOS_DETAIL = "scenarios_detail"; + @javax.annotation.Nullable + private List> scenariosDetail = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_ROW_IDS = "dataset_row_ids"; + @javax.annotation.Nullable + private List datasetRowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SIMULATOR_AGENT = "simulator_agent"; + private JsonNullable simulatorAgent = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SIMULATOR_AGENT_DETAIL = "simulator_agent_detail"; + @javax.annotation.Nullable + private Map simulatorAgentDetail = new HashMap<>(); + + public static final String JSON_PROPERTY_SIMULATE_EVAL_CONFIGS = "simulate_eval_configs"; + @javax.annotation.Nullable + private Set simulateEvalConfigs = new LinkedHashSet<>(); + + public static final String JSON_PROPERTY_SIMULATE_EVAL_CONFIGS_DETAIL = "simulate_eval_configs_detail"; + @javax.annotation.Nullable + private List simulateEvalConfigsDetail = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVALS_DETAIL = "evals_detail"; + @javax.annotation.Nullable + private List evalsDetail = new ArrayList<>(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_ENABLE_TOOL_EVALUATION = "enable_tool_evaluation"; + @javax.annotation.Nullable + private Boolean enableToolEvaluation; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_LAST_RUN_AT = "last_run_at"; + private JsonNullable lastRunAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DELETED = "deleted"; + @javax.annotation.Nullable + private Boolean deleted; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + + public RunTestResponse() { + } + + @JsonCreator + public RunTestResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) UUID agentDefinition, + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) Map agentVersion, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_DETAIL) Map agentDefinitionDetail, + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) SourceTypeEnum sourceType, + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_DISPLAY) String sourceTypeDisplay, + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE) UUID promptTemplate, + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL) Map promptTemplateDetail, + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION) UUID promptVersion, + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_DETAIL) Map promptVersionDetail, + @JsonProperty(JSON_PROPERTY_SCENARIOS) Set scenarios, + @JsonProperty(JSON_PROPERTY_SCENARIOS_DETAIL) List> scenariosDetail, + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) List datasetRowIds, + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT) UUID simulatorAgent, + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_DETAIL) Map simulatorAgentDetail, + @JsonProperty(JSON_PROPERTY_SIMULATE_EVAL_CONFIGS) Set simulateEvalConfigs, + @JsonProperty(JSON_PROPERTY_SIMULATE_EVAL_CONFIGS_DETAIL) List simulateEvalConfigsDetail, + @JsonProperty(JSON_PROPERTY_EVALS_DETAIL) List evalsDetail, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) Boolean enableToolEvaluation, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_LAST_RUN_AT) OffsetDateTime lastRunAt, + @JsonProperty(JSON_PROPERTY_DELETED) Boolean deleted, + @JsonProperty(JSON_PROPERTY_DELETED_AT) OffsetDateTime deletedAt + ) { + this(); + this.id = id; + this.name = name; + this.description = description == null ? JsonNullable.undefined() : JsonNullable.of(description); + this.agentDefinition = agentDefinition == null ? JsonNullable.undefined() : JsonNullable.of(agentDefinition); + this.agentVersion = agentVersion; + this.agentDefinitionDetail = agentDefinitionDetail; + this.sourceType = sourceType; + this.sourceTypeDisplay = sourceTypeDisplay == null ? JsonNullable.undefined() : JsonNullable.of(sourceTypeDisplay); + this.promptTemplate = promptTemplate == null ? JsonNullable.undefined() : JsonNullable.of(promptTemplate); + this.promptTemplateDetail = promptTemplateDetail; + this.promptVersion = promptVersion == null ? JsonNullable.undefined() : JsonNullable.of(promptVersion); + this.promptVersionDetail = promptVersionDetail; + this.scenarios = scenarios; + this.scenariosDetail = scenariosDetail; + this.datasetRowIds = datasetRowIds; + this.simulatorAgent = simulatorAgent == null ? JsonNullable.undefined() : JsonNullable.of(simulatorAgent); + this.simulatorAgentDetail = simulatorAgentDetail; + this.simulateEvalConfigs = simulateEvalConfigs; + this.simulateEvalConfigsDetail = simulateEvalConfigsDetail; + this.evalsDetail = evalsDetail; + this.organization = organization; + this.enableToolEvaluation = enableToolEvaluation; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.lastRunAt = lastRunAt == null ? JsonNullable.undefined() : JsonNullable.of(lastRunAt); + this.deleted = deleted; + this.deletedAt = deletedAt == null ? JsonNullable.undefined() : JsonNullable.of(deletedAt); + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Name of the test run + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Description of the test run + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + + if (description == null) { + description = JsonNullable.undefined(); + } + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + private void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + + + /** + * Agent definition for this test run + * @return agentDefinition + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAgentDefinition() { + + if (agentDefinition == null) { + agentDefinition = JsonNullable.undefined(); + } + return agentDefinition.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentDefinition_JsonNullable() { + return agentDefinition; + } + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) + private void setAgentDefinition_JsonNullable(JsonNullable agentDefinition) { + this.agentDefinition = agentDefinition; + } + + + + /** + * Get agentVersion + * @return agentVersion + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAgentVersion() { + return agentVersion; + } + + + + + /** + * Get agentDefinitionDetail + * @return agentDefinitionDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_DETAIL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getAgentDefinitionDetail() { + return agentDefinitionDetail; + } + + + + + /** + * Source type for the test run: agent_definition or prompt + * @return sourceType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + + + /** + * Get sourceTypeDisplay + * @return sourceTypeDisplay + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSourceTypeDisplay() { + + if (sourceTypeDisplay == null) { + sourceTypeDisplay = JsonNullable.undefined(); + } + return sourceTypeDisplay.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSourceTypeDisplay_JsonNullable() { + return sourceTypeDisplay; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_DISPLAY) + private void setSourceTypeDisplay_JsonNullable(JsonNullable sourceTypeDisplay) { + this.sourceTypeDisplay = sourceTypeDisplay; + } + + + + /** + * Prompt template for this test run (only for prompt source type) + * @return promptTemplate + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptTemplate() { + + if (promptTemplate == null) { + promptTemplate = JsonNullable.undefined(); + } + return promptTemplate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptTemplate_JsonNullable() { + return promptTemplate; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE) + private void setPromptTemplate_JsonNullable(JsonNullable promptTemplate) { + this.promptTemplate = promptTemplate; + } + + + + /** + * Get promptTemplateDetail + * @return promptTemplateDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPromptTemplateDetail() { + return promptTemplateDetail; + } + + + + + /** + * Prompt version for this test run (only for prompt source type) + * @return promptVersion + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptVersion() { + + if (promptVersion == null) { + promptVersion = JsonNullable.undefined(); + } + return promptVersion.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptVersion_JsonNullable() { + return promptVersion; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION) + private void setPromptVersion_JsonNullable(JsonNullable promptVersion) { + this.promptVersion = promptVersion; + } + + + + /** + * Get promptVersionDetail + * @return promptVersionDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_DETAIL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPromptVersionDetail() { + return promptVersionDetail; + } + + + + + /** + * Scenarios to run in this test + * @return scenarios + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getScenarios() { + return scenarios; + } + + + + + /** + * Get scenariosDetail + * @return scenariosDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIOS_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getScenariosDetail() { + return scenariosDetail; + } + + + + + /** + * IDs of dataset rows to run evaluations on + * @return datasetRowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasetRowIds() { + return datasetRowIds; + } + + + + + /** + * Simulator agent for this test run (derived from scenarios) + * @return simulatorAgent + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getSimulatorAgent() { + + if (simulatorAgent == null) { + simulatorAgent = JsonNullable.undefined(); + } + return simulatorAgent.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSimulatorAgent_JsonNullable() { + return simulatorAgent; + } + + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT) + private void setSimulatorAgent_JsonNullable(JsonNullable simulatorAgent) { + this.simulatorAgent = simulatorAgent; + } + + + + /** + * Get simulatorAgentDetail + * @return simulatorAgentDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_DETAIL) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSimulatorAgentDetail() { + return simulatorAgentDetail; + } + + + + + /** + * Get simulateEvalConfigs + * @return simulateEvalConfigs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATE_EVAL_CONFIGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getSimulateEvalConfigs() { + return simulateEvalConfigs; + } + + + + + /** + * Get simulateEvalConfigsDetail + * @return simulateEvalConfigsDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATE_EVAL_CONFIGS_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSimulateEvalConfigsDetail() { + return simulateEvalConfigsDetail; + } + + + + + /** + * Get evalsDetail + * @return evalsDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALS_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvalsDetail() { + return evalsDetail; + } + + + + + /** + * Organization this test run belongs to + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Enable automatic tool evaluation for this test run + * @return enableToolEvaluation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_TOOL_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableToolEvaluation() { + return enableToolEvaluation; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Get lastRunAt + * @return lastRunAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getLastRunAt() { + + if (lastRunAt == null) { + lastRunAt = JsonNullable.undefined(); + } + return lastRunAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_RUN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastRunAt_JsonNullable() { + return lastRunAt; + } + + @JsonProperty(JSON_PROPERTY_LAST_RUN_AT) + private void setLastRunAt_JsonNullable(JsonNullable lastRunAt) { + this.lastRunAt = lastRunAt; + } + + + + /** + * Get deleted + * @return deleted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeleted() { + return deleted; + } + + + + + /** + * Get deletedAt + * @return deletedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + + if (deletedAt == null) { + deletedAt = JsonNullable.undefined(); + } + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + private void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + + + /** + * Return true if this RunTestResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestResponse runTestResponse = (RunTestResponse) o; + return Objects.equals(this.id, runTestResponse.id) && + Objects.equals(this.name, runTestResponse.name) && + equalsNullable(this.description, runTestResponse.description) && + equalsNullable(this.agentDefinition, runTestResponse.agentDefinition) && + Objects.equals(this.agentVersion, runTestResponse.agentVersion) && + Objects.equals(this.agentDefinitionDetail, runTestResponse.agentDefinitionDetail) && + Objects.equals(this.sourceType, runTestResponse.sourceType) && + equalsNullable(this.sourceTypeDisplay, runTestResponse.sourceTypeDisplay) && + equalsNullable(this.promptTemplate, runTestResponse.promptTemplate) && + Objects.equals(this.promptTemplateDetail, runTestResponse.promptTemplateDetail) && + equalsNullable(this.promptVersion, runTestResponse.promptVersion) && + Objects.equals(this.promptVersionDetail, runTestResponse.promptVersionDetail) && + Objects.equals(this.scenarios, runTestResponse.scenarios) && + Objects.equals(this.scenariosDetail, runTestResponse.scenariosDetail) && + Objects.equals(this.datasetRowIds, runTestResponse.datasetRowIds) && + equalsNullable(this.simulatorAgent, runTestResponse.simulatorAgent) && + Objects.equals(this.simulatorAgentDetail, runTestResponse.simulatorAgentDetail) && + Objects.equals(this.simulateEvalConfigs, runTestResponse.simulateEvalConfigs) && + Objects.equals(this.simulateEvalConfigsDetail, runTestResponse.simulateEvalConfigsDetail) && + Objects.equals(this.evalsDetail, runTestResponse.evalsDetail) && + Objects.equals(this.organization, runTestResponse.organization) && + Objects.equals(this.enableToolEvaluation, runTestResponse.enableToolEvaluation) && + Objects.equals(this.createdAt, runTestResponse.createdAt) && + Objects.equals(this.updatedAt, runTestResponse.updatedAt) && + equalsNullable(this.lastRunAt, runTestResponse.lastRunAt) && + Objects.equals(this.deleted, runTestResponse.deleted) && + equalsNullable(this.deletedAt, runTestResponse.deletedAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(description), hashCodeNullable(agentDefinition), agentVersion, agentDefinitionDetail, sourceType, hashCodeNullable(sourceTypeDisplay), hashCodeNullable(promptTemplate), promptTemplateDetail, hashCodeNullable(promptVersion), promptVersionDetail, scenarios, scenariosDetail, datasetRowIds, hashCodeNullable(simulatorAgent), simulatorAgentDetail, simulateEvalConfigs, simulateEvalConfigsDetail, evalsDetail, organization, enableToolEvaluation, createdAt, updatedAt, hashCodeNullable(lastRunAt), deleted, hashCodeNullable(deletedAt)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" agentDefinition: ").append(toIndentedString(agentDefinition)).append("\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" agentDefinitionDetail: ").append(toIndentedString(agentDefinitionDetail)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceTypeDisplay: ").append(toIndentedString(sourceTypeDisplay)).append("\n"); + sb.append(" promptTemplate: ").append(toIndentedString(promptTemplate)).append("\n"); + sb.append(" promptTemplateDetail: ").append(toIndentedString(promptTemplateDetail)).append("\n"); + sb.append(" promptVersion: ").append(toIndentedString(promptVersion)).append("\n"); + sb.append(" promptVersionDetail: ").append(toIndentedString(promptVersionDetail)).append("\n"); + sb.append(" scenarios: ").append(toIndentedString(scenarios)).append("\n"); + sb.append(" scenariosDetail: ").append(toIndentedString(scenariosDetail)).append("\n"); + sb.append(" datasetRowIds: ").append(toIndentedString(datasetRowIds)).append("\n"); + sb.append(" simulatorAgent: ").append(toIndentedString(simulatorAgent)).append("\n"); + sb.append(" simulatorAgentDetail: ").append(toIndentedString(simulatorAgentDetail)).append("\n"); + sb.append(" simulateEvalConfigs: ").append(toIndentedString(simulateEvalConfigs)).append("\n"); + sb.append(" simulateEvalConfigsDetail: ").append(toIndentedString(simulateEvalConfigsDetail)).append("\n"); + sb.append(" evalsDetail: ").append(toIndentedString(evalsDetail)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" enableToolEvaluation: ").append(toIndentedString(enableToolEvaluation)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" lastRunAt: ").append(toIndentedString(lastRunAt)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `agent_definition` to the URL query string + if (getAgentDefinition() != null) { + joiner.add(String.format("%sagent_definition%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinition())))); + } + + // add `agent_version` to the URL query string + if (getAgentVersion() != null) { + for (String _key : getAgentVersion().keySet()) { + joiner.add(String.format("%sagent_version%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAgentVersion().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAgentVersion().get(_key))))); + } + } + + // add `agent_definition_detail` to the URL query string + if (getAgentDefinitionDetail() != null) { + for (String _key : getAgentDefinitionDetail().keySet()) { + joiner.add(String.format("%sagent_definition_detail%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAgentDefinitionDetail().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionDetail().get(_key))))); + } + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_type_display` to the URL query string + if (getSourceTypeDisplay() != null) { + joiner.add(String.format("%ssource_type_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceTypeDisplay())))); + } + + // add `prompt_template` to the URL query string + if (getPromptTemplate() != null) { + joiner.add(String.format("%sprompt_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptTemplate())))); + } + + // add `prompt_template_detail` to the URL query string + if (getPromptTemplateDetail() != null) { + for (String _key : getPromptTemplateDetail().keySet()) { + joiner.add(String.format("%sprompt_template_detail%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getPromptTemplateDetail().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getPromptTemplateDetail().get(_key))))); + } + } + + // add `prompt_version` to the URL query string + if (getPromptVersion() != null) { + joiner.add(String.format("%sprompt_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptVersion())))); + } + + // add `prompt_version_detail` to the URL query string + if (getPromptVersionDetail() != null) { + for (String _key : getPromptVersionDetail().keySet()) { + joiner.add(String.format("%sprompt_version_detail%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getPromptVersionDetail().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getPromptVersionDetail().get(_key))))); + } + } + + // add `scenarios` to the URL query string + if (getScenarios() != null) { + int i = 0; + for (UUID _item : getScenarios()) { + if (_item != null) { + joiner.add(String.format("%sscenarios%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(_item)))); + } + i++; + } + } + + // add `scenarios_detail` to the URL query string + if (getScenariosDetail() != null) { + for (int i = 0; i < getScenariosDetail().size(); i++) { + joiner.add(String.format("%sscenarios_detail%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenariosDetail().get(i))))); + } + } + + // add `dataset_row_ids` to the URL query string + if (getDatasetRowIds() != null) { + for (int i = 0; i < getDatasetRowIds().size(); i++) { + joiner.add(String.format("%sdataset_row_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetRowIds().get(i))))); + } + } + + // add `simulator_agent` to the URL query string + if (getSimulatorAgent() != null) { + joiner.add(String.format("%ssimulator_agent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulatorAgent())))); + } + + // add `simulator_agent_detail` to the URL query string + if (getSimulatorAgentDetail() != null) { + for (String _key : getSimulatorAgentDetail().keySet()) { + joiner.add(String.format("%ssimulator_agent_detail%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSimulatorAgentDetail().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSimulatorAgentDetail().get(_key))))); + } + } + + // add `simulate_eval_configs` to the URL query string + if (getSimulateEvalConfigs() != null) { + int i = 0; + for (UUID _item : getSimulateEvalConfigs()) { + if (_item != null) { + joiner.add(String.format("%ssimulate_eval_configs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(_item)))); + } + i++; + } + } + + // add `simulate_eval_configs_detail` to the URL query string + if (getSimulateEvalConfigsDetail() != null) { + for (int i = 0; i < getSimulateEvalConfigsDetail().size(); i++) { + if (getSimulateEvalConfigsDetail().get(i) != null) { + joiner.add(getSimulateEvalConfigsDetail().get(i).toUrlQueryString(String.format("%ssimulate_eval_configs_detail%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `evals_detail` to the URL query string + if (getEvalsDetail() != null) { + for (int i = 0; i < getEvalsDetail().size(); i++) { + if (getEvalsDetail().get(i) != null) { + joiner.add(getEvalsDetail().get(i).toUrlQueryString(String.format("%sevals_detail%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `enable_tool_evaluation` to the URL query string + if (getEnableToolEvaluation() != null) { + joiner.add(String.format("%senable_tool_evaluation%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnableToolEvaluation())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `last_run_at` to the URL query string + if (getLastRunAt() != null) { + joiner.add(String.format("%slast_run_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastRunAt())))); + } + + // add `deleted` to the URL query string + if (getDeleted() != null) { + joiner.add(String.format("%sdeleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeleted())))); + } + + // add `deleted_at` to the URL query string + if (getDeletedAt() != null) { + joiner.add(String.format("%sdeleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeletedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestScenarioItemResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestScenarioItemResponse.java new file mode 100644 index 0000000..79fe476 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/RunTestScenarioItemResponse.java @@ -0,0 +1,205 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * RunTestScenarioItemResponse + */ +@JsonPropertyOrder({ + RunTestScenarioItemResponse.JSON_PROPERTY_ID, + RunTestScenarioItemResponse.JSON_PROPERTY_NAME, + RunTestScenarioItemResponse.JSON_PROPERTY_ROW_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class RunTestScenarioItemResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_ROW_COUNT = "row_count"; + @javax.annotation.Nullable + private Integer rowCount; + + public RunTestScenarioItemResponse() { + } + + @JsonCreator + public RunTestScenarioItemResponse( + @JsonProperty(JSON_PROPERTY_ID) String id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_ROW_COUNT) Integer rowCount + ) { + this(); + this.id = id; + this.name = name; + this.rowCount = rowCount; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Get rowCount + * @return rowCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRowCount() { + return rowCount; + } + + + + + /** + * Return true if this RunTestScenarioItemResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunTestScenarioItemResponse runTestScenarioItemResponse = (RunTestScenarioItemResponse) o; + return Objects.equals(this.id, runTestScenarioItemResponse.id) && + Objects.equals(this.name, runTestScenarioItemResponse.name) && + Objects.equals(this.rowCount, runTestScenarioItemResponse.rowCount); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, rowCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunTestScenarioItemResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rowCount: ").append(toIndentedString(rowCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `row_count` to the URL query string + if (getRowCount() != null) { + joiner.add(String.format("%srow_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRowCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAccepted.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAccepted.java new file mode 100644 index 0000000..79f07e2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAccepted.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKCICDEvaluationRunAccepted + */ +@JsonPropertyOrder({ + SDKCICDEvaluationRunAccepted.JSON_PROPERTY_MESSAGE, + SDKCICDEvaluationRunAccepted.JSON_PROPERTY_PROJECT_NAME, + SDKCICDEvaluationRunAccepted.JSON_PROPERTY_VERSION, + SDKCICDEvaluationRunAccepted.JSON_PROPERTY_EVALUATION_RUN_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKCICDEvaluationRunAccepted { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_PROJECT_NAME = "project_name"; + @javax.annotation.Nonnull + private String projectName; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nonnull + private String version; + + public static final String JSON_PROPERTY_EVALUATION_RUN_ID = "evaluation_run_id"; + @javax.annotation.Nonnull + private UUID evaluationRunId; + + public SDKCICDEvaluationRunAccepted() { + } + + public SDKCICDEvaluationRunAccepted message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public SDKCICDEvaluationRunAccepted projectName(@javax.annotation.Nonnull String projectName) { + this.projectName = projectName; + return this; + } + + /** + * Get projectName + * @return projectName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProjectName() { + return projectName; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectName(@javax.annotation.Nonnull String projectName) { + this.projectName = projectName; + } + + + public SDKCICDEvaluationRunAccepted version(@javax.annotation.Nonnull String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersion(@javax.annotation.Nonnull String version) { + this.version = version; + } + + + public SDKCICDEvaluationRunAccepted evaluationRunId(@javax.annotation.Nonnull UUID evaluationRunId) { + this.evaluationRunId = evaluationRunId; + return this; + } + + /** + * Get evaluationRunId + * @return evaluationRunId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATION_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getEvaluationRunId() { + return evaluationRunId; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluationRunId(@javax.annotation.Nonnull UUID evaluationRunId) { + this.evaluationRunId = evaluationRunId; + } + + + /** + * Return true if this SDKCICDEvaluationRunAccepted object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKCICDEvaluationRunAccepted sdKCICDEvaluationRunAccepted = (SDKCICDEvaluationRunAccepted) o; + return Objects.equals(this.message, sdKCICDEvaluationRunAccepted.message) && + Objects.equals(this.projectName, sdKCICDEvaluationRunAccepted.projectName) && + Objects.equals(this.version, sdKCICDEvaluationRunAccepted.version) && + Objects.equals(this.evaluationRunId, sdKCICDEvaluationRunAccepted.evaluationRunId); + } + + @Override + public int hashCode() { + return Objects.hash(message, projectName, version, evaluationRunId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKCICDEvaluationRunAccepted {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" evaluationRunId: ").append(toIndentedString(evaluationRunId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `project_name` to the URL query string + if (getProjectName() != null) { + joiner.add(String.format("%sproject_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectName())))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `evaluation_run_id` to the URL query string + if (getEvaluationRunId() != null) { + joiner.add(String.format("%sevaluation_run_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvaluationRunId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAcceptedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAcceptedResponse.java new file mode 100644 index 0000000..a1f537a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunAcceptedResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKCICDEvaluationRunAccepted; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKCICDEvaluationRunAcceptedResponse + */ +@JsonPropertyOrder({ + SDKCICDEvaluationRunAcceptedResponse.JSON_PROPERTY_STATUS, + SDKCICDEvaluationRunAcceptedResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKCICDEvaluationRunAcceptedResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKCICDEvaluationRunAccepted result; + + public SDKCICDEvaluationRunAcceptedResponse() { + } + + public SDKCICDEvaluationRunAcceptedResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKCICDEvaluationRunAcceptedResponse result(@javax.annotation.Nonnull SDKCICDEvaluationRunAccepted result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKCICDEvaluationRunAccepted getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKCICDEvaluationRunAccepted result) { + this.result = result; + } + + + /** + * Return true if this SDKCICDEvaluationRunAcceptedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKCICDEvaluationRunAcceptedResponse sdKCICDEvaluationRunAcceptedResponse = (SDKCICDEvaluationRunAcceptedResponse) o; + return Objects.equals(this.status, sdKCICDEvaluationRunAcceptedResponse.status) && + Objects.equals(this.result, sdKCICDEvaluationRunAcceptedResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKCICDEvaluationRunAcceptedResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunSummary.java new file mode 100644 index 0000000..f025be3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunSummary.java @@ -0,0 +1,274 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKCICDEvaluationRunSummary + */ +@JsonPropertyOrder({ + SDKCICDEvaluationRunSummary.JSON_PROPERTY_ID, + SDKCICDEvaluationRunSummary.JSON_PROPERTY_PROJECT, + SDKCICDEvaluationRunSummary.JSON_PROPERTY_VERSION, + SDKCICDEvaluationRunSummary.JSON_PROPERTY_RESULTS_SUMMARY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKCICDEvaluationRunSummary { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_PROJECT = "project"; + @javax.annotation.Nonnull + private String project; + + public static final String JSON_PROPERTY_VERSION = "version"; + @javax.annotation.Nonnull + private String version; + + public static final String JSON_PROPERTY_RESULTS_SUMMARY = "results_summary"; + @javax.annotation.Nonnull + private Map resultsSummary = new HashMap<>(); + + public SDKCICDEvaluationRunSummary() { + } + + public SDKCICDEvaluationRunSummary id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public SDKCICDEvaluationRunSummary project(@javax.annotation.Nonnull String project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProject() { + return project; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProject(@javax.annotation.Nonnull String project) { + this.project = project; + } + + + public SDKCICDEvaluationRunSummary version(@javax.annotation.Nonnull String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersion(@javax.annotation.Nonnull String version) { + this.version = version; + } + + + public SDKCICDEvaluationRunSummary resultsSummary(@javax.annotation.Nonnull Map resultsSummary) { + this.resultsSummary = resultsSummary; + return this; + } + + public SDKCICDEvaluationRunSummary putResultsSummaryItem(String key, String resultsSummaryItem) { + if (this.resultsSummary == null) { + this.resultsSummary = new HashMap<>(); + } + this.resultsSummary.put(key, resultsSummaryItem); + return this; + } + + /** + * Get resultsSummary + * @return resultsSummary + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getResultsSummary() { + return resultsSummary; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setResultsSummary(@javax.annotation.Nonnull Map resultsSummary) { + this.resultsSummary = resultsSummary; + } + + + /** + * Return true if this SDKCICDEvaluationRunSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKCICDEvaluationRunSummary sdKCICDEvaluationRunSummary = (SDKCICDEvaluationRunSummary) o; + return Objects.equals(this.id, sdKCICDEvaluationRunSummary.id) && + Objects.equals(this.project, sdKCICDEvaluationRunSummary.project) && + Objects.equals(this.version, sdKCICDEvaluationRunSummary.version) && + Objects.equals(this.resultsSummary, sdKCICDEvaluationRunSummary.resultsSummary); + } + + @Override + public int hashCode() { + return Objects.hash(id, project, version, resultsSummary); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKCICDEvaluationRunSummary {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" resultsSummary: ").append(toIndentedString(resultsSummary)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(String.format("%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `results_summary` to the URL query string + if (getResultsSummary() != null) { + for (String _key : getResultsSummary().keySet()) { + joiner.add(String.format("%sresults_summary%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResultsSummary().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResultsSummary().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResponse.java new file mode 100644 index 0000000..6ed7bfb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKCICDEvaluationRunsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKCICDEvaluationRunsResponse + */ +@JsonPropertyOrder({ + SDKCICDEvaluationRunsResponse.JSON_PROPERTY_STATUS, + SDKCICDEvaluationRunsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKCICDEvaluationRunsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKCICDEvaluationRunsResult result; + + public SDKCICDEvaluationRunsResponse() { + } + + public SDKCICDEvaluationRunsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKCICDEvaluationRunsResponse result(@javax.annotation.Nonnull SDKCICDEvaluationRunsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKCICDEvaluationRunsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKCICDEvaluationRunsResult result) { + this.result = result; + } + + + /** + * Return true if this SDKCICDEvaluationRunsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKCICDEvaluationRunsResponse sdKCICDEvaluationRunsResponse = (SDKCICDEvaluationRunsResponse) o; + return Objects.equals(this.status, sdKCICDEvaluationRunsResponse.status) && + Objects.equals(this.result, sdKCICDEvaluationRunsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKCICDEvaluationRunsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResult.java new file mode 100644 index 0000000..ad3e34e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKCICDEvaluationRunsResult.java @@ -0,0 +1,274 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKCICDEvaluationRunSummary; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKCICDEvaluationRunsResult + */ +@JsonPropertyOrder({ + SDKCICDEvaluationRunsResult.JSON_PROPERTY_MESSAGE, + SDKCICDEvaluationRunsResult.JSON_PROPERTY_STATUS, + SDKCICDEvaluationRunsResult.JSON_PROPERTY_EVALUATION_RUNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKCICDEvaluationRunsResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PROCESSING(String.valueOf("processing")), + + COMPLETED(String.valueOf("completed")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private StatusEnum status; + + public static final String JSON_PROPERTY_EVALUATION_RUNS = "evaluation_runs"; + @javax.annotation.Nullable + private List evaluationRuns = new ArrayList<>(); + + public SDKCICDEvaluationRunsResult() { + } + + public SDKCICDEvaluationRunsResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public SDKCICDEvaluationRunsResult status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + + public SDKCICDEvaluationRunsResult evaluationRuns(@javax.annotation.Nullable List evaluationRuns) { + this.evaluationRuns = evaluationRuns; + return this; + } + + public SDKCICDEvaluationRunsResult addEvaluationRunsItem(SDKCICDEvaluationRunSummary evaluationRunsItem) { + if (this.evaluationRuns == null) { + this.evaluationRuns = new ArrayList<>(); + } + this.evaluationRuns.add(evaluationRunsItem); + return this; + } + + /** + * Get evaluationRuns + * @return evaluationRuns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION_RUNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvaluationRuns() { + return evaluationRuns; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_RUNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvaluationRuns(@javax.annotation.Nullable List evaluationRuns) { + this.evaluationRuns = evaluationRuns; + } + + + /** + * Return true if this SDKCICDEvaluationRunsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKCICDEvaluationRunsResult sdKCICDEvaluationRunsResult = (SDKCICDEvaluationRunsResult) o; + return Objects.equals(this.message, sdKCICDEvaluationRunsResult.message) && + Objects.equals(this.status, sdKCICDEvaluationRunsResult.status) && + Objects.equals(this.evaluationRuns, sdKCICDEvaluationRunsResult.evaluationRuns); + } + + @Override + public int hashCode() { + return Objects.hash(message, status, evaluationRuns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKCICDEvaluationRunsResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" evaluationRuns: ").append(toIndentedString(evaluationRuns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `evaluation_runs` to the URL query string + if (getEvaluationRuns() != null) { + for (int i = 0; i < getEvaluationRuns().size(); i++) { + if (getEvaluationRuns().get(i) != null) { + joiner.add(getEvaluationRuns().get(i).toUrlQueryString(String.format("%sevaluation_runs%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsRequest.java new file mode 100644 index 0000000..59e8ed3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsRequest.java @@ -0,0 +1,299 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ConfigureEvaluations; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKConfigureEvaluationsRequest + */ +@JsonPropertyOrder({ + SDKConfigureEvaluationsRequest.JSON_PROPERTY_EVAL_CONFIG, + SDKConfigureEvaluationsRequest.JSON_PROPERTY_PLATFORM, + SDKConfigureEvaluationsRequest.JSON_PROPERTY_CUSTOM_EVAL_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKConfigureEvaluationsRequest extends HashMap { + public static final String JSON_PROPERTY_EVAL_CONFIG = "eval_config"; + @javax.annotation.Nonnull + private ConfigureEvaluations evalConfig; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + @javax.annotation.Nonnull + private String platform; + + public static final String JSON_PROPERTY_CUSTOM_EVAL_NAME = "custom_eval_name"; + private JsonNullable customEvalName = JsonNullable.undefined(); + + public SDKConfigureEvaluationsRequest() { + } + + public SDKConfigureEvaluationsRequest evalConfig(@javax.annotation.Nonnull ConfigureEvaluations evalConfig) { + this.evalConfig = evalConfig; + return this; + } + + /** + * Get evalConfig + * @return evalConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConfigureEvaluations getEvalConfig() { + return evalConfig; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalConfig(@javax.annotation.Nonnull ConfigureEvaluations evalConfig) { + this.evalConfig = evalConfig; + } + + + public SDKConfigureEvaluationsRequest platform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPlatform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + } + + + public SDKConfigureEvaluationsRequest customEvalName(@javax.annotation.Nullable String customEvalName) { + this.customEvalName = JsonNullable.of(customEvalName); + return this; + } + + /** + * Get customEvalName + * @return customEvalName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCustomEvalName() { + return customEvalName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomEvalName_JsonNullable() { + return customEvalName; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_EVAL_NAME) + public void setCustomEvalName_JsonNullable(JsonNullable customEvalName) { + this.customEvalName = customEvalName; + } + + public void setCustomEvalName(@javax.annotation.Nullable String customEvalName) { + this.customEvalName = JsonNullable.of(customEvalName); + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public SDKConfigureEvaluationsRequest putAdditionalProperty(String key, Map value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Map getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SDKConfigureEvaluationsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKConfigureEvaluationsRequest sdKConfigureEvaluationsRequest = (SDKConfigureEvaluationsRequest) o; + return Objects.equals(this.evalConfig, sdKConfigureEvaluationsRequest.evalConfig) && + Objects.equals(this.platform, sdKConfigureEvaluationsRequest.platform) && + equalsNullable(this.customEvalName, sdKConfigureEvaluationsRequest.customEvalName)&& + Objects.equals(this.additionalProperties, sdKConfigureEvaluationsRequest.additionalProperties) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(evalConfig, platform, hashCodeNullable(customEvalName), super.hashCode(), additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKConfigureEvaluationsRequest {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" evalConfig: ").append(toIndentedString(evalConfig)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" customEvalName: ").append(toIndentedString(customEvalName)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_config` to the URL query string + if (getEvalConfig() != null) { + joiner.add(getEvalConfig().toUrlQueryString(prefix + "eval_config" + suffix)); + } + + // add `platform` to the URL query string + if (getPlatform() != null) { + joiner.add(String.format("%splatform%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPlatform())))); + } + + // add `custom_eval_name` to the URL query string + if (getCustomEvalName() != null) { + joiner.add(String.format("%scustom_eval_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomEvalName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsResponse.java new file mode 100644 index 0000000..9116e55 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKConfigureEvaluationsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKMessageResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKConfigureEvaluationsResponse + */ +@JsonPropertyOrder({ + SDKConfigureEvaluationsResponse.JSON_PROPERTY_STATUS, + SDKConfigureEvaluationsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKConfigureEvaluationsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKMessageResult result; + + public SDKConfigureEvaluationsResponse() { + } + + public SDKConfigureEvaluationsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKConfigureEvaluationsResponse result(@javax.annotation.Nonnull SDKMessageResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKMessageResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKMessageResult result) { + this.result = result; + } + + + /** + * Return true if this SDKConfigureEvaluationsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKConfigureEvaluationsResponse sdKConfigureEvaluationsResponse = (SDKConfigureEvaluationsResponse) o; + return Objects.equals(this.status, sdKConfigureEvaluationsResponse.status) && + Objects.equals(this.result, sdKConfigureEvaluationsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKConfigureEvaluationsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKErrorResponse.java new file mode 100644 index 0000000..65c7946 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKErrorResponse.java @@ -0,0 +1,303 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKErrorResponse + */ +@JsonPropertyOrder({ + SDKErrorResponse.JSON_PROPERTY_STATUS, + SDKErrorResponse.JSON_PROPERTY_RESULT, + SDKErrorResponse.JSON_PROPERTY_MESSAGE, + SDKErrorResponse.JSON_PROPERTY_ERRORS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERRORS = "errors"; + @javax.annotation.Nullable + private Map> errors = new HashMap<>(); + + public SDKErrorResponse() { + } + + public SDKErrorResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public SDKErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public SDKErrorResponse errors(@javax.annotation.Nullable Map> errors) { + this.errors = errors; + return this; + } + + public SDKErrorResponse putErrorsItem(String key, List errorsItem) { + if (this.errors == null) { + this.errors = new HashMap<>(); + } + this.errors.put(key, errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getErrors() { + return errors; + } + + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Map> errors) { + this.errors = errors; + } + + + /** + * Return true if this SDKErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKErrorResponse sdKErrorResponse = (SDKErrorResponse) o; + return Objects.equals(this.status, sdKErrorResponse.status) && + equalsNullable(this.result, sdKErrorResponse.result) && + equalsNullable(this.message, sdKErrorResponse.message) && + Objects.equals(this.errors, sdKErrorResponse.errors); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(result), hashCodeNullable(message), errors); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `errors` to the URL query string + if (getErrors() != null) { + for (String _key : getErrors().keySet()) { + joiner.add(String.format("%serrors%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getErrors().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getErrors().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplate.java new file mode 100644 index 0000000..4a48bd2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplate.java @@ -0,0 +1,583 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKEvalTemplate + */ +@JsonPropertyOrder({ + SDKEvalTemplate.JSON_PROPERTY_ID, + SDKEvalTemplate.JSON_PROPERTY_NAME, + SDKEvalTemplate.JSON_PROPERTY_DESCRIPTION, + SDKEvalTemplate.JSON_PROPERTY_ORGANIZATION, + SDKEvalTemplate.JSON_PROPERTY_OWNER, + SDKEvalTemplate.JSON_PROPERTY_EVAL_TAGS, + SDKEvalTemplate.JSON_PROPERTY_CONFIG, + SDKEvalTemplate.JSON_PROPERTY_EVAL_ID, + SDKEvalTemplate.JSON_PROPERTY_CRITERIA, + SDKEvalTemplate.JSON_PROPERTY_CHOICES, + SDKEvalTemplate.JSON_PROPERTY_MULTI_CHOICE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKEvalTemplate { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private String organization; + + public static final String JSON_PROPERTY_OWNER = "owner"; + @javax.annotation.Nullable + private String owner; + + public static final String JSON_PROPERTY_EVAL_TAGS = "eval_tags"; + @javax.annotation.Nullable + private Map evalTags = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_ID = "eval_id"; + @javax.annotation.Nullable + private String evalId; + + public static final String JSON_PROPERTY_CRITERIA = "criteria"; + @javax.annotation.Nullable + private Map criteria = new HashMap<>(); + + public static final String JSON_PROPERTY_CHOICES = "choices"; + @javax.annotation.Nullable + private Map choices = new HashMap<>(); + + public static final String JSON_PROPERTY_MULTI_CHOICE = "multi_choice"; + private JsonNullable multiChoice = JsonNullable.undefined(); + + public SDKEvalTemplate() { + } + + public SDKEvalTemplate id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public SDKEvalTemplate name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public SDKEvalTemplate description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public SDKEvalTemplate organization(@javax.annotation.Nullable String organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOrganization() { + return organization; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrganization(@javax.annotation.Nullable String organization) { + this.organization = organization; + } + + + public SDKEvalTemplate owner(@javax.annotation.Nullable String owner) { + this.owner = owner; + return this; + } + + /** + * Get owner + * @return owner + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOwner() { + return owner; + } + + + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOwner(@javax.annotation.Nullable String owner) { + this.owner = owner; + } + + + public SDKEvalTemplate evalTags(@javax.annotation.Nullable Map evalTags) { + this.evalTags = evalTags; + return this; + } + + public SDKEvalTemplate putEvalTagsItem(String key, Object evalTagsItem) { + if (this.evalTags == null) { + this.evalTags = new HashMap<>(); + } + this.evalTags.put(key, evalTagsItem); + return this; + } + + /** + * Get evalTags + * @return evalTags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TAGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvalTags() { + return evalTags; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TAGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalTags(@javax.annotation.Nullable Map evalTags) { + this.evalTags = evalTags; + } + + + public SDKEvalTemplate config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public SDKEvalTemplate putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + public SDKEvalTemplate evalId(@javax.annotation.Nullable String evalId) { + this.evalId = evalId; + return this; + } + + /** + * Get evalId + * @return evalId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalId() { + return evalId; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalId(@javax.annotation.Nullable String evalId) { + this.evalId = evalId; + } + + + public SDKEvalTemplate criteria(@javax.annotation.Nullable Map criteria) { + this.criteria = criteria; + return this; + } + + public SDKEvalTemplate putCriteriaItem(String key, Object criteriaItem) { + if (this.criteria == null) { + this.criteria = new HashMap<>(); + } + this.criteria.put(key, criteriaItem); + return this; + } + + /** + * Get criteria + * @return criteria + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CRITERIA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCriteria() { + return criteria; + } + + + @JsonProperty(JSON_PROPERTY_CRITERIA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCriteria(@javax.annotation.Nullable Map criteria) { + this.criteria = criteria; + } + + + public SDKEvalTemplate choices(@javax.annotation.Nullable Map choices) { + this.choices = choices; + return this; + } + + public SDKEvalTemplate putChoicesItem(String key, Object choicesItem) { + if (this.choices == null) { + this.choices = new HashMap<>(); + } + this.choices.put(key, choicesItem); + return this; + } + + /** + * Get choices + * @return choices + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChoices() { + return choices; + } + + + @JsonProperty(JSON_PROPERTY_CHOICES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChoices(@javax.annotation.Nullable Map choices) { + this.choices = choices; + } + + + public SDKEvalTemplate multiChoice(@javax.annotation.Nullable Boolean multiChoice) { + this.multiChoice = JsonNullable.of(multiChoice); + return this; + } + + /** + * Get multiChoice + * @return multiChoice + */ + @javax.annotation.Nullable + @JsonIgnore + public Boolean getMultiChoice() { + return multiChoice.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMultiChoice_JsonNullable() { + return multiChoice; + } + + @JsonProperty(JSON_PROPERTY_MULTI_CHOICE) + public void setMultiChoice_JsonNullable(JsonNullable multiChoice) { + this.multiChoice = multiChoice; + } + + public void setMultiChoice(@javax.annotation.Nullable Boolean multiChoice) { + this.multiChoice = JsonNullable.of(multiChoice); + } + + + /** + * Return true if this SDKEvalTemplate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKEvalTemplate sdKEvalTemplate = (SDKEvalTemplate) o; + return Objects.equals(this.id, sdKEvalTemplate.id) && + Objects.equals(this.name, sdKEvalTemplate.name) && + Objects.equals(this.description, sdKEvalTemplate.description) && + Objects.equals(this.organization, sdKEvalTemplate.organization) && + Objects.equals(this.owner, sdKEvalTemplate.owner) && + Objects.equals(this.evalTags, sdKEvalTemplate.evalTags) && + Objects.equals(this.config, sdKEvalTemplate.config) && + Objects.equals(this.evalId, sdKEvalTemplate.evalId) && + Objects.equals(this.criteria, sdKEvalTemplate.criteria) && + Objects.equals(this.choices, sdKEvalTemplate.choices) && + equalsNullable(this.multiChoice, sdKEvalTemplate.multiChoice); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, description, organization, owner, evalTags, config, evalId, criteria, choices, hashCodeNullable(multiChoice)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKEvalTemplate {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" evalTags: ").append(toIndentedString(evalTags)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" evalId: ").append(toIndentedString(evalId)).append("\n"); + sb.append(" criteria: ").append(toIndentedString(criteria)).append("\n"); + sb.append(" choices: ").append(toIndentedString(choices)).append("\n"); + sb.append(" multiChoice: ").append(toIndentedString(multiChoice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `owner` to the URL query string + if (getOwner() != null) { + joiner.add(String.format("%sowner%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOwner())))); + } + + // add `eval_tags` to the URL query string + if (getEvalTags() != null) { + for (String _key : getEvalTags().keySet()) { + joiner.add(String.format("%seval_tags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalTags().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalTags().get(_key))))); + } + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `eval_id` to the URL query string + if (getEvalId() != null) { + joiner.add(String.format("%seval_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalId())))); + } + + // add `criteria` to the URL query string + if (getCriteria() != null) { + for (String _key : getCriteria().keySet()) { + joiner.add(String.format("%scriteria%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCriteria().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCriteria().get(_key))))); + } + } + + // add `choices` to the URL query string + if (getChoices() != null) { + for (String _key : getChoices().keySet()) { + joiner.add(String.format("%schoices%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChoices().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChoices().get(_key))))); + } + } + + // add `multi_choice` to the URL query string + if (getMultiChoice() != null) { + joiner.add(String.format("%smulti_choice%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMultiChoice())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplateResponse.java new file mode 100644 index 0000000..84119e1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKEvalTemplateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKEvalTemplate; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKEvalTemplateResponse + */ +@JsonPropertyOrder({ + SDKEvalTemplateResponse.JSON_PROPERTY_STATUS, + SDKEvalTemplateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKEvalTemplateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKEvalTemplate result; + + public SDKEvalTemplateResponse() { + } + + public SDKEvalTemplateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKEvalTemplateResponse result(@javax.annotation.Nonnull SDKEvalTemplate result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKEvalTemplate getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKEvalTemplate result) { + this.result = result; + } + + + /** + * Return true if this SDKEvalTemplateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKEvalTemplateResponse sdKEvalTemplateResponse = (SDKEvalTemplateResponse) o; + return Objects.equals(this.status, sdKEvalTemplateResponse.status) && + Objects.equals(this.result, sdKEvalTemplateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKEvalTemplateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKGetEvalsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKGetEvalsResponse.java new file mode 100644 index 0000000..1fa4383 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKGetEvalsResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKEvalTemplate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKGetEvalsResponse + */ +@JsonPropertyOrder({ + SDKGetEvalsResponse.JSON_PROPERTY_STATUS, + SDKGetEvalsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKGetEvalsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public SDKGetEvalsResponse() { + } + + public SDKGetEvalsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKGetEvalsResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public SDKGetEvalsResponse addResultItem(SDKEvalTemplate resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + /** + * Return true if this SDKGetEvalsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKGetEvalsResponse sdKGetEvalsResponse = (SDKGetEvalsResponse) o; + return Objects.equals(this.status, sdKGetEvalsResponse.status) && + Objects.equals(this.result, sdKGetEvalsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKGetEvalsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKMessageResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKMessageResult.java new file mode 100644 index 0000000..dd5ec52 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKMessageResult.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKMessageResult + */ +@JsonPropertyOrder({ + SDKMessageResult.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKMessageResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public SDKMessageResult() { + } + + public SDKMessageResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this SDKMessageResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKMessageResult sdKMessageResult = (SDKMessageResult) o; + return Objects.equals(this.message, sdKMessageResult.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKMessageResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResponse.java new file mode 100644 index 0000000..99e4c61 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKSimulationAnalyticsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKSimulationAnalyticsResponse + */ +@JsonPropertyOrder({ + SDKSimulationAnalyticsResponse.JSON_PROPERTY_STATUS, + SDKSimulationAnalyticsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKSimulationAnalyticsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKSimulationAnalyticsResult result; + + public SDKSimulationAnalyticsResponse() { + } + + public SDKSimulationAnalyticsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKSimulationAnalyticsResponse result(@javax.annotation.Nonnull SDKSimulationAnalyticsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKSimulationAnalyticsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKSimulationAnalyticsResult result) { + this.result = result; + } + + + /** + * Return true if this SDKSimulationAnalyticsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKSimulationAnalyticsResponse sdKSimulationAnalyticsResponse = (SDKSimulationAnalyticsResponse) o; + return Objects.equals(this.status, sdKSimulationAnalyticsResponse.status) && + Objects.equals(this.result, sdKSimulationAnalyticsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKSimulationAnalyticsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResult.java new file mode 100644 index 0000000..29f32f7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationAnalyticsResult.java @@ -0,0 +1,514 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKSimulationAnalyticsResult + */ +@JsonPropertyOrder({ + SDKSimulationAnalyticsResult.JSON_PROPERTY_EXECUTION_ID, + SDKSimulationAnalyticsResult.JSON_PROPERTY_RUN_TEST_NAME, + SDKSimulationAnalyticsResult.JSON_PROPERTY_STATUS, + SDKSimulationAnalyticsResult.JSON_PROPERTY_MESSAGE, + SDKSimulationAnalyticsResult.JSON_PROPERTY_EVAL_RESULTS, + SDKSimulationAnalyticsResult.JSON_PROPERTY_EVAL_AVERAGES, + SDKSimulationAnalyticsResult.JSON_PROPERTY_SYSTEM_SUMMARY, + SDKSimulationAnalyticsResult.JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY, + SDKSimulationAnalyticsResult.JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKSimulationAnalyticsResult { + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nullable + private UUID executionId; + + public static final String JSON_PROPERTY_RUN_TEST_NAME = "run_test_name"; + @javax.annotation.Nonnull + private String runTestName; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_EVAL_RESULTS = "eval_results"; + @javax.annotation.Nonnull + private List> evalResults = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVAL_AVERAGES = "eval_averages"; + @javax.annotation.Nonnull + private Map evalAverages = new HashMap<>(); + + public static final String JSON_PROPERTY_SYSTEM_SUMMARY = "system_summary"; + @javax.annotation.Nonnull + private Map systemSummary = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY = "eval_explanation_summary"; + @javax.annotation.Nullable + private Map evalExplanationSummary = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS = "eval_explanation_summary_status"; + private JsonNullable evalExplanationSummaryStatus = JsonNullable.undefined(); + + public SDKSimulationAnalyticsResult() { + } + + public SDKSimulationAnalyticsResult executionId(@javax.annotation.Nullable UUID executionId) { + this.executionId = executionId; + return this; + } + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExecutionId() { + return executionId; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionId(@javax.annotation.Nullable UUID executionId) { + this.executionId = executionId; + } + + + public SDKSimulationAnalyticsResult runTestName(@javax.annotation.Nonnull String runTestName) { + this.runTestName = runTestName; + return this; + } + + /** + * Get runTestName + * @return runTestName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunTestName() { + return runTestName; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestName(@javax.annotation.Nonnull String runTestName) { + this.runTestName = runTestName; + } + + + public SDKSimulationAnalyticsResult status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public SDKSimulationAnalyticsResult message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + public SDKSimulationAnalyticsResult evalResults(@javax.annotation.Nonnull List> evalResults) { + this.evalResults = evalResults; + return this; + } + + public SDKSimulationAnalyticsResult addEvalResultsItem(Map evalResultsItem) { + if (this.evalResults == null) { + this.evalResults = new ArrayList<>(); + } + this.evalResults.add(evalResultsItem); + return this; + } + + /** + * Get evalResults + * @return evalResults + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvalResults() { + return evalResults; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalResults(@javax.annotation.Nonnull List> evalResults) { + this.evalResults = evalResults; + } + + + public SDKSimulationAnalyticsResult evalAverages(@javax.annotation.Nonnull Map evalAverages) { + this.evalAverages = evalAverages; + return this; + } + + public SDKSimulationAnalyticsResult putEvalAveragesItem(String key, Object evalAveragesItem) { + if (this.evalAverages == null) { + this.evalAverages = new HashMap<>(); + } + this.evalAverages.put(key, evalAveragesItem); + return this; + } + + /** + * Get evalAverages + * @return evalAverages + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_AVERAGES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getEvalAverages() { + return evalAverages; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_AVERAGES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setEvalAverages(@javax.annotation.Nonnull Map evalAverages) { + this.evalAverages = evalAverages; + } + + + public SDKSimulationAnalyticsResult systemSummary(@javax.annotation.Nonnull Map systemSummary) { + this.systemSummary = systemSummary; + return this; + } + + public SDKSimulationAnalyticsResult putSystemSummaryItem(String key, Object systemSummaryItem) { + if (this.systemSummary == null) { + this.systemSummary = new HashMap<>(); + } + this.systemSummary.put(key, systemSummaryItem); + return this; + } + + /** + * Get systemSummary + * @return systemSummary + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SYSTEM_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getSystemSummary() { + return systemSummary; + } + + + @JsonProperty(JSON_PROPERTY_SYSTEM_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setSystemSummary(@javax.annotation.Nonnull Map systemSummary) { + this.systemSummary = systemSummary; + } + + + public SDKSimulationAnalyticsResult evalExplanationSummary(@javax.annotation.Nullable Map evalExplanationSummary) { + this.evalExplanationSummary = evalExplanationSummary; + return this; + } + + public SDKSimulationAnalyticsResult putEvalExplanationSummaryItem(String key, Object evalExplanationSummaryItem) { + if (this.evalExplanationSummary == null) { + this.evalExplanationSummary = new HashMap<>(); + } + this.evalExplanationSummary.put(key, evalExplanationSummaryItem); + return this; + } + + /** + * Get evalExplanationSummary + * @return evalExplanationSummary + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvalExplanationSummary() { + return evalExplanationSummary; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalExplanationSummary(@javax.annotation.Nullable Map evalExplanationSummary) { + this.evalExplanationSummary = evalExplanationSummary; + } + + + public SDKSimulationAnalyticsResult evalExplanationSummaryStatus(@javax.annotation.Nullable String evalExplanationSummaryStatus) { + this.evalExplanationSummaryStatus = JsonNullable.of(evalExplanationSummaryStatus); + return this; + } + + /** + * Get evalExplanationSummaryStatus + * @return evalExplanationSummaryStatus + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalExplanationSummaryStatus() { + return evalExplanationSummaryStatus.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalExplanationSummaryStatus_JsonNullable() { + return evalExplanationSummaryStatus; + } + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS) + public void setEvalExplanationSummaryStatus_JsonNullable(JsonNullable evalExplanationSummaryStatus) { + this.evalExplanationSummaryStatus = evalExplanationSummaryStatus; + } + + public void setEvalExplanationSummaryStatus(@javax.annotation.Nullable String evalExplanationSummaryStatus) { + this.evalExplanationSummaryStatus = JsonNullable.of(evalExplanationSummaryStatus); + } + + + /** + * Return true if this SDKSimulationAnalyticsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKSimulationAnalyticsResult sdKSimulationAnalyticsResult = (SDKSimulationAnalyticsResult) o; + return Objects.equals(this.executionId, sdKSimulationAnalyticsResult.executionId) && + Objects.equals(this.runTestName, sdKSimulationAnalyticsResult.runTestName) && + Objects.equals(this.status, sdKSimulationAnalyticsResult.status) && + Objects.equals(this.message, sdKSimulationAnalyticsResult.message) && + Objects.equals(this.evalResults, sdKSimulationAnalyticsResult.evalResults) && + Objects.equals(this.evalAverages, sdKSimulationAnalyticsResult.evalAverages) && + Objects.equals(this.systemSummary, sdKSimulationAnalyticsResult.systemSummary) && + Objects.equals(this.evalExplanationSummary, sdKSimulationAnalyticsResult.evalExplanationSummary) && + equalsNullable(this.evalExplanationSummaryStatus, sdKSimulationAnalyticsResult.evalExplanationSummaryStatus); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(executionId, runTestName, status, message, evalResults, evalAverages, systemSummary, evalExplanationSummary, hashCodeNullable(evalExplanationSummaryStatus)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKSimulationAnalyticsResult {\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" runTestName: ").append(toIndentedString(runTestName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" evalResults: ").append(toIndentedString(evalResults)).append("\n"); + sb.append(" evalAverages: ").append(toIndentedString(evalAverages)).append("\n"); + sb.append(" systemSummary: ").append(toIndentedString(systemSummary)).append("\n"); + sb.append(" evalExplanationSummary: ").append(toIndentedString(evalExplanationSummary)).append("\n"); + sb.append(" evalExplanationSummaryStatus: ").append(toIndentedString(evalExplanationSummaryStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `run_test_name` to the URL query string + if (getRunTestName() != null) { + joiner.add(String.format("%srun_test_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestName())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `eval_results` to the URL query string + if (getEvalResults() != null) { + for (int i = 0; i < getEvalResults().size(); i++) { + joiner.add(String.format("%seval_results%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalResults().get(i))))); + } + } + + // add `eval_averages` to the URL query string + if (getEvalAverages() != null) { + for (String _key : getEvalAverages().keySet()) { + joiner.add(String.format("%seval_averages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalAverages().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalAverages().get(_key))))); + } + } + + // add `system_summary` to the URL query string + if (getSystemSummary() != null) { + for (String _key : getSystemSummary().keySet()) { + joiner.add(String.format("%ssystem_summary%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSystemSummary().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSystemSummary().get(_key))))); + } + } + + // add `eval_explanation_summary` to the URL query string + if (getEvalExplanationSummary() != null) { + for (String _key : getEvalExplanationSummary().keySet()) { + joiner.add(String.format("%seval_explanation_summary%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalExplanationSummary().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalExplanationSummary().get(_key))))); + } + } + + // add `eval_explanation_summary_status` to the URL query string + if (getEvalExplanationSummaryStatus() != null) { + joiner.add(String.format("%seval_explanation_summary_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalExplanationSummaryStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResponse.java new file mode 100644 index 0000000..196592e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKSimulationMetricsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKSimulationMetricsResponse + */ +@JsonPropertyOrder({ + SDKSimulationMetricsResponse.JSON_PROPERTY_STATUS, + SDKSimulationMetricsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKSimulationMetricsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKSimulationMetricsResult result; + + public SDKSimulationMetricsResponse() { + } + + public SDKSimulationMetricsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKSimulationMetricsResponse result(@javax.annotation.Nonnull SDKSimulationMetricsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKSimulationMetricsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKSimulationMetricsResult result) { + this.result = result; + } + + + /** + * Return true if this SDKSimulationMetricsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKSimulationMetricsResponse sdKSimulationMetricsResponse = (SDKSimulationMetricsResponse) o; + return Objects.equals(this.status, sdKSimulationMetricsResponse.status) && + Objects.equals(this.result, sdKSimulationMetricsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKSimulationMetricsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResult.java new file mode 100644 index 0000000..7a14ea6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationMetricsResult.java @@ -0,0 +1,880 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExecutionMetrics; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKSimulationMetricsResult + */ +@JsonPropertyOrder({ + SDKSimulationMetricsResult.JSON_PROPERTY_CALL_EXECUTION_ID, + SDKSimulationMetricsResult.JSON_PROPERTY_EXECUTION_ID, + SDKSimulationMetricsResult.JSON_PROPERTY_STATUS, + SDKSimulationMetricsResult.JSON_PROPERTY_DURATION_SECONDS, + SDKSimulationMetricsResult.JSON_PROPERTY_STARTED_AT, + SDKSimulationMetricsResult.JSON_PROPERTY_COMPLETED_AT, + SDKSimulationMetricsResult.JSON_PROPERTY_TOTAL_CALLS, + SDKSimulationMetricsResult.JSON_PROPERTY_COMPLETED_CALLS, + SDKSimulationMetricsResult.JSON_PROPERTY_FAILED_CALLS, + SDKSimulationMetricsResult.JSON_PROPERTY_LATENCY, + SDKSimulationMetricsResult.JSON_PROPERTY_COST, + SDKSimulationMetricsResult.JSON_PROPERTY_CONVERSATION, + SDKSimulationMetricsResult.JSON_PROPERTY_CHAT_METRICS, + SDKSimulationMetricsResult.JSON_PROPERTY_METRICS, + SDKSimulationMetricsResult.JSON_PROPERTY_TOTAL_PAGES, + SDKSimulationMetricsResult.JSON_PROPERTY_CURRENT_PAGE, + SDKSimulationMetricsResult.JSON_PROPERTY_COUNT, + SDKSimulationMetricsResult.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKSimulationMetricsResult { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nullable + private UUID callExecutionId; + + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nullable + private UUID executionId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_DURATION_SECONDS = "duration_seconds"; + private JsonNullable durationSeconds = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private JsonNullable startedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_COMPLETED_CALLS = "completed_calls"; + @javax.annotation.Nullable + private Integer completedCalls; + + public static final String JSON_PROPERTY_FAILED_CALLS = "failed_calls"; + @javax.annotation.Nullable + private Integer failedCalls; + + public static final String JSON_PROPERTY_LATENCY = "latency"; + @javax.annotation.Nullable + private Map latency = new HashMap<>(); + + public static final String JSON_PROPERTY_COST = "cost"; + @javax.annotation.Nullable + private Map cost = new HashMap<>(); + + public static final String JSON_PROPERTY_CONVERSATION = "conversation"; + @javax.annotation.Nullable + private Map conversation = new HashMap<>(); + + public static final String JSON_PROPERTY_CHAT_METRICS = "chat_metrics"; + @javax.annotation.Nullable + private Map chatMetrics = new HashMap<>(); + + public static final String JSON_PROPERTY_METRICS = "metrics"; + @javax.annotation.Nullable + private Map metrics = new HashMap<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_CURRENT_PAGE = "current_page"; + @javax.annotation.Nullable + private Integer currentPage; + + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public SDKSimulationMetricsResult() { + } + + public SDKSimulationMetricsResult callExecutionId(@javax.annotation.Nullable UUID callExecutionId) { + this.callExecutionId = callExecutionId; + return this; + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallExecutionId(@javax.annotation.Nullable UUID callExecutionId) { + this.callExecutionId = callExecutionId; + } + + + public SDKSimulationMetricsResult executionId(@javax.annotation.Nullable UUID executionId) { + this.executionId = executionId; + return this; + } + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExecutionId() { + return executionId; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionId(@javax.annotation.Nullable UUID executionId) { + this.executionId = executionId; + } + + + public SDKSimulationMetricsResult status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public SDKSimulationMetricsResult durationSeconds(@javax.annotation.Nullable BigDecimal durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + return this; + } + + /** + * Get durationSeconds + * @return durationSeconds + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getDurationSeconds() { + return durationSeconds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDurationSeconds_JsonNullable() { + return durationSeconds; + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + public void setDurationSeconds_JsonNullable(JsonNullable durationSeconds) { + this.durationSeconds = durationSeconds; + } + + public void setDurationSeconds(@javax.annotation.Nullable BigDecimal durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + } + + + public SDKSimulationMetricsResult startedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + return this; + } + + /** + * Get startedAt + * @return startedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getStartedAt() { + return startedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedAt_JsonNullable() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + public void setStartedAt_JsonNullable(JsonNullable startedAt) { + this.startedAt = startedAt; + } + + public void setStartedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + } + + + public SDKSimulationMetricsResult completedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Get completedAt + * @return completedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + + public SDKSimulationMetricsResult totalCalls(@javax.annotation.Nullable Integer totalCalls) { + this.totalCalls = totalCalls; + return this; + } + + /** + * Get totalCalls + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalCalls(@javax.annotation.Nullable Integer totalCalls) { + this.totalCalls = totalCalls; + } + + + public SDKSimulationMetricsResult completedCalls(@javax.annotation.Nullable Integer completedCalls) { + this.completedCalls = completedCalls; + return this; + } + + /** + * Get completedCalls + * @return completedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCompletedCalls() { + return completedCalls; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompletedCalls(@javax.annotation.Nullable Integer completedCalls) { + this.completedCalls = completedCalls; + } + + + public SDKSimulationMetricsResult failedCalls(@javax.annotation.Nullable Integer failedCalls) { + this.failedCalls = failedCalls; + return this; + } + + /** + * Get failedCalls + * @return failedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailedCalls() { + return failedCalls; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailedCalls(@javax.annotation.Nullable Integer failedCalls) { + this.failedCalls = failedCalls; + } + + + public SDKSimulationMetricsResult latency(@javax.annotation.Nullable Map latency) { + this.latency = latency; + return this; + } + + public SDKSimulationMetricsResult putLatencyItem(String key, Object latencyItem) { + if (this.latency == null) { + this.latency = new HashMap<>(); + } + this.latency.put(key, latencyItem); + return this; + } + + /** + * Get latency + * @return latency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LATENCY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLatency() { + return latency; + } + + + @JsonProperty(JSON_PROPERTY_LATENCY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setLatency(@javax.annotation.Nullable Map latency) { + this.latency = latency; + } + + + public SDKSimulationMetricsResult cost(@javax.annotation.Nullable Map cost) { + this.cost = cost; + return this; + } + + public SDKSimulationMetricsResult putCostItem(String key, Object costItem) { + if (this.cost == null) { + this.cost = new HashMap<>(); + } + this.cost.put(key, costItem); + return this; + } + + /** + * Get cost + * @return cost + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCost() { + return cost; + } + + + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCost(@javax.annotation.Nullable Map cost) { + this.cost = cost; + } + + + public SDKSimulationMetricsResult conversation(@javax.annotation.Nullable Map conversation) { + this.conversation = conversation; + return this; + } + + public SDKSimulationMetricsResult putConversationItem(String key, Object conversationItem) { + if (this.conversation == null) { + this.conversation = new HashMap<>(); + } + this.conversation.put(key, conversationItem); + return this; + } + + /** + * Get conversation + * @return conversation + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONVERSATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConversation() { + return conversation; + } + + + @JsonProperty(JSON_PROPERTY_CONVERSATION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConversation(@javax.annotation.Nullable Map conversation) { + this.conversation = conversation; + } + + + public SDKSimulationMetricsResult chatMetrics(@javax.annotation.Nullable Map chatMetrics) { + this.chatMetrics = chatMetrics; + return this; + } + + public SDKSimulationMetricsResult putChatMetricsItem(String key, Object chatMetricsItem) { + if (this.chatMetrics == null) { + this.chatMetrics = new HashMap<>(); + } + this.chatMetrics.put(key, chatMetricsItem); + return this; + } + + /** + * Get chatMetrics + * @return chatMetrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHAT_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getChatMetrics() { + return chatMetrics; + } + + + @JsonProperty(JSON_PROPERTY_CHAT_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setChatMetrics(@javax.annotation.Nullable Map chatMetrics) { + this.chatMetrics = chatMetrics; + } + + + public SDKSimulationMetricsResult metrics(@javax.annotation.Nullable Map metrics) { + this.metrics = metrics; + return this; + } + + public SDKSimulationMetricsResult putMetricsItem(String key, Object metricsItem) { + if (this.metrics == null) { + this.metrics = new HashMap<>(); + } + this.metrics.put(key, metricsItem); + return this; + } + + /** + * Get metrics + * @return metrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetrics() { + return metrics; + } + + + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetrics(@javax.annotation.Nullable Map metrics) { + this.metrics = metrics; + } + + + public SDKSimulationMetricsResult totalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + } + + + public SDKSimulationMetricsResult currentPage(@javax.annotation.Nullable Integer currentPage) { + this.currentPage = currentPage; + return this; + } + + /** + * Get currentPage + * @return currentPage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCurrentPage() { + return currentPage; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrentPage(@javax.annotation.Nullable Integer currentPage) { + this.currentPage = currentPage; + } + + + public SDKSimulationMetricsResult count(@javax.annotation.Nullable Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCount(@javax.annotation.Nullable Integer count) { + this.count = count; + } + + + public SDKSimulationMetricsResult results(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public SDKSimulationMetricsResult addResultsItem(ExecutionMetrics resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + + /** + * Return true if this SDKSimulationMetricsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKSimulationMetricsResult sdKSimulationMetricsResult = (SDKSimulationMetricsResult) o; + return Objects.equals(this.callExecutionId, sdKSimulationMetricsResult.callExecutionId) && + Objects.equals(this.executionId, sdKSimulationMetricsResult.executionId) && + Objects.equals(this.status, sdKSimulationMetricsResult.status) && + equalsNullable(this.durationSeconds, sdKSimulationMetricsResult.durationSeconds) && + equalsNullable(this.startedAt, sdKSimulationMetricsResult.startedAt) && + equalsNullable(this.completedAt, sdKSimulationMetricsResult.completedAt) && + Objects.equals(this.totalCalls, sdKSimulationMetricsResult.totalCalls) && + Objects.equals(this.completedCalls, sdKSimulationMetricsResult.completedCalls) && + Objects.equals(this.failedCalls, sdKSimulationMetricsResult.failedCalls) && + Objects.equals(this.latency, sdKSimulationMetricsResult.latency) && + Objects.equals(this.cost, sdKSimulationMetricsResult.cost) && + Objects.equals(this.conversation, sdKSimulationMetricsResult.conversation) && + Objects.equals(this.chatMetrics, sdKSimulationMetricsResult.chatMetrics) && + Objects.equals(this.metrics, sdKSimulationMetricsResult.metrics) && + Objects.equals(this.totalPages, sdKSimulationMetricsResult.totalPages) && + Objects.equals(this.currentPage, sdKSimulationMetricsResult.currentPage) && + Objects.equals(this.count, sdKSimulationMetricsResult.count) && + Objects.equals(this.results, sdKSimulationMetricsResult.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, executionId, status, hashCodeNullable(durationSeconds), hashCodeNullable(startedAt), hashCodeNullable(completedAt), totalCalls, completedCalls, failedCalls, latency, cost, conversation, chatMetrics, metrics, totalPages, currentPage, count, results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKSimulationMetricsResult {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" durationSeconds: ").append(toIndentedString(durationSeconds)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" completedCalls: ").append(toIndentedString(completedCalls)).append("\n"); + sb.append(" failedCalls: ").append(toIndentedString(failedCalls)).append("\n"); + sb.append(" latency: ").append(toIndentedString(latency)).append("\n"); + sb.append(" cost: ").append(toIndentedString(cost)).append("\n"); + sb.append(" conversation: ").append(toIndentedString(conversation)).append("\n"); + sb.append(" chatMetrics: ").append(toIndentedString(chatMetrics)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `duration_seconds` to the URL query string + if (getDurationSeconds() != null) { + joiner.add(String.format("%sduration_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDurationSeconds())))); + } + + // add `started_at` to the URL query string + if (getStartedAt() != null) { + joiner.add(String.format("%sstarted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartedAt())))); + } + + // add `completed_at` to the URL query string + if (getCompletedAt() != null) { + joiner.add(String.format("%scompleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedAt())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `completed_calls` to the URL query string + if (getCompletedCalls() != null) { + joiner.add(String.format("%scompleted_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedCalls())))); + } + + // add `failed_calls` to the URL query string + if (getFailedCalls() != null) { + joiner.add(String.format("%sfailed_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedCalls())))); + } + + // add `latency` to the URL query string + if (getLatency() != null) { + for (String _key : getLatency().keySet()) { + joiner.add(String.format("%slatency%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLatency().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLatency().get(_key))))); + } + } + + // add `cost` to the URL query string + if (getCost() != null) { + for (String _key : getCost().keySet()) { + joiner.add(String.format("%scost%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCost().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCost().get(_key))))); + } + } + + // add `conversation` to the URL query string + if (getConversation() != null) { + for (String _key : getConversation().keySet()) { + joiner.add(String.format("%sconversation%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConversation().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConversation().get(_key))))); + } + } + + // add `chat_metrics` to the URL query string + if (getChatMetrics() != null) { + for (String _key : getChatMetrics().keySet()) { + joiner.add(String.format("%schat_metrics%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getChatMetrics().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getChatMetrics().get(_key))))); + } + } + + // add `metrics` to the URL query string + if (getMetrics() != null) { + for (String _key : getMetrics().keySet()) { + joiner.add(String.format("%smetrics%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetrics().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetrics().get(_key))))); + } + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `current_page` to the URL query string + if (getCurrentPage() != null) { + joiner.add(String.format("%scurrent_page%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentPage())))); + } + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResponse.java new file mode 100644 index 0000000..2cc1d50 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKSimulationRunsResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKSimulationRunsResponse + */ +@JsonPropertyOrder({ + SDKSimulationRunsResponse.JSON_PROPERTY_STATUS, + SDKSimulationRunsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKSimulationRunsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKSimulationRunsResult result; + + public SDKSimulationRunsResponse() { + } + + public SDKSimulationRunsResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKSimulationRunsResponse result(@javax.annotation.Nonnull SDKSimulationRunsResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKSimulationRunsResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKSimulationRunsResult result) { + this.result = result; + } + + + /** + * Return true if this SDKSimulationRunsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKSimulationRunsResponse sdKSimulationRunsResponse = (SDKSimulationRunsResponse) o; + return Objects.equals(this.status, sdKSimulationRunsResponse.status) && + Objects.equals(this.result, sdKSimulationRunsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKSimulationRunsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResult.java new file mode 100644 index 0000000..55288c7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKSimulationRunsResult.java @@ -0,0 +1,1129 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ExecutionRuns; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKSimulationRunsResult + */ +@JsonPropertyOrder({ + SDKSimulationRunsResult.JSON_PROPERTY_CALL_EXECUTION_ID, + SDKSimulationRunsResult.JSON_PROPERTY_EXECUTION_ID, + SDKSimulationRunsResult.JSON_PROPERTY_SCENARIO_ID, + SDKSimulationRunsResult.JSON_PROPERTY_SCENARIO_NAME, + SDKSimulationRunsResult.JSON_PROPERTY_STATUS, + SDKSimulationRunsResult.JSON_PROPERTY_STARTED_AT, + SDKSimulationRunsResult.JSON_PROPERTY_COMPLETED_AT, + SDKSimulationRunsResult.JSON_PROPERTY_DURATION_SECONDS, + SDKSimulationRunsResult.JSON_PROPERTY_ENDED_REASON, + SDKSimulationRunsResult.JSON_PROPERTY_CALL_SUMMARY, + SDKSimulationRunsResult.JSON_PROPERTY_TOTAL_CALLS, + SDKSimulationRunsResult.JSON_PROPERTY_COMPLETED_CALLS, + SDKSimulationRunsResult.JSON_PROPERTY_FAILED_CALLS, + SDKSimulationRunsResult.JSON_PROPERTY_EVAL_OUTPUTS, + SDKSimulationRunsResult.JSON_PROPERTY_EVAL_RESULTS, + SDKSimulationRunsResult.JSON_PROPERTY_LATENCY, + SDKSimulationRunsResult.JSON_PROPERTY_COST, + SDKSimulationRunsResult.JSON_PROPERTY_CALL_RESULTS, + SDKSimulationRunsResult.JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY, + SDKSimulationRunsResult.JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS, + SDKSimulationRunsResult.JSON_PROPERTY_TOTAL_PAGES, + SDKSimulationRunsResult.JSON_PROPERTY_CURRENT_PAGE, + SDKSimulationRunsResult.JSON_PROPERTY_COUNT, + SDKSimulationRunsResult.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKSimulationRunsResult { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nullable + private UUID callExecutionId; + + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nullable + private UUID executionId; + + public static final String JSON_PROPERTY_SCENARIO_ID = "scenario_id"; + @javax.annotation.Nullable + private UUID scenarioId; + + public static final String JSON_PROPERTY_SCENARIO_NAME = "scenario_name"; + @javax.annotation.Nullable + private String scenarioName; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private JsonNullable startedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION_SECONDS = "duration_seconds"; + private JsonNullable durationSeconds = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENDED_REASON = "ended_reason"; + private JsonNullable endedReason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CALL_SUMMARY = "call_summary"; + private JsonNullable callSummary = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_COMPLETED_CALLS = "completed_calls"; + @javax.annotation.Nullable + private Integer completedCalls; + + public static final String JSON_PROPERTY_FAILED_CALLS = "failed_calls"; + @javax.annotation.Nullable + private Integer failedCalls; + + public static final String JSON_PROPERTY_EVAL_OUTPUTS = "eval_outputs"; + @javax.annotation.Nullable + private Map evalOutputs = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_RESULTS = "eval_results"; + @javax.annotation.Nullable + private List> evalResults = new ArrayList<>(); + + public static final String JSON_PROPERTY_LATENCY = "latency"; + @javax.annotation.Nullable + private Map latency = new HashMap<>(); + + public static final String JSON_PROPERTY_COST = "cost"; + @javax.annotation.Nullable + private Map cost = new HashMap<>(); + + public static final String JSON_PROPERTY_CALL_RESULTS = "call_results"; + @javax.annotation.Nullable + private Map callResults = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY = "eval_explanation_summary"; + @javax.annotation.Nullable + private Map evalExplanationSummary = new HashMap<>(); + + public static final String JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS = "eval_explanation_summary_status"; + private JsonNullable evalExplanationSummaryStatus = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_CURRENT_PAGE = "current_page"; + @javax.annotation.Nullable + private Integer currentPage; + + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public SDKSimulationRunsResult() { + } + + public SDKSimulationRunsResult callExecutionId(@javax.annotation.Nullable UUID callExecutionId) { + this.callExecutionId = callExecutionId; + return this; + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallExecutionId(@javax.annotation.Nullable UUID callExecutionId) { + this.callExecutionId = callExecutionId; + } + + + public SDKSimulationRunsResult executionId(@javax.annotation.Nullable UUID executionId) { + this.executionId = executionId; + return this; + } + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExecutionId() { + return executionId; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionId(@javax.annotation.Nullable UUID executionId) { + this.executionId = executionId; + } + + + public SDKSimulationRunsResult scenarioId(@javax.annotation.Nullable UUID scenarioId) { + this.scenarioId = scenarioId; + return this; + } + + /** + * Get scenarioId + * @return scenarioId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getScenarioId() { + return scenarioId; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioId(@javax.annotation.Nullable UUID scenarioId) { + this.scenarioId = scenarioId; + } + + + public SDKSimulationRunsResult scenarioName(@javax.annotation.Nullable String scenarioName) { + this.scenarioName = scenarioName; + return this; + } + + /** + * Get scenarioName + * @return scenarioName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenarioName() { + return scenarioName; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioName(@javax.annotation.Nullable String scenarioName) { + this.scenarioName = scenarioName; + } + + + public SDKSimulationRunsResult status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public SDKSimulationRunsResult startedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + return this; + } + + /** + * Get startedAt + * @return startedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getStartedAt() { + return startedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedAt_JsonNullable() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + public void setStartedAt_JsonNullable(JsonNullable startedAt) { + this.startedAt = startedAt; + } + + public void setStartedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + } + + + public SDKSimulationRunsResult completedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Get completedAt + * @return completedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + + public SDKSimulationRunsResult durationSeconds(@javax.annotation.Nullable BigDecimal durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + return this; + } + + /** + * Get durationSeconds + * @return durationSeconds + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getDurationSeconds() { + return durationSeconds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDurationSeconds_JsonNullable() { + return durationSeconds; + } + + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + public void setDurationSeconds_JsonNullable(JsonNullable durationSeconds) { + this.durationSeconds = durationSeconds; + } + + public void setDurationSeconds(@javax.annotation.Nullable BigDecimal durationSeconds) { + this.durationSeconds = JsonNullable.of(durationSeconds); + } + + + public SDKSimulationRunsResult endedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + return this; + } + + /** + * Get endedReason + * @return endedReason + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEndedReason() { + return endedReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEndedReason_JsonNullable() { + return endedReason; + } + + @JsonProperty(JSON_PROPERTY_ENDED_REASON) + public void setEndedReason_JsonNullable(JsonNullable endedReason) { + this.endedReason = endedReason; + } + + public void setEndedReason(@javax.annotation.Nullable String endedReason) { + this.endedReason = JsonNullable.of(endedReason); + } + + + public SDKSimulationRunsResult callSummary(@javax.annotation.Nullable String callSummary) { + this.callSummary = JsonNullable.of(callSummary); + return this; + } + + /** + * Get callSummary + * @return callSummary + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCallSummary() { + return callSummary.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CALL_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCallSummary_JsonNullable() { + return callSummary; + } + + @JsonProperty(JSON_PROPERTY_CALL_SUMMARY) + public void setCallSummary_JsonNullable(JsonNullable callSummary) { + this.callSummary = callSummary; + } + + public void setCallSummary(@javax.annotation.Nullable String callSummary) { + this.callSummary = JsonNullable.of(callSummary); + } + + + public SDKSimulationRunsResult totalCalls(@javax.annotation.Nullable Integer totalCalls) { + this.totalCalls = totalCalls; + return this; + } + + /** + * Get totalCalls + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalCalls(@javax.annotation.Nullable Integer totalCalls) { + this.totalCalls = totalCalls; + } + + + public SDKSimulationRunsResult completedCalls(@javax.annotation.Nullable Integer completedCalls) { + this.completedCalls = completedCalls; + return this; + } + + /** + * Get completedCalls + * @return completedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCompletedCalls() { + return completedCalls; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompletedCalls(@javax.annotation.Nullable Integer completedCalls) { + this.completedCalls = completedCalls; + } + + + public SDKSimulationRunsResult failedCalls(@javax.annotation.Nullable Integer failedCalls) { + this.failedCalls = failedCalls; + return this; + } + + /** + * Get failedCalls + * @return failedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailedCalls() { + return failedCalls; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailedCalls(@javax.annotation.Nullable Integer failedCalls) { + this.failedCalls = failedCalls; + } + + + public SDKSimulationRunsResult evalOutputs(@javax.annotation.Nullable Map evalOutputs) { + this.evalOutputs = evalOutputs; + return this; + } + + public SDKSimulationRunsResult putEvalOutputsItem(String key, Object evalOutputsItem) { + if (this.evalOutputs == null) { + this.evalOutputs = new HashMap<>(); + } + this.evalOutputs.put(key, evalOutputsItem); + return this; + } + + /** + * Get evalOutputs + * @return evalOutputs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvalOutputs() { + return evalOutputs; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_OUTPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalOutputs(@javax.annotation.Nullable Map evalOutputs) { + this.evalOutputs = evalOutputs; + } + + + public SDKSimulationRunsResult evalResults(@javax.annotation.Nullable List> evalResults) { + this.evalResults = evalResults; + return this; + } + + public SDKSimulationRunsResult addEvalResultsItem(Map evalResultsItem) { + if (this.evalResults == null) { + this.evalResults = new ArrayList<>(); + } + this.evalResults.add(evalResultsItem); + return this; + } + + /** + * Get evalResults + * @return evalResults + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getEvalResults() { + return evalResults; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalResults(@javax.annotation.Nullable List> evalResults) { + this.evalResults = evalResults; + } + + + public SDKSimulationRunsResult latency(@javax.annotation.Nullable Map latency) { + this.latency = latency; + return this; + } + + public SDKSimulationRunsResult putLatencyItem(String key, Object latencyItem) { + if (this.latency == null) { + this.latency = new HashMap<>(); + } + this.latency.put(key, latencyItem); + return this; + } + + /** + * Get latency + * @return latency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LATENCY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLatency() { + return latency; + } + + + @JsonProperty(JSON_PROPERTY_LATENCY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setLatency(@javax.annotation.Nullable Map latency) { + this.latency = latency; + } + + + public SDKSimulationRunsResult cost(@javax.annotation.Nullable Map cost) { + this.cost = cost; + return this; + } + + public SDKSimulationRunsResult putCostItem(String key, Object costItem) { + if (this.cost == null) { + this.cost = new HashMap<>(); + } + this.cost.put(key, costItem); + return this; + } + + /** + * Get cost + * @return cost + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCost() { + return cost; + } + + + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCost(@javax.annotation.Nullable Map cost) { + this.cost = cost; + } + + + public SDKSimulationRunsResult callResults(@javax.annotation.Nullable Map callResults) { + this.callResults = callResults; + return this; + } + + public SDKSimulationRunsResult putCallResultsItem(String key, Object callResultsItem) { + if (this.callResults == null) { + this.callResults = new HashMap<>(); + } + this.callResults.put(key, callResultsItem); + return this; + } + + /** + * Get callResults + * @return callResults + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_RESULTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCallResults() { + return callResults; + } + + + @JsonProperty(JSON_PROPERTY_CALL_RESULTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCallResults(@javax.annotation.Nullable Map callResults) { + this.callResults = callResults; + } + + + public SDKSimulationRunsResult evalExplanationSummary(@javax.annotation.Nullable Map evalExplanationSummary) { + this.evalExplanationSummary = evalExplanationSummary; + return this; + } + + public SDKSimulationRunsResult putEvalExplanationSummaryItem(String key, Object evalExplanationSummaryItem) { + if (this.evalExplanationSummary == null) { + this.evalExplanationSummary = new HashMap<>(); + } + this.evalExplanationSummary.put(key, evalExplanationSummaryItem); + return this; + } + + /** + * Get evalExplanationSummary + * @return evalExplanationSummary + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvalExplanationSummary() { + return evalExplanationSummary; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalExplanationSummary(@javax.annotation.Nullable Map evalExplanationSummary) { + this.evalExplanationSummary = evalExplanationSummary; + } + + + public SDKSimulationRunsResult evalExplanationSummaryStatus(@javax.annotation.Nullable String evalExplanationSummaryStatus) { + this.evalExplanationSummaryStatus = JsonNullable.of(evalExplanationSummaryStatus); + return this; + } + + /** + * Get evalExplanationSummaryStatus + * @return evalExplanationSummaryStatus + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalExplanationSummaryStatus() { + return evalExplanationSummaryStatus.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalExplanationSummaryStatus_JsonNullable() { + return evalExplanationSummaryStatus; + } + + @JsonProperty(JSON_PROPERTY_EVAL_EXPLANATION_SUMMARY_STATUS) + public void setEvalExplanationSummaryStatus_JsonNullable(JsonNullable evalExplanationSummaryStatus) { + this.evalExplanationSummaryStatus = evalExplanationSummaryStatus; + } + + public void setEvalExplanationSummaryStatus(@javax.annotation.Nullable String evalExplanationSummaryStatus) { + this.evalExplanationSummaryStatus = JsonNullable.of(evalExplanationSummaryStatus); + } + + + public SDKSimulationRunsResult totalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalPages(@javax.annotation.Nullable Integer totalPages) { + this.totalPages = totalPages; + } + + + public SDKSimulationRunsResult currentPage(@javax.annotation.Nullable Integer currentPage) { + this.currentPage = currentPage; + return this; + } + + /** + * Get currentPage + * @return currentPage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCurrentPage() { + return currentPage; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrentPage(@javax.annotation.Nullable Integer currentPage) { + this.currentPage = currentPage; + } + + + public SDKSimulationRunsResult count(@javax.annotation.Nullable Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCount(@javax.annotation.Nullable Integer count) { + this.count = count; + } + + + public SDKSimulationRunsResult results(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public SDKSimulationRunsResult addResultsItem(ExecutionRuns resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + + /** + * Return true if this SDKSimulationRunsResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKSimulationRunsResult sdKSimulationRunsResult = (SDKSimulationRunsResult) o; + return Objects.equals(this.callExecutionId, sdKSimulationRunsResult.callExecutionId) && + Objects.equals(this.executionId, sdKSimulationRunsResult.executionId) && + Objects.equals(this.scenarioId, sdKSimulationRunsResult.scenarioId) && + Objects.equals(this.scenarioName, sdKSimulationRunsResult.scenarioName) && + Objects.equals(this.status, sdKSimulationRunsResult.status) && + equalsNullable(this.startedAt, sdKSimulationRunsResult.startedAt) && + equalsNullable(this.completedAt, sdKSimulationRunsResult.completedAt) && + equalsNullable(this.durationSeconds, sdKSimulationRunsResult.durationSeconds) && + equalsNullable(this.endedReason, sdKSimulationRunsResult.endedReason) && + equalsNullable(this.callSummary, sdKSimulationRunsResult.callSummary) && + Objects.equals(this.totalCalls, sdKSimulationRunsResult.totalCalls) && + Objects.equals(this.completedCalls, sdKSimulationRunsResult.completedCalls) && + Objects.equals(this.failedCalls, sdKSimulationRunsResult.failedCalls) && + Objects.equals(this.evalOutputs, sdKSimulationRunsResult.evalOutputs) && + Objects.equals(this.evalResults, sdKSimulationRunsResult.evalResults) && + Objects.equals(this.latency, sdKSimulationRunsResult.latency) && + Objects.equals(this.cost, sdKSimulationRunsResult.cost) && + Objects.equals(this.callResults, sdKSimulationRunsResult.callResults) && + Objects.equals(this.evalExplanationSummary, sdKSimulationRunsResult.evalExplanationSummary) && + equalsNullable(this.evalExplanationSummaryStatus, sdKSimulationRunsResult.evalExplanationSummaryStatus) && + Objects.equals(this.totalPages, sdKSimulationRunsResult.totalPages) && + Objects.equals(this.currentPage, sdKSimulationRunsResult.currentPage) && + Objects.equals(this.count, sdKSimulationRunsResult.count) && + Objects.equals(this.results, sdKSimulationRunsResult.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, executionId, scenarioId, scenarioName, status, hashCodeNullable(startedAt), hashCodeNullable(completedAt), hashCodeNullable(durationSeconds), hashCodeNullable(endedReason), hashCodeNullable(callSummary), totalCalls, completedCalls, failedCalls, evalOutputs, evalResults, latency, cost, callResults, evalExplanationSummary, hashCodeNullable(evalExplanationSummaryStatus), totalPages, currentPage, count, results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKSimulationRunsResult {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" scenarioId: ").append(toIndentedString(scenarioId)).append("\n"); + sb.append(" scenarioName: ").append(toIndentedString(scenarioName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" durationSeconds: ").append(toIndentedString(durationSeconds)).append("\n"); + sb.append(" endedReason: ").append(toIndentedString(endedReason)).append("\n"); + sb.append(" callSummary: ").append(toIndentedString(callSummary)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" completedCalls: ").append(toIndentedString(completedCalls)).append("\n"); + sb.append(" failedCalls: ").append(toIndentedString(failedCalls)).append("\n"); + sb.append(" evalOutputs: ").append(toIndentedString(evalOutputs)).append("\n"); + sb.append(" evalResults: ").append(toIndentedString(evalResults)).append("\n"); + sb.append(" latency: ").append(toIndentedString(latency)).append("\n"); + sb.append(" cost: ").append(toIndentedString(cost)).append("\n"); + sb.append(" callResults: ").append(toIndentedString(callResults)).append("\n"); + sb.append(" evalExplanationSummary: ").append(toIndentedString(evalExplanationSummary)).append("\n"); + sb.append(" evalExplanationSummaryStatus: ").append(toIndentedString(evalExplanationSummaryStatus)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `scenario_id` to the URL query string + if (getScenarioId() != null) { + joiner.add(String.format("%sscenario_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioId())))); + } + + // add `scenario_name` to the URL query string + if (getScenarioName() != null) { + joiner.add(String.format("%sscenario_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioName())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `started_at` to the URL query string + if (getStartedAt() != null) { + joiner.add(String.format("%sstarted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartedAt())))); + } + + // add `completed_at` to the URL query string + if (getCompletedAt() != null) { + joiner.add(String.format("%scompleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedAt())))); + } + + // add `duration_seconds` to the URL query string + if (getDurationSeconds() != null) { + joiner.add(String.format("%sduration_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDurationSeconds())))); + } + + // add `ended_reason` to the URL query string + if (getEndedReason() != null) { + joiner.add(String.format("%sended_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndedReason())))); + } + + // add `call_summary` to the URL query string + if (getCallSummary() != null) { + joiner.add(String.format("%scall_summary%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallSummary())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `completed_calls` to the URL query string + if (getCompletedCalls() != null) { + joiner.add(String.format("%scompleted_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedCalls())))); + } + + // add `failed_calls` to the URL query string + if (getFailedCalls() != null) { + joiner.add(String.format("%sfailed_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedCalls())))); + } + + // add `eval_outputs` to the URL query string + if (getEvalOutputs() != null) { + for (String _key : getEvalOutputs().keySet()) { + joiner.add(String.format("%seval_outputs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalOutputs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalOutputs().get(_key))))); + } + } + + // add `eval_results` to the URL query string + if (getEvalResults() != null) { + for (int i = 0; i < getEvalResults().size(); i++) { + joiner.add(String.format("%seval_results%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalResults().get(i))))); + } + } + + // add `latency` to the URL query string + if (getLatency() != null) { + for (String _key : getLatency().keySet()) { + joiner.add(String.format("%slatency%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLatency().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLatency().get(_key))))); + } + } + + // add `cost` to the URL query string + if (getCost() != null) { + for (String _key : getCost().keySet()) { + joiner.add(String.format("%scost%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCost().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCost().get(_key))))); + } + } + + // add `call_results` to the URL query string + if (getCallResults() != null) { + for (String _key : getCallResults().keySet()) { + joiner.add(String.format("%scall_results%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCallResults().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCallResults().get(_key))))); + } + } + + // add `eval_explanation_summary` to the URL query string + if (getEvalExplanationSummary() != null) { + for (String _key : getEvalExplanationSummary().keySet()) { + joiner.add(String.format("%seval_explanation_summary%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvalExplanationSummary().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvalExplanationSummary().get(_key))))); + } + } + + // add `eval_explanation_summary_status` to the URL query string + if (getEvalExplanationSummaryStatus() != null) { + joiner.add(String.format("%seval_explanation_summary_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalExplanationSummaryStatus())))); + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `current_page` to the URL query string + if (getCurrentPage() != null) { + joiner.add(String.format("%scurrent_page%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentPage())))); + } + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalInput.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalInput.java new file mode 100644 index 0000000..4c0f5e9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalInput.java @@ -0,0 +1,241 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKStandaloneEvalInput + */ +@JsonPropertyOrder({ + SDKStandaloneEvalInput.JSON_PROPERTY_INPUT, + SDKStandaloneEvalInput.JSON_PROPERTY_MAX_TOKENS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKStandaloneEvalInput extends HashMap { + public static final String JSON_PROPERTY_INPUT = "input"; + @javax.annotation.Nullable + private String input; + + public static final String JSON_PROPERTY_MAX_TOKENS = "max_tokens"; + @javax.annotation.Nullable + private Integer maxTokens; + + public SDKStandaloneEvalInput() { + } + + public SDKStandaloneEvalInput input(@javax.annotation.Nullable String input) { + this.input = input; + return this; + } + + /** + * Get input + * @return input + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInput() { + return input; + } + + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInput(@javax.annotation.Nullable String input) { + this.input = input; + } + + + public SDKStandaloneEvalInput maxTokens(@javax.annotation.Nullable Integer maxTokens) { + this.maxTokens = maxTokens; + return this; + } + + /** + * Get maxTokens + * minimum: 1 + * @return maxTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxTokens() { + return maxTokens; + } + + + @JsonProperty(JSON_PROPERTY_MAX_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxTokens(@javax.annotation.Nullable Integer maxTokens) { + this.maxTokens = maxTokens; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public SDKStandaloneEvalInput putAdditionalProperty(String key, Map value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Map getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this SDKStandaloneEvalInput object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKStandaloneEvalInput sdKStandaloneEvalInput = (SDKStandaloneEvalInput) o; + return Objects.equals(this.input, sdKStandaloneEvalInput.input) && + Objects.equals(this.maxTokens, sdKStandaloneEvalInput.maxTokens)&& + Objects.equals(this.additionalProperties, sdKStandaloneEvalInput.additionalProperties) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(input, maxTokens, super.hashCode(), additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKStandaloneEvalInput {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" maxTokens: ").append(toIndentedString(maxTokens)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `input` to the URL query string + if (getInput() != null) { + joiner.add(String.format("%sinput%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInput())))); + } + + // add `max_tokens` to the URL query string + if (getMaxTokens() != null) { + joiner.add(String.format("%smax_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxTokens())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalRequest.java new file mode 100644 index 0000000..3b058eb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalRequest.java @@ -0,0 +1,254 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKStandaloneEvalInput; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKStandaloneEvalRequest + */ +@JsonPropertyOrder({ + SDKStandaloneEvalRequest.JSON_PROPERTY_INPUTS, + SDKStandaloneEvalRequest.JSON_PROPERTY_CONFIG, + SDKStandaloneEvalRequest.JSON_PROPERTY_PROTECT_FLASH +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKStandaloneEvalRequest { + public static final String JSON_PROPERTY_INPUTS = "inputs"; + @javax.annotation.Nonnull + private List inputs = new ArrayList<>(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_PROTECT_FLASH = "protect_flash"; + @javax.annotation.Nullable + private Boolean protectFlash = false; + + public SDKStandaloneEvalRequest() { + } + + public SDKStandaloneEvalRequest inputs(@javax.annotation.Nonnull List inputs) { + this.inputs = inputs; + return this; + } + + public SDKStandaloneEvalRequest addInputsItem(SDKStandaloneEvalInput inputsItem) { + if (this.inputs == null) { + this.inputs = new ArrayList<>(); + } + this.inputs.add(inputsItem); + return this; + } + + /** + * Get inputs + * @return inputs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInputs() { + return inputs; + } + + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputs(@javax.annotation.Nonnull List inputs) { + this.inputs = inputs; + } + + + public SDKStandaloneEvalRequest config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public SDKStandaloneEvalRequest putConfigItem(String key, String configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public SDKStandaloneEvalRequest protectFlash(@javax.annotation.Nullable Boolean protectFlash) { + this.protectFlash = protectFlash; + return this; + } + + /** + * Get protectFlash + * @return protectFlash + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROTECT_FLASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getProtectFlash() { + return protectFlash; + } + + + @JsonProperty(JSON_PROPERTY_PROTECT_FLASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProtectFlash(@javax.annotation.Nullable Boolean protectFlash) { + this.protectFlash = protectFlash; + } + + + /** + * Return true if this SDKStandaloneEvalRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKStandaloneEvalRequest sdKStandaloneEvalRequest = (SDKStandaloneEvalRequest) o; + return Objects.equals(this.inputs, sdKStandaloneEvalRequest.inputs) && + Objects.equals(this.config, sdKStandaloneEvalRequest.config) && + Objects.equals(this.protectFlash, sdKStandaloneEvalRequest.protectFlash); + } + + @Override + public int hashCode() { + return Objects.hash(inputs, config, protectFlash); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKStandaloneEvalRequest {\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" protectFlash: ").append(toIndentedString(protectFlash)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (int i = 0; i < getInputs().size(); i++) { + if (getInputs().get(i) != null) { + joiner.add(String.format("%sinputs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getInputs().get(i))))); + } + } + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `protect_flash` to the URL query string + if (getProtectFlash() != null) { + joiner.add(String.format("%sprotect_flash%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProtectFlash())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResponse.java new file mode 100644 index 0000000..424a117 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResponse.java @@ -0,0 +1,203 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKStandaloneEvalResultItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKStandaloneEvalResponse + */ +@JsonPropertyOrder({ + SDKStandaloneEvalResponse.JSON_PROPERTY_STATUS, + SDKStandaloneEvalResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKStandaloneEvalResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public SDKStandaloneEvalResponse() { + } + + public SDKStandaloneEvalResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKStandaloneEvalResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public SDKStandaloneEvalResponse addResultItem(SDKStandaloneEvalResultItem resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + /** + * Return true if this SDKStandaloneEvalResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKStandaloneEvalResponse sdKStandaloneEvalResponse = (SDKStandaloneEvalResponse) o; + return Objects.equals(this.status, sdKStandaloneEvalResponse.status) && + Objects.equals(this.result, sdKStandaloneEvalResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKStandaloneEvalResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResultItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResultItem.java new file mode 100644 index 0000000..3683e0d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalResultItem.java @@ -0,0 +1,166 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKStandaloneEvalResultItem + */ +@JsonPropertyOrder({ + SDKStandaloneEvalResultItem.JSON_PROPERTY_EVALUATIONS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKStandaloneEvalResultItem { + public static final String JSON_PROPERTY_EVALUATIONS = "evaluations"; + @javax.annotation.Nonnull + private List> evaluations = new ArrayList<>(); + + public SDKStandaloneEvalResultItem() { + } + + public SDKStandaloneEvalResultItem evaluations(@javax.annotation.Nonnull List> evaluations) { + this.evaluations = evaluations; + return this; + } + + public SDKStandaloneEvalResultItem addEvaluationsItem(Map evaluationsItem) { + if (this.evaluations == null) { + this.evaluations = new ArrayList<>(); + } + this.evaluations.add(evaluationsItem); + return this; + } + + /** + * Get evaluations + * @return evaluations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvaluations() { + return evaluations; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvaluations(@javax.annotation.Nonnull List> evaluations) { + this.evaluations = evaluations; + } + + + /** + * Return true if this SDKStandaloneEvalResultItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKStandaloneEvalResultItem sdKStandaloneEvalResultItem = (SDKStandaloneEvalResultItem) o; + return Objects.equals(this.evaluations, sdKStandaloneEvalResultItem.evaluations); + } + + @Override + public int hashCode() { + return Objects.hash(evaluations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKStandaloneEvalResultItem {\n"); + sb.append(" evaluations: ").append(toIndentedString(evaluations)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `evaluations` to the URL query string + if (getEvaluations() != null) { + for (int i = 0; i < getEvaluations().size(); i++) { + joiner.add(String.format("%sevaluations%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvaluations().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Request.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Request.java new file mode 100644 index 0000000..ab7596d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Request.java @@ -0,0 +1,501 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKStandaloneEvalV2Request + */ +@JsonPropertyOrder({ + SDKStandaloneEvalV2Request.JSON_PROPERTY_EVAL_NAME, + SDKStandaloneEvalV2Request.JSON_PROPERTY_INPUTS, + SDKStandaloneEvalV2Request.JSON_PROPERTY_MODEL, + SDKStandaloneEvalV2Request.JSON_PROPERTY_SPAN_ID, + SDKStandaloneEvalV2Request.JSON_PROPERTY_CUSTOM_EVAL_NAME, + SDKStandaloneEvalV2Request.JSON_PROPERTY_TRACE_EVAL, + SDKStandaloneEvalV2Request.JSON_PROPERTY_IS_ASYNC, + SDKStandaloneEvalV2Request.JSON_PROPERTY_ERROR_LOCALIZER, + SDKStandaloneEvalV2Request.JSON_PROPERTY_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKStandaloneEvalV2Request { + public static final String JSON_PROPERTY_EVAL_NAME = "eval_name"; + @javax.annotation.Nonnull + private String evalName; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + @javax.annotation.Nonnull + private Map inputs = new HashMap<>(); + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SPAN_ID = "span_id"; + private JsonNullable spanId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CUSTOM_EVAL_NAME = "custom_eval_name"; + private JsonNullable customEvalName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRACE_EVAL = "trace_eval"; + @javax.annotation.Nullable + private Boolean traceEval = false; + + public static final String JSON_PROPERTY_IS_ASYNC = "is_async"; + @javax.annotation.Nullable + private Boolean isAsync = false; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public SDKStandaloneEvalV2Request() { + } + + public SDKStandaloneEvalV2Request evalName(@javax.annotation.Nonnull String evalName) { + this.evalName = evalName; + return this; + } + + /** + * Get evalName + * @return evalName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalName() { + return evalName; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalName(@javax.annotation.Nonnull String evalName) { + this.evalName = evalName; + } + + + public SDKStandaloneEvalV2Request inputs(@javax.annotation.Nonnull Map inputs) { + this.inputs = inputs; + return this; + } + + public SDKStandaloneEvalV2Request putInputsItem(String key, String inputsItem) { + if (this.inputs == null) { + this.inputs = new HashMap<>(); + } + this.inputs.put(key, inputsItem); + return this; + } + + /** + * Get inputs + * @return inputs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getInputs() { + return inputs; + } + + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setInputs(@javax.annotation.Nonnull Map inputs) { + this.inputs = inputs; + } + + + public SDKStandaloneEvalV2Request model(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + public void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + public void setModel(@javax.annotation.Nullable String model) { + this.model = JsonNullable.of(model); + } + + + public SDKStandaloneEvalV2Request spanId(@javax.annotation.Nullable String spanId) { + this.spanId = JsonNullable.of(spanId); + return this; + } + + /** + * Get spanId + * @return spanId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSpanId() { + return spanId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSpanId_JsonNullable() { + return spanId; + } + + @JsonProperty(JSON_PROPERTY_SPAN_ID) + public void setSpanId_JsonNullable(JsonNullable spanId) { + this.spanId = spanId; + } + + public void setSpanId(@javax.annotation.Nullable String spanId) { + this.spanId = JsonNullable.of(spanId); + } + + + public SDKStandaloneEvalV2Request customEvalName(@javax.annotation.Nullable String customEvalName) { + this.customEvalName = JsonNullable.of(customEvalName); + return this; + } + + /** + * Get customEvalName + * @return customEvalName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCustomEvalName() { + return customEvalName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_EVAL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCustomEvalName_JsonNullable() { + return customEvalName; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_EVAL_NAME) + public void setCustomEvalName_JsonNullable(JsonNullable customEvalName) { + this.customEvalName = customEvalName; + } + + public void setCustomEvalName(@javax.annotation.Nullable String customEvalName) { + this.customEvalName = JsonNullable.of(customEvalName); + } + + + public SDKStandaloneEvalV2Request traceEval(@javax.annotation.Nullable Boolean traceEval) { + this.traceEval = traceEval; + return this; + } + + /** + * Get traceEval + * @return traceEval + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_EVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTraceEval() { + return traceEval; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_EVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTraceEval(@javax.annotation.Nullable Boolean traceEval) { + this.traceEval = traceEval; + } + + + public SDKStandaloneEvalV2Request isAsync(@javax.annotation.Nullable Boolean isAsync) { + this.isAsync = isAsync; + return this; + } + + /** + * Get isAsync + * @return isAsync + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_ASYNC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsAsync() { + return isAsync; + } + + + @JsonProperty(JSON_PROPERTY_IS_ASYNC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsAsync(@javax.annotation.Nullable Boolean isAsync) { + this.isAsync = isAsync; + } + + + public SDKStandaloneEvalV2Request errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public SDKStandaloneEvalV2Request config(@javax.annotation.Nullable Map config) { + this.config = config; + return this; + } + + public SDKStandaloneEvalV2Request putConfigItem(String key, String configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setConfig(@javax.annotation.Nullable Map config) { + this.config = config; + } + + + /** + * Return true if this SDKStandaloneEvalV2Request object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKStandaloneEvalV2Request sdKStandaloneEvalV2Request = (SDKStandaloneEvalV2Request) o; + return Objects.equals(this.evalName, sdKStandaloneEvalV2Request.evalName) && + Objects.equals(this.inputs, sdKStandaloneEvalV2Request.inputs) && + equalsNullable(this.model, sdKStandaloneEvalV2Request.model) && + equalsNullable(this.spanId, sdKStandaloneEvalV2Request.spanId) && + equalsNullable(this.customEvalName, sdKStandaloneEvalV2Request.customEvalName) && + Objects.equals(this.traceEval, sdKStandaloneEvalV2Request.traceEval) && + Objects.equals(this.isAsync, sdKStandaloneEvalV2Request.isAsync) && + Objects.equals(this.errorLocalizer, sdKStandaloneEvalV2Request.errorLocalizer) && + Objects.equals(this.config, sdKStandaloneEvalV2Request.config); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(evalName, inputs, hashCodeNullable(model), hashCodeNullable(spanId), hashCodeNullable(customEvalName), traceEval, isAsync, errorLocalizer, config); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKStandaloneEvalV2Request {\n"); + sb.append(" evalName: ").append(toIndentedString(evalName)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" spanId: ").append(toIndentedString(spanId)).append("\n"); + sb.append(" customEvalName: ").append(toIndentedString(customEvalName)).append("\n"); + sb.append(" traceEval: ").append(toIndentedString(traceEval)).append("\n"); + sb.append(" isAsync: ").append(toIndentedString(isAsync)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_name` to the URL query string + if (getEvalName() != null) { + joiner.add(String.format("%seval_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalName())))); + } + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (String _key : getInputs().keySet()) { + joiner.add(String.format("%sinputs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInputs().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInputs().get(_key))))); + } + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `span_id` to the URL query string + if (getSpanId() != null) { + joiner.add(String.format("%sspan_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSpanId())))); + } + + // add `custom_eval_name` to the URL query string + if (getCustomEvalName() != null) { + joiner.add(String.format("%scustom_eval_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomEvalName())))); + } + + // add `trace_eval` to the URL query string + if (getTraceEval() != null) { + joiner.add(String.format("%strace_eval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceEval())))); + } + + // add `is_async` to the URL query string + if (getIsAsync() != null) { + joiner.add(String.format("%sis_async%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsAsync())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Response.java new file mode 100644 index 0000000..8d37798 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Response.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SDKStandaloneEvalV2Result; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKStandaloneEvalV2Response + */ +@JsonPropertyOrder({ + SDKStandaloneEvalV2Response.JSON_PROPERTY_STATUS, + SDKStandaloneEvalV2Response.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKStandaloneEvalV2Response { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SDKStandaloneEvalV2Result result; + + public SDKStandaloneEvalV2Response() { + } + + public SDKStandaloneEvalV2Response status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SDKStandaloneEvalV2Response result(@javax.annotation.Nonnull SDKStandaloneEvalV2Result result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SDKStandaloneEvalV2Result getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SDKStandaloneEvalV2Result result) { + this.result = result; + } + + + /** + * Return true if this SDKStandaloneEvalV2Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKStandaloneEvalV2Response sdKStandaloneEvalV2Response = (SDKStandaloneEvalV2Response) o; + return Objects.equals(this.status, sdKStandaloneEvalV2Response.status) && + Objects.equals(this.result, sdKStandaloneEvalV2Response.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKStandaloneEvalV2Response {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Result.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Result.java new file mode 100644 index 0000000..3d8881d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SDKStandaloneEvalV2Result.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SDKStandaloneEvalV2Result + */ +@JsonPropertyOrder({ + SDKStandaloneEvalV2Result.JSON_PROPERTY_EVAL_STATUS, + SDKStandaloneEvalV2Result.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SDKStandaloneEvalV2Result { + public static final String JSON_PROPERTY_EVAL_STATUS = "eval_status"; + @javax.annotation.Nonnull + private String evalStatus; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map result = new HashMap<>(); + + public SDKStandaloneEvalV2Result() { + } + + public SDKStandaloneEvalV2Result evalStatus(@javax.annotation.Nonnull String evalStatus) { + this.evalStatus = evalStatus; + return this; + } + + /** + * Get evalStatus + * @return evalStatus + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVAL_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvalStatus() { + return evalStatus; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalStatus(@javax.annotation.Nonnull String evalStatus) { + this.evalStatus = evalStatus; + } + + + public SDKStandaloneEvalV2Result result(@javax.annotation.Nonnull Map result) { + this.result = result; + return this; + } + + public SDKStandaloneEvalV2Result putResultItem(String key, Object resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map result) { + this.result = result; + } + + + /** + * Return true if this SDKStandaloneEvalV2Result object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKStandaloneEvalV2Result sdKStandaloneEvalV2Result = (SDKStandaloneEvalV2Result) o; + return Objects.equals(this.evalStatus, sdKStandaloneEvalV2Result.evalStatus) && + Objects.equals(this.result, sdKStandaloneEvalV2Result.result); + } + + @Override + public int hashCode() { + return Objects.hash(evalStatus, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDKStandaloneEvalV2Result {\n"); + sb.append(" evalStatus: ").append(toIndentedString(evalStatus)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_status` to the URL query string + if (getEvalStatus() != null) { + joiner.add(String.format("%seval_status%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + joiner.add(String.format("%sresult%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResult().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsRequest.java new file mode 100644 index 0000000..22d59aa --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsRequest.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ColumnDefinition; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioAddColumnsRequest + */ +@JsonPropertyOrder({ + ScenarioAddColumnsRequest.JSON_PROPERTY_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioAddColumnsRequest { + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public ScenarioAddColumnsRequest() { + } + + public ScenarioAddColumnsRequest columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public ScenarioAddColumnsRequest addColumnsItem(ColumnDefinition columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + /** + * Return true if this ScenarioAddColumnsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioAddColumnsRequest scenarioAddColumnsRequest = (ScenarioAddColumnsRequest) o; + return Objects.equals(this.columns, scenarioAddColumnsRequest.columns); + } + + @Override + public int hashCode() { + return Objects.hash(columns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioAddColumnsRequest {\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + if (getColumns().get(i) != null) { + joiner.add(getColumns().get(i).toUrlQueryString(String.format("%scolumns%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsResponse.java new file mode 100644 index 0000000..16c284b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddColumnsResponse.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioAddColumnsResponse + */ +@JsonPropertyOrder({ + ScenarioAddColumnsResponse.JSON_PROPERTY_MESSAGE, + ScenarioAddColumnsResponse.JSON_PROPERTY_SCENARIO_ID, + ScenarioAddColumnsResponse.JSON_PROPERTY_DATASET_ID, + ScenarioAddColumnsResponse.JSON_PROPERTY_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioAddColumnsResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_SCENARIO_ID = "scenario_id"; + @javax.annotation.Nullable + private UUID scenarioId; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private UUID datasetId; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nullable + private List columns = new ArrayList<>(); + + public ScenarioAddColumnsResponse() { + } + + @JsonCreator + public ScenarioAddColumnsResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) UUID scenarioId, + @JsonProperty(JSON_PROPERTY_DATASET_ID) UUID datasetId, + @JsonProperty(JSON_PROPERTY_COLUMNS) List columns + ) { + this(); + this.message = message; + this.scenarioId = scenarioId; + this.datasetId = datasetId; + this.columns = columns; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get scenarioId + * @return scenarioId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getScenarioId() { + return scenarioId; + } + + + + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getDatasetId() { + return datasetId; + } + + + + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumns() { + return columns; + } + + + + + /** + * Return true if this ScenarioAddColumnsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioAddColumnsResponse scenarioAddColumnsResponse = (ScenarioAddColumnsResponse) o; + return Objects.equals(this.message, scenarioAddColumnsResponse.message) && + Objects.equals(this.scenarioId, scenarioAddColumnsResponse.scenarioId) && + Objects.equals(this.datasetId, scenarioAddColumnsResponse.datasetId) && + Objects.equals(this.columns, scenarioAddColumnsResponse.columns); + } + + @Override + public int hashCode() { + return Objects.hash(message, scenarioId, datasetId, columns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioAddColumnsResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" scenarioId: ").append(toIndentedString(scenarioId)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `scenario_id` to the URL query string + if (getScenarioId() != null) { + joiner.add(String.format("%sscenario_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioId())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsRequest.java new file mode 100644 index 0000000..17e5338 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsRequest.java @@ -0,0 +1,189 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioAddRowsRequest + */ +@JsonPropertyOrder({ + ScenarioAddRowsRequest.JSON_PROPERTY_NUM_ROWS, + ScenarioAddRowsRequest.JSON_PROPERTY_DESCRIPTION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioAddRowsRequest { + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nonnull + private Integer numRows; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public ScenarioAddRowsRequest() { + } + + public ScenarioAddRowsRequest numRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * minimum: 10 + * maximum: 20000 + * @return numRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + } + + + public ScenarioAddRowsRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + /** + * Return true if this ScenarioAddRowsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioAddRowsRequest scenarioAddRowsRequest = (ScenarioAddRowsRequest) o; + return Objects.equals(this.numRows, scenarioAddRowsRequest.numRows) && + Objects.equals(this.description, scenarioAddRowsRequest.description); + } + + @Override + public int hashCode() { + return Objects.hash(numRows, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioAddRowsRequest {\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsResponse.java new file mode 100644 index 0000000..27e88d0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioAddRowsResponse.java @@ -0,0 +1,234 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioAddRowsResponse + */ +@JsonPropertyOrder({ + ScenarioAddRowsResponse.JSON_PROPERTY_MESSAGE, + ScenarioAddRowsResponse.JSON_PROPERTY_SCENARIO_ID, + ScenarioAddRowsResponse.JSON_PROPERTY_DATASET_ID, + ScenarioAddRowsResponse.JSON_PROPERTY_NUM_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioAddRowsResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_SCENARIO_ID = "scenario_id"; + @javax.annotation.Nullable + private UUID scenarioId; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private UUID datasetId; + + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nullable + private Integer numRows; + + public ScenarioAddRowsResponse() { + } + + @JsonCreator + public ScenarioAddRowsResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) UUID scenarioId, + @JsonProperty(JSON_PROPERTY_DATASET_ID) UUID datasetId, + @JsonProperty(JSON_PROPERTY_NUM_ROWS) Integer numRows + ) { + this(); + this.message = message; + this.scenarioId = scenarioId; + this.datasetId = datasetId; + this.numRows = numRows; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get scenarioId + * @return scenarioId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getScenarioId() { + return scenarioId; + } + + + + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getDatasetId() { + return datasetId; + } + + + + + /** + * Get numRows + * @return numRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRows() { + return numRows; + } + + + + + /** + * Return true if this ScenarioAddRowsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioAddRowsResponse scenarioAddRowsResponse = (ScenarioAddRowsResponse) o; + return Objects.equals(this.message, scenarioAddRowsResponse.message) && + Objects.equals(this.scenarioId, scenarioAddRowsResponse.scenarioId) && + Objects.equals(this.datasetId, scenarioAddRowsResponse.datasetId) && + Objects.equals(this.numRows, scenarioAddRowsResponse.numRows); + } + + @Override + public int hashCode() { + return Objects.hash(message, scenarioId, datasetId, numRows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioAddRowsResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" scenarioId: ").append(toIndentedString(scenarioId)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `scenario_id` to the URL query string + if (getScenarioId() != null) { + joiner.add(String.format("%sscenario_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioId())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateRequest.java new file mode 100644 index 0000000..f38b33d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateRequest.java @@ -0,0 +1,1323 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ColumnDefinition; +import java.math.BigDecimal; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioCreateRequest + */ +@JsonPropertyOrder({ + ScenarioCreateRequest.JSON_PROPERTY_NAME, + ScenarioCreateRequest.JSON_PROPERTY_DESCRIPTION, + ScenarioCreateRequest.JSON_PROPERTY_DATASET_ID, + ScenarioCreateRequest.JSON_PROPERTY_KIND, + ScenarioCreateRequest.JSON_PROPERTY_SCRIPT_URL, + ScenarioCreateRequest.JSON_PROPERTY_AGENT_DEFINITION_ID, + ScenarioCreateRequest.JSON_PROPERTY_AGENT_DEFINITION_VERSION_ID, + ScenarioCreateRequest.JSON_PROPERTY_CUSTOM_INSTRUCTION, + ScenarioCreateRequest.JSON_PROPERTY_NO_OF_ROWS, + ScenarioCreateRequest.JSON_PROPERTY_GENERATE_GRAPH, + ScenarioCreateRequest.JSON_PROPERTY_GRAPH, + ScenarioCreateRequest.JSON_PROPERTY_SOURCE_TYPE, + ScenarioCreateRequest.JSON_PROPERTY_PROMPT_TEMPLATE_ID, + ScenarioCreateRequest.JSON_PROPERTY_PROMPT_VERSION_ID, + ScenarioCreateRequest.JSON_PROPERTY_ADD_PERSONA_AUTOMATICALLY, + ScenarioCreateRequest.JSON_PROPERTY_PERSONAS, + ScenarioCreateRequest.JSON_PROPERTY_CUSTOM_COLUMNS, + ScenarioCreateRequest.JSON_PROPERTY_AGENT_NAME, + ScenarioCreateRequest.JSON_PROPERTY_AGENT_PROMPT, + ScenarioCreateRequest.JSON_PROPERTY_VOICE_PROVIDER, + ScenarioCreateRequest.JSON_PROPERTY_VOICE_NAME, + ScenarioCreateRequest.JSON_PROPERTY_MODEL, + ScenarioCreateRequest.JSON_PROPERTY_LLM_TEMPERATURE, + ScenarioCreateRequest.JSON_PROPERTY_INITIAL_MESSAGE, + ScenarioCreateRequest.JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES, + ScenarioCreateRequest.JSON_PROPERTY_INTERRUPT_SENSITIVITY, + ScenarioCreateRequest.JSON_PROPERTY_CONVERSATION_SPEED, + ScenarioCreateRequest.JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY, + ScenarioCreateRequest.JSON_PROPERTY_INITIAL_MESSAGE_DELAY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioCreateRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nullable + private UUID datasetId; + + /** + * Gets or Sets kind + */ + public enum KindEnum { + GRAPH(String.valueOf("graph")), + + SCRIPT(String.valueOf("script")), + + DATASET(String.valueOf("dataset")); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_KIND = "kind"; + @javax.annotation.Nullable + private KindEnum kind = KindEnum.DATASET; + + public static final String JSON_PROPERTY_SCRIPT_URL = "script_url"; + private JsonNullable scriptUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_DEFINITION_ID = "agent_definition_id"; + @javax.annotation.Nullable + private UUID agentDefinitionId; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_VERSION_ID = "agent_definition_version_id"; + private JsonNullable agentDefinitionVersionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CUSTOM_INSTRUCTION = "custom_instruction"; + @javax.annotation.Nullable + private String customInstruction; + + public static final String JSON_PROPERTY_NO_OF_ROWS = "no_of_rows"; + @javax.annotation.Nullable + private Integer noOfRows = 20; + + public static final String JSON_PROPERTY_GENERATE_GRAPH = "generate_graph"; + @javax.annotation.Nullable + private Boolean generateGraph = false; + + public static final String JSON_PROPERTY_GRAPH = "graph"; + @javax.annotation.Nullable + private Map graph = new HashMap<>(); + + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + AGENT_DEFINITION(String.valueOf("agent_definition")), + + PROMPT(String.valueOf("prompt")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nullable + private SourceTypeEnum sourceType = SourceTypeEnum.AGENT_DEFINITION; + + public static final String JSON_PROPERTY_PROMPT_TEMPLATE_ID = "prompt_template_id"; + private JsonNullable promptTemplateId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_VERSION_ID = "prompt_version_id"; + private JsonNullable promptVersionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ADD_PERSONA_AUTOMATICALLY = "add_persona_automatically"; + @javax.annotation.Nullable + private Boolean addPersonaAutomatically = false; + + public static final String JSON_PROPERTY_PERSONAS = "personas"; + @javax.annotation.Nullable + private List personas = new ArrayList<>(); + + public static final String JSON_PROPERTY_CUSTOM_COLUMNS = "custom_columns"; + @javax.annotation.Nullable + private List customColumns = new ArrayList<>(); + + public static final String JSON_PROPERTY_AGENT_NAME = "agent_name"; + @javax.annotation.Nullable + private String agentName; + + public static final String JSON_PROPERTY_AGENT_PROMPT = "agent_prompt"; + @javax.annotation.Nullable + private String agentPrompt; + + public static final String JSON_PROPERTY_VOICE_PROVIDER = "voice_provider"; + @javax.annotation.Nullable + private String voiceProvider = "elevenlabs"; + + public static final String JSON_PROPERTY_VOICE_NAME = "voice_name"; + @javax.annotation.Nullable + private String voiceName = "marissa"; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model = "gpt-4"; + + public static final String JSON_PROPERTY_LLM_TEMPERATURE = "llm_temperature"; + @javax.annotation.Nullable + private BigDecimal llmTemperature = new BigDecimal("0.7"); + + public static final String JSON_PROPERTY_INITIAL_MESSAGE = "initial_message"; + @javax.annotation.Nullable + private String initialMessage; + + public static final String JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES = "max_call_duration_in_minutes"; + @javax.annotation.Nullable + private Integer maxCallDurationInMinutes = 30; + + public static final String JSON_PROPERTY_INTERRUPT_SENSITIVITY = "interrupt_sensitivity"; + @javax.annotation.Nullable + private BigDecimal interruptSensitivity = new BigDecimal("0.5"); + + public static final String JSON_PROPERTY_CONVERSATION_SPEED = "conversation_speed"; + @javax.annotation.Nullable + private BigDecimal conversationSpeed = new BigDecimal("1"); + + public static final String JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY = "finished_speaking_sensitivity"; + @javax.annotation.Nullable + private BigDecimal finishedSpeakingSensitivity = new BigDecimal("0.5"); + + public static final String JSON_PROPERTY_INITIAL_MESSAGE_DELAY = "initial_message_delay"; + @javax.annotation.Nullable + private Integer initialMessageDelay = 0; + + public ScenarioCreateRequest() { + } + + public ScenarioCreateRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ScenarioCreateRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public ScenarioCreateRequest datasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetId(@javax.annotation.Nullable UUID datasetId) { + this.datasetId = datasetId; + } + + + public ScenarioCreateRequest kind(@javax.annotation.Nullable KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public KindEnum getKind() { + return kind; + } + + + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKind(@javax.annotation.Nullable KindEnum kind) { + this.kind = kind; + } + + + public ScenarioCreateRequest scriptUrl(@javax.annotation.Nullable URI scriptUrl) { + this.scriptUrl = JsonNullable.of(scriptUrl); + return this; + } + + /** + * Get scriptUrl + * @return scriptUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getScriptUrl() { + return scriptUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCRIPT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScriptUrl_JsonNullable() { + return scriptUrl; + } + + @JsonProperty(JSON_PROPERTY_SCRIPT_URL) + public void setScriptUrl_JsonNullable(JsonNullable scriptUrl) { + this.scriptUrl = scriptUrl; + } + + public void setScriptUrl(@javax.annotation.Nullable URI scriptUrl) { + this.scriptUrl = JsonNullable.of(scriptUrl); + } + + + public ScenarioCreateRequest agentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + return this; + } + + /** + * Get agentDefinitionId + * @return agentDefinitionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAgentDefinitionId() { + return agentDefinitionId; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + } + + + public ScenarioCreateRequest agentDefinitionVersionId(@javax.annotation.Nullable UUID agentDefinitionVersionId) { + this.agentDefinitionVersionId = JsonNullable.of(agentDefinitionVersionId); + return this; + } + + /** + * Get agentDefinitionVersionId + * @return agentDefinitionVersionId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAgentDefinitionVersionId() { + return agentDefinitionVersionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentDefinitionVersionId_JsonNullable() { + return agentDefinitionVersionId; + } + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_VERSION_ID) + public void setAgentDefinitionVersionId_JsonNullable(JsonNullable agentDefinitionVersionId) { + this.agentDefinitionVersionId = agentDefinitionVersionId; + } + + public void setAgentDefinitionVersionId(@javax.annotation.Nullable UUID agentDefinitionVersionId) { + this.agentDefinitionVersionId = JsonNullable.of(agentDefinitionVersionId); + } + + + public ScenarioCreateRequest customInstruction(@javax.annotation.Nullable String customInstruction) { + this.customInstruction = customInstruction; + return this; + } + + /** + * Get customInstruction + * @return customInstruction + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomInstruction() { + return customInstruction; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_INSTRUCTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomInstruction(@javax.annotation.Nullable String customInstruction) { + this.customInstruction = customInstruction; + } + + + public ScenarioCreateRequest noOfRows(@javax.annotation.Nullable Integer noOfRows) { + this.noOfRows = noOfRows; + return this; + } + + /** + * Get noOfRows + * minimum: 10 + * maximum: 20000 + * @return noOfRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NO_OF_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNoOfRows() { + return noOfRows; + } + + + @JsonProperty(JSON_PROPERTY_NO_OF_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNoOfRows(@javax.annotation.Nullable Integer noOfRows) { + this.noOfRows = noOfRows; + } + + + public ScenarioCreateRequest generateGraph(@javax.annotation.Nullable Boolean generateGraph) { + this.generateGraph = generateGraph; + return this; + } + + /** + * Get generateGraph + * @return generateGraph + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GENERATE_GRAPH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getGenerateGraph() { + return generateGraph; + } + + + @JsonProperty(JSON_PROPERTY_GENERATE_GRAPH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGenerateGraph(@javax.annotation.Nullable Boolean generateGraph) { + this.generateGraph = generateGraph; + } + + + public ScenarioCreateRequest graph(@javax.annotation.Nullable Map graph) { + this.graph = graph; + return this; + } + + public ScenarioCreateRequest putGraphItem(String key, Object graphItem) { + if (this.graph == null) { + this.graph = new HashMap<>(); + } + this.graph.put(key, graphItem); + return this; + } + + /** + * Get graph + * @return graph + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getGraph() { + return graph; + } + + + @JsonProperty(JSON_PROPERTY_GRAPH) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setGraph(@javax.annotation.Nullable Map graph) { + this.graph = graph; + } + + + public ScenarioCreateRequest sourceType(@javax.annotation.Nullable SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceType(@javax.annotation.Nullable SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + public ScenarioCreateRequest promptTemplateId(@javax.annotation.Nullable UUID promptTemplateId) { + this.promptTemplateId = JsonNullable.of(promptTemplateId); + return this; + } + + /** + * Get promptTemplateId + * @return promptTemplateId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptTemplateId() { + return promptTemplateId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptTemplateId_JsonNullable() { + return promptTemplateId; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE_ID) + public void setPromptTemplateId_JsonNullable(JsonNullable promptTemplateId) { + this.promptTemplateId = promptTemplateId; + } + + public void setPromptTemplateId(@javax.annotation.Nullable UUID promptTemplateId) { + this.promptTemplateId = JsonNullable.of(promptTemplateId); + } + + + public ScenarioCreateRequest promptVersionId(@javax.annotation.Nullable UUID promptVersionId) { + this.promptVersionId = JsonNullable.of(promptVersionId); + return this; + } + + /** + * Get promptVersionId + * @return promptVersionId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptVersionId() { + return promptVersionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptVersionId_JsonNullable() { + return promptVersionId; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_ID) + public void setPromptVersionId_JsonNullable(JsonNullable promptVersionId) { + this.promptVersionId = promptVersionId; + } + + public void setPromptVersionId(@javax.annotation.Nullable UUID promptVersionId) { + this.promptVersionId = JsonNullable.of(promptVersionId); + } + + + public ScenarioCreateRequest addPersonaAutomatically(@javax.annotation.Nullable Boolean addPersonaAutomatically) { + this.addPersonaAutomatically = addPersonaAutomatically; + return this; + } + + /** + * Get addPersonaAutomatically + * @return addPersonaAutomatically + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADD_PERSONA_AUTOMATICALLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAddPersonaAutomatically() { + return addPersonaAutomatically; + } + + + @JsonProperty(JSON_PROPERTY_ADD_PERSONA_AUTOMATICALLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddPersonaAutomatically(@javax.annotation.Nullable Boolean addPersonaAutomatically) { + this.addPersonaAutomatically = addPersonaAutomatically; + } + + + public ScenarioCreateRequest personas(@javax.annotation.Nullable List personas) { + this.personas = personas; + return this; + } + + public ScenarioCreateRequest addPersonasItem(UUID personasItem) { + if (this.personas == null) { + this.personas = new ArrayList<>(); + } + this.personas.add(personasItem); + return this; + } + + /** + * Get personas + * @return personas + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONAS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPersonas() { + return personas; + } + + + @JsonProperty(JSON_PROPERTY_PERSONAS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPersonas(@javax.annotation.Nullable List personas) { + this.personas = personas; + } + + + public ScenarioCreateRequest customColumns(@javax.annotation.Nullable List customColumns) { + this.customColumns = customColumns; + return this; + } + + public ScenarioCreateRequest addCustomColumnsItem(ColumnDefinition customColumnsItem) { + if (this.customColumns == null) { + this.customColumns = new ArrayList<>(); + } + this.customColumns.add(customColumnsItem); + return this; + } + + /** + * Get customColumns + * @return customColumns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomColumns() { + return customColumns; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomColumns(@javax.annotation.Nullable List customColumns) { + this.customColumns = customColumns; + } + + + public ScenarioCreateRequest agentName(@javax.annotation.Nullable String agentName) { + this.agentName = agentName; + return this; + } + + /** + * Get agentName + * @return agentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentName() { + return agentName; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentName(@javax.annotation.Nullable String agentName) { + this.agentName = agentName; + } + + + public ScenarioCreateRequest agentPrompt(@javax.annotation.Nullable String agentPrompt) { + this.agentPrompt = agentPrompt; + return this; + } + + /** + * Get agentPrompt + * @return agentPrompt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_PROMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentPrompt() { + return agentPrompt; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_PROMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentPrompt(@javax.annotation.Nullable String agentPrompt) { + this.agentPrompt = agentPrompt; + } + + + public ScenarioCreateRequest voiceProvider(@javax.annotation.Nullable String voiceProvider) { + this.voiceProvider = voiceProvider; + return this; + } + + /** + * Get voiceProvider + * @return voiceProvider + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VOICE_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVoiceProvider() { + return voiceProvider; + } + + + @JsonProperty(JSON_PROPERTY_VOICE_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVoiceProvider(@javax.annotation.Nullable String voiceProvider) { + this.voiceProvider = voiceProvider; + } + + + public ScenarioCreateRequest voiceName(@javax.annotation.Nullable String voiceName) { + this.voiceName = voiceName; + return this; + } + + /** + * Get voiceName + * @return voiceName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VOICE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVoiceName() { + return voiceName; + } + + + @JsonProperty(JSON_PROPERTY_VOICE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVoiceName(@javax.annotation.Nullable String voiceName) { + this.voiceName = voiceName; + } + + + public ScenarioCreateRequest model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public ScenarioCreateRequest llmTemperature(@javax.annotation.Nullable BigDecimal llmTemperature) { + this.llmTemperature = llmTemperature; + return this; + } + + /** + * Get llmTemperature + * @return llmTemperature + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_TEMPERATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getLlmTemperature() { + return llmTemperature; + } + + + @JsonProperty(JSON_PROPERTY_LLM_TEMPERATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLlmTemperature(@javax.annotation.Nullable BigDecimal llmTemperature) { + this.llmTemperature = llmTemperature; + } + + + public ScenarioCreateRequest initialMessage(@javax.annotation.Nullable String initialMessage) { + this.initialMessage = initialMessage; + return this; + } + + /** + * Get initialMessage + * @return initialMessage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInitialMessage() { + return initialMessage; + } + + + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInitialMessage(@javax.annotation.Nullable String initialMessage) { + this.initialMessage = initialMessage; + } + + + public ScenarioCreateRequest maxCallDurationInMinutes(@javax.annotation.Nullable Integer maxCallDurationInMinutes) { + this.maxCallDurationInMinutes = maxCallDurationInMinutes; + return this; + } + + /** + * Get maxCallDurationInMinutes + * @return maxCallDurationInMinutes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxCallDurationInMinutes() { + return maxCallDurationInMinutes; + } + + + @JsonProperty(JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxCallDurationInMinutes(@javax.annotation.Nullable Integer maxCallDurationInMinutes) { + this.maxCallDurationInMinutes = maxCallDurationInMinutes; + } + + + public ScenarioCreateRequest interruptSensitivity(@javax.annotation.Nullable BigDecimal interruptSensitivity) { + this.interruptSensitivity = interruptSensitivity; + return this; + } + + /** + * Get interruptSensitivity + * @return interruptSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getInterruptSensitivity() { + return interruptSensitivity; + } + + + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInterruptSensitivity(@javax.annotation.Nullable BigDecimal interruptSensitivity) { + this.interruptSensitivity = interruptSensitivity; + } + + + public ScenarioCreateRequest conversationSpeed(@javax.annotation.Nullable BigDecimal conversationSpeed) { + this.conversationSpeed = conversationSpeed; + return this; + } + + /** + * Get conversationSpeed + * @return conversationSpeed + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getConversationSpeed() { + return conversationSpeed; + } + + + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConversationSpeed(@javax.annotation.Nullable BigDecimal conversationSpeed) { + this.conversationSpeed = conversationSpeed; + } + + + public ScenarioCreateRequest finishedSpeakingSensitivity(@javax.annotation.Nullable BigDecimal finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + return this; + } + + /** + * Get finishedSpeakingSensitivity + * @return finishedSpeakingSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getFinishedSpeakingSensitivity() { + return finishedSpeakingSensitivity; + } + + + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinishedSpeakingSensitivity(@javax.annotation.Nullable BigDecimal finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + } + + + public ScenarioCreateRequest initialMessageDelay(@javax.annotation.Nullable Integer initialMessageDelay) { + this.initialMessageDelay = initialMessageDelay; + return this; + } + + /** + * Get initialMessageDelay + * @return initialMessageDelay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE_DELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getInitialMessageDelay() { + return initialMessageDelay; + } + + + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE_DELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInitialMessageDelay(@javax.annotation.Nullable Integer initialMessageDelay) { + this.initialMessageDelay = initialMessageDelay; + } + + + /** + * Return true if this ScenarioCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioCreateRequest scenarioCreateRequest = (ScenarioCreateRequest) o; + return Objects.equals(this.name, scenarioCreateRequest.name) && + Objects.equals(this.description, scenarioCreateRequest.description) && + Objects.equals(this.datasetId, scenarioCreateRequest.datasetId) && + Objects.equals(this.kind, scenarioCreateRequest.kind) && + equalsNullable(this.scriptUrl, scenarioCreateRequest.scriptUrl) && + Objects.equals(this.agentDefinitionId, scenarioCreateRequest.agentDefinitionId) && + equalsNullable(this.agentDefinitionVersionId, scenarioCreateRequest.agentDefinitionVersionId) && + Objects.equals(this.customInstruction, scenarioCreateRequest.customInstruction) && + Objects.equals(this.noOfRows, scenarioCreateRequest.noOfRows) && + Objects.equals(this.generateGraph, scenarioCreateRequest.generateGraph) && + Objects.equals(this.graph, scenarioCreateRequest.graph) && + Objects.equals(this.sourceType, scenarioCreateRequest.sourceType) && + equalsNullable(this.promptTemplateId, scenarioCreateRequest.promptTemplateId) && + equalsNullable(this.promptVersionId, scenarioCreateRequest.promptVersionId) && + Objects.equals(this.addPersonaAutomatically, scenarioCreateRequest.addPersonaAutomatically) && + Objects.equals(this.personas, scenarioCreateRequest.personas) && + Objects.equals(this.customColumns, scenarioCreateRequest.customColumns) && + Objects.equals(this.agentName, scenarioCreateRequest.agentName) && + Objects.equals(this.agentPrompt, scenarioCreateRequest.agentPrompt) && + Objects.equals(this.voiceProvider, scenarioCreateRequest.voiceProvider) && + Objects.equals(this.voiceName, scenarioCreateRequest.voiceName) && + Objects.equals(this.model, scenarioCreateRequest.model) && + Objects.equals(this.llmTemperature, scenarioCreateRequest.llmTemperature) && + Objects.equals(this.initialMessage, scenarioCreateRequest.initialMessage) && + Objects.equals(this.maxCallDurationInMinutes, scenarioCreateRequest.maxCallDurationInMinutes) && + Objects.equals(this.interruptSensitivity, scenarioCreateRequest.interruptSensitivity) && + Objects.equals(this.conversationSpeed, scenarioCreateRequest.conversationSpeed) && + Objects.equals(this.finishedSpeakingSensitivity, scenarioCreateRequest.finishedSpeakingSensitivity) && + Objects.equals(this.initialMessageDelay, scenarioCreateRequest.initialMessageDelay); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, datasetId, kind, hashCodeNullable(scriptUrl), agentDefinitionId, hashCodeNullable(agentDefinitionVersionId), customInstruction, noOfRows, generateGraph, graph, sourceType, hashCodeNullable(promptTemplateId), hashCodeNullable(promptVersionId), addPersonaAutomatically, personas, customColumns, agentName, agentPrompt, voiceProvider, voiceName, model, llmTemperature, initialMessage, maxCallDurationInMinutes, interruptSensitivity, conversationSpeed, finishedSpeakingSensitivity, initialMessageDelay); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioCreateRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" scriptUrl: ").append(toIndentedString(scriptUrl)).append("\n"); + sb.append(" agentDefinitionId: ").append(toIndentedString(agentDefinitionId)).append("\n"); + sb.append(" agentDefinitionVersionId: ").append(toIndentedString(agentDefinitionVersionId)).append("\n"); + sb.append(" customInstruction: ").append(toIndentedString(customInstruction)).append("\n"); + sb.append(" noOfRows: ").append(toIndentedString(noOfRows)).append("\n"); + sb.append(" generateGraph: ").append(toIndentedString(generateGraph)).append("\n"); + sb.append(" graph: ").append(toIndentedString(graph)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" promptTemplateId: ").append(toIndentedString(promptTemplateId)).append("\n"); + sb.append(" promptVersionId: ").append(toIndentedString(promptVersionId)).append("\n"); + sb.append(" addPersonaAutomatically: ").append(toIndentedString(addPersonaAutomatically)).append("\n"); + sb.append(" personas: ").append(toIndentedString(personas)).append("\n"); + sb.append(" customColumns: ").append(toIndentedString(customColumns)).append("\n"); + sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n"); + sb.append(" agentPrompt: ").append(toIndentedString(agentPrompt)).append("\n"); + sb.append(" voiceProvider: ").append(toIndentedString(voiceProvider)).append("\n"); + sb.append(" voiceName: ").append(toIndentedString(voiceName)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" llmTemperature: ").append(toIndentedString(llmTemperature)).append("\n"); + sb.append(" initialMessage: ").append(toIndentedString(initialMessage)).append("\n"); + sb.append(" maxCallDurationInMinutes: ").append(toIndentedString(maxCallDurationInMinutes)).append("\n"); + sb.append(" interruptSensitivity: ").append(toIndentedString(interruptSensitivity)).append("\n"); + sb.append(" conversationSpeed: ").append(toIndentedString(conversationSpeed)).append("\n"); + sb.append(" finishedSpeakingSensitivity: ").append(toIndentedString(finishedSpeakingSensitivity)).append("\n"); + sb.append(" initialMessageDelay: ").append(toIndentedString(initialMessageDelay)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `kind` to the URL query string + if (getKind() != null) { + joiner.add(String.format("%skind%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKind())))); + } + + // add `script_url` to the URL query string + if (getScriptUrl() != null) { + joiner.add(String.format("%sscript_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScriptUrl())))); + } + + // add `agent_definition_id` to the URL query string + if (getAgentDefinitionId() != null) { + joiner.add(String.format("%sagent_definition_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionId())))); + } + + // add `agent_definition_version_id` to the URL query string + if (getAgentDefinitionVersionId() != null) { + joiner.add(String.format("%sagent_definition_version_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionVersionId())))); + } + + // add `custom_instruction` to the URL query string + if (getCustomInstruction() != null) { + joiner.add(String.format("%scustom_instruction%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCustomInstruction())))); + } + + // add `no_of_rows` to the URL query string + if (getNoOfRows() != null) { + joiner.add(String.format("%sno_of_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNoOfRows())))); + } + + // add `generate_graph` to the URL query string + if (getGenerateGraph() != null) { + joiner.add(String.format("%sgenerate_graph%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGenerateGraph())))); + } + + // add `graph` to the URL query string + if (getGraph() != null) { + for (String _key : getGraph().keySet()) { + joiner.add(String.format("%sgraph%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getGraph().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getGraph().get(_key))))); + } + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `prompt_template_id` to the URL query string + if (getPromptTemplateId() != null) { + joiner.add(String.format("%sprompt_template_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptTemplateId())))); + } + + // add `prompt_version_id` to the URL query string + if (getPromptVersionId() != null) { + joiner.add(String.format("%sprompt_version_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptVersionId())))); + } + + // add `add_persona_automatically` to the URL query string + if (getAddPersonaAutomatically() != null) { + joiner.add(String.format("%sadd_persona_automatically%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAddPersonaAutomatically())))); + } + + // add `personas` to the URL query string + if (getPersonas() != null) { + for (int i = 0; i < getPersonas().size(); i++) { + if (getPersonas().get(i) != null) { + joiner.add(String.format("%spersonas%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getPersonas().get(i))))); + } + } + } + + // add `custom_columns` to the URL query string + if (getCustomColumns() != null) { + for (int i = 0; i < getCustomColumns().size(); i++) { + if (getCustomColumns().get(i) != null) { + joiner.add(getCustomColumns().get(i).toUrlQueryString(String.format("%scustom_columns%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `agent_name` to the URL query string + if (getAgentName() != null) { + joiner.add(String.format("%sagent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentName())))); + } + + // add `agent_prompt` to the URL query string + if (getAgentPrompt() != null) { + joiner.add(String.format("%sagent_prompt%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentPrompt())))); + } + + // add `voice_provider` to the URL query string + if (getVoiceProvider() != null) { + joiner.add(String.format("%svoice_provider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVoiceProvider())))); + } + + // add `voice_name` to the URL query string + if (getVoiceName() != null) { + joiner.add(String.format("%svoice_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVoiceName())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `llm_temperature` to the URL query string + if (getLlmTemperature() != null) { + joiner.add(String.format("%sllm_temperature%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLlmTemperature())))); + } + + // add `initial_message` to the URL query string + if (getInitialMessage() != null) { + joiner.add(String.format("%sinitial_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInitialMessage())))); + } + + // add `max_call_duration_in_minutes` to the URL query string + if (getMaxCallDurationInMinutes() != null) { + joiner.add(String.format("%smax_call_duration_in_minutes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxCallDurationInMinutes())))); + } + + // add `interrupt_sensitivity` to the URL query string + if (getInterruptSensitivity() != null) { + joiner.add(String.format("%sinterrupt_sensitivity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterruptSensitivity())))); + } + + // add `conversation_speed` to the URL query string + if (getConversationSpeed() != null) { + joiner.add(String.format("%sconversation_speed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConversationSpeed())))); + } + + // add `finished_speaking_sensitivity` to the URL query string + if (getFinishedSpeakingSensitivity() != null) { + joiner.add(String.format("%sfinished_speaking_sensitivity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFinishedSpeakingSensitivity())))); + } + + // add `initial_message_delay` to the URL query string + if (getInitialMessageDelay() != null) { + joiner.add(String.format("%sinitial_message_delay%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInitialMessageDelay())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateResponse.java new file mode 100644 index 0000000..33b2f32 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioCreateResponse.java @@ -0,0 +1,247 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ScenarioResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioCreateResponse + */ +@JsonPropertyOrder({ + ScenarioCreateResponse.JSON_PROPERTY_MESSAGE, + ScenarioCreateResponse.JSON_PROPERTY_SCENARIO, + ScenarioCreateResponse.JSON_PROPERTY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioCreateResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_SCENARIO = "scenario"; + @javax.annotation.Nullable + private ScenarioResponse scenario; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + PROCESSING(String.valueOf("processing")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public ScenarioCreateResponse() { + } + + @JsonCreator + public ScenarioCreateResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status + ) { + this(); + this.message = message; + this.status = status; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + public ScenarioCreateResponse scenario(@javax.annotation.Nullable ScenarioResponse scenario) { + this.scenario = scenario; + return this; + } + + /** + * Get scenario + * @return scenario + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScenarioResponse getScenario() { + return scenario; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenario(@javax.annotation.Nullable ScenarioResponse scenario) { + this.scenario = scenario; + } + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + + + /** + * Return true if this ScenarioCreateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioCreateResponse scenarioCreateResponse = (ScenarioCreateResponse) o; + return Objects.equals(this.message, scenarioCreateResponse.message) && + Objects.equals(this.scenario, scenarioCreateResponse.scenario) && + Objects.equals(this.status, scenarioCreateResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(message, scenario, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioCreateResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" scenario: ").append(toIndentedString(scenario)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `scenario` to the URL query string + if (getScenario() != null) { + joiner.add(getScenario().toUrlQueryString(prefix + "scenario" + suffix)); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDeleteResponse.java new file mode 100644 index 0000000..136b906 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDeleteResponse.java @@ -0,0 +1,149 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioDeleteResponse + */ +@JsonPropertyOrder({ + ScenarioDeleteResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioDeleteResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public ScenarioDeleteResponse() { + } + + @JsonCreator + public ScenarioDeleteResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Return true if this ScenarioDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioDeleteResponse scenarioDeleteResponse = (ScenarioDeleteResponse) o; + return Objects.equals(this.message, scenarioDeleteResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDetailResponse.java new file mode 100644 index 0000000..02fa418 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioDetailResponse.java @@ -0,0 +1,795 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ScenarioPromptItem; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioDetailResponse + */ +@JsonPropertyOrder({ + ScenarioDetailResponse.JSON_PROPERTY_ID, + ScenarioDetailResponse.JSON_PROPERTY_NAME, + ScenarioDetailResponse.JSON_PROPERTY_DESCRIPTION, + ScenarioDetailResponse.JSON_PROPERTY_SOURCE, + ScenarioDetailResponse.JSON_PROPERTY_SCENARIO_TYPE, + ScenarioDetailResponse.JSON_PROPERTY_DATASET_ID, + ScenarioDetailResponse.JSON_PROPERTY_ORGANIZATION, + ScenarioDetailResponse.JSON_PROPERTY_DATASET, + ScenarioDetailResponse.JSON_PROPERTY_CREATED_AT, + ScenarioDetailResponse.JSON_PROPERTY_UPDATED_AT, + ScenarioDetailResponse.JSON_PROPERTY_DELETED, + ScenarioDetailResponse.JSON_PROPERTY_DELETED_AT, + ScenarioDetailResponse.JSON_PROPERTY_STATUS, + ScenarioDetailResponse.JSON_PROPERTY_AGENT_TYPE, + ScenarioDetailResponse.JSON_PROPERTY_GRAPH, + ScenarioDetailResponse.JSON_PROPERTY_PROMPTS, + ScenarioDetailResponse.JSON_PROPERTY_DATASET_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioDetailResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nullable + private String source; + + /** + * Gets or Sets scenarioType + */ + public enum ScenarioTypeEnum { + GRAPH(String.valueOf("graph")), + + SCRIPT(String.valueOf("script")), + + DATASET(String.valueOf("dataset")); + + private String value; + + ScenarioTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScenarioTypeEnum fromValue(String value) { + for (ScenarioTypeEnum b : ScenarioTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCENARIO_TYPE = "scenario_type"; + @javax.annotation.Nullable + private ScenarioTypeEnum scenarioType; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + private JsonNullable datasetId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_DATASET = "dataset"; + private JsonNullable dataset = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_DELETED = "deleted"; + @javax.annotation.Nullable + private Boolean deleted; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + + /** + * Gets or Sets status + */ + public enum StatusEnum { + NOT_STARTED(String.valueOf("NotStarted")), + + QUEUED(String.valueOf("Queued")), + + RUNNING(String.valueOf("Running")), + + COMPLETED(String.valueOf("Completed")), + + EDITING(String.valueOf("Editing")), + + INACTIVE(String.valueOf("Inactive")), + + FAILED(String.valueOf("Failed")), + + PARTIAL_RUN(String.valueOf("PartialRun")), + + EXPERIMENT_EVALUATION(String.valueOf("ExperimentEvaluation")), + + UPLOADING(String.valueOf("Uploading")), + + PARTIAL_EXTRACTED(String.valueOf("PartialExtracted")), + + PROCESSING(String.valueOf("Processing")), + + DELETING(String.valueOf("Deleting")), + + PARTIAL_COMPLETED(String.valueOf("PartialCompleted")), + + OPTIMIZATION_EVALUATION(String.valueOf("OptimizationEvaluation")), + + ERROR(String.valueOf("Error")), + + CANCELLED(String.valueOf("Cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + private JsonNullable agentType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_GRAPH = "graph"; + @javax.annotation.Nullable + private Map graph = new HashMap<>(); + + public static final String JSON_PROPERTY_PROMPTS = "prompts"; + @javax.annotation.Nullable + private List prompts = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_ROWS = "dataset_rows"; + @javax.annotation.Nullable + private Integer datasetRows; + + public ScenarioDetailResponse() { + } + + @JsonCreator + public ScenarioDetailResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(JSON_PROPERTY_SOURCE) String source, + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE) ScenarioTypeEnum scenarioType, + @JsonProperty(JSON_PROPERTY_DATASET_ID) UUID datasetId, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_DATASET) UUID dataset, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_DELETED) Boolean deleted, + @JsonProperty(JSON_PROPERTY_DELETED_AT) OffsetDateTime deletedAt, + @JsonProperty(JSON_PROPERTY_STATUS) StatusEnum status, + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) String agentType, + @JsonProperty(JSON_PROPERTY_GRAPH) Map graph, + @JsonProperty(JSON_PROPERTY_PROMPTS) List prompts, + @JsonProperty(JSON_PROPERTY_DATASET_ROWS) Integer datasetRows + ) { + this(); + this.id = id; + this.name = name; + this.description = description == null ? JsonNullable.undefined() : JsonNullable.of(description); + this.source = source; + this.scenarioType = scenarioType; + this.datasetId = datasetId == null ? JsonNullable.undefined() : JsonNullable.of(datasetId); + this.organization = organization; + this.dataset = dataset == null ? JsonNullable.undefined() : JsonNullable.of(dataset); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.deleted = deleted; + this.deletedAt = deletedAt == null ? JsonNullable.undefined() : JsonNullable.of(deletedAt); + this.status = status; + this.agentType = agentType == null ? JsonNullable.undefined() : JsonNullable.of(agentType); + this.graph = graph; + this.prompts = prompts; + this.datasetRows = datasetRows; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + + if (description == null) { + description = JsonNullable.undefined(); + } + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + private void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + + + + /** + * Get scenarioType + * @return scenarioType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScenarioTypeEnum getScenarioType() { + return scenarioType; + } + + + + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getDatasetId() { + + if (datasetId == null) { + datasetId = JsonNullable.undefined(); + } + return datasetId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatasetId_JsonNullable() { + return datasetId; + } + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + private void setDatasetId_JsonNullable(JsonNullable datasetId) { + this.datasetId = datasetId; + } + + + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getDataset() { + + if (dataset == null) { + dataset = JsonNullable.undefined(); + } + return dataset.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDataset_JsonNullable() { + return dataset; + } + + @JsonProperty(JSON_PROPERTY_DATASET) + private void setDataset_JsonNullable(JsonNullable dataset) { + this.dataset = dataset; + } + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Get deleted + * @return deleted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeleted() { + return deleted; + } + + + + + /** + * Get deletedAt + * @return deletedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + + if (deletedAt == null) { + deletedAt = JsonNullable.undefined(); + } + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + private void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAgentType() { + + if (agentType == null) { + agentType = JsonNullable.undefined(); + } + return agentType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAgentType_JsonNullable() { + return agentType; + } + + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + private void setAgentType_JsonNullable(JsonNullable agentType) { + this.agentType = agentType; + } + + + + /** + * Get graph + * @return graph + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getGraph() { + return graph; + } + + + + + /** + * Get prompts + * @return prompts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPrompts() { + return prompts; + } + + + + + /** + * Get datasetRows + * @return datasetRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDatasetRows() { + return datasetRows; + } + + + + + /** + * Return true if this ScenarioDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioDetailResponse scenarioDetailResponse = (ScenarioDetailResponse) o; + return Objects.equals(this.id, scenarioDetailResponse.id) && + Objects.equals(this.name, scenarioDetailResponse.name) && + equalsNullable(this.description, scenarioDetailResponse.description) && + Objects.equals(this.source, scenarioDetailResponse.source) && + Objects.equals(this.scenarioType, scenarioDetailResponse.scenarioType) && + equalsNullable(this.datasetId, scenarioDetailResponse.datasetId) && + Objects.equals(this.organization, scenarioDetailResponse.organization) && + equalsNullable(this.dataset, scenarioDetailResponse.dataset) && + Objects.equals(this.createdAt, scenarioDetailResponse.createdAt) && + Objects.equals(this.updatedAt, scenarioDetailResponse.updatedAt) && + Objects.equals(this.deleted, scenarioDetailResponse.deleted) && + equalsNullable(this.deletedAt, scenarioDetailResponse.deletedAt) && + Objects.equals(this.status, scenarioDetailResponse.status) && + equalsNullable(this.agentType, scenarioDetailResponse.agentType) && + Objects.equals(this.graph, scenarioDetailResponse.graph) && + Objects.equals(this.prompts, scenarioDetailResponse.prompts) && + Objects.equals(this.datasetRows, scenarioDetailResponse.datasetRows); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(description), source, scenarioType, hashCodeNullable(datasetId), organization, hashCodeNullable(dataset), createdAt, updatedAt, deleted, hashCodeNullable(deletedAt), status, hashCodeNullable(agentType), graph, prompts, datasetRows); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioDetailResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" scenarioType: ").append(toIndentedString(scenarioType)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" graph: ").append(toIndentedString(graph)).append("\n"); + sb.append(" prompts: ").append(toIndentedString(prompts)).append("\n"); + sb.append(" datasetRows: ").append(toIndentedString(datasetRows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `scenario_type` to the URL query string + if (getScenarioType() != null) { + joiner.add(String.format("%sscenario_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioType())))); + } + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(String.format("%sdataset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataset())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `deleted` to the URL query string + if (getDeleted() != null) { + joiner.add(String.format("%sdeleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeleted())))); + } + + // add `deleted_at` to the URL query string + if (getDeletedAt() != null) { + joiner.add(String.format("%sdeleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeletedAt())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `graph` to the URL query string + if (getGraph() != null) { + for (String _key : getGraph().keySet()) { + joiner.add(String.format("%sgraph%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getGraph().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getGraph().get(_key))))); + } + } + + // add `prompts` to the URL query string + if (getPrompts() != null) { + for (int i = 0; i < getPrompts().size(); i++) { + if (getPrompts().get(i) != null) { + joiner.add(getPrompts().get(i).toUrlQueryString(String.format("%sprompts%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `dataset_rows` to the URL query string + if (getDatasetRows() != null) { + joiner.add(String.format("%sdataset_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetRows())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditPromptsRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditPromptsRequest.java new file mode 100644 index 0000000..0435c44 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditPromptsRequest.java @@ -0,0 +1,151 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioEditPromptsRequest + */ +@JsonPropertyOrder({ + ScenarioEditPromptsRequest.JSON_PROPERTY_PROMPTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioEditPromptsRequest { + public static final String JSON_PROPERTY_PROMPTS = "prompts"; + @javax.annotation.Nonnull + private String prompts; + + public ScenarioEditPromptsRequest() { + } + + public ScenarioEditPromptsRequest prompts(@javax.annotation.Nonnull String prompts) { + this.prompts = prompts; + return this; + } + + /** + * Get prompts + * @return prompts + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROMPTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrompts() { + return prompts; + } + + + @JsonProperty(JSON_PROPERTY_PROMPTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPrompts(@javax.annotation.Nonnull String prompts) { + this.prompts = prompts; + } + + + /** + * Return true if this ScenarioEditPromptsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioEditPromptsRequest scenarioEditPromptsRequest = (ScenarioEditPromptsRequest) o; + return Objects.equals(this.prompts, scenarioEditPromptsRequest.prompts); + } + + @Override + public int hashCode() { + return Objects.hash(prompts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioEditPromptsRequest {\n"); + sb.append(" prompts: ").append(toIndentedString(prompts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `prompts` to the URL query string + if (getPrompts() != null) { + joiner.add(String.format("%sprompts%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrompts())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditRequest.java new file mode 100644 index 0000000..fae75e8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditRequest.java @@ -0,0 +1,273 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioEditRequest + */ +@JsonPropertyOrder({ + ScenarioEditRequest.JSON_PROPERTY_NAME, + ScenarioEditRequest.JSON_PROPERTY_DESCRIPTION, + ScenarioEditRequest.JSON_PROPERTY_GRAPH, + ScenarioEditRequest.JSON_PROPERTY_PROMPT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioEditRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_GRAPH = "graph"; + @javax.annotation.Nullable + private Map graph = new HashMap<>(); + + public static final String JSON_PROPERTY_PROMPT = "prompt"; + @javax.annotation.Nullable + private String prompt; + + public ScenarioEditRequest() { + } + + public ScenarioEditRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public ScenarioEditRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public ScenarioEditRequest graph(@javax.annotation.Nullable Map graph) { + this.graph = graph; + return this; + } + + public ScenarioEditRequest putGraphItem(String key, Object graphItem) { + if (this.graph == null) { + this.graph = new HashMap<>(); + } + this.graph.put(key, graphItem); + return this; + } + + /** + * Get graph + * @return graph + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getGraph() { + return graph; + } + + + @JsonProperty(JSON_PROPERTY_GRAPH) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setGraph(@javax.annotation.Nullable Map graph) { + this.graph = graph; + } + + + public ScenarioEditRequest prompt(@javax.annotation.Nullable String prompt) { + this.prompt = prompt; + return this; + } + + /** + * Get prompt + * @return prompt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPrompt() { + return prompt; + } + + + @JsonProperty(JSON_PROPERTY_PROMPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrompt(@javax.annotation.Nullable String prompt) { + this.prompt = prompt; + } + + + /** + * Return true if this ScenarioEditRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioEditRequest scenarioEditRequest = (ScenarioEditRequest) o; + return Objects.equals(this.name, scenarioEditRequest.name) && + Objects.equals(this.description, scenarioEditRequest.description) && + Objects.equals(this.graph, scenarioEditRequest.graph) && + Objects.equals(this.prompt, scenarioEditRequest.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, graph, prompt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioEditRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" graph: ").append(toIndentedString(graph)).append("\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `graph` to the URL query string + if (getGraph() != null) { + for (String _key : getGraph().keySet()) { + joiner.add(String.format("%sgraph%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getGraph().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getGraph().get(_key))))); + } + } + + // add `prompt` to the URL query string + if (getPrompt() != null) { + joiner.add(String.format("%sprompt%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrompt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditResponse.java new file mode 100644 index 0000000..afd08f3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioEditResponse.java @@ -0,0 +1,186 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ScenarioResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioEditResponse + */ +@JsonPropertyOrder({ + ScenarioEditResponse.JSON_PROPERTY_MESSAGE, + ScenarioEditResponse.JSON_PROPERTY_SCENARIO +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioEditResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_SCENARIO = "scenario"; + @javax.annotation.Nullable + private ScenarioResponse scenario; + + public ScenarioEditResponse() { + } + + @JsonCreator + public ScenarioEditResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + public ScenarioEditResponse scenario(@javax.annotation.Nullable ScenarioResponse scenario) { + this.scenario = scenario; + return this; + } + + /** + * Get scenario + * @return scenario + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScenarioResponse getScenario() { + return scenario; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenario(@javax.annotation.Nullable ScenarioResponse scenario) { + this.scenario = scenario; + } + + + /** + * Return true if this ScenarioEditResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioEditResponse scenarioEditResponse = (ScenarioEditResponse) o; + return Objects.equals(this.message, scenarioEditResponse.message) && + Objects.equals(this.scenario, scenarioEditResponse.scenario); + } + + @Override + public int hashCode() { + return Objects.hash(message, scenario); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioEditResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" scenario: ").append(toIndentedString(scenario)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `scenario` to the URL query string + if (getScenario() != null) { + joiner.add(getScenario().toUrlQueryString(prefix + "scenario" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioErrorResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioErrorResponse.java new file mode 100644 index 0000000..c55221c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioErrorResponse.java @@ -0,0 +1,575 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioErrorResponse + */ +@JsonPropertyOrder({ + ScenarioErrorResponse.JSON_PROPERTY_STATUS, + ScenarioErrorResponse.JSON_PROPERTY_TYPE, + ScenarioErrorResponse.JSON_PROPERTY_CODE, + ScenarioErrorResponse.JSON_PROPERTY_DETAIL, + ScenarioErrorResponse.JSON_PROPERTY_RESULT, + ScenarioErrorResponse.JSON_PROPERTY_MESSAGE, + ScenarioErrorResponse.JSON_PROPERTY_ERROR, + ScenarioErrorResponse.JSON_PROPERTY_ATTR, + ScenarioErrorResponse.JSON_PROPERTY_DETAILS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioErrorResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = false; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + VALIDATION_ERROR(String.valueOf("validation_error")), + + AUTHENTICATION_ERROR(String.valueOf("authentication_error")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ENTITLEMENT_ERROR(String.valueOf("entitlement_error")), + + PERMISSION_ERROR(String.valueOf("permission_error")), + + NOT_FOUND(String.valueOf("not_found")), + + CONFLICT(String.valueOf("conflict")), + + CLIENT_ERROR(String.valueOf("client_error")), + + RATE_LIMIT(String.valueOf("rate_limit")), + + SERVER_ERROR(String.valueOf("server_error")), + + SERVICE_UNAVAILABLE(String.valueOf("service_unavailable")), + + TIMEOUT(String.valueOf("timeout")), + + API_ERROR(String.valueOf("api_error")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CODE = "code"; + private JsonNullable code = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULT = "result"; + private JsonNullable result = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTR = "attr"; + private JsonNullable attr = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAILS = "details"; + @javax.annotation.Nullable + private Map> details = new HashMap<>(); + + public ScenarioErrorResponse() { + } + + public ScenarioErrorResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ScenarioErrorResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + @JsonIgnore + public TypeEnum getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = JsonNullable.of(type); + } + + + public ScenarioErrorResponse code(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + @JsonIgnore + public String getCode() { + return code.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCode_JsonNullable() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + public void setCode_JsonNullable(JsonNullable code) { + this.code = code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = JsonNullable.of(code); + } + + + public ScenarioErrorResponse detail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ScenarioErrorResponse result(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonIgnore + public String getResult() { + return result.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResult_JsonNullable() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + public void setResult_JsonNullable(JsonNullable result) { + this.result = result; + } + + public void setResult(@javax.annotation.Nullable String result) { + this.result = JsonNullable.of(result); + } + + + public ScenarioErrorResponse message(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public ScenarioErrorResponse error(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getError_JsonNullable() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + public void setError_JsonNullable(JsonNullable error) { + this.error = error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = JsonNullable.of(error); + } + + + public ScenarioErrorResponse attr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + return this; + } + + /** + * Get attr + * @return attr + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAttr() { + return attr.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAttr_JsonNullable() { + return attr; + } + + @JsonProperty(JSON_PROPERTY_ATTR) + public void setAttr_JsonNullable(JsonNullable attr) { + this.attr = attr; + } + + public void setAttr(@javax.annotation.Nullable String attr) { + this.attr = JsonNullable.of(attr); + } + + + public ScenarioErrorResponse details(@javax.annotation.Nullable Map> details) { + this.details = details; + return this; + } + + public ScenarioErrorResponse putDetailsItem(String key, List detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getDetails() { + return details; + } + + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(@javax.annotation.Nullable Map> details) { + this.details = details; + } + + + /** + * Return true if this ScenarioErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioErrorResponse scenarioErrorResponse = (ScenarioErrorResponse) o; + return Objects.equals(this.status, scenarioErrorResponse.status) && + equalsNullable(this.type, scenarioErrorResponse.type) && + equalsNullable(this.code, scenarioErrorResponse.code) && + equalsNullable(this.detail, scenarioErrorResponse.detail) && + equalsNullable(this.result, scenarioErrorResponse.result) && + equalsNullable(this.message, scenarioErrorResponse.message) && + equalsNullable(this.error, scenarioErrorResponse.error) && + equalsNullable(this.attr, scenarioErrorResponse.attr) && + Objects.equals(this.details, scenarioErrorResponse.details); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, hashCodeNullable(type), hashCodeNullable(code), hashCodeNullable(detail), hashCodeNullable(result), hashCodeNullable(message), hashCodeNullable(error), hashCodeNullable(attr), details); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioErrorResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" attr: ").append(toIndentedString(attr)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add(String.format("%scode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + } + + // add `detail` to the URL query string + if (getDetail() != null) { + joiner.add(String.format("%sdetail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetail())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + // add `attr` to the URL query string + if (getAttr() != null) { + joiner.add(String.format("%sattr%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAttr())))); + } + + // add `details` to the URL query string + if (getDetails() != null) { + for (String _key : getDetails().keySet()) { + joiner.add(String.format("%sdetails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDetails().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDetails().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioListResponse.java new file mode 100644 index 0000000..33bb178 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioListResponse.java @@ -0,0 +1,282 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ScenarioResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioListResponse + */ +@JsonPropertyOrder({ + ScenarioListResponse.JSON_PROPERTY_COUNT, + ScenarioListResponse.JSON_PROPERTY_NEXT, + ScenarioListResponse.JSON_PROPERTY_PREVIOUS, + ScenarioListResponse.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioListResponse { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public ScenarioListResponse() { + } + + @JsonCreator + public ScenarioListResponse( + @JsonProperty(JSON_PROPERTY_COUNT) Integer count, + @JsonProperty(JSON_PROPERTY_NEXT) String next, + @JsonProperty(JSON_PROPERTY_PREVIOUS) String previous, + @JsonProperty(JSON_PROPERTY_RESULTS) List results + ) { + this(); + this.count = count; + this.next = next == null ? JsonNullable.undefined() : JsonNullable.of(next); + this.previous = previous == null ? JsonNullable.undefined() : JsonNullable.of(previous); + this.results = results; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNext() { + + if (next == null) { + next = JsonNullable.undefined(); + } + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + private void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPrevious() { + + if (previous == null) { + previous = JsonNullable.undefined(); + } + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + private void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + + + /** + * Return true if this ScenarioListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioListResponse scenarioListResponse = (ScenarioListResponse) o; + return Objects.equals(this.count, scenarioListResponse.count) && + equalsNullable(this.next, scenarioListResponse.next) && + equalsNullable(this.previous, scenarioListResponse.previous) && + Objects.equals(this.results, scenarioListResponse.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioListResponse {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptItem.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptItem.java new file mode 100644 index 0000000..4ad7346 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptItem.java @@ -0,0 +1,214 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioPromptItem + */ +@JsonPropertyOrder({ + ScenarioPromptItem.JSON_PROPERTY_ROLE, + ScenarioPromptItem.JSON_PROPERTY_CONTENT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioPromptItem { + /** + * Gets or Sets role + */ + public enum RoleEnum { + SYSTEM(String.valueOf("system")), + + USER(String.valueOf("user")), + + ASSISTANT(String.valueOf("assistant")); + + private String value; + + RoleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RoleEnum fromValue(String value) { + for (RoleEnum b : RoleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ROLE = "role"; + @javax.annotation.Nullable + private RoleEnum role; + + public static final String JSON_PROPERTY_CONTENT = "content"; + @javax.annotation.Nullable + private String content; + + public ScenarioPromptItem() { + } + + @JsonCreator + public ScenarioPromptItem( + @JsonProperty(JSON_PROPERTY_ROLE) RoleEnum role, + @JsonProperty(JSON_PROPERTY_CONTENT) String content + ) { + this(); + this.role = role; + this.content = content; + } + + /** + * Get role + * @return role + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RoleEnum getRole() { + return role; + } + + + + + /** + * Get content + * @return content + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getContent() { + return content; + } + + + + + /** + * Return true if this ScenarioPromptItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioPromptItem scenarioPromptItem = (ScenarioPromptItem) o; + return Objects.equals(this.role, scenarioPromptItem.role) && + Objects.equals(this.content, scenarioPromptItem.content); + } + + @Override + public int hashCode() { + return Objects.hash(role, content); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioPromptItem {\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `role` to the URL query string + if (getRole() != null) { + joiner.add(String.format("%srole%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRole())))); + } + + // add `content` to the URL query string + if (getContent() != null) { + joiner.add(String.format("%scontent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContent())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptsUpdateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptsUpdateResponse.java new file mode 100644 index 0000000..f14dec4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioPromptsUpdateResponse.java @@ -0,0 +1,177 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioPromptsUpdateResponse + */ +@JsonPropertyOrder({ + ScenarioPromptsUpdateResponse.JSON_PROPERTY_MESSAGE, + ScenarioPromptsUpdateResponse.JSON_PROPERTY_PROMPTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioPromptsUpdateResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_PROMPTS = "prompts"; + @javax.annotation.Nullable + private String prompts; + + public ScenarioPromptsUpdateResponse() { + } + + @JsonCreator + public ScenarioPromptsUpdateResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_PROMPTS) String prompts + ) { + this(); + this.message = message; + this.prompts = prompts; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get prompts + * @return prompts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPrompts() { + return prompts; + } + + + + + /** + * Return true if this ScenarioPromptsUpdateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioPromptsUpdateResponse scenarioPromptsUpdateResponse = (ScenarioPromptsUpdateResponse) o; + return Objects.equals(this.message, scenarioPromptsUpdateResponse.message) && + Objects.equals(this.prompts, scenarioPromptsUpdateResponse.prompts); + } + + @Override + public int hashCode() { + return Objects.hash(message, prompts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioPromptsUpdateResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" prompts: ").append(toIndentedString(prompts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `prompts` to the URL query string + if (getPrompts() != null) { + joiner.add(String.format("%sprompts%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrompts())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioResponse.java new file mode 100644 index 0000000..3047758 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScenarioResponse.java @@ -0,0 +1,1060 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScenarioResponse + */ +@JsonPropertyOrder({ + ScenarioResponse.JSON_PROPERTY_ID, + ScenarioResponse.JSON_PROPERTY_NAME, + ScenarioResponse.JSON_PROPERTY_DESCRIPTION, + ScenarioResponse.JSON_PROPERTY_SOURCE, + ScenarioResponse.JSON_PROPERTY_SCENARIO_TYPE, + ScenarioResponse.JSON_PROPERTY_SCENARIO_TYPE_DISPLAY, + ScenarioResponse.JSON_PROPERTY_SOURCE_TYPE, + ScenarioResponse.JSON_PROPERTY_SOURCE_TYPE_DISPLAY, + ScenarioResponse.JSON_PROPERTY_ORGANIZATION, + ScenarioResponse.JSON_PROPERTY_DATASET, + ScenarioResponse.JSON_PROPERTY_DATASET_ROWS, + ScenarioResponse.JSON_PROPERTY_DATASET_COLUMN_CONFIG, + ScenarioResponse.JSON_PROPERTY_GRAPH, + ScenarioResponse.JSON_PROPERTY_AGENT, + ScenarioResponse.JSON_PROPERTY_PROMPT_TEMPLATE, + ScenarioResponse.JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL, + ScenarioResponse.JSON_PROPERTY_PROMPT_VERSION, + ScenarioResponse.JSON_PROPERTY_PROMPT_VERSION_DETAIL, + ScenarioResponse.JSON_PROPERTY_CREATED_AT, + ScenarioResponse.JSON_PROPERTY_UPDATED_AT, + ScenarioResponse.JSON_PROPERTY_DELETED, + ScenarioResponse.JSON_PROPERTY_STATUS, + ScenarioResponse.JSON_PROPERTY_DELETED_AT, + ScenarioResponse.JSON_PROPERTY_AGENT_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScenarioResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nonnull + private String source; + + /** + * Type of scenario (graph, script, or dataset) + */ + public enum ScenarioTypeEnum { + GRAPH(String.valueOf("graph")), + + SCRIPT(String.valueOf("script")), + + DATASET(String.valueOf("dataset")); + + private String value; + + ScenarioTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScenarioTypeEnum fromValue(String value) { + for (ScenarioTypeEnum b : ScenarioTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCENARIO_TYPE = "scenario_type"; + @javax.annotation.Nullable + private ScenarioTypeEnum scenarioType; + + public static final String JSON_PROPERTY_SCENARIO_TYPE_DISPLAY = "scenario_type_display"; + @javax.annotation.Nullable + private String scenarioTypeDisplay; + + /** + * Source type for the scenario: agent_definition or prompt + */ + public enum SourceTypeEnum { + AGENT_DEFINITION(String.valueOf("agent_definition")), + + PROMPT(String.valueOf("prompt")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nullable + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_SOURCE_TYPE_DISPLAY = "source_type_display"; + @javax.annotation.Nullable + private String sourceTypeDisplay; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_DATASET = "dataset"; + private JsonNullable dataset = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATASET_ROWS = "dataset_rows"; + @javax.annotation.Nullable + private String datasetRows; + + public static final String JSON_PROPERTY_DATASET_COLUMN_CONFIG = "dataset_column_config"; + @javax.annotation.Nullable + private String datasetColumnConfig; + + public static final String JSON_PROPERTY_GRAPH = "graph"; + @javax.annotation.Nullable + private String graph; + + public static final String JSON_PROPERTY_AGENT = "agent"; + @javax.annotation.Nullable + private String agent; + + public static final String JSON_PROPERTY_PROMPT_TEMPLATE = "prompt_template"; + private JsonNullable promptTemplate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL = "prompt_template_detail"; + @javax.annotation.Nullable + private String promptTemplateDetail; + + public static final String JSON_PROPERTY_PROMPT_VERSION = "prompt_version"; + private JsonNullable promptVersion = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROMPT_VERSION_DETAIL = "prompt_version_detail"; + @javax.annotation.Nullable + private String promptVersionDetail; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_DELETED = "deleted"; + @javax.annotation.Nullable + private Boolean deleted; + + /** + * Status of the scenario + */ + public enum StatusEnum { + NOT_STARTED(String.valueOf("NotStarted")), + + QUEUED(String.valueOf("Queued")), + + RUNNING(String.valueOf("Running")), + + COMPLETED(String.valueOf("Completed")), + + EDITING(String.valueOf("Editing")), + + INACTIVE(String.valueOf("Inactive")), + + FAILED(String.valueOf("Failed")), + + PARTIAL_RUN(String.valueOf("PartialRun")), + + EXPERIMENT_EVALUATION(String.valueOf("ExperimentEvaluation")), + + UPLOADING(String.valueOf("Uploading")), + + PARTIAL_EXTRACTED(String.valueOf("PartialExtracted")), + + PROCESSING(String.valueOf("Processing")), + + DELETING(String.valueOf("Deleting")), + + PARTIAL_COMPLETED(String.valueOf("PartialCompleted")), + + OPTIMIZATION_EVALUATION(String.valueOf("OptimizationEvaluation")), + + ERROR(String.valueOf("Error")), + + CANCELLED(String.valueOf("Cancelled")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private String agentType; + + public ScenarioResponse() { + } + + @JsonCreator + public ScenarioResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE_DISPLAY) String scenarioTypeDisplay, + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_DISPLAY) String sourceTypeDisplay, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_DATASET_ROWS) String datasetRows, + @JsonProperty(JSON_PROPERTY_DATASET_COLUMN_CONFIG) String datasetColumnConfig, + @JsonProperty(JSON_PROPERTY_GRAPH) String graph, + @JsonProperty(JSON_PROPERTY_AGENT) String agent, + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL) String promptTemplateDetail, + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_DETAIL) String promptVersionDetail, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_DELETED) Boolean deleted, + @JsonProperty(JSON_PROPERTY_DELETED_AT) OffsetDateTime deletedAt, + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) String agentType + ) { + this(); + this.id = id; + this.scenarioTypeDisplay = scenarioTypeDisplay; + this.sourceTypeDisplay = sourceTypeDisplay; + this.organization = organization; + this.datasetRows = datasetRows; + this.datasetColumnConfig = datasetColumnConfig; + this.graph = graph; + this.agent = agent; + this.promptTemplateDetail = promptTemplateDetail; + this.promptVersionDetail = promptVersionDetail; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.deleted = deleted; + this.deletedAt = deletedAt == null ? JsonNullable.undefined() : JsonNullable.of(deletedAt); + this.agentType = agentType; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public ScenarioResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the scenario + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public ScenarioResponse description(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Optional description of the scenario + * @return description + */ + @javax.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public ScenarioResponse source(@javax.annotation.Nonnull String source) { + this.source = source; + return this; + } + + /** + * Source content or reference for the scenario + * @return source + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@javax.annotation.Nonnull String source) { + this.source = source; + } + + + public ScenarioResponse scenarioType(@javax.annotation.Nullable ScenarioTypeEnum scenarioType) { + this.scenarioType = scenarioType; + return this; + } + + /** + * Type of scenario (graph, script, or dataset) + * @return scenarioType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScenarioTypeEnum getScenarioType() { + return scenarioType; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioType(@javax.annotation.Nullable ScenarioTypeEnum scenarioType) { + this.scenarioType = scenarioType; + } + + + /** + * Get scenarioTypeDisplay + * @return scenarioTypeDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_TYPE_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenarioTypeDisplay() { + return scenarioTypeDisplay; + } + + + + + public ScenarioResponse sourceType(@javax.annotation.Nullable SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Source type for the scenario: agent_definition or prompt + * @return sourceType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceType(@javax.annotation.Nullable SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + /** + * Get sourceTypeDisplay + * @return sourceTypeDisplay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE_DISPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceTypeDisplay() { + return sourceTypeDisplay; + } + + + + + /** + * Organization this scenario belongs to + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + public ScenarioResponse dataset(@javax.annotation.Nullable UUID dataset) { + this.dataset = JsonNullable.of(dataset); + return this; + } + + /** + * Dataset associated with this scenario (only for dataset type scenarios) + * @return dataset + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getDataset() { + return dataset.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDataset_JsonNullable() { + return dataset; + } + + @JsonProperty(JSON_PROPERTY_DATASET) + public void setDataset_JsonNullable(JsonNullable dataset) { + this.dataset = dataset; + } + + public void setDataset(@javax.annotation.Nullable UUID dataset) { + this.dataset = JsonNullable.of(dataset); + } + + + /** + * Get datasetRows + * @return datasetRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetRows() { + return datasetRows; + } + + + + + /** + * Get datasetColumnConfig + * @return datasetColumnConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_COLUMN_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetColumnConfig() { + return datasetColumnConfig; + } + + + + + /** + * Get graph + * @return graph + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRAPH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGraph() { + return graph; + } + + + + + /** + * Get agent + * @return agent + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgent() { + return agent; + } + + + + + public ScenarioResponse promptTemplate(@javax.annotation.Nullable UUID promptTemplate) { + this.promptTemplate = JsonNullable.of(promptTemplate); + return this; + } + + /** + * Prompt template associated with this scenario (only for prompt source type) + * @return promptTemplate + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptTemplate() { + return promptTemplate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptTemplate_JsonNullable() { + return promptTemplate; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE) + public void setPromptTemplate_JsonNullable(JsonNullable promptTemplate) { + this.promptTemplate = promptTemplate; + } + + public void setPromptTemplate(@javax.annotation.Nullable UUID promptTemplate) { + this.promptTemplate = JsonNullable.of(promptTemplate); + } + + + /** + * Get promptTemplateDetail + * @return promptTemplateDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_TEMPLATE_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPromptTemplateDetail() { + return promptTemplateDetail; + } + + + + + public ScenarioResponse promptVersion(@javax.annotation.Nullable UUID promptVersion) { + this.promptVersion = JsonNullable.of(promptVersion); + return this; + } + + /** + * Prompt version associated with this scenario (only for prompt source type) + * @return promptVersion + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getPromptVersion() { + return promptVersion.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPromptVersion_JsonNullable() { + return promptVersion; + } + + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION) + public void setPromptVersion_JsonNullable(JsonNullable promptVersion) { + this.promptVersion = promptVersion; + } + + public void setPromptVersion(@javax.annotation.Nullable UUID promptVersion) { + this.promptVersion = JsonNullable.of(promptVersion); + } + + + /** + * Get promptVersionDetail + * @return promptVersionDetail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPromptVersionDetail() { + return promptVersionDetail; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Get deleted + * @return deleted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeleted() { + return deleted; + } + + + + + public ScenarioResponse status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the scenario + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + /** + * Get deletedAt + * @return deletedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + + if (deletedAt == null) { + deletedAt = JsonNullable.undefined(); + } + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + private void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentType() { + return agentType; + } + + + + + /** + * Return true if this ScenarioResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScenarioResponse scenarioResponse = (ScenarioResponse) o; + return Objects.equals(this.id, scenarioResponse.id) && + Objects.equals(this.name, scenarioResponse.name) && + equalsNullable(this.description, scenarioResponse.description) && + Objects.equals(this.source, scenarioResponse.source) && + Objects.equals(this.scenarioType, scenarioResponse.scenarioType) && + Objects.equals(this.scenarioTypeDisplay, scenarioResponse.scenarioTypeDisplay) && + Objects.equals(this.sourceType, scenarioResponse.sourceType) && + Objects.equals(this.sourceTypeDisplay, scenarioResponse.sourceTypeDisplay) && + Objects.equals(this.organization, scenarioResponse.organization) && + equalsNullable(this.dataset, scenarioResponse.dataset) && + Objects.equals(this.datasetRows, scenarioResponse.datasetRows) && + Objects.equals(this.datasetColumnConfig, scenarioResponse.datasetColumnConfig) && + Objects.equals(this.graph, scenarioResponse.graph) && + Objects.equals(this.agent, scenarioResponse.agent) && + equalsNullable(this.promptTemplate, scenarioResponse.promptTemplate) && + Objects.equals(this.promptTemplateDetail, scenarioResponse.promptTemplateDetail) && + equalsNullable(this.promptVersion, scenarioResponse.promptVersion) && + Objects.equals(this.promptVersionDetail, scenarioResponse.promptVersionDetail) && + Objects.equals(this.createdAt, scenarioResponse.createdAt) && + Objects.equals(this.updatedAt, scenarioResponse.updatedAt) && + Objects.equals(this.deleted, scenarioResponse.deleted) && + Objects.equals(this.status, scenarioResponse.status) && + equalsNullable(this.deletedAt, scenarioResponse.deletedAt) && + Objects.equals(this.agentType, scenarioResponse.agentType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(description), source, scenarioType, scenarioTypeDisplay, sourceType, sourceTypeDisplay, organization, hashCodeNullable(dataset), datasetRows, datasetColumnConfig, graph, agent, hashCodeNullable(promptTemplate), promptTemplateDetail, hashCodeNullable(promptVersion), promptVersionDetail, createdAt, updatedAt, deleted, status, hashCodeNullable(deletedAt), agentType); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScenarioResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" scenarioType: ").append(toIndentedString(scenarioType)).append("\n"); + sb.append(" scenarioTypeDisplay: ").append(toIndentedString(scenarioTypeDisplay)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceTypeDisplay: ").append(toIndentedString(sourceTypeDisplay)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" datasetRows: ").append(toIndentedString(datasetRows)).append("\n"); + sb.append(" datasetColumnConfig: ").append(toIndentedString(datasetColumnConfig)).append("\n"); + sb.append(" graph: ").append(toIndentedString(graph)).append("\n"); + sb.append(" agent: ").append(toIndentedString(agent)).append("\n"); + sb.append(" promptTemplate: ").append(toIndentedString(promptTemplate)).append("\n"); + sb.append(" promptTemplateDetail: ").append(toIndentedString(promptTemplateDetail)).append("\n"); + sb.append(" promptVersion: ").append(toIndentedString(promptVersion)).append("\n"); + sb.append(" promptVersionDetail: ").append(toIndentedString(promptVersionDetail)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(String.format("%ssource%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSource())))); + } + + // add `scenario_type` to the URL query string + if (getScenarioType() != null) { + joiner.add(String.format("%sscenario_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioType())))); + } + + // add `scenario_type_display` to the URL query string + if (getScenarioTypeDisplay() != null) { + joiner.add(String.format("%sscenario_type_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioTypeDisplay())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_type_display` to the URL query string + if (getSourceTypeDisplay() != null) { + joiner.add(String.format("%ssource_type_display%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceTypeDisplay())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + joiner.add(String.format("%sdataset%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataset())))); + } + + // add `dataset_rows` to the URL query string + if (getDatasetRows() != null) { + joiner.add(String.format("%sdataset_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetRows())))); + } + + // add `dataset_column_config` to the URL query string + if (getDatasetColumnConfig() != null) { + joiner.add(String.format("%sdataset_column_config%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetColumnConfig())))); + } + + // add `graph` to the URL query string + if (getGraph() != null) { + joiner.add(String.format("%sgraph%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGraph())))); + } + + // add `agent` to the URL query string + if (getAgent() != null) { + joiner.add(String.format("%sagent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgent())))); + } + + // add `prompt_template` to the URL query string + if (getPromptTemplate() != null) { + joiner.add(String.format("%sprompt_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptTemplate())))); + } + + // add `prompt_template_detail` to the URL query string + if (getPromptTemplateDetail() != null) { + joiner.add(String.format("%sprompt_template_detail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptTemplateDetail())))); + } + + // add `prompt_version` to the URL query string + if (getPromptVersion() != null) { + joiner.add(String.format("%sprompt_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptVersion())))); + } + + // add `prompt_version_detail` to the URL query string + if (getPromptVersionDetail() != null) { + joiner.add(String.format("%sprompt_version_detail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPromptVersionDetail())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `deleted` to the URL query string + if (getDeleted() != null) { + joiner.add(String.format("%sdeleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeleted())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `deleted_at` to the URL query string + if (getDeletedAt() != null) { + joiner.add(String.format("%sdeleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeletedAt())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Score.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Score.java new file mode 100644 index 0000000..7bf9e46 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Score.java @@ -0,0 +1,807 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Score + */ +@JsonPropertyOrder({ + Score.JSON_PROPERTY_ID, + Score.JSON_PROPERTY_SOURCE_TYPE, + Score.JSON_PROPERTY_SOURCE_ID, + Score.JSON_PROPERTY_LABEL_ID, + Score.JSON_PROPERTY_LABEL_NAME, + Score.JSON_PROPERTY_LABEL_TYPE, + Score.JSON_PROPERTY_LABEL_SETTINGS, + Score.JSON_PROPERTY_LABEL_ALLOW_NOTES, + Score.JSON_PROPERTY_VALUE, + Score.JSON_PROPERTY_SCORE_SOURCE, + Score.JSON_PROPERTY_NOTES, + Score.JSON_PROPERTY_ANNOTATOR, + Score.JSON_PROPERTY_ANNOTATOR_NAME, + Score.JSON_PROPERTY_ANNOTATOR_EMAIL, + Score.JSON_PROPERTY_QUEUE_ITEM, + Score.JSON_PROPERTY_QUEUE_ID, + Score.JSON_PROPERTY_CREATED_AT, + Score.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Score { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + DATASET_ROW(String.valueOf("dataset_row")), + + TRACE(String.valueOf("trace")), + + OBSERVATION_SPAN(String.valueOf("observation_span")), + + PROTOTYPE_RUN(String.valueOf("prototype_run")), + + CALL_EXECUTION(String.valueOf("call_execution")), + + TRACE_SESSION(String.valueOf("trace_session")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; + @javax.annotation.Nullable + private String sourceId; + + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nullable + private UUID labelId; + + public static final String JSON_PROPERTY_LABEL_NAME = "label_name"; + @javax.annotation.Nullable + private String labelName; + + public static final String JSON_PROPERTY_LABEL_TYPE = "label_type"; + @javax.annotation.Nullable + private String labelType; + + public static final String JSON_PROPERTY_LABEL_SETTINGS = "label_settings"; + @javax.annotation.Nullable + private Map labelSettings = new HashMap<>(); + + public static final String JSON_PROPERTY_LABEL_ALLOW_NOTES = "label_allow_notes"; + @javax.annotation.Nullable + private Boolean labelAllowNotes; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Map value = new HashMap<>(); + + /** + * Gets or Sets scoreSource + */ + public enum ScoreSourceEnum { + HUMAN(String.valueOf("human")), + + API(String.valueOf("api")), + + AUTO(String.valueOf("auto")), + + IMPORTED(String.valueOf("imported")); + + private String value; + + ScoreSourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScoreSourceEnum fromValue(String value) { + for (ScoreSourceEnum b : ScoreSourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCORE_SOURCE = "score_source"; + @javax.annotation.Nullable + private ScoreSourceEnum scoreSource; + + public static final String JSON_PROPERTY_NOTES = "notes"; + private JsonNullable notes = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANNOTATOR = "annotator"; + private JsonNullable annotator = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANNOTATOR_NAME = "annotator_name"; + @javax.annotation.Nullable + private String annotatorName; + + public static final String JSON_PROPERTY_ANNOTATOR_EMAIL = "annotator_email"; + @javax.annotation.Nullable + private String annotatorEmail; + + public static final String JSON_PROPERTY_QUEUE_ITEM = "queue_item"; + private JsonNullable queueItem = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_QUEUE_ID = "queue_id"; + @javax.annotation.Nullable + private String queueId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public Score() { + } + + @JsonCreator + public Score( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_SOURCE_ID) String sourceId, + @JsonProperty(JSON_PROPERTY_LABEL_ID) UUID labelId, + @JsonProperty(JSON_PROPERTY_LABEL_NAME) String labelName, + @JsonProperty(JSON_PROPERTY_LABEL_TYPE) String labelType, + @JsonProperty(JSON_PROPERTY_LABEL_SETTINGS) Map labelSettings, + @JsonProperty(JSON_PROPERTY_LABEL_ALLOW_NOTES) Boolean labelAllowNotes, + @JsonProperty(JSON_PROPERTY_ANNOTATOR) UUID annotator, + @JsonProperty(JSON_PROPERTY_ANNOTATOR_NAME) String annotatorName, + @JsonProperty(JSON_PROPERTY_ANNOTATOR_EMAIL) String annotatorEmail, + @JsonProperty(JSON_PROPERTY_QUEUE_ITEM) UUID queueItem, + @JsonProperty(JSON_PROPERTY_QUEUE_ID) String queueId, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.sourceId = sourceId; + this.labelId = labelId; + this.labelName = labelName; + this.labelType = labelType; + this.labelSettings = labelSettings; + this.labelAllowNotes = labelAllowNotes; + this.annotator = annotator == null ? JsonNullable.undefined() : JsonNullable.of(annotator); + this.annotatorName = annotatorName; + this.annotatorEmail = annotatorEmail; + this.queueItem = queueItem == null ? JsonNullable.undefined() : JsonNullable.of(queueItem); + this.queueId = queueId; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public Score sourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + /** + * Get sourceId + * @return sourceId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceId() { + return sourceId; + } + + + + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getLabelId() { + return labelId; + } + + + + + /** + * Get labelName + * @return labelName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLabelName() { + return labelName; + } + + + + + /** + * Get labelType + * @return labelType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLabelType() { + return labelType; + } + + + + + /** + * Get labelSettings + * @return labelSettings + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getLabelSettings() { + return labelSettings; + } + + + + + /** + * Get labelAllowNotes + * @return labelAllowNotes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL_ALLOW_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getLabelAllowNotes() { + return labelAllowNotes; + } + + + + + public Score value(@javax.annotation.Nonnull Map value) { + this.value = value; + return this; + } + + public Score putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Map value) { + this.value = value; + } + + + public Score scoreSource(@javax.annotation.Nullable ScoreSourceEnum scoreSource) { + this.scoreSource = scoreSource; + return this; + } + + /** + * Get scoreSource + * @return scoreSource + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScoreSourceEnum getScoreSource() { + return scoreSource; + } + + + @JsonProperty(JSON_PROPERTY_SCORE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScoreSource(@javax.annotation.Nullable ScoreSourceEnum scoreSource) { + this.scoreSource = scoreSource; + } + + + public Score notes(@javax.annotation.Nullable String notes) { + this.notes = JsonNullable.of(notes); + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNotes() { + return notes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNotes_JsonNullable() { + return notes; + } + + @JsonProperty(JSON_PROPERTY_NOTES) + public void setNotes_JsonNullable(JsonNullable notes) { + this.notes = notes; + } + + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = JsonNullable.of(notes); + } + + + /** + * Get annotator + * @return annotator + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAnnotator() { + + if (annotator == null) { + annotator = JsonNullable.undefined(); + } + return annotator.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ANNOTATOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAnnotator_JsonNullable() { + return annotator; + } + + @JsonProperty(JSON_PROPERTY_ANNOTATOR) + private void setAnnotator_JsonNullable(JsonNullable annotator) { + this.annotator = annotator; + } + + + + /** + * Get annotatorName + * @return annotatorName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATOR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAnnotatorName() { + return annotatorName; + } + + + + + /** + * Get annotatorEmail + * @return annotatorEmail + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATOR_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAnnotatorEmail() { + return annotatorEmail; + } + + + + + /** + * Get queueItem + * @return queueItem + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getQueueItem() { + + if (queueItem == null) { + queueItem = JsonNullable.undefined(); + } + return queueItem.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_QUEUE_ITEM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getQueueItem_JsonNullable() { + return queueItem; + } + + @JsonProperty(JSON_PROPERTY_QUEUE_ITEM) + private void setQueueItem_JsonNullable(JsonNullable queueItem) { + this.queueItem = queueItem; + } + + + + /** + * Get queueId + * @return queueId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUEUE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQueueId() { + return queueId; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Return true if this Score object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Score score = (Score) o; + return Objects.equals(this.id, score.id) && + Objects.equals(this.sourceType, score.sourceType) && + Objects.equals(this.sourceId, score.sourceId) && + Objects.equals(this.labelId, score.labelId) && + Objects.equals(this.labelName, score.labelName) && + Objects.equals(this.labelType, score.labelType) && + Objects.equals(this.labelSettings, score.labelSettings) && + Objects.equals(this.labelAllowNotes, score.labelAllowNotes) && + Objects.equals(this.value, score.value) && + Objects.equals(this.scoreSource, score.scoreSource) && + equalsNullable(this.notes, score.notes) && + equalsNullable(this.annotator, score.annotator) && + Objects.equals(this.annotatorName, score.annotatorName) && + Objects.equals(this.annotatorEmail, score.annotatorEmail) && + equalsNullable(this.queueItem, score.queueItem) && + Objects.equals(this.queueId, score.queueId) && + Objects.equals(this.createdAt, score.createdAt) && + Objects.equals(this.updatedAt, score.updatedAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, sourceType, sourceId, labelId, labelName, labelType, labelSettings, labelAllowNotes, value, scoreSource, hashCodeNullable(notes), hashCodeNullable(annotator), annotatorName, annotatorEmail, hashCodeNullable(queueItem), queueId, createdAt, updatedAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Score {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" labelName: ").append(toIndentedString(labelName)).append("\n"); + sb.append(" labelType: ").append(toIndentedString(labelType)).append("\n"); + sb.append(" labelSettings: ").append(toIndentedString(labelSettings)).append("\n"); + sb.append(" labelAllowNotes: ").append(toIndentedString(labelAllowNotes)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" scoreSource: ").append(toIndentedString(scoreSource)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" annotator: ").append(toIndentedString(annotator)).append("\n"); + sb.append(" annotatorName: ").append(toIndentedString(annotatorName)).append("\n"); + sb.append(" annotatorEmail: ").append(toIndentedString(annotatorEmail)).append("\n"); + sb.append(" queueItem: ").append(toIndentedString(queueItem)).append("\n"); + sb.append(" queueId: ").append(toIndentedString(queueId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `source_id` to the URL query string + if (getSourceId() != null) { + joiner.add(String.format("%ssource_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceId())))); + } + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `label_name` to the URL query string + if (getLabelName() != null) { + joiner.add(String.format("%slabel_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelName())))); + } + + // add `label_type` to the URL query string + if (getLabelType() != null) { + joiner.add(String.format("%slabel_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelType())))); + } + + // add `label_settings` to the URL query string + if (getLabelSettings() != null) { + for (String _key : getLabelSettings().keySet()) { + joiner.add(String.format("%slabel_settings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getLabelSettings().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getLabelSettings().get(_key))))); + } + } + + // add `label_allow_notes` to the URL query string + if (getLabelAllowNotes() != null) { + joiner.add(String.format("%slabel_allow_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelAllowNotes())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `score_source` to the URL query string + if (getScoreSource() != null) { + joiner.add(String.format("%sscore_source%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScoreSource())))); + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `annotator` to the URL query string + if (getAnnotator() != null) { + joiner.add(String.format("%sannotator%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotator())))); + } + + // add `annotator_name` to the URL query string + if (getAnnotatorName() != null) { + joiner.add(String.format("%sannotator_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotatorName())))); + } + + // add `annotator_email` to the URL query string + if (getAnnotatorEmail() != null) { + joiner.add(String.format("%sannotator_email%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotatorEmail())))); + } + + // add `queue_item` to the URL query string + if (getQueueItem() != null) { + joiner.add(String.format("%squeue_item%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueueItem())))); + } + + // add `queue_id` to the URL query string + if (getQueueId() != null) { + joiner.add(String.format("%squeue_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueueId())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreDeleteResponse.java new file mode 100644 index 0000000..36563ab --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreDeleteResponse.java @@ -0,0 +1,201 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScoreDeleteResponse + */ +@JsonPropertyOrder({ + ScoreDeleteResponse.JSON_PROPERTY_STATUS, + ScoreDeleteResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScoreDeleteResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Map result = new HashMap<>(); + + public ScoreDeleteResponse() { + } + + public ScoreDeleteResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ScoreDeleteResponse result(@javax.annotation.Nonnull Map result) { + this.result = result; + return this; + } + + public ScoreDeleteResponse putResultItem(String key, Boolean resultItem) { + if (this.result == null) { + this.result = new HashMap<>(); + } + this.result.put(key, resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Map result) { + this.result = result; + } + + + /** + * Return true if this ScoreDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScoreDeleteResponse scoreDeleteResponse = (ScoreDeleteResponse) o; + return Objects.equals(this.status, scoreDeleteResponse.status) && + Objects.equals(this.result, scoreDeleteResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScoreDeleteResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (String _key : getResult().keySet()) { + joiner.add(String.format("%sresult%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getResult().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getResult().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreForSourceResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreForSourceResponse.java new file mode 100644 index 0000000..517073b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreForSourceResponse.java @@ -0,0 +1,252 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Score; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScoreForSourceResponse + */ +@JsonPropertyOrder({ + ScoreForSourceResponse.JSON_PROPERTY_STATUS, + ScoreForSourceResponse.JSON_PROPERTY_RESULT, + ScoreForSourceResponse.JSON_PROPERTY_SPAN_NOTES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScoreForSourceResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private List result = new ArrayList<>(); + + public static final String JSON_PROPERTY_SPAN_NOTES = "span_notes"; + @javax.annotation.Nullable + private List> spanNotes = new ArrayList<>(); + + public ScoreForSourceResponse() { + } + + public ScoreForSourceResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ScoreForSourceResponse result(@javax.annotation.Nonnull List result) { + this.result = result; + return this; + } + + public ScoreForSourceResponse addResultItem(Score resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull List result) { + this.result = result; + } + + + public ScoreForSourceResponse spanNotes(@javax.annotation.Nullable List> spanNotes) { + this.spanNotes = spanNotes; + return this; + } + + public ScoreForSourceResponse addSpanNotesItem(Map spanNotesItem) { + if (this.spanNotes == null) { + this.spanNotes = new ArrayList<>(); + } + this.spanNotes.add(spanNotesItem); + return this; + } + + /** + * Get spanNotes + * @return spanNotes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getSpanNotes() { + return spanNotes; + } + + + @JsonProperty(JSON_PROPERTY_SPAN_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSpanNotes(@javax.annotation.Nullable List> spanNotes) { + this.spanNotes = spanNotes; + } + + + /** + * Return true if this ScoreForSourceResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScoreForSourceResponse scoreForSourceResponse = (ScoreForSourceResponse) o; + return Objects.equals(this.status, scoreForSourceResponse.status) && + Objects.equals(this.result, scoreForSourceResponse.result) && + Objects.equals(this.spanNotes, scoreForSourceResponse.spanNotes); + } + + @Override + public int hashCode() { + return Objects.hash(status, result, spanNotes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScoreForSourceResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" spanNotes: ").append(toIndentedString(spanNotes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `span_notes` to the URL query string + if (getSpanNotes() != null) { + for (int i = 0; i < getSpanNotes().size(); i++) { + joiner.add(String.format("%sspan_notes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSpanNotes().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreResponse.java new file mode 100644 index 0000000..cad8cbc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Score; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScoreResponse + */ +@JsonPropertyOrder({ + ScoreResponse.JSON_PROPERTY_STATUS, + ScoreResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScoreResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private Score result; + + public ScoreResponse() { + } + + public ScoreResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public ScoreResponse result(@javax.annotation.Nonnull Score result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Score getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull Score result) { + this.result = result; + } + + + /** + * Return true if this ScoreResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScoreResponse scoreResponse = (ScoreResponse) o; + return Objects.equals(this.status, scoreResponse.status) && + Objects.equals(this.result, scoreResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScoreResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreTrend.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreTrend.java new file mode 100644 index 0000000..419e0ee --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/ScoreTrend.java @@ -0,0 +1,276 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * ScoreTrend + */ +@JsonPropertyOrder({ + ScoreTrend.JSON_PROPERTY_LABEL, + ScoreTrend.JSON_PROPERTY_CURRENT, + ScoreTrend.JSON_PROPERTY_PREV, + ScoreTrend.JSON_PROPERTY_SPARKLINE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class ScoreTrend { + public static final String JSON_PROPERTY_LABEL = "label"; + @javax.annotation.Nonnull + private String label; + + public static final String JSON_PROPERTY_CURRENT = "current"; + @javax.annotation.Nonnull + private BigDecimal current; + + public static final String JSON_PROPERTY_PREV = "prev"; + @javax.annotation.Nonnull + private BigDecimal prev; + + public static final String JSON_PROPERTY_SPARKLINE = "sparkline"; + @javax.annotation.Nonnull + private List sparkline = new ArrayList<>(); + + public ScoreTrend() { + } + + public ScoreTrend label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + public ScoreTrend current(@javax.annotation.Nonnull BigDecimal current) { + this.current = current; + return this; + } + + /** + * Get current + * @return current + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCurrent() { + return current; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrent(@javax.annotation.Nonnull BigDecimal current) { + this.current = current; + } + + + public ScoreTrend prev(@javax.annotation.Nonnull BigDecimal prev) { + this.prev = prev; + return this; + } + + /** + * Get prev + * @return prev + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PREV) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getPrev() { + return prev; + } + + + @JsonProperty(JSON_PROPERTY_PREV) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPrev(@javax.annotation.Nonnull BigDecimal prev) { + this.prev = prev; + } + + + public ScoreTrend sparkline(@javax.annotation.Nonnull List sparkline) { + this.sparkline = sparkline; + return this; + } + + public ScoreTrend addSparklineItem(BigDecimal sparklineItem) { + if (this.sparkline == null) { + this.sparkline = new ArrayList<>(); + } + this.sparkline.add(sparklineItem); + return this; + } + + /** + * Get sparkline + * @return sparkline + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SPARKLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSparkline() { + return sparkline; + } + + + @JsonProperty(JSON_PROPERTY_SPARKLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSparkline(@javax.annotation.Nonnull List sparkline) { + this.sparkline = sparkline; + } + + + /** + * Return true if this ScoreTrend object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScoreTrend scoreTrend = (ScoreTrend) o; + return Objects.equals(this.label, scoreTrend.label) && + Objects.equals(this.current, scoreTrend.current) && + Objects.equals(this.prev, scoreTrend.prev) && + Objects.equals(this.sparkline, scoreTrend.sparkline); + } + + @Override + public int hashCode() { + return Objects.hash(label, current, prev, sparkline); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScoreTrend {\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" current: ").append(toIndentedString(current)).append("\n"); + sb.append(" prev: ").append(toIndentedString(prev)).append("\n"); + sb.append(" sparkline: ").append(toIndentedString(sparkline)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(String.format("%slabel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabel())))); + } + + // add `current` to the URL query string + if (getCurrent() != null) { + joiner.add(String.format("%scurrent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrent())))); + } + + // add `prev` to the URL query string + if (getPrev() != null) { + joiner.add(String.format("%sprev%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrev())))); + } + + // add `sparkline` to the URL query string + if (getSparkline() != null) { + for (int i = 0; i < getSparkline().size(); i++) { + if (getSparkline().get(i) != null) { + joiner.add(String.format("%ssparkline%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSparkline().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Selection.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Selection.java new file mode 100644 index 0000000..0c73ed8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Selection.java @@ -0,0 +1,468 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInner; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Selection + */ +@JsonPropertyOrder({ + Selection.JSON_PROPERTY_MODE, + Selection.JSON_PROPERTY_SOURCE_TYPE, + Selection.JSON_PROPERTY_PROJECT_ID, + Selection.JSON_PROPERTY_FILTER, + Selection.JSON_PROPERTY_EXCLUDE_IDS, + Selection.JSON_PROPERTY_REMOVE_SIMULATION_CALLS, + Selection.JSON_PROPERTY_IS_VOICE_CALL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Selection { + /** + * Gets or Sets mode + */ + public enum ModeEnum { + FILTER(String.valueOf("filter")); + + private String value; + + ModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModeEnum fromValue(String value) { + for (ModeEnum b : ModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_MODE = "mode"; + @javax.annotation.Nonnull + private ModeEnum mode; + + /** + * Gets or Sets sourceType + */ + public enum SourceTypeEnum { + CALL_EXECUTION(String.valueOf("call_execution")), + + OBSERVATION_SPAN(String.valueOf("observation_span")), + + TRACE(String.valueOf("trace")), + + TRACE_SESSION(String.valueOf("trace_session")); + + private String value; + + SourceTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceTypeEnum fromValue(String value) { + for (SourceTypeEnum b : SourceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nonnull + private SourceTypeEnum sourceType; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + @javax.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_FILTER = "filter"; + @javax.annotation.Nullable + private List filter = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXCLUDE_IDS = "exclude_ids"; + @javax.annotation.Nullable + private List excludeIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_REMOVE_SIMULATION_CALLS = "remove_simulation_calls"; + @javax.annotation.Nullable + private Boolean removeSimulationCalls = false; + + public static final String JSON_PROPERTY_IS_VOICE_CALL = "is_voice_call"; + @javax.annotation.Nullable + private Boolean isVoiceCall = false; + + public Selection() { + } + + public Selection mode(@javax.annotation.Nonnull ModeEnum mode) { + this.mode = mode; + return this; + } + + /** + * Get mode + * @return mode + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ModeEnum getMode() { + return mode; + } + + + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMode(@javax.annotation.Nonnull ModeEnum mode) { + this.mode = mode; + } + + + public Selection sourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceTypeEnum getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@javax.annotation.Nonnull SourceTypeEnum sourceType) { + this.sourceType = sourceType; + } + + + public Selection projectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public Selection filter(@javax.annotation.Nullable List filter) { + this.filter = filter; + return this; + } + + public Selection addFilterItem(AutomationRuleConditionsFilterInner filterItem) { + if (this.filter == null) { + this.filter = new ArrayList<>(); + } + this.filter.add(filterItem); + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFilter() { + return filter; + } + + + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilter(@javax.annotation.Nullable List filter) { + this.filter = filter; + } + + + public Selection excludeIds(@javax.annotation.Nullable List excludeIds) { + this.excludeIds = excludeIds; + return this; + } + + public Selection addExcludeIdsItem(String excludeIdsItem) { + if (this.excludeIds == null) { + this.excludeIds = new ArrayList<>(); + } + this.excludeIds.add(excludeIdsItem); + return this; + } + + /** + * Get excludeIds + * @return excludeIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExcludeIds() { + return excludeIds; + } + + + @JsonProperty(JSON_PROPERTY_EXCLUDE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExcludeIds(@javax.annotation.Nullable List excludeIds) { + this.excludeIds = excludeIds; + } + + + public Selection removeSimulationCalls(@javax.annotation.Nullable Boolean removeSimulationCalls) { + this.removeSimulationCalls = removeSimulationCalls; + return this; + } + + /** + * Get removeSimulationCalls + * @return removeSimulationCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOVE_SIMULATION_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRemoveSimulationCalls() { + return removeSimulationCalls; + } + + + @JsonProperty(JSON_PROPERTY_REMOVE_SIMULATION_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemoveSimulationCalls(@javax.annotation.Nullable Boolean removeSimulationCalls) { + this.removeSimulationCalls = removeSimulationCalls; + } + + + public Selection isVoiceCall(@javax.annotation.Nullable Boolean isVoiceCall) { + this.isVoiceCall = isVoiceCall; + return this; + } + + /** + * Get isVoiceCall + * @return isVoiceCall + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_VOICE_CALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsVoiceCall() { + return isVoiceCall; + } + + + @JsonProperty(JSON_PROPERTY_IS_VOICE_CALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsVoiceCall(@javax.annotation.Nullable Boolean isVoiceCall) { + this.isVoiceCall = isVoiceCall; + } + + + /** + * Return true if this Selection object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Selection selection = (Selection) o; + return Objects.equals(this.mode, selection.mode) && + Objects.equals(this.sourceType, selection.sourceType) && + Objects.equals(this.projectId, selection.projectId) && + Objects.equals(this.filter, selection.filter) && + Objects.equals(this.excludeIds, selection.excludeIds) && + Objects.equals(this.removeSimulationCalls, selection.removeSimulationCalls) && + Objects.equals(this.isVoiceCall, selection.isVoiceCall); + } + + @Override + public int hashCode() { + return Objects.hash(mode, sourceType, projectId, filter, excludeIds, removeSimulationCalls, isVoiceCall); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Selection {\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" excludeIds: ").append(toIndentedString(excludeIds)).append("\n"); + sb.append(" removeSimulationCalls: ").append(toIndentedString(removeSimulationCalls)).append("\n"); + sb.append(" isVoiceCall: ").append(toIndentedString(isVoiceCall)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `mode` to the URL query string + if (getMode() != null) { + joiner.add(String.format("%smode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMode())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + // add `project_id` to the URL query string + if (getProjectId() != null) { + joiner.add(String.format("%sproject_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectId())))); + } + + // add `filter` to the URL query string + if (getFilter() != null) { + for (int i = 0; i < getFilter().size(); i++) { + if (getFilter().get(i) != null) { + joiner.add(getFilter().get(i).toUrlQueryString(String.format("%sfilter%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `exclude_ids` to the URL query string + if (getExcludeIds() != null) { + for (int i = 0; i < getExcludeIds().size(); i++) { + joiner.add(String.format("%sexclude_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getExcludeIds().get(i))))); + } + } + + // add `remove_simulation_calls` to the URL query string + if (getRemoveSimulationCalls() != null) { + joiner.add(String.format("%sremove_simulation_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemoveSimulationCalls())))); + } + + // add `is_voice_call` to the URL query string + if (getIsVoiceCall() != null) { + joiner.add(String.format("%sis_voice_call%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsVoiceCall())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SendChatRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SendChatRequest.java new file mode 100644 index 0000000..a95e7ee --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SendChatRequest.java @@ -0,0 +1,279 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ChatMessageContract; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SendChatRequest + */ +@JsonPropertyOrder({ + SendChatRequest.JSON_PROPERTY_MESSAGES, + SendChatRequest.JSON_PROPERTY_METRICS, + SendChatRequest.JSON_PROPERTY_INITIATE_CHAT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SendChatRequest { + public static final String JSON_PROPERTY_MESSAGES = "messages"; + private JsonNullable> messages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_METRICS = "metrics"; + @javax.annotation.Nullable + private Map metrics = new HashMap<>(); + + public static final String JSON_PROPERTY_INITIATE_CHAT = "initiate_chat"; + @javax.annotation.Nullable + private Boolean initiateChat = false; + + public SendChatRequest() { + } + + public SendChatRequest messages(@javax.annotation.Nullable List messages) { + this.messages = JsonNullable.>of(messages); + return this; + } + + public SendChatRequest addMessagesItem(ChatMessageContract messagesItem) { + if (this.messages == null || !this.messages.isPresent()) { + this.messages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.messages.get().add(messagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get messages + * @return messages + */ + @javax.annotation.Nullable + @JsonIgnore + public List getMessages() { + return messages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getMessages_JsonNullable() { + return messages; + } + + @JsonProperty(JSON_PROPERTY_MESSAGES) + public void setMessages_JsonNullable(JsonNullable> messages) { + this.messages = messages; + } + + public void setMessages(@javax.annotation.Nullable List messages) { + this.messages = JsonNullable.>of(messages); + } + + + public SendChatRequest metrics(@javax.annotation.Nullable Map metrics) { + this.metrics = metrics; + return this; + } + + public SendChatRequest putMetricsItem(String key, String metricsItem) { + if (this.metrics == null) { + this.metrics = new HashMap<>(); + } + this.metrics.put(key, metricsItem); + return this; + } + + /** + * Get metrics + * @return metrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetrics() { + return metrics; + } + + + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetrics(@javax.annotation.Nullable Map metrics) { + this.metrics = metrics; + } + + + public SendChatRequest initiateChat(@javax.annotation.Nullable Boolean initiateChat) { + this.initiateChat = initiateChat; + return this; + } + + /** + * Get initiateChat + * @return initiateChat + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIATE_CHAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInitiateChat() { + return initiateChat; + } + + + @JsonProperty(JSON_PROPERTY_INITIATE_CHAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInitiateChat(@javax.annotation.Nullable Boolean initiateChat) { + this.initiateChat = initiateChat; + } + + + /** + * Return true if this SendChatRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendChatRequest sendChatRequest = (SendChatRequest) o; + return equalsNullable(this.messages, sendChatRequest.messages) && + Objects.equals(this.metrics, sendChatRequest.metrics) && + Objects.equals(this.initiateChat, sendChatRequest.initiateChat); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(messages), metrics, initiateChat); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendChatRequest {\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append(" initiateChat: ").append(toIndentedString(initiateChat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `messages` to the URL query string + if (getMessages() != null) { + for (int i = 0; i < getMessages().size(); i++) { + if (getMessages().get(i) != null) { + joiner.add(getMessages().get(i).toUrlQueryString(String.format("%smessages%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `metrics` to the URL query string + if (getMetrics() != null) { + for (String _key : getMetrics().keySet()) { + joiner.add(String.format("%smetrics%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetrics().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetrics().get(_key))))); + } + } + + // add `initiate_chat` to the URL query string + if (getInitiateChat() != null) { + joiner.add(String.format("%sinitiate_chat%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInitiateChat())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResponse.java new file mode 100644 index 0000000..3640051 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SessionComparisonResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SessionComparisonResponse + */ +@JsonPropertyOrder({ + SessionComparisonResponse.JSON_PROPERTY_STATUS, + SessionComparisonResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SessionComparisonResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SessionComparisonResult result; + + public SessionComparisonResponse() { + } + + public SessionComparisonResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public SessionComparisonResponse result(@javax.annotation.Nonnull SessionComparisonResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SessionComparisonResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SessionComparisonResult result) { + this.result = result; + } + + + /** + * Return true if this SessionComparisonResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SessionComparisonResponse sessionComparisonResponse = (SessionComparisonResponse) o; + return Objects.equals(this.status, sessionComparisonResponse.status) && + Objects.equals(this.result, sessionComparisonResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SessionComparisonResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResult.java new file mode 100644 index 0000000..eb998f6 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SessionComparisonResult.java @@ -0,0 +1,219 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SessionComparisonResult + */ +@JsonPropertyOrder({ + SessionComparisonResult.JSON_PROPERTY_COMPARISON_METRICS, + SessionComparisonResult.JSON_PROPERTY_COMPARISON_TRANSCRIPTS, + SessionComparisonResult.JSON_PROPERTY_COMPARISON_RECORDINGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SessionComparisonResult { + public static final String JSON_PROPERTY_COMPARISON_METRICS = "comparison_metrics"; + @javax.annotation.Nullable + private Map comparisonMetrics = new HashMap<>(); + + public static final String JSON_PROPERTY_COMPARISON_TRANSCRIPTS = "comparison_transcripts"; + @javax.annotation.Nullable + private Map comparisonTranscripts = new HashMap<>(); + + public static final String JSON_PROPERTY_COMPARISON_RECORDINGS = "comparison_recordings"; + @javax.annotation.Nullable + private Map comparisonRecordings = new HashMap<>(); + + public SessionComparisonResult() { + } + + @JsonCreator + public SessionComparisonResult( + @JsonProperty(JSON_PROPERTY_COMPARISON_METRICS) Map comparisonMetrics, + @JsonProperty(JSON_PROPERTY_COMPARISON_TRANSCRIPTS) Map comparisonTranscripts, + @JsonProperty(JSON_PROPERTY_COMPARISON_RECORDINGS) Map comparisonRecordings + ) { + this(); + this.comparisonMetrics = comparisonMetrics; + this.comparisonTranscripts = comparisonTranscripts; + this.comparisonRecordings = comparisonRecordings; + } + + /** + * Get comparisonMetrics + * @return comparisonMetrics + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPARISON_METRICS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getComparisonMetrics() { + return comparisonMetrics; + } + + + + + /** + * Get comparisonTranscripts + * @return comparisonTranscripts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPARISON_TRANSCRIPTS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getComparisonTranscripts() { + return comparisonTranscripts; + } + + + + + /** + * Get comparisonRecordings + * @return comparisonRecordings + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPARISON_RECORDINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getComparisonRecordings() { + return comparisonRecordings; + } + + + + + /** + * Return true if this SessionComparisonResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SessionComparisonResult sessionComparisonResult = (SessionComparisonResult) o; + return Objects.equals(this.comparisonMetrics, sessionComparisonResult.comparisonMetrics) && + Objects.equals(this.comparisonTranscripts, sessionComparisonResult.comparisonTranscripts) && + Objects.equals(this.comparisonRecordings, sessionComparisonResult.comparisonRecordings); + } + + @Override + public int hashCode() { + return Objects.hash(comparisonMetrics, comparisonTranscripts, comparisonRecordings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SessionComparisonResult {\n"); + sb.append(" comparisonMetrics: ").append(toIndentedString(comparisonMetrics)).append("\n"); + sb.append(" comparisonTranscripts: ").append(toIndentedString(comparisonTranscripts)).append("\n"); + sb.append(" comparisonRecordings: ").append(toIndentedString(comparisonRecordings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `comparison_metrics` to the URL query string + if (getComparisonMetrics() != null) { + for (String _key : getComparisonMetrics().keySet()) { + joiner.add(String.format("%scomparison_metrics%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getComparisonMetrics().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getComparisonMetrics().get(_key))))); + } + } + + // add `comparison_transcripts` to the URL query string + if (getComparisonTranscripts() != null) { + for (String _key : getComparisonTranscripts().keySet()) { + joiner.add(String.format("%scomparison_transcripts%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getComparisonTranscripts().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getComparisonTranscripts().get(_key))))); + } + } + + // add `comparison_recordings` to the URL query string + if (getComparisonRecordings() != null) { + for (String _key : getComparisonRecordings().keySet()) { + joiner.add(String.format("%scomparison_recordings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getComparisonRecordings().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getComparisonRecordings().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarAIMetadata.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarAIMetadata.java new file mode 100644 index 0000000..abf5251 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarAIMetadata.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SidebarAIMetadata + */ +@JsonPropertyOrder({ + SidebarAIMetadata.JSON_PROPERTY_MODEL, + SidebarAIMetadata.JSON_PROPERTY_MODEL_VERSION, + SidebarAIMetadata.JSON_PROPERTY_PROJECT, + SidebarAIMetadata.JSON_PROPERTY_EVAL_SCORE, + SidebarAIMetadata.JSON_PROPERTY_TRACE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SidebarAIMetadata { + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_MODEL_VERSION = "model_version"; + @javax.annotation.Nullable + private String modelVersion; + + public static final String JSON_PROPERTY_PROJECT = "project"; + @javax.annotation.Nullable + private String project; + + public static final String JSON_PROPERTY_EVAL_SCORE = "eval_score"; + @javax.annotation.Nullable + private BigDecimal evalScore; + + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + @javax.annotation.Nullable + private String traceId; + + public SidebarAIMetadata() { + } + + public SidebarAIMetadata model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public SidebarAIMetadata modelVersion(@javax.annotation.Nullable String modelVersion) { + this.modelVersion = modelVersion; + return this; + } + + /** + * Get modelVersion + * @return modelVersion + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModelVersion() { + return modelVersion; + } + + + @JsonProperty(JSON_PROPERTY_MODEL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModelVersion(@javax.annotation.Nullable String modelVersion) { + this.modelVersion = modelVersion; + } + + + public SidebarAIMetadata project(@javax.annotation.Nullable String project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProject() { + return project; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProject(@javax.annotation.Nullable String project) { + this.project = project; + } + + + public SidebarAIMetadata evalScore(@javax.annotation.Nullable BigDecimal evalScore) { + this.evalScore = evalScore; + return this; + } + + /** + * Get evalScore + * @return evalScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getEvalScore() { + return evalScore; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalScore(@javax.annotation.Nullable BigDecimal evalScore) { + this.evalScore = evalScore; + } + + + public SidebarAIMetadata traceId(@javax.annotation.Nullable String traceId) { + this.traceId = traceId; + return this; + } + + /** + * Get traceId + * @return traceId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTraceId() { + return traceId; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceId(@javax.annotation.Nullable String traceId) { + this.traceId = traceId; + } + + + /** + * Return true if this SidebarAIMetadata object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SidebarAIMetadata sidebarAIMetadata = (SidebarAIMetadata) o; + return Objects.equals(this.model, sidebarAIMetadata.model) && + Objects.equals(this.modelVersion, sidebarAIMetadata.modelVersion) && + Objects.equals(this.project, sidebarAIMetadata.project) && + Objects.equals(this.evalScore, sidebarAIMetadata.evalScore) && + Objects.equals(this.traceId, sidebarAIMetadata.traceId); + } + + @Override + public int hashCode() { + return Objects.hash(model, modelVersion, project, evalScore, traceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SidebarAIMetadata {\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" modelVersion: ").append(toIndentedString(modelVersion)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" evalScore: ").append(toIndentedString(evalScore)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `model_version` to the URL query string + if (getModelVersion() != null) { + joiner.add(String.format("%smodel_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelVersion())))); + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `eval_score` to the URL query string + if (getEvalScore() != null) { + joiner.add(String.format("%seval_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalScore())))); + } + + // add `trace_id` to the URL query string + if (getTraceId() != null) { + joiner.add(String.format("%strace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarTimeline.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarTimeline.java new file mode 100644 index 0000000..33aabcc --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SidebarTimeline.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SidebarTimeline + */ +@JsonPropertyOrder({ + SidebarTimeline.JSON_PROPERTY_FIRST_SEEN, + SidebarTimeline.JSON_PROPERTY_LAST_SEEN, + SidebarTimeline.JSON_PROPERTY_AGE_DAYS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SidebarTimeline { + public static final String JSON_PROPERTY_FIRST_SEEN = "first_seen"; + @javax.annotation.Nullable + private OffsetDateTime firstSeen; + + public static final String JSON_PROPERTY_LAST_SEEN = "last_seen"; + @javax.annotation.Nullable + private OffsetDateTime lastSeen; + + public static final String JSON_PROPERTY_AGE_DAYS = "age_days"; + @javax.annotation.Nullable + private Integer ageDays; + + public SidebarTimeline() { + } + + public SidebarTimeline firstSeen(@javax.annotation.Nullable OffsetDateTime firstSeen) { + this.firstSeen = firstSeen; + return this; + } + + /** + * Get firstSeen + * @return firstSeen + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getFirstSeen() { + return firstSeen; + } + + + @JsonProperty(JSON_PROPERTY_FIRST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFirstSeen(@javax.annotation.Nullable OffsetDateTime firstSeen) { + this.firstSeen = firstSeen; + } + + + public SidebarTimeline lastSeen(@javax.annotation.Nullable OffsetDateTime lastSeen) { + this.lastSeen = lastSeen; + return this; + } + + /** + * Get lastSeen + * @return lastSeen + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastSeen() { + return lastSeen; + } + + + @JsonProperty(JSON_PROPERTY_LAST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastSeen(@javax.annotation.Nullable OffsetDateTime lastSeen) { + this.lastSeen = lastSeen; + } + + + public SidebarTimeline ageDays(@javax.annotation.Nullable Integer ageDays) { + this.ageDays = ageDays; + return this; + } + + /** + * Get ageDays + * @return ageDays + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGE_DAYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getAgeDays() { + return ageDays; + } + + + @JsonProperty(JSON_PROPERTY_AGE_DAYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAgeDays(@javax.annotation.Nullable Integer ageDays) { + this.ageDays = ageDays; + } + + + /** + * Return true if this SidebarTimeline object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SidebarTimeline sidebarTimeline = (SidebarTimeline) o; + return Objects.equals(this.firstSeen, sidebarTimeline.firstSeen) && + Objects.equals(this.lastSeen, sidebarTimeline.lastSeen) && + Objects.equals(this.ageDays, sidebarTimeline.ageDays); + } + + @Override + public int hashCode() { + return Objects.hash(firstSeen, lastSeen, ageDays); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SidebarTimeline {\n"); + sb.append(" firstSeen: ").append(toIndentedString(firstSeen)).append("\n"); + sb.append(" lastSeen: ").append(toIndentedString(lastSeen)).append("\n"); + sb.append(" ageDays: ").append(toIndentedString(ageDays)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `first_seen` to the URL query string + if (getFirstSeen() != null) { + joiner.add(String.format("%sfirst_seen%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFirstSeen())))); + } + + // add `last_seen` to the URL query string + if (getLastSeen() != null) { + joiner.add(String.format("%slast_seen%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastSeen())))); + } + + // add `age_days` to the URL query string + if (getAgeDays() != null) { + joiner.add(String.format("%sage_days%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgeDays())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasFieldOptions200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasFieldOptions200Response.java new file mode 100644 index 0000000..62e12f4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasFieldOptions200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.PersonaFieldOptions; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SimulateApiPersonasFieldOptions200Response + */ +@JsonPropertyOrder({ + SimulateApiPersonasFieldOptions200Response.JSON_PROPERTY_COUNT, + SimulateApiPersonasFieldOptions200Response.JSON_PROPERTY_NEXT, + SimulateApiPersonasFieldOptions200Response.JSON_PROPERTY_PREVIOUS, + SimulateApiPersonasFieldOptions200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulateApiPersonasFieldOptions200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public SimulateApiPersonasFieldOptions200Response() { + } + + public SimulateApiPersonasFieldOptions200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public SimulateApiPersonasFieldOptions200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public SimulateApiPersonasFieldOptions200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public SimulateApiPersonasFieldOptions200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public SimulateApiPersonasFieldOptions200Response addResultsItem(PersonaFieldOptions resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this simulate_api_personas_field_options_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimulateApiPersonasFieldOptions200Response simulateApiPersonasFieldOptions200Response = (SimulateApiPersonasFieldOptions200Response) o; + return Objects.equals(this.count, simulateApiPersonasFieldOptions200Response.count) && + equalsNullable(this.next, simulateApiPersonasFieldOptions200Response.next) && + equalsNullable(this.previous, simulateApiPersonasFieldOptions200Response.previous) && + Objects.equals(this.results, simulateApiPersonasFieldOptions200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimulateApiPersonasFieldOptions200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasSystemPersonas200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasSystemPersonas200Response.java new file mode 100644 index 0000000..fe6d087 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateApiPersonasSystemPersonas200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Persona; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SimulateApiPersonasSystemPersonas200Response + */ +@JsonPropertyOrder({ + SimulateApiPersonasSystemPersonas200Response.JSON_PROPERTY_COUNT, + SimulateApiPersonasSystemPersonas200Response.JSON_PROPERTY_NEXT, + SimulateApiPersonasSystemPersonas200Response.JSON_PROPERTY_PREVIOUS, + SimulateApiPersonasSystemPersonas200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulateApiPersonasSystemPersonas200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public SimulateApiPersonasSystemPersonas200Response() { + } + + public SimulateApiPersonasSystemPersonas200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public SimulateApiPersonasSystemPersonas200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public SimulateApiPersonasSystemPersonas200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public SimulateApiPersonasSystemPersonas200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public SimulateApiPersonasSystemPersonas200Response addResultsItem(Persona resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this simulate_api_personas_system_personas_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimulateApiPersonasSystemPersonas200Response simulateApiPersonasSystemPersonas200Response = (SimulateApiPersonasSystemPersonas200Response) o; + return Objects.equals(this.count, simulateApiPersonasSystemPersonas200Response.count) && + equalsNullable(this.next, simulateApiPersonasSystemPersonas200Response.next) && + equalsNullable(this.previous, simulateApiPersonasSystemPersonas200Response.previous) && + Objects.equals(this.results, simulateApiPersonasSystemPersonas200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimulateApiPersonasSystemPersonas200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateEvalConfigResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateEvalConfigResponse.java new file mode 100644 index 0000000..5c47c03 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulateEvalConfigResponse.java @@ -0,0 +1,500 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInner; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SimulateEvalConfigResponse + */ +@JsonPropertyOrder({ + SimulateEvalConfigResponse.JSON_PROPERTY_ID, + SimulateEvalConfigResponse.JSON_PROPERTY_NAME, + SimulateEvalConfigResponse.JSON_PROPERTY_CONFIG, + SimulateEvalConfigResponse.JSON_PROPERTY_MAPPING, + SimulateEvalConfigResponse.JSON_PROPERTY_FILTERS, + SimulateEvalConfigResponse.JSON_PROPERTY_ERROR_LOCALIZER, + SimulateEvalConfigResponse.JSON_PROPERTY_MODEL, + SimulateEvalConfigResponse.JSON_PROPERTY_STATUS, + SimulateEvalConfigResponse.JSON_PROPERTY_EVAL_GROUP, + SimulateEvalConfigResponse.JSON_PROPERTY_TEMPLATE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulateEvalConfigResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nullable + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + @javax.annotation.Nullable + private Map mapping = new HashMap<>(); + + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private List filters = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer; + + public static final String JSON_PROPERTY_MODEL = "model"; + private JsonNullable model = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private JsonNullable status = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EVAL_GROUP = "eval_group"; + private JsonNullable evalGroup = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + private JsonNullable templateId = JsonNullable.undefined(); + + public SimulateEvalConfigResponse() { + } + + @JsonCreator + public SimulateEvalConfigResponse( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_CONFIG) Map config, + @JsonProperty(JSON_PROPERTY_MAPPING) Map mapping, + @JsonProperty(JSON_PROPERTY_FILTERS) List filters, + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) Boolean errorLocalizer, + @JsonProperty(JSON_PROPERTY_MODEL) String model, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_EVAL_GROUP) String evalGroup, + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) UUID templateId + ) { + this(); + this.id = id; + this.name = name == null ? JsonNullable.undefined() : JsonNullable.of(name); + this.config = config; + this.mapping = mapping; + this.filters = filters; + this.errorLocalizer = errorLocalizer; + this.model = model == null ? JsonNullable.undefined() : JsonNullable.of(model); + this.status = status == null ? JsonNullable.undefined() : JsonNullable.of(status); + this.evalGroup = evalGroup == null ? JsonNullable.undefined() : JsonNullable.of(evalGroup); + this.templateId = templateId == null ? JsonNullable.undefined() : JsonNullable.of(templateId); + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + + if (name == null) { + name = JsonNullable.undefined(); + } + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + private void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + + + /** + * Get config + * @return config + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + + + + /** + * Get mapping + * @return mapping + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMapping() { + return mapping; + } + + + + + /** + * Get filters + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } + + + + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonIgnore + public String getModel() { + + if (model == null) { + model = JsonNullable.undefined(); + } + return model.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModel_JsonNullable() { + return model; + } + + @JsonProperty(JSON_PROPERTY_MODEL) + private void setModel_JsonNullable(JsonNullable model) { + this.model = model; + } + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonIgnore + public String getStatus() { + + if (status == null) { + status = JsonNullable.undefined(); + } + return status.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatus_JsonNullable() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + private void setStatus_JsonNullable(JsonNullable status) { + this.status = status; + } + + + + /** + * Get evalGroup + * @return evalGroup + */ + @javax.annotation.Nullable + @JsonIgnore + public String getEvalGroup() { + + if (evalGroup == null) { + evalGroup = JsonNullable.undefined(); + } + return evalGroup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVAL_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEvalGroup_JsonNullable() { + return evalGroup; + } + + @JsonProperty(JSON_PROPERTY_EVAL_GROUP) + private void setEvalGroup_JsonNullable(JsonNullable evalGroup) { + this.evalGroup = evalGroup; + } + + + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getTemplateId() { + + if (templateId == null) { + templateId = JsonNullable.undefined(); + } + return templateId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTemplateId_JsonNullable() { + return templateId; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + private void setTemplateId_JsonNullable(JsonNullable templateId) { + this.templateId = templateId; + } + + + + /** + * Return true if this SimulateEvalConfigResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimulateEvalConfigResponse simulateEvalConfigResponse = (SimulateEvalConfigResponse) o; + return Objects.equals(this.id, simulateEvalConfigResponse.id) && + equalsNullable(this.name, simulateEvalConfigResponse.name) && + Objects.equals(this.config, simulateEvalConfigResponse.config) && + Objects.equals(this.mapping, simulateEvalConfigResponse.mapping) && + Objects.equals(this.filters, simulateEvalConfigResponse.filters) && + Objects.equals(this.errorLocalizer, simulateEvalConfigResponse.errorLocalizer) && + equalsNullable(this.model, simulateEvalConfigResponse.model) && + equalsNullable(this.status, simulateEvalConfigResponse.status) && + equalsNullable(this.evalGroup, simulateEvalConfigResponse.evalGroup) && + equalsNullable(this.templateId, simulateEvalConfigResponse.templateId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(name), config, mapping, filters, errorLocalizer, hashCodeNullable(model), hashCodeNullable(status), hashCodeNullable(evalGroup), hashCodeNullable(templateId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimulateEvalConfigResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" evalGroup: ").append(toIndentedString(evalGroup)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `mapping` to the URL query string + if (getMapping() != null) { + for (String _key : getMapping().keySet()) { + joiner.add(String.format("%smapping%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMapping().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMapping().get(_key))))); + } + } + + // add `filters` to the URL query string + if (getFilters() != null) { + for (int i = 0; i < getFilters().size(); i++) { + if (getFilters().get(i) != null) { + joiner.add(getFilters().get(i).toUrlQueryString(String.format("%sfilters%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `eval_group` to the URL query string + if (getEvalGroup() != null) { + joiner.add(String.format("%seval_group%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalGroup())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgent.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgent.java new file mode 100644 index 0000000..01dd1a5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgent.java @@ -0,0 +1,792 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SimulatorAgent + */ +@JsonPropertyOrder({ + SimulatorAgent.JSON_PROPERTY_ID, + SimulatorAgent.JSON_PROPERTY_NAME, + SimulatorAgent.JSON_PROPERTY_PROMPT, + SimulatorAgent.JSON_PROPERTY_VOICE_PROVIDER, + SimulatorAgent.JSON_PROPERTY_VOICE_NAME, + SimulatorAgent.JSON_PROPERTY_INTERRUPT_SENSITIVITY, + SimulatorAgent.JSON_PROPERTY_CONVERSATION_SPEED, + SimulatorAgent.JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY, + SimulatorAgent.JSON_PROPERTY_MODEL, + SimulatorAgent.JSON_PROPERTY_LLM_TEMPERATURE, + SimulatorAgent.JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES, + SimulatorAgent.JSON_PROPERTY_INITIAL_MESSAGE_DELAY, + SimulatorAgent.JSON_PROPERTY_INITIAL_MESSAGE, + SimulatorAgent.JSON_PROPERTY_CREATED_AT, + SimulatorAgent.JSON_PROPERTY_UPDATED_AT, + SimulatorAgent.JSON_PROPERTY_ORGANIZATION, + SimulatorAgent.JSON_PROPERTY_DELETED, + SimulatorAgent.JSON_PROPERTY_DELETED_AT, + SimulatorAgent.JSON_PROPERTY_LOGO_URL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulatorAgent { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_PROMPT = "prompt"; + @javax.annotation.Nonnull + private String prompt; + + public static final String JSON_PROPERTY_VOICE_PROVIDER = "voice_provider"; + @javax.annotation.Nonnull + private String voiceProvider; + + public static final String JSON_PROPERTY_VOICE_NAME = "voice_name"; + @javax.annotation.Nonnull + private String voiceName; + + public static final String JSON_PROPERTY_INTERRUPT_SENSITIVITY = "interrupt_sensitivity"; + @javax.annotation.Nullable + private BigDecimal interruptSensitivity; + + public static final String JSON_PROPERTY_CONVERSATION_SPEED = "conversation_speed"; + @javax.annotation.Nullable + private BigDecimal conversationSpeed; + + public static final String JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY = "finished_speaking_sensitivity"; + @javax.annotation.Nullable + private BigDecimal finishedSpeakingSensitivity; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nonnull + private String model; + + public static final String JSON_PROPERTY_LLM_TEMPERATURE = "llm_temperature"; + @javax.annotation.Nullable + private BigDecimal llmTemperature; + + public static final String JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES = "max_call_duration_in_minutes"; + @javax.annotation.Nullable + private Integer maxCallDurationInMinutes; + + public static final String JSON_PROPERTY_INITIAL_MESSAGE_DELAY = "initial_message_delay"; + @javax.annotation.Nullable + private Integer initialMessageDelay; + + public static final String JSON_PROPERTY_INITIAL_MESSAGE = "initial_message"; + @javax.annotation.Nullable + private String initialMessage; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private UUID organization; + + public static final String JSON_PROPERTY_DELETED = "deleted"; + @javax.annotation.Nullable + private Boolean deleted; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LOGO_URL = "logo_url"; + @javax.annotation.Nullable + private String logoUrl; + + public SimulatorAgent() { + } + + @JsonCreator + public SimulatorAgent( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(JSON_PROPERTY_ORGANIZATION) UUID organization, + @JsonProperty(JSON_PROPERTY_DELETED) Boolean deleted, + @JsonProperty(JSON_PROPERTY_DELETED_AT) OffsetDateTime deletedAt, + @JsonProperty(JSON_PROPERTY_LOGO_URL) String logoUrl + ) { + this(); + this.id = id; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.organization = organization; + this.deleted = deleted; + this.deletedAt = deletedAt == null ? JsonNullable.undefined() : JsonNullable.of(deletedAt); + this.logoUrl = logoUrl; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public SimulatorAgent name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the simulator agent + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public SimulatorAgent prompt(@javax.annotation.Nonnull String prompt) { + this.prompt = prompt; + return this; + } + + /** + * System prompt for the agent + * @return prompt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROMPT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrompt() { + return prompt; + } + + + @JsonProperty(JSON_PROPERTY_PROMPT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPrompt(@javax.annotation.Nonnull String prompt) { + this.prompt = prompt; + } + + + public SimulatorAgent voiceProvider(@javax.annotation.Nonnull String voiceProvider) { + this.voiceProvider = voiceProvider; + return this; + } + + /** + * Voice service provider + * @return voiceProvider + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VOICE_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVoiceProvider() { + return voiceProvider; + } + + + @JsonProperty(JSON_PROPERTY_VOICE_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVoiceProvider(@javax.annotation.Nonnull String voiceProvider) { + this.voiceProvider = voiceProvider; + } + + + public SimulatorAgent voiceName(@javax.annotation.Nonnull String voiceName) { + this.voiceName = voiceName; + return this; + } + + /** + * Specific voice to use + * @return voiceName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VOICE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVoiceName() { + return voiceName; + } + + + @JsonProperty(JSON_PROPERTY_VOICE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVoiceName(@javax.annotation.Nonnull String voiceName) { + this.voiceName = voiceName; + } + + + public SimulatorAgent interruptSensitivity(@javax.annotation.Nullable BigDecimal interruptSensitivity) { + this.interruptSensitivity = interruptSensitivity; + return this; + } + + /** + * Sensitivity for interruption detection (0-1) + * minimum: 0 + * maximum: 11 + * @return interruptSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getInterruptSensitivity() { + return interruptSensitivity; + } + + + @JsonProperty(JSON_PROPERTY_INTERRUPT_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInterruptSensitivity(@javax.annotation.Nullable BigDecimal interruptSensitivity) { + this.interruptSensitivity = interruptSensitivity; + } + + + public SimulatorAgent conversationSpeed(@javax.annotation.Nullable BigDecimal conversationSpeed) { + this.conversationSpeed = conversationSpeed; + return this; + } + + /** + * Speed of conversation (0.1-3.0) + * minimum: 0.1 + * maximum: 2 + * @return conversationSpeed + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getConversationSpeed() { + return conversationSpeed; + } + + + @JsonProperty(JSON_PROPERTY_CONVERSATION_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConversationSpeed(@javax.annotation.Nullable BigDecimal conversationSpeed) { + this.conversationSpeed = conversationSpeed; + } + + + public SimulatorAgent finishedSpeakingSensitivity(@javax.annotation.Nullable BigDecimal finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + return this; + } + + /** + * Sensitivity for detecting when speaker has finished (0-1) + * minimum: 0 + * maximum: 11 + * @return finishedSpeakingSensitivity + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getFinishedSpeakingSensitivity() { + return finishedSpeakingSensitivity; + } + + + @JsonProperty(JSON_PROPERTY_FINISHED_SPEAKING_SENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinishedSpeakingSensitivity(@javax.annotation.Nullable BigDecimal finishedSpeakingSensitivity) { + this.finishedSpeakingSensitivity = finishedSpeakingSensitivity; + } + + + public SimulatorAgent model(@javax.annotation.Nonnull String model) { + this.model = model; + return this; + } + + /** + * LLM model to use + * @return model + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModel(@javax.annotation.Nonnull String model) { + this.model = model; + } + + + public SimulatorAgent llmTemperature(@javax.annotation.Nullable BigDecimal llmTemperature) { + this.llmTemperature = llmTemperature; + return this; + } + + /** + * Temperature setting for LLM (0-2) + * minimum: 0 + * maximum: 2 + * @return llmTemperature + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_TEMPERATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getLlmTemperature() { + return llmTemperature; + } + + + @JsonProperty(JSON_PROPERTY_LLM_TEMPERATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLlmTemperature(@javax.annotation.Nullable BigDecimal llmTemperature) { + this.llmTemperature = llmTemperature; + } + + + public SimulatorAgent maxCallDurationInMinutes(@javax.annotation.Nullable Integer maxCallDurationInMinutes) { + this.maxCallDurationInMinutes = maxCallDurationInMinutes; + return this; + } + + /** + * Maximum call duration in minutes (1-180) + * minimum: 0 + * maximum: 180 + * @return maxCallDurationInMinutes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxCallDurationInMinutes() { + return maxCallDurationInMinutes; + } + + + @JsonProperty(JSON_PROPERTY_MAX_CALL_DURATION_IN_MINUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxCallDurationInMinutes(@javax.annotation.Nullable Integer maxCallDurationInMinutes) { + this.maxCallDurationInMinutes = maxCallDurationInMinutes; + } + + + public SimulatorAgent initialMessageDelay(@javax.annotation.Nullable Integer initialMessageDelay) { + this.initialMessageDelay = initialMessageDelay; + return this; + } + + /** + * Delay before initial message in seconds (0-60) + * minimum: 0 + * maximum: 60 + * @return initialMessageDelay + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE_DELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getInitialMessageDelay() { + return initialMessageDelay; + } + + + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE_DELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInitialMessageDelay(@javax.annotation.Nullable Integer initialMessageDelay) { + this.initialMessageDelay = initialMessageDelay; + } + + + public SimulatorAgent initialMessage(@javax.annotation.Nullable String initialMessage) { + this.initialMessage = initialMessage; + return this; + } + + /** + * Initial message to send when conversation starts + * @return initialMessage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInitialMessage() { + return initialMessage; + } + + + @JsonProperty(JSON_PROPERTY_INITIAL_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInitialMessage(@javax.annotation.Nullable String initialMessage) { + this.initialMessage = initialMessage; + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + /** + * Organization this simulator agent belongs to + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getOrganization() { + return organization; + } + + + + + /** + * Get deleted + * @return deleted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeleted() { + return deleted; + } + + + + + /** + * Get deletedAt + * @return deletedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + + if (deletedAt == null) { + deletedAt = JsonNullable.undefined(); + } + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + private void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + + + /** + * Get logoUrl + * @return logoUrl + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGO_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLogoUrl() { + return logoUrl; + } + + + + + /** + * Return true if this SimulatorAgent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimulatorAgent simulatorAgent = (SimulatorAgent) o; + return Objects.equals(this.id, simulatorAgent.id) && + Objects.equals(this.name, simulatorAgent.name) && + Objects.equals(this.prompt, simulatorAgent.prompt) && + Objects.equals(this.voiceProvider, simulatorAgent.voiceProvider) && + Objects.equals(this.voiceName, simulatorAgent.voiceName) && + Objects.equals(this.interruptSensitivity, simulatorAgent.interruptSensitivity) && + Objects.equals(this.conversationSpeed, simulatorAgent.conversationSpeed) && + Objects.equals(this.finishedSpeakingSensitivity, simulatorAgent.finishedSpeakingSensitivity) && + Objects.equals(this.model, simulatorAgent.model) && + Objects.equals(this.llmTemperature, simulatorAgent.llmTemperature) && + Objects.equals(this.maxCallDurationInMinutes, simulatorAgent.maxCallDurationInMinutes) && + Objects.equals(this.initialMessageDelay, simulatorAgent.initialMessageDelay) && + Objects.equals(this.initialMessage, simulatorAgent.initialMessage) && + Objects.equals(this.createdAt, simulatorAgent.createdAt) && + Objects.equals(this.updatedAt, simulatorAgent.updatedAt) && + Objects.equals(this.organization, simulatorAgent.organization) && + Objects.equals(this.deleted, simulatorAgent.deleted) && + equalsNullable(this.deletedAt, simulatorAgent.deletedAt) && + Objects.equals(this.logoUrl, simulatorAgent.logoUrl); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, prompt, voiceProvider, voiceName, interruptSensitivity, conversationSpeed, finishedSpeakingSensitivity, model, llmTemperature, maxCallDurationInMinutes, initialMessageDelay, initialMessage, createdAt, updatedAt, organization, deleted, hashCodeNullable(deletedAt), logoUrl); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimulatorAgent {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).append("\n"); + sb.append(" voiceProvider: ").append(toIndentedString(voiceProvider)).append("\n"); + sb.append(" voiceName: ").append(toIndentedString(voiceName)).append("\n"); + sb.append(" interruptSensitivity: ").append(toIndentedString(interruptSensitivity)).append("\n"); + sb.append(" conversationSpeed: ").append(toIndentedString(conversationSpeed)).append("\n"); + sb.append(" finishedSpeakingSensitivity: ").append(toIndentedString(finishedSpeakingSensitivity)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" llmTemperature: ").append(toIndentedString(llmTemperature)).append("\n"); + sb.append(" maxCallDurationInMinutes: ").append(toIndentedString(maxCallDurationInMinutes)).append("\n"); + sb.append(" initialMessageDelay: ").append(toIndentedString(initialMessageDelay)).append("\n"); + sb.append(" initialMessage: ").append(toIndentedString(initialMessage)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" logoUrl: ").append(toIndentedString(logoUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `prompt` to the URL query string + if (getPrompt() != null) { + joiner.add(String.format("%sprompt%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrompt())))); + } + + // add `voice_provider` to the URL query string + if (getVoiceProvider() != null) { + joiner.add(String.format("%svoice_provider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVoiceProvider())))); + } + + // add `voice_name` to the URL query string + if (getVoiceName() != null) { + joiner.add(String.format("%svoice_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVoiceName())))); + } + + // add `interrupt_sensitivity` to the URL query string + if (getInterruptSensitivity() != null) { + joiner.add(String.format("%sinterrupt_sensitivity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterruptSensitivity())))); + } + + // add `conversation_speed` to the URL query string + if (getConversationSpeed() != null) { + joiner.add(String.format("%sconversation_speed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConversationSpeed())))); + } + + // add `finished_speaking_sensitivity` to the URL query string + if (getFinishedSpeakingSensitivity() != null) { + joiner.add(String.format("%sfinished_speaking_sensitivity%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFinishedSpeakingSensitivity())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `llm_temperature` to the URL query string + if (getLlmTemperature() != null) { + joiner.add(String.format("%sllm_temperature%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLlmTemperature())))); + } + + // add `max_call_duration_in_minutes` to the URL query string + if (getMaxCallDurationInMinutes() != null) { + joiner.add(String.format("%smax_call_duration_in_minutes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxCallDurationInMinutes())))); + } + + // add `initial_message_delay` to the URL query string + if (getInitialMessageDelay() != null) { + joiner.add(String.format("%sinitial_message_delay%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInitialMessageDelay())))); + } + + // add `initial_message` to the URL query string + if (getInitialMessage() != null) { + joiner.add(String.format("%sinitial_message%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInitialMessage())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `deleted` to the URL query string + if (getDeleted() != null) { + joiner.add(String.format("%sdeleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeleted())))); + } + + // add `deleted_at` to the URL query string + if (getDeletedAt() != null) { + joiner.add(String.format("%sdeleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeletedAt())))); + } + + // add `logo_url` to the URL query string + if (getLogoUrl() != null) { + joiner.add(String.format("%slogo_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLogoUrl())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentDeleteResponse.java new file mode 100644 index 0000000..52c9384 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentDeleteResponse.java @@ -0,0 +1,149 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SimulatorAgentDeleteResponse + */ +@JsonPropertyOrder({ + SimulatorAgentDeleteResponse.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulatorAgentDeleteResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public SimulatorAgentDeleteResponse() { + } + + @JsonCreator + public SimulatorAgentDeleteResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message + ) { + this(); + this.message = message; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Return true if this SimulatorAgentDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimulatorAgentDeleteResponse simulatorAgentDeleteResponse = (SimulatorAgentDeleteResponse) o; + return Objects.equals(this.message, simulatorAgentDeleteResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimulatorAgentDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentListResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentListResponse.java new file mode 100644 index 0000000..9a61a86 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SimulatorAgentListResponse.java @@ -0,0 +1,338 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SimulatorAgent; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SimulatorAgentListResponse + */ +@JsonPropertyOrder({ + SimulatorAgentListResponse.JSON_PROPERTY_COUNT, + SimulatorAgentListResponse.JSON_PROPERTY_NEXT, + SimulatorAgentListResponse.JSON_PROPERTY_PREVIOUS, + SimulatorAgentListResponse.JSON_PROPERTY_RESULTS, + SimulatorAgentListResponse.JSON_PROPERTY_TOTAL_PAGES, + SimulatorAgentListResponse.JSON_PROPERTY_CURRENT_PAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SimulatorAgentListResponse { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_CURRENT_PAGE = "current_page"; + @javax.annotation.Nullable + private Integer currentPage; + + public SimulatorAgentListResponse() { + } + + @JsonCreator + public SimulatorAgentListResponse( + @JsonProperty(JSON_PROPERTY_COUNT) Integer count, + @JsonProperty(JSON_PROPERTY_NEXT) String next, + @JsonProperty(JSON_PROPERTY_PREVIOUS) String previous, + @JsonProperty(JSON_PROPERTY_RESULTS) List results, + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) Integer totalPages, + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) Integer currentPage + ) { + this(); + this.count = count; + this.next = next == null ? JsonNullable.undefined() : JsonNullable.of(next); + this.previous = previous == null ? JsonNullable.undefined() : JsonNullable.of(previous); + this.results = results; + this.totalPages = totalPages; + this.currentPage = currentPage; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNext() { + + if (next == null) { + next = JsonNullable.undefined(); + } + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + private void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPrevious() { + + if (previous == null) { + previous = JsonNullable.undefined(); + } + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + private void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + + + /** + * Get currentPage + * @return currentPage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCurrentPage() { + return currentPage; + } + + + + + /** + * Return true if this SimulatorAgentListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimulatorAgentListResponse simulatorAgentListResponse = (SimulatorAgentListResponse) o; + return Objects.equals(this.count, simulatorAgentListResponse.count) && + equalsNullable(this.next, simulatorAgentListResponse.next) && + equalsNullable(this.previous, simulatorAgentListResponse.previous) && + Objects.equals(this.results, simulatorAgentListResponse.results) && + Objects.equals(this.totalPages, simulatorAgentListResponse.totalPages) && + Objects.equals(this.currentPage, simulatorAgentListResponse.currentPage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results, totalPages, currentPage); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimulatorAgentListResponse {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `current_page` to the URL query string + if (getCurrentPage() != null) { + joiner.add(String.format("%scurrent_page%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentPage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/StartEvalsProcessRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/StartEvalsProcessRequest.java new file mode 100644 index 0000000..26e754f --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/StartEvalsProcessRequest.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * StartEvalsProcessRequest + */ +@JsonPropertyOrder({ + StartEvalsProcessRequest.JSON_PROPERTY_USER_EVAL_IDS, + StartEvalsProcessRequest.JSON_PROPERTY_EXPERIMENT_ID, + StartEvalsProcessRequest.JSON_PROPERTY_FAILED_ONLY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class StartEvalsProcessRequest { + public static final String JSON_PROPERTY_USER_EVAL_IDS = "user_eval_ids"; + @javax.annotation.Nonnull + private List userEvalIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nullable + private UUID experimentId; + + public static final String JSON_PROPERTY_FAILED_ONLY = "failed_only"; + @javax.annotation.Nullable + private Boolean failedOnly = false; + + public StartEvalsProcessRequest() { + } + + public StartEvalsProcessRequest userEvalIds(@javax.annotation.Nonnull List userEvalIds) { + this.userEvalIds = userEvalIds; + return this; + } + + public StartEvalsProcessRequest addUserEvalIdsItem(UUID userEvalIdsItem) { + if (this.userEvalIds == null) { + this.userEvalIds = new ArrayList<>(); + } + this.userEvalIds.add(userEvalIdsItem); + return this; + } + + /** + * Get userEvalIds + * @return userEvalIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_EVAL_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getUserEvalIds() { + return userEvalIds; + } + + + @JsonProperty(JSON_PROPERTY_USER_EVAL_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserEvalIds(@javax.annotation.Nonnull List userEvalIds) { + this.userEvalIds = userEvalIds; + } + + + public StartEvalsProcessRequest experimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + } + + + public StartEvalsProcessRequest failedOnly(@javax.annotation.Nullable Boolean failedOnly) { + this.failedOnly = failedOnly; + return this; + } + + /** + * Get failedOnly + * @return failedOnly + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_ONLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFailedOnly() { + return failedOnly; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_ONLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailedOnly(@javax.annotation.Nullable Boolean failedOnly) { + this.failedOnly = failedOnly; + } + + + /** + * Return true if this StartEvalsProcessRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StartEvalsProcessRequest startEvalsProcessRequest = (StartEvalsProcessRequest) o; + return Objects.equals(this.userEvalIds, startEvalsProcessRequest.userEvalIds) && + Objects.equals(this.experimentId, startEvalsProcessRequest.experimentId) && + Objects.equals(this.failedOnly, startEvalsProcessRequest.failedOnly); + } + + @Override + public int hashCode() { + return Objects.hash(userEvalIds, experimentId, failedOnly); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StartEvalsProcessRequest {\n"); + sb.append(" userEvalIds: ").append(toIndentedString(userEvalIds)).append("\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" failedOnly: ").append(toIndentedString(failedOnly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_eval_ids` to the URL query string + if (getUserEvalIds() != null) { + for (int i = 0; i < getUserEvalIds().size(); i++) { + if (getUserEvalIds().get(i) != null) { + joiner.add(String.format("%suser_eval_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getUserEvalIds().get(i))))); + } + } + } + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `failed_only` to the URL query string + if (getFailedOnly() != null) { + joiner.add(String.format("%sfailed_only%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedOnly())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/StopUserEvalRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/StopUserEvalRequest.java new file mode 100644 index 0000000..a3ad4b3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/StopUserEvalRequest.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * StopUserEvalRequest + */ +@JsonPropertyOrder({ + StopUserEvalRequest.JSON_PROPERTY_EXPERIMENT_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class StopUserEvalRequest { + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nullable + private UUID experimentId; + + public StopUserEvalRequest() { + } + + public StopUserEvalRequest experimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + } + + + /** + * Return true if this StopUserEvalRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StopUserEvalRequest stopUserEvalRequest = (StopUserEvalRequest) o; + return Objects.equals(this.experimentId, stopUserEvalRequest.experimentId); + } + + @Override + public int hashCode() { + return Objects.hash(experimentId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StopUserEvalRequest {\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotationEntry.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotationEntry.java new file mode 100644 index 0000000..f398baa --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotationEntry.java @@ -0,0 +1,238 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SubmitAnnotationEntry + */ +@JsonPropertyOrder({ + SubmitAnnotationEntry.JSON_PROPERTY_LABEL_ID, + SubmitAnnotationEntry.JSON_PROPERTY_VALUE, + SubmitAnnotationEntry.JSON_PROPERTY_NOTES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SubmitAnnotationEntry { + public static final String JSON_PROPERTY_LABEL_ID = "label_id"; + @javax.annotation.Nonnull + private UUID labelId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Map value = new HashMap<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private String notes; + + public SubmitAnnotationEntry() { + } + + public SubmitAnnotationEntry labelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + return this; + } + + /** + * Get labelId + * @return labelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getLabelId() { + return labelId; + } + + + @JsonProperty(JSON_PROPERTY_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabelId(@javax.annotation.Nonnull UUID labelId) { + this.labelId = labelId; + } + + + public SubmitAnnotationEntry value(@javax.annotation.Nonnull Map value) { + this.value = value; + return this; + } + + public SubmitAnnotationEntry putValueItem(String key, Object valueItem) { + if (this.value == null) { + this.value = new HashMap<>(); + } + this.value.put(key, valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Map value) { + this.value = value; + } + + + public SubmitAnnotationEntry notes(@javax.annotation.Nullable String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = notes; + } + + + /** + * Return true if this SubmitAnnotationEntry object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubmitAnnotationEntry submitAnnotationEntry = (SubmitAnnotationEntry) o; + return Objects.equals(this.labelId, submitAnnotationEntry.labelId) && + Objects.equals(this.value, submitAnnotationEntry.value) && + Objects.equals(this.notes, submitAnnotationEntry.notes); + } + + @Override + public int hashCode() { + return Objects.hash(labelId, value, notes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubmitAnnotationEntry {\n"); + sb.append(" labelId: ").append(toIndentedString(labelId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label_id` to the URL query string + if (getLabelId() != null) { + joiner.add(String.format("%slabel_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabelId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + for (String _key : getValue().keySet()) { + joiner.add(String.format("%svalue%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getValue().get(_key))))); + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotations.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotations.java new file mode 100644 index 0000000..da056b5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SubmitAnnotations.java @@ -0,0 +1,261 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SubmitAnnotationEntry; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SubmitAnnotations + */ +@JsonPropertyOrder({ + SubmitAnnotations.JSON_PROPERTY_ANNOTATIONS, + SubmitAnnotations.JSON_PROPERTY_NOTES, + SubmitAnnotations.JSON_PROPERTY_ITEM_NOTES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SubmitAnnotations { + public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; + @javax.annotation.Nonnull + private List annotations = new ArrayList<>(); + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nullable + private String notes = ""; + + public static final String JSON_PROPERTY_ITEM_NOTES = "item_notes"; + private JsonNullable itemNotes = JsonNullable.undefined(); + + public SubmitAnnotations() { + } + + public SubmitAnnotations annotations(@javax.annotation.Nonnull List annotations) { + this.annotations = annotations; + return this; + } + + public SubmitAnnotations addAnnotationsItem(SubmitAnnotationEntry annotationsItem) { + if (this.annotations == null) { + this.annotations = new ArrayList<>(); + } + this.annotations.add(annotationsItem); + return this; + } + + /** + * Get annotations + * @return annotations + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotations() { + return annotations; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotations(@javax.annotation.Nonnull List annotations) { + this.annotations = annotations; + } + + + public SubmitAnnotations notes(@javax.annotation.Nullable String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@javax.annotation.Nullable String notes) { + this.notes = notes; + } + + + public SubmitAnnotations itemNotes(@javax.annotation.Nullable String itemNotes) { + this.itemNotes = JsonNullable.of(itemNotes); + return this; + } + + /** + * Get itemNotes + * @return itemNotes + */ + @javax.annotation.Nullable + @JsonIgnore + public String getItemNotes() { + return itemNotes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ITEM_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getItemNotes_JsonNullable() { + return itemNotes; + } + + @JsonProperty(JSON_PROPERTY_ITEM_NOTES) + public void setItemNotes_JsonNullable(JsonNullable itemNotes) { + this.itemNotes = itemNotes; + } + + public void setItemNotes(@javax.annotation.Nullable String itemNotes) { + this.itemNotes = JsonNullable.of(itemNotes); + } + + + /** + * Return true if this SubmitAnnotations object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubmitAnnotations submitAnnotations = (SubmitAnnotations) o; + return Objects.equals(this.annotations, submitAnnotations.annotations) && + Objects.equals(this.notes, submitAnnotations.notes) && + equalsNullable(this.itemNotes, submitAnnotations.itemNotes); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(annotations, notes, hashCodeNullable(itemNotes)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubmitAnnotations {\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" itemNotes: ").append(toIndentedString(itemNotes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `annotations` to the URL query string + if (getAnnotations() != null) { + for (int i = 0; i < getAnnotations().size(); i++) { + if (getAnnotations().get(i) != null) { + joiner.add(getAnnotations().get(i).toUrlQueryString(String.format("%sannotations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `item_notes` to the URL query string + if (getItemNotes() != null) { + joiner.add(String.format("%sitem_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getItemNotes())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspace.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspace.java new file mode 100644 index 0000000..7b9e225 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspace.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SwitchWorkspace + */ +@JsonPropertyOrder({ + SwitchWorkspace.JSON_PROPERTY_NEW_WORKSPACE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SwitchWorkspace { + public static final String JSON_PROPERTY_NEW_WORKSPACE_ID = "new_workspace_id"; + @javax.annotation.Nonnull + private UUID newWorkspaceId; + + public SwitchWorkspace() { + } + + public SwitchWorkspace newWorkspaceId(@javax.annotation.Nonnull UUID newWorkspaceId) { + this.newWorkspaceId = newWorkspaceId; + return this; + } + + /** + * Get newWorkspaceId + * @return newWorkspaceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NEW_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getNewWorkspaceId() { + return newWorkspaceId; + } + + + @JsonProperty(JSON_PROPERTY_NEW_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNewWorkspaceId(@javax.annotation.Nonnull UUID newWorkspaceId) { + this.newWorkspaceId = newWorkspaceId; + } + + + /** + * Return true if this SwitchWorkspace object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SwitchWorkspace switchWorkspace = (SwitchWorkspace) o; + return Objects.equals(this.newWorkspaceId, switchWorkspace.newWorkspaceId); + } + + @Override + public int hashCode() { + return Objects.hash(newWorkspaceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SwitchWorkspace {\n"); + sb.append(" newWorkspaceId: ").append(toIndentedString(newWorkspaceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `new_workspace_id` to the URL query string + if (getNewWorkspaceId() != null) { + joiner.add(String.format("%snew_workspace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewWorkspaceId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResponse.java new file mode 100644 index 0000000..9eca956 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SwitchWorkspaceResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SwitchWorkspaceResponse + */ +@JsonPropertyOrder({ + SwitchWorkspaceResponse.JSON_PROPERTY_STATUS, + SwitchWorkspaceResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SwitchWorkspaceResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SwitchWorkspaceResult result; + + public SwitchWorkspaceResponse() { + } + + public SwitchWorkspaceResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SwitchWorkspaceResponse result(@javax.annotation.Nonnull SwitchWorkspaceResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SwitchWorkspaceResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SwitchWorkspaceResult result) { + this.result = result; + } + + + /** + * Return true if this SwitchWorkspaceResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SwitchWorkspaceResponse switchWorkspaceResponse = (SwitchWorkspaceResponse) o; + return Objects.equals(this.status, switchWorkspaceResponse.status) && + Objects.equals(this.result, switchWorkspaceResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SwitchWorkspaceResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResult.java new file mode 100644 index 0000000..cbe4457 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SwitchWorkspaceResult.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.WorkspaceSummary; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SwitchWorkspaceResult + */ +@JsonPropertyOrder({ + SwitchWorkspaceResult.JSON_PROPERTY_MESSAGE, + SwitchWorkspaceResult.JSON_PROPERTY_WORKSPACE, + SwitchWorkspaceResult.JSON_PROPERTY_USER_ROLE, + SwitchWorkspaceResult.JSON_PROPERTY_ACCESS_TYPE, + SwitchWorkspaceResult.JSON_PROPERTY_ORGANIZATION +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SwitchWorkspaceResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_WORKSPACE = "workspace"; + @javax.annotation.Nonnull + private WorkspaceSummary workspace; + + public static final String JSON_PROPERTY_USER_ROLE = "user_role"; + @javax.annotation.Nonnull + private String userRole; + + public static final String JSON_PROPERTY_ACCESS_TYPE = "access_type"; + @javax.annotation.Nonnull + private String accessType; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nonnull + private String organization; + + public SwitchWorkspaceResult() { + } + + public SwitchWorkspaceResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public SwitchWorkspaceResult workspace(@javax.annotation.Nonnull WorkspaceSummary workspace) { + this.workspace = workspace; + return this; + } + + /** + * Get workspace + * @return workspace + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKSPACE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WorkspaceSummary getWorkspace() { + return workspace; + } + + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkspace(@javax.annotation.Nonnull WorkspaceSummary workspace) { + this.workspace = workspace; + } + + + public SwitchWorkspaceResult userRole(@javax.annotation.Nonnull String userRole) { + this.userRole = userRole; + return this; + } + + /** + * Get userRole + * @return userRole + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserRole() { + return userRole; + } + + + @JsonProperty(JSON_PROPERTY_USER_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserRole(@javax.annotation.Nonnull String userRole) { + this.userRole = userRole; + } + + + public SwitchWorkspaceResult accessType(@javax.annotation.Nonnull String accessType) { + this.accessType = accessType; + return this; + } + + /** + * Get accessType + * @return accessType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCESS_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccessType() { + return accessType; + } + + + @JsonProperty(JSON_PROPERTY_ACCESS_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccessType(@javax.annotation.Nonnull String accessType) { + this.accessType = accessType; + } + + + public SwitchWorkspaceResult organization(@javax.annotation.Nonnull String organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOrganization() { + return organization; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrganization(@javax.annotation.Nonnull String organization) { + this.organization = organization; + } + + + /** + * Return true if this SwitchWorkspaceResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SwitchWorkspaceResult switchWorkspaceResult = (SwitchWorkspaceResult) o; + return Objects.equals(this.message, switchWorkspaceResult.message) && + Objects.equals(this.workspace, switchWorkspaceResult.workspace) && + Objects.equals(this.userRole, switchWorkspaceResult.userRole) && + Objects.equals(this.accessType, switchWorkspaceResult.accessType) && + Objects.equals(this.organization, switchWorkspaceResult.organization); + } + + @Override + public int hashCode() { + return Objects.hash(message, workspace, userRole, accessType, organization); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SwitchWorkspaceResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" workspace: ").append(toIndentedString(workspace)).append("\n"); + sb.append(" userRole: ").append(toIndentedString(userRole)).append("\n"); + sb.append(" accessType: ").append(toIndentedString(accessType)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `workspace` to the URL query string + if (getWorkspace() != null) { + joiner.add(getWorkspace().toUrlQueryString(prefix + "workspace" + suffix)); + } + + // add `user_role` to the URL query string + if (getUserRole() != null) { + joiner.add(String.format("%suser_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserRole())))); + } + + // add `access_type` to the URL query string + if (getAccessType() != null) { + joiner.add(String.format("%saccess_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAccessType())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticData.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticData.java new file mode 100644 index 0000000..eb4be64 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticData.java @@ -0,0 +1,324 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticData + */ +@JsonPropertyOrder({ + SyntheticData.JSON_PROPERTY_NUM_ROWS, + SyntheticData.JSON_PROPERTY_COLUMNS, + SyntheticData.JSON_PROPERTY_DATASET, + SyntheticData.JSON_PROPERTY_KB_ID, + SyntheticData.JSON_PROPERTY_FILL_EXISTING_ROWS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticData { + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nonnull + private Integer numRows; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nonnull + private Map dataset = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nullable + private UUID kbId; + + public static final String JSON_PROPERTY_FILL_EXISTING_ROWS = "fill_existing_rows"; + @javax.annotation.Nullable + private Boolean fillExistingRows = false; + + public SyntheticData() { + } + + public SyntheticData numRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * @return numRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + } + + + public SyntheticData columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public SyntheticData addColumnsItem(String columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + public SyntheticData dataset(@javax.annotation.Nonnull Map dataset) { + this.dataset = dataset; + return this; + } + + public SyntheticData putDatasetItem(String key, Object datasetItem) { + if (this.dataset == null) { + this.dataset = new HashMap<>(); + } + this.dataset.put(key, datasetItem); + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setDataset(@javax.annotation.Nonnull Map dataset) { + this.dataset = dataset; + } + + + public SyntheticData kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + } + + + public SyntheticData fillExistingRows(@javax.annotation.Nullable Boolean fillExistingRows) { + this.fillExistingRows = fillExistingRows; + return this; + } + + /** + * Get fillExistingRows + * @return fillExistingRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILL_EXISTING_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFillExistingRows() { + return fillExistingRows; + } + + + @JsonProperty(JSON_PROPERTY_FILL_EXISTING_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFillExistingRows(@javax.annotation.Nullable Boolean fillExistingRows) { + this.fillExistingRows = fillExistingRows; + } + + + /** + * Return true if this SyntheticData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticData syntheticData = (SyntheticData) o; + return Objects.equals(this.numRows, syntheticData.numRows) && + Objects.equals(this.columns, syntheticData.columns) && + Objects.equals(this.dataset, syntheticData.dataset) && + Objects.equals(this.kbId, syntheticData.kbId) && + Objects.equals(this.fillExistingRows, syntheticData.fillExistingRows); + } + + @Override + public int hashCode() { + return Objects.hash(numRows, columns, dataset, kbId, fillExistingRows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticData {\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" fillExistingRows: ").append(toIndentedString(fillExistingRows)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + for (String _key : getDataset().keySet()) { + joiner.add(String.format("%sdataset%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDataset().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDataset().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `fill_existing_rows` to the URL query string + if (getFillExistingRows() != null) { + joiner.add(String.format("%sfill_existing_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFillExistingRows())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfig.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfig.java new file mode 100644 index 0000000..9b80f5c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfig.java @@ -0,0 +1,346 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetConfig + */ +@JsonPropertyOrder({ + SyntheticDatasetConfig.JSON_PROPERTY_NUM_ROWS, + SyntheticDatasetConfig.JSON_PROPERTY_COLUMNS, + SyntheticDatasetConfig.JSON_PROPERTY_DATASET, + SyntheticDatasetConfig.JSON_PROPERTY_KB_ID, + SyntheticDatasetConfig.JSON_PROPERTY_REGENERATE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetConfig { + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nonnull + private Integer numRows; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nonnull + private Map dataset = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + private JsonNullable kbId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REGENERATE = "regenerate"; + @javax.annotation.Nullable + private Boolean regenerate = false; + + public SyntheticDatasetConfig() { + } + + public SyntheticDatasetConfig numRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * @return numRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + } + + + public SyntheticDatasetConfig columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public SyntheticDatasetConfig addColumnsItem(String columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + public SyntheticDatasetConfig dataset(@javax.annotation.Nonnull Map dataset) { + this.dataset = dataset; + return this; + } + + public SyntheticDatasetConfig putDatasetItem(String key, Object datasetItem) { + if (this.dataset == null) { + this.dataset = new HashMap<>(); + } + this.dataset.put(key, datasetItem); + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setDataset(@javax.annotation.Nonnull Map dataset) { + this.dataset = dataset; + } + + + public SyntheticDatasetConfig kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKbId() { + return kbId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKbId_JsonNullable() { + return kbId; + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + public void setKbId_JsonNullable(JsonNullable kbId) { + this.kbId = kbId; + } + + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + } + + + public SyntheticDatasetConfig regenerate(@javax.annotation.Nullable Boolean regenerate) { + this.regenerate = regenerate; + return this; + } + + /** + * Get regenerate + * @return regenerate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGENERATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRegenerate() { + return regenerate; + } + + + @JsonProperty(JSON_PROPERTY_REGENERATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegenerate(@javax.annotation.Nullable Boolean regenerate) { + this.regenerate = regenerate; + } + + + /** + * Return true if this SyntheticDatasetConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetConfig syntheticDatasetConfig = (SyntheticDatasetConfig) o; + return Objects.equals(this.numRows, syntheticDatasetConfig.numRows) && + Objects.equals(this.columns, syntheticDatasetConfig.columns) && + Objects.equals(this.dataset, syntheticDatasetConfig.dataset) && + equalsNullable(this.kbId, syntheticDatasetConfig.kbId) && + Objects.equals(this.regenerate, syntheticDatasetConfig.regenerate); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(numRows, columns, dataset, hashCodeNullable(kbId), regenerate); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetConfig {\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" regenerate: ").append(toIndentedString(regenerate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + for (String _key : getDataset().keySet()) { + joiner.add(String.format("%sdataset%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDataset().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDataset().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `regenerate` to the URL query string + if (getRegenerate() != null) { + joiner.add(String.format("%sregenerate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRegenerate())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigPayload.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigPayload.java new file mode 100644 index 0000000..efdf4be --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigPayload.java @@ -0,0 +1,310 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetConfigPayload + */ +@JsonPropertyOrder({ + SyntheticDatasetConfigPayload.JSON_PROPERTY_NUM_ROWS, + SyntheticDatasetConfigPayload.JSON_PROPERTY_COLUMNS, + SyntheticDatasetConfigPayload.JSON_PROPERTY_DATASET, + SyntheticDatasetConfigPayload.JSON_PROPERTY_KB_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetConfigPayload { + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nullable + private Integer numRows; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nullable + private List> columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nullable + private Map dataset = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + private JsonNullable kbId = JsonNullable.undefined(); + + public SyntheticDatasetConfigPayload() { + } + + public SyntheticDatasetConfigPayload numRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * @return numRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + } + + + public SyntheticDatasetConfigPayload columns(@javax.annotation.Nullable List> columns) { + this.columns = columns; + return this; + } + + public SyntheticDatasetConfigPayload addColumnsItem(Map columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColumns(@javax.annotation.Nullable List> columns) { + this.columns = columns; + } + + + public SyntheticDatasetConfigPayload dataset(@javax.annotation.Nullable Map dataset) { + this.dataset = dataset; + return this; + } + + public SyntheticDatasetConfigPayload putDatasetItem(String key, Object datasetItem) { + if (this.dataset == null) { + this.dataset = new HashMap<>(); + } + this.dataset.put(key, datasetItem); + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setDataset(@javax.annotation.Nullable Map dataset) { + this.dataset = dataset; + } + + + public SyntheticDatasetConfigPayload kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getKbId() { + return kbId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getKbId_JsonNullable() { + return kbId; + } + + @JsonProperty(JSON_PROPERTY_KB_ID) + public void setKbId_JsonNullable(JsonNullable kbId) { + this.kbId = kbId; + } + + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = JsonNullable.of(kbId); + } + + + /** + * Return true if this SyntheticDatasetConfigPayload object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetConfigPayload syntheticDatasetConfigPayload = (SyntheticDatasetConfigPayload) o; + return Objects.equals(this.numRows, syntheticDatasetConfigPayload.numRows) && + Objects.equals(this.columns, syntheticDatasetConfigPayload.columns) && + Objects.equals(this.dataset, syntheticDatasetConfigPayload.dataset) && + equalsNullable(this.kbId, syntheticDatasetConfigPayload.kbId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(numRows, columns, dataset, hashCodeNullable(kbId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetConfigPayload {\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + for (String _key : getDataset().keySet()) { + joiner.add(String.format("%sdataset%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDataset().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDataset().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResponse.java new file mode 100644 index 0000000..ba990e5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SyntheticDatasetConfigResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetConfigResponse + */ +@JsonPropertyOrder({ + SyntheticDatasetConfigResponse.JSON_PROPERTY_STATUS, + SyntheticDatasetConfigResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetConfigResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SyntheticDatasetConfigResult result; + + public SyntheticDatasetConfigResponse() { + } + + public SyntheticDatasetConfigResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SyntheticDatasetConfigResponse result(@javax.annotation.Nonnull SyntheticDatasetConfigResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticDatasetConfigResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SyntheticDatasetConfigResult result) { + this.result = result; + } + + + /** + * Return true if this SyntheticDatasetConfigResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetConfigResponse syntheticDatasetConfigResponse = (SyntheticDatasetConfigResponse) o; + return Objects.equals(this.status, syntheticDatasetConfigResponse.status) && + Objects.equals(this.result, syntheticDatasetConfigResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetConfigResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResult.java new file mode 100644 index 0000000..a090258 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetConfigResult.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SyntheticDatasetConfigPayload; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetConfigResult + */ +@JsonPropertyOrder({ + SyntheticDatasetConfigResult.JSON_PROPERTY_MESSAGE, + SyntheticDatasetConfigResult.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetConfigResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATA = "data"; + @javax.annotation.Nonnull + private SyntheticDatasetConfigPayload data; + + public SyntheticDatasetConfigResult() { + } + + public SyntheticDatasetConfigResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public SyntheticDatasetConfigResult data(@javax.annotation.Nonnull SyntheticDatasetConfigPayload data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticDatasetConfigPayload getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@javax.annotation.Nonnull SyntheticDatasetConfigPayload data) { + this.data = data; + } + + + /** + * Return true if this SyntheticDatasetConfigResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetConfigResult syntheticDatasetConfigResult = (SyntheticDatasetConfigResult) o; + return Objects.equals(this.message, syntheticDatasetConfigResult.message) && + Objects.equals(this.data, syntheticDatasetConfigResult.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetConfigResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResponse.java new file mode 100644 index 0000000..1d3491e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SyntheticDatasetCreateStartedResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetCreateStartedResponse + */ +@JsonPropertyOrder({ + SyntheticDatasetCreateStartedResponse.JSON_PROPERTY_STATUS, + SyntheticDatasetCreateStartedResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetCreateStartedResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SyntheticDatasetCreateStartedResult result; + + public SyntheticDatasetCreateStartedResponse() { + } + + public SyntheticDatasetCreateStartedResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SyntheticDatasetCreateStartedResponse result(@javax.annotation.Nonnull SyntheticDatasetCreateStartedResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticDatasetCreateStartedResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SyntheticDatasetCreateStartedResult result) { + this.result = result; + } + + + /** + * Return true if this SyntheticDatasetCreateStartedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetCreateStartedResponse syntheticDatasetCreateStartedResponse = (SyntheticDatasetCreateStartedResponse) o; + return Objects.equals(this.status, syntheticDatasetCreateStartedResponse.status) && + Objects.equals(this.result, syntheticDatasetCreateStartedResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetCreateStartedResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResult.java new file mode 100644 index 0000000..d7dba65 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreateStartedResult.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Dataset; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetCreateStartedResult + */ +@JsonPropertyOrder({ + SyntheticDatasetCreateStartedResult.JSON_PROPERTY_MESSAGE, + SyntheticDatasetCreateStartedResult.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetCreateStartedResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATA = "data"; + @javax.annotation.Nonnull + private Dataset data; + + public SyntheticDatasetCreateStartedResult() { + } + + public SyntheticDatasetCreateStartedResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public SyntheticDatasetCreateStartedResult data(@javax.annotation.Nonnull Dataset data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Dataset getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@javax.annotation.Nonnull Dataset data) { + this.data = data; + } + + + /** + * Return true if this SyntheticDatasetCreateStartedResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetCreateStartedResult syntheticDatasetCreateStartedResult = (SyntheticDatasetCreateStartedResult) o; + return Objects.equals(this.message, syntheticDatasetCreateStartedResult.message) && + Objects.equals(this.data, syntheticDatasetCreateStartedResult.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetCreateStartedResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreation.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreation.java new file mode 100644 index 0000000..ef93e46 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetCreation.java @@ -0,0 +1,288 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetCreation + */ +@JsonPropertyOrder({ + SyntheticDatasetCreation.JSON_PROPERTY_NUM_ROWS, + SyntheticDatasetCreation.JSON_PROPERTY_COLUMNS, + SyntheticDatasetCreation.JSON_PROPERTY_DATASET, + SyntheticDatasetCreation.JSON_PROPERTY_KB_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetCreation { + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nonnull + private Integer numRows; + + public static final String JSON_PROPERTY_COLUMNS = "columns"; + @javax.annotation.Nonnull + private List columns = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET = "dataset"; + @javax.annotation.Nonnull + private Map dataset = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nullable + private UUID kbId; + + public SyntheticDatasetCreation() { + } + + public SyntheticDatasetCreation numRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * @return numRows + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumRows(@javax.annotation.Nonnull Integer numRows) { + this.numRows = numRows; + } + + + public SyntheticDatasetCreation columns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + return this; + } + + public SyntheticDatasetCreation addColumnsItem(String columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + return this; + } + + /** + * Get columns + * @return columns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumns() { + return columns; + } + + + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumns(@javax.annotation.Nonnull List columns) { + this.columns = columns; + } + + + public SyntheticDatasetCreation dataset(@javax.annotation.Nonnull Map dataset) { + this.dataset = dataset; + return this; + } + + public SyntheticDatasetCreation putDatasetItem(String key, Object datasetItem) { + if (this.dataset == null) { + this.dataset = new HashMap<>(); + } + this.dataset.put(key, datasetItem); + return this; + } + + /** + * Get dataset + * @return dataset + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getDataset() { + return dataset; + } + + + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setDataset(@javax.annotation.Nonnull Map dataset) { + this.dataset = dataset; + } + + + public SyntheticDatasetCreation kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + } + + + /** + * Return true if this SyntheticDatasetCreation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetCreation syntheticDatasetCreation = (SyntheticDatasetCreation) o; + return Objects.equals(this.numRows, syntheticDatasetCreation.numRows) && + Objects.equals(this.columns, syntheticDatasetCreation.columns) && + Objects.equals(this.dataset, syntheticDatasetCreation.dataset) && + Objects.equals(this.kbId, syntheticDatasetCreation.kbId); + } + + @Override + public int hashCode() { + return Objects.hash(numRows, columns, dataset, kbId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetCreation {\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `columns` to the URL query string + if (getColumns() != null) { + for (int i = 0; i < getColumns().size(); i++) { + joiner.add(String.format("%scolumns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumns().get(i))))); + } + } + + // add `dataset` to the URL query string + if (getDataset() != null) { + for (String _key : getDataset().keySet()) { + joiner.add(String.format("%sdataset%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getDataset().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getDataset().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateData.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateData.java new file mode 100644 index 0000000..f53e916 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateData.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetUpdateData + */ +@JsonPropertyOrder({ + SyntheticDatasetUpdateData.JSON_PROPERTY_DATASET_ID, + SyntheticDatasetUpdateData.JSON_PROPERTY_DATASET_NAME, + SyntheticDatasetUpdateData.JSON_PROPERTY_NUM_ROWS, + SyntheticDatasetUpdateData.JSON_PROPERTY_NUM_COLUMNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetUpdateData { + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + @javax.annotation.Nonnull + private UUID datasetId; + + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + @javax.annotation.Nonnull + private String datasetName; + + public static final String JSON_PROPERTY_NUM_ROWS = "num_rows"; + @javax.annotation.Nullable + private Integer numRows; + + public static final String JSON_PROPERTY_NUM_COLUMNS = "num_columns"; + @javax.annotation.Nullable + private Integer numColumns; + + public SyntheticDatasetUpdateData() { + } + + public SyntheticDatasetUpdateData datasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Get datasetId + * @return datasetId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatasetId() { + return datasetId; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetId(@javax.annotation.Nonnull UUID datasetId) { + this.datasetId = datasetId; + } + + + public SyntheticDatasetUpdateData datasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get datasetName + * @return datasetName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetName() { + return datasetName; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDatasetName(@javax.annotation.Nonnull String datasetName) { + this.datasetName = datasetName; + } + + + public SyntheticDatasetUpdateData numRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + return this; + } + + /** + * Get numRows + * @return numRows + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRows() { + return numRows; + } + + + @JsonProperty(JSON_PROPERTY_NUM_ROWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumRows(@javax.annotation.Nullable Integer numRows) { + this.numRows = numRows; + } + + + public SyntheticDatasetUpdateData numColumns(@javax.annotation.Nullable Integer numColumns) { + this.numColumns = numColumns; + return this; + } + + /** + * Get numColumns + * @return numColumns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumColumns() { + return numColumns; + } + + + @JsonProperty(JSON_PROPERTY_NUM_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumColumns(@javax.annotation.Nullable Integer numColumns) { + this.numColumns = numColumns; + } + + + /** + * Return true if this SyntheticDatasetUpdateData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetUpdateData syntheticDatasetUpdateData = (SyntheticDatasetUpdateData) o; + return Objects.equals(this.datasetId, syntheticDatasetUpdateData.datasetId) && + Objects.equals(this.datasetName, syntheticDatasetUpdateData.datasetName) && + Objects.equals(this.numRows, syntheticDatasetUpdateData.numRows) && + Objects.equals(this.numColumns, syntheticDatasetUpdateData.numColumns); + } + + @Override + public int hashCode() { + return Objects.hash(datasetId, datasetName, numRows, numColumns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetUpdateData {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" numRows: ").append(toIndentedString(numRows)).append("\n"); + sb.append(" numColumns: ").append(toIndentedString(numColumns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `dataset_id` to the URL query string + if (getDatasetId() != null) { + joiner.add(String.format("%sdataset_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetId())))); + } + + // add `dataset_name` to the URL query string + if (getDatasetName() != null) { + joiner.add(String.format("%sdataset_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDatasetName())))); + } + + // add `num_rows` to the URL query string + if (getNumRows() != null) { + joiner.add(String.format("%snum_rows%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumRows())))); + } + + // add `num_columns` to the URL query string + if (getNumColumns() != null) { + joiner.add(String.format("%snum_columns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNumColumns())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResponse.java new file mode 100644 index 0000000..a1f1598 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SyntheticDatasetUpdateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetUpdateResponse + */ +@JsonPropertyOrder({ + SyntheticDatasetUpdateResponse.JSON_PROPERTY_STATUS, + SyntheticDatasetUpdateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetUpdateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private SyntheticDatasetUpdateResult result; + + public SyntheticDatasetUpdateResponse() { + } + + public SyntheticDatasetUpdateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public SyntheticDatasetUpdateResponse result(@javax.annotation.Nonnull SyntheticDatasetUpdateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticDatasetUpdateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull SyntheticDatasetUpdateResult result) { + this.result = result; + } + + + /** + * Return true if this SyntheticDatasetUpdateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetUpdateResponse syntheticDatasetUpdateResponse = (SyntheticDatasetUpdateResponse) o; + return Objects.equals(this.status, syntheticDatasetUpdateResponse.status) && + Objects.equals(this.result, syntheticDatasetUpdateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetUpdateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResult.java new file mode 100644 index 0000000..643a876 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/SyntheticDatasetUpdateResult.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.SyntheticDatasetUpdateData; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * SyntheticDatasetUpdateResult + */ +@JsonPropertyOrder({ + SyntheticDatasetUpdateResult.JSON_PROPERTY_MESSAGE, + SyntheticDatasetUpdateResult.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class SyntheticDatasetUpdateResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_DATA = "data"; + @javax.annotation.Nonnull + private SyntheticDatasetUpdateData data; + + public SyntheticDatasetUpdateResult() { + } + + public SyntheticDatasetUpdateResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public SyntheticDatasetUpdateResult data(@javax.annotation.Nonnull SyntheticDatasetUpdateData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticDatasetUpdateData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@javax.annotation.Nonnull SyntheticDatasetUpdateData data) { + this.data = data; + } + + + /** + * Return true if this SyntheticDatasetUpdateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticDatasetUpdateResult syntheticDatasetUpdateResult = (SyntheticDatasetUpdateResult) o; + return Objects.equals(this.message, syntheticDatasetUpdateResult.message) && + Objects.equals(this.data, syntheticDatasetUpdateResult.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticDatasetUpdateResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecution.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecution.java new file mode 100644 index 0000000..36590b9 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecution.java @@ -0,0 +1,999 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CallExecution; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecution + */ +@JsonPropertyOrder({ + TestExecution.JSON_PROPERTY_ID, + TestExecution.JSON_PROPERTY_RUN_TEST, + TestExecution.JSON_PROPERTY_RUN_TEST_NAME, + TestExecution.JSON_PROPERTY_AGENT_DEFINITION_NAME, + TestExecution.JSON_PROPERTY_STATUS, + TestExecution.JSON_PROPERTY_ERROR_REASON, + TestExecution.JSON_PROPERTY_STARTED_AT, + TestExecution.JSON_PROPERTY_COMPLETED_AT, + TestExecution.JSON_PROPERTY_TOTAL_SCENARIOS, + TestExecution.JSON_PROPERTY_TOTAL_CALLS, + TestExecution.JSON_PROPERTY_COMPLETED_CALLS, + TestExecution.JSON_PROPERTY_FAILED_CALLS, + TestExecution.JSON_PROPERTY_EXECUTION_METADATA, + TestExecution.JSON_PROPERTY_DURATION_SECONDS, + TestExecution.JSON_PROPERTY_SUCCESS_RATE, + TestExecution.JSON_PROPERTY_CALLS, + TestExecution.JSON_PROPERTY_CREATED_AT, + TestExecution.JSON_PROPERTY_SCENARIO_IDS, + TestExecution.JSON_PROPERTY_SIMULATOR_AGENT_NAME, + TestExecution.JSON_PROPERTY_SIMULATOR_AGENT_ID, + TestExecution.JSON_PROPERTY_AGENT_DEFINITION_USED_NAME, + TestExecution.JSON_PROPERTY_AGENT_DEFINITION_USED_ID, + TestExecution.JSON_PROPERTY_CALLS_ATTEMPTED, + TestExecution.JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecution { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_RUN_TEST = "run_test"; + @javax.annotation.Nonnull + private UUID runTest; + + public static final String JSON_PROPERTY_RUN_TEST_NAME = "run_test_name"; + @javax.annotation.Nullable + private String runTestName; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_NAME = "agent_definition_name"; + @javax.annotation.Nullable + private String agentDefinitionName; + + /** + * Current status of the test execution + */ + public enum StatusEnum { + PENDING(String.valueOf("pending")), + + RUNNING(String.valueOf("running")), + + COMPLETED(String.valueOf("completed")), + + FAILED(String.valueOf("failed")), + + CANCELLED(String.valueOf("cancelled")), + + CANCELLING(String.valueOf("cancelling")), + + EVALUATING(String.valueOf("evaluating")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_ERROR_REASON = "error_reason"; + private JsonNullable errorReason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + @javax.annotation.Nullable + private OffsetDateTime startedAt; + + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL_SCENARIOS = "total_scenarios"; + @javax.annotation.Nullable + private Integer totalScenarios; + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_COMPLETED_CALLS = "completed_calls"; + @javax.annotation.Nullable + private Integer completedCalls; + + public static final String JSON_PROPERTY_FAILED_CALLS = "failed_calls"; + @javax.annotation.Nullable + private Integer failedCalls; + + public static final String JSON_PROPERTY_EXECUTION_METADATA = "execution_metadata"; + @javax.annotation.Nullable + private Map executionMetadata = new HashMap<>(); + + public static final String JSON_PROPERTY_DURATION_SECONDS = "duration_seconds"; + @javax.annotation.Nullable + private String durationSeconds; + + public static final String JSON_PROPERTY_SUCCESS_RATE = "success_rate"; + @javax.annotation.Nullable + private String successRate; + + public static final String JSON_PROPERTY_CALLS = "calls"; + @javax.annotation.Nullable + private List calls = new ArrayList<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nullable + private Map scenarioIds = new HashMap<>(); + + public static final String JSON_PROPERTY_SIMULATOR_AGENT_NAME = "simulator_agent_name"; + @javax.annotation.Nullable + private String simulatorAgentName; + + public static final String JSON_PROPERTY_SIMULATOR_AGENT_ID = "simulator_agent_id"; + @javax.annotation.Nullable + private UUID simulatorAgentId; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_USED_NAME = "agent_definition_used_name"; + @javax.annotation.Nullable + private String agentDefinitionUsedName; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_USED_ID = "agent_definition_used_id"; + @javax.annotation.Nullable + private UUID agentDefinitionUsedId; + + public static final String JSON_PROPERTY_CALLS_ATTEMPTED = "calls_attempted"; + @javax.annotation.Nullable + private String callsAttempted; + + public static final String JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE = "calls_connected_percentage"; + @javax.annotation.Nullable + private String callsConnectedPercentage; + + public TestExecution() { + } + + @JsonCreator + public TestExecution( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) String runTestName, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_NAME) String agentDefinitionName, + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) String durationSeconds, + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) String successRate, + @JsonProperty(JSON_PROPERTY_CALLS) List calls, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_NAME) String simulatorAgentName, + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_ID) UUID simulatorAgentId, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_NAME) String agentDefinitionUsedName, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_ID) UUID agentDefinitionUsedId, + @JsonProperty(JSON_PROPERTY_CALLS_ATTEMPTED) String callsAttempted, + @JsonProperty(JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE) String callsConnectedPercentage + ) { + this(); + this.id = id; + this.runTestName = runTestName; + this.agentDefinitionName = agentDefinitionName; + this.durationSeconds = durationSeconds; + this.successRate = successRate; + this.calls = calls; + this.createdAt = createdAt; + this.simulatorAgentName = simulatorAgentName; + this.simulatorAgentId = simulatorAgentId; + this.agentDefinitionUsedName = agentDefinitionUsedName; + this.agentDefinitionUsedId = agentDefinitionUsedId; + this.callsAttempted = callsAttempted; + this.callsConnectedPercentage = callsConnectedPercentage; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public TestExecution runTest(@javax.annotation.Nonnull UUID runTest) { + this.runTest = runTest; + return this; + } + + /** + * The run test being executed + * @return runTest + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getRunTest() { + return runTest; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTest(@javax.annotation.Nonnull UUID runTest) { + this.runTest = runTest; + } + + + /** + * Get runTestName + * @return runTestName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_TEST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRunTestName() { + return runTestName; + } + + + + + /** + * Get agentDefinitionName + * @return agentDefinitionName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentDefinitionName() { + return agentDefinitionName; + } + + + + + public TestExecution status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current status of the test execution + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public TestExecution errorReason(@javax.annotation.Nullable String errorReason) { + this.errorReason = JsonNullable.of(errorReason); + return this; + } + + /** + * Get errorReason + * @return errorReason + */ + @javax.annotation.Nullable + @JsonIgnore + public String getErrorReason() { + return errorReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getErrorReason_JsonNullable() { + return errorReason; + } + + @JsonProperty(JSON_PROPERTY_ERROR_REASON) + public void setErrorReason_JsonNullable(JsonNullable errorReason) { + this.errorReason = errorReason; + } + + public void setErrorReason(@javax.annotation.Nullable String errorReason) { + this.errorReason = JsonNullable.of(errorReason); + } + + + public TestExecution startedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * When the test execution started + * @return startedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getStartedAt() { + return startedAt; + } + + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStartedAt(@javax.annotation.Nullable OffsetDateTime startedAt) { + this.startedAt = startedAt; + } + + + public TestExecution completedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * When the test execution completed + * @return completedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(@javax.annotation.Nullable OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + + public TestExecution totalScenarios(@javax.annotation.Nullable Integer totalScenarios) { + this.totalScenarios = totalScenarios; + return this; + } + + /** + * Total number of scenarios in this execution + * minimum: -2147483648 + * maximum: 2147483647 + * @return totalScenarios + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalScenarios() { + return totalScenarios; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalScenarios(@javax.annotation.Nullable Integer totalScenarios) { + this.totalScenarios = totalScenarios; + } + + + public TestExecution totalCalls(@javax.annotation.Nullable Integer totalCalls) { + this.totalCalls = totalCalls; + return this; + } + + /** + * Total number of calls to be made + * minimum: -2147483648 + * maximum: 2147483647 + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalCalls(@javax.annotation.Nullable Integer totalCalls) { + this.totalCalls = totalCalls; + } + + + public TestExecution completedCalls(@javax.annotation.Nullable Integer completedCalls) { + this.completedCalls = completedCalls; + return this; + } + + /** + * Number of successfully completed calls + * minimum: -2147483648 + * maximum: 2147483647 + * @return completedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCompletedCalls() { + return completedCalls; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompletedCalls(@javax.annotation.Nullable Integer completedCalls) { + this.completedCalls = completedCalls; + } + + + public TestExecution failedCalls(@javax.annotation.Nullable Integer failedCalls) { + this.failedCalls = failedCalls; + return this; + } + + /** + * Number of failed calls + * minimum: -2147483648 + * maximum: 2147483647 + * @return failedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailedCalls() { + return failedCalls; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFailedCalls(@javax.annotation.Nullable Integer failedCalls) { + this.failedCalls = failedCalls; + } + + + public TestExecution executionMetadata(@javax.annotation.Nullable Map executionMetadata) { + this.executionMetadata = executionMetadata; + return this; + } + + public TestExecution putExecutionMetadataItem(String key, Object executionMetadataItem) { + if (this.executionMetadata == null) { + this.executionMetadata = new HashMap<>(); + } + this.executionMetadata.put(key, executionMetadataItem); + return this; + } + + /** + * Additional metadata about the execution + * @return executionMetadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getExecutionMetadata() { + return executionMetadata; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionMetadata(@javax.annotation.Nullable Map executionMetadata) { + this.executionMetadata = executionMetadata; + } + + + /** + * Get durationSeconds + * @return durationSeconds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDurationSeconds() { + return durationSeconds; + } + + + + + /** + * Get successRate + * @return successRate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSuccessRate() { + return successRate; + } + + + + + /** + * Get calls + * @return calls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCalls() { + return calls; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + public TestExecution scenarioIds(@javax.annotation.Nullable Map scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public TestExecution putScenarioIdsItem(String key, Object scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new HashMap<>(); + } + this.scenarioIds.put(key, scenarioIdsItem); + return this; + } + + /** + * List of scenario IDs that were executed in this run + * @return scenarioIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioIds(@javax.annotation.Nullable Map scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + /** + * Get simulatorAgentName + * @return simulatorAgentName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSimulatorAgentName() { + return simulatorAgentName; + } + + + + + /** + * Get simulatorAgentId + * @return simulatorAgentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIMULATOR_AGENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getSimulatorAgentId() { + return simulatorAgentId; + } + + + + + /** + * Get agentDefinitionUsedName + * @return agentDefinitionUsedName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentDefinitionUsedName() { + return agentDefinitionUsedName; + } + + + + + /** + * Get agentDefinitionUsedId + * @return agentDefinitionUsedId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_USED_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAgentDefinitionUsedId() { + return agentDefinitionUsedId; + } + + + + + /** + * Get callsAttempted + * @return callsAttempted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS_ATTEMPTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCallsAttempted() { + return callsAttempted; + } + + + + + /** + * Get callsConnectedPercentage + * @return callsConnectedPercentage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCallsConnectedPercentage() { + return callsConnectedPercentage; + } + + + + + /** + * Return true if this TestExecution object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecution testExecution = (TestExecution) o; + return Objects.equals(this.id, testExecution.id) && + Objects.equals(this.runTest, testExecution.runTest) && + Objects.equals(this.runTestName, testExecution.runTestName) && + Objects.equals(this.agentDefinitionName, testExecution.agentDefinitionName) && + Objects.equals(this.status, testExecution.status) && + equalsNullable(this.errorReason, testExecution.errorReason) && + Objects.equals(this.startedAt, testExecution.startedAt) && + equalsNullable(this.completedAt, testExecution.completedAt) && + Objects.equals(this.totalScenarios, testExecution.totalScenarios) && + Objects.equals(this.totalCalls, testExecution.totalCalls) && + Objects.equals(this.completedCalls, testExecution.completedCalls) && + Objects.equals(this.failedCalls, testExecution.failedCalls) && + Objects.equals(this.executionMetadata, testExecution.executionMetadata) && + Objects.equals(this.durationSeconds, testExecution.durationSeconds) && + Objects.equals(this.successRate, testExecution.successRate) && + Objects.equals(this.calls, testExecution.calls) && + Objects.equals(this.createdAt, testExecution.createdAt) && + Objects.equals(this.scenarioIds, testExecution.scenarioIds) && + Objects.equals(this.simulatorAgentName, testExecution.simulatorAgentName) && + Objects.equals(this.simulatorAgentId, testExecution.simulatorAgentId) && + Objects.equals(this.agentDefinitionUsedName, testExecution.agentDefinitionUsedName) && + Objects.equals(this.agentDefinitionUsedId, testExecution.agentDefinitionUsedId) && + Objects.equals(this.callsAttempted, testExecution.callsAttempted) && + Objects.equals(this.callsConnectedPercentage, testExecution.callsConnectedPercentage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, runTest, runTestName, agentDefinitionName, status, hashCodeNullable(errorReason), startedAt, hashCodeNullable(completedAt), totalScenarios, totalCalls, completedCalls, failedCalls, executionMetadata, durationSeconds, successRate, calls, createdAt, scenarioIds, simulatorAgentName, simulatorAgentId, agentDefinitionUsedName, agentDefinitionUsedId, callsAttempted, callsConnectedPercentage); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecution {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" runTest: ").append(toIndentedString(runTest)).append("\n"); + sb.append(" runTestName: ").append(toIndentedString(runTestName)).append("\n"); + sb.append(" agentDefinitionName: ").append(toIndentedString(agentDefinitionName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" errorReason: ").append(toIndentedString(errorReason)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" totalScenarios: ").append(toIndentedString(totalScenarios)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" completedCalls: ").append(toIndentedString(completedCalls)).append("\n"); + sb.append(" failedCalls: ").append(toIndentedString(failedCalls)).append("\n"); + sb.append(" executionMetadata: ").append(toIndentedString(executionMetadata)).append("\n"); + sb.append(" durationSeconds: ").append(toIndentedString(durationSeconds)).append("\n"); + sb.append(" successRate: ").append(toIndentedString(successRate)).append("\n"); + sb.append(" calls: ").append(toIndentedString(calls)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append(" simulatorAgentName: ").append(toIndentedString(simulatorAgentName)).append("\n"); + sb.append(" simulatorAgentId: ").append(toIndentedString(simulatorAgentId)).append("\n"); + sb.append(" agentDefinitionUsedName: ").append(toIndentedString(agentDefinitionUsedName)).append("\n"); + sb.append(" agentDefinitionUsedId: ").append(toIndentedString(agentDefinitionUsedId)).append("\n"); + sb.append(" callsAttempted: ").append(toIndentedString(callsAttempted)).append("\n"); + sb.append(" callsConnectedPercentage: ").append(toIndentedString(callsConnectedPercentage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `run_test` to the URL query string + if (getRunTest() != null) { + joiner.add(String.format("%srun_test%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTest())))); + } + + // add `run_test_name` to the URL query string + if (getRunTestName() != null) { + joiner.add(String.format("%srun_test_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestName())))); + } + + // add `agent_definition_name` to the URL query string + if (getAgentDefinitionName() != null) { + joiner.add(String.format("%sagent_definition_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionName())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `error_reason` to the URL query string + if (getErrorReason() != null) { + joiner.add(String.format("%serror_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorReason())))); + } + + // add `started_at` to the URL query string + if (getStartedAt() != null) { + joiner.add(String.format("%sstarted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartedAt())))); + } + + // add `completed_at` to the URL query string + if (getCompletedAt() != null) { + joiner.add(String.format("%scompleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedAt())))); + } + + // add `total_scenarios` to the URL query string + if (getTotalScenarios() != null) { + joiner.add(String.format("%stotal_scenarios%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalScenarios())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `completed_calls` to the URL query string + if (getCompletedCalls() != null) { + joiner.add(String.format("%scompleted_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedCalls())))); + } + + // add `failed_calls` to the URL query string + if (getFailedCalls() != null) { + joiner.add(String.format("%sfailed_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedCalls())))); + } + + // add `execution_metadata` to the URL query string + if (getExecutionMetadata() != null) { + for (String _key : getExecutionMetadata().keySet()) { + joiner.add(String.format("%sexecution_metadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getExecutionMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getExecutionMetadata().get(_key))))); + } + } + + // add `duration_seconds` to the URL query string + if (getDurationSeconds() != null) { + joiner.add(String.format("%sduration_seconds%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDurationSeconds())))); + } + + // add `success_rate` to the URL query string + if (getSuccessRate() != null) { + joiner.add(String.format("%ssuccess_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccessRate())))); + } + + // add `calls` to the URL query string + if (getCalls() != null) { + for (int i = 0; i < getCalls().size(); i++) { + if (getCalls().get(i) != null) { + joiner.add(getCalls().get(i).toUrlQueryString(String.format("%scalls%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (String _key : getScenarioIds().keySet()) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getScenarioIds().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(_key))))); + } + } + + // add `simulator_agent_name` to the URL query string + if (getSimulatorAgentName() != null) { + joiner.add(String.format("%ssimulator_agent_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulatorAgentName())))); + } + + // add `simulator_agent_id` to the URL query string + if (getSimulatorAgentId() != null) { + joiner.add(String.format("%ssimulator_agent_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSimulatorAgentId())))); + } + + // add `agent_definition_used_name` to the URL query string + if (getAgentDefinitionUsedName() != null) { + joiner.add(String.format("%sagent_definition_used_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionUsedName())))); + } + + // add `agent_definition_used_id` to the URL query string + if (getAgentDefinitionUsedId() != null) { + joiner.add(String.format("%sagent_definition_used_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionUsedId())))); + } + + // add `calls_attempted` to the URL query string + if (getCallsAttempted() != null) { + joiner.add(String.format("%scalls_attempted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallsAttempted())))); + } + + // add `calls_connected_percentage` to the URL query string + if (getCallsConnectedPercentage() != null) { + joiner.add(String.format("%scalls_connected_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallsConnectedPercentage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionAnalytics.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionAnalytics.java new file mode 100644 index 0000000..fb7ce0e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionAnalytics.java @@ -0,0 +1,261 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionAnalytics + */ +@JsonPropertyOrder({ + TestExecutionAnalytics.JSON_PROPERTY_FAIL_RATE_OVER_TEST_RUNS, + TestExecutionAnalytics.JSON_PROPERTY_EVALUATION_CATEGORIES_OVER_TEST_RUNS, + TestExecutionAnalytics.JSON_PROPERTY_METADATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionAnalytics { + public static final String JSON_PROPERTY_FAIL_RATE_OVER_TEST_RUNS = "fail_rate_over_test_runs"; + @javax.annotation.Nonnull + private Map failRateOverTestRuns = new HashMap<>(); + + public static final String JSON_PROPERTY_EVALUATION_CATEGORIES_OVER_TEST_RUNS = "evaluation_categories_over_test_runs"; + @javax.annotation.Nonnull + private Map evaluationCategoriesOverTestRuns = new HashMap<>(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nonnull + private Map metadata = new HashMap<>(); + + public TestExecutionAnalytics() { + } + + public TestExecutionAnalytics failRateOverTestRuns(@javax.annotation.Nonnull Map failRateOverTestRuns) { + this.failRateOverTestRuns = failRateOverTestRuns; + return this; + } + + public TestExecutionAnalytics putFailRateOverTestRunsItem(String key, String failRateOverTestRunsItem) { + if (this.failRateOverTestRuns == null) { + this.failRateOverTestRuns = new HashMap<>(); + } + this.failRateOverTestRuns.put(key, failRateOverTestRunsItem); + return this; + } + + /** + * Fail rate data for scatter plot chart + * @return failRateOverTestRuns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAIL_RATE_OVER_TEST_RUNS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getFailRateOverTestRuns() { + return failRateOverTestRuns; + } + + + @JsonProperty(JSON_PROPERTY_FAIL_RATE_OVER_TEST_RUNS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setFailRateOverTestRuns(@javax.annotation.Nonnull Map failRateOverTestRuns) { + this.failRateOverTestRuns = failRateOverTestRuns; + } + + + public TestExecutionAnalytics evaluationCategoriesOverTestRuns(@javax.annotation.Nonnull Map evaluationCategoriesOverTestRuns) { + this.evaluationCategoriesOverTestRuns = evaluationCategoriesOverTestRuns; + return this; + } + + public TestExecutionAnalytics putEvaluationCategoriesOverTestRunsItem(String key, String evaluationCategoriesOverTestRunsItem) { + if (this.evaluationCategoriesOverTestRuns == null) { + this.evaluationCategoriesOverTestRuns = new HashMap<>(); + } + this.evaluationCategoriesOverTestRuns.put(key, evaluationCategoriesOverTestRunsItem); + return this; + } + + /** + * Evaluation categories data for line graph chart + * @return evaluationCategoriesOverTestRuns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVALUATION_CATEGORIES_OVER_TEST_RUNS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getEvaluationCategoriesOverTestRuns() { + return evaluationCategoriesOverTestRuns; + } + + + @JsonProperty(JSON_PROPERTY_EVALUATION_CATEGORIES_OVER_TEST_RUNS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setEvaluationCategoriesOverTestRuns(@javax.annotation.Nonnull Map evaluationCategoriesOverTestRuns) { + this.evaluationCategoriesOverTestRuns = evaluationCategoriesOverTestRuns; + } + + + public TestExecutionAnalytics metadata(@javax.annotation.Nonnull Map metadata) { + this.metadata = metadata; + return this; + } + + public TestExecutionAnalytics putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Metadata about the analytics data + * @return metadata + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setMetadata(@javax.annotation.Nonnull Map metadata) { + this.metadata = metadata; + } + + + /** + * Return true if this TestExecutionAnalytics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionAnalytics testExecutionAnalytics = (TestExecutionAnalytics) o; + return Objects.equals(this.failRateOverTestRuns, testExecutionAnalytics.failRateOverTestRuns) && + Objects.equals(this.evaluationCategoriesOverTestRuns, testExecutionAnalytics.evaluationCategoriesOverTestRuns) && + Objects.equals(this.metadata, testExecutionAnalytics.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(failRateOverTestRuns, evaluationCategoriesOverTestRuns, metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionAnalytics {\n"); + sb.append(" failRateOverTestRuns: ").append(toIndentedString(failRateOverTestRuns)).append("\n"); + sb.append(" evaluationCategoriesOverTestRuns: ").append(toIndentedString(evaluationCategoriesOverTestRuns)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fail_rate_over_test_runs` to the URL query string + if (getFailRateOverTestRuns() != null) { + for (String _key : getFailRateOverTestRuns().keySet()) { + joiner.add(String.format("%sfail_rate_over_test_runs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFailRateOverTestRuns().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFailRateOverTestRuns().get(_key))))); + } + } + + // add `evaluation_categories_over_test_runs` to the URL query string + if (getEvaluationCategoriesOverTestRuns() != null) { + for (String _key : getEvaluationCategoriesOverTestRuns().keySet()) { + joiner.add(String.format("%sevaluation_categories_over_test_runs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEvaluationCategoriesOverTestRuns().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEvaluationCategoriesOverTestRuns().get(_key))))); + } + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDelete.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDelete.java new file mode 100644 index 0000000..2ddc23e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDelete.java @@ -0,0 +1,204 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionBulkDelete + */ +@JsonPropertyOrder({ + TestExecutionBulkDelete.JSON_PROPERTY_TEST_EXECUTION_IDS, + TestExecutionBulkDelete.JSON_PROPERTY_SELECT_ALL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionBulkDelete { + public static final String JSON_PROPERTY_TEST_EXECUTION_IDS = "test_execution_ids"; + @javax.annotation.Nullable + private List testExecutionIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECT_ALL = "select_all"; + @javax.annotation.Nullable + private Boolean selectAll = false; + + public TestExecutionBulkDelete() { + } + + public TestExecutionBulkDelete testExecutionIds(@javax.annotation.Nullable List testExecutionIds) { + this.testExecutionIds = testExecutionIds; + return this; + } + + public TestExecutionBulkDelete addTestExecutionIdsItem(UUID testExecutionIdsItem) { + if (this.testExecutionIds == null) { + this.testExecutionIds = new ArrayList<>(); + } + this.testExecutionIds.add(testExecutionIdsItem); + return this; + } + + /** + * List of specific test execution IDs to delete + * @return testExecutionIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTestExecutionIds() { + return testExecutionIds; + } + + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTestExecutionIds(@javax.annotation.Nullable List testExecutionIds) { + this.testExecutionIds = testExecutionIds; + } + + + public TestExecutionBulkDelete selectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + return this; + } + + /** + * Whether to delete all test executions in the run test + * @return selectAll + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectAll() { + return selectAll; + } + + + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + } + + + /** + * Return true if this TestExecutionBulkDelete object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionBulkDelete testExecutionBulkDelete = (TestExecutionBulkDelete) o; + return Objects.equals(this.testExecutionIds, testExecutionBulkDelete.testExecutionIds) && + Objects.equals(this.selectAll, testExecutionBulkDelete.selectAll); + } + + @Override + public int hashCode() { + return Objects.hash(testExecutionIds, selectAll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionBulkDelete {\n"); + sb.append(" testExecutionIds: ").append(toIndentedString(testExecutionIds)).append("\n"); + sb.append(" selectAll: ").append(toIndentedString(selectAll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `test_execution_ids` to the URL query string + if (getTestExecutionIds() != null) { + for (int i = 0; i < getTestExecutionIds().size(); i++) { + if (getTestExecutionIds().get(i) != null) { + joiner.add(String.format("%stest_execution_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionIds().get(i))))); + } + } + } + + // add `select_all` to the URL query string + if (getSelectAll() != null) { + joiner.add(String.format("%sselect_all%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectAll())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDeleteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDeleteResponse.java new file mode 100644 index 0000000..a6845cd --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionBulkDeleteResponse.java @@ -0,0 +1,242 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionBulkDeleteResponse + */ +@JsonPropertyOrder({ + TestExecutionBulkDeleteResponse.JSON_PROPERTY_MESSAGE, + TestExecutionBulkDeleteResponse.JSON_PROPERTY_RUN_TEST_ID, + TestExecutionBulkDeleteResponse.JSON_PROPERTY_DELETED_COUNT, + TestExecutionBulkDeleteResponse.JSON_PROPERTY_DELETED_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionBulkDeleteResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nullable + private UUID runTestId; + + public static final String JSON_PROPERTY_DELETED_COUNT = "deleted_count"; + @javax.annotation.Nullable + private Integer deletedCount; + + public static final String JSON_PROPERTY_DELETED_IDS = "deleted_ids"; + @javax.annotation.Nullable + private List deletedIds = new ArrayList<>(); + + public TestExecutionBulkDeleteResponse() { + } + + @JsonCreator + public TestExecutionBulkDeleteResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) UUID runTestId, + @JsonProperty(JSON_PROPERTY_DELETED_COUNT) Integer deletedCount, + @JsonProperty(JSON_PROPERTY_DELETED_IDS) List deletedIds + ) { + this(); + this.message = message; + this.runTestId = runTestId; + this.deletedCount = deletedCount; + this.deletedIds = deletedIds; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getRunTestId() { + return runTestId; + } + + + + + /** + * Get deletedCount + * @return deletedCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDeletedCount() { + return deletedCount; + } + + + + + /** + * Get deletedIds + * @return deletedIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDeletedIds() { + return deletedIds; + } + + + + + /** + * Return true if this TestExecutionBulkDeleteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionBulkDeleteResponse testExecutionBulkDeleteResponse = (TestExecutionBulkDeleteResponse) o; + return Objects.equals(this.message, testExecutionBulkDeleteResponse.message) && + Objects.equals(this.runTestId, testExecutionBulkDeleteResponse.runTestId) && + Objects.equals(this.deletedCount, testExecutionBulkDeleteResponse.deletedCount) && + Objects.equals(this.deletedIds, testExecutionBulkDeleteResponse.deletedIds); + } + + @Override + public int hashCode() { + return Objects.hash(message, runTestId, deletedCount, deletedIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionBulkDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" deletedCount: ").append(toIndentedString(deletedCount)).append("\n"); + sb.append(" deletedIds: ").append(toIndentedString(deletedIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `deleted_count` to the URL query string + if (getDeletedCount() != null) { + joiner.add(String.format("%sdeleted_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeletedCount())))); + } + + // add `deleted_ids` to the URL query string + if (getDeletedIds() != null) { + for (int i = 0; i < getDeletedIds().size(); i++) { + if (getDeletedIds().get(i) != null) { + joiner.add(String.format("%sdeleted_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDeletedIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResponse.java new file mode 100644 index 0000000..08574b4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TestExecutionChatBatchResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionChatBatchResponse + */ +@JsonPropertyOrder({ + TestExecutionChatBatchResponse.JSON_PROPERTY_STATUS, + TestExecutionChatBatchResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionChatBatchResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private TestExecutionChatBatchResult result; + + public TestExecutionChatBatchResponse() { + } + + public TestExecutionChatBatchResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public TestExecutionChatBatchResponse result(@javax.annotation.Nonnull TestExecutionChatBatchResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TestExecutionChatBatchResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull TestExecutionChatBatchResult result) { + this.result = result; + } + + + /** + * Return true if this TestExecutionChatBatchResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionChatBatchResponse testExecutionChatBatchResponse = (TestExecutionChatBatchResponse) o; + return Objects.equals(this.status, testExecutionChatBatchResponse.status) && + Objects.equals(this.result, testExecutionChatBatchResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionChatBatchResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResult.java new file mode 100644 index 0000000..7bcc03c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionChatBatchResult.java @@ -0,0 +1,254 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionChatBatchResult + */ +@JsonPropertyOrder({ + TestExecutionChatBatchResult.JSON_PROPERTY_CALL_EXECUTION_IDS, + TestExecutionChatBatchResult.JSON_PROPERTY_HAS_MORE, + TestExecutionChatBatchResult.JSON_PROPERTY_BATCHED_SCENARIOS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionChatBatchResult { + public static final String JSON_PROPERTY_CALL_EXECUTION_IDS = "call_execution_ids"; + @javax.annotation.Nonnull + private List callExecutionIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_HAS_MORE = "has_more"; + @javax.annotation.Nonnull + private Boolean hasMore; + + public static final String JSON_PROPERTY_BATCHED_SCENARIOS = "batched_scenarios"; + @javax.annotation.Nonnull + private List batchedScenarios = new ArrayList<>(); + + public TestExecutionChatBatchResult() { + } + + public TestExecutionChatBatchResult callExecutionIds(@javax.annotation.Nonnull List callExecutionIds) { + this.callExecutionIds = callExecutionIds; + return this; + } + + public TestExecutionChatBatchResult addCallExecutionIdsItem(UUID callExecutionIdsItem) { + if (this.callExecutionIds == null) { + this.callExecutionIds = new ArrayList<>(); + } + this.callExecutionIds.add(callExecutionIdsItem); + return this; + } + + /** + * Get callExecutionIds + * @return callExecutionIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCallExecutionIds() { + return callExecutionIds; + } + + + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCallExecutionIds(@javax.annotation.Nonnull List callExecutionIds) { + this.callExecutionIds = callExecutionIds; + } + + + public TestExecutionChatBatchResult hasMore(@javax.annotation.Nonnull Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Get hasMore + * @return hasMore + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_MORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasMore() { + return hasMore; + } + + + @JsonProperty(JSON_PROPERTY_HAS_MORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasMore(@javax.annotation.Nonnull Boolean hasMore) { + this.hasMore = hasMore; + } + + + public TestExecutionChatBatchResult batchedScenarios(@javax.annotation.Nonnull List batchedScenarios) { + this.batchedScenarios = batchedScenarios; + return this; + } + + public TestExecutionChatBatchResult addBatchedScenariosItem(UUID batchedScenariosItem) { + if (this.batchedScenarios == null) { + this.batchedScenarios = new ArrayList<>(); + } + this.batchedScenarios.add(batchedScenariosItem); + return this; + } + + /** + * Get batchedScenarios + * @return batchedScenarios + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BATCHED_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getBatchedScenarios() { + return batchedScenarios; + } + + + @JsonProperty(JSON_PROPERTY_BATCHED_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatchedScenarios(@javax.annotation.Nonnull List batchedScenarios) { + this.batchedScenarios = batchedScenarios; + } + + + /** + * Return true if this TestExecutionChatBatchResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionChatBatchResult testExecutionChatBatchResult = (TestExecutionChatBatchResult) o; + return Objects.equals(this.callExecutionIds, testExecutionChatBatchResult.callExecutionIds) && + Objects.equals(this.hasMore, testExecutionChatBatchResult.hasMore) && + Objects.equals(this.batchedScenarios, testExecutionChatBatchResult.batchedScenarios); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionIds, hasMore, batchedScenarios); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionChatBatchResult {\n"); + sb.append(" callExecutionIds: ").append(toIndentedString(callExecutionIds)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" batchedScenarios: ").append(toIndentedString(batchedScenarios)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_ids` to the URL query string + if (getCallExecutionIds() != null) { + for (int i = 0; i < getCallExecutionIds().size(); i++) { + if (getCallExecutionIds().get(i) != null) { + joiner.add(String.format("%scall_execution_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionIds().get(i))))); + } + } + } + + // add `has_more` to the URL query string + if (getHasMore() != null) { + joiner.add(String.format("%shas_more%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHasMore())))); + } + + // add `batched_scenarios` to the URL query string + if (getBatchedScenarios() != null) { + for (int i = 0; i < getBatchedScenarios().size(); i++) { + if (getBatchedScenarios().get(i) != null) { + joiner.add(String.format("%sbatched_scenarios%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getBatchedScenarios().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrder.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrder.java new file mode 100644 index 0000000..15314d8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrder.java @@ -0,0 +1,167 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ColumnOrder; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionColumnOrder + */ +@JsonPropertyOrder({ + TestExecutionColumnOrder.JSON_PROPERTY_COLUMN_ORDER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionColumnOrder { + public static final String JSON_PROPERTY_COLUMN_ORDER = "column_order"; + @javax.annotation.Nonnull + private List columnOrder = new ArrayList<>(); + + public TestExecutionColumnOrder() { + } + + public TestExecutionColumnOrder columnOrder(@javax.annotation.Nonnull List columnOrder) { + this.columnOrder = columnOrder; + return this; + } + + public TestExecutionColumnOrder addColumnOrderItem(ColumnOrder columnOrderItem) { + if (this.columnOrder == null) { + this.columnOrder = new ArrayList<>(); + } + this.columnOrder.add(columnOrderItem); + return this; + } + + /** + * Get columnOrder + * @return columnOrder + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getColumnOrder() { + return columnOrder; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnOrder(@javax.annotation.Nonnull List columnOrder) { + this.columnOrder = columnOrder; + } + + + /** + * Return true if this TestExecutionColumnOrder object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionColumnOrder testExecutionColumnOrder = (TestExecutionColumnOrder) o; + return Objects.equals(this.columnOrder, testExecutionColumnOrder.columnOrder); + } + + @Override + public int hashCode() { + return Objects.hash(columnOrder); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionColumnOrder {\n"); + sb.append(" columnOrder: ").append(toIndentedString(columnOrder)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_order` to the URL query string + if (getColumnOrder() != null) { + for (int i = 0; i < getColumnOrder().size(); i++) { + if (getColumnOrder().get(i) != null) { + joiner.add(getColumnOrder().get(i).toUrlQueryString(String.format("%scolumn_order%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrderResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrderResponse.java new file mode 100644 index 0000000..613eb28 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionColumnOrderResponse.java @@ -0,0 +1,185 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.ColumnOrder; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionColumnOrderResponse + */ +@JsonPropertyOrder({ + TestExecutionColumnOrderResponse.JSON_PROPERTY_MESSAGE, + TestExecutionColumnOrderResponse.JSON_PROPERTY_COLUMN_ORDER +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionColumnOrderResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_COLUMN_ORDER = "column_order"; + @javax.annotation.Nullable + private List columnOrder = new ArrayList<>(); + + public TestExecutionColumnOrderResponse() { + } + + @JsonCreator + public TestExecutionColumnOrderResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) List columnOrder + ) { + this(); + this.message = message; + this.columnOrder = columnOrder; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get columnOrder + * @return columnOrder + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumnOrder() { + return columnOrder; + } + + + + + /** + * Return true if this TestExecutionColumnOrderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionColumnOrderResponse testExecutionColumnOrderResponse = (TestExecutionColumnOrderResponse) o; + return Objects.equals(this.message, testExecutionColumnOrderResponse.message) && + Objects.equals(this.columnOrder, testExecutionColumnOrderResponse.columnOrder); + } + + @Override + public int hashCode() { + return Objects.hash(message, columnOrder); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionColumnOrderResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" columnOrder: ").append(toIndentedString(columnOrder)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `column_order` to the URL query string + if (getColumnOrder() != null) { + for (int i = 0; i < getColumnOrder().size(); i++) { + if (getColumnOrder().get(i) != null) { + joiner.add(getColumnOrder().get(i).toUrlQueryString(String.format("%scolumn_order%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionDetailResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionDetailResponse.java new file mode 100644 index 0000000..e2428b3 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionDetailResponse.java @@ -0,0 +1,485 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionDetailResponse + */ +@JsonPropertyOrder({ + TestExecutionDetailResponse.JSON_PROPERTY_COUNT, + TestExecutionDetailResponse.JSON_PROPERTY_NEXT, + TestExecutionDetailResponse.JSON_PROPERTY_PREVIOUS, + TestExecutionDetailResponse.JSON_PROPERTY_RESULTS, + TestExecutionDetailResponse.JSON_PROPERTY_TOTAL_PAGES, + TestExecutionDetailResponse.JSON_PROPERTY_CURRENT_PAGE, + TestExecutionDetailResponse.JSON_PROPERTY_COLUMN_ORDER, + TestExecutionDetailResponse.JSON_PROPERTY_ERROR_MESSAGES, + TestExecutionDetailResponse.JSON_PROPERTY_STATUS, + TestExecutionDetailResponse.JSON_PROPERTY_PROVIDER, + TestExecutionDetailResponse.JSON_PROPERTY_AGENT_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionDetailResponse { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nullable + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List> results = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_CURRENT_PAGE = "current_page"; + @javax.annotation.Nullable + private Integer currentPage; + + public static final String JSON_PROPERTY_COLUMN_ORDER = "column_order"; + @javax.annotation.Nullable + private List> columnOrder = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; + @javax.annotation.Nullable + private List errorMessages = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + @javax.annotation.Nullable + private String provider; + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private String agentType; + + public TestExecutionDetailResponse() { + } + + @JsonCreator + public TestExecutionDetailResponse( + @JsonProperty(JSON_PROPERTY_COUNT) Integer count, + @JsonProperty(JSON_PROPERTY_NEXT) String next, + @JsonProperty(JSON_PROPERTY_PREVIOUS) String previous, + @JsonProperty(JSON_PROPERTY_RESULTS) List> results, + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) Integer totalPages, + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) Integer currentPage, + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) List> columnOrder, + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) List errorMessages, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_PROVIDER) String provider, + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) String agentType + ) { + this(); + this.count = count; + this.next = next == null ? JsonNullable.undefined() : JsonNullable.of(next); + this.previous = previous == null ? JsonNullable.undefined() : JsonNullable.of(previous); + this.results = results; + this.totalPages = totalPages; + this.currentPage = currentPage; + this.columnOrder = columnOrder; + this.errorMessages = errorMessages; + this.status = status; + this.provider = provider; + this.agentType = agentType; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCount() { + return count; + } + + + + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public String getNext() { + + if (next == null) { + next = JsonNullable.undefined(); + } + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + private void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPrevious() { + + if (previous == null) { + previous = JsonNullable.undefined(); + } + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + private void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + + + /** + * Call execution rows may include dynamic eval/scenario columns. + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getResults() { + return results; + } + + + + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + + + /** + * Get currentPage + * @return currentPage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCurrentPage() { + return currentPage; + } + + + + + /** + * Get columnOrder + * @return columnOrder + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getColumnOrder() { + return columnOrder; + } + + + + + /** + * Get errorMessages + * @return errorMessages + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getErrorMessages() { + return errorMessages; + } + + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + /** + * Get provider + * @return provider + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProvider() { + return provider; + } + + + + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentType() { + return agentType; + } + + + + + /** + * Return true if this TestExecutionDetailResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionDetailResponse testExecutionDetailResponse = (TestExecutionDetailResponse) o; + return Objects.equals(this.count, testExecutionDetailResponse.count) && + equalsNullable(this.next, testExecutionDetailResponse.next) && + equalsNullable(this.previous, testExecutionDetailResponse.previous) && + Objects.equals(this.results, testExecutionDetailResponse.results) && + Objects.equals(this.totalPages, testExecutionDetailResponse.totalPages) && + Objects.equals(this.currentPage, testExecutionDetailResponse.currentPage) && + Objects.equals(this.columnOrder, testExecutionDetailResponse.columnOrder) && + Objects.equals(this.errorMessages, testExecutionDetailResponse.errorMessages) && + Objects.equals(this.status, testExecutionDetailResponse.status) && + Objects.equals(this.provider, testExecutionDetailResponse.provider) && + Objects.equals(this.agentType, testExecutionDetailResponse.agentType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results, totalPages, currentPage, columnOrder, errorMessages, status, provider, agentType); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionDetailResponse {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append(" columnOrder: ").append(toIndentedString(columnOrder)).append("\n"); + sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + joiner.add(String.format("%sresults%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getResults().get(i))))); + } + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `current_page` to the URL query string + if (getCurrentPage() != null) { + joiner.add(String.format("%scurrent_page%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentPage())))); + } + + // add `column_order` to the URL query string + if (getColumnOrder() != null) { + for (int i = 0; i < getColumnOrder().size(); i++) { + joiner.add(String.format("%scolumn_order%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getColumnOrder().get(i))))); + } + } + + // add `error_messages` to the URL query string + if (getErrorMessages() != null) { + for (int i = 0; i < getErrorMessages().size(); i++) { + joiner.add(String.format("%serror_messages%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getErrorMessages().get(i))))); + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `provider` to the URL query string + if (getProvider() != null) { + joiner.add(String.format("%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionItemResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionItemResponse.java new file mode 100644 index 0000000..6a0e5c5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionItemResponse.java @@ -0,0 +1,667 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionItemResponse + */ +@JsonPropertyOrder({ + TestExecutionItemResponse.JSON_PROPERTY_ID, + TestExecutionItemResponse.JSON_PROPERTY_STATUS, + TestExecutionItemResponse.JSON_PROPERTY_SCENARIOS, + TestExecutionItemResponse.JSON_PROPERTY_START_TIME, + TestExecutionItemResponse.JSON_PROPERTY_DURATION, + TestExecutionItemResponse.JSON_PROPERTY_ERROR_REASON, + TestExecutionItemResponse.JSON_PROPERTY_SUCCESS_RATE, + TestExecutionItemResponse.JSON_PROPERTY_AVG_RESPONSE_TIME, + TestExecutionItemResponse.JSON_PROPERTY_CALLS, + TestExecutionItemResponse.JSON_PROPERTY_CALLS_ATTEMPTED, + TestExecutionItemResponse.JSON_PROPERTY_CONNECTED_CALLS, + TestExecutionItemResponse.JSON_PROPERTY_AGENT_VERSION, + TestExecutionItemResponse.JSON_PROPERTY_AGENT_DEFINITION, + TestExecutionItemResponse.JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE, + TestExecutionItemResponse.JSON_PROPERTY_TOTAL_CHATS, + TestExecutionItemResponse.JSON_PROPERTY_AGENT_TYPE, + TestExecutionItemResponse.JSON_PROPERTY_TOTAL_NUMBER_OF_FAGI_AGENT_TURNS, + TestExecutionItemResponse.JSON_PROPERTY_SOURCE_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionItemResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private String id; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_SCENARIOS = "scenarios"; + @javax.annotation.Nullable + private String scenarios; + + public static final String JSON_PROPERTY_START_TIME = "start_time"; + private JsonNullable startTime = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + @javax.annotation.Nullable + private Integer duration; + + public static final String JSON_PROPERTY_ERROR_REASON = "error_reason"; + private JsonNullable errorReason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SUCCESS_RATE = "success_rate"; + @javax.annotation.Nullable + private BigDecimal successRate; + + public static final String JSON_PROPERTY_AVG_RESPONSE_TIME = "avg_response_time"; + @javax.annotation.Nullable + private BigDecimal avgResponseTime; + + public static final String JSON_PROPERTY_CALLS = "calls"; + @javax.annotation.Nullable + private Integer calls; + + public static final String JSON_PROPERTY_CALLS_ATTEMPTED = "calls_attempted"; + @javax.annotation.Nullable + private Integer callsAttempted; + + public static final String JSON_PROPERTY_CONNECTED_CALLS = "connected_calls"; + @javax.annotation.Nullable + private Integer connectedCalls; + + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + @javax.annotation.Nullable + private String agentVersion; + + public static final String JSON_PROPERTY_AGENT_DEFINITION = "agent_definition"; + @javax.annotation.Nullable + private String agentDefinition; + + public static final String JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE = "calls_connected_percentage"; + @javax.annotation.Nullable + private BigDecimal callsConnectedPercentage; + + public static final String JSON_PROPERTY_TOTAL_CHATS = "total_chats"; + @javax.annotation.Nullable + private Integer totalChats; + + public static final String JSON_PROPERTY_AGENT_TYPE = "agent_type"; + @javax.annotation.Nullable + private String agentType; + + public static final String JSON_PROPERTY_TOTAL_NUMBER_OF_FAGI_AGENT_TURNS = "total_number_of_fagi_agent_turns"; + @javax.annotation.Nullable + private Integer totalNumberOfFagiAgentTurns; + + public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; + @javax.annotation.Nullable + private String sourceType; + + public TestExecutionItemResponse() { + } + + @JsonCreator + public TestExecutionItemResponse( + @JsonProperty(JSON_PROPERTY_ID) String id, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_SCENARIOS) String scenarios, + @JsonProperty(JSON_PROPERTY_START_TIME) String startTime, + @JsonProperty(JSON_PROPERTY_DURATION) Integer duration, + @JsonProperty(JSON_PROPERTY_ERROR_REASON) String errorReason, + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) BigDecimal successRate, + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) BigDecimal avgResponseTime, + @JsonProperty(JSON_PROPERTY_CALLS) Integer calls, + @JsonProperty(JSON_PROPERTY_CALLS_ATTEMPTED) Integer callsAttempted, + @JsonProperty(JSON_PROPERTY_CONNECTED_CALLS) Integer connectedCalls, + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) String agentVersion, + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) String agentDefinition, + @JsonProperty(JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE) BigDecimal callsConnectedPercentage, + @JsonProperty(JSON_PROPERTY_TOTAL_CHATS) Integer totalChats, + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) String agentType, + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_FAGI_AGENT_TURNS) Integer totalNumberOfFagiAgentTurns, + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) String sourceType + ) { + this(); + this.id = id; + this.status = status; + this.scenarios = scenarios; + this.startTime = startTime == null ? JsonNullable.undefined() : JsonNullable.of(startTime); + this.duration = duration; + this.errorReason = errorReason == null ? JsonNullable.undefined() : JsonNullable.of(errorReason); + this.successRate = successRate; + this.avgResponseTime = avgResponseTime; + this.calls = calls; + this.callsAttempted = callsAttempted; + this.connectedCalls = connectedCalls; + this.agentVersion = agentVersion; + this.agentDefinition = agentDefinition; + this.callsConnectedPercentage = callsConnectedPercentage; + this.totalChats = totalChats; + this.agentType = agentType; + this.totalNumberOfFagiAgentTurns = totalNumberOfFagiAgentTurns; + this.sourceType = sourceType; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + /** + * Get scenarios + * @return scenarios + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScenarios() { + return scenarios; + } + + + + + /** + * Get startTime + * @return startTime + */ + @javax.annotation.Nullable + @JsonIgnore + public String getStartTime() { + + if (startTime == null) { + startTime = JsonNullable.undefined(); + } + return startTime.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartTime_JsonNullable() { + return startTime; + } + + @JsonProperty(JSON_PROPERTY_START_TIME) + private void setStartTime_JsonNullable(JsonNullable startTime) { + this.startTime = startTime; + } + + + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDuration() { + return duration; + } + + + + + /** + * Get errorReason + * @return errorReason + */ + @javax.annotation.Nullable + @JsonIgnore + public String getErrorReason() { + + if (errorReason == null) { + errorReason = JsonNullable.undefined(); + } + return errorReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getErrorReason_JsonNullable() { + return errorReason; + } + + @JsonProperty(JSON_PROPERTY_ERROR_REASON) + private void setErrorReason_JsonNullable(JsonNullable errorReason) { + this.errorReason = errorReason; + } + + + + /** + * Get successRate + * @return successRate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getSuccessRate() { + return successRate; + } + + + + + /** + * Get avgResponseTime + * @return avgResponseTime + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVG_RESPONSE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getAvgResponseTime() { + return avgResponseTime; + } + + + + + /** + * Get calls + * @return calls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCalls() { + return calls; + } + + + + + /** + * Get callsAttempted + * @return callsAttempted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS_ATTEMPTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getCallsAttempted() { + return callsAttempted; + } + + + + + /** + * Get connectedCalls + * @return connectedCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONNECTED_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConnectedCalls() { + return connectedCalls; + } + + + + + /** + * Get agentVersion + * @return agentVersion + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentVersion() { + return agentVersion; + } + + + + + /** + * Get agentDefinition + * @return agentDefinition + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentDefinition() { + return agentDefinition; + } + + + + + /** + * Get callsConnectedPercentage + * @return callsConnectedPercentage + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS_CONNECTED_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getCallsConnectedPercentage() { + return callsConnectedPercentage; + } + + + + + /** + * Get totalChats + * @return totalChats + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CHATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalChats() { + return totalChats; + } + + + + + /** + * Get agentType + * @return agentType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentType() { + return agentType; + } + + + + + /** + * Get totalNumberOfFagiAgentTurns + * @return totalNumberOfFagiAgentTurns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_NUMBER_OF_FAGI_AGENT_TURNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalNumberOfFagiAgentTurns() { + return totalNumberOfFagiAgentTurns; + } + + + + + /** + * Get sourceType + * @return sourceType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourceType() { + return sourceType; + } + + + + + /** + * Return true if this TestExecutionItemResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionItemResponse testExecutionItemResponse = (TestExecutionItemResponse) o; + return Objects.equals(this.id, testExecutionItemResponse.id) && + Objects.equals(this.status, testExecutionItemResponse.status) && + Objects.equals(this.scenarios, testExecutionItemResponse.scenarios) && + equalsNullable(this.startTime, testExecutionItemResponse.startTime) && + Objects.equals(this.duration, testExecutionItemResponse.duration) && + equalsNullable(this.errorReason, testExecutionItemResponse.errorReason) && + Objects.equals(this.successRate, testExecutionItemResponse.successRate) && + Objects.equals(this.avgResponseTime, testExecutionItemResponse.avgResponseTime) && + Objects.equals(this.calls, testExecutionItemResponse.calls) && + Objects.equals(this.callsAttempted, testExecutionItemResponse.callsAttempted) && + Objects.equals(this.connectedCalls, testExecutionItemResponse.connectedCalls) && + Objects.equals(this.agentVersion, testExecutionItemResponse.agentVersion) && + Objects.equals(this.agentDefinition, testExecutionItemResponse.agentDefinition) && + Objects.equals(this.callsConnectedPercentage, testExecutionItemResponse.callsConnectedPercentage) && + Objects.equals(this.totalChats, testExecutionItemResponse.totalChats) && + Objects.equals(this.agentType, testExecutionItemResponse.agentType) && + Objects.equals(this.totalNumberOfFagiAgentTurns, testExecutionItemResponse.totalNumberOfFagiAgentTurns) && + Objects.equals(this.sourceType, testExecutionItemResponse.sourceType); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, scenarios, hashCodeNullable(startTime), duration, hashCodeNullable(errorReason), successRate, avgResponseTime, calls, callsAttempted, connectedCalls, agentVersion, agentDefinition, callsConnectedPercentage, totalChats, agentType, totalNumberOfFagiAgentTurns, sourceType); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionItemResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" scenarios: ").append(toIndentedString(scenarios)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" errorReason: ").append(toIndentedString(errorReason)).append("\n"); + sb.append(" successRate: ").append(toIndentedString(successRate)).append("\n"); + sb.append(" avgResponseTime: ").append(toIndentedString(avgResponseTime)).append("\n"); + sb.append(" calls: ").append(toIndentedString(calls)).append("\n"); + sb.append(" callsAttempted: ").append(toIndentedString(callsAttempted)).append("\n"); + sb.append(" connectedCalls: ").append(toIndentedString(connectedCalls)).append("\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" agentDefinition: ").append(toIndentedString(agentDefinition)).append("\n"); + sb.append(" callsConnectedPercentage: ").append(toIndentedString(callsConnectedPercentage)).append("\n"); + sb.append(" totalChats: ").append(toIndentedString(totalChats)).append("\n"); + sb.append(" agentType: ").append(toIndentedString(agentType)).append("\n"); + sb.append(" totalNumberOfFagiAgentTurns: ").append(toIndentedString(totalNumberOfFagiAgentTurns)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `scenarios` to the URL query string + if (getScenarios() != null) { + joiner.add(String.format("%sscenarios%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarios())))); + } + + // add `start_time` to the URL query string + if (getStartTime() != null) { + joiner.add(String.format("%sstart_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartTime())))); + } + + // add `duration` to the URL query string + if (getDuration() != null) { + joiner.add(String.format("%sduration%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDuration())))); + } + + // add `error_reason` to the URL query string + if (getErrorReason() != null) { + joiner.add(String.format("%serror_reason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorReason())))); + } + + // add `success_rate` to the URL query string + if (getSuccessRate() != null) { + joiner.add(String.format("%ssuccess_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccessRate())))); + } + + // add `avg_response_time` to the URL query string + if (getAvgResponseTime() != null) { + joiner.add(String.format("%savg_response_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgResponseTime())))); + } + + // add `calls` to the URL query string + if (getCalls() != null) { + joiner.add(String.format("%scalls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCalls())))); + } + + // add `calls_attempted` to the URL query string + if (getCallsAttempted() != null) { + joiner.add(String.format("%scalls_attempted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallsAttempted())))); + } + + // add `connected_calls` to the URL query string + if (getConnectedCalls() != null) { + joiner.add(String.format("%sconnected_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConnectedCalls())))); + } + + // add `agent_version` to the URL query string + if (getAgentVersion() != null) { + joiner.add(String.format("%sagent_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentVersion())))); + } + + // add `agent_definition` to the URL query string + if (getAgentDefinition() != null) { + joiner.add(String.format("%sagent_definition%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinition())))); + } + + // add `calls_connected_percentage` to the URL query string + if (getCallsConnectedPercentage() != null) { + joiner.add(String.format("%scalls_connected_percentage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallsConnectedPercentage())))); + } + + // add `total_chats` to the URL query string + if (getTotalChats() != null) { + joiner.add(String.format("%stotal_chats%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalChats())))); + } + + // add `agent_type` to the URL query string + if (getAgentType() != null) { + joiner.add(String.format("%sagent_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentType())))); + } + + // add `total_number_of_fagi_agent_turns` to the URL query string + if (getTotalNumberOfFagiAgentTurns() != null) { + joiner.add(String.format("%stotal_number_of_fagi_agent_turns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalNumberOfFagiAgentTurns())))); + } + + // add `source_type` to the URL query string + if (getSourceType() != null) { + joiner.add(String.format("%ssource_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerun.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerun.java new file mode 100644 index 0000000..f9818d5 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerun.java @@ -0,0 +1,275 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionRerun + */ +@JsonPropertyOrder({ + TestExecutionRerun.JSON_PROPERTY_RERUN_TYPE, + TestExecutionRerun.JSON_PROPERTY_TEST_EXECUTION_IDS, + TestExecutionRerun.JSON_PROPERTY_SELECT_ALL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionRerun { + /** + * Type of rerun: evaluation only or call plus evaluation + */ + public enum RerunTypeEnum { + EVAL_ONLY(String.valueOf("eval_only")), + + CALL_AND_EVAL(String.valueOf("call_and_eval")); + + private String value; + + RerunTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RerunTypeEnum fromValue(String value) { + for (RerunTypeEnum b : RerunTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RERUN_TYPE = "rerun_type"; + @javax.annotation.Nonnull + private RerunTypeEnum rerunType; + + public static final String JSON_PROPERTY_TEST_EXECUTION_IDS = "test_execution_ids"; + @javax.annotation.Nullable + private List testExecutionIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SELECT_ALL = "select_all"; + @javax.annotation.Nullable + private Boolean selectAll = false; + + public TestExecutionRerun() { + } + + public TestExecutionRerun rerunType(@javax.annotation.Nonnull RerunTypeEnum rerunType) { + this.rerunType = rerunType; + return this; + } + + /** + * Type of rerun: evaluation only or call plus evaluation + * @return rerunType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RerunTypeEnum getRerunType() { + return rerunType; + } + + + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRerunType(@javax.annotation.Nonnull RerunTypeEnum rerunType) { + this.rerunType = rerunType; + } + + + public TestExecutionRerun testExecutionIds(@javax.annotation.Nullable List testExecutionIds) { + this.testExecutionIds = testExecutionIds; + return this; + } + + public TestExecutionRerun addTestExecutionIdsItem(UUID testExecutionIdsItem) { + if (this.testExecutionIds == null) { + this.testExecutionIds = new ArrayList<>(); + } + this.testExecutionIds.add(testExecutionIdsItem); + return this; + } + + /** + * List of specific test execution IDs to rerun + * @return testExecutionIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTestExecutionIds() { + return testExecutionIds; + } + + + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTestExecutionIds(@javax.annotation.Nullable List testExecutionIds) { + this.testExecutionIds = testExecutionIds; + } + + + public TestExecutionRerun selectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + return this; + } + + /** + * Whether to rerun all test executions in the run test + * @return selectAll + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSelectAll() { + return selectAll; + } + + + @JsonProperty(JSON_PROPERTY_SELECT_ALL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectAll(@javax.annotation.Nullable Boolean selectAll) { + this.selectAll = selectAll; + } + + + /** + * Return true if this TestExecutionRerun object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionRerun testExecutionRerun = (TestExecutionRerun) o; + return Objects.equals(this.rerunType, testExecutionRerun.rerunType) && + Objects.equals(this.testExecutionIds, testExecutionRerun.testExecutionIds) && + Objects.equals(this.selectAll, testExecutionRerun.selectAll); + } + + @Override + public int hashCode() { + return Objects.hash(rerunType, testExecutionIds, selectAll); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionRerun {\n"); + sb.append(" rerunType: ").append(toIndentedString(rerunType)).append("\n"); + sb.append(" testExecutionIds: ").append(toIndentedString(testExecutionIds)).append("\n"); + sb.append(" selectAll: ").append(toIndentedString(selectAll)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rerun_type` to the URL query string + if (getRerunType() != null) { + joiner.add(String.format("%srerun_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRerunType())))); + } + + // add `test_execution_ids` to the URL query string + if (getTestExecutionIds() != null) { + for (int i = 0; i < getTestExecutionIds().size(); i++) { + if (getTestExecutionIds().get(i) != null) { + joiner.add(String.format("%stest_execution_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionIds().get(i))))); + } + } + } + + // add `select_all` to the URL query string + if (getSelectAll() != null) { + joiner.add(String.format("%sselect_all%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSelectAll())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResponse.java new file mode 100644 index 0000000..db42a1a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResponse.java @@ -0,0 +1,326 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TestExecutionRerunResult; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionRerunResponse + */ +@JsonPropertyOrder({ + TestExecutionRerunResponse.JSON_PROPERTY_MESSAGE, + TestExecutionRerunResponse.JSON_PROPERTY_RUN_TEST_ID, + TestExecutionRerunResponse.JSON_PROPERTY_RERUN_TYPE, + TestExecutionRerunResponse.JSON_PROPERTY_TOTAL_TEST_EXECUTIONS, + TestExecutionRerunResponse.JSON_PROPERTY_RESULTS, + TestExecutionRerunResponse.JSON_PROPERTY_OVERALL_SUCCESS_COUNT, + TestExecutionRerunResponse.JSON_PROPERTY_OVERALL_FAILURE_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionRerunResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nullable + private UUID runTestId; + + public static final String JSON_PROPERTY_RERUN_TYPE = "rerun_type"; + @javax.annotation.Nullable + private String rerunType; + + public static final String JSON_PROPERTY_TOTAL_TEST_EXECUTIONS = "total_test_executions"; + @javax.annotation.Nullable + private Integer totalTestExecutions; + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public static final String JSON_PROPERTY_OVERALL_SUCCESS_COUNT = "overall_success_count"; + @javax.annotation.Nullable + private Integer overallSuccessCount; + + public static final String JSON_PROPERTY_OVERALL_FAILURE_COUNT = "overall_failure_count"; + @javax.annotation.Nullable + private Integer overallFailureCount; + + public TestExecutionRerunResponse() { + } + + @JsonCreator + public TestExecutionRerunResponse( + @JsonProperty(JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) UUID runTestId, + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) String rerunType, + @JsonProperty(JSON_PROPERTY_TOTAL_TEST_EXECUTIONS) Integer totalTestExecutions, + @JsonProperty(JSON_PROPERTY_RESULTS) List results, + @JsonProperty(JSON_PROPERTY_OVERALL_SUCCESS_COUNT) Integer overallSuccessCount, + @JsonProperty(JSON_PROPERTY_OVERALL_FAILURE_COUNT) Integer overallFailureCount + ) { + this(); + this.message = message; + this.runTestId = runTestId; + this.rerunType = rerunType; + this.totalTestExecutions = totalTestExecutions; + this.results = results; + this.overallSuccessCount = overallSuccessCount; + this.overallFailureCount = overallFailureCount; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + + + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getRunTestId() { + return runTestId; + } + + + + + /** + * Get rerunType + * @return rerunType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RERUN_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRerunType() { + return rerunType; + } + + + + + /** + * Get totalTestExecutions + * @return totalTestExecutions + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TEST_EXECUTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalTestExecutions() { + return totalTestExecutions; + } + + + + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResults() { + return results; + } + + + + + /** + * Get overallSuccessCount + * @return overallSuccessCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL_SUCCESS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getOverallSuccessCount() { + return overallSuccessCount; + } + + + + + /** + * Get overallFailureCount + * @return overallFailureCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERALL_FAILURE_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getOverallFailureCount() { + return overallFailureCount; + } + + + + + /** + * Return true if this TestExecutionRerunResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionRerunResponse testExecutionRerunResponse = (TestExecutionRerunResponse) o; + return Objects.equals(this.message, testExecutionRerunResponse.message) && + Objects.equals(this.runTestId, testExecutionRerunResponse.runTestId) && + Objects.equals(this.rerunType, testExecutionRerunResponse.rerunType) && + Objects.equals(this.totalTestExecutions, testExecutionRerunResponse.totalTestExecutions) && + Objects.equals(this.results, testExecutionRerunResponse.results) && + Objects.equals(this.overallSuccessCount, testExecutionRerunResponse.overallSuccessCount) && + Objects.equals(this.overallFailureCount, testExecutionRerunResponse.overallFailureCount); + } + + @Override + public int hashCode() { + return Objects.hash(message, runTestId, rerunType, totalTestExecutions, results, overallSuccessCount, overallFailureCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionRerunResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" rerunType: ").append(toIndentedString(rerunType)).append("\n"); + sb.append(" totalTestExecutions: ").append(toIndentedString(totalTestExecutions)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" overallSuccessCount: ").append(toIndentedString(overallSuccessCount)).append("\n"); + sb.append(" overallFailureCount: ").append(toIndentedString(overallFailureCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `rerun_type` to the URL query string + if (getRerunType() != null) { + joiner.add(String.format("%srerun_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRerunType())))); + } + + // add `total_test_executions` to the URL query string + if (getTotalTestExecutions() != null) { + joiner.add(String.format("%stotal_test_executions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTestExecutions())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `overall_success_count` to the URL query string + if (getOverallSuccessCount() != null) { + joiner.add(String.format("%soverall_success_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallSuccessCount())))); + } + + // add `overall_failure_count` to the URL query string + if (getOverallFailureCount() != null) { + joiner.add(String.format("%soverall_failure_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOverallFailureCount())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResult.java new file mode 100644 index 0000000..9ad6737 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionRerunResult.java @@ -0,0 +1,331 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionRerunResult + */ +@JsonPropertyOrder({ + TestExecutionRerunResult.JSON_PROPERTY_TEST_EXECUTION_ID, + TestExecutionRerunResult.JSON_PROPERTY_SUCCESS_COUNT, + TestExecutionRerunResult.JSON_PROPERTY_FAILURE_COUNT, + TestExecutionRerunResult.JSON_PROPERTY_SUCCESSFUL_RERUNS, + TestExecutionRerunResult.JSON_PROPERTY_FAILED_RERUNS, + TestExecutionRerunResult.JSON_PROPERTY_SKIPPED, + TestExecutionRerunResult.JSON_PROPERTY_REASON +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionRerunResult { + public static final String JSON_PROPERTY_TEST_EXECUTION_ID = "test_execution_id"; + @javax.annotation.Nullable + private UUID testExecutionId; + + public static final String JSON_PROPERTY_SUCCESS_COUNT = "success_count"; + @javax.annotation.Nullable + private Integer successCount; + + public static final String JSON_PROPERTY_FAILURE_COUNT = "failure_count"; + @javax.annotation.Nullable + private Integer failureCount; + + public static final String JSON_PROPERTY_SUCCESSFUL_RERUNS = "successful_reruns"; + @javax.annotation.Nullable + private List successfulReruns = new ArrayList<>(); + + public static final String JSON_PROPERTY_FAILED_RERUNS = "failed_reruns"; + @javax.annotation.Nullable + private List> failedReruns = new ArrayList<>(); + + public static final String JSON_PROPERTY_SKIPPED = "skipped"; + @javax.annotation.Nullable + private Boolean skipped; + + public static final String JSON_PROPERTY_REASON = "reason"; + @javax.annotation.Nullable + private String reason; + + public TestExecutionRerunResult() { + } + + @JsonCreator + public TestExecutionRerunResult( + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) UUID testExecutionId, + @JsonProperty(JSON_PROPERTY_SUCCESS_COUNT) Integer successCount, + @JsonProperty(JSON_PROPERTY_FAILURE_COUNT) Integer failureCount, + @JsonProperty(JSON_PROPERTY_SUCCESSFUL_RERUNS) List successfulReruns, + @JsonProperty(JSON_PROPERTY_FAILED_RERUNS) List> failedReruns, + @JsonProperty(JSON_PROPERTY_SKIPPED) Boolean skipped, + @JsonProperty(JSON_PROPERTY_REASON) String reason + ) { + this(); + this.testExecutionId = testExecutionId; + this.successCount = successCount; + this.failureCount = failureCount; + this.successfulReruns = successfulReruns; + this.failedReruns = failedReruns; + this.skipped = skipped; + this.reason = reason; + } + + /** + * Get testExecutionId + * @return testExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTestExecutionId() { + return testExecutionId; + } + + + + + /** + * Get successCount + * @return successCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSuccessCount() { + return successCount; + } + + + + + /** + * Get failureCount + * @return failureCount + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFailureCount() { + return failureCount; + } + + + + + /** + * Get successfulReruns + * @return successfulReruns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESSFUL_RERUNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSuccessfulReruns() { + return successfulReruns; + } + + + + + /** + * Get failedReruns + * @return failedReruns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILED_RERUNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getFailedReruns() { + return failedReruns; + } + + + + + /** + * Get skipped + * @return skipped + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SKIPPED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSkipped() { + return skipped; + } + + + + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + + + + /** + * Return true if this TestExecutionRerunResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionRerunResult testExecutionRerunResult = (TestExecutionRerunResult) o; + return Objects.equals(this.testExecutionId, testExecutionRerunResult.testExecutionId) && + Objects.equals(this.successCount, testExecutionRerunResult.successCount) && + Objects.equals(this.failureCount, testExecutionRerunResult.failureCount) && + Objects.equals(this.successfulReruns, testExecutionRerunResult.successfulReruns) && + Objects.equals(this.failedReruns, testExecutionRerunResult.failedReruns) && + Objects.equals(this.skipped, testExecutionRerunResult.skipped) && + Objects.equals(this.reason, testExecutionRerunResult.reason); + } + + @Override + public int hashCode() { + return Objects.hash(testExecutionId, successCount, failureCount, successfulReruns, failedReruns, skipped, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionRerunResult {\n"); + sb.append(" testExecutionId: ").append(toIndentedString(testExecutionId)).append("\n"); + sb.append(" successCount: ").append(toIndentedString(successCount)).append("\n"); + sb.append(" failureCount: ").append(toIndentedString(failureCount)).append("\n"); + sb.append(" successfulReruns: ").append(toIndentedString(successfulReruns)).append("\n"); + sb.append(" failedReruns: ").append(toIndentedString(failedReruns)).append("\n"); + sb.append(" skipped: ").append(toIndentedString(skipped)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `test_execution_id` to the URL query string + if (getTestExecutionId() != null) { + joiner.add(String.format("%stest_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionId())))); + } + + // add `success_count` to the URL query string + if (getSuccessCount() != null) { + joiner.add(String.format("%ssuccess_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccessCount())))); + } + + // add `failure_count` to the URL query string + if (getFailureCount() != null) { + joiner.add(String.format("%sfailure_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailureCount())))); + } + + // add `successful_reruns` to the URL query string + if (getSuccessfulReruns() != null) { + for (int i = 0; i < getSuccessfulReruns().size(); i++) { + if (getSuccessfulReruns().get(i) != null) { + joiner.add(String.format("%ssuccessful_reruns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getSuccessfulReruns().get(i))))); + } + } + } + + // add `failed_reruns` to the URL query string + if (getFailedReruns() != null) { + for (int i = 0; i < getFailedReruns().size(); i++) { + joiner.add(String.format("%sfailed_reruns%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFailedReruns().get(i))))); + } + } + + // add `skipped` to the URL query string + if (getSkipped() != null) { + joiner.add(String.format("%sskipped%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSkipped())))); + } + + // add `reason` to the URL query string + if (getReason() != null) { + joiner.add(String.format("%sreason%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getReason())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionStatusSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionStatusSummary.java new file mode 100644 index 0000000..7bb8b65 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionStatusSummary.java @@ -0,0 +1,564 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionStatusSummary + */ +@JsonPropertyOrder({ + TestExecutionStatusSummary.JSON_PROPERTY_RUN_TEST_ID, + TestExecutionStatusSummary.JSON_PROPERTY_EXECUTION_ID, + TestExecutionStatusSummary.JSON_PROPERTY_STATUS, + TestExecutionStatusSummary.JSON_PROPERTY_TOTAL_SCENARIOS, + TestExecutionStatusSummary.JSON_PROPERTY_TOTAL_CALLS, + TestExecutionStatusSummary.JSON_PROPERTY_COMPLETED_CALLS, + TestExecutionStatusSummary.JSON_PROPERTY_FAILED_CALLS, + TestExecutionStatusSummary.JSON_PROPERTY_SUCCESS_RATE, + TestExecutionStatusSummary.JSON_PROPERTY_START_TIME, + TestExecutionStatusSummary.JSON_PROPERTY_END_TIME, + TestExecutionStatusSummary.JSON_PROPERTY_SCENARIOS, + TestExecutionStatusSummary.JSON_PROPERTY_ERROR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionStatusSummary { + public static final String JSON_PROPERTY_RUN_TEST_ID = "run_test_id"; + @javax.annotation.Nonnull + private String runTestId; + + public static final String JSON_PROPERTY_EXECUTION_ID = "execution_id"; + @javax.annotation.Nonnull + private String executionId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_TOTAL_SCENARIOS = "total_scenarios"; + @javax.annotation.Nonnull + private Integer totalScenarios; + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nonnull + private Integer totalCalls; + + public static final String JSON_PROPERTY_COMPLETED_CALLS = "completed_calls"; + @javax.annotation.Nonnull + private Integer completedCalls; + + public static final String JSON_PROPERTY_FAILED_CALLS = "failed_calls"; + @javax.annotation.Nonnull + private Integer failedCalls; + + public static final String JSON_PROPERTY_SUCCESS_RATE = "success_rate"; + @javax.annotation.Nonnull + private BigDecimal successRate; + + public static final String JSON_PROPERTY_START_TIME = "start_time"; + @javax.annotation.Nonnull + private OffsetDateTime startTime; + + public static final String JSON_PROPERTY_END_TIME = "end_time"; + @javax.annotation.Nullable + private OffsetDateTime endTime; + + public static final String JSON_PROPERTY_SCENARIOS = "scenarios"; + @javax.annotation.Nonnull + private List> scenarios = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERROR = "error"; + @javax.annotation.Nullable + private String error; + + public TestExecutionStatusSummary() { + } + + public TestExecutionStatusSummary runTestId(@javax.annotation.Nonnull String runTestId) { + this.runTestId = runTestId; + return this; + } + + /** + * Get runTestId + * @return runTestId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunTestId() { + return runTestId; + } + + + @JsonProperty(JSON_PROPERTY_RUN_TEST_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRunTestId(@javax.annotation.Nonnull String runTestId) { + this.runTestId = runTestId; + } + + + public TestExecutionStatusSummary executionId(@javax.annotation.Nonnull String executionId) { + this.executionId = executionId; + return this; + } + + /** + * Get executionId + * @return executionId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExecutionId() { + return executionId; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionId(@javax.annotation.Nonnull String executionId) { + this.executionId = executionId; + } + + + public TestExecutionStatusSummary status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public TestExecutionStatusSummary totalScenarios(@javax.annotation.Nonnull Integer totalScenarios) { + this.totalScenarios = totalScenarios; + return this; + } + + /** + * Get totalScenarios + * @return totalScenarios + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalScenarios() { + return totalScenarios; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalScenarios(@javax.annotation.Nonnull Integer totalScenarios) { + this.totalScenarios = totalScenarios; + } + + + public TestExecutionStatusSummary totalCalls(@javax.annotation.Nonnull Integer totalCalls) { + this.totalCalls = totalCalls; + return this; + } + + /** + * Get totalCalls + * @return totalCalls + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalCalls() { + return totalCalls; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalCalls(@javax.annotation.Nonnull Integer totalCalls) { + this.totalCalls = totalCalls; + } + + + public TestExecutionStatusSummary completedCalls(@javax.annotation.Nonnull Integer completedCalls) { + this.completedCalls = completedCalls; + return this; + } + + /** + * Get completedCalls + * @return completedCalls + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCompletedCalls() { + return completedCalls; + } + + + @JsonProperty(JSON_PROPERTY_COMPLETED_CALLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompletedCalls(@javax.annotation.Nonnull Integer completedCalls) { + this.completedCalls = completedCalls; + } + + + public TestExecutionStatusSummary failedCalls(@javax.annotation.Nonnull Integer failedCalls) { + this.failedCalls = failedCalls; + return this; + } + + /** + * Get failedCalls + * @return failedCalls + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getFailedCalls() { + return failedCalls; + } + + + @JsonProperty(JSON_PROPERTY_FAILED_CALLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailedCalls(@javax.annotation.Nonnull Integer failedCalls) { + this.failedCalls = failedCalls; + } + + + public TestExecutionStatusSummary successRate(@javax.annotation.Nonnull BigDecimal successRate) { + this.successRate = successRate; + return this; + } + + /** + * Get successRate + * @return successRate + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getSuccessRate() { + return successRate; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccessRate(@javax.annotation.Nonnull BigDecimal successRate) { + this.successRate = successRate; + } + + + public TestExecutionStatusSummary startTime(@javax.annotation.Nonnull OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get startTime + * @return startTime + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getStartTime() { + return startTime; + } + + + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStartTime(@javax.annotation.Nonnull OffsetDateTime startTime) { + this.startTime = startTime; + } + + + public TestExecutionStatusSummary endTime(@javax.annotation.Nullable OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get endTime + * @return endTime + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getEndTime() { + return endTime; + } + + + @JsonProperty(JSON_PROPERTY_END_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEndTime(@javax.annotation.Nullable OffsetDateTime endTime) { + this.endTime = endTime; + } + + + public TestExecutionStatusSummary scenarios(@javax.annotation.Nonnull List> scenarios) { + this.scenarios = scenarios; + return this; + } + + public TestExecutionStatusSummary addScenariosItem(Map scenariosItem) { + if (this.scenarios == null) { + this.scenarios = new ArrayList<>(); + } + this.scenarios.add(scenariosItem); + return this; + } + + /** + * Get scenarios + * @return scenarios + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getScenarios() { + return scenarios; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIOS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScenarios(@javax.annotation.Nonnull List> scenarios) { + this.scenarios = scenarios; + } + + + public TestExecutionStatusSummary error(@javax.annotation.Nullable String error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setError(@javax.annotation.Nullable String error) { + this.error = error; + } + + + /** + * Return true if this TestExecutionStatusSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionStatusSummary testExecutionStatusSummary = (TestExecutionStatusSummary) o; + return Objects.equals(this.runTestId, testExecutionStatusSummary.runTestId) && + Objects.equals(this.executionId, testExecutionStatusSummary.executionId) && + Objects.equals(this.status, testExecutionStatusSummary.status) && + Objects.equals(this.totalScenarios, testExecutionStatusSummary.totalScenarios) && + Objects.equals(this.totalCalls, testExecutionStatusSummary.totalCalls) && + Objects.equals(this.completedCalls, testExecutionStatusSummary.completedCalls) && + Objects.equals(this.failedCalls, testExecutionStatusSummary.failedCalls) && + Objects.equals(this.successRate, testExecutionStatusSummary.successRate) && + Objects.equals(this.startTime, testExecutionStatusSummary.startTime) && + Objects.equals(this.endTime, testExecutionStatusSummary.endTime) && + Objects.equals(this.scenarios, testExecutionStatusSummary.scenarios) && + Objects.equals(this.error, testExecutionStatusSummary.error); + } + + @Override + public int hashCode() { + return Objects.hash(runTestId, executionId, status, totalScenarios, totalCalls, completedCalls, failedCalls, successRate, startTime, endTime, scenarios, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionStatusSummary {\n"); + sb.append(" runTestId: ").append(toIndentedString(runTestId)).append("\n"); + sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalScenarios: ").append(toIndentedString(totalScenarios)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" completedCalls: ").append(toIndentedString(completedCalls)).append("\n"); + sb.append(" failedCalls: ").append(toIndentedString(failedCalls)).append("\n"); + sb.append(" successRate: ").append(toIndentedString(successRate)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" scenarios: ").append(toIndentedString(scenarios)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `run_test_id` to the URL query string + if (getRunTestId() != null) { + joiner.add(String.format("%srun_test_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRunTestId())))); + } + + // add `execution_id` to the URL query string + if (getExecutionId() != null) { + joiner.add(String.format("%sexecution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExecutionId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `total_scenarios` to the URL query string + if (getTotalScenarios() != null) { + joiner.add(String.format("%stotal_scenarios%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalScenarios())))); + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `completed_calls` to the URL query string + if (getCompletedCalls() != null) { + joiner.add(String.format("%scompleted_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCompletedCalls())))); + } + + // add `failed_calls` to the URL query string + if (getFailedCalls() != null) { + joiner.add(String.format("%sfailed_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailedCalls())))); + } + + // add `success_rate` to the URL query string + if (getSuccessRate() != null) { + joiner.add(String.format("%ssuccess_rate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccessRate())))); + } + + // add `start_time` to the URL query string + if (getStartTime() != null) { + joiner.add(String.format("%sstart_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartTime())))); + } + + // add `end_time` to the URL query string + if (getEndTime() != null) { + joiner.add(String.format("%send_time%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndTime())))); + } + + // add `scenarios` to the URL query string + if (getScenarios() != null) { + for (int i = 0; i < getScenarios().size(); i++) { + joiner.add(String.format("%sscenarios%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarios().get(i))))); + } + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add(String.format("%serror%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptCall.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptCall.java new file mode 100644 index 0000000..f097a38 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptCall.java @@ -0,0 +1,339 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.CallTranscript; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionTranscriptCall + */ +@JsonPropertyOrder({ + TestExecutionTranscriptCall.JSON_PROPERTY_CALL_EXECUTION_ID, + TestExecutionTranscriptCall.JSON_PROPERTY_PHONE_NUMBER, + TestExecutionTranscriptCall.JSON_PROPERTY_STATUS, + TestExecutionTranscriptCall.JSON_PROPERTY_TRANSCRIPTS, + TestExecutionTranscriptCall.JSON_PROPERTY_TOTAL_TRANSCRIPTS, + TestExecutionTranscriptCall.JSON_PROPERTY_SCENARIO_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionTranscriptCall { + public static final String JSON_PROPERTY_CALL_EXECUTION_ID = "call_execution_id"; + @javax.annotation.Nullable + private UUID callExecutionId; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phone_number"; + private JsonNullable phoneNumber = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_TRANSCRIPTS = "transcripts"; + @javax.annotation.Nullable + private List transcripts = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_TRANSCRIPTS = "total_transcripts"; + @javax.annotation.Nullable + private Integer totalTranscripts; + + public static final String JSON_PROPERTY_SCENARIO_NAME = "scenario_name"; + private JsonNullable scenarioName = JsonNullable.undefined(); + + public TestExecutionTranscriptCall() { + } + + @JsonCreator + public TestExecutionTranscriptCall( + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) UUID callExecutionId, + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) String phoneNumber, + @JsonProperty(JSON_PROPERTY_STATUS) String status, + @JsonProperty(JSON_PROPERTY_TRANSCRIPTS) List transcripts, + @JsonProperty(JSON_PROPERTY_TOTAL_TRANSCRIPTS) Integer totalTranscripts, + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) String scenarioName + ) { + this(); + this.callExecutionId = callExecutionId; + this.phoneNumber = phoneNumber == null ? JsonNullable.undefined() : JsonNullable.of(phoneNumber); + this.status = status; + this.transcripts = transcripts; + this.totalTranscripts = totalTranscripts; + this.scenarioName = scenarioName == null ? JsonNullable.undefined() : JsonNullable.of(scenarioName); + } + + /** + * Get callExecutionId + * @return callExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALL_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCallExecutionId() { + return callExecutionId; + } + + + + + /** + * Get phoneNumber + * @return phoneNumber + */ + @javax.annotation.Nullable + @JsonIgnore + public String getPhoneNumber() { + + if (phoneNumber == null) { + phoneNumber = JsonNullable.undefined(); + } + return phoneNumber.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPhoneNumber_JsonNullable() { + return phoneNumber; + } + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + private void setPhoneNumber_JsonNullable(JsonNullable phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + /** + * Get transcripts + * @return transcripts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSCRIPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTranscripts() { + return transcripts; + } + + + + + /** + * Get totalTranscripts + * @return totalTranscripts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TRANSCRIPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalTranscripts() { + return totalTranscripts; + } + + + + + /** + * Get scenarioName + * @return scenarioName + */ + @javax.annotation.Nullable + @JsonIgnore + public String getScenarioName() { + + if (scenarioName == null) { + scenarioName = JsonNullable.undefined(); + } + return scenarioName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getScenarioName_JsonNullable() { + return scenarioName; + } + + @JsonProperty(JSON_PROPERTY_SCENARIO_NAME) + private void setScenarioName_JsonNullable(JsonNullable scenarioName) { + this.scenarioName = scenarioName; + } + + + + /** + * Return true if this TestExecutionTranscriptCall object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionTranscriptCall testExecutionTranscriptCall = (TestExecutionTranscriptCall) o; + return Objects.equals(this.callExecutionId, testExecutionTranscriptCall.callExecutionId) && + equalsNullable(this.phoneNumber, testExecutionTranscriptCall.phoneNumber) && + Objects.equals(this.status, testExecutionTranscriptCall.status) && + Objects.equals(this.transcripts, testExecutionTranscriptCall.transcripts) && + Objects.equals(this.totalTranscripts, testExecutionTranscriptCall.totalTranscripts) && + equalsNullable(this.scenarioName, testExecutionTranscriptCall.scenarioName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(callExecutionId, hashCodeNullable(phoneNumber), status, transcripts, totalTranscripts, hashCodeNullable(scenarioName)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionTranscriptCall {\n"); + sb.append(" callExecutionId: ").append(toIndentedString(callExecutionId)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" transcripts: ").append(toIndentedString(transcripts)).append("\n"); + sb.append(" totalTranscripts: ").append(toIndentedString(totalTranscripts)).append("\n"); + sb.append(" scenarioName: ").append(toIndentedString(scenarioName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `call_execution_id` to the URL query string + if (getCallExecutionId() != null) { + joiner.add(String.format("%scall_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCallExecutionId())))); + } + + // add `phone_number` to the URL query string + if (getPhoneNumber() != null) { + joiner.add(String.format("%sphone_number%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPhoneNumber())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `transcripts` to the URL query string + if (getTranscripts() != null) { + for (int i = 0; i < getTranscripts().size(); i++) { + if (getTranscripts().get(i) != null) { + joiner.add(getTranscripts().get(i).toUrlQueryString(String.format("%stranscripts%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_transcripts` to the URL query string + if (getTotalTranscripts() != null) { + joiner.add(String.format("%stotal_transcripts%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTranscripts())))); + } + + // add `scenario_name` to the URL query string + if (getScenarioName() != null) { + joiner.add(String.format("%sscenario_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScenarioName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptsResponse.java new file mode 100644 index 0000000..fc7dc47 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TestExecutionTranscriptsResponse.java @@ -0,0 +1,242 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TestExecutionTranscriptCall; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TestExecutionTranscriptsResponse + */ +@JsonPropertyOrder({ + TestExecutionTranscriptsResponse.JSON_PROPERTY_TEST_EXECUTION_ID, + TestExecutionTranscriptsResponse.JSON_PROPERTY_CALLS, + TestExecutionTranscriptsResponse.JSON_PROPERTY_TOTAL_CALLS, + TestExecutionTranscriptsResponse.JSON_PROPERTY_TOTAL_TRANSCRIPTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TestExecutionTranscriptsResponse { + public static final String JSON_PROPERTY_TEST_EXECUTION_ID = "test_execution_id"; + @javax.annotation.Nullable + private UUID testExecutionId; + + public static final String JSON_PROPERTY_CALLS = "calls"; + @javax.annotation.Nullable + private List calls = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_CALLS = "total_calls"; + @javax.annotation.Nullable + private Integer totalCalls; + + public static final String JSON_PROPERTY_TOTAL_TRANSCRIPTS = "total_transcripts"; + @javax.annotation.Nullable + private Integer totalTranscripts; + + public TestExecutionTranscriptsResponse() { + } + + @JsonCreator + public TestExecutionTranscriptsResponse( + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) UUID testExecutionId, + @JsonProperty(JSON_PROPERTY_CALLS) List calls, + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) Integer totalCalls, + @JsonProperty(JSON_PROPERTY_TOTAL_TRANSCRIPTS) Integer totalTranscripts + ) { + this(); + this.testExecutionId = testExecutionId; + this.calls = calls; + this.totalCalls = totalCalls; + this.totalTranscripts = totalTranscripts; + } + + /** + * Get testExecutionId + * @return testExecutionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_EXECUTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTestExecutionId() { + return testExecutionId; + } + + + + + /** + * Get calls + * @return calls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCalls() { + return calls; + } + + + + + /** + * Get totalCalls + * @return totalCalls + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_CALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalCalls() { + return totalCalls; + } + + + + + /** + * Get totalTranscripts + * @return totalTranscripts + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TRANSCRIPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalTranscripts() { + return totalTranscripts; + } + + + + + /** + * Return true if this TestExecutionTranscriptsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestExecutionTranscriptsResponse testExecutionTranscriptsResponse = (TestExecutionTranscriptsResponse) o; + return Objects.equals(this.testExecutionId, testExecutionTranscriptsResponse.testExecutionId) && + Objects.equals(this.calls, testExecutionTranscriptsResponse.calls) && + Objects.equals(this.totalCalls, testExecutionTranscriptsResponse.totalCalls) && + Objects.equals(this.totalTranscripts, testExecutionTranscriptsResponse.totalTranscripts); + } + + @Override + public int hashCode() { + return Objects.hash(testExecutionId, calls, totalCalls, totalTranscripts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestExecutionTranscriptsResponse {\n"); + sb.append(" testExecutionId: ").append(toIndentedString(testExecutionId)).append("\n"); + sb.append(" calls: ").append(toIndentedString(calls)).append("\n"); + sb.append(" totalCalls: ").append(toIndentedString(totalCalls)).append("\n"); + sb.append(" totalTranscripts: ").append(toIndentedString(totalTranscripts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `test_execution_id` to the URL query string + if (getTestExecutionId() != null) { + joiner.add(String.format("%stest_execution_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTestExecutionId())))); + } + + // add `calls` to the URL query string + if (getCalls() != null) { + for (int i = 0; i < getCalls().size(); i++) { + if (getCalls().get(i) != null) { + joiner.add(getCalls().get(i).toUrlQueryString(String.format("%scalls%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_calls` to the URL query string + if (getTotalCalls() != null) { + joiner.add(String.format("%stotal_calls%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCalls())))); + } + + // add `total_transcripts` to the URL query string + if (getTotalTranscripts() != null) { + joiner.add(String.format("%stotal_transcripts%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTranscripts())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/Trace.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/Trace.java new file mode 100644 index 0000000..13a8bd8 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/Trace.java @@ -0,0 +1,601 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * Trace + */ +@JsonPropertyOrder({ + Trace.JSON_PROPERTY_ID, + Trace.JSON_PROPERTY_PROJECT, + Trace.JSON_PROPERTY_PROJECT_VERSION, + Trace.JSON_PROPERTY_NAME, + Trace.JSON_PROPERTY_METADATA, + Trace.JSON_PROPERTY_INPUT, + Trace.JSON_PROPERTY_OUTPUT, + Trace.JSON_PROPERTY_ERROR, + Trace.JSON_PROPERTY_SESSION, + Trace.JSON_PROPERTY_EXTERNAL_ID, + Trace.JSON_PROPERTY_TAGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class Trace { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_PROJECT = "project"; + @javax.annotation.Nonnull + private UUID project; + + public static final String JSON_PROPERTY_PROJECT_VERSION = "project_version"; + @javax.annotation.Nullable + private UUID projectVersion; + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_INPUT = "input"; + @javax.annotation.Nullable + private Map input = new HashMap<>(); + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private Map output = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR = "error"; + @javax.annotation.Nullable + private Map error = new HashMap<>(); + + public static final String JSON_PROPERTY_SESSION = "session"; + @javax.annotation.Nullable + private UUID session; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "external_id"; + private JsonNullable externalId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nullable + private Map tags = new HashMap<>(); + + public Trace() { + } + + @JsonCreator + public Trace( + @JsonProperty(JSON_PROPERTY_ID) UUID id + ) { + this(); + this.id = id; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public Trace project(@javax.annotation.Nonnull UUID project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getProject() { + return project; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProject(@javax.annotation.Nonnull UUID project) { + this.project = project; + } + + + public Trace projectVersion(@javax.annotation.Nullable UUID projectVersion) { + this.projectVersion = projectVersion; + return this; + } + + /** + * Get projectVersion + * @return projectVersion + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getProjectVersion() { + return projectVersion; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProjectVersion(@javax.annotation.Nullable UUID projectVersion) { + this.projectVersion = projectVersion; + } + + + public Trace name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public Trace metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public Trace putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public Trace input(@javax.annotation.Nullable Map input) { + this.input = input; + return this; + } + + public Trace putInputItem(String key, Object inputItem) { + if (this.input == null) { + this.input = new HashMap<>(); + } + this.input.put(key, inputItem); + return this; + } + + /** + * Get input + * @return input + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInput() { + return input; + } + + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setInput(@javax.annotation.Nullable Map input) { + this.input = input; + } + + + public Trace output(@javax.annotation.Nullable Map output) { + this.output = output; + return this; + } + + public Trace putOutputItem(String key, Object outputItem) { + if (this.output == null) { + this.output = new HashMap<>(); + } + this.output.put(key, outputItem); + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setOutput(@javax.annotation.Nullable Map output) { + this.output = output; + } + + + public Trace error(@javax.annotation.Nullable Map error) { + this.error = error; + return this; + } + + public Trace putErrorItem(String key, Object errorItem) { + if (this.error == null) { + this.error = new HashMap<>(); + } + this.error.put(key, errorItem); + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setError(@javax.annotation.Nullable Map error) { + this.error = error; + } + + + public Trace session(@javax.annotation.Nullable UUID session) { + this.session = session; + return this; + } + + /** + * Get session + * @return session + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getSession() { + return session; + } + + + @JsonProperty(JSON_PROPERTY_SESSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSession(@javax.annotation.Nullable UUID session) { + this.session = session; + } + + + public Trace externalId(@javax.annotation.Nullable String externalId) { + this.externalId = JsonNullable.of(externalId); + return this; + } + + /** + * Get externalId + * @return externalId + */ + @javax.annotation.Nullable + @JsonIgnore + public String getExternalId() { + return externalId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalId_JsonNullable() { + return externalId; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + public void setExternalId_JsonNullable(JsonNullable externalId) { + this.externalId = externalId; + } + + public void setExternalId(@javax.annotation.Nullable String externalId) { + this.externalId = JsonNullable.of(externalId); + } + + + public Trace tags(@javax.annotation.Nullable Map tags) { + this.tags = tags; + return this; + } + + public Trace putTagsItem(String key, Object tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@javax.annotation.Nullable Map tags) { + this.tags = tags; + } + + + /** + * Return true if this Trace object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Trace trace = (Trace) o; + return Objects.equals(this.id, trace.id) && + Objects.equals(this.project, trace.project) && + Objects.equals(this.projectVersion, trace.projectVersion) && + equalsNullable(this.name, trace.name) && + Objects.equals(this.metadata, trace.metadata) && + Objects.equals(this.input, trace.input) && + Objects.equals(this.output, trace.output) && + Objects.equals(this.error, trace.error) && + Objects.equals(this.session, trace.session) && + equalsNullable(this.externalId, trace.externalId) && + Objects.equals(this.tags, trace.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, project, projectVersion, hashCodeNullable(name), metadata, input, output, error, session, hashCodeNullable(externalId), tags); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Trace {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" projectVersion: ").append(toIndentedString(projectVersion)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" session: ").append(toIndentedString(session)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `project_version` to the URL query string + if (getProjectVersion() != null) { + joiner.add(String.format("%sproject_version%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectVersion())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + for (String _key : getMetadata().keySet()) { + joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getMetadata().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getMetadata().get(_key))))); + } + } + + // add `input` to the URL query string + if (getInput() != null) { + for (String _key : getInput().keySet()) { + joiner.add(String.format("%sinput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getInput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getInput().get(_key))))); + } + } + + // add `output` to the URL query string + if (getOutput() != null) { + for (String _key : getOutput().keySet()) { + joiner.add(String.format("%soutput%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getOutput().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getOutput().get(_key))))); + } + } + + // add `error` to the URL query string + if (getError() != null) { + for (String _key : getError().keySet()) { + joiner.add(String.format("%serror%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getError().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getError().get(_key))))); + } + } + + // add `session` to the URL query string + if (getSession() != null) { + joiner.add(String.format("%ssession%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSession())))); + } + + // add `external_id` to the URL query string + if (getExternalId() != null) { + joiner.add(String.format("%sexternal_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExternalId())))); + } + + // add `tags` to the URL query string + if (getTags() != null) { + for (String _key : getTags().keySet()) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getTags().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getTags().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationNoteResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationNoteResponse.java new file mode 100644 index 0000000..8e5f48b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationNoteResponse.java @@ -0,0 +1,333 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TraceAnnotationNoteResponse + */ +@JsonPropertyOrder({ + TraceAnnotationNoteResponse.JSON_PROPERTY_ID, + TraceAnnotationNoteResponse.JSON_PROPERTY_NOTES, + TraceAnnotationNoteResponse.JSON_PROPERTY_CREATED_BY_ANNOTATOR, + TraceAnnotationNoteResponse.JSON_PROPERTY_CREATED_BY_USER, + TraceAnnotationNoteResponse.JSON_PROPERTY_CREATED_BY_USER_ID, + TraceAnnotationNoteResponse.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TraceAnnotationNoteResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NOTES = "notes"; + @javax.annotation.Nonnull + private String notes; + + public static final String JSON_PROPERTY_CREATED_BY_ANNOTATOR = "created_by_annotator"; + @javax.annotation.Nonnull + private String createdByAnnotator; + + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + @javax.annotation.Nonnull + private String createdByUser; + + public static final String JSON_PROPERTY_CREATED_BY_USER_ID = "created_by_user_id"; + @javax.annotation.Nonnull + private UUID createdByUserId; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nonnull + private OffsetDateTime updatedAt; + + public TraceAnnotationNoteResponse() { + } + + public TraceAnnotationNoteResponse id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TraceAnnotationNoteResponse notes(@javax.annotation.Nonnull String notes) { + this.notes = notes; + return this; + } + + /** + * Get notes + * @return notes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNotes() { + return notes; + } + + + @JsonProperty(JSON_PROPERTY_NOTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotes(@javax.annotation.Nonnull String notes) { + this.notes = notes; + } + + + public TraceAnnotationNoteResponse createdByAnnotator(@javax.annotation.Nonnull String createdByAnnotator) { + this.createdByAnnotator = createdByAnnotator; + return this; + } + + /** + * Get createdByAnnotator + * @return createdByAnnotator + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_ANNOTATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedByAnnotator() { + return createdByAnnotator; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_ANNOTATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedByAnnotator(@javax.annotation.Nonnull String createdByAnnotator) { + this.createdByAnnotator = createdByAnnotator; + } + + + public TraceAnnotationNoteResponse createdByUser(@javax.annotation.Nonnull String createdByUser) { + this.createdByUser = createdByUser; + return this; + } + + /** + * Get createdByUser + * @return createdByUser + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedByUser() { + return createdByUser; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedByUser(@javax.annotation.Nonnull String createdByUser) { + this.createdByUser = createdByUser; + } + + + public TraceAnnotationNoteResponse createdByUserId(@javax.annotation.Nonnull UUID createdByUserId) { + this.createdByUserId = createdByUserId; + return this; + } + + /** + * Get createdByUserId + * @return createdByUserId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getCreatedByUserId() { + return createdByUserId; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedByUserId(@javax.annotation.Nonnull UUID createdByUserId) { + this.createdByUserId = createdByUserId; + } + + + public TraceAnnotationNoteResponse updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this TraceAnnotationNoteResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TraceAnnotationNoteResponse traceAnnotationNoteResponse = (TraceAnnotationNoteResponse) o; + return Objects.equals(this.id, traceAnnotationNoteResponse.id) && + Objects.equals(this.notes, traceAnnotationNoteResponse.notes) && + Objects.equals(this.createdByAnnotator, traceAnnotationNoteResponse.createdByAnnotator) && + Objects.equals(this.createdByUser, traceAnnotationNoteResponse.createdByUser) && + Objects.equals(this.createdByUserId, traceAnnotationNoteResponse.createdByUserId) && + Objects.equals(this.updatedAt, traceAnnotationNoteResponse.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, notes, createdByAnnotator, createdByUser, createdByUserId, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TraceAnnotationNoteResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" createdByAnnotator: ").append(toIndentedString(createdByAnnotator)).append("\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" createdByUserId: ").append(toIndentedString(createdByUserId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `notes` to the URL query string + if (getNotes() != null) { + joiner.add(String.format("%snotes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotes())))); + } + + // add `created_by_annotator` to the URL query string + if (getCreatedByAnnotator() != null) { + joiner.add(String.format("%screated_by_annotator%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByAnnotator())))); + } + + // add `created_by_user` to the URL query string + if (getCreatedByUser() != null) { + joiner.add(String.format("%screated_by_user%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByUser())))); + } + + // add `created_by_user_id` to the URL query string + if (getCreatedByUserId() != null) { + joiner.add(String.format("%screated_by_user_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedByUserId())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationValueResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationValueResponse.java new file mode 100644 index 0000000..f6f04ef --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceAnnotationValueResponse.java @@ -0,0 +1,546 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TraceAnnotationValueResponse + */ +@JsonPropertyOrder({ + TraceAnnotationValueResponse.JSON_PROPERTY_ID, + TraceAnnotationValueResponse.JSON_PROPERTY_ANNOTATION_LABEL_NAME, + TraceAnnotationValueResponse.JSON_PROPERTY_ANNOTATION_VALUE, + TraceAnnotationValueResponse.JSON_PROPERTY_ANNOTATION_LABEL_ID, + TraceAnnotationValueResponse.JSON_PROPERTY_ANNOTATOR, + TraceAnnotationValueResponse.JSON_PROPERTY_ANNOTATOR_ID, + TraceAnnotationValueResponse.JSON_PROPERTY_UPDATED_BY, + TraceAnnotationValueResponse.JSON_PROPERTY_UPDATED_AT, + TraceAnnotationValueResponse.JSON_PROPERTY_ANNOTATION_TYPE, + TraceAnnotationValueResponse.JSON_PROPERTY_SETTINGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TraceAnnotationValueResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_ANNOTATION_LABEL_NAME = "annotation_label_name"; + @javax.annotation.Nonnull + private String annotationLabelName; + + public static final String JSON_PROPERTY_ANNOTATION_VALUE = "annotation_value"; + @javax.annotation.Nonnull + private Map annotationValue = new HashMap<>(); + + public static final String JSON_PROPERTY_ANNOTATION_LABEL_ID = "annotation_label_id"; + @javax.annotation.Nonnull + private UUID annotationLabelId; + + public static final String JSON_PROPERTY_ANNOTATOR = "annotator"; + private JsonNullable annotator = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANNOTATOR_ID = "annotator_id"; + private JsonNullable annotatorId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + private JsonNullable updatedBy = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private JsonNullable updatedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ANNOTATION_TYPE = "annotation_type"; + @javax.annotation.Nonnull + private String annotationType; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @javax.annotation.Nullable + private Map settings = new HashMap<>(); + + public TraceAnnotationValueResponse() { + } + + public TraceAnnotationValueResponse id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TraceAnnotationValueResponse annotationLabelName(@javax.annotation.Nonnull String annotationLabelName) { + this.annotationLabelName = annotationLabelName; + return this; + } + + /** + * Get annotationLabelName + * @return annotationLabelName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATION_LABEL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAnnotationLabelName() { + return annotationLabelName; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATION_LABEL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotationLabelName(@javax.annotation.Nonnull String annotationLabelName) { + this.annotationLabelName = annotationLabelName; + } + + + public TraceAnnotationValueResponse annotationValue(@javax.annotation.Nonnull Map annotationValue) { + this.annotationValue = annotationValue; + return this; + } + + public TraceAnnotationValueResponse putAnnotationValueItem(String key, Object annotationValueItem) { + if (this.annotationValue == null) { + this.annotationValue = new HashMap<>(); + } + this.annotationValue.put(key, annotationValueItem); + return this; + } + + /** + * Get annotationValue + * @return annotationValue + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATION_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getAnnotationValue() { + return annotationValue; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATION_VALUE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setAnnotationValue(@javax.annotation.Nonnull Map annotationValue) { + this.annotationValue = annotationValue; + } + + + public TraceAnnotationValueResponse annotationLabelId(@javax.annotation.Nonnull UUID annotationLabelId) { + this.annotationLabelId = annotationLabelId; + return this; + } + + /** + * Get annotationLabelId + * @return annotationLabelId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATION_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getAnnotationLabelId() { + return annotationLabelId; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATION_LABEL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotationLabelId(@javax.annotation.Nonnull UUID annotationLabelId) { + this.annotationLabelId = annotationLabelId; + } + + + public TraceAnnotationValueResponse annotator(@javax.annotation.Nullable String annotator) { + this.annotator = JsonNullable.of(annotator); + return this; + } + + /** + * Get annotator + * @return annotator + */ + @javax.annotation.Nullable + @JsonIgnore + public String getAnnotator() { + return annotator.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ANNOTATOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAnnotator_JsonNullable() { + return annotator; + } + + @JsonProperty(JSON_PROPERTY_ANNOTATOR) + public void setAnnotator_JsonNullable(JsonNullable annotator) { + this.annotator = annotator; + } + + public void setAnnotator(@javax.annotation.Nullable String annotator) { + this.annotator = JsonNullable.of(annotator); + } + + + public TraceAnnotationValueResponse annotatorId(@javax.annotation.Nullable UUID annotatorId) { + this.annotatorId = JsonNullable.of(annotatorId); + return this; + } + + /** + * Get annotatorId + * @return annotatorId + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getAnnotatorId() { + return annotatorId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAnnotatorId_JsonNullable() { + return annotatorId; + } + + @JsonProperty(JSON_PROPERTY_ANNOTATOR_ID) + public void setAnnotatorId_JsonNullable(JsonNullable annotatorId) { + this.annotatorId = annotatorId; + } + + public void setAnnotatorId(@javax.annotation.Nullable UUID annotatorId) { + this.annotatorId = JsonNullable.of(annotatorId); + } + + + public TraceAnnotationValueResponse updatedBy(@javax.annotation.Nullable String updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * Get updatedBy + * @return updatedBy + */ + @javax.annotation.Nullable + @JsonIgnore + public String getUpdatedBy() { + return updatedBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUpdatedBy_JsonNullable() { + return updatedBy; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + public void setUpdatedBy_JsonNullable(JsonNullable updatedBy) { + this.updatedBy = updatedBy; + } + + public void setUpdatedBy(@javax.annotation.Nullable String updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + } + + + public TraceAnnotationValueResponse updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getUpdatedAt() { + return updatedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUpdatedAt_JsonNullable() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + public void setUpdatedAt_JsonNullable(JsonNullable updatedAt) { + this.updatedAt = updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + } + + + public TraceAnnotationValueResponse annotationType(@javax.annotation.Nonnull String annotationType) { + this.annotationType = annotationType; + return this; + } + + /** + * Get annotationType + * @return annotationType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ANNOTATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAnnotationType() { + return annotationType; + } + + + @JsonProperty(JSON_PROPERTY_ANNOTATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAnnotationType(@javax.annotation.Nonnull String annotationType) { + this.annotationType = annotationType; + } + + + public TraceAnnotationValueResponse settings(@javax.annotation.Nullable Map settings) { + this.settings = settings; + return this; + } + + public TraceAnnotationValueResponse putSettingsItem(String key, Object settingsItem) { + if (this.settings == null) { + this.settings = new HashMap<>(); + } + this.settings.put(key, settingsItem); + return this; + } + + /** + * Get settings + * @return settings + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getSettings() { + return settings; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setSettings(@javax.annotation.Nullable Map settings) { + this.settings = settings; + } + + + /** + * Return true if this TraceAnnotationValueResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TraceAnnotationValueResponse traceAnnotationValueResponse = (TraceAnnotationValueResponse) o; + return Objects.equals(this.id, traceAnnotationValueResponse.id) && + Objects.equals(this.annotationLabelName, traceAnnotationValueResponse.annotationLabelName) && + Objects.equals(this.annotationValue, traceAnnotationValueResponse.annotationValue) && + Objects.equals(this.annotationLabelId, traceAnnotationValueResponse.annotationLabelId) && + equalsNullable(this.annotator, traceAnnotationValueResponse.annotator) && + equalsNullable(this.annotatorId, traceAnnotationValueResponse.annotatorId) && + equalsNullable(this.updatedBy, traceAnnotationValueResponse.updatedBy) && + equalsNullable(this.updatedAt, traceAnnotationValueResponse.updatedAt) && + Objects.equals(this.annotationType, traceAnnotationValueResponse.annotationType) && + Objects.equals(this.settings, traceAnnotationValueResponse.settings); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, annotationLabelName, annotationValue, annotationLabelId, hashCodeNullable(annotator), hashCodeNullable(annotatorId), hashCodeNullable(updatedBy), hashCodeNullable(updatedAt), annotationType, settings); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TraceAnnotationValueResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" annotationLabelName: ").append(toIndentedString(annotationLabelName)).append("\n"); + sb.append(" annotationValue: ").append(toIndentedString(annotationValue)).append("\n"); + sb.append(" annotationLabelId: ").append(toIndentedString(annotationLabelId)).append("\n"); + sb.append(" annotator: ").append(toIndentedString(annotator)).append("\n"); + sb.append(" annotatorId: ").append(toIndentedString(annotatorId)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" annotationType: ").append(toIndentedString(annotationType)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `annotation_label_name` to the URL query string + if (getAnnotationLabelName() != null) { + joiner.add(String.format("%sannotation_label_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationLabelName())))); + } + + // add `annotation_value` to the URL query string + if (getAnnotationValue() != null) { + for (String _key : getAnnotationValue().keySet()) { + joiner.add(String.format("%sannotation_value%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getAnnotationValue().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAnnotationValue().get(_key))))); + } + } + + // add `annotation_label_id` to the URL query string + if (getAnnotationLabelId() != null) { + joiner.add(String.format("%sannotation_label_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationLabelId())))); + } + + // add `annotator` to the URL query string + if (getAnnotator() != null) { + joiner.add(String.format("%sannotator%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotator())))); + } + + // add `annotator_id` to the URL query string + if (getAnnotatorId() != null) { + joiner.add(String.format("%sannotator_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotatorId())))); + } + + // add `updated_by` to the URL query string + if (getUpdatedBy() != null) { + joiner.add(String.format("%supdated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedBy())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `annotation_type` to the URL query string + if (getAnnotationType() != null) { + joiner.add(String.format("%sannotation_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAnnotationType())))); + } + + // add `settings` to the URL query string + if (getSettings() != null) { + for (String _key : getSettings().keySet()) { + joiner.add(String.format("%ssettings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getSettings().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getSettings().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceEvidence.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceEvidence.java new file mode 100644 index 0000000..280e0da --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceEvidence.java @@ -0,0 +1,286 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TraceEvidence + */ +@JsonPropertyOrder({ + TraceEvidence.JSON_PROPERTY_INPUT, + TraceEvidence.JSON_PROPERTY_OUTPUT, + TraceEvidence.JSON_PROPERTY_FAIL_REEL, + TraceEvidence.JSON_PROPERTY_PASS_REEL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TraceEvidence { + public static final String JSON_PROPERTY_INPUT = "input"; + @javax.annotation.Nullable + private String input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private String output; + + public static final String JSON_PROPERTY_FAIL_REEL = "fail_reel"; + @javax.annotation.Nonnull + private List> failReel = new ArrayList<>(); + + public static final String JSON_PROPERTY_PASS_REEL = "pass_reel"; + @javax.annotation.Nonnull + private List> passReel = new ArrayList<>(); + + public TraceEvidence() { + } + + public TraceEvidence input(@javax.annotation.Nullable String input) { + this.input = input; + return this; + } + + /** + * Get input + * @return input + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(@javax.annotation.Nullable String input) { + this.input = input; + } + + + public TraceEvidence output(@javax.annotation.Nullable String output) { + this.output = output; + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutput(@javax.annotation.Nullable String output) { + this.output = output; + } + + + public TraceEvidence failReel(@javax.annotation.Nonnull List> failReel) { + this.failReel = failReel; + return this; + } + + public TraceEvidence addFailReelItem(Map failReelItem) { + if (this.failReel == null) { + this.failReel = new ArrayList<>(); + } + this.failReel.add(failReelItem); + return this; + } + + /** + * Get failReel + * @return failReel + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAIL_REEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getFailReel() { + return failReel; + } + + + @JsonProperty(JSON_PROPERTY_FAIL_REEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailReel(@javax.annotation.Nonnull List> failReel) { + this.failReel = failReel; + } + + + public TraceEvidence passReel(@javax.annotation.Nonnull List> passReel) { + this.passReel = passReel; + return this; + } + + public TraceEvidence addPassReelItem(Map passReelItem) { + if (this.passReel == null) { + this.passReel = new ArrayList<>(); + } + this.passReel.add(passReelItem); + return this; + } + + /** + * Get passReel + * @return passReel + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PASS_REEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getPassReel() { + return passReel; + } + + + @JsonProperty(JSON_PROPERTY_PASS_REEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassReel(@javax.annotation.Nonnull List> passReel) { + this.passReel = passReel; + } + + + /** + * Return true if this TraceEvidence object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TraceEvidence traceEvidence = (TraceEvidence) o; + return Objects.equals(this.input, traceEvidence.input) && + Objects.equals(this.output, traceEvidence.output) && + Objects.equals(this.failReel, traceEvidence.failReel) && + Objects.equals(this.passReel, traceEvidence.passReel); + } + + @Override + public int hashCode() { + return Objects.hash(input, output, failReel, passReel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TraceEvidence {\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" failReel: ").append(toIndentedString(failReel)).append("\n"); + sb.append(" passReel: ").append(toIndentedString(passReel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `input` to the URL query string + if (getInput() != null) { + joiner.add(String.format("%sinput%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInput())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(String.format("%soutput%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutput())))); + } + + // add `fail_reel` to the URL query string + if (getFailReel() != null) { + for (int i = 0; i < getFailReel().size(); i++) { + joiner.add(String.format("%sfail_reel%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getFailReel().get(i))))); + } + } + + // add `pass_reel` to the URL query string + if (getPassReel() != null) { + for (int i = 0; i < getPassReel().size(); i++) { + joiner.add(String.format("%spass_reel%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getPassReel().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracePreview.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracePreview.java new file mode 100644 index 0000000..81f1b1e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracePreview.java @@ -0,0 +1,223 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracePreview + */ +@JsonPropertyOrder({ + TracePreview.JSON_PROPERTY_TRACE_ID, + TracePreview.JSON_PROPERTY_INPUT, + TracePreview.JSON_PROPERTY_OUTPUT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracePreview { + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + @javax.annotation.Nonnull + private String traceId; + + public static final String JSON_PROPERTY_INPUT = "input"; + @javax.annotation.Nullable + private String input; + + public static final String JSON_PROPERTY_OUTPUT = "output"; + @javax.annotation.Nullable + private String output; + + public TracePreview() { + } + + public TracePreview traceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + return this; + } + + /** + * Get traceId + * @return traceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTraceId() { + return traceId; + } + + + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraceId(@javax.annotation.Nonnull String traceId) { + this.traceId = traceId; + } + + + public TracePreview input(@javax.annotation.Nullable String input) { + this.input = input; + return this; + } + + /** + * Get input + * @return input + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(@javax.annotation.Nullable String input) { + this.input = input; + } + + + public TracePreview output(@javax.annotation.Nullable String output) { + this.output = output; + return this; + } + + /** + * Get output + * @return output + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutput() { + return output; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutput(@javax.annotation.Nullable String output) { + this.output = output; + } + + + /** + * Return true if this TracePreview object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracePreview tracePreview = (TracePreview) o; + return Objects.equals(this.traceId, tracePreview.traceId) && + Objects.equals(this.input, tracePreview.input) && + Objects.equals(this.output, tracePreview.output); + } + + @Override + public int hashCode() { + return Objects.hash(traceId, input, output); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracePreview {\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `trace_id` to the URL query string + if (getTraceId() != null) { + joiner.add(String.format("%strace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTraceId())))); + } + + // add `input` to the URL query string + if (getInput() != null) { + joiner.add(String.format("%sinput%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInput())))); + } + + // add `output` to the URL query string + if (getOutput() != null) { + joiner.add(String.format("%soutput%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutput())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSession.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSession.java new file mode 100644 index 0000000..ff6f922 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSession.java @@ -0,0 +1,309 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TraceSession + */ +@JsonPropertyOrder({ + TraceSession.JSON_PROPERTY_ID, + TraceSession.JSON_PROPERTY_PROJECT, + TraceSession.JSON_PROPERTY_BOOKMARKED, + TraceSession.JSON_PROPERTY_NAME, + TraceSession.JSON_PROPERTY_CREATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TraceSession { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_PROJECT = "project"; + @javax.annotation.Nonnull + private UUID project; + + public static final String JSON_PROPERTY_BOOKMARKED = "bookmarked"; + @javax.annotation.Nullable + private Boolean bookmarked; + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public TraceSession() { + } + + @JsonCreator + public TraceSession( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public TraceSession project(@javax.annotation.Nonnull UUID project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getProject() { + return project; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProject(@javax.annotation.Nonnull UUID project) { + this.project = project; + } + + + public TraceSession bookmarked(@javax.annotation.Nullable Boolean bookmarked) { + this.bookmarked = bookmarked; + return this; + } + + /** + * Get bookmarked + * @return bookmarked + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BOOKMARKED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getBookmarked() { + return bookmarked; + } + + + @JsonProperty(JSON_PROPERTY_BOOKMARKED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBookmarked(@javax.annotation.Nullable Boolean bookmarked) { + this.bookmarked = bookmarked; + } + + + public TraceSession name(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Return true if this TraceSession object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TraceSession traceSession = (TraceSession) o; + return Objects.equals(this.id, traceSession.id) && + Objects.equals(this.project, traceSession.project) && + Objects.equals(this.bookmarked, traceSession.bookmarked) && + equalsNullable(this.name, traceSession.name) && + Objects.equals(this.createdAt, traceSession.createdAt); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, project, bookmarked, hashCodeNullable(name), createdAt); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TraceSession {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" bookmarked: ").append(toIndentedString(bookmarked)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `bookmarked` to the URL query string + if (getBookmarked() != null) { + joiner.add(String.format("%sbookmarked%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBookmarked())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSessionGraphDataRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSessionGraphDataRequest.java new file mode 100644 index 0000000..1106e63 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSessionGraphDataRequest.java @@ -0,0 +1,352 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.AutomationRuleConditionsFilterInner; +import com.futureagi.sdk.model.ReqDataConfig; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TraceSessionGraphDataRequest + */ +@JsonPropertyOrder({ + TraceSessionGraphDataRequest.JSON_PROPERTY_PROJECT_ID, + TraceSessionGraphDataRequest.JSON_PROPERTY_FILTERS, + TraceSessionGraphDataRequest.JSON_PROPERTY_INTERVAL, + TraceSessionGraphDataRequest.JSON_PROPERTY_PROPERTY, + TraceSessionGraphDataRequest.JSON_PROPERTY_REQ_DATA_CONFIG +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TraceSessionGraphDataRequest { + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + @javax.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private List filters = new ArrayList<>(); + + /** + * Gets or Sets interval + */ + public enum IntervalEnum { + HOUR(String.valueOf("hour")), + + DAY(String.valueOf("day")), + + WEEK(String.valueOf("week")), + + MONTH(String.valueOf("month")); + + private String value; + + IntervalEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IntervalEnum fromValue(String value) { + for (IntervalEnum b : IntervalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INTERVAL = "interval"; + @javax.annotation.Nullable + private IntervalEnum interval = IntervalEnum.DAY; + + public static final String JSON_PROPERTY_PROPERTY = "property"; + @javax.annotation.Nullable + private String property = "average"; + + public static final String JSON_PROPERTY_REQ_DATA_CONFIG = "req_data_config"; + @javax.annotation.Nonnull + private ReqDataConfig reqDataConfig; + + public TraceSessionGraphDataRequest() { + } + + public TraceSessionGraphDataRequest projectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public TraceSessionGraphDataRequest filters(@javax.annotation.Nullable List filters) { + this.filters = filters; + return this; + } + + public TraceSessionGraphDataRequest addFiltersItem(AutomationRuleConditionsFilterInner filtersItem) { + if (this.filters == null) { + this.filters = new ArrayList<>(); + } + this.filters.add(filtersItem); + return this; + } + + /** + * Get filters + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFilters() { + return filters; + } + + + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilters(@javax.annotation.Nullable List filters) { + this.filters = filters; + } + + + public TraceSessionGraphDataRequest interval(@javax.annotation.Nullable IntervalEnum interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * @return interval + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntervalEnum getInterval() { + return interval; + } + + + @JsonProperty(JSON_PROPERTY_INTERVAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInterval(@javax.annotation.Nullable IntervalEnum interval) { + this.interval = interval; + } + + + public TraceSessionGraphDataRequest property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProperty() { + return property; + } + + + @JsonProperty(JSON_PROPERTY_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public TraceSessionGraphDataRequest reqDataConfig(@javax.annotation.Nonnull ReqDataConfig reqDataConfig) { + this.reqDataConfig = reqDataConfig; + return this; + } + + /** + * Get reqDataConfig + * @return reqDataConfig + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQ_DATA_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReqDataConfig getReqDataConfig() { + return reqDataConfig; + } + + + @JsonProperty(JSON_PROPERTY_REQ_DATA_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReqDataConfig(@javax.annotation.Nonnull ReqDataConfig reqDataConfig) { + this.reqDataConfig = reqDataConfig; + } + + + /** + * Return true if this TraceSessionGraphDataRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TraceSessionGraphDataRequest traceSessionGraphDataRequest = (TraceSessionGraphDataRequest) o; + return Objects.equals(this.projectId, traceSessionGraphDataRequest.projectId) && + Objects.equals(this.filters, traceSessionGraphDataRequest.filters) && + Objects.equals(this.interval, traceSessionGraphDataRequest.interval) && + Objects.equals(this.property, traceSessionGraphDataRequest.property) && + Objects.equals(this.reqDataConfig, traceSessionGraphDataRequest.reqDataConfig); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, filters, interval, property, reqDataConfig); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TraceSessionGraphDataRequest {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" reqDataConfig: ").append(toIndentedString(reqDataConfig)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `project_id` to the URL query string + if (getProjectId() != null) { + joiner.add(String.format("%sproject_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProjectId())))); + } + + // add `filters` to the URL query string + if (getFilters() != null) { + for (int i = 0; i < getFilters().size(); i++) { + if (getFilters().get(i) != null) { + joiner.add(getFilters().get(i).toUrlQueryString(String.format("%sfilters%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `interval` to the URL query string + if (getInterval() != null) { + joiner.add(String.format("%sinterval%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInterval())))); + } + + // add `property` to the URL query string + if (getProperty() != null) { + joiner.add(String.format("%sproperty%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProperty())))); + } + + // add `req_data_config` to the URL query string + if (getReqDataConfig() != null) { + joiner.add(getReqDataConfig().toUrlQueryString(prefix + "req_data_config" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSummary.java new file mode 100644 index 0000000..f177c07 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceSummary.java @@ -0,0 +1,332 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TraceSummary + */ +@JsonPropertyOrder({ + TraceSummary.JSON_PROPERTY_EVAL_SCORE, + TraceSummary.JSON_PROPERTY_LATENCY_MS, + TraceSummary.JSON_PROPERTY_TURNS, + TraceSummary.JSON_PROPERTY_MODEL, + TraceSummary.JSON_PROPERTY_INPUT_TOKENS, + TraceSummary.JSON_PROPERTY_OUTPUT_TOKENS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TraceSummary { + public static final String JSON_PROPERTY_EVAL_SCORE = "eval_score"; + @javax.annotation.Nullable + private BigDecimal evalScore; + + public static final String JSON_PROPERTY_LATENCY_MS = "latency_ms"; + @javax.annotation.Nullable + private Integer latencyMs; + + public static final String JSON_PROPERTY_TURNS = "turns"; + @javax.annotation.Nullable + private Integer turns; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_INPUT_TOKENS = "input_tokens"; + @javax.annotation.Nullable + private Integer inputTokens; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS = "output_tokens"; + @javax.annotation.Nullable + private Integer outputTokens; + + public TraceSummary() { + } + + public TraceSummary evalScore(@javax.annotation.Nullable BigDecimal evalScore) { + this.evalScore = evalScore; + return this; + } + + /** + * Get evalScore + * @return evalScore + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getEvalScore() { + return evalScore; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvalScore(@javax.annotation.Nullable BigDecimal evalScore) { + this.evalScore = evalScore; + } + + + public TraceSummary latencyMs(@javax.annotation.Nullable Integer latencyMs) { + this.latencyMs = latencyMs; + return this; + } + + /** + * Get latencyMs + * @return latencyMs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getLatencyMs() { + return latencyMs; + } + + + @JsonProperty(JSON_PROPERTY_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLatencyMs(@javax.annotation.Nullable Integer latencyMs) { + this.latencyMs = latencyMs; + } + + + public TraceSummary turns(@javax.annotation.Nullable Integer turns) { + this.turns = turns; + return this; + } + + /** + * Get turns + * @return turns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TURNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTurns() { + return turns; + } + + + @JsonProperty(JSON_PROPERTY_TURNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTurns(@javax.annotation.Nullable Integer turns) { + this.turns = turns; + } + + + public TraceSummary model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public TraceSummary inputTokens(@javax.annotation.Nullable Integer inputTokens) { + this.inputTokens = inputTokens; + return this; + } + + /** + * Get inputTokens + * @return inputTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getInputTokens() { + return inputTokens; + } + + + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputTokens(@javax.annotation.Nullable Integer inputTokens) { + this.inputTokens = inputTokens; + } + + + public TraceSummary outputTokens(@javax.annotation.Nullable Integer outputTokens) { + this.outputTokens = outputTokens; + return this; + } + + /** + * Get outputTokens + * @return outputTokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getOutputTokens() { + return outputTokens; + } + + + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutputTokens(@javax.annotation.Nullable Integer outputTokens) { + this.outputTokens = outputTokens; + } + + + /** + * Return true if this TraceSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TraceSummary traceSummary = (TraceSummary) o; + return Objects.equals(this.evalScore, traceSummary.evalScore) && + Objects.equals(this.latencyMs, traceSummary.latencyMs) && + Objects.equals(this.turns, traceSummary.turns) && + Objects.equals(this.model, traceSummary.model) && + Objects.equals(this.inputTokens, traceSummary.inputTokens) && + Objects.equals(this.outputTokens, traceSummary.outputTokens); + } + + @Override + public int hashCode() { + return Objects.hash(evalScore, latencyMs, turns, model, inputTokens, outputTokens); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TraceSummary {\n"); + sb.append(" evalScore: ").append(toIndentedString(evalScore)).append("\n"); + sb.append(" latencyMs: ").append(toIndentedString(latencyMs)).append("\n"); + sb.append(" turns: ").append(toIndentedString(turns)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" inputTokens: ").append(toIndentedString(inputTokens)).append("\n"); + sb.append(" outputTokens: ").append(toIndentedString(outputTokens)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `eval_score` to the URL query string + if (getEvalScore() != null) { + joiner.add(String.format("%seval_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalScore())))); + } + + // add `latency_ms` to the URL query string + if (getLatencyMs() != null) { + joiner.add(String.format("%slatency_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLatencyMs())))); + } + + // add `turns` to the URL query string + if (getTurns() != null) { + joiner.add(String.format("%sturns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTurns())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `input_tokens` to the URL query string + if (getInputTokens() != null) { + joiner.add(String.format("%sinput_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInputTokens())))); + } + + // add `output_tokens` to the URL query string + if (getOutputTokens() != null) { + joiner.add(String.format("%soutput_tokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputTokens())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceTagsUpdate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceTagsUpdate.java new file mode 100644 index 0000000..ed4ec19 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TraceTagsUpdate.java @@ -0,0 +1,165 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TraceTagsUpdate + */ +@JsonPropertyOrder({ + TraceTagsUpdate.JSON_PROPERTY_TAGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TraceTagsUpdate { + public static final String JSON_PROPERTY_TAGS = "tags"; + @javax.annotation.Nonnull + private List tags = new ArrayList<>(); + + public TraceTagsUpdate() { + } + + public TraceTagsUpdate tags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public TraceTagsUpdate addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + /** + * Return true if this TraceTagsUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TraceTagsUpdate traceTagsUpdate = (TraceTagsUpdate) o; + return Objects.equals(this.tags, traceTagsUpdate.tags); + } + + @Override + public int hashCode() { + return Objects.hash(tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TraceTagsUpdate {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + joiner.add(String.format("%stags%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTags().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceAnnotationList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceAnnotationList200Response.java new file mode 100644 index 0000000..f6cce6e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceAnnotationList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.GetTraceAnnotation; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracerTraceAnnotationList200Response + */ +@JsonPropertyOrder({ + TracerTraceAnnotationList200Response.JSON_PROPERTY_COUNT, + TracerTraceAnnotationList200Response.JSON_PROPERTY_NEXT, + TracerTraceAnnotationList200Response.JSON_PROPERTY_PREVIOUS, + TracerTraceAnnotationList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracerTraceAnnotationList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public TracerTraceAnnotationList200Response() { + } + + public TracerTraceAnnotationList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public TracerTraceAnnotationList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public TracerTraceAnnotationList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public TracerTraceAnnotationList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public TracerTraceAnnotationList200Response addResultsItem(GetTraceAnnotation resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this tracer_trace_annotation_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracerTraceAnnotationList200Response tracerTraceAnnotationList200Response = (TracerTraceAnnotationList200Response) o; + return Objects.equals(this.count, tracerTraceAnnotationList200Response.count) && + equalsNullable(this.next, tracerTraceAnnotationList200Response.next) && + equalsNullable(this.previous, tracerTraceAnnotationList200Response.previous) && + Objects.equals(this.results, tracerTraceAnnotationList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracerTraceAnnotationList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceList200Response.java new file mode 100644 index 0000000..b52b154 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Trace; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracerTraceList200Response + */ +@JsonPropertyOrder({ + TracerTraceList200Response.JSON_PROPERTY_COUNT, + TracerTraceList200Response.JSON_PROPERTY_NEXT, + TracerTraceList200Response.JSON_PROPERTY_PREVIOUS, + TracerTraceList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracerTraceList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public TracerTraceList200Response() { + } + + public TracerTraceList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public TracerTraceList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public TracerTraceList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public TracerTraceList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public TracerTraceList200Response addResultsItem(Trace resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this tracer_trace_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracerTraceList200Response tracerTraceList200Response = (TracerTraceList200Response) o; + return Objects.equals(this.count, tracerTraceList200Response.count) && + equalsNullable(this.next, tracerTraceList200Response.next) && + equalsNullable(this.previous, tracerTraceList200Response.previous) && + Objects.equals(this.results, tracerTraceList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracerTraceList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceSessionList200Response.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceSessionList200Response.java new file mode 100644 index 0000000..3746100 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracerTraceSessionList200Response.java @@ -0,0 +1,305 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TraceSession; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracerTraceSessionList200Response + */ +@JsonPropertyOrder({ + TracerTraceSessionList200Response.JSON_PROPERTY_COUNT, + TracerTraceSessionList200Response.JSON_PROPERTY_NEXT, + TracerTraceSessionList200Response.JSON_PROPERTY_PREVIOUS, + TracerTraceSessionList200Response.JSON_PROPERTY_RESULTS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracerTraceSessionList200Response { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + private JsonNullable previous = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public TracerTraceSessionList200Response() { + } + + public TracerTraceSessionList200Response count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public TracerTraceSessionList200Response next(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(@javax.annotation.Nullable URI next) { + this.next = JsonNullable.of(next); + } + + + public TracerTraceSessionList200Response previous(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getPrevious() { + return previous.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPrevious_JsonNullable() { + return previous; + } + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + public void setPrevious_JsonNullable(JsonNullable previous) { + this.previous = previous; + } + + public void setPrevious(@javax.annotation.Nullable URI previous) { + this.previous = JsonNullable.of(previous); + } + + + public TracerTraceSessionList200Response results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public TracerTraceSessionList200Response addResultsItem(TraceSession resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + /** + * Return true if this tracer_trace_session_list_200_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracerTraceSessionList200Response tracerTraceSessionList200Response = (TracerTraceSessionList200Response) o; + return Objects.equals(this.count, tracerTraceSessionList200Response.count) && + equalsNullable(this.next, tracerTraceSessionList200Response.next) && + equalsNullable(this.previous, tracerTraceSessionList200Response.previous) && + Objects.equals(this.results, tracerTraceSessionList200Response.results); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, hashCodeNullable(next), hashCodeNullable(previous), results); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracerTraceSessionList200Response {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesAggregates.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesAggregates.java new file mode 100644 index 0000000..68afe5e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesAggregates.java @@ -0,0 +1,368 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracesAggregates + */ +@JsonPropertyOrder({ + TracesAggregates.JSON_PROPERTY_TOTAL_TRACES, + TracesAggregates.JSON_PROPERTY_FAILING_TRACES, + TracesAggregates.JSON_PROPERTY_PASSING_TRACES, + TracesAggregates.JSON_PROPERTY_AVG_SCORE, + TracesAggregates.JSON_PROPERTY_P50_LATENCY, + TracesAggregates.JSON_PROPERTY_P95_LATENCY, + TracesAggregates.JSON_PROPERTY_AVG_TURNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracesAggregates { + public static final String JSON_PROPERTY_TOTAL_TRACES = "total_traces"; + @javax.annotation.Nonnull + private Integer totalTraces; + + public static final String JSON_PROPERTY_FAILING_TRACES = "failing_traces"; + @javax.annotation.Nonnull + private Integer failingTraces; + + public static final String JSON_PROPERTY_PASSING_TRACES = "passing_traces"; + @javax.annotation.Nonnull + private Integer passingTraces; + + public static final String JSON_PROPERTY_AVG_SCORE = "avg_score"; + @javax.annotation.Nonnull + private BigDecimal avgScore; + + public static final String JSON_PROPERTY_P50_LATENCY = "p50_latency"; + @javax.annotation.Nonnull + private Integer p50Latency; + + public static final String JSON_PROPERTY_P95_LATENCY = "p95_latency"; + @javax.annotation.Nonnull + private Integer p95Latency; + + public static final String JSON_PROPERTY_AVG_TURNS = "avg_turns"; + @javax.annotation.Nonnull + private BigDecimal avgTurns; + + public TracesAggregates() { + } + + public TracesAggregates totalTraces(@javax.annotation.Nonnull Integer totalTraces) { + this.totalTraces = totalTraces; + return this; + } + + /** + * Get totalTraces + * @return totalTraces + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalTraces() { + return totalTraces; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalTraces(@javax.annotation.Nonnull Integer totalTraces) { + this.totalTraces = totalTraces; + } + + + public TracesAggregates failingTraces(@javax.annotation.Nonnull Integer failingTraces) { + this.failingTraces = failingTraces; + return this; + } + + /** + * Get failingTraces + * @return failingTraces + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILING_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getFailingTraces() { + return failingTraces; + } + + + @JsonProperty(JSON_PROPERTY_FAILING_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailingTraces(@javax.annotation.Nonnull Integer failingTraces) { + this.failingTraces = failingTraces; + } + + + public TracesAggregates passingTraces(@javax.annotation.Nonnull Integer passingTraces) { + this.passingTraces = passingTraces; + return this; + } + + /** + * Get passingTraces + * @return passingTraces + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PASSING_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPassingTraces() { + return passingTraces; + } + + + @JsonProperty(JSON_PROPERTY_PASSING_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassingTraces(@javax.annotation.Nonnull Integer passingTraces) { + this.passingTraces = passingTraces; + } + + + public TracesAggregates avgScore(@javax.annotation.Nonnull BigDecimal avgScore) { + this.avgScore = avgScore; + return this; + } + + /** + * Get avgScore + * @return avgScore + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgScore() { + return avgScore; + } + + + @JsonProperty(JSON_PROPERTY_AVG_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgScore(@javax.annotation.Nonnull BigDecimal avgScore) { + this.avgScore = avgScore; + } + + + public TracesAggregates p50Latency(@javax.annotation.Nonnull Integer p50Latency) { + this.p50Latency = p50Latency; + return this; + } + + /** + * Get p50Latency + * @return p50Latency + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_P50_LATENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getP50Latency() { + return p50Latency; + } + + + @JsonProperty(JSON_PROPERTY_P50_LATENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setP50Latency(@javax.annotation.Nonnull Integer p50Latency) { + this.p50Latency = p50Latency; + } + + + public TracesAggregates p95Latency(@javax.annotation.Nonnull Integer p95Latency) { + this.p95Latency = p95Latency; + return this; + } + + /** + * Get p95Latency + * @return p95Latency + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_P95_LATENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getP95Latency() { + return p95Latency; + } + + + @JsonProperty(JSON_PROPERTY_P95_LATENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setP95Latency(@javax.annotation.Nonnull Integer p95Latency) { + this.p95Latency = p95Latency; + } + + + public TracesAggregates avgTurns(@javax.annotation.Nonnull BigDecimal avgTurns) { + this.avgTurns = avgTurns; + return this; + } + + /** + * Get avgTurns + * @return avgTurns + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVG_TURNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAvgTurns() { + return avgTurns; + } + + + @JsonProperty(JSON_PROPERTY_AVG_TURNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvgTurns(@javax.annotation.Nonnull BigDecimal avgTurns) { + this.avgTurns = avgTurns; + } + + + /** + * Return true if this TracesAggregates object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracesAggregates tracesAggregates = (TracesAggregates) o; + return Objects.equals(this.totalTraces, tracesAggregates.totalTraces) && + Objects.equals(this.failingTraces, tracesAggregates.failingTraces) && + Objects.equals(this.passingTraces, tracesAggregates.passingTraces) && + Objects.equals(this.avgScore, tracesAggregates.avgScore) && + Objects.equals(this.p50Latency, tracesAggregates.p50Latency) && + Objects.equals(this.p95Latency, tracesAggregates.p95Latency) && + Objects.equals(this.avgTurns, tracesAggregates.avgTurns); + } + + @Override + public int hashCode() { + return Objects.hash(totalTraces, failingTraces, passingTraces, avgScore, p50Latency, p95Latency, avgTurns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracesAggregates {\n"); + sb.append(" totalTraces: ").append(toIndentedString(totalTraces)).append("\n"); + sb.append(" failingTraces: ").append(toIndentedString(failingTraces)).append("\n"); + sb.append(" passingTraces: ").append(toIndentedString(passingTraces)).append("\n"); + sb.append(" avgScore: ").append(toIndentedString(avgScore)).append("\n"); + sb.append(" p50Latency: ").append(toIndentedString(p50Latency)).append("\n"); + sb.append(" p95Latency: ").append(toIndentedString(p95Latency)).append("\n"); + sb.append(" avgTurns: ").append(toIndentedString(avgTurns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total_traces` to the URL query string + if (getTotalTraces() != null) { + joiner.add(String.format("%stotal_traces%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalTraces())))); + } + + // add `failing_traces` to the URL query string + if (getFailingTraces() != null) { + joiner.add(String.format("%sfailing_traces%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFailingTraces())))); + } + + // add `passing_traces` to the URL query string + if (getPassingTraces() != null) { + joiner.add(String.format("%spassing_traces%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPassingTraces())))); + } + + // add `avg_score` to the URL query string + if (getAvgScore() != null) { + joiner.add(String.format("%savg_score%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgScore())))); + } + + // add `p50_latency` to the URL query string + if (getP50Latency() != null) { + joiner.add(String.format("%sp50_latency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getP50Latency())))); + } + + // add `p95_latency` to the URL query string + if (getP95Latency() != null) { + joiner.add(String.format("%sp95_latency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getP95Latency())))); + } + + // add `avg_turns` to the URL query string + if (getAvgTurns() != null) { + joiner.add(String.format("%savg_turns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAvgTurns())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesListRow.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesListRow.java new file mode 100644 index 0000000..a88ae00 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesListRow.java @@ -0,0 +1,405 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracesListRow + */ +@JsonPropertyOrder({ + TracesListRow.JSON_PROPERTY_ID, + TracesListRow.JSON_PROPERTY_INPUT, + TracesListRow.JSON_PROPERTY_TIMESTAMP, + TracesListRow.JSON_PROPERTY_LATENCY_MS, + TracesListRow.JSON_PROPERTY_TOKENS, + TracesListRow.JSON_PROPERTY_COST, + TracesListRow.JSON_PROPERTY_SCORE, + TracesListRow.JSON_PROPERTY_TURNS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracesListRow { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private String id; + + public static final String JSON_PROPERTY_INPUT = "input"; + @javax.annotation.Nullable + private String input; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @javax.annotation.Nullable + private OffsetDateTime timestamp; + + public static final String JSON_PROPERTY_LATENCY_MS = "latency_ms"; + @javax.annotation.Nullable + private Integer latencyMs; + + public static final String JSON_PROPERTY_TOKENS = "tokens"; + @javax.annotation.Nullable + private Integer tokens; + + public static final String JSON_PROPERTY_COST = "cost"; + @javax.annotation.Nullable + private BigDecimal cost; + + public static final String JSON_PROPERTY_SCORE = "score"; + @javax.annotation.Nullable + private BigDecimal score; + + public static final String JSON_PROPERTY_TURNS = "turns"; + @javax.annotation.Nullable + private Integer turns; + + public TracesListRow() { + } + + public TracesListRow id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public TracesListRow input(@javax.annotation.Nullable String input) { + this.input = input; + return this; + } + + /** + * Get input + * @return input + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInput(@javax.annotation.Nullable String input) { + this.input = input; + } + + + public TracesListRow timestamp(@javax.annotation.Nullable OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getTimestamp() { + return timestamp; + } + + + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@javax.annotation.Nullable OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + + public TracesListRow latencyMs(@javax.annotation.Nullable Integer latencyMs) { + this.latencyMs = latencyMs; + return this; + } + + /** + * Get latencyMs + * @return latencyMs + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getLatencyMs() { + return latencyMs; + } + + + @JsonProperty(JSON_PROPERTY_LATENCY_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLatencyMs(@javax.annotation.Nullable Integer latencyMs) { + this.latencyMs = latencyMs; + } + + + public TracesListRow tokens(@javax.annotation.Nullable Integer tokens) { + this.tokens = tokens; + return this; + } + + /** + * Get tokens + * @return tokens + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTokens() { + return tokens; + } + + + @JsonProperty(JSON_PROPERTY_TOKENS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTokens(@javax.annotation.Nullable Integer tokens) { + this.tokens = tokens; + } + + + public TracesListRow cost(@javax.annotation.Nullable BigDecimal cost) { + this.cost = cost; + return this; + } + + /** + * Get cost + * @return cost + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCost() { + return cost; + } + + + @JsonProperty(JSON_PROPERTY_COST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCost(@javax.annotation.Nullable BigDecimal cost) { + this.cost = cost; + } + + + public TracesListRow score(@javax.annotation.Nullable BigDecimal score) { + this.score = score; + return this; + } + + /** + * Get score + * @return score + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getScore() { + return score; + } + + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScore(@javax.annotation.Nullable BigDecimal score) { + this.score = score; + } + + + public TracesListRow turns(@javax.annotation.Nullable Integer turns) { + this.turns = turns; + return this; + } + + /** + * Get turns + * @return turns + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TURNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTurns() { + return turns; + } + + + @JsonProperty(JSON_PROPERTY_TURNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTurns(@javax.annotation.Nullable Integer turns) { + this.turns = turns; + } + + + /** + * Return true if this TracesListRow object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracesListRow tracesListRow = (TracesListRow) o; + return Objects.equals(this.id, tracesListRow.id) && + Objects.equals(this.input, tracesListRow.input) && + Objects.equals(this.timestamp, tracesListRow.timestamp) && + Objects.equals(this.latencyMs, tracesListRow.latencyMs) && + Objects.equals(this.tokens, tracesListRow.tokens) && + Objects.equals(this.cost, tracesListRow.cost) && + Objects.equals(this.score, tracesListRow.score) && + Objects.equals(this.turns, tracesListRow.turns); + } + + @Override + public int hashCode() { + return Objects.hash(id, input, timestamp, latencyMs, tokens, cost, score, turns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracesListRow {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" latencyMs: ").append(toIndentedString(latencyMs)).append("\n"); + sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); + sb.append(" cost: ").append(toIndentedString(cost)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" turns: ").append(toIndentedString(turns)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `input` to the URL query string + if (getInput() != null) { + joiner.add(String.format("%sinput%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInput())))); + } + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimestamp())))); + } + + // add `latency_ms` to the URL query string + if (getLatencyMs() != null) { + joiner.add(String.format("%slatency_ms%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLatencyMs())))); + } + + // add `tokens` to the URL query string + if (getTokens() != null) { + joiner.add(String.format("%stokens%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTokens())))); + } + + // add `cost` to the URL query string + if (getCost() != null) { + joiner.add(String.format("%scost%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCost())))); + } + + // add `score` to the URL query string + if (getScore() != null) { + joiner.add(String.format("%sscore%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getScore())))); + } + + // add `turns` to the URL query string + if (getTurns() != null) { + joiner.add(String.format("%sturns%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTurns())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabApiResponse.java new file mode 100644 index 0000000..d61d7c1 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TracesTabResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracesTabApiResponse + */ +@JsonPropertyOrder({ + TracesTabApiResponse.JSON_PROPERTY_STATUS, + TracesTabApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracesTabApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private TracesTabResponse result; + + public TracesTabApiResponse() { + } + + public TracesTabApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public TracesTabApiResponse result(@javax.annotation.Nonnull TracesTabResponse result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TracesTabResponse getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull TracesTabResponse result) { + this.result = result; + } + + + /** + * Return true if this TracesTabApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracesTabApiResponse tracesTabApiResponse = (TracesTabApiResponse) o; + return Objects.equals(this.status, tracesTabApiResponse.status) && + Objects.equals(this.result, tracesTabApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracesTabApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabResponse.java new file mode 100644 index 0000000..929dade --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TracesTabResponse.java @@ -0,0 +1,240 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TracesAggregates; +import com.futureagi.sdk.model.TracesListRow; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TracesTabResponse + */ +@JsonPropertyOrder({ + TracesTabResponse.JSON_PROPERTY_AGGREGATES, + TracesTabResponse.JSON_PROPERTY_TRACES, + TracesTabResponse.JSON_PROPERTY_TOTAL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TracesTabResponse { + public static final String JSON_PROPERTY_AGGREGATES = "aggregates"; + @javax.annotation.Nonnull + private TracesAggregates aggregates; + + public static final String JSON_PROPERTY_TRACES = "traces"; + @javax.annotation.Nonnull + private List traces = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @javax.annotation.Nonnull + private Integer total; + + public TracesTabResponse() { + } + + public TracesTabResponse aggregates(@javax.annotation.Nonnull TracesAggregates aggregates) { + this.aggregates = aggregates; + return this; + } + + /** + * Get aggregates + * @return aggregates + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AGGREGATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TracesAggregates getAggregates() { + return aggregates; + } + + + @JsonProperty(JSON_PROPERTY_AGGREGATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAggregates(@javax.annotation.Nonnull TracesAggregates aggregates) { + this.aggregates = aggregates; + } + + + public TracesTabResponse traces(@javax.annotation.Nonnull List traces) { + this.traces = traces; + return this; + } + + public TracesTabResponse addTracesItem(TracesListRow tracesItem) { + if (this.traces == null) { + this.traces = new ArrayList<>(); + } + this.traces.add(tracesItem); + return this; + } + + /** + * Get traces + * @return traces + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTraces() { + return traces; + } + + + @JsonProperty(JSON_PROPERTY_TRACES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraces(@javax.annotation.Nonnull List traces) { + this.traces = traces; + } + + + public TracesTabResponse total(@javax.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Get total + * @return total + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@javax.annotation.Nonnull Integer total) { + this.total = total; + } + + + /** + * Return true if this TracesTabResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TracesTabResponse tracesTabResponse = (TracesTabResponse) o; + return Objects.equals(this.aggregates, tracesTabResponse.aggregates) && + Objects.equals(this.traces, tracesTabResponse.traces) && + Objects.equals(this.total, tracesTabResponse.total); + } + + @Override + public int hashCode() { + return Objects.hash(aggregates, traces, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TracesTabResponse {\n"); + sb.append(" aggregates: ").append(toIndentedString(aggregates)).append("\n"); + sb.append(" traces: ").append(toIndentedString(traces)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `aggregates` to the URL query string + if (getAggregates() != null) { + joiner.add(getAggregates().toUrlQueryString(prefix + "aggregates" + suffix)); + } + + // add `traces` to the URL query string + if (getTraces() != null) { + for (int i = 0; i < getTraces().size(); i++) { + if (getTraces().get(i) != null) { + joiner.add(getTraces().get(i).toUrlQueryString(String.format("%straces%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add(String.format("%stotal%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendMetric.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendMetric.java new file mode 100644 index 0000000..eb5da55 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendMetric.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TrendMetric + */ +@JsonPropertyOrder({ + TrendMetric.JSON_PROPERTY_LABEL, + TrendMetric.JSON_PROPERTY_VALUE, + TrendMetric.JSON_PROPERTY_DELTA, + TrendMetric.JSON_PROPERTY_UNIT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TrendMetric { + public static final String JSON_PROPERTY_LABEL = "label"; + @javax.annotation.Nonnull + private String label; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_DELTA = "delta"; + @javax.annotation.Nonnull + private BigDecimal delta; + + public static final String JSON_PROPERTY_UNIT = "unit"; + @javax.annotation.Nonnull + private String unit; + + public TrendMetric() { + } + + public TrendMetric label(@javax.annotation.Nonnull String label) { + this.label = label; + return this; + } + + /** + * Get label + * @return label + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabel() { + return label; + } + + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(@javax.annotation.Nonnull String label) { + this.label = label; + } + + + public TrendMetric value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + + public TrendMetric delta(@javax.annotation.Nonnull BigDecimal delta) { + this.delta = delta; + return this; + } + + /** + * Get delta + * @return delta + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DELTA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getDelta() { + return delta; + } + + + @JsonProperty(JSON_PROPERTY_DELTA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDelta(@javax.annotation.Nonnull BigDecimal delta) { + this.delta = delta; + } + + + public TrendMetric unit(@javax.annotation.Nonnull String unit) { + this.unit = unit; + return this; + } + + /** + * Get unit + * @return unit + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUnit() { + return unit; + } + + + @JsonProperty(JSON_PROPERTY_UNIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUnit(@javax.annotation.Nonnull String unit) { + this.unit = unit; + } + + + /** + * Return true if this TrendMetric object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrendMetric trendMetric = (TrendMetric) o; + return Objects.equals(this.label, trendMetric.label) && + Objects.equals(this.value, trendMetric.value) && + Objects.equals(this.delta, trendMetric.delta) && + Objects.equals(this.unit, trendMetric.unit); + } + + @Override + public int hashCode() { + return Objects.hash(label, value, delta, unit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrendMetric {\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" delta: ").append(toIndentedString(delta)).append("\n"); + sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add(String.format("%slabel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLabel())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `delta` to the URL query string + if (getDelta() != null) { + joiner.add(String.format("%sdelta%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDelta())))); + } + + // add `unit` to the URL query string + if (getUnit() != null) { + joiner.add(String.format("%sunit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUnit())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendPoint.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendPoint.java new file mode 100644 index 0000000..14ef4f0 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendPoint.java @@ -0,0 +1,224 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TrendPoint + */ +@JsonPropertyOrder({ + TrendPoint.JSON_PROPERTY_TIMESTAMP, + TrendPoint.JSON_PROPERTY_VALUE, + TrendPoint.JSON_PROPERTY_USERS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TrendPoint { + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @javax.annotation.Nonnull + private OffsetDateTime timestamp; + + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nonnull + private Integer value; + + public static final String JSON_PROPERTY_USERS = "users"; + @javax.annotation.Nonnull + private Integer users; + + public TrendPoint() { + } + + public TrendPoint timestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getTimestamp() { + return timestamp; + } + + + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + + public TrendPoint value(@javax.annotation.Nonnull Integer value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nonnull Integer value) { + this.value = value; + } + + + public TrendPoint users(@javax.annotation.Nonnull Integer users) { + this.users = users; + return this; + } + + /** + * Get users + * @return users + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getUsers() { + return users; + } + + + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUsers(@javax.annotation.Nonnull Integer users) { + this.users = users; + } + + + /** + * Return true if this TrendPoint object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrendPoint trendPoint = (TrendPoint) o; + return Objects.equals(this.timestamp, trendPoint.timestamp) && + Objects.equals(this.value, trendPoint.value) && + Objects.equals(this.users, trendPoint.users); + } + + @Override + public int hashCode() { + return Objects.hash(timestamp, value, users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrendPoint {\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `timestamp` to the URL query string + if (getTimestamp() != null) { + joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimestamp())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format("%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `users` to the URL query string + if (getUsers() != null) { + joiner.add(String.format("%susers%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUsers())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabApiResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabApiResponse.java new file mode 100644 index 0000000..e4a1c9a --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabApiResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.TrendsTabResponse; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TrendsTabApiResponse + */ +@JsonPropertyOrder({ + TrendsTabApiResponse.JSON_PROPERTY_STATUS, + TrendsTabApiResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TrendsTabApiResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private TrendsTabResponse result; + + public TrendsTabApiResponse() { + } + + public TrendsTabApiResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public TrendsTabApiResponse result(@javax.annotation.Nonnull TrendsTabResponse result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TrendsTabResponse getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull TrendsTabResponse result) { + this.result = result; + } + + + /** + * Return true if this TrendsTabApiResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrendsTabApiResponse trendsTabApiResponse = (TrendsTabApiResponse) o; + return Objects.equals(this.status, trendsTabApiResponse.status) && + Objects.equals(this.result, trendsTabApiResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrendsTabApiResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabResponse.java new file mode 100644 index 0000000..89fa22c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/TrendsTabResponse.java @@ -0,0 +1,318 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.EventsOverTimePoint; +import com.futureagi.sdk.model.HeatmapCell; +import com.futureagi.sdk.model.ScoreTrend; +import com.futureagi.sdk.model.TrendMetric; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * TrendsTabResponse + */ +@JsonPropertyOrder({ + TrendsTabResponse.JSON_PROPERTY_METRICS, + TrendsTabResponse.JSON_PROPERTY_EVENTS_OVER_TIME, + TrendsTabResponse.JSON_PROPERTY_SCORE_TRENDS, + TrendsTabResponse.JSON_PROPERTY_ACTIVITY_HEATMAP +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class TrendsTabResponse { + public static final String JSON_PROPERTY_METRICS = "metrics"; + @javax.annotation.Nonnull + private List metrics = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVENTS_OVER_TIME = "events_over_time"; + @javax.annotation.Nonnull + private List eventsOverTime = new ArrayList<>(); + + public static final String JSON_PROPERTY_SCORE_TRENDS = "score_trends"; + @javax.annotation.Nonnull + private List scoreTrends = new ArrayList<>(); + + public static final String JSON_PROPERTY_ACTIVITY_HEATMAP = "activity_heatmap"; + @javax.annotation.Nonnull + private List> activityHeatmap = new ArrayList<>(); + + public TrendsTabResponse() { + } + + public TrendsTabResponse metrics(@javax.annotation.Nonnull List metrics) { + this.metrics = metrics; + return this; + } + + public TrendsTabResponse addMetricsItem(TrendMetric metricsItem) { + if (this.metrics == null) { + this.metrics = new ArrayList<>(); + } + this.metrics.add(metricsItem); + return this; + } + + /** + * Get metrics + * @return metrics + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getMetrics() { + return metrics; + } + + + @JsonProperty(JSON_PROPERTY_METRICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetrics(@javax.annotation.Nonnull List metrics) { + this.metrics = metrics; + } + + + public TrendsTabResponse eventsOverTime(@javax.annotation.Nonnull List eventsOverTime) { + this.eventsOverTime = eventsOverTime; + return this; + } + + public TrendsTabResponse addEventsOverTimeItem(EventsOverTimePoint eventsOverTimeItem) { + if (this.eventsOverTime == null) { + this.eventsOverTime = new ArrayList<>(); + } + this.eventsOverTime.add(eventsOverTimeItem); + return this; + } + + /** + * Get eventsOverTime + * @return eventsOverTime + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVENTS_OVER_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEventsOverTime() { + return eventsOverTime; + } + + + @JsonProperty(JSON_PROPERTY_EVENTS_OVER_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventsOverTime(@javax.annotation.Nonnull List eventsOverTime) { + this.eventsOverTime = eventsOverTime; + } + + + public TrendsTabResponse scoreTrends(@javax.annotation.Nonnull List scoreTrends) { + this.scoreTrends = scoreTrends; + return this; + } + + public TrendsTabResponse addScoreTrendsItem(ScoreTrend scoreTrendsItem) { + if (this.scoreTrends == null) { + this.scoreTrends = new ArrayList<>(); + } + this.scoreTrends.add(scoreTrendsItem); + return this; + } + + /** + * Get scoreTrends + * @return scoreTrends + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCORE_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScoreTrends() { + return scoreTrends; + } + + + @JsonProperty(JSON_PROPERTY_SCORE_TRENDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScoreTrends(@javax.annotation.Nonnull List scoreTrends) { + this.scoreTrends = scoreTrends; + } + + + public TrendsTabResponse activityHeatmap(@javax.annotation.Nonnull List> activityHeatmap) { + this.activityHeatmap = activityHeatmap; + return this; + } + + public TrendsTabResponse addActivityHeatmapItem(List activityHeatmapItem) { + if (this.activityHeatmap == null) { + this.activityHeatmap = new ArrayList<>(); + } + this.activityHeatmap.add(activityHeatmapItem); + return this; + } + + /** + * Get activityHeatmap + * @return activityHeatmap + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACTIVITY_HEATMAP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getActivityHeatmap() { + return activityHeatmap; + } + + + @JsonProperty(JSON_PROPERTY_ACTIVITY_HEATMAP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setActivityHeatmap(@javax.annotation.Nonnull List> activityHeatmap) { + this.activityHeatmap = activityHeatmap; + } + + + /** + * Return true if this TrendsTabResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrendsTabResponse trendsTabResponse = (TrendsTabResponse) o; + return Objects.equals(this.metrics, trendsTabResponse.metrics) && + Objects.equals(this.eventsOverTime, trendsTabResponse.eventsOverTime) && + Objects.equals(this.scoreTrends, trendsTabResponse.scoreTrends) && + Objects.equals(this.activityHeatmap, trendsTabResponse.activityHeatmap); + } + + @Override + public int hashCode() { + return Objects.hash(metrics, eventsOverTime, scoreTrends, activityHeatmap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrendsTabResponse {\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append(" eventsOverTime: ").append(toIndentedString(eventsOverTime)).append("\n"); + sb.append(" scoreTrends: ").append(toIndentedString(scoreTrends)).append("\n"); + sb.append(" activityHeatmap: ").append(toIndentedString(activityHeatmap)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `metrics` to the URL query string + if (getMetrics() != null) { + for (int i = 0; i < getMetrics().size(); i++) { + if (getMetrics().get(i) != null) { + joiner.add(getMetrics().get(i).toUrlQueryString(String.format("%smetrics%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `events_over_time` to the URL query string + if (getEventsOverTime() != null) { + for (int i = 0; i < getEventsOverTime().size(); i++) { + if (getEventsOverTime().get(i) != null) { + joiner.add(getEventsOverTime().get(i).toUrlQueryString(String.format("%sevents_over_time%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `score_trends` to the URL query string + if (getScoreTrends() != null) { + for (int i = 0; i < getScoreTrends().size(); i++) { + if (getScoreTrends().get(i) != null) { + joiner.add(getScoreTrends().get(i).toUrlQueryString(String.format("%sscore_trends%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `activity_heatmap` to the URL query string + if (getActivityHeatmap() != null) { + for (int i = 0; i < getActivityHeatmap().size(); i++) { + if (getActivityHeatmap().get(i) != null) { + joiner.add(String.format("%sactivity_heatmap%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getActivityHeatmap().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UpdateRunTest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UpdateRunTest.java new file mode 100644 index 0000000..1f3b55b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UpdateRunTest.java @@ -0,0 +1,374 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UpdateRunTest + */ +@JsonPropertyOrder({ + UpdateRunTest.JSON_PROPERTY_NAME, + UpdateRunTest.JSON_PROPERTY_DESCRIPTION, + UpdateRunTest.JSON_PROPERTY_AGENT_DEFINITION_ID, + UpdateRunTest.JSON_PROPERTY_SCENARIO_IDS, + UpdateRunTest.JSON_PROPERTY_DATASET_ROW_IDS, + UpdateRunTest.JSON_PROPERTY_EVAL_CONFIG_IDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UpdateRunTest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_AGENT_DEFINITION_ID = "agent_definition_id"; + @javax.annotation.Nullable + private UUID agentDefinitionId; + + public static final String JSON_PROPERTY_SCENARIO_IDS = "scenario_ids"; + @javax.annotation.Nullable + private List scenarioIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATASET_ROW_IDS = "dataset_row_ids"; + @javax.annotation.Nullable + private List datasetRowIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_EVAL_CONFIG_IDS = "eval_config_ids"; + @javax.annotation.Nullable + private List evalConfigIds = new ArrayList<>(); + + public UpdateRunTest() { + } + + public UpdateRunTest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateRunTest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateRunTest agentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + return this; + } + + /** + * Get agentDefinitionId + * @return agentDefinitionId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getAgentDefinitionId() { + return agentDefinitionId; + } + + + @JsonProperty(JSON_PROPERTY_AGENT_DEFINITION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAgentDefinitionId(@javax.annotation.Nullable UUID agentDefinitionId) { + this.agentDefinitionId = agentDefinitionId; + } + + + public UpdateRunTest scenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + return this; + } + + public UpdateRunTest addScenarioIdsItem(UUID scenarioIdsItem) { + if (this.scenarioIds == null) { + this.scenarioIds = new ArrayList<>(); + } + this.scenarioIds.add(scenarioIdsItem); + return this; + } + + /** + * Get scenarioIds + * @return scenarioIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScenarioIds() { + return scenarioIds; + } + + + @JsonProperty(JSON_PROPERTY_SCENARIO_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScenarioIds(@javax.annotation.Nullable List scenarioIds) { + this.scenarioIds = scenarioIds; + } + + + public UpdateRunTest datasetRowIds(@javax.annotation.Nullable List datasetRowIds) { + this.datasetRowIds = datasetRowIds; + return this; + } + + public UpdateRunTest addDatasetRowIdsItem(String datasetRowIdsItem) { + if (this.datasetRowIds == null) { + this.datasetRowIds = new ArrayList<>(); + } + this.datasetRowIds.add(datasetRowIdsItem); + return this; + } + + /** + * Get datasetRowIds + * @return datasetRowIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasetRowIds() { + return datasetRowIds; + } + + + @JsonProperty(JSON_PROPERTY_DATASET_ROW_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDatasetRowIds(@javax.annotation.Nullable List datasetRowIds) { + this.datasetRowIds = datasetRowIds; + } + + + public UpdateRunTest evalConfigIds(@javax.annotation.Nullable List evalConfigIds) { + this.evalConfigIds = evalConfigIds; + return this; + } + + public UpdateRunTest addEvalConfigIdsItem(UUID evalConfigIdsItem) { + if (this.evalConfigIds == null) { + this.evalConfigIds = new ArrayList<>(); + } + this.evalConfigIds.add(evalConfigIdsItem); + return this; + } + + /** + * Get evalConfigIds + * @return evalConfigIds + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvalConfigIds() { + return evalConfigIds; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_CONFIG_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalConfigIds(@javax.annotation.Nullable List evalConfigIds) { + this.evalConfigIds = evalConfigIds; + } + + + /** + * Return true if this UpdateRunTest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRunTest updateRunTest = (UpdateRunTest) o; + return Objects.equals(this.name, updateRunTest.name) && + Objects.equals(this.description, updateRunTest.description) && + Objects.equals(this.agentDefinitionId, updateRunTest.agentDefinitionId) && + Objects.equals(this.scenarioIds, updateRunTest.scenarioIds) && + Objects.equals(this.datasetRowIds, updateRunTest.datasetRowIds) && + Objects.equals(this.evalConfigIds, updateRunTest.evalConfigIds); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, agentDefinitionId, scenarioIds, datasetRowIds, evalConfigIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRunTest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" agentDefinitionId: ").append(toIndentedString(agentDefinitionId)).append("\n"); + sb.append(" scenarioIds: ").append(toIndentedString(scenarioIds)).append("\n"); + sb.append(" datasetRowIds: ").append(toIndentedString(datasetRowIds)).append("\n"); + sb.append(" evalConfigIds: ").append(toIndentedString(evalConfigIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `agent_definition_id` to the URL query string + if (getAgentDefinitionId() != null) { + joiner.add(String.format("%sagent_definition_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAgentDefinitionId())))); + } + + // add `scenario_ids` to the URL query string + if (getScenarioIds() != null) { + for (int i = 0; i < getScenarioIds().size(); i++) { + if (getScenarioIds().get(i) != null) { + joiner.add(String.format("%sscenario_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getScenarioIds().get(i))))); + } + } + } + + // add `dataset_row_ids` to the URL query string + if (getDatasetRowIds() != null) { + for (int i = 0; i < getDatasetRowIds().size(); i++) { + joiner.add(String.format("%sdataset_row_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getDatasetRowIds().get(i))))); + } + } + + // add `eval_config_ids` to the URL query string + if (getEvalConfigIds() != null) { + for (int i = 0; i < getEvalConfigIds().size(); i++) { + if (getEvalConfigIds().get(i) != null) { + joiner.add(String.format("%seval_config_ids%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getEvalConfigIds().get(i))))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/User.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/User.java new file mode 100644 index 0000000..6aebece --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/User.java @@ -0,0 +1,512 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.Organization; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * User + */ +@JsonPropertyOrder({ + User.JSON_PROPERTY_ID, + User.JSON_PROPERTY_EMAIL, + User.JSON_PROPERTY_NAME, + User.JSON_PROPERTY_ORGANIZATION_ROLE, + User.JSON_PROPERTY_ORGANIZATION, + User.JSON_PROPERTY_CREATED_AT, + User.JSON_PROPERTY_STATUS, + User.JSON_PROPERTY_ROLE, + User.JSON_PROPERTY_GOALS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class User { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_EMAIL = "email"; + @javax.annotation.Nonnull + private String email; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + /** + * Gets or Sets organizationRole + */ + public enum OrganizationRoleEnum { + OWNER(String.valueOf("Owner")), + + ADMIN(String.valueOf("Admin")), + + MEMBER(String.valueOf("Member")), + + VIEWER(String.valueOf("Viewer")), + + WORKSPACE_ADMIN(String.valueOf("workspace_admin")), + + WORKSPACE_MEMBER(String.valueOf("workspace_member")), + + WORKSPACE_VIEWER(String.valueOf("workspace_viewer")); + + private String value; + + OrganizationRoleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrganizationRoleEnum fromValue(String value) { + for (OrganizationRoleEnum b : OrganizationRoleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_ORGANIZATION_ROLE = "organization_role"; + private JsonNullable organizationRole = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nullable + private Organization organization; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private String status; + + public static final String JSON_PROPERTY_ROLE = "role"; + private JsonNullable role = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_GOALS = "goals"; + @javax.annotation.Nullable + private Map goals = new HashMap<>(); + + public User() { + } + + @JsonCreator + public User( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_STATUS) String status + ) { + this(); + this.id = id; + this.createdAt = createdAt; + this.status = status; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public User email(@javax.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; + } + + + public User name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public User organizationRole(@javax.annotation.Nullable OrganizationRoleEnum organizationRole) { + this.organizationRole = JsonNullable.of(organizationRole); + return this; + } + + /** + * Get organizationRole + * @return organizationRole + */ + @javax.annotation.Nullable + @JsonIgnore + public OrganizationRoleEnum getOrganizationRole() { + return organizationRole.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ORGANIZATION_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOrganizationRole_JsonNullable() { + return organizationRole; + } + + @JsonProperty(JSON_PROPERTY_ORGANIZATION_ROLE) + public void setOrganizationRole_JsonNullable(JsonNullable organizationRole) { + this.organizationRole = organizationRole; + } + + public void setOrganizationRole(@javax.annotation.Nullable OrganizationRoleEnum organizationRole) { + this.organizationRole = JsonNullable.of(organizationRole); + } + + + public User organization(@javax.annotation.Nullable Organization organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Organization getOrganization() { + return organization; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrganization(@javax.annotation.Nullable Organization organization) { + this.organization = organization; + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + + + + public User role(@javax.annotation.Nullable String role) { + this.role = JsonNullable.of(role); + return this; + } + + /** + * User's job role (e.g., Data Scientist, ML Engineer, or custom role) + * @return role + */ + @javax.annotation.Nullable + @JsonIgnore + public String getRole() { + return role.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getRole_JsonNullable() { + return role; + } + + @JsonProperty(JSON_PROPERTY_ROLE) + public void setRole_JsonNullable(JsonNullable role) { + this.role = role; + } + + public void setRole(@javax.annotation.Nullable String role) { + this.role = JsonNullable.of(role); + } + + + public User goals(@javax.annotation.Nullable Map goals) { + this.goals = goals; + return this; + } + + public User putGoalsItem(String key, Object goalsItem) { + if (this.goals == null) { + this.goals = new HashMap<>(); + } + this.goals.put(key, goalsItem); + return this; + } + + /** + * List of user's goals for using the platform + * @return goals + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GOALS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getGoals() { + return goals; + } + + + @JsonProperty(JSON_PROPERTY_GOALS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setGoals(@javax.annotation.Nullable Map goals) { + this.goals = goals; + } + + + /** + * Return true if this User object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.email, user.email) && + Objects.equals(this.name, user.name) && + equalsNullable(this.organizationRole, user.organizationRole) && + Objects.equals(this.organization, user.organization) && + Objects.equals(this.createdAt, user.createdAt) && + Objects.equals(this.status, user.status) && + equalsNullable(this.role, user.role) && + Objects.equals(this.goals, user.goals); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, email, name, hashCodeNullable(organizationRole), organization, createdAt, status, hashCodeNullable(role), goals); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" organizationRole: ").append(toIndentedString(organizationRole)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" goals: ").append(toIndentedString(goals)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `organization_role` to the URL query string + if (getOrganizationRole() != null) { + joiner.add(String.format("%sorganization_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganizationRole())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(getOrganization().toUrlQueryString(prefix + "organization" + suffix)); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `role` to the URL query string + if (getRole() != null) { + joiner.add(String.format("%srole%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRole())))); + } + + // add `goals` to the URL query string + if (getGoals() != null) { + for (String _key : getGoals().keySet()) { + joiner.add(String.format("%sgoals%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getGoals().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getGoals().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitor.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitor.java new file mode 100644 index 0000000..6e4bb66 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitor.java @@ -0,0 +1,1330 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserAlertMonitor + */ +@JsonPropertyOrder({ + UserAlertMonitor.JSON_PROPERTY_ID, + UserAlertMonitor.JSON_PROPERTY_PROJECT, + UserAlertMonitor.JSON_PROPERTY_NAME, + UserAlertMonitor.JSON_PROPERTY_METRIC_NAME, + UserAlertMonitor.JSON_PROPERTY_CREATED_AT, + UserAlertMonitor.JSON_PROPERTY_UPDATED_AT, + UserAlertMonitor.JSON_PROPERTY_DELETED, + UserAlertMonitor.JSON_PROPERTY_DELETED_AT, + UserAlertMonitor.JSON_PROPERTY_METRIC_TYPE, + UserAlertMonitor.JSON_PROPERTY_METRIC, + UserAlertMonitor.JSON_PROPERTY_THRESHOLD_OPERATOR, + UserAlertMonitor.JSON_PROPERTY_THRESHOLD_TYPE, + UserAlertMonitor.JSON_PROPERTY_THRESHOLD_METRIC_VALUE, + UserAlertMonitor.JSON_PROPERTY_CRITICAL_THRESHOLD_VALUE, + UserAlertMonitor.JSON_PROPERTY_WARNING_THRESHOLD_VALUE, + UserAlertMonitor.JSON_PROPERTY_ALERT_FREQUENCY, + UserAlertMonitor.JSON_PROPERTY_AUTO_THRESHOLD_TIME_WINDOW, + UserAlertMonitor.JSON_PROPERTY_LAST_CHECKED_AT, + UserAlertMonitor.JSON_PROPERTY_NOTIFICATION_EMAILS, + UserAlertMonitor.JSON_PROPERTY_SLACK_WEBHOOK_URL, + UserAlertMonitor.JSON_PROPERTY_SLACK_NOTES, + UserAlertMonitor.JSON_PROPERTY_IS_MUTE, + UserAlertMonitor.JSON_PROPERTY_FILTERS, + UserAlertMonitor.JSON_PROPERTY_LOGS, + UserAlertMonitor.JSON_PROPERTY_ORGANIZATION, + UserAlertMonitor.JSON_PROPERTY_WORKSPACE, + UserAlertMonitor.JSON_PROPERTY_CREATED_BY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserAlertMonitor { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_PROJECT = "project"; + @javax.annotation.Nonnull + private UUID project; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_METRIC_NAME = "metric_name"; + @javax.annotation.Nullable + private String metricName; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @javax.annotation.Nullable + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_DELETED = "deleted"; + @javax.annotation.Nullable + private Boolean deleted; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + + /** + * Gets or Sets metricType + */ + public enum MetricTypeEnum { + COUNT_OF_ERRORS(String.valueOf("count_of_errors")), + + ERROR_RATES_FOR_FUNCTION_CALLING(String.valueOf("error_rates_for_function_calling")), + + ERROR_FREE_SESSION_RATES(String.valueOf("error_free_session_rates")), + + SERVICE_PROVIDER_ERROR_RATES(String.valueOf("service_provider_error_rates")), + + LLM_API_FAILURE_RATES(String.valueOf("llm_api_failure_rates")), + + SPAN_RESPONSE_TIME(String.valueOf("span_response_time")), + + LLM_RESPONSE_TIME(String.valueOf("llm_response_time")), + + TOKEN_USAGE(String.valueOf("token_usage")), + + DAILY_TOKENS_SPENT(String.valueOf("daily_tokens_spent")), + + MONTHLY_TOKENS_SPENT(String.valueOf("monthly_tokens_spent")), + + EVALUATION_METRICS(String.valueOf("evaluation_metrics")); + + private String value; + + MetricTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MetricTypeEnum fromValue(String value) { + for (MetricTypeEnum b : MetricTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_METRIC_TYPE = "metric_type"; + @javax.annotation.Nonnull + private MetricTypeEnum metricType; + + public static final String JSON_PROPERTY_METRIC = "metric"; + private JsonNullable metric = JsonNullable.undefined(); + + /** + * Gets or Sets thresholdOperator + */ + public enum ThresholdOperatorEnum { + GREATER_THAN(String.valueOf("greater_than")), + + LESS_THAN(String.valueOf("less_than")); + + private String value; + + ThresholdOperatorEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ThresholdOperatorEnum fromValue(String value) { + for (ThresholdOperatorEnum b : ThresholdOperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_THRESHOLD_OPERATOR = "threshold_operator"; + @javax.annotation.Nonnull + private ThresholdOperatorEnum thresholdOperator; + + /** + * Method to set the threshold for the monitor (Static or Percentage change). + */ + public enum ThresholdTypeEnum { + STATIC(String.valueOf("static")), + + PERCENTAGE_CHANGE(String.valueOf("percentage_change")); + + private String value; + + ThresholdTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ThresholdTypeEnum fromValue(String value) { + for (ThresholdTypeEnum b : ThresholdTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_THRESHOLD_TYPE = "threshold_type"; + @javax.annotation.Nullable + private ThresholdTypeEnum thresholdType; + + public static final String JSON_PROPERTY_THRESHOLD_METRIC_VALUE = "threshold_metric_value"; + private JsonNullable thresholdMetricValue = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CRITICAL_THRESHOLD_VALUE = "critical_threshold_value"; + private JsonNullable criticalThresholdValue = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WARNING_THRESHOLD_VALUE = "warning_threshold_value"; + private JsonNullable warningThresholdValue = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ALERT_FREQUENCY = "alert_frequency"; + @javax.annotation.Nullable + private Integer alertFrequency; + + public static final String JSON_PROPERTY_AUTO_THRESHOLD_TIME_WINDOW = "auto_threshold_time_window"; + @javax.annotation.Nullable + private Integer autoThresholdTimeWindow; + + public static final String JSON_PROPERTY_LAST_CHECKED_AT = "last_checked_at"; + private JsonNullable lastCheckedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NOTIFICATION_EMAILS = "notification_emails"; + @javax.annotation.Nullable + private List notificationEmails = new ArrayList<>(); + + public static final String JSON_PROPERTY_SLACK_WEBHOOK_URL = "slack_webhook_url"; + private JsonNullable slackWebhookUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SLACK_NOTES = "slack_notes"; + private JsonNullable slackNotes = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_MUTE = "is_mute"; + @javax.annotation.Nullable + private Boolean isMute; + + public static final String JSON_PROPERTY_FILTERS = "filters"; + @javax.annotation.Nullable + private Map filters = new HashMap<>(); + + public static final String JSON_PROPERTY_LOGS = "logs"; + private JsonNullable>> logs = JsonNullable.>>undefined(); + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nonnull + private UUID organization; + + public static final String JSON_PROPERTY_WORKSPACE = "workspace"; + private JsonNullable workspace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private JsonNullable createdBy = JsonNullable.undefined(); + + public UserAlertMonitor() { + } + + @JsonCreator + public UserAlertMonitor( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_METRIC_NAME) String metricName, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.metricName = metricName; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public UserAlertMonitor project(@javax.annotation.Nonnull UUID project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getProject() { + return project; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProject(@javax.annotation.Nonnull UUID project) { + this.project = project; + } + + + public UserAlertMonitor name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Get metricName + * @return metricName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMetricName() { + return metricName; + } + + + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + + public UserAlertMonitor deleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * @return deleted + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeleted() { + return deleted; + } + + + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { + this.deleted = deleted; + } + + + public UserAlertMonitor deletedAt(@javax.annotation.Nullable OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + return this; + } + + /** + * Get deletedAt + * @return deletedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + public void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + public void setDeletedAt(@javax.annotation.Nullable OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + } + + + public UserAlertMonitor metricType(@javax.annotation.Nonnull MetricTypeEnum metricType) { + this.metricType = metricType; + return this; + } + + /** + * Get metricType + * @return metricType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METRIC_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MetricTypeEnum getMetricType() { + return metricType; + } + + + @JsonProperty(JSON_PROPERTY_METRIC_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetricType(@javax.annotation.Nonnull MetricTypeEnum metricType) { + this.metricType = metricType; + } + + + public UserAlertMonitor metric(@javax.annotation.Nullable String metric) { + this.metric = JsonNullable.of(metric); + return this; + } + + /** + * Id of the evaluation template. + * @return metric + */ + @javax.annotation.Nullable + @JsonIgnore + public String getMetric() { + return metric.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMetric_JsonNullable() { + return metric; + } + + @JsonProperty(JSON_PROPERTY_METRIC) + public void setMetric_JsonNullable(JsonNullable metric) { + this.metric = metric; + } + + public void setMetric(@javax.annotation.Nullable String metric) { + this.metric = JsonNullable.of(metric); + } + + + public UserAlertMonitor thresholdOperator(@javax.annotation.Nonnull ThresholdOperatorEnum thresholdOperator) { + this.thresholdOperator = thresholdOperator; + return this; + } + + /** + * Get thresholdOperator + * @return thresholdOperator + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_THRESHOLD_OPERATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ThresholdOperatorEnum getThresholdOperator() { + return thresholdOperator; + } + + + @JsonProperty(JSON_PROPERTY_THRESHOLD_OPERATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setThresholdOperator(@javax.annotation.Nonnull ThresholdOperatorEnum thresholdOperator) { + this.thresholdOperator = thresholdOperator; + } + + + public UserAlertMonitor thresholdType(@javax.annotation.Nullable ThresholdTypeEnum thresholdType) { + this.thresholdType = thresholdType; + return this; + } + + /** + * Method to set the threshold for the monitor (Static or Percentage change). + * @return thresholdType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THRESHOLD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThresholdTypeEnum getThresholdType() { + return thresholdType; + } + + + @JsonProperty(JSON_PROPERTY_THRESHOLD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setThresholdType(@javax.annotation.Nullable ThresholdTypeEnum thresholdType) { + this.thresholdType = thresholdType; + } + + + public UserAlertMonitor thresholdMetricValue(@javax.annotation.Nullable String thresholdMetricValue) { + this.thresholdMetricValue = JsonNullable.of(thresholdMetricValue); + return this; + } + + /** + * For choice and pass/fail evals, the specific metric value to monitor. + * @return thresholdMetricValue + */ + @javax.annotation.Nullable + @JsonIgnore + public String getThresholdMetricValue() { + return thresholdMetricValue.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_THRESHOLD_METRIC_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getThresholdMetricValue_JsonNullable() { + return thresholdMetricValue; + } + + @JsonProperty(JSON_PROPERTY_THRESHOLD_METRIC_VALUE) + public void setThresholdMetricValue_JsonNullable(JsonNullable thresholdMetricValue) { + this.thresholdMetricValue = thresholdMetricValue; + } + + public void setThresholdMetricValue(@javax.annotation.Nullable String thresholdMetricValue) { + this.thresholdMetricValue = JsonNullable.of(thresholdMetricValue); + } + + + public UserAlertMonitor criticalThresholdValue(@javax.annotation.Nullable BigDecimal criticalThresholdValue) { + this.criticalThresholdValue = JsonNullable.of(criticalThresholdValue); + return this; + } + + /** + * Get criticalThresholdValue + * minimum: 0 + * @return criticalThresholdValue + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getCriticalThresholdValue() { + return criticalThresholdValue.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CRITICAL_THRESHOLD_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCriticalThresholdValue_JsonNullable() { + return criticalThresholdValue; + } + + @JsonProperty(JSON_PROPERTY_CRITICAL_THRESHOLD_VALUE) + public void setCriticalThresholdValue_JsonNullable(JsonNullable criticalThresholdValue) { + this.criticalThresholdValue = criticalThresholdValue; + } + + public void setCriticalThresholdValue(@javax.annotation.Nullable BigDecimal criticalThresholdValue) { + this.criticalThresholdValue = JsonNullable.of(criticalThresholdValue); + } + + + public UserAlertMonitor warningThresholdValue(@javax.annotation.Nullable BigDecimal warningThresholdValue) { + this.warningThresholdValue = JsonNullable.of(warningThresholdValue); + return this; + } + + /** + * Get warningThresholdValue + * minimum: 0 + * @return warningThresholdValue + */ + @javax.annotation.Nullable + @JsonIgnore + public BigDecimal getWarningThresholdValue() { + return warningThresholdValue.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWarningThresholdValue_JsonNullable() { + return warningThresholdValue; + } + + @JsonProperty(JSON_PROPERTY_WARNING_THRESHOLD_VALUE) + public void setWarningThresholdValue_JsonNullable(JsonNullable warningThresholdValue) { + this.warningThresholdValue = warningThresholdValue; + } + + public void setWarningThresholdValue(@javax.annotation.Nullable BigDecimal warningThresholdValue) { + this.warningThresholdValue = JsonNullable.of(warningThresholdValue); + } + + + public UserAlertMonitor alertFrequency(@javax.annotation.Nullable Integer alertFrequency) { + this.alertFrequency = alertFrequency; + return this; + } + + /** + * Frequency of alert checks in minutes. + * minimum: 5 + * maximum: 2147483647 + * @return alertFrequency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALERT_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAlertFrequency() { + return alertFrequency; + } + + + @JsonProperty(JSON_PROPERTY_ALERT_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAlertFrequency(@javax.annotation.Nullable Integer alertFrequency) { + this.alertFrequency = alertFrequency; + } + + + public UserAlertMonitor autoThresholdTimeWindow(@javax.annotation.Nullable Integer autoThresholdTimeWindow) { + this.autoThresholdTimeWindow = autoThresholdTimeWindow; + return this; + } + + /** + * For auto-thresholding. The time window in minutes to calculate the historical mean + * minimum: 0 + * maximum: 2147483647 + * @return autoThresholdTimeWindow + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTO_THRESHOLD_TIME_WINDOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getAutoThresholdTimeWindow() { + return autoThresholdTimeWindow; + } + + + @JsonProperty(JSON_PROPERTY_AUTO_THRESHOLD_TIME_WINDOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutoThresholdTimeWindow(@javax.annotation.Nullable Integer autoThresholdTimeWindow) { + this.autoThresholdTimeWindow = autoThresholdTimeWindow; + } + + + public UserAlertMonitor lastCheckedAt(@javax.annotation.Nullable OffsetDateTime lastCheckedAt) { + this.lastCheckedAt = JsonNullable.of(lastCheckedAt); + return this; + } + + /** + * The last time the monitor was checked for alerts. + * @return lastCheckedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getLastCheckedAt() { + return lastCheckedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_CHECKED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastCheckedAt_JsonNullable() { + return lastCheckedAt; + } + + @JsonProperty(JSON_PROPERTY_LAST_CHECKED_AT) + public void setLastCheckedAt_JsonNullable(JsonNullable lastCheckedAt) { + this.lastCheckedAt = lastCheckedAt; + } + + public void setLastCheckedAt(@javax.annotation.Nullable OffsetDateTime lastCheckedAt) { + this.lastCheckedAt = JsonNullable.of(lastCheckedAt); + } + + + public UserAlertMonitor notificationEmails(@javax.annotation.Nullable List notificationEmails) { + this.notificationEmails = notificationEmails; + return this; + } + + public UserAlertMonitor addNotificationEmailsItem(String notificationEmailsItem) { + if (this.notificationEmails == null) { + this.notificationEmails = new ArrayList<>(); + } + this.notificationEmails.add(notificationEmailsItem); + return this; + } + + /** + * Get notificationEmails + * @return notificationEmails + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTIFICATION_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNotificationEmails() { + return notificationEmails; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFICATION_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationEmails(@javax.annotation.Nullable List notificationEmails) { + this.notificationEmails = notificationEmails; + } + + + public UserAlertMonitor slackWebhookUrl(@javax.annotation.Nullable URI slackWebhookUrl) { + this.slackWebhookUrl = JsonNullable.of(slackWebhookUrl); + return this; + } + + /** + * Get slackWebhookUrl + * @return slackWebhookUrl + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getSlackWebhookUrl() { + return slackWebhookUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SLACK_WEBHOOK_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSlackWebhookUrl_JsonNullable() { + return slackWebhookUrl; + } + + @JsonProperty(JSON_PROPERTY_SLACK_WEBHOOK_URL) + public void setSlackWebhookUrl_JsonNullable(JsonNullable slackWebhookUrl) { + this.slackWebhookUrl = slackWebhookUrl; + } + + public void setSlackWebhookUrl(@javax.annotation.Nullable URI slackWebhookUrl) { + this.slackWebhookUrl = JsonNullable.of(slackWebhookUrl); + } + + + public UserAlertMonitor slackNotes(@javax.annotation.Nullable String slackNotes) { + this.slackNotes = JsonNullable.of(slackNotes); + return this; + } + + /** + * Get slackNotes + * @return slackNotes + */ + @javax.annotation.Nullable + @JsonIgnore + public String getSlackNotes() { + return slackNotes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SLACK_NOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSlackNotes_JsonNullable() { + return slackNotes; + } + + @JsonProperty(JSON_PROPERTY_SLACK_NOTES) + public void setSlackNotes_JsonNullable(JsonNullable slackNotes) { + this.slackNotes = slackNotes; + } + + public void setSlackNotes(@javax.annotation.Nullable String slackNotes) { + this.slackNotes = JsonNullable.of(slackNotes); + } + + + public UserAlertMonitor isMute(@javax.annotation.Nullable Boolean isMute) { + this.isMute = isMute; + return this; + } + + /** + * Get isMute + * @return isMute + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_MUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsMute() { + return isMute; + } + + + @JsonProperty(JSON_PROPERTY_IS_MUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsMute(@javax.annotation.Nullable Boolean isMute) { + this.isMute = isMute; + } + + + public UserAlertMonitor filters(@javax.annotation.Nullable Map filters) { + this.filters = filters; + return this; + } + + public UserAlertMonitor putFiltersItem(String key, Object filtersItem) { + if (this.filters == null) { + this.filters = new HashMap<>(); + } + this.filters.put(key, filtersItem); + return this; + } + + /** + * Get filters + * @return filters + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getFilters() { + return filters; + } + + + @JsonProperty(JSON_PROPERTY_FILTERS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setFilters(@javax.annotation.Nullable Map filters) { + this.filters = filters; + } + + + public UserAlertMonitor logs(@javax.annotation.Nullable List> logs) { + this.logs = JsonNullable.>>of(logs); + return this; + } + + public UserAlertMonitor addLogsItem(Map logsItem) { + if (this.logs == null || !this.logs.isPresent()) { + this.logs = JsonNullable.>>of(new ArrayList<>()); + } + try { + this.logs.get().add(logsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get logs + * @return logs + */ + @javax.annotation.Nullable + @JsonIgnore + public List> getLogs() { + return logs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getLogs_JsonNullable() { + return logs; + } + + @JsonProperty(JSON_PROPERTY_LOGS) + public void setLogs_JsonNullable(JsonNullable>> logs) { + this.logs = logs; + } + + public void setLogs(@javax.annotation.Nullable List> logs) { + this.logs = JsonNullable.>>of(logs); + } + + + public UserAlertMonitor organization(@javax.annotation.Nonnull UUID organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getOrganization() { + return organization; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrganization(@javax.annotation.Nonnull UUID organization) { + this.organization = organization; + } + + + public UserAlertMonitor workspace(@javax.annotation.Nullable UUID workspace) { + this.workspace = JsonNullable.of(workspace); + return this; + } + + /** + * Get workspace + * @return workspace + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getWorkspace() { + return workspace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkspace_JsonNullable() { + return workspace; + } + + @JsonProperty(JSON_PROPERTY_WORKSPACE) + public void setWorkspace_JsonNullable(JsonNullable workspace) { + this.workspace = workspace; + } + + public void setWorkspace(@javax.annotation.Nullable UUID workspace) { + this.workspace = JsonNullable.of(workspace); + } + + + public UserAlertMonitor createdBy(@javax.annotation.Nullable UUID createdBy) { + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * Get createdBy + * @return createdBy + */ + @javax.annotation.Nullable + @JsonIgnore + public UUID getCreatedBy() { + return createdBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCreatedBy_JsonNullable() { + return createdBy; + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + public void setCreatedBy_JsonNullable(JsonNullable createdBy) { + this.createdBy = createdBy; + } + + public void setCreatedBy(@javax.annotation.Nullable UUID createdBy) { + this.createdBy = JsonNullable.of(createdBy); + } + + + /** + * Return true if this UserAlertMonitor object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserAlertMonitor userAlertMonitor = (UserAlertMonitor) o; + return Objects.equals(this.id, userAlertMonitor.id) && + Objects.equals(this.project, userAlertMonitor.project) && + Objects.equals(this.name, userAlertMonitor.name) && + Objects.equals(this.metricName, userAlertMonitor.metricName) && + Objects.equals(this.createdAt, userAlertMonitor.createdAt) && + Objects.equals(this.updatedAt, userAlertMonitor.updatedAt) && + Objects.equals(this.deleted, userAlertMonitor.deleted) && + equalsNullable(this.deletedAt, userAlertMonitor.deletedAt) && + Objects.equals(this.metricType, userAlertMonitor.metricType) && + equalsNullable(this.metric, userAlertMonitor.metric) && + Objects.equals(this.thresholdOperator, userAlertMonitor.thresholdOperator) && + Objects.equals(this.thresholdType, userAlertMonitor.thresholdType) && + equalsNullable(this.thresholdMetricValue, userAlertMonitor.thresholdMetricValue) && + equalsNullable(this.criticalThresholdValue, userAlertMonitor.criticalThresholdValue) && + equalsNullable(this.warningThresholdValue, userAlertMonitor.warningThresholdValue) && + Objects.equals(this.alertFrequency, userAlertMonitor.alertFrequency) && + Objects.equals(this.autoThresholdTimeWindow, userAlertMonitor.autoThresholdTimeWindow) && + equalsNullable(this.lastCheckedAt, userAlertMonitor.lastCheckedAt) && + Objects.equals(this.notificationEmails, userAlertMonitor.notificationEmails) && + equalsNullable(this.slackWebhookUrl, userAlertMonitor.slackWebhookUrl) && + equalsNullable(this.slackNotes, userAlertMonitor.slackNotes) && + Objects.equals(this.isMute, userAlertMonitor.isMute) && + Objects.equals(this.filters, userAlertMonitor.filters) && + equalsNullable(this.logs, userAlertMonitor.logs) && + Objects.equals(this.organization, userAlertMonitor.organization) && + equalsNullable(this.workspace, userAlertMonitor.workspace) && + equalsNullable(this.createdBy, userAlertMonitor.createdBy); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, project, name, metricName, createdAt, updatedAt, deleted, hashCodeNullable(deletedAt), metricType, hashCodeNullable(metric), thresholdOperator, thresholdType, hashCodeNullable(thresholdMetricValue), hashCodeNullable(criticalThresholdValue), hashCodeNullable(warningThresholdValue), alertFrequency, autoThresholdTimeWindow, hashCodeNullable(lastCheckedAt), notificationEmails, hashCodeNullable(slackWebhookUrl), hashCodeNullable(slackNotes), isMute, filters, hashCodeNullable(logs), organization, hashCodeNullable(workspace), hashCodeNullable(createdBy)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserAlertMonitor {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" metricName: ").append(toIndentedString(metricName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" metricType: ").append(toIndentedString(metricType)).append("\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" thresholdOperator: ").append(toIndentedString(thresholdOperator)).append("\n"); + sb.append(" thresholdType: ").append(toIndentedString(thresholdType)).append("\n"); + sb.append(" thresholdMetricValue: ").append(toIndentedString(thresholdMetricValue)).append("\n"); + sb.append(" criticalThresholdValue: ").append(toIndentedString(criticalThresholdValue)).append("\n"); + sb.append(" warningThresholdValue: ").append(toIndentedString(warningThresholdValue)).append("\n"); + sb.append(" alertFrequency: ").append(toIndentedString(alertFrequency)).append("\n"); + sb.append(" autoThresholdTimeWindow: ").append(toIndentedString(autoThresholdTimeWindow)).append("\n"); + sb.append(" lastCheckedAt: ").append(toIndentedString(lastCheckedAt)).append("\n"); + sb.append(" notificationEmails: ").append(toIndentedString(notificationEmails)).append("\n"); + sb.append(" slackWebhookUrl: ").append(toIndentedString(slackWebhookUrl)).append("\n"); + sb.append(" slackNotes: ").append(toIndentedString(slackNotes)).append("\n"); + sb.append(" isMute: ").append(toIndentedString(isMute)).append("\n"); + sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); + sb.append(" logs: ").append(toIndentedString(logs)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" workspace: ").append(toIndentedString(workspace)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `project` to the URL query string + if (getProject() != null) { + joiner.add(String.format("%sproject%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProject())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `metric_name` to the URL query string + if (getMetricName() != null) { + joiner.add(String.format("%smetric_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetricName())))); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updated_at` to the URL query string + if (getUpdatedAt() != null) { + joiner.add(String.format("%supdated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `deleted` to the URL query string + if (getDeleted() != null) { + joiner.add(String.format("%sdeleted%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeleted())))); + } + + // add `deleted_at` to the URL query string + if (getDeletedAt() != null) { + joiner.add(String.format("%sdeleted_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDeletedAt())))); + } + + // add `metric_type` to the URL query string + if (getMetricType() != null) { + joiner.add(String.format("%smetric_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetricType())))); + } + + // add `metric` to the URL query string + if (getMetric() != null) { + joiner.add(String.format("%smetric%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetric())))); + } + + // add `threshold_operator` to the URL query string + if (getThresholdOperator() != null) { + joiner.add(String.format("%sthreshold_operator%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getThresholdOperator())))); + } + + // add `threshold_type` to the URL query string + if (getThresholdType() != null) { + joiner.add(String.format("%sthreshold_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getThresholdType())))); + } + + // add `threshold_metric_value` to the URL query string + if (getThresholdMetricValue() != null) { + joiner.add(String.format("%sthreshold_metric_value%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getThresholdMetricValue())))); + } + + // add `critical_threshold_value` to the URL query string + if (getCriticalThresholdValue() != null) { + joiner.add(String.format("%scritical_threshold_value%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCriticalThresholdValue())))); + } + + // add `warning_threshold_value` to the URL query string + if (getWarningThresholdValue() != null) { + joiner.add(String.format("%swarning_threshold_value%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWarningThresholdValue())))); + } + + // add `alert_frequency` to the URL query string + if (getAlertFrequency() != null) { + joiner.add(String.format("%salert_frequency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAlertFrequency())))); + } + + // add `auto_threshold_time_window` to the URL query string + if (getAutoThresholdTimeWindow() != null) { + joiner.add(String.format("%sauto_threshold_time_window%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAutoThresholdTimeWindow())))); + } + + // add `last_checked_at` to the URL query string + if (getLastCheckedAt() != null) { + joiner.add(String.format("%slast_checked_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastCheckedAt())))); + } + + // add `notification_emails` to the URL query string + if (getNotificationEmails() != null) { + for (int i = 0; i < getNotificationEmails().size(); i++) { + joiner.add(String.format("%snotification_emails%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getNotificationEmails().get(i))))); + } + } + + // add `slack_webhook_url` to the URL query string + if (getSlackWebhookUrl() != null) { + joiner.add(String.format("%sslack_webhook_url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSlackWebhookUrl())))); + } + + // add `slack_notes` to the URL query string + if (getSlackNotes() != null) { + joiner.add(String.format("%sslack_notes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSlackNotes())))); + } + + // add `is_mute` to the URL query string + if (getIsMute() != null) { + joiner.add(String.format("%sis_mute%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsMute())))); + } + + // add `filters` to the URL query string + if (getFilters() != null) { + for (String _key : getFilters().keySet()) { + joiner.add(String.format("%sfilters%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getFilters().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getFilters().get(_key))))); + } + } + + // add `logs` to the URL query string + if (getLogs() != null) { + for (int i = 0; i < getLogs().size(); i++) { + joiner.add(String.format("%slogs%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getLogs().get(i))))); + } + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(String.format("%sorganization%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganization())))); + } + + // add `workspace` to the URL query string + if (getWorkspace() != null) { + joiner.add(String.format("%sworkspace%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspace())))); + } + + // add `created_by` to the URL query string + if (getCreatedBy() != null) { + joiner.add(String.format("%screated_by%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicate.java new file mode 100644 index 0000000..127a786 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicate.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserAlertMonitorDuplicate + */ +@JsonPropertyOrder({ + UserAlertMonitorDuplicate.JSON_PROPERTY_ID, + UserAlertMonitorDuplicate.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserAlertMonitorDuplicate { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public UserAlertMonitorDuplicate() { + } + + public UserAlertMonitorDuplicate id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public UserAlertMonitorDuplicate name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this UserAlertMonitorDuplicate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserAlertMonitorDuplicate userAlertMonitorDuplicate = (UserAlertMonitorDuplicate) o; + return Objects.equals(this.id, userAlertMonitorDuplicate.id) && + Objects.equals(this.name, userAlertMonitorDuplicate.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserAlertMonitorDuplicate {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResponse.java new file mode 100644 index 0000000..ea67b86 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.UserAlertMonitorDuplicateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserAlertMonitorDuplicateResponse + */ +@JsonPropertyOrder({ + UserAlertMonitorDuplicateResponse.JSON_PROPERTY_STATUS, + UserAlertMonitorDuplicateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserAlertMonitorDuplicateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private UserAlertMonitorDuplicateResult result; + + public UserAlertMonitorDuplicateResponse() { + } + + public UserAlertMonitorDuplicateResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public UserAlertMonitorDuplicateResponse result(@javax.annotation.Nonnull UserAlertMonitorDuplicateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UserAlertMonitorDuplicateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull UserAlertMonitorDuplicateResult result) { + this.result = result; + } + + + /** + * Return true if this UserAlertMonitorDuplicateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserAlertMonitorDuplicateResponse userAlertMonitorDuplicateResponse = (UserAlertMonitorDuplicateResponse) o; + return Objects.equals(this.status, userAlertMonitorDuplicateResponse.status) && + Objects.equals(this.result, userAlertMonitorDuplicateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserAlertMonitorDuplicateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResult.java new file mode 100644 index 0000000..4a4d6a2 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorDuplicateResult.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserAlertMonitorDuplicateResult + */ +@JsonPropertyOrder({ + UserAlertMonitorDuplicateResult.JSON_PROPERTY_ID, + UserAlertMonitorDuplicateResult.JSON_PROPERTY_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserAlertMonitorDuplicateResult { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public UserAlertMonitorDuplicateResult() { + } + + public UserAlertMonitorDuplicateResult id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public UserAlertMonitorDuplicateResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + /** + * Return true if this UserAlertMonitorDuplicateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserAlertMonitorDuplicateResult userAlertMonitorDuplicateResult = (UserAlertMonitorDuplicateResult) o; + return Objects.equals(this.id, userAlertMonitorDuplicateResult.id) && + Objects.equals(this.message, userAlertMonitorDuplicateResult.message); + } + + @Override + public int hashCode() { + return Objects.hash(id, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserAlertMonitorDuplicateResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorLog.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorLog.java new file mode 100644 index 0000000..1ae9036 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorLog.java @@ -0,0 +1,547 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.User; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserAlertMonitorLog + */ +@JsonPropertyOrder({ + UserAlertMonitorLog.JSON_PROPERTY_ID, + UserAlertMonitorLog.JSON_PROPERTY_RESOLVED_BY, + UserAlertMonitorLog.JSON_PROPERTY_CREATED_AT, + UserAlertMonitorLog.JSON_PROPERTY_TYPE, + UserAlertMonitorLog.JSON_PROPERTY_MESSAGE, + UserAlertMonitorLog.JSON_PROPERTY_RESOLVED, + UserAlertMonitorLog.JSON_PROPERTY_RESOLVED_AT, + UserAlertMonitorLog.JSON_PROPERTY_LINK, + UserAlertMonitorLog.JSON_PROPERTY_TIME_WINDOW_START, + UserAlertMonitorLog.JSON_PROPERTY_TIME_WINDOW_END +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserAlertMonitorLog { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private UUID id; + + public static final String JSON_PROPERTY_RESOLVED_BY = "resolved_by"; + @javax.annotation.Nullable + private User resolvedBy; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nullable + private OffsetDateTime createdAt; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CRITICAL(String.valueOf("critical")), + + WARNING(String.valueOf("warning")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_RESOLVED = "resolved"; + @javax.annotation.Nullable + private Boolean resolved; + + public static final String JSON_PROPERTY_RESOLVED_AT = "resolved_at"; + private JsonNullable resolvedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LINK = "link"; + private JsonNullable link = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TIME_WINDOW_START = "time_window_start"; + private JsonNullable timeWindowStart = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TIME_WINDOW_END = "time_window_end"; + private JsonNullable timeWindowEnd = JsonNullable.undefined(); + + public UserAlertMonitorLog() { + } + + @JsonCreator + public UserAlertMonitorLog( + @JsonProperty(JSON_PROPERTY_ID) UUID id, + @JsonProperty(JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt + ) { + this(); + this.id = id; + this.createdAt = createdAt; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + + + + public UserAlertMonitorLog resolvedBy(@javax.annotation.Nullable User resolvedBy) { + this.resolvedBy = resolvedBy; + return this; + } + + /** + * Get resolvedBy + * @return resolvedBy + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOLVED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public User getResolvedBy() { + return resolvedBy; + } + + + @JsonProperty(JSON_PROPERTY_RESOLVED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResolvedBy(@javax.annotation.Nullable User resolvedBy) { + this.resolvedBy = resolvedBy; + } + + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + + public UserAlertMonitorLog type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public UserAlertMonitorLog message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public UserAlertMonitorLog resolved(@javax.annotation.Nullable Boolean resolved) { + this.resolved = resolved; + return this; + } + + /** + * Get resolved + * @return resolved + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOLVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getResolved() { + return resolved; + } + + + @JsonProperty(JSON_PROPERTY_RESOLVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResolved(@javax.annotation.Nullable Boolean resolved) { + this.resolved = resolved; + } + + + public UserAlertMonitorLog resolvedAt(@javax.annotation.Nullable OffsetDateTime resolvedAt) { + this.resolvedAt = JsonNullable.of(resolvedAt); + return this; + } + + /** + * Get resolvedAt + * @return resolvedAt + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getResolvedAt() { + return resolvedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RESOLVED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getResolvedAt_JsonNullable() { + return resolvedAt; + } + + @JsonProperty(JSON_PROPERTY_RESOLVED_AT) + public void setResolvedAt_JsonNullable(JsonNullable resolvedAt) { + this.resolvedAt = resolvedAt; + } + + public void setResolvedAt(@javax.annotation.Nullable OffsetDateTime resolvedAt) { + this.resolvedAt = JsonNullable.of(resolvedAt); + } + + + public UserAlertMonitorLog link(@javax.annotation.Nullable URI link) { + this.link = JsonNullable.of(link); + return this; + } + + /** + * Get link + * @return link + */ + @javax.annotation.Nullable + @JsonIgnore + public URI getLink() { + return link.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLink_JsonNullable() { + return link; + } + + @JsonProperty(JSON_PROPERTY_LINK) + public void setLink_JsonNullable(JsonNullable link) { + this.link = link; + } + + public void setLink(@javax.annotation.Nullable URI link) { + this.link = JsonNullable.of(link); + } + + + public UserAlertMonitorLog timeWindowStart(@javax.annotation.Nullable OffsetDateTime timeWindowStart) { + this.timeWindowStart = JsonNullable.of(timeWindowStart); + return this; + } + + /** + * Get timeWindowStart + * @return timeWindowStart + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getTimeWindowStart() { + return timeWindowStart.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TIME_WINDOW_START) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTimeWindowStart_JsonNullable() { + return timeWindowStart; + } + + @JsonProperty(JSON_PROPERTY_TIME_WINDOW_START) + public void setTimeWindowStart_JsonNullable(JsonNullable timeWindowStart) { + this.timeWindowStart = timeWindowStart; + } + + public void setTimeWindowStart(@javax.annotation.Nullable OffsetDateTime timeWindowStart) { + this.timeWindowStart = JsonNullable.of(timeWindowStart); + } + + + public UserAlertMonitorLog timeWindowEnd(@javax.annotation.Nullable OffsetDateTime timeWindowEnd) { + this.timeWindowEnd = JsonNullable.of(timeWindowEnd); + return this; + } + + /** + * Get timeWindowEnd + * @return timeWindowEnd + */ + @javax.annotation.Nullable + @JsonIgnore + public OffsetDateTime getTimeWindowEnd() { + return timeWindowEnd.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TIME_WINDOW_END) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTimeWindowEnd_JsonNullable() { + return timeWindowEnd; + } + + @JsonProperty(JSON_PROPERTY_TIME_WINDOW_END) + public void setTimeWindowEnd_JsonNullable(JsonNullable timeWindowEnd) { + this.timeWindowEnd = timeWindowEnd; + } + + public void setTimeWindowEnd(@javax.annotation.Nullable OffsetDateTime timeWindowEnd) { + this.timeWindowEnd = JsonNullable.of(timeWindowEnd); + } + + + /** + * Return true if this UserAlertMonitorLog object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserAlertMonitorLog userAlertMonitorLog = (UserAlertMonitorLog) o; + return Objects.equals(this.id, userAlertMonitorLog.id) && + Objects.equals(this.resolvedBy, userAlertMonitorLog.resolvedBy) && + Objects.equals(this.createdAt, userAlertMonitorLog.createdAt) && + Objects.equals(this.type, userAlertMonitorLog.type) && + Objects.equals(this.message, userAlertMonitorLog.message) && + Objects.equals(this.resolved, userAlertMonitorLog.resolved) && + equalsNullable(this.resolvedAt, userAlertMonitorLog.resolvedAt) && + equalsNullable(this.link, userAlertMonitorLog.link) && + equalsNullable(this.timeWindowStart, userAlertMonitorLog.timeWindowStart) && + equalsNullable(this.timeWindowEnd, userAlertMonitorLog.timeWindowEnd); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, resolvedBy, createdAt, type, message, resolved, hashCodeNullable(resolvedAt), hashCodeNullable(link), hashCodeNullable(timeWindowStart), hashCodeNullable(timeWindowEnd)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserAlertMonitorLog {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" resolvedBy: ").append(toIndentedString(resolvedBy)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" resolved: ").append(toIndentedString(resolved)).append("\n"); + sb.append(" resolvedAt: ").append(toIndentedString(resolvedAt)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" timeWindowStart: ").append(toIndentedString(timeWindowStart)).append("\n"); + sb.append(" timeWindowEnd: ").append(toIndentedString(timeWindowEnd)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `resolved_by` to the URL query string + if (getResolvedBy() != null) { + joiner.add(getResolvedBy().toUrlQueryString(prefix + "resolved_by" + suffix)); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add(String.format("%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `resolved` to the URL query string + if (getResolved() != null) { + joiner.add(String.format("%sresolved%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResolved())))); + } + + // add `resolved_at` to the URL query string + if (getResolvedAt() != null) { + joiner.add(String.format("%sresolved_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResolvedAt())))); + } + + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format("%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); + } + + // add `time_window_start` to the URL query string + if (getTimeWindowStart() != null) { + joiner.add(String.format("%stime_window_start%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeWindowStart())))); + } + + // add `time_window_end` to the URL query string + if (getTimeWindowEnd() != null) { + joiner.add(String.format("%stime_window_end%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeWindowEnd())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOption.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOption.java new file mode 100644 index 0000000..7d877af --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOption.java @@ -0,0 +1,233 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserAlertMonitorMetricOption + */ +@JsonPropertyOrder({ + UserAlertMonitorMetricOption.JSON_PROPERTY_ID, + UserAlertMonitorMetricOption.JSON_PROPERTY_NAME, + UserAlertMonitorMetricOption.JSON_PROPERTY_METRIC_TYPE, + UserAlertMonitorMetricOption.JSON_PROPERTY_OUTPUT_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserAlertMonitorMetricOption { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nullable + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_METRIC_TYPE = "metric_type"; + @javax.annotation.Nullable + private String metricType; + + public static final String JSON_PROPERTY_OUTPUT_TYPE = "output_type"; + @javax.annotation.Nullable + private String outputType; + + public UserAlertMonitorMetricOption() { + } + + @JsonCreator + public UserAlertMonitorMetricOption( + @JsonProperty(JSON_PROPERTY_ID) String id, + @JsonProperty(JSON_PROPERTY_NAME) String name, + @JsonProperty(JSON_PROPERTY_METRIC_TYPE) String metricType, + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) String outputType + ) { + this(); + this.id = id; + this.name = name; + this.metricType = metricType; + this.outputType = outputType; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + + + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Get metricType + * @return metricType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMetricType() { + return metricType; + } + + + + + /** + * Get outputType + * @return outputType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOutputType() { + return outputType; + } + + + + + /** + * Return true if this UserAlertMonitorMetricOption object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserAlertMonitorMetricOption userAlertMonitorMetricOption = (UserAlertMonitorMetricOption) o; + return Objects.equals(this.id, userAlertMonitorMetricOption.id) && + Objects.equals(this.name, userAlertMonitorMetricOption.name) && + Objects.equals(this.metricType, userAlertMonitorMetricOption.metricType) && + Objects.equals(this.outputType, userAlertMonitorMetricOption.outputType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, metricType, outputType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserAlertMonitorMetricOption {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" metricType: ").append(toIndentedString(metricType)).append("\n"); + sb.append(" outputType: ").append(toIndentedString(outputType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `metric_type` to the URL query string + if (getMetricType() != null) { + joiner.add(String.format("%smetric_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMetricType())))); + } + + // add `output_type` to the URL query string + if (getOutputType() != null) { + joiner.add(String.format("%soutput_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOutputType())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOptionsResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOptionsResponse.java new file mode 100644 index 0000000..bd6f6e7 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserAlertMonitorMetricOptionsResponse.java @@ -0,0 +1,193 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.UserAlertMonitorMetricOption; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserAlertMonitorMetricOptionsResponse + */ +@JsonPropertyOrder({ + UserAlertMonitorMetricOptionsResponse.JSON_PROPERTY_STATUS, + UserAlertMonitorMetricOptionsResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserAlertMonitorMetricOptionsResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nullable + private List result = new ArrayList<>(); + + public UserAlertMonitorMetricOptionsResponse() { + } + + @JsonCreator + public UserAlertMonitorMetricOptionsResponse( + @JsonProperty(JSON_PROPERTY_RESULT) List result + ) { + this(); + this.result = result; + } + + public UserAlertMonitorMetricOptionsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + /** + * Get result + * @return result + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResult() { + return result; + } + + + + + /** + * Return true if this UserAlertMonitorMetricOptionsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserAlertMonitorMetricOptionsResponse userAlertMonitorMetricOptionsResponse = (UserAlertMonitorMetricOptionsResponse) o; + return Objects.equals(this.status, userAlertMonitorMetricOptionsResponse.status) && + Objects.equals(this.result, userAlertMonitorMetricOptionsResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserAlertMonitorMetricOptionsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add(getResult().get(i).toUrlQueryString(String.format("%sresult%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserCodeExampleResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserCodeExampleResponse.java new file mode 100644 index 0000000..929a52c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserCodeExampleResponse.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserCodeExampleResponse + */ +@JsonPropertyOrder({ + UserCodeExampleResponse.JSON_PROPERTY_STATUS, + UserCodeExampleResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserCodeExampleResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private String result; + + public UserCodeExampleResponse() { + } + + public UserCodeExampleResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public UserCodeExampleResponse result(@javax.annotation.Nonnull String result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull String result) { + this.result = result; + } + + + /** + * Return true if this UserCodeExampleResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserCodeExampleResponse userCodeExampleResponse = (UserCodeExampleResponse) o; + return Objects.equals(this.status, userCodeExampleResponse.status) && + Objects.equals(this.result, userCodeExampleResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserCodeExampleResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(String.format("%sresult%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResult())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalMutationRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalMutationRequest.java new file mode 100644 index 0000000..8b8b261 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalMutationRequest.java @@ -0,0 +1,538 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserEvalMutationRequest + */ +@JsonPropertyOrder({ + UserEvalMutationRequest.JSON_PROPERTY_NAME, + UserEvalMutationRequest.JSON_PROPERTY_TEMPLATE_ID, + UserEvalMutationRequest.JSON_PROPERTY_CONFIG, + UserEvalMutationRequest.JSON_PROPERTY_KB_ID, + UserEvalMutationRequest.JSON_PROPERTY_ERROR_LOCALIZER, + UserEvalMutationRequest.JSON_PROPERTY_MODEL, + UserEvalMutationRequest.JSON_PROPERTY_EVAL_TYPE, + UserEvalMutationRequest.JSON_PROPERTY_RUN, + UserEvalMutationRequest.JSON_PROPERTY_SAVE_AS_TEMPLATE, + UserEvalMutationRequest.JSON_PROPERTY_EXPERIMENT_ID, + UserEvalMutationRequest.JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserEvalMutationRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nonnull + private String templateId; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nullable + private UUID kbId; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nullable + private String evalType; + + public static final String JSON_PROPERTY_RUN = "run"; + @javax.annotation.Nullable + private Boolean run = false; + + public static final String JSON_PROPERTY_SAVE_AS_TEMPLATE = "save_as_template"; + @javax.annotation.Nullable + private Boolean saveAsTemplate = false; + + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nullable + private UUID experimentId; + + public static final String JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES = "composite_weight_overrides"; + @javax.annotation.Nullable + private Map compositeWeightOverrides = new HashMap<>(); + + public UserEvalMutationRequest() { + } + + public UserEvalMutationRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public UserEvalMutationRequest templateId(@javax.annotation.Nonnull String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(@javax.annotation.Nonnull String templateId) { + this.templateId = templateId; + } + + + public UserEvalMutationRequest config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public UserEvalMutationRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public UserEvalMutationRequest kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + } + + + public UserEvalMutationRequest errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public UserEvalMutationRequest model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public UserEvalMutationRequest evalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + } + + + public UserEvalMutationRequest run(@javax.annotation.Nullable Boolean run) { + this.run = run; + return this; + } + + /** + * Get run + * @return run + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRun() { + return run; + } + + + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRun(@javax.annotation.Nullable Boolean run) { + this.run = run; + } + + + public UserEvalMutationRequest saveAsTemplate(@javax.annotation.Nullable Boolean saveAsTemplate) { + this.saveAsTemplate = saveAsTemplate; + return this; + } + + /** + * Get saveAsTemplate + * @return saveAsTemplate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAVE_AS_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSaveAsTemplate() { + return saveAsTemplate; + } + + + @JsonProperty(JSON_PROPERTY_SAVE_AS_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSaveAsTemplate(@javax.annotation.Nullable Boolean saveAsTemplate) { + this.saveAsTemplate = saveAsTemplate; + } + + + public UserEvalMutationRequest experimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + } + + + public UserEvalMutationRequest compositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + return this; + } + + public UserEvalMutationRequest putCompositeWeightOverridesItem(String key, Object compositeWeightOverridesItem) { + if (this.compositeWeightOverrides == null) { + this.compositeWeightOverrides = new HashMap<>(); + } + this.compositeWeightOverrides.put(key, compositeWeightOverridesItem); + return this; + } + + /** + * Get compositeWeightOverrides + * @return compositeWeightOverrides + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCompositeWeightOverrides() { + return compositeWeightOverrides; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + } + + + /** + * Return true if this UserEvalMutationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserEvalMutationRequest userEvalMutationRequest = (UserEvalMutationRequest) o; + return Objects.equals(this.name, userEvalMutationRequest.name) && + Objects.equals(this.templateId, userEvalMutationRequest.templateId) && + Objects.equals(this.config, userEvalMutationRequest.config) && + Objects.equals(this.kbId, userEvalMutationRequest.kbId) && + Objects.equals(this.errorLocalizer, userEvalMutationRequest.errorLocalizer) && + Objects.equals(this.model, userEvalMutationRequest.model) && + Objects.equals(this.evalType, userEvalMutationRequest.evalType) && + Objects.equals(this.run, userEvalMutationRequest.run) && + Objects.equals(this.saveAsTemplate, userEvalMutationRequest.saveAsTemplate) && + Objects.equals(this.experimentId, userEvalMutationRequest.experimentId) && + Objects.equals(this.compositeWeightOverrides, userEvalMutationRequest.compositeWeightOverrides); + } + + @Override + public int hashCode() { + return Objects.hash(name, templateId, config, kbId, errorLocalizer, model, evalType, run, saveAsTemplate, experimentId, compositeWeightOverrides); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserEvalMutationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" run: ").append(toIndentedString(run)).append("\n"); + sb.append(" saveAsTemplate: ").append(toIndentedString(saveAsTemplate)).append("\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" compositeWeightOverrides: ").append(toIndentedString(compositeWeightOverrides)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `run` to the URL query string + if (getRun() != null) { + joiner.add(String.format("%srun%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRun())))); + } + + // add `save_as_template` to the URL query string + if (getSaveAsTemplate() != null) { + joiner.add(String.format("%ssave_as_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSaveAsTemplate())))); + } + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `composite_weight_overrides` to the URL query string + if (getCompositeWeightOverrides() != null) { + for (String _key : getCompositeWeightOverrides().keySet()) { + joiner.add(String.format("%scomposite_weight_overrides%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCompositeWeightOverrides().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCompositeWeightOverrides().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalUpdateRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalUpdateRequest.java new file mode 100644 index 0000000..ec9df80 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserEvalUpdateRequest.java @@ -0,0 +1,538 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserEvalUpdateRequest + */ +@JsonPropertyOrder({ + UserEvalUpdateRequest.JSON_PROPERTY_NAME, + UserEvalUpdateRequest.JSON_PROPERTY_TEMPLATE_ID, + UserEvalUpdateRequest.JSON_PROPERTY_CONFIG, + UserEvalUpdateRequest.JSON_PROPERTY_KB_ID, + UserEvalUpdateRequest.JSON_PROPERTY_ERROR_LOCALIZER, + UserEvalUpdateRequest.JSON_PROPERTY_MODEL, + UserEvalUpdateRequest.JSON_PROPERTY_EVAL_TYPE, + UserEvalUpdateRequest.JSON_PROPERTY_RUN, + UserEvalUpdateRequest.JSON_PROPERTY_SAVE_AS_TEMPLATE, + UserEvalUpdateRequest.JSON_PROPERTY_EXPERIMENT_ID, + UserEvalUpdateRequest.JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserEvalUpdateRequest { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @javax.annotation.Nullable + private String templateId; + + public static final String JSON_PROPERTY_CONFIG = "config"; + @javax.annotation.Nonnull + private Map config = new HashMap<>(); + + public static final String JSON_PROPERTY_KB_ID = "kb_id"; + @javax.annotation.Nullable + private UUID kbId; + + public static final String JSON_PROPERTY_ERROR_LOCALIZER = "error_localizer"; + @javax.annotation.Nullable + private Boolean errorLocalizer = false; + + public static final String JSON_PROPERTY_MODEL = "model"; + @javax.annotation.Nullable + private String model; + + public static final String JSON_PROPERTY_EVAL_TYPE = "eval_type"; + @javax.annotation.Nullable + private String evalType; + + public static final String JSON_PROPERTY_RUN = "run"; + @javax.annotation.Nullable + private Boolean run = false; + + public static final String JSON_PROPERTY_SAVE_AS_TEMPLATE = "save_as_template"; + @javax.annotation.Nullable + private Boolean saveAsTemplate = false; + + public static final String JSON_PROPERTY_EXPERIMENT_ID = "experiment_id"; + @javax.annotation.Nullable + private UUID experimentId; + + public static final String JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES = "composite_weight_overrides"; + @javax.annotation.Nullable + private Map compositeWeightOverrides = new HashMap<>(); + + public UserEvalUpdateRequest() { + } + + public UserEvalUpdateRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UserEvalUpdateRequest templateId(@javax.annotation.Nullable String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplateId() { + return templateId; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateId(@javax.annotation.Nullable String templateId) { + this.templateId = templateId; + } + + + public UserEvalUpdateRequest config(@javax.annotation.Nonnull Map config) { + this.config = config; + return this; + } + + public UserEvalUpdateRequest putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setConfig(@javax.annotation.Nonnull Map config) { + this.config = config; + } + + + public UserEvalUpdateRequest kbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + return this; + } + + /** + * Get kbId + * @return kbId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getKbId() { + return kbId; + } + + + @JsonProperty(JSON_PROPERTY_KB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKbId(@javax.annotation.Nullable UUID kbId) { + this.kbId = kbId; + } + + + public UserEvalUpdateRequest errorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + return this; + } + + /** + * Get errorLocalizer + * @return errorLocalizer + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorLocalizer() { + return errorLocalizer; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_LOCALIZER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorLocalizer(@javax.annotation.Nullable Boolean errorLocalizer) { + this.errorLocalizer = errorLocalizer; + } + + + public UserEvalUpdateRequest model(@javax.annotation.Nullable String model) { + this.model = model; + return this; + } + + /** + * Get model + * @return model + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(@javax.annotation.Nullable String model) { + this.model = model; + } + + + public UserEvalUpdateRequest evalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + return this; + } + + /** + * Get evalType + * @return evalType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvalType() { + return evalType; + } + + + @JsonProperty(JSON_PROPERTY_EVAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvalType(@javax.annotation.Nullable String evalType) { + this.evalType = evalType; + } + + + public UserEvalUpdateRequest run(@javax.annotation.Nullable Boolean run) { + this.run = run; + return this; + } + + /** + * Get run + * @return run + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRun() { + return run; + } + + + @JsonProperty(JSON_PROPERTY_RUN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRun(@javax.annotation.Nullable Boolean run) { + this.run = run; + } + + + public UserEvalUpdateRequest saveAsTemplate(@javax.annotation.Nullable Boolean saveAsTemplate) { + this.saveAsTemplate = saveAsTemplate; + return this; + } + + /** + * Get saveAsTemplate + * @return saveAsTemplate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAVE_AS_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSaveAsTemplate() { + return saveAsTemplate; + } + + + @JsonProperty(JSON_PROPERTY_SAVE_AS_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSaveAsTemplate(@javax.annotation.Nullable Boolean saveAsTemplate) { + this.saveAsTemplate = saveAsTemplate; + } + + + public UserEvalUpdateRequest experimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + return this; + } + + /** + * Get experimentId + * @return experimentId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getExperimentId() { + return experimentId; + } + + + @JsonProperty(JSON_PROPERTY_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExperimentId(@javax.annotation.Nullable UUID experimentId) { + this.experimentId = experimentId; + } + + + public UserEvalUpdateRequest compositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + return this; + } + + public UserEvalUpdateRequest putCompositeWeightOverridesItem(String key, Object compositeWeightOverridesItem) { + if (this.compositeWeightOverrides == null) { + this.compositeWeightOverrides = new HashMap<>(); + } + this.compositeWeightOverrides.put(key, compositeWeightOverridesItem); + return this; + } + + /** + * Get compositeWeightOverrides + * @return compositeWeightOverrides + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getCompositeWeightOverrides() { + return compositeWeightOverrides; + } + + + @JsonProperty(JSON_PROPERTY_COMPOSITE_WEIGHT_OVERRIDES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setCompositeWeightOverrides(@javax.annotation.Nullable Map compositeWeightOverrides) { + this.compositeWeightOverrides = compositeWeightOverrides; + } + + + /** + * Return true if this UserEvalUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserEvalUpdateRequest userEvalUpdateRequest = (UserEvalUpdateRequest) o; + return Objects.equals(this.name, userEvalUpdateRequest.name) && + Objects.equals(this.templateId, userEvalUpdateRequest.templateId) && + Objects.equals(this.config, userEvalUpdateRequest.config) && + Objects.equals(this.kbId, userEvalUpdateRequest.kbId) && + Objects.equals(this.errorLocalizer, userEvalUpdateRequest.errorLocalizer) && + Objects.equals(this.model, userEvalUpdateRequest.model) && + Objects.equals(this.evalType, userEvalUpdateRequest.evalType) && + Objects.equals(this.run, userEvalUpdateRequest.run) && + Objects.equals(this.saveAsTemplate, userEvalUpdateRequest.saveAsTemplate) && + Objects.equals(this.experimentId, userEvalUpdateRequest.experimentId) && + Objects.equals(this.compositeWeightOverrides, userEvalUpdateRequest.compositeWeightOverrides); + } + + @Override + public int hashCode() { + return Objects.hash(name, templateId, config, kbId, errorLocalizer, model, evalType, run, saveAsTemplate, experimentId, compositeWeightOverrides); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserEvalUpdateRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" kbId: ").append(toIndentedString(kbId)).append("\n"); + sb.append(" errorLocalizer: ").append(toIndentedString(errorLocalizer)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" evalType: ").append(toIndentedString(evalType)).append("\n"); + sb.append(" run: ").append(toIndentedString(run)).append("\n"); + sb.append(" saveAsTemplate: ").append(toIndentedString(saveAsTemplate)).append("\n"); + sb.append(" experimentId: ").append(toIndentedString(experimentId)).append("\n"); + sb.append(" compositeWeightOverrides: ").append(toIndentedString(compositeWeightOverrides)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `template_id` to the URL query string + if (getTemplateId() != null) { + joiner.add(String.format("%stemplate_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTemplateId())))); + } + + // add `config` to the URL query string + if (getConfig() != null) { + for (String _key : getConfig().keySet()) { + joiner.add(String.format("%sconfig%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getConfig().get(_key))))); + } + } + + // add `kb_id` to the URL query string + if (getKbId() != null) { + joiner.add(String.format("%skb_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKbId())))); + } + + // add `error_localizer` to the URL query string + if (getErrorLocalizer() != null) { + joiner.add(String.format("%serror_localizer%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getErrorLocalizer())))); + } + + // add `model` to the URL query string + if (getModel() != null) { + joiner.add(String.format("%smodel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModel())))); + } + + // add `eval_type` to the URL query string + if (getEvalType() != null) { + joiner.add(String.format("%seval_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEvalType())))); + } + + // add `run` to the URL query string + if (getRun() != null) { + joiner.add(String.format("%srun%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRun())))); + } + + // add `save_as_template` to the URL query string + if (getSaveAsTemplate() != null) { + joiner.add(String.format("%ssave_as_template%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSaveAsTemplate())))); + } + + // add `experiment_id` to the URL query string + if (getExperimentId() != null) { + joiner.add(String.format("%sexperiment_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExperimentId())))); + } + + // add `composite_weight_overrides` to the URL query string + if (getCompositeWeightOverrides() != null) { + for (String _key : getCompositeWeightOverrides().keySet()) { + joiner.add(String.format("%scomposite_weight_overrides%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getCompositeWeightOverrides().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCompositeWeightOverrides().get(_key))))); + } + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoOrganization.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoOrganization.java new file mode 100644 index 0000000..beb3f20 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoOrganization.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserInfoOrganization + */ +@JsonPropertyOrder({ + UserInfoOrganization.JSON_PROPERTY_ID, + UserInfoOrganization.JSON_PROPERTY_NAME, + UserInfoOrganization.JSON_PROPERTY_DISPLAY_NAME, + UserInfoOrganization.JSON_PROPERTY_WS_ENABLED +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserInfoOrganization { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + @javax.annotation.Nonnull + private String displayName; + + public static final String JSON_PROPERTY_WS_ENABLED = "ws_enabled"; + @javax.annotation.Nullable + private Boolean wsEnabled; + + public UserInfoOrganization() { + } + + public UserInfoOrganization id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public UserInfoOrganization name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public UserInfoOrganization displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public UserInfoOrganization wsEnabled(@javax.annotation.Nullable Boolean wsEnabled) { + this.wsEnabled = wsEnabled; + return this; + } + + /** + * Get wsEnabled + * @return wsEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getWsEnabled() { + return wsEnabled; + } + + + @JsonProperty(JSON_PROPERTY_WS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWsEnabled(@javax.annotation.Nullable Boolean wsEnabled) { + this.wsEnabled = wsEnabled; + } + + + /** + * Return true if this UserInfoOrganization object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserInfoOrganization userInfoOrganization = (UserInfoOrganization) o; + return Objects.equals(this.id, userInfoOrganization.id) && + Objects.equals(this.name, userInfoOrganization.name) && + Objects.equals(this.displayName, userInfoOrganization.displayName) && + Objects.equals(this.wsEnabled, userInfoOrganization.wsEnabled); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, displayName, wsEnabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserInfoOrganization {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" wsEnabled: ").append(toIndentedString(wsEnabled)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `display_name` to the URL query string + if (getDisplayName() != null) { + joiner.add(String.format("%sdisplay_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDisplayName())))); + } + + // add `ws_enabled` to the URL query string + if (getWsEnabled() != null) { + joiner.add(String.format("%sws_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsEnabled())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoResponse.java new file mode 100644 index 0000000..81e319e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoResponse.java @@ -0,0 +1,1033 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.UserInfoOrganization; +import com.futureagi.sdk.model.UserInfoTwoFactorMethods; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserInfoResponse + */ +@JsonPropertyOrder({ + UserInfoResponse.JSON_PROPERTY_ID, + UserInfoResponse.JSON_PROPERTY_EMAIL, + UserInfoResponse.JSON_PROPERTY_NAME, + UserInfoResponse.JSON_PROPERTY_ORGANIZATION_ROLE, + UserInfoResponse.JSON_PROPERTY_ORGANIZATION, + UserInfoResponse.JSON_PROPERTY_CREATED_AT, + UserInfoResponse.JSON_PROPERTY_STATUS, + UserInfoResponse.JSON_PROPERTY_ROLE, + UserInfoResponse.JSON_PROPERTY_GOALS, + UserInfoResponse.JSON_PROPERTY_REMEMBER_ME, + UserInfoResponse.JSON_PROPERTY_GET_STARTED_COMPLETED, + UserInfoResponse.JSON_PROPERTY_ONBOARDING_COMPLETED, + UserInfoResponse.JSON_PROPERTY_WS_ENABLED, + UserInfoResponse.JSON_PROPERTY_REQUIRES_ORG_SETUP, + UserInfoResponse.JSON_PROPERTY_DEFAULT_WORKSPACE_ID, + UserInfoResponse.JSON_PROPERTY_DEFAULT_WORKSPACE_NAME, + UserInfoResponse.JSON_PROPERTY_DEFAULT_WORKSPACE_DISPLAY_NAME, + UserInfoResponse.JSON_PROPERTY_DEFAULT_WORKSPACE_ROLE, + UserInfoResponse.JSON_PROPERTY_ORG_LEVEL, + UserInfoResponse.JSON_PROPERTY_WS_LEVEL, + UserInfoResponse.JSON_PROPERTY_EFFECTIVE_LEVEL, + UserInfoResponse.JSON_PROPERTY_HAS2FA_ENABLED, + UserInfoResponse.JSON_PROPERTY_TWO_FACTOR_METHODS, + UserInfoResponse.JSON_PROPERTY_ORG2FA_REQUIRED, + UserInfoResponse.JSON_PROPERTY_ORG2FA_GRACE_ENDS_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserInfoResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_EMAIL = "email"; + @javax.annotation.Nonnull + private String email; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_ORGANIZATION_ROLE = "organization_role"; + @javax.annotation.Nullable + private String organizationRole; + + public static final String JSON_PROPERTY_ORGANIZATION = "organization"; + @javax.annotation.Nonnull + private UserInfoOrganization organization; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private String status; + + public static final String JSON_PROPERTY_ROLE = "role"; + @javax.annotation.Nullable + private String role; + + public static final String JSON_PROPERTY_GOALS = "goals"; + @javax.annotation.Nullable + private List goals = new ArrayList<>(); + + public static final String JSON_PROPERTY_REMEMBER_ME = "remember_me"; + @javax.annotation.Nonnull + private Boolean rememberMe; + + public static final String JSON_PROPERTY_GET_STARTED_COMPLETED = "get_started_completed"; + @javax.annotation.Nonnull + private Boolean getStartedCompleted; + + public static final String JSON_PROPERTY_ONBOARDING_COMPLETED = "onboarding_completed"; + @javax.annotation.Nonnull + private Boolean onboardingCompleted; + + public static final String JSON_PROPERTY_WS_ENABLED = "ws_enabled"; + @javax.annotation.Nonnull + private Boolean wsEnabled; + + public static final String JSON_PROPERTY_REQUIRES_ORG_SETUP = "requires_org_setup"; + @javax.annotation.Nullable + private Boolean requiresOrgSetup; + + public static final String JSON_PROPERTY_DEFAULT_WORKSPACE_ID = "default_workspace_id"; + @javax.annotation.Nullable + private UUID defaultWorkspaceId; + + public static final String JSON_PROPERTY_DEFAULT_WORKSPACE_NAME = "default_workspace_name"; + @javax.annotation.Nullable + private String defaultWorkspaceName; + + public static final String JSON_PROPERTY_DEFAULT_WORKSPACE_DISPLAY_NAME = "default_workspace_display_name"; + @javax.annotation.Nullable + private String defaultWorkspaceDisplayName; + + public static final String JSON_PROPERTY_DEFAULT_WORKSPACE_ROLE = "default_workspace_role"; + @javax.annotation.Nullable + private String defaultWorkspaceRole; + + public static final String JSON_PROPERTY_ORG_LEVEL = "org_level"; + @javax.annotation.Nullable + private Integer orgLevel; + + public static final String JSON_PROPERTY_WS_LEVEL = "ws_level"; + @javax.annotation.Nullable + private Integer wsLevel; + + public static final String JSON_PROPERTY_EFFECTIVE_LEVEL = "effective_level"; + @javax.annotation.Nullable + private Integer effectiveLevel; + + public static final String JSON_PROPERTY_HAS2FA_ENABLED = "has_2fa_enabled"; + @javax.annotation.Nullable + private Boolean has2faEnabled; + + public static final String JSON_PROPERTY_TWO_FACTOR_METHODS = "two_factor_methods"; + @javax.annotation.Nullable + private UserInfoTwoFactorMethods twoFactorMethods; + + public static final String JSON_PROPERTY_ORG2FA_REQUIRED = "org_2fa_required"; + @javax.annotation.Nullable + private Boolean org2faRequired; + + public static final String JSON_PROPERTY_ORG2FA_GRACE_ENDS_AT = "org_2fa_grace_ends_at"; + @javax.annotation.Nullable + private OffsetDateTime org2faGraceEndsAt; + + public UserInfoResponse() { + } + + public UserInfoResponse id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public UserInfoResponse email(@javax.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; + } + + + public UserInfoResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UserInfoResponse organizationRole(@javax.annotation.Nullable String organizationRole) { + this.organizationRole = organizationRole; + return this; + } + + /** + * Get organizationRole + * @return organizationRole + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOrganizationRole() { + return organizationRole; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrganizationRole(@javax.annotation.Nullable String organizationRole) { + this.organizationRole = organizationRole; + } + + + public UserInfoResponse organization(@javax.annotation.Nonnull UserInfoOrganization organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UserInfoOrganization getOrganization() { + return organization; + } + + + @JsonProperty(JSON_PROPERTY_ORGANIZATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrganization(@javax.annotation.Nonnull UserInfoOrganization organization) { + this.organization = organization; + } + + + public UserInfoResponse createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public UserInfoResponse status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + public UserInfoResponse role(@javax.annotation.Nullable String role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRole() { + return role; + } + + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRole(@javax.annotation.Nullable String role) { + this.role = role; + } + + + public UserInfoResponse goals(@javax.annotation.Nullable List goals) { + this.goals = goals; + return this; + } + + public UserInfoResponse addGoalsItem(String goalsItem) { + if (this.goals == null) { + this.goals = new ArrayList<>(); + } + this.goals.add(goalsItem); + return this; + } + + /** + * Get goals + * @return goals + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GOALS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGoals() { + return goals; + } + + + @JsonProperty(JSON_PROPERTY_GOALS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGoals(@javax.annotation.Nullable List goals) { + this.goals = goals; + } + + + public UserInfoResponse rememberMe(@javax.annotation.Nonnull Boolean rememberMe) { + this.rememberMe = rememberMe; + return this; + } + + /** + * Get rememberMe + * @return rememberMe + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REMEMBER_ME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRememberMe() { + return rememberMe; + } + + + @JsonProperty(JSON_PROPERTY_REMEMBER_ME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRememberMe(@javax.annotation.Nonnull Boolean rememberMe) { + this.rememberMe = rememberMe; + } + + + public UserInfoResponse getStartedCompleted(@javax.annotation.Nonnull Boolean getStartedCompleted) { + this.getStartedCompleted = getStartedCompleted; + return this; + } + + /** + * Get getStartedCompleted + * @return getStartedCompleted + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GET_STARTED_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getGetStartedCompleted() { + return getStartedCompleted; + } + + + @JsonProperty(JSON_PROPERTY_GET_STARTED_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGetStartedCompleted(@javax.annotation.Nonnull Boolean getStartedCompleted) { + this.getStartedCompleted = getStartedCompleted; + } + + + public UserInfoResponse onboardingCompleted(@javax.annotation.Nonnull Boolean onboardingCompleted) { + this.onboardingCompleted = onboardingCompleted; + return this; + } + + /** + * Get onboardingCompleted + * @return onboardingCompleted + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ONBOARDING_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getOnboardingCompleted() { + return onboardingCompleted; + } + + + @JsonProperty(JSON_PROPERTY_ONBOARDING_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOnboardingCompleted(@javax.annotation.Nonnull Boolean onboardingCompleted) { + this.onboardingCompleted = onboardingCompleted; + } + + + public UserInfoResponse wsEnabled(@javax.annotation.Nonnull Boolean wsEnabled) { + this.wsEnabled = wsEnabled; + return this; + } + + /** + * Get wsEnabled + * @return wsEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getWsEnabled() { + return wsEnabled; + } + + + @JsonProperty(JSON_PROPERTY_WS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWsEnabled(@javax.annotation.Nonnull Boolean wsEnabled) { + this.wsEnabled = wsEnabled; + } + + + public UserInfoResponse requiresOrgSetup(@javax.annotation.Nullable Boolean requiresOrgSetup) { + this.requiresOrgSetup = requiresOrgSetup; + return this; + } + + /** + * Get requiresOrgSetup + * @return requiresOrgSetup + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRES_ORG_SETUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequiresOrgSetup() { + return requiresOrgSetup; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRES_ORG_SETUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiresOrgSetup(@javax.annotation.Nullable Boolean requiresOrgSetup) { + this.requiresOrgSetup = requiresOrgSetup; + } + + + public UserInfoResponse defaultWorkspaceId(@javax.annotation.Nullable UUID defaultWorkspaceId) { + this.defaultWorkspaceId = defaultWorkspaceId; + return this; + } + + /** + * Get defaultWorkspaceId + * @return defaultWorkspaceId + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDefaultWorkspaceId() { + return defaultWorkspaceId; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDefaultWorkspaceId(@javax.annotation.Nullable UUID defaultWorkspaceId) { + this.defaultWorkspaceId = defaultWorkspaceId; + } + + + public UserInfoResponse defaultWorkspaceName(@javax.annotation.Nullable String defaultWorkspaceName) { + this.defaultWorkspaceName = defaultWorkspaceName; + return this; + } + + /** + * Get defaultWorkspaceName + * @return defaultWorkspaceName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDefaultWorkspaceName() { + return defaultWorkspaceName; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDefaultWorkspaceName(@javax.annotation.Nullable String defaultWorkspaceName) { + this.defaultWorkspaceName = defaultWorkspaceName; + } + + + public UserInfoResponse defaultWorkspaceDisplayName(@javax.annotation.Nullable String defaultWorkspaceDisplayName) { + this.defaultWorkspaceDisplayName = defaultWorkspaceDisplayName; + return this; + } + + /** + * Get defaultWorkspaceDisplayName + * @return defaultWorkspaceDisplayName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDefaultWorkspaceDisplayName() { + return defaultWorkspaceDisplayName; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDefaultWorkspaceDisplayName(@javax.annotation.Nullable String defaultWorkspaceDisplayName) { + this.defaultWorkspaceDisplayName = defaultWorkspaceDisplayName; + } + + + public UserInfoResponse defaultWorkspaceRole(@javax.annotation.Nullable String defaultWorkspaceRole) { + this.defaultWorkspaceRole = defaultWorkspaceRole; + return this; + } + + /** + * Get defaultWorkspaceRole + * @return defaultWorkspaceRole + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDefaultWorkspaceRole() { + return defaultWorkspaceRole; + } + + + @JsonProperty(JSON_PROPERTY_DEFAULT_WORKSPACE_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDefaultWorkspaceRole(@javax.annotation.Nullable String defaultWorkspaceRole) { + this.defaultWorkspaceRole = defaultWorkspaceRole; + } + + + public UserInfoResponse orgLevel(@javax.annotation.Nullable Integer orgLevel) { + this.orgLevel = orgLevel; + return this; + } + + /** + * Get orgLevel + * @return orgLevel + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getOrgLevel() { + return orgLevel; + } + + + @JsonProperty(JSON_PROPERTY_ORG_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOrgLevel(@javax.annotation.Nullable Integer orgLevel) { + this.orgLevel = orgLevel; + } + + + public UserInfoResponse wsLevel(@javax.annotation.Nullable Integer wsLevel) { + this.wsLevel = wsLevel; + return this; + } + + /** + * Get wsLevel + * @return wsLevel + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getWsLevel() { + return wsLevel; + } + + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWsLevel(@javax.annotation.Nullable Integer wsLevel) { + this.wsLevel = wsLevel; + } + + + public UserInfoResponse effectiveLevel(@javax.annotation.Nullable Integer effectiveLevel) { + this.effectiveLevel = effectiveLevel; + return this; + } + + /** + * Get effectiveLevel + * @return effectiveLevel + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EFFECTIVE_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getEffectiveLevel() { + return effectiveLevel; + } + + + @JsonProperty(JSON_PROPERTY_EFFECTIVE_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEffectiveLevel(@javax.annotation.Nullable Integer effectiveLevel) { + this.effectiveLevel = effectiveLevel; + } + + + public UserInfoResponse has2faEnabled(@javax.annotation.Nullable Boolean has2faEnabled) { + this.has2faEnabled = has2faEnabled; + return this; + } + + /** + * Get has2faEnabled + * @return has2faEnabled + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS2FA_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHas2faEnabled() { + return has2faEnabled; + } + + + @JsonProperty(JSON_PROPERTY_HAS2FA_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHas2faEnabled(@javax.annotation.Nullable Boolean has2faEnabled) { + this.has2faEnabled = has2faEnabled; + } + + + public UserInfoResponse twoFactorMethods(@javax.annotation.Nullable UserInfoTwoFactorMethods twoFactorMethods) { + this.twoFactorMethods = twoFactorMethods; + return this; + } + + /** + * Get twoFactorMethods + * @return twoFactorMethods + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWO_FACTOR_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UserInfoTwoFactorMethods getTwoFactorMethods() { + return twoFactorMethods; + } + + + @JsonProperty(JSON_PROPERTY_TWO_FACTOR_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTwoFactorMethods(@javax.annotation.Nullable UserInfoTwoFactorMethods twoFactorMethods) { + this.twoFactorMethods = twoFactorMethods; + } + + + public UserInfoResponse org2faRequired(@javax.annotation.Nullable Boolean org2faRequired) { + this.org2faRequired = org2faRequired; + return this; + } + + /** + * Get org2faRequired + * @return org2faRequired + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG2FA_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOrg2faRequired() { + return org2faRequired; + } + + + @JsonProperty(JSON_PROPERTY_ORG2FA_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg2faRequired(@javax.annotation.Nullable Boolean org2faRequired) { + this.org2faRequired = org2faRequired; + } + + + public UserInfoResponse org2faGraceEndsAt(@javax.annotation.Nullable OffsetDateTime org2faGraceEndsAt) { + this.org2faGraceEndsAt = org2faGraceEndsAt; + return this; + } + + /** + * Get org2faGraceEndsAt + * @return org2faGraceEndsAt + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG2FA_GRACE_ENDS_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getOrg2faGraceEndsAt() { + return org2faGraceEndsAt; + } + + + @JsonProperty(JSON_PROPERTY_ORG2FA_GRACE_ENDS_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrg2faGraceEndsAt(@javax.annotation.Nullable OffsetDateTime org2faGraceEndsAt) { + this.org2faGraceEndsAt = org2faGraceEndsAt; + } + + + /** + * Return true if this UserInfoResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserInfoResponse userInfoResponse = (UserInfoResponse) o; + return Objects.equals(this.id, userInfoResponse.id) && + Objects.equals(this.email, userInfoResponse.email) && + Objects.equals(this.name, userInfoResponse.name) && + Objects.equals(this.organizationRole, userInfoResponse.organizationRole) && + Objects.equals(this.organization, userInfoResponse.organization) && + Objects.equals(this.createdAt, userInfoResponse.createdAt) && + Objects.equals(this.status, userInfoResponse.status) && + Objects.equals(this.role, userInfoResponse.role) && + Objects.equals(this.goals, userInfoResponse.goals) && + Objects.equals(this.rememberMe, userInfoResponse.rememberMe) && + Objects.equals(this.getStartedCompleted, userInfoResponse.getStartedCompleted) && + Objects.equals(this.onboardingCompleted, userInfoResponse.onboardingCompleted) && + Objects.equals(this.wsEnabled, userInfoResponse.wsEnabled) && + Objects.equals(this.requiresOrgSetup, userInfoResponse.requiresOrgSetup) && + Objects.equals(this.defaultWorkspaceId, userInfoResponse.defaultWorkspaceId) && + Objects.equals(this.defaultWorkspaceName, userInfoResponse.defaultWorkspaceName) && + Objects.equals(this.defaultWorkspaceDisplayName, userInfoResponse.defaultWorkspaceDisplayName) && + Objects.equals(this.defaultWorkspaceRole, userInfoResponse.defaultWorkspaceRole) && + Objects.equals(this.orgLevel, userInfoResponse.orgLevel) && + Objects.equals(this.wsLevel, userInfoResponse.wsLevel) && + Objects.equals(this.effectiveLevel, userInfoResponse.effectiveLevel) && + Objects.equals(this.has2faEnabled, userInfoResponse.has2faEnabled) && + Objects.equals(this.twoFactorMethods, userInfoResponse.twoFactorMethods) && + Objects.equals(this.org2faRequired, userInfoResponse.org2faRequired) && + Objects.equals(this.org2faGraceEndsAt, userInfoResponse.org2faGraceEndsAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, email, name, organizationRole, organization, createdAt, status, role, goals, rememberMe, getStartedCompleted, onboardingCompleted, wsEnabled, requiresOrgSetup, defaultWorkspaceId, defaultWorkspaceName, defaultWorkspaceDisplayName, defaultWorkspaceRole, orgLevel, wsLevel, effectiveLevel, has2faEnabled, twoFactorMethods, org2faRequired, org2faGraceEndsAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserInfoResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" organizationRole: ").append(toIndentedString(organizationRole)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" goals: ").append(toIndentedString(goals)).append("\n"); + sb.append(" rememberMe: ").append(toIndentedString(rememberMe)).append("\n"); + sb.append(" getStartedCompleted: ").append(toIndentedString(getStartedCompleted)).append("\n"); + sb.append(" onboardingCompleted: ").append(toIndentedString(onboardingCompleted)).append("\n"); + sb.append(" wsEnabled: ").append(toIndentedString(wsEnabled)).append("\n"); + sb.append(" requiresOrgSetup: ").append(toIndentedString(requiresOrgSetup)).append("\n"); + sb.append(" defaultWorkspaceId: ").append(toIndentedString(defaultWorkspaceId)).append("\n"); + sb.append(" defaultWorkspaceName: ").append(toIndentedString(defaultWorkspaceName)).append("\n"); + sb.append(" defaultWorkspaceDisplayName: ").append(toIndentedString(defaultWorkspaceDisplayName)).append("\n"); + sb.append(" defaultWorkspaceRole: ").append(toIndentedString(defaultWorkspaceRole)).append("\n"); + sb.append(" orgLevel: ").append(toIndentedString(orgLevel)).append("\n"); + sb.append(" wsLevel: ").append(toIndentedString(wsLevel)).append("\n"); + sb.append(" effectiveLevel: ").append(toIndentedString(effectiveLevel)).append("\n"); + sb.append(" has2faEnabled: ").append(toIndentedString(has2faEnabled)).append("\n"); + sb.append(" twoFactorMethods: ").append(toIndentedString(twoFactorMethods)).append("\n"); + sb.append(" org2faRequired: ").append(toIndentedString(org2faRequired)).append("\n"); + sb.append(" org2faGraceEndsAt: ").append(toIndentedString(org2faGraceEndsAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add(String.format("%semail%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `organization_role` to the URL query string + if (getOrganizationRole() != null) { + joiner.add(String.format("%sorganization_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrganizationRole())))); + } + + // add `organization` to the URL query string + if (getOrganization() != null) { + joiner.add(getOrganization().toUrlQueryString(prefix + "organization" + suffix)); + } + + // add `created_at` to the URL query string + if (getCreatedAt() != null) { + joiner.add(String.format("%screated_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `role` to the URL query string + if (getRole() != null) { + joiner.add(String.format("%srole%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRole())))); + } + + // add `goals` to the URL query string + if (getGoals() != null) { + for (int i = 0; i < getGoals().size(); i++) { + joiner.add(String.format("%sgoals%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getGoals().get(i))))); + } + } + + // add `remember_me` to the URL query string + if (getRememberMe() != null) { + joiner.add(String.format("%sremember_me%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRememberMe())))); + } + + // add `get_started_completed` to the URL query string + if (getGetStartedCompleted() != null) { + joiner.add(String.format("%sget_started_completed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGetStartedCompleted())))); + } + + // add `onboarding_completed` to the URL query string + if (getOnboardingCompleted() != null) { + joiner.add(String.format("%sonboarding_completed%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOnboardingCompleted())))); + } + + // add `ws_enabled` to the URL query string + if (getWsEnabled() != null) { + joiner.add(String.format("%sws_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsEnabled())))); + } + + // add `requires_org_setup` to the URL query string + if (getRequiresOrgSetup() != null) { + joiner.add(String.format("%srequires_org_setup%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRequiresOrgSetup())))); + } + + // add `default_workspace_id` to the URL query string + if (getDefaultWorkspaceId() != null) { + joiner.add(String.format("%sdefault_workspace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDefaultWorkspaceId())))); + } + + // add `default_workspace_name` to the URL query string + if (getDefaultWorkspaceName() != null) { + joiner.add(String.format("%sdefault_workspace_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDefaultWorkspaceName())))); + } + + // add `default_workspace_display_name` to the URL query string + if (getDefaultWorkspaceDisplayName() != null) { + joiner.add(String.format("%sdefault_workspace_display_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDefaultWorkspaceDisplayName())))); + } + + // add `default_workspace_role` to the URL query string + if (getDefaultWorkspaceRole() != null) { + joiner.add(String.format("%sdefault_workspace_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDefaultWorkspaceRole())))); + } + + // add `org_level` to the URL query string + if (getOrgLevel() != null) { + joiner.add(String.format("%sorg_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrgLevel())))); + } + + // add `ws_level` to the URL query string + if (getWsLevel() != null) { + joiner.add(String.format("%sws_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsLevel())))); + } + + // add `effective_level` to the URL query string + if (getEffectiveLevel() != null) { + joiner.add(String.format("%seffective_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEffectiveLevel())))); + } + + // add `has_2fa_enabled` to the URL query string + if (getHas2faEnabled() != null) { + joiner.add(String.format("%shas_2fa_enabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHas2faEnabled())))); + } + + // add `two_factor_methods` to the URL query string + if (getTwoFactorMethods() != null) { + joiner.add(getTwoFactorMethods().toUrlQueryString(prefix + "two_factor_methods" + suffix)); + } + + // add `org_2fa_required` to the URL query string + if (getOrg2faRequired() != null) { + joiner.add(String.format("%sorg_2fa_required%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrg2faRequired())))); + } + + // add `org_2fa_grace_ends_at` to the URL query string + if (getOrg2faGraceEndsAt() != null) { + joiner.add(String.format("%sorg_2fa_grace_ends_at%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOrg2faGraceEndsAt())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoTwoFactorMethods.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoTwoFactorMethods.java new file mode 100644 index 0000000..e807965 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UserInfoTwoFactorMethods.java @@ -0,0 +1,187 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UserInfoTwoFactorMethods + */ +@JsonPropertyOrder({ + UserInfoTwoFactorMethods.JSON_PROPERTY_TOTP, + UserInfoTwoFactorMethods.JSON_PROPERTY_PASSKEY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UserInfoTwoFactorMethods { + public static final String JSON_PROPERTY_TOTP = "totp"; + @javax.annotation.Nonnull + private Boolean totp; + + public static final String JSON_PROPERTY_PASSKEY = "passkey"; + @javax.annotation.Nonnull + private Boolean passkey; + + public UserInfoTwoFactorMethods() { + } + + public UserInfoTwoFactorMethods totp(@javax.annotation.Nonnull Boolean totp) { + this.totp = totp; + return this; + } + + /** + * Get totp + * @return totp + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getTotp() { + return totp; + } + + + @JsonProperty(JSON_PROPERTY_TOTP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotp(@javax.annotation.Nonnull Boolean totp) { + this.totp = totp; + } + + + public UserInfoTwoFactorMethods passkey(@javax.annotation.Nonnull Boolean passkey) { + this.passkey = passkey; + return this; + } + + /** + * Get passkey + * @return passkey + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PASSKEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getPasskey() { + return passkey; + } + + + @JsonProperty(JSON_PROPERTY_PASSKEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPasskey(@javax.annotation.Nonnull Boolean passkey) { + this.passkey = passkey; + } + + + /** + * Return true if this UserInfoTwoFactorMethods object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserInfoTwoFactorMethods userInfoTwoFactorMethods = (UserInfoTwoFactorMethods) o; + return Objects.equals(this.totp, userInfoTwoFactorMethods.totp) && + Objects.equals(this.passkey, userInfoTwoFactorMethods.passkey); + } + + @Override + public int hashCode() { + return Objects.hash(totp, passkey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserInfoTwoFactorMethods {\n"); + sb.append(" totp: ").append(toIndentedString(totp)).append("\n"); + sb.append(" passkey: ").append(toIndentedString(passkey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `totp` to the URL query string + if (getTotp() != null) { + joiner.add(String.format("%stotp%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotp())))); + } + + // add `passkey` to the URL query string + if (getPasskey() != null) { + joiner.add(String.format("%spasskey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPasskey())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResponse.java new file mode 100644 index 0000000..b0ce5bb --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.UsersResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UsersResponse + */ +@JsonPropertyOrder({ + UsersResponse.JSON_PROPERTY_STATUS, + UsersResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UsersResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nullable + private Boolean status = true; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private UsersResult result; + + public UsersResponse() { + } + + public UsersResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public UsersResponse result(@javax.annotation.Nonnull UsersResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UsersResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull UsersResult result) { + this.result = result; + } + + + /** + * Return true if this UsersResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UsersResponse usersResponse = (UsersResponse) o; + return Objects.equals(this.status, usersResponse.status) && + Objects.equals(this.result, usersResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UsersResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResult.java new file mode 100644 index 0000000..849b820 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/UsersResult.java @@ -0,0 +1,238 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * UsersResult + */ +@JsonPropertyOrder({ + UsersResult.JSON_PROPERTY_TABLE, + UsersResult.JSON_PROPERTY_TOTAL_COUNT, + UsersResult.JSON_PROPERTY_TOTAL_PAGES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class UsersResult { + public static final String JSON_PROPERTY_TABLE = "table"; + @javax.annotation.Nonnull + private List> table = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; + @javax.annotation.Nonnull + private Integer totalCount; + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nonnull + private Integer totalPages; + + public UsersResult() { + } + + public UsersResult table(@javax.annotation.Nonnull List> table) { + this.table = table; + return this; + } + + public UsersResult addTableItem(Map tableItem) { + if (this.table == null) { + this.table = new ArrayList<>(); + } + this.table.add(tableItem); + return this; + } + + /** + * Get table + * @return table + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getTable() { + return table; + } + + + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTable(@javax.annotation.Nonnull List> table) { + this.table = table; + } + + + public UsersResult totalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * @return totalCount + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalCount() { + return totalCount; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + } + + + public UsersResult totalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + } + + + /** + * Return true if this UsersResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UsersResult usersResult = (UsersResult) o; + return Objects.equals(this.table, usersResult.table) && + Objects.equals(this.totalCount, usersResult.totalCount) && + Objects.equals(this.totalPages, usersResult.totalPages); + } + + @Override + public int hashCode() { + return Objects.hash(table, totalCount, totalPages); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UsersResult {\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `table` to the URL query string + if (getTable() != null) { + for (int i = 0; i < getTable().size(); i++) { + joiner.add(String.format("%stable%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTable().get(i))))); + } + } + + // add `total_count` to the URL query string + if (getTotalCount() != null) { + joiner.add(String.format("%stotal_count%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalCount())))); + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/VectorDBColumnRequest.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/VectorDBColumnRequest.java new file mode 100644 index 0000000..556525b --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/VectorDBColumnRequest.java @@ -0,0 +1,706 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * VectorDBColumnRequest + */ +@JsonPropertyOrder({ + VectorDBColumnRequest.JSON_PROPERTY_COLUMN_ID, + VectorDBColumnRequest.JSON_PROPERTY_NEW_COLUMN_NAME, + VectorDBColumnRequest.JSON_PROPERTY_SUB_TYPE, + VectorDBColumnRequest.JSON_PROPERTY_API_KEY, + VectorDBColumnRequest.JSON_PROPERTY_COLLECTION_NAME, + VectorDBColumnRequest.JSON_PROPERTY_URL, + VectorDBColumnRequest.JSON_PROPERTY_SEARCH_TYPE, + VectorDBColumnRequest.JSON_PROPERTY_KEY, + VectorDBColumnRequest.JSON_PROPERTY_LIMIT, + VectorDBColumnRequest.JSON_PROPERTY_INDEX_NAME, + VectorDBColumnRequest.JSON_PROPERTY_TOP_K, + VectorDBColumnRequest.JSON_PROPERTY_NAMESPACE, + VectorDBColumnRequest.JSON_PROPERTY_EMBEDDING_CONFIG, + VectorDBColumnRequest.JSON_PROPERTY_CONCURRENCY, + VectorDBColumnRequest.JSON_PROPERTY_QUERY_KEY, + VectorDBColumnRequest.JSON_PROPERTY_VECTOR_LENGTH +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class VectorDBColumnRequest { + public static final String JSON_PROPERTY_COLUMN_ID = "column_id"; + @javax.annotation.Nonnull + private UUID columnId; + + public static final String JSON_PROPERTY_NEW_COLUMN_NAME = "new_column_name"; + @javax.annotation.Nullable + private String newColumnName; + + public static final String JSON_PROPERTY_SUB_TYPE = "sub_type"; + @javax.annotation.Nonnull + private String subType; + + public static final String JSON_PROPERTY_API_KEY = "api_key"; + @javax.annotation.Nonnull + private String apiKey; + + public static final String JSON_PROPERTY_COLLECTION_NAME = "collection_name"; + @javax.annotation.Nullable + private String collectionName; + + public static final String JSON_PROPERTY_URL = "url"; + @javax.annotation.Nullable + private String url; + + public static final String JSON_PROPERTY_SEARCH_TYPE = "search_type"; + @javax.annotation.Nullable + private String searchType; + + public static final String JSON_PROPERTY_KEY = "key"; + @javax.annotation.Nullable + private String key; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + @javax.annotation.Nullable + private Integer limit; + + public static final String JSON_PROPERTY_INDEX_NAME = "index_name"; + @javax.annotation.Nullable + private String indexName; + + public static final String JSON_PROPERTY_TOP_K = "top_k"; + @javax.annotation.Nullable + private Integer topK; + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + @javax.annotation.Nullable + private String namespace; + + public static final String JSON_PROPERTY_EMBEDDING_CONFIG = "embedding_config"; + @javax.annotation.Nullable + private Map embeddingConfig = new HashMap<>(); + + public static final String JSON_PROPERTY_CONCURRENCY = "concurrency"; + @javax.annotation.Nullable + private Integer concurrency = 5; + + public static final String JSON_PROPERTY_QUERY_KEY = "query_key"; + @javax.annotation.Nullable + private String queryKey; + + public static final String JSON_PROPERTY_VECTOR_LENGTH = "vector_length"; + @javax.annotation.Nullable + private Integer vectorLength; + + public VectorDBColumnRequest() { + } + + public VectorDBColumnRequest columnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + return this; + } + + /** + * Get columnId + * @return columnId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getColumnId() { + return columnId; + } + + + @JsonProperty(JSON_PROPERTY_COLUMN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setColumnId(@javax.annotation.Nonnull UUID columnId) { + this.columnId = columnId; + } + + + public VectorDBColumnRequest newColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + return this; + } + + /** + * Get newColumnName + * @return newColumnName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNewColumnName() { + return newColumnName; + } + + + @JsonProperty(JSON_PROPERTY_NEW_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewColumnName(@javax.annotation.Nullable String newColumnName) { + this.newColumnName = newColumnName; + } + + + public VectorDBColumnRequest subType(@javax.annotation.Nonnull String subType) { + this.subType = subType; + return this; + } + + /** + * Get subType + * @return subType + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUB_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSubType() { + return subType; + } + + + @JsonProperty(JSON_PROPERTY_SUB_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSubType(@javax.annotation.Nonnull String subType) { + this.subType = subType; + } + + + public VectorDBColumnRequest apiKey(@javax.annotation.Nonnull String apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * Get apiKey + * @return apiKey + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getApiKey() { + return apiKey; + } + + + @JsonProperty(JSON_PROPERTY_API_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setApiKey(@javax.annotation.Nonnull String apiKey) { + this.apiKey = apiKey; + } + + + public VectorDBColumnRequest collectionName(@javax.annotation.Nullable String collectionName) { + this.collectionName = collectionName; + return this; + } + + /** + * Get collectionName + * @return collectionName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLLECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCollectionName() { + return collectionName; + } + + + @JsonProperty(JSON_PROPERTY_COLLECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCollectionName(@javax.annotation.Nullable String collectionName) { + this.collectionName = collectionName; + } + + + public VectorDBColumnRequest url(@javax.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(@javax.annotation.Nullable String url) { + this.url = url; + } + + + public VectorDBColumnRequest searchType(@javax.annotation.Nullable String searchType) { + this.searchType = searchType; + return this; + } + + /** + * Get searchType + * @return searchType + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSearchType() { + return searchType; + } + + + @JsonProperty(JSON_PROPERTY_SEARCH_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSearchType(@javax.annotation.Nullable String searchType) { + this.searchType = searchType; + } + + + public VectorDBColumnRequest key(@javax.annotation.Nullable String key) { + this.key = key; + return this; + } + + /** + * Get key + * @return key + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } + + + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKey(@javax.annotation.Nullable String key) { + this.key = key; + } + + + public VectorDBColumnRequest limit(@javax.annotation.Nullable Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * @return limit + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } + + + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLimit(@javax.annotation.Nullable Integer limit) { + this.limit = limit; + } + + + public VectorDBColumnRequest indexName(@javax.annotation.Nullable String indexName) { + this.indexName = indexName; + return this; + } + + /** + * Get indexName + * @return indexName + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEX_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIndexName() { + return indexName; + } + + + @JsonProperty(JSON_PROPERTY_INDEX_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndexName(@javax.annotation.Nullable String indexName) { + this.indexName = indexName; + } + + + public VectorDBColumnRequest topK(@javax.annotation.Nullable Integer topK) { + this.topK = topK; + return this; + } + + /** + * Get topK + * @return topK + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOP_K) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTopK() { + return topK; + } + + + @JsonProperty(JSON_PROPERTY_TOP_K) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTopK(@javax.annotation.Nullable Integer topK) { + this.topK = topK; + } + + + public VectorDBColumnRequest namespace(@javax.annotation.Nullable String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get namespace + * @return namespace + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNamespace() { + return namespace; + } + + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamespace(@javax.annotation.Nullable String namespace) { + this.namespace = namespace; + } + + + public VectorDBColumnRequest embeddingConfig(@javax.annotation.Nullable Map embeddingConfig) { + this.embeddingConfig = embeddingConfig; + return this; + } + + public VectorDBColumnRequest putEmbeddingConfigItem(String key, Object embeddingConfigItem) { + if (this.embeddingConfig == null) { + this.embeddingConfig = new HashMap<>(); + } + this.embeddingConfig.put(key, embeddingConfigItem); + return this; + } + + /** + * Get embeddingConfig + * @return embeddingConfig + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMBEDDING_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getEmbeddingConfig() { + return embeddingConfig; + } + + + @JsonProperty(JSON_PROPERTY_EMBEDDING_CONFIG) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setEmbeddingConfig(@javax.annotation.Nullable Map embeddingConfig) { + this.embeddingConfig = embeddingConfig; + } + + + public VectorDBColumnRequest concurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + return this; + } + + /** + * Get concurrency + * @return concurrency + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConcurrency() { + return concurrency; + } + + + @JsonProperty(JSON_PROPERTY_CONCURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConcurrency(@javax.annotation.Nullable Integer concurrency) { + this.concurrency = concurrency; + } + + + public VectorDBColumnRequest queryKey(@javax.annotation.Nullable String queryKey) { + this.queryKey = queryKey; + return this; + } + + /** + * Get queryKey + * @return queryKey + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQueryKey() { + return queryKey; + } + + + @JsonProperty(JSON_PROPERTY_QUERY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQueryKey(@javax.annotation.Nullable String queryKey) { + this.queryKey = queryKey; + } + + + public VectorDBColumnRequest vectorLength(@javax.annotation.Nullable Integer vectorLength) { + this.vectorLength = vectorLength; + return this; + } + + /** + * Get vectorLength + * @return vectorLength + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VECTOR_LENGTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVectorLength() { + return vectorLength; + } + + + @JsonProperty(JSON_PROPERTY_VECTOR_LENGTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVectorLength(@javax.annotation.Nullable Integer vectorLength) { + this.vectorLength = vectorLength; + } + + + /** + * Return true if this VectorDBColumnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VectorDBColumnRequest vectorDBColumnRequest = (VectorDBColumnRequest) o; + return Objects.equals(this.columnId, vectorDBColumnRequest.columnId) && + Objects.equals(this.newColumnName, vectorDBColumnRequest.newColumnName) && + Objects.equals(this.subType, vectorDBColumnRequest.subType) && + Objects.equals(this.apiKey, vectorDBColumnRequest.apiKey) && + Objects.equals(this.collectionName, vectorDBColumnRequest.collectionName) && + Objects.equals(this.url, vectorDBColumnRequest.url) && + Objects.equals(this.searchType, vectorDBColumnRequest.searchType) && + Objects.equals(this.key, vectorDBColumnRequest.key) && + Objects.equals(this.limit, vectorDBColumnRequest.limit) && + Objects.equals(this.indexName, vectorDBColumnRequest.indexName) && + Objects.equals(this.topK, vectorDBColumnRequest.topK) && + Objects.equals(this.namespace, vectorDBColumnRequest.namespace) && + Objects.equals(this.embeddingConfig, vectorDBColumnRequest.embeddingConfig) && + Objects.equals(this.concurrency, vectorDBColumnRequest.concurrency) && + Objects.equals(this.queryKey, vectorDBColumnRequest.queryKey) && + Objects.equals(this.vectorLength, vectorDBColumnRequest.vectorLength); + } + + @Override + public int hashCode() { + return Objects.hash(columnId, newColumnName, subType, apiKey, collectionName, url, searchType, key, limit, indexName, topK, namespace, embeddingConfig, concurrency, queryKey, vectorLength); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VectorDBColumnRequest {\n"); + sb.append(" columnId: ").append(toIndentedString(columnId)).append("\n"); + sb.append(" newColumnName: ").append(toIndentedString(newColumnName)).append("\n"); + sb.append(" subType: ").append(toIndentedString(subType)).append("\n"); + sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); + sb.append(" collectionName: ").append(toIndentedString(collectionName)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" searchType: ").append(toIndentedString(searchType)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); + sb.append(" topK: ").append(toIndentedString(topK)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" embeddingConfig: ").append(toIndentedString(embeddingConfig)).append("\n"); + sb.append(" concurrency: ").append(toIndentedString(concurrency)).append("\n"); + sb.append(" queryKey: ").append(toIndentedString(queryKey)).append("\n"); + sb.append(" vectorLength: ").append(toIndentedString(vectorLength)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `column_id` to the URL query string + if (getColumnId() != null) { + joiner.add(String.format("%scolumn_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getColumnId())))); + } + + // add `new_column_name` to the URL query string + if (getNewColumnName() != null) { + joiner.add(String.format("%snew_column_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNewColumnName())))); + } + + // add `sub_type` to the URL query string + if (getSubType() != null) { + joiner.add(String.format("%ssub_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSubType())))); + } + + // add `api_key` to the URL query string + if (getApiKey() != null) { + joiner.add(String.format("%sapi_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApiKey())))); + } + + // add `collection_name` to the URL query string + if (getCollectionName() != null) { + joiner.add(String.format("%scollection_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCollectionName())))); + } + + // add `url` to the URL query string + if (getUrl() != null) { + joiner.add(String.format("%surl%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); + } + + // add `search_type` to the URL query string + if (getSearchType() != null) { + joiner.add(String.format("%ssearch_type%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSearchType())))); + } + + // add `key` to the URL query string + if (getKey() != null) { + joiner.add(String.format("%skey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKey())))); + } + + // add `limit` to the URL query string + if (getLimit() != null) { + joiner.add(String.format("%slimit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLimit())))); + } + + // add `index_name` to the URL query string + if (getIndexName() != null) { + joiner.add(String.format("%sindex_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIndexName())))); + } + + // add `top_k` to the URL query string + if (getTopK() != null) { + joiner.add(String.format("%stop_k%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTopK())))); + } + + // add `namespace` to the URL query string + if (getNamespace() != null) { + joiner.add(String.format("%snamespace%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamespace())))); + } + + // add `embedding_config` to the URL query string + if (getEmbeddingConfig() != null) { + for (String _key : getEmbeddingConfig().keySet()) { + joiner.add(String.format("%sembedding_config%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + getEmbeddingConfig().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEmbeddingConfig().get(_key))))); + } + } + + // add `concurrency` to the URL query string + if (getConcurrency() != null) { + joiner.add(String.format("%sconcurrency%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConcurrency())))); + } + + // add `query_key` to the URL query string + if (getQueryKey() != null) { + joiner.add(String.format("%squery_key%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getQueryKey())))); + } + + // add `vector_length` to the URL query string + if (getVectorLength() != null) { + joiner.add(String.format("%svector_length%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVectorLength())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAccessInput.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAccessInput.java new file mode 100644 index 0000000..497003e --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAccessInput.java @@ -0,0 +1,225 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * List of {\"workspace_id\": \"<uuid>\", \"level\": <int>}. + */ +@JsonPropertyOrder({ + WorkspaceAccessInput.JSON_PROPERTY_WORKSPACE_ID, + WorkspaceAccessInput.JSON_PROPERTY_LEVEL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceAccessInput { + public static final String JSON_PROPERTY_WORKSPACE_ID = "workspace_id"; + @javax.annotation.Nonnull + private UUID workspaceId; + + /** + * Gets or Sets level + */ + public enum LevelEnum { + NUMBER_8(Integer.valueOf(8)), + + NUMBER_3(Integer.valueOf(3)), + + NUMBER_1(Integer.valueOf(1)); + + private Integer value; + + LevelEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LevelEnum fromValue(Integer value) { + for (LevelEnum b : LevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEVEL = "level"; + @javax.annotation.Nullable + private LevelEnum level; + + public WorkspaceAccessInput() { + } + + public WorkspaceAccessInput workspaceId(@javax.annotation.Nonnull UUID workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get workspaceId + * @return workspaceId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getWorkspaceId() { + return workspaceId; + } + + + @JsonProperty(JSON_PROPERTY_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkspaceId(@javax.annotation.Nonnull UUID workspaceId) { + this.workspaceId = workspaceId; + } + + + public WorkspaceAccessInput level(@javax.annotation.Nullable LevelEnum level) { + this.level = level; + return this; + } + + /** + * Get level + * @return level + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LevelEnum getLevel() { + return level; + } + + + @JsonProperty(JSON_PROPERTY_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLevel(@javax.annotation.Nullable LevelEnum level) { + this.level = level; + } + + + /** + * Return true if this WorkspaceAccessInput object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceAccessInput workspaceAccessInput = (WorkspaceAccessInput) o; + return Objects.equals(this.workspaceId, workspaceAccessInput.workspaceId) && + Objects.equals(this.level, workspaceAccessInput.level); + } + + @Override + public int hashCode() { + return Objects.hash(workspaceId, level); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceAccessInput {\n"); + sb.append(" workspaceId: ").append(toIndentedString(workspaceId)).append("\n"); + sb.append(" level: ").append(toIndentedString(level)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `workspace_id` to the URL query string + if (getWorkspaceId() != null) { + joiner.add(String.format("%sworkspace_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWorkspaceId())))); + } + + // add `level` to the URL query string + if (getLevel() != null) { + joiner.add(String.format("%slevel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLevel())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAdminSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAdminSummary.java new file mode 100644 index 0000000..be70fc4 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceAdminSummary.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceAdminSummary + */ +@JsonPropertyOrder({ + WorkspaceAdminSummary.JSON_PROPERTY_NAME, + WorkspaceAdminSummary.JSON_PROPERTY_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceAdminSummary { + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable + private String name; + + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public WorkspaceAdminSummary() { + } + + public WorkspaceAdminSummary name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public WorkspaceAdminSummary id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this WorkspaceAdminSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceAdminSummary workspaceAdminSummary = (WorkspaceAdminSummary) o; + return Objects.equals(this.name, workspaceAdminSummary.name) && + Objects.equals(this.id, workspaceAdminSummary.id); + } + + @Override + public int hashCode() { + return Objects.hash(name, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceAdminSummary {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListItemResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListItemResponse.java new file mode 100644 index 0000000..3530aef --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListItemResponse.java @@ -0,0 +1,485 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.WorkspaceAdminSummary; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceListItemResponse + */ +@JsonPropertyOrder({ + WorkspaceListItemResponse.JSON_PROPERTY_ID, + WorkspaceListItemResponse.JSON_PROPERTY_NAME, + WorkspaceListItemResponse.JSON_PROPERTY_DISPLAY_NAME, + WorkspaceListItemResponse.JSON_PROPERTY_ADMIN_NAMES, + WorkspaceListItemResponse.JSON_PROPERTY_START_DATA, + WorkspaceListItemResponse.JSON_PROPERTY_LAST_UPDATE_DATE, + WorkspaceListItemResponse.JSON_PROPERTY_INVITE_LINK, + WorkspaceListItemResponse.JSON_PROPERTY_USER_WS_LEVEL, + WorkspaceListItemResponse.JSON_PROPERTY_USER_WS_ROLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceListItemResponse { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + @javax.annotation.Nonnull + private String displayName; + + public static final String JSON_PROPERTY_ADMIN_NAMES = "admin_names"; + @javax.annotation.Nullable + private List adminNames = new ArrayList<>(); + + public static final String JSON_PROPERTY_START_DATA = "start_data"; + @javax.annotation.Nullable + private String startData; + + public static final String JSON_PROPERTY_LAST_UPDATE_DATE = "last_update_date"; + @javax.annotation.Nullable + private String lastUpdateDate; + + public static final String JSON_PROPERTY_INVITE_LINK = "invite_link"; + @javax.annotation.Nullable + private String inviteLink; + + public static final String JSON_PROPERTY_USER_WS_LEVEL = "user_ws_level"; + private JsonNullable userWsLevel = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_WS_ROLE = "user_ws_role"; + private JsonNullable userWsRole = JsonNullable.undefined(); + + public WorkspaceListItemResponse() { + } + + public WorkspaceListItemResponse id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public WorkspaceListItemResponse name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public WorkspaceListItemResponse displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public WorkspaceListItemResponse adminNames(@javax.annotation.Nullable List adminNames) { + this.adminNames = adminNames; + return this; + } + + public WorkspaceListItemResponse addAdminNamesItem(WorkspaceAdminSummary adminNamesItem) { + if (this.adminNames == null) { + this.adminNames = new ArrayList<>(); + } + this.adminNames.add(adminNamesItem); + return this; + } + + /** + * Get adminNames + * @return adminNames + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADMIN_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAdminNames() { + return adminNames; + } + + + @JsonProperty(JSON_PROPERTY_ADMIN_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdminNames(@javax.annotation.Nullable List adminNames) { + this.adminNames = adminNames; + } + + + public WorkspaceListItemResponse startData(@javax.annotation.Nullable String startData) { + this.startData = startData; + return this; + } + + /** + * Get startData + * @return startData + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStartData() { + return startData; + } + + + @JsonProperty(JSON_PROPERTY_START_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStartData(@javax.annotation.Nullable String startData) { + this.startData = startData; + } + + + public WorkspaceListItemResponse lastUpdateDate(@javax.annotation.Nullable String lastUpdateDate) { + this.lastUpdateDate = lastUpdateDate; + return this; + } + + /** + * Get lastUpdateDate + * @return lastUpdateDate + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATE_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastUpdateDate() { + return lastUpdateDate; + } + + + @JsonProperty(JSON_PROPERTY_LAST_UPDATE_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastUpdateDate(@javax.annotation.Nullable String lastUpdateDate) { + this.lastUpdateDate = lastUpdateDate; + } + + + public WorkspaceListItemResponse inviteLink(@javax.annotation.Nullable String inviteLink) { + this.inviteLink = inviteLink; + return this; + } + + /** + * Get inviteLink + * @return inviteLink + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVITE_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInviteLink() { + return inviteLink; + } + + + @JsonProperty(JSON_PROPERTY_INVITE_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInviteLink(@javax.annotation.Nullable String inviteLink) { + this.inviteLink = inviteLink; + } + + + public WorkspaceListItemResponse userWsLevel(@javax.annotation.Nullable Integer userWsLevel) { + this.userWsLevel = JsonNullable.of(userWsLevel); + return this; + } + + /** + * Get userWsLevel + * @return userWsLevel + */ + @javax.annotation.Nullable + @JsonIgnore + public Integer getUserWsLevel() { + return userWsLevel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUserWsLevel_JsonNullable() { + return userWsLevel; + } + + @JsonProperty(JSON_PROPERTY_USER_WS_LEVEL) + public void setUserWsLevel_JsonNullable(JsonNullable userWsLevel) { + this.userWsLevel = userWsLevel; + } + + public void setUserWsLevel(@javax.annotation.Nullable Integer userWsLevel) { + this.userWsLevel = JsonNullable.of(userWsLevel); + } + + + public WorkspaceListItemResponse userWsRole(@javax.annotation.Nullable String userWsRole) { + this.userWsRole = JsonNullable.of(userWsRole); + return this; + } + + /** + * Get userWsRole + * @return userWsRole + */ + @javax.annotation.Nullable + @JsonIgnore + public String getUserWsRole() { + return userWsRole.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_WS_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getUserWsRole_JsonNullable() { + return userWsRole; + } + + @JsonProperty(JSON_PROPERTY_USER_WS_ROLE) + public void setUserWsRole_JsonNullable(JsonNullable userWsRole) { + this.userWsRole = userWsRole; + } + + public void setUserWsRole(@javax.annotation.Nullable String userWsRole) { + this.userWsRole = JsonNullable.of(userWsRole); + } + + + /** + * Return true if this WorkspaceListItemResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceListItemResponse workspaceListItemResponse = (WorkspaceListItemResponse) o; + return Objects.equals(this.id, workspaceListItemResponse.id) && + Objects.equals(this.name, workspaceListItemResponse.name) && + Objects.equals(this.displayName, workspaceListItemResponse.displayName) && + Objects.equals(this.adminNames, workspaceListItemResponse.adminNames) && + Objects.equals(this.startData, workspaceListItemResponse.startData) && + Objects.equals(this.lastUpdateDate, workspaceListItemResponse.lastUpdateDate) && + Objects.equals(this.inviteLink, workspaceListItemResponse.inviteLink) && + equalsNullable(this.userWsLevel, workspaceListItemResponse.userWsLevel) && + equalsNullable(this.userWsRole, workspaceListItemResponse.userWsRole); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, displayName, adminNames, startData, lastUpdateDate, inviteLink, hashCodeNullable(userWsLevel), hashCodeNullable(userWsRole)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceListItemResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" adminNames: ").append(toIndentedString(adminNames)).append("\n"); + sb.append(" startData: ").append(toIndentedString(startData)).append("\n"); + sb.append(" lastUpdateDate: ").append(toIndentedString(lastUpdateDate)).append("\n"); + sb.append(" inviteLink: ").append(toIndentedString(inviteLink)).append("\n"); + sb.append(" userWsLevel: ").append(toIndentedString(userWsLevel)).append("\n"); + sb.append(" userWsRole: ").append(toIndentedString(userWsRole)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `display_name` to the URL query string + if (getDisplayName() != null) { + joiner.add(String.format("%sdisplay_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDisplayName())))); + } + + // add `admin_names` to the URL query string + if (getAdminNames() != null) { + for (int i = 0; i < getAdminNames().size(); i++) { + if (getAdminNames().get(i) != null) { + joiner.add(getAdminNames().get(i).toUrlQueryString(String.format("%sadmin_names%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `start_data` to the URL query string + if (getStartData() != null) { + joiner.add(String.format("%sstart_data%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartData())))); + } + + // add `last_update_date` to the URL query string + if (getLastUpdateDate() != null) { + joiner.add(String.format("%slast_update_date%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLastUpdateDate())))); + } + + // add `invite_link` to the URL query string + if (getInviteLink() != null) { + joiner.add(String.format("%sinvite_link%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInviteLink())))); + } + + // add `user_ws_level` to the URL query string + if (getUserWsLevel() != null) { + joiner.add(String.format("%suser_ws_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserWsLevel())))); + } + + // add `user_ws_role` to the URL query string + if (getUserWsRole() != null) { + joiner.add(String.format("%suser_ws_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserWsRole())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListPaginatedResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListPaginatedResponse.java new file mode 100644 index 0000000..aea6d3d --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceListPaginatedResponse.java @@ -0,0 +1,347 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.WorkspaceListItemResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceListPaginatedResponse + */ +@JsonPropertyOrder({ + WorkspaceListPaginatedResponse.JSON_PROPERTY_COUNT, + WorkspaceListPaginatedResponse.JSON_PROPERTY_NEXT, + WorkspaceListPaginatedResponse.JSON_PROPERTY_PREVIOUS, + WorkspaceListPaginatedResponse.JSON_PROPERTY_RESULTS, + WorkspaceListPaginatedResponse.JSON_PROPERTY_TOTAL_PAGES, + WorkspaceListPaginatedResponse.JSON_PROPERTY_CURRENT_PAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceListPaginatedResponse { + public static final String JSON_PROPERTY_COUNT = "count"; + @javax.annotation.Nonnull + private Integer count; + + public static final String JSON_PROPERTY_NEXT = "next"; + @javax.annotation.Nullable + private String next; + + public static final String JSON_PROPERTY_PREVIOUS = "previous"; + @javax.annotation.Nullable + private String previous; + + public static final String JSON_PROPERTY_RESULTS = "results"; + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + @javax.annotation.Nonnull + private Integer totalPages; + + public static final String JSON_PROPERTY_CURRENT_PAGE = "current_page"; + @javax.annotation.Nonnull + private Integer currentPage; + + public WorkspaceListPaginatedResponse() { + } + + public WorkspaceListPaginatedResponse count(@javax.annotation.Nonnull Integer count) { + this.count = count; + return this; + } + + /** + * Get count + * @return count + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@javax.annotation.Nonnull Integer count) { + this.count = count; + } + + + public WorkspaceListPaginatedResponse next(@javax.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * Get next + * @return next + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNext() { + return next; + } + + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNext(@javax.annotation.Nullable String next) { + this.next = next; + } + + + public WorkspaceListPaginatedResponse previous(@javax.annotation.Nullable String previous) { + this.previous = previous; + return this; + } + + /** + * Get previous + * @return previous + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrevious() { + return previous; + } + + + @JsonProperty(JSON_PROPERTY_PREVIOUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPrevious(@javax.annotation.Nullable String previous) { + this.previous = previous; + } + + + public WorkspaceListPaginatedResponse results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public WorkspaceListPaginatedResponse addResultsItem(WorkspaceListItemResponse resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResults() { + return results; + } + + + @JsonProperty(JSON_PROPERTY_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + public WorkspaceListPaginatedResponse totalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalPages() { + return totalPages; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalPages(@javax.annotation.Nonnull Integer totalPages) { + this.totalPages = totalPages; + } + + + public WorkspaceListPaginatedResponse currentPage(@javax.annotation.Nonnull Integer currentPage) { + this.currentPage = currentPage; + return this; + } + + /** + * Get currentPage + * @return currentPage + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCurrentPage() { + return currentPage; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCurrentPage(@javax.annotation.Nonnull Integer currentPage) { + this.currentPage = currentPage; + } + + + /** + * Return true if this WorkspaceListPaginatedResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceListPaginatedResponse workspaceListPaginatedResponse = (WorkspaceListPaginatedResponse) o; + return Objects.equals(this.count, workspaceListPaginatedResponse.count) && + Objects.equals(this.next, workspaceListPaginatedResponse.next) && + Objects.equals(this.previous, workspaceListPaginatedResponse.previous) && + Objects.equals(this.results, workspaceListPaginatedResponse.results) && + Objects.equals(this.totalPages, workspaceListPaginatedResponse.totalPages) && + Objects.equals(this.currentPage, workspaceListPaginatedResponse.currentPage); + } + + @Override + public int hashCode() { + return Objects.hash(count, next, previous, results, totalPages, currentPage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceListPaginatedResponse {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add(String.format("%scount%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add(String.format("%snext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + // add `previous` to the URL query string + if (getPrevious() != null) { + joiner.add(String.format("%sprevious%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrevious())))); + } + + // add `results` to the URL query string + if (getResults() != null) { + for (int i = 0; i < getResults().size(); i++) { + if (getResults().get(i) != null) { + joiner.add(getResults().get(i).toUrlQueryString(String.format("%sresults%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `total_pages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format("%stotal_pages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `current_page` to the URL query string + if (getCurrentPage() != null) { + joiner.add(String.format("%scurrent_page%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCurrentPage())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRemove.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRemove.java new file mode 100644 index 0000000..7d51a74 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRemove.java @@ -0,0 +1,152 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceMemberRemove + */ +@JsonPropertyOrder({ + WorkspaceMemberRemove.JSON_PROPERTY_USER_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceMemberRemove { + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + public WorkspaceMemberRemove() { + } + + public WorkspaceMemberRemove userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + /** + * Return true if this WorkspaceMemberRemove object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceMemberRemove workspaceMemberRemove = (WorkspaceMemberRemove) o; + return Objects.equals(this.userId, workspaceMemberRemove.userId); + } + + @Override + public int hashCode() { + return Objects.hash(userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceMemberRemove {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdate.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdate.java new file mode 100644 index 0000000..6158756 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdate.java @@ -0,0 +1,225 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceMemberRoleUpdate + */ +@JsonPropertyOrder({ + WorkspaceMemberRoleUpdate.JSON_PROPERTY_USER_ID, + WorkspaceMemberRoleUpdate.JSON_PROPERTY_WS_LEVEL +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceMemberRoleUpdate { + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + /** + * Gets or Sets wsLevel + */ + public enum WsLevelEnum { + NUMBER_8(Integer.valueOf(8)), + + NUMBER_3(Integer.valueOf(3)), + + NUMBER_1(Integer.valueOf(1)); + + private Integer value; + + WsLevelEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WsLevelEnum fromValue(Integer value) { + for (WsLevelEnum b : WsLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WS_LEVEL = "ws_level"; + @javax.annotation.Nonnull + private WsLevelEnum wsLevel; + + public WorkspaceMemberRoleUpdate() { + } + + public WorkspaceMemberRoleUpdate userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + public WorkspaceMemberRoleUpdate wsLevel(@javax.annotation.Nonnull WsLevelEnum wsLevel) { + this.wsLevel = wsLevel; + return this; + } + + /** + * Get wsLevel + * @return wsLevel + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WsLevelEnum getWsLevel() { + return wsLevel; + } + + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWsLevel(@javax.annotation.Nonnull WsLevelEnum wsLevel) { + this.wsLevel = wsLevel; + } + + + /** + * Return true if this WorkspaceMemberRoleUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceMemberRoleUpdate workspaceMemberRoleUpdate = (WorkspaceMemberRoleUpdate) o; + return Objects.equals(this.userId, workspaceMemberRoleUpdate.userId) && + Objects.equals(this.wsLevel, workspaceMemberRoleUpdate.wsLevel); + } + + @Override + public int hashCode() { + return Objects.hash(userId, wsLevel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceMemberRoleUpdate {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" wsLevel: ").append(toIndentedString(wsLevel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + // add `ws_level` to the URL query string + if (getWsLevel() != null) { + joiner.add(String.format("%sws_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsLevel())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResponse.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResponse.java new file mode 100644 index 0000000..a29327c --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResponse.java @@ -0,0 +1,188 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.futureagi.sdk.model.WorkspaceMemberRoleUpdateResult; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceMemberRoleUpdateResponse + */ +@JsonPropertyOrder({ + WorkspaceMemberRoleUpdateResponse.JSON_PROPERTY_STATUS, + WorkspaceMemberRoleUpdateResponse.JSON_PROPERTY_RESULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceMemberRoleUpdateResponse { + public static final String JSON_PROPERTY_STATUS = "status"; + @javax.annotation.Nonnull + private Boolean status; + + public static final String JSON_PROPERTY_RESULT = "result"; + @javax.annotation.Nonnull + private WorkspaceMemberRoleUpdateResult result; + + public WorkspaceMemberRoleUpdateResponse() { + } + + public WorkspaceMemberRoleUpdateResponse status(@javax.annotation.Nonnull Boolean status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@javax.annotation.Nonnull Boolean status) { + this.status = status; + } + + + public WorkspaceMemberRoleUpdateResponse result(@javax.annotation.Nonnull WorkspaceMemberRoleUpdateResult result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WorkspaceMemberRoleUpdateResult getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(@javax.annotation.Nonnull WorkspaceMemberRoleUpdateResult result) { + this.result = result; + } + + + /** + * Return true if this WorkspaceMemberRoleUpdateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceMemberRoleUpdateResponse workspaceMemberRoleUpdateResponse = (WorkspaceMemberRoleUpdateResponse) o; + return Objects.equals(this.status, workspaceMemberRoleUpdateResponse.status) && + Objects.equals(this.result, workspaceMemberRoleUpdateResponse.result); + } + + @Override + public int hashCode() { + return Objects.hash(status, result); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceMemberRoleUpdateResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add(String.format("%sstatus%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `result` to the URL query string + if (getResult() != null) { + joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResult.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResult.java new file mode 100644 index 0000000..2b1cb58 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceMemberRoleUpdateResult.java @@ -0,0 +1,260 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceMemberRoleUpdateResult + */ +@JsonPropertyOrder({ + WorkspaceMemberRoleUpdateResult.JSON_PROPERTY_MESSAGE, + WorkspaceMemberRoleUpdateResult.JSON_PROPERTY_USER_ID, + WorkspaceMemberRoleUpdateResult.JSON_PROPERTY_WS_LEVEL, + WorkspaceMemberRoleUpdateResult.JSON_PROPERTY_WS_ROLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceMemberRoleUpdateResult { + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nonnull + private String message; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + @javax.annotation.Nonnull + private UUID userId; + + public static final String JSON_PROPERTY_WS_LEVEL = "ws_level"; + @javax.annotation.Nonnull + private Integer wsLevel; + + public static final String JSON_PROPERTY_WS_ROLE = "ws_role"; + @javax.annotation.Nonnull + private String wsRole; + + public WorkspaceMemberRoleUpdateResult() { + } + + public WorkspaceMemberRoleUpdateResult message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public WorkspaceMemberRoleUpdateResult userId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(@javax.annotation.Nonnull UUID userId) { + this.userId = userId; + } + + + public WorkspaceMemberRoleUpdateResult wsLevel(@javax.annotation.Nonnull Integer wsLevel) { + this.wsLevel = wsLevel; + return this; + } + + /** + * Get wsLevel + * @return wsLevel + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getWsLevel() { + return wsLevel; + } + + + @JsonProperty(JSON_PROPERTY_WS_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWsLevel(@javax.annotation.Nonnull Integer wsLevel) { + this.wsLevel = wsLevel; + } + + + public WorkspaceMemberRoleUpdateResult wsRole(@javax.annotation.Nonnull String wsRole) { + this.wsRole = wsRole; + return this; + } + + /** + * Get wsRole + * @return wsRole + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WS_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getWsRole() { + return wsRole; + } + + + @JsonProperty(JSON_PROPERTY_WS_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWsRole(@javax.annotation.Nonnull String wsRole) { + this.wsRole = wsRole; + } + + + /** + * Return true if this WorkspaceMemberRoleUpdateResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceMemberRoleUpdateResult workspaceMemberRoleUpdateResult = (WorkspaceMemberRoleUpdateResult) o; + return Objects.equals(this.message, workspaceMemberRoleUpdateResult.message) && + Objects.equals(this.userId, workspaceMemberRoleUpdateResult.userId) && + Objects.equals(this.wsLevel, workspaceMemberRoleUpdateResult.wsLevel) && + Objects.equals(this.wsRole, workspaceMemberRoleUpdateResult.wsRole); + } + + @Override + public int hashCode() { + return Objects.hash(message, userId, wsLevel, wsRole); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceMemberRoleUpdateResult {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" wsLevel: ").append(toIndentedString(wsLevel)).append("\n"); + sb.append(" wsRole: ").append(toIndentedString(wsRole)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add(String.format("%smessage%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `user_id` to the URL query string + if (getUserId() != null) { + joiner.add(String.format("%suser_id%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserId())))); + } + + // add `ws_level` to the URL query string + if (getWsLevel() != null) { + joiner.add(String.format("%sws_level%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsLevel())))); + } + + // add `ws_role` to the URL query string + if (getWsRole() != null) { + joiner.add(String.format("%sws_role%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWsRole())))); + } + + return joiner.toString(); + } +} + diff --git a/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceSummary.java b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceSummary.java new file mode 100644 index 0000000..2413539 --- /dev/null +++ b/java/futureagi/src/main/java/com/futureagi/sdk/model/WorkspaceSummary.java @@ -0,0 +1,296 @@ +/* + * Future AGI Public SDK API + * The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform. + * + * The version of the OpenAPI document: 0.1.0 + * Contact: help@futureagi.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.futureagi.sdk.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.futureagi.sdk.ApiClient; +/** + * WorkspaceSummary + */ +@JsonPropertyOrder({ + WorkspaceSummary.JSON_PROPERTY_ID, + WorkspaceSummary.JSON_PROPERTY_NAME, + WorkspaceSummary.JSON_PROPERTY_DISPLAY_NAME, + WorkspaceSummary.JSON_PROPERTY_DESCRIPTION, + WorkspaceSummary.JSON_PROPERTY_IS_DEFAULT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +public class WorkspaceSummary { + public static final String JSON_PROPERTY_ID = "id"; + @javax.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + @javax.annotation.Nonnull + private String displayName; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + @javax.annotation.Nullable + private String description; + + public static final String JSON_PROPERTY_IS_DEFAULT = "is_default"; + @javax.annotation.Nullable + private Boolean isDefault; + + public WorkspaceSummary() { + } + + public WorkspaceSummary id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + + public WorkspaceSummary name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public WorkspaceSummary displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public WorkspaceSummary description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public WorkspaceSummary isDefault(@javax.annotation.Nullable Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsDefault(@javax.annotation.Nullable Boolean isDefault) { + this.isDefault = isDefault; + } + + + /** + * Return true if this WorkspaceSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkspaceSummary workspaceSummary = (WorkspaceSummary) o; + return Objects.equals(this.id, workspaceSummary.id) && + Objects.equals(this.name, workspaceSummary.name) && + Objects.equals(this.displayName, workspaceSummary.displayName) && + Objects.equals(this.description, workspaceSummary.description) && + Objects.equals(this.isDefault, workspaceSummary.isDefault); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, displayName, description, isDefault); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkspaceSummary {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add(String.format("%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `display_name` to the URL query string + if (getDisplayName() != null) { + joiner.add(String.format("%sdisplay_name%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDisplayName())))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add(String.format("%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); + } + + // add `is_default` to the URL query string + if (getIsDefault() != null) { + joiner.add(String.format("%sis_default%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getIsDefault())))); + } + + return joiner.toString(); + } +} + diff --git a/openapi/sdk/generated/futureagi-sdk.openapi.json b/openapi/sdk/generated/futureagi-sdk.openapi.json new file mode 100644 index 0000000..c1e6bbf --- /dev/null +++ b/openapi/sdk/generated/futureagi-sdk.openapi.json @@ -0,0 +1,62626 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Future AGI Public SDK API", + "description": "The endpoints defined below allow users to programmatically carry out various actions on the Future AGI platform.", + "termsOfService": "https://futureagi.com/legal", + "contact": { + "email": "help@futureagi.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "0.1.0" + }, + "security": [ + { + "X-Api-Key": [] + }, + { + "X-Secret-Key": [] + } + ], + "paths": { + "/accounts/organization/members/": { + "get": { + "operationId": "listOrganizationMembers", + "summary": "GET /accounts/organization/members/", + "description": "Returns UNION of active members + pending/expired invites.\nStatus is derived at query time (Active / Pending / Expired).", + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20 + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "filter_status", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Active", + "Pending", + "Expired", + "Deactivated" + ] + } + } + }, + { + "name": "filter_role", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "name", + "-name", + "email", + "-email", + "status", + "-status", + "type", + "-type", + "date_joined", + "-date_joined", + "created_at", + "-created_at", + "org_level", + "-org_level" + ], + "default": "-created_at" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Users" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/accounts/organization/members/reactivate/": { + "post": { + "operationId": "accounts_organization_members_reactivate_create", + "summary": "POST /accounts/organization/members/reactivate/", + "description": "Re-activates a deactivated org membership and restores workspace\nmemberships that were soft-deactivated during removal. If no prior\nworkspace memberships exist, the user is added to the default workspace.", + "requestBody": { + "$ref": "#/components/requestBodies/MemberRemove" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberUserMutationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "accounts" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/accounts/organization/members/remove/": { + "delete": { + "operationId": "accounts_organization_members_remove_delete", + "summary": "DELETE /accounts/organization/members/remove/", + "description": "Soft-deactivates OrganizationMembership and cascades to workspace\nmemberships. Signals handle Redis clear + audit log.", + "requestBody": { + "$ref": "#/components/requestBodies/MemberRemove" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberUserMutationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "accounts" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/accounts/organization/members/role/": { + "post": { + "operationId": "accounts_organization_members_role_create", + "summary": "POST /accounts/organization/members/role/", + "description": "Update a member's org level and/or workspace level.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRoleUpdateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "accounts" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/accounts/user-info/": { + "get": { + "operationId": "getCurrentUser", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfoResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Users" + ] + }, + "parameters": [] + }, + "/accounts/workspace/list/": { + "get": { + "operationId": "listWorkspaces", + "description": "Get paginated list of workspaces", + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 10 + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceListPaginatedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Users" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/accounts/workspace/switch/": { + "post": { + "operationId": "switchWorkspace", + "description": "Switch to a different workspace with proper validation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SwitchWorkspace" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SwitchWorkspaceResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Users" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/accounts/workspace/{workspace_id}/members/": { + "get": { + "operationId": "listWorkspaceMembers", + "summary": "GET /accounts/workspace//members/", + "description": "Returns members of a specific workspace.\nOrg Admin+ users who auto-access are included with derived WS Admin role.", + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20 + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "filter_status", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Active", + "Pending", + "Expired" + ] + } + } + }, + { + "name": "filter_role", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "name", + "-name", + "email", + "-email", + "status", + "-status", + "type", + "-type", + "date_joined", + "-date_joined", + "created_at", + "-created_at", + "ws_level", + "-ws_level" + ], + "default": "-created_at" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Users" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/accounts/workspace/{workspace_id}/members/remove/": { + "delete": { + "operationId": "accounts_workspace_members_remove_delete", + "summary": "DELETE /accounts/workspace//members/remove/", + "description": "Remove a member from a workspace only (keeps org membership).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceMemberRemove" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberUserMutationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "accounts" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/accounts/workspace/{workspace_id}/members/role/": { + "post": { + "operationId": "accounts_workspace_members_role_create", + "summary": "POST /accounts/workspace//members/role/", + "description": "Update a member's workspace role.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceMemberRoleUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceMemberRoleUpdateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "401": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountsErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "accounts" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/": { + "get": { + "operationId": "listAnnotationQueues", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "include_counts", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnnotationQueue" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ], + "x-runtime-request-validation": true + }, + "post": { + "operationId": "createAnnotationQueue", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/AnnotationQueue" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationQueue" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "parameters": [] + }, + "/model-hub/annotation-queues/for-source/": { + "get": { + "operationId": "model-hub_annotation-queues_for_source", + "description": "Find annotation queues for a given source that the current user can annotate.\nIncludes queues where:\n- The source is a queue item AND the user is an annotator in that queue\n (regardless of whether the item is explicitly assigned to them)\n\nQuery params:\n - source_type, source_id (single source)\n - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup)", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "source_type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "call_execution", + "dataset_row", + "observation_span", + "prototype_run", + "trace", + "trace_session" + ] + } + }, + { + "name": "source_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sources", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueForSourceResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/annotation-queues/get-or-create-default/": { + "post": { + "operationId": "model-hub_annotation-queues_get_or_create_default", + "description": "Get or create the default annotation queue for a project, dataset, or agent definition.\nDefault queues are open to all org members (no annotator restriction).\n\nBody params (one of):\n - project_id\n - dataset_id\n - agent_definition_id", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueDefaultRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueDefaultResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/annotation-queues/{id}/": { + "get": { + "operationId": "getAnnotationQueue", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationQueue" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "put": { + "operationId": "model-hub_annotation-queues_update", + "description": "Only managers of the queue may update queue settings.", + "requestBody": { + "$ref": "#/components/requestBodies/AnnotationQueue" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationQueue" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "updateAnnotationQueue", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/AnnotationQueue" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationQueue" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "delete": { + "operationId": "archiveAnnotationQueue", + "summary": "Archive a queue (soft delete).", + "description": "``BaseModel.delete()`` flips ``deleted=True`` instead of removing\nthe row. Attached automation rules go dormant (the scheduler\nfilters ``queue__deleted=False``), items stay invisible but\nrecoverable, label bindings preserved.\n\nFor truly destructive removal, use the ``hard-delete`` action\nbelow.", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/add-label/": { + "post": { + "operationId": "addAnnotationQueueLabel", + "description": "Add a label to an annotation queue.\nLabels apply to all sources in the queue's project (for default queues).\nQueue items are created lazily when someone actually annotates.", + "requestBody": { + "$ref": "#/components/requestBodies/QueueLabelRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueAddLabelResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/agreement/": { + "get": { + "operationId": "getAnnotationQueueAgreement", + "description": "Calculate inter-annotator agreement metrics.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueAgreementResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/analytics/": { + "get": { + "operationId": "getAnnotationQueueAnalytics", + "description": "Queue analytics: throughput, annotator performance, label distribution.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueAnalyticsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/export-fields/": { + "get": { + "operationId": "listAnnotationQueueExportFields", + "description": "Return source/label/attribute fields available for dataset export.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueExportFieldsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/export-to-dataset/": { + "post": { + "operationId": "exportAnnotationQueueToDataset", + "description": "Export queue items to a dataset using a user-editable column mapping.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueExportToDatasetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueExportToDatasetResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/export/": { + "get": { + "operationId": "exportAnnotationQueue", + "description": "Export all items with their annotations.", + "parameters": [ + { + "name": "export_format", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "json", + "csv" + ] + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueExportAnnotationsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/hard-delete/": { + "post": { + "operationId": "model-hub_annotation-queues_hard_delete", + "summary": "Permanently remove a queue + everything attached.", + "description": "Hard delete cascades through the FK graph (rules, items,\nassignments, scores) via ``on_delete=CASCADE``. There is no\nrecovery — callers must pass ``force=true`` AND the queue's\nexact name as ``confirm_name`` so the action can't fire from\na typo'd request.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueHardDeleteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueHardDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/progress/": { + "get": { + "operationId": "getAnnotationQueueProgress", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueProgressResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/remove-label/": { + "post": { + "operationId": "removeAnnotationQueueLabel", + "description": "Remove a label from an annotation queue.", + "requestBody": { + "$ref": "#/components/requestBodies/QueueLabelRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueRemoveLabelResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/restore/": { + "post": { + "operationId": "model-hub_annotation-queues_restore", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueStatusResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{id}/update-status/": { + "post": { + "operationId": "updateAnnotationQueueStatus", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueStatusRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueStatusResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queues" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this annotation queue.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/automation-rules/": { + "get": { + "operationId": "model-hub_annotation-queues_automation-rules_list", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationRule" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "post": { + "operationId": "model-hub_annotation-queues_automation-rules_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/AutomationRule" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRule" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/": { + "get": { + "operationId": "model-hub_annotation-queues_automation-rules_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRule" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_annotation-queues_automation-rules_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/AutomationRule" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRule" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_annotation-queues_automation-rules_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/AutomationRule" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRule" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_annotation-queues_automation-rules_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this automation rule.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/": { + "post": { + "operationId": "model-hub_annotation-queues_automation-rules_evaluate", + "summary": "Trigger a manual rule run with a sync-or-async branch.", + "description": "Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish\nin the HTTP request and return 200 with the result — fast feedback\nfor the common case. Large runs (mostly first-ever runs on backlogs\nor rules with wide filters) hand the work to a Temporal activity and\nreturn 202 immediately. The activity emails creator + queue managers\non completion.\n\nThe peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub-\n100ms even on 10M+ row trace tables — so this branch costs little\neven when it ends up taking the sync path.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRuleEvaluateResponse" + } + } + } + }, + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRuleEvaluateAcceptedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this automation rule.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/": { + "get": { + "operationId": "model-hub_annotation-queues_automation-rules_preview", + "description": "Preview how many items match a rule (dry run).", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRuleEvaluateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this automation rule.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/": { + "get": { + "operationId": "listAnnotationQueueItems", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + { + "name": "source_type", + "in": "query", + "required": false, + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + { + "name": "assigned_to", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "review_status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ordering", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created_at", + "-created_at" + ] + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueItem" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true + }, + "post": { + "operationId": "model-hub_annotation-queues_items_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/QueueItem" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItem" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/add-items/": { + "post": { + "operationId": "addAnnotationQueueItems", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddItems" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueAddItemsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiSelectionTooLargeError" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/assign/": { + "post": { + "operationId": "assignAnnotationQueueItems", + "description": "Assign items to one or more annotators.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignItems" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueAssignItemsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/bulk-remove/": { + "post": { + "operationId": "removeAnnotationQueueItems", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkRemoveItems" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueBulkRemoveItemsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/next-item/": { + "get": { + "operationId": "getNextAnnotationQueueItem", + "summary": "Get the next or previous item in the queue.", + "description": "Query params:\n exclude: comma-separated item IDs to skip\n before: item ID — returns the item immediately before this one in order\n review_status: optional review status filter (for reviewer queues)\n exclude_review_status: optional review status to omit (for annotator queues)\n include_completed: when true, navigation can visit completed items too", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "exclude", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "review_status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "exclude_review_status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "include_completed", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "view_mode", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "include_all_annotations", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueNextItemResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/": { + "get": { + "operationId": "model-hub_annotation-queues_items_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItem" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_annotation-queues_items_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/QueueItem" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItem" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_annotation-queues_items_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/QueueItem" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItem" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_annotation-queues_items_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/": { + "get": { + "operationId": "getAnnotationQueueItemDetail", + "description": "Get full annotation workspace data for an item.", + "parameters": [ + { + "name": "annotator_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "include_completed", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "view_mode", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "review_status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "exclude_review_status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "include_all_annotations", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "reserve", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueAnnotateDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/": { + "get": { + "operationId": "listAnnotationQueueItemAnnotations", + "description": "List all annotations for a queue item (across all annotators).", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItemAnnotationsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ] + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/": { + "post": { + "operationId": "importAnnotationQueueItemAnnotations", + "description": "Import annotations from external sources.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportAnnotations" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueImportAnnotationsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/": { + "post": { + "operationId": "submitAnnotationQueueItemAnnotations", + "description": "Submit or update annotations for a queue item.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitAnnotations" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueSubmitAnnotationsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/complete/": { + "post": { + "operationId": "completeAnnotationQueueItem", + "description": "Mark item as completed and return next pending item.", + "requestBody": { + "$ref": "#/components/requestBodies/QueueItemNavigationRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueNavigationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/": { + "get": { + "operationId": "listAnnotationQueueItemDiscussion", + "description": "List or create non-blocking discussion comments for a queue item.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueDiscussionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Discussion" + ] + }, + "post": { + "operationId": "createAnnotationQueueItemComment", + "description": "List or create non-blocking discussion comments for a queue item.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscussionCommentRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueDiscussionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Discussion" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/": { + "post": { + "operationId": "toggleAnnotationQueueItemCommentReaction", + "description": "Toggle the current user's reaction on a discussion comment.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscussionReactionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueDiscussionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Discussion" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "comment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/": { + "post": { + "operationId": "reopenAnnotationQueueItemThread", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/DiscussionThreadStatusRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueDiscussionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Discussion" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/": { + "post": { + "operationId": "resolveAnnotationQueueItemThread", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/DiscussionThreadStatusRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueDiscussionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Discussion" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/release/": { + "post": { + "operationId": "releaseAnnotationQueueItem", + "description": "Release reservation on an item.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueReleaseReservationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/review/": { + "post": { + "operationId": "reviewAnnotationQueueItem", + "description": "Approve, request changes, or leave reviewer feedback on an item.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReviewItemRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueReviewItemResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Review" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotation-queues/{queue_id}/items/{id}/skip/": { + "post": { + "operationId": "skipAnnotationQueueItem", + "description": "Mark item as skipped and return next pending item.", + "requestBody": { + "$ref": "#/components/requestBodies/QueueItemNavigationRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueNavigationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Annotation Queue Items" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "queue_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this queue item.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/annotations-labels/": { + "get": { + "operationId": "model-hub_annotations-labels_list", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "dataset", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "text", + "numeric", + "categorical", + "star", + "thumbs_up_down" + ] + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "include_usage_count", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnnotationsLabels" + } + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "post": { + "operationId": "model-hub_annotations-labels_create", + "description": "Custom create to provide clearer error responses in GM format.", + "requestBody": { + "$ref": "#/components/requestBodies/AnnotationsLabels" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationsLabels" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/annotations-labels/{id}/": { + "get": { + "operationId": "model-hub_annotations-labels_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationsLabels" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_annotations-labels_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/AnnotationsLabels" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationsLabels" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_annotations-labels_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/AnnotationsLabels" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationsLabels" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_annotations-labels_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/annotations-labels/{id}/restore/": { + "post": { + "operationId": "model-hub_annotations-labels_restore", + "description": "Restore a soft-deleted (archived) annotation label.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationLabelRestoreResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/api-keys/": { + "get": { + "operationId": "model-hub_api-keys_list", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiKey" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "post": { + "operationId": "model-hub_api-keys_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/ApiKey" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKey" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/api-keys/{id}/": { + "get": { + "operationId": "model-hub_api-keys_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKey" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_api-keys_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/ApiKey" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKey" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_api-keys_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/ApiKey" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKey" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_api-keys_delete", + "summary": "Soft-delete an API key.", + "description": "ApiKey inherits from BaseModel, so `instance.delete()` sets:\n- deleted=True\n- deleted_at=\nand excludes it from the default manager (`objects`) queries.", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/api/models_list/": { + "get": { + "operationId": "model-hub_api_models_list_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubPaginatedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/dataset/columns/{dataset_id}/": { + "get": { + "operationId": "getDatasetColumns", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetColumnDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/dataset/{dataset_id}/annotation-summary/": { + "get": { + "operationId": "getDatasetAnnotationSummary", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationSummaryResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/dataset/{dataset_id}/eval-stats/": { + "get": { + "operationId": "getDatasetEvalStats", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetEvalStatsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/dataset/{dataset_id}/json-schema/": { + "get": { + "operationId": "getDatasetJsonSchema", + "description": "API endpoint to get JSON schemas and images metadata for columns in a dataset.\nUsed by frontend for autocomplete suggestions when accessing JSON properties\nand for indexed access to images columns.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetJsonSchemaResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/dataset/{dataset_id}/run-prompt-stats/": { + "get": { + "operationId": "model-hub_dataset_run-prompt-stats_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetRunPromptStatsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/compare/get-evals-list/": { + "post": { + "operationId": "model-hub_datasets_compare_get-evals-list_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareEvalsListRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareEvalListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/datasets/compare/preview-run-eval/": { + "post": { + "operationId": "model-hub_datasets_compare_preview-run-eval_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ComparePreviewRunEvalRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalPreviewResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/datasets/delete-compare/{compare_id}/": { + "get": { + "operationId": "model-hub_datasets_delete-compare_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDatasetRowResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_datasets_delete-compare_delete", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDatasetDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "compare_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/explanation-summary/{dataset_id}/": { + "get": { + "operationId": "model-hub_datasets_explanation-summary_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetExplanationSummaryResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/explanation-summary/{dataset_id}/refresh/": { + "post": { + "operationId": "model-hub_datasets_explanation-summary_refresh_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/ModelHubEmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetExplanationSummaryResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/get-base-columns/": { + "get": { + "operationId": "listDatasetBaseColumns", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseColumnsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [] + }, + "/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/": { + "get": { + "operationId": "model-hub_datasets_get-compare-row_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDatasetRowResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_datasets_get-compare-row_delete", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDatasetDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "compare_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "row_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/huggingface/detail/": { + "post": { + "operationId": "model-hub_datasets_huggingface_detail_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceDatasetDetailRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceDatasetDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/datasets/huggingface/list/": { + "post": { + "operationId": "model-hub_datasets_huggingface_list_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceDatasetListRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceDatasetListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/datasets/{dataset_id}/add-api-column/": { + "post": { + "operationId": "model-hub_datasets_add-api-column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddApiColumnRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DynamicColumnCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/add_vector_db_column/": { + "post": { + "operationId": "model-hub_datasets_add_vector_db_column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorDBColumnRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DynamicColumnCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/classify-column/": { + "post": { + "operationId": "model-hub_datasets_classify-column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClassifyColumnRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DynamicColumnCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/compare-datasets/": { + "post": { + "operationId": "model-hub_datasets_compare-datasets_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/CompareDataset" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDatasetResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/compare-datasets/add-eval/": { + "post": { + "operationId": "model-hub_datasets_compare-datasets_add-eval_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareExperimentEvalRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/compare-datasets/download/": { + "post": { + "operationId": "model-hub_datasets_compare-datasets_download_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/CompareDataset" + }, + "responses": { + "200": { + "description": "CSV export", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/compare-datasets/start-eval/": { + "post": { + "operationId": "model-hub_datasets_compare-datasets_start-eval_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareStartEvalsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/compare-stats/": { + "post": { + "operationId": "model-hub_datasets_compare-stats_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDatasetStatsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDatasetStatsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/conditional-column/": { + "post": { + "operationId": "model-hub_datasets_conditional-column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConditionalColumnRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DynamicColumnCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/derived-variables/": { + "get": { + "operationId": "listDatasetDerivedVariables", + "summary": "Get all derived variables from all run prompt columns in a dataset.", + "description": "This aggregates derived variables from run prompt columns that\nproduce JSON outputs, making them available for use in other\nprompts, evals, and experiments.\n\nPath params:\n - dataset_id: UUID of the dataset", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetDerivedVariablesResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/duplicate-rows/": { + "post": { + "operationId": "model-hub_datasets_duplicate-rows_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DuplicateRowsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DuplicateRowsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/duplicate/": { + "post": { + "operationId": "duplicateDataset", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DuplicateDatasetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DuplicateDatasetResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/extract-entities/": { + "post": { + "operationId": "model-hub_datasets_extract-entities_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtractEntitiesRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DynamicColumnMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/merge/": { + "post": { + "operationId": "model-hub_datasets_merge_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MergeDatasetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MergeDatasetResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/datasets/{dataset_id}/preview/{operation_type}/": { + "post": { + "operationId": "model-hub_datasets_preview_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreviewDatasetOperationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreviewDatasetOperationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation_type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/delete-eval-template/": { + "post": { + "operationId": "model-hub_delete-eval-template_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvalTemplate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubStringResultResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/add-as-new/": { + "post": { + "operationId": "model-hub_develops_add-as-new_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddAsNewDatasetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetCopyResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/add_rows_from_file/": { + "post": { + "operationId": "model-hub_develops_add_rows_from_file_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddRowsFromFileRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/add_rows_sdk/": { + "post": { + "operationId": "model-hub_develops_add_rows_sdk_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetSdkRowsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetSdkRowsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/add_run_prompt_column/": { + "post": { + "operationId": "model-hub_develops_add_run_prompt_column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddRunPrompt" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/clone-dataset/{dataset_id}/": { + "post": { + "operationId": "model-hub_develops_clone-dataset_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloneDatasetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetCopyResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/create-dataset-from-huggingface/": { + "post": { + "operationId": "model-hub_develops_create-dataset-from-huggingface_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceDatasetCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetCreateStartedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/create-dataset-from-local-file/": { + "post": { + "operationId": "createDatasetFromLocalFile", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDatasetFromLocalFileRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocalFileDatasetCreateStartedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/create-dataset-manually/": { + "post": { + "operationId": "createDatasetManually", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManualDatasetCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManualDatasetCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/create-empty-dataset/": { + "post": { + "operationId": "createEmptyDataset", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmptyDatasetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetCreateStartedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/create-synthetic-dataset/": { + "post": { + "operationId": "model-hub_develops_create-synthetic-dataset_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticDatasetCreation" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticDatasetCreateStartedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/dataset-creation-progress/{dataset_id}/": { + "get": { + "operationId": "model-hub_develops_dataset-creation-progress_read", + "description": "API endpoint to check the progress of dataset creation from file upload", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetCreationProgressResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/delete_dataset/": { + "delete": { + "operationId": "model-hub_develops_delete_dataset_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/develops/edit_run_prompt_column/": { + "post": { + "operationId": "model-hub_develops_edit_run_prompt_column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditRunPromptColumn" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/get-cell-data/": { + "post": { + "operationId": "model-hub_develops_get-cell-data_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetCellDataRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetCellDataResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/get-datasets-names/": { + "get": { + "operationId": "listDatasetNames", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetNamesResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [] + }, + "/model-hub/develops/get-datasets/": { + "get": { + "operationId": "listDatasets", + "description": "", + "parameters": [ + { + "name": "search_text", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 10 + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/get-derived-datasets/{dataset_id}/": { + "get": { + "operationId": "model-hub_develops_get-derived-datasets_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetExplanationSummaryResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/get-huggingface-dataset-config/": { + "post": { + "operationId": "model-hub_develops_get-huggingface-dataset-config_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceDatasetConfigRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceDatasetConfigResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/get-row-diff/": { + "post": { + "operationId": "model-hub_develops_get-row-diff_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/DatasetRowDiffRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentRowDiffResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/get_function_list/": { + "get": { + "operationId": "model-hub_develops_get_function_list_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalFunctionListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/develops/preview_run_prompt_column/": { + "post": { + "operationId": "model-hub_develops_preview_run_prompt_column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreviewRunPrompt" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunPromptColumnPreviewResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/develops/provider-status/": { + "get": { + "operationId": "model-hub_develops_provider-status_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderStatusResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/develops/retrieve_run_prompt_column_config/": { + "get": { + "operationId": "model-hub_develops_retrieve_run_prompt_column_config_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunPromptColumnConfigResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/develops/retrieve_run_prompt_options/": { + "get": { + "operationId": "model-hub_develops_retrieve_run_prompt_options_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunPromptOptionsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/develops/{dataset_id}/add_columns/": { + "post": { + "operationId": "addDatasetColumns", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetAddColumnsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetColumnsMutationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_empty_columns/": { + "post": { + "operationId": "model-hub_develops_add_empty_columns_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetAddEmptyColumnsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetColumnsMutationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_empty_rows/": { + "post": { + "operationId": "model-hub_develops_add_empty_rows_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetAddEmptyRowsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_multiple_static_columns/": { + "post": { + "operationId": "model-hub_develops_add_multiple_static_columns_create", + "summary": "Add multiple static columns to a dataset at once.", + "description": "Expected request data:\n{\n \"columns\": [\n {\n \"new_column_name\": \"column1\",\n \"column_type\": \"string\",\n \"source\": \"OTHERS\" # optional\n },\n {\n \"new_column_name\": \"column2\",\n \"column_type\": \"number\",\n \"source\": \"OTHERS\" # optional\n }\n ]\n}", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetMultipleStaticColumnsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_rows/": { + "post": { + "operationId": "addDatasetRows", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetAddRowsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/": { + "post": { + "operationId": "model-hub_develops_add_rows_from_existing_dataset_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetAddRowsFromExistingRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetRowsImportedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_rows_from_huggingface/": { + "post": { + "operationId": "model-hub_develops_add_rows_from_huggingface_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HuggingFaceAddRowsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetRowsImportMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_static_column/": { + "post": { + "operationId": "model-hub_develops_add_static_column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetStaticColumnRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_synthetic_data/": { + "post": { + "operationId": "model-hub_develops_add_synthetic_data_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/add_user_eval/": { + "post": { + "operationId": "model-hub_develops_add_user_eval_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserEvalMutationRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/delete_column/{column_id}/": { + "delete": { + "operationId": "deleteDatasetColumn", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "column_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/delete_row/": { + "delete": { + "operationId": "deleteDatasetRow", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/": { + "delete": { + "operationId": "model-hub_develops_delete_template_eval_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/": { + "delete": { + "operationId": "model-hub_develops_delete_user_eval_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/download_dataset/": { + "get": { + "operationId": "downloadDataset", + "description": "", + "responses": { + "200": { + "description": "CSV export", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/": { + "post": { + "operationId": "model-hub_develops_edit_and_run_user_eval_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserEvalUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/edit_dataset_behavior/": { + "put": { + "operationId": "model-hub_develops_edit_dataset_behavior_update", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetBehaviorRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/extract-json-column/": { + "post": { + "operationId": "model-hub_develops_extract-json-column_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtractJsonColumnRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DynamicColumnCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/get-dataset-table/": { + "get": { + "operationId": "getDatasetTable", + "description": "", + "parameters": [ + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 10 + } + }, + { + "name": "current_page_index", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "name": "column_config_only", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetTableResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/get-row-data/": { + "post": { + "operationId": "getDatasetRow", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetRowDataRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetRowDataResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/": { + "get": { + "operationId": "model-hub_develops_get_eval_structure_read", + "description": "", + "parameters": [ + { + "name": "eval_type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "preset", + "user", + "previously_configured" + ] + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalStructureResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/get_evals_list/": { + "get": { + "operationId": "model-hub_develops_get_evals_list_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/preview_run_eval/": { + "post": { + "operationId": "model-hub_develops_preview_run_eval_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreviewRunEvalRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalPreviewResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/start_evals_process/": { + "post": { + "operationId": "model-hub_develops_start_evals_process_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartEvalsProcessRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/": { + "post": { + "operationId": "model-hub_develops_stop_user_eval_create", + "summary": "POST /develops//stop_user_eval//\nStops a running evaluation by setting its status to Completed.", + "description": "Accepts optional experiment_id in the body. When present, the eval is\nlooked up via source_id=experiment_id (experiment-scoped UserEvalMetric)\nand cells are updated across both base columns (source_id=eval_id) and\nper-EDT columns (source_id ending with `-sourceid-{eval_id}`).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StopUserEvalRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/synthetic-config/": { + "get": { + "operationId": "model-hub_develops_synthetic-config_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticDatasetConfigResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/update-synthetic-config/": { + "put": { + "operationId": "model-hub_develops_update-synthetic-config_update", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticDatasetConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticDatasetUpdateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/update_cell_value/": { + "post": { + "operationId": "updateDatasetCell", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetUpdateCellValueRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/update_column_name/{column_id}/": { + "put": { + "operationId": "model-hub_develops_update_column_name_update", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetUpdateColumnNameRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "column_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{dataset_id}/update_column_type/{column_id}/": { + "put": { + "operationId": "model-hub_develops_update_column_type_update", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetUpdateColumnTypeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ColumnTypeConversionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "column_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{exp_dataset_id}/create-dataset/": { + "post": { + "operationId": "model-hub_develops_create-dataset_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDatasetFromExperimentRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevelopDatasetMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "exp_dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/": { + "get": { + "operationId": "model-hub_develops_get-experiment-dataset-table_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetTableResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "experiment_dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/bulk-delete/": { + "post": { + "operationId": "model-hub_eval-templates_bulk-delete_create", + "summary": "POST /model-hub/eval-templates/bulk-delete/", + "description": "Soft-delete multiple eval templates. Only user-owned templates can be deleted.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateBulkDeleteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateBulkDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/eval-templates/composite/execute-adhoc/": { + "post": { + "operationId": "model-hub_eval-templates_composite_execute-adhoc_create", + "summary": "POST /model-hub/eval-templates/composite/execute-adhoc/", + "description": "Execute a composite eval configuration without persisting it. Used by\nthe eval create page so users can test a composite (selected children +\naggregation settings) before clicking Save. Builds an unsaved parent\ntemplate and unsaved child links in memory and reuses\n`execute_composite_children_sync` so semantics match the persisted path.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalAdhocExecuteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalExecuteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/eval-templates/create-composite/": { + "post": { + "operationId": "model-hub_eval-templates_create-composite_create", + "summary": "POST /model-hub/eval-templates/create-composite/", + "description": "Create a composite eval from a list of existing eval template IDs.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/eval-templates/create-v2/": { + "post": { + "operationId": "model-hub_eval-templates_create-v2_create", + "summary": "POST /model-hub/eval-templates/create-v2/", + "description": "Create a single eval template with the revamped schema.\nSupports the new scoring fields (pass_threshold, choice_scores, output_type_normalized).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateCreateV2Request" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/eval-templates/list-charts/": { + "post": { + "operationId": "model-hub_eval-templates_list-charts_create", + "summary": "POST /model-hub/eval-templates/list-charts/", + "description": "Returns 30-day chart data (run counts + error rates) for a list of template IDs.\nUses ClickHouse for fast analytics. Called separately from the list API so the\ntable renders instantly while charts load async.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateListChartsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateListChartsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/eval-templates/list/": { + "post": { + "operationId": "model-hub_eval-templates_list_create", + "summary": "POST /model-hub/eval-templates/list/", + "description": "Returns paginated eval template list with filtering, search, and 30-day metrics.\nAll inputs and outputs are validated with Pydantic schemas.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalListRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/eval-templates/{template_id}/composite/": { + "get": { + "operationId": "model-hub_eval-templates_composite_list", + "summary": "GET /model-hub/eval-templates//composite/", + "description": "Get composite eval detail with its children.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_eval-templates_composite_partial_update", + "summary": "PATCH — partial update of a composite eval.", + "description": "Supported fields (all optional):\n name, description, tags,\n aggregation_enabled, aggregation_function,\n child_template_ids (replaces the child list),\n child_weights (map of child_id -> weight).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/composite/execute/": { + "post": { + "operationId": "model-hub_eval-templates_composite_execute_create", + "summary": "POST /model-hub/eval-templates//composite/execute/", + "description": "Execute all child evals in a composite and optionally aggregate results.\nThin wrapper around `execute_composite_children_sync` — the same helper\nthe dataset/experiment `CompositeEvaluationRunner` uses, so aggregation\nsemantics stay consistent across surfaces.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalExecuteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompositeEvalExecuteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/detail/": { + "get": { + "operationId": "model-hub_eval-templates_detail_list", + "summary": "GET /model-hub/eval-templates//detail/", + "description": "Fetch a single eval template with all revamped fields.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/feedback-list/": { + "get": { + "operationId": "model-hub_eval-templates_feedback-list_list", + "summary": "GET /model-hub/eval-templates//feedback-list/", + "description": "Paginated feedback list with user info.\nQuery params: page (0-based), page_size", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalFeedbackListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/ground-truth-config/": { + "get": { + "operationId": "model-hub_eval-templates_ground-truth-config_list", + "summary": "GET/PUT /model-hub/eval-templates//ground-truth-config/", + "description": "Manages ground truth configuration on the eval template's config JSONField.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroundTruthConfigResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_eval-templates_ground-truth-config_update", + "summary": "GET/PUT /model-hub/eval-templates//ground-truth-config/", + "description": "Manages ground truth configuration on the eval template's config JSONField.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroundTruthConfigRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroundTruthConfigResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/ground-truth/": { + "get": { + "operationId": "model-hub_eval-templates_ground-truth_list", + "description": "GET /model-hub/eval-templates//ground-truth/", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroundTruthListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/ground-truth/upload/": { + "post": { + "operationId": "model-hub_eval-templates_ground-truth_upload_create", + "summary": "POST /model-hub/eval-templates//ground-truth/upload/", + "description": "Supports two modes:\n1. JSON body: { name, columns, data, ... }\n2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroundTruthUploadRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroundTruthUploadResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/update/": { + "put": { + "operationId": "model-hub_eval-templates_update_update", + "summary": "PUT /model-hub/eval-templates//update/", + "description": "Update an eval template. Only user-owned templates can be updated.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateUpdateV2Request" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateUpdateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/usage/": { + "get": { + "operationId": "model-hub_eval-templates_usage_list", + "summary": "GET /model-hub/eval-templates//usage/", + "description": "Returns usage stats, chart data, and paginated eval logs.\nQuery params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d)", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalUsageStatsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/versions/": { + "get": { + "operationId": "model-hub_eval-templates_versions_list", + "summary": "GET /model-hub/eval-templates//versions/", + "description": "List all versions for an eval template.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateVersionListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/versions/create/": { + "post": { + "operationId": "model-hub_eval-templates_versions_create_create", + "summary": "POST /model-hub/eval-templates//versions/create/", + "description": "Create a new version snapshot from the current template state.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateVersionCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateVersionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/versions/{version_id}/restore/": { + "post": { + "operationId": "model-hub_eval-templates_versions_restore_create", + "summary": "POST /model-hub/eval-templates//versions//restore/", + "description": "Restore a version by creating a new version with the old version's config.\nDoes NOT modify the old version — creates a new one on top.", + "requestBody": { + "$ref": "#/components/requestBodies/ModelHubEmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateVersionRestoreResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/": { + "put": { + "operationId": "model-hub_eval-templates_versions_set-default_update", + "summary": "PUT /model-hub/eval-templates//versions//set-default/", + "description": "Set a specific version as the default (active) version.", + "requestBody": { + "$ref": "#/components/requestBodies/ModelHubEmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTemplateVersionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/": { + "post": { + "operationId": "createExperiment", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentCreateV2" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentStringResultResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/experiments/v2/delete/": { + "delete": { + "operationId": "deleteExperiments", + "description": "V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs.", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [] + }, + "/model-hub/experiments/v2/list/": { + "get": { + "operationId": "listExperiments", + "description": "V2 experiment list with filtering, search, and pagination.", + "parameters": [ + { + "name": "created_at", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "dataset_id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "A search term.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ordering", + "in": "query", + "description": "Which field to use when ordering the results.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentListV2" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [] + }, + "/model-hub/experiments/v2/re-run/": { + "post": { + "operationId": "rerunExperiment", + "summary": "V2 re-run: org-scoped, uses V2 Temporal workflow.", + "description": "No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID\nreuse policy automatically cancels any running workflow with the same ID.\nCell reset is handled by the workflow itself (cleanup + setup activities).", + "requestBody": { + "$ref": "#/components/requestBodies/ExperimentRerunRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentStringResultResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/experiments/v2/row-diff/": { + "post": { + "operationId": "model-hub_experiments_v2_row-diff_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/DatasetRowDiffRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentRowDiffResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/experiments/v2/suggest-name/{dataset_id}/": { + "get": { + "operationId": "model-hub_experiments_v2_suggest-name_read", + "description": "Generate a suggested experiment name for a dataset.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentNameSuggestionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/validate-name/": { + "get": { + "operationId": "model-hub_experiments_v2_validate-name_list", + "description": "Validate that an experiment name is unique within a dataset.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentNameValidationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/experiments/v2/{experiment_id}/": { + "get": { + "operationId": "getExperiment", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentV2DetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "put": { + "operationId": "updateExperiment", + "summary": "Update a V2 experiment with diff-based selective re-run.", + "description": "Editable fields: column_id, prompt_config, user_eval_metrics.\nRe-run triggers (determined by fingerprint diffs, not field presence):\n- prompt_config has new/modified entries → re-run those configs + ALL dependent evals\n- user_eval_metrics has new/modified entries → re-run only those evals\n- column_id changed → delete old base eval columns, re-run base evals\n- If FE sends unchanged data, diffs return empty → no re-run", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentUpdateV2" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentV2DetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/compare-experiments/": { + "post": { + "operationId": "compareExperiments", + "description": "V2 compare view: reads from experiment_datasets FK + snapshot_dataset.", + "requestBody": { + "$ref": "#/components/requestBodies/ExperimentComparisonWeightsRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentDatasetComparisonResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/comparisons/": { + "get": { + "operationId": "listExperimentComparisons", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentComparisonDetailsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/derived-variables/": { + "get": { + "operationId": "model-hub_experiments_v2_derived-variables_list", + "description": "Get derived variables from run prompt columns in an experiment's snapshot dataset.\nDelegates to the existing get_dataset_derived_variables() service function.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentDerivedVariablesResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/download/": { + "get": { + "operationId": "downloadExperiment", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "description": "CSV file download.", + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/": { + "get": { + "operationId": "model-hub_experiments_v2_evaluations_stats_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentEvaluationStatsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "evaluation_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/feedback/": { + "post": { + "operationId": "model-hub_experiments_v2_feedback_create", + "description": "Create a feedback record scoped to an experiment.", + "requestBody": { + "$ref": "#/components/requestBodies/Feedback" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentFeedbackCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/": { + "get": { + "operationId": "model-hub_experiments_v2_feedback_get-feedback-details_list", + "description": "Get previous feedback details for a metric+row in an experiment.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentFeedbackDetailsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/feedback/get-template/": { + "get": { + "operationId": "model-hub_experiments_v2_feedback_get-template_list", + "description": "Get evaluation template details for rendering the feedback form.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentFeedbackTemplateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/": { + "post": { + "operationId": "model-hub_experiments_v2_feedback_submit-feedback_create", + "description": "Submit feedback action — triggers temporal eval rerun for experiments.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentFeedbackSubmitRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentFeedbackSubmitResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/json-schema/": { + "get": { + "operationId": "getExperimentJsonSchema", + "description": "Get JSON schemas and images metadata for columns in an experiment's snapshot dataset.\nDelegates to the shared get_json_column_schemas() function.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentJsonSchemaResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/rerun-cells/": { + "post": { + "operationId": "model-hub_experiments_v2_rerun-cells_create", + "summary": "Rerun specific cells or columns in a V2 experiment.", + "description": "Accepts source_ids (EDT IDs for full column rerun) and/or\ncells ({source_id, row_id} pairs for individual cell rerun).\nResets affected output cells and dependent eval cells to RUNNING,\nthen starts a RerunCellsV2Workflow.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentRerunCells" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentWorkflowResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/rows/": { + "get": { + "operationId": "listExperimentRows", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentTableRowsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/rows/{row_id}/": { + "get": { + "operationId": "getExperimentRow", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentTableRowsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "row_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/stats/": { + "get": { + "operationId": "getExperimentStats", + "description": "Stats view for V2 experiments that read from snapshot_dataset.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentStatsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ] + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/experiments/v2/{experiment_id}/stop/": { + "post": { + "operationId": "stopExperiment", + "summary": "Stop a running V2 experiment.", + "description": "Cancels all Temporal workflows (main + reruns). DB cleanup (marking\nRUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED)\nis handled by each workflow's CancelledError handler via the\nstop_experiment_cleanup_activity.", + "requestBody": { + "$ref": "#/components/requestBodies/ModelHubEmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentStopResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Experiments" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "experiment_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/knowledge-base/": { + "get": { + "operationId": "model-hub_knowledge-base_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseSdkCodeResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "post": { + "operationId": "model-hub_knowledge-base_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/LegacyKnowledgeBaseMutationRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "patch": { + "operationId": "model-hub_knowledge-base_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/LegacyKnowledgeBaseMutationRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseMutationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "delete": { + "operationId": "model-hub_knowledge-base_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/knowledge-base/files/": { + "post": { + "operationId": "model-hub_knowledge-base_files_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseFilesRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseFilesResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "delete": { + "operationId": "model-hub_knowledge-base_files_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/knowledge-base/get/": { + "get": { + "operationId": "model-hub_knowledge-base_get_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseTableResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/knowledge-base/list/": { + "get": { + "operationId": "model-hub_knowledge-base_list_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-history-executions/": { + "get": { + "operationId": "model-hub_prompt-history-executions_list", + "description": "", + "parameters": [ + { + "name": "template_name", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "template_version", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "created_at", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "A search term.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ordering", + "in": "query", + "description": "Which field to use when ordering the results.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptHistoryExecution" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-history-executions/execution-details/{execution_id}/": { + "get": { + "operationId": "model-hub_prompt-history-executions_get_execution_details", + "description": "Get detailed information about a specific PromptVersion", + "parameters": [ + { + "name": "template_name", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "template_version", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "created_at", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "A search term.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ordering", + "in": "query", + "description": "Which field to use when ordering the results.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptHistoryExecution" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/prompt-history-executions/{id}/": { + "get": { + "operationId": "model-hub_prompt-history-executions_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptHistoryExecution" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt version.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-labels/": { + "get": { + "operationId": "model-hub_prompt-labels_list", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "post": { + "operationId": "model-hub_prompt-labels_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-labels/assign-multiple-labels/": { + "post": { + "operationId": "model-hub_prompt-labels_assign_multiple_labels", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-labels/create-system-labels/": { + "post": { + "operationId": "model-hub_prompt-labels_create_system_labels", + "description": "Create (idempotently) Production, Staging, Development system labels for the caller's org.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-labels/get-by-name/": { + "get": { + "operationId": "model-hub_prompt-labels_get_by_name", + "summary": "Fetch a prompt version by template name and either explicit version or label.", + "description": "Query params:\n - name: template name (required)\n - version: version name like v1 (optional)\n - label: label name like Production/Staging/Development or custom (optional)", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-labels/remove/": { + "post": { + "operationId": "model-hub_prompt-labels_remove_label_from_version", + "description": "Detach label from a prompt version.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-labels/set-default/": { + "post": { + "operationId": "model-hub_prompt-labels_set_default", + "description": "Set default version for a template by name and version.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-labels/template-labels/": { + "get": { + "operationId": "model-hub_prompt-labels_template_labels", + "description": "List versions with labels for a template by name or id.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-labels/{id}/": { + "get": { + "operationId": "model-hub_prompt-labels_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_prompt-labels_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_prompt-labels_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_prompt-labels_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/": { + "post": { + "operationId": "model-hub_prompt-labels_assign_label_by_id", + "description": "Assign a label to a specific version by template name and version name.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptLabel" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "label_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/prompt-templates/": { + "get": { + "operationId": "model-hub_prompt-templates_list", + "description": "", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "created_at", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "A search term.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ordering", + "in": "query", + "description": "Which field to use when ordering the results.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "post": { + "operationId": "model-hub_prompt-templates_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/analyze-prompt/": { + "post": { + "operationId": "model-hub_prompt-templates_analyze_prompt", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/bulk-delete/": { + "post": { + "operationId": "model-hub_prompt-templates_bulk_delete", + "description": "Bulk delete prompt templates", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/create-draft/": { + "post": { + "operationId": "model-hub_prompt-templates_create_draft", + "description": "Create a draft version of the PromptTemplate and return its details.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/derived-variables/preview/": { + "post": { + "operationId": "model-hub_prompt-templates_derived-variables_preview_create", + "summary": "Preview derived variables from JSON content without saving.", + "description": "Useful for showing what variables would be extracted before running.\n\nRequest body:\n - content: JSON string or object to analyze\n - column_name: Name for the variable prefix", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DerivedVariablePreviewRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DerivedVariableDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/prompt-templates/generate-prompt/": { + "post": { + "operationId": "model-hub_prompt-templates_generate_prompt", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/generate-variables/": { + "post": { + "operationId": "model-hub_prompt-templates_generate_variables", + "summary": "Generate synthetic data for prompt variables using the SyntheticDataAgent.", + "description": "Expected payload:\n{\n \"prompt_name\": \"string\",\n \"prompt_instructions\": \"list/array\" ,\n \"variable_names\": [\"string\"],\n \"variable_count\": \"int\",\n \"generation_type\": \"prompt\"\n}", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/get-template-by-name/": { + "get": { + "operationId": "model-hub_prompt-templates_get_template_by_name", + "description": "Retrieve a prompt template by name.\nIf no version is specified, returns the default version (is_default=True).\nIf a version is specified, returns that specific version.", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "created_at", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "A search term.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ordering", + "in": "query", + "description": "Which field to use when ordering the results.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/improve-prompt/": { + "post": { + "operationId": "model-hub_prompt-templates_improve_prompt", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [] + }, + "/model-hub/prompt-templates/{id}/": { + "get": { + "operationId": "model-hub_prompt-templates_read", + "description": "Retrieve a prompt template with version history and execution data.\nHandles caching and error cases.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_prompt-templates_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_prompt-templates_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_prompt-templates_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/add-new-draft/": { + "post": { + "operationId": "model-hub_prompt-templates_add_new_draft", + "description": "Create a new draft version of the PromptTemplate and return its details.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/all-variables/": { + "get": { + "operationId": "model-hub_prompt-templates_get_all_variables", + "description": "Get all variables from template and its executions", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/commit/": { + "post": { + "operationId": "model-hub_prompt-templates_commit", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/compare-versions/": { + "post": { + "operationId": "model-hub_prompt-templates_compare_versions", + "description": "Compare different versions of the PromptTemplate.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/delete-evaluation-config/": { + "delete": { + "operationId": "model-hub_prompt-templates_delete_evaluation_config", + "summary": "Delete an evaluation configuration by name from a PromptTemplate.", + "description": "This endpoint allows removing an evaluation configuration from a PromptTemplate\nbased on its unique name.", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/evaluation-configs/": { + "get": { + "operationId": "model-hub_prompt-templates_get_evaluation_configs", + "description": "Get the evaluation configurations for a specific prompt template.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/evaluations/": { + "get": { + "operationId": "model-hub_prompt-templates_retrieve_evaluations", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/get-next-version/": { + "get": { + "operationId": "model-hub_prompt-templates_get_next_version", + "description": "Get the next version of the PromptTemplate", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/get-run-status/": { + "get": { + "operationId": "model-hub_prompt-templates_get_run_status", + "description": "Get the current status and results of a template run", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/get-sdk-code/{language}/": { + "get": { + "operationId": "model-hub_prompt-templates_get_sdk_code", + "description": "Get the prompt code in the requested format. If no format is specified, returns all formats.\nSupported languages: python, typescript, curl, langchain, nodejs, go", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "language", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/": { + "post": { + "operationId": "model-hub_prompt-templates_run_evals_on_multiple_versions", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/run_template/": { + "post": { + "operationId": "model-hub_prompt-templates_run_template", + "description": "Run a prompt template with the given configuration.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/save-name/": { + "post": { + "operationId": "model-hub_prompt-templates_save_name", + "description": "Save/update the name for a template.", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/save-prompt-folder/": { + "post": { + "operationId": "model-hub_prompt-templates_save_prompt_folder", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/set_default/": { + "post": { + "operationId": "model-hub_prompt-templates_set_default", + "description": "Set a specific version of a prompt template as default", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/stop-streaming/": { + "get": { + "operationId": "model-hub_prompt-templates_stop_streaming", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/update-evaluation-configs/": { + "post": { + "operationId": "model-hub_prompt-templates_update_evaluation_configs", + "summary": "Add or update evaluation configurations for a PromptTemplate.", + "description": "This endpoint allows adding new evaluation configurations or updating\nexisting ones in a PromptTemplate. If is_run is true, it will also\nrun evaluations on specified versions (or latest version if none specified).", + "requestBody": { + "$ref": "#/components/requestBodies/PromptTemplate" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{id}/versions/": { + "get": { + "operationId": "model-hub_prompt-templates_versions", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A UUID string identifying this prompt template.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ] + }, + "/model-hub/prompt-templates/{prompt_id}/derived-variables/": { + "get": { + "operationId": "model-hub_prompt-templates_derived-variables_list", + "summary": "Get all derived variables for a prompt template.", + "description": "Returns derived variables from JSON outputs across all versions.\n\nQuery params:\n - version: Optional version filter\n - column_name: Optional column name filter", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptDerivedVariablesResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "prompt_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/": { + "post": { + "operationId": "model-hub_prompt-templates_derived-variables_extract_create", + "summary": "Manually trigger extraction of derived variables from outputs.", + "description": "This is useful when you want to re-extract variables or extract from\nexisting outputs that weren't processed.\n\nRequest body:\n - version: Version to extract from\n - column_name: Name for the output column\n - output_index: Optional specific output index (default: 0)\n - response_format_type: Optional response format hint", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DerivedVariableExtractRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DerivedVariableDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "prompt_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/": { + "get": { + "operationId": "model-hub_prompt-templates_derived-variables_schema_list", + "summary": "Get the schema for derived variables of a specific column.", + "description": "Returns detailed schema information including types and sample values.\n\nPath params:\n - prompt_id: UUID of the prompt template\n - column_name: Name of the column\n\nQuery params:\n - version: Optional version filter", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DerivedVariableDetailResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "prompt_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "column_name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/model-hub/scores/": { + "get": { + "operationId": "model-hub_scores_list", + "summary": "Universal Score CRUD.", + "description": "GET /model-hub/scores/?source_type=trace&source_id=\nPOST /model-hub/scores/ (single score)\nPOST /model-hub/scores/bulk/ (multiple scores on one source)\nDELETE /model-hub/scores//", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "source_type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "dataset_row", + "trace", + "observation_span", + "prototype_run", + "call_execution", + "trace_session" + ] + } + }, + { + "name": "source_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "label_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "annotator_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Score" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true + }, + "post": { + "operationId": "model-hub_scores_create", + "description": "Create a single score.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScore" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScoreResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/scores/bulk/": { + "post": { + "operationId": "model-hub_scores_bulk_create", + "description": "Create multiple scores on a single source (e.g. from inline annotator).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkCreateScores" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkCreateScoresResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/scores/for-source/": { + "get": { + "operationId": "model-hub_scores_for_source", + "description": "Get all scores for a specific source.\nGET /model-hub/scores/for-source/?source_type=trace&source_id=", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "source_type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "dataset_row", + "trace", + "observation_span", + "prototype_run", + "call_execution", + "trace_session" + ] + } + }, + { + "name": "source_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScoreForSourceResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/model-hub/scores/{id}/": { + "get": { + "operationId": "model-hub_scores_read", + "summary": "Universal Score CRUD.", + "description": "GET /model-hub/scores/?source_type=trace&source_id=\nPOST /model-hub/scores/ (single score)\nPOST /model-hub/scores/bulk/ (multiple scores on one source)\nDELETE /model-hub/scores//", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Score" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "put": { + "operationId": "model-hub_scores_update", + "summary": "Universal Score CRUD.", + "description": "GET /model-hub/scores/?source_type=trace&source_id=\nPOST /model-hub/scores/ (single score)\nPOST /model-hub/scores/bulk/ (multiple scores on one source)\nDELETE /model-hub/scores//", + "requestBody": { + "$ref": "#/components/requestBodies/Score" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Score" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "patch": { + "operationId": "model-hub_scores_partial_update", + "summary": "Universal Score CRUD.", + "description": "GET /model-hub/scores/?source_type=trace&source_id=\nPOST /model-hub/scores/ (single score)\nPOST /model-hub/scores/bulk/ (multiple scores on one source)\nDELETE /model-hub/scores//", + "requestBody": { + "$ref": "#/components/requestBodies/Score" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Score" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "delete": { + "operationId": "model-hub_scores_delete", + "summary": "Soft-delete a score.", + "description": "Only the annotator who created the score or an org Owner/Admin may\ndelete it.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScoreDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "409": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "model-hub" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/sdk/api/v1/configure-evaluations/": { + "post": { + "operationId": "sdk_api_v1_configure-evaluations_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKConfigureEvaluationsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKConfigureEvaluationsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/sdk/api/v1/eval/": { + "post": { + "operationId": "sdk_api_v1_eval_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKStandaloneEvalRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKStandaloneEvalResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/sdk/api/v1/eval/{eval_id}/": { + "get": { + "operationId": "sdk_api_v1_eval_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKEvalTemplateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ] + }, + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/sdk/api/v1/evaluate-pipeline/": { + "get": { + "operationId": "sdk_api_v1_evaluate-pipeline_list", + "description": "", + "parameters": [ + { + "name": "project_name", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "versions", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKCICDEvaluationRunsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "post": { + "operationId": "sdk_api_v1_evaluate-pipeline_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CICDJob" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKCICDEvaluationRunAcceptedResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/sdk/api/v1/get-evals/": { + "get": { + "operationId": "sdk_api_v1_get-evals_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKGetEvalsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ] + }, + "parameters": [] + }, + "/sdk/api/v1/new-eval/": { + "get": { + "operationId": "sdk_api_v1_new-eval_list", + "description": "", + "parameters": [ + { + "name": "eval_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKStandaloneEvalV2Response" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "post": { + "operationId": "sdk_api_v1_new-eval_create", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKStandaloneEvalV2Request" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKStandaloneEvalResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "sdk" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/sdk/api/v1/simulation/analytics/": { + "get": { + "operationId": "getSimulationAnalytics", + "summary": "GET /simulation/analytics/", + "description": "Aggregated analytics view: eval scores (radar chart data), critical issues,\nFMA suggestions. Corresponds to the Analytics tab in the UI.", + "parameters": [ + { + "name": "run_test_name", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "execution_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "eval_name", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "summary", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKSimulationAnalyticsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulations" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/sdk/api/v1/simulation/metrics/": { + "get": { + "operationId": "listSimulationMetrics", + "summary": "GET /simulation/metrics/", + "description": "Aggregated system metrics: latency (by subsystem), cost, conversation metrics.", + "parameters": [ + { + "name": "run_test_name", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "execution_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "call_execution_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKSimulationMetricsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulations" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/sdk/api/v1/simulation/runs/": { + "get": { + "operationId": "listSimulationRuns", + "summary": "GET /simulation/runs/", + "description": "Run-level records with eval scores, scenario metadata, call details.", + "parameters": [ + { + "name": "run_test_name", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "execution_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "call_execution_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "eval_name", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "summary", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKSimulationRunsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SDKErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulations" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/agent-definitions/": { + "get": { + "operationId": "listAgentDefinitions", + "description": "Get paginated list of agent definitions for the user's organization.", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "agent_type", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "enum": [ + "voice", + "text" + ] + } + }, + { + "name": "agent_definition_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentDefinitionListResponse" + } + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Agent Definitions" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "delete": { + "operationId": "simulate_agent-definitions_delete", + "description": "Bulk soft-delete agent definitions.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionBulkDeleteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionBulkDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/agent-definitions/create/": { + "post": { + "operationId": "createAgentDefinition", + "description": "Create a new agent definition with its first version.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Agent Definitions" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/agent-definitions/{agent_id}/": { + "get": { + "operationId": "getAgentDefinition", + "description": "Get details of a specific agent definition with version information.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Agent Definitions" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/delete/": { + "delete": { + "operationId": "deleteAgentDefinition", + "description": "Soft delete an agent definition.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionDeleteResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Agent Definitions" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/edit/": { + "put": { + "operationId": "updateAgentDefinition", + "description": "Update an existing agent definition.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionEditRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentDefinitionEditResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Agent Definitions" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/": { + "get": { + "operationId": "simulate_agent-definitions_versions_list", + "description": "Get all versions of a specific agent definition.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentVersionListResponse" + } + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/create/": { + "post": { + "operationId": "simulate_agent-definitions_versions_create_create", + "description": "Create a new version of an agent definition.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/": { + "get": { + "operationId": "simulate_agent-definitions_versions_read", + "description": "Get details of a specific agent version.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/": { + "post": { + "operationId": "simulate_agent-definitions_versions_activate_create", + "description": "Activate a specific agent version.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionActivateResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/": { + "get": { + "operationId": "simulate_agent-definitions_versions_call-executions_list", + "description": "Get the call executions of an agent version.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallExecution" + } + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/": { + "delete": { + "operationId": "simulate_agent-definitions_versions_delete_delete", + "description": "Soft delete an agent version.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/": { + "get": { + "operationId": "simulate_agent-definitions_versions_eval-summary_list", + "description": "Get the eval summary of an agent version.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalSummaryResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/": { + "post": { + "operationId": "simulate_agent-definitions_versions_restore_create", + "description": "Restore agent definition from a specific version.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionRestoreResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/api/call-executions/": { + "get": { + "operationId": "simulate_api_call-executions_list", + "description": "Get paginated list of call executions for the user's organization\nQuery Parameters:\n- search: search string to filter call executions by phone number or scenario name\n- status: filter by call status\n- test_execution_id: filter by specific test execution\n- limit: number of items per page (default: 10)\n- page: page number (default: 1)", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "test_execution_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallExecution" + } + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/api/personas/": { + "get": { + "operationId": "listPersonas", + "description": "List personas with pagination", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonaList" + } + } + } + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Personas" + ] + }, + "post": { + "operationId": "createPersona", + "description": "Create a new workspace-level persona", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonaCreate" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonaCreate" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Personas" + ] + }, + "parameters": [] + }, + "/simulate/api/personas/duplicate/{persona_id}/": { + "post": { + "operationId": "simulate_api_personas_duplicate_create", + "description": "Duplicate a persona by ID", + "requestBody": { + "$ref": "#/components/requestBodies/PersonaDuplicateRequest" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonaDuplicateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "persona_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/api/personas/field-options/": { + "get": { + "operationId": "simulate_api_personas_field_options", + "description": "Get field options/choices for persona creation", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PersonaFieldOptions" + } + } + } + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [] + }, + "/simulate/api/personas/system/": { + "get": { + "operationId": "simulate_api_personas_system_personas", + "description": "Get only system-level personas", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Persona" + } + } + } + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [] + }, + "/simulate/api/personas/workspace/": { + "get": { + "operationId": "simulate_api_personas_workspace_personas", + "description": "Get only workspace-level personas", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Persona" + } + } + } + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [] + }, + "/simulate/api/personas/{id}/": { + "get": { + "operationId": "getPersona", + "description": "Retrieve a specific persona", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Persona" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Personas" + ] + }, + "put": { + "operationId": "simulate_api_personas_update", + "description": "Update a persona (workspace-level only)", + "requestBody": { + "$ref": "#/components/requestBodies/Persona" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Persona" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "patch": { + "operationId": "updatePersona", + "description": "ViewSet for managing Personas.", + "requestBody": { + "$ref": "#/components/requestBodies/Persona" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Persona" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Personas" + ] + }, + "delete": { + "operationId": "deletePersona", + "description": "Delete a persona (workspace-level only)", + "responses": { + "204": { + "description": "Response" + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Personas" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/api/personas/{id}/duplicate/": { + "post": { + "operationId": "simulate_api_personas_duplicate", + "description": "Duplicate a persona (creates a workspace-level copy)", + "requestBody": { + "$ref": "#/components/requestBodies/PersonaDuplicateRequest" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonaDuplicateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/api/run-tests/": { + "get": { + "operationId": "simulate_api_run-tests_list", + "description": "Get paginated list of run tests for the user's organization\nQuery Parameters:\n- search: search string to filter run tests by name\n- limit: number of items per page (default: 10)\n- page: page number (default: 1)", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "simulation_type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "agent_definition", + "prompt" + ] + } + }, + { + "name": "prompt_template_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunTestResponse" + } + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/api/test-executions/": { + "get": { + "operationId": "listTestExecutions", + "description": "Get paginated list of test executions for the user's organization\nQuery Parameters:\n- search: search string to filter test executions by run test name\n- status: filter by execution status\n- limit: number of items per page (default: 10)\n- page: page number (default: 1)", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TestExecution" + } + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Test Executions" + ] + }, + "parameters": [] + }, + "/simulate/call-executions/{call_execution_id}/": { + "get": { + "operationId": "simulate_call-executions_read", + "description": "Get a specific call execution with all its details", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionDetail" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "patch": { + "operationId": "simulate_call-executions_partial_update", + "description": "Update the status of a specific call execution", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionStatusUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecution" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/call-executions/{call_execution_id}/branch-analysis/": { + "get": { + "operationId": "simulate_call-executions_branch-analysis_list", + "description": "Analyze a call execution against graph branches and identify deviations", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallBranchAnalysisResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "post": { + "operationId": "simulate_call-executions_branch-analysis_create", + "description": "Create deviation nodes and edges for a call execution", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallBranchDeviationCreateResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/call-executions/{call_execution_id}/chat/send-message/": { + "post": { + "operationId": "simulate_call-executions_chat_send-message_create", + "description": "Send a message to a chat execution", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendChatRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSendMessageResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/call-executions/{call_execution_id}/delete/": { + "delete": { + "operationId": "simulate_call-executions_delete_delete", + "description": "Delete a specific call execution", + "responses": { + "204": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionDeleteResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/call-executions/{call_execution_id}/error-localizer-tasks/": { + "get": { + "operationId": "simulate_call-executions_error-localizer-tasks_list", + "description": "Get error localizer tasks for a specific call execution", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorLocalizerTasksResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/call-executions/{call_execution_id}/logs/": { + "get": { + "operationId": "simulate_call-executions_logs_list", + "description": "Paginated API to retrieve stored log entries for a call execution.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionLogsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/call-executions/{call_execution_id}/session-comparison/": { + "get": { + "operationId": "simulate_call-executions_session-comparison_list", + "description": "API View to compare session chat simulations", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionComparisonResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/call-executions/{call_execution_id}/transcripts/": { + "get": { + "operationId": "simulate_call-executions_transcripts_list", + "description": "Get transcripts for a specific call execution", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallTranscriptResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "call_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/export/{item_id}/": { + "get": { + "operationId": "simulate_export_read", + "description": "Export data as CSV based on type parameter\nQuery Parameters:\n- type: 'runtest' or 'testexecution' (required)\n- search: search string to filter call executions by phone number or scenario name\n- status: filter by call execution status", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Export source type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "runtest", + "testexecution" + ] + } + }, + { + "name": "search", + "in": "query", + "description": "Optional call-execution search term.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "Optional call-execution status filter.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "CSV export", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "item_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/prompt-simulations/scenarios/": { + "get": { + "operationId": "simulate_prompt-simulations_scenarios_list", + "summary": "Get list of scenarios available for prompt simulations.", + "description": "Query Parameters:\n- limit: number of items per page (default: 20)\n- page: page number (default: 1)\n- search: search string to filter scenarios by name", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptSimulationScenariosResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [] + }, + "/simulate/prompt-templates/{prompt_template_id}/simulations/": { + "get": { + "operationId": "simulate_prompt-templates_simulations_list", + "summary": "Get paginated list of simulation runs for a specific prompt template.", + "description": "Query Parameters:\n- limit: number of items per page (default: 10)\n- page: page number (default: 1)\n- version_id: filter by specific prompt version", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptSimulationListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "post": { + "operationId": "simulate_prompt-templates_simulations_create", + "summary": "Create a new prompt-based simulation run.", + "description": "Request Body:\n- name: Name of the simulation run\n- description: Optional description\n- prompt_version_id: The prompt version to use\n- scenario_ids: List of scenario IDs to run\n- dataset_row_ids: Optional list of specific row IDs\n- evaluations_config: Optional evaluation configurations\n- enable_tool_evaluation: Optional boolean to enable tool evaluation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePromptSimulationRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptSimulationRunResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "prompt_template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/": { + "get": { + "operationId": "simulate_prompt-templates_simulations_read", + "description": "Retrieve a specific prompt simulation run.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptSimulationRunResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "patch": { + "operationId": "simulate_prompt-templates_simulations_partial_update", + "description": "Update a prompt simulation run (version, scenarios, etc.).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptSimulationUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptSimulationRunResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "delete": { + "operationId": "simulate_prompt-templates_simulations_delete", + "description": "Soft delete a prompt simulation run.", + "responses": { + "204": { + "description": "Response" + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "prompt_template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/": { + "post": { + "operationId": "simulate_prompt-templates_simulations_execute_create", + "summary": "Execute a prompt-based simulation run.", + "description": "Request Body (optional):\n- scenario_ids: List of specific scenario IDs to run (default: all scenarios)\n- select_all: If true, run all scenarios except ones in scenario_ids", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutePromptSimulationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutePromptSimulationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "prompt_template_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/": { + "get": { + "operationId": "listRunTests", + "description": "Get paginated list of run tests for the user's organization\nQuery Parameters:\n- search: search string to filter run tests by name\n- limit: number of items per page (default: 10)\n- page: page number (default: 1)\n- simulation_type: filter by source type (RunTest.SourceTypes values:\n 'agent_definition' or 'prompt')\n- prompt_template_id: filter by prompt template ID (used when\n simulation_type is 'prompt')", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "simulation_type", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "agent_definition", + "prompt" + ] + } + }, + { + "name": "prompt_template_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunTestResponse" + } + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/run-tests/active/": { + "get": { + "operationId": "simulate_run-tests_active_list", + "description": "Get all active tests", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllActiveTests" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [] + }, + "/simulate/run-tests/create/": { + "post": { + "operationId": "createRunTest", + "description": "Create a new RunTest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRunTest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/run-tests/get-id-by-name/{run_test_name}/": { + "get": { + "operationId": "simulate_run-tests_get-id-by-name_read", + "description": "API View to get the id of a run test by name", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestNameResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "run_test_name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/": { + "get": { + "operationId": "getRunTest", + "description": "Retrieve a specific RunTest", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ] + }, + "patch": { + "operationId": "updateRunTest", + "description": "Update a specific RunTest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRunTest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "delete": { + "operationId": "deleteRunTest", + "description": "Delete a specific RunTest (soft delete)", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestMessageResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/analytics/": { + "get": { + "operationId": "getRunTestAnalytics", + "description": "Get analytics data for a specific run test across multiple test executions", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestAnalytics" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/call-executions/": { + "get": { + "operationId": "listRunTestCallExecutions", + "description": "Get all call executions for a specific run test with pagination and search\nQuery Parameters:\n- search: search string to filter call executions by phone number or scenario name\n- status: filter by call execution status\n- limit: number of call executions per page (default: 10)\n- page: page number for call executions (default: 1)", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestCallExecutionsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/chat-execute/": { + "post": { + "operationId": "simulate_run-tests_chat-execute_create", + "description": "Execute a test run", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestChatExecutionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/components/": { + "patch": { + "operationId": "simulate_run-tests_components_partial_update", + "description": "Update components of a specific RunTest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestComponentsUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/delete-test-executions/": { + "post": { + "operationId": "simulate_run-tests_delete-test-executions_create", + "description": "Delete multiple test executions within a run test.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionBulkDelete" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionBulkDeleteResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/delete/": { + "delete": { + "operationId": "simulate_run-tests_delete_delete", + "description": "Delete a specific run test", + "responses": { + "204": { + "description": "Response" + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/eval-configs/": { + "post": { + "operationId": "simulate_run-tests_eval-configs_create", + "summary": "Add evaluation configurations", + "description": "Adds evaluation configurations to a test run. Returns 201 with the created configs.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddEvalConfigsRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddEvalConfigsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Run Tests - Eval Configs" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/": { + "delete": { + "operationId": "simulate_run-tests_eval-configs_delete", + "summary": "Delete evaluation configuration", + "description": "Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvalConfigResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Run Tests - Eval Configs" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_config_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/": { + "get": { + "operationId": "simulate_run-tests_eval-configs_get-structure_list", + "description": "Get the structure of an evaluation config", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalConfigStructureResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_config_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/": { + "post": { + "operationId": "simulate_run-tests_eval-configs_update_create", + "summary": "Update evaluation configuration", + "description": "Updates an evaluation configuration and optionally triggers a rerun. When run=true, test_execution_id is required.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalConfigUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalConfigUpdateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Run Tests - Eval Configs" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eval_config_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/eval-summary-comparison/": { + "get": { + "operationId": "simulate_run-tests_eval-summary-comparison_list", + "summary": "Compare evaluation summaries", + "description": "Compares evaluation summary statistics across multiple test executions.", + "parameters": [ + { + "name": "execution_ids", + "in": "query", + "description": "JSON-encoded array of test execution UUIDs to compare. Example: [\"uuid1\",\"uuid2\"]. Must be URL-encoded.", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalSummaryComparisonResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Run Tests - Eval Summary" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/eval-summary/": { + "get": { + "operationId": "simulate_run-tests_eval-summary_list", + "summary": "Get evaluation summary", + "description": "Returns evaluation summary statistics for a test run, optionally scoped to a single execution.", + "parameters": [ + { + "name": "execution_id", + "in": "query", + "description": "UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions.", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalSummaryResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Run Tests - Eval Summary" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/execute/": { + "post": { + "operationId": "executeRunTest", + "description": "Execute a test run", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteRunTest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestExecutionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/executions/": { + "get": { + "operationId": "listRunTestExecutions", + "description": "Get test execution data for a specific run test\nQuery Parameters:\n- search: search string to filter test executions by status or scenario name\n- status: filter by execution status\n- limit: number of items per page (default: 10)\n- page: page number (default: 1)", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TestExecutionItemResponse" + } + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/rerun-test-executions/": { + "post": { + "operationId": "simulate_run-tests_rerun-test-executions_create", + "description": "Rerun multiple test executions (either evaluation only or call + evaluation).\nAll call executions within each test execution are rerun.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionRerun" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionRerunResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/run-new-evals/": { + "post": { + "operationId": "simulate_run-tests_run-new-evals_create", + "summary": "Run new evaluations on test executions", + "description": "Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must be provided.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunNewEvalsOnTestExecution" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunNewEvalsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Run Tests - Eval Configs" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/scenarios/": { + "get": { + "operationId": "simulate_run-tests_scenarios_list", + "description": "Get paginated list of scenarios for a specific run test\nQuery Parameters:\n- search: search string to filter scenarios by name\n- limit: number of items per page (default: 10)\n- page: page number (default: 1)", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunTestScenarioItemResponse" + } + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/sdk-code/": { + "get": { + "operationId": "simulate_run-tests_sdk-code_list", + "description": "Get the SDK code with placeholders filled", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatSDKCodeResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/run-tests/{run_test_id}/status/": { + "get": { + "operationId": "getRunTestStatus", + "description": "Get test execution status", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionStatusSummary" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Run Tests" + ] + }, + "parameters": [ + { + "name": "run_test_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/scenarios/": { + "get": { + "operationId": "listScenarios", + "summary": "List scenarios", + "description": "Returns a paginated list of scenarios for the user's organization.", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "agent_definition_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "agent_type", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioListResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Scenarios" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/scenarios/create/": { + "post": { + "operationId": "createScenario", + "summary": "Create scenario", + "description": "Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioCreateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Scenarios" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/scenarios/get-columns/": { + "get": { + "operationId": "simulate_scenarios_get-columns_list", + "summary": "List scenarios", + "description": "Returns a paginated list of scenarios for the user's organization.", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "agent_definition_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "agent_type", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioListResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Scenarios" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/scenarios/{scenario_id}/": { + "get": { + "operationId": "getScenario", + "summary": "Get scenario detail", + "description": "Returns full detail of a specific scenario including graph data and prompts.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioDetailResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Scenarios" + ] + }, + "parameters": [ + { + "name": "scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/scenarios/{scenario_id}/add-columns/": { + "post": { + "operationId": "simulate_scenarios_add-columns_create", + "summary": "Add columns to scenario", + "description": "Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioAddColumnsRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioAddColumnsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Scenarios" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/scenarios/{scenario_id}/add-rows/": { + "post": { + "operationId": "simulate_scenarios_add-rows_create", + "summary": "Add rows to scenario", + "description": "Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioAddRowsRequest" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioAddRowsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Scenarios" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/scenarios/{scenario_id}/delete/": { + "delete": { + "operationId": "deleteScenario", + "summary": "Delete scenario", + "description": "Soft-deletes a scenario by setting deleted=True.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioDeleteResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Scenarios" + ] + }, + "parameters": [ + { + "name": "scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/scenarios/{scenario_id}/edit/": { + "put": { + "operationId": "updateScenario", + "summary": "Edit scenario", + "description": "Updates scenario name, description, graph, or prompt.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioEditRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioEditResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Scenarios" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/scenarios/{scenario_id}/prompts/": { + "put": { + "operationId": "simulate_scenarios_prompts_update", + "summary": "Edit scenario prompts", + "description": "Updates the simulator agent prompt for a scenario.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioEditPromptsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioPromptsUpdateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScenarioErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Scenarios" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "scenario_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/simulator-agents/": { + "get": { + "operationId": "simulate_simulator-agents_list", + "description": "List simulator agents with pagination and search", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgentListResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [] + }, + "/simulate/simulator-agents/create/": { + "post": { + "operationId": "simulate_simulator-agents_create_create", + "description": "Create a new simulator agent", + "requestBody": { + "$ref": "#/components/requestBodies/SimulatorAgent" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgent" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgentValidationErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/simulate/simulator-agents/{agent_id}/": { + "get": { + "operationId": "simulate_simulator-agents_read", + "description": "Get details of a specific simulator agent", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgent" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/simulator-agents/{agent_id}/delete/": { + "delete": { + "operationId": "simulate_simulator-agents_delete_delete", + "description": "Soft delete a simulator agent", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgentDeleteResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorWithDetailsResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/simulator-agents/{agent_id}/edit/": { + "put": { + "operationId": "simulate_simulator-agents_edit_update", + "description": "Edit an existing simulator agent", + "requestBody": { + "$ref": "#/components/requestBodies/SimulatorAgent" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgent" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgentValidationErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/": { + "get": { + "operationId": "getTestExecution", + "description": "Get a specific test execution with all its details and paginated call executions\nQuery Parameters:\n- search: search string to filter call executions\n- page: page number for call executions (default: 1)\n- filters: JSON array of filter objects\n- row_groups: JSON array of column IDs to group by\n- group_keys: JSON array of group keys", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "row_groups", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "group_keys", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 30 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionDetailResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Test Executions" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/analytics/": { + "get": { + "operationId": "getTestExecutionAnalytics", + "description": "Get analytics data for a specific test execution", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionAnalytics" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Test Executions" + ] + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/cancel/": { + "post": { + "operationId": "cancelTestExecution", + "description": "Cancel a test execution", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelTestExecutionResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Test Executions" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/chat/call-executions/batch/": { + "post": { + "operationId": "simulate_test-executions_chat_call-executions_batch_create", + "summary": "Create a batch of CallExecution records for chat execution (exactly 10 per API call).", + "description": "This follows the same flow as inbound/outbound calls:\n1. Resolve SimulatorAgent (scenario > run_test > fallback)\n2. Extract base_prompt from SimulatorAgent\n3. Handle dataset scenarios (create one CallExecution per row)\n4. Enhance prompt with row data if applicable\n5. Store proper metadata in CallExecution\n\nReturns exactly 10 CallExecution objects per API call.\nhasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionChatBatchResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/column-order/": { + "put": { + "operationId": "simulate_test-executions_column-order_update", + "description": "Update column order for a test execution", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionColumnOrder" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionColumnOrderResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/delete/": { + "delete": { + "operationId": "simulate_test-executions_delete_delete", + "description": "Delete a specific test execution", + "responses": { + "204": { + "description": "Response" + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/": { + "get": { + "operationId": "simulate_test-executions_eval-explanation-summary_list", + "description": "Fetch the evaluation explanation summary from the database.\nIf not present, trigger async calculation and return empty response.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalExplanationSummaryResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/": { + "post": { + "operationId": "simulate_test-executions_eval-explanation-summary_refresh_create", + "description": "Refresh the evaluation explanation summary by recalculating it.\nThis endpoint triggers the summary calculation task again.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalExplanationSummaryRefreshResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/kpis/": { + "get": { + "operationId": "getTestExecutionKpis", + "description": "Get combined KPI values for a specific run test", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunTestKPIsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Test Executions" + ] + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/optimiser-analysis/": { + "get": { + "operationId": "simulate_test-executions_optimiser-analysis_list", + "description": "Fetch the agent optimiser analysis for a test execution.\nIf not present or pending, returns status information.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OptimiserAnalysisResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ] + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/": { + "post": { + "operationId": "simulate_test-executions_optimiser-analysis_refresh_create", + "description": "Trigger a new agent optimiser analysis run.", + "requestBody": { + "$ref": "#/components/requestBodies/EmptyRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OptimiserAnalysisRefreshResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTextErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/performance-summary/": { + "get": { + "operationId": "getTestExecutionPerformanceSummary", + "description": "Get performance summary data for a specific test execution", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PerformanceSummary" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Test Executions" + ] + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/rerun-calls/": { + "post": { + "operationId": "simulate_test-executions_rerun-calls_create", + "description": "Rerun multiple call executions (either evaluation only or call + evaluation)", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallExecutionRerun" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RerunCallsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "simulate" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/simulate/test-executions/{test_execution_id}/transcripts/": { + "get": { + "operationId": "getTestExecutionTranscripts", + "description": "Get all transcripts for a test execution", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestExecutionTranscriptsResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Simulation Test Executions" + ] + }, + "parameters": [ + { + "name": "test_execution_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/bulk-annotation/": { + "post": { + "operationId": "createBulkTraceAnnotation", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAnnotationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAnnotationResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/feed/issues/": { + "get": { + "operationId": "listErrorFeedIssues", + "description": "GET /tracer/feed/issues/ — paginated cluster list with filters/sort.", + "parameters": [ + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "escalating", + "for_review", + "acknowledged", + "resolved" + ] + } + }, + { + "name": "fix_layer", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "source", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "scanner", + "eval" + ] + } + }, + { + "name": "issue_group", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "time_range_days", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "last_seen", + "first_seen", + "error_count", + "unique_traces" + ], + "default": "last_seen" + } + }, + { + "name": "sort_dir", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": 25 + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedListApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/feed/issues/stats/": { + "get": { + "operationId": "getErrorFeedIssueStats", + "description": "GET /tracer/feed/issues/stats/ — top stats bar totals.", + "parameters": [ + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "time_range_days", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedStatsApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/feed/issues/{cluster_id}/": { + "get": { + "operationId": "getErrorFeedIssue", + "description": "GET + PATCH /tracer/feed/issues/{cluster_id}/", + "parameters": [ + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedDetailApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "patch": { + "operationId": "tracer_feed_issues_partial_update", + "description": "GET + PATCH /tracer/feed/issues/{cluster_id}/", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedUpdateBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedDetailApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/feed/issues/{cluster_id}/create-linear-issue/": { + "post": { + "operationId": "tracer_feed_issues_create-linear-issue_create", + "description": "POST /tracer/feed/issues/{cluster_id}/create-linear-issue/", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLinearIssue" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLinearIssueResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/feed/issues/{cluster_id}/deep-analysis/": { + "post": { + "operationId": "tracer_feed_issues_deep-analysis_create", + "description": "POST /tracer/feed/issues/{cluster_id}/deep-analysis/", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeepAnalysisBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeepAnalysisDispatchApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/feed/issues/{cluster_id}/overview/": { + "get": { + "operationId": "tracer_feed_issues_overview_list", + "description": "GET /tracer/feed/issues/{cluster_id}/overview/", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OverviewApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/feed/issues/{cluster_id}/root-cause/": { + "get": { + "operationId": "tracer_feed_issues_root-cause_list", + "summary": "GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X", + "description": "Read cached deep-analysis results for a single trace within the\ncluster. The frontend hits this on mount (to show existing results)\nand polls it after a POST to /deep-analysis/ until ``status`` flips\nfrom ``running`` to ``done`` or ``failed``.", + "parameters": [ + { + "name": "trace_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeepAnalysisApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/feed/issues/{cluster_id}/sidebar/": { + "get": { + "operationId": "tracer_feed_issues_sidebar_list", + "summary": "GET /tracer/feed/issues/{cluster_id}/sidebar/", + "description": "Accepts an optional ``?trace_id=`` query param. When present, the\ntrace-level sections (AI Metadata + Evaluations) are computed for\nthat trace instead of the cluster's latest, keeping the sidebar in\nsync with the Overview tab's trace selection.", + "parameters": [ + { + "name": "trace_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedSidebarApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/feed/issues/{cluster_id}/traces/": { + "get": { + "operationId": "tracer_feed_issues_traces_list", + "description": "GET /tracer/feed/issues/{cluster_id}/traces/", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 500, + "default": 50 + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TracesTabApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/feed/issues/{cluster_id}/trends/": { + "get": { + "operationId": "tracer_feed_issues_trends_list", + "description": "GET /tracer/feed/issues/{cluster_id}/trends/", + "parameters": [ + { + "name": "days", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 90, + "default": 14 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TrendsTabApiResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "403": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [ + { + "name": "cluster_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/get-annotation-labels/": { + "get": { + "operationId": "listTraceAnnotationLabels", + "description": "", + "parameters": [ + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAnnotationLabelsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/project/list_projects/": { + "get": { + "operationId": "listTraceProjects", + "summary": "List projects filtered by organization ID.", + "description": "Volume counts come from ClickHouse (fast) instead of a PG\nJOIN on observation_spans (was 12+ seconds).", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ] + }, + "parameters": [] + }, + "/tracer/trace-annotation/": { + "get": { + "operationId": "tracer_trace-annotation_list", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetTraceAnnotation" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "post": { + "operationId": "tracer_trace-annotation_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/GetTraceAnnotation" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTraceAnnotation" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace-annotation/get_annotation_values/": { + "get": { + "operationId": "tracer_trace-annotation_get_annotation_values", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "observation_span_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 255 + } + }, + { + "name": "trace_id", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "annotators", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "exclude_annotators", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTraceAnnotationValuesResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/trace-annotation/{id}/": { + "get": { + "operationId": "tracer_trace-annotation_read", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTraceAnnotation" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "put": { + "operationId": "tracer_trace-annotation_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/GetTraceAnnotation" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTraceAnnotation" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "patch": { + "operationId": "tracer_trace-annotation_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/GetTraceAnnotation" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTraceAnnotation" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "delete": { + "operationId": "tracer_trace-annotation_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/trace-session/": { + "get": { + "operationId": "tracer_trace-session_list", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "post": { + "operationId": "tracer_trace-session_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/TraceSession" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace-session/get_session_filter_values/": { + "get": { + "operationId": "tracer_trace-session_get_session_filter_values", + "description": "Return distinct values for a session-level column.\nUsed by the filter panel's value picker for session-specific fields\n(session_id, user_id, first_message, etc.).\n\nQuery params:\n project_id: required\n column: canonical session column name, e.g. \"session_id\"\n search: optional search substring\n page: page number (0-based), default 0\n page_size: default 50", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace-session/get_session_graph_data/": { + "post": { + "operationId": "getTraceSessionGraphData", + "summary": "Fetch time-series session metrics for the observe graph.", + "description": "Supports the same metric types as the trace graph endpoint:\n- SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count,\n avg_duration, avg_traces_per_session — all aggregated at session level\n- EVAL: eval scores averaged across sessions\n- ANNOTATION: annotation scores averaged across sessions\n\nResponse shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]}", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSessionGraphDataRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSessionGraphDataRequest" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true + }, + "parameters": [] + }, + "/tracer/trace-session/get_trace_session_export_data/": { + "get": { + "operationId": "tracer_trace-session_get_trace_session_export_data", + "description": "Export traces filtered by project ID and project version ID with optimized queries.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace-session/list_sessions/": { + "get": { + "operationId": "listTraceSessions", + "description": "List traces filtered by project ID and project version ID with optimized queries.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "user_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "bookmarked", + "in": "query", + "required": false, + "x-nullable": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "sort_params", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "page_number", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 500, + "default": 30 + } + }, + { + "name": "interval", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true + }, + "parameters": [] + }, + "/tracer/trace-session/{id}/": { + "get": { + "operationId": "getTraceSession", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ] + }, + "put": { + "operationId": "tracer_trace-session_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/TraceSession" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "patch": { + "operationId": "tracer_trace-session_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/TraceSession" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "delete": { + "operationId": "tracer_trace-session_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/trace-session/{id}/eval_logs/": { + "get": { + "operationId": "tracer_trace-session_eval_logs", + "summary": "Session-scoped eval log feed for TracesDrawer's \"Evals\" tab.", + "description": "Session-level eval results are walled off from span/trace surfaces\nby ``target_type='session'`` — this endpoint is the only place\nthey appear.\n\nQuery params:\n page (int, 0-indexed, default 0)\n page_size (int, default 25, max 100)", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSession" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/trace/": { + "get": { + "operationId": "tracer_trace_list", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "post": { + "operationId": "tracer_trace_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/Trace" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace/agent_graph/": { + "get": { + "operationId": "tracer_trace_agent_graph", + "summary": "Return the aggregate agent graph for a project.", + "description": "Computes nodes (distinct span types/names) and edges (parent→child\ntransitions) across all traces in the given time window.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "project_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true + }, + "parameters": [] + }, + "/tracer/trace/bulk_create/": { + "post": { + "operationId": "tracer_trace_bulk_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/Trace" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace/compare_traces/": { + "post": { + "operationId": "tracer_trace_compare_traces", + "description": "Compare traces across project versions with optimized queries.", + "requestBody": { + "$ref": "#/components/requestBodies/Trace" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace/get_eval_names/": { + "get": { + "operationId": "tracer_trace_get_eval_names", + "description": "Fetch all evaluation template names.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace/get_graph_methods/": { + "post": { + "operationId": "getTraceGraphMethods", + "description": "Fetch data for the observe graph with optimized queries", + "requestBody": { + "$ref": "#/components/requestBodies/ObserveGraphDataRequest" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObserveGraphDataResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/trace/get_properties/": { + "get": { + "operationId": "listTraceProperties", + "description": "Fetch all properties for graphing.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ] + }, + "parameters": [] + }, + "/tracer/trace/get_trace_export_data/": { + "get": { + "operationId": "tracer_trace_get_trace_export_data", + "description": "Export traces filtered by project ID with optimized queries.\nAuto-detects voice/conversation projects and exports voice-specific fields.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/trace/get_trace_id_by_index/": { + "get": { + "operationId": "tracer_trace_get_trace_id_by_index", + "description": "Get the previous and next trace id by index using efficient database queries.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "trace_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "project_version_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true + }, + "parameters": [] + }, + "/tracer/trace/get_trace_id_by_index_observe/": { + "get": { + "operationId": "tracer_trace_get_trace_id_by_index_observe", + "description": "Get the previous and next trace id by index.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "trace_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "project_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true + }, + "parameters": [] + }, + "/tracer/trace/list_traces/": { + "get": { + "operationId": "listTraces", + "description": "List traces filtered by project ID and project version ID with optimized queries.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "project_version_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "trace_ids", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "sort_params", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "page_number", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 500, + "default": 30 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true + }, + "parameters": [] + }, + "/tracer/trace/list_traces_of_session/": { + "get": { + "operationId": "tracer_trace_list_traces_of_session", + "description": "List traces filtered by project ID with optimized queries.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "project_version_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "session_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "page_number", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 500, + "default": 30 + } + }, + { + "name": "interval", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true + }, + "parameters": [] + }, + "/tracer/trace/list_voice_calls/": { + "get": { + "operationId": "listVoiceCalls", + "description": "List voice/conversation traces for a project in an optimized way and\nreturn a response similar to the provided call object schema.\n\nQuery params:\n- project_id (required)\n- page (1-based, optional, default 1)\n- page_size (optional, default 30)", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ] + }, + "parameters": [] + }, + "/tracer/trace/voice_call_detail/": { + "get": { + "operationId": "getVoiceCallDetail", + "summary": "Return the heavy / detail-only fields for a single voice call.", + "description": "Query params:\n- trace_id (required) — UUID of the voice call trace.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ] + }, + "parameters": [] + }, + "/tracer/trace/{id}/": { + "get": { + "operationId": "getTrace", + "description": "Retrieve a trace by its ID.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ] + }, + "put": { + "operationId": "tracer_trace_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/Trace" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "patch": { + "operationId": "tracer_trace_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/Trace" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "delete": { + "operationId": "tracer_trace_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/trace/{id}/tags/": { + "patch": { + "operationId": "updateTraceTags", + "description": "Update tags for a trace.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceTagsUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceTagsUpdate" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/user-alert-logs/": { + "get": { + "operationId": "listAlertLogs", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "post": { + "operationId": "tracer_user-alert-logs_create", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitorLog" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/user-alert-logs/all/": { + "get": { + "operationId": "listAllAlertLogs", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [] + }, + "/tracer/user-alert-logs/resolve/": { + "post": { + "operationId": "resolveAlertLogs", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitorLog" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [] + }, + "/tracer/user-alert-logs/{id}/": { + "get": { + "operationId": "getAlertLog", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "put": { + "operationId": "tracer_user-alert-logs_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitorLog" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "patch": { + "operationId": "tracer_user-alert-logs_partial_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitorLog" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "delete": { + "operationId": "tracer_user-alert-logs_delete", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/user-alert-logs/{id}/list/": { + "get": { + "operationId": "listAlertLogsForAlert", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/user-alerts/": { + "get": { + "operationId": "listAlerts", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "post": { + "operationId": "createAlert", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitor" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [] + }, + "/tracer/user-alerts/bulk-mute/": { + "post": { + "operationId": "bulkMuteAlerts", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitor" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [] + }, + "/tracer/user-alerts/duplicate/": { + "post": { + "operationId": "tracer_user-alerts_duplicate", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorDuplicate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorDuplicateResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/user-alerts/list_monitors/": { + "get": { + "operationId": "tracer_user-alerts_list_monitors", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + }, + "/tracer/user-alerts/metric-options/": { + "get": { + "operationId": "listAlertMetricOptions", + "description": "", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorMetricOptionsResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "404": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [] + }, + "/tracer/user-alerts/preview-graph/": { + "post": { + "operationId": "previewAlertGraph", + "description": "Returns time-series data for a temporary monitor's metric, suitable for graphing a preview.\nAccepts monitor configuration in the request body.", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitor" + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [] + }, + "/tracer/user-alerts/{id}/": { + "get": { + "operationId": "getAlert", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "put": { + "operationId": "tracer_user-alerts_update", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitor" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "patch": { + "operationId": "updateAlert", + "description": "", + "requestBody": { + "$ref": "#/components/requestBodies/UserAlertMonitor" + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "delete": { + "operationId": "deleteAlert", + "description": "", + "responses": { + "204": { + "description": "Response" + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/user-alerts/{id}/details/": { + "get": { + "operationId": "getAlertDetails", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/user-alerts/{id}/graph/": { + "get": { + "operationId": "getAlertGraph", + "summary": "Returns time-series data for a monitor's metric, suitable for graphing.", + "description": "Accepts `start_date` and `end_date` query parameters (ISO 8601 format).\nIf not provided, it defaults to the last 7 days.", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Alerts" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/tracer/users/": { + "get": { + "operationId": "listTraceUsers", + "description": "List traces filtered by project ID with optimized queries.", + "parameters": [ + { + "name": "project_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 500 + } + }, + { + "name": "current_page_index", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "sort_params", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + }, + { + "name": "filters", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "default": "[]" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "Tracing" + ], + "x-runtime-request-validation": true, + "x-runtime-response-validation": true + }, + "parameters": [] + }, + "/tracer/users/get_code_example/": { + "get": { + "operationId": "tracer_users_get_code_example_list", + "description": "", + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserCodeExampleResponse" + } + } + } + }, + "400": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "default": { + "description": "Default error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagementAPIErrorResponse" + } + } + } + } + }, + "tags": [ + "tracer" + ] + }, + "parameters": [] + } + }, + "servers": [ + { + "url": "https://api.futureagi.com" + } + ], + "components": { + "requestBodies": { + "AnnotationQueue": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationQueue" + } + } + }, + "required": true + }, + "SimulatorAgent": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimulatorAgent" + } + } + }, + "required": true + }, + "MemberRemove": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberRemove" + } + } + }, + "required": true + }, + "QueueItemNavigationRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItemNavigationRequest" + } + } + }, + "required": true + }, + "ObserveGraphDataRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObserveGraphDataRequest" + } + } + }, + "required": true + }, + "UserAlertMonitorLog": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitorLog" + } + } + }, + "required": true + }, + "PromptLabel": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptLabel" + } + } + }, + "required": true + }, + "PromptTemplate": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplate" + } + } + }, + "required": true + }, + "Score": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Score" + } + } + }, + "required": true + }, + "DatasetRowDiffRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetRowDiffRequest" + } + } + }, + "required": true + }, + "CompareDataset": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompareDataset" + } + } + }, + "required": true + }, + "PersonaDuplicateRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonaDuplicateRequest" + } + } + }, + "required": true + }, + "ApiKey": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKey" + } + } + }, + "required": true + }, + "UserAlertMonitor": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAlertMonitor" + } + } + }, + "required": true + }, + "EmptyRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmptyRequest" + } + } + }, + "required": true + }, + "LegacyKnowledgeBaseMutationRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseMutationRequest" + } + } + }, + "required": true + }, + "AutomationRule": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationRule" + } + } + }, + "required": true + }, + "QueueItem": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItem" + } + } + }, + "required": true + }, + "Feedback": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Feedback" + } + } + }, + "required": true + }, + "TraceSession": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceSession" + } + } + }, + "required": true + }, + "QueueLabelRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueLabelRequest" + } + } + }, + "required": true + }, + "DiscussionThreadStatusRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscussionThreadStatusRequest" + } + } + }, + "required": true + }, + "AnnotationsLabels": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationsLabels" + } + } + }, + "required": true + }, + "ModelHubEmptyRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelHubEmptyRequest" + } + } + }, + "required": true + }, + "UserEvalMutationRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserEvalMutationRequest" + } + } + }, + "required": true + }, + "ExperimentRerunRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentRerunRequest" + } + } + }, + "required": true + }, + "ExperimentComparisonWeightsRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentComparisonWeightsRequest" + } + } + }, + "required": true + }, + "Persona": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Persona" + } + } + }, + "required": true + }, + "GetTraceAnnotation": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTraceAnnotation" + } + } + }, + "required": true + }, + "Trace": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + }, + "required": true + } + }, + "securitySchemes": { + "X-Api-Key": { + "type": "apiKey", + "in": "header", + "name": "X-Api-Key" + }, + "X-Secret-Key": { + "type": "apiKey", + "in": "header", + "name": "X-Secret-Key" + } + }, + "schemas": { + "AccountsErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "ManagementAPIErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "WorkspaceAccessInput": { + "description": "List of {\"workspace_id\": \"\", \"level\": }.", + "required": [ + "workspace_id" + ], + "type": "object", + "properties": { + "workspace_id": { + "title": "Workspace id", + "type": "string", + "format": "uuid" + }, + "level": { + "title": "Level", + "type": "integer", + "enum": [ + 8, + 3, + 1 + ] + } + } + }, + "MemberWorkspaceAccess": { + "required": [ + "workspace_id", + "workspace_name", + "ws_level", + "ws_role" + ], + "type": "object", + "properties": { + "workspace_id": { + "title": "Workspace id", + "type": "string", + "format": "uuid" + }, + "workspace_name": { + "title": "Workspace name", + "type": "string", + "minLength": 1 + }, + "ws_level": { + "title": "Ws level", + "type": "integer" + }, + "ws_role": { + "title": "Ws role", + "type": "string", + "minLength": 1 + }, + "auto_access": { + "title": "Auto access", + "type": "boolean" + } + } + }, + "MemberListItem": { + "required": [ + "id", + "name", + "email", + "status", + "created_at", + "type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string" + }, + "email": { + "title": "Email", + "type": "string", + "format": "email", + "minLength": 1 + }, + "org_level": { + "title": "Org level", + "type": "integer", + "nullable": true + }, + "org_role": { + "title": "Org role", + "type": "string", + "minLength": 1, + "nullable": true + }, + "ws_level": { + "title": "Ws level", + "type": "integer", + "nullable": true + }, + "ws_role": { + "title": "Ws role", + "type": "string", + "minLength": 1, + "nullable": true + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberWorkspaceAccess" + } + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "created_at": { + "title": "Created at", + "type": "string" + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "member", + "invite" + ] + }, + "auto_access": { + "title": "Auto access", + "type": "boolean" + } + } + }, + "MemberListResult": { + "required": [ + "results", + "total", + "page", + "limit" + ], + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberListItem" + } + }, + "total": { + "title": "Total", + "type": "integer" + }, + "page": { + "title": "Page", + "type": "integer" + }, + "limit": { + "title": "Limit", + "type": "integer" + } + } + }, + "MemberListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/MemberListResult" + } + } + }, + "MemberRemove": { + "required": [ + "user_id" + ], + "type": "object", + "properties": { + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + } + } + }, + "MemberUserMutationResult": { + "required": [ + "message", + "user_id" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + } + } + }, + "MemberUserMutationResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/MemberUserMutationResult" + } + } + }, + "MemberRoleUpdate": { + "required": [ + "user_id" + ], + "type": "object", + "properties": { + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + }, + "org_level": { + "title": "Org level", + "type": "integer", + "enum": [ + 15, + 8, + 3, + 1 + ], + "nullable": true + }, + "ws_level": { + "title": "Ws level", + "type": "integer", + "enum": [ + 8, + 3, + 1 + ], + "nullable": true + }, + "workspace_id": { + "title": "Workspace id", + "description": "Required when updating ws_level.", + "type": "string", + "format": "uuid", + "nullable": true + }, + "workspace_access": { + "description": "List of {workspace_id, level} for explicit workspace grants on demotion.", + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkspaceAccessInput" + } + } + } + }, + "MemberRoleUpdateResult": { + "required": [ + "message", + "changes" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "changes": { + "title": "Changes", + "type": "object", + "additionalProperties": true + } + } + }, + "MemberRoleUpdateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/MemberRoleUpdateResult" + } + } + }, + "WorkspaceSummary": { + "required": [ + "id", + "name", + "display_name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "is_default": { + "title": "Is default", + "type": "boolean" + } + } + }, + "UserInfoOrganization": { + "required": [ + "id", + "name", + "display_name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string" + }, + "ws_enabled": { + "title": "Ws enabled", + "type": "boolean" + } + } + }, + "UserInfoTwoFactorMethods": { + "required": [ + "totp", + "passkey" + ], + "type": "object", + "properties": { + "totp": { + "title": "Totp", + "type": "boolean" + }, + "passkey": { + "title": "Passkey", + "type": "boolean" + } + } + }, + "UserInfoResponse": { + "required": [ + "id", + "email", + "name", + "organization_role", + "organization", + "created_at", + "status", + "role", + "remember_me", + "get_started_completed", + "onboarding_completed", + "ws_enabled", + "default_workspace_id", + "default_workspace_name", + "default_workspace_display_name", + "default_workspace_role", + "org_level", + "ws_level", + "effective_level" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "email": { + "title": "Email", + "type": "string", + "format": "email", + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "nullable": true + }, + "organization_role": { + "title": "Organization role", + "type": "string", + "nullable": true + }, + "organization": { + "$ref": "#/components/schemas/UserInfoOrganization" + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "role": { + "title": "Role", + "type": "string", + "nullable": true + }, + "goals": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "remember_me": { + "title": "Remember me", + "type": "boolean" + }, + "get_started_completed": { + "title": "Get started completed", + "type": "boolean" + }, + "onboarding_completed": { + "title": "Onboarding completed", + "type": "boolean" + }, + "ws_enabled": { + "title": "Ws enabled", + "type": "boolean" + }, + "requires_org_setup": { + "title": "Requires org setup", + "type": "boolean" + }, + "default_workspace_id": { + "title": "Default workspace id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "default_workspace_name": { + "title": "Default workspace name", + "type": "string", + "nullable": true + }, + "default_workspace_display_name": { + "title": "Default workspace display name", + "type": "string", + "nullable": true + }, + "default_workspace_role": { + "title": "Default workspace role", + "type": "string", + "nullable": true + }, + "org_level": { + "title": "Org level", + "type": "integer", + "nullable": true + }, + "ws_level": { + "title": "Ws level", + "type": "integer", + "nullable": true + }, + "effective_level": { + "title": "Effective level", + "type": "integer", + "nullable": true + }, + "has_2fa_enabled": { + "title": "Has 2fa enabled", + "type": "boolean" + }, + "two_factor_methods": { + "$ref": "#/components/schemas/UserInfoTwoFactorMethods" + }, + "org_2fa_required": { + "title": "Org 2fa required", + "type": "boolean" + }, + "org_2fa_grace_ends_at": { + "title": "Org 2fa grace ends at", + "type": "string", + "format": "date-time" + } + } + }, + "WorkspaceAdminSummary": { + "required": [ + "name", + "id" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "nullable": true + }, + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + } + } + }, + "WorkspaceListItemResponse": { + "required": [ + "id", + "name", + "display_name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string" + }, + "admin_names": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkspaceAdminSummary" + } + }, + "start_data": { + "title": "Start data", + "type": "string" + }, + "last_update_date": { + "title": "Last update date", + "type": "string" + }, + "invite_link": { + "title": "Invite link", + "type": "string" + }, + "user_ws_level": { + "title": "User ws level", + "type": "integer", + "nullable": true + }, + "user_ws_role": { + "title": "User ws role", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "WorkspaceListPaginatedResponse": { + "required": [ + "count", + "next", + "previous", + "results", + "total_pages", + "current_page" + ], + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer" + }, + "next": { + "title": "Next", + "type": "string", + "minLength": 1, + "nullable": true + }, + "previous": { + "title": "Previous", + "type": "string", + "minLength": 1, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkspaceListItemResponse" + } + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + }, + "current_page": { + "title": "Current page", + "type": "integer" + } + } + }, + "SwitchWorkspace": { + "required": [ + "new_workspace_id" + ], + "type": "object", + "properties": { + "new_workspace_id": { + "title": "New workspace id", + "type": "string", + "format": "uuid" + } + } + }, + "SwitchWorkspaceResult": { + "required": [ + "message", + "workspace", + "user_role", + "access_type", + "organization" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "workspace": { + "$ref": "#/components/schemas/WorkspaceSummary" + }, + "user_role": { + "title": "User role", + "type": "string", + "minLength": 1 + }, + "access_type": { + "title": "Access type", + "type": "string", + "minLength": 1 + }, + "organization": { + "title": "Organization", + "type": "string", + "minLength": 1 + } + } + }, + "SwitchWorkspaceResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SwitchWorkspaceResult" + } + } + }, + "WorkspaceMemberRemove": { + "required": [ + "user_id" + ], + "type": "object", + "properties": { + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + } + } + }, + "WorkspaceMemberRoleUpdate": { + "required": [ + "user_id", + "ws_level" + ], + "type": "object", + "properties": { + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + }, + "ws_level": { + "title": "Ws level", + "type": "integer", + "enum": [ + 8, + 3, + 1 + ] + } + } + }, + "WorkspaceMemberRoleUpdateResult": { + "required": [ + "message", + "user_id", + "ws_level", + "ws_role" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + }, + "ws_level": { + "title": "Ws level", + "type": "integer" + }, + "ws_role": { + "title": "Ws role", + "type": "string", + "minLength": 1 + } + } + }, + "WorkspaceMemberRoleUpdateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/WorkspaceMemberRoleUpdateResult" + } + } + }, + "ApiTextErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "ModelHubErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "QueueLabelNested": { + "required": [ + "label_id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "required": { + "title": "Required", + "type": "boolean" + }, + "order": { + "title": "Order", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + } + } + }, + "QueueAnnotatorNested": { + "required": [ + "user_id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "email": { + "title": "Email", + "type": "string", + "format": "email", + "readOnly": true, + "minLength": 1 + }, + "role": { + "title": "Role", + "type": "string", + "default": "annotator", + "minLength": 1 + }, + "roles": { + "title": "Roles", + "type": "string", + "readOnly": true + } + } + }, + "AnnotationQueue": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "instructions": { + "title": "Instructions", + "type": "string", + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "draft", + "active", + "paused", + "completed" + ], + "readOnly": true + }, + "assignment_strategy": { + "title": "Assignment strategy", + "type": "string", + "enum": [ + "manual", + "round_robin", + "load_balanced" + ] + }, + "annotations_required": { + "title": "Annotations required", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "reservation_timeout_minutes": { + "title": "Reservation timeout minutes", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "requires_review": { + "title": "Requires review", + "type": "boolean" + }, + "auto_assign": { + "title": "Auto assign", + "description": "When enabled, all queue members can annotate any item without explicit assignment.", + "type": "boolean" + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "project": { + "title": "Project", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "dataset": { + "title": "Dataset", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "agent_definition": { + "title": "Agent definition", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "is_default": { + "title": "Is default", + "type": "boolean", + "readOnly": true + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueLabelNested" + }, + "readOnly": true + }, + "annotators": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueAnnotatorNested" + }, + "readOnly": true + }, + "label_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "annotator_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "annotator_roles": { + "title": "Annotator roles", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + }, + "label_count": { + "title": "Label count", + "type": "integer", + "readOnly": true + }, + "annotator_count": { + "title": "Annotator count", + "type": "integer", + "readOnly": true + }, + "item_count": { + "title": "Item count", + "type": "integer", + "readOnly": true + }, + "completed_count": { + "title": "Completed count", + "type": "integer", + "readOnly": true + }, + "created_by": { + "title": "Created by", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "created_by_name": { + "title": "Created by name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "viewer_role": { + "title": "Viewer role", + "type": "string", + "readOnly": true + }, + "viewer_roles": { + "title": "Viewer roles", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "QueueForSourceQueue": { + "required": [ + "id", + "name", + "instructions", + "is_default" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "instructions": { + "title": "Instructions", + "type": "string" + }, + "is_default": { + "title": "Is default", + "type": "boolean" + } + } + }, + "QueueForSourceItem": { + "required": [ + "id", + "status", + "source_type", + "source_id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "source_type": { + "title": "Source type", + "type": "string", + "minLength": 1 + }, + "source_id": { + "title": "Source id", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "QueueLabelResult": { + "required": [ + "id", + "name", + "type", + "settings", + "allow_notes", + "required", + "order" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "minLength": 1 + }, + "settings": { + "title": "Settings", + "type": "object", + "additionalProperties": true + }, + "description": { + "title": "Description", + "type": "string" + }, + "allow_notes": { + "title": "Allow notes", + "type": "boolean" + }, + "required": { + "title": "Required", + "type": "boolean" + }, + "order": { + "title": "Order", + "type": "integer" + } + } + }, + "QueueForSourceEntry": { + "required": [ + "queue", + "item", + "labels", + "existing_scores", + "existing_notes", + "existing_label_notes", + "span_notes" + ], + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueForSourceQueue" + }, + "item": { + "$ref": "#/components/schemas/QueueForSourceItem" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueLabelResult" + } + }, + "existing_scores": { + "title": "Existing scores", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + }, + "existing_notes": { + "title": "Existing notes", + "type": "string" + }, + "existing_label_notes": { + "title": "Existing label notes", + "type": "object", + "additionalProperties": { + "type": "string", + "minLength": 1 + } + }, + "span_notes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "span_notes_source_id": { + "title": "Span notes source id", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "QueueForSourceResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueForSourceEntry" + } + } + } + }, + "QueueDefaultRequest": { + "type": "object", + "properties": { + "project_id": { + "title": "Project id", + "type": "string", + "format": "uuid" + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "agent_definition_id": { + "title": "Agent definition id", + "type": "string", + "format": "uuid" + } + } + }, + "QueueDefaultQueue": { + "required": [ + "id", + "name", + "status", + "is_default" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "instructions": { + "title": "Instructions", + "type": "string" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "is_default": { + "title": "Is default", + "type": "boolean" + } + } + }, + "QueueDefaultResult": { + "required": [ + "queue", + "labels", + "created", + "action" + ], + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueDefaultQueue" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueLabelResult" + } + }, + "created": { + "title": "Created", + "type": "boolean" + }, + "action": { + "title": "Action", + "type": "string", + "enum": [ + "created", + "restored", + "fetched" + ] + } + } + }, + "QueueDefaultResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueDefaultResult" + } + } + }, + "QueueLabelRequest": { + "required": [ + "label_id" + ], + "type": "object", + "properties": { + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "required": { + "title": "Required", + "type": "boolean", + "default": true + } + } + }, + "QueueAddLabelResult": { + "required": [ + "label", + "created", + "reopened_items", + "queue_status" + ], + "type": "object", + "properties": { + "label": { + "$ref": "#/components/schemas/QueueLabelResult" + }, + "created": { + "title": "Created", + "type": "boolean" + }, + "reopened_items": { + "title": "Reopened items", + "type": "integer" + }, + "queue_status": { + "title": "Queue status", + "type": "string", + "minLength": 1 + } + } + }, + "QueueAddLabelResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueAddLabelResult" + } + } + }, + "QueueAgreementLabel": { + "required": [ + "label_name", + "label_type", + "agreement_pct", + "cohens_kappa", + "disagreement_count", + "disagreement_items" + ], + "type": "object", + "properties": { + "label_name": { + "title": "Label name", + "type": "string", + "nullable": true + }, + "label_type": { + "title": "Label type", + "type": "string", + "nullable": true + }, + "agreement_pct": { + "title": "Agreement pct", + "type": "number", + "nullable": true + }, + "cohens_kappa": { + "title": "Cohens kappa", + "type": "number", + "nullable": true + }, + "disagreement_count": { + "title": "Disagreement count", + "type": "integer" + }, + "disagreement_items": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "QueueAgreementAnnotatorPair": { + "required": [ + "annotator_1_id", + "annotator_2_id", + "agreement_pct", + "total_comparisons" + ], + "type": "object", + "properties": { + "annotator_1_id": { + "title": "Annotator 1 id", + "type": "string", + "minLength": 1 + }, + "annotator_2_id": { + "title": "Annotator 2 id", + "type": "string", + "minLength": 1 + }, + "agreement_pct": { + "title": "Agreement pct", + "type": "number" + }, + "total_comparisons": { + "title": "Total comparisons", + "type": "integer" + } + } + }, + "QueueAgreementResult": { + "required": [ + "overall_agreement", + "labels", + "annotator_pairs" + ], + "type": "object", + "properties": { + "overall_agreement": { + "title": "Overall agreement", + "type": "number", + "nullable": true + }, + "labels": { + "title": "Labels", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/QueueAgreementLabel" + } + }, + "annotator_pairs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueAgreementAnnotatorPair" + } + } + } + }, + "QueueAgreementResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueAgreementResult" + } + } + }, + "QueueAnalyticsThroughputDaily": { + "required": [ + "date", + "count" + ], + "type": "object", + "properties": { + "date": { + "title": "Date", + "type": "string", + "minLength": 1 + }, + "count": { + "title": "Count", + "type": "integer" + } + } + }, + "QueueAnalyticsThroughput": { + "required": [ + "daily", + "total_completed", + "avg_per_day" + ], + "type": "object", + "properties": { + "daily": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueAnalyticsThroughputDaily" + } + }, + "total_completed": { + "title": "Total completed", + "type": "integer" + }, + "avg_per_day": { + "title": "Avg per day", + "type": "number" + } + } + }, + "QueueAnalyticsAnnotatorPerformance": { + "required": [ + "completed" + ], + "type": "object", + "properties": { + "user_id": { + "title": "User id", + "type": "string", + "minLength": 1, + "nullable": true + }, + "name": { + "title": "Name", + "type": "string", + "nullable": true + }, + "completed": { + "title": "Completed", + "type": "integer" + }, + "last_active": { + "title": "Last active", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "QueueAnalyticsResult": { + "required": [ + "throughput", + "annotator_performance", + "label_distribution", + "status_breakdown", + "total" + ], + "type": "object", + "properties": { + "throughput": { + "$ref": "#/components/schemas/QueueAnalyticsThroughput" + }, + "annotator_performance": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueAnalyticsAnnotatorPerformance" + } + }, + "label_distribution": { + "title": "Label distribution", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + }, + "status_breakdown": { + "title": "Status breakdown", + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "total": { + "title": "Total", + "type": "integer" + } + } + }, + "QueueAnalyticsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueAnalyticsResult" + } + } + }, + "QueueExportField": { + "required": [ + "id", + "label", + "column", + "data_type", + "group", + "default" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "label": { + "title": "Label", + "type": "string", + "minLength": 1 + }, + "column": { + "title": "Column", + "type": "string", + "minLength": 1 + }, + "data_type": { + "title": "Data type", + "type": "string", + "minLength": 1 + }, + "group": { + "title": "Group", + "type": "string", + "minLength": 1 + }, + "default": { + "title": "Default", + "type": "boolean" + }, + "path": { + "title": "Path", + "type": "string" + }, + "source_type": { + "title": "Source type", + "type": "string" + }, + "kind": { + "title": "Kind", + "type": "string" + }, + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "slot": { + "title": "Slot", + "type": "integer" + }, + "eval_key": { + "title": "Eval key", + "type": "string" + }, + "expand_fields": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "QueueExportDefaultMapping": { + "required": [ + "field", + "column", + "enabled" + ], + "type": "object", + "properties": { + "field": { + "title": "Field", + "type": "string", + "minLength": 1 + }, + "column": { + "title": "Column", + "type": "string", + "minLength": 1 + }, + "enabled": { + "title": "Enabled", + "type": "boolean" + } + } + }, + "QueueExportFieldsResult": { + "required": [ + "fields", + "default_mapping" + ], + "type": "object", + "properties": { + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueExportField" + } + }, + "default_mapping": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueExportDefaultMapping" + } + } + } + }, + "QueueExportFieldsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueExportFieldsResult" + } + } + }, + "QueueExportColumnMapping": { + "type": "object", + "properties": { + "field": { + "title": "Field", + "type": "string" + }, + "id": { + "title": "Id", + "type": "string" + }, + "column": { + "title": "Column", + "type": "string" + }, + "enabled": { + "title": "Enabled", + "type": "boolean", + "default": true + } + } + }, + "QueueExportToDatasetRequest": { + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string" + }, + "status_filter": { + "title": "Status filter", + "type": "string", + "default": "completed" + }, + "column_mapping": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueExportColumnMapping" + } + } + } + }, + "QueueExportToDatasetResult": { + "required": [ + "dataset_id", + "dataset_name", + "rows_created", + "columns" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "rows_created": { + "title": "Rows created", + "type": "integer" + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "QueueExportToDatasetResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueExportToDatasetResult" + } + } + }, + "QueueExportAnnotationsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "QueueHardDeleteRequest": { + "required": [ + "force", + "confirm_name" + ], + "type": "object", + "properties": { + "force": { + "title": "Force", + "type": "boolean" + }, + "confirm_name": { + "title": "Confirm name", + "type": "string", + "minLength": 1 + } + } + }, + "QueueHardDeleteResult": { + "required": [ + "deleted", + "queue_id" + ], + "type": "object", + "properties": { + "deleted": { + "title": "Deleted", + "type": "boolean" + }, + "hard_deleted": { + "title": "Hard deleted", + "type": "boolean" + }, + "archived": { + "title": "Archived", + "type": "boolean" + }, + "queue_id": { + "title": "Queue id", + "type": "string", + "format": "uuid" + } + } + }, + "QueueHardDeleteResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueHardDeleteResult" + } + } + }, + "QueueProgressAnnotatorStat": { + "required": [ + "user_id", + "completed", + "pending", + "in_progress", + "in_review", + "annotations_count" + ], + "type": "object", + "properties": { + "user_id": { + "title": "User id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1, + "nullable": true + }, + "completed": { + "title": "Completed", + "type": "integer" + }, + "pending": { + "title": "Pending", + "type": "integer" + }, + "in_progress": { + "title": "In progress", + "type": "integer" + }, + "in_review": { + "title": "In review", + "type": "integer" + }, + "annotations_count": { + "title": "Annotations count", + "type": "integer" + } + } + }, + "QueueProgressUserProgress": { + "required": [ + "total", + "completed", + "pending", + "in_progress", + "in_review", + "skipped", + "progress_pct" + ], + "type": "object", + "properties": { + "total": { + "title": "Total", + "type": "integer" + }, + "completed": { + "title": "Completed", + "type": "integer" + }, + "pending": { + "title": "Pending", + "type": "integer" + }, + "in_progress": { + "title": "In progress", + "type": "integer" + }, + "in_review": { + "title": "In review", + "type": "integer" + }, + "skipped": { + "title": "Skipped", + "type": "integer" + }, + "progress_pct": { + "title": "Progress pct", + "type": "number" + } + } + }, + "QueueProgressResult": { + "required": [ + "total", + "pending", + "in_progress", + "in_review", + "completed", + "skipped", + "progress_pct", + "annotator_stats", + "user_progress" + ], + "type": "object", + "properties": { + "total": { + "title": "Total", + "type": "integer" + }, + "pending": { + "title": "Pending", + "type": "integer" + }, + "in_progress": { + "title": "In progress", + "type": "integer" + }, + "in_review": { + "title": "In review", + "type": "integer" + }, + "completed": { + "title": "Completed", + "type": "integer" + }, + "skipped": { + "title": "Skipped", + "type": "integer" + }, + "progress_pct": { + "title": "Progress pct", + "type": "number" + }, + "annotator_stats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueProgressAnnotatorStat" + } + }, + "user_progress": { + "$ref": "#/components/schemas/QueueProgressUserProgress" + } + } + }, + "QueueProgressResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueProgressResult" + } + } + }, + "QueueRemoveLabelResult": { + "required": [ + "removed" + ], + "type": "object", + "properties": { + "removed": { + "title": "Removed", + "type": "boolean" + } + } + }, + "QueueRemoveLabelResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueRemoveLabelResult" + } + } + }, + "EmptyRequest": { + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "QueueStatusResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/AnnotationQueue" + } + } + }, + "QueueStatusRequest": { + "required": [ + "status" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "string", + "enum": [ + "draft", + "active", + "paused", + "completed" + ] + } + } + }, + "AutomationRuleScope": { + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "project_id": { + "title": "Project id", + "type": "string", + "format": "uuid" + }, + "is_voice_call": { + "title": "Is voice call", + "type": "boolean" + }, + "remove_simulation_calls": { + "title": "Remove simulation calls", + "type": "boolean" + } + } + }, + "AutomationRuleConditions": { + "type": "object", + "properties": { + "operator": { + "title": "Operator", + "type": "string", + "enum": [ + "and" + ], + "default": "and" + }, + "filter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string", + "description": "Column or attribute id to filter on." + }, + "display_name": { + "type": "string", + "description": "Optional UI label for chips and saved views." + }, + "source": { + "type": "string", + "description": "Optional source surface for mixed-source filters, for example traces, datasets, or simulation." + }, + "output_type": { + "type": "string", + "description": "Optional metric output type metadata used by eval and annotation filters." + }, + "filter_config": { + "type": "object", + "properties": { + "filter_type": { + "type": "string", + "description": "Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array." + }, + "filter_op": { + "type": "string", + "description": "Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null." + }, + "filter_value": { + "description": "Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type." + }, + "col_type": { + "type": "string", + "description": "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL." + } + }, + "required": [ + "filter_type", + "filter_op" + ], + "additionalProperties": false + } + }, + "required": [ + "column_id", + "filter_config" + ], + "additionalProperties": false + } + }, + "scope": { + "$ref": "#/components/schemas/AutomationRuleScope" + }, + "rules": { + "title": "Rules", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string", + "minLength": 1 + }, + "op": { + "type": "string", + "default": "eq", + "minLength": 1 + }, + "value": { + "description": "Rule comparison value. Can be a scalar, list, object, boolean, or null depending on the operator." + } + }, + "required": [ + "field" + ], + "additionalProperties": false + } + } + } + }, + "AutomationRule": { + "required": [ + "name", + "source_type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "queue": { + "title": "Queue", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "dataset_row", + "trace", + "observation_span", + "prototype_run", + "call_execution", + "trace_session" + ] + }, + "conditions": { + "$ref": "#/components/schemas/AutomationRuleConditions" + }, + "enabled": { + "title": "Enabled", + "type": "boolean" + }, + "trigger_frequency": { + "title": "Trigger frequency", + "type": "string", + "enum": [ + "manual", + "hourly", + "daily", + "weekly", + "monthly" + ] + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "created_by": { + "title": "Created by", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "created_by_name": { + "title": "Created by name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "last_triggered_at": { + "title": "Last triggered at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "trigger_count": { + "title": "Trigger count", + "type": "integer", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "AutomationRuleEvaluateResult": { + "required": [ + "matched", + "added", + "duplicates" + ], + "type": "object", + "properties": { + "matched": { + "title": "Matched", + "type": "integer" + }, + "added": { + "title": "Added", + "type": "integer" + }, + "duplicates": { + "title": "Duplicates", + "type": "integer" + }, + "truncated": { + "title": "Truncated", + "type": "boolean" + }, + "error": { + "title": "Error", + "type": "string" + } + } + }, + "AutomationRuleEvaluateResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/AutomationRuleEvaluateResult" + } + } + }, + "AutomationRuleEvaluateAcceptedResponse": { + "required": [ + "status", + "workflow_id", + "message" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "workflow_id": { + "title": "Workflow id", + "type": "string", + "minLength": 1 + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "QueueItem": { + "required": [ + "source_type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "queue": { + "title": "Queue", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "dataset_row", + "trace", + "observation_span", + "prototype_run", + "call_execution", + "trace_session" + ] + }, + "source_id": { + "title": "Source id", + "type": "string", + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "pending", + "in_progress", + "completed", + "skipped" + ] + }, + "workflow_status": { + "title": "Workflow status", + "type": "string", + "readOnly": true + }, + "workflow_status_label": { + "title": "Workflow status label", + "type": "string", + "readOnly": true + }, + "priority": { + "title": "Priority", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "order": { + "title": "Order", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": true + }, + "assigned_to": { + "title": "Assigned to", + "type": "string", + "format": "uuid", + "nullable": true + }, + "assigned_to_name": { + "title": "Assigned to name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "assigned_users": { + "title": "Assigned users", + "type": "string", + "readOnly": true + }, + "reserved_by": { + "title": "Reserved by", + "type": "string", + "format": "uuid", + "nullable": true + }, + "reserved_by_name": { + "title": "Reserved by name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "reservation_expires_at": { + "title": "Reservation expires at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "review_status": { + "title": "Review status", + "type": "string", + "maxLength": 20, + "nullable": true + }, + "reviewed_by": { + "title": "Reviewed by", + "type": "string", + "format": "uuid", + "nullable": true + }, + "reviewed_by_name": { + "title": "Reviewed by name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "reviewed_at": { + "title": "Reviewed at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "review_notes": { + "title": "Review notes", + "type": "string", + "nullable": true + }, + "source_preview": { + "title": "Source preview", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "AddQueueItem": { + "required": [ + "source_type", + "source_id" + ], + "type": "object", + "properties": { + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "call_execution", + "dataset_row", + "observation_span", + "prototype_run", + "trace", + "trace_session" + ] + }, + "source_id": { + "title": "Source id", + "type": "string", + "minLength": 1 + } + } + }, + "Selection": { + "required": [ + "mode", + "source_type", + "project_id" + ], + "type": "object", + "properties": { + "mode": { + "title": "Mode", + "type": "string", + "enum": [ + "filter" + ] + }, + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "call_execution", + "observation_span", + "trace", + "trace_session" + ] + }, + "project_id": { + "title": "Project id", + "type": "string", + "format": "uuid" + }, + "filter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string", + "description": "Column or attribute id to filter on." + }, + "display_name": { + "type": "string", + "description": "Optional UI label for chips and saved views." + }, + "source": { + "type": "string", + "description": "Optional source surface for mixed-source filters, for example traces, datasets, or simulation." + }, + "output_type": { + "type": "string", + "description": "Optional metric output type metadata used by eval and annotation filters." + }, + "filter_config": { + "type": "object", + "properties": { + "filter_type": { + "type": "string", + "description": "Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array." + }, + "filter_op": { + "type": "string", + "description": "Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null." + }, + "filter_value": { + "description": "Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type." + }, + "col_type": { + "type": "string", + "description": "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL." + } + }, + "required": [ + "filter_type", + "filter_op" + ], + "additionalProperties": false + } + }, + "required": [ + "column_id", + "filter_config" + ], + "additionalProperties": false + } + }, + "exclude_ids": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "remove_simulation_calls": { + "title": "Remove simulation calls", + "type": "boolean", + "default": false + }, + "is_voice_call": { + "title": "Is voice call", + "type": "boolean", + "default": false + } + } + }, + "AddItems": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddQueueItem" + } + }, + "selection": { + "$ref": "#/components/schemas/Selection" + } + } + }, + "QueueAddItemsResult": { + "required": [ + "added", + "duplicates", + "errors", + "queue_status" + ], + "type": "object", + "properties": { + "added": { + "title": "Added", + "type": "integer" + }, + "duplicates": { + "title": "Duplicates", + "type": "integer" + }, + "errors": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "queue_status": { + "title": "Queue status", + "type": "string", + "minLength": 1 + }, + "total_matching": { + "title": "Total matching", + "type": "integer" + } + } + }, + "QueueAddItemsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueAddItemsResult" + } + } + }, + "ApiSelectionTooLargeDetail": { + "required": [ + "type", + "message", + "total_matching", + "cap" + ], + "type": "object", + "properties": { + "type": { + "title": "Type", + "type": "string", + "enum": [ + "selection_too_large" + ] + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "total_matching": { + "title": "Total matching", + "type": "integer" + }, + "cap": { + "title": "Cap", + "type": "integer" + } + } + }, + "ApiSelectionTooLargeError": { + "required": [ + "message", + "error" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "selection_too_large" + ] + }, + "code": { + "title": "Code", + "type": "string", + "default": "selection_too_large", + "minLength": 1 + }, + "detail": { + "title": "Detail", + "type": "string", + "minLength": 1 + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "error": { + "$ref": "#/components/schemas/ApiSelectionTooLargeDetail" + } + } + }, + "AssignItems": { + "required": [ + "item_ids" + ], + "type": "object", + "properties": { + "item_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + }, + "user_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "action": { + "title": "Action", + "type": "string", + "enum": [ + "add", + "set", + "remove" + ], + "default": "add" + } + } + }, + "QueueAssignItemsResult": { + "required": [ + "assigned" + ], + "type": "object", + "properties": { + "assigned": { + "title": "Assigned", + "type": "integer" + } + } + }, + "QueueAssignItemsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueAssignItemsResult" + } + } + }, + "BulkRemoveItems": { + "required": [ + "item_ids" + ], + "type": "object", + "properties": { + "item_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + }, + "QueueBulkRemoveItemsResult": { + "required": [ + "removed" + ], + "type": "object", + "properties": { + "removed": { + "title": "Removed", + "type": "integer" + } + } + }, + "QueueBulkRemoveItemsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueBulkRemoveItemsResult" + } + } + }, + "QueueNextItemResult": { + "required": [ + "item" + ], + "type": "object", + "properties": { + "item": { + "title": "Item", + "type": "object", + "additionalProperties": true + } + } + }, + "QueueNextItemResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueNextItemResult" + } + } + }, + "QueueAnnotateDetailResult": { + "required": [ + "item", + "queue", + "labels", + "annotations", + "review_comments", + "review_threads", + "existing_notes", + "span_notes", + "progress" + ], + "type": "object", + "properties": { + "item": { + "title": "Item", + "type": "object", + "additionalProperties": true + }, + "queue": { + "title": "Queue", + "type": "object", + "additionalProperties": true + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "annotations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "review_comments": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "review_threads": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "existing_notes": { + "title": "Existing notes", + "type": "string" + }, + "span_notes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "span_notes_source_id": { + "title": "Span notes source id", + "type": "string", + "minLength": 1, + "nullable": true + }, + "progress": { + "title": "Progress", + "type": "object", + "additionalProperties": true + }, + "next_item_id": { + "title": "Next item id", + "type": "string", + "minLength": 1, + "nullable": true + }, + "prev_item_id": { + "title": "Prev item id", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "QueueAnnotateDetailResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueAnnotateDetailResult" + } + } + }, + "Score": { + "required": [ + "source_type", + "value" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "dataset_row", + "trace", + "observation_span", + "prototype_run", + "call_execution", + "trace_session" + ] + }, + "source_id": { + "title": "Source id", + "type": "string", + "readOnly": true + }, + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "label_name": { + "title": "Label name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "label_type": { + "title": "Label type", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "label_settings": { + "title": "Label settings", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "label_allow_notes": { + "title": "Label allow notes", + "type": "boolean", + "readOnly": true + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "score_source": { + "title": "Score source", + "type": "string", + "enum": [ + "human", + "api", + "auto", + "imported" + ] + }, + "notes": { + "title": "Notes", + "type": "string", + "nullable": true + }, + "annotator": { + "title": "Annotator", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "annotator_name": { + "title": "Annotator name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "annotator_email": { + "title": "Annotator email", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "queue_item": { + "title": "Queue item", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "queue_id": { + "title": "Queue id", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "QueueItemAnnotationsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Score" + } + } + } + }, + "ImportAnnotationEntry": { + "required": [ + "label_id", + "value" + ], + "type": "object", + "properties": { + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "notes": { + "title": "Notes", + "type": "string" + }, + "score_source": { + "title": "Score source", + "type": "string" + } + } + }, + "ImportAnnotations": { + "required": [ + "annotations" + ], + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImportAnnotationEntry" + } + }, + "annotator_id": { + "title": "Annotator id", + "type": "string", + "format": "uuid" + } + } + }, + "QueueImportAnnotationsResult": { + "required": [ + "imported" + ], + "type": "object", + "properties": { + "imported": { + "title": "Imported", + "type": "integer" + } + } + }, + "QueueImportAnnotationsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueImportAnnotationsResult" + } + } + }, + "SubmitAnnotationEntry": { + "required": [ + "label_id", + "value" + ], + "type": "object", + "properties": { + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "notes": { + "title": "Notes", + "type": "string" + } + } + }, + "SubmitAnnotations": { + "required": [ + "annotations" + ], + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubmitAnnotationEntry" + } + }, + "notes": { + "title": "Notes", + "type": "string", + "default": "" + }, + "item_notes": { + "title": "Item notes", + "type": "string", + "nullable": true + } + } + }, + "QueueSubmitAnnotationsResult": { + "required": [ + "submitted" + ], + "type": "object", + "properties": { + "submitted": { + "title": "Submitted", + "type": "integer" + } + } + }, + "QueueSubmitAnnotationsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueSubmitAnnotationsResult" + } + } + }, + "QueueItemNavigationRequest": { + "type": "object", + "properties": { + "exclude": { + "type": "array", + "items": { + "type": "string" + } + }, + "exclude_review_status": { + "title": "Exclude review status", + "type": "string" + }, + "include_completed": { + "title": "Include completed", + "type": "boolean", + "default": false + } + } + }, + "QueueNavigationResult": { + "required": [ + "next_item" + ], + "type": "object", + "properties": { + "completed_item_id": { + "title": "Completed item id", + "type": "string", + "format": "uuid" + }, + "skipped_item_id": { + "title": "Skipped item id", + "type": "string", + "format": "uuid" + }, + "next_item": { + "title": "Next item", + "type": "object", + "additionalProperties": true + } + } + }, + "QueueNavigationResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueNavigationResult" + } + } + }, + "QueueDiscussionResult": { + "required": [ + "review_comments", + "review_threads" + ], + "type": "object", + "properties": { + "review_comments": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "review_threads": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "comment": { + "title": "Comment", + "type": "object", + "additionalProperties": true + }, + "thread": { + "title": "Thread", + "type": "object", + "additionalProperties": true + } + } + }, + "QueueDiscussionResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueDiscussionResult" + } + } + }, + "DiscussionCommentRequest": { + "type": "object", + "properties": { + "comment": { + "title": "Comment", + "type": "string" + }, + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "target_annotator_id": { + "title": "Target annotator id", + "type": "string", + "format": "uuid" + }, + "thread_id": { + "title": "Thread id", + "type": "string", + "format": "uuid" + }, + "mentioned_user_ids": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "DiscussionReactionRequest": { + "type": "object", + "properties": { + "emoji": { + "title": "Emoji", + "type": "string", + "maxLength": 16 + } + } + }, + "DiscussionThreadStatusRequest": { + "type": "object", + "properties": { + "comment": { + "title": "Comment", + "type": "string" + } + } + }, + "QueueReleaseReservationResult": { + "required": [ + "released" + ], + "type": "object", + "properties": { + "released": { + "title": "Released", + "type": "boolean" + } + } + }, + "QueueReleaseReservationResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueReleaseReservationResult" + } + } + }, + "ReviewLabelCommentRequest": { + "type": "object", + "properties": { + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "target_annotator_id": { + "title": "Target annotator id", + "type": "string", + "format": "uuid" + }, + "comment": { + "title": "Comment", + "type": "string" + } + } + }, + "ReviewItemRequest": { + "required": [ + "action" + ], + "type": "object", + "properties": { + "action": { + "title": "Action", + "type": "string", + "enum": [ + "approve", + "request_changes", + "reject", + "comment" + ] + }, + "notes": { + "title": "Notes", + "type": "string" + }, + "label_comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReviewLabelCommentRequest" + } + } + } + }, + "QueueReviewItemResult": { + "required": [ + "reviewed_item_id", + "action", + "next_item", + "review_comments", + "review_threads" + ], + "type": "object", + "properties": { + "reviewed_item_id": { + "title": "Reviewed item id", + "type": "string", + "format": "uuid" + }, + "action": { + "title": "Action", + "type": "string", + "minLength": 1 + }, + "next_item": { + "title": "Next item", + "type": "object", + "additionalProperties": true + }, + "review_comments": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "review_threads": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "QueueReviewItemResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/QueueReviewItemResult" + } + } + }, + "Organization": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string", + "maxLength": 255 + }, + "is_new": { + "title": "Is new", + "type": "boolean" + }, + "ws_enabled": { + "title": "Ws enabled", + "type": "boolean" + }, + "region": { + "title": "Region", + "type": "string", + "maxLength": 16, + "minLength": 1 + }, + "require_2fa": { + "title": "Require 2fa", + "type": "boolean" + }, + "require_2fa_grace_period_days": { + "title": "Require 2fa grace period days", + "type": "integer", + "maximum": 32767, + "minimum": 0 + }, + "require_2fa_enforced_at": { + "title": "Require 2fa enforced at", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "User": { + "required": [ + "email", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "email": { + "title": "Email", + "type": "string", + "format": "email", + "maxLength": 254, + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "organization_role": { + "title": "Organization role", + "type": "string", + "enum": [ + "Owner", + "Admin", + "Member", + "Viewer", + "workspace_admin", + "workspace_member", + "workspace_viewer" + ], + "nullable": true + }, + "organization": { + "$ref": "#/components/schemas/Organization" + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true + }, + "role": { + "title": "Role", + "description": "User's job role (e.g., Data Scientist, ML Engineer, or custom role)", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "goals": { + "title": "Goals", + "description": "List of user's goals for using the platform", + "type": "object", + "additionalProperties": true + } + } + }, + "AnnotationsLabels": { + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "text", + "numeric", + "categorical", + "star", + "thumbs_up_down" + ] + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "settings": { + "title": "Settings", + "type": "object", + "additionalProperties": true + }, + "project": { + "title": "Project", + "type": "string", + "format": "uuid" + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "allow_notes": { + "title": "Allow notes", + "type": "boolean" + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "trace_annotations_count": { + "title": "Trace annotations count", + "type": "integer", + "readOnly": true + }, + "annotation_count": { + "title": "Annotation count", + "type": "integer", + "readOnly": true + } + } + }, + "AnnotationLabelRestoreResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/AnnotationsLabels" + } + } + }, + "ApiKey": { + "required": [ + "provider" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "provider": { + "title": "Provider", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "key": { + "title": "Key", + "type": "string", + "maxLength": 2500, + "nullable": true + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "masked_actual_key": { + "title": "Masked actual key", + "type": "string", + "readOnly": true + }, + "config_json": { + "title": "Config json", + "type": "object", + "additionalProperties": true + } + } + }, + "ModelHubPaginatedResponse": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer" + }, + "next": { + "title": "Next", + "type": "string", + "nullable": true + }, + "previous": { + "title": "Previous", + "type": "string", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "ModelHubEmptyRequest": { + "type": "object", + "properties": {} + }, + "ModelHubStringResultResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetColumnDetailItem": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "data_type": { + "title": "Data type", + "type": "string", + "nullable": true + } + } + }, + "DatasetColumnDetailResult": { + "required": [ + "columns" + ], + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetColumnDetailItem" + } + } + } + }, + "DatasetColumnDetailResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetColumnDetailResult" + } + } + }, + "AnnotationSummaryHeader": { + "type": "object", + "properties": { + "dataset_coverage": { + "title": "Dataset coverage", + "type": "number", + "nullable": true + }, + "completion_eta": { + "title": "Completion eta", + "type": "number", + "nullable": true + }, + "overall_agreement": { + "title": "Overall agreement", + "type": "number", + "nullable": true + } + } + }, + "AnnotationSummaryResult": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "annotators": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "header": { + "$ref": "#/components/schemas/AnnotationSummaryHeader" + } + } + }, + "AnnotationSummaryResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/AnnotationSummaryResult" + } + } + }, + "DatasetEvalStatsMetric": { + "required": [ + "name", + "output" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "total_cells": { + "title": "Total cells", + "type": "integer", + "nullable": true + }, + "output": { + "title": "Output", + "type": "object", + "additionalProperties": true + } + } + }, + "DatasetEvalStatsItem": { + "required": [ + "id", + "name", + "output_type", + "result" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "output_type": { + "title": "Output type", + "type": "string", + "minLength": 1 + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetEvalStatsMetric" + } + }, + "total_pass_rate": { + "title": "Total pass rate", + "type": "number", + "nullable": true + }, + "total_avg": { + "title": "Total avg", + "type": "object", + "additionalProperties": true + }, + "total_choices_avg": { + "title": "Total choices avg", + "type": "object", + "additionalProperties": true + }, + "is_numeric_eval": { + "title": "Is numeric eval", + "type": "boolean" + }, + "is_numeric_eval_percentage": { + "title": "Is numeric eval percentage", + "type": "boolean" + } + } + }, + "DatasetEvalStatsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetEvalStatsItem" + } + } + } + }, + "JsonColumnSchemaEntry": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "sample": { + "title": "Sample", + "type": "object", + "additionalProperties": true + }, + "max_array_count": { + "title": "Max array count", + "type": "integer" + }, + "max_images_count": { + "title": "Max images count", + "type": "integer" + } + } + }, + "DatasetJsonSchemaResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JsonColumnSchemaEntry" + } + } + } + }, + "DatasetRunPromptStatsPrompt": { + "required": [ + "id", + "name", + "input_token", + "output_token", + "total_token" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "input_token": { + "title": "Input token", + "type": "number" + }, + "output_token": { + "title": "Output token", + "type": "number" + }, + "total_token": { + "title": "Total token", + "type": "number" + } + } + }, + "DatasetRunPromptStatsResult": { + "required": [ + "avg_tokens", + "avg_cost", + "avg_time", + "prompts" + ], + "type": "object", + "properties": { + "avg_tokens": { + "title": "Avg tokens", + "type": "number" + }, + "avg_cost": { + "title": "Avg cost", + "type": "number" + }, + "avg_time": { + "title": "Avg time", + "type": "number" + }, + "prompts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetRunPromptStatsPrompt" + } + } + } + }, + "DatasetRunPromptStatsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetRunPromptStatsResult" + } + } + }, + "CompareEvalsListRequest": { + "required": [ + "eval_type", + "dataset_ids" + ], + "type": "object", + "properties": { + "search_text": { + "title": "Search text", + "type": "string", + "default": "" + }, + "eval_type": { + "title": "Eval type", + "type": "string", + "enum": [ + "user" + ] + }, + "dataset_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "CompareEvalListResult": { + "required": [ + "evals" + ], + "type": "object", + "properties": { + "evals": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "CompareEvalListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/CompareEvalListResult" + } + } + }, + "ComparePreviewRunEvalRequest": { + "required": [ + "config", + "template_id", + "dataset_ids" + ], + "type": "object", + "properties": { + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "model": { + "title": "Model", + "type": "string", + "default": "" + }, + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "dataset_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "dataset_info": { + "title": "Dataset info", + "type": "object", + "additionalProperties": true + }, + "source": { + "title": "Source", + "type": "string", + "default": "dataset_evaluation" + } + } + }, + "EvalPreviewResult": { + "required": [ + "responses" + ], + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "description": "Response", + "additionalProperties": true + } + } + } + }, + "EvalPreviewResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalPreviewResult" + } + } + }, + "CompareDatasetRowResult": { + "required": [ + "table" + ], + "type": "object", + "properties": { + "prev_row_id": { + "title": "Prev row id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "next_row_id": { + "title": "Next row id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "table": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "CompareDatasetRowResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/CompareDatasetRowResult" + } + } + }, + "CompareDatasetDeleteResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "CompareDatasetDeleteResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/CompareDatasetDeleteResult" + } + } + }, + "DatasetExplanationSummaryResponseResult": { + "required": [ + "response", + "last_updated", + "status", + "row_count", + "min_rows_required" + ], + "type": "object", + "properties": { + "response": { + "title": "Response", + "type": "object", + "additionalProperties": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "row_count": { + "title": "Row count", + "type": "integer" + }, + "min_rows_required": { + "title": "Min rows required", + "type": "integer" + } + } + }, + "DatasetExplanationSummaryResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetExplanationSummaryResponseResult" + } + } + }, + "BaseColumnsResponseResult": { + "required": [ + "base_columns" + ], + "type": "object", + "properties": { + "base_columns": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "BaseColumnsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/BaseColumnsResponseResult" + } + } + }, + "HuggingFaceDatasetDetailRequest": { + "required": [ + "dataset_id" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "minLength": 1 + } + } + }, + "HuggingFaceDatasetDetail": { + "required": [ + "id", + "name", + "description", + "downloads", + "likes", + "tags" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "downloads": { + "title": "Downloads", + "type": "integer" + }, + "likes": { + "title": "Likes", + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "author": { + "title": "Author", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "HuggingFaceDatasetDetailResponseResult": { + "required": [ + "message", + "dataset" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "dataset": { + "$ref": "#/components/schemas/HuggingFaceDatasetDetail" + } + } + }, + "HuggingFaceDatasetDetailResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/HuggingFaceDatasetDetailResponseResult" + } + } + }, + "HuggingFaceDatasetListRequest": { + "type": "object", + "properties": { + "search_query": { + "title": "Search query", + "type": "string", + "default": "" + }, + "filter_params": { + "title": "Filter params", + "type": "object", + "additionalProperties": true + } + } + }, + "HuggingFaceDatasetListItem": { + "required": [ + "id", + "name", + "downloads", + "likes" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "downloads": { + "title": "Downloads", + "type": "integer" + }, + "likes": { + "title": "Likes", + "type": "integer" + }, + "author": { + "title": "Author", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "HuggingFaceDatasetListResponseResult": { + "required": [ + "message", + "total_datasets", + "datasets" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "total_datasets": { + "title": "Total datasets", + "type": "integer" + }, + "datasets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HuggingFaceDatasetListItem" + } + } + } + }, + "HuggingFaceDatasetListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/HuggingFaceDatasetListResponseResult" + } + } + }, + "AddApiColumnRequest": { + "required": [ + "column_name", + "config" + ], + "type": "object", + "properties": { + "column_name": { + "title": "Column name", + "type": "string", + "minLength": 1 + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "concurrency": { + "title": "Concurrency", + "type": "integer", + "default": 5 + } + } + }, + "DynamicColumnCreateResult": { + "required": [ + "message", + "new_column_id", + "new_column_name" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "new_column_id": { + "title": "New column id", + "type": "string", + "format": "uuid" + }, + "new_column_name": { + "title": "New column name", + "type": "string", + "minLength": 1 + } + } + }, + "DynamicColumnCreateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DynamicColumnCreateResult" + } + } + }, + "VectorDBColumnRequest": { + "required": [ + "column_id", + "sub_type", + "api_key" + ], + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "new_column_name": { + "title": "New column name", + "type": "string" + }, + "sub_type": { + "title": "Sub type", + "type": "string", + "minLength": 1 + }, + "api_key": { + "title": "Api key", + "type": "string", + "minLength": 1 + }, + "collection_name": { + "title": "Collection name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "search_type": { + "title": "Search type", + "type": "string" + }, + "key": { + "title": "Key", + "type": "string" + }, + "limit": { + "title": "Limit", + "type": "integer" + }, + "index_name": { + "title": "Index name", + "type": "string" + }, + "top_k": { + "title": "Top k", + "type": "integer" + }, + "namespace": { + "title": "Namespace", + "type": "string" + }, + "embedding_config": { + "title": "Embedding config", + "type": "object", + "additionalProperties": true + }, + "concurrency": { + "title": "Concurrency", + "type": "integer", + "default": 5 + }, + "query_key": { + "title": "Query key", + "type": "string" + }, + "vector_length": { + "title": "Vector length", + "type": "integer" + } + } + }, + "ClassifyColumnRequest": { + "required": [ + "column_id", + "labels" + ], + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "labels": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "language_model_id": { + "title": "Language model id", + "type": "string", + "default": "gpt-4o", + "minLength": 1 + }, + "concurrency": { + "title": "Concurrency", + "type": "integer", + "default": 5 + }, + "new_column_name": { + "title": "New column name", + "type": "string" + } + } + }, + "CompareDataset": { + "required": [ + "base_column_name", + "dataset_ids" + ], + "type": "object", + "properties": { + "compare_id": { + "title": "Compare id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "page_size": { + "title": "Page size", + "type": "integer", + "default": 10 + }, + "current_page_index": { + "title": "Current page index", + "type": "integer", + "default": 0 + }, + "base_column_name": { + "title": "Base column name", + "type": "string", + "minLength": 1 + }, + "dataset_info": { + "title": "Dataset info", + "type": "object", + "additionalProperties": true + }, + "common_column_names": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "dataset_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "CompareDatasetMetadata": { + "required": [ + "compare_id", + "total_rows", + "total_pages" + ], + "type": "object", + "properties": { + "compare_id": { + "title": "Compare id", + "type": "string", + "format": "uuid" + }, + "total_rows": { + "title": "Total rows", + "type": "integer" + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + } + } + }, + "CompareDatasetResult": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/CompareDatasetMetadata" + }, + "column_config": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "table": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "CompareDatasetResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/CompareDatasetResult" + } + } + }, + "CompareExperimentEvalRequest": { + "required": [ + "name", + "template_id", + "config" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "template_id": { + "title": "Template id", + "type": "string", + "maxLength": 500, + "minLength": 1 + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "default": false + }, + "model": { + "title": "Model", + "type": "string", + "maxLength": 100 + }, + "eval_type": { + "title": "Eval type", + "type": "string" + }, + "run": { + "title": "Run", + "type": "boolean", + "default": false + }, + "save_as_template": { + "title": "Save as template", + "type": "boolean", + "default": false + }, + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "composite_weight_overrides": { + "title": "Composite weight overrides", + "type": "object", + "additionalProperties": true + }, + "dataset_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "DevelopDatasetMessageResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1 + } + } + }, + "CompareStartEvalsRequest": { + "required": [ + "user_eval_names" + ], + "type": "object", + "properties": { + "user_eval_names": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "dataset_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "CompareDatasetStatsRequest": { + "required": [ + "base_column_name", + "dataset_ids" + ], + "type": "object", + "properties": { + "base_column_name": { + "title": "Base column name", + "type": "string", + "minLength": 1 + }, + "dataset_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "stat_type": { + "title": "Stat type", + "type": "string", + "enum": [ + "evaluation", + "run_prompt" + ], + "default": "evaluation" + } + } + }, + "CompareDatasetStatsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "ConditionalColumnRequest": { + "required": [ + "config", + "new_column_name" + ], + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "new_column_name": { + "title": "New column name", + "type": "string", + "minLength": 1 + }, + "concurrency": { + "title": "Concurrency", + "type": "integer", + "default": 5 + } + } + }, + "DerivedVariableDetail": { + "type": "object", + "properties": { + "paths": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "schema": { + "title": "Schema", + "type": "object", + "additionalProperties": true + }, + "full_variables": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "raw_sample": { + "title": "Raw sample", + "type": "object", + "additionalProperties": true + }, + "is_json": { + "title": "Is json", + "type": "boolean" + } + } + }, + "DatasetDerivedVariablesResult": { + "required": [ + "derived_variables" + ], + "type": "object", + "properties": { + "derived_variables": { + "title": "Derived variables", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DerivedVariableDetail" + } + } + } + }, + "DatasetDerivedVariablesResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetDerivedVariablesResult" + } + } + }, + "DuplicateRowsRequest": { + "type": "object", + "properties": { + "row_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "selected_all_rows": { + "title": "Selected all rows", + "type": "boolean", + "default": false + }, + "num_copies": { + "title": "Num copies", + "type": "integer", + "default": 1, + "minimum": 1 + } + } + }, + "DuplicateRowsResult": { + "required": [ + "message", + "source_rows", + "copies_per_row", + "total_new_rows", + "new_row_ids" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "source_rows": { + "title": "Source rows", + "type": "integer" + }, + "copies_per_row": { + "title": "Copies per row", + "type": "integer" + }, + "total_new_rows": { + "title": "Total new rows", + "type": "integer" + }, + "new_row_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "DuplicateRowsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DuplicateRowsResult" + } + } + }, + "DuplicateDatasetRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "row_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "selected_all_rows": { + "title": "Selected all rows", + "type": "boolean", + "default": false + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + } + } + }, + "DuplicateDatasetResult": { + "required": [ + "message", + "new_dataset_id", + "new_dataset_name", + "columns_copied", + "rows_copied" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "new_dataset_id": { + "title": "New dataset id", + "type": "string", + "format": "uuid" + }, + "new_dataset_name": { + "title": "New dataset name", + "type": "string", + "minLength": 1 + }, + "columns_copied": { + "title": "Columns copied", + "type": "integer" + }, + "rows_copied": { + "title": "Rows copied", + "type": "integer" + } + } + }, + "DuplicateDatasetResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DuplicateDatasetResult" + } + } + }, + "ExtractEntitiesRequest": { + "required": [ + "column_id", + "instruction" + ], + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "instruction": { + "title": "Instruction", + "type": "string", + "minLength": 1 + }, + "language_model_id": { + "title": "Language model id", + "type": "string", + "default": "gpt-4", + "minLength": 1 + }, + "concurrency": { + "title": "Concurrency", + "type": "integer", + "default": 5 + }, + "new_column_name": { + "title": "New column name", + "type": "string" + } + } + }, + "DynamicColumnMessageResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "DynamicColumnMessageResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DynamicColumnMessageResult" + } + } + }, + "MergeDatasetRequest": { + "required": [ + "target_dataset_id" + ], + "type": "object", + "properties": { + "row_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "selected_all_rows": { + "title": "Selected all rows", + "type": "boolean", + "default": false + }, + "target_dataset_id": { + "title": "Target dataset id", + "type": "string", + "format": "uuid" + } + } + }, + "MergeDatasetResult": { + "required": [ + "message", + "rows_added", + "new_columns_created", + "columns_mapped" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "rows_added": { + "title": "Rows added", + "type": "integer" + }, + "new_columns_created": { + "title": "New columns created", + "type": "integer" + }, + "columns_mapped": { + "title": "Columns mapped", + "type": "integer" + } + } + }, + "MergeDatasetResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/MergeDatasetResult" + } + } + }, + "PreviewDatasetOperationRequest": { + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "json_key": { + "title": "Json key", + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "language_model_id": { + "title": "Language model id", + "type": "string" + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "code": { + "title": "Code", + "type": "string" + } + } + }, + "PreviewDatasetOperationResultItem": { + "required": [ + "row_id" + ], + "type": "object", + "properties": { + "row_id": { + "title": "Row id", + "type": "string", + "format": "uuid" + }, + "input": { + "title": "Input", + "type": "object", + "additionalProperties": true + }, + "output": { + "title": "Output", + "type": "object", + "additionalProperties": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": true + } + } + }, + "PreviewDatasetOperationResult": { + "required": [ + "message", + "preview_results", + "sample_size" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "preview_results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PreviewDatasetOperationResultItem" + } + }, + "sample_size": { + "title": "Sample size", + "type": "integer" + } + } + }, + "PreviewDatasetOperationResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/PreviewDatasetOperationResult" + } + } + }, + "DeleteEvalTemplate": { + "required": [ + "eval_template_id" + ], + "type": "object", + "properties": { + "eval_template_id": { + "title": "Eval template id", + "type": "string", + "format": "uuid" + } + } + }, + "AddAsNewDatasetRequest": { + "required": [ + "dataset_id" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string" + }, + "columns": { + "title": "Columns", + "type": "object", + "additionalProperties": true + } + } + }, + "DatasetCopyResult": { + "required": [ + "message", + "dataset_id", + "dataset_name" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetCopyResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetCopyResult" + } + } + }, + "AddRowsFromFileRequest": { + "required": [ + "dataset_id" + ], + "type": "object", + "properties": { + "file": { + "title": "File", + "type": "string", + "readOnly": true, + "format": "uri" + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "model_type": { + "title": "Model type", + "type": "string" + } + } + }, + "DatasetSdkRowsRequest": { + "type": "object", + "properties": { + "dataset_name": { + "title": "Dataset name", + "type": "string" + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "Dataset": { + "required": [ + "name", + "organization" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 2000, + "minLength": 1 + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid" + }, + "model_type": { + "title": "Model type", + "type": "string", + "enum": [ + "Numeric", + "ScoreCategorical", + "Ranking", + "BinaryClassification", + "Regression", + "ObjectDetection", + "Segmentation", + "GenerativeLLM", + "GenerativeImage", + "GenerativeVideo", + "TTS", + "STT", + "MultiModal" + ] + }, + "source": { + "title": "Source", + "type": "string", + "enum": [ + "demo", + "build", + "sdk", + "observe", + "knowledge_base", + "scenario", + "experiment_snapshot", + "graph" + ] + }, + "user": { + "title": "User", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "DatasetSdkRowsCode": { + "required": [ + "python_add_row", + "python_add_col", + "typescript_add_col", + "typescript_add_row", + "curl_add_col", + "curl_add_row" + ], + "type": "object", + "properties": { + "python_add_row": { + "title": "Python add row", + "type": "string", + "minLength": 1 + }, + "python_add_col": { + "title": "Python add col", + "type": "string", + "minLength": 1 + }, + "typescript_add_col": { + "title": "Typescript add col", + "type": "string", + "minLength": 1 + }, + "typescript_add_row": { + "title": "Typescript add row", + "type": "string", + "minLength": 1 + }, + "curl_add_col": { + "title": "Curl add col", + "type": "string", + "minLength": 1 + }, + "curl_add_row": { + "title": "Curl add row", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetSdkRowsResult": { + "required": [ + "api_keys", + "dataset", + "code" + ], + "type": "object", + "properties": { + "api_keys": { + "title": "Api keys", + "type": "object", + "additionalProperties": true + }, + "dataset": { + "$ref": "#/components/schemas/Dataset" + }, + "code": { + "$ref": "#/components/schemas/DatasetSdkRowsCode" + } + } + }, + "DatasetSdkRowsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetSdkRowsResult" + } + } + }, + "PromptConfig": { + "type": "object", + "properties": { + "model": { + "title": "Model", + "type": "string", + "maxLength": 255 + }, + "run_prompt_config": { + "title": "Run prompt config", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "messages": { + "description": "List of messages with format [{'role': 'user/assistant', 'content': 'text'}]", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "temperature": { + "title": "Temperature", + "description": "Controls the randomness. Value between 0 and 2.", + "type": "number", + "maximum": 2, + "minimum": 0, + "nullable": true + }, + "frequency_penalty": { + "title": "Frequency penalty", + "description": "Penalty for word repetition. Value between -2 and 2.", + "type": "number", + "maximum": 2, + "minimum": -2, + "nullable": true + }, + "presence_penalty": { + "title": "Presence penalty", + "description": "Penalty for new word usage. Value between -2 and 2.", + "type": "number", + "maximum": 2, + "minimum": -2, + "nullable": true + }, + "max_tokens": { + "title": "Max tokens", + "description": "Maximum number of tokens to generate. Null = use provider default.", + "type": "integer", + "maximum": 65536, + "minimum": 1, + "nullable": true + }, + "top_p": { + "title": "Top p", + "description": "Controls diversity via nucleus sampling. Value between 0 and 1.", + "type": "number", + "maximum": 1, + "minimum": 0, + "nullable": true + }, + "response_format": { + "title": "Response format", + "description": "JSON schema for response format if required. Can be a JSON object or string. Defaults to None.", + "type": "object", + "additionalProperties": true + }, + "tool_choice": { + "title": "Tool choice", + "description": "Tool selection mode: 'auto' or 'required'.", + "type": "string", + "enum": [ + "auto", + "required", + null + ], + "nullable": true + }, + "tools": { + "description": "List of tools with tool properties if available.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "nullable": true + }, + "output_format": { + "title": "Output format", + "description": "Output format type.", + "type": "string", + "enum": [ + "array", + "string", + "number", + "object", + "audio", + "image" + ], + "nullable": true + }, + "concurrency": { + "title": "Concurrency", + "description": "Number of concurrent operations allowed. Maximum 10.", + "type": "integer", + "maximum": 10, + "minimum": 1, + "nullable": true + } + } + }, + "AddRunPrompt": { + "required": [ + "dataset_id", + "name" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "config": { + "$ref": "#/components/schemas/PromptConfig" + } + } + }, + "CloneDatasetRequest": { + "type": "object", + "properties": { + "new_dataset_name": { + "title": "New dataset name", + "type": "string" + } + } + }, + "HuggingFaceDatasetCreateRequest": { + "required": [ + "huggingface_dataset_name", + "huggingface_dataset_split" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "default": "" + }, + "model_type": { + "title": "Model type", + "type": "string", + "default": "" + }, + "num_rows": { + "title": "Num rows", + "type": "integer", + "minimum": 0 + }, + "huggingface_dataset_name": { + "title": "Huggingface dataset name", + "type": "string", + "minLength": 1 + }, + "huggingface_dataset_config": { + "title": "Huggingface dataset config", + "type": "string" + }, + "huggingface_dataset_split": { + "title": "Huggingface dataset split", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetCreateStartedResult": { + "required": [ + "message", + "dataset_id", + "dataset_name" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "dataset_model_type": { + "title": "Dataset model type", + "type": "string", + "nullable": true + } + } + }, + "DatasetCreateStartedResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetCreateStartedResult" + } + } + }, + "CreateDatasetFromLocalFileRequest": { + "type": "object", + "properties": { + "file": { + "title": "File", + "type": "string", + "readOnly": true, + "format": "uri" + }, + "new_dataset_name": { + "title": "New dataset name", + "type": "string" + }, + "model_type": { + "title": "Model type", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + } + } + }, + "LocalFileDatasetCreateStartedResult": { + "required": [ + "message", + "dataset_id", + "dataset_name", + "processing_status", + "estimated_rows", + "estimated_columns" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "dataset_model_type": { + "title": "Dataset model type", + "type": "string", + "nullable": true + }, + "processing_status": { + "title": "Processing status", + "type": "string", + "minLength": 1 + }, + "estimated_rows": { + "title": "Estimated rows", + "type": "integer" + }, + "estimated_columns": { + "title": "Estimated columns", + "type": "integer" + } + } + }, + "LocalFileDatasetCreateStartedResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/LocalFileDatasetCreateStartedResult" + } + } + }, + "ManualDatasetCreateRequest": { + "required": [ + "dataset_name" + ], + "type": "object", + "properties": { + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "number_of_rows": { + "title": "Number of rows", + "type": "integer", + "default": 1, + "minimum": 1 + }, + "number_of_columns": { + "title": "Number of columns", + "type": "integer", + "default": 1, + "minimum": 1 + } + } + }, + "ManualDatasetCreateResult": { + "required": [ + "message", + "dataset_id", + "rows_created", + "columns_created" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "rows_created": { + "title": "Rows created", + "type": "integer" + }, + "columns_created": { + "title": "Columns created", + "type": "integer" + } + } + }, + "ManualDatasetCreateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ManualDatasetCreateResult" + } + } + }, + "CreateEmptyDatasetRequest": { + "required": [ + "new_dataset_name" + ], + "type": "object", + "properties": { + "new_dataset_name": { + "title": "New dataset name", + "type": "string", + "minLength": 1 + }, + "model_type": { + "title": "Model type", + "type": "string" + }, + "is_sdk": { + "title": "Is sdk", + "type": "boolean", + "default": false + }, + "row": { + "title": "Row", + "type": "integer", + "minimum": 0 + } + } + }, + "SyntheticDatasetCreation": { + "required": [ + "num_rows", + "columns", + "dataset" + ], + "type": "object", + "properties": { + "num_rows": { + "title": "Num rows", + "type": "integer" + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "nullable": true + } + }, + "dataset": { + "title": "Dataset", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + } + } + }, + "SyntheticDatasetCreateStartedResult": { + "required": [ + "message", + "data" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "data": { + "$ref": "#/components/schemas/Dataset" + } + } + }, + "SyntheticDatasetCreateStartedResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SyntheticDatasetCreateStartedResult" + } + } + }, + "DatasetCreationProgressResult": { + "required": [ + "dataset_id", + "dataset_name", + "processing_status", + "is_processing", + "is_completed", + "is_failed" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "processing_status": { + "title": "Processing status", + "type": "string", + "minLength": 1 + }, + "is_processing": { + "title": "Is processing", + "type": "boolean" + }, + "is_completed": { + "title": "Is completed", + "type": "boolean" + }, + "is_failed": { + "title": "Is failed", + "type": "boolean" + }, + "original_filename": { + "title": "Original filename", + "type": "string", + "nullable": true + }, + "estimated_rows": { + "title": "Estimated rows", + "type": "integer", + "nullable": true + }, + "estimated_columns": { + "title": "Estimated columns", + "type": "integer", + "nullable": true + }, + "queued_at": { + "title": "Queued at", + "type": "string", + "nullable": true + }, + "started_at": { + "title": "Started at", + "type": "string", + "nullable": true + }, + "completed_at": { + "title": "Completed at", + "type": "string", + "nullable": true + }, + "failed_at": { + "title": "Failed at", + "type": "string", + "nullable": true + }, + "error_message": { + "title": "Error message", + "type": "string", + "nullable": true + } + } + }, + "DatasetCreationProgressResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetCreationProgressResult" + } + } + }, + "EditRunPromptColumn": { + "required": [ + "dataset_id", + "column_id" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1, + "nullable": true + }, + "config": { + "$ref": "#/components/schemas/PromptConfig" + } + } + }, + "DatasetCellDataRequest": { + "required": [ + "row_ids", + "column_ids" + ], + "type": "object", + "properties": { + "row_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "column_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "DatasetCellValue": { + "type": "object", + "properties": { + "cell_value": { + "title": "Cell value", + "type": "object", + "additionalProperties": true + }, + "status": { + "title": "Status", + "type": "string", + "nullable": true + }, + "value_infos": { + "title": "Value infos", + "type": "object", + "additionalProperties": true + }, + "feedback_info": { + "title": "Feedback info", + "type": "object", + "additionalProperties": true + } + } + }, + "DatasetCellDataResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DatasetCellValue" + } + } + } + } + }, + "DatasetNameItem": { + "required": [ + "dataset_id", + "name" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "model_type": { + "title": "Model type", + "type": "string" + } + } + }, + "DatasetNamesResult": { + "required": [ + "datasets" + ], + "type": "object", + "properties": { + "datasets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetNameItem" + } + } + } + }, + "DatasetNamesResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetNamesResult" + } + } + }, + "DatasetListItem": { + "required": [ + "id", + "name", + "number_of_datapoints", + "number_of_experiments", + "number_of_optimisations", + "derived_datasets", + "created_at", + "dataset_type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "number_of_datapoints": { + "title": "Number of datapoints", + "type": "integer" + }, + "number_of_experiments": { + "title": "Number of experiments", + "type": "integer" + }, + "number_of_optimisations": { + "title": "Number of optimisations", + "type": "integer" + }, + "derived_datasets": { + "title": "Derived datasets", + "type": "integer" + }, + "created_at": { + "title": "Created at", + "type": "string", + "minLength": 1 + }, + "dataset_type": { + "title": "Dataset type", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetListResult": { + "required": [ + "datasets", + "total_pages", + "total_count" + ], + "type": "object", + "properties": { + "datasets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetListItem" + } + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + }, + "total_count": { + "title": "Total count", + "type": "integer" + } + } + }, + "DatasetListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetListResult" + } + } + }, + "HuggingFaceDatasetConfigRequest": { + "required": [ + "dataset_path" + ], + "type": "object", + "properties": { + "dataset_path": { + "title": "Dataset path", + "type": "string", + "minLength": 1 + } + } + }, + "HuggingFaceDatasetConfigResult": { + "required": [ + "message", + "dataset_info" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "dataset_info": { + "title": "Dataset info", + "type": "object", + "additionalProperties": true + } + } + }, + "HuggingFaceDatasetConfigResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/HuggingFaceDatasetConfigResult" + } + } + }, + "DatasetRowDiffRequest": { + "required": [ + "experiment_id", + "column_ids", + "row_ids", + "compare_column_ids" + ], + "type": "object", + "properties": { + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "column_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "row_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "compare_column_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "ExperimentRowDiffCell": { + "type": "object", + "properties": { + "cell_value": { + "title": "Cell value", + "type": "object", + "additionalProperties": true + }, + "cell_diff_value": { + "title": "Cell diff value", + "type": "object", + "additionalProperties": true + }, + "status": { + "title": "Status", + "type": "string" + }, + "value_infos": { + "title": "Value infos", + "type": "object", + "additionalProperties": true + } + } + }, + "ExperimentRowDiffResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ExperimentRowDiffCell" + } + } + } + } + }, + "EvalFunctionListResult": { + "required": [ + "functions" + ], + "type": "object", + "properties": { + "functions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "EvalFunctionListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalFunctionListResult" + } + } + }, + "PreviewRunPrompt": { + "required": [ + "dataset_id", + "name" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "config": { + "$ref": "#/components/schemas/PromptConfig" + }, + "first_n_rows": { + "title": "First n rows", + "type": "integer", + "minimum": 1 + }, + "row_indices": { + "description": "List of row indices to preview. Must contain at least one integer.", + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "RunPromptColumnPreviewResult": { + "required": [ + "responses", + "token_usage", + "cost" + ], + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "description": "Response", + "additionalProperties": true + } + }, + "token_usage": { + "title": "Token usage", + "type": "object", + "additionalProperties": true + }, + "cost": { + "title": "Cost", + "type": "object", + "additionalProperties": true + } + } + }, + "RunPromptColumnPreviewResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/RunPromptColumnPreviewResult" + } + } + }, + "ProviderStatusItem": { + "required": [ + "provider", + "display_name", + "has_key", + "type" + ], + "type": "object", + "properties": { + "provider": { + "title": "Provider", + "type": "string", + "minLength": 1 + }, + "display_name": { + "title": "Display name", + "type": "string", + "minLength": 1 + }, + "has_key": { + "title": "Has key", + "type": "boolean" + }, + "masked_key": { + "title": "Masked key", + "type": "string", + "nullable": true + }, + "logo_url": { + "title": "Logo url", + "type": "string", + "nullable": true + }, + "type": { + "title": "Type", + "type": "string", + "minLength": 1 + }, + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "ProviderStatusResult": { + "required": [ + "providers" + ], + "type": "object", + "properties": { + "providers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderStatusItem" + } + } + } + }, + "ProviderStatusResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ProviderStatusResult" + } + } + }, + "RunPromptColumnConfigResult": { + "required": [ + "config" + ], + "type": "object", + "properties": { + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + } + } + }, + "RunPromptColumnConfigResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/RunPromptColumnConfigResult" + } + } + }, + "RunPromptToolOption": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "yaml_config": { + "title": "Yaml config", + "type": "string", + "nullable": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "config_type": { + "title": "Config type", + "type": "string", + "nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + } + } + }, + "RunPromptChoiceOption": { + "required": [ + "value", + "label" + ], + "type": "object", + "properties": { + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "label": { + "title": "Label", + "type": "string", + "minLength": 1 + } + } + }, + "RunPromptOptionsResult": { + "required": [ + "models", + "tool_config", + "available_tools", + "output_formats", + "tool_choices" + ], + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "tool_config": { + "title": "Tool config", + "type": "object", + "additionalProperties": true + }, + "available_tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunPromptToolOption" + } + }, + "output_formats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunPromptChoiceOption" + } + }, + "tool_choices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunPromptChoiceOption" + } + } + } + }, + "RunPromptOptionsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/RunPromptOptionsResult" + } + } + }, + "DatasetAddColumnsRequest": { + "required": [ + "new_columns_data" + ], + "type": "object", + "properties": { + "new_columns_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "Column": { + "required": [ + "name", + "data_type", + "source" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 2000, + "minLength": 1 + }, + "data_type": { + "title": "Data type", + "type": "string", + "enum": [ + "text", + "boolean", + "integer", + "float", + "json", + "array", + "image", + "images", + "datetime", + "audio", + "document", + "others", + "persona" + ] + }, + "dataset": { + "title": "Dataset", + "type": "string", + "format": "uuid", + "nullable": true + }, + "source": { + "title": "Source", + "type": "string", + "enum": [ + "evaluation", + "evaluation_tags", + "evaluation_reason", + "run_prompt", + "experiment", + "optimisation", + "experiment_evaluation", + "experiment_evaluation_tags", + "optimisation_evaluation", + "annotation_label", + "optimisation_evaluation_tags", + "extracted_json", + "classification", + "extracted_entities", + "api_call", + "python_code", + "vector_db", + "conditional", + "eval_playground", + "OTHERS" + ] + }, + "source_id": { + "title": "Source id", + "type": "string", + "maxLength": 2000, + "nullable": true + } + } + }, + "DatasetColumnsMutationResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Column" + } + } + } + }, + "DatasetColumnsMutationResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetColumnsMutationResult" + } + } + }, + "DatasetAddEmptyColumnsRequest": { + "type": "object", + "properties": { + "num_cols": { + "title": "Num cols", + "type": "integer", + "default": 0, + "minimum": 0 + } + } + }, + "DatasetAddEmptyRowsRequest": { + "type": "object", + "properties": { + "num_rows": { + "title": "Num rows", + "type": "integer", + "default": 1, + "minimum": 1 + } + } + }, + "DatasetMultipleStaticColumnsRequest": { + "required": [ + "columns" + ], + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "DatasetAddRowsRequest": { + "required": [ + "rows" + ], + "type": "object", + "properties": { + "rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "DatasetAddRowsFromExistingRequest": { + "required": [ + "source_dataset_id", + "column_mapping" + ], + "type": "object", + "properties": { + "source_dataset_id": { + "title": "Source dataset id", + "type": "string", + "format": "uuid" + }, + "column_mapping": { + "title": "Column mapping", + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uuid" + } + } + } + }, + "DatasetRowsImportedResult": { + "required": [ + "message", + "rows_added" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "rows_added": { + "title": "Rows added", + "type": "integer" + } + } + }, + "DatasetRowsImportedResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetRowsImportedResult" + } + } + }, + "HuggingFaceAddRowsRequest": { + "required": [ + "huggingface_dataset_name", + "huggingface_dataset_config", + "huggingface_dataset_split" + ], + "type": "object", + "properties": { + "num_rows": { + "title": "Num rows", + "type": "integer", + "minimum": 0 + }, + "huggingface_dataset_name": { + "title": "Huggingface dataset name", + "type": "string", + "minLength": 1 + }, + "huggingface_dataset_config": { + "title": "Huggingface dataset config", + "type": "string", + "minLength": 1 + }, + "huggingface_dataset_split": { + "title": "Huggingface dataset split", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetRowsImportMessageResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetRowsImportMessageResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetRowsImportMessageResult" + } + } + }, + "DatasetStaticColumnRequest": { + "required": [ + "new_column_name", + "column_type" + ], + "type": "object", + "properties": { + "new_column_name": { + "title": "New column name", + "type": "string", + "minLength": 1 + }, + "column_type": { + "title": "Column type", + "type": "string", + "minLength": 1 + }, + "source": { + "title": "Source", + "type": "string" + } + } + }, + "SyntheticData": { + "required": [ + "num_rows", + "columns", + "dataset" + ], + "type": "object", + "properties": { + "num_rows": { + "title": "Num rows", + "type": "integer" + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "nullable": true + } + }, + "dataset": { + "title": "Dataset", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + }, + "fill_existing_rows": { + "title": "Fill existing rows", + "type": "boolean", + "default": false + } + } + }, + "UserEvalMutationRequest": { + "required": [ + "name", + "template_id", + "config" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "template_id": { + "title": "Template id", + "type": "string", + "maxLength": 500, + "minLength": 1 + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "default": false + }, + "model": { + "title": "Model", + "type": "string", + "maxLength": 100 + }, + "eval_type": { + "title": "Eval type", + "type": "string" + }, + "run": { + "title": "Run", + "type": "boolean", + "default": false + }, + "save_as_template": { + "title": "Save as template", + "type": "boolean", + "default": false + }, + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "composite_weight_overrides": { + "title": "Composite weight overrides", + "type": "object", + "additionalProperties": true + } + } + }, + "UserEvalUpdateRequest": { + "required": [ + "config" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + }, + "template_id": { + "title": "Template id", + "type": "string", + "maxLength": 500 + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "default": false + }, + "model": { + "title": "Model", + "type": "string", + "maxLength": 100 + }, + "eval_type": { + "title": "Eval type", + "type": "string" + }, + "run": { + "title": "Run", + "type": "boolean", + "default": false + }, + "save_as_template": { + "title": "Save as template", + "type": "boolean", + "default": false + }, + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "composite_weight_overrides": { + "title": "Composite weight overrides", + "type": "object", + "additionalProperties": true + } + } + }, + "DatasetBehaviorRequest": { + "type": "object", + "properties": { + "dataset_name": { + "title": "Dataset name", + "type": "string" + }, + "column_order": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "column_config": { + "title": "Column config", + "type": "object", + "additionalProperties": true + }, + "dataset_config": { + "title": "Dataset config", + "type": "object", + "additionalProperties": true + } + } + }, + "ExtractJsonColumnRequest": { + "required": [ + "column_id", + "json_key" + ], + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "json_key": { + "title": "Json key", + "type": "string", + "minLength": 1 + }, + "new_column_name": { + "title": "New column name", + "type": "string" + }, + "concurrency": { + "title": "Concurrency", + "type": "integer", + "default": 5 + } + } + }, + "DatasetTableMetadata": { + "required": [ + "dataset_name" + ], + "type": "object", + "properties": { + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "total_rows": { + "title": "Total rows", + "type": "integer" + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + }, + "error_messages": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "status": { + "title": "Status", + "type": "string", + "nullable": true + } + } + }, + "DatasetTableResult": { + "required": [ + "column_config" + ], + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/DatasetTableMetadata" + }, + "column_config": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "table": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "dataset_config": { + "title": "Dataset config", + "type": "object", + "additionalProperties": true + }, + "synthetic_dataset": { + "title": "Synthetic dataset", + "type": "boolean" + }, + "synthetic_dataset_percentage": { + "title": "Synthetic dataset percentage", + "type": "number", + "nullable": true + }, + "synthetic_regenerate": { + "title": "Synthetic regenerate", + "type": "boolean" + }, + "is_processing_data": { + "title": "Is processing data", + "type": "boolean" + } + } + }, + "DatasetTableResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetTableResult" + } + } + }, + "DatasetRowDataRequest": { + "required": [ + "row_id" + ], + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string", + "description": "Column or attribute id to filter on." + }, + "display_name": { + "type": "string", + "description": "Optional UI label for chips and saved views." + }, + "source": { + "type": "string", + "description": "Optional source surface for mixed-source filters, for example traces, datasets, or simulation." + }, + "output_type": { + "type": "string", + "description": "Optional metric output type metadata used by eval and annotation filters." + }, + "filter_config": { + "type": "object", + "properties": { + "filter_type": { + "type": "string", + "description": "Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array." + }, + "filter_op": { + "type": "string", + "description": "Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null." + }, + "filter_value": { + "description": "Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type." + }, + "col_type": { + "type": "string", + "description": "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL." + } + }, + "required": [ + "filter_type", + "filter_op" + ], + "additionalProperties": false + } + }, + "required": [ + "column_id", + "filter_config" + ], + "additionalProperties": false + } + }, + "sort": { + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ascending", + "descending" + ] + } + }, + "required": [ + "column_id" + ], + "additionalProperties": false + } + }, + "row_id": { + "title": "Row id", + "type": "string", + "format": "uuid" + } + } + }, + "DatasetRowNavigation": { + "type": "object", + "properties": { + "row_id": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "DatasetRowDataResult": { + "required": [ + "next", + "current" + ], + "type": "object", + "properties": { + "next": { + "$ref": "#/components/schemas/DatasetRowNavigation" + }, + "current": { + "title": "Current", + "type": "object", + "additionalProperties": true + } + } + }, + "DatasetRowDataResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DatasetRowDataResult" + } + } + }, + "EvalStructure": { + "required": [ + "id", + "template_id", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "eval_tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "template_name": { + "title": "Template name", + "type": "string", + "minLength": 1 + }, + "required_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "optional_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "variable_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "run_prompt_column": { + "title": "Run prompt column", + "type": "boolean" + }, + "mapping": { + "title": "Mapping", + "type": "object", + "additionalProperties": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "params": { + "title": "Params", + "type": "object", + "additionalProperties": true + }, + "function_params_schema": { + "title": "Function params schema", + "type": "object", + "additionalProperties": true + }, + "eval_type_id": { + "title": "Eval type id", + "type": "string" + }, + "eval_type": { + "title": "Eval type", + "type": "string" + }, + "reason_column": { + "title": "Reason column", + "type": "boolean" + }, + "models": { + "title": "Models", + "type": "object", + "additionalProperties": true + }, + "selected_model": { + "title": "Selected model", + "type": "string" + }, + "output": { + "title": "Output", + "type": "object", + "additionalProperties": true + }, + "config_params_desc": { + "title": "Config params desc", + "type": "object", + "additionalProperties": true + }, + "config_params_option": { + "title": "Config params option", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean" + }, + "choices": { + "title": "Choices", + "type": "object", + "additionalProperties": true + }, + "api_key_available": { + "title": "Api key available", + "type": "boolean" + }, + "run_config": { + "title": "Run config", + "type": "object", + "additionalProperties": true + } + } + }, + "EvalStructureResult": { + "required": [ + "eval" + ], + "type": "object", + "properties": { + "eval": { + "$ref": "#/components/schemas/EvalStructure" + } + } + }, + "EvalStructureResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalStructureResult" + } + } + }, + "EvalListResult": { + "required": [ + "evals" + ], + "type": "object", + "properties": { + "evals": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "eval_recommendations": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "EvalListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalListResult" + } + } + }, + "PreviewRunEvalRequest": { + "required": [ + "config", + "template_id" + ], + "type": "object", + "properties": { + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "model": { + "title": "Model", + "type": "string" + }, + "sdk_uuid": { + "title": "Sdk uuid", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + }, + "protect_flash": { + "title": "Protect flash", + "type": "boolean", + "default": false + } + } + }, + "StartEvalsProcessRequest": { + "required": [ + "user_eval_ids" + ], + "type": "object", + "properties": { + "user_eval_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "failed_only": { + "title": "Failed only", + "type": "boolean", + "default": false + } + } + }, + "StopUserEvalRequest": { + "type": "object", + "properties": { + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + } + } + }, + "SyntheticDatasetConfigPayload": { + "type": "object", + "properties": { + "num_rows": { + "title": "Num rows", + "type": "integer" + }, + "columns": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "dataset": { + "title": "Dataset", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "SyntheticDatasetConfigResult": { + "required": [ + "message", + "data" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "data": { + "$ref": "#/components/schemas/SyntheticDatasetConfigPayload" + } + } + }, + "SyntheticDatasetConfigResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SyntheticDatasetConfigResult" + } + } + }, + "SyntheticDatasetConfig": { + "required": [ + "num_rows", + "columns", + "dataset" + ], + "type": "object", + "properties": { + "num_rows": { + "title": "Num rows", + "type": "integer" + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "nullable": true + } + }, + "dataset": { + "title": "Dataset", + "type": "object", + "additionalProperties": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "regenerate": { + "title": "Regenerate", + "type": "boolean", + "default": false + } + } + }, + "SyntheticDatasetUpdateData": { + "required": [ + "dataset_id", + "dataset_name" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "num_rows": { + "title": "Num rows", + "type": "integer" + }, + "num_columns": { + "title": "Num columns", + "type": "integer" + } + } + }, + "SyntheticDatasetUpdateResult": { + "required": [ + "message", + "data" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "data": { + "$ref": "#/components/schemas/SyntheticDatasetUpdateData" + } + } + }, + "SyntheticDatasetUpdateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SyntheticDatasetUpdateResult" + } + } + }, + "DatasetUpdateCellValueRequest": { + "required": [ + "row_id", + "column_id" + ], + "type": "object", + "properties": { + "row_id": { + "title": "Row id", + "type": "string", + "format": "uuid" + }, + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "new_value": { + "title": "New value", + "type": "string", + "description": "New cell value. Accepts JSON primitives or multipart file uploads.", + "nullable": true + } + } + }, + "DatasetUpdateColumnNameRequest": { + "required": [ + "new_column_name" + ], + "type": "object", + "properties": { + "new_column_name": { + "title": "New column name", + "type": "string", + "minLength": 1 + } + } + }, + "DatasetUpdateColumnTypeRequest": { + "required": [ + "new_column_type" + ], + "type": "object", + "properties": { + "new_column_type": { + "title": "New column type", + "type": "string", + "minLength": 1 + }, + "preview": { + "title": "Preview", + "type": "boolean", + "default": true + }, + "force_update": { + "title": "Force update", + "type": "boolean", + "default": false + } + } + }, + "ColumnTypeConversionResult": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "new_data_type": { + "title": "New data type", + "type": "string", + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "invalid_count": { + "title": "Invalid count", + "type": "integer" + }, + "invalid_values": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "valid_conversion_samples": { + "title": "Valid conversion samples", + "type": "object", + "additionalProperties": true + } + } + }, + "ColumnTypeConversionResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ColumnTypeConversionResult" + } + } + }, + "CreateDatasetFromExperimentRequest": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "model_type": { + "title": "Model type", + "type": "string" + } + } + }, + "EvalTemplateBulkDeleteRequest": { + "required": [ + "template_ids" + ], + "type": "object", + "properties": { + "template_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "EvalTemplateBulkDeleteResponseResult": { + "required": [ + "deleted_count" + ], + "type": "object", + "properties": { + "deleted_count": { + "title": "Deleted count", + "type": "integer" + } + } + }, + "EvalTemplateBulkDeleteResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateBulkDeleteResponseResult" + } + } + }, + "CompositeEvalAdhocExecuteRequest": { + "required": [ + "mapping", + "child_template_ids" + ], + "type": "object", + "properties": { + "mapping": { + "title": "Mapping", + "type": "object", + "additionalProperties": true + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "default": false + }, + "input_data_types": { + "title": "Input data types", + "type": "object", + "additionalProperties": true + }, + "span_context": { + "title": "Span context", + "type": "object", + "additionalProperties": true + }, + "trace_context": { + "title": "Trace context", + "type": "object", + "additionalProperties": true + }, + "session_context": { + "title": "Session context", + "type": "object", + "additionalProperties": true + }, + "call_context": { + "title": "Call context", + "type": "object", + "additionalProperties": true + }, + "row_context": { + "title": "Row context", + "type": "object", + "additionalProperties": true + }, + "child_template_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "aggregation_enabled": { + "title": "Aggregation enabled", + "type": "boolean", + "default": true + }, + "aggregation_function": { + "title": "Aggregation function", + "type": "string", + "enum": [ + "weighted_avg", + "avg", + "min", + "max", + "pass_rate" + ], + "default": "weighted_avg" + }, + "composite_child_axis": { + "title": "Composite child axis", + "type": "string", + "enum": [ + "", + "pass_fail", + "percentage", + "choices", + "code" + ], + "default": "" + }, + "child_weights": { + "title": "Child weights", + "type": "object", + "additionalProperties": true + }, + "pass_threshold": { + "title": "Pass threshold", + "type": "number", + "default": 0.5 + } + } + }, + "CompositeChildResult": { + "required": [ + "child_id", + "child_name", + "order", + "status" + ], + "type": "object", + "properties": { + "child_id": { + "title": "Child id", + "type": "string", + "format": "uuid" + }, + "child_name": { + "title": "Child name", + "type": "string", + "minLength": 1 + }, + "order": { + "title": "Order", + "type": "integer" + }, + "score": { + "title": "Score", + "type": "number", + "nullable": true + }, + "output": { + "title": "Output", + "type": "object", + "additionalProperties": true + }, + "reason": { + "title": "Reason", + "type": "string", + "nullable": true + }, + "output_type": { + "title": "Output type", + "type": "string", + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "log_id": { + "title": "Log id", + "type": "string", + "nullable": true + }, + "weight": { + "title": "Weight", + "type": "number" + }, + "error_localizer_result": { + "title": "Error localizer result", + "type": "object", + "additionalProperties": true + } + } + }, + "CompositeEvalExecuteResponseResult": { + "required": [ + "composite_name", + "aggregation_enabled", + "children", + "total_children", + "completed_children", + "failed_children" + ], + "type": "object", + "properties": { + "composite_id": { + "title": "Composite id", + "type": "string", + "nullable": true + }, + "composite_name": { + "title": "Composite name", + "type": "string", + "minLength": 1 + }, + "aggregation_enabled": { + "title": "Aggregation enabled", + "type": "boolean" + }, + "aggregation_function": { + "title": "Aggregation function", + "type": "string", + "nullable": true + }, + "aggregate_score": { + "title": "Aggregate score", + "type": "number", + "nullable": true + }, + "aggregate_pass": { + "title": "Aggregate pass", + "type": "boolean", + "nullable": true + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CompositeChildResult" + } + }, + "summary": { + "title": "Summary", + "type": "string", + "nullable": true + }, + "error_localizer_results": { + "title": "Error localizer results", + "type": "object", + "additionalProperties": true + }, + "total_children": { + "title": "Total children", + "type": "integer" + }, + "completed_children": { + "title": "Completed children", + "type": "integer" + }, + "failed_children": { + "title": "Failed children", + "type": "integer" + }, + "evaluation_id": { + "title": "Evaluation id", + "type": "string", + "nullable": true + } + } + }, + "CompositeEvalExecuteResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/CompositeEvalExecuteResponseResult" + } + } + }, + "CompositeEvalCreateRequest": { + "required": [ + "name", + "child_template_ids" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "child_template_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "aggregation_enabled": { + "title": "Aggregation enabled", + "type": "boolean", + "default": true + }, + "aggregation_function": { + "title": "Aggregation function", + "type": "string", + "enum": [ + "weighted_avg", + "avg", + "min", + "max", + "pass_rate" + ], + "default": "weighted_avg" + }, + "child_weights": { + "title": "Child weights", + "type": "object", + "additionalProperties": true + }, + "composite_child_axis": { + "title": "Composite child axis", + "type": "string", + "enum": [ + "", + "pass_fail", + "percentage", + "choices", + "code" + ], + "default": "" + } + } + }, + "CompositeChildItem": { + "required": [ + "child_id", + "child_name", + "order" + ], + "type": "object", + "properties": { + "child_id": { + "title": "Child id", + "type": "string", + "format": "uuid" + }, + "child_name": { + "title": "Child name", + "type": "string", + "minLength": 1 + }, + "order": { + "title": "Order", + "type": "integer" + }, + "eval_type": { + "title": "Eval type", + "type": "string", + "minLength": 1 + }, + "pinned_version_id": { + "title": "Pinned version id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "pinned_version_number": { + "title": "Pinned version number", + "type": "integer", + "nullable": true + }, + "weight": { + "title": "Weight", + "type": "number" + }, + "required_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "CompositeEvalCreateResponseResult": { + "required": [ + "id", + "name", + "aggregation_enabled", + "aggregation_function", + "children" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "template_type": { + "title": "Template type", + "type": "string", + "minLength": 1 + }, + "aggregation_enabled": { + "title": "Aggregation enabled", + "type": "boolean" + }, + "aggregation_function": { + "title": "Aggregation function", + "type": "string", + "minLength": 1 + }, + "composite_child_axis": { + "title": "Composite child axis", + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CompositeChildItem" + } + } + } + }, + "CompositeEvalCreateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/CompositeEvalCreateResponseResult" + } + } + }, + "EvalTemplateCreateV2Request": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255 + }, + "is_draft": { + "title": "Is draft", + "type": "boolean", + "default": false + }, + "eval_type": { + "title": "Eval type", + "type": "string", + "enum": [ + "llm", + "code", + "agent" + ], + "default": "llm" + }, + "instructions": { + "title": "Instructions", + "type": "string", + "maxLength": 100000 + }, + "model": { + "title": "Model", + "type": "string", + "default": "turing_large", + "minLength": 1 + }, + "output_type": { + "title": "Output type", + "type": "string", + "enum": [ + "pass_fail", + "percentage", + "deterministic" + ], + "default": "pass_fail" + }, + "pass_threshold": { + "title": "Pass threshold", + "type": "number", + "maximum": 1, + "minimum": 0 + }, + "choice_scores": { + "title": "Choice scores", + "type": "object", + "additionalProperties": true + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "check_internet": { + "title": "Check internet", + "type": "boolean", + "default": false + }, + "code": { + "title": "Code", + "type": "string", + "maxLength": 100000, + "nullable": true + }, + "code_language": { + "title": "Code language", + "type": "string", + "enum": [ + "python", + "javascript" + ], + "nullable": true + }, + "messages": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "nullable": true + }, + "few_shot_examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "nullable": true + }, + "mode": { + "title": "Mode", + "type": "string", + "enum": [ + "auto", + "agent", + "quick" + ], + "nullable": true + }, + "tools": { + "title": "Tools", + "type": "object", + "additionalProperties": true + }, + "knowledge_bases": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "data_injection": { + "title": "Data injection", + "type": "object", + "additionalProperties": true + }, + "summary": { + "title": "Summary", + "type": "object", + "additionalProperties": true + }, + "error_localizer_enabled": { + "title": "Error localizer enabled", + "type": "boolean", + "default": false + }, + "template_format": { + "title": "Template format", + "type": "string", + "enum": [ + "mustache", + "jinja" + ], + "default": "mustache" + } + } + }, + "EvalTemplateCreateResponseResult": { + "required": [ + "id", + "name", + "version" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "version": { + "title": "Version", + "type": "string", + "minLength": 1 + } + } + }, + "EvalTemplateCreateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateCreateResponseResult" + } + } + }, + "EvalTemplateListChartsRequest": { + "required": [ + "template_ids" + ], + "type": "object", + "properties": { + "template_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "EvalTemplateChartPoint": { + "required": [ + "timestamp", + "value" + ], + "type": "object", + "properties": { + "timestamp": { + "title": "Timestamp", + "type": "string", + "minLength": 1 + }, + "value": { + "title": "Value", + "type": "number" + } + } + }, + "EvalTemplateListChartsItem": { + "required": [ + "chart", + "error_rate", + "run_count" + ], + "type": "object", + "properties": { + "chart": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateChartPoint" + } + }, + "error_rate": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateChartPoint" + } + }, + "run_count": { + "title": "Run count", + "type": "integer" + } + } + }, + "EvalTemplateListChartsResponseResult": { + "required": [ + "charts" + ], + "type": "object", + "properties": { + "charts": { + "title": "Charts", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EvalTemplateListChartsItem" + } + } + } + }, + "EvalTemplateListChartsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateListChartsResponseResult" + } + } + }, + "EvalListFilters": { + "type": "object", + "properties": { + "eval_type": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "llm", + "code", + "agent" + ] + } + }, + "output_type": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "pass_fail", + "percentage", + "deterministic" + ] + } + }, + "template_type": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "single", + "composite" + ] + } + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "created_by": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "names": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "EvalListRequest": { + "type": "object", + "properties": { + "page": { + "title": "Page", + "type": "integer", + "default": 0, + "minimum": 0 + }, + "page_size": { + "title": "Page size", + "type": "integer", + "default": 25, + "maximum": 100, + "minimum": 1 + }, + "search": { + "title": "Search", + "type": "string", + "nullable": true + }, + "owner_filter": { + "title": "Owner filter", + "type": "string", + "enum": [ + "all", + "user", + "system" + ], + "default": "all" + }, + "filters": { + "$ref": "#/components/schemas/EvalListFilters" + }, + "sort_by": { + "title": "Sort by", + "type": "string", + "enum": [ + "name", + "updated_at", + "created_at" + ], + "default": "updated_at" + }, + "sort_order": { + "title": "Sort order", + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + } + }, + "EvalTemplateListItem": { + "required": [ + "id", + "name", + "template_type", + "eval_type", + "output_type", + "owner", + "created_by_name", + "version_count", + "current_version", + "last_updated", + "thirty_day_chart", + "thirty_day_error_rate", + "thirty_day_run_count", + "tags" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "template_type": { + "title": "Template type", + "type": "string", + "minLength": 1 + }, + "eval_type": { + "title": "Eval type", + "type": "string", + "minLength": 1 + }, + "output_type": { + "title": "Output type", + "type": "string", + "minLength": 1 + }, + "owner": { + "title": "Owner", + "type": "string", + "minLength": 1 + }, + "created_by_name": { + "title": "Created by name", + "type": "string", + "minLength": 1 + }, + "version_count": { + "title": "Version count", + "type": "integer" + }, + "current_version": { + "title": "Current version", + "type": "string", + "minLength": 1 + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "minLength": 1 + }, + "thirty_day_chart": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateChartPoint" + } + }, + "thirty_day_error_rate": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateChartPoint" + } + }, + "thirty_day_run_count": { + "title": "Thirty day run count", + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "EvalTemplateListResponseResult": { + "required": [ + "items", + "total", + "page", + "page_size" + ], + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateListItem" + } + }, + "total": { + "title": "Total", + "type": "integer" + }, + "page": { + "title": "Page", + "type": "integer" + }, + "page_size": { + "title": "Page size", + "type": "integer" + } + } + }, + "EvalTemplateListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateListResponseResult" + } + } + }, + "CompositeEvalDetailResponseResult": { + "required": [ + "id", + "name", + "aggregation_enabled", + "aggregation_function", + "children" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "template_type": { + "title": "Template type", + "type": "string", + "minLength": 1 + }, + "aggregation_enabled": { + "title": "Aggregation enabled", + "type": "boolean" + }, + "aggregation_function": { + "title": "Aggregation function", + "type": "string", + "minLength": 1 + }, + "composite_child_axis": { + "title": "Composite child axis", + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CompositeChildItem" + } + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "created_at": { + "title": "Created at", + "type": "string" + }, + "updated_at": { + "title": "Updated at", + "type": "string" + }, + "version_number": { + "title": "Version number", + "type": "integer", + "nullable": true + } + } + }, + "CompositeEvalDetailResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/CompositeEvalDetailResponseResult" + } + } + }, + "CompositeEvalUpdateRequest": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1, + "nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "aggregation_enabled": { + "title": "Aggregation enabled", + "type": "boolean", + "nullable": true + }, + "aggregation_function": { + "title": "Aggregation function", + "type": "string", + "enum": [ + "weighted_avg", + "avg", + "min", + "max", + "pass_rate" + ], + "nullable": true + }, + "child_template_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "nullable": true + }, + "child_weights": { + "title": "Child weights", + "type": "object", + "additionalProperties": true + }, + "composite_child_axis": { + "title": "Composite child axis", + "type": "string", + "enum": [ + "", + "pass_fail", + "percentage", + "choices", + "code" + ], + "nullable": true + } + } + }, + "CompositeEvalExecuteRequest": { + "required": [ + "mapping" + ], + "type": "object", + "properties": { + "mapping": { + "title": "Mapping", + "type": "object", + "additionalProperties": true + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "default": false + }, + "input_data_types": { + "title": "Input data types", + "type": "object", + "additionalProperties": true + }, + "span_context": { + "title": "Span context", + "type": "object", + "additionalProperties": true + }, + "trace_context": { + "title": "Trace context", + "type": "object", + "additionalProperties": true + }, + "session_context": { + "title": "Session context", + "type": "object", + "additionalProperties": true + }, + "call_context": { + "title": "Call context", + "type": "object", + "additionalProperties": true + }, + "row_context": { + "title": "Row context", + "type": "object", + "additionalProperties": true + } + } + }, + "EvalTemplateDetailResponseResult": { + "required": [ + "id", + "name", + "template_type", + "eval_type", + "output_type", + "pass_threshold", + "multi_choice", + "required_keys", + "owner", + "created_by_name", + "version_count", + "current_version", + "tags", + "check_internet", + "error_localizer_enabled", + "template_format", + "aggregation_enabled", + "aggregation_function", + "created_at", + "updated_at" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "template_type": { + "title": "Template type", + "type": "string", + "minLength": 1 + }, + "eval_type": { + "title": "Eval type", + "type": "string", + "minLength": 1 + }, + "instructions": { + "title": "Instructions", + "type": "string", + "nullable": true + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "output_type": { + "title": "Output type", + "type": "string", + "minLength": 1 + }, + "pass_threshold": { + "title": "Pass threshold", + "type": "number" + }, + "choice_scores": { + "title": "Choice scores", + "type": "object", + "additionalProperties": true + }, + "choices": { + "title": "Choices", + "type": "object", + "additionalProperties": true + }, + "multi_choice": { + "title": "Multi choice", + "type": "boolean" + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "code_language": { + "title": "Code language", + "type": "string", + "nullable": true + }, + "required_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "owner": { + "title": "Owner", + "type": "string", + "minLength": 1 + }, + "created_by_name": { + "title": "Created by name", + "type": "string", + "minLength": 1 + }, + "version_count": { + "title": "Version count", + "type": "integer" + }, + "current_version": { + "title": "Current version", + "type": "string", + "minLength": 1 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "check_internet": { + "title": "Check internet", + "type": "boolean" + }, + "error_localizer_enabled": { + "title": "Error localizer enabled", + "type": "boolean" + }, + "template_format": { + "title": "Template format", + "type": "string", + "minLength": 1 + }, + "aggregation_enabled": { + "title": "Aggregation enabled", + "type": "boolean" + }, + "aggregation_function": { + "title": "Aggregation function", + "type": "string", + "minLength": 1 + }, + "composite_child_axis": { + "title": "Composite child axis", + "type": "string" + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "minLength": 1 + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "minLength": 1 + } + } + }, + "EvalTemplateDetailResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateDetailResponseResult" + } + } + }, + "EvalFeedbackListItem": { + "required": [ + "id", + "value", + "explanation", + "source", + "source_id", + "action_type", + "user_name", + "created_at" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "string" + }, + "explanation": { + "title": "Explanation", + "type": "string" + }, + "source": { + "title": "Source", + "type": "string" + }, + "source_id": { + "title": "Source id", + "type": "string" + }, + "action_type": { + "title": "Action type", + "type": "string" + }, + "user_name": { + "title": "User name", + "type": "string" + }, + "created_at": { + "title": "Created at", + "type": "string", + "minLength": 1 + } + } + }, + "EvalFeedbackListResponseResult": { + "required": [ + "template_id", + "items", + "total", + "page", + "page_size" + ], + "type": "object", + "properties": { + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalFeedbackListItem" + } + }, + "total": { + "title": "Total", + "type": "integer" + }, + "page": { + "title": "Page", + "type": "integer" + }, + "page_size": { + "title": "Page size", + "type": "integer" + } + } + }, + "EvalFeedbackListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalFeedbackListResponseResult" + } + } + }, + "GroundTruthConfig": { + "type": "object", + "properties": { + "enabled": { + "title": "Enabled", + "type": "boolean" + }, + "ground_truth_id": { + "title": "Ground truth id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "mode": { + "title": "Mode", + "type": "string", + "minLength": 1 + }, + "max_examples": { + "title": "Max examples", + "type": "integer" + }, + "similarity_threshold": { + "title": "Similarity threshold", + "type": "number" + }, + "injection_format": { + "title": "Injection format", + "type": "string", + "minLength": 1 + } + } + }, + "GroundTruthConfigResponseResult": { + "required": [ + "ground_truth" + ], + "type": "object", + "properties": { + "ground_truth": { + "$ref": "#/components/schemas/GroundTruthConfig" + } + } + }, + "GroundTruthConfigResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/GroundTruthConfigResponseResult" + } + } + }, + "GroundTruthConfigRequest": { + "type": "object", + "properties": { + "enabled": { + "title": "Enabled", + "type": "boolean", + "default": true + }, + "ground_truth_id": { + "title": "Ground truth id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "mode": { + "title": "Mode", + "type": "string", + "enum": [ + "auto", + "manual", + "disabled" + ], + "default": "auto" + }, + "max_examples": { + "title": "Max examples", + "type": "integer", + "maximum": 10, + "minimum": 1 + }, + "similarity_threshold": { + "title": "Similarity threshold", + "type": "number", + "maximum": 1, + "minimum": 0 + }, + "injection_format": { + "title": "Injection format", + "type": "string", + "enum": [ + "structured", + "conversational", + "xml" + ], + "default": "structured" + } + } + }, + "GroundTruthItem": { + "required": [ + "id", + "name", + "columns", + "row_count" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "file_name": { + "title": "File name", + "type": "string" + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "row_count": { + "title": "Row count", + "type": "integer" + }, + "variable_mapping": { + "title": "Variable mapping", + "type": "object", + "additionalProperties": true + }, + "role_mapping": { + "title": "Role mapping", + "type": "object", + "additionalProperties": true + }, + "embedding_status": { + "title": "Embedding status", + "type": "string", + "minLength": 1 + }, + "embedded_row_count": { + "title": "Embedded row count", + "type": "integer" + }, + "storage_type": { + "title": "Storage type", + "type": "string", + "minLength": 1 + }, + "created_at": { + "title": "Created at", + "type": "string" + } + } + }, + "GroundTruthListResponseResult": { + "required": [ + "template_id", + "items", + "total" + ], + "type": "object", + "properties": { + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroundTruthItem" + } + }, + "total": { + "title": "Total", + "type": "integer" + } + } + }, + "GroundTruthListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/GroundTruthListResponseResult" + } + } + }, + "GroundTruthUploadRequest": { + "type": "object", + "properties": { + "file": { + "title": "File", + "type": "string", + "readOnly": true, + "format": "uri" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255 + }, + "description": { + "title": "Description", + "type": "string", + "default": "" + }, + "file_name": { + "title": "File name", + "type": "string", + "default": "" + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "variable_mapping": { + "title": "Variable mapping", + "type": "object", + "additionalProperties": true + }, + "role_mapping": { + "title": "Role mapping", + "type": "object", + "additionalProperties": true + } + } + }, + "GroundTruthUploadResponseResult": { + "required": [ + "id", + "name", + "row_count", + "columns", + "embedding_status" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "row_count": { + "title": "Row count", + "type": "integer" + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "embedding_status": { + "title": "Embedding status", + "type": "string", + "minLength": 1 + } + } + }, + "GroundTruthUploadResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/GroundTruthUploadResponseResult" + } + } + }, + "EvalTemplateUpdateV2Request": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1, + "nullable": true + }, + "eval_type": { + "title": "Eval type", + "type": "string", + "enum": [ + "llm", + "code", + "agent" + ], + "nullable": true + }, + "instructions": { + "title": "Instructions", + "type": "string", + "minLength": 1, + "nullable": true + }, + "model": { + "title": "Model", + "type": "string", + "minLength": 1, + "nullable": true + }, + "output_type": { + "title": "Output type", + "type": "string", + "enum": [ + "pass_fail", + "percentage", + "deterministic" + ], + "nullable": true + }, + "pass_threshold": { + "title": "Pass threshold", + "type": "number", + "maximum": 1, + "minimum": 0, + "nullable": true + }, + "choice_scores": { + "title": "Choice scores", + "type": "object", + "additionalProperties": true + }, + "multi_choice": { + "title": "Multi choice", + "type": "boolean", + "nullable": true + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "check_internet": { + "title": "Check internet", + "type": "boolean", + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "code_language": { + "title": "Code language", + "type": "string", + "enum": [ + "python", + "javascript" + ], + "nullable": true + }, + "messages": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "nullable": true + }, + "few_shot_examples": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "nullable": true + }, + "mode": { + "title": "Mode", + "type": "string", + "enum": [ + "auto", + "agent", + "quick" + ], + "nullable": true + }, + "tools": { + "title": "Tools", + "type": "object", + "additionalProperties": true + }, + "knowledge_bases": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "data_injection": { + "title": "Data injection", + "type": "object", + "additionalProperties": true + }, + "summary": { + "title": "Summary", + "type": "object", + "additionalProperties": true + }, + "error_localizer_enabled": { + "title": "Error localizer enabled", + "type": "boolean", + "nullable": true + }, + "publish": { + "title": "Publish", + "type": "boolean", + "nullable": true + }, + "template_format": { + "title": "Template format", + "type": "string", + "enum": [ + "mustache", + "jinja" + ], + "nullable": true + } + } + }, + "EvalTemplateUpdateResponseResult": { + "required": [ + "id", + "name", + "updated" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "updated": { + "title": "Updated", + "type": "boolean" + } + } + }, + "EvalTemplateUpdateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateUpdateResponseResult" + } + } + }, + "EvalUsageStats": { + "required": [ + "total_runs", + "runs_period", + "success_count", + "error_count", + "pass_rate" + ], + "type": "object", + "properties": { + "total_runs": { + "title": "Total runs", + "type": "integer" + }, + "runs_period": { + "title": "Runs period", + "type": "integer" + }, + "success_count": { + "title": "Success count", + "type": "integer" + }, + "error_count": { + "title": "Error count", + "type": "integer" + }, + "pass_rate": { + "title": "Pass rate", + "type": "number" + } + } + }, + "EvalUsageChartPoint": { + "required": [ + "timestamp" + ], + "type": "object", + "properties": { + "timestamp": { + "title": "Timestamp", + "type": "string", + "minLength": 1 + }, + "calls": { + "title": "Calls", + "type": "integer" + }, + "avg_latency_ms": { + "title": "Avg latency ms", + "type": "integer" + }, + "avg_score": { + "title": "Avg score", + "type": "number", + "nullable": true + }, + "pass_count": { + "title": "Pass count", + "type": "integer" + }, + "fail_count": { + "title": "Fail count", + "type": "integer" + } + } + }, + "EvalUsageFeedback": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "explanation": { + "title": "Explanation", + "type": "string" + }, + "action_type": { + "title": "Action type", + "type": "string" + }, + "created_at": { + "title": "Created at", + "type": "string" + }, + "user": { + "title": "User", + "type": "string" + } + } + }, + "EvalUsageLogItem": { + "required": [ + "id", + "input", + "status", + "created_at", + "detail" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "input": { + "title": "Input", + "type": "string" + }, + "result": { + "title": "Result", + "type": "string" + }, + "score": { + "title": "Score", + "type": "number", + "nullable": true + }, + "reason": { + "title": "Reason", + "type": "string" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "source": { + "title": "Source", + "type": "string" + }, + "created_at": { + "title": "Created at", + "type": "string", + "minLength": 1 + }, + "detail": { + "title": "Detail", + "type": "object", + "additionalProperties": true + }, + "feedback": { + "$ref": "#/components/schemas/EvalUsageFeedback" + }, + "composite": { + "title": "Composite", + "type": "boolean" + }, + "aggregate_pass": { + "title": "Aggregate pass", + "type": "boolean", + "nullable": true + } + } + }, + "EvalUsageLogs": { + "required": [ + "items", + "total", + "page", + "page_size" + ], + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalUsageLogItem" + } + }, + "total": { + "title": "Total", + "type": "integer" + }, + "page": { + "title": "Page", + "type": "integer" + }, + "page_size": { + "title": "Page size", + "type": "integer" + } + } + }, + "EvalUsageStatsResponseResult": { + "required": [ + "template_id", + "is_composite", + "stats", + "chart", + "logs" + ], + "type": "object", + "properties": { + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "is_composite": { + "title": "Is composite", + "type": "boolean" + }, + "stats": { + "$ref": "#/components/schemas/EvalUsageStats" + }, + "chart": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalUsageChartPoint" + } + }, + "logs": { + "$ref": "#/components/schemas/EvalUsageLogs" + } + } + }, + "EvalUsageStatsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalUsageStatsResponseResult" + } + } + }, + "EvalTemplateVersionItem": { + "required": [ + "id", + "version_number", + "is_default" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "version_number": { + "title": "Version number", + "type": "integer" + }, + "is_default": { + "title": "Is default", + "type": "boolean" + }, + "criteria": { + "title": "Criteria", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "config_snapshot": { + "title": "Config snapshot", + "type": "object", + "additionalProperties": true + }, + "created_by_name": { + "title": "Created by name", + "type": "string" + }, + "created_at": { + "title": "Created at", + "type": "string" + } + } + }, + "EvalTemplateVersionListResponseResult": { + "required": [ + "template_id", + "versions", + "total" + ], + "type": "object", + "properties": { + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateVersionItem" + } + }, + "total": { + "title": "Total", + "type": "integer" + } + } + }, + "EvalTemplateVersionListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateVersionListResponseResult" + } + } + }, + "EvalTemplateVersionCreateRequest": { + "type": "object", + "properties": { + "criteria": { + "title": "Criteria", + "type": "string", + "nullable": true + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "config_snapshot": { + "title": "Config snapshot", + "type": "object", + "additionalProperties": true + } + } + }, + "EvalTemplateVersionResponseResult": { + "required": [ + "id", + "version_number", + "is_default" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "version_number": { + "title": "Version number", + "type": "integer" + }, + "is_default": { + "title": "Is default", + "type": "boolean" + } + } + }, + "EvalTemplateVersionResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateVersionResponseResult" + } + } + }, + "EvalTemplateVersionRestoreResponseResult": { + "required": [ + "id", + "version_number", + "is_default", + "restored_from" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "version_number": { + "title": "Version number", + "type": "integer" + }, + "is_default": { + "title": "Is default", + "type": "boolean" + }, + "restored_from": { + "title": "Restored from", + "type": "integer" + } + } + }, + "EvalTemplateVersionRestoreResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/EvalTemplateVersionRestoreResponseResult" + } + } + }, + "ExperimentStringResultResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1 + } + } + }, + "ExperimentRerunRequest": { + "required": [ + "experiment_ids" + ], + "type": "object", + "properties": { + "experiment_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "use_temporal": { + "title": "Use temporal", + "type": "boolean", + "default": true + }, + "max_concurrent_rows": { + "title": "Max concurrent rows", + "type": "integer", + "minimum": 1 + } + } + }, + "PromptConfigEntry": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "title": "Name", + "type": "string" + }, + "prompt_id": { + "title": "Prompt id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "prompt_version": { + "title": "Prompt version", + "type": "string", + "format": "uuid", + "nullable": true + }, + "agent_id": { + "title": "Agent id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "agent_version": { + "title": "Agent version", + "type": "string", + "format": "uuid", + "nullable": true + }, + "model": { + "title": "Model", + "type": "object", + "additionalProperties": true + }, + "model_params": { + "title": "Model params", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "configuration": { + "title": "Configuration", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "output_format": { + "title": "Output format", + "type": "string", + "default": "string", + "minLength": 1 + }, + "messages": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "voice_input_column_id": { + "title": "Voice input column id", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "EvalMetricEntry": { + "required": [ + "template_id", + "name", + "config" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 2000, + "minLength": 1 + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "model": { + "title": "Model", + "type": "string", + "default": "", + "maxLength": 255 + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "default": false + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "composite_weight_overrides": { + "title": "Composite weight overrides", + "type": "object", + "additionalProperties": true + } + } + }, + "ExperimentCreateV2": { + "required": [ + "name", + "dataset_id", + "prompt_config", + "user_eval_metrics" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "experiment_type": { + "title": "Experiment type", + "type": "string", + "enum": [ + "llm", + "tts", + "stt", + "image" + ], + "default": "llm" + }, + "prompt_config": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptConfigEntry" + } + }, + "user_eval_metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalMetricEntry" + } + } + } + }, + "ExperimentListV2": { + "required": [ + "name", + "dataset" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "NotStarted", + "Queued", + "Running", + "Completed", + "Editing", + "Inactive", + "Failed", + "PartialRun", + "ExperimentEvaluation", + "Uploading", + "PartialExtracted", + "Processing", + "Deleting", + "PartialCompleted", + "OptimizationEvaluation", + "Error", + "Cancelled" + ] + }, + "experiment_type": { + "title": "Experiment type", + "description": "Determines how the experiment executes: llm, tts, stt, or image.", + "type": "string", + "enum": [ + "llm", + "tts", + "stt", + "image" + ] + }, + "eval_templates_count": { + "title": "Eval templates count", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "models_count": { + "title": "Models count", + "type": "string", + "readOnly": true + }, + "agents_count": { + "title": "Agents count", + "type": "string", + "readOnly": true + }, + "dataset": { + "title": "Dataset", + "type": "string", + "format": "uuid" + } + } + }, + "ExperimentNameSuggestionResult": { + "required": [ + "suggested_name" + ], + "type": "object", + "properties": { + "suggested_name": { + "title": "Suggested name", + "type": "string", + "minLength": 1 + } + } + }, + "ExperimentNameSuggestionResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentNameSuggestionResult" + } + } + }, + "ExperimentNameValidationResult": { + "required": [ + "is_valid" + ], + "type": "object", + "properties": { + "is_valid": { + "title": "Is valid", + "type": "boolean" + }, + "message": { + "title": "Message", + "type": "string" + } + } + }, + "ExperimentNameValidationResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentNameValidationResult" + } + } + }, + "ExperimentDetailV2": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "experiment_type": { + "title": "Experiment type", + "description": "Determines how the experiment executes: llm, tts, stt, or image.", + "type": "string", + "enum": [ + "llm", + "tts", + "stt", + "image" + ] + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "NotStarted", + "Queued", + "Running", + "Completed", + "Editing", + "Inactive", + "Failed", + "PartialRun", + "ExperimentEvaluation", + "Uploading", + "PartialExtracted", + "Processing", + "Deleting", + "PartialCompleted", + "OptimizationEvaluation", + "Error", + "Cancelled" + ] + }, + "snapshot_dataset_id": { + "title": "Snapshot dataset id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "prompt_configs": { + "title": "Prompt configs", + "type": "string", + "readOnly": true + }, + "agent_configs": { + "title": "Agent configs", + "type": "string", + "readOnly": true + }, + "user_eval_metrics": { + "title": "User eval metrics", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "ExperimentV2DetailResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentDetailV2" + } + } + }, + "ExperimentUpdateV2": { + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "prompt_config": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptConfigEntry" + } + }, + "user_eval_metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalMetricEntry" + } + } + } + }, + "ExperimentComparisonWeightsRequest": { + "type": "object", + "properties": { + "eval_template_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "weights": { + "title": "Weights", + "type": "object", + "additionalProperties": true + } + } + }, + "ExperimentComparisonColumnMetric": { + "required": [ + "column_id", + "column_name", + "avg_completion_tokens", + "avg_total_tokens", + "avg_response_time" + ], + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "column_name": { + "title": "Column name", + "type": "string", + "minLength": 1 + }, + "avg_completion_tokens": { + "title": "Avg completion tokens", + "type": "number" + }, + "avg_total_tokens": { + "title": "Avg total tokens", + "type": "number" + }, + "avg_response_time": { + "title": "Avg response time", + "type": "number" + }, + "avg_score": { + "title": "Avg score", + "type": "object", + "additionalProperties": true + } + } + }, + "ExperimentComparisonDatasetMetric": { + "required": [ + "dataset_id" + ], + "type": "object", + "properties": { + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "avg_completion_tokens": { + "title": "Avg completion tokens", + "type": "number", + "nullable": true + }, + "avg_total_tokens": { + "title": "Avg total tokens", + "type": "number", + "nullable": true + }, + "avg_response_time": { + "title": "Avg response time", + "type": "number", + "nullable": true + }, + "avg_score": { + "title": "Avg score", + "type": "number", + "nullable": true + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentComparisonColumnMetric" + } + }, + "normalized_scores": { + "title": "Normalized scores", + "type": "object", + "additionalProperties": true + }, + "overall_rating": { + "title": "Overall rating", + "type": "number", + "nullable": true + }, + "rank": { + "title": "Rank", + "type": "integer", + "nullable": true + }, + "rank_suffix": { + "title": "Rank suffix", + "type": "string" + }, + "total_datasets": { + "title": "Total datasets", + "type": "integer" + } + } + }, + "ExperimentDatasetComparisonResult": { + "required": [ + "experiment_id", + "experiment_name", + "total_datasets", + "dataset_comparisons" + ], + "type": "object", + "properties": { + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "experiment_name": { + "title": "Experiment name", + "type": "string", + "minLength": 1 + }, + "total_datasets": { + "title": "Total datasets", + "type": "integer" + }, + "weights_applied": { + "title": "Weights applied", + "type": "object", + "additionalProperties": true + }, + "dataset_comparisons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentComparisonDatasetMetric" + } + } + } + }, + "ExperimentDatasetComparisonResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentDatasetComparisonResult" + } + } + }, + "ExperimentComparisonRawMetrics": { + "type": "object", + "properties": { + "avg_completion_tokens": { + "title": "Avg completion tokens", + "type": "number", + "nullable": true + }, + "avg_total_tokens": { + "title": "Avg total tokens", + "type": "number", + "nullable": true + }, + "avg_response_time": { + "title": "Avg response time", + "type": "number", + "nullable": true + }, + "avg_score": { + "title": "Avg score", + "type": "number", + "nullable": true + } + } + }, + "ExperimentComparisonNormalizedMetrics": { + "type": "object", + "properties": { + "completion_tokens": { + "title": "Completion tokens", + "type": "number", + "nullable": true + }, + "total_tokens": { + "title": "Total tokens", + "type": "number", + "nullable": true + }, + "response_time": { + "title": "Response time", + "type": "number", + "nullable": true + }, + "score": { + "title": "Score", + "type": "number", + "nullable": true + } + } + }, + "ExperimentComparisonMetrics": { + "required": [ + "raw", + "normalized" + ], + "type": "object", + "properties": { + "raw": { + "$ref": "#/components/schemas/ExperimentComparisonRawMetrics" + }, + "normalized": { + "$ref": "#/components/schemas/ExperimentComparisonNormalizedMetrics" + } + } + }, + "ExperimentComparisonWeights": { + "type": "object", + "properties": { + "response_time": { + "title": "Response time", + "type": "number", + "nullable": true + }, + "scores": { + "title": "Scores", + "type": "object", + "additionalProperties": true + }, + "total_tokens": { + "title": "Total tokens", + "type": "number", + "nullable": true + }, + "completion_tokens": { + "title": "Completion tokens", + "type": "number", + "nullable": true + } + } + }, + "ExperimentComparisonDetail": { + "required": [ + "metrics", + "weights" + ], + "type": "object", + "properties": { + "scores_weight": { + "title": "Scores weight", + "type": "object", + "additionalProperties": true + }, + "experiment_dataset_id": { + "title": "Experiment dataset id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "rank": { + "title": "Rank", + "type": "integer", + "nullable": true + }, + "rank_suffix": { + "title": "Rank suffix", + "type": "string" + }, + "metrics": { + "$ref": "#/components/schemas/ExperimentComparisonMetrics" + }, + "weights": { + "$ref": "#/components/schemas/ExperimentComparisonWeights" + }, + "overall_rating": { + "title": "Overall rating", + "type": "number", + "nullable": true + } + } + }, + "ExperimentComparisonDetailsResult": { + "required": [ + "experiment_id", + "total_comparisons", + "comparisons" + ], + "type": "object", + "properties": { + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "total_comparisons": { + "title": "Total comparisons", + "type": "integer" + }, + "comparisons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentComparisonDetail" + } + } + } + }, + "ExperimentComparisonDetailsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentComparisonDetailsResult" + } + } + }, + "ExperimentDerivedVariablesResult": { + "type": "object", + "properties": { + "version": { + "title": "Version", + "type": "string" + }, + "derived_variables": { + "title": "Derived variables", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "ExperimentDerivedVariablesResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentDerivedVariablesResult" + } + } + }, + "ExperimentEvaluationTokenUsage": { + "required": [ + "avg_completion_tokens", + "avg_prompt_tokens", + "avg_total_tokens", + "total_tokens" + ], + "type": "object", + "properties": { + "avg_completion_tokens": { + "title": "Avg completion tokens", + "type": "number" + }, + "avg_prompt_tokens": { + "title": "Avg prompt tokens", + "type": "number" + }, + "avg_total_tokens": { + "title": "Avg total tokens", + "type": "number" + }, + "total_tokens": { + "title": "Total tokens", + "type": "integer" + } + } + }, + "ExperimentEvaluationColumnStats": { + "required": [ + "column_name", + "column_id", + "total_rows", + "success_rate", + "avg_response_time", + "token_usage" + ], + "type": "object", + "properties": { + "column_name": { + "title": "Column name", + "type": "string", + "minLength": 1 + }, + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "total_rows": { + "title": "Total rows", + "type": "integer" + }, + "success_rate": { + "title": "Success rate", + "type": "number" + }, + "avg_response_time": { + "title": "Avg response time", + "type": "number" + }, + "token_usage": { + "$ref": "#/components/schemas/ExperimentEvaluationTokenUsage" + }, + "avg_score": { + "title": "Avg score", + "type": "object", + "additionalProperties": true + } + } + }, + "ExperimentEvaluationStatsResult": { + "required": [ + "experiment_id", + "experiment_name", + "evaluation_id", + "evaluation_name", + "evaluation_template_id", + "dataset_id", + "dataset_name", + "evaluation_columns" + ], + "type": "object", + "properties": { + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "experiment_name": { + "title": "Experiment name", + "type": "string", + "minLength": 1 + }, + "evaluation_id": { + "title": "Evaluation id", + "type": "string", + "format": "uuid" + }, + "evaluation_name": { + "title": "Evaluation name", + "type": "string", + "minLength": 1 + }, + "evaluation_template_id": { + "title": "Evaluation template id", + "type": "string", + "format": "uuid" + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string", + "minLength": 1 + }, + "evaluation_columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentEvaluationColumnStats" + } + } + } + }, + "ExperimentEvaluationStatsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentEvaluationStatsResult" + } + } + }, + "Feedback": { + "required": [ + "source_id", + "source", + "value" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "source_id": { + "title": "Source id", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "source": { + "title": "Source", + "type": "string", + "enum": [ + "dataset", + "prompt", + "sdk", + "trace", + "experiment", + "observe", + "eval_playground" + ] + }, + "user_eval_metric": { + "title": "User eval metric", + "type": "string", + "format": "uuid", + "nullable": true + }, + "value": { + "title": "Value", + "type": "string", + "minLength": 1 + }, + "explanation": { + "title": "Explanation", + "type": "string", + "nullable": true + }, + "row_id": { + "title": "Row id", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "custom_eval_config_id": { + "title": "Custom eval config id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "feedback_improvement": { + "title": "Feedback improvement", + "type": "string", + "nullable": true + }, + "action_type": { + "title": "Action type", + "type": "string", + "maxLength": 255, + "nullable": true + } + } + }, + "ExperimentFeedbackCreateResult": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + } + } + }, + "ExperimentFeedbackCreateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentFeedbackCreateResult" + } + } + }, + "ExperimentFeedbackDetailItem": { + "required": [ + "id", + "created_at" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "comment": { + "title": "Comment", + "type": "string", + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time" + }, + "action_type": { + "title": "Action type", + "type": "string", + "nullable": true + } + } + }, + "ExperimentFeedbackDetailsResult": { + "required": [ + "feedback", + "total_count" + ], + "type": "object", + "properties": { + "feedback": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentFeedbackDetailItem" + } + }, + "total_count": { + "title": "Total count", + "type": "integer" + } + } + }, + "ExperimentFeedbackDetailsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentFeedbackDetailsResult" + } + } + }, + "ExperimentFeedbackTemplateResult": { + "required": [ + "eval_name", + "user_eval_name" + ], + "type": "object", + "properties": { + "output_type": { + "title": "Output type", + "type": "string", + "minLength": 1, + "nullable": true + }, + "eval_description": { + "title": "Eval description", + "type": "string", + "nullable": true + }, + "eval_name": { + "title": "Eval name", + "type": "string", + "minLength": 1 + }, + "user_eval_name": { + "title": "User eval name", + "type": "string", + "minLength": 1 + }, + "choices": { + "type": "array", + "items": { + "type": "string" + } + }, + "multi_choice": { + "title": "Multi choice", + "type": "boolean" + } + } + }, + "ExperimentFeedbackTemplateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentFeedbackTemplateResult" + } + } + }, + "ExperimentFeedbackSubmitRequest": { + "required": [ + "action_type", + "feedback_id", + "user_eval_metric_id" + ], + "type": "object", + "properties": { + "action_type": { + "title": "Action type", + "type": "string", + "enum": [ + "retune", + "recalculate_row", + "recalculate_dataset", + "retune_recalculate" + ] + }, + "feedback_id": { + "title": "Feedback id", + "type": "string", + "format": "uuid" + }, + "user_eval_metric_id": { + "title": "User eval metric id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "explanation": { + "title": "Explanation", + "type": "string" + } + } + }, + "ExperimentFeedbackSubmitResult": { + "required": [ + "message", + "action_type", + "user_eval_metric_id" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "action_type": { + "title": "Action type", + "type": "string", + "minLength": 1 + }, + "user_eval_metric_id": { + "title": "User eval metric id", + "type": "string", + "format": "uuid" + }, + "workflow_id": { + "title": "Workflow id", + "type": "string" + } + } + }, + "ExperimentFeedbackSubmitResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentFeedbackSubmitResult" + } + } + }, + "ExperimentJsonSchemaResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JsonColumnSchemaEntry" + } + } + } + }, + "RerunCellEntry": { + "required": [ + "column_id", + "row_id" + ], + "type": "object", + "properties": { + "column_id": { + "title": "Column id", + "type": "string", + "format": "uuid" + }, + "row_id": { + "title": "Row id", + "type": "string", + "format": "uuid" + } + } + }, + "ExperimentRerunCells": { + "type": "object", + "properties": { + "source_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "cells": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RerunCellEntry" + } + }, + "user_eval_metric_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "failed_only": { + "title": "Failed only", + "type": "boolean", + "default": false + } + } + }, + "ExperimentWorkflowResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "workflow_id": { + "title": "Workflow id", + "type": "string" + } + } + }, + "ExperimentWorkflowResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentWorkflowResult" + } + } + }, + "ExperimentTableRowsColumnConfig": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "origin_type": { + "title": "Origin type", + "type": "string" + }, + "data_type": { + "title": "Data type", + "type": "string" + }, + "status": { + "title": "Status", + "type": "string" + }, + "group": { + "title": "Group", + "type": "object", + "additionalProperties": true + }, + "average_score": { + "title": "Average score", + "type": "object", + "additionalProperties": true + }, + "dataset_id": { + "title": "Dataset id", + "type": "string" + }, + "choices_map": { + "title": "Choices map", + "type": "object", + "additionalProperties": true + }, + "is_base_column": { + "title": "Is base column", + "type": "boolean" + }, + "output_type": { + "title": "Output type", + "type": "string", + "nullable": true + }, + "eval_template_id": { + "title": "Eval template id", + "type": "string", + "nullable": true + }, + "source_id": { + "title": "Source id", + "type": "string" + }, + "is_agent": { + "title": "Is agent", + "type": "boolean" + }, + "is_final": { + "title": "Is final", + "type": "boolean" + } + } + }, + "ExperimentTableRowsMetadata": { + "type": "object", + "properties": { + "total_rows": { + "title": "Total rows", + "type": "integer" + }, + "dataset": { + "title": "Dataset", + "type": "string" + }, + "dataset_name": { + "title": "Dataset name", + "type": "string" + }, + "column": { + "title": "Column", + "type": "string", + "nullable": true + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + }, + "description": { + "title": "Description", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ExperimentTableRowsResult": { + "required": [ + "column_config" + ], + "type": "object", + "properties": { + "column_config": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentTableRowsColumnConfig" + } + }, + "table": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "metadata": { + "$ref": "#/components/schemas/ExperimentTableRowsMetadata" + }, + "output_format": { + "title": "Output format", + "type": "string" + }, + "status": { + "title": "Status", + "type": "string" + }, + "next_row_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "ExperimentTableRowsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentTableRowsResult" + } + } + }, + "ExperimentStatsColumnConfig": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "reverse_output": { + "title": "Reverse output", + "type": "boolean" + }, + "output_type": { + "title": "Output type", + "type": "string", + "nullable": true + }, + "eval_template_id": { + "title": "Eval template id", + "type": "string", + "nullable": true + } + } + }, + "ExperimentStatsMetadata": { + "required": [ + "is_winner_chosen" + ], + "type": "object", + "properties": { + "is_winner_chosen": { + "title": "Is winner chosen", + "type": "boolean" + } + } + }, + "ExperimentStatsResult": { + "required": [ + "column_config", + "table_data", + "metadata" + ], + "type": "object", + "properties": { + "column_config": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentStatsColumnConfig" + } + }, + "table_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "metadata": { + "$ref": "#/components/schemas/ExperimentStatsMetadata" + } + } + }, + "ExperimentStatsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentStatsResult" + } + } + }, + "ExperimentStopWorkflowsCancelled": { + "required": [ + "main", + "reruns" + ], + "type": "object", + "properties": { + "main": { + "title": "Main", + "type": "boolean" + }, + "reruns": { + "title": "Reruns", + "type": "boolean" + } + } + }, + "ExperimentStopResult": { + "required": [ + "message", + "experiment_id", + "workflows_cancelled" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "experiment_id": { + "title": "Experiment id", + "type": "string", + "format": "uuid" + }, + "workflows_cancelled": { + "$ref": "#/components/schemas/ExperimentStopWorkflowsCancelled" + } + } + }, + "ExperimentStopResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/ExperimentStopResult" + } + } + }, + "LegacyKnowledgeBaseSdkCodeResult": { + "required": [ + "code" + ], + "type": "object", + "properties": { + "code": { + "title": "Code", + "type": "string", + "minLength": 1 + } + } + }, + "LegacyKnowledgeBaseSdkCodeResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseSdkCodeResult" + } + } + }, + "LegacyKnowledgeBaseMutationRequest": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + }, + "files": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "LegacyKnowledgeBaseCreateResult": { + "required": [ + "detail", + "kb_id", + "kb_name", + "file_ids" + ], + "type": "object", + "properties": { + "detail": { + "title": "Detail", + "type": "string", + "minLength": 1 + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + }, + "kb_name": { + "title": "Kb name", + "type": "string", + "minLength": 1 + }, + "file_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "LegacyKnowledgeBaseCreateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseCreateResult" + } + } + }, + "LegacyKnowledgeBaseMutationResult": { + "required": [ + "id", + "name", + "organization", + "status", + "files", + "updated_at", + "created_by", + "last_error" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "files": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time" + }, + "created_by": { + "title": "Created by", + "type": "string", + "nullable": true + }, + "last_error": { + "title": "Last error", + "type": "string", + "nullable": true + } + } + }, + "LegacyKnowledgeBaseMutationResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseMutationResult" + } + } + }, + "LegacyKnowledgeBaseFilesRequest": { + "required": [ + "kb_id" + ], + "type": "object", + "properties": { + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid" + }, + "search": { + "title": "Search", + "type": "string", + "nullable": true + }, + "sort": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "page_number": { + "title": "Page number", + "type": "integer", + "default": 0 + }, + "page_size": { + "title": "Page size", + "type": "integer", + "default": 10 + } + } + }, + "LegacyKnowledgeBaseFileRow": { + "required": [ + "id", + "name", + "file_size", + "status", + "updated", + "updated_by" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "file_size": { + "title": "File size", + "type": "integer" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "updated": { + "title": "Updated", + "type": "string", + "format": "date-time" + }, + "updated_by": { + "title": "Updated by", + "type": "string", + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + } + } + }, + "LegacyKnowledgeBaseFilesResult": { + "required": [ + "table_data", + "last_updated", + "status", + "status_count", + "total_rows" + ], + "type": "object", + "properties": { + "table_data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseFileRow" + } + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "status_count": { + "title": "Status count", + "type": "integer" + }, + "total_rows": { + "title": "Total rows", + "type": "integer" + } + } + }, + "LegacyKnowledgeBaseFilesResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseFilesResult" + } + } + }, + "LegacyKnowledgeBaseTableColumn": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + } + } + }, + "LegacyKnowledgeBaseTableRow": { + "required": [ + "id", + "name", + "files_uploaded", + "status", + "updated_at", + "created_by" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "files_uploaded": { + "title": "Files uploaded", + "type": "integer" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time" + }, + "created_by": { + "title": "Created by", + "type": "string", + "nullable": true + } + } + }, + "LegacyKnowledgeBaseTableResult": { + "type": "object", + "properties": { + "column_config": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseTableColumn" + } + }, + "table_data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseTableRow" + } + }, + "total_rows": { + "title": "Total rows", + "type": "integer" + } + } + }, + "LegacyKnowledgeBaseTableResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseTableResult" + } + } + }, + "LegacyKnowledgeBaseOption": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + } + } + }, + "LegacyKnowledgeBaseListResult": { + "required": [ + "table_data" + ], + "type": "object", + "properties": { + "table_data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseOption" + } + } + } + }, + "LegacyKnowledgeBaseListResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/LegacyKnowledgeBaseListResult" + } + } + }, + "PromptHistoryExecution": { + "required": [ + "template_version" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "template_version": { + "title": "Template version", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "output": { + "title": "Output", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "prompt_config_snapshot": { + "title": "Prompt config snapshot", + "type": "string", + "readOnly": true + }, + "template_name": { + "title": "Template name", + "type": "string", + "readOnly": true + }, + "original_template": { + "title": "Original template", + "type": "string", + "format": "uuid", + "nullable": true + }, + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": true + }, + "variable_names": { + "title": "Variable names", + "type": "string", + "readOnly": true + }, + "evaluation_results": { + "title": "Evaluation results", + "type": "object", + "additionalProperties": true + }, + "evaluation_configs": { + "title": "Evaluation configs", + "type": "object", + "additionalProperties": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "is_default": { + "title": "Is default", + "type": "boolean" + }, + "commit_message": { + "title": "Commit message", + "type": "string", + "nullable": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "is_draft": { + "title": "Is draft", + "type": "boolean" + }, + "labels": { + "title": "Labels", + "type": "string", + "readOnly": true + }, + "placeholders": { + "title": "Placeholders", + "type": "object", + "additionalProperties": true + }, + "prompt_base_template": { + "title": "Prompt base template", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "PromptLabel": { + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 2000, + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "system", + "custom" + ] + }, + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "ModelHubTextErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "PromptTemplate": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 2000, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "variable_names": { + "title": "Variable names", + "type": "object", + "additionalProperties": true + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "nullable": true + }, + "prompt_folder": { + "title": "Prompt folder", + "type": "string", + "format": "uuid", + "nullable": true + }, + "placeholders": { + "title": "Placeholders", + "type": "object", + "additionalProperties": true + }, + "created_by": { + "title": "Created by", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "DerivedVariablePreviewRequest": { + "required": [ + "content" + ], + "type": "object", + "properties": { + "content": { + "title": "Content", + "type": "object", + "additionalProperties": true + }, + "column_name": { + "title": "Column name", + "type": "string", + "default": "output", + "minLength": 1 + } + } + }, + "DerivedVariableDetailResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/DerivedVariableDetail" + } + } + }, + "PromptDerivedVariablesResult": { + "required": [ + "version", + "derived_variables" + ], + "type": "object", + "properties": { + "version": { + "title": "Version", + "type": "string", + "minLength": 1 + }, + "derived_variables": { + "title": "Derived variables", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "PromptDerivedVariablesResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/PromptDerivedVariablesResult" + } + } + }, + "DerivedVariableExtractRequest": { + "required": [ + "version" + ], + "type": "object", + "properties": { + "version": { + "title": "Version", + "type": "string", + "minLength": 1 + }, + "column_name": { + "title": "Column name", + "type": "string", + "default": "output", + "minLength": 1 + }, + "output_index": { + "title": "Output index", + "type": "integer", + "default": 0 + }, + "response_format_type": { + "title": "Response format type", + "type": "string" + } + } + }, + "CreateScore": { + "required": [ + "source_type", + "source_id", + "label_id", + "value" + ], + "type": "object", + "properties": { + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "dataset_row", + "trace", + "observation_span", + "prototype_run", + "call_execution", + "trace_session" + ] + }, + "source_id": { + "title": "Source id", + "type": "string", + "minLength": 1 + }, + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "notes": { + "title": "Notes", + "type": "string", + "default": "" + }, + "score_source": { + "title": "Score source", + "type": "string", + "enum": [ + "human", + "api", + "auto", + "imported" + ], + "default": "human" + }, + "queue_item_id": { + "title": "Queue item id", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "ScoreResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/Score" + } + } + }, + "BulkCreateScoreItem": { + "required": [ + "label_id", + "value" + ], + "type": "object", + "properties": { + "label_id": { + "title": "Label id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "object", + "additionalProperties": true + }, + "notes": { + "title": "Notes", + "type": "string", + "default": "" + }, + "score_source": { + "title": "Score source", + "type": "string", + "enum": [ + "human", + "api", + "auto", + "imported" + ], + "default": "human" + } + } + }, + "BulkCreateScores": { + "required": [ + "source_type", + "source_id", + "scores" + ], + "type": "object", + "properties": { + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "dataset_row", + "trace", + "observation_span", + "prototype_run", + "call_execution", + "trace_session" + ] + }, + "source_id": { + "title": "Source id", + "type": "string", + "minLength": 1 + }, + "scores": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BulkCreateScoreItem" + } + }, + "notes": { + "title": "Notes", + "type": "string", + "default": "" + }, + "span_notes": { + "title": "Span notes", + "type": "string", + "nullable": true + }, + "span_notes_source_id": { + "title": "Span notes source id", + "type": "string", + "nullable": true + }, + "queue_item_id": { + "title": "Queue item id", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "BulkCreateScoresResult": { + "required": [ + "scores", + "errors" + ], + "type": "object", + "properties": { + "scores": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Score" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "BulkCreateScoresResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/BulkCreateScoresResult" + } + } + }, + "ScoreForSourceResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Score" + } + }, + "span_notes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "ScoreDeleteResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + } + }, + "ConfigureEvaluations": { + "required": [ + "eval_templates", + "inputs" + ], + "type": "object", + "properties": { + "eval_templates": { + "title": "Eval templates", + "type": "string", + "minLength": 1 + }, + "inputs": { + "title": "Inputs", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "model_name": { + "title": "Model name", + "type": "string", + "nullable": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + }, + "SDKConfigureEvaluationsRequest": { + "required": [ + "eval_config", + "platform" + ], + "type": "object", + "properties": { + "eval_config": { + "$ref": "#/components/schemas/ConfigureEvaluations" + }, + "platform": { + "title": "Platform", + "type": "string", + "minLength": 1 + }, + "custom_eval_name": { + "title": "Custom eval name", + "type": "string", + "nullable": true + } + }, + "additionalProperties": { + "description": "Provider-specific credential fields accepted at top level.", + "type": "object", + "additionalProperties": true + } + }, + "SDKMessageResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "SDKConfigureEvaluationsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKMessageResult" + } + } + }, + "SDKErrorResponse": { + "required": [ + "status" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "title": "Result", + "type": "string", + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "nullable": true + }, + "errors": { + "title": "Errors", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "SDKStandaloneEvalInput": { + "type": "object", + "properties": { + "input": { + "title": "Input", + "type": "string" + }, + "max_tokens": { + "title": "Max tokens", + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + }, + "SDKStandaloneEvalRequest": { + "required": [ + "inputs", + "config" + ], + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SDKStandaloneEvalInput" + } + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "protect_flash": { + "title": "Protect flash", + "type": "boolean", + "default": false + } + } + }, + "SDKStandaloneEvalResultItem": { + "required": [ + "evaluations" + ], + "type": "object", + "properties": { + "evaluations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "SDKStandaloneEvalResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SDKStandaloneEvalResultItem" + } + } + } + }, + "SDKEvalTemplate": { + "required": [ + "id", + "name", + "description", + "organization", + "owner", + "eval_id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "organization": { + "title": "Organization", + "type": "string", + "nullable": true + }, + "owner": { + "title": "Owner", + "type": "string", + "nullable": true + }, + "eval_tags": { + "title": "Eval tags", + "type": "object", + "additionalProperties": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "eval_id": { + "title": "Eval id", + "type": "string", + "nullable": true + }, + "criteria": { + "title": "Criteria", + "type": "object", + "additionalProperties": true + }, + "choices": { + "title": "Choices", + "type": "object", + "additionalProperties": true + }, + "multi_choice": { + "title": "Multi choice", + "type": "boolean", + "nullable": true + } + } + }, + "SDKEvalTemplateResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKEvalTemplate" + } + } + }, + "SDKCICDEvaluationRunSummary": { + "required": [ + "id", + "project", + "version", + "results_summary" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "project": { + "title": "Project", + "type": "string", + "minLength": 1 + }, + "version": { + "title": "Version", + "type": "string", + "minLength": 1 + }, + "results_summary": { + "title": "Results summary", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + }, + "SDKCICDEvaluationRunsResult": { + "required": [ + "message", + "status" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "processing", + "completed" + ] + }, + "evaluation_runs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SDKCICDEvaluationRunSummary" + } + } + } + }, + "SDKCICDEvaluationRunsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKCICDEvaluationRunsResult" + } + } + }, + "CICDEvaluationItem": { + "required": [ + "eval_template", + "inputs" + ], + "type": "object", + "properties": { + "eval_template": { + "title": "Eval template", + "type": "string", + "minLength": 1 + }, + "inputs": { + "title": "Inputs", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "model_name": { + "title": "Model name", + "type": "string", + "nullable": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + }, + "CICDJob": { + "required": [ + "project_name", + "version", + "eval_data" + ], + "type": "object", + "properties": { + "project_name": { + "title": "Project name", + "type": "string", + "minLength": 1 + }, + "version": { + "title": "Version", + "type": "string", + "minLength": 1 + }, + "eval_data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CICDEvaluationItem" + } + } + } + }, + "SDKCICDEvaluationRunAccepted": { + "required": [ + "message", + "project_name", + "version", + "evaluation_run_id" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "project_name": { + "title": "Project name", + "type": "string", + "minLength": 1 + }, + "version": { + "title": "Version", + "type": "string", + "minLength": 1 + }, + "evaluation_run_id": { + "title": "Evaluation run id", + "type": "string", + "format": "uuid" + } + } + }, + "SDKCICDEvaluationRunAcceptedResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKCICDEvaluationRunAccepted" + } + } + }, + "SDKGetEvalsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SDKEvalTemplate" + } + } + } + }, + "SDKStandaloneEvalV2Result": { + "required": [ + "eval_status", + "result" + ], + "type": "object", + "properties": { + "eval_status": { + "title": "Eval status", + "type": "string", + "minLength": 1 + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": true + } + } + }, + "SDKStandaloneEvalV2Response": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKStandaloneEvalV2Result" + } + } + }, + "SDKStandaloneEvalV2Request": { + "required": [ + "eval_name", + "inputs" + ], + "type": "object", + "properties": { + "eval_name": { + "title": "Eval name", + "type": "string", + "minLength": 1 + }, + "inputs": { + "title": "Inputs", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "span_id": { + "title": "Span id", + "type": "string", + "nullable": true + }, + "custom_eval_name": { + "title": "Custom eval name", + "type": "string", + "nullable": true + }, + "trace_eval": { + "title": "Trace eval", + "type": "boolean", + "default": false + }, + "is_async": { + "title": "Is async", + "type": "boolean", + "default": false + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "default": false + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + }, + "SDKSimulationAnalyticsResult": { + "required": [ + "run_test_name", + "eval_results", + "eval_averages", + "system_summary" + ], + "type": "object", + "properties": { + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid" + }, + "run_test_name": { + "title": "Run test name", + "type": "string", + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "eval_results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "eval_averages": { + "title": "Eval averages", + "type": "object", + "additionalProperties": true + }, + "system_summary": { + "title": "System summary", + "type": "object", + "additionalProperties": true + }, + "eval_explanation_summary": { + "title": "Eval explanation summary", + "type": "object", + "additionalProperties": true + }, + "eval_explanation_summary_status": { + "title": "Eval explanation summary status", + "type": "string", + "nullable": true + } + } + }, + "SDKSimulationAnalyticsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKSimulationAnalyticsResult" + } + } + }, + "ExecutionMetrics": { + "required": [ + "execution_id" + ], + "type": "object", + "properties": { + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid" + }, + "status": { + "title": "Status", + "description": "Current status of the test execution", + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed", + "cancelled", + "cancelling", + "evaluating" + ], + "readOnly": true + }, + "started_at": { + "title": "Started at", + "description": "When the test execution started", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "completed_at": { + "title": "Completed at", + "description": "When the test execution completed", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "total_calls": { + "title": "Total calls", + "description": "Total number of calls to be made", + "type": "integer", + "readOnly": true + }, + "completed_calls": { + "title": "Completed calls", + "description": "Number of successfully completed calls", + "type": "integer", + "readOnly": true + }, + "failed_calls": { + "title": "Failed calls", + "description": "Number of failed calls", + "type": "integer", + "readOnly": true + }, + "metrics": { + "title": "Metrics", + "type": "string", + "readOnly": true + } + } + }, + "SDKSimulationMetricsResult": { + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid" + }, + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "duration_seconds": { + "title": "Duration seconds", + "type": "number", + "nullable": true + }, + "started_at": { + "title": "Started at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "completed_at": { + "title": "Completed at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "total_calls": { + "title": "Total calls", + "type": "integer" + }, + "completed_calls": { + "title": "Completed calls", + "type": "integer" + }, + "failed_calls": { + "title": "Failed calls", + "type": "integer" + }, + "latency": { + "title": "Latency", + "type": "object", + "additionalProperties": true + }, + "cost": { + "title": "Cost", + "type": "object", + "additionalProperties": true + }, + "conversation": { + "title": "Conversation", + "type": "object", + "additionalProperties": true + }, + "chat_metrics": { + "title": "Chat metrics", + "type": "object", + "additionalProperties": true + }, + "metrics": { + "title": "Metrics", + "type": "object", + "additionalProperties": true + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + }, + "current_page": { + "title": "Current page", + "type": "integer" + }, + "count": { + "title": "Count", + "type": "integer" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionMetrics" + } + } + } + }, + "SDKSimulationMetricsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKSimulationMetricsResult" + } + } + }, + "ExecutionRuns": { + "required": [ + "execution_id" + ], + "type": "object", + "properties": { + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid" + }, + "status": { + "title": "Status", + "description": "Current status of the test execution", + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed", + "cancelled", + "cancelling", + "evaluating" + ], + "readOnly": true + }, + "started_at": { + "title": "Started at", + "description": "When the test execution started", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "completed_at": { + "title": "Completed at", + "description": "When the test execution completed", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "total_calls": { + "title": "Total calls", + "description": "Total number of calls to be made", + "type": "integer", + "readOnly": true + }, + "completed_calls": { + "title": "Completed calls", + "description": "Number of successfully completed calls", + "type": "integer", + "readOnly": true + }, + "failed_calls": { + "title": "Failed calls", + "description": "Number of failed calls", + "type": "integer", + "readOnly": true + }, + "eval_results": { + "title": "Eval results", + "type": "string", + "readOnly": true + } + } + }, + "SDKSimulationRunsResult": { + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid" + }, + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid" + }, + "scenario_id": { + "title": "Scenario id", + "type": "string", + "format": "uuid" + }, + "scenario_name": { + "title": "Scenario name", + "type": "string" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "started_at": { + "title": "Started at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "completed_at": { + "title": "Completed at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration_seconds": { + "title": "Duration seconds", + "type": "number", + "nullable": true + }, + "ended_reason": { + "title": "Ended reason", + "type": "string", + "nullable": true + }, + "call_summary": { + "title": "Call summary", + "type": "string", + "nullable": true + }, + "total_calls": { + "title": "Total calls", + "type": "integer" + }, + "completed_calls": { + "title": "Completed calls", + "type": "integer" + }, + "failed_calls": { + "title": "Failed calls", + "type": "integer" + }, + "eval_outputs": { + "title": "Eval outputs", + "type": "object", + "additionalProperties": true + }, + "eval_results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "latency": { + "title": "Latency", + "type": "object", + "additionalProperties": true + }, + "cost": { + "title": "Cost", + "type": "object", + "additionalProperties": true + }, + "call_results": { + "title": "Call results", + "type": "object", + "additionalProperties": true + }, + "eval_explanation_summary": { + "title": "Eval explanation summary", + "type": "object", + "additionalProperties": true + }, + "eval_explanation_summary_status": { + "title": "Eval explanation summary status", + "type": "string", + "nullable": true + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + }, + "current_page": { + "title": "Current page", + "type": "integer" + }, + "count": { + "title": "Count", + "type": "integer" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionRuns" + } + } + } + }, + "SDKSimulationRunsResponse": { + "required": [ + "status", + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean" + }, + "result": { + "$ref": "#/components/schemas/SDKSimulationRunsResult" + } + } + }, + "AgentDefinitionListResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "agent_name": { + "title": "Agent name", + "description": "Name of the AI agent", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "enum": [ + "voice", + "text" + ], + "readOnly": true + }, + "contact_number": { + "title": "Contact number", + "description": "Phone number associated with the AI agent", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "inbound": { + "title": "Inbound", + "description": "Whether the agent handles inbound calls", + "type": "boolean", + "readOnly": true + }, + "description": { + "title": "Description", + "description": "Detailed description of the AI agent's purpose and capabilities", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "assistant_id": { + "title": "Assistant id", + "description": "External identifier for the assistant", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "provider": { + "title": "Provider", + "description": "Provider of the AI agent", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "language": { + "title": "Language", + "description": "Language of the agent", + "type": "string", + "enum": [ + "ar", + "bg", + "zh", + "cs", + "da", + "nl", + "en", + "fi", + "fr", + "de", + "el", + "hi", + "hu", + "id", + "it", + "ja", + "ko", + "ms", + "no", + "pl", + "pt", + "ro", + "ru", + "sk", + "es", + "sv", + "tr", + "uk", + "vi" + ], + "readOnly": true, + "nullable": true + }, + "languages": { + "type": "array", + "items": { + "title": "Languages", + "description": "Language of the agent", + "type": "string", + "enum": [ + "ar", + "bg", + "zh", + "cs", + "da", + "nl", + "en", + "fi", + "fr", + "de", + "el", + "hi", + "hu", + "id", + "it", + "ja", + "ko", + "ms", + "no", + "pl", + "pt", + "ro", + "ru", + "sk", + "es", + "sv", + "tr", + "uk", + "vi" + ] + }, + "readOnly": true, + "nullable": true + }, + "websocket_url": { + "title": "Websocket url", + "description": "WebSocket URL for real-time communication with the agent", + "type": "string", + "format": "uri", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "websocket_headers": { + "title": "Websocket headers", + "description": "Headers to be sent to the websocket server", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "workspace": { + "title": "Workspace", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "knowledge_base": { + "title": "Knowledge base", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "organization": { + "title": "Organization", + "description": "Organization this agent definition belongs to", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "latest_version": { + "title": "Latest version", + "type": "string", + "readOnly": true + }, + "latest_version_id": { + "title": "Latest version id", + "type": "string", + "readOnly": true + }, + "model_details": { + "title": "Model details", + "description": "Details of the model", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "model": { + "title": "Model", + "description": "Model of the agent", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + } + } + }, + "ApiErrorWithDetailsResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "AgentDefinitionBulkDeleteRequest": { + "required": [ + "agent_ids" + ], + "type": "object", + "properties": { + "agent_ids": { + "description": "List of agent definition UUIDs to delete.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + }, + "AgentDefinitionBulkDeleteResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agents_updated": { + "title": "Agents updated", + "type": "integer", + "readOnly": true + }, + "versions_updated": { + "title": "Versions updated", + "type": "integer", + "readOnly": true + } + } + }, + "AgentDefinitionCreateRequest": { + "required": [ + "agent_name", + "agent_type", + "commit_message" + ], + "type": "object", + "properties": { + "agent_name": { + "title": "Agent name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "agent_type": { + "title": "Agent type", + "description": "The type of agent. One of: voice, text.", + "type": "string", + "enum": [ + "voice", + "text" + ] + }, + "commit_message": { + "title": "Commit message", + "type": "string", + "minLength": 1 + }, + "inbound": { + "title": "Inbound", + "type": "boolean", + "default": true + }, + "description": { + "title": "Description", + "type": "string", + "default": "" + }, + "provider": { + "title": "Provider", + "type": "string", + "nullable": true + }, + "api_key": { + "title": "Api key", + "type": "string", + "nullable": true + }, + "assistant_id": { + "title": "Assistant id", + "type": "string", + "nullable": true + }, + "authentication_method": { + "title": "Authentication method", + "type": "string", + "enum": [ + "api_key" + ], + "nullable": true + }, + "language": { + "title": "Language", + "type": "string", + "nullable": true + }, + "languages": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "contact_number": { + "title": "Contact number", + "type": "string", + "nullable": true + }, + "knowledge_base": { + "title": "Knowledge base", + "type": "string", + "format": "uuid", + "nullable": true + }, + "observability_enabled": { + "title": "Observability enabled", + "type": "boolean", + "default": false + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "model_details": { + "title": "Model details", + "type": "object", + "additionalProperties": true + }, + "websocket_url": { + "title": "Websocket url", + "type": "string", + "format": "uri", + "nullable": true + }, + "websocket_headers": { + "title": "Websocket headers", + "type": "object", + "additionalProperties": true + }, + "replay_session_id": { + "title": "Replay session id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "livekit_url": { + "title": "Livekit url", + "type": "string", + "maxLength": 500, + "nullable": true + }, + "livekit_api_key": { + "title": "Livekit api key", + "type": "string", + "nullable": true + }, + "livekit_api_secret": { + "title": "Livekit api secret", + "type": "string", + "nullable": true + }, + "livekit_agent_name": { + "title": "Livekit agent name", + "type": "string", + "nullable": true + }, + "livekit_config_json": { + "title": "Livekit config json", + "type": "object", + "additionalProperties": true + }, + "livekit_max_concurrency": { + "title": "Livekit max concurrency", + "type": "integer", + "minimum": 1, + "nullable": true + } + } + }, + "AgentDefinitionResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "agent_name": { + "title": "Agent name", + "description": "Name of the AI agent", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "enum": [ + "voice", + "text" + ], + "readOnly": true + }, + "contact_number": { + "title": "Contact number", + "description": "Phone number associated with the AI agent", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "inbound": { + "title": "Inbound", + "description": "Whether the agent handles inbound calls", + "type": "boolean", + "readOnly": true + }, + "description": { + "title": "Description", + "description": "Detailed description of the AI agent's purpose and capabilities", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "assistant_id": { + "title": "Assistant id", + "description": "External identifier for the assistant", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "provider": { + "title": "Provider", + "description": "Provider of the AI agent", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "language": { + "title": "Language", + "description": "Language of the agent", + "type": "string", + "enum": [ + "ar", + "bg", + "zh", + "cs", + "da", + "nl", + "en", + "fi", + "fr", + "de", + "el", + "hi", + "hu", + "id", + "it", + "ja", + "ko", + "ms", + "no", + "pl", + "pt", + "ro", + "ru", + "sk", + "es", + "sv", + "tr", + "uk", + "vi" + ], + "readOnly": true, + "nullable": true + }, + "languages": { + "type": "array", + "items": { + "title": "Languages", + "description": "Language of the agent", + "type": "string", + "enum": [ + "ar", + "bg", + "zh", + "cs", + "da", + "nl", + "en", + "fi", + "fr", + "de", + "el", + "hi", + "hu", + "id", + "it", + "ja", + "ko", + "ms", + "no", + "pl", + "pt", + "ro", + "ru", + "sk", + "es", + "sv", + "tr", + "uk", + "vi" + ] + }, + "readOnly": true, + "nullable": true + }, + "authentication_method": { + "title": "Authentication method", + "type": "string", + "enum": [ + "api_key" + ], + "readOnly": true, + "nullable": true + }, + "websocket_url": { + "title": "Websocket url", + "description": "WebSocket URL for real-time communication with the agent", + "type": "string", + "format": "uri", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "websocket_headers": { + "title": "Websocket headers", + "description": "Headers to be sent to the websocket server", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "workspace": { + "title": "Workspace", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "knowledge_base": { + "title": "Knowledge base", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "organization": { + "title": "Organization", + "description": "Organization this agent definition belongs to", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "api_key": { + "title": "Api key", + "description": "API key for the agent", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "observability_provider": { + "title": "Observability provider", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "model": { + "title": "Model", + "description": "Model of the agent", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "model_details": { + "title": "Model details", + "description": "Details of the model", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "livekit_url": { + "title": "Livekit url", + "type": "string", + "readOnly": true + }, + "livekit_api_key": { + "title": "Livekit api key", + "type": "string", + "readOnly": true + }, + "livekit_agent_name": { + "title": "Livekit agent name", + "type": "string", + "readOnly": true + }, + "livekit_config_json": { + "title": "Livekit config json", + "type": "string", + "readOnly": true + }, + "livekit_max_concurrency": { + "title": "Livekit max concurrency", + "type": "string", + "readOnly": true + } + } + }, + "AgentDefinitionCreateResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent": { + "$ref": "#/components/schemas/AgentDefinitionResponse" + } + } + }, + "AgentDefinitionDeleteResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "AgentDefinitionEditRequest": { + "type": "object", + "properties": { + "agent_name": { + "title": "Agent name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "enum": [ + "voice", + "text" + ] + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "provider": { + "title": "Provider", + "type": "string", + "nullable": true + }, + "api_key": { + "title": "Api key", + "type": "string", + "nullable": true + }, + "assistant_id": { + "title": "Assistant id", + "type": "string", + "nullable": true + }, + "authentication_method": { + "title": "Authentication method", + "type": "string", + "enum": [ + "api_key" + ], + "nullable": true + }, + "language": { + "title": "Language", + "type": "string", + "nullable": true + }, + "languages": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "contact_number": { + "title": "Contact number", + "type": "string", + "nullable": true + }, + "inbound": { + "title": "Inbound", + "type": "boolean" + }, + "knowledge_base": { + "title": "Knowledge base", + "type": "string", + "format": "uuid", + "nullable": true + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "model_details": { + "title": "Model details", + "type": "object", + "additionalProperties": true + }, + "websocket_url": { + "title": "Websocket url", + "type": "string", + "format": "uri", + "nullable": true + }, + "websocket_headers": { + "title": "Websocket headers", + "type": "object", + "additionalProperties": true + }, + "livekit_url": { + "title": "Livekit url", + "type": "string", + "maxLength": 500, + "nullable": true + }, + "livekit_api_key": { + "title": "Livekit api key", + "type": "string", + "nullable": true + }, + "livekit_api_secret": { + "title": "Livekit api secret", + "type": "string", + "nullable": true + }, + "livekit_agent_name": { + "title": "Livekit agent name", + "type": "string", + "nullable": true + }, + "livekit_config_json": { + "title": "Livekit config json", + "type": "object", + "additionalProperties": true + }, + "livekit_max_concurrency": { + "title": "Livekit max concurrency", + "type": "integer", + "minimum": 1, + "nullable": true + } + } + }, + "AgentDefinitionEditResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent": { + "$ref": "#/components/schemas/AgentDefinitionResponse" + } + } + }, + "AgentVersionListResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "version_number": { + "title": "Version number", + "description": "Version number of the agent", + "type": "integer", + "readOnly": true + }, + "version_name": { + "title": "Version name", + "description": "Human-readable version name (e.g., 'v1.2.3')", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "version_name_display": { + "title": "Version name display", + "type": "string", + "readOnly": true + }, + "status": { + "title": "Status", + "description": "Current status of this version", + "type": "string", + "enum": [ + "draft", + "active", + "archived", + "deprecated" + ], + "readOnly": true + }, + "status_display": { + "title": "Status display", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "score": { + "title": "Score", + "description": "Performance score (0.0 to 10.0)", + "type": "string", + "format": "decimal", + "readOnly": true, + "nullable": true + }, + "test_count": { + "title": "Test count", + "description": "Number of tests run for this version", + "type": "integer", + "readOnly": true + }, + "pass_rate": { + "title": "Pass rate", + "description": "Test pass rate percentage", + "type": "string", + "format": "decimal", + "readOnly": true, + "nullable": true + }, + "description": { + "title": "Description", + "description": "Description of changes in this version", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "commit_message": { + "title": "Commit message", + "description": "Commit message for the agent version", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "is_active": { + "title": "Is active", + "type": "string", + "readOnly": true + }, + "is_latest": { + "title": "Is latest", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "AgentVersionCreateRequest": { + "type": "object", + "properties": { + "agent_name": { + "title": "Agent name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "enum": [ + "voice", + "text" + ] + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "provider": { + "title": "Provider", + "type": "string", + "nullable": true + }, + "api_key": { + "title": "Api key", + "type": "string", + "nullable": true + }, + "assistant_id": { + "title": "Assistant id", + "type": "string", + "nullable": true + }, + "authentication_method": { + "title": "Authentication method", + "type": "string", + "enum": [ + "api_key" + ], + "nullable": true + }, + "language": { + "title": "Language", + "type": "string", + "nullable": true + }, + "languages": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "contact_number": { + "title": "Contact number", + "type": "string", + "nullable": true + }, + "inbound": { + "title": "Inbound", + "type": "boolean" + }, + "knowledge_base": { + "title": "Knowledge base", + "type": "string", + "format": "uuid", + "nullable": true + }, + "model": { + "title": "Model", + "type": "string", + "nullable": true + }, + "model_details": { + "title": "Model details", + "type": "object", + "additionalProperties": true + }, + "livekit_url": { + "title": "Livekit url", + "type": "string", + "maxLength": 500 + }, + "livekit_api_key": { + "title": "Livekit api key", + "type": "string", + "maxLength": 255 + }, + "livekit_api_secret": { + "title": "Livekit api secret", + "type": "string", + "maxLength": 500 + }, + "livekit_agent_name": { + "title": "Livekit agent name", + "type": "string", + "maxLength": 255 + }, + "livekit_config_json": { + "title": "Livekit config json", + "type": "object", + "additionalProperties": true + }, + "livekit_max_concurrency": { + "title": "Livekit max concurrency", + "type": "integer", + "minimum": 1 + }, + "commit_message": { + "title": "Commit message", + "type": "string", + "default": "" + }, + "observability_enabled": { + "title": "Observability enabled", + "type": "boolean", + "default": false + } + } + }, + "AgentVersionResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "version_number": { + "title": "Version number", + "description": "Version number of the agent", + "type": "integer", + "readOnly": true + }, + "version_name": { + "title": "Version name", + "description": "Human-readable version name (e.g., 'v1.2.3')", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "version_name_display": { + "title": "Version name display", + "type": "string", + "readOnly": true + }, + "status": { + "title": "Status", + "description": "Current status of this version", + "type": "string", + "enum": [ + "draft", + "active", + "archived", + "deprecated" + ], + "readOnly": true + }, + "status_display": { + "title": "Status display", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "score": { + "title": "Score", + "description": "Performance score (0.0 to 10.0)", + "type": "string", + "format": "decimal", + "readOnly": true, + "nullable": true + }, + "test_count": { + "title": "Test count", + "description": "Number of tests run for this version", + "type": "integer", + "readOnly": true + }, + "pass_rate": { + "title": "Pass rate", + "description": "Test pass rate percentage", + "type": "string", + "format": "decimal", + "readOnly": true, + "nullable": true + }, + "description": { + "title": "Description", + "description": "Description of changes in this version", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "commit_message": { + "title": "Commit message", + "description": "Commit message for the agent version", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "release_notes": { + "title": "Release notes", + "description": "Detailed release notes for this version", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "agent_definition": { + "title": "Agent definition", + "description": "Parent agent definition", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "organization": { + "title": "Organization", + "description": "Organization this version belongs to", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "configuration_snapshot": { + "title": "Configuration snapshot", + "description": "Snapshot of agent configuration at this version", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "is_active": { + "title": "Is active", + "type": "string", + "readOnly": true + }, + "is_latest": { + "title": "Is latest", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "AgentVersionCreateResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "version": { + "$ref": "#/components/schemas/AgentVersionResponse" + } + } + }, + "AgentVersionActivateResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "version": { + "$ref": "#/components/schemas/AgentVersionResponse" + } + } + }, + "CallExecution": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "phone_number": { + "title": "Phone number", + "description": "Phone number called (null for TEXT/chat simulations)", + "type": "string", + "maxLength": 20, + "nullable": true + }, + "service_provider_call_id": { + "title": "Service provider call id", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "status": { + "title": "Status", + "description": "Current status of the call", + "type": "string", + "enum": [ + "pending", + "queued", + "ongoing", + "completed", + "failed", + "analyzing", + "cancelled" + ] + }, + "started_at": { + "title": "Started at", + "description": "When the call started", + "type": "string", + "format": "date-time", + "nullable": true + }, + "completed_at": { + "title": "Completed at", + "description": "When the call completed", + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration_seconds": { + "title": "Duration seconds", + "description": "Duration of the call in seconds", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "recording_url": { + "title": "Recording url", + "description": "URL to the call recording", + "type": "string", + "format": "uri", + "maxLength": 500, + "nullable": true + }, + "cost_cents": { + "title": "Cost cents", + "description": "Cost of the call in cents", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "call_metadata": { + "title": "Call metadata", + "description": "Additional metadata about the call", + "type": "object", + "additionalProperties": true + }, + "error_message": { + "title": "Error message", + "description": "Error message if the call failed", + "type": "string", + "nullable": true + }, + "scenario_name": { + "title": "Scenario name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "transcripts": { + "title": "Transcripts", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "provider_call_data": { + "title": "Provider call data", + "description": "Complete call data from the provider. Format: dict[provider_name, data] where provider_name must be from SupportedProviders", + "type": "object", + "additionalProperties": true + }, + "stereo_recording_url": { + "title": "Stereo recording url", + "description": "Stereo recording URL from Vapi", + "type": "string", + "format": "uri", + "maxLength": 500, + "nullable": true + }, + "ended_reason": { + "title": "Ended reason", + "description": "Reason why the call ended", + "type": "string", + "maxLength": 10000, + "nullable": true + }, + "stt_cost_cents": { + "title": "Stt cost cents", + "description": "STT cost in cents", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "llm_cost_cents": { + "title": "Llm cost cents", + "description": "LLM cost in cents", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "tts_cost_cents": { + "title": "Tts cost cents", + "description": "TTS cost in cents", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "overall_score": { + "title": "Overall score", + "description": "Overall call performance score", + "type": "number", + "nullable": true + }, + "response_time_ms": { + "title": "Response time ms", + "description": "Average response time in milliseconds", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "response_time_seconds": { + "title": "Response time seconds", + "type": "string", + "readOnly": true + }, + "assistant_id": { + "title": "Assistant id", + "description": "Assistant ID used for the call (system side)", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "customer_number": { + "title": "Customer number", + "description": "Customer phone number (E.164 format)", + "type": "string", + "maxLength": 20, + "nullable": true + }, + "call_type": { + "title": "Call type", + "description": "Type of call (e.g., outboundPhoneCall)", + "type": "string", + "maxLength": 50, + "nullable": true + }, + "ended_at": { + "title": "Ended at", + "description": "When the call ended", + "type": "string", + "format": "date-time", + "nullable": true + }, + "analysis_data": { + "title": "Analysis data", + "description": "Call analysis data from the service provider", + "type": "object", + "additionalProperties": true + }, + "evaluation_data": { + "title": "Evaluation data", + "description": "Call evaluation data from the service provider", + "type": "object", + "additionalProperties": true + }, + "message_count": { + "title": "Message count", + "description": "Number of messages in the call", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "transcript_available": { + "title": "Transcript available", + "description": "Whether transcript is available", + "type": "boolean" + }, + "recording_available": { + "title": "Recording available", + "description": "Whether recording is available", + "type": "boolean" + }, + "eval_outputs": { + "title": "Eval outputs", + "description": "Evaluation output", + "type": "object", + "additionalProperties": true + }, + "error_localizer_tasks": { + "title": "Error localizer tasks", + "type": "string", + "readOnly": true + }, + "call_summary": { + "title": "Call summary", + "description": "Call summary from the service", + "type": "string", + "nullable": true + }, + "agent_version": { + "title": "Agent version", + "type": "string", + "format": "uuid", + "nullable": true + }, + "customer_cost_cents": { + "title": "Customer cost cents", + "description": "Total customer-reported cost in cents", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "system_metrics": { + "title": "System metrics", + "type": "string", + "readOnly": true + }, + "cost_breakdown": { + "title": "Cost breakdown", + "type": "string", + "readOnly": true + }, + "customer_call_id": { + "title": "Customer call id", + "description": "Customer call ID if available", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "simulation_call_type": { + "title": "Simulation call type", + "description": "Type of simulation call", + "type": "string", + "enum": [ + "voice", + "text" + ] + }, + "processing_skipped": { + "title": "Processing skipped", + "type": "string", + "readOnly": true + }, + "processing_skip_reason": { + "title": "Processing skip reason", + "type": "string", + "readOnly": true + } + } + }, + "AgentVersionDeleteResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "EvalTemplateSummary": { + "required": [ + "name", + "id", + "total_cells", + "output" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "total_cells": { + "title": "Total cells", + "type": "integer" + }, + "output": { + "title": "Output", + "type": "object", + "additionalProperties": true + } + } + }, + "EvalSummaryResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateSummary" + } + } + } + }, + "EvalErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "AgentVersionRestoreResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent": { + "title": "Agent", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "version": { + "$ref": "#/components/schemas/AgentVersionResponse" + } + } + }, + "CallExecutionErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "PersonaList": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "persona_type": { + "title": "Persona type", + "description": "Type of persona (system or workspace-level)", + "type": "string", + "enum": [ + "system", + "workspace" + ], + "readOnly": true + }, + "persona_type_display": { + "title": "Persona type display", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "name": { + "title": "Name", + "description": "Name of the persona", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "description": { + "title": "Description", + "description": "Description of the persona", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "gender": { + "title": "Gender", + "description": "List of genders for the persona (e.g., ['male'], ['female'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "age_group": { + "title": "Age group", + "description": "List of age groups for the persona (e.g., ['18-25'], ['25-32'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "occupation": { + "title": "Occupation", + "description": "List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "location": { + "title": "Location", + "description": "List of locations for the persona (e.g., ['United States'], ['Canada'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "personality": { + "title": "Personality", + "description": "List of personality types for the persona (e.g., ['Friendly and cooperative'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "communication_style": { + "title": "Communication style", + "description": "List of communication styles for the persona (e.g., ['Direct and concise'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "multilingual": { + "title": "Multilingual", + "description": "Whether the persona supports multiple languages", + "type": "boolean", + "readOnly": true, + "nullable": true + }, + "languages": { + "title": "Languages", + "description": "List of languages the persona speaks (e.g., ['English', 'Hindi'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "accent": { + "title": "Accent", + "description": "List of accents for the persona (e.g., ['American'], ['Australian'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "conversation_speed": { + "title": "Conversation speed", + "description": "List of conversation speeds (e.g., ['1.0'], ['1.25'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "background_sound": { + "title": "Background sound", + "description": "Whether background sound is enabled (null=not specified, True/False for enabled/disabled)", + "type": "boolean", + "readOnly": true, + "nullable": true + }, + "finished_speaking_sensitivity": { + "title": "Finished speaking sensitivity", + "description": "List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "interrupt_sensitivity": { + "title": "Interrupt sensitivity", + "description": "List of sensitivities for allowing interruptions (e.g., ['5'], ['6'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "keywords": { + "title": "Keywords", + "description": "List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful'])", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "metadata": { + "title": "Metadata", + "description": "Additional metadata for the persona (speech clarity, base emotion, etc.)", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "additional_instruction": { + "title": "Additional instruction", + "description": "Additional instructions for how this persona should behave", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "is_default": { + "title": "Is default", + "description": "Whether this is a default/recommended persona", + "type": "boolean", + "readOnly": true, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "simulation_type": { + "title": "Simulation type", + "type": "string", + "readOnly": true + }, + "punctuation": { + "title": "Punctuation", + "description": "Punctuation style for the persona", + "type": "string", + "enum": [ + "clean", + "minimal", + "expressive", + "erratic" + ], + "readOnly": true, + "nullable": true + }, + "slang_usage": { + "title": "Slang usage", + "description": "Slang usage for the persona", + "type": "string", + "enum": [ + "none", + "moderate", + "heavy", + "light" + ], + "readOnly": true, + "nullable": true + }, + "typos_frequency": { + "title": "Typos frequency", + "description": "Typos frequency for the persona", + "type": "string", + "enum": [ + "none", + "rare", + "occasional", + "frequent" + ], + "readOnly": true, + "nullable": true + }, + "regional_mix": { + "title": "Regional mix", + "description": "Regional mix for the persona", + "type": "string", + "enum": [ + "none", + "moderate", + "heavy", + "light" + ], + "readOnly": true, + "nullable": true + }, + "emoji_usage": { + "title": "Emoji usage", + "description": "Emoji usage for the persona", + "type": "string", + "enum": [ + "never", + "light", + "regular", + "heavy" + ], + "readOnly": true, + "nullable": true + }, + "tone": { + "title": "Tone", + "description": "Tone for the persona", + "type": "string", + "enum": [ + "formal", + "casual", + "neutral" + ], + "readOnly": true, + "nullable": true + }, + "verbosity": { + "title": "Verbosity", + "description": "Verbosity for the persona", + "type": "string", + "enum": [ + "brief", + "balanced", + "detailed" + ], + "readOnly": true, + "nullable": true + } + } + }, + "PersonaCreate": { + "required": [ + "name", + "description" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "minLength": 1 + }, + "gender": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "age_group": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "location": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "profession": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "personality": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "communication_style": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "accent": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "multilingual": { + "title": "Multilingual", + "type": "boolean", + "default": false + }, + "language": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "conversation_speed": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "background_sound": { + "title": "Background sound", + "type": "boolean", + "nullable": true + }, + "finished_speaking_sensitivity": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "interrupt_sensitivity": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "keywords": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "custom_properties": { + "title": "Custom properties", + "type": "object", + "additionalProperties": true + }, + "additional_instruction": { + "title": "Additional instruction", + "type": "string", + "default": "", + "nullable": true + }, + "simulation_type": { + "title": "Simulation type", + "type": "string", + "default": "voice", + "nullable": true + }, + "tone": { + "title": "Tone", + "type": "string", + "default": "casual", + "nullable": true + }, + "punctuation": { + "title": "Punctuation", + "type": "string", + "default": "clean", + "nullable": true + }, + "slang_usage": { + "title": "Slang usage", + "type": "string", + "default": "light", + "nullable": true + }, + "typos_frequency": { + "title": "Typos frequency", + "type": "string", + "default": "rare", + "nullable": true + }, + "regional_mix": { + "title": "Regional mix", + "type": "string", + "default": "light", + "nullable": true + }, + "emoji_usage": { + "title": "Emoji usage", + "type": "string", + "default": "light", + "nullable": true + }, + "verbosity": { + "title": "Verbosity", + "type": "string", + "default": "balanced", + "nullable": true + } + } + }, + "PersonaDuplicateRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + } + } + }, + "Persona": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "persona_type": { + "title": "Persona type", + "description": "Type of persona (system or workspace-level)", + "type": "string", + "enum": [ + "system", + "workspace" + ], + "readOnly": true + }, + "persona_type_display": { + "title": "Persona type display", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "name": { + "title": "Name", + "description": "Name of the persona", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "description": "Description of the persona", + "type": "string", + "nullable": true + }, + "gender": { + "title": "Gender", + "description": "List of genders for the persona (e.g., ['male'], ['female'])", + "type": "object", + "additionalProperties": true + }, + "age_group": { + "title": "Age group", + "description": "List of age groups for the persona (e.g., ['18-25'], ['25-32'])", + "type": "object", + "additionalProperties": true + }, + "occupation": { + "title": "Occupation", + "description": "List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher'])", + "type": "object", + "additionalProperties": true + }, + "location": { + "title": "Location", + "description": "List of locations for the persona (e.g., ['United States'], ['Canada'])", + "type": "object", + "additionalProperties": true + }, + "personality": { + "title": "Personality", + "description": "List of personality types for the persona (e.g., ['Friendly and cooperative'])", + "type": "object", + "additionalProperties": true + }, + "communication_style": { + "title": "Communication style", + "description": "List of communication styles for the persona (e.g., ['Direct and concise'])", + "type": "object", + "additionalProperties": true + }, + "multilingual": { + "title": "Multilingual", + "description": "Whether the persona supports multiple languages", + "type": "boolean", + "nullable": true + }, + "languages": { + "title": "Languages", + "description": "List of languages the persona speaks (e.g., ['English', 'Hindi'])", + "type": "object", + "additionalProperties": true + }, + "accent": { + "title": "Accent", + "description": "List of accents for the persona (e.g., ['American'], ['Australian'])", + "type": "object", + "additionalProperties": true + }, + "conversation_speed": { + "title": "Conversation speed", + "description": "List of conversation speeds (e.g., ['1.0'], ['1.25'])", + "type": "object", + "additionalProperties": true + }, + "background_sound": { + "title": "Background sound", + "description": "Whether background sound is enabled (null=not specified, True/False for enabled/disabled)", + "type": "boolean", + "nullable": true + }, + "finished_speaking_sensitivity": { + "title": "Finished speaking sensitivity", + "description": "List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6'])", + "type": "object", + "additionalProperties": true + }, + "interrupt_sensitivity": { + "title": "Interrupt sensitivity", + "description": "List of sensitivities for allowing interruptions (e.g., ['5'], ['6'])", + "type": "object", + "additionalProperties": true + }, + "keywords": { + "title": "Keywords", + "description": "List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful'])", + "type": "object", + "additionalProperties": true + }, + "metadata": { + "title": "Metadata", + "description": "Additional metadata for the persona (speech clarity, base emotion, etc.)", + "type": "object", + "additionalProperties": true + }, + "additional_instruction": { + "title": "Additional instruction", + "description": "Additional instructions for how this persona should behave", + "type": "string", + "nullable": true + }, + "is_default": { + "title": "Is default", + "description": "Whether this is a default/recommended persona", + "type": "boolean", + "readOnly": true, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "profession": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "language": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "nullable": true + }, + "custom_properties": { + "title": "Custom properties", + "type": "object", + "additionalProperties": true + }, + "simulation_type": { + "title": "Simulation type", + "description": "Type of simulation for the persona", + "type": "string", + "enum": [ + "voice", + "text" + ], + "readOnly": true + }, + "punctuation": { + "title": "Punctuation", + "description": "Punctuation style for the persona", + "type": "string", + "enum": [ + "clean", + "minimal", + "expressive", + "erratic" + ], + "nullable": true + }, + "slang_usage": { + "title": "Slang usage", + "description": "Slang usage for the persona", + "type": "string", + "enum": [ + "none", + "moderate", + "heavy", + "light" + ], + "nullable": true + }, + "typos_frequency": { + "title": "Typos frequency", + "description": "Typos frequency for the persona", + "type": "string", + "enum": [ + "none", + "rare", + "occasional", + "frequent" + ], + "nullable": true + }, + "regional_mix": { + "title": "Regional mix", + "description": "Regional mix for the persona", + "type": "string", + "enum": [ + "none", + "moderate", + "heavy", + "light" + ], + "nullable": true + }, + "emoji_usage": { + "title": "Emoji usage", + "description": "Emoji usage for the persona", + "type": "string", + "enum": [ + "never", + "light", + "regular", + "heavy" + ], + "nullable": true + }, + "tone": { + "title": "Tone", + "description": "Tone for the persona", + "type": "string", + "enum": [ + "formal", + "casual", + "neutral" + ], + "nullable": true + }, + "verbosity": { + "title": "Verbosity", + "description": "Verbosity for the persona", + "type": "string", + "enum": [ + "brief", + "balanced", + "detailed" + ], + "nullable": true + } + } + }, + "PersonaDuplicateResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/Persona" + } + } + }, + "PersonaFieldOptions": { + "type": "object", + "properties": { + "gender_choices": { + "title": "Gender choices", + "type": "string", + "readOnly": true + }, + "age_group_choices": { + "title": "Age group choices", + "type": "string", + "readOnly": true + }, + "location_choices": { + "title": "Location choices", + "type": "string", + "readOnly": true + }, + "profession_choices": { + "title": "Profession choices", + "type": "string", + "readOnly": true + }, + "personality_choices": { + "title": "Personality choices", + "type": "string", + "readOnly": true + }, + "communication_style_choices": { + "title": "Communication style choices", + "type": "string", + "readOnly": true + }, + "accent_choices": { + "title": "Accent choices", + "type": "string", + "readOnly": true + }, + "language_choices": { + "title": "Language choices", + "type": "string", + "readOnly": true + }, + "conversation_speed_choices": { + "title": "Conversation speed choices", + "type": "string", + "readOnly": true + }, + "tone_choices": { + "title": "Tone choices", + "type": "string", + "readOnly": true + }, + "verbosity_choices": { + "title": "Verbosity choices", + "type": "string", + "readOnly": true + }, + "punctuation_choices": { + "title": "Punctuation choices", + "type": "string", + "readOnly": true + }, + "emoji_usage_choices": { + "title": "Emoji usage choices", + "type": "string", + "readOnly": true + }, + "slang_usage_choices": { + "title": "Slang usage choices", + "type": "string", + "readOnly": true + }, + "typos_frequency_choices": { + "title": "Typos frequency choices", + "type": "string", + "readOnly": true + }, + "regional_mix_choices": { + "title": "Regional mix choices", + "type": "string", + "readOnly": true + } + } + }, + "SimulateEvalConfigResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "config": { + "title": "Config", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "mapping": { + "title": "Mapping", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string", + "description": "Column or attribute id to filter on." + }, + "display_name": { + "type": "string", + "description": "Optional UI label for chips and saved views." + }, + "source": { + "type": "string", + "description": "Optional source surface for mixed-source filters, for example traces, datasets, or simulation." + }, + "output_type": { + "type": "string", + "description": "Optional metric output type metadata used by eval and annotation filters." + }, + "filter_config": { + "type": "object", + "properties": { + "filter_type": { + "type": "string", + "description": "Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array." + }, + "filter_op": { + "type": "string", + "description": "Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null." + }, + "filter_value": { + "description": "Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type." + }, + "col_type": { + "type": "string", + "description": "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL." + } + }, + "required": [ + "filter_type", + "filter_op" + ], + "additionalProperties": false + } + }, + "required": [ + "column_id", + "filter_config" + ], + "additionalProperties": false + }, + "readOnly": true + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "readOnly": true + }, + "model": { + "title": "Model", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "eval_group": { + "title": "Eval group", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + } + } + }, + "RunTestResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "description": "Name of the test run", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "description": { + "title": "Description", + "description": "Description of the test run", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "agent_definition": { + "title": "Agent definition", + "description": "Agent definition for this test run", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "agent_version": { + "title": "Agent version", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "agent_definition_detail": { + "title": "Agent definition detail", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "source_type": { + "title": "Source type", + "description": "Source type for the test run: agent_definition or prompt", + "type": "string", + "enum": [ + "agent_definition", + "prompt" + ], + "readOnly": true + }, + "source_type_display": { + "title": "Source type display", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "prompt_template": { + "title": "Prompt template", + "description": "Prompt template for this test run (only for prompt source type)", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "prompt_template_detail": { + "title": "Prompt template detail", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "prompt_version": { + "title": "Prompt version", + "description": "Prompt version for this test run (only for prompt source type)", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "prompt_version_detail": { + "title": "Prompt version detail", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "scenarios": { + "description": "Scenarios to run in this test", + "type": "array", + "items": { + "description": "Scenarios to run in this test", + "type": "string", + "format": "uuid" + }, + "readOnly": true, + "uniqueItems": true + }, + "scenarios_detail": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "readOnly": true + }, + "dataset_row_ids": { + "description": "IDs of dataset rows to run evaluations on", + "type": "array", + "items": { + "title": "Dataset row ids", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "readOnly": true + }, + "simulator_agent": { + "title": "Simulator agent", + "description": "Simulator agent for this test run (derived from scenarios)", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "simulator_agent_detail": { + "title": "Simulator agent detail", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "simulate_eval_configs": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "readOnly": true, + "uniqueItems": true + }, + "simulate_eval_configs_detail": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulateEvalConfigResponse" + }, + "readOnly": true + }, + "evals_detail": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulateEvalConfigResponse" + }, + "readOnly": true + }, + "organization": { + "title": "Organization", + "description": "Organization this test run belongs to", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "enable_tool_evaluation": { + "title": "Enable tool evaluation", + "description": "Enable automatic tool evaluation for this test run", + "type": "boolean", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "last_run_at": { + "title": "Last run at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "deleted": { + "title": "Deleted", + "type": "boolean", + "readOnly": true + }, + "deleted_at": { + "title": "Deleted at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + } + } + }, + "RunTestErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "TestExecution": { + "required": [ + "run_test" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "run_test": { + "title": "Run test", + "description": "The run test being executed", + "type": "string", + "format": "uuid" + }, + "run_test_name": { + "title": "Run test name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent_definition_name": { + "title": "Agent definition name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "status": { + "title": "Status", + "description": "Current status of the test execution", + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed", + "cancelled", + "cancelling", + "evaluating" + ] + }, + "error_reason": { + "title": "Error reason", + "type": "string", + "nullable": true + }, + "started_at": { + "title": "Started at", + "description": "When the test execution started", + "type": "string", + "format": "date-time" + }, + "completed_at": { + "title": "Completed at", + "description": "When the test execution completed", + "type": "string", + "format": "date-time", + "nullable": true + }, + "total_scenarios": { + "title": "Total scenarios", + "description": "Total number of scenarios in this execution", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "total_calls": { + "title": "Total calls", + "description": "Total number of calls to be made", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "completed_calls": { + "title": "Completed calls", + "description": "Number of successfully completed calls", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "failed_calls": { + "title": "Failed calls", + "description": "Number of failed calls", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648 + }, + "execution_metadata": { + "title": "Execution metadata", + "description": "Additional metadata about the execution", + "type": "object", + "additionalProperties": true + }, + "duration_seconds": { + "title": "Duration seconds", + "type": "string", + "readOnly": true + }, + "success_rate": { + "title": "Success rate", + "type": "string", + "readOnly": true + }, + "calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallExecution" + }, + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "scenario_ids": { + "title": "Scenario ids", + "description": "List of scenario IDs that were executed in this run", + "type": "object", + "additionalProperties": true + }, + "simulator_agent_name": { + "title": "Simulator agent name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "simulator_agent_id": { + "title": "Simulator agent id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "agent_definition_used_name": { + "title": "Agent definition used name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent_definition_used_id": { + "title": "Agent definition used id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "calls_attempted": { + "title": "Calls attempted", + "type": "string", + "readOnly": true + }, + "calls_connected_percentage": { + "title": "Calls connected percentage", + "type": "string", + "readOnly": true + } + } + }, + "CallExecutionDetail": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "service_provider_call_id": { + "title": "Service provider call id", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "session_id": { + "title": "Session id", + "type": "string", + "readOnly": true + }, + "timestamp": { + "title": "Timestamp", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "call_type": { + "title": "Call type", + "type": "string", + "readOnly": true + }, + "status": { + "title": "Status", + "description": "Current status of the call", + "type": "string", + "enum": [ + "pending", + "queued", + "ongoing", + "completed", + "failed", + "analyzing", + "cancelled" + ] + }, + "duration": { + "title": "Duration", + "type": "string", + "readOnly": true + }, + "duration_seconds": { + "title": "Duration seconds", + "description": "Duration of the call in seconds", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "start_time": { + "title": "Start time", + "type": "string", + "readOnly": true + }, + "transcript": { + "title": "Transcript", + "type": "string", + "readOnly": true + }, + "scenario": { + "title": "Scenario", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "overall_score": { + "title": "Overall score", + "type": "string", + "readOnly": true + }, + "response_time": { + "title": "Response time", + "type": "string", + "readOnly": true + }, + "response_time_ms": { + "title": "Response time ms", + "description": "Average response time in milliseconds", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "audio_url": { + "title": "Audio url", + "type": "string", + "format": "uri", + "readOnly": true, + "minLength": 1 + }, + "customer_name": { + "title": "Customer name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "eval_outputs": { + "title": "Eval outputs", + "type": "string", + "readOnly": true + }, + "eval_metrics": { + "title": "Eval metrics", + "type": "string", + "readOnly": true + }, + "scenario_columns": { + "title": "Scenario columns", + "type": "string", + "readOnly": true + }, + "ended_reason": { + "title": "Ended reason", + "description": "Reason why the call ended", + "type": "string", + "maxLength": 10000, + "nullable": true + }, + "simulator_agent_name": { + "title": "Simulator agent name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "simulator_agent_id": { + "title": "Simulator agent id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "agent_definition_used_name": { + "title": "Agent definition used name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent_definition_used_id": { + "title": "Agent definition used id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "call_summary": { + "title": "Call summary", + "description": "Call summary from the service", + "type": "string", + "nullable": true + }, + "recordings": { + "title": "Recordings", + "type": "string", + "readOnly": true + }, + "scenario_id": { + "title": "Scenario id", + "type": "string", + "readOnly": true + }, + "avg_agent_latency": { + "title": "Avg agent latency", + "type": "integer", + "readOnly": true + }, + "avg_agent_latency_ms": { + "title": "Avg agent latency ms", + "description": "Average agent latency in milliseconds (time taken by agent to respond after user's pause)", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "user_interruption_count": { + "title": "User interruption count", + "description": "Number of times user interrupted the AI", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "user_interruption_rate": { + "title": "User interruption rate", + "description": "Rate of user interruptions (interruptions per minute)", + "type": "number", + "nullable": true + }, + "user_wpm": { + "title": "User wpm", + "description": "User's words per minute", + "type": "number", + "nullable": true + }, + "bot_wpm": { + "title": "Bot wpm", + "description": "Bot's words per minute", + "type": "number", + "nullable": true + }, + "talk_ratio": { + "title": "Talk ratio", + "description": "Ratio of bot speaking time to user speaking time", + "type": "number", + "nullable": true + }, + "ai_interruption_count": { + "title": "Ai interruption count", + "description": "Number of times AI interrupted the user", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "ai_interruption_rate": { + "title": "Ai interruption rate", + "description": "Rate of AI interruptions (interruptions per minute)", + "type": "number", + "nullable": true + }, + "avg_stop_time_after_interruption": { + "title": "Avg stop time after interruption", + "type": "integer", + "readOnly": true + }, + "total_tokens": { + "title": "Total tokens", + "type": "string", + "readOnly": true + }, + "input_tokens": { + "title": "Input tokens", + "type": "string", + "readOnly": true + }, + "output_tokens": { + "title": "Output tokens", + "type": "string", + "readOnly": true + }, + "avg_latency_ms": { + "title": "Avg latency ms", + "type": "string", + "readOnly": true + }, + "turn_count": { + "title": "Turn count", + "type": "string", + "readOnly": true + }, + "agent_talk_percentage": { + "title": "Agent talk percentage", + "type": "string", + "readOnly": true + }, + "csat_score": { + "title": "Csat score", + "type": "string", + "readOnly": true + }, + "processing_skipped": { + "title": "Processing skipped", + "type": "string", + "readOnly": true + }, + "processing_skip_reason": { + "title": "Processing skip reason", + "type": "string", + "readOnly": true + }, + "rerun_snapshots": { + "title": "Rerun snapshots", + "type": "string", + "readOnly": true + }, + "is_snapshot": { + "title": "Is snapshot", + "type": "string", + "readOnly": true + }, + "snapshot_timestamp": { + "title": "Snapshot timestamp", + "type": "string", + "readOnly": true + }, + "rerun_type": { + "title": "Rerun type", + "type": "string", + "readOnly": true + }, + "original_call_execution_id": { + "title": "Original call execution id", + "type": "string", + "readOnly": true + }, + "tool_outputs": { + "title": "Tool outputs", + "description": "Tool evaluation output - separate from standard evaluations", + "type": "object", + "additionalProperties": true + }, + "cost_cents": { + "title": "Cost cents", + "description": "Cost of the call in cents", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "customer_cost_cents": { + "title": "Customer cost cents", + "description": "Total customer-reported cost in cents", + "type": "integer", + "maximum": 2147483647, + "minimum": -2147483648, + "nullable": true + }, + "customer_cost_breakdown": { + "title": "Customer cost breakdown", + "description": "Detailed cost breakdown from customer call data", + "type": "object", + "additionalProperties": true + }, + "customer_latency_metrics": { + "title": "Customer latency metrics", + "description": "Latency metrics from customer call data", + "type": "object", + "additionalProperties": true + }, + "customer_call_id": { + "title": "Customer call id", + "description": "Customer call ID if available", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "simulation_call_type": { + "title": "Simulation call type", + "description": "Type of simulation call", + "type": "string", + "enum": [ + "voice", + "text" + ] + }, + "provider": { + "title": "Provider", + "type": "string", + "readOnly": true + }, + "phone_number": { + "title": "Phone number", + "description": "Phone number called (null for TEXT/chat simulations)", + "type": "string", + "maxLength": 20, + "nullable": true + } + } + }, + "CallExecutionStatusUpdate": { + "required": [ + "status" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "string", + "enum": [ + "pending", + "queued", + "ongoing", + "completed", + "failed", + "analyzing", + "cancelled" + ] + }, + "ended_reason": { + "title": "Ended reason", + "type": "string", + "nullable": true + } + } + }, + "CallBranchAnalysisResponse": { + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "scenario_id": { + "title": "Scenario id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "scenario_name": { + "title": "Scenario name", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "analysis": { + "title": "Analysis", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "analyzed_at": { + "title": "Analyzed at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "CallBranchDeviationCreateResponse": { + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "scenario_graph_id": { + "title": "Scenario graph id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "deviation_data": { + "title": "Deviation data", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "ChatToolCallFunction": { + "required": [ + "name", + "arguments" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "arguments": { + "title": "Arguments", + "type": "string", + "minLength": 1 + } + } + }, + "ChatToolCall": { + "required": [ + "id", + "type", + "function" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "minLength": 1 + }, + "function": { + "$ref": "#/components/schemas/ChatToolCallFunction" + } + } + }, + "ChatMessageContract": { + "required": [ + "role" + ], + "type": "object", + "properties": { + "role": { + "title": "Role", + "type": "string", + "enum": [ + "user", + "assistant", + "tool" + ] + }, + "content": { + "title": "Content", + "type": "string", + "nullable": true + }, + "tool_call_id": { + "title": "Tool call id", + "type": "string", + "nullable": true + }, + "name": { + "title": "Name", + "type": "string", + "nullable": true + }, + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatToolCall" + }, + "nullable": true + } + } + }, + "SendChatRequest": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageContract" + }, + "nullable": true + }, + "metrics": { + "title": "Metrics", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "initiate_chat": { + "title": "Initiate chat", + "type": "boolean", + "default": false + } + } + }, + "ChatSendMessageResult": { + "required": [ + "message_history" + ], + "type": "object", + "properties": { + "input_message": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageContract" + }, + "nullable": true + }, + "output_message": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageContract" + }, + "nullable": true + }, + "message_history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatMessageContract" + } + }, + "chat_ended": { + "title": "Chat ended", + "type": "boolean", + "default": false + } + } + }, + "ChatSendMessageResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/ChatSendMessageResult" + } + } + }, + "CallExecutionDeleteResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "ErrorLocalizerTaskResponse": { + "type": "object", + "properties": { + "task_id": { + "title": "Task id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "eval_config_id": { + "title": "Eval config id", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true + }, + "eval_result": { + "title": "Eval result", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "eval_explanation": { + "title": "Eval explanation", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "input_data": { + "title": "Input data", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "input_keys": { + "title": "Input keys", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "input_types": { + "title": "Input types", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "rule_prompt": { + "title": "Rule prompt", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "error_analysis": { + "title": "Error analysis", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "selected_input_key": { + "title": "Selected input key", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "error_message": { + "title": "Error message", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "eval_template_name": { + "title": "Eval template name", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "eval_template_id": { + "title": "Eval template id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + } + } + }, + "CallExecutionErrorLocalizerTasksResponse": { + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "error_localizer_tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorLocalizerTaskResponse" + }, + "readOnly": true + }, + "total_tasks": { + "title": "Total tasks", + "type": "integer", + "readOnly": true + } + } + }, + "CallLogEntryResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "logged_at": { + "title": "Logged at", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "level": { + "title": "Level", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "severity_text": { + "title": "Severity text", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "category": { + "title": "Category", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "body": { + "title": "Body", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "attributes": { + "title": "Attributes", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "payload": { + "title": "Payload", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + } + } + }, + "CallExecutionLogsResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallLogEntryResponse" + }, + "readOnly": true + }, + "source": { + "title": "Source", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "ingestion_pending": { + "title": "Ingestion pending", + "type": "boolean", + "readOnly": true + } + } + }, + "SessionComparisonResult": { + "type": "object", + "properties": { + "comparison_metrics": { + "title": "Comparison metrics", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "comparison_transcripts": { + "title": "Comparison transcripts", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "comparison_recordings": { + "title": "Comparison recordings", + "type": "object", + "readOnly": true, + "additionalProperties": true + } + } + }, + "SessionComparisonResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/SessionComparisonResult" + } + } + }, + "CallTranscript": { + "required": [ + "content" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "speaker_role": { + "title": "Speaker role", + "description": "Role of the speaker (user or assistant)", + "type": "string", + "enum": [ + "user", + "assistant", + "system", + "tool_calls", + "tool_call_result", + "unknown" + ] + }, + "content": { + "title": "Content", + "description": "Transcript content", + "type": "string", + "minLength": 1 + }, + "start_time_ms": { + "title": "Start time ms", + "description": "Start time of this transcript segment in milliseconds", + "type": "integer", + "maximum": 9223372036854776000, + "minimum": -9223372036854776000 + }, + "start_time_seconds": { + "title": "Start time seconds", + "type": "string", + "readOnly": true + }, + "end_time_ms": { + "title": "End time ms", + "description": "End time of this transcript segment in milliseconds", + "type": "integer", + "maximum": 9223372036854776000, + "minimum": -9223372036854776000 + }, + "end_time_seconds": { + "title": "End time seconds", + "type": "string", + "readOnly": true + }, + "confidence_score": { + "title": "Confidence score", + "description": "Confidence score for this transcript segment", + "type": "number" + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "CallTranscriptResponse": { + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "phone_number": { + "title": "Phone number", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "transcripts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallTranscript" + }, + "readOnly": true + }, + "total_transcripts": { + "title": "Total transcripts", + "type": "integer", + "readOnly": true + } + } + }, + "PromptSimulationScenarioItem": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "readOnly": true + }, + "scenario_type": { + "title": "Scenario type", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "PromptSimulationScenariosResult": { + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer", + "readOnly": true + }, + "page": { + "title": "Page", + "type": "integer", + "readOnly": true + }, + "limit": { + "title": "Limit", + "type": "integer", + "readOnly": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PromptSimulationScenarioItem" + }, + "readOnly": true + } + } + }, + "PromptSimulationScenariosResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/PromptSimulationScenariosResult" + } + } + }, + "PromptSimulationTemplateSummary": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "PromptSimulationListResult": { + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer", + "readOnly": true + }, + "page": { + "title": "Page", + "type": "integer", + "readOnly": true + }, + "limit": { + "title": "Limit", + "type": "integer", + "readOnly": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunTestResponse" + }, + "readOnly": true + }, + "prompt_template": { + "$ref": "#/components/schemas/PromptSimulationTemplateSummary" + } + } + }, + "PromptSimulationListResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/PromptSimulationListResult" + } + } + }, + "EvalConfigDefinition": { + "required": [ + "template_id" + ], + "type": "object", + "properties": { + "template_id": { + "title": "Template id", + "description": "UUID of the evaluation template to use.", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "description": "Name for this evaluation configuration. Defaults to 'Eval-' if omitted.", + "type": "string" + }, + "config": { + "title": "Config", + "description": "Template-specific configuration parameters.", + "type": "object", + "additionalProperties": true + }, + "mapping": { + "title": "Mapping", + "description": "Maps test execution data fields to the evaluation template's expected inputs.", + "type": "object", + "additionalProperties": true + }, + "filters": { + "description": "Canonical filter list to restrict which test results are evaluated.", + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string", + "description": "Column or attribute id to filter on." + }, + "display_name": { + "type": "string", + "description": "Optional UI label for chips and saved views." + }, + "source": { + "type": "string", + "description": "Optional source surface for mixed-source filters, for example traces, datasets, or simulation." + }, + "output_type": { + "type": "string", + "description": "Optional metric output type metadata used by eval and annotation filters." + }, + "filter_config": { + "type": "object", + "properties": { + "filter_type": { + "type": "string", + "description": "Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array." + }, + "filter_op": { + "type": "string", + "description": "Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null." + }, + "filter_value": { + "description": "Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type." + }, + "col_type": { + "type": "string", + "description": "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL." + } + }, + "required": [ + "filter_type", + "filter_op" + ], + "additionalProperties": false + } + }, + "required": [ + "column_id", + "filter_config" + ], + "additionalProperties": false + } + }, + "error_localizer": { + "title": "Error localizer", + "description": "Enables granular error localization on evaluation failures.", + "type": "boolean", + "default": false + }, + "model": { + "title": "Model", + "description": "Model to use for running this evaluation.", + "type": "string", + "minLength": 1, + "nullable": true + }, + "kb_id": { + "title": "Kb id", + "description": "Knowledge base file to use for this evaluation.", + "type": "string", + "format": "uuid", + "nullable": true + }, + "eval_group": { + "title": "Eval group", + "description": "Eval group that created this evaluation config.", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "CreatePromptSimulationRequest": { + "required": [ + "name", + "prompt_version_id", + "scenario_ids" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "prompt_version_id": { + "title": "Prompt version id", + "description": "Prompt version ID (UUID) or template_version string", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "dataset_row_ids": { + "type": "array", + "items": { + "type": "string", + "maxLength": 255, + "minLength": 1 + } + }, + "evaluations_config": { + "description": "Evaluation configurations to create", + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalConfigDefinition" + } + }, + "enable_tool_evaluation": { + "title": "Enable tool evaluation", + "description": "Enable automatic tool evaluation for this simulation run", + "type": "boolean", + "default": false + } + } + }, + "PromptSimulationRunResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/RunTestResponse" + } + } + }, + "PromptSimulationUpdateRequest": { + "type": "object", + "properties": { + "prompt_version_id": { + "title": "Prompt version id", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "enable_tool_evaluation": { + "title": "Enable tool evaluation", + "type": "boolean" + } + } + }, + "ExecutePromptSimulationRequest": { + "type": "object", + "properties": { + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "select_all": { + "title": "Select all", + "type": "boolean", + "default": false + } + } + }, + "ExecutePromptSimulationResult": { + "required": [ + "scenario_ids" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "total_scenarios": { + "title": "Total scenarios", + "type": "integer", + "readOnly": true + }, + "total_calls": { + "title": "Total calls", + "type": "integer", + "readOnly": true + }, + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "ExecutePromptSimulationResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/ExecutePromptSimulationResult" + } + } + }, + "AllActiveTests": { + "required": [ + "active_tests", + "total_active" + ], + "type": "object", + "properties": { + "active_tests": { + "title": "Active tests", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "total_active": { + "title": "Total active", + "type": "integer" + } + } + }, + "CreateRunTest": { + "required": [ + "name", + "agent_definition_id", + "scenario_ids" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "agent_definition_id": { + "title": "Agent definition id", + "type": "string", + "format": "uuid" + }, + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "dataset_row_ids": { + "type": "array", + "items": { + "type": "string", + "maxLength": 255, + "minLength": 1 + } + }, + "eval_config_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "evaluations_config": { + "description": "Evaluation configurations to create", + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalConfigDefinition" + } + }, + "enable_tool_evaluation": { + "title": "Enable tool evaluation", + "description": "Enable automatic tool evaluation for this test run", + "type": "boolean", + "default": false + }, + "replay_session_id": { + "title": "Replay session id", + "description": "Optional replay session ID to mark as completed after run test creation", + "type": "string", + "format": "uuid", + "nullable": true + }, + "agent_version": { + "title": "Agent version", + "description": "Optional agent version to bind to this test run", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "RunTestNameResult": { + "required": [ + "run_test_id", + "run_test_name" + ], + "type": "object", + "properties": { + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid" + }, + "run_test_name": { + "title": "Run test name", + "type": "string", + "minLength": 1 + } + } + }, + "RunTestNameResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/RunTestNameResult" + } + } + }, + "UpdateRunTest": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "agent_definition_id": { + "title": "Agent definition id", + "type": "string", + "format": "uuid" + }, + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "dataset_row_ids": { + "type": "array", + "items": { + "type": "string", + "maxLength": 255, + "minLength": 1 + } + }, + "eval_config_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "RunTestMessageResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "RunTestAnalytics": { + "required": [ + "run_test_info", + "fail_rate_trends", + "evaluation_score_trends", + "performance_comparison" + ], + "type": "object", + "properties": { + "run_test_info": { + "title": "Run test info", + "description": "Run test metadata", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "fail_rate_trends": { + "description": "Fail-rate trend points", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "evaluation_score_trends": { + "description": "Evaluation score trend points", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "performance_comparison": { + "description": "Per-execution performance rows", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "summary_stats": { + "title": "Summary stats", + "description": "Aggregate performance summary", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + }, + "RunTestCallExecutionsResponse": { + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer", + "readOnly": true + }, + "next": { + "title": "Next", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "previous": { + "title": "Previous", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "readOnly": true + }, + "total_pages": { + "title": "Total pages", + "type": "integer", + "readOnly": true + }, + "current_page": { + "title": "Current page", + "type": "integer", + "readOnly": true + } + } + }, + "RunTestChatExecutionResult": { + "required": [ + "message", + "execution_id", + "run_test_id", + "status", + "total_scenarios" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid" + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "total_scenarios": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "RunTestChatExecutionResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/RunTestChatExecutionResult" + } + } + }, + "RunTestComponentsUpdate": { + "type": "object", + "properties": { + "agent_definition_id": { + "title": "Agent definition id", + "type": "string", + "format": "uuid" + }, + "version": { + "title": "Version", + "type": "string", + "format": "uuid" + }, + "simulator_agent_id": { + "title": "Simulator agent id", + "type": "string", + "format": "uuid" + }, + "scenarios": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "enable_tool_evaluation": { + "title": "Enable tool evaluation", + "type": "boolean" + } + } + }, + "TestExecutionBulkDelete": { + "type": "object", + "properties": { + "test_execution_ids": { + "description": "List of specific test execution IDs to delete", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "select_all": { + "title": "Select all", + "description": "Whether to delete all test executions in the run test", + "type": "boolean", + "default": false + } + } + }, + "TestExecutionBulkDeleteResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "deleted_count": { + "title": "Deleted count", + "type": "integer", + "readOnly": true + }, + "deleted_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "readOnly": true + } + } + }, + "AddEvalConfigsRequest": { + "required": [ + "evaluations_config" + ], + "type": "object", + "properties": { + "evaluations_config": { + "description": "Array of evaluation configuration objects to add. At least one required.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalConfigDefinition" + }, + "minItems": 1 + } + } + }, + "EvalConfigResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": true + }, + "mapping": { + "title": "Mapping", + "type": "object", + "additionalProperties": true + }, + "filters": { + "title": "Filters", + "type": "object", + "additionalProperties": true + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean" + }, + "model": { + "title": "Model", + "type": "string", + "enum": [ + "turing_large", + "turing_small", + "protect", + "protect_flash", + "turing_flash" + ], + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "NotStarted", + "Queued", + "Running", + "Completed", + "Editing", + "Inactive", + "Failed", + "PartialRun", + "ExperimentEvaluation", + "Uploading", + "PartialExtracted", + "Processing", + "Deleting", + "PartialCompleted", + "OptimizationEvaluation", + "Error", + "Cancelled" + ] + }, + "eval_group": { + "title": "Eval group", + "type": "string", + "readOnly": true + }, + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid", + "readOnly": true + } + } + }, + "AddEvalConfigsResponse": { + "required": [ + "message", + "created_eval_configs", + "run_test_id" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "created_eval_configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalConfigResponse" + } + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid" + }, + "warnings": { + "description": "Non-fatal issues encountered while processing individual configs.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "DeleteEvalConfigResponse": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "EvalConfigStructure": { + "required": [ + "required_keys", + "optional_keys", + "variable_keys" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "template_id": { + "title": "Template id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "reason_column": { + "title": "Reason column", + "type": "boolean", + "readOnly": true + }, + "eval_tags": { + "title": "Eval tags", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "description": { + "title": "Description", + "type": "string", + "readOnly": true + }, + "required_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "optional_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "variable_keys": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "run_prompt_column": { + "title": "Run prompt column", + "type": "boolean", + "readOnly": true + }, + "template_name": { + "title": "Template name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "mapping": { + "title": "Mapping", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "config": { + "title": "Config", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "params": { + "title": "Params", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "function_params_schema": { + "title": "Function params schema", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "models": { + "title": "Models", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "selected_model": { + "title": "Selected model", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "error_localizer": { + "title": "Error localizer", + "type": "boolean", + "readOnly": true + }, + "kb_id": { + "title": "Kb id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "output": { + "title": "Output", + "type": "object", + "readOnly": true, + "additionalProperties": true + }, + "config_params_desc": { + "title": "Config params desc", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "config_params_option": { + "title": "Config params option", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "api_key_available": { + "title": "Api key available", + "type": "boolean", + "readOnly": true + } + } + }, + "EvalConfigStructureResult": { + "required": [ + "eval" + ], + "type": "object", + "properties": { + "eval": { + "$ref": "#/components/schemas/EvalConfigStructure" + } + } + }, + "EvalConfigStructureResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/EvalConfigStructureResult" + } + } + }, + "EvalConfigUpdateRequest": { + "type": "object", + "properties": { + "config": { + "title": "Config", + "description": "Updated evaluation configuration parameters.", + "type": "object", + "additionalProperties": true + }, + "mapping": { + "title": "Mapping", + "description": "Updated field mapping between test data and evaluation inputs.", + "type": "object", + "additionalProperties": true + }, + "model": { + "title": "Model", + "description": "Model to use for evaluations.", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error_localizer": { + "title": "Error localizer", + "description": "Enable granular error localization in evaluation results.", + "type": "boolean" + }, + "kb_id": { + "title": "Kb id", + "description": "UUID of a knowledge base to use for grounding. Pass null to clear.", + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "title": "Name", + "description": "Updated name for the evaluation configuration.", + "type": "string", + "minLength": 1 + }, + "run": { + "title": "Run", + "description": "When true, triggers an immediate rerun after updating. Defaults to false.", + "type": "boolean", + "default": false + }, + "test_execution_id": { + "title": "Test execution id", + "description": "UUID of the test execution to rerun against. Required when run is true.", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "EvalConfigUpdateResponse": { + "required": [ + "message", + "eval_config_id", + "run_test_id" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "eval_config_id": { + "title": "Eval config id", + "type": "string", + "format": "uuid" + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid" + }, + "test_execution_id": { + "title": "Test execution id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "call_execution_count": { + "title": "Call execution count", + "type": "integer", + "nullable": true + }, + "note": { + "title": "Note", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "EvalSummaryComparisonResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "title": "Result", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTemplateSummary" + } + } + } + } + }, + "ExecuteRunTest": { + "type": "object", + "properties": { + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "simulator_id": { + "title": "Simulator id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "select_all": { + "title": "Select all", + "type": "boolean", + "default": false + } + } + }, + "RunTestExecutionResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "execution_id": { + "title": "Execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "total_scenarios": { + "title": "Total scenarios", + "type": "integer", + "readOnly": true + }, + "total_calls": { + "title": "Total calls", + "type": "integer", + "readOnly": true + }, + "scenario_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "readOnly": true + } + } + }, + "TestExecutionItemResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "scenarios": { + "title": "Scenarios", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "start_time": { + "title": "Start time", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "duration": { + "title": "Duration", + "type": "integer", + "readOnly": true + }, + "error_reason": { + "title": "Error reason", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "success_rate": { + "title": "Success rate", + "type": "number", + "readOnly": true + }, + "avg_response_time": { + "title": "Avg response time", + "type": "number", + "readOnly": true + }, + "calls": { + "title": "Calls", + "type": "integer", + "readOnly": true + }, + "calls_attempted": { + "title": "Calls attempted", + "type": "integer", + "readOnly": true + }, + "connected_calls": { + "title": "Connected calls", + "type": "integer", + "readOnly": true + }, + "agent_version": { + "title": "Agent version", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent_definition": { + "title": "Agent definition", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "calls_connected_percentage": { + "title": "Calls connected percentage", + "type": "number", + "readOnly": true + }, + "total_chats": { + "title": "Total chats", + "type": "integer", + "readOnly": true + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "total_number_of_fagi_agent_turns": { + "title": "Total number of fagi agent turns", + "type": "integer", + "readOnly": true + }, + "source_type": { + "title": "Source type", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "TestExecutionRerun": { + "required": [ + "rerun_type" + ], + "type": "object", + "properties": { + "rerun_type": { + "title": "Rerun type", + "description": "Type of rerun: evaluation only or call plus evaluation", + "type": "string", + "enum": [ + "eval_only", + "call_and_eval" + ] + }, + "test_execution_ids": { + "description": "List of specific test execution IDs to rerun", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "select_all": { + "title": "Select all", + "description": "Whether to rerun all test executions in the run test", + "type": "boolean", + "default": false + } + } + }, + "TestExecutionRerunResult": { + "type": "object", + "properties": { + "test_execution_id": { + "title": "Test execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "success_count": { + "title": "Success count", + "type": "integer", + "readOnly": true + }, + "failure_count": { + "title": "Failure count", + "type": "integer", + "readOnly": true + }, + "successful_reruns": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "readOnly": true + }, + "failed_reruns": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "readOnly": true + }, + "skipped": { + "title": "Skipped", + "type": "boolean", + "readOnly": true + }, + "reason": { + "title": "Reason", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "TestExecutionRerunResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "rerun_type": { + "title": "Rerun type", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "total_test_executions": { + "title": "Total test executions", + "type": "integer", + "readOnly": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TestExecutionRerunResult" + }, + "readOnly": true + }, + "overall_success_count": { + "title": "Overall success count", + "type": "integer", + "readOnly": true + }, + "overall_failure_count": { + "title": "Overall failure count", + "type": "integer", + "readOnly": true + } + } + }, + "RunNewEvalsOnTestExecution": { + "required": [ + "eval_config_ids" + ], + "type": "object", + "properties": { + "test_execution_ids": { + "description": "List of specific test execution IDs to run evaluations on", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "select_all": { + "title": "Select all", + "description": "Whether to run evaluations on all test executions in the run test", + "type": "boolean", + "default": false + }, + "eval_config_ids": { + "description": "List of SimulateEvalConfig IDs to run on the test executions", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "enable_tool_evaluation": { + "title": "Enable tool evaluation", + "description": "Whether to enable tool evaluation for this run (if not provided, uses the run test's current setting)", + "type": "boolean" + } + } + }, + "RunNewEvalsResponse": { + "required": [ + "message", + "run_test_id", + "call_execution_count" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid" + }, + "call_execution_count": { + "title": "Call execution count", + "type": "integer" + } + } + }, + "RunTestScenarioItemResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "row_count": { + "title": "Row count", + "type": "integer", + "readOnly": true + } + } + }, + "ChatSDKCodeResult": { + "required": [ + "installation_guide", + "sdk_code", + "run_test_id", + "run_test_name" + ], + "type": "object", + "properties": { + "installation_guide": { + "title": "Installation guide", + "type": "string", + "minLength": 1 + }, + "sdk_code": { + "title": "Sdk code", + "type": "string", + "minLength": 1 + }, + "run_test_id": { + "title": "Run test id", + "type": "string", + "format": "uuid" + }, + "run_test_name": { + "title": "Run test name", + "type": "string", + "minLength": 1 + } + } + }, + "ChatSDKCodeResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/ChatSDKCodeResult" + } + } + }, + "ScenarioResponse": { + "required": [ + "name", + "source" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "description": "Name of the scenario", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "description": "Optional description of the scenario", + "type": "string", + "nullable": true + }, + "source": { + "title": "Source", + "description": "Source content or reference for the scenario", + "type": "string", + "minLength": 1 + }, + "scenario_type": { + "title": "Scenario type", + "description": "Type of scenario (graph, script, or dataset)", + "type": "string", + "enum": [ + "graph", + "script", + "dataset" + ] + }, + "scenario_type_display": { + "title": "Scenario type display", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "source_type": { + "title": "Source type", + "description": "Source type for the scenario: agent_definition or prompt", + "type": "string", + "enum": [ + "agent_definition", + "prompt" + ] + }, + "source_type_display": { + "title": "Source type display", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "organization": { + "title": "Organization", + "description": "Organization this scenario belongs to", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "dataset": { + "title": "Dataset", + "description": "Dataset associated with this scenario (only for dataset type scenarios)", + "type": "string", + "format": "uuid", + "nullable": true + }, + "dataset_rows": { + "title": "Dataset rows", + "type": "string", + "readOnly": true + }, + "dataset_column_config": { + "title": "Dataset column config", + "type": "string", + "readOnly": true + }, + "graph": { + "title": "Graph", + "type": "string", + "readOnly": true + }, + "agent": { + "title": "Agent", + "type": "string", + "readOnly": true + }, + "prompt_template": { + "title": "Prompt template", + "description": "Prompt template associated with this scenario (only for prompt source type)", + "type": "string", + "format": "uuid", + "nullable": true + }, + "prompt_template_detail": { + "title": "Prompt template detail", + "type": "string", + "readOnly": true + }, + "prompt_version": { + "title": "Prompt version", + "description": "Prompt version associated with this scenario (only for prompt source type)", + "type": "string", + "format": "uuid", + "nullable": true + }, + "prompt_version_detail": { + "title": "Prompt version detail", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "deleted": { + "title": "Deleted", + "type": "boolean", + "readOnly": true + }, + "status": { + "title": "Status", + "description": "Status of the scenario", + "type": "string", + "enum": [ + "NotStarted", + "Queued", + "Running", + "Completed", + "Editing", + "Inactive", + "Failed", + "PartialRun", + "ExperimentEvaluation", + "Uploading", + "PartialExtracted", + "Processing", + "Deleting", + "PartialCompleted", + "OptimizationEvaluation", + "Error", + "Cancelled" + ] + }, + "deleted_at": { + "title": "Deleted at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "readOnly": true + } + } + }, + "ScenarioListResponse": { + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer", + "readOnly": true + }, + "next": { + "title": "Next", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "previous": { + "title": "Previous", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScenarioResponse" + }, + "readOnly": true + } + } + }, + "ScenarioErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1, + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1, + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "ColumnDefinition": { + "required": [ + "name", + "data_type", + "description" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "data_type": { + "title": "Data type", + "type": "string", + "enum": [ + "text", + "boolean", + "integer", + "float", + "json", + "array", + "image", + "images", + "datetime", + "audio", + "document", + "others", + "persona" + ] + }, + "description": { + "title": "Description", + "type": "string", + "maxLength": 200, + "minLength": 1 + } + } + }, + "ScenarioCreateRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid" + }, + "kind": { + "title": "Kind", + "type": "string", + "enum": [ + "graph", + "script", + "dataset" + ], + "default": "dataset" + }, + "script_url": { + "title": "Script url", + "type": "string", + "format": "uri", + "minLength": 1, + "nullable": true + }, + "agent_definition_id": { + "title": "Agent definition id", + "type": "string", + "format": "uuid" + }, + "agent_definition_version_id": { + "title": "Agent definition version id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "custom_instruction": { + "title": "Custom instruction", + "type": "string" + }, + "no_of_rows": { + "title": "No of rows", + "type": "integer", + "default": 20, + "maximum": 20000, + "minimum": 10 + }, + "generate_graph": { + "title": "Generate graph", + "type": "boolean", + "default": false + }, + "graph": { + "title": "Graph", + "type": "object", + "additionalProperties": true + }, + "source_type": { + "title": "Source type", + "type": "string", + "enum": [ + "agent_definition", + "prompt" + ], + "default": "agent_definition" + }, + "prompt_template_id": { + "title": "Prompt template id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "prompt_version_id": { + "title": "Prompt version id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "add_persona_automatically": { + "title": "Add persona automatically", + "type": "boolean", + "default": false + }, + "personas": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "custom_columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnDefinition" + }, + "maxItems": 10 + }, + "agent_name": { + "title": "Agent name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "agent_prompt": { + "title": "Agent prompt", + "type": "string" + }, + "voice_provider": { + "title": "Voice provider", + "type": "string", + "default": "elevenlabs", + "maxLength": 100, + "minLength": 1 + }, + "voice_name": { + "title": "Voice name", + "type": "string", + "default": "marissa", + "maxLength": 100, + "minLength": 1 + }, + "model": { + "title": "Model", + "type": "string", + "default": "gpt-4", + "maxLength": 100, + "minLength": 1 + }, + "llm_temperature": { + "title": "Llm temperature", + "type": "number", + "default": 0.7 + }, + "initial_message": { + "title": "Initial message", + "type": "string" + }, + "max_call_duration_in_minutes": { + "title": "Max call duration in minutes", + "type": "integer", + "default": 30 + }, + "interrupt_sensitivity": { + "title": "Interrupt sensitivity", + "type": "number", + "default": 0.5 + }, + "conversation_speed": { + "title": "Conversation speed", + "type": "number", + "default": 1 + }, + "finished_speaking_sensitivity": { + "title": "Finished speaking sensitivity", + "type": "number", + "default": 0.5 + }, + "initial_message_delay": { + "title": "Initial message delay", + "type": "integer", + "default": 0 + } + } + }, + "ScenarioCreateResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "scenario": { + "$ref": "#/components/schemas/ScenarioResponse" + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "processing" + ], + "readOnly": true + } + } + }, + "ScenarioPromptItem": { + "type": "object", + "properties": { + "role": { + "title": "Role", + "type": "string", + "enum": [ + "system", + "user", + "assistant" + ], + "readOnly": true + }, + "content": { + "title": "Content", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "ScenarioDetailResponse": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "source": { + "title": "Source", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "scenario_type": { + "title": "Scenario type", + "type": "string", + "enum": [ + "graph", + "script", + "dataset" + ], + "readOnly": true + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "dataset": { + "title": "Dataset", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "deleted": { + "title": "Deleted", + "type": "boolean", + "readOnly": true + }, + "deleted_at": { + "title": "Deleted at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "NotStarted", + "Queued", + "Running", + "Completed", + "Editing", + "Inactive", + "Failed", + "PartialRun", + "ExperimentEvaluation", + "Uploading", + "PartialExtracted", + "Processing", + "Deleting", + "PartialCompleted", + "OptimizationEvaluation", + "Error", + "Cancelled" + ], + "readOnly": true + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "graph": { + "title": "Graph", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "readOnly": true + }, + "prompts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScenarioPromptItem" + }, + "readOnly": true + }, + "dataset_rows": { + "title": "Dataset rows", + "type": "integer", + "readOnly": true + } + } + }, + "ScenarioAddColumnsRequest": { + "required": [ + "columns" + ], + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnDefinition" + } + } + } + }, + "ScenarioAddColumnsResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "scenario_id": { + "title": "Scenario id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "columns": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "readOnly": true + } + } + }, + "ScenarioAddRowsRequest": { + "required": [ + "num_rows" + ], + "type": "object", + "properties": { + "num_rows": { + "title": "Num rows", + "type": "integer", + "maximum": 20000, + "minimum": 10 + }, + "description": { + "title": "Description", + "type": "string" + } + } + }, + "ScenarioAddRowsResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "scenario_id": { + "title": "Scenario id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "dataset_id": { + "title": "Dataset id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "num_rows": { + "title": "Num rows", + "type": "integer", + "readOnly": true + } + } + }, + "ScenarioDeleteResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "ScenarioEditRequest": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "maxLength": 255 + }, + "description": { + "title": "Description", + "type": "string" + }, + "graph": { + "title": "Graph", + "type": "object", + "additionalProperties": true + }, + "prompt": { + "title": "Prompt", + "type": "string" + } + } + }, + "ScenarioEditResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "scenario": { + "$ref": "#/components/schemas/ScenarioResponse" + } + } + }, + "ScenarioEditPromptsRequest": { + "required": [ + "prompts" + ], + "type": "object", + "properties": { + "prompts": { + "title": "Prompts", + "type": "string", + "maxLength": 10000, + "minLength": 1 + } + } + }, + "ScenarioPromptsUpdateResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "prompts": { + "title": "Prompts", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "SimulatorAgent": { + "required": [ + "name", + "prompt", + "voice_provider", + "voice_name", + "model" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "title": "Name", + "description": "Name of the simulator agent", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "prompt": { + "title": "Prompt", + "description": "System prompt for the agent", + "type": "string", + "minLength": 1 + }, + "voice_provider": { + "title": "Voice provider", + "description": "Voice service provider", + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "voice_name": { + "title": "Voice name", + "description": "Specific voice to use", + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "interrupt_sensitivity": { + "title": "Interrupt sensitivity", + "description": "Sensitivity for interruption detection (0-1)", + "type": "number", + "maximum": 11, + "minimum": 0 + }, + "conversation_speed": { + "title": "Conversation speed", + "description": "Speed of conversation (0.1-3.0)", + "type": "number", + "maximum": 2, + "minimum": 0.1 + }, + "finished_speaking_sensitivity": { + "title": "Finished speaking sensitivity", + "description": "Sensitivity for detecting when speaker has finished (0-1)", + "type": "number", + "maximum": 11, + "minimum": 0 + }, + "model": { + "title": "Model", + "description": "LLM model to use", + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "llm_temperature": { + "title": "Llm temperature", + "description": "Temperature setting for LLM (0-2)", + "type": "number", + "maximum": 2, + "minimum": 0 + }, + "max_call_duration_in_minutes": { + "title": "Max call duration in minutes", + "description": "Maximum call duration in minutes (1-180)", + "type": "integer", + "maximum": 180, + "minimum": 0 + }, + "initial_message_delay": { + "title": "Initial message delay", + "description": "Delay before initial message in seconds (0-60)", + "type": "integer", + "maximum": 60, + "minimum": 0 + }, + "initial_message": { + "title": "Initial message", + "description": "Initial message to send when conversation starts", + "type": "string" + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "organization": { + "title": "Organization", + "description": "Organization this simulator agent belongs to", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "deleted": { + "title": "Deleted", + "type": "boolean", + "readOnly": true + }, + "deleted_at": { + "title": "Deleted at", + "type": "string", + "format": "date-time", + "readOnly": true, + "nullable": true + }, + "logo_url": { + "title": "Logo url", + "type": "string", + "readOnly": true + } + } + }, + "SimulatorAgentListResponse": { + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer", + "readOnly": true + }, + "next": { + "title": "Next", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "previous": { + "title": "Previous", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulatorAgent" + }, + "readOnly": true + }, + "total_pages": { + "title": "Total pages", + "type": "integer", + "readOnly": true + }, + "current_page": { + "title": "Current page", + "type": "integer", + "readOnly": true + } + } + }, + "SimulatorAgentValidationErrorResponse": { + "type": "object", + "properties": {}, + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "SimulatorAgentDeleteResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "TestExecutionDetailResponse": { + "type": "object", + "properties": { + "count": { + "title": "Count", + "type": "integer", + "readOnly": true + }, + "next": { + "title": "Next", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "previous": { + "title": "Previous", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "results": { + "description": "Call execution rows may include dynamic eval/scenario columns.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "readOnly": true + }, + "total_pages": { + "title": "Total pages", + "type": "integer", + "readOnly": true + }, + "current_page": { + "title": "Current page", + "type": "integer", + "readOnly": true + }, + "column_order": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "readOnly": true + }, + "error_messages": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "readOnly": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "provider": { + "title": "Provider", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "TestExecutionAnalytics": { + "required": [ + "fail_rate_over_test_runs", + "evaluation_categories_over_test_runs", + "metadata" + ], + "type": "object", + "properties": { + "fail_rate_over_test_runs": { + "title": "Fail rate over test runs", + "description": "Fail rate data for scatter plot chart", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "evaluation_categories_over_test_runs": { + "title": "Evaluation categories over test runs", + "description": "Evaluation categories data for line graph chart", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + }, + "metadata": { + "title": "Metadata", + "description": "Metadata about the analytics data", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + }, + "CancelTestExecutionResponse": { + "required": [ + "success", + "message", + "test_execution_id" + ], + "type": "object", + "properties": { + "success": { + "title": "Success", + "type": "boolean" + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "test_execution_id": { + "title": "Test execution id", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "TestExecutionChatBatchResult": { + "required": [ + "call_execution_ids", + "has_more", + "batched_scenarios" + ], + "type": "object", + "properties": { + "call_execution_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "has_more": { + "title": "Has more", + "type": "boolean" + }, + "batched_scenarios": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "TestExecutionChatBatchResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/TestExecutionChatBatchResult" + } + } + }, + "ColumnOrder": { + "required": [ + "column_name", + "id", + "visible" + ], + "type": "object", + "properties": { + "column_name": { + "title": "Column name", + "type": "string", + "minLength": 1 + }, + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "visible": { + "title": "Visible", + "type": "boolean" + } + } + }, + "TestExecutionColumnOrder": { + "required": [ + "column_order" + ], + "type": "object", + "properties": { + "column_order": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnOrder" + } + } + } + }, + "TestExecutionColumnOrderResponse": { + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "column_order": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnOrder" + }, + "readOnly": true + } + } + }, + "EvalExplanationCluster": { + "type": "object", + "properties": { + "kind": { + "title": "Kind", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "confidence": { + "title": "Confidence", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "theme": { + "title": "Theme", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "guidance": { + "title": "Guidance", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "evidenceSummary": { + "title": "Evidencesummary", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "eval_config_id": { + "title": "Eval config id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "eval_template_id": { + "title": "Eval template id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "eval_name": { + "title": "Eval name", + "type": "string", + "readOnly": true, + "minLength": 1 + } + } + }, + "EvalExplanationSummaryResult": { + "required": [ + "response", + "last_updated", + "status" + ], + "type": "object", + "properties": { + "response": { + "title": "Response", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalExplanationCluster" + } + } + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + } + } + }, + "EvalExplanationSummaryResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/EvalExplanationSummaryResult" + } + } + }, + "EvalExplanationSummaryRefreshResult": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "EvalExplanationSummaryRefreshResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/EvalExplanationSummaryRefreshResult" + } + } + }, + "RunTestKPIsResponse": { + "type": "object", + "properties": { + "total_calls": { + "title": "Total calls", + "type": "integer", + "readOnly": true + }, + "avg_score": { + "title": "Avg score", + "type": "number", + "readOnly": true + }, + "avg_response": { + "title": "Avg response", + "type": "number", + "readOnly": true + }, + "calls_attempted": { + "title": "Calls attempted", + "type": "integer", + "readOnly": true + }, + "connected_calls": { + "title": "Connected calls", + "type": "integer", + "readOnly": true + }, + "calls_connected_percentage": { + "title": "Calls connected percentage", + "type": "number", + "readOnly": true + }, + "scenario_graphs": { + "title": "Scenario graphs", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + }, + "readOnly": true + }, + "agent_type": { + "title": "Agent type", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "is_inbound": { + "title": "Is inbound", + "type": "boolean", + "readOnly": true, + "nullable": true + }, + "avg_agent_latency": { + "title": "Avg agent latency", + "type": "number", + "readOnly": true + }, + "avg_user_interruption_count": { + "title": "Avg user interruption count", + "type": "number", + "readOnly": true + }, + "avg_user_interruption_rate": { + "title": "Avg user interruption rate", + "type": "number", + "readOnly": true + }, + "avg_user_wpm": { + "title": "Avg user wpm", + "type": "number", + "readOnly": true + }, + "avg_bot_wpm": { + "title": "Avg bot wpm", + "type": "number", + "readOnly": true + }, + "avg_talk_ratio": { + "title": "Avg talk ratio", + "type": "number", + "readOnly": true + }, + "avg_ai_interruption_count": { + "title": "Avg ai interruption count", + "type": "number", + "readOnly": true + }, + "avg_ai_interruption_rate": { + "title": "Avg ai interruption rate", + "type": "number", + "readOnly": true + }, + "avg_stop_time_after_interruption": { + "title": "Avg stop time after interruption", + "type": "number", + "readOnly": true + }, + "agent_talk_percentage": { + "title": "Agent talk percentage", + "type": "number", + "readOnly": true + }, + "customer_talk_percentage": { + "title": "Customer talk percentage", + "type": "number", + "readOnly": true + }, + "avg_total_tokens": { + "title": "Avg total tokens", + "type": "number", + "readOnly": true + }, + "avg_input_tokens": { + "title": "Avg input tokens", + "type": "number", + "readOnly": true + }, + "avg_output_tokens": { + "title": "Avg output tokens", + "type": "number", + "readOnly": true + }, + "avg_chat_latency_ms": { + "title": "Avg chat latency ms", + "type": "number", + "readOnly": true + }, + "avg_turn_count": { + "title": "Avg turn count", + "type": "number", + "readOnly": true + }, + "avg_csat_score": { + "title": "Avg csat score", + "type": "number", + "readOnly": true + }, + "failed_calls": { + "title": "Failed calls", + "type": "integer", + "readOnly": true + }, + "total_duration": { + "title": "Total duration", + "type": "number", + "readOnly": true + } + } + }, + "OptimiserAnalysisResultPayload": { + "required": [ + "response", + "status" + ], + "type": "object", + "properties": { + "response": { + "title": "Response", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time" + }, + "message": { + "title": "Message", + "type": "string" + } + } + }, + "OptimiserAnalysisResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/OptimiserAnalysisResultPayload" + } + } + }, + "OptimiserAnalysisRefreshResult": { + "required": [ + "message", + "status" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + } + } + }, + "OptimiserAnalysisRefreshResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/OptimiserAnalysisRefreshResult" + } + } + }, + "PerformanceSummary": { + "required": [ + "test_run_performance_metrics", + "top_performing_scenarios" + ], + "type": "object", + "properties": { + "test_run_performance_metrics": { + "title": "Test run performance metrics", + "description": "Performance metrics including pass rate, total test runs, and latest fail rate", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "top_performing_scenarios": { + "description": "List of top performing scenarios", + "type": "array", + "items": { + "description": "List of top performing scenarios with their performance scores", + "type": "object", + "additionalProperties": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "CallExecutionRerun": { + "required": [ + "rerun_type" + ], + "type": "object", + "properties": { + "rerun_type": { + "title": "Rerun type", + "description": "Type of rerun: evaluation only or call plus evaluation", + "type": "string", + "enum": [ + "eval_only", + "call_and_eval" + ] + }, + "call_execution_ids": { + "description": "List of specific call execution IDs to rerun", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "select_all": { + "title": "Select all", + "description": "Whether to rerun all call executions in the test execution", + "type": "boolean", + "default": false + } + } + }, + "FailedRerunItem": { + "required": [ + "call_execution_id", + "error" + ], + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid" + }, + "error": { + "title": "Error", + "type": "string", + "minLength": 1 + } + } + }, + "RerunCallsResponse": { + "required": [ + "message", + "test_execution_id", + "rerun_type", + "total_processed", + "successful_reruns", + "failed_reruns", + "success_count", + "failure_count" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "test_execution_id": { + "title": "Test execution id", + "type": "string", + "format": "uuid" + }, + "rerun_type": { + "title": "Rerun type", + "type": "string", + "minLength": 1 + }, + "total_processed": { + "title": "Total processed", + "type": "integer" + }, + "successful_reruns": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "failed_reruns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FailedRerunItem" + } + }, + "success_count": { + "title": "Success count", + "type": "integer" + }, + "failure_count": { + "title": "Failure count", + "type": "integer" + } + } + }, + "TestExecutionTranscriptCall": { + "type": "object", + "properties": { + "call_execution_id": { + "title": "Call execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "phone_number": { + "title": "Phone number", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + }, + "status": { + "title": "Status", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "transcripts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallTranscript" + }, + "readOnly": true + }, + "total_transcripts": { + "title": "Total transcripts", + "type": "integer", + "readOnly": true + }, + "scenario_name": { + "title": "Scenario name", + "type": "string", + "readOnly": true, + "minLength": 1, + "nullable": true + } + } + }, + "TestExecutionTranscriptsResponse": { + "type": "object", + "properties": { + "test_execution_id": { + "title": "Test execution id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TestExecutionTranscriptCall" + }, + "readOnly": true + }, + "total_calls": { + "title": "Total calls", + "type": "integer", + "readOnly": true + }, + "total_transcripts": { + "title": "Total transcripts", + "type": "integer", + "readOnly": true + } + } + }, + "BulkAnnotationAnnotationRequest": { + "required": [ + "annotation_label_id" + ], + "type": "object", + "properties": { + "annotation_label_id": { + "title": "Annotation label id", + "type": "string", + "format": "uuid" + }, + "value": { + "title": "Value", + "type": "string" + }, + "value_float": { + "title": "Value float", + "type": "number" + }, + "value_bool": { + "title": "Value bool", + "type": "boolean" + }, + "value_str_list": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "BulkAnnotationNoteRequest": { + "required": [ + "text" + ], + "type": "object", + "properties": { + "text": { + "title": "Text", + "type": "string", + "minLength": 1 + } + } + }, + "BulkAnnotationRecordRequest": { + "required": [ + "observation_span_id" + ], + "type": "object", + "properties": { + "observation_span_id": { + "title": "Observation span id", + "type": "string", + "minLength": 1 + }, + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BulkAnnotationAnnotationRequest" + } + }, + "notes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BulkAnnotationNoteRequest" + } + } + } + }, + "BulkAnnotationRequest": { + "required": [ + "records" + ], + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BulkAnnotationRecordRequest" + } + } + } + }, + "BulkAnnotationResponseResult": { + "required": [ + "message", + "annotations_created", + "annotations_updated", + "notes_created", + "succeeded_count", + "errors_count", + "warnings_count" + ], + "type": "object", + "properties": { + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "annotations_created": { + "title": "Annotations created", + "type": "integer" + }, + "annotations_updated": { + "title": "Annotations updated", + "type": "integer" + }, + "notes_created": { + "title": "Notes created", + "type": "integer" + }, + "succeeded_count": { + "title": "Succeeded count", + "type": "integer" + }, + "errors_count": { + "title": "Errors count", + "type": "integer" + }, + "warnings_count": { + "title": "Warnings count", + "type": "integer" + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "nullable": true + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "nullable": true + } + } + }, + "BulkAnnotationResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/BulkAnnotationResponseResult" + } + } + }, + "ApiErrorResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": false + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "validation_error", + "authentication_error", + "payment_required", + "entitlement_error", + "permission_error", + "not_found", + "conflict", + "client_error", + "rate_limit", + "server_error", + "service_unavailable", + "timeout", + "api_error" + ], + "nullable": true + }, + "code": { + "title": "Code", + "type": "string", + "nullable": true + }, + "detail": { + "title": "Detail", + "type": "string", + "nullable": true + }, + "result": { + "title": "Result", + "type": "string", + "nullable": true + }, + "message": { + "title": "Message", + "type": "string", + "nullable": true + }, + "error": { + "title": "Error", + "type": "string", + "nullable": true + }, + "attr": { + "title": "Attr", + "type": "string", + "nullable": true + }, + "details": { + "title": "Details", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "ErrorName": { + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string" + } + } + }, + "TrendPoint": { + "required": [ + "timestamp", + "value", + "users" + ], + "type": "object", + "properties": { + "timestamp": { + "title": "Timestamp", + "type": "string", + "format": "date-time" + }, + "value": { + "title": "Value", + "type": "integer" + }, + "users": { + "title": "Users", + "type": "integer" + } + } + }, + "FeedListRow": { + "required": [ + "cluster_id", + "source", + "error", + "status", + "severity", + "occurrences", + "trace_count", + "fix_layer", + "users_affected", + "sessions", + "first_seen", + "last_seen", + "trends", + "assignees", + "model", + "model_version", + "project", + "project_id", + "environment", + "eval_score", + "trace_id", + "external_issue_url", + "external_issue_id" + ], + "type": "object", + "properties": { + "cluster_id": { + "title": "Cluster id", + "type": "string", + "minLength": 1 + }, + "source": { + "title": "Source", + "type": "string", + "minLength": 1 + }, + "error": { + "$ref": "#/components/schemas/ErrorName" + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "severity": { + "title": "Severity", + "type": "string", + "minLength": 1 + }, + "occurrences": { + "title": "Occurrences", + "type": "integer" + }, + "trace_count": { + "title": "Trace count", + "type": "integer" + }, + "fix_layer": { + "title": "Fix layer", + "type": "string", + "minLength": 1, + "nullable": true + }, + "users_affected": { + "title": "Users affected", + "type": "integer" + }, + "sessions": { + "title": "Sessions", + "type": "integer" + }, + "first_seen": { + "title": "First seen", + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_seen": { + "title": "Last seen", + "type": "string", + "format": "date-time", + "nullable": true + }, + "trends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrendPoint" + } + }, + "assignees": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "model": { + "title": "Model", + "type": "string", + "minLength": 1, + "nullable": true + }, + "model_version": { + "title": "Model version", + "type": "string", + "minLength": 1, + "nullable": true + }, + "project": { + "title": "Project", + "type": "string", + "minLength": 1, + "nullable": true + }, + "project_id": { + "title": "Project id", + "type": "string", + "minLength": 1, + "nullable": true + }, + "environment": { + "title": "Environment", + "type": "string", + "minLength": 1, + "nullable": true + }, + "eval_score": { + "title": "Eval score", + "type": "number", + "nullable": true + }, + "trace_id": { + "title": "Trace id", + "type": "string", + "minLength": 1, + "nullable": true + }, + "external_issue_url": { + "title": "External issue url", + "type": "string", + "minLength": 1, + "nullable": true + }, + "external_issue_id": { + "title": "External issue id", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "FeedListResponse": { + "required": [ + "data", + "total", + "limit", + "offset" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeedListRow" + } + }, + "total": { + "title": "Total", + "type": "integer" + }, + "limit": { + "title": "Limit", + "type": "integer" + }, + "offset": { + "title": "Offset", + "type": "integer" + } + } + }, + "FeedListApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/FeedListResponse" + } + } + }, + "FeedStats": { + "required": [ + "total_errors", + "escalating", + "for_review", + "acknowledged", + "resolved", + "affected_users" + ], + "type": "object", + "properties": { + "total_errors": { + "title": "Total errors", + "type": "integer" + }, + "escalating": { + "title": "Escalating", + "type": "integer" + }, + "for_review": { + "title": "For review", + "type": "integer" + }, + "acknowledged": { + "title": "Acknowledged", + "type": "integer" + }, + "resolved": { + "title": "Resolved", + "type": "integer" + }, + "affected_users": { + "title": "Affected users", + "type": "integer" + } + } + }, + "FeedStatsApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/FeedStats" + } + } + }, + "TracePreview": { + "required": [ + "trace_id", + "input", + "output" + ], + "type": "object", + "properties": { + "trace_id": { + "title": "Trace id", + "type": "string", + "minLength": 1 + }, + "input": { + "title": "Input", + "type": "string", + "minLength": 1, + "nullable": true + }, + "output": { + "title": "Output", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "FeedDetailCore": { + "required": [ + "row", + "description", + "success_trace", + "representative_trace" + ], + "type": "object", + "properties": { + "row": { + "$ref": "#/components/schemas/FeedListRow" + }, + "description": { + "title": "Description", + "type": "string", + "minLength": 1, + "nullable": true + }, + "success_trace": { + "$ref": "#/components/schemas/TracePreview" + }, + "representative_trace": { + "$ref": "#/components/schemas/TracePreview" + } + } + }, + "FeedDetailApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/FeedDetailCore" + } + } + }, + "FeedUpdateBody": { + "type": "object", + "properties": { + "project_id": { + "title": "Project id", + "type": "string", + "format": "uuid" + }, + "status": { + "title": "Status", + "type": "string", + "enum": [ + "escalating", + "for_review", + "acknowledged", + "resolved" + ] + }, + "severity": { + "title": "Severity", + "type": "string", + "enum": [ + "critical", + "high", + "medium", + "low" + ] + }, + "assignee": { + "title": "Assignee", + "type": "string", + "format": "email", + "minLength": 1, + "nullable": true + } + } + }, + "CreateLinearIssue": { + "required": [ + "team_id" + ], + "type": "object", + "properties": { + "team_id": { + "title": "Team id", + "type": "string", + "minLength": 1 + }, + "title": { + "title": "Title", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "priority": { + "title": "Priority", + "type": "integer", + "default": 0 + } + } + }, + "CreateLinearIssueResult": { + "type": "object", + "properties": { + "already_linked": { + "title": "Already linked", + "type": "boolean" + }, + "issue_id": { + "title": "Issue id", + "type": "string", + "minLength": 1, + "nullable": true + }, + "issue_url": { + "title": "Issue url", + "type": "string", + "minLength": 1, + "nullable": true + }, + "issue_title": { + "title": "Issue title", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "CreateLinearIssueResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/CreateLinearIssueResult" + } + } + }, + "DeepAnalysisBody": { + "required": [ + "trace_id" + ], + "type": "object", + "properties": { + "trace_id": { + "title": "Trace id", + "type": "string", + "minLength": 1 + }, + "force": { + "title": "Force", + "type": "boolean", + "default": false + } + } + }, + "DeepAnalysisDispatchResponse": { + "required": [ + "status", + "trace_id" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "trace_id": { + "title": "Trace id", + "type": "string", + "minLength": 1 + } + } + }, + "DeepAnalysisDispatchApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/DeepAnalysisDispatchResponse" + } + } + }, + "EventsOverTimePoint": { + "required": [ + "date", + "errors", + "passing", + "users" + ], + "type": "object", + "properties": { + "date": { + "title": "Date", + "type": "string", + "minLength": 1 + }, + "errors": { + "title": "Errors", + "type": "integer" + }, + "passing": { + "title": "Passing", + "type": "integer" + }, + "users": { + "title": "Users", + "type": "integer" + } + } + }, + "PatternInsight": { + "required": [ + "value", + "caption" + ], + "type": "object", + "properties": { + "value": { + "title": "Value", + "type": "string", + "minLength": 1 + }, + "caption": { + "title": "Caption", + "type": "string", + "minLength": 1 + } + } + }, + "KeyMoment": { + "required": [ + "kevinified", + "verbatim" + ], + "type": "object", + "properties": { + "kevinified": { + "title": "Kevinified", + "type": "string", + "minLength": 1 + }, + "verbatim": { + "title": "Verbatim", + "type": "string" + } + } + }, + "PatternSummary": { + "required": [ + "insights", + "key_moments" + ], + "type": "object", + "properties": { + "insights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PatternInsight" + } + }, + "key_moments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyMoment" + } + } + } + }, + "TraceSummary": { + "required": [ + "eval_score", + "latency_ms", + "turns", + "model", + "input_tokens", + "output_tokens" + ], + "type": "object", + "properties": { + "eval_score": { + "title": "Eval score", + "type": "number", + "nullable": true + }, + "latency_ms": { + "title": "Latency ms", + "type": "integer", + "nullable": true + }, + "turns": { + "title": "Turns", + "type": "integer", + "nullable": true + }, + "model": { + "title": "Model", + "type": "string", + "minLength": 1, + "nullable": true + }, + "input_tokens": { + "title": "Input tokens", + "type": "integer", + "nullable": true + }, + "output_tokens": { + "title": "Output tokens", + "type": "integer", + "nullable": true + } + } + }, + "TraceEvidence": { + "required": [ + "input", + "output", + "fail_reel", + "pass_reel" + ], + "type": "object", + "properties": { + "input": { + "title": "Input", + "type": "string", + "minLength": 1, + "nullable": true + }, + "output": { + "title": "Output", + "type": "string", + "minLength": 1, + "nullable": true + }, + "fail_reel": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "pass_reel": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + } + }, + "AgentFlowGraph": { + "required": [ + "nodes", + "edges" + ], + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "edges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + } + }, + "RepresentativeTrace": { + "required": [ + "id", + "status", + "timestamp", + "summary", + "evidence", + "agent_flow", + "root_causes", + "recommendations", + "what_changed" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "timestamp": { + "title": "Timestamp", + "type": "string", + "format": "date-time", + "nullable": true + }, + "summary": { + "$ref": "#/components/schemas/TraceSummary" + }, + "evidence": { + "$ref": "#/components/schemas/TraceEvidence" + }, + "agent_flow": { + "$ref": "#/components/schemas/AgentFlowGraph" + }, + "root_causes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "recommendations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "what_changed": { + "title": "What changed", + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + }, + "OverviewResponse": { + "required": [ + "events_over_time", + "pattern_summary", + "representative_traces" + ], + "type": "object", + "properties": { + "events_over_time": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventsOverTimePoint" + } + }, + "pattern_summary": { + "$ref": "#/components/schemas/PatternSummary" + }, + "representative_traces": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepresentativeTrace" + } + } + } + }, + "OverviewApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/OverviewResponse" + } + } + }, + "RootCause": { + "required": [ + "rank", + "title", + "description" + ], + "type": "object", + "properties": { + "rank": { + "title": "Rank", + "type": "integer" + }, + "title": { + "title": "Title", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "minLength": 1 + } + } + }, + "Recommendation": { + "required": [ + "id", + "title", + "description", + "priority", + "root_cause_link", + "immediate_fix", + "insights", + "evidence" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "title": { + "title": "Title", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string" + }, + "priority": { + "title": "Priority", + "type": "string", + "minLength": 1 + }, + "root_cause_link": { + "title": "Root cause link", + "type": "integer", + "nullable": true + }, + "immediate_fix": { + "title": "Immediate fix", + "type": "string", + "minLength": 1, + "nullable": true + }, + "insights": { + "title": "Insights", + "type": "string", + "minLength": 1, + "nullable": true + }, + "evidence": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "DeepAnalysisResponse": { + "required": [ + "status", + "trace_id", + "root_causes", + "recommendations", + "immediate_fix" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "trace_id": { + "title": "Trace id", + "type": "string", + "minLength": 1 + }, + "root_causes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RootCause" + } + }, + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Recommendation" + } + }, + "immediate_fix": { + "title": "Immediate fix", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "DeepAnalysisApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/DeepAnalysisResponse" + } + } + }, + "SidebarTimeline": { + "required": [ + "first_seen", + "last_seen", + "age_days" + ], + "type": "object", + "properties": { + "first_seen": { + "title": "First seen", + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_seen": { + "title": "Last seen", + "type": "string", + "format": "date-time", + "nullable": true + }, + "age_days": { + "title": "Age days", + "type": "integer", + "nullable": true + } + } + }, + "SidebarAIMetadata": { + "required": [ + "model", + "model_version", + "project", + "eval_score", + "trace_id" + ], + "type": "object", + "properties": { + "model": { + "title": "Model", + "type": "string", + "minLength": 1, + "nullable": true + }, + "model_version": { + "title": "Model version", + "type": "string", + "minLength": 1, + "nullable": true + }, + "project": { + "title": "Project", + "type": "string", + "minLength": 1, + "nullable": true + }, + "eval_score": { + "title": "Eval score", + "type": "number", + "nullable": true + }, + "trace_id": { + "title": "Trace id", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "EvaluationResult": { + "required": [ + "label", + "type", + "result", + "score", + "value" + ], + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string", + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "minLength": 1 + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1 + }, + "score": { + "title": "Score", + "type": "number", + "nullable": true + }, + "value": { + "title": "Value", + "type": "string", + "minLength": 1, + "nullable": true + } + } + }, + "CoOccurringIssue": { + "required": [ + "id", + "title", + "type", + "co_occurrence", + "count", + "severity" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "title": { + "title": "Title", + "type": "string", + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string" + }, + "co_occurrence": { + "title": "Co occurrence", + "type": "number" + }, + "count": { + "title": "Count", + "type": "integer" + }, + "severity": { + "title": "Severity", + "type": "string", + "minLength": 1 + } + } + }, + "FeedSidebar": { + "required": [ + "timeline", + "ai_metadata", + "evaluations", + "co_occurring_issues" + ], + "type": "object", + "properties": { + "timeline": { + "$ref": "#/components/schemas/SidebarTimeline" + }, + "ai_metadata": { + "$ref": "#/components/schemas/SidebarAIMetadata" + }, + "evaluations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationResult" + } + }, + "co_occurring_issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CoOccurringIssue" + } + } + } + }, + "FeedSidebarApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/FeedSidebar" + } + } + }, + "TracesAggregates": { + "required": [ + "total_traces", + "failing_traces", + "passing_traces", + "avg_score", + "p50_latency", + "p95_latency", + "avg_turns" + ], + "type": "object", + "properties": { + "total_traces": { + "title": "Total traces", + "type": "integer" + }, + "failing_traces": { + "title": "Failing traces", + "type": "integer" + }, + "passing_traces": { + "title": "Passing traces", + "type": "integer" + }, + "avg_score": { + "title": "Avg score", + "type": "number" + }, + "p50_latency": { + "title": "P50 latency", + "type": "integer" + }, + "p95_latency": { + "title": "P95 latency", + "type": "integer" + }, + "avg_turns": { + "title": "Avg turns", + "type": "number" + } + } + }, + "TracesListRow": { + "required": [ + "id", + "input", + "timestamp", + "latency_ms", + "tokens", + "cost", + "score", + "turns" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "minLength": 1 + }, + "input": { + "title": "Input", + "type": "string", + "minLength": 1, + "nullable": true + }, + "timestamp": { + "title": "Timestamp", + "type": "string", + "format": "date-time", + "nullable": true + }, + "latency_ms": { + "title": "Latency ms", + "type": "integer", + "nullable": true + }, + "tokens": { + "title": "Tokens", + "type": "integer", + "nullable": true + }, + "cost": { + "title": "Cost", + "type": "number", + "nullable": true + }, + "score": { + "title": "Score", + "type": "number", + "nullable": true + }, + "turns": { + "title": "Turns", + "type": "integer", + "nullable": true + } + } + }, + "TracesTabResponse": { + "required": [ + "aggregates", + "traces", + "total" + ], + "type": "object", + "properties": { + "aggregates": { + "$ref": "#/components/schemas/TracesAggregates" + }, + "traces": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TracesListRow" + } + }, + "total": { + "title": "Total", + "type": "integer" + } + } + }, + "TracesTabApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/TracesTabResponse" + } + } + }, + "TrendMetric": { + "required": [ + "label", + "value", + "delta", + "unit" + ], + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string", + "minLength": 1 + }, + "value": { + "title": "Value", + "type": "string", + "minLength": 1 + }, + "delta": { + "title": "Delta", + "type": "number" + }, + "unit": { + "title": "Unit", + "type": "string" + } + } + }, + "ScoreTrend": { + "required": [ + "label", + "current", + "prev", + "sparkline" + ], + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string", + "minLength": 1 + }, + "current": { + "title": "Current", + "type": "number" + }, + "prev": { + "title": "Prev", + "type": "number" + }, + "sparkline": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "HeatmapCell": { + "required": [ + "day", + "hour", + "value" + ], + "type": "object", + "properties": { + "day": { + "title": "Day", + "type": "integer" + }, + "hour": { + "title": "Hour", + "type": "integer" + }, + "value": { + "title": "Value", + "type": "integer" + } + } + }, + "TrendsTabResponse": { + "required": [ + "metrics", + "events_over_time", + "score_trends", + "activity_heatmap" + ], + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrendMetric" + } + }, + "events_over_time": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventsOverTimePoint" + } + }, + "score_trends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoreTrend" + } + }, + "activity_heatmap": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HeatmapCell" + } + } + } + } + }, + "TrendsTabApiResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/TrendsTabResponse" + } + } + }, + "AnnotationLabelResponse": { + "required": [ + "id", + "name", + "type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "type": { + "title": "Type", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "nullable": true + }, + "settings": { + "title": "Settings", + "type": "object", + "additionalProperties": true + } + } + }, + "GetAnnotationLabelsResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnnotationLabelResponse" + } + } + } + }, + "ObserveGraphDataRequest": { + "required": [ + "project_id", + "req_data_config" + ], + "type": "object", + "properties": { + "project_id": { + "title": "Project id", + "type": "string", + "format": "uuid" + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string", + "description": "Column or attribute id to filter on." + }, + "display_name": { + "type": "string", + "description": "Optional UI label for chips and saved views." + }, + "source": { + "type": "string", + "description": "Optional source surface for mixed-source filters, for example traces, datasets, or simulation." + }, + "output_type": { + "type": "string", + "description": "Optional metric output type metadata used by eval and annotation filters." + }, + "filter_config": { + "type": "object", + "properties": { + "filter_type": { + "type": "string", + "description": "Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array." + }, + "filter_op": { + "type": "string", + "description": "Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null." + }, + "filter_value": { + "description": "Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type." + }, + "col_type": { + "type": "string", + "description": "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL." + } + }, + "required": [ + "filter_type", + "filter_op" + ], + "additionalProperties": false + } + }, + "required": [ + "column_id", + "filter_config" + ], + "additionalProperties": false + } + }, + "interval": { + "title": "Interval", + "type": "string", + "enum": [ + "hour", + "day", + "week", + "month" + ], + "default": "day" + }, + "property": { + "title": "Property", + "type": "string", + "default": "average" + }, + "req_data_config": { + "title": "Req data config", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "SYSTEM_METRIC", + "EVAL", + "ANNOTATION" + ] + }, + "output_type": { + "type": "string" + }, + "eval_output_type": { + "type": "string" + }, + "choices": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": {}, + "filter_op": { + "type": "string" + }, + "filter_value": {} + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + } + } + }, + "ObserveGraphDataPoint": { + "required": [ + "timestamp", + "value" + ], + "type": "object", + "properties": { + "timestamp": { + "title": "Timestamp", + "type": "string", + "minLength": 1 + }, + "value": { + "title": "Value", + "type": "number", + "nullable": true + }, + "primary_traffic": { + "title": "Primary traffic", + "type": "number", + "nullable": true + } + } + }, + "ObserveGraphDataResult": { + "required": [ + "metric_name", + "data" + ], + "type": "object", + "properties": { + "metric_name": { + "title": "Metric name", + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObserveGraphDataPoint" + } + } + } + }, + "ObserveGraphDataResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/ObserveGraphDataResult" + } + } + }, + "Project": { + "required": [ + "model_type", + "name", + "trace_type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "model_type": { + "title": "Model type", + "type": "string", + "enum": [ + "Numeric", + "ScoreCategorical", + "Ranking", + "BinaryClassification", + "Regression", + "ObjectDetection", + "Segmentation", + "GenerativeLLM", + "GenerativeImage", + "GenerativeVideo", + "TTS", + "STT", + "MultiModal" + ] + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + "trace_type": { + "title": "Trace type", + "type": "string", + "enum": [ + "experiment", + "observe" + ] + }, + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": true + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "workspace": { + "title": "Workspace", + "type": "string", + "format": "uuid", + "readOnly": true, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "config": { + "title": "Config", + "type": "object", + "x-json-value": true, + "description": "Any valid JSON value.", + "additionalProperties": true + }, + "source": { + "title": "Source", + "type": "string", + "enum": [ + "demo", + "prototype", + "simulator" + ] + }, + "session_config": { + "title": "Session config", + "type": "object", + "x-json-value": true, + "description": "Any valid JSON value.", + "additionalProperties": true + }, + "tags": { + "title": "Tags", + "type": "object", + "x-json-value": true, + "description": "Any valid JSON value.", + "additionalProperties": true + } + } + }, + "GetTraceAnnotation": { + "type": "object", + "properties": { + "observation_span_id": { + "title": "Observation span id", + "type": "string", + "maxLength": 255, + "minLength": 1, + "nullable": true + }, + "trace_id": { + "title": "Trace id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "annotators": { + "title": "Annotators", + "type": "string", + "description": "JSON-encoded UUID list." + }, + "exclude_annotators": { + "title": "Exclude annotators", + "type": "string", + "description": "JSON-encoded UUID list." + } + } + }, + "TraceAnnotationValueResponse": { + "required": [ + "id", + "annotation_label_name", + "annotation_value", + "annotation_label_id", + "annotation_type" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "annotation_label_name": { + "title": "Annotation label name", + "type": "string", + "minLength": 1 + }, + "annotation_value": { + "title": "Annotation value", + "type": "object", + "additionalProperties": true + }, + "annotation_label_id": { + "title": "Annotation label id", + "type": "string", + "format": "uuid" + }, + "annotator": { + "title": "Annotator", + "type": "string", + "minLength": 1, + "nullable": true + }, + "annotator_id": { + "title": "Annotator id", + "type": "string", + "format": "uuid", + "nullable": true + }, + "updated_by": { + "title": "Updated by", + "type": "string", + "minLength": 1, + "nullable": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "annotation_type": { + "title": "Annotation type", + "type": "string", + "minLength": 1 + }, + "settings": { + "title": "Settings", + "type": "object", + "additionalProperties": true + } + } + }, + "TraceAnnotationNoteResponse": { + "required": [ + "id", + "notes", + "created_by_annotator", + "created_by_user", + "created_by_user_id", + "updated_at" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "notes": { + "title": "Notes", + "type": "string" + }, + "created_by_annotator": { + "title": "Created by annotator", + "type": "string", + "minLength": 1 + }, + "created_by_user": { + "title": "Created by user", + "type": "string", + "minLength": 1 + }, + "created_by_user_id": { + "title": "Created by user id", + "type": "string", + "format": "uuid" + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time" + } + } + }, + "GetTraceAnnotationValuesResult": { + "required": [ + "annotations", + "notes" + ], + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceAnnotationValueResponse" + } + }, + "notes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TraceAnnotationNoteResponse" + } + } + } + }, + "GetTraceAnnotationValuesResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/GetTraceAnnotationValuesResult" + } + } + }, + "TraceSession": { + "required": [ + "project" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "project": { + "title": "Project", + "type": "string", + "format": "uuid" + }, + "bookmarked": { + "title": "Bookmarked", + "type": "boolean" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "TraceSessionGraphDataRequest": { + "required": [ + "project_id", + "req_data_config" + ], + "type": "object", + "properties": { + "project_id": { + "title": "Project id", + "type": "string", + "format": "uuid" + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "column_id": { + "type": "string", + "description": "Column or attribute id to filter on." + }, + "display_name": { + "type": "string", + "description": "Optional UI label for chips and saved views." + }, + "source": { + "type": "string", + "description": "Optional source surface for mixed-source filters, for example traces, datasets, or simulation." + }, + "output_type": { + "type": "string", + "description": "Optional metric output type metadata used by eval and annotation filters." + }, + "filter_config": { + "type": "object", + "properties": { + "filter_type": { + "type": "string", + "description": "Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array." + }, + "filter_op": { + "type": "string", + "description": "Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null." + }, + "filter_value": { + "description": "Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type." + }, + "col_type": { + "type": "string", + "description": "Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL." + } + }, + "required": [ + "filter_type", + "filter_op" + ], + "additionalProperties": false + } + }, + "required": [ + "column_id", + "filter_config" + ], + "additionalProperties": false + } + }, + "interval": { + "title": "Interval", + "type": "string", + "enum": [ + "hour", + "day", + "week", + "month" + ], + "default": "day" + }, + "property": { + "title": "Property", + "type": "string", + "default": "average" + }, + "req_data_config": { + "title": "Req data config", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "SYSTEM_METRIC", + "EVAL", + "ANNOTATION" + ] + }, + "output_type": { + "type": "string" + }, + "eval_output_type": { + "type": "string" + }, + "choices": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": {}, + "filter_op": { + "type": "string" + }, + "filter_value": {} + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + } + } + }, + "Trace": { + "required": [ + "project" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "project": { + "title": "Project", + "type": "string", + "format": "uuid" + }, + "project_version": { + "title": "Project version", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 2000, + "nullable": true + }, + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": true + }, + "input": { + "title": "Input", + "type": "object", + "additionalProperties": true + }, + "output": { + "title": "Output", + "type": "object", + "additionalProperties": true + }, + "error": { + "title": "Error", + "type": "object", + "additionalProperties": true + }, + "session": { + "title": "Session", + "type": "string", + "format": "uuid" + }, + "external_id": { + "title": "External id", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "tags": { + "title": "Tags", + "type": "object", + "additionalProperties": true + } + } + }, + "TraceTagsUpdate": { + "required": [ + "tags" + ], + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + } + }, + "UserAlertMonitorLog": { + "required": [ + "type", + "message" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "resolved_by": { + "$ref": "#/components/schemas/User" + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "type": { + "title": "Type", + "type": "string", + "enum": [ + "critical", + "warning" + ] + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + }, + "resolved": { + "title": "Resolved", + "type": "boolean" + }, + "resolved_at": { + "title": "Resolved at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "link": { + "title": "Link", + "type": "string", + "format": "uri", + "maxLength": 200, + "nullable": true + }, + "time_window_start": { + "title": "Time window start", + "type": "string", + "format": "date-time", + "nullable": true + }, + "time_window_end": { + "title": "Time window end", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "UserAlertMonitor": { + "required": [ + "project", + "name", + "metric_type", + "threshold_operator", + "organization" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "project": { + "title": "Project", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "minLength": 1 + }, + "metric_name": { + "title": "Metric name", + "type": "string", + "readOnly": true + }, + "created_at": { + "title": "Created at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "updated_at": { + "title": "Updated at", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "deleted": { + "title": "Deleted", + "type": "boolean" + }, + "deleted_at": { + "title": "Deleted at", + "type": "string", + "format": "date-time", + "nullable": true + }, + "metric_type": { + "title": "Metric type", + "type": "string", + "enum": [ + "count_of_errors", + "error_rates_for_function_calling", + "error_free_session_rates", + "service_provider_error_rates", + "llm_api_failure_rates", + "span_response_time", + "llm_response_time", + "token_usage", + "daily_tokens_spent", + "monthly_tokens_spent", + "evaluation_metrics" + ] + }, + "metric": { + "title": "Metric", + "description": "Id of the evaluation template.", + "type": "string", + "maxLength": 2556, + "nullable": true + }, + "threshold_operator": { + "title": "Threshold operator", + "type": "string", + "enum": [ + "greater_than", + "less_than" + ] + }, + "threshold_type": { + "title": "Threshold type", + "description": "Method to set the threshold for the monitor (Static or Percentage change).", + "type": "string", + "enum": [ + "static", + "percentage_change" + ] + }, + "threshold_metric_value": { + "title": "Threshold metric value", + "description": "For choice and pass/fail evals, the specific metric value to monitor.", + "type": "string", + "maxLength": 255, + "nullable": true + }, + "critical_threshold_value": { + "title": "Critical threshold value", + "type": "number", + "minimum": 0, + "nullable": true + }, + "warning_threshold_value": { + "title": "Warning threshold value", + "type": "number", + "minimum": 0, + "nullable": true + }, + "alert_frequency": { + "title": "Alert frequency", + "description": "Frequency of alert checks in minutes.", + "type": "integer", + "maximum": 2147483647, + "minimum": 5 + }, + "auto_threshold_time_window": { + "title": "Auto threshold time window", + "description": "For auto-thresholding. The time window in minutes to calculate the historical mean", + "type": "integer", + "maximum": 2147483647, + "minimum": 0 + }, + "last_checked_at": { + "title": "Last checked at", + "description": "The last time the monitor was checked for alerts.", + "type": "string", + "format": "date-time", + "nullable": true + }, + "notification_emails": { + "type": "array", + "items": { + "title": "Notification emails", + "type": "string", + "format": "email", + "maxLength": 254, + "minLength": 1 + } + }, + "slack_webhook_url": { + "title": "Slack webhook url", + "type": "string", + "format": "uri", + "maxLength": 200, + "nullable": true + }, + "slack_notes": { + "title": "Slack notes", + "type": "string", + "nullable": true + }, + "is_mute": { + "title": "Is mute", + "type": "boolean" + }, + "filters": { + "title": "Filters", + "type": "object", + "additionalProperties": true + }, + "logs": { + "type": "array", + "items": { + "title": "Logs", + "type": "object", + "additionalProperties": true + }, + "nullable": true + }, + "organization": { + "title": "Organization", + "type": "string", + "format": "uuid" + }, + "workspace": { + "title": "Workspace", + "type": "string", + "format": "uuid", + "nullable": true + }, + "created_by": { + "title": "Created by", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "UserAlertMonitorDuplicate": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 255, + "minLength": 1 + } + } + }, + "UserAlertMonitorDuplicateResult": { + "required": [ + "id", + "message" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "format": "uuid" + }, + "message": { + "title": "Message", + "type": "string", + "minLength": 1 + } + } + }, + "UserAlertMonitorDuplicateResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/UserAlertMonitorDuplicateResult" + } + } + }, + "UserAlertMonitorMetricOption": { + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "metric_type": { + "title": "Metric type", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "output_type": { + "title": "Output type", + "type": "string", + "readOnly": true + } + } + }, + "UserAlertMonitorMetricOptionsResponse": { + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAlertMonitorMetricOption" + }, + "readOnly": true + } + } + }, + "UsersResult": { + "required": [ + "table", + "total_count", + "total_pages" + ], + "type": "object", + "properties": { + "table": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "total_count": { + "title": "Total count", + "type": "integer" + }, + "total_pages": { + "title": "Total pages", + "type": "integer" + } + } + }, + "UsersResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "$ref": "#/components/schemas/UsersResult" + } + } + }, + "UserCodeExampleResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "status": { + "title": "Status", + "type": "boolean", + "default": true + }, + "result": { + "title": "Result", + "type": "string", + "minLength": 1 + } + } + }, + "TestExecutionStatusSummary": { + "required": [ + "run_test_id", + "execution_id", + "status", + "total_scenarios", + "total_calls", + "completed_calls", + "failed_calls", + "success_rate", + "start_time", + "end_time", + "scenarios", + "error" + ], + "type": "object", + "properties": { + "run_test_id": { + "title": "Run test id", + "type": "string", + "minLength": 1 + }, + "execution_id": { + "title": "Execution id", + "type": "string", + "minLength": 1 + }, + "status": { + "title": "Status", + "type": "string", + "minLength": 1 + }, + "total_scenarios": { + "title": "Total scenarios", + "type": "integer" + }, + "total_calls": { + "title": "Total calls", + "type": "integer" + }, + "completed_calls": { + "title": "Completed calls", + "type": "integer" + }, + "failed_calls": { + "title": "Failed calls", + "type": "integer" + }, + "success_rate": { + "title": "Success rate", + "type": "number" + }, + "start_time": { + "title": "Start time", + "type": "string", + "format": "date-time" + }, + "end_time": { + "title": "End time", + "type": "string", + "format": "date-time", + "nullable": true + }, + "scenarios": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "error": { + "title": "Error", + "type": "string", + "minLength": 1, + "nullable": true + } + } + } + } + }, + "tags": [ + { + "name": "Alerts" + }, + { + "name": "Annotation Queue Discussion" + }, + { + "name": "Annotation Queue Items" + }, + { + "name": "Annotation Queue Review" + }, + { + "name": "Annotation Queues" + }, + { + "name": "Datasets" + }, + { + "name": "Experiments" + }, + { + "name": "Run Tests - Eval Configs" + }, + { + "name": "Run Tests - Eval Summary" + }, + { + "name": "Scenarios" + }, + { + "name": "Simulation Agent Definitions" + }, + { + "name": "Simulation Personas" + }, + { + "name": "Simulation Run Tests" + }, + { + "name": "Simulation Scenarios" + }, + { + "name": "Simulation Test Executions" + }, + { + "name": "Simulations" + }, + { + "name": "Tracing" + }, + { + "name": "Users" + }, + { + "name": "accounts" + }, + { + "name": "model-hub" + }, + { + "name": "sdk" + }, + { + "name": "simulate" + }, + { + "name": "tracer" + } + ] +} diff --git a/openapi/sdk/generated/futureagi-sdk.operations.txt b/openapi/sdk/generated/futureagi-sdk.operations.txt new file mode 100644 index 0000000..fc89297 --- /dev/null +++ b/openapi/sdk/generated/futureagi-sdk.operations.txt @@ -0,0 +1,461 @@ +accounts_organization_members_list +accounts_organization_members_reactivate_create +accounts_organization_members_remove_delete +accounts_organization_members_role_create +accounts_user-info_list +accounts_workspace_list_list +accounts_workspace_members_list +accounts_workspace_members_remove_delete +accounts_workspace_members_role_create +accounts_workspace_switch_create +model-hub_annotation-queues_add_label +model-hub_annotation-queues_agreement +model-hub_annotation-queues_analytics +model-hub_annotation-queues_automation-rules_create +model-hub_annotation-queues_automation-rules_delete +model-hub_annotation-queues_automation-rules_evaluate +model-hub_annotation-queues_automation-rules_list +model-hub_annotation-queues_automation-rules_partial_update +model-hub_annotation-queues_automation-rules_preview +model-hub_annotation-queues_automation-rules_read +model-hub_annotation-queues_automation-rules_update +model-hub_annotation-queues_create +model-hub_annotation-queues_delete +model-hub_annotation-queues_export_annotations +model-hub_annotation-queues_export_fields +model-hub_annotation-queues_export_to_dataset +model-hub_annotation-queues_for_source +model-hub_annotation-queues_get_or_create_default +model-hub_annotation-queues_hard_delete +model-hub_annotation-queues_items_add_items +model-hub_annotation-queues_items_annotate_detail +model-hub_annotation-queues_items_annotations_import_annotations +model-hub_annotation-queues_items_annotations_list +model-hub_annotation-queues_items_annotations_submit_annotations +model-hub_annotation-queues_items_assign_items +model-hub_annotation-queues_items_bulk_remove +model-hub_annotation-queues_items_complete_item +model-hub_annotation-queues_items_create +model-hub_annotation-queues_items_delete +model-hub_annotation-queues_items_discussion_comments_discussion_comment_reaction +model-hub_annotation-queues_items_discussion_create +model-hub_annotation-queues_items_discussion_read +model-hub_annotation-queues_items_discussion_reopen_discussion_thread +model-hub_annotation-queues_items_discussion_resolve_discussion_thread +model-hub_annotation-queues_items_list +model-hub_annotation-queues_items_next_item +model-hub_annotation-queues_items_partial_update +model-hub_annotation-queues_items_read +model-hub_annotation-queues_items_release_reservation +model-hub_annotation-queues_items_review_item +model-hub_annotation-queues_items_skip_item +model-hub_annotation-queues_items_update +model-hub_annotation-queues_list +model-hub_annotation-queues_partial_update +model-hub_annotation-queues_progress +model-hub_annotation-queues_read +model-hub_annotation-queues_remove_label +model-hub_annotation-queues_restore +model-hub_annotation-queues_update +model-hub_annotation-queues_update_status +model-hub_annotations-labels_create +model-hub_annotations-labels_delete +model-hub_annotations-labels_list +model-hub_annotations-labels_partial_update +model-hub_annotations-labels_read +model-hub_annotations-labels_restore +model-hub_annotations-labels_update +model-hub_api-keys_create +model-hub_api-keys_delete +model-hub_api-keys_list +model-hub_api-keys_partial_update +model-hub_api-keys_read +model-hub_api-keys_update +model-hub_api_models_list_list +model-hub_dataset_annotation-summary_list +model-hub_dataset_columns_read +model-hub_dataset_eval-stats_list +model-hub_dataset_json-schema_list +model-hub_dataset_run-prompt-stats_list +model-hub_datasets_add-api-column_create +model-hub_datasets_add_vector_db_column_create +model-hub_datasets_classify-column_create +model-hub_datasets_compare-datasets_add-eval_create +model-hub_datasets_compare-datasets_create +model-hub_datasets_compare-datasets_download_create +model-hub_datasets_compare-datasets_start-eval_create +model-hub_datasets_compare-stats_create +model-hub_datasets_compare_get-evals-list_create +model-hub_datasets_compare_preview-run-eval_create +model-hub_datasets_conditional-column_create +model-hub_datasets_delete-compare_delete +model-hub_datasets_delete-compare_read +model-hub_datasets_derived-variables_list +model-hub_datasets_duplicate-rows_create +model-hub_datasets_duplicate_create +model-hub_datasets_explanation-summary_read +model-hub_datasets_explanation-summary_refresh_create +model-hub_datasets_extract-entities_create +model-hub_datasets_get-base-columns_list +model-hub_datasets_get-compare-row_delete +model-hub_datasets_get-compare-row_read +model-hub_datasets_huggingface_detail_create +model-hub_datasets_huggingface_list_create +model-hub_datasets_merge_create +model-hub_datasets_preview_create +model-hub_delete-eval-template_create +model-hub_develops_add-as-new_create +model-hub_develops_add_columns_create +model-hub_develops_add_empty_columns_create +model-hub_develops_add_empty_rows_create +model-hub_develops_add_multiple_static_columns_create +model-hub_develops_add_rows_create +model-hub_develops_add_rows_from_existing_dataset_create +model-hub_develops_add_rows_from_file_create +model-hub_develops_add_rows_from_huggingface_create +model-hub_develops_add_rows_sdk_create +model-hub_develops_add_run_prompt_column_create +model-hub_develops_add_static_column_create +model-hub_develops_add_synthetic_data_create +model-hub_develops_add_user_eval_create +model-hub_develops_clone-dataset_create +model-hub_develops_create-dataset-from-huggingface_create +model-hub_develops_create-dataset-from-local-file_create +model-hub_develops_create-dataset-manually_create +model-hub_develops_create-dataset_create +model-hub_develops_create-empty-dataset_create +model-hub_develops_create-synthetic-dataset_create +model-hub_develops_dataset-creation-progress_read +model-hub_develops_delete_column_delete +model-hub_develops_delete_dataset_delete +model-hub_develops_delete_row_delete +model-hub_develops_delete_template_eval_delete +model-hub_develops_delete_user_eval_delete +model-hub_develops_download_dataset_list +model-hub_develops_edit_and_run_user_eval_create +model-hub_develops_edit_dataset_behavior_update +model-hub_develops_edit_run_prompt_column_create +model-hub_develops_extract-json-column_create +model-hub_develops_get-cell-data_create +model-hub_develops_get-dataset-table_list +model-hub_develops_get-datasets-names_list +model-hub_develops_get-datasets_list +model-hub_develops_get-derived-datasets_read +model-hub_develops_get-experiment-dataset-table_list +model-hub_develops_get-huggingface-dataset-config_create +model-hub_develops_get-row-data_create +model-hub_develops_get-row-diff_create +model-hub_develops_get_eval_structure_read +model-hub_develops_get_evals_list_list +model-hub_develops_get_function_list_list +model-hub_develops_preview_run_eval_create +model-hub_develops_preview_run_prompt_column_create +model-hub_develops_provider-status_list +model-hub_develops_retrieve_run_prompt_column_config_list +model-hub_develops_retrieve_run_prompt_options_list +model-hub_develops_start_evals_process_create +model-hub_develops_stop_user_eval_create +model-hub_develops_synthetic-config_list +model-hub_develops_update-synthetic-config_update +model-hub_develops_update_cell_value_create +model-hub_develops_update_column_name_update +model-hub_develops_update_column_type_update +model-hub_eval-templates_bulk-delete_create +model-hub_eval-templates_composite_execute-adhoc_create +model-hub_eval-templates_composite_execute_create +model-hub_eval-templates_composite_list +model-hub_eval-templates_composite_partial_update +model-hub_eval-templates_create-composite_create +model-hub_eval-templates_create-v2_create +model-hub_eval-templates_detail_list +model-hub_eval-templates_feedback-list_list +model-hub_eval-templates_ground-truth-config_list +model-hub_eval-templates_ground-truth-config_update +model-hub_eval-templates_ground-truth_list +model-hub_eval-templates_ground-truth_upload_create +model-hub_eval-templates_list-charts_create +model-hub_eval-templates_list_create +model-hub_eval-templates_update_update +model-hub_eval-templates_usage_list +model-hub_eval-templates_versions_create_create +model-hub_eval-templates_versions_list +model-hub_eval-templates_versions_restore_create +model-hub_eval-templates_versions_set-default_update +model-hub_experiments_v2_compare-experiments_create +model-hub_experiments_v2_comparisons_list +model-hub_experiments_v2_create +model-hub_experiments_v2_delete_delete +model-hub_experiments_v2_derived-variables_list +model-hub_experiments_v2_download_list +model-hub_experiments_v2_evaluations_stats_list +model-hub_experiments_v2_feedback_create +model-hub_experiments_v2_feedback_get-feedback-details_list +model-hub_experiments_v2_feedback_get-template_list +model-hub_experiments_v2_feedback_submit-feedback_create +model-hub_experiments_v2_json-schema_list +model-hub_experiments_v2_list_list +model-hub_experiments_v2_re-run_create +model-hub_experiments_v2_read +model-hub_experiments_v2_rerun-cells_create +model-hub_experiments_v2_row-diff_create +model-hub_experiments_v2_rows_list +model-hub_experiments_v2_rows_read +model-hub_experiments_v2_stats_list +model-hub_experiments_v2_stop_create +model-hub_experiments_v2_suggest-name_read +model-hub_experiments_v2_update +model-hub_experiments_v2_validate-name_list +model-hub_knowledge-base_create +model-hub_knowledge-base_delete +model-hub_knowledge-base_files_create +model-hub_knowledge-base_files_delete +model-hub_knowledge-base_get_list +model-hub_knowledge-base_list +model-hub_knowledge-base_list_list +model-hub_knowledge-base_partial_update +model-hub_prompt-history-executions_get_execution_details +model-hub_prompt-history-executions_list +model-hub_prompt-history-executions_read +model-hub_prompt-labels_assign_label_by_id +model-hub_prompt-labels_assign_multiple_labels +model-hub_prompt-labels_create +model-hub_prompt-labels_create_system_labels +model-hub_prompt-labels_delete +model-hub_prompt-labels_get_by_name +model-hub_prompt-labels_list +model-hub_prompt-labels_partial_update +model-hub_prompt-labels_read +model-hub_prompt-labels_remove_label_from_version +model-hub_prompt-labels_set_default +model-hub_prompt-labels_template_labels +model-hub_prompt-labels_update +model-hub_prompt-templates_add_new_draft +model-hub_prompt-templates_analyze_prompt +model-hub_prompt-templates_bulk_delete +model-hub_prompt-templates_commit +model-hub_prompt-templates_compare_versions +model-hub_prompt-templates_create +model-hub_prompt-templates_create_draft +model-hub_prompt-templates_delete +model-hub_prompt-templates_delete_evaluation_config +model-hub_prompt-templates_derived-variables_extract_create +model-hub_prompt-templates_derived-variables_list +model-hub_prompt-templates_derived-variables_preview_create +model-hub_prompt-templates_derived-variables_schema_list +model-hub_prompt-templates_generate_prompt +model-hub_prompt-templates_generate_variables +model-hub_prompt-templates_get_all_variables +model-hub_prompt-templates_get_evaluation_configs +model-hub_prompt-templates_get_next_version +model-hub_prompt-templates_get_run_status +model-hub_prompt-templates_get_sdk_code +model-hub_prompt-templates_get_template_by_name +model-hub_prompt-templates_improve_prompt +model-hub_prompt-templates_list +model-hub_prompt-templates_partial_update +model-hub_prompt-templates_read +model-hub_prompt-templates_retrieve_evaluations +model-hub_prompt-templates_run_evals_on_multiple_versions +model-hub_prompt-templates_run_template +model-hub_prompt-templates_save_name +model-hub_prompt-templates_save_prompt_folder +model-hub_prompt-templates_set_default +model-hub_prompt-templates_stop_streaming +model-hub_prompt-templates_update +model-hub_prompt-templates_update_evaluation_configs +model-hub_prompt-templates_versions +model-hub_scores_bulk_create +model-hub_scores_create +model-hub_scores_delete +model-hub_scores_for_source +model-hub_scores_list +model-hub_scores_partial_update +model-hub_scores_read +model-hub_scores_update +sdk_api_v1_configure-evaluations_create +sdk_api_v1_eval_create +sdk_api_v1_eval_read +sdk_api_v1_evaluate-pipeline_create +sdk_api_v1_evaluate-pipeline_list +sdk_api_v1_get-evals_list +sdk_api_v1_new-eval_create +sdk_api_v1_new-eval_list +sdk_api_v1_simulation_analytics_list +sdk_api_v1_simulation_metrics_list +sdk_api_v1_simulation_runs_list +simulate_agent-definitions_create_create +simulate_agent-definitions_delete +simulate_agent-definitions_delete_delete +simulate_agent-definitions_edit_update +simulate_agent-definitions_list +simulate_agent-definitions_read +simulate_agent-definitions_versions_activate_create +simulate_agent-definitions_versions_call-executions_list +simulate_agent-definitions_versions_create_create +simulate_agent-definitions_versions_delete_delete +simulate_agent-definitions_versions_eval-summary_list +simulate_agent-definitions_versions_list +simulate_agent-definitions_versions_read +simulate_agent-definitions_versions_restore_create +simulate_api_call-executions_list +simulate_api_personas_create +simulate_api_personas_delete +simulate_api_personas_duplicate +simulate_api_personas_duplicate_create +simulate_api_personas_field_options +simulate_api_personas_list +simulate_api_personas_partial_update +simulate_api_personas_read +simulate_api_personas_system_personas +simulate_api_personas_update +simulate_api_personas_workspace_personas +simulate_api_run-tests_list +simulate_api_test-executions_list +simulate_call-executions_branch-analysis_create +simulate_call-executions_branch-analysis_list +simulate_call-executions_chat_send-message_create +simulate_call-executions_delete_delete +simulate_call-executions_error-localizer-tasks_list +simulate_call-executions_logs_list +simulate_call-executions_partial_update +simulate_call-executions_read +simulate_call-executions_session-comparison_list +simulate_call-executions_transcripts_list +simulate_export_read +simulate_prompt-simulations_scenarios_list +simulate_prompt-templates_simulations_create +simulate_prompt-templates_simulations_delete +simulate_prompt-templates_simulations_execute_create +simulate_prompt-templates_simulations_list +simulate_prompt-templates_simulations_partial_update +simulate_prompt-templates_simulations_read +simulate_run-tests_active_list +simulate_run-tests_analytics_list +simulate_run-tests_call-executions_list +simulate_run-tests_chat-execute_create +simulate_run-tests_components_partial_update +simulate_run-tests_create_create +simulate_run-tests_delete +simulate_run-tests_delete-test-executions_create +simulate_run-tests_delete_delete +simulate_run-tests_eval-configs_create +simulate_run-tests_eval-configs_delete +simulate_run-tests_eval-configs_get-structure_list +simulate_run-tests_eval-configs_update_create +simulate_run-tests_eval-summary-comparison_list +simulate_run-tests_eval-summary_list +simulate_run-tests_execute_create +simulate_run-tests_executions_list +simulate_run-tests_get-id-by-name_read +simulate_run-tests_list +simulate_run-tests_partial_update +simulate_run-tests_read +simulate_run-tests_rerun-test-executions_create +simulate_run-tests_run-new-evals_create +simulate_run-tests_scenarios_list +simulate_run-tests_sdk-code_list +simulate_run-tests_status_list +simulate_scenarios_add-columns_create +simulate_scenarios_add-rows_create +simulate_scenarios_create_create +simulate_scenarios_delete_delete +simulate_scenarios_edit_update +simulate_scenarios_get-columns_list +simulate_scenarios_list +simulate_scenarios_prompts_update +simulate_scenarios_read +simulate_simulator-agents_create_create +simulate_simulator-agents_delete_delete +simulate_simulator-agents_edit_update +simulate_simulator-agents_list +simulate_simulator-agents_read +simulate_test-executions_analytics_list +simulate_test-executions_cancel_create +simulate_test-executions_chat_call-executions_batch_create +simulate_test-executions_column-order_update +simulate_test-executions_delete_delete +simulate_test-executions_eval-explanation-summary_list +simulate_test-executions_eval-explanation-summary_refresh_create +simulate_test-executions_kpis_list +simulate_test-executions_optimiser-analysis_list +simulate_test-executions_optimiser-analysis_refresh_create +simulate_test-executions_performance-summary_list +simulate_test-executions_read +simulate_test-executions_rerun-calls_create +simulate_test-executions_transcripts_list +tracer_bulk-annotation_create +tracer_feed_issues_create-linear-issue_create +tracer_feed_issues_deep-analysis_create +tracer_feed_issues_list +tracer_feed_issues_overview_list +tracer_feed_issues_partial_update +tracer_feed_issues_read +tracer_feed_issues_root-cause_list +tracer_feed_issues_sidebar_list +tracer_feed_issues_stats_list +tracer_feed_issues_traces_list +tracer_feed_issues_trends_list +tracer_get-annotation-labels_list +tracer_project_list_projects +tracer_trace-annotation_create +tracer_trace-annotation_delete +tracer_trace-annotation_get_annotation_values +tracer_trace-annotation_list +tracer_trace-annotation_partial_update +tracer_trace-annotation_read +tracer_trace-annotation_update +tracer_trace-session_create +tracer_trace-session_delete +tracer_trace-session_eval_logs +tracer_trace-session_get_session_filter_values +tracer_trace-session_get_session_graph_data +tracer_trace-session_get_trace_session_export_data +tracer_trace-session_list +tracer_trace-session_list_sessions +tracer_trace-session_partial_update +tracer_trace-session_read +tracer_trace-session_update +tracer_trace_agent_graph +tracer_trace_bulk_create +tracer_trace_compare_traces +tracer_trace_create +tracer_trace_delete +tracer_trace_get_eval_names +tracer_trace_get_graph_methods +tracer_trace_get_properties +tracer_trace_get_trace_export_data +tracer_trace_get_trace_id_by_index +tracer_trace_get_trace_id_by_index_observe +tracer_trace_list +tracer_trace_list_traces +tracer_trace_list_traces_of_session +tracer_trace_list_voice_calls +tracer_trace_partial_update +tracer_trace_read +tracer_trace_update +tracer_trace_update_tags +tracer_trace_voice_call_detail +tracer_user-alert-logs_create +tracer_user-alert-logs_delete +tracer_user-alert-logs_list +tracer_user-alert-logs_list_all +tracer_user-alert-logs_list_for_alert +tracer_user-alert-logs_mark_as_resolved +tracer_user-alert-logs_partial_update +tracer_user-alert-logs_read +tracer_user-alert-logs_update +tracer_user-alerts_bulk_mute +tracer_user-alerts_create +tracer_user-alerts_delete +tracer_user-alerts_duplicate +tracer_user-alerts_graph_data +tracer_user-alerts_list +tracer_user-alerts_list_monitors +tracer_user-alerts_metric_options +tracer_user-alerts_monitor_details +tracer_user-alerts_partial_update +tracer_user-alerts_preview_graph +tracer_user-alerts_read +tracer_user-alerts_update +tracer_users_get_code_example_list +tracer_users_list diff --git a/openapi/sdk/operation-aliases.json b/openapi/sdk/operation-aliases.json new file mode 100644 index 0000000..0c3106c --- /dev/null +++ b/openapi/sdk/operation-aliases.json @@ -0,0 +1,554 @@ +{ + "GET /model-hub/annotation-queues/": { + "operationId": "listAnnotationQueues", + "tag": "Annotation Queues" + }, + "POST /model-hub/annotation-queues/": { + "operationId": "createAnnotationQueue", + "tag": "Annotation Queues" + }, + "GET /model-hub/annotation-queues/{id}/": { + "operationId": "getAnnotationQueue", + "tag": "Annotation Queues" + }, + "PATCH /model-hub/annotation-queues/{id}/": { + "operationId": "updateAnnotationQueue", + "tag": "Annotation Queues" + }, + "DELETE /model-hub/annotation-queues/{id}/": { + "operationId": "archiveAnnotationQueue", + "tag": "Annotation Queues" + }, + "POST /model-hub/annotation-queues/{id}/update-status/": { + "operationId": "updateAnnotationQueueStatus", + "tag": "Annotation Queues" + }, + "GET /model-hub/annotation-queues/{id}/progress/": { + "operationId": "getAnnotationQueueProgress", + "tag": "Annotation Queues" + }, + "GET /model-hub/annotation-queues/{id}/analytics/": { + "operationId": "getAnnotationQueueAnalytics", + "tag": "Annotation Queues" + }, + "GET /model-hub/annotation-queues/{id}/agreement/": { + "operationId": "getAnnotationQueueAgreement", + "tag": "Annotation Queues" + }, + "GET /model-hub/annotation-queues/{id}/export/": { + "operationId": "exportAnnotationQueue", + "tag": "Annotation Queues" + }, + "GET /model-hub/annotation-queues/{id}/export-fields/": { + "operationId": "listAnnotationQueueExportFields", + "tag": "Annotation Queues" + }, + "POST /model-hub/annotation-queues/{id}/export-to-dataset/": { + "operationId": "exportAnnotationQueueToDataset", + "tag": "Annotation Queues" + }, + "POST /model-hub/annotation-queues/{id}/add-label/": { + "operationId": "addAnnotationQueueLabel", + "tag": "Annotation Queues" + }, + "POST /model-hub/annotation-queues/{id}/remove-label/": { + "operationId": "removeAnnotationQueueLabel", + "tag": "Annotation Queues" + }, + "GET /model-hub/annotation-queues/{queue_id}/items/": { + "operationId": "listAnnotationQueueItems", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/add-items/": { + "operationId": "addAnnotationQueueItems", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/assign/": { + "operationId": "assignAnnotationQueueItems", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/bulk-remove/": { + "operationId": "removeAnnotationQueueItems", + "tag": "Annotation Queue Items" + }, + "GET /model-hub/annotation-queues/{queue_id}/items/next-item/": { + "operationId": "getNextAnnotationQueueItem", + "tag": "Annotation Queue Items" + }, + "GET /model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/": { + "operationId": "getAnnotationQueueItemDetail", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/release/": { + "operationId": "releaseAnnotationQueueItem", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/complete/": { + "operationId": "completeAnnotationQueueItem", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/skip/": { + "operationId": "skipAnnotationQueueItem", + "tag": "Annotation Queue Items" + }, + "GET /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/": { + "operationId": "listAnnotationQueueItemAnnotations", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/": { + "operationId": "submitAnnotationQueueItemAnnotations", + "tag": "Annotation Queue Items" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/": { + "operationId": "importAnnotationQueueItemAnnotations", + "tag": "Annotation Queue Items" + }, + "GET /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/": { + "operationId": "listAnnotationQueueItemDiscussion", + "tag": "Annotation Queue Discussion" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/": { + "operationId": "createAnnotationQueueItemComment", + "tag": "Annotation Queue Discussion" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/": { + "operationId": "resolveAnnotationQueueItemThread", + "tag": "Annotation Queue Discussion" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/": { + "operationId": "reopenAnnotationQueueItemThread", + "tag": "Annotation Queue Discussion" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/": { + "operationId": "toggleAnnotationQueueItemCommentReaction", + "tag": "Annotation Queue Discussion" + }, + "POST /model-hub/annotation-queues/{queue_id}/items/{id}/review/": { + "operationId": "reviewAnnotationQueueItem", + "tag": "Annotation Queue Review" + }, + "GET /model-hub/develops/get-datasets/": { + "operationId": "listDatasets", + "tag": "Datasets" + }, + "GET /model-hub/develops/get-datasets-names/": { + "operationId": "listDatasetNames", + "tag": "Datasets" + }, + "GET /model-hub/develops/{dataset_id}/get-dataset-table/": { + "operationId": "getDatasetTable", + "tag": "Datasets" + }, + "POST /model-hub/develops/{dataset_id}/get-row-data/": { + "operationId": "getDatasetRow", + "tag": "Datasets" + }, + "GET /model-hub/dataset/columns/{dataset_id}/": { + "operationId": "getDatasetColumns", + "tag": "Datasets" + }, + "POST /model-hub/develops/create-empty-dataset/": { + "operationId": "createEmptyDataset", + "tag": "Datasets" + }, + "POST /model-hub/develops/create-dataset-manually/": { + "operationId": "createDatasetManually", + "tag": "Datasets" + }, + "POST /model-hub/develops/create-dataset-from-local-file/": { + "operationId": "createDatasetFromLocalFile", + "tag": "Datasets" + }, + "POST /model-hub/develops/{dataset_id}/add_rows/": { + "operationId": "addDatasetRows", + "tag": "Datasets" + }, + "POST /model-hub/develops/{dataset_id}/add_columns/": { + "operationId": "addDatasetColumns", + "tag": "Datasets" + }, + "POST /model-hub/develops/{dataset_id}/update_cell_value/": { + "operationId": "updateDatasetCell", + "tag": "Datasets" + }, + "DELETE /model-hub/develops/{dataset_id}/delete_row/": { + "operationId": "deleteDatasetRow", + "tag": "Datasets" + }, + "DELETE /model-hub/develops/{dataset_id}/delete_column/{column_id}/": { + "operationId": "deleteDatasetColumn", + "tag": "Datasets" + }, + "GET /model-hub/develops/{dataset_id}/download_dataset/": { + "operationId": "downloadDataset", + "tag": "Datasets" + }, + "GET /model-hub/dataset/{dataset_id}/json-schema/": { + "operationId": "getDatasetJsonSchema", + "tag": "Datasets" + }, + "GET /model-hub/dataset/{dataset_id}/eval-stats/": { + "operationId": "getDatasetEvalStats", + "tag": "Datasets" + }, + "GET /model-hub/dataset/{dataset_id}/annotation-summary/": { + "operationId": "getDatasetAnnotationSummary", + "tag": "Datasets" + }, + "POST /model-hub/datasets/{dataset_id}/duplicate/": { + "operationId": "duplicateDataset", + "tag": "Datasets" + }, + "GET /model-hub/datasets/{dataset_id}/derived-variables/": { + "operationId": "listDatasetDerivedVariables", + "tag": "Datasets" + }, + "GET /model-hub/datasets/get-base-columns/": { + "operationId": "listDatasetBaseColumns", + "tag": "Datasets" + }, + "GET /model-hub/experiments/v2/list/": { + "operationId": "listExperiments", + "tag": "Experiments" + }, + "POST /model-hub/experiments/v2/": { + "operationId": "createExperiment", + "tag": "Experiments" + }, + "GET /model-hub/experiments/v2/{experiment_id}/": { + "operationId": "getExperiment", + "tag": "Experiments" + }, + "PUT /model-hub/experiments/v2/{experiment_id}/": { + "operationId": "updateExperiment", + "tag": "Experiments" + }, + "DELETE /model-hub/experiments/v2/delete/": { + "operationId": "deleteExperiments", + "tag": "Experiments" + }, + "GET /model-hub/experiments/v2/{experiment_id}/rows/": { + "operationId": "listExperimentRows", + "tag": "Experiments" + }, + "GET /model-hub/experiments/v2/{experiment_id}/rows/{row_id}/": { + "operationId": "getExperimentRow", + "tag": "Experiments" + }, + "GET /model-hub/experiments/v2/{experiment_id}/stats/": { + "operationId": "getExperimentStats", + "tag": "Experiments" + }, + "GET /model-hub/experiments/v2/{experiment_id}/download/": { + "operationId": "downloadExperiment", + "tag": "Experiments" + }, + "POST /model-hub/experiments/v2/re-run/": { + "operationId": "rerunExperiment", + "tag": "Experiments" + }, + "POST /model-hub/experiments/v2/{experiment_id}/stop/": { + "operationId": "stopExperiment", + "tag": "Experiments" + }, + "POST /model-hub/experiments/v2/{experiment_id}/compare-experiments/": { + "operationId": "compareExperiments", + "tag": "Experiments" + }, + "GET /model-hub/experiments/v2/{experiment_id}/comparisons/": { + "operationId": "listExperimentComparisons", + "tag": "Experiments" + }, + "GET /model-hub/experiments/v2/{experiment_id}/json-schema/": { + "operationId": "getExperimentJsonSchema", + "tag": "Experiments" + }, + "GET /sdk/api/v1/simulation/runs/": { + "operationId": "listSimulationRuns", + "tag": "Simulations" + }, + "GET /sdk/api/v1/simulation/metrics/": { + "operationId": "listSimulationMetrics", + "tag": "Simulations" + }, + "GET /sdk/api/v1/simulation/analytics/": { + "operationId": "getSimulationAnalytics", + "tag": "Simulations" + }, + "GET /simulate/agent-definitions/": { + "operationId": "listAgentDefinitions", + "tag": "Simulation Agent Definitions" + }, + "POST /simulate/agent-definitions/create/": { + "operationId": "createAgentDefinition", + "tag": "Simulation Agent Definitions" + }, + "GET /simulate/agent-definitions/{agent_id}/": { + "operationId": "getAgentDefinition", + "tag": "Simulation Agent Definitions" + }, + "PUT /simulate/agent-definitions/{agent_id}/edit/": { + "operationId": "updateAgentDefinition", + "tag": "Simulation Agent Definitions" + }, + "DELETE /simulate/agent-definitions/{agent_id}/delete/": { + "operationId": "deleteAgentDefinition", + "tag": "Simulation Agent Definitions" + }, + "GET /simulate/run-tests/": { + "operationId": "listRunTests", + "tag": "Simulation Run Tests" + }, + "POST /simulate/run-tests/create/": { + "operationId": "createRunTest", + "tag": "Simulation Run Tests" + }, + "GET /simulate/run-tests/{run_test_id}/": { + "operationId": "getRunTest", + "tag": "Simulation Run Tests" + }, + "PATCH /simulate/run-tests/{run_test_id}/": { + "operationId": "updateRunTest", + "tag": "Simulation Run Tests" + }, + "DELETE /simulate/run-tests/{run_test_id}/": { + "operationId": "deleteRunTest", + "tag": "Simulation Run Tests" + }, + "POST /simulate/run-tests/{run_test_id}/execute/": { + "operationId": "executeRunTest", + "tag": "Simulation Run Tests" + }, + "GET /simulate/run-tests/{run_test_id}/status/": { + "operationId": "getRunTestStatus", + "tag": "Simulation Run Tests" + }, + "GET /simulate/run-tests/{run_test_id}/analytics/": { + "operationId": "getRunTestAnalytics", + "tag": "Simulation Run Tests" + }, + "GET /simulate/run-tests/{run_test_id}/executions/": { + "operationId": "listRunTestExecutions", + "tag": "Simulation Run Tests" + }, + "GET /simulate/run-tests/{run_test_id}/call-executions/": { + "operationId": "listRunTestCallExecutions", + "tag": "Simulation Run Tests" + }, + "GET /simulate/api/test-executions/": { + "operationId": "listTestExecutions", + "tag": "Simulation Test Executions" + }, + "GET /simulate/test-executions/{test_execution_id}/": { + "operationId": "getTestExecution", + "tag": "Simulation Test Executions" + }, + "GET /simulate/test-executions/{test_execution_id}/analytics/": { + "operationId": "getTestExecutionAnalytics", + "tag": "Simulation Test Executions" + }, + "GET /simulate/test-executions/{test_execution_id}/transcripts/": { + "operationId": "getTestExecutionTranscripts", + "tag": "Simulation Test Executions" + }, + "GET /simulate/test-executions/{test_execution_id}/kpis/": { + "operationId": "getTestExecutionKpis", + "tag": "Simulation Test Executions" + }, + "GET /simulate/test-executions/{test_execution_id}/performance-summary/": { + "operationId": "getTestExecutionPerformanceSummary", + "tag": "Simulation Test Executions" + }, + "POST /simulate/test-executions/{test_execution_id}/cancel/": { + "operationId": "cancelTestExecution", + "tag": "Simulation Test Executions" + }, + "GET /simulate/api/personas/": { + "operationId": "listPersonas", + "tag": "Simulation Personas" + }, + "POST /simulate/api/personas/": { + "operationId": "createPersona", + "tag": "Simulation Personas" + }, + "GET /simulate/api/personas/{id}/": { + "operationId": "getPersona", + "tag": "Simulation Personas" + }, + "PATCH /simulate/api/personas/{id}/": { + "operationId": "updatePersona", + "tag": "Simulation Personas" + }, + "DELETE /simulate/api/personas/{id}/": { + "operationId": "deletePersona", + "tag": "Simulation Personas" + }, + "GET /simulate/scenarios/": { + "operationId": "listScenarios", + "tag": "Simulation Scenarios" + }, + "POST /simulate/scenarios/create/": { + "operationId": "createScenario", + "tag": "Simulation Scenarios" + }, + "GET /simulate/scenarios/{scenario_id}/": { + "operationId": "getScenario", + "tag": "Simulation Scenarios" + }, + "PUT /simulate/scenarios/{scenario_id}/edit/": { + "operationId": "updateScenario", + "tag": "Simulation Scenarios" + }, + "DELETE /simulate/scenarios/{scenario_id}/delete/": { + "operationId": "deleteScenario", + "tag": "Simulation Scenarios" + }, + "GET /tracer/project/list_projects/": { + "operationId": "listTraceProjects", + "tag": "Tracing" + }, + "GET /tracer/trace/list_traces/": { + "operationId": "listTraces", + "tag": "Tracing" + }, + "GET /tracer/trace/{id}/": { + "operationId": "getTrace", + "tag": "Tracing" + }, + "GET /tracer/trace/list_voice_calls/": { + "operationId": "listVoiceCalls", + "tag": "Tracing" + }, + "GET /tracer/trace/voice_call_detail/": { + "operationId": "getVoiceCallDetail", + "tag": "Tracing" + }, + "GET /tracer/trace/get_properties/": { + "operationId": "listTraceProperties", + "tag": "Tracing" + }, + "PATCH /tracer/trace/{id}/tags/": { + "operationId": "updateTraceTags", + "tag": "Tracing" + }, + "POST /tracer/trace/get_graph_methods/": { + "operationId": "getTraceGraphMethods", + "tag": "Tracing" + }, + "GET /tracer/trace-session/list_sessions/": { + "operationId": "listTraceSessions", + "tag": "Tracing" + }, + "GET /tracer/trace-session/{id}/": { + "operationId": "getTraceSession", + "tag": "Tracing" + }, + "POST /tracer/trace-session/get_session_graph_data/": { + "operationId": "getTraceSessionGraphData", + "tag": "Tracing" + }, + "GET /tracer/users/": { + "operationId": "listTraceUsers", + "tag": "Tracing" + }, + "GET /tracer/get-annotation-labels/": { + "operationId": "listTraceAnnotationLabels", + "tag": "Tracing" + }, + "POST /tracer/bulk-annotation/": { + "operationId": "createBulkTraceAnnotation", + "tag": "Tracing" + }, + "GET /tracer/feed/issues/": { + "operationId": "listErrorFeedIssues", + "tag": "Tracing" + }, + "GET /tracer/feed/issues/{cluster_id}/": { + "operationId": "getErrorFeedIssue", + "tag": "Tracing" + }, + "GET /tracer/feed/issues/stats/": { + "operationId": "getErrorFeedIssueStats", + "tag": "Tracing" + }, + "GET /accounts/user-info/": { + "operationId": "getCurrentUser", + "tag": "Users" + }, + "GET /accounts/organization/members/": { + "operationId": "listOrganizationMembers", + "tag": "Users" + }, + "GET /accounts/workspace/list/": { + "operationId": "listWorkspaces", + "tag": "Users" + }, + "GET /accounts/workspace/{workspace_id}/members/": { + "operationId": "listWorkspaceMembers", + "tag": "Users" + }, + "POST /accounts/workspace/switch/": { + "operationId": "switchWorkspace", + "tag": "Users" + }, + "GET /tracer/user-alerts/": { + "operationId": "listAlerts", + "tag": "Alerts" + }, + "POST /tracer/user-alerts/": { + "operationId": "createAlert", + "tag": "Alerts" + }, + "GET /tracer/user-alerts/{id}/": { + "operationId": "getAlert", + "tag": "Alerts" + }, + "PATCH /tracer/user-alerts/{id}/": { + "operationId": "updateAlert", + "tag": "Alerts" + }, + "DELETE /tracer/user-alerts/{id}/": { + "operationId": "deleteAlert", + "tag": "Alerts" + }, + "GET /tracer/user-alerts/metric-options/": { + "operationId": "listAlertMetricOptions", + "tag": "Alerts" + }, + "POST /tracer/user-alerts/preview-graph/": { + "operationId": "previewAlertGraph", + "tag": "Alerts" + }, + "GET /tracer/user-alerts/{id}/graph/": { + "operationId": "getAlertGraph", + "tag": "Alerts" + }, + "GET /tracer/user-alerts/{id}/details/": { + "operationId": "getAlertDetails", + "tag": "Alerts" + }, + "POST /tracer/user-alerts/bulk-mute/": { + "operationId": "bulkMuteAlerts", + "tag": "Alerts" + }, + "GET /tracer/user-alert-logs/": { + "operationId": "listAlertLogs", + "tag": "Alerts" + }, + "GET /tracer/user-alert-logs/all/": { + "operationId": "listAllAlertLogs", + "tag": "Alerts" + }, + "GET /tracer/user-alert-logs/{id}/": { + "operationId": "getAlertLog", + "tag": "Alerts" + }, + "GET /tracer/user-alert-logs/{id}/list/": { + "operationId": "listAlertLogsForAlert", + "tag": "Alerts" + }, + "POST /tracer/user-alert-logs/resolve/": { + "operationId": "resolveAlertLogs", + "tag": "Alerts" + } +} diff --git a/openapi/sdk/wrapper-map.json b/openapi/sdk/wrapper-map.json new file mode 100644 index 0000000..e9746f0 --- /dev/null +++ b/openapi/sdk/wrapper-map.json @@ -0,0 +1,170 @@ +{ + "annotationQueues": { + "list": "listAnnotationQueues", + "create": "createAnnotationQueue", + "get": "getAnnotationQueue", + "update": "updateAnnotationQueue", + "archive": "archiveAnnotationQueue", + "updateStatus": "updateAnnotationQueueStatus", + "progress": "getAnnotationQueueProgress", + "analytics": "getAnnotationQueueAnalytics", + "agreement": "getAnnotationQueueAgreement", + "exportJson": "exportAnnotationQueue", + "listExportFields": "listAnnotationQueueExportFields", + "exportToDataset": "exportAnnotationQueueToDataset", + "addLabel": "addAnnotationQueueLabel", + "removeLabel": "removeAnnotationQueueLabel" + }, + "annotationQueueItems": { + "list": "listAnnotationQueueItems", + "add": "addAnnotationQueueItems", + "assign": "assignAnnotationQueueItems", + "remove": "removeAnnotationQueueItems", + "next": "getNextAnnotationQueueItem", + "getDetail": "getAnnotationQueueItemDetail", + "release": "releaseAnnotationQueueItem", + "complete": "completeAnnotationQueueItem", + "skip": "skipAnnotationQueueItem", + "listAnnotations": "listAnnotationQueueItemAnnotations", + "submitAnnotations": "submitAnnotationQueueItemAnnotations", + "importAnnotations": "importAnnotationQueueItemAnnotations" + }, + "annotationQueueDiscussion": { + "list": "listAnnotationQueueItemDiscussion", + "comment": "createAnnotationQueueItemComment", + "resolveThread": "resolveAnnotationQueueItemThread", + "reopenThread": "reopenAnnotationQueueItemThread", + "react": "toggleAnnotationQueueItemCommentReaction" + }, + "annotationQueueReview": { + "submit": "reviewAnnotationQueueItem" + }, + "datasets": { + "list": "listDatasets", + "listNames": "listDatasetNames", + "getTable": "getDatasetTable", + "getRow": "getDatasetRow", + "getColumns": "getDatasetColumns", + "createEmpty": "createEmptyDataset", + "createManual": "createDatasetManually", + "createFromFile": "createDatasetFromLocalFile", + "addRows": "addDatasetRows", + "addColumns": "addDatasetColumns", + "updateCell": "updateDatasetCell", + "deleteRow": "deleteDatasetRow", + "deleteColumn": "deleteDatasetColumn", + "download": "downloadDataset", + "jsonSchema": "getDatasetJsonSchema", + "evalStats": "getDatasetEvalStats", + "annotationSummary": "getDatasetAnnotationSummary", + "duplicate": "duplicateDataset", + "derivedVariables": "listDatasetDerivedVariables", + "baseColumns": "listDatasetBaseColumns" + }, + "experiments": { + "list": "listExperiments", + "create": "createExperiment", + "get": "getExperiment", + "update": "updateExperiment", + "delete": "deleteExperiments", + "rows": "listExperimentRows", + "row": "getExperimentRow", + "stats": "getExperimentStats", + "download": "downloadExperiment", + "rerun": "rerunExperiment", + "stop": "stopExperiment", + "compare": "compareExperiments", + "comparisons": "listExperimentComparisons", + "jsonSchema": "getExperimentJsonSchema" + }, + "simulations": { + "runs": "listSimulationRuns", + "metrics": "listSimulationMetrics", + "analytics": "getSimulationAnalytics" + }, + "simulationAgentDefinitions": { + "list": "listAgentDefinitions", + "create": "createAgentDefinition", + "get": "getAgentDefinition", + "update": "updateAgentDefinition", + "delete": "deleteAgentDefinition" + }, + "simulationRunTests": { + "list": "listRunTests", + "create": "createRunTest", + "get": "getRunTest", + "update": "updateRunTest", + "delete": "deleteRunTest", + "execute": "executeRunTest", + "status": "getRunTestStatus", + "analytics": "getRunTestAnalytics", + "executions": "listRunTestExecutions", + "callExecutions": "listRunTestCallExecutions" + }, + "simulationTestExecutions": { + "list": "listTestExecutions", + "get": "getTestExecution", + "analytics": "getTestExecutionAnalytics", + "transcripts": "getTestExecutionTranscripts", + "kpis": "getTestExecutionKpis", + "performanceSummary": "getTestExecutionPerformanceSummary", + "cancel": "cancelTestExecution" + }, + "simulationPersonas": { + "list": "listPersonas", + "create": "createPersona", + "get": "getPersona", + "update": "updatePersona", + "delete": "deletePersona" + }, + "simulationScenarios": { + "list": "listScenarios", + "create": "createScenario", + "get": "getScenario", + "update": "updateScenario", + "delete": "deleteScenario" + }, + "tracing": { + "projects": "listTraceProjects", + "traces": "listTraces", + "getTrace": "getTrace", + "voiceCalls": "listVoiceCalls", + "voiceCallDetail": "getVoiceCallDetail", + "properties": "listTraceProperties", + "updateTags": "updateTraceTags", + "graphMethods": "getTraceGraphMethods", + "sessions": "listTraceSessions", + "getSession": "getTraceSession", + "sessionGraph": "getTraceSessionGraphData", + "users": "listTraceUsers", + "annotationLabels": "listTraceAnnotationLabels", + "bulkAnnotation": "createBulkTraceAnnotation", + "issues": "listErrorFeedIssues", + "issue": "getErrorFeedIssue", + "issueStats": "getErrorFeedIssueStats" + }, + "users": { + "current": "getCurrentUser", + "organizationMembers": "listOrganizationMembers", + "workspaces": "listWorkspaces", + "workspaceMembers": "listWorkspaceMembers", + "switchWorkspace": "switchWorkspace" + }, + "alerts": { + "list": "listAlerts", + "create": "createAlert", + "get": "getAlert", + "update": "updateAlert", + "delete": "deleteAlert", + "metricOptions": "listAlertMetricOptions", + "previewGraph": "previewAlertGraph", + "graph": "getAlertGraph", + "details": "getAlertDetails", + "bulkMute": "bulkMuteAlerts", + "logs": "listAlertLogs", + "allLogs": "listAllAlertLogs", + "log": "getAlertLog", + "logsForAlert": "listAlertLogsForAlert", + "resolveLogs": "resolveAlertLogs" + } +} diff --git a/plans/openapi-generated-sdk.md b/plans/openapi-generated-sdk.md new file mode 100644 index 0000000..9fbf91d --- /dev/null +++ b/plans/openapi-generated-sdk.md @@ -0,0 +1,92 @@ +# OpenAPI Generated SDK Plan + +## Goal + +Generate low-level SDK clients from the backend OpenAPI contract, then expose a small handwritten wrapper that is stable and easy to consume. + +## Shape + +- `openapi/sdk/operation-aliases.json` patches backend `METHOD /path` entries into clean `operationId` values before generation. +- `openapi/sdk/wrapper-map.json` records the public wrapper namespace and the generated operation each method calls. +- `scripts/build-sdk-openapi.sh` converts the backend Swagger file to OpenAPI 3, filters public SDK paths, prunes unreachable schemas, and applies aliases. +- `scripts/generate-oss-sdk.sh` regenerates both generated clients: + - TypeScript: `typescript/futureagi/src/generated/openapi` + - Python: `python/fi/generated/openapi_client` +- `scripts/generate-go-java-sdk.sh` regenerates low-level generated clients: + - Go: `go/futureagi` + - Java: `java/futureagi` +- Handwritten wrappers live outside generated folders: + - TypeScript: `FutureAGIClient` in `typescript/futureagi/src/futureagi-client.ts` + - Python: `FutureAGIClient` in `python/fi/futureagi_client.py` +- The public generated spec currently covers the high-value management areas: + - annotation queues and annotation labels + - datasets and dataset table operations + - experiments v2 + - simulation run tests, test executions, personas, scenarios, and agent definitions + - tracing projects, traces, sessions, voice calls, annotations, and error feed issues + - user/workspace member lookups + - alert monitors, alert graphs, and alert logs + +## Usage + +TypeScript: + +```ts +import { FutureAGIClient } from '@future-agi/sdk'; + +const client = new FutureAGIClient({ apiKey, secretKey }); + +const queues = await client.annotationQueues.list({ limit: 20 }); +const item = await client.annotationQueues.items.next(queueId); +const datasets = await client.datasets.list({ page: 1 }); +const experimentRows = await client.experiments.rows(experimentId); +const runTests = await client.simulations.runTests.list(); +const traces = await client.tracing.traces({ project_id: projectId }); +const me = await client.users.current(); +const alertOptions = await client.alerts.metricOptions({ project_id: projectId }); + +await client.annotationQueues.discussion.comment(queueId, itemId, { + comment: '@reviewer can you check the thumbs label?', + mentioned_user_ids: [reviewerId], +}); +``` + +Python: + +```py +from fi import FutureAGIClient + +client = FutureAGIClient(api_key=api_key, secret_key=secret_key) + +queues = client.annotation_queues.list(limit=20) +item = client.annotation_queues.items.next(queue_id) +datasets = client.datasets.list(page=1) +experiment_rows = client.experiments.rows(experiment_id) +run_tests = client.simulations.run_tests.list() +traces = client.tracing.traces(project_id=project_id) +me = client.users.current() +alert_options = client.alerts.metric_options(project_id=project_id) + +client.annotation_queues.discussion.comment(queue_id, item_id, { + "comment": "@reviewer can you check the thumbs label?", + "mentioned_user_ids": [reviewer_id], +}) +``` + +## Regeneration + +Run from the repository root: + +```bash +scripts/generate-oss-sdk.sh +``` + +For Go and Java low-level clients: + +```bash +scripts/generate-go-java-sdk.sh +``` + +When backend names are ugly or unstable, update `openapi/sdk/operation-aliases.json` first. When the public wrapper should expose a different name, update `openapi/sdk/wrapper-map.json` and the handwritten wrapper. + +Generated files should not contain product-level ergonomics. Keep auth defaults, retries, examples, and naming choices in the handwritten wrapper. diff --git a/python/README.md b/python/README.md index 9e98913..98724da 100644 --- a/python/README.md +++ b/python/README.md @@ -52,9 +52,9 @@ pnpm add @futureagi/sdk --- -## 🔑 Authentication - -Get your API credentials from the [Future AGI Dashboard](https://app.futureagi.com): +## 🔑 Authentication + +Get your API credentials from the [Future AGI Dashboard](https://app.futureagi.com): ```bash export FI_API_KEY="your_api_key" @@ -67,12 +67,36 @@ Or set them programmatically: import os os.environ["FI_API_KEY"] = "your_api_key" os.environ["FI_SECRET_KEY"] = "your_secret_key" -os.environ["FI_BASE_URL"] = "https://api.futureagi.com" -``` - ---- - -## 🎯 Quick Start +os.environ["FI_BASE_URL"] = "https://api.futureagi.com" +``` + +### OpenAPI-backed client + +For generated API surfaces, use the wrapper client. It handles Future AGI +headers and keeps the generated code replaceable: + +```python +from fi import FutureAGIClient + +client = FutureAGIClient(api_key="...", secret_key="...") +queues = client.annotation_queues.list(limit=20) +next_item = client.annotation_queues.items.next("queue-id") + +datasets = client.datasets.list(page=1) +experiment_rows = client.experiments.rows("experiment-id") +run_tests = client.simulations.run_tests.list() +trace_projects = client.tracing.projects() +me = client.users.current() +alert_options = client.alerts.metric_options(project_id="project-id") +``` + +The low-level OpenAPI clients are regenerated with `scripts/generate-oss-sdk.sh`. +Public method names are controlled by `openapi/sdk/operation-aliases.json` and +`openapi/sdk/wrapper-map.json`. + +--- + +## 🎯 Quick Start ### 📊 Dataset Management @@ -243,11 +267,13 @@ kb_client.delete_kb(kb_ids=[kb.kb.id]) ## 🤝 Language Support -| Language | Package | Status | -|----------|---------|--------| -| **Python** | `futureagi` | ✅ Full Support | -| **TypeScript/JavaScript** | `@futureagi/sdk` | ✅ Full Support | -| **REST API** | cURL/HTTP | ✅ Available | +| Language | Package | Status | +|----------|---------|--------| +| **Python** | `futureagi` | ✅ Full Support | +| **TypeScript/JavaScript** | `@futureagi/sdk` | ✅ Full Support | +| **Go** | `github.com/future-agi/futureagi-sdk/go/futureagi` | Generated low-level client | +| **Java** | `com.futureagi:futureagi-sdk` | Generated low-level client | +| **REST API** | cURL/HTTP | ✅ Available | --- diff --git a/python/fi/__init__.py b/python/fi/__init__.py index 5cdc19f..7159af5 100644 --- a/python/fi/__init__.py +++ b/python/fi/__init__.py @@ -28,6 +28,7 @@ ImportAnnotationsResponse, ) from fi.annotations import Annotation, BulkAnnotationResponse +from fi.futureagi_client import FutureAGIAPIError, FutureAGIClient __all__ = [ "__version__", @@ -45,4 +46,6 @@ "ImportAnnotationsResponse", "Annotation", "BulkAnnotationResponse", + "FutureAGIClient", + "FutureAGIAPIError", ] diff --git a/python/fi/futureagi_client.py b/python/fi/futureagi_client.py new file mode 100644 index 0000000..33ba70b --- /dev/null +++ b/python/fi/futureagi_client.py @@ -0,0 +1,1041 @@ +import os +from collections.abc import Mapping +from typing import Any, Callable, TypeVar +from urllib.parse import quote +from uuid import UUID + +from fi.generated.openapi_client.api.annotation_queue_discussion import ( + create_annotation_queue_item_comment, + list_annotation_queue_item_discussion, + reopen_annotation_queue_item_thread, + resolve_annotation_queue_item_thread, + toggle_annotation_queue_item_comment_reaction, +) +from fi.generated.openapi_client.api.annotation_queue_items import ( + add_annotation_queue_items, + assign_annotation_queue_items, + complete_annotation_queue_item, + get_annotation_queue_item_detail, + get_next_annotation_queue_item, + import_annotation_queue_item_annotations, + list_annotation_queue_item_annotations, + list_annotation_queue_items, + release_annotation_queue_item, + remove_annotation_queue_items, + skip_annotation_queue_item, + submit_annotation_queue_item_annotations, +) +from fi.generated.openapi_client.api.annotation_queue_review import ( + review_annotation_queue_item, +) +from fi.generated.openapi_client.api.annotation_queues import ( + add_annotation_queue_label, + archive_annotation_queue, + create_annotation_queue, + export_annotation_queue, + export_annotation_queue_to_dataset, + get_annotation_queue, + get_annotation_queue_agreement, + get_annotation_queue_analytics, + get_annotation_queue_progress, + list_annotation_queue_export_fields, + list_annotation_queues, + remove_annotation_queue_label, + update_annotation_queue, + update_annotation_queue_status, +) +from fi.generated.openapi_client.client import Client as GeneratedOpenAPIClient +from fi.generated.openapi_client.models.add_items import AddItems +from fi.generated.openapi_client.models.annotation_queue import ( + AnnotationQueue as GeneratedAnnotationQueue, +) +from fi.generated.openapi_client.models.assign_items import AssignItems +from fi.generated.openapi_client.models.bulk_remove_items import BulkRemoveItems +from fi.generated.openapi_client.models.discussion_comment_request import ( + DiscussionCommentRequest, +) +from fi.generated.openapi_client.models.discussion_reaction_request import ( + DiscussionReactionRequest, +) +from fi.generated.openapi_client.models.discussion_thread_status_request import ( + DiscussionThreadStatusRequest, +) +from fi.generated.openapi_client.models.empty_request import EmptyRequest +from fi.generated.openapi_client.models.import_annotations import ImportAnnotations +from fi.generated.openapi_client.models.list_annotation_queue_items_ordering import ( + ListAnnotationQueueItemsOrdering, +) +from fi.generated.openapi_client.models.queue_export_to_dataset_request import ( + QueueExportToDatasetRequest, +) +from fi.generated.openapi_client.models.queue_item_navigation_request import ( + QueueItemNavigationRequest, +) +from fi.generated.openapi_client.models.queue_label_request import QueueLabelRequest +from fi.generated.openapi_client.models.queue_status_request import QueueStatusRequest +from fi.generated.openapi_client.models.review_item_request import ReviewItemRequest +from fi.generated.openapi_client.models.submit_annotations import SubmitAnnotations +from fi.utils.constants import API_KEY_ENVVAR_NAME, SECRET_KEY_ENVVAR_NAME, get_base_url +from fi.utils.errors import MissingAuthError, SDKException + +T = TypeVar("T") + + +class FutureAGIAPIError(SDKException): + def __init__(self, status_code: int, payload: Any) -> None: + self.status_code = status_code + self.payload = payload + super().__init__( + message=f"Future AGI API request failed with status {status_code}: {payload}" + ) + + def get_error_code(self) -> str: + return "FUTURE_AGI_API_ERROR" + + +def _as_uuid(value: str | UUID) -> UUID: + return value if isinstance(value, UUID) else UUID(str(value)) + + +def _clean(values: Mapping[str, Any]) -> dict[str, Any]: + return {key: value for key, value in values.items() if value is not None} + + +def _quote(value: str | UUID) -> str: + return quote(str(value), safe="") + + +def _coerce_model(model: type[T], value: Mapping[str, Any] | T | None) -> T: + if isinstance(value, model): + return value + if value is None: + value = {} + return model.from_dict(value) # type: ignore[attr-defined] + + +def _to_plain(value: Any) -> Any: + if hasattr(value, "to_dict"): + return _to_plain(value.to_dict()) + if isinstance(value, list): + return [_to_plain(item) for item in value] + if isinstance(value, tuple): + return tuple(_to_plain(item) for item in value) + if isinstance(value, dict): + return {key: _to_plain(item) for key, item in value.items()} + return value + + +def _ordering( + value: str | ListAnnotationQueueItemsOrdering | None, +) -> ListAnnotationQueueItemsOrdering | None: + if value is None or isinstance(value, ListAnnotationQueueItemsOrdering): + return value + return ListAnnotationQueueItemsOrdering(value) + + +class FutureAGIClient: + def __init__( + self, + api_key: str | None = None, + secret_key: str | None = None, + *, + fi_api_key: str | None = None, + fi_secret_key: str | None = None, + base_url: str | None = None, + headers: Mapping[str, str] | None = None, + timeout: float | None = None, + ) -> None: + self.api_key = api_key or fi_api_key or os.environ.get(API_KEY_ENVVAR_NAME) + self.secret_key = ( + secret_key or fi_secret_key or os.environ.get(SECRET_KEY_ENVVAR_NAME) + ) + if self.api_key is None or self.secret_key is None: + raise MissingAuthError(self.api_key, self.secret_key) + + self.generated_client = GeneratedOpenAPIClient( + base_url=(base_url or get_base_url()).rstrip("/"), + headers={ + "X-Api-Key": self.api_key, + "X-Secret-Key": self.secret_key, + **dict(headers or {}), + }, + timeout=timeout, + raise_on_unexpected_status=True, + ) + self.annotation_queues = AnnotationQueuesClient(self.generated_client) + self.datasets = DatasetsClient(self.generated_client) + self.experiments = ExperimentsClient(self.generated_client) + self.simulations = SimulationsClient(self.generated_client) + self.tracing = TracingClient(self.generated_client) + self.users = UsersClient(self.generated_client) + self.alerts = AlertsClient(self.generated_client) + + def close(self) -> None: + self.generated_client.get_httpx_client().close() + + def __enter__(self) -> "FutureAGIClient": + self.generated_client.__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + self.generated_client.__exit__(*args, **kwargs) + + +class BaseGeneratedClient: + def __init__(self, client: GeneratedOpenAPIClient) -> None: + self._client = client + + def _request( + self, sync_detailed: Callable[..., Any], *args: Any, **kwargs: Any + ) -> Any: + response = sync_detailed(*args, client=self._client, **kwargs) + status_code = int(response.status_code) + payload = _to_plain(response.parsed) + if status_code >= 400: + raise FutureAGIAPIError(status_code, payload) + return payload + + def _raw_request( + self, + method: str, + path: str, + *, + query: Mapping[str, Any] | None = None, + body: Any = None, + ) -> Any: + request_kwargs: dict[str, Any] = { + "method": method, + "url": path, + "params": _clean(query or {}), + } + if body is not None: + request_kwargs["json"] = body + response = self._client.get_httpx_client().request(**request_kwargs) + status_code = int(response.status_code) + if response.content: + try: + payload: Any = response.json() + except ValueError: + payload = response.text + else: + payload = None + if status_code >= 400: + raise FutureAGIAPIError(status_code, payload) + return payload + + +class AnnotationQueuesClient(BaseGeneratedClient): + def __init__(self, client: GeneratedOpenAPIClient) -> None: + super().__init__(client) + self.items = AnnotationQueueItemsClient(client) + self.discussion = AnnotationQueueDiscussionClient(client) + self.review = AnnotationQueueReviewClient(client) + + def list(self, **query: Any) -> Any: + return self._request(list_annotation_queues.sync_detailed, **_clean(query)) + + def create(self, body: Mapping[str, Any] | GeneratedAnnotationQueue) -> Any: + return self._request( + create_annotation_queue.sync_detailed, + body=_coerce_model(GeneratedAnnotationQueue, body), + ) + + def get(self, queue_id: str | UUID) -> Any: + return self._request(get_annotation_queue.sync_detailed, _as_uuid(queue_id)) + + def update( + self, queue_id: str | UUID, body: Mapping[str, Any] | GeneratedAnnotationQueue + ) -> Any: + return self._request( + update_annotation_queue.sync_detailed, + _as_uuid(queue_id), + body=_coerce_model(GeneratedAnnotationQueue, body), + ) + + def archive(self, queue_id: str | UUID) -> Any: + return self._request(archive_annotation_queue.sync_detailed, _as_uuid(queue_id)) + + def update_status( + self, queue_id: str | UUID, body: Mapping[str, Any] | QueueStatusRequest + ) -> Any: + return self._request( + update_annotation_queue_status.sync_detailed, + _as_uuid(queue_id), + body=_coerce_model(QueueStatusRequest, body), + ) + + def progress(self, queue_id: str | UUID) -> Any: + return self._request(get_annotation_queue_progress.sync_detailed, str(queue_id)) + + def analytics(self, queue_id: str | UUID) -> Any: + return self._request( + get_annotation_queue_analytics.sync_detailed, str(queue_id) + ) + + def agreement(self, queue_id: str | UUID) -> Any: + return self._request( + get_annotation_queue_agreement.sync_detailed, str(queue_id) + ) + + def export_json(self, queue_id: str | UUID) -> Any: + return self._request(export_annotation_queue.sync_detailed, str(queue_id)) + + def list_export_fields(self, queue_id: str | UUID) -> Any: + return self._request( + list_annotation_queue_export_fields.sync_detailed, str(queue_id) + ) + + def export_to_dataset( + self, + queue_id: str | UUID, + body: Mapping[str, Any] | QueueExportToDatasetRequest, + ) -> Any: + return self._request( + export_annotation_queue_to_dataset.sync_detailed, + str(queue_id), + body=_coerce_model(QueueExportToDatasetRequest, body), + ) + + def add_label( + self, queue_id: str | UUID, body: Mapping[str, Any] | QueueLabelRequest + ) -> Any: + return self._request( + add_annotation_queue_label.sync_detailed, + _as_uuid(queue_id), + body=_coerce_model(QueueLabelRequest, body), + ) + + def remove_label( + self, queue_id: str | UUID, body: Mapping[str, Any] | QueueLabelRequest + ) -> Any: + return self._request( + remove_annotation_queue_label.sync_detailed, + _as_uuid(queue_id), + body=_coerce_model(QueueLabelRequest, body), + ) + + +class AnnotationQueueItemsClient(BaseGeneratedClient): + def list(self, queue_id: str | UUID, **query: Any) -> Any: + if "ordering" in query: + query["ordering"] = _ordering(query["ordering"]) + return self._request( + list_annotation_queue_items.sync_detailed, str(queue_id), **_clean(query) + ) + + def add(self, queue_id: str | UUID, body: Mapping[str, Any] | AddItems) -> Any: + return self._request( + add_annotation_queue_items.sync_detailed, + str(queue_id), + body=_coerce_model(AddItems, body), + ) + + def assign( + self, queue_id: str | UUID, body: Mapping[str, Any] | AssignItems + ) -> Any: + return self._request( + assign_annotation_queue_items.sync_detailed, + str(queue_id), + body=_coerce_model(AssignItems, body), + ) + + def remove( + self, queue_id: str | UUID, body: Mapping[str, Any] | BulkRemoveItems + ) -> Any: + return self._request( + remove_annotation_queue_items.sync_detailed, + str(queue_id), + body=_coerce_model(BulkRemoveItems, body), + ) + + def next(self, queue_id: str | UUID, **query: Any) -> Any: + return self._request( + get_next_annotation_queue_item.sync_detailed, str(queue_id), **_clean(query) + ) + + def get_detail( + self, queue_id: str | UUID, item_id: str | UUID, **query: Any + ) -> Any: + return self._request( + get_annotation_queue_item_detail.sync_detailed, + str(queue_id), + _as_uuid(item_id), + **_clean(query), + ) + + def release( + self, + queue_id: str | UUID, + item_id: str | UUID, + body: Mapping[str, Any] | EmptyRequest | None = None, + ) -> Any: + return self._request( + release_annotation_queue_item.sync_detailed, + str(queue_id), + _as_uuid(item_id), + body=_coerce_model(EmptyRequest, body), + ) + + def complete( + self, + queue_id: str | UUID, + item_id: str | UUID, + body: Mapping[str, Any] | QueueItemNavigationRequest | None = None, + ) -> Any: + return self._request( + complete_annotation_queue_item.sync_detailed, + str(queue_id), + _as_uuid(item_id), + body=_coerce_model(QueueItemNavigationRequest, body), + ) + + def skip( + self, + queue_id: str | UUID, + item_id: str | UUID, + body: Mapping[str, Any] | QueueItemNavigationRequest | None = None, + ) -> Any: + return self._request( + skip_annotation_queue_item.sync_detailed, + str(queue_id), + _as_uuid(item_id), + body=_coerce_model(QueueItemNavigationRequest, body), + ) + + def list_annotations(self, queue_id: str | UUID, item_id: str | UUID) -> Any: + return self._request( + list_annotation_queue_item_annotations.sync_detailed, + str(queue_id), + _as_uuid(item_id), + ) + + def submit_annotations( + self, + queue_id: str | UUID, + item_id: str | UUID, + body: Mapping[str, Any] | SubmitAnnotations, + ) -> Any: + return self._request( + submit_annotation_queue_item_annotations.sync_detailed, + str(queue_id), + _as_uuid(item_id), + body=_coerce_model(SubmitAnnotations, body), + ) + + def import_annotations( + self, + queue_id: str | UUID, + item_id: str | UUID, + body: Mapping[str, Any] | ImportAnnotations, + ) -> Any: + return self._request( + import_annotation_queue_item_annotations.sync_detailed, + str(queue_id), + _as_uuid(item_id), + body=_coerce_model(ImportAnnotations, body), + ) + + +class AnnotationQueueDiscussionClient(BaseGeneratedClient): + def list(self, queue_id: str | UUID, item_id: str | UUID) -> Any: + return self._request( + list_annotation_queue_item_discussion.sync_detailed, + str(queue_id), + _as_uuid(item_id), + ) + + def comment( + self, + queue_id: str | UUID, + item_id: str | UUID, + body: Mapping[str, Any] | DiscussionCommentRequest, + ) -> Any: + return self._request( + create_annotation_queue_item_comment.sync_detailed, + str(queue_id), + _as_uuid(item_id), + body=_coerce_model(DiscussionCommentRequest, body), + ) + + def resolve_thread( + self, + queue_id: str | UUID, + item_id: str | UUID, + thread_id: str, + body: Mapping[str, Any] | DiscussionThreadStatusRequest | None = None, + ) -> Any: + return self._request( + resolve_annotation_queue_item_thread.sync_detailed, + str(queue_id), + _as_uuid(item_id), + thread_id, + body=_coerce_model(DiscussionThreadStatusRequest, body), + ) + + def reopen_thread( + self, + queue_id: str | UUID, + item_id: str | UUID, + thread_id: str, + body: Mapping[str, Any] | DiscussionThreadStatusRequest | None = None, + ) -> Any: + return self._request( + reopen_annotation_queue_item_thread.sync_detailed, + str(queue_id), + _as_uuid(item_id), + thread_id, + body=_coerce_model(DiscussionThreadStatusRequest, body), + ) + + def react( + self, + queue_id: str | UUID, + item_id: str | UUID, + comment_id: str, + body: Mapping[str, Any] | DiscussionReactionRequest, + ) -> Any: + return self._request( + toggle_annotation_queue_item_comment_reaction.sync_detailed, + str(queue_id), + _as_uuid(item_id), + comment_id, + body=_coerce_model(DiscussionReactionRequest, body), + ) + + +class AnnotationQueueReviewClient(BaseGeneratedClient): + def submit( + self, + queue_id: str | UUID, + item_id: str | UUID, + body: Mapping[str, Any] | ReviewItemRequest, + ) -> Any: + return self._request( + review_annotation_queue_item.sync_detailed, + str(queue_id), + _as_uuid(item_id), + body=_coerce_model(ReviewItemRequest, body), + ) + + +class DatasetsClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/model-hub/develops/get-datasets/", query=query) + + def list_names(self, **query: Any) -> Any: + return self._raw_request( + "GET", "/model-hub/develops/get-datasets-names/", query=query + ) + + def get_table(self, dataset_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/develops/{_quote(dataset_id)}/get-dataset-table/", + query=query, + ) + + def get_row(self, dataset_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/get-row-data/", + body=body, + ) + + def get_columns(self, dataset_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/dataset/columns/{_quote(dataset_id)}/" + ) + + def create_empty(self, body: Any) -> Any: + return self._raw_request( + "POST", "/model-hub/develops/create-empty-dataset/", body=body + ) + + def create_manual(self, body: Any) -> Any: + return self._raw_request( + "POST", "/model-hub/develops/create-dataset-manually/", body=body + ) + + def create_from_file(self, body: Any) -> Any: + return self._raw_request( + "POST", "/model-hub/develops/create-dataset-from-local-file/", body=body + ) + + def add_rows(self, dataset_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/add_rows/", + body=body, + ) + + def add_columns(self, dataset_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/add_columns/", + body=body, + ) + + def update_cell(self, dataset_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/update_cell_value/", + body=body, + ) + + def delete_row(self, dataset_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "DELETE", + f"/model-hub/develops/{_quote(dataset_id)}/delete_row/", + query=query, + ) + + def delete_column(self, dataset_id: str | UUID, column_id: str | UUID) -> Any: + return self._raw_request( + "DELETE", + f"/model-hub/develops/{_quote(dataset_id)}/delete_column/{_quote(column_id)}/", + ) + + def download(self, dataset_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/develops/{_quote(dataset_id)}/download_dataset/", + query=query, + ) + + def json_schema(self, dataset_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/dataset/{_quote(dataset_id)}/json-schema/" + ) + + def eval_stats(self, dataset_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/dataset/{_quote(dataset_id)}/eval-stats/", + query=query, + ) + + def annotation_summary(self, dataset_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/dataset/{_quote(dataset_id)}/annotation-summary/", + query=query, + ) + + def duplicate(self, dataset_id: str | UUID, body: Any | None = None) -> Any: + return self._raw_request( + "POST", + f"/model-hub/datasets/{_quote(dataset_id)}/duplicate/", + body=body, + ) + + def derived_variables(self, dataset_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/datasets/{_quote(dataset_id)}/derived-variables/" + ) + + def base_columns(self, **query: Any) -> Any: + return self._raw_request( + "GET", "/model-hub/datasets/get-base-columns/", query=query + ) + + +class ExperimentsClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/model-hub/experiments/v2/list/", query=query) + + def create(self, body: Any) -> Any: + return self._raw_request("POST", "/model-hub/experiments/v2/", body=body) + + def get(self, experiment_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/", + query=query, + ) + + def update(self, experiment_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PUT", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/", + body=body, + ) + + def delete(self, body: Any) -> Any: + return self._raw_request( + "DELETE", "/model-hub/experiments/v2/delete/", body=body + ) + + def rows(self, experiment_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/rows/", + query=query, + ) + + def row(self, experiment_id: str | UUID, row_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/rows/{_quote(row_id)}/", + query=query, + ) + + def stats(self, experiment_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/stats/", + query=query, + ) + + def download(self, experiment_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/download/", + query=query, + ) + + def rerun(self, body: Any) -> Any: + return self._raw_request("POST", "/model-hub/experiments/v2/re-run/", body=body) + + def stop(self, experiment_id: str | UUID, body: Any | None = None) -> Any: + return self._raw_request( + "POST", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/stop/", + body=body, + ) + + def compare(self, experiment_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/compare-experiments/", + body=body, + ) + + def comparisons(self, experiment_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/model-hub/experiments/v2/{_quote(experiment_id)}/comparisons/", + query=query, + ) + + def json_schema(self, experiment_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/experiments/v2/{_quote(experiment_id)}/json-schema/" + ) + + +class SimulationsClient(BaseGeneratedClient): + def __init__(self, client: GeneratedOpenAPIClient) -> None: + super().__init__(client) + self.agent_definitions = SimulationAgentDefinitionsClient(client) + self.run_tests = SimulationRunTestsClient(client) + self.test_executions = SimulationTestExecutionsClient(client) + self.personas = SimulationPersonasClient(client) + self.scenarios = SimulationScenariosClient(client) + + def runs(self, **query: Any) -> Any: + return self._raw_request("GET", "/sdk/api/v1/simulation/runs/", query=query) + + def metrics(self, **query: Any) -> Any: + return self._raw_request("GET", "/sdk/api/v1/simulation/metrics/", query=query) + + def analytics(self, **query: Any) -> Any: + return self._raw_request( + "GET", "/sdk/api/v1/simulation/analytics/", query=query + ) + + +class SimulationAgentDefinitionsClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/simulate/agent-definitions/", query=query) + + def create(self, body: Any) -> Any: + return self._raw_request( + "POST", "/simulate/agent-definitions/create/", body=body + ) + + def get(self, agent_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/simulate/agent-definitions/{_quote(agent_id)}/" + ) + + def update(self, agent_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PUT", f"/simulate/agent-definitions/{_quote(agent_id)}/edit/", body=body + ) + + def delete(self, agent_id: str | UUID) -> Any: + return self._raw_request( + "DELETE", f"/simulate/agent-definitions/{_quote(agent_id)}/delete/" + ) + + +class SimulationRunTestsClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/simulate/run-tests/", query=query) + + def create(self, body: Any) -> Any: + return self._raw_request("POST", "/simulate/run-tests/create/", body=body) + + def get(self, run_test_id: str | UUID) -> Any: + return self._raw_request("GET", f"/simulate/run-tests/{_quote(run_test_id)}/") + + def update(self, run_test_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PATCH", f"/simulate/run-tests/{_quote(run_test_id)}/", body=body + ) + + def delete(self, run_test_id: str | UUID) -> Any: + return self._raw_request( + "DELETE", f"/simulate/run-tests/{_quote(run_test_id)}/" + ) + + def execute(self, run_test_id: str | UUID, body: Any | None = None) -> Any: + return self._raw_request( + "POST", f"/simulate/run-tests/{_quote(run_test_id)}/execute/", body=body + ) + + def status(self, run_test_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/simulate/run-tests/{_quote(run_test_id)}/status/" + ) + + def analytics(self, run_test_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/analytics/", + query=query, + ) + + def executions(self, run_test_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/executions/", + query=query, + ) + + def call_executions(self, run_test_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/call-executions/", + query=query, + ) + + +class SimulationTestExecutionsClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/simulate/api/test-executions/", query=query) + + def get(self, test_execution_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/simulate/test-executions/{_quote(test_execution_id)}/" + ) + + def analytics(self, test_execution_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/test-executions/{_quote(test_execution_id)}/analytics/", + query=query, + ) + + def transcripts(self, test_execution_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/test-executions/{_quote(test_execution_id)}/transcripts/", + query=query, + ) + + def kpis(self, test_execution_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/test-executions/{_quote(test_execution_id)}/kpis/", + query=query, + ) + + def performance_summary(self, test_execution_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/test-executions/{_quote(test_execution_id)}/performance-summary/", + query=query, + ) + + def cancel(self, test_execution_id: str | UUID, body: Any | None = None) -> Any: + return self._raw_request( + "POST", + f"/simulate/test-executions/{_quote(test_execution_id)}/cancel/", + body=body, + ) + + +class SimulationPersonasClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/simulate/api/personas/", query=query) + + def create(self, body: Any) -> Any: + return self._raw_request("POST", "/simulate/api/personas/", body=body) + + def get(self, persona_id: str | UUID) -> Any: + return self._raw_request("GET", f"/simulate/api/personas/{_quote(persona_id)}/") + + def update(self, persona_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PATCH", f"/simulate/api/personas/{_quote(persona_id)}/", body=body + ) + + def delete(self, persona_id: str | UUID) -> Any: + return self._raw_request( + "DELETE", f"/simulate/api/personas/{_quote(persona_id)}/" + ) + + +class SimulationScenariosClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/simulate/scenarios/", query=query) + + def create(self, body: Any) -> Any: + return self._raw_request("POST", "/simulate/scenarios/create/", body=body) + + def get(self, scenario_id: str | UUID) -> Any: + return self._raw_request("GET", f"/simulate/scenarios/{_quote(scenario_id)}/") + + def update(self, scenario_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PUT", f"/simulate/scenarios/{_quote(scenario_id)}/edit/", body=body + ) + + def delete(self, scenario_id: str | UUID) -> Any: + return self._raw_request( + "DELETE", f"/simulate/scenarios/{_quote(scenario_id)}/delete/" + ) + + +class TracingClient(BaseGeneratedClient): + def projects(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/project/list_projects/", query=query) + + def traces(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/trace/list_traces/", query=query) + + def get_trace(self, trace_id: str | UUID) -> Any: + return self._raw_request("GET", f"/tracer/trace/{_quote(trace_id)}/") + + def voice_calls(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/trace/list_voice_calls/", query=query) + + def voice_call_detail(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/trace/voice_call_detail/", query=query) + + def properties(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/trace/get_properties/", query=query) + + def update_tags(self, trace_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PATCH", f"/tracer/trace/{_quote(trace_id)}/tags/", body=body + ) + + def graph_methods(self, body: Any) -> Any: + return self._raw_request("POST", "/tracer/trace/get_graph_methods/", body=body) + + def sessions(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/trace-session/list_sessions/", query=query) + + def get_session(self, session_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/tracer/trace-session/{_quote(session_id)}/" + ) + + def session_graph(self, body: Any) -> Any: + return self._raw_request( + "POST", "/tracer/trace-session/get_session_graph_data/", body=body + ) + + def users(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/users/", query=query) + + def annotation_labels(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/get-annotation-labels/", query=query) + + def bulk_annotation(self, body: Any) -> Any: + return self._raw_request("POST", "/tracer/bulk-annotation/", body=body) + + def issues(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/feed/issues/", query=query) + + def issue(self, cluster_id: str | UUID) -> Any: + return self._raw_request("GET", f"/tracer/feed/issues/{_quote(cluster_id)}/") + + def issue_stats(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/feed/issues/stats/", query=query) + + +class UsersClient(BaseGeneratedClient): + def current(self) -> Any: + return self._raw_request("GET", "/accounts/user-info/") + + def organization_members(self, **query: Any) -> Any: + return self._raw_request("GET", "/accounts/organization/members/", query=query) + + def workspaces(self, **query: Any) -> Any: + return self._raw_request("GET", "/accounts/workspace/list/", query=query) + + def workspace_members(self, workspace_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", f"/accounts/workspace/{_quote(workspace_id)}/members/", query=query + ) + + def switch_workspace(self, body: Any) -> Any: + return self._raw_request("POST", "/accounts/workspace/switch/", body=body) + + +class AlertsClient(BaseGeneratedClient): + def list(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/user-alerts/", query=query) + + def create(self, body: Any) -> Any: + return self._raw_request("POST", "/tracer/user-alerts/", body=body) + + def get(self, alert_id: str | UUID) -> Any: + return self._raw_request("GET", f"/tracer/user-alerts/{_quote(alert_id)}/") + + def update(self, alert_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PATCH", f"/tracer/user-alerts/{_quote(alert_id)}/", body=body + ) + + def delete(self, alert_id: str | UUID) -> Any: + return self._raw_request("DELETE", f"/tracer/user-alerts/{_quote(alert_id)}/") + + def metric_options(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/user-alerts/metric-options/", query=query) + + def preview_graph(self, body: Any) -> Any: + return self._raw_request("POST", "/tracer/user-alerts/preview-graph/", body=body) + + def graph(self, alert_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", f"/tracer/user-alerts/{_quote(alert_id)}/graph/", query=query + ) + + def details(self, alert_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/tracer/user-alerts/{_quote(alert_id)}/details/" + ) + + def bulk_mute(self, body: Any) -> Any: + return self._raw_request("POST", "/tracer/user-alerts/bulk-mute/", body=body) + + def logs(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/user-alert-logs/", query=query) + + def all_logs(self, **query: Any) -> Any: + return self._raw_request("GET", "/tracer/user-alert-logs/all/", query=query) + + def log(self, log_id: str | UUID) -> Any: + return self._raw_request("GET", f"/tracer/user-alert-logs/{_quote(log_id)}/") + + def logs_for_alert(self, alert_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", f"/tracer/user-alert-logs/{_quote(alert_id)}/list/", query=query + ) + + def resolve_logs(self, body: Any) -> Any: + return self._raw_request("POST", "/tracer/user-alert-logs/resolve/", body=body) diff --git a/python/fi/generated/__init__.py b/python/fi/generated/__init__.py new file mode 100644 index 0000000..696cb7f --- /dev/null +++ b/python/fi/generated/__init__.py @@ -0,0 +1 @@ +"""Generated low-level OpenAPI clients used by the public wrapper.""" diff --git a/python/fi/generated/openapi_client/__init__.py b/python/fi/generated/openapi_client/__init__.py new file mode 100644 index 0000000..1aa9b6d --- /dev/null +++ b/python/fi/generated/openapi_client/__init__.py @@ -0,0 +1,8 @@ +"""A client library for accessing Future AGI Public SDK API""" + +from .client import AuthenticatedClient, Client + +__all__ = ( + "AuthenticatedClient", + "Client", +) diff --git a/python/fi/generated/openapi_client/api/__init__.py b/python/fi/generated/openapi_client/api/__init__.py new file mode 100644 index 0000000..81f9fa2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/__init__.py @@ -0,0 +1 @@ +"""Contains methods for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/accounts/__init__.py b/python/fi/generated/openapi_client/api/accounts/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/accounts/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_reactivate_create.py b/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_reactivate_create.py new file mode 100644 index 0000000..103a6bf --- /dev/null +++ b/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_reactivate_create.py @@ -0,0 +1,217 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.member_remove import MemberRemove +from ...models.member_user_mutation_response import MemberUserMutationResponse +from ...types import Response + + +def _get_kwargs( + *, + body: MemberRemove, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/accounts/organization/members/reactivate/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse: + if response.status_code == 200: + response_200 = MemberUserMutationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + """POST /accounts/organization/members/reactivate/ + + Re-activates a deactivated org membership and restores workspace + memberships that were soft-deactivated during removal. If no prior + workspace memberships exist, the user is added to the default workspace. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | MemberUserMutationResponse + | None +): + """POST /accounts/organization/members/reactivate/ + + Re-activates a deactivated org membership and restores workspace + memberships that were soft-deactivated during removal. If no prior + workspace memberships exist, the user is added to the default workspace. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + """POST /accounts/organization/members/reactivate/ + + Re-activates a deactivated org membership and restores workspace + memberships that were soft-deactivated during removal. If no prior + workspace memberships exist, the user is added to the default workspace. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | MemberUserMutationResponse + | None +): + """POST /accounts/organization/members/reactivate/ + + Re-activates a deactivated org membership and restores workspace + memberships that were soft-deactivated during removal. If no prior + workspace memberships exist, the user is added to the default workspace. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_remove_delete.py b/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_remove_delete.py new file mode 100644 index 0000000..10b0152 --- /dev/null +++ b/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_remove_delete.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.member_remove import MemberRemove +from ...models.member_user_mutation_response import MemberUserMutationResponse +from ...types import Response + + +def _get_kwargs( + *, + body: MemberRemove, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/accounts/organization/members/remove/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse: + if response.status_code == 200: + response_200 = MemberUserMutationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + """DELETE /accounts/organization/members/remove/ + + Soft-deactivates OrganizationMembership and cascades to workspace + memberships. Signals handle Redis clear + audit log. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | MemberUserMutationResponse + | None +): + """DELETE /accounts/organization/members/remove/ + + Soft-deactivates OrganizationMembership and cascades to workspace + memberships. Signals handle Redis clear + audit log. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + """DELETE /accounts/organization/members/remove/ + + Soft-deactivates OrganizationMembership and cascades to workspace + memberships. Signals handle Redis clear + audit log. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: MemberRemove, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | MemberUserMutationResponse + | None +): + """DELETE /accounts/organization/members/remove/ + + Soft-deactivates OrganizationMembership and cascades to workspace + memberships. Signals handle Redis clear + audit log. + + Args: + body (MemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_role_create.py b/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_role_create.py new file mode 100644 index 0000000..b3ceaa3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/accounts/accounts_organization_members_role_create.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.member_role_update import MemberRoleUpdate +from ...models.member_role_update_response import MemberRoleUpdateResponse +from ...types import Response + + +def _get_kwargs( + *, + body: MemberRoleUpdate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/accounts/organization/members/role/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse: + if response.status_code == 200: + response_200 = MemberRoleUpdateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: MemberRoleUpdate, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse +]: + """POST /accounts/organization/members/role/ + + Update a member's org level and/or workspace level. + + Args: + body (MemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: MemberRoleUpdate, +) -> ( + AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse | None +): + """POST /accounts/organization/members/role/ + + Update a member's org level and/or workspace level. + + Args: + body (MemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: MemberRoleUpdate, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse +]: + """POST /accounts/organization/members/role/ + + Update a member's org level and/or workspace level. + + Args: + body (MemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: MemberRoleUpdate, +) -> ( + AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse | None +): + """POST /accounts/organization/members/role/ + + Update a member's org level and/or workspace level. + + Args: + body (MemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberRoleUpdateResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_remove_delete.py b/python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_remove_delete.py new file mode 100644 index 0000000..b672aad --- /dev/null +++ b/python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_remove_delete.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.member_user_mutation_response import MemberUserMutationResponse +from ...models.workspace_member_remove import WorkspaceMemberRemove +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + *, + body: WorkspaceMemberRemove, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/accounts/workspace/{workspace_id}/members/remove/".format( + workspace_id=quote(str(workspace_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse: + if response.status_code == 200: + response_200 = MemberUserMutationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRemove, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + """DELETE /accounts/workspace//members/remove/ + + Remove a member from a workspace only (keeps org membership). + + Args: + workspace_id (str): + body (WorkspaceMemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRemove, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | MemberUserMutationResponse + | None +): + """DELETE /accounts/workspace//members/remove/ + + Remove a member from a workspace only (keeps org membership). + + Args: + workspace_id (str): + body (WorkspaceMemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRemove, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse +]: + """DELETE /accounts/workspace//members/remove/ + + Remove a member from a workspace only (keeps org membership). + + Args: + workspace_id (str): + body (WorkspaceMemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRemove, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | MemberUserMutationResponse + | None +): + """DELETE /accounts/workspace//members/remove/ + + Remove a member from a workspace only (keeps org membership). + + Args: + workspace_id (str): + body (WorkspaceMemberRemove): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberUserMutationResponse + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_role_create.py b/python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_role_create.py new file mode 100644 index 0000000..426f81d --- /dev/null +++ b/python/fi/generated/openapi_client/api/accounts/accounts_workspace_members_role_create.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.workspace_member_role_update import WorkspaceMemberRoleUpdate +from ...models.workspace_member_role_update_response import ( + WorkspaceMemberRoleUpdateResponse, +) +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + *, + body: WorkspaceMemberRoleUpdate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/accounts/workspace/{workspace_id}/members/role/".format( + workspace_id=quote(str(workspace_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceMemberRoleUpdateResponse +): + if response.status_code == 200: + response_200 = WorkspaceMemberRoleUpdateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceMemberRoleUpdateResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRoleUpdate, +) -> Response[ + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceMemberRoleUpdateResponse +]: + """POST /accounts/workspace//members/role/ + + Update a member's workspace role. + + Args: + workspace_id (str): + body (WorkspaceMemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceMemberRoleUpdateResponse] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRoleUpdate, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceMemberRoleUpdateResponse + | None +): + """POST /accounts/workspace//members/role/ + + Update a member's workspace role. + + Args: + workspace_id (str): + body (WorkspaceMemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceMemberRoleUpdateResponse + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRoleUpdate, +) -> Response[ + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceMemberRoleUpdateResponse +]: + """POST /accounts/workspace//members/role/ + + Update a member's workspace role. + + Args: + workspace_id (str): + body (WorkspaceMemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceMemberRoleUpdateResponse] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + body: WorkspaceMemberRoleUpdate, +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceMemberRoleUpdateResponse + | None +): + """POST /accounts/workspace//members/role/ + + Update a member's workspace role. + + Args: + workspace_id (str): + body (WorkspaceMemberRoleUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceMemberRoleUpdateResponse + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/__init__.py b/python/fi/generated/openapi_client/api/alerts/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/alerts/bulk_mute_alerts.py b/python/fi/generated/openapi_client/api/alerts/bulk_mute_alerts.py new file mode 100644 index 0000000..d4e7354 --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/bulk_mute_alerts.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + *, + body: UserAlertMonitor, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/user-alerts/bulk-mute/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 201: + response_201 = UserAlertMonitor.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/create_alert.py b/python/fi/generated/openapi_client/api/alerts/create_alert.py new file mode 100644 index 0000000..20798c9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/create_alert.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + *, + body: UserAlertMonitor, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/user-alerts/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 201: + response_201 = UserAlertMonitor.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/delete_alert.py b/python/fi/generated/openapi_client/api/alerts/delete_alert.py new file mode 100644 index 0000000..9e9a72d --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/delete_alert.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/tracer/user-alerts/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/get_alert.py b/python/fi/generated/openapi_client/api/alerts/get_alert.py new file mode 100644 index 0000000..91bd32e --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/get_alert.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alerts/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 200: + response_200 = UserAlertMonitor.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/get_alert_details.py b/python/fi/generated/openapi_client/api/alerts/get_alert_details.py new file mode 100644 index 0000000..f6ad4af --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/get_alert_details.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alerts/{id}/details/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 200: + response_200 = UserAlertMonitor.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/get_alert_graph.py b/python/fi/generated/openapi_client/api/alerts/get_alert_graph.py new file mode 100644 index 0000000..35b214c --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/get_alert_graph.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alerts/{id}/graph/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 200: + response_200 = UserAlertMonitor.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """Returns time-series data for a monitor's metric, suitable for graphing. + + Accepts `start_date` and `end_date` query parameters (ISO 8601 format). + If not provided, it defaults to the last 7 days. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """Returns time-series data for a monitor's metric, suitable for graphing. + + Accepts `start_date` and `end_date` query parameters (ISO 8601 format). + If not provided, it defaults to the last 7 days. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """Returns time-series data for a monitor's metric, suitable for graphing. + + Accepts `start_date` and `end_date` query parameters (ISO 8601 format). + If not provided, it defaults to the last 7 days. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """Returns time-series data for a monitor's metric, suitable for graphing. + + Accepts `start_date` and `end_date` query parameters (ISO 8601 format). + If not provided, it defaults to the last 7 days. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/get_alert_log.py b/python/fi/generated/openapi_client/api/alerts/get_alert_log.py new file mode 100644 index 0000000..86e33ba --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/get_alert_log.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_log import UserAlertMonitorLog +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alert-logs/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitorLog: + if response.status_code == 200: + response_200 = UserAlertMonitorLog.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/list_alert_logs.py b/python/fi/generated/openapi_client/api/alerts/list_alert_logs.py new file mode 100644 index 0000000..ffd4f9f --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/list_alert_logs.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_alert_logs_response_200 import ListAlertLogsResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alert-logs/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListAlertLogsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListAlertLogsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListAlertLogsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListAlertLogsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAlertLogsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListAlertLogsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAlertLogsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListAlertLogsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAlertLogsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListAlertLogsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAlertLogsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/list_alert_logs_for_alert.py b/python/fi/generated/openapi_client/api/alerts/list_alert_logs_for_alert.py new file mode 100644 index 0000000..fddab51 --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/list_alert_logs_for_alert.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_log import UserAlertMonitorLog +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alert-logs/{id}/list/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitorLog: + if response.status_code == 200: + response_200 = UserAlertMonitorLog.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/list_alert_metric_options.py b/python/fi/generated/openapi_client/api/alerts/list_alert_metric_options.py new file mode 100644 index 0000000..53cd642 --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/list_alert_metric_options.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_metric_options_response import ( + UserAlertMonitorMetricOptionsResponse, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alerts/metric-options/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorMetricOptionsResponse +): + if response.status_code == 200: + response_200 = UserAlertMonitorMetricOptionsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorMetricOptionsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorMetricOptionsResponse +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorMetricOptionsResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorMetricOptionsResponse + | None +): + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorMetricOptionsResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorMetricOptionsResponse +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorMetricOptionsResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorMetricOptionsResponse + | None +): + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorMetricOptionsResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/list_alerts.py b/python/fi/generated/openapi_client/api/alerts/list_alerts.py new file mode 100644 index 0000000..3d51345 --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/list_alerts.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_alerts_response_200 import ListAlertsResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alerts/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListAlertsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListAlertsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListAlertsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListAlertsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAlertsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListAlertsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAlertsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListAlertsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAlertsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListAlertsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAlertsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/list_all_alert_logs.py b/python/fi/generated/openapi_client/api/alerts/list_all_alert_logs.py new file mode 100644 index 0000000..b62d06e --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/list_all_alert_logs.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_all_alert_logs_response_200 import ListAllAlertLogsResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alert-logs/all/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListAllAlertLogsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListAllAlertLogsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListAllAlertLogsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListAllAlertLogsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAllAlertLogsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListAllAlertLogsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAllAlertLogsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListAllAlertLogsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAllAlertLogsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListAllAlertLogsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAllAlertLogsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/preview_alert_graph.py b/python/fi/generated/openapi_client/api/alerts/preview_alert_graph.py new file mode 100644 index 0000000..83834be --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/preview_alert_graph.py @@ -0,0 +1,162 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + *, + body: UserAlertMonitor, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/user-alerts/preview-graph/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 201: + response_201 = UserAlertMonitor.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. + Accepts monitor configuration in the request body. + + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. + Accepts monitor configuration in the request body. + + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. + Accepts monitor configuration in the request body. + + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. + Accepts monitor configuration in the request body. + + Args: + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/resolve_alert_logs.py b/python/fi/generated/openapi_client/api/alerts/resolve_alert_logs.py new file mode 100644 index 0000000..a682340 --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/resolve_alert_logs.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_log import UserAlertMonitorLog +from ...types import Response + + +def _get_kwargs( + *, + body: UserAlertMonitorLog, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/user-alert-logs/resolve/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitorLog: + if response.status_code == 201: + response_201 = UserAlertMonitorLog.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/alerts/update_alert.py b/python/fi/generated/openapi_client/api/alerts/update_alert.py new file mode 100644 index 0000000..a41250f --- /dev/null +++ b/python/fi/generated/openapi_client/api/alerts/update_alert.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UserAlertMonitor, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/tracer/user-alerts/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 200: + response_200 = UserAlertMonitor.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_discussion/__init__.py b/python/fi/generated/openapi_client/api/annotation_queue_discussion/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_discussion/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/annotation_queue_discussion/create_annotation_queue_item_comment.py b/python/fi/generated/openapi_client/api/annotation_queue_discussion/create_annotation_queue_item_comment.py new file mode 100644 index 0000000..95d6196 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_discussion/create_annotation_queue_item_comment.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.discussion_comment_request import DiscussionCommentRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_discussion_response import QueueDiscussionResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: DiscussionCommentRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse: + if response.status_code == 200: + response_200 = QueueDiscussionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: DiscussionCommentRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + body (DiscussionCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: DiscussionCommentRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + body (DiscussionCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: DiscussionCommentRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + body (DiscussionCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: DiscussionCommentRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + body (DiscussionCommentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_discussion/list_annotation_queue_item_discussion.py b/python/fi/generated/openapi_client/api/annotation_queue_discussion/list_annotation_queue_item_discussion.py new file mode 100644 index 0000000..172417a --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_discussion/list_annotation_queue_item_discussion.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_discussion_response import QueueDiscussionResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse: + if response.status_code == 200: + response_200 = QueueDiscussionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """List or create non-blocking discussion comments for a queue item. + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_discussion/reopen_annotation_queue_item_thread.py b/python/fi/generated/openapi_client/api/annotation_queue_discussion/reopen_annotation_queue_item_thread.py new file mode 100644 index 0000000..9ad517a --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_discussion/reopen_annotation_queue_item_thread.py @@ -0,0 +1,232 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.discussion_thread_status_request import DiscussionThreadStatusRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_discussion_response import QueueDiscussionResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + thread_id: str, + *, + body: DiscussionThreadStatusRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + thread_id=quote(str(thread_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse: + if response.status_code == 200: + response_200 = QueueDiscussionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + thread_id=thread_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + thread_id=thread_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + thread_id=thread_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + thread_id=thread_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_discussion/resolve_annotation_queue_item_thread.py b/python/fi/generated/openapi_client/api/annotation_queue_discussion/resolve_annotation_queue_item_thread.py new file mode 100644 index 0000000..35da255 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_discussion/resolve_annotation_queue_item_thread.py @@ -0,0 +1,232 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.discussion_thread_status_request import DiscussionThreadStatusRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_discussion_response import QueueDiscussionResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + thread_id: str, + *, + body: DiscussionThreadStatusRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + thread_id=quote(str(thread_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse: + if response.status_code == 200: + response_200 = QueueDiscussionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + thread_id=thread_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + thread_id=thread_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + thread_id=thread_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + thread_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionThreadStatusRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """ + Args: + queue_id (str): + id (UUID): + thread_id (str): + body (DiscussionThreadStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + thread_id=thread_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_discussion/toggle_annotation_queue_item_comment_reaction.py b/python/fi/generated/openapi_client/api/annotation_queue_discussion/toggle_annotation_queue_item_comment_reaction.py new file mode 100644 index 0000000..dd5e608 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_discussion/toggle_annotation_queue_item_comment_reaction.py @@ -0,0 +1,236 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.discussion_reaction_request import DiscussionReactionRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_discussion_response import QueueDiscussionResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + comment_id: str, + *, + body: DiscussionReactionRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + comment_id=quote(str(comment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse: + if response.status_code == 200: + response_200 = QueueDiscussionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + comment_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionReactionRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """Toggle the current user's reaction on a discussion comment. + + Args: + queue_id (str): + id (UUID): + comment_id (str): + body (DiscussionReactionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + comment_id=comment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + comment_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionReactionRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """Toggle the current user's reaction on a discussion comment. + + Args: + queue_id (str): + id (UUID): + comment_id (str): + body (DiscussionReactionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + comment_id=comment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + comment_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionReactionRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse +]: + """Toggle the current user's reaction on a discussion comment. + + Args: + queue_id (str): + id (UUID): + comment_id (str): + body (DiscussionReactionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + comment_id=comment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + comment_id: str, + *, + client: AuthenticatedClient | Client, + body: DiscussionReactionRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse | None: + """Toggle the current user's reaction on a discussion comment. + + Args: + queue_id (str): + id (UUID): + comment_id (str): + body (DiscussionReactionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDiscussionResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + comment_id=comment_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/__init__.py b/python/fi/generated/openapi_client/api/annotation_queue_items/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/add_annotation_queue_items.py b/python/fi/generated/openapi_client/api/annotation_queue_items/add_annotation_queue_items.py new file mode 100644 index 0000000..5a777b4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/add_annotation_queue_items.py @@ -0,0 +1,220 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.add_items import AddItems +from ...models.api_selection_too_large_error import ApiSelectionTooLargeError +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_add_items_response import QueueAddItemsResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + *, + body: AddItems, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/add-items/".format( + queue_id=quote(str(queue_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiSelectionTooLargeError + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAddItemsResponse +): + if response.status_code == 200: + response_200 = QueueAddItemsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiSelectionTooLargeError.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiSelectionTooLargeError + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAddItemsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AddItems, +) -> Response[ + ApiSelectionTooLargeError + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAddItemsResponse +]: + """ + Args: + queue_id (str): + body (AddItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSelectionTooLargeError | ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddItemsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AddItems, +) -> ( + ApiSelectionTooLargeError + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAddItemsResponse + | None +): + """ + Args: + queue_id (str): + body (AddItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSelectionTooLargeError | ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddItemsResponse + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AddItems, +) -> Response[ + ApiSelectionTooLargeError + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAddItemsResponse +]: + """ + Args: + queue_id (str): + body (AddItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSelectionTooLargeError | ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddItemsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AddItems, +) -> ( + ApiSelectionTooLargeError + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAddItemsResponse + | None +): + """ + Args: + queue_id (str): + body (AddItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSelectionTooLargeError | ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddItemsResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/assign_annotation_queue_items.py b/python/fi/generated/openapi_client/api/annotation_queue_items/assign_annotation_queue_items.py new file mode 100644 index 0000000..6c67529 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/assign_annotation_queue_items.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.assign_items import AssignItems +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_assign_items_response import QueueAssignItemsResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + *, + body: AssignItems, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/assign/".format( + queue_id=quote(str(queue_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse: + if response.status_code == 200: + response_200 = QueueAssignItemsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AssignItems, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse +]: + """Assign items to one or more annotators. + + Args: + queue_id (str): + body (AssignItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AssignItems, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse | None +): + """Assign items to one or more annotators. + + Args: + queue_id (str): + body (AssignItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AssignItems, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse +]: + """Assign items to one or more annotators. + + Args: + queue_id (str): + body (AssignItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AssignItems, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse | None +): + """Assign items to one or more annotators. + + Args: + queue_id (str): + body (AssignItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAssignItemsResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/complete_annotation_queue_item.py b/python/fi/generated/openapi_client/api/annotation_queue_items/complete_annotation_queue_item.py new file mode 100644 index 0000000..ebe2ad2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/complete_annotation_queue_item.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_item_navigation_request import QueueItemNavigationRequest +from ...models.queue_navigation_response import QueueNavigationResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: QueueItemNavigationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/complete/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse: + if response.status_code == 200: + response_200 = QueueNavigationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse +]: + """Mark item as completed and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse | None: + """Mark item as completed and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse +]: + """Mark item as completed and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse | None: + """Mark item as completed and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/get_annotation_queue_item_detail.py b/python/fi/generated/openapi_client/api/annotation_queue_items/get_annotation_queue_item_detail.py new file mode 100644 index 0000000..1115a02 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/get_annotation_queue_item_detail.py @@ -0,0 +1,325 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_annotate_detail_response import QueueAnnotateDetailResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + annotator_id: UUID | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, + reserve: bool | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_annotator_id: str | Unset = UNSET + if not isinstance(annotator_id, Unset): + json_annotator_id = str(annotator_id) + params["annotator_id"] = json_annotator_id + + params["include_completed"] = include_completed + + params["view_mode"] = view_mode + + params["review_status"] = review_status + + params["exclude_review_status"] = exclude_review_status + + params["include_all_annotations"] = include_all_annotations + + params["reserve"] = reserve + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse: + if response.status_code == 200: + response_200 = QueueAnnotateDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + annotator_id: UUID | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, + reserve: bool | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse +]: + """Get full annotation workspace data for an item. + + Args: + queue_id (str): + id (UUID): + annotator_id (UUID | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_all_annotations (bool | Unset): + reserve (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + annotator_id=annotator_id, + include_completed=include_completed, + view_mode=view_mode, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_all_annotations=include_all_annotations, + reserve=reserve, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + annotator_id: UUID | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, + reserve: bool | Unset = UNSET, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAnnotateDetailResponse + | None +): + """Get full annotation workspace data for an item. + + Args: + queue_id (str): + id (UUID): + annotator_id (UUID | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_all_annotations (bool | Unset): + reserve (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + annotator_id=annotator_id, + include_completed=include_completed, + view_mode=view_mode, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_all_annotations=include_all_annotations, + reserve=reserve, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + annotator_id: UUID | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, + reserve: bool | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse +]: + """Get full annotation workspace data for an item. + + Args: + queue_id (str): + id (UUID): + annotator_id (UUID | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_all_annotations (bool | Unset): + reserve (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + annotator_id=annotator_id, + include_completed=include_completed, + view_mode=view_mode, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_all_annotations=include_all_annotations, + reserve=reserve, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + annotator_id: UUID | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, + reserve: bool | Unset = UNSET, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueAnnotateDetailResponse + | None +): + """Get full annotation workspace data for an item. + + Args: + queue_id (str): + id (UUID): + annotator_id (UUID | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_all_annotations (bool | Unset): + reserve (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnnotateDetailResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + annotator_id=annotator_id, + include_completed=include_completed, + view_mode=view_mode, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_all_annotations=include_all_annotations, + reserve=reserve, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/get_next_annotation_queue_item.py b/python/fi/generated/openapi_client/api/annotation_queue_items/get_next_annotation_queue_item.py new file mode 100644 index 0000000..cb73321 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/get_next_annotation_queue_item.py @@ -0,0 +1,359 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_next_item_response import QueueNextItemResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + queue_id: str, + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + exclude: str | Unset = UNSET, + before: UUID | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["exclude"] = exclude + + json_before: str | Unset = UNSET + if not isinstance(before, Unset): + json_before = str(before) + params["before"] = json_before + + params["review_status"] = review_status + + params["exclude_review_status"] = exclude_review_status + + params["include_completed"] = include_completed + + params["view_mode"] = view_mode + + params["include_all_annotations"] = include_all_annotations + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/items/next-item/".format( + queue_id=quote(str(queue_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse: + if response.status_code == 200: + response_200 = QueueNextItemResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + exclude: str | Unset = UNSET, + before: UUID | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse +]: + """Get the next or previous item in the queue. + + Query params: + exclude: comma-separated item IDs to skip + before: item ID — returns the item immediately before this one in order + review_status: optional review status filter (for reviewer queues) + exclude_review_status: optional review status to omit (for annotator queues) + include_completed: when true, navigation can visit completed items too + + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + exclude (str | Unset): + before (UUID | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + include_all_annotations (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + page=page, + limit=limit, + exclude=exclude, + before=before, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_completed=include_completed, + view_mode=view_mode, + include_all_annotations=include_all_annotations, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + exclude: str | Unset = UNSET, + before: UUID | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse | None: + """Get the next or previous item in the queue. + + Query params: + exclude: comma-separated item IDs to skip + before: item ID — returns the item immediately before this one in order + review_status: optional review status filter (for reviewer queues) + exclude_review_status: optional review status to omit (for annotator queues) + include_completed: when true, navigation can visit completed items too + + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + exclude (str | Unset): + before (UUID | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + include_all_annotations (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + page=page, + limit=limit, + exclude=exclude, + before=before, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_completed=include_completed, + view_mode=view_mode, + include_all_annotations=include_all_annotations, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + exclude: str | Unset = UNSET, + before: UUID | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse +]: + """Get the next or previous item in the queue. + + Query params: + exclude: comma-separated item IDs to skip + before: item ID — returns the item immediately before this one in order + review_status: optional review status filter (for reviewer queues) + exclude_review_status: optional review status to omit (for annotator queues) + include_completed: when true, navigation can visit completed items too + + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + exclude (str | Unset): + before (UUID | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + include_all_annotations (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + page=page, + limit=limit, + exclude=exclude, + before=before, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_completed=include_completed, + view_mode=view_mode, + include_all_annotations=include_all_annotations, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + exclude: str | Unset = UNSET, + before: UUID | Unset = UNSET, + review_status: str | Unset = UNSET, + exclude_review_status: str | Unset = UNSET, + include_completed: bool | Unset = UNSET, + view_mode: str | Unset = UNSET, + include_all_annotations: bool | Unset = UNSET, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse | None: + """Get the next or previous item in the queue. + + Query params: + exclude: comma-separated item IDs to skip + before: item ID — returns the item immediately before this one in order + review_status: optional review status filter (for reviewer queues) + exclude_review_status: optional review status to omit (for annotator queues) + include_completed: when true, navigation can visit completed items too + + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + exclude (str | Unset): + before (UUID | Unset): + review_status (str | Unset): + exclude_review_status (str | Unset): + include_completed (bool | Unset): + view_mode (str | Unset): + include_all_annotations (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNextItemResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + page=page, + limit=limit, + exclude=exclude, + before=before, + review_status=review_status, + exclude_review_status=exclude_review_status, + include_completed=include_completed, + view_mode=view_mode, + include_all_annotations=include_all_annotations, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/import_annotation_queue_item_annotations.py b/python/fi/generated/openapi_client/api/annotation_queue_items/import_annotation_queue_item_annotations.py new file mode 100644 index 0000000..f393ff0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/import_annotation_queue_item_annotations.py @@ -0,0 +1,232 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.import_annotations import ImportAnnotations +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_import_annotations_response import QueueImportAnnotationsResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: ImportAnnotations, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse: + if response.status_code == 200: + response_200 = QueueImportAnnotationsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ImportAnnotations, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse +]: + """Import annotations from external sources. + + Args: + queue_id (str): + id (UUID): + body (ImportAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ImportAnnotations, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueImportAnnotationsResponse + | None +): + """Import annotations from external sources. + + Args: + queue_id (str): + id (UUID): + body (ImportAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ImportAnnotations, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse +]: + """Import annotations from external sources. + + Args: + queue_id (str): + id (UUID): + body (ImportAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ImportAnnotations, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueImportAnnotationsResponse + | None +): + """Import annotations from external sources. + + Args: + queue_id (str): + id (UUID): + body (ImportAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueImportAnnotationsResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_item_annotations.py b/python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_item_annotations.py new file mode 100644 index 0000000..01bc107 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_item_annotations.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_item_annotations_response import QueueItemAnnotationsResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse: + if response.status_code == 200: + response_200 = QueueItemAnnotationsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse +]: + """List all annotations for a queue item (across all annotators). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueItemAnnotationsResponse + | None +): + """List all annotations for a queue item (across all annotators). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse +]: + """List all annotations for a queue item (across all annotators). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueItemAnnotationsResponse + | None +): + """List all annotations for a queue item (across all annotators). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueItemAnnotationsResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_items.py b/python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_items.py new file mode 100644 index 0000000..aa412f8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/list_annotation_queue_items.py @@ -0,0 +1,278 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_annotation_queue_items_ordering import ( + ListAnnotationQueueItemsOrdering, +) +from ...models.list_annotation_queue_items_response_200 import ( + ListAnnotationQueueItemsResponse200, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + queue_id: str, + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: list[str] | Unset = UNSET, + source_type: list[str] | Unset = UNSET, + assigned_to: str | Unset = UNSET, + review_status: str | Unset = UNSET, + ordering: ListAnnotationQueueItemsOrdering | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_status: list[str] | Unset = UNSET + if not isinstance(status, Unset): + json_status = status + + params["status"] = json_status + + json_source_type: list[str] | Unset = UNSET + if not isinstance(source_type, Unset): + json_source_type = source_type + + params["source_type"] = json_source_type + + params["assigned_to"] = assigned_to + + params["review_status"] = review_status + + json_ordering: str | Unset = UNSET + if not isinstance(ordering, Unset): + json_ordering = ordering.value + + params["ordering"] = json_ordering + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/items/".format( + queue_id=quote(str(queue_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListAnnotationQueueItemsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: list[str] | Unset = UNSET, + source_type: list[str] | Unset = UNSET, + assigned_to: str | Unset = UNSET, + review_status: str | Unset = UNSET, + ordering: ListAnnotationQueueItemsOrdering | Unset = UNSET, +) -> Response[ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + status (list[str] | Unset): + source_type (list[str] | Unset): + assigned_to (str | Unset): + review_status (str | Unset): + ordering (ListAnnotationQueueItemsOrdering | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + page=page, + limit=limit, + status=status, + source_type=source_type, + assigned_to=assigned_to, + review_status=review_status, + ordering=ordering, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: list[str] | Unset = UNSET, + source_type: list[str] | Unset = UNSET, + assigned_to: str | Unset = UNSET, + review_status: str | Unset = UNSET, + ordering: ListAnnotationQueueItemsOrdering | Unset = UNSET, +) -> ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + status (list[str] | Unset): + source_type (list[str] | Unset): + assigned_to (str | Unset): + review_status (str | Unset): + ordering (ListAnnotationQueueItemsOrdering | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + page=page, + limit=limit, + status=status, + source_type=source_type, + assigned_to=assigned_to, + review_status=review_status, + ordering=ordering, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: list[str] | Unset = UNSET, + source_type: list[str] | Unset = UNSET, + assigned_to: str | Unset = UNSET, + review_status: str | Unset = UNSET, + ordering: ListAnnotationQueueItemsOrdering | Unset = UNSET, +) -> Response[ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + status (list[str] | Unset): + source_type (list[str] | Unset): + assigned_to (str | Unset): + review_status (str | Unset): + ordering (ListAnnotationQueueItemsOrdering | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + page=page, + limit=limit, + status=status, + source_type=source_type, + assigned_to=assigned_to, + review_status=review_status, + ordering=ordering, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: list[str] | Unset = UNSET, + source_type: list[str] | Unset = UNSET, + assigned_to: str | Unset = UNSET, + review_status: str | Unset = UNSET, + ordering: ListAnnotationQueueItemsOrdering | Unset = UNSET, +) -> ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + status (list[str] | Unset): + source_type (list[str] | Unset): + assigned_to (str | Unset): + review_status (str | Unset): + ordering (ListAnnotationQueueItemsOrdering | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAnnotationQueueItemsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + page=page, + limit=limit, + status=status, + source_type=source_type, + assigned_to=assigned_to, + review_status=review_status, + ordering=ordering, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/release_annotation_queue_item.py b/python/fi/generated/openapi_client/api/annotation_queue_items/release_annotation_queue_item.py new file mode 100644 index 0000000..1ba1c60 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/release_annotation_queue_item.py @@ -0,0 +1,234 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_release_reservation_response import QueueReleaseReservationResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/release/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse +): + if response.status_code == 200: + response_200 = QueueReleaseReservationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse +]: + """Release reservation on an item. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueReleaseReservationResponse + | None +): + """Release reservation on an item. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse +]: + """Release reservation on an item. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueReleaseReservationResponse + | None +): + """Release reservation on an item. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReleaseReservationResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/remove_annotation_queue_items.py b/python/fi/generated/openapi_client/api/annotation_queue_items/remove_annotation_queue_items.py new file mode 100644 index 0000000..fe9fd39 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/remove_annotation_queue_items.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.bulk_remove_items import BulkRemoveItems +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_bulk_remove_items_response import QueueBulkRemoveItemsResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + *, + body: BulkRemoveItems, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/bulk-remove/".format( + queue_id=quote(str(queue_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse: + if response.status_code == 200: + response_200 = QueueBulkRemoveItemsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: BulkRemoveItems, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse +]: + """ + Args: + queue_id (str): + body (BulkRemoveItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: BulkRemoveItems, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueBulkRemoveItemsResponse + | None +): + """ + Args: + queue_id (str): + body (BulkRemoveItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: BulkRemoveItems, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse +]: + """ + Args: + queue_id (str): + body (BulkRemoveItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: BulkRemoveItems, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueBulkRemoveItemsResponse + | None +): + """ + Args: + queue_id (str): + body (BulkRemoveItems): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueBulkRemoveItemsResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/skip_annotation_queue_item.py b/python/fi/generated/openapi_client/api/annotation_queue_items/skip_annotation_queue_item.py new file mode 100644 index 0000000..0cb18cd --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/skip_annotation_queue_item.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_item_navigation_request import QueueItemNavigationRequest +from ...models.queue_navigation_response import QueueNavigationResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: QueueItemNavigationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/skip/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse: + if response.status_code == 200: + response_200 = QueueNavigationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse +]: + """Mark item as skipped and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse | None: + """Mark item as skipped and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse +]: + """Mark item as skipped and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItemNavigationRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse | None: + """Mark item as skipped and return next pending item. + + Args: + queue_id (str): + id (UUID): + body (QueueItemNavigationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueNavigationResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_items/submit_annotation_queue_item_annotations.py b/python/fi/generated/openapi_client/api/annotation_queue_items/submit_annotation_queue_item_annotations.py new file mode 100644 index 0000000..dab1c33 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_items/submit_annotation_queue_item_annotations.py @@ -0,0 +1,232 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_submit_annotations_response import QueueSubmitAnnotationsResponse +from ...models.submit_annotations import SubmitAnnotations +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: SubmitAnnotations, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse: + if response.status_code == 200: + response_200 = QueueSubmitAnnotationsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: SubmitAnnotations, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse +]: + """Submit or update annotations for a queue item. + + Args: + queue_id (str): + id (UUID): + body (SubmitAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: SubmitAnnotations, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueSubmitAnnotationsResponse + | None +): + """Submit or update annotations for a queue item. + + Args: + queue_id (str): + id (UUID): + body (SubmitAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: SubmitAnnotations, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse +]: + """Submit or update annotations for a queue item. + + Args: + queue_id (str): + id (UUID): + body (SubmitAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: SubmitAnnotations, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueSubmitAnnotationsResponse + | None +): + """Submit or update annotations for a queue item. + + Args: + queue_id (str): + id (UUID): + body (SubmitAnnotations): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueSubmitAnnotationsResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queue_review/__init__.py b/python/fi/generated/openapi_client/api/annotation_queue_review/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_review/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/annotation_queue_review/review_annotation_queue_item.py b/python/fi/generated/openapi_client/api/annotation_queue_review/review_annotation_queue_item.py new file mode 100644 index 0000000..79fc7dc --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queue_review/review_annotation_queue_item.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_review_item_response import QueueReviewItemResponse +from ...models.review_item_request import ReviewItemRequest +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: ReviewItemRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/review/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse: + if response.status_code == 200: + response_200 = QueueReviewItemResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ReviewItemRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse +]: + """Approve, request changes, or leave reviewer feedback on an item. + + Args: + queue_id (str): + id (UUID): + body (ReviewItemRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ReviewItemRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse | None: + """Approve, request changes, or leave reviewer feedback on an item. + + Args: + queue_id (str): + id (UUID): + body (ReviewItemRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ReviewItemRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse +]: + """Approve, request changes, or leave reviewer feedback on an item. + + Args: + queue_id (str): + id (UUID): + body (ReviewItemRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: ReviewItemRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse | None: + """Approve, request changes, or leave reviewer feedback on an item. + + Args: + queue_id (str): + id (UUID): + body (ReviewItemRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueReviewItemResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/__init__.py b/python/fi/generated/openapi_client/api/annotation_queues/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/annotation_queues/add_annotation_queue_label.py b/python/fi/generated/openapi_client/api/annotation_queues/add_annotation_queue_label.py new file mode 100644 index 0000000..92dcdae --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/add_annotation_queue_label.py @@ -0,0 +1,216 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_add_label_response import QueueAddLabelResponse +from ...models.queue_label_request import QueueLabelRequest +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: QueueLabelRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{id}/add-label/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse: + if response.status_code == 200: + response_200 = QueueAddLabelResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse +]: + """Add a label to an annotation queue. + Labels apply to all sources in the queue's project (for default queues). + Queue items are created lazily when someone actually annotates. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse | None: + """Add a label to an annotation queue. + Labels apply to all sources in the queue's project (for default queues). + Queue items are created lazily when someone actually annotates. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse +]: + """Add a label to an annotation queue. + Labels apply to all sources in the queue's project (for default queues). + Queue items are created lazily when someone actually annotates. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse | None: + """Add a label to an annotation queue. + Labels apply to all sources in the queue's project (for default queues). + Queue items are created lazily when someone actually annotates. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAddLabelResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/archive_annotation_queue.py b/python/fi/generated/openapi_client/api/annotation_queues/archive_annotation_queue.py new file mode 100644 index 0000000..a0cf7ec --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/archive_annotation_queue.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/annotation-queues/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """Archive a queue (soft delete). + + ``BaseModel.delete()`` flips ``deleted=True`` instead of removing + the row. Attached automation rules go dormant (the scheduler + filters ``queue__deleted=False``), items stay invisible but + recoverable, label bindings preserved. + + For truly destructive removal, use the ``hard-delete`` action + below. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """Archive a queue (soft delete). + + ``BaseModel.delete()`` flips ``deleted=True`` instead of removing + the row. Attached automation rules go dormant (the scheduler + filters ``queue__deleted=False``), items stay invisible but + recoverable, label bindings preserved. + + For truly destructive removal, use the ``hard-delete`` action + below. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """Archive a queue (soft delete). + + ``BaseModel.delete()`` flips ``deleted=True`` instead of removing + the row. Attached automation rules go dormant (the scheduler + filters ``queue__deleted=False``), items stay invisible but + recoverable, label bindings preserved. + + For truly destructive removal, use the ``hard-delete`` action + below. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """Archive a queue (soft delete). + + ``BaseModel.delete()`` flips ``deleted=True`` instead of removing + the row. Attached automation rules go dormant (the scheduler + filters ``queue__deleted=False``), items stay invisible but + recoverable, label bindings preserved. + + For truly destructive removal, use the ``hard-delete`` action + below. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/create_annotation_queue.py b/python/fi/generated/openapi_client/api/annotation_queues/create_annotation_queue.py new file mode 100644 index 0000000..f2ad115 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/create_annotation_queue.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotation_queue import AnnotationQueue +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: AnnotationQueue, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationQueue | ManagementAPIErrorResponse: + if response.status_code == 201: + response_201 = AnnotationQueue.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """ + Args: + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """ + Args: + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """ + Args: + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """ + Args: + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue.py b/python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue.py new file mode 100644 index 0000000..bf70ce2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.export_annotation_queue_export_format import ( + ExportAnnotationQueueExportFormat, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_export_annotations_response import QueueExportAnnotationsResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + id: UUID, + *, + export_format: ExportAnnotationQueueExportFormat | Unset = UNSET, + status: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_export_format: str | Unset = UNSET + if not isinstance(export_format, Unset): + json_export_format = export_format.value + + params["export_format"] = json_export_format + + params["status"] = status + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{id}/export/".format( + id=quote(str(id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse: + if response.status_code == 200: + response_200 = QueueExportAnnotationsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + export_format: ExportAnnotationQueueExportFormat | Unset = UNSET, + status: str | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse +]: + """Export all items with their annotations. + + Args: + id (UUID): + export_format (ExportAnnotationQueueExportFormat | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse] + """ + + kwargs = _get_kwargs( + id=id, + export_format=export_format, + status=status, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + export_format: ExportAnnotationQueueExportFormat | Unset = UNSET, + status: str | Unset = UNSET, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueExportAnnotationsResponse + | None +): + """Export all items with their annotations. + + Args: + id (UUID): + export_format (ExportAnnotationQueueExportFormat | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse + """ + + return sync_detailed( + id=id, + client=client, + export_format=export_format, + status=status, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + export_format: ExportAnnotationQueueExportFormat | Unset = UNSET, + status: str | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse +]: + """Export all items with their annotations. + + Args: + id (UUID): + export_format (ExportAnnotationQueueExportFormat | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse] + """ + + kwargs = _get_kwargs( + id=id, + export_format=export_format, + status=status, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + export_format: ExportAnnotationQueueExportFormat | Unset = UNSET, + status: str | Unset = UNSET, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueExportAnnotationsResponse + | None +): + """Export all items with their annotations. + + Args: + id (UUID): + export_format (ExportAnnotationQueueExportFormat | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportAnnotationsResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + export_format=export_format, + status=status, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue_to_dataset.py b/python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue_to_dataset.py new file mode 100644 index 0000000..1093646 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/export_annotation_queue_to_dataset.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_export_to_dataset_request import QueueExportToDatasetRequest +from ...models.queue_export_to_dataset_response import QueueExportToDatasetResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: QueueExportToDatasetRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{id}/export-to-dataset/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse: + if response.status_code == 200: + response_200 = QueueExportToDatasetResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueExportToDatasetRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse +]: + """Export queue items to a dataset using a user-editable column mapping. + + Args: + id (UUID): + body (QueueExportToDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueExportToDatasetRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueExportToDatasetResponse + | None +): + """Export queue items to a dataset using a user-editable column mapping. + + Args: + id (UUID): + body (QueueExportToDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueExportToDatasetRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse +]: + """Export queue items to a dataset using a user-editable column mapping. + + Args: + id (UUID): + body (QueueExportToDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueExportToDatasetRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | QueueExportToDatasetResponse + | None +): + """Export queue items to a dataset using a user-editable column mapping. + + Args: + id (UUID): + body (QueueExportToDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportToDatasetResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue.py b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue.py new file mode 100644 index 0000000..474f2ba --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue.py @@ -0,0 +1,151 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotation_queue import AnnotationQueue +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationQueue | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationQueue.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_agreement.py b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_agreement.py new file mode 100644 index 0000000..9523888 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_agreement.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_agreement_response import QueueAgreementResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{id}/agreement/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse: + if response.status_code == 200: + response_200 = QueueAgreementResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse +]: + """Calculate inter-annotator agreement metrics. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse | None: + """Calculate inter-annotator agreement metrics. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse +]: + """Calculate inter-annotator agreement metrics. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse | None: + """Calculate inter-annotator agreement metrics. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAgreementResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_analytics.py b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_analytics.py new file mode 100644 index 0000000..f9f3007 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_analytics.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_analytics_response import QueueAnalyticsResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{id}/analytics/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse: + if response.status_code == 200: + response_200 = QueueAnalyticsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse +]: + """Queue analytics: throughput, annotator performance, label distribution. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse | None: + """Queue analytics: throughput, annotator performance, label distribution. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse +]: + """Queue analytics: throughput, annotator performance, label distribution. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse | None: + """Queue analytics: throughput, annotator performance, label distribution. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueAnalyticsResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_progress.py b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_progress.py new file mode 100644 index 0000000..08c10b9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/get_annotation_queue_progress.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_progress_response import QueueProgressResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{id}/progress/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse: + if response.status_code == 200: + response_200 = QueueProgressResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse +]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse +]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueProgressResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queue_export_fields.py b/python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queue_export_fields.py new file mode 100644 index 0000000..2591907 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queue_export_fields.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_export_fields_response import QueueExportFieldsResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{id}/export-fields/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse: + if response.status_code == 200: + response_200 = QueueExportFieldsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse +]: + """Return source/label/attribute fields available for dataset export. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse | None +): + """Return source/label/attribute fields available for dataset export. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse +]: + """Return source/label/attribute fields available for dataset export. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse | None +): + """Return source/label/attribute fields available for dataset export. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueExportFieldsResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queues.py b/python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queues.py new file mode 100644 index 0000000..881c071 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/list_annotation_queues.py @@ -0,0 +1,217 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_annotation_queues_response_200 import ( + ListAnnotationQueuesResponse200, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: str | Unset = UNSET, + search: str | Unset = UNSET, + include_counts: bool | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["status"] = status + + params["search"] = search + + params["include_counts"] = include_counts + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListAnnotationQueuesResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: str | Unset = UNSET, + search: str | Unset = UNSET, + include_counts: bool | Unset = UNSET, +) -> Response[ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + status (str | Unset): + search (str | Unset): + include_counts (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + status=status, + search=search, + include_counts=include_counts, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: str | Unset = UNSET, + search: str | Unset = UNSET, + include_counts: bool | Unset = UNSET, +) -> ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + status (str | Unset): + search (str | Unset): + include_counts (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + status=status, + search=search, + include_counts=include_counts, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: str | Unset = UNSET, + search: str | Unset = UNSET, + include_counts: bool | Unset = UNSET, +) -> Response[ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse]: + """ + Args: + page (int | Unset): + limit (int | Unset): + status (str | Unset): + search (str | Unset): + include_counts (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + status=status, + search=search, + include_counts=include_counts, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + status: str | Unset = UNSET, + search: str | Unset = UNSET, + include_counts: bool | Unset = UNSET, +) -> ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + status (str | Unset): + search (str | Unset): + include_counts (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListAnnotationQueuesResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + status=status, + search=search, + include_counts=include_counts, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/remove_annotation_queue_label.py b/python/fi/generated/openapi_client/api/annotation_queues/remove_annotation_queue_label.py new file mode 100644 index 0000000..0d8d476 --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/remove_annotation_queue_label.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_label_request import QueueLabelRequest +from ...models.queue_remove_label_response import QueueRemoveLabelResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: QueueLabelRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{id}/remove-label/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse: + if response.status_code == 200: + response_200 = QueueRemoveLabelResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse +]: + """Remove a label from an annotation queue. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse | None +): + """Remove a label from an annotation queue. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse +]: + """Remove a label from an annotation queue. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueLabelRequest, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse | None +): + """Remove a label from an annotation queue. + + Args: + id (UUID): + body (QueueLabelRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueRemoveLabelResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue.py b/python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue.py new file mode 100644 index 0000000..875d87b --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotation_queue import AnnotationQueue +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: AnnotationQueue, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/annotation-queues/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationQueue | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationQueue.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """ + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """ + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """ + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """ + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue_status.py b/python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue_status.py new file mode 100644 index 0000000..fe7dd0a --- /dev/null +++ b/python/fi/generated/openapi_client/api/annotation_queues/update_annotation_queue_status.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_status_request import QueueStatusRequest +from ...models.queue_status_response import QueueStatusResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: QueueStatusRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{id}/update-status/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse: + if response.status_code == 200: + response_200 = QueueStatusResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueStatusRequest, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse]: + """ + Args: + id (UUID): + body (QueueStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueStatusRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse | None: + """ + Args: + id (UUID): + body (QueueStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueStatusRequest, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse]: + """ + Args: + id (UUID): + body (QueueStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueStatusRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse | None: + """ + Args: + id (UUID): + body (QueueStatusRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/__init__.py b/python/fi/generated/openapi_client/api/datasets/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/datasets/add_dataset_columns.py b/python/fi/generated/openapi_client/api/datasets/add_dataset_columns.py new file mode 100644 index 0000000..15dadc5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/add_dataset_columns.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_add_columns_request import DatasetAddColumnsRequest +from ...models.dataset_columns_mutation_response import DatasetColumnsMutationResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetAddColumnsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_columns/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetColumnsMutationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddColumnsRequest, +) -> Response[ + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddColumnsRequest, +) -> ( + DatasetColumnsMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddColumnsRequest, +) -> Response[ + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddColumnsRequest, +) -> ( + DatasetColumnsMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/add_dataset_rows.py b/python/fi/generated/openapi_client/api/datasets/add_dataset_rows.py new file mode 100644 index 0000000..8cd0bd3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/add_dataset_rows.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_add_rows_request import DatasetAddRowsRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetAddRowsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_rows/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/create_dataset_from_local_file.py b/python/fi/generated/openapi_client/api/datasets/create_dataset_from_local_file.py new file mode 100644 index 0000000..81f219c --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/create_dataset_from_local_file.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.create_dataset_from_local_file_request import ( + CreateDatasetFromLocalFileRequest, +) +from ...models.local_file_dataset_create_started_response import ( + LocalFileDatasetCreateStartedResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CreateDatasetFromLocalFileRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/create-dataset-from-local-file/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + LocalFileDatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = LocalFileDatasetCreateStartedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + LocalFileDatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromLocalFileRequest, +) -> Response[ + LocalFileDatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (CreateDatasetFromLocalFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LocalFileDatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromLocalFileRequest, +) -> ( + LocalFileDatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (CreateDatasetFromLocalFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LocalFileDatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromLocalFileRequest, +) -> Response[ + LocalFileDatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (CreateDatasetFromLocalFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LocalFileDatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromLocalFileRequest, +) -> ( + LocalFileDatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (CreateDatasetFromLocalFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LocalFileDatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/create_dataset_manually.py b/python/fi/generated/openapi_client/api/datasets/create_dataset_manually.py new file mode 100644 index 0000000..0f5afdd --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/create_dataset_manually.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.manual_dataset_create_request import ManualDatasetCreateRequest +from ...models.manual_dataset_create_response import ManualDatasetCreateResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ManualDatasetCreateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/create-dataset-manually/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ManualDatasetCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: ManualDatasetCreateRequest, +) -> Response[ + ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse +]: + """ + Args: + body (ManualDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: ManualDatasetCreateRequest, +) -> ( + ManagementAPIErrorResponse + | ManualDatasetCreateResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (ManualDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: ManualDatasetCreateRequest, +) -> Response[ + ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse +]: + """ + Args: + body (ManualDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: ManualDatasetCreateRequest, +) -> ( + ManagementAPIErrorResponse + | ManualDatasetCreateResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (ManualDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ManualDatasetCreateResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/create_empty_dataset.py b/python/fi/generated/openapi_client/api/datasets/create_empty_dataset.py new file mode 100644 index 0000000..07ccedd --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/create_empty_dataset.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.create_empty_dataset_request import CreateEmptyDatasetRequest +from ...models.dataset_create_started_response import DatasetCreateStartedResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CreateEmptyDatasetRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/create-empty-dataset/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetCreateStartedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateEmptyDatasetRequest, +) -> Response[ + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (CreateEmptyDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateEmptyDatasetRequest, +) -> ( + DatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (CreateEmptyDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateEmptyDatasetRequest, +) -> Response[ + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (CreateEmptyDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateEmptyDatasetRequest, +) -> ( + DatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (CreateEmptyDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/delete_dataset_column.py b/python/fi/generated/openapi_client/api/datasets/delete_dataset_column.py new file mode 100644 index 0000000..f3e2aee --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/delete_dataset_column.py @@ -0,0 +1,162 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + column_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/develops/{dataset_id}/delete_column/{column_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + column_id=quote(str(column_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + column_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + column_id=column_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + column_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + column_id=column_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + column_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + column_id=column_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + column_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + column_id=column_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/delete_dataset_row.py b/python/fi/generated/openapi_client/api/datasets/delete_dataset_row.py new file mode 100644 index 0000000..9d56a78 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/delete_dataset_row.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/develops/{dataset_id}/delete_row/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/download_dataset.py b/python/fi/generated/openapi_client/api/datasets/download_dataset.py new file mode 100644 index 0000000..90d54a7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/download_dataset.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from io import BytesIO +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import File, Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/{dataset_id}/download_dataset/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = File(payload=BytesIO(response.json())) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + File | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + File | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/duplicate_dataset.py b/python/fi/generated/openapi_client/api/datasets/duplicate_dataset.py new file mode 100644 index 0000000..36ccdf7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/duplicate_dataset.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.duplicate_dataset_request import DuplicateDatasetRequest +from ...models.duplicate_dataset_response import DuplicateDatasetResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DuplicateDatasetRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/duplicate/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DuplicateDatasetResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateDatasetRequest, +) -> Response[ + DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DuplicateDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateDatasetRequest, +) -> ( + DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + dataset_id (str): + body (DuplicateDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateDatasetRequest, +) -> Response[ + DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DuplicateDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateDatasetRequest, +) -> ( + DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + dataset_id (str): + body (DuplicateDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DuplicateDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/get_dataset_annotation_summary.py b/python/fi/generated/openapi_client/api/datasets/get_dataset_annotation_summary.py new file mode 100644 index 0000000..398fef1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/get_dataset_annotation_summary.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotation_summary_response import AnnotationSummaryResponse +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/dataset/{dataset_id}/annotation-summary/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationSummaryResponse | ApiTextErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/get_dataset_columns.py b/python/fi/generated/openapi_client/api/datasets/get_dataset_columns.py new file mode 100644 index 0000000..527cce2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/get_dataset_columns.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_column_detail_response import DatasetColumnDetailResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/dataset/columns/{dataset_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetColumnDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetColumnDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetColumnDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetColumnDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/get_dataset_eval_stats.py b/python/fi/generated/openapi_client/api/datasets/get_dataset_eval_stats.py new file mode 100644 index 0000000..82e3415 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/get_dataset_eval_stats.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_eval_stats_response import DatasetEvalStatsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/dataset/{dataset_id}/eval-stats/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetEvalStatsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetEvalStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/get_dataset_json_schema.py b/python/fi/generated/openapi_client/api/datasets/get_dataset_json_schema.py new file mode 100644 index 0000000..4cfeab4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/get_dataset_json_schema.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_json_schema_response import DatasetJsonSchemaResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/dataset/{dataset_id}/json-schema/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetJsonSchemaResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """API endpoint to get JSON schemas and images metadata for columns in a dataset. + Used by frontend for autocomplete suggestions when accessing JSON properties + and for indexed access to images columns. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetJsonSchemaResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """API endpoint to get JSON schemas and images metadata for columns in a dataset. + Used by frontend for autocomplete suggestions when accessing JSON properties + and for indexed access to images columns. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """API endpoint to get JSON schemas and images metadata for columns in a dataset. + Used by frontend for autocomplete suggestions when accessing JSON properties + and for indexed access to images columns. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetJsonSchemaResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """API endpoint to get JSON schemas and images metadata for columns in a dataset. + Used by frontend for autocomplete suggestions when accessing JSON properties + and for indexed access to images columns. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/get_dataset_row.py b/python/fi/generated/openapi_client/api/datasets/get_dataset_row.py new file mode 100644 index 0000000..6b784c9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/get_dataset_row.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_row_data_request import DatasetRowDataRequest +from ...models.dataset_row_data_response import DatasetRowDataResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetRowDataRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/get-row-data/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetRowDataResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetRowDataRequest, +) -> Response[ + DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetRowDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetRowDataRequest, +) -> DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (DatasetRowDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetRowDataRequest, +) -> Response[ + DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetRowDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetRowDataRequest, +) -> DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (DatasetRowDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRowDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/get_dataset_table.py b/python/fi/generated/openapi_client/api/datasets/get_dataset_table.py new file mode 100644 index 0000000..93a22d3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/get_dataset_table.py @@ -0,0 +1,278 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_table_response import DatasetTableResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + dataset_id: str, + *, + filters: str | Unset = "[]", + sort: str | Unset = "[]", + search: str | Unset = UNSET, + page_size: int | Unset = 10, + current_page_index: int | Unset = 0, + column_config_only: bool | Unset = False, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["filters"] = filters + + params["sort"] = sort + + params["search"] = search + + params["page_size"] = page_size + + params["current_page_index"] = current_page_index + + params["column_config_only"] = column_config_only + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/{dataset_id}/get-dataset-table/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetTableResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + filters: str | Unset = "[]", + sort: str | Unset = "[]", + search: str | Unset = UNSET, + page_size: int | Unset = 10, + current_page_index: int | Unset = 0, + column_config_only: bool | Unset = False, +) -> Response[ + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + filters (str | Unset): Default: '[]'. + sort (str | Unset): Default: '[]'. + search (str | Unset): + page_size (int | Unset): Default: 10. + current_page_index (int | Unset): Default: 0. + column_config_only (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + filters=filters, + sort=sort, + search=search, + page_size=page_size, + current_page_index=current_page_index, + column_config_only=column_config_only, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + filters: str | Unset = "[]", + sort: str | Unset = "[]", + search: str | Unset = UNSET, + page_size: int | Unset = 10, + current_page_index: int | Unset = 0, + column_config_only: bool | Unset = False, +) -> DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + filters (str | Unset): Default: '[]'. + sort (str | Unset): Default: '[]'. + search (str | Unset): + page_size (int | Unset): Default: 10. + current_page_index (int | Unset): Default: 0. + column_config_only (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + filters=filters, + sort=sort, + search=search, + page_size=page_size, + current_page_index=current_page_index, + column_config_only=column_config_only, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + filters: str | Unset = "[]", + sort: str | Unset = "[]", + search: str | Unset = UNSET, + page_size: int | Unset = 10, + current_page_index: int | Unset = 0, + column_config_only: bool | Unset = False, +) -> Response[ + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + filters (str | Unset): Default: '[]'. + sort (str | Unset): Default: '[]'. + search (str | Unset): + page_size (int | Unset): Default: 10. + current_page_index (int | Unset): Default: 0. + column_config_only (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + filters=filters, + sort=sort, + search=search, + page_size=page_size, + current_page_index=current_page_index, + column_config_only=column_config_only, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + filters: str | Unset = "[]", + sort: str | Unset = "[]", + search: str | Unset = UNSET, + page_size: int | Unset = 10, + current_page_index: int | Unset = 0, + column_config_only: bool | Unset = False, +) -> DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + filters (str | Unset): Default: '[]'. + sort (str | Unset): Default: '[]'. + search (str | Unset): + page_size (int | Unset): Default: 10. + current_page_index (int | Unset): Default: 0. + column_config_only (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + filters=filters, + sort=sort, + search=search, + page_size=page_size, + current_page_index=current_page_index, + column_config_only=column_config_only, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/list_dataset_base_columns.py b/python/fi/generated/openapi_client/api/datasets/list_dataset_base_columns.py new file mode 100644 index 0000000..50e2925 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/list_dataset_base_columns.py @@ -0,0 +1,149 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.base_columns_response import BaseColumnsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/datasets/get-base-columns/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = BaseColumnsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BaseColumnsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/list_dataset_derived_variables.py b/python/fi/generated/openapi_client/api/datasets/list_dataset_derived_variables.py new file mode 100644 index 0000000..068dc8a --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/list_dataset_derived_variables.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_derived_variables_response import DatasetDerivedVariablesResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/datasets/{dataset_id}/derived-variables/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetDerivedVariablesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Get all derived variables from all run prompt columns in a dataset. + + This aggregates derived variables from run prompt columns that + produce JSON outputs, making them available for use in other + prompts, evals, and experiments. + + Path params: + - dataset_id: UUID of the dataset + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get all derived variables from all run prompt columns in a dataset. + + This aggregates derived variables from run prompt columns that + produce JSON outputs, making them available for use in other + prompts, evals, and experiments. + + Path params: + - dataset_id: UUID of the dataset + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Get all derived variables from all run prompt columns in a dataset. + + This aggregates derived variables from run prompt columns that + produce JSON outputs, making them available for use in other + prompts, evals, and experiments. + + Path params: + - dataset_id: UUID of the dataset + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get all derived variables from all run prompt columns in a dataset. + + This aggregates derived variables from run prompt columns that + produce JSON outputs, making them available for use in other + prompts, evals, and experiments. + + Path params: + - dataset_id: UUID of the dataset + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/list_dataset_names.py b/python/fi/generated/openapi_client/api/datasets/list_dataset_names.py new file mode 100644 index 0000000..ced868b --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/list_dataset_names.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_names_response import DatasetNamesResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/get-datasets-names/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetNamesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetNamesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/list_datasets.py b/python/fi/generated/openapi_client/api/datasets/list_datasets.py new file mode 100644 index 0000000..913a2b3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/list_datasets.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_list_response import DatasetListResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search_text: str | Unset = "", + page: int | Unset = 0, + page_size: int | Unset = 10, + sort: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search_text"] = search_text + + params["page"] = page + + params["page_size"] = page_size + + params["sort"] = sort + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/get-datasets/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + search_text: str | Unset = "", + page: int | Unset = 0, + page_size: int | Unset = 10, + sort: str | Unset = UNSET, +) -> Response[DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + search_text (str | Unset): Default: ''. + page (int | Unset): Default: 0. + page_size (int | Unset): Default: 10. + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + search_text=search_text, + page=page, + page_size=page_size, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + search_text: str | Unset = "", + page: int | Unset = 0, + page_size: int | Unset = 10, + sort: str | Unset = UNSET, +) -> DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + search_text (str | Unset): Default: ''. + page (int | Unset): Default: 0. + page_size (int | Unset): Default: 10. + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + search_text=search_text, + page=page, + page_size=page_size, + sort=sort, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + search_text: str | Unset = "", + page: int | Unset = 0, + page_size: int | Unset = 10, + sort: str | Unset = UNSET, +) -> Response[DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + search_text (str | Unset): Default: ''. + page (int | Unset): Default: 0. + page_size (int | Unset): Default: 10. + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + search_text=search_text, + page=page, + page_size=page_size, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + search_text: str | Unset = "", + page: int | Unset = 0, + page_size: int | Unset = 10, + sort: str | Unset = UNSET, +) -> DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + search_text (str | Unset): Default: ''. + page (int | Unset): Default: 0. + page_size (int | Unset): Default: 10. + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + search_text=search_text, + page=page, + page_size=page_size, + sort=sort, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/datasets/update_dataset_cell.py b/python/fi/generated/openapi_client/api/datasets/update_dataset_cell.py new file mode 100644 index 0000000..570ed3f --- /dev/null +++ b/python/fi/generated/openapi_client/api/datasets/update_dataset_cell.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_update_cell_value_request import DatasetUpdateCellValueRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetUpdateCellValueRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/update_cell_value/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateCellValueRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetUpdateCellValueRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateCellValueRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetUpdateCellValueRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateCellValueRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetUpdateCellValueRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateCellValueRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetUpdateCellValueRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/__init__.py b/python/fi/generated/openapi_client/api/experiments/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/experiments/compare_experiments.py b/python/fi/generated/openapi_client/api/experiments/compare_experiments.py new file mode 100644 index 0000000..57394f4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/compare_experiments.py @@ -0,0 +1,231 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_comparison_weights_request import ( + ExperimentComparisonWeightsRequest, +) +from ...models.experiment_dataset_comparison_response import ( + ExperimentDatasetComparisonResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + *, + body: ExperimentComparisonWeightsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/{experiment_id}/compare-experiments/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentDatasetComparisonResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentDatasetComparisonResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentDatasetComparisonResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentComparisonWeightsRequest, +) -> Response[ + ExperimentDatasetComparisonResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + + Args: + experiment_id (str): + body (ExperimentComparisonWeightsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentDatasetComparisonResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentComparisonWeightsRequest, +) -> ( + ExperimentDatasetComparisonResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + + Args: + experiment_id (str): + body (ExperimentComparisonWeightsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentDatasetComparisonResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentComparisonWeightsRequest, +) -> Response[ + ExperimentDatasetComparisonResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + + Args: + experiment_id (str): + body (ExperimentComparisonWeightsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentDatasetComparisonResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentComparisonWeightsRequest, +) -> ( + ExperimentDatasetComparisonResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + + Args: + experiment_id (str): + body (ExperimentComparisonWeightsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentDatasetComparisonResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/create_experiment.py b/python/fi/generated/openapi_client/api/experiments/create_experiment.py new file mode 100644 index 0000000..4f7da63 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/create_experiment.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_create_v2 import ExperimentCreateV2 +from ...models.experiment_string_result_response import ExperimentStringResultResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ExperimentCreateV2, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentStringResultResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: ExperimentCreateV2, +) -> Response[ + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (ExperimentCreateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: ExperimentCreateV2, +) -> ( + ExperimentStringResultResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (ExperimentCreateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: ExperimentCreateV2, +) -> Response[ + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (ExperimentCreateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: ExperimentCreateV2, +) -> ( + ExperimentStringResultResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (ExperimentCreateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/delete_experiments.py b/python/fi/generated/openapi_client/api/experiments/delete_experiments.py new file mode 100644 index 0000000..c1f15b9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/delete_experiments.py @@ -0,0 +1,125 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/experiments/v2/delete/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/download_experiment.py b/python/fi/generated/openapi_client/api/experiments/download_experiment.py new file mode 100644 index 0000000..c90c385 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/download_experiment.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from io import BytesIO +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import File, Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/download/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = File(payload=BytesIO(response.json())) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + File | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + File | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/get_experiment.py b/python/fi/generated/openapi_client/api/experiments/get_experiment.py new file mode 100644 index 0000000..ea5a0e5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/get_experiment.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_v2_detail_response import ExperimentV2DetailResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentV2DetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentV2DetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentV2DetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/get_experiment_json_schema.py b/python/fi/generated/openapi_client/api/experiments/get_experiment_json_schema.py new file mode 100644 index 0000000..61c9f23 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/get_experiment_json_schema.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_json_schema_response import ExperimentJsonSchemaResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/json-schema/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentJsonSchemaResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. + Delegates to the shared get_json_column_schemas() function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentJsonSchemaResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. + Delegates to the shared get_json_column_schemas() function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. + Delegates to the shared get_json_column_schemas() function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentJsonSchemaResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. + Delegates to the shared get_json_column_schemas() function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentJsonSchemaResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/get_experiment_row.py b/python/fi/generated/openapi_client/api/experiments/get_experiment_row.py new file mode 100644 index 0000000..24000ef --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/get_experiment_row.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_table_rows_response import ExperimentTableRowsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + row_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/rows/{row_id}/".format( + experiment_id=quote(str(experiment_id), safe=""), + row_id=quote(str(row_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentTableRowsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + row_id=row_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentTableRowsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + row_id=row_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + row_id=row_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentTableRowsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + row_id=row_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/get_experiment_stats.py b/python/fi/generated/openapi_client/api/experiments/get_experiment_stats.py new file mode 100644 index 0000000..979e51c --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/get_experiment_stats.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_stats_response import ExperimentStatsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/stats/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentStatsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Stats view for V2 experiments that read from snapshot_dataset. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """Stats view for V2 experiments that read from snapshot_dataset. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Stats view for V2 experiments that read from snapshot_dataset. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """Stats view for V2 experiments that read from snapshot_dataset. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/list_experiment_comparisons.py b/python/fi/generated/openapi_client/api/experiments/list_experiment_comparisons.py new file mode 100644 index 0000000..3811191 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/list_experiment_comparisons.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_comparison_details_response import ( + ExperimentComparisonDetailsResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/comparisons/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentComparisonDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentComparisonDetailsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentComparisonDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentComparisonDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentComparisonDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentComparisonDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentComparisonDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentComparisonDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentComparisonDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentComparisonDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentComparisonDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/list_experiment_rows.py b/python/fi/generated/openapi_client/api/experiments/list_experiment_rows.py new file mode 100644 index 0000000..1a1664a --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/list_experiment_rows.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_table_rows_response import ExperimentTableRowsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/rows/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentTableRowsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentTableRowsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentTableRowsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentTableRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/list_experiments.py b/python/fi/generated/openapi_client/api/experiments/list_experiments.py new file mode 100644 index 0000000..6886f11 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/list_experiments.py @@ -0,0 +1,249 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_experiments_response_200 import ListExperimentsResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + created_at: str | Unset = UNSET, + status: str | Unset = UNSET, + dataset_id: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["created_at"] = created_at + + params["status"] = status + + params["dataset_id"] = dataset_id + + params["search"] = search + + params["ordering"] = ordering + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/list/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListExperimentsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListExperimentsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListExperimentsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + created_at: str | Unset = UNSET, + status: str | Unset = UNSET, + dataset_id: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListExperimentsResponse200 | ManagementAPIErrorResponse]: + """V2 experiment list with filtering, search, and pagination. + + Args: + created_at (str | Unset): + status (str | Unset): + dataset_id (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListExperimentsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + created_at=created_at, + status=status, + dataset_id=dataset_id, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + created_at: str | Unset = UNSET, + status: str | Unset = UNSET, + dataset_id: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListExperimentsResponse200 | ManagementAPIErrorResponse | None: + """V2 experiment list with filtering, search, and pagination. + + Args: + created_at (str | Unset): + status (str | Unset): + dataset_id (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListExperimentsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + created_at=created_at, + status=status, + dataset_id=dataset_id, + search=search, + ordering=ordering, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + created_at: str | Unset = UNSET, + status: str | Unset = UNSET, + dataset_id: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListExperimentsResponse200 | ManagementAPIErrorResponse]: + """V2 experiment list with filtering, search, and pagination. + + Args: + created_at (str | Unset): + status (str | Unset): + dataset_id (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListExperimentsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + created_at=created_at, + status=status, + dataset_id=dataset_id, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + created_at: str | Unset = UNSET, + status: str | Unset = UNSET, + dataset_id: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListExperimentsResponse200 | ManagementAPIErrorResponse | None: + """V2 experiment list with filtering, search, and pagination. + + Args: + created_at (str | Unset): + status (str | Unset): + dataset_id (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListExperimentsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + created_at=created_at, + status=status, + dataset_id=dataset_id, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/rerun_experiment.py b/python/fi/generated/openapi_client/api/experiments/rerun_experiment.py new file mode 100644 index 0000000..6bd4fa6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/rerun_experiment.py @@ -0,0 +1,219 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_rerun_request import ExperimentRerunRequest +from ...models.experiment_string_result_response import ExperimentStringResultResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ExperimentRerunRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/re-run/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentStringResultResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunRequest, +) -> Response[ + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """V2 re-run: org-scoped, uses V2 Temporal workflow. + + No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID + reuse policy automatically cancels any running workflow with the same ID. + Cell reset is handled by the workflow itself (cleanup + setup activities). + + Args: + body (ExperimentRerunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunRequest, +) -> ( + ExperimentStringResultResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """V2 re-run: org-scoped, uses V2 Temporal workflow. + + No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID + reuse policy automatically cancels any running workflow with the same ID. + Cell reset is handled by the workflow itself (cleanup + setup activities). + + Args: + body (ExperimentRerunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunRequest, +) -> Response[ + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """V2 re-run: org-scoped, uses V2 Temporal workflow. + + No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID + reuse policy automatically cancels any running workflow with the same ID. + Cell reset is handled by the workflow itself (cleanup + setup activities). + + Args: + body (ExperimentRerunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunRequest, +) -> ( + ExperimentStringResultResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """V2 re-run: org-scoped, uses V2 Temporal workflow. + + No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID + reuse policy automatically cancels any running workflow with the same ID. + Cell reset is handled by the workflow itself (cleanup + setup activities). + + Args: + body (ExperimentRerunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStringResultResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/stop_experiment.py b/python/fi/generated/openapi_client/api/experiments/stop_experiment.py new file mode 100644 index 0000000..341144f --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/stop_experiment.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_stop_response import ExperimentStopResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_empty_request import ModelHubEmptyRequest +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + *, + body: ModelHubEmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/{experiment_id}/stop/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentStopResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Stop a running V2 experiment. + + Cancels all Temporal workflows (main + reruns). DB cleanup (marking + RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) + is handled by each workflow's CancelledError handler via the + stop_experiment_cleanup_activity. + + Args: + experiment_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """Stop a running V2 experiment. + + Cancels all Temporal workflows (main + reruns). DB cleanup (marking + RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) + is handled by each workflow's CancelledError handler via the + stop_experiment_cleanup_activity. + + Args: + experiment_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Stop a running V2 experiment. + + Cancels all Temporal workflows (main + reruns). DB cleanup (marking + RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) + is handled by each workflow's CancelledError handler via the + stop_experiment_cleanup_activity. + + Args: + experiment_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """Stop a running V2 experiment. + + Cancels all Temporal workflows (main + reruns). DB cleanup (marking + RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) + is handled by each workflow's CancelledError handler via the + stop_experiment_cleanup_activity. + + Args: + experiment_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentStopResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/experiments/update_experiment.py b/python/fi/generated/openapi_client/api/experiments/update_experiment.py new file mode 100644 index 0000000..f8529ed --- /dev/null +++ b/python/fi/generated/openapi_client/api/experiments/update_experiment.py @@ -0,0 +1,245 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_update_v2 import ExperimentUpdateV2 +from ...models.experiment_v2_detail_response import ExperimentV2DetailResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + *, + body: ExperimentUpdateV2, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/experiments/v2/{experiment_id}/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentV2DetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentUpdateV2, +) -> Response[ + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Update a V2 experiment with diff-based selective re-run. + + Editable fields: column_id, prompt_config, user_eval_metrics. + Re-run triggers (determined by fingerprint diffs, not field presence): + - prompt_config has new/modified entries → re-run those configs + ALL dependent evals + - user_eval_metrics has new/modified entries → re-run only those evals + - column_id changed → delete old base eval columns, re-run base evals + - If FE sends unchanged data, diffs return empty → no re-run + + Args: + experiment_id (str): + body (ExperimentUpdateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentUpdateV2, +) -> ( + ExperimentV2DetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Update a V2 experiment with diff-based selective re-run. + + Editable fields: column_id, prompt_config, user_eval_metrics. + Re-run triggers (determined by fingerprint diffs, not field presence): + - prompt_config has new/modified entries → re-run those configs + ALL dependent evals + - user_eval_metrics has new/modified entries → re-run only those evals + - column_id changed → delete old base eval columns, re-run base evals + - If FE sends unchanged data, diffs return empty → no re-run + + Args: + experiment_id (str): + body (ExperimentUpdateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentUpdateV2, +) -> Response[ + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Update a V2 experiment with diff-based selective re-run. + + Editable fields: column_id, prompt_config, user_eval_metrics. + Re-run triggers (determined by fingerprint diffs, not field presence): + - prompt_config has new/modified entries → re-run those configs + ALL dependent evals + - user_eval_metrics has new/modified entries → re-run only those evals + - column_id changed → delete old base eval columns, re-run base evals + - If FE sends unchanged data, diffs return empty → no re-run + + Args: + experiment_id (str): + body (ExperimentUpdateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentUpdateV2, +) -> ( + ExperimentV2DetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Update a V2 experiment with diff-based selective re-run. + + Editable fields: column_id, prompt_config, user_eval_metrics. + Re-run triggers (determined by fingerprint diffs, not field presence): + - prompt_config has new/modified entries → re-run those configs + ALL dependent evals + - user_eval_metrics has new/modified entries → re-run only those evals + - column_id changed → delete old base eval columns, re-run base evals + - If FE sends unchanged data, diffs return empty → no re-run + + Args: + experiment_id (str): + body (ExperimentUpdateV2): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentV2DetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/__init__.py b/python/fi/generated/openapi_client/api/model_hub/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_create.py new file mode 100644 index 0000000..4979fa9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_create.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.automation_rule import AutomationRule +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + *, + body: AutomationRule, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/".format( + queue_id=quote(str(queue_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AutomationRule | ManagementAPIErrorResponse: + if response.status_code == 201: + response_201 = AutomationRule.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_delete.py new file mode 100644 index 0000000..2519f64 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_delete.py @@ -0,0 +1,163 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_evaluate.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_evaluate.py new file mode 100644 index 0000000..165cdd9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_evaluate.py @@ -0,0 +1,300 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.automation_rule_evaluate_accepted_response import ( + AutomationRuleEvaluateAcceptedResponse, +) +from ...models.automation_rule_evaluate_response import AutomationRuleEvaluateResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse + | AutomationRuleEvaluateAcceptedResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = AutomationRuleEvaluateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 202: + response_202 = AutomationRuleEvaluateAcceptedResponse.from_dict(response.json()) + + return response_202 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse + | AutomationRuleEvaluateAcceptedResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse + | AutomationRuleEvaluateAcceptedResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse +]: + """Trigger a manual rule run with a sync-or-async branch. + + Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish + in the HTTP request and return 200 with the result — fast feedback + for the common case. Large runs (mostly first-ever runs on backlogs + or rules with wide filters) hand the work to a Temporal activity and + return 202 immediately. The activity emails creator + queue managers + on completion. + + The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- + 100ms even on 10M+ row trace tables — so this branch costs little + even when it ends up taking the sync path. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | AutomationRuleEvaluateAcceptedResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | AutomationRuleEvaluateAcceptedResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse + | None +): + """Trigger a manual rule run with a sync-or-async branch. + + Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish + in the HTTP request and return 200 with the result — fast feedback + for the common case. Large runs (mostly first-ever runs on backlogs + or rules with wide filters) hand the work to a Temporal activity and + return 202 immediately. The activity emails creator + queue managers + on completion. + + The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- + 100ms even on 10M+ row trace tables — so this branch costs little + even when it ends up taking the sync path. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | AutomationRuleEvaluateAcceptedResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse + | AutomationRuleEvaluateAcceptedResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse +]: + """Trigger a manual rule run with a sync-or-async branch. + + Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish + in the HTTP request and return 200 with the result — fast feedback + for the common case. Large runs (mostly first-ever runs on backlogs + or rules with wide filters) hand the work to a Temporal activity and + return 202 immediately. The activity emails creator + queue managers + on completion. + + The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- + 100ms even on 10M+ row trace tables — so this branch costs little + even when it ends up taking the sync path. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | AutomationRuleEvaluateAcceptedResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | AutomationRuleEvaluateAcceptedResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse + | None +): + """Trigger a manual rule run with a sync-or-async branch. + + Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish + in the HTTP request and return 200 with the result — fast feedback + for the common case. Large runs (mostly first-ever runs on backlogs + or rules with wide filters) hand the work to a Temporal activity and + return 202 immediately. The activity emails creator + queue managers + on completion. + + The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- + 100ms even on 10M+ row trace tables — so this branch costs little + even when it ends up taking the sync path. + + Args: + queue_id (str): + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | AutomationRuleEvaluateAcceptedResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_list.py new file mode 100644 index 0000000..1de708f --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_list.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_annotation_queues_automation_rules_list_response_200 import ( + ModelHubAnnotationQueuesAutomationRulesListResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + queue_id: str, + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/".format( + queue_id=quote(str(queue_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200 +): + if response.status_code == 200: + response_200 = ModelHubAnnotationQueuesAutomationRulesListResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200 +]: + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubAnnotationQueuesAutomationRulesListResponse200 + | None +): + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200 + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200 +]: + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubAnnotationQueuesAutomationRulesListResponse200 + | None +): + """ + Args: + queue_id (str): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubAnnotationQueuesAutomationRulesListResponse200 + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_partial_update.py new file mode 100644 index 0000000..fe35daf --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_partial_update.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.automation_rule import AutomationRule +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: AutomationRule, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AutomationRule | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AutomationRule.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_preview.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_preview.py new file mode 100644 index 0000000..3647c23 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_preview.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.automation_rule_evaluate_response import AutomationRuleEvaluateResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AutomationRuleEvaluateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse +]: + """Preview how many items match a rule (dry run). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse + | None +): + """Preview how many items match a rule (dry run). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse +]: + """Preview how many items match a rule (dry run). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | AutomationRuleEvaluateResponse + | ManagementAPIErrorResponse + | None +): + """Preview how many items match a rule (dry run). + + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | AutomationRuleEvaluateResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_read.py new file mode 100644 index 0000000..896addf --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_read.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.automation_rule import AutomationRule +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AutomationRule | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AutomationRule.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_update.py new file mode 100644 index 0000000..e64afeb --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_automation_rules_update.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.automation_rule import AutomationRule +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: AutomationRule, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AutomationRule | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AutomationRule.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> Response[AutomationRule | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutomationRule | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AutomationRule, +) -> AutomationRule | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + body (AutomationRule): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutomationRule | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_for_source.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_for_source.py new file mode 100644 index 0000000..7ea52c8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_for_source.py @@ -0,0 +1,286 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_annotation_queues_for_source_source_type import ( + ModelHubAnnotationQueuesForSourceSourceType, +) +from ...models.queue_for_source_response import QueueForSourceResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubAnnotationQueuesForSourceSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + sources: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_source_type: str | Unset = UNSET + if not isinstance(source_type, Unset): + json_source_type = source_type.value + + params["source_type"] = json_source_type + + params["source_id"] = source_id + + params["sources"] = sources + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/for-source/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse: + if response.status_code == 200: + response_200 = QueueForSourceResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubAnnotationQueuesForSourceSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + sources: str | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse +]: + """Find annotation queues for a given source that the current user can annotate. + Includes queues where: + - The source is a queue item AND the user is an annotator in that queue + (regardless of whether the item is explicitly assigned to them) + + Query params: + - source_type, source_id (single source) + - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubAnnotationQueuesForSourceSourceType | Unset): + source_id (str | Unset): + sources (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + sources=sources, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubAnnotationQueuesForSourceSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + sources: str | Unset = UNSET, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse | None: + """Find annotation queues for a given source that the current user can annotate. + Includes queues where: + - The source is a queue item AND the user is an annotator in that queue + (regardless of whether the item is explicitly assigned to them) + + Query params: + - source_type, source_id (single source) + - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubAnnotationQueuesForSourceSourceType | Unset): + source_id (str | Unset): + sources (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + sources=sources, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubAnnotationQueuesForSourceSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + sources: str | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse +]: + """Find annotation queues for a given source that the current user can annotate. + Includes queues where: + - The source is a queue item AND the user is an annotator in that queue + (regardless of whether the item is explicitly assigned to them) + + Query params: + - source_type, source_id (single source) + - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubAnnotationQueuesForSourceSourceType | Unset): + source_id (str | Unset): + sources (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + sources=sources, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubAnnotationQueuesForSourceSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + sources: str | Unset = UNSET, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse | None: + """Find annotation queues for a given source that the current user can annotate. + Includes queues where: + - The source is a queue item AND the user is an annotator in that queue + (regardless of whether the item is explicitly assigned to them) + + Query params: + - source_type, source_id (single source) + - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubAnnotationQueuesForSourceSourceType | Unset): + source_id (str | Unset): + sources (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueForSourceResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + sources=sources, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_get_or_create_default.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_get_or_create_default.py new file mode 100644 index 0000000..da2ef09 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_get_or_create_default.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_default_request import QueueDefaultRequest +from ...models.queue_default_response import QueueDefaultResponse +from ...types import Response + + +def _get_kwargs( + *, + body: QueueDefaultRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/get-or-create-default/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse: + if response.status_code == 200: + response_200 = QueueDefaultResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: QueueDefaultRequest, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse]: + """Get or create the default annotation queue for a project, dataset, or agent definition. + Default queues are open to all org members (no annotator restriction). + + Body params (one of): + - project_id + - dataset_id + - agent_definition_id + + Args: + body (QueueDefaultRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: QueueDefaultRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse | None: + """Get or create the default annotation queue for a project, dataset, or agent definition. + Default queues are open to all org members (no annotator restriction). + + Body params (one of): + - project_id + - dataset_id + - agent_definition_id + + Args: + body (QueueDefaultRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: QueueDefaultRequest, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse]: + """Get or create the default annotation queue for a project, dataset, or agent definition. + Default queues are open to all org members (no annotator restriction). + + Body params (one of): + - project_id + - dataset_id + - agent_definition_id + + Args: + body (QueueDefaultRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: QueueDefaultRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse | None: + """Get or create the default annotation queue for a project, dataset, or agent definition. + Default queues are open to all org members (no annotator restriction). + + Body params (one of): + - project_id + - dataset_id + - agent_definition_id + + Args: + body (QueueDefaultRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueDefaultResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_hard_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_hard_delete.py new file mode 100644 index 0000000..bb87dc6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_hard_delete.py @@ -0,0 +1,232 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_hard_delete_request import QueueHardDeleteRequest +from ...models.queue_hard_delete_response import QueueHardDeleteResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: QueueHardDeleteRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{id}/hard-delete/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse: + if response.status_code == 200: + response_200 = QueueHardDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueHardDeleteRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse +]: + """Permanently remove a queue + everything attached. + + Hard delete cascades through the FK graph (rules, items, + assignments, scores) via ``on_delete=CASCADE``. There is no + recovery — callers must pass ``force=true`` AND the queue's + exact name as ``confirm_name`` so the action can't fire from + a typo'd request. + + Args: + id (UUID): + body (QueueHardDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueHardDeleteRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse | None: + """Permanently remove a queue + everything attached. + + Hard delete cascades through the FK graph (rules, items, + assignments, scores) via ``on_delete=CASCADE``. There is no + recovery — callers must pass ``force=true`` AND the queue's + exact name as ``confirm_name`` so the action can't fire from + a typo'd request. + + Args: + id (UUID): + body (QueueHardDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueHardDeleteRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse +]: + """Permanently remove a queue + everything attached. + + Hard delete cascades through the FK graph (rules, items, + assignments, scores) via ``on_delete=CASCADE``. There is no + recovery — callers must pass ``force=true`` AND the queue's + exact name as ``confirm_name`` so the action can't fire from + a typo'd request. + + Args: + id (UUID): + body (QueueHardDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueHardDeleteRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse | None: + """Permanently remove a queue + everything attached. + + Hard delete cascades through the FK graph (rules, items, + assignments, scores) via ``on_delete=CASCADE``. There is no + recovery — callers must pass ``force=true`` AND the queue's + exact name as ``confirm_name`` so the action can't fire from + a typo'd request. + + Args: + id (UUID): + body (QueueHardDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueHardDeleteResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_create.py new file mode 100644 index 0000000..62f5aa7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_create.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_item import QueueItem +from ...types import Response + + +def _get_kwargs( + queue_id: str, + *, + body: QueueItem, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{queue_id}/items/".format( + queue_id=quote(str(queue_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | QueueItem: + if response.status_code == 201: + response_201 = QueueItem.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | QueueItem]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return sync_detailed( + queue_id=queue_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_delete.py new file mode 100644 index 0000000..2d8a8a7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_delete.py @@ -0,0 +1,163 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_partial_update.py new file mode 100644 index 0000000..e793372 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_partial_update.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_item import QueueItem +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: QueueItem, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | QueueItem: + if response.status_code == 200: + response_200 = QueueItem.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | QueueItem]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_read.py new file mode 100644 index 0000000..6f80116 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_read.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_item import QueueItem +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | QueueItem: + if response.status_code == 200: + response_200 = QueueItem.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | QueueItem]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_update.py new file mode 100644 index 0000000..66e1385 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_items_update.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_item import QueueItem +from ...types import Response + + +def _get_kwargs( + queue_id: str, + id: UUID, + *, + body: QueueItem, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/annotation-queues/{queue_id}/items/{id}/".format( + queue_id=quote(str(queue_id), safe=""), + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | QueueItem: + if response.status_code == 200: + response_200 = QueueItem.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | QueueItem]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return sync_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> Response[ManagementAPIErrorResponse | QueueItem]: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | QueueItem] + """ + + kwargs = _get_kwargs( + queue_id=queue_id, + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + queue_id: str, + id: UUID, + *, + client: AuthenticatedClient | Client, + body: QueueItem, +) -> ManagementAPIErrorResponse | QueueItem | None: + """ + Args: + queue_id (str): + id (UUID): + body (QueueItem): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | QueueItem + """ + + return ( + await asyncio_detailed( + queue_id=queue_id, + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_restore.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_restore.py new file mode 100644 index 0000000..3e99a43 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_restore.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.queue_status_response import QueueStatusResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotation-queues/{id}/restore/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse: + if response.status_code == 200: + response_200 = QueueStatusResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse]: + """ + Args: + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse | None: + """ + Args: + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse]: + """ + Args: + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse | None: + """ + Args: + id (UUID): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | QueueStatusResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_update.py new file mode 100644 index 0000000..91e7a12 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotation_queues_update.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotation_queue import AnnotationQueue +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: AnnotationQueue, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/annotation-queues/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationQueue | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationQueue.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """Only managers of the queue may update queue settings. + + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """Only managers of the queue may update queue settings. + + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> Response[AnnotationQueue | ManagementAPIErrorResponse]: + """Only managers of the queue may update queue settings. + + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationQueue | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: AnnotationQueue, +) -> AnnotationQueue | ManagementAPIErrorResponse | None: + """Only managers of the queue may update queue settings. + + Args: + id (UUID): + body (AnnotationQueue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationQueue | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_create.py new file mode 100644 index 0000000..0ab8c24 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_create.py @@ -0,0 +1,158 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotations_labels import AnnotationsLabels +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: AnnotationsLabels, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotations-labels/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationsLabels | ManagementAPIErrorResponse: + if response.status_code == 201: + response_201 = AnnotationsLabels.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """Custom create to provide clearer error responses in GM format. + + Args: + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """Custom create to provide clearer error responses in GM format. + + Args: + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """Custom create to provide clearer error responses in GM format. + + Args: + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """Custom create to provide clearer error responses in GM format. + + Args: + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_delete.py new file mode 100644 index 0000000..821d332 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_delete.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/annotations-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_list.py new file mode 100644 index 0000000..3694f1c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_list.py @@ -0,0 +1,301 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotations_labels import AnnotationsLabels +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_annotations_labels_list_type import ( + ModelHubAnnotationsLabelsListType, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + dataset: UUID | Unset = UNSET, + project_id: UUID | Unset = UNSET, + type_: ModelHubAnnotationsLabelsListType | Unset = UNSET, + search: str | Unset = UNSET, + include_usage_count: bool | Unset = UNSET, + include_archived: bool | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_dataset: str | Unset = UNSET + if not isinstance(dataset, Unset): + json_dataset = str(dataset) + params["dataset"] = json_dataset + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + json_type_: str | Unset = UNSET + if not isinstance(type_, Unset): + json_type_ = type_.value + + params["type"] = json_type_ + + params["search"] = search + + params["include_usage_count"] = include_usage_count + + params["include_archived"] = include_archived + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotations-labels/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AnnotationsLabels.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + dataset: UUID | Unset = UNSET, + project_id: UUID | Unset = UNSET, + type_: ModelHubAnnotationsLabelsListType | Unset = UNSET, + search: str | Unset = UNSET, + include_usage_count: bool | Unset = UNSET, + include_archived: bool | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels] +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + dataset (UUID | Unset): + project_id (UUID | Unset): + type_ (ModelHubAnnotationsLabelsListType | Unset): + search (str | Unset): + include_usage_count (bool | Unset): + include_archived (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels]] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + dataset=dataset, + project_id=project_id, + type_=type_, + search=search, + include_usage_count=include_usage_count, + include_archived=include_archived, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + dataset: UUID | Unset = UNSET, + project_id: UUID | Unset = UNSET, + type_: ModelHubAnnotationsLabelsListType | Unset = UNSET, + search: str | Unset = UNSET, + include_usage_count: bool | Unset = UNSET, + include_archived: bool | Unset = UNSET, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels] | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + dataset (UUID | Unset): + project_id (UUID | Unset): + type_ (ModelHubAnnotationsLabelsListType | Unset): + search (str | Unset): + include_usage_count (bool | Unset): + include_archived (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels] + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + dataset=dataset, + project_id=project_id, + type_=type_, + search=search, + include_usage_count=include_usage_count, + include_archived=include_archived, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + dataset: UUID | Unset = UNSET, + project_id: UUID | Unset = UNSET, + type_: ModelHubAnnotationsLabelsListType | Unset = UNSET, + search: str | Unset = UNSET, + include_usage_count: bool | Unset = UNSET, + include_archived: bool | Unset = UNSET, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels] +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + dataset (UUID | Unset): + project_id (UUID | Unset): + type_ (ModelHubAnnotationsLabelsListType | Unset): + search (str | Unset): + include_usage_count (bool | Unset): + include_archived (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels]] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + dataset=dataset, + project_id=project_id, + type_=type_, + search=search, + include_usage_count=include_usage_count, + include_archived=include_archived, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + dataset: UUID | Unset = UNSET, + project_id: UUID | Unset = UNSET, + type_: ModelHubAnnotationsLabelsListType | Unset = UNSET, + search: str | Unset = UNSET, + include_usage_count: bool | Unset = UNSET, + include_archived: bool | Unset = UNSET, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels] | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + dataset (UUID | Unset): + project_id (UUID | Unset): + type_ (ModelHubAnnotationsLabelsListType | Unset): + search (str | Unset): + include_usage_count (bool | Unset): + include_archived (bool | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | list[AnnotationsLabels] + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + dataset=dataset, + project_id=project_id, + type_=type_, + search=search, + include_usage_count=include_usage_count, + include_archived=include_archived, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_partial_update.py new file mode 100644 index 0000000..9f90dc0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_partial_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotations_labels import AnnotationsLabels +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: AnnotationsLabels, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/annotations-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationsLabels | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationsLabels.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_read.py new file mode 100644 index 0000000..fd94bfd --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_read.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotations_labels import AnnotationsLabels +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/annotations-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationsLabels | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationsLabels.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_restore.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_restore.py new file mode 100644 index 0000000..de74c7d --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_restore.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotation_label_restore_response import AnnotationLabelRestoreResponse +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/annotations-labels/{id}/restore/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationLabelRestoreResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse +]: + """Restore a soft-deleted (archived) annotation label. + + Args: + id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + AnnotationLabelRestoreResponse + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | None +): + """Restore a soft-deleted (archived) annotation label. + + Args: + id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse +]: + """Restore a soft-deleted (archived) annotation label. + + Args: + id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + AnnotationLabelRestoreResponse + | ApiTextErrorResponse + | ManagementAPIErrorResponse + | None +): + """Restore a soft-deleted (archived) annotation label. + + Args: + id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationLabelRestoreResponse | ApiTextErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_update.py new file mode 100644 index 0000000..ffbc700 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_annotations_labels_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.annotations_labels import AnnotationsLabels +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: AnnotationsLabels, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/annotations-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AnnotationsLabels | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AnnotationsLabels.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> Response[AnnotationsLabels | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AnnotationsLabels | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: AnnotationsLabels, +) -> AnnotationsLabels | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (AnnotationsLabels): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AnnotationsLabels | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_create.py new file mode 100644 index 0000000..4ba2d69 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_create.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_key import ApiKey +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ApiKey, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/api-keys/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKey | ManagementAPIErrorResponse: + if response.status_code == 201: + response_201 = ApiKey.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKey | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_delete.py new file mode 100644 index 0000000..b1c15b7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_delete.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/api-keys/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """Soft-delete an API key. + + ApiKey inherits from BaseModel, so `instance.delete()` sets: + - deleted=True + - deleted_at= + and excludes it from the default manager (`objects`) queries. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """Soft-delete an API key. + + ApiKey inherits from BaseModel, so `instance.delete()` sets: + - deleted=True + - deleted_at= + and excludes it from the default manager (`objects`) queries. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """Soft-delete an API key. + + ApiKey inherits from BaseModel, so `instance.delete()` sets: + - deleted=True + - deleted_at= + and excludes it from the default manager (`objects`) queries. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """Soft-delete an API key. + + ApiKey inherits from BaseModel, so `instance.delete()` sets: + - deleted=True + - deleted_at= + and excludes it from the default manager (`objects`) queries. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_list.py new file mode 100644 index 0000000..ba2e7d8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_list.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_api_keys_list_response_200 import ( + ModelHubApiKeysListResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/api-keys/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubApiKeysListResponse200: + if response.status_code == 200: + response_200 = ModelHubApiKeysListResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubApiKeysListResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | ModelHubApiKeysListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubApiKeysListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubApiKeysListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubApiKeysListResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | ModelHubApiKeysListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubApiKeysListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubApiKeysListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubApiKeysListResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_partial_update.py new file mode 100644 index 0000000..79a2300 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_partial_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_key import ApiKey +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: ApiKey, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/api-keys/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKey | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ApiKey.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKey | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_read.py new file mode 100644 index 0000000..4126572 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_read.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_key import ApiKey +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/api-keys/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKey | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ApiKey.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKey | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_update.py new file mode 100644 index 0000000..0775b02 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_keys_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_key import ApiKey +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: ApiKey, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/api-keys/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKey | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ApiKey.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKey | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> Response[ApiKey | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKey | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: ApiKey, +) -> ApiKey | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (ApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKey | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_api_models_list_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_models_list_list.py new file mode 100644 index 0000000..94e39b0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_api_models_list_list.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.model_hub_paginated_response import ModelHubPaginatedResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/api/models_list/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse: + if response.status_code == 200: + response_200 = ModelHubPaginatedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | ModelHubPaginatedResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | ModelHubPaginatedResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubPaginatedResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_dataset_run_prompt_stats_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_dataset_run_prompt_stats_list.py new file mode 100644 index 0000000..e667226 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_dataset_run_prompt_stats_list.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_run_prompt_stats_response import DatasetRunPromptStatsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/dataset/{dataset_id}/run-prompt-stats/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetRunPromptStatsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetRunPromptStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetRunPromptStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRunPromptStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_api_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_api_column_create.py new file mode 100644 index 0000000..470cb16 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_api_column_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.add_api_column_request import AddApiColumnRequest +from ...models.dynamic_column_create_response import DynamicColumnCreateResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: AddApiColumnRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/add-api-column/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DynamicColumnCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: AddApiColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (AddApiColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: AddApiColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (AddApiColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: AddApiColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (AddApiColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: AddApiColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (AddApiColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_vector_db_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_vector_db_column_create.py new file mode 100644 index 0000000..9d2ff8c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_add_vector_db_column_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dynamic_column_create_response import DynamicColumnCreateResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.vector_db_column_request import VectorDBColumnRequest +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: VectorDBColumnRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/add_vector_db_column/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DynamicColumnCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: VectorDBColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (VectorDBColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: VectorDBColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (VectorDBColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: VectorDBColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (VectorDBColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: VectorDBColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (VectorDBColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_classify_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_classify_column_create.py new file mode 100644 index 0000000..83e413c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_classify_column_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.classify_column_request import ClassifyColumnRequest +from ...models.dynamic_column_create_response import DynamicColumnCreateResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: ClassifyColumnRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/classify-column/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DynamicColumnCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ClassifyColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ClassifyColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ClassifyColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ClassifyColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ClassifyColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ClassifyColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ClassifyColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ClassifyColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_add_eval_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_add_eval_create.py new file mode 100644 index 0000000..3126d94 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_add_eval_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_experiment_eval_request import CompareExperimentEvalRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: CompareExperimentEvalRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/compare-datasets/add-eval/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareExperimentEvalRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareExperimentEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareExperimentEvalRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (CompareExperimentEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareExperimentEvalRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareExperimentEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareExperimentEvalRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (CompareExperimentEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_create.py new file mode 100644 index 0000000..b7a83a8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_create.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_dataset import CompareDataset +from ...models.compare_dataset_response import CompareDatasetResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: CompareDataset, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/compare-datasets/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompareDatasetResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> Response[ + CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> Response[ + CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_download_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_download_create.py new file mode 100644 index 0000000..c2ef22d --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_download_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from io import BytesIO +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_dataset import CompareDataset +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import File, Response + + +def _get_kwargs( + dataset_id: str, + *, + body: CompareDataset, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/compare-datasets/download/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = File(payload=BytesIO(response.json())) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + File | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[File | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDataset, +) -> File | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (CompareDataset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + File | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_start_eval_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_start_eval_create.py new file mode 100644 index 0000000..a4787d3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_datasets_start_eval_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_start_evals_request import CompareStartEvalsRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: CompareStartEvalsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/compare-datasets/start-eval/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareStartEvalsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareStartEvalsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareStartEvalsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (CompareStartEvalsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareStartEvalsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareStartEvalsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareStartEvalsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (CompareStartEvalsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_get_evals_list_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_get_evals_list_create.py new file mode 100644 index 0000000..c8c9294 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_get_evals_list_create.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_eval_list_response import CompareEvalListResponse +from ...models.compare_evals_list_request import CompareEvalsListRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CompareEvalsListRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/compare/get-evals-list/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompareEvalListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CompareEvalsListRequest, +) -> Response[ + CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (CompareEvalsListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CompareEvalsListRequest, +) -> ( + CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + body (CompareEvalsListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CompareEvalsListRequest, +) -> Response[ + CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (CompareEvalsListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CompareEvalsListRequest, +) -> ( + CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + body (CompareEvalsListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareEvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_preview_run_eval_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_preview_run_eval_create.py new file mode 100644 index 0000000..88b7585 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_preview_run_eval_create.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_preview_run_eval_request import ComparePreviewRunEvalRequest +from ...models.eval_preview_response import EvalPreviewResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ComparePreviewRunEvalRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/compare/preview-run-eval/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalPreviewResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: ComparePreviewRunEvalRequest, +) -> Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + body (ComparePreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: ComparePreviewRunEvalRequest, +) -> EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + body (ComparePreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: ComparePreviewRunEvalRequest, +) -> Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + body (ComparePreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: ComparePreviewRunEvalRequest, +) -> EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + body (ComparePreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_stats_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_stats_create.py new file mode 100644 index 0000000..ceefe20 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_compare_stats_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_dataset_stats_request import CompareDatasetStatsRequest +from ...models.compare_dataset_stats_response import CompareDatasetStatsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: CompareDatasetStatsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/compare-stats/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompareDatasetStatsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDatasetStatsRequest, +) -> Response[ + CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareDatasetStatsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDatasetStatsRequest, +) -> ( + CompareDatasetStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (CompareDatasetStatsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDatasetStatsRequest, +) -> Response[ + CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (CompareDatasetStatsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CompareDatasetStatsRequest, +) -> ( + CompareDatasetStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (CompareDatasetStatsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_conditional_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_conditional_column_create.py new file mode 100644 index 0000000..4b020a6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_conditional_column_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.conditional_column_request import ConditionalColumnRequest +from ...models.dynamic_column_create_response import DynamicColumnCreateResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: ConditionalColumnRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/conditional-column/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DynamicColumnCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ConditionalColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ConditionalColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ConditionalColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ConditionalColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ConditionalColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ConditionalColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ConditionalColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ConditionalColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_delete.py new file mode 100644 index 0000000..97eb64a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_delete.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_dataset_delete_response import CompareDatasetDeleteResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + compare_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/datasets/delete-compare/{compare_id}/".format( + compare_id=quote(str(compare_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompareDatasetDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetDeleteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + compare_id=compare_id, + client=client, + ).parsed + + +async def asyncio_detailed( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetDeleteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + compare_id=compare_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_read.py new file mode 100644 index 0000000..bc9222e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_delete_compare_read.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_dataset_row_response import CompareDatasetRowResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + compare_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/datasets/delete-compare/{compare_id}/".format( + compare_id=quote(str(compare_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompareDatasetRowResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetRowResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + compare_id=compare_id, + client=client, + ).parsed + + +async def asyncio_detailed( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + compare_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetRowResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + compare_id=compare_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_duplicate_rows_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_duplicate_rows_create.py new file mode 100644 index 0000000..70f8f4a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_duplicate_rows_create.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.duplicate_rows_request import DuplicateRowsRequest +from ...models.duplicate_rows_response import DuplicateRowsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DuplicateRowsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/duplicate-rows/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DuplicateRowsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateRowsRequest, +) -> Response[ + DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DuplicateRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateRowsRequest, +) -> DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (DuplicateRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateRowsRequest, +) -> Response[ + DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DuplicateRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DuplicateRowsRequest, +) -> DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (DuplicateRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DuplicateRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_read.py new file mode 100644 index 0000000..4a11406 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_read.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_explanation_summary_response import ( + DatasetExplanationSummaryResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/datasets/explanation-summary/{dataset_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetExplanationSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_refresh_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_refresh_create.py new file mode 100644 index 0000000..fa63366 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_explanation_summary_refresh_create.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_explanation_summary_response import ( + DatasetExplanationSummaryResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_empty_request import ModelHubEmptyRequest +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: ModelHubEmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/explanation-summary/{dataset_id}/refresh/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetExplanationSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_extract_entities_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_extract_entities_create.py new file mode 100644 index 0000000..0e5d6c3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_extract_entities_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dynamic_column_message_response import DynamicColumnMessageResponse +from ...models.extract_entities_request import ExtractEntitiesRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: ExtractEntitiesRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/extract-entities/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DynamicColumnMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractEntitiesRequest, +) -> Response[ + DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ExtractEntitiesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractEntitiesRequest, +) -> ( + DynamicColumnMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ExtractEntitiesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractEntitiesRequest, +) -> Response[ + DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ExtractEntitiesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractEntitiesRequest, +) -> ( + DynamicColumnMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ExtractEntitiesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_delete.py new file mode 100644 index 0000000..c039c50 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_delete.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_dataset_delete_response import CompareDatasetDeleteResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + compare_id: str, + row_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/".format( + compare_id=quote(str(compare_id), safe=""), + row_id=quote(str(row_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompareDatasetDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + row_id=row_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetDeleteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + compare_id=compare_id, + row_id=row_id, + client=client, + ).parsed + + +async def asyncio_detailed( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + row_id=row_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetDeleteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + compare_id=compare_id, + row_id=row_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_read.py new file mode 100644 index 0000000..c7d522a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_get_compare_row_read.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.compare_dataset_row_response import CompareDatasetRowResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + compare_id: str, + row_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/".format( + compare_id=quote(str(compare_id), safe=""), + row_id=quote(str(row_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompareDatasetRowResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + row_id=row_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetRowResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + compare_id=compare_id, + row_id=row_id, + client=client, + ).parsed + + +async def asyncio_detailed( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + compare_id=compare_id, + row_id=row_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + compare_id: str, + row_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompareDatasetRowResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + compare_id (str): + row_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompareDatasetRowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + compare_id=compare_id, + row_id=row_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_detail_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_detail_create.py new file mode 100644 index 0000000..c7f747b --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_detail_create.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.hugging_face_dataset_detail_request import ( + HuggingFaceDatasetDetailRequest, +) +from ...models.hugging_face_dataset_detail_response import ( + HuggingFaceDatasetDetailResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: HuggingFaceDatasetDetailRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/huggingface/detail/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HuggingFaceDatasetDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = HuggingFaceDatasetDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HuggingFaceDatasetDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetDetailRequest, +) -> Response[ + HuggingFaceDatasetDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetDetailRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HuggingFaceDatasetDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetDetailRequest, +) -> ( + HuggingFaceDatasetDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetDetailRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HuggingFaceDatasetDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetDetailRequest, +) -> Response[ + HuggingFaceDatasetDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetDetailRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HuggingFaceDatasetDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetDetailRequest, +) -> ( + HuggingFaceDatasetDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetDetailRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HuggingFaceDatasetDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_list_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_list_create.py new file mode 100644 index 0000000..a527c1d --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_huggingface_list_create.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.hugging_face_dataset_list_request import HuggingFaceDatasetListRequest +from ...models.hugging_face_dataset_list_response import HuggingFaceDatasetListResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: HuggingFaceDatasetListRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/huggingface/list/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = HuggingFaceDatasetListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetListRequest, +) -> Response[ + HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetListRequest, +) -> ( + HuggingFaceDatasetListResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetListRequest, +) -> Response[ + HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetListRequest, +) -> ( + HuggingFaceDatasetListResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HuggingFaceDatasetListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_merge_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_merge_create.py new file mode 100644 index 0000000..db3fe14 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_merge_create.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.merge_dataset_request import MergeDatasetRequest +from ...models.merge_dataset_response import MergeDatasetResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: MergeDatasetRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/merge/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = MergeDatasetResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: MergeDatasetRequest, +) -> Response[ + ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (MergeDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: MergeDatasetRequest, +) -> ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (MergeDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: MergeDatasetRequest, +) -> Response[ + ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (MergeDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: MergeDatasetRequest, +) -> ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (MergeDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | MergeDatasetResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_preview_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_preview_create.py new file mode 100644 index 0000000..776b91e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_datasets_preview_create.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.preview_dataset_operation_request import PreviewDatasetOperationRequest +from ...models.preview_dataset_operation_response import PreviewDatasetOperationResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + operation_type: str, + *, + body: PreviewDatasetOperationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/datasets/{dataset_id}/preview/{operation_type}/".format( + dataset_id=quote(str(dataset_id), safe=""), + operation_type=quote(str(operation_type), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse +): + if response.status_code == 200: + response_200 = PreviewDatasetOperationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + operation_type: str, + *, + client: AuthenticatedClient | Client, + body: PreviewDatasetOperationRequest, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse +]: + """ + Args: + dataset_id (str): + operation_type (str): + body (PreviewDatasetOperationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + operation_type=operation_type, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + operation_type: str, + *, + client: AuthenticatedClient | Client, + body: PreviewDatasetOperationRequest, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | PreviewDatasetOperationResponse + | None +): + """ + Args: + dataset_id (str): + operation_type (str): + body (PreviewDatasetOperationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + operation_type=operation_type, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + operation_type: str, + *, + client: AuthenticatedClient | Client, + body: PreviewDatasetOperationRequest, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse +]: + """ + Args: + dataset_id (str): + operation_type (str): + body (PreviewDatasetOperationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + operation_type=operation_type, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + operation_type: str, + *, + client: AuthenticatedClient | Client, + body: PreviewDatasetOperationRequest, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | PreviewDatasetOperationResponse + | None +): + """ + Args: + dataset_id (str): + operation_type (str): + body (PreviewDatasetOperationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | PreviewDatasetOperationResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + operation_type=operation_type, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_delete_eval_template_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_delete_eval_template_create.py new file mode 100644 index 0000000..6d74561 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_delete_eval_template_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.delete_eval_template import DeleteEvalTemplate +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.model_hub_string_result_response import ModelHubStringResultResponse +from ...types import Response + + +def _get_kwargs( + *, + body: DeleteEvalTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/delete-eval-template/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse: + if response.status_code == 200: + response_200 = ModelHubStringResultResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: DeleteEvalTemplate, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse +]: + """ + Args: + body (DeleteEvalTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: DeleteEvalTemplate, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | ModelHubStringResultResponse + | None +): + """ + Args: + body (DeleteEvalTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: DeleteEvalTemplate, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse +]: + """ + Args: + body (DeleteEvalTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: DeleteEvalTemplate, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | ModelHubStringResultResponse + | None +): + """ + Args: + body (DeleteEvalTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | ModelHubStringResultResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_as_new_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_as_new_create.py new file mode 100644 index 0000000..e550541 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_as_new_create.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.add_as_new_dataset_request import AddAsNewDatasetRequest +from ...models.dataset_copy_response import DatasetCopyResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: AddAsNewDatasetRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/add-as-new/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetCopyResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AddAsNewDatasetRequest, +) -> Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + body (AddAsNewDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AddAsNewDatasetRequest, +) -> DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + body (AddAsNewDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AddAsNewDatasetRequest, +) -> Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + body (AddAsNewDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AddAsNewDatasetRequest, +) -> DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + body (AddAsNewDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_columns_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_columns_create.py new file mode 100644 index 0000000..ff5c910 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_columns_create.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_add_empty_columns_request import DatasetAddEmptyColumnsRequest +from ...models.dataset_columns_mutation_response import DatasetColumnsMutationResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetAddEmptyColumnsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_empty_columns/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetColumnsMutationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyColumnsRequest, +) -> Response[ + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddEmptyColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyColumnsRequest, +) -> ( + DatasetColumnsMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddEmptyColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyColumnsRequest, +) -> Response[ + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddEmptyColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyColumnsRequest, +) -> ( + DatasetColumnsMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddEmptyColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetColumnsMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_rows_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_rows_create.py new file mode 100644 index 0000000..9e3facf --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_empty_rows_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_add_empty_rows_request import DatasetAddEmptyRowsRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetAddEmptyRowsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_empty_rows/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyRowsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddEmptyRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyRowsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddEmptyRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyRowsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddEmptyRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddEmptyRowsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddEmptyRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_multiple_static_columns_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_multiple_static_columns_create.py new file mode 100644 index 0000000..f0ba1e7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_multiple_static_columns_create.py @@ -0,0 +1,283 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_multiple_static_columns_request import ( + DatasetMultipleStaticColumnsRequest, +) +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetMultipleStaticColumnsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_multiple_static_columns/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetMultipleStaticColumnsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + r"""Add multiple static columns to a dataset at once. + + Expected request data: + { + \"columns\": [ + { + \"new_column_name\": \"column1\", + \"column_type\": \"string\", + \"source\": \"OTHERS\" # optional + }, + { + \"new_column_name\": \"column2\", + \"column_type\": \"number\", + \"source\": \"OTHERS\" # optional + } + ] + } + + Args: + dataset_id (str): + body (DatasetMultipleStaticColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetMultipleStaticColumnsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + r"""Add multiple static columns to a dataset at once. + + Expected request data: + { + \"columns\": [ + { + \"new_column_name\": \"column1\", + \"column_type\": \"string\", + \"source\": \"OTHERS\" # optional + }, + { + \"new_column_name\": \"column2\", + \"column_type\": \"number\", + \"source\": \"OTHERS\" # optional + } + ] + } + + Args: + dataset_id (str): + body (DatasetMultipleStaticColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetMultipleStaticColumnsRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + r"""Add multiple static columns to a dataset at once. + + Expected request data: + { + \"columns\": [ + { + \"new_column_name\": \"column1\", + \"column_type\": \"string\", + \"source\": \"OTHERS\" # optional + }, + { + \"new_column_name\": \"column2\", + \"column_type\": \"number\", + \"source\": \"OTHERS\" # optional + } + ] + } + + Args: + dataset_id (str): + body (DatasetMultipleStaticColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetMultipleStaticColumnsRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + r"""Add multiple static columns to a dataset at once. + + Expected request data: + { + \"columns\": [ + { + \"new_column_name\": \"column1\", + \"column_type\": \"string\", + \"source\": \"OTHERS\" # optional + }, + { + \"new_column_name\": \"column2\", + \"column_type\": \"number\", + \"source\": \"OTHERS\" # optional + } + ] + } + + Args: + dataset_id (str): + body (DatasetMultipleStaticColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_existing_dataset_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_existing_dataset_create.py new file mode 100644 index 0000000..71b2acc --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_existing_dataset_create.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_add_rows_from_existing_request import ( + DatasetAddRowsFromExistingRequest, +) +from ...models.dataset_rows_imported_response import DatasetRowsImportedResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetAddRowsFromExistingRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetRowsImportedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsFromExistingRequest, +) -> Response[ + DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddRowsFromExistingRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsFromExistingRequest, +) -> ( + DatasetRowsImportedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddRowsFromExistingRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsFromExistingRequest, +) -> Response[ + DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetAddRowsFromExistingRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetAddRowsFromExistingRequest, +) -> ( + DatasetRowsImportedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetAddRowsFromExistingRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRowsImportedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_file_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_file_create.py new file mode 100644 index 0000000..0f70add --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_file_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.add_rows_from_file_request import AddRowsFromFileRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: AddRowsFromFileRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/add_rows_from_file/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AddRowsFromFileRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (AddRowsFromFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AddRowsFromFileRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (AddRowsFromFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AddRowsFromFileRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (AddRowsFromFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AddRowsFromFileRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (AddRowsFromFileRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_huggingface_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_huggingface_create.py new file mode 100644 index 0000000..281ae56 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_from_huggingface_create.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_rows_import_message_response import ( + DatasetRowsImportMessageResponse, +) +from ...models.hugging_face_add_rows_request import HuggingFaceAddRowsRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: HuggingFaceAddRowsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_rows_from_huggingface/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetRowsImportMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetRowsImportMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetRowsImportMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: HuggingFaceAddRowsRequest, +) -> Response[ + DatasetRowsImportMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (HuggingFaceAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRowsImportMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: HuggingFaceAddRowsRequest, +) -> ( + DatasetRowsImportMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (HuggingFaceAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRowsImportMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: HuggingFaceAddRowsRequest, +) -> Response[ + DatasetRowsImportMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (HuggingFaceAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetRowsImportMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: HuggingFaceAddRowsRequest, +) -> ( + DatasetRowsImportMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (HuggingFaceAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetRowsImportMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_sdk_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_sdk_create.py new file mode 100644 index 0000000..b6fe7df --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_rows_sdk_create.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_sdk_rows_request import DatasetSdkRowsRequest +from ...models.dataset_sdk_rows_response import DatasetSdkRowsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: DatasetSdkRowsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/add_rows_sdk/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetSdkRowsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetSdkRowsRequest, +) -> Response[ + DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetSdkRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: DatasetSdkRowsRequest, +) -> DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + body (DatasetSdkRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetSdkRowsRequest, +) -> Response[ + DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetSdkRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: DatasetSdkRowsRequest, +) -> DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + body (DatasetSdkRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetSdkRowsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_run_prompt_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_run_prompt_column_create.py new file mode 100644 index 0000000..11a54f2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_run_prompt_column_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.add_run_prompt import AddRunPrompt +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: AddRunPrompt, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/add_run_prompt_column/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AddRunPrompt, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (AddRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AddRunPrompt, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (AddRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AddRunPrompt, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (AddRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AddRunPrompt, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (AddRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_static_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_static_column_create.py new file mode 100644 index 0000000..0702c05 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_static_column_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_static_column_request import DatasetStaticColumnRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetStaticColumnRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_static_column/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetStaticColumnRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetStaticColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetStaticColumnRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetStaticColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetStaticColumnRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetStaticColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetStaticColumnRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetStaticColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_synthetic_data_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_synthetic_data_create.py new file mode 100644 index 0000000..ba7bbca --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_synthetic_data_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.synthetic_data import SyntheticData +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: SyntheticData, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_synthetic_data/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticData, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (SyntheticData): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticData, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (SyntheticData): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticData, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (SyntheticData): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticData, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (SyntheticData): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_user_eval_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_user_eval_create.py new file mode 100644 index 0000000..fe8589f --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_add_user_eval_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.user_eval_mutation_request import UserEvalMutationRequest +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: UserEvalMutationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/add_user_eval/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalMutationRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (UserEvalMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalMutationRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (UserEvalMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalMutationRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (UserEvalMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalMutationRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (UserEvalMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_clone_dataset_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_clone_dataset_create.py new file mode 100644 index 0000000..02c37e8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_clone_dataset_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.clone_dataset_request import CloneDatasetRequest +from ...models.dataset_copy_response import DatasetCopyResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: CloneDatasetRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/clone-dataset/{dataset_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetCopyResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CloneDatasetRequest, +) -> Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + body (CloneDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CloneDatasetRequest, +) -> DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (CloneDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CloneDatasetRequest, +) -> Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + body (CloneDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CloneDatasetRequest, +) -> DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (CloneDatasetRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCopyResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_create.py new file mode 100644 index 0000000..16ab3b3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_create.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.create_dataset_from_experiment_request import ( + CreateDatasetFromExperimentRequest, +) +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + exp_dataset_id: str, + *, + body: CreateDatasetFromExperimentRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{exp_dataset_id}/create-dataset/".format( + exp_dataset_id=quote(str(exp_dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + exp_dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromExperimentRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + exp_dataset_id (str): + body (CreateDatasetFromExperimentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + exp_dataset_id=exp_dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + exp_dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromExperimentRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + exp_dataset_id (str): + body (CreateDatasetFromExperimentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + exp_dataset_id=exp_dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + exp_dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromExperimentRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + exp_dataset_id (str): + body (CreateDatasetFromExperimentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + exp_dataset_id=exp_dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + exp_dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateDatasetFromExperimentRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + exp_dataset_id (str): + body (CreateDatasetFromExperimentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + exp_dataset_id=exp_dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_from_huggingface_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_from_huggingface_create.py new file mode 100644 index 0000000..772344c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_dataset_from_huggingface_create.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_create_started_response import DatasetCreateStartedResponse +from ...models.hugging_face_dataset_create_request import ( + HuggingFaceDatasetCreateRequest, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: HuggingFaceDatasetCreateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/create-dataset-from-huggingface/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetCreateStartedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetCreateRequest, +) -> Response[ + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetCreateRequest, +) -> ( + DatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetCreateRequest, +) -> Response[ + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetCreateRequest, +) -> ( + DatasetCreateStartedResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCreateStartedResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_synthetic_dataset_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_synthetic_dataset_create.py new file mode 100644 index 0000000..d88fa2e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_create_synthetic_dataset_create.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.synthetic_dataset_create_started_response import ( + SyntheticDatasetCreateStartedResponse, +) +from ...models.synthetic_dataset_creation import SyntheticDatasetCreation +from ...types import Response + + +def _get_kwargs( + *, + body: SyntheticDatasetCreation, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/create-synthetic-dataset/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetCreateStartedResponse +): + if response.status_code == 200: + response_200 = SyntheticDatasetCreateStartedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetCreateStartedResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetCreation, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetCreateStartedResponse +]: + """ + Args: + body (SyntheticDatasetCreation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetCreateStartedResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetCreation, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetCreateStartedResponse + | None +): + """ + Args: + body (SyntheticDatasetCreation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetCreateStartedResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetCreation, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetCreateStartedResponse +]: + """ + Args: + body (SyntheticDatasetCreation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetCreateStartedResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetCreation, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetCreateStartedResponse + | None +): + """ + Args: + body (SyntheticDatasetCreation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetCreateStartedResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_dataset_creation_progress_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_dataset_creation_progress_read.py new file mode 100644 index 0000000..b58a7f9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_dataset_creation_progress_read.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_creation_progress_response import DatasetCreationProgressResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/dataset-creation-progress/{dataset_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetCreationProgressResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """API endpoint to check the progress of dataset creation from file upload + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetCreationProgressResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """API endpoint to check the progress of dataset creation from file upload + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """API endpoint to check the progress of dataset creation from file upload + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetCreationProgressResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """API endpoint to check the progress of dataset creation from file upload + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCreationProgressResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_dataset_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_dataset_delete.py new file mode 100644 index 0000000..83d292c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_dataset_delete.py @@ -0,0 +1,121 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/develops/delete_dataset/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_template_eval_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_template_eval_delete.py new file mode 100644 index 0000000..f290b4b --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_template_eval_delete.py @@ -0,0 +1,162 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + eval_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + eval_id=quote(str(eval_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_user_eval_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_user_eval_delete.py new file mode 100644 index 0000000..6d43943 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_delete_user_eval_delete.py @@ -0,0 +1,162 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + eval_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + eval_id=quote(str(eval_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + dataset_id (str): + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_and_run_user_eval_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_and_run_user_eval_create.py new file mode 100644 index 0000000..7900b7a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_and_run_user_eval_create.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.user_eval_update_request import UserEvalUpdateRequest +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + eval_id: str, + *, + body: UserEvalUpdateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + eval_id=quote(str(eval_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalUpdateRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + eval_id (str): + body (UserEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalUpdateRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + eval_id (str): + body (UserEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalUpdateRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + eval_id (str): + body (UserEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: UserEvalUpdateRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + eval_id (str): + body (UserEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_dataset_behavior_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_dataset_behavior_update.py new file mode 100644 index 0000000..195906c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_dataset_behavior_update.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_behavior_request import DatasetBehaviorRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: DatasetBehaviorRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/develops/{dataset_id}/edit_dataset_behavior/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetBehaviorRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetBehaviorRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetBehaviorRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetBehaviorRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetBehaviorRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (DatasetBehaviorRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetBehaviorRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (DatasetBehaviorRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_run_prompt_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_run_prompt_column_create.py new file mode 100644 index 0000000..3bc5a33 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_edit_run_prompt_column_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.edit_run_prompt_column import EditRunPromptColumn +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: EditRunPromptColumn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/edit_run_prompt_column/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: EditRunPromptColumn, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (EditRunPromptColumn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: EditRunPromptColumn, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (EditRunPromptColumn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: EditRunPromptColumn, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (EditRunPromptColumn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: EditRunPromptColumn, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (EditRunPromptColumn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_extract_json_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_extract_json_column_create.py new file mode 100644 index 0000000..be260d1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_extract_json_column_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dynamic_column_create_response import DynamicColumnCreateResponse +from ...models.extract_json_column_request import ExtractJsonColumnRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: ExtractJsonColumnRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/extract-json-column/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DynamicColumnCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractJsonColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ExtractJsonColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractJsonColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ExtractJsonColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractJsonColumnRequest, +) -> Response[ + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (ExtractJsonColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: ExtractJsonColumnRequest, +) -> ( + DynamicColumnCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (ExtractJsonColumnRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DynamicColumnCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_cell_data_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_cell_data_create.py new file mode 100644 index 0000000..cf07f68 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_cell_data_create.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_cell_data_request import DatasetCellDataRequest +from ...models.dataset_cell_data_response import DatasetCellDataResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: DatasetCellDataRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/get-cell-data/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetCellDataResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetCellDataRequest, +) -> Response[ + DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetCellDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: DatasetCellDataRequest, +) -> ( + DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + body (DatasetCellDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetCellDataRequest, +) -> Response[ + DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetCellDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: DatasetCellDataRequest, +) -> ( + DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Args: + body (DatasetCellDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetCellDataResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_derived_datasets_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_derived_datasets_read.py new file mode 100644 index 0000000..49ce6b9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_derived_datasets_read.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_explanation_summary_response import ( + DatasetExplanationSummaryResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/get-derived-datasets/{dataset_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = DatasetExplanationSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DatasetExplanationSummaryResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetExplanationSummaryResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_eval_structure_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_eval_structure_read.py new file mode 100644 index 0000000..e4d4c63 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_eval_structure_read.py @@ -0,0 +1,221 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_structure_response import EvalStructureResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_develops_get_eval_structure_read_eval_type import ( + ModelHubDevelopsGetEvalStructureReadEvalType, +) +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import UNSET, Response + + +def _get_kwargs( + dataset_id: str, + eval_id: str, + *, + eval_type: ModelHubDevelopsGetEvalStructureReadEvalType, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_eval_type = eval_type.value + params["eval_type"] = json_eval_type + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + eval_id=quote(str(eval_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalStructureResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + eval_type: ModelHubDevelopsGetEvalStructureReadEvalType, +) -> Response[ + EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + eval_id (str): + eval_type (ModelHubDevelopsGetEvalStructureReadEvalType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + eval_type=eval_type, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + eval_type: ModelHubDevelopsGetEvalStructureReadEvalType, +) -> EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + eval_id (str): + eval_type (ModelHubDevelopsGetEvalStructureReadEvalType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + eval_type=eval_type, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + eval_type: ModelHubDevelopsGetEvalStructureReadEvalType, +) -> Response[ + EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + eval_id (str): + eval_type (ModelHubDevelopsGetEvalStructureReadEvalType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + eval_type=eval_type, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + eval_type: ModelHubDevelopsGetEvalStructureReadEvalType, +) -> EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + eval_id (str): + eval_type (ModelHubDevelopsGetEvalStructureReadEvalType): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalStructureResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + eval_type=eval_type, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_evals_list_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_evals_list_list.py new file mode 100644 index 0000000..8ba034e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_evals_list_list.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_list_response import EvalListResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/{dataset_id}/get_evals_list/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_experiment_dataset_table_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_experiment_dataset_table_list.py new file mode 100644 index 0000000..b5a90dc --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_experiment_dataset_table_list.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_table_response import DatasetTableResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/".format( + experiment_dataset_id=quote(str(experiment_dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DatasetTableResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_dataset_id=experiment_dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + experiment_dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_dataset_id=experiment_dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + experiment_dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_dataset_id=experiment_dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + experiment_dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DatasetTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_dataset_id=experiment_dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_function_list_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_function_list_list.py new file mode 100644 index 0000000..d225621 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_function_list_list.py @@ -0,0 +1,159 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_function_list_response import EvalFunctionListResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/get_function_list/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalFunctionListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalFunctionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_huggingface_dataset_config_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_huggingface_dataset_config_create.py new file mode 100644 index 0000000..f2faea5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_huggingface_dataset_config_create.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.hugging_face_dataset_config_request import ( + HuggingFaceDatasetConfigRequest, +) +from ...models.hugging_face_dataset_config_response import ( + HuggingFaceDatasetConfigResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: HuggingFaceDatasetConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/get-huggingface-dataset-config/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + HuggingFaceDatasetConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = HuggingFaceDatasetConfigResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + HuggingFaceDatasetConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetConfigRequest, +) -> Response[ + HuggingFaceDatasetConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HuggingFaceDatasetConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetConfigRequest, +) -> ( + HuggingFaceDatasetConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HuggingFaceDatasetConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetConfigRequest, +) -> Response[ + HuggingFaceDatasetConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (HuggingFaceDatasetConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HuggingFaceDatasetConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: HuggingFaceDatasetConfigRequest, +) -> ( + HuggingFaceDatasetConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (HuggingFaceDatasetConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HuggingFaceDatasetConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_row_diff_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_row_diff_create.py new file mode 100644 index 0000000..674f929 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_get_row_diff_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_row_diff_request import DatasetRowDiffRequest +from ...models.experiment_row_diff_response import ExperimentRowDiffResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: DatasetRowDiffRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/get-row-diff/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentRowDiffResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> Response[ + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> ( + ExperimentRowDiffResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> Response[ + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> ( + ExperimentRowDiffResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_eval_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_eval_create.py new file mode 100644 index 0000000..e32f48f --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_eval_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_preview_response import EvalPreviewResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.preview_run_eval_request import PreviewRunEvalRequest +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: PreviewRunEvalRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/preview_run_eval/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalPreviewResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: PreviewRunEvalRequest, +) -> Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + body (PreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: PreviewRunEvalRequest, +) -> EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (PreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: PreviewRunEvalRequest, +) -> Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse]: + """ + Args: + dataset_id (str): + body (PreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: PreviewRunEvalRequest, +) -> EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """ + Args: + dataset_id (str): + body (PreviewRunEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalPreviewResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_prompt_column_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_prompt_column_create.py new file mode 100644 index 0000000..11cce6e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_preview_run_prompt_column_create.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.preview_run_prompt import PreviewRunPrompt +from ...models.run_prompt_column_preview_response import RunPromptColumnPreviewResponse +from ...types import Response + + +def _get_kwargs( + *, + body: PreviewRunPrompt, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/preview_run_prompt_column/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse +): + if response.status_code == 200: + response_200 = RunPromptColumnPreviewResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PreviewRunPrompt, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse +]: + """ + Args: + body (PreviewRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PreviewRunPrompt, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | RunPromptColumnPreviewResponse + | None +): + """ + Args: + body (PreviewRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PreviewRunPrompt, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse +]: + """ + Args: + body (PreviewRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PreviewRunPrompt, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | RunPromptColumnPreviewResponse + | None +): + """ + Args: + body (PreviewRunPrompt): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnPreviewResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_provider_status_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_provider_status_list.py new file mode 100644 index 0000000..8362f6a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_provider_status_list.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.provider_status_response import ProviderStatusResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/provider-status/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse: + if response.status_code == 200: + response_200 = ProviderStatusResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | ProviderStatusResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_column_config_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_column_config_list.py new file mode 100644 index 0000000..c0b4122 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_column_config_list.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.run_prompt_column_config_response import RunPromptColumnConfigResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/retrieve_run_prompt_column_config/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse: + if response.status_code == 200: + response_200 = RunPromptColumnConfigResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | RunPromptColumnConfigResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | RunPromptColumnConfigResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptColumnConfigResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_options_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_options_list.py new file mode 100644 index 0000000..fcfe951 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_retrieve_run_prompt_options_list.py @@ -0,0 +1,159 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.run_prompt_options_response import RunPromptOptionsResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/retrieve_run_prompt_options/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse: + if response.status_code == 200: + response_200 = RunPromptOptionsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | RunPromptOptionsResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_start_evals_process_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_start_evals_process_create.py new file mode 100644 index 0000000..c144af0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_start_evals_process_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.start_evals_process_request import StartEvalsProcessRequest +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: StartEvalsProcessRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/start_evals_process/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: StartEvalsProcessRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (StartEvalsProcessRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: StartEvalsProcessRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (StartEvalsProcessRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: StartEvalsProcessRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + body (StartEvalsProcessRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: StartEvalsProcessRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + body (StartEvalsProcessRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_stop_user_eval_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_stop_user_eval_create.py new file mode 100644 index 0000000..6745d65 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_stop_user_eval_create.py @@ -0,0 +1,255 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.stop_user_eval_request import StopUserEvalRequest +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + eval_id: str, + *, + body: StopUserEvalRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + eval_id=quote(str(eval_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: StopUserEvalRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /develops//stop_user_eval// + Stops a running evaluation by setting its status to Completed. + + Accepts optional experiment_id in the body. When present, the eval is + looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) + and cells are updated across both base columns (source_id=eval_id) and + per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + + Args: + dataset_id (str): + eval_id (str): + body (StopUserEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: StopUserEvalRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /develops//stop_user_eval// + Stops a running evaluation by setting its status to Completed. + + Accepts optional experiment_id in the body. When present, the eval is + looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) + and cells are updated across both base columns (source_id=eval_id) and + per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + + Args: + dataset_id (str): + eval_id (str): + body (StopUserEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: StopUserEvalRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /develops//stop_user_eval// + Stops a running evaluation by setting its status to Completed. + + Accepts optional experiment_id in the body. When present, the eval is + looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) + and cells are updated across both base columns (source_id=eval_id) and + per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + + Args: + dataset_id (str): + eval_id (str): + body (StopUserEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + eval_id=eval_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + eval_id: str, + *, + client: AuthenticatedClient | Client, + body: StopUserEvalRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /develops//stop_user_eval// + Stops a running evaluation by setting its status to Completed. + + Accepts optional experiment_id in the body. When present, the eval is + looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) + and cells are updated across both base columns (source_id=eval_id) and + per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + + Args: + dataset_id (str): + eval_id (str): + body (StopUserEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + eval_id=eval_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_synthetic_config_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_synthetic_config_list.py new file mode 100644 index 0000000..627359a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_synthetic_config_list.py @@ -0,0 +1,194 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.synthetic_dataset_config_response import SyntheticDatasetConfigResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/develops/{dataset_id}/synthetic-config/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse +): + if response.status_code == 200: + response_200 = SyntheticDatasetConfigResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetConfigResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse +]: + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetConfigResponse + | None +): + """ + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetConfigResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_name_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_name_update.py new file mode 100644 index 0000000..d032b3e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_name_update.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_update_column_name_request import DatasetUpdateColumnNameRequest +from ...models.develop_dataset_message_response import DevelopDatasetMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + column_id: str, + *, + body: DatasetUpdateColumnNameRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/develops/{dataset_id}/update_column_name/{column_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + column_id=quote(str(column_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DevelopDatasetMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnNameRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnNameRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + column_id=column_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnNameRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnNameRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + column_id=column_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnNameRequest, +) -> Response[ + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnNameRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + column_id=column_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnNameRequest, +) -> ( + DevelopDatasetMessageResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnNameRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DevelopDatasetMessageResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + column_id=column_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_type_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_type_update.py new file mode 100644 index 0000000..14f42c7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_column_type_update.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.column_type_conversion_response import ColumnTypeConversionResponse +from ...models.dataset_update_column_type_request import DatasetUpdateColumnTypeRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + column_id: str, + *, + body: DatasetUpdateColumnTypeRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/develops/{dataset_id}/update_column_type/{column_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + column_id=quote(str(column_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ColumnTypeConversionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnTypeRequest, +) -> Response[ + ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnTypeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + column_id=column_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnTypeRequest, +) -> ( + ColumnTypeConversionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnTypeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + column_id=column_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnTypeRequest, +) -> Response[ + ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnTypeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + column_id=column_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + column_id: str, + *, + client: AuthenticatedClient | Client, + body: DatasetUpdateColumnTypeRequest, +) -> ( + ColumnTypeConversionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + dataset_id (str): + column_id (str): + body (DatasetUpdateColumnTypeRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ColumnTypeConversionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + column_id=column_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_synthetic_config_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_synthetic_config_update.py new file mode 100644 index 0000000..979cede --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_develops_update_synthetic_config_update.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.synthetic_dataset_config import SyntheticDatasetConfig +from ...models.synthetic_dataset_update_response import SyntheticDatasetUpdateResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, + *, + body: SyntheticDatasetConfig, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/develops/{dataset_id}/update-synthetic-config/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse +): + if response.status_code == 200: + response_200 = SyntheticDatasetUpdateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetConfig, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse +]: + """ + Args: + dataset_id (str): + body (SyntheticDatasetConfig): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetConfig, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetUpdateResponse + | None +): + """ + Args: + dataset_id (str): + body (SyntheticDatasetConfig): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetConfig, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse +]: + """ + Args: + dataset_id (str): + body (SyntheticDatasetConfig): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, + body: SyntheticDatasetConfig, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | SyntheticDatasetUpdateResponse + | None +): + """ + Args: + dataset_id (str): + body (SyntheticDatasetConfig): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | SyntheticDatasetUpdateResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_bulk_delete_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_bulk_delete_create.py new file mode 100644 index 0000000..abff7bf --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_bulk_delete_create.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_bulk_delete_request import EvalTemplateBulkDeleteRequest +from ...models.eval_template_bulk_delete_response import EvalTemplateBulkDeleteResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: EvalTemplateBulkDeleteRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/bulk-delete/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = EvalTemplateBulkDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateBulkDeleteRequest, +) -> Response[ + EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/bulk-delete/ + + Soft-delete multiple eval templates. Only user-owned templates can be deleted. + + Args: + body (EvalTemplateBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateBulkDeleteRequest, +) -> ( + EvalTemplateBulkDeleteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/bulk-delete/ + + Soft-delete multiple eval templates. Only user-owned templates can be deleted. + + Args: + body (EvalTemplateBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateBulkDeleteRequest, +) -> Response[ + EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/bulk-delete/ + + Soft-delete multiple eval templates. Only user-owned templates can be deleted. + + Args: + body (EvalTemplateBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateBulkDeleteRequest, +) -> ( + EvalTemplateBulkDeleteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/bulk-delete/ + + Soft-delete multiple eval templates. Only user-owned templates can be deleted. + + Args: + body (EvalTemplateBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateBulkDeleteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_adhoc_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_adhoc_create.py new file mode 100644 index 0000000..c99e61d --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_adhoc_create.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.composite_eval_adhoc_execute_request import ( + CompositeEvalAdhocExecuteRequest, +) +from ...models.composite_eval_execute_response import CompositeEvalExecuteResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CompositeEvalAdhocExecuteRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/composite/execute-adhoc/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompositeEvalExecuteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalAdhocExecuteRequest, +) -> Response[ + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/composite/execute-adhoc/ + + Execute a composite eval configuration without persisting it. Used by + the eval create page so users can test a composite (selected children + + aggregation settings) before clicking Save. Builds an unsaved parent + template and unsaved child links in memory and reuses + `execute_composite_children_sync` so semantics match the persisted path. + + Args: + body (CompositeEvalAdhocExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalAdhocExecuteRequest, +) -> ( + CompositeEvalExecuteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/composite/execute-adhoc/ + + Execute a composite eval configuration without persisting it. Used by + the eval create page so users can test a composite (selected children + + aggregation settings) before clicking Save. Builds an unsaved parent + template and unsaved child links in memory and reuses + `execute_composite_children_sync` so semantics match the persisted path. + + Args: + body (CompositeEvalAdhocExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalAdhocExecuteRequest, +) -> Response[ + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/composite/execute-adhoc/ + + Execute a composite eval configuration without persisting it. Used by + the eval create page so users can test a composite (selected children + + aggregation settings) before clicking Save. Builds an unsaved parent + template and unsaved child links in memory and reuses + `execute_composite_children_sync` so semantics match the persisted path. + + Args: + body (CompositeEvalAdhocExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalAdhocExecuteRequest, +) -> ( + CompositeEvalExecuteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/composite/execute-adhoc/ + + Execute a composite eval configuration without persisting it. Used by + the eval create page so users can test a composite (selected children + + aggregation settings) before clicking Save. Builds an unsaved parent + template and unsaved child links in memory and reuses + `execute_composite_children_sync` so semantics match the persisted path. + + Args: + body (CompositeEvalAdhocExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_create.py new file mode 100644 index 0000000..fb778e8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_execute_create.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.composite_eval_execute_request import CompositeEvalExecuteRequest +from ...models.composite_eval_execute_response import CompositeEvalExecuteResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + *, + body: CompositeEvalExecuteRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/{template_id}/composite/execute/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompositeEvalExecuteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalExecuteRequest, +) -> Response[ + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//composite/execute/ + + Execute all child evals in a composite and optionally aggregate results. + Thin wrapper around `execute_composite_children_sync` — the same helper + the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation + semantics stay consistent across surfaces. + + Args: + template_id (str): + body (CompositeEvalExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalExecuteRequest, +) -> ( + CompositeEvalExecuteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//composite/execute/ + + Execute all child evals in a composite and optionally aggregate results. + Thin wrapper around `execute_composite_children_sync` — the same helper + the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation + semantics stay consistent across surfaces. + + Args: + template_id (str): + body (CompositeEvalExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalExecuteRequest, +) -> Response[ + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//composite/execute/ + + Execute all child evals in a composite and optionally aggregate results. + Thin wrapper around `execute_composite_children_sync` — the same helper + the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation + semantics stay consistent across surfaces. + + Args: + template_id (str): + body (CompositeEvalExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalExecuteRequest, +) -> ( + CompositeEvalExecuteResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//composite/execute/ + + Execute all child evals in a composite and optionally aggregate results. + Thin wrapper around `execute_composite_children_sync` — the same helper + the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation + semantics stay consistent across surfaces. + + Args: + template_id (str): + body (CompositeEvalExecuteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalExecuteResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_list.py new file mode 100644 index 0000000..7fdd9f4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_list.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.composite_eval_detail_response import CompositeEvalDetailResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/eval-templates/{template_id}/composite/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompositeEvalDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//composite/ + + Get composite eval detail with its children. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompositeEvalDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET /model-hub/eval-templates//composite/ + + Get composite eval detail with its children. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//composite/ + + Get composite eval detail with its children. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CompositeEvalDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET /model-hub/eval-templates//composite/ + + Get composite eval detail with its children. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_partial_update.py new file mode 100644 index 0000000..37bd3cf --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_composite_partial_update.py @@ -0,0 +1,241 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.composite_eval_detail_response import CompositeEvalDetailResponse +from ...models.composite_eval_update_request import CompositeEvalUpdateRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + *, + body: CompositeEvalUpdateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/eval-templates/{template_id}/composite/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompositeEvalDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalUpdateRequest, +) -> Response[ + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """PATCH — partial update of a composite eval. + + Supported fields (all optional): + name, description, tags, + aggregation_enabled, aggregation_function, + child_template_ids (replaces the child list), + child_weights (map of child_id -> weight). + + Args: + template_id (str): + body (CompositeEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalUpdateRequest, +) -> ( + CompositeEvalDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """PATCH — partial update of a composite eval. + + Supported fields (all optional): + name, description, tags, + aggregation_enabled, aggregation_function, + child_template_ids (replaces the child list), + child_weights (map of child_id -> weight). + + Args: + template_id (str): + body (CompositeEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalUpdateRequest, +) -> Response[ + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """PATCH — partial update of a composite eval. + + Supported fields (all optional): + name, description, tags, + aggregation_enabled, aggregation_function, + child_template_ids (replaces the child list), + child_weights (map of child_id -> weight). + + Args: + template_id (str): + body (CompositeEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: CompositeEvalUpdateRequest, +) -> ( + CompositeEvalDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """PATCH — partial update of a composite eval. + + Supported fields (all optional): + name, description, tags, + aggregation_enabled, aggregation_function, + child_template_ids (replaces the child list), + child_weights (map of child_id -> weight). + + Args: + template_id (str): + body (CompositeEvalUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_composite_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_composite_create.py new file mode 100644 index 0000000..6edcd24 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_composite_create.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.composite_eval_create_request import CompositeEvalCreateRequest +from ...models.composite_eval_create_response import CompositeEvalCreateResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CompositeEvalCreateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/create-composite/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = CompositeEvalCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalCreateRequest, +) -> Response[ + CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/create-composite/ + + Create a composite eval from a list of existing eval template IDs. + + Args: + body (CompositeEvalCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalCreateRequest, +) -> ( + CompositeEvalCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/create-composite/ + + Create a composite eval from a list of existing eval template IDs. + + Args: + body (CompositeEvalCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalCreateRequest, +) -> Response[ + CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/create-composite/ + + Create a composite eval from a list of existing eval template IDs. + + Args: + body (CompositeEvalCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CompositeEvalCreateRequest, +) -> ( + CompositeEvalCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/create-composite/ + + Create a composite eval from a list of existing eval template IDs. + + Args: + body (CompositeEvalCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CompositeEvalCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_v2_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_v2_create.py new file mode 100644 index 0000000..518cedc --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_create_v2_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_create_response import EvalTemplateCreateResponse +from ...models.eval_template_create_v2_request import EvalTemplateCreateV2Request +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: EvalTemplateCreateV2Request, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/create-v2/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalTemplateCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateCreateV2Request, +) -> Response[ + EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/create-v2/ + + Create a single eval template with the revamped schema. + Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + + Args: + body (EvalTemplateCreateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateCreateV2Request, +) -> ( + EvalTemplateCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/create-v2/ + + Create a single eval template with the revamped schema. + Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + + Args: + body (EvalTemplateCreateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateCreateV2Request, +) -> Response[ + EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/create-v2/ + + Create a single eval template with the revamped schema. + Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + + Args: + body (EvalTemplateCreateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateCreateV2Request, +) -> ( + EvalTemplateCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/create-v2/ + + Create a single eval template with the revamped schema. + Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + + Args: + body (EvalTemplateCreateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_detail_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_detail_list.py new file mode 100644 index 0000000..99d1955 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_detail_list.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_detail_response import EvalTemplateDetailResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/eval-templates/{template_id}/detail/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalTemplateDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//detail/ + + Fetch a single eval template with all revamped fields. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalTemplateDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET /model-hub/eval-templates//detail/ + + Fetch a single eval template with all revamped fields. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//detail/ + + Fetch a single eval template with all revamped fields. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalTemplateDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET /model-hub/eval-templates//detail/ + + Fetch a single eval template with all revamped fields. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_feedback_list_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_feedback_list_list.py new file mode 100644 index 0000000..f4975f7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_feedback_list_list.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_feedback_list_response import EvalFeedbackListResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/eval-templates/{template_id}/feedback-list/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalFeedbackListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//feedback-list/ + + Paginated feedback list with user info. + Query params: page (0-based), page_size + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """GET /model-hub/eval-templates//feedback-list/ + + Paginated feedback list with user info. + Query params: page (0-based), page_size + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//feedback-list/ + + Paginated feedback list with user info. + Query params: page (0-based), page_size + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """GET /model-hub/eval-templates//feedback-list/ + + Paginated feedback list with user info. + Query params: page (0-based), page_size + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalFeedbackListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_list.py new file mode 100644 index 0000000..e6c6336 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_list.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.ground_truth_config_response import GroundTruthConfigResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/eval-templates/{template_id}/ground-truth-config/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = GroundTruthConfigResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + GroundTruthConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + GroundTruthConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_update.py new file mode 100644 index 0000000..fd29b23 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_config_update.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.ground_truth_config_request import GroundTruthConfigRequest +from ...models.ground_truth_config_response import GroundTruthConfigResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + *, + body: GroundTruthConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/eval-templates/{template_id}/ground-truth-config/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = GroundTruthConfigResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthConfigRequest, +) -> Response[ + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + body (GroundTruthConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthConfigRequest, +) -> ( + GroundTruthConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + body (GroundTruthConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthConfigRequest, +) -> Response[ + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + body (GroundTruthConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthConfigRequest, +) -> ( + GroundTruthConfigResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET/PUT /model-hub/eval-templates//ground-truth-config/ + + Manages ground truth configuration on the eval template's config JSONField. + + Args: + template_id (str): + body (GroundTruthConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthConfigResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_list.py new file mode 100644 index 0000000..7087e69 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_list.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.ground_truth_list_response import GroundTruthListResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/eval-templates/{template_id}/ground-truth/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = GroundTruthListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//ground-truth/ + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """GET /model-hub/eval-templates//ground-truth/ + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//ground-truth/ + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """GET /model-hub/eval-templates//ground-truth/ + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_upload_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_upload_create.py new file mode 100644 index 0000000..0518d95 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_ground_truth_upload_create.py @@ -0,0 +1,233 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.ground_truth_upload_request import GroundTruthUploadRequest +from ...models.ground_truth_upload_response import GroundTruthUploadResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + *, + body: GroundTruthUploadRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/{template_id}/ground-truth/upload/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = GroundTruthUploadResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthUploadRequest, +) -> Response[ + GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//ground-truth/upload/ + + Supports two modes: + 1. JSON body: { name, columns, data, ... } + 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + + Args: + template_id (str): + body (GroundTruthUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthUploadRequest, +) -> ( + GroundTruthUploadResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//ground-truth/upload/ + + Supports two modes: + 1. JSON body: { name, columns, data, ... } + 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + + Args: + template_id (str): + body (GroundTruthUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthUploadRequest, +) -> Response[ + GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//ground-truth/upload/ + + Supports two modes: + 1. JSON body: { name, columns, data, ... } + 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + + Args: + template_id (str): + body (GroundTruthUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: GroundTruthUploadRequest, +) -> ( + GroundTruthUploadResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//ground-truth/upload/ + + Supports two modes: + 1. JSON body: { name, columns, data, ... } + 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + + Args: + template_id (str): + body (GroundTruthUploadRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GroundTruthUploadResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_charts_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_charts_create.py new file mode 100644 index 0000000..d58b9f3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_charts_create.py @@ -0,0 +1,219 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_list_charts_request import EvalTemplateListChartsRequest +from ...models.eval_template_list_charts_response import EvalTemplateListChartsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: EvalTemplateListChartsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/list-charts/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = EvalTemplateListChartsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateListChartsRequest, +) -> Response[ + EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/list-charts/ + + Returns 30-day chart data (run counts + error rates) for a list of template IDs. + Uses ClickHouse for fast analytics. Called separately from the list API so the + table renders instantly while charts load async. + + Args: + body (EvalTemplateListChartsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateListChartsRequest, +) -> ( + EvalTemplateListChartsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/list-charts/ + + Returns 30-day chart data (run counts + error rates) for a list of template IDs. + Uses ClickHouse for fast analytics. Called separately from the list API so the + table renders instantly while charts load async. + + Args: + body (EvalTemplateListChartsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateListChartsRequest, +) -> Response[ + EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/list-charts/ + + Returns 30-day chart data (run counts + error rates) for a list of template IDs. + Uses ClickHouse for fast analytics. Called separately from the list API so the + table renders instantly while charts load async. + + Args: + body (EvalTemplateListChartsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: EvalTemplateListChartsRequest, +) -> ( + EvalTemplateListChartsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates/list-charts/ + + Returns 30-day chart data (run counts + error rates) for a list of template IDs. + Uses ClickHouse for fast analytics. Called separately from the list API so the + table renders instantly while charts load async. + + Args: + body (EvalTemplateListChartsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateListChartsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_create.py new file mode 100644 index 0000000..dda3674 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_list_create.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_list_request import EvalListRequest +from ...models.eval_template_list_response import EvalTemplateListResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: EvalListRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/list/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalTemplateListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalListRequest, +) -> Response[ + EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/list/ + + Returns paginated eval template list with filtering, search, and 30-day metrics. + All inputs and outputs are validated with Pydantic schemas. + + Args: + body (EvalListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: EvalListRequest, +) -> ( + EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """POST /model-hub/eval-templates/list/ + + Returns paginated eval template list with filtering, search, and 30-day metrics. + All inputs and outputs are validated with Pydantic schemas. + + Args: + body (EvalListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: EvalListRequest, +) -> Response[ + EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates/list/ + + Returns paginated eval template list with filtering, search, and 30-day metrics. + All inputs and outputs are validated with Pydantic schemas. + + Args: + body (EvalListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: EvalListRequest, +) -> ( + EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None +): + """POST /model-hub/eval-templates/list/ + + Returns paginated eval template list with filtering, search, and 30-day metrics. + All inputs and outputs are validated with Pydantic schemas. + + Args: + body (EvalListRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_update_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_update_update.py new file mode 100644 index 0000000..59433c3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_update_update.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_update_response import EvalTemplateUpdateResponse +from ...models.eval_template_update_v2_request import EvalTemplateUpdateV2Request +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + *, + body: EvalTemplateUpdateV2Request, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/eval-templates/{template_id}/update/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalTemplateUpdateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateUpdateV2Request, +) -> Response[ + EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """PUT /model-hub/eval-templates//update/ + + Update an eval template. Only user-owned templates can be updated. + + Args: + template_id (str): + body (EvalTemplateUpdateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateUpdateV2Request, +) -> ( + EvalTemplateUpdateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """PUT /model-hub/eval-templates//update/ + + Update an eval template. Only user-owned templates can be updated. + + Args: + template_id (str): + body (EvalTemplateUpdateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateUpdateV2Request, +) -> Response[ + EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """PUT /model-hub/eval-templates//update/ + + Update an eval template. Only user-owned templates can be updated. + + Args: + template_id (str): + body (EvalTemplateUpdateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateUpdateV2Request, +) -> ( + EvalTemplateUpdateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """PUT /model-hub/eval-templates//update/ + + Update an eval template. Only user-owned templates can be updated. + + Args: + template_id (str): + body (EvalTemplateUpdateV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateUpdateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_usage_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_usage_list.py new file mode 100644 index 0000000..33f5cee --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_usage_list.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_usage_stats_response import EvalUsageStatsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/eval-templates/{template_id}/usage/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalUsageStatsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//usage/ + + Returns usage stats, chart data, and paginated eval logs. + Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """GET /model-hub/eval-templates//usage/ + + Returns usage stats, chart data, and paginated eval logs. + Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//usage/ + + Returns usage stats, chart data, and paginated eval logs. + Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse | None: + """GET /model-hub/eval-templates//usage/ + + Returns usage stats, chart data, and paginated eval logs. + Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalUsageStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_create_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_create_create.py new file mode 100644 index 0000000..8d2835e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_create_create.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_version_create_request import ( + EvalTemplateVersionCreateRequest, +) +from ...models.eval_template_version_response import EvalTemplateVersionResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + *, + body: EvalTemplateVersionCreateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/{template_id}/versions/create/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalTemplateVersionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateVersionCreateRequest, +) -> Response[ + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//versions/create/ + + Create a new version snapshot from the current template state. + + Args: + template_id (str): + body (EvalTemplateVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateVersionCreateRequest, +) -> ( + EvalTemplateVersionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//versions/create/ + + Create a new version snapshot from the current template state. + + Args: + template_id (str): + body (EvalTemplateVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateVersionCreateRequest, +) -> Response[ + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//versions/create/ + + Create a new version snapshot from the current template state. + + Args: + template_id (str): + body (EvalTemplateVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalTemplateVersionCreateRequest, +) -> ( + EvalTemplateVersionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//versions/create/ + + Create a new version snapshot from the current template state. + + Args: + template_id (str): + body (EvalTemplateVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_list.py new file mode 100644 index 0000000..9bb58e1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_list.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_version_list_response import ( + EvalTemplateVersionListResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/eval-templates/{template_id}/versions/".format( + template_id=quote(str(template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = EvalTemplateVersionListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//versions/ + + List all versions for an eval template. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalTemplateVersionListResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET /model-hub/eval-templates//versions/ + + List all versions for an eval template. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """GET /model-hub/eval-templates//versions/ + + List all versions for an eval template. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalTemplateVersionListResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """GET /model-hub/eval-templates//versions/ + + List all versions for an eval template. + + Args: + template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_restore_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_restore_create.py new file mode 100644 index 0000000..33a3b7b --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_restore_create.py @@ -0,0 +1,255 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_version_restore_response import ( + EvalTemplateVersionRestoreResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_empty_request import ModelHubEmptyRequest +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + version_id: str, + *, + body: ModelHubEmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/eval-templates/{template_id}/versions/{version_id}/restore/".format( + template_id=quote(str(template_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + EvalTemplateVersionRestoreResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = EvalTemplateVersionRestoreResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateVersionRestoreResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + EvalTemplateVersionRestoreResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//versions//restore/ + + Restore a version by creating a new version with the old version's config. + Does NOT modify the old version — creates a new one on top. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionRestoreResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + version_id=version_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ( + EvalTemplateVersionRestoreResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//versions//restore/ + + Restore a version by creating a new version with the old version's config. + Does NOT modify the old version — creates a new one on top. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionRestoreResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + version_id=version_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + EvalTemplateVersionRestoreResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """POST /model-hub/eval-templates//versions//restore/ + + Restore a version by creating a new version with the old version's config. + Does NOT modify the old version — creates a new one on top. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionRestoreResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + version_id=version_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ( + EvalTemplateVersionRestoreResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """POST /model-hub/eval-templates//versions//restore/ + + Restore a version by creating a new version with the old version's config. + Does NOT modify the old version — creates a new one on top. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionRestoreResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + version_id=version_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_set_default_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_set_default_update.py new file mode 100644 index 0000000..fd4e367 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_eval_templates_versions_set_default_update.py @@ -0,0 +1,239 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_template_version_response import EvalTemplateVersionResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_empty_request import ModelHubEmptyRequest +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + template_id: str, + version_id: str, + *, + body: ModelHubEmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/".format( + template_id=quote(str(template_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = EvalTemplateVersionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """PUT /model-hub/eval-templates//versions//set-default/ + + Set a specific version as the default (active) version. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + version_id=version_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ( + EvalTemplateVersionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """PUT /model-hub/eval-templates//versions//set-default/ + + Set a specific version as the default (active) version. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + template_id=template_id, + version_id=version_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> Response[ + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """PUT /model-hub/eval-templates//versions//set-default/ + + Set a specific version as the default (active) version. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + template_id=template_id, + version_id=version_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: ModelHubEmptyRequest, +) -> ( + EvalTemplateVersionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """PUT /model-hub/eval-templates//versions//set-default/ + + Set a specific version as the default (active) version. + + Args: + template_id (str): + version_id (str): + body (ModelHubEmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalTemplateVersionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + template_id=template_id, + version_id=version_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_derived_variables_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_derived_variables_list.py new file mode 100644 index 0000000..0e85889 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_derived_variables_list.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_derived_variables_response import ( + ExperimentDerivedVariablesResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/derived-variables/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentDerivedVariablesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Get derived variables from run prompt columns in an experiment's snapshot dataset. + Delegates to the existing get_dataset_derived_variables() service function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get derived variables from run prompt columns in an experiment's snapshot dataset. + Delegates to the existing get_dataset_derived_variables() service function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Get derived variables from run prompt columns in an experiment's snapshot dataset. + Delegates to the existing get_dataset_derived_variables() service function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentDerivedVariablesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get derived variables from run prompt columns in an experiment's snapshot dataset. + Delegates to the existing get_dataset_derived_variables() service function. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentDerivedVariablesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_evaluations_stats_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_evaluations_stats_list.py new file mode 100644 index 0000000..93e6e20 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_evaluations_stats_list.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_evaluation_stats_response import ( + ExperimentEvaluationStatsResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + evaluation_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/".format( + experiment_id=quote(str(experiment_id), safe=""), + evaluation_id=quote(str(evaluation_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentEvaluationStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentEvaluationStatsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentEvaluationStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + evaluation_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentEvaluationStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + evaluation_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentEvaluationStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + evaluation_id=evaluation_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + evaluation_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentEvaluationStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + evaluation_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentEvaluationStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + evaluation_id=evaluation_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + evaluation_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentEvaluationStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + experiment_id (str): + evaluation_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentEvaluationStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + evaluation_id=evaluation_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + evaluation_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentEvaluationStatsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + experiment_id (str): + evaluation_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentEvaluationStatsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + evaluation_id=evaluation_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_create.py new file mode 100644 index 0000000..011713a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_create.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_feedback_create_response import ( + ExperimentFeedbackCreateResponse, +) +from ...models.feedback import Feedback +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + *, + body: Feedback, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/{experiment_id}/feedback/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentFeedbackCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentFeedbackCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentFeedbackCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: Feedback, +) -> Response[ + ExperimentFeedbackCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Create a feedback record scoped to an experiment. + + Args: + experiment_id (str): + body (Feedback): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: Feedback, +) -> ( + ExperimentFeedbackCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Create a feedback record scoped to an experiment. + + Args: + experiment_id (str): + body (Feedback): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: Feedback, +) -> Response[ + ExperimentFeedbackCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Create a feedback record scoped to an experiment. + + Args: + experiment_id (str): + body (Feedback): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: Feedback, +) -> ( + ExperimentFeedbackCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Create a feedback record scoped to an experiment. + + Args: + experiment_id (str): + body (Feedback): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_feedback_details_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_feedback_details_list.py new file mode 100644 index 0000000..104e5f2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_feedback_details_list.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_feedback_details_response import ( + ExperimentFeedbackDetailsResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentFeedbackDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentFeedbackDetailsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentFeedbackDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentFeedbackDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Get previous feedback details for a metric+row in an experiment. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentFeedbackDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get previous feedback details for a metric+row in an experiment. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentFeedbackDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Get previous feedback details for a metric+row in an experiment. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentFeedbackDetailsResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get previous feedback details for a metric+row in an experiment. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackDetailsResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_template_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_template_list.py new file mode 100644 index 0000000..42e9a65 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_get_template_list.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_feedback_template_response import ( + ExperimentFeedbackTemplateResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/{experiment_id}/feedback/get-template/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentFeedbackTemplateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentFeedbackTemplateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentFeedbackTemplateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentFeedbackTemplateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Get evaluation template details for rendering the feedback form. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackTemplateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentFeedbackTemplateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get evaluation template details for rendering the feedback form. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackTemplateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentFeedbackTemplateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Get evaluation template details for rendering the feedback form. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackTemplateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentFeedbackTemplateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get evaluation template details for rendering the feedback form. + + Args: + experiment_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackTemplateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_submit_feedback_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_submit_feedback_create.py new file mode 100644 index 0000000..b35ed89 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_feedback_submit_feedback_create.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_feedback_submit_request import ExperimentFeedbackSubmitRequest +from ...models.experiment_feedback_submit_response import ( + ExperimentFeedbackSubmitResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + *, + body: ExperimentFeedbackSubmitRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentFeedbackSubmitResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentFeedbackSubmitResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentFeedbackSubmitResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentFeedbackSubmitRequest, +) -> Response[ + ExperimentFeedbackSubmitResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Submit feedback action — triggers temporal eval rerun for experiments. + + Args: + experiment_id (str): + body (ExperimentFeedbackSubmitRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackSubmitResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentFeedbackSubmitRequest, +) -> ( + ExperimentFeedbackSubmitResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Submit feedback action — triggers temporal eval rerun for experiments. + + Args: + experiment_id (str): + body (ExperimentFeedbackSubmitRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackSubmitResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentFeedbackSubmitRequest, +) -> Response[ + ExperimentFeedbackSubmitResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Submit feedback action — triggers temporal eval rerun for experiments. + + Args: + experiment_id (str): + body (ExperimentFeedbackSubmitRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentFeedbackSubmitResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentFeedbackSubmitRequest, +) -> ( + ExperimentFeedbackSubmitResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Submit feedback action — triggers temporal eval rerun for experiments. + + Args: + experiment_id (str): + body (ExperimentFeedbackSubmitRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentFeedbackSubmitResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_rerun_cells_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_rerun_cells_create.py new file mode 100644 index 0000000..3c953c5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_rerun_cells_create.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_rerun_cells import ExperimentRerunCells +from ...models.experiment_workflow_response import ExperimentWorkflowResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + experiment_id: str, + *, + body: ExperimentRerunCells, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/{experiment_id}/rerun-cells/".format( + experiment_id=quote(str(experiment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentWorkflowResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunCells, +) -> Response[ + ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Rerun specific cells or columns in a V2 experiment. + + Accepts source_ids (EDT IDs for full column rerun) and/or + cells ({source_id, row_id} pairs for individual cell rerun). + Resets affected output cells and dependent eval cells to RUNNING, + then starts a RerunCellsV2Workflow. + + Args: + experiment_id (str): + body (ExperimentRerunCells): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunCells, +) -> ( + ExperimentWorkflowResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Rerun specific cells or columns in a V2 experiment. + + Accepts source_ids (EDT IDs for full column rerun) and/or + cells ({source_id, row_id} pairs for individual cell rerun). + Resets affected output cells and dependent eval cells to RUNNING, + then starts a RerunCellsV2Workflow. + + Args: + experiment_id (str): + body (ExperimentRerunCells): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunCells, +) -> Response[ + ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Rerun specific cells or columns in a V2 experiment. + + Accepts source_ids (EDT IDs for full column rerun) and/or + cells ({source_id, row_id} pairs for individual cell rerun). + Resets affected output cells and dependent eval cells to RUNNING, + then starts a RerunCellsV2Workflow. + + Args: + experiment_id (str): + body (ExperimentRerunCells): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + experiment_id=experiment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + experiment_id: str, + *, + client: AuthenticatedClient | Client, + body: ExperimentRerunCells, +) -> ( + ExperimentWorkflowResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Rerun specific cells or columns in a V2 experiment. + + Accepts source_ids (EDT IDs for full column rerun) and/or + cells ({source_id, row_id} pairs for individual cell rerun). + Resets affected output cells and dependent eval cells to RUNNING, + then starts a RerunCellsV2Workflow. + + Args: + experiment_id (str): + body (ExperimentRerunCells): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentWorkflowResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + experiment_id=experiment_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_row_diff_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_row_diff_create.py new file mode 100644 index 0000000..808e20f --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_row_diff_create.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.dataset_row_diff_request import DatasetRowDiffRequest +from ...models.experiment_row_diff_response import ExperimentRowDiffResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: DatasetRowDiffRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/experiments/v2/row-diff/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = ExperimentRowDiffResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> Response[ + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> ( + ExperimentRowDiffResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> Response[ + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: DatasetRowDiffRequest, +) -> ( + ExperimentRowDiffResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (DatasetRowDiffRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentRowDiffResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_suggest_name_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_suggest_name_read.py new file mode 100644 index 0000000..2ad728f --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_suggest_name_read.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_name_suggestion_response import ( + ExperimentNameSuggestionResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + dataset_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/suggest-name/{dataset_id}/".format( + dataset_id=quote(str(dataset_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentNameSuggestionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentNameSuggestionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentNameSuggestionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentNameSuggestionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Generate a suggested experiment name for a dataset. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentNameSuggestionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentNameSuggestionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Generate a suggested experiment name for a dataset. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentNameSuggestionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + dataset_id=dataset_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentNameSuggestionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Generate a suggested experiment name for a dataset. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentNameSuggestionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dataset_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentNameSuggestionResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Generate a suggested experiment name for a dataset. + + Args: + dataset_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentNameSuggestionResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + dataset_id=dataset_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_validate_name_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_validate_name_list.py new file mode 100644 index 0000000..732308f --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_experiments_v2_validate_name_list.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.experiment_name_validation_response import ( + ExperimentNameValidationResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/experiments/v2/validate-name/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ExperimentNameValidationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = ExperimentNameValidationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ExperimentNameValidationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentNameValidationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Validate that an experiment name is unique within a dataset. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentNameValidationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentNameValidationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Validate that an experiment name is unique within a dataset. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentNameValidationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ExperimentNameValidationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """Validate that an experiment name is unique within a dataset. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ExperimentNameValidationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + ExperimentNameValidationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Validate that an experiment name is unique within a dataset. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ExperimentNameValidationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_create.py new file mode 100644 index 0000000..f8fda93 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_create.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.legacy_knowledge_base_create_response import ( + LegacyKnowledgeBaseCreateResponse, +) +from ...models.legacy_knowledge_base_mutation_request import ( + LegacyKnowledgeBaseMutationRequest, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: LegacyKnowledgeBaseMutationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/knowledge-base/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + LegacyKnowledgeBaseCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = LegacyKnowledgeBaseCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + LegacyKnowledgeBaseCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> Response[ + LegacyKnowledgeBaseCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> ( + LegacyKnowledgeBaseCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> Response[ + LegacyKnowledgeBaseCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> ( + LegacyKnowledgeBaseCreateResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseCreateResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_delete.py new file mode 100644 index 0000000..33cb837 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_delete.py @@ -0,0 +1,121 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/knowledge-base/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_create.py new file mode 100644 index 0000000..92b364c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_create.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.legacy_knowledge_base_files_request import ( + LegacyKnowledgeBaseFilesRequest, +) +from ...models.legacy_knowledge_base_files_response import ( + LegacyKnowledgeBaseFilesResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: LegacyKnowledgeBaseFilesRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/knowledge-base/files/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + LegacyKnowledgeBaseFilesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = LegacyKnowledgeBaseFilesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + LegacyKnowledgeBaseFilesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseFilesRequest, +) -> Response[ + LegacyKnowledgeBaseFilesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (LegacyKnowledgeBaseFilesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseFilesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseFilesRequest, +) -> ( + LegacyKnowledgeBaseFilesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (LegacyKnowledgeBaseFilesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseFilesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseFilesRequest, +) -> Response[ + LegacyKnowledgeBaseFilesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (LegacyKnowledgeBaseFilesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseFilesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseFilesRequest, +) -> ( + LegacyKnowledgeBaseFilesResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (LegacyKnowledgeBaseFilesRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseFilesResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_delete.py new file mode 100644 index 0000000..72c7d95 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_files_delete.py @@ -0,0 +1,121 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/knowledge-base/files/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_get_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_get_list.py new file mode 100644 index 0000000..866f4b8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_get_list.py @@ -0,0 +1,177 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.legacy_knowledge_base_table_response import ( + LegacyKnowledgeBaseTableResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/knowledge-base/get/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + LegacyKnowledgeBaseTableResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = LegacyKnowledgeBaseTableResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + LegacyKnowledgeBaseTableResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + LegacyKnowledgeBaseTableResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + LegacyKnowledgeBaseTableResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + LegacyKnowledgeBaseTableResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + LegacyKnowledgeBaseTableResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseTableResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list.py new file mode 100644 index 0000000..fe93610 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list.py @@ -0,0 +1,177 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.legacy_knowledge_base_sdk_code_response import ( + LegacyKnowledgeBaseSdkCodeResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/knowledge-base/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + LegacyKnowledgeBaseSdkCodeResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = LegacyKnowledgeBaseSdkCodeResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + LegacyKnowledgeBaseSdkCodeResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + LegacyKnowledgeBaseSdkCodeResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseSdkCodeResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + LegacyKnowledgeBaseSdkCodeResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseSdkCodeResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + LegacyKnowledgeBaseSdkCodeResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseSdkCodeResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + LegacyKnowledgeBaseSdkCodeResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseSdkCodeResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list_list.py new file mode 100644 index 0000000..52973c0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_list_list.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.legacy_knowledge_base_list_response import ( + LegacyKnowledgeBaseListResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/knowledge-base/list/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = LegacyKnowledgeBaseListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + LegacyKnowledgeBaseListResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + LegacyKnowledgeBaseListResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseListResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_partial_update.py new file mode 100644 index 0000000..7a1c35a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_knowledge_base_partial_update.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.legacy_knowledge_base_mutation_request import ( + LegacyKnowledgeBaseMutationRequest, +) +from ...models.legacy_knowledge_base_mutation_response import ( + LegacyKnowledgeBaseMutationResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: LegacyKnowledgeBaseMutationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/knowledge-base/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + LegacyKnowledgeBaseMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +): + if response.status_code == 200: + response_200 = LegacyKnowledgeBaseMutationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + LegacyKnowledgeBaseMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> Response[ + LegacyKnowledgeBaseMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> ( + LegacyKnowledgeBaseMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> Response[ + LegacyKnowledgeBaseMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse +]: + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[LegacyKnowledgeBaseMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: LegacyKnowledgeBaseMutationRequest, +) -> ( + LegacyKnowledgeBaseMutationResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """ + Args: + body (LegacyKnowledgeBaseMutationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + LegacyKnowledgeBaseMutationResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_get_execution_details.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_get_execution_details.py new file mode 100644 index 0000000..13ae77b --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_get_execution_details.py @@ -0,0 +1,291 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_prompt_history_executions_get_execution_details_response_200 import ( + ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + execution_id: str, + *, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["template_name"] = template_name + + params["template_version"] = template_version + + params["created_at"] = created_at + + params["search"] = search + + params["ordering"] = ordering + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-history-executions/execution-details/{execution_id}/".format( + execution_id=quote(str(execution_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 +): + if response.status_code == 200: + response_200 = ( + ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200.from_dict( + response.json() + ) + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + execution_id: str, + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 +]: + """Get detailed information about a specific PromptVersion + + Args: + execution_id (str): + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200] + """ + + kwargs = _get_kwargs( + execution_id=execution_id, + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + execution_id: str, + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 + | None +): + """Get detailed information about a specific PromptVersion + + Args: + execution_id (str): + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 + """ + + return sync_detailed( + execution_id=execution_id, + client=client, + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + execution_id: str, + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 +]: + """Get detailed information about a specific PromptVersion + + Args: + execution_id (str): + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200] + """ + + kwargs = _get_kwargs( + execution_id=execution_id, + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + execution_id: str, + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 + | None +): + """Get detailed information about a specific PromptVersion + + Args: + execution_id (str): + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200 + """ + + return ( + await asyncio_detailed( + execution_id=execution_id, + client=client, + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_list.py new file mode 100644 index 0000000..88e3f1b --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_list.py @@ -0,0 +1,255 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_prompt_history_executions_list_response_200 import ( + ModelHubPromptHistoryExecutionsListResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["template_name"] = template_name + + params["template_version"] = template_version + + params["created_at"] = created_at + + params["search"] = search + + params["ordering"] = ordering + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-history-executions/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200: + if response.status_code == 200: + response_200 = ModelHubPromptHistoryExecutionsListResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200 +]: + """ + Args: + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200] + """ + + kwargs = _get_kwargs( + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200 | None: + """ + Args: + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200 + """ + + return sync_detailed( + client=client, + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200 +]: + """ + Args: + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200] + """ + + kwargs = _get_kwargs( + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + template_name: str | Unset = UNSET, + template_version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200 | None: + """ + Args: + template_name (str | Unset): + template_version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptHistoryExecutionsListResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + template_name=template_name, + template_version=template_version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_read.py new file mode 100644 index 0000000..4d8149d --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_history_executions_read.py @@ -0,0 +1,151 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_history_execution import PromptHistoryExecution +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-history-executions/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptHistoryExecution: + if response.status_code == 200: + response_200 = PromptHistoryExecution.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptHistoryExecution]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptHistoryExecution]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptHistoryExecution] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptHistoryExecution | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptHistoryExecution + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptHistoryExecution]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptHistoryExecution] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptHistoryExecution | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptHistoryExecution + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_label_by_id.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_label_by_id.py new file mode 100644 index 0000000..d782390 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_label_by_id.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + template_id: str, + label_id: str, + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/".format( + template_id=quote(str(template_id), safe=""), + label_id=quote(str(label_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 201: + response_201 = PromptLabel.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + template_id: str, + label_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Assign a label to a specific version by template name and version name. + + Args: + template_id (str): + label_id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + template_id=template_id, + label_id=label_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + template_id: str, + label_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Assign a label to a specific version by template name and version name. + + Args: + template_id (str): + label_id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + template_id=template_id, + label_id=label_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + template_id: str, + label_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Assign a label to a specific version by template name and version name. + + Args: + template_id (str): + label_id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + template_id=template_id, + label_id=label_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + template_id: str, + label_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Assign a label to a specific version by template name and version name. + + Args: + template_id (str): + label_id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + template_id=template_id, + label_id=label_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_multiple_labels.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_multiple_labels.py new file mode 100644 index 0000000..d13642e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_assign_multiple_labels.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-labels/assign-multiple-labels/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 201: + response_201 = PromptLabel.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create.py new file mode 100644 index 0000000..6e0a247 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-labels/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 201: + response_201 = PromptLabel.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create_system_labels.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create_system_labels.py new file mode 100644 index 0000000..5fcf5c1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_create_system_labels.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-labels/create-system-labels/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 201: + response_201 = PromptLabel.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Create (idempotently) Production, Staging, Development system labels for the caller's org. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Create (idempotently) Production, Staging, Development system labels for the caller's org. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Create (idempotently) Production, Staging, Development system labels for the caller's org. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Create (idempotently) Production, Staging, Development system labels for the caller's org. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_delete.py new file mode 100644 index 0000000..32d770d --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_delete.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/prompt-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse | ModelHubTextErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_get_by_name.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_get_by_name.py new file mode 100644 index 0000000..72d61e8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_get_by_name.py @@ -0,0 +1,250 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_prompt_labels_get_by_name_response_200 import ( + ModelHubPromptLabelsGetByNameResponse200, +) +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-labels/get-by-name/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsGetByNameResponse200 + | ModelHubTextErrorResponse +): + if response.status_code == 200: + response_200 = ModelHubPromptLabelsGetByNameResponse200.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsGetByNameResponse200 + | ModelHubTextErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsGetByNameResponse200 + | ModelHubTextErrorResponse +]: + """Fetch a prompt version by template name and either explicit version or label. + + Query params: + - name: template name (required) + - version: version name like v1 (optional) + - label: label name like Production/Staging/Development or custom (optional) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptLabelsGetByNameResponse200 | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsGetByNameResponse200 + | ModelHubTextErrorResponse + | None +): + """Fetch a prompt version by template name and either explicit version or label. + + Query params: + - name: template name (required) + - version: version name like v1 (optional) + - label: label name like Production/Staging/Development or custom (optional) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptLabelsGetByNameResponse200 | ModelHubTextErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsGetByNameResponse200 + | ModelHubTextErrorResponse +]: + """Fetch a prompt version by template name and either explicit version or label. + + Query params: + - name: template name (required) + - version: version name like v1 (optional) + - label: label name like Production/Staging/Development or custom (optional) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptLabelsGetByNameResponse200 | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsGetByNameResponse200 + | ModelHubTextErrorResponse + | None +): + """Fetch a prompt version by template name and either explicit version or label. + + Query params: + - name: template name (required) + - version: version name like v1 (optional) + - label: label name like Production/Staging/Development or custom (optional) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptLabelsGetByNameResponse200 | ModelHubTextErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_list.py new file mode 100644 index 0000000..7f2b0c9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_list.py @@ -0,0 +1,224 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_prompt_labels_list_response_200 import ( + ModelHubPromptLabelsListResponse200, +) +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-labels/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsListResponse200 + | ModelHubTextErrorResponse +): + if response.status_code == 200: + response_200 = ModelHubPromptLabelsListResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsListResponse200 + | ModelHubTextErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsListResponse200 + | ModelHubTextErrorResponse +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptLabelsListResponse200 | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsListResponse200 + | ModelHubTextErrorResponse + | None +): + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptLabelsListResponse200 | ModelHubTextErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsListResponse200 + | ModelHubTextErrorResponse +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptLabelsListResponse200 | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsListResponse200 + | ModelHubTextErrorResponse + | None +): + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptLabelsListResponse200 | ModelHubTextErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_partial_update.py new file mode 100644 index 0000000..614cd76 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_partial_update.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/prompt-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 200: + response_200 = PromptLabel.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_read.py new file mode 100644 index 0000000..e3c6d8e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_read.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 200: + response_200 = PromptLabel.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_remove_label_from_version.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_remove_label_from_version.py new file mode 100644 index 0000000..ccf0a35 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_remove_label_from_version.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-labels/remove/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 201: + response_201 = PromptLabel.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Detach label from a prompt version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Detach label from a prompt version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Detach label from a prompt version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Detach label from a prompt version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_set_default.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_set_default.py new file mode 100644 index 0000000..f4020ea --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_set_default.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-labels/set-default/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 201: + response_201 = PromptLabel.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Set default version for a template by name and version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Set default version for a template by name and version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """Set default version for a template by name and version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """Set default version for a template by name and version. + + Args: + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_template_labels.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_template_labels.py new file mode 100644 index 0000000..f8e4469 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_template_labels.py @@ -0,0 +1,230 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_prompt_labels_template_labels_response_200 import ( + ModelHubPromptLabelsTemplateLabelsResponse200, +) +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-labels/template-labels/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsTemplateLabelsResponse200 + | ModelHubTextErrorResponse +): + if response.status_code == 200: + response_200 = ModelHubPromptLabelsTemplateLabelsResponse200.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsTemplateLabelsResponse200 + | ModelHubTextErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsTemplateLabelsResponse200 + | ModelHubTextErrorResponse +]: + """List versions with labels for a template by name or id. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptLabelsTemplateLabelsResponse200 | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsTemplateLabelsResponse200 + | ModelHubTextErrorResponse + | None +): + """List versions with labels for a template by name or id. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptLabelsTemplateLabelsResponse200 | ModelHubTextErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse + | ModelHubPromptLabelsTemplateLabelsResponse200 + | ModelHubTextErrorResponse +]: + """List versions with labels for a template by name or id. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptLabelsTemplateLabelsResponse200 | ModelHubTextErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptLabelsTemplateLabelsResponse200 + | ModelHubTextErrorResponse + | None +): + """List versions with labels for a template by name or id. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptLabelsTemplateLabelsResponse200 | ModelHubTextErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_update.py new file mode 100644 index 0000000..41fdecd --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_labels_update.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_text_error_response import ModelHubTextErrorResponse +from ...models.prompt_label import PromptLabel +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: PromptLabel, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/prompt-labels/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel: + if response.status_code == 200: + response_200 = PromptLabel.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel]: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: PromptLabel, +) -> ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel | None: + """ + Args: + id (str): + body (PromptLabel): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubTextErrorResponse | PromptLabel + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_add_new_draft.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_add_new_draft.py new file mode 100644 index 0000000..14b45be --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_add_new_draft.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/add-new-draft/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Create a new draft version of the PromptTemplate and return its details. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Create a new draft version of the PromptTemplate and return its details. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Create a new draft version of the PromptTemplate and return its details. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Create a new draft version of the PromptTemplate and return its details. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_analyze_prompt.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_analyze_prompt.py new file mode 100644 index 0000000..22a1587 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_analyze_prompt.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/analyze-prompt/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_bulk_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_bulk_delete.py new file mode 100644 index 0000000..7090c96 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_bulk_delete.py @@ -0,0 +1,158 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/bulk-delete/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Bulk delete prompt templates + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Bulk delete prompt templates + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Bulk delete prompt templates + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Bulk delete prompt templates + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_commit.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_commit.py new file mode 100644 index 0000000..7b4a068 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_commit.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/commit/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_compare_versions.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_compare_versions.py new file mode 100644 index 0000000..466128a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_compare_versions.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/compare-versions/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Compare different versions of the PromptTemplate. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Compare different versions of the PromptTemplate. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Compare different versions of the PromptTemplate. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Compare different versions of the PromptTemplate. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create.py new file mode 100644 index 0000000..240fabc --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create_draft.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create_draft.py new file mode 100644 index 0000000..3ec44ae --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_create_draft.py @@ -0,0 +1,158 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/create-draft/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Create a draft version of the PromptTemplate and return its details. + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Create a draft version of the PromptTemplate and return its details. + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Create a draft version of the PromptTemplate and return its details. + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Create a draft version of the PromptTemplate and return its details. + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete.py new file mode 100644 index 0000000..3c85531 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete.py @@ -0,0 +1,149 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/prompt-templates/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete_evaluation_config.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete_evaluation_config.py new file mode 100644 index 0000000..6f070b5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_delete_evaluation_config.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/prompt-templates/{id}/delete-evaluation-config/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """Delete an evaluation configuration by name from a PromptTemplate. + + This endpoint allows removing an evaluation configuration from a PromptTemplate + based on its unique name. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """Delete an evaluation configuration by name from a PromptTemplate. + + This endpoint allows removing an evaluation configuration from a PromptTemplate + based on its unique name. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """Delete an evaluation configuration by name from a PromptTemplate. + + This endpoint allows removing an evaluation configuration from a PromptTemplate + based on its unique name. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """Delete an evaluation configuration by name from a PromptTemplate. + + This endpoint allows removing an evaluation configuration from a PromptTemplate + based on its unique name. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_extract_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_extract_create.py new file mode 100644 index 0000000..3595165 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_extract_create.py @@ -0,0 +1,253 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.derived_variable_detail_response import DerivedVariableDetailResponse +from ...models.derived_variable_extract_request import DerivedVariableExtractRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + prompt_id: str, + *, + body: DerivedVariableExtractRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/".format( + prompt_id=quote(str(prompt_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DerivedVariableDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_id: str, + *, + client: AuthenticatedClient | Client, + body: DerivedVariableExtractRequest, +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Manually trigger extraction of derived variables from outputs. + + This is useful when you want to re-extract variables or extract from + existing outputs that weren't processed. + + Request body: + - version: Version to extract from + - column_name: Name for the output column + - output_index: Optional specific output index (default: 0) + - response_format_type: Optional response format hint + + Args: + prompt_id (str): + body (DerivedVariableExtractRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_id=prompt_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_id: str, + *, + client: AuthenticatedClient | Client, + body: DerivedVariableExtractRequest, +) -> ( + DerivedVariableDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Manually trigger extraction of derived variables from outputs. + + This is useful when you want to re-extract variables or extract from + existing outputs that weren't processed. + + Request body: + - version: Version to extract from + - column_name: Name for the output column + - output_index: Optional specific output index (default: 0) + - response_format_type: Optional response format hint + + Args: + prompt_id (str): + body (DerivedVariableExtractRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + prompt_id=prompt_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + prompt_id: str, + *, + client: AuthenticatedClient | Client, + body: DerivedVariableExtractRequest, +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Manually trigger extraction of derived variables from outputs. + + This is useful when you want to re-extract variables or extract from + existing outputs that weren't processed. + + Request body: + - version: Version to extract from + - column_name: Name for the output column + - output_index: Optional specific output index (default: 0) + - response_format_type: Optional response format hint + + Args: + prompt_id (str): + body (DerivedVariableExtractRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_id=prompt_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_id: str, + *, + client: AuthenticatedClient | Client, + body: DerivedVariableExtractRequest, +) -> ( + DerivedVariableDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Manually trigger extraction of derived variables from outputs. + + This is useful when you want to re-extract variables or extract from + existing outputs that weren't processed. + + Request body: + - version: Version to extract from + - column_name: Name for the output column + - output_index: Optional specific output index (default: 0) + - response_format_type: Optional response format hint + + Args: + prompt_id (str): + body (DerivedVariableExtractRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + prompt_id=prompt_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_list.py new file mode 100644 index 0000000..8f147d0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_list.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...models.prompt_derived_variables_response import PromptDerivedVariablesResponse +from ...types import Response + + +def _get_kwargs( + prompt_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{prompt_id}/derived-variables/".format( + prompt_id=quote(str(prompt_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse +): + if response.status_code == 200: + response_200 = PromptDerivedVariablesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse +]: + """Get all derived variables for a prompt template. + + Returns derived variables from JSON outputs across all versions. + + Query params: + - version: Optional version filter + - column_name: Optional column name filter + + Args: + prompt_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse] + """ + + kwargs = _get_kwargs( + prompt_id=prompt_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | PromptDerivedVariablesResponse + | None +): + """Get all derived variables for a prompt template. + + Returns derived variables from JSON outputs across all versions. + + Query params: + - version: Optional version filter + - column_name: Optional column name filter + + Args: + prompt_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse + """ + + return sync_detailed( + prompt_id=prompt_id, + client=client, + ).parsed + + +async def asyncio_detailed( + prompt_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse +]: + """Get all derived variables for a prompt template. + + Returns derived variables from JSON outputs across all versions. + + Query params: + - version: Optional version filter + - column_name: Optional column name filter + + Args: + prompt_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse] + """ + + kwargs = _get_kwargs( + prompt_id=prompt_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | ModelHubErrorResponse + | PromptDerivedVariablesResponse + | None +): + """Get all derived variables for a prompt template. + + Returns derived variables from JSON outputs across all versions. + + Query params: + - version: Optional version filter + - column_name: Optional column name filter + + Args: + prompt_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubErrorResponse | PromptDerivedVariablesResponse + """ + + return ( + await asyncio_detailed( + prompt_id=prompt_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_preview_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_preview_create.py new file mode 100644 index 0000000..85b5c71 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_preview_create.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.derived_variable_detail_response import DerivedVariableDetailResponse +from ...models.derived_variable_preview_request import DerivedVariablePreviewRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: DerivedVariablePreviewRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/derived-variables/preview/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DerivedVariableDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: DerivedVariablePreviewRequest, +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Preview derived variables from JSON content without saving. + + Useful for showing what variables would be extracted before running. + + Request body: + - content: JSON string or object to analyze + - column_name: Name for the variable prefix + + Args: + body (DerivedVariablePreviewRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: DerivedVariablePreviewRequest, +) -> ( + DerivedVariableDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Preview derived variables from JSON content without saving. + + Useful for showing what variables would be extracted before running. + + Request body: + - content: JSON string or object to analyze + - column_name: Name for the variable prefix + + Args: + body (DerivedVariablePreviewRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: DerivedVariablePreviewRequest, +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Preview derived variables from JSON content without saving. + + Useful for showing what variables would be extracted before running. + + Request body: + - content: JSON string or object to analyze + - column_name: Name for the variable prefix + + Args: + body (DerivedVariablePreviewRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: DerivedVariablePreviewRequest, +) -> ( + DerivedVariableDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Preview derived variables from JSON content without saving. + + Useful for showing what variables would be extracted before running. + + Request body: + - content: JSON string or object to analyze + - column_name: Name for the variable prefix + + Args: + body (DerivedVariablePreviewRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_schema_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_schema_list.py new file mode 100644 index 0000000..dffd2de --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_derived_variables_schema_list.py @@ -0,0 +1,246 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.derived_variable_detail_response import DerivedVariableDetailResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_error_response import ModelHubErrorResponse +from ...types import Response + + +def _get_kwargs( + prompt_id: str, + column_name: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/".format( + prompt_id=quote(str(prompt_id), safe=""), + column_name=quote(str(column_name), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse: + if response.status_code == 200: + response_200 = DerivedVariableDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ModelHubErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ModelHubErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ModelHubErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ModelHubErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ModelHubErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_id: str, + column_name: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Get the schema for derived variables of a specific column. + + Returns detailed schema information including types and sample values. + + Path params: + - prompt_id: UUID of the prompt template + - column_name: Name of the column + + Query params: + - version: Optional version filter + + Args: + prompt_id (str): + column_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_id=prompt_id, + column_name=column_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_id: str, + column_name: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DerivedVariableDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get the schema for derived variables of a specific column. + + Returns detailed schema information including types and sample values. + + Path params: + - prompt_id: UUID of the prompt template + - column_name: Name of the column + + Query params: + - version: Optional version filter + + Args: + prompt_id (str): + column_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return sync_detailed( + prompt_id=prompt_id, + column_name=column_name, + client=client, + ).parsed + + +async def asyncio_detailed( + prompt_id: str, + column_name: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse +]: + """Get the schema for derived variables of a specific column. + + Returns detailed schema information including types and sample values. + + Path params: + - prompt_id: UUID of the prompt template + - column_name: Name of the column + + Query params: + - version: Optional version filter + + Args: + prompt_id (str): + column_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_id=prompt_id, + column_name=column_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_id: str, + column_name: str, + *, + client: AuthenticatedClient | Client, +) -> ( + DerivedVariableDetailResponse + | ManagementAPIErrorResponse + | ModelHubErrorResponse + | None +): + """Get the schema for derived variables of a specific column. + + Returns detailed schema information including types and sample values. + + Path params: + - prompt_id: UUID of the prompt template + - column_name: Name of the column + + Query params: + - version: Optional version filter + + Args: + prompt_id (str): + column_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DerivedVariableDetailResponse | ManagementAPIErrorResponse | ModelHubErrorResponse + """ + + return ( + await asyncio_detailed( + prompt_id=prompt_id, + column_name=column_name, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_prompt.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_prompt.py new file mode 100644 index 0000000..1ea2009 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_prompt.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/generate-prompt/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_variables.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_variables.py new file mode 100644 index 0000000..6c9cf7b --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_generate_variables.py @@ -0,0 +1,194 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/generate-variables/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + r"""Generate synthetic data for prompt variables using the SyntheticDataAgent. + + Expected payload: + { + \"prompt_name\": \"string\", + \"prompt_instructions\": \"list/array\" , + \"variable_names\": [\"string\"], + \"variable_count\": \"int\", + \"generation_type\": \"prompt\" + } + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + r"""Generate synthetic data for prompt variables using the SyntheticDataAgent. + + Expected payload: + { + \"prompt_name\": \"string\", + \"prompt_instructions\": \"list/array\" , + \"variable_names\": [\"string\"], + \"variable_count\": \"int\", + \"generation_type\": \"prompt\" + } + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + r"""Generate synthetic data for prompt variables using the SyntheticDataAgent. + + Expected payload: + { + \"prompt_name\": \"string\", + \"prompt_instructions\": \"list/array\" , + \"variable_names\": [\"string\"], + \"variable_count\": \"int\", + \"generation_type\": \"prompt\" + } + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + r"""Generate synthetic data for prompt variables using the SyntheticDataAgent. + + Expected payload: + { + \"prompt_name\": \"string\", + \"prompt_instructions\": \"list/array\" , + \"variable_names\": [\"string\"], + \"variable_count\": \"int\", + \"generation_type\": \"prompt\" + } + + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_all_variables.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_all_variables.py new file mode 100644 index 0000000..48b7a6c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_all_variables.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/all-variables/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get all variables from template and its executions + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get all variables from template and its executions + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get all variables from template and its executions + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get all variables from template and its executions + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_evaluation_configs.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_evaluation_configs.py new file mode 100644 index 0000000..0057209 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_evaluation_configs.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/evaluation-configs/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the evaluation configurations for a specific prompt template. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the evaluation configurations for a specific prompt template. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the evaluation configurations for a specific prompt template. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the evaluation configurations for a specific prompt template. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_next_version.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_next_version.py new file mode 100644 index 0000000..bb58c71 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_next_version.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/get-next-version/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the next version of the PromptTemplate + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the next version of the PromptTemplate + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the next version of the PromptTemplate + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the next version of the PromptTemplate + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_run_status.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_run_status.py new file mode 100644 index 0000000..4b30c18 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_run_status.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/get-run-status/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the current status and results of a template run + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the current status and results of a template run + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the current status and results of a template run + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the current status and results of a template run + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_sdk_code.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_sdk_code.py new file mode 100644 index 0000000..7f1f6b0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_sdk_code.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + language: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/get-sdk-code/{language}/".format( + id=quote(str(id), safe=""), + language=quote(str(language), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + language: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the prompt code in the requested format. If no format is specified, returns all formats. + Supported languages: python, typescript, curl, langchain, nodejs, go + + Args: + id (UUID): + language (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + language=language, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + language: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the prompt code in the requested format. If no format is specified, returns all formats. + Supported languages: python, typescript, curl, langchain, nodejs, go + + Args: + id (UUID): + language (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + language=language, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + language: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Get the prompt code in the requested format. If no format is specified, returns all formats. + Supported languages: python, typescript, curl, langchain, nodejs, go + + Args: + id (UUID): + language (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + language=language, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + language: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Get the prompt code in the requested format. If no format is specified, returns all formats. + Supported languages: python, typescript, curl, langchain, nodejs, go + + Args: + id (UUID): + language (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + language=language, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_template_by_name.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_template_by_name.py new file mode 100644 index 0000000..d3c3429 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_get_template_by_name.py @@ -0,0 +1,275 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_prompt_templates_get_template_by_name_response_200 import ( + ModelHubPromptTemplatesGetTemplateByNameResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["name"] = name + + params["version"] = version + + params["created_at"] = created_at + + params["search"] = search + + params["ordering"] = ordering + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/get-template-by-name/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200: + if response.status_code == 200: + response_200 = ModelHubPromptTemplatesGetTemplateByNameResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200 +]: + """Retrieve a prompt template by name. + If no version is specified, returns the default version (is_default=True). + If a version is specified, returns that specific version. + + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200] + """ + + kwargs = _get_kwargs( + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptTemplatesGetTemplateByNameResponse200 + | None +): + """Retrieve a prompt template by name. + If no version is specified, returns the default version (is_default=True). + If a version is specified, returns that specific version. + + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200 + """ + + return sync_detailed( + client=client, + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200 +]: + """Retrieve a prompt template by name. + If no version is specified, returns the default version (is_default=True). + If a version is specified, returns that specific version. + + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200] + """ + + kwargs = _get_kwargs( + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | ModelHubPromptTemplatesGetTemplateByNameResponse200 + | None +): + """Retrieve a prompt template by name. + If no version is specified, returns the default version (is_default=True). + If a version is specified, returns that specific version. + + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptTemplatesGetTemplateByNameResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_improve_prompt.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_improve_prompt.py new file mode 100644 index 0000000..10942d6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_improve_prompt.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/improve-prompt/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_list.py new file mode 100644 index 0000000..a64463d --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_list.py @@ -0,0 +1,247 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_prompt_templates_list_response_200 import ( + ModelHubPromptTemplatesListResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["name"] = name + + params["version"] = version + + params["created_at"] = created_at + + params["search"] = search + + params["ordering"] = ordering + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200: + if response.status_code == 200: + response_200 = ModelHubPromptTemplatesListResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200]: + """ + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200] + """ + + kwargs = _get_kwargs( + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200 | None: + """ + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200 + """ + + return sync_detailed( + client=client, + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200]: + """ + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200] + """ + + kwargs = _get_kwargs( + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + name: str | Unset = UNSET, + version: str | Unset = UNSET, + created_at: str | Unset = UNSET, + search: str | Unset = UNSET, + ordering: str | Unset = UNSET, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200 | None: + """ + Args: + name (str | Unset): + version (str | Unset): + created_at (str | Unset): + search (str | Unset): + ordering (str | Unset): + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubPromptTemplatesListResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + name=name, + version=version, + created_at=created_at, + search=search, + ordering=ordering, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_partial_update.py new file mode 100644 index 0000000..8a2e07f --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_partial_update.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/prompt-templates/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_read.py new file mode 100644 index 0000000..8864b5e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_read.py @@ -0,0 +1,159 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Retrieve a prompt template with version history and execution data. + Handles caching and error cases. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Retrieve a prompt template with version history and execution data. + Handles caching and error cases. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Retrieve a prompt template with version history and execution data. + Handles caching and error cases. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Retrieve a prompt template with version history and execution data. + Handles caching and error cases. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_retrieve_evaluations.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_retrieve_evaluations.py new file mode 100644 index 0000000..29229ac --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_retrieve_evaluations.py @@ -0,0 +1,151 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/evaluations/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_evals_on_multiple_versions.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_evals_on_multiple_versions.py new file mode 100644 index 0000000..f4a594e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_evals_on_multiple_versions.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_template.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_template.py new file mode 100644 index 0000000..242b930 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_run_template.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/run_template/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Run a prompt template with the given configuration. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Run a prompt template with the given configuration. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Run a prompt template with the given configuration. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Run a prompt template with the given configuration. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_name.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_name.py new file mode 100644 index 0000000..f6cd22c --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_name.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/save-name/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Save/update the name for a template. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Save/update the name for a template. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Save/update the name for a template. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Save/update the name for a template. + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_prompt_folder.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_prompt_folder.py new file mode 100644 index 0000000..d6da8d2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_save_prompt_folder.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/save-prompt-folder/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_set_default.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_set_default.py new file mode 100644 index 0000000..279d91a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_set_default.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/set_default/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Set a specific version of a prompt template as default + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Set a specific version of a prompt template as default + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Set a specific version of a prompt template as default + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Set a specific version of a prompt template as default + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_stop_streaming.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_stop_streaming.py new file mode 100644 index 0000000..88411a5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_stop_streaming.py @@ -0,0 +1,151 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/stop-streaming/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update.py new file mode 100644 index 0000000..b71fba9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/prompt-templates/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update_evaluation_configs.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update_evaluation_configs.py new file mode 100644 index 0000000..ab6e010 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_update_evaluation_configs.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: PromptTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/prompt-templates/{id}/update-evaluation-configs/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 201: + response_201 = PromptTemplate.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Add or update evaluation configurations for a PromptTemplate. + + This endpoint allows adding new evaluation configurations or updating + existing ones in a PromptTemplate. If is_run is true, it will also + run evaluations on specified versions (or latest version if none specified). + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Add or update evaluation configurations for a PromptTemplate. + + This endpoint allows adding new evaluation configurations or updating + existing ones in a PromptTemplate. If is_run is true, it will also + run evaluations on specified versions (or latest version if none specified). + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """Add or update evaluation configurations for a PromptTemplate. + + This endpoint allows adding new evaluation configurations or updating + existing ones in a PromptTemplate. If is_run is true, it will also + run evaluations on specified versions (or latest version if none specified). + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, + body: PromptTemplate, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """Add or update evaluation configurations for a PromptTemplate. + + This endpoint allows adding new evaluation configurations or updating + existing ones in a PromptTemplate. If is_run is true, it will also + run evaluations on specified versions (or latest version if none specified). + + Args: + id (UUID): + body (PromptTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_versions.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_versions.py new file mode 100644 index 0000000..3f8e4f3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_prompt_templates_versions.py @@ -0,0 +1,151 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_template import PromptTemplate +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/prompt-templates/{id}/versions/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | PromptTemplate: + if response.status_code == 200: + response_200 = PromptTemplate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | PromptTemplate]: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | PromptTemplate] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | PromptTemplate | None: + """ + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | PromptTemplate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_bulk_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_bulk_create.py new file mode 100644 index 0000000..d340aec --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_bulk_create.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.bulk_create_scores import BulkCreateScores +from ...models.bulk_create_scores_response import BulkCreateScoresResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: BulkCreateScores, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/scores/bulk/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = BulkCreateScoresResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: BulkCreateScores, +) -> Response[ + ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse +]: + """Create multiple scores on a single source (e.g. from inline annotator). + + Args: + body (BulkCreateScores): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: BulkCreateScores, +) -> ( + ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse | None +): + """Create multiple scores on a single source (e.g. from inline annotator). + + Args: + body (BulkCreateScores): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: BulkCreateScores, +) -> Response[ + ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse +]: + """Create multiple scores on a single source (e.g. from inline annotator). + + Args: + body (BulkCreateScores): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: BulkCreateScores, +) -> ( + ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse | None +): + """Create multiple scores on a single source (e.g. from inline annotator). + + Args: + body (BulkCreateScores): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | BulkCreateScoresResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_create.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_create.py new file mode 100644 index 0000000..5676eff --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_create.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.create_score import CreateScore +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.score_response import ScoreResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CreateScore, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/model-hub/scores/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse: + if response.status_code == 200: + response_200 = ScoreResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateScore, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse]: + """Create a single score. + + Args: + body (CreateScore): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateScore, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse | None: + """Create a single score. + + Args: + body (CreateScore): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateScore, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse]: + """Create a single score. + + Args: + body (CreateScore): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateScore, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse | None: + """Create a single score. + + Args: + body (CreateScore): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_delete.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_delete.py new file mode 100644 index 0000000..77f4d0e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_delete.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.score_delete_response import ScoreDeleteResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/model-hub/scores/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse: + if response.status_code == 200: + response_200 = ScoreDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse]: + """Soft-delete a score. + + Only the annotator who created the score or an org Owner/Admin may + delete it. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse | None: + """Soft-delete a score. + + Only the annotator who created the score or an org Owner/Admin may + delete it. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse]: + """Soft-delete a score. + + Only the annotator who created the score or an org Owner/Admin may + delete it. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse | None: + """Soft-delete a score. + + Only the annotator who created the score or an org Owner/Admin may + delete it. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreDeleteResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_for_source.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_for_source.py new file mode 100644 index 0000000..da7b74a --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_for_source.py @@ -0,0 +1,244 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_scores_for_source_source_type import ( + ModelHubScoresForSourceSourceType, +) +from ...models.score_for_source_response import ScoreForSourceResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresForSourceSourceType, + source_id: str, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_source_type = source_type.value + params["source_type"] = json_source_type + + params["source_id"] = source_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/scores/for-source/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse: + if response.status_code == 200: + response_200 = ScoreForSourceResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiTextErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 409: + response_409 = ApiTextErrorResponse.from_dict(response.json()) + + return response_409 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresForSourceSourceType, + source_id: str, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse +]: + """Get all scores for a specific source. + GET /model-hub/scores/for-source/?source_type=trace&source_id= + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresForSourceSourceType): + source_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresForSourceSourceType, + source_id: str, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse | None: + """Get all scores for a specific source. + GET /model-hub/scores/for-source/?source_type=trace&source_id= + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresForSourceSourceType): + source_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresForSourceSourceType, + source_id: str, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse +]: + """Get all scores for a specific source. + GET /model-hub/scores/for-source/?source_type=trace&source_id= + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresForSourceSourceType): + source_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresForSourceSourceType, + source_id: str, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse | None: + """Get all scores for a specific source. + GET /model-hub/scores/for-source/?source_type=trace&source_id= + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresForSourceSourceType): + source_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | ScoreForSourceResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_list.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_list.py new file mode 100644 index 0000000..05d9575 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_list.py @@ -0,0 +1,266 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.model_hub_scores_list_response_200 import ModelHubScoresListResponse200 +from ...models.model_hub_scores_list_source_type import ModelHubScoresListSourceType +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresListSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + label_id: UUID | Unset = UNSET, + annotator_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_source_type: str | Unset = UNSET + if not isinstance(source_type, Unset): + json_source_type = source_type.value + + params["source_type"] = json_source_type + + params["source_id"] = source_id + + json_label_id: str | Unset = UNSET + if not isinstance(label_id, Unset): + json_label_id = str(label_id) + params["label_id"] = json_label_id + + json_annotator_id: str | Unset = UNSET + if not isinstance(annotator_id, Unset): + json_annotator_id = str(annotator_id) + params["annotator_id"] = json_annotator_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/scores/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ModelHubScoresListResponse200: + if response.status_code == 200: + response_200 = ModelHubScoresListResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ModelHubScoresListResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresListSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + label_id: UUID | Unset = UNSET, + annotator_id: UUID | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | ModelHubScoresListResponse200]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresListSourceType | Unset): + source_id (str | Unset): + label_id (UUID | Unset): + annotator_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubScoresListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + label_id=label_id, + annotator_id=annotator_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresListSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + label_id: UUID | Unset = UNSET, + annotator_id: UUID | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubScoresListResponse200 | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresListSourceType | Unset): + source_id (str | Unset): + label_id (UUID | Unset): + annotator_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubScoresListResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + label_id=label_id, + annotator_id=annotator_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresListSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + label_id: UUID | Unset = UNSET, + annotator_id: UUID | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | ModelHubScoresListResponse200]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresListSourceType | Unset): + source_id (str | Unset): + label_id (UUID | Unset): + annotator_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ModelHubScoresListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + label_id=label_id, + annotator_id=annotator_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + source_type: ModelHubScoresListSourceType | Unset = UNSET, + source_id: str | Unset = UNSET, + label_id: UUID | Unset = UNSET, + annotator_id: UUID | Unset = UNSET, +) -> ManagementAPIErrorResponse | ModelHubScoresListResponse200 | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + page (int | Unset): + limit (int | Unset): + source_type (ModelHubScoresListSourceType | Unset): + source_id (str | Unset): + label_id (UUID | Unset): + annotator_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ModelHubScoresListResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + source_type=source_type, + source_id=source_id, + label_id=label_id, + annotator_id=annotator_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_partial_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_partial_update.py new file mode 100644 index 0000000..940897e --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_partial_update.py @@ -0,0 +1,194 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.score import Score +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: Score, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/model-hub/scores/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Score: + if response.status_code == 200: + response_200 = Score.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Score]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> Response[ManagementAPIErrorResponse | Score]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Score] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> ManagementAPIErrorResponse | Score | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Score + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> Response[ManagementAPIErrorResponse | Score]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Score] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> ManagementAPIErrorResponse | Score | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Score + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_read.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_read.py new file mode 100644 index 0000000..45c4a57 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_read.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.score import Score +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/model-hub/scores/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Score: + if response.status_code == 200: + response_200 = Score.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Score]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | Score]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Score] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | Score | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Score + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | Score]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Score] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | Score | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Score + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_update.py b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_update.py new file mode 100644 index 0000000..2197626 --- /dev/null +++ b/python/fi/generated/openapi_client/api/model_hub/model_hub_scores_update.py @@ -0,0 +1,194 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.score import Score +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: Score, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/model-hub/scores/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Score: + if response.status_code == 200: + response_200 = Score.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Score]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> Response[ManagementAPIErrorResponse | Score]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Score] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> ManagementAPIErrorResponse | Score | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Score + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> Response[ManagementAPIErrorResponse | Score]: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Score] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: Score, +) -> ManagementAPIErrorResponse | Score | None: + """Universal Score CRUD. + + GET /model-hub/scores/?source_type=trace&source_id= + POST /model-hub/scores/ (single score) + POST /model-hub/scores/bulk/ (multiple scores on one source) + DELETE /model-hub/scores// + + Args: + id (str): + body (Score): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Score + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_configs/__init__.py b/python/fi/generated/openapi_client/api/run_tests_eval_configs/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_configs/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_create.py b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_create.py new file mode 100644 index 0000000..3166d40 --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.add_eval_configs_request import AddEvalConfigsRequest +from ...models.add_eval_configs_response import AddEvalConfigsResponse +from ...models.eval_error_response import EvalErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: AddEvalConfigsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/{run_test_id}/eval-configs/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 201: + response_201 = AddEvalConfigsResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = EvalErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: AddEvalConfigsRequest, +) -> Response[ + AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Add evaluation configurations + + Adds evaluation configurations to a test run. Returns 201 with the created configs. + + Args: + run_test_id (str): + body (AddEvalConfigsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: AddEvalConfigsRequest, +) -> ( + AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse | None +): + """Add evaluation configurations + + Adds evaluation configurations to a test run. Returns 201 with the created configs. + + Args: + run_test_id (str): + body (AddEvalConfigsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: AddEvalConfigsRequest, +) -> Response[ + AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Add evaluation configurations + + Adds evaluation configurations to a test run. Returns 201 with the created configs. + + Args: + run_test_id (str): + body (AddEvalConfigsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: AddEvalConfigsRequest, +) -> ( + AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse | None +): + """Add evaluation configurations + + Adds evaluation configurations to a test run. Returns 201 with the created configs. + + Args: + run_test_id (str): + body (AddEvalConfigsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AddEvalConfigsResponse | Any | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_delete.py b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_delete.py new file mode 100644 index 0000000..bc2b6d0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_delete.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.delete_eval_config_response import DeleteEvalConfigResponse +from ...models.eval_error_response import EvalErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + eval_config_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/".format( + run_test_id=quote(str(run_test_id), safe=""), + eval_config_id=quote(str(eval_config_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = DeleteEvalConfigResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = EvalErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Delete evaluation configuration + + Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + Any + | DeleteEvalConfigResponse + | EvalErrorResponse + | ManagementAPIErrorResponse + | None +): + """Delete evaluation configuration + + Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Delete evaluation configuration + + Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + Any + | DeleteEvalConfigResponse + | EvalErrorResponse + | ManagementAPIErrorResponse + | None +): + """Delete evaluation configuration + + Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | DeleteEvalConfigResponse | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_update_create.py b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_update_create.py new file mode 100644 index 0000000..fd01bc8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_eval_configs_update_create.py @@ -0,0 +1,239 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_config_update_request import EvalConfigUpdateRequest +from ...models.eval_config_update_response import EvalConfigUpdateResponse +from ...models.eval_error_response import EvalErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + eval_config_id: str, + *, + body: EvalConfigUpdateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/".format( + run_test_id=quote(str(run_test_id), safe=""), + eval_config_id=quote(str(eval_config_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = EvalConfigUpdateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = EvalErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalConfigUpdateRequest, +) -> Response[ + Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Update evaluation configuration + + Updates an evaluation configuration and optionally triggers a rerun. When run=true, + test_execution_id is required. + + Args: + run_test_id (str): + eval_config_id (str): + body (EvalConfigUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalConfigUpdateRequest, +) -> ( + Any + | EvalConfigUpdateResponse + | EvalErrorResponse + | ManagementAPIErrorResponse + | None +): + """Update evaluation configuration + + Updates an evaluation configuration and optionally triggers a rerun. When run=true, + test_execution_id is required. + + Args: + run_test_id (str): + eval_config_id (str): + body (EvalConfigUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalConfigUpdateRequest, +) -> Response[ + Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Update evaluation configuration + + Updates an evaluation configuration and optionally triggers a rerun. When run=true, + test_execution_id is required. + + Args: + run_test_id (str): + eval_config_id (str): + body (EvalConfigUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, + body: EvalConfigUpdateRequest, +) -> ( + Any + | EvalConfigUpdateResponse + | EvalErrorResponse + | ManagementAPIErrorResponse + | None +): + """Update evaluation configuration + + Updates an evaluation configuration and optionally triggers a rerun. When run=true, + test_execution_id is required. + + Args: + run_test_id (str): + eval_config_id (str): + body (EvalConfigUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalConfigUpdateResponse | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_run_new_evals_create.py b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_run_new_evals_create.py new file mode 100644 index 0000000..acc4b9b --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_configs/simulate_run_tests_run_new_evals_create.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_error_response import EvalErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_new_evals_on_test_execution import RunNewEvalsOnTestExecution +from ...models.run_new_evals_response import RunNewEvalsResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: RunNewEvalsOnTestExecution, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/{run_test_id}/run-new-evals/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse: + if response.status_code == 200: + response_200 = RunNewEvalsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = EvalErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunNewEvalsOnTestExecution, +) -> Response[ + Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse +]: + """Run new evaluations on test executions + + Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must + be provided. + + Args: + run_test_id (str): + body (RunNewEvalsOnTestExecution): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunNewEvalsOnTestExecution, +) -> Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse | None: + """Run new evaluations on test executions + + Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must + be provided. + + Args: + run_test_id (str): + body (RunNewEvalsOnTestExecution): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunNewEvalsOnTestExecution, +) -> Response[ + Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse +]: + """Run new evaluations on test executions + + Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must + be provided. + + Args: + run_test_id (str): + body (RunNewEvalsOnTestExecution): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunNewEvalsOnTestExecution, +) -> Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse | None: + """Run new evaluations on test executions + + Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must + be provided. + + Args: + run_test_id (str): + body (RunNewEvalsOnTestExecution): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalErrorResponse | ManagementAPIErrorResponse | RunNewEvalsResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_summary/__init__.py b/python/fi/generated/openapi_client/api/run_tests_eval_summary/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_summary/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_comparison_list.py b/python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_comparison_list.py new file mode 100644 index 0000000..07d57d9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_comparison_list.py @@ -0,0 +1,223 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_error_response import EvalErrorResponse +from ...models.eval_summary_comparison_response import EvalSummaryComparisonResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response + + +def _get_kwargs( + run_test_id: str, + *, + execution_ids: str, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["execution_ids"] = execution_ids + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/eval-summary-comparison/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = EvalSummaryComparisonResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = EvalErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_ids: str, +) -> Response[ + Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse +]: + """Compare evaluation summaries + + Compares evaluation summary statistics across multiple test executions. + + Args: + run_test_id (str): + execution_ids (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + execution_ids=execution_ids, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_ids: str, +) -> ( + Any + | EvalErrorResponse + | EvalSummaryComparisonResponse + | ManagementAPIErrorResponse + | None +): + """Compare evaluation summaries + + Compares evaluation summary statistics across multiple test executions. + + Args: + run_test_id (str): + execution_ids (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + execution_ids=execution_ids, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_ids: str, +) -> Response[ + Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse +]: + """Compare evaluation summaries + + Compares evaluation summary statistics across multiple test executions. + + Args: + run_test_id (str): + execution_ids (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + execution_ids=execution_ids, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_ids: str, +) -> ( + Any + | EvalErrorResponse + | EvalSummaryComparisonResponse + | ManagementAPIErrorResponse + | None +): + """Compare evaluation summaries + + Compares evaluation summary statistics across multiple test executions. + + Args: + run_test_id (str): + execution_ids (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalErrorResponse | EvalSummaryComparisonResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + execution_ids=execution_ids, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_list.py b/python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_list.py new file mode 100644 index 0000000..75c1b39 --- /dev/null +++ b/python/fi/generated/openapi_client/api/run_tests_eval_summary/simulate_run_tests_eval_summary_list.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_error_response import EvalErrorResponse +from ...models.eval_summary_response import EvalSummaryResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + run_test_id: str, + *, + execution_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_execution_id: str | Unset = UNSET + if not isinstance(execution_id, Unset): + json_execution_id = str(execution_id) + params["execution_id"] = json_execution_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/eval-summary/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = EvalSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_id: UUID | Unset = UNSET, +) -> Response[ + Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse +]: + """Get evaluation summary + + Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + + Args: + run_test_id (str): + execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + execution_id=execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_id: UUID | Unset = UNSET, +) -> Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse | None: + """Get evaluation summary + + Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + + Args: + run_test_id (str): + execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + execution_id=execution_id, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_id: UUID | Unset = UNSET, +) -> Response[ + Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse +]: + """Get evaluation summary + + Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + + Args: + run_test_id (str): + execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + execution_id=execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + execution_id: UUID | Unset = UNSET, +) -> Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse | None: + """Get evaluation summary + + Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + + Args: + run_test_id (str): + execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + execution_id=execution_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/scenarios/__init__.py b/python/fi/generated/openapi_client/api/scenarios/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/scenarios/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_columns_create.py b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_columns_create.py new file mode 100644 index 0000000..6ee490f --- /dev/null +++ b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_columns_create.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_add_columns_request import ScenarioAddColumnsRequest +from ...models.scenario_add_columns_response import ScenarioAddColumnsResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...types import Response + + +def _get_kwargs( + scenario_id: str, + *, + body: ScenarioAddColumnsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/scenarios/{scenario_id}/add-columns/".format( + scenario_id=quote(str(scenario_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse: + if response.status_code == 202: + response_202 = ScenarioAddColumnsResponse.from_dict(response.json()) + + return response_202 + + if response.status_code == 400: + response_400 = ScenarioErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddColumnsRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse +]: + """Add columns to scenario + + Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddColumnsRequest, +) -> ( + ManagementAPIErrorResponse + | ScenarioAddColumnsResponse + | ScenarioErrorResponse + | None +): + """Add columns to scenario + + Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse + """ + + return sync_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddColumnsRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse +]: + """Add columns to scenario + + Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddColumnsRequest, +) -> ( + ManagementAPIErrorResponse + | ScenarioAddColumnsResponse + | ScenarioErrorResponse + | None +): + """Add columns to scenario + + Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddColumnsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioAddColumnsResponse | ScenarioErrorResponse + """ + + return ( + await asyncio_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_rows_create.py b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_rows_create.py new file mode 100644 index 0000000..98d1133 --- /dev/null +++ b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_add_rows_create.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_add_rows_request import ScenarioAddRowsRequest +from ...models.scenario_add_rows_response import ScenarioAddRowsResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...types import Response + + +def _get_kwargs( + scenario_id: str, + *, + body: ScenarioAddRowsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/scenarios/{scenario_id}/add-rows/".format( + scenario_id=quote(str(scenario_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse: + if response.status_code == 202: + response_202 = ScenarioAddRowsResponse.from_dict(response.json()) + + return response_202 + + if response.status_code == 400: + response_400 = ScenarioErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddRowsRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse +]: + """Add rows to scenario + + Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddRowsRequest, +) -> ( + ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse | None +): + """Add rows to scenario + + Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse + """ + + return sync_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddRowsRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse +]: + """Add rows to scenario + + Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioAddRowsRequest, +) -> ( + ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse | None +): + """Add rows to scenario + + Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + + Args: + scenario_id (str): + body (ScenarioAddRowsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioAddRowsResponse | ScenarioErrorResponse + """ + + return ( + await asyncio_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_get_columns_list.py b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_get_columns_list.py new file mode 100644 index 0000000..266a2bb --- /dev/null +++ b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_get_columns_list.py @@ -0,0 +1,248 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...models.scenario_list_response import ScenarioListResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_agent_definition_id: str | Unset = UNSET + if not isinstance(agent_definition_id, Unset): + json_agent_definition_id = str(agent_definition_id) + params["agent_definition_id"] = json_agent_definition_id + + params["agent_type"] = agent_type + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/scenarios/get-columns/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse: + if response.status_code == 200: + response_200 = ScenarioListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse +]: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse] + """ + + kwargs = _get_kwargs( + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse | None: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse + """ + + return sync_detailed( + client=client, + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse +]: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse] + """ + + kwargs = _get_kwargs( + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse | None: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_prompts_update.py b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_prompts_update.py new file mode 100644 index 0000000..533da8b --- /dev/null +++ b/python/fi/generated/openapi_client/api/scenarios/simulate_scenarios_prompts_update.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_edit_prompts_request import ScenarioEditPromptsRequest +from ...models.scenario_error_response import ScenarioErrorResponse +from ...models.scenario_prompts_update_response import ScenarioPromptsUpdateResponse +from ...types import Response + + +def _get_kwargs( + scenario_id: str, + *, + body: ScenarioEditPromptsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/simulate/scenarios/{scenario_id}/prompts/".format( + scenario_id=quote(str(scenario_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse: + if response.status_code == 200: + response_200 = ScenarioPromptsUpdateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ScenarioErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditPromptsRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse +]: + """Edit scenario prompts + + Updates the simulator agent prompt for a scenario. + + Args: + scenario_id (str): + body (ScenarioEditPromptsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditPromptsRequest, +) -> ( + ManagementAPIErrorResponse + | ScenarioErrorResponse + | ScenarioPromptsUpdateResponse + | None +): + """Edit scenario prompts + + Updates the simulator agent prompt for a scenario. + + Args: + scenario_id (str): + body (ScenarioEditPromptsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse + """ + + return sync_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditPromptsRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse +]: + """Edit scenario prompts + + Updates the simulator agent prompt for a scenario. + + Args: + scenario_id (str): + body (ScenarioEditPromptsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditPromptsRequest, +) -> ( + ManagementAPIErrorResponse + | ScenarioErrorResponse + | ScenarioPromptsUpdateResponse + | None +): + """Edit scenario prompts + + Updates the simulator agent prompt for a scenario. + + Args: + scenario_id (str): + body (ScenarioEditPromptsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioPromptsUpdateResponse + """ + + return ( + await asyncio_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/__init__.py b/python/fi/generated/openapi_client/api/sdk/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_configure_evaluations_create.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_configure_evaluations_create.py new file mode 100644 index 0000000..9981bcf --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_configure_evaluations_create.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_configure_evaluations_request import SDKConfigureEvaluationsRequest +from ...models.sdk_configure_evaluations_response import SDKConfigureEvaluationsResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: SDKConfigureEvaluationsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sdk/api/v1/configure-evaluations/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse: + if response.status_code == 200: + response_200 = SDKConfigureEvaluationsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: SDKConfigureEvaluationsRequest, +) -> Response[ + ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse +]: + """ + Args: + body (SDKConfigureEvaluationsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: SDKConfigureEvaluationsRequest, +) -> ( + ManagementAPIErrorResponse + | SDKConfigureEvaluationsResponse + | SDKErrorResponse + | None +): + """ + Args: + body (SDKConfigureEvaluationsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: SDKConfigureEvaluationsRequest, +) -> Response[ + ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse +]: + """ + Args: + body (SDKConfigureEvaluationsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: SDKConfigureEvaluationsRequest, +) -> ( + ManagementAPIErrorResponse + | SDKConfigureEvaluationsResponse + | SDKErrorResponse + | None +): + """ + Args: + body (SDKConfigureEvaluationsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKConfigureEvaluationsResponse | SDKErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_create.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_create.py new file mode 100644 index 0000000..ff97973 --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_create.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_standalone_eval_request import SDKStandaloneEvalRequest +from ...models.sdk_standalone_eval_response import SDKStandaloneEvalResponse +from ...types import Response + + +def _get_kwargs( + *, + body: SDKStandaloneEvalRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sdk/api/v1/eval/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse: + if response.status_code == 200: + response_200 = SDKStandaloneEvalResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalRequest, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse +]: + """ + Args: + body (SDKStandaloneEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalRequest, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse | None: + """ + Args: + body (SDKStandaloneEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalRequest, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse +]: + """ + Args: + body (SDKStandaloneEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalRequest, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse | None: + """ + Args: + body (SDKStandaloneEvalRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_read.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_read.py new file mode 100644 index 0000000..aeb1bb7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_eval_read.py @@ -0,0 +1,161 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_eval_template_response import SDKEvalTemplateResponse +from ...types import Response + + +def _get_kwargs( + eval_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sdk/api/v1/eval/{eval_id}/".format( + eval_id=quote(str(eval_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse: + if response.status_code == 200: + response_200 = SDKEvalTemplateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse]: + """ + Args: + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse] + """ + + kwargs = _get_kwargs( + eval_id=eval_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse | None: + """ + Args: + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse + """ + + return sync_detailed( + eval_id=eval_id, + client=client, + ).parsed + + +async def asyncio_detailed( + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse]: + """ + Args: + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse] + """ + + kwargs = _get_kwargs( + eval_id=eval_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + eval_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse | None: + """ + Args: + eval_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKEvalTemplateResponse + """ + + return ( + await asyncio_detailed( + eval_id=eval_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_create.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_create.py new file mode 100644 index 0000000..f52bb14 --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_create.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.cicd_job import CICDJob +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdkcicd_evaluation_run_accepted_response import ( + SDKCICDEvaluationRunAcceptedResponse, +) +from ...types import Response + + +def _get_kwargs( + *, + body: CICDJob, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sdk/api/v1/evaluate-pipeline/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse +): + if response.status_code == 200: + response_200 = SDKCICDEvaluationRunAcceptedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CICDJob, +) -> Response[ + ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse +]: + """ + Args: + body (CICDJob): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CICDJob, +) -> ( + ManagementAPIErrorResponse + | SDKCICDEvaluationRunAcceptedResponse + | SDKErrorResponse + | None +): + """ + Args: + body (CICDJob): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CICDJob, +) -> Response[ + ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse +]: + """ + Args: + body (CICDJob): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CICDJob, +) -> ( + ManagementAPIErrorResponse + | SDKCICDEvaluationRunAcceptedResponse + | SDKErrorResponse + | None +): + """ + Args: + body (CICDJob): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKCICDEvaluationRunAcceptedResponse | SDKErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_list.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_list.py new file mode 100644 index 0000000..740bd4c --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_evaluate_pipeline_list.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdkcicd_evaluation_runs_response import SDKCICDEvaluationRunsResponse +from ...types import UNSET, Response + + +def _get_kwargs( + *, + project_name: str, + versions: str, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["project_name"] = project_name + + params["versions"] = versions + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sdk/api/v1/evaluate-pipeline/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse: + if response.status_code == 200: + response_200 = SDKCICDEvaluationRunsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + project_name: str, + versions: str, +) -> Response[ + ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse +]: + """ + Args: + project_name (str): + versions (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse] + """ + + kwargs = _get_kwargs( + project_name=project_name, + versions=versions, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + project_name: str, + versions: str, +) -> ( + ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse | None +): + """ + Args: + project_name (str): + versions (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse + """ + + return sync_detailed( + client=client, + project_name=project_name, + versions=versions, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + project_name: str, + versions: str, +) -> Response[ + ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse +]: + """ + Args: + project_name (str): + versions (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse] + """ + + kwargs = _get_kwargs( + project_name=project_name, + versions=versions, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + project_name: str, + versions: str, +) -> ( + ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse | None +): + """ + Args: + project_name (str): + versions (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKCICDEvaluationRunsResponse | SDKErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + project_name=project_name, + versions=versions, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_get_evals_list.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_get_evals_list.py new file mode 100644 index 0000000..efa0eb6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_get_evals_list.py @@ -0,0 +1,129 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_get_evals_response import SDKGetEvalsResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sdk/api/v1/get-evals/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse: + if response.status_code == 200: + response_200 = SDKGetEvalsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKGetEvalsResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_create.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_create.py new file mode 100644 index 0000000..5afd5ec --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_create.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_standalone_eval_response import SDKStandaloneEvalResponse +from ...models.sdk_standalone_eval_v2_request import SDKStandaloneEvalV2Request +from ...types import Response + + +def _get_kwargs( + *, + body: SDKStandaloneEvalV2Request, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sdk/api/v1/new-eval/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse: + if response.status_code == 200: + response_200 = SDKStandaloneEvalResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalV2Request, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse +]: + """ + Args: + body (SDKStandaloneEvalV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalV2Request, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse | None: + """ + Args: + body (SDKStandaloneEvalV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalV2Request, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse +]: + """ + Args: + body (SDKStandaloneEvalV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: SDKStandaloneEvalV2Request, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse | None: + """ + Args: + body (SDKStandaloneEvalV2Request): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_list.py b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_list.py new file mode 100644 index 0000000..f7036cc --- /dev/null +++ b/python/fi/generated/openapi_client/api/sdk/sdk_api_v1_new_eval_list.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_standalone_eval_v2_response import SDKStandaloneEvalV2Response +from ...types import UNSET, Response + + +def _get_kwargs( + *, + eval_id: UUID, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_eval_id = str(eval_id) + params["eval_id"] = json_eval_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sdk/api/v1/new-eval/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response: + if response.status_code == 200: + response_200 = SDKStandaloneEvalV2Response.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + eval_id: UUID, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response +]: + """ + Args: + eval_id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response] + """ + + kwargs = _get_kwargs( + eval_id=eval_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + eval_id: UUID, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response | None: + """ + Args: + eval_id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response + """ + + return sync_detailed( + client=client, + eval_id=eval_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + eval_id: UUID, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response +]: + """ + Args: + eval_id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response] + """ + + kwargs = _get_kwargs( + eval_id=eval_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + eval_id: UUID, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response | None: + """ + Args: + eval_id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKStandaloneEvalV2Response + """ + + return ( + await asyncio_detailed( + client=client, + eval_id=eval_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/__init__.py b/python/fi/generated/openapi_client/api/simulate/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_delete.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_delete.py new file mode 100644 index 0000000..87e2a50 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_delete.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_bulk_delete_request import ( + AgentDefinitionBulkDeleteRequest, +) +from ...models.agent_definition_bulk_delete_response import ( + AgentDefinitionBulkDeleteResponse, +) +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: AgentDefinitionBulkDeleteRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/agent-definitions/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentDefinitionBulkDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = AgentDefinitionBulkDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentDefinitionBulkDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionBulkDeleteRequest, +) -> Response[ + AgentDefinitionBulkDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Bulk soft-delete agent definitions. + + Args: + body (AgentDefinitionBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionBulkDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionBulkDeleteRequest, +) -> ( + AgentDefinitionBulkDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Bulk soft-delete agent definitions. + + Args: + body (AgentDefinitionBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionBulkDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionBulkDeleteRequest, +) -> Response[ + AgentDefinitionBulkDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Bulk soft-delete agent definitions. + + Args: + body (AgentDefinitionBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionBulkDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionBulkDeleteRequest, +) -> ( + AgentDefinitionBulkDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Bulk soft-delete agent definitions. + + Args: + body (AgentDefinitionBulkDeleteRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionBulkDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_activate_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_activate_create.py new file mode 100644 index 0000000..de38d78 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_activate_create.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_version_activate_response import AgentVersionActivateResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + version_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/".format( + agent_id=quote(str(agent_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentVersionActivateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = AgentVersionActivateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentVersionActivateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + AgentVersionActivateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Activate a specific agent version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionActivateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + AgentVersionActivateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Activate a specific agent version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionActivateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + AgentVersionActivateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Activate a specific agent version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionActivateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + AgentVersionActivateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Activate a specific agent version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionActivateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_call_executions_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_call_executions_list.py new file mode 100644 index 0000000..ecc95c8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_call_executions_list.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.call_execution import CallExecution +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + version_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/".format( + agent_id=quote(str(agent_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = CallExecution.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution] +]: + """Get the call executions of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[CallExecution] + | None +): + """Get the call executions of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution] + """ + + return sync_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution] +]: + """Get the call executions of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[CallExecution] + | None +): + """Get the call executions of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[CallExecution] + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_create_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_create_create.py new file mode 100644 index 0000000..a3da495 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_create_create.py @@ -0,0 +1,217 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_version_create_request import AgentVersionCreateRequest +from ...models.agent_version_create_response import AgentVersionCreateResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + *, + body: AgentVersionCreateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/agent-definitions/{agent_id}/versions/create/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentVersionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 201: + response_201 = AgentVersionCreateResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentVersionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentVersionCreateRequest, +) -> Response[ + AgentVersionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Create a new version of an agent definition. + + Args: + agent_id (str): + body (AgentVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentVersionCreateRequest, +) -> ( + AgentVersionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Create a new version of an agent definition. + + Args: + agent_id (str): + body (AgentVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentVersionCreateRequest, +) -> Response[ + AgentVersionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Create a new version of an agent definition. + + Args: + agent_id (str): + body (AgentVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentVersionCreateRequest, +) -> ( + AgentVersionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Create a new version of an agent definition. + + Args: + agent_id (str): + body (AgentVersionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_delete_delete.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_delete_delete.py new file mode 100644 index 0000000..e2c608c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_delete_delete.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_version_delete_response import AgentVersionDeleteResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + version_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/".format( + agent_id=quote(str(agent_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentVersionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = AgentVersionDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentVersionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentVersionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Soft delete an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentVersionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Soft delete an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentVersionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Soft delete an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentVersionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Soft delete an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_eval_summary_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_eval_summary_list.py new file mode 100644 index 0000000..1f45b5c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_eval_summary_list.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_error_response import EvalErrorResponse +from ...models.eval_summary_response import EvalSummaryResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + version_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/".format( + agent_id=quote(str(agent_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = EvalSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse]: + """Get the eval summary of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse | None: + """Get the eval summary of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse]: + """Get the eval summary of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse | None: + """Get the eval summary of an agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalErrorResponse | EvalSummaryResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_list.py new file mode 100644 index 0000000..58231f2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_list.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_version_list_response import AgentVersionListResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/agent-definitions/{agent_id}/versions/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentVersionListResponse] +): + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AgentVersionListResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentVersionListResponse] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentVersionListResponse] +]: + """Get all versions of a specific agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentVersionListResponse]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentVersionListResponse] + | None +): + """Get all versions of a specific agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentVersionListResponse] + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentVersionListResponse] +]: + """Get all versions of a specific agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentVersionListResponse]] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentVersionListResponse] + | None +): + """Get all versions of a specific agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentVersionListResponse] + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_read.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_read.py new file mode 100644 index 0000000..b5af1e7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_read.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_version_response import AgentVersionResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + version_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/agent-definitions/{agent_id}/versions/{version_id}/".format( + agent_id=quote(str(agent_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AgentVersionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse +]: + """Get details of a specific agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentVersionResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Get details of a specific agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse +]: + """Get details of a specific agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentVersionResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Get details of a specific agent version. + + Args: + agent_id (str): + version_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_restore_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_restore_create.py new file mode 100644 index 0000000..c3bdc7f --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_agent_definitions_versions_restore_create.py @@ -0,0 +1,231 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_version_restore_response import AgentVersionRestoreResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + version_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/".format( + agent_id=quote(str(agent_id), safe=""), + version_id=quote(str(version_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentVersionRestoreResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = AgentVersionRestoreResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentVersionRestoreResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + AgentVersionRestoreResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Restore agent definition from a specific version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionRestoreResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + AgentVersionRestoreResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Restore agent definition from a specific version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionRestoreResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + AgentVersionRestoreResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Restore agent definition from a specific version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentVersionRestoreResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + version_id=version_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + version_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + AgentVersionRestoreResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Restore agent definition from a specific version. + + Args: + agent_id (str): + version_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentVersionRestoreResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + version_id=version_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_call_executions_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_call_executions_list.py new file mode 100644 index 0000000..512f204 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_call_executions_list.py @@ -0,0 +1,273 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution import CallExecution +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + status: str | Unset = "", + test_execution_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + params["status"] = status + + json_test_execution_id: str | Unset = UNSET + if not isinstance(test_execution_id, Unset): + json_test_execution_id = str(test_execution_id) + params["test_execution_id"] = json_test_execution_id + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/call-executions/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = CallExecution.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 404: + response_404 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + status: str | Unset = "", + test_execution_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution] +]: + """Get paginated list of call executions for the user's organization + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call status + - test_execution_id: filter by specific test execution + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + status (str | Unset): Default: ''. + test_execution_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution]] + """ + + kwargs = _get_kwargs( + search=search, + status=status, + test_execution_id=test_execution_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + status: str | Unset = "", + test_execution_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ( + CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution] | None +): + """Get paginated list of call executions for the user's organization + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call status + - test_execution_id: filter by specific test execution + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + status (str | Unset): Default: ''. + test_execution_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution] + """ + + return sync_detailed( + client=client, + search=search, + status=status, + test_execution_id=test_execution_id, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + status: str | Unset = "", + test_execution_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution] +]: + """Get paginated list of call executions for the user's organization + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call status + - test_execution_id: filter by specific test execution + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + status (str | Unset): Default: ''. + test_execution_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution]] + """ + + kwargs = _get_kwargs( + search=search, + status=status, + test_execution_id=test_execution_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + status: str | Unset = "", + test_execution_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ( + CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution] | None +): + """Get paginated list of call executions for the user's organization + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call status + - test_execution_id: filter by specific test execution + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + status (str | Unset): Default: ''. + test_execution_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | ManagementAPIErrorResponse | list[CallExecution] + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + status=status, + test_execution_id=test_execution_id, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate.py new file mode 100644 index 0000000..f74c802 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.persona_duplicate_request import PersonaDuplicateRequest +from ...models.persona_duplicate_response import PersonaDuplicateResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: PersonaDuplicateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/api/personas/{id}/duplicate/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse +): + if response.status_code == 201: + response_201 = PersonaDuplicateResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse +]: + """Duplicate a persona (creates a workspace-level copy) + + Args: + id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | PersonaDuplicateResponse + | None +): + """Duplicate a persona (creates a workspace-level copy) + + Args: + id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse +]: + """Duplicate a persona (creates a workspace-level copy) + + Args: + id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | PersonaDuplicateResponse + | None +): + """Duplicate a persona (creates a workspace-level copy) + + Args: + id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate_create.py new file mode 100644 index 0000000..53727b5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_duplicate_create.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.persona_duplicate_request import PersonaDuplicateRequest +from ...models.persona_duplicate_response import PersonaDuplicateResponse +from ...types import Response + + +def _get_kwargs( + persona_id: str, + *, + body: PersonaDuplicateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/api/personas/duplicate/{persona_id}/".format( + persona_id=quote(str(persona_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse: + if response.status_code == 201: + response_201 = PersonaDuplicateResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + persona_id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse +]: + """Duplicate a persona by ID + + Args: + persona_id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse] + """ + + kwargs = _get_kwargs( + persona_id=persona_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + persona_id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse | None +): + """Duplicate a persona by ID + + Args: + persona_id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse + """ + + return sync_detailed( + persona_id=persona_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + persona_id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse +]: + """Duplicate a persona by ID + + Args: + persona_id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse] + """ + + kwargs = _get_kwargs( + persona_id=persona_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + persona_id: str, + *, + client: AuthenticatedClient | Client, + body: PersonaDuplicateRequest, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse | None +): + """Duplicate a persona by ID + + Args: + persona_id (str): + body (PersonaDuplicateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PersonaDuplicateResponse + """ + + return ( + await asyncio_detailed( + persona_id=persona_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_field_options.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_field_options.py new file mode 100644 index 0000000..4121206 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_field_options.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulate_api_personas_field_options_response_200 import ( + SimulateApiPersonasFieldOptionsResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/personas/field-options/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasFieldOptionsResponse200 +): + if response.status_code == 200: + response_200 = SimulateApiPersonasFieldOptionsResponse200.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasFieldOptionsResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasFieldOptionsResponse200 +]: + """Get field options/choices for persona creation + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasFieldOptionsResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasFieldOptionsResponse200 + | None +): + """Get field options/choices for persona creation + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasFieldOptionsResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasFieldOptionsResponse200 +]: + """Get field options/choices for persona creation + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasFieldOptionsResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasFieldOptionsResponse200 + | None +): + """Get field options/choices for persona creation + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasFieldOptionsResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_system_personas.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_system_personas.py new file mode 100644 index 0000000..eefdd44 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_system_personas.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulate_api_personas_system_personas_response_200 import ( + SimulateApiPersonasSystemPersonasResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/personas/system/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasSystemPersonasResponse200 +): + if response.status_code == 200: + response_200 = SimulateApiPersonasSystemPersonasResponse200.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasSystemPersonasResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasSystemPersonasResponse200 +]: + """Get only system-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasSystemPersonasResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasSystemPersonasResponse200 + | None +): + """Get only system-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasSystemPersonasResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasSystemPersonasResponse200 +]: + """Get only system-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasSystemPersonasResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasSystemPersonasResponse200 + | None +): + """Get only system-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasSystemPersonasResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_update.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_update.py new file mode 100644 index 0000000..2e56143 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_update.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.persona import Persona +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: Persona, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/simulate/api/personas/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona: + if response.status_code == 200: + response_200 = Persona.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + """Update a persona (workspace-level only) + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona | None: + """Update a persona (workspace-level only) + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + """Update a persona (workspace-level only) + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona | None: + """Update a persona (workspace-level only) + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_workspace_personas.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_workspace_personas.py new file mode 100644 index 0000000..930d5f0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_personas_workspace_personas.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulate_api_personas_workspace_personas_response_200 import ( + SimulateApiPersonasWorkspacePersonasResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/personas/workspace/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasWorkspacePersonasResponse200 +): + if response.status_code == 200: + response_200 = SimulateApiPersonasWorkspacePersonasResponse200.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasWorkspacePersonasResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasWorkspacePersonasResponse200 +]: + """Get only workspace-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasWorkspacePersonasResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasWorkspacePersonasResponse200 + | None +): + """Get only workspace-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasWorkspacePersonasResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasWorkspacePersonasResponse200 +]: + """Get only workspace-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasWorkspacePersonasResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulateApiPersonasWorkspacePersonasResponse200 + | None +): + """Get only workspace-level personas + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulateApiPersonasWorkspacePersonasResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_api_run_tests_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_api_run_tests_list.py new file mode 100644 index 0000000..cfcafda --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_api_run_tests_list.py @@ -0,0 +1,268 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_response import RunTestResponse +from ...models.simulate_api_run_tests_list_simulation_type import ( + SimulateApiRunTestsListSimulationType, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + simulation_type: SimulateApiRunTestsListSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_simulation_type: str | Unset = UNSET + if not isinstance(simulation_type, Unset): + json_simulation_type = simulation_type.value + + params["simulation_type"] = json_simulation_type + + json_prompt_template_id: str | Unset = UNSET + if not isinstance(prompt_template_id, Unset): + json_prompt_template_id = str(prompt_template_id) + params["prompt_template_id"] = json_prompt_template_id + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/run-tests/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = RunTestResponse.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: SimulateApiRunTestsListSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] +]: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + simulation_type (SimulateApiRunTestsListSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse]] + """ + + kwargs = _get_kwargs( + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: SimulateApiRunTestsListSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] | None: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + simulation_type (SimulateApiRunTestsListSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] + """ + + return sync_detailed( + client=client, + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: SimulateApiRunTestsListSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] +]: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + simulation_type (SimulateApiRunTestsListSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse]] + """ + + kwargs = _get_kwargs( + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: SimulateApiRunTestsListSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] | None: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + search (str | Unset): Default: ''. + simulation_type (SimulateApiRunTestsListSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_create.py new file mode 100644 index 0000000..6e9a711 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_create.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_branch_deviation_create_response import ( + CallBranchDeviationCreateResponse, +) +from ...models.empty_request import EmptyRequest +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/call-executions/{call_execution_id}/branch-analysis/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = CallBranchDeviationCreateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse +]: + """Create deviation nodes and edges for a call execution + + Args: + call_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + CallBranchDeviationCreateResponse + | ErrorResponse + | ManagementAPIErrorResponse + | None +): + """Create deviation nodes and edges for a call execution + + Args: + call_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse +]: + """Create deviation nodes and edges for a call execution + + Args: + call_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + CallBranchDeviationCreateResponse + | ErrorResponse + | ManagementAPIErrorResponse + | None +): + """Create deviation nodes and edges for a call execution + + Args: + call_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallBranchDeviationCreateResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_list.py new file mode 100644 index 0000000..bd56169 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_branch_analysis_list.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_branch_analysis_response import CallBranchAnalysisResponse +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/call-executions/{call_execution_id}/branch-analysis/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = CallBranchAnalysisResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Analyze a call execution against graph branches and identify deviations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Analyze a call execution against graph branches and identify deviations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Analyze a call execution against graph branches and identify deviations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Analyze a call execution against graph branches and identify deviations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallBranchAnalysisResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_chat_send_message_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_chat_send_message_create.py new file mode 100644 index 0000000..0565c2b --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_chat_send_message_create.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.chat_send_message_response import ChatSendMessageResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.send_chat_request import SendChatRequest +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, + *, + body: SendChatRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/call-executions/{call_execution_id}/chat/send-message/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ChatSendMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: SendChatRequest, +) -> Response[ + ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse +]: + """Send a message to a chat execution + + Args: + call_execution_id (str): + body (SendChatRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: SendChatRequest, +) -> ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse | None: + """Send a message to a chat execution + + Args: + call_execution_id (str): + body (SendChatRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: SendChatRequest, +) -> Response[ + ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse +]: + """Send a message to a chat execution + + Args: + call_execution_id (str): + body (SendChatRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: SendChatRequest, +) -> ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse | None: + """Send a message to a chat execution + + Args: + call_execution_id (str): + body (SendChatRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ChatSendMessageResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_delete_delete.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_delete_delete.py new file mode 100644 index 0000000..eafc3f9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_delete_delete.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution_delete_response import CallExecutionDeleteResponse +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/call-executions/{call_execution_id}/delete/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CallExecutionDeleteResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +): + if response.status_code == 204: + response_204 = CallExecutionDeleteResponse.from_dict(response.json()) + + return response_204 + + if response.status_code == 404: + response_404 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallExecutionDeleteResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionDeleteResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +]: + """Delete a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionDeleteResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionDeleteResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse + | None +): + """Delete a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionDeleteResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionDeleteResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +]: + """Delete a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionDeleteResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionDeleteResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse + | None +): + """Delete a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionDeleteResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_error_localizer_tasks_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_error_localizer_tasks_list.py new file mode 100644 index 0000000..c4f26ea --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_error_localizer_tasks_list.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution_error_localizer_tasks_response import ( + CallExecutionErrorLocalizerTasksResponse, +) +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/call-executions/{call_execution_id}/error-localizer-tasks/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CallExecutionErrorLocalizerTasksResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = CallExecutionErrorLocalizerTasksResponse.from_dict( + response.json() + ) + + return response_200 + + if response.status_code == 404: + response_404 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallExecutionErrorLocalizerTasksResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorLocalizerTasksResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +]: + """Get error localizer tasks for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorLocalizerTasksResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorLocalizerTasksResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse + | None +): + """Get error localizer tasks for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorLocalizerTasksResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorLocalizerTasksResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse +]: + """Get error localizer tasks for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorLocalizerTasksResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorLocalizerTasksResponse + | CallExecutionErrorResponse + | ManagementAPIErrorResponse + | None +): + """Get error localizer tasks for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorLocalizerTasksResponse | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_logs_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_logs_list.py new file mode 100644 index 0000000..1134af1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_logs_list.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.call_execution_logs_response import CallExecutionLogsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/call-executions/{call_execution_id}/logs/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = CallExecutionLogsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse +]: + """Paginated API to retrieve stored log entries for a call execution. + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorResponse + | CallExecutionLogsResponse + | ManagementAPIErrorResponse + | None +): + """Paginated API to retrieve stored log entries for a call execution. + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse +]: + """Paginated API to retrieve stored log entries for a call execution. + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorResponse + | CallExecutionLogsResponse + | ManagementAPIErrorResponse + | None +): + """Paginated API to retrieve stored log entries for a call execution. + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | CallExecutionLogsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_partial_update.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_partial_update.py new file mode 100644 index 0000000..7cef960 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_partial_update.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution import CallExecution +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.call_execution_status_update import CallExecutionStatusUpdate +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, + *, + body: CallExecutionStatusUpdate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/simulate/call-executions/{call_execution_id}/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = CallExecution.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionStatusUpdate, +) -> Response[CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse]: + """Update the status of a specific call execution + + Args: + call_execution_id (str): + body (CallExecutionStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionStatusUpdate, +) -> CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse | None: + """Update the status of a specific call execution + + Args: + call_execution_id (str): + body (CallExecutionStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionStatusUpdate, +) -> Response[CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse]: + """Update the status of a specific call execution + + Args: + call_execution_id (str): + body (CallExecutionStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionStatusUpdate, +) -> CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse | None: + """Update the status of a specific call execution + + Args: + call_execution_id (str): + body (CallExecutionStatusUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecution | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_read.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_read.py new file mode 100644 index 0000000..27e40a9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_read.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution_detail import CallExecutionDetail +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/call-executions/{call_execution_id}/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = CallExecutionDetail.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse +]: + """Get a specific call execution with all its details + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse | None +): + """Get a specific call execution with all its details + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse +]: + """Get a specific call execution with all its details + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse | None +): + """Get a specific call execution with all its details + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionDetail | CallExecutionErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_session_comparison_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_session_comparison_list.py new file mode 100644 index 0000000..a685596 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_session_comparison_list.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.session_comparison_response import SessionComparisonResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/call-executions/{call_execution_id}/session-comparison/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse +): + if response.status_code == 200: + response_200 = SessionComparisonResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse +]: + """API View to compare session chat simulations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | SessionComparisonResponse + | None +): + """API View to compare session chat simulations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse +]: + """API View to compare session chat simulations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | SessionComparisonResponse + | None +): + """API View to compare session chat simulations + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | ManagementAPIErrorResponse | SessionComparisonResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_transcripts_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_transcripts_list.py new file mode 100644 index 0000000..bb446a4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_call_executions_transcripts_list.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_transcript_response import CallTranscriptResponse +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + call_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/call-executions/{call_execution_id}/transcripts/".format( + call_execution_id=quote(str(call_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = CallTranscriptResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Get transcripts for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Get transcripts for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + call_execution_id=call_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Get transcripts for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + call_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Get transcripts for a specific call execution + + Args: + call_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallTranscriptResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + call_execution_id=call_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_export_read.py b/python/fi/generated/openapi_client/api/simulate/simulate_export_read.py new file mode 100644 index 0000000..4d3d4e1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_export_read.py @@ -0,0 +1,239 @@ +from http import HTTPStatus +from io import BytesIO +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulate_export_read_type import SimulateExportReadType +from ...types import UNSET, File, Response, Unset + + +def _get_kwargs( + item_id: str, + *, + type_: SimulateExportReadType, + search: str | Unset = UNSET, + status: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_type_ = type_.value + params["type"] = json_type_ + + params["search"] = search + + params["status"] = status + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/export/{item_id}/".format( + item_id=quote(str(item_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | File | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = File(payload=BytesIO(response.json())) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | File | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + item_id: str, + *, + client: AuthenticatedClient | Client, + type_: SimulateExportReadType, + search: str | Unset = UNSET, + status: str | Unset = UNSET, +) -> Response[ApiTextErrorResponse | File | ManagementAPIErrorResponse]: + """Export data as CSV based on type parameter + Query Parameters: + - type: 'runtest' or 'testexecution' (required) + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + + Args: + item_id (str): + type_ (SimulateExportReadType): + search (str | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | File | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + item_id=item_id, + type_=type_, + search=search, + status=status, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + item_id: str, + *, + client: AuthenticatedClient | Client, + type_: SimulateExportReadType, + search: str | Unset = UNSET, + status: str | Unset = UNSET, +) -> ApiTextErrorResponse | File | ManagementAPIErrorResponse | None: + """Export data as CSV based on type parameter + Query Parameters: + - type: 'runtest' or 'testexecution' (required) + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + + Args: + item_id (str): + type_ (SimulateExportReadType): + search (str | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | File | ManagementAPIErrorResponse + """ + + return sync_detailed( + item_id=item_id, + client=client, + type_=type_, + search=search, + status=status, + ).parsed + + +async def asyncio_detailed( + item_id: str, + *, + client: AuthenticatedClient | Client, + type_: SimulateExportReadType, + search: str | Unset = UNSET, + status: str | Unset = UNSET, +) -> Response[ApiTextErrorResponse | File | ManagementAPIErrorResponse]: + """Export data as CSV based on type parameter + Query Parameters: + - type: 'runtest' or 'testexecution' (required) + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + + Args: + item_id (str): + type_ (SimulateExportReadType): + search (str | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | File | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + item_id=item_id, + type_=type_, + search=search, + status=status, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + item_id: str, + *, + client: AuthenticatedClient | Client, + type_: SimulateExportReadType, + search: str | Unset = UNSET, + status: str | Unset = UNSET, +) -> ApiTextErrorResponse | File | ManagementAPIErrorResponse | None: + """Export data as CSV based on type parameter + Query Parameters: + - type: 'runtest' or 'testexecution' (required) + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + + Args: + item_id (str): + type_ (SimulateExportReadType): + search (str | Unset): + status (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | File | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + item_id=item_id, + client=client, + type_=type_, + search=search, + status=status, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_prompt_simulations_scenarios_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_simulations_scenarios_list.py new file mode 100644 index 0000000..7f52678 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_simulations_scenarios_list.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_simulation_scenarios_response import ( + PromptSimulationScenariosResponse, +) +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/prompt-simulations/scenarios/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationScenariosResponse +): + if response.status_code == 200: + response_200 = PromptSimulationScenariosResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationScenariosResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationScenariosResponse +]: + """Get list of scenarios available for prompt simulations. + + Query Parameters: + - limit: number of items per page (default: 20) + - page: page number (default: 1) + - search: search string to filter scenarios by name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationScenariosResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationScenariosResponse + | None +): + """Get list of scenarios available for prompt simulations. + + Query Parameters: + - limit: number of items per page (default: 20) + - page: page number (default: 1) + - search: search string to filter scenarios by name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationScenariosResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationScenariosResponse +]: + """Get list of scenarios available for prompt simulations. + + Query Parameters: + - limit: number of items per page (default: 20) + - page: page number (default: 1) + - search: search string to filter scenarios by name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationScenariosResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationScenariosResponse + | None +): + """Get list of scenarios available for prompt simulations. + + Query Parameters: + - limit: number of items per page (default: 20) + - page: page number (default: 1) + - search: search string to filter scenarios by name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationScenariosResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_create.py new file mode 100644 index 0000000..700970d --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_create.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.create_prompt_simulation_request import CreatePromptSimulationRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_simulation_run_response import PromptSimulationRunResponse +from ...types import Response + + +def _get_kwargs( + prompt_template_id: str, + *, + body: CreatePromptSimulationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/prompt-templates/{prompt_template_id}/simulations/".format( + prompt_template_id=quote(str(prompt_template_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse: + if response.status_code == 201: + response_201 = PromptSimulationRunResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, + body: CreatePromptSimulationRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + """Create a new prompt-based simulation run. + + Request Body: + - name: Name of the simulation run + - description: Optional description + - prompt_version_id: The prompt version to use + - scenario_ids: List of scenario IDs to run + - dataset_row_ids: Optional list of specific row IDs + - evaluations_config: Optional evaluation configurations + - enable_tool_evaluation: Optional boolean to enable tool evaluation + + Args: + prompt_template_id (str): + body (CreatePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, + body: CreatePromptSimulationRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationRunResponse + | None +): + """Create a new prompt-based simulation run. + + Request Body: + - name: Name of the simulation run + - description: Optional description + - prompt_version_id: The prompt version to use + - scenario_ids: List of scenario IDs to run + - dataset_row_ids: Optional list of specific row IDs + - evaluations_config: Optional evaluation configurations + - enable_tool_evaluation: Optional boolean to enable tool evaluation + + Args: + prompt_template_id (str): + body (CreatePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse + """ + + return sync_detailed( + prompt_template_id=prompt_template_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, + body: CreatePromptSimulationRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + """Create a new prompt-based simulation run. + + Request Body: + - name: Name of the simulation run + - description: Optional description + - prompt_version_id: The prompt version to use + - scenario_ids: List of scenario IDs to run + - dataset_row_ids: Optional list of specific row IDs + - evaluations_config: Optional evaluation configurations + - enable_tool_evaluation: Optional boolean to enable tool evaluation + + Args: + prompt_template_id (str): + body (CreatePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, + body: CreatePromptSimulationRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationRunResponse + | None +): + """Create a new prompt-based simulation run. + + Request Body: + - name: Name of the simulation run + - description: Optional description + - prompt_version_id: The prompt version to use + - scenario_ids: List of scenario IDs to run + - dataset_row_ids: Optional list of specific row IDs + - evaluations_config: Optional evaluation configurations + - enable_tool_evaluation: Optional boolean to enable tool evaluation + + Args: + prompt_template_id (str): + body (CreatePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse + """ + + return ( + await asyncio_detailed( + prompt_template_id=prompt_template_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_delete.py b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_delete.py new file mode 100644 index 0000000..6ae6d0c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_delete.py @@ -0,0 +1,177 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + prompt_template_id: str, + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/".format( + prompt_template_id=quote(str(prompt_template_id), safe=""), + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ApiTextErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ApiTextErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiTextErrorResponse | ManagementAPIErrorResponse]: + """Soft delete a prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiTextErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiTextErrorResponse | ManagementAPIErrorResponse | None: + """Soft delete a prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiTextErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiTextErrorResponse | ManagementAPIErrorResponse]: + """Soft delete a prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiTextErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiTextErrorResponse | ManagementAPIErrorResponse | None: + """Soft delete a prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiTextErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_execute_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_execute_create.py new file mode 100644 index 0000000..0575f95 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_execute_create.py @@ -0,0 +1,239 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.execute_prompt_simulation_request import ExecutePromptSimulationRequest +from ...models.execute_prompt_simulation_response import ExecutePromptSimulationResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + prompt_template_id: str, + run_test_id: str, + *, + body: ExecutePromptSimulationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/".format( + prompt_template_id=quote(str(prompt_template_id), safe=""), + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = ExecutePromptSimulationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecutePromptSimulationRequest, +) -> Response[ + ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse +]: + """Execute a prompt-based simulation run. + + Request Body (optional): + - scenario_ids: List of specific scenario IDs to run (default: all scenarios) + - select_all: If true, run all scenarios except ones in scenario_ids + + Args: + prompt_template_id (str): + run_test_id (str): + body (ExecutePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecutePromptSimulationRequest, +) -> ( + ApiTextErrorResponse + | ExecutePromptSimulationResponse + | ManagementAPIErrorResponse + | None +): + """Execute a prompt-based simulation run. + + Request Body (optional): + - scenario_ids: List of specific scenario IDs to run (default: all scenarios) + - select_all: If true, run all scenarios except ones in scenario_ids + + Args: + prompt_template_id (str): + run_test_id (str): + body (ExecutePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecutePromptSimulationRequest, +) -> Response[ + ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse +]: + """Execute a prompt-based simulation run. + + Request Body (optional): + - scenario_ids: List of specific scenario IDs to run (default: all scenarios) + - select_all: If true, run all scenarios except ones in scenario_ids + + Args: + prompt_template_id (str): + run_test_id (str): + body (ExecutePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecutePromptSimulationRequest, +) -> ( + ApiTextErrorResponse + | ExecutePromptSimulationResponse + | ManagementAPIErrorResponse + | None +): + """Execute a prompt-based simulation run. + + Request Body (optional): + - scenario_ids: List of specific scenario IDs to run (default: all scenarios) + - select_all: If true, run all scenarios except ones in scenario_ids + + Args: + prompt_template_id (str): + run_test_id (str): + body (ExecutePromptSimulationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ExecutePromptSimulationResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_list.py new file mode 100644 index 0000000..fcba48c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_list.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_simulation_list_response import PromptSimulationListResponse +from ...types import Response + + +def _get_kwargs( + prompt_template_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/prompt-templates/{prompt_template_id}/simulations/".format( + prompt_template_id=quote(str(prompt_template_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse: + if response.status_code == 200: + response_200 = PromptSimulationListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse +]: + """Get paginated list of simulation runs for a specific prompt template. + + Query Parameters: + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - version_id: filter by specific prompt version + + Args: + prompt_template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationListResponse + | None +): + """Get paginated list of simulation runs for a specific prompt template. + + Query Parameters: + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - version_id: filter by specific prompt version + + Args: + prompt_template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse + """ + + return sync_detailed( + prompt_template_id=prompt_template_id, + client=client, + ).parsed + + +async def asyncio_detailed( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse +]: + """Get paginated list of simulation runs for a specific prompt template. + + Query Parameters: + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - version_id: filter by specific prompt version + + Args: + prompt_template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_template_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationListResponse + | None +): + """Get paginated list of simulation runs for a specific prompt template. + + Query Parameters: + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - version_id: filter by specific prompt version + + Args: + prompt_template_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationListResponse + """ + + return ( + await asyncio_detailed( + prompt_template_id=prompt_template_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_partial_update.py b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_partial_update.py new file mode 100644 index 0000000..d6c389c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_partial_update.py @@ -0,0 +1,221 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_simulation_run_response import PromptSimulationRunResponse +from ...models.prompt_simulation_update_request import PromptSimulationUpdateRequest +from ...types import Response + + +def _get_kwargs( + prompt_template_id: str, + run_test_id: str, + *, + body: PromptSimulationUpdateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/".format( + prompt_template_id=quote(str(prompt_template_id), safe=""), + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse: + if response.status_code == 200: + response_200 = PromptSimulationRunResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptSimulationUpdateRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + """Update a prompt simulation run (version, scenarios, etc.). + + Args: + prompt_template_id (str): + run_test_id (str): + body (PromptSimulationUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptSimulationUpdateRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationRunResponse + | None +): + """Update a prompt simulation run (version, scenarios, etc.). + + Args: + prompt_template_id (str): + run_test_id (str): + body (PromptSimulationUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse + """ + + return sync_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptSimulationUpdateRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + """Update a prompt simulation run (version, scenarios, etc.). + + Args: + prompt_template_id (str): + run_test_id (str): + body (PromptSimulationUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: PromptSimulationUpdateRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationRunResponse + | None +): + """Update a prompt simulation run (version, scenarios, etc.). + + Args: + prompt_template_id (str): + run_test_id (str): + body (PromptSimulationUpdateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse + """ + + return ( + await asyncio_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_read.py b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_read.py new file mode 100644 index 0000000..af7f955 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_prompt_templates_simulations_read.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.prompt_simulation_run_response import PromptSimulationRunResponse +from ...types import Response + + +def _get_kwargs( + prompt_template_id: str, + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/".format( + prompt_template_id=quote(str(prompt_template_id), safe=""), + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse: + if response.status_code == 200: + response_200 = PromptSimulationRunResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + """Retrieve a specific prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationRunResponse + | None +): + """Retrieve a specific prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse + """ + + return sync_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse +]: + """Retrieve a specific prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse] + """ + + kwargs = _get_kwargs( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + prompt_template_id: str, + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | PromptSimulationRunResponse + | None +): + """Retrieve a specific prompt simulation run. + + Args: + prompt_template_id (str): + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | PromptSimulationRunResponse + """ + + return ( + await asyncio_detailed( + prompt_template_id=prompt_template_id, + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_active_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_active_list.py new file mode 100644 index 0000000..8ab8e1e --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_active_list.py @@ -0,0 +1,138 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.all_active_tests import AllActiveTests +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/active/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AllActiveTests | ErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AllActiveTests.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AllActiveTests | ErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[AllActiveTests | ErrorResponse | ManagementAPIErrorResponse]: + """Get all active tests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AllActiveTests | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> AllActiveTests | ErrorResponse | ManagementAPIErrorResponse | None: + """Get all active tests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AllActiveTests | ErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[AllActiveTests | ErrorResponse | ManagementAPIErrorResponse]: + """Get all active tests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AllActiveTests | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> AllActiveTests | ErrorResponse | ManagementAPIErrorResponse | None: + """Get all active tests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AllActiveTests | ErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_chat_execute_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_chat_execute_create.py new file mode 100644 index 0000000..14d0c3e --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_chat_execute_create.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_chat_execution_response import RunTestChatExecutionResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/{run_test_id}/chat-execute/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse: + if response.status_code == 200: + response_200 = RunTestChatExecutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse +]: + """Execute a test run + + Args: + run_test_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | RunTestChatExecutionResponse + | None +): + """Execute a test run + + Args: + run_test_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse +]: + """Execute a test run + + Args: + run_test_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | RunTestChatExecutionResponse + | None +): + """Execute a test run + + Args: + run_test_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestChatExecutionResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_components_partial_update.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_components_partial_update.py new file mode 100644 index 0000000..c03f4d1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_components_partial_update.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_components_update import RunTestComponentsUpdate +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_response import RunTestResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: RunTestComponentsUpdate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/simulate/run-tests/{run_test_id}/components/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse: + if response.status_code == 200: + response_200 = RunTestResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = RunTestErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunTestComponentsUpdate, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Update components of a specific RunTest + + Args: + run_test_id (str): + body (RunTestComponentsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunTestComponentsUpdate, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Update components of a specific RunTest + + Args: + run_test_id (str): + body (RunTestComponentsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunTestComponentsUpdate, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Update components of a specific RunTest + + Args: + run_test_id (str): + body (RunTestComponentsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: RunTestComponentsUpdate, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Update components of a specific RunTest + + Args: + run_test_id (str): + body (RunTestComponentsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_delete.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_delete.py new file mode 100644 index 0000000..5e7d2ee --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_delete.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/run-tests/{run_test_id}/delete/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Delete a specific run test + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Delete a specific run test + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Delete a specific run test + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Delete a specific run test + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_test_executions_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_test_executions_create.py new file mode 100644 index 0000000..692915e --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_delete_test_executions_create.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_bulk_delete import TestExecutionBulkDelete +from ...models.test_execution_bulk_delete_response import ( + TestExecutionBulkDeleteResponse, +) +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: TestExecutionBulkDelete, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/{run_test_id}/delete-test-executions/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionBulkDeleteResponse +): + if response.status_code == 200: + response_200 = TestExecutionBulkDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionBulkDeleteResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionBulkDelete, +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionBulkDeleteResponse +]: + """Delete multiple test executions within a run test. + + Args: + run_test_id (str): + body (TestExecutionBulkDelete): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionBulkDeleteResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionBulkDelete, +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionBulkDeleteResponse + | None +): + """Delete multiple test executions within a run test. + + Args: + run_test_id (str): + body (TestExecutionBulkDelete): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionBulkDeleteResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionBulkDelete, +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionBulkDeleteResponse +]: + """Delete multiple test executions within a run test. + + Args: + run_test_id (str): + body (TestExecutionBulkDelete): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionBulkDeleteResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionBulkDelete, +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionBulkDeleteResponse + | None +): + """Delete multiple test executions within a run test. + + Args: + run_test_id (str): + body (TestExecutionBulkDelete): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionBulkDeleteResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_eval_configs_get_structure_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_eval_configs_get_structure_list.py new file mode 100644 index 0000000..0d67fff --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_eval_configs_get_structure_list.py @@ -0,0 +1,189 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.eval_config_structure_response import EvalConfigStructureResponse +from ...models.eval_error_response import EvalErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + eval_config_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/".format( + run_test_id=quote(str(run_test_id), safe=""), + eval_config_id=quote(str(eval_config_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = EvalConfigStructureResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = EvalErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = EvalErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Get the structure of an evaluation config + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse | None +): + """Get the structure of an evaluation config + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse +]: + """Get the structure of an evaluation config + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + eval_config_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse | None +): + """Get the structure of an evaluation config + + Args: + run_test_id (str): + eval_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EvalConfigStructureResponse | EvalErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + eval_config_id=eval_config_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_get_id_by_name_read.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_get_id_by_name_read.py new file mode 100644 index 0000000..29221c7 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_get_id_by_name_read.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_name_response import RunTestNameResponse +from ...types import Response + + +def _get_kwargs( + run_test_name: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/get-id-by-name/{run_test_name}/".format( + run_test_name=quote(str(run_test_name), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse: + if response.status_code == 200: + response_200 = RunTestNameResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_name: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse]: + """API View to get the id of a run test by name + + Args: + run_test_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_name: str, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse | None: + """API View to get the id of a run test by name + + Args: + run_test_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse + """ + + return sync_detailed( + run_test_name=run_test_name, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_name: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse]: + """API View to get the id of a run test by name + + Args: + run_test_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_name: str, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse | None: + """API View to get the id of a run test by name + + Args: + run_test_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | RunTestNameResponse + """ + + return ( + await asyncio_detailed( + run_test_name=run_test_name, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_rerun_test_executions_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_rerun_test_executions_create.py new file mode 100644 index 0000000..967fcff --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_rerun_test_executions_create.py @@ -0,0 +1,228 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_rerun import TestExecutionRerun +from ...models.test_execution_rerun_response import TestExecutionRerunResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: TestExecutionRerun, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/{run_test_id}/rerun-test-executions/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionRerunResponse +): + if response.status_code == 200: + response_200 = TestExecutionRerunResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionRerunResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionRerun, +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionRerunResponse +]: + """Rerun multiple test executions (either evaluation only or call + evaluation). + All call executions within each test execution are rerun. + + Args: + run_test_id (str): + body (TestExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionRerunResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionRerun, +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionRerunResponse + | None +): + """Rerun multiple test executions (either evaluation only or call + evaluation). + All call executions within each test execution are rerun. + + Args: + run_test_id (str): + body (TestExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionRerunResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionRerun, +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionRerunResponse +]: + """Rerun multiple test executions (either evaluation only or call + evaluation). + All call executions within each test execution are rerun. + + Args: + run_test_id (str): + body (TestExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionRerunResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionRerun, +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionRerunResponse + | None +): + """Rerun multiple test executions (either evaluation only or call + evaluation). + All call executions within each test execution are rerun. + + Args: + run_test_id (str): + body (TestExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionRerunResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_scenarios_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_scenarios_list.py new file mode 100644 index 0000000..b88761c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_scenarios_list.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_scenario_item_response import RunTestScenarioItemResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/scenarios/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[RunTestScenarioItemResponse] +): + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = RunTestScenarioItemResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[RunTestScenarioItemResponse] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[RunTestScenarioItemResponse] +]: + """Get paginated list of scenarios for a specific run test + Query Parameters: + - search: search string to filter scenarios by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestScenarioItemResponse]] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[RunTestScenarioItemResponse] + | None +): + """Get paginated list of scenarios for a specific run test + Query Parameters: + - search: search string to filter scenarios by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestScenarioItemResponse] + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[RunTestScenarioItemResponse] +]: + """Get paginated list of scenarios for a specific run test + Query Parameters: + - search: search string to filter scenarios by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestScenarioItemResponse]] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[RunTestScenarioItemResponse] + | None +): + """Get paginated list of scenarios for a specific run test + Query Parameters: + - search: search string to filter scenarios by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestScenarioItemResponse] + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_sdk_code_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_sdk_code_list.py new file mode 100644 index 0000000..0307287 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_run_tests_sdk_code_list.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.chat_sdk_code_response import ChatSDKCodeResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/sdk-code/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ChatSDKCodeResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse]: + """Get the SDK code with placeholders filled + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse | None: + """Get the SDK code with placeholders filled + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse]: + """Get the SDK code with placeholders filled + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse | None: + """Get the SDK code with placeholders filled + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ChatSDKCodeResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_create_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_create_create.py new file mode 100644 index 0000000..d82a62c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_create_create.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulator_agent import SimulatorAgent +from ...models.simulator_agent_validation_error_response import ( + SimulatorAgentValidationErrorResponse, +) +from ...types import Response + + +def _get_kwargs( + *, + body: SimulatorAgent, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/simulator-agents/create/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +): + if response.status_code == 201: + response_201 = SimulatorAgent.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = SimulatorAgentValidationErrorResponse.from_dict(response.json()) + + return response_400 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> Response[ + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +]: + """Create a new simulator agent + + Args: + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> ( + ManagementAPIErrorResponse + | SimulatorAgent + | SimulatorAgentValidationErrorResponse + | None +): + """Create a new simulator agent + + Args: + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> Response[ + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +]: + """Create a new simulator agent + + Args: + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> ( + ManagementAPIErrorResponse + | SimulatorAgent + | SimulatorAgentValidationErrorResponse + | None +): + """Create a new simulator agent + + Args: + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_delete_delete.py b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_delete_delete.py new file mode 100644 index 0000000..ba74e41 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_delete_delete.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulator_agent_delete_response import SimulatorAgentDeleteResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/simulator-agents/{agent_id}/delete/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentDeleteResponse +): + if response.status_code == 200: + response_200 = SimulatorAgentDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentDeleteResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentDeleteResponse +]: + """Soft delete a simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentDeleteResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentDeleteResponse + | None +): + """Soft delete a simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentDeleteResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentDeleteResponse +]: + """Soft delete a simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentDeleteResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentDeleteResponse + | None +): + """Soft delete a simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentDeleteResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_edit_update.py b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_edit_update.py new file mode 100644 index 0000000..a220ed6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_edit_update.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulator_agent import SimulatorAgent +from ...models.simulator_agent_validation_error_response import ( + SimulatorAgentValidationErrorResponse, +) +from ...types import Response + + +def _get_kwargs( + agent_id: str, + *, + body: SimulatorAgent, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/simulate/simulator-agents/{agent_id}/edit/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +): + if response.status_code == 200: + response_200 = SimulatorAgent.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SimulatorAgentValidationErrorResponse.from_dict(response.json()) + + return response_400 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> Response[ + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +]: + """Edit an existing simulator agent + + Args: + agent_id (str): + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> ( + ManagementAPIErrorResponse + | SimulatorAgent + | SimulatorAgentValidationErrorResponse + | None +): + """Edit an existing simulator agent + + Args: + agent_id (str): + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> Response[ + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse +]: + """Edit an existing simulator agent + + Args: + agent_id (str): + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: SimulatorAgent, +) -> ( + ManagementAPIErrorResponse + | SimulatorAgent + | SimulatorAgentValidationErrorResponse + | None +): + """Edit an existing simulator agent + + Args: + agent_id (str): + body (SimulatorAgent): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SimulatorAgent | SimulatorAgentValidationErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_list.py new file mode 100644 index 0000000..b04e111 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_list.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulator_agent_list_response import SimulatorAgentListResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/simulator-agents/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentListResponse +): + if response.status_code == 200: + response_200 = SimulatorAgentListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentListResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentListResponse +]: + """List simulator agents with pagination and search + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentListResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentListResponse + | None +): + """List simulator agents with pagination and search + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentListResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentListResponse +]: + """List simulator agents with pagination and search + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentListResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | SimulatorAgentListResponse + | None +): + """List simulator agents with pagination and search + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgentListResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_read.py b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_read.py new file mode 100644 index 0000000..69c4585 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_simulator_agents_read.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.simulator_agent import SimulatorAgent +from ...types import Response + + +def _get_kwargs( + agent_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/simulator-agents/{agent_id}/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent: + if response.status_code == 200: + response_200 = SimulatorAgent.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent +]: + """Get details of a specific simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent | None: + """Get details of a specific simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent +]: + """Get details of a specific simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent | None: + """Get details of a specific simulator agent + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | SimulatorAgent + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_chat_call_executions_batch_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_chat_call_executions_batch_create.py new file mode 100644 index 0000000..f4d5866 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_chat_call_executions_batch_create.py @@ -0,0 +1,242 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_chat_batch_response import TestExecutionChatBatchResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/test-executions/{test_execution_id}/chat/call-executions/batch/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse: + if response.status_code == 200: + response_200 = TestExecutionChatBatchResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse +]: + """Create a batch of CallExecution records for chat execution (exactly 10 per API call). + + This follows the same flow as inbound/outbound calls: + 1. Resolve SimulatorAgent (scenario > run_test > fallback) + 2. Extract base_prompt from SimulatorAgent + 3. Handle dataset scenarios (create one CallExecution per row) + 4. Enhance prompt with row data if applicable + 5. Store proper metadata in CallExecution + + Returns exactly 10 CallExecution objects per API call. + hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | TestExecutionChatBatchResponse + | None +): + """Create a batch of CallExecution records for chat execution (exactly 10 per API call). + + This follows the same flow as inbound/outbound calls: + 1. Resolve SimulatorAgent (scenario > run_test > fallback) + 2. Extract base_prompt from SimulatorAgent + 3. Handle dataset scenarios (create one CallExecution per row) + 4. Enhance prompt with row data if applicable + 5. Store proper metadata in CallExecution + + Returns exactly 10 CallExecution objects per API call. + hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse +]: + """Create a batch of CallExecution records for chat execution (exactly 10 per API call). + + This follows the same flow as inbound/outbound calls: + 1. Resolve SimulatorAgent (scenario > run_test > fallback) + 2. Extract base_prompt from SimulatorAgent + 3. Handle dataset scenarios (create one CallExecution per row) + 4. Enhance prompt with row data if applicable + 5. Store proper metadata in CallExecution + + Returns exactly 10 CallExecution objects per API call. + hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | TestExecutionChatBatchResponse + | None +): + """Create a batch of CallExecution records for chat execution (exactly 10 per API call). + + This follows the same flow as inbound/outbound calls: + 1. Resolve SimulatorAgent (scenario > run_test > fallback) + 2. Extract base_prompt from SimulatorAgent + 3. Handle dataset scenarios (create one CallExecution per row) + 4. Enhance prompt with row data if applicable + 5. Store proper metadata in CallExecution + + Returns exactly 10 CallExecution objects per API call. + hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | TestExecutionChatBatchResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_column_order_update.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_column_order_update.py new file mode 100644 index 0000000..a7e27ed --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_column_order_update.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_column_order import TestExecutionColumnOrder +from ...models.test_execution_column_order_response import ( + TestExecutionColumnOrderResponse, +) +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, + *, + body: TestExecutionColumnOrder, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/simulate/test-executions/{test_execution_id}/column-order/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionColumnOrderResponse +): + if response.status_code == 200: + response_200 = TestExecutionColumnOrderResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionColumnOrderResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionColumnOrder, +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionColumnOrderResponse +]: + """Update column order for a test execution + + Args: + test_execution_id (str): + body (TestExecutionColumnOrder): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionColumnOrderResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionColumnOrder, +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionColumnOrderResponse + | None +): + """Update column order for a test execution + + Args: + test_execution_id (str): + body (TestExecutionColumnOrder): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionColumnOrderResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionColumnOrder, +) -> Response[ + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionColumnOrderResponse +]: + """Update column order for a test execution + + Args: + test_execution_id (str): + body (TestExecutionColumnOrder): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionColumnOrderResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: TestExecutionColumnOrder, +) -> ( + ApiTextErrorResponse + | ErrorResponse + | ManagementAPIErrorResponse + | TestExecutionColumnOrderResponse + | None +): + """Update column order for a test execution + + Args: + test_execution_id (str): + body (TestExecutionColumnOrder): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | TestExecutionColumnOrderResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_delete_delete.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_delete_delete.py new file mode 100644 index 0000000..0479b89 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_delete_delete.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/test-executions/{test_execution_id}/delete/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Delete a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Delete a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Delete a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Delete a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiTextErrorResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_list.py new file mode 100644 index 0000000..addbc45 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_list.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.eval_explanation_summary_response import EvalExplanationSummaryResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = EvalExplanationSummaryResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse +]: + """Fetch the evaluation explanation summary from the database. + If not present, trigger async calculation and return empty response. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse | None: + """Fetch the evaluation explanation summary from the database. + If not present, trigger async calculation and return empty response. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse +]: + """Fetch the evaluation explanation summary from the database. + If not present, trigger async calculation and return empty response. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse | None: + """Fetch the evaluation explanation summary from the database. + If not present, trigger async calculation and return empty response. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | EvalExplanationSummaryResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_refresh_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_refresh_create.py new file mode 100644 index 0000000..aa84c38 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_eval_explanation_summary_refresh_create.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.empty_request import EmptyRequest +from ...models.eval_explanation_summary_refresh_response import ( + EvalExplanationSummaryRefreshResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse + | EvalExplanationSummaryRefreshResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = EvalExplanationSummaryRefreshResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse + | EvalExplanationSummaryRefreshResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse + | EvalExplanationSummaryRefreshResponse + | ManagementAPIErrorResponse +]: + """Refresh the evaluation explanation summary by recalculating it. + This endpoint triggers the summary calculation task again. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | EvalExplanationSummaryRefreshResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | EvalExplanationSummaryRefreshResponse + | ManagementAPIErrorResponse + | None +): + """Refresh the evaluation explanation summary by recalculating it. + This endpoint triggers the summary calculation task again. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | EvalExplanationSummaryRefreshResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse + | EvalExplanationSummaryRefreshResponse + | ManagementAPIErrorResponse +]: + """Refresh the evaluation explanation summary by recalculating it. + This endpoint triggers the summary calculation task again. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | EvalExplanationSummaryRefreshResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | EvalExplanationSummaryRefreshResponse + | ManagementAPIErrorResponse + | None +): + """Refresh the evaluation explanation summary by recalculating it. + This endpoint triggers the summary calculation task again. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | EvalExplanationSummaryRefreshResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_list.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_list.py new file mode 100644 index 0000000..004135e --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_list.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.optimiser_analysis_response import OptimiserAnalysisResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/test-executions/{test_execution_id}/optimiser-analysis/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse: + if response.status_code == 200: + response_200 = OptimiserAnalysisResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse +]: + """Fetch the agent optimiser analysis for a test execution. + If not present or pending, returns status information. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse | None +): + """Fetch the agent optimiser analysis for a test execution. + If not present or pending, returns status information. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse +]: + """Fetch the agent optimiser analysis for a test execution. + If not present or pending, returns status information. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse | None +): + """Fetch the agent optimiser analysis for a test execution. + If not present or pending, returns status information. + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_refresh_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_refresh_create.py new file mode 100644 index 0000000..b66a6d6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_optimiser_analysis_refresh_create.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_text_error_response import ApiTextErrorResponse +from ...models.empty_request import EmptyRequest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.optimiser_analysis_refresh_response import ( + OptimiserAnalysisRefreshResponse, +) +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse +): + if response.status_code == 200: + response_200 = OptimiserAnalysisRefreshResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiTextErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiTextErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiTextErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse +]: + """Trigger a new agent optimiser analysis run. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | OptimiserAnalysisRefreshResponse + | None +): + """Trigger a new agent optimiser analysis run. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[ + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse +]: + """Trigger a new agent optimiser analysis run. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> ( + ApiTextErrorResponse + | ManagementAPIErrorResponse + | OptimiserAnalysisRefreshResponse + | None +): + """Trigger a new agent optimiser analysis run. + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiTextErrorResponse | ManagementAPIErrorResponse | OptimiserAnalysisRefreshResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_rerun_calls_create.py b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_rerun_calls_create.py new file mode 100644 index 0000000..1b8f253 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulate/simulate_test_executions_rerun_calls_create.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution_rerun import CallExecutionRerun +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.rerun_calls_response import RerunCallsResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, + *, + body: CallExecutionRerun, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/test-executions/{test_execution_id}/rerun-calls/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse: + if response.status_code == 200: + response_200 = RerunCallsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionRerun, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse]: + """Rerun multiple call executions (either evaluation only or call + evaluation) + + Args: + test_execution_id (str): + body (CallExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionRerun, +) -> ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse | None: + """Rerun multiple call executions (either evaluation only or call + evaluation) + + Args: + test_execution_id (str): + body (CallExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionRerun, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse]: + """Rerun multiple call executions (either evaluation only or call + evaluation) + + Args: + test_execution_id (str): + body (CallExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: CallExecutionRerun, +) -> ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse | None: + """Rerun multiple call executions (either evaluation only or call + evaluation) + + Args: + test_execution_id (str): + body (CallExecutionRerun): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | RerunCallsResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_agent_definitions/__init__.py b/python/fi/generated/openapi_client/api/simulation_agent_definitions/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_agent_definitions/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/simulation_agent_definitions/create_agent_definition.py b/python/fi/generated/openapi_client/api/simulation_agent_definitions/create_agent_definition.py new file mode 100644 index 0000000..3a6de7a --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_agent_definitions/create_agent_definition.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_create_request import AgentDefinitionCreateRequest +from ...models.agent_definition_create_response import AgentDefinitionCreateResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: AgentDefinitionCreateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/agent-definitions/create/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentDefinitionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 201: + response_201 = AgentDefinitionCreateResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentDefinitionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionCreateRequest, +) -> Response[ + AgentDefinitionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Create a new agent definition with its first version. + + Args: + body (AgentDefinitionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionCreateRequest, +) -> ( + AgentDefinitionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Create a new agent definition with its first version. + + Args: + body (AgentDefinitionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionCreateRequest, +) -> Response[ + AgentDefinitionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Create a new agent definition with its first version. + + Args: + body (AgentDefinitionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionCreateRequest, +) -> ( + AgentDefinitionCreateResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Create a new agent definition with its first version. + + Args: + body (AgentDefinitionCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionCreateResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_agent_definitions/delete_agent_definition.py b/python/fi/generated/openapi_client/api/simulation_agent_definitions/delete_agent_definition.py new file mode 100644 index 0000000..409fa0d --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_agent_definitions/delete_agent_definition.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_delete_response import AgentDefinitionDeleteResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/agent-definitions/{agent_id}/delete/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentDefinitionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = AgentDefinitionDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentDefinitionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentDefinitionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Soft delete an agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentDefinitionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Soft delete an agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentDefinitionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Soft delete an agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentDefinitionDeleteResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Soft delete an agent definition. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionDeleteResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_agent_definitions/get_agent_definition.py b/python/fi/generated/openapi_client/api/simulation_agent_definitions/get_agent_definition.py new file mode 100644 index 0000000..b060b58 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_agent_definitions/get_agent_definition.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_response import AgentDefinitionResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/agent-definitions/{agent_id}/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = AgentDefinitionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse +]: + """Get details of a specific agent definition with version information. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentDefinitionResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Get details of a specific agent definition with version information. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse +]: + """Get details of a specific agent definition with version information. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + AgentDefinitionResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Get details of a specific agent definition with version information. + + Args: + agent_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_agent_definitions/list_agent_definitions.py b/python/fi/generated/openapi_client/api/simulation_agent_definitions/list_agent_definitions.py new file mode 100644 index 0000000..0c179ae --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_agent_definitions/list_agent_definitions.py @@ -0,0 +1,277 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_list_response import AgentDefinitionListResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.list_agent_definitions_agent_type import ListAgentDefinitionsAgentType +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + agent_type: ListAgentDefinitionsAgentType | Unset = UNSET, + agent_definition_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_agent_type: str | Unset = UNSET + if not isinstance(agent_type, Unset): + json_agent_type = agent_type.value + + params["agent_type"] = json_agent_type + + json_agent_definition_id: str | Unset = UNSET + if not isinstance(agent_definition_id, Unset): + json_agent_definition_id = str(agent_definition_id) + params["agent_definition_id"] = json_agent_definition_id + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/agent-definitions/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentDefinitionListResponse] +): + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AgentDefinitionListResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentDefinitionListResponse] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_type: ListAgentDefinitionsAgentType | Unset = UNSET, + agent_definition_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentDefinitionListResponse] +]: + """Get paginated list of agent definitions for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_type (ListAgentDefinitionsAgentType | Unset): + agent_definition_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentDefinitionListResponse]] + """ + + kwargs = _get_kwargs( + search=search, + agent_type=agent_type, + agent_definition_id=agent_definition_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_type: ListAgentDefinitionsAgentType | Unset = UNSET, + agent_definition_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentDefinitionListResponse] + | None +): + """Get paginated list of agent definitions for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_type (ListAgentDefinitionsAgentType | Unset): + agent_definition_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentDefinitionListResponse] + """ + + return sync_detailed( + client=client, + search=search, + agent_type=agent_type, + agent_definition_id=agent_definition_id, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_type: ListAgentDefinitionsAgentType | Unset = UNSET, + agent_definition_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentDefinitionListResponse] +]: + """Get paginated list of agent definitions for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_type (ListAgentDefinitionsAgentType | Unset): + agent_definition_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentDefinitionListResponse]] + """ + + kwargs = _get_kwargs( + search=search, + agent_type=agent_type, + agent_definition_id=agent_definition_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_type: ListAgentDefinitionsAgentType | Unset = UNSET, + agent_definition_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | list[AgentDefinitionListResponse] + | None +): + """Get paginated list of agent definitions for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_type (ListAgentDefinitionsAgentType | Unset): + agent_definition_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | list[AgentDefinitionListResponse] + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + agent_type=agent_type, + agent_definition_id=agent_definition_id, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_agent_definitions/update_agent_definition.py b/python/fi/generated/openapi_client/api/simulation_agent_definitions/update_agent_definition.py new file mode 100644 index 0000000..2e0fb9d --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_agent_definitions/update_agent_definition.py @@ -0,0 +1,217 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.agent_definition_edit_request import AgentDefinitionEditRequest +from ...models.agent_definition_edit_response import AgentDefinitionEditResponse +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + agent_id: str, + *, + body: AgentDefinitionEditRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/simulate/agent-definitions/{agent_id}/edit/".format( + agent_id=quote(str(agent_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AgentDefinitionEditResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +): + if response.status_code == 200: + response_200 = AgentDefinitionEditResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AgentDefinitionEditResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionEditRequest, +) -> Response[ + AgentDefinitionEditResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Update an existing agent definition. + + Args: + agent_id (str): + body (AgentDefinitionEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionEditResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionEditRequest, +) -> ( + AgentDefinitionEditResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Update an existing agent definition. + + Args: + agent_id (str): + body (AgentDefinitionEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionEditResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + agent_id=agent_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionEditRequest, +) -> Response[ + AgentDefinitionEditResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse +]: + """Update an existing agent definition. + + Args: + agent_id (str): + body (AgentDefinitionEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentDefinitionEditResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + agent_id=agent_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + agent_id: str, + *, + client: AuthenticatedClient | Client, + body: AgentDefinitionEditRequest, +) -> ( + AgentDefinitionEditResponse + | ApiErrorWithDetailsResponse + | ManagementAPIErrorResponse + | None +): + """Update an existing agent definition. + + Args: + agent_id (str): + body (AgentDefinitionEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentDefinitionEditResponse | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + agent_id=agent_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_personas/__init__.py b/python/fi/generated/openapi_client/api/simulation_personas/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_personas/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/simulation_personas/create_persona.py b/python/fi/generated/openapi_client/api/simulation_personas/create_persona.py new file mode 100644 index 0000000..5856b3b --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_personas/create_persona.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.persona_create import PersonaCreate +from ...types import Response + + +def _get_kwargs( + *, + body: PersonaCreate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/api/personas/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate: + if response.status_code == 201: + response_201 = PersonaCreate.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: PersonaCreate, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate]: + """Create a new workspace-level persona + + Args: + body (PersonaCreate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: PersonaCreate, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate | None: + """Create a new workspace-level persona + + Args: + body (PersonaCreate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: PersonaCreate, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate]: + """Create a new workspace-level persona + + Args: + body (PersonaCreate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: PersonaCreate, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate | None: + """Create a new workspace-level persona + + Args: + body (PersonaCreate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | PersonaCreate + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_personas/delete_persona.py b/python/fi/generated/openapi_client/api/simulation_personas/delete_persona.py new file mode 100644 index 0000000..cde4570 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_personas/delete_persona.py @@ -0,0 +1,168 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/api/personas/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 403: + response_403 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse]: + """Delete a persona (workspace-level only) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | None: + """Delete a persona (workspace-level only) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse]: + """Delete a persona (workspace-level only) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | None: + """Delete a persona (workspace-level only) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ApiErrorWithDetailsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_personas/get_persona.py b/python/fi/generated/openapi_client/api/simulation_personas/get_persona.py new file mode 100644 index 0000000..8890266 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_personas/get_persona.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.persona import Persona +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/personas/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona: + if response.status_code == 200: + response_200 = Persona.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + """Retrieve a specific persona + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona | None: + """Retrieve a specific persona + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + """Retrieve a specific persona + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona | None: + """Retrieve a specific persona + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_personas/list_personas.py b/python/fi/generated/openapi_client/api/simulation_personas/list_personas.py new file mode 100644 index 0000000..302ada6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_personas/list_personas.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.list_personas_response_200 import ListPersonasResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/personas/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListPersonasResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse +]: + """List personas with pagination + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ListPersonasResponse200 + | ManagementAPIErrorResponse + | None +): + """List personas with pagination + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse +]: + """List personas with pagination + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ApiErrorWithDetailsResponse + | ListPersonasResponse200 + | ManagementAPIErrorResponse + | None +): + """List personas with pagination + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ListPersonasResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_personas/update_persona.py b/python/fi/generated/openapi_client/api/simulation_personas/update_persona.py new file mode 100644 index 0000000..66de243 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_personas/update_persona.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_with_details_response import ApiErrorWithDetailsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.persona import Persona +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: Persona, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/simulate/api/personas/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona: + if response.status_code == 200: + response_200 = Persona.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorWithDetailsResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + """ViewSet for managing Personas. + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona | None: + """ViewSet for managing Personas. + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona]: + """ViewSet for managing Personas. + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: Persona, +) -> ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona | None: + """ViewSet for managing Personas. + + Args: + id (str): + body (Persona): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorWithDetailsResponse | ManagementAPIErrorResponse | Persona + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/__init__.py b/python/fi/generated/openapi_client/api/simulation_run_tests/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/create_run_test.py b/python/fi/generated/openapi_client/api/simulation_run_tests/create_run_test.py new file mode 100644 index 0000000..de2b64a --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/create_run_test.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.create_run_test import CreateRunTest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_response import RunTestResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CreateRunTest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/create/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse: + if response.status_code == 201: + response_201 = RunTestResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 400: + response_400 = RunTestErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateRunTest, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Create a new RunTest + + Args: + body (CreateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: CreateRunTest, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Create a new RunTest + + Args: + body (CreateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: CreateRunTest, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Create a new RunTest + + Args: + body (CreateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: CreateRunTest, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Create a new RunTest + + Args: + body (CreateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/delete_run_test.py b/python/fi/generated/openapi_client/api/simulation_run_tests/delete_run_test.py new file mode 100644 index 0000000..0ad4c9e --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/delete_run_test.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_message_response import RunTestMessageResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/run-tests/{run_test_id}/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse: + if response.status_code == 200: + response_200 = RunTestMessageResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse +]: + """Delete a specific RunTest (soft delete) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse | None: + """Delete a specific RunTest (soft delete) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse +]: + """Delete a specific RunTest (soft delete) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse | None: + """Delete a specific RunTest (soft delete) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestMessageResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/execute_run_test.py b/python/fi/generated/openapi_client/api/simulation_run_tests/execute_run_test.py new file mode 100644 index 0000000..8262858 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/execute_run_test.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.execute_run_test import ExecuteRunTest +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_execution_response import RunTestExecutionResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: ExecuteRunTest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/run-tests/{run_test_id}/execute/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse: + if response.status_code == 200: + response_200 = RunTestExecutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = RunTestErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecuteRunTest, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse +]: + """Execute a test run + + Args: + run_test_id (str): + body (ExecuteRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecuteRunTest, +) -> ( + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse | None +): + """Execute a test run + + Args: + run_test_id (str): + body (ExecuteRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecuteRunTest, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse +]: + """Execute a test run + + Args: + run_test_id (str): + body (ExecuteRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: ExecuteRunTest, +) -> ( + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse | None +): + """Execute a test run + + Args: + run_test_id (str): + body (ExecuteRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestExecutionResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test.py b/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test.py new file mode 100644 index 0000000..db5d43d --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_response import RunTestResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse: + if response.status_code == 200: + response_200 = RunTestResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Retrieve a specific RunTest + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Retrieve a specific RunTest + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Retrieve a specific RunTest + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Retrieve a specific RunTest + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_analytics.py b/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_analytics.py new file mode 100644 index 0000000..ca53a86 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_analytics.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_analytics import RunTestAnalytics +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/analytics/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics: + if response.status_code == 200: + response_200 = RunTestAnalytics.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics]: + """Get analytics data for a specific run test across multiple test executions + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics | None: + """Get analytics data for a specific run test across multiple test executions + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics]: + """Get analytics data for a specific run test across multiple test executions + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics | None: + """Get analytics data for a specific run test across multiple test executions + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | RunTestAnalytics + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_status.py b/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_status.py new file mode 100644 index 0000000..41bc53d --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/get_run_test_status.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_status_summary import TestExecutionStatusSummary +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/status/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary: + if response.status_code == 200: + response_200 = TestExecutionStatusSummary.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary]: + """Get test execution status + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary | None: + """Get test execution status + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary]: + """Get test execution status + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary | None: + """Get test execution status + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionStatusSummary + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_call_executions.py b/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_call_executions.py new file mode 100644 index 0000000..1a915be --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_call_executions.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.call_execution_error_response import CallExecutionErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_call_executions_response import RunTestCallExecutionsResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/call-executions/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | RunTestCallExecutionsResponse +): + if response.status_code == 200: + response_200 = RunTestCallExecutionsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = CallExecutionErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | RunTestCallExecutionsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | RunTestCallExecutionsResponse +]: + """Get all call executions for a specific run test with pagination and search + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + - limit: number of call executions per page (default: 10) + - page: page number for call executions (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | ManagementAPIErrorResponse | RunTestCallExecutionsResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | RunTestCallExecutionsResponse + | None +): + """Get all call executions for a specific run test with pagination and search + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + - limit: number of call executions per page (default: 10) + - page: page number for call executions (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | ManagementAPIErrorResponse | RunTestCallExecutionsResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | RunTestCallExecutionsResponse +]: + """Get all call executions for a specific run test with pagination and search + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + - limit: number of call executions per page (default: 10) + - page: page number for call executions (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CallExecutionErrorResponse | ManagementAPIErrorResponse | RunTestCallExecutionsResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + CallExecutionErrorResponse + | ManagementAPIErrorResponse + | RunTestCallExecutionsResponse + | None +): + """Get all call executions for a specific run test with pagination and search + Query Parameters: + - search: search string to filter call executions by phone number or scenario name + - status: filter by call execution status + - limit: number of call executions per page (default: 10) + - page: page number for call executions (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CallExecutionErrorResponse | ManagementAPIErrorResponse | RunTestCallExecutionsResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_executions.py b/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_executions.py new file mode 100644 index 0000000..993e951 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_test_executions.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.test_execution_item_response import TestExecutionItemResponse +from ...types import Response + + +def _get_kwargs( + run_test_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/{run_test_id}/executions/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse] +): + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = TestExecutionItemResponse.from_dict( + response_200_item_data + ) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse] +]: + """Get test execution data for a specific run test + Query Parameters: + - search: search string to filter test executions by status or scenario name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse]] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[TestExecutionItemResponse] + | None +): + """Get test execution data for a specific run test + Query Parameters: + - search: search string to filter test executions by status or scenario name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse] + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse] +]: + """Get test execution data for a specific run test + Query Parameters: + - search: search string to filter test executions by status or scenario name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse]] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ManagementAPIErrorResponse + | RunTestErrorResponse + | list[TestExecutionItemResponse] + | None +): + """Get test execution data for a specific run test + Query Parameters: + - search: search string to filter test executions by status or scenario name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Args: + run_test_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecutionItemResponse] + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_tests.py b/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_tests.py new file mode 100644 index 0000000..df1c69d --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/list_run_tests.py @@ -0,0 +1,277 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_run_tests_simulation_type import ListRunTestsSimulationType +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_response import RunTestResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + simulation_type: ListRunTestsSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_simulation_type: str | Unset = UNSET + if not isinstance(simulation_type, Unset): + json_simulation_type = simulation_type.value + + params["simulation_type"] = json_simulation_type + + json_prompt_template_id: str | Unset = UNSET + if not isinstance(prompt_template_id, Unset): + json_prompt_template_id = str(prompt_template_id) + params["prompt_template_id"] = json_prompt_template_id + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/run-tests/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = RunTestResponse.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: ListRunTestsSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] +]: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - simulation_type: filter by source type (RunTest.SourceTypes values: + 'agent_definition' or 'prompt') + - prompt_template_id: filter by prompt template ID (used when + simulation_type is 'prompt') + + Args: + search (str | Unset): Default: ''. + simulation_type (ListRunTestsSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse]] + """ + + kwargs = _get_kwargs( + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: ListRunTestsSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] | None: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - simulation_type: filter by source type (RunTest.SourceTypes values: + 'agent_definition' or 'prompt') + - prompt_template_id: filter by prompt template ID (used when + simulation_type is 'prompt') + + Args: + search (str | Unset): Default: ''. + simulation_type (ListRunTestsSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] + """ + + return sync_detailed( + client=client, + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: ListRunTestsSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] +]: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - simulation_type: filter by source type (RunTest.SourceTypes values: + 'agent_definition' or 'prompt') + - prompt_template_id: filter by prompt template ID (used when + simulation_type is 'prompt') + + Args: + search (str | Unset): Default: ''. + simulation_type (ListRunTestsSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse]] + """ + + kwargs = _get_kwargs( + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + simulation_type: ListRunTestsSimulationType | Unset = UNSET, + prompt_template_id: UUID | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] | None: + """Get paginated list of run tests for the user's organization + Query Parameters: + - search: search string to filter run tests by name + - limit: number of items per page (default: 10) + - page: page number (default: 1) + - simulation_type: filter by source type (RunTest.SourceTypes values: + 'agent_definition' or 'prompt') + - prompt_template_id: filter by prompt template ID (used when + simulation_type is 'prompt') + + Args: + search (str | Unset): Default: ''. + simulation_type (ListRunTestsSimulationType | Unset): + prompt_template_id (UUID | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[RunTestResponse] + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + simulation_type=simulation_type, + prompt_template_id=prompt_template_id, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_run_tests/update_run_test.py b/python/fi/generated/openapi_client/api/simulation_run_tests/update_run_test.py new file mode 100644 index 0000000..346bb20 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_run_tests/update_run_test.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.run_test_response import RunTestResponse +from ...models.update_run_test import UpdateRunTest +from ...types import Response + + +def _get_kwargs( + run_test_id: str, + *, + body: UpdateRunTest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/simulate/run-tests/{run_test_id}/".format( + run_test_id=quote(str(run_test_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse: + if response.status_code == 200: + response_200 = RunTestResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = RunTestErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateRunTest, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Update a specific RunTest + + Args: + run_test_id (str): + body (UpdateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateRunTest, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Update a specific RunTest + + Args: + run_test_id (str): + body (UpdateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return sync_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateRunTest, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse]: + """Update a specific RunTest + + Args: + run_test_id (str): + body (UpdateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse] + """ + + kwargs = _get_kwargs( + run_test_id=run_test_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + run_test_id: str, + *, + client: AuthenticatedClient | Client, + body: UpdateRunTest, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse | None: + """Update a specific RunTest + + Args: + run_test_id (str): + body (UpdateRunTest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | RunTestResponse + """ + + return ( + await asyncio_detailed( + run_test_id=run_test_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_scenarios/__init__.py b/python/fi/generated/openapi_client/api/simulation_scenarios/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_scenarios/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/simulation_scenarios/create_scenario.py b/python/fi/generated/openapi_client/api/simulation_scenarios/create_scenario.py new file mode 100644 index 0000000..43d4df2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_scenarios/create_scenario.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_create_request import ScenarioCreateRequest +from ...models.scenario_create_response import ScenarioCreateResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ScenarioCreateRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/scenarios/create/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse: + if response.status_code == 202: + response_202 = ScenarioCreateResponse.from_dict(response.json()) + + return response_202 + + if response.status_code == 400: + response_400 = ScenarioErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: ScenarioCreateRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse +]: + """Create scenario + + Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + + Args: + body (ScenarioCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: ScenarioCreateRequest, +) -> ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse | None: + """Create scenario + + Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + + Args: + body (ScenarioCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: ScenarioCreateRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse +]: + """Create scenario + + Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + + Args: + body (ScenarioCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: ScenarioCreateRequest, +) -> ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse | None: + """Create scenario + + Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + + Args: + body (ScenarioCreateRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioCreateResponse | ScenarioErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_scenarios/delete_scenario.py b/python/fi/generated/openapi_client/api/simulation_scenarios/delete_scenario.py new file mode 100644 index 0000000..23e0d98 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_scenarios/delete_scenario.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_delete_response import ScenarioDeleteResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...types import Response + + +def _get_kwargs( + scenario_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/simulate/scenarios/{scenario_id}/delete/".format( + scenario_id=quote(str(scenario_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse: + if response.status_code == 200: + response_200 = ScenarioDeleteResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse +]: + """Delete scenario + + Soft-deletes a scenario by setting deleted=True. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse | None: + """Delete scenario + + Soft-deletes a scenario by setting deleted=True. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse + """ + + return sync_detailed( + scenario_id=scenario_id, + client=client, + ).parsed + + +async def asyncio_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse +]: + """Delete scenario + + Soft-deletes a scenario by setting deleted=True. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse | None: + """Delete scenario + + Soft-deletes a scenario by setting deleted=True. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioDeleteResponse | ScenarioErrorResponse + """ + + return ( + await asyncio_detailed( + scenario_id=scenario_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_scenarios/get_scenario.py b/python/fi/generated/openapi_client/api/simulation_scenarios/get_scenario.py new file mode 100644 index 0000000..678d2ed --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_scenarios/get_scenario.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_detail_response import ScenarioDetailResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...types import Response + + +def _get_kwargs( + scenario_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/scenarios/{scenario_id}/".format( + scenario_id=quote(str(scenario_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse: + if response.status_code == 200: + response_200 = ScenarioDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse +]: + """Get scenario detail + + Returns full detail of a specific scenario including graph data and prompts. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse | None: + """Get scenario detail + + Returns full detail of a specific scenario including graph data and prompts. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse + """ + + return sync_detailed( + scenario_id=scenario_id, + client=client, + ).parsed + + +async def asyncio_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse +]: + """Get scenario detail + + Returns full detail of a specific scenario including graph data and prompts. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + scenario_id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse | None: + """Get scenario detail + + Returns full detail of a specific scenario including graph data and prompts. + + Args: + scenario_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioDetailResponse | ScenarioErrorResponse + """ + + return ( + await asyncio_detailed( + scenario_id=scenario_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_scenarios/list_scenarios.py b/python/fi/generated/openapi_client/api/simulation_scenarios/list_scenarios.py new file mode 100644 index 0000000..1a0042c --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_scenarios/list_scenarios.py @@ -0,0 +1,248 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...models.scenario_list_response import ScenarioListResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_agent_definition_id: str | Unset = UNSET + if not isinstance(agent_definition_id, Unset): + json_agent_definition_id = str(agent_definition_id) + params["agent_definition_id"] = json_agent_definition_id + + params["agent_type"] = agent_type + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/scenarios/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse: + if response.status_code == 200: + response_200 = ScenarioListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse +]: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse] + """ + + kwargs = _get_kwargs( + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse | None: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse + """ + + return sync_detailed( + client=client, + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse +]: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse] + """ + + kwargs = _get_kwargs( + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + agent_definition_id: UUID | Unset = UNSET, + agent_type: str | Unset = UNSET, + page: int | Unset = 1, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse | None: + """List scenarios + + Returns a paginated list of scenarios for the user's organization. + + Args: + search (str | Unset): Default: ''. + agent_definition_id (UUID | Unset): + agent_type (str | Unset): + page (int | Unset): Default: 1. + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioErrorResponse | ScenarioListResponse + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + agent_definition_id=agent_definition_id, + agent_type=agent_type, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_scenarios/update_scenario.py b/python/fi/generated/openapi_client/api/simulation_scenarios/update_scenario.py new file mode 100644 index 0000000..44a12b8 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_scenarios/update_scenario.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.scenario_edit_request import ScenarioEditRequest +from ...models.scenario_edit_response import ScenarioEditResponse +from ...models.scenario_error_response import ScenarioErrorResponse +from ...types import Response + + +def _get_kwargs( + scenario_id: str, + *, + body: ScenarioEditRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/simulate/scenarios/{scenario_id}/edit/".format( + scenario_id=quote(str(scenario_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse: + if response.status_code == 200: + response_200 = ScenarioEditResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ScenarioErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ScenarioErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ScenarioErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse +]: + """Edit scenario + + Updates scenario name, description, graph, or prompt. + + Args: + scenario_id (str): + body (ScenarioEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditRequest, +) -> ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse | None: + """Edit scenario + + Updates scenario name, description, graph, or prompt. + + Args: + scenario_id (str): + body (ScenarioEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse + """ + + return sync_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditRequest, +) -> Response[ + ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse +]: + """Edit scenario + + Updates scenario name, description, graph, or prompt. + + Args: + scenario_id (str): + body (ScenarioEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse] + """ + + kwargs = _get_kwargs( + scenario_id=scenario_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + scenario_id: str, + *, + client: AuthenticatedClient | Client, + body: ScenarioEditRequest, +) -> ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse | None: + """Edit scenario + + Updates scenario name, description, graph, or prompt. + + Args: + scenario_id (str): + body (ScenarioEditRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ScenarioEditResponse | ScenarioErrorResponse + """ + + return ( + await asyncio_detailed( + scenario_id=scenario_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/__init__.py b/python/fi/generated/openapi_client/api/simulation_test_executions/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/cancel_test_execution.py b/python/fi/generated/openapi_client/api/simulation_test_executions/cancel_test_execution.py new file mode 100644 index 0000000..7dbeab9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/cancel_test_execution.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.cancel_test_execution_response import CancelTestExecutionResponse +from ...models.empty_request import EmptyRequest +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, + *, + body: EmptyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/simulate/test-executions/{test_execution_id}/cancel/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = CancelTestExecutionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Cancel a test execution + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Cancel a test execution + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> Response[CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse]: + """Cancel a test execution + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + body: EmptyRequest, +) -> CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse | None: + """Cancel a test execution + + Args: + test_execution_id (str): + body (EmptyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CancelTestExecutionResponse | ErrorResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution.py b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution.py new file mode 100644 index 0000000..da09093 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution.py @@ -0,0 +1,285 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_detail_response import TestExecutionDetailResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + test_execution_id: str, + *, + search: str | Unset = "", + filters: str | Unset = "[]", + row_groups: str | Unset = "[]", + group_keys: str | Unset = "[]", + page: int | Unset = 1, + limit: int | Unset = 30, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + params["filters"] = filters + + params["row_groups"] = row_groups + + params["group_keys"] = group_keys + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/test-executions/{test_execution_id}/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse: + if response.status_code == 200: + response_200 = TestExecutionDetailResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + filters: str | Unset = "[]", + row_groups: str | Unset = "[]", + group_keys: str | Unset = "[]", + page: int | Unset = 1, + limit: int | Unset = 30, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse]: + """Get a specific test execution with all its details and paginated call executions + Query Parameters: + - search: search string to filter call executions + - page: page number for call executions (default: 1) + - filters: JSON array of filter objects + - row_groups: JSON array of column IDs to group by + - group_keys: JSON array of group keys + + Args: + test_execution_id (str): + search (str | Unset): Default: ''. + filters (str | Unset): Default: '[]'. + row_groups (str | Unset): Default: '[]'. + group_keys (str | Unset): Default: '[]'. + page (int | Unset): Default: 1. + limit (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + search=search, + filters=filters, + row_groups=row_groups, + group_keys=group_keys, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + filters: str | Unset = "[]", + row_groups: str | Unset = "[]", + group_keys: str | Unset = "[]", + page: int | Unset = 1, + limit: int | Unset = 30, +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse | None: + """Get a specific test execution with all its details and paginated call executions + Query Parameters: + - search: search string to filter call executions + - page: page number for call executions (default: 1) + - filters: JSON array of filter objects + - row_groups: JSON array of column IDs to group by + - group_keys: JSON array of group keys + + Args: + test_execution_id (str): + search (str | Unset): Default: ''. + filters (str | Unset): Default: '[]'. + row_groups (str | Unset): Default: '[]'. + group_keys (str | Unset): Default: '[]'. + page (int | Unset): Default: 1. + limit (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + search=search, + filters=filters, + row_groups=row_groups, + group_keys=group_keys, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + filters: str | Unset = "[]", + row_groups: str | Unset = "[]", + group_keys: str | Unset = "[]", + page: int | Unset = 1, + limit: int | Unset = 30, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse]: + """Get a specific test execution with all its details and paginated call executions + Query Parameters: + - search: search string to filter call executions + - page: page number for call executions (default: 1) + - filters: JSON array of filter objects + - row_groups: JSON array of column IDs to group by + - group_keys: JSON array of group keys + + Args: + test_execution_id (str): + search (str | Unset): Default: ''. + filters (str | Unset): Default: '[]'. + row_groups (str | Unset): Default: '[]'. + group_keys (str | Unset): Default: '[]'. + page (int | Unset): Default: 1. + limit (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + search=search, + filters=filters, + row_groups=row_groups, + group_keys=group_keys, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, + search: str | Unset = "", + filters: str | Unset = "[]", + row_groups: str | Unset = "[]", + group_keys: str | Unset = "[]", + page: int | Unset = 1, + limit: int | Unset = 30, +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse | None: + """Get a specific test execution with all its details and paginated call executions + Query Parameters: + - search: search string to filter call executions + - page: page number for call executions (default: 1) + - filters: JSON array of filter objects + - row_groups: JSON array of column IDs to group by + - group_keys: JSON array of group keys + + Args: + test_execution_id (str): + search (str | Unset): Default: ''. + filters (str | Unset): Default: '[]'. + row_groups (str | Unset): Default: '[]'. + group_keys (str | Unset): Default: '[]'. + page (int | Unset): Default: 1. + limit (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionDetailResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + search=search, + filters=filters, + row_groups=row_groups, + group_keys=group_keys, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_analytics.py b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_analytics.py new file mode 100644 index 0000000..ed26103 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_analytics.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_analytics import TestExecutionAnalytics +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/test-executions/{test_execution_id}/analytics/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics: + if response.status_code == 200: + response_200 = TestExecutionAnalytics.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics]: + """Get analytics data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics | None: + """Get analytics data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics]: + """Get analytics data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics | None: + """Get analytics data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionAnalytics + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_kpis.py b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_kpis.py new file mode 100644 index 0000000..c308103 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_kpis.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_kp_is_response import RunTestKPIsResponse +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/test-executions/{test_execution_id}/kpis/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse: + if response.status_code == 200: + response_200 = RunTestKPIsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse]: + """Get combined KPI values for a specific run test + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse | None: + """Get combined KPI values for a specific run test + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse]: + """Get combined KPI values for a specific run test + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse | None: + """Get combined KPI values for a specific run test + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | RunTestKPIsResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_performance_summary.py b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_performance_summary.py new file mode 100644 index 0000000..0b53628 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_performance_summary.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.performance_summary import PerformanceSummary +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/test-executions/{test_execution_id}/performance-summary/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary: + if response.status_code == 200: + response_200 = PerformanceSummary.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary]: + """Get performance summary data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary | None: + """Get performance summary data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary]: + """Get performance summary data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary | None: + """Get performance summary data for a specific test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | PerformanceSummary + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_transcripts.py b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_transcripts.py new file mode 100644 index 0000000..0b1f609 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/get_test_execution_transcripts.py @@ -0,0 +1,177 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.error_response import ErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.test_execution_transcripts_response import ( + TestExecutionTranscriptsResponse, +) +from ...types import Response + + +def _get_kwargs( + test_execution_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/test-executions/{test_execution_id}/transcripts/".format( + test_execution_id=quote(str(test_execution_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse: + if response.status_code == 200: + response_200 = TestExecutionTranscriptsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse +]: + """Get all transcripts for a test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse | None +): + """Get all transcripts for a test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse + """ + + return sync_detailed( + test_execution_id=test_execution_id, + client=client, + ).parsed + + +async def asyncio_detailed( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ + ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse +]: + """Get all transcripts for a test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse] + """ + + kwargs = _get_kwargs( + test_execution_id=test_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + test_execution_id: str, + *, + client: AuthenticatedClient | Client, +) -> ( + ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse | None +): + """Get all transcripts for a test execution + + Args: + test_execution_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | ManagementAPIErrorResponse | TestExecutionTranscriptsResponse + """ + + return ( + await asyncio_detailed( + test_execution_id=test_execution_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulation_test_executions/list_test_executions.py b/python/fi/generated/openapi_client/api/simulation_test_executions/list_test_executions.py new file mode 100644 index 0000000..7efb0c4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulation_test_executions/list_test_executions.py @@ -0,0 +1,163 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.run_test_error_response import RunTestErrorResponse +from ...models.test_execution import TestExecution +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/simulate/api/test-executions/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = TestExecution.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 404: + response_404 = RunTestErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = RunTestErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution]]: + """Get paginated list of test executions for the user's organization + Query Parameters: + - search: search string to filter test executions by run test name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution] | None: + """Get paginated list of test executions for the user's organization + Query Parameters: + - search: search string to filter test executions by run test name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution]]: + """Get paginated list of test executions for the user's organization + Query Parameters: + - search: search string to filter test executions by run test name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution] | None: + """Get paginated list of test executions for the user's organization + Query Parameters: + - search: search string to filter test executions by run test name + - status: filter by execution status + - limit: number of items per page (default: 10) + - page: page number (default: 1) + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | RunTestErrorResponse | list[TestExecution] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulations/__init__.py b/python/fi/generated/openapi_client/api/simulations/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulations/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/simulations/get_simulation_analytics.py b/python/fi/generated/openapi_client/api/simulations/get_simulation_analytics.py new file mode 100644 index 0000000..b9b84ea --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulations/get_simulation_analytics.py @@ -0,0 +1,252 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_simulation_analytics_response import SDKSimulationAnalyticsResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = True, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["run_test_name"] = run_test_name + + json_execution_id: str | Unset = UNSET + if not isinstance(execution_id, Unset): + json_execution_id = str(execution_id) + params["execution_id"] = json_execution_id + + params["eval_name"] = eval_name + + params["summary"] = summary + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sdk/api/v1/simulation/analytics/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse: + if response.status_code == 200: + response_200 = SDKSimulationAnalyticsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = SDKErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = True, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse +]: + """GET /simulation/analytics/ + + Aggregated analytics view: eval scores (radar chart data), critical issues, + FMA suggestions. Corresponds to the Analytics tab in the UI. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + execution_id=execution_id, + eval_name=eval_name, + summary=summary, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = True, +) -> ( + ManagementAPIErrorResponse + | SDKErrorResponse + | SDKSimulationAnalyticsResponse + | None +): + """GET /simulation/analytics/ + + Aggregated analytics view: eval scores (radar chart data), critical issues, + FMA suggestions. Corresponds to the Analytics tab in the UI. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse + """ + + return sync_detailed( + client=client, + run_test_name=run_test_name, + execution_id=execution_id, + eval_name=eval_name, + summary=summary, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = True, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse +]: + """GET /simulation/analytics/ + + Aggregated analytics view: eval scores (radar chart data), critical issues, + FMA suggestions. Corresponds to the Analytics tab in the UI. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + execution_id=execution_id, + eval_name=eval_name, + summary=summary, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = True, +) -> ( + ManagementAPIErrorResponse + | SDKErrorResponse + | SDKSimulationAnalyticsResponse + | None +): + """GET /simulation/analytics/ + + Aggregated analytics view: eval scores (radar chart data), critical issues, + FMA suggestions. Corresponds to the Analytics tab in the UI. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationAnalyticsResponse + """ + + return ( + await asyncio_detailed( + client=client, + run_test_name=run_test_name, + execution_id=execution_id, + eval_name=eval_name, + summary=summary, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulations/list_simulation_metrics.py b/python/fi/generated/openapi_client/api/simulations/list_simulation_metrics.py new file mode 100644 index 0000000..547d399 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulations/list_simulation_metrics.py @@ -0,0 +1,230 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_simulation_metrics_response import SDKSimulationMetricsResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["run_test_name"] = run_test_name + + json_execution_id: str | Unset = UNSET + if not isinstance(execution_id, Unset): + json_execution_id = str(execution_id) + params["execution_id"] = json_execution_id + + json_call_execution_id: str | Unset = UNSET + if not isinstance(call_execution_id, Unset): + json_call_execution_id = str(call_execution_id) + params["call_execution_id"] = json_call_execution_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sdk/api/v1/simulation/metrics/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse: + if response.status_code == 200: + response_200 = SDKSimulationMetricsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = SDKErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse +]: + """GET /simulation/metrics/ + + Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse | None +): + """GET /simulation/metrics/ + + Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse + """ + + return sync_detailed( + client=client, + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse +]: + """GET /simulation/metrics/ + + Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse | None +): + """GET /simulation/metrics/ + + Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationMetricsResponse + """ + + return ( + await asyncio_detailed( + client=client, + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/simulations/list_simulation_runs.py b/python/fi/generated/openapi_client/api/simulations/list_simulation_runs.py new file mode 100644 index 0000000..81d5854 --- /dev/null +++ b/python/fi/generated/openapi_client/api/simulations/list_simulation_runs.py @@ -0,0 +1,256 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.sdk_error_response import SDKErrorResponse +from ...models.sdk_simulation_runs_response import SDKSimulationRunsResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = False, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["run_test_name"] = run_test_name + + json_execution_id: str | Unset = UNSET + if not isinstance(execution_id, Unset): + json_execution_id = str(execution_id) + params["execution_id"] = json_execution_id + + json_call_execution_id: str | Unset = UNSET + if not isinstance(call_execution_id, Unset): + json_call_execution_id = str(call_execution_id) + params["call_execution_id"] = json_call_execution_id + + params["eval_name"] = eval_name + + params["summary"] = summary + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sdk/api/v1/simulation/runs/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse: + if response.status_code == 200: + response_200 = SDKSimulationRunsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = SDKErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = SDKErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = SDKErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = False, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse +]: + """GET /simulation/runs/ + + Run-level records with eval scores, scenario metadata, call details. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + eval_name=eval_name, + summary=summary, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = False, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse | None: + """GET /simulation/runs/ + + Run-level records with eval scores, scenario metadata, call details. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse + """ + + return sync_detailed( + client=client, + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + eval_name=eval_name, + summary=summary, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = False, +) -> Response[ + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse +]: + """GET /simulation/runs/ + + Run-level records with eval scores, scenario metadata, call details. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse] + """ + + kwargs = _get_kwargs( + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + eval_name=eval_name, + summary=summary, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + run_test_name: str | Unset = UNSET, + execution_id: UUID | Unset = UNSET, + call_execution_id: UUID | Unset = UNSET, + eval_name: str | Unset = UNSET, + summary: bool | Unset = False, +) -> ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse | None: + """GET /simulation/runs/ + + Run-level records with eval scores, scenario metadata, call details. + + Args: + run_test_name (str | Unset): + execution_id (UUID | Unset): + call_execution_id (UUID | Unset): + eval_name (str | Unset): + summary (bool | Unset): Default: False. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | SDKErrorResponse | SDKSimulationRunsResponse + """ + + return ( + await asyncio_detailed( + client=client, + run_test_name=run_test_name, + execution_id=execution_id, + call_execution_id=call_execution_id, + eval_name=eval_name, + summary=summary, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/__init__.py b/python/fi/generated/openapi_client/api/tracer/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_create_linear_issue_create.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_create_linear_issue_create.py new file mode 100644 index 0000000..a0fe7e9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_create_linear_issue_create.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.create_linear_issue import CreateLinearIssue +from ...models.create_linear_issue_response import CreateLinearIssueResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + cluster_id: str, + *, + body: CreateLinearIssue, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/feed/issues/{cluster_id}/create-linear-issue/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = CreateLinearIssueResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateLinearIssue, +) -> Response[ + ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse +]: + """POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + + Args: + cluster_id (str): + body (CreateLinearIssue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateLinearIssue, +) -> ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse | None: + """POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + + Args: + cluster_id (str): + body (CreateLinearIssue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateLinearIssue, +) -> Response[ + ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse +]: + """POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + + Args: + cluster_id (str): + body (CreateLinearIssue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: CreateLinearIssue, +) -> ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse | None: + """POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + + Args: + cluster_id (str): + body (CreateLinearIssue): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | CreateLinearIssueResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_deep_analysis_create.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_deep_analysis_create.py new file mode 100644 index 0000000..8029721 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_deep_analysis_create.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.deep_analysis_body import DeepAnalysisBody +from ...models.deep_analysis_dispatch_api_response import ( + DeepAnalysisDispatchApiResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + cluster_id: str, + *, + body: DeepAnalysisBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/feed/issues/{cluster_id}/deep-analysis/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = DeepAnalysisDispatchApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: DeepAnalysisBody, +) -> Response[ + ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse +]: + """POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + + Args: + cluster_id (str): + body (DeepAnalysisBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: DeepAnalysisBody, +) -> ( + ApiErrorResponse + | DeepAnalysisDispatchApiResponse + | ManagementAPIErrorResponse + | None +): + """POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + + Args: + cluster_id (str): + body (DeepAnalysisBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: DeepAnalysisBody, +) -> Response[ + ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse +]: + """POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + + Args: + cluster_id (str): + body (DeepAnalysisBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: DeepAnalysisBody, +) -> ( + ApiErrorResponse + | DeepAnalysisDispatchApiResponse + | ManagementAPIErrorResponse + | None +): + """POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + + Args: + cluster_id (str): + body (DeepAnalysisBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | DeepAnalysisDispatchApiResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_overview_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_overview_list.py new file mode 100644 index 0000000..45aee26 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_overview_list.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.overview_api_response import OverviewApiResponse +from ...types import Response + + +def _get_kwargs( + cluster_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/{cluster_id}/overview/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse: + if response.status_code == 200: + response_200 = OverviewApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse]: + """GET /tracer/feed/issues/{cluster_id}/overview/ + + Args: + cluster_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse | None: + """GET /tracer/feed/issues/{cluster_id}/overview/ + + Args: + cluster_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse]: + """GET /tracer/feed/issues/{cluster_id}/overview/ + + Args: + cluster_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, +) -> ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse | None: + """GET /tracer/feed/issues/{cluster_id}/overview/ + + Args: + cluster_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | OverviewApiResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_partial_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_partial_update.py new file mode 100644 index 0000000..4f06afe --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_partial_update.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.feed_detail_api_response import FeedDetailApiResponse +from ...models.feed_update_body import FeedUpdateBody +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + cluster_id: str, + *, + body: FeedUpdateBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/tracer/feed/issues/{cluster_id}/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = FeedDetailApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: FeedUpdateBody, +) -> Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse]: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + body (FeedUpdateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: FeedUpdateBody, +) -> ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse | None: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + body (FeedUpdateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: FeedUpdateBody, +) -> Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse]: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + body (FeedUpdateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + body: FeedUpdateBody, +) -> ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse | None: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + body (FeedUpdateBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_root_cause_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_root_cause_list.py new file mode 100644 index 0000000..8b6f8b4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_root_cause_list.py @@ -0,0 +1,216 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.deep_analysis_api_response import DeepAnalysisApiResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response + + +def _get_kwargs( + cluster_id: str, + *, + trace_id: str, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["trace_id"] = trace_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/{cluster_id}/root-cause/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = DeepAnalysisApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str, +) -> Response[ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + + Read cached deep-analysis results for a single trace within the + cluster. The frontend hits this on mount (to show existing results) + and polls it after a POST to /deep-analysis/ until ``status`` flips + from ``running`` to ``done`` or ``failed``. + + Args: + cluster_id (str): + trace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + trace_id=trace_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str, +) -> ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + + Read cached deep-analysis results for a single trace within the + cluster. The frontend hits this on mount (to show existing results) + and polls it after a POST to /deep-analysis/ until ``status`` flips + from ``running`` to ``done`` or ``failed``. + + Args: + cluster_id (str): + trace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + trace_id=trace_id, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str, +) -> Response[ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + + Read cached deep-analysis results for a single trace within the + cluster. The frontend hits this on mount (to show existing results) + and polls it after a POST to /deep-analysis/ until ``status`` flips + from ``running`` to ``done`` or ``failed``. + + Args: + cluster_id (str): + trace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + trace_id=trace_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str, +) -> ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + + Read cached deep-analysis results for a single trace within the + cluster. The frontend hits this on mount (to show existing results) + and polls it after a POST to /deep-analysis/ until ``status`` flips + from ``running`` to ``done`` or ``failed``. + + Args: + cluster_id (str): + trace_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | DeepAnalysisApiResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + trace_id=trace_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_sidebar_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_sidebar_list.py new file mode 100644 index 0000000..72fa60d --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_sidebar_list.py @@ -0,0 +1,216 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.feed_sidebar_api_response import FeedSidebarApiResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + cluster_id: str, + *, + trace_id: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["trace_id"] = trace_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/{cluster_id}/sidebar/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = FeedSidebarApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str | Unset = UNSET, +) -> Response[ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/{cluster_id}/sidebar/ + + Accepts an optional ``?trace_id=`` query param. When present, the + trace-level sections (AI Metadata + Evaluations) are computed for + that trace instead of the cluster's latest, keeping the sidebar in + sync with the Overview tab's trace selection. + + Args: + cluster_id (str): + trace_id (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + trace_id=trace_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str | Unset = UNSET, +) -> ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/{cluster_id}/sidebar/ + + Accepts an optional ``?trace_id=`` query param. When present, the + trace-level sections (AI Metadata + Evaluations) are computed for + that trace instead of the cluster's latest, keeping the sidebar in + sync with the Overview tab's trace selection. + + Args: + cluster_id (str): + trace_id (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + trace_id=trace_id, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str | Unset = UNSET, +) -> Response[ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/{cluster_id}/sidebar/ + + Accepts an optional ``?trace_id=`` query param. When present, the + trace-level sections (AI Metadata + Evaluations) are computed for + that trace instead of the cluster's latest, keeping the sidebar in + sync with the Overview tab's trace selection. + + Args: + cluster_id (str): + trace_id (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + trace_id=trace_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + trace_id: str | Unset = UNSET, +) -> ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/{cluster_id}/sidebar/ + + Accepts an optional ``?trace_id=`` query param. When present, the + trace-level sections (AI Metadata + Evaluations) are computed for + that trace instead of the cluster's latest, keeping the sidebar in + sync with the Overview tab's trace selection. + + Args: + cluster_id (str): + trace_id (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedSidebarApiResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + trace_id=trace_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_traces_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_traces_list.py new file mode 100644 index 0000000..996a043 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_traces_list.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.traces_tab_api_response import TracesTabApiResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + cluster_id: str, + *, + limit: int | Unset = 50, + offset: int | Unset = 0, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["limit"] = limit + + params["offset"] = offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/{cluster_id}/traces/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse: + if response.status_code == 200: + response_200 = TracesTabApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 50, + offset: int | Unset = 0, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse]: + """GET /tracer/feed/issues/{cluster_id}/traces/ + + Args: + cluster_id (str): + limit (int | Unset): Default: 50. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + limit=limit, + offset=offset, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 50, + offset: int | Unset = 0, +) -> ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse | None: + """GET /tracer/feed/issues/{cluster_id}/traces/ + + Args: + cluster_id (str): + limit (int | Unset): Default: 50. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + limit=limit, + offset=offset, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 50, + offset: int | Unset = 0, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse]: + """GET /tracer/feed/issues/{cluster_id}/traces/ + + Args: + cluster_id (str): + limit (int | Unset): Default: 50. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + limit=limit, + offset=offset, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + limit: int | Unset = 50, + offset: int | Unset = 0, +) -> ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse | None: + """GET /tracer/feed/issues/{cluster_id}/traces/ + + Args: + cluster_id (str): + limit (int | Unset): Default: 50. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | TracesTabApiResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + limit=limit, + offset=offset, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_trends_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_trends_list.py new file mode 100644 index 0000000..fdcb13a --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_feed_issues_trends_list.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trends_tab_api_response import TrendsTabApiResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + cluster_id: str, + *, + days: int | Unset = 14, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["days"] = days + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/{cluster_id}/trends/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse: + if response.status_code == 200: + response_200 = TrendsTabApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 14, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse]: + """GET /tracer/feed/issues/{cluster_id}/trends/ + + Args: + cluster_id (str): + days (int | Unset): Default: 14. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + days=days, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 14, +) -> ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse | None: + """GET /tracer/feed/issues/{cluster_id}/trends/ + + Args: + cluster_id (str): + days (int | Unset): Default: 14. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + days=days, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 14, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse]: + """GET /tracer/feed/issues/{cluster_id}/trends/ + + Args: + cluster_id (str): + days (int | Unset): Default: 14. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + days=days, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + days: int | Unset = 14, +) -> ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse | None: + """GET /tracer/feed/issues/{cluster_id}/trends/ + + Args: + cluster_id (str): + days (int | Unset): Default: 14. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | TrendsTabApiResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + days=days, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_agent_graph.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_agent_graph.py new file mode 100644 index 0000000..c93156d --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_agent_graph.py @@ -0,0 +1,220 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_agent_graph_response_200 import ( + TracerTraceAgentGraphResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID, + filters: str | Unset = "[]", +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params["filters"] = filters + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/agent_graph/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200: + if response.status_code == 200: + response_200 = TracerTraceAgentGraphResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID, + filters: str | Unset = "[]", +) -> Response[ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200]: + """Return the aggregate agent graph for a project. + + Computes nodes (distinct span types/names) and edges (parent→child + transitions) across all traces in the given time window. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_id=project_id, + filters=filters, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID, + filters: str | Unset = "[]", +) -> ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200 | None: + """Return the aggregate agent graph for a project. + + Computes nodes (distinct span types/names) and edges (parent→child + transitions) across all traces in the given time window. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + project_id=project_id, + filters=filters, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID, + filters: str | Unset = "[]", +) -> Response[ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200]: + """Return the aggregate agent graph for a project. + + Computes nodes (distinct span types/names) and edges (parent→child + transitions) across all traces in the given time window. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_id=project_id, + filters=filters, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID, + filters: str | Unset = "[]", +) -> ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200 | None: + """Return the aggregate agent graph for a project. + + Computes nodes (distinct span types/names) and edges (parent→child + transitions) across all traces in the given time window. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceAgentGraphResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + project_id=project_id, + filters=filters, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_create.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_create.py new file mode 100644 index 0000000..a4c9427 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_create.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.get_trace_annotation import GetTraceAnnotation +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: GetTraceAnnotation, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/trace-annotation/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTraceAnnotation | ManagementAPIErrorResponse: + if response.status_code == 201: + response_201 = GetTraceAnnotation.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_delete.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_delete.py new file mode 100644 index 0000000..df672be --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_delete.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/tracer/trace-annotation/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_get_annotation_values.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_get_annotation_values.py new file mode 100644 index 0000000..1ebbed3 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_get_annotation_values.py @@ -0,0 +1,263 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.get_trace_annotation_values_response import ( + GetTraceAnnotationValuesResponse, +) +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + observation_span_id: str | Unset = UNSET, + trace_id: UUID | Unset = UNSET, + annotators: str | Unset = UNSET, + exclude_annotators: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["observation_span_id"] = observation_span_id + + json_trace_id: str | Unset = UNSET + if not isinstance(trace_id, Unset): + json_trace_id = str(trace_id) + params["trace_id"] = json_trace_id + + params["annotators"] = annotators + + params["exclude_annotators"] = exclude_annotators + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-annotation/get_annotation_values/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = GetTraceAnnotationValuesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + observation_span_id: str | Unset = UNSET, + trace_id: UUID | Unset = UNSET, + annotators: str | Unset = UNSET, + exclude_annotators: str | Unset = UNSET, +) -> Response[ + ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + observation_span_id (str | Unset): + trace_id (UUID | Unset): + annotators (str | Unset): + exclude_annotators (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + observation_span_id=observation_span_id, + trace_id=trace_id, + annotators=annotators, + exclude_annotators=exclude_annotators, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + observation_span_id: str | Unset = UNSET, + trace_id: UUID | Unset = UNSET, + annotators: str | Unset = UNSET, + exclude_annotators: str | Unset = UNSET, +) -> ( + ApiErrorResponse + | GetTraceAnnotationValuesResponse + | ManagementAPIErrorResponse + | None +): + """ + Args: + page (int | Unset): + limit (int | Unset): + observation_span_id (str | Unset): + trace_id (UUID | Unset): + annotators (str | Unset): + exclude_annotators (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + observation_span_id=observation_span_id, + trace_id=trace_id, + annotators=annotators, + exclude_annotators=exclude_annotators, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + observation_span_id: str | Unset = UNSET, + trace_id: UUID | Unset = UNSET, + annotators: str | Unset = UNSET, + exclude_annotators: str | Unset = UNSET, +) -> Response[ + ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse +]: + """ + Args: + page (int | Unset): + limit (int | Unset): + observation_span_id (str | Unset): + trace_id (UUID | Unset): + annotators (str | Unset): + exclude_annotators (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + observation_span_id=observation_span_id, + trace_id=trace_id, + annotators=annotators, + exclude_annotators=exclude_annotators, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + observation_span_id: str | Unset = UNSET, + trace_id: UUID | Unset = UNSET, + annotators: str | Unset = UNSET, + exclude_annotators: str | Unset = UNSET, +) -> ( + ApiErrorResponse + | GetTraceAnnotationValuesResponse + | ManagementAPIErrorResponse + | None +): + """ + Args: + page (int | Unset): + limit (int | Unset): + observation_span_id (str | Unset): + trace_id (UUID | Unset): + annotators (str | Unset): + exclude_annotators (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | GetTraceAnnotationValuesResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + observation_span_id=observation_span_id, + trace_id=trace_id, + annotators=annotators, + exclude_annotators=exclude_annotators, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_list.py new file mode 100644 index 0000000..5d06bef --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_list.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_annotation_list_response_200 import ( + TracerTraceAnnotationListResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-annotation/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200: + if response.status_code == 200: + response_200 = TracerTraceAnnotationListResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceAnnotationListResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_partial_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_partial_update.py new file mode 100644 index 0000000..67003c6 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_partial_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.get_trace_annotation import GetTraceAnnotation +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: GetTraceAnnotation, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/tracer/trace-annotation/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTraceAnnotation | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = GetTraceAnnotation.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_read.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_read.py new file mode 100644 index 0000000..0f6ffa1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_read.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.get_trace_annotation import GetTraceAnnotation +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-annotation/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTraceAnnotation | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = GetTraceAnnotation.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_update.py new file mode 100644 index 0000000..3bc386f --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_annotation_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.get_trace_annotation import GetTraceAnnotation +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: GetTraceAnnotation, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/tracer/trace-annotation/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTraceAnnotation | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = GetTraceAnnotation.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> Response[GetTraceAnnotation | ManagementAPIErrorResponse]: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetTraceAnnotation | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: GetTraceAnnotation, +) -> GetTraceAnnotation | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + body (GetTraceAnnotation): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetTraceAnnotation | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_bulk_create.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_bulk_create.py new file mode 100644 index 0000000..5ae5695 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_bulk_create.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace import Trace +from ...types import Response + + +def _get_kwargs( + *, + body: Trace, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/trace/bulk_create/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Trace: + if response.status_code == 201: + response_201 = Trace.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Trace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_compare_traces.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_compare_traces.py new file mode 100644 index 0000000..c41c797 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_compare_traces.py @@ -0,0 +1,158 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace import Trace +from ...types import Response + + +def _get_kwargs( + *, + body: Trace, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/trace/compare_traces/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Trace: + if response.status_code == 201: + response_201 = Trace.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Trace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """Compare traces across project versions with optimized queries. + + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """Compare traces across project versions with optimized queries. + + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """Compare traces across project versions with optimized queries. + + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """Compare traces across project versions with optimized queries. + + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_create.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_create.py new file mode 100644 index 0000000..bd67c41 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_create.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace import Trace +from ...types import Response + + +def _get_kwargs( + *, + body: Trace, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/trace/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Trace: + if response.status_code == 201: + response_201 = Trace.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Trace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_delete.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_delete.py new file mode 100644 index 0000000..3382a01 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_delete.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/tracer/trace/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_eval_names.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_eval_names.py new file mode 100644 index 0000000..a73b3cd --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_eval_names.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_get_eval_names_response_200 import ( + TracerTraceGetEvalNamesResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/get_eval_names/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200: + if response.status_code == 200: + response_200 = TracerTraceGetEvalNamesResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200]: + """Fetch all evaluation template names. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200 | None: + """Fetch all evaluation template names. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200]: + """Fetch all evaluation template names. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200 | None: + """Fetch all evaluation template names. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetEvalNamesResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_export_data.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_export_data.py new file mode 100644 index 0000000..de9479c --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_export_data.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_get_trace_export_data_response_200 import ( + TracerTraceGetTraceExportDataResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/get_trace_export_data/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200: + if response.status_code == 200: + response_200 = TracerTraceGetTraceExportDataResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200]: + """Export traces filtered by project ID with optimized queries. + Auto-detects voice/conversation projects and exports voice-specific fields. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200 | None: + """Export traces filtered by project ID with optimized queries. + Auto-detects voice/conversation projects and exports voice-specific fields. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200]: + """Export traces filtered by project ID with optimized queries. + Auto-detects voice/conversation projects and exports voice-specific fields. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200 | None: + """Export traces filtered by project ID with optimized queries. + Auto-detects voice/conversation projects and exports voice-specific fields. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetTraceExportDataResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index.py new file mode 100644 index 0000000..ecc0295 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_get_trace_id_by_index_response_200 import ( + TracerTraceGetTraceIdByIndexResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_version_id: UUID, + filters: str | Unset = "[]", +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_trace_id = str(trace_id) + params["trace_id"] = json_trace_id + + json_project_version_id = str(project_version_id) + params["project_version_id"] = json_project_version_id + + params["filters"] = filters + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/get_trace_id_by_index/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200: + if response.status_code == 200: + response_200 = TracerTraceGetTraceIdByIndexResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_version_id: UUID, + filters: str | Unset = "[]", +) -> Response[ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200]: + """Get the previous and next trace id by index using efficient database queries. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_version_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + trace_id=trace_id, + project_version_id=project_version_id, + filters=filters, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_version_id: UUID, + filters: str | Unset = "[]", +) -> ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200 | None: + """Get the previous and next trace id by index using efficient database queries. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_version_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + trace_id=trace_id, + project_version_id=project_version_id, + filters=filters, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_version_id: UUID, + filters: str | Unset = "[]", +) -> Response[ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200]: + """Get the previous and next trace id by index using efficient database queries. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_version_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + trace_id=trace_id, + project_version_id=project_version_id, + filters=filters, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_version_id: UUID, + filters: str | Unset = "[]", +) -> ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200 | None: + """Get the previous and next trace id by index using efficient database queries. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_version_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + trace_id=trace_id, + project_version_id=project_version_id, + filters=filters, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index_observe.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index_observe.py new file mode 100644 index 0000000..3f2dae0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_get_trace_id_by_index_observe.py @@ -0,0 +1,232 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_get_trace_id_by_index_observe_response_200 import ( + TracerTraceGetTraceIdByIndexObserveResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_id: UUID, + filters: str | Unset = "[]", +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_trace_id = str(trace_id) + params["trace_id"] = json_trace_id + + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params["filters"] = filters + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/get_trace_id_by_index_observe/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200: + if response.status_code == 200: + response_200 = TracerTraceGetTraceIdByIndexObserveResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_id: UUID, + filters: str | Unset = "[]", +) -> Response[ + ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200 +]: + """Get the previous and next trace id by index. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + trace_id=trace_id, + project_id=project_id, + filters=filters, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_id: UUID, + filters: str | Unset = "[]", +) -> ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200 | None: + """Get the previous and next trace id by index. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + trace_id=trace_id, + project_id=project_id, + filters=filters, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_id: UUID, + filters: str | Unset = "[]", +) -> Response[ + ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200 +]: + """Get the previous and next trace id by index. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + trace_id=trace_id, + project_id=project_id, + filters=filters, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + trace_id: UUID, + project_id: UUID, + filters: str | Unset = "[]", +) -> ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200 | None: + """Get the previous and next trace id by index. + + Args: + page (int | Unset): + limit (int | Unset): + trace_id (UUID): + project_id (UUID): + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceGetTraceIdByIndexObserveResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + trace_id=trace_id, + project_id=project_id, + filters=filters, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_list.py new file mode 100644 index 0000000..dcef02a --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_list.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_list_response_200 import TracerTraceListResponse200 +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceListResponse200: + if response.status_code == 200: + response_200 = TracerTraceListResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceListResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceListResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceListResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_list_traces_of_session.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_list_traces_of_session.py new file mode 100644 index 0000000..451cb6f --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_list_traces_of_session.py @@ -0,0 +1,293 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_list_traces_of_session_response_200 import ( + TracerTraceListTracesOfSessionResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + project_version_id: UUID | Unset = UNSET, + session_id: UUID | Unset = UNSET, + filters: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + json_project_version_id: str | Unset = UNSET + if not isinstance(project_version_id, Unset): + json_project_version_id = str(project_version_id) + params["project_version_id"] = json_project_version_id + + json_session_id: str | Unset = UNSET + if not isinstance(session_id, Unset): + json_session_id = str(session_id) + params["session_id"] = json_session_id + + params["filters"] = filters + + params["page_number"] = page_number + + params["page_size"] = page_size + + params["interval"] = interval + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/list_traces_of_session/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200: + if response.status_code == 200: + response_200 = TracerTraceListTracesOfSessionResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + project_version_id: UUID | Unset = UNSET, + session_id: UUID | Unset = UNSET, + filters: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200]: + """List traces filtered by project ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + project_version_id (UUID | Unset): + session_id (UUID | Unset): + filters (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_id=project_id, + project_version_id=project_version_id, + session_id=session_id, + filters=filters, + page_number=page_number, + page_size=page_size, + interval=interval, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + project_version_id: UUID | Unset = UNSET, + session_id: UUID | Unset = UNSET, + filters: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200 | None: + """List traces filtered by project ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + project_version_id (UUID | Unset): + session_id (UUID | Unset): + filters (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + project_id=project_id, + project_version_id=project_version_id, + session_id=session_id, + filters=filters, + page_number=page_number, + page_size=page_size, + interval=interval, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + project_version_id: UUID | Unset = UNSET, + session_id: UUID | Unset = UNSET, + filters: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200]: + """List traces filtered by project ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + project_version_id (UUID | Unset): + session_id (UUID | Unset): + filters (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_id=project_id, + project_version_id=project_version_id, + session_id=session_id, + filters=filters, + page_number=page_number, + page_size=page_size, + interval=interval, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + project_version_id: UUID | Unset = UNSET, + session_id: UUID | Unset = UNSET, + filters: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200 | None: + """List traces filtered by project ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + project_version_id (UUID | Unset): + session_id (UUID | Unset): + filters (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceListTracesOfSessionResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + project_id=project_id, + project_version_id=project_version_id, + session_id=session_id, + filters=filters, + page_number=page_number, + page_size=page_size, + interval=interval, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_partial_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_partial_update.py new file mode 100644 index 0000000..7751bc4 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_partial_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace import Trace +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: Trace, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/tracer/trace/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Trace: + if response.status_code == 200: + response_200 = Trace.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Trace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_create.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_create.py new file mode 100644 index 0000000..2a9dfe0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_create.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace_session import TraceSession +from ...types import Response + + +def _get_kwargs( + *, + body: TraceSession, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/trace-session/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TraceSession: + if response.status_code == 201: + response_201 = TraceSession.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TraceSession]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_delete.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_delete.py new file mode 100644 index 0000000..08e0bfb --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_delete.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/tracer/trace-session/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_eval_logs.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_eval_logs.py new file mode 100644 index 0000000..53b1650 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_eval_logs.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace_session import TraceSession +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-session/{id}/eval_logs/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TraceSession: + if response.status_code == 200: + response_200 = TraceSession.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TraceSession]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + r"""Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + + Session-level eval results are walled off from span/trace surfaces + by ``target_type='session'`` — this endpoint is the only place + they appear. + + Query params: + page (int, 0-indexed, default 0) + page_size (int, default 25, max 100) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | TraceSession | None: + r"""Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + + Session-level eval results are walled off from span/trace surfaces + by ``target_type='session'`` — this endpoint is the only place + they appear. + + Query params: + page (int, 0-indexed, default 0) + page_size (int, default 25, max 100) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + r"""Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + + Session-level eval results are walled off from span/trace surfaces + by ``target_type='session'`` — this endpoint is the only place + they appear. + + Query params: + page (int, 0-indexed, default 0) + page_size (int, default 25, max 100) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | TraceSession | None: + r"""Session-scoped eval log feed for TracesDrawer's \"Evals\" tab. + + Session-level eval results are walled off from span/trace surfaces + by ``target_type='session'`` — this endpoint is the only place + they appear. + + Query params: + page (int, 0-indexed, default 0) + page_size (int, default 25, max 100) + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_session_filter_values.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_session_filter_values.py new file mode 100644 index 0000000..731e326 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_session_filter_values.py @@ -0,0 +1,228 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_session_get_session_filter_values_response_200 import ( + TracerTraceSessionGetSessionFilterValuesResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-session/get_session_filter_values/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200: + if response.status_code == 200: + response_200 = TracerTraceSessionGetSessionFilterValuesResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200 +]: + r"""Return distinct values for a session-level column. + Used by the filter panel's value picker for session-specific fields + (session_id, user_id, first_message, etc.). + + Query params: + project_id: required + column: canonical session column name, e.g. \"session_id\" + search: optional search substring + page: page number (0-based), default 0 + page_size: default 50 + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | TracerTraceSessionGetSessionFilterValuesResponse200 + | None +): + r"""Return distinct values for a session-level column. + Used by the filter panel's value picker for session-specific fields + (session_id, user_id, first_message, etc.). + + Query params: + project_id: required + column: canonical session column name, e.g. \"session_id\" + search: optional search substring + page: page number (0-based), default 0 + page_size: default 50 + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200 +]: + r"""Return distinct values for a session-level column. + Used by the filter panel's value picker for session-specific fields + (session_id, user_id, first_message, etc.). + + Query params: + project_id: required + column: canonical session column name, e.g. \"session_id\" + search: optional search substring + page: page number (0-based), default 0 + page_size: default 50 + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | TracerTraceSessionGetSessionFilterValuesResponse200 + | None +): + r"""Return distinct values for a session-level column. + Used by the filter panel's value picker for session-specific fields + (session_id, user_id, first_message, etc.). + + Query params: + project_id: required + column: canonical session column name, e.g. \"session_id\" + search: optional search substring + page: page number (0-based), default 0 + page_size: default 50 + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceSessionGetSessionFilterValuesResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_trace_session_export_data.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_trace_session_export_data.py new file mode 100644 index 0000000..0f09e2c --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_get_trace_session_export_data.py @@ -0,0 +1,194 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_session_get_trace_session_export_data_response_200 import ( + TracerTraceSessionGetTraceSessionExportDataResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-session/get_trace_session_export_data/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200 +): + if response.status_code == 200: + response_200 = TracerTraceSessionGetTraceSessionExportDataResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200 +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200 +]: + """Export traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | TracerTraceSessionGetTraceSessionExportDataResponse200 + | None +): + """Export traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ + ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200 +]: + """Export traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ( + ManagementAPIErrorResponse + | TracerTraceSessionGetTraceSessionExportDataResponse200 + | None +): + """Export traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceSessionGetTraceSessionExportDataResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_list.py new file mode 100644 index 0000000..f44f041 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_list.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_trace_session_list_response_200 import ( + TracerTraceSessionListResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-session/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerTraceSessionListResponse200: + if response.status_code == 200: + response_200 = TracerTraceSessionListResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerTraceSessionListResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceSessionListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceSessionListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceSessionListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceSessionListResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerTraceSessionListResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerTraceSessionListResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerTraceSessionListResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerTraceSessionListResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_partial_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_partial_update.py new file mode 100644 index 0000000..d911c1f --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_partial_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace_session import TraceSession +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: TraceSession, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/tracer/trace-session/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TraceSession: + if response.status_code == 200: + response_200 = TraceSession.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TraceSession]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_update.py new file mode 100644 index 0000000..44dc4d9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_session_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace_session import TraceSession +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: TraceSession, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/tracer/trace-session/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TraceSession: + if response.status_code == 200: + response_200 = TraceSession.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TraceSession]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceSession, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + id (str): + body (TraceSession): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_trace_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_trace_update.py new file mode 100644 index 0000000..ff320fd --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_trace_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace import Trace +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: Trace, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/tracer/trace/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Trace: + if response.status_code == 200: + response_200 = Trace.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Trace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> Response[ManagementAPIErrorResponse | Trace]: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: Trace, +) -> ManagementAPIErrorResponse | Trace | None: + """ + Args: + id (str): + body (Trace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_create.py b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_create.py new file mode 100644 index 0000000..76c5740 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_create.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_log import UserAlertMonitorLog +from ...types import Response + + +def _get_kwargs( + *, + body: UserAlertMonitorLog, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/user-alert-logs/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitorLog: + if response.status_code == 201: + response_201 = UserAlertMonitorLog.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_delete.py b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_delete.py new file mode 100644 index 0000000..c90480d --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_delete.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/tracer/user-alert-logs/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ManagementAPIErrorResponse: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[Any | ManagementAPIErrorResponse]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Any | ManagementAPIErrorResponse | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_partial_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_partial_update.py new file mode 100644 index 0000000..6664816 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_partial_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_log import UserAlertMonitorLog +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UserAlertMonitorLog, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/tracer/user-alert-logs/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitorLog: + if response.status_code == 200: + response_200 = UserAlertMonitorLog.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_update.py new file mode 100644 index 0000000..b1e529e --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_user_alert_logs_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_log import UserAlertMonitorLog +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UserAlertMonitorLog, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/tracer/user-alert-logs/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitorLog: + if response.status_code == 200: + response_200 = UserAlertMonitorLog.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitorLog]: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitorLog] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorLog, +) -> ManagementAPIErrorResponse | UserAlertMonitorLog | None: + """ + Args: + id (str): + body (UserAlertMonitorLog): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitorLog + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_duplicate.py b/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_duplicate.py new file mode 100644 index 0000000..7b54880 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_duplicate.py @@ -0,0 +1,189 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor_duplicate import UserAlertMonitorDuplicate +from ...models.user_alert_monitor_duplicate_response import ( + UserAlertMonitorDuplicateResponse, +) +from ...types import Response + + +def _get_kwargs( + *, + body: UserAlertMonitorDuplicate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/user-alerts/duplicate/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse: + if response.status_code == 200: + response_200 = UserAlertMonitorDuplicateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorDuplicate, +) -> Response[ + ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse +]: + """ + Args: + body (UserAlertMonitorDuplicate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorDuplicate, +) -> ( + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorDuplicateResponse + | None +): + """ + Args: + body (UserAlertMonitorDuplicate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorDuplicate, +) -> Response[ + ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse +]: + """ + Args: + body (UserAlertMonitorDuplicate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitorDuplicate, +) -> ( + ApiErrorResponse + | ManagementAPIErrorResponse + | UserAlertMonitorDuplicateResponse + | None +): + """ + Args: + body (UserAlertMonitorDuplicate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UserAlertMonitorDuplicateResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_list_monitors.py b/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_list_monitors.py new file mode 100644 index 0000000..7a2e63b --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_list_monitors.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.tracer_user_alerts_list_monitors_response_200 import ( + TracerUserAlertsListMonitorsResponse200, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/user-alerts/list_monitors/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200: + if response.status_code == 200: + response_200 = TracerUserAlertsListMonitorsResponse200.from_dict( + response.json() + ) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200 + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200]: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200 | None: + """ + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TracerUserAlertsListMonitorsResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_update.py b/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_update.py new file mode 100644 index 0000000..1f102f5 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_user_alerts_update.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_alert_monitor import UserAlertMonitor +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UserAlertMonitor, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/tracer/user-alerts/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | UserAlertMonitor: + if response.status_code == 200: + response_200 = UserAlertMonitor.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> Response[ManagementAPIErrorResponse | UserAlertMonitor]: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | UserAlertMonitor] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: UserAlertMonitor, +) -> ManagementAPIErrorResponse | UserAlertMonitor | None: + """ + Args: + id (str): + body (UserAlertMonitor): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | UserAlertMonitor + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracer/tracer_users_get_code_example_list.py b/python/fi/generated/openapi_client/api/tracer/tracer_users_get_code_example_list.py new file mode 100644 index 0000000..eedc56b --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracer/tracer_users_get_code_example_list.py @@ -0,0 +1,134 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_code_example_response import UserCodeExampleResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/users/get_code_example/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse: + if response.status_code == 200: + response_200 = UserCodeExampleResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UserCodeExampleResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/__init__.py b/python/fi/generated/openapi_client/api/tracing/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/tracing/create_bulk_trace_annotation.py b/python/fi/generated/openapi_client/api/tracing/create_bulk_trace_annotation.py new file mode 100644 index 0000000..7bcf2a0 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/create_bulk_trace_annotation.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.bulk_annotation_request import BulkAnnotationRequest +from ...models.bulk_annotation_response import BulkAnnotationResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import Response + + +def _get_kwargs( + *, + body: BulkAnnotationRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/bulk-annotation/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = BulkAnnotationResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: BulkAnnotationRequest, +) -> Response[ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse]: + """ + Args: + body (BulkAnnotationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: BulkAnnotationRequest, +) -> ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse | None: + """ + Args: + body (BulkAnnotationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: BulkAnnotationRequest, +) -> Response[ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse]: + """ + Args: + body (BulkAnnotationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: BulkAnnotationRequest, +) -> ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse | None: + """ + Args: + body (BulkAnnotationRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | BulkAnnotationResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/get_error_feed_issue.py b/python/fi/generated/openapi_client/api/tracing/get_error_feed_issue.py new file mode 100644 index 0000000..e599637 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/get_error_feed_issue.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.feed_detail_api_response import FeedDetailApiResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + cluster_id: str, + *, + project_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/{cluster_id}/".format( + cluster_id=quote(str(cluster_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = FeedDetailApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse]: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + project_id=project_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse | None: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + cluster_id=cluster_id, + client=client, + project_id=project_id, + ).parsed + + +async def asyncio_detailed( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse]: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + cluster_id=cluster_id, + project_id=project_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + cluster_id: str, + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse | None: + """GET + PATCH /tracer/feed/issues/{cluster_id}/ + + Args: + cluster_id (str): + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedDetailApiResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + cluster_id=cluster_id, + client=client, + project_id=project_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/get_error_feed_issue_stats.py b/python/fi/generated/openapi_client/api/tracing/get_error_feed_issue_stats.py new file mode 100644 index 0000000..d508b20 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/get_error_feed_issue_stats.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.feed_stats_api_response import FeedStatsApiResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + project_id: UUID | Unset = UNSET, + time_range_days: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params["time_range_days"] = time_range_days + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/stats/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = FeedStatsApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + time_range_days: int | Unset = UNSET, +) -> Response[ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/stats/ — top stats bar totals. + + Args: + project_id (UUID | Unset): + time_range_days (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + time_range_days=time_range_days, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + time_range_days: int | Unset = UNSET, +) -> ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/stats/ — top stats bar totals. + + Args: + project_id (UUID | Unset): + time_range_days (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + project_id=project_id, + time_range_days=time_range_days, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + time_range_days: int | Unset = UNSET, +) -> Response[ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/stats/ — top stats bar totals. + + Args: + project_id (UUID | Unset): + time_range_days (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + time_range_days=time_range_days, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + time_range_days: int | Unset = UNSET, +) -> ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/stats/ — top stats bar totals. + + Args: + project_id (UUID | Unset): + time_range_days (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedStatsApiResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + project_id=project_id, + time_range_days=time_range_days, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/get_trace.py b/python/fi/generated/openapi_client/api/tracing/get_trace.py new file mode 100644 index 0000000..efc5d25 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/get_trace.py @@ -0,0 +1,154 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace import Trace +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | Trace: + if response.status_code == 200: + response_200 = Trace.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | Trace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | Trace]: + """Retrieve a trace by its ID. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | Trace | None: + """Retrieve a trace by its ID. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | Trace]: + """Retrieve a trace by its ID. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | Trace] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | Trace | None: + """Retrieve a trace by its ID. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | Trace + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/get_trace_graph_methods.py b/python/fi/generated/openapi_client/api/tracing/get_trace_graph_methods.py new file mode 100644 index 0000000..9d6937e --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/get_trace_graph_methods.py @@ -0,0 +1,159 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.observe_graph_data_request import ObserveGraphDataRequest +from ...models.observe_graph_data_response import ObserveGraphDataResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ObserveGraphDataRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/trace/get_graph_methods/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | ObserveGraphDataResponse: + if response.status_code == 200: + response_200 = ObserveGraphDataResponse.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | ObserveGraphDataResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: ObserveGraphDataRequest, +) -> Response[ManagementAPIErrorResponse | ObserveGraphDataResponse]: + """Fetch data for the observe graph with optimized queries + + Args: + body (ObserveGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ObserveGraphDataResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: ObserveGraphDataRequest, +) -> ManagementAPIErrorResponse | ObserveGraphDataResponse | None: + """Fetch data for the observe graph with optimized queries + + Args: + body (ObserveGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ObserveGraphDataResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: ObserveGraphDataRequest, +) -> Response[ManagementAPIErrorResponse | ObserveGraphDataResponse]: + """Fetch data for the observe graph with optimized queries + + Args: + body (ObserveGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | ObserveGraphDataResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: ObserveGraphDataRequest, +) -> ManagementAPIErrorResponse | ObserveGraphDataResponse | None: + """Fetch data for the observe graph with optimized queries + + Args: + body (ObserveGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | ObserveGraphDataResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/get_trace_session.py b/python/fi/generated/openapi_client/api/tracing/get_trace_session.py new file mode 100644 index 0000000..a7965a2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/get_trace_session.py @@ -0,0 +1,150 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace_session import TraceSession +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-session/{id}/".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TraceSession: + if response.status_code == 200: + response_200 = TraceSession.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TraceSession]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, +) -> Response[ManagementAPIErrorResponse | TraceSession]: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSession] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, +) -> ManagementAPIErrorResponse | TraceSession | None: + """ + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSession + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/get_trace_session_graph_data.py b/python/fi/generated/openapi_client/api/tracing/get_trace_session_graph_data.py new file mode 100644 index 0000000..de40a33 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/get_trace_session_graph_data.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace_session_graph_data_request import TraceSessionGraphDataRequest +from ...types import Response + + +def _get_kwargs( + *, + body: TraceSessionGraphDataRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/tracer/trace-session/get_session_graph_data/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TraceSessionGraphDataRequest: + if response.status_code == 201: + response_201 = TraceSessionGraphDataRequest.from_dict(response.json()) + + return response_201 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TraceSessionGraphDataRequest]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: TraceSessionGraphDataRequest, +) -> Response[ManagementAPIErrorResponse | TraceSessionGraphDataRequest]: + """Fetch time-series session metrics for the observe graph. + + Supports the same metric types as the trace graph endpoint: + - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + avg_duration, avg_traces_per_session — all aggregated at session level + - EVAL: eval scores averaged across sessions + - ANNOTATION: annotation scores averaged across sessions + + Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + + Args: + body (TraceSessionGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSessionGraphDataRequest] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: TraceSessionGraphDataRequest, +) -> ManagementAPIErrorResponse | TraceSessionGraphDataRequest | None: + """Fetch time-series session metrics for the observe graph. + + Supports the same metric types as the trace graph endpoint: + - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + avg_duration, avg_traces_per_session — all aggregated at session level + - EVAL: eval scores averaged across sessions + - ANNOTATION: annotation scores averaged across sessions + + Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + + Args: + body (TraceSessionGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSessionGraphDataRequest + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: TraceSessionGraphDataRequest, +) -> Response[ManagementAPIErrorResponse | TraceSessionGraphDataRequest]: + """Fetch time-series session metrics for the observe graph. + + Supports the same metric types as the trace graph endpoint: + - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + avg_duration, avg_traces_per_session — all aggregated at session level + - EVAL: eval scores averaged across sessions + - ANNOTATION: annotation scores averaged across sessions + + Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + + Args: + body (TraceSessionGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceSessionGraphDataRequest] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: TraceSessionGraphDataRequest, +) -> ManagementAPIErrorResponse | TraceSessionGraphDataRequest | None: + """Fetch time-series session metrics for the observe graph. + + Supports the same metric types as the trace graph endpoint: + - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + avg_duration, avg_traces_per_session — all aggregated at session level + - EVAL: eval scores averaged across sessions + - ANNOTATION: annotation scores averaged across sessions + + Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + + Args: + body (TraceSessionGraphDataRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceSessionGraphDataRequest + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/get_voice_call_detail.py b/python/fi/generated/openapi_client/api/tracing/get_voice_call_detail.py new file mode 100644 index 0000000..10c0052 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/get_voice_call_detail.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.get_voice_call_detail_response_200 import GetVoiceCallDetailResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/voice_call_detail/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = GetVoiceCallDetailResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse]: + """Return the heavy / detail-only fields for a single voice call. + + Query params: + - trace_id (required) — UUID of the voice call trace. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse | None: + """Return the heavy / detail-only fields for a single voice call. + + Query params: + - trace_id (required) — UUID of the voice call trace. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse]: + """Return the heavy / detail-only fields for a single voice call. + + Query params: + - trace_id (required) — UUID of the voice call trace. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse | None: + """Return the heavy / detail-only fields for a single voice call. + + Query params: + - trace_id (required) — UUID of the voice call trace. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GetVoiceCallDetailResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_error_feed_issues.py b/python/fi/generated/openapi_client/api/tracing/list_error_feed_issues.py new file mode 100644 index 0000000..113e203 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_error_feed_issues.py @@ -0,0 +1,358 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.feed_list_api_response import FeedListApiResponse +from ...models.list_error_feed_issues_sort_by import ListErrorFeedIssuesSortBy +from ...models.list_error_feed_issues_sort_dir import ListErrorFeedIssuesSortDir +from ...models.list_error_feed_issues_source import ListErrorFeedIssuesSource +from ...models.list_error_feed_issues_status import ListErrorFeedIssuesStatus +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + status: ListErrorFeedIssuesStatus | Unset = UNSET, + fix_layer: str | Unset = UNSET, + source: ListErrorFeedIssuesSource | Unset = UNSET, + issue_group: str | Unset = UNSET, + time_range_days: int | Unset = UNSET, + sort_by: ListErrorFeedIssuesSortBy | Unset = ListErrorFeedIssuesSortBy.LAST_SEEN, + sort_dir: ListErrorFeedIssuesSortDir | Unset = ListErrorFeedIssuesSortDir.DESC, + limit: int | Unset = 25, + offset: int | Unset = 0, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params["search"] = search + + json_status: str | Unset = UNSET + if not isinstance(status, Unset): + json_status = status.value + + params["status"] = json_status + + params["fix_layer"] = fix_layer + + json_source: str | Unset = UNSET + if not isinstance(source, Unset): + json_source = source.value + + params["source"] = json_source + + params["issue_group"] = issue_group + + params["time_range_days"] = time_range_days + + json_sort_by: str | Unset = UNSET + if not isinstance(sort_by, Unset): + json_sort_by = sort_by.value + + params["sort_by"] = json_sort_by + + json_sort_dir: str | Unset = UNSET + if not isinstance(sort_dir, Unset): + json_sort_dir = sort_dir.value + + params["sort_dir"] = json_sort_dir + + params["limit"] = limit + + params["offset"] = offset + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/feed/issues/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = FeedListApiResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 403: + response_403 = ApiErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = ApiErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + status: ListErrorFeedIssuesStatus | Unset = UNSET, + fix_layer: str | Unset = UNSET, + source: ListErrorFeedIssuesSource | Unset = UNSET, + issue_group: str | Unset = UNSET, + time_range_days: int | Unset = UNSET, + sort_by: ListErrorFeedIssuesSortBy | Unset = ListErrorFeedIssuesSortBy.LAST_SEEN, + sort_dir: ListErrorFeedIssuesSortDir | Unset = ListErrorFeedIssuesSortDir.DESC, + limit: int | Unset = 25, + offset: int | Unset = 0, +) -> Response[ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + + Args: + project_id (UUID | Unset): + search (str | Unset): + status (ListErrorFeedIssuesStatus | Unset): + fix_layer (str | Unset): + source (ListErrorFeedIssuesSource | Unset): + issue_group (str | Unset): + time_range_days (int | Unset): + sort_by (ListErrorFeedIssuesSortBy | Unset): Default: + ListErrorFeedIssuesSortBy.LAST_SEEN. + sort_dir (ListErrorFeedIssuesSortDir | Unset): Default: ListErrorFeedIssuesSortDir.DESC. + limit (int | Unset): Default: 25. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + search=search, + status=status, + fix_layer=fix_layer, + source=source, + issue_group=issue_group, + time_range_days=time_range_days, + sort_by=sort_by, + sort_dir=sort_dir, + limit=limit, + offset=offset, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + status: ListErrorFeedIssuesStatus | Unset = UNSET, + fix_layer: str | Unset = UNSET, + source: ListErrorFeedIssuesSource | Unset = UNSET, + issue_group: str | Unset = UNSET, + time_range_days: int | Unset = UNSET, + sort_by: ListErrorFeedIssuesSortBy | Unset = ListErrorFeedIssuesSortBy.LAST_SEEN, + sort_dir: ListErrorFeedIssuesSortDir | Unset = ListErrorFeedIssuesSortDir.DESC, + limit: int | Unset = 25, + offset: int | Unset = 0, +) -> ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + + Args: + project_id (UUID | Unset): + search (str | Unset): + status (ListErrorFeedIssuesStatus | Unset): + fix_layer (str | Unset): + source (ListErrorFeedIssuesSource | Unset): + issue_group (str | Unset): + time_range_days (int | Unset): + sort_by (ListErrorFeedIssuesSortBy | Unset): Default: + ListErrorFeedIssuesSortBy.LAST_SEEN. + sort_dir (ListErrorFeedIssuesSortDir | Unset): Default: ListErrorFeedIssuesSortDir.DESC. + limit (int | Unset): Default: 25. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + project_id=project_id, + search=search, + status=status, + fix_layer=fix_layer, + source=source, + issue_group=issue_group, + time_range_days=time_range_days, + sort_by=sort_by, + sort_dir=sort_dir, + limit=limit, + offset=offset, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + status: ListErrorFeedIssuesStatus | Unset = UNSET, + fix_layer: str | Unset = UNSET, + source: ListErrorFeedIssuesSource | Unset = UNSET, + issue_group: str | Unset = UNSET, + time_range_days: int | Unset = UNSET, + sort_by: ListErrorFeedIssuesSortBy | Unset = ListErrorFeedIssuesSortBy.LAST_SEEN, + sort_dir: ListErrorFeedIssuesSortDir | Unset = ListErrorFeedIssuesSortDir.DESC, + limit: int | Unset = 25, + offset: int | Unset = 0, +) -> Response[ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse]: + """GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + + Args: + project_id (UUID | Unset): + search (str | Unset): + status (ListErrorFeedIssuesStatus | Unset): + fix_layer (str | Unset): + source (ListErrorFeedIssuesSource | Unset): + issue_group (str | Unset): + time_range_days (int | Unset): + sort_by (ListErrorFeedIssuesSortBy | Unset): Default: + ListErrorFeedIssuesSortBy.LAST_SEEN. + sort_dir (ListErrorFeedIssuesSortDir | Unset): Default: ListErrorFeedIssuesSortDir.DESC. + limit (int | Unset): Default: 25. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + search=search, + status=status, + fix_layer=fix_layer, + source=source, + issue_group=issue_group, + time_range_days=time_range_days, + sort_by=sort_by, + sort_dir=sort_dir, + limit=limit, + offset=offset, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + status: ListErrorFeedIssuesStatus | Unset = UNSET, + fix_layer: str | Unset = UNSET, + source: ListErrorFeedIssuesSource | Unset = UNSET, + issue_group: str | Unset = UNSET, + time_range_days: int | Unset = UNSET, + sort_by: ListErrorFeedIssuesSortBy | Unset = ListErrorFeedIssuesSortBy.LAST_SEEN, + sort_dir: ListErrorFeedIssuesSortDir | Unset = ListErrorFeedIssuesSortDir.DESC, + limit: int | Unset = 25, + offset: int | Unset = 0, +) -> ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse | None: + """GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + + Args: + project_id (UUID | Unset): + search (str | Unset): + status (ListErrorFeedIssuesStatus | Unset): + fix_layer (str | Unset): + source (ListErrorFeedIssuesSource | Unset): + issue_group (str | Unset): + time_range_days (int | Unset): + sort_by (ListErrorFeedIssuesSortBy | Unset): Default: + ListErrorFeedIssuesSortBy.LAST_SEEN. + sort_dir (ListErrorFeedIssuesSortDir | Unset): Default: ListErrorFeedIssuesSortDir.DESC. + limit (int | Unset): Default: 25. + offset (int | Unset): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | FeedListApiResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + project_id=project_id, + search=search, + status=status, + fix_layer=fix_layer, + source=source, + issue_group=issue_group, + time_range_days=time_range_days, + sort_by=sort_by, + sort_dir=sort_dir, + limit=limit, + offset=offset, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_trace_annotation_labels.py b/python/fi/generated/openapi_client/api/tracing/list_trace_annotation_labels.py new file mode 100644 index 0000000..1c22227 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_trace_annotation_labels.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.get_annotation_labels_response import GetAnnotationLabelsResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + project_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/get-annotation-labels/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = GetAnnotationLabelsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> Response[ + ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse +]: + """ + Args: + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse | None: + """ + Args: + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + project_id=project_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> Response[ + ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse +]: + """ + Args: + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, +) -> ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse | None: + """ + Args: + project_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | GetAnnotationLabelsResponse | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + project_id=project_id, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_trace_projects.py b/python/fi/generated/openapi_client/api/tracing/list_trace_projects.py new file mode 100644 index 0000000..883ac89 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_trace_projects.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_trace_projects_response_200 import ListTraceProjectsResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/project/list_projects/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListTraceProjectsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListTraceProjectsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListTraceProjectsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListTraceProjectsResponse200 | ManagementAPIErrorResponse]: + """List projects filtered by organization ID. + + Volume counts come from ClickHouse (fast) instead of a PG + JOIN on observation_spans (was 12+ seconds). + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTraceProjectsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListTraceProjectsResponse200 | ManagementAPIErrorResponse | None: + """List projects filtered by organization ID. + + Volume counts come from ClickHouse (fast) instead of a PG + JOIN on observation_spans (was 12+ seconds). + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTraceProjectsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListTraceProjectsResponse200 | ManagementAPIErrorResponse]: + """List projects filtered by organization ID. + + Volume counts come from ClickHouse (fast) instead of a PG + JOIN on observation_spans (was 12+ seconds). + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTraceProjectsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListTraceProjectsResponse200 | ManagementAPIErrorResponse | None: + """List projects filtered by organization ID. + + Volume counts come from ClickHouse (fast) instead of a PG + JOIN on observation_spans (was 12+ seconds). + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTraceProjectsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_trace_properties.py b/python/fi/generated/openapi_client/api/tracing/list_trace_properties.py new file mode 100644 index 0000000..432a0cd --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_trace_properties.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_trace_properties_response_200 import ListTracePropertiesResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/get_properties/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListTracePropertiesResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListTracePropertiesResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListTracePropertiesResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListTracePropertiesResponse200 | ManagementAPIErrorResponse]: + """Fetch all properties for graphing. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTracePropertiesResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListTracePropertiesResponse200 | ManagementAPIErrorResponse | None: + """Fetch all properties for graphing. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTracePropertiesResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListTracePropertiesResponse200 | ManagementAPIErrorResponse]: + """Fetch all properties for graphing. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTracePropertiesResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListTracePropertiesResponse200 | ManagementAPIErrorResponse | None: + """Fetch all properties for graphing. + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTracePropertiesResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_trace_sessions.py b/python/fi/generated/openapi_client/api/tracing/list_trace_sessions.py new file mode 100644 index 0000000..8fa171d --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_trace_sessions.py @@ -0,0 +1,298 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_trace_sessions_response_200 import ListTraceSessionsResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + user_id: str | Unset = UNSET, + bookmarked: bool | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params["user_id"] = user_id + + params["bookmarked"] = bookmarked + + params["filters"] = filters + + params["sort_params"] = sort_params + + params["page_number"] = page_number + + params["page_size"] = page_size + + params["interval"] = interval + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace-session/list_sessions/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListTraceSessionsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListTraceSessionsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListTraceSessionsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + user_id: str | Unset = UNSET, + bookmarked: bool | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> Response[ListTraceSessionsResponse200 | ManagementAPIErrorResponse]: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + user_id (str | Unset): + bookmarked (bool | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTraceSessionsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_id=project_id, + user_id=user_id, + bookmarked=bookmarked, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + interval=interval, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + user_id: str | Unset = UNSET, + bookmarked: bool | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> ListTraceSessionsResponse200 | ManagementAPIErrorResponse | None: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + user_id (str | Unset): + bookmarked (bool | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTraceSessionsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + project_id=project_id, + user_id=user_id, + bookmarked=bookmarked, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + interval=interval, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + user_id: str | Unset = UNSET, + bookmarked: bool | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> Response[ListTraceSessionsResponse200 | ManagementAPIErrorResponse]: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + user_id (str | Unset): + bookmarked (bool | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTraceSessionsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_id=project_id, + user_id=user_id, + bookmarked=bookmarked, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + interval=interval, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_id: UUID | Unset = UNSET, + user_id: str | Unset = UNSET, + bookmarked: bool | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, + interval: str | Unset = UNSET, +) -> ListTraceSessionsResponse200 | ManagementAPIErrorResponse | None: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_id (UUID | Unset): + user_id (str | Unset): + bookmarked (bool | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + interval (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTraceSessionsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + project_id=project_id, + user_id=user_id, + bookmarked=bookmarked, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + interval=interval, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_trace_users.py b/python/fi/generated/openapi_client/api/tracing/list_trace_users.py new file mode 100644 index 0000000..6664dbf --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_trace_users.py @@ -0,0 +1,249 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.api_error_response import ApiErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.users_response import UsersResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + page_size: int | Unset = UNSET, + current_page_index: int | Unset = UNSET, + sort_params: str | Unset = "[]", + filters: str | Unset = "[]", +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_project_id: str | Unset = UNSET + if not isinstance(project_id, Unset): + json_project_id = str(project_id) + params["project_id"] = json_project_id + + params["search"] = search + + params["page_size"] = page_size + + params["current_page_index"] = current_page_index + + params["sort_params"] = sort_params + + params["filters"] = filters + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/users/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse: + if response.status_code == 200: + response_200 = UsersResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ApiErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 500: + response_500 = ApiErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + page_size: int | Unset = UNSET, + current_page_index: int | Unset = UNSET, + sort_params: str | Unset = "[]", + filters: str | Unset = "[]", +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse]: + """List traces filtered by project ID with optimized queries. + + Args: + project_id (UUID | Unset): + search (str | Unset): + page_size (int | Unset): + current_page_index (int | Unset): + sort_params (str | Unset): Default: '[]'. + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + search=search, + page_size=page_size, + current_page_index=current_page_index, + sort_params=sort_params, + filters=filters, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + page_size: int | Unset = UNSET, + current_page_index: int | Unset = UNSET, + sort_params: str | Unset = "[]", + filters: str | Unset = "[]", +) -> ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse | None: + """List traces filtered by project ID with optimized queries. + + Args: + project_id (UUID | Unset): + search (str | Unset): + page_size (int | Unset): + current_page_index (int | Unset): + sort_params (str | Unset): Default: '[]'. + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse + """ + + return sync_detailed( + client=client, + project_id=project_id, + search=search, + page_size=page_size, + current_page_index=current_page_index, + sort_params=sort_params, + filters=filters, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + page_size: int | Unset = UNSET, + current_page_index: int | Unset = UNSET, + sort_params: str | Unset = "[]", + filters: str | Unset = "[]", +) -> Response[ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse]: + """List traces filtered by project ID with optimized queries. + + Args: + project_id (UUID | Unset): + search (str | Unset): + page_size (int | Unset): + current_page_index (int | Unset): + sort_params (str | Unset): Default: '[]'. + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + search=search, + page_size=page_size, + current_page_index=current_page_index, + sort_params=sort_params, + filters=filters, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + project_id: UUID | Unset = UNSET, + search: str | Unset = UNSET, + page_size: int | Unset = UNSET, + current_page_index: int | Unset = UNSET, + sort_params: str | Unset = "[]", + filters: str | Unset = "[]", +) -> ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse | None: + """List traces filtered by project ID with optimized queries. + + Args: + project_id (UUID | Unset): + search (str | Unset): + page_size (int | Unset): + current_page_index (int | Unset): + sort_params (str | Unset): Default: '[]'. + filters (str | Unset): Default: '[]'. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiErrorResponse | ManagementAPIErrorResponse | UsersResponse + """ + + return ( + await asyncio_detailed( + client=client, + project_id=project_id, + search=search, + page_size=page_size, + current_page_index=current_page_index, + sort_params=sort_params, + filters=filters, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_traces.py b/python/fi/generated/openapi_client/api/tracing/list_traces.py new file mode 100644 index 0000000..a5db2cf --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_traces.py @@ -0,0 +1,266 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_traces_response_200 import ListTracesResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_version_id: UUID, + trace_ids: str | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + json_project_version_id = str(project_version_id) + params["project_version_id"] = json_project_version_id + + params["trace_ids"] = trace_ids + + params["filters"] = filters + + params["sort_params"] = sort_params + + params["page_number"] = page_number + + params["page_size"] = page_size + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/list_traces/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListTracesResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListTracesResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListTracesResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_version_id: UUID, + trace_ids: str | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, +) -> Response[ListTracesResponse200 | ManagementAPIErrorResponse]: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_version_id (UUID): + trace_ids (str | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTracesResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_version_id=project_version_id, + trace_ids=trace_ids, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_version_id: UUID, + trace_ids: str | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, +) -> ListTracesResponse200 | ManagementAPIErrorResponse | None: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_version_id (UUID): + trace_ids (str | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTracesResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + project_version_id=project_version_id, + trace_ids=trace_ids, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_version_id: UUID, + trace_ids: str | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, +) -> Response[ListTracesResponse200 | ManagementAPIErrorResponse]: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_version_id (UUID): + trace_ids (str | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListTracesResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + project_version_id=project_version_id, + trace_ids=trace_ids, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, + project_version_id: UUID, + trace_ids: str | Unset = UNSET, + filters: str | Unset = "[]", + sort_params: str | Unset = "[]", + page_number: int | Unset = 0, + page_size: int | Unset = 30, +) -> ListTracesResponse200 | ManagementAPIErrorResponse | None: + """List traces filtered by project ID and project version ID with optimized queries. + + Args: + page (int | Unset): + limit (int | Unset): + project_version_id (UUID): + trace_ids (str | Unset): + filters (str | Unset): Default: '[]'. + sort_params (str | Unset): Default: '[]'. + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 30. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListTracesResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + project_version_id=project_version_id, + trace_ids=trace_ids, + filters=filters, + sort_params=sort_params, + page_number=page_number, + page_size=page_size, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/list_voice_calls.py b/python/fi/generated/openapi_client/api/tracing/list_voice_calls.py new file mode 100644 index 0000000..8a22aca --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/list_voice_calls.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.list_voice_calls_response_200 import ListVoiceCallsResponse200 +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tracer/trace/list_voice_calls/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ListVoiceCallsResponse200 | ManagementAPIErrorResponse: + if response.status_code == 200: + response_200 = ListVoiceCallsResponse200.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ListVoiceCallsResponse200 | ManagementAPIErrorResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListVoiceCallsResponse200 | ManagementAPIErrorResponse]: + """List voice/conversation traces for a project in an optimized way and + return a response similar to the provided call object schema. + + Query params: + - project_id (required) + - page (1-based, optional, default 1) + - page_size (optional, default 30) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListVoiceCallsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListVoiceCallsResponse200 | ManagementAPIErrorResponse | None: + """List voice/conversation traces for a project in an optimized way and + return a response similar to the provided call object schema. + + Query params: + - project_id (required) + - page (1-based, optional, default 1) + - page_size (optional, default 30) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListVoiceCallsResponse200 | ManagementAPIErrorResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> Response[ListVoiceCallsResponse200 | ManagementAPIErrorResponse]: + """List voice/conversation traces for a project in an optimized way and + return a response similar to the provided call object schema. + + Query params: + - project_id (required) + - page (1-based, optional, default 1) + - page_size (optional, default 30) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListVoiceCallsResponse200 | ManagementAPIErrorResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = UNSET, + limit: int | Unset = UNSET, +) -> ListVoiceCallsResponse200 | ManagementAPIErrorResponse | None: + """List voice/conversation traces for a project in an optimized way and + return a response similar to the provided call object schema. + + Query params: + - project_id (required) + - page (1-based, optional, default 1) + - page_size (optional, default 30) + + Args: + page (int | Unset): + limit (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListVoiceCallsResponse200 | ManagementAPIErrorResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/tracing/update_trace_tags.py b/python/fi/generated/openapi_client/api/tracing/update_trace_tags.py new file mode 100644 index 0000000..e48bbc9 --- /dev/null +++ b/python/fi/generated/openapi_client/api/tracing/update_trace_tags.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.trace_tags_update import TraceTagsUpdate +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: TraceTagsUpdate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/tracer/trace/{id}/tags/".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ManagementAPIErrorResponse | TraceTagsUpdate: + if response.status_code == 200: + response_200 = TraceTagsUpdate.from_dict(response.json()) + + return response_200 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ManagementAPIErrorResponse | TraceTagsUpdate]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceTagsUpdate, +) -> Response[ManagementAPIErrorResponse | TraceTagsUpdate]: + """Update tags for a trace. + + Args: + id (str): + body (TraceTagsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceTagsUpdate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceTagsUpdate, +) -> ManagementAPIErrorResponse | TraceTagsUpdate | None: + """Update tags for a trace. + + Args: + id (str): + body (TraceTagsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceTagsUpdate + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceTagsUpdate, +) -> Response[ManagementAPIErrorResponse | TraceTagsUpdate]: + """Update tags for a trace. + + Args: + id (str): + body (TraceTagsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ManagementAPIErrorResponse | TraceTagsUpdate] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient | Client, + body: TraceTagsUpdate, +) -> ManagementAPIErrorResponse | TraceTagsUpdate | None: + """Update tags for a trace. + + Args: + id (str): + body (TraceTagsUpdate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ManagementAPIErrorResponse | TraceTagsUpdate + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/users/__init__.py b/python/fi/generated/openapi_client/api/users/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/api/users/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/python/fi/generated/openapi_client/api/users/get_current_user.py b/python/fi/generated/openapi_client/api/users/get_current_user.py new file mode 100644 index 0000000..74ac755 --- /dev/null +++ b/python/fi/generated/openapi_client/api/users/get_current_user.py @@ -0,0 +1,149 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.user_info_response import UserInfoResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/accounts/user-info/", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse: + if response.status_code == 200: + response_200 = UserInfoResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse | None: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | UserInfoResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/users/list_organization_members.py b/python/fi/generated/openapi_client/api/users/list_organization_members.py new file mode 100644 index 0000000..b0ecdd1 --- /dev/null +++ b/python/fi/generated/openapi_client/api/users/list_organization_members.py @@ -0,0 +1,295 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.list_organization_members_filter_status_item import ( + ListOrganizationMembersFilterStatusItem, +) +from ...models.list_organization_members_sort import ListOrganizationMembersSort +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.member_list_response import MemberListResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListOrganizationMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListOrganizationMembersSort | Unset = ListOrganizationMembersSort.VALUE_11, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["search"] = search + + json_filter_status: list[str] | Unset = UNSET + if not isinstance(filter_status, Unset): + json_filter_status = [] + for filter_status_item_data in filter_status: + filter_status_item = filter_status_item_data.value + json_filter_status.append(filter_status_item) + + params["filter_status"] = json_filter_status + + json_filter_role: list[str] | Unset = UNSET + if not isinstance(filter_role, Unset): + json_filter_role = filter_role + + params["filter_role"] = json_filter_role + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort.value + + params["sort"] = json_sort + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/accounts/organization/members/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse: + if response.status_code == 200: + response_200 = MemberListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListOrganizationMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListOrganizationMembersSort | Unset = ListOrganizationMembersSort.VALUE_11, +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse]: + """GET /accounts/organization/members/ + + Returns UNION of active members + pending/expired invites. + Status is derived at query time (Active / Pending / Expired). + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListOrganizationMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListOrganizationMembersSort | Unset): Default: + ListOrganizationMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListOrganizationMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListOrganizationMembersSort | Unset = ListOrganizationMembersSort.VALUE_11, +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse | None: + """GET /accounts/organization/members/ + + Returns UNION of active members + pending/expired invites. + Status is derived at query time (Active / Pending / Expired). + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListOrganizationMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListOrganizationMembersSort | Unset): Default: + ListOrganizationMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListOrganizationMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListOrganizationMembersSort | Unset = ListOrganizationMembersSort.VALUE_11, +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse]: + """GET /accounts/organization/members/ + + Returns UNION of active members + pending/expired invites. + Status is derived at query time (Active / Pending / Expired). + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListOrganizationMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListOrganizationMembersSort | Unset): Default: + ListOrganizationMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListOrganizationMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListOrganizationMembersSort | Unset = ListOrganizationMembersSort.VALUE_11, +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse | None: + """GET /accounts/organization/members/ + + Returns UNION of active members + pending/expired invites. + Status is derived at query time (Active / Pending / Expired). + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListOrganizationMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListOrganizationMembersSort | Unset): Default: + ListOrganizationMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/users/list_workspace_members.py b/python/fi/generated/openapi_client/api/users/list_workspace_members.py new file mode 100644 index 0000000..f183739 --- /dev/null +++ b/python/fi/generated/openapi_client/api/users/list_workspace_members.py @@ -0,0 +1,307 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.list_workspace_members_filter_status_item import ( + ListWorkspaceMembersFilterStatusItem, +) +from ...models.list_workspace_members_sort import ListWorkspaceMembersSort +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.member_list_response import MemberListResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListWorkspaceMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListWorkspaceMembersSort | Unset = ListWorkspaceMembersSort.VALUE_11, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["search"] = search + + json_filter_status: list[str] | Unset = UNSET + if not isinstance(filter_status, Unset): + json_filter_status = [] + for filter_status_item_data in filter_status: + filter_status_item = filter_status_item_data.value + json_filter_status.append(filter_status_item) + + params["filter_status"] = json_filter_status + + json_filter_role: list[str] | Unset = UNSET + if not isinstance(filter_role, Unset): + json_filter_role = filter_role + + params["filter_role"] = json_filter_role + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort.value + + params["sort"] = json_sort + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/accounts/workspace/{workspace_id}/members/".format( + workspace_id=quote(str(workspace_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse: + if response.status_code == 200: + response_200 = MemberListResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListWorkspaceMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListWorkspaceMembersSort | Unset = ListWorkspaceMembersSort.VALUE_11, +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse]: + """GET /accounts/workspace//members/ + + Returns members of a specific workspace. + Org Admin+ users who auto-access are included with derived WS Admin role. + + Args: + workspace_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListWorkspaceMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListWorkspaceMembersSort | Unset): Default: ListWorkspaceMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListWorkspaceMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListWorkspaceMembersSort | Unset = ListWorkspaceMembersSort.VALUE_11, +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse | None: + """GET /accounts/workspace//members/ + + Returns members of a specific workspace. + Org Admin+ users who auto-access are included with derived WS Admin role. + + Args: + workspace_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListWorkspaceMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListWorkspaceMembersSort | Unset): Default: ListWorkspaceMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListWorkspaceMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListWorkspaceMembersSort | Unset = ListWorkspaceMembersSort.VALUE_11, +) -> Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse]: + """GET /accounts/workspace//members/ + + Returns members of a specific workspace. + Org Admin+ users who auto-access are included with derived WS Admin role. + + Args: + workspace_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListWorkspaceMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListWorkspaceMembersSort | Unset): Default: ListWorkspaceMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 20, + search: str | Unset = "", + filter_status: list[ListWorkspaceMembersFilterStatusItem] | Unset = UNSET, + filter_role: list[str] | Unset = UNSET, + sort: ListWorkspaceMembersSort | Unset = ListWorkspaceMembersSort.VALUE_11, +) -> AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse | None: + """GET /accounts/workspace//members/ + + Returns members of a specific workspace. + Org Admin+ users who auto-access are included with derived WS Admin role. + + Args: + workspace_id (str): + page (int | Unset): Default: 1. + limit (int | Unset): Default: 20. + search (str | Unset): Default: ''. + filter_status (list[ListWorkspaceMembersFilterStatusItem] | Unset): + filter_role (list[str] | Unset): + sort (ListWorkspaceMembersSort | Unset): Default: ListWorkspaceMembersSort.VALUE_11. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | MemberListResponse + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + page=page, + limit=limit, + search=search, + filter_status=filter_status, + filter_role=filter_role, + sort=sort, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/users/list_workspaces.py b/python/fi/generated/openapi_client/api/users/list_workspaces.py new file mode 100644 index 0000000..012c024 --- /dev/null +++ b/python/fi/generated/openapi_client/api/users/list_workspaces.py @@ -0,0 +1,248 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.workspace_list_paginated_response import WorkspaceListPaginatedResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 1, + limit: int | Unset = 10, + search: str | Unset = "", + sort: str | Unset = "", +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params["search"] = search + + params["sort"] = sort + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/accounts/workspace/list/", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ( + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse +): + if response.status_code == 200: + response_200 = WorkspaceListPaginatedResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 10, + search: str | Unset = "", + sort: str | Unset = "", +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse +]: + """Get paginated list of workspaces + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 10. + search (str | Unset): Default: ''. + sort (str | Unset): Default: ''. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + search=search, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 10, + search: str | Unset = "", + sort: str | Unset = "", +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceListPaginatedResponse + | None +): + """Get paginated list of workspaces + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 10. + search (str | Unset): Default: ''. + sort (str | Unset): Default: ''. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + search=search, + sort=sort, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 10, + search: str | Unset = "", + sort: str | Unset = "", +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse +]: + """Get paginated list of workspaces + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 10. + search (str | Unset): Default: ''. + sort (str | Unset): Default: ''. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + search=search, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + page: int | Unset = 1, + limit: int | Unset = 10, + search: str | Unset = "", + sort: str | Unset = "", +) -> ( + AccountsErrorResponse + | ManagementAPIErrorResponse + | WorkspaceListPaginatedResponse + | None +): + """Get paginated list of workspaces + + Args: + page (int | Unset): Default: 1. + limit (int | Unset): Default: 10. + search (str | Unset): Default: ''. + sort (str | Unset): Default: ''. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | WorkspaceListPaginatedResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + search=search, + sort=sort, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/api/users/switch_workspace.py b/python/fi/generated/openapi_client/api/users/switch_workspace.py new file mode 100644 index 0000000..c1c9c4c --- /dev/null +++ b/python/fi/generated/openapi_client/api/users/switch_workspace.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ...client import AuthenticatedClient, Client +from ...models.accounts_error_response import AccountsErrorResponse +from ...models.management_api_error_response import ManagementAPIErrorResponse +from ...models.switch_workspace import SwitchWorkspace +from ...models.switch_workspace_response import SwitchWorkspaceResponse +from ...types import Response + + +def _get_kwargs( + *, + body: SwitchWorkspace, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/accounts/workspace/switch/", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse: + if response.status_code == 200: + response_200 = SwitchWorkspaceResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = AccountsErrorResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = AccountsErrorResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = AccountsErrorResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = AccountsErrorResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = AccountsErrorResponse.from_dict(response.json()) + + return response_500 + + response_default = ManagementAPIErrorResponse.from_dict(response.json()) + + return response_default + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse +]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: SwitchWorkspace, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse +]: + """Switch to a different workspace with proper validation + + Args: + body (SwitchWorkspace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, + body: SwitchWorkspace, +) -> ( + AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse | None +): + """Switch to a different workspace with proper validation + + Args: + body (SwitchWorkspace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: SwitchWorkspace, +) -> Response[ + AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse +]: + """Switch to a different workspace with proper validation + + Args: + body (SwitchWorkspace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: SwitchWorkspace, +) -> ( + AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse | None +): + """Switch to a different workspace with proper validation + + Args: + body (SwitchWorkspace): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AccountsErrorResponse | ManagementAPIErrorResponse | SwitchWorkspaceResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/python/fi/generated/openapi_client/client.py b/python/fi/generated/openapi_client/client.py new file mode 100644 index 0000000..0ab1589 --- /dev/null +++ b/python/fi/generated/openapi_client/client.py @@ -0,0 +1,282 @@ +import ssl +from typing import Any + +import httpx +from attrs import define, evolve, field + + +@define +class Client: + """A class for keeping track of data related to the API + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str = field(alias="base_url") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: str | bool | ssl.SSLContext = field( + default=True, kw_only=True, alias="verify_ssl" + ) + _follow_redirects: bool = field( + default=False, kw_only=True, alias="follow_redirects" + ) + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _client: httpx.Client | None = field(default=None, init=False) + _async_client: httpx.AsyncClient | None = field(default=None, init=False) + + def with_headers(self, headers: dict[str, str]) -> "Client": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: dict[str, str]) -> "Client": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "Client": + """Get a new client matching this one with a new timeout configuration""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "Client": + """Manually set the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "Client": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client": + """Manually set the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "Client": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) + + +@define +class AuthenticatedClient: + """A Client which has been authenticated for use on secured endpoints + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + token: The token to use for authentication + prefix: The prefix to use for the Authorization header + auth_header_name: The name of the Authorization header + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str = field(alias="base_url") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: str | bool | ssl.SSLContext = field( + default=True, kw_only=True, alias="verify_ssl" + ) + _follow_redirects: bool = field( + default=False, kw_only=True, alias="follow_redirects" + ) + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _client: httpx.Client | None = field(default=None, init=False) + _async_client: httpx.AsyncClient | None = field(default=None, init=False) + + token: str + prefix: str = "Bearer" + auth_header_name: str = "Authorization" + + def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient": + """Get a new client matching this one with a new timeout configuration""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient": + """Manually set the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._headers[self.auth_header_name] = ( + f"{self.prefix} {self.token}" if self.prefix else self.token + ) + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "AuthenticatedClient": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client( + self, async_client: httpx.AsyncClient + ) -> "AuthenticatedClient": + """Manually set the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._headers[self.auth_header_name] = ( + f"{self.prefix} {self.token}" if self.prefix else self.token + ) + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "AuthenticatedClient": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) diff --git a/python/fi/generated/openapi_client/errors.py b/python/fi/generated/openapi_client/errors.py new file mode 100644 index 0000000..5f92e76 --- /dev/null +++ b/python/fi/generated/openapi_client/errors.py @@ -0,0 +1,16 @@ +"""Contains shared errors types that can be raised from API functions""" + + +class UnexpectedStatus(Exception): + """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" + + def __init__(self, status_code: int, content: bytes): + self.status_code = status_code + self.content = content + + super().__init__( + f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" + ) + + +__all__ = ["UnexpectedStatus"] diff --git a/python/fi/generated/openapi_client/models/__init__.py b/python/fi/generated/openapi_client/models/__init__.py new file mode 100644 index 0000000..f06e312 --- /dev/null +++ b/python/fi/generated/openapi_client/models/__init__.py @@ -0,0 +1,3171 @@ +"""Contains all the data models used in inputs/outputs""" + +from .accounts_error_response import AccountsErrorResponse +from .accounts_error_response_details import AccountsErrorResponseDetails +from .accounts_error_response_type import AccountsErrorResponseType +from .add_api_column_request import AddApiColumnRequest +from .add_api_column_request_config import AddApiColumnRequestConfig +from .add_as_new_dataset_request import AddAsNewDatasetRequest +from .add_as_new_dataset_request_columns import AddAsNewDatasetRequestColumns +from .add_eval_configs_request import AddEvalConfigsRequest +from .add_eval_configs_response import AddEvalConfigsResponse +from .add_items import AddItems +from .add_queue_item import AddQueueItem +from .add_queue_item_source_type import AddQueueItemSourceType +from .add_rows_from_file_request import AddRowsFromFileRequest +from .add_run_prompt import AddRunPrompt +from .agent_definition_bulk_delete_request import AgentDefinitionBulkDeleteRequest +from .agent_definition_bulk_delete_response import AgentDefinitionBulkDeleteResponse +from .agent_definition_create_request import AgentDefinitionCreateRequest +from .agent_definition_create_request_agent_type import ( + AgentDefinitionCreateRequestAgentType, +) +from .agent_definition_create_request_authentication_method import ( + AgentDefinitionCreateRequestAuthenticationMethod, +) +from .agent_definition_create_request_livekit_config_json import ( + AgentDefinitionCreateRequestLivekitConfigJson, +) +from .agent_definition_create_request_model_details import ( + AgentDefinitionCreateRequestModelDetails, +) +from .agent_definition_create_request_websocket_headers import ( + AgentDefinitionCreateRequestWebsocketHeaders, +) +from .agent_definition_create_response import AgentDefinitionCreateResponse +from .agent_definition_delete_response import AgentDefinitionDeleteResponse +from .agent_definition_edit_request import AgentDefinitionEditRequest +from .agent_definition_edit_request_agent_type import ( + AgentDefinitionEditRequestAgentType, +) +from .agent_definition_edit_request_authentication_method import ( + AgentDefinitionEditRequestAuthenticationMethod, +) +from .agent_definition_edit_request_livekit_config_json import ( + AgentDefinitionEditRequestLivekitConfigJson, +) +from .agent_definition_edit_request_model_details import ( + AgentDefinitionEditRequestModelDetails, +) +from .agent_definition_edit_request_websocket_headers import ( + AgentDefinitionEditRequestWebsocketHeaders, +) +from .agent_definition_edit_response import AgentDefinitionEditResponse +from .agent_definition_list_response import AgentDefinitionListResponse +from .agent_definition_list_response_agent_type import ( + AgentDefinitionListResponseAgentType, +) +from .agent_definition_list_response_language import AgentDefinitionListResponseLanguage +from .agent_definition_list_response_languages import ( + AgentDefinitionListResponseLanguages, +) +from .agent_definition_list_response_model_details import ( + AgentDefinitionListResponseModelDetails, +) +from .agent_definition_list_response_websocket_headers import ( + AgentDefinitionListResponseWebsocketHeaders, +) +from .agent_definition_response import AgentDefinitionResponse +from .agent_definition_response_agent_type import AgentDefinitionResponseAgentType +from .agent_definition_response_authentication_method import ( + AgentDefinitionResponseAuthenticationMethod, +) +from .agent_definition_response_language import AgentDefinitionResponseLanguage +from .agent_definition_response_languages import AgentDefinitionResponseLanguages +from .agent_definition_response_model_details import AgentDefinitionResponseModelDetails +from .agent_definition_response_websocket_headers import ( + AgentDefinitionResponseWebsocketHeaders, +) +from .agent_flow_graph import AgentFlowGraph +from .agent_flow_graph_edges_item import AgentFlowGraphEdgesItem +from .agent_flow_graph_nodes_item import AgentFlowGraphNodesItem +from .agent_version_activate_response import AgentVersionActivateResponse +from .agent_version_create_request import AgentVersionCreateRequest +from .agent_version_create_request_agent_type import AgentVersionCreateRequestAgentType +from .agent_version_create_request_authentication_method import ( + AgentVersionCreateRequestAuthenticationMethod, +) +from .agent_version_create_request_livekit_config_json import ( + AgentVersionCreateRequestLivekitConfigJson, +) +from .agent_version_create_request_model_details import ( + AgentVersionCreateRequestModelDetails, +) +from .agent_version_create_response import AgentVersionCreateResponse +from .agent_version_delete_response import AgentVersionDeleteResponse +from .agent_version_list_response import AgentVersionListResponse +from .agent_version_list_response_status import AgentVersionListResponseStatus +from .agent_version_response import AgentVersionResponse +from .agent_version_response_configuration_snapshot import ( + AgentVersionResponseConfigurationSnapshot, +) +from .agent_version_response_status import AgentVersionResponseStatus +from .agent_version_restore_response import AgentVersionRestoreResponse +from .agent_version_restore_response_agent import AgentVersionRestoreResponseAgent +from .all_active_tests import AllActiveTests +from .all_active_tests_active_tests import AllActiveTestsActiveTests +from .annotation_label_response import AnnotationLabelResponse +from .annotation_label_response_settings import AnnotationLabelResponseSettings +from .annotation_label_restore_response import AnnotationLabelRestoreResponse +from .annotation_queue import AnnotationQueue +from .annotation_queue_annotator_roles import AnnotationQueueAnnotatorRoles +from .annotation_queue_annotator_roles_additional_property import ( + AnnotationQueueAnnotatorRolesAdditionalProperty, +) +from .annotation_queue_assignment_strategy import AnnotationQueueAssignmentStrategy +from .annotation_queue_status import AnnotationQueueStatus +from .annotation_summary_header import AnnotationSummaryHeader +from .annotation_summary_response import AnnotationSummaryResponse +from .annotation_summary_result import AnnotationSummaryResult +from .annotation_summary_result_annotators_item import ( + AnnotationSummaryResultAnnotatorsItem, +) +from .annotation_summary_result_labels_item import AnnotationSummaryResultLabelsItem +from .annotations_labels import AnnotationsLabels +from .annotations_labels_settings import AnnotationsLabelsSettings +from .annotations_labels_type import AnnotationsLabelsType +from .api_error_response import ApiErrorResponse +from .api_error_response_details import ApiErrorResponseDetails +from .api_error_response_type import ApiErrorResponseType +from .api_error_with_details_response import ApiErrorWithDetailsResponse +from .api_error_with_details_response_details import ApiErrorWithDetailsResponseDetails +from .api_error_with_details_response_type import ApiErrorWithDetailsResponseType +from .api_key import ApiKey +from .api_key_config_json import ApiKeyConfigJson +from .api_selection_too_large_detail import ApiSelectionTooLargeDetail +from .api_selection_too_large_detail_type import ApiSelectionTooLargeDetailType +from .api_selection_too_large_error import ApiSelectionTooLargeError +from .api_selection_too_large_error_type import ApiSelectionTooLargeErrorType +from .api_text_error_response import ApiTextErrorResponse +from .api_text_error_response_details import ApiTextErrorResponseDetails +from .api_text_error_response_type import ApiTextErrorResponseType +from .assign_items import AssignItems +from .assign_items_action import AssignItemsAction +from .automation_rule import AutomationRule +from .automation_rule_conditions import AutomationRuleConditions +from .automation_rule_conditions_filter_item import AutomationRuleConditionsFilterItem +from .automation_rule_conditions_filter_item_filter_config import ( + AutomationRuleConditionsFilterItemFilterConfig, +) +from .automation_rule_conditions_operator import AutomationRuleConditionsOperator +from .automation_rule_conditions_rules_item import AutomationRuleConditionsRulesItem +from .automation_rule_evaluate_accepted_response import ( + AutomationRuleEvaluateAcceptedResponse, +) +from .automation_rule_evaluate_response import AutomationRuleEvaluateResponse +from .automation_rule_evaluate_result import AutomationRuleEvaluateResult +from .automation_rule_scope import AutomationRuleScope +from .automation_rule_source_type import AutomationRuleSourceType +from .automation_rule_trigger_frequency import AutomationRuleTriggerFrequency +from .base_columns_response import BaseColumnsResponse +from .base_columns_response_result import BaseColumnsResponseResult +from .bulk_annotation_annotation_request import BulkAnnotationAnnotationRequest +from .bulk_annotation_note_request import BulkAnnotationNoteRequest +from .bulk_annotation_record_request import BulkAnnotationRecordRequest +from .bulk_annotation_request import BulkAnnotationRequest +from .bulk_annotation_response import BulkAnnotationResponse +from .bulk_annotation_response_result import BulkAnnotationResponseResult +from .bulk_annotation_response_result_errors_type_0_item import ( + BulkAnnotationResponseResultErrorsType0Item, +) +from .bulk_annotation_response_result_warnings_type_0_item import ( + BulkAnnotationResponseResultWarningsType0Item, +) +from .bulk_create_score_item import BulkCreateScoreItem +from .bulk_create_score_item_score_source import BulkCreateScoreItemScoreSource +from .bulk_create_score_item_value import BulkCreateScoreItemValue +from .bulk_create_scores import BulkCreateScores +from .bulk_create_scores_response import BulkCreateScoresResponse +from .bulk_create_scores_result import BulkCreateScoresResult +from .bulk_create_scores_source_type import BulkCreateScoresSourceType +from .bulk_remove_items import BulkRemoveItems +from .call_branch_analysis_response import CallBranchAnalysisResponse +from .call_branch_analysis_response_analysis import CallBranchAnalysisResponseAnalysis +from .call_branch_deviation_create_response import CallBranchDeviationCreateResponse +from .call_branch_deviation_create_response_deviation_data import ( + CallBranchDeviationCreateResponseDeviationData, +) +from .call_execution import CallExecution +from .call_execution_analysis_data import CallExecutionAnalysisData +from .call_execution_call_metadata import CallExecutionCallMetadata +from .call_execution_delete_response import CallExecutionDeleteResponse +from .call_execution_detail import CallExecutionDetail +from .call_execution_detail_customer_cost_breakdown import ( + CallExecutionDetailCustomerCostBreakdown, +) +from .call_execution_detail_customer_latency_metrics import ( + CallExecutionDetailCustomerLatencyMetrics, +) +from .call_execution_detail_simulation_call_type import ( + CallExecutionDetailSimulationCallType, +) +from .call_execution_detail_status import CallExecutionDetailStatus +from .call_execution_detail_tool_outputs import CallExecutionDetailToolOutputs +from .call_execution_error_localizer_tasks_response import ( + CallExecutionErrorLocalizerTasksResponse, +) +from .call_execution_error_response import CallExecutionErrorResponse +from .call_execution_error_response_details import CallExecutionErrorResponseDetails +from .call_execution_error_response_type import CallExecutionErrorResponseType +from .call_execution_eval_outputs import CallExecutionEvalOutputs +from .call_execution_evaluation_data import CallExecutionEvaluationData +from .call_execution_logs_response import CallExecutionLogsResponse +from .call_execution_provider_call_data import CallExecutionProviderCallData +from .call_execution_rerun import CallExecutionRerun +from .call_execution_rerun_rerun_type import CallExecutionRerunRerunType +from .call_execution_simulation_call_type import CallExecutionSimulationCallType +from .call_execution_status import CallExecutionStatus +from .call_execution_status_update import CallExecutionStatusUpdate +from .call_execution_status_update_status import CallExecutionStatusUpdateStatus +from .call_log_entry_response import CallLogEntryResponse +from .call_log_entry_response_attributes import CallLogEntryResponseAttributes +from .call_log_entry_response_payload import CallLogEntryResponsePayload +from .call_transcript import CallTranscript +from .call_transcript_response import CallTranscriptResponse +from .call_transcript_speaker_role import CallTranscriptSpeakerRole +from .cancel_test_execution_response import CancelTestExecutionResponse +from .chat_message_contract import ChatMessageContract +from .chat_message_contract_metadata import ChatMessageContractMetadata +from .chat_message_contract_role import ChatMessageContractRole +from .chat_sdk_code_response import ChatSDKCodeResponse +from .chat_sdk_code_result import ChatSDKCodeResult +from .chat_send_message_response import ChatSendMessageResponse +from .chat_send_message_result import ChatSendMessageResult +from .chat_tool_call import ChatToolCall +from .chat_tool_call_function import ChatToolCallFunction +from .cicd_evaluation_item import CICDEvaluationItem +from .cicd_evaluation_item_config import CICDEvaluationItemConfig +from .cicd_evaluation_item_inputs import CICDEvaluationItemInputs +from .cicd_job import CICDJob +from .classify_column_request import ClassifyColumnRequest +from .clone_dataset_request import CloneDatasetRequest +from .co_occurring_issue import CoOccurringIssue +from .column import Column +from .column_data_type import ColumnDataType +from .column_definition import ColumnDefinition +from .column_definition_data_type import ColumnDefinitionDataType +from .column_order import ColumnOrder +from .column_source import ColumnSource +from .column_type_conversion_response import ColumnTypeConversionResponse +from .column_type_conversion_result import ColumnTypeConversionResult +from .column_type_conversion_result_invalid_values_item import ( + ColumnTypeConversionResultInvalidValuesItem, +) +from .column_type_conversion_result_valid_conversion_samples import ( + ColumnTypeConversionResultValidConversionSamples, +) +from .compare_dataset import CompareDataset +from .compare_dataset_dataset_info import CompareDatasetDatasetInfo +from .compare_dataset_delete_response import CompareDatasetDeleteResponse +from .compare_dataset_delete_result import CompareDatasetDeleteResult +from .compare_dataset_metadata import CompareDatasetMetadata +from .compare_dataset_response import CompareDatasetResponse +from .compare_dataset_result import CompareDatasetResult +from .compare_dataset_result_column_config_item import ( + CompareDatasetResultColumnConfigItem, +) +from .compare_dataset_result_table_item import CompareDatasetResultTableItem +from .compare_dataset_row_response import CompareDatasetRowResponse +from .compare_dataset_row_result import CompareDatasetRowResult +from .compare_dataset_row_result_table_item import CompareDatasetRowResultTableItem +from .compare_dataset_stats_request import CompareDatasetStatsRequest +from .compare_dataset_stats_request_stat_type import CompareDatasetStatsRequestStatType +from .compare_dataset_stats_response import CompareDatasetStatsResponse +from .compare_dataset_stats_response_result import CompareDatasetStatsResponseResult +from .compare_dataset_stats_response_result_additional_property_item import ( + CompareDatasetStatsResponseResultAdditionalPropertyItem, +) +from .compare_eval_list_response import CompareEvalListResponse +from .compare_eval_list_result import CompareEvalListResult +from .compare_eval_list_result_evals_item import CompareEvalListResultEvalsItem +from .compare_evals_list_request import CompareEvalsListRequest +from .compare_evals_list_request_eval_type import CompareEvalsListRequestEvalType +from .compare_experiment_eval_request import CompareExperimentEvalRequest +from .compare_experiment_eval_request_composite_weight_overrides import ( + CompareExperimentEvalRequestCompositeWeightOverrides, +) +from .compare_experiment_eval_request_config import CompareExperimentEvalRequestConfig +from .compare_preview_run_eval_request import ComparePreviewRunEvalRequest +from .compare_preview_run_eval_request_config import ComparePreviewRunEvalRequestConfig +from .compare_preview_run_eval_request_dataset_info import ( + ComparePreviewRunEvalRequestDatasetInfo, +) +from .compare_start_evals_request import CompareStartEvalsRequest +from .composite_child_item import CompositeChildItem +from .composite_child_result import CompositeChildResult +from .composite_child_result_error_localizer_result import ( + CompositeChildResultErrorLocalizerResult, +) +from .composite_child_result_output import CompositeChildResultOutput +from .composite_eval_adhoc_execute_request import CompositeEvalAdhocExecuteRequest +from .composite_eval_adhoc_execute_request_aggregation_function import ( + CompositeEvalAdhocExecuteRequestAggregationFunction, +) +from .composite_eval_adhoc_execute_request_call_context import ( + CompositeEvalAdhocExecuteRequestCallContext, +) +from .composite_eval_adhoc_execute_request_child_weights import ( + CompositeEvalAdhocExecuteRequestChildWeights, +) +from .composite_eval_adhoc_execute_request_composite_child_axis import ( + CompositeEvalAdhocExecuteRequestCompositeChildAxis, +) +from .composite_eval_adhoc_execute_request_config import ( + CompositeEvalAdhocExecuteRequestConfig, +) +from .composite_eval_adhoc_execute_request_input_data_types import ( + CompositeEvalAdhocExecuteRequestInputDataTypes, +) +from .composite_eval_adhoc_execute_request_mapping import ( + CompositeEvalAdhocExecuteRequestMapping, +) +from .composite_eval_adhoc_execute_request_row_context import ( + CompositeEvalAdhocExecuteRequestRowContext, +) +from .composite_eval_adhoc_execute_request_session_context import ( + CompositeEvalAdhocExecuteRequestSessionContext, +) +from .composite_eval_adhoc_execute_request_span_context import ( + CompositeEvalAdhocExecuteRequestSpanContext, +) +from .composite_eval_adhoc_execute_request_trace_context import ( + CompositeEvalAdhocExecuteRequestTraceContext, +) +from .composite_eval_create_request import CompositeEvalCreateRequest +from .composite_eval_create_request_aggregation_function import ( + CompositeEvalCreateRequestAggregationFunction, +) +from .composite_eval_create_request_child_weights import ( + CompositeEvalCreateRequestChildWeights, +) +from .composite_eval_create_request_composite_child_axis import ( + CompositeEvalCreateRequestCompositeChildAxis, +) +from .composite_eval_create_response import CompositeEvalCreateResponse +from .composite_eval_create_response_result import CompositeEvalCreateResponseResult +from .composite_eval_detail_response import CompositeEvalDetailResponse +from .composite_eval_detail_response_result import CompositeEvalDetailResponseResult +from .composite_eval_execute_request import CompositeEvalExecuteRequest +from .composite_eval_execute_request_call_context import ( + CompositeEvalExecuteRequestCallContext, +) +from .composite_eval_execute_request_config import CompositeEvalExecuteRequestConfig +from .composite_eval_execute_request_input_data_types import ( + CompositeEvalExecuteRequestInputDataTypes, +) +from .composite_eval_execute_request_mapping import CompositeEvalExecuteRequestMapping +from .composite_eval_execute_request_row_context import ( + CompositeEvalExecuteRequestRowContext, +) +from .composite_eval_execute_request_session_context import ( + CompositeEvalExecuteRequestSessionContext, +) +from .composite_eval_execute_request_span_context import ( + CompositeEvalExecuteRequestSpanContext, +) +from .composite_eval_execute_request_trace_context import ( + CompositeEvalExecuteRequestTraceContext, +) +from .composite_eval_execute_response import CompositeEvalExecuteResponse +from .composite_eval_execute_response_result import CompositeEvalExecuteResponseResult +from .composite_eval_execute_response_result_error_localizer_results import ( + CompositeEvalExecuteResponseResultErrorLocalizerResults, +) +from .composite_eval_update_request import CompositeEvalUpdateRequest +from .composite_eval_update_request_aggregation_function import ( + CompositeEvalUpdateRequestAggregationFunction, +) +from .composite_eval_update_request_child_weights import ( + CompositeEvalUpdateRequestChildWeights, +) +from .composite_eval_update_request_composite_child_axis import ( + CompositeEvalUpdateRequestCompositeChildAxis, +) +from .conditional_column_request import ConditionalColumnRequest +from .conditional_column_request_config_item import ConditionalColumnRequestConfigItem +from .configure_evaluations import ConfigureEvaluations +from .configure_evaluations_config import ConfigureEvaluationsConfig +from .configure_evaluations_inputs import ConfigureEvaluationsInputs +from .create_dataset_from_experiment_request import CreateDatasetFromExperimentRequest +from .create_dataset_from_local_file_request import CreateDatasetFromLocalFileRequest +from .create_empty_dataset_request import CreateEmptyDatasetRequest +from .create_linear_issue import CreateLinearIssue +from .create_linear_issue_response import CreateLinearIssueResponse +from .create_linear_issue_result import CreateLinearIssueResult +from .create_prompt_simulation_request import CreatePromptSimulationRequest +from .create_run_test import CreateRunTest +from .create_score import CreateScore +from .create_score_score_source import CreateScoreScoreSource +from .create_score_source_type import CreateScoreSourceType +from .create_score_value import CreateScoreValue +from .dataset import Dataset +from .dataset_add_columns_request import DatasetAddColumnsRequest +from .dataset_add_columns_request_new_columns_data_item import ( + DatasetAddColumnsRequestNewColumnsDataItem, +) +from .dataset_add_empty_columns_request import DatasetAddEmptyColumnsRequest +from .dataset_add_empty_rows_request import DatasetAddEmptyRowsRequest +from .dataset_add_rows_from_existing_request import DatasetAddRowsFromExistingRequest +from .dataset_add_rows_from_existing_request_column_mapping import ( + DatasetAddRowsFromExistingRequestColumnMapping, +) +from .dataset_add_rows_request import DatasetAddRowsRequest +from .dataset_add_rows_request_rows_item import DatasetAddRowsRequestRowsItem +from .dataset_behavior_request import DatasetBehaviorRequest +from .dataset_behavior_request_column_config import DatasetBehaviorRequestColumnConfig +from .dataset_behavior_request_dataset_config import DatasetBehaviorRequestDatasetConfig +from .dataset_cell_data_request import DatasetCellDataRequest +from .dataset_cell_data_response import DatasetCellDataResponse +from .dataset_cell_data_response_result import DatasetCellDataResponseResult +from .dataset_cell_data_response_result_additional_property import ( + DatasetCellDataResponseResultAdditionalProperty, +) +from .dataset_cell_value import DatasetCellValue +from .dataset_cell_value_cell_value import DatasetCellValueCellValue +from .dataset_cell_value_feedback_info import DatasetCellValueFeedbackInfo +from .dataset_cell_value_value_infos import DatasetCellValueValueInfos +from .dataset_column_detail_item import DatasetColumnDetailItem +from .dataset_column_detail_response import DatasetColumnDetailResponse +from .dataset_column_detail_result import DatasetColumnDetailResult +from .dataset_columns_mutation_response import DatasetColumnsMutationResponse +from .dataset_columns_mutation_result import DatasetColumnsMutationResult +from .dataset_copy_response import DatasetCopyResponse +from .dataset_copy_result import DatasetCopyResult +from .dataset_create_started_response import DatasetCreateStartedResponse +from .dataset_create_started_result import DatasetCreateStartedResult +from .dataset_creation_progress_response import DatasetCreationProgressResponse +from .dataset_creation_progress_result import DatasetCreationProgressResult +from .dataset_derived_variables_response import DatasetDerivedVariablesResponse +from .dataset_derived_variables_result import DatasetDerivedVariablesResult +from .dataset_derived_variables_result_derived_variables import ( + DatasetDerivedVariablesResultDerivedVariables, +) +from .dataset_eval_stats_item import DatasetEvalStatsItem +from .dataset_eval_stats_item_total_avg import DatasetEvalStatsItemTotalAvg +from .dataset_eval_stats_item_total_choices_avg import ( + DatasetEvalStatsItemTotalChoicesAvg, +) +from .dataset_eval_stats_metric import DatasetEvalStatsMetric +from .dataset_eval_stats_metric_output import DatasetEvalStatsMetricOutput +from .dataset_eval_stats_response import DatasetEvalStatsResponse +from .dataset_explanation_summary_response import DatasetExplanationSummaryResponse +from .dataset_explanation_summary_response_result import ( + DatasetExplanationSummaryResponseResult, +) +from .dataset_explanation_summary_response_result_response import ( + DatasetExplanationSummaryResponseResultResponse, +) +from .dataset_json_schema_response import DatasetJsonSchemaResponse +from .dataset_json_schema_response_result import DatasetJsonSchemaResponseResult +from .dataset_list_item import DatasetListItem +from .dataset_list_response import DatasetListResponse +from .dataset_list_result import DatasetListResult +from .dataset_model_type import DatasetModelType +from .dataset_multiple_static_columns_request import DatasetMultipleStaticColumnsRequest +from .dataset_multiple_static_columns_request_columns_item import ( + DatasetMultipleStaticColumnsRequestColumnsItem, +) +from .dataset_name_item import DatasetNameItem +from .dataset_names_response import DatasetNamesResponse +from .dataset_names_result import DatasetNamesResult +from .dataset_row_data_request import DatasetRowDataRequest +from .dataset_row_data_request_filters_item import DatasetRowDataRequestFiltersItem +from .dataset_row_data_request_filters_item_filter_config import ( + DatasetRowDataRequestFiltersItemFilterConfig, +) +from .dataset_row_data_request_sort_item import DatasetRowDataRequestSortItem +from .dataset_row_data_request_sort_item_type import DatasetRowDataRequestSortItemType +from .dataset_row_data_response import DatasetRowDataResponse +from .dataset_row_data_result import DatasetRowDataResult +from .dataset_row_data_result_current import DatasetRowDataResultCurrent +from .dataset_row_diff_request import DatasetRowDiffRequest +from .dataset_row_navigation import DatasetRowNavigation +from .dataset_rows_import_message_response import DatasetRowsImportMessageResponse +from .dataset_rows_import_message_result import DatasetRowsImportMessageResult +from .dataset_rows_imported_response import DatasetRowsImportedResponse +from .dataset_rows_imported_result import DatasetRowsImportedResult +from .dataset_run_prompt_stats_prompt import DatasetRunPromptStatsPrompt +from .dataset_run_prompt_stats_response import DatasetRunPromptStatsResponse +from .dataset_run_prompt_stats_result import DatasetRunPromptStatsResult +from .dataset_sdk_rows_code import DatasetSdkRowsCode +from .dataset_sdk_rows_request import DatasetSdkRowsRequest +from .dataset_sdk_rows_response import DatasetSdkRowsResponse +from .dataset_sdk_rows_result import DatasetSdkRowsResult +from .dataset_sdk_rows_result_api_keys import DatasetSdkRowsResultApiKeys +from .dataset_source import DatasetSource +from .dataset_static_column_request import DatasetStaticColumnRequest +from .dataset_table_metadata import DatasetTableMetadata +from .dataset_table_response import DatasetTableResponse +from .dataset_table_result import DatasetTableResult +from .dataset_table_result_column_config_item import DatasetTableResultColumnConfigItem +from .dataset_table_result_dataset_config import DatasetTableResultDatasetConfig +from .dataset_table_result_table_item import DatasetTableResultTableItem +from .dataset_update_cell_value_request import DatasetUpdateCellValueRequest +from .dataset_update_column_name_request import DatasetUpdateColumnNameRequest +from .dataset_update_column_type_request import DatasetUpdateColumnTypeRequest +from .deep_analysis_api_response import DeepAnalysisApiResponse +from .deep_analysis_body import DeepAnalysisBody +from .deep_analysis_dispatch_api_response import DeepAnalysisDispatchApiResponse +from .deep_analysis_dispatch_response import DeepAnalysisDispatchResponse +from .deep_analysis_response import DeepAnalysisResponse +from .delete_eval_config_response import DeleteEvalConfigResponse +from .delete_eval_template import DeleteEvalTemplate +from .derived_variable_detail import DerivedVariableDetail +from .derived_variable_detail_raw_sample import DerivedVariableDetailRawSample +from .derived_variable_detail_response import DerivedVariableDetailResponse +from .derived_variable_detail_schema import DerivedVariableDetailSchema +from .derived_variable_extract_request import DerivedVariableExtractRequest +from .derived_variable_preview_request import DerivedVariablePreviewRequest +from .derived_variable_preview_request_content import ( + DerivedVariablePreviewRequestContent, +) +from .develop_dataset_message_response import DevelopDatasetMessageResponse +from .discussion_comment_request import DiscussionCommentRequest +from .discussion_reaction_request import DiscussionReactionRequest +from .discussion_thread_status_request import DiscussionThreadStatusRequest +from .duplicate_dataset_request import DuplicateDatasetRequest +from .duplicate_dataset_response import DuplicateDatasetResponse +from .duplicate_dataset_result import DuplicateDatasetResult +from .duplicate_rows_request import DuplicateRowsRequest +from .duplicate_rows_response import DuplicateRowsResponse +from .duplicate_rows_result import DuplicateRowsResult +from .dynamic_column_create_response import DynamicColumnCreateResponse +from .dynamic_column_create_result import DynamicColumnCreateResult +from .dynamic_column_message_response import DynamicColumnMessageResponse +from .dynamic_column_message_result import DynamicColumnMessageResult +from .edit_run_prompt_column import EditRunPromptColumn +from .empty_request import EmptyRequest +from .error_localizer_task_response import ErrorLocalizerTaskResponse +from .error_localizer_task_response_error_analysis import ( + ErrorLocalizerTaskResponseErrorAnalysis, +) +from .error_localizer_task_response_eval_result import ( + ErrorLocalizerTaskResponseEvalResult, +) +from .error_localizer_task_response_input_data import ( + ErrorLocalizerTaskResponseInputData, +) +from .error_localizer_task_response_input_keys import ( + ErrorLocalizerTaskResponseInputKeys, +) +from .error_localizer_task_response_input_types import ( + ErrorLocalizerTaskResponseInputTypes, +) +from .error_name import ErrorName +from .error_response import ErrorResponse +from .error_response_details import ErrorResponseDetails +from .error_response_type import ErrorResponseType +from .eval_config_definition import EvalConfigDefinition +from .eval_config_definition_config import EvalConfigDefinitionConfig +from .eval_config_definition_filters_item import EvalConfigDefinitionFiltersItem +from .eval_config_definition_filters_item_filter_config import ( + EvalConfigDefinitionFiltersItemFilterConfig, +) +from .eval_config_definition_mapping import EvalConfigDefinitionMapping +from .eval_config_response import EvalConfigResponse +from .eval_config_response_config import EvalConfigResponseConfig +from .eval_config_response_filters import EvalConfigResponseFilters +from .eval_config_response_mapping import EvalConfigResponseMapping +from .eval_config_response_model import EvalConfigResponseModel +from .eval_config_response_status import EvalConfigResponseStatus +from .eval_config_structure import EvalConfigStructure +from .eval_config_structure_config import EvalConfigStructureConfig +from .eval_config_structure_config_params_desc import ( + EvalConfigStructureConfigParamsDesc, +) +from .eval_config_structure_config_params_option import ( + EvalConfigStructureConfigParamsOption, +) +from .eval_config_structure_eval_tags import EvalConfigStructureEvalTags +from .eval_config_structure_function_params_schema import ( + EvalConfigStructureFunctionParamsSchema, +) +from .eval_config_structure_mapping import EvalConfigStructureMapping +from .eval_config_structure_models import EvalConfigStructureModels +from .eval_config_structure_output import EvalConfigStructureOutput +from .eval_config_structure_params import EvalConfigStructureParams +from .eval_config_structure_response import EvalConfigStructureResponse +from .eval_config_structure_result import EvalConfigStructureResult +from .eval_config_update_request import EvalConfigUpdateRequest +from .eval_config_update_request_config import EvalConfigUpdateRequestConfig +from .eval_config_update_request_mapping import EvalConfigUpdateRequestMapping +from .eval_config_update_response import EvalConfigUpdateResponse +from .eval_error_response import EvalErrorResponse +from .eval_error_response_details import EvalErrorResponseDetails +from .eval_error_response_type import EvalErrorResponseType +from .eval_explanation_cluster import EvalExplanationCluster +from .eval_explanation_summary_refresh_response import ( + EvalExplanationSummaryRefreshResponse, +) +from .eval_explanation_summary_refresh_result import EvalExplanationSummaryRefreshResult +from .eval_explanation_summary_response import EvalExplanationSummaryResponse +from .eval_explanation_summary_result import EvalExplanationSummaryResult +from .eval_explanation_summary_result_response import ( + EvalExplanationSummaryResultResponse, +) +from .eval_feedback_list_item import EvalFeedbackListItem +from .eval_feedback_list_response import EvalFeedbackListResponse +from .eval_feedback_list_response_result import EvalFeedbackListResponseResult +from .eval_function_list_response import EvalFunctionListResponse +from .eval_function_list_result import EvalFunctionListResult +from .eval_function_list_result_functions_item import ( + EvalFunctionListResultFunctionsItem, +) +from .eval_list_filters import EvalListFilters +from .eval_list_filters_eval_type_item import EvalListFiltersEvalTypeItem +from .eval_list_filters_output_type_item import EvalListFiltersOutputTypeItem +from .eval_list_filters_template_type_item import EvalListFiltersTemplateTypeItem +from .eval_list_request import EvalListRequest +from .eval_list_request_owner_filter import EvalListRequestOwnerFilter +from .eval_list_request_sort_by import EvalListRequestSortBy +from .eval_list_request_sort_order import EvalListRequestSortOrder +from .eval_list_response import EvalListResponse +from .eval_list_result import EvalListResult +from .eval_list_result_evals_item import EvalListResultEvalsItem +from .eval_metric_entry import EvalMetricEntry +from .eval_metric_entry_composite_weight_overrides import ( + EvalMetricEntryCompositeWeightOverrides, +) +from .eval_metric_entry_config import EvalMetricEntryConfig +from .eval_preview_response import EvalPreviewResponse +from .eval_preview_result import EvalPreviewResult +from .eval_preview_result_responses_item import EvalPreviewResultResponsesItem +from .eval_structure import EvalStructure +from .eval_structure_choices import EvalStructureChoices +from .eval_structure_config import EvalStructureConfig +from .eval_structure_config_params_desc import EvalStructureConfigParamsDesc +from .eval_structure_config_params_option import EvalStructureConfigParamsOption +from .eval_structure_function_params_schema import EvalStructureFunctionParamsSchema +from .eval_structure_mapping import EvalStructureMapping +from .eval_structure_models import EvalStructureModels +from .eval_structure_output import EvalStructureOutput +from .eval_structure_params import EvalStructureParams +from .eval_structure_response import EvalStructureResponse +from .eval_structure_result import EvalStructureResult +from .eval_structure_run_config import EvalStructureRunConfig +from .eval_summary_comparison_response import EvalSummaryComparisonResponse +from .eval_summary_comparison_response_result import EvalSummaryComparisonResponseResult +from .eval_summary_response import EvalSummaryResponse +from .eval_template_bulk_delete_request import EvalTemplateBulkDeleteRequest +from .eval_template_bulk_delete_response import EvalTemplateBulkDeleteResponse +from .eval_template_bulk_delete_response_result import ( + EvalTemplateBulkDeleteResponseResult, +) +from .eval_template_chart_point import EvalTemplateChartPoint +from .eval_template_create_response import EvalTemplateCreateResponse +from .eval_template_create_response_result import EvalTemplateCreateResponseResult +from .eval_template_create_v2_request import EvalTemplateCreateV2Request +from .eval_template_create_v2_request_choice_scores import ( + EvalTemplateCreateV2RequestChoiceScores, +) +from .eval_template_create_v2_request_code_language import ( + EvalTemplateCreateV2RequestCodeLanguage, +) +from .eval_template_create_v2_request_data_injection import ( + EvalTemplateCreateV2RequestDataInjection, +) +from .eval_template_create_v2_request_eval_type import ( + EvalTemplateCreateV2RequestEvalType, +) +from .eval_template_create_v2_request_few_shot_examples_type_0_item import ( + EvalTemplateCreateV2RequestFewShotExamplesType0Item, +) +from .eval_template_create_v2_request_messages_type_0_item import ( + EvalTemplateCreateV2RequestMessagesType0Item, +) +from .eval_template_create_v2_request_mode import EvalTemplateCreateV2RequestMode +from .eval_template_create_v2_request_output_type import ( + EvalTemplateCreateV2RequestOutputType, +) +from .eval_template_create_v2_request_summary import EvalTemplateCreateV2RequestSummary +from .eval_template_create_v2_request_template_format import ( + EvalTemplateCreateV2RequestTemplateFormat, +) +from .eval_template_create_v2_request_tools import EvalTemplateCreateV2RequestTools +from .eval_template_detail_response import EvalTemplateDetailResponse +from .eval_template_detail_response_result import EvalTemplateDetailResponseResult +from .eval_template_detail_response_result_choice_scores import ( + EvalTemplateDetailResponseResultChoiceScores, +) +from .eval_template_detail_response_result_choices import ( + EvalTemplateDetailResponseResultChoices, +) +from .eval_template_detail_response_result_config import ( + EvalTemplateDetailResponseResultConfig, +) +from .eval_template_list_charts_item import EvalTemplateListChartsItem +from .eval_template_list_charts_request import EvalTemplateListChartsRequest +from .eval_template_list_charts_response import EvalTemplateListChartsResponse +from .eval_template_list_charts_response_result import ( + EvalTemplateListChartsResponseResult, +) +from .eval_template_list_charts_response_result_charts import ( + EvalTemplateListChartsResponseResultCharts, +) +from .eval_template_list_item import EvalTemplateListItem +from .eval_template_list_response import EvalTemplateListResponse +from .eval_template_list_response_result import EvalTemplateListResponseResult +from .eval_template_summary import EvalTemplateSummary +from .eval_template_summary_output import EvalTemplateSummaryOutput +from .eval_template_update_response import EvalTemplateUpdateResponse +from .eval_template_update_response_result import EvalTemplateUpdateResponseResult +from .eval_template_update_v2_request import EvalTemplateUpdateV2Request +from .eval_template_update_v2_request_choice_scores import ( + EvalTemplateUpdateV2RequestChoiceScores, +) +from .eval_template_update_v2_request_code_language import ( + EvalTemplateUpdateV2RequestCodeLanguage, +) +from .eval_template_update_v2_request_data_injection import ( + EvalTemplateUpdateV2RequestDataInjection, +) +from .eval_template_update_v2_request_eval_type import ( + EvalTemplateUpdateV2RequestEvalType, +) +from .eval_template_update_v2_request_few_shot_examples_type_0_item import ( + EvalTemplateUpdateV2RequestFewShotExamplesType0Item, +) +from .eval_template_update_v2_request_messages_type_0_item import ( + EvalTemplateUpdateV2RequestMessagesType0Item, +) +from .eval_template_update_v2_request_mode import EvalTemplateUpdateV2RequestMode +from .eval_template_update_v2_request_output_type import ( + EvalTemplateUpdateV2RequestOutputType, +) +from .eval_template_update_v2_request_summary import EvalTemplateUpdateV2RequestSummary +from .eval_template_update_v2_request_template_format import ( + EvalTemplateUpdateV2RequestTemplateFormat, +) +from .eval_template_update_v2_request_tools import EvalTemplateUpdateV2RequestTools +from .eval_template_version_create_request import EvalTemplateVersionCreateRequest +from .eval_template_version_create_request_config_snapshot import ( + EvalTemplateVersionCreateRequestConfigSnapshot, +) +from .eval_template_version_item import EvalTemplateVersionItem +from .eval_template_version_item_config_snapshot import ( + EvalTemplateVersionItemConfigSnapshot, +) +from .eval_template_version_list_response import EvalTemplateVersionListResponse +from .eval_template_version_list_response_result import ( + EvalTemplateVersionListResponseResult, +) +from .eval_template_version_response import EvalTemplateVersionResponse +from .eval_template_version_response_result import EvalTemplateVersionResponseResult +from .eval_template_version_restore_response import EvalTemplateVersionRestoreResponse +from .eval_template_version_restore_response_result import ( + EvalTemplateVersionRestoreResponseResult, +) +from .eval_usage_chart_point import EvalUsageChartPoint +from .eval_usage_feedback import EvalUsageFeedback +from .eval_usage_feedback_value import EvalUsageFeedbackValue +from .eval_usage_log_item import EvalUsageLogItem +from .eval_usage_log_item_detail import EvalUsageLogItemDetail +from .eval_usage_logs import EvalUsageLogs +from .eval_usage_stats import EvalUsageStats +from .eval_usage_stats_response import EvalUsageStatsResponse +from .eval_usage_stats_response_result import EvalUsageStatsResponseResult +from .evaluation_result import EvaluationResult +from .events_over_time_point import EventsOverTimePoint +from .execute_prompt_simulation_request import ExecutePromptSimulationRequest +from .execute_prompt_simulation_response import ExecutePromptSimulationResponse +from .execute_prompt_simulation_result import ExecutePromptSimulationResult +from .execute_run_test import ExecuteRunTest +from .execution_metrics import ExecutionMetrics +from .execution_metrics_status import ExecutionMetricsStatus +from .execution_runs import ExecutionRuns +from .execution_runs_status import ExecutionRunsStatus +from .experiment_comparison_column_metric import ExperimentComparisonColumnMetric +from .experiment_comparison_column_metric_avg_score import ( + ExperimentComparisonColumnMetricAvgScore, +) +from .experiment_comparison_dataset_metric import ExperimentComparisonDatasetMetric +from .experiment_comparison_dataset_metric_normalized_scores import ( + ExperimentComparisonDatasetMetricNormalizedScores, +) +from .experiment_comparison_detail import ExperimentComparisonDetail +from .experiment_comparison_detail_scores_weight import ( + ExperimentComparisonDetailScoresWeight, +) +from .experiment_comparison_details_response import ExperimentComparisonDetailsResponse +from .experiment_comparison_details_result import ExperimentComparisonDetailsResult +from .experiment_comparison_metrics import ExperimentComparisonMetrics +from .experiment_comparison_normalized_metrics import ( + ExperimentComparisonNormalizedMetrics, +) +from .experiment_comparison_raw_metrics import ExperimentComparisonRawMetrics +from .experiment_comparison_weights import ExperimentComparisonWeights +from .experiment_comparison_weights_request import ExperimentComparisonWeightsRequest +from .experiment_comparison_weights_request_weights import ( + ExperimentComparisonWeightsRequestWeights, +) +from .experiment_comparison_weights_scores import ExperimentComparisonWeightsScores +from .experiment_create_v2 import ExperimentCreateV2 +from .experiment_create_v2_experiment_type import ExperimentCreateV2ExperimentType +from .experiment_dataset_comparison_response import ExperimentDatasetComparisonResponse +from .experiment_dataset_comparison_result import ExperimentDatasetComparisonResult +from .experiment_dataset_comparison_result_weights_applied import ( + ExperimentDatasetComparisonResultWeightsApplied, +) +from .experiment_derived_variables_response import ExperimentDerivedVariablesResponse +from .experiment_derived_variables_result import ExperimentDerivedVariablesResult +from .experiment_derived_variables_result_derived_variables import ( + ExperimentDerivedVariablesResultDerivedVariables, +) +from .experiment_detail_v2 import ExperimentDetailV2 +from .experiment_detail_v2_experiment_type import ExperimentDetailV2ExperimentType +from .experiment_detail_v2_status import ExperimentDetailV2Status +from .experiment_evaluation_column_stats import ExperimentEvaluationColumnStats +from .experiment_evaluation_column_stats_avg_score import ( + ExperimentEvaluationColumnStatsAvgScore, +) +from .experiment_evaluation_stats_response import ExperimentEvaluationStatsResponse +from .experiment_evaluation_stats_result import ExperimentEvaluationStatsResult +from .experiment_evaluation_token_usage import ExperimentEvaluationTokenUsage +from .experiment_feedback_create_response import ExperimentFeedbackCreateResponse +from .experiment_feedback_create_result import ExperimentFeedbackCreateResult +from .experiment_feedback_detail_item import ExperimentFeedbackDetailItem +from .experiment_feedback_detail_item_value import ExperimentFeedbackDetailItemValue +from .experiment_feedback_details_response import ExperimentFeedbackDetailsResponse +from .experiment_feedback_details_result import ExperimentFeedbackDetailsResult +from .experiment_feedback_submit_request import ExperimentFeedbackSubmitRequest +from .experiment_feedback_submit_request_action_type import ( + ExperimentFeedbackSubmitRequestActionType, +) +from .experiment_feedback_submit_request_value import ( + ExperimentFeedbackSubmitRequestValue, +) +from .experiment_feedback_submit_response import ExperimentFeedbackSubmitResponse +from .experiment_feedback_submit_result import ExperimentFeedbackSubmitResult +from .experiment_feedback_template_response import ExperimentFeedbackTemplateResponse +from .experiment_feedback_template_result import ExperimentFeedbackTemplateResult +from .experiment_json_schema_response import ExperimentJsonSchemaResponse +from .experiment_json_schema_response_result import ExperimentJsonSchemaResponseResult +from .experiment_list_v2 import ExperimentListV2 +from .experiment_list_v2_experiment_type import ExperimentListV2ExperimentType +from .experiment_list_v2_status import ExperimentListV2Status +from .experiment_name_suggestion_response import ExperimentNameSuggestionResponse +from .experiment_name_suggestion_result import ExperimentNameSuggestionResult +from .experiment_name_validation_response import ExperimentNameValidationResponse +from .experiment_name_validation_result import ExperimentNameValidationResult +from .experiment_rerun_cells import ExperimentRerunCells +from .experiment_rerun_request import ExperimentRerunRequest +from .experiment_row_diff_cell import ExperimentRowDiffCell +from .experiment_row_diff_cell_cell_diff_value import ExperimentRowDiffCellCellDiffValue +from .experiment_row_diff_cell_cell_value import ExperimentRowDiffCellCellValue +from .experiment_row_diff_cell_value_infos import ExperimentRowDiffCellValueInfos +from .experiment_row_diff_response import ExperimentRowDiffResponse +from .experiment_row_diff_response_result import ExperimentRowDiffResponseResult +from .experiment_row_diff_response_result_additional_property import ( + ExperimentRowDiffResponseResultAdditionalProperty, +) +from .experiment_stats_column_config import ExperimentStatsColumnConfig +from .experiment_stats_metadata import ExperimentStatsMetadata +from .experiment_stats_response import ExperimentStatsResponse +from .experiment_stats_result import ExperimentStatsResult +from .experiment_stats_result_table_data_item import ExperimentStatsResultTableDataItem +from .experiment_stop_response import ExperimentStopResponse +from .experiment_stop_result import ExperimentStopResult +from .experiment_stop_workflows_cancelled import ExperimentStopWorkflowsCancelled +from .experiment_string_result_response import ExperimentStringResultResponse +from .experiment_table_rows_column_config import ExperimentTableRowsColumnConfig +from .experiment_table_rows_column_config_average_score import ( + ExperimentTableRowsColumnConfigAverageScore, +) +from .experiment_table_rows_column_config_choices_map import ( + ExperimentTableRowsColumnConfigChoicesMap, +) +from .experiment_table_rows_column_config_group import ( + ExperimentTableRowsColumnConfigGroup, +) +from .experiment_table_rows_metadata import ExperimentTableRowsMetadata +from .experiment_table_rows_metadata_description import ( + ExperimentTableRowsMetadataDescription, +) +from .experiment_table_rows_response import ExperimentTableRowsResponse +from .experiment_table_rows_result import ExperimentTableRowsResult +from .experiment_table_rows_result_table_item import ExperimentTableRowsResultTableItem +from .experiment_update_v2 import ExperimentUpdateV2 +from .experiment_v2_detail_response import ExperimentV2DetailResponse +from .experiment_workflow_response import ExperimentWorkflowResponse +from .experiment_workflow_result import ExperimentWorkflowResult +from .export_annotation_queue_export_format import ExportAnnotationQueueExportFormat +from .extract_entities_request import ExtractEntitiesRequest +from .extract_json_column_request import ExtractJsonColumnRequest +from .failed_rerun_item import FailedRerunItem +from .feed_detail_api_response import FeedDetailApiResponse +from .feed_detail_core import FeedDetailCore +from .feed_list_api_response import FeedListApiResponse +from .feed_list_response import FeedListResponse +from .feed_list_row import FeedListRow +from .feed_sidebar import FeedSidebar +from .feed_sidebar_api_response import FeedSidebarApiResponse +from .feed_stats import FeedStats +from .feed_stats_api_response import FeedStatsApiResponse +from .feed_update_body import FeedUpdateBody +from .feed_update_body_severity import FeedUpdateBodySeverity +from .feed_update_body_status import FeedUpdateBodyStatus +from .feedback import Feedback +from .feedback_source import FeedbackSource +from .get_annotation_labels_response import GetAnnotationLabelsResponse +from .get_trace_annotation import GetTraceAnnotation +from .get_trace_annotation_values_response import GetTraceAnnotationValuesResponse +from .get_trace_annotation_values_result import GetTraceAnnotationValuesResult +from .get_voice_call_detail_response_200 import GetVoiceCallDetailResponse200 +from .ground_truth_config import GroundTruthConfig +from .ground_truth_config_request import GroundTruthConfigRequest +from .ground_truth_config_request_injection_format import ( + GroundTruthConfigRequestInjectionFormat, +) +from .ground_truth_config_request_mode import GroundTruthConfigRequestMode +from .ground_truth_config_response import GroundTruthConfigResponse +from .ground_truth_config_response_result import GroundTruthConfigResponseResult +from .ground_truth_item import GroundTruthItem +from .ground_truth_item_role_mapping import GroundTruthItemRoleMapping +from .ground_truth_item_variable_mapping import GroundTruthItemVariableMapping +from .ground_truth_list_response import GroundTruthListResponse +from .ground_truth_list_response_result import GroundTruthListResponseResult +from .ground_truth_upload_request import GroundTruthUploadRequest +from .ground_truth_upload_request_data_item import GroundTruthUploadRequestDataItem +from .ground_truth_upload_request_role_mapping import ( + GroundTruthUploadRequestRoleMapping, +) +from .ground_truth_upload_request_variable_mapping import ( + GroundTruthUploadRequestVariableMapping, +) +from .ground_truth_upload_response import GroundTruthUploadResponse +from .ground_truth_upload_response_result import GroundTruthUploadResponseResult +from .heatmap_cell import HeatmapCell +from .hugging_face_add_rows_request import HuggingFaceAddRowsRequest +from .hugging_face_dataset_config_request import HuggingFaceDatasetConfigRequest +from .hugging_face_dataset_config_response import HuggingFaceDatasetConfigResponse +from .hugging_face_dataset_config_result import HuggingFaceDatasetConfigResult +from .hugging_face_dataset_config_result_dataset_info import ( + HuggingFaceDatasetConfigResultDatasetInfo, +) +from .hugging_face_dataset_create_request import HuggingFaceDatasetCreateRequest +from .hugging_face_dataset_detail import HuggingFaceDatasetDetail +from .hugging_face_dataset_detail_request import HuggingFaceDatasetDetailRequest +from .hugging_face_dataset_detail_response import HuggingFaceDatasetDetailResponse +from .hugging_face_dataset_detail_response_result import ( + HuggingFaceDatasetDetailResponseResult, +) +from .hugging_face_dataset_list_item import HuggingFaceDatasetListItem +from .hugging_face_dataset_list_request import HuggingFaceDatasetListRequest +from .hugging_face_dataset_list_request_filter_params import ( + HuggingFaceDatasetListRequestFilterParams, +) +from .hugging_face_dataset_list_response import HuggingFaceDatasetListResponse +from .hugging_face_dataset_list_response_result import ( + HuggingFaceDatasetListResponseResult, +) +from .import_annotation_entry import ImportAnnotationEntry +from .import_annotation_entry_value import ImportAnnotationEntryValue +from .import_annotations import ImportAnnotations +from .json_column_schema_entry import JsonColumnSchemaEntry +from .json_column_schema_entry_sample import JsonColumnSchemaEntrySample +from .key_moment import KeyMoment +from .legacy_knowledge_base_create_response import LegacyKnowledgeBaseCreateResponse +from .legacy_knowledge_base_create_result import LegacyKnowledgeBaseCreateResult +from .legacy_knowledge_base_file_row import LegacyKnowledgeBaseFileRow +from .legacy_knowledge_base_files_request import LegacyKnowledgeBaseFilesRequest +from .legacy_knowledge_base_files_request_sort_item import ( + LegacyKnowledgeBaseFilesRequestSortItem, +) +from .legacy_knowledge_base_files_response import LegacyKnowledgeBaseFilesResponse +from .legacy_knowledge_base_files_result import LegacyKnowledgeBaseFilesResult +from .legacy_knowledge_base_list_response import LegacyKnowledgeBaseListResponse +from .legacy_knowledge_base_list_result import LegacyKnowledgeBaseListResult +from .legacy_knowledge_base_mutation_request import LegacyKnowledgeBaseMutationRequest +from .legacy_knowledge_base_mutation_response import LegacyKnowledgeBaseMutationResponse +from .legacy_knowledge_base_mutation_result import LegacyKnowledgeBaseMutationResult +from .legacy_knowledge_base_option import LegacyKnowledgeBaseOption +from .legacy_knowledge_base_sdk_code_response import LegacyKnowledgeBaseSdkCodeResponse +from .legacy_knowledge_base_sdk_code_result import LegacyKnowledgeBaseSdkCodeResult +from .legacy_knowledge_base_table_column import LegacyKnowledgeBaseTableColumn +from .legacy_knowledge_base_table_response import LegacyKnowledgeBaseTableResponse +from .legacy_knowledge_base_table_result import LegacyKnowledgeBaseTableResult +from .legacy_knowledge_base_table_row import LegacyKnowledgeBaseTableRow +from .list_agent_definitions_agent_type import ListAgentDefinitionsAgentType +from .list_alert_logs_response_200 import ListAlertLogsResponse200 +from .list_alerts_response_200 import ListAlertsResponse200 +from .list_all_alert_logs_response_200 import ListAllAlertLogsResponse200 +from .list_annotation_queue_items_ordering import ListAnnotationQueueItemsOrdering +from .list_annotation_queue_items_response_200 import ( + ListAnnotationQueueItemsResponse200, +) +from .list_annotation_queues_response_200 import ListAnnotationQueuesResponse200 +from .list_error_feed_issues_sort_by import ListErrorFeedIssuesSortBy +from .list_error_feed_issues_sort_dir import ListErrorFeedIssuesSortDir +from .list_error_feed_issues_source import ListErrorFeedIssuesSource +from .list_error_feed_issues_status import ListErrorFeedIssuesStatus +from .list_experiments_response_200 import ListExperimentsResponse200 +from .list_organization_members_filter_status_item import ( + ListOrganizationMembersFilterStatusItem, +) +from .list_organization_members_sort import ListOrganizationMembersSort +from .list_personas_response_200 import ListPersonasResponse200 +from .list_run_tests_simulation_type import ListRunTestsSimulationType +from .list_trace_projects_response_200 import ListTraceProjectsResponse200 +from .list_trace_properties_response_200 import ListTracePropertiesResponse200 +from .list_trace_sessions_response_200 import ListTraceSessionsResponse200 +from .list_traces_response_200 import ListTracesResponse200 +from .list_voice_calls_response_200 import ListVoiceCallsResponse200 +from .list_workspace_members_filter_status_item import ( + ListWorkspaceMembersFilterStatusItem, +) +from .list_workspace_members_sort import ListWorkspaceMembersSort +from .local_file_dataset_create_started_response import ( + LocalFileDatasetCreateStartedResponse, +) +from .local_file_dataset_create_started_result import ( + LocalFileDatasetCreateStartedResult, +) +from .management_api_error_response import ManagementAPIErrorResponse +from .management_api_error_response_details import ManagementAPIErrorResponseDetails +from .management_api_error_response_type import ManagementAPIErrorResponseType +from .manual_dataset_create_request import ManualDatasetCreateRequest +from .manual_dataset_create_response import ManualDatasetCreateResponse +from .manual_dataset_create_result import ManualDatasetCreateResult +from .member_list_item import MemberListItem +from .member_list_item_type import MemberListItemType +from .member_list_response import MemberListResponse +from .member_list_result import MemberListResult +from .member_remove import MemberRemove +from .member_role_update import MemberRoleUpdate +from .member_role_update_org_level import MemberRoleUpdateOrgLevel +from .member_role_update_response import MemberRoleUpdateResponse +from .member_role_update_result import MemberRoleUpdateResult +from .member_role_update_result_changes import MemberRoleUpdateResultChanges +from .member_role_update_ws_level import MemberRoleUpdateWsLevel +from .member_user_mutation_response import MemberUserMutationResponse +from .member_user_mutation_result import MemberUserMutationResult +from .member_workspace_access import MemberWorkspaceAccess +from .merge_dataset_request import MergeDatasetRequest +from .merge_dataset_response import MergeDatasetResponse +from .merge_dataset_result import MergeDatasetResult +from .model_hub_annotation_queues_automation_rules_list_response_200 import ( + ModelHubAnnotationQueuesAutomationRulesListResponse200, +) +from .model_hub_annotation_queues_for_source_source_type import ( + ModelHubAnnotationQueuesForSourceSourceType, +) +from .model_hub_annotations_labels_list_type import ModelHubAnnotationsLabelsListType +from .model_hub_api_keys_list_response_200 import ModelHubApiKeysListResponse200 +from .model_hub_develops_get_eval_structure_read_eval_type import ( + ModelHubDevelopsGetEvalStructureReadEvalType, +) +from .model_hub_empty_request import ModelHubEmptyRequest +from .model_hub_error_response import ModelHubErrorResponse +from .model_hub_error_response_details import ModelHubErrorResponseDetails +from .model_hub_error_response_type import ModelHubErrorResponseType +from .model_hub_paginated_response import ModelHubPaginatedResponse +from .model_hub_paginated_response_results_item import ( + ModelHubPaginatedResponseResultsItem, +) +from .model_hub_prompt_history_executions_get_execution_details_response_200 import ( + ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200, +) +from .model_hub_prompt_history_executions_list_response_200 import ( + ModelHubPromptHistoryExecutionsListResponse200, +) +from .model_hub_prompt_labels_get_by_name_response_200 import ( + ModelHubPromptLabelsGetByNameResponse200, +) +from .model_hub_prompt_labels_list_response_200 import ( + ModelHubPromptLabelsListResponse200, +) +from .model_hub_prompt_labels_template_labels_response_200 import ( + ModelHubPromptLabelsTemplateLabelsResponse200, +) +from .model_hub_prompt_templates_get_template_by_name_response_200 import ( + ModelHubPromptTemplatesGetTemplateByNameResponse200, +) +from .model_hub_prompt_templates_list_response_200 import ( + ModelHubPromptTemplatesListResponse200, +) +from .model_hub_scores_for_source_source_type import ModelHubScoresForSourceSourceType +from .model_hub_scores_list_response_200 import ModelHubScoresListResponse200 +from .model_hub_scores_list_source_type import ModelHubScoresListSourceType +from .model_hub_string_result_response import ModelHubStringResultResponse +from .model_hub_text_error_response import ModelHubTextErrorResponse +from .model_hub_text_error_response_details import ModelHubTextErrorResponseDetails +from .model_hub_text_error_response_type import ModelHubTextErrorResponseType +from .observe_graph_data_point import ObserveGraphDataPoint +from .observe_graph_data_request import ObserveGraphDataRequest +from .observe_graph_data_request_filters_item import ObserveGraphDataRequestFiltersItem +from .observe_graph_data_request_filters_item_filter_config import ( + ObserveGraphDataRequestFiltersItemFilterConfig, +) +from .observe_graph_data_request_interval import ObserveGraphDataRequestInterval +from .observe_graph_data_request_req_data_config import ( + ObserveGraphDataRequestReqDataConfig, +) +from .observe_graph_data_request_req_data_config_type import ( + ObserveGraphDataRequestReqDataConfigType, +) +from .observe_graph_data_response import ObserveGraphDataResponse +from .observe_graph_data_result import ObserveGraphDataResult +from .optimiser_analysis_refresh_response import OptimiserAnalysisRefreshResponse +from .optimiser_analysis_refresh_result import OptimiserAnalysisRefreshResult +from .optimiser_analysis_response import OptimiserAnalysisResponse +from .optimiser_analysis_result_payload import OptimiserAnalysisResultPayload +from .optimiser_analysis_result_payload_response import ( + OptimiserAnalysisResultPayloadResponse, +) +from .optimiser_analysis_result_payload_response_additional_property import ( + OptimiserAnalysisResultPayloadResponseAdditionalProperty, +) +from .organization import Organization +from .overview_api_response import OverviewApiResponse +from .overview_response import OverviewResponse +from .pattern_insight import PatternInsight +from .pattern_summary import PatternSummary +from .performance_summary import PerformanceSummary +from .performance_summary_test_run_performance_metrics import ( + PerformanceSummaryTestRunPerformanceMetrics, +) +from .performance_summary_top_performing_scenarios_item import ( + PerformanceSummaryTopPerformingScenariosItem, +) +from .persona import Persona +from .persona_accent import PersonaAccent +from .persona_age_group import PersonaAgeGroup +from .persona_communication_style import PersonaCommunicationStyle +from .persona_conversation_speed import PersonaConversationSpeed +from .persona_create import PersonaCreate +from .persona_create_custom_properties import PersonaCreateCustomProperties +from .persona_custom_properties import PersonaCustomProperties +from .persona_duplicate_request import PersonaDuplicateRequest +from .persona_duplicate_response import PersonaDuplicateResponse +from .persona_emoji_usage import PersonaEmojiUsage +from .persona_field_options import PersonaFieldOptions +from .persona_finished_speaking_sensitivity import PersonaFinishedSpeakingSensitivity +from .persona_gender import PersonaGender +from .persona_interrupt_sensitivity import PersonaInterruptSensitivity +from .persona_keywords import PersonaKeywords +from .persona_languages import PersonaLanguages +from .persona_list import PersonaList +from .persona_list_accent import PersonaListAccent +from .persona_list_age_group import PersonaListAgeGroup +from .persona_list_communication_style import PersonaListCommunicationStyle +from .persona_list_conversation_speed import PersonaListConversationSpeed +from .persona_list_emoji_usage import PersonaListEmojiUsage +from .persona_list_finished_speaking_sensitivity import ( + PersonaListFinishedSpeakingSensitivity, +) +from .persona_list_gender import PersonaListGender +from .persona_list_interrupt_sensitivity import PersonaListInterruptSensitivity +from .persona_list_keywords import PersonaListKeywords +from .persona_list_languages import PersonaListLanguages +from .persona_list_location import PersonaListLocation +from .persona_list_metadata import PersonaListMetadata +from .persona_list_occupation import PersonaListOccupation +from .persona_list_persona_type import PersonaListPersonaType +from .persona_list_personality import PersonaListPersonality +from .persona_list_punctuation import PersonaListPunctuation +from .persona_list_regional_mix import PersonaListRegionalMix +from .persona_list_slang_usage import PersonaListSlangUsage +from .persona_list_tone import PersonaListTone +from .persona_list_typos_frequency import PersonaListTyposFrequency +from .persona_list_verbosity import PersonaListVerbosity +from .persona_location import PersonaLocation +from .persona_metadata import PersonaMetadata +from .persona_occupation import PersonaOccupation +from .persona_persona_type import PersonaPersonaType +from .persona_personality import PersonaPersonality +from .persona_punctuation import PersonaPunctuation +from .persona_regional_mix import PersonaRegionalMix +from .persona_simulation_type import PersonaSimulationType +from .persona_slang_usage import PersonaSlangUsage +from .persona_tone import PersonaTone +from .persona_typos_frequency import PersonaTyposFrequency +from .persona_verbosity import PersonaVerbosity +from .preview_dataset_operation_request import PreviewDatasetOperationRequest +from .preview_dataset_operation_request_config import ( + PreviewDatasetOperationRequestConfig, +) +from .preview_dataset_operation_response import PreviewDatasetOperationResponse +from .preview_dataset_operation_result import PreviewDatasetOperationResult +from .preview_dataset_operation_result_item import PreviewDatasetOperationResultItem +from .preview_dataset_operation_result_item_details import ( + PreviewDatasetOperationResultItemDetails, +) +from .preview_dataset_operation_result_item_input import ( + PreviewDatasetOperationResultItemInput, +) +from .preview_dataset_operation_result_item_output import ( + PreviewDatasetOperationResultItemOutput, +) +from .preview_run_eval_request import PreviewRunEvalRequest +from .preview_run_eval_request_config import PreviewRunEvalRequestConfig +from .preview_run_prompt import PreviewRunPrompt +from .project import Project +from .project_config import ProjectConfig +from .project_metadata import ProjectMetadata +from .project_model_type import ProjectModelType +from .project_session_config import ProjectSessionConfig +from .project_source import ProjectSource +from .project_tags import ProjectTags +from .project_trace_type import ProjectTraceType +from .prompt_config import PromptConfig +from .prompt_config_entry import PromptConfigEntry +from .prompt_config_entry_configuration import PromptConfigEntryConfiguration +from .prompt_config_entry_messages_item import PromptConfigEntryMessagesItem +from .prompt_config_entry_model import PromptConfigEntryModel +from .prompt_config_entry_model_params import PromptConfigEntryModelParams +from .prompt_config_messages_item import PromptConfigMessagesItem +from .prompt_config_output_format import PromptConfigOutputFormat +from .prompt_config_response_format import PromptConfigResponseFormat +from .prompt_config_run_prompt_config import PromptConfigRunPromptConfig +from .prompt_config_tool_choice import PromptConfigToolChoice +from .prompt_config_tools_type_0_item import PromptConfigToolsType0Item +from .prompt_derived_variables_response import PromptDerivedVariablesResponse +from .prompt_derived_variables_result import PromptDerivedVariablesResult +from .prompt_derived_variables_result_derived_variables import ( + PromptDerivedVariablesResultDerivedVariables, +) +from .prompt_history_execution import PromptHistoryExecution +from .prompt_history_execution_evaluation_configs import ( + PromptHistoryExecutionEvaluationConfigs, +) +from .prompt_history_execution_evaluation_results import ( + PromptHistoryExecutionEvaluationResults, +) +from .prompt_history_execution_metadata import PromptHistoryExecutionMetadata +from .prompt_history_execution_output import PromptHistoryExecutionOutput +from .prompt_history_execution_placeholders import PromptHistoryExecutionPlaceholders +from .prompt_label import PromptLabel +from .prompt_label_metadata import PromptLabelMetadata +from .prompt_label_type import PromptLabelType +from .prompt_simulation_list_response import PromptSimulationListResponse +from .prompt_simulation_list_result import PromptSimulationListResult +from .prompt_simulation_run_response import PromptSimulationRunResponse +from .prompt_simulation_scenario_item import PromptSimulationScenarioItem +from .prompt_simulation_scenarios_response import PromptSimulationScenariosResponse +from .prompt_simulation_scenarios_result import PromptSimulationScenariosResult +from .prompt_simulation_template_summary import PromptSimulationTemplateSummary +from .prompt_simulation_update_request import PromptSimulationUpdateRequest +from .prompt_template import PromptTemplate +from .prompt_template_placeholders import PromptTemplatePlaceholders +from .prompt_template_variable_names import PromptTemplateVariableNames +from .provider_status_item import ProviderStatusItem +from .provider_status_response import ProviderStatusResponse +from .provider_status_result import ProviderStatusResult +from .queue_add_items_response import QueueAddItemsResponse +from .queue_add_items_result import QueueAddItemsResult +from .queue_add_label_response import QueueAddLabelResponse +from .queue_add_label_result import QueueAddLabelResult +from .queue_agreement_annotator_pair import QueueAgreementAnnotatorPair +from .queue_agreement_label import QueueAgreementLabel +from .queue_agreement_response import QueueAgreementResponse +from .queue_agreement_result import QueueAgreementResult +from .queue_agreement_result_labels import QueueAgreementResultLabels +from .queue_analytics_annotator_performance import QueueAnalyticsAnnotatorPerformance +from .queue_analytics_response import QueueAnalyticsResponse +from .queue_analytics_result import QueueAnalyticsResult +from .queue_analytics_result_label_distribution import ( + QueueAnalyticsResultLabelDistribution, +) +from .queue_analytics_result_label_distribution_additional_property import ( + QueueAnalyticsResultLabelDistributionAdditionalProperty, +) +from .queue_analytics_result_status_breakdown import QueueAnalyticsResultStatusBreakdown +from .queue_analytics_throughput import QueueAnalyticsThroughput +from .queue_analytics_throughput_daily import QueueAnalyticsThroughputDaily +from .queue_annotate_detail_response import QueueAnnotateDetailResponse +from .queue_annotate_detail_result import QueueAnnotateDetailResult +from .queue_annotate_detail_result_annotations_item import ( + QueueAnnotateDetailResultAnnotationsItem, +) +from .queue_annotate_detail_result_item import QueueAnnotateDetailResultItem +from .queue_annotate_detail_result_labels_item import ( + QueueAnnotateDetailResultLabelsItem, +) +from .queue_annotate_detail_result_progress import QueueAnnotateDetailResultProgress +from .queue_annotate_detail_result_queue import QueueAnnotateDetailResultQueue +from .queue_annotate_detail_result_review_comments_item import ( + QueueAnnotateDetailResultReviewCommentsItem, +) +from .queue_annotate_detail_result_review_threads_item import ( + QueueAnnotateDetailResultReviewThreadsItem, +) +from .queue_annotate_detail_result_span_notes_item import ( + QueueAnnotateDetailResultSpanNotesItem, +) +from .queue_annotator_nested import QueueAnnotatorNested +from .queue_assign_items_response import QueueAssignItemsResponse +from .queue_assign_items_result import QueueAssignItemsResult +from .queue_bulk_remove_items_response import QueueBulkRemoveItemsResponse +from .queue_bulk_remove_items_result import QueueBulkRemoveItemsResult +from .queue_default_queue import QueueDefaultQueue +from .queue_default_request import QueueDefaultRequest +from .queue_default_response import QueueDefaultResponse +from .queue_default_result import QueueDefaultResult +from .queue_default_result_action import QueueDefaultResultAction +from .queue_discussion_response import QueueDiscussionResponse +from .queue_discussion_result import QueueDiscussionResult +from .queue_discussion_result_comment import QueueDiscussionResultComment +from .queue_discussion_result_review_comments_item import ( + QueueDiscussionResultReviewCommentsItem, +) +from .queue_discussion_result_review_threads_item import ( + QueueDiscussionResultReviewThreadsItem, +) +from .queue_discussion_result_thread import QueueDiscussionResultThread +from .queue_export_annotations_response import QueueExportAnnotationsResponse +from .queue_export_annotations_response_result_item import ( + QueueExportAnnotationsResponseResultItem, +) +from .queue_export_column_mapping import QueueExportColumnMapping +from .queue_export_default_mapping import QueueExportDefaultMapping +from .queue_export_field import QueueExportField +from .queue_export_fields_response import QueueExportFieldsResponse +from .queue_export_fields_result import QueueExportFieldsResult +from .queue_export_to_dataset_request import QueueExportToDatasetRequest +from .queue_export_to_dataset_response import QueueExportToDatasetResponse +from .queue_export_to_dataset_result import QueueExportToDatasetResult +from .queue_for_source_entry import QueueForSourceEntry +from .queue_for_source_entry_existing_label_notes import ( + QueueForSourceEntryExistingLabelNotes, +) +from .queue_for_source_entry_existing_scores import QueueForSourceEntryExistingScores +from .queue_for_source_entry_existing_scores_additional_property import ( + QueueForSourceEntryExistingScoresAdditionalProperty, +) +from .queue_for_source_entry_span_notes_item import QueueForSourceEntrySpanNotesItem +from .queue_for_source_item import QueueForSourceItem +from .queue_for_source_queue import QueueForSourceQueue +from .queue_for_source_response import QueueForSourceResponse +from .queue_hard_delete_request import QueueHardDeleteRequest +from .queue_hard_delete_response import QueueHardDeleteResponse +from .queue_hard_delete_result import QueueHardDeleteResult +from .queue_import_annotations_response import QueueImportAnnotationsResponse +from .queue_import_annotations_result import QueueImportAnnotationsResult +from .queue_item import QueueItem +from .queue_item_annotations_response import QueueItemAnnotationsResponse +from .queue_item_metadata import QueueItemMetadata +from .queue_item_navigation_request import QueueItemNavigationRequest +from .queue_item_source_type import QueueItemSourceType +from .queue_item_status import QueueItemStatus +from .queue_label_nested import QueueLabelNested +from .queue_label_request import QueueLabelRequest +from .queue_label_result import QueueLabelResult +from .queue_label_result_settings import QueueLabelResultSettings +from .queue_navigation_response import QueueNavigationResponse +from .queue_navigation_result import QueueNavigationResult +from .queue_navigation_result_next_item import QueueNavigationResultNextItem +from .queue_next_item_response import QueueNextItemResponse +from .queue_next_item_result import QueueNextItemResult +from .queue_next_item_result_item import QueueNextItemResultItem +from .queue_progress_annotator_stat import QueueProgressAnnotatorStat +from .queue_progress_response import QueueProgressResponse +from .queue_progress_result import QueueProgressResult +from .queue_progress_user_progress import QueueProgressUserProgress +from .queue_release_reservation_response import QueueReleaseReservationResponse +from .queue_release_reservation_result import QueueReleaseReservationResult +from .queue_remove_label_response import QueueRemoveLabelResponse +from .queue_remove_label_result import QueueRemoveLabelResult +from .queue_review_item_response import QueueReviewItemResponse +from .queue_review_item_result import QueueReviewItemResult +from .queue_review_item_result_next_item import QueueReviewItemResultNextItem +from .queue_review_item_result_review_comments_item import ( + QueueReviewItemResultReviewCommentsItem, +) +from .queue_review_item_result_review_threads_item import ( + QueueReviewItemResultReviewThreadsItem, +) +from .queue_status_request import QueueStatusRequest +from .queue_status_request_status import QueueStatusRequestStatus +from .queue_status_response import QueueStatusResponse +from .queue_submit_annotations_response import QueueSubmitAnnotationsResponse +from .queue_submit_annotations_result import QueueSubmitAnnotationsResult +from .recommendation import Recommendation +from .representative_trace import RepresentativeTrace +from .representative_trace_recommendations_item import ( + RepresentativeTraceRecommendationsItem, +) +from .representative_trace_root_causes_item import RepresentativeTraceRootCausesItem +from .representative_trace_what_changed import RepresentativeTraceWhatChanged +from .rerun_calls_response import RerunCallsResponse +from .rerun_cell_entry import RerunCellEntry +from .review_item_request import ReviewItemRequest +from .review_item_request_action import ReviewItemRequestAction +from .review_label_comment_request import ReviewLabelCommentRequest +from .root_cause import RootCause +from .run_new_evals_on_test_execution import RunNewEvalsOnTestExecution +from .run_new_evals_response import RunNewEvalsResponse +from .run_prompt_choice_option import RunPromptChoiceOption +from .run_prompt_choice_option_value import RunPromptChoiceOptionValue +from .run_prompt_column_config_response import RunPromptColumnConfigResponse +from .run_prompt_column_config_result import RunPromptColumnConfigResult +from .run_prompt_column_config_result_config import RunPromptColumnConfigResultConfig +from .run_prompt_column_preview_response import RunPromptColumnPreviewResponse +from .run_prompt_column_preview_result import RunPromptColumnPreviewResult +from .run_prompt_column_preview_result_cost import RunPromptColumnPreviewResultCost +from .run_prompt_column_preview_result_responses_item import ( + RunPromptColumnPreviewResultResponsesItem, +) +from .run_prompt_column_preview_result_token_usage import ( + RunPromptColumnPreviewResultTokenUsage, +) +from .run_prompt_options_response import RunPromptOptionsResponse +from .run_prompt_options_result import RunPromptOptionsResult +from .run_prompt_options_result_models_item import RunPromptOptionsResultModelsItem +from .run_prompt_options_result_tool_config import RunPromptOptionsResultToolConfig +from .run_prompt_tool_option import RunPromptToolOption +from .run_prompt_tool_option_config import RunPromptToolOptionConfig +from .run_test_analytics import RunTestAnalytics +from .run_test_analytics_evaluation_score_trends_item import ( + RunTestAnalyticsEvaluationScoreTrendsItem, +) +from .run_test_analytics_fail_rate_trends_item import RunTestAnalyticsFailRateTrendsItem +from .run_test_analytics_performance_comparison_item import ( + RunTestAnalyticsPerformanceComparisonItem, +) +from .run_test_analytics_run_test_info import RunTestAnalyticsRunTestInfo +from .run_test_analytics_summary_stats import RunTestAnalyticsSummaryStats +from .run_test_call_executions_response import RunTestCallExecutionsResponse +from .run_test_call_executions_response_results_item import ( + RunTestCallExecutionsResponseResultsItem, +) +from .run_test_chat_execution_response import RunTestChatExecutionResponse +from .run_test_chat_execution_result import RunTestChatExecutionResult +from .run_test_components_update import RunTestComponentsUpdate +from .run_test_error_response import RunTestErrorResponse +from .run_test_error_response_details import RunTestErrorResponseDetails +from .run_test_error_response_type import RunTestErrorResponseType +from .run_test_execution_response import RunTestExecutionResponse +from .run_test_kp_is_response import RunTestKPIsResponse +from .run_test_kp_is_response_scenario_graphs import RunTestKPIsResponseScenarioGraphs +from .run_test_kp_is_response_scenario_graphs_additional_property import ( + RunTestKPIsResponseScenarioGraphsAdditionalProperty, +) +from .run_test_kp_is_response_scenario_graphs_additional_property_additional_property import ( + RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty, +) +from .run_test_message_response import RunTestMessageResponse +from .run_test_name_response import RunTestNameResponse +from .run_test_name_result import RunTestNameResult +from .run_test_response import RunTestResponse +from .run_test_response_agent_definition_detail import ( + RunTestResponseAgentDefinitionDetail, +) +from .run_test_response_agent_version import RunTestResponseAgentVersion +from .run_test_response_prompt_template_detail import ( + RunTestResponsePromptTemplateDetail, +) +from .run_test_response_prompt_version_detail import RunTestResponsePromptVersionDetail +from .run_test_response_scenarios_detail_item import RunTestResponseScenariosDetailItem +from .run_test_response_simulator_agent_detail import ( + RunTestResponseSimulatorAgentDetail, +) +from .run_test_response_source_type import RunTestResponseSourceType +from .run_test_scenario_item_response import RunTestScenarioItemResponse +from .scenario_add_columns_request import ScenarioAddColumnsRequest +from .scenario_add_columns_response import ScenarioAddColumnsResponse +from .scenario_add_rows_request import ScenarioAddRowsRequest +from .scenario_add_rows_response import ScenarioAddRowsResponse +from .scenario_create_request import ScenarioCreateRequest +from .scenario_create_request_graph import ScenarioCreateRequestGraph +from .scenario_create_request_kind import ScenarioCreateRequestKind +from .scenario_create_request_source_type import ScenarioCreateRequestSourceType +from .scenario_create_response import ScenarioCreateResponse +from .scenario_create_response_status import ScenarioCreateResponseStatus +from .scenario_delete_response import ScenarioDeleteResponse +from .scenario_detail_response import ScenarioDetailResponse +from .scenario_detail_response_graph import ScenarioDetailResponseGraph +from .scenario_detail_response_scenario_type import ScenarioDetailResponseScenarioType +from .scenario_detail_response_status import ScenarioDetailResponseStatus +from .scenario_edit_prompts_request import ScenarioEditPromptsRequest +from .scenario_edit_request import ScenarioEditRequest +from .scenario_edit_request_graph import ScenarioEditRequestGraph +from .scenario_edit_response import ScenarioEditResponse +from .scenario_error_response import ScenarioErrorResponse +from .scenario_error_response_details import ScenarioErrorResponseDetails +from .scenario_error_response_type import ScenarioErrorResponseType +from .scenario_list_response import ScenarioListResponse +from .scenario_prompt_item import ScenarioPromptItem +from .scenario_prompt_item_role import ScenarioPromptItemRole +from .scenario_prompts_update_response import ScenarioPromptsUpdateResponse +from .scenario_response import ScenarioResponse +from .scenario_response_scenario_type import ScenarioResponseScenarioType +from .scenario_response_source_type import ScenarioResponseSourceType +from .scenario_response_status import ScenarioResponseStatus +from .score import Score +from .score_delete_response import ScoreDeleteResponse +from .score_delete_response_result import ScoreDeleteResponseResult +from .score_for_source_response import ScoreForSourceResponse +from .score_for_source_response_span_notes_item import ( + ScoreForSourceResponseSpanNotesItem, +) +from .score_label_settings import ScoreLabelSettings +from .score_response import ScoreResponse +from .score_score_source import ScoreScoreSource +from .score_source_type import ScoreSourceType +from .score_trend import ScoreTrend +from .score_value import ScoreValue +from .sdk_configure_evaluations_request import SDKConfigureEvaluationsRequest +from .sdk_configure_evaluations_request_additional_property import ( + SDKConfigureEvaluationsRequestAdditionalProperty, +) +from .sdk_configure_evaluations_response import SDKConfigureEvaluationsResponse +from .sdk_error_response import SDKErrorResponse +from .sdk_error_response_errors import SDKErrorResponseErrors +from .sdk_eval_template import SDKEvalTemplate +from .sdk_eval_template_choices import SDKEvalTemplateChoices +from .sdk_eval_template_config import SDKEvalTemplateConfig +from .sdk_eval_template_criteria import SDKEvalTemplateCriteria +from .sdk_eval_template_eval_tags import SDKEvalTemplateEvalTags +from .sdk_eval_template_response import SDKEvalTemplateResponse +from .sdk_get_evals_response import SDKGetEvalsResponse +from .sdk_message_result import SDKMessageResult +from .sdk_simulation_analytics_response import SDKSimulationAnalyticsResponse +from .sdk_simulation_analytics_result import SDKSimulationAnalyticsResult +from .sdk_simulation_analytics_result_eval_averages import ( + SDKSimulationAnalyticsResultEvalAverages, +) +from .sdk_simulation_analytics_result_eval_explanation_summary import ( + SDKSimulationAnalyticsResultEvalExplanationSummary, +) +from .sdk_simulation_analytics_result_eval_results_item import ( + SDKSimulationAnalyticsResultEvalResultsItem, +) +from .sdk_simulation_analytics_result_system_summary import ( + SDKSimulationAnalyticsResultSystemSummary, +) +from .sdk_simulation_metrics_response import SDKSimulationMetricsResponse +from .sdk_simulation_metrics_result import SDKSimulationMetricsResult +from .sdk_simulation_metrics_result_chat_metrics import ( + SDKSimulationMetricsResultChatMetrics, +) +from .sdk_simulation_metrics_result_conversation import ( + SDKSimulationMetricsResultConversation, +) +from .sdk_simulation_metrics_result_cost import SDKSimulationMetricsResultCost +from .sdk_simulation_metrics_result_latency import SDKSimulationMetricsResultLatency +from .sdk_simulation_metrics_result_metrics import SDKSimulationMetricsResultMetrics +from .sdk_simulation_runs_response import SDKSimulationRunsResponse +from .sdk_simulation_runs_result import SDKSimulationRunsResult +from .sdk_simulation_runs_result_call_results import SDKSimulationRunsResultCallResults +from .sdk_simulation_runs_result_cost import SDKSimulationRunsResultCost +from .sdk_simulation_runs_result_eval_explanation_summary import ( + SDKSimulationRunsResultEvalExplanationSummary, +) +from .sdk_simulation_runs_result_eval_outputs import SDKSimulationRunsResultEvalOutputs +from .sdk_simulation_runs_result_eval_results_item import ( + SDKSimulationRunsResultEvalResultsItem, +) +from .sdk_simulation_runs_result_latency import SDKSimulationRunsResultLatency +from .sdk_standalone_eval_input import SDKStandaloneEvalInput +from .sdk_standalone_eval_input_additional_property import ( + SDKStandaloneEvalInputAdditionalProperty, +) +from .sdk_standalone_eval_request import SDKStandaloneEvalRequest +from .sdk_standalone_eval_request_config import SDKStandaloneEvalRequestConfig +from .sdk_standalone_eval_response import SDKStandaloneEvalResponse +from .sdk_standalone_eval_result_item import SDKStandaloneEvalResultItem +from .sdk_standalone_eval_result_item_evaluations_item import ( + SDKStandaloneEvalResultItemEvaluationsItem, +) +from .sdk_standalone_eval_v2_request import SDKStandaloneEvalV2Request +from .sdk_standalone_eval_v2_request_config import SDKStandaloneEvalV2RequestConfig +from .sdk_standalone_eval_v2_request_inputs import SDKStandaloneEvalV2RequestInputs +from .sdk_standalone_eval_v2_response import SDKStandaloneEvalV2Response +from .sdk_standalone_eval_v2_result import SDKStandaloneEvalV2Result +from .sdk_standalone_eval_v2_result_result import SDKStandaloneEvalV2ResultResult +from .sdkcicd_evaluation_run_accepted import SDKCICDEvaluationRunAccepted +from .sdkcicd_evaluation_run_accepted_response import ( + SDKCICDEvaluationRunAcceptedResponse, +) +from .sdkcicd_evaluation_run_summary import SDKCICDEvaluationRunSummary +from .sdkcicd_evaluation_run_summary_results_summary import ( + SDKCICDEvaluationRunSummaryResultsSummary, +) +from .sdkcicd_evaluation_runs_response import SDKCICDEvaluationRunsResponse +from .sdkcicd_evaluation_runs_result import SDKCICDEvaluationRunsResult +from .sdkcicd_evaluation_runs_result_status import SDKCICDEvaluationRunsResultStatus +from .selection import Selection +from .selection_filter_item import SelectionFilterItem +from .selection_filter_item_filter_config import SelectionFilterItemFilterConfig +from .selection_mode import SelectionMode +from .selection_source_type import SelectionSourceType +from .send_chat_request import SendChatRequest +from .send_chat_request_metrics import SendChatRequestMetrics +from .session_comparison_response import SessionComparisonResponse +from .session_comparison_result import SessionComparisonResult +from .session_comparison_result_comparison_metrics import ( + SessionComparisonResultComparisonMetrics, +) +from .session_comparison_result_comparison_recordings import ( + SessionComparisonResultComparisonRecordings, +) +from .session_comparison_result_comparison_transcripts import ( + SessionComparisonResultComparisonTranscripts, +) +from .sidebar_ai_metadata import SidebarAIMetadata +from .sidebar_timeline import SidebarTimeline +from .simulate_api_personas_field_options_response_200 import ( + SimulateApiPersonasFieldOptionsResponse200, +) +from .simulate_api_personas_system_personas_response_200 import ( + SimulateApiPersonasSystemPersonasResponse200, +) +from .simulate_api_personas_workspace_personas_response_200 import ( + SimulateApiPersonasWorkspacePersonasResponse200, +) +from .simulate_api_run_tests_list_simulation_type import ( + SimulateApiRunTestsListSimulationType, +) +from .simulate_eval_config_response import SimulateEvalConfigResponse +from .simulate_eval_config_response_config import SimulateEvalConfigResponseConfig +from .simulate_eval_config_response_filters_item import ( + SimulateEvalConfigResponseFiltersItem, +) +from .simulate_eval_config_response_filters_item_filter_config import ( + SimulateEvalConfigResponseFiltersItemFilterConfig, +) +from .simulate_eval_config_response_mapping import SimulateEvalConfigResponseMapping +from .simulate_export_read_type import SimulateExportReadType +from .simulator_agent import SimulatorAgent +from .simulator_agent_delete_response import SimulatorAgentDeleteResponse +from .simulator_agent_list_response import SimulatorAgentListResponse +from .simulator_agent_validation_error_response import ( + SimulatorAgentValidationErrorResponse, +) +from .start_evals_process_request import StartEvalsProcessRequest +from .stop_user_eval_request import StopUserEvalRequest +from .submit_annotation_entry import SubmitAnnotationEntry +from .submit_annotation_entry_value import SubmitAnnotationEntryValue +from .submit_annotations import SubmitAnnotations +from .switch_workspace import SwitchWorkspace +from .switch_workspace_response import SwitchWorkspaceResponse +from .switch_workspace_result import SwitchWorkspaceResult +from .synthetic_data import SyntheticData +from .synthetic_data_dataset import SyntheticDataDataset +from .synthetic_dataset_config import SyntheticDatasetConfig +from .synthetic_dataset_config_dataset import SyntheticDatasetConfigDataset +from .synthetic_dataset_config_payload import SyntheticDatasetConfigPayload +from .synthetic_dataset_config_payload_columns_item import ( + SyntheticDatasetConfigPayloadColumnsItem, +) +from .synthetic_dataset_config_payload_dataset import ( + SyntheticDatasetConfigPayloadDataset, +) +from .synthetic_dataset_config_response import SyntheticDatasetConfigResponse +from .synthetic_dataset_config_result import SyntheticDatasetConfigResult +from .synthetic_dataset_create_started_response import ( + SyntheticDatasetCreateStartedResponse, +) +from .synthetic_dataset_create_started_result import SyntheticDatasetCreateStartedResult +from .synthetic_dataset_creation import SyntheticDatasetCreation +from .synthetic_dataset_creation_dataset import SyntheticDatasetCreationDataset +from .synthetic_dataset_update_data import SyntheticDatasetUpdateData +from .synthetic_dataset_update_response import SyntheticDatasetUpdateResponse +from .synthetic_dataset_update_result import SyntheticDatasetUpdateResult +from .test_execution import TestExecution +from .test_execution_analytics import TestExecutionAnalytics +from .test_execution_analytics_evaluation_categories_over_test_runs import ( + TestExecutionAnalyticsEvaluationCategoriesOverTestRuns, +) +from .test_execution_analytics_fail_rate_over_test_runs import ( + TestExecutionAnalyticsFailRateOverTestRuns, +) +from .test_execution_analytics_metadata import TestExecutionAnalyticsMetadata +from .test_execution_bulk_delete import TestExecutionBulkDelete +from .test_execution_bulk_delete_response import TestExecutionBulkDeleteResponse +from .test_execution_chat_batch_response import TestExecutionChatBatchResponse +from .test_execution_chat_batch_result import TestExecutionChatBatchResult +from .test_execution_column_order import TestExecutionColumnOrder +from .test_execution_column_order_response import TestExecutionColumnOrderResponse +from .test_execution_detail_response import TestExecutionDetailResponse +from .test_execution_detail_response_column_order_item import ( + TestExecutionDetailResponseColumnOrderItem, +) +from .test_execution_detail_response_results_item import ( + TestExecutionDetailResponseResultsItem, +) +from .test_execution_execution_metadata import TestExecutionExecutionMetadata +from .test_execution_item_response import TestExecutionItemResponse +from .test_execution_rerun import TestExecutionRerun +from .test_execution_rerun_rerun_type import TestExecutionRerunRerunType +from .test_execution_rerun_response import TestExecutionRerunResponse +from .test_execution_rerun_result import TestExecutionRerunResult +from .test_execution_rerun_result_failed_reruns_item import ( + TestExecutionRerunResultFailedRerunsItem, +) +from .test_execution_scenario_ids import TestExecutionScenarioIds +from .test_execution_status import TestExecutionStatus +from .test_execution_status_summary import TestExecutionStatusSummary +from .test_execution_status_summary_scenarios_item import ( + TestExecutionStatusSummaryScenariosItem, +) +from .test_execution_transcript_call import TestExecutionTranscriptCall +from .test_execution_transcripts_response import TestExecutionTranscriptsResponse +from .trace import Trace +from .trace_annotation_note_response import TraceAnnotationNoteResponse +from .trace_annotation_value_response import TraceAnnotationValueResponse +from .trace_annotation_value_response_annotation_value import ( + TraceAnnotationValueResponseAnnotationValue, +) +from .trace_annotation_value_response_settings import ( + TraceAnnotationValueResponseSettings, +) +from .trace_error import TraceError +from .trace_evidence import TraceEvidence +from .trace_evidence_fail_reel_item import TraceEvidenceFailReelItem +from .trace_evidence_pass_reel_item import TraceEvidencePassReelItem +from .trace_input import TraceInput +from .trace_metadata import TraceMetadata +from .trace_output import TraceOutput +from .trace_preview import TracePreview +from .trace_session import TraceSession +from .trace_session_graph_data_request import TraceSessionGraphDataRequest +from .trace_session_graph_data_request_filters_item import ( + TraceSessionGraphDataRequestFiltersItem, +) +from .trace_session_graph_data_request_filters_item_filter_config import ( + TraceSessionGraphDataRequestFiltersItemFilterConfig, +) +from .trace_session_graph_data_request_interval import ( + TraceSessionGraphDataRequestInterval, +) +from .trace_session_graph_data_request_req_data_config import ( + TraceSessionGraphDataRequestReqDataConfig, +) +from .trace_session_graph_data_request_req_data_config_type import ( + TraceSessionGraphDataRequestReqDataConfigType, +) +from .trace_summary import TraceSummary +from .trace_tags import TraceTags +from .trace_tags_update import TraceTagsUpdate +from .tracer_trace_agent_graph_response_200 import TracerTraceAgentGraphResponse200 +from .tracer_trace_annotation_list_response_200 import ( + TracerTraceAnnotationListResponse200, +) +from .tracer_trace_get_eval_names_response_200 import TracerTraceGetEvalNamesResponse200 +from .tracer_trace_get_trace_export_data_response_200 import ( + TracerTraceGetTraceExportDataResponse200, +) +from .tracer_trace_get_trace_id_by_index_observe_response_200 import ( + TracerTraceGetTraceIdByIndexObserveResponse200, +) +from .tracer_trace_get_trace_id_by_index_response_200 import ( + TracerTraceGetTraceIdByIndexResponse200, +) +from .tracer_trace_list_response_200 import TracerTraceListResponse200 +from .tracer_trace_list_traces_of_session_response_200 import ( + TracerTraceListTracesOfSessionResponse200, +) +from .tracer_trace_session_get_session_filter_values_response_200 import ( + TracerTraceSessionGetSessionFilterValuesResponse200, +) +from .tracer_trace_session_get_trace_session_export_data_response_200 import ( + TracerTraceSessionGetTraceSessionExportDataResponse200, +) +from .tracer_trace_session_list_response_200 import TracerTraceSessionListResponse200 +from .tracer_user_alerts_list_monitors_response_200 import ( + TracerUserAlertsListMonitorsResponse200, +) +from .traces_aggregates import TracesAggregates +from .traces_list_row import TracesListRow +from .traces_tab_api_response import TracesTabApiResponse +from .traces_tab_response import TracesTabResponse +from .trend_metric import TrendMetric +from .trend_point import TrendPoint +from .trends_tab_api_response import TrendsTabApiResponse +from .trends_tab_response import TrendsTabResponse +from .update_run_test import UpdateRunTest +from .user import User +from .user_alert_monitor import UserAlertMonitor +from .user_alert_monitor_duplicate import UserAlertMonitorDuplicate +from .user_alert_monitor_duplicate_response import UserAlertMonitorDuplicateResponse +from .user_alert_monitor_duplicate_result import UserAlertMonitorDuplicateResult +from .user_alert_monitor_filters import UserAlertMonitorFilters +from .user_alert_monitor_log import UserAlertMonitorLog +from .user_alert_monitor_log_type import UserAlertMonitorLogType +from .user_alert_monitor_logs import UserAlertMonitorLogs +from .user_alert_monitor_metric_option import UserAlertMonitorMetricOption +from .user_alert_monitor_metric_options_response import ( + UserAlertMonitorMetricOptionsResponse, +) +from .user_alert_monitor_metric_type import UserAlertMonitorMetricType +from .user_alert_monitor_threshold_operator import UserAlertMonitorThresholdOperator +from .user_alert_monitor_threshold_type import UserAlertMonitorThresholdType +from .user_code_example_response import UserCodeExampleResponse +from .user_eval_mutation_request import UserEvalMutationRequest +from .user_eval_mutation_request_composite_weight_overrides import ( + UserEvalMutationRequestCompositeWeightOverrides, +) +from .user_eval_mutation_request_config import UserEvalMutationRequestConfig +from .user_eval_update_request import UserEvalUpdateRequest +from .user_eval_update_request_composite_weight_overrides import ( + UserEvalUpdateRequestCompositeWeightOverrides, +) +from .user_eval_update_request_config import UserEvalUpdateRequestConfig +from .user_goals import UserGoals +from .user_info_organization import UserInfoOrganization +from .user_info_response import UserInfoResponse +from .user_info_two_factor_methods import UserInfoTwoFactorMethods +from .user_organization_role import UserOrganizationRole +from .users_response import UsersResponse +from .users_result import UsersResult +from .users_result_table_item import UsersResultTableItem +from .vector_db_column_request import VectorDBColumnRequest +from .vector_db_column_request_embedding_config import ( + VectorDBColumnRequestEmbeddingConfig, +) +from .workspace_access_input import WorkspaceAccessInput +from .workspace_access_input_level import WorkspaceAccessInputLevel +from .workspace_admin_summary import WorkspaceAdminSummary +from .workspace_list_item_response import WorkspaceListItemResponse +from .workspace_list_paginated_response import WorkspaceListPaginatedResponse +from .workspace_member_remove import WorkspaceMemberRemove +from .workspace_member_role_update import WorkspaceMemberRoleUpdate +from .workspace_member_role_update_response import WorkspaceMemberRoleUpdateResponse +from .workspace_member_role_update_result import WorkspaceMemberRoleUpdateResult +from .workspace_member_role_update_ws_level import WorkspaceMemberRoleUpdateWsLevel +from .workspace_summary import WorkspaceSummary + +__all__ = ( + "AccountsErrorResponse", + "AccountsErrorResponseDetails", + "AccountsErrorResponseType", + "AddApiColumnRequest", + "AddApiColumnRequestConfig", + "AddAsNewDatasetRequest", + "AddAsNewDatasetRequestColumns", + "AddEvalConfigsRequest", + "AddEvalConfigsResponse", + "AddItems", + "AddQueueItem", + "AddQueueItemSourceType", + "AddRowsFromFileRequest", + "AddRunPrompt", + "AgentDefinitionBulkDeleteRequest", + "AgentDefinitionBulkDeleteResponse", + "AgentDefinitionCreateRequest", + "AgentDefinitionCreateRequestAgentType", + "AgentDefinitionCreateRequestAuthenticationMethod", + "AgentDefinitionCreateRequestLivekitConfigJson", + "AgentDefinitionCreateRequestModelDetails", + "AgentDefinitionCreateRequestWebsocketHeaders", + "AgentDefinitionCreateResponse", + "AgentDefinitionDeleteResponse", + "AgentDefinitionEditRequest", + "AgentDefinitionEditRequestAgentType", + "AgentDefinitionEditRequestAuthenticationMethod", + "AgentDefinitionEditRequestLivekitConfigJson", + "AgentDefinitionEditRequestModelDetails", + "AgentDefinitionEditRequestWebsocketHeaders", + "AgentDefinitionEditResponse", + "AgentDefinitionListResponse", + "AgentDefinitionListResponseAgentType", + "AgentDefinitionListResponseLanguage", + "AgentDefinitionListResponseLanguages", + "AgentDefinitionListResponseModelDetails", + "AgentDefinitionListResponseWebsocketHeaders", + "AgentDefinitionResponse", + "AgentDefinitionResponseAgentType", + "AgentDefinitionResponseAuthenticationMethod", + "AgentDefinitionResponseLanguage", + "AgentDefinitionResponseLanguages", + "AgentDefinitionResponseModelDetails", + "AgentDefinitionResponseWebsocketHeaders", + "AgentFlowGraph", + "AgentFlowGraphEdgesItem", + "AgentFlowGraphNodesItem", + "AgentVersionActivateResponse", + "AgentVersionCreateRequest", + "AgentVersionCreateRequestAgentType", + "AgentVersionCreateRequestAuthenticationMethod", + "AgentVersionCreateRequestLivekitConfigJson", + "AgentVersionCreateRequestModelDetails", + "AgentVersionCreateResponse", + "AgentVersionDeleteResponse", + "AgentVersionListResponse", + "AgentVersionListResponseStatus", + "AgentVersionResponse", + "AgentVersionResponseConfigurationSnapshot", + "AgentVersionResponseStatus", + "AgentVersionRestoreResponse", + "AgentVersionRestoreResponseAgent", + "AllActiveTests", + "AllActiveTestsActiveTests", + "AnnotationLabelResponse", + "AnnotationLabelResponseSettings", + "AnnotationLabelRestoreResponse", + "AnnotationQueue", + "AnnotationQueueAnnotatorRoles", + "AnnotationQueueAnnotatorRolesAdditionalProperty", + "AnnotationQueueAssignmentStrategy", + "AnnotationQueueStatus", + "AnnotationsLabels", + "AnnotationsLabelsSettings", + "AnnotationsLabelsType", + "AnnotationSummaryHeader", + "AnnotationSummaryResponse", + "AnnotationSummaryResult", + "AnnotationSummaryResultAnnotatorsItem", + "AnnotationSummaryResultLabelsItem", + "ApiErrorResponse", + "ApiErrorResponseDetails", + "ApiErrorResponseType", + "ApiErrorWithDetailsResponse", + "ApiErrorWithDetailsResponseDetails", + "ApiErrorWithDetailsResponseType", + "ApiKey", + "ApiKeyConfigJson", + "ApiSelectionTooLargeDetail", + "ApiSelectionTooLargeDetailType", + "ApiSelectionTooLargeError", + "ApiSelectionTooLargeErrorType", + "ApiTextErrorResponse", + "ApiTextErrorResponseDetails", + "ApiTextErrorResponseType", + "AssignItems", + "AssignItemsAction", + "AutomationRule", + "AutomationRuleConditions", + "AutomationRuleConditionsFilterItem", + "AutomationRuleConditionsFilterItemFilterConfig", + "AutomationRuleConditionsOperator", + "AutomationRuleConditionsRulesItem", + "AutomationRuleEvaluateAcceptedResponse", + "AutomationRuleEvaluateResponse", + "AutomationRuleEvaluateResult", + "AutomationRuleScope", + "AutomationRuleSourceType", + "AutomationRuleTriggerFrequency", + "BaseColumnsResponse", + "BaseColumnsResponseResult", + "BulkAnnotationAnnotationRequest", + "BulkAnnotationNoteRequest", + "BulkAnnotationRecordRequest", + "BulkAnnotationRequest", + "BulkAnnotationResponse", + "BulkAnnotationResponseResult", + "BulkAnnotationResponseResultErrorsType0Item", + "BulkAnnotationResponseResultWarningsType0Item", + "BulkCreateScoreItem", + "BulkCreateScoreItemScoreSource", + "BulkCreateScoreItemValue", + "BulkCreateScores", + "BulkCreateScoresResponse", + "BulkCreateScoresResult", + "BulkCreateScoresSourceType", + "BulkRemoveItems", + "CallBranchAnalysisResponse", + "CallBranchAnalysisResponseAnalysis", + "CallBranchDeviationCreateResponse", + "CallBranchDeviationCreateResponseDeviationData", + "CallExecution", + "CallExecutionAnalysisData", + "CallExecutionCallMetadata", + "CallExecutionDeleteResponse", + "CallExecutionDetail", + "CallExecutionDetailCustomerCostBreakdown", + "CallExecutionDetailCustomerLatencyMetrics", + "CallExecutionDetailSimulationCallType", + "CallExecutionDetailStatus", + "CallExecutionDetailToolOutputs", + "CallExecutionErrorLocalizerTasksResponse", + "CallExecutionErrorResponse", + "CallExecutionErrorResponseDetails", + "CallExecutionErrorResponseType", + "CallExecutionEvalOutputs", + "CallExecutionEvaluationData", + "CallExecutionLogsResponse", + "CallExecutionProviderCallData", + "CallExecutionRerun", + "CallExecutionRerunRerunType", + "CallExecutionSimulationCallType", + "CallExecutionStatus", + "CallExecutionStatusUpdate", + "CallExecutionStatusUpdateStatus", + "CallLogEntryResponse", + "CallLogEntryResponseAttributes", + "CallLogEntryResponsePayload", + "CallTranscript", + "CallTranscriptResponse", + "CallTranscriptSpeakerRole", + "CancelTestExecutionResponse", + "ChatMessageContract", + "ChatMessageContractMetadata", + "ChatMessageContractRole", + "ChatSDKCodeResponse", + "ChatSDKCodeResult", + "ChatSendMessageResponse", + "ChatSendMessageResult", + "ChatToolCall", + "ChatToolCallFunction", + "CICDEvaluationItem", + "CICDEvaluationItemConfig", + "CICDEvaluationItemInputs", + "CICDJob", + "ClassifyColumnRequest", + "CloneDatasetRequest", + "Column", + "ColumnDataType", + "ColumnDefinition", + "ColumnDefinitionDataType", + "ColumnOrder", + "ColumnSource", + "ColumnTypeConversionResponse", + "ColumnTypeConversionResult", + "ColumnTypeConversionResultInvalidValuesItem", + "ColumnTypeConversionResultValidConversionSamples", + "CompareDataset", + "CompareDatasetDatasetInfo", + "CompareDatasetDeleteResponse", + "CompareDatasetDeleteResult", + "CompareDatasetMetadata", + "CompareDatasetResponse", + "CompareDatasetResult", + "CompareDatasetResultColumnConfigItem", + "CompareDatasetResultTableItem", + "CompareDatasetRowResponse", + "CompareDatasetRowResult", + "CompareDatasetRowResultTableItem", + "CompareDatasetStatsRequest", + "CompareDatasetStatsRequestStatType", + "CompareDatasetStatsResponse", + "CompareDatasetStatsResponseResult", + "CompareDatasetStatsResponseResultAdditionalPropertyItem", + "CompareEvalListResponse", + "CompareEvalListResult", + "CompareEvalListResultEvalsItem", + "CompareEvalsListRequest", + "CompareEvalsListRequestEvalType", + "CompareExperimentEvalRequest", + "CompareExperimentEvalRequestCompositeWeightOverrides", + "CompareExperimentEvalRequestConfig", + "ComparePreviewRunEvalRequest", + "ComparePreviewRunEvalRequestConfig", + "ComparePreviewRunEvalRequestDatasetInfo", + "CompareStartEvalsRequest", + "CompositeChildItem", + "CompositeChildResult", + "CompositeChildResultErrorLocalizerResult", + "CompositeChildResultOutput", + "CompositeEvalAdhocExecuteRequest", + "CompositeEvalAdhocExecuteRequestAggregationFunction", + "CompositeEvalAdhocExecuteRequestCallContext", + "CompositeEvalAdhocExecuteRequestChildWeights", + "CompositeEvalAdhocExecuteRequestCompositeChildAxis", + "CompositeEvalAdhocExecuteRequestConfig", + "CompositeEvalAdhocExecuteRequestInputDataTypes", + "CompositeEvalAdhocExecuteRequestMapping", + "CompositeEvalAdhocExecuteRequestRowContext", + "CompositeEvalAdhocExecuteRequestSessionContext", + "CompositeEvalAdhocExecuteRequestSpanContext", + "CompositeEvalAdhocExecuteRequestTraceContext", + "CompositeEvalCreateRequest", + "CompositeEvalCreateRequestAggregationFunction", + "CompositeEvalCreateRequestChildWeights", + "CompositeEvalCreateRequestCompositeChildAxis", + "CompositeEvalCreateResponse", + "CompositeEvalCreateResponseResult", + "CompositeEvalDetailResponse", + "CompositeEvalDetailResponseResult", + "CompositeEvalExecuteRequest", + "CompositeEvalExecuteRequestCallContext", + "CompositeEvalExecuteRequestConfig", + "CompositeEvalExecuteRequestInputDataTypes", + "CompositeEvalExecuteRequestMapping", + "CompositeEvalExecuteRequestRowContext", + "CompositeEvalExecuteRequestSessionContext", + "CompositeEvalExecuteRequestSpanContext", + "CompositeEvalExecuteRequestTraceContext", + "CompositeEvalExecuteResponse", + "CompositeEvalExecuteResponseResult", + "CompositeEvalExecuteResponseResultErrorLocalizerResults", + "CompositeEvalUpdateRequest", + "CompositeEvalUpdateRequestAggregationFunction", + "CompositeEvalUpdateRequestChildWeights", + "CompositeEvalUpdateRequestCompositeChildAxis", + "ConditionalColumnRequest", + "ConditionalColumnRequestConfigItem", + "ConfigureEvaluations", + "ConfigureEvaluationsConfig", + "ConfigureEvaluationsInputs", + "CoOccurringIssue", + "CreateDatasetFromExperimentRequest", + "CreateDatasetFromLocalFileRequest", + "CreateEmptyDatasetRequest", + "CreateLinearIssue", + "CreateLinearIssueResponse", + "CreateLinearIssueResult", + "CreatePromptSimulationRequest", + "CreateRunTest", + "CreateScore", + "CreateScoreScoreSource", + "CreateScoreSourceType", + "CreateScoreValue", + "Dataset", + "DatasetAddColumnsRequest", + "DatasetAddColumnsRequestNewColumnsDataItem", + "DatasetAddEmptyColumnsRequest", + "DatasetAddEmptyRowsRequest", + "DatasetAddRowsFromExistingRequest", + "DatasetAddRowsFromExistingRequestColumnMapping", + "DatasetAddRowsRequest", + "DatasetAddRowsRequestRowsItem", + "DatasetBehaviorRequest", + "DatasetBehaviorRequestColumnConfig", + "DatasetBehaviorRequestDatasetConfig", + "DatasetCellDataRequest", + "DatasetCellDataResponse", + "DatasetCellDataResponseResult", + "DatasetCellDataResponseResultAdditionalProperty", + "DatasetCellValue", + "DatasetCellValueCellValue", + "DatasetCellValueFeedbackInfo", + "DatasetCellValueValueInfos", + "DatasetColumnDetailItem", + "DatasetColumnDetailResponse", + "DatasetColumnDetailResult", + "DatasetColumnsMutationResponse", + "DatasetColumnsMutationResult", + "DatasetCopyResponse", + "DatasetCopyResult", + "DatasetCreateStartedResponse", + "DatasetCreateStartedResult", + "DatasetCreationProgressResponse", + "DatasetCreationProgressResult", + "DatasetDerivedVariablesResponse", + "DatasetDerivedVariablesResult", + "DatasetDerivedVariablesResultDerivedVariables", + "DatasetEvalStatsItem", + "DatasetEvalStatsItemTotalAvg", + "DatasetEvalStatsItemTotalChoicesAvg", + "DatasetEvalStatsMetric", + "DatasetEvalStatsMetricOutput", + "DatasetEvalStatsResponse", + "DatasetExplanationSummaryResponse", + "DatasetExplanationSummaryResponseResult", + "DatasetExplanationSummaryResponseResultResponse", + "DatasetJsonSchemaResponse", + "DatasetJsonSchemaResponseResult", + "DatasetListItem", + "DatasetListResponse", + "DatasetListResult", + "DatasetModelType", + "DatasetMultipleStaticColumnsRequest", + "DatasetMultipleStaticColumnsRequestColumnsItem", + "DatasetNameItem", + "DatasetNamesResponse", + "DatasetNamesResult", + "DatasetRowDataRequest", + "DatasetRowDataRequestFiltersItem", + "DatasetRowDataRequestFiltersItemFilterConfig", + "DatasetRowDataRequestSortItem", + "DatasetRowDataRequestSortItemType", + "DatasetRowDataResponse", + "DatasetRowDataResult", + "DatasetRowDataResultCurrent", + "DatasetRowDiffRequest", + "DatasetRowNavigation", + "DatasetRowsImportedResponse", + "DatasetRowsImportedResult", + "DatasetRowsImportMessageResponse", + "DatasetRowsImportMessageResult", + "DatasetRunPromptStatsPrompt", + "DatasetRunPromptStatsResponse", + "DatasetRunPromptStatsResult", + "DatasetSdkRowsCode", + "DatasetSdkRowsRequest", + "DatasetSdkRowsResponse", + "DatasetSdkRowsResult", + "DatasetSdkRowsResultApiKeys", + "DatasetSource", + "DatasetStaticColumnRequest", + "DatasetTableMetadata", + "DatasetTableResponse", + "DatasetTableResult", + "DatasetTableResultColumnConfigItem", + "DatasetTableResultDatasetConfig", + "DatasetTableResultTableItem", + "DatasetUpdateCellValueRequest", + "DatasetUpdateColumnNameRequest", + "DatasetUpdateColumnTypeRequest", + "DeepAnalysisApiResponse", + "DeepAnalysisBody", + "DeepAnalysisDispatchApiResponse", + "DeepAnalysisDispatchResponse", + "DeepAnalysisResponse", + "DeleteEvalConfigResponse", + "DeleteEvalTemplate", + "DerivedVariableDetail", + "DerivedVariableDetailRawSample", + "DerivedVariableDetailResponse", + "DerivedVariableDetailSchema", + "DerivedVariableExtractRequest", + "DerivedVariablePreviewRequest", + "DerivedVariablePreviewRequestContent", + "DevelopDatasetMessageResponse", + "DiscussionCommentRequest", + "DiscussionReactionRequest", + "DiscussionThreadStatusRequest", + "DuplicateDatasetRequest", + "DuplicateDatasetResponse", + "DuplicateDatasetResult", + "DuplicateRowsRequest", + "DuplicateRowsResponse", + "DuplicateRowsResult", + "DynamicColumnCreateResponse", + "DynamicColumnCreateResult", + "DynamicColumnMessageResponse", + "DynamicColumnMessageResult", + "EditRunPromptColumn", + "EmptyRequest", + "ErrorLocalizerTaskResponse", + "ErrorLocalizerTaskResponseErrorAnalysis", + "ErrorLocalizerTaskResponseEvalResult", + "ErrorLocalizerTaskResponseInputData", + "ErrorLocalizerTaskResponseInputKeys", + "ErrorLocalizerTaskResponseInputTypes", + "ErrorName", + "ErrorResponse", + "ErrorResponseDetails", + "ErrorResponseType", + "EvalConfigDefinition", + "EvalConfigDefinitionConfig", + "EvalConfigDefinitionFiltersItem", + "EvalConfigDefinitionFiltersItemFilterConfig", + "EvalConfigDefinitionMapping", + "EvalConfigResponse", + "EvalConfigResponseConfig", + "EvalConfigResponseFilters", + "EvalConfigResponseMapping", + "EvalConfigResponseModel", + "EvalConfigResponseStatus", + "EvalConfigStructure", + "EvalConfigStructureConfig", + "EvalConfigStructureConfigParamsDesc", + "EvalConfigStructureConfigParamsOption", + "EvalConfigStructureEvalTags", + "EvalConfigStructureFunctionParamsSchema", + "EvalConfigStructureMapping", + "EvalConfigStructureModels", + "EvalConfigStructureOutput", + "EvalConfigStructureParams", + "EvalConfigStructureResponse", + "EvalConfigStructureResult", + "EvalConfigUpdateRequest", + "EvalConfigUpdateRequestConfig", + "EvalConfigUpdateRequestMapping", + "EvalConfigUpdateResponse", + "EvalErrorResponse", + "EvalErrorResponseDetails", + "EvalErrorResponseType", + "EvalExplanationCluster", + "EvalExplanationSummaryRefreshResponse", + "EvalExplanationSummaryRefreshResult", + "EvalExplanationSummaryResponse", + "EvalExplanationSummaryResult", + "EvalExplanationSummaryResultResponse", + "EvalFeedbackListItem", + "EvalFeedbackListResponse", + "EvalFeedbackListResponseResult", + "EvalFunctionListResponse", + "EvalFunctionListResult", + "EvalFunctionListResultFunctionsItem", + "EvalListFilters", + "EvalListFiltersEvalTypeItem", + "EvalListFiltersOutputTypeItem", + "EvalListFiltersTemplateTypeItem", + "EvalListRequest", + "EvalListRequestOwnerFilter", + "EvalListRequestSortBy", + "EvalListRequestSortOrder", + "EvalListResponse", + "EvalListResult", + "EvalListResultEvalsItem", + "EvalMetricEntry", + "EvalMetricEntryCompositeWeightOverrides", + "EvalMetricEntryConfig", + "EvalPreviewResponse", + "EvalPreviewResult", + "EvalPreviewResultResponsesItem", + "EvalStructure", + "EvalStructureChoices", + "EvalStructureConfig", + "EvalStructureConfigParamsDesc", + "EvalStructureConfigParamsOption", + "EvalStructureFunctionParamsSchema", + "EvalStructureMapping", + "EvalStructureModels", + "EvalStructureOutput", + "EvalStructureParams", + "EvalStructureResponse", + "EvalStructureResult", + "EvalStructureRunConfig", + "EvalSummaryComparisonResponse", + "EvalSummaryComparisonResponseResult", + "EvalSummaryResponse", + "EvalTemplateBulkDeleteRequest", + "EvalTemplateBulkDeleteResponse", + "EvalTemplateBulkDeleteResponseResult", + "EvalTemplateChartPoint", + "EvalTemplateCreateResponse", + "EvalTemplateCreateResponseResult", + "EvalTemplateCreateV2Request", + "EvalTemplateCreateV2RequestChoiceScores", + "EvalTemplateCreateV2RequestCodeLanguage", + "EvalTemplateCreateV2RequestDataInjection", + "EvalTemplateCreateV2RequestEvalType", + "EvalTemplateCreateV2RequestFewShotExamplesType0Item", + "EvalTemplateCreateV2RequestMessagesType0Item", + "EvalTemplateCreateV2RequestMode", + "EvalTemplateCreateV2RequestOutputType", + "EvalTemplateCreateV2RequestSummary", + "EvalTemplateCreateV2RequestTemplateFormat", + "EvalTemplateCreateV2RequestTools", + "EvalTemplateDetailResponse", + "EvalTemplateDetailResponseResult", + "EvalTemplateDetailResponseResultChoices", + "EvalTemplateDetailResponseResultChoiceScores", + "EvalTemplateDetailResponseResultConfig", + "EvalTemplateListChartsItem", + "EvalTemplateListChartsRequest", + "EvalTemplateListChartsResponse", + "EvalTemplateListChartsResponseResult", + "EvalTemplateListChartsResponseResultCharts", + "EvalTemplateListItem", + "EvalTemplateListResponse", + "EvalTemplateListResponseResult", + "EvalTemplateSummary", + "EvalTemplateSummaryOutput", + "EvalTemplateUpdateResponse", + "EvalTemplateUpdateResponseResult", + "EvalTemplateUpdateV2Request", + "EvalTemplateUpdateV2RequestChoiceScores", + "EvalTemplateUpdateV2RequestCodeLanguage", + "EvalTemplateUpdateV2RequestDataInjection", + "EvalTemplateUpdateV2RequestEvalType", + "EvalTemplateUpdateV2RequestFewShotExamplesType0Item", + "EvalTemplateUpdateV2RequestMessagesType0Item", + "EvalTemplateUpdateV2RequestMode", + "EvalTemplateUpdateV2RequestOutputType", + "EvalTemplateUpdateV2RequestSummary", + "EvalTemplateUpdateV2RequestTemplateFormat", + "EvalTemplateUpdateV2RequestTools", + "EvalTemplateVersionCreateRequest", + "EvalTemplateVersionCreateRequestConfigSnapshot", + "EvalTemplateVersionItem", + "EvalTemplateVersionItemConfigSnapshot", + "EvalTemplateVersionListResponse", + "EvalTemplateVersionListResponseResult", + "EvalTemplateVersionResponse", + "EvalTemplateVersionResponseResult", + "EvalTemplateVersionRestoreResponse", + "EvalTemplateVersionRestoreResponseResult", + "EvaluationResult", + "EvalUsageChartPoint", + "EvalUsageFeedback", + "EvalUsageFeedbackValue", + "EvalUsageLogItem", + "EvalUsageLogItemDetail", + "EvalUsageLogs", + "EvalUsageStats", + "EvalUsageStatsResponse", + "EvalUsageStatsResponseResult", + "EventsOverTimePoint", + "ExecutePromptSimulationRequest", + "ExecutePromptSimulationResponse", + "ExecutePromptSimulationResult", + "ExecuteRunTest", + "ExecutionMetrics", + "ExecutionMetricsStatus", + "ExecutionRuns", + "ExecutionRunsStatus", + "ExperimentComparisonColumnMetric", + "ExperimentComparisonColumnMetricAvgScore", + "ExperimentComparisonDatasetMetric", + "ExperimentComparisonDatasetMetricNormalizedScores", + "ExperimentComparisonDetail", + "ExperimentComparisonDetailScoresWeight", + "ExperimentComparisonDetailsResponse", + "ExperimentComparisonDetailsResult", + "ExperimentComparisonMetrics", + "ExperimentComparisonNormalizedMetrics", + "ExperimentComparisonRawMetrics", + "ExperimentComparisonWeights", + "ExperimentComparisonWeightsRequest", + "ExperimentComparisonWeightsRequestWeights", + "ExperimentComparisonWeightsScores", + "ExperimentCreateV2", + "ExperimentCreateV2ExperimentType", + "ExperimentDatasetComparisonResponse", + "ExperimentDatasetComparisonResult", + "ExperimentDatasetComparisonResultWeightsApplied", + "ExperimentDerivedVariablesResponse", + "ExperimentDerivedVariablesResult", + "ExperimentDerivedVariablesResultDerivedVariables", + "ExperimentDetailV2", + "ExperimentDetailV2ExperimentType", + "ExperimentDetailV2Status", + "ExperimentEvaluationColumnStats", + "ExperimentEvaluationColumnStatsAvgScore", + "ExperimentEvaluationStatsResponse", + "ExperimentEvaluationStatsResult", + "ExperimentEvaluationTokenUsage", + "ExperimentFeedbackCreateResponse", + "ExperimentFeedbackCreateResult", + "ExperimentFeedbackDetailItem", + "ExperimentFeedbackDetailItemValue", + "ExperimentFeedbackDetailsResponse", + "ExperimentFeedbackDetailsResult", + "ExperimentFeedbackSubmitRequest", + "ExperimentFeedbackSubmitRequestActionType", + "ExperimentFeedbackSubmitRequestValue", + "ExperimentFeedbackSubmitResponse", + "ExperimentFeedbackSubmitResult", + "ExperimentFeedbackTemplateResponse", + "ExperimentFeedbackTemplateResult", + "ExperimentJsonSchemaResponse", + "ExperimentJsonSchemaResponseResult", + "ExperimentListV2", + "ExperimentListV2ExperimentType", + "ExperimentListV2Status", + "ExperimentNameSuggestionResponse", + "ExperimentNameSuggestionResult", + "ExperimentNameValidationResponse", + "ExperimentNameValidationResult", + "ExperimentRerunCells", + "ExperimentRerunRequest", + "ExperimentRowDiffCell", + "ExperimentRowDiffCellCellDiffValue", + "ExperimentRowDiffCellCellValue", + "ExperimentRowDiffCellValueInfos", + "ExperimentRowDiffResponse", + "ExperimentRowDiffResponseResult", + "ExperimentRowDiffResponseResultAdditionalProperty", + "ExperimentStatsColumnConfig", + "ExperimentStatsMetadata", + "ExperimentStatsResponse", + "ExperimentStatsResult", + "ExperimentStatsResultTableDataItem", + "ExperimentStopResponse", + "ExperimentStopResult", + "ExperimentStopWorkflowsCancelled", + "ExperimentStringResultResponse", + "ExperimentTableRowsColumnConfig", + "ExperimentTableRowsColumnConfigAverageScore", + "ExperimentTableRowsColumnConfigChoicesMap", + "ExperimentTableRowsColumnConfigGroup", + "ExperimentTableRowsMetadata", + "ExperimentTableRowsMetadataDescription", + "ExperimentTableRowsResponse", + "ExperimentTableRowsResult", + "ExperimentTableRowsResultTableItem", + "ExperimentUpdateV2", + "ExperimentV2DetailResponse", + "ExperimentWorkflowResponse", + "ExperimentWorkflowResult", + "ExportAnnotationQueueExportFormat", + "ExtractEntitiesRequest", + "ExtractJsonColumnRequest", + "FailedRerunItem", + "Feedback", + "FeedbackSource", + "FeedDetailApiResponse", + "FeedDetailCore", + "FeedListApiResponse", + "FeedListResponse", + "FeedListRow", + "FeedSidebar", + "FeedSidebarApiResponse", + "FeedStats", + "FeedStatsApiResponse", + "FeedUpdateBody", + "FeedUpdateBodySeverity", + "FeedUpdateBodyStatus", + "GetAnnotationLabelsResponse", + "GetTraceAnnotation", + "GetTraceAnnotationValuesResponse", + "GetTraceAnnotationValuesResult", + "GetVoiceCallDetailResponse200", + "GroundTruthConfig", + "GroundTruthConfigRequest", + "GroundTruthConfigRequestInjectionFormat", + "GroundTruthConfigRequestMode", + "GroundTruthConfigResponse", + "GroundTruthConfigResponseResult", + "GroundTruthItem", + "GroundTruthItemRoleMapping", + "GroundTruthItemVariableMapping", + "GroundTruthListResponse", + "GroundTruthListResponseResult", + "GroundTruthUploadRequest", + "GroundTruthUploadRequestDataItem", + "GroundTruthUploadRequestRoleMapping", + "GroundTruthUploadRequestVariableMapping", + "GroundTruthUploadResponse", + "GroundTruthUploadResponseResult", + "HeatmapCell", + "HuggingFaceAddRowsRequest", + "HuggingFaceDatasetConfigRequest", + "HuggingFaceDatasetConfigResponse", + "HuggingFaceDatasetConfigResult", + "HuggingFaceDatasetConfigResultDatasetInfo", + "HuggingFaceDatasetCreateRequest", + "HuggingFaceDatasetDetail", + "HuggingFaceDatasetDetailRequest", + "HuggingFaceDatasetDetailResponse", + "HuggingFaceDatasetDetailResponseResult", + "HuggingFaceDatasetListItem", + "HuggingFaceDatasetListRequest", + "HuggingFaceDatasetListRequestFilterParams", + "HuggingFaceDatasetListResponse", + "HuggingFaceDatasetListResponseResult", + "ImportAnnotationEntry", + "ImportAnnotationEntryValue", + "ImportAnnotations", + "JsonColumnSchemaEntry", + "JsonColumnSchemaEntrySample", + "KeyMoment", + "LegacyKnowledgeBaseCreateResponse", + "LegacyKnowledgeBaseCreateResult", + "LegacyKnowledgeBaseFileRow", + "LegacyKnowledgeBaseFilesRequest", + "LegacyKnowledgeBaseFilesRequestSortItem", + "LegacyKnowledgeBaseFilesResponse", + "LegacyKnowledgeBaseFilesResult", + "LegacyKnowledgeBaseListResponse", + "LegacyKnowledgeBaseListResult", + "LegacyKnowledgeBaseMutationRequest", + "LegacyKnowledgeBaseMutationResponse", + "LegacyKnowledgeBaseMutationResult", + "LegacyKnowledgeBaseOption", + "LegacyKnowledgeBaseSdkCodeResponse", + "LegacyKnowledgeBaseSdkCodeResult", + "LegacyKnowledgeBaseTableColumn", + "LegacyKnowledgeBaseTableResponse", + "LegacyKnowledgeBaseTableResult", + "LegacyKnowledgeBaseTableRow", + "ListAgentDefinitionsAgentType", + "ListAlertLogsResponse200", + "ListAlertsResponse200", + "ListAllAlertLogsResponse200", + "ListAnnotationQueueItemsOrdering", + "ListAnnotationQueueItemsResponse200", + "ListAnnotationQueuesResponse200", + "ListErrorFeedIssuesSortBy", + "ListErrorFeedIssuesSortDir", + "ListErrorFeedIssuesSource", + "ListErrorFeedIssuesStatus", + "ListExperimentsResponse200", + "ListOrganizationMembersFilterStatusItem", + "ListOrganizationMembersSort", + "ListPersonasResponse200", + "ListRunTestsSimulationType", + "ListTraceProjectsResponse200", + "ListTracePropertiesResponse200", + "ListTraceSessionsResponse200", + "ListTracesResponse200", + "ListVoiceCallsResponse200", + "ListWorkspaceMembersFilterStatusItem", + "ListWorkspaceMembersSort", + "LocalFileDatasetCreateStartedResponse", + "LocalFileDatasetCreateStartedResult", + "ManagementAPIErrorResponse", + "ManagementAPIErrorResponseDetails", + "ManagementAPIErrorResponseType", + "ManualDatasetCreateRequest", + "ManualDatasetCreateResponse", + "ManualDatasetCreateResult", + "MemberListItem", + "MemberListItemType", + "MemberListResponse", + "MemberListResult", + "MemberRemove", + "MemberRoleUpdate", + "MemberRoleUpdateOrgLevel", + "MemberRoleUpdateResponse", + "MemberRoleUpdateResult", + "MemberRoleUpdateResultChanges", + "MemberRoleUpdateWsLevel", + "MemberUserMutationResponse", + "MemberUserMutationResult", + "MemberWorkspaceAccess", + "MergeDatasetRequest", + "MergeDatasetResponse", + "MergeDatasetResult", + "ModelHubAnnotationQueuesAutomationRulesListResponse200", + "ModelHubAnnotationQueuesForSourceSourceType", + "ModelHubAnnotationsLabelsListType", + "ModelHubApiKeysListResponse200", + "ModelHubDevelopsGetEvalStructureReadEvalType", + "ModelHubEmptyRequest", + "ModelHubErrorResponse", + "ModelHubErrorResponseDetails", + "ModelHubErrorResponseType", + "ModelHubPaginatedResponse", + "ModelHubPaginatedResponseResultsItem", + "ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200", + "ModelHubPromptHistoryExecutionsListResponse200", + "ModelHubPromptLabelsGetByNameResponse200", + "ModelHubPromptLabelsListResponse200", + "ModelHubPromptLabelsTemplateLabelsResponse200", + "ModelHubPromptTemplatesGetTemplateByNameResponse200", + "ModelHubPromptTemplatesListResponse200", + "ModelHubScoresForSourceSourceType", + "ModelHubScoresListResponse200", + "ModelHubScoresListSourceType", + "ModelHubStringResultResponse", + "ModelHubTextErrorResponse", + "ModelHubTextErrorResponseDetails", + "ModelHubTextErrorResponseType", + "ObserveGraphDataPoint", + "ObserveGraphDataRequest", + "ObserveGraphDataRequestFiltersItem", + "ObserveGraphDataRequestFiltersItemFilterConfig", + "ObserveGraphDataRequestInterval", + "ObserveGraphDataRequestReqDataConfig", + "ObserveGraphDataRequestReqDataConfigType", + "ObserveGraphDataResponse", + "ObserveGraphDataResult", + "OptimiserAnalysisRefreshResponse", + "OptimiserAnalysisRefreshResult", + "OptimiserAnalysisResponse", + "OptimiserAnalysisResultPayload", + "OptimiserAnalysisResultPayloadResponse", + "OptimiserAnalysisResultPayloadResponseAdditionalProperty", + "Organization", + "OverviewApiResponse", + "OverviewResponse", + "PatternInsight", + "PatternSummary", + "PerformanceSummary", + "PerformanceSummaryTestRunPerformanceMetrics", + "PerformanceSummaryTopPerformingScenariosItem", + "Persona", + "PersonaAccent", + "PersonaAgeGroup", + "PersonaCommunicationStyle", + "PersonaConversationSpeed", + "PersonaCreate", + "PersonaCreateCustomProperties", + "PersonaCustomProperties", + "PersonaDuplicateRequest", + "PersonaDuplicateResponse", + "PersonaEmojiUsage", + "PersonaFieldOptions", + "PersonaFinishedSpeakingSensitivity", + "PersonaGender", + "PersonaInterruptSensitivity", + "PersonaKeywords", + "PersonaLanguages", + "PersonaList", + "PersonaListAccent", + "PersonaListAgeGroup", + "PersonaListCommunicationStyle", + "PersonaListConversationSpeed", + "PersonaListEmojiUsage", + "PersonaListFinishedSpeakingSensitivity", + "PersonaListGender", + "PersonaListInterruptSensitivity", + "PersonaListKeywords", + "PersonaListLanguages", + "PersonaListLocation", + "PersonaListMetadata", + "PersonaListOccupation", + "PersonaListPersonality", + "PersonaListPersonaType", + "PersonaListPunctuation", + "PersonaListRegionalMix", + "PersonaListSlangUsage", + "PersonaListTone", + "PersonaListTyposFrequency", + "PersonaListVerbosity", + "PersonaLocation", + "PersonaMetadata", + "PersonaOccupation", + "PersonaPersonality", + "PersonaPersonaType", + "PersonaPunctuation", + "PersonaRegionalMix", + "PersonaSimulationType", + "PersonaSlangUsage", + "PersonaTone", + "PersonaTyposFrequency", + "PersonaVerbosity", + "PreviewDatasetOperationRequest", + "PreviewDatasetOperationRequestConfig", + "PreviewDatasetOperationResponse", + "PreviewDatasetOperationResult", + "PreviewDatasetOperationResultItem", + "PreviewDatasetOperationResultItemDetails", + "PreviewDatasetOperationResultItemInput", + "PreviewDatasetOperationResultItemOutput", + "PreviewRunEvalRequest", + "PreviewRunEvalRequestConfig", + "PreviewRunPrompt", + "Project", + "ProjectConfig", + "ProjectMetadata", + "ProjectModelType", + "ProjectSessionConfig", + "ProjectSource", + "ProjectTags", + "ProjectTraceType", + "PromptConfig", + "PromptConfigEntry", + "PromptConfigEntryConfiguration", + "PromptConfigEntryMessagesItem", + "PromptConfigEntryModel", + "PromptConfigEntryModelParams", + "PromptConfigMessagesItem", + "PromptConfigOutputFormat", + "PromptConfigResponseFormat", + "PromptConfigRunPromptConfig", + "PromptConfigToolChoice", + "PromptConfigToolsType0Item", + "PromptDerivedVariablesResponse", + "PromptDerivedVariablesResult", + "PromptDerivedVariablesResultDerivedVariables", + "PromptHistoryExecution", + "PromptHistoryExecutionEvaluationConfigs", + "PromptHistoryExecutionEvaluationResults", + "PromptHistoryExecutionMetadata", + "PromptHistoryExecutionOutput", + "PromptHistoryExecutionPlaceholders", + "PromptLabel", + "PromptLabelMetadata", + "PromptLabelType", + "PromptSimulationListResponse", + "PromptSimulationListResult", + "PromptSimulationRunResponse", + "PromptSimulationScenarioItem", + "PromptSimulationScenariosResponse", + "PromptSimulationScenariosResult", + "PromptSimulationTemplateSummary", + "PromptSimulationUpdateRequest", + "PromptTemplate", + "PromptTemplatePlaceholders", + "PromptTemplateVariableNames", + "ProviderStatusItem", + "ProviderStatusResponse", + "ProviderStatusResult", + "QueueAddItemsResponse", + "QueueAddItemsResult", + "QueueAddLabelResponse", + "QueueAddLabelResult", + "QueueAgreementAnnotatorPair", + "QueueAgreementLabel", + "QueueAgreementResponse", + "QueueAgreementResult", + "QueueAgreementResultLabels", + "QueueAnalyticsAnnotatorPerformance", + "QueueAnalyticsResponse", + "QueueAnalyticsResult", + "QueueAnalyticsResultLabelDistribution", + "QueueAnalyticsResultLabelDistributionAdditionalProperty", + "QueueAnalyticsResultStatusBreakdown", + "QueueAnalyticsThroughput", + "QueueAnalyticsThroughputDaily", + "QueueAnnotateDetailResponse", + "QueueAnnotateDetailResult", + "QueueAnnotateDetailResultAnnotationsItem", + "QueueAnnotateDetailResultItem", + "QueueAnnotateDetailResultLabelsItem", + "QueueAnnotateDetailResultProgress", + "QueueAnnotateDetailResultQueue", + "QueueAnnotateDetailResultReviewCommentsItem", + "QueueAnnotateDetailResultReviewThreadsItem", + "QueueAnnotateDetailResultSpanNotesItem", + "QueueAnnotatorNested", + "QueueAssignItemsResponse", + "QueueAssignItemsResult", + "QueueBulkRemoveItemsResponse", + "QueueBulkRemoveItemsResult", + "QueueDefaultQueue", + "QueueDefaultRequest", + "QueueDefaultResponse", + "QueueDefaultResult", + "QueueDefaultResultAction", + "QueueDiscussionResponse", + "QueueDiscussionResult", + "QueueDiscussionResultComment", + "QueueDiscussionResultReviewCommentsItem", + "QueueDiscussionResultReviewThreadsItem", + "QueueDiscussionResultThread", + "QueueExportAnnotationsResponse", + "QueueExportAnnotationsResponseResultItem", + "QueueExportColumnMapping", + "QueueExportDefaultMapping", + "QueueExportField", + "QueueExportFieldsResponse", + "QueueExportFieldsResult", + "QueueExportToDatasetRequest", + "QueueExportToDatasetResponse", + "QueueExportToDatasetResult", + "QueueForSourceEntry", + "QueueForSourceEntryExistingLabelNotes", + "QueueForSourceEntryExistingScores", + "QueueForSourceEntryExistingScoresAdditionalProperty", + "QueueForSourceEntrySpanNotesItem", + "QueueForSourceItem", + "QueueForSourceQueue", + "QueueForSourceResponse", + "QueueHardDeleteRequest", + "QueueHardDeleteResponse", + "QueueHardDeleteResult", + "QueueImportAnnotationsResponse", + "QueueImportAnnotationsResult", + "QueueItem", + "QueueItemAnnotationsResponse", + "QueueItemMetadata", + "QueueItemNavigationRequest", + "QueueItemSourceType", + "QueueItemStatus", + "QueueLabelNested", + "QueueLabelRequest", + "QueueLabelResult", + "QueueLabelResultSettings", + "QueueNavigationResponse", + "QueueNavigationResult", + "QueueNavigationResultNextItem", + "QueueNextItemResponse", + "QueueNextItemResult", + "QueueNextItemResultItem", + "QueueProgressAnnotatorStat", + "QueueProgressResponse", + "QueueProgressResult", + "QueueProgressUserProgress", + "QueueReleaseReservationResponse", + "QueueReleaseReservationResult", + "QueueRemoveLabelResponse", + "QueueRemoveLabelResult", + "QueueReviewItemResponse", + "QueueReviewItemResult", + "QueueReviewItemResultNextItem", + "QueueReviewItemResultReviewCommentsItem", + "QueueReviewItemResultReviewThreadsItem", + "QueueStatusRequest", + "QueueStatusRequestStatus", + "QueueStatusResponse", + "QueueSubmitAnnotationsResponse", + "QueueSubmitAnnotationsResult", + "Recommendation", + "RepresentativeTrace", + "RepresentativeTraceRecommendationsItem", + "RepresentativeTraceRootCausesItem", + "RepresentativeTraceWhatChanged", + "RerunCallsResponse", + "RerunCellEntry", + "ReviewItemRequest", + "ReviewItemRequestAction", + "ReviewLabelCommentRequest", + "RootCause", + "RunNewEvalsOnTestExecution", + "RunNewEvalsResponse", + "RunPromptChoiceOption", + "RunPromptChoiceOptionValue", + "RunPromptColumnConfigResponse", + "RunPromptColumnConfigResult", + "RunPromptColumnConfigResultConfig", + "RunPromptColumnPreviewResponse", + "RunPromptColumnPreviewResult", + "RunPromptColumnPreviewResultCost", + "RunPromptColumnPreviewResultResponsesItem", + "RunPromptColumnPreviewResultTokenUsage", + "RunPromptOptionsResponse", + "RunPromptOptionsResult", + "RunPromptOptionsResultModelsItem", + "RunPromptOptionsResultToolConfig", + "RunPromptToolOption", + "RunPromptToolOptionConfig", + "RunTestAnalytics", + "RunTestAnalyticsEvaluationScoreTrendsItem", + "RunTestAnalyticsFailRateTrendsItem", + "RunTestAnalyticsPerformanceComparisonItem", + "RunTestAnalyticsRunTestInfo", + "RunTestAnalyticsSummaryStats", + "RunTestCallExecutionsResponse", + "RunTestCallExecutionsResponseResultsItem", + "RunTestChatExecutionResponse", + "RunTestChatExecutionResult", + "RunTestComponentsUpdate", + "RunTestErrorResponse", + "RunTestErrorResponseDetails", + "RunTestErrorResponseType", + "RunTestExecutionResponse", + "RunTestKPIsResponse", + "RunTestKPIsResponseScenarioGraphs", + "RunTestKPIsResponseScenarioGraphsAdditionalProperty", + "RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty", + "RunTestMessageResponse", + "RunTestNameResponse", + "RunTestNameResult", + "RunTestResponse", + "RunTestResponseAgentDefinitionDetail", + "RunTestResponseAgentVersion", + "RunTestResponsePromptTemplateDetail", + "RunTestResponsePromptVersionDetail", + "RunTestResponseScenariosDetailItem", + "RunTestResponseSimulatorAgentDetail", + "RunTestResponseSourceType", + "RunTestScenarioItemResponse", + "ScenarioAddColumnsRequest", + "ScenarioAddColumnsResponse", + "ScenarioAddRowsRequest", + "ScenarioAddRowsResponse", + "ScenarioCreateRequest", + "ScenarioCreateRequestGraph", + "ScenarioCreateRequestKind", + "ScenarioCreateRequestSourceType", + "ScenarioCreateResponse", + "ScenarioCreateResponseStatus", + "ScenarioDeleteResponse", + "ScenarioDetailResponse", + "ScenarioDetailResponseGraph", + "ScenarioDetailResponseScenarioType", + "ScenarioDetailResponseStatus", + "ScenarioEditPromptsRequest", + "ScenarioEditRequest", + "ScenarioEditRequestGraph", + "ScenarioEditResponse", + "ScenarioErrorResponse", + "ScenarioErrorResponseDetails", + "ScenarioErrorResponseType", + "ScenarioListResponse", + "ScenarioPromptItem", + "ScenarioPromptItemRole", + "ScenarioPromptsUpdateResponse", + "ScenarioResponse", + "ScenarioResponseScenarioType", + "ScenarioResponseSourceType", + "ScenarioResponseStatus", + "Score", + "ScoreDeleteResponse", + "ScoreDeleteResponseResult", + "ScoreForSourceResponse", + "ScoreForSourceResponseSpanNotesItem", + "ScoreLabelSettings", + "ScoreResponse", + "ScoreScoreSource", + "ScoreSourceType", + "ScoreTrend", + "ScoreValue", + "SDKCICDEvaluationRunAccepted", + "SDKCICDEvaluationRunAcceptedResponse", + "SDKCICDEvaluationRunsResponse", + "SDKCICDEvaluationRunsResult", + "SDKCICDEvaluationRunsResultStatus", + "SDKCICDEvaluationRunSummary", + "SDKCICDEvaluationRunSummaryResultsSummary", + "SDKConfigureEvaluationsRequest", + "SDKConfigureEvaluationsRequestAdditionalProperty", + "SDKConfigureEvaluationsResponse", + "SDKErrorResponse", + "SDKErrorResponseErrors", + "SDKEvalTemplate", + "SDKEvalTemplateChoices", + "SDKEvalTemplateConfig", + "SDKEvalTemplateCriteria", + "SDKEvalTemplateEvalTags", + "SDKEvalTemplateResponse", + "SDKGetEvalsResponse", + "SDKMessageResult", + "SDKSimulationAnalyticsResponse", + "SDKSimulationAnalyticsResult", + "SDKSimulationAnalyticsResultEvalAverages", + "SDKSimulationAnalyticsResultEvalExplanationSummary", + "SDKSimulationAnalyticsResultEvalResultsItem", + "SDKSimulationAnalyticsResultSystemSummary", + "SDKSimulationMetricsResponse", + "SDKSimulationMetricsResult", + "SDKSimulationMetricsResultChatMetrics", + "SDKSimulationMetricsResultConversation", + "SDKSimulationMetricsResultCost", + "SDKSimulationMetricsResultLatency", + "SDKSimulationMetricsResultMetrics", + "SDKSimulationRunsResponse", + "SDKSimulationRunsResult", + "SDKSimulationRunsResultCallResults", + "SDKSimulationRunsResultCost", + "SDKSimulationRunsResultEvalExplanationSummary", + "SDKSimulationRunsResultEvalOutputs", + "SDKSimulationRunsResultEvalResultsItem", + "SDKSimulationRunsResultLatency", + "SDKStandaloneEvalInput", + "SDKStandaloneEvalInputAdditionalProperty", + "SDKStandaloneEvalRequest", + "SDKStandaloneEvalRequestConfig", + "SDKStandaloneEvalResponse", + "SDKStandaloneEvalResultItem", + "SDKStandaloneEvalResultItemEvaluationsItem", + "SDKStandaloneEvalV2Request", + "SDKStandaloneEvalV2RequestConfig", + "SDKStandaloneEvalV2RequestInputs", + "SDKStandaloneEvalV2Response", + "SDKStandaloneEvalV2Result", + "SDKStandaloneEvalV2ResultResult", + "Selection", + "SelectionFilterItem", + "SelectionFilterItemFilterConfig", + "SelectionMode", + "SelectionSourceType", + "SendChatRequest", + "SendChatRequestMetrics", + "SessionComparisonResponse", + "SessionComparisonResult", + "SessionComparisonResultComparisonMetrics", + "SessionComparisonResultComparisonRecordings", + "SessionComparisonResultComparisonTranscripts", + "SidebarAIMetadata", + "SidebarTimeline", + "SimulateApiPersonasFieldOptionsResponse200", + "SimulateApiPersonasSystemPersonasResponse200", + "SimulateApiPersonasWorkspacePersonasResponse200", + "SimulateApiRunTestsListSimulationType", + "SimulateEvalConfigResponse", + "SimulateEvalConfigResponseConfig", + "SimulateEvalConfigResponseFiltersItem", + "SimulateEvalConfigResponseFiltersItemFilterConfig", + "SimulateEvalConfigResponseMapping", + "SimulateExportReadType", + "SimulatorAgent", + "SimulatorAgentDeleteResponse", + "SimulatorAgentListResponse", + "SimulatorAgentValidationErrorResponse", + "StartEvalsProcessRequest", + "StopUserEvalRequest", + "SubmitAnnotationEntry", + "SubmitAnnotationEntryValue", + "SubmitAnnotations", + "SwitchWorkspace", + "SwitchWorkspaceResponse", + "SwitchWorkspaceResult", + "SyntheticData", + "SyntheticDataDataset", + "SyntheticDatasetConfig", + "SyntheticDatasetConfigDataset", + "SyntheticDatasetConfigPayload", + "SyntheticDatasetConfigPayloadColumnsItem", + "SyntheticDatasetConfigPayloadDataset", + "SyntheticDatasetConfigResponse", + "SyntheticDatasetConfigResult", + "SyntheticDatasetCreateStartedResponse", + "SyntheticDatasetCreateStartedResult", + "SyntheticDatasetCreation", + "SyntheticDatasetCreationDataset", + "SyntheticDatasetUpdateData", + "SyntheticDatasetUpdateResponse", + "SyntheticDatasetUpdateResult", + "TestExecution", + "TestExecutionAnalytics", + "TestExecutionAnalyticsEvaluationCategoriesOverTestRuns", + "TestExecutionAnalyticsFailRateOverTestRuns", + "TestExecutionAnalyticsMetadata", + "TestExecutionBulkDelete", + "TestExecutionBulkDeleteResponse", + "TestExecutionChatBatchResponse", + "TestExecutionChatBatchResult", + "TestExecutionColumnOrder", + "TestExecutionColumnOrderResponse", + "TestExecutionDetailResponse", + "TestExecutionDetailResponseColumnOrderItem", + "TestExecutionDetailResponseResultsItem", + "TestExecutionExecutionMetadata", + "TestExecutionItemResponse", + "TestExecutionRerun", + "TestExecutionRerunRerunType", + "TestExecutionRerunResponse", + "TestExecutionRerunResult", + "TestExecutionRerunResultFailedRerunsItem", + "TestExecutionScenarioIds", + "TestExecutionStatus", + "TestExecutionStatusSummary", + "TestExecutionStatusSummaryScenariosItem", + "TestExecutionTranscriptCall", + "TestExecutionTranscriptsResponse", + "Trace", + "TraceAnnotationNoteResponse", + "TraceAnnotationValueResponse", + "TraceAnnotationValueResponseAnnotationValue", + "TraceAnnotationValueResponseSettings", + "TraceError", + "TraceEvidence", + "TraceEvidenceFailReelItem", + "TraceEvidencePassReelItem", + "TraceInput", + "TraceMetadata", + "TraceOutput", + "TracePreview", + "TracerTraceAgentGraphResponse200", + "TracerTraceAnnotationListResponse200", + "TracerTraceGetEvalNamesResponse200", + "TracerTraceGetTraceExportDataResponse200", + "TracerTraceGetTraceIdByIndexObserveResponse200", + "TracerTraceGetTraceIdByIndexResponse200", + "TracerTraceListResponse200", + "TracerTraceListTracesOfSessionResponse200", + "TracerTraceSessionGetSessionFilterValuesResponse200", + "TracerTraceSessionGetTraceSessionExportDataResponse200", + "TracerTraceSessionListResponse200", + "TracerUserAlertsListMonitorsResponse200", + "TracesAggregates", + "TraceSession", + "TraceSessionGraphDataRequest", + "TraceSessionGraphDataRequestFiltersItem", + "TraceSessionGraphDataRequestFiltersItemFilterConfig", + "TraceSessionGraphDataRequestInterval", + "TraceSessionGraphDataRequestReqDataConfig", + "TraceSessionGraphDataRequestReqDataConfigType", + "TracesListRow", + "TracesTabApiResponse", + "TracesTabResponse", + "TraceSummary", + "TraceTags", + "TraceTagsUpdate", + "TrendMetric", + "TrendPoint", + "TrendsTabApiResponse", + "TrendsTabResponse", + "UpdateRunTest", + "User", + "UserAlertMonitor", + "UserAlertMonitorDuplicate", + "UserAlertMonitorDuplicateResponse", + "UserAlertMonitorDuplicateResult", + "UserAlertMonitorFilters", + "UserAlertMonitorLog", + "UserAlertMonitorLogs", + "UserAlertMonitorLogType", + "UserAlertMonitorMetricOption", + "UserAlertMonitorMetricOptionsResponse", + "UserAlertMonitorMetricType", + "UserAlertMonitorThresholdOperator", + "UserAlertMonitorThresholdType", + "UserCodeExampleResponse", + "UserEvalMutationRequest", + "UserEvalMutationRequestCompositeWeightOverrides", + "UserEvalMutationRequestConfig", + "UserEvalUpdateRequest", + "UserEvalUpdateRequestCompositeWeightOverrides", + "UserEvalUpdateRequestConfig", + "UserGoals", + "UserInfoOrganization", + "UserInfoResponse", + "UserInfoTwoFactorMethods", + "UserOrganizationRole", + "UsersResponse", + "UsersResult", + "UsersResultTableItem", + "VectorDBColumnRequest", + "VectorDBColumnRequestEmbeddingConfig", + "WorkspaceAccessInput", + "WorkspaceAccessInputLevel", + "WorkspaceAdminSummary", + "WorkspaceListItemResponse", + "WorkspaceListPaginatedResponse", + "WorkspaceMemberRemove", + "WorkspaceMemberRoleUpdate", + "WorkspaceMemberRoleUpdateResponse", + "WorkspaceMemberRoleUpdateResult", + "WorkspaceMemberRoleUpdateWsLevel", + "WorkspaceSummary", +) diff --git a/python/fi/generated/openapi_client/models/accounts_error_response.py b/python/fi/generated/openapi_client/models/accounts_error_response.py new file mode 100644 index 0000000..cfe6e1f --- /dev/null +++ b/python/fi/generated/openapi_client/models/accounts_error_response.py @@ -0,0 +1,222 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.accounts_error_response_type import AccountsErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.accounts_error_response_details import AccountsErrorResponseDetails + + +T = TypeVar("T", bound="AccountsErrorResponse") + + +@_attrs_define +class AccountsErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (AccountsErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (AccountsErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: AccountsErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: AccountsErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.accounts_error_response_details import ( + AccountsErrorResponseDetails, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: AccountsErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = AccountsErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: AccountsErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = AccountsErrorResponseDetails.from_dict(_details) + + accounts_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + accounts_error_response.additional_properties = d + return accounts_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/accounts_error_response_details.py b/python/fi/generated/openapi_client/models/accounts_error_response_details.py new file mode 100644 index 0000000..972c2c0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/accounts_error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AccountsErrorResponseDetails") + + +@_attrs_define +class AccountsErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + accounts_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + accounts_error_response_details.additional_properties = additional_properties + return accounts_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/accounts_error_response_type.py b/python/fi/generated/openapi_client/models/accounts_error_response_type.py new file mode 100644 index 0000000..e3a89b4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/accounts_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class AccountsErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/add_api_column_request.py b/python/fi/generated/openapi_client/models/add_api_column_request.py new file mode 100644 index 0000000..a84d6d6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_api_column_request.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.add_api_column_request_config import AddApiColumnRequestConfig + + +T = TypeVar("T", bound="AddApiColumnRequest") + + +@_attrs_define +class AddApiColumnRequest: + """ + Attributes: + column_name (str): + config (AddApiColumnRequestConfig): + concurrency (int | Unset): Default: 5. + """ + + column_name: str + config: AddApiColumnRequestConfig + concurrency: int | Unset = 5 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_name = self.column_name + + config = self.config.to_dict() + + concurrency = self.concurrency + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_name": column_name, + "config": config, + } + ) + if concurrency is not UNSET: + field_dict["concurrency"] = concurrency + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.add_api_column_request_config import AddApiColumnRequestConfig + + d = dict(src_dict) + column_name = d.pop("column_name") + + config = AddApiColumnRequestConfig.from_dict(d.pop("config")) + + concurrency = d.pop("concurrency", UNSET) + + add_api_column_request = cls( + column_name=column_name, + config=config, + concurrency=concurrency, + ) + + add_api_column_request.additional_properties = d + return add_api_column_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_api_column_request_config.py b/python/fi/generated/openapi_client/models/add_api_column_request_config.py new file mode 100644 index 0000000..e28c9b5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_api_column_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AddApiColumnRequestConfig") + + +@_attrs_define +class AddApiColumnRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + add_api_column_request_config = cls() + + add_api_column_request_config.additional_properties = d + return add_api_column_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_as_new_dataset_request.py b/python/fi/generated/openapi_client/models/add_as_new_dataset_request.py new file mode 100644 index 0000000..a15f67f --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_as_new_dataset_request.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.add_as_new_dataset_request_columns import ( + AddAsNewDatasetRequestColumns, + ) + + +T = TypeVar("T", bound="AddAsNewDatasetRequest") + + +@_attrs_define +class AddAsNewDatasetRequest: + """ + Attributes: + dataset_id (UUID): + name (str | Unset): + columns (AddAsNewDatasetRequestColumns | Unset): + """ + + dataset_id: UUID + name: str | Unset = UNSET + columns: AddAsNewDatasetRequestColumns | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + name = self.name + + columns: dict[str, Any] | Unset = UNSET + if not isinstance(self.columns, Unset): + columns = self.columns.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if columns is not UNSET: + field_dict["columns"] = columns + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.add_as_new_dataset_request_columns import ( + AddAsNewDatasetRequestColumns, + ) + + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + name = d.pop("name", UNSET) + + _columns = d.pop("columns", UNSET) + columns: AddAsNewDatasetRequestColumns | Unset + if isinstance(_columns, Unset): + columns = UNSET + else: + columns = AddAsNewDatasetRequestColumns.from_dict(_columns) + + add_as_new_dataset_request = cls( + dataset_id=dataset_id, + name=name, + columns=columns, + ) + + add_as_new_dataset_request.additional_properties = d + return add_as_new_dataset_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_as_new_dataset_request_columns.py b/python/fi/generated/openapi_client/models/add_as_new_dataset_request_columns.py new file mode 100644 index 0000000..1d14c49 --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_as_new_dataset_request_columns.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AddAsNewDatasetRequestColumns") + + +@_attrs_define +class AddAsNewDatasetRequestColumns: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + add_as_new_dataset_request_columns = cls() + + add_as_new_dataset_request_columns.additional_properties = d + return add_as_new_dataset_request_columns + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_eval_configs_request.py b/python/fi/generated/openapi_client/models/add_eval_configs_request.py new file mode 100644 index 0000000..1869c03 --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_eval_configs_request.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_config_definition import EvalConfigDefinition + + +T = TypeVar("T", bound="AddEvalConfigsRequest") + + +@_attrs_define +class AddEvalConfigsRequest: + """ + Attributes: + evaluations_config (list[EvalConfigDefinition]): Array of evaluation configuration objects to add. At least one + required. + """ + + evaluations_config: list[EvalConfigDefinition] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + evaluations_config = [] + for evaluations_config_item_data in self.evaluations_config: + evaluations_config_item = evaluations_config_item_data.to_dict() + evaluations_config.append(evaluations_config_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "evaluations_config": evaluations_config, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_definition import EvalConfigDefinition + + d = dict(src_dict) + evaluations_config = [] + _evaluations_config = d.pop("evaluations_config") + for evaluations_config_item_data in _evaluations_config: + evaluations_config_item = EvalConfigDefinition.from_dict( + evaluations_config_item_data + ) + + evaluations_config.append(evaluations_config_item) + + add_eval_configs_request = cls( + evaluations_config=evaluations_config, + ) + + add_eval_configs_request.additional_properties = d + return add_eval_configs_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_eval_configs_response.py b/python/fi/generated/openapi_client/models/add_eval_configs_response.py new file mode 100644 index 0000000..759bbaf --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_eval_configs_response.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_response import EvalConfigResponse + + +T = TypeVar("T", bound="AddEvalConfigsResponse") + + +@_attrs_define +class AddEvalConfigsResponse: + """ + Attributes: + message (str): + created_eval_configs (list[EvalConfigResponse]): + run_test_id (UUID): + warnings (list[str] | Unset): Non-fatal issues encountered while processing individual configs. + """ + + message: str + created_eval_configs: list[EvalConfigResponse] + run_test_id: UUID + warnings: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + created_eval_configs = [] + for created_eval_configs_item_data in self.created_eval_configs: + created_eval_configs_item = created_eval_configs_item_data.to_dict() + created_eval_configs.append(created_eval_configs_item) + + run_test_id = str(self.run_test_id) + + warnings: list[str] | Unset = UNSET + if not isinstance(self.warnings, Unset): + warnings = self.warnings + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "created_eval_configs": created_eval_configs, + "run_test_id": run_test_id, + } + ) + if warnings is not UNSET: + field_dict["warnings"] = warnings + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_response import EvalConfigResponse + + d = dict(src_dict) + message = d.pop("message") + + created_eval_configs = [] + _created_eval_configs = d.pop("created_eval_configs") + for created_eval_configs_item_data in _created_eval_configs: + created_eval_configs_item = EvalConfigResponse.from_dict( + created_eval_configs_item_data + ) + + created_eval_configs.append(created_eval_configs_item) + + run_test_id = UUID(d.pop("run_test_id")) + + warnings = cast(list[str], d.pop("warnings", UNSET)) + + add_eval_configs_response = cls( + message=message, + created_eval_configs=created_eval_configs, + run_test_id=run_test_id, + warnings=warnings, + ) + + add_eval_configs_response.additional_properties = d + return add_eval_configs_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_items.py b/python/fi/generated/openapi_client/models/add_items.py new file mode 100644 index 0000000..0704eb1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_items.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.add_queue_item import AddQueueItem + from ..models.selection import Selection + + +T = TypeVar("T", bound="AddItems") + + +@_attrs_define +class AddItems: + """ + Attributes: + items (list[AddQueueItem] | Unset): + selection (Selection | Unset): + """ + + items: list[AddQueueItem] | Unset = UNSET + selection: Selection | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.items, Unset): + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + selection: dict[str, Any] | Unset = UNSET + if not isinstance(self.selection, Unset): + selection = self.selection.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if selection is not UNSET: + field_dict["selection"] = selection + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.add_queue_item import AddQueueItem + from ..models.selection import Selection + + d = dict(src_dict) + _items = d.pop("items", UNSET) + items: list[AddQueueItem] | Unset = UNSET + if _items is not UNSET: + items = [] + for items_item_data in _items: + items_item = AddQueueItem.from_dict(items_item_data) + + items.append(items_item) + + _selection = d.pop("selection", UNSET) + selection: Selection | Unset + if isinstance(_selection, Unset): + selection = UNSET + else: + selection = Selection.from_dict(_selection) + + add_items = cls( + items=items, + selection=selection, + ) + + add_items.additional_properties = d + return add_items + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_queue_item.py b/python/fi/generated/openapi_client/models/add_queue_item.py new file mode 100644 index 0000000..f16d003 --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_queue_item.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.add_queue_item_source_type import AddQueueItemSourceType + +T = TypeVar("T", bound="AddQueueItem") + + +@_attrs_define +class AddQueueItem: + """ + Attributes: + source_type (AddQueueItemSourceType): + source_id (str): + """ + + source_type: AddQueueItemSourceType + source_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_type = self.source_type.value + + source_id = self.source_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source_type": source_type, + "source_id": source_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + source_type = AddQueueItemSourceType(d.pop("source_type")) + + source_id = d.pop("source_id") + + add_queue_item = cls( + source_type=source_type, + source_id=source_id, + ) + + add_queue_item.additional_properties = d + return add_queue_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_queue_item_source_type.py b/python/fi/generated/openapi_client/models/add_queue_item_source_type.py new file mode 100644 index 0000000..affa579 --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_queue_item_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class AddQueueItemSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/add_rows_from_file_request.py b/python/fi/generated/openapi_client/models/add_rows_from_file_request.py new file mode 100644 index 0000000..a40c99e --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_rows_from_file_request.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AddRowsFromFileRequest") + + +@_attrs_define +class AddRowsFromFileRequest: + """ + Attributes: + dataset_id (UUID): + file (str | Unset): + model_type (str | Unset): + """ + + dataset_id: UUID + file: str | Unset = UNSET + model_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + file = self.file + + model_type = self.model_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + } + ) + if file is not UNSET: + field_dict["file"] = file + if model_type is not UNSET: + field_dict["model_type"] = model_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + file = d.pop("file", UNSET) + + model_type = d.pop("model_type", UNSET) + + add_rows_from_file_request = cls( + dataset_id=dataset_id, + file=file, + model_type=model_type, + ) + + add_rows_from_file_request.additional_properties = d + return add_rows_from_file_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/add_run_prompt.py b/python/fi/generated/openapi_client/models/add_run_prompt.py new file mode 100644 index 0000000..92a0dbc --- /dev/null +++ b/python/fi/generated/openapi_client/models/add_run_prompt.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_config import PromptConfig + + +T = TypeVar("T", bound="AddRunPrompt") + + +@_attrs_define +class AddRunPrompt: + """ + Attributes: + dataset_id (UUID): + name (str): + config (PromptConfig | Unset): + """ + + dataset_id: UUID + name: str + config: PromptConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + name = self.name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + "name": name, + } + ) + if config is not UNSET: + field_dict["config"] = config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_config import PromptConfig + + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + name = d.pop("name") + + _config = d.pop("config", UNSET) + config: PromptConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = PromptConfig.from_dict(_config) + + add_run_prompt = cls( + dataset_id=dataset_id, + name=name, + config=config, + ) + + add_run_prompt.additional_properties = d + return add_run_prompt + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_bulk_delete_request.py b/python/fi/generated/openapi_client/models/agent_definition_bulk_delete_request.py new file mode 100644 index 0000000..fdec664 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_bulk_delete_request.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionBulkDeleteRequest") + + +@_attrs_define +class AgentDefinitionBulkDeleteRequest: + """ + Attributes: + agent_ids (list[UUID]): List of agent definition UUIDs to delete. + """ + + agent_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_ids = [] + for agent_ids_item_data in self.agent_ids: + agent_ids_item = str(agent_ids_item_data) + agent_ids.append(agent_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_ids": agent_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_ids = [] + _agent_ids = d.pop("agent_ids") + for agent_ids_item_data in _agent_ids: + agent_ids_item = UUID(agent_ids_item_data) + + agent_ids.append(agent_ids_item) + + agent_definition_bulk_delete_request = cls( + agent_ids=agent_ids, + ) + + agent_definition_bulk_delete_request.additional_properties = d + return agent_definition_bulk_delete_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_bulk_delete_response.py b/python/fi/generated/openapi_client/models/agent_definition_bulk_delete_response.py new file mode 100644 index 0000000..0d7723e --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_bulk_delete_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AgentDefinitionBulkDeleteResponse") + + +@_attrs_define +class AgentDefinitionBulkDeleteResponse: + """ + Attributes: + message (str | Unset): + agents_updated (int | Unset): + versions_updated (int | Unset): + """ + + message: str | Unset = UNSET + agents_updated: int | Unset = UNSET + versions_updated: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + agents_updated = self.agents_updated + + versions_updated = self.versions_updated + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if agents_updated is not UNSET: + field_dict["agents_updated"] = agents_updated + if versions_updated is not UNSET: + field_dict["versions_updated"] = versions_updated + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + agents_updated = d.pop("agents_updated", UNSET) + + versions_updated = d.pop("versions_updated", UNSET) + + agent_definition_bulk_delete_response = cls( + message=message, + agents_updated=agents_updated, + versions_updated=versions_updated, + ) + + agent_definition_bulk_delete_response.additional_properties = d + return agent_definition_bulk_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_create_request.py b/python/fi/generated/openapi_client/models/agent_definition_create_request.py new file mode 100644 index 0000000..4b7bd28 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_create_request.py @@ -0,0 +1,548 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.agent_definition_create_request_agent_type import ( + AgentDefinitionCreateRequestAgentType, +) +from ..models.agent_definition_create_request_authentication_method import ( + AgentDefinitionCreateRequestAuthenticationMethod, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_definition_create_request_livekit_config_json import ( + AgentDefinitionCreateRequestLivekitConfigJson, + ) + from ..models.agent_definition_create_request_model_details import ( + AgentDefinitionCreateRequestModelDetails, + ) + from ..models.agent_definition_create_request_websocket_headers import ( + AgentDefinitionCreateRequestWebsocketHeaders, + ) + + +T = TypeVar("T", bound="AgentDefinitionCreateRequest") + + +@_attrs_define +class AgentDefinitionCreateRequest: + """ + Attributes: + agent_name (str): + agent_type (AgentDefinitionCreateRequestAgentType): The type of agent. One of: voice, text. + commit_message (str): + inbound (bool | Unset): Default: True. + description (str | Unset): Default: ''. + provider (None | str | Unset): + api_key (None | str | Unset): + assistant_id (None | str | Unset): + authentication_method (AgentDefinitionCreateRequestAuthenticationMethod | Unset): + language (None | str | Unset): + languages (list[str] | None | Unset): + contact_number (None | str | Unset): + knowledge_base (None | Unset | UUID): + observability_enabled (bool | Unset): Default: False. + model (None | str | Unset): + model_details (AgentDefinitionCreateRequestModelDetails | Unset): + websocket_url (None | str | Unset): + websocket_headers (AgentDefinitionCreateRequestWebsocketHeaders | Unset): + replay_session_id (None | Unset | UUID): + livekit_url (None | str | Unset): + livekit_api_key (None | str | Unset): + livekit_api_secret (None | str | Unset): + livekit_agent_name (None | str | Unset): + livekit_config_json (AgentDefinitionCreateRequestLivekitConfigJson | Unset): + livekit_max_concurrency (int | None | Unset): + """ + + agent_name: str + agent_type: AgentDefinitionCreateRequestAgentType + commit_message: str + inbound: bool | Unset = True + description: str | Unset = "" + provider: None | str | Unset = UNSET + api_key: None | str | Unset = UNSET + assistant_id: None | str | Unset = UNSET + authentication_method: AgentDefinitionCreateRequestAuthenticationMethod | Unset = ( + UNSET + ) + language: None | str | Unset = UNSET + languages: list[str] | None | Unset = UNSET + contact_number: None | str | Unset = UNSET + knowledge_base: None | Unset | UUID = UNSET + observability_enabled: bool | Unset = False + model: None | str | Unset = UNSET + model_details: AgentDefinitionCreateRequestModelDetails | Unset = UNSET + websocket_url: None | str | Unset = UNSET + websocket_headers: AgentDefinitionCreateRequestWebsocketHeaders | Unset = UNSET + replay_session_id: None | Unset | UUID = UNSET + livekit_url: None | str | Unset = UNSET + livekit_api_key: None | str | Unset = UNSET + livekit_api_secret: None | str | Unset = UNSET + livekit_agent_name: None | str | Unset = UNSET + livekit_config_json: AgentDefinitionCreateRequestLivekitConfigJson | Unset = UNSET + livekit_max_concurrency: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_name = self.agent_name + + agent_type = self.agent_type.value + + commit_message = self.commit_message + + inbound = self.inbound + + description = self.description + + provider: None | str | Unset + if isinstance(self.provider, Unset): + provider = UNSET + else: + provider = self.provider + + api_key: None | str | Unset + if isinstance(self.api_key, Unset): + api_key = UNSET + else: + api_key = self.api_key + + assistant_id: None | str | Unset + if isinstance(self.assistant_id, Unset): + assistant_id = UNSET + else: + assistant_id = self.assistant_id + + authentication_method: str | Unset = UNSET + if not isinstance(self.authentication_method, Unset): + authentication_method = self.authentication_method.value + + language: None | str | Unset + if isinstance(self.language, Unset): + language = UNSET + else: + language = self.language + + languages: list[str] | None | Unset + if isinstance(self.languages, Unset): + languages = UNSET + elif isinstance(self.languages, list): + languages = self.languages + + else: + languages = self.languages + + contact_number: None | str | Unset + if isinstance(self.contact_number, Unset): + contact_number = UNSET + else: + contact_number = self.contact_number + + knowledge_base: None | str | Unset + if isinstance(self.knowledge_base, Unset): + knowledge_base = UNSET + elif isinstance(self.knowledge_base, UUID): + knowledge_base = str(self.knowledge_base) + else: + knowledge_base = self.knowledge_base + + observability_enabled = self.observability_enabled + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + model_details: dict[str, Any] | Unset = UNSET + if not isinstance(self.model_details, Unset): + model_details = self.model_details.to_dict() + + websocket_url: None | str | Unset + if isinstance(self.websocket_url, Unset): + websocket_url = UNSET + else: + websocket_url = self.websocket_url + + websocket_headers: dict[str, Any] | Unset = UNSET + if not isinstance(self.websocket_headers, Unset): + websocket_headers = self.websocket_headers.to_dict() + + replay_session_id: None | str | Unset + if isinstance(self.replay_session_id, Unset): + replay_session_id = UNSET + elif isinstance(self.replay_session_id, UUID): + replay_session_id = str(self.replay_session_id) + else: + replay_session_id = self.replay_session_id + + livekit_url: None | str | Unset + if isinstance(self.livekit_url, Unset): + livekit_url = UNSET + else: + livekit_url = self.livekit_url + + livekit_api_key: None | str | Unset + if isinstance(self.livekit_api_key, Unset): + livekit_api_key = UNSET + else: + livekit_api_key = self.livekit_api_key + + livekit_api_secret: None | str | Unset + if isinstance(self.livekit_api_secret, Unset): + livekit_api_secret = UNSET + else: + livekit_api_secret = self.livekit_api_secret + + livekit_agent_name: None | str | Unset + if isinstance(self.livekit_agent_name, Unset): + livekit_agent_name = UNSET + else: + livekit_agent_name = self.livekit_agent_name + + livekit_config_json: dict[str, Any] | Unset = UNSET + if not isinstance(self.livekit_config_json, Unset): + livekit_config_json = self.livekit_config_json.to_dict() + + livekit_max_concurrency: int | None | Unset + if isinstance(self.livekit_max_concurrency, Unset): + livekit_max_concurrency = UNSET + else: + livekit_max_concurrency = self.livekit_max_concurrency + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "agent_name": agent_name, + "agent_type": agent_type, + "commit_message": commit_message, + } + ) + if inbound is not UNSET: + field_dict["inbound"] = inbound + if description is not UNSET: + field_dict["description"] = description + if provider is not UNSET: + field_dict["provider"] = provider + if api_key is not UNSET: + field_dict["api_key"] = api_key + if assistant_id is not UNSET: + field_dict["assistant_id"] = assistant_id + if authentication_method is not UNSET: + field_dict["authentication_method"] = authentication_method + if language is not UNSET: + field_dict["language"] = language + if languages is not UNSET: + field_dict["languages"] = languages + if contact_number is not UNSET: + field_dict["contact_number"] = contact_number + if knowledge_base is not UNSET: + field_dict["knowledge_base"] = knowledge_base + if observability_enabled is not UNSET: + field_dict["observability_enabled"] = observability_enabled + if model is not UNSET: + field_dict["model"] = model + if model_details is not UNSET: + field_dict["model_details"] = model_details + if websocket_url is not UNSET: + field_dict["websocket_url"] = websocket_url + if websocket_headers is not UNSET: + field_dict["websocket_headers"] = websocket_headers + if replay_session_id is not UNSET: + field_dict["replay_session_id"] = replay_session_id + if livekit_url is not UNSET: + field_dict["livekit_url"] = livekit_url + if livekit_api_key is not UNSET: + field_dict["livekit_api_key"] = livekit_api_key + if livekit_api_secret is not UNSET: + field_dict["livekit_api_secret"] = livekit_api_secret + if livekit_agent_name is not UNSET: + field_dict["livekit_agent_name"] = livekit_agent_name + if livekit_config_json is not UNSET: + field_dict["livekit_config_json"] = livekit_config_json + if livekit_max_concurrency is not UNSET: + field_dict["livekit_max_concurrency"] = livekit_max_concurrency + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_definition_create_request_livekit_config_json import ( + AgentDefinitionCreateRequestLivekitConfigJson, + ) + from ..models.agent_definition_create_request_model_details import ( + AgentDefinitionCreateRequestModelDetails, + ) + from ..models.agent_definition_create_request_websocket_headers import ( + AgentDefinitionCreateRequestWebsocketHeaders, + ) + + d = dict(src_dict) + agent_name = d.pop("agent_name") + + agent_type = AgentDefinitionCreateRequestAgentType(d.pop("agent_type")) + + commit_message = d.pop("commit_message") + + inbound = d.pop("inbound", UNSET) + + description = d.pop("description", UNSET) + + def _parse_provider(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + provider = _parse_provider(d.pop("provider", UNSET)) + + def _parse_api_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + api_key = _parse_api_key(d.pop("api_key", UNSET)) + + def _parse_assistant_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + assistant_id = _parse_assistant_id(d.pop("assistant_id", UNSET)) + + _authentication_method = d.pop("authentication_method", UNSET) + authentication_method: AgentDefinitionCreateRequestAuthenticationMethod | Unset + if isinstance(_authentication_method, Unset): + authentication_method = UNSET + else: + authentication_method = AgentDefinitionCreateRequestAuthenticationMethod( + _authentication_method + ) + + def _parse_language(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + language = _parse_language(d.pop("language", UNSET)) + + def _parse_languages(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + languages_type_0 = cast(list[str], data) + + return languages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + languages = _parse_languages(d.pop("languages", UNSET)) + + def _parse_contact_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + contact_number = _parse_contact_number(d.pop("contact_number", UNSET)) + + def _parse_knowledge_base(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + knowledge_base_type_0 = UUID(data) + + return knowledge_base_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + knowledge_base = _parse_knowledge_base(d.pop("knowledge_base", UNSET)) + + observability_enabled = d.pop("observability_enabled", UNSET) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _model_details = d.pop("model_details", UNSET) + model_details: AgentDefinitionCreateRequestModelDetails | Unset + if isinstance(_model_details, Unset): + model_details = UNSET + else: + model_details = AgentDefinitionCreateRequestModelDetails.from_dict( + _model_details + ) + + def _parse_websocket_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + websocket_url = _parse_websocket_url(d.pop("websocket_url", UNSET)) + + _websocket_headers = d.pop("websocket_headers", UNSET) + websocket_headers: AgentDefinitionCreateRequestWebsocketHeaders | Unset + if isinstance(_websocket_headers, Unset): + websocket_headers = UNSET + else: + websocket_headers = AgentDefinitionCreateRequestWebsocketHeaders.from_dict( + _websocket_headers + ) + + def _parse_replay_session_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + replay_session_id_type_0 = UUID(data) + + return replay_session_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + replay_session_id = _parse_replay_session_id(d.pop("replay_session_id", UNSET)) + + def _parse_livekit_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_url = _parse_livekit_url(d.pop("livekit_url", UNSET)) + + def _parse_livekit_api_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_api_key = _parse_livekit_api_key(d.pop("livekit_api_key", UNSET)) + + def _parse_livekit_api_secret(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_api_secret = _parse_livekit_api_secret( + d.pop("livekit_api_secret", UNSET) + ) + + def _parse_livekit_agent_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_agent_name = _parse_livekit_agent_name( + d.pop("livekit_agent_name", UNSET) + ) + + _livekit_config_json = d.pop("livekit_config_json", UNSET) + livekit_config_json: AgentDefinitionCreateRequestLivekitConfigJson | Unset + if isinstance(_livekit_config_json, Unset): + livekit_config_json = UNSET + else: + livekit_config_json = ( + AgentDefinitionCreateRequestLivekitConfigJson.from_dict( + _livekit_config_json + ) + ) + + def _parse_livekit_max_concurrency(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + livekit_max_concurrency = _parse_livekit_max_concurrency( + d.pop("livekit_max_concurrency", UNSET) + ) + + agent_definition_create_request = cls( + agent_name=agent_name, + agent_type=agent_type, + commit_message=commit_message, + inbound=inbound, + description=description, + provider=provider, + api_key=api_key, + assistant_id=assistant_id, + authentication_method=authentication_method, + language=language, + languages=languages, + contact_number=contact_number, + knowledge_base=knowledge_base, + observability_enabled=observability_enabled, + model=model, + model_details=model_details, + websocket_url=websocket_url, + websocket_headers=websocket_headers, + replay_session_id=replay_session_id, + livekit_url=livekit_url, + livekit_api_key=livekit_api_key, + livekit_api_secret=livekit_api_secret, + livekit_agent_name=livekit_agent_name, + livekit_config_json=livekit_config_json, + livekit_max_concurrency=livekit_max_concurrency, + ) + + agent_definition_create_request.additional_properties = d + return agent_definition_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_create_request_agent_type.py b/python/fi/generated/openapi_client/models/agent_definition_create_request_agent_type.py new file mode 100644 index 0000000..1431c66 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_create_request_agent_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AgentDefinitionCreateRequestAgentType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_create_request_authentication_method.py b/python/fi/generated/openapi_client/models/agent_definition_create_request_authentication_method.py new file mode 100644 index 0000000..b308913 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_create_request_authentication_method.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class AgentDefinitionCreateRequestAuthenticationMethod(str, Enum): + API_KEY = "api_key" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_create_request_livekit_config_json.py b/python/fi/generated/openapi_client/models/agent_definition_create_request_livekit_config_json.py new file mode 100644 index 0000000..5e7efa9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_create_request_livekit_config_json.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionCreateRequestLivekitConfigJson") + + +@_attrs_define +class AgentDefinitionCreateRequestLivekitConfigJson: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_create_request_livekit_config_json = cls() + + agent_definition_create_request_livekit_config_json.additional_properties = d + return agent_definition_create_request_livekit_config_json + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_create_request_model_details.py b/python/fi/generated/openapi_client/models/agent_definition_create_request_model_details.py new file mode 100644 index 0000000..1443641 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_create_request_model_details.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionCreateRequestModelDetails") + + +@_attrs_define +class AgentDefinitionCreateRequestModelDetails: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_create_request_model_details = cls() + + agent_definition_create_request_model_details.additional_properties = d + return agent_definition_create_request_model_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_create_request_websocket_headers.py b/python/fi/generated/openapi_client/models/agent_definition_create_request_websocket_headers.py new file mode 100644 index 0000000..7caf683 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_create_request_websocket_headers.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionCreateRequestWebsocketHeaders") + + +@_attrs_define +class AgentDefinitionCreateRequestWebsocketHeaders: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_create_request_websocket_headers = cls() + + agent_definition_create_request_websocket_headers.additional_properties = d + return agent_definition_create_request_websocket_headers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_create_response.py b/python/fi/generated/openapi_client/models/agent_definition_create_response.py new file mode 100644 index 0000000..7b37674 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_create_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_definition_response import AgentDefinitionResponse + + +T = TypeVar("T", bound="AgentDefinitionCreateResponse") + + +@_attrs_define +class AgentDefinitionCreateResponse: + """ + Attributes: + message (str | Unset): + agent (AgentDefinitionResponse | Unset): + """ + + message: str | Unset = UNSET + agent: AgentDefinitionResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + agent: dict[str, Any] | Unset = UNSET + if not isinstance(self.agent, Unset): + agent = self.agent.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if agent is not UNSET: + field_dict["agent"] = agent + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_definition_response import AgentDefinitionResponse + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _agent = d.pop("agent", UNSET) + agent: AgentDefinitionResponse | Unset + if isinstance(_agent, Unset): + agent = UNSET + else: + agent = AgentDefinitionResponse.from_dict(_agent) + + agent_definition_create_response = cls( + message=message, + agent=agent, + ) + + agent_definition_create_response.additional_properties = d + return agent_definition_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_delete_response.py b/python/fi/generated/openapi_client/models/agent_definition_delete_response.py new file mode 100644 index 0000000..91686c8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_delete_response.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AgentDefinitionDeleteResponse") + + +@_attrs_define +class AgentDefinitionDeleteResponse: + """ + Attributes: + message (str | Unset): + """ + + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + agent_definition_delete_response = cls( + message=message, + ) + + agent_definition_delete_response.additional_properties = d + return agent_definition_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_edit_request.py b/python/fi/generated/openapi_client/models/agent_definition_edit_request.py new file mode 100644 index 0000000..2e09b85 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_edit_request.py @@ -0,0 +1,516 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.agent_definition_edit_request_agent_type import ( + AgentDefinitionEditRequestAgentType, +) +from ..models.agent_definition_edit_request_authentication_method import ( + AgentDefinitionEditRequestAuthenticationMethod, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_definition_edit_request_livekit_config_json import ( + AgentDefinitionEditRequestLivekitConfigJson, + ) + from ..models.agent_definition_edit_request_model_details import ( + AgentDefinitionEditRequestModelDetails, + ) + from ..models.agent_definition_edit_request_websocket_headers import ( + AgentDefinitionEditRequestWebsocketHeaders, + ) + + +T = TypeVar("T", bound="AgentDefinitionEditRequest") + + +@_attrs_define +class AgentDefinitionEditRequest: + """ + Attributes: + agent_name (str | Unset): + agent_type (AgentDefinitionEditRequestAgentType | Unset): + description (None | str | Unset): + provider (None | str | Unset): + api_key (None | str | Unset): + assistant_id (None | str | Unset): + authentication_method (AgentDefinitionEditRequestAuthenticationMethod | Unset): + language (None | str | Unset): + languages (list[str] | None | Unset): + contact_number (None | str | Unset): + inbound (bool | Unset): + knowledge_base (None | Unset | UUID): + model (None | str | Unset): + model_details (AgentDefinitionEditRequestModelDetails | Unset): + websocket_url (None | str | Unset): + websocket_headers (AgentDefinitionEditRequestWebsocketHeaders | Unset): + livekit_url (None | str | Unset): + livekit_api_key (None | str | Unset): + livekit_api_secret (None | str | Unset): + livekit_agent_name (None | str | Unset): + livekit_config_json (AgentDefinitionEditRequestLivekitConfigJson | Unset): + livekit_max_concurrency (int | None | Unset): + """ + + agent_name: str | Unset = UNSET + agent_type: AgentDefinitionEditRequestAgentType | Unset = UNSET + description: None | str | Unset = UNSET + provider: None | str | Unset = UNSET + api_key: None | str | Unset = UNSET + assistant_id: None | str | Unset = UNSET + authentication_method: AgentDefinitionEditRequestAuthenticationMethod | Unset = ( + UNSET + ) + language: None | str | Unset = UNSET + languages: list[str] | None | Unset = UNSET + contact_number: None | str | Unset = UNSET + inbound: bool | Unset = UNSET + knowledge_base: None | Unset | UUID = UNSET + model: None | str | Unset = UNSET + model_details: AgentDefinitionEditRequestModelDetails | Unset = UNSET + websocket_url: None | str | Unset = UNSET + websocket_headers: AgentDefinitionEditRequestWebsocketHeaders | Unset = UNSET + livekit_url: None | str | Unset = UNSET + livekit_api_key: None | str | Unset = UNSET + livekit_api_secret: None | str | Unset = UNSET + livekit_agent_name: None | str | Unset = UNSET + livekit_config_json: AgentDefinitionEditRequestLivekitConfigJson | Unset = UNSET + livekit_max_concurrency: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_name = self.agent_name + + agent_type: str | Unset = UNSET + if not isinstance(self.agent_type, Unset): + agent_type = self.agent_type.value + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + provider: None | str | Unset + if isinstance(self.provider, Unset): + provider = UNSET + else: + provider = self.provider + + api_key: None | str | Unset + if isinstance(self.api_key, Unset): + api_key = UNSET + else: + api_key = self.api_key + + assistant_id: None | str | Unset + if isinstance(self.assistant_id, Unset): + assistant_id = UNSET + else: + assistant_id = self.assistant_id + + authentication_method: str | Unset = UNSET + if not isinstance(self.authentication_method, Unset): + authentication_method = self.authentication_method.value + + language: None | str | Unset + if isinstance(self.language, Unset): + language = UNSET + else: + language = self.language + + languages: list[str] | None | Unset + if isinstance(self.languages, Unset): + languages = UNSET + elif isinstance(self.languages, list): + languages = self.languages + + else: + languages = self.languages + + contact_number: None | str | Unset + if isinstance(self.contact_number, Unset): + contact_number = UNSET + else: + contact_number = self.contact_number + + inbound = self.inbound + + knowledge_base: None | str | Unset + if isinstance(self.knowledge_base, Unset): + knowledge_base = UNSET + elif isinstance(self.knowledge_base, UUID): + knowledge_base = str(self.knowledge_base) + else: + knowledge_base = self.knowledge_base + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + model_details: dict[str, Any] | Unset = UNSET + if not isinstance(self.model_details, Unset): + model_details = self.model_details.to_dict() + + websocket_url: None | str | Unset + if isinstance(self.websocket_url, Unset): + websocket_url = UNSET + else: + websocket_url = self.websocket_url + + websocket_headers: dict[str, Any] | Unset = UNSET + if not isinstance(self.websocket_headers, Unset): + websocket_headers = self.websocket_headers.to_dict() + + livekit_url: None | str | Unset + if isinstance(self.livekit_url, Unset): + livekit_url = UNSET + else: + livekit_url = self.livekit_url + + livekit_api_key: None | str | Unset + if isinstance(self.livekit_api_key, Unset): + livekit_api_key = UNSET + else: + livekit_api_key = self.livekit_api_key + + livekit_api_secret: None | str | Unset + if isinstance(self.livekit_api_secret, Unset): + livekit_api_secret = UNSET + else: + livekit_api_secret = self.livekit_api_secret + + livekit_agent_name: None | str | Unset + if isinstance(self.livekit_agent_name, Unset): + livekit_agent_name = UNSET + else: + livekit_agent_name = self.livekit_agent_name + + livekit_config_json: dict[str, Any] | Unset = UNSET + if not isinstance(self.livekit_config_json, Unset): + livekit_config_json = self.livekit_config_json.to_dict() + + livekit_max_concurrency: int | None | Unset + if isinstance(self.livekit_max_concurrency, Unset): + livekit_max_concurrency = UNSET + else: + livekit_max_concurrency = self.livekit_max_concurrency + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if agent_name is not UNSET: + field_dict["agent_name"] = agent_name + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + if description is not UNSET: + field_dict["description"] = description + if provider is not UNSET: + field_dict["provider"] = provider + if api_key is not UNSET: + field_dict["api_key"] = api_key + if assistant_id is not UNSET: + field_dict["assistant_id"] = assistant_id + if authentication_method is not UNSET: + field_dict["authentication_method"] = authentication_method + if language is not UNSET: + field_dict["language"] = language + if languages is not UNSET: + field_dict["languages"] = languages + if contact_number is not UNSET: + field_dict["contact_number"] = contact_number + if inbound is not UNSET: + field_dict["inbound"] = inbound + if knowledge_base is not UNSET: + field_dict["knowledge_base"] = knowledge_base + if model is not UNSET: + field_dict["model"] = model + if model_details is not UNSET: + field_dict["model_details"] = model_details + if websocket_url is not UNSET: + field_dict["websocket_url"] = websocket_url + if websocket_headers is not UNSET: + field_dict["websocket_headers"] = websocket_headers + if livekit_url is not UNSET: + field_dict["livekit_url"] = livekit_url + if livekit_api_key is not UNSET: + field_dict["livekit_api_key"] = livekit_api_key + if livekit_api_secret is not UNSET: + field_dict["livekit_api_secret"] = livekit_api_secret + if livekit_agent_name is not UNSET: + field_dict["livekit_agent_name"] = livekit_agent_name + if livekit_config_json is not UNSET: + field_dict["livekit_config_json"] = livekit_config_json + if livekit_max_concurrency is not UNSET: + field_dict["livekit_max_concurrency"] = livekit_max_concurrency + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_definition_edit_request_livekit_config_json import ( + AgentDefinitionEditRequestLivekitConfigJson, + ) + from ..models.agent_definition_edit_request_model_details import ( + AgentDefinitionEditRequestModelDetails, + ) + from ..models.agent_definition_edit_request_websocket_headers import ( + AgentDefinitionEditRequestWebsocketHeaders, + ) + + d = dict(src_dict) + agent_name = d.pop("agent_name", UNSET) + + _agent_type = d.pop("agent_type", UNSET) + agent_type: AgentDefinitionEditRequestAgentType | Unset + if isinstance(_agent_type, Unset): + agent_type = UNSET + else: + agent_type = AgentDefinitionEditRequestAgentType(_agent_type) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_provider(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + provider = _parse_provider(d.pop("provider", UNSET)) + + def _parse_api_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + api_key = _parse_api_key(d.pop("api_key", UNSET)) + + def _parse_assistant_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + assistant_id = _parse_assistant_id(d.pop("assistant_id", UNSET)) + + _authentication_method = d.pop("authentication_method", UNSET) + authentication_method: AgentDefinitionEditRequestAuthenticationMethod | Unset + if isinstance(_authentication_method, Unset): + authentication_method = UNSET + else: + authentication_method = AgentDefinitionEditRequestAuthenticationMethod( + _authentication_method + ) + + def _parse_language(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + language = _parse_language(d.pop("language", UNSET)) + + def _parse_languages(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + languages_type_0 = cast(list[str], data) + + return languages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + languages = _parse_languages(d.pop("languages", UNSET)) + + def _parse_contact_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + contact_number = _parse_contact_number(d.pop("contact_number", UNSET)) + + inbound = d.pop("inbound", UNSET) + + def _parse_knowledge_base(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + knowledge_base_type_0 = UUID(data) + + return knowledge_base_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + knowledge_base = _parse_knowledge_base(d.pop("knowledge_base", UNSET)) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _model_details = d.pop("model_details", UNSET) + model_details: AgentDefinitionEditRequestModelDetails | Unset + if isinstance(_model_details, Unset): + model_details = UNSET + else: + model_details = AgentDefinitionEditRequestModelDetails.from_dict( + _model_details + ) + + def _parse_websocket_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + websocket_url = _parse_websocket_url(d.pop("websocket_url", UNSET)) + + _websocket_headers = d.pop("websocket_headers", UNSET) + websocket_headers: AgentDefinitionEditRequestWebsocketHeaders | Unset + if isinstance(_websocket_headers, Unset): + websocket_headers = UNSET + else: + websocket_headers = AgentDefinitionEditRequestWebsocketHeaders.from_dict( + _websocket_headers + ) + + def _parse_livekit_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_url = _parse_livekit_url(d.pop("livekit_url", UNSET)) + + def _parse_livekit_api_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_api_key = _parse_livekit_api_key(d.pop("livekit_api_key", UNSET)) + + def _parse_livekit_api_secret(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_api_secret = _parse_livekit_api_secret( + d.pop("livekit_api_secret", UNSET) + ) + + def _parse_livekit_agent_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + livekit_agent_name = _parse_livekit_agent_name( + d.pop("livekit_agent_name", UNSET) + ) + + _livekit_config_json = d.pop("livekit_config_json", UNSET) + livekit_config_json: AgentDefinitionEditRequestLivekitConfigJson | Unset + if isinstance(_livekit_config_json, Unset): + livekit_config_json = UNSET + else: + livekit_config_json = AgentDefinitionEditRequestLivekitConfigJson.from_dict( + _livekit_config_json + ) + + def _parse_livekit_max_concurrency(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + livekit_max_concurrency = _parse_livekit_max_concurrency( + d.pop("livekit_max_concurrency", UNSET) + ) + + agent_definition_edit_request = cls( + agent_name=agent_name, + agent_type=agent_type, + description=description, + provider=provider, + api_key=api_key, + assistant_id=assistant_id, + authentication_method=authentication_method, + language=language, + languages=languages, + contact_number=contact_number, + inbound=inbound, + knowledge_base=knowledge_base, + model=model, + model_details=model_details, + websocket_url=websocket_url, + websocket_headers=websocket_headers, + livekit_url=livekit_url, + livekit_api_key=livekit_api_key, + livekit_api_secret=livekit_api_secret, + livekit_agent_name=livekit_agent_name, + livekit_config_json=livekit_config_json, + livekit_max_concurrency=livekit_max_concurrency, + ) + + agent_definition_edit_request.additional_properties = d + return agent_definition_edit_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_edit_request_agent_type.py b/python/fi/generated/openapi_client/models/agent_definition_edit_request_agent_type.py new file mode 100644 index 0000000..44d2706 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_edit_request_agent_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AgentDefinitionEditRequestAgentType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_edit_request_authentication_method.py b/python/fi/generated/openapi_client/models/agent_definition_edit_request_authentication_method.py new file mode 100644 index 0000000..a9e979a --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_edit_request_authentication_method.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class AgentDefinitionEditRequestAuthenticationMethod(str, Enum): + API_KEY = "api_key" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_edit_request_livekit_config_json.py b/python/fi/generated/openapi_client/models/agent_definition_edit_request_livekit_config_json.py new file mode 100644 index 0000000..ca22758 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_edit_request_livekit_config_json.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionEditRequestLivekitConfigJson") + + +@_attrs_define +class AgentDefinitionEditRequestLivekitConfigJson: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_edit_request_livekit_config_json = cls() + + agent_definition_edit_request_livekit_config_json.additional_properties = d + return agent_definition_edit_request_livekit_config_json + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_edit_request_model_details.py b/python/fi/generated/openapi_client/models/agent_definition_edit_request_model_details.py new file mode 100644 index 0000000..5bb1e9c --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_edit_request_model_details.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionEditRequestModelDetails") + + +@_attrs_define +class AgentDefinitionEditRequestModelDetails: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_edit_request_model_details = cls() + + agent_definition_edit_request_model_details.additional_properties = d + return agent_definition_edit_request_model_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_edit_request_websocket_headers.py b/python/fi/generated/openapi_client/models/agent_definition_edit_request_websocket_headers.py new file mode 100644 index 0000000..ff7a69d --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_edit_request_websocket_headers.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionEditRequestWebsocketHeaders") + + +@_attrs_define +class AgentDefinitionEditRequestWebsocketHeaders: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_edit_request_websocket_headers = cls() + + agent_definition_edit_request_websocket_headers.additional_properties = d + return agent_definition_edit_request_websocket_headers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_edit_response.py b/python/fi/generated/openapi_client/models/agent_definition_edit_response.py new file mode 100644 index 0000000..40c3ab2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_edit_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_definition_response import AgentDefinitionResponse + + +T = TypeVar("T", bound="AgentDefinitionEditResponse") + + +@_attrs_define +class AgentDefinitionEditResponse: + """ + Attributes: + message (str | Unset): + agent (AgentDefinitionResponse | Unset): + """ + + message: str | Unset = UNSET + agent: AgentDefinitionResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + agent: dict[str, Any] | Unset = UNSET + if not isinstance(self.agent, Unset): + agent = self.agent.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if agent is not UNSET: + field_dict["agent"] = agent + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_definition_response import AgentDefinitionResponse + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _agent = d.pop("agent", UNSET) + agent: AgentDefinitionResponse | Unset + if isinstance(_agent, Unset): + agent = UNSET + else: + agent = AgentDefinitionResponse.from_dict(_agent) + + agent_definition_edit_response = cls( + message=message, + agent=agent, + ) + + agent_definition_edit_response.additional_properties = d + return agent_definition_edit_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_list_response.py b/python/fi/generated/openapi_client/models/agent_definition_list_response.py new file mode 100644 index 0000000..ead4029 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_list_response.py @@ -0,0 +1,461 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.agent_definition_list_response_agent_type import ( + AgentDefinitionListResponseAgentType, +) +from ..models.agent_definition_list_response_language import ( + AgentDefinitionListResponseLanguage, +) +from ..models.agent_definition_list_response_languages import ( + AgentDefinitionListResponseLanguages, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_definition_list_response_model_details import ( + AgentDefinitionListResponseModelDetails, + ) + from ..models.agent_definition_list_response_websocket_headers import ( + AgentDefinitionListResponseWebsocketHeaders, + ) + + +T = TypeVar("T", bound="AgentDefinitionListResponse") + + +@_attrs_define +class AgentDefinitionListResponse: + """ + Attributes: + id (UUID | Unset): + agent_name (str | Unset): Name of the AI agent + agent_type (AgentDefinitionListResponseAgentType | Unset): + contact_number (None | str | Unset): Phone number associated with the AI agent + inbound (bool | Unset): Whether the agent handles inbound calls + description (str | Unset): Detailed description of the AI agent's purpose and capabilities + assistant_id (None | str | Unset): External identifier for the assistant + provider (None | str | Unset): Provider of the AI agent + language (AgentDefinitionListResponseLanguage | Unset): Language of the agent + languages (list[AgentDefinitionListResponseLanguages] | None | Unset): + websocket_url (None | str | Unset): WebSocket URL for real-time communication with the agent + websocket_headers (AgentDefinitionListResponseWebsocketHeaders | Unset): Headers to be sent to the websocket + server + workspace (None | Unset | UUID): + knowledge_base (None | Unset | UUID): + organization (UUID | Unset): Organization this agent definition belongs to + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + latest_version (str | Unset): + latest_version_id (str | Unset): + model_details (AgentDefinitionListResponseModelDetails | Unset): Details of the model + model (None | str | Unset): Model of the agent + """ + + id: UUID | Unset = UNSET + agent_name: str | Unset = UNSET + agent_type: AgentDefinitionListResponseAgentType | Unset = UNSET + contact_number: None | str | Unset = UNSET + inbound: bool | Unset = UNSET + description: str | Unset = UNSET + assistant_id: None | str | Unset = UNSET + provider: None | str | Unset = UNSET + language: AgentDefinitionListResponseLanguage | Unset = UNSET + languages: list[AgentDefinitionListResponseLanguages] | None | Unset = UNSET + websocket_url: None | str | Unset = UNSET + websocket_headers: AgentDefinitionListResponseWebsocketHeaders | Unset = UNSET + workspace: None | Unset | UUID = UNSET + knowledge_base: None | Unset | UUID = UNSET + organization: UUID | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + latest_version: str | Unset = UNSET + latest_version_id: str | Unset = UNSET + model_details: AgentDefinitionListResponseModelDetails | Unset = UNSET + model: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + agent_name = self.agent_name + + agent_type: str | Unset = UNSET + if not isinstance(self.agent_type, Unset): + agent_type = self.agent_type.value + + contact_number: None | str | Unset + if isinstance(self.contact_number, Unset): + contact_number = UNSET + else: + contact_number = self.contact_number + + inbound = self.inbound + + description = self.description + + assistant_id: None | str | Unset + if isinstance(self.assistant_id, Unset): + assistant_id = UNSET + else: + assistant_id = self.assistant_id + + provider: None | str | Unset + if isinstance(self.provider, Unset): + provider = UNSET + else: + provider = self.provider + + language: str | Unset = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + languages: list[str] | None | Unset + if isinstance(self.languages, Unset): + languages = UNSET + elif isinstance(self.languages, list): + languages = [] + for languages_type_0_item_data in self.languages: + languages_type_0_item = languages_type_0_item_data.value + languages.append(languages_type_0_item) + + else: + languages = self.languages + + websocket_url: None | str | Unset + if isinstance(self.websocket_url, Unset): + websocket_url = UNSET + else: + websocket_url = self.websocket_url + + websocket_headers: dict[str, Any] | Unset = UNSET + if not isinstance(self.websocket_headers, Unset): + websocket_headers = self.websocket_headers.to_dict() + + workspace: None | str | Unset + if isinstance(self.workspace, Unset): + workspace = UNSET + elif isinstance(self.workspace, UUID): + workspace = str(self.workspace) + else: + workspace = self.workspace + + knowledge_base: None | str | Unset + if isinstance(self.knowledge_base, Unset): + knowledge_base = UNSET + elif isinstance(self.knowledge_base, UUID): + knowledge_base = str(self.knowledge_base) + else: + knowledge_base = self.knowledge_base + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + latest_version = self.latest_version + + latest_version_id = self.latest_version_id + + model_details: dict[str, Any] | Unset = UNSET + if not isinstance(self.model_details, Unset): + model_details = self.model_details.to_dict() + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if agent_name is not UNSET: + field_dict["agent_name"] = agent_name + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + if contact_number is not UNSET: + field_dict["contact_number"] = contact_number + if inbound is not UNSET: + field_dict["inbound"] = inbound + if description is not UNSET: + field_dict["description"] = description + if assistant_id is not UNSET: + field_dict["assistant_id"] = assistant_id + if provider is not UNSET: + field_dict["provider"] = provider + if language is not UNSET: + field_dict["language"] = language + if languages is not UNSET: + field_dict["languages"] = languages + if websocket_url is not UNSET: + field_dict["websocket_url"] = websocket_url + if websocket_headers is not UNSET: + field_dict["websocket_headers"] = websocket_headers + if workspace is not UNSET: + field_dict["workspace"] = workspace + if knowledge_base is not UNSET: + field_dict["knowledge_base"] = knowledge_base + if organization is not UNSET: + field_dict["organization"] = organization + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if latest_version is not UNSET: + field_dict["latest_version"] = latest_version + if latest_version_id is not UNSET: + field_dict["latest_version_id"] = latest_version_id + if model_details is not UNSET: + field_dict["model_details"] = model_details + if model is not UNSET: + field_dict["model"] = model + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_definition_list_response_model_details import ( + AgentDefinitionListResponseModelDetails, + ) + from ..models.agent_definition_list_response_websocket_headers import ( + AgentDefinitionListResponseWebsocketHeaders, + ) + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + agent_name = d.pop("agent_name", UNSET) + + _agent_type = d.pop("agent_type", UNSET) + agent_type: AgentDefinitionListResponseAgentType | Unset + if isinstance(_agent_type, Unset): + agent_type = UNSET + else: + agent_type = AgentDefinitionListResponseAgentType(_agent_type) + + def _parse_contact_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + contact_number = _parse_contact_number(d.pop("contact_number", UNSET)) + + inbound = d.pop("inbound", UNSET) + + description = d.pop("description", UNSET) + + def _parse_assistant_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + assistant_id = _parse_assistant_id(d.pop("assistant_id", UNSET)) + + def _parse_provider(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + provider = _parse_provider(d.pop("provider", UNSET)) + + _language = d.pop("language", UNSET) + language: AgentDefinitionListResponseLanguage | Unset + if isinstance(_language, Unset): + language = UNSET + else: + language = AgentDefinitionListResponseLanguage(_language) + + def _parse_languages( + data: object, + ) -> list[AgentDefinitionListResponseLanguages] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + languages_type_0 = [] + _languages_type_0 = data + for languages_type_0_item_data in _languages_type_0: + languages_type_0_item = AgentDefinitionListResponseLanguages( + languages_type_0_item_data + ) + + languages_type_0.append(languages_type_0_item) + + return languages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[AgentDefinitionListResponseLanguages] | None | Unset, data) + + languages = _parse_languages(d.pop("languages", UNSET)) + + def _parse_websocket_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + websocket_url = _parse_websocket_url(d.pop("websocket_url", UNSET)) + + _websocket_headers = d.pop("websocket_headers", UNSET) + websocket_headers: AgentDefinitionListResponseWebsocketHeaders | Unset + if isinstance(_websocket_headers, Unset): + websocket_headers = UNSET + else: + websocket_headers = AgentDefinitionListResponseWebsocketHeaders.from_dict( + _websocket_headers + ) + + def _parse_workspace(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + workspace_type_0 = UUID(data) + + return workspace_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + workspace = _parse_workspace(d.pop("workspace", UNSET)) + + def _parse_knowledge_base(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + knowledge_base_type_0 = UUID(data) + + return knowledge_base_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + knowledge_base = _parse_knowledge_base(d.pop("knowledge_base", UNSET)) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + latest_version = d.pop("latest_version", UNSET) + + latest_version_id = d.pop("latest_version_id", UNSET) + + _model_details = d.pop("model_details", UNSET) + model_details: AgentDefinitionListResponseModelDetails | Unset + if isinstance(_model_details, Unset): + model_details = UNSET + else: + model_details = AgentDefinitionListResponseModelDetails.from_dict( + _model_details + ) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + agent_definition_list_response = cls( + id=id, + agent_name=agent_name, + agent_type=agent_type, + contact_number=contact_number, + inbound=inbound, + description=description, + assistant_id=assistant_id, + provider=provider, + language=language, + languages=languages, + websocket_url=websocket_url, + websocket_headers=websocket_headers, + workspace=workspace, + knowledge_base=knowledge_base, + organization=organization, + created_at=created_at, + updated_at=updated_at, + latest_version=latest_version, + latest_version_id=latest_version_id, + model_details=model_details, + model=model, + ) + + agent_definition_list_response.additional_properties = d + return agent_definition_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_list_response_agent_type.py b/python/fi/generated/openapi_client/models/agent_definition_list_response_agent_type.py new file mode 100644 index 0000000..d57a535 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_list_response_agent_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AgentDefinitionListResponseAgentType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_list_response_language.py b/python/fi/generated/openapi_client/models/agent_definition_list_response_language.py new file mode 100644 index 0000000..9ac35fd --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_list_response_language.py @@ -0,0 +1,36 @@ +from enum import Enum + + +class AgentDefinitionListResponseLanguage(str, Enum): + AR = "ar" + BG = "bg" + CS = "cs" + DA = "da" + DE = "de" + EL = "el" + EN = "en" + ES = "es" + FI = "fi" + FR = "fr" + HI = "hi" + HU = "hu" + ID = "id" + IT = "it" + JA = "ja" + KO = "ko" + MS = "ms" + NL = "nl" + NO = "no" + PL = "pl" + PT = "pt" + RO = "ro" + RU = "ru" + SK = "sk" + SV = "sv" + TR = "tr" + UK = "uk" + VI = "vi" + ZH = "zh" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_list_response_languages.py b/python/fi/generated/openapi_client/models/agent_definition_list_response_languages.py new file mode 100644 index 0000000..6345120 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_list_response_languages.py @@ -0,0 +1,36 @@ +from enum import Enum + + +class AgentDefinitionListResponseLanguages(str, Enum): + AR = "ar" + BG = "bg" + CS = "cs" + DA = "da" + DE = "de" + EL = "el" + EN = "en" + ES = "es" + FI = "fi" + FR = "fr" + HI = "hi" + HU = "hu" + ID = "id" + IT = "it" + JA = "ja" + KO = "ko" + MS = "ms" + NL = "nl" + NO = "no" + PL = "pl" + PT = "pt" + RO = "ro" + RU = "ru" + SK = "sk" + SV = "sv" + TR = "tr" + UK = "uk" + VI = "vi" + ZH = "zh" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_list_response_model_details.py b/python/fi/generated/openapi_client/models/agent_definition_list_response_model_details.py new file mode 100644 index 0000000..12c12c4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_list_response_model_details.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionListResponseModelDetails") + + +@_attrs_define +class AgentDefinitionListResponseModelDetails: + """Details of the model""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_list_response_model_details = cls() + + agent_definition_list_response_model_details.additional_properties = d + return agent_definition_list_response_model_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_list_response_websocket_headers.py b/python/fi/generated/openapi_client/models/agent_definition_list_response_websocket_headers.py new file mode 100644 index 0000000..957f4e2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_list_response_websocket_headers.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionListResponseWebsocketHeaders") + + +@_attrs_define +class AgentDefinitionListResponseWebsocketHeaders: + """Headers to be sent to the websocket server""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_list_response_websocket_headers = cls() + + agent_definition_list_response_websocket_headers.additional_properties = d + return agent_definition_list_response_websocket_headers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_response.py b/python/fi/generated/openapi_client/models/agent_definition_response.py new file mode 100644 index 0000000..6b8e1f1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_response.py @@ -0,0 +1,558 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.agent_definition_response_agent_type import ( + AgentDefinitionResponseAgentType, +) +from ..models.agent_definition_response_authentication_method import ( + AgentDefinitionResponseAuthenticationMethod, +) +from ..models.agent_definition_response_language import AgentDefinitionResponseLanguage +from ..models.agent_definition_response_languages import ( + AgentDefinitionResponseLanguages, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_definition_response_model_details import ( + AgentDefinitionResponseModelDetails, + ) + from ..models.agent_definition_response_websocket_headers import ( + AgentDefinitionResponseWebsocketHeaders, + ) + + +T = TypeVar("T", bound="AgentDefinitionResponse") + + +@_attrs_define +class AgentDefinitionResponse: + """ + Attributes: + id (UUID | Unset): + agent_name (str | Unset): Name of the AI agent + agent_type (AgentDefinitionResponseAgentType | Unset): + contact_number (None | str | Unset): Phone number associated with the AI agent + inbound (bool | Unset): Whether the agent handles inbound calls + description (str | Unset): Detailed description of the AI agent's purpose and capabilities + assistant_id (None | str | Unset): External identifier for the assistant + provider (None | str | Unset): Provider of the AI agent + language (AgentDefinitionResponseLanguage | Unset): Language of the agent + languages (list[AgentDefinitionResponseLanguages] | None | Unset): + authentication_method (AgentDefinitionResponseAuthenticationMethod | Unset): + websocket_url (None | str | Unset): WebSocket URL for real-time communication with the agent + websocket_headers (AgentDefinitionResponseWebsocketHeaders | Unset): Headers to be sent to the websocket server + workspace (None | Unset | UUID): + knowledge_base (None | Unset | UUID): + organization (UUID | Unset): Organization this agent definition belongs to + api_key (None | str | Unset): API key for the agent + observability_provider (None | Unset | UUID): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + model (None | str | Unset): Model of the agent + model_details (AgentDefinitionResponseModelDetails | Unset): Details of the model + livekit_url (str | Unset): + livekit_api_key (str | Unset): + livekit_agent_name (str | Unset): + livekit_config_json (str | Unset): + livekit_max_concurrency (str | Unset): + """ + + id: UUID | Unset = UNSET + agent_name: str | Unset = UNSET + agent_type: AgentDefinitionResponseAgentType | Unset = UNSET + contact_number: None | str | Unset = UNSET + inbound: bool | Unset = UNSET + description: str | Unset = UNSET + assistant_id: None | str | Unset = UNSET + provider: None | str | Unset = UNSET + language: AgentDefinitionResponseLanguage | Unset = UNSET + languages: list[AgentDefinitionResponseLanguages] | None | Unset = UNSET + authentication_method: AgentDefinitionResponseAuthenticationMethod | Unset = UNSET + websocket_url: None | str | Unset = UNSET + websocket_headers: AgentDefinitionResponseWebsocketHeaders | Unset = UNSET + workspace: None | Unset | UUID = UNSET + knowledge_base: None | Unset | UUID = UNSET + organization: UUID | Unset = UNSET + api_key: None | str | Unset = UNSET + observability_provider: None | Unset | UUID = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + model: None | str | Unset = UNSET + model_details: AgentDefinitionResponseModelDetails | Unset = UNSET + livekit_url: str | Unset = UNSET + livekit_api_key: str | Unset = UNSET + livekit_agent_name: str | Unset = UNSET + livekit_config_json: str | Unset = UNSET + livekit_max_concurrency: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + agent_name = self.agent_name + + agent_type: str | Unset = UNSET + if not isinstance(self.agent_type, Unset): + agent_type = self.agent_type.value + + contact_number: None | str | Unset + if isinstance(self.contact_number, Unset): + contact_number = UNSET + else: + contact_number = self.contact_number + + inbound = self.inbound + + description = self.description + + assistant_id: None | str | Unset + if isinstance(self.assistant_id, Unset): + assistant_id = UNSET + else: + assistant_id = self.assistant_id + + provider: None | str | Unset + if isinstance(self.provider, Unset): + provider = UNSET + else: + provider = self.provider + + language: str | Unset = UNSET + if not isinstance(self.language, Unset): + language = self.language.value + + languages: list[str] | None | Unset + if isinstance(self.languages, Unset): + languages = UNSET + elif isinstance(self.languages, list): + languages = [] + for languages_type_0_item_data in self.languages: + languages_type_0_item = languages_type_0_item_data.value + languages.append(languages_type_0_item) + + else: + languages = self.languages + + authentication_method: str | Unset = UNSET + if not isinstance(self.authentication_method, Unset): + authentication_method = self.authentication_method.value + + websocket_url: None | str | Unset + if isinstance(self.websocket_url, Unset): + websocket_url = UNSET + else: + websocket_url = self.websocket_url + + websocket_headers: dict[str, Any] | Unset = UNSET + if not isinstance(self.websocket_headers, Unset): + websocket_headers = self.websocket_headers.to_dict() + + workspace: None | str | Unset + if isinstance(self.workspace, Unset): + workspace = UNSET + elif isinstance(self.workspace, UUID): + workspace = str(self.workspace) + else: + workspace = self.workspace + + knowledge_base: None | str | Unset + if isinstance(self.knowledge_base, Unset): + knowledge_base = UNSET + elif isinstance(self.knowledge_base, UUID): + knowledge_base = str(self.knowledge_base) + else: + knowledge_base = self.knowledge_base + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + api_key: None | str | Unset + if isinstance(self.api_key, Unset): + api_key = UNSET + else: + api_key = self.api_key + + observability_provider: None | str | Unset + if isinstance(self.observability_provider, Unset): + observability_provider = UNSET + elif isinstance(self.observability_provider, UUID): + observability_provider = str(self.observability_provider) + else: + observability_provider = self.observability_provider + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + model_details: dict[str, Any] | Unset = UNSET + if not isinstance(self.model_details, Unset): + model_details = self.model_details.to_dict() + + livekit_url = self.livekit_url + + livekit_api_key = self.livekit_api_key + + livekit_agent_name = self.livekit_agent_name + + livekit_config_json = self.livekit_config_json + + livekit_max_concurrency = self.livekit_max_concurrency + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if agent_name is not UNSET: + field_dict["agent_name"] = agent_name + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + if contact_number is not UNSET: + field_dict["contact_number"] = contact_number + if inbound is not UNSET: + field_dict["inbound"] = inbound + if description is not UNSET: + field_dict["description"] = description + if assistant_id is not UNSET: + field_dict["assistant_id"] = assistant_id + if provider is not UNSET: + field_dict["provider"] = provider + if language is not UNSET: + field_dict["language"] = language + if languages is not UNSET: + field_dict["languages"] = languages + if authentication_method is not UNSET: + field_dict["authentication_method"] = authentication_method + if websocket_url is not UNSET: + field_dict["websocket_url"] = websocket_url + if websocket_headers is not UNSET: + field_dict["websocket_headers"] = websocket_headers + if workspace is not UNSET: + field_dict["workspace"] = workspace + if knowledge_base is not UNSET: + field_dict["knowledge_base"] = knowledge_base + if organization is not UNSET: + field_dict["organization"] = organization + if api_key is not UNSET: + field_dict["api_key"] = api_key + if observability_provider is not UNSET: + field_dict["observability_provider"] = observability_provider + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if model is not UNSET: + field_dict["model"] = model + if model_details is not UNSET: + field_dict["model_details"] = model_details + if livekit_url is not UNSET: + field_dict["livekit_url"] = livekit_url + if livekit_api_key is not UNSET: + field_dict["livekit_api_key"] = livekit_api_key + if livekit_agent_name is not UNSET: + field_dict["livekit_agent_name"] = livekit_agent_name + if livekit_config_json is not UNSET: + field_dict["livekit_config_json"] = livekit_config_json + if livekit_max_concurrency is not UNSET: + field_dict["livekit_max_concurrency"] = livekit_max_concurrency + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_definition_response_model_details import ( + AgentDefinitionResponseModelDetails, + ) + from ..models.agent_definition_response_websocket_headers import ( + AgentDefinitionResponseWebsocketHeaders, + ) + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + agent_name = d.pop("agent_name", UNSET) + + _agent_type = d.pop("agent_type", UNSET) + agent_type: AgentDefinitionResponseAgentType | Unset + if isinstance(_agent_type, Unset): + agent_type = UNSET + else: + agent_type = AgentDefinitionResponseAgentType(_agent_type) + + def _parse_contact_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + contact_number = _parse_contact_number(d.pop("contact_number", UNSET)) + + inbound = d.pop("inbound", UNSET) + + description = d.pop("description", UNSET) + + def _parse_assistant_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + assistant_id = _parse_assistant_id(d.pop("assistant_id", UNSET)) + + def _parse_provider(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + provider = _parse_provider(d.pop("provider", UNSET)) + + _language = d.pop("language", UNSET) + language: AgentDefinitionResponseLanguage | Unset + if isinstance(_language, Unset): + language = UNSET + else: + language = AgentDefinitionResponseLanguage(_language) + + def _parse_languages( + data: object, + ) -> list[AgentDefinitionResponseLanguages] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + languages_type_0 = [] + _languages_type_0 = data + for languages_type_0_item_data in _languages_type_0: + languages_type_0_item = AgentDefinitionResponseLanguages( + languages_type_0_item_data + ) + + languages_type_0.append(languages_type_0_item) + + return languages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[AgentDefinitionResponseLanguages] | None | Unset, data) + + languages = _parse_languages(d.pop("languages", UNSET)) + + _authentication_method = d.pop("authentication_method", UNSET) + authentication_method: AgentDefinitionResponseAuthenticationMethod | Unset + if isinstance(_authentication_method, Unset): + authentication_method = UNSET + else: + authentication_method = AgentDefinitionResponseAuthenticationMethod( + _authentication_method + ) + + def _parse_websocket_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + websocket_url = _parse_websocket_url(d.pop("websocket_url", UNSET)) + + _websocket_headers = d.pop("websocket_headers", UNSET) + websocket_headers: AgentDefinitionResponseWebsocketHeaders | Unset + if isinstance(_websocket_headers, Unset): + websocket_headers = UNSET + else: + websocket_headers = AgentDefinitionResponseWebsocketHeaders.from_dict( + _websocket_headers + ) + + def _parse_workspace(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + workspace_type_0 = UUID(data) + + return workspace_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + workspace = _parse_workspace(d.pop("workspace", UNSET)) + + def _parse_knowledge_base(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + knowledge_base_type_0 = UUID(data) + + return knowledge_base_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + knowledge_base = _parse_knowledge_base(d.pop("knowledge_base", UNSET)) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + def _parse_api_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + api_key = _parse_api_key(d.pop("api_key", UNSET)) + + def _parse_observability_provider(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + observability_provider_type_0 = UUID(data) + + return observability_provider_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + observability_provider = _parse_observability_provider( + d.pop("observability_provider", UNSET) + ) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _model_details = d.pop("model_details", UNSET) + model_details: AgentDefinitionResponseModelDetails | Unset + if isinstance(_model_details, Unset): + model_details = UNSET + else: + model_details = AgentDefinitionResponseModelDetails.from_dict( + _model_details + ) + + livekit_url = d.pop("livekit_url", UNSET) + + livekit_api_key = d.pop("livekit_api_key", UNSET) + + livekit_agent_name = d.pop("livekit_agent_name", UNSET) + + livekit_config_json = d.pop("livekit_config_json", UNSET) + + livekit_max_concurrency = d.pop("livekit_max_concurrency", UNSET) + + agent_definition_response = cls( + id=id, + agent_name=agent_name, + agent_type=agent_type, + contact_number=contact_number, + inbound=inbound, + description=description, + assistant_id=assistant_id, + provider=provider, + language=language, + languages=languages, + authentication_method=authentication_method, + websocket_url=websocket_url, + websocket_headers=websocket_headers, + workspace=workspace, + knowledge_base=knowledge_base, + organization=organization, + api_key=api_key, + observability_provider=observability_provider, + created_at=created_at, + updated_at=updated_at, + model=model, + model_details=model_details, + livekit_url=livekit_url, + livekit_api_key=livekit_api_key, + livekit_agent_name=livekit_agent_name, + livekit_config_json=livekit_config_json, + livekit_max_concurrency=livekit_max_concurrency, + ) + + agent_definition_response.additional_properties = d + return agent_definition_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_response_agent_type.py b/python/fi/generated/openapi_client/models/agent_definition_response_agent_type.py new file mode 100644 index 0000000..3cb282b --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_response_agent_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AgentDefinitionResponseAgentType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_response_authentication_method.py b/python/fi/generated/openapi_client/models/agent_definition_response_authentication_method.py new file mode 100644 index 0000000..ca1a810 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_response_authentication_method.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class AgentDefinitionResponseAuthenticationMethod(str, Enum): + API_KEY = "api_key" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_response_language.py b/python/fi/generated/openapi_client/models/agent_definition_response_language.py new file mode 100644 index 0000000..fcdde5b --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_response_language.py @@ -0,0 +1,36 @@ +from enum import Enum + + +class AgentDefinitionResponseLanguage(str, Enum): + AR = "ar" + BG = "bg" + CS = "cs" + DA = "da" + DE = "de" + EL = "el" + EN = "en" + ES = "es" + FI = "fi" + FR = "fr" + HI = "hi" + HU = "hu" + ID = "id" + IT = "it" + JA = "ja" + KO = "ko" + MS = "ms" + NL = "nl" + NO = "no" + PL = "pl" + PT = "pt" + RO = "ro" + RU = "ru" + SK = "sk" + SV = "sv" + TR = "tr" + UK = "uk" + VI = "vi" + ZH = "zh" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_response_languages.py b/python/fi/generated/openapi_client/models/agent_definition_response_languages.py new file mode 100644 index 0000000..8d91e6a --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_response_languages.py @@ -0,0 +1,36 @@ +from enum import Enum + + +class AgentDefinitionResponseLanguages(str, Enum): + AR = "ar" + BG = "bg" + CS = "cs" + DA = "da" + DE = "de" + EL = "el" + EN = "en" + ES = "es" + FI = "fi" + FR = "fr" + HI = "hi" + HU = "hu" + ID = "id" + IT = "it" + JA = "ja" + KO = "ko" + MS = "ms" + NL = "nl" + NO = "no" + PL = "pl" + PT = "pt" + RO = "ro" + RU = "ru" + SK = "sk" + SV = "sv" + TR = "tr" + UK = "uk" + VI = "vi" + ZH = "zh" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_definition_response_model_details.py b/python/fi/generated/openapi_client/models/agent_definition_response_model_details.py new file mode 100644 index 0000000..abe6607 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_response_model_details.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionResponseModelDetails") + + +@_attrs_define +class AgentDefinitionResponseModelDetails: + """Details of the model""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_response_model_details = cls() + + agent_definition_response_model_details.additional_properties = d + return agent_definition_response_model_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_definition_response_websocket_headers.py b/python/fi/generated/openapi_client/models/agent_definition_response_websocket_headers.py new file mode 100644 index 0000000..f681d99 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_definition_response_websocket_headers.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentDefinitionResponseWebsocketHeaders") + + +@_attrs_define +class AgentDefinitionResponseWebsocketHeaders: + """Headers to be sent to the websocket server""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_definition_response_websocket_headers = cls() + + agent_definition_response_websocket_headers.additional_properties = d + return agent_definition_response_websocket_headers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_flow_graph.py b/python/fi/generated/openapi_client/models/agent_flow_graph.py new file mode 100644 index 0000000..ba84191 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_flow_graph.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.agent_flow_graph_edges_item import AgentFlowGraphEdgesItem + from ..models.agent_flow_graph_nodes_item import AgentFlowGraphNodesItem + + +T = TypeVar("T", bound="AgentFlowGraph") + + +@_attrs_define +class AgentFlowGraph: + """ + Attributes: + nodes (list[AgentFlowGraphNodesItem]): + edges (list[AgentFlowGraphEdgesItem]): + """ + + nodes: list[AgentFlowGraphNodesItem] + edges: list[AgentFlowGraphEdgesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + nodes = [] + for nodes_item_data in self.nodes: + nodes_item = nodes_item_data.to_dict() + nodes.append(nodes_item) + + edges = [] + for edges_item_data in self.edges: + edges_item = edges_item_data.to_dict() + edges.append(edges_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "nodes": nodes, + "edges": edges, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_flow_graph_edges_item import AgentFlowGraphEdgesItem + from ..models.agent_flow_graph_nodes_item import AgentFlowGraphNodesItem + + d = dict(src_dict) + nodes = [] + _nodes = d.pop("nodes") + for nodes_item_data in _nodes: + nodes_item = AgentFlowGraphNodesItem.from_dict(nodes_item_data) + + nodes.append(nodes_item) + + edges = [] + _edges = d.pop("edges") + for edges_item_data in _edges: + edges_item = AgentFlowGraphEdgesItem.from_dict(edges_item_data) + + edges.append(edges_item) + + agent_flow_graph = cls( + nodes=nodes, + edges=edges, + ) + + agent_flow_graph.additional_properties = d + return agent_flow_graph + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_flow_graph_edges_item.py b/python/fi/generated/openapi_client/models/agent_flow_graph_edges_item.py new file mode 100644 index 0000000..8f03340 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_flow_graph_edges_item.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentFlowGraphEdgesItem") + + +@_attrs_define +class AgentFlowGraphEdgesItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_flow_graph_edges_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + agent_flow_graph_edges_item.additional_properties = additional_properties + return agent_flow_graph_edges_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_flow_graph_nodes_item.py b/python/fi/generated/openapi_client/models/agent_flow_graph_nodes_item.py new file mode 100644 index 0000000..8ef9021 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_flow_graph_nodes_item.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentFlowGraphNodesItem") + + +@_attrs_define +class AgentFlowGraphNodesItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_flow_graph_nodes_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + agent_flow_graph_nodes_item.additional_properties = additional_properties + return agent_flow_graph_nodes_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_activate_response.py b/python/fi/generated/openapi_client/models/agent_version_activate_response.py new file mode 100644 index 0000000..20b2da5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_activate_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_version_response import AgentVersionResponse + + +T = TypeVar("T", bound="AgentVersionActivateResponse") + + +@_attrs_define +class AgentVersionActivateResponse: + """ + Attributes: + message (str | Unset): + version (AgentVersionResponse | Unset): + """ + + message: str | Unset = UNSET + version: AgentVersionResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + version: dict[str, Any] | Unset = UNSET + if not isinstance(self.version, Unset): + version = self.version.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_version_response import AgentVersionResponse + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _version = d.pop("version", UNSET) + version: AgentVersionResponse | Unset + if isinstance(_version, Unset): + version = UNSET + else: + version = AgentVersionResponse.from_dict(_version) + + agent_version_activate_response = cls( + message=message, + version=version, + ) + + agent_version_activate_response.additional_properties = d + return agent_version_activate_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_create_request.py b/python/fi/generated/openapi_client/models/agent_version_create_request.py new file mode 100644 index 0000000..fe5ce0f --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_create_request.py @@ -0,0 +1,427 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.agent_version_create_request_agent_type import ( + AgentVersionCreateRequestAgentType, +) +from ..models.agent_version_create_request_authentication_method import ( + AgentVersionCreateRequestAuthenticationMethod, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_version_create_request_livekit_config_json import ( + AgentVersionCreateRequestLivekitConfigJson, + ) + from ..models.agent_version_create_request_model_details import ( + AgentVersionCreateRequestModelDetails, + ) + + +T = TypeVar("T", bound="AgentVersionCreateRequest") + + +@_attrs_define +class AgentVersionCreateRequest: + """ + Attributes: + agent_name (str | Unset): + agent_type (AgentVersionCreateRequestAgentType | Unset): + description (None | str | Unset): + provider (None | str | Unset): + api_key (None | str | Unset): + assistant_id (None | str | Unset): + authentication_method (AgentVersionCreateRequestAuthenticationMethod | Unset): + language (None | str | Unset): + languages (list[str] | None | Unset): + contact_number (None | str | Unset): + inbound (bool | Unset): + knowledge_base (None | Unset | UUID): + model (None | str | Unset): + model_details (AgentVersionCreateRequestModelDetails | Unset): + livekit_url (str | Unset): + livekit_api_key (str | Unset): + livekit_api_secret (str | Unset): + livekit_agent_name (str | Unset): + livekit_config_json (AgentVersionCreateRequestLivekitConfigJson | Unset): + livekit_max_concurrency (int | Unset): + commit_message (str | Unset): Default: ''. + observability_enabled (bool | Unset): Default: False. + """ + + agent_name: str | Unset = UNSET + agent_type: AgentVersionCreateRequestAgentType | Unset = UNSET + description: None | str | Unset = UNSET + provider: None | str | Unset = UNSET + api_key: None | str | Unset = UNSET + assistant_id: None | str | Unset = UNSET + authentication_method: AgentVersionCreateRequestAuthenticationMethod | Unset = UNSET + language: None | str | Unset = UNSET + languages: list[str] | None | Unset = UNSET + contact_number: None | str | Unset = UNSET + inbound: bool | Unset = UNSET + knowledge_base: None | Unset | UUID = UNSET + model: None | str | Unset = UNSET + model_details: AgentVersionCreateRequestModelDetails | Unset = UNSET + livekit_url: str | Unset = UNSET + livekit_api_key: str | Unset = UNSET + livekit_api_secret: str | Unset = UNSET + livekit_agent_name: str | Unset = UNSET + livekit_config_json: AgentVersionCreateRequestLivekitConfigJson | Unset = UNSET + livekit_max_concurrency: int | Unset = UNSET + commit_message: str | Unset = "" + observability_enabled: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_name = self.agent_name + + agent_type: str | Unset = UNSET + if not isinstance(self.agent_type, Unset): + agent_type = self.agent_type.value + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + provider: None | str | Unset + if isinstance(self.provider, Unset): + provider = UNSET + else: + provider = self.provider + + api_key: None | str | Unset + if isinstance(self.api_key, Unset): + api_key = UNSET + else: + api_key = self.api_key + + assistant_id: None | str | Unset + if isinstance(self.assistant_id, Unset): + assistant_id = UNSET + else: + assistant_id = self.assistant_id + + authentication_method: str | Unset = UNSET + if not isinstance(self.authentication_method, Unset): + authentication_method = self.authentication_method.value + + language: None | str | Unset + if isinstance(self.language, Unset): + language = UNSET + else: + language = self.language + + languages: list[str] | None | Unset + if isinstance(self.languages, Unset): + languages = UNSET + elif isinstance(self.languages, list): + languages = self.languages + + else: + languages = self.languages + + contact_number: None | str | Unset + if isinstance(self.contact_number, Unset): + contact_number = UNSET + else: + contact_number = self.contact_number + + inbound = self.inbound + + knowledge_base: None | str | Unset + if isinstance(self.knowledge_base, Unset): + knowledge_base = UNSET + elif isinstance(self.knowledge_base, UUID): + knowledge_base = str(self.knowledge_base) + else: + knowledge_base = self.knowledge_base + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + model_details: dict[str, Any] | Unset = UNSET + if not isinstance(self.model_details, Unset): + model_details = self.model_details.to_dict() + + livekit_url = self.livekit_url + + livekit_api_key = self.livekit_api_key + + livekit_api_secret = self.livekit_api_secret + + livekit_agent_name = self.livekit_agent_name + + livekit_config_json: dict[str, Any] | Unset = UNSET + if not isinstance(self.livekit_config_json, Unset): + livekit_config_json = self.livekit_config_json.to_dict() + + livekit_max_concurrency = self.livekit_max_concurrency + + commit_message = self.commit_message + + observability_enabled = self.observability_enabled + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if agent_name is not UNSET: + field_dict["agent_name"] = agent_name + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + if description is not UNSET: + field_dict["description"] = description + if provider is not UNSET: + field_dict["provider"] = provider + if api_key is not UNSET: + field_dict["api_key"] = api_key + if assistant_id is not UNSET: + field_dict["assistant_id"] = assistant_id + if authentication_method is not UNSET: + field_dict["authentication_method"] = authentication_method + if language is not UNSET: + field_dict["language"] = language + if languages is not UNSET: + field_dict["languages"] = languages + if contact_number is not UNSET: + field_dict["contact_number"] = contact_number + if inbound is not UNSET: + field_dict["inbound"] = inbound + if knowledge_base is not UNSET: + field_dict["knowledge_base"] = knowledge_base + if model is not UNSET: + field_dict["model"] = model + if model_details is not UNSET: + field_dict["model_details"] = model_details + if livekit_url is not UNSET: + field_dict["livekit_url"] = livekit_url + if livekit_api_key is not UNSET: + field_dict["livekit_api_key"] = livekit_api_key + if livekit_api_secret is not UNSET: + field_dict["livekit_api_secret"] = livekit_api_secret + if livekit_agent_name is not UNSET: + field_dict["livekit_agent_name"] = livekit_agent_name + if livekit_config_json is not UNSET: + field_dict["livekit_config_json"] = livekit_config_json + if livekit_max_concurrency is not UNSET: + field_dict["livekit_max_concurrency"] = livekit_max_concurrency + if commit_message is not UNSET: + field_dict["commit_message"] = commit_message + if observability_enabled is not UNSET: + field_dict["observability_enabled"] = observability_enabled + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_version_create_request_livekit_config_json import ( + AgentVersionCreateRequestLivekitConfigJson, + ) + from ..models.agent_version_create_request_model_details import ( + AgentVersionCreateRequestModelDetails, + ) + + d = dict(src_dict) + agent_name = d.pop("agent_name", UNSET) + + _agent_type = d.pop("agent_type", UNSET) + agent_type: AgentVersionCreateRequestAgentType | Unset + if isinstance(_agent_type, Unset): + agent_type = UNSET + else: + agent_type = AgentVersionCreateRequestAgentType(_agent_type) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_provider(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + provider = _parse_provider(d.pop("provider", UNSET)) + + def _parse_api_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + api_key = _parse_api_key(d.pop("api_key", UNSET)) + + def _parse_assistant_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + assistant_id = _parse_assistant_id(d.pop("assistant_id", UNSET)) + + _authentication_method = d.pop("authentication_method", UNSET) + authentication_method: AgentVersionCreateRequestAuthenticationMethod | Unset + if isinstance(_authentication_method, Unset): + authentication_method = UNSET + else: + authentication_method = AgentVersionCreateRequestAuthenticationMethod( + _authentication_method + ) + + def _parse_language(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + language = _parse_language(d.pop("language", UNSET)) + + def _parse_languages(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + languages_type_0 = cast(list[str], data) + + return languages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + languages = _parse_languages(d.pop("languages", UNSET)) + + def _parse_contact_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + contact_number = _parse_contact_number(d.pop("contact_number", UNSET)) + + inbound = d.pop("inbound", UNSET) + + def _parse_knowledge_base(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + knowledge_base_type_0 = UUID(data) + + return knowledge_base_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + knowledge_base = _parse_knowledge_base(d.pop("knowledge_base", UNSET)) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _model_details = d.pop("model_details", UNSET) + model_details: AgentVersionCreateRequestModelDetails | Unset + if isinstance(_model_details, Unset): + model_details = UNSET + else: + model_details = AgentVersionCreateRequestModelDetails.from_dict( + _model_details + ) + + livekit_url = d.pop("livekit_url", UNSET) + + livekit_api_key = d.pop("livekit_api_key", UNSET) + + livekit_api_secret = d.pop("livekit_api_secret", UNSET) + + livekit_agent_name = d.pop("livekit_agent_name", UNSET) + + _livekit_config_json = d.pop("livekit_config_json", UNSET) + livekit_config_json: AgentVersionCreateRequestLivekitConfigJson | Unset + if isinstance(_livekit_config_json, Unset): + livekit_config_json = UNSET + else: + livekit_config_json = AgentVersionCreateRequestLivekitConfigJson.from_dict( + _livekit_config_json + ) + + livekit_max_concurrency = d.pop("livekit_max_concurrency", UNSET) + + commit_message = d.pop("commit_message", UNSET) + + observability_enabled = d.pop("observability_enabled", UNSET) + + agent_version_create_request = cls( + agent_name=agent_name, + agent_type=agent_type, + description=description, + provider=provider, + api_key=api_key, + assistant_id=assistant_id, + authentication_method=authentication_method, + language=language, + languages=languages, + contact_number=contact_number, + inbound=inbound, + knowledge_base=knowledge_base, + model=model, + model_details=model_details, + livekit_url=livekit_url, + livekit_api_key=livekit_api_key, + livekit_api_secret=livekit_api_secret, + livekit_agent_name=livekit_agent_name, + livekit_config_json=livekit_config_json, + livekit_max_concurrency=livekit_max_concurrency, + commit_message=commit_message, + observability_enabled=observability_enabled, + ) + + agent_version_create_request.additional_properties = d + return agent_version_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_create_request_agent_type.py b/python/fi/generated/openapi_client/models/agent_version_create_request_agent_type.py new file mode 100644 index 0000000..48ed255 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_create_request_agent_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AgentVersionCreateRequestAgentType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_version_create_request_authentication_method.py b/python/fi/generated/openapi_client/models/agent_version_create_request_authentication_method.py new file mode 100644 index 0000000..fba6481 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_create_request_authentication_method.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class AgentVersionCreateRequestAuthenticationMethod(str, Enum): + API_KEY = "api_key" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_version_create_request_livekit_config_json.py b/python/fi/generated/openapi_client/models/agent_version_create_request_livekit_config_json.py new file mode 100644 index 0000000..4cbf2ef --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_create_request_livekit_config_json.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentVersionCreateRequestLivekitConfigJson") + + +@_attrs_define +class AgentVersionCreateRequestLivekitConfigJson: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_version_create_request_livekit_config_json = cls() + + agent_version_create_request_livekit_config_json.additional_properties = d + return agent_version_create_request_livekit_config_json + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_create_request_model_details.py b/python/fi/generated/openapi_client/models/agent_version_create_request_model_details.py new file mode 100644 index 0000000..24959bb --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_create_request_model_details.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentVersionCreateRequestModelDetails") + + +@_attrs_define +class AgentVersionCreateRequestModelDetails: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_version_create_request_model_details = cls() + + agent_version_create_request_model_details.additional_properties = d + return agent_version_create_request_model_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_create_response.py b/python/fi/generated/openapi_client/models/agent_version_create_response.py new file mode 100644 index 0000000..d5510ac --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_create_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_version_response import AgentVersionResponse + + +T = TypeVar("T", bound="AgentVersionCreateResponse") + + +@_attrs_define +class AgentVersionCreateResponse: + """ + Attributes: + message (str | Unset): + version (AgentVersionResponse | Unset): + """ + + message: str | Unset = UNSET + version: AgentVersionResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + version: dict[str, Any] | Unset = UNSET + if not isinstance(self.version, Unset): + version = self.version.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_version_response import AgentVersionResponse + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _version = d.pop("version", UNSET) + version: AgentVersionResponse | Unset + if isinstance(_version, Unset): + version = UNSET + else: + version = AgentVersionResponse.from_dict(_version) + + agent_version_create_response = cls( + message=message, + version=version, + ) + + agent_version_create_response.additional_properties = d + return agent_version_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_delete_response.py b/python/fi/generated/openapi_client/models/agent_version_delete_response.py new file mode 100644 index 0000000..89a296f --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_delete_response.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AgentVersionDeleteResponse") + + +@_attrs_define +class AgentVersionDeleteResponse: + """ + Attributes: + message (str | Unset): + """ + + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + agent_version_delete_response = cls( + message=message, + ) + + agent_version_delete_response.additional_properties = d + return agent_version_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_list_response.py b/python/fi/generated/openapi_client/models/agent_version_list_response.py new file mode 100644 index 0000000..2da0bd3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_list_response.py @@ -0,0 +1,247 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.agent_version_list_response_status import AgentVersionListResponseStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AgentVersionListResponse") + + +@_attrs_define +class AgentVersionListResponse: + """ + Attributes: + id (UUID | Unset): + version_number (int | Unset): Version number of the agent + version_name (None | str | Unset): Human-readable version name (e.g., 'v1.2.3') + version_name_display (str | Unset): + status (AgentVersionListResponseStatus | Unset): Current status of this version + status_display (str | Unset): + score (None | str | Unset): Performance score (0.0 to 10.0) + test_count (int | Unset): Number of tests run for this version + pass_rate (None | str | Unset): Test pass rate percentage + description (str | Unset): Description of changes in this version + commit_message (None | str | Unset): Commit message for the agent version + is_active (str | Unset): + is_latest (str | Unset): + created_at (datetime.datetime | Unset): + """ + + id: UUID | Unset = UNSET + version_number: int | Unset = UNSET + version_name: None | str | Unset = UNSET + version_name_display: str | Unset = UNSET + status: AgentVersionListResponseStatus | Unset = UNSET + status_display: str | Unset = UNSET + score: None | str | Unset = UNSET + test_count: int | Unset = UNSET + pass_rate: None | str | Unset = UNSET + description: str | Unset = UNSET + commit_message: None | str | Unset = UNSET + is_active: str | Unset = UNSET + is_latest: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + version_number = self.version_number + + version_name: None | str | Unset + if isinstance(self.version_name, Unset): + version_name = UNSET + else: + version_name = self.version_name + + version_name_display = self.version_name_display + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + status_display = self.status_display + + score: None | str | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + test_count = self.test_count + + pass_rate: None | str | Unset + if isinstance(self.pass_rate, Unset): + pass_rate = UNSET + else: + pass_rate = self.pass_rate + + description = self.description + + commit_message: None | str | Unset + if isinstance(self.commit_message, Unset): + commit_message = UNSET + else: + commit_message = self.commit_message + + is_active = self.is_active + + is_latest = self.is_latest + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if version_number is not UNSET: + field_dict["version_number"] = version_number + if version_name is not UNSET: + field_dict["version_name"] = version_name + if version_name_display is not UNSET: + field_dict["version_name_display"] = version_name_display + if status is not UNSET: + field_dict["status"] = status + if status_display is not UNSET: + field_dict["status_display"] = status_display + if score is not UNSET: + field_dict["score"] = score + if test_count is not UNSET: + field_dict["test_count"] = test_count + if pass_rate is not UNSET: + field_dict["pass_rate"] = pass_rate + if description is not UNSET: + field_dict["description"] = description + if commit_message is not UNSET: + field_dict["commit_message"] = commit_message + if is_active is not UNSET: + field_dict["is_active"] = is_active + if is_latest is not UNSET: + field_dict["is_latest"] = is_latest + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + version_number = d.pop("version_number", UNSET) + + def _parse_version_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + version_name = _parse_version_name(d.pop("version_name", UNSET)) + + version_name_display = d.pop("version_name_display", UNSET) + + _status = d.pop("status", UNSET) + status: AgentVersionListResponseStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = AgentVersionListResponseStatus(_status) + + status_display = d.pop("status_display", UNSET) + + def _parse_score(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + test_count = d.pop("test_count", UNSET) + + def _parse_pass_rate(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pass_rate = _parse_pass_rate(d.pop("pass_rate", UNSET)) + + description = d.pop("description", UNSET) + + def _parse_commit_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + commit_message = _parse_commit_message(d.pop("commit_message", UNSET)) + + is_active = d.pop("is_active", UNSET) + + is_latest = d.pop("is_latest", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + agent_version_list_response = cls( + id=id, + version_number=version_number, + version_name=version_name, + version_name_display=version_name_display, + status=status, + status_display=status_display, + score=score, + test_count=test_count, + pass_rate=pass_rate, + description=description, + commit_message=commit_message, + is_active=is_active, + is_latest=is_latest, + created_at=created_at, + ) + + agent_version_list_response.additional_properties = d + return agent_version_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_list_response_status.py b/python/fi/generated/openapi_client/models/agent_version_list_response_status.py new file mode 100644 index 0000000..ea784f6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_list_response_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AgentVersionListResponseStatus(str, Enum): + ACTIVE = "active" + ARCHIVED = "archived" + DEPRECATED = "deprecated" + DRAFT = "draft" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_version_response.py b/python/fi/generated/openapi_client/models/agent_version_response.py new file mode 100644 index 0000000..e7320e9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_response.py @@ -0,0 +1,346 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.agent_version_response_status import AgentVersionResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_version_response_configuration_snapshot import ( + AgentVersionResponseConfigurationSnapshot, + ) + + +T = TypeVar("T", bound="AgentVersionResponse") + + +@_attrs_define +class AgentVersionResponse: + """ + Attributes: + id (UUID | Unset): + version_number (int | Unset): Version number of the agent + version_name (None | str | Unset): Human-readable version name (e.g., 'v1.2.3') + version_name_display (str | Unset): + status (AgentVersionResponseStatus | Unset): Current status of this version + status_display (str | Unset): + score (None | str | Unset): Performance score (0.0 to 10.0) + test_count (int | Unset): Number of tests run for this version + pass_rate (None | str | Unset): Test pass rate percentage + description (str | Unset): Description of changes in this version + commit_message (None | str | Unset): Commit message for the agent version + release_notes (None | str | Unset): Detailed release notes for this version + agent_definition (UUID | Unset): Parent agent definition + organization (UUID | Unset): Organization this version belongs to + configuration_snapshot (AgentVersionResponseConfigurationSnapshot | Unset): Snapshot of agent configuration at + this version + is_active (str | Unset): + is_latest (str | Unset): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + """ + + id: UUID | Unset = UNSET + version_number: int | Unset = UNSET + version_name: None | str | Unset = UNSET + version_name_display: str | Unset = UNSET + status: AgentVersionResponseStatus | Unset = UNSET + status_display: str | Unset = UNSET + score: None | str | Unset = UNSET + test_count: int | Unset = UNSET + pass_rate: None | str | Unset = UNSET + description: str | Unset = UNSET + commit_message: None | str | Unset = UNSET + release_notes: None | str | Unset = UNSET + agent_definition: UUID | Unset = UNSET + organization: UUID | Unset = UNSET + configuration_snapshot: AgentVersionResponseConfigurationSnapshot | Unset = UNSET + is_active: str | Unset = UNSET + is_latest: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + version_number = self.version_number + + version_name: None | str | Unset + if isinstance(self.version_name, Unset): + version_name = UNSET + else: + version_name = self.version_name + + version_name_display = self.version_name_display + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + status_display = self.status_display + + score: None | str | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + test_count = self.test_count + + pass_rate: None | str | Unset + if isinstance(self.pass_rate, Unset): + pass_rate = UNSET + else: + pass_rate = self.pass_rate + + description = self.description + + commit_message: None | str | Unset + if isinstance(self.commit_message, Unset): + commit_message = UNSET + else: + commit_message = self.commit_message + + release_notes: None | str | Unset + if isinstance(self.release_notes, Unset): + release_notes = UNSET + else: + release_notes = self.release_notes + + agent_definition: str | Unset = UNSET + if not isinstance(self.agent_definition, Unset): + agent_definition = str(self.agent_definition) + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + configuration_snapshot: dict[str, Any] | Unset = UNSET + if not isinstance(self.configuration_snapshot, Unset): + configuration_snapshot = self.configuration_snapshot.to_dict() + + is_active = self.is_active + + is_latest = self.is_latest + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if version_number is not UNSET: + field_dict["version_number"] = version_number + if version_name is not UNSET: + field_dict["version_name"] = version_name + if version_name_display is not UNSET: + field_dict["version_name_display"] = version_name_display + if status is not UNSET: + field_dict["status"] = status + if status_display is not UNSET: + field_dict["status_display"] = status_display + if score is not UNSET: + field_dict["score"] = score + if test_count is not UNSET: + field_dict["test_count"] = test_count + if pass_rate is not UNSET: + field_dict["pass_rate"] = pass_rate + if description is not UNSET: + field_dict["description"] = description + if commit_message is not UNSET: + field_dict["commit_message"] = commit_message + if release_notes is not UNSET: + field_dict["release_notes"] = release_notes + if agent_definition is not UNSET: + field_dict["agent_definition"] = agent_definition + if organization is not UNSET: + field_dict["organization"] = organization + if configuration_snapshot is not UNSET: + field_dict["configuration_snapshot"] = configuration_snapshot + if is_active is not UNSET: + field_dict["is_active"] = is_active + if is_latest is not UNSET: + field_dict["is_latest"] = is_latest + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_version_response_configuration_snapshot import ( + AgentVersionResponseConfigurationSnapshot, + ) + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + version_number = d.pop("version_number", UNSET) + + def _parse_version_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + version_name = _parse_version_name(d.pop("version_name", UNSET)) + + version_name_display = d.pop("version_name_display", UNSET) + + _status = d.pop("status", UNSET) + status: AgentVersionResponseStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = AgentVersionResponseStatus(_status) + + status_display = d.pop("status_display", UNSET) + + def _parse_score(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + test_count = d.pop("test_count", UNSET) + + def _parse_pass_rate(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pass_rate = _parse_pass_rate(d.pop("pass_rate", UNSET)) + + description = d.pop("description", UNSET) + + def _parse_commit_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + commit_message = _parse_commit_message(d.pop("commit_message", UNSET)) + + def _parse_release_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + release_notes = _parse_release_notes(d.pop("release_notes", UNSET)) + + _agent_definition = d.pop("agent_definition", UNSET) + agent_definition: UUID | Unset + if isinstance(_agent_definition, Unset): + agent_definition = UNSET + else: + agent_definition = UUID(_agent_definition) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + _configuration_snapshot = d.pop("configuration_snapshot", UNSET) + configuration_snapshot: AgentVersionResponseConfigurationSnapshot | Unset + if isinstance(_configuration_snapshot, Unset): + configuration_snapshot = UNSET + else: + configuration_snapshot = ( + AgentVersionResponseConfigurationSnapshot.from_dict( + _configuration_snapshot + ) + ) + + is_active = d.pop("is_active", UNSET) + + is_latest = d.pop("is_latest", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + agent_version_response = cls( + id=id, + version_number=version_number, + version_name=version_name, + version_name_display=version_name_display, + status=status, + status_display=status_display, + score=score, + test_count=test_count, + pass_rate=pass_rate, + description=description, + commit_message=commit_message, + release_notes=release_notes, + agent_definition=agent_definition, + organization=organization, + configuration_snapshot=configuration_snapshot, + is_active=is_active, + is_latest=is_latest, + created_at=created_at, + updated_at=updated_at, + ) + + agent_version_response.additional_properties = d + return agent_version_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_response_configuration_snapshot.py b/python/fi/generated/openapi_client/models/agent_version_response_configuration_snapshot.py new file mode 100644 index 0000000..de00acb --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_response_configuration_snapshot.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentVersionResponseConfigurationSnapshot") + + +@_attrs_define +class AgentVersionResponseConfigurationSnapshot: + """Snapshot of agent configuration at this version""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_version_response_configuration_snapshot = cls() + + agent_version_response_configuration_snapshot.additional_properties = d + return agent_version_response_configuration_snapshot + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_response_status.py b/python/fi/generated/openapi_client/models/agent_version_response_status.py new file mode 100644 index 0000000..4783f6d --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_response_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AgentVersionResponseStatus(str, Enum): + ACTIVE = "active" + ARCHIVED = "archived" + DEPRECATED = "deprecated" + DRAFT = "draft" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/agent_version_restore_response.py b/python/fi/generated/openapi_client/models/agent_version_restore_response.py new file mode 100644 index 0000000..062074e --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_restore_response.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.agent_version_response import AgentVersionResponse + from ..models.agent_version_restore_response_agent import ( + AgentVersionRestoreResponseAgent, + ) + + +T = TypeVar("T", bound="AgentVersionRestoreResponse") + + +@_attrs_define +class AgentVersionRestoreResponse: + """ + Attributes: + message (str | Unset): + agent (AgentVersionRestoreResponseAgent | Unset): + version (AgentVersionResponse | Unset): + """ + + message: str | Unset = UNSET + agent: AgentVersionRestoreResponseAgent | Unset = UNSET + version: AgentVersionResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + agent: dict[str, Any] | Unset = UNSET + if not isinstance(self.agent, Unset): + agent = self.agent.to_dict() + + version: dict[str, Any] | Unset = UNSET + if not isinstance(self.version, Unset): + version = self.version.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if agent is not UNSET: + field_dict["agent"] = agent + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_version_response import AgentVersionResponse + from ..models.agent_version_restore_response_agent import ( + AgentVersionRestoreResponseAgent, + ) + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _agent = d.pop("agent", UNSET) + agent: AgentVersionRestoreResponseAgent | Unset + if isinstance(_agent, Unset): + agent = UNSET + else: + agent = AgentVersionRestoreResponseAgent.from_dict(_agent) + + _version = d.pop("version", UNSET) + version: AgentVersionResponse | Unset + if isinstance(_version, Unset): + version = UNSET + else: + version = AgentVersionResponse.from_dict(_version) + + agent_version_restore_response = cls( + message=message, + agent=agent, + version=version, + ) + + agent_version_restore_response.additional_properties = d + return agent_version_restore_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/agent_version_restore_response_agent.py b/python/fi/generated/openapi_client/models/agent_version_restore_response_agent.py new file mode 100644 index 0000000..240660f --- /dev/null +++ b/python/fi/generated/openapi_client/models/agent_version_restore_response_agent.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AgentVersionRestoreResponseAgent") + + +@_attrs_define +class AgentVersionRestoreResponseAgent: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_version_restore_response_agent = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + agent_version_restore_response_agent.additional_properties = ( + additional_properties + ) + return agent_version_restore_response_agent + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/all_active_tests.py b/python/fi/generated/openapi_client/models/all_active_tests.py new file mode 100644 index 0000000..930f0ac --- /dev/null +++ b/python/fi/generated/openapi_client/models/all_active_tests.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.all_active_tests_active_tests import AllActiveTestsActiveTests + + +T = TypeVar("T", bound="AllActiveTests") + + +@_attrs_define +class AllActiveTests: + """ + Attributes: + active_tests (AllActiveTestsActiveTests): + total_active (int): + """ + + active_tests: AllActiveTestsActiveTests + total_active: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + active_tests = self.active_tests.to_dict() + + total_active = self.total_active + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "active_tests": active_tests, + "total_active": total_active, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.all_active_tests_active_tests import AllActiveTestsActiveTests + + d = dict(src_dict) + active_tests = AllActiveTestsActiveTests.from_dict(d.pop("active_tests")) + + total_active = d.pop("total_active") + + all_active_tests = cls( + active_tests=active_tests, + total_active=total_active, + ) + + all_active_tests.additional_properties = d + return all_active_tests + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/all_active_tests_active_tests.py b/python/fi/generated/openapi_client/models/all_active_tests_active_tests.py new file mode 100644 index 0000000..5fe41a3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/all_active_tests_active_tests.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AllActiveTestsActiveTests") + + +@_attrs_define +class AllActiveTestsActiveTests: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + all_active_tests_active_tests = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + all_active_tests_active_tests.additional_properties = additional_properties + return all_active_tests_active_tests + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_label_response.py b/python/fi/generated/openapi_client/models/annotation_label_response.py new file mode 100644 index 0000000..0d668a8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_label_response.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotation_label_response_settings import ( + AnnotationLabelResponseSettings, + ) + + +T = TypeVar("T", bound="AnnotationLabelResponse") + + +@_attrs_define +class AnnotationLabelResponse: + """ + Attributes: + id (UUID): + name (str): + type_ (str): + description (None | str | Unset): + settings (AnnotationLabelResponseSettings | Unset): + """ + + id: UUID + name: str + type_: str + description: None | str | Unset = UNSET + settings: AnnotationLabelResponseSettings | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + type_ = self.type_ + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + settings: dict[str, Any] | Unset = UNSET + if not isinstance(self.settings, Unset): + settings = self.settings.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "type": type_, + } + ) + if description is not UNSET: + field_dict["description"] = description + if settings is not UNSET: + field_dict["settings"] = settings + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_label_response_settings import ( + AnnotationLabelResponseSettings, + ) + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + type_ = d.pop("type") + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + _settings = d.pop("settings", UNSET) + settings: AnnotationLabelResponseSettings | Unset + if isinstance(_settings, Unset): + settings = UNSET + else: + settings = AnnotationLabelResponseSettings.from_dict(_settings) + + annotation_label_response = cls( + id=id, + name=name, + type_=type_, + description=description, + settings=settings, + ) + + annotation_label_response.additional_properties = d + return annotation_label_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_label_response_settings.py b/python/fi/generated/openapi_client/models/annotation_label_response_settings.py new file mode 100644 index 0000000..e97947f --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_label_response_settings.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AnnotationLabelResponseSettings") + + +@_attrs_define +class AnnotationLabelResponseSettings: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + annotation_label_response_settings = cls() + + annotation_label_response_settings.additional_properties = d + return annotation_label_response_settings + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_label_restore_response.py b/python/fi/generated/openapi_client/models/annotation_label_restore_response.py new file mode 100644 index 0000000..a2ea737 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_label_restore_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotations_labels import AnnotationsLabels + + +T = TypeVar("T", bound="AnnotationLabelRestoreResponse") + + +@_attrs_define +class AnnotationLabelRestoreResponse: + """ + Attributes: + result (AnnotationsLabels): + status (bool | Unset): Default: True. + """ + + result: AnnotationsLabels + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotations_labels import AnnotationsLabels + + d = dict(src_dict) + result = AnnotationsLabels.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + annotation_label_restore_response = cls( + result=result, + status=status, + ) + + annotation_label_restore_response.additional_properties = d + return annotation_label_restore_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_queue.py b/python/fi/generated/openapi_client/models/annotation_queue.py new file mode 100644 index 0000000..d9db9d9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_queue.py @@ -0,0 +1,532 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.annotation_queue_assignment_strategy import ( + AnnotationQueueAssignmentStrategy, +) +from ..models.annotation_queue_status import AnnotationQueueStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotation_queue_annotator_roles import AnnotationQueueAnnotatorRoles + from ..models.queue_annotator_nested import QueueAnnotatorNested + from ..models.queue_label_nested import QueueLabelNested + + +T = TypeVar("T", bound="AnnotationQueue") + + +@_attrs_define +class AnnotationQueue: + """ + Attributes: + name (str): + id (UUID | Unset): + description (None | str | Unset): + instructions (None | str | Unset): + status (AnnotationQueueStatus | Unset): + assignment_strategy (AnnotationQueueAssignmentStrategy | Unset): + annotations_required (int | Unset): + reservation_timeout_minutes (int | Unset): + requires_review (bool | Unset): + auto_assign (bool | Unset): When enabled, all queue members can annotate any item without explicit assignment. + organization (UUID | Unset): + project (None | Unset | UUID): + dataset (None | Unset | UUID): + agent_definition (None | Unset | UUID): + is_default (bool | Unset): + labels (list[QueueLabelNested] | Unset): + annotators (list[QueueAnnotatorNested] | Unset): + label_ids (list[UUID] | Unset): + annotator_ids (list[UUID] | Unset): + annotator_roles (AnnotationQueueAnnotatorRoles | Unset): + label_count (int | Unset): + annotator_count (int | Unset): + item_count (int | Unset): + completed_count (int | Unset): + created_by (None | Unset | UUID): + created_by_name (str | Unset): + viewer_role (str | Unset): + viewer_roles (str | Unset): + created_at (datetime.datetime | Unset): + """ + + name: str + id: UUID | Unset = UNSET + description: None | str | Unset = UNSET + instructions: None | str | Unset = UNSET + status: AnnotationQueueStatus | Unset = UNSET + assignment_strategy: AnnotationQueueAssignmentStrategy | Unset = UNSET + annotations_required: int | Unset = UNSET + reservation_timeout_minutes: int | Unset = UNSET + requires_review: bool | Unset = UNSET + auto_assign: bool | Unset = UNSET + organization: UUID | Unset = UNSET + project: None | Unset | UUID = UNSET + dataset: None | Unset | UUID = UNSET + agent_definition: None | Unset | UUID = UNSET + is_default: bool | Unset = UNSET + labels: list[QueueLabelNested] | Unset = UNSET + annotators: list[QueueAnnotatorNested] | Unset = UNSET + label_ids: list[UUID] | Unset = UNSET + annotator_ids: list[UUID] | Unset = UNSET + annotator_roles: AnnotationQueueAnnotatorRoles | Unset = UNSET + label_count: int | Unset = UNSET + annotator_count: int | Unset = UNSET + item_count: int | Unset = UNSET + completed_count: int | Unset = UNSET + created_by: None | Unset | UUID = UNSET + created_by_name: str | Unset = UNSET + viewer_role: str | Unset = UNSET + viewer_roles: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + instructions: None | str | Unset + if isinstance(self.instructions, Unset): + instructions = UNSET + else: + instructions = self.instructions + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + assignment_strategy: str | Unset = UNSET + if not isinstance(self.assignment_strategy, Unset): + assignment_strategy = self.assignment_strategy.value + + annotations_required = self.annotations_required + + reservation_timeout_minutes = self.reservation_timeout_minutes + + requires_review = self.requires_review + + auto_assign = self.auto_assign + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + project: None | str | Unset + if isinstance(self.project, Unset): + project = UNSET + elif isinstance(self.project, UUID): + project = str(self.project) + else: + project = self.project + + dataset: None | str | Unset + if isinstance(self.dataset, Unset): + dataset = UNSET + elif isinstance(self.dataset, UUID): + dataset = str(self.dataset) + else: + dataset = self.dataset + + agent_definition: None | str | Unset + if isinstance(self.agent_definition, Unset): + agent_definition = UNSET + elif isinstance(self.agent_definition, UUID): + agent_definition = str(self.agent_definition) + else: + agent_definition = self.agent_definition + + is_default = self.is_default + + labels: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.labels, Unset): + labels = [] + for labels_item_data in self.labels: + labels_item = labels_item_data.to_dict() + labels.append(labels_item) + + annotators: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.annotators, Unset): + annotators = [] + for annotators_item_data in self.annotators: + annotators_item = annotators_item_data.to_dict() + annotators.append(annotators_item) + + label_ids: list[str] | Unset = UNSET + if not isinstance(self.label_ids, Unset): + label_ids = [] + for label_ids_item_data in self.label_ids: + label_ids_item = str(label_ids_item_data) + label_ids.append(label_ids_item) + + annotator_ids: list[str] | Unset = UNSET + if not isinstance(self.annotator_ids, Unset): + annotator_ids = [] + for annotator_ids_item_data in self.annotator_ids: + annotator_ids_item = str(annotator_ids_item_data) + annotator_ids.append(annotator_ids_item) + + annotator_roles: dict[str, Any] | Unset = UNSET + if not isinstance(self.annotator_roles, Unset): + annotator_roles = self.annotator_roles.to_dict() + + label_count = self.label_count + + annotator_count = self.annotator_count + + item_count = self.item_count + + completed_count = self.completed_count + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + elif isinstance(self.created_by, UUID): + created_by = str(self.created_by) + else: + created_by = self.created_by + + created_by_name = self.created_by_name + + viewer_role = self.viewer_role + + viewer_roles = self.viewer_roles + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if id is not UNSET: + field_dict["id"] = id + if description is not UNSET: + field_dict["description"] = description + if instructions is not UNSET: + field_dict["instructions"] = instructions + if status is not UNSET: + field_dict["status"] = status + if assignment_strategy is not UNSET: + field_dict["assignment_strategy"] = assignment_strategy + if annotations_required is not UNSET: + field_dict["annotations_required"] = annotations_required + if reservation_timeout_minutes is not UNSET: + field_dict["reservation_timeout_minutes"] = reservation_timeout_minutes + if requires_review is not UNSET: + field_dict["requires_review"] = requires_review + if auto_assign is not UNSET: + field_dict["auto_assign"] = auto_assign + if organization is not UNSET: + field_dict["organization"] = organization + if project is not UNSET: + field_dict["project"] = project + if dataset is not UNSET: + field_dict["dataset"] = dataset + if agent_definition is not UNSET: + field_dict["agent_definition"] = agent_definition + if is_default is not UNSET: + field_dict["is_default"] = is_default + if labels is not UNSET: + field_dict["labels"] = labels + if annotators is not UNSET: + field_dict["annotators"] = annotators + if label_ids is not UNSET: + field_dict["label_ids"] = label_ids + if annotator_ids is not UNSET: + field_dict["annotator_ids"] = annotator_ids + if annotator_roles is not UNSET: + field_dict["annotator_roles"] = annotator_roles + if label_count is not UNSET: + field_dict["label_count"] = label_count + if annotator_count is not UNSET: + field_dict["annotator_count"] = annotator_count + if item_count is not UNSET: + field_dict["item_count"] = item_count + if completed_count is not UNSET: + field_dict["completed_count"] = completed_count + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_name is not UNSET: + field_dict["created_by_name"] = created_by_name + if viewer_role is not UNSET: + field_dict["viewer_role"] = viewer_role + if viewer_roles is not UNSET: + field_dict["viewer_roles"] = viewer_roles + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_queue_annotator_roles import ( + AnnotationQueueAnnotatorRoles, + ) + from ..models.queue_annotator_nested import QueueAnnotatorNested + from ..models.queue_label_nested import QueueLabelNested + + d = dict(src_dict) + name = d.pop("name") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_instructions(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + instructions = _parse_instructions(d.pop("instructions", UNSET)) + + _status = d.pop("status", UNSET) + status: AnnotationQueueStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = AnnotationQueueStatus(_status) + + _assignment_strategy = d.pop("assignment_strategy", UNSET) + assignment_strategy: AnnotationQueueAssignmentStrategy | Unset + if isinstance(_assignment_strategy, Unset): + assignment_strategy = UNSET + else: + assignment_strategy = AnnotationQueueAssignmentStrategy( + _assignment_strategy + ) + + annotations_required = d.pop("annotations_required", UNSET) + + reservation_timeout_minutes = d.pop("reservation_timeout_minutes", UNSET) + + requires_review = d.pop("requires_review", UNSET) + + auto_assign = d.pop("auto_assign", UNSET) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + def _parse_project(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + project_type_0 = UUID(data) + + return project_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + project = _parse_project(d.pop("project", UNSET)) + + def _parse_dataset(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + dataset_type_0 = UUID(data) + + return dataset_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + dataset = _parse_dataset(d.pop("dataset", UNSET)) + + def _parse_agent_definition(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_definition_type_0 = UUID(data) + + return agent_definition_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_definition = _parse_agent_definition(d.pop("agent_definition", UNSET)) + + is_default = d.pop("is_default", UNSET) + + _labels = d.pop("labels", UNSET) + labels: list[QueueLabelNested] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = QueueLabelNested.from_dict(labels_item_data) + + labels.append(labels_item) + + _annotators = d.pop("annotators", UNSET) + annotators: list[QueueAnnotatorNested] | Unset = UNSET + if _annotators is not UNSET: + annotators = [] + for annotators_item_data in _annotators: + annotators_item = QueueAnnotatorNested.from_dict(annotators_item_data) + + annotators.append(annotators_item) + + _label_ids = d.pop("label_ids", UNSET) + label_ids: list[UUID] | Unset = UNSET + if _label_ids is not UNSET: + label_ids = [] + for label_ids_item_data in _label_ids: + label_ids_item = UUID(label_ids_item_data) + + label_ids.append(label_ids_item) + + _annotator_ids = d.pop("annotator_ids", UNSET) + annotator_ids: list[UUID] | Unset = UNSET + if _annotator_ids is not UNSET: + annotator_ids = [] + for annotator_ids_item_data in _annotator_ids: + annotator_ids_item = UUID(annotator_ids_item_data) + + annotator_ids.append(annotator_ids_item) + + _annotator_roles = d.pop("annotator_roles", UNSET) + annotator_roles: AnnotationQueueAnnotatorRoles | Unset + if isinstance(_annotator_roles, Unset): + annotator_roles = UNSET + else: + annotator_roles = AnnotationQueueAnnotatorRoles.from_dict(_annotator_roles) + + label_count = d.pop("label_count", UNSET) + + annotator_count = d.pop("annotator_count", UNSET) + + item_count = d.pop("item_count", UNSET) + + completed_count = d.pop("completed_count", UNSET) + + def _parse_created_by(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + created_by_type_0 = UUID(data) + + return created_by_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) + + created_by_name = d.pop("created_by_name", UNSET) + + viewer_role = d.pop("viewer_role", UNSET) + + viewer_roles = d.pop("viewer_roles", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + annotation_queue = cls( + name=name, + id=id, + description=description, + instructions=instructions, + status=status, + assignment_strategy=assignment_strategy, + annotations_required=annotations_required, + reservation_timeout_minutes=reservation_timeout_minutes, + requires_review=requires_review, + auto_assign=auto_assign, + organization=organization, + project=project, + dataset=dataset, + agent_definition=agent_definition, + is_default=is_default, + labels=labels, + annotators=annotators, + label_ids=label_ids, + annotator_ids=annotator_ids, + annotator_roles=annotator_roles, + label_count=label_count, + annotator_count=annotator_count, + item_count=item_count, + completed_count=completed_count, + created_by=created_by, + created_by_name=created_by_name, + viewer_role=viewer_role, + viewer_roles=viewer_roles, + created_at=created_at, + ) + + annotation_queue.additional_properties = d + return annotation_queue + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_queue_annotator_roles.py b/python/fi/generated/openapi_client/models/annotation_queue_annotator_roles.py new file mode 100644 index 0000000..e988959 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_queue_annotator_roles.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.annotation_queue_annotator_roles_additional_property import ( + AnnotationQueueAnnotatorRolesAdditionalProperty, + ) + + +T = TypeVar("T", bound="AnnotationQueueAnnotatorRoles") + + +@_attrs_define +class AnnotationQueueAnnotatorRoles: + """ """ + + additional_properties: dict[ + str, AnnotationQueueAnnotatorRolesAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_queue_annotator_roles_additional_property import ( + AnnotationQueueAnnotatorRolesAdditionalProperty, + ) + + d = dict(src_dict) + annotation_queue_annotator_roles = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + AnnotationQueueAnnotatorRolesAdditionalProperty.from_dict(prop_dict) + ) + + additional_properties[prop_name] = additional_property + + annotation_queue_annotator_roles.additional_properties = additional_properties + return annotation_queue_annotator_roles + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> AnnotationQueueAnnotatorRolesAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: AnnotationQueueAnnotatorRolesAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_queue_annotator_roles_additional_property.py b/python/fi/generated/openapi_client/models/annotation_queue_annotator_roles_additional_property.py new file mode 100644 index 0000000..e15efde --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_queue_annotator_roles_additional_property.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AnnotationQueueAnnotatorRolesAdditionalProperty") + + +@_attrs_define +class AnnotationQueueAnnotatorRolesAdditionalProperty: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + annotation_queue_annotator_roles_additional_property = cls() + + annotation_queue_annotator_roles_additional_property.additional_properties = d + return annotation_queue_annotator_roles_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_queue_assignment_strategy.py b/python/fi/generated/openapi_client/models/annotation_queue_assignment_strategy.py new file mode 100644 index 0000000..1fd8829 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_queue_assignment_strategy.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AnnotationQueueAssignmentStrategy(str, Enum): + LOAD_BALANCED = "load_balanced" + MANUAL = "manual" + ROUND_ROBIN = "round_robin" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/annotation_queue_status.py b/python/fi/generated/openapi_client/models/annotation_queue_status.py new file mode 100644 index 0000000..0b62d72 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_queue_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AnnotationQueueStatus(str, Enum): + ACTIVE = "active" + COMPLETED = "completed" + DRAFT = "draft" + PAUSED = "paused" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/annotation_summary_header.py b/python/fi/generated/openapi_client/models/annotation_summary_header.py new file mode 100644 index 0000000..50b0363 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_summary_header.py @@ -0,0 +1,113 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AnnotationSummaryHeader") + + +@_attrs_define +class AnnotationSummaryHeader: + """ + Attributes: + dataset_coverage (float | None | Unset): + completion_eta (float | None | Unset): + overall_agreement (float | None | Unset): + """ + + dataset_coverage: float | None | Unset = UNSET + completion_eta: float | None | Unset = UNSET + overall_agreement: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_coverage: float | None | Unset + if isinstance(self.dataset_coverage, Unset): + dataset_coverage = UNSET + else: + dataset_coverage = self.dataset_coverage + + completion_eta: float | None | Unset + if isinstance(self.completion_eta, Unset): + completion_eta = UNSET + else: + completion_eta = self.completion_eta + + overall_agreement: float | None | Unset + if isinstance(self.overall_agreement, Unset): + overall_agreement = UNSET + else: + overall_agreement = self.overall_agreement + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if dataset_coverage is not UNSET: + field_dict["dataset_coverage"] = dataset_coverage + if completion_eta is not UNSET: + field_dict["completion_eta"] = completion_eta + if overall_agreement is not UNSET: + field_dict["overall_agreement"] = overall_agreement + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_dataset_coverage(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dataset_coverage = _parse_dataset_coverage(d.pop("dataset_coverage", UNSET)) + + def _parse_completion_eta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + completion_eta = _parse_completion_eta(d.pop("completion_eta", UNSET)) + + def _parse_overall_agreement(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + overall_agreement = _parse_overall_agreement(d.pop("overall_agreement", UNSET)) + + annotation_summary_header = cls( + dataset_coverage=dataset_coverage, + completion_eta=completion_eta, + overall_agreement=overall_agreement, + ) + + annotation_summary_header.additional_properties = d + return annotation_summary_header + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_summary_response.py b/python/fi/generated/openapi_client/models/annotation_summary_response.py new file mode 100644 index 0000000..c8e47ec --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_summary_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotation_summary_result import AnnotationSummaryResult + + +T = TypeVar("T", bound="AnnotationSummaryResponse") + + +@_attrs_define +class AnnotationSummaryResponse: + """ + Attributes: + result (AnnotationSummaryResult): + status (bool | Unset): Default: True. + """ + + result: AnnotationSummaryResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_summary_result import AnnotationSummaryResult + + d = dict(src_dict) + result = AnnotationSummaryResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + annotation_summary_response = cls( + result=result, + status=status, + ) + + annotation_summary_response.additional_properties = d + return annotation_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_summary_result.py b/python/fi/generated/openapi_client/models/annotation_summary_result.py new file mode 100644 index 0000000..4d5f801 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_summary_result.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotation_summary_header import AnnotationSummaryHeader + from ..models.annotation_summary_result_annotators_item import ( + AnnotationSummaryResultAnnotatorsItem, + ) + from ..models.annotation_summary_result_labels_item import ( + AnnotationSummaryResultLabelsItem, + ) + + +T = TypeVar("T", bound="AnnotationSummaryResult") + + +@_attrs_define +class AnnotationSummaryResult: + """ + Attributes: + labels (list[AnnotationSummaryResultLabelsItem] | Unset): + annotators (list[AnnotationSummaryResultAnnotatorsItem] | Unset): + header (AnnotationSummaryHeader | Unset): + """ + + labels: list[AnnotationSummaryResultLabelsItem] | Unset = UNSET + annotators: list[AnnotationSummaryResultAnnotatorsItem] | Unset = UNSET + header: AnnotationSummaryHeader | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + labels: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.labels, Unset): + labels = [] + for labels_item_data in self.labels: + labels_item = labels_item_data.to_dict() + labels.append(labels_item) + + annotators: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.annotators, Unset): + annotators = [] + for annotators_item_data in self.annotators: + annotators_item = annotators_item_data.to_dict() + annotators.append(annotators_item) + + header: dict[str, Any] | Unset = UNSET + if not isinstance(self.header, Unset): + header = self.header.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if labels is not UNSET: + field_dict["labels"] = labels + if annotators is not UNSET: + field_dict["annotators"] = annotators + if header is not UNSET: + field_dict["header"] = header + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_summary_header import AnnotationSummaryHeader + from ..models.annotation_summary_result_annotators_item import ( + AnnotationSummaryResultAnnotatorsItem, + ) + from ..models.annotation_summary_result_labels_item import ( + AnnotationSummaryResultLabelsItem, + ) + + d = dict(src_dict) + _labels = d.pop("labels", UNSET) + labels: list[AnnotationSummaryResultLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = AnnotationSummaryResultLabelsItem.from_dict( + labels_item_data + ) + + labels.append(labels_item) + + _annotators = d.pop("annotators", UNSET) + annotators: list[AnnotationSummaryResultAnnotatorsItem] | Unset = UNSET + if _annotators is not UNSET: + annotators = [] + for annotators_item_data in _annotators: + annotators_item = AnnotationSummaryResultAnnotatorsItem.from_dict( + annotators_item_data + ) + + annotators.append(annotators_item) + + _header = d.pop("header", UNSET) + header: AnnotationSummaryHeader | Unset + if isinstance(_header, Unset): + header = UNSET + else: + header = AnnotationSummaryHeader.from_dict(_header) + + annotation_summary_result = cls( + labels=labels, + annotators=annotators, + header=header, + ) + + annotation_summary_result.additional_properties = d + return annotation_summary_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_summary_result_annotators_item.py b/python/fi/generated/openapi_client/models/annotation_summary_result_annotators_item.py new file mode 100644 index 0000000..bb638e2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_summary_result_annotators_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AnnotationSummaryResultAnnotatorsItem") + + +@_attrs_define +class AnnotationSummaryResultAnnotatorsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + annotation_summary_result_annotators_item = cls() + + annotation_summary_result_annotators_item.additional_properties = d + return annotation_summary_result_annotators_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotation_summary_result_labels_item.py b/python/fi/generated/openapi_client/models/annotation_summary_result_labels_item.py new file mode 100644 index 0000000..1ec07b6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotation_summary_result_labels_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AnnotationSummaryResultLabelsItem") + + +@_attrs_define +class AnnotationSummaryResultLabelsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + annotation_summary_result_labels_item = cls() + + annotation_summary_result_labels_item.additional_properties = d + return annotation_summary_result_labels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotations_labels.py b/python/fi/generated/openapi_client/models/annotations_labels.py new file mode 100644 index 0000000..1916cdd --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotations_labels.py @@ -0,0 +1,208 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.annotations_labels_type import AnnotationsLabelsType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotations_labels_settings import AnnotationsLabelsSettings + + +T = TypeVar("T", bound="AnnotationsLabels") + + +@_attrs_define +class AnnotationsLabels: + """ + Attributes: + name (str): + type_ (AnnotationsLabelsType): + id (UUID | Unset): + organization (UUID | Unset): + settings (AnnotationsLabelsSettings | Unset): + project (UUID | Unset): + description (None | str | Unset): + allow_notes (bool | Unset): + created_at (datetime.datetime | Unset): + trace_annotations_count (int | Unset): + annotation_count (int | Unset): + """ + + name: str + type_: AnnotationsLabelsType + id: UUID | Unset = UNSET + organization: UUID | Unset = UNSET + settings: AnnotationsLabelsSettings | Unset = UNSET + project: UUID | Unset = UNSET + description: None | str | Unset = UNSET + allow_notes: bool | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + trace_annotations_count: int | Unset = UNSET + annotation_count: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + type_ = self.type_.value + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + settings: dict[str, Any] | Unset = UNSET + if not isinstance(self.settings, Unset): + settings = self.settings.to_dict() + + project: str | Unset = UNSET + if not isinstance(self.project, Unset): + project = str(self.project) + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + allow_notes = self.allow_notes + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + trace_annotations_count = self.trace_annotations_count + + annotation_count = self.annotation_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "type": type_, + } + ) + if id is not UNSET: + field_dict["id"] = id + if organization is not UNSET: + field_dict["organization"] = organization + if settings is not UNSET: + field_dict["settings"] = settings + if project is not UNSET: + field_dict["project"] = project + if description is not UNSET: + field_dict["description"] = description + if allow_notes is not UNSET: + field_dict["allow_notes"] = allow_notes + if created_at is not UNSET: + field_dict["created_at"] = created_at + if trace_annotations_count is not UNSET: + field_dict["trace_annotations_count"] = trace_annotations_count + if annotation_count is not UNSET: + field_dict["annotation_count"] = annotation_count + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotations_labels_settings import AnnotationsLabelsSettings + + d = dict(src_dict) + name = d.pop("name") + + type_ = AnnotationsLabelsType(d.pop("type")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + _settings = d.pop("settings", UNSET) + settings: AnnotationsLabelsSettings | Unset + if isinstance(_settings, Unset): + settings = UNSET + else: + settings = AnnotationsLabelsSettings.from_dict(_settings) + + _project = d.pop("project", UNSET) + project: UUID | Unset + if isinstance(_project, Unset): + project = UNSET + else: + project = UUID(_project) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + allow_notes = d.pop("allow_notes", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + trace_annotations_count = d.pop("trace_annotations_count", UNSET) + + annotation_count = d.pop("annotation_count", UNSET) + + annotations_labels = cls( + name=name, + type_=type_, + id=id, + organization=organization, + settings=settings, + project=project, + description=description, + allow_notes=allow_notes, + created_at=created_at, + trace_annotations_count=trace_annotations_count, + annotation_count=annotation_count, + ) + + annotations_labels.additional_properties = d + return annotations_labels + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotations_labels_settings.py b/python/fi/generated/openapi_client/models/annotations_labels_settings.py new file mode 100644 index 0000000..73f8262 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotations_labels_settings.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AnnotationsLabelsSettings") + + +@_attrs_define +class AnnotationsLabelsSettings: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + annotations_labels_settings = cls() + + annotations_labels_settings.additional_properties = d + return annotations_labels_settings + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/annotations_labels_type.py b/python/fi/generated/openapi_client/models/annotations_labels_type.py new file mode 100644 index 0000000..4074761 --- /dev/null +++ b/python/fi/generated/openapi_client/models/annotations_labels_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AnnotationsLabelsType(str, Enum): + CATEGORICAL = "categorical" + NUMERIC = "numeric" + STAR = "star" + TEXT = "text" + THUMBS_UP_DOWN = "thumbs_up_down" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/api_error_response.py b/python/fi/generated/openapi_client/models/api_error_response.py new file mode 100644 index 0000000..f6812c3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_error_response.py @@ -0,0 +1,220 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_error_response_type import ApiErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_error_response_details import ApiErrorResponseDetails + + +T = TypeVar("T", bound="ApiErrorResponse") + + +@_attrs_define +class ApiErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (ApiErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ApiErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: ApiErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ApiErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_error_response_details import ApiErrorResponseDetails + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ApiErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ApiErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ApiErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ApiErrorResponseDetails.from_dict(_details) + + api_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + api_error_response.additional_properties = d + return api_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_error_response_details.py b/python/fi/generated/openapi_client/models/api_error_response_details.py new file mode 100644 index 0000000..905b83c --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ApiErrorResponseDetails") + + +@_attrs_define +class ApiErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + api_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + api_error_response_details.additional_properties = additional_properties + return api_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_error_response_type.py b/python/fi/generated/openapi_client/models/api_error_response_type.py new file mode 100644 index 0000000..fdb77a9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ApiErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/api_error_with_details_response.py b/python/fi/generated/openapi_client/models/api_error_with_details_response.py new file mode 100644 index 0000000..88aaff4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_error_with_details_response.py @@ -0,0 +1,226 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_error_with_details_response_type import ( + ApiErrorWithDetailsResponseType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_error_with_details_response_details import ( + ApiErrorWithDetailsResponseDetails, + ) + + +T = TypeVar("T", bound="ApiErrorWithDetailsResponse") + + +@_attrs_define +class ApiErrorWithDetailsResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (ApiErrorWithDetailsResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ApiErrorWithDetailsResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: ApiErrorWithDetailsResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ApiErrorWithDetailsResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_error_with_details_response_details import ( + ApiErrorWithDetailsResponseDetails, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ApiErrorWithDetailsResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ApiErrorWithDetailsResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ApiErrorWithDetailsResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ApiErrorWithDetailsResponseDetails.from_dict(_details) + + api_error_with_details_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + api_error_with_details_response.additional_properties = d + return api_error_with_details_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_error_with_details_response_details.py b/python/fi/generated/openapi_client/models/api_error_with_details_response_details.py new file mode 100644 index 0000000..7e377ac --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_error_with_details_response_details.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ApiErrorWithDetailsResponseDetails") + + +@_attrs_define +class ApiErrorWithDetailsResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + api_error_with_details_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + api_error_with_details_response_details.additional_properties = ( + additional_properties + ) + return api_error_with_details_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_error_with_details_response_type.py b/python/fi/generated/openapi_client/models/api_error_with_details_response_type.py new file mode 100644 index 0000000..90ce402 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_error_with_details_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ApiErrorWithDetailsResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/api_key.py b/python/fi/generated/openapi_client/models/api_key.py new file mode 100644 index 0000000..65e851b --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_key.py @@ -0,0 +1,161 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_key_config_json import ApiKeyConfigJson + + +T = TypeVar("T", bound="ApiKey") + + +@_attrs_define +class ApiKey: + """ + Attributes: + provider (str): + id (UUID | Unset): + key (None | str | Unset): + organization (None | Unset | UUID): + masked_actual_key (str | Unset): + config_json (ApiKeyConfigJson | Unset): + """ + + provider: str + id: UUID | Unset = UNSET + key: None | str | Unset = UNSET + organization: None | Unset | UUID = UNSET + masked_actual_key: str | Unset = UNSET + config_json: ApiKeyConfigJson | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + provider = self.provider + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + key: None | str | Unset + if isinstance(self.key, Unset): + key = UNSET + else: + key = self.key + + organization: None | str | Unset + if isinstance(self.organization, Unset): + organization = UNSET + elif isinstance(self.organization, UUID): + organization = str(self.organization) + else: + organization = self.organization + + masked_actual_key = self.masked_actual_key + + config_json: dict[str, Any] | Unset = UNSET + if not isinstance(self.config_json, Unset): + config_json = self.config_json.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "provider": provider, + } + ) + if id is not UNSET: + field_dict["id"] = id + if key is not UNSET: + field_dict["key"] = key + if organization is not UNSET: + field_dict["organization"] = organization + if masked_actual_key is not UNSET: + field_dict["masked_actual_key"] = masked_actual_key + if config_json is not UNSET: + field_dict["config_json"] = config_json + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_key_config_json import ApiKeyConfigJson + + d = dict(src_dict) + provider = d.pop("provider") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + key = _parse_key(d.pop("key", UNSET)) + + def _parse_organization(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + organization_type_0 = UUID(data) + + return organization_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + organization = _parse_organization(d.pop("organization", UNSET)) + + masked_actual_key = d.pop("masked_actual_key", UNSET) + + _config_json = d.pop("config_json", UNSET) + config_json: ApiKeyConfigJson | Unset + if isinstance(_config_json, Unset): + config_json = UNSET + else: + config_json = ApiKeyConfigJson.from_dict(_config_json) + + api_key = cls( + provider=provider, + id=id, + key=key, + organization=organization, + masked_actual_key=masked_actual_key, + config_json=config_json, + ) + + api_key.additional_properties = d + return api_key + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_key_config_json.py b/python/fi/generated/openapi_client/models/api_key_config_json.py new file mode 100644 index 0000000..db7fd69 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_key_config_json.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ApiKeyConfigJson") + + +@_attrs_define +class ApiKeyConfigJson: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + api_key_config_json = cls() + + api_key_config_json.additional_properties = d + return api_key_config_json + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_selection_too_large_detail.py b/python/fi/generated/openapi_client/models/api_selection_too_large_detail.py new file mode 100644 index 0000000..8e3c4b2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_selection_too_large_detail.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_selection_too_large_detail_type import ApiSelectionTooLargeDetailType + +T = TypeVar("T", bound="ApiSelectionTooLargeDetail") + + +@_attrs_define +class ApiSelectionTooLargeDetail: + """ + Attributes: + type_ (ApiSelectionTooLargeDetailType): + message (str): + total_matching (int): + cap (int): + """ + + type_: ApiSelectionTooLargeDetailType + message: str + total_matching: int + cap: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_ = self.type_.value + + message = self.message + + total_matching = self.total_matching + + cap = self.cap + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "message": message, + "total_matching": total_matching, + "cap": cap, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_ = ApiSelectionTooLargeDetailType(d.pop("type")) + + message = d.pop("message") + + total_matching = d.pop("total_matching") + + cap = d.pop("cap") + + api_selection_too_large_detail = cls( + type_=type_, + message=message, + total_matching=total_matching, + cap=cap, + ) + + api_selection_too_large_detail.additional_properties = d + return api_selection_too_large_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_selection_too_large_detail_type.py b/python/fi/generated/openapi_client/models/api_selection_too_large_detail_type.py new file mode 100644 index 0000000..94e84f3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_selection_too_large_detail_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiSelectionTooLargeDetailType(str, Enum): + SELECTION_TOO_LARGE = "selection_too_large" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/api_selection_too_large_error.py b/python/fi/generated/openapi_client/models/api_selection_too_large_error.py new file mode 100644 index 0000000..c8a1777 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_selection_too_large_error.py @@ -0,0 +1,141 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_selection_too_large_error_type import ApiSelectionTooLargeErrorType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_selection_too_large_detail import ApiSelectionTooLargeDetail + + +T = TypeVar("T", bound="ApiSelectionTooLargeError") + + +@_attrs_define +class ApiSelectionTooLargeError: + """ + Attributes: + message (str): + error (ApiSelectionTooLargeDetail): + status (bool | Unset): Default: False. + result (None | str | Unset): + type_ (ApiSelectionTooLargeErrorType | Unset): + code (str | Unset): Default: 'selection_too_large'. + detail (str | Unset): + """ + + message: str + error: ApiSelectionTooLargeDetail + status: bool | Unset = False + result: None | str | Unset = UNSET + type_: ApiSelectionTooLargeErrorType | Unset = UNSET + code: str | Unset = "selection_too_large" + detail: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + error = self.error.to_dict() + + status = self.status + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code = self.code + + detail = self.detail + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "error": error, + } + ) + if status is not UNSET: + field_dict["status"] = status + if result is not UNSET: + field_dict["result"] = result + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_selection_too_large_detail import ApiSelectionTooLargeDetail + + d = dict(src_dict) + message = d.pop("message") + + error = ApiSelectionTooLargeDetail.from_dict(d.pop("error")) + + status = d.pop("status", UNSET) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + _type_ = d.pop("type", UNSET) + type_: ApiSelectionTooLargeErrorType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ApiSelectionTooLargeErrorType(_type_) + + code = d.pop("code", UNSET) + + detail = d.pop("detail", UNSET) + + api_selection_too_large_error = cls( + message=message, + error=error, + status=status, + result=result, + type_=type_, + code=code, + detail=detail, + ) + + api_selection_too_large_error.additional_properties = d + return api_selection_too_large_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_selection_too_large_error_type.py b/python/fi/generated/openapi_client/models/api_selection_too_large_error_type.py new file mode 100644 index 0000000..bd21e99 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_selection_too_large_error_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiSelectionTooLargeErrorType(str, Enum): + SELECTION_TOO_LARGE = "selection_too_large" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/api_text_error_response.py b/python/fi/generated/openapi_client/models/api_text_error_response.py new file mode 100644 index 0000000..134d2b6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_text_error_response.py @@ -0,0 +1,220 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_text_error_response_type import ApiTextErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_text_error_response_details import ApiTextErrorResponseDetails + + +T = TypeVar("T", bound="ApiTextErrorResponse") + + +@_attrs_define +class ApiTextErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (ApiTextErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ApiTextErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: ApiTextErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ApiTextErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_text_error_response_details import ApiTextErrorResponseDetails + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ApiTextErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ApiTextErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ApiTextErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ApiTextErrorResponseDetails.from_dict(_details) + + api_text_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + api_text_error_response.additional_properties = d + return api_text_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_text_error_response_details.py b/python/fi/generated/openapi_client/models/api_text_error_response_details.py new file mode 100644 index 0000000..70f35bf --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_text_error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ApiTextErrorResponseDetails") + + +@_attrs_define +class ApiTextErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + api_text_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + api_text_error_response_details.additional_properties = additional_properties + return api_text_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/api_text_error_response_type.py b/python/fi/generated/openapi_client/models/api_text_error_response_type.py new file mode 100644 index 0000000..4d284f6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/api_text_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ApiTextErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/assign_items.py b/python/fi/generated/openapi_client/models/assign_items.py new file mode 100644 index 0000000..1bccde4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/assign_items.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.assign_items_action import AssignItemsAction +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AssignItems") + + +@_attrs_define +class AssignItems: + """ + Attributes: + item_ids (list[UUID]): + user_ids (list[UUID] | Unset): + action (AssignItemsAction | Unset): Default: AssignItemsAction.ADD. + """ + + item_ids: list[UUID] + user_ids: list[UUID] | Unset = UNSET + action: AssignItemsAction | Unset = AssignItemsAction.ADD + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + item_ids = [] + for item_ids_item_data in self.item_ids: + item_ids_item = str(item_ids_item_data) + item_ids.append(item_ids_item) + + user_ids: list[str] | Unset = UNSET + if not isinstance(self.user_ids, Unset): + user_ids = [] + for user_ids_item_data in self.user_ids: + user_ids_item = str(user_ids_item_data) + user_ids.append(user_ids_item) + + action: str | Unset = UNSET + if not isinstance(self.action, Unset): + action = self.action.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "item_ids": item_ids, + } + ) + if user_ids is not UNSET: + field_dict["user_ids"] = user_ids + if action is not UNSET: + field_dict["action"] = action + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + item_ids = [] + _item_ids = d.pop("item_ids") + for item_ids_item_data in _item_ids: + item_ids_item = UUID(item_ids_item_data) + + item_ids.append(item_ids_item) + + _user_ids = d.pop("user_ids", UNSET) + user_ids: list[UUID] | Unset = UNSET + if _user_ids is not UNSET: + user_ids = [] + for user_ids_item_data in _user_ids: + user_ids_item = UUID(user_ids_item_data) + + user_ids.append(user_ids_item) + + _action = d.pop("action", UNSET) + action: AssignItemsAction | Unset + if isinstance(_action, Unset): + action = UNSET + else: + action = AssignItemsAction(_action) + + assign_items = cls( + item_ids=item_ids, + user_ids=user_ids, + action=action, + ) + + assign_items.additional_properties = d + return assign_items + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/assign_items_action.py b/python/fi/generated/openapi_client/models/assign_items_action.py new file mode 100644 index 0000000..6fc81ce --- /dev/null +++ b/python/fi/generated/openapi_client/models/assign_items_action.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class AssignItemsAction(str, Enum): + ADD = "add" + REMOVE = "remove" + SET = "set" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/automation_rule.py b/python/fi/generated/openapi_client/models/automation_rule.py new file mode 100644 index 0000000..82f9b00 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule.py @@ -0,0 +1,265 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.automation_rule_source_type import AutomationRuleSourceType +from ..models.automation_rule_trigger_frequency import AutomationRuleTriggerFrequency +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.automation_rule_conditions import AutomationRuleConditions + + +T = TypeVar("T", bound="AutomationRule") + + +@_attrs_define +class AutomationRule: + """ + Attributes: + name (str): + source_type (AutomationRuleSourceType): + id (UUID | Unset): + queue (UUID | Unset): + conditions (AutomationRuleConditions | Unset): + enabled (bool | Unset): + trigger_frequency (AutomationRuleTriggerFrequency | Unset): + organization (UUID | Unset): + created_by (None | Unset | UUID): + created_by_name (str | Unset): + last_triggered_at (datetime.datetime | None | Unset): + trigger_count (int | Unset): + created_at (datetime.datetime | Unset): + """ + + name: str + source_type: AutomationRuleSourceType + id: UUID | Unset = UNSET + queue: UUID | Unset = UNSET + conditions: AutomationRuleConditions | Unset = UNSET + enabled: bool | Unset = UNSET + trigger_frequency: AutomationRuleTriggerFrequency | Unset = UNSET + organization: UUID | Unset = UNSET + created_by: None | Unset | UUID = UNSET + created_by_name: str | Unset = UNSET + last_triggered_at: datetime.datetime | None | Unset = UNSET + trigger_count: int | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + source_type = self.source_type.value + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + queue: str | Unset = UNSET + if not isinstance(self.queue, Unset): + queue = str(self.queue) + + conditions: dict[str, Any] | Unset = UNSET + if not isinstance(self.conditions, Unset): + conditions = self.conditions.to_dict() + + enabled = self.enabled + + trigger_frequency: str | Unset = UNSET + if not isinstance(self.trigger_frequency, Unset): + trigger_frequency = self.trigger_frequency.value + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + elif isinstance(self.created_by, UUID): + created_by = str(self.created_by) + else: + created_by = self.created_by + + created_by_name = self.created_by_name + + last_triggered_at: None | str | Unset + if isinstance(self.last_triggered_at, Unset): + last_triggered_at = UNSET + elif isinstance(self.last_triggered_at, datetime.datetime): + last_triggered_at = self.last_triggered_at.isoformat() + else: + last_triggered_at = self.last_triggered_at + + trigger_count = self.trigger_count + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "source_type": source_type, + } + ) + if id is not UNSET: + field_dict["id"] = id + if queue is not UNSET: + field_dict["queue"] = queue + if conditions is not UNSET: + field_dict["conditions"] = conditions + if enabled is not UNSET: + field_dict["enabled"] = enabled + if trigger_frequency is not UNSET: + field_dict["trigger_frequency"] = trigger_frequency + if organization is not UNSET: + field_dict["organization"] = organization + if created_by is not UNSET: + field_dict["created_by"] = created_by + if created_by_name is not UNSET: + field_dict["created_by_name"] = created_by_name + if last_triggered_at is not UNSET: + field_dict["last_triggered_at"] = last_triggered_at + if trigger_count is not UNSET: + field_dict["trigger_count"] = trigger_count + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.automation_rule_conditions import AutomationRuleConditions + + d = dict(src_dict) + name = d.pop("name") + + source_type = AutomationRuleSourceType(d.pop("source_type")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _queue = d.pop("queue", UNSET) + queue: UUID | Unset + if isinstance(_queue, Unset): + queue = UNSET + else: + queue = UUID(_queue) + + _conditions = d.pop("conditions", UNSET) + conditions: AutomationRuleConditions | Unset + if isinstance(_conditions, Unset): + conditions = UNSET + else: + conditions = AutomationRuleConditions.from_dict(_conditions) + + enabled = d.pop("enabled", UNSET) + + _trigger_frequency = d.pop("trigger_frequency", UNSET) + trigger_frequency: AutomationRuleTriggerFrequency | Unset + if isinstance(_trigger_frequency, Unset): + trigger_frequency = UNSET + else: + trigger_frequency = AutomationRuleTriggerFrequency(_trigger_frequency) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + def _parse_created_by(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + created_by_type_0 = UUID(data) + + return created_by_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) + + created_by_name = d.pop("created_by_name", UNSET) + + def _parse_last_triggered_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_triggered_at_type_0 = isoparse(data) + + return last_triggered_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_triggered_at = _parse_last_triggered_at(d.pop("last_triggered_at", UNSET)) + + trigger_count = d.pop("trigger_count", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + automation_rule = cls( + name=name, + source_type=source_type, + id=id, + queue=queue, + conditions=conditions, + enabled=enabled, + trigger_frequency=trigger_frequency, + organization=organization, + created_by=created_by, + created_by_name=created_by_name, + last_triggered_at=last_triggered_at, + trigger_count=trigger_count, + created_at=created_at, + ) + + automation_rule.additional_properties = d + return automation_rule + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/automation_rule_conditions.py b/python/fi/generated/openapi_client/models/automation_rule_conditions.py new file mode 100644 index 0000000..84b0972 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_conditions.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.automation_rule_conditions_operator import ( + AutomationRuleConditionsOperator, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.automation_rule_conditions_filter_item import ( + AutomationRuleConditionsFilterItem, + ) + from ..models.automation_rule_conditions_rules_item import ( + AutomationRuleConditionsRulesItem, + ) + from ..models.automation_rule_scope import AutomationRuleScope + + +T = TypeVar("T", bound="AutomationRuleConditions") + + +@_attrs_define +class AutomationRuleConditions: + """ + Attributes: + operator (AutomationRuleConditionsOperator | Unset): Default: AutomationRuleConditionsOperator.AND. + filter_ (list[AutomationRuleConditionsFilterItem] | Unset): + scope (AutomationRuleScope | Unset): + rules (list[AutomationRuleConditionsRulesItem] | Unset): + """ + + operator: AutomationRuleConditionsOperator | Unset = ( + AutomationRuleConditionsOperator.AND + ) + filter_: list[AutomationRuleConditionsFilterItem] | Unset = UNSET + scope: AutomationRuleScope | Unset = UNSET + rules: list[AutomationRuleConditionsRulesItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + operator: str | Unset = UNSET + if not isinstance(self.operator, Unset): + operator = self.operator.value + + filter_: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.filter_, Unset): + filter_ = [] + for filter_item_data in self.filter_: + filter_item = filter_item_data.to_dict() + filter_.append(filter_item) + + scope: dict[str, Any] | Unset = UNSET + if not isinstance(self.scope, Unset): + scope = self.scope.to_dict() + + rules: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.rules, Unset): + rules = [] + for rules_item_data in self.rules: + rules_item = rules_item_data.to_dict() + rules.append(rules_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if operator is not UNSET: + field_dict["operator"] = operator + if filter_ is not UNSET: + field_dict["filter"] = filter_ + if scope is not UNSET: + field_dict["scope"] = scope + if rules is not UNSET: + field_dict["rules"] = rules + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.automation_rule_conditions_filter_item import ( + AutomationRuleConditionsFilterItem, + ) + from ..models.automation_rule_conditions_rules_item import ( + AutomationRuleConditionsRulesItem, + ) + from ..models.automation_rule_scope import AutomationRuleScope + + d = dict(src_dict) + _operator = d.pop("operator", UNSET) + operator: AutomationRuleConditionsOperator | Unset + if isinstance(_operator, Unset): + operator = UNSET + else: + operator = AutomationRuleConditionsOperator(_operator) + + _filter_ = d.pop("filter", UNSET) + filter_: list[AutomationRuleConditionsFilterItem] | Unset = UNSET + if _filter_ is not UNSET: + filter_ = [] + for filter_item_data in _filter_: + filter_item = AutomationRuleConditionsFilterItem.from_dict( + filter_item_data + ) + + filter_.append(filter_item) + + _scope = d.pop("scope", UNSET) + scope: AutomationRuleScope | Unset + if isinstance(_scope, Unset): + scope = UNSET + else: + scope = AutomationRuleScope.from_dict(_scope) + + _rules = d.pop("rules", UNSET) + rules: list[AutomationRuleConditionsRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = AutomationRuleConditionsRulesItem.from_dict( + rules_item_data + ) + + rules.append(rules_item) + + automation_rule_conditions = cls( + operator=operator, + filter_=filter_, + scope=scope, + rules=rules, + ) + + automation_rule_conditions.additional_properties = d + return automation_rule_conditions + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item.py b/python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item.py new file mode 100644 index 0000000..8429906 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.automation_rule_conditions_filter_item_filter_config import ( + AutomationRuleConditionsFilterItemFilterConfig, + ) + + +T = TypeVar("T", bound="AutomationRuleConditionsFilterItem") + + +@_attrs_define +class AutomationRuleConditionsFilterItem: + """ + Attributes: + column_id (str): Column or attribute id to filter on. + filter_config (AutomationRuleConditionsFilterItemFilterConfig): + display_name (str | Unset): Optional UI label for chips and saved views. + source (str | Unset): Optional source surface for mixed-source filters, for example traces, datasets, or + simulation. + output_type (str | Unset): Optional metric output type metadata used by eval and annotation filters. + """ + + column_id: str + filter_config: AutomationRuleConditionsFilterItemFilterConfig + display_name: str | Unset = UNSET + source: str | Unset = UNSET + output_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + filter_config = self.filter_config.to_dict() + + display_name = self.display_name + + source = self.source + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + "filter_config": filter_config, + } + ) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if source is not UNSET: + field_dict["source"] = source + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.automation_rule_conditions_filter_item_filter_config import ( + AutomationRuleConditionsFilterItemFilterConfig, + ) + + d = dict(src_dict) + column_id = d.pop("column_id") + + filter_config = AutomationRuleConditionsFilterItemFilterConfig.from_dict( + d.pop("filter_config") + ) + + display_name = d.pop("display_name", UNSET) + + source = d.pop("source", UNSET) + + output_type = d.pop("output_type", UNSET) + + automation_rule_conditions_filter_item = cls( + column_id=column_id, + filter_config=filter_config, + display_name=display_name, + source=source, + output_type=output_type, + ) + + return automation_rule_conditions_filter_item diff --git a/python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item_filter_config.py b/python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item_filter_config.py new file mode 100644 index 0000000..e70ff2c --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_conditions_filter_item_filter_config.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutomationRuleConditionsFilterItemFilterConfig") + + +@_attrs_define +class AutomationRuleConditionsFilterItemFilterConfig: + """ + Attributes: + filter_type (str): Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, + annotator, or array. + filter_op (str): Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, + not_in, between, not_between, is_null, or is_not_null. + filter_value (Any | Unset): Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + col_type (str | Unset): Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + """ + + filter_type: str + filter_op: str + filter_value: Any | Unset = UNSET + col_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + filter_type = self.filter_type + + filter_op = self.filter_op + + filter_value = self.filter_value + + col_type = self.col_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "filter_type": filter_type, + "filter_op": filter_op, + } + ) + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + if col_type is not UNSET: + field_dict["col_type"] = col_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + filter_type = d.pop("filter_type") + + filter_op = d.pop("filter_op") + + filter_value = d.pop("filter_value", UNSET) + + col_type = d.pop("col_type", UNSET) + + automation_rule_conditions_filter_item_filter_config = cls( + filter_type=filter_type, + filter_op=filter_op, + filter_value=filter_value, + col_type=col_type, + ) + + return automation_rule_conditions_filter_item_filter_config diff --git a/python/fi/generated/openapi_client/models/automation_rule_conditions_operator.py b/python/fi/generated/openapi_client/models/automation_rule_conditions_operator.py new file mode 100644 index 0000000..c7c8dc4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_conditions_operator.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class AutomationRuleConditionsOperator(str, Enum): + AND = "and" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/automation_rule_conditions_rules_item.py b/python/fi/generated/openapi_client/models/automation_rule_conditions_rules_item.py new file mode 100644 index 0000000..43f5078 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_conditions_rules_item.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutomationRuleConditionsRulesItem") + + +@_attrs_define +class AutomationRuleConditionsRulesItem: + """ + Attributes: + field (str): + op (str | Unset): Default: 'eq'. + value (Any | Unset): Rule comparison value. Can be a scalar, list, object, boolean, or null depending on the + operator. + """ + + field: str + op: str | Unset = "eq" + value: Any | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + field = self.field + + op = self.op + + value = self.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "field": field, + } + ) + if op is not UNSET: + field_dict["op"] = op + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + field = d.pop("field") + + op = d.pop("op", UNSET) + + value = d.pop("value", UNSET) + + automation_rule_conditions_rules_item = cls( + field=field, + op=op, + value=value, + ) + + return automation_rule_conditions_rules_item diff --git a/python/fi/generated/openapi_client/models/automation_rule_evaluate_accepted_response.py b/python/fi/generated/openapi_client/models/automation_rule_evaluate_accepted_response.py new file mode 100644 index 0000000..73baa4f --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_evaluate_accepted_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AutomationRuleEvaluateAcceptedResponse") + + +@_attrs_define +class AutomationRuleEvaluateAcceptedResponse: + """ + Attributes: + status (str): + workflow_id (str): + message (str): + """ + + status: str + workflow_id: str + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + workflow_id = self.workflow_id + + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "workflow_id": workflow_id, + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = d.pop("status") + + workflow_id = d.pop("workflow_id") + + message = d.pop("message") + + automation_rule_evaluate_accepted_response = cls( + status=status, + workflow_id=workflow_id, + message=message, + ) + + automation_rule_evaluate_accepted_response.additional_properties = d + return automation_rule_evaluate_accepted_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/automation_rule_evaluate_response.py b/python/fi/generated/openapi_client/models/automation_rule_evaluate_response.py new file mode 100644 index 0000000..f507bf4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_evaluate_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.automation_rule_evaluate_result import AutomationRuleEvaluateResult + + +T = TypeVar("T", bound="AutomationRuleEvaluateResponse") + + +@_attrs_define +class AutomationRuleEvaluateResponse: + """ + Attributes: + result (AutomationRuleEvaluateResult): + status (bool | Unset): Default: True. + """ + + result: AutomationRuleEvaluateResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.automation_rule_evaluate_result import ( + AutomationRuleEvaluateResult, + ) + + d = dict(src_dict) + result = AutomationRuleEvaluateResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + automation_rule_evaluate_response = cls( + result=result, + status=status, + ) + + automation_rule_evaluate_response.additional_properties = d + return automation_rule_evaluate_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/automation_rule_evaluate_result.py b/python/fi/generated/openapi_client/models/automation_rule_evaluate_result.py new file mode 100644 index 0000000..801caa4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_evaluate_result.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutomationRuleEvaluateResult") + + +@_attrs_define +class AutomationRuleEvaluateResult: + """ + Attributes: + matched (int): + added (int): + duplicates (int): + truncated (bool | Unset): + error (str | Unset): + """ + + matched: int + added: int + duplicates: int + truncated: bool | Unset = UNSET + error: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + matched = self.matched + + added = self.added + + duplicates = self.duplicates + + truncated = self.truncated + + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "matched": matched, + "added": added, + "duplicates": duplicates, + } + ) + if truncated is not UNSET: + field_dict["truncated"] = truncated + if error is not UNSET: + field_dict["error"] = error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + matched = d.pop("matched") + + added = d.pop("added") + + duplicates = d.pop("duplicates") + + truncated = d.pop("truncated", UNSET) + + error = d.pop("error", UNSET) + + automation_rule_evaluate_result = cls( + matched=matched, + added=added, + duplicates=duplicates, + truncated=truncated, + error=error, + ) + + automation_rule_evaluate_result.additional_properties = d + return automation_rule_evaluate_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/automation_rule_scope.py b/python/fi/generated/openapi_client/models/automation_rule_scope.py new file mode 100644 index 0000000..7958e9f --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_scope.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutomationRuleScope") + + +@_attrs_define +class AutomationRuleScope: + """ + Attributes: + dataset_id (UUID | Unset): + project_id (UUID | Unset): + is_voice_call (bool | Unset): + remove_simulation_calls (bool | Unset): + """ + + dataset_id: UUID | Unset = UNSET + project_id: UUID | Unset = UNSET + is_voice_call: bool | Unset = UNSET + remove_simulation_calls: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id: str | Unset = UNSET + if not isinstance(self.dataset_id, Unset): + dataset_id = str(self.dataset_id) + + project_id: str | Unset = UNSET + if not isinstance(self.project_id, Unset): + project_id = str(self.project_id) + + is_voice_call = self.is_voice_call + + remove_simulation_calls = self.remove_simulation_calls + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if project_id is not UNSET: + field_dict["project_id"] = project_id + if is_voice_call is not UNSET: + field_dict["is_voice_call"] = is_voice_call + if remove_simulation_calls is not UNSET: + field_dict["remove_simulation_calls"] = remove_simulation_calls + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _dataset_id = d.pop("dataset_id", UNSET) + dataset_id: UUID | Unset + if isinstance(_dataset_id, Unset): + dataset_id = UNSET + else: + dataset_id = UUID(_dataset_id) + + _project_id = d.pop("project_id", UNSET) + project_id: UUID | Unset + if isinstance(_project_id, Unset): + project_id = UNSET + else: + project_id = UUID(_project_id) + + is_voice_call = d.pop("is_voice_call", UNSET) + + remove_simulation_calls = d.pop("remove_simulation_calls", UNSET) + + automation_rule_scope = cls( + dataset_id=dataset_id, + project_id=project_id, + is_voice_call=is_voice_call, + remove_simulation_calls=remove_simulation_calls, + ) + + automation_rule_scope.additional_properties = d + return automation_rule_scope + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/automation_rule_source_type.py b/python/fi/generated/openapi_client/models/automation_rule_source_type.py new file mode 100644 index 0000000..f2c1176 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class AutomationRuleSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/automation_rule_trigger_frequency.py b/python/fi/generated/openapi_client/models/automation_rule_trigger_frequency.py new file mode 100644 index 0000000..27f2808 --- /dev/null +++ b/python/fi/generated/openapi_client/models/automation_rule_trigger_frequency.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AutomationRuleTriggerFrequency(str, Enum): + DAILY = "daily" + HOURLY = "hourly" + MANUAL = "manual" + MONTHLY = "monthly" + WEEKLY = "weekly" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/base_columns_response.py b/python/fi/generated/openapi_client/models/base_columns_response.py new file mode 100644 index 0000000..242131b --- /dev/null +++ b/python/fi/generated/openapi_client/models/base_columns_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.base_columns_response_result import BaseColumnsResponseResult + + +T = TypeVar("T", bound="BaseColumnsResponse") + + +@_attrs_define +class BaseColumnsResponse: + """ + Attributes: + status (bool): + result (BaseColumnsResponseResult): + """ + + status: bool + result: BaseColumnsResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.base_columns_response_result import BaseColumnsResponseResult + + d = dict(src_dict) + status = d.pop("status") + + result = BaseColumnsResponseResult.from_dict(d.pop("result")) + + base_columns_response = cls( + status=status, + result=result, + ) + + base_columns_response.additional_properties = d + return base_columns_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/base_columns_response_result.py b/python/fi/generated/openapi_client/models/base_columns_response_result.py new file mode 100644 index 0000000..3a3c5bd --- /dev/null +++ b/python/fi/generated/openapi_client/models/base_columns_response_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BaseColumnsResponseResult") + + +@_attrs_define +class BaseColumnsResponseResult: + """ + Attributes: + base_columns (list[str]): + """ + + base_columns: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + base_columns = self.base_columns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "base_columns": base_columns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + base_columns = cast(list[str], d.pop("base_columns")) + + base_columns_response_result = cls( + base_columns=base_columns, + ) + + base_columns_response_result.additional_properties = d + return base_columns_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_annotation_request.py b/python/fi/generated/openapi_client/models/bulk_annotation_annotation_request.py new file mode 100644 index 0000000..fed6d82 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_annotation_request.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkAnnotationAnnotationRequest") + + +@_attrs_define +class BulkAnnotationAnnotationRequest: + """ + Attributes: + annotation_label_id (UUID): + value (str | Unset): + value_float (float | Unset): + value_bool (bool | Unset): + value_str_list (list[str] | Unset): + """ + + annotation_label_id: UUID + value: str | Unset = UNSET + value_float: float | Unset = UNSET + value_bool: bool | Unset = UNSET + value_str_list: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + annotation_label_id = str(self.annotation_label_id) + + value = self.value + + value_float = self.value_float + + value_bool = self.value_bool + + value_str_list: list[str] | Unset = UNSET + if not isinstance(self.value_str_list, Unset): + value_str_list = self.value_str_list + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "annotation_label_id": annotation_label_id, + } + ) + if value is not UNSET: + field_dict["value"] = value + if value_float is not UNSET: + field_dict["value_float"] = value_float + if value_bool is not UNSET: + field_dict["value_bool"] = value_bool + if value_str_list is not UNSET: + field_dict["value_str_list"] = value_str_list + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + annotation_label_id = UUID(d.pop("annotation_label_id")) + + value = d.pop("value", UNSET) + + value_float = d.pop("value_float", UNSET) + + value_bool = d.pop("value_bool", UNSET) + + value_str_list = cast(list[str], d.pop("value_str_list", UNSET)) + + bulk_annotation_annotation_request = cls( + annotation_label_id=annotation_label_id, + value=value, + value_float=value_float, + value_bool=value_bool, + value_str_list=value_str_list, + ) + + bulk_annotation_annotation_request.additional_properties = d + return bulk_annotation_annotation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_note_request.py b/python/fi/generated/openapi_client/models/bulk_annotation_note_request.py new file mode 100644 index 0000000..7fab01b --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_note_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkAnnotationNoteRequest") + + +@_attrs_define +class BulkAnnotationNoteRequest: + """ + Attributes: + text (str): + """ + + text: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + text = self.text + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "text": text, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + text = d.pop("text") + + bulk_annotation_note_request = cls( + text=text, + ) + + bulk_annotation_note_request.additional_properties = d + return bulk_annotation_note_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_record_request.py b/python/fi/generated/openapi_client/models/bulk_annotation_record_request.py new file mode 100644 index 0000000..419a8a3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_record_request.py @@ -0,0 +1,119 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_annotation_annotation_request import ( + BulkAnnotationAnnotationRequest, + ) + from ..models.bulk_annotation_note_request import BulkAnnotationNoteRequest + + +T = TypeVar("T", bound="BulkAnnotationRecordRequest") + + +@_attrs_define +class BulkAnnotationRecordRequest: + """ + Attributes: + observation_span_id (str): + annotations (list[BulkAnnotationAnnotationRequest] | Unset): + notes (list[BulkAnnotationNoteRequest] | Unset): + """ + + observation_span_id: str + annotations: list[BulkAnnotationAnnotationRequest] | Unset = UNSET + notes: list[BulkAnnotationNoteRequest] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + observation_span_id = self.observation_span_id + + annotations: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.annotations, Unset): + annotations = [] + for annotations_item_data in self.annotations: + annotations_item = annotations_item_data.to_dict() + annotations.append(annotations_item) + + notes: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.notes, Unset): + notes = [] + for notes_item_data in self.notes: + notes_item = notes_item_data.to_dict() + notes.append(notes_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "observation_span_id": observation_span_id, + } + ) + if annotations is not UNSET: + field_dict["annotations"] = annotations + if notes is not UNSET: + field_dict["notes"] = notes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_annotation_annotation_request import ( + BulkAnnotationAnnotationRequest, + ) + from ..models.bulk_annotation_note_request import BulkAnnotationNoteRequest + + d = dict(src_dict) + observation_span_id = d.pop("observation_span_id") + + _annotations = d.pop("annotations", UNSET) + annotations: list[BulkAnnotationAnnotationRequest] | Unset = UNSET + if _annotations is not UNSET: + annotations = [] + for annotations_item_data in _annotations: + annotations_item = BulkAnnotationAnnotationRequest.from_dict( + annotations_item_data + ) + + annotations.append(annotations_item) + + _notes = d.pop("notes", UNSET) + notes: list[BulkAnnotationNoteRequest] | Unset = UNSET + if _notes is not UNSET: + notes = [] + for notes_item_data in _notes: + notes_item = BulkAnnotationNoteRequest.from_dict(notes_item_data) + + notes.append(notes_item) + + bulk_annotation_record_request = cls( + observation_span_id=observation_span_id, + annotations=annotations, + notes=notes, + ) + + bulk_annotation_record_request.additional_properties = d + return bulk_annotation_record_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_request.py b/python/fi/generated/openapi_client/models/bulk_annotation_request.py new file mode 100644 index 0000000..59f5a48 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_request.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_annotation_record_request import BulkAnnotationRecordRequest + + +T = TypeVar("T", bound="BulkAnnotationRequest") + + +@_attrs_define +class BulkAnnotationRequest: + """ + Attributes: + records (list[BulkAnnotationRecordRequest]): + """ + + records: list[BulkAnnotationRecordRequest] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + records = [] + for records_item_data in self.records: + records_item = records_item_data.to_dict() + records.append(records_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "records": records, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_annotation_record_request import BulkAnnotationRecordRequest + + d = dict(src_dict) + records = [] + _records = d.pop("records") + for records_item_data in _records: + records_item = BulkAnnotationRecordRequest.from_dict(records_item_data) + + records.append(records_item) + + bulk_annotation_request = cls( + records=records, + ) + + bulk_annotation_request.additional_properties = d + return bulk_annotation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_response.py b/python/fi/generated/openapi_client/models/bulk_annotation_response.py new file mode 100644 index 0000000..508293b --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_annotation_response_result import BulkAnnotationResponseResult + + +T = TypeVar("T", bound="BulkAnnotationResponse") + + +@_attrs_define +class BulkAnnotationResponse: + """ + Attributes: + result (BulkAnnotationResponseResult): + status (bool | Unset): Default: True. + """ + + result: BulkAnnotationResponseResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_annotation_response_result import ( + BulkAnnotationResponseResult, + ) + + d = dict(src_dict) + result = BulkAnnotationResponseResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + bulk_annotation_response = cls( + result=result, + status=status, + ) + + bulk_annotation_response.additional_properties = d + return bulk_annotation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_response_result.py b/python/fi/generated/openapi_client/models/bulk_annotation_response_result.py new file mode 100644 index 0000000..ce1b2d3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_response_result.py @@ -0,0 +1,221 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_annotation_response_result_errors_type_0_item import ( + BulkAnnotationResponseResultErrorsType0Item, + ) + from ..models.bulk_annotation_response_result_warnings_type_0_item import ( + BulkAnnotationResponseResultWarningsType0Item, + ) + + +T = TypeVar("T", bound="BulkAnnotationResponseResult") + + +@_attrs_define +class BulkAnnotationResponseResult: + """ + Attributes: + message (str): + annotations_created (int): + annotations_updated (int): + notes_created (int): + succeeded_count (int): + errors_count (int): + warnings_count (int): + warnings (list[BulkAnnotationResponseResultWarningsType0Item] | None | Unset): + errors (list[BulkAnnotationResponseResultErrorsType0Item] | None | Unset): + """ + + message: str + annotations_created: int + annotations_updated: int + notes_created: int + succeeded_count: int + errors_count: int + warnings_count: int + warnings: list[BulkAnnotationResponseResultWarningsType0Item] | None | Unset = UNSET + errors: list[BulkAnnotationResponseResultErrorsType0Item] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + annotations_created = self.annotations_created + + annotations_updated = self.annotations_updated + + notes_created = self.notes_created + + succeeded_count = self.succeeded_count + + errors_count = self.errors_count + + warnings_count = self.warnings_count + + warnings: list[dict[str, Any]] | None | Unset + if isinstance(self.warnings, Unset): + warnings = UNSET + elif isinstance(self.warnings, list): + warnings = [] + for warnings_type_0_item_data in self.warnings: + warnings_type_0_item = warnings_type_0_item_data.to_dict() + warnings.append(warnings_type_0_item) + + else: + warnings = self.warnings + + errors: list[dict[str, Any]] | None | Unset + if isinstance(self.errors, Unset): + errors = UNSET + elif isinstance(self.errors, list): + errors = [] + for errors_type_0_item_data in self.errors: + errors_type_0_item = errors_type_0_item_data.to_dict() + errors.append(errors_type_0_item) + + else: + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "annotations_created": annotations_created, + "annotations_updated": annotations_updated, + "notes_created": notes_created, + "succeeded_count": succeeded_count, + "errors_count": errors_count, + "warnings_count": warnings_count, + } + ) + if warnings is not UNSET: + field_dict["warnings"] = warnings + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_annotation_response_result_errors_type_0_item import ( + BulkAnnotationResponseResultErrorsType0Item, + ) + from ..models.bulk_annotation_response_result_warnings_type_0_item import ( + BulkAnnotationResponseResultWarningsType0Item, + ) + + d = dict(src_dict) + message = d.pop("message") + + annotations_created = d.pop("annotations_created") + + annotations_updated = d.pop("annotations_updated") + + notes_created = d.pop("notes_created") + + succeeded_count = d.pop("succeeded_count") + + errors_count = d.pop("errors_count") + + warnings_count = d.pop("warnings_count") + + def _parse_warnings( + data: object, + ) -> list[BulkAnnotationResponseResultWarningsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + warnings_type_0 = [] + _warnings_type_0 = data + for warnings_type_0_item_data in _warnings_type_0: + warnings_type_0_item = ( + BulkAnnotationResponseResultWarningsType0Item.from_dict( + warnings_type_0_item_data + ) + ) + + warnings_type_0.append(warnings_type_0_item) + + return warnings_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[BulkAnnotationResponseResultWarningsType0Item] | None | Unset, data + ) + + warnings = _parse_warnings(d.pop("warnings", UNSET)) + + def _parse_errors( + data: object, + ) -> list[BulkAnnotationResponseResultErrorsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + errors_type_0 = [] + _errors_type_0 = data + for errors_type_0_item_data in _errors_type_0: + errors_type_0_item = ( + BulkAnnotationResponseResultErrorsType0Item.from_dict( + errors_type_0_item_data + ) + ) + + errors_type_0.append(errors_type_0_item) + + return errors_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[BulkAnnotationResponseResultErrorsType0Item] | None | Unset, data + ) + + errors = _parse_errors(d.pop("errors", UNSET)) + + bulk_annotation_response_result = cls( + message=message, + annotations_created=annotations_created, + annotations_updated=annotations_updated, + notes_created=notes_created, + succeeded_count=succeeded_count, + errors_count=errors_count, + warnings_count=warnings_count, + warnings=warnings, + errors=errors, + ) + + bulk_annotation_response_result.additional_properties = d + return bulk_annotation_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_response_result_errors_type_0_item.py b/python/fi/generated/openapi_client/models/bulk_annotation_response_result_errors_type_0_item.py new file mode 100644 index 0000000..911cb53 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_response_result_errors_type_0_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkAnnotationResponseResultErrorsType0Item") + + +@_attrs_define +class BulkAnnotationResponseResultErrorsType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + bulk_annotation_response_result_errors_type_0_item = cls() + + bulk_annotation_response_result_errors_type_0_item.additional_properties = d + return bulk_annotation_response_result_errors_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_annotation_response_result_warnings_type_0_item.py b/python/fi/generated/openapi_client/models/bulk_annotation_response_result_warnings_type_0_item.py new file mode 100644 index 0000000..250b465 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_annotation_response_result_warnings_type_0_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkAnnotationResponseResultWarningsType0Item") + + +@_attrs_define +class BulkAnnotationResponseResultWarningsType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + bulk_annotation_response_result_warnings_type_0_item = cls() + + bulk_annotation_response_result_warnings_type_0_item.additional_properties = d + return bulk_annotation_response_result_warnings_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_create_score_item.py b/python/fi/generated/openapi_client/models/bulk_create_score_item.py new file mode 100644 index 0000000..fd18662 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_create_score_item.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.bulk_create_score_item_score_source import BulkCreateScoreItemScoreSource +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_create_score_item_value import BulkCreateScoreItemValue + + +T = TypeVar("T", bound="BulkCreateScoreItem") + + +@_attrs_define +class BulkCreateScoreItem: + """ + Attributes: + label_id (UUID): + value (BulkCreateScoreItemValue): + notes (str | Unset): Default: ''. + score_source (BulkCreateScoreItemScoreSource | Unset): Default: BulkCreateScoreItemScoreSource.HUMAN. + """ + + label_id: UUID + value: BulkCreateScoreItemValue + notes: str | Unset = "" + score_source: BulkCreateScoreItemScoreSource | Unset = ( + BulkCreateScoreItemScoreSource.HUMAN + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label_id = str(self.label_id) + + value = self.value.to_dict() + + notes = self.notes + + score_source: str | Unset = UNSET + if not isinstance(self.score_source, Unset): + score_source = self.score_source.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label_id": label_id, + "value": value, + } + ) + if notes is not UNSET: + field_dict["notes"] = notes + if score_source is not UNSET: + field_dict["score_source"] = score_source + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_create_score_item_value import BulkCreateScoreItemValue + + d = dict(src_dict) + label_id = UUID(d.pop("label_id")) + + value = BulkCreateScoreItemValue.from_dict(d.pop("value")) + + notes = d.pop("notes", UNSET) + + _score_source = d.pop("score_source", UNSET) + score_source: BulkCreateScoreItemScoreSource | Unset + if isinstance(_score_source, Unset): + score_source = UNSET + else: + score_source = BulkCreateScoreItemScoreSource(_score_source) + + bulk_create_score_item = cls( + label_id=label_id, + value=value, + notes=notes, + score_source=score_source, + ) + + bulk_create_score_item.additional_properties = d + return bulk_create_score_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_create_score_item_score_source.py b/python/fi/generated/openapi_client/models/bulk_create_score_item_score_source.py new file mode 100644 index 0000000..2df571a --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_create_score_item_score_source.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class BulkCreateScoreItemScoreSource(str, Enum): + API = "api" + AUTO = "auto" + HUMAN = "human" + IMPORTED = "imported" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/bulk_create_score_item_value.py b/python/fi/generated/openapi_client/models/bulk_create_score_item_value.py new file mode 100644 index 0000000..52625b5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_create_score_item_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkCreateScoreItemValue") + + +@_attrs_define +class BulkCreateScoreItemValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + bulk_create_score_item_value = cls() + + bulk_create_score_item_value.additional_properties = d + return bulk_create_score_item_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_create_scores.py b/python/fi/generated/openapi_client/models/bulk_create_scores.py new file mode 100644 index 0000000..4866d74 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_create_scores.py @@ -0,0 +1,176 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.bulk_create_scores_source_type import BulkCreateScoresSourceType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_create_score_item import BulkCreateScoreItem + + +T = TypeVar("T", bound="BulkCreateScores") + + +@_attrs_define +class BulkCreateScores: + """ + Attributes: + source_type (BulkCreateScoresSourceType): + source_id (str): + scores (list[BulkCreateScoreItem]): + notes (str | Unset): Default: ''. + span_notes (None | str | Unset): + span_notes_source_id (None | str | Unset): + queue_item_id (None | Unset | UUID): + """ + + source_type: BulkCreateScoresSourceType + source_id: str + scores: list[BulkCreateScoreItem] + notes: str | Unset = "" + span_notes: None | str | Unset = UNSET + span_notes_source_id: None | str | Unset = UNSET + queue_item_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_type = self.source_type.value + + source_id = self.source_id + + scores = [] + for scores_item_data in self.scores: + scores_item = scores_item_data.to_dict() + scores.append(scores_item) + + notes = self.notes + + span_notes: None | str | Unset + if isinstance(self.span_notes, Unset): + span_notes = UNSET + else: + span_notes = self.span_notes + + span_notes_source_id: None | str | Unset + if isinstance(self.span_notes_source_id, Unset): + span_notes_source_id = UNSET + else: + span_notes_source_id = self.span_notes_source_id + + queue_item_id: None | str | Unset + if isinstance(self.queue_item_id, Unset): + queue_item_id = UNSET + elif isinstance(self.queue_item_id, UUID): + queue_item_id = str(self.queue_item_id) + else: + queue_item_id = self.queue_item_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source_type": source_type, + "source_id": source_id, + "scores": scores, + } + ) + if notes is not UNSET: + field_dict["notes"] = notes + if span_notes is not UNSET: + field_dict["span_notes"] = span_notes + if span_notes_source_id is not UNSET: + field_dict["span_notes_source_id"] = span_notes_source_id + if queue_item_id is not UNSET: + field_dict["queue_item_id"] = queue_item_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_create_score_item import BulkCreateScoreItem + + d = dict(src_dict) + source_type = BulkCreateScoresSourceType(d.pop("source_type")) + + source_id = d.pop("source_id") + + scores = [] + _scores = d.pop("scores") + for scores_item_data in _scores: + scores_item = BulkCreateScoreItem.from_dict(scores_item_data) + + scores.append(scores_item) + + notes = d.pop("notes", UNSET) + + def _parse_span_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + span_notes = _parse_span_notes(d.pop("span_notes", UNSET)) + + def _parse_span_notes_source_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + span_notes_source_id = _parse_span_notes_source_id( + d.pop("span_notes_source_id", UNSET) + ) + + def _parse_queue_item_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + queue_item_id_type_0 = UUID(data) + + return queue_item_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + queue_item_id = _parse_queue_item_id(d.pop("queue_item_id", UNSET)) + + bulk_create_scores = cls( + source_type=source_type, + source_id=source_id, + scores=scores, + notes=notes, + span_notes=span_notes, + span_notes_source_id=span_notes_source_id, + queue_item_id=queue_item_id, + ) + + bulk_create_scores.additional_properties = d + return bulk_create_scores + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_create_scores_response.py b/python/fi/generated/openapi_client/models/bulk_create_scores_response.py new file mode 100644 index 0000000..d10f3e1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_create_scores_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_create_scores_result import BulkCreateScoresResult + + +T = TypeVar("T", bound="BulkCreateScoresResponse") + + +@_attrs_define +class BulkCreateScoresResponse: + """ + Attributes: + result (BulkCreateScoresResult): + status (bool | Unset): Default: True. + """ + + result: BulkCreateScoresResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_create_scores_result import BulkCreateScoresResult + + d = dict(src_dict) + result = BulkCreateScoresResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + bulk_create_scores_response = cls( + result=result, + status=status, + ) + + bulk_create_scores_response.additional_properties = d + return bulk_create_scores_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_create_scores_result.py b/python/fi/generated/openapi_client/models/bulk_create_scores_result.py new file mode 100644 index 0000000..69894d6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_create_scores_result.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.score import Score + + +T = TypeVar("T", bound="BulkCreateScoresResult") + + +@_attrs_define +class BulkCreateScoresResult: + """ + Attributes: + scores (list[Score]): + errors (list[str]): + """ + + scores: list[Score] + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + scores = [] + for scores_item_data in self.scores: + scores_item = scores_item_data.to_dict() + scores.append(scores_item) + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "scores": scores, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.score import Score + + d = dict(src_dict) + scores = [] + _scores = d.pop("scores") + for scores_item_data in _scores: + scores_item = Score.from_dict(scores_item_data) + + scores.append(scores_item) + + errors = cast(list[str], d.pop("errors")) + + bulk_create_scores_result = cls( + scores=scores, + errors=errors, + ) + + bulk_create_scores_result.additional_properties = d + return bulk_create_scores_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/bulk_create_scores_source_type.py b/python/fi/generated/openapi_client/models/bulk_create_scores_source_type.py new file mode 100644 index 0000000..e7ce326 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_create_scores_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class BulkCreateScoresSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/bulk_remove_items.py b/python/fi/generated/openapi_client/models/bulk_remove_items.py new file mode 100644 index 0000000..27712d3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/bulk_remove_items.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkRemoveItems") + + +@_attrs_define +class BulkRemoveItems: + """ + Attributes: + item_ids (list[UUID]): + """ + + item_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + item_ids = [] + for item_ids_item_data in self.item_ids: + item_ids_item = str(item_ids_item_data) + item_ids.append(item_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "item_ids": item_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + item_ids = [] + _item_ids = d.pop("item_ids") + for item_ids_item_data in _item_ids: + item_ids_item = UUID(item_ids_item_data) + + item_ids.append(item_ids_item) + + bulk_remove_items = cls( + item_ids=item_ids, + ) + + bulk_remove_items.additional_properties = d + return bulk_remove_items + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_branch_analysis_response.py b/python/fi/generated/openapi_client/models/call_branch_analysis_response.py new file mode 100644 index 0000000..c7bdc44 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_branch_analysis_response.py @@ -0,0 +1,163 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_branch_analysis_response_analysis import ( + CallBranchAnalysisResponseAnalysis, + ) + + +T = TypeVar("T", bound="CallBranchAnalysisResponse") + + +@_attrs_define +class CallBranchAnalysisResponse: + """ + Attributes: + call_execution_id (UUID | Unset): + scenario_id (None | Unset | UUID): + scenario_name (None | str | Unset): + analysis (CallBranchAnalysisResponseAnalysis | Unset): + analyzed_at (datetime.datetime | Unset): + """ + + call_execution_id: UUID | Unset = UNSET + scenario_id: None | Unset | UUID = UNSET + scenario_name: None | str | Unset = UNSET + analysis: CallBranchAnalysisResponseAnalysis | Unset = UNSET + analyzed_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id: str | Unset = UNSET + if not isinstance(self.call_execution_id, Unset): + call_execution_id = str(self.call_execution_id) + + scenario_id: None | str | Unset + if isinstance(self.scenario_id, Unset): + scenario_id = UNSET + elif isinstance(self.scenario_id, UUID): + scenario_id = str(self.scenario_id) + else: + scenario_id = self.scenario_id + + scenario_name: None | str | Unset + if isinstance(self.scenario_name, Unset): + scenario_name = UNSET + else: + scenario_name = self.scenario_name + + analysis: dict[str, Any] | Unset = UNSET + if not isinstance(self.analysis, Unset): + analysis = self.analysis.to_dict() + + analyzed_at: str | Unset = UNSET + if not isinstance(self.analyzed_at, Unset): + analyzed_at = self.analyzed_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if call_execution_id is not UNSET: + field_dict["call_execution_id"] = call_execution_id + if scenario_id is not UNSET: + field_dict["scenario_id"] = scenario_id + if scenario_name is not UNSET: + field_dict["scenario_name"] = scenario_name + if analysis is not UNSET: + field_dict["analysis"] = analysis + if analyzed_at is not UNSET: + field_dict["analyzed_at"] = analyzed_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_branch_analysis_response_analysis import ( + CallBranchAnalysisResponseAnalysis, + ) + + d = dict(src_dict) + _call_execution_id = d.pop("call_execution_id", UNSET) + call_execution_id: UUID | Unset + if isinstance(_call_execution_id, Unset): + call_execution_id = UNSET + else: + call_execution_id = UUID(_call_execution_id) + + def _parse_scenario_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + scenario_id_type_0 = UUID(data) + + return scenario_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + scenario_id = _parse_scenario_id(d.pop("scenario_id", UNSET)) + + def _parse_scenario_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scenario_name = _parse_scenario_name(d.pop("scenario_name", UNSET)) + + _analysis = d.pop("analysis", UNSET) + analysis: CallBranchAnalysisResponseAnalysis | Unset + if isinstance(_analysis, Unset): + analysis = UNSET + else: + analysis = CallBranchAnalysisResponseAnalysis.from_dict(_analysis) + + _analyzed_at = d.pop("analyzed_at", UNSET) + analyzed_at: datetime.datetime | Unset + if isinstance(_analyzed_at, Unset): + analyzed_at = UNSET + else: + analyzed_at = isoparse(_analyzed_at) + + call_branch_analysis_response = cls( + call_execution_id=call_execution_id, + scenario_id=scenario_id, + scenario_name=scenario_name, + analysis=analysis, + analyzed_at=analyzed_at, + ) + + call_branch_analysis_response.additional_properties = d + return call_branch_analysis_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_branch_analysis_response_analysis.py b/python/fi/generated/openapi_client/models/call_branch_analysis_response_analysis.py new file mode 100644 index 0000000..766acab --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_branch_analysis_response_analysis.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallBranchAnalysisResponseAnalysis") + + +@_attrs_define +class CallBranchAnalysisResponseAnalysis: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_branch_analysis_response_analysis = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + call_branch_analysis_response_analysis.additional_properties = ( + additional_properties + ) + return call_branch_analysis_response_analysis + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_branch_deviation_create_response.py b/python/fi/generated/openapi_client/models/call_branch_deviation_create_response.py new file mode 100644 index 0000000..cb31c3f --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_branch_deviation_create_response.py @@ -0,0 +1,122 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_branch_deviation_create_response_deviation_data import ( + CallBranchDeviationCreateResponseDeviationData, + ) + + +T = TypeVar("T", bound="CallBranchDeviationCreateResponse") + + +@_attrs_define +class CallBranchDeviationCreateResponse: + """ + Attributes: + call_execution_id (UUID | Unset): + scenario_graph_id (UUID | Unset): + deviation_data (CallBranchDeviationCreateResponseDeviationData | Unset): + message (str | Unset): + """ + + call_execution_id: UUID | Unset = UNSET + scenario_graph_id: UUID | Unset = UNSET + deviation_data: CallBranchDeviationCreateResponseDeviationData | Unset = UNSET + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id: str | Unset = UNSET + if not isinstance(self.call_execution_id, Unset): + call_execution_id = str(self.call_execution_id) + + scenario_graph_id: str | Unset = UNSET + if not isinstance(self.scenario_graph_id, Unset): + scenario_graph_id = str(self.scenario_graph_id) + + deviation_data: dict[str, Any] | Unset = UNSET + if not isinstance(self.deviation_data, Unset): + deviation_data = self.deviation_data.to_dict() + + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if call_execution_id is not UNSET: + field_dict["call_execution_id"] = call_execution_id + if scenario_graph_id is not UNSET: + field_dict["scenario_graph_id"] = scenario_graph_id + if deviation_data is not UNSET: + field_dict["deviation_data"] = deviation_data + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_branch_deviation_create_response_deviation_data import ( + CallBranchDeviationCreateResponseDeviationData, + ) + + d = dict(src_dict) + _call_execution_id = d.pop("call_execution_id", UNSET) + call_execution_id: UUID | Unset + if isinstance(_call_execution_id, Unset): + call_execution_id = UNSET + else: + call_execution_id = UUID(_call_execution_id) + + _scenario_graph_id = d.pop("scenario_graph_id", UNSET) + scenario_graph_id: UUID | Unset + if isinstance(_scenario_graph_id, Unset): + scenario_graph_id = UNSET + else: + scenario_graph_id = UUID(_scenario_graph_id) + + _deviation_data = d.pop("deviation_data", UNSET) + deviation_data: CallBranchDeviationCreateResponseDeviationData | Unset + if isinstance(_deviation_data, Unset): + deviation_data = UNSET + else: + deviation_data = CallBranchDeviationCreateResponseDeviationData.from_dict( + _deviation_data + ) + + message = d.pop("message", UNSET) + + call_branch_deviation_create_response = cls( + call_execution_id=call_execution_id, + scenario_graph_id=scenario_graph_id, + deviation_data=deviation_data, + message=message, + ) + + call_branch_deviation_create_response.additional_properties = d + return call_branch_deviation_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_branch_deviation_create_response_deviation_data.py b/python/fi/generated/openapi_client/models/call_branch_deviation_create_response_deviation_data.py new file mode 100644 index 0000000..ac9b43e --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_branch_deviation_create_response_deviation_data.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallBranchDeviationCreateResponseDeviationData") + + +@_attrs_define +class CallBranchDeviationCreateResponseDeviationData: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_branch_deviation_create_response_deviation_data = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + call_branch_deviation_create_response_deviation_data.additional_properties = ( + additional_properties + ) + return call_branch_deviation_create_response_deviation_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution.py b/python/fi/generated/openapi_client/models/call_execution.py new file mode 100644 index 0000000..c60d958 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution.py @@ -0,0 +1,841 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.call_execution_simulation_call_type import CallExecutionSimulationCallType +from ..models.call_execution_status import CallExecutionStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_execution_analysis_data import CallExecutionAnalysisData + from ..models.call_execution_call_metadata import CallExecutionCallMetadata + from ..models.call_execution_eval_outputs import CallExecutionEvalOutputs + from ..models.call_execution_evaluation_data import CallExecutionEvaluationData + from ..models.call_execution_provider_call_data import CallExecutionProviderCallData + + +T = TypeVar("T", bound="CallExecution") + + +@_attrs_define +class CallExecution: + """ + Attributes: + id (UUID | Unset): + phone_number (None | str | Unset): Phone number called (null for TEXT/chat simulations) + service_provider_call_id (str | Unset): + status (CallExecutionStatus | Unset): Current status of the call + started_at (datetime.datetime | None | Unset): When the call started + completed_at (datetime.datetime | None | Unset): When the call completed + duration_seconds (int | None | Unset): Duration of the call in seconds + recording_url (None | str | Unset): URL to the call recording + cost_cents (int | None | Unset): Cost of the call in cents + call_metadata (CallExecutionCallMetadata | Unset): Additional metadata about the call + error_message (None | str | Unset): Error message if the call failed + scenario_name (str | Unset): + transcripts (str | Unset): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + provider_call_data (CallExecutionProviderCallData | Unset): Complete call data from the provider. Format: + dict[provider_name, data] where provider_name must be from SupportedProviders + stereo_recording_url (None | str | Unset): Stereo recording URL from Vapi + ended_reason (None | str | Unset): Reason why the call ended + stt_cost_cents (int | None | Unset): STT cost in cents + llm_cost_cents (int | None | Unset): LLM cost in cents + tts_cost_cents (int | None | Unset): TTS cost in cents + overall_score (float | None | Unset): Overall call performance score + response_time_ms (int | None | Unset): Average response time in milliseconds + response_time_seconds (str | Unset): + assistant_id (None | str | Unset): Assistant ID used for the call (system side) + customer_number (None | str | Unset): Customer phone number (E.164 format) + call_type (None | str | Unset): Type of call (e.g., outboundPhoneCall) + ended_at (datetime.datetime | None | Unset): When the call ended + analysis_data (CallExecutionAnalysisData | Unset): Call analysis data from the service provider + evaluation_data (CallExecutionEvaluationData | Unset): Call evaluation data from the service provider + message_count (int | None | Unset): Number of messages in the call + transcript_available (bool | Unset): Whether transcript is available + recording_available (bool | Unset): Whether recording is available + eval_outputs (CallExecutionEvalOutputs | Unset): Evaluation output + error_localizer_tasks (str | Unset): + call_summary (None | str | Unset): Call summary from the service + agent_version (None | Unset | UUID): + customer_cost_cents (int | None | Unset): Total customer-reported cost in cents + system_metrics (str | Unset): + cost_breakdown (str | Unset): + customer_call_id (None | str | Unset): Customer call ID if available + simulation_call_type (CallExecutionSimulationCallType | Unset): Type of simulation call + processing_skipped (str | Unset): + processing_skip_reason (str | Unset): + """ + + id: UUID | Unset = UNSET + phone_number: None | str | Unset = UNSET + service_provider_call_id: str | Unset = UNSET + status: CallExecutionStatus | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + completed_at: datetime.datetime | None | Unset = UNSET + duration_seconds: int | None | Unset = UNSET + recording_url: None | str | Unset = UNSET + cost_cents: int | None | Unset = UNSET + call_metadata: CallExecutionCallMetadata | Unset = UNSET + error_message: None | str | Unset = UNSET + scenario_name: str | Unset = UNSET + transcripts: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + provider_call_data: CallExecutionProviderCallData | Unset = UNSET + stereo_recording_url: None | str | Unset = UNSET + ended_reason: None | str | Unset = UNSET + stt_cost_cents: int | None | Unset = UNSET + llm_cost_cents: int | None | Unset = UNSET + tts_cost_cents: int | None | Unset = UNSET + overall_score: float | None | Unset = UNSET + response_time_ms: int | None | Unset = UNSET + response_time_seconds: str | Unset = UNSET + assistant_id: None | str | Unset = UNSET + customer_number: None | str | Unset = UNSET + call_type: None | str | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + analysis_data: CallExecutionAnalysisData | Unset = UNSET + evaluation_data: CallExecutionEvaluationData | Unset = UNSET + message_count: int | None | Unset = UNSET + transcript_available: bool | Unset = UNSET + recording_available: bool | Unset = UNSET + eval_outputs: CallExecutionEvalOutputs | Unset = UNSET + error_localizer_tasks: str | Unset = UNSET + call_summary: None | str | Unset = UNSET + agent_version: None | Unset | UUID = UNSET + customer_cost_cents: int | None | Unset = UNSET + system_metrics: str | Unset = UNSET + cost_breakdown: str | Unset = UNSET + customer_call_id: None | str | Unset = UNSET + simulation_call_type: CallExecutionSimulationCallType | Unset = UNSET + processing_skipped: str | Unset = UNSET + processing_skip_reason: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + phone_number: None | str | Unset + if isinstance(self.phone_number, Unset): + phone_number = UNSET + else: + phone_number = self.phone_number + + service_provider_call_id = self.service_provider_call_id + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + elif isinstance(self.completed_at, datetime.datetime): + completed_at = self.completed_at.isoformat() + else: + completed_at = self.completed_at + + duration_seconds: int | None | Unset + if isinstance(self.duration_seconds, Unset): + duration_seconds = UNSET + else: + duration_seconds = self.duration_seconds + + recording_url: None | str | Unset + if isinstance(self.recording_url, Unset): + recording_url = UNSET + else: + recording_url = self.recording_url + + cost_cents: int | None | Unset + if isinstance(self.cost_cents, Unset): + cost_cents = UNSET + else: + cost_cents = self.cost_cents + + call_metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.call_metadata, Unset): + call_metadata = self.call_metadata.to_dict() + + error_message: None | str | Unset + if isinstance(self.error_message, Unset): + error_message = UNSET + else: + error_message = self.error_message + + scenario_name = self.scenario_name + + transcripts = self.transcripts + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + provider_call_data: dict[str, Any] | Unset = UNSET + if not isinstance(self.provider_call_data, Unset): + provider_call_data = self.provider_call_data.to_dict() + + stereo_recording_url: None | str | Unset + if isinstance(self.stereo_recording_url, Unset): + stereo_recording_url = UNSET + else: + stereo_recording_url = self.stereo_recording_url + + ended_reason: None | str | Unset + if isinstance(self.ended_reason, Unset): + ended_reason = UNSET + else: + ended_reason = self.ended_reason + + stt_cost_cents: int | None | Unset + if isinstance(self.stt_cost_cents, Unset): + stt_cost_cents = UNSET + else: + stt_cost_cents = self.stt_cost_cents + + llm_cost_cents: int | None | Unset + if isinstance(self.llm_cost_cents, Unset): + llm_cost_cents = UNSET + else: + llm_cost_cents = self.llm_cost_cents + + tts_cost_cents: int | None | Unset + if isinstance(self.tts_cost_cents, Unset): + tts_cost_cents = UNSET + else: + tts_cost_cents = self.tts_cost_cents + + overall_score: float | None | Unset + if isinstance(self.overall_score, Unset): + overall_score = UNSET + else: + overall_score = self.overall_score + + response_time_ms: int | None | Unset + if isinstance(self.response_time_ms, Unset): + response_time_ms = UNSET + else: + response_time_ms = self.response_time_ms + + response_time_seconds = self.response_time_seconds + + assistant_id: None | str | Unset + if isinstance(self.assistant_id, Unset): + assistant_id = UNSET + else: + assistant_id = self.assistant_id + + customer_number: None | str | Unset + if isinstance(self.customer_number, Unset): + customer_number = UNSET + else: + customer_number = self.customer_number + + call_type: None | str | Unset + if isinstance(self.call_type, Unset): + call_type = UNSET + else: + call_type = self.call_type + + ended_at: None | str | Unset + if isinstance(self.ended_at, Unset): + ended_at = UNSET + elif isinstance(self.ended_at, datetime.datetime): + ended_at = self.ended_at.isoformat() + else: + ended_at = self.ended_at + + analysis_data: dict[str, Any] | Unset = UNSET + if not isinstance(self.analysis_data, Unset): + analysis_data = self.analysis_data.to_dict() + + evaluation_data: dict[str, Any] | Unset = UNSET + if not isinstance(self.evaluation_data, Unset): + evaluation_data = self.evaluation_data.to_dict() + + message_count: int | None | Unset + if isinstance(self.message_count, Unset): + message_count = UNSET + else: + message_count = self.message_count + + transcript_available = self.transcript_available + + recording_available = self.recording_available + + eval_outputs: dict[str, Any] | Unset = UNSET + if not isinstance(self.eval_outputs, Unset): + eval_outputs = self.eval_outputs.to_dict() + + error_localizer_tasks = self.error_localizer_tasks + + call_summary: None | str | Unset + if isinstance(self.call_summary, Unset): + call_summary = UNSET + else: + call_summary = self.call_summary + + agent_version: None | str | Unset + if isinstance(self.agent_version, Unset): + agent_version = UNSET + elif isinstance(self.agent_version, UUID): + agent_version = str(self.agent_version) + else: + agent_version = self.agent_version + + customer_cost_cents: int | None | Unset + if isinstance(self.customer_cost_cents, Unset): + customer_cost_cents = UNSET + else: + customer_cost_cents = self.customer_cost_cents + + system_metrics = self.system_metrics + + cost_breakdown = self.cost_breakdown + + customer_call_id: None | str | Unset + if isinstance(self.customer_call_id, Unset): + customer_call_id = UNSET + else: + customer_call_id = self.customer_call_id + + simulation_call_type: str | Unset = UNSET + if not isinstance(self.simulation_call_type, Unset): + simulation_call_type = self.simulation_call_type.value + + processing_skipped = self.processing_skipped + + processing_skip_reason = self.processing_skip_reason + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if phone_number is not UNSET: + field_dict["phone_number"] = phone_number + if service_provider_call_id is not UNSET: + field_dict["service_provider_call_id"] = service_provider_call_id + if status is not UNSET: + field_dict["status"] = status + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if duration_seconds is not UNSET: + field_dict["duration_seconds"] = duration_seconds + if recording_url is not UNSET: + field_dict["recording_url"] = recording_url + if cost_cents is not UNSET: + field_dict["cost_cents"] = cost_cents + if call_metadata is not UNSET: + field_dict["call_metadata"] = call_metadata + if error_message is not UNSET: + field_dict["error_message"] = error_message + if scenario_name is not UNSET: + field_dict["scenario_name"] = scenario_name + if transcripts is not UNSET: + field_dict["transcripts"] = transcripts + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if provider_call_data is not UNSET: + field_dict["provider_call_data"] = provider_call_data + if stereo_recording_url is not UNSET: + field_dict["stereo_recording_url"] = stereo_recording_url + if ended_reason is not UNSET: + field_dict["ended_reason"] = ended_reason + if stt_cost_cents is not UNSET: + field_dict["stt_cost_cents"] = stt_cost_cents + if llm_cost_cents is not UNSET: + field_dict["llm_cost_cents"] = llm_cost_cents + if tts_cost_cents is not UNSET: + field_dict["tts_cost_cents"] = tts_cost_cents + if overall_score is not UNSET: + field_dict["overall_score"] = overall_score + if response_time_ms is not UNSET: + field_dict["response_time_ms"] = response_time_ms + if response_time_seconds is not UNSET: + field_dict["response_time_seconds"] = response_time_seconds + if assistant_id is not UNSET: + field_dict["assistant_id"] = assistant_id + if customer_number is not UNSET: + field_dict["customer_number"] = customer_number + if call_type is not UNSET: + field_dict["call_type"] = call_type + if ended_at is not UNSET: + field_dict["ended_at"] = ended_at + if analysis_data is not UNSET: + field_dict["analysis_data"] = analysis_data + if evaluation_data is not UNSET: + field_dict["evaluation_data"] = evaluation_data + if message_count is not UNSET: + field_dict["message_count"] = message_count + if transcript_available is not UNSET: + field_dict["transcript_available"] = transcript_available + if recording_available is not UNSET: + field_dict["recording_available"] = recording_available + if eval_outputs is not UNSET: + field_dict["eval_outputs"] = eval_outputs + if error_localizer_tasks is not UNSET: + field_dict["error_localizer_tasks"] = error_localizer_tasks + if call_summary is not UNSET: + field_dict["call_summary"] = call_summary + if agent_version is not UNSET: + field_dict["agent_version"] = agent_version + if customer_cost_cents is not UNSET: + field_dict["customer_cost_cents"] = customer_cost_cents + if system_metrics is not UNSET: + field_dict["system_metrics"] = system_metrics + if cost_breakdown is not UNSET: + field_dict["cost_breakdown"] = cost_breakdown + if customer_call_id is not UNSET: + field_dict["customer_call_id"] = customer_call_id + if simulation_call_type is not UNSET: + field_dict["simulation_call_type"] = simulation_call_type + if processing_skipped is not UNSET: + field_dict["processing_skipped"] = processing_skipped + if processing_skip_reason is not UNSET: + field_dict["processing_skip_reason"] = processing_skip_reason + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_execution_analysis_data import CallExecutionAnalysisData + from ..models.call_execution_call_metadata import CallExecutionCallMetadata + from ..models.call_execution_eval_outputs import CallExecutionEvalOutputs + from ..models.call_execution_evaluation_data import CallExecutionEvaluationData + from ..models.call_execution_provider_call_data import ( + CallExecutionProviderCallData, + ) + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_phone_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_number = _parse_phone_number(d.pop("phone_number", UNSET)) + + service_provider_call_id = d.pop("service_provider_call_id", UNSET) + + _status = d.pop("status", UNSET) + status: CallExecutionStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = CallExecutionStatus(_status) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_at_type_0 = isoparse(data) + + return completed_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + def _parse_duration_seconds(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + duration_seconds = _parse_duration_seconds(d.pop("duration_seconds", UNSET)) + + def _parse_recording_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recording_url = _parse_recording_url(d.pop("recording_url", UNSET)) + + def _parse_cost_cents(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + cost_cents = _parse_cost_cents(d.pop("cost_cents", UNSET)) + + _call_metadata = d.pop("call_metadata", UNSET) + call_metadata: CallExecutionCallMetadata | Unset + if isinstance(_call_metadata, Unset): + call_metadata = UNSET + else: + call_metadata = CallExecutionCallMetadata.from_dict(_call_metadata) + + def _parse_error_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error_message = _parse_error_message(d.pop("error_message", UNSET)) + + scenario_name = d.pop("scenario_name", UNSET) + + transcripts = d.pop("transcripts", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _provider_call_data = d.pop("provider_call_data", UNSET) + provider_call_data: CallExecutionProviderCallData | Unset + if isinstance(_provider_call_data, Unset): + provider_call_data = UNSET + else: + provider_call_data = CallExecutionProviderCallData.from_dict( + _provider_call_data + ) + + def _parse_stereo_recording_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + stereo_recording_url = _parse_stereo_recording_url( + d.pop("stereo_recording_url", UNSET) + ) + + def _parse_ended_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ended_reason = _parse_ended_reason(d.pop("ended_reason", UNSET)) + + def _parse_stt_cost_cents(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + stt_cost_cents = _parse_stt_cost_cents(d.pop("stt_cost_cents", UNSET)) + + def _parse_llm_cost_cents(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + llm_cost_cents = _parse_llm_cost_cents(d.pop("llm_cost_cents", UNSET)) + + def _parse_tts_cost_cents(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + tts_cost_cents = _parse_tts_cost_cents(d.pop("tts_cost_cents", UNSET)) + + def _parse_overall_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + overall_score = _parse_overall_score(d.pop("overall_score", UNSET)) + + def _parse_response_time_ms(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + response_time_ms = _parse_response_time_ms(d.pop("response_time_ms", UNSET)) + + response_time_seconds = d.pop("response_time_seconds", UNSET) + + def _parse_assistant_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + assistant_id = _parse_assistant_id(d.pop("assistant_id", UNSET)) + + def _parse_customer_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + customer_number = _parse_customer_number(d.pop("customer_number", UNSET)) + + def _parse_call_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + call_type = _parse_call_type(d.pop("call_type", UNSET)) + + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + ended_at_type_0 = isoparse(data) + + return ended_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) + + _analysis_data = d.pop("analysis_data", UNSET) + analysis_data: CallExecutionAnalysisData | Unset + if isinstance(_analysis_data, Unset): + analysis_data = UNSET + else: + analysis_data = CallExecutionAnalysisData.from_dict(_analysis_data) + + _evaluation_data = d.pop("evaluation_data", UNSET) + evaluation_data: CallExecutionEvaluationData | Unset + if isinstance(_evaluation_data, Unset): + evaluation_data = UNSET + else: + evaluation_data = CallExecutionEvaluationData.from_dict(_evaluation_data) + + def _parse_message_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + message_count = _parse_message_count(d.pop("message_count", UNSET)) + + transcript_available = d.pop("transcript_available", UNSET) + + recording_available = d.pop("recording_available", UNSET) + + _eval_outputs = d.pop("eval_outputs", UNSET) + eval_outputs: CallExecutionEvalOutputs | Unset + if isinstance(_eval_outputs, Unset): + eval_outputs = UNSET + else: + eval_outputs = CallExecutionEvalOutputs.from_dict(_eval_outputs) + + error_localizer_tasks = d.pop("error_localizer_tasks", UNSET) + + def _parse_call_summary(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + call_summary = _parse_call_summary(d.pop("call_summary", UNSET)) + + def _parse_agent_version(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_version_type_0 = UUID(data) + + return agent_version_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_version = _parse_agent_version(d.pop("agent_version", UNSET)) + + def _parse_customer_cost_cents(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + customer_cost_cents = _parse_customer_cost_cents( + d.pop("customer_cost_cents", UNSET) + ) + + system_metrics = d.pop("system_metrics", UNSET) + + cost_breakdown = d.pop("cost_breakdown", UNSET) + + def _parse_customer_call_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + customer_call_id = _parse_customer_call_id(d.pop("customer_call_id", UNSET)) + + _simulation_call_type = d.pop("simulation_call_type", UNSET) + simulation_call_type: CallExecutionSimulationCallType | Unset + if isinstance(_simulation_call_type, Unset): + simulation_call_type = UNSET + else: + simulation_call_type = CallExecutionSimulationCallType( + _simulation_call_type + ) + + processing_skipped = d.pop("processing_skipped", UNSET) + + processing_skip_reason = d.pop("processing_skip_reason", UNSET) + + call_execution = cls( + id=id, + phone_number=phone_number, + service_provider_call_id=service_provider_call_id, + status=status, + started_at=started_at, + completed_at=completed_at, + duration_seconds=duration_seconds, + recording_url=recording_url, + cost_cents=cost_cents, + call_metadata=call_metadata, + error_message=error_message, + scenario_name=scenario_name, + transcripts=transcripts, + created_at=created_at, + updated_at=updated_at, + provider_call_data=provider_call_data, + stereo_recording_url=stereo_recording_url, + ended_reason=ended_reason, + stt_cost_cents=stt_cost_cents, + llm_cost_cents=llm_cost_cents, + tts_cost_cents=tts_cost_cents, + overall_score=overall_score, + response_time_ms=response_time_ms, + response_time_seconds=response_time_seconds, + assistant_id=assistant_id, + customer_number=customer_number, + call_type=call_type, + ended_at=ended_at, + analysis_data=analysis_data, + evaluation_data=evaluation_data, + message_count=message_count, + transcript_available=transcript_available, + recording_available=recording_available, + eval_outputs=eval_outputs, + error_localizer_tasks=error_localizer_tasks, + call_summary=call_summary, + agent_version=agent_version, + customer_cost_cents=customer_cost_cents, + system_metrics=system_metrics, + cost_breakdown=cost_breakdown, + customer_call_id=customer_call_id, + simulation_call_type=simulation_call_type, + processing_skipped=processing_skipped, + processing_skip_reason=processing_skip_reason, + ) + + call_execution.additional_properties = d + return call_execution + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_analysis_data.py b/python/fi/generated/openapi_client/models/call_execution_analysis_data.py new file mode 100644 index 0000000..f683caa --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_analysis_data.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionAnalysisData") + + +@_attrs_define +class CallExecutionAnalysisData: + """Call analysis data from the service provider""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_analysis_data = cls() + + call_execution_analysis_data.additional_properties = d + return call_execution_analysis_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_call_metadata.py b/python/fi/generated/openapi_client/models/call_execution_call_metadata.py new file mode 100644 index 0000000..5ebe954 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_call_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionCallMetadata") + + +@_attrs_define +class CallExecutionCallMetadata: + """Additional metadata about the call""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_call_metadata = cls() + + call_execution_call_metadata.additional_properties = d + return call_execution_call_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_delete_response.py b/python/fi/generated/openapi_client/models/call_execution_delete_response.py new file mode 100644 index 0000000..eae2793 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_delete_response.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CallExecutionDeleteResponse") + + +@_attrs_define +class CallExecutionDeleteResponse: + """ + Attributes: + message (str | Unset): + """ + + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + call_execution_delete_response = cls( + message=message, + ) + + call_execution_delete_response.additional_properties = d + return call_execution_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_detail.py b/python/fi/generated/openapi_client/models/call_execution_detail.py new file mode 100644 index 0000000..d2f5bb2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_detail.py @@ -0,0 +1,890 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.call_execution_detail_simulation_call_type import ( + CallExecutionDetailSimulationCallType, +) +from ..models.call_execution_detail_status import CallExecutionDetailStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_execution_detail_customer_cost_breakdown import ( + CallExecutionDetailCustomerCostBreakdown, + ) + from ..models.call_execution_detail_customer_latency_metrics import ( + CallExecutionDetailCustomerLatencyMetrics, + ) + from ..models.call_execution_detail_tool_outputs import ( + CallExecutionDetailToolOutputs, + ) + + +T = TypeVar("T", bound="CallExecutionDetail") + + +@_attrs_define +class CallExecutionDetail: + """ + Attributes: + id (UUID | Unset): + service_provider_call_id (str | Unset): + session_id (str | Unset): + timestamp (datetime.datetime | Unset): + call_type (str | Unset): + status (CallExecutionDetailStatus | Unset): Current status of the call + duration (str | Unset): + duration_seconds (int | None | Unset): Duration of the call in seconds + start_time (str | Unset): + transcript (str | Unset): + scenario (str | Unset): + overall_score (str | Unset): + response_time (str | Unset): + response_time_ms (int | None | Unset): Average response time in milliseconds + audio_url (str | Unset): + customer_name (str | Unset): + eval_outputs (str | Unset): + eval_metrics (str | Unset): + scenario_columns (str | Unset): + ended_reason (None | str | Unset): Reason why the call ended + simulator_agent_name (str | Unset): + simulator_agent_id (UUID | Unset): + agent_definition_used_name (str | Unset): + agent_definition_used_id (UUID | Unset): + call_summary (None | str | Unset): Call summary from the service + recordings (str | Unset): + scenario_id (str | Unset): + avg_agent_latency (int | Unset): + avg_agent_latency_ms (int | None | Unset): Average agent latency in milliseconds (time taken by agent to respond + after user's pause) + user_interruption_count (int | None | Unset): Number of times user interrupted the AI + user_interruption_rate (float | None | Unset): Rate of user interruptions (interruptions per minute) + user_wpm (float | None | Unset): User's words per minute + bot_wpm (float | None | Unset): Bot's words per minute + talk_ratio (float | None | Unset): Ratio of bot speaking time to user speaking time + ai_interruption_count (int | None | Unset): Number of times AI interrupted the user + ai_interruption_rate (float | None | Unset): Rate of AI interruptions (interruptions per minute) + avg_stop_time_after_interruption (int | Unset): + total_tokens (str | Unset): + input_tokens (str | Unset): + output_tokens (str | Unset): + avg_latency_ms (str | Unset): + turn_count (str | Unset): + agent_talk_percentage (str | Unset): + csat_score (str | Unset): + processing_skipped (str | Unset): + processing_skip_reason (str | Unset): + rerun_snapshots (str | Unset): + is_snapshot (str | Unset): + snapshot_timestamp (str | Unset): + rerun_type (str | Unset): + original_call_execution_id (str | Unset): + tool_outputs (CallExecutionDetailToolOutputs | Unset): Tool evaluation output - separate from standard + evaluations + cost_cents (int | None | Unset): Cost of the call in cents + customer_cost_cents (int | None | Unset): Total customer-reported cost in cents + customer_cost_breakdown (CallExecutionDetailCustomerCostBreakdown | Unset): Detailed cost breakdown from + customer call data + customer_latency_metrics (CallExecutionDetailCustomerLatencyMetrics | Unset): Latency metrics from customer call + data + customer_call_id (None | str | Unset): Customer call ID if available + simulation_call_type (CallExecutionDetailSimulationCallType | Unset): Type of simulation call + provider (str | Unset): + phone_number (None | str | Unset): Phone number called (null for TEXT/chat simulations) + """ + + id: UUID | Unset = UNSET + service_provider_call_id: str | Unset = UNSET + session_id: str | Unset = UNSET + timestamp: datetime.datetime | Unset = UNSET + call_type: str | Unset = UNSET + status: CallExecutionDetailStatus | Unset = UNSET + duration: str | Unset = UNSET + duration_seconds: int | None | Unset = UNSET + start_time: str | Unset = UNSET + transcript: str | Unset = UNSET + scenario: str | Unset = UNSET + overall_score: str | Unset = UNSET + response_time: str | Unset = UNSET + response_time_ms: int | None | Unset = UNSET + audio_url: str | Unset = UNSET + customer_name: str | Unset = UNSET + eval_outputs: str | Unset = UNSET + eval_metrics: str | Unset = UNSET + scenario_columns: str | Unset = UNSET + ended_reason: None | str | Unset = UNSET + simulator_agent_name: str | Unset = UNSET + simulator_agent_id: UUID | Unset = UNSET + agent_definition_used_name: str | Unset = UNSET + agent_definition_used_id: UUID | Unset = UNSET + call_summary: None | str | Unset = UNSET + recordings: str | Unset = UNSET + scenario_id: str | Unset = UNSET + avg_agent_latency: int | Unset = UNSET + avg_agent_latency_ms: int | None | Unset = UNSET + user_interruption_count: int | None | Unset = UNSET + user_interruption_rate: float | None | Unset = UNSET + user_wpm: float | None | Unset = UNSET + bot_wpm: float | None | Unset = UNSET + talk_ratio: float | None | Unset = UNSET + ai_interruption_count: int | None | Unset = UNSET + ai_interruption_rate: float | None | Unset = UNSET + avg_stop_time_after_interruption: int | Unset = UNSET + total_tokens: str | Unset = UNSET + input_tokens: str | Unset = UNSET + output_tokens: str | Unset = UNSET + avg_latency_ms: str | Unset = UNSET + turn_count: str | Unset = UNSET + agent_talk_percentage: str | Unset = UNSET + csat_score: str | Unset = UNSET + processing_skipped: str | Unset = UNSET + processing_skip_reason: str | Unset = UNSET + rerun_snapshots: str | Unset = UNSET + is_snapshot: str | Unset = UNSET + snapshot_timestamp: str | Unset = UNSET + rerun_type: str | Unset = UNSET + original_call_execution_id: str | Unset = UNSET + tool_outputs: CallExecutionDetailToolOutputs | Unset = UNSET + cost_cents: int | None | Unset = UNSET + customer_cost_cents: int | None | Unset = UNSET + customer_cost_breakdown: CallExecutionDetailCustomerCostBreakdown | Unset = UNSET + customer_latency_metrics: CallExecutionDetailCustomerLatencyMetrics | Unset = UNSET + customer_call_id: None | str | Unset = UNSET + simulation_call_type: CallExecutionDetailSimulationCallType | Unset = UNSET + provider: str | Unset = UNSET + phone_number: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + service_provider_call_id = self.service_provider_call_id + + session_id = self.session_id + + timestamp: str | Unset = UNSET + if not isinstance(self.timestamp, Unset): + timestamp = self.timestamp.isoformat() + + call_type = self.call_type + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + duration = self.duration + + duration_seconds: int | None | Unset + if isinstance(self.duration_seconds, Unset): + duration_seconds = UNSET + else: + duration_seconds = self.duration_seconds + + start_time = self.start_time + + transcript = self.transcript + + scenario = self.scenario + + overall_score = self.overall_score + + response_time = self.response_time + + response_time_ms: int | None | Unset + if isinstance(self.response_time_ms, Unset): + response_time_ms = UNSET + else: + response_time_ms = self.response_time_ms + + audio_url = self.audio_url + + customer_name = self.customer_name + + eval_outputs = self.eval_outputs + + eval_metrics = self.eval_metrics + + scenario_columns = self.scenario_columns + + ended_reason: None | str | Unset + if isinstance(self.ended_reason, Unset): + ended_reason = UNSET + else: + ended_reason = self.ended_reason + + simulator_agent_name = self.simulator_agent_name + + simulator_agent_id: str | Unset = UNSET + if not isinstance(self.simulator_agent_id, Unset): + simulator_agent_id = str(self.simulator_agent_id) + + agent_definition_used_name = self.agent_definition_used_name + + agent_definition_used_id: str | Unset = UNSET + if not isinstance(self.agent_definition_used_id, Unset): + agent_definition_used_id = str(self.agent_definition_used_id) + + call_summary: None | str | Unset + if isinstance(self.call_summary, Unset): + call_summary = UNSET + else: + call_summary = self.call_summary + + recordings = self.recordings + + scenario_id = self.scenario_id + + avg_agent_latency = self.avg_agent_latency + + avg_agent_latency_ms: int | None | Unset + if isinstance(self.avg_agent_latency_ms, Unset): + avg_agent_latency_ms = UNSET + else: + avg_agent_latency_ms = self.avg_agent_latency_ms + + user_interruption_count: int | None | Unset + if isinstance(self.user_interruption_count, Unset): + user_interruption_count = UNSET + else: + user_interruption_count = self.user_interruption_count + + user_interruption_rate: float | None | Unset + if isinstance(self.user_interruption_rate, Unset): + user_interruption_rate = UNSET + else: + user_interruption_rate = self.user_interruption_rate + + user_wpm: float | None | Unset + if isinstance(self.user_wpm, Unset): + user_wpm = UNSET + else: + user_wpm = self.user_wpm + + bot_wpm: float | None | Unset + if isinstance(self.bot_wpm, Unset): + bot_wpm = UNSET + else: + bot_wpm = self.bot_wpm + + talk_ratio: float | None | Unset + if isinstance(self.talk_ratio, Unset): + talk_ratio = UNSET + else: + talk_ratio = self.talk_ratio + + ai_interruption_count: int | None | Unset + if isinstance(self.ai_interruption_count, Unset): + ai_interruption_count = UNSET + else: + ai_interruption_count = self.ai_interruption_count + + ai_interruption_rate: float | None | Unset + if isinstance(self.ai_interruption_rate, Unset): + ai_interruption_rate = UNSET + else: + ai_interruption_rate = self.ai_interruption_rate + + avg_stop_time_after_interruption = self.avg_stop_time_after_interruption + + total_tokens = self.total_tokens + + input_tokens = self.input_tokens + + output_tokens = self.output_tokens + + avg_latency_ms = self.avg_latency_ms + + turn_count = self.turn_count + + agent_talk_percentage = self.agent_talk_percentage + + csat_score = self.csat_score + + processing_skipped = self.processing_skipped + + processing_skip_reason = self.processing_skip_reason + + rerun_snapshots = self.rerun_snapshots + + is_snapshot = self.is_snapshot + + snapshot_timestamp = self.snapshot_timestamp + + rerun_type = self.rerun_type + + original_call_execution_id = self.original_call_execution_id + + tool_outputs: dict[str, Any] | Unset = UNSET + if not isinstance(self.tool_outputs, Unset): + tool_outputs = self.tool_outputs.to_dict() + + cost_cents: int | None | Unset + if isinstance(self.cost_cents, Unset): + cost_cents = UNSET + else: + cost_cents = self.cost_cents + + customer_cost_cents: int | None | Unset + if isinstance(self.customer_cost_cents, Unset): + customer_cost_cents = UNSET + else: + customer_cost_cents = self.customer_cost_cents + + customer_cost_breakdown: dict[str, Any] | Unset = UNSET + if not isinstance(self.customer_cost_breakdown, Unset): + customer_cost_breakdown = self.customer_cost_breakdown.to_dict() + + customer_latency_metrics: dict[str, Any] | Unset = UNSET + if not isinstance(self.customer_latency_metrics, Unset): + customer_latency_metrics = self.customer_latency_metrics.to_dict() + + customer_call_id: None | str | Unset + if isinstance(self.customer_call_id, Unset): + customer_call_id = UNSET + else: + customer_call_id = self.customer_call_id + + simulation_call_type: str | Unset = UNSET + if not isinstance(self.simulation_call_type, Unset): + simulation_call_type = self.simulation_call_type.value + + provider = self.provider + + phone_number: None | str | Unset + if isinstance(self.phone_number, Unset): + phone_number = UNSET + else: + phone_number = self.phone_number + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if service_provider_call_id is not UNSET: + field_dict["service_provider_call_id"] = service_provider_call_id + if session_id is not UNSET: + field_dict["session_id"] = session_id + if timestamp is not UNSET: + field_dict["timestamp"] = timestamp + if call_type is not UNSET: + field_dict["call_type"] = call_type + if status is not UNSET: + field_dict["status"] = status + if duration is not UNSET: + field_dict["duration"] = duration + if duration_seconds is not UNSET: + field_dict["duration_seconds"] = duration_seconds + if start_time is not UNSET: + field_dict["start_time"] = start_time + if transcript is not UNSET: + field_dict["transcript"] = transcript + if scenario is not UNSET: + field_dict["scenario"] = scenario + if overall_score is not UNSET: + field_dict["overall_score"] = overall_score + if response_time is not UNSET: + field_dict["response_time"] = response_time + if response_time_ms is not UNSET: + field_dict["response_time_ms"] = response_time_ms + if audio_url is not UNSET: + field_dict["audio_url"] = audio_url + if customer_name is not UNSET: + field_dict["customer_name"] = customer_name + if eval_outputs is not UNSET: + field_dict["eval_outputs"] = eval_outputs + if eval_metrics is not UNSET: + field_dict["eval_metrics"] = eval_metrics + if scenario_columns is not UNSET: + field_dict["scenario_columns"] = scenario_columns + if ended_reason is not UNSET: + field_dict["ended_reason"] = ended_reason + if simulator_agent_name is not UNSET: + field_dict["simulator_agent_name"] = simulator_agent_name + if simulator_agent_id is not UNSET: + field_dict["simulator_agent_id"] = simulator_agent_id + if agent_definition_used_name is not UNSET: + field_dict["agent_definition_used_name"] = agent_definition_used_name + if agent_definition_used_id is not UNSET: + field_dict["agent_definition_used_id"] = agent_definition_used_id + if call_summary is not UNSET: + field_dict["call_summary"] = call_summary + if recordings is not UNSET: + field_dict["recordings"] = recordings + if scenario_id is not UNSET: + field_dict["scenario_id"] = scenario_id + if avg_agent_latency is not UNSET: + field_dict["avg_agent_latency"] = avg_agent_latency + if avg_agent_latency_ms is not UNSET: + field_dict["avg_agent_latency_ms"] = avg_agent_latency_ms + if user_interruption_count is not UNSET: + field_dict["user_interruption_count"] = user_interruption_count + if user_interruption_rate is not UNSET: + field_dict["user_interruption_rate"] = user_interruption_rate + if user_wpm is not UNSET: + field_dict["user_wpm"] = user_wpm + if bot_wpm is not UNSET: + field_dict["bot_wpm"] = bot_wpm + if talk_ratio is not UNSET: + field_dict["talk_ratio"] = talk_ratio + if ai_interruption_count is not UNSET: + field_dict["ai_interruption_count"] = ai_interruption_count + if ai_interruption_rate is not UNSET: + field_dict["ai_interruption_rate"] = ai_interruption_rate + if avg_stop_time_after_interruption is not UNSET: + field_dict["avg_stop_time_after_interruption"] = ( + avg_stop_time_after_interruption + ) + if total_tokens is not UNSET: + field_dict["total_tokens"] = total_tokens + if input_tokens is not UNSET: + field_dict["input_tokens"] = input_tokens + if output_tokens is not UNSET: + field_dict["output_tokens"] = output_tokens + if avg_latency_ms is not UNSET: + field_dict["avg_latency_ms"] = avg_latency_ms + if turn_count is not UNSET: + field_dict["turn_count"] = turn_count + if agent_talk_percentage is not UNSET: + field_dict["agent_talk_percentage"] = agent_talk_percentage + if csat_score is not UNSET: + field_dict["csat_score"] = csat_score + if processing_skipped is not UNSET: + field_dict["processing_skipped"] = processing_skipped + if processing_skip_reason is not UNSET: + field_dict["processing_skip_reason"] = processing_skip_reason + if rerun_snapshots is not UNSET: + field_dict["rerun_snapshots"] = rerun_snapshots + if is_snapshot is not UNSET: + field_dict["is_snapshot"] = is_snapshot + if snapshot_timestamp is not UNSET: + field_dict["snapshot_timestamp"] = snapshot_timestamp + if rerun_type is not UNSET: + field_dict["rerun_type"] = rerun_type + if original_call_execution_id is not UNSET: + field_dict["original_call_execution_id"] = original_call_execution_id + if tool_outputs is not UNSET: + field_dict["tool_outputs"] = tool_outputs + if cost_cents is not UNSET: + field_dict["cost_cents"] = cost_cents + if customer_cost_cents is not UNSET: + field_dict["customer_cost_cents"] = customer_cost_cents + if customer_cost_breakdown is not UNSET: + field_dict["customer_cost_breakdown"] = customer_cost_breakdown + if customer_latency_metrics is not UNSET: + field_dict["customer_latency_metrics"] = customer_latency_metrics + if customer_call_id is not UNSET: + field_dict["customer_call_id"] = customer_call_id + if simulation_call_type is not UNSET: + field_dict["simulation_call_type"] = simulation_call_type + if provider is not UNSET: + field_dict["provider"] = provider + if phone_number is not UNSET: + field_dict["phone_number"] = phone_number + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_execution_detail_customer_cost_breakdown import ( + CallExecutionDetailCustomerCostBreakdown, + ) + from ..models.call_execution_detail_customer_latency_metrics import ( + CallExecutionDetailCustomerLatencyMetrics, + ) + from ..models.call_execution_detail_tool_outputs import ( + CallExecutionDetailToolOutputs, + ) + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + service_provider_call_id = d.pop("service_provider_call_id", UNSET) + + session_id = d.pop("session_id", UNSET) + + _timestamp = d.pop("timestamp", UNSET) + timestamp: datetime.datetime | Unset + if isinstance(_timestamp, Unset): + timestamp = UNSET + else: + timestamp = isoparse(_timestamp) + + call_type = d.pop("call_type", UNSET) + + _status = d.pop("status", UNSET) + status: CallExecutionDetailStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = CallExecutionDetailStatus(_status) + + duration = d.pop("duration", UNSET) + + def _parse_duration_seconds(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + duration_seconds = _parse_duration_seconds(d.pop("duration_seconds", UNSET)) + + start_time = d.pop("start_time", UNSET) + + transcript = d.pop("transcript", UNSET) + + scenario = d.pop("scenario", UNSET) + + overall_score = d.pop("overall_score", UNSET) + + response_time = d.pop("response_time", UNSET) + + def _parse_response_time_ms(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + response_time_ms = _parse_response_time_ms(d.pop("response_time_ms", UNSET)) + + audio_url = d.pop("audio_url", UNSET) + + customer_name = d.pop("customer_name", UNSET) + + eval_outputs = d.pop("eval_outputs", UNSET) + + eval_metrics = d.pop("eval_metrics", UNSET) + + scenario_columns = d.pop("scenario_columns", UNSET) + + def _parse_ended_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ended_reason = _parse_ended_reason(d.pop("ended_reason", UNSET)) + + simulator_agent_name = d.pop("simulator_agent_name", UNSET) + + _simulator_agent_id = d.pop("simulator_agent_id", UNSET) + simulator_agent_id: UUID | Unset + if isinstance(_simulator_agent_id, Unset): + simulator_agent_id = UNSET + else: + simulator_agent_id = UUID(_simulator_agent_id) + + agent_definition_used_name = d.pop("agent_definition_used_name", UNSET) + + _agent_definition_used_id = d.pop("agent_definition_used_id", UNSET) + agent_definition_used_id: UUID | Unset + if isinstance(_agent_definition_used_id, Unset): + agent_definition_used_id = UNSET + else: + agent_definition_used_id = UUID(_agent_definition_used_id) + + def _parse_call_summary(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + call_summary = _parse_call_summary(d.pop("call_summary", UNSET)) + + recordings = d.pop("recordings", UNSET) + + scenario_id = d.pop("scenario_id", UNSET) + + avg_agent_latency = d.pop("avg_agent_latency", UNSET) + + def _parse_avg_agent_latency_ms(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + avg_agent_latency_ms = _parse_avg_agent_latency_ms( + d.pop("avg_agent_latency_ms", UNSET) + ) + + def _parse_user_interruption_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + user_interruption_count = _parse_user_interruption_count( + d.pop("user_interruption_count", UNSET) + ) + + def _parse_user_interruption_rate(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + user_interruption_rate = _parse_user_interruption_rate( + d.pop("user_interruption_rate", UNSET) + ) + + def _parse_user_wpm(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + user_wpm = _parse_user_wpm(d.pop("user_wpm", UNSET)) + + def _parse_bot_wpm(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + bot_wpm = _parse_bot_wpm(d.pop("bot_wpm", UNSET)) + + def _parse_talk_ratio(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + talk_ratio = _parse_talk_ratio(d.pop("talk_ratio", UNSET)) + + def _parse_ai_interruption_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + ai_interruption_count = _parse_ai_interruption_count( + d.pop("ai_interruption_count", UNSET) + ) + + def _parse_ai_interruption_rate(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + ai_interruption_rate = _parse_ai_interruption_rate( + d.pop("ai_interruption_rate", UNSET) + ) + + avg_stop_time_after_interruption = d.pop( + "avg_stop_time_after_interruption", UNSET + ) + + total_tokens = d.pop("total_tokens", UNSET) + + input_tokens = d.pop("input_tokens", UNSET) + + output_tokens = d.pop("output_tokens", UNSET) + + avg_latency_ms = d.pop("avg_latency_ms", UNSET) + + turn_count = d.pop("turn_count", UNSET) + + agent_talk_percentage = d.pop("agent_talk_percentage", UNSET) + + csat_score = d.pop("csat_score", UNSET) + + processing_skipped = d.pop("processing_skipped", UNSET) + + processing_skip_reason = d.pop("processing_skip_reason", UNSET) + + rerun_snapshots = d.pop("rerun_snapshots", UNSET) + + is_snapshot = d.pop("is_snapshot", UNSET) + + snapshot_timestamp = d.pop("snapshot_timestamp", UNSET) + + rerun_type = d.pop("rerun_type", UNSET) + + original_call_execution_id = d.pop("original_call_execution_id", UNSET) + + _tool_outputs = d.pop("tool_outputs", UNSET) + tool_outputs: CallExecutionDetailToolOutputs | Unset + if isinstance(_tool_outputs, Unset): + tool_outputs = UNSET + else: + tool_outputs = CallExecutionDetailToolOutputs.from_dict(_tool_outputs) + + def _parse_cost_cents(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + cost_cents = _parse_cost_cents(d.pop("cost_cents", UNSET)) + + def _parse_customer_cost_cents(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + customer_cost_cents = _parse_customer_cost_cents( + d.pop("customer_cost_cents", UNSET) + ) + + _customer_cost_breakdown = d.pop("customer_cost_breakdown", UNSET) + customer_cost_breakdown: CallExecutionDetailCustomerCostBreakdown | Unset + if isinstance(_customer_cost_breakdown, Unset): + customer_cost_breakdown = UNSET + else: + customer_cost_breakdown = ( + CallExecutionDetailCustomerCostBreakdown.from_dict( + _customer_cost_breakdown + ) + ) + + _customer_latency_metrics = d.pop("customer_latency_metrics", UNSET) + customer_latency_metrics: CallExecutionDetailCustomerLatencyMetrics | Unset + if isinstance(_customer_latency_metrics, Unset): + customer_latency_metrics = UNSET + else: + customer_latency_metrics = ( + CallExecutionDetailCustomerLatencyMetrics.from_dict( + _customer_latency_metrics + ) + ) + + def _parse_customer_call_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + customer_call_id = _parse_customer_call_id(d.pop("customer_call_id", UNSET)) + + _simulation_call_type = d.pop("simulation_call_type", UNSET) + simulation_call_type: CallExecutionDetailSimulationCallType | Unset + if isinstance(_simulation_call_type, Unset): + simulation_call_type = UNSET + else: + simulation_call_type = CallExecutionDetailSimulationCallType( + _simulation_call_type + ) + + provider = d.pop("provider", UNSET) + + def _parse_phone_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_number = _parse_phone_number(d.pop("phone_number", UNSET)) + + call_execution_detail = cls( + id=id, + service_provider_call_id=service_provider_call_id, + session_id=session_id, + timestamp=timestamp, + call_type=call_type, + status=status, + duration=duration, + duration_seconds=duration_seconds, + start_time=start_time, + transcript=transcript, + scenario=scenario, + overall_score=overall_score, + response_time=response_time, + response_time_ms=response_time_ms, + audio_url=audio_url, + customer_name=customer_name, + eval_outputs=eval_outputs, + eval_metrics=eval_metrics, + scenario_columns=scenario_columns, + ended_reason=ended_reason, + simulator_agent_name=simulator_agent_name, + simulator_agent_id=simulator_agent_id, + agent_definition_used_name=agent_definition_used_name, + agent_definition_used_id=agent_definition_used_id, + call_summary=call_summary, + recordings=recordings, + scenario_id=scenario_id, + avg_agent_latency=avg_agent_latency, + avg_agent_latency_ms=avg_agent_latency_ms, + user_interruption_count=user_interruption_count, + user_interruption_rate=user_interruption_rate, + user_wpm=user_wpm, + bot_wpm=bot_wpm, + talk_ratio=talk_ratio, + ai_interruption_count=ai_interruption_count, + ai_interruption_rate=ai_interruption_rate, + avg_stop_time_after_interruption=avg_stop_time_after_interruption, + total_tokens=total_tokens, + input_tokens=input_tokens, + output_tokens=output_tokens, + avg_latency_ms=avg_latency_ms, + turn_count=turn_count, + agent_talk_percentage=agent_talk_percentage, + csat_score=csat_score, + processing_skipped=processing_skipped, + processing_skip_reason=processing_skip_reason, + rerun_snapshots=rerun_snapshots, + is_snapshot=is_snapshot, + snapshot_timestamp=snapshot_timestamp, + rerun_type=rerun_type, + original_call_execution_id=original_call_execution_id, + tool_outputs=tool_outputs, + cost_cents=cost_cents, + customer_cost_cents=customer_cost_cents, + customer_cost_breakdown=customer_cost_breakdown, + customer_latency_metrics=customer_latency_metrics, + customer_call_id=customer_call_id, + simulation_call_type=simulation_call_type, + provider=provider, + phone_number=phone_number, + ) + + call_execution_detail.additional_properties = d + return call_execution_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_detail_customer_cost_breakdown.py b/python/fi/generated/openapi_client/models/call_execution_detail_customer_cost_breakdown.py new file mode 100644 index 0000000..1082240 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_detail_customer_cost_breakdown.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionDetailCustomerCostBreakdown") + + +@_attrs_define +class CallExecutionDetailCustomerCostBreakdown: + """Detailed cost breakdown from customer call data""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_detail_customer_cost_breakdown = cls() + + call_execution_detail_customer_cost_breakdown.additional_properties = d + return call_execution_detail_customer_cost_breakdown + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_detail_customer_latency_metrics.py b/python/fi/generated/openapi_client/models/call_execution_detail_customer_latency_metrics.py new file mode 100644 index 0000000..2c8d596 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_detail_customer_latency_metrics.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionDetailCustomerLatencyMetrics") + + +@_attrs_define +class CallExecutionDetailCustomerLatencyMetrics: + """Latency metrics from customer call data""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_detail_customer_latency_metrics = cls() + + call_execution_detail_customer_latency_metrics.additional_properties = d + return call_execution_detail_customer_latency_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_detail_simulation_call_type.py b/python/fi/generated/openapi_client/models/call_execution_detail_simulation_call_type.py new file mode 100644 index 0000000..ecdfaec --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_detail_simulation_call_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CallExecutionDetailSimulationCallType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/call_execution_detail_status.py b/python/fi/generated/openapi_client/models/call_execution_detail_status.py new file mode 100644 index 0000000..6ae5c35 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_detail_status.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class CallExecutionDetailStatus(str, Enum): + ANALYZING = "analyzing" + CANCELLED = "cancelled" + COMPLETED = "completed" + FAILED = "failed" + ONGOING = "ongoing" + PENDING = "pending" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/call_execution_detail_tool_outputs.py b/python/fi/generated/openapi_client/models/call_execution_detail_tool_outputs.py new file mode 100644 index 0000000..daccd98 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_detail_tool_outputs.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionDetailToolOutputs") + + +@_attrs_define +class CallExecutionDetailToolOutputs: + """Tool evaluation output - separate from standard evaluations""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_detail_tool_outputs = cls() + + call_execution_detail_tool_outputs.additional_properties = d + return call_execution_detail_tool_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_error_localizer_tasks_response.py b/python/fi/generated/openapi_client/models/call_execution_error_localizer_tasks_response.py new file mode 100644 index 0000000..518425e --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_error_localizer_tasks_response.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.error_localizer_task_response import ErrorLocalizerTaskResponse + + +T = TypeVar("T", bound="CallExecutionErrorLocalizerTasksResponse") + + +@_attrs_define +class CallExecutionErrorLocalizerTasksResponse: + """ + Attributes: + call_execution_id (UUID | Unset): + error_localizer_tasks (list[ErrorLocalizerTaskResponse] | Unset): + total_tasks (int | Unset): + """ + + call_execution_id: UUID | Unset = UNSET + error_localizer_tasks: list[ErrorLocalizerTaskResponse] | Unset = UNSET + total_tasks: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id: str | Unset = UNSET + if not isinstance(self.call_execution_id, Unset): + call_execution_id = str(self.call_execution_id) + + error_localizer_tasks: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.error_localizer_tasks, Unset): + error_localizer_tasks = [] + for error_localizer_tasks_item_data in self.error_localizer_tasks: + error_localizer_tasks_item = error_localizer_tasks_item_data.to_dict() + error_localizer_tasks.append(error_localizer_tasks_item) + + total_tasks = self.total_tasks + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if call_execution_id is not UNSET: + field_dict["call_execution_id"] = call_execution_id + if error_localizer_tasks is not UNSET: + field_dict["error_localizer_tasks"] = error_localizer_tasks + if total_tasks is not UNSET: + field_dict["total_tasks"] = total_tasks + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.error_localizer_task_response import ErrorLocalizerTaskResponse + + d = dict(src_dict) + _call_execution_id = d.pop("call_execution_id", UNSET) + call_execution_id: UUID | Unset + if isinstance(_call_execution_id, Unset): + call_execution_id = UNSET + else: + call_execution_id = UUID(_call_execution_id) + + _error_localizer_tasks = d.pop("error_localizer_tasks", UNSET) + error_localizer_tasks: list[ErrorLocalizerTaskResponse] | Unset = UNSET + if _error_localizer_tasks is not UNSET: + error_localizer_tasks = [] + for error_localizer_tasks_item_data in _error_localizer_tasks: + error_localizer_tasks_item = ErrorLocalizerTaskResponse.from_dict( + error_localizer_tasks_item_data + ) + + error_localizer_tasks.append(error_localizer_tasks_item) + + total_tasks = d.pop("total_tasks", UNSET) + + call_execution_error_localizer_tasks_response = cls( + call_execution_id=call_execution_id, + error_localizer_tasks=error_localizer_tasks, + total_tasks=total_tasks, + ) + + call_execution_error_localizer_tasks_response.additional_properties = d + return call_execution_error_localizer_tasks_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_error_response.py b/python/fi/generated/openapi_client/models/call_execution_error_response.py new file mode 100644 index 0000000..530c60b --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_error_response.py @@ -0,0 +1,224 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.call_execution_error_response_type import CallExecutionErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_execution_error_response_details import ( + CallExecutionErrorResponseDetails, + ) + + +T = TypeVar("T", bound="CallExecutionErrorResponse") + + +@_attrs_define +class CallExecutionErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (CallExecutionErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (CallExecutionErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: CallExecutionErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: CallExecutionErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_execution_error_response_details import ( + CallExecutionErrorResponseDetails, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: CallExecutionErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = CallExecutionErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: CallExecutionErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = CallExecutionErrorResponseDetails.from_dict(_details) + + call_execution_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + call_execution_error_response.additional_properties = d + return call_execution_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_error_response_details.py b/python/fi/generated/openapi_client/models/call_execution_error_response_details.py new file mode 100644 index 0000000..c53116d --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_error_response_details.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionErrorResponseDetails") + + +@_attrs_define +class CallExecutionErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + call_execution_error_response_details.additional_properties = ( + additional_properties + ) + return call_execution_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_error_response_type.py b/python/fi/generated/openapi_client/models/call_execution_error_response_type.py new file mode 100644 index 0000000..c1d59cd --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class CallExecutionErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/call_execution_eval_outputs.py b/python/fi/generated/openapi_client/models/call_execution_eval_outputs.py new file mode 100644 index 0000000..dad4a04 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_eval_outputs.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionEvalOutputs") + + +@_attrs_define +class CallExecutionEvalOutputs: + """Evaluation output""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_eval_outputs = cls() + + call_execution_eval_outputs.additional_properties = d + return call_execution_eval_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_evaluation_data.py b/python/fi/generated/openapi_client/models/call_execution_evaluation_data.py new file mode 100644 index 0000000..f8ded29 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_evaluation_data.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionEvaluationData") + + +@_attrs_define +class CallExecutionEvaluationData: + """Call evaluation data from the service provider""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_evaluation_data = cls() + + call_execution_evaluation_data.additional_properties = d + return call_execution_evaluation_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_logs_response.py b/python/fi/generated/openapi_client/models/call_execution_logs_response.py new file mode 100644 index 0000000..c112575 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_logs_response.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_log_entry_response import CallLogEntryResponse + + +T = TypeVar("T", bound="CallExecutionLogsResponse") + + +@_attrs_define +class CallExecutionLogsResponse: + """ + Attributes: + results (list[CallLogEntryResponse] | Unset): + source (str | Unset): + ingestion_pending (bool | Unset): + """ + + results: list[CallLogEntryResponse] | Unset = UNSET + source: str | Unset = UNSET + ingestion_pending: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + source = self.source + + ingestion_pending = self.ingestion_pending + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if results is not UNSET: + field_dict["results"] = results + if source is not UNSET: + field_dict["source"] = source + if ingestion_pending is not UNSET: + field_dict["ingestion_pending"] = ingestion_pending + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_log_entry_response import CallLogEntryResponse + + d = dict(src_dict) + _results = d.pop("results", UNSET) + results: list[CallLogEntryResponse] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = CallLogEntryResponse.from_dict(results_item_data) + + results.append(results_item) + + source = d.pop("source", UNSET) + + ingestion_pending = d.pop("ingestion_pending", UNSET) + + call_execution_logs_response = cls( + results=results, + source=source, + ingestion_pending=ingestion_pending, + ) + + call_execution_logs_response.additional_properties = d + return call_execution_logs_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_provider_call_data.py b/python/fi/generated/openapi_client/models/call_execution_provider_call_data.py new file mode 100644 index 0000000..38886ae --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_provider_call_data.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallExecutionProviderCallData") + + +@_attrs_define +class CallExecutionProviderCallData: + """Complete call data from the provider. Format: dict[provider_name, data] where provider_name must be from + SupportedProviders + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_provider_call_data = cls() + + call_execution_provider_call_data.additional_properties = d + return call_execution_provider_call_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_rerun.py b/python/fi/generated/openapi_client/models/call_execution_rerun.py new file mode 100644 index 0000000..ce962d6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_rerun.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.call_execution_rerun_rerun_type import CallExecutionRerunRerunType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CallExecutionRerun") + + +@_attrs_define +class CallExecutionRerun: + """ + Attributes: + rerun_type (CallExecutionRerunRerunType): Type of rerun: evaluation only or call plus evaluation + call_execution_ids (list[UUID] | Unset): List of specific call execution IDs to rerun + select_all (bool | Unset): Whether to rerun all call executions in the test execution Default: False. + """ + + rerun_type: CallExecutionRerunRerunType + call_execution_ids: list[UUID] | Unset = UNSET + select_all: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rerun_type = self.rerun_type.value + + call_execution_ids: list[str] | Unset = UNSET + if not isinstance(self.call_execution_ids, Unset): + call_execution_ids = [] + for call_execution_ids_item_data in self.call_execution_ids: + call_execution_ids_item = str(call_execution_ids_item_data) + call_execution_ids.append(call_execution_ids_item) + + select_all = self.select_all + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rerun_type": rerun_type, + } + ) + if call_execution_ids is not UNSET: + field_dict["call_execution_ids"] = call_execution_ids + if select_all is not UNSET: + field_dict["select_all"] = select_all + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rerun_type = CallExecutionRerunRerunType(d.pop("rerun_type")) + + _call_execution_ids = d.pop("call_execution_ids", UNSET) + call_execution_ids: list[UUID] | Unset = UNSET + if _call_execution_ids is not UNSET: + call_execution_ids = [] + for call_execution_ids_item_data in _call_execution_ids: + call_execution_ids_item = UUID(call_execution_ids_item_data) + + call_execution_ids.append(call_execution_ids_item) + + select_all = d.pop("select_all", UNSET) + + call_execution_rerun = cls( + rerun_type=rerun_type, + call_execution_ids=call_execution_ids, + select_all=select_all, + ) + + call_execution_rerun.additional_properties = d + return call_execution_rerun + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_rerun_rerun_type.py b/python/fi/generated/openapi_client/models/call_execution_rerun_rerun_type.py new file mode 100644 index 0000000..9de2992 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_rerun_rerun_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CallExecutionRerunRerunType(str, Enum): + CALL_AND_EVAL = "call_and_eval" + EVAL_ONLY = "eval_only" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/call_execution_simulation_call_type.py b/python/fi/generated/openapi_client/models/call_execution_simulation_call_type.py new file mode 100644 index 0000000..81f4a08 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_simulation_call_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CallExecutionSimulationCallType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/call_execution_status.py b/python/fi/generated/openapi_client/models/call_execution_status.py new file mode 100644 index 0000000..97554bf --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_status.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class CallExecutionStatus(str, Enum): + ANALYZING = "analyzing" + CANCELLED = "cancelled" + COMPLETED = "completed" + FAILED = "failed" + ONGOING = "ongoing" + PENDING = "pending" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/call_execution_status_update.py b/python/fi/generated/openapi_client/models/call_execution_status_update.py new file mode 100644 index 0000000..6c4bf91 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_status_update.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.call_execution_status_update_status import CallExecutionStatusUpdateStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CallExecutionStatusUpdate") + + +@_attrs_define +class CallExecutionStatusUpdate: + """ + Attributes: + status (CallExecutionStatusUpdateStatus): + ended_reason (None | str | Unset): + """ + + status: CallExecutionStatusUpdateStatus + ended_reason: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status.value + + ended_reason: None | str | Unset + if isinstance(self.ended_reason, Unset): + ended_reason = UNSET + else: + ended_reason = self.ended_reason + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + } + ) + if ended_reason is not UNSET: + field_dict["ended_reason"] = ended_reason + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = CallExecutionStatusUpdateStatus(d.pop("status")) + + def _parse_ended_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ended_reason = _parse_ended_reason(d.pop("ended_reason", UNSET)) + + call_execution_status_update = cls( + status=status, + ended_reason=ended_reason, + ) + + call_execution_status_update.additional_properties = d + return call_execution_status_update + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_execution_status_update_status.py b/python/fi/generated/openapi_client/models/call_execution_status_update_status.py new file mode 100644 index 0000000..56c23f5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_execution_status_update_status.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class CallExecutionStatusUpdateStatus(str, Enum): + ANALYZING = "analyzing" + CANCELLED = "cancelled" + COMPLETED = "completed" + FAILED = "failed" + ONGOING = "ongoing" + PENDING = "pending" + QUEUED = "queued" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/call_log_entry_response.py b/python/fi/generated/openapi_client/models/call_log_entry_response.py new file mode 100644 index 0000000..7950728 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_log_entry_response.py @@ -0,0 +1,205 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_log_entry_response_attributes import ( + CallLogEntryResponseAttributes, + ) + from ..models.call_log_entry_response_payload import CallLogEntryResponsePayload + + +T = TypeVar("T", bound="CallLogEntryResponse") + + +@_attrs_define +class CallLogEntryResponse: + """ + Attributes: + id (str | Unset): + logged_at (None | str | Unset): + level (None | str | Unset): + severity_text (None | str | Unset): + category (None | str | Unset): + body (None | str | Unset): + attributes (CallLogEntryResponseAttributes | Unset): + payload (CallLogEntryResponsePayload | Unset): + """ + + id: str | Unset = UNSET + logged_at: None | str | Unset = UNSET + level: None | str | Unset = UNSET + severity_text: None | str | Unset = UNSET + category: None | str | Unset = UNSET + body: None | str | Unset = UNSET + attributes: CallLogEntryResponseAttributes | Unset = UNSET + payload: CallLogEntryResponsePayload | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + logged_at: None | str | Unset + if isinstance(self.logged_at, Unset): + logged_at = UNSET + else: + logged_at = self.logged_at + + level: None | str | Unset + if isinstance(self.level, Unset): + level = UNSET + else: + level = self.level + + severity_text: None | str | Unset + if isinstance(self.severity_text, Unset): + severity_text = UNSET + else: + severity_text = self.severity_text + + category: None | str | Unset + if isinstance(self.category, Unset): + category = UNSET + else: + category = self.category + + body: None | str | Unset + if isinstance(self.body, Unset): + body = UNSET + else: + body = self.body + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + payload: dict[str, Any] | Unset = UNSET + if not isinstance(self.payload, Unset): + payload = self.payload.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if logged_at is not UNSET: + field_dict["logged_at"] = logged_at + if level is not UNSET: + field_dict["level"] = level + if severity_text is not UNSET: + field_dict["severity_text"] = severity_text + if category is not UNSET: + field_dict["category"] = category + if body is not UNSET: + field_dict["body"] = body + if attributes is not UNSET: + field_dict["attributes"] = attributes + if payload is not UNSET: + field_dict["payload"] = payload + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_log_entry_response_attributes import ( + CallLogEntryResponseAttributes, + ) + from ..models.call_log_entry_response_payload import CallLogEntryResponsePayload + + d = dict(src_dict) + id = d.pop("id", UNSET) + + def _parse_logged_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + logged_at = _parse_logged_at(d.pop("logged_at", UNSET)) + + def _parse_level(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + level = _parse_level(d.pop("level", UNSET)) + + def _parse_severity_text(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + severity_text = _parse_severity_text(d.pop("severity_text", UNSET)) + + def _parse_category(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + category = _parse_category(d.pop("category", UNSET)) + + def _parse_body(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + body = _parse_body(d.pop("body", UNSET)) + + _attributes = d.pop("attributes", UNSET) + attributes: CallLogEntryResponseAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = CallLogEntryResponseAttributes.from_dict(_attributes) + + _payload = d.pop("payload", UNSET) + payload: CallLogEntryResponsePayload | Unset + if isinstance(_payload, Unset): + payload = UNSET + else: + payload = CallLogEntryResponsePayload.from_dict(_payload) + + call_log_entry_response = cls( + id=id, + logged_at=logged_at, + level=level, + severity_text=severity_text, + category=category, + body=body, + attributes=attributes, + payload=payload, + ) + + call_log_entry_response.additional_properties = d + return call_log_entry_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_log_entry_response_attributes.py b/python/fi/generated/openapi_client/models/call_log_entry_response_attributes.py new file mode 100644 index 0000000..d77af57 --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_log_entry_response_attributes.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallLogEntryResponseAttributes") + + +@_attrs_define +class CallLogEntryResponseAttributes: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_log_entry_response_attributes = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + call_log_entry_response_attributes.additional_properties = additional_properties + return call_log_entry_response_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_log_entry_response_payload.py b/python/fi/generated/openapi_client/models/call_log_entry_response_payload.py new file mode 100644 index 0000000..ef268ff --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_log_entry_response_payload.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CallLogEntryResponsePayload") + + +@_attrs_define +class CallLogEntryResponsePayload: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_log_entry_response_payload = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + call_log_entry_response_payload.additional_properties = additional_properties + return call_log_entry_response_payload + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_transcript.py b/python/fi/generated/openapi_client/models/call_transcript.py new file mode 100644 index 0000000..56cbc8b --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_transcript.py @@ -0,0 +1,160 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.call_transcript_speaker_role import CallTranscriptSpeakerRole +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CallTranscript") + + +@_attrs_define +class CallTranscript: + """ + Attributes: + content (str): Transcript content + id (UUID | Unset): + speaker_role (CallTranscriptSpeakerRole | Unset): Role of the speaker (user or assistant) + start_time_ms (int | Unset): Start time of this transcript segment in milliseconds + start_time_seconds (str | Unset): + end_time_ms (int | Unset): End time of this transcript segment in milliseconds + end_time_seconds (str | Unset): + confidence_score (float | Unset): Confidence score for this transcript segment + created_at (datetime.datetime | Unset): + """ + + content: str + id: UUID | Unset = UNSET + speaker_role: CallTranscriptSpeakerRole | Unset = UNSET + start_time_ms: int | Unset = UNSET + start_time_seconds: str | Unset = UNSET + end_time_ms: int | Unset = UNSET + end_time_seconds: str | Unset = UNSET + confidence_score: float | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + content = self.content + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + speaker_role: str | Unset = UNSET + if not isinstance(self.speaker_role, Unset): + speaker_role = self.speaker_role.value + + start_time_ms = self.start_time_ms + + start_time_seconds = self.start_time_seconds + + end_time_ms = self.end_time_ms + + end_time_seconds = self.end_time_seconds + + confidence_score = self.confidence_score + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + } + ) + if id is not UNSET: + field_dict["id"] = id + if speaker_role is not UNSET: + field_dict["speaker_role"] = speaker_role + if start_time_ms is not UNSET: + field_dict["start_time_ms"] = start_time_ms + if start_time_seconds is not UNSET: + field_dict["start_time_seconds"] = start_time_seconds + if end_time_ms is not UNSET: + field_dict["end_time_ms"] = end_time_ms + if end_time_seconds is not UNSET: + field_dict["end_time_seconds"] = end_time_seconds + if confidence_score is not UNSET: + field_dict["confidence_score"] = confidence_score + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + content = d.pop("content") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _speaker_role = d.pop("speaker_role", UNSET) + speaker_role: CallTranscriptSpeakerRole | Unset + if isinstance(_speaker_role, Unset): + speaker_role = UNSET + else: + speaker_role = CallTranscriptSpeakerRole(_speaker_role) + + start_time_ms = d.pop("start_time_ms", UNSET) + + start_time_seconds = d.pop("start_time_seconds", UNSET) + + end_time_ms = d.pop("end_time_ms", UNSET) + + end_time_seconds = d.pop("end_time_seconds", UNSET) + + confidence_score = d.pop("confidence_score", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + call_transcript = cls( + content=content, + id=id, + speaker_role=speaker_role, + start_time_ms=start_time_ms, + start_time_seconds=start_time_seconds, + end_time_ms=end_time_ms, + end_time_seconds=end_time_seconds, + confidence_score=confidence_score, + created_at=created_at, + ) + + call_transcript.additional_properties = d + return call_transcript + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_transcript_response.py b/python/fi/generated/openapi_client/models/call_transcript_response.py new file mode 100644 index 0000000..7f9751d --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_transcript_response.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_transcript import CallTranscript + + +T = TypeVar("T", bound="CallTranscriptResponse") + + +@_attrs_define +class CallTranscriptResponse: + """ + Attributes: + call_execution_id (UUID | Unset): + phone_number (None | str | Unset): + status (str | Unset): + transcripts (list[CallTranscript] | Unset): + total_transcripts (int | Unset): + """ + + call_execution_id: UUID | Unset = UNSET + phone_number: None | str | Unset = UNSET + status: str | Unset = UNSET + transcripts: list[CallTranscript] | Unset = UNSET + total_transcripts: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id: str | Unset = UNSET + if not isinstance(self.call_execution_id, Unset): + call_execution_id = str(self.call_execution_id) + + phone_number: None | str | Unset + if isinstance(self.phone_number, Unset): + phone_number = UNSET + else: + phone_number = self.phone_number + + status = self.status + + transcripts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.transcripts, Unset): + transcripts = [] + for transcripts_item_data in self.transcripts: + transcripts_item = transcripts_item_data.to_dict() + transcripts.append(transcripts_item) + + total_transcripts = self.total_transcripts + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if call_execution_id is not UNSET: + field_dict["call_execution_id"] = call_execution_id + if phone_number is not UNSET: + field_dict["phone_number"] = phone_number + if status is not UNSET: + field_dict["status"] = status + if transcripts is not UNSET: + field_dict["transcripts"] = transcripts + if total_transcripts is not UNSET: + field_dict["total_transcripts"] = total_transcripts + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_transcript import CallTranscript + + d = dict(src_dict) + _call_execution_id = d.pop("call_execution_id", UNSET) + call_execution_id: UUID | Unset + if isinstance(_call_execution_id, Unset): + call_execution_id = UNSET + else: + call_execution_id = UUID(_call_execution_id) + + def _parse_phone_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_number = _parse_phone_number(d.pop("phone_number", UNSET)) + + status = d.pop("status", UNSET) + + _transcripts = d.pop("transcripts", UNSET) + transcripts: list[CallTranscript] | Unset = UNSET + if _transcripts is not UNSET: + transcripts = [] + for transcripts_item_data in _transcripts: + transcripts_item = CallTranscript.from_dict(transcripts_item_data) + + transcripts.append(transcripts_item) + + total_transcripts = d.pop("total_transcripts", UNSET) + + call_transcript_response = cls( + call_execution_id=call_execution_id, + phone_number=phone_number, + status=status, + transcripts=transcripts, + total_transcripts=total_transcripts, + ) + + call_transcript_response.additional_properties = d + return call_transcript_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/call_transcript_speaker_role.py b/python/fi/generated/openapi_client/models/call_transcript_speaker_role.py new file mode 100644 index 0000000..58bfc6f --- /dev/null +++ b/python/fi/generated/openapi_client/models/call_transcript_speaker_role.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class CallTranscriptSpeakerRole(str, Enum): + ASSISTANT = "assistant" + SYSTEM = "system" + TOOL_CALLS = "tool_calls" + TOOL_CALL_RESULT = "tool_call_result" + UNKNOWN = "unknown" + USER = "user" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/cancel_test_execution_response.py b/python/fi/generated/openapi_client/models/cancel_test_execution_response.py new file mode 100644 index 0000000..7e85ec4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/cancel_test_execution_response.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CancelTestExecutionResponse") + + +@_attrs_define +class CancelTestExecutionResponse: + """ + Attributes: + success (bool): + message (str): + test_execution_id (None | UUID): + """ + + success: bool + message: str + test_execution_id: None | UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + success = self.success + + message = self.message + + test_execution_id: None | str + if isinstance(self.test_execution_id, UUID): + test_execution_id = str(self.test_execution_id) + else: + test_execution_id = self.test_execution_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "success": success, + "message": message, + "test_execution_id": test_execution_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + success = d.pop("success") + + message = d.pop("message") + + def _parse_test_execution_id(data: object) -> None | UUID: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + test_execution_id_type_0 = UUID(data) + + return test_execution_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UUID, data) + + test_execution_id = _parse_test_execution_id(d.pop("test_execution_id")) + + cancel_test_execution_response = cls( + success=success, + message=message, + test_execution_id=test_execution_id, + ) + + cancel_test_execution_response.additional_properties = d + return cancel_test_execution_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_message_contract.py b/python/fi/generated/openapi_client/models/chat_message_contract.py new file mode 100644 index 0000000..ccc7fec --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_message_contract.py @@ -0,0 +1,189 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.chat_message_contract_role import ChatMessageContractRole +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.chat_message_contract_metadata import ChatMessageContractMetadata + from ..models.chat_tool_call import ChatToolCall + + +T = TypeVar("T", bound="ChatMessageContract") + + +@_attrs_define +class ChatMessageContract: + """ + Attributes: + role (ChatMessageContractRole): + content (None | str | Unset): + tool_call_id (None | str | Unset): + name (None | str | Unset): + metadata (ChatMessageContractMetadata | Unset): + tool_calls (list[ChatToolCall] | None | Unset): + """ + + role: ChatMessageContractRole + content: None | str | Unset = UNSET + tool_call_id: None | str | Unset = UNSET + name: None | str | Unset = UNSET + metadata: ChatMessageContractMetadata | Unset = UNSET + tool_calls: list[ChatToolCall] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + role = self.role.value + + content: None | str | Unset + if isinstance(self.content, Unset): + content = UNSET + else: + content = self.content + + tool_call_id: None | str | Unset + if isinstance(self.tool_call_id, Unset): + tool_call_id = UNSET + else: + tool_call_id = self.tool_call_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + tool_calls: list[dict[str, Any]] | None | Unset + if isinstance(self.tool_calls, Unset): + tool_calls = UNSET + elif isinstance(self.tool_calls, list): + tool_calls = [] + for tool_calls_type_0_item_data in self.tool_calls: + tool_calls_type_0_item = tool_calls_type_0_item_data.to_dict() + tool_calls.append(tool_calls_type_0_item) + + else: + tool_calls = self.tool_calls + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "role": role, + } + ) + if content is not UNSET: + field_dict["content"] = content + if tool_call_id is not UNSET: + field_dict["tool_call_id"] = tool_call_id + if name is not UNSET: + field_dict["name"] = name + if metadata is not UNSET: + field_dict["metadata"] = metadata + if tool_calls is not UNSET: + field_dict["tool_calls"] = tool_calls + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.chat_message_contract_metadata import ChatMessageContractMetadata + from ..models.chat_tool_call import ChatToolCall + + d = dict(src_dict) + role = ChatMessageContractRole(d.pop("role")) + + def _parse_content(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + content = _parse_content(d.pop("content", UNSET)) + + def _parse_tool_call_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tool_call_id = _parse_tool_call_id(d.pop("tool_call_id", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + _metadata = d.pop("metadata", UNSET) + metadata: ChatMessageContractMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = ChatMessageContractMetadata.from_dict(_metadata) + + def _parse_tool_calls(data: object) -> list[ChatToolCall] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + tool_calls_type_0 = [] + _tool_calls_type_0 = data + for tool_calls_type_0_item_data in _tool_calls_type_0: + tool_calls_type_0_item = ChatToolCall.from_dict( + tool_calls_type_0_item_data + ) + + tool_calls_type_0.append(tool_calls_type_0_item) + + return tool_calls_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[ChatToolCall] | None | Unset, data) + + tool_calls = _parse_tool_calls(d.pop("tool_calls", UNSET)) + + chat_message_contract = cls( + role=role, + content=content, + tool_call_id=tool_call_id, + name=name, + metadata=metadata, + tool_calls=tool_calls, + ) + + chat_message_contract.additional_properties = d + return chat_message_contract + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_message_contract_metadata.py b/python/fi/generated/openapi_client/models/chat_message_contract_metadata.py new file mode 100644 index 0000000..f855bf4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_message_contract_metadata.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ChatMessageContractMetadata") + + +@_attrs_define +class ChatMessageContractMetadata: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + chat_message_contract_metadata = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + chat_message_contract_metadata.additional_properties = additional_properties + return chat_message_contract_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_message_contract_role.py b/python/fi/generated/openapi_client/models/chat_message_contract_role.py new file mode 100644 index 0000000..75d87f4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_message_contract_role.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ChatMessageContractRole(str, Enum): + ASSISTANT = "assistant" + TOOL = "tool" + USER = "user" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/chat_sdk_code_response.py b/python/fi/generated/openapi_client/models/chat_sdk_code_response.py new file mode 100644 index 0000000..cab2065 --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_sdk_code_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.chat_sdk_code_result import ChatSDKCodeResult + + +T = TypeVar("T", bound="ChatSDKCodeResponse") + + +@_attrs_define +class ChatSDKCodeResponse: + """ + Attributes: + result (ChatSDKCodeResult): + status (bool | Unset): Default: True. + """ + + result: ChatSDKCodeResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.chat_sdk_code_result import ChatSDKCodeResult + + d = dict(src_dict) + result = ChatSDKCodeResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + chat_sdk_code_response = cls( + result=result, + status=status, + ) + + chat_sdk_code_response.additional_properties = d + return chat_sdk_code_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_sdk_code_result.py b/python/fi/generated/openapi_client/models/chat_sdk_code_result.py new file mode 100644 index 0000000..a46bdba --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_sdk_code_result.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ChatSDKCodeResult") + + +@_attrs_define +class ChatSDKCodeResult: + """ + Attributes: + installation_guide (str): + sdk_code (str): + run_test_id (UUID): + run_test_name (str): + """ + + installation_guide: str + sdk_code: str + run_test_id: UUID + run_test_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + installation_guide = self.installation_guide + + sdk_code = self.sdk_code + + run_test_id = str(self.run_test_id) + + run_test_name = self.run_test_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "installation_guide": installation_guide, + "sdk_code": sdk_code, + "run_test_id": run_test_id, + "run_test_name": run_test_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + installation_guide = d.pop("installation_guide") + + sdk_code = d.pop("sdk_code") + + run_test_id = UUID(d.pop("run_test_id")) + + run_test_name = d.pop("run_test_name") + + chat_sdk_code_result = cls( + installation_guide=installation_guide, + sdk_code=sdk_code, + run_test_id=run_test_id, + run_test_name=run_test_name, + ) + + chat_sdk_code_result.additional_properties = d + return chat_sdk_code_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_send_message_response.py b/python/fi/generated/openapi_client/models/chat_send_message_response.py new file mode 100644 index 0000000..ac9fbde --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_send_message_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.chat_send_message_result import ChatSendMessageResult + + +T = TypeVar("T", bound="ChatSendMessageResponse") + + +@_attrs_define +class ChatSendMessageResponse: + """ + Attributes: + result (ChatSendMessageResult): + status (bool | Unset): Default: True. + """ + + result: ChatSendMessageResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.chat_send_message_result import ChatSendMessageResult + + d = dict(src_dict) + result = ChatSendMessageResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + chat_send_message_response = cls( + result=result, + status=status, + ) + + chat_send_message_response.additional_properties = d + return chat_send_message_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_send_message_result.py b/python/fi/generated/openapi_client/models/chat_send_message_result.py new file mode 100644 index 0000000..3dca710 --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_send_message_result.py @@ -0,0 +1,174 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.chat_message_contract import ChatMessageContract + + +T = TypeVar("T", bound="ChatSendMessageResult") + + +@_attrs_define +class ChatSendMessageResult: + """ + Attributes: + message_history (list[ChatMessageContract]): + input_message (list[ChatMessageContract] | None | Unset): + output_message (list[ChatMessageContract] | None | Unset): + chat_ended (bool | Unset): Default: False. + """ + + message_history: list[ChatMessageContract] + input_message: list[ChatMessageContract] | None | Unset = UNSET + output_message: list[ChatMessageContract] | None | Unset = UNSET + chat_ended: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message_history = [] + for message_history_item_data in self.message_history: + message_history_item = message_history_item_data.to_dict() + message_history.append(message_history_item) + + input_message: list[dict[str, Any]] | None | Unset + if isinstance(self.input_message, Unset): + input_message = UNSET + elif isinstance(self.input_message, list): + input_message = [] + for input_message_type_0_item_data in self.input_message: + input_message_type_0_item = input_message_type_0_item_data.to_dict() + input_message.append(input_message_type_0_item) + + else: + input_message = self.input_message + + output_message: list[dict[str, Any]] | None | Unset + if isinstance(self.output_message, Unset): + output_message = UNSET + elif isinstance(self.output_message, list): + output_message = [] + for output_message_type_0_item_data in self.output_message: + output_message_type_0_item = output_message_type_0_item_data.to_dict() + output_message.append(output_message_type_0_item) + + else: + output_message = self.output_message + + chat_ended = self.chat_ended + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message_history": message_history, + } + ) + if input_message is not UNSET: + field_dict["input_message"] = input_message + if output_message is not UNSET: + field_dict["output_message"] = output_message + if chat_ended is not UNSET: + field_dict["chat_ended"] = chat_ended + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.chat_message_contract import ChatMessageContract + + d = dict(src_dict) + message_history = [] + _message_history = d.pop("message_history") + for message_history_item_data in _message_history: + message_history_item = ChatMessageContract.from_dict( + message_history_item_data + ) + + message_history.append(message_history_item) + + def _parse_input_message( + data: object, + ) -> list[ChatMessageContract] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + input_message_type_0 = [] + _input_message_type_0 = data + for input_message_type_0_item_data in _input_message_type_0: + input_message_type_0_item = ChatMessageContract.from_dict( + input_message_type_0_item_data + ) + + input_message_type_0.append(input_message_type_0_item) + + return input_message_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[ChatMessageContract] | None | Unset, data) + + input_message = _parse_input_message(d.pop("input_message", UNSET)) + + def _parse_output_message( + data: object, + ) -> list[ChatMessageContract] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + output_message_type_0 = [] + _output_message_type_0 = data + for output_message_type_0_item_data in _output_message_type_0: + output_message_type_0_item = ChatMessageContract.from_dict( + output_message_type_0_item_data + ) + + output_message_type_0.append(output_message_type_0_item) + + return output_message_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[ChatMessageContract] | None | Unset, data) + + output_message = _parse_output_message(d.pop("output_message", UNSET)) + + chat_ended = d.pop("chat_ended", UNSET) + + chat_send_message_result = cls( + message_history=message_history, + input_message=input_message, + output_message=output_message, + chat_ended=chat_ended, + ) + + chat_send_message_result.additional_properties = d + return chat_send_message_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_tool_call.py b/python/fi/generated/openapi_client/models/chat_tool_call.py new file mode 100644 index 0000000..843742d --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_tool_call.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.chat_tool_call_function import ChatToolCallFunction + + +T = TypeVar("T", bound="ChatToolCall") + + +@_attrs_define +class ChatToolCall: + """ + Attributes: + id (str): + type_ (str): + function (ChatToolCallFunction): + """ + + id: str + type_: str + function: ChatToolCallFunction + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_ = self.type_ + + function = self.function.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "function": function, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.chat_tool_call_function import ChatToolCallFunction + + d = dict(src_dict) + id = d.pop("id") + + type_ = d.pop("type") + + function = ChatToolCallFunction.from_dict(d.pop("function")) + + chat_tool_call = cls( + id=id, + type_=type_, + function=function, + ) + + chat_tool_call.additional_properties = d + return chat_tool_call + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/chat_tool_call_function.py b/python/fi/generated/openapi_client/models/chat_tool_call_function.py new file mode 100644 index 0000000..06b323d --- /dev/null +++ b/python/fi/generated/openapi_client/models/chat_tool_call_function.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ChatToolCallFunction") + + +@_attrs_define +class ChatToolCallFunction: + """ + Attributes: + name (str): + arguments (str): + """ + + name: str + arguments: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + arguments = self.arguments + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "arguments": arguments, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + arguments = d.pop("arguments") + + chat_tool_call_function = cls( + name=name, + arguments=arguments, + ) + + chat_tool_call_function.additional_properties = d + return chat_tool_call_function + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/cicd_evaluation_item.py b/python/fi/generated/openapi_client/models/cicd_evaluation_item.py new file mode 100644 index 0000000..75a774d --- /dev/null +++ b/python/fi/generated/openapi_client/models/cicd_evaluation_item.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.cicd_evaluation_item_config import CICDEvaluationItemConfig + from ..models.cicd_evaluation_item_inputs import CICDEvaluationItemInputs + + +T = TypeVar("T", bound="CICDEvaluationItem") + + +@_attrs_define +class CICDEvaluationItem: + """ + Attributes: + eval_template (str): + inputs (CICDEvaluationItemInputs): + model_name (None | str | Unset): + config (CICDEvaluationItemConfig | Unset): + """ + + eval_template: str + inputs: CICDEvaluationItemInputs + model_name: None | str | Unset = UNSET + config: CICDEvaluationItemConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_template = self.eval_template + + inputs = self.inputs.to_dict() + + model_name: None | str | Unset + if isinstance(self.model_name, Unset): + model_name = UNSET + else: + model_name = self.model_name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_template": eval_template, + "inputs": inputs, + } + ) + if model_name is not UNSET: + field_dict["model_name"] = model_name + if config is not UNSET: + field_dict["config"] = config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.cicd_evaluation_item_config import CICDEvaluationItemConfig + from ..models.cicd_evaluation_item_inputs import CICDEvaluationItemInputs + + d = dict(src_dict) + eval_template = d.pop("eval_template") + + inputs = CICDEvaluationItemInputs.from_dict(d.pop("inputs")) + + def _parse_model_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model_name = _parse_model_name(d.pop("model_name", UNSET)) + + _config = d.pop("config", UNSET) + config: CICDEvaluationItemConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = CICDEvaluationItemConfig.from_dict(_config) + + cicd_evaluation_item = cls( + eval_template=eval_template, + inputs=inputs, + model_name=model_name, + config=config, + ) + + cicd_evaluation_item.additional_properties = d + return cicd_evaluation_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/cicd_evaluation_item_config.py b/python/fi/generated/openapi_client/models/cicd_evaluation_item_config.py new file mode 100644 index 0000000..42b012d --- /dev/null +++ b/python/fi/generated/openapi_client/models/cicd_evaluation_item_config.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CICDEvaluationItemConfig") + + +@_attrs_define +class CICDEvaluationItemConfig: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + cicd_evaluation_item_config = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + cicd_evaluation_item_config.additional_properties = additional_properties + return cicd_evaluation_item_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/cicd_evaluation_item_inputs.py b/python/fi/generated/openapi_client/models/cicd_evaluation_item_inputs.py new file mode 100644 index 0000000..4d2de39 --- /dev/null +++ b/python/fi/generated/openapi_client/models/cicd_evaluation_item_inputs.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CICDEvaluationItemInputs") + + +@_attrs_define +class CICDEvaluationItemInputs: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + cicd_evaluation_item_inputs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + cicd_evaluation_item_inputs.additional_properties = additional_properties + return cicd_evaluation_item_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/cicd_job.py b/python/fi/generated/openapi_client/models/cicd_job.py new file mode 100644 index 0000000..18c7a6a --- /dev/null +++ b/python/fi/generated/openapi_client/models/cicd_job.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.cicd_evaluation_item import CICDEvaluationItem + + +T = TypeVar("T", bound="CICDJob") + + +@_attrs_define +class CICDJob: + """ + Attributes: + project_name (str): + version (str): + eval_data (list[CICDEvaluationItem]): + """ + + project_name: str + version: str + eval_data: list[CICDEvaluationItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project_name = self.project_name + + version = self.version + + eval_data = [] + for eval_data_item_data in self.eval_data: + eval_data_item = eval_data_item_data.to_dict() + eval_data.append(eval_data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "project_name": project_name, + "version": version, + "eval_data": eval_data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.cicd_evaluation_item import CICDEvaluationItem + + d = dict(src_dict) + project_name = d.pop("project_name") + + version = d.pop("version") + + eval_data = [] + _eval_data = d.pop("eval_data") + for eval_data_item_data in _eval_data: + eval_data_item = CICDEvaluationItem.from_dict(eval_data_item_data) + + eval_data.append(eval_data_item) + + cicd_job = cls( + project_name=project_name, + version=version, + eval_data=eval_data, + ) + + cicd_job.additional_properties = d + return cicd_job + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/classify_column_request.py b/python/fi/generated/openapi_client/models/classify_column_request.py new file mode 100644 index 0000000..ce168a4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/classify_column_request.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ClassifyColumnRequest") + + +@_attrs_define +class ClassifyColumnRequest: + """ + Attributes: + column_id (UUID): + labels (list[str]): + language_model_id (str | Unset): Default: 'gpt-4o'. + concurrency (int | Unset): Default: 5. + new_column_name (str | Unset): + """ + + column_id: UUID + labels: list[str] + language_model_id: str | Unset = "gpt-4o" + concurrency: int | Unset = 5 + new_column_name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id = str(self.column_id) + + labels = self.labels + + language_model_id = self.language_model_id + + concurrency = self.concurrency + + new_column_name = self.new_column_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_id": column_id, + "labels": labels, + } + ) + if language_model_id is not UNSET: + field_dict["language_model_id"] = language_model_id + if concurrency is not UNSET: + field_dict["concurrency"] = concurrency + if new_column_name is not UNSET: + field_dict["new_column_name"] = new_column_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_id = UUID(d.pop("column_id")) + + labels = cast(list[str], d.pop("labels")) + + language_model_id = d.pop("language_model_id", UNSET) + + concurrency = d.pop("concurrency", UNSET) + + new_column_name = d.pop("new_column_name", UNSET) + + classify_column_request = cls( + column_id=column_id, + labels=labels, + language_model_id=language_model_id, + concurrency=concurrency, + new_column_name=new_column_name, + ) + + classify_column_request.additional_properties = d + return classify_column_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/clone_dataset_request.py b/python/fi/generated/openapi_client/models/clone_dataset_request.py new file mode 100644 index 0000000..84f93b5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/clone_dataset_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CloneDatasetRequest") + + +@_attrs_define +class CloneDatasetRequest: + """ + Attributes: + new_dataset_name (str | Unset): + """ + + new_dataset_name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + new_dataset_name = self.new_dataset_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if new_dataset_name is not UNSET: + field_dict["new_dataset_name"] = new_dataset_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + new_dataset_name = d.pop("new_dataset_name", UNSET) + + clone_dataset_request = cls( + new_dataset_name=new_dataset_name, + ) + + clone_dataset_request.additional_properties = d + return clone_dataset_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/co_occurring_issue.py b/python/fi/generated/openapi_client/models/co_occurring_issue.py new file mode 100644 index 0000000..6d27096 --- /dev/null +++ b/python/fi/generated/openapi_client/models/co_occurring_issue.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CoOccurringIssue") + + +@_attrs_define +class CoOccurringIssue: + """ + Attributes: + id (str): + title (str): + type_ (str): + co_occurrence (float): + count (int): + severity (str): + """ + + id: str + title: str + type_: str + co_occurrence: float + count: int + severity: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + title = self.title + + type_ = self.type_ + + co_occurrence = self.co_occurrence + + count = self.count + + severity = self.severity + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "title": title, + "type": type_, + "co_occurrence": co_occurrence, + "count": count, + "severity": severity, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + title = d.pop("title") + + type_ = d.pop("type") + + co_occurrence = d.pop("co_occurrence") + + count = d.pop("count") + + severity = d.pop("severity") + + co_occurring_issue = cls( + id=id, + title=title, + type_=type_, + co_occurrence=co_occurrence, + count=count, + severity=severity, + ) + + co_occurring_issue.additional_properties = d + return co_occurring_issue + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/column.py b/python/fi/generated/openapi_client/models/column.py new file mode 100644 index 0000000..bb2ad7a --- /dev/null +++ b/python/fi/generated/openapi_client/models/column.py @@ -0,0 +1,148 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.column_data_type import ColumnDataType +from ..models.column_source import ColumnSource +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Column") + + +@_attrs_define +class Column: + """ + Attributes: + name (str): + data_type (ColumnDataType): + source (ColumnSource): + id (UUID | Unset): + dataset (None | Unset | UUID): + source_id (None | str | Unset): + """ + + name: str + data_type: ColumnDataType + source: ColumnSource + id: UUID | Unset = UNSET + dataset: None | Unset | UUID = UNSET + source_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + data_type = self.data_type.value + + source = self.source.value + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + dataset: None | str | Unset + if isinstance(self.dataset, Unset): + dataset = UNSET + elif isinstance(self.dataset, UUID): + dataset = str(self.dataset) + else: + dataset = self.dataset + + source_id: None | str | Unset + if isinstance(self.source_id, Unset): + source_id = UNSET + else: + source_id = self.source_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "data_type": data_type, + "source": source, + } + ) + if id is not UNSET: + field_dict["id"] = id + if dataset is not UNSET: + field_dict["dataset"] = dataset + if source_id is not UNSET: + field_dict["source_id"] = source_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + data_type = ColumnDataType(d.pop("data_type")) + + source = ColumnSource(d.pop("source")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_dataset(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + dataset_type_0 = UUID(data) + + return dataset_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + dataset = _parse_dataset(d.pop("dataset", UNSET)) + + def _parse_source_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source_id = _parse_source_id(d.pop("source_id", UNSET)) + + column = cls( + name=name, + data_type=data_type, + source=source, + id=id, + dataset=dataset, + source_id=source_id, + ) + + column.additional_properties = d + return column + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/column_data_type.py b/python/fi/generated/openapi_client/models/column_data_type.py new file mode 100644 index 0000000..50d833b --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_data_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ColumnDataType(str, Enum): + ARRAY = "array" + AUDIO = "audio" + BOOLEAN = "boolean" + DATETIME = "datetime" + DOCUMENT = "document" + FLOAT = "float" + IMAGE = "image" + IMAGES = "images" + INTEGER = "integer" + JSON = "json" + OTHERS = "others" + PERSONA = "persona" + TEXT = "text" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/column_definition.py b/python/fi/generated/openapi_client/models/column_definition.py new file mode 100644 index 0000000..3344b7d --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_definition.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.column_definition_data_type import ColumnDefinitionDataType + +T = TypeVar("T", bound="ColumnDefinition") + + +@_attrs_define +class ColumnDefinition: + """ + Attributes: + name (str): + data_type (ColumnDefinitionDataType): + description (str): + """ + + name: str + data_type: ColumnDefinitionDataType + description: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + data_type = self.data_type.value + + description = self.description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "data_type": data_type, + "description": description, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + data_type = ColumnDefinitionDataType(d.pop("data_type")) + + description = d.pop("description") + + column_definition = cls( + name=name, + data_type=data_type, + description=description, + ) + + column_definition.additional_properties = d + return column_definition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/column_definition_data_type.py b/python/fi/generated/openapi_client/models/column_definition_data_type.py new file mode 100644 index 0000000..9c25c77 --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_definition_data_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ColumnDefinitionDataType(str, Enum): + ARRAY = "array" + AUDIO = "audio" + BOOLEAN = "boolean" + DATETIME = "datetime" + DOCUMENT = "document" + FLOAT = "float" + IMAGE = "image" + IMAGES = "images" + INTEGER = "integer" + JSON = "json" + OTHERS = "others" + PERSONA = "persona" + TEXT = "text" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/column_order.py b/python/fi/generated/openapi_client/models/column_order.py new file mode 100644 index 0000000..9ef5d75 --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_order.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ColumnOrder") + + +@_attrs_define +class ColumnOrder: + """ + Attributes: + column_name (str): + id (str): + visible (bool): + """ + + column_name: str + id: str + visible: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_name = self.column_name + + id = self.id + + visible = self.visible + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_name": column_name, + "id": id, + "visible": visible, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_name = d.pop("column_name") + + id = d.pop("id") + + visible = d.pop("visible") + + column_order = cls( + column_name=column_name, + id=id, + visible=visible, + ) + + column_order.additional_properties = d + return column_order + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/column_source.py b/python/fi/generated/openapi_client/models/column_source.py new file mode 100644 index 0000000..68e9aa3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_source.py @@ -0,0 +1,27 @@ +from enum import Enum + + +class ColumnSource(str, Enum): + ANNOTATION_LABEL = "annotation_label" + API_CALL = "api_call" + CLASSIFICATION = "classification" + CONDITIONAL = "conditional" + EVALUATION = "evaluation" + EVALUATION_REASON = "evaluation_reason" + EVALUATION_TAGS = "evaluation_tags" + EVAL_PLAYGROUND = "eval_playground" + EXPERIMENT = "experiment" + EXPERIMENT_EVALUATION = "experiment_evaluation" + EXPERIMENT_EVALUATION_TAGS = "experiment_evaluation_tags" + EXTRACTED_ENTITIES = "extracted_entities" + EXTRACTED_JSON = "extracted_json" + OPTIMISATION = "optimisation" + OPTIMISATION_EVALUATION = "optimisation_evaluation" + OPTIMISATION_EVALUATION_TAGS = "optimisation_evaluation_tags" + OTHERS = "OTHERS" + PYTHON_CODE = "python_code" + RUN_PROMPT = "run_prompt" + VECTOR_DB = "vector_db" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/column_type_conversion_response.py b/python/fi/generated/openapi_client/models/column_type_conversion_response.py new file mode 100644 index 0000000..af5c121 --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_type_conversion_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.column_type_conversion_result import ColumnTypeConversionResult + + +T = TypeVar("T", bound="ColumnTypeConversionResponse") + + +@_attrs_define +class ColumnTypeConversionResponse: + """ + Attributes: + status (bool): + result (ColumnTypeConversionResult): + """ + + status: bool + result: ColumnTypeConversionResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.column_type_conversion_result import ColumnTypeConversionResult + + d = dict(src_dict) + status = d.pop("status") + + result = ColumnTypeConversionResult.from_dict(d.pop("result")) + + column_type_conversion_response = cls( + status=status, + result=result, + ) + + column_type_conversion_response.additional_properties = d + return column_type_conversion_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/column_type_conversion_result.py b/python/fi/generated/openapi_client/models/column_type_conversion_result.py new file mode 100644 index 0000000..34e604b --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_type_conversion_result.py @@ -0,0 +1,172 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.column_type_conversion_result_invalid_values_item import ( + ColumnTypeConversionResultInvalidValuesItem, + ) + from ..models.column_type_conversion_result_valid_conversion_samples import ( + ColumnTypeConversionResultValidConversionSamples, + ) + + +T = TypeVar("T", bound="ColumnTypeConversionResult") + + +@_attrs_define +class ColumnTypeConversionResult: + """ + Attributes: + message (str | Unset): + column_id (UUID | Unset): + new_data_type (str | Unset): + status (str | Unset): + invalid_count (int | Unset): + invalid_values (list[ColumnTypeConversionResultInvalidValuesItem] | Unset): + valid_conversion_samples (ColumnTypeConversionResultValidConversionSamples | Unset): + """ + + message: str | Unset = UNSET + column_id: UUID | Unset = UNSET + new_data_type: str | Unset = UNSET + status: str | Unset = UNSET + invalid_count: int | Unset = UNSET + invalid_values: list[ColumnTypeConversionResultInvalidValuesItem] | Unset = UNSET + valid_conversion_samples: ( + ColumnTypeConversionResultValidConversionSamples | Unset + ) = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + column_id: str | Unset = UNSET + if not isinstance(self.column_id, Unset): + column_id = str(self.column_id) + + new_data_type = self.new_data_type + + status = self.status + + invalid_count = self.invalid_count + + invalid_values: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.invalid_values, Unset): + invalid_values = [] + for invalid_values_item_data in self.invalid_values: + invalid_values_item = invalid_values_item_data.to_dict() + invalid_values.append(invalid_values_item) + + valid_conversion_samples: dict[str, Any] | Unset = UNSET + if not isinstance(self.valid_conversion_samples, Unset): + valid_conversion_samples = self.valid_conversion_samples.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if column_id is not UNSET: + field_dict["column_id"] = column_id + if new_data_type is not UNSET: + field_dict["new_data_type"] = new_data_type + if status is not UNSET: + field_dict["status"] = status + if invalid_count is not UNSET: + field_dict["invalid_count"] = invalid_count + if invalid_values is not UNSET: + field_dict["invalid_values"] = invalid_values + if valid_conversion_samples is not UNSET: + field_dict["valid_conversion_samples"] = valid_conversion_samples + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.column_type_conversion_result_invalid_values_item import ( + ColumnTypeConversionResultInvalidValuesItem, + ) + from ..models.column_type_conversion_result_valid_conversion_samples import ( + ColumnTypeConversionResultValidConversionSamples, + ) + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _column_id = d.pop("column_id", UNSET) + column_id: UUID | Unset + if isinstance(_column_id, Unset): + column_id = UNSET + else: + column_id = UUID(_column_id) + + new_data_type = d.pop("new_data_type", UNSET) + + status = d.pop("status", UNSET) + + invalid_count = d.pop("invalid_count", UNSET) + + _invalid_values = d.pop("invalid_values", UNSET) + invalid_values: list[ColumnTypeConversionResultInvalidValuesItem] | Unset = ( + UNSET + ) + if _invalid_values is not UNSET: + invalid_values = [] + for invalid_values_item_data in _invalid_values: + invalid_values_item = ( + ColumnTypeConversionResultInvalidValuesItem.from_dict( + invalid_values_item_data + ) + ) + + invalid_values.append(invalid_values_item) + + _valid_conversion_samples = d.pop("valid_conversion_samples", UNSET) + valid_conversion_samples: ( + ColumnTypeConversionResultValidConversionSamples | Unset + ) + if isinstance(_valid_conversion_samples, Unset): + valid_conversion_samples = UNSET + else: + valid_conversion_samples = ( + ColumnTypeConversionResultValidConversionSamples.from_dict( + _valid_conversion_samples + ) + ) + + column_type_conversion_result = cls( + message=message, + column_id=column_id, + new_data_type=new_data_type, + status=status, + invalid_count=invalid_count, + invalid_values=invalid_values, + valid_conversion_samples=valid_conversion_samples, + ) + + column_type_conversion_result.additional_properties = d + return column_type_conversion_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/column_type_conversion_result_invalid_values_item.py b/python/fi/generated/openapi_client/models/column_type_conversion_result_invalid_values_item.py new file mode 100644 index 0000000..51aa907 --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_type_conversion_result_invalid_values_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ColumnTypeConversionResultInvalidValuesItem") + + +@_attrs_define +class ColumnTypeConversionResultInvalidValuesItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_type_conversion_result_invalid_values_item = cls() + + column_type_conversion_result_invalid_values_item.additional_properties = d + return column_type_conversion_result_invalid_values_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/column_type_conversion_result_valid_conversion_samples.py b/python/fi/generated/openapi_client/models/column_type_conversion_result_valid_conversion_samples.py new file mode 100644 index 0000000..b05ed15 --- /dev/null +++ b/python/fi/generated/openapi_client/models/column_type_conversion_result_valid_conversion_samples.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ColumnTypeConversionResultValidConversionSamples") + + +@_attrs_define +class ColumnTypeConversionResultValidConversionSamples: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_type_conversion_result_valid_conversion_samples = cls() + + column_type_conversion_result_valid_conversion_samples.additional_properties = d + return column_type_conversion_result_valid_conversion_samples + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset.py b/python/fi/generated/openapi_client/models/compare_dataset.py new file mode 100644 index 0000000..a6caae1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset.py @@ -0,0 +1,161 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compare_dataset_dataset_info import CompareDatasetDatasetInfo + + +T = TypeVar("T", bound="CompareDataset") + + +@_attrs_define +class CompareDataset: + """ + Attributes: + base_column_name (str): + dataset_ids (list[UUID]): + compare_id (None | Unset | UUID): + page_size (int | Unset): Default: 10. + current_page_index (int | Unset): Default: 0. + dataset_info (CompareDatasetDatasetInfo | Unset): + common_column_names (list[str] | Unset): + """ + + base_column_name: str + dataset_ids: list[UUID] + compare_id: None | Unset | UUID = UNSET + page_size: int | Unset = 10 + current_page_index: int | Unset = 0 + dataset_info: CompareDatasetDatasetInfo | Unset = UNSET + common_column_names: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + base_column_name = self.base_column_name + + dataset_ids = [] + for dataset_ids_item_data in self.dataset_ids: + dataset_ids_item = str(dataset_ids_item_data) + dataset_ids.append(dataset_ids_item) + + compare_id: None | str | Unset + if isinstance(self.compare_id, Unset): + compare_id = UNSET + elif isinstance(self.compare_id, UUID): + compare_id = str(self.compare_id) + else: + compare_id = self.compare_id + + page_size = self.page_size + + current_page_index = self.current_page_index + + dataset_info: dict[str, Any] | Unset = UNSET + if not isinstance(self.dataset_info, Unset): + dataset_info = self.dataset_info.to_dict() + + common_column_names: list[str] | Unset = UNSET + if not isinstance(self.common_column_names, Unset): + common_column_names = self.common_column_names + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "base_column_name": base_column_name, + "dataset_ids": dataset_ids, + } + ) + if compare_id is not UNSET: + field_dict["compare_id"] = compare_id + if page_size is not UNSET: + field_dict["page_size"] = page_size + if current_page_index is not UNSET: + field_dict["current_page_index"] = current_page_index + if dataset_info is not UNSET: + field_dict["dataset_info"] = dataset_info + if common_column_names is not UNSET: + field_dict["common_column_names"] = common_column_names + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_dataset_info import CompareDatasetDatasetInfo + + d = dict(src_dict) + base_column_name = d.pop("base_column_name") + + dataset_ids = [] + _dataset_ids = d.pop("dataset_ids") + for dataset_ids_item_data in _dataset_ids: + dataset_ids_item = UUID(dataset_ids_item_data) + + dataset_ids.append(dataset_ids_item) + + def _parse_compare_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + compare_id_type_0 = UUID(data) + + return compare_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + compare_id = _parse_compare_id(d.pop("compare_id", UNSET)) + + page_size = d.pop("page_size", UNSET) + + current_page_index = d.pop("current_page_index", UNSET) + + _dataset_info = d.pop("dataset_info", UNSET) + dataset_info: CompareDatasetDatasetInfo | Unset + if isinstance(_dataset_info, Unset): + dataset_info = UNSET + else: + dataset_info = CompareDatasetDatasetInfo.from_dict(_dataset_info) + + common_column_names = cast(list[str], d.pop("common_column_names", UNSET)) + + compare_dataset = cls( + base_column_name=base_column_name, + dataset_ids=dataset_ids, + compare_id=compare_id, + page_size=page_size, + current_page_index=current_page_index, + dataset_info=dataset_info, + common_column_names=common_column_names, + ) + + compare_dataset.additional_properties = d + return compare_dataset + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_dataset_info.py b/python/fi/generated/openapi_client/models/compare_dataset_dataset_info.py new file mode 100644 index 0000000..843c7a0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_dataset_info.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareDatasetDatasetInfo") + + +@_attrs_define +class CompareDatasetDatasetInfo: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_dataset_dataset_info = cls() + + compare_dataset_dataset_info.additional_properties = d + return compare_dataset_dataset_info + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_delete_response.py b/python/fi/generated/openapi_client/models/compare_dataset_delete_response.py new file mode 100644 index 0000000..6526114 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_delete_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compare_dataset_delete_result import CompareDatasetDeleteResult + + +T = TypeVar("T", bound="CompareDatasetDeleteResponse") + + +@_attrs_define +class CompareDatasetDeleteResponse: + """ + Attributes: + status (bool): + result (CompareDatasetDeleteResult): + """ + + status: bool + result: CompareDatasetDeleteResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_delete_result import CompareDatasetDeleteResult + + d = dict(src_dict) + status = d.pop("status") + + result = CompareDatasetDeleteResult.from_dict(d.pop("result")) + + compare_dataset_delete_response = cls( + status=status, + result=result, + ) + + compare_dataset_delete_response.additional_properties = d + return compare_dataset_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_delete_result.py b/python/fi/generated/openapi_client/models/compare_dataset_delete_result.py new file mode 100644 index 0000000..260ec94 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_delete_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareDatasetDeleteResult") + + +@_attrs_define +class CompareDatasetDeleteResult: + """ + Attributes: + message (str): + """ + + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + compare_dataset_delete_result = cls( + message=message, + ) + + compare_dataset_delete_result.additional_properties = d + return compare_dataset_delete_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_metadata.py b/python/fi/generated/openapi_client/models/compare_dataset_metadata.py new file mode 100644 index 0000000..ba93bb3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_metadata.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareDatasetMetadata") + + +@_attrs_define +class CompareDatasetMetadata: + """ + Attributes: + compare_id (UUID): + total_rows (int): + total_pages (int): + """ + + compare_id: UUID + total_rows: int + total_pages: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + compare_id = str(self.compare_id) + + total_rows = self.total_rows + + total_pages = self.total_pages + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "compare_id": compare_id, + "total_rows": total_rows, + "total_pages": total_pages, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_id = UUID(d.pop("compare_id")) + + total_rows = d.pop("total_rows") + + total_pages = d.pop("total_pages") + + compare_dataset_metadata = cls( + compare_id=compare_id, + total_rows=total_rows, + total_pages=total_pages, + ) + + compare_dataset_metadata.additional_properties = d + return compare_dataset_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_response.py b/python/fi/generated/openapi_client/models/compare_dataset_response.py new file mode 100644 index 0000000..a4ec8da --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compare_dataset_result import CompareDatasetResult + + +T = TypeVar("T", bound="CompareDatasetResponse") + + +@_attrs_define +class CompareDatasetResponse: + """ + Attributes: + status (bool): + result (CompareDatasetResult): + """ + + status: bool + result: CompareDatasetResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_result import CompareDatasetResult + + d = dict(src_dict) + status = d.pop("status") + + result = CompareDatasetResult.from_dict(d.pop("result")) + + compare_dataset_response = cls( + status=status, + result=result, + ) + + compare_dataset_response.additional_properties = d + return compare_dataset_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_result.py b/python/fi/generated/openapi_client/models/compare_dataset_result.py new file mode 100644 index 0000000..028ab98 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_result.py @@ -0,0 +1,128 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compare_dataset_metadata import CompareDatasetMetadata + from ..models.compare_dataset_result_column_config_item import ( + CompareDatasetResultColumnConfigItem, + ) + from ..models.compare_dataset_result_table_item import CompareDatasetResultTableItem + + +T = TypeVar("T", bound="CompareDatasetResult") + + +@_attrs_define +class CompareDatasetResult: + """ + Attributes: + metadata (CompareDatasetMetadata | Unset): + column_config (list[CompareDatasetResultColumnConfigItem] | Unset): + table (list[CompareDatasetResultTableItem] | Unset): + """ + + metadata: CompareDatasetMetadata | Unset = UNSET + column_config: list[CompareDatasetResultColumnConfigItem] | Unset = UNSET + table: list[CompareDatasetResultTableItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + column_config: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.column_config, Unset): + column_config = [] + for column_config_item_data in self.column_config: + column_config_item = column_config_item_data.to_dict() + column_config.append(column_config_item) + + table: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.table, Unset): + table = [] + for table_item_data in self.table: + table_item = table_item_data.to_dict() + table.append(table_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if metadata is not UNSET: + field_dict["metadata"] = metadata + if column_config is not UNSET: + field_dict["column_config"] = column_config + if table is not UNSET: + field_dict["table"] = table + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_metadata import CompareDatasetMetadata + from ..models.compare_dataset_result_column_config_item import ( + CompareDatasetResultColumnConfigItem, + ) + from ..models.compare_dataset_result_table_item import ( + CompareDatasetResultTableItem, + ) + + d = dict(src_dict) + _metadata = d.pop("metadata", UNSET) + metadata: CompareDatasetMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = CompareDatasetMetadata.from_dict(_metadata) + + _column_config = d.pop("column_config", UNSET) + column_config: list[CompareDatasetResultColumnConfigItem] | Unset = UNSET + if _column_config is not UNSET: + column_config = [] + for column_config_item_data in _column_config: + column_config_item = CompareDatasetResultColumnConfigItem.from_dict( + column_config_item_data + ) + + column_config.append(column_config_item) + + _table = d.pop("table", UNSET) + table: list[CompareDatasetResultTableItem] | Unset = UNSET + if _table is not UNSET: + table = [] + for table_item_data in _table: + table_item = CompareDatasetResultTableItem.from_dict(table_item_data) + + table.append(table_item) + + compare_dataset_result = cls( + metadata=metadata, + column_config=column_config, + table=table, + ) + + compare_dataset_result.additional_properties = d + return compare_dataset_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_result_column_config_item.py b/python/fi/generated/openapi_client/models/compare_dataset_result_column_config_item.py new file mode 100644 index 0000000..ee07192 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_result_column_config_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareDatasetResultColumnConfigItem") + + +@_attrs_define +class CompareDatasetResultColumnConfigItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_dataset_result_column_config_item = cls() + + compare_dataset_result_column_config_item.additional_properties = d + return compare_dataset_result_column_config_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_result_table_item.py b/python/fi/generated/openapi_client/models/compare_dataset_result_table_item.py new file mode 100644 index 0000000..f5b629c --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_result_table_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareDatasetResultTableItem") + + +@_attrs_define +class CompareDatasetResultTableItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_dataset_result_table_item = cls() + + compare_dataset_result_table_item.additional_properties = d + return compare_dataset_result_table_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_row_response.py b/python/fi/generated/openapi_client/models/compare_dataset_row_response.py new file mode 100644 index 0000000..86bc9c4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_row_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compare_dataset_row_result import CompareDatasetRowResult + + +T = TypeVar("T", bound="CompareDatasetRowResponse") + + +@_attrs_define +class CompareDatasetRowResponse: + """ + Attributes: + status (bool): + result (CompareDatasetRowResult): + """ + + status: bool + result: CompareDatasetRowResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_row_result import CompareDatasetRowResult + + d = dict(src_dict) + status = d.pop("status") + + result = CompareDatasetRowResult.from_dict(d.pop("result")) + + compare_dataset_row_response = cls( + status=status, + result=result, + ) + + compare_dataset_row_response.additional_properties = d + return compare_dataset_row_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_row_result.py b/python/fi/generated/openapi_client/models/compare_dataset_row_result.py new file mode 100644 index 0000000..234f3b1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_row_result.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compare_dataset_row_result_table_item import ( + CompareDatasetRowResultTableItem, + ) + + +T = TypeVar("T", bound="CompareDatasetRowResult") + + +@_attrs_define +class CompareDatasetRowResult: + """ + Attributes: + table (list[CompareDatasetRowResultTableItem]): + prev_row_id (None | Unset | UUID): + next_row_id (None | Unset | UUID): + """ + + table: list[CompareDatasetRowResultTableItem] + prev_row_id: None | Unset | UUID = UNSET + next_row_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + table = [] + for table_item_data in self.table: + table_item = table_item_data.to_dict() + table.append(table_item) + + prev_row_id: None | str | Unset + if isinstance(self.prev_row_id, Unset): + prev_row_id = UNSET + elif isinstance(self.prev_row_id, UUID): + prev_row_id = str(self.prev_row_id) + else: + prev_row_id = self.prev_row_id + + next_row_id: None | str | Unset + if isinstance(self.next_row_id, Unset): + next_row_id = UNSET + elif isinstance(self.next_row_id, UUID): + next_row_id = str(self.next_row_id) + else: + next_row_id = self.next_row_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "table": table, + } + ) + if prev_row_id is not UNSET: + field_dict["prev_row_id"] = prev_row_id + if next_row_id is not UNSET: + field_dict["next_row_id"] = next_row_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_row_result_table_item import ( + CompareDatasetRowResultTableItem, + ) + + d = dict(src_dict) + table = [] + _table = d.pop("table") + for table_item_data in _table: + table_item = CompareDatasetRowResultTableItem.from_dict(table_item_data) + + table.append(table_item) + + def _parse_prev_row_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prev_row_id_type_0 = UUID(data) + + return prev_row_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prev_row_id = _parse_prev_row_id(d.pop("prev_row_id", UNSET)) + + def _parse_next_row_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + next_row_id_type_0 = UUID(data) + + return next_row_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + next_row_id = _parse_next_row_id(d.pop("next_row_id", UNSET)) + + compare_dataset_row_result = cls( + table=table, + prev_row_id=prev_row_id, + next_row_id=next_row_id, + ) + + compare_dataset_row_result.additional_properties = d + return compare_dataset_row_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_row_result_table_item.py b/python/fi/generated/openapi_client/models/compare_dataset_row_result_table_item.py new file mode 100644 index 0000000..bfe3b66 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_row_result_table_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareDatasetRowResultTableItem") + + +@_attrs_define +class CompareDatasetRowResultTableItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_dataset_row_result_table_item = cls() + + compare_dataset_row_result_table_item.additional_properties = d + return compare_dataset_row_result_table_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_stats_request.py b/python/fi/generated/openapi_client/models/compare_dataset_stats_request.py new file mode 100644 index 0000000..fdb7c09 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_stats_request.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.compare_dataset_stats_request_stat_type import ( + CompareDatasetStatsRequestStatType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompareDatasetStatsRequest") + + +@_attrs_define +class CompareDatasetStatsRequest: + """ + Attributes: + base_column_name (str): + dataset_ids (list[UUID]): + stat_type (CompareDatasetStatsRequestStatType | Unset): Default: CompareDatasetStatsRequestStatType.EVALUATION. + """ + + base_column_name: str + dataset_ids: list[UUID] + stat_type: CompareDatasetStatsRequestStatType | Unset = ( + CompareDatasetStatsRequestStatType.EVALUATION + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + base_column_name = self.base_column_name + + dataset_ids = [] + for dataset_ids_item_data in self.dataset_ids: + dataset_ids_item = str(dataset_ids_item_data) + dataset_ids.append(dataset_ids_item) + + stat_type: str | Unset = UNSET + if not isinstance(self.stat_type, Unset): + stat_type = self.stat_type.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "base_column_name": base_column_name, + "dataset_ids": dataset_ids, + } + ) + if stat_type is not UNSET: + field_dict["stat_type"] = stat_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + base_column_name = d.pop("base_column_name") + + dataset_ids = [] + _dataset_ids = d.pop("dataset_ids") + for dataset_ids_item_data in _dataset_ids: + dataset_ids_item = UUID(dataset_ids_item_data) + + dataset_ids.append(dataset_ids_item) + + _stat_type = d.pop("stat_type", UNSET) + stat_type: CompareDatasetStatsRequestStatType | Unset + if isinstance(_stat_type, Unset): + stat_type = UNSET + else: + stat_type = CompareDatasetStatsRequestStatType(_stat_type) + + compare_dataset_stats_request = cls( + base_column_name=base_column_name, + dataset_ids=dataset_ids, + stat_type=stat_type, + ) + + compare_dataset_stats_request.additional_properties = d + return compare_dataset_stats_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_stats_request_stat_type.py b/python/fi/generated/openapi_client/models/compare_dataset_stats_request_stat_type.py new file mode 100644 index 0000000..c0662a9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_stats_request_stat_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CompareDatasetStatsRequestStatType(str, Enum): + EVALUATION = "evaluation" + RUN_PROMPT = "run_prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/compare_dataset_stats_response.py b/python/fi/generated/openapi_client/models/compare_dataset_stats_response.py new file mode 100644 index 0000000..0c666cc --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_stats_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compare_dataset_stats_response_result import ( + CompareDatasetStatsResponseResult, + ) + + +T = TypeVar("T", bound="CompareDatasetStatsResponse") + + +@_attrs_define +class CompareDatasetStatsResponse: + """ + Attributes: + status (bool): + result (CompareDatasetStatsResponseResult): + """ + + status: bool + result: CompareDatasetStatsResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_stats_response_result import ( + CompareDatasetStatsResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = CompareDatasetStatsResponseResult.from_dict(d.pop("result")) + + compare_dataset_stats_response = cls( + status=status, + result=result, + ) + + compare_dataset_stats_response.additional_properties = d + return compare_dataset_stats_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_stats_response_result.py b/python/fi/generated/openapi_client/models/compare_dataset_stats_response_result.py new file mode 100644 index 0000000..bdc8b41 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_stats_response_result.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compare_dataset_stats_response_result_additional_property_item import ( + CompareDatasetStatsResponseResultAdditionalPropertyItem, + ) + + +T = TypeVar("T", bound="CompareDatasetStatsResponseResult") + + +@_attrs_define +class CompareDatasetStatsResponseResult: + """ """ + + additional_properties: dict[ + str, list[CompareDatasetStatsResponseResultAdditionalPropertyItem] + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = [] + for additional_property_item_data in prop: + additional_property_item = additional_property_item_data.to_dict() + field_dict[prop_name].append(additional_property_item) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_dataset_stats_response_result_additional_property_item import ( + CompareDatasetStatsResponseResultAdditionalPropertyItem, + ) + + d = dict(src_dict) + compare_dataset_stats_response_result = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = [] + _additional_property = prop_dict + for additional_property_item_data in _additional_property: + additional_property_item = ( + CompareDatasetStatsResponseResultAdditionalPropertyItem.from_dict( + additional_property_item_data + ) + ) + + additional_property.append(additional_property_item) + + additional_properties[prop_name] = additional_property + + compare_dataset_stats_response_result.additional_properties = ( + additional_properties + ) + return compare_dataset_stats_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> list[CompareDatasetStatsResponseResultAdditionalPropertyItem]: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: list[CompareDatasetStatsResponseResultAdditionalPropertyItem], + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_dataset_stats_response_result_additional_property_item.py b/python/fi/generated/openapi_client/models/compare_dataset_stats_response_result_additional_property_item.py new file mode 100644 index 0000000..1c3792e --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_dataset_stats_response_result_additional_property_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareDatasetStatsResponseResultAdditionalPropertyItem") + + +@_attrs_define +class CompareDatasetStatsResponseResultAdditionalPropertyItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_dataset_stats_response_result_additional_property_item = cls() + + compare_dataset_stats_response_result_additional_property_item.additional_properties = d + return compare_dataset_stats_response_result_additional_property_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_eval_list_response.py b/python/fi/generated/openapi_client/models/compare_eval_list_response.py new file mode 100644 index 0000000..4afa313 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_eval_list_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compare_eval_list_result import CompareEvalListResult + + +T = TypeVar("T", bound="CompareEvalListResponse") + + +@_attrs_define +class CompareEvalListResponse: + """ + Attributes: + status (bool): + result (CompareEvalListResult): + """ + + status: bool + result: CompareEvalListResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_eval_list_result import CompareEvalListResult + + d = dict(src_dict) + status = d.pop("status") + + result = CompareEvalListResult.from_dict(d.pop("result")) + + compare_eval_list_response = cls( + status=status, + result=result, + ) + + compare_eval_list_response.additional_properties = d + return compare_eval_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_eval_list_result.py b/python/fi/generated/openapi_client/models/compare_eval_list_result.py new file mode 100644 index 0000000..e279960 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_eval_list_result.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.compare_eval_list_result_evals_item import ( + CompareEvalListResultEvalsItem, + ) + + +T = TypeVar("T", bound="CompareEvalListResult") + + +@_attrs_define +class CompareEvalListResult: + """ + Attributes: + evals (list[CompareEvalListResultEvalsItem]): + """ + + evals: list[CompareEvalListResultEvalsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + evals = [] + for evals_item_data in self.evals: + evals_item = evals_item_data.to_dict() + evals.append(evals_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "evals": evals, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_eval_list_result_evals_item import ( + CompareEvalListResultEvalsItem, + ) + + d = dict(src_dict) + evals = [] + _evals = d.pop("evals") + for evals_item_data in _evals: + evals_item = CompareEvalListResultEvalsItem.from_dict(evals_item_data) + + evals.append(evals_item) + + compare_eval_list_result = cls( + evals=evals, + ) + + compare_eval_list_result.additional_properties = d + return compare_eval_list_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_eval_list_result_evals_item.py b/python/fi/generated/openapi_client/models/compare_eval_list_result_evals_item.py new file mode 100644 index 0000000..847acab --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_eval_list_result_evals_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareEvalListResultEvalsItem") + + +@_attrs_define +class CompareEvalListResultEvalsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_eval_list_result_evals_item = cls() + + compare_eval_list_result_evals_item.additional_properties = d + return compare_eval_list_result_evals_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_evals_list_request.py b/python/fi/generated/openapi_client/models/compare_evals_list_request.py new file mode 100644 index 0000000..f7a42d6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_evals_list_request.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.compare_evals_list_request_eval_type import ( + CompareEvalsListRequestEvalType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompareEvalsListRequest") + + +@_attrs_define +class CompareEvalsListRequest: + """ + Attributes: + eval_type (CompareEvalsListRequestEvalType): + dataset_ids (list[UUID]): + search_text (str | Unset): Default: ''. + """ + + eval_type: CompareEvalsListRequestEvalType + dataset_ids: list[UUID] + search_text: str | Unset = "" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_type = self.eval_type.value + + dataset_ids = [] + for dataset_ids_item_data in self.dataset_ids: + dataset_ids_item = str(dataset_ids_item_data) + dataset_ids.append(dataset_ids_item) + + search_text = self.search_text + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_type": eval_type, + "dataset_ids": dataset_ids, + } + ) + if search_text is not UNSET: + field_dict["search_text"] = search_text + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_type = CompareEvalsListRequestEvalType(d.pop("eval_type")) + + dataset_ids = [] + _dataset_ids = d.pop("dataset_ids") + for dataset_ids_item_data in _dataset_ids: + dataset_ids_item = UUID(dataset_ids_item_data) + + dataset_ids.append(dataset_ids_item) + + search_text = d.pop("search_text", UNSET) + + compare_evals_list_request = cls( + eval_type=eval_type, + dataset_ids=dataset_ids, + search_text=search_text, + ) + + compare_evals_list_request.additional_properties = d + return compare_evals_list_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_evals_list_request_eval_type.py b/python/fi/generated/openapi_client/models/compare_evals_list_request_eval_type.py new file mode 100644 index 0000000..274bc0d --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_evals_list_request_eval_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CompareEvalsListRequestEvalType(str, Enum): + USER = "user" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/compare_experiment_eval_request.py b/python/fi/generated/openapi_client/models/compare_experiment_eval_request.py new file mode 100644 index 0000000..b44fdb9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_experiment_eval_request.py @@ -0,0 +1,218 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compare_experiment_eval_request_composite_weight_overrides import ( + CompareExperimentEvalRequestCompositeWeightOverrides, + ) + from ..models.compare_experiment_eval_request_config import ( + CompareExperimentEvalRequestConfig, + ) + + +T = TypeVar("T", bound="CompareExperimentEvalRequest") + + +@_attrs_define +class CompareExperimentEvalRequest: + """ + Attributes: + name (str): + template_id (str): + config (CompareExperimentEvalRequestConfig): + kb_id (UUID | Unset): + error_localizer (bool | Unset): Default: False. + model (str | Unset): + eval_type (str | Unset): + run (bool | Unset): Default: False. + save_as_template (bool | Unset): Default: False. + experiment_id (UUID | Unset): + composite_weight_overrides (CompareExperimentEvalRequestCompositeWeightOverrides | Unset): + dataset_ids (list[UUID] | Unset): + """ + + name: str + template_id: str + config: CompareExperimentEvalRequestConfig + kb_id: UUID | Unset = UNSET + error_localizer: bool | Unset = False + model: str | Unset = UNSET + eval_type: str | Unset = UNSET + run: bool | Unset = False + save_as_template: bool | Unset = False + experiment_id: UUID | Unset = UNSET + composite_weight_overrides: ( + CompareExperimentEvalRequestCompositeWeightOverrides | Unset + ) = UNSET + dataset_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + template_id = self.template_id + + config = self.config.to_dict() + + kb_id: str | Unset = UNSET + if not isinstance(self.kb_id, Unset): + kb_id = str(self.kb_id) + + error_localizer = self.error_localizer + + model = self.model + + eval_type = self.eval_type + + run = self.run + + save_as_template = self.save_as_template + + experiment_id: str | Unset = UNSET + if not isinstance(self.experiment_id, Unset): + experiment_id = str(self.experiment_id) + + composite_weight_overrides: dict[str, Any] | Unset = UNSET + if not isinstance(self.composite_weight_overrides, Unset): + composite_weight_overrides = self.composite_weight_overrides.to_dict() + + dataset_ids: list[str] | Unset = UNSET + if not isinstance(self.dataset_ids, Unset): + dataset_ids = [] + for dataset_ids_item_data in self.dataset_ids: + dataset_ids_item = str(dataset_ids_item_data) + dataset_ids.append(dataset_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "template_id": template_id, + "config": config, + } + ) + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if model is not UNSET: + field_dict["model"] = model + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if run is not UNSET: + field_dict["run"] = run + if save_as_template is not UNSET: + field_dict["save_as_template"] = save_as_template + if experiment_id is not UNSET: + field_dict["experiment_id"] = experiment_id + if composite_weight_overrides is not UNSET: + field_dict["composite_weight_overrides"] = composite_weight_overrides + if dataset_ids is not UNSET: + field_dict["dataset_ids"] = dataset_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_experiment_eval_request_composite_weight_overrides import ( + CompareExperimentEvalRequestCompositeWeightOverrides, + ) + from ..models.compare_experiment_eval_request_config import ( + CompareExperimentEvalRequestConfig, + ) + + d = dict(src_dict) + name = d.pop("name") + + template_id = d.pop("template_id") + + config = CompareExperimentEvalRequestConfig.from_dict(d.pop("config")) + + _kb_id = d.pop("kb_id", UNSET) + kb_id: UUID | Unset + if isinstance(_kb_id, Unset): + kb_id = UNSET + else: + kb_id = UUID(_kb_id) + + error_localizer = d.pop("error_localizer", UNSET) + + model = d.pop("model", UNSET) + + eval_type = d.pop("eval_type", UNSET) + + run = d.pop("run", UNSET) + + save_as_template = d.pop("save_as_template", UNSET) + + _experiment_id = d.pop("experiment_id", UNSET) + experiment_id: UUID | Unset + if isinstance(_experiment_id, Unset): + experiment_id = UNSET + else: + experiment_id = UUID(_experiment_id) + + _composite_weight_overrides = d.pop("composite_weight_overrides", UNSET) + composite_weight_overrides: ( + CompareExperimentEvalRequestCompositeWeightOverrides | Unset + ) + if isinstance(_composite_weight_overrides, Unset): + composite_weight_overrides = UNSET + else: + composite_weight_overrides = ( + CompareExperimentEvalRequestCompositeWeightOverrides.from_dict( + _composite_weight_overrides + ) + ) + + _dataset_ids = d.pop("dataset_ids", UNSET) + dataset_ids: list[UUID] | Unset = UNSET + if _dataset_ids is not UNSET: + dataset_ids = [] + for dataset_ids_item_data in _dataset_ids: + dataset_ids_item = UUID(dataset_ids_item_data) + + dataset_ids.append(dataset_ids_item) + + compare_experiment_eval_request = cls( + name=name, + template_id=template_id, + config=config, + kb_id=kb_id, + error_localizer=error_localizer, + model=model, + eval_type=eval_type, + run=run, + save_as_template=save_as_template, + experiment_id=experiment_id, + composite_weight_overrides=composite_weight_overrides, + dataset_ids=dataset_ids, + ) + + compare_experiment_eval_request.additional_properties = d + return compare_experiment_eval_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_experiment_eval_request_composite_weight_overrides.py b/python/fi/generated/openapi_client/models/compare_experiment_eval_request_composite_weight_overrides.py new file mode 100644 index 0000000..cde8b82 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_experiment_eval_request_composite_weight_overrides.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareExperimentEvalRequestCompositeWeightOverrides") + + +@_attrs_define +class CompareExperimentEvalRequestCompositeWeightOverrides: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_experiment_eval_request_composite_weight_overrides = cls() + + compare_experiment_eval_request_composite_weight_overrides.additional_properties = d + return compare_experiment_eval_request_composite_weight_overrides + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_experiment_eval_request_config.py b/python/fi/generated/openapi_client/models/compare_experiment_eval_request_config.py new file mode 100644 index 0000000..5e72d87 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_experiment_eval_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompareExperimentEvalRequestConfig") + + +@_attrs_define +class CompareExperimentEvalRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_experiment_eval_request_config = cls() + + compare_experiment_eval_request_config.additional_properties = d + return compare_experiment_eval_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_preview_run_eval_request.py b/python/fi/generated/openapi_client/models/compare_preview_run_eval_request.py new file mode 100644 index 0000000..4d4647e --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_preview_run_eval_request.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compare_preview_run_eval_request_config import ( + ComparePreviewRunEvalRequestConfig, + ) + from ..models.compare_preview_run_eval_request_dataset_info import ( + ComparePreviewRunEvalRequestDatasetInfo, + ) + + +T = TypeVar("T", bound="ComparePreviewRunEvalRequest") + + +@_attrs_define +class ComparePreviewRunEvalRequest: + """ + Attributes: + config (ComparePreviewRunEvalRequestConfig): + template_id (UUID): + dataset_ids (list[UUID]): + model (str | Unset): Default: ''. + dataset_info (ComparePreviewRunEvalRequestDatasetInfo | Unset): + source (str | Unset): Default: 'dataset_evaluation'. + """ + + config: ComparePreviewRunEvalRequestConfig + template_id: UUID + dataset_ids: list[UUID] + model: str | Unset = "" + dataset_info: ComparePreviewRunEvalRequestDatasetInfo | Unset = UNSET + source: str | Unset = "dataset_evaluation" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + config = self.config.to_dict() + + template_id = str(self.template_id) + + dataset_ids = [] + for dataset_ids_item_data in self.dataset_ids: + dataset_ids_item = str(dataset_ids_item_data) + dataset_ids.append(dataset_ids_item) + + model = self.model + + dataset_info: dict[str, Any] | Unset = UNSET + if not isinstance(self.dataset_info, Unset): + dataset_info = self.dataset_info.to_dict() + + source = self.source + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "config": config, + "template_id": template_id, + "dataset_ids": dataset_ids, + } + ) + if model is not UNSET: + field_dict["model"] = model + if dataset_info is not UNSET: + field_dict["dataset_info"] = dataset_info + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.compare_preview_run_eval_request_config import ( + ComparePreviewRunEvalRequestConfig, + ) + from ..models.compare_preview_run_eval_request_dataset_info import ( + ComparePreviewRunEvalRequestDatasetInfo, + ) + + d = dict(src_dict) + config = ComparePreviewRunEvalRequestConfig.from_dict(d.pop("config")) + + template_id = UUID(d.pop("template_id")) + + dataset_ids = [] + _dataset_ids = d.pop("dataset_ids") + for dataset_ids_item_data in _dataset_ids: + dataset_ids_item = UUID(dataset_ids_item_data) + + dataset_ids.append(dataset_ids_item) + + model = d.pop("model", UNSET) + + _dataset_info = d.pop("dataset_info", UNSET) + dataset_info: ComparePreviewRunEvalRequestDatasetInfo | Unset + if isinstance(_dataset_info, Unset): + dataset_info = UNSET + else: + dataset_info = ComparePreviewRunEvalRequestDatasetInfo.from_dict( + _dataset_info + ) + + source = d.pop("source", UNSET) + + compare_preview_run_eval_request = cls( + config=config, + template_id=template_id, + dataset_ids=dataset_ids, + model=model, + dataset_info=dataset_info, + source=source, + ) + + compare_preview_run_eval_request.additional_properties = d + return compare_preview_run_eval_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_preview_run_eval_request_config.py b/python/fi/generated/openapi_client/models/compare_preview_run_eval_request_config.py new file mode 100644 index 0000000..cbc8a8a --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_preview_run_eval_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ComparePreviewRunEvalRequestConfig") + + +@_attrs_define +class ComparePreviewRunEvalRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_preview_run_eval_request_config = cls() + + compare_preview_run_eval_request_config.additional_properties = d + return compare_preview_run_eval_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_preview_run_eval_request_dataset_info.py b/python/fi/generated/openapi_client/models/compare_preview_run_eval_request_dataset_info.py new file mode 100644 index 0000000..774f121 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_preview_run_eval_request_dataset_info.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ComparePreviewRunEvalRequestDatasetInfo") + + +@_attrs_define +class ComparePreviewRunEvalRequestDatasetInfo: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + compare_preview_run_eval_request_dataset_info = cls() + + compare_preview_run_eval_request_dataset_info.additional_properties = d + return compare_preview_run_eval_request_dataset_info + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/compare_start_evals_request.py b/python/fi/generated/openapi_client/models/compare_start_evals_request.py new file mode 100644 index 0000000..42dfbe3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/compare_start_evals_request.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompareStartEvalsRequest") + + +@_attrs_define +class CompareStartEvalsRequest: + """ + Attributes: + user_eval_names (list[str]): + dataset_ids (list[UUID] | Unset): + """ + + user_eval_names: list[str] + dataset_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_eval_names = self.user_eval_names + + dataset_ids: list[str] | Unset = UNSET + if not isinstance(self.dataset_ids, Unset): + dataset_ids = [] + for dataset_ids_item_data in self.dataset_ids: + dataset_ids_item = str(dataset_ids_item_data) + dataset_ids.append(dataset_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_eval_names": user_eval_names, + } + ) + if dataset_ids is not UNSET: + field_dict["dataset_ids"] = dataset_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_eval_names = cast(list[str], d.pop("user_eval_names")) + + _dataset_ids = d.pop("dataset_ids", UNSET) + dataset_ids: list[UUID] | Unset = UNSET + if _dataset_ids is not UNSET: + dataset_ids = [] + for dataset_ids_item_data in _dataset_ids: + dataset_ids_item = UUID(dataset_ids_item_data) + + dataset_ids.append(dataset_ids_item) + + compare_start_evals_request = cls( + user_eval_names=user_eval_names, + dataset_ids=dataset_ids, + ) + + compare_start_evals_request.additional_properties = d + return compare_start_evals_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_child_item.py b/python/fi/generated/openapi_client/models/composite_child_item.py new file mode 100644 index 0000000..7943c74 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_child_item.py @@ -0,0 +1,161 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompositeChildItem") + + +@_attrs_define +class CompositeChildItem: + """ + Attributes: + child_id (UUID): + child_name (str): + order (int): + eval_type (str | Unset): + pinned_version_id (None | Unset | UUID): + pinned_version_number (int | None | Unset): + weight (float | Unset): + required_keys (list[str] | Unset): + """ + + child_id: UUID + child_name: str + order: int + eval_type: str | Unset = UNSET + pinned_version_id: None | Unset | UUID = UNSET + pinned_version_number: int | None | Unset = UNSET + weight: float | Unset = UNSET + required_keys: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + child_id = str(self.child_id) + + child_name = self.child_name + + order = self.order + + eval_type = self.eval_type + + pinned_version_id: None | str | Unset + if isinstance(self.pinned_version_id, Unset): + pinned_version_id = UNSET + elif isinstance(self.pinned_version_id, UUID): + pinned_version_id = str(self.pinned_version_id) + else: + pinned_version_id = self.pinned_version_id + + pinned_version_number: int | None | Unset + if isinstance(self.pinned_version_number, Unset): + pinned_version_number = UNSET + else: + pinned_version_number = self.pinned_version_number + + weight = self.weight + + required_keys: list[str] | Unset = UNSET + if not isinstance(self.required_keys, Unset): + required_keys = self.required_keys + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "child_id": child_id, + "child_name": child_name, + "order": order, + } + ) + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if pinned_version_id is not UNSET: + field_dict["pinned_version_id"] = pinned_version_id + if pinned_version_number is not UNSET: + field_dict["pinned_version_number"] = pinned_version_number + if weight is not UNSET: + field_dict["weight"] = weight + if required_keys is not UNSET: + field_dict["required_keys"] = required_keys + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + child_id = UUID(d.pop("child_id")) + + child_name = d.pop("child_name") + + order = d.pop("order") + + eval_type = d.pop("eval_type", UNSET) + + def _parse_pinned_version_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + pinned_version_id_type_0 = UUID(data) + + return pinned_version_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + pinned_version_id = _parse_pinned_version_id(d.pop("pinned_version_id", UNSET)) + + def _parse_pinned_version_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pinned_version_number = _parse_pinned_version_number( + d.pop("pinned_version_number", UNSET) + ) + + weight = d.pop("weight", UNSET) + + required_keys = cast(list[str], d.pop("required_keys", UNSET)) + + composite_child_item = cls( + child_id=child_id, + child_name=child_name, + order=order, + eval_type=eval_type, + pinned_version_id=pinned_version_id, + pinned_version_number=pinned_version_number, + weight=weight, + required_keys=required_keys, + ) + + composite_child_item.additional_properties = d + return composite_child_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_child_result.py b/python/fi/generated/openapi_client/models/composite_child_result.py new file mode 100644 index 0000000..b02d245 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_child_result.py @@ -0,0 +1,243 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_child_result_error_localizer_result import ( + CompositeChildResultErrorLocalizerResult, + ) + from ..models.composite_child_result_output import CompositeChildResultOutput + + +T = TypeVar("T", bound="CompositeChildResult") + + +@_attrs_define +class CompositeChildResult: + """ + Attributes: + child_id (UUID): + child_name (str): + order (int): + status (str): + score (float | None | Unset): + output (CompositeChildResultOutput | Unset): + reason (None | str | Unset): + output_type (None | str | Unset): + error (None | str | Unset): + log_id (None | str | Unset): + weight (float | Unset): + error_localizer_result (CompositeChildResultErrorLocalizerResult | Unset): + """ + + child_id: UUID + child_name: str + order: int + status: str + score: float | None | Unset = UNSET + output: CompositeChildResultOutput | Unset = UNSET + reason: None | str | Unset = UNSET + output_type: None | str | Unset = UNSET + error: None | str | Unset = UNSET + log_id: None | str | Unset = UNSET + weight: float | Unset = UNSET + error_localizer_result: CompositeChildResultErrorLocalizerResult | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + child_id = str(self.child_id) + + child_name = self.child_name + + order = self.order + + status = self.status + + score: float | None | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + output: dict[str, Any] | Unset = UNSET + if not isinstance(self.output, Unset): + output = self.output.to_dict() + + reason: None | str | Unset + if isinstance(self.reason, Unset): + reason = UNSET + else: + reason = self.reason + + output_type: None | str | Unset + if isinstance(self.output_type, Unset): + output_type = UNSET + else: + output_type = self.output_type + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + log_id: None | str | Unset + if isinstance(self.log_id, Unset): + log_id = UNSET + else: + log_id = self.log_id + + weight = self.weight + + error_localizer_result: dict[str, Any] | Unset = UNSET + if not isinstance(self.error_localizer_result, Unset): + error_localizer_result = self.error_localizer_result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "child_id": child_id, + "child_name": child_name, + "order": order, + "status": status, + } + ) + if score is not UNSET: + field_dict["score"] = score + if output is not UNSET: + field_dict["output"] = output + if reason is not UNSET: + field_dict["reason"] = reason + if output_type is not UNSET: + field_dict["output_type"] = output_type + if error is not UNSET: + field_dict["error"] = error + if log_id is not UNSET: + field_dict["log_id"] = log_id + if weight is not UNSET: + field_dict["weight"] = weight + if error_localizer_result is not UNSET: + field_dict["error_localizer_result"] = error_localizer_result + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_child_result_error_localizer_result import ( + CompositeChildResultErrorLocalizerResult, + ) + from ..models.composite_child_result_output import CompositeChildResultOutput + + d = dict(src_dict) + child_id = UUID(d.pop("child_id")) + + child_name = d.pop("child_name") + + order = d.pop("order") + + status = d.pop("status") + + def _parse_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + _output = d.pop("output", UNSET) + output: CompositeChildResultOutput | Unset + if isinstance(_output, Unset): + output = UNSET + else: + output = CompositeChildResultOutput.from_dict(_output) + + def _parse_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + reason = _parse_reason(d.pop("reason", UNSET)) + + def _parse_output_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + output_type = _parse_output_type(d.pop("output_type", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_log_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + log_id = _parse_log_id(d.pop("log_id", UNSET)) + + weight = d.pop("weight", UNSET) + + _error_localizer_result = d.pop("error_localizer_result", UNSET) + error_localizer_result: CompositeChildResultErrorLocalizerResult | Unset + if isinstance(_error_localizer_result, Unset): + error_localizer_result = UNSET + else: + error_localizer_result = CompositeChildResultErrorLocalizerResult.from_dict( + _error_localizer_result + ) + + composite_child_result = cls( + child_id=child_id, + child_name=child_name, + order=order, + status=status, + score=score, + output=output, + reason=reason, + output_type=output_type, + error=error, + log_id=log_id, + weight=weight, + error_localizer_result=error_localizer_result, + ) + + composite_child_result.additional_properties = d + return composite_child_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_child_result_error_localizer_result.py b/python/fi/generated/openapi_client/models/composite_child_result_error_localizer_result.py new file mode 100644 index 0000000..54322c4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_child_result_error_localizer_result.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeChildResultErrorLocalizerResult") + + +@_attrs_define +class CompositeChildResultErrorLocalizerResult: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_child_result_error_localizer_result = cls() + + composite_child_result_error_localizer_result.additional_properties = d + return composite_child_result_error_localizer_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_child_result_output.py b/python/fi/generated/openapi_client/models/composite_child_result_output.py new file mode 100644 index 0000000..699ffa0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_child_result_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeChildResultOutput") + + +@_attrs_define +class CompositeChildResultOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_child_result_output = cls() + + composite_child_result_output.additional_properties = d + return composite_child_result_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request.py new file mode 100644 index 0000000..5ad14b0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request.py @@ -0,0 +1,377 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.composite_eval_adhoc_execute_request_aggregation_function import ( + CompositeEvalAdhocExecuteRequestAggregationFunction, +) +from ..models.composite_eval_adhoc_execute_request_composite_child_axis import ( + CompositeEvalAdhocExecuteRequestCompositeChildAxis, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_eval_adhoc_execute_request_call_context import ( + CompositeEvalAdhocExecuteRequestCallContext, + ) + from ..models.composite_eval_adhoc_execute_request_child_weights import ( + CompositeEvalAdhocExecuteRequestChildWeights, + ) + from ..models.composite_eval_adhoc_execute_request_config import ( + CompositeEvalAdhocExecuteRequestConfig, + ) + from ..models.composite_eval_adhoc_execute_request_input_data_types import ( + CompositeEvalAdhocExecuteRequestInputDataTypes, + ) + from ..models.composite_eval_adhoc_execute_request_mapping import ( + CompositeEvalAdhocExecuteRequestMapping, + ) + from ..models.composite_eval_adhoc_execute_request_row_context import ( + CompositeEvalAdhocExecuteRequestRowContext, + ) + from ..models.composite_eval_adhoc_execute_request_session_context import ( + CompositeEvalAdhocExecuteRequestSessionContext, + ) + from ..models.composite_eval_adhoc_execute_request_span_context import ( + CompositeEvalAdhocExecuteRequestSpanContext, + ) + from ..models.composite_eval_adhoc_execute_request_trace_context import ( + CompositeEvalAdhocExecuteRequestTraceContext, + ) + + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequest") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequest: + """ + Attributes: + mapping (CompositeEvalAdhocExecuteRequestMapping): + child_template_ids (list[UUID]): + model (None | str | Unset): + config (CompositeEvalAdhocExecuteRequestConfig | Unset): + error_localizer (bool | Unset): Default: False. + input_data_types (CompositeEvalAdhocExecuteRequestInputDataTypes | Unset): + span_context (CompositeEvalAdhocExecuteRequestSpanContext | Unset): + trace_context (CompositeEvalAdhocExecuteRequestTraceContext | Unset): + session_context (CompositeEvalAdhocExecuteRequestSessionContext | Unset): + call_context (CompositeEvalAdhocExecuteRequestCallContext | Unset): + row_context (CompositeEvalAdhocExecuteRequestRowContext | Unset): + aggregation_enabled (bool | Unset): Default: True. + aggregation_function (CompositeEvalAdhocExecuteRequestAggregationFunction | Unset): Default: + CompositeEvalAdhocExecuteRequestAggregationFunction.WEIGHTED_AVG. + composite_child_axis (CompositeEvalAdhocExecuteRequestCompositeChildAxis | Unset): Default: + CompositeEvalAdhocExecuteRequestCompositeChildAxis.VALUE_0. + child_weights (CompositeEvalAdhocExecuteRequestChildWeights | Unset): + pass_threshold (float | Unset): Default: 0.5. + """ + + mapping: CompositeEvalAdhocExecuteRequestMapping + child_template_ids: list[UUID] + model: None | str | Unset = UNSET + config: CompositeEvalAdhocExecuteRequestConfig | Unset = UNSET + error_localizer: bool | Unset = False + input_data_types: CompositeEvalAdhocExecuteRequestInputDataTypes | Unset = UNSET + span_context: CompositeEvalAdhocExecuteRequestSpanContext | Unset = UNSET + trace_context: CompositeEvalAdhocExecuteRequestTraceContext | Unset = UNSET + session_context: CompositeEvalAdhocExecuteRequestSessionContext | Unset = UNSET + call_context: CompositeEvalAdhocExecuteRequestCallContext | Unset = UNSET + row_context: CompositeEvalAdhocExecuteRequestRowContext | Unset = UNSET + aggregation_enabled: bool | Unset = True + aggregation_function: ( + CompositeEvalAdhocExecuteRequestAggregationFunction | Unset + ) = CompositeEvalAdhocExecuteRequestAggregationFunction.WEIGHTED_AVG + composite_child_axis: CompositeEvalAdhocExecuteRequestCompositeChildAxis | Unset = ( + CompositeEvalAdhocExecuteRequestCompositeChildAxis.VALUE_0 + ) + child_weights: CompositeEvalAdhocExecuteRequestChildWeights | Unset = UNSET + pass_threshold: float | Unset = 0.5 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mapping = self.mapping.to_dict() + + child_template_ids = [] + for child_template_ids_item_data in self.child_template_ids: + child_template_ids_item = str(child_template_ids_item_data) + child_template_ids.append(child_template_ids_item) + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + error_localizer = self.error_localizer + + input_data_types: dict[str, Any] | Unset = UNSET + if not isinstance(self.input_data_types, Unset): + input_data_types = self.input_data_types.to_dict() + + span_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.span_context, Unset): + span_context = self.span_context.to_dict() + + trace_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.trace_context, Unset): + trace_context = self.trace_context.to_dict() + + session_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.session_context, Unset): + session_context = self.session_context.to_dict() + + call_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.call_context, Unset): + call_context = self.call_context.to_dict() + + row_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.row_context, Unset): + row_context = self.row_context.to_dict() + + aggregation_enabled = self.aggregation_enabled + + aggregation_function: str | Unset = UNSET + if not isinstance(self.aggregation_function, Unset): + aggregation_function = self.aggregation_function.value + + composite_child_axis: str | Unset = UNSET + if not isinstance(self.composite_child_axis, Unset): + composite_child_axis = self.composite_child_axis.value + + child_weights: dict[str, Any] | Unset = UNSET + if not isinstance(self.child_weights, Unset): + child_weights = self.child_weights.to_dict() + + pass_threshold = self.pass_threshold + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mapping": mapping, + "child_template_ids": child_template_ids, + } + ) + if model is not UNSET: + field_dict["model"] = model + if config is not UNSET: + field_dict["config"] = config + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if input_data_types is not UNSET: + field_dict["input_data_types"] = input_data_types + if span_context is not UNSET: + field_dict["span_context"] = span_context + if trace_context is not UNSET: + field_dict["trace_context"] = trace_context + if session_context is not UNSET: + field_dict["session_context"] = session_context + if call_context is not UNSET: + field_dict["call_context"] = call_context + if row_context is not UNSET: + field_dict["row_context"] = row_context + if aggregation_enabled is not UNSET: + field_dict["aggregation_enabled"] = aggregation_enabled + if aggregation_function is not UNSET: + field_dict["aggregation_function"] = aggregation_function + if composite_child_axis is not UNSET: + field_dict["composite_child_axis"] = composite_child_axis + if child_weights is not UNSET: + field_dict["child_weights"] = child_weights + if pass_threshold is not UNSET: + field_dict["pass_threshold"] = pass_threshold + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_eval_adhoc_execute_request_call_context import ( + CompositeEvalAdhocExecuteRequestCallContext, + ) + from ..models.composite_eval_adhoc_execute_request_child_weights import ( + CompositeEvalAdhocExecuteRequestChildWeights, + ) + from ..models.composite_eval_adhoc_execute_request_config import ( + CompositeEvalAdhocExecuteRequestConfig, + ) + from ..models.composite_eval_adhoc_execute_request_input_data_types import ( + CompositeEvalAdhocExecuteRequestInputDataTypes, + ) + from ..models.composite_eval_adhoc_execute_request_mapping import ( + CompositeEvalAdhocExecuteRequestMapping, + ) + from ..models.composite_eval_adhoc_execute_request_row_context import ( + CompositeEvalAdhocExecuteRequestRowContext, + ) + from ..models.composite_eval_adhoc_execute_request_session_context import ( + CompositeEvalAdhocExecuteRequestSessionContext, + ) + from ..models.composite_eval_adhoc_execute_request_span_context import ( + CompositeEvalAdhocExecuteRequestSpanContext, + ) + from ..models.composite_eval_adhoc_execute_request_trace_context import ( + CompositeEvalAdhocExecuteRequestTraceContext, + ) + + d = dict(src_dict) + mapping = CompositeEvalAdhocExecuteRequestMapping.from_dict(d.pop("mapping")) + + child_template_ids = [] + _child_template_ids = d.pop("child_template_ids") + for child_template_ids_item_data in _child_template_ids: + child_template_ids_item = UUID(child_template_ids_item_data) + + child_template_ids.append(child_template_ids_item) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _config = d.pop("config", UNSET) + config: CompositeEvalAdhocExecuteRequestConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = CompositeEvalAdhocExecuteRequestConfig.from_dict(_config) + + error_localizer = d.pop("error_localizer", UNSET) + + _input_data_types = d.pop("input_data_types", UNSET) + input_data_types: CompositeEvalAdhocExecuteRequestInputDataTypes | Unset + if isinstance(_input_data_types, Unset): + input_data_types = UNSET + else: + input_data_types = CompositeEvalAdhocExecuteRequestInputDataTypes.from_dict( + _input_data_types + ) + + _span_context = d.pop("span_context", UNSET) + span_context: CompositeEvalAdhocExecuteRequestSpanContext | Unset + if isinstance(_span_context, Unset): + span_context = UNSET + else: + span_context = CompositeEvalAdhocExecuteRequestSpanContext.from_dict( + _span_context + ) + + _trace_context = d.pop("trace_context", UNSET) + trace_context: CompositeEvalAdhocExecuteRequestTraceContext | Unset + if isinstance(_trace_context, Unset): + trace_context = UNSET + else: + trace_context = CompositeEvalAdhocExecuteRequestTraceContext.from_dict( + _trace_context + ) + + _session_context = d.pop("session_context", UNSET) + session_context: CompositeEvalAdhocExecuteRequestSessionContext | Unset + if isinstance(_session_context, Unset): + session_context = UNSET + else: + session_context = CompositeEvalAdhocExecuteRequestSessionContext.from_dict( + _session_context + ) + + _call_context = d.pop("call_context", UNSET) + call_context: CompositeEvalAdhocExecuteRequestCallContext | Unset + if isinstance(_call_context, Unset): + call_context = UNSET + else: + call_context = CompositeEvalAdhocExecuteRequestCallContext.from_dict( + _call_context + ) + + _row_context = d.pop("row_context", UNSET) + row_context: CompositeEvalAdhocExecuteRequestRowContext | Unset + if isinstance(_row_context, Unset): + row_context = UNSET + else: + row_context = CompositeEvalAdhocExecuteRequestRowContext.from_dict( + _row_context + ) + + aggregation_enabled = d.pop("aggregation_enabled", UNSET) + + _aggregation_function = d.pop("aggregation_function", UNSET) + aggregation_function: ( + CompositeEvalAdhocExecuteRequestAggregationFunction | Unset + ) + if isinstance(_aggregation_function, Unset): + aggregation_function = UNSET + else: + aggregation_function = CompositeEvalAdhocExecuteRequestAggregationFunction( + _aggregation_function + ) + + _composite_child_axis = d.pop("composite_child_axis", UNSET) + composite_child_axis: CompositeEvalAdhocExecuteRequestCompositeChildAxis | Unset + if isinstance(_composite_child_axis, Unset): + composite_child_axis = UNSET + else: + composite_child_axis = CompositeEvalAdhocExecuteRequestCompositeChildAxis( + _composite_child_axis + ) + + _child_weights = d.pop("child_weights", UNSET) + child_weights: CompositeEvalAdhocExecuteRequestChildWeights | Unset + if isinstance(_child_weights, Unset): + child_weights = UNSET + else: + child_weights = CompositeEvalAdhocExecuteRequestChildWeights.from_dict( + _child_weights + ) + + pass_threshold = d.pop("pass_threshold", UNSET) + + composite_eval_adhoc_execute_request = cls( + mapping=mapping, + child_template_ids=child_template_ids, + model=model, + config=config, + error_localizer=error_localizer, + input_data_types=input_data_types, + span_context=span_context, + trace_context=trace_context, + session_context=session_context, + call_context=call_context, + row_context=row_context, + aggregation_enabled=aggregation_enabled, + aggregation_function=aggregation_function, + composite_child_axis=composite_child_axis, + child_weights=child_weights, + pass_threshold=pass_threshold, + ) + + composite_eval_adhoc_execute_request.additional_properties = d + return composite_eval_adhoc_execute_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_aggregation_function.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_aggregation_function.py new file mode 100644 index 0000000..f42cde4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_aggregation_function.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class CompositeEvalAdhocExecuteRequestAggregationFunction(str, Enum): + AVG = "avg" + MAX = "max" + MIN = "min" + PASS_RATE = "pass_rate" + WEIGHTED_AVG = "weighted_avg" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_call_context.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_call_context.py new file mode 100644 index 0000000..3611f5a --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_call_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestCallContext") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestCallContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_call_context = cls() + + composite_eval_adhoc_execute_request_call_context.additional_properties = d + return composite_eval_adhoc_execute_request_call_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_child_weights.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_child_weights.py new file mode 100644 index 0000000..d19a19f --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_child_weights.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestChildWeights") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestChildWeights: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_child_weights = cls() + + composite_eval_adhoc_execute_request_child_weights.additional_properties = d + return composite_eval_adhoc_execute_request_child_weights + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_composite_child_axis.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_composite_child_axis.py new file mode 100644 index 0000000..2e81a8d --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_composite_child_axis.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class CompositeEvalAdhocExecuteRequestCompositeChildAxis(str, Enum): + CHOICES = "choices" + CODE = "code" + PASS_FAIL = "pass_fail" + PERCENTAGE = "percentage" + VALUE_0 = "" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_config.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_config.py new file mode 100644 index 0000000..8cb28a3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestConfig") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_config = cls() + + composite_eval_adhoc_execute_request_config.additional_properties = d + return composite_eval_adhoc_execute_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_input_data_types.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_input_data_types.py new file mode 100644 index 0000000..5d33bfc --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_input_data_types.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestInputDataTypes") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestInputDataTypes: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_input_data_types = cls() + + composite_eval_adhoc_execute_request_input_data_types.additional_properties = d + return composite_eval_adhoc_execute_request_input_data_types + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_mapping.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_mapping.py new file mode 100644 index 0000000..30d9c8b --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestMapping") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_mapping = cls() + + composite_eval_adhoc_execute_request_mapping.additional_properties = d + return composite_eval_adhoc_execute_request_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_row_context.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_row_context.py new file mode 100644 index 0000000..0afe384 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_row_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestRowContext") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestRowContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_row_context = cls() + + composite_eval_adhoc_execute_request_row_context.additional_properties = d + return composite_eval_adhoc_execute_request_row_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_session_context.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_session_context.py new file mode 100644 index 0000000..2b82d42 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_session_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestSessionContext") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestSessionContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_session_context = cls() + + composite_eval_adhoc_execute_request_session_context.additional_properties = d + return composite_eval_adhoc_execute_request_session_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_span_context.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_span_context.py new file mode 100644 index 0000000..7ce910a --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_span_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestSpanContext") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestSpanContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_span_context = cls() + + composite_eval_adhoc_execute_request_span_context.additional_properties = d + return composite_eval_adhoc_execute_request_span_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_trace_context.py b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_trace_context.py new file mode 100644 index 0000000..78608c1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_adhoc_execute_request_trace_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalAdhocExecuteRequestTraceContext") + + +@_attrs_define +class CompositeEvalAdhocExecuteRequestTraceContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_adhoc_execute_request_trace_context = cls() + + composite_eval_adhoc_execute_request_trace_context.additional_properties = d + return composite_eval_adhoc_execute_request_trace_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_create_request.py b/python/fi/generated/openapi_client/models/composite_eval_create_request.py new file mode 100644 index 0000000..d79f210 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_create_request.py @@ -0,0 +1,196 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.composite_eval_create_request_aggregation_function import ( + CompositeEvalCreateRequestAggregationFunction, +) +from ..models.composite_eval_create_request_composite_child_axis import ( + CompositeEvalCreateRequestCompositeChildAxis, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_eval_create_request_child_weights import ( + CompositeEvalCreateRequestChildWeights, + ) + + +T = TypeVar("T", bound="CompositeEvalCreateRequest") + + +@_attrs_define +class CompositeEvalCreateRequest: + """ + Attributes: + name (str): + child_template_ids (list[UUID]): + description (None | str | Unset): + tags (list[str] | Unset): + aggregation_enabled (bool | Unset): Default: True. + aggregation_function (CompositeEvalCreateRequestAggregationFunction | Unset): Default: + CompositeEvalCreateRequestAggregationFunction.WEIGHTED_AVG. + child_weights (CompositeEvalCreateRequestChildWeights | Unset): + composite_child_axis (CompositeEvalCreateRequestCompositeChildAxis | Unset): Default: + CompositeEvalCreateRequestCompositeChildAxis.VALUE_0. + """ + + name: str + child_template_ids: list[UUID] + description: None | str | Unset = UNSET + tags: list[str] | Unset = UNSET + aggregation_enabled: bool | Unset = True + aggregation_function: CompositeEvalCreateRequestAggregationFunction | Unset = ( + CompositeEvalCreateRequestAggregationFunction.WEIGHTED_AVG + ) + child_weights: CompositeEvalCreateRequestChildWeights | Unset = UNSET + composite_child_axis: CompositeEvalCreateRequestCompositeChildAxis | Unset = ( + CompositeEvalCreateRequestCompositeChildAxis.VALUE_0 + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + child_template_ids = [] + for child_template_ids_item_data in self.child_template_ids: + child_template_ids_item = str(child_template_ids_item_data) + child_template_ids.append(child_template_ids_item) + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + tags: list[str] | Unset = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags + + aggregation_enabled = self.aggregation_enabled + + aggregation_function: str | Unset = UNSET + if not isinstance(self.aggregation_function, Unset): + aggregation_function = self.aggregation_function.value + + child_weights: dict[str, Any] | Unset = UNSET + if not isinstance(self.child_weights, Unset): + child_weights = self.child_weights.to_dict() + + composite_child_axis: str | Unset = UNSET + if not isinstance(self.composite_child_axis, Unset): + composite_child_axis = self.composite_child_axis.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "child_template_ids": child_template_ids, + } + ) + if description is not UNSET: + field_dict["description"] = description + if tags is not UNSET: + field_dict["tags"] = tags + if aggregation_enabled is not UNSET: + field_dict["aggregation_enabled"] = aggregation_enabled + if aggregation_function is not UNSET: + field_dict["aggregation_function"] = aggregation_function + if child_weights is not UNSET: + field_dict["child_weights"] = child_weights + if composite_child_axis is not UNSET: + field_dict["composite_child_axis"] = composite_child_axis + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_eval_create_request_child_weights import ( + CompositeEvalCreateRequestChildWeights, + ) + + d = dict(src_dict) + name = d.pop("name") + + child_template_ids = [] + _child_template_ids = d.pop("child_template_ids") + for child_template_ids_item_data in _child_template_ids: + child_template_ids_item = UUID(child_template_ids_item_data) + + child_template_ids.append(child_template_ids_item) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + tags = cast(list[str], d.pop("tags", UNSET)) + + aggregation_enabled = d.pop("aggregation_enabled", UNSET) + + _aggregation_function = d.pop("aggregation_function", UNSET) + aggregation_function: CompositeEvalCreateRequestAggregationFunction | Unset + if isinstance(_aggregation_function, Unset): + aggregation_function = UNSET + else: + aggregation_function = CompositeEvalCreateRequestAggregationFunction( + _aggregation_function + ) + + _child_weights = d.pop("child_weights", UNSET) + child_weights: CompositeEvalCreateRequestChildWeights | Unset + if isinstance(_child_weights, Unset): + child_weights = UNSET + else: + child_weights = CompositeEvalCreateRequestChildWeights.from_dict( + _child_weights + ) + + _composite_child_axis = d.pop("composite_child_axis", UNSET) + composite_child_axis: CompositeEvalCreateRequestCompositeChildAxis | Unset + if isinstance(_composite_child_axis, Unset): + composite_child_axis = UNSET + else: + composite_child_axis = CompositeEvalCreateRequestCompositeChildAxis( + _composite_child_axis + ) + + composite_eval_create_request = cls( + name=name, + child_template_ids=child_template_ids, + description=description, + tags=tags, + aggregation_enabled=aggregation_enabled, + aggregation_function=aggregation_function, + child_weights=child_weights, + composite_child_axis=composite_child_axis, + ) + + composite_eval_create_request.additional_properties = d + return composite_eval_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_create_request_aggregation_function.py b/python/fi/generated/openapi_client/models/composite_eval_create_request_aggregation_function.py new file mode 100644 index 0000000..3b2cf12 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_create_request_aggregation_function.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class CompositeEvalCreateRequestAggregationFunction(str, Enum): + AVG = "avg" + MAX = "max" + MIN = "min" + PASS_RATE = "pass_rate" + WEIGHTED_AVG = "weighted_avg" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/composite_eval_create_request_child_weights.py b/python/fi/generated/openapi_client/models/composite_eval_create_request_child_weights.py new file mode 100644 index 0000000..2051a34 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_create_request_child_weights.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalCreateRequestChildWeights") + + +@_attrs_define +class CompositeEvalCreateRequestChildWeights: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_create_request_child_weights = cls() + + composite_eval_create_request_child_weights.additional_properties = d + return composite_eval_create_request_child_weights + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_create_request_composite_child_axis.py b/python/fi/generated/openapi_client/models/composite_eval_create_request_composite_child_axis.py new file mode 100644 index 0000000..7caa95d --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_create_request_composite_child_axis.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class CompositeEvalCreateRequestCompositeChildAxis(str, Enum): + CHOICES = "choices" + CODE = "code" + PASS_FAIL = "pass_fail" + PERCENTAGE = "percentage" + VALUE_0 = "" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/composite_eval_create_response.py b/python/fi/generated/openapi_client/models/composite_eval_create_response.py new file mode 100644 index 0000000..04c104c --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_create_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.composite_eval_create_response_result import ( + CompositeEvalCreateResponseResult, + ) + + +T = TypeVar("T", bound="CompositeEvalCreateResponse") + + +@_attrs_define +class CompositeEvalCreateResponse: + """ + Attributes: + status (bool): + result (CompositeEvalCreateResponseResult): + """ + + status: bool + result: CompositeEvalCreateResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_eval_create_response_result import ( + CompositeEvalCreateResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = CompositeEvalCreateResponseResult.from_dict(d.pop("result")) + + composite_eval_create_response = cls( + status=status, + result=result, + ) + + composite_eval_create_response.additional_properties = d + return composite_eval_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_create_response_result.py b/python/fi/generated/openapi_client/models/composite_eval_create_response_result.py new file mode 100644 index 0000000..3b70aa1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_create_response_result.py @@ -0,0 +1,128 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_child_item import CompositeChildItem + + +T = TypeVar("T", bound="CompositeEvalCreateResponseResult") + + +@_attrs_define +class CompositeEvalCreateResponseResult: + """ + Attributes: + id (UUID): + name (str): + aggregation_enabled (bool): + aggregation_function (str): + children (list[CompositeChildItem]): + template_type (str | Unset): + composite_child_axis (str | Unset): + """ + + id: UUID + name: str + aggregation_enabled: bool + aggregation_function: str + children: list[CompositeChildItem] + template_type: str | Unset = UNSET + composite_child_axis: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + aggregation_enabled = self.aggregation_enabled + + aggregation_function = self.aggregation_function + + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + template_type = self.template_type + + composite_child_axis = self.composite_child_axis + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "aggregation_enabled": aggregation_enabled, + "aggregation_function": aggregation_function, + "children": children, + } + ) + if template_type is not UNSET: + field_dict["template_type"] = template_type + if composite_child_axis is not UNSET: + field_dict["composite_child_axis"] = composite_child_axis + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_child_item import CompositeChildItem + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + aggregation_enabled = d.pop("aggregation_enabled") + + aggregation_function = d.pop("aggregation_function") + + children = [] + _children = d.pop("children") + for children_item_data in _children: + children_item = CompositeChildItem.from_dict(children_item_data) + + children.append(children_item) + + template_type = d.pop("template_type", UNSET) + + composite_child_axis = d.pop("composite_child_axis", UNSET) + + composite_eval_create_response_result = cls( + id=id, + name=name, + aggregation_enabled=aggregation_enabled, + aggregation_function=aggregation_function, + children=children, + template_type=template_type, + composite_child_axis=composite_child_axis, + ) + + composite_eval_create_response_result.additional_properties = d + return composite_eval_create_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_detail_response.py b/python/fi/generated/openapi_client/models/composite_eval_detail_response.py new file mode 100644 index 0000000..9453e69 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_detail_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.composite_eval_detail_response_result import ( + CompositeEvalDetailResponseResult, + ) + + +T = TypeVar("T", bound="CompositeEvalDetailResponse") + + +@_attrs_define +class CompositeEvalDetailResponse: + """ + Attributes: + status (bool): + result (CompositeEvalDetailResponseResult): + """ + + status: bool + result: CompositeEvalDetailResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_eval_detail_response_result import ( + CompositeEvalDetailResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = CompositeEvalDetailResponseResult.from_dict(d.pop("result")) + + composite_eval_detail_response = cls( + status=status, + result=result, + ) + + composite_eval_detail_response.additional_properties = d + return composite_eval_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_detail_response_result.py b/python/fi/generated/openapi_client/models/composite_eval_detail_response_result.py new file mode 100644 index 0000000..364423c --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_detail_response_result.py @@ -0,0 +1,197 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_child_item import CompositeChildItem + + +T = TypeVar("T", bound="CompositeEvalDetailResponseResult") + + +@_attrs_define +class CompositeEvalDetailResponseResult: + """ + Attributes: + id (UUID): + name (str): + aggregation_enabled (bool): + aggregation_function (str): + children (list[CompositeChildItem]): + template_type (str | Unset): + composite_child_axis (str | Unset): + description (None | str | Unset): + tags (list[str] | Unset): + created_at (str | Unset): + updated_at (str | Unset): + version_number (int | None | Unset): + """ + + id: UUID + name: str + aggregation_enabled: bool + aggregation_function: str + children: list[CompositeChildItem] + template_type: str | Unset = UNSET + composite_child_axis: str | Unset = UNSET + description: None | str | Unset = UNSET + tags: list[str] | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + version_number: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + aggregation_enabled = self.aggregation_enabled + + aggregation_function = self.aggregation_function + + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + template_type = self.template_type + + composite_child_axis = self.composite_child_axis + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + tags: list[str] | Unset = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags + + created_at = self.created_at + + updated_at = self.updated_at + + version_number: int | None | Unset + if isinstance(self.version_number, Unset): + version_number = UNSET + else: + version_number = self.version_number + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "aggregation_enabled": aggregation_enabled, + "aggregation_function": aggregation_function, + "children": children, + } + ) + if template_type is not UNSET: + field_dict["template_type"] = template_type + if composite_child_axis is not UNSET: + field_dict["composite_child_axis"] = composite_child_axis + if description is not UNSET: + field_dict["description"] = description + if tags is not UNSET: + field_dict["tags"] = tags + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if version_number is not UNSET: + field_dict["version_number"] = version_number + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_child_item import CompositeChildItem + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + aggregation_enabled = d.pop("aggregation_enabled") + + aggregation_function = d.pop("aggregation_function") + + children = [] + _children = d.pop("children") + for children_item_data in _children: + children_item = CompositeChildItem.from_dict(children_item_data) + + children.append(children_item) + + template_type = d.pop("template_type", UNSET) + + composite_child_axis = d.pop("composite_child_axis", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + tags = cast(list[str], d.pop("tags", UNSET)) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + def _parse_version_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + version_number = _parse_version_number(d.pop("version_number", UNSET)) + + composite_eval_detail_response_result = cls( + id=id, + name=name, + aggregation_enabled=aggregation_enabled, + aggregation_function=aggregation_function, + children=children, + template_type=template_type, + composite_child_axis=composite_child_axis, + description=description, + tags=tags, + created_at=created_at, + updated_at=updated_at, + version_number=version_number, + ) + + composite_eval_detail_response_result.additional_properties = d + return composite_eval_detail_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request.py new file mode 100644 index 0000000..2bad735 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request.py @@ -0,0 +1,266 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_eval_execute_request_call_context import ( + CompositeEvalExecuteRequestCallContext, + ) + from ..models.composite_eval_execute_request_config import ( + CompositeEvalExecuteRequestConfig, + ) + from ..models.composite_eval_execute_request_input_data_types import ( + CompositeEvalExecuteRequestInputDataTypes, + ) + from ..models.composite_eval_execute_request_mapping import ( + CompositeEvalExecuteRequestMapping, + ) + from ..models.composite_eval_execute_request_row_context import ( + CompositeEvalExecuteRequestRowContext, + ) + from ..models.composite_eval_execute_request_session_context import ( + CompositeEvalExecuteRequestSessionContext, + ) + from ..models.composite_eval_execute_request_span_context import ( + CompositeEvalExecuteRequestSpanContext, + ) + from ..models.composite_eval_execute_request_trace_context import ( + CompositeEvalExecuteRequestTraceContext, + ) + + +T = TypeVar("T", bound="CompositeEvalExecuteRequest") + + +@_attrs_define +class CompositeEvalExecuteRequest: + """ + Attributes: + mapping (CompositeEvalExecuteRequestMapping): + model (None | str | Unset): + config (CompositeEvalExecuteRequestConfig | Unset): + error_localizer (bool | Unset): Default: False. + input_data_types (CompositeEvalExecuteRequestInputDataTypes | Unset): + span_context (CompositeEvalExecuteRequestSpanContext | Unset): + trace_context (CompositeEvalExecuteRequestTraceContext | Unset): + session_context (CompositeEvalExecuteRequestSessionContext | Unset): + call_context (CompositeEvalExecuteRequestCallContext | Unset): + row_context (CompositeEvalExecuteRequestRowContext | Unset): + """ + + mapping: CompositeEvalExecuteRequestMapping + model: None | str | Unset = UNSET + config: CompositeEvalExecuteRequestConfig | Unset = UNSET + error_localizer: bool | Unset = False + input_data_types: CompositeEvalExecuteRequestInputDataTypes | Unset = UNSET + span_context: CompositeEvalExecuteRequestSpanContext | Unset = UNSET + trace_context: CompositeEvalExecuteRequestTraceContext | Unset = UNSET + session_context: CompositeEvalExecuteRequestSessionContext | Unset = UNSET + call_context: CompositeEvalExecuteRequestCallContext | Unset = UNSET + row_context: CompositeEvalExecuteRequestRowContext | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mapping = self.mapping.to_dict() + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + error_localizer = self.error_localizer + + input_data_types: dict[str, Any] | Unset = UNSET + if not isinstance(self.input_data_types, Unset): + input_data_types = self.input_data_types.to_dict() + + span_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.span_context, Unset): + span_context = self.span_context.to_dict() + + trace_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.trace_context, Unset): + trace_context = self.trace_context.to_dict() + + session_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.session_context, Unset): + session_context = self.session_context.to_dict() + + call_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.call_context, Unset): + call_context = self.call_context.to_dict() + + row_context: dict[str, Any] | Unset = UNSET + if not isinstance(self.row_context, Unset): + row_context = self.row_context.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mapping": mapping, + } + ) + if model is not UNSET: + field_dict["model"] = model + if config is not UNSET: + field_dict["config"] = config + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if input_data_types is not UNSET: + field_dict["input_data_types"] = input_data_types + if span_context is not UNSET: + field_dict["span_context"] = span_context + if trace_context is not UNSET: + field_dict["trace_context"] = trace_context + if session_context is not UNSET: + field_dict["session_context"] = session_context + if call_context is not UNSET: + field_dict["call_context"] = call_context + if row_context is not UNSET: + field_dict["row_context"] = row_context + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_eval_execute_request_call_context import ( + CompositeEvalExecuteRequestCallContext, + ) + from ..models.composite_eval_execute_request_config import ( + CompositeEvalExecuteRequestConfig, + ) + from ..models.composite_eval_execute_request_input_data_types import ( + CompositeEvalExecuteRequestInputDataTypes, + ) + from ..models.composite_eval_execute_request_mapping import ( + CompositeEvalExecuteRequestMapping, + ) + from ..models.composite_eval_execute_request_row_context import ( + CompositeEvalExecuteRequestRowContext, + ) + from ..models.composite_eval_execute_request_session_context import ( + CompositeEvalExecuteRequestSessionContext, + ) + from ..models.composite_eval_execute_request_span_context import ( + CompositeEvalExecuteRequestSpanContext, + ) + from ..models.composite_eval_execute_request_trace_context import ( + CompositeEvalExecuteRequestTraceContext, + ) + + d = dict(src_dict) + mapping = CompositeEvalExecuteRequestMapping.from_dict(d.pop("mapping")) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _config = d.pop("config", UNSET) + config: CompositeEvalExecuteRequestConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = CompositeEvalExecuteRequestConfig.from_dict(_config) + + error_localizer = d.pop("error_localizer", UNSET) + + _input_data_types = d.pop("input_data_types", UNSET) + input_data_types: CompositeEvalExecuteRequestInputDataTypes | Unset + if isinstance(_input_data_types, Unset): + input_data_types = UNSET + else: + input_data_types = CompositeEvalExecuteRequestInputDataTypes.from_dict( + _input_data_types + ) + + _span_context = d.pop("span_context", UNSET) + span_context: CompositeEvalExecuteRequestSpanContext | Unset + if isinstance(_span_context, Unset): + span_context = UNSET + else: + span_context = CompositeEvalExecuteRequestSpanContext.from_dict( + _span_context + ) + + _trace_context = d.pop("trace_context", UNSET) + trace_context: CompositeEvalExecuteRequestTraceContext | Unset + if isinstance(_trace_context, Unset): + trace_context = UNSET + else: + trace_context = CompositeEvalExecuteRequestTraceContext.from_dict( + _trace_context + ) + + _session_context = d.pop("session_context", UNSET) + session_context: CompositeEvalExecuteRequestSessionContext | Unset + if isinstance(_session_context, Unset): + session_context = UNSET + else: + session_context = CompositeEvalExecuteRequestSessionContext.from_dict( + _session_context + ) + + _call_context = d.pop("call_context", UNSET) + call_context: CompositeEvalExecuteRequestCallContext | Unset + if isinstance(_call_context, Unset): + call_context = UNSET + else: + call_context = CompositeEvalExecuteRequestCallContext.from_dict( + _call_context + ) + + _row_context = d.pop("row_context", UNSET) + row_context: CompositeEvalExecuteRequestRowContext | Unset + if isinstance(_row_context, Unset): + row_context = UNSET + else: + row_context = CompositeEvalExecuteRequestRowContext.from_dict(_row_context) + + composite_eval_execute_request = cls( + mapping=mapping, + model=model, + config=config, + error_localizer=error_localizer, + input_data_types=input_data_types, + span_context=span_context, + trace_context=trace_context, + session_context=session_context, + call_context=call_context, + row_context=row_context, + ) + + composite_eval_execute_request.additional_properties = d + return composite_eval_execute_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_call_context.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_call_context.py new file mode 100644 index 0000000..9559552 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_call_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestCallContext") + + +@_attrs_define +class CompositeEvalExecuteRequestCallContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_call_context = cls() + + composite_eval_execute_request_call_context.additional_properties = d + return composite_eval_execute_request_call_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_config.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_config.py new file mode 100644 index 0000000..ad5f80a --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestConfig") + + +@_attrs_define +class CompositeEvalExecuteRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_config = cls() + + composite_eval_execute_request_config.additional_properties = d + return composite_eval_execute_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_input_data_types.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_input_data_types.py new file mode 100644 index 0000000..3034fec --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_input_data_types.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestInputDataTypes") + + +@_attrs_define +class CompositeEvalExecuteRequestInputDataTypes: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_input_data_types = cls() + + composite_eval_execute_request_input_data_types.additional_properties = d + return composite_eval_execute_request_input_data_types + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_mapping.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_mapping.py new file mode 100644 index 0000000..b7503e7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestMapping") + + +@_attrs_define +class CompositeEvalExecuteRequestMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_mapping = cls() + + composite_eval_execute_request_mapping.additional_properties = d + return composite_eval_execute_request_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_row_context.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_row_context.py new file mode 100644 index 0000000..740fb07 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_row_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestRowContext") + + +@_attrs_define +class CompositeEvalExecuteRequestRowContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_row_context = cls() + + composite_eval_execute_request_row_context.additional_properties = d + return composite_eval_execute_request_row_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_session_context.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_session_context.py new file mode 100644 index 0000000..268fddd --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_session_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestSessionContext") + + +@_attrs_define +class CompositeEvalExecuteRequestSessionContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_session_context = cls() + + composite_eval_execute_request_session_context.additional_properties = d + return composite_eval_execute_request_session_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_span_context.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_span_context.py new file mode 100644 index 0000000..12e869b --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_span_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestSpanContext") + + +@_attrs_define +class CompositeEvalExecuteRequestSpanContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_span_context = cls() + + composite_eval_execute_request_span_context.additional_properties = d + return composite_eval_execute_request_span_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_request_trace_context.py b/python/fi/generated/openapi_client/models/composite_eval_execute_request_trace_context.py new file mode 100644 index 0000000..eac3584 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_request_trace_context.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteRequestTraceContext") + + +@_attrs_define +class CompositeEvalExecuteRequestTraceContext: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_request_trace_context = cls() + + composite_eval_execute_request_trace_context.additional_properties = d + return composite_eval_execute_request_trace_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_response.py b/python/fi/generated/openapi_client/models/composite_eval_execute_response.py new file mode 100644 index 0000000..5b90084 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.composite_eval_execute_response_result import ( + CompositeEvalExecuteResponseResult, + ) + + +T = TypeVar("T", bound="CompositeEvalExecuteResponse") + + +@_attrs_define +class CompositeEvalExecuteResponse: + """ + Attributes: + status (bool): + result (CompositeEvalExecuteResponseResult): + """ + + status: bool + result: CompositeEvalExecuteResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_eval_execute_response_result import ( + CompositeEvalExecuteResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = CompositeEvalExecuteResponseResult.from_dict(d.pop("result")) + + composite_eval_execute_response = cls( + status=status, + result=result, + ) + + composite_eval_execute_response.additional_properties = d + return composite_eval_execute_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_response_result.py b/python/fi/generated/openapi_client/models/composite_eval_execute_response_result.py new file mode 100644 index 0000000..5db0cfc --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_response_result.py @@ -0,0 +1,269 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_child_result import CompositeChildResult + from ..models.composite_eval_execute_response_result_error_localizer_results import ( + CompositeEvalExecuteResponseResultErrorLocalizerResults, + ) + + +T = TypeVar("T", bound="CompositeEvalExecuteResponseResult") + + +@_attrs_define +class CompositeEvalExecuteResponseResult: + """ + Attributes: + composite_name (str): + aggregation_enabled (bool): + children (list[CompositeChildResult]): + total_children (int): + completed_children (int): + failed_children (int): + composite_id (None | str | Unset): + aggregation_function (None | str | Unset): + aggregate_score (float | None | Unset): + aggregate_pass (bool | None | Unset): + summary (None | str | Unset): + error_localizer_results (CompositeEvalExecuteResponseResultErrorLocalizerResults | Unset): + evaluation_id (None | str | Unset): + """ + + composite_name: str + aggregation_enabled: bool + children: list[CompositeChildResult] + total_children: int + completed_children: int + failed_children: int + composite_id: None | str | Unset = UNSET + aggregation_function: None | str | Unset = UNSET + aggregate_score: float | None | Unset = UNSET + aggregate_pass: bool | None | Unset = UNSET + summary: None | str | Unset = UNSET + error_localizer_results: ( + CompositeEvalExecuteResponseResultErrorLocalizerResults | Unset + ) = UNSET + evaluation_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + composite_name = self.composite_name + + aggregation_enabled = self.aggregation_enabled + + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + total_children = self.total_children + + completed_children = self.completed_children + + failed_children = self.failed_children + + composite_id: None | str | Unset + if isinstance(self.composite_id, Unset): + composite_id = UNSET + else: + composite_id = self.composite_id + + aggregation_function: None | str | Unset + if isinstance(self.aggregation_function, Unset): + aggregation_function = UNSET + else: + aggregation_function = self.aggregation_function + + aggregate_score: float | None | Unset + if isinstance(self.aggregate_score, Unset): + aggregate_score = UNSET + else: + aggregate_score = self.aggregate_score + + aggregate_pass: bool | None | Unset + if isinstance(self.aggregate_pass, Unset): + aggregate_pass = UNSET + else: + aggregate_pass = self.aggregate_pass + + summary: None | str | Unset + if isinstance(self.summary, Unset): + summary = UNSET + else: + summary = self.summary + + error_localizer_results: dict[str, Any] | Unset = UNSET + if not isinstance(self.error_localizer_results, Unset): + error_localizer_results = self.error_localizer_results.to_dict() + + evaluation_id: None | str | Unset + if isinstance(self.evaluation_id, Unset): + evaluation_id = UNSET + else: + evaluation_id = self.evaluation_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "composite_name": composite_name, + "aggregation_enabled": aggregation_enabled, + "children": children, + "total_children": total_children, + "completed_children": completed_children, + "failed_children": failed_children, + } + ) + if composite_id is not UNSET: + field_dict["composite_id"] = composite_id + if aggregation_function is not UNSET: + field_dict["aggregation_function"] = aggregation_function + if aggregate_score is not UNSET: + field_dict["aggregate_score"] = aggregate_score + if aggregate_pass is not UNSET: + field_dict["aggregate_pass"] = aggregate_pass + if summary is not UNSET: + field_dict["summary"] = summary + if error_localizer_results is not UNSET: + field_dict["error_localizer_results"] = error_localizer_results + if evaluation_id is not UNSET: + field_dict["evaluation_id"] = evaluation_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_child_result import CompositeChildResult + from ..models.composite_eval_execute_response_result_error_localizer_results import ( + CompositeEvalExecuteResponseResultErrorLocalizerResults, + ) + + d = dict(src_dict) + composite_name = d.pop("composite_name") + + aggregation_enabled = d.pop("aggregation_enabled") + + children = [] + _children = d.pop("children") + for children_item_data in _children: + children_item = CompositeChildResult.from_dict(children_item_data) + + children.append(children_item) + + total_children = d.pop("total_children") + + completed_children = d.pop("completed_children") + + failed_children = d.pop("failed_children") + + def _parse_composite_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + composite_id = _parse_composite_id(d.pop("composite_id", UNSET)) + + def _parse_aggregation_function(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + aggregation_function = _parse_aggregation_function( + d.pop("aggregation_function", UNSET) + ) + + def _parse_aggregate_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aggregate_score = _parse_aggregate_score(d.pop("aggregate_score", UNSET)) + + def _parse_aggregate_pass(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + aggregate_pass = _parse_aggregate_pass(d.pop("aggregate_pass", UNSET)) + + def _parse_summary(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + summary = _parse_summary(d.pop("summary", UNSET)) + + _error_localizer_results = d.pop("error_localizer_results", UNSET) + error_localizer_results: ( + CompositeEvalExecuteResponseResultErrorLocalizerResults | Unset + ) + if isinstance(_error_localizer_results, Unset): + error_localizer_results = UNSET + else: + error_localizer_results = ( + CompositeEvalExecuteResponseResultErrorLocalizerResults.from_dict( + _error_localizer_results + ) + ) + + def _parse_evaluation_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + evaluation_id = _parse_evaluation_id(d.pop("evaluation_id", UNSET)) + + composite_eval_execute_response_result = cls( + composite_name=composite_name, + aggregation_enabled=aggregation_enabled, + children=children, + total_children=total_children, + completed_children=completed_children, + failed_children=failed_children, + composite_id=composite_id, + aggregation_function=aggregation_function, + aggregate_score=aggregate_score, + aggregate_pass=aggregate_pass, + summary=summary, + error_localizer_results=error_localizer_results, + evaluation_id=evaluation_id, + ) + + composite_eval_execute_response_result.additional_properties = d + return composite_eval_execute_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_execute_response_result_error_localizer_results.py b/python/fi/generated/openapi_client/models/composite_eval_execute_response_result_error_localizer_results.py new file mode 100644 index 0000000..13d961b --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_execute_response_result_error_localizer_results.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalExecuteResponseResultErrorLocalizerResults") + + +@_attrs_define +class CompositeEvalExecuteResponseResultErrorLocalizerResults: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_execute_response_result_error_localizer_results = cls() + + composite_eval_execute_response_result_error_localizer_results.additional_properties = d + return composite_eval_execute_response_result_error_localizer_results + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_update_request.py b/python/fi/generated/openapi_client/models/composite_eval_update_request.py new file mode 100644 index 0000000..c9a71c4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_update_request.py @@ -0,0 +1,262 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.composite_eval_update_request_aggregation_function import ( + CompositeEvalUpdateRequestAggregationFunction, +) +from ..models.composite_eval_update_request_composite_child_axis import ( + CompositeEvalUpdateRequestCompositeChildAxis, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.composite_eval_update_request_child_weights import ( + CompositeEvalUpdateRequestChildWeights, + ) + + +T = TypeVar("T", bound="CompositeEvalUpdateRequest") + + +@_attrs_define +class CompositeEvalUpdateRequest: + """ + Attributes: + name (None | str | Unset): + description (None | str | Unset): + tags (list[str] | None | Unset): + aggregation_enabled (bool | None | Unset): + aggregation_function (CompositeEvalUpdateRequestAggregationFunction | Unset): + child_template_ids (list[UUID] | None | Unset): + child_weights (CompositeEvalUpdateRequestChildWeights | Unset): + composite_child_axis (CompositeEvalUpdateRequestCompositeChildAxis | Unset): + """ + + name: None | str | Unset = UNSET + description: None | str | Unset = UNSET + tags: list[str] | None | Unset = UNSET + aggregation_enabled: bool | None | Unset = UNSET + aggregation_function: CompositeEvalUpdateRequestAggregationFunction | Unset = UNSET + child_template_ids: list[UUID] | None | Unset = UNSET + child_weights: CompositeEvalUpdateRequestChildWeights | Unset = UNSET + composite_child_axis: CompositeEvalUpdateRequestCompositeChildAxis | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + tags: list[str] | None | Unset + if isinstance(self.tags, Unset): + tags = UNSET + elif isinstance(self.tags, list): + tags = self.tags + + else: + tags = self.tags + + aggregation_enabled: bool | None | Unset + if isinstance(self.aggregation_enabled, Unset): + aggregation_enabled = UNSET + else: + aggregation_enabled = self.aggregation_enabled + + aggregation_function: str | Unset = UNSET + if not isinstance(self.aggregation_function, Unset): + aggregation_function = self.aggregation_function.value + + child_template_ids: list[str] | None | Unset + if isinstance(self.child_template_ids, Unset): + child_template_ids = UNSET + elif isinstance(self.child_template_ids, list): + child_template_ids = [] + for child_template_ids_type_0_item_data in self.child_template_ids: + child_template_ids_type_0_item = str( + child_template_ids_type_0_item_data + ) + child_template_ids.append(child_template_ids_type_0_item) + + else: + child_template_ids = self.child_template_ids + + child_weights: dict[str, Any] | Unset = UNSET + if not isinstance(self.child_weights, Unset): + child_weights = self.child_weights.to_dict() + + composite_child_axis: str | Unset = UNSET + if not isinstance(self.composite_child_axis, Unset): + composite_child_axis = self.composite_child_axis.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if tags is not UNSET: + field_dict["tags"] = tags + if aggregation_enabled is not UNSET: + field_dict["aggregation_enabled"] = aggregation_enabled + if aggregation_function is not UNSET: + field_dict["aggregation_function"] = aggregation_function + if child_template_ids is not UNSET: + field_dict["child_template_ids"] = child_template_ids + if child_weights is not UNSET: + field_dict["child_weights"] = child_weights + if composite_child_axis is not UNSET: + field_dict["composite_child_axis"] = composite_child_axis + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.composite_eval_update_request_child_weights import ( + CompositeEvalUpdateRequestChildWeights, + ) + + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_tags(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + tags_type_0 = cast(list[str], data) + + return tags_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + tags = _parse_tags(d.pop("tags", UNSET)) + + def _parse_aggregation_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + aggregation_enabled = _parse_aggregation_enabled( + d.pop("aggregation_enabled", UNSET) + ) + + _aggregation_function = d.pop("aggregation_function", UNSET) + aggregation_function: CompositeEvalUpdateRequestAggregationFunction | Unset + if isinstance(_aggregation_function, Unset): + aggregation_function = UNSET + else: + aggregation_function = CompositeEvalUpdateRequestAggregationFunction( + _aggregation_function + ) + + def _parse_child_template_ids(data: object) -> list[UUID] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + child_template_ids_type_0 = [] + _child_template_ids_type_0 = data + for child_template_ids_type_0_item_data in _child_template_ids_type_0: + child_template_ids_type_0_item = UUID( + child_template_ids_type_0_item_data + ) + + child_template_ids_type_0.append(child_template_ids_type_0_item) + + return child_template_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UUID] | None | Unset, data) + + child_template_ids = _parse_child_template_ids( + d.pop("child_template_ids", UNSET) + ) + + _child_weights = d.pop("child_weights", UNSET) + child_weights: CompositeEvalUpdateRequestChildWeights | Unset + if isinstance(_child_weights, Unset): + child_weights = UNSET + else: + child_weights = CompositeEvalUpdateRequestChildWeights.from_dict( + _child_weights + ) + + _composite_child_axis = d.pop("composite_child_axis", UNSET) + composite_child_axis: CompositeEvalUpdateRequestCompositeChildAxis | Unset + if isinstance(_composite_child_axis, Unset): + composite_child_axis = UNSET + else: + composite_child_axis = CompositeEvalUpdateRequestCompositeChildAxis( + _composite_child_axis + ) + + composite_eval_update_request = cls( + name=name, + description=description, + tags=tags, + aggregation_enabled=aggregation_enabled, + aggregation_function=aggregation_function, + child_template_ids=child_template_ids, + child_weights=child_weights, + composite_child_axis=composite_child_axis, + ) + + composite_eval_update_request.additional_properties = d + return composite_eval_update_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_update_request_aggregation_function.py b/python/fi/generated/openapi_client/models/composite_eval_update_request_aggregation_function.py new file mode 100644 index 0000000..5c76eee --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_update_request_aggregation_function.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class CompositeEvalUpdateRequestAggregationFunction(str, Enum): + AVG = "avg" + MAX = "max" + MIN = "min" + PASS_RATE = "pass_rate" + WEIGHTED_AVG = "weighted_avg" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/composite_eval_update_request_child_weights.py b/python/fi/generated/openapi_client/models/composite_eval_update_request_child_weights.py new file mode 100644 index 0000000..3da0fc5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_update_request_child_weights.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CompositeEvalUpdateRequestChildWeights") + + +@_attrs_define +class CompositeEvalUpdateRequestChildWeights: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + composite_eval_update_request_child_weights = cls() + + composite_eval_update_request_child_weights.additional_properties = d + return composite_eval_update_request_child_weights + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/composite_eval_update_request_composite_child_axis.py b/python/fi/generated/openapi_client/models/composite_eval_update_request_composite_child_axis.py new file mode 100644 index 0000000..0dcf8a9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/composite_eval_update_request_composite_child_axis.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class CompositeEvalUpdateRequestCompositeChildAxis(str, Enum): + CHOICES = "choices" + CODE = "code" + PASS_FAIL = "pass_fail" + PERCENTAGE = "percentage" + VALUE_0 = "" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/conditional_column_request.py b/python/fi/generated/openapi_client/models/conditional_column_request.py new file mode 100644 index 0000000..d2c9fca --- /dev/null +++ b/python/fi/generated/openapi_client/models/conditional_column_request.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.conditional_column_request_config_item import ( + ConditionalColumnRequestConfigItem, + ) + + +T = TypeVar("T", bound="ConditionalColumnRequest") + + +@_attrs_define +class ConditionalColumnRequest: + """ + Attributes: + config (list[ConditionalColumnRequestConfigItem]): + new_column_name (str): + concurrency (int | Unset): Default: 5. + """ + + config: list[ConditionalColumnRequestConfigItem] + new_column_name: str + concurrency: int | Unset = 5 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + config = [] + for config_item_data in self.config: + config_item = config_item_data.to_dict() + config.append(config_item) + + new_column_name = self.new_column_name + + concurrency = self.concurrency + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "config": config, + "new_column_name": new_column_name, + } + ) + if concurrency is not UNSET: + field_dict["concurrency"] = concurrency + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.conditional_column_request_config_item import ( + ConditionalColumnRequestConfigItem, + ) + + d = dict(src_dict) + config = [] + _config = d.pop("config") + for config_item_data in _config: + config_item = ConditionalColumnRequestConfigItem.from_dict(config_item_data) + + config.append(config_item) + + new_column_name = d.pop("new_column_name") + + concurrency = d.pop("concurrency", UNSET) + + conditional_column_request = cls( + config=config, + new_column_name=new_column_name, + concurrency=concurrency, + ) + + conditional_column_request.additional_properties = d + return conditional_column_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/conditional_column_request_config_item.py b/python/fi/generated/openapi_client/models/conditional_column_request_config_item.py new file mode 100644 index 0000000..a35c2ac --- /dev/null +++ b/python/fi/generated/openapi_client/models/conditional_column_request_config_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ConditionalColumnRequestConfigItem") + + +@_attrs_define +class ConditionalColumnRequestConfigItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + conditional_column_request_config_item = cls() + + conditional_column_request_config_item.additional_properties = d + return conditional_column_request_config_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/configure_evaluations.py b/python/fi/generated/openapi_client/models/configure_evaluations.py new file mode 100644 index 0000000..51afafe --- /dev/null +++ b/python/fi/generated/openapi_client/models/configure_evaluations.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configure_evaluations_config import ConfigureEvaluationsConfig + from ..models.configure_evaluations_inputs import ConfigureEvaluationsInputs + + +T = TypeVar("T", bound="ConfigureEvaluations") + + +@_attrs_define +class ConfigureEvaluations: + """ + Attributes: + eval_templates (str): + inputs (ConfigureEvaluationsInputs): + model_name (None | str | Unset): + config (ConfigureEvaluationsConfig | Unset): + """ + + eval_templates: str + inputs: ConfigureEvaluationsInputs + model_name: None | str | Unset = UNSET + config: ConfigureEvaluationsConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_templates = self.eval_templates + + inputs = self.inputs.to_dict() + + model_name: None | str | Unset + if isinstance(self.model_name, Unset): + model_name = UNSET + else: + model_name = self.model_name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_templates": eval_templates, + "inputs": inputs, + } + ) + if model_name is not UNSET: + field_dict["model_name"] = model_name + if config is not UNSET: + field_dict["config"] = config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configure_evaluations_config import ConfigureEvaluationsConfig + from ..models.configure_evaluations_inputs import ConfigureEvaluationsInputs + + d = dict(src_dict) + eval_templates = d.pop("eval_templates") + + inputs = ConfigureEvaluationsInputs.from_dict(d.pop("inputs")) + + def _parse_model_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model_name = _parse_model_name(d.pop("model_name", UNSET)) + + _config = d.pop("config", UNSET) + config: ConfigureEvaluationsConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = ConfigureEvaluationsConfig.from_dict(_config) + + configure_evaluations = cls( + eval_templates=eval_templates, + inputs=inputs, + model_name=model_name, + config=config, + ) + + configure_evaluations.additional_properties = d + return configure_evaluations + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/configure_evaluations_config.py b/python/fi/generated/openapi_client/models/configure_evaluations_config.py new file mode 100644 index 0000000..d2b28d5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/configure_evaluations_config.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ConfigureEvaluationsConfig") + + +@_attrs_define +class ConfigureEvaluationsConfig: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + configure_evaluations_config = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + configure_evaluations_config.additional_properties = additional_properties + return configure_evaluations_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/configure_evaluations_inputs.py b/python/fi/generated/openapi_client/models/configure_evaluations_inputs.py new file mode 100644 index 0000000..c60ccd0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/configure_evaluations_inputs.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ConfigureEvaluationsInputs") + + +@_attrs_define +class ConfigureEvaluationsInputs: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + configure_evaluations_inputs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + configure_evaluations_inputs.additional_properties = additional_properties + return configure_evaluations_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_dataset_from_experiment_request.py b/python/fi/generated/openapi_client/models/create_dataset_from_experiment_request.py new file mode 100644 index 0000000..8850ad6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_dataset_from_experiment_request.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateDatasetFromExperimentRequest") + + +@_attrs_define +class CreateDatasetFromExperimentRequest: + """ + Attributes: + name (str | Unset): + model_type (str | Unset): + """ + + name: str | Unset = UNSET + model_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + model_type = self.model_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if model_type is not UNSET: + field_dict["model_type"] = model_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + model_type = d.pop("model_type", UNSET) + + create_dataset_from_experiment_request = cls( + name=name, + model_type=model_type, + ) + + create_dataset_from_experiment_request.additional_properties = d + return create_dataset_from_experiment_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_dataset_from_local_file_request.py b/python/fi/generated/openapi_client/models/create_dataset_from_local_file_request.py new file mode 100644 index 0000000..cde7495 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_dataset_from_local_file_request.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateDatasetFromLocalFileRequest") + + +@_attrs_define +class CreateDatasetFromLocalFileRequest: + """ + Attributes: + file (str | Unset): + new_dataset_name (str | Unset): + model_type (str | Unset): + source (str | Unset): + """ + + file: str | Unset = UNSET + new_dataset_name: str | Unset = UNSET + model_type: str | Unset = UNSET + source: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file = self.file + + new_dataset_name = self.new_dataset_name + + model_type = self.model_type + + source = self.source + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file is not UNSET: + field_dict["file"] = file + if new_dataset_name is not UNSET: + field_dict["new_dataset_name"] = new_dataset_name + if model_type is not UNSET: + field_dict["model_type"] = model_type + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + file = d.pop("file", UNSET) + + new_dataset_name = d.pop("new_dataset_name", UNSET) + + model_type = d.pop("model_type", UNSET) + + source = d.pop("source", UNSET) + + create_dataset_from_local_file_request = cls( + file=file, + new_dataset_name=new_dataset_name, + model_type=model_type, + source=source, + ) + + create_dataset_from_local_file_request.additional_properties = d + return create_dataset_from_local_file_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_empty_dataset_request.py b/python/fi/generated/openapi_client/models/create_empty_dataset_request.py new file mode 100644 index 0000000..bfc9300 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_empty_dataset_request.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateEmptyDatasetRequest") + + +@_attrs_define +class CreateEmptyDatasetRequest: + """ + Attributes: + new_dataset_name (str): + model_type (str | Unset): + is_sdk (bool | Unset): Default: False. + row (int | Unset): + """ + + new_dataset_name: str + model_type: str | Unset = UNSET + is_sdk: bool | Unset = False + row: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + new_dataset_name = self.new_dataset_name + + model_type = self.model_type + + is_sdk = self.is_sdk + + row = self.row + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "new_dataset_name": new_dataset_name, + } + ) + if model_type is not UNSET: + field_dict["model_type"] = model_type + if is_sdk is not UNSET: + field_dict["is_sdk"] = is_sdk + if row is not UNSET: + field_dict["row"] = row + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + new_dataset_name = d.pop("new_dataset_name") + + model_type = d.pop("model_type", UNSET) + + is_sdk = d.pop("is_sdk", UNSET) + + row = d.pop("row", UNSET) + + create_empty_dataset_request = cls( + new_dataset_name=new_dataset_name, + model_type=model_type, + is_sdk=is_sdk, + row=row, + ) + + create_empty_dataset_request.additional_properties = d + return create_empty_dataset_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_linear_issue.py b/python/fi/generated/openapi_client/models/create_linear_issue.py new file mode 100644 index 0000000..328a60e --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_linear_issue.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateLinearIssue") + + +@_attrs_define +class CreateLinearIssue: + """ + Attributes: + team_id (str): + title (str | Unset): + description (str | Unset): + priority (int | Unset): Default: 0. + """ + + team_id: str + title: str | Unset = UNSET + description: str | Unset = UNSET + priority: int | Unset = 0 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + team_id = self.team_id + + title = self.title + + description = self.description + + priority = self.priority + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "team_id": team_id, + } + ) + if title is not UNSET: + field_dict["title"] = title + if description is not UNSET: + field_dict["description"] = description + if priority is not UNSET: + field_dict["priority"] = priority + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + team_id = d.pop("team_id") + + title = d.pop("title", UNSET) + + description = d.pop("description", UNSET) + + priority = d.pop("priority", UNSET) + + create_linear_issue = cls( + team_id=team_id, + title=title, + description=description, + priority=priority, + ) + + create_linear_issue.additional_properties = d + return create_linear_issue + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_linear_issue_response.py b/python/fi/generated/openapi_client/models/create_linear_issue_response.py new file mode 100644 index 0000000..284a39d --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_linear_issue_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_linear_issue_result import CreateLinearIssueResult + + +T = TypeVar("T", bound="CreateLinearIssueResponse") + + +@_attrs_define +class CreateLinearIssueResponse: + """ + Attributes: + result (CreateLinearIssueResult): + status (bool | Unset): Default: True. + """ + + result: CreateLinearIssueResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_linear_issue_result import CreateLinearIssueResult + + d = dict(src_dict) + result = CreateLinearIssueResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + create_linear_issue_response = cls( + result=result, + status=status, + ) + + create_linear_issue_response.additional_properties = d + return create_linear_issue_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_linear_issue_result.py b/python/fi/generated/openapi_client/models/create_linear_issue_result.py new file mode 100644 index 0000000..e17f2a0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_linear_issue_result.py @@ -0,0 +1,121 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateLinearIssueResult") + + +@_attrs_define +class CreateLinearIssueResult: + """ + Attributes: + already_linked (bool | Unset): + issue_id (None | str | Unset): + issue_url (None | str | Unset): + issue_title (None | str | Unset): + """ + + already_linked: bool | Unset = UNSET + issue_id: None | str | Unset = UNSET + issue_url: None | str | Unset = UNSET + issue_title: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + already_linked = self.already_linked + + issue_id: None | str | Unset + if isinstance(self.issue_id, Unset): + issue_id = UNSET + else: + issue_id = self.issue_id + + issue_url: None | str | Unset + if isinstance(self.issue_url, Unset): + issue_url = UNSET + else: + issue_url = self.issue_url + + issue_title: None | str | Unset + if isinstance(self.issue_title, Unset): + issue_title = UNSET + else: + issue_title = self.issue_title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if already_linked is not UNSET: + field_dict["already_linked"] = already_linked + if issue_id is not UNSET: + field_dict["issue_id"] = issue_id + if issue_url is not UNSET: + field_dict["issue_url"] = issue_url + if issue_title is not UNSET: + field_dict["issue_title"] = issue_title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + already_linked = d.pop("already_linked", UNSET) + + def _parse_issue_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + issue_id = _parse_issue_id(d.pop("issue_id", UNSET)) + + def _parse_issue_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + issue_url = _parse_issue_url(d.pop("issue_url", UNSET)) + + def _parse_issue_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + issue_title = _parse_issue_title(d.pop("issue_title", UNSET)) + + create_linear_issue_result = cls( + already_linked=already_linked, + issue_id=issue_id, + issue_url=issue_url, + issue_title=issue_title, + ) + + create_linear_issue_result.additional_properties = d + return create_linear_issue_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_prompt_simulation_request.py b/python/fi/generated/openapi_client/models/create_prompt_simulation_request.py new file mode 100644 index 0000000..06b511e --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_prompt_simulation_request.py @@ -0,0 +1,146 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_definition import EvalConfigDefinition + + +T = TypeVar("T", bound="CreatePromptSimulationRequest") + + +@_attrs_define +class CreatePromptSimulationRequest: + """ + Attributes: + name (str): + prompt_version_id (str): Prompt version ID (UUID) or template_version string + scenario_ids (list[UUID]): + description (str | Unset): + dataset_row_ids (list[str] | Unset): + evaluations_config (list[EvalConfigDefinition] | Unset): Evaluation configurations to create + enable_tool_evaluation (bool | Unset): Enable automatic tool evaluation for this simulation run Default: False. + """ + + name: str + prompt_version_id: str + scenario_ids: list[UUID] + description: str | Unset = UNSET + dataset_row_ids: list[str] | Unset = UNSET + evaluations_config: list[EvalConfigDefinition] | Unset = UNSET + enable_tool_evaluation: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + prompt_version_id = self.prompt_version_id + + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + description = self.description + + dataset_row_ids: list[str] | Unset = UNSET + if not isinstance(self.dataset_row_ids, Unset): + dataset_row_ids = self.dataset_row_ids + + evaluations_config: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.evaluations_config, Unset): + evaluations_config = [] + for evaluations_config_item_data in self.evaluations_config: + evaluations_config_item = evaluations_config_item_data.to_dict() + evaluations_config.append(evaluations_config_item) + + enable_tool_evaluation = self.enable_tool_evaluation + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "prompt_version_id": prompt_version_id, + "scenario_ids": scenario_ids, + } + ) + if description is not UNSET: + field_dict["description"] = description + if dataset_row_ids is not UNSET: + field_dict["dataset_row_ids"] = dataset_row_ids + if evaluations_config is not UNSET: + field_dict["evaluations_config"] = evaluations_config + if enable_tool_evaluation is not UNSET: + field_dict["enable_tool_evaluation"] = enable_tool_evaluation + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_definition import EvalConfigDefinition + + d = dict(src_dict) + name = d.pop("name") + + prompt_version_id = d.pop("prompt_version_id") + + scenario_ids = [] + _scenario_ids = d.pop("scenario_ids") + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + description = d.pop("description", UNSET) + + dataset_row_ids = cast(list[str], d.pop("dataset_row_ids", UNSET)) + + _evaluations_config = d.pop("evaluations_config", UNSET) + evaluations_config: list[EvalConfigDefinition] | Unset = UNSET + if _evaluations_config is not UNSET: + evaluations_config = [] + for evaluations_config_item_data in _evaluations_config: + evaluations_config_item = EvalConfigDefinition.from_dict( + evaluations_config_item_data + ) + + evaluations_config.append(evaluations_config_item) + + enable_tool_evaluation = d.pop("enable_tool_evaluation", UNSET) + + create_prompt_simulation_request = cls( + name=name, + prompt_version_id=prompt_version_id, + scenario_ids=scenario_ids, + description=description, + dataset_row_ids=dataset_row_ids, + evaluations_config=evaluations_config, + enable_tool_evaluation=enable_tool_evaluation, + ) + + create_prompt_simulation_request.additional_properties = d + return create_prompt_simulation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_run_test.py b/python/fi/generated/openapi_client/models/create_run_test.py new file mode 100644 index 0000000..15d5d1e --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_run_test.py @@ -0,0 +1,227 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_definition import EvalConfigDefinition + + +T = TypeVar("T", bound="CreateRunTest") + + +@_attrs_define +class CreateRunTest: + """ + Attributes: + name (str): + agent_definition_id (UUID): + scenario_ids (list[UUID]): + description (str | Unset): + dataset_row_ids (list[str] | Unset): + eval_config_ids (list[UUID] | Unset): + evaluations_config (list[EvalConfigDefinition] | Unset): Evaluation configurations to create + enable_tool_evaluation (bool | Unset): Enable automatic tool evaluation for this test run Default: False. + replay_session_id (None | Unset | UUID): Optional replay session ID to mark as completed after run test creation + agent_version (None | Unset | UUID): Optional agent version to bind to this test run + """ + + name: str + agent_definition_id: UUID + scenario_ids: list[UUID] + description: str | Unset = UNSET + dataset_row_ids: list[str] | Unset = UNSET + eval_config_ids: list[UUID] | Unset = UNSET + evaluations_config: list[EvalConfigDefinition] | Unset = UNSET + enable_tool_evaluation: bool | Unset = False + replay_session_id: None | Unset | UUID = UNSET + agent_version: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + agent_definition_id = str(self.agent_definition_id) + + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + description = self.description + + dataset_row_ids: list[str] | Unset = UNSET + if not isinstance(self.dataset_row_ids, Unset): + dataset_row_ids = self.dataset_row_ids + + eval_config_ids: list[str] | Unset = UNSET + if not isinstance(self.eval_config_ids, Unset): + eval_config_ids = [] + for eval_config_ids_item_data in self.eval_config_ids: + eval_config_ids_item = str(eval_config_ids_item_data) + eval_config_ids.append(eval_config_ids_item) + + evaluations_config: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.evaluations_config, Unset): + evaluations_config = [] + for evaluations_config_item_data in self.evaluations_config: + evaluations_config_item = evaluations_config_item_data.to_dict() + evaluations_config.append(evaluations_config_item) + + enable_tool_evaluation = self.enable_tool_evaluation + + replay_session_id: None | str | Unset + if isinstance(self.replay_session_id, Unset): + replay_session_id = UNSET + elif isinstance(self.replay_session_id, UUID): + replay_session_id = str(self.replay_session_id) + else: + replay_session_id = self.replay_session_id + + agent_version: None | str | Unset + if isinstance(self.agent_version, Unset): + agent_version = UNSET + elif isinstance(self.agent_version, UUID): + agent_version = str(self.agent_version) + else: + agent_version = self.agent_version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "agent_definition_id": agent_definition_id, + "scenario_ids": scenario_ids, + } + ) + if description is not UNSET: + field_dict["description"] = description + if dataset_row_ids is not UNSET: + field_dict["dataset_row_ids"] = dataset_row_ids + if eval_config_ids is not UNSET: + field_dict["eval_config_ids"] = eval_config_ids + if evaluations_config is not UNSET: + field_dict["evaluations_config"] = evaluations_config + if enable_tool_evaluation is not UNSET: + field_dict["enable_tool_evaluation"] = enable_tool_evaluation + if replay_session_id is not UNSET: + field_dict["replay_session_id"] = replay_session_id + if agent_version is not UNSET: + field_dict["agent_version"] = agent_version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_definition import EvalConfigDefinition + + d = dict(src_dict) + name = d.pop("name") + + agent_definition_id = UUID(d.pop("agent_definition_id")) + + scenario_ids = [] + _scenario_ids = d.pop("scenario_ids") + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + description = d.pop("description", UNSET) + + dataset_row_ids = cast(list[str], d.pop("dataset_row_ids", UNSET)) + + _eval_config_ids = d.pop("eval_config_ids", UNSET) + eval_config_ids: list[UUID] | Unset = UNSET + if _eval_config_ids is not UNSET: + eval_config_ids = [] + for eval_config_ids_item_data in _eval_config_ids: + eval_config_ids_item = UUID(eval_config_ids_item_data) + + eval_config_ids.append(eval_config_ids_item) + + _evaluations_config = d.pop("evaluations_config", UNSET) + evaluations_config: list[EvalConfigDefinition] | Unset = UNSET + if _evaluations_config is not UNSET: + evaluations_config = [] + for evaluations_config_item_data in _evaluations_config: + evaluations_config_item = EvalConfigDefinition.from_dict( + evaluations_config_item_data + ) + + evaluations_config.append(evaluations_config_item) + + enable_tool_evaluation = d.pop("enable_tool_evaluation", UNSET) + + def _parse_replay_session_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + replay_session_id_type_0 = UUID(data) + + return replay_session_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + replay_session_id = _parse_replay_session_id(d.pop("replay_session_id", UNSET)) + + def _parse_agent_version(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_version_type_0 = UUID(data) + + return agent_version_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_version = _parse_agent_version(d.pop("agent_version", UNSET)) + + create_run_test = cls( + name=name, + agent_definition_id=agent_definition_id, + scenario_ids=scenario_ids, + description=description, + dataset_row_ids=dataset_row_ids, + eval_config_ids=eval_config_ids, + evaluations_config=evaluations_config, + enable_tool_evaluation=enable_tool_evaluation, + replay_session_id=replay_session_id, + agent_version=agent_version, + ) + + create_run_test.additional_properties = d + return create_run_test + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_score.py b/python/fi/generated/openapi_client/models/create_score.py new file mode 100644 index 0000000..b5fe476 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_score.py @@ -0,0 +1,151 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.create_score_score_source import CreateScoreScoreSource +from ..models.create_score_source_type import CreateScoreSourceType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_score_value import CreateScoreValue + + +T = TypeVar("T", bound="CreateScore") + + +@_attrs_define +class CreateScore: + """ + Attributes: + source_type (CreateScoreSourceType): + source_id (str): + label_id (UUID): + value (CreateScoreValue): + notes (str | Unset): Default: ''. + score_source (CreateScoreScoreSource | Unset): Default: CreateScoreScoreSource.HUMAN. + queue_item_id (None | Unset | UUID): + """ + + source_type: CreateScoreSourceType + source_id: str + label_id: UUID + value: CreateScoreValue + notes: str | Unset = "" + score_source: CreateScoreScoreSource | Unset = CreateScoreScoreSource.HUMAN + queue_item_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_type = self.source_type.value + + source_id = self.source_id + + label_id = str(self.label_id) + + value = self.value.to_dict() + + notes = self.notes + + score_source: str | Unset = UNSET + if not isinstance(self.score_source, Unset): + score_source = self.score_source.value + + queue_item_id: None | str | Unset + if isinstance(self.queue_item_id, Unset): + queue_item_id = UNSET + elif isinstance(self.queue_item_id, UUID): + queue_item_id = str(self.queue_item_id) + else: + queue_item_id = self.queue_item_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source_type": source_type, + "source_id": source_id, + "label_id": label_id, + "value": value, + } + ) + if notes is not UNSET: + field_dict["notes"] = notes + if score_source is not UNSET: + field_dict["score_source"] = score_source + if queue_item_id is not UNSET: + field_dict["queue_item_id"] = queue_item_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_score_value import CreateScoreValue + + d = dict(src_dict) + source_type = CreateScoreSourceType(d.pop("source_type")) + + source_id = d.pop("source_id") + + label_id = UUID(d.pop("label_id")) + + value = CreateScoreValue.from_dict(d.pop("value")) + + notes = d.pop("notes", UNSET) + + _score_source = d.pop("score_source", UNSET) + score_source: CreateScoreScoreSource | Unset + if isinstance(_score_source, Unset): + score_source = UNSET + else: + score_source = CreateScoreScoreSource(_score_source) + + def _parse_queue_item_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + queue_item_id_type_0 = UUID(data) + + return queue_item_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + queue_item_id = _parse_queue_item_id(d.pop("queue_item_id", UNSET)) + + create_score = cls( + source_type=source_type, + source_id=source_id, + label_id=label_id, + value=value, + notes=notes, + score_source=score_source, + queue_item_id=queue_item_id, + ) + + create_score.additional_properties = d + return create_score + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/create_score_score_source.py b/python/fi/generated/openapi_client/models/create_score_score_source.py new file mode 100644 index 0000000..62d2800 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_score_score_source.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class CreateScoreScoreSource(str, Enum): + API = "api" + AUTO = "auto" + HUMAN = "human" + IMPORTED = "imported" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/create_score_source_type.py b/python/fi/generated/openapi_client/models/create_score_source_type.py new file mode 100644 index 0000000..b5faca5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_score_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class CreateScoreSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/create_score_value.py b/python/fi/generated/openapi_client/models/create_score_value.py new file mode 100644 index 0000000..aefb057 --- /dev/null +++ b/python/fi/generated/openapi_client/models/create_score_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CreateScoreValue") + + +@_attrs_define +class CreateScoreValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + create_score_value = cls() + + create_score_value.additional_properties = d + return create_score_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset.py b/python/fi/generated/openapi_client/models/dataset.py new file mode 100644 index 0000000..c1ebf17 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset.py @@ -0,0 +1,152 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dataset_model_type import DatasetModelType +from ..models.dataset_source import DatasetSource +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Dataset") + + +@_attrs_define +class Dataset: + """ + Attributes: + name (str): + organization (UUID): + id (UUID | Unset): + model_type (DatasetModelType | Unset): + source (DatasetSource | Unset): + user (None | Unset | UUID): + """ + + name: str + organization: UUID + id: UUID | Unset = UNSET + model_type: DatasetModelType | Unset = UNSET + source: DatasetSource | Unset = UNSET + user: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + organization = str(self.organization) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + model_type: str | Unset = UNSET + if not isinstance(self.model_type, Unset): + model_type = self.model_type.value + + source: str | Unset = UNSET + if not isinstance(self.source, Unset): + source = self.source.value + + user: None | str | Unset + if isinstance(self.user, Unset): + user = UNSET + elif isinstance(self.user, UUID): + user = str(self.user) + else: + user = self.user + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "organization": organization, + } + ) + if id is not UNSET: + field_dict["id"] = id + if model_type is not UNSET: + field_dict["model_type"] = model_type + if source is not UNSET: + field_dict["source"] = source + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + organization = UUID(d.pop("organization")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _model_type = d.pop("model_type", UNSET) + model_type: DatasetModelType | Unset + if isinstance(_model_type, Unset): + model_type = UNSET + else: + model_type = DatasetModelType(_model_type) + + _source = d.pop("source", UNSET) + source: DatasetSource | Unset + if isinstance(_source, Unset): + source = UNSET + else: + source = DatasetSource(_source) + + def _parse_user(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + user_type_0 = UUID(data) + + return user_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + user = _parse_user(d.pop("user", UNSET)) + + dataset = cls( + name=name, + organization=organization, + id=id, + model_type=model_type, + source=source, + user=user, + ) + + dataset.additional_properties = d + return dataset + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_columns_request.py b/python/fi/generated/openapi_client/models/dataset_add_columns_request.py new file mode 100644 index 0000000..bbb1441 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_columns_request.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_add_columns_request_new_columns_data_item import ( + DatasetAddColumnsRequestNewColumnsDataItem, + ) + + +T = TypeVar("T", bound="DatasetAddColumnsRequest") + + +@_attrs_define +class DatasetAddColumnsRequest: + """ + Attributes: + new_columns_data (list[DatasetAddColumnsRequestNewColumnsDataItem]): + """ + + new_columns_data: list[DatasetAddColumnsRequestNewColumnsDataItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + new_columns_data = [] + for new_columns_data_item_data in self.new_columns_data: + new_columns_data_item = new_columns_data_item_data.to_dict() + new_columns_data.append(new_columns_data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "new_columns_data": new_columns_data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_add_columns_request_new_columns_data_item import ( + DatasetAddColumnsRequestNewColumnsDataItem, + ) + + d = dict(src_dict) + new_columns_data = [] + _new_columns_data = d.pop("new_columns_data") + for new_columns_data_item_data in _new_columns_data: + new_columns_data_item = ( + DatasetAddColumnsRequestNewColumnsDataItem.from_dict( + new_columns_data_item_data + ) + ) + + new_columns_data.append(new_columns_data_item) + + dataset_add_columns_request = cls( + new_columns_data=new_columns_data, + ) + + dataset_add_columns_request.additional_properties = d + return dataset_add_columns_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_columns_request_new_columns_data_item.py b/python/fi/generated/openapi_client/models/dataset_add_columns_request_new_columns_data_item.py new file mode 100644 index 0000000..adde5c0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_columns_request_new_columns_data_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetAddColumnsRequestNewColumnsDataItem") + + +@_attrs_define +class DatasetAddColumnsRequestNewColumnsDataItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_add_columns_request_new_columns_data_item = cls() + + dataset_add_columns_request_new_columns_data_item.additional_properties = d + return dataset_add_columns_request_new_columns_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_empty_columns_request.py b/python/fi/generated/openapi_client/models/dataset_add_empty_columns_request.py new file mode 100644 index 0000000..b62546b --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_empty_columns_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetAddEmptyColumnsRequest") + + +@_attrs_define +class DatasetAddEmptyColumnsRequest: + """ + Attributes: + num_cols (int | Unset): Default: 0. + """ + + num_cols: int | Unset = 0 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + num_cols = self.num_cols + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if num_cols is not UNSET: + field_dict["num_cols"] = num_cols + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + num_cols = d.pop("num_cols", UNSET) + + dataset_add_empty_columns_request = cls( + num_cols=num_cols, + ) + + dataset_add_empty_columns_request.additional_properties = d + return dataset_add_empty_columns_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_empty_rows_request.py b/python/fi/generated/openapi_client/models/dataset_add_empty_rows_request.py new file mode 100644 index 0000000..7133fed --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_empty_rows_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetAddEmptyRowsRequest") + + +@_attrs_define +class DatasetAddEmptyRowsRequest: + """ + Attributes: + num_rows (int | Unset): Default: 1. + """ + + num_rows: int | Unset = 1 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + num_rows = self.num_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if num_rows is not UNSET: + field_dict["num_rows"] = num_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + num_rows = d.pop("num_rows", UNSET) + + dataset_add_empty_rows_request = cls( + num_rows=num_rows, + ) + + dataset_add_empty_rows_request.additional_properties = d + return dataset_add_empty_rows_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request.py b/python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request.py new file mode 100644 index 0000000..6d13f0c --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_add_rows_from_existing_request_column_mapping import ( + DatasetAddRowsFromExistingRequestColumnMapping, + ) + + +T = TypeVar("T", bound="DatasetAddRowsFromExistingRequest") + + +@_attrs_define +class DatasetAddRowsFromExistingRequest: + """ + Attributes: + source_dataset_id (UUID): + column_mapping (DatasetAddRowsFromExistingRequestColumnMapping): + """ + + source_dataset_id: UUID + column_mapping: DatasetAddRowsFromExistingRequestColumnMapping + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_dataset_id = str(self.source_dataset_id) + + column_mapping = self.column_mapping.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source_dataset_id": source_dataset_id, + "column_mapping": column_mapping, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_add_rows_from_existing_request_column_mapping import ( + DatasetAddRowsFromExistingRequestColumnMapping, + ) + + d = dict(src_dict) + source_dataset_id = UUID(d.pop("source_dataset_id")) + + column_mapping = DatasetAddRowsFromExistingRequestColumnMapping.from_dict( + d.pop("column_mapping") + ) + + dataset_add_rows_from_existing_request = cls( + source_dataset_id=source_dataset_id, + column_mapping=column_mapping, + ) + + dataset_add_rows_from_existing_request.additional_properties = d + return dataset_add_rows_from_existing_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request_column_mapping.py b/python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request_column_mapping.py new file mode 100644 index 0000000..9ec20a7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_rows_from_existing_request_column_mapping.py @@ -0,0 +1,57 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetAddRowsFromExistingRequestColumnMapping") + + +@_attrs_define +class DatasetAddRowsFromExistingRequestColumnMapping: + """ """ + + additional_properties: dict[str, UUID] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = str(prop) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_add_rows_from_existing_request_column_mapping = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = UUID(prop_dict) + + additional_properties[prop_name] = additional_property + + dataset_add_rows_from_existing_request_column_mapping.additional_properties = ( + additional_properties + ) + return dataset_add_rows_from_existing_request_column_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> UUID: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: UUID) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_rows_request.py b/python/fi/generated/openapi_client/models/dataset_add_rows_request.py new file mode 100644 index 0000000..d73da62 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_rows_request.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_add_rows_request_rows_item import ( + DatasetAddRowsRequestRowsItem, + ) + + +T = TypeVar("T", bound="DatasetAddRowsRequest") + + +@_attrs_define +class DatasetAddRowsRequest: + """ + Attributes: + rows (list[DatasetAddRowsRequestRowsItem]): + """ + + rows: list[DatasetAddRowsRequestRowsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rows = [] + for rows_item_data in self.rows: + rows_item = rows_item_data.to_dict() + rows.append(rows_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rows": rows, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_add_rows_request_rows_item import ( + DatasetAddRowsRequestRowsItem, + ) + + d = dict(src_dict) + rows = [] + _rows = d.pop("rows") + for rows_item_data in _rows: + rows_item = DatasetAddRowsRequestRowsItem.from_dict(rows_item_data) + + rows.append(rows_item) + + dataset_add_rows_request = cls( + rows=rows, + ) + + dataset_add_rows_request.additional_properties = d + return dataset_add_rows_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_add_rows_request_rows_item.py b/python/fi/generated/openapi_client/models/dataset_add_rows_request_rows_item.py new file mode 100644 index 0000000..695873a --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_add_rows_request_rows_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetAddRowsRequestRowsItem") + + +@_attrs_define +class DatasetAddRowsRequestRowsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_add_rows_request_rows_item = cls() + + dataset_add_rows_request_rows_item.additional_properties = d + return dataset_add_rows_request_rows_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_behavior_request.py b/python/fi/generated/openapi_client/models/dataset_behavior_request.py new file mode 100644 index 0000000..d603e06 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_behavior_request.py @@ -0,0 +1,133 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dataset_behavior_request_column_config import ( + DatasetBehaviorRequestColumnConfig, + ) + from ..models.dataset_behavior_request_dataset_config import ( + DatasetBehaviorRequestDatasetConfig, + ) + + +T = TypeVar("T", bound="DatasetBehaviorRequest") + + +@_attrs_define +class DatasetBehaviorRequest: + """ + Attributes: + dataset_name (str | Unset): + column_order (list[UUID] | Unset): + column_config (DatasetBehaviorRequestColumnConfig | Unset): + dataset_config (DatasetBehaviorRequestDatasetConfig | Unset): + """ + + dataset_name: str | Unset = UNSET + column_order: list[UUID] | Unset = UNSET + column_config: DatasetBehaviorRequestColumnConfig | Unset = UNSET + dataset_config: DatasetBehaviorRequestDatasetConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_name = self.dataset_name + + column_order: list[str] | Unset = UNSET + if not isinstance(self.column_order, Unset): + column_order = [] + for column_order_item_data in self.column_order: + column_order_item = str(column_order_item_data) + column_order.append(column_order_item) + + column_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.column_config, Unset): + column_config = self.column_config.to_dict() + + dataset_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.dataset_config, Unset): + dataset_config = self.dataset_config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if dataset_name is not UNSET: + field_dict["dataset_name"] = dataset_name + if column_order is not UNSET: + field_dict["column_order"] = column_order + if column_config is not UNSET: + field_dict["column_config"] = column_config + if dataset_config is not UNSET: + field_dict["dataset_config"] = dataset_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_behavior_request_column_config import ( + DatasetBehaviorRequestColumnConfig, + ) + from ..models.dataset_behavior_request_dataset_config import ( + DatasetBehaviorRequestDatasetConfig, + ) + + d = dict(src_dict) + dataset_name = d.pop("dataset_name", UNSET) + + _column_order = d.pop("column_order", UNSET) + column_order: list[UUID] | Unset = UNSET + if _column_order is not UNSET: + column_order = [] + for column_order_item_data in _column_order: + column_order_item = UUID(column_order_item_data) + + column_order.append(column_order_item) + + _column_config = d.pop("column_config", UNSET) + column_config: DatasetBehaviorRequestColumnConfig | Unset + if isinstance(_column_config, Unset): + column_config = UNSET + else: + column_config = DatasetBehaviorRequestColumnConfig.from_dict(_column_config) + + _dataset_config = d.pop("dataset_config", UNSET) + dataset_config: DatasetBehaviorRequestDatasetConfig | Unset + if isinstance(_dataset_config, Unset): + dataset_config = UNSET + else: + dataset_config = DatasetBehaviorRequestDatasetConfig.from_dict( + _dataset_config + ) + + dataset_behavior_request = cls( + dataset_name=dataset_name, + column_order=column_order, + column_config=column_config, + dataset_config=dataset_config, + ) + + dataset_behavior_request.additional_properties = d + return dataset_behavior_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_behavior_request_column_config.py b/python/fi/generated/openapi_client/models/dataset_behavior_request_column_config.py new file mode 100644 index 0000000..7f79bb0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_behavior_request_column_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetBehaviorRequestColumnConfig") + + +@_attrs_define +class DatasetBehaviorRequestColumnConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_behavior_request_column_config = cls() + + dataset_behavior_request_column_config.additional_properties = d + return dataset_behavior_request_column_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_behavior_request_dataset_config.py b/python/fi/generated/openapi_client/models/dataset_behavior_request_dataset_config.py new file mode 100644 index 0000000..a2f8391 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_behavior_request_dataset_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetBehaviorRequestDatasetConfig") + + +@_attrs_define +class DatasetBehaviorRequestDatasetConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_behavior_request_dataset_config = cls() + + dataset_behavior_request_dataset_config.additional_properties = d + return dataset_behavior_request_dataset_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_data_request.py b/python/fi/generated/openapi_client/models/dataset_cell_data_request.py new file mode 100644 index 0000000..4d2dd00 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_data_request.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetCellDataRequest") + + +@_attrs_define +class DatasetCellDataRequest: + """ + Attributes: + row_ids (list[UUID]): + column_ids (list[UUID]): + """ + + row_ids: list[UUID] + column_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + row_ids = [] + for row_ids_item_data in self.row_ids: + row_ids_item = str(row_ids_item_data) + row_ids.append(row_ids_item) + + column_ids = [] + for column_ids_item_data in self.column_ids: + column_ids_item = str(column_ids_item_data) + column_ids.append(column_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "row_ids": row_ids, + "column_ids": column_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + row_ids = [] + _row_ids = d.pop("row_ids") + for row_ids_item_data in _row_ids: + row_ids_item = UUID(row_ids_item_data) + + row_ids.append(row_ids_item) + + column_ids = [] + _column_ids = d.pop("column_ids") + for column_ids_item_data in _column_ids: + column_ids_item = UUID(column_ids_item_data) + + column_ids.append(column_ids_item) + + dataset_cell_data_request = cls( + row_ids=row_ids, + column_ids=column_ids, + ) + + dataset_cell_data_request.additional_properties = d + return dataset_cell_data_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_data_response.py b/python/fi/generated/openapi_client/models/dataset_cell_data_response.py new file mode 100644 index 0000000..b3e1e98 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_data_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_cell_data_response_result import DatasetCellDataResponseResult + + +T = TypeVar("T", bound="DatasetCellDataResponse") + + +@_attrs_define +class DatasetCellDataResponse: + """ + Attributes: + status (bool): + result (DatasetCellDataResponseResult): + """ + + status: bool + result: DatasetCellDataResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_cell_data_response_result import ( + DatasetCellDataResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetCellDataResponseResult.from_dict(d.pop("result")) + + dataset_cell_data_response = cls( + status=status, + result=result, + ) + + dataset_cell_data_response.additional_properties = d + return dataset_cell_data_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_data_response_result.py b/python/fi/generated/openapi_client/models/dataset_cell_data_response_result.py new file mode 100644 index 0000000..bff7156 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_data_response_result.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_cell_data_response_result_additional_property import ( + DatasetCellDataResponseResultAdditionalProperty, + ) + + +T = TypeVar("T", bound="DatasetCellDataResponseResult") + + +@_attrs_define +class DatasetCellDataResponseResult: + """ """ + + additional_properties: dict[ + str, DatasetCellDataResponseResultAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_cell_data_response_result_additional_property import ( + DatasetCellDataResponseResultAdditionalProperty, + ) + + d = dict(src_dict) + dataset_cell_data_response_result = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + DatasetCellDataResponseResultAdditionalProperty.from_dict(prop_dict) + ) + + additional_properties[prop_name] = additional_property + + dataset_cell_data_response_result.additional_properties = additional_properties + return dataset_cell_data_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> DatasetCellDataResponseResultAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: DatasetCellDataResponseResultAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_data_response_result_additional_property.py b/python/fi/generated/openapi_client/models/dataset_cell_data_response_result_additional_property.py new file mode 100644 index 0000000..6a3d8c3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_data_response_result_additional_property.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_cell_value import DatasetCellValue + + +T = TypeVar("T", bound="DatasetCellDataResponseResultAdditionalProperty") + + +@_attrs_define +class DatasetCellDataResponseResultAdditionalProperty: + """ """ + + additional_properties: dict[str, DatasetCellValue] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_cell_value import DatasetCellValue + + d = dict(src_dict) + dataset_cell_data_response_result_additional_property = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = DatasetCellValue.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + dataset_cell_data_response_result_additional_property.additional_properties = ( + additional_properties + ) + return dataset_cell_data_response_result_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> DatasetCellValue: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: DatasetCellValue) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_value.py b/python/fi/generated/openapi_client/models/dataset_cell_value.py new file mode 100644 index 0000000..f51ebf0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_value.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dataset_cell_value_cell_value import DatasetCellValueCellValue + from ..models.dataset_cell_value_feedback_info import DatasetCellValueFeedbackInfo + from ..models.dataset_cell_value_value_infos import DatasetCellValueValueInfos + + +T = TypeVar("T", bound="DatasetCellValue") + + +@_attrs_define +class DatasetCellValue: + """ + Attributes: + cell_value (DatasetCellValueCellValue | Unset): + status (None | str | Unset): + value_infos (DatasetCellValueValueInfos | Unset): + feedback_info (DatasetCellValueFeedbackInfo | Unset): + """ + + cell_value: DatasetCellValueCellValue | Unset = UNSET + status: None | str | Unset = UNSET + value_infos: DatasetCellValueValueInfos | Unset = UNSET + feedback_info: DatasetCellValueFeedbackInfo | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cell_value: dict[str, Any] | Unset = UNSET + if not isinstance(self.cell_value, Unset): + cell_value = self.cell_value.to_dict() + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + else: + status = self.status + + value_infos: dict[str, Any] | Unset = UNSET + if not isinstance(self.value_infos, Unset): + value_infos = self.value_infos.to_dict() + + feedback_info: dict[str, Any] | Unset = UNSET + if not isinstance(self.feedback_info, Unset): + feedback_info = self.feedback_info.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cell_value is not UNSET: + field_dict["cell_value"] = cell_value + if status is not UNSET: + field_dict["status"] = status + if value_infos is not UNSET: + field_dict["value_infos"] = value_infos + if feedback_info is not UNSET: + field_dict["feedback_info"] = feedback_info + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_cell_value_cell_value import DatasetCellValueCellValue + from ..models.dataset_cell_value_feedback_info import ( + DatasetCellValueFeedbackInfo, + ) + from ..models.dataset_cell_value_value_infos import DatasetCellValueValueInfos + + d = dict(src_dict) + _cell_value = d.pop("cell_value", UNSET) + cell_value: DatasetCellValueCellValue | Unset + if isinstance(_cell_value, Unset): + cell_value = UNSET + else: + cell_value = DatasetCellValueCellValue.from_dict(_cell_value) + + def _parse_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + _value_infos = d.pop("value_infos", UNSET) + value_infos: DatasetCellValueValueInfos | Unset + if isinstance(_value_infos, Unset): + value_infos = UNSET + else: + value_infos = DatasetCellValueValueInfos.from_dict(_value_infos) + + _feedback_info = d.pop("feedback_info", UNSET) + feedback_info: DatasetCellValueFeedbackInfo | Unset + if isinstance(_feedback_info, Unset): + feedback_info = UNSET + else: + feedback_info = DatasetCellValueFeedbackInfo.from_dict(_feedback_info) + + dataset_cell_value = cls( + cell_value=cell_value, + status=status, + value_infos=value_infos, + feedback_info=feedback_info, + ) + + dataset_cell_value.additional_properties = d + return dataset_cell_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_value_cell_value.py b/python/fi/generated/openapi_client/models/dataset_cell_value_cell_value.py new file mode 100644 index 0000000..46c494f --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_value_cell_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetCellValueCellValue") + + +@_attrs_define +class DatasetCellValueCellValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_cell_value_cell_value = cls() + + dataset_cell_value_cell_value.additional_properties = d + return dataset_cell_value_cell_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_value_feedback_info.py b/python/fi/generated/openapi_client/models/dataset_cell_value_feedback_info.py new file mode 100644 index 0000000..a1b722d --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_value_feedback_info.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetCellValueFeedbackInfo") + + +@_attrs_define +class DatasetCellValueFeedbackInfo: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_cell_value_feedback_info = cls() + + dataset_cell_value_feedback_info.additional_properties = d + return dataset_cell_value_feedback_info + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_cell_value_value_infos.py b/python/fi/generated/openapi_client/models/dataset_cell_value_value_infos.py new file mode 100644 index 0000000..20cff36 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_cell_value_value_infos.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetCellValueValueInfos") + + +@_attrs_define +class DatasetCellValueValueInfos: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_cell_value_value_infos = cls() + + dataset_cell_value_value_infos.additional_properties = d + return dataset_cell_value_value_infos + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_column_detail_item.py b/python/fi/generated/openapi_client/models/dataset_column_detail_item.py new file mode 100644 index 0000000..b12577c --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_column_detail_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetColumnDetailItem") + + +@_attrs_define +class DatasetColumnDetailItem: + """ + Attributes: + id (UUID): + name (str): + data_type (None | str | Unset): + """ + + id: UUID + name: str + data_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + data_type: None | str | Unset + if isinstance(self.data_type, Unset): + data_type = UNSET + else: + data_type = self.data_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + if data_type is not UNSET: + field_dict["data_type"] = data_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + def _parse_data_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + data_type = _parse_data_type(d.pop("data_type", UNSET)) + + dataset_column_detail_item = cls( + id=id, + name=name, + data_type=data_type, + ) + + dataset_column_detail_item.additional_properties = d + return dataset_column_detail_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_column_detail_response.py b/python/fi/generated/openapi_client/models/dataset_column_detail_response.py new file mode 100644 index 0000000..7567f2b --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_column_detail_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_column_detail_result import DatasetColumnDetailResult + + +T = TypeVar("T", bound="DatasetColumnDetailResponse") + + +@_attrs_define +class DatasetColumnDetailResponse: + """ + Attributes: + status (bool): + result (DatasetColumnDetailResult): + """ + + status: bool + result: DatasetColumnDetailResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_column_detail_result import DatasetColumnDetailResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetColumnDetailResult.from_dict(d.pop("result")) + + dataset_column_detail_response = cls( + status=status, + result=result, + ) + + dataset_column_detail_response.additional_properties = d + return dataset_column_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_column_detail_result.py b/python/fi/generated/openapi_client/models/dataset_column_detail_result.py new file mode 100644 index 0000000..e624c20 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_column_detail_result.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_column_detail_item import DatasetColumnDetailItem + + +T = TypeVar("T", bound="DatasetColumnDetailResult") + + +@_attrs_define +class DatasetColumnDetailResult: + """ + Attributes: + columns (list[DatasetColumnDetailItem]): + """ + + columns: list[DatasetColumnDetailItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + columns = [] + for columns_item_data in self.columns: + columns_item = columns_item_data.to_dict() + columns.append(columns_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "columns": columns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_column_detail_item import DatasetColumnDetailItem + + d = dict(src_dict) + columns = [] + _columns = d.pop("columns") + for columns_item_data in _columns: + columns_item = DatasetColumnDetailItem.from_dict(columns_item_data) + + columns.append(columns_item) + + dataset_column_detail_result = cls( + columns=columns, + ) + + dataset_column_detail_result.additional_properties = d + return dataset_column_detail_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_columns_mutation_response.py b/python/fi/generated/openapi_client/models/dataset_columns_mutation_response.py new file mode 100644 index 0000000..977c497 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_columns_mutation_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_columns_mutation_result import DatasetColumnsMutationResult + + +T = TypeVar("T", bound="DatasetColumnsMutationResponse") + + +@_attrs_define +class DatasetColumnsMutationResponse: + """ + Attributes: + status (bool): + result (DatasetColumnsMutationResult): + """ + + status: bool + result: DatasetColumnsMutationResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_columns_mutation_result import ( + DatasetColumnsMutationResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetColumnsMutationResult.from_dict(d.pop("result")) + + dataset_columns_mutation_response = cls( + status=status, + result=result, + ) + + dataset_columns_mutation_response.additional_properties = d + return dataset_columns_mutation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_columns_mutation_result.py b/python/fi/generated/openapi_client/models/dataset_columns_mutation_result.py new file mode 100644 index 0000000..f1ea855 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_columns_mutation_result.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.column import Column + + +T = TypeVar("T", bound="DatasetColumnsMutationResult") + + +@_attrs_define +class DatasetColumnsMutationResult: + """ + Attributes: + message (str): + data (list[Column] | Unset): + """ + + message: str + data: list[Column] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.column import Column + + d = dict(src_dict) + message = d.pop("message") + + _data = d.pop("data", UNSET) + data: list[Column] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = Column.from_dict(data_item_data) + + data.append(data_item) + + dataset_columns_mutation_result = cls( + message=message, + data=data, + ) + + dataset_columns_mutation_result.additional_properties = d + return dataset_columns_mutation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_copy_response.py b/python/fi/generated/openapi_client/models/dataset_copy_response.py new file mode 100644 index 0000000..3c5c796 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_copy_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_copy_result import DatasetCopyResult + + +T = TypeVar("T", bound="DatasetCopyResponse") + + +@_attrs_define +class DatasetCopyResponse: + """ + Attributes: + status (bool): + result (DatasetCopyResult): + """ + + status: bool + result: DatasetCopyResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_copy_result import DatasetCopyResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetCopyResult.from_dict(d.pop("result")) + + dataset_copy_response = cls( + status=status, + result=result, + ) + + dataset_copy_response.additional_properties = d + return dataset_copy_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_copy_result.py b/python/fi/generated/openapi_client/models/dataset_copy_result.py new file mode 100644 index 0000000..271cfe2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_copy_result.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetCopyResult") + + +@_attrs_define +class DatasetCopyResult: + """ + Attributes: + message (str): + dataset_id (UUID): + dataset_name (str): + """ + + message: str + dataset_id: UUID + dataset_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "dataset_id": dataset_id, + "dataset_name": dataset_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + dataset_id = UUID(d.pop("dataset_id")) + + dataset_name = d.pop("dataset_name") + + dataset_copy_result = cls( + message=message, + dataset_id=dataset_id, + dataset_name=dataset_name, + ) + + dataset_copy_result.additional_properties = d + return dataset_copy_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_create_started_response.py b/python/fi/generated/openapi_client/models/dataset_create_started_response.py new file mode 100644 index 0000000..eac14c6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_create_started_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_create_started_result import DatasetCreateStartedResult + + +T = TypeVar("T", bound="DatasetCreateStartedResponse") + + +@_attrs_define +class DatasetCreateStartedResponse: + """ + Attributes: + status (bool): + result (DatasetCreateStartedResult): + """ + + status: bool + result: DatasetCreateStartedResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_create_started_result import DatasetCreateStartedResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetCreateStartedResult.from_dict(d.pop("result")) + + dataset_create_started_response = cls( + status=status, + result=result, + ) + + dataset_create_started_response.additional_properties = d + return dataset_create_started_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_create_started_result.py b/python/fi/generated/openapi_client/models/dataset_create_started_result.py new file mode 100644 index 0000000..2af28da --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_create_started_result.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetCreateStartedResult") + + +@_attrs_define +class DatasetCreateStartedResult: + """ + Attributes: + message (str): + dataset_id (UUID): + dataset_name (str): + dataset_model_type (None | str | Unset): + """ + + message: str + dataset_id: UUID + dataset_name: str + dataset_model_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + dataset_model_type: None | str | Unset + if isinstance(self.dataset_model_type, Unset): + dataset_model_type = UNSET + else: + dataset_model_type = self.dataset_model_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "dataset_id": dataset_id, + "dataset_name": dataset_name, + } + ) + if dataset_model_type is not UNSET: + field_dict["dataset_model_type"] = dataset_model_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + dataset_id = UUID(d.pop("dataset_id")) + + dataset_name = d.pop("dataset_name") + + def _parse_dataset_model_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dataset_model_type = _parse_dataset_model_type( + d.pop("dataset_model_type", UNSET) + ) + + dataset_create_started_result = cls( + message=message, + dataset_id=dataset_id, + dataset_name=dataset_name, + dataset_model_type=dataset_model_type, + ) + + dataset_create_started_result.additional_properties = d + return dataset_create_started_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_creation_progress_response.py b/python/fi/generated/openapi_client/models/dataset_creation_progress_response.py new file mode 100644 index 0000000..72a0eba --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_creation_progress_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_creation_progress_result import DatasetCreationProgressResult + + +T = TypeVar("T", bound="DatasetCreationProgressResponse") + + +@_attrs_define +class DatasetCreationProgressResponse: + """ + Attributes: + status (bool): + result (DatasetCreationProgressResult): + """ + + status: bool + result: DatasetCreationProgressResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_creation_progress_result import ( + DatasetCreationProgressResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetCreationProgressResult.from_dict(d.pop("result")) + + dataset_creation_progress_response = cls( + status=status, + result=result, + ) + + dataset_creation_progress_response.additional_properties = d + return dataset_creation_progress_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_creation_progress_result.py b/python/fi/generated/openapi_client/models/dataset_creation_progress_result.py new file mode 100644 index 0000000..7cf8e9c --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_creation_progress_result.py @@ -0,0 +1,264 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetCreationProgressResult") + + +@_attrs_define +class DatasetCreationProgressResult: + """ + Attributes: + dataset_id (UUID): + dataset_name (str): + processing_status (str): + is_processing (bool): + is_completed (bool): + is_failed (bool): + original_filename (None | str | Unset): + estimated_rows (int | None | Unset): + estimated_columns (int | None | Unset): + queued_at (None | str | Unset): + started_at (None | str | Unset): + completed_at (None | str | Unset): + failed_at (None | str | Unset): + error_message (None | str | Unset): + """ + + dataset_id: UUID + dataset_name: str + processing_status: str + is_processing: bool + is_completed: bool + is_failed: bool + original_filename: None | str | Unset = UNSET + estimated_rows: int | None | Unset = UNSET + estimated_columns: int | None | Unset = UNSET + queued_at: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + completed_at: None | str | Unset = UNSET + failed_at: None | str | Unset = UNSET + error_message: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + processing_status = self.processing_status + + is_processing = self.is_processing + + is_completed = self.is_completed + + is_failed = self.is_failed + + original_filename: None | str | Unset + if isinstance(self.original_filename, Unset): + original_filename = UNSET + else: + original_filename = self.original_filename + + estimated_rows: int | None | Unset + if isinstance(self.estimated_rows, Unset): + estimated_rows = UNSET + else: + estimated_rows = self.estimated_rows + + estimated_columns: int | None | Unset + if isinstance(self.estimated_columns, Unset): + estimated_columns = UNSET + else: + estimated_columns = self.estimated_columns + + queued_at: None | str | Unset + if isinstance(self.queued_at, Unset): + queued_at = UNSET + else: + queued_at = self.queued_at + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + else: + started_at = self.started_at + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + else: + completed_at = self.completed_at + + failed_at: None | str | Unset + if isinstance(self.failed_at, Unset): + failed_at = UNSET + else: + failed_at = self.failed_at + + error_message: None | str | Unset + if isinstance(self.error_message, Unset): + error_message = UNSET + else: + error_message = self.error_message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + "dataset_name": dataset_name, + "processing_status": processing_status, + "is_processing": is_processing, + "is_completed": is_completed, + "is_failed": is_failed, + } + ) + if original_filename is not UNSET: + field_dict["original_filename"] = original_filename + if estimated_rows is not UNSET: + field_dict["estimated_rows"] = estimated_rows + if estimated_columns is not UNSET: + field_dict["estimated_columns"] = estimated_columns + if queued_at is not UNSET: + field_dict["queued_at"] = queued_at + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if failed_at is not UNSET: + field_dict["failed_at"] = failed_at + if error_message is not UNSET: + field_dict["error_message"] = error_message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + dataset_name = d.pop("dataset_name") + + processing_status = d.pop("processing_status") + + is_processing = d.pop("is_processing") + + is_completed = d.pop("is_completed") + + is_failed = d.pop("is_failed") + + def _parse_original_filename(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + original_filename = _parse_original_filename(d.pop("original_filename", UNSET)) + + def _parse_estimated_rows(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + estimated_rows = _parse_estimated_rows(d.pop("estimated_rows", UNSET)) + + def _parse_estimated_columns(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + estimated_columns = _parse_estimated_columns(d.pop("estimated_columns", UNSET)) + + def _parse_queued_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + queued_at = _parse_queued_at(d.pop("queued_at", UNSET)) + + def _parse_started_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_completed_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + def _parse_failed_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + failed_at = _parse_failed_at(d.pop("failed_at", UNSET)) + + def _parse_error_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error_message = _parse_error_message(d.pop("error_message", UNSET)) + + dataset_creation_progress_result = cls( + dataset_id=dataset_id, + dataset_name=dataset_name, + processing_status=processing_status, + is_processing=is_processing, + is_completed=is_completed, + is_failed=is_failed, + original_filename=original_filename, + estimated_rows=estimated_rows, + estimated_columns=estimated_columns, + queued_at=queued_at, + started_at=started_at, + completed_at=completed_at, + failed_at=failed_at, + error_message=error_message, + ) + + dataset_creation_progress_result.additional_properties = d + return dataset_creation_progress_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_derived_variables_response.py b/python/fi/generated/openapi_client/models/dataset_derived_variables_response.py new file mode 100644 index 0000000..639c234 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_derived_variables_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_derived_variables_result import DatasetDerivedVariablesResult + + +T = TypeVar("T", bound="DatasetDerivedVariablesResponse") + + +@_attrs_define +class DatasetDerivedVariablesResponse: + """ + Attributes: + status (bool): + result (DatasetDerivedVariablesResult): + """ + + status: bool + result: DatasetDerivedVariablesResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_derived_variables_result import ( + DatasetDerivedVariablesResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetDerivedVariablesResult.from_dict(d.pop("result")) + + dataset_derived_variables_response = cls( + status=status, + result=result, + ) + + dataset_derived_variables_response.additional_properties = d + return dataset_derived_variables_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_derived_variables_result.py b/python/fi/generated/openapi_client/models/dataset_derived_variables_result.py new file mode 100644 index 0000000..9a47b98 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_derived_variables_result.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_derived_variables_result_derived_variables import ( + DatasetDerivedVariablesResultDerivedVariables, + ) + + +T = TypeVar("T", bound="DatasetDerivedVariablesResult") + + +@_attrs_define +class DatasetDerivedVariablesResult: + """ + Attributes: + derived_variables (DatasetDerivedVariablesResultDerivedVariables): + """ + + derived_variables: DatasetDerivedVariablesResultDerivedVariables + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + derived_variables = self.derived_variables.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "derived_variables": derived_variables, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_derived_variables_result_derived_variables import ( + DatasetDerivedVariablesResultDerivedVariables, + ) + + d = dict(src_dict) + derived_variables = DatasetDerivedVariablesResultDerivedVariables.from_dict( + d.pop("derived_variables") + ) + + dataset_derived_variables_result = cls( + derived_variables=derived_variables, + ) + + dataset_derived_variables_result.additional_properties = d + return dataset_derived_variables_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_derived_variables_result_derived_variables.py b/python/fi/generated/openapi_client/models/dataset_derived_variables_result_derived_variables.py new file mode 100644 index 0000000..734744a --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_derived_variables_result_derived_variables.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.derived_variable_detail import DerivedVariableDetail + + +T = TypeVar("T", bound="DatasetDerivedVariablesResultDerivedVariables") + + +@_attrs_define +class DatasetDerivedVariablesResultDerivedVariables: + """ """ + + additional_properties: dict[str, DerivedVariableDetail] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.derived_variable_detail import DerivedVariableDetail + + d = dict(src_dict) + dataset_derived_variables_result_derived_variables = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = DerivedVariableDetail.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + dataset_derived_variables_result_derived_variables.additional_properties = ( + additional_properties + ) + return dataset_derived_variables_result_derived_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> DerivedVariableDetail: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: DerivedVariableDetail) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_eval_stats_item.py b/python/fi/generated/openapi_client/models/dataset_eval_stats_item.py new file mode 100644 index 0000000..86993da --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_eval_stats_item.py @@ -0,0 +1,184 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dataset_eval_stats_item_total_avg import DatasetEvalStatsItemTotalAvg + from ..models.dataset_eval_stats_item_total_choices_avg import ( + DatasetEvalStatsItemTotalChoicesAvg, + ) + from ..models.dataset_eval_stats_metric import DatasetEvalStatsMetric + + +T = TypeVar("T", bound="DatasetEvalStatsItem") + + +@_attrs_define +class DatasetEvalStatsItem: + """ + Attributes: + id (UUID): + name (str): + output_type (str): + result (list[DatasetEvalStatsMetric]): + total_pass_rate (float | None | Unset): + total_avg (DatasetEvalStatsItemTotalAvg | Unset): + total_choices_avg (DatasetEvalStatsItemTotalChoicesAvg | Unset): + is_numeric_eval (bool | Unset): + is_numeric_eval_percentage (bool | Unset): + """ + + id: UUID + name: str + output_type: str + result: list[DatasetEvalStatsMetric] + total_pass_rate: float | None | Unset = UNSET + total_avg: DatasetEvalStatsItemTotalAvg | Unset = UNSET + total_choices_avg: DatasetEvalStatsItemTotalChoicesAvg | Unset = UNSET + is_numeric_eval: bool | Unset = UNSET + is_numeric_eval_percentage: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + output_type = self.output_type + + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + total_pass_rate: float | None | Unset + if isinstance(self.total_pass_rate, Unset): + total_pass_rate = UNSET + else: + total_pass_rate = self.total_pass_rate + + total_avg: dict[str, Any] | Unset = UNSET + if not isinstance(self.total_avg, Unset): + total_avg = self.total_avg.to_dict() + + total_choices_avg: dict[str, Any] | Unset = UNSET + if not isinstance(self.total_choices_avg, Unset): + total_choices_avg = self.total_choices_avg.to_dict() + + is_numeric_eval = self.is_numeric_eval + + is_numeric_eval_percentage = self.is_numeric_eval_percentage + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "output_type": output_type, + "result": result, + } + ) + if total_pass_rate is not UNSET: + field_dict["total_pass_rate"] = total_pass_rate + if total_avg is not UNSET: + field_dict["total_avg"] = total_avg + if total_choices_avg is not UNSET: + field_dict["total_choices_avg"] = total_choices_avg + if is_numeric_eval is not UNSET: + field_dict["is_numeric_eval"] = is_numeric_eval + if is_numeric_eval_percentage is not UNSET: + field_dict["is_numeric_eval_percentage"] = is_numeric_eval_percentage + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_eval_stats_item_total_avg import ( + DatasetEvalStatsItemTotalAvg, + ) + from ..models.dataset_eval_stats_item_total_choices_avg import ( + DatasetEvalStatsItemTotalChoicesAvg, + ) + from ..models.dataset_eval_stats_metric import DatasetEvalStatsMetric + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + output_type = d.pop("output_type") + + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = DatasetEvalStatsMetric.from_dict(result_item_data) + + result.append(result_item) + + def _parse_total_pass_rate(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_pass_rate = _parse_total_pass_rate(d.pop("total_pass_rate", UNSET)) + + _total_avg = d.pop("total_avg", UNSET) + total_avg: DatasetEvalStatsItemTotalAvg | Unset + if isinstance(_total_avg, Unset): + total_avg = UNSET + else: + total_avg = DatasetEvalStatsItemTotalAvg.from_dict(_total_avg) + + _total_choices_avg = d.pop("total_choices_avg", UNSET) + total_choices_avg: DatasetEvalStatsItemTotalChoicesAvg | Unset + if isinstance(_total_choices_avg, Unset): + total_choices_avg = UNSET + else: + total_choices_avg = DatasetEvalStatsItemTotalChoicesAvg.from_dict( + _total_choices_avg + ) + + is_numeric_eval = d.pop("is_numeric_eval", UNSET) + + is_numeric_eval_percentage = d.pop("is_numeric_eval_percentage", UNSET) + + dataset_eval_stats_item = cls( + id=id, + name=name, + output_type=output_type, + result=result, + total_pass_rate=total_pass_rate, + total_avg=total_avg, + total_choices_avg=total_choices_avg, + is_numeric_eval=is_numeric_eval, + is_numeric_eval_percentage=is_numeric_eval_percentage, + ) + + dataset_eval_stats_item.additional_properties = d + return dataset_eval_stats_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_avg.py b/python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_avg.py new file mode 100644 index 0000000..7e869d3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_avg.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetEvalStatsItemTotalAvg") + + +@_attrs_define +class DatasetEvalStatsItemTotalAvg: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_eval_stats_item_total_avg = cls() + + dataset_eval_stats_item_total_avg.additional_properties = d + return dataset_eval_stats_item_total_avg + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_choices_avg.py b/python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_choices_avg.py new file mode 100644 index 0000000..fc6c62f --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_eval_stats_item_total_choices_avg.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetEvalStatsItemTotalChoicesAvg") + + +@_attrs_define +class DatasetEvalStatsItemTotalChoicesAvg: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_eval_stats_item_total_choices_avg = cls() + + dataset_eval_stats_item_total_choices_avg.additional_properties = d + return dataset_eval_stats_item_total_choices_avg + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_eval_stats_metric.py b/python/fi/generated/openapi_client/models/dataset_eval_stats_metric.py new file mode 100644 index 0000000..70d6690 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_eval_stats_metric.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dataset_eval_stats_metric_output import DatasetEvalStatsMetricOutput + + +T = TypeVar("T", bound="DatasetEvalStatsMetric") + + +@_attrs_define +class DatasetEvalStatsMetric: + """ + Attributes: + name (str): + output (DatasetEvalStatsMetricOutput): + id (UUID | Unset): + total_cells (int | None | Unset): + """ + + name: str + output: DatasetEvalStatsMetricOutput + id: UUID | Unset = UNSET + total_cells: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + output = self.output.to_dict() + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + total_cells: int | None | Unset + if isinstance(self.total_cells, Unset): + total_cells = UNSET + else: + total_cells = self.total_cells + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "output": output, + } + ) + if id is not UNSET: + field_dict["id"] = id + if total_cells is not UNSET: + field_dict["total_cells"] = total_cells + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_eval_stats_metric_output import ( + DatasetEvalStatsMetricOutput, + ) + + d = dict(src_dict) + name = d.pop("name") + + output = DatasetEvalStatsMetricOutput.from_dict(d.pop("output")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_total_cells(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + total_cells = _parse_total_cells(d.pop("total_cells", UNSET)) + + dataset_eval_stats_metric = cls( + name=name, + output=output, + id=id, + total_cells=total_cells, + ) + + dataset_eval_stats_metric.additional_properties = d + return dataset_eval_stats_metric + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_eval_stats_metric_output.py b/python/fi/generated/openapi_client/models/dataset_eval_stats_metric_output.py new file mode 100644 index 0000000..595132f --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_eval_stats_metric_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetEvalStatsMetricOutput") + + +@_attrs_define +class DatasetEvalStatsMetricOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_eval_stats_metric_output = cls() + + dataset_eval_stats_metric_output.additional_properties = d + return dataset_eval_stats_metric_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_eval_stats_response.py b/python/fi/generated/openapi_client/models/dataset_eval_stats_response.py new file mode 100644 index 0000000..4796894 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_eval_stats_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_eval_stats_item import DatasetEvalStatsItem + + +T = TypeVar("T", bound="DatasetEvalStatsResponse") + + +@_attrs_define +class DatasetEvalStatsResponse: + """ + Attributes: + status (bool): + result (list[DatasetEvalStatsItem]): + """ + + status: bool + result: list[DatasetEvalStatsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_eval_stats_item import DatasetEvalStatsItem + + d = dict(src_dict) + status = d.pop("status") + + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = DatasetEvalStatsItem.from_dict(result_item_data) + + result.append(result_item) + + dataset_eval_stats_response = cls( + status=status, + result=result, + ) + + dataset_eval_stats_response.additional_properties = d + return dataset_eval_stats_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_explanation_summary_response.py b/python/fi/generated/openapi_client/models/dataset_explanation_summary_response.py new file mode 100644 index 0000000..9e79750 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_explanation_summary_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_explanation_summary_response_result import ( + DatasetExplanationSummaryResponseResult, + ) + + +T = TypeVar("T", bound="DatasetExplanationSummaryResponse") + + +@_attrs_define +class DatasetExplanationSummaryResponse: + """ + Attributes: + status (bool): + result (DatasetExplanationSummaryResponseResult): + """ + + status: bool + result: DatasetExplanationSummaryResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_explanation_summary_response_result import ( + DatasetExplanationSummaryResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetExplanationSummaryResponseResult.from_dict(d.pop("result")) + + dataset_explanation_summary_response = cls( + status=status, + result=result, + ) + + dataset_explanation_summary_response.additional_properties = d + return dataset_explanation_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result.py b/python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result.py new file mode 100644 index 0000000..9936434 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +if TYPE_CHECKING: + from ..models.dataset_explanation_summary_response_result_response import ( + DatasetExplanationSummaryResponseResultResponse, + ) + + +T = TypeVar("T", bound="DatasetExplanationSummaryResponseResult") + + +@_attrs_define +class DatasetExplanationSummaryResponseResult: + """ + Attributes: + response (DatasetExplanationSummaryResponseResultResponse): + last_updated (datetime.datetime | None): + status (str): + row_count (int): + min_rows_required (int): + """ + + response: DatasetExplanationSummaryResponseResultResponse + last_updated: datetime.datetime | None + status: str + row_count: int + min_rows_required: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + response = self.response.to_dict() + + last_updated: None | str + if isinstance(self.last_updated, datetime.datetime): + last_updated = self.last_updated.isoformat() + else: + last_updated = self.last_updated + + status = self.status + + row_count = self.row_count + + min_rows_required = self.min_rows_required + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "response": response, + "last_updated": last_updated, + "status": status, + "row_count": row_count, + "min_rows_required": min_rows_required, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_explanation_summary_response_result_response import ( + DatasetExplanationSummaryResponseResultResponse, + ) + + d = dict(src_dict) + response = DatasetExplanationSummaryResponseResultResponse.from_dict( + d.pop("response") + ) + + def _parse_last_updated(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + last_updated_type_0 = isoparse(data) + + return last_updated_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + last_updated = _parse_last_updated(d.pop("last_updated")) + + status = d.pop("status") + + row_count = d.pop("row_count") + + min_rows_required = d.pop("min_rows_required") + + dataset_explanation_summary_response_result = cls( + response=response, + last_updated=last_updated, + status=status, + row_count=row_count, + min_rows_required=min_rows_required, + ) + + dataset_explanation_summary_response_result.additional_properties = d + return dataset_explanation_summary_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result_response.py b/python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result_response.py new file mode 100644 index 0000000..7133f82 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_explanation_summary_response_result_response.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetExplanationSummaryResponseResultResponse") + + +@_attrs_define +class DatasetExplanationSummaryResponseResultResponse: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_explanation_summary_response_result_response = cls() + + dataset_explanation_summary_response_result_response.additional_properties = d + return dataset_explanation_summary_response_result_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_json_schema_response.py b/python/fi/generated/openapi_client/models/dataset_json_schema_response.py new file mode 100644 index 0000000..91a40d5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_json_schema_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_json_schema_response_result import ( + DatasetJsonSchemaResponseResult, + ) + + +T = TypeVar("T", bound="DatasetJsonSchemaResponse") + + +@_attrs_define +class DatasetJsonSchemaResponse: + """ + Attributes: + status (bool): + result (DatasetJsonSchemaResponseResult): + """ + + status: bool + result: DatasetJsonSchemaResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_json_schema_response_result import ( + DatasetJsonSchemaResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetJsonSchemaResponseResult.from_dict(d.pop("result")) + + dataset_json_schema_response = cls( + status=status, + result=result, + ) + + dataset_json_schema_response.additional_properties = d + return dataset_json_schema_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_json_schema_response_result.py b/python/fi/generated/openapi_client/models/dataset_json_schema_response_result.py new file mode 100644 index 0000000..6b94c33 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_json_schema_response_result.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.json_column_schema_entry import JsonColumnSchemaEntry + + +T = TypeVar("T", bound="DatasetJsonSchemaResponseResult") + + +@_attrs_define +class DatasetJsonSchemaResponseResult: + """ """ + + additional_properties: dict[str, JsonColumnSchemaEntry] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.json_column_schema_entry import JsonColumnSchemaEntry + + d = dict(src_dict) + dataset_json_schema_response_result = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = JsonColumnSchemaEntry.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + dataset_json_schema_response_result.additional_properties = ( + additional_properties + ) + return dataset_json_schema_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> JsonColumnSchemaEntry: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: JsonColumnSchemaEntry) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_list_item.py b/python/fi/generated/openapi_client/models/dataset_list_item.py new file mode 100644 index 0000000..dd650db --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_list_item.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetListItem") + + +@_attrs_define +class DatasetListItem: + """ + Attributes: + id (UUID): + name (str): + number_of_datapoints (int): + number_of_experiments (int): + number_of_optimisations (int): + derived_datasets (int): + created_at (str): + dataset_type (str): + """ + + id: UUID + name: str + number_of_datapoints: int + number_of_experiments: int + number_of_optimisations: int + derived_datasets: int + created_at: str + dataset_type: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + number_of_datapoints = self.number_of_datapoints + + number_of_experiments = self.number_of_experiments + + number_of_optimisations = self.number_of_optimisations + + derived_datasets = self.derived_datasets + + created_at = self.created_at + + dataset_type = self.dataset_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "number_of_datapoints": number_of_datapoints, + "number_of_experiments": number_of_experiments, + "number_of_optimisations": number_of_optimisations, + "derived_datasets": derived_datasets, + "created_at": created_at, + "dataset_type": dataset_type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + number_of_datapoints = d.pop("number_of_datapoints") + + number_of_experiments = d.pop("number_of_experiments") + + number_of_optimisations = d.pop("number_of_optimisations") + + derived_datasets = d.pop("derived_datasets") + + created_at = d.pop("created_at") + + dataset_type = d.pop("dataset_type") + + dataset_list_item = cls( + id=id, + name=name, + number_of_datapoints=number_of_datapoints, + number_of_experiments=number_of_experiments, + number_of_optimisations=number_of_optimisations, + derived_datasets=derived_datasets, + created_at=created_at, + dataset_type=dataset_type, + ) + + dataset_list_item.additional_properties = d + return dataset_list_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_list_response.py b/python/fi/generated/openapi_client/models/dataset_list_response.py new file mode 100644 index 0000000..b06a88b --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_list_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_list_result import DatasetListResult + + +T = TypeVar("T", bound="DatasetListResponse") + + +@_attrs_define +class DatasetListResponse: + """ + Attributes: + status (bool): + result (DatasetListResult): + """ + + status: bool + result: DatasetListResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_list_result import DatasetListResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetListResult.from_dict(d.pop("result")) + + dataset_list_response = cls( + status=status, + result=result, + ) + + dataset_list_response.additional_properties = d + return dataset_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_list_result.py b/python/fi/generated/openapi_client/models/dataset_list_result.py new file mode 100644 index 0000000..5d1a580 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_list_result.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_list_item import DatasetListItem + + +T = TypeVar("T", bound="DatasetListResult") + + +@_attrs_define +class DatasetListResult: + """ + Attributes: + datasets (list[DatasetListItem]): + total_pages (int): + total_count (int): + """ + + datasets: list[DatasetListItem] + total_pages: int + total_count: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + datasets = [] + for datasets_item_data in self.datasets: + datasets_item = datasets_item_data.to_dict() + datasets.append(datasets_item) + + total_pages = self.total_pages + + total_count = self.total_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "datasets": datasets, + "total_pages": total_pages, + "total_count": total_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_list_item import DatasetListItem + + d = dict(src_dict) + datasets = [] + _datasets = d.pop("datasets") + for datasets_item_data in _datasets: + datasets_item = DatasetListItem.from_dict(datasets_item_data) + + datasets.append(datasets_item) + + total_pages = d.pop("total_pages") + + total_count = d.pop("total_count") + + dataset_list_result = cls( + datasets=datasets, + total_pages=total_pages, + total_count=total_count, + ) + + dataset_list_result.additional_properties = d + return dataset_list_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_model_type.py b/python/fi/generated/openapi_client/models/dataset_model_type.py new file mode 100644 index 0000000..17a62b6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_model_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class DatasetModelType(str, Enum): + BINARYCLASSIFICATION = "BinaryClassification" + GENERATIVEIMAGE = "GenerativeImage" + GENERATIVELLM = "GenerativeLLM" + GENERATIVEVIDEO = "GenerativeVideo" + MULTIMODAL = "MultiModal" + NUMERIC = "Numeric" + OBJECTDETECTION = "ObjectDetection" + RANKING = "Ranking" + REGRESSION = "Regression" + SCORECATEGORICAL = "ScoreCategorical" + SEGMENTATION = "Segmentation" + STT = "STT" + TTS = "TTS" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request.py b/python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request.py new file mode 100644 index 0000000..9b1027c --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_multiple_static_columns_request_columns_item import ( + DatasetMultipleStaticColumnsRequestColumnsItem, + ) + + +T = TypeVar("T", bound="DatasetMultipleStaticColumnsRequest") + + +@_attrs_define +class DatasetMultipleStaticColumnsRequest: + """ + Attributes: + columns (list[DatasetMultipleStaticColumnsRequestColumnsItem]): + """ + + columns: list[DatasetMultipleStaticColumnsRequestColumnsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + columns = [] + for columns_item_data in self.columns: + columns_item = columns_item_data.to_dict() + columns.append(columns_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "columns": columns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_multiple_static_columns_request_columns_item import ( + DatasetMultipleStaticColumnsRequestColumnsItem, + ) + + d = dict(src_dict) + columns = [] + _columns = d.pop("columns") + for columns_item_data in _columns: + columns_item = DatasetMultipleStaticColumnsRequestColumnsItem.from_dict( + columns_item_data + ) + + columns.append(columns_item) + + dataset_multiple_static_columns_request = cls( + columns=columns, + ) + + dataset_multiple_static_columns_request.additional_properties = d + return dataset_multiple_static_columns_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request_columns_item.py b/python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request_columns_item.py new file mode 100644 index 0000000..7c73d54 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_multiple_static_columns_request_columns_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetMultipleStaticColumnsRequestColumnsItem") + + +@_attrs_define +class DatasetMultipleStaticColumnsRequestColumnsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_multiple_static_columns_request_columns_item = cls() + + dataset_multiple_static_columns_request_columns_item.additional_properties = d + return dataset_multiple_static_columns_request_columns_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_name_item.py b/python/fi/generated/openapi_client/models/dataset_name_item.py new file mode 100644 index 0000000..3b37d7f --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_name_item.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetNameItem") + + +@_attrs_define +class DatasetNameItem: + """ + Attributes: + dataset_id (UUID): + name (str): + model_type (str | Unset): + """ + + dataset_id: UUID + name: str + model_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + name = self.name + + model_type = self.model_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + "name": name, + } + ) + if model_type is not UNSET: + field_dict["model_type"] = model_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + name = d.pop("name") + + model_type = d.pop("model_type", UNSET) + + dataset_name_item = cls( + dataset_id=dataset_id, + name=name, + model_type=model_type, + ) + + dataset_name_item.additional_properties = d + return dataset_name_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_names_response.py b/python/fi/generated/openapi_client/models/dataset_names_response.py new file mode 100644 index 0000000..0c3d0ea --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_names_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_names_result import DatasetNamesResult + + +T = TypeVar("T", bound="DatasetNamesResponse") + + +@_attrs_define +class DatasetNamesResponse: + """ + Attributes: + status (bool): + result (DatasetNamesResult): + """ + + status: bool + result: DatasetNamesResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_names_result import DatasetNamesResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetNamesResult.from_dict(d.pop("result")) + + dataset_names_response = cls( + status=status, + result=result, + ) + + dataset_names_response.additional_properties = d + return dataset_names_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_names_result.py b/python/fi/generated/openapi_client/models/dataset_names_result.py new file mode 100644 index 0000000..001d577 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_names_result.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_name_item import DatasetNameItem + + +T = TypeVar("T", bound="DatasetNamesResult") + + +@_attrs_define +class DatasetNamesResult: + """ + Attributes: + datasets (list[DatasetNameItem]): + """ + + datasets: list[DatasetNameItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + datasets = [] + for datasets_item_data in self.datasets: + datasets_item = datasets_item_data.to_dict() + datasets.append(datasets_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "datasets": datasets, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_name_item import DatasetNameItem + + d = dict(src_dict) + datasets = [] + _datasets = d.pop("datasets") + for datasets_item_data in _datasets: + datasets_item = DatasetNameItem.from_dict(datasets_item_data) + + datasets.append(datasets_item) + + dataset_names_result = cls( + datasets=datasets, + ) + + dataset_names_result.additional_properties = d + return dataset_names_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_request.py b/python/fi/generated/openapi_client/models/dataset_row_data_request.py new file mode 100644 index 0000000..bd02e93 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_request.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dataset_row_data_request_filters_item import ( + DatasetRowDataRequestFiltersItem, + ) + from ..models.dataset_row_data_request_sort_item import ( + DatasetRowDataRequestSortItem, + ) + + +T = TypeVar("T", bound="DatasetRowDataRequest") + + +@_attrs_define +class DatasetRowDataRequest: + """ + Attributes: + row_id (UUID): + filters (list[DatasetRowDataRequestFiltersItem] | Unset): + sort (list[DatasetRowDataRequestSortItem] | Unset): + """ + + row_id: UUID + filters: list[DatasetRowDataRequestFiltersItem] | Unset = UNSET + sort: list[DatasetRowDataRequestSortItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + row_id = str(self.row_id) + + filters: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = [] + for filters_item_data in self.filters: + filters_item = filters_item_data.to_dict() + filters.append(filters_item) + + sort: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.sort, Unset): + sort = [] + for sort_item_data in self.sort: + sort_item = sort_item_data.to_dict() + sort.append(sort_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "row_id": row_id, + } + ) + if filters is not UNSET: + field_dict["filters"] = filters + if sort is not UNSET: + field_dict["sort"] = sort + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_row_data_request_filters_item import ( + DatasetRowDataRequestFiltersItem, + ) + from ..models.dataset_row_data_request_sort_item import ( + DatasetRowDataRequestSortItem, + ) + + d = dict(src_dict) + row_id = UUID(d.pop("row_id")) + + _filters = d.pop("filters", UNSET) + filters: list[DatasetRowDataRequestFiltersItem] | Unset = UNSET + if _filters is not UNSET: + filters = [] + for filters_item_data in _filters: + filters_item = DatasetRowDataRequestFiltersItem.from_dict( + filters_item_data + ) + + filters.append(filters_item) + + _sort = d.pop("sort", UNSET) + sort: list[DatasetRowDataRequestSortItem] | Unset = UNSET + if _sort is not UNSET: + sort = [] + for sort_item_data in _sort: + sort_item = DatasetRowDataRequestSortItem.from_dict(sort_item_data) + + sort.append(sort_item) + + dataset_row_data_request = cls( + row_id=row_id, + filters=filters, + sort=sort, + ) + + dataset_row_data_request.additional_properties = d + return dataset_row_data_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item.py b/python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item.py new file mode 100644 index 0000000..957890b --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dataset_row_data_request_filters_item_filter_config import ( + DatasetRowDataRequestFiltersItemFilterConfig, + ) + + +T = TypeVar("T", bound="DatasetRowDataRequestFiltersItem") + + +@_attrs_define +class DatasetRowDataRequestFiltersItem: + """ + Attributes: + column_id (str): Column or attribute id to filter on. + filter_config (DatasetRowDataRequestFiltersItemFilterConfig): + display_name (str | Unset): Optional UI label for chips and saved views. + source (str | Unset): Optional source surface for mixed-source filters, for example traces, datasets, or + simulation. + output_type (str | Unset): Optional metric output type metadata used by eval and annotation filters. + """ + + column_id: str + filter_config: DatasetRowDataRequestFiltersItemFilterConfig + display_name: str | Unset = UNSET + source: str | Unset = UNSET + output_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + filter_config = self.filter_config.to_dict() + + display_name = self.display_name + + source = self.source + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + "filter_config": filter_config, + } + ) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if source is not UNSET: + field_dict["source"] = source + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_row_data_request_filters_item_filter_config import ( + DatasetRowDataRequestFiltersItemFilterConfig, + ) + + d = dict(src_dict) + column_id = d.pop("column_id") + + filter_config = DatasetRowDataRequestFiltersItemFilterConfig.from_dict( + d.pop("filter_config") + ) + + display_name = d.pop("display_name", UNSET) + + source = d.pop("source", UNSET) + + output_type = d.pop("output_type", UNSET) + + dataset_row_data_request_filters_item = cls( + column_id=column_id, + filter_config=filter_config, + display_name=display_name, + source=source, + output_type=output_type, + ) + + return dataset_row_data_request_filters_item diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item_filter_config.py b/python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item_filter_config.py new file mode 100644 index 0000000..bc1ceec --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_request_filters_item_filter_config.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetRowDataRequestFiltersItemFilterConfig") + + +@_attrs_define +class DatasetRowDataRequestFiltersItemFilterConfig: + """ + Attributes: + filter_type (str): Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, + annotator, or array. + filter_op (str): Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, + not_in, between, not_between, is_null, or is_not_null. + filter_value (Any | Unset): Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + col_type (str | Unset): Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + """ + + filter_type: str + filter_op: str + filter_value: Any | Unset = UNSET + col_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + filter_type = self.filter_type + + filter_op = self.filter_op + + filter_value = self.filter_value + + col_type = self.col_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "filter_type": filter_type, + "filter_op": filter_op, + } + ) + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + if col_type is not UNSET: + field_dict["col_type"] = col_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + filter_type = d.pop("filter_type") + + filter_op = d.pop("filter_op") + + filter_value = d.pop("filter_value", UNSET) + + col_type = d.pop("col_type", UNSET) + + dataset_row_data_request_filters_item_filter_config = cls( + filter_type=filter_type, + filter_op=filter_op, + filter_value=filter_value, + col_type=col_type, + ) + + return dataset_row_data_request_filters_item_filter_config diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item.py b/python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item.py new file mode 100644 index 0000000..2888019 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..models.dataset_row_data_request_sort_item_type import ( + DatasetRowDataRequestSortItemType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetRowDataRequestSortItem") + + +@_attrs_define +class DatasetRowDataRequestSortItem: + """ + Attributes: + column_id (str): + type_ (DatasetRowDataRequestSortItemType | Unset): + """ + + column_id: str + type_: DatasetRowDataRequestSortItemType | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + } + ) + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_id = d.pop("column_id") + + _type_ = d.pop("type", UNSET) + type_: DatasetRowDataRequestSortItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = DatasetRowDataRequestSortItemType(_type_) + + dataset_row_data_request_sort_item = cls( + column_id=column_id, + type_=type_, + ) + + return dataset_row_data_request_sort_item diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item_type.py b/python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item_type.py new file mode 100644 index 0000000..e723fc3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_request_sort_item_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class DatasetRowDataRequestSortItemType(str, Enum): + ASCENDING = "ascending" + DESCENDING = "descending" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_response.py b/python/fi/generated/openapi_client/models/dataset_row_data_response.py new file mode 100644 index 0000000..d4a6605 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_row_data_result import DatasetRowDataResult + + +T = TypeVar("T", bound="DatasetRowDataResponse") + + +@_attrs_define +class DatasetRowDataResponse: + """ + Attributes: + status (bool): + result (DatasetRowDataResult): + """ + + status: bool + result: DatasetRowDataResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_row_data_result import DatasetRowDataResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetRowDataResult.from_dict(d.pop("result")) + + dataset_row_data_response = cls( + status=status, + result=result, + ) + + dataset_row_data_response.additional_properties = d + return dataset_row_data_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_result.py b/python/fi/generated/openapi_client/models/dataset_row_data_result.py new file mode 100644 index 0000000..f1455a5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_result.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_row_data_result_current import DatasetRowDataResultCurrent + from ..models.dataset_row_navigation import DatasetRowNavigation + + +T = TypeVar("T", bound="DatasetRowDataResult") + + +@_attrs_define +class DatasetRowDataResult: + """ + Attributes: + next_ (DatasetRowNavigation): + current (DatasetRowDataResultCurrent): + """ + + next_: DatasetRowNavigation + current: DatasetRowDataResultCurrent + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + next_ = self.next_.to_dict() + + current = self.current.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "next": next_, + "current": current, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_row_data_result_current import DatasetRowDataResultCurrent + from ..models.dataset_row_navigation import DatasetRowNavigation + + d = dict(src_dict) + next_ = DatasetRowNavigation.from_dict(d.pop("next")) + + current = DatasetRowDataResultCurrent.from_dict(d.pop("current")) + + dataset_row_data_result = cls( + next_=next_, + current=current, + ) + + dataset_row_data_result.additional_properties = d + return dataset_row_data_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_row_data_result_current.py b/python/fi/generated/openapi_client/models/dataset_row_data_result_current.py new file mode 100644 index 0000000..5f1ba8b --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_data_result_current.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetRowDataResultCurrent") + + +@_attrs_define +class DatasetRowDataResultCurrent: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_row_data_result_current = cls() + + dataset_row_data_result_current.additional_properties = d + return dataset_row_data_result_current + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_row_diff_request.py b/python/fi/generated/openapi_client/models/dataset_row_diff_request.py new file mode 100644 index 0000000..f5c1be1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_diff_request.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetRowDiffRequest") + + +@_attrs_define +class DatasetRowDiffRequest: + """ + Attributes: + experiment_id (UUID): + column_ids (list[UUID]): + row_ids (list[UUID]): + compare_column_ids (list[UUID]): + """ + + experiment_id: UUID + column_ids: list[UUID] + row_ids: list[UUID] + compare_column_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_id = str(self.experiment_id) + + column_ids = [] + for column_ids_item_data in self.column_ids: + column_ids_item = str(column_ids_item_data) + column_ids.append(column_ids_item) + + row_ids = [] + for row_ids_item_data in self.row_ids: + row_ids_item = str(row_ids_item_data) + row_ids.append(row_ids_item) + + compare_column_ids = [] + for compare_column_ids_item_data in self.compare_column_ids: + compare_column_ids_item = str(compare_column_ids_item_data) + compare_column_ids.append(compare_column_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "experiment_id": experiment_id, + "column_ids": column_ids, + "row_ids": row_ids, + "compare_column_ids": compare_column_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_id = UUID(d.pop("experiment_id")) + + column_ids = [] + _column_ids = d.pop("column_ids") + for column_ids_item_data in _column_ids: + column_ids_item = UUID(column_ids_item_data) + + column_ids.append(column_ids_item) + + row_ids = [] + _row_ids = d.pop("row_ids") + for row_ids_item_data in _row_ids: + row_ids_item = UUID(row_ids_item_data) + + row_ids.append(row_ids_item) + + compare_column_ids = [] + _compare_column_ids = d.pop("compare_column_ids") + for compare_column_ids_item_data in _compare_column_ids: + compare_column_ids_item = UUID(compare_column_ids_item_data) + + compare_column_ids.append(compare_column_ids_item) + + dataset_row_diff_request = cls( + experiment_id=experiment_id, + column_ids=column_ids, + row_ids=row_ids, + compare_column_ids=compare_column_ids, + ) + + dataset_row_diff_request.additional_properties = d + return dataset_row_diff_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_row_navigation.py b/python/fi/generated/openapi_client/models/dataset_row_navigation.py new file mode 100644 index 0000000..0023066 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_row_navigation.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetRowNavigation") + + +@_attrs_define +class DatasetRowNavigation: + """ + Attributes: + row_id (list[UUID] | Unset): + """ + + row_id: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + row_id: list[str] | Unset = UNSET + if not isinstance(self.row_id, Unset): + row_id = [] + for row_id_item_data in self.row_id: + row_id_item = str(row_id_item_data) + row_id.append(row_id_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if row_id is not UNSET: + field_dict["row_id"] = row_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _row_id = d.pop("row_id", UNSET) + row_id: list[UUID] | Unset = UNSET + if _row_id is not UNSET: + row_id = [] + for row_id_item_data in _row_id: + row_id_item = UUID(row_id_item_data) + + row_id.append(row_id_item) + + dataset_row_navigation = cls( + row_id=row_id, + ) + + dataset_row_navigation.additional_properties = d + return dataset_row_navigation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_rows_import_message_response.py b/python/fi/generated/openapi_client/models/dataset_rows_import_message_response.py new file mode 100644 index 0000000..8864bd1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_rows_import_message_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_rows_import_message_result import ( + DatasetRowsImportMessageResult, + ) + + +T = TypeVar("T", bound="DatasetRowsImportMessageResponse") + + +@_attrs_define +class DatasetRowsImportMessageResponse: + """ + Attributes: + status (bool): + result (DatasetRowsImportMessageResult): + """ + + status: bool + result: DatasetRowsImportMessageResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_rows_import_message_result import ( + DatasetRowsImportMessageResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetRowsImportMessageResult.from_dict(d.pop("result")) + + dataset_rows_import_message_response = cls( + status=status, + result=result, + ) + + dataset_rows_import_message_response.additional_properties = d + return dataset_rows_import_message_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_rows_import_message_result.py b/python/fi/generated/openapi_client/models/dataset_rows_import_message_result.py new file mode 100644 index 0000000..465725e --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_rows_import_message_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetRowsImportMessageResult") + + +@_attrs_define +class DatasetRowsImportMessageResult: + """ + Attributes: + message (str): + """ + + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + dataset_rows_import_message_result = cls( + message=message, + ) + + dataset_rows_import_message_result.additional_properties = d + return dataset_rows_import_message_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_rows_imported_response.py b/python/fi/generated/openapi_client/models/dataset_rows_imported_response.py new file mode 100644 index 0000000..8f7f0ff --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_rows_imported_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_rows_imported_result import DatasetRowsImportedResult + + +T = TypeVar("T", bound="DatasetRowsImportedResponse") + + +@_attrs_define +class DatasetRowsImportedResponse: + """ + Attributes: + status (bool): + result (DatasetRowsImportedResult): + """ + + status: bool + result: DatasetRowsImportedResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_rows_imported_result import DatasetRowsImportedResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetRowsImportedResult.from_dict(d.pop("result")) + + dataset_rows_imported_response = cls( + status=status, + result=result, + ) + + dataset_rows_imported_response.additional_properties = d + return dataset_rows_imported_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_rows_imported_result.py b/python/fi/generated/openapi_client/models/dataset_rows_imported_result.py new file mode 100644 index 0000000..071208d --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_rows_imported_result.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetRowsImportedResult") + + +@_attrs_define +class DatasetRowsImportedResult: + """ + Attributes: + message (str): + rows_added (int): + """ + + message: str + rows_added: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + rows_added = self.rows_added + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "rows_added": rows_added, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + rows_added = d.pop("rows_added") + + dataset_rows_imported_result = cls( + message=message, + rows_added=rows_added, + ) + + dataset_rows_imported_result.additional_properties = d + return dataset_rows_imported_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_prompt.py b/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_prompt.py new file mode 100644 index 0000000..62dc369 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_prompt.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetRunPromptStatsPrompt") + + +@_attrs_define +class DatasetRunPromptStatsPrompt: + """ + Attributes: + id (UUID): + name (str): + input_token (float): + output_token (float): + total_token (float): + """ + + id: UUID + name: str + input_token: float + output_token: float + total_token: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + input_token = self.input_token + + output_token = self.output_token + + total_token = self.total_token + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "input_token": input_token, + "output_token": output_token, + "total_token": total_token, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + input_token = d.pop("input_token") + + output_token = d.pop("output_token") + + total_token = d.pop("total_token") + + dataset_run_prompt_stats_prompt = cls( + id=id, + name=name, + input_token=input_token, + output_token=output_token, + total_token=total_token, + ) + + dataset_run_prompt_stats_prompt.additional_properties = d + return dataset_run_prompt_stats_prompt + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_response.py b/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_response.py new file mode 100644 index 0000000..ef8f74f --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_run_prompt_stats_result import DatasetRunPromptStatsResult + + +T = TypeVar("T", bound="DatasetRunPromptStatsResponse") + + +@_attrs_define +class DatasetRunPromptStatsResponse: + """ + Attributes: + status (bool): + result (DatasetRunPromptStatsResult): + """ + + status: bool + result: DatasetRunPromptStatsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_run_prompt_stats_result import DatasetRunPromptStatsResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetRunPromptStatsResult.from_dict(d.pop("result")) + + dataset_run_prompt_stats_response = cls( + status=status, + result=result, + ) + + dataset_run_prompt_stats_response.additional_properties = d + return dataset_run_prompt_stats_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_result.py b/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_result.py new file mode 100644 index 0000000..119acbe --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_run_prompt_stats_result.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_run_prompt_stats_prompt import DatasetRunPromptStatsPrompt + + +T = TypeVar("T", bound="DatasetRunPromptStatsResult") + + +@_attrs_define +class DatasetRunPromptStatsResult: + """ + Attributes: + avg_tokens (float): + avg_cost (float): + avg_time (float): + prompts (list[DatasetRunPromptStatsPrompt]): + """ + + avg_tokens: float + avg_cost: float + avg_time: float + prompts: list[DatasetRunPromptStatsPrompt] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + avg_tokens = self.avg_tokens + + avg_cost = self.avg_cost + + avg_time = self.avg_time + + prompts = [] + for prompts_item_data in self.prompts: + prompts_item = prompts_item_data.to_dict() + prompts.append(prompts_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "avg_tokens": avg_tokens, + "avg_cost": avg_cost, + "avg_time": avg_time, + "prompts": prompts, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_run_prompt_stats_prompt import DatasetRunPromptStatsPrompt + + d = dict(src_dict) + avg_tokens = d.pop("avg_tokens") + + avg_cost = d.pop("avg_cost") + + avg_time = d.pop("avg_time") + + prompts = [] + _prompts = d.pop("prompts") + for prompts_item_data in _prompts: + prompts_item = DatasetRunPromptStatsPrompt.from_dict(prompts_item_data) + + prompts.append(prompts_item) + + dataset_run_prompt_stats_result = cls( + avg_tokens=avg_tokens, + avg_cost=avg_cost, + avg_time=avg_time, + prompts=prompts, + ) + + dataset_run_prompt_stats_result.additional_properties = d + return dataset_run_prompt_stats_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_sdk_rows_code.py b/python/fi/generated/openapi_client/models/dataset_sdk_rows_code.py new file mode 100644 index 0000000..e9cc38a --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_sdk_rows_code.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetSdkRowsCode") + + +@_attrs_define +class DatasetSdkRowsCode: + """ + Attributes: + python_add_row (str): + python_add_col (str): + typescript_add_col (str): + typescript_add_row (str): + curl_add_col (str): + curl_add_row (str): + """ + + python_add_row: str + python_add_col: str + typescript_add_col: str + typescript_add_row: str + curl_add_col: str + curl_add_row: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + python_add_row = self.python_add_row + + python_add_col = self.python_add_col + + typescript_add_col = self.typescript_add_col + + typescript_add_row = self.typescript_add_row + + curl_add_col = self.curl_add_col + + curl_add_row = self.curl_add_row + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "python_add_row": python_add_row, + "python_add_col": python_add_col, + "typescript_add_col": typescript_add_col, + "typescript_add_row": typescript_add_row, + "curl_add_col": curl_add_col, + "curl_add_row": curl_add_row, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + python_add_row = d.pop("python_add_row") + + python_add_col = d.pop("python_add_col") + + typescript_add_col = d.pop("typescript_add_col") + + typescript_add_row = d.pop("typescript_add_row") + + curl_add_col = d.pop("curl_add_col") + + curl_add_row = d.pop("curl_add_row") + + dataset_sdk_rows_code = cls( + python_add_row=python_add_row, + python_add_col=python_add_col, + typescript_add_col=typescript_add_col, + typescript_add_row=typescript_add_row, + curl_add_col=curl_add_col, + curl_add_row=curl_add_row, + ) + + dataset_sdk_rows_code.additional_properties = d + return dataset_sdk_rows_code + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_sdk_rows_request.py b/python/fi/generated/openapi_client/models/dataset_sdk_rows_request.py new file mode 100644 index 0000000..694a343 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_sdk_rows_request.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetSdkRowsRequest") + + +@_attrs_define +class DatasetSdkRowsRequest: + """ + Attributes: + dataset_name (str | Unset): + dataset_id (None | Unset | UUID): + """ + + dataset_name: str | Unset = UNSET + dataset_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_name = self.dataset_name + + dataset_id: None | str | Unset + if isinstance(self.dataset_id, Unset): + dataset_id = UNSET + elif isinstance(self.dataset_id, UUID): + dataset_id = str(self.dataset_id) + else: + dataset_id = self.dataset_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if dataset_name is not UNSET: + field_dict["dataset_name"] = dataset_name + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_name = d.pop("dataset_name", UNSET) + + def _parse_dataset_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + dataset_id_type_0 = UUID(data) + + return dataset_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + dataset_id = _parse_dataset_id(d.pop("dataset_id", UNSET)) + + dataset_sdk_rows_request = cls( + dataset_name=dataset_name, + dataset_id=dataset_id, + ) + + dataset_sdk_rows_request.additional_properties = d + return dataset_sdk_rows_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_sdk_rows_response.py b/python/fi/generated/openapi_client/models/dataset_sdk_rows_response.py new file mode 100644 index 0000000..f11e42a --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_sdk_rows_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_sdk_rows_result import DatasetSdkRowsResult + + +T = TypeVar("T", bound="DatasetSdkRowsResponse") + + +@_attrs_define +class DatasetSdkRowsResponse: + """ + Attributes: + status (bool): + result (DatasetSdkRowsResult): + """ + + status: bool + result: DatasetSdkRowsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_sdk_rows_result import DatasetSdkRowsResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetSdkRowsResult.from_dict(d.pop("result")) + + dataset_sdk_rows_response = cls( + status=status, + result=result, + ) + + dataset_sdk_rows_response.additional_properties = d + return dataset_sdk_rows_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_sdk_rows_result.py b/python/fi/generated/openapi_client/models/dataset_sdk_rows_result.py new file mode 100644 index 0000000..838adea --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_sdk_rows_result.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset import Dataset + from ..models.dataset_sdk_rows_code import DatasetSdkRowsCode + from ..models.dataset_sdk_rows_result_api_keys import DatasetSdkRowsResultApiKeys + + +T = TypeVar("T", bound="DatasetSdkRowsResult") + + +@_attrs_define +class DatasetSdkRowsResult: + """ + Attributes: + api_keys (DatasetSdkRowsResultApiKeys): + dataset (Dataset): + code (DatasetSdkRowsCode): + """ + + api_keys: DatasetSdkRowsResultApiKeys + dataset: Dataset + code: DatasetSdkRowsCode + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + api_keys = self.api_keys.to_dict() + + dataset = self.dataset.to_dict() + + code = self.code.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "api_keys": api_keys, + "dataset": dataset, + "code": code, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset import Dataset + from ..models.dataset_sdk_rows_code import DatasetSdkRowsCode + from ..models.dataset_sdk_rows_result_api_keys import ( + DatasetSdkRowsResultApiKeys, + ) + + d = dict(src_dict) + api_keys = DatasetSdkRowsResultApiKeys.from_dict(d.pop("api_keys")) + + dataset = Dataset.from_dict(d.pop("dataset")) + + code = DatasetSdkRowsCode.from_dict(d.pop("code")) + + dataset_sdk_rows_result = cls( + api_keys=api_keys, + dataset=dataset, + code=code, + ) + + dataset_sdk_rows_result.additional_properties = d + return dataset_sdk_rows_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_sdk_rows_result_api_keys.py b/python/fi/generated/openapi_client/models/dataset_sdk_rows_result_api_keys.py new file mode 100644 index 0000000..2657c0d --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_sdk_rows_result_api_keys.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetSdkRowsResultApiKeys") + + +@_attrs_define +class DatasetSdkRowsResultApiKeys: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_sdk_rows_result_api_keys = cls() + + dataset_sdk_rows_result_api_keys.additional_properties = d + return dataset_sdk_rows_result_api_keys + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_source.py b/python/fi/generated/openapi_client/models/dataset_source.py new file mode 100644 index 0000000..f4b1484 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_source.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class DatasetSource(str, Enum): + BUILD = "build" + DEMO = "demo" + EXPERIMENT_SNAPSHOT = "experiment_snapshot" + GRAPH = "graph" + KNOWLEDGE_BASE = "knowledge_base" + OBSERVE = "observe" + SCENARIO = "scenario" + SDK = "sdk" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/dataset_static_column_request.py b/python/fi/generated/openapi_client/models/dataset_static_column_request.py new file mode 100644 index 0000000..5ee6dc8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_static_column_request.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetStaticColumnRequest") + + +@_attrs_define +class DatasetStaticColumnRequest: + """ + Attributes: + new_column_name (str): + column_type (str): + source (str | Unset): + """ + + new_column_name: str + column_type: str + source: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + new_column_name = self.new_column_name + + column_type = self.column_type + + source = self.source + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "new_column_name": new_column_name, + "column_type": column_type, + } + ) + if source is not UNSET: + field_dict["source"] = source + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + new_column_name = d.pop("new_column_name") + + column_type = d.pop("column_type") + + source = d.pop("source", UNSET) + + dataset_static_column_request = cls( + new_column_name=new_column_name, + column_type=column_type, + source=source, + ) + + dataset_static_column_request.additional_properties = d + return dataset_static_column_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_table_metadata.py b/python/fi/generated/openapi_client/models/dataset_table_metadata.py new file mode 100644 index 0000000..67834d8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_table_metadata.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetTableMetadata") + + +@_attrs_define +class DatasetTableMetadata: + """ + Attributes: + dataset_name (str): + total_rows (int | Unset): + total_pages (int | Unset): + error_messages (list[str] | Unset): + status (None | str | Unset): + """ + + dataset_name: str + total_rows: int | Unset = UNSET + total_pages: int | Unset = UNSET + error_messages: list[str] | Unset = UNSET + status: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_name = self.dataset_name + + total_rows = self.total_rows + + total_pages = self.total_pages + + error_messages: list[str] | Unset = UNSET + if not isinstance(self.error_messages, Unset): + error_messages = self.error_messages + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + else: + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_name": dataset_name, + } + ) + if total_rows is not UNSET: + field_dict["total_rows"] = total_rows + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + if error_messages is not UNSET: + field_dict["error_messages"] = error_messages + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_name = d.pop("dataset_name") + + total_rows = d.pop("total_rows", UNSET) + + total_pages = d.pop("total_pages", UNSET) + + error_messages = cast(list[str], d.pop("error_messages", UNSET)) + + def _parse_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + dataset_table_metadata = cls( + dataset_name=dataset_name, + total_rows=total_rows, + total_pages=total_pages, + error_messages=error_messages, + status=status, + ) + + dataset_table_metadata.additional_properties = d + return dataset_table_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_table_response.py b/python/fi/generated/openapi_client/models/dataset_table_response.py new file mode 100644 index 0000000..7b82770 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_table_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset_table_result import DatasetTableResult + + +T = TypeVar("T", bound="DatasetTableResponse") + + +@_attrs_define +class DatasetTableResponse: + """ + Attributes: + status (bool): + result (DatasetTableResult): + """ + + status: bool + result: DatasetTableResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_table_result import DatasetTableResult + + d = dict(src_dict) + status = d.pop("status") + + result = DatasetTableResult.from_dict(d.pop("result")) + + dataset_table_response = cls( + status=status, + result=result, + ) + + dataset_table_response.additional_properties = d + return dataset_table_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_table_result.py b/python/fi/generated/openapi_client/models/dataset_table_result.py new file mode 100644 index 0000000..248d271 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_table_result.py @@ -0,0 +1,195 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dataset_table_metadata import DatasetTableMetadata + from ..models.dataset_table_result_column_config_item import ( + DatasetTableResultColumnConfigItem, + ) + from ..models.dataset_table_result_dataset_config import ( + DatasetTableResultDatasetConfig, + ) + from ..models.dataset_table_result_table_item import DatasetTableResultTableItem + + +T = TypeVar("T", bound="DatasetTableResult") + + +@_attrs_define +class DatasetTableResult: + """ + Attributes: + column_config (list[DatasetTableResultColumnConfigItem]): + metadata (DatasetTableMetadata | Unset): + table (list[DatasetTableResultTableItem] | Unset): + dataset_config (DatasetTableResultDatasetConfig | Unset): + synthetic_dataset (bool | Unset): + synthetic_dataset_percentage (float | None | Unset): + synthetic_regenerate (bool | Unset): + is_processing_data (bool | Unset): + """ + + column_config: list[DatasetTableResultColumnConfigItem] + metadata: DatasetTableMetadata | Unset = UNSET + table: list[DatasetTableResultTableItem] | Unset = UNSET + dataset_config: DatasetTableResultDatasetConfig | Unset = UNSET + synthetic_dataset: bool | Unset = UNSET + synthetic_dataset_percentage: float | None | Unset = UNSET + synthetic_regenerate: bool | Unset = UNSET + is_processing_data: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_config = [] + for column_config_item_data in self.column_config: + column_config_item = column_config_item_data.to_dict() + column_config.append(column_config_item) + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + table: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.table, Unset): + table = [] + for table_item_data in self.table: + table_item = table_item_data.to_dict() + table.append(table_item) + + dataset_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.dataset_config, Unset): + dataset_config = self.dataset_config.to_dict() + + synthetic_dataset = self.synthetic_dataset + + synthetic_dataset_percentage: float | None | Unset + if isinstance(self.synthetic_dataset_percentage, Unset): + synthetic_dataset_percentage = UNSET + else: + synthetic_dataset_percentage = self.synthetic_dataset_percentage + + synthetic_regenerate = self.synthetic_regenerate + + is_processing_data = self.is_processing_data + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_config": column_config, + } + ) + if metadata is not UNSET: + field_dict["metadata"] = metadata + if table is not UNSET: + field_dict["table"] = table + if dataset_config is not UNSET: + field_dict["dataset_config"] = dataset_config + if synthetic_dataset is not UNSET: + field_dict["synthetic_dataset"] = synthetic_dataset + if synthetic_dataset_percentage is not UNSET: + field_dict["synthetic_dataset_percentage"] = synthetic_dataset_percentage + if synthetic_regenerate is not UNSET: + field_dict["synthetic_regenerate"] = synthetic_regenerate + if is_processing_data is not UNSET: + field_dict["is_processing_data"] = is_processing_data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset_table_metadata import DatasetTableMetadata + from ..models.dataset_table_result_column_config_item import ( + DatasetTableResultColumnConfigItem, + ) + from ..models.dataset_table_result_dataset_config import ( + DatasetTableResultDatasetConfig, + ) + from ..models.dataset_table_result_table_item import DatasetTableResultTableItem + + d = dict(src_dict) + column_config = [] + _column_config = d.pop("column_config") + for column_config_item_data in _column_config: + column_config_item = DatasetTableResultColumnConfigItem.from_dict( + column_config_item_data + ) + + column_config.append(column_config_item) + + _metadata = d.pop("metadata", UNSET) + metadata: DatasetTableMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = DatasetTableMetadata.from_dict(_metadata) + + _table = d.pop("table", UNSET) + table: list[DatasetTableResultTableItem] | Unset = UNSET + if _table is not UNSET: + table = [] + for table_item_data in _table: + table_item = DatasetTableResultTableItem.from_dict(table_item_data) + + table.append(table_item) + + _dataset_config = d.pop("dataset_config", UNSET) + dataset_config: DatasetTableResultDatasetConfig | Unset + if isinstance(_dataset_config, Unset): + dataset_config = UNSET + else: + dataset_config = DatasetTableResultDatasetConfig.from_dict(_dataset_config) + + synthetic_dataset = d.pop("synthetic_dataset", UNSET) + + def _parse_synthetic_dataset_percentage(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + synthetic_dataset_percentage = _parse_synthetic_dataset_percentage( + d.pop("synthetic_dataset_percentage", UNSET) + ) + + synthetic_regenerate = d.pop("synthetic_regenerate", UNSET) + + is_processing_data = d.pop("is_processing_data", UNSET) + + dataset_table_result = cls( + column_config=column_config, + metadata=metadata, + table=table, + dataset_config=dataset_config, + synthetic_dataset=synthetic_dataset, + synthetic_dataset_percentage=synthetic_dataset_percentage, + synthetic_regenerate=synthetic_regenerate, + is_processing_data=is_processing_data, + ) + + dataset_table_result.additional_properties = d + return dataset_table_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_table_result_column_config_item.py b/python/fi/generated/openapi_client/models/dataset_table_result_column_config_item.py new file mode 100644 index 0000000..ac2202c --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_table_result_column_config_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetTableResultColumnConfigItem") + + +@_attrs_define +class DatasetTableResultColumnConfigItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_table_result_column_config_item = cls() + + dataset_table_result_column_config_item.additional_properties = d + return dataset_table_result_column_config_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_table_result_dataset_config.py b/python/fi/generated/openapi_client/models/dataset_table_result_dataset_config.py new file mode 100644 index 0000000..2f5a019 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_table_result_dataset_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetTableResultDatasetConfig") + + +@_attrs_define +class DatasetTableResultDatasetConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_table_result_dataset_config = cls() + + dataset_table_result_dataset_config.additional_properties = d + return dataset_table_result_dataset_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_table_result_table_item.py b/python/fi/generated/openapi_client/models/dataset_table_result_table_item.py new file mode 100644 index 0000000..11a0c07 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_table_result_table_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetTableResultTableItem") + + +@_attrs_define +class DatasetTableResultTableItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_table_result_table_item = cls() + + dataset_table_result_table_item.additional_properties = d + return dataset_table_result_table_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_update_cell_value_request.py b/python/fi/generated/openapi_client/models/dataset_update_cell_value_request.py new file mode 100644 index 0000000..9aac73a --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_update_cell_value_request.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetUpdateCellValueRequest") + + +@_attrs_define +class DatasetUpdateCellValueRequest: + """ + Attributes: + row_id (UUID): + column_id (UUID): + new_value (None | str | Unset): New cell value. Accepts JSON primitives or multipart file uploads. + """ + + row_id: UUID + column_id: UUID + new_value: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + row_id = str(self.row_id) + + column_id = str(self.column_id) + + new_value: None | str | Unset + if isinstance(self.new_value, Unset): + new_value = UNSET + else: + new_value = self.new_value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "row_id": row_id, + "column_id": column_id, + } + ) + if new_value is not UNSET: + field_dict["new_value"] = new_value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + row_id = UUID(d.pop("row_id")) + + column_id = UUID(d.pop("column_id")) + + def _parse_new_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + new_value = _parse_new_value(d.pop("new_value", UNSET)) + + dataset_update_cell_value_request = cls( + row_id=row_id, + column_id=column_id, + new_value=new_value, + ) + + dataset_update_cell_value_request.additional_properties = d + return dataset_update_cell_value_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_update_column_name_request.py b/python/fi/generated/openapi_client/models/dataset_update_column_name_request.py new file mode 100644 index 0000000..91053fa --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_update_column_name_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetUpdateColumnNameRequest") + + +@_attrs_define +class DatasetUpdateColumnNameRequest: + """ + Attributes: + new_column_name (str): + """ + + new_column_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + new_column_name = self.new_column_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "new_column_name": new_column_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + new_column_name = d.pop("new_column_name") + + dataset_update_column_name_request = cls( + new_column_name=new_column_name, + ) + + dataset_update_column_name_request.additional_properties = d + return dataset_update_column_name_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dataset_update_column_type_request.py b/python/fi/generated/openapi_client/models/dataset_update_column_type_request.py new file mode 100644 index 0000000..75efa8b --- /dev/null +++ b/python/fi/generated/openapi_client/models/dataset_update_column_type_request.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DatasetUpdateColumnTypeRequest") + + +@_attrs_define +class DatasetUpdateColumnTypeRequest: + """ + Attributes: + new_column_type (str): + preview (bool | Unset): Default: True. + force_update (bool | Unset): Default: False. + """ + + new_column_type: str + preview: bool | Unset = True + force_update: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + new_column_type = self.new_column_type + + preview = self.preview + + force_update = self.force_update + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "new_column_type": new_column_type, + } + ) + if preview is not UNSET: + field_dict["preview"] = preview + if force_update is not UNSET: + field_dict["force_update"] = force_update + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + new_column_type = d.pop("new_column_type") + + preview = d.pop("preview", UNSET) + + force_update = d.pop("force_update", UNSET) + + dataset_update_column_type_request = cls( + new_column_type=new_column_type, + preview=preview, + force_update=force_update, + ) + + dataset_update_column_type_request.additional_properties = d + return dataset_update_column_type_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/deep_analysis_api_response.py b/python/fi/generated/openapi_client/models/deep_analysis_api_response.py new file mode 100644 index 0000000..2e1563a --- /dev/null +++ b/python/fi/generated/openapi_client/models/deep_analysis_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.deep_analysis_response import DeepAnalysisResponse + + +T = TypeVar("T", bound="DeepAnalysisApiResponse") + + +@_attrs_define +class DeepAnalysisApiResponse: + """ + Attributes: + result (DeepAnalysisResponse): + status (bool | Unset): Default: True. + """ + + result: DeepAnalysisResponse + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.deep_analysis_response import DeepAnalysisResponse + + d = dict(src_dict) + result = DeepAnalysisResponse.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + deep_analysis_api_response = cls( + result=result, + status=status, + ) + + deep_analysis_api_response.additional_properties = d + return deep_analysis_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/deep_analysis_body.py b/python/fi/generated/openapi_client/models/deep_analysis_body.py new file mode 100644 index 0000000..c8bcc4a --- /dev/null +++ b/python/fi/generated/openapi_client/models/deep_analysis_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeepAnalysisBody") + + +@_attrs_define +class DeepAnalysisBody: + """ + Attributes: + trace_id (str): + force (bool | Unset): Default: False. + """ + + trace_id: str + force: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + trace_id = self.trace_id + + force = self.force + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "trace_id": trace_id, + } + ) + if force is not UNSET: + field_dict["force"] = force + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_id = d.pop("trace_id") + + force = d.pop("force", UNSET) + + deep_analysis_body = cls( + trace_id=trace_id, + force=force, + ) + + deep_analysis_body.additional_properties = d + return deep_analysis_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/deep_analysis_dispatch_api_response.py b/python/fi/generated/openapi_client/models/deep_analysis_dispatch_api_response.py new file mode 100644 index 0000000..ec1583a --- /dev/null +++ b/python/fi/generated/openapi_client/models/deep_analysis_dispatch_api_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.deep_analysis_dispatch_response import DeepAnalysisDispatchResponse + + +T = TypeVar("T", bound="DeepAnalysisDispatchApiResponse") + + +@_attrs_define +class DeepAnalysisDispatchApiResponse: + """ + Attributes: + result (DeepAnalysisDispatchResponse): + status (bool | Unset): Default: True. + """ + + result: DeepAnalysisDispatchResponse + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.deep_analysis_dispatch_response import ( + DeepAnalysisDispatchResponse, + ) + + d = dict(src_dict) + result = DeepAnalysisDispatchResponse.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + deep_analysis_dispatch_api_response = cls( + result=result, + status=status, + ) + + deep_analysis_dispatch_api_response.additional_properties = d + return deep_analysis_dispatch_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/deep_analysis_dispatch_response.py b/python/fi/generated/openapi_client/models/deep_analysis_dispatch_response.py new file mode 100644 index 0000000..c09c53c --- /dev/null +++ b/python/fi/generated/openapi_client/models/deep_analysis_dispatch_response.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DeepAnalysisDispatchResponse") + + +@_attrs_define +class DeepAnalysisDispatchResponse: + """ + Attributes: + status (str): + trace_id (str): + """ + + status: str + trace_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + trace_id = self.trace_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "trace_id": trace_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = d.pop("status") + + trace_id = d.pop("trace_id") + + deep_analysis_dispatch_response = cls( + status=status, + trace_id=trace_id, + ) + + deep_analysis_dispatch_response.additional_properties = d + return deep_analysis_dispatch_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/deep_analysis_response.py b/python/fi/generated/openapi_client/models/deep_analysis_response.py new file mode 100644 index 0000000..3e8f3c8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/deep_analysis_response.py @@ -0,0 +1,123 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.recommendation import Recommendation + from ..models.root_cause import RootCause + + +T = TypeVar("T", bound="DeepAnalysisResponse") + + +@_attrs_define +class DeepAnalysisResponse: + """ + Attributes: + status (str): + trace_id (str): + root_causes (list[RootCause]): + recommendations (list[Recommendation]): + immediate_fix (None | str): + """ + + status: str + trace_id: str + root_causes: list[RootCause] + recommendations: list[Recommendation] + immediate_fix: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + trace_id = self.trace_id + + root_causes = [] + for root_causes_item_data in self.root_causes: + root_causes_item = root_causes_item_data.to_dict() + root_causes.append(root_causes_item) + + recommendations = [] + for recommendations_item_data in self.recommendations: + recommendations_item = recommendations_item_data.to_dict() + recommendations.append(recommendations_item) + + immediate_fix: None | str + immediate_fix = self.immediate_fix + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "trace_id": trace_id, + "root_causes": root_causes, + "recommendations": recommendations, + "immediate_fix": immediate_fix, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.recommendation import Recommendation + from ..models.root_cause import RootCause + + d = dict(src_dict) + status = d.pop("status") + + trace_id = d.pop("trace_id") + + root_causes = [] + _root_causes = d.pop("root_causes") + for root_causes_item_data in _root_causes: + root_causes_item = RootCause.from_dict(root_causes_item_data) + + root_causes.append(root_causes_item) + + recommendations = [] + _recommendations = d.pop("recommendations") + for recommendations_item_data in _recommendations: + recommendations_item = Recommendation.from_dict(recommendations_item_data) + + recommendations.append(recommendations_item) + + def _parse_immediate_fix(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + immediate_fix = _parse_immediate_fix(d.pop("immediate_fix")) + + deep_analysis_response = cls( + status=status, + trace_id=trace_id, + root_causes=root_causes, + recommendations=recommendations, + immediate_fix=immediate_fix, + ) + + deep_analysis_response.additional_properties = d + return deep_analysis_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/delete_eval_config_response.py b/python/fi/generated/openapi_client/models/delete_eval_config_response.py new file mode 100644 index 0000000..a5f6d27 --- /dev/null +++ b/python/fi/generated/openapi_client/models/delete_eval_config_response.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DeleteEvalConfigResponse") + + +@_attrs_define +class DeleteEvalConfigResponse: + """ + Attributes: + message (str): + """ + + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + delete_eval_config_response = cls( + message=message, + ) + + delete_eval_config_response.additional_properties = d + return delete_eval_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/delete_eval_template.py b/python/fi/generated/openapi_client/models/delete_eval_template.py new file mode 100644 index 0000000..5052f47 --- /dev/null +++ b/python/fi/generated/openapi_client/models/delete_eval_template.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DeleteEvalTemplate") + + +@_attrs_define +class DeleteEvalTemplate: + """ + Attributes: + eval_template_id (UUID): + """ + + eval_template_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_template_id = str(self.eval_template_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_template_id": eval_template_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_id = UUID(d.pop("eval_template_id")) + + delete_eval_template = cls( + eval_template_id=eval_template_id, + ) + + delete_eval_template.additional_properties = d + return delete_eval_template + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/derived_variable_detail.py b/python/fi/generated/openapi_client/models/derived_variable_detail.py new file mode 100644 index 0000000..a88da39 --- /dev/null +++ b/python/fi/generated/openapi_client/models/derived_variable_detail.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.derived_variable_detail_raw_sample import ( + DerivedVariableDetailRawSample, + ) + from ..models.derived_variable_detail_schema import DerivedVariableDetailSchema + + +T = TypeVar("T", bound="DerivedVariableDetail") + + +@_attrs_define +class DerivedVariableDetail: + """ + Attributes: + paths (list[str] | Unset): + schema (DerivedVariableDetailSchema | Unset): + full_variables (list[str] | Unset): + raw_sample (DerivedVariableDetailRawSample | Unset): + is_json (bool | Unset): + """ + + paths: list[str] | Unset = UNSET + schema: DerivedVariableDetailSchema | Unset = UNSET + full_variables: list[str] | Unset = UNSET + raw_sample: DerivedVariableDetailRawSample | Unset = UNSET + is_json: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + paths: list[str] | Unset = UNSET + if not isinstance(self.paths, Unset): + paths = self.paths + + schema: dict[str, Any] | Unset = UNSET + if not isinstance(self.schema, Unset): + schema = self.schema.to_dict() + + full_variables: list[str] | Unset = UNSET + if not isinstance(self.full_variables, Unset): + full_variables = self.full_variables + + raw_sample: dict[str, Any] | Unset = UNSET + if not isinstance(self.raw_sample, Unset): + raw_sample = self.raw_sample.to_dict() + + is_json = self.is_json + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if paths is not UNSET: + field_dict["paths"] = paths + if schema is not UNSET: + field_dict["schema"] = schema + if full_variables is not UNSET: + field_dict["full_variables"] = full_variables + if raw_sample is not UNSET: + field_dict["raw_sample"] = raw_sample + if is_json is not UNSET: + field_dict["is_json"] = is_json + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.derived_variable_detail_raw_sample import ( + DerivedVariableDetailRawSample, + ) + from ..models.derived_variable_detail_schema import DerivedVariableDetailSchema + + d = dict(src_dict) + paths = cast(list[str], d.pop("paths", UNSET)) + + _schema = d.pop("schema", UNSET) + schema: DerivedVariableDetailSchema | Unset + if isinstance(_schema, Unset): + schema = UNSET + else: + schema = DerivedVariableDetailSchema.from_dict(_schema) + + full_variables = cast(list[str], d.pop("full_variables", UNSET)) + + _raw_sample = d.pop("raw_sample", UNSET) + raw_sample: DerivedVariableDetailRawSample | Unset + if isinstance(_raw_sample, Unset): + raw_sample = UNSET + else: + raw_sample = DerivedVariableDetailRawSample.from_dict(_raw_sample) + + is_json = d.pop("is_json", UNSET) + + derived_variable_detail = cls( + paths=paths, + schema=schema, + full_variables=full_variables, + raw_sample=raw_sample, + is_json=is_json, + ) + + derived_variable_detail.additional_properties = d + return derived_variable_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/derived_variable_detail_raw_sample.py b/python/fi/generated/openapi_client/models/derived_variable_detail_raw_sample.py new file mode 100644 index 0000000..3d5fd4a --- /dev/null +++ b/python/fi/generated/openapi_client/models/derived_variable_detail_raw_sample.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DerivedVariableDetailRawSample") + + +@_attrs_define +class DerivedVariableDetailRawSample: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + derived_variable_detail_raw_sample = cls() + + derived_variable_detail_raw_sample.additional_properties = d + return derived_variable_detail_raw_sample + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/derived_variable_detail_response.py b/python/fi/generated/openapi_client/models/derived_variable_detail_response.py new file mode 100644 index 0000000..2137454 --- /dev/null +++ b/python/fi/generated/openapi_client/models/derived_variable_detail_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.derived_variable_detail import DerivedVariableDetail + + +T = TypeVar("T", bound="DerivedVariableDetailResponse") + + +@_attrs_define +class DerivedVariableDetailResponse: + """ + Attributes: + status (bool): + result (DerivedVariableDetail): + """ + + status: bool + result: DerivedVariableDetail + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.derived_variable_detail import DerivedVariableDetail + + d = dict(src_dict) + status = d.pop("status") + + result = DerivedVariableDetail.from_dict(d.pop("result")) + + derived_variable_detail_response = cls( + status=status, + result=result, + ) + + derived_variable_detail_response.additional_properties = d + return derived_variable_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/derived_variable_detail_schema.py b/python/fi/generated/openapi_client/models/derived_variable_detail_schema.py new file mode 100644 index 0000000..ce867f2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/derived_variable_detail_schema.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DerivedVariableDetailSchema") + + +@_attrs_define +class DerivedVariableDetailSchema: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + derived_variable_detail_schema = cls() + + derived_variable_detail_schema.additional_properties = d + return derived_variable_detail_schema + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/derived_variable_extract_request.py b/python/fi/generated/openapi_client/models/derived_variable_extract_request.py new file mode 100644 index 0000000..e26640c --- /dev/null +++ b/python/fi/generated/openapi_client/models/derived_variable_extract_request.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DerivedVariableExtractRequest") + + +@_attrs_define +class DerivedVariableExtractRequest: + """ + Attributes: + version (str): + column_name (str | Unset): Default: 'output'. + output_index (int | Unset): Default: 0. + response_format_type (str | Unset): + """ + + version: str + column_name: str | Unset = "output" + output_index: int | Unset = 0 + response_format_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + version = self.version + + column_name = self.column_name + + output_index = self.output_index + + response_format_type = self.response_format_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "version": version, + } + ) + if column_name is not UNSET: + field_dict["column_name"] = column_name + if output_index is not UNSET: + field_dict["output_index"] = output_index + if response_format_type is not UNSET: + field_dict["response_format_type"] = response_format_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + version = d.pop("version") + + column_name = d.pop("column_name", UNSET) + + output_index = d.pop("output_index", UNSET) + + response_format_type = d.pop("response_format_type", UNSET) + + derived_variable_extract_request = cls( + version=version, + column_name=column_name, + output_index=output_index, + response_format_type=response_format_type, + ) + + derived_variable_extract_request.additional_properties = d + return derived_variable_extract_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/derived_variable_preview_request.py b/python/fi/generated/openapi_client/models/derived_variable_preview_request.py new file mode 100644 index 0000000..54b58fb --- /dev/null +++ b/python/fi/generated/openapi_client/models/derived_variable_preview_request.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.derived_variable_preview_request_content import ( + DerivedVariablePreviewRequestContent, + ) + + +T = TypeVar("T", bound="DerivedVariablePreviewRequest") + + +@_attrs_define +class DerivedVariablePreviewRequest: + """ + Attributes: + content (DerivedVariablePreviewRequestContent): + column_name (str | Unset): Default: 'output'. + """ + + content: DerivedVariablePreviewRequestContent + column_name: str | Unset = "output" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + content = self.content.to_dict() + + column_name = self.column_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "content": content, + } + ) + if column_name is not UNSET: + field_dict["column_name"] = column_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.derived_variable_preview_request_content import ( + DerivedVariablePreviewRequestContent, + ) + + d = dict(src_dict) + content = DerivedVariablePreviewRequestContent.from_dict(d.pop("content")) + + column_name = d.pop("column_name", UNSET) + + derived_variable_preview_request = cls( + content=content, + column_name=column_name, + ) + + derived_variable_preview_request.additional_properties = d + return derived_variable_preview_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/derived_variable_preview_request_content.py b/python/fi/generated/openapi_client/models/derived_variable_preview_request_content.py new file mode 100644 index 0000000..2cf1eb8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/derived_variable_preview_request_content.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DerivedVariablePreviewRequestContent") + + +@_attrs_define +class DerivedVariablePreviewRequestContent: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + derived_variable_preview_request_content = cls() + + derived_variable_preview_request_content.additional_properties = d + return derived_variable_preview_request_content + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/develop_dataset_message_response.py b/python/fi/generated/openapi_client/models/develop_dataset_message_response.py new file mode 100644 index 0000000..2b9941f --- /dev/null +++ b/python/fi/generated/openapi_client/models/develop_dataset_message_response.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DevelopDatasetMessageResponse") + + +@_attrs_define +class DevelopDatasetMessageResponse: + """ + Attributes: + status (bool): + result (str): + """ + + status: bool + result: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = d.pop("status") + + result = d.pop("result") + + develop_dataset_message_response = cls( + status=status, + result=result, + ) + + develop_dataset_message_response.additional_properties = d + return develop_dataset_message_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/discussion_comment_request.py b/python/fi/generated/openapi_client/models/discussion_comment_request.py new file mode 100644 index 0000000..d5a6ca1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/discussion_comment_request.py @@ -0,0 +1,121 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DiscussionCommentRequest") + + +@_attrs_define +class DiscussionCommentRequest: + """ + Attributes: + comment (str | Unset): + label_id (UUID | Unset): + target_annotator_id (UUID | Unset): + thread_id (UUID | Unset): + mentioned_user_ids (list[str] | Unset): + """ + + comment: str | Unset = UNSET + label_id: UUID | Unset = UNSET + target_annotator_id: UUID | Unset = UNSET + thread_id: UUID | Unset = UNSET + mentioned_user_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comment = self.comment + + label_id: str | Unset = UNSET + if not isinstance(self.label_id, Unset): + label_id = str(self.label_id) + + target_annotator_id: str | Unset = UNSET + if not isinstance(self.target_annotator_id, Unset): + target_annotator_id = str(self.target_annotator_id) + + thread_id: str | Unset = UNSET + if not isinstance(self.thread_id, Unset): + thread_id = str(self.thread_id) + + mentioned_user_ids: list[str] | Unset = UNSET + if not isinstance(self.mentioned_user_ids, Unset): + mentioned_user_ids = self.mentioned_user_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + if label_id is not UNSET: + field_dict["label_id"] = label_id + if target_annotator_id is not UNSET: + field_dict["target_annotator_id"] = target_annotator_id + if thread_id is not UNSET: + field_dict["thread_id"] = thread_id + if mentioned_user_ids is not UNSET: + field_dict["mentioned_user_ids"] = mentioned_user_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + comment = d.pop("comment", UNSET) + + _label_id = d.pop("label_id", UNSET) + label_id: UUID | Unset + if isinstance(_label_id, Unset): + label_id = UNSET + else: + label_id = UUID(_label_id) + + _target_annotator_id = d.pop("target_annotator_id", UNSET) + target_annotator_id: UUID | Unset + if isinstance(_target_annotator_id, Unset): + target_annotator_id = UNSET + else: + target_annotator_id = UUID(_target_annotator_id) + + _thread_id = d.pop("thread_id", UNSET) + thread_id: UUID | Unset + if isinstance(_thread_id, Unset): + thread_id = UNSET + else: + thread_id = UUID(_thread_id) + + mentioned_user_ids = cast(list[str], d.pop("mentioned_user_ids", UNSET)) + + discussion_comment_request = cls( + comment=comment, + label_id=label_id, + target_annotator_id=target_annotator_id, + thread_id=thread_id, + mentioned_user_ids=mentioned_user_ids, + ) + + discussion_comment_request.additional_properties = d + return discussion_comment_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/discussion_reaction_request.py b/python/fi/generated/openapi_client/models/discussion_reaction_request.py new file mode 100644 index 0000000..8f2da4d --- /dev/null +++ b/python/fi/generated/openapi_client/models/discussion_reaction_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DiscussionReactionRequest") + + +@_attrs_define +class DiscussionReactionRequest: + """ + Attributes: + emoji (str | Unset): + """ + + emoji: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + emoji = self.emoji + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if emoji is not UNSET: + field_dict["emoji"] = emoji + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + emoji = d.pop("emoji", UNSET) + + discussion_reaction_request = cls( + emoji=emoji, + ) + + discussion_reaction_request.additional_properties = d + return discussion_reaction_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/discussion_thread_status_request.py b/python/fi/generated/openapi_client/models/discussion_thread_status_request.py new file mode 100644 index 0000000..4d46ff0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/discussion_thread_status_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DiscussionThreadStatusRequest") + + +@_attrs_define +class DiscussionThreadStatusRequest: + """ + Attributes: + comment (str | Unset): + """ + + comment: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comment = self.comment + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comment is not UNSET: + field_dict["comment"] = comment + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + comment = d.pop("comment", UNSET) + + discussion_thread_status_request = cls( + comment=comment, + ) + + discussion_thread_status_request.additional_properties = d + return discussion_thread_status_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/duplicate_dataset_request.py b/python/fi/generated/openapi_client/models/duplicate_dataset_request.py new file mode 100644 index 0000000..6b27f51 --- /dev/null +++ b/python/fi/generated/openapi_client/models/duplicate_dataset_request.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DuplicateDatasetRequest") + + +@_attrs_define +class DuplicateDatasetRequest: + """ + Attributes: + name (str): + row_ids (list[UUID] | Unset): + selected_all_rows (bool | Unset): Default: False. + """ + + name: str + row_ids: list[UUID] | Unset = UNSET + selected_all_rows: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + row_ids: list[str] | Unset = UNSET + if not isinstance(self.row_ids, Unset): + row_ids = [] + for row_ids_item_data in self.row_ids: + row_ids_item = str(row_ids_item_data) + row_ids.append(row_ids_item) + + selected_all_rows = self.selected_all_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if row_ids is not UNSET: + field_dict["row_ids"] = row_ids + if selected_all_rows is not UNSET: + field_dict["selected_all_rows"] = selected_all_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + _row_ids = d.pop("row_ids", UNSET) + row_ids: list[UUID] | Unset = UNSET + if _row_ids is not UNSET: + row_ids = [] + for row_ids_item_data in _row_ids: + row_ids_item = UUID(row_ids_item_data) + + row_ids.append(row_ids_item) + + selected_all_rows = d.pop("selected_all_rows", UNSET) + + duplicate_dataset_request = cls( + name=name, + row_ids=row_ids, + selected_all_rows=selected_all_rows, + ) + + duplicate_dataset_request.additional_properties = d + return duplicate_dataset_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/duplicate_dataset_response.py b/python/fi/generated/openapi_client/models/duplicate_dataset_response.py new file mode 100644 index 0000000..a0d1b26 --- /dev/null +++ b/python/fi/generated/openapi_client/models/duplicate_dataset_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.duplicate_dataset_result import DuplicateDatasetResult + + +T = TypeVar("T", bound="DuplicateDatasetResponse") + + +@_attrs_define +class DuplicateDatasetResponse: + """ + Attributes: + status (bool): + result (DuplicateDatasetResult): + """ + + status: bool + result: DuplicateDatasetResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.duplicate_dataset_result import DuplicateDatasetResult + + d = dict(src_dict) + status = d.pop("status") + + result = DuplicateDatasetResult.from_dict(d.pop("result")) + + duplicate_dataset_response = cls( + status=status, + result=result, + ) + + duplicate_dataset_response.additional_properties = d + return duplicate_dataset_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/duplicate_dataset_result.py b/python/fi/generated/openapi_client/models/duplicate_dataset_result.py new file mode 100644 index 0000000..4687f57 --- /dev/null +++ b/python/fi/generated/openapi_client/models/duplicate_dataset_result.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DuplicateDatasetResult") + + +@_attrs_define +class DuplicateDatasetResult: + """ + Attributes: + message (str): + new_dataset_id (UUID): + new_dataset_name (str): + columns_copied (int): + rows_copied (int): + """ + + message: str + new_dataset_id: UUID + new_dataset_name: str + columns_copied: int + rows_copied: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + new_dataset_id = str(self.new_dataset_id) + + new_dataset_name = self.new_dataset_name + + columns_copied = self.columns_copied + + rows_copied = self.rows_copied + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "new_dataset_id": new_dataset_id, + "new_dataset_name": new_dataset_name, + "columns_copied": columns_copied, + "rows_copied": rows_copied, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + new_dataset_id = UUID(d.pop("new_dataset_id")) + + new_dataset_name = d.pop("new_dataset_name") + + columns_copied = d.pop("columns_copied") + + rows_copied = d.pop("rows_copied") + + duplicate_dataset_result = cls( + message=message, + new_dataset_id=new_dataset_id, + new_dataset_name=new_dataset_name, + columns_copied=columns_copied, + rows_copied=rows_copied, + ) + + duplicate_dataset_result.additional_properties = d + return duplicate_dataset_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/duplicate_rows_request.py b/python/fi/generated/openapi_client/models/duplicate_rows_request.py new file mode 100644 index 0000000..53bb579 --- /dev/null +++ b/python/fi/generated/openapi_client/models/duplicate_rows_request.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DuplicateRowsRequest") + + +@_attrs_define +class DuplicateRowsRequest: + """ + Attributes: + row_ids (list[UUID] | Unset): + selected_all_rows (bool | Unset): Default: False. + num_copies (int | Unset): Default: 1. + """ + + row_ids: list[UUID] | Unset = UNSET + selected_all_rows: bool | Unset = False + num_copies: int | Unset = 1 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + row_ids: list[str] | Unset = UNSET + if not isinstance(self.row_ids, Unset): + row_ids = [] + for row_ids_item_data in self.row_ids: + row_ids_item = str(row_ids_item_data) + row_ids.append(row_ids_item) + + selected_all_rows = self.selected_all_rows + + num_copies = self.num_copies + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if row_ids is not UNSET: + field_dict["row_ids"] = row_ids + if selected_all_rows is not UNSET: + field_dict["selected_all_rows"] = selected_all_rows + if num_copies is not UNSET: + field_dict["num_copies"] = num_copies + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _row_ids = d.pop("row_ids", UNSET) + row_ids: list[UUID] | Unset = UNSET + if _row_ids is not UNSET: + row_ids = [] + for row_ids_item_data in _row_ids: + row_ids_item = UUID(row_ids_item_data) + + row_ids.append(row_ids_item) + + selected_all_rows = d.pop("selected_all_rows", UNSET) + + num_copies = d.pop("num_copies", UNSET) + + duplicate_rows_request = cls( + row_ids=row_ids, + selected_all_rows=selected_all_rows, + num_copies=num_copies, + ) + + duplicate_rows_request.additional_properties = d + return duplicate_rows_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/duplicate_rows_response.py b/python/fi/generated/openapi_client/models/duplicate_rows_response.py new file mode 100644 index 0000000..2a8fee0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/duplicate_rows_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.duplicate_rows_result import DuplicateRowsResult + + +T = TypeVar("T", bound="DuplicateRowsResponse") + + +@_attrs_define +class DuplicateRowsResponse: + """ + Attributes: + status (bool): + result (DuplicateRowsResult): + """ + + status: bool + result: DuplicateRowsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.duplicate_rows_result import DuplicateRowsResult + + d = dict(src_dict) + status = d.pop("status") + + result = DuplicateRowsResult.from_dict(d.pop("result")) + + duplicate_rows_response = cls( + status=status, + result=result, + ) + + duplicate_rows_response.additional_properties = d + return duplicate_rows_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/duplicate_rows_result.py b/python/fi/generated/openapi_client/models/duplicate_rows_result.py new file mode 100644 index 0000000..b79f494 --- /dev/null +++ b/python/fi/generated/openapi_client/models/duplicate_rows_result.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DuplicateRowsResult") + + +@_attrs_define +class DuplicateRowsResult: + """ + Attributes: + message (str): + source_rows (int): + copies_per_row (int): + total_new_rows (int): + new_row_ids (list[UUID]): + """ + + message: str + source_rows: int + copies_per_row: int + total_new_rows: int + new_row_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + source_rows = self.source_rows + + copies_per_row = self.copies_per_row + + total_new_rows = self.total_new_rows + + new_row_ids = [] + for new_row_ids_item_data in self.new_row_ids: + new_row_ids_item = str(new_row_ids_item_data) + new_row_ids.append(new_row_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "source_rows": source_rows, + "copies_per_row": copies_per_row, + "total_new_rows": total_new_rows, + "new_row_ids": new_row_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + source_rows = d.pop("source_rows") + + copies_per_row = d.pop("copies_per_row") + + total_new_rows = d.pop("total_new_rows") + + new_row_ids = [] + _new_row_ids = d.pop("new_row_ids") + for new_row_ids_item_data in _new_row_ids: + new_row_ids_item = UUID(new_row_ids_item_data) + + new_row_ids.append(new_row_ids_item) + + duplicate_rows_result = cls( + message=message, + source_rows=source_rows, + copies_per_row=copies_per_row, + total_new_rows=total_new_rows, + new_row_ids=new_row_ids, + ) + + duplicate_rows_result.additional_properties = d + return duplicate_rows_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dynamic_column_create_response.py b/python/fi/generated/openapi_client/models/dynamic_column_create_response.py new file mode 100644 index 0000000..d9888c2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dynamic_column_create_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dynamic_column_create_result import DynamicColumnCreateResult + + +T = TypeVar("T", bound="DynamicColumnCreateResponse") + + +@_attrs_define +class DynamicColumnCreateResponse: + """ + Attributes: + status (bool): + result (DynamicColumnCreateResult): + """ + + status: bool + result: DynamicColumnCreateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dynamic_column_create_result import DynamicColumnCreateResult + + d = dict(src_dict) + status = d.pop("status") + + result = DynamicColumnCreateResult.from_dict(d.pop("result")) + + dynamic_column_create_response = cls( + status=status, + result=result, + ) + + dynamic_column_create_response.additional_properties = d + return dynamic_column_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dynamic_column_create_result.py b/python/fi/generated/openapi_client/models/dynamic_column_create_result.py new file mode 100644 index 0000000..59574c3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dynamic_column_create_result.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DynamicColumnCreateResult") + + +@_attrs_define +class DynamicColumnCreateResult: + """ + Attributes: + message (str): + new_column_id (UUID): + new_column_name (str): + """ + + message: str + new_column_id: UUID + new_column_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + new_column_id = str(self.new_column_id) + + new_column_name = self.new_column_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "new_column_id": new_column_id, + "new_column_name": new_column_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + new_column_id = UUID(d.pop("new_column_id")) + + new_column_name = d.pop("new_column_name") + + dynamic_column_create_result = cls( + message=message, + new_column_id=new_column_id, + new_column_name=new_column_name, + ) + + dynamic_column_create_result.additional_properties = d + return dynamic_column_create_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dynamic_column_message_response.py b/python/fi/generated/openapi_client/models/dynamic_column_message_response.py new file mode 100644 index 0000000..69b9683 --- /dev/null +++ b/python/fi/generated/openapi_client/models/dynamic_column_message_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dynamic_column_message_result import DynamicColumnMessageResult + + +T = TypeVar("T", bound="DynamicColumnMessageResponse") + + +@_attrs_define +class DynamicColumnMessageResponse: + """ + Attributes: + status (bool): + result (DynamicColumnMessageResult): + """ + + status: bool + result: DynamicColumnMessageResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dynamic_column_message_result import DynamicColumnMessageResult + + d = dict(src_dict) + status = d.pop("status") + + result = DynamicColumnMessageResult.from_dict(d.pop("result")) + + dynamic_column_message_response = cls( + status=status, + result=result, + ) + + dynamic_column_message_response.additional_properties = d + return dynamic_column_message_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/dynamic_column_message_result.py b/python/fi/generated/openapi_client/models/dynamic_column_message_result.py new file mode 100644 index 0000000..1b4bd3a --- /dev/null +++ b/python/fi/generated/openapi_client/models/dynamic_column_message_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DynamicColumnMessageResult") + + +@_attrs_define +class DynamicColumnMessageResult: + """ + Attributes: + message (str): + """ + + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + dynamic_column_message_result = cls( + message=message, + ) + + dynamic_column_message_result.additional_properties = d + return dynamic_column_message_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/edit_run_prompt_column.py b/python/fi/generated/openapi_client/models/edit_run_prompt_column.py new file mode 100644 index 0000000..06c2e92 --- /dev/null +++ b/python/fi/generated/openapi_client/models/edit_run_prompt_column.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_config import PromptConfig + + +T = TypeVar("T", bound="EditRunPromptColumn") + + +@_attrs_define +class EditRunPromptColumn: + """ + Attributes: + dataset_id (UUID): + column_id (UUID): + name (None | str | Unset): + config (PromptConfig | Unset): + """ + + dataset_id: UUID + column_id: UUID + name: None | str | Unset = UNSET + config: PromptConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + column_id = str(self.column_id) + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + "column_id": column_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if config is not UNSET: + field_dict["config"] = config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_config import PromptConfig + + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + column_id = UUID(d.pop("column_id")) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + _config = d.pop("config", UNSET) + config: PromptConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = PromptConfig.from_dict(_config) + + edit_run_prompt_column = cls( + dataset_id=dataset_id, + column_id=column_id, + name=name, + config=config, + ) + + edit_run_prompt_column.additional_properties = d + return edit_run_prompt_column + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/empty_request.py b/python/fi/generated/openapi_client/models/empty_request.py new file mode 100644 index 0000000..e442025 --- /dev/null +++ b/python/fi/generated/openapi_client/models/empty_request.py @@ -0,0 +1,25 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="EmptyRequest") + + +@_attrs_define +class EmptyRequest: + """ """ + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + empty_request = cls() + + return empty_request diff --git a/python/fi/generated/openapi_client/models/error_localizer_task_response.py b/python/fi/generated/openapi_client/models/error_localizer_task_response.py new file mode 100644 index 0000000..3dcee2a --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_localizer_task_response.py @@ -0,0 +1,410 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.error_localizer_task_response_error_analysis import ( + ErrorLocalizerTaskResponseErrorAnalysis, + ) + from ..models.error_localizer_task_response_eval_result import ( + ErrorLocalizerTaskResponseEvalResult, + ) + from ..models.error_localizer_task_response_input_data import ( + ErrorLocalizerTaskResponseInputData, + ) + from ..models.error_localizer_task_response_input_keys import ( + ErrorLocalizerTaskResponseInputKeys, + ) + from ..models.error_localizer_task_response_input_types import ( + ErrorLocalizerTaskResponseInputTypes, + ) + + +T = TypeVar("T", bound="ErrorLocalizerTaskResponse") + + +@_attrs_define +class ErrorLocalizerTaskResponse: + """ + Attributes: + task_id (UUID | Unset): + eval_config_id (None | str | Unset): + status (str | Unset): + eval_result (ErrorLocalizerTaskResponseEvalResult | Unset): + eval_explanation (None | str | Unset): + input_data (ErrorLocalizerTaskResponseInputData | Unset): + input_keys (ErrorLocalizerTaskResponseInputKeys | Unset): + input_types (ErrorLocalizerTaskResponseInputTypes | Unset): + rule_prompt (None | str | Unset): + error_analysis (ErrorLocalizerTaskResponseErrorAnalysis | Unset): + selected_input_key (None | str | Unset): + error_message (None | str | Unset): + created_at (datetime.datetime | None | Unset): + updated_at (datetime.datetime | None | Unset): + eval_template_name (None | str | Unset): + eval_template_id (None | Unset | UUID): + """ + + task_id: UUID | Unset = UNSET + eval_config_id: None | str | Unset = UNSET + status: str | Unset = UNSET + eval_result: ErrorLocalizerTaskResponseEvalResult | Unset = UNSET + eval_explanation: None | str | Unset = UNSET + input_data: ErrorLocalizerTaskResponseInputData | Unset = UNSET + input_keys: ErrorLocalizerTaskResponseInputKeys | Unset = UNSET + input_types: ErrorLocalizerTaskResponseInputTypes | Unset = UNSET + rule_prompt: None | str | Unset = UNSET + error_analysis: ErrorLocalizerTaskResponseErrorAnalysis | Unset = UNSET + selected_input_key: None | str | Unset = UNSET + error_message: None | str | Unset = UNSET + created_at: datetime.datetime | None | Unset = UNSET + updated_at: datetime.datetime | None | Unset = UNSET + eval_template_name: None | str | Unset = UNSET + eval_template_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + task_id: str | Unset = UNSET + if not isinstance(self.task_id, Unset): + task_id = str(self.task_id) + + eval_config_id: None | str | Unset + if isinstance(self.eval_config_id, Unset): + eval_config_id = UNSET + else: + eval_config_id = self.eval_config_id + + status = self.status + + eval_result: dict[str, Any] | Unset = UNSET + if not isinstance(self.eval_result, Unset): + eval_result = self.eval_result.to_dict() + + eval_explanation: None | str | Unset + if isinstance(self.eval_explanation, Unset): + eval_explanation = UNSET + else: + eval_explanation = self.eval_explanation + + input_data: dict[str, Any] | Unset = UNSET + if not isinstance(self.input_data, Unset): + input_data = self.input_data.to_dict() + + input_keys: dict[str, Any] | Unset = UNSET + if not isinstance(self.input_keys, Unset): + input_keys = self.input_keys.to_dict() + + input_types: dict[str, Any] | Unset = UNSET + if not isinstance(self.input_types, Unset): + input_types = self.input_types.to_dict() + + rule_prompt: None | str | Unset + if isinstance(self.rule_prompt, Unset): + rule_prompt = UNSET + else: + rule_prompt = self.rule_prompt + + error_analysis: dict[str, Any] | Unset = UNSET + if not isinstance(self.error_analysis, Unset): + error_analysis = self.error_analysis.to_dict() + + selected_input_key: None | str | Unset + if isinstance(self.selected_input_key, Unset): + selected_input_key = UNSET + else: + selected_input_key = self.selected_input_key + + error_message: None | str | Unset + if isinstance(self.error_message, Unset): + error_message = UNSET + else: + error_message = self.error_message + + created_at: None | str | Unset + if isinstance(self.created_at, Unset): + created_at = UNSET + elif isinstance(self.created_at, datetime.datetime): + created_at = self.created_at.isoformat() + else: + created_at = self.created_at + + updated_at: None | str | Unset + if isinstance(self.updated_at, Unset): + updated_at = UNSET + elif isinstance(self.updated_at, datetime.datetime): + updated_at = self.updated_at.isoformat() + else: + updated_at = self.updated_at + + eval_template_name: None | str | Unset + if isinstance(self.eval_template_name, Unset): + eval_template_name = UNSET + else: + eval_template_name = self.eval_template_name + + eval_template_id: None | str | Unset + if isinstance(self.eval_template_id, Unset): + eval_template_id = UNSET + elif isinstance(self.eval_template_id, UUID): + eval_template_id = str(self.eval_template_id) + else: + eval_template_id = self.eval_template_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if task_id is not UNSET: + field_dict["task_id"] = task_id + if eval_config_id is not UNSET: + field_dict["eval_config_id"] = eval_config_id + if status is not UNSET: + field_dict["status"] = status + if eval_result is not UNSET: + field_dict["eval_result"] = eval_result + if eval_explanation is not UNSET: + field_dict["eval_explanation"] = eval_explanation + if input_data is not UNSET: + field_dict["input_data"] = input_data + if input_keys is not UNSET: + field_dict["input_keys"] = input_keys + if input_types is not UNSET: + field_dict["input_types"] = input_types + if rule_prompt is not UNSET: + field_dict["rule_prompt"] = rule_prompt + if error_analysis is not UNSET: + field_dict["error_analysis"] = error_analysis + if selected_input_key is not UNSET: + field_dict["selected_input_key"] = selected_input_key + if error_message is not UNSET: + field_dict["error_message"] = error_message + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if eval_template_name is not UNSET: + field_dict["eval_template_name"] = eval_template_name + if eval_template_id is not UNSET: + field_dict["eval_template_id"] = eval_template_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.error_localizer_task_response_error_analysis import ( + ErrorLocalizerTaskResponseErrorAnalysis, + ) + from ..models.error_localizer_task_response_eval_result import ( + ErrorLocalizerTaskResponseEvalResult, + ) + from ..models.error_localizer_task_response_input_data import ( + ErrorLocalizerTaskResponseInputData, + ) + from ..models.error_localizer_task_response_input_keys import ( + ErrorLocalizerTaskResponseInputKeys, + ) + from ..models.error_localizer_task_response_input_types import ( + ErrorLocalizerTaskResponseInputTypes, + ) + + d = dict(src_dict) + _task_id = d.pop("task_id", UNSET) + task_id: UUID | Unset + if isinstance(_task_id, Unset): + task_id = UNSET + else: + task_id = UUID(_task_id) + + def _parse_eval_config_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_config_id = _parse_eval_config_id(d.pop("eval_config_id", UNSET)) + + status = d.pop("status", UNSET) + + _eval_result = d.pop("eval_result", UNSET) + eval_result: ErrorLocalizerTaskResponseEvalResult | Unset + if isinstance(_eval_result, Unset): + eval_result = UNSET + else: + eval_result = ErrorLocalizerTaskResponseEvalResult.from_dict(_eval_result) + + def _parse_eval_explanation(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_explanation = _parse_eval_explanation(d.pop("eval_explanation", UNSET)) + + _input_data = d.pop("input_data", UNSET) + input_data: ErrorLocalizerTaskResponseInputData | Unset + if isinstance(_input_data, Unset): + input_data = UNSET + else: + input_data = ErrorLocalizerTaskResponseInputData.from_dict(_input_data) + + _input_keys = d.pop("input_keys", UNSET) + input_keys: ErrorLocalizerTaskResponseInputKeys | Unset + if isinstance(_input_keys, Unset): + input_keys = UNSET + else: + input_keys = ErrorLocalizerTaskResponseInputKeys.from_dict(_input_keys) + + _input_types = d.pop("input_types", UNSET) + input_types: ErrorLocalizerTaskResponseInputTypes | Unset + if isinstance(_input_types, Unset): + input_types = UNSET + else: + input_types = ErrorLocalizerTaskResponseInputTypes.from_dict(_input_types) + + def _parse_rule_prompt(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + rule_prompt = _parse_rule_prompt(d.pop("rule_prompt", UNSET)) + + _error_analysis = d.pop("error_analysis", UNSET) + error_analysis: ErrorLocalizerTaskResponseErrorAnalysis | Unset + if isinstance(_error_analysis, Unset): + error_analysis = UNSET + else: + error_analysis = ErrorLocalizerTaskResponseErrorAnalysis.from_dict( + _error_analysis + ) + + def _parse_selected_input_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + selected_input_key = _parse_selected_input_key( + d.pop("selected_input_key", UNSET) + ) + + def _parse_error_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error_message = _parse_error_message(d.pop("error_message", UNSET)) + + def _parse_created_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + created_at_type_0 = isoparse(data) + + return created_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + created_at = _parse_created_at(d.pop("created_at", UNSET)) + + def _parse_updated_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + updated_at_type_0 = isoparse(data) + + return updated_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + updated_at = _parse_updated_at(d.pop("updated_at", UNSET)) + + def _parse_eval_template_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_template_name = _parse_eval_template_name( + d.pop("eval_template_name", UNSET) + ) + + def _parse_eval_template_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + eval_template_id_type_0 = UUID(data) + + return eval_template_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + eval_template_id = _parse_eval_template_id(d.pop("eval_template_id", UNSET)) + + error_localizer_task_response = cls( + task_id=task_id, + eval_config_id=eval_config_id, + status=status, + eval_result=eval_result, + eval_explanation=eval_explanation, + input_data=input_data, + input_keys=input_keys, + input_types=input_types, + rule_prompt=rule_prompt, + error_analysis=error_analysis, + selected_input_key=selected_input_key, + error_message=error_message, + created_at=created_at, + updated_at=updated_at, + eval_template_name=eval_template_name, + eval_template_id=eval_template_id, + ) + + error_localizer_task_response.additional_properties = d + return error_localizer_task_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_localizer_task_response_error_analysis.py b/python/fi/generated/openapi_client/models/error_localizer_task_response_error_analysis.py new file mode 100644 index 0000000..6ee5204 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_localizer_task_response_error_analysis.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ErrorLocalizerTaskResponseErrorAnalysis") + + +@_attrs_define +class ErrorLocalizerTaskResponseErrorAnalysis: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_localizer_task_response_error_analysis = cls() + + error_localizer_task_response_error_analysis.additional_properties = d + return error_localizer_task_response_error_analysis + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_localizer_task_response_eval_result.py b/python/fi/generated/openapi_client/models/error_localizer_task_response_eval_result.py new file mode 100644 index 0000000..ee38fdb --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_localizer_task_response_eval_result.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ErrorLocalizerTaskResponseEvalResult") + + +@_attrs_define +class ErrorLocalizerTaskResponseEvalResult: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_localizer_task_response_eval_result = cls() + + error_localizer_task_response_eval_result.additional_properties = d + return error_localizer_task_response_eval_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_localizer_task_response_input_data.py b/python/fi/generated/openapi_client/models/error_localizer_task_response_input_data.py new file mode 100644 index 0000000..c8d16f5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_localizer_task_response_input_data.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ErrorLocalizerTaskResponseInputData") + + +@_attrs_define +class ErrorLocalizerTaskResponseInputData: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_localizer_task_response_input_data = cls() + + error_localizer_task_response_input_data.additional_properties = d + return error_localizer_task_response_input_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_localizer_task_response_input_keys.py b/python/fi/generated/openapi_client/models/error_localizer_task_response_input_keys.py new file mode 100644 index 0000000..b269953 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_localizer_task_response_input_keys.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ErrorLocalizerTaskResponseInputKeys") + + +@_attrs_define +class ErrorLocalizerTaskResponseInputKeys: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_localizer_task_response_input_keys = cls() + + error_localizer_task_response_input_keys.additional_properties = d + return error_localizer_task_response_input_keys + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_localizer_task_response_input_types.py b/python/fi/generated/openapi_client/models/error_localizer_task_response_input_types.py new file mode 100644 index 0000000..251ef77 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_localizer_task_response_input_types.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ErrorLocalizerTaskResponseInputTypes") + + +@_attrs_define +class ErrorLocalizerTaskResponseInputTypes: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_localizer_task_response_input_types = cls() + + error_localizer_task_response_input_types.additional_properties = d + return error_localizer_task_response_input_types + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_name.py b/python/fi/generated/openapi_client/models/error_name.py new file mode 100644 index 0000000..1495c02 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_name.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ErrorName") + + +@_attrs_define +class ErrorName: + """ + Attributes: + name (str): + type_ (str): + """ + + name: str + type_: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "type": type_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + type_ = d.pop("type") + + error_name = cls( + name=name, + type_=type_, + ) + + error_name.additional_properties = d + return error_name + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_response.py b/python/fi/generated/openapi_client/models/error_response.py new file mode 100644 index 0000000..55dbc50 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_response.py @@ -0,0 +1,220 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.error_response_type import ErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.error_response_details import ErrorResponseDetails + + +T = TypeVar("T", bound="ErrorResponse") + + +@_attrs_define +class ErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (ErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: ErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.error_response_details import ErrorResponseDetails + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ErrorResponseDetails.from_dict(_details) + + error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + error_response.additional_properties = d + return error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_response_details.py b/python/fi/generated/openapi_client/models/error_response_details.py new file mode 100644 index 0000000..0c2c6e8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ErrorResponseDetails") + + +@_attrs_define +class ErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + error_response_details.additional_properties = additional_properties + return error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/error_response_type.py b/python/fi/generated/openapi_client/models/error_response_type.py new file mode 100644 index 0000000..c4ebae4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_config_definition.py b/python/fi/generated/openapi_client/models/eval_config_definition.py new file mode 100644 index 0000000..69ac428 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_definition.py @@ -0,0 +1,233 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_definition_config import EvalConfigDefinitionConfig + from ..models.eval_config_definition_filters_item import ( + EvalConfigDefinitionFiltersItem, + ) + from ..models.eval_config_definition_mapping import EvalConfigDefinitionMapping + + +T = TypeVar("T", bound="EvalConfigDefinition") + + +@_attrs_define +class EvalConfigDefinition: + """ + Attributes: + template_id (UUID): UUID of the evaluation template to use. + name (str | Unset): Name for this evaluation configuration. Defaults to 'Eval-' if omitted. + config (EvalConfigDefinitionConfig | Unset): Template-specific configuration parameters. + mapping (EvalConfigDefinitionMapping | Unset): Maps test execution data fields to the evaluation template's + expected inputs. + filters (list[EvalConfigDefinitionFiltersItem] | Unset): Canonical filter list to restrict which test results + are evaluated. + error_localizer (bool | Unset): Enables granular error localization on evaluation failures. Default: False. + model (None | str | Unset): Model to use for running this evaluation. + kb_id (None | Unset | UUID): Knowledge base file to use for this evaluation. + eval_group (None | Unset | UUID): Eval group that created this evaluation config. + """ + + template_id: UUID + name: str | Unset = UNSET + config: EvalConfigDefinitionConfig | Unset = UNSET + mapping: EvalConfigDefinitionMapping | Unset = UNSET + filters: list[EvalConfigDefinitionFiltersItem] | Unset = UNSET + error_localizer: bool | Unset = False + model: None | str | Unset = UNSET + kb_id: None | Unset | UUID = UNSET + eval_group: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_id = str(self.template_id) + + name = self.name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.mapping, Unset): + mapping = self.mapping.to_dict() + + filters: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = [] + for filters_item_data in self.filters: + filters_item = filters_item_data.to_dict() + filters.append(filters_item) + + error_localizer = self.error_localizer + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + kb_id: None | str | Unset + if isinstance(self.kb_id, Unset): + kb_id = UNSET + elif isinstance(self.kb_id, UUID): + kb_id = str(self.kb_id) + else: + kb_id = self.kb_id + + eval_group: None | str | Unset + if isinstance(self.eval_group, Unset): + eval_group = UNSET + elif isinstance(self.eval_group, UUID): + eval_group = str(self.eval_group) + else: + eval_group = self.eval_group + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_id": template_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if config is not UNSET: + field_dict["config"] = config + if mapping is not UNSET: + field_dict["mapping"] = mapping + if filters is not UNSET: + field_dict["filters"] = filters + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if model is not UNSET: + field_dict["model"] = model + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if eval_group is not UNSET: + field_dict["eval_group"] = eval_group + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_definition_config import EvalConfigDefinitionConfig + from ..models.eval_config_definition_filters_item import ( + EvalConfigDefinitionFiltersItem, + ) + from ..models.eval_config_definition_mapping import EvalConfigDefinitionMapping + + d = dict(src_dict) + template_id = UUID(d.pop("template_id")) + + name = d.pop("name", UNSET) + + _config = d.pop("config", UNSET) + config: EvalConfigDefinitionConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = EvalConfigDefinitionConfig.from_dict(_config) + + _mapping = d.pop("mapping", UNSET) + mapping: EvalConfigDefinitionMapping | Unset + if isinstance(_mapping, Unset): + mapping = UNSET + else: + mapping = EvalConfigDefinitionMapping.from_dict(_mapping) + + _filters = d.pop("filters", UNSET) + filters: list[EvalConfigDefinitionFiltersItem] | Unset = UNSET + if _filters is not UNSET: + filters = [] + for filters_item_data in _filters: + filters_item = EvalConfigDefinitionFiltersItem.from_dict( + filters_item_data + ) + + filters.append(filters_item) + + error_localizer = d.pop("error_localizer", UNSET) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + def _parse_kb_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + kb_id_type_0 = UUID(data) + + return kb_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + kb_id = _parse_kb_id(d.pop("kb_id", UNSET)) + + def _parse_eval_group(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + eval_group_type_0 = UUID(data) + + return eval_group_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + eval_group = _parse_eval_group(d.pop("eval_group", UNSET)) + + eval_config_definition = cls( + template_id=template_id, + name=name, + config=config, + mapping=mapping, + filters=filters, + error_localizer=error_localizer, + model=model, + kb_id=kb_id, + eval_group=eval_group, + ) + + eval_config_definition.additional_properties = d + return eval_config_definition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_definition_config.py b/python/fi/generated/openapi_client/models/eval_config_definition_config.py new file mode 100644 index 0000000..a3ab273 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_definition_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigDefinitionConfig") + + +@_attrs_define +class EvalConfigDefinitionConfig: + """Template-specific configuration parameters.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_definition_config = cls() + + eval_config_definition_config.additional_properties = d + return eval_config_definition_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_definition_filters_item.py b/python/fi/generated/openapi_client/models/eval_config_definition_filters_item.py new file mode 100644 index 0000000..e748173 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_definition_filters_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_definition_filters_item_filter_config import ( + EvalConfigDefinitionFiltersItemFilterConfig, + ) + + +T = TypeVar("T", bound="EvalConfigDefinitionFiltersItem") + + +@_attrs_define +class EvalConfigDefinitionFiltersItem: + """ + Attributes: + column_id (str): Column or attribute id to filter on. + filter_config (EvalConfigDefinitionFiltersItemFilterConfig): + display_name (str | Unset): Optional UI label for chips and saved views. + source (str | Unset): Optional source surface for mixed-source filters, for example traces, datasets, or + simulation. + output_type (str | Unset): Optional metric output type metadata used by eval and annotation filters. + """ + + column_id: str + filter_config: EvalConfigDefinitionFiltersItemFilterConfig + display_name: str | Unset = UNSET + source: str | Unset = UNSET + output_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + filter_config = self.filter_config.to_dict() + + display_name = self.display_name + + source = self.source + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + "filter_config": filter_config, + } + ) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if source is not UNSET: + field_dict["source"] = source + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_definition_filters_item_filter_config import ( + EvalConfigDefinitionFiltersItemFilterConfig, + ) + + d = dict(src_dict) + column_id = d.pop("column_id") + + filter_config = EvalConfigDefinitionFiltersItemFilterConfig.from_dict( + d.pop("filter_config") + ) + + display_name = d.pop("display_name", UNSET) + + source = d.pop("source", UNSET) + + output_type = d.pop("output_type", UNSET) + + eval_config_definition_filters_item = cls( + column_id=column_id, + filter_config=filter_config, + display_name=display_name, + source=source, + output_type=output_type, + ) + + return eval_config_definition_filters_item diff --git a/python/fi/generated/openapi_client/models/eval_config_definition_filters_item_filter_config.py b/python/fi/generated/openapi_client/models/eval_config_definition_filters_item_filter_config.py new file mode 100644 index 0000000..2947910 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_definition_filters_item_filter_config.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EvalConfigDefinitionFiltersItemFilterConfig") + + +@_attrs_define +class EvalConfigDefinitionFiltersItemFilterConfig: + """ + Attributes: + filter_type (str): Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, + annotator, or array. + filter_op (str): Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, + not_in, between, not_between, is_null, or is_not_null. + filter_value (Any | Unset): Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + col_type (str | Unset): Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + """ + + filter_type: str + filter_op: str + filter_value: Any | Unset = UNSET + col_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + filter_type = self.filter_type + + filter_op = self.filter_op + + filter_value = self.filter_value + + col_type = self.col_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "filter_type": filter_type, + "filter_op": filter_op, + } + ) + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + if col_type is not UNSET: + field_dict["col_type"] = col_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + filter_type = d.pop("filter_type") + + filter_op = d.pop("filter_op") + + filter_value = d.pop("filter_value", UNSET) + + col_type = d.pop("col_type", UNSET) + + eval_config_definition_filters_item_filter_config = cls( + filter_type=filter_type, + filter_op=filter_op, + filter_value=filter_value, + col_type=col_type, + ) + + return eval_config_definition_filters_item_filter_config diff --git a/python/fi/generated/openapi_client/models/eval_config_definition_mapping.py b/python/fi/generated/openapi_client/models/eval_config_definition_mapping.py new file mode 100644 index 0000000..2018be1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_definition_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigDefinitionMapping") + + +@_attrs_define +class EvalConfigDefinitionMapping: + """Maps test execution data fields to the evaluation template's expected inputs.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_definition_mapping = cls() + + eval_config_definition_mapping.additional_properties = d + return eval_config_definition_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_response.py b/python/fi/generated/openapi_client/models/eval_config_response.py new file mode 100644 index 0000000..1e0fd1b --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_response.py @@ -0,0 +1,215 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.eval_config_response_model import EvalConfigResponseModel +from ..models.eval_config_response_status import EvalConfigResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_response_config import EvalConfigResponseConfig + from ..models.eval_config_response_filters import EvalConfigResponseFilters + from ..models.eval_config_response_mapping import EvalConfigResponseMapping + + +T = TypeVar("T", bound="EvalConfigResponse") + + +@_attrs_define +class EvalConfigResponse: + """ + Attributes: + id (UUID | Unset): + name (None | str | Unset): + config (EvalConfigResponseConfig | Unset): + mapping (EvalConfigResponseMapping | Unset): + filters (EvalConfigResponseFilters | Unset): + error_localizer (bool | Unset): + model (EvalConfigResponseModel | Unset): + status (EvalConfigResponseStatus | Unset): + eval_group (str | Unset): + template_id (UUID | Unset): + """ + + id: UUID | Unset = UNSET + name: None | str | Unset = UNSET + config: EvalConfigResponseConfig | Unset = UNSET + mapping: EvalConfigResponseMapping | Unset = UNSET + filters: EvalConfigResponseFilters | Unset = UNSET + error_localizer: bool | Unset = UNSET + model: EvalConfigResponseModel | Unset = UNSET + status: EvalConfigResponseStatus | Unset = UNSET + eval_group: str | Unset = UNSET + template_id: UUID | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.mapping, Unset): + mapping = self.mapping.to_dict() + + filters: dict[str, Any] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + + error_localizer = self.error_localizer + + model: str | Unset = UNSET + if not isinstance(self.model, Unset): + model = self.model.value + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + eval_group = self.eval_group + + template_id: str | Unset = UNSET + if not isinstance(self.template_id, Unset): + template_id = str(self.template_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if config is not UNSET: + field_dict["config"] = config + if mapping is not UNSET: + field_dict["mapping"] = mapping + if filters is not UNSET: + field_dict["filters"] = filters + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if model is not UNSET: + field_dict["model"] = model + if status is not UNSET: + field_dict["status"] = status + if eval_group is not UNSET: + field_dict["eval_group"] = eval_group + if template_id is not UNSET: + field_dict["template_id"] = template_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_response_config import EvalConfigResponseConfig + from ..models.eval_config_response_filters import EvalConfigResponseFilters + from ..models.eval_config_response_mapping import EvalConfigResponseMapping + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + _config = d.pop("config", UNSET) + config: EvalConfigResponseConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = EvalConfigResponseConfig.from_dict(_config) + + _mapping = d.pop("mapping", UNSET) + mapping: EvalConfigResponseMapping | Unset + if isinstance(_mapping, Unset): + mapping = UNSET + else: + mapping = EvalConfigResponseMapping.from_dict(_mapping) + + _filters = d.pop("filters", UNSET) + filters: EvalConfigResponseFilters | Unset + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = EvalConfigResponseFilters.from_dict(_filters) + + error_localizer = d.pop("error_localizer", UNSET) + + _model = d.pop("model", UNSET) + model: EvalConfigResponseModel | Unset + if isinstance(_model, Unset): + model = UNSET + else: + model = EvalConfigResponseModel(_model) + + _status = d.pop("status", UNSET) + status: EvalConfigResponseStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = EvalConfigResponseStatus(_status) + + eval_group = d.pop("eval_group", UNSET) + + _template_id = d.pop("template_id", UNSET) + template_id: UUID | Unset + if isinstance(_template_id, Unset): + template_id = UNSET + else: + template_id = UUID(_template_id) + + eval_config_response = cls( + id=id, + name=name, + config=config, + mapping=mapping, + filters=filters, + error_localizer=error_localizer, + model=model, + status=status, + eval_group=eval_group, + template_id=template_id, + ) + + eval_config_response.additional_properties = d + return eval_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_response_config.py b/python/fi/generated/openapi_client/models/eval_config_response_config.py new file mode 100644 index 0000000..d797032 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_response_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigResponseConfig") + + +@_attrs_define +class EvalConfigResponseConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_response_config = cls() + + eval_config_response_config.additional_properties = d + return eval_config_response_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_response_filters.py b/python/fi/generated/openapi_client/models/eval_config_response_filters.py new file mode 100644 index 0000000..4e0ab8e --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_response_filters.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigResponseFilters") + + +@_attrs_define +class EvalConfigResponseFilters: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_response_filters = cls() + + eval_config_response_filters.additional_properties = d + return eval_config_response_filters + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_response_mapping.py b/python/fi/generated/openapi_client/models/eval_config_response_mapping.py new file mode 100644 index 0000000..e0ca58b --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_response_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigResponseMapping") + + +@_attrs_define +class EvalConfigResponseMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_response_mapping = cls() + + eval_config_response_mapping.additional_properties = d + return eval_config_response_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_response_model.py b/python/fi/generated/openapi_client/models/eval_config_response_model.py new file mode 100644 index 0000000..1fefad0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_response_model.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class EvalConfigResponseModel(str, Enum): + PROTECT = "protect" + PROTECT_FLASH = "protect_flash" + TURING_FLASH = "turing_flash" + TURING_LARGE = "turing_large" + TURING_SMALL = "turing_small" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_config_response_status.py b/python/fi/generated/openapi_client/models/eval_config_response_status.py new file mode 100644 index 0000000..7885009 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_response_status.py @@ -0,0 +1,24 @@ +from enum import Enum + + +class EvalConfigResponseStatus(str, Enum): + CANCELLED = "Cancelled" + COMPLETED = "Completed" + DELETING = "Deleting" + EDITING = "Editing" + ERROR = "Error" + EXPERIMENTEVALUATION = "ExperimentEvaluation" + FAILED = "Failed" + INACTIVE = "Inactive" + NOTSTARTED = "NotStarted" + OPTIMIZATIONEVALUATION = "OptimizationEvaluation" + PARTIALCOMPLETED = "PartialCompleted" + PARTIALEXTRACTED = "PartialExtracted" + PARTIALRUN = "PartialRun" + PROCESSING = "Processing" + QUEUED = "Queued" + RUNNING = "Running" + UPLOADING = "Uploading" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_config_structure.py b/python/fi/generated/openapi_client/models/eval_config_structure.py new file mode 100644 index 0000000..fd0a40b --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure.py @@ -0,0 +1,409 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_structure_config import EvalConfigStructureConfig + from ..models.eval_config_structure_config_params_desc import ( + EvalConfigStructureConfigParamsDesc, + ) + from ..models.eval_config_structure_config_params_option import ( + EvalConfigStructureConfigParamsOption, + ) + from ..models.eval_config_structure_eval_tags import EvalConfigStructureEvalTags + from ..models.eval_config_structure_function_params_schema import ( + EvalConfigStructureFunctionParamsSchema, + ) + from ..models.eval_config_structure_mapping import EvalConfigStructureMapping + from ..models.eval_config_structure_models import EvalConfigStructureModels + from ..models.eval_config_structure_output import EvalConfigStructureOutput + from ..models.eval_config_structure_params import EvalConfigStructureParams + + +T = TypeVar("T", bound="EvalConfigStructure") + + +@_attrs_define +class EvalConfigStructure: + """ + Attributes: + required_keys (list[str]): + optional_keys (list[str]): + variable_keys (list[str]): + id (UUID | Unset): + template_id (UUID | Unset): + name (str | Unset): + reason_column (bool | Unset): + eval_tags (EvalConfigStructureEvalTags | Unset): + description (str | Unset): + run_prompt_column (bool | Unset): + template_name (str | Unset): + mapping (EvalConfigStructureMapping | Unset): + config (EvalConfigStructureConfig | Unset): + params (EvalConfigStructureParams | Unset): + function_params_schema (EvalConfigStructureFunctionParamsSchema | Unset): + models (EvalConfigStructureModels | Unset): + selected_model (None | str | Unset): + error_localizer (bool | Unset): + kb_id (None | Unset | UUID): + output (EvalConfigStructureOutput | Unset): + config_params_desc (EvalConfigStructureConfigParamsDesc | Unset): + config_params_option (EvalConfigStructureConfigParamsOption | Unset): + api_key_available (bool | Unset): + """ + + required_keys: list[str] + optional_keys: list[str] + variable_keys: list[str] + id: UUID | Unset = UNSET + template_id: UUID | Unset = UNSET + name: str | Unset = UNSET + reason_column: bool | Unset = UNSET + eval_tags: EvalConfigStructureEvalTags | Unset = UNSET + description: str | Unset = UNSET + run_prompt_column: bool | Unset = UNSET + template_name: str | Unset = UNSET + mapping: EvalConfigStructureMapping | Unset = UNSET + config: EvalConfigStructureConfig | Unset = UNSET + params: EvalConfigStructureParams | Unset = UNSET + function_params_schema: EvalConfigStructureFunctionParamsSchema | Unset = UNSET + models: EvalConfigStructureModels | Unset = UNSET + selected_model: None | str | Unset = UNSET + error_localizer: bool | Unset = UNSET + kb_id: None | Unset | UUID = UNSET + output: EvalConfigStructureOutput | Unset = UNSET + config_params_desc: EvalConfigStructureConfigParamsDesc | Unset = UNSET + config_params_option: EvalConfigStructureConfigParamsOption | Unset = UNSET + api_key_available: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + required_keys = self.required_keys + + optional_keys = self.optional_keys + + variable_keys = self.variable_keys + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + template_id: str | Unset = UNSET + if not isinstance(self.template_id, Unset): + template_id = str(self.template_id) + + name = self.name + + reason_column = self.reason_column + + eval_tags: dict[str, Any] | Unset = UNSET + if not isinstance(self.eval_tags, Unset): + eval_tags = self.eval_tags.to_dict() + + description = self.description + + run_prompt_column = self.run_prompt_column + + template_name = self.template_name + + mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.mapping, Unset): + mapping = self.mapping.to_dict() + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + params: dict[str, Any] | Unset = UNSET + if not isinstance(self.params, Unset): + params = self.params.to_dict() + + function_params_schema: dict[str, Any] | Unset = UNSET + if not isinstance(self.function_params_schema, Unset): + function_params_schema = self.function_params_schema.to_dict() + + models: dict[str, Any] | Unset = UNSET + if not isinstance(self.models, Unset): + models = self.models.to_dict() + + selected_model: None | str | Unset + if isinstance(self.selected_model, Unset): + selected_model = UNSET + else: + selected_model = self.selected_model + + error_localizer = self.error_localizer + + kb_id: None | str | Unset + if isinstance(self.kb_id, Unset): + kb_id = UNSET + elif isinstance(self.kb_id, UUID): + kb_id = str(self.kb_id) + else: + kb_id = self.kb_id + + output: dict[str, Any] | Unset = UNSET + if not isinstance(self.output, Unset): + output = self.output.to_dict() + + config_params_desc: dict[str, Any] | Unset = UNSET + if not isinstance(self.config_params_desc, Unset): + config_params_desc = self.config_params_desc.to_dict() + + config_params_option: dict[str, Any] | Unset = UNSET + if not isinstance(self.config_params_option, Unset): + config_params_option = self.config_params_option.to_dict() + + api_key_available = self.api_key_available + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "required_keys": required_keys, + "optional_keys": optional_keys, + "variable_keys": variable_keys, + } + ) + if id is not UNSET: + field_dict["id"] = id + if template_id is not UNSET: + field_dict["template_id"] = template_id + if name is not UNSET: + field_dict["name"] = name + if reason_column is not UNSET: + field_dict["reason_column"] = reason_column + if eval_tags is not UNSET: + field_dict["eval_tags"] = eval_tags + if description is not UNSET: + field_dict["description"] = description + if run_prompt_column is not UNSET: + field_dict["run_prompt_column"] = run_prompt_column + if template_name is not UNSET: + field_dict["template_name"] = template_name + if mapping is not UNSET: + field_dict["mapping"] = mapping + if config is not UNSET: + field_dict["config"] = config + if params is not UNSET: + field_dict["params"] = params + if function_params_schema is not UNSET: + field_dict["function_params_schema"] = function_params_schema + if models is not UNSET: + field_dict["models"] = models + if selected_model is not UNSET: + field_dict["selected_model"] = selected_model + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if output is not UNSET: + field_dict["output"] = output + if config_params_desc is not UNSET: + field_dict["config_params_desc"] = config_params_desc + if config_params_option is not UNSET: + field_dict["config_params_option"] = config_params_option + if api_key_available is not UNSET: + field_dict["api_key_available"] = api_key_available + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_structure_config import EvalConfigStructureConfig + from ..models.eval_config_structure_config_params_desc import ( + EvalConfigStructureConfigParamsDesc, + ) + from ..models.eval_config_structure_config_params_option import ( + EvalConfigStructureConfigParamsOption, + ) + from ..models.eval_config_structure_eval_tags import EvalConfigStructureEvalTags + from ..models.eval_config_structure_function_params_schema import ( + EvalConfigStructureFunctionParamsSchema, + ) + from ..models.eval_config_structure_mapping import EvalConfigStructureMapping + from ..models.eval_config_structure_models import EvalConfigStructureModels + from ..models.eval_config_structure_output import EvalConfigStructureOutput + from ..models.eval_config_structure_params import EvalConfigStructureParams + + d = dict(src_dict) + required_keys = cast(list[str], d.pop("required_keys")) + + optional_keys = cast(list[str], d.pop("optional_keys")) + + variable_keys = cast(list[str], d.pop("variable_keys")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _template_id = d.pop("template_id", UNSET) + template_id: UUID | Unset + if isinstance(_template_id, Unset): + template_id = UNSET + else: + template_id = UUID(_template_id) + + name = d.pop("name", UNSET) + + reason_column = d.pop("reason_column", UNSET) + + _eval_tags = d.pop("eval_tags", UNSET) + eval_tags: EvalConfigStructureEvalTags | Unset + if isinstance(_eval_tags, Unset): + eval_tags = UNSET + else: + eval_tags = EvalConfigStructureEvalTags.from_dict(_eval_tags) + + description = d.pop("description", UNSET) + + run_prompt_column = d.pop("run_prompt_column", UNSET) + + template_name = d.pop("template_name", UNSET) + + _mapping = d.pop("mapping", UNSET) + mapping: EvalConfigStructureMapping | Unset + if isinstance(_mapping, Unset): + mapping = UNSET + else: + mapping = EvalConfigStructureMapping.from_dict(_mapping) + + _config = d.pop("config", UNSET) + config: EvalConfigStructureConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = EvalConfigStructureConfig.from_dict(_config) + + _params = d.pop("params", UNSET) + params: EvalConfigStructureParams | Unset + if isinstance(_params, Unset): + params = UNSET + else: + params = EvalConfigStructureParams.from_dict(_params) + + _function_params_schema = d.pop("function_params_schema", UNSET) + function_params_schema: EvalConfigStructureFunctionParamsSchema | Unset + if isinstance(_function_params_schema, Unset): + function_params_schema = UNSET + else: + function_params_schema = EvalConfigStructureFunctionParamsSchema.from_dict( + _function_params_schema + ) + + _models = d.pop("models", UNSET) + models: EvalConfigStructureModels | Unset + if isinstance(_models, Unset): + models = UNSET + else: + models = EvalConfigStructureModels.from_dict(_models) + + def _parse_selected_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + selected_model = _parse_selected_model(d.pop("selected_model", UNSET)) + + error_localizer = d.pop("error_localizer", UNSET) + + def _parse_kb_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + kb_id_type_0 = UUID(data) + + return kb_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + kb_id = _parse_kb_id(d.pop("kb_id", UNSET)) + + _output = d.pop("output", UNSET) + output: EvalConfigStructureOutput | Unset + if isinstance(_output, Unset): + output = UNSET + else: + output = EvalConfigStructureOutput.from_dict(_output) + + _config_params_desc = d.pop("config_params_desc", UNSET) + config_params_desc: EvalConfigStructureConfigParamsDesc | Unset + if isinstance(_config_params_desc, Unset): + config_params_desc = UNSET + else: + config_params_desc = EvalConfigStructureConfigParamsDesc.from_dict( + _config_params_desc + ) + + _config_params_option = d.pop("config_params_option", UNSET) + config_params_option: EvalConfigStructureConfigParamsOption | Unset + if isinstance(_config_params_option, Unset): + config_params_option = UNSET + else: + config_params_option = EvalConfigStructureConfigParamsOption.from_dict( + _config_params_option + ) + + api_key_available = d.pop("api_key_available", UNSET) + + eval_config_structure = cls( + required_keys=required_keys, + optional_keys=optional_keys, + variable_keys=variable_keys, + id=id, + template_id=template_id, + name=name, + reason_column=reason_column, + eval_tags=eval_tags, + description=description, + run_prompt_column=run_prompt_column, + template_name=template_name, + mapping=mapping, + config=config, + params=params, + function_params_schema=function_params_schema, + models=models, + selected_model=selected_model, + error_localizer=error_localizer, + kb_id=kb_id, + output=output, + config_params_desc=config_params_desc, + config_params_option=config_params_option, + api_key_available=api_key_available, + ) + + eval_config_structure.additional_properties = d + return eval_config_structure + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_config.py b/python/fi/generated/openapi_client/models/eval_config_structure_config.py new file mode 100644 index 0000000..22cf159 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_config.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureConfig") + + +@_attrs_define +class EvalConfigStructureConfig: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_config = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + eval_config_structure_config.additional_properties = additional_properties + return eval_config_structure_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_config_params_desc.py b/python/fi/generated/openapi_client/models/eval_config_structure_config_params_desc.py new file mode 100644 index 0000000..2a79a50 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_config_params_desc.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureConfigParamsDesc") + + +@_attrs_define +class EvalConfigStructureConfigParamsDesc: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_config_params_desc = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + eval_config_structure_config_params_desc.additional_properties = ( + additional_properties + ) + return eval_config_structure_config_params_desc + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_config_params_option.py b/python/fi/generated/openapi_client/models/eval_config_structure_config_params_option.py new file mode 100644 index 0000000..fe91e0d --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_config_params_option.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureConfigParamsOption") + + +@_attrs_define +class EvalConfigStructureConfigParamsOption: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_config_params_option = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + eval_config_structure_config_params_option.additional_properties = ( + additional_properties + ) + return eval_config_structure_config_params_option + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_eval_tags.py b/python/fi/generated/openapi_client/models/eval_config_structure_eval_tags.py new file mode 100644 index 0000000..5bb9ee4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_eval_tags.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureEvalTags") + + +@_attrs_define +class EvalConfigStructureEvalTags: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_eval_tags = cls() + + eval_config_structure_eval_tags.additional_properties = d + return eval_config_structure_eval_tags + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_function_params_schema.py b/python/fi/generated/openapi_client/models/eval_config_structure_function_params_schema.py new file mode 100644 index 0000000..8003e10 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_function_params_schema.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureFunctionParamsSchema") + + +@_attrs_define +class EvalConfigStructureFunctionParamsSchema: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_function_params_schema = cls() + + eval_config_structure_function_params_schema.additional_properties = d + return eval_config_structure_function_params_schema + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_mapping.py b/python/fi/generated/openapi_client/models/eval_config_structure_mapping.py new file mode 100644 index 0000000..c20193f --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_mapping.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureMapping") + + +@_attrs_define +class EvalConfigStructureMapping: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_mapping = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + eval_config_structure_mapping.additional_properties = additional_properties + return eval_config_structure_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_models.py b/python/fi/generated/openapi_client/models/eval_config_structure_models.py new file mode 100644 index 0000000..224451a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_models.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureModels") + + +@_attrs_define +class EvalConfigStructureModels: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_models = cls() + + eval_config_structure_models.additional_properties = d + return eval_config_structure_models + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_output.py b/python/fi/generated/openapi_client/models/eval_config_structure_output.py new file mode 100644 index 0000000..a0514e9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureOutput") + + +@_attrs_define +class EvalConfigStructureOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_output = cls() + + eval_config_structure_output.additional_properties = d + return eval_config_structure_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_params.py b/python/fi/generated/openapi_client/models/eval_config_structure_params.py new file mode 100644 index 0000000..9d36eda --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_params.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigStructureParams") + + +@_attrs_define +class EvalConfigStructureParams: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_structure_params = cls() + + eval_config_structure_params.additional_properties = d + return eval_config_structure_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_response.py b/python/fi/generated/openapi_client/models/eval_config_structure_response.py new file mode 100644 index 0000000..cbf6e97 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_structure_result import EvalConfigStructureResult + + +T = TypeVar("T", bound="EvalConfigStructureResponse") + + +@_attrs_define +class EvalConfigStructureResponse: + """ + Attributes: + result (EvalConfigStructureResult): + status (bool | Unset): Default: True. + """ + + result: EvalConfigStructureResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_structure_result import EvalConfigStructureResult + + d = dict(src_dict) + result = EvalConfigStructureResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + eval_config_structure_response = cls( + result=result, + status=status, + ) + + eval_config_structure_response.additional_properties = d + return eval_config_structure_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_structure_result.py b/python/fi/generated/openapi_client/models/eval_config_structure_result.py new file mode 100644 index 0000000..c780c48 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_structure_result.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_config_structure import EvalConfigStructure + + +T = TypeVar("T", bound="EvalConfigStructureResult") + + +@_attrs_define +class EvalConfigStructureResult: + """ + Attributes: + eval_ (EvalConfigStructure): + """ + + eval_: EvalConfigStructure + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_ = self.eval_.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval": eval_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_structure import EvalConfigStructure + + d = dict(src_dict) + eval_ = EvalConfigStructure.from_dict(d.pop("eval")) + + eval_config_structure_result = cls( + eval_=eval_, + ) + + eval_config_structure_result.additional_properties = d + return eval_config_structure_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_update_request.py b/python/fi/generated/openapi_client/models/eval_config_update_request.py new file mode 100644 index 0000000..d4cae26 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_update_request.py @@ -0,0 +1,206 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_config_update_request_config import EvalConfigUpdateRequestConfig + from ..models.eval_config_update_request_mapping import ( + EvalConfigUpdateRequestMapping, + ) + + +T = TypeVar("T", bound="EvalConfigUpdateRequest") + + +@_attrs_define +class EvalConfigUpdateRequest: + """ + Attributes: + config (EvalConfigUpdateRequestConfig | Unset): Updated evaluation configuration parameters. + mapping (EvalConfigUpdateRequestMapping | Unset): Updated field mapping between test data and evaluation inputs. + model (None | str | Unset): Model to use for evaluations. + error_localizer (bool | Unset): Enable granular error localization in evaluation results. + kb_id (None | Unset | UUID): UUID of a knowledge base to use for grounding. Pass null to clear. + name (str | Unset): Updated name for the evaluation configuration. + run (bool | Unset): When true, triggers an immediate rerun after updating. Defaults to false. Default: False. + test_execution_id (None | Unset | UUID): UUID of the test execution to rerun against. Required when run is true. + """ + + config: EvalConfigUpdateRequestConfig | Unset = UNSET + mapping: EvalConfigUpdateRequestMapping | Unset = UNSET + model: None | str | Unset = UNSET + error_localizer: bool | Unset = UNSET + kb_id: None | Unset | UUID = UNSET + name: str | Unset = UNSET + run: bool | Unset = False + test_execution_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.mapping, Unset): + mapping = self.mapping.to_dict() + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + error_localizer = self.error_localizer + + kb_id: None | str | Unset + if isinstance(self.kb_id, Unset): + kb_id = UNSET + elif isinstance(self.kb_id, UUID): + kb_id = str(self.kb_id) + else: + kb_id = self.kb_id + + name = self.name + + run = self.run + + test_execution_id: None | str | Unset + if isinstance(self.test_execution_id, Unset): + test_execution_id = UNSET + elif isinstance(self.test_execution_id, UUID): + test_execution_id = str(self.test_execution_id) + else: + test_execution_id = self.test_execution_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if config is not UNSET: + field_dict["config"] = config + if mapping is not UNSET: + field_dict["mapping"] = mapping + if model is not UNSET: + field_dict["model"] = model + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if name is not UNSET: + field_dict["name"] = name + if run is not UNSET: + field_dict["run"] = run + if test_execution_id is not UNSET: + field_dict["test_execution_id"] = test_execution_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_config_update_request_config import ( + EvalConfigUpdateRequestConfig, + ) + from ..models.eval_config_update_request_mapping import ( + EvalConfigUpdateRequestMapping, + ) + + d = dict(src_dict) + _config = d.pop("config", UNSET) + config: EvalConfigUpdateRequestConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = EvalConfigUpdateRequestConfig.from_dict(_config) + + _mapping = d.pop("mapping", UNSET) + mapping: EvalConfigUpdateRequestMapping | Unset + if isinstance(_mapping, Unset): + mapping = UNSET + else: + mapping = EvalConfigUpdateRequestMapping.from_dict(_mapping) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + error_localizer = d.pop("error_localizer", UNSET) + + def _parse_kb_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + kb_id_type_0 = UUID(data) + + return kb_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + kb_id = _parse_kb_id(d.pop("kb_id", UNSET)) + + name = d.pop("name", UNSET) + + run = d.pop("run", UNSET) + + def _parse_test_execution_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + test_execution_id_type_0 = UUID(data) + + return test_execution_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + test_execution_id = _parse_test_execution_id(d.pop("test_execution_id", UNSET)) + + eval_config_update_request = cls( + config=config, + mapping=mapping, + model=model, + error_localizer=error_localizer, + kb_id=kb_id, + name=name, + run=run, + test_execution_id=test_execution_id, + ) + + eval_config_update_request.additional_properties = d + return eval_config_update_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_update_request_config.py b/python/fi/generated/openapi_client/models/eval_config_update_request_config.py new file mode 100644 index 0000000..84bc6a0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_update_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigUpdateRequestConfig") + + +@_attrs_define +class EvalConfigUpdateRequestConfig: + """Updated evaluation configuration parameters.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_update_request_config = cls() + + eval_config_update_request_config.additional_properties = d + return eval_config_update_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_update_request_mapping.py b/python/fi/generated/openapi_client/models/eval_config_update_request_mapping.py new file mode 100644 index 0000000..fd0223a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_update_request_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalConfigUpdateRequestMapping") + + +@_attrs_define +class EvalConfigUpdateRequestMapping: + """Updated field mapping between test data and evaluation inputs.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_update_request_mapping = cls() + + eval_config_update_request_mapping.additional_properties = d + return eval_config_update_request_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_config_update_response.py b/python/fi/generated/openapi_client/models/eval_config_update_response.py new file mode 100644 index 0000000..c9a1879 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_config_update_response.py @@ -0,0 +1,152 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EvalConfigUpdateResponse") + + +@_attrs_define +class EvalConfigUpdateResponse: + """ + Attributes: + message (str): + eval_config_id (UUID): + run_test_id (UUID): + test_execution_id (None | Unset | UUID): + call_execution_count (int | None | Unset): + note (None | str | Unset): + """ + + message: str + eval_config_id: UUID + run_test_id: UUID + test_execution_id: None | Unset | UUID = UNSET + call_execution_count: int | None | Unset = UNSET + note: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + eval_config_id = str(self.eval_config_id) + + run_test_id = str(self.run_test_id) + + test_execution_id: None | str | Unset + if isinstance(self.test_execution_id, Unset): + test_execution_id = UNSET + elif isinstance(self.test_execution_id, UUID): + test_execution_id = str(self.test_execution_id) + else: + test_execution_id = self.test_execution_id + + call_execution_count: int | None | Unset + if isinstance(self.call_execution_count, Unset): + call_execution_count = UNSET + else: + call_execution_count = self.call_execution_count + + note: None | str | Unset + if isinstance(self.note, Unset): + note = UNSET + else: + note = self.note + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "eval_config_id": eval_config_id, + "run_test_id": run_test_id, + } + ) + if test_execution_id is not UNSET: + field_dict["test_execution_id"] = test_execution_id + if call_execution_count is not UNSET: + field_dict["call_execution_count"] = call_execution_count + if note is not UNSET: + field_dict["note"] = note + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + eval_config_id = UUID(d.pop("eval_config_id")) + + run_test_id = UUID(d.pop("run_test_id")) + + def _parse_test_execution_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + test_execution_id_type_0 = UUID(data) + + return test_execution_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + test_execution_id = _parse_test_execution_id(d.pop("test_execution_id", UNSET)) + + def _parse_call_execution_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + call_execution_count = _parse_call_execution_count( + d.pop("call_execution_count", UNSET) + ) + + def _parse_note(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + note = _parse_note(d.pop("note", UNSET)) + + eval_config_update_response = cls( + message=message, + eval_config_id=eval_config_id, + run_test_id=run_test_id, + test_execution_id=test_execution_id, + call_execution_count=call_execution_count, + note=note, + ) + + eval_config_update_response.additional_properties = d + return eval_config_update_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_error_response.py b/python/fi/generated/openapi_client/models/eval_error_response.py new file mode 100644 index 0000000..d9ed73d --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_error_response.py @@ -0,0 +1,220 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.eval_error_response_type import EvalErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_error_response_details import EvalErrorResponseDetails + + +T = TypeVar("T", bound="EvalErrorResponse") + + +@_attrs_define +class EvalErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (EvalErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (EvalErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: EvalErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: EvalErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_error_response_details import EvalErrorResponseDetails + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: EvalErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = EvalErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: EvalErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = EvalErrorResponseDetails.from_dict(_details) + + eval_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + eval_error_response.additional_properties = d + return eval_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_error_response_details.py b/python/fi/generated/openapi_client/models/eval_error_response_details.py new file mode 100644 index 0000000..c7576e3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalErrorResponseDetails") + + +@_attrs_define +class EvalErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + eval_error_response_details.additional_properties = additional_properties + return eval_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_error_response_type.py b/python/fi/generated/openapi_client/models/eval_error_response_type.py new file mode 100644 index 0000000..b945326 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class EvalErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_explanation_cluster.py b/python/fi/generated/openapi_client/models/eval_explanation_cluster.py new file mode 100644 index 0000000..ad1637c --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_explanation_cluster.py @@ -0,0 +1,139 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EvalExplanationCluster") + + +@_attrs_define +class EvalExplanationCluster: + """ + Attributes: + kind (str | Unset): + confidence (str | Unset): + theme (str | Unset): + guidance (str | Unset): + evidence_summary (str | Unset): + eval_config_id (UUID | Unset): + eval_template_id (UUID | Unset): + eval_name (str | Unset): + """ + + kind: str | Unset = UNSET + confidence: str | Unset = UNSET + theme: str | Unset = UNSET + guidance: str | Unset = UNSET + evidence_summary: str | Unset = UNSET + eval_config_id: UUID | Unset = UNSET + eval_template_id: UUID | Unset = UNSET + eval_name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + kind = self.kind + + confidence = self.confidence + + theme = self.theme + + guidance = self.guidance + + evidence_summary = self.evidence_summary + + eval_config_id: str | Unset = UNSET + if not isinstance(self.eval_config_id, Unset): + eval_config_id = str(self.eval_config_id) + + eval_template_id: str | Unset = UNSET + if not isinstance(self.eval_template_id, Unset): + eval_template_id = str(self.eval_template_id) + + eval_name = self.eval_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if kind is not UNSET: + field_dict["kind"] = kind + if confidence is not UNSET: + field_dict["confidence"] = confidence + if theme is not UNSET: + field_dict["theme"] = theme + if guidance is not UNSET: + field_dict["guidance"] = guidance + if evidence_summary is not UNSET: + field_dict["evidenceSummary"] = evidence_summary + if eval_config_id is not UNSET: + field_dict["eval_config_id"] = eval_config_id + if eval_template_id is not UNSET: + field_dict["eval_template_id"] = eval_template_id + if eval_name is not UNSET: + field_dict["eval_name"] = eval_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + kind = d.pop("kind", UNSET) + + confidence = d.pop("confidence", UNSET) + + theme = d.pop("theme", UNSET) + + guidance = d.pop("guidance", UNSET) + + evidence_summary = d.pop("evidenceSummary", UNSET) + + _eval_config_id = d.pop("eval_config_id", UNSET) + eval_config_id: UUID | Unset + if isinstance(_eval_config_id, Unset): + eval_config_id = UNSET + else: + eval_config_id = UUID(_eval_config_id) + + _eval_template_id = d.pop("eval_template_id", UNSET) + eval_template_id: UUID | Unset + if isinstance(_eval_template_id, Unset): + eval_template_id = UNSET + else: + eval_template_id = UUID(_eval_template_id) + + eval_name = d.pop("eval_name", UNSET) + + eval_explanation_cluster = cls( + kind=kind, + confidence=confidence, + theme=theme, + guidance=guidance, + evidence_summary=evidence_summary, + eval_config_id=eval_config_id, + eval_template_id=eval_template_id, + eval_name=eval_name, + ) + + eval_explanation_cluster.additional_properties = d + return eval_explanation_cluster + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_response.py b/python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_response.py new file mode 100644 index 0000000..04dd5ba --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_response.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_explanation_summary_refresh_result import ( + EvalExplanationSummaryRefreshResult, + ) + + +T = TypeVar("T", bound="EvalExplanationSummaryRefreshResponse") + + +@_attrs_define +class EvalExplanationSummaryRefreshResponse: + """ + Attributes: + result (EvalExplanationSummaryRefreshResult): + status (bool | Unset): Default: True. + """ + + result: EvalExplanationSummaryRefreshResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_explanation_summary_refresh_result import ( + EvalExplanationSummaryRefreshResult, + ) + + d = dict(src_dict) + result = EvalExplanationSummaryRefreshResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + eval_explanation_summary_refresh_response = cls( + result=result, + status=status, + ) + + eval_explanation_summary_refresh_response.additional_properties = d + return eval_explanation_summary_refresh_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_result.py b/python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_result.py new file mode 100644 index 0000000..42bd01a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_explanation_summary_refresh_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalExplanationSummaryRefreshResult") + + +@_attrs_define +class EvalExplanationSummaryRefreshResult: + """ + Attributes: + message (str): + """ + + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + eval_explanation_summary_refresh_result = cls( + message=message, + ) + + eval_explanation_summary_refresh_result.additional_properties = d + return eval_explanation_summary_refresh_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_explanation_summary_response.py b/python/fi/generated/openapi_client/models/eval_explanation_summary_response.py new file mode 100644 index 0000000..8d1aece --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_explanation_summary_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_explanation_summary_result import EvalExplanationSummaryResult + + +T = TypeVar("T", bound="EvalExplanationSummaryResponse") + + +@_attrs_define +class EvalExplanationSummaryResponse: + """ + Attributes: + result (EvalExplanationSummaryResult): + status (bool | Unset): Default: True. + """ + + result: EvalExplanationSummaryResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_explanation_summary_result import ( + EvalExplanationSummaryResult, + ) + + d = dict(src_dict) + result = EvalExplanationSummaryResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + eval_explanation_summary_response = cls( + result=result, + status=status, + ) + + eval_explanation_summary_response.additional_properties = d + return eval_explanation_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_explanation_summary_result.py b/python/fi/generated/openapi_client/models/eval_explanation_summary_result.py new file mode 100644 index 0000000..0b11ecd --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_explanation_summary_result.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +if TYPE_CHECKING: + from ..models.eval_explanation_summary_result_response import ( + EvalExplanationSummaryResultResponse, + ) + + +T = TypeVar("T", bound="EvalExplanationSummaryResult") + + +@_attrs_define +class EvalExplanationSummaryResult: + """ + Attributes: + response (EvalExplanationSummaryResultResponse): + last_updated (datetime.datetime | None): + status (str): + """ + + response: EvalExplanationSummaryResultResponse + last_updated: datetime.datetime | None + status: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + response = self.response.to_dict() + + last_updated: None | str + if isinstance(self.last_updated, datetime.datetime): + last_updated = self.last_updated.isoformat() + else: + last_updated = self.last_updated + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "response": response, + "last_updated": last_updated, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_explanation_summary_result_response import ( + EvalExplanationSummaryResultResponse, + ) + + d = dict(src_dict) + response = EvalExplanationSummaryResultResponse.from_dict(d.pop("response")) + + def _parse_last_updated(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + last_updated_type_0 = isoparse(data) + + return last_updated_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + last_updated = _parse_last_updated(d.pop("last_updated")) + + status = d.pop("status") + + eval_explanation_summary_result = cls( + response=response, + last_updated=last_updated, + status=status, + ) + + eval_explanation_summary_result.additional_properties = d + return eval_explanation_summary_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_explanation_summary_result_response.py b/python/fi/generated/openapi_client/models/eval_explanation_summary_result_response.py new file mode 100644 index 0000000..07f8454 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_explanation_summary_result_response.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_explanation_cluster import EvalExplanationCluster + + +T = TypeVar("T", bound="EvalExplanationSummaryResultResponse") + + +@_attrs_define +class EvalExplanationSummaryResultResponse: + """ """ + + additional_properties: dict[str, list[EvalExplanationCluster]] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = [] + for additional_property_item_data in prop: + additional_property_item = additional_property_item_data.to_dict() + field_dict[prop_name].append(additional_property_item) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_explanation_cluster import EvalExplanationCluster + + d = dict(src_dict) + eval_explanation_summary_result_response = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = [] + _additional_property = prop_dict + for additional_property_item_data in _additional_property: + additional_property_item = EvalExplanationCluster.from_dict( + additional_property_item_data + ) + + additional_property.append(additional_property_item) + + additional_properties[prop_name] = additional_property + + eval_explanation_summary_result_response.additional_properties = ( + additional_properties + ) + return eval_explanation_summary_result_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[EvalExplanationCluster]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[EvalExplanationCluster]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_feedback_list_item.py b/python/fi/generated/openapi_client/models/eval_feedback_list_item.py new file mode 100644 index 0000000..21554f0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_feedback_list_item.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalFeedbackListItem") + + +@_attrs_define +class EvalFeedbackListItem: + """ + Attributes: + id (UUID): + value (str): + explanation (str): + source (str): + source_id (str): + action_type (str): + user_name (str): + created_at (str): + """ + + id: UUID + value: str + explanation: str + source: str + source_id: str + action_type: str + user_name: str + created_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + value = self.value + + explanation = self.explanation + + source = self.source + + source_id = self.source_id + + action_type = self.action_type + + user_name = self.user_name + + created_at = self.created_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "value": value, + "explanation": explanation, + "source": source, + "source_id": source_id, + "action_type": action_type, + "user_name": user_name, + "created_at": created_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + value = d.pop("value") + + explanation = d.pop("explanation") + + source = d.pop("source") + + source_id = d.pop("source_id") + + action_type = d.pop("action_type") + + user_name = d.pop("user_name") + + created_at = d.pop("created_at") + + eval_feedback_list_item = cls( + id=id, + value=value, + explanation=explanation, + source=source, + source_id=source_id, + action_type=action_type, + user_name=user_name, + created_at=created_at, + ) + + eval_feedback_list_item.additional_properties = d + return eval_feedback_list_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_feedback_list_response.py b/python/fi/generated/openapi_client/models/eval_feedback_list_response.py new file mode 100644 index 0000000..b1f9962 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_feedback_list_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_feedback_list_response_result import ( + EvalFeedbackListResponseResult, + ) + + +T = TypeVar("T", bound="EvalFeedbackListResponse") + + +@_attrs_define +class EvalFeedbackListResponse: + """ + Attributes: + status (bool): + result (EvalFeedbackListResponseResult): + """ + + status: bool + result: EvalFeedbackListResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_feedback_list_response_result import ( + EvalFeedbackListResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalFeedbackListResponseResult.from_dict(d.pop("result")) + + eval_feedback_list_response = cls( + status=status, + result=result, + ) + + eval_feedback_list_response.additional_properties = d + return eval_feedback_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_feedback_list_response_result.py b/python/fi/generated/openapi_client/models/eval_feedback_list_response_result.py new file mode 100644 index 0000000..9c58749 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_feedback_list_response_result.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_feedback_list_item import EvalFeedbackListItem + + +T = TypeVar("T", bound="EvalFeedbackListResponseResult") + + +@_attrs_define +class EvalFeedbackListResponseResult: + """ + Attributes: + template_id (UUID): + items (list[EvalFeedbackListItem]): + total (int): + page (int): + page_size (int): + """ + + template_id: UUID + items: list[EvalFeedbackListItem] + total: int + page: int + page_size: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_id = str(self.template_id) + + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + page_size = self.page_size + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_id": template_id, + "items": items, + "total": total, + "page": page, + "page_size": page_size, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_feedback_list_item import EvalFeedbackListItem + + d = dict(src_dict) + template_id = UUID(d.pop("template_id")) + + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = EvalFeedbackListItem.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + page_size = d.pop("page_size") + + eval_feedback_list_response_result = cls( + template_id=template_id, + items=items, + total=total, + page=page, + page_size=page_size, + ) + + eval_feedback_list_response_result.additional_properties = d + return eval_feedback_list_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_function_list_response.py b/python/fi/generated/openapi_client/models/eval_function_list_response.py new file mode 100644 index 0000000..9d1d78b --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_function_list_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_function_list_result import EvalFunctionListResult + + +T = TypeVar("T", bound="EvalFunctionListResponse") + + +@_attrs_define +class EvalFunctionListResponse: + """ + Attributes: + status (bool): + result (EvalFunctionListResult): + """ + + status: bool + result: EvalFunctionListResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_function_list_result import EvalFunctionListResult + + d = dict(src_dict) + status = d.pop("status") + + result = EvalFunctionListResult.from_dict(d.pop("result")) + + eval_function_list_response = cls( + status=status, + result=result, + ) + + eval_function_list_response.additional_properties = d + return eval_function_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_function_list_result.py b/python/fi/generated/openapi_client/models/eval_function_list_result.py new file mode 100644 index 0000000..3cc7d17 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_function_list_result.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_function_list_result_functions_item import ( + EvalFunctionListResultFunctionsItem, + ) + + +T = TypeVar("T", bound="EvalFunctionListResult") + + +@_attrs_define +class EvalFunctionListResult: + """ + Attributes: + functions (list[EvalFunctionListResultFunctionsItem]): + """ + + functions: list[EvalFunctionListResultFunctionsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + functions = [] + for functions_item_data in self.functions: + functions_item = functions_item_data.to_dict() + functions.append(functions_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "functions": functions, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_function_list_result_functions_item import ( + EvalFunctionListResultFunctionsItem, + ) + + d = dict(src_dict) + functions = [] + _functions = d.pop("functions") + for functions_item_data in _functions: + functions_item = EvalFunctionListResultFunctionsItem.from_dict( + functions_item_data + ) + + functions.append(functions_item) + + eval_function_list_result = cls( + functions=functions, + ) + + eval_function_list_result.additional_properties = d + return eval_function_list_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_function_list_result_functions_item.py b/python/fi/generated/openapi_client/models/eval_function_list_result_functions_item.py new file mode 100644 index 0000000..7cb88d1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_function_list_result_functions_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalFunctionListResultFunctionsItem") + + +@_attrs_define +class EvalFunctionListResultFunctionsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_function_list_result_functions_item = cls() + + eval_function_list_result_functions_item.additional_properties = d + return eval_function_list_result_functions_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_list_filters.py b/python/fi/generated/openapi_client/models/eval_list_filters.py new file mode 100644 index 0000000..f00704a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_filters.py @@ -0,0 +1,155 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.eval_list_filters_eval_type_item import EvalListFiltersEvalTypeItem +from ..models.eval_list_filters_output_type_item import EvalListFiltersOutputTypeItem +from ..models.eval_list_filters_template_type_item import ( + EvalListFiltersTemplateTypeItem, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EvalListFilters") + + +@_attrs_define +class EvalListFilters: + """ + Attributes: + eval_type (list[EvalListFiltersEvalTypeItem] | Unset): + output_type (list[EvalListFiltersOutputTypeItem] | Unset): + template_type (list[EvalListFiltersTemplateTypeItem] | Unset): + tags (list[str] | Unset): + created_by (list[str] | Unset): + names (list[str] | Unset): + """ + + eval_type: list[EvalListFiltersEvalTypeItem] | Unset = UNSET + output_type: list[EvalListFiltersOutputTypeItem] | Unset = UNSET + template_type: list[EvalListFiltersTemplateTypeItem] | Unset = UNSET + tags: list[str] | Unset = UNSET + created_by: list[str] | Unset = UNSET + names: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_type: list[str] | Unset = UNSET + if not isinstance(self.eval_type, Unset): + eval_type = [] + for eval_type_item_data in self.eval_type: + eval_type_item = eval_type_item_data.value + eval_type.append(eval_type_item) + + output_type: list[str] | Unset = UNSET + if not isinstance(self.output_type, Unset): + output_type = [] + for output_type_item_data in self.output_type: + output_type_item = output_type_item_data.value + output_type.append(output_type_item) + + template_type: list[str] | Unset = UNSET + if not isinstance(self.template_type, Unset): + template_type = [] + for template_type_item_data in self.template_type: + template_type_item = template_type_item_data.value + template_type.append(template_type_item) + + tags: list[str] | Unset = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags + + created_by: list[str] | Unset = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by + + names: list[str] | Unset = UNSET + if not isinstance(self.names, Unset): + names = self.names + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if output_type is not UNSET: + field_dict["output_type"] = output_type + if template_type is not UNSET: + field_dict["template_type"] = template_type + if tags is not UNSET: + field_dict["tags"] = tags + if created_by is not UNSET: + field_dict["created_by"] = created_by + if names is not UNSET: + field_dict["names"] = names + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _eval_type = d.pop("eval_type", UNSET) + eval_type: list[EvalListFiltersEvalTypeItem] | Unset = UNSET + if _eval_type is not UNSET: + eval_type = [] + for eval_type_item_data in _eval_type: + eval_type_item = EvalListFiltersEvalTypeItem(eval_type_item_data) + + eval_type.append(eval_type_item) + + _output_type = d.pop("output_type", UNSET) + output_type: list[EvalListFiltersOutputTypeItem] | Unset = UNSET + if _output_type is not UNSET: + output_type = [] + for output_type_item_data in _output_type: + output_type_item = EvalListFiltersOutputTypeItem(output_type_item_data) + + output_type.append(output_type_item) + + _template_type = d.pop("template_type", UNSET) + template_type: list[EvalListFiltersTemplateTypeItem] | Unset = UNSET + if _template_type is not UNSET: + template_type = [] + for template_type_item_data in _template_type: + template_type_item = EvalListFiltersTemplateTypeItem( + template_type_item_data + ) + + template_type.append(template_type_item) + + tags = cast(list[str], d.pop("tags", UNSET)) + + created_by = cast(list[str], d.pop("created_by", UNSET)) + + names = cast(list[str], d.pop("names", UNSET)) + + eval_list_filters = cls( + eval_type=eval_type, + output_type=output_type, + template_type=template_type, + tags=tags, + created_by=created_by, + names=names, + ) + + eval_list_filters.additional_properties = d + return eval_list_filters + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_list_filters_eval_type_item.py b/python/fi/generated/openapi_client/models/eval_list_filters_eval_type_item.py new file mode 100644 index 0000000..98fe484 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_filters_eval_type_item.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalListFiltersEvalTypeItem(str, Enum): + AGENT = "agent" + CODE = "code" + LLM = "llm" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_list_filters_output_type_item.py b/python/fi/generated/openapi_client/models/eval_list_filters_output_type_item.py new file mode 100644 index 0000000..b5873de --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_filters_output_type_item.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalListFiltersOutputTypeItem(str, Enum): + DETERMINISTIC = "deterministic" + PASS_FAIL = "pass_fail" + PERCENTAGE = "percentage" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_list_filters_template_type_item.py b/python/fi/generated/openapi_client/models/eval_list_filters_template_type_item.py new file mode 100644 index 0000000..9bbd147 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_filters_template_type_item.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class EvalListFiltersTemplateTypeItem(str, Enum): + COMPOSITE = "composite" + SINGLE = "single" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_list_request.py b/python/fi/generated/openapi_client/models/eval_list_request.py new file mode 100644 index 0000000..b2147c9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_request.py @@ -0,0 +1,163 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.eval_list_request_owner_filter import EvalListRequestOwnerFilter +from ..models.eval_list_request_sort_by import EvalListRequestSortBy +from ..models.eval_list_request_sort_order import EvalListRequestSortOrder +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_list_filters import EvalListFilters + + +T = TypeVar("T", bound="EvalListRequest") + + +@_attrs_define +class EvalListRequest: + """ + Attributes: + page (int | Unset): Default: 0. + page_size (int | Unset): Default: 25. + search (None | str | Unset): + owner_filter (EvalListRequestOwnerFilter | Unset): Default: EvalListRequestOwnerFilter.ALL. + filters (EvalListFilters | Unset): + sort_by (EvalListRequestSortBy | Unset): Default: EvalListRequestSortBy.UPDATED_AT. + sort_order (EvalListRequestSortOrder | Unset): Default: EvalListRequestSortOrder.DESC. + """ + + page: int | Unset = 0 + page_size: int | Unset = 25 + search: None | str | Unset = UNSET + owner_filter: EvalListRequestOwnerFilter | Unset = EvalListRequestOwnerFilter.ALL + filters: EvalListFilters | Unset = UNSET + sort_by: EvalListRequestSortBy | Unset = EvalListRequestSortBy.UPDATED_AT + sort_order: EvalListRequestSortOrder | Unset = EvalListRequestSortOrder.DESC + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + page = self.page + + page_size = self.page_size + + search: None | str | Unset + if isinstance(self.search, Unset): + search = UNSET + else: + search = self.search + + owner_filter: str | Unset = UNSET + if not isinstance(self.owner_filter, Unset): + owner_filter = self.owner_filter.value + + filters: dict[str, Any] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + + sort_by: str | Unset = UNSET + if not isinstance(self.sort_by, Unset): + sort_by = self.sort_by.value + + sort_order: str | Unset = UNSET + if not isinstance(self.sort_order, Unset): + sort_order = self.sort_order.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if page is not UNSET: + field_dict["page"] = page + if page_size is not UNSET: + field_dict["page_size"] = page_size + if search is not UNSET: + field_dict["search"] = search + if owner_filter is not UNSET: + field_dict["owner_filter"] = owner_filter + if filters is not UNSET: + field_dict["filters"] = filters + if sort_by is not UNSET: + field_dict["sort_by"] = sort_by + if sort_order is not UNSET: + field_dict["sort_order"] = sort_order + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_list_filters import EvalListFilters + + d = dict(src_dict) + page = d.pop("page", UNSET) + + page_size = d.pop("page_size", UNSET) + + def _parse_search(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + search = _parse_search(d.pop("search", UNSET)) + + _owner_filter = d.pop("owner_filter", UNSET) + owner_filter: EvalListRequestOwnerFilter | Unset + if isinstance(_owner_filter, Unset): + owner_filter = UNSET + else: + owner_filter = EvalListRequestOwnerFilter(_owner_filter) + + _filters = d.pop("filters", UNSET) + filters: EvalListFilters | Unset + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = EvalListFilters.from_dict(_filters) + + _sort_by = d.pop("sort_by", UNSET) + sort_by: EvalListRequestSortBy | Unset + if isinstance(_sort_by, Unset): + sort_by = UNSET + else: + sort_by = EvalListRequestSortBy(_sort_by) + + _sort_order = d.pop("sort_order", UNSET) + sort_order: EvalListRequestSortOrder | Unset + if isinstance(_sort_order, Unset): + sort_order = UNSET + else: + sort_order = EvalListRequestSortOrder(_sort_order) + + eval_list_request = cls( + page=page, + page_size=page_size, + search=search, + owner_filter=owner_filter, + filters=filters, + sort_by=sort_by, + sort_order=sort_order, + ) + + eval_list_request.additional_properties = d + return eval_list_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_list_request_owner_filter.py b/python/fi/generated/openapi_client/models/eval_list_request_owner_filter.py new file mode 100644 index 0000000..086d089 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_request_owner_filter.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalListRequestOwnerFilter(str, Enum): + ALL = "all" + SYSTEM = "system" + USER = "user" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_list_request_sort_by.py b/python/fi/generated/openapi_client/models/eval_list_request_sort_by.py new file mode 100644 index 0000000..2e68bff --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_request_sort_by.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalListRequestSortBy(str, Enum): + CREATED_AT = "created_at" + NAME = "name" + UPDATED_AT = "updated_at" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_list_request_sort_order.py b/python/fi/generated/openapi_client/models/eval_list_request_sort_order.py new file mode 100644 index 0000000..a1c6941 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_request_sort_order.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class EvalListRequestSortOrder(str, Enum): + ASC = "asc" + DESC = "desc" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_list_response.py b/python/fi/generated/openapi_client/models/eval_list_response.py new file mode 100644 index 0000000..8983ff6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_list_result import EvalListResult + + +T = TypeVar("T", bound="EvalListResponse") + + +@_attrs_define +class EvalListResponse: + """ + Attributes: + status (bool): + result (EvalListResult): + """ + + status: bool + result: EvalListResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_list_result import EvalListResult + + d = dict(src_dict) + status = d.pop("status") + + result = EvalListResult.from_dict(d.pop("result")) + + eval_list_response = cls( + status=status, + result=result, + ) + + eval_list_response.additional_properties = d + return eval_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_list_result.py b/python/fi/generated/openapi_client/models/eval_list_result.py new file mode 100644 index 0000000..4f22a89 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_result.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_list_result_evals_item import EvalListResultEvalsItem + + +T = TypeVar("T", bound="EvalListResult") + + +@_attrs_define +class EvalListResult: + """ + Attributes: + evals (list[EvalListResultEvalsItem]): + eval_recommendations (list[str] | Unset): + """ + + evals: list[EvalListResultEvalsItem] + eval_recommendations: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + evals = [] + for evals_item_data in self.evals: + evals_item = evals_item_data.to_dict() + evals.append(evals_item) + + eval_recommendations: list[str] | Unset = UNSET + if not isinstance(self.eval_recommendations, Unset): + eval_recommendations = self.eval_recommendations + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "evals": evals, + } + ) + if eval_recommendations is not UNSET: + field_dict["eval_recommendations"] = eval_recommendations + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_list_result_evals_item import EvalListResultEvalsItem + + d = dict(src_dict) + evals = [] + _evals = d.pop("evals") + for evals_item_data in _evals: + evals_item = EvalListResultEvalsItem.from_dict(evals_item_data) + + evals.append(evals_item) + + eval_recommendations = cast(list[str], d.pop("eval_recommendations", UNSET)) + + eval_list_result = cls( + evals=evals, + eval_recommendations=eval_recommendations, + ) + + eval_list_result.additional_properties = d + return eval_list_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_list_result_evals_item.py b/python/fi/generated/openapi_client/models/eval_list_result_evals_item.py new file mode 100644 index 0000000..0ccb520 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_list_result_evals_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalListResultEvalsItem") + + +@_attrs_define +class EvalListResultEvalsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_list_result_evals_item = cls() + + eval_list_result_evals_item.additional_properties = d + return eval_list_result_evals_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_metric_entry.py b/python/fi/generated/openapi_client/models/eval_metric_entry.py new file mode 100644 index 0000000..817d45b --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_metric_entry.py @@ -0,0 +1,190 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_metric_entry_composite_weight_overrides import ( + EvalMetricEntryCompositeWeightOverrides, + ) + from ..models.eval_metric_entry_config import EvalMetricEntryConfig + + +T = TypeVar("T", bound="EvalMetricEntry") + + +@_attrs_define +class EvalMetricEntry: + """ + Attributes: + template_id (UUID): + name (str): + config (EvalMetricEntryConfig): + id (None | Unset | UUID): + model (str | Unset): Default: ''. + error_localizer (bool | Unset): Default: False. + kb_id (None | Unset | UUID): + composite_weight_overrides (EvalMetricEntryCompositeWeightOverrides | Unset): + """ + + template_id: UUID + name: str + config: EvalMetricEntryConfig + id: None | Unset | UUID = UNSET + model: str | Unset = "" + error_localizer: bool | Unset = False + kb_id: None | Unset | UUID = UNSET + composite_weight_overrides: EvalMetricEntryCompositeWeightOverrides | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_id = str(self.template_id) + + name = self.name + + config = self.config.to_dict() + + id: None | str | Unset + if isinstance(self.id, Unset): + id = UNSET + elif isinstance(self.id, UUID): + id = str(self.id) + else: + id = self.id + + model = self.model + + error_localizer = self.error_localizer + + kb_id: None | str | Unset + if isinstance(self.kb_id, Unset): + kb_id = UNSET + elif isinstance(self.kb_id, UUID): + kb_id = str(self.kb_id) + else: + kb_id = self.kb_id + + composite_weight_overrides: dict[str, Any] | Unset = UNSET + if not isinstance(self.composite_weight_overrides, Unset): + composite_weight_overrides = self.composite_weight_overrides.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_id": template_id, + "name": name, + "config": config, + } + ) + if id is not UNSET: + field_dict["id"] = id + if model is not UNSET: + field_dict["model"] = model + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if composite_weight_overrides is not UNSET: + field_dict["composite_weight_overrides"] = composite_weight_overrides + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_metric_entry_composite_weight_overrides import ( + EvalMetricEntryCompositeWeightOverrides, + ) + from ..models.eval_metric_entry_config import EvalMetricEntryConfig + + d = dict(src_dict) + template_id = UUID(d.pop("template_id")) + + name = d.pop("name") + + config = EvalMetricEntryConfig.from_dict(d.pop("config")) + + def _parse_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + id_type_0 = UUID(data) + + return id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + id = _parse_id(d.pop("id", UNSET)) + + model = d.pop("model", UNSET) + + error_localizer = d.pop("error_localizer", UNSET) + + def _parse_kb_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + kb_id_type_0 = UUID(data) + + return kb_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + kb_id = _parse_kb_id(d.pop("kb_id", UNSET)) + + _composite_weight_overrides = d.pop("composite_weight_overrides", UNSET) + composite_weight_overrides: EvalMetricEntryCompositeWeightOverrides | Unset + if isinstance(_composite_weight_overrides, Unset): + composite_weight_overrides = UNSET + else: + composite_weight_overrides = ( + EvalMetricEntryCompositeWeightOverrides.from_dict( + _composite_weight_overrides + ) + ) + + eval_metric_entry = cls( + template_id=template_id, + name=name, + config=config, + id=id, + model=model, + error_localizer=error_localizer, + kb_id=kb_id, + composite_weight_overrides=composite_weight_overrides, + ) + + eval_metric_entry.additional_properties = d + return eval_metric_entry + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_metric_entry_composite_weight_overrides.py b/python/fi/generated/openapi_client/models/eval_metric_entry_composite_weight_overrides.py new file mode 100644 index 0000000..794948c --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_metric_entry_composite_weight_overrides.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalMetricEntryCompositeWeightOverrides") + + +@_attrs_define +class EvalMetricEntryCompositeWeightOverrides: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_metric_entry_composite_weight_overrides = cls() + + eval_metric_entry_composite_weight_overrides.additional_properties = d + return eval_metric_entry_composite_weight_overrides + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_metric_entry_config.py b/python/fi/generated/openapi_client/models/eval_metric_entry_config.py new file mode 100644 index 0000000..e5394a6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_metric_entry_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalMetricEntryConfig") + + +@_attrs_define +class EvalMetricEntryConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_metric_entry_config = cls() + + eval_metric_entry_config.additional_properties = d + return eval_metric_entry_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_preview_response.py b/python/fi/generated/openapi_client/models/eval_preview_response.py new file mode 100644 index 0000000..57c5a39 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_preview_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_preview_result import EvalPreviewResult + + +T = TypeVar("T", bound="EvalPreviewResponse") + + +@_attrs_define +class EvalPreviewResponse: + """ + Attributes: + status (bool): + result (EvalPreviewResult): + """ + + status: bool + result: EvalPreviewResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_preview_result import EvalPreviewResult + + d = dict(src_dict) + status = d.pop("status") + + result = EvalPreviewResult.from_dict(d.pop("result")) + + eval_preview_response = cls( + status=status, + result=result, + ) + + eval_preview_response.additional_properties = d + return eval_preview_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_preview_result.py b/python/fi/generated/openapi_client/models/eval_preview_result.py new file mode 100644 index 0000000..de472b3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_preview_result.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_preview_result_responses_item import ( + EvalPreviewResultResponsesItem, + ) + + +T = TypeVar("T", bound="EvalPreviewResult") + + +@_attrs_define +class EvalPreviewResult: + """ + Attributes: + responses (list[EvalPreviewResultResponsesItem]): + """ + + responses: list[EvalPreviewResultResponsesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + responses = [] + for responses_item_data in self.responses: + responses_item = responses_item_data.to_dict() + responses.append(responses_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "responses": responses, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_preview_result_responses_item import ( + EvalPreviewResultResponsesItem, + ) + + d = dict(src_dict) + responses = [] + _responses = d.pop("responses") + for responses_item_data in _responses: + responses_item = EvalPreviewResultResponsesItem.from_dict( + responses_item_data + ) + + responses.append(responses_item) + + eval_preview_result = cls( + responses=responses, + ) + + eval_preview_result.additional_properties = d + return eval_preview_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_preview_result_responses_item.py b/python/fi/generated/openapi_client/models/eval_preview_result_responses_item.py new file mode 100644 index 0000000..6da4ff3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_preview_result_responses_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalPreviewResultResponsesItem") + + +@_attrs_define +class EvalPreviewResultResponsesItem: + """Response""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_preview_result_responses_item = cls() + + eval_preview_result_responses_item.additional_properties = d + return eval_preview_result_responses_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure.py b/python/fi/generated/openapi_client/models/eval_structure.py new file mode 100644 index 0000000..a436b30 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure.py @@ -0,0 +1,435 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_structure_choices import EvalStructureChoices + from ..models.eval_structure_config import EvalStructureConfig + from ..models.eval_structure_config_params_desc import EvalStructureConfigParamsDesc + from ..models.eval_structure_config_params_option import ( + EvalStructureConfigParamsOption, + ) + from ..models.eval_structure_function_params_schema import ( + EvalStructureFunctionParamsSchema, + ) + from ..models.eval_structure_mapping import EvalStructureMapping + from ..models.eval_structure_models import EvalStructureModels + from ..models.eval_structure_output import EvalStructureOutput + from ..models.eval_structure_params import EvalStructureParams + from ..models.eval_structure_run_config import EvalStructureRunConfig + + +T = TypeVar("T", bound="EvalStructure") + + +@_attrs_define +class EvalStructure: + """ + Attributes: + id (UUID): + template_id (UUID): + name (str): + description (str | Unset): + eval_tags (list[str] | Unset): + template_name (str | Unset): + required_keys (list[str] | Unset): + optional_keys (list[str] | Unset): + variable_keys (list[str] | Unset): + run_prompt_column (bool | Unset): + mapping (EvalStructureMapping | Unset): + config (EvalStructureConfig | Unset): + params (EvalStructureParams | Unset): + function_params_schema (EvalStructureFunctionParamsSchema | Unset): + eval_type_id (str | Unset): + eval_type (str | Unset): + reason_column (bool | Unset): + models (EvalStructureModels | Unset): + selected_model (str | Unset): + output (EvalStructureOutput | Unset): + config_params_desc (EvalStructureConfigParamsDesc | Unset): + config_params_option (EvalStructureConfigParamsOption | Unset): + kb_id (None | Unset | UUID): + error_localizer (bool | Unset): + choices (EvalStructureChoices | Unset): + api_key_available (bool | Unset): + run_config (EvalStructureRunConfig | Unset): + """ + + id: UUID + template_id: UUID + name: str + description: str | Unset = UNSET + eval_tags: list[str] | Unset = UNSET + template_name: str | Unset = UNSET + required_keys: list[str] | Unset = UNSET + optional_keys: list[str] | Unset = UNSET + variable_keys: list[str] | Unset = UNSET + run_prompt_column: bool | Unset = UNSET + mapping: EvalStructureMapping | Unset = UNSET + config: EvalStructureConfig | Unset = UNSET + params: EvalStructureParams | Unset = UNSET + function_params_schema: EvalStructureFunctionParamsSchema | Unset = UNSET + eval_type_id: str | Unset = UNSET + eval_type: str | Unset = UNSET + reason_column: bool | Unset = UNSET + models: EvalStructureModels | Unset = UNSET + selected_model: str | Unset = UNSET + output: EvalStructureOutput | Unset = UNSET + config_params_desc: EvalStructureConfigParamsDesc | Unset = UNSET + config_params_option: EvalStructureConfigParamsOption | Unset = UNSET + kb_id: None | Unset | UUID = UNSET + error_localizer: bool | Unset = UNSET + choices: EvalStructureChoices | Unset = UNSET + api_key_available: bool | Unset = UNSET + run_config: EvalStructureRunConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + template_id = str(self.template_id) + + name = self.name + + description = self.description + + eval_tags: list[str] | Unset = UNSET + if not isinstance(self.eval_tags, Unset): + eval_tags = self.eval_tags + + template_name = self.template_name + + required_keys: list[str] | Unset = UNSET + if not isinstance(self.required_keys, Unset): + required_keys = self.required_keys + + optional_keys: list[str] | Unset = UNSET + if not isinstance(self.optional_keys, Unset): + optional_keys = self.optional_keys + + variable_keys: list[str] | Unset = UNSET + if not isinstance(self.variable_keys, Unset): + variable_keys = self.variable_keys + + run_prompt_column = self.run_prompt_column + + mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.mapping, Unset): + mapping = self.mapping.to_dict() + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + params: dict[str, Any] | Unset = UNSET + if not isinstance(self.params, Unset): + params = self.params.to_dict() + + function_params_schema: dict[str, Any] | Unset = UNSET + if not isinstance(self.function_params_schema, Unset): + function_params_schema = self.function_params_schema.to_dict() + + eval_type_id = self.eval_type_id + + eval_type = self.eval_type + + reason_column = self.reason_column + + models: dict[str, Any] | Unset = UNSET + if not isinstance(self.models, Unset): + models = self.models.to_dict() + + selected_model = self.selected_model + + output: dict[str, Any] | Unset = UNSET + if not isinstance(self.output, Unset): + output = self.output.to_dict() + + config_params_desc: dict[str, Any] | Unset = UNSET + if not isinstance(self.config_params_desc, Unset): + config_params_desc = self.config_params_desc.to_dict() + + config_params_option: dict[str, Any] | Unset = UNSET + if not isinstance(self.config_params_option, Unset): + config_params_option = self.config_params_option.to_dict() + + kb_id: None | str | Unset + if isinstance(self.kb_id, Unset): + kb_id = UNSET + elif isinstance(self.kb_id, UUID): + kb_id = str(self.kb_id) + else: + kb_id = self.kb_id + + error_localizer = self.error_localizer + + choices: dict[str, Any] | Unset = UNSET + if not isinstance(self.choices, Unset): + choices = self.choices.to_dict() + + api_key_available = self.api_key_available + + run_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.run_config, Unset): + run_config = self.run_config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "template_id": template_id, + "name": name, + } + ) + if description is not UNSET: + field_dict["description"] = description + if eval_tags is not UNSET: + field_dict["eval_tags"] = eval_tags + if template_name is not UNSET: + field_dict["template_name"] = template_name + if required_keys is not UNSET: + field_dict["required_keys"] = required_keys + if optional_keys is not UNSET: + field_dict["optional_keys"] = optional_keys + if variable_keys is not UNSET: + field_dict["variable_keys"] = variable_keys + if run_prompt_column is not UNSET: + field_dict["run_prompt_column"] = run_prompt_column + if mapping is not UNSET: + field_dict["mapping"] = mapping + if config is not UNSET: + field_dict["config"] = config + if params is not UNSET: + field_dict["params"] = params + if function_params_schema is not UNSET: + field_dict["function_params_schema"] = function_params_schema + if eval_type_id is not UNSET: + field_dict["eval_type_id"] = eval_type_id + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if reason_column is not UNSET: + field_dict["reason_column"] = reason_column + if models is not UNSET: + field_dict["models"] = models + if selected_model is not UNSET: + field_dict["selected_model"] = selected_model + if output is not UNSET: + field_dict["output"] = output + if config_params_desc is not UNSET: + field_dict["config_params_desc"] = config_params_desc + if config_params_option is not UNSET: + field_dict["config_params_option"] = config_params_option + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if choices is not UNSET: + field_dict["choices"] = choices + if api_key_available is not UNSET: + field_dict["api_key_available"] = api_key_available + if run_config is not UNSET: + field_dict["run_config"] = run_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_structure_choices import EvalStructureChoices + from ..models.eval_structure_config import EvalStructureConfig + from ..models.eval_structure_config_params_desc import ( + EvalStructureConfigParamsDesc, + ) + from ..models.eval_structure_config_params_option import ( + EvalStructureConfigParamsOption, + ) + from ..models.eval_structure_function_params_schema import ( + EvalStructureFunctionParamsSchema, + ) + from ..models.eval_structure_mapping import EvalStructureMapping + from ..models.eval_structure_models import EvalStructureModels + from ..models.eval_structure_output import EvalStructureOutput + from ..models.eval_structure_params import EvalStructureParams + from ..models.eval_structure_run_config import EvalStructureRunConfig + + d = dict(src_dict) + id = UUID(d.pop("id")) + + template_id = UUID(d.pop("template_id")) + + name = d.pop("name") + + description = d.pop("description", UNSET) + + eval_tags = cast(list[str], d.pop("eval_tags", UNSET)) + + template_name = d.pop("template_name", UNSET) + + required_keys = cast(list[str], d.pop("required_keys", UNSET)) + + optional_keys = cast(list[str], d.pop("optional_keys", UNSET)) + + variable_keys = cast(list[str], d.pop("variable_keys", UNSET)) + + run_prompt_column = d.pop("run_prompt_column", UNSET) + + _mapping = d.pop("mapping", UNSET) + mapping: EvalStructureMapping | Unset + if isinstance(_mapping, Unset): + mapping = UNSET + else: + mapping = EvalStructureMapping.from_dict(_mapping) + + _config = d.pop("config", UNSET) + config: EvalStructureConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = EvalStructureConfig.from_dict(_config) + + _params = d.pop("params", UNSET) + params: EvalStructureParams | Unset + if isinstance(_params, Unset): + params = UNSET + else: + params = EvalStructureParams.from_dict(_params) + + _function_params_schema = d.pop("function_params_schema", UNSET) + function_params_schema: EvalStructureFunctionParamsSchema | Unset + if isinstance(_function_params_schema, Unset): + function_params_schema = UNSET + else: + function_params_schema = EvalStructureFunctionParamsSchema.from_dict( + _function_params_schema + ) + + eval_type_id = d.pop("eval_type_id", UNSET) + + eval_type = d.pop("eval_type", UNSET) + + reason_column = d.pop("reason_column", UNSET) + + _models = d.pop("models", UNSET) + models: EvalStructureModels | Unset + if isinstance(_models, Unset): + models = UNSET + else: + models = EvalStructureModels.from_dict(_models) + + selected_model = d.pop("selected_model", UNSET) + + _output = d.pop("output", UNSET) + output: EvalStructureOutput | Unset + if isinstance(_output, Unset): + output = UNSET + else: + output = EvalStructureOutput.from_dict(_output) + + _config_params_desc = d.pop("config_params_desc", UNSET) + config_params_desc: EvalStructureConfigParamsDesc | Unset + if isinstance(_config_params_desc, Unset): + config_params_desc = UNSET + else: + config_params_desc = EvalStructureConfigParamsDesc.from_dict( + _config_params_desc + ) + + _config_params_option = d.pop("config_params_option", UNSET) + config_params_option: EvalStructureConfigParamsOption | Unset + if isinstance(_config_params_option, Unset): + config_params_option = UNSET + else: + config_params_option = EvalStructureConfigParamsOption.from_dict( + _config_params_option + ) + + def _parse_kb_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + kb_id_type_0 = UUID(data) + + return kb_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + kb_id = _parse_kb_id(d.pop("kb_id", UNSET)) + + error_localizer = d.pop("error_localizer", UNSET) + + _choices = d.pop("choices", UNSET) + choices: EvalStructureChoices | Unset + if isinstance(_choices, Unset): + choices = UNSET + else: + choices = EvalStructureChoices.from_dict(_choices) + + api_key_available = d.pop("api_key_available", UNSET) + + _run_config = d.pop("run_config", UNSET) + run_config: EvalStructureRunConfig | Unset + if isinstance(_run_config, Unset): + run_config = UNSET + else: + run_config = EvalStructureRunConfig.from_dict(_run_config) + + eval_structure = cls( + id=id, + template_id=template_id, + name=name, + description=description, + eval_tags=eval_tags, + template_name=template_name, + required_keys=required_keys, + optional_keys=optional_keys, + variable_keys=variable_keys, + run_prompt_column=run_prompt_column, + mapping=mapping, + config=config, + params=params, + function_params_schema=function_params_schema, + eval_type_id=eval_type_id, + eval_type=eval_type, + reason_column=reason_column, + models=models, + selected_model=selected_model, + output=output, + config_params_desc=config_params_desc, + config_params_option=config_params_option, + kb_id=kb_id, + error_localizer=error_localizer, + choices=choices, + api_key_available=api_key_available, + run_config=run_config, + ) + + eval_structure.additional_properties = d + return eval_structure + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_choices.py b/python/fi/generated/openapi_client/models/eval_structure_choices.py new file mode 100644 index 0000000..3cd468c --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_choices.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureChoices") + + +@_attrs_define +class EvalStructureChoices: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_choices = cls() + + eval_structure_choices.additional_properties = d + return eval_structure_choices + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_config.py b/python/fi/generated/openapi_client/models/eval_structure_config.py new file mode 100644 index 0000000..7bf1d2b --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureConfig") + + +@_attrs_define +class EvalStructureConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_config = cls() + + eval_structure_config.additional_properties = d + return eval_structure_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_config_params_desc.py b/python/fi/generated/openapi_client/models/eval_structure_config_params_desc.py new file mode 100644 index 0000000..2f438df --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_config_params_desc.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureConfigParamsDesc") + + +@_attrs_define +class EvalStructureConfigParamsDesc: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_config_params_desc = cls() + + eval_structure_config_params_desc.additional_properties = d + return eval_structure_config_params_desc + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_config_params_option.py b/python/fi/generated/openapi_client/models/eval_structure_config_params_option.py new file mode 100644 index 0000000..2404ddc --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_config_params_option.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureConfigParamsOption") + + +@_attrs_define +class EvalStructureConfigParamsOption: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_config_params_option = cls() + + eval_structure_config_params_option.additional_properties = d + return eval_structure_config_params_option + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_function_params_schema.py b/python/fi/generated/openapi_client/models/eval_structure_function_params_schema.py new file mode 100644 index 0000000..6184174 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_function_params_schema.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureFunctionParamsSchema") + + +@_attrs_define +class EvalStructureFunctionParamsSchema: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_function_params_schema = cls() + + eval_structure_function_params_schema.additional_properties = d + return eval_structure_function_params_schema + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_mapping.py b/python/fi/generated/openapi_client/models/eval_structure_mapping.py new file mode 100644 index 0000000..e69678f --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureMapping") + + +@_attrs_define +class EvalStructureMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_mapping = cls() + + eval_structure_mapping.additional_properties = d + return eval_structure_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_models.py b/python/fi/generated/openapi_client/models/eval_structure_models.py new file mode 100644 index 0000000..9cf2bb3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_models.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureModels") + + +@_attrs_define +class EvalStructureModels: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_models = cls() + + eval_structure_models.additional_properties = d + return eval_structure_models + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_output.py b/python/fi/generated/openapi_client/models/eval_structure_output.py new file mode 100644 index 0000000..47df794 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureOutput") + + +@_attrs_define +class EvalStructureOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_output = cls() + + eval_structure_output.additional_properties = d + return eval_structure_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_params.py b/python/fi/generated/openapi_client/models/eval_structure_params.py new file mode 100644 index 0000000..0c32126 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_params.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureParams") + + +@_attrs_define +class EvalStructureParams: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_params = cls() + + eval_structure_params.additional_properties = d + return eval_structure_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_response.py b/python/fi/generated/openapi_client/models/eval_structure_response.py new file mode 100644 index 0000000..67c6238 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_structure_result import EvalStructureResult + + +T = TypeVar("T", bound="EvalStructureResponse") + + +@_attrs_define +class EvalStructureResponse: + """ + Attributes: + status (bool): + result (EvalStructureResult): + """ + + status: bool + result: EvalStructureResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_structure_result import EvalStructureResult + + d = dict(src_dict) + status = d.pop("status") + + result = EvalStructureResult.from_dict(d.pop("result")) + + eval_structure_response = cls( + status=status, + result=result, + ) + + eval_structure_response.additional_properties = d + return eval_structure_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_result.py b/python/fi/generated/openapi_client/models/eval_structure_result.py new file mode 100644 index 0000000..5e88357 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_result.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_structure import EvalStructure + + +T = TypeVar("T", bound="EvalStructureResult") + + +@_attrs_define +class EvalStructureResult: + """ + Attributes: + eval_ (EvalStructure): + """ + + eval_: EvalStructure + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_ = self.eval_.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval": eval_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_structure import EvalStructure + + d = dict(src_dict) + eval_ = EvalStructure.from_dict(d.pop("eval")) + + eval_structure_result = cls( + eval_=eval_, + ) + + eval_structure_result.additional_properties = d + return eval_structure_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_structure_run_config.py b/python/fi/generated/openapi_client/models/eval_structure_run_config.py new file mode 100644 index 0000000..0a502b3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_structure_run_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalStructureRunConfig") + + +@_attrs_define +class EvalStructureRunConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_structure_run_config = cls() + + eval_structure_run_config.additional_properties = d + return eval_structure_run_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_summary_comparison_response.py b/python/fi/generated/openapi_client/models/eval_summary_comparison_response.py new file mode 100644 index 0000000..fc978c5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_summary_comparison_response.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_summary_comparison_response_result import ( + EvalSummaryComparisonResponseResult, + ) + + +T = TypeVar("T", bound="EvalSummaryComparisonResponse") + + +@_attrs_define +class EvalSummaryComparisonResponse: + """ + Attributes: + result (EvalSummaryComparisonResponseResult): + status (bool | Unset): Default: True. + """ + + result: EvalSummaryComparisonResponseResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_summary_comparison_response_result import ( + EvalSummaryComparisonResponseResult, + ) + + d = dict(src_dict) + result = EvalSummaryComparisonResponseResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + eval_summary_comparison_response = cls( + result=result, + status=status, + ) + + eval_summary_comparison_response.additional_properties = d + return eval_summary_comparison_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_summary_comparison_response_result.py b/python/fi/generated/openapi_client/models/eval_summary_comparison_response_result.py new file mode 100644 index 0000000..40ce3da --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_summary_comparison_response_result.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_summary import EvalTemplateSummary + + +T = TypeVar("T", bound="EvalSummaryComparisonResponseResult") + + +@_attrs_define +class EvalSummaryComparisonResponseResult: + """ """ + + additional_properties: dict[str, list[EvalTemplateSummary]] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = [] + for additional_property_item_data in prop: + additional_property_item = additional_property_item_data.to_dict() + field_dict[prop_name].append(additional_property_item) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_summary import EvalTemplateSummary + + d = dict(src_dict) + eval_summary_comparison_response_result = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = [] + _additional_property = prop_dict + for additional_property_item_data in _additional_property: + additional_property_item = EvalTemplateSummary.from_dict( + additional_property_item_data + ) + + additional_property.append(additional_property_item) + + additional_properties[prop_name] = additional_property + + eval_summary_comparison_response_result.additional_properties = ( + additional_properties + ) + return eval_summary_comparison_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[EvalTemplateSummary]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[EvalTemplateSummary]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_summary_response.py b/python/fi/generated/openapi_client/models/eval_summary_response.py new file mode 100644 index 0000000..e078219 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_summary_response.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_template_summary import EvalTemplateSummary + + +T = TypeVar("T", bound="EvalSummaryResponse") + + +@_attrs_define +class EvalSummaryResponse: + """ + Attributes: + result (list[EvalTemplateSummary]): + status (bool | Unset): Default: True. + """ + + result: list[EvalTemplateSummary] + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_summary import EvalTemplateSummary + + d = dict(src_dict) + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = EvalTemplateSummary.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + eval_summary_response = cls( + result=result, + status=status, + ) + + eval_summary_response.additional_properties = d + return eval_summary_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_bulk_delete_request.py b/python/fi/generated/openapi_client/models/eval_template_bulk_delete_request.py new file mode 100644 index 0000000..ba54027 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_bulk_delete_request.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateBulkDeleteRequest") + + +@_attrs_define +class EvalTemplateBulkDeleteRequest: + """ + Attributes: + template_ids (list[UUID]): + """ + + template_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_ids = [] + for template_ids_item_data in self.template_ids: + template_ids_item = str(template_ids_item_data) + template_ids.append(template_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_ids": template_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + template_ids = [] + _template_ids = d.pop("template_ids") + for template_ids_item_data in _template_ids: + template_ids_item = UUID(template_ids_item_data) + + template_ids.append(template_ids_item) + + eval_template_bulk_delete_request = cls( + template_ids=template_ids, + ) + + eval_template_bulk_delete_request.additional_properties = d + return eval_template_bulk_delete_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_bulk_delete_response.py b/python/fi/generated/openapi_client/models/eval_template_bulk_delete_response.py new file mode 100644 index 0000000..e5bffd2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_bulk_delete_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_bulk_delete_response_result import ( + EvalTemplateBulkDeleteResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateBulkDeleteResponse") + + +@_attrs_define +class EvalTemplateBulkDeleteResponse: + """ + Attributes: + status (bool): + result (EvalTemplateBulkDeleteResponseResult): + """ + + status: bool + result: EvalTemplateBulkDeleteResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_bulk_delete_response_result import ( + EvalTemplateBulkDeleteResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateBulkDeleteResponseResult.from_dict(d.pop("result")) + + eval_template_bulk_delete_response = cls( + status=status, + result=result, + ) + + eval_template_bulk_delete_response.additional_properties = d + return eval_template_bulk_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_bulk_delete_response_result.py b/python/fi/generated/openapi_client/models/eval_template_bulk_delete_response_result.py new file mode 100644 index 0000000..ac07274 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_bulk_delete_response_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateBulkDeleteResponseResult") + + +@_attrs_define +class EvalTemplateBulkDeleteResponseResult: + """ + Attributes: + deleted_count (int): + """ + + deleted_count: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_count = self.deleted_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "deleted_count": deleted_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_count = d.pop("deleted_count") + + eval_template_bulk_delete_response_result = cls( + deleted_count=deleted_count, + ) + + eval_template_bulk_delete_response_result.additional_properties = d + return eval_template_bulk_delete_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_chart_point.py b/python/fi/generated/openapi_client/models/eval_template_chart_point.py new file mode 100644 index 0000000..9874ba6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_chart_point.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateChartPoint") + + +@_attrs_define +class EvalTemplateChartPoint: + """ + Attributes: + timestamp (str): + value (float): + """ + + timestamp: str + value: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + timestamp = self.timestamp + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "timestamp": timestamp, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + timestamp = d.pop("timestamp") + + value = d.pop("value") + + eval_template_chart_point = cls( + timestamp=timestamp, + value=value, + ) + + eval_template_chart_point.additional_properties = d + return eval_template_chart_point + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_response.py b/python/fi/generated/openapi_client/models/eval_template_create_response.py new file mode 100644 index 0000000..48d3f10 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_create_response_result import ( + EvalTemplateCreateResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateCreateResponse") + + +@_attrs_define +class EvalTemplateCreateResponse: + """ + Attributes: + status (bool): + result (EvalTemplateCreateResponseResult): + """ + + status: bool + result: EvalTemplateCreateResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_create_response_result import ( + EvalTemplateCreateResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateCreateResponseResult.from_dict(d.pop("result")) + + eval_template_create_response = cls( + status=status, + result=result, + ) + + eval_template_create_response.additional_properties = d + return eval_template_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_response_result.py b/python/fi/generated/openapi_client/models/eval_template_create_response_result.py new file mode 100644 index 0000000..74372de --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_response_result.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateCreateResponseResult") + + +@_attrs_define +class EvalTemplateCreateResponseResult: + """ + Attributes: + id (UUID): + name (str): + version (str): + """ + + id: UUID + name: str + version: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "version": version, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + version = d.pop("version") + + eval_template_create_response_result = cls( + id=id, + name=name, + version=version, + ) + + eval_template_create_response_result.additional_properties = d + return eval_template_create_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request.py new file mode 100644 index 0000000..06baca7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request.py @@ -0,0 +1,511 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.eval_template_create_v2_request_code_language import ( + EvalTemplateCreateV2RequestCodeLanguage, +) +from ..models.eval_template_create_v2_request_eval_type import ( + EvalTemplateCreateV2RequestEvalType, +) +from ..models.eval_template_create_v2_request_mode import ( + EvalTemplateCreateV2RequestMode, +) +from ..models.eval_template_create_v2_request_output_type import ( + EvalTemplateCreateV2RequestOutputType, +) +from ..models.eval_template_create_v2_request_template_format import ( + EvalTemplateCreateV2RequestTemplateFormat, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_template_create_v2_request_choice_scores import ( + EvalTemplateCreateV2RequestChoiceScores, + ) + from ..models.eval_template_create_v2_request_data_injection import ( + EvalTemplateCreateV2RequestDataInjection, + ) + from ..models.eval_template_create_v2_request_few_shot_examples_type_0_item import ( + EvalTemplateCreateV2RequestFewShotExamplesType0Item, + ) + from ..models.eval_template_create_v2_request_messages_type_0_item import ( + EvalTemplateCreateV2RequestMessagesType0Item, + ) + from ..models.eval_template_create_v2_request_summary import ( + EvalTemplateCreateV2RequestSummary, + ) + from ..models.eval_template_create_v2_request_tools import ( + EvalTemplateCreateV2RequestTools, + ) + + +T = TypeVar("T", bound="EvalTemplateCreateV2Request") + + +@_attrs_define +class EvalTemplateCreateV2Request: + """ + Attributes: + name (str | Unset): + is_draft (bool | Unset): Default: False. + eval_type (EvalTemplateCreateV2RequestEvalType | Unset): Default: EvalTemplateCreateV2RequestEvalType.LLM. + instructions (str | Unset): + model (str | Unset): Default: 'turing_large'. + output_type (EvalTemplateCreateV2RequestOutputType | Unset): Default: + EvalTemplateCreateV2RequestOutputType.PASS_FAIL. + pass_threshold (float | Unset): + choice_scores (EvalTemplateCreateV2RequestChoiceScores | Unset): + description (None | str | Unset): + tags (list[str] | Unset): + check_internet (bool | Unset): Default: False. + code (None | str | Unset): + code_language (EvalTemplateCreateV2RequestCodeLanguage | Unset): + messages (list[EvalTemplateCreateV2RequestMessagesType0Item] | None | Unset): + few_shot_examples (list[EvalTemplateCreateV2RequestFewShotExamplesType0Item] | None | Unset): + mode (EvalTemplateCreateV2RequestMode | Unset): + tools (EvalTemplateCreateV2RequestTools | Unset): + knowledge_bases (list[str] | None | Unset): + data_injection (EvalTemplateCreateV2RequestDataInjection | Unset): + summary (EvalTemplateCreateV2RequestSummary | Unset): + error_localizer_enabled (bool | Unset): Default: False. + template_format (EvalTemplateCreateV2RequestTemplateFormat | Unset): Default: + EvalTemplateCreateV2RequestTemplateFormat.MUSTACHE. + """ + + name: str | Unset = UNSET + is_draft: bool | Unset = False + eval_type: EvalTemplateCreateV2RequestEvalType | Unset = ( + EvalTemplateCreateV2RequestEvalType.LLM + ) + instructions: str | Unset = UNSET + model: str | Unset = "turing_large" + output_type: EvalTemplateCreateV2RequestOutputType | Unset = ( + EvalTemplateCreateV2RequestOutputType.PASS_FAIL + ) + pass_threshold: float | Unset = UNSET + choice_scores: EvalTemplateCreateV2RequestChoiceScores | Unset = UNSET + description: None | str | Unset = UNSET + tags: list[str] | Unset = UNSET + check_internet: bool | Unset = False + code: None | str | Unset = UNSET + code_language: EvalTemplateCreateV2RequestCodeLanguage | Unset = UNSET + messages: list[EvalTemplateCreateV2RequestMessagesType0Item] | None | Unset = UNSET + few_shot_examples: ( + list[EvalTemplateCreateV2RequestFewShotExamplesType0Item] | None | Unset + ) = UNSET + mode: EvalTemplateCreateV2RequestMode | Unset = UNSET + tools: EvalTemplateCreateV2RequestTools | Unset = UNSET + knowledge_bases: list[str] | None | Unset = UNSET + data_injection: EvalTemplateCreateV2RequestDataInjection | Unset = UNSET + summary: EvalTemplateCreateV2RequestSummary | Unset = UNSET + error_localizer_enabled: bool | Unset = False + template_format: EvalTemplateCreateV2RequestTemplateFormat | Unset = ( + EvalTemplateCreateV2RequestTemplateFormat.MUSTACHE + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + is_draft = self.is_draft + + eval_type: str | Unset = UNSET + if not isinstance(self.eval_type, Unset): + eval_type = self.eval_type.value + + instructions = self.instructions + + model = self.model + + output_type: str | Unset = UNSET + if not isinstance(self.output_type, Unset): + output_type = self.output_type.value + + pass_threshold = self.pass_threshold + + choice_scores: dict[str, Any] | Unset = UNSET + if not isinstance(self.choice_scores, Unset): + choice_scores = self.choice_scores.to_dict() + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + tags: list[str] | Unset = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags + + check_internet = self.check_internet + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + code_language: str | Unset = UNSET + if not isinstance(self.code_language, Unset): + code_language = self.code_language.value + + messages: list[dict[str, Any]] | None | Unset + if isinstance(self.messages, Unset): + messages = UNSET + elif isinstance(self.messages, list): + messages = [] + for messages_type_0_item_data in self.messages: + messages_type_0_item = messages_type_0_item_data.to_dict() + messages.append(messages_type_0_item) + + else: + messages = self.messages + + few_shot_examples: list[dict[str, Any]] | None | Unset + if isinstance(self.few_shot_examples, Unset): + few_shot_examples = UNSET + elif isinstance(self.few_shot_examples, list): + few_shot_examples = [] + for few_shot_examples_type_0_item_data in self.few_shot_examples: + few_shot_examples_type_0_item = ( + few_shot_examples_type_0_item_data.to_dict() + ) + few_shot_examples.append(few_shot_examples_type_0_item) + + else: + few_shot_examples = self.few_shot_examples + + mode: str | Unset = UNSET + if not isinstance(self.mode, Unset): + mode = self.mode.value + + tools: dict[str, Any] | Unset = UNSET + if not isinstance(self.tools, Unset): + tools = self.tools.to_dict() + + knowledge_bases: list[str] | None | Unset + if isinstance(self.knowledge_bases, Unset): + knowledge_bases = UNSET + elif isinstance(self.knowledge_bases, list): + knowledge_bases = self.knowledge_bases + + else: + knowledge_bases = self.knowledge_bases + + data_injection: dict[str, Any] | Unset = UNSET + if not isinstance(self.data_injection, Unset): + data_injection = self.data_injection.to_dict() + + summary: dict[str, Any] | Unset = UNSET + if not isinstance(self.summary, Unset): + summary = self.summary.to_dict() + + error_localizer_enabled = self.error_localizer_enabled + + template_format: str | Unset = UNSET + if not isinstance(self.template_format, Unset): + template_format = self.template_format.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if is_draft is not UNSET: + field_dict["is_draft"] = is_draft + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if instructions is not UNSET: + field_dict["instructions"] = instructions + if model is not UNSET: + field_dict["model"] = model + if output_type is not UNSET: + field_dict["output_type"] = output_type + if pass_threshold is not UNSET: + field_dict["pass_threshold"] = pass_threshold + if choice_scores is not UNSET: + field_dict["choice_scores"] = choice_scores + if description is not UNSET: + field_dict["description"] = description + if tags is not UNSET: + field_dict["tags"] = tags + if check_internet is not UNSET: + field_dict["check_internet"] = check_internet + if code is not UNSET: + field_dict["code"] = code + if code_language is not UNSET: + field_dict["code_language"] = code_language + if messages is not UNSET: + field_dict["messages"] = messages + if few_shot_examples is not UNSET: + field_dict["few_shot_examples"] = few_shot_examples + if mode is not UNSET: + field_dict["mode"] = mode + if tools is not UNSET: + field_dict["tools"] = tools + if knowledge_bases is not UNSET: + field_dict["knowledge_bases"] = knowledge_bases + if data_injection is not UNSET: + field_dict["data_injection"] = data_injection + if summary is not UNSET: + field_dict["summary"] = summary + if error_localizer_enabled is not UNSET: + field_dict["error_localizer_enabled"] = error_localizer_enabled + if template_format is not UNSET: + field_dict["template_format"] = template_format + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_create_v2_request_choice_scores import ( + EvalTemplateCreateV2RequestChoiceScores, + ) + from ..models.eval_template_create_v2_request_data_injection import ( + EvalTemplateCreateV2RequestDataInjection, + ) + from ..models.eval_template_create_v2_request_few_shot_examples_type_0_item import ( + EvalTemplateCreateV2RequestFewShotExamplesType0Item, + ) + from ..models.eval_template_create_v2_request_messages_type_0_item import ( + EvalTemplateCreateV2RequestMessagesType0Item, + ) + from ..models.eval_template_create_v2_request_summary import ( + EvalTemplateCreateV2RequestSummary, + ) + from ..models.eval_template_create_v2_request_tools import ( + EvalTemplateCreateV2RequestTools, + ) + + d = dict(src_dict) + name = d.pop("name", UNSET) + + is_draft = d.pop("is_draft", UNSET) + + _eval_type = d.pop("eval_type", UNSET) + eval_type: EvalTemplateCreateV2RequestEvalType | Unset + if isinstance(_eval_type, Unset): + eval_type = UNSET + else: + eval_type = EvalTemplateCreateV2RequestEvalType(_eval_type) + + instructions = d.pop("instructions", UNSET) + + model = d.pop("model", UNSET) + + _output_type = d.pop("output_type", UNSET) + output_type: EvalTemplateCreateV2RequestOutputType | Unset + if isinstance(_output_type, Unset): + output_type = UNSET + else: + output_type = EvalTemplateCreateV2RequestOutputType(_output_type) + + pass_threshold = d.pop("pass_threshold", UNSET) + + _choice_scores = d.pop("choice_scores", UNSET) + choice_scores: EvalTemplateCreateV2RequestChoiceScores | Unset + if isinstance(_choice_scores, Unset): + choice_scores = UNSET + else: + choice_scores = EvalTemplateCreateV2RequestChoiceScores.from_dict( + _choice_scores + ) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + tags = cast(list[str], d.pop("tags", UNSET)) + + check_internet = d.pop("check_internet", UNSET) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + _code_language = d.pop("code_language", UNSET) + code_language: EvalTemplateCreateV2RequestCodeLanguage | Unset + if isinstance(_code_language, Unset): + code_language = UNSET + else: + code_language = EvalTemplateCreateV2RequestCodeLanguage(_code_language) + + def _parse_messages( + data: object, + ) -> list[EvalTemplateCreateV2RequestMessagesType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + messages_type_0 = [] + _messages_type_0 = data + for messages_type_0_item_data in _messages_type_0: + messages_type_0_item = ( + EvalTemplateCreateV2RequestMessagesType0Item.from_dict( + messages_type_0_item_data + ) + ) + + messages_type_0.append(messages_type_0_item) + + return messages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[EvalTemplateCreateV2RequestMessagesType0Item] | None | Unset, data + ) + + messages = _parse_messages(d.pop("messages", UNSET)) + + def _parse_few_shot_examples( + data: object, + ) -> list[EvalTemplateCreateV2RequestFewShotExamplesType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + few_shot_examples_type_0 = [] + _few_shot_examples_type_0 = data + for few_shot_examples_type_0_item_data in _few_shot_examples_type_0: + few_shot_examples_type_0_item = ( + EvalTemplateCreateV2RequestFewShotExamplesType0Item.from_dict( + few_shot_examples_type_0_item_data + ) + ) + + few_shot_examples_type_0.append(few_shot_examples_type_0_item) + + return few_shot_examples_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[EvalTemplateCreateV2RequestFewShotExamplesType0Item] + | None + | Unset, + data, + ) + + few_shot_examples = _parse_few_shot_examples(d.pop("few_shot_examples", UNSET)) + + _mode = d.pop("mode", UNSET) + mode: EvalTemplateCreateV2RequestMode | Unset + if isinstance(_mode, Unset): + mode = UNSET + else: + mode = EvalTemplateCreateV2RequestMode(_mode) + + _tools = d.pop("tools", UNSET) + tools: EvalTemplateCreateV2RequestTools | Unset + if isinstance(_tools, Unset): + tools = UNSET + else: + tools = EvalTemplateCreateV2RequestTools.from_dict(_tools) + + def _parse_knowledge_bases(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + knowledge_bases_type_0 = cast(list[str], data) + + return knowledge_bases_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + knowledge_bases = _parse_knowledge_bases(d.pop("knowledge_bases", UNSET)) + + _data_injection = d.pop("data_injection", UNSET) + data_injection: EvalTemplateCreateV2RequestDataInjection | Unset + if isinstance(_data_injection, Unset): + data_injection = UNSET + else: + data_injection = EvalTemplateCreateV2RequestDataInjection.from_dict( + _data_injection + ) + + _summary = d.pop("summary", UNSET) + summary: EvalTemplateCreateV2RequestSummary | Unset + if isinstance(_summary, Unset): + summary = UNSET + else: + summary = EvalTemplateCreateV2RequestSummary.from_dict(_summary) + + error_localizer_enabled = d.pop("error_localizer_enabled", UNSET) + + _template_format = d.pop("template_format", UNSET) + template_format: EvalTemplateCreateV2RequestTemplateFormat | Unset + if isinstance(_template_format, Unset): + template_format = UNSET + else: + template_format = EvalTemplateCreateV2RequestTemplateFormat( + _template_format + ) + + eval_template_create_v2_request = cls( + name=name, + is_draft=is_draft, + eval_type=eval_type, + instructions=instructions, + model=model, + output_type=output_type, + pass_threshold=pass_threshold, + choice_scores=choice_scores, + description=description, + tags=tags, + check_internet=check_internet, + code=code, + code_language=code_language, + messages=messages, + few_shot_examples=few_shot_examples, + mode=mode, + tools=tools, + knowledge_bases=knowledge_bases, + data_injection=data_injection, + summary=summary, + error_localizer_enabled=error_localizer_enabled, + template_format=template_format, + ) + + eval_template_create_v2_request.additional_properties = d + return eval_template_create_v2_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_choice_scores.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_choice_scores.py new file mode 100644 index 0000000..08b0978 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_choice_scores.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateCreateV2RequestChoiceScores") + + +@_attrs_define +class EvalTemplateCreateV2RequestChoiceScores: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_create_v2_request_choice_scores = cls() + + eval_template_create_v2_request_choice_scores.additional_properties = d + return eval_template_create_v2_request_choice_scores + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_code_language.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_code_language.py new file mode 100644 index 0000000..f489575 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_code_language.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class EvalTemplateCreateV2RequestCodeLanguage(str, Enum): + JAVASCRIPT = "javascript" + PYTHON = "python" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_data_injection.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_data_injection.py new file mode 100644 index 0000000..a162096 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_data_injection.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateCreateV2RequestDataInjection") + + +@_attrs_define +class EvalTemplateCreateV2RequestDataInjection: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_create_v2_request_data_injection = cls() + + eval_template_create_v2_request_data_injection.additional_properties = d + return eval_template_create_v2_request_data_injection + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_eval_type.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_eval_type.py new file mode 100644 index 0000000..bf9e832 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_eval_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalTemplateCreateV2RequestEvalType(str, Enum): + AGENT = "agent" + CODE = "code" + LLM = "llm" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_few_shot_examples_type_0_item.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_few_shot_examples_type_0_item.py new file mode 100644 index 0000000..3266b3c --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_few_shot_examples_type_0_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateCreateV2RequestFewShotExamplesType0Item") + + +@_attrs_define +class EvalTemplateCreateV2RequestFewShotExamplesType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_create_v2_request_few_shot_examples_type_0_item = cls() + + eval_template_create_v2_request_few_shot_examples_type_0_item.additional_properties = d + return eval_template_create_v2_request_few_shot_examples_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_messages_type_0_item.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_messages_type_0_item.py new file mode 100644 index 0000000..cd4045b --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_messages_type_0_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateCreateV2RequestMessagesType0Item") + + +@_attrs_define +class EvalTemplateCreateV2RequestMessagesType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_create_v2_request_messages_type_0_item = cls() + + eval_template_create_v2_request_messages_type_0_item.additional_properties = d + return eval_template_create_v2_request_messages_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_mode.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_mode.py new file mode 100644 index 0000000..c08fcad --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_mode.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalTemplateCreateV2RequestMode(str, Enum): + AGENT = "agent" + AUTO = "auto" + QUICK = "quick" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_output_type.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_output_type.py new file mode 100644 index 0000000..1bed36c --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_output_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalTemplateCreateV2RequestOutputType(str, Enum): + DETERMINISTIC = "deterministic" + PASS_FAIL = "pass_fail" + PERCENTAGE = "percentage" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_summary.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_summary.py new file mode 100644 index 0000000..e2a1450 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_summary.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateCreateV2RequestSummary") + + +@_attrs_define +class EvalTemplateCreateV2RequestSummary: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_create_v2_request_summary = cls() + + eval_template_create_v2_request_summary.additional_properties = d + return eval_template_create_v2_request_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_template_format.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_template_format.py new file mode 100644 index 0000000..c1b1c1a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_template_format.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class EvalTemplateCreateV2RequestTemplateFormat(str, Enum): + JINJA = "jinja" + MUSTACHE = "mustache" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_create_v2_request_tools.py b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_tools.py new file mode 100644 index 0000000..4d0ea73 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_create_v2_request_tools.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateCreateV2RequestTools") + + +@_attrs_define +class EvalTemplateCreateV2RequestTools: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_create_v2_request_tools = cls() + + eval_template_create_v2_request_tools.additional_properties = d + return eval_template_create_v2_request_tools + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_detail_response.py b/python/fi/generated/openapi_client/models/eval_template_detail_response.py new file mode 100644 index 0000000..ea2d718 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_detail_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_detail_response_result import ( + EvalTemplateDetailResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateDetailResponse") + + +@_attrs_define +class EvalTemplateDetailResponse: + """ + Attributes: + status (bool): + result (EvalTemplateDetailResponseResult): + """ + + status: bool + result: EvalTemplateDetailResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_detail_response_result import ( + EvalTemplateDetailResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateDetailResponseResult.from_dict(d.pop("result")) + + eval_template_detail_response = cls( + status=status, + result=result, + ) + + eval_template_detail_response.additional_properties = d + return eval_template_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_detail_response_result.py b/python/fi/generated/openapi_client/models/eval_template_detail_response_result.py new file mode 100644 index 0000000..b2bcdce --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_detail_response_result.py @@ -0,0 +1,397 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_template_detail_response_result_choice_scores import ( + EvalTemplateDetailResponseResultChoiceScores, + ) + from ..models.eval_template_detail_response_result_choices import ( + EvalTemplateDetailResponseResultChoices, + ) + from ..models.eval_template_detail_response_result_config import ( + EvalTemplateDetailResponseResultConfig, + ) + + +T = TypeVar("T", bound="EvalTemplateDetailResponseResult") + + +@_attrs_define +class EvalTemplateDetailResponseResult: + """ + Attributes: + id (UUID): + name (str): + template_type (str): + eval_type (str): + output_type (str): + pass_threshold (float): + multi_choice (bool): + required_keys (list[str]): + owner (str): + created_by_name (str): + version_count (int): + current_version (str): + tags (list[str]): + check_internet (bool): + error_localizer_enabled (bool): + template_format (str): + aggregation_enabled (bool): + aggregation_function (str): + created_at (str): + updated_at (str): + description (None | str | Unset): + instructions (None | str | Unset): + model (None | str | Unset): + choice_scores (EvalTemplateDetailResponseResultChoiceScores | Unset): + choices (EvalTemplateDetailResponseResultChoices | Unset): + code (None | str | Unset): + code_language (None | str | Unset): + composite_child_axis (str | Unset): + config (EvalTemplateDetailResponseResultConfig | Unset): + """ + + id: UUID + name: str + template_type: str + eval_type: str + output_type: str + pass_threshold: float + multi_choice: bool + required_keys: list[str] + owner: str + created_by_name: str + version_count: int + current_version: str + tags: list[str] + check_internet: bool + error_localizer_enabled: bool + template_format: str + aggregation_enabled: bool + aggregation_function: str + created_at: str + updated_at: str + description: None | str | Unset = UNSET + instructions: None | str | Unset = UNSET + model: None | str | Unset = UNSET + choice_scores: EvalTemplateDetailResponseResultChoiceScores | Unset = UNSET + choices: EvalTemplateDetailResponseResultChoices | Unset = UNSET + code: None | str | Unset = UNSET + code_language: None | str | Unset = UNSET + composite_child_axis: str | Unset = UNSET + config: EvalTemplateDetailResponseResultConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + template_type = self.template_type + + eval_type = self.eval_type + + output_type = self.output_type + + pass_threshold = self.pass_threshold + + multi_choice = self.multi_choice + + required_keys = self.required_keys + + owner = self.owner + + created_by_name = self.created_by_name + + version_count = self.version_count + + current_version = self.current_version + + tags = self.tags + + check_internet = self.check_internet + + error_localizer_enabled = self.error_localizer_enabled + + template_format = self.template_format + + aggregation_enabled = self.aggregation_enabled + + aggregation_function = self.aggregation_function + + created_at = self.created_at + + updated_at = self.updated_at + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + instructions: None | str | Unset + if isinstance(self.instructions, Unset): + instructions = UNSET + else: + instructions = self.instructions + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + choice_scores: dict[str, Any] | Unset = UNSET + if not isinstance(self.choice_scores, Unset): + choice_scores = self.choice_scores.to_dict() + + choices: dict[str, Any] | Unset = UNSET + if not isinstance(self.choices, Unset): + choices = self.choices.to_dict() + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + code_language: None | str | Unset + if isinstance(self.code_language, Unset): + code_language = UNSET + else: + code_language = self.code_language + + composite_child_axis = self.composite_child_axis + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "template_type": template_type, + "eval_type": eval_type, + "output_type": output_type, + "pass_threshold": pass_threshold, + "multi_choice": multi_choice, + "required_keys": required_keys, + "owner": owner, + "created_by_name": created_by_name, + "version_count": version_count, + "current_version": current_version, + "tags": tags, + "check_internet": check_internet, + "error_localizer_enabled": error_localizer_enabled, + "template_format": template_format, + "aggregation_enabled": aggregation_enabled, + "aggregation_function": aggregation_function, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if description is not UNSET: + field_dict["description"] = description + if instructions is not UNSET: + field_dict["instructions"] = instructions + if model is not UNSET: + field_dict["model"] = model + if choice_scores is not UNSET: + field_dict["choice_scores"] = choice_scores + if choices is not UNSET: + field_dict["choices"] = choices + if code is not UNSET: + field_dict["code"] = code + if code_language is not UNSET: + field_dict["code_language"] = code_language + if composite_child_axis is not UNSET: + field_dict["composite_child_axis"] = composite_child_axis + if config is not UNSET: + field_dict["config"] = config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_detail_response_result_choice_scores import ( + EvalTemplateDetailResponseResultChoiceScores, + ) + from ..models.eval_template_detail_response_result_choices import ( + EvalTemplateDetailResponseResultChoices, + ) + from ..models.eval_template_detail_response_result_config import ( + EvalTemplateDetailResponseResultConfig, + ) + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + template_type = d.pop("template_type") + + eval_type = d.pop("eval_type") + + output_type = d.pop("output_type") + + pass_threshold = d.pop("pass_threshold") + + multi_choice = d.pop("multi_choice") + + required_keys = cast(list[str], d.pop("required_keys")) + + owner = d.pop("owner") + + created_by_name = d.pop("created_by_name") + + version_count = d.pop("version_count") + + current_version = d.pop("current_version") + + tags = cast(list[str], d.pop("tags")) + + check_internet = d.pop("check_internet") + + error_localizer_enabled = d.pop("error_localizer_enabled") + + template_format = d.pop("template_format") + + aggregation_enabled = d.pop("aggregation_enabled") + + aggregation_function = d.pop("aggregation_function") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_instructions(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + instructions = _parse_instructions(d.pop("instructions", UNSET)) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _choice_scores = d.pop("choice_scores", UNSET) + choice_scores: EvalTemplateDetailResponseResultChoiceScores | Unset + if isinstance(_choice_scores, Unset): + choice_scores = UNSET + else: + choice_scores = EvalTemplateDetailResponseResultChoiceScores.from_dict( + _choice_scores + ) + + _choices = d.pop("choices", UNSET) + choices: EvalTemplateDetailResponseResultChoices | Unset + if isinstance(_choices, Unset): + choices = UNSET + else: + choices = EvalTemplateDetailResponseResultChoices.from_dict(_choices) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_code_language(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code_language = _parse_code_language(d.pop("code_language", UNSET)) + + composite_child_axis = d.pop("composite_child_axis", UNSET) + + _config = d.pop("config", UNSET) + config: EvalTemplateDetailResponseResultConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = EvalTemplateDetailResponseResultConfig.from_dict(_config) + + eval_template_detail_response_result = cls( + id=id, + name=name, + template_type=template_type, + eval_type=eval_type, + output_type=output_type, + pass_threshold=pass_threshold, + multi_choice=multi_choice, + required_keys=required_keys, + owner=owner, + created_by_name=created_by_name, + version_count=version_count, + current_version=current_version, + tags=tags, + check_internet=check_internet, + error_localizer_enabled=error_localizer_enabled, + template_format=template_format, + aggregation_enabled=aggregation_enabled, + aggregation_function=aggregation_function, + created_at=created_at, + updated_at=updated_at, + description=description, + instructions=instructions, + model=model, + choice_scores=choice_scores, + choices=choices, + code=code, + code_language=code_language, + composite_child_axis=composite_child_axis, + config=config, + ) + + eval_template_detail_response_result.additional_properties = d + return eval_template_detail_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_detail_response_result_choice_scores.py b/python/fi/generated/openapi_client/models/eval_template_detail_response_result_choice_scores.py new file mode 100644 index 0000000..691caf2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_detail_response_result_choice_scores.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateDetailResponseResultChoiceScores") + + +@_attrs_define +class EvalTemplateDetailResponseResultChoiceScores: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_detail_response_result_choice_scores = cls() + + eval_template_detail_response_result_choice_scores.additional_properties = d + return eval_template_detail_response_result_choice_scores + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_detail_response_result_choices.py b/python/fi/generated/openapi_client/models/eval_template_detail_response_result_choices.py new file mode 100644 index 0000000..039ba26 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_detail_response_result_choices.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateDetailResponseResultChoices") + + +@_attrs_define +class EvalTemplateDetailResponseResultChoices: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_detail_response_result_choices = cls() + + eval_template_detail_response_result_choices.additional_properties = d + return eval_template_detail_response_result_choices + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_detail_response_result_config.py b/python/fi/generated/openapi_client/models/eval_template_detail_response_result_config.py new file mode 100644 index 0000000..2fd1f9e --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_detail_response_result_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateDetailResponseResultConfig") + + +@_attrs_define +class EvalTemplateDetailResponseResultConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_detail_response_result_config = cls() + + eval_template_detail_response_result_config.additional_properties = d + return eval_template_detail_response_result_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_charts_item.py b/python/fi/generated/openapi_client/models/eval_template_list_charts_item.py new file mode 100644 index 0000000..c0519bd --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_charts_item.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_chart_point import EvalTemplateChartPoint + + +T = TypeVar("T", bound="EvalTemplateListChartsItem") + + +@_attrs_define +class EvalTemplateListChartsItem: + """ + Attributes: + chart (list[EvalTemplateChartPoint]): + error_rate (list[EvalTemplateChartPoint]): + run_count (int): + """ + + chart: list[EvalTemplateChartPoint] + error_rate: list[EvalTemplateChartPoint] + run_count: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + chart = [] + for chart_item_data in self.chart: + chart_item = chart_item_data.to_dict() + chart.append(chart_item) + + error_rate = [] + for error_rate_item_data in self.error_rate: + error_rate_item = error_rate_item_data.to_dict() + error_rate.append(error_rate_item) + + run_count = self.run_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "chart": chart, + "error_rate": error_rate, + "run_count": run_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_chart_point import EvalTemplateChartPoint + + d = dict(src_dict) + chart = [] + _chart = d.pop("chart") + for chart_item_data in _chart: + chart_item = EvalTemplateChartPoint.from_dict(chart_item_data) + + chart.append(chart_item) + + error_rate = [] + _error_rate = d.pop("error_rate") + for error_rate_item_data in _error_rate: + error_rate_item = EvalTemplateChartPoint.from_dict(error_rate_item_data) + + error_rate.append(error_rate_item) + + run_count = d.pop("run_count") + + eval_template_list_charts_item = cls( + chart=chart, + error_rate=error_rate, + run_count=run_count, + ) + + eval_template_list_charts_item.additional_properties = d + return eval_template_list_charts_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_charts_request.py b/python/fi/generated/openapi_client/models/eval_template_list_charts_request.py new file mode 100644 index 0000000..c71885d --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_charts_request.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateListChartsRequest") + + +@_attrs_define +class EvalTemplateListChartsRequest: + """ + Attributes: + template_ids (list[UUID]): + """ + + template_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_ids = [] + for template_ids_item_data in self.template_ids: + template_ids_item = str(template_ids_item_data) + template_ids.append(template_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_ids": template_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + template_ids = [] + _template_ids = d.pop("template_ids") + for template_ids_item_data in _template_ids: + template_ids_item = UUID(template_ids_item_data) + + template_ids.append(template_ids_item) + + eval_template_list_charts_request = cls( + template_ids=template_ids, + ) + + eval_template_list_charts_request.additional_properties = d + return eval_template_list_charts_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_charts_response.py b/python/fi/generated/openapi_client/models/eval_template_list_charts_response.py new file mode 100644 index 0000000..50f52d9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_charts_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_list_charts_response_result import ( + EvalTemplateListChartsResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateListChartsResponse") + + +@_attrs_define +class EvalTemplateListChartsResponse: + """ + Attributes: + status (bool): + result (EvalTemplateListChartsResponseResult): + """ + + status: bool + result: EvalTemplateListChartsResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_list_charts_response_result import ( + EvalTemplateListChartsResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateListChartsResponseResult.from_dict(d.pop("result")) + + eval_template_list_charts_response = cls( + status=status, + result=result, + ) + + eval_template_list_charts_response.additional_properties = d + return eval_template_list_charts_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_charts_response_result.py b/python/fi/generated/openapi_client/models/eval_template_list_charts_response_result.py new file mode 100644 index 0000000..cfc23ce --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_charts_response_result.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_list_charts_response_result_charts import ( + EvalTemplateListChartsResponseResultCharts, + ) + + +T = TypeVar("T", bound="EvalTemplateListChartsResponseResult") + + +@_attrs_define +class EvalTemplateListChartsResponseResult: + """ + Attributes: + charts (EvalTemplateListChartsResponseResultCharts): + """ + + charts: EvalTemplateListChartsResponseResultCharts + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + charts = self.charts.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "charts": charts, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_list_charts_response_result_charts import ( + EvalTemplateListChartsResponseResultCharts, + ) + + d = dict(src_dict) + charts = EvalTemplateListChartsResponseResultCharts.from_dict(d.pop("charts")) + + eval_template_list_charts_response_result = cls( + charts=charts, + ) + + eval_template_list_charts_response_result.additional_properties = d + return eval_template_list_charts_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_charts_response_result_charts.py b/python/fi/generated/openapi_client/models/eval_template_list_charts_response_result_charts.py new file mode 100644 index 0000000..097c05a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_charts_response_result_charts.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_list_charts_item import EvalTemplateListChartsItem + + +T = TypeVar("T", bound="EvalTemplateListChartsResponseResultCharts") + + +@_attrs_define +class EvalTemplateListChartsResponseResultCharts: + """ """ + + additional_properties: dict[str, EvalTemplateListChartsItem] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_list_charts_item import EvalTemplateListChartsItem + + d = dict(src_dict) + eval_template_list_charts_response_result_charts = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = EvalTemplateListChartsItem.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + eval_template_list_charts_response_result_charts.additional_properties = ( + additional_properties + ) + return eval_template_list_charts_response_result_charts + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> EvalTemplateListChartsItem: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: EvalTemplateListChartsItem) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_item.py b/python/fi/generated/openapi_client/models/eval_template_list_item.py new file mode 100644 index 0000000..9a2224e --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_item.py @@ -0,0 +1,192 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_chart_point import EvalTemplateChartPoint + + +T = TypeVar("T", bound="EvalTemplateListItem") + + +@_attrs_define +class EvalTemplateListItem: + """ + Attributes: + id (UUID): + name (str): + template_type (str): + eval_type (str): + output_type (str): + owner (str): + created_by_name (str): + version_count (int): + current_version (str): + last_updated (str): + thirty_day_chart (list[EvalTemplateChartPoint]): + thirty_day_error_rate (list[EvalTemplateChartPoint]): + thirty_day_run_count (int): + tags (list[str]): + """ + + id: UUID + name: str + template_type: str + eval_type: str + output_type: str + owner: str + created_by_name: str + version_count: int + current_version: str + last_updated: str + thirty_day_chart: list[EvalTemplateChartPoint] + thirty_day_error_rate: list[EvalTemplateChartPoint] + thirty_day_run_count: int + tags: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + template_type = self.template_type + + eval_type = self.eval_type + + output_type = self.output_type + + owner = self.owner + + created_by_name = self.created_by_name + + version_count = self.version_count + + current_version = self.current_version + + last_updated = self.last_updated + + thirty_day_chart = [] + for thirty_day_chart_item_data in self.thirty_day_chart: + thirty_day_chart_item = thirty_day_chart_item_data.to_dict() + thirty_day_chart.append(thirty_day_chart_item) + + thirty_day_error_rate = [] + for thirty_day_error_rate_item_data in self.thirty_day_error_rate: + thirty_day_error_rate_item = thirty_day_error_rate_item_data.to_dict() + thirty_day_error_rate.append(thirty_day_error_rate_item) + + thirty_day_run_count = self.thirty_day_run_count + + tags = self.tags + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "template_type": template_type, + "eval_type": eval_type, + "output_type": output_type, + "owner": owner, + "created_by_name": created_by_name, + "version_count": version_count, + "current_version": current_version, + "last_updated": last_updated, + "thirty_day_chart": thirty_day_chart, + "thirty_day_error_rate": thirty_day_error_rate, + "thirty_day_run_count": thirty_day_run_count, + "tags": tags, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_chart_point import EvalTemplateChartPoint + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + template_type = d.pop("template_type") + + eval_type = d.pop("eval_type") + + output_type = d.pop("output_type") + + owner = d.pop("owner") + + created_by_name = d.pop("created_by_name") + + version_count = d.pop("version_count") + + current_version = d.pop("current_version") + + last_updated = d.pop("last_updated") + + thirty_day_chart = [] + _thirty_day_chart = d.pop("thirty_day_chart") + for thirty_day_chart_item_data in _thirty_day_chart: + thirty_day_chart_item = EvalTemplateChartPoint.from_dict( + thirty_day_chart_item_data + ) + + thirty_day_chart.append(thirty_day_chart_item) + + thirty_day_error_rate = [] + _thirty_day_error_rate = d.pop("thirty_day_error_rate") + for thirty_day_error_rate_item_data in _thirty_day_error_rate: + thirty_day_error_rate_item = EvalTemplateChartPoint.from_dict( + thirty_day_error_rate_item_data + ) + + thirty_day_error_rate.append(thirty_day_error_rate_item) + + thirty_day_run_count = d.pop("thirty_day_run_count") + + tags = cast(list[str], d.pop("tags")) + + eval_template_list_item = cls( + id=id, + name=name, + template_type=template_type, + eval_type=eval_type, + output_type=output_type, + owner=owner, + created_by_name=created_by_name, + version_count=version_count, + current_version=current_version, + last_updated=last_updated, + thirty_day_chart=thirty_day_chart, + thirty_day_error_rate=thirty_day_error_rate, + thirty_day_run_count=thirty_day_run_count, + tags=tags, + ) + + eval_template_list_item.additional_properties = d + return eval_template_list_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_response.py b/python/fi/generated/openapi_client/models/eval_template_list_response.py new file mode 100644 index 0000000..5e5fe06 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_list_response_result import ( + EvalTemplateListResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateListResponse") + + +@_attrs_define +class EvalTemplateListResponse: + """ + Attributes: + status (bool): + result (EvalTemplateListResponseResult): + """ + + status: bool + result: EvalTemplateListResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_list_response_result import ( + EvalTemplateListResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateListResponseResult.from_dict(d.pop("result")) + + eval_template_list_response = cls( + status=status, + result=result, + ) + + eval_template_list_response.additional_properties = d + return eval_template_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_list_response_result.py b/python/fi/generated/openapi_client/models/eval_template_list_response_result.py new file mode 100644 index 0000000..9ab7e2c --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_list_response_result.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_list_item import EvalTemplateListItem + + +T = TypeVar("T", bound="EvalTemplateListResponseResult") + + +@_attrs_define +class EvalTemplateListResponseResult: + """ + Attributes: + items (list[EvalTemplateListItem]): + total (int): + page (int): + page_size (int): + """ + + items: list[EvalTemplateListItem] + total: int + page: int + page_size: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + page_size = self.page_size + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "page_size": page_size, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_list_item import EvalTemplateListItem + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = EvalTemplateListItem.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + page_size = d.pop("page_size") + + eval_template_list_response_result = cls( + items=items, + total=total, + page=page, + page_size=page_size, + ) + + eval_template_list_response_result.additional_properties = d + return eval_template_list_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_summary.py b/python/fi/generated/openapi_client/models/eval_template_summary.py new file mode 100644 index 0000000..6dc400a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_summary.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_summary_output import EvalTemplateSummaryOutput + + +T = TypeVar("T", bound="EvalTemplateSummary") + + +@_attrs_define +class EvalTemplateSummary: + """ + Attributes: + name (str): + id (str): + total_cells (int): + output (EvalTemplateSummaryOutput): + """ + + name: str + id: str + total_cells: int + output: EvalTemplateSummaryOutput + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + id = self.id + + total_cells = self.total_cells + + output = self.output.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "id": id, + "total_cells": total_cells, + "output": output, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_summary_output import EvalTemplateSummaryOutput + + d = dict(src_dict) + name = d.pop("name") + + id = d.pop("id") + + total_cells = d.pop("total_cells") + + output = EvalTemplateSummaryOutput.from_dict(d.pop("output")) + + eval_template_summary = cls( + name=name, + id=id, + total_cells=total_cells, + output=output, + ) + + eval_template_summary.additional_properties = d + return eval_template_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_summary_output.py b/python/fi/generated/openapi_client/models/eval_template_summary_output.py new file mode 100644 index 0000000..7ae2a6d --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_summary_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateSummaryOutput") + + +@_attrs_define +class EvalTemplateSummaryOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_summary_output = cls() + + eval_template_summary_output.additional_properties = d + return eval_template_summary_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_response.py b/python/fi/generated/openapi_client/models/eval_template_update_response.py new file mode 100644 index 0000000..a518b54 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_update_response_result import ( + EvalTemplateUpdateResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateUpdateResponse") + + +@_attrs_define +class EvalTemplateUpdateResponse: + """ + Attributes: + status (bool): + result (EvalTemplateUpdateResponseResult): + """ + + status: bool + result: EvalTemplateUpdateResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_update_response_result import ( + EvalTemplateUpdateResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateUpdateResponseResult.from_dict(d.pop("result")) + + eval_template_update_response = cls( + status=status, + result=result, + ) + + eval_template_update_response.additional_properties = d + return eval_template_update_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_response_result.py b/python/fi/generated/openapi_client/models/eval_template_update_response_result.py new file mode 100644 index 0000000..ca6e2f1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_response_result.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateUpdateResponseResult") + + +@_attrs_define +class EvalTemplateUpdateResponseResult: + """ + Attributes: + id (UUID): + name (str): + updated (bool): + """ + + id: UUID + name: str + updated: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + updated = self.updated + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "updated": updated, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + updated = d.pop("updated") + + eval_template_update_response_result = cls( + id=id, + name=name, + updated=updated, + ) + + eval_template_update_response_result.additional_properties = d + return eval_template_update_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request.py new file mode 100644 index 0000000..e5d1269 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request.py @@ -0,0 +1,623 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.eval_template_update_v2_request_code_language import ( + EvalTemplateUpdateV2RequestCodeLanguage, +) +from ..models.eval_template_update_v2_request_eval_type import ( + EvalTemplateUpdateV2RequestEvalType, +) +from ..models.eval_template_update_v2_request_mode import ( + EvalTemplateUpdateV2RequestMode, +) +from ..models.eval_template_update_v2_request_output_type import ( + EvalTemplateUpdateV2RequestOutputType, +) +from ..models.eval_template_update_v2_request_template_format import ( + EvalTemplateUpdateV2RequestTemplateFormat, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_template_update_v2_request_choice_scores import ( + EvalTemplateUpdateV2RequestChoiceScores, + ) + from ..models.eval_template_update_v2_request_data_injection import ( + EvalTemplateUpdateV2RequestDataInjection, + ) + from ..models.eval_template_update_v2_request_few_shot_examples_type_0_item import ( + EvalTemplateUpdateV2RequestFewShotExamplesType0Item, + ) + from ..models.eval_template_update_v2_request_messages_type_0_item import ( + EvalTemplateUpdateV2RequestMessagesType0Item, + ) + from ..models.eval_template_update_v2_request_summary import ( + EvalTemplateUpdateV2RequestSummary, + ) + from ..models.eval_template_update_v2_request_tools import ( + EvalTemplateUpdateV2RequestTools, + ) + + +T = TypeVar("T", bound="EvalTemplateUpdateV2Request") + + +@_attrs_define +class EvalTemplateUpdateV2Request: + """ + Attributes: + name (None | str | Unset): + eval_type (EvalTemplateUpdateV2RequestEvalType | Unset): + instructions (None | str | Unset): + model (None | str | Unset): + output_type (EvalTemplateUpdateV2RequestOutputType | Unset): + pass_threshold (float | None | Unset): + choice_scores (EvalTemplateUpdateV2RequestChoiceScores | Unset): + multi_choice (bool | None | Unset): + description (None | str | Unset): + tags (list[str] | None | Unset): + check_internet (bool | None | Unset): + code (None | str | Unset): + code_language (EvalTemplateUpdateV2RequestCodeLanguage | Unset): + messages (list[EvalTemplateUpdateV2RequestMessagesType0Item] | None | Unset): + few_shot_examples (list[EvalTemplateUpdateV2RequestFewShotExamplesType0Item] | None | Unset): + mode (EvalTemplateUpdateV2RequestMode | Unset): + tools (EvalTemplateUpdateV2RequestTools | Unset): + knowledge_bases (list[str] | None | Unset): + data_injection (EvalTemplateUpdateV2RequestDataInjection | Unset): + summary (EvalTemplateUpdateV2RequestSummary | Unset): + error_localizer_enabled (bool | None | Unset): + publish (bool | None | Unset): + template_format (EvalTemplateUpdateV2RequestTemplateFormat | Unset): + """ + + name: None | str | Unset = UNSET + eval_type: EvalTemplateUpdateV2RequestEvalType | Unset = UNSET + instructions: None | str | Unset = UNSET + model: None | str | Unset = UNSET + output_type: EvalTemplateUpdateV2RequestOutputType | Unset = UNSET + pass_threshold: float | None | Unset = UNSET + choice_scores: EvalTemplateUpdateV2RequestChoiceScores | Unset = UNSET + multi_choice: bool | None | Unset = UNSET + description: None | str | Unset = UNSET + tags: list[str] | None | Unset = UNSET + check_internet: bool | None | Unset = UNSET + code: None | str | Unset = UNSET + code_language: EvalTemplateUpdateV2RequestCodeLanguage | Unset = UNSET + messages: list[EvalTemplateUpdateV2RequestMessagesType0Item] | None | Unset = UNSET + few_shot_examples: ( + list[EvalTemplateUpdateV2RequestFewShotExamplesType0Item] | None | Unset + ) = UNSET + mode: EvalTemplateUpdateV2RequestMode | Unset = UNSET + tools: EvalTemplateUpdateV2RequestTools | Unset = UNSET + knowledge_bases: list[str] | None | Unset = UNSET + data_injection: EvalTemplateUpdateV2RequestDataInjection | Unset = UNSET + summary: EvalTemplateUpdateV2RequestSummary | Unset = UNSET + error_localizer_enabled: bool | None | Unset = UNSET + publish: bool | None | Unset = UNSET + template_format: EvalTemplateUpdateV2RequestTemplateFormat | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + eval_type: str | Unset = UNSET + if not isinstance(self.eval_type, Unset): + eval_type = self.eval_type.value + + instructions: None | str | Unset + if isinstance(self.instructions, Unset): + instructions = UNSET + else: + instructions = self.instructions + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + output_type: str | Unset = UNSET + if not isinstance(self.output_type, Unset): + output_type = self.output_type.value + + pass_threshold: float | None | Unset + if isinstance(self.pass_threshold, Unset): + pass_threshold = UNSET + else: + pass_threshold = self.pass_threshold + + choice_scores: dict[str, Any] | Unset = UNSET + if not isinstance(self.choice_scores, Unset): + choice_scores = self.choice_scores.to_dict() + + multi_choice: bool | None | Unset + if isinstance(self.multi_choice, Unset): + multi_choice = UNSET + else: + multi_choice = self.multi_choice + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + tags: list[str] | None | Unset + if isinstance(self.tags, Unset): + tags = UNSET + elif isinstance(self.tags, list): + tags = self.tags + + else: + tags = self.tags + + check_internet: bool | None | Unset + if isinstance(self.check_internet, Unset): + check_internet = UNSET + else: + check_internet = self.check_internet + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + code_language: str | Unset = UNSET + if not isinstance(self.code_language, Unset): + code_language = self.code_language.value + + messages: list[dict[str, Any]] | None | Unset + if isinstance(self.messages, Unset): + messages = UNSET + elif isinstance(self.messages, list): + messages = [] + for messages_type_0_item_data in self.messages: + messages_type_0_item = messages_type_0_item_data.to_dict() + messages.append(messages_type_0_item) + + else: + messages = self.messages + + few_shot_examples: list[dict[str, Any]] | None | Unset + if isinstance(self.few_shot_examples, Unset): + few_shot_examples = UNSET + elif isinstance(self.few_shot_examples, list): + few_shot_examples = [] + for few_shot_examples_type_0_item_data in self.few_shot_examples: + few_shot_examples_type_0_item = ( + few_shot_examples_type_0_item_data.to_dict() + ) + few_shot_examples.append(few_shot_examples_type_0_item) + + else: + few_shot_examples = self.few_shot_examples + + mode: str | Unset = UNSET + if not isinstance(self.mode, Unset): + mode = self.mode.value + + tools: dict[str, Any] | Unset = UNSET + if not isinstance(self.tools, Unset): + tools = self.tools.to_dict() + + knowledge_bases: list[str] | None | Unset + if isinstance(self.knowledge_bases, Unset): + knowledge_bases = UNSET + elif isinstance(self.knowledge_bases, list): + knowledge_bases = self.knowledge_bases + + else: + knowledge_bases = self.knowledge_bases + + data_injection: dict[str, Any] | Unset = UNSET + if not isinstance(self.data_injection, Unset): + data_injection = self.data_injection.to_dict() + + summary: dict[str, Any] | Unset = UNSET + if not isinstance(self.summary, Unset): + summary = self.summary.to_dict() + + error_localizer_enabled: bool | None | Unset + if isinstance(self.error_localizer_enabled, Unset): + error_localizer_enabled = UNSET + else: + error_localizer_enabled = self.error_localizer_enabled + + publish: bool | None | Unset + if isinstance(self.publish, Unset): + publish = UNSET + else: + publish = self.publish + + template_format: str | Unset = UNSET + if not isinstance(self.template_format, Unset): + template_format = self.template_format.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if instructions is not UNSET: + field_dict["instructions"] = instructions + if model is not UNSET: + field_dict["model"] = model + if output_type is not UNSET: + field_dict["output_type"] = output_type + if pass_threshold is not UNSET: + field_dict["pass_threshold"] = pass_threshold + if choice_scores is not UNSET: + field_dict["choice_scores"] = choice_scores + if multi_choice is not UNSET: + field_dict["multi_choice"] = multi_choice + if description is not UNSET: + field_dict["description"] = description + if tags is not UNSET: + field_dict["tags"] = tags + if check_internet is not UNSET: + field_dict["check_internet"] = check_internet + if code is not UNSET: + field_dict["code"] = code + if code_language is not UNSET: + field_dict["code_language"] = code_language + if messages is not UNSET: + field_dict["messages"] = messages + if few_shot_examples is not UNSET: + field_dict["few_shot_examples"] = few_shot_examples + if mode is not UNSET: + field_dict["mode"] = mode + if tools is not UNSET: + field_dict["tools"] = tools + if knowledge_bases is not UNSET: + field_dict["knowledge_bases"] = knowledge_bases + if data_injection is not UNSET: + field_dict["data_injection"] = data_injection + if summary is not UNSET: + field_dict["summary"] = summary + if error_localizer_enabled is not UNSET: + field_dict["error_localizer_enabled"] = error_localizer_enabled + if publish is not UNSET: + field_dict["publish"] = publish + if template_format is not UNSET: + field_dict["template_format"] = template_format + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_update_v2_request_choice_scores import ( + EvalTemplateUpdateV2RequestChoiceScores, + ) + from ..models.eval_template_update_v2_request_data_injection import ( + EvalTemplateUpdateV2RequestDataInjection, + ) + from ..models.eval_template_update_v2_request_few_shot_examples_type_0_item import ( + EvalTemplateUpdateV2RequestFewShotExamplesType0Item, + ) + from ..models.eval_template_update_v2_request_messages_type_0_item import ( + EvalTemplateUpdateV2RequestMessagesType0Item, + ) + from ..models.eval_template_update_v2_request_summary import ( + EvalTemplateUpdateV2RequestSummary, + ) + from ..models.eval_template_update_v2_request_tools import ( + EvalTemplateUpdateV2RequestTools, + ) + + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + _eval_type = d.pop("eval_type", UNSET) + eval_type: EvalTemplateUpdateV2RequestEvalType | Unset + if isinstance(_eval_type, Unset): + eval_type = UNSET + else: + eval_type = EvalTemplateUpdateV2RequestEvalType(_eval_type) + + def _parse_instructions(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + instructions = _parse_instructions(d.pop("instructions", UNSET)) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _output_type = d.pop("output_type", UNSET) + output_type: EvalTemplateUpdateV2RequestOutputType | Unset + if isinstance(_output_type, Unset): + output_type = UNSET + else: + output_type = EvalTemplateUpdateV2RequestOutputType(_output_type) + + def _parse_pass_threshold(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pass_threshold = _parse_pass_threshold(d.pop("pass_threshold", UNSET)) + + _choice_scores = d.pop("choice_scores", UNSET) + choice_scores: EvalTemplateUpdateV2RequestChoiceScores | Unset + if isinstance(_choice_scores, Unset): + choice_scores = UNSET + else: + choice_scores = EvalTemplateUpdateV2RequestChoiceScores.from_dict( + _choice_scores + ) + + def _parse_multi_choice(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + multi_choice = _parse_multi_choice(d.pop("multi_choice", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_tags(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + tags_type_0 = cast(list[str], data) + + return tags_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + tags = _parse_tags(d.pop("tags", UNSET)) + + def _parse_check_internet(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + check_internet = _parse_check_internet(d.pop("check_internet", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + _code_language = d.pop("code_language", UNSET) + code_language: EvalTemplateUpdateV2RequestCodeLanguage | Unset + if isinstance(_code_language, Unset): + code_language = UNSET + else: + code_language = EvalTemplateUpdateV2RequestCodeLanguage(_code_language) + + def _parse_messages( + data: object, + ) -> list[EvalTemplateUpdateV2RequestMessagesType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + messages_type_0 = [] + _messages_type_0 = data + for messages_type_0_item_data in _messages_type_0: + messages_type_0_item = ( + EvalTemplateUpdateV2RequestMessagesType0Item.from_dict( + messages_type_0_item_data + ) + ) + + messages_type_0.append(messages_type_0_item) + + return messages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[EvalTemplateUpdateV2RequestMessagesType0Item] | None | Unset, data + ) + + messages = _parse_messages(d.pop("messages", UNSET)) + + def _parse_few_shot_examples( + data: object, + ) -> list[EvalTemplateUpdateV2RequestFewShotExamplesType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + few_shot_examples_type_0 = [] + _few_shot_examples_type_0 = data + for few_shot_examples_type_0_item_data in _few_shot_examples_type_0: + few_shot_examples_type_0_item = ( + EvalTemplateUpdateV2RequestFewShotExamplesType0Item.from_dict( + few_shot_examples_type_0_item_data + ) + ) + + few_shot_examples_type_0.append(few_shot_examples_type_0_item) + + return few_shot_examples_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[EvalTemplateUpdateV2RequestFewShotExamplesType0Item] + | None + | Unset, + data, + ) + + few_shot_examples = _parse_few_shot_examples(d.pop("few_shot_examples", UNSET)) + + _mode = d.pop("mode", UNSET) + mode: EvalTemplateUpdateV2RequestMode | Unset + if isinstance(_mode, Unset): + mode = UNSET + else: + mode = EvalTemplateUpdateV2RequestMode(_mode) + + _tools = d.pop("tools", UNSET) + tools: EvalTemplateUpdateV2RequestTools | Unset + if isinstance(_tools, Unset): + tools = UNSET + else: + tools = EvalTemplateUpdateV2RequestTools.from_dict(_tools) + + def _parse_knowledge_bases(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + knowledge_bases_type_0 = cast(list[str], data) + + return knowledge_bases_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + knowledge_bases = _parse_knowledge_bases(d.pop("knowledge_bases", UNSET)) + + _data_injection = d.pop("data_injection", UNSET) + data_injection: EvalTemplateUpdateV2RequestDataInjection | Unset + if isinstance(_data_injection, Unset): + data_injection = UNSET + else: + data_injection = EvalTemplateUpdateV2RequestDataInjection.from_dict( + _data_injection + ) + + _summary = d.pop("summary", UNSET) + summary: EvalTemplateUpdateV2RequestSummary | Unset + if isinstance(_summary, Unset): + summary = UNSET + else: + summary = EvalTemplateUpdateV2RequestSummary.from_dict(_summary) + + def _parse_error_localizer_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + error_localizer_enabled = _parse_error_localizer_enabled( + d.pop("error_localizer_enabled", UNSET) + ) + + def _parse_publish(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + publish = _parse_publish(d.pop("publish", UNSET)) + + _template_format = d.pop("template_format", UNSET) + template_format: EvalTemplateUpdateV2RequestTemplateFormat | Unset + if isinstance(_template_format, Unset): + template_format = UNSET + else: + template_format = EvalTemplateUpdateV2RequestTemplateFormat( + _template_format + ) + + eval_template_update_v2_request = cls( + name=name, + eval_type=eval_type, + instructions=instructions, + model=model, + output_type=output_type, + pass_threshold=pass_threshold, + choice_scores=choice_scores, + multi_choice=multi_choice, + description=description, + tags=tags, + check_internet=check_internet, + code=code, + code_language=code_language, + messages=messages, + few_shot_examples=few_shot_examples, + mode=mode, + tools=tools, + knowledge_bases=knowledge_bases, + data_injection=data_injection, + summary=summary, + error_localizer_enabled=error_localizer_enabled, + publish=publish, + template_format=template_format, + ) + + eval_template_update_v2_request.additional_properties = d + return eval_template_update_v2_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_choice_scores.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_choice_scores.py new file mode 100644 index 0000000..e26018a --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_choice_scores.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateUpdateV2RequestChoiceScores") + + +@_attrs_define +class EvalTemplateUpdateV2RequestChoiceScores: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_update_v2_request_choice_scores = cls() + + eval_template_update_v2_request_choice_scores.additional_properties = d + return eval_template_update_v2_request_choice_scores + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_code_language.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_code_language.py new file mode 100644 index 0000000..e57b431 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_code_language.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class EvalTemplateUpdateV2RequestCodeLanguage(str, Enum): + JAVASCRIPT = "javascript" + PYTHON = "python" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_data_injection.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_data_injection.py new file mode 100644 index 0000000..68a51d0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_data_injection.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateUpdateV2RequestDataInjection") + + +@_attrs_define +class EvalTemplateUpdateV2RequestDataInjection: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_update_v2_request_data_injection = cls() + + eval_template_update_v2_request_data_injection.additional_properties = d + return eval_template_update_v2_request_data_injection + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_eval_type.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_eval_type.py new file mode 100644 index 0000000..62412e3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_eval_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalTemplateUpdateV2RequestEvalType(str, Enum): + AGENT = "agent" + CODE = "code" + LLM = "llm" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_few_shot_examples_type_0_item.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_few_shot_examples_type_0_item.py new file mode 100644 index 0000000..c3ee9dc --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_few_shot_examples_type_0_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateUpdateV2RequestFewShotExamplesType0Item") + + +@_attrs_define +class EvalTemplateUpdateV2RequestFewShotExamplesType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_update_v2_request_few_shot_examples_type_0_item = cls() + + eval_template_update_v2_request_few_shot_examples_type_0_item.additional_properties = d + return eval_template_update_v2_request_few_shot_examples_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_messages_type_0_item.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_messages_type_0_item.py new file mode 100644 index 0000000..e25fa91 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_messages_type_0_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateUpdateV2RequestMessagesType0Item") + + +@_attrs_define +class EvalTemplateUpdateV2RequestMessagesType0Item: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_update_v2_request_messages_type_0_item = cls() + + eval_template_update_v2_request_messages_type_0_item.additional_properties = d + return eval_template_update_v2_request_messages_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_mode.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_mode.py new file mode 100644 index 0000000..c1c534e --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_mode.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalTemplateUpdateV2RequestMode(str, Enum): + AGENT = "agent" + AUTO = "auto" + QUICK = "quick" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_output_type.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_output_type.py new file mode 100644 index 0000000..b1230d5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_output_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class EvalTemplateUpdateV2RequestOutputType(str, Enum): + DETERMINISTIC = "deterministic" + PASS_FAIL = "pass_fail" + PERCENTAGE = "percentage" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_summary.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_summary.py new file mode 100644 index 0000000..ffdd582 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_summary.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateUpdateV2RequestSummary") + + +@_attrs_define +class EvalTemplateUpdateV2RequestSummary: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_update_v2_request_summary = cls() + + eval_template_update_v2_request_summary.additional_properties = d + return eval_template_update_v2_request_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_template_format.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_template_format.py new file mode 100644 index 0000000..14e302f --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_template_format.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class EvalTemplateUpdateV2RequestTemplateFormat(str, Enum): + JINJA = "jinja" + MUSTACHE = "mustache" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/eval_template_update_v2_request_tools.py b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_tools.py new file mode 100644 index 0000000..1b95f35 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_update_v2_request_tools.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateUpdateV2RequestTools") + + +@_attrs_define +class EvalTemplateUpdateV2RequestTools: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_update_v2_request_tools = cls() + + eval_template_update_v2_request_tools.additional_properties = d + return eval_template_update_v2_request_tools + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_create_request.py b/python/fi/generated/openapi_client/models/eval_template_version_create_request.py new file mode 100644 index 0000000..bdea702 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_create_request.py @@ -0,0 +1,121 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_template_version_create_request_config_snapshot import ( + EvalTemplateVersionCreateRequestConfigSnapshot, + ) + + +T = TypeVar("T", bound="EvalTemplateVersionCreateRequest") + + +@_attrs_define +class EvalTemplateVersionCreateRequest: + """ + Attributes: + criteria (None | str | Unset): + model (None | str | Unset): + config_snapshot (EvalTemplateVersionCreateRequestConfigSnapshot | Unset): + """ + + criteria: None | str | Unset = UNSET + model: None | str | Unset = UNSET + config_snapshot: EvalTemplateVersionCreateRequestConfigSnapshot | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + criteria: None | str | Unset + if isinstance(self.criteria, Unset): + criteria = UNSET + else: + criteria = self.criteria + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + config_snapshot: dict[str, Any] | Unset = UNSET + if not isinstance(self.config_snapshot, Unset): + config_snapshot = self.config_snapshot.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if criteria is not UNSET: + field_dict["criteria"] = criteria + if model is not UNSET: + field_dict["model"] = model + if config_snapshot is not UNSET: + field_dict["config_snapshot"] = config_snapshot + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_version_create_request_config_snapshot import ( + EvalTemplateVersionCreateRequestConfigSnapshot, + ) + + d = dict(src_dict) + + def _parse_criteria(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + criteria = _parse_criteria(d.pop("criteria", UNSET)) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + _config_snapshot = d.pop("config_snapshot", UNSET) + config_snapshot: EvalTemplateVersionCreateRequestConfigSnapshot | Unset + if isinstance(_config_snapshot, Unset): + config_snapshot = UNSET + else: + config_snapshot = EvalTemplateVersionCreateRequestConfigSnapshot.from_dict( + _config_snapshot + ) + + eval_template_version_create_request = cls( + criteria=criteria, + model=model, + config_snapshot=config_snapshot, + ) + + eval_template_version_create_request.additional_properties = d + return eval_template_version_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_create_request_config_snapshot.py b/python/fi/generated/openapi_client/models/eval_template_version_create_request_config_snapshot.py new file mode 100644 index 0000000..e2d9da2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_create_request_config_snapshot.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateVersionCreateRequestConfigSnapshot") + + +@_attrs_define +class EvalTemplateVersionCreateRequestConfigSnapshot: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_version_create_request_config_snapshot = cls() + + eval_template_version_create_request_config_snapshot.additional_properties = d + return eval_template_version_create_request_config_snapshot + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_item.py b/python/fi/generated/openapi_client/models/eval_template_version_item.py new file mode 100644 index 0000000..382047d --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_item.py @@ -0,0 +1,144 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_template_version_item_config_snapshot import ( + EvalTemplateVersionItemConfigSnapshot, + ) + + +T = TypeVar("T", bound="EvalTemplateVersionItem") + + +@_attrs_define +class EvalTemplateVersionItem: + """ + Attributes: + id (UUID): + version_number (int): + is_default (bool): + criteria (str | Unset): + model (str | Unset): + config_snapshot (EvalTemplateVersionItemConfigSnapshot | Unset): + created_by_name (str | Unset): + created_at (str | Unset): + """ + + id: UUID + version_number: int + is_default: bool + criteria: str | Unset = UNSET + model: str | Unset = UNSET + config_snapshot: EvalTemplateVersionItemConfigSnapshot | Unset = UNSET + created_by_name: str | Unset = UNSET + created_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + version_number = self.version_number + + is_default = self.is_default + + criteria = self.criteria + + model = self.model + + config_snapshot: dict[str, Any] | Unset = UNSET + if not isinstance(self.config_snapshot, Unset): + config_snapshot = self.config_snapshot.to_dict() + + created_by_name = self.created_by_name + + created_at = self.created_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "version_number": version_number, + "is_default": is_default, + } + ) + if criteria is not UNSET: + field_dict["criteria"] = criteria + if model is not UNSET: + field_dict["model"] = model + if config_snapshot is not UNSET: + field_dict["config_snapshot"] = config_snapshot + if created_by_name is not UNSET: + field_dict["created_by_name"] = created_by_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_version_item_config_snapshot import ( + EvalTemplateVersionItemConfigSnapshot, + ) + + d = dict(src_dict) + id = UUID(d.pop("id")) + + version_number = d.pop("version_number") + + is_default = d.pop("is_default") + + criteria = d.pop("criteria", UNSET) + + model = d.pop("model", UNSET) + + _config_snapshot = d.pop("config_snapshot", UNSET) + config_snapshot: EvalTemplateVersionItemConfigSnapshot | Unset + if isinstance(_config_snapshot, Unset): + config_snapshot = UNSET + else: + config_snapshot = EvalTemplateVersionItemConfigSnapshot.from_dict( + _config_snapshot + ) + + created_by_name = d.pop("created_by_name", UNSET) + + created_at = d.pop("created_at", UNSET) + + eval_template_version_item = cls( + id=id, + version_number=version_number, + is_default=is_default, + criteria=criteria, + model=model, + config_snapshot=config_snapshot, + created_by_name=created_by_name, + created_at=created_at, + ) + + eval_template_version_item.additional_properties = d + return eval_template_version_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_item_config_snapshot.py b/python/fi/generated/openapi_client/models/eval_template_version_item_config_snapshot.py new file mode 100644 index 0000000..f4f3ea8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_item_config_snapshot.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateVersionItemConfigSnapshot") + + +@_attrs_define +class EvalTemplateVersionItemConfigSnapshot: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_template_version_item_config_snapshot = cls() + + eval_template_version_item_config_snapshot.additional_properties = d + return eval_template_version_item_config_snapshot + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_list_response.py b/python/fi/generated/openapi_client/models/eval_template_version_list_response.py new file mode 100644 index 0000000..1815788 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_list_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_version_list_response_result import ( + EvalTemplateVersionListResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateVersionListResponse") + + +@_attrs_define +class EvalTemplateVersionListResponse: + """ + Attributes: + status (bool): + result (EvalTemplateVersionListResponseResult): + """ + + status: bool + result: EvalTemplateVersionListResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_version_list_response_result import ( + EvalTemplateVersionListResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateVersionListResponseResult.from_dict(d.pop("result")) + + eval_template_version_list_response = cls( + status=status, + result=result, + ) + + eval_template_version_list_response.additional_properties = d + return eval_template_version_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_list_response_result.py b/python/fi/generated/openapi_client/models/eval_template_version_list_response_result.py new file mode 100644 index 0000000..163d75f --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_list_response_result.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_version_item import EvalTemplateVersionItem + + +T = TypeVar("T", bound="EvalTemplateVersionListResponseResult") + + +@_attrs_define +class EvalTemplateVersionListResponseResult: + """ + Attributes: + template_id (UUID): + versions (list[EvalTemplateVersionItem]): + total (int): + """ + + template_id: UUID + versions: list[EvalTemplateVersionItem] + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_id = str(self.template_id) + + versions = [] + for versions_item_data in self.versions: + versions_item = versions_item_data.to_dict() + versions.append(versions_item) + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_id": template_id, + "versions": versions, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_version_item import EvalTemplateVersionItem + + d = dict(src_dict) + template_id = UUID(d.pop("template_id")) + + versions = [] + _versions = d.pop("versions") + for versions_item_data in _versions: + versions_item = EvalTemplateVersionItem.from_dict(versions_item_data) + + versions.append(versions_item) + + total = d.pop("total") + + eval_template_version_list_response_result = cls( + template_id=template_id, + versions=versions, + total=total, + ) + + eval_template_version_list_response_result.additional_properties = d + return eval_template_version_list_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_response.py b/python/fi/generated/openapi_client/models/eval_template_version_response.py new file mode 100644 index 0000000..7fee777 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_version_response_result import ( + EvalTemplateVersionResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateVersionResponse") + + +@_attrs_define +class EvalTemplateVersionResponse: + """ + Attributes: + status (bool): + result (EvalTemplateVersionResponseResult): + """ + + status: bool + result: EvalTemplateVersionResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_version_response_result import ( + EvalTemplateVersionResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateVersionResponseResult.from_dict(d.pop("result")) + + eval_template_version_response = cls( + status=status, + result=result, + ) + + eval_template_version_response.additional_properties = d + return eval_template_version_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_response_result.py b/python/fi/generated/openapi_client/models/eval_template_version_response_result.py new file mode 100644 index 0000000..e14b0b8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_response_result.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateVersionResponseResult") + + +@_attrs_define +class EvalTemplateVersionResponseResult: + """ + Attributes: + id (UUID): + version_number (int): + is_default (bool): + """ + + id: UUID + version_number: int + is_default: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + version_number = self.version_number + + is_default = self.is_default + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "version_number": version_number, + "is_default": is_default, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + version_number = d.pop("version_number") + + is_default = d.pop("is_default") + + eval_template_version_response_result = cls( + id=id, + version_number=version_number, + is_default=is_default, + ) + + eval_template_version_response_result.additional_properties = d + return eval_template_version_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_restore_response.py b/python/fi/generated/openapi_client/models/eval_template_version_restore_response.py new file mode 100644 index 0000000..e574396 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_restore_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_template_version_restore_response_result import ( + EvalTemplateVersionRestoreResponseResult, + ) + + +T = TypeVar("T", bound="EvalTemplateVersionRestoreResponse") + + +@_attrs_define +class EvalTemplateVersionRestoreResponse: + """ + Attributes: + status (bool): + result (EvalTemplateVersionRestoreResponseResult): + """ + + status: bool + result: EvalTemplateVersionRestoreResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_template_version_restore_response_result import ( + EvalTemplateVersionRestoreResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalTemplateVersionRestoreResponseResult.from_dict(d.pop("result")) + + eval_template_version_restore_response = cls( + status=status, + result=result, + ) + + eval_template_version_restore_response.additional_properties = d + return eval_template_version_restore_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_template_version_restore_response_result.py b/python/fi/generated/openapi_client/models/eval_template_version_restore_response_result.py new file mode 100644 index 0000000..11bcfe6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_template_version_restore_response_result.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalTemplateVersionRestoreResponseResult") + + +@_attrs_define +class EvalTemplateVersionRestoreResponseResult: + """ + Attributes: + id (UUID): + version_number (int): + is_default (bool): + restored_from (int): + """ + + id: UUID + version_number: int + is_default: bool + restored_from: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + version_number = self.version_number + + is_default = self.is_default + + restored_from = self.restored_from + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "version_number": version_number, + "is_default": is_default, + "restored_from": restored_from, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + version_number = d.pop("version_number") + + is_default = d.pop("is_default") + + restored_from = d.pop("restored_from") + + eval_template_version_restore_response_result = cls( + id=id, + version_number=version_number, + is_default=is_default, + restored_from=restored_from, + ) + + eval_template_version_restore_response_result.additional_properties = d + return eval_template_version_restore_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_chart_point.py b/python/fi/generated/openapi_client/models/eval_usage_chart_point.py new file mode 100644 index 0000000..cb1fa03 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_chart_point.py @@ -0,0 +1,119 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EvalUsageChartPoint") + + +@_attrs_define +class EvalUsageChartPoint: + """ + Attributes: + timestamp (str): + calls (int | Unset): + avg_latency_ms (int | Unset): + avg_score (float | None | Unset): + pass_count (int | Unset): + fail_count (int | Unset): + """ + + timestamp: str + calls: int | Unset = UNSET + avg_latency_ms: int | Unset = UNSET + avg_score: float | None | Unset = UNSET + pass_count: int | Unset = UNSET + fail_count: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + timestamp = self.timestamp + + calls = self.calls + + avg_latency_ms = self.avg_latency_ms + + avg_score: float | None | Unset + if isinstance(self.avg_score, Unset): + avg_score = UNSET + else: + avg_score = self.avg_score + + pass_count = self.pass_count + + fail_count = self.fail_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "timestamp": timestamp, + } + ) + if calls is not UNSET: + field_dict["calls"] = calls + if avg_latency_ms is not UNSET: + field_dict["avg_latency_ms"] = avg_latency_ms + if avg_score is not UNSET: + field_dict["avg_score"] = avg_score + if pass_count is not UNSET: + field_dict["pass_count"] = pass_count + if fail_count is not UNSET: + field_dict["fail_count"] = fail_count + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + timestamp = d.pop("timestamp") + + calls = d.pop("calls", UNSET) + + avg_latency_ms = d.pop("avg_latency_ms", UNSET) + + def _parse_avg_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_score = _parse_avg_score(d.pop("avg_score", UNSET)) + + pass_count = d.pop("pass_count", UNSET) + + fail_count = d.pop("fail_count", UNSET) + + eval_usage_chart_point = cls( + timestamp=timestamp, + calls=calls, + avg_latency_ms=avg_latency_ms, + avg_score=avg_score, + pass_count=pass_count, + fail_count=fail_count, + ) + + eval_usage_chart_point.additional_properties = d + return eval_usage_chart_point + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_feedback.py b/python/fi/generated/openapi_client/models/eval_usage_feedback.py new file mode 100644 index 0000000..7a1968e --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_feedback.py @@ -0,0 +1,122 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_usage_feedback_value import EvalUsageFeedbackValue + + +T = TypeVar("T", bound="EvalUsageFeedback") + + +@_attrs_define +class EvalUsageFeedback: + """ + Attributes: + id (UUID): + value (EvalUsageFeedbackValue | Unset): + explanation (str | Unset): + action_type (str | Unset): + created_at (str | Unset): + user (str | Unset): + """ + + id: UUID + value: EvalUsageFeedbackValue | Unset = UNSET + explanation: str | Unset = UNSET + action_type: str | Unset = UNSET + created_at: str | Unset = UNSET + user: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + value: dict[str, Any] | Unset = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + explanation = self.explanation + + action_type = self.action_type + + created_at = self.created_at + + user = self.user + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + } + ) + if value is not UNSET: + field_dict["value"] = value + if explanation is not UNSET: + field_dict["explanation"] = explanation + if action_type is not UNSET: + field_dict["action_type"] = action_type + if created_at is not UNSET: + field_dict["created_at"] = created_at + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_usage_feedback_value import EvalUsageFeedbackValue + + d = dict(src_dict) + id = UUID(d.pop("id")) + + _value = d.pop("value", UNSET) + value: EvalUsageFeedbackValue | Unset + if isinstance(_value, Unset): + value = UNSET + else: + value = EvalUsageFeedbackValue.from_dict(_value) + + explanation = d.pop("explanation", UNSET) + + action_type = d.pop("action_type", UNSET) + + created_at = d.pop("created_at", UNSET) + + user = d.pop("user", UNSET) + + eval_usage_feedback = cls( + id=id, + value=value, + explanation=explanation, + action_type=action_type, + created_at=created_at, + user=user, + ) + + eval_usage_feedback.additional_properties = d + return eval_usage_feedback + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_feedback_value.py b/python/fi/generated/openapi_client/models/eval_usage_feedback_value.py new file mode 100644 index 0000000..6d51d04 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_feedback_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalUsageFeedbackValue") + + +@_attrs_define +class EvalUsageFeedbackValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_usage_feedback_value = cls() + + eval_usage_feedback_value.additional_properties = d + return eval_usage_feedback_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_log_item.py b/python/fi/generated/openapi_client/models/eval_usage_log_item.py new file mode 100644 index 0000000..135dc52 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_log_item.py @@ -0,0 +1,196 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_usage_feedback import EvalUsageFeedback + from ..models.eval_usage_log_item_detail import EvalUsageLogItemDetail + + +T = TypeVar("T", bound="EvalUsageLogItem") + + +@_attrs_define +class EvalUsageLogItem: + """ + Attributes: + id (UUID): + input_ (str): + status (str): + created_at (str): + detail (EvalUsageLogItemDetail): + result (str | Unset): + score (float | None | Unset): + reason (str | Unset): + source (str | Unset): + feedback (EvalUsageFeedback | Unset): + composite (bool | Unset): + aggregate_pass (bool | None | Unset): + """ + + id: UUID + input_: str + status: str + created_at: str + detail: EvalUsageLogItemDetail + result: str | Unset = UNSET + score: float | None | Unset = UNSET + reason: str | Unset = UNSET + source: str | Unset = UNSET + feedback: EvalUsageFeedback | Unset = UNSET + composite: bool | Unset = UNSET + aggregate_pass: bool | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + input_ = self.input_ + + status = self.status + + created_at = self.created_at + + detail = self.detail.to_dict() + + result = self.result + + score: float | None | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + reason = self.reason + + source = self.source + + feedback: dict[str, Any] | Unset = UNSET + if not isinstance(self.feedback, Unset): + feedback = self.feedback.to_dict() + + composite = self.composite + + aggregate_pass: bool | None | Unset + if isinstance(self.aggregate_pass, Unset): + aggregate_pass = UNSET + else: + aggregate_pass = self.aggregate_pass + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "input": input_, + "status": status, + "created_at": created_at, + "detail": detail, + } + ) + if result is not UNSET: + field_dict["result"] = result + if score is not UNSET: + field_dict["score"] = score + if reason is not UNSET: + field_dict["reason"] = reason + if source is not UNSET: + field_dict["source"] = source + if feedback is not UNSET: + field_dict["feedback"] = feedback + if composite is not UNSET: + field_dict["composite"] = composite + if aggregate_pass is not UNSET: + field_dict["aggregate_pass"] = aggregate_pass + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_usage_feedback import EvalUsageFeedback + from ..models.eval_usage_log_item_detail import EvalUsageLogItemDetail + + d = dict(src_dict) + id = UUID(d.pop("id")) + + input_ = d.pop("input") + + status = d.pop("status") + + created_at = d.pop("created_at") + + detail = EvalUsageLogItemDetail.from_dict(d.pop("detail")) + + result = d.pop("result", UNSET) + + def _parse_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + reason = d.pop("reason", UNSET) + + source = d.pop("source", UNSET) + + _feedback = d.pop("feedback", UNSET) + feedback: EvalUsageFeedback | Unset + if isinstance(_feedback, Unset): + feedback = UNSET + else: + feedback = EvalUsageFeedback.from_dict(_feedback) + + composite = d.pop("composite", UNSET) + + def _parse_aggregate_pass(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + aggregate_pass = _parse_aggregate_pass(d.pop("aggregate_pass", UNSET)) + + eval_usage_log_item = cls( + id=id, + input_=input_, + status=status, + created_at=created_at, + detail=detail, + result=result, + score=score, + reason=reason, + source=source, + feedback=feedback, + composite=composite, + aggregate_pass=aggregate_pass, + ) + + eval_usage_log_item.additional_properties = d + return eval_usage_log_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_log_item_detail.py b/python/fi/generated/openapi_client/models/eval_usage_log_item_detail.py new file mode 100644 index 0000000..1c011d2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_log_item_detail.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalUsageLogItemDetail") + + +@_attrs_define +class EvalUsageLogItemDetail: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_usage_log_item_detail = cls() + + eval_usage_log_item_detail.additional_properties = d + return eval_usage_log_item_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_logs.py b/python/fi/generated/openapi_client/models/eval_usage_logs.py new file mode 100644 index 0000000..f1995a5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_logs.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_usage_log_item import EvalUsageLogItem + + +T = TypeVar("T", bound="EvalUsageLogs") + + +@_attrs_define +class EvalUsageLogs: + """ + Attributes: + items (list[EvalUsageLogItem]): + total (int): + page (int): + page_size (int): + """ + + items: list[EvalUsageLogItem] + total: int + page: int + page_size: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + page_size = self.page_size + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "page_size": page_size, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_usage_log_item import EvalUsageLogItem + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = EvalUsageLogItem.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + page_size = d.pop("page_size") + + eval_usage_logs = cls( + items=items, + total=total, + page=page, + page_size=page_size, + ) + + eval_usage_logs.additional_properties = d + return eval_usage_logs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_stats.py b/python/fi/generated/openapi_client/models/eval_usage_stats.py new file mode 100644 index 0000000..fcd9699 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_stats.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvalUsageStats") + + +@_attrs_define +class EvalUsageStats: + """ + Attributes: + total_runs (int): + runs_period (int): + success_count (int): + error_count (int): + pass_rate (float): + """ + + total_runs: int + runs_period: int + success_count: int + error_count: int + pass_rate: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total_runs = self.total_runs + + runs_period = self.runs_period + + success_count = self.success_count + + error_count = self.error_count + + pass_rate = self.pass_rate + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "total_runs": total_runs, + "runs_period": runs_period, + "success_count": success_count, + "error_count": error_count, + "pass_rate": pass_rate, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + total_runs = d.pop("total_runs") + + runs_period = d.pop("runs_period") + + success_count = d.pop("success_count") + + error_count = d.pop("error_count") + + pass_rate = d.pop("pass_rate") + + eval_usage_stats = cls( + total_runs=total_runs, + runs_period=runs_period, + success_count=success_count, + error_count=error_count, + pass_rate=pass_rate, + ) + + eval_usage_stats.additional_properties = d + return eval_usage_stats + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_stats_response.py b/python/fi/generated/openapi_client/models/eval_usage_stats_response.py new file mode 100644 index 0000000..043b92e --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_stats_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_usage_stats_response_result import EvalUsageStatsResponseResult + + +T = TypeVar("T", bound="EvalUsageStatsResponse") + + +@_attrs_define +class EvalUsageStatsResponse: + """ + Attributes: + status (bool): + result (EvalUsageStatsResponseResult): + """ + + status: bool + result: EvalUsageStatsResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_usage_stats_response_result import ( + EvalUsageStatsResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = EvalUsageStatsResponseResult.from_dict(d.pop("result")) + + eval_usage_stats_response = cls( + status=status, + result=result, + ) + + eval_usage_stats_response.additional_properties = d + return eval_usage_stats_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/eval_usage_stats_response_result.py b/python/fi/generated/openapi_client/models/eval_usage_stats_response_result.py new file mode 100644 index 0000000..015e8d7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/eval_usage_stats_response_result.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.eval_usage_chart_point import EvalUsageChartPoint + from ..models.eval_usage_logs import EvalUsageLogs + from ..models.eval_usage_stats import EvalUsageStats + + +T = TypeVar("T", bound="EvalUsageStatsResponseResult") + + +@_attrs_define +class EvalUsageStatsResponseResult: + """ + Attributes: + template_id (UUID): + is_composite (bool): + stats (EvalUsageStats): + chart (list[EvalUsageChartPoint]): + logs (EvalUsageLogs): + """ + + template_id: UUID + is_composite: bool + stats: EvalUsageStats + chart: list[EvalUsageChartPoint] + logs: EvalUsageLogs + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_id = str(self.template_id) + + is_composite = self.is_composite + + stats = self.stats.to_dict() + + chart = [] + for chart_item_data in self.chart: + chart_item = chart_item_data.to_dict() + chart.append(chart_item) + + logs = self.logs.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_id": template_id, + "is_composite": is_composite, + "stats": stats, + "chart": chart, + "logs": logs, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_usage_chart_point import EvalUsageChartPoint + from ..models.eval_usage_logs import EvalUsageLogs + from ..models.eval_usage_stats import EvalUsageStats + + d = dict(src_dict) + template_id = UUID(d.pop("template_id")) + + is_composite = d.pop("is_composite") + + stats = EvalUsageStats.from_dict(d.pop("stats")) + + chart = [] + _chart = d.pop("chart") + for chart_item_data in _chart: + chart_item = EvalUsageChartPoint.from_dict(chart_item_data) + + chart.append(chart_item) + + logs = EvalUsageLogs.from_dict(d.pop("logs")) + + eval_usage_stats_response_result = cls( + template_id=template_id, + is_composite=is_composite, + stats=stats, + chart=chart, + logs=logs, + ) + + eval_usage_stats_response_result.additional_properties = d + return eval_usage_stats_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/evaluation_result.py b/python/fi/generated/openapi_client/models/evaluation_result.py new file mode 100644 index 0000000..ea641ad --- /dev/null +++ b/python/fi/generated/openapi_client/models/evaluation_result.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EvaluationResult") + + +@_attrs_define +class EvaluationResult: + """ + Attributes: + label (str): + type_ (str): + result (str): + score (float | None): + value (None | str): + """ + + label: str + type_: str + result: str + score: float | None + value: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label = self.label + + type_ = self.type_ + + result = self.result + + score: float | None + score = self.score + + value: None | str + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label": label, + "type": type_, + "result": result, + "score": score, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + label = d.pop("label") + + type_ = d.pop("type") + + result = d.pop("result") + + def _parse_score(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + score = _parse_score(d.pop("score")) + + def _parse_value(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + value = _parse_value(d.pop("value")) + + evaluation_result = cls( + label=label, + type_=type_, + result=result, + score=score, + value=value, + ) + + evaluation_result.additional_properties = d + return evaluation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/events_over_time_point.py b/python/fi/generated/openapi_client/models/events_over_time_point.py new file mode 100644 index 0000000..9439f7b --- /dev/null +++ b/python/fi/generated/openapi_client/models/events_over_time_point.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="EventsOverTimePoint") + + +@_attrs_define +class EventsOverTimePoint: + """ + Attributes: + date (str): + errors (int): + passing (int): + users (int): + """ + + date: str + errors: int + passing: int + users: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + date = self.date + + errors = self.errors + + passing = self.passing + + users = self.users + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "date": date, + "errors": errors, + "passing": passing, + "users": users, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + date = d.pop("date") + + errors = d.pop("errors") + + passing = d.pop("passing") + + users = d.pop("users") + + events_over_time_point = cls( + date=date, + errors=errors, + passing=passing, + users=users, + ) + + events_over_time_point.additional_properties = d + return events_over_time_point + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/execute_prompt_simulation_request.py b/python/fi/generated/openapi_client/models/execute_prompt_simulation_request.py new file mode 100644 index 0000000..971a399 --- /dev/null +++ b/python/fi/generated/openapi_client/models/execute_prompt_simulation_request.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExecutePromptSimulationRequest") + + +@_attrs_define +class ExecutePromptSimulationRequest: + """ + Attributes: + scenario_ids (list[UUID] | Unset): + select_all (bool | Unset): Default: False. + """ + + scenario_ids: list[UUID] | Unset = UNSET + select_all: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + scenario_ids: list[str] | Unset = UNSET + if not isinstance(self.scenario_ids, Unset): + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + select_all = self.select_all + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if scenario_ids is not UNSET: + field_dict["scenario_ids"] = scenario_ids + if select_all is not UNSET: + field_dict["select_all"] = select_all + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _scenario_ids = d.pop("scenario_ids", UNSET) + scenario_ids: list[UUID] | Unset = UNSET + if _scenario_ids is not UNSET: + scenario_ids = [] + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + select_all = d.pop("select_all", UNSET) + + execute_prompt_simulation_request = cls( + scenario_ids=scenario_ids, + select_all=select_all, + ) + + execute_prompt_simulation_request.additional_properties = d + return execute_prompt_simulation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/execute_prompt_simulation_response.py b/python/fi/generated/openapi_client/models/execute_prompt_simulation_response.py new file mode 100644 index 0000000..2b458a2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/execute_prompt_simulation_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.execute_prompt_simulation_result import ExecutePromptSimulationResult + + +T = TypeVar("T", bound="ExecutePromptSimulationResponse") + + +@_attrs_define +class ExecutePromptSimulationResponse: + """ + Attributes: + result (ExecutePromptSimulationResult): + status (bool | Unset): Default: True. + """ + + result: ExecutePromptSimulationResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.execute_prompt_simulation_result import ( + ExecutePromptSimulationResult, + ) + + d = dict(src_dict) + result = ExecutePromptSimulationResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + execute_prompt_simulation_response = cls( + result=result, + status=status, + ) + + execute_prompt_simulation_response.additional_properties = d + return execute_prompt_simulation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/execute_prompt_simulation_result.py b/python/fi/generated/openapi_client/models/execute_prompt_simulation_result.py new file mode 100644 index 0000000..faae4e0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/execute_prompt_simulation_result.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExecutePromptSimulationResult") + + +@_attrs_define +class ExecutePromptSimulationResult: + """ + Attributes: + scenario_ids (list[UUID]): + message (str | Unset): + execution_id (UUID | Unset): + run_test_id (UUID | Unset): + status (str | Unset): + total_scenarios (int | Unset): + total_calls (int | Unset): + """ + + scenario_ids: list[UUID] + message: str | Unset = UNSET + execution_id: UUID | Unset = UNSET + run_test_id: UUID | Unset = UNSET + status: str | Unset = UNSET + total_scenarios: int | Unset = UNSET + total_calls: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + message = self.message + + execution_id: str | Unset = UNSET + if not isinstance(self.execution_id, Unset): + execution_id = str(self.execution_id) + + run_test_id: str | Unset = UNSET + if not isinstance(self.run_test_id, Unset): + run_test_id = str(self.run_test_id) + + status = self.status + + total_scenarios = self.total_scenarios + + total_calls = self.total_calls + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "scenario_ids": scenario_ids, + } + ) + if message is not UNSET: + field_dict["message"] = message + if execution_id is not UNSET: + field_dict["execution_id"] = execution_id + if run_test_id is not UNSET: + field_dict["run_test_id"] = run_test_id + if status is not UNSET: + field_dict["status"] = status + if total_scenarios is not UNSET: + field_dict["total_scenarios"] = total_scenarios + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + scenario_ids = [] + _scenario_ids = d.pop("scenario_ids") + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + message = d.pop("message", UNSET) + + _execution_id = d.pop("execution_id", UNSET) + execution_id: UUID | Unset + if isinstance(_execution_id, Unset): + execution_id = UNSET + else: + execution_id = UUID(_execution_id) + + _run_test_id = d.pop("run_test_id", UNSET) + run_test_id: UUID | Unset + if isinstance(_run_test_id, Unset): + run_test_id = UNSET + else: + run_test_id = UUID(_run_test_id) + + status = d.pop("status", UNSET) + + total_scenarios = d.pop("total_scenarios", UNSET) + + total_calls = d.pop("total_calls", UNSET) + + execute_prompt_simulation_result = cls( + scenario_ids=scenario_ids, + message=message, + execution_id=execution_id, + run_test_id=run_test_id, + status=status, + total_scenarios=total_scenarios, + total_calls=total_calls, + ) + + execute_prompt_simulation_result.additional_properties = d + return execute_prompt_simulation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/execute_run_test.py b/python/fi/generated/openapi_client/models/execute_run_test.py new file mode 100644 index 0000000..4ac1d14 --- /dev/null +++ b/python/fi/generated/openapi_client/models/execute_run_test.py @@ -0,0 +1,113 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExecuteRunTest") + + +@_attrs_define +class ExecuteRunTest: + """ + Attributes: + scenario_ids (list[UUID] | Unset): + simulator_id (None | Unset | UUID): + select_all (bool | Unset): Default: False. + """ + + scenario_ids: list[UUID] | Unset = UNSET + simulator_id: None | Unset | UUID = UNSET + select_all: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + scenario_ids: list[str] | Unset = UNSET + if not isinstance(self.scenario_ids, Unset): + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + simulator_id: None | str | Unset + if isinstance(self.simulator_id, Unset): + simulator_id = UNSET + elif isinstance(self.simulator_id, UUID): + simulator_id = str(self.simulator_id) + else: + simulator_id = self.simulator_id + + select_all = self.select_all + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if scenario_ids is not UNSET: + field_dict["scenario_ids"] = scenario_ids + if simulator_id is not UNSET: + field_dict["simulator_id"] = simulator_id + if select_all is not UNSET: + field_dict["select_all"] = select_all + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _scenario_ids = d.pop("scenario_ids", UNSET) + scenario_ids: list[UUID] | Unset = UNSET + if _scenario_ids is not UNSET: + scenario_ids = [] + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + def _parse_simulator_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + simulator_id_type_0 = UUID(data) + + return simulator_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + simulator_id = _parse_simulator_id(d.pop("simulator_id", UNSET)) + + select_all = d.pop("select_all", UNSET) + + execute_run_test = cls( + scenario_ids=scenario_ids, + simulator_id=simulator_id, + select_all=select_all, + ) + + execute_run_test.additional_properties = d + return execute_run_test + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/execution_metrics.py b/python/fi/generated/openapi_client/models/execution_metrics.py new file mode 100644 index 0000000..83b7b10 --- /dev/null +++ b/python/fi/generated/openapi_client/models/execution_metrics.py @@ -0,0 +1,165 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.execution_metrics_status import ExecutionMetricsStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExecutionMetrics") + + +@_attrs_define +class ExecutionMetrics: + """ + Attributes: + execution_id (UUID): + status (ExecutionMetricsStatus | Unset): Current status of the test execution + started_at (datetime.datetime | Unset): When the test execution started + completed_at (datetime.datetime | None | Unset): When the test execution completed + total_calls (int | Unset): Total number of calls to be made + completed_calls (int | Unset): Number of successfully completed calls + failed_calls (int | Unset): Number of failed calls + metrics (str | Unset): + """ + + execution_id: UUID + status: ExecutionMetricsStatus | Unset = UNSET + started_at: datetime.datetime | Unset = UNSET + completed_at: datetime.datetime | None | Unset = UNSET + total_calls: int | Unset = UNSET + completed_calls: int | Unset = UNSET + failed_calls: int | Unset = UNSET + metrics: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + execution_id = str(self.execution_id) + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + started_at: str | Unset = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + elif isinstance(self.completed_at, datetime.datetime): + completed_at = self.completed_at.isoformat() + else: + completed_at = self.completed_at + + total_calls = self.total_calls + + completed_calls = self.completed_calls + + failed_calls = self.failed_calls + + metrics = self.metrics + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "execution_id": execution_id, + } + ) + if status is not UNSET: + field_dict["status"] = status + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if completed_calls is not UNSET: + field_dict["completed_calls"] = completed_calls + if failed_calls is not UNSET: + field_dict["failed_calls"] = failed_calls + if metrics is not UNSET: + field_dict["metrics"] = metrics + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + execution_id = UUID(d.pop("execution_id")) + + _status = d.pop("status", UNSET) + status: ExecutionMetricsStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = ExecutionMetricsStatus(_status) + + _started_at = d.pop("started_at", UNSET) + started_at: datetime.datetime | Unset + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_at_type_0 = isoparse(data) + + return completed_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + total_calls = d.pop("total_calls", UNSET) + + completed_calls = d.pop("completed_calls", UNSET) + + failed_calls = d.pop("failed_calls", UNSET) + + metrics = d.pop("metrics", UNSET) + + execution_metrics = cls( + execution_id=execution_id, + status=status, + started_at=started_at, + completed_at=completed_at, + total_calls=total_calls, + completed_calls=completed_calls, + failed_calls=failed_calls, + metrics=metrics, + ) + + execution_metrics.additional_properties = d + return execution_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/execution_metrics_status.py b/python/fi/generated/openapi_client/models/execution_metrics_status.py new file mode 100644 index 0000000..f5ecc51 --- /dev/null +++ b/python/fi/generated/openapi_client/models/execution_metrics_status.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class ExecutionMetricsStatus(str, Enum): + CANCELLED = "cancelled" + CANCELLING = "cancelling" + COMPLETED = "completed" + EVALUATING = "evaluating" + FAILED = "failed" + PENDING = "pending" + RUNNING = "running" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/execution_runs.py b/python/fi/generated/openapi_client/models/execution_runs.py new file mode 100644 index 0000000..ecaa67a --- /dev/null +++ b/python/fi/generated/openapi_client/models/execution_runs.py @@ -0,0 +1,165 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.execution_runs_status import ExecutionRunsStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExecutionRuns") + + +@_attrs_define +class ExecutionRuns: + """ + Attributes: + execution_id (UUID): + status (ExecutionRunsStatus | Unset): Current status of the test execution + started_at (datetime.datetime | Unset): When the test execution started + completed_at (datetime.datetime | None | Unset): When the test execution completed + total_calls (int | Unset): Total number of calls to be made + completed_calls (int | Unset): Number of successfully completed calls + failed_calls (int | Unset): Number of failed calls + eval_results (str | Unset): + """ + + execution_id: UUID + status: ExecutionRunsStatus | Unset = UNSET + started_at: datetime.datetime | Unset = UNSET + completed_at: datetime.datetime | None | Unset = UNSET + total_calls: int | Unset = UNSET + completed_calls: int | Unset = UNSET + failed_calls: int | Unset = UNSET + eval_results: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + execution_id = str(self.execution_id) + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + started_at: str | Unset = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + elif isinstance(self.completed_at, datetime.datetime): + completed_at = self.completed_at.isoformat() + else: + completed_at = self.completed_at + + total_calls = self.total_calls + + completed_calls = self.completed_calls + + failed_calls = self.failed_calls + + eval_results = self.eval_results + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "execution_id": execution_id, + } + ) + if status is not UNSET: + field_dict["status"] = status + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if completed_calls is not UNSET: + field_dict["completed_calls"] = completed_calls + if failed_calls is not UNSET: + field_dict["failed_calls"] = failed_calls + if eval_results is not UNSET: + field_dict["eval_results"] = eval_results + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + execution_id = UUID(d.pop("execution_id")) + + _status = d.pop("status", UNSET) + status: ExecutionRunsStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = ExecutionRunsStatus(_status) + + _started_at = d.pop("started_at", UNSET) + started_at: datetime.datetime | Unset + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_at_type_0 = isoparse(data) + + return completed_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + total_calls = d.pop("total_calls", UNSET) + + completed_calls = d.pop("completed_calls", UNSET) + + failed_calls = d.pop("failed_calls", UNSET) + + eval_results = d.pop("eval_results", UNSET) + + execution_runs = cls( + execution_id=execution_id, + status=status, + started_at=started_at, + completed_at=completed_at, + total_calls=total_calls, + completed_calls=completed_calls, + failed_calls=failed_calls, + eval_results=eval_results, + ) + + execution_runs.additional_properties = d + return execution_runs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/execution_runs_status.py b/python/fi/generated/openapi_client/models/execution_runs_status.py new file mode 100644 index 0000000..a5fc62f --- /dev/null +++ b/python/fi/generated/openapi_client/models/execution_runs_status.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class ExecutionRunsStatus(str, Enum): + CANCELLED = "cancelled" + CANCELLING = "cancelling" + COMPLETED = "completed" + EVALUATING = "evaluating" + FAILED = "failed" + PENDING = "pending" + RUNNING = "running" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_column_metric.py b/python/fi/generated/openapi_client/models/experiment_comparison_column_metric.py new file mode 100644 index 0000000..0327947 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_column_metric.py @@ -0,0 +1,122 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_comparison_column_metric_avg_score import ( + ExperimentComparisonColumnMetricAvgScore, + ) + + +T = TypeVar("T", bound="ExperimentComparisonColumnMetric") + + +@_attrs_define +class ExperimentComparisonColumnMetric: + """ + Attributes: + column_id (UUID): + column_name (str): + avg_completion_tokens (float): + avg_total_tokens (float): + avg_response_time (float): + avg_score (ExperimentComparisonColumnMetricAvgScore | Unset): + """ + + column_id: UUID + column_name: str + avg_completion_tokens: float + avg_total_tokens: float + avg_response_time: float + avg_score: ExperimentComparisonColumnMetricAvgScore | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id = str(self.column_id) + + column_name = self.column_name + + avg_completion_tokens = self.avg_completion_tokens + + avg_total_tokens = self.avg_total_tokens + + avg_response_time = self.avg_response_time + + avg_score: dict[str, Any] | Unset = UNSET + if not isinstance(self.avg_score, Unset): + avg_score = self.avg_score.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_id": column_id, + "column_name": column_name, + "avg_completion_tokens": avg_completion_tokens, + "avg_total_tokens": avg_total_tokens, + "avg_response_time": avg_response_time, + } + ) + if avg_score is not UNSET: + field_dict["avg_score"] = avg_score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_column_metric_avg_score import ( + ExperimentComparisonColumnMetricAvgScore, + ) + + d = dict(src_dict) + column_id = UUID(d.pop("column_id")) + + column_name = d.pop("column_name") + + avg_completion_tokens = d.pop("avg_completion_tokens") + + avg_total_tokens = d.pop("avg_total_tokens") + + avg_response_time = d.pop("avg_response_time") + + _avg_score = d.pop("avg_score", UNSET) + avg_score: ExperimentComparisonColumnMetricAvgScore | Unset + if isinstance(_avg_score, Unset): + avg_score = UNSET + else: + avg_score = ExperimentComparisonColumnMetricAvgScore.from_dict(_avg_score) + + experiment_comparison_column_metric = cls( + column_id=column_id, + column_name=column_name, + avg_completion_tokens=avg_completion_tokens, + avg_total_tokens=avg_total_tokens, + avg_response_time=avg_response_time, + avg_score=avg_score, + ) + + experiment_comparison_column_metric.additional_properties = d + return experiment_comparison_column_metric + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_column_metric_avg_score.py b/python/fi/generated/openapi_client/models/experiment_comparison_column_metric_avg_score.py new file mode 100644 index 0000000..cf7015c --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_column_metric_avg_score.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentComparisonColumnMetricAvgScore") + + +@_attrs_define +class ExperimentComparisonColumnMetricAvgScore: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_comparison_column_metric_avg_score = cls() + + experiment_comparison_column_metric_avg_score.additional_properties = d + return experiment_comparison_column_metric_avg_score + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric.py b/python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric.py new file mode 100644 index 0000000..4d2f5c0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric.py @@ -0,0 +1,263 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_comparison_column_metric import ( + ExperimentComparisonColumnMetric, + ) + from ..models.experiment_comparison_dataset_metric_normalized_scores import ( + ExperimentComparisonDatasetMetricNormalizedScores, + ) + + +T = TypeVar("T", bound="ExperimentComparisonDatasetMetric") + + +@_attrs_define +class ExperimentComparisonDatasetMetric: + """ + Attributes: + dataset_id (UUID): + avg_completion_tokens (float | None | Unset): + avg_total_tokens (float | None | Unset): + avg_response_time (float | None | Unset): + avg_score (float | None | Unset): + columns (list[ExperimentComparisonColumnMetric] | Unset): + normalized_scores (ExperimentComparisonDatasetMetricNormalizedScores | Unset): + overall_rating (float | None | Unset): + rank (int | None | Unset): + rank_suffix (str | Unset): + total_datasets (int | Unset): + """ + + dataset_id: UUID + avg_completion_tokens: float | None | Unset = UNSET + avg_total_tokens: float | None | Unset = UNSET + avg_response_time: float | None | Unset = UNSET + avg_score: float | None | Unset = UNSET + columns: list[ExperimentComparisonColumnMetric] | Unset = UNSET + normalized_scores: ExperimentComparisonDatasetMetricNormalizedScores | Unset = UNSET + overall_rating: float | None | Unset = UNSET + rank: int | None | Unset = UNSET + rank_suffix: str | Unset = UNSET + total_datasets: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + avg_completion_tokens: float | None | Unset + if isinstance(self.avg_completion_tokens, Unset): + avg_completion_tokens = UNSET + else: + avg_completion_tokens = self.avg_completion_tokens + + avg_total_tokens: float | None | Unset + if isinstance(self.avg_total_tokens, Unset): + avg_total_tokens = UNSET + else: + avg_total_tokens = self.avg_total_tokens + + avg_response_time: float | None | Unset + if isinstance(self.avg_response_time, Unset): + avg_response_time = UNSET + else: + avg_response_time = self.avg_response_time + + avg_score: float | None | Unset + if isinstance(self.avg_score, Unset): + avg_score = UNSET + else: + avg_score = self.avg_score + + columns: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.columns, Unset): + columns = [] + for columns_item_data in self.columns: + columns_item = columns_item_data.to_dict() + columns.append(columns_item) + + normalized_scores: dict[str, Any] | Unset = UNSET + if not isinstance(self.normalized_scores, Unset): + normalized_scores = self.normalized_scores.to_dict() + + overall_rating: float | None | Unset + if isinstance(self.overall_rating, Unset): + overall_rating = UNSET + else: + overall_rating = self.overall_rating + + rank: int | None | Unset + if isinstance(self.rank, Unset): + rank = UNSET + else: + rank = self.rank + + rank_suffix = self.rank_suffix + + total_datasets = self.total_datasets + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + } + ) + if avg_completion_tokens is not UNSET: + field_dict["avg_completion_tokens"] = avg_completion_tokens + if avg_total_tokens is not UNSET: + field_dict["avg_total_tokens"] = avg_total_tokens + if avg_response_time is not UNSET: + field_dict["avg_response_time"] = avg_response_time + if avg_score is not UNSET: + field_dict["avg_score"] = avg_score + if columns is not UNSET: + field_dict["columns"] = columns + if normalized_scores is not UNSET: + field_dict["normalized_scores"] = normalized_scores + if overall_rating is not UNSET: + field_dict["overall_rating"] = overall_rating + if rank is not UNSET: + field_dict["rank"] = rank + if rank_suffix is not UNSET: + field_dict["rank_suffix"] = rank_suffix + if total_datasets is not UNSET: + field_dict["total_datasets"] = total_datasets + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_column_metric import ( + ExperimentComparisonColumnMetric, + ) + from ..models.experiment_comparison_dataset_metric_normalized_scores import ( + ExperimentComparisonDatasetMetricNormalizedScores, + ) + + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + def _parse_avg_completion_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_completion_tokens = _parse_avg_completion_tokens( + d.pop("avg_completion_tokens", UNSET) + ) + + def _parse_avg_total_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_total_tokens = _parse_avg_total_tokens(d.pop("avg_total_tokens", UNSET)) + + def _parse_avg_response_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_response_time = _parse_avg_response_time(d.pop("avg_response_time", UNSET)) + + def _parse_avg_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_score = _parse_avg_score(d.pop("avg_score", UNSET)) + + _columns = d.pop("columns", UNSET) + columns: list[ExperimentComparisonColumnMetric] | Unset = UNSET + if _columns is not UNSET: + columns = [] + for columns_item_data in _columns: + columns_item = ExperimentComparisonColumnMetric.from_dict( + columns_item_data + ) + + columns.append(columns_item) + + _normalized_scores = d.pop("normalized_scores", UNSET) + normalized_scores: ExperimentComparisonDatasetMetricNormalizedScores | Unset + if isinstance(_normalized_scores, Unset): + normalized_scores = UNSET + else: + normalized_scores = ( + ExperimentComparisonDatasetMetricNormalizedScores.from_dict( + _normalized_scores + ) + ) + + def _parse_overall_rating(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + overall_rating = _parse_overall_rating(d.pop("overall_rating", UNSET)) + + def _parse_rank(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + rank = _parse_rank(d.pop("rank", UNSET)) + + rank_suffix = d.pop("rank_suffix", UNSET) + + total_datasets = d.pop("total_datasets", UNSET) + + experiment_comparison_dataset_metric = cls( + dataset_id=dataset_id, + avg_completion_tokens=avg_completion_tokens, + avg_total_tokens=avg_total_tokens, + avg_response_time=avg_response_time, + avg_score=avg_score, + columns=columns, + normalized_scores=normalized_scores, + overall_rating=overall_rating, + rank=rank, + rank_suffix=rank_suffix, + total_datasets=total_datasets, + ) + + experiment_comparison_dataset_metric.additional_properties = d + return experiment_comparison_dataset_metric + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric_normalized_scores.py b/python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric_normalized_scores.py new file mode 100644 index 0000000..866eb58 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_dataset_metric_normalized_scores.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentComparisonDatasetMetricNormalizedScores") + + +@_attrs_define +class ExperimentComparisonDatasetMetricNormalizedScores: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_comparison_dataset_metric_normalized_scores = cls() + + experiment_comparison_dataset_metric_normalized_scores.additional_properties = d + return experiment_comparison_dataset_metric_normalized_scores + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_detail.py b/python/fi/generated/openapi_client/models/experiment_comparison_detail.py new file mode 100644 index 0000000..33ccaea --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_detail.py @@ -0,0 +1,185 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_comparison_detail_scores_weight import ( + ExperimentComparisonDetailScoresWeight, + ) + from ..models.experiment_comparison_metrics import ExperimentComparisonMetrics + from ..models.experiment_comparison_weights import ExperimentComparisonWeights + + +T = TypeVar("T", bound="ExperimentComparisonDetail") + + +@_attrs_define +class ExperimentComparisonDetail: + """ + Attributes: + metrics (ExperimentComparisonMetrics): + weights (ExperimentComparisonWeights): + scores_weight (ExperimentComparisonDetailScoresWeight | Unset): + experiment_dataset_id (None | Unset | UUID): + rank (int | None | Unset): + rank_suffix (str | Unset): + overall_rating (float | None | Unset): + """ + + metrics: ExperimentComparisonMetrics + weights: ExperimentComparisonWeights + scores_weight: ExperimentComparisonDetailScoresWeight | Unset = UNSET + experiment_dataset_id: None | Unset | UUID = UNSET + rank: int | None | Unset = UNSET + rank_suffix: str | Unset = UNSET + overall_rating: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + metrics = self.metrics.to_dict() + + weights = self.weights.to_dict() + + scores_weight: dict[str, Any] | Unset = UNSET + if not isinstance(self.scores_weight, Unset): + scores_weight = self.scores_weight.to_dict() + + experiment_dataset_id: None | str | Unset + if isinstance(self.experiment_dataset_id, Unset): + experiment_dataset_id = UNSET + elif isinstance(self.experiment_dataset_id, UUID): + experiment_dataset_id = str(self.experiment_dataset_id) + else: + experiment_dataset_id = self.experiment_dataset_id + + rank: int | None | Unset + if isinstance(self.rank, Unset): + rank = UNSET + else: + rank = self.rank + + rank_suffix = self.rank_suffix + + overall_rating: float | None | Unset + if isinstance(self.overall_rating, Unset): + overall_rating = UNSET + else: + overall_rating = self.overall_rating + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "metrics": metrics, + "weights": weights, + } + ) + if scores_weight is not UNSET: + field_dict["scores_weight"] = scores_weight + if experiment_dataset_id is not UNSET: + field_dict["experiment_dataset_id"] = experiment_dataset_id + if rank is not UNSET: + field_dict["rank"] = rank + if rank_suffix is not UNSET: + field_dict["rank_suffix"] = rank_suffix + if overall_rating is not UNSET: + field_dict["overall_rating"] = overall_rating + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_detail_scores_weight import ( + ExperimentComparisonDetailScoresWeight, + ) + from ..models.experiment_comparison_metrics import ExperimentComparisonMetrics + from ..models.experiment_comparison_weights import ExperimentComparisonWeights + + d = dict(src_dict) + metrics = ExperimentComparisonMetrics.from_dict(d.pop("metrics")) + + weights = ExperimentComparisonWeights.from_dict(d.pop("weights")) + + _scores_weight = d.pop("scores_weight", UNSET) + scores_weight: ExperimentComparisonDetailScoresWeight | Unset + if isinstance(_scores_weight, Unset): + scores_weight = UNSET + else: + scores_weight = ExperimentComparisonDetailScoresWeight.from_dict( + _scores_weight + ) + + def _parse_experiment_dataset_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + experiment_dataset_id_type_0 = UUID(data) + + return experiment_dataset_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + experiment_dataset_id = _parse_experiment_dataset_id( + d.pop("experiment_dataset_id", UNSET) + ) + + def _parse_rank(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + rank = _parse_rank(d.pop("rank", UNSET)) + + rank_suffix = d.pop("rank_suffix", UNSET) + + def _parse_overall_rating(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + overall_rating = _parse_overall_rating(d.pop("overall_rating", UNSET)) + + experiment_comparison_detail = cls( + metrics=metrics, + weights=weights, + scores_weight=scores_weight, + experiment_dataset_id=experiment_dataset_id, + rank=rank, + rank_suffix=rank_suffix, + overall_rating=overall_rating, + ) + + experiment_comparison_detail.additional_properties = d + return experiment_comparison_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_detail_scores_weight.py b/python/fi/generated/openapi_client/models/experiment_comparison_detail_scores_weight.py new file mode 100644 index 0000000..ab603fb --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_detail_scores_weight.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentComparisonDetailScoresWeight") + + +@_attrs_define +class ExperimentComparisonDetailScoresWeight: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_comparison_detail_scores_weight = cls() + + experiment_comparison_detail_scores_weight.additional_properties = d + return experiment_comparison_detail_scores_weight + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_details_response.py b/python/fi/generated/openapi_client/models/experiment_comparison_details_response.py new file mode 100644 index 0000000..e7ddb6b --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_details_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_comparison_details_result import ( + ExperimentComparisonDetailsResult, + ) + + +T = TypeVar("T", bound="ExperimentComparisonDetailsResponse") + + +@_attrs_define +class ExperimentComparisonDetailsResponse: + """ + Attributes: + status (bool): + result (ExperimentComparisonDetailsResult): + """ + + status: bool + result: ExperimentComparisonDetailsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_details_result import ( + ExperimentComparisonDetailsResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentComparisonDetailsResult.from_dict(d.pop("result")) + + experiment_comparison_details_response = cls( + status=status, + result=result, + ) + + experiment_comparison_details_response.additional_properties = d + return experiment_comparison_details_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_details_result.py b/python/fi/generated/openapi_client/models/experiment_comparison_details_result.py new file mode 100644 index 0000000..3ea2865 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_details_result.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_comparison_detail import ExperimentComparisonDetail + + +T = TypeVar("T", bound="ExperimentComparisonDetailsResult") + + +@_attrs_define +class ExperimentComparisonDetailsResult: + """ + Attributes: + experiment_id (UUID): + total_comparisons (int): + comparisons (list[ExperimentComparisonDetail]): + """ + + experiment_id: UUID + total_comparisons: int + comparisons: list[ExperimentComparisonDetail] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_id = str(self.experiment_id) + + total_comparisons = self.total_comparisons + + comparisons = [] + for comparisons_item_data in self.comparisons: + comparisons_item = comparisons_item_data.to_dict() + comparisons.append(comparisons_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "experiment_id": experiment_id, + "total_comparisons": total_comparisons, + "comparisons": comparisons, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_detail import ExperimentComparisonDetail + + d = dict(src_dict) + experiment_id = UUID(d.pop("experiment_id")) + + total_comparisons = d.pop("total_comparisons") + + comparisons = [] + _comparisons = d.pop("comparisons") + for comparisons_item_data in _comparisons: + comparisons_item = ExperimentComparisonDetail.from_dict( + comparisons_item_data + ) + + comparisons.append(comparisons_item) + + experiment_comparison_details_result = cls( + experiment_id=experiment_id, + total_comparisons=total_comparisons, + comparisons=comparisons, + ) + + experiment_comparison_details_result.additional_properties = d + return experiment_comparison_details_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_metrics.py b/python/fi/generated/openapi_client/models/experiment_comparison_metrics.py new file mode 100644 index 0000000..78d1918 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_metrics.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_comparison_normalized_metrics import ( + ExperimentComparisonNormalizedMetrics, + ) + from ..models.experiment_comparison_raw_metrics import ( + ExperimentComparisonRawMetrics, + ) + + +T = TypeVar("T", bound="ExperimentComparisonMetrics") + + +@_attrs_define +class ExperimentComparisonMetrics: + """ + Attributes: + raw (ExperimentComparisonRawMetrics): + normalized (ExperimentComparisonNormalizedMetrics): + """ + + raw: ExperimentComparisonRawMetrics + normalized: ExperimentComparisonNormalizedMetrics + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + raw = self.raw.to_dict() + + normalized = self.normalized.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "raw": raw, + "normalized": normalized, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_normalized_metrics import ( + ExperimentComparisonNormalizedMetrics, + ) + from ..models.experiment_comparison_raw_metrics import ( + ExperimentComparisonRawMetrics, + ) + + d = dict(src_dict) + raw = ExperimentComparisonRawMetrics.from_dict(d.pop("raw")) + + normalized = ExperimentComparisonNormalizedMetrics.from_dict( + d.pop("normalized") + ) + + experiment_comparison_metrics = cls( + raw=raw, + normalized=normalized, + ) + + experiment_comparison_metrics.additional_properties = d + return experiment_comparison_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_normalized_metrics.py b/python/fi/generated/openapi_client/models/experiment_comparison_normalized_metrics.py new file mode 100644 index 0000000..3c1832d --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_normalized_metrics.py @@ -0,0 +1,133 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentComparisonNormalizedMetrics") + + +@_attrs_define +class ExperimentComparisonNormalizedMetrics: + """ + Attributes: + completion_tokens (float | None | Unset): + total_tokens (float | None | Unset): + response_time (float | None | Unset): + score (float | None | Unset): + """ + + completion_tokens: float | None | Unset = UNSET + total_tokens: float | None | Unset = UNSET + response_time: float | None | Unset = UNSET + score: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + completion_tokens: float | None | Unset + if isinstance(self.completion_tokens, Unset): + completion_tokens = UNSET + else: + completion_tokens = self.completion_tokens + + total_tokens: float | None | Unset + if isinstance(self.total_tokens, Unset): + total_tokens = UNSET + else: + total_tokens = self.total_tokens + + response_time: float | None | Unset + if isinstance(self.response_time, Unset): + response_time = UNSET + else: + response_time = self.response_time + + score: float | None | Unset + if isinstance(self.score, Unset): + score = UNSET + else: + score = self.score + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completion_tokens is not UNSET: + field_dict["completion_tokens"] = completion_tokens + if total_tokens is not UNSET: + field_dict["total_tokens"] = total_tokens + if response_time is not UNSET: + field_dict["response_time"] = response_time + if score is not UNSET: + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_completion_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + completion_tokens = _parse_completion_tokens(d.pop("completion_tokens", UNSET)) + + def _parse_total_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_tokens = _parse_total_tokens(d.pop("total_tokens", UNSET)) + + def _parse_response_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + response_time = _parse_response_time(d.pop("response_time", UNSET)) + + def _parse_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + score = _parse_score(d.pop("score", UNSET)) + + experiment_comparison_normalized_metrics = cls( + completion_tokens=completion_tokens, + total_tokens=total_tokens, + response_time=response_time, + score=score, + ) + + experiment_comparison_normalized_metrics.additional_properties = d + return experiment_comparison_normalized_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_raw_metrics.py b/python/fi/generated/openapi_client/models/experiment_comparison_raw_metrics.py new file mode 100644 index 0000000..b9682d0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_raw_metrics.py @@ -0,0 +1,135 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentComparisonRawMetrics") + + +@_attrs_define +class ExperimentComparisonRawMetrics: + """ + Attributes: + avg_completion_tokens (float | None | Unset): + avg_total_tokens (float | None | Unset): + avg_response_time (float | None | Unset): + avg_score (float | None | Unset): + """ + + avg_completion_tokens: float | None | Unset = UNSET + avg_total_tokens: float | None | Unset = UNSET + avg_response_time: float | None | Unset = UNSET + avg_score: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + avg_completion_tokens: float | None | Unset + if isinstance(self.avg_completion_tokens, Unset): + avg_completion_tokens = UNSET + else: + avg_completion_tokens = self.avg_completion_tokens + + avg_total_tokens: float | None | Unset + if isinstance(self.avg_total_tokens, Unset): + avg_total_tokens = UNSET + else: + avg_total_tokens = self.avg_total_tokens + + avg_response_time: float | None | Unset + if isinstance(self.avg_response_time, Unset): + avg_response_time = UNSET + else: + avg_response_time = self.avg_response_time + + avg_score: float | None | Unset + if isinstance(self.avg_score, Unset): + avg_score = UNSET + else: + avg_score = self.avg_score + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if avg_completion_tokens is not UNSET: + field_dict["avg_completion_tokens"] = avg_completion_tokens + if avg_total_tokens is not UNSET: + field_dict["avg_total_tokens"] = avg_total_tokens + if avg_response_time is not UNSET: + field_dict["avg_response_time"] = avg_response_time + if avg_score is not UNSET: + field_dict["avg_score"] = avg_score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_avg_completion_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_completion_tokens = _parse_avg_completion_tokens( + d.pop("avg_completion_tokens", UNSET) + ) + + def _parse_avg_total_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_total_tokens = _parse_avg_total_tokens(d.pop("avg_total_tokens", UNSET)) + + def _parse_avg_response_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_response_time = _parse_avg_response_time(d.pop("avg_response_time", UNSET)) + + def _parse_avg_score(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + avg_score = _parse_avg_score(d.pop("avg_score", UNSET)) + + experiment_comparison_raw_metrics = cls( + avg_completion_tokens=avg_completion_tokens, + avg_total_tokens=avg_total_tokens, + avg_response_time=avg_response_time, + avg_score=avg_score, + ) + + experiment_comparison_raw_metrics.additional_properties = d + return experiment_comparison_raw_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_weights.py b/python/fi/generated/openapi_client/models/experiment_comparison_weights.py new file mode 100644 index 0000000..dd19a2a --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_weights.py @@ -0,0 +1,139 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_comparison_weights_scores import ( + ExperimentComparisonWeightsScores, + ) + + +T = TypeVar("T", bound="ExperimentComparisonWeights") + + +@_attrs_define +class ExperimentComparisonWeights: + """ + Attributes: + response_time (float | None | Unset): + scores (ExperimentComparisonWeightsScores | Unset): + total_tokens (float | None | Unset): + completion_tokens (float | None | Unset): + """ + + response_time: float | None | Unset = UNSET + scores: ExperimentComparisonWeightsScores | Unset = UNSET + total_tokens: float | None | Unset = UNSET + completion_tokens: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + response_time: float | None | Unset + if isinstance(self.response_time, Unset): + response_time = UNSET + else: + response_time = self.response_time + + scores: dict[str, Any] | Unset = UNSET + if not isinstance(self.scores, Unset): + scores = self.scores.to_dict() + + total_tokens: float | None | Unset + if isinstance(self.total_tokens, Unset): + total_tokens = UNSET + else: + total_tokens = self.total_tokens + + completion_tokens: float | None | Unset + if isinstance(self.completion_tokens, Unset): + completion_tokens = UNSET + else: + completion_tokens = self.completion_tokens + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if response_time is not UNSET: + field_dict["response_time"] = response_time + if scores is not UNSET: + field_dict["scores"] = scores + if total_tokens is not UNSET: + field_dict["total_tokens"] = total_tokens + if completion_tokens is not UNSET: + field_dict["completion_tokens"] = completion_tokens + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_weights_scores import ( + ExperimentComparisonWeightsScores, + ) + + d = dict(src_dict) + + def _parse_response_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + response_time = _parse_response_time(d.pop("response_time", UNSET)) + + _scores = d.pop("scores", UNSET) + scores: ExperimentComparisonWeightsScores | Unset + if isinstance(_scores, Unset): + scores = UNSET + else: + scores = ExperimentComparisonWeightsScores.from_dict(_scores) + + def _parse_total_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_tokens = _parse_total_tokens(d.pop("total_tokens", UNSET)) + + def _parse_completion_tokens(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + completion_tokens = _parse_completion_tokens(d.pop("completion_tokens", UNSET)) + + experiment_comparison_weights = cls( + response_time=response_time, + scores=scores, + total_tokens=total_tokens, + completion_tokens=completion_tokens, + ) + + experiment_comparison_weights.additional_properties = d + return experiment_comparison_weights + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_weights_request.py b/python/fi/generated/openapi_client/models/experiment_comparison_weights_request.py new file mode 100644 index 0000000..790e75d --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_weights_request.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_comparison_weights_request_weights import ( + ExperimentComparisonWeightsRequestWeights, + ) + + +T = TypeVar("T", bound="ExperimentComparisonWeightsRequest") + + +@_attrs_define +class ExperimentComparisonWeightsRequest: + """ + Attributes: + eval_template_ids (list[UUID] | Unset): + weights (ExperimentComparisonWeightsRequestWeights | Unset): + """ + + eval_template_ids: list[UUID] | Unset = UNSET + weights: ExperimentComparisonWeightsRequestWeights | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_template_ids: list[str] | Unset = UNSET + if not isinstance(self.eval_template_ids, Unset): + eval_template_ids = [] + for eval_template_ids_item_data in self.eval_template_ids: + eval_template_ids_item = str(eval_template_ids_item_data) + eval_template_ids.append(eval_template_ids_item) + + weights: dict[str, Any] | Unset = UNSET + if not isinstance(self.weights, Unset): + weights = self.weights.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if eval_template_ids is not UNSET: + field_dict["eval_template_ids"] = eval_template_ids + if weights is not UNSET: + field_dict["weights"] = weights + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_weights_request_weights import ( + ExperimentComparisonWeightsRequestWeights, + ) + + d = dict(src_dict) + _eval_template_ids = d.pop("eval_template_ids", UNSET) + eval_template_ids: list[UUID] | Unset = UNSET + if _eval_template_ids is not UNSET: + eval_template_ids = [] + for eval_template_ids_item_data in _eval_template_ids: + eval_template_ids_item = UUID(eval_template_ids_item_data) + + eval_template_ids.append(eval_template_ids_item) + + _weights = d.pop("weights", UNSET) + weights: ExperimentComparisonWeightsRequestWeights | Unset + if isinstance(_weights, Unset): + weights = UNSET + else: + weights = ExperimentComparisonWeightsRequestWeights.from_dict(_weights) + + experiment_comparison_weights_request = cls( + eval_template_ids=eval_template_ids, + weights=weights, + ) + + experiment_comparison_weights_request.additional_properties = d + return experiment_comparison_weights_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_weights_request_weights.py b/python/fi/generated/openapi_client/models/experiment_comparison_weights_request_weights.py new file mode 100644 index 0000000..06c6856 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_weights_request_weights.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentComparisonWeightsRequestWeights") + + +@_attrs_define +class ExperimentComparisonWeightsRequestWeights: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_comparison_weights_request_weights = cls() + + experiment_comparison_weights_request_weights.additional_properties = d + return experiment_comparison_weights_request_weights + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_comparison_weights_scores.py b/python/fi/generated/openapi_client/models/experiment_comparison_weights_scores.py new file mode 100644 index 0000000..7856daa --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_comparison_weights_scores.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentComparisonWeightsScores") + + +@_attrs_define +class ExperimentComparisonWeightsScores: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_comparison_weights_scores = cls() + + experiment_comparison_weights_scores.additional_properties = d + return experiment_comparison_weights_scores + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_create_v2.py b/python/fi/generated/openapi_client/models/experiment_create_v2.py new file mode 100644 index 0000000..4f9d93d --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_create_v2.py @@ -0,0 +1,165 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.experiment_create_v2_experiment_type import ( + ExperimentCreateV2ExperimentType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_metric_entry import EvalMetricEntry + from ..models.prompt_config_entry import PromptConfigEntry + + +T = TypeVar("T", bound="ExperimentCreateV2") + + +@_attrs_define +class ExperimentCreateV2: + """ + Attributes: + name (str): + dataset_id (UUID): + prompt_config (list[PromptConfigEntry]): + user_eval_metrics (list[EvalMetricEntry]): + column_id (None | Unset | UUID): + experiment_type (ExperimentCreateV2ExperimentType | Unset): Default: ExperimentCreateV2ExperimentType.LLM. + """ + + name: str + dataset_id: UUID + prompt_config: list[PromptConfigEntry] + user_eval_metrics: list[EvalMetricEntry] + column_id: None | Unset | UUID = UNSET + experiment_type: ExperimentCreateV2ExperimentType | Unset = ( + ExperimentCreateV2ExperimentType.LLM + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + dataset_id = str(self.dataset_id) + + prompt_config = [] + for prompt_config_item_data in self.prompt_config: + prompt_config_item = prompt_config_item_data.to_dict() + prompt_config.append(prompt_config_item) + + user_eval_metrics = [] + for user_eval_metrics_item_data in self.user_eval_metrics: + user_eval_metrics_item = user_eval_metrics_item_data.to_dict() + user_eval_metrics.append(user_eval_metrics_item) + + column_id: None | str | Unset + if isinstance(self.column_id, Unset): + column_id = UNSET + elif isinstance(self.column_id, UUID): + column_id = str(self.column_id) + else: + column_id = self.column_id + + experiment_type: str | Unset = UNSET + if not isinstance(self.experiment_type, Unset): + experiment_type = self.experiment_type.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "dataset_id": dataset_id, + "prompt_config": prompt_config, + "user_eval_metrics": user_eval_metrics, + } + ) + if column_id is not UNSET: + field_dict["column_id"] = column_id + if experiment_type is not UNSET: + field_dict["experiment_type"] = experiment_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_metric_entry import EvalMetricEntry + from ..models.prompt_config_entry import PromptConfigEntry + + d = dict(src_dict) + name = d.pop("name") + + dataset_id = UUID(d.pop("dataset_id")) + + prompt_config = [] + _prompt_config = d.pop("prompt_config") + for prompt_config_item_data in _prompt_config: + prompt_config_item = PromptConfigEntry.from_dict(prompt_config_item_data) + + prompt_config.append(prompt_config_item) + + user_eval_metrics = [] + _user_eval_metrics = d.pop("user_eval_metrics") + for user_eval_metrics_item_data in _user_eval_metrics: + user_eval_metrics_item = EvalMetricEntry.from_dict( + user_eval_metrics_item_data + ) + + user_eval_metrics.append(user_eval_metrics_item) + + def _parse_column_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + column_id_type_0 = UUID(data) + + return column_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + column_id = _parse_column_id(d.pop("column_id", UNSET)) + + _experiment_type = d.pop("experiment_type", UNSET) + experiment_type: ExperimentCreateV2ExperimentType | Unset + if isinstance(_experiment_type, Unset): + experiment_type = UNSET + else: + experiment_type = ExperimentCreateV2ExperimentType(_experiment_type) + + experiment_create_v2 = cls( + name=name, + dataset_id=dataset_id, + prompt_config=prompt_config, + user_eval_metrics=user_eval_metrics, + column_id=column_id, + experiment_type=experiment_type, + ) + + experiment_create_v2.additional_properties = d + return experiment_create_v2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_create_v2_experiment_type.py b/python/fi/generated/openapi_client/models/experiment_create_v2_experiment_type.py new file mode 100644 index 0000000..9229374 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_create_v2_experiment_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ExperimentCreateV2ExperimentType(str, Enum): + IMAGE = "image" + LLM = "llm" + STT = "stt" + TTS = "tts" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/experiment_dataset_comparison_response.py b/python/fi/generated/openapi_client/models/experiment_dataset_comparison_response.py new file mode 100644 index 0000000..305412c --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_dataset_comparison_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_dataset_comparison_result import ( + ExperimentDatasetComparisonResult, + ) + + +T = TypeVar("T", bound="ExperimentDatasetComparisonResponse") + + +@_attrs_define +class ExperimentDatasetComparisonResponse: + """ + Attributes: + status (bool): + result (ExperimentDatasetComparisonResult): + """ + + status: bool + result: ExperimentDatasetComparisonResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_dataset_comparison_result import ( + ExperimentDatasetComparisonResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentDatasetComparisonResult.from_dict(d.pop("result")) + + experiment_dataset_comparison_response = cls( + status=status, + result=result, + ) + + experiment_dataset_comparison_response.additional_properties = d + return experiment_dataset_comparison_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_dataset_comparison_result.py b/python/fi/generated/openapi_client/models/experiment_dataset_comparison_result.py new file mode 100644 index 0000000..a45bd2a --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_dataset_comparison_result.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_comparison_dataset_metric import ( + ExperimentComparisonDatasetMetric, + ) + from ..models.experiment_dataset_comparison_result_weights_applied import ( + ExperimentDatasetComparisonResultWeightsApplied, + ) + + +T = TypeVar("T", bound="ExperimentDatasetComparisonResult") + + +@_attrs_define +class ExperimentDatasetComparisonResult: + """ + Attributes: + experiment_id (UUID): + experiment_name (str): + total_datasets (int): + dataset_comparisons (list[ExperimentComparisonDatasetMetric]): + weights_applied (ExperimentDatasetComparisonResultWeightsApplied | Unset): + """ + + experiment_id: UUID + experiment_name: str + total_datasets: int + dataset_comparisons: list[ExperimentComparisonDatasetMetric] + weights_applied: ExperimentDatasetComparisonResultWeightsApplied | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_id = str(self.experiment_id) + + experiment_name = self.experiment_name + + total_datasets = self.total_datasets + + dataset_comparisons = [] + for dataset_comparisons_item_data in self.dataset_comparisons: + dataset_comparisons_item = dataset_comparisons_item_data.to_dict() + dataset_comparisons.append(dataset_comparisons_item) + + weights_applied: dict[str, Any] | Unset = UNSET + if not isinstance(self.weights_applied, Unset): + weights_applied = self.weights_applied.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "experiment_id": experiment_id, + "experiment_name": experiment_name, + "total_datasets": total_datasets, + "dataset_comparisons": dataset_comparisons, + } + ) + if weights_applied is not UNSET: + field_dict["weights_applied"] = weights_applied + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_comparison_dataset_metric import ( + ExperimentComparisonDatasetMetric, + ) + from ..models.experiment_dataset_comparison_result_weights_applied import ( + ExperimentDatasetComparisonResultWeightsApplied, + ) + + d = dict(src_dict) + experiment_id = UUID(d.pop("experiment_id")) + + experiment_name = d.pop("experiment_name") + + total_datasets = d.pop("total_datasets") + + dataset_comparisons = [] + _dataset_comparisons = d.pop("dataset_comparisons") + for dataset_comparisons_item_data in _dataset_comparisons: + dataset_comparisons_item = ExperimentComparisonDatasetMetric.from_dict( + dataset_comparisons_item_data + ) + + dataset_comparisons.append(dataset_comparisons_item) + + _weights_applied = d.pop("weights_applied", UNSET) + weights_applied: ExperimentDatasetComparisonResultWeightsApplied | Unset + if isinstance(_weights_applied, Unset): + weights_applied = UNSET + else: + weights_applied = ExperimentDatasetComparisonResultWeightsApplied.from_dict( + _weights_applied + ) + + experiment_dataset_comparison_result = cls( + experiment_id=experiment_id, + experiment_name=experiment_name, + total_datasets=total_datasets, + dataset_comparisons=dataset_comparisons, + weights_applied=weights_applied, + ) + + experiment_dataset_comparison_result.additional_properties = d + return experiment_dataset_comparison_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_dataset_comparison_result_weights_applied.py b/python/fi/generated/openapi_client/models/experiment_dataset_comparison_result_weights_applied.py new file mode 100644 index 0000000..5990b8d --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_dataset_comparison_result_weights_applied.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentDatasetComparisonResultWeightsApplied") + + +@_attrs_define +class ExperimentDatasetComparisonResultWeightsApplied: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_dataset_comparison_result_weights_applied = cls() + + experiment_dataset_comparison_result_weights_applied.additional_properties = d + return experiment_dataset_comparison_result_weights_applied + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_derived_variables_response.py b/python/fi/generated/openapi_client/models/experiment_derived_variables_response.py new file mode 100644 index 0000000..4f681b7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_derived_variables_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_derived_variables_result import ( + ExperimentDerivedVariablesResult, + ) + + +T = TypeVar("T", bound="ExperimentDerivedVariablesResponse") + + +@_attrs_define +class ExperimentDerivedVariablesResponse: + """ + Attributes: + status (bool): + result (ExperimentDerivedVariablesResult): + """ + + status: bool + result: ExperimentDerivedVariablesResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_derived_variables_result import ( + ExperimentDerivedVariablesResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentDerivedVariablesResult.from_dict(d.pop("result")) + + experiment_derived_variables_response = cls( + status=status, + result=result, + ) + + experiment_derived_variables_response.additional_properties = d + return experiment_derived_variables_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_derived_variables_result.py b/python/fi/generated/openapi_client/models/experiment_derived_variables_result.py new file mode 100644 index 0000000..257d277 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_derived_variables_result.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_derived_variables_result_derived_variables import ( + ExperimentDerivedVariablesResultDerivedVariables, + ) + + +T = TypeVar("T", bound="ExperimentDerivedVariablesResult") + + +@_attrs_define +class ExperimentDerivedVariablesResult: + """ + Attributes: + version (str | Unset): + derived_variables (ExperimentDerivedVariablesResultDerivedVariables | Unset): + """ + + version: str | Unset = UNSET + derived_variables: ExperimentDerivedVariablesResultDerivedVariables | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + version = self.version + + derived_variables: dict[str, Any] | Unset = UNSET + if not isinstance(self.derived_variables, Unset): + derived_variables = self.derived_variables.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if version is not UNSET: + field_dict["version"] = version + if derived_variables is not UNSET: + field_dict["derived_variables"] = derived_variables + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_derived_variables_result_derived_variables import ( + ExperimentDerivedVariablesResultDerivedVariables, + ) + + d = dict(src_dict) + version = d.pop("version", UNSET) + + _derived_variables = d.pop("derived_variables", UNSET) + derived_variables: ExperimentDerivedVariablesResultDerivedVariables | Unset + if isinstance(_derived_variables, Unset): + derived_variables = UNSET + else: + derived_variables = ( + ExperimentDerivedVariablesResultDerivedVariables.from_dict( + _derived_variables + ) + ) + + experiment_derived_variables_result = cls( + version=version, + derived_variables=derived_variables, + ) + + experiment_derived_variables_result.additional_properties = d + return experiment_derived_variables_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_derived_variables_result_derived_variables.py b/python/fi/generated/openapi_client/models/experiment_derived_variables_result_derived_variables.py new file mode 100644 index 0000000..51c4bcd --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_derived_variables_result_derived_variables.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentDerivedVariablesResultDerivedVariables") + + +@_attrs_define +class ExperimentDerivedVariablesResultDerivedVariables: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_derived_variables_result_derived_variables = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + experiment_derived_variables_result_derived_variables.additional_properties = ( + additional_properties + ) + return experiment_derived_variables_result_derived_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_detail_v2.py b/python/fi/generated/openapi_client/models/experiment_detail_v2.py new file mode 100644 index 0000000..4be772a --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_detail_v2.py @@ -0,0 +1,240 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.experiment_detail_v2_experiment_type import ( + ExperimentDetailV2ExperimentType, +) +from ..models.experiment_detail_v2_status import ExperimentDetailV2Status +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentDetailV2") + + +@_attrs_define +class ExperimentDetailV2: + """ + Attributes: + name (str): + id (UUID | Unset): + dataset_id (UUID | Unset): + column_id (None | Unset | UUID): + experiment_type (ExperimentDetailV2ExperimentType | Unset): Determines how the experiment executes: llm, tts, + stt, or image. + status (ExperimentDetailV2Status | Unset): + snapshot_dataset_id (None | Unset | UUID): + prompt_configs (str | Unset): + agent_configs (str | Unset): + user_eval_metrics (str | Unset): + created_at (datetime.datetime | Unset): + """ + + name: str + id: UUID | Unset = UNSET + dataset_id: UUID | Unset = UNSET + column_id: None | Unset | UUID = UNSET + experiment_type: ExperimentDetailV2ExperimentType | Unset = UNSET + status: ExperimentDetailV2Status | Unset = UNSET + snapshot_dataset_id: None | Unset | UUID = UNSET + prompt_configs: str | Unset = UNSET + agent_configs: str | Unset = UNSET + user_eval_metrics: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + dataset_id: str | Unset = UNSET + if not isinstance(self.dataset_id, Unset): + dataset_id = str(self.dataset_id) + + column_id: None | str | Unset + if isinstance(self.column_id, Unset): + column_id = UNSET + elif isinstance(self.column_id, UUID): + column_id = str(self.column_id) + else: + column_id = self.column_id + + experiment_type: str | Unset = UNSET + if not isinstance(self.experiment_type, Unset): + experiment_type = self.experiment_type.value + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + snapshot_dataset_id: None | str | Unset + if isinstance(self.snapshot_dataset_id, Unset): + snapshot_dataset_id = UNSET + elif isinstance(self.snapshot_dataset_id, UUID): + snapshot_dataset_id = str(self.snapshot_dataset_id) + else: + snapshot_dataset_id = self.snapshot_dataset_id + + prompt_configs = self.prompt_configs + + agent_configs = self.agent_configs + + user_eval_metrics = self.user_eval_metrics + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if id is not UNSET: + field_dict["id"] = id + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if column_id is not UNSET: + field_dict["column_id"] = column_id + if experiment_type is not UNSET: + field_dict["experiment_type"] = experiment_type + if status is not UNSET: + field_dict["status"] = status + if snapshot_dataset_id is not UNSET: + field_dict["snapshot_dataset_id"] = snapshot_dataset_id + if prompt_configs is not UNSET: + field_dict["prompt_configs"] = prompt_configs + if agent_configs is not UNSET: + field_dict["agent_configs"] = agent_configs + if user_eval_metrics is not UNSET: + field_dict["user_eval_metrics"] = user_eval_metrics + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _dataset_id = d.pop("dataset_id", UNSET) + dataset_id: UUID | Unset + if isinstance(_dataset_id, Unset): + dataset_id = UNSET + else: + dataset_id = UUID(_dataset_id) + + def _parse_column_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + column_id_type_0 = UUID(data) + + return column_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + column_id = _parse_column_id(d.pop("column_id", UNSET)) + + _experiment_type = d.pop("experiment_type", UNSET) + experiment_type: ExperimentDetailV2ExperimentType | Unset + if isinstance(_experiment_type, Unset): + experiment_type = UNSET + else: + experiment_type = ExperimentDetailV2ExperimentType(_experiment_type) + + _status = d.pop("status", UNSET) + status: ExperimentDetailV2Status | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = ExperimentDetailV2Status(_status) + + def _parse_snapshot_dataset_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + snapshot_dataset_id_type_0 = UUID(data) + + return snapshot_dataset_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + snapshot_dataset_id = _parse_snapshot_dataset_id( + d.pop("snapshot_dataset_id", UNSET) + ) + + prompt_configs = d.pop("prompt_configs", UNSET) + + agent_configs = d.pop("agent_configs", UNSET) + + user_eval_metrics = d.pop("user_eval_metrics", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + experiment_detail_v2 = cls( + name=name, + id=id, + dataset_id=dataset_id, + column_id=column_id, + experiment_type=experiment_type, + status=status, + snapshot_dataset_id=snapshot_dataset_id, + prompt_configs=prompt_configs, + agent_configs=agent_configs, + user_eval_metrics=user_eval_metrics, + created_at=created_at, + ) + + experiment_detail_v2.additional_properties = d + return experiment_detail_v2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_detail_v2_experiment_type.py b/python/fi/generated/openapi_client/models/experiment_detail_v2_experiment_type.py new file mode 100644 index 0000000..4eb1b0b --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_detail_v2_experiment_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ExperimentDetailV2ExperimentType(str, Enum): + IMAGE = "image" + LLM = "llm" + STT = "stt" + TTS = "tts" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/experiment_detail_v2_status.py b/python/fi/generated/openapi_client/models/experiment_detail_v2_status.py new file mode 100644 index 0000000..11c058b --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_detail_v2_status.py @@ -0,0 +1,24 @@ +from enum import Enum + + +class ExperimentDetailV2Status(str, Enum): + CANCELLED = "Cancelled" + COMPLETED = "Completed" + DELETING = "Deleting" + EDITING = "Editing" + ERROR = "Error" + EXPERIMENTEVALUATION = "ExperimentEvaluation" + FAILED = "Failed" + INACTIVE = "Inactive" + NOTSTARTED = "NotStarted" + OPTIMIZATIONEVALUATION = "OptimizationEvaluation" + PARTIALCOMPLETED = "PartialCompleted" + PARTIALEXTRACTED = "PartialExtracted" + PARTIALRUN = "PartialRun" + PROCESSING = "Processing" + QUEUED = "Queued" + RUNNING = "Running" + UPLOADING = "Uploading" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/experiment_evaluation_column_stats.py b/python/fi/generated/openapi_client/models/experiment_evaluation_column_stats.py new file mode 100644 index 0000000..14609f5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_evaluation_column_stats.py @@ -0,0 +1,136 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_evaluation_column_stats_avg_score import ( + ExperimentEvaluationColumnStatsAvgScore, + ) + from ..models.experiment_evaluation_token_usage import ( + ExperimentEvaluationTokenUsage, + ) + + +T = TypeVar("T", bound="ExperimentEvaluationColumnStats") + + +@_attrs_define +class ExperimentEvaluationColumnStats: + """ + Attributes: + column_name (str): + column_id (UUID): + total_rows (int): + success_rate (float): + avg_response_time (float): + token_usage (ExperimentEvaluationTokenUsage): + avg_score (ExperimentEvaluationColumnStatsAvgScore | Unset): + """ + + column_name: str + column_id: UUID + total_rows: int + success_rate: float + avg_response_time: float + token_usage: ExperimentEvaluationTokenUsage + avg_score: ExperimentEvaluationColumnStatsAvgScore | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_name = self.column_name + + column_id = str(self.column_id) + + total_rows = self.total_rows + + success_rate = self.success_rate + + avg_response_time = self.avg_response_time + + token_usage = self.token_usage.to_dict() + + avg_score: dict[str, Any] | Unset = UNSET + if not isinstance(self.avg_score, Unset): + avg_score = self.avg_score.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_name": column_name, + "column_id": column_id, + "total_rows": total_rows, + "success_rate": success_rate, + "avg_response_time": avg_response_time, + "token_usage": token_usage, + } + ) + if avg_score is not UNSET: + field_dict["avg_score"] = avg_score + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_evaluation_column_stats_avg_score import ( + ExperimentEvaluationColumnStatsAvgScore, + ) + from ..models.experiment_evaluation_token_usage import ( + ExperimentEvaluationTokenUsage, + ) + + d = dict(src_dict) + column_name = d.pop("column_name") + + column_id = UUID(d.pop("column_id")) + + total_rows = d.pop("total_rows") + + success_rate = d.pop("success_rate") + + avg_response_time = d.pop("avg_response_time") + + token_usage = ExperimentEvaluationTokenUsage.from_dict(d.pop("token_usage")) + + _avg_score = d.pop("avg_score", UNSET) + avg_score: ExperimentEvaluationColumnStatsAvgScore | Unset + if isinstance(_avg_score, Unset): + avg_score = UNSET + else: + avg_score = ExperimentEvaluationColumnStatsAvgScore.from_dict(_avg_score) + + experiment_evaluation_column_stats = cls( + column_name=column_name, + column_id=column_id, + total_rows=total_rows, + success_rate=success_rate, + avg_response_time=avg_response_time, + token_usage=token_usage, + avg_score=avg_score, + ) + + experiment_evaluation_column_stats.additional_properties = d + return experiment_evaluation_column_stats + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_evaluation_column_stats_avg_score.py b/python/fi/generated/openapi_client/models/experiment_evaluation_column_stats_avg_score.py new file mode 100644 index 0000000..6242e2b --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_evaluation_column_stats_avg_score.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentEvaluationColumnStatsAvgScore") + + +@_attrs_define +class ExperimentEvaluationColumnStatsAvgScore: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_evaluation_column_stats_avg_score = cls() + + experiment_evaluation_column_stats_avg_score.additional_properties = d + return experiment_evaluation_column_stats_avg_score + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_evaluation_stats_response.py b/python/fi/generated/openapi_client/models/experiment_evaluation_stats_response.py new file mode 100644 index 0000000..717cb37 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_evaluation_stats_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_evaluation_stats_result import ( + ExperimentEvaluationStatsResult, + ) + + +T = TypeVar("T", bound="ExperimentEvaluationStatsResponse") + + +@_attrs_define +class ExperimentEvaluationStatsResponse: + """ + Attributes: + status (bool): + result (ExperimentEvaluationStatsResult): + """ + + status: bool + result: ExperimentEvaluationStatsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_evaluation_stats_result import ( + ExperimentEvaluationStatsResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentEvaluationStatsResult.from_dict(d.pop("result")) + + experiment_evaluation_stats_response = cls( + status=status, + result=result, + ) + + experiment_evaluation_stats_response.additional_properties = d + return experiment_evaluation_stats_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_evaluation_stats_result.py b/python/fi/generated/openapi_client/models/experiment_evaluation_stats_result.py new file mode 100644 index 0000000..9bf86c0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_evaluation_stats_result.py @@ -0,0 +1,138 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_evaluation_column_stats import ( + ExperimentEvaluationColumnStats, + ) + + +T = TypeVar("T", bound="ExperimentEvaluationStatsResult") + + +@_attrs_define +class ExperimentEvaluationStatsResult: + """ + Attributes: + experiment_id (UUID): + experiment_name (str): + evaluation_id (UUID): + evaluation_name (str): + evaluation_template_id (UUID): + dataset_id (UUID): + dataset_name (str): + evaluation_columns (list[ExperimentEvaluationColumnStats]): + """ + + experiment_id: UUID + experiment_name: str + evaluation_id: UUID + evaluation_name: str + evaluation_template_id: UUID + dataset_id: UUID + dataset_name: str + evaluation_columns: list[ExperimentEvaluationColumnStats] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_id = str(self.experiment_id) + + experiment_name = self.experiment_name + + evaluation_id = str(self.evaluation_id) + + evaluation_name = self.evaluation_name + + evaluation_template_id = str(self.evaluation_template_id) + + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + evaluation_columns = [] + for evaluation_columns_item_data in self.evaluation_columns: + evaluation_columns_item = evaluation_columns_item_data.to_dict() + evaluation_columns.append(evaluation_columns_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "experiment_id": experiment_id, + "experiment_name": experiment_name, + "evaluation_id": evaluation_id, + "evaluation_name": evaluation_name, + "evaluation_template_id": evaluation_template_id, + "dataset_id": dataset_id, + "dataset_name": dataset_name, + "evaluation_columns": evaluation_columns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_evaluation_column_stats import ( + ExperimentEvaluationColumnStats, + ) + + d = dict(src_dict) + experiment_id = UUID(d.pop("experiment_id")) + + experiment_name = d.pop("experiment_name") + + evaluation_id = UUID(d.pop("evaluation_id")) + + evaluation_name = d.pop("evaluation_name") + + evaluation_template_id = UUID(d.pop("evaluation_template_id")) + + dataset_id = UUID(d.pop("dataset_id")) + + dataset_name = d.pop("dataset_name") + + evaluation_columns = [] + _evaluation_columns = d.pop("evaluation_columns") + for evaluation_columns_item_data in _evaluation_columns: + evaluation_columns_item = ExperimentEvaluationColumnStats.from_dict( + evaluation_columns_item_data + ) + + evaluation_columns.append(evaluation_columns_item) + + experiment_evaluation_stats_result = cls( + experiment_id=experiment_id, + experiment_name=experiment_name, + evaluation_id=evaluation_id, + evaluation_name=evaluation_name, + evaluation_template_id=evaluation_template_id, + dataset_id=dataset_id, + dataset_name=dataset_name, + evaluation_columns=evaluation_columns, + ) + + experiment_evaluation_stats_result.additional_properties = d + return experiment_evaluation_stats_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_evaluation_token_usage.py b/python/fi/generated/openapi_client/models/experiment_evaluation_token_usage.py new file mode 100644 index 0000000..a57741e --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_evaluation_token_usage.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentEvaluationTokenUsage") + + +@_attrs_define +class ExperimentEvaluationTokenUsage: + """ + Attributes: + avg_completion_tokens (float): + avg_prompt_tokens (float): + avg_total_tokens (float): + total_tokens (int): + """ + + avg_completion_tokens: float + avg_prompt_tokens: float + avg_total_tokens: float + total_tokens: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + avg_completion_tokens = self.avg_completion_tokens + + avg_prompt_tokens = self.avg_prompt_tokens + + avg_total_tokens = self.avg_total_tokens + + total_tokens = self.total_tokens + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "avg_completion_tokens": avg_completion_tokens, + "avg_prompt_tokens": avg_prompt_tokens, + "avg_total_tokens": avg_total_tokens, + "total_tokens": total_tokens, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + avg_completion_tokens = d.pop("avg_completion_tokens") + + avg_prompt_tokens = d.pop("avg_prompt_tokens") + + avg_total_tokens = d.pop("avg_total_tokens") + + total_tokens = d.pop("total_tokens") + + experiment_evaluation_token_usage = cls( + avg_completion_tokens=avg_completion_tokens, + avg_prompt_tokens=avg_prompt_tokens, + avg_total_tokens=avg_total_tokens, + total_tokens=total_tokens, + ) + + experiment_evaluation_token_usage.additional_properties = d + return experiment_evaluation_token_usage + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_create_response.py b/python/fi/generated/openapi_client/models/experiment_feedback_create_response.py new file mode 100644 index 0000000..6ad17ce --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_create_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_feedback_create_result import ( + ExperimentFeedbackCreateResult, + ) + + +T = TypeVar("T", bound="ExperimentFeedbackCreateResponse") + + +@_attrs_define +class ExperimentFeedbackCreateResponse: + """ + Attributes: + status (bool): + result (ExperimentFeedbackCreateResult): + """ + + status: bool + result: ExperimentFeedbackCreateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_feedback_create_result import ( + ExperimentFeedbackCreateResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentFeedbackCreateResult.from_dict(d.pop("result")) + + experiment_feedback_create_response = cls( + status=status, + result=result, + ) + + experiment_feedback_create_response.additional_properties = d + return experiment_feedback_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_create_result.py b/python/fi/generated/openapi_client/models/experiment_feedback_create_result.py new file mode 100644 index 0000000..7c3078b --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_create_result.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentFeedbackCreateResult") + + +@_attrs_define +class ExperimentFeedbackCreateResult: + """ + Attributes: + id (UUID): + """ + + id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + experiment_feedback_create_result = cls( + id=id, + ) + + experiment_feedback_create_result.additional_properties = d + return experiment_feedback_create_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_detail_item.py b/python/fi/generated/openapi_client/models/experiment_feedback_detail_item.py new file mode 100644 index 0000000..8a3187a --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_detail_item.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_feedback_detail_item_value import ( + ExperimentFeedbackDetailItemValue, + ) + + +T = TypeVar("T", bound="ExperimentFeedbackDetailItem") + + +@_attrs_define +class ExperimentFeedbackDetailItem: + """ + Attributes: + id (UUID): + created_at (datetime.datetime): + value (ExperimentFeedbackDetailItemValue | Unset): + comment (None | str | Unset): + action_type (None | str | Unset): + """ + + id: UUID + created_at: datetime.datetime + value: ExperimentFeedbackDetailItemValue | Unset = UNSET + comment: None | str | Unset = UNSET + action_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + created_at = self.created_at.isoformat() + + value: dict[str, Any] | Unset = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + comment: None | str | Unset + if isinstance(self.comment, Unset): + comment = UNSET + else: + comment = self.comment + + action_type: None | str | Unset + if isinstance(self.action_type, Unset): + action_type = UNSET + else: + action_type = self.action_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "created_at": created_at, + } + ) + if value is not UNSET: + field_dict["value"] = value + if comment is not UNSET: + field_dict["comment"] = comment + if action_type is not UNSET: + field_dict["action_type"] = action_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_feedback_detail_item_value import ( + ExperimentFeedbackDetailItemValue, + ) + + d = dict(src_dict) + id = UUID(d.pop("id")) + + created_at = isoparse(d.pop("created_at")) + + _value = d.pop("value", UNSET) + value: ExperimentFeedbackDetailItemValue | Unset + if isinstance(_value, Unset): + value = UNSET + else: + value = ExperimentFeedbackDetailItemValue.from_dict(_value) + + def _parse_comment(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comment = _parse_comment(d.pop("comment", UNSET)) + + def _parse_action_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + action_type = _parse_action_type(d.pop("action_type", UNSET)) + + experiment_feedback_detail_item = cls( + id=id, + created_at=created_at, + value=value, + comment=comment, + action_type=action_type, + ) + + experiment_feedback_detail_item.additional_properties = d + return experiment_feedback_detail_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_detail_item_value.py b/python/fi/generated/openapi_client/models/experiment_feedback_detail_item_value.py new file mode 100644 index 0000000..7fd37f4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_detail_item_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentFeedbackDetailItemValue") + + +@_attrs_define +class ExperimentFeedbackDetailItemValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_feedback_detail_item_value = cls() + + experiment_feedback_detail_item_value.additional_properties = d + return experiment_feedback_detail_item_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_details_response.py b/python/fi/generated/openapi_client/models/experiment_feedback_details_response.py new file mode 100644 index 0000000..8c92d13 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_details_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_feedback_details_result import ( + ExperimentFeedbackDetailsResult, + ) + + +T = TypeVar("T", bound="ExperimentFeedbackDetailsResponse") + + +@_attrs_define +class ExperimentFeedbackDetailsResponse: + """ + Attributes: + status (bool): + result (ExperimentFeedbackDetailsResult): + """ + + status: bool + result: ExperimentFeedbackDetailsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_feedback_details_result import ( + ExperimentFeedbackDetailsResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentFeedbackDetailsResult.from_dict(d.pop("result")) + + experiment_feedback_details_response = cls( + status=status, + result=result, + ) + + experiment_feedback_details_response.additional_properties = d + return experiment_feedback_details_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_details_result.py b/python/fi/generated/openapi_client/models/experiment_feedback_details_result.py new file mode 100644 index 0000000..523a875 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_details_result.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_feedback_detail_item import ExperimentFeedbackDetailItem + + +T = TypeVar("T", bound="ExperimentFeedbackDetailsResult") + + +@_attrs_define +class ExperimentFeedbackDetailsResult: + """ + Attributes: + feedback (list[ExperimentFeedbackDetailItem]): + total_count (int): + """ + + feedback: list[ExperimentFeedbackDetailItem] + total_count: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + feedback = [] + for feedback_item_data in self.feedback: + feedback_item = feedback_item_data.to_dict() + feedback.append(feedback_item) + + total_count = self.total_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "feedback": feedback, + "total_count": total_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_feedback_detail_item import ( + ExperimentFeedbackDetailItem, + ) + + d = dict(src_dict) + feedback = [] + _feedback = d.pop("feedback") + for feedback_item_data in _feedback: + feedback_item = ExperimentFeedbackDetailItem.from_dict(feedback_item_data) + + feedback.append(feedback_item) + + total_count = d.pop("total_count") + + experiment_feedback_details_result = cls( + feedback=feedback, + total_count=total_count, + ) + + experiment_feedback_details_result.additional_properties = d + return experiment_feedback_details_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_submit_request.py b/python/fi/generated/openapi_client/models/experiment_feedback_submit_request.py new file mode 100644 index 0000000..68f6344 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_submit_request.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.experiment_feedback_submit_request_action_type import ( + ExperimentFeedbackSubmitRequestActionType, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_feedback_submit_request_value import ( + ExperimentFeedbackSubmitRequestValue, + ) + + +T = TypeVar("T", bound="ExperimentFeedbackSubmitRequest") + + +@_attrs_define +class ExperimentFeedbackSubmitRequest: + """ + Attributes: + action_type (ExperimentFeedbackSubmitRequestActionType): + feedback_id (UUID): + user_eval_metric_id (UUID): + value (ExperimentFeedbackSubmitRequestValue | Unset): + explanation (str | Unset): + """ + + action_type: ExperimentFeedbackSubmitRequestActionType + feedback_id: UUID + user_eval_metric_id: UUID + value: ExperimentFeedbackSubmitRequestValue | Unset = UNSET + explanation: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_type = self.action_type.value + + feedback_id = str(self.feedback_id) + + user_eval_metric_id = str(self.user_eval_metric_id) + + value: dict[str, Any] | Unset = UNSET + if not isinstance(self.value, Unset): + value = self.value.to_dict() + + explanation = self.explanation + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "action_type": action_type, + "feedback_id": feedback_id, + "user_eval_metric_id": user_eval_metric_id, + } + ) + if value is not UNSET: + field_dict["value"] = value + if explanation is not UNSET: + field_dict["explanation"] = explanation + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_feedback_submit_request_value import ( + ExperimentFeedbackSubmitRequestValue, + ) + + d = dict(src_dict) + action_type = ExperimentFeedbackSubmitRequestActionType(d.pop("action_type")) + + feedback_id = UUID(d.pop("feedback_id")) + + user_eval_metric_id = UUID(d.pop("user_eval_metric_id")) + + _value = d.pop("value", UNSET) + value: ExperimentFeedbackSubmitRequestValue | Unset + if isinstance(_value, Unset): + value = UNSET + else: + value = ExperimentFeedbackSubmitRequestValue.from_dict(_value) + + explanation = d.pop("explanation", UNSET) + + experiment_feedback_submit_request = cls( + action_type=action_type, + feedback_id=feedback_id, + user_eval_metric_id=user_eval_metric_id, + value=value, + explanation=explanation, + ) + + experiment_feedback_submit_request.additional_properties = d + return experiment_feedback_submit_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_submit_request_action_type.py b/python/fi/generated/openapi_client/models/experiment_feedback_submit_request_action_type.py new file mode 100644 index 0000000..b403a5e --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_submit_request_action_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ExperimentFeedbackSubmitRequestActionType(str, Enum): + RECALCULATE_DATASET = "recalculate_dataset" + RECALCULATE_ROW = "recalculate_row" + RETUNE = "retune" + RETUNE_RECALCULATE = "retune_recalculate" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_submit_request_value.py b/python/fi/generated/openapi_client/models/experiment_feedback_submit_request_value.py new file mode 100644 index 0000000..5c2ef20 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_submit_request_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentFeedbackSubmitRequestValue") + + +@_attrs_define +class ExperimentFeedbackSubmitRequestValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_feedback_submit_request_value = cls() + + experiment_feedback_submit_request_value.additional_properties = d + return experiment_feedback_submit_request_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_submit_response.py b/python/fi/generated/openapi_client/models/experiment_feedback_submit_response.py new file mode 100644 index 0000000..f812b84 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_submit_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_feedback_submit_result import ( + ExperimentFeedbackSubmitResult, + ) + + +T = TypeVar("T", bound="ExperimentFeedbackSubmitResponse") + + +@_attrs_define +class ExperimentFeedbackSubmitResponse: + """ + Attributes: + status (bool): + result (ExperimentFeedbackSubmitResult): + """ + + status: bool + result: ExperimentFeedbackSubmitResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_feedback_submit_result import ( + ExperimentFeedbackSubmitResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentFeedbackSubmitResult.from_dict(d.pop("result")) + + experiment_feedback_submit_response = cls( + status=status, + result=result, + ) + + experiment_feedback_submit_response.additional_properties = d + return experiment_feedback_submit_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_submit_result.py b/python/fi/generated/openapi_client/models/experiment_feedback_submit_result.py new file mode 100644 index 0000000..7307943 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_submit_result.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentFeedbackSubmitResult") + + +@_attrs_define +class ExperimentFeedbackSubmitResult: + """ + Attributes: + message (str): + action_type (str): + user_eval_metric_id (UUID): + workflow_id (str | Unset): + """ + + message: str + action_type: str + user_eval_metric_id: UUID + workflow_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + action_type = self.action_type + + user_eval_metric_id = str(self.user_eval_metric_id) + + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "action_type": action_type, + "user_eval_metric_id": user_eval_metric_id, + } + ) + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + action_type = d.pop("action_type") + + user_eval_metric_id = UUID(d.pop("user_eval_metric_id")) + + workflow_id = d.pop("workflow_id", UNSET) + + experiment_feedback_submit_result = cls( + message=message, + action_type=action_type, + user_eval_metric_id=user_eval_metric_id, + workflow_id=workflow_id, + ) + + experiment_feedback_submit_result.additional_properties = d + return experiment_feedback_submit_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_template_response.py b/python/fi/generated/openapi_client/models/experiment_feedback_template_response.py new file mode 100644 index 0000000..e2c2e52 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_template_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_feedback_template_result import ( + ExperimentFeedbackTemplateResult, + ) + + +T = TypeVar("T", bound="ExperimentFeedbackTemplateResponse") + + +@_attrs_define +class ExperimentFeedbackTemplateResponse: + """ + Attributes: + status (bool): + result (ExperimentFeedbackTemplateResult): + """ + + status: bool + result: ExperimentFeedbackTemplateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_feedback_template_result import ( + ExperimentFeedbackTemplateResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentFeedbackTemplateResult.from_dict(d.pop("result")) + + experiment_feedback_template_response = cls( + status=status, + result=result, + ) + + experiment_feedback_template_response.additional_properties = d + return experiment_feedback_template_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_feedback_template_result.py b/python/fi/generated/openapi_client/models/experiment_feedback_template_result.py new file mode 100644 index 0000000..1cd2ec3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_feedback_template_result.py @@ -0,0 +1,131 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentFeedbackTemplateResult") + + +@_attrs_define +class ExperimentFeedbackTemplateResult: + """ + Attributes: + eval_name (str): + user_eval_name (str): + output_type (None | str | Unset): + eval_description (None | str | Unset): + choices (list[str] | Unset): + multi_choice (bool | Unset): + """ + + eval_name: str + user_eval_name: str + output_type: None | str | Unset = UNSET + eval_description: None | str | Unset = UNSET + choices: list[str] | Unset = UNSET + multi_choice: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_name = self.eval_name + + user_eval_name = self.user_eval_name + + output_type: None | str | Unset + if isinstance(self.output_type, Unset): + output_type = UNSET + else: + output_type = self.output_type + + eval_description: None | str | Unset + if isinstance(self.eval_description, Unset): + eval_description = UNSET + else: + eval_description = self.eval_description + + choices: list[str] | Unset = UNSET + if not isinstance(self.choices, Unset): + choices = self.choices + + multi_choice = self.multi_choice + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_name": eval_name, + "user_eval_name": user_eval_name, + } + ) + if output_type is not UNSET: + field_dict["output_type"] = output_type + if eval_description is not UNSET: + field_dict["eval_description"] = eval_description + if choices is not UNSET: + field_dict["choices"] = choices + if multi_choice is not UNSET: + field_dict["multi_choice"] = multi_choice + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_name = d.pop("eval_name") + + user_eval_name = d.pop("user_eval_name") + + def _parse_output_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + output_type = _parse_output_type(d.pop("output_type", UNSET)) + + def _parse_eval_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_description = _parse_eval_description(d.pop("eval_description", UNSET)) + + choices = cast(list[str], d.pop("choices", UNSET)) + + multi_choice = d.pop("multi_choice", UNSET) + + experiment_feedback_template_result = cls( + eval_name=eval_name, + user_eval_name=user_eval_name, + output_type=output_type, + eval_description=eval_description, + choices=choices, + multi_choice=multi_choice, + ) + + experiment_feedback_template_result.additional_properties = d + return experiment_feedback_template_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_json_schema_response.py b/python/fi/generated/openapi_client/models/experiment_json_schema_response.py new file mode 100644 index 0000000..d6ea5c6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_json_schema_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_json_schema_response_result import ( + ExperimentJsonSchemaResponseResult, + ) + + +T = TypeVar("T", bound="ExperimentJsonSchemaResponse") + + +@_attrs_define +class ExperimentJsonSchemaResponse: + """ + Attributes: + status (bool): + result (ExperimentJsonSchemaResponseResult): + """ + + status: bool + result: ExperimentJsonSchemaResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_json_schema_response_result import ( + ExperimentJsonSchemaResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentJsonSchemaResponseResult.from_dict(d.pop("result")) + + experiment_json_schema_response = cls( + status=status, + result=result, + ) + + experiment_json_schema_response.additional_properties = d + return experiment_json_schema_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_json_schema_response_result.py b/python/fi/generated/openapi_client/models/experiment_json_schema_response_result.py new file mode 100644 index 0000000..79e7d60 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_json_schema_response_result.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.json_column_schema_entry import JsonColumnSchemaEntry + + +T = TypeVar("T", bound="ExperimentJsonSchemaResponseResult") + + +@_attrs_define +class ExperimentJsonSchemaResponseResult: + """ """ + + additional_properties: dict[str, JsonColumnSchemaEntry] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.json_column_schema_entry import JsonColumnSchemaEntry + + d = dict(src_dict) + experiment_json_schema_response_result = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = JsonColumnSchemaEntry.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + experiment_json_schema_response_result.additional_properties = ( + additional_properties + ) + return experiment_json_schema_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> JsonColumnSchemaEntry: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: JsonColumnSchemaEntry) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_list_v2.py b/python/fi/generated/openapi_client/models/experiment_list_v2.py new file mode 100644 index 0000000..0843290 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_list_v2.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.experiment_list_v2_experiment_type import ExperimentListV2ExperimentType +from ..models.experiment_list_v2_status import ExperimentListV2Status +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentListV2") + + +@_attrs_define +class ExperimentListV2: + """ + Attributes: + name (str): + dataset (UUID): + id (UUID | Unset): + status (ExperimentListV2Status | Unset): + experiment_type (ExperimentListV2ExperimentType | Unset): Determines how the experiment executes: llm, tts, stt, + or image. + eval_templates_count (str | Unset): + created_at (datetime.datetime | Unset): + models_count (str | Unset): + agents_count (str | Unset): + """ + + name: str + dataset: UUID + id: UUID | Unset = UNSET + status: ExperimentListV2Status | Unset = UNSET + experiment_type: ExperimentListV2ExperimentType | Unset = UNSET + eval_templates_count: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + models_count: str | Unset = UNSET + agents_count: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + dataset = str(self.dataset) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + experiment_type: str | Unset = UNSET + if not isinstance(self.experiment_type, Unset): + experiment_type = self.experiment_type.value + + eval_templates_count = self.eval_templates_count + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + models_count = self.models_count + + agents_count = self.agents_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "dataset": dataset, + } + ) + if id is not UNSET: + field_dict["id"] = id + if status is not UNSET: + field_dict["status"] = status + if experiment_type is not UNSET: + field_dict["experiment_type"] = experiment_type + if eval_templates_count is not UNSET: + field_dict["eval_templates_count"] = eval_templates_count + if created_at is not UNSET: + field_dict["created_at"] = created_at + if models_count is not UNSET: + field_dict["models_count"] = models_count + if agents_count is not UNSET: + field_dict["agents_count"] = agents_count + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + dataset = UUID(d.pop("dataset")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _status = d.pop("status", UNSET) + status: ExperimentListV2Status | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = ExperimentListV2Status(_status) + + _experiment_type = d.pop("experiment_type", UNSET) + experiment_type: ExperimentListV2ExperimentType | Unset + if isinstance(_experiment_type, Unset): + experiment_type = UNSET + else: + experiment_type = ExperimentListV2ExperimentType(_experiment_type) + + eval_templates_count = d.pop("eval_templates_count", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + models_count = d.pop("models_count", UNSET) + + agents_count = d.pop("agents_count", UNSET) + + experiment_list_v2 = cls( + name=name, + dataset=dataset, + id=id, + status=status, + experiment_type=experiment_type, + eval_templates_count=eval_templates_count, + created_at=created_at, + models_count=models_count, + agents_count=agents_count, + ) + + experiment_list_v2.additional_properties = d + return experiment_list_v2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_list_v2_experiment_type.py b/python/fi/generated/openapi_client/models/experiment_list_v2_experiment_type.py new file mode 100644 index 0000000..e485f90 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_list_v2_experiment_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ExperimentListV2ExperimentType(str, Enum): + IMAGE = "image" + LLM = "llm" + STT = "stt" + TTS = "tts" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/experiment_list_v2_status.py b/python/fi/generated/openapi_client/models/experiment_list_v2_status.py new file mode 100644 index 0000000..0ca4305 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_list_v2_status.py @@ -0,0 +1,24 @@ +from enum import Enum + + +class ExperimentListV2Status(str, Enum): + CANCELLED = "Cancelled" + COMPLETED = "Completed" + DELETING = "Deleting" + EDITING = "Editing" + ERROR = "Error" + EXPERIMENTEVALUATION = "ExperimentEvaluation" + FAILED = "Failed" + INACTIVE = "Inactive" + NOTSTARTED = "NotStarted" + OPTIMIZATIONEVALUATION = "OptimizationEvaluation" + PARTIALCOMPLETED = "PartialCompleted" + PARTIALEXTRACTED = "PartialExtracted" + PARTIALRUN = "PartialRun" + PROCESSING = "Processing" + QUEUED = "Queued" + RUNNING = "Running" + UPLOADING = "Uploading" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/experiment_name_suggestion_response.py b/python/fi/generated/openapi_client/models/experiment_name_suggestion_response.py new file mode 100644 index 0000000..084cfe0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_name_suggestion_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_name_suggestion_result import ( + ExperimentNameSuggestionResult, + ) + + +T = TypeVar("T", bound="ExperimentNameSuggestionResponse") + + +@_attrs_define +class ExperimentNameSuggestionResponse: + """ + Attributes: + status (bool): + result (ExperimentNameSuggestionResult): + """ + + status: bool + result: ExperimentNameSuggestionResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_name_suggestion_result import ( + ExperimentNameSuggestionResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentNameSuggestionResult.from_dict(d.pop("result")) + + experiment_name_suggestion_response = cls( + status=status, + result=result, + ) + + experiment_name_suggestion_response.additional_properties = d + return experiment_name_suggestion_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_name_suggestion_result.py b/python/fi/generated/openapi_client/models/experiment_name_suggestion_result.py new file mode 100644 index 0000000..f1bdc97 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_name_suggestion_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentNameSuggestionResult") + + +@_attrs_define +class ExperimentNameSuggestionResult: + """ + Attributes: + suggested_name (str): + """ + + suggested_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + suggested_name = self.suggested_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "suggested_name": suggested_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + suggested_name = d.pop("suggested_name") + + experiment_name_suggestion_result = cls( + suggested_name=suggested_name, + ) + + experiment_name_suggestion_result.additional_properties = d + return experiment_name_suggestion_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_name_validation_response.py b/python/fi/generated/openapi_client/models/experiment_name_validation_response.py new file mode 100644 index 0000000..3be33a9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_name_validation_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_name_validation_result import ( + ExperimentNameValidationResult, + ) + + +T = TypeVar("T", bound="ExperimentNameValidationResponse") + + +@_attrs_define +class ExperimentNameValidationResponse: + """ + Attributes: + status (bool): + result (ExperimentNameValidationResult): + """ + + status: bool + result: ExperimentNameValidationResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_name_validation_result import ( + ExperimentNameValidationResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentNameValidationResult.from_dict(d.pop("result")) + + experiment_name_validation_response = cls( + status=status, + result=result, + ) + + experiment_name_validation_response.additional_properties = d + return experiment_name_validation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_name_validation_result.py b/python/fi/generated/openapi_client/models/experiment_name_validation_result.py new file mode 100644 index 0000000..9d33ae9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_name_validation_result.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentNameValidationResult") + + +@_attrs_define +class ExperimentNameValidationResult: + """ + Attributes: + is_valid (bool): + message (str | Unset): + """ + + is_valid: bool + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + is_valid = self.is_valid + + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "is_valid": is_valid, + } + ) + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + is_valid = d.pop("is_valid") + + message = d.pop("message", UNSET) + + experiment_name_validation_result = cls( + is_valid=is_valid, + message=message, + ) + + experiment_name_validation_result.additional_properties = d + return experiment_name_validation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_rerun_cells.py b/python/fi/generated/openapi_client/models/experiment_rerun_cells.py new file mode 100644 index 0000000..122a1de --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_rerun_cells.py @@ -0,0 +1,131 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.rerun_cell_entry import RerunCellEntry + + +T = TypeVar("T", bound="ExperimentRerunCells") + + +@_attrs_define +class ExperimentRerunCells: + """ + Attributes: + source_ids (list[UUID] | Unset): + cells (list[RerunCellEntry] | Unset): + user_eval_metric_ids (list[UUID] | Unset): + failed_only (bool | Unset): Default: False. + """ + + source_ids: list[UUID] | Unset = UNSET + cells: list[RerunCellEntry] | Unset = UNSET + user_eval_metric_ids: list[UUID] | Unset = UNSET + failed_only: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_ids: list[str] | Unset = UNSET + if not isinstance(self.source_ids, Unset): + source_ids = [] + for source_ids_item_data in self.source_ids: + source_ids_item = str(source_ids_item_data) + source_ids.append(source_ids_item) + + cells: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.cells, Unset): + cells = [] + for cells_item_data in self.cells: + cells_item = cells_item_data.to_dict() + cells.append(cells_item) + + user_eval_metric_ids: list[str] | Unset = UNSET + if not isinstance(self.user_eval_metric_ids, Unset): + user_eval_metric_ids = [] + for user_eval_metric_ids_item_data in self.user_eval_metric_ids: + user_eval_metric_ids_item = str(user_eval_metric_ids_item_data) + user_eval_metric_ids.append(user_eval_metric_ids_item) + + failed_only = self.failed_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if source_ids is not UNSET: + field_dict["source_ids"] = source_ids + if cells is not UNSET: + field_dict["cells"] = cells + if user_eval_metric_ids is not UNSET: + field_dict["user_eval_metric_ids"] = user_eval_metric_ids + if failed_only is not UNSET: + field_dict["failed_only"] = failed_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.rerun_cell_entry import RerunCellEntry + + d = dict(src_dict) + _source_ids = d.pop("source_ids", UNSET) + source_ids: list[UUID] | Unset = UNSET + if _source_ids is not UNSET: + source_ids = [] + for source_ids_item_data in _source_ids: + source_ids_item = UUID(source_ids_item_data) + + source_ids.append(source_ids_item) + + _cells = d.pop("cells", UNSET) + cells: list[RerunCellEntry] | Unset = UNSET + if _cells is not UNSET: + cells = [] + for cells_item_data in _cells: + cells_item = RerunCellEntry.from_dict(cells_item_data) + + cells.append(cells_item) + + _user_eval_metric_ids = d.pop("user_eval_metric_ids", UNSET) + user_eval_metric_ids: list[UUID] | Unset = UNSET + if _user_eval_metric_ids is not UNSET: + user_eval_metric_ids = [] + for user_eval_metric_ids_item_data in _user_eval_metric_ids: + user_eval_metric_ids_item = UUID(user_eval_metric_ids_item_data) + + user_eval_metric_ids.append(user_eval_metric_ids_item) + + failed_only = d.pop("failed_only", UNSET) + + experiment_rerun_cells = cls( + source_ids=source_ids, + cells=cells, + user_eval_metric_ids=user_eval_metric_ids, + failed_only=failed_only, + ) + + experiment_rerun_cells.additional_properties = d + return experiment_rerun_cells + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_rerun_request.py b/python/fi/generated/openapi_client/models/experiment_rerun_request.py new file mode 100644 index 0000000..73d4e95 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_rerun_request.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentRerunRequest") + + +@_attrs_define +class ExperimentRerunRequest: + """ + Attributes: + experiment_ids (list[UUID]): + use_temporal (bool | Unset): Default: True. + max_concurrent_rows (int | Unset): + """ + + experiment_ids: list[UUID] + use_temporal: bool | Unset = True + max_concurrent_rows: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_ids = [] + for experiment_ids_item_data in self.experiment_ids: + experiment_ids_item = str(experiment_ids_item_data) + experiment_ids.append(experiment_ids_item) + + use_temporal = self.use_temporal + + max_concurrent_rows = self.max_concurrent_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "experiment_ids": experiment_ids, + } + ) + if use_temporal is not UNSET: + field_dict["use_temporal"] = use_temporal + if max_concurrent_rows is not UNSET: + field_dict["max_concurrent_rows"] = max_concurrent_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_ids = [] + _experiment_ids = d.pop("experiment_ids") + for experiment_ids_item_data in _experiment_ids: + experiment_ids_item = UUID(experiment_ids_item_data) + + experiment_ids.append(experiment_ids_item) + + use_temporal = d.pop("use_temporal", UNSET) + + max_concurrent_rows = d.pop("max_concurrent_rows", UNSET) + + experiment_rerun_request = cls( + experiment_ids=experiment_ids, + use_temporal=use_temporal, + max_concurrent_rows=max_concurrent_rows, + ) + + experiment_rerun_request.additional_properties = d + return experiment_rerun_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_row_diff_cell.py b/python/fi/generated/openapi_client/models/experiment_row_diff_cell.py new file mode 100644 index 0000000..4fbaf8b --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_row_diff_cell.py @@ -0,0 +1,133 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_row_diff_cell_cell_diff_value import ( + ExperimentRowDiffCellCellDiffValue, + ) + from ..models.experiment_row_diff_cell_cell_value import ( + ExperimentRowDiffCellCellValue, + ) + from ..models.experiment_row_diff_cell_value_infos import ( + ExperimentRowDiffCellValueInfos, + ) + + +T = TypeVar("T", bound="ExperimentRowDiffCell") + + +@_attrs_define +class ExperimentRowDiffCell: + """ + Attributes: + cell_value (ExperimentRowDiffCellCellValue | Unset): + cell_diff_value (ExperimentRowDiffCellCellDiffValue | Unset): + status (str | Unset): + value_infos (ExperimentRowDiffCellValueInfos | Unset): + """ + + cell_value: ExperimentRowDiffCellCellValue | Unset = UNSET + cell_diff_value: ExperimentRowDiffCellCellDiffValue | Unset = UNSET + status: str | Unset = UNSET + value_infos: ExperimentRowDiffCellValueInfos | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cell_value: dict[str, Any] | Unset = UNSET + if not isinstance(self.cell_value, Unset): + cell_value = self.cell_value.to_dict() + + cell_diff_value: dict[str, Any] | Unset = UNSET + if not isinstance(self.cell_diff_value, Unset): + cell_diff_value = self.cell_diff_value.to_dict() + + status = self.status + + value_infos: dict[str, Any] | Unset = UNSET + if not isinstance(self.value_infos, Unset): + value_infos = self.value_infos.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cell_value is not UNSET: + field_dict["cell_value"] = cell_value + if cell_diff_value is not UNSET: + field_dict["cell_diff_value"] = cell_diff_value + if status is not UNSET: + field_dict["status"] = status + if value_infos is not UNSET: + field_dict["value_infos"] = value_infos + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_row_diff_cell_cell_diff_value import ( + ExperimentRowDiffCellCellDiffValue, + ) + from ..models.experiment_row_diff_cell_cell_value import ( + ExperimentRowDiffCellCellValue, + ) + from ..models.experiment_row_diff_cell_value_infos import ( + ExperimentRowDiffCellValueInfos, + ) + + d = dict(src_dict) + _cell_value = d.pop("cell_value", UNSET) + cell_value: ExperimentRowDiffCellCellValue | Unset + if isinstance(_cell_value, Unset): + cell_value = UNSET + else: + cell_value = ExperimentRowDiffCellCellValue.from_dict(_cell_value) + + _cell_diff_value = d.pop("cell_diff_value", UNSET) + cell_diff_value: ExperimentRowDiffCellCellDiffValue | Unset + if isinstance(_cell_diff_value, Unset): + cell_diff_value = UNSET + else: + cell_diff_value = ExperimentRowDiffCellCellDiffValue.from_dict( + _cell_diff_value + ) + + status = d.pop("status", UNSET) + + _value_infos = d.pop("value_infos", UNSET) + value_infos: ExperimentRowDiffCellValueInfos | Unset + if isinstance(_value_infos, Unset): + value_infos = UNSET + else: + value_infos = ExperimentRowDiffCellValueInfos.from_dict(_value_infos) + + experiment_row_diff_cell = cls( + cell_value=cell_value, + cell_diff_value=cell_diff_value, + status=status, + value_infos=value_infos, + ) + + experiment_row_diff_cell.additional_properties = d + return experiment_row_diff_cell + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_diff_value.py b/python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_diff_value.py new file mode 100644 index 0000000..be9027e --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_diff_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentRowDiffCellCellDiffValue") + + +@_attrs_define +class ExperimentRowDiffCellCellDiffValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_row_diff_cell_cell_diff_value = cls() + + experiment_row_diff_cell_cell_diff_value.additional_properties = d + return experiment_row_diff_cell_cell_diff_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_value.py b/python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_value.py new file mode 100644 index 0000000..8c68392 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_row_diff_cell_cell_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentRowDiffCellCellValue") + + +@_attrs_define +class ExperimentRowDiffCellCellValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_row_diff_cell_cell_value = cls() + + experiment_row_diff_cell_cell_value.additional_properties = d + return experiment_row_diff_cell_cell_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_row_diff_cell_value_infos.py b/python/fi/generated/openapi_client/models/experiment_row_diff_cell_value_infos.py new file mode 100644 index 0000000..48aad64 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_row_diff_cell_value_infos.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentRowDiffCellValueInfos") + + +@_attrs_define +class ExperimentRowDiffCellValueInfos: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_row_diff_cell_value_infos = cls() + + experiment_row_diff_cell_value_infos.additional_properties = d + return experiment_row_diff_cell_value_infos + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_row_diff_response.py b/python/fi/generated/openapi_client/models/experiment_row_diff_response.py new file mode 100644 index 0000000..9df502e --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_row_diff_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_row_diff_response_result import ( + ExperimentRowDiffResponseResult, + ) + + +T = TypeVar("T", bound="ExperimentRowDiffResponse") + + +@_attrs_define +class ExperimentRowDiffResponse: + """ + Attributes: + status (bool): + result (ExperimentRowDiffResponseResult): + """ + + status: bool + result: ExperimentRowDiffResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_row_diff_response_result import ( + ExperimentRowDiffResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentRowDiffResponseResult.from_dict(d.pop("result")) + + experiment_row_diff_response = cls( + status=status, + result=result, + ) + + experiment_row_diff_response.additional_properties = d + return experiment_row_diff_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_row_diff_response_result.py b/python/fi/generated/openapi_client/models/experiment_row_diff_response_result.py new file mode 100644 index 0000000..99d56dd --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_row_diff_response_result.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_row_diff_response_result_additional_property import ( + ExperimentRowDiffResponseResultAdditionalProperty, + ) + + +T = TypeVar("T", bound="ExperimentRowDiffResponseResult") + + +@_attrs_define +class ExperimentRowDiffResponseResult: + """ """ + + additional_properties: dict[ + str, ExperimentRowDiffResponseResultAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_row_diff_response_result_additional_property import ( + ExperimentRowDiffResponseResultAdditionalProperty, + ) + + d = dict(src_dict) + experiment_row_diff_response_result = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + ExperimentRowDiffResponseResultAdditionalProperty.from_dict(prop_dict) + ) + + additional_properties[prop_name] = additional_property + + experiment_row_diff_response_result.additional_properties = ( + additional_properties + ) + return experiment_row_diff_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> ExperimentRowDiffResponseResultAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: ExperimentRowDiffResponseResultAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_row_diff_response_result_additional_property.py b/python/fi/generated/openapi_client/models/experiment_row_diff_response_result_additional_property.py new file mode 100644 index 0000000..f3e67fb --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_row_diff_response_result_additional_property.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_row_diff_cell import ExperimentRowDiffCell + + +T = TypeVar("T", bound="ExperimentRowDiffResponseResultAdditionalProperty") + + +@_attrs_define +class ExperimentRowDiffResponseResultAdditionalProperty: + """ """ + + additional_properties: dict[str, ExperimentRowDiffCell] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_row_diff_cell import ExperimentRowDiffCell + + d = dict(src_dict) + experiment_row_diff_response_result_additional_property = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ExperimentRowDiffCell.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + experiment_row_diff_response_result_additional_property.additional_properties = additional_properties + return experiment_row_diff_response_result_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> ExperimentRowDiffCell: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: ExperimentRowDiffCell) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stats_column_config.py b/python/fi/generated/openapi_client/models/experiment_stats_column_config.py new file mode 100644 index 0000000..125f9b4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stats_column_config.py @@ -0,0 +1,121 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentStatsColumnConfig") + + +@_attrs_define +class ExperimentStatsColumnConfig: + """ + Attributes: + name (str): + status (str | Unset): + reverse_output (bool | Unset): + output_type (None | str | Unset): + eval_template_id (None | str | Unset): + """ + + name: str + status: str | Unset = UNSET + reverse_output: bool | Unset = UNSET + output_type: None | str | Unset = UNSET + eval_template_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + status = self.status + + reverse_output = self.reverse_output + + output_type: None | str | Unset + if isinstance(self.output_type, Unset): + output_type = UNSET + else: + output_type = self.output_type + + eval_template_id: None | str | Unset + if isinstance(self.eval_template_id, Unset): + eval_template_id = UNSET + else: + eval_template_id = self.eval_template_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if status is not UNSET: + field_dict["status"] = status + if reverse_output is not UNSET: + field_dict["reverse_output"] = reverse_output + if output_type is not UNSET: + field_dict["output_type"] = output_type + if eval_template_id is not UNSET: + field_dict["eval_template_id"] = eval_template_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + status = d.pop("status", UNSET) + + reverse_output = d.pop("reverse_output", UNSET) + + def _parse_output_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + output_type = _parse_output_type(d.pop("output_type", UNSET)) + + def _parse_eval_template_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_template_id = _parse_eval_template_id(d.pop("eval_template_id", UNSET)) + + experiment_stats_column_config = cls( + name=name, + status=status, + reverse_output=reverse_output, + output_type=output_type, + eval_template_id=eval_template_id, + ) + + experiment_stats_column_config.additional_properties = d + return experiment_stats_column_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stats_metadata.py b/python/fi/generated/openapi_client/models/experiment_stats_metadata.py new file mode 100644 index 0000000..3941448 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stats_metadata.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentStatsMetadata") + + +@_attrs_define +class ExperimentStatsMetadata: + """ + Attributes: + is_winner_chosen (bool): + """ + + is_winner_chosen: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + is_winner_chosen = self.is_winner_chosen + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "is_winner_chosen": is_winner_chosen, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + is_winner_chosen = d.pop("is_winner_chosen") + + experiment_stats_metadata = cls( + is_winner_chosen=is_winner_chosen, + ) + + experiment_stats_metadata.additional_properties = d + return experiment_stats_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stats_response.py b/python/fi/generated/openapi_client/models/experiment_stats_response.py new file mode 100644 index 0000000..712a1fe --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stats_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_stats_result import ExperimentStatsResult + + +T = TypeVar("T", bound="ExperimentStatsResponse") + + +@_attrs_define +class ExperimentStatsResponse: + """ + Attributes: + status (bool): + result (ExperimentStatsResult): + """ + + status: bool + result: ExperimentStatsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_stats_result import ExperimentStatsResult + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentStatsResult.from_dict(d.pop("result")) + + experiment_stats_response = cls( + status=status, + result=result, + ) + + experiment_stats_response.additional_properties = d + return experiment_stats_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stats_result.py b/python/fi/generated/openapi_client/models/experiment_stats_result.py new file mode 100644 index 0000000..371faa8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stats_result.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_stats_column_config import ExperimentStatsColumnConfig + from ..models.experiment_stats_metadata import ExperimentStatsMetadata + from ..models.experiment_stats_result_table_data_item import ( + ExperimentStatsResultTableDataItem, + ) + + +T = TypeVar("T", bound="ExperimentStatsResult") + + +@_attrs_define +class ExperimentStatsResult: + """ + Attributes: + column_config (list[ExperimentStatsColumnConfig]): + table_data (list[ExperimentStatsResultTableDataItem]): + metadata (ExperimentStatsMetadata): + """ + + column_config: list[ExperimentStatsColumnConfig] + table_data: list[ExperimentStatsResultTableDataItem] + metadata: ExperimentStatsMetadata + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_config = [] + for column_config_item_data in self.column_config: + column_config_item = column_config_item_data.to_dict() + column_config.append(column_config_item) + + table_data = [] + for table_data_item_data in self.table_data: + table_data_item = table_data_item_data.to_dict() + table_data.append(table_data_item) + + metadata = self.metadata.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_config": column_config, + "table_data": table_data, + "metadata": metadata, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_stats_column_config import ExperimentStatsColumnConfig + from ..models.experiment_stats_metadata import ExperimentStatsMetadata + from ..models.experiment_stats_result_table_data_item import ( + ExperimentStatsResultTableDataItem, + ) + + d = dict(src_dict) + column_config = [] + _column_config = d.pop("column_config") + for column_config_item_data in _column_config: + column_config_item = ExperimentStatsColumnConfig.from_dict( + column_config_item_data + ) + + column_config.append(column_config_item) + + table_data = [] + _table_data = d.pop("table_data") + for table_data_item_data in _table_data: + table_data_item = ExperimentStatsResultTableDataItem.from_dict( + table_data_item_data + ) + + table_data.append(table_data_item) + + metadata = ExperimentStatsMetadata.from_dict(d.pop("metadata")) + + experiment_stats_result = cls( + column_config=column_config, + table_data=table_data, + metadata=metadata, + ) + + experiment_stats_result.additional_properties = d + return experiment_stats_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stats_result_table_data_item.py b/python/fi/generated/openapi_client/models/experiment_stats_result_table_data_item.py new file mode 100644 index 0000000..38a9201 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stats_result_table_data_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentStatsResultTableDataItem") + + +@_attrs_define +class ExperimentStatsResultTableDataItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_stats_result_table_data_item = cls() + + experiment_stats_result_table_data_item.additional_properties = d + return experiment_stats_result_table_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stop_response.py b/python/fi/generated/openapi_client/models/experiment_stop_response.py new file mode 100644 index 0000000..5ac8e14 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stop_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_stop_result import ExperimentStopResult + + +T = TypeVar("T", bound="ExperimentStopResponse") + + +@_attrs_define +class ExperimentStopResponse: + """ + Attributes: + status (bool): + result (ExperimentStopResult): + """ + + status: bool + result: ExperimentStopResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_stop_result import ExperimentStopResult + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentStopResult.from_dict(d.pop("result")) + + experiment_stop_response = cls( + status=status, + result=result, + ) + + experiment_stop_response.additional_properties = d + return experiment_stop_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stop_result.py b/python/fi/generated/openapi_client/models/experiment_stop_result.py new file mode 100644 index 0000000..2141e32 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stop_result.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_stop_workflows_cancelled import ( + ExperimentStopWorkflowsCancelled, + ) + + +T = TypeVar("T", bound="ExperimentStopResult") + + +@_attrs_define +class ExperimentStopResult: + """ + Attributes: + message (str): + experiment_id (UUID): + workflows_cancelled (ExperimentStopWorkflowsCancelled): + """ + + message: str + experiment_id: UUID + workflows_cancelled: ExperimentStopWorkflowsCancelled + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + experiment_id = str(self.experiment_id) + + workflows_cancelled = self.workflows_cancelled.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "experiment_id": experiment_id, + "workflows_cancelled": workflows_cancelled, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_stop_workflows_cancelled import ( + ExperimentStopWorkflowsCancelled, + ) + + d = dict(src_dict) + message = d.pop("message") + + experiment_id = UUID(d.pop("experiment_id")) + + workflows_cancelled = ExperimentStopWorkflowsCancelled.from_dict( + d.pop("workflows_cancelled") + ) + + experiment_stop_result = cls( + message=message, + experiment_id=experiment_id, + workflows_cancelled=workflows_cancelled, + ) + + experiment_stop_result.additional_properties = d + return experiment_stop_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_stop_workflows_cancelled.py b/python/fi/generated/openapi_client/models/experiment_stop_workflows_cancelled.py new file mode 100644 index 0000000..19c9940 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_stop_workflows_cancelled.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentStopWorkflowsCancelled") + + +@_attrs_define +class ExperimentStopWorkflowsCancelled: + """ + Attributes: + main (bool): + reruns (bool): + """ + + main: bool + reruns: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + main = self.main + + reruns = self.reruns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "main": main, + "reruns": reruns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + main = d.pop("main") + + reruns = d.pop("reruns") + + experiment_stop_workflows_cancelled = cls( + main=main, + reruns=reruns, + ) + + experiment_stop_workflows_cancelled.additional_properties = d + return experiment_stop_workflows_cancelled + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_string_result_response.py b/python/fi/generated/openapi_client/models/experiment_string_result_response.py new file mode 100644 index 0000000..78f38eb --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_string_result_response.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentStringResultResponse") + + +@_attrs_define +class ExperimentStringResultResponse: + """ + Attributes: + status (bool): + result (str): + """ + + status: bool + result: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = d.pop("status") + + result = d.pop("result") + + experiment_string_result_response = cls( + status=status, + result=result, + ) + + experiment_string_result_response.additional_properties = d + return experiment_string_result_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_column_config.py b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config.py new file mode 100644 index 0000000..88ef809 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config.py @@ -0,0 +1,257 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_table_rows_column_config_average_score import ( + ExperimentTableRowsColumnConfigAverageScore, + ) + from ..models.experiment_table_rows_column_config_choices_map import ( + ExperimentTableRowsColumnConfigChoicesMap, + ) + from ..models.experiment_table_rows_column_config_group import ( + ExperimentTableRowsColumnConfigGroup, + ) + + +T = TypeVar("T", bound="ExperimentTableRowsColumnConfig") + + +@_attrs_define +class ExperimentTableRowsColumnConfig: + """ + Attributes: + id (str): + name (str): + origin_type (str | Unset): + data_type (str | Unset): + status (str | Unset): + group (ExperimentTableRowsColumnConfigGroup | Unset): + average_score (ExperimentTableRowsColumnConfigAverageScore | Unset): + dataset_id (str | Unset): + choices_map (ExperimentTableRowsColumnConfigChoicesMap | Unset): + is_base_column (bool | Unset): + output_type (None | str | Unset): + eval_template_id (None | str | Unset): + source_id (str | Unset): + is_agent (bool | Unset): + is_final (bool | Unset): + """ + + id: str + name: str + origin_type: str | Unset = UNSET + data_type: str | Unset = UNSET + status: str | Unset = UNSET + group: ExperimentTableRowsColumnConfigGroup | Unset = UNSET + average_score: ExperimentTableRowsColumnConfigAverageScore | Unset = UNSET + dataset_id: str | Unset = UNSET + choices_map: ExperimentTableRowsColumnConfigChoicesMap | Unset = UNSET + is_base_column: bool | Unset = UNSET + output_type: None | str | Unset = UNSET + eval_template_id: None | str | Unset = UNSET + source_id: str | Unset = UNSET + is_agent: bool | Unset = UNSET + is_final: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + origin_type = self.origin_type + + data_type = self.data_type + + status = self.status + + group: dict[str, Any] | Unset = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + average_score: dict[str, Any] | Unset = UNSET + if not isinstance(self.average_score, Unset): + average_score = self.average_score.to_dict() + + dataset_id = self.dataset_id + + choices_map: dict[str, Any] | Unset = UNSET + if not isinstance(self.choices_map, Unset): + choices_map = self.choices_map.to_dict() + + is_base_column = self.is_base_column + + output_type: None | str | Unset + if isinstance(self.output_type, Unset): + output_type = UNSET + else: + output_type = self.output_type + + eval_template_id: None | str | Unset + if isinstance(self.eval_template_id, Unset): + eval_template_id = UNSET + else: + eval_template_id = self.eval_template_id + + source_id = self.source_id + + is_agent = self.is_agent + + is_final = self.is_final + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + if origin_type is not UNSET: + field_dict["origin_type"] = origin_type + if data_type is not UNSET: + field_dict["data_type"] = data_type + if status is not UNSET: + field_dict["status"] = status + if group is not UNSET: + field_dict["group"] = group + if average_score is not UNSET: + field_dict["average_score"] = average_score + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if choices_map is not UNSET: + field_dict["choices_map"] = choices_map + if is_base_column is not UNSET: + field_dict["is_base_column"] = is_base_column + if output_type is not UNSET: + field_dict["output_type"] = output_type + if eval_template_id is not UNSET: + field_dict["eval_template_id"] = eval_template_id + if source_id is not UNSET: + field_dict["source_id"] = source_id + if is_agent is not UNSET: + field_dict["is_agent"] = is_agent + if is_final is not UNSET: + field_dict["is_final"] = is_final + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_table_rows_column_config_average_score import ( + ExperimentTableRowsColumnConfigAverageScore, + ) + from ..models.experiment_table_rows_column_config_choices_map import ( + ExperimentTableRowsColumnConfigChoicesMap, + ) + from ..models.experiment_table_rows_column_config_group import ( + ExperimentTableRowsColumnConfigGroup, + ) + + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + origin_type = d.pop("origin_type", UNSET) + + data_type = d.pop("data_type", UNSET) + + status = d.pop("status", UNSET) + + _group = d.pop("group", UNSET) + group: ExperimentTableRowsColumnConfigGroup | Unset + if isinstance(_group, Unset): + group = UNSET + else: + group = ExperimentTableRowsColumnConfigGroup.from_dict(_group) + + _average_score = d.pop("average_score", UNSET) + average_score: ExperimentTableRowsColumnConfigAverageScore | Unset + if isinstance(_average_score, Unset): + average_score = UNSET + else: + average_score = ExperimentTableRowsColumnConfigAverageScore.from_dict( + _average_score + ) + + dataset_id = d.pop("dataset_id", UNSET) + + _choices_map = d.pop("choices_map", UNSET) + choices_map: ExperimentTableRowsColumnConfigChoicesMap | Unset + if isinstance(_choices_map, Unset): + choices_map = UNSET + else: + choices_map = ExperimentTableRowsColumnConfigChoicesMap.from_dict( + _choices_map + ) + + is_base_column = d.pop("is_base_column", UNSET) + + def _parse_output_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + output_type = _parse_output_type(d.pop("output_type", UNSET)) + + def _parse_eval_template_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_template_id = _parse_eval_template_id(d.pop("eval_template_id", UNSET)) + + source_id = d.pop("source_id", UNSET) + + is_agent = d.pop("is_agent", UNSET) + + is_final = d.pop("is_final", UNSET) + + experiment_table_rows_column_config = cls( + id=id, + name=name, + origin_type=origin_type, + data_type=data_type, + status=status, + group=group, + average_score=average_score, + dataset_id=dataset_id, + choices_map=choices_map, + is_base_column=is_base_column, + output_type=output_type, + eval_template_id=eval_template_id, + source_id=source_id, + is_agent=is_agent, + is_final=is_final, + ) + + experiment_table_rows_column_config.additional_properties = d + return experiment_table_rows_column_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_average_score.py b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_average_score.py new file mode 100644 index 0000000..1ac4feb --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_average_score.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentTableRowsColumnConfigAverageScore") + + +@_attrs_define +class ExperimentTableRowsColumnConfigAverageScore: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_table_rows_column_config_average_score = cls() + + experiment_table_rows_column_config_average_score.additional_properties = d + return experiment_table_rows_column_config_average_score + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_choices_map.py b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_choices_map.py new file mode 100644 index 0000000..40fa6a6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_choices_map.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentTableRowsColumnConfigChoicesMap") + + +@_attrs_define +class ExperimentTableRowsColumnConfigChoicesMap: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_table_rows_column_config_choices_map = cls() + + experiment_table_rows_column_config_choices_map.additional_properties = d + return experiment_table_rows_column_config_choices_map + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_group.py b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_group.py new file mode 100644 index 0000000..77d1e86 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_column_config_group.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentTableRowsColumnConfigGroup") + + +@_attrs_define +class ExperimentTableRowsColumnConfigGroup: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_table_rows_column_config_group = cls() + + experiment_table_rows_column_config_group.additional_properties = d + return experiment_table_rows_column_config_group + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_metadata.py b/python/fi/generated/openapi_client/models/experiment_table_rows_metadata.py new file mode 100644 index 0000000..c3c2a53 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_metadata.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_table_rows_metadata_description import ( + ExperimentTableRowsMetadataDescription, + ) + + +T = TypeVar("T", bound="ExperimentTableRowsMetadata") + + +@_attrs_define +class ExperimentTableRowsMetadata: + """ + Attributes: + total_rows (int | Unset): + dataset (str | Unset): + dataset_name (str | Unset): + column (None | str | Unset): + total_pages (int | Unset): + description (ExperimentTableRowsMetadataDescription | Unset): + """ + + total_rows: int | Unset = UNSET + dataset: str | Unset = UNSET + dataset_name: str | Unset = UNSET + column: None | str | Unset = UNSET + total_pages: int | Unset = UNSET + description: ExperimentTableRowsMetadataDescription | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total_rows = self.total_rows + + dataset = self.dataset + + dataset_name = self.dataset_name + + column: None | str | Unset + if isinstance(self.column, Unset): + column = UNSET + else: + column = self.column + + total_pages = self.total_pages + + description: dict[str, Any] | Unset = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_rows is not UNSET: + field_dict["total_rows"] = total_rows + if dataset is not UNSET: + field_dict["dataset"] = dataset + if dataset_name is not UNSET: + field_dict["dataset_name"] = dataset_name + if column is not UNSET: + field_dict["column"] = column + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_table_rows_metadata_description import ( + ExperimentTableRowsMetadataDescription, + ) + + d = dict(src_dict) + total_rows = d.pop("total_rows", UNSET) + + dataset = d.pop("dataset", UNSET) + + dataset_name = d.pop("dataset_name", UNSET) + + def _parse_column(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + column = _parse_column(d.pop("column", UNSET)) + + total_pages = d.pop("total_pages", UNSET) + + _description = d.pop("description", UNSET) + description: ExperimentTableRowsMetadataDescription | Unset + if isinstance(_description, Unset): + description = UNSET + else: + description = ExperimentTableRowsMetadataDescription.from_dict(_description) + + experiment_table_rows_metadata = cls( + total_rows=total_rows, + dataset=dataset, + dataset_name=dataset_name, + column=column, + total_pages=total_pages, + description=description, + ) + + experiment_table_rows_metadata.additional_properties = d + return experiment_table_rows_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_metadata_description.py b/python/fi/generated/openapi_client/models/experiment_table_rows_metadata_description.py new file mode 100644 index 0000000..037ae33 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_metadata_description.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentTableRowsMetadataDescription") + + +@_attrs_define +class ExperimentTableRowsMetadataDescription: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_table_rows_metadata_description = cls() + + experiment_table_rows_metadata_description.additional_properties = d + return experiment_table_rows_metadata_description + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_response.py b/python/fi/generated/openapi_client/models/experiment_table_rows_response.py new file mode 100644 index 0000000..1a217bd --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_table_rows_result import ExperimentTableRowsResult + + +T = TypeVar("T", bound="ExperimentTableRowsResponse") + + +@_attrs_define +class ExperimentTableRowsResponse: + """ + Attributes: + status (bool): + result (ExperimentTableRowsResult): + """ + + status: bool + result: ExperimentTableRowsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_table_rows_result import ExperimentTableRowsResult + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentTableRowsResult.from_dict(d.pop("result")) + + experiment_table_rows_response = cls( + status=status, + result=result, + ) + + experiment_table_rows_response.additional_properties = d + return experiment_table_rows_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_result.py b/python/fi/generated/openapi_client/models/experiment_table_rows_result.py new file mode 100644 index 0000000..6052c15 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_result.py @@ -0,0 +1,170 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_table_rows_column_config import ( + ExperimentTableRowsColumnConfig, + ) + from ..models.experiment_table_rows_metadata import ExperimentTableRowsMetadata + from ..models.experiment_table_rows_result_table_item import ( + ExperimentTableRowsResultTableItem, + ) + + +T = TypeVar("T", bound="ExperimentTableRowsResult") + + +@_attrs_define +class ExperimentTableRowsResult: + """ + Attributes: + column_config (list[ExperimentTableRowsColumnConfig]): + table (list[ExperimentTableRowsResultTableItem] | Unset): + metadata (ExperimentTableRowsMetadata | Unset): + output_format (str | Unset): + status (str | Unset): + next_row_ids (list[UUID] | Unset): + """ + + column_config: list[ExperimentTableRowsColumnConfig] + table: list[ExperimentTableRowsResultTableItem] | Unset = UNSET + metadata: ExperimentTableRowsMetadata | Unset = UNSET + output_format: str | Unset = UNSET + status: str | Unset = UNSET + next_row_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_config = [] + for column_config_item_data in self.column_config: + column_config_item = column_config_item_data.to_dict() + column_config.append(column_config_item) + + table: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.table, Unset): + table = [] + for table_item_data in self.table: + table_item = table_item_data.to_dict() + table.append(table_item) + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + output_format = self.output_format + + status = self.status + + next_row_ids: list[str] | Unset = UNSET + if not isinstance(self.next_row_ids, Unset): + next_row_ids = [] + for next_row_ids_item_data in self.next_row_ids: + next_row_ids_item = str(next_row_ids_item_data) + next_row_ids.append(next_row_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_config": column_config, + } + ) + if table is not UNSET: + field_dict["table"] = table + if metadata is not UNSET: + field_dict["metadata"] = metadata + if output_format is not UNSET: + field_dict["output_format"] = output_format + if status is not UNSET: + field_dict["status"] = status + if next_row_ids is not UNSET: + field_dict["next_row_ids"] = next_row_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_table_rows_column_config import ( + ExperimentTableRowsColumnConfig, + ) + from ..models.experiment_table_rows_metadata import ExperimentTableRowsMetadata + from ..models.experiment_table_rows_result_table_item import ( + ExperimentTableRowsResultTableItem, + ) + + d = dict(src_dict) + column_config = [] + _column_config = d.pop("column_config") + for column_config_item_data in _column_config: + column_config_item = ExperimentTableRowsColumnConfig.from_dict( + column_config_item_data + ) + + column_config.append(column_config_item) + + _table = d.pop("table", UNSET) + table: list[ExperimentTableRowsResultTableItem] | Unset = UNSET + if _table is not UNSET: + table = [] + for table_item_data in _table: + table_item = ExperimentTableRowsResultTableItem.from_dict( + table_item_data + ) + + table.append(table_item) + + _metadata = d.pop("metadata", UNSET) + metadata: ExperimentTableRowsMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = ExperimentTableRowsMetadata.from_dict(_metadata) + + output_format = d.pop("output_format", UNSET) + + status = d.pop("status", UNSET) + + _next_row_ids = d.pop("next_row_ids", UNSET) + next_row_ids: list[UUID] | Unset = UNSET + if _next_row_ids is not UNSET: + next_row_ids = [] + for next_row_ids_item_data in _next_row_ids: + next_row_ids_item = UUID(next_row_ids_item_data) + + next_row_ids.append(next_row_ids_item) + + experiment_table_rows_result = cls( + column_config=column_config, + table=table, + metadata=metadata, + output_format=output_format, + status=status, + next_row_ids=next_row_ids, + ) + + experiment_table_rows_result.additional_properties = d + return experiment_table_rows_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_table_rows_result_table_item.py b/python/fi/generated/openapi_client/models/experiment_table_rows_result_table_item.py new file mode 100644 index 0000000..8fd47a9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_table_rows_result_table_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ExperimentTableRowsResultTableItem") + + +@_attrs_define +class ExperimentTableRowsResultTableItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + experiment_table_rows_result_table_item = cls() + + experiment_table_rows_result_table_item.additional_properties = d + return experiment_table_rows_result_table_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_update_v2.py b/python/fi/generated/openapi_client/models/experiment_update_v2.py new file mode 100644 index 0000000..134529a --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_update_v2.py @@ -0,0 +1,138 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.eval_metric_entry import EvalMetricEntry + from ..models.prompt_config_entry import PromptConfigEntry + + +T = TypeVar("T", bound="ExperimentUpdateV2") + + +@_attrs_define +class ExperimentUpdateV2: + """ + Attributes: + column_id (None | Unset | UUID): + prompt_config (list[PromptConfigEntry] | Unset): + user_eval_metrics (list[EvalMetricEntry] | Unset): + """ + + column_id: None | Unset | UUID = UNSET + prompt_config: list[PromptConfigEntry] | Unset = UNSET + user_eval_metrics: list[EvalMetricEntry] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id: None | str | Unset + if isinstance(self.column_id, Unset): + column_id = UNSET + elif isinstance(self.column_id, UUID): + column_id = str(self.column_id) + else: + column_id = self.column_id + + prompt_config: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.prompt_config, Unset): + prompt_config = [] + for prompt_config_item_data in self.prompt_config: + prompt_config_item = prompt_config_item_data.to_dict() + prompt_config.append(prompt_config_item) + + user_eval_metrics: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.user_eval_metrics, Unset): + user_eval_metrics = [] + for user_eval_metrics_item_data in self.user_eval_metrics: + user_eval_metrics_item = user_eval_metrics_item_data.to_dict() + user_eval_metrics.append(user_eval_metrics_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if column_id is not UNSET: + field_dict["column_id"] = column_id + if prompt_config is not UNSET: + field_dict["prompt_config"] = prompt_config + if user_eval_metrics is not UNSET: + field_dict["user_eval_metrics"] = user_eval_metrics + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.eval_metric_entry import EvalMetricEntry + from ..models.prompt_config_entry import PromptConfigEntry + + d = dict(src_dict) + + def _parse_column_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + column_id_type_0 = UUID(data) + + return column_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + column_id = _parse_column_id(d.pop("column_id", UNSET)) + + _prompt_config = d.pop("prompt_config", UNSET) + prompt_config: list[PromptConfigEntry] | Unset = UNSET + if _prompt_config is not UNSET: + prompt_config = [] + for prompt_config_item_data in _prompt_config: + prompt_config_item = PromptConfigEntry.from_dict( + prompt_config_item_data + ) + + prompt_config.append(prompt_config_item) + + _user_eval_metrics = d.pop("user_eval_metrics", UNSET) + user_eval_metrics: list[EvalMetricEntry] | Unset = UNSET + if _user_eval_metrics is not UNSET: + user_eval_metrics = [] + for user_eval_metrics_item_data in _user_eval_metrics: + user_eval_metrics_item = EvalMetricEntry.from_dict( + user_eval_metrics_item_data + ) + + user_eval_metrics.append(user_eval_metrics_item) + + experiment_update_v2 = cls( + column_id=column_id, + prompt_config=prompt_config, + user_eval_metrics=user_eval_metrics, + ) + + experiment_update_v2.additional_properties = d + return experiment_update_v2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_v2_detail_response.py b/python/fi/generated/openapi_client/models/experiment_v2_detail_response.py new file mode 100644 index 0000000..cc826b7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_v2_detail_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_detail_v2 import ExperimentDetailV2 + + +T = TypeVar("T", bound="ExperimentV2DetailResponse") + + +@_attrs_define +class ExperimentV2DetailResponse: + """ + Attributes: + status (bool): + result (ExperimentDetailV2): + """ + + status: bool + result: ExperimentDetailV2 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_detail_v2 import ExperimentDetailV2 + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentDetailV2.from_dict(d.pop("result")) + + experiment_v2_detail_response = cls( + status=status, + result=result, + ) + + experiment_v2_detail_response.additional_properties = d + return experiment_v2_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_workflow_response.py b/python/fi/generated/openapi_client/models/experiment_workflow_response.py new file mode 100644 index 0000000..5bc4b32 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_workflow_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.experiment_workflow_result import ExperimentWorkflowResult + + +T = TypeVar("T", bound="ExperimentWorkflowResponse") + + +@_attrs_define +class ExperimentWorkflowResponse: + """ + Attributes: + status (bool): + result (ExperimentWorkflowResult): + """ + + status: bool + result: ExperimentWorkflowResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_workflow_result import ExperimentWorkflowResult + + d = dict(src_dict) + status = d.pop("status") + + result = ExperimentWorkflowResult.from_dict(d.pop("result")) + + experiment_workflow_response = cls( + status=status, + result=result, + ) + + experiment_workflow_response.additional_properties = d + return experiment_workflow_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/experiment_workflow_result.py b/python/fi/generated/openapi_client/models/experiment_workflow_result.py new file mode 100644 index 0000000..915aa73 --- /dev/null +++ b/python/fi/generated/openapi_client/models/experiment_workflow_result.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExperimentWorkflowResult") + + +@_attrs_define +class ExperimentWorkflowResult: + """ + Attributes: + message (str): + workflow_id (str | Unset): + """ + + message: str + workflow_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + workflow_id = d.pop("workflow_id", UNSET) + + experiment_workflow_result = cls( + message=message, + workflow_id=workflow_id, + ) + + experiment_workflow_result.additional_properties = d + return experiment_workflow_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/export_annotation_queue_export_format.py b/python/fi/generated/openapi_client/models/export_annotation_queue_export_format.py new file mode 100644 index 0000000..e6c622f --- /dev/null +++ b/python/fi/generated/openapi_client/models/export_annotation_queue_export_format.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ExportAnnotationQueueExportFormat(str, Enum): + CSV = "csv" + JSON = "json" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/extract_entities_request.py b/python/fi/generated/openapi_client/models/extract_entities_request.py new file mode 100644 index 0000000..0ee8ead --- /dev/null +++ b/python/fi/generated/openapi_client/models/extract_entities_request.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExtractEntitiesRequest") + + +@_attrs_define +class ExtractEntitiesRequest: + """ + Attributes: + column_id (UUID): + instruction (str): + language_model_id (str | Unset): Default: 'gpt-4'. + concurrency (int | Unset): Default: 5. + new_column_name (str | Unset): + """ + + column_id: UUID + instruction: str + language_model_id: str | Unset = "gpt-4" + concurrency: int | Unset = 5 + new_column_name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id = str(self.column_id) + + instruction = self.instruction + + language_model_id = self.language_model_id + + concurrency = self.concurrency + + new_column_name = self.new_column_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_id": column_id, + "instruction": instruction, + } + ) + if language_model_id is not UNSET: + field_dict["language_model_id"] = language_model_id + if concurrency is not UNSET: + field_dict["concurrency"] = concurrency + if new_column_name is not UNSET: + field_dict["new_column_name"] = new_column_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_id = UUID(d.pop("column_id")) + + instruction = d.pop("instruction") + + language_model_id = d.pop("language_model_id", UNSET) + + concurrency = d.pop("concurrency", UNSET) + + new_column_name = d.pop("new_column_name", UNSET) + + extract_entities_request = cls( + column_id=column_id, + instruction=instruction, + language_model_id=language_model_id, + concurrency=concurrency, + new_column_name=new_column_name, + ) + + extract_entities_request.additional_properties = d + return extract_entities_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/extract_json_column_request.py b/python/fi/generated/openapi_client/models/extract_json_column_request.py new file mode 100644 index 0000000..7473de6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/extract_json_column_request.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExtractJsonColumnRequest") + + +@_attrs_define +class ExtractJsonColumnRequest: + """ + Attributes: + column_id (UUID): + json_key (str): + new_column_name (str | Unset): + concurrency (int | Unset): Default: 5. + """ + + column_id: UUID + json_key: str + new_column_name: str | Unset = UNSET + concurrency: int | Unset = 5 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id = str(self.column_id) + + json_key = self.json_key + + new_column_name = self.new_column_name + + concurrency = self.concurrency + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_id": column_id, + "json_key": json_key, + } + ) + if new_column_name is not UNSET: + field_dict["new_column_name"] = new_column_name + if concurrency is not UNSET: + field_dict["concurrency"] = concurrency + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_id = UUID(d.pop("column_id")) + + json_key = d.pop("json_key") + + new_column_name = d.pop("new_column_name", UNSET) + + concurrency = d.pop("concurrency", UNSET) + + extract_json_column_request = cls( + column_id=column_id, + json_key=json_key, + new_column_name=new_column_name, + concurrency=concurrency, + ) + + extract_json_column_request.additional_properties = d + return extract_json_column_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/failed_rerun_item.py b/python/fi/generated/openapi_client/models/failed_rerun_item.py new file mode 100644 index 0000000..948b5f4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/failed_rerun_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="FailedRerunItem") + + +@_attrs_define +class FailedRerunItem: + """ + Attributes: + call_execution_id (UUID): + error (str): + """ + + call_execution_id: UUID + error: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id = str(self.call_execution_id) + + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "call_execution_id": call_execution_id, + "error": error, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_id = UUID(d.pop("call_execution_id")) + + error = d.pop("error") + + failed_rerun_item = cls( + call_execution_id=call_execution_id, + error=error, + ) + + failed_rerun_item.additional_properties = d + return failed_rerun_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_detail_api_response.py b/python/fi/generated/openapi_client/models/feed_detail_api_response.py new file mode 100644 index 0000000..5bfa926 --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_detail_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.feed_detail_core import FeedDetailCore + + +T = TypeVar("T", bound="FeedDetailApiResponse") + + +@_attrs_define +class FeedDetailApiResponse: + """ + Attributes: + result (FeedDetailCore): + status (bool | Unset): Default: True. + """ + + result: FeedDetailCore + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.feed_detail_core import FeedDetailCore + + d = dict(src_dict) + result = FeedDetailCore.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + feed_detail_api_response = cls( + result=result, + status=status, + ) + + feed_detail_api_response.additional_properties = d + return feed_detail_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_detail_core.py b/python/fi/generated/openapi_client/models/feed_detail_core.py new file mode 100644 index 0000000..5cab3ec --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_detail_core.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.feed_list_row import FeedListRow + from ..models.trace_preview import TracePreview + + +T = TypeVar("T", bound="FeedDetailCore") + + +@_attrs_define +class FeedDetailCore: + """ + Attributes: + row (FeedListRow): + description (None | str): + success_trace (TracePreview): + representative_trace (TracePreview): + """ + + row: FeedListRow + description: None | str + success_trace: TracePreview + representative_trace: TracePreview + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + row = self.row.to_dict() + + description: None | str + description = self.description + + success_trace = self.success_trace.to_dict() + + representative_trace = self.representative_trace.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "row": row, + "description": description, + "success_trace": success_trace, + "representative_trace": representative_trace, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.feed_list_row import FeedListRow + from ..models.trace_preview import TracePreview + + d = dict(src_dict) + row = FeedListRow.from_dict(d.pop("row")) + + def _parse_description(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + description = _parse_description(d.pop("description")) + + success_trace = TracePreview.from_dict(d.pop("success_trace")) + + representative_trace = TracePreview.from_dict(d.pop("representative_trace")) + + feed_detail_core = cls( + row=row, + description=description, + success_trace=success_trace, + representative_trace=representative_trace, + ) + + feed_detail_core.additional_properties = d + return feed_detail_core + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_list_api_response.py b/python/fi/generated/openapi_client/models/feed_list_api_response.py new file mode 100644 index 0000000..1ce699c --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_list_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.feed_list_response import FeedListResponse + + +T = TypeVar("T", bound="FeedListApiResponse") + + +@_attrs_define +class FeedListApiResponse: + """ + Attributes: + result (FeedListResponse): + status (bool | Unset): Default: True. + """ + + result: FeedListResponse + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.feed_list_response import FeedListResponse + + d = dict(src_dict) + result = FeedListResponse.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + feed_list_api_response = cls( + result=result, + status=status, + ) + + feed_list_api_response.additional_properties = d + return feed_list_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_list_response.py b/python/fi/generated/openapi_client/models/feed_list_response.py new file mode 100644 index 0000000..14c362f --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_list_response.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.feed_list_row import FeedListRow + + +T = TypeVar("T", bound="FeedListResponse") + + +@_attrs_define +class FeedListResponse: + """ + Attributes: + data (list[FeedListRow]): + total (int): + limit (int): + offset (int): + """ + + data: list[FeedListRow] + total: int + limit: int + offset: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + total = self.total + + limit = self.limit + + offset = self.offset + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "total": total, + "limit": limit, + "offset": offset, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.feed_list_row import FeedListRow + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = FeedListRow.from_dict(data_item_data) + + data.append(data_item) + + total = d.pop("total") + + limit = d.pop("limit") + + offset = d.pop("offset") + + feed_list_response = cls( + data=data, + total=total, + limit=limit, + offset=offset, + ) + + feed_list_response.additional_properties = d + return feed_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_list_row.py b/python/fi/generated/openapi_client/models/feed_list_row.py new file mode 100644 index 0000000..15fcb8c --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_list_row.py @@ -0,0 +1,349 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +if TYPE_CHECKING: + from ..models.error_name import ErrorName + from ..models.trend_point import TrendPoint + + +T = TypeVar("T", bound="FeedListRow") + + +@_attrs_define +class FeedListRow: + """ + Attributes: + cluster_id (str): + source (str): + error (ErrorName): + status (str): + severity (str): + occurrences (int): + trace_count (int): + fix_layer (None | str): + users_affected (int): + sessions (int): + first_seen (datetime.datetime | None): + last_seen (datetime.datetime | None): + trends (list[TrendPoint]): + assignees (list[str]): + model (None | str): + model_version (None | str): + project (None | str): + project_id (None | str): + environment (None | str): + eval_score (float | None): + trace_id (None | str): + external_issue_url (None | str): + external_issue_id (None | str): + """ + + cluster_id: str + source: str + error: ErrorName + status: str + severity: str + occurrences: int + trace_count: int + fix_layer: None | str + users_affected: int + sessions: int + first_seen: datetime.datetime | None + last_seen: datetime.datetime | None + trends: list[TrendPoint] + assignees: list[str] + model: None | str + model_version: None | str + project: None | str + project_id: None | str + environment: None | str + eval_score: float | None + trace_id: None | str + external_issue_url: None | str + external_issue_id: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cluster_id = self.cluster_id + + source = self.source + + error = self.error.to_dict() + + status = self.status + + severity = self.severity + + occurrences = self.occurrences + + trace_count = self.trace_count + + fix_layer: None | str + fix_layer = self.fix_layer + + users_affected = self.users_affected + + sessions = self.sessions + + first_seen: None | str + if isinstance(self.first_seen, datetime.datetime): + first_seen = self.first_seen.isoformat() + else: + first_seen = self.first_seen + + last_seen: None | str + if isinstance(self.last_seen, datetime.datetime): + last_seen = self.last_seen.isoformat() + else: + last_seen = self.last_seen + + trends = [] + for trends_item_data in self.trends: + trends_item = trends_item_data.to_dict() + trends.append(trends_item) + + assignees = self.assignees + + model: None | str + model = self.model + + model_version: None | str + model_version = self.model_version + + project: None | str + project = self.project + + project_id: None | str + project_id = self.project_id + + environment: None | str + environment = self.environment + + eval_score: float | None + eval_score = self.eval_score + + trace_id: None | str + trace_id = self.trace_id + + external_issue_url: None | str + external_issue_url = self.external_issue_url + + external_issue_id: None | str + external_issue_id = self.external_issue_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "cluster_id": cluster_id, + "source": source, + "error": error, + "status": status, + "severity": severity, + "occurrences": occurrences, + "trace_count": trace_count, + "fix_layer": fix_layer, + "users_affected": users_affected, + "sessions": sessions, + "first_seen": first_seen, + "last_seen": last_seen, + "trends": trends, + "assignees": assignees, + "model": model, + "model_version": model_version, + "project": project, + "project_id": project_id, + "environment": environment, + "eval_score": eval_score, + "trace_id": trace_id, + "external_issue_url": external_issue_url, + "external_issue_id": external_issue_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.error_name import ErrorName + from ..models.trend_point import TrendPoint + + d = dict(src_dict) + cluster_id = d.pop("cluster_id") + + source = d.pop("source") + + error = ErrorName.from_dict(d.pop("error")) + + status = d.pop("status") + + severity = d.pop("severity") + + occurrences = d.pop("occurrences") + + trace_count = d.pop("trace_count") + + def _parse_fix_layer(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + fix_layer = _parse_fix_layer(d.pop("fix_layer")) + + users_affected = d.pop("users_affected") + + sessions = d.pop("sessions") + + def _parse_first_seen(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + first_seen_type_0 = isoparse(data) + + return first_seen_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + first_seen = _parse_first_seen(d.pop("first_seen")) + + def _parse_last_seen(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + last_seen_type_0 = isoparse(data) + + return last_seen_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + last_seen = _parse_last_seen(d.pop("last_seen")) + + trends = [] + _trends = d.pop("trends") + for trends_item_data in _trends: + trends_item = TrendPoint.from_dict(trends_item_data) + + trends.append(trends_item) + + assignees = cast(list[str], d.pop("assignees")) + + def _parse_model(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + model = _parse_model(d.pop("model")) + + def _parse_model_version(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + model_version = _parse_model_version(d.pop("model_version")) + + def _parse_project(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + project = _parse_project(d.pop("project")) + + def _parse_project_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + project_id = _parse_project_id(d.pop("project_id")) + + def _parse_environment(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + environment = _parse_environment(d.pop("environment")) + + def _parse_eval_score(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + eval_score = _parse_eval_score(d.pop("eval_score")) + + def _parse_trace_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + trace_id = _parse_trace_id(d.pop("trace_id")) + + def _parse_external_issue_url(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + external_issue_url = _parse_external_issue_url(d.pop("external_issue_url")) + + def _parse_external_issue_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + external_issue_id = _parse_external_issue_id(d.pop("external_issue_id")) + + feed_list_row = cls( + cluster_id=cluster_id, + source=source, + error=error, + status=status, + severity=severity, + occurrences=occurrences, + trace_count=trace_count, + fix_layer=fix_layer, + users_affected=users_affected, + sessions=sessions, + first_seen=first_seen, + last_seen=last_seen, + trends=trends, + assignees=assignees, + model=model, + model_version=model_version, + project=project, + project_id=project_id, + environment=environment, + eval_score=eval_score, + trace_id=trace_id, + external_issue_url=external_issue_url, + external_issue_id=external_issue_id, + ) + + feed_list_row.additional_properties = d + return feed_list_row + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_sidebar.py b/python/fi/generated/openapi_client/models/feed_sidebar.py new file mode 100644 index 0000000..cc2f793 --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_sidebar.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.co_occurring_issue import CoOccurringIssue + from ..models.evaluation_result import EvaluationResult + from ..models.sidebar_ai_metadata import SidebarAIMetadata + from ..models.sidebar_timeline import SidebarTimeline + + +T = TypeVar("T", bound="FeedSidebar") + + +@_attrs_define +class FeedSidebar: + """ + Attributes: + timeline (SidebarTimeline): + ai_metadata (SidebarAIMetadata): + evaluations (list[EvaluationResult]): + co_occurring_issues (list[CoOccurringIssue]): + """ + + timeline: SidebarTimeline + ai_metadata: SidebarAIMetadata + evaluations: list[EvaluationResult] + co_occurring_issues: list[CoOccurringIssue] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + timeline = self.timeline.to_dict() + + ai_metadata = self.ai_metadata.to_dict() + + evaluations = [] + for evaluations_item_data in self.evaluations: + evaluations_item = evaluations_item_data.to_dict() + evaluations.append(evaluations_item) + + co_occurring_issues = [] + for co_occurring_issues_item_data in self.co_occurring_issues: + co_occurring_issues_item = co_occurring_issues_item_data.to_dict() + co_occurring_issues.append(co_occurring_issues_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "timeline": timeline, + "ai_metadata": ai_metadata, + "evaluations": evaluations, + "co_occurring_issues": co_occurring_issues, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.co_occurring_issue import CoOccurringIssue + from ..models.evaluation_result import EvaluationResult + from ..models.sidebar_ai_metadata import SidebarAIMetadata + from ..models.sidebar_timeline import SidebarTimeline + + d = dict(src_dict) + timeline = SidebarTimeline.from_dict(d.pop("timeline")) + + ai_metadata = SidebarAIMetadata.from_dict(d.pop("ai_metadata")) + + evaluations = [] + _evaluations = d.pop("evaluations") + for evaluations_item_data in _evaluations: + evaluations_item = EvaluationResult.from_dict(evaluations_item_data) + + evaluations.append(evaluations_item) + + co_occurring_issues = [] + _co_occurring_issues = d.pop("co_occurring_issues") + for co_occurring_issues_item_data in _co_occurring_issues: + co_occurring_issues_item = CoOccurringIssue.from_dict( + co_occurring_issues_item_data + ) + + co_occurring_issues.append(co_occurring_issues_item) + + feed_sidebar = cls( + timeline=timeline, + ai_metadata=ai_metadata, + evaluations=evaluations, + co_occurring_issues=co_occurring_issues, + ) + + feed_sidebar.additional_properties = d + return feed_sidebar + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_sidebar_api_response.py b/python/fi/generated/openapi_client/models/feed_sidebar_api_response.py new file mode 100644 index 0000000..b834cea --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_sidebar_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.feed_sidebar import FeedSidebar + + +T = TypeVar("T", bound="FeedSidebarApiResponse") + + +@_attrs_define +class FeedSidebarApiResponse: + """ + Attributes: + result (FeedSidebar): + status (bool | Unset): Default: True. + """ + + result: FeedSidebar + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.feed_sidebar import FeedSidebar + + d = dict(src_dict) + result = FeedSidebar.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + feed_sidebar_api_response = cls( + result=result, + status=status, + ) + + feed_sidebar_api_response.additional_properties = d + return feed_sidebar_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_stats.py b/python/fi/generated/openapi_client/models/feed_stats.py new file mode 100644 index 0000000..ba944a2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_stats.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="FeedStats") + + +@_attrs_define +class FeedStats: + """ + Attributes: + total_errors (int): + escalating (int): + for_review (int): + acknowledged (int): + resolved (int): + affected_users (int): + """ + + total_errors: int + escalating: int + for_review: int + acknowledged: int + resolved: int + affected_users: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total_errors = self.total_errors + + escalating = self.escalating + + for_review = self.for_review + + acknowledged = self.acknowledged + + resolved = self.resolved + + affected_users = self.affected_users + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "total_errors": total_errors, + "escalating": escalating, + "for_review": for_review, + "acknowledged": acknowledged, + "resolved": resolved, + "affected_users": affected_users, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + total_errors = d.pop("total_errors") + + escalating = d.pop("escalating") + + for_review = d.pop("for_review") + + acknowledged = d.pop("acknowledged") + + resolved = d.pop("resolved") + + affected_users = d.pop("affected_users") + + feed_stats = cls( + total_errors=total_errors, + escalating=escalating, + for_review=for_review, + acknowledged=acknowledged, + resolved=resolved, + affected_users=affected_users, + ) + + feed_stats.additional_properties = d + return feed_stats + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_stats_api_response.py b/python/fi/generated/openapi_client/models/feed_stats_api_response.py new file mode 100644 index 0000000..90de6cf --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_stats_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.feed_stats import FeedStats + + +T = TypeVar("T", bound="FeedStatsApiResponse") + + +@_attrs_define +class FeedStatsApiResponse: + """ + Attributes: + result (FeedStats): + status (bool | Unset): Default: True. + """ + + result: FeedStats + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.feed_stats import FeedStats + + d = dict(src_dict) + result = FeedStats.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + feed_stats_api_response = cls( + result=result, + status=status, + ) + + feed_stats_api_response.additional_properties = d + return feed_stats_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_update_body.py b/python/fi/generated/openapi_client/models/feed_update_body.py new file mode 100644 index 0000000..0dd9a42 --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_update_body.py @@ -0,0 +1,123 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.feed_update_body_severity import FeedUpdateBodySeverity +from ..models.feed_update_body_status import FeedUpdateBodyStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeedUpdateBody") + + +@_attrs_define +class FeedUpdateBody: + """ + Attributes: + project_id (UUID | Unset): + status (FeedUpdateBodyStatus | Unset): + severity (FeedUpdateBodySeverity | Unset): + assignee (None | str | Unset): + """ + + project_id: UUID | Unset = UNSET + status: FeedUpdateBodyStatus | Unset = UNSET + severity: FeedUpdateBodySeverity | Unset = UNSET + assignee: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project_id: str | Unset = UNSET + if not isinstance(self.project_id, Unset): + project_id = str(self.project_id) + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + severity: str | Unset = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.value + + assignee: None | str | Unset + if isinstance(self.assignee, Unset): + assignee = UNSET + else: + assignee = self.assignee + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if project_id is not UNSET: + field_dict["project_id"] = project_id + if status is not UNSET: + field_dict["status"] = status + if severity is not UNSET: + field_dict["severity"] = severity + if assignee is not UNSET: + field_dict["assignee"] = assignee + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _project_id = d.pop("project_id", UNSET) + project_id: UUID | Unset + if isinstance(_project_id, Unset): + project_id = UNSET + else: + project_id = UUID(_project_id) + + _status = d.pop("status", UNSET) + status: FeedUpdateBodyStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = FeedUpdateBodyStatus(_status) + + _severity = d.pop("severity", UNSET) + severity: FeedUpdateBodySeverity | Unset + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = FeedUpdateBodySeverity(_severity) + + def _parse_assignee(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + assignee = _parse_assignee(d.pop("assignee", UNSET)) + + feed_update_body = cls( + project_id=project_id, + status=status, + severity=severity, + assignee=assignee, + ) + + feed_update_body.additional_properties = d + return feed_update_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feed_update_body_severity.py b/python/fi/generated/openapi_client/models/feed_update_body_severity.py new file mode 100644 index 0000000..a410bb6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_update_body_severity.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class FeedUpdateBodySeverity(str, Enum): + CRITICAL = "critical" + HIGH = "high" + LOW = "low" + MEDIUM = "medium" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/feed_update_body_status.py b/python/fi/generated/openapi_client/models/feed_update_body_status.py new file mode 100644 index 0000000..45b84d4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/feed_update_body_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class FeedUpdateBodyStatus(str, Enum): + ACKNOWLEDGED = "acknowledged" + ESCALATING = "escalating" + FOR_REVIEW = "for_review" + RESOLVED = "resolved" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/feedback.py b/python/fi/generated/openapi_client/models/feedback.py new file mode 100644 index 0000000..0a362ab --- /dev/null +++ b/python/fi/generated/openapi_client/models/feedback.py @@ -0,0 +1,241 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.feedback_source import FeedbackSource +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Feedback") + + +@_attrs_define +class Feedback: + """ + Attributes: + source_id (str): + source (FeedbackSource): + value (str): + id (UUID | Unset): + user_eval_metric (None | Unset | UUID): + explanation (None | str | Unset): + row_id (None | str | Unset): + custom_eval_config_id (None | Unset | UUID): + feedback_improvement (None | str | Unset): + action_type (None | str | Unset): + """ + + source_id: str + source: FeedbackSource + value: str + id: UUID | Unset = UNSET + user_eval_metric: None | Unset | UUID = UNSET + explanation: None | str | Unset = UNSET + row_id: None | str | Unset = UNSET + custom_eval_config_id: None | Unset | UUID = UNSET + feedback_improvement: None | str | Unset = UNSET + action_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_id = self.source_id + + source = self.source.value + + value = self.value + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + user_eval_metric: None | str | Unset + if isinstance(self.user_eval_metric, Unset): + user_eval_metric = UNSET + elif isinstance(self.user_eval_metric, UUID): + user_eval_metric = str(self.user_eval_metric) + else: + user_eval_metric = self.user_eval_metric + + explanation: None | str | Unset + if isinstance(self.explanation, Unset): + explanation = UNSET + else: + explanation = self.explanation + + row_id: None | str | Unset + if isinstance(self.row_id, Unset): + row_id = UNSET + else: + row_id = self.row_id + + custom_eval_config_id: None | str | Unset + if isinstance(self.custom_eval_config_id, Unset): + custom_eval_config_id = UNSET + elif isinstance(self.custom_eval_config_id, UUID): + custom_eval_config_id = str(self.custom_eval_config_id) + else: + custom_eval_config_id = self.custom_eval_config_id + + feedback_improvement: None | str | Unset + if isinstance(self.feedback_improvement, Unset): + feedback_improvement = UNSET + else: + feedback_improvement = self.feedback_improvement + + action_type: None | str | Unset + if isinstance(self.action_type, Unset): + action_type = UNSET + else: + action_type = self.action_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source_id": source_id, + "source": source, + "value": value, + } + ) + if id is not UNSET: + field_dict["id"] = id + if user_eval_metric is not UNSET: + field_dict["user_eval_metric"] = user_eval_metric + if explanation is not UNSET: + field_dict["explanation"] = explanation + if row_id is not UNSET: + field_dict["row_id"] = row_id + if custom_eval_config_id is not UNSET: + field_dict["custom_eval_config_id"] = custom_eval_config_id + if feedback_improvement is not UNSET: + field_dict["feedback_improvement"] = feedback_improvement + if action_type is not UNSET: + field_dict["action_type"] = action_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + source_id = d.pop("source_id") + + source = FeedbackSource(d.pop("source")) + + value = d.pop("value") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_user_eval_metric(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + user_eval_metric_type_0 = UUID(data) + + return user_eval_metric_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + user_eval_metric = _parse_user_eval_metric(d.pop("user_eval_metric", UNSET)) + + def _parse_explanation(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + explanation = _parse_explanation(d.pop("explanation", UNSET)) + + def _parse_row_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + row_id = _parse_row_id(d.pop("row_id", UNSET)) + + def _parse_custom_eval_config_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + custom_eval_config_id_type_0 = UUID(data) + + return custom_eval_config_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + custom_eval_config_id = _parse_custom_eval_config_id( + d.pop("custom_eval_config_id", UNSET) + ) + + def _parse_feedback_improvement(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + feedback_improvement = _parse_feedback_improvement( + d.pop("feedback_improvement", UNSET) + ) + + def _parse_action_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + action_type = _parse_action_type(d.pop("action_type", UNSET)) + + feedback = cls( + source_id=source_id, + source=source, + value=value, + id=id, + user_eval_metric=user_eval_metric, + explanation=explanation, + row_id=row_id, + custom_eval_config_id=custom_eval_config_id, + feedback_improvement=feedback_improvement, + action_type=action_type, + ) + + feedback.additional_properties = d + return feedback + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/feedback_source.py b/python/fi/generated/openapi_client/models/feedback_source.py new file mode 100644 index 0000000..6090171 --- /dev/null +++ b/python/fi/generated/openapi_client/models/feedback_source.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class FeedbackSource(str, Enum): + DATASET = "dataset" + EVAL_PLAYGROUND = "eval_playground" + EXPERIMENT = "experiment" + OBSERVE = "observe" + PROMPT = "prompt" + SDK = "sdk" + TRACE = "trace" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/get_annotation_labels_response.py b/python/fi/generated/openapi_client/models/get_annotation_labels_response.py new file mode 100644 index 0000000..ecb1816 --- /dev/null +++ b/python/fi/generated/openapi_client/models/get_annotation_labels_response.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotation_label_response import AnnotationLabelResponse + + +T = TypeVar("T", bound="GetAnnotationLabelsResponse") + + +@_attrs_define +class GetAnnotationLabelsResponse: + """ + Attributes: + result (list[AnnotationLabelResponse]): + status (bool | Unset): Default: True. + """ + + result: list[AnnotationLabelResponse] + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_label_response import AnnotationLabelResponse + + d = dict(src_dict) + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = AnnotationLabelResponse.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + get_annotation_labels_response = cls( + result=result, + status=status, + ) + + get_annotation_labels_response.additional_properties = d + return get_annotation_labels_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/get_trace_annotation.py b/python/fi/generated/openapi_client/models/get_trace_annotation.py new file mode 100644 index 0000000..5062175 --- /dev/null +++ b/python/fi/generated/openapi_client/models/get_trace_annotation.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetTraceAnnotation") + + +@_attrs_define +class GetTraceAnnotation: + """ + Attributes: + observation_span_id (None | str | Unset): + trace_id (None | Unset | UUID): + annotators (str | Unset): JSON-encoded UUID list. + exclude_annotators (str | Unset): JSON-encoded UUID list. + """ + + observation_span_id: None | str | Unset = UNSET + trace_id: None | Unset | UUID = UNSET + annotators: str | Unset = UNSET + exclude_annotators: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + observation_span_id: None | str | Unset + if isinstance(self.observation_span_id, Unset): + observation_span_id = UNSET + else: + observation_span_id = self.observation_span_id + + trace_id: None | str | Unset + if isinstance(self.trace_id, Unset): + trace_id = UNSET + elif isinstance(self.trace_id, UUID): + trace_id = str(self.trace_id) + else: + trace_id = self.trace_id + + annotators = self.annotators + + exclude_annotators = self.exclude_annotators + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if observation_span_id is not UNSET: + field_dict["observation_span_id"] = observation_span_id + if trace_id is not UNSET: + field_dict["trace_id"] = trace_id + if annotators is not UNSET: + field_dict["annotators"] = annotators + if exclude_annotators is not UNSET: + field_dict["exclude_annotators"] = exclude_annotators + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_observation_span_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + observation_span_id = _parse_observation_span_id( + d.pop("observation_span_id", UNSET) + ) + + def _parse_trace_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + trace_id_type_0 = UUID(data) + + return trace_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + trace_id = _parse_trace_id(d.pop("trace_id", UNSET)) + + annotators = d.pop("annotators", UNSET) + + exclude_annotators = d.pop("exclude_annotators", UNSET) + + get_trace_annotation = cls( + observation_span_id=observation_span_id, + trace_id=trace_id, + annotators=annotators, + exclude_annotators=exclude_annotators, + ) + + get_trace_annotation.additional_properties = d + return get_trace_annotation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/get_trace_annotation_values_response.py b/python/fi/generated/openapi_client/models/get_trace_annotation_values_response.py new file mode 100644 index 0000000..beb32a2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/get_trace_annotation_values_response.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.get_trace_annotation_values_result import ( + GetTraceAnnotationValuesResult, + ) + + +T = TypeVar("T", bound="GetTraceAnnotationValuesResponse") + + +@_attrs_define +class GetTraceAnnotationValuesResponse: + """ + Attributes: + result (GetTraceAnnotationValuesResult): + status (bool | Unset): Default: True. + """ + + result: GetTraceAnnotationValuesResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.get_trace_annotation_values_result import ( + GetTraceAnnotationValuesResult, + ) + + d = dict(src_dict) + result = GetTraceAnnotationValuesResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + get_trace_annotation_values_response = cls( + result=result, + status=status, + ) + + get_trace_annotation_values_response.additional_properties = d + return get_trace_annotation_values_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/get_trace_annotation_values_result.py b/python/fi/generated/openapi_client/models/get_trace_annotation_values_result.py new file mode 100644 index 0000000..7299f22 --- /dev/null +++ b/python/fi/generated/openapi_client/models/get_trace_annotation_values_result.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.trace_annotation_note_response import TraceAnnotationNoteResponse + from ..models.trace_annotation_value_response import TraceAnnotationValueResponse + + +T = TypeVar("T", bound="GetTraceAnnotationValuesResult") + + +@_attrs_define +class GetTraceAnnotationValuesResult: + """ + Attributes: + annotations (list[TraceAnnotationValueResponse]): + notes (list[TraceAnnotationNoteResponse]): + """ + + annotations: list[TraceAnnotationValueResponse] + notes: list[TraceAnnotationNoteResponse] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + annotations = [] + for annotations_item_data in self.annotations: + annotations_item = annotations_item_data.to_dict() + annotations.append(annotations_item) + + notes = [] + for notes_item_data in self.notes: + notes_item = notes_item_data.to_dict() + notes.append(notes_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "annotations": annotations, + "notes": notes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_annotation_note_response import TraceAnnotationNoteResponse + from ..models.trace_annotation_value_response import ( + TraceAnnotationValueResponse, + ) + + d = dict(src_dict) + annotations = [] + _annotations = d.pop("annotations") + for annotations_item_data in _annotations: + annotations_item = TraceAnnotationValueResponse.from_dict( + annotations_item_data + ) + + annotations.append(annotations_item) + + notes = [] + _notes = d.pop("notes") + for notes_item_data in _notes: + notes_item = TraceAnnotationNoteResponse.from_dict(notes_item_data) + + notes.append(notes_item) + + get_trace_annotation_values_result = cls( + annotations=annotations, + notes=notes, + ) + + get_trace_annotation_values_result.additional_properties = d + return get_trace_annotation_values_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/get_voice_call_detail_response_200.py b/python/fi/generated/openapi_client/models/get_voice_call_detail_response_200.py new file mode 100644 index 0000000..42aeba6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/get_voice_call_detail_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="GetVoiceCallDetailResponse200") + + +@_attrs_define +class GetVoiceCallDetailResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + get_voice_call_detail_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + get_voice_call_detail_response_200.additional_properties = d + return get_voice_call_detail_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_config.py b/python/fi/generated/openapi_client/models/ground_truth_config.py new file mode 100644 index 0000000..1e8be06 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_config.py @@ -0,0 +1,128 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GroundTruthConfig") + + +@_attrs_define +class GroundTruthConfig: + """ + Attributes: + enabled (bool | Unset): + ground_truth_id (None | Unset | UUID): + mode (str | Unset): + max_examples (int | Unset): + similarity_threshold (float | Unset): + injection_format (str | Unset): + """ + + enabled: bool | Unset = UNSET + ground_truth_id: None | Unset | UUID = UNSET + mode: str | Unset = UNSET + max_examples: int | Unset = UNSET + similarity_threshold: float | Unset = UNSET + injection_format: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + enabled = self.enabled + + ground_truth_id: None | str | Unset + if isinstance(self.ground_truth_id, Unset): + ground_truth_id = UNSET + elif isinstance(self.ground_truth_id, UUID): + ground_truth_id = str(self.ground_truth_id) + else: + ground_truth_id = self.ground_truth_id + + mode = self.mode + + max_examples = self.max_examples + + similarity_threshold = self.similarity_threshold + + injection_format = self.injection_format + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if enabled is not UNSET: + field_dict["enabled"] = enabled + if ground_truth_id is not UNSET: + field_dict["ground_truth_id"] = ground_truth_id + if mode is not UNSET: + field_dict["mode"] = mode + if max_examples is not UNSET: + field_dict["max_examples"] = max_examples + if similarity_threshold is not UNSET: + field_dict["similarity_threshold"] = similarity_threshold + if injection_format is not UNSET: + field_dict["injection_format"] = injection_format + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + enabled = d.pop("enabled", UNSET) + + def _parse_ground_truth_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + ground_truth_id_type_0 = UUID(data) + + return ground_truth_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + ground_truth_id = _parse_ground_truth_id(d.pop("ground_truth_id", UNSET)) + + mode = d.pop("mode", UNSET) + + max_examples = d.pop("max_examples", UNSET) + + similarity_threshold = d.pop("similarity_threshold", UNSET) + + injection_format = d.pop("injection_format", UNSET) + + ground_truth_config = cls( + enabled=enabled, + ground_truth_id=ground_truth_id, + mode=mode, + max_examples=max_examples, + similarity_threshold=similarity_threshold, + injection_format=injection_format, + ) + + ground_truth_config.additional_properties = d + return ground_truth_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_config_request.py b/python/fi/generated/openapi_client/models/ground_truth_config_request.py new file mode 100644 index 0000000..9cb2399 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_config_request.py @@ -0,0 +1,151 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.ground_truth_config_request_injection_format import ( + GroundTruthConfigRequestInjectionFormat, +) +from ..models.ground_truth_config_request_mode import GroundTruthConfigRequestMode +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GroundTruthConfigRequest") + + +@_attrs_define +class GroundTruthConfigRequest: + """ + Attributes: + enabled (bool | Unset): Default: True. + ground_truth_id (None | Unset | UUID): + mode (GroundTruthConfigRequestMode | Unset): Default: GroundTruthConfigRequestMode.AUTO. + max_examples (int | Unset): + similarity_threshold (float | Unset): + injection_format (GroundTruthConfigRequestInjectionFormat | Unset): Default: + GroundTruthConfigRequestInjectionFormat.STRUCTURED. + """ + + enabled: bool | Unset = True + ground_truth_id: None | Unset | UUID = UNSET + mode: GroundTruthConfigRequestMode | Unset = GroundTruthConfigRequestMode.AUTO + max_examples: int | Unset = UNSET + similarity_threshold: float | Unset = UNSET + injection_format: GroundTruthConfigRequestInjectionFormat | Unset = ( + GroundTruthConfigRequestInjectionFormat.STRUCTURED + ) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + enabled = self.enabled + + ground_truth_id: None | str | Unset + if isinstance(self.ground_truth_id, Unset): + ground_truth_id = UNSET + elif isinstance(self.ground_truth_id, UUID): + ground_truth_id = str(self.ground_truth_id) + else: + ground_truth_id = self.ground_truth_id + + mode: str | Unset = UNSET + if not isinstance(self.mode, Unset): + mode = self.mode.value + + max_examples = self.max_examples + + similarity_threshold = self.similarity_threshold + + injection_format: str | Unset = UNSET + if not isinstance(self.injection_format, Unset): + injection_format = self.injection_format.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if enabled is not UNSET: + field_dict["enabled"] = enabled + if ground_truth_id is not UNSET: + field_dict["ground_truth_id"] = ground_truth_id + if mode is not UNSET: + field_dict["mode"] = mode + if max_examples is not UNSET: + field_dict["max_examples"] = max_examples + if similarity_threshold is not UNSET: + field_dict["similarity_threshold"] = similarity_threshold + if injection_format is not UNSET: + field_dict["injection_format"] = injection_format + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + enabled = d.pop("enabled", UNSET) + + def _parse_ground_truth_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + ground_truth_id_type_0 = UUID(data) + + return ground_truth_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + ground_truth_id = _parse_ground_truth_id(d.pop("ground_truth_id", UNSET)) + + _mode = d.pop("mode", UNSET) + mode: GroundTruthConfigRequestMode | Unset + if isinstance(_mode, Unset): + mode = UNSET + else: + mode = GroundTruthConfigRequestMode(_mode) + + max_examples = d.pop("max_examples", UNSET) + + similarity_threshold = d.pop("similarity_threshold", UNSET) + + _injection_format = d.pop("injection_format", UNSET) + injection_format: GroundTruthConfigRequestInjectionFormat | Unset + if isinstance(_injection_format, Unset): + injection_format = UNSET + else: + injection_format = GroundTruthConfigRequestInjectionFormat( + _injection_format + ) + + ground_truth_config_request = cls( + enabled=enabled, + ground_truth_id=ground_truth_id, + mode=mode, + max_examples=max_examples, + similarity_threshold=similarity_threshold, + injection_format=injection_format, + ) + + ground_truth_config_request.additional_properties = d + return ground_truth_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_config_request_injection_format.py b/python/fi/generated/openapi_client/models/ground_truth_config_request_injection_format.py new file mode 100644 index 0000000..8b6f27c --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_config_request_injection_format.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GroundTruthConfigRequestInjectionFormat(str, Enum): + CONVERSATIONAL = "conversational" + STRUCTURED = "structured" + XML = "xml" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/ground_truth_config_request_mode.py b/python/fi/generated/openapi_client/models/ground_truth_config_request_mode.py new file mode 100644 index 0000000..0d40e4f --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_config_request_mode.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class GroundTruthConfigRequestMode(str, Enum): + AUTO = "auto" + DISABLED = "disabled" + MANUAL = "manual" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/ground_truth_config_response.py b/python/fi/generated/openapi_client/models/ground_truth_config_response.py new file mode 100644 index 0000000..6c85d9e --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_config_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ground_truth_config_response_result import ( + GroundTruthConfigResponseResult, + ) + + +T = TypeVar("T", bound="GroundTruthConfigResponse") + + +@_attrs_define +class GroundTruthConfigResponse: + """ + Attributes: + status (bool): + result (GroundTruthConfigResponseResult): + """ + + status: bool + result: GroundTruthConfigResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ground_truth_config_response_result import ( + GroundTruthConfigResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = GroundTruthConfigResponseResult.from_dict(d.pop("result")) + + ground_truth_config_response = cls( + status=status, + result=result, + ) + + ground_truth_config_response.additional_properties = d + return ground_truth_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_config_response_result.py b/python/fi/generated/openapi_client/models/ground_truth_config_response_result.py new file mode 100644 index 0000000..2d4b72d --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_config_response_result.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ground_truth_config import GroundTruthConfig + + +T = TypeVar("T", bound="GroundTruthConfigResponseResult") + + +@_attrs_define +class GroundTruthConfigResponseResult: + """ + Attributes: + ground_truth (GroundTruthConfig): + """ + + ground_truth: GroundTruthConfig + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + ground_truth = self.ground_truth.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "ground_truth": ground_truth, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ground_truth_config import GroundTruthConfig + + d = dict(src_dict) + ground_truth = GroundTruthConfig.from_dict(d.pop("ground_truth")) + + ground_truth_config_response_result = cls( + ground_truth=ground_truth, + ) + + ground_truth_config_response_result.additional_properties = d + return ground_truth_config_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_item.py b/python/fi/generated/openapi_client/models/ground_truth_item.py new file mode 100644 index 0000000..aae77f0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_item.py @@ -0,0 +1,188 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ground_truth_item_role_mapping import GroundTruthItemRoleMapping + from ..models.ground_truth_item_variable_mapping import ( + GroundTruthItemVariableMapping, + ) + + +T = TypeVar("T", bound="GroundTruthItem") + + +@_attrs_define +class GroundTruthItem: + """ + Attributes: + id (UUID): + name (str): + columns (list[str]): + row_count (int): + description (str | Unset): + file_name (str | Unset): + variable_mapping (GroundTruthItemVariableMapping | Unset): + role_mapping (GroundTruthItemRoleMapping | Unset): + embedding_status (str | Unset): + embedded_row_count (int | Unset): + storage_type (str | Unset): + created_at (str | Unset): + """ + + id: UUID + name: str + columns: list[str] + row_count: int + description: str | Unset = UNSET + file_name: str | Unset = UNSET + variable_mapping: GroundTruthItemVariableMapping | Unset = UNSET + role_mapping: GroundTruthItemRoleMapping | Unset = UNSET + embedding_status: str | Unset = UNSET + embedded_row_count: int | Unset = UNSET + storage_type: str | Unset = UNSET + created_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + columns = self.columns + + row_count = self.row_count + + description = self.description + + file_name = self.file_name + + variable_mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.variable_mapping, Unset): + variable_mapping = self.variable_mapping.to_dict() + + role_mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.role_mapping, Unset): + role_mapping = self.role_mapping.to_dict() + + embedding_status = self.embedding_status + + embedded_row_count = self.embedded_row_count + + storage_type = self.storage_type + + created_at = self.created_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "columns": columns, + "row_count": row_count, + } + ) + if description is not UNSET: + field_dict["description"] = description + if file_name is not UNSET: + field_dict["file_name"] = file_name + if variable_mapping is not UNSET: + field_dict["variable_mapping"] = variable_mapping + if role_mapping is not UNSET: + field_dict["role_mapping"] = role_mapping + if embedding_status is not UNSET: + field_dict["embedding_status"] = embedding_status + if embedded_row_count is not UNSET: + field_dict["embedded_row_count"] = embedded_row_count + if storage_type is not UNSET: + field_dict["storage_type"] = storage_type + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ground_truth_item_role_mapping import GroundTruthItemRoleMapping + from ..models.ground_truth_item_variable_mapping import ( + GroundTruthItemVariableMapping, + ) + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + columns = cast(list[str], d.pop("columns")) + + row_count = d.pop("row_count") + + description = d.pop("description", UNSET) + + file_name = d.pop("file_name", UNSET) + + _variable_mapping = d.pop("variable_mapping", UNSET) + variable_mapping: GroundTruthItemVariableMapping | Unset + if isinstance(_variable_mapping, Unset): + variable_mapping = UNSET + else: + variable_mapping = GroundTruthItemVariableMapping.from_dict( + _variable_mapping + ) + + _role_mapping = d.pop("role_mapping", UNSET) + role_mapping: GroundTruthItemRoleMapping | Unset + if isinstance(_role_mapping, Unset): + role_mapping = UNSET + else: + role_mapping = GroundTruthItemRoleMapping.from_dict(_role_mapping) + + embedding_status = d.pop("embedding_status", UNSET) + + embedded_row_count = d.pop("embedded_row_count", UNSET) + + storage_type = d.pop("storage_type", UNSET) + + created_at = d.pop("created_at", UNSET) + + ground_truth_item = cls( + id=id, + name=name, + columns=columns, + row_count=row_count, + description=description, + file_name=file_name, + variable_mapping=variable_mapping, + role_mapping=role_mapping, + embedding_status=embedding_status, + embedded_row_count=embedded_row_count, + storage_type=storage_type, + created_at=created_at, + ) + + ground_truth_item.additional_properties = d + return ground_truth_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_item_role_mapping.py b/python/fi/generated/openapi_client/models/ground_truth_item_role_mapping.py new file mode 100644 index 0000000..7dc7617 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_item_role_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GroundTruthItemRoleMapping") + + +@_attrs_define +class GroundTruthItemRoleMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ground_truth_item_role_mapping = cls() + + ground_truth_item_role_mapping.additional_properties = d + return ground_truth_item_role_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_item_variable_mapping.py b/python/fi/generated/openapi_client/models/ground_truth_item_variable_mapping.py new file mode 100644 index 0000000..d0c1d29 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_item_variable_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GroundTruthItemVariableMapping") + + +@_attrs_define +class GroundTruthItemVariableMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ground_truth_item_variable_mapping = cls() + + ground_truth_item_variable_mapping.additional_properties = d + return ground_truth_item_variable_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_list_response.py b/python/fi/generated/openapi_client/models/ground_truth_list_response.py new file mode 100644 index 0000000..af8a540 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_list_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ground_truth_list_response_result import GroundTruthListResponseResult + + +T = TypeVar("T", bound="GroundTruthListResponse") + + +@_attrs_define +class GroundTruthListResponse: + """ + Attributes: + status (bool): + result (GroundTruthListResponseResult): + """ + + status: bool + result: GroundTruthListResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ground_truth_list_response_result import ( + GroundTruthListResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = GroundTruthListResponseResult.from_dict(d.pop("result")) + + ground_truth_list_response = cls( + status=status, + result=result, + ) + + ground_truth_list_response.additional_properties = d + return ground_truth_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_list_response_result.py b/python/fi/generated/openapi_client/models/ground_truth_list_response_result.py new file mode 100644 index 0000000..77e84f4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_list_response_result.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ground_truth_item import GroundTruthItem + + +T = TypeVar("T", bound="GroundTruthListResponseResult") + + +@_attrs_define +class GroundTruthListResponseResult: + """ + Attributes: + template_id (UUID): + items (list[GroundTruthItem]): + total (int): + """ + + template_id: UUID + items: list[GroundTruthItem] + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_id = str(self.template_id) + + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_id": template_id, + "items": items, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ground_truth_item import GroundTruthItem + + d = dict(src_dict) + template_id = UUID(d.pop("template_id")) + + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = GroundTruthItem.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + ground_truth_list_response_result = cls( + template_id=template_id, + items=items, + total=total, + ) + + ground_truth_list_response_result.additional_properties = d + return ground_truth_list_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_upload_request.py b/python/fi/generated/openapi_client/models/ground_truth_upload_request.py new file mode 100644 index 0000000..f41dae4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_upload_request.py @@ -0,0 +1,176 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ground_truth_upload_request_data_item import ( + GroundTruthUploadRequestDataItem, + ) + from ..models.ground_truth_upload_request_role_mapping import ( + GroundTruthUploadRequestRoleMapping, + ) + from ..models.ground_truth_upload_request_variable_mapping import ( + GroundTruthUploadRequestVariableMapping, + ) + + +T = TypeVar("T", bound="GroundTruthUploadRequest") + + +@_attrs_define +class GroundTruthUploadRequest: + """ + Attributes: + file (str | Unset): + name (str | Unset): + description (str | Unset): Default: ''. + file_name (str | Unset): Default: ''. + columns (list[str] | Unset): + data (list[GroundTruthUploadRequestDataItem] | Unset): + variable_mapping (GroundTruthUploadRequestVariableMapping | Unset): + role_mapping (GroundTruthUploadRequestRoleMapping | Unset): + """ + + file: str | Unset = UNSET + name: str | Unset = UNSET + description: str | Unset = "" + file_name: str | Unset = "" + columns: list[str] | Unset = UNSET + data: list[GroundTruthUploadRequestDataItem] | Unset = UNSET + variable_mapping: GroundTruthUploadRequestVariableMapping | Unset = UNSET + role_mapping: GroundTruthUploadRequestRoleMapping | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file = self.file + + name = self.name + + description = self.description + + file_name = self.file_name + + columns: list[str] | Unset = UNSET + if not isinstance(self.columns, Unset): + columns = self.columns + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + variable_mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.variable_mapping, Unset): + variable_mapping = self.variable_mapping.to_dict() + + role_mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.role_mapping, Unset): + role_mapping = self.role_mapping.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file is not UNSET: + field_dict["file"] = file + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if file_name is not UNSET: + field_dict["file_name"] = file_name + if columns is not UNSET: + field_dict["columns"] = columns + if data is not UNSET: + field_dict["data"] = data + if variable_mapping is not UNSET: + field_dict["variable_mapping"] = variable_mapping + if role_mapping is not UNSET: + field_dict["role_mapping"] = role_mapping + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ground_truth_upload_request_data_item import ( + GroundTruthUploadRequestDataItem, + ) + from ..models.ground_truth_upload_request_role_mapping import ( + GroundTruthUploadRequestRoleMapping, + ) + from ..models.ground_truth_upload_request_variable_mapping import ( + GroundTruthUploadRequestVariableMapping, + ) + + d = dict(src_dict) + file = d.pop("file", UNSET) + + name = d.pop("name", UNSET) + + description = d.pop("description", UNSET) + + file_name = d.pop("file_name", UNSET) + + columns = cast(list[str], d.pop("columns", UNSET)) + + _data = d.pop("data", UNSET) + data: list[GroundTruthUploadRequestDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = GroundTruthUploadRequestDataItem.from_dict(data_item_data) + + data.append(data_item) + + _variable_mapping = d.pop("variable_mapping", UNSET) + variable_mapping: GroundTruthUploadRequestVariableMapping | Unset + if isinstance(_variable_mapping, Unset): + variable_mapping = UNSET + else: + variable_mapping = GroundTruthUploadRequestVariableMapping.from_dict( + _variable_mapping + ) + + _role_mapping = d.pop("role_mapping", UNSET) + role_mapping: GroundTruthUploadRequestRoleMapping | Unset + if isinstance(_role_mapping, Unset): + role_mapping = UNSET + else: + role_mapping = GroundTruthUploadRequestRoleMapping.from_dict(_role_mapping) + + ground_truth_upload_request = cls( + file=file, + name=name, + description=description, + file_name=file_name, + columns=columns, + data=data, + variable_mapping=variable_mapping, + role_mapping=role_mapping, + ) + + ground_truth_upload_request.additional_properties = d + return ground_truth_upload_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_upload_request_data_item.py b/python/fi/generated/openapi_client/models/ground_truth_upload_request_data_item.py new file mode 100644 index 0000000..31023eb --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_upload_request_data_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GroundTruthUploadRequestDataItem") + + +@_attrs_define +class GroundTruthUploadRequestDataItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ground_truth_upload_request_data_item = cls() + + ground_truth_upload_request_data_item.additional_properties = d + return ground_truth_upload_request_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_upload_request_role_mapping.py b/python/fi/generated/openapi_client/models/ground_truth_upload_request_role_mapping.py new file mode 100644 index 0000000..8270bfc --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_upload_request_role_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GroundTruthUploadRequestRoleMapping") + + +@_attrs_define +class GroundTruthUploadRequestRoleMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ground_truth_upload_request_role_mapping = cls() + + ground_truth_upload_request_role_mapping.additional_properties = d + return ground_truth_upload_request_role_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_upload_request_variable_mapping.py b/python/fi/generated/openapi_client/models/ground_truth_upload_request_variable_mapping.py new file mode 100644 index 0000000..caccbdc --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_upload_request_variable_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GroundTruthUploadRequestVariableMapping") + + +@_attrs_define +class GroundTruthUploadRequestVariableMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ground_truth_upload_request_variable_mapping = cls() + + ground_truth_upload_request_variable_mapping.additional_properties = d + return ground_truth_upload_request_variable_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_upload_response.py b/python/fi/generated/openapi_client/models/ground_truth_upload_response.py new file mode 100644 index 0000000..f24574c --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_upload_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ground_truth_upload_response_result import ( + GroundTruthUploadResponseResult, + ) + + +T = TypeVar("T", bound="GroundTruthUploadResponse") + + +@_attrs_define +class GroundTruthUploadResponse: + """ + Attributes: + status (bool): + result (GroundTruthUploadResponseResult): + """ + + status: bool + result: GroundTruthUploadResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ground_truth_upload_response_result import ( + GroundTruthUploadResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = GroundTruthUploadResponseResult.from_dict(d.pop("result")) + + ground_truth_upload_response = cls( + status=status, + result=result, + ) + + ground_truth_upload_response.additional_properties = d + return ground_truth_upload_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/ground_truth_upload_response_result.py b/python/fi/generated/openapi_client/models/ground_truth_upload_response_result.py new file mode 100644 index 0000000..9cb5843 --- /dev/null +++ b/python/fi/generated/openapi_client/models/ground_truth_upload_response_result.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GroundTruthUploadResponseResult") + + +@_attrs_define +class GroundTruthUploadResponseResult: + """ + Attributes: + id (UUID): + name (str): + row_count (int): + columns (list[str]): + embedding_status (str): + """ + + id: UUID + name: str + row_count: int + columns: list[str] + embedding_status: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + row_count = self.row_count + + columns = self.columns + + embedding_status = self.embedding_status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "row_count": row_count, + "columns": columns, + "embedding_status": embedding_status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + row_count = d.pop("row_count") + + columns = cast(list[str], d.pop("columns")) + + embedding_status = d.pop("embedding_status") + + ground_truth_upload_response_result = cls( + id=id, + name=name, + row_count=row_count, + columns=columns, + embedding_status=embedding_status, + ) + + ground_truth_upload_response_result.additional_properties = d + return ground_truth_upload_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/heatmap_cell.py b/python/fi/generated/openapi_client/models/heatmap_cell.py new file mode 100644 index 0000000..e403dc8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/heatmap_cell.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="HeatmapCell") + + +@_attrs_define +class HeatmapCell: + """ + Attributes: + day (int): + hour (int): + value (int): + """ + + day: int + hour: int + value: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + day = self.day + + hour = self.hour + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "day": day, + "hour": hour, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + day = d.pop("day") + + hour = d.pop("hour") + + value = d.pop("value") + + heatmap_cell = cls( + day=day, + hour=hour, + value=value, + ) + + heatmap_cell.additional_properties = d + return heatmap_cell + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_add_rows_request.py b/python/fi/generated/openapi_client/models/hugging_face_add_rows_request.py new file mode 100644 index 0000000..0dd1f3e --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_add_rows_request.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="HuggingFaceAddRowsRequest") + + +@_attrs_define +class HuggingFaceAddRowsRequest: + """ + Attributes: + huggingface_dataset_name (str): + huggingface_dataset_config (str): + huggingface_dataset_split (str): + num_rows (int | Unset): + """ + + huggingface_dataset_name: str + huggingface_dataset_config: str + huggingface_dataset_split: str + num_rows: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + huggingface_dataset_name = self.huggingface_dataset_name + + huggingface_dataset_config = self.huggingface_dataset_config + + huggingface_dataset_split = self.huggingface_dataset_split + + num_rows = self.num_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "huggingface_dataset_name": huggingface_dataset_name, + "huggingface_dataset_config": huggingface_dataset_config, + "huggingface_dataset_split": huggingface_dataset_split, + } + ) + if num_rows is not UNSET: + field_dict["num_rows"] = num_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + huggingface_dataset_name = d.pop("huggingface_dataset_name") + + huggingface_dataset_config = d.pop("huggingface_dataset_config") + + huggingface_dataset_split = d.pop("huggingface_dataset_split") + + num_rows = d.pop("num_rows", UNSET) + + hugging_face_add_rows_request = cls( + huggingface_dataset_name=huggingface_dataset_name, + huggingface_dataset_config=huggingface_dataset_config, + huggingface_dataset_split=huggingface_dataset_split, + num_rows=num_rows, + ) + + hugging_face_add_rows_request.additional_properties = d + return hugging_face_add_rows_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_config_request.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_request.py new file mode 100644 index 0000000..b2085fd --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="HuggingFaceDatasetConfigRequest") + + +@_attrs_define +class HuggingFaceDatasetConfigRequest: + """ + Attributes: + dataset_path (str): + """ + + dataset_path: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_path = self.dataset_path + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_path": dataset_path, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_path = d.pop("dataset_path") + + hugging_face_dataset_config_request = cls( + dataset_path=dataset_path, + ) + + hugging_face_dataset_config_request.additional_properties = d + return hugging_face_dataset_config_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_config_response.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_response.py new file mode 100644 index 0000000..5214d99 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.hugging_face_dataset_config_result import ( + HuggingFaceDatasetConfigResult, + ) + + +T = TypeVar("T", bound="HuggingFaceDatasetConfigResponse") + + +@_attrs_define +class HuggingFaceDatasetConfigResponse: + """ + Attributes: + status (bool): + result (HuggingFaceDatasetConfigResult): + """ + + status: bool + result: HuggingFaceDatasetConfigResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.hugging_face_dataset_config_result import ( + HuggingFaceDatasetConfigResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = HuggingFaceDatasetConfigResult.from_dict(d.pop("result")) + + hugging_face_dataset_config_response = cls( + status=status, + result=result, + ) + + hugging_face_dataset_config_response.additional_properties = d + return hugging_face_dataset_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_config_result.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_result.py new file mode 100644 index 0000000..c9fe65b --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_result.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.hugging_face_dataset_config_result_dataset_info import ( + HuggingFaceDatasetConfigResultDatasetInfo, + ) + + +T = TypeVar("T", bound="HuggingFaceDatasetConfigResult") + + +@_attrs_define +class HuggingFaceDatasetConfigResult: + """ + Attributes: + message (str): + dataset_info (HuggingFaceDatasetConfigResultDatasetInfo): + """ + + message: str + dataset_info: HuggingFaceDatasetConfigResultDatasetInfo + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + dataset_info = self.dataset_info.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "dataset_info": dataset_info, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.hugging_face_dataset_config_result_dataset_info import ( + HuggingFaceDatasetConfigResultDatasetInfo, + ) + + d = dict(src_dict) + message = d.pop("message") + + dataset_info = HuggingFaceDatasetConfigResultDatasetInfo.from_dict( + d.pop("dataset_info") + ) + + hugging_face_dataset_config_result = cls( + message=message, + dataset_info=dataset_info, + ) + + hugging_face_dataset_config_result.additional_properties = d + return hugging_face_dataset_config_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_config_result_dataset_info.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_result_dataset_info.py new file mode 100644 index 0000000..94aa492 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_config_result_dataset_info.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="HuggingFaceDatasetConfigResultDatasetInfo") + + +@_attrs_define +class HuggingFaceDatasetConfigResultDatasetInfo: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + hugging_face_dataset_config_result_dataset_info = cls() + + hugging_face_dataset_config_result_dataset_info.additional_properties = d + return hugging_face_dataset_config_result_dataset_info + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_create_request.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_create_request.py new file mode 100644 index 0000000..2f2898f --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_create_request.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="HuggingFaceDatasetCreateRequest") + + +@_attrs_define +class HuggingFaceDatasetCreateRequest: + """ + Attributes: + huggingface_dataset_name (str): + huggingface_dataset_split (str): + name (str | Unset): Default: ''. + model_type (str | Unset): Default: ''. + num_rows (int | Unset): + huggingface_dataset_config (str | Unset): + """ + + huggingface_dataset_name: str + huggingface_dataset_split: str + name: str | Unset = "" + model_type: str | Unset = "" + num_rows: int | Unset = UNSET + huggingface_dataset_config: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + huggingface_dataset_name = self.huggingface_dataset_name + + huggingface_dataset_split = self.huggingface_dataset_split + + name = self.name + + model_type = self.model_type + + num_rows = self.num_rows + + huggingface_dataset_config = self.huggingface_dataset_config + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "huggingface_dataset_name": huggingface_dataset_name, + "huggingface_dataset_split": huggingface_dataset_split, + } + ) + if name is not UNSET: + field_dict["name"] = name + if model_type is not UNSET: + field_dict["model_type"] = model_type + if num_rows is not UNSET: + field_dict["num_rows"] = num_rows + if huggingface_dataset_config is not UNSET: + field_dict["huggingface_dataset_config"] = huggingface_dataset_config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + huggingface_dataset_name = d.pop("huggingface_dataset_name") + + huggingface_dataset_split = d.pop("huggingface_dataset_split") + + name = d.pop("name", UNSET) + + model_type = d.pop("model_type", UNSET) + + num_rows = d.pop("num_rows", UNSET) + + huggingface_dataset_config = d.pop("huggingface_dataset_config", UNSET) + + hugging_face_dataset_create_request = cls( + huggingface_dataset_name=huggingface_dataset_name, + huggingface_dataset_split=huggingface_dataset_split, + name=name, + model_type=model_type, + num_rows=num_rows, + huggingface_dataset_config=huggingface_dataset_config, + ) + + hugging_face_dataset_create_request.additional_properties = d + return hugging_face_dataset_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_detail.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail.py new file mode 100644 index 0000000..f9fb6d3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail.py @@ -0,0 +1,123 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="HuggingFaceDatasetDetail") + + +@_attrs_define +class HuggingFaceDatasetDetail: + """ + Attributes: + id (str): + name (str): + description (str): + downloads (int): + likes (int): + tags (list[str]): + author (None | str | Unset): + """ + + id: str + name: str + description: str + downloads: int + likes: int + tags: list[str] + author: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + description = self.description + + downloads = self.downloads + + likes = self.likes + + tags = self.tags + + author: None | str | Unset + if isinstance(self.author, Unset): + author = UNSET + else: + author = self.author + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "description": description, + "downloads": downloads, + "likes": likes, + "tags": tags, + } + ) + if author is not UNSET: + field_dict["author"] = author + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + description = d.pop("description") + + downloads = d.pop("downloads") + + likes = d.pop("likes") + + tags = cast(list[str], d.pop("tags")) + + def _parse_author(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + author = _parse_author(d.pop("author", UNSET)) + + hugging_face_dataset_detail = cls( + id=id, + name=name, + description=description, + downloads=downloads, + likes=likes, + tags=tags, + author=author, + ) + + hugging_face_dataset_detail.additional_properties = d + return hugging_face_dataset_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_request.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_request.py new file mode 100644 index 0000000..51ba248 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="HuggingFaceDatasetDetailRequest") + + +@_attrs_define +class HuggingFaceDatasetDetailRequest: + """ + Attributes: + dataset_id (str): + """ + + dataset_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = self.dataset_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_id = d.pop("dataset_id") + + hugging_face_dataset_detail_request = cls( + dataset_id=dataset_id, + ) + + hugging_face_dataset_detail_request.additional_properties = d + return hugging_face_dataset_detail_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response.py new file mode 100644 index 0000000..822ed73 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.hugging_face_dataset_detail_response_result import ( + HuggingFaceDatasetDetailResponseResult, + ) + + +T = TypeVar("T", bound="HuggingFaceDatasetDetailResponse") + + +@_attrs_define +class HuggingFaceDatasetDetailResponse: + """ + Attributes: + status (bool): + result (HuggingFaceDatasetDetailResponseResult): + """ + + status: bool + result: HuggingFaceDatasetDetailResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.hugging_face_dataset_detail_response_result import ( + HuggingFaceDatasetDetailResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = HuggingFaceDatasetDetailResponseResult.from_dict(d.pop("result")) + + hugging_face_dataset_detail_response = cls( + status=status, + result=result, + ) + + hugging_face_dataset_detail_response.additional_properties = d + return hugging_face_dataset_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response_result.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response_result.py new file mode 100644 index 0000000..83709ba --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_detail_response_result.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.hugging_face_dataset_detail import HuggingFaceDatasetDetail + + +T = TypeVar("T", bound="HuggingFaceDatasetDetailResponseResult") + + +@_attrs_define +class HuggingFaceDatasetDetailResponseResult: + """ + Attributes: + message (str): + dataset (HuggingFaceDatasetDetail): + """ + + message: str + dataset: HuggingFaceDatasetDetail + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + dataset = self.dataset.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "dataset": dataset, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.hugging_face_dataset_detail import HuggingFaceDatasetDetail + + d = dict(src_dict) + message = d.pop("message") + + dataset = HuggingFaceDatasetDetail.from_dict(d.pop("dataset")) + + hugging_face_dataset_detail_response_result = cls( + message=message, + dataset=dataset, + ) + + hugging_face_dataset_detail_response_result.additional_properties = d + return hugging_face_dataset_detail_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_list_item.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_item.py new file mode 100644 index 0000000..bd730b7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_item.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="HuggingFaceDatasetListItem") + + +@_attrs_define +class HuggingFaceDatasetListItem: + """ + Attributes: + id (str): + name (str): + downloads (int): + likes (int): + author (None | str | Unset): + """ + + id: str + name: str + downloads: int + likes: int + author: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + downloads = self.downloads + + likes = self.likes + + author: None | str | Unset + if isinstance(self.author, Unset): + author = UNSET + else: + author = self.author + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "downloads": downloads, + "likes": likes, + } + ) + if author is not UNSET: + field_dict["author"] = author + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + downloads = d.pop("downloads") + + likes = d.pop("likes") + + def _parse_author(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + author = _parse_author(d.pop("author", UNSET)) + + hugging_face_dataset_list_item = cls( + id=id, + name=name, + downloads=downloads, + likes=likes, + author=author, + ) + + hugging_face_dataset_list_item.additional_properties = d + return hugging_face_dataset_list_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_list_request.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_request.py new file mode 100644 index 0000000..661b1f2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_request.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.hugging_face_dataset_list_request_filter_params import ( + HuggingFaceDatasetListRequestFilterParams, + ) + + +T = TypeVar("T", bound="HuggingFaceDatasetListRequest") + + +@_attrs_define +class HuggingFaceDatasetListRequest: + """ + Attributes: + search_query (str | Unset): Default: ''. + filter_params (HuggingFaceDatasetListRequestFilterParams | Unset): + """ + + search_query: str | Unset = "" + filter_params: HuggingFaceDatasetListRequestFilterParams | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + search_query = self.search_query + + filter_params: dict[str, Any] | Unset = UNSET + if not isinstance(self.filter_params, Unset): + filter_params = self.filter_params.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if search_query is not UNSET: + field_dict["search_query"] = search_query + if filter_params is not UNSET: + field_dict["filter_params"] = filter_params + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.hugging_face_dataset_list_request_filter_params import ( + HuggingFaceDatasetListRequestFilterParams, + ) + + d = dict(src_dict) + search_query = d.pop("search_query", UNSET) + + _filter_params = d.pop("filter_params", UNSET) + filter_params: HuggingFaceDatasetListRequestFilterParams | Unset + if isinstance(_filter_params, Unset): + filter_params = UNSET + else: + filter_params = HuggingFaceDatasetListRequestFilterParams.from_dict( + _filter_params + ) + + hugging_face_dataset_list_request = cls( + search_query=search_query, + filter_params=filter_params, + ) + + hugging_face_dataset_list_request.additional_properties = d + return hugging_face_dataset_list_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_list_request_filter_params.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_request_filter_params.py new file mode 100644 index 0000000..04f0eb8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_request_filter_params.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="HuggingFaceDatasetListRequestFilterParams") + + +@_attrs_define +class HuggingFaceDatasetListRequestFilterParams: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + hugging_face_dataset_list_request_filter_params = cls() + + hugging_face_dataset_list_request_filter_params.additional_properties = d + return hugging_face_dataset_list_request_filter_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_list_response.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_response.py new file mode 100644 index 0000000..21f3daf --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.hugging_face_dataset_list_response_result import ( + HuggingFaceDatasetListResponseResult, + ) + + +T = TypeVar("T", bound="HuggingFaceDatasetListResponse") + + +@_attrs_define +class HuggingFaceDatasetListResponse: + """ + Attributes: + status (bool): + result (HuggingFaceDatasetListResponseResult): + """ + + status: bool + result: HuggingFaceDatasetListResponseResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.hugging_face_dataset_list_response_result import ( + HuggingFaceDatasetListResponseResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = HuggingFaceDatasetListResponseResult.from_dict(d.pop("result")) + + hugging_face_dataset_list_response = cls( + status=status, + result=result, + ) + + hugging_face_dataset_list_response.additional_properties = d + return hugging_face_dataset_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/hugging_face_dataset_list_response_result.py b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_response_result.py new file mode 100644 index 0000000..8bedded --- /dev/null +++ b/python/fi/generated/openapi_client/models/hugging_face_dataset_list_response_result.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.hugging_face_dataset_list_item import HuggingFaceDatasetListItem + + +T = TypeVar("T", bound="HuggingFaceDatasetListResponseResult") + + +@_attrs_define +class HuggingFaceDatasetListResponseResult: + """ + Attributes: + message (str): + total_datasets (int): + datasets (list[HuggingFaceDatasetListItem]): + """ + + message: str + total_datasets: int + datasets: list[HuggingFaceDatasetListItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + total_datasets = self.total_datasets + + datasets = [] + for datasets_item_data in self.datasets: + datasets_item = datasets_item_data.to_dict() + datasets.append(datasets_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "total_datasets": total_datasets, + "datasets": datasets, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.hugging_face_dataset_list_item import HuggingFaceDatasetListItem + + d = dict(src_dict) + message = d.pop("message") + + total_datasets = d.pop("total_datasets") + + datasets = [] + _datasets = d.pop("datasets") + for datasets_item_data in _datasets: + datasets_item = HuggingFaceDatasetListItem.from_dict(datasets_item_data) + + datasets.append(datasets_item) + + hugging_face_dataset_list_response_result = cls( + message=message, + total_datasets=total_datasets, + datasets=datasets, + ) + + hugging_face_dataset_list_response_result.additional_properties = d + return hugging_face_dataset_list_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/import_annotation_entry.py b/python/fi/generated/openapi_client/models/import_annotation_entry.py new file mode 100644 index 0000000..a81eff7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/import_annotation_entry.py @@ -0,0 +1,96 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.import_annotation_entry_value import ImportAnnotationEntryValue + + +T = TypeVar("T", bound="ImportAnnotationEntry") + + +@_attrs_define +class ImportAnnotationEntry: + """ + Attributes: + label_id (UUID): + value (ImportAnnotationEntryValue): + notes (str | Unset): + score_source (str | Unset): + """ + + label_id: UUID + value: ImportAnnotationEntryValue + notes: str | Unset = UNSET + score_source: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label_id = str(self.label_id) + + value = self.value.to_dict() + + notes = self.notes + + score_source = self.score_source + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label_id": label_id, + "value": value, + } + ) + if notes is not UNSET: + field_dict["notes"] = notes + if score_source is not UNSET: + field_dict["score_source"] = score_source + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.import_annotation_entry_value import ImportAnnotationEntryValue + + d = dict(src_dict) + label_id = UUID(d.pop("label_id")) + + value = ImportAnnotationEntryValue.from_dict(d.pop("value")) + + notes = d.pop("notes", UNSET) + + score_source = d.pop("score_source", UNSET) + + import_annotation_entry = cls( + label_id=label_id, + value=value, + notes=notes, + score_source=score_source, + ) + + import_annotation_entry.additional_properties = d + return import_annotation_entry + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/import_annotation_entry_value.py b/python/fi/generated/openapi_client/models/import_annotation_entry_value.py new file mode 100644 index 0000000..8c277e9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/import_annotation_entry_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ImportAnnotationEntryValue") + + +@_attrs_define +class ImportAnnotationEntryValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + import_annotation_entry_value = cls() + + import_annotation_entry_value.additional_properties = d + return import_annotation_entry_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/import_annotations.py b/python/fi/generated/openapi_client/models/import_annotations.py new file mode 100644 index 0000000..3cf9f38 --- /dev/null +++ b/python/fi/generated/openapi_client/models/import_annotations.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.import_annotation_entry import ImportAnnotationEntry + + +T = TypeVar("T", bound="ImportAnnotations") + + +@_attrs_define +class ImportAnnotations: + """ + Attributes: + annotations (list[ImportAnnotationEntry]): + annotator_id (UUID | Unset): + """ + + annotations: list[ImportAnnotationEntry] + annotator_id: UUID | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + annotations = [] + for annotations_item_data in self.annotations: + annotations_item = annotations_item_data.to_dict() + annotations.append(annotations_item) + + annotator_id: str | Unset = UNSET + if not isinstance(self.annotator_id, Unset): + annotator_id = str(self.annotator_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "annotations": annotations, + } + ) + if annotator_id is not UNSET: + field_dict["annotator_id"] = annotator_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.import_annotation_entry import ImportAnnotationEntry + + d = dict(src_dict) + annotations = [] + _annotations = d.pop("annotations") + for annotations_item_data in _annotations: + annotations_item = ImportAnnotationEntry.from_dict(annotations_item_data) + + annotations.append(annotations_item) + + _annotator_id = d.pop("annotator_id", UNSET) + annotator_id: UUID | Unset + if isinstance(_annotator_id, Unset): + annotator_id = UNSET + else: + annotator_id = UUID(_annotator_id) + + import_annotations = cls( + annotations=annotations, + annotator_id=annotator_id, + ) + + import_annotations.additional_properties = d + return import_annotations + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/json_column_schema_entry.py b/python/fi/generated/openapi_client/models/json_column_schema_entry.py new file mode 100644 index 0000000..02c29a6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/json_column_schema_entry.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.json_column_schema_entry_sample import JsonColumnSchemaEntrySample + + +T = TypeVar("T", bound="JsonColumnSchemaEntry") + + +@_attrs_define +class JsonColumnSchemaEntry: + """ + Attributes: + name (str): + keys (list[str] | Unset): + sample (JsonColumnSchemaEntrySample | Unset): + max_array_count (int | Unset): + max_images_count (int | Unset): + """ + + name: str + keys: list[str] | Unset = UNSET + sample: JsonColumnSchemaEntrySample | Unset = UNSET + max_array_count: int | Unset = UNSET + max_images_count: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + keys: list[str] | Unset = UNSET + if not isinstance(self.keys, Unset): + keys = self.keys + + sample: dict[str, Any] | Unset = UNSET + if not isinstance(self.sample, Unset): + sample = self.sample.to_dict() + + max_array_count = self.max_array_count + + max_images_count = self.max_images_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if keys is not UNSET: + field_dict["keys"] = keys + if sample is not UNSET: + field_dict["sample"] = sample + if max_array_count is not UNSET: + field_dict["max_array_count"] = max_array_count + if max_images_count is not UNSET: + field_dict["max_images_count"] = max_images_count + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.json_column_schema_entry_sample import JsonColumnSchemaEntrySample + + d = dict(src_dict) + name = d.pop("name") + + keys = cast(list[str], d.pop("keys", UNSET)) + + _sample = d.pop("sample", UNSET) + sample: JsonColumnSchemaEntrySample | Unset + if isinstance(_sample, Unset): + sample = UNSET + else: + sample = JsonColumnSchemaEntrySample.from_dict(_sample) + + max_array_count = d.pop("max_array_count", UNSET) + + max_images_count = d.pop("max_images_count", UNSET) + + json_column_schema_entry = cls( + name=name, + keys=keys, + sample=sample, + max_array_count=max_array_count, + max_images_count=max_images_count, + ) + + json_column_schema_entry.additional_properties = d + return json_column_schema_entry + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/json_column_schema_entry_sample.py b/python/fi/generated/openapi_client/models/json_column_schema_entry_sample.py new file mode 100644 index 0000000..58289ee --- /dev/null +++ b/python/fi/generated/openapi_client/models/json_column_schema_entry_sample.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="JsonColumnSchemaEntrySample") + + +@_attrs_define +class JsonColumnSchemaEntrySample: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + json_column_schema_entry_sample = cls() + + json_column_schema_entry_sample.additional_properties = d + return json_column_schema_entry_sample + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/key_moment.py b/python/fi/generated/openapi_client/models/key_moment.py new file mode 100644 index 0000000..0aa991c --- /dev/null +++ b/python/fi/generated/openapi_client/models/key_moment.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="KeyMoment") + + +@_attrs_define +class KeyMoment: + """ + Attributes: + kevinified (str): + verbatim (str): + """ + + kevinified: str + verbatim: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + kevinified = self.kevinified + + verbatim = self.verbatim + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "kevinified": kevinified, + "verbatim": verbatim, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + kevinified = d.pop("kevinified") + + verbatim = d.pop("verbatim") + + key_moment = cls( + kevinified=kevinified, + verbatim=verbatim, + ) + + key_moment.additional_properties = d + return key_moment + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_create_response.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_create_response.py new file mode 100644 index 0000000..20340ac --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_create_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_create_result import ( + LegacyKnowledgeBaseCreateResult, + ) + + +T = TypeVar("T", bound="LegacyKnowledgeBaseCreateResponse") + + +@_attrs_define +class LegacyKnowledgeBaseCreateResponse: + """ + Attributes: + status (bool): + result (LegacyKnowledgeBaseCreateResult): + """ + + status: bool + result: LegacyKnowledgeBaseCreateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_create_result import ( + LegacyKnowledgeBaseCreateResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = LegacyKnowledgeBaseCreateResult.from_dict(d.pop("result")) + + legacy_knowledge_base_create_response = cls( + status=status, + result=result, + ) + + legacy_knowledge_base_create_response.additional_properties = d + return legacy_knowledge_base_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_create_result.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_create_result.py new file mode 100644 index 0000000..3c38592 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_create_result.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LegacyKnowledgeBaseCreateResult") + + +@_attrs_define +class LegacyKnowledgeBaseCreateResult: + """ + Attributes: + detail (str): + kb_id (UUID): + kb_name (str): + file_ids (list[UUID]): + """ + + detail: str + kb_id: UUID + kb_name: str + file_ids: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + detail = self.detail + + kb_id = str(self.kb_id) + + kb_name = self.kb_name + + file_ids = [] + for file_ids_item_data in self.file_ids: + file_ids_item = str(file_ids_item_data) + file_ids.append(file_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "detail": detail, + "kb_id": kb_id, + "kb_name": kb_name, + "file_ids": file_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + detail = d.pop("detail") + + kb_id = UUID(d.pop("kb_id")) + + kb_name = d.pop("kb_name") + + file_ids = [] + _file_ids = d.pop("file_ids") + for file_ids_item_data in _file_ids: + file_ids_item = UUID(file_ids_item_data) + + file_ids.append(file_ids_item) + + legacy_knowledge_base_create_result = cls( + detail=detail, + kb_id=kb_id, + kb_name=kb_name, + file_ids=file_ids, + ) + + legacy_knowledge_base_create_result.additional_properties = d + return legacy_knowledge_base_create_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_file_row.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_file_row.py new file mode 100644 index 0000000..9ab2f14 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_file_row.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LegacyKnowledgeBaseFileRow") + + +@_attrs_define +class LegacyKnowledgeBaseFileRow: + """ + Attributes: + id (UUID): + name (str): + file_size (int): + status (str): + updated (datetime.datetime): + updated_by (None | str): + error (None | str | Unset): + """ + + id: UUID + name: str + file_size: int + status: str + updated: datetime.datetime + updated_by: None | str + error: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + file_size = self.file_size + + status = self.status + + updated = self.updated.isoformat() + + updated_by: None | str + updated_by = self.updated_by + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "file_size": file_size, + "status": status, + "updated": updated, + "updated_by": updated_by, + } + ) + if error is not UNSET: + field_dict["error"] = error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + file_size = d.pop("file_size") + + status = d.pop("status") + + updated = isoparse(d.pop("updated")) + + def _parse_updated_by(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + updated_by = _parse_updated_by(d.pop("updated_by")) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + legacy_knowledge_base_file_row = cls( + id=id, + name=name, + file_size=file_size, + status=status, + updated=updated, + updated_by=updated_by, + error=error, + ) + + legacy_knowledge_base_file_row.additional_properties = d + return legacy_knowledge_base_file_row + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request.py new file mode 100644 index 0000000..88f637f --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request.py @@ -0,0 +1,135 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_files_request_sort_item import ( + LegacyKnowledgeBaseFilesRequestSortItem, + ) + + +T = TypeVar("T", bound="LegacyKnowledgeBaseFilesRequest") + + +@_attrs_define +class LegacyKnowledgeBaseFilesRequest: + """ + Attributes: + kb_id (UUID): + search (None | str | Unset): + sort (list[LegacyKnowledgeBaseFilesRequestSortItem] | Unset): + page_number (int | Unset): Default: 0. + page_size (int | Unset): Default: 10. + """ + + kb_id: UUID + search: None | str | Unset = UNSET + sort: list[LegacyKnowledgeBaseFilesRequestSortItem] | Unset = UNSET + page_number: int | Unset = 0 + page_size: int | Unset = 10 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + kb_id = str(self.kb_id) + + search: None | str | Unset + if isinstance(self.search, Unset): + search = UNSET + else: + search = self.search + + sort: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.sort, Unset): + sort = [] + for sort_item_data in self.sort: + sort_item = sort_item_data.to_dict() + sort.append(sort_item) + + page_number = self.page_number + + page_size = self.page_size + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "kb_id": kb_id, + } + ) + if search is not UNSET: + field_dict["search"] = search + if sort is not UNSET: + field_dict["sort"] = sort + if page_number is not UNSET: + field_dict["page_number"] = page_number + if page_size is not UNSET: + field_dict["page_size"] = page_size + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_files_request_sort_item import ( + LegacyKnowledgeBaseFilesRequestSortItem, + ) + + d = dict(src_dict) + kb_id = UUID(d.pop("kb_id")) + + def _parse_search(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + search = _parse_search(d.pop("search", UNSET)) + + _sort = d.pop("sort", UNSET) + sort: list[LegacyKnowledgeBaseFilesRequestSortItem] | Unset = UNSET + if _sort is not UNSET: + sort = [] + for sort_item_data in _sort: + sort_item = LegacyKnowledgeBaseFilesRequestSortItem.from_dict( + sort_item_data + ) + + sort.append(sort_item) + + page_number = d.pop("page_number", UNSET) + + page_size = d.pop("page_size", UNSET) + + legacy_knowledge_base_files_request = cls( + kb_id=kb_id, + search=search, + sort=sort, + page_number=page_number, + page_size=page_size, + ) + + legacy_knowledge_base_files_request.additional_properties = d + return legacy_knowledge_base_files_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request_sort_item.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request_sort_item.py new file mode 100644 index 0000000..c23260b --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_request_sort_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LegacyKnowledgeBaseFilesRequestSortItem") + + +@_attrs_define +class LegacyKnowledgeBaseFilesRequestSortItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + legacy_knowledge_base_files_request_sort_item = cls() + + legacy_knowledge_base_files_request_sort_item.additional_properties = d + return legacy_knowledge_base_files_request_sort_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_response.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_response.py new file mode 100644 index 0000000..e2c0179 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_files_result import ( + LegacyKnowledgeBaseFilesResult, + ) + + +T = TypeVar("T", bound="LegacyKnowledgeBaseFilesResponse") + + +@_attrs_define +class LegacyKnowledgeBaseFilesResponse: + """ + Attributes: + status (bool): + result (LegacyKnowledgeBaseFilesResult): + """ + + status: bool + result: LegacyKnowledgeBaseFilesResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_files_result import ( + LegacyKnowledgeBaseFilesResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = LegacyKnowledgeBaseFilesResult.from_dict(d.pop("result")) + + legacy_knowledge_base_files_response = cls( + status=status, + result=result, + ) + + legacy_knowledge_base_files_response.additional_properties = d + return legacy_knowledge_base_files_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_result.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_result.py new file mode 100644 index 0000000..24474a6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_files_result.py @@ -0,0 +1,109 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_file_row import LegacyKnowledgeBaseFileRow + + +T = TypeVar("T", bound="LegacyKnowledgeBaseFilesResult") + + +@_attrs_define +class LegacyKnowledgeBaseFilesResult: + """ + Attributes: + table_data (list[LegacyKnowledgeBaseFileRow]): + last_updated (datetime.datetime): + status (str): + status_count (int): + total_rows (int): + """ + + table_data: list[LegacyKnowledgeBaseFileRow] + last_updated: datetime.datetime + status: str + status_count: int + total_rows: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + table_data = [] + for table_data_item_data in self.table_data: + table_data_item = table_data_item_data.to_dict() + table_data.append(table_data_item) + + last_updated = self.last_updated.isoformat() + + status = self.status + + status_count = self.status_count + + total_rows = self.total_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "table_data": table_data, + "last_updated": last_updated, + "status": status, + "status_count": status_count, + "total_rows": total_rows, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_file_row import LegacyKnowledgeBaseFileRow + + d = dict(src_dict) + table_data = [] + _table_data = d.pop("table_data") + for table_data_item_data in _table_data: + table_data_item = LegacyKnowledgeBaseFileRow.from_dict(table_data_item_data) + + table_data.append(table_data_item) + + last_updated = isoparse(d.pop("last_updated")) + + status = d.pop("status") + + status_count = d.pop("status_count") + + total_rows = d.pop("total_rows") + + legacy_knowledge_base_files_result = cls( + table_data=table_data, + last_updated=last_updated, + status=status, + status_count=status_count, + total_rows=total_rows, + ) + + legacy_knowledge_base_files_result.additional_properties = d + return legacy_knowledge_base_files_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_list_response.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_list_response.py new file mode 100644 index 0000000..10c70d3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_list_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_list_result import LegacyKnowledgeBaseListResult + + +T = TypeVar("T", bound="LegacyKnowledgeBaseListResponse") + + +@_attrs_define +class LegacyKnowledgeBaseListResponse: + """ + Attributes: + status (bool): + result (LegacyKnowledgeBaseListResult): + """ + + status: bool + result: LegacyKnowledgeBaseListResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_list_result import ( + LegacyKnowledgeBaseListResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = LegacyKnowledgeBaseListResult.from_dict(d.pop("result")) + + legacy_knowledge_base_list_response = cls( + status=status, + result=result, + ) + + legacy_knowledge_base_list_response.additional_properties = d + return legacy_knowledge_base_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_list_result.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_list_result.py new file mode 100644 index 0000000..85c8f1a --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_list_result.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_option import LegacyKnowledgeBaseOption + + +T = TypeVar("T", bound="LegacyKnowledgeBaseListResult") + + +@_attrs_define +class LegacyKnowledgeBaseListResult: + """ + Attributes: + table_data (list[LegacyKnowledgeBaseOption]): + """ + + table_data: list[LegacyKnowledgeBaseOption] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + table_data = [] + for table_data_item_data in self.table_data: + table_data_item = table_data_item_data.to_dict() + table_data.append(table_data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "table_data": table_data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_option import LegacyKnowledgeBaseOption + + d = dict(src_dict) + table_data = [] + _table_data = d.pop("table_data") + for table_data_item_data in _table_data: + table_data_item = LegacyKnowledgeBaseOption.from_dict(table_data_item_data) + + table_data.append(table_data_item) + + legacy_knowledge_base_list_result = cls( + table_data=table_data, + ) + + legacy_knowledge_base_list_result.additional_properties = d + return legacy_knowledge_base_list_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_request.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_request.py new file mode 100644 index 0000000..ce5ce9c --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_request.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LegacyKnowledgeBaseMutationRequest") + + +@_attrs_define +class LegacyKnowledgeBaseMutationRequest: + """ + Attributes: + name (str | Unset): + kb_id (UUID | Unset): + files (list[UUID] | Unset): + """ + + name: str | Unset = UNSET + kb_id: UUID | Unset = UNSET + files: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + kb_id: str | Unset = UNSET + if not isinstance(self.kb_id, Unset): + kb_id = str(self.kb_id) + + files: list[str] | Unset = UNSET + if not isinstance(self.files, Unset): + files = [] + for files_item_data in self.files: + files_item = str(files_item_data) + files.append(files_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if files is not UNSET: + field_dict["files"] = files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + _kb_id = d.pop("kb_id", UNSET) + kb_id: UUID | Unset + if isinstance(_kb_id, Unset): + kb_id = UNSET + else: + kb_id = UUID(_kb_id) + + _files = d.pop("files", UNSET) + files: list[UUID] | Unset = UNSET + if _files is not UNSET: + files = [] + for files_item_data in _files: + files_item = UUID(files_item_data) + + files.append(files_item) + + legacy_knowledge_base_mutation_request = cls( + name=name, + kb_id=kb_id, + files=files, + ) + + legacy_knowledge_base_mutation_request.additional_properties = d + return legacy_knowledge_base_mutation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_response.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_response.py new file mode 100644 index 0000000..a44e35a --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_mutation_result import ( + LegacyKnowledgeBaseMutationResult, + ) + + +T = TypeVar("T", bound="LegacyKnowledgeBaseMutationResponse") + + +@_attrs_define +class LegacyKnowledgeBaseMutationResponse: + """ + Attributes: + status (bool): + result (LegacyKnowledgeBaseMutationResult): + """ + + status: bool + result: LegacyKnowledgeBaseMutationResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_mutation_result import ( + LegacyKnowledgeBaseMutationResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = LegacyKnowledgeBaseMutationResult.from_dict(d.pop("result")) + + legacy_knowledge_base_mutation_response = cls( + status=status, + result=result, + ) + + legacy_knowledge_base_mutation_response.additional_properties = d + return legacy_knowledge_base_mutation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_result.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_result.py new file mode 100644 index 0000000..cb0ed3a --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_mutation_result.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +T = TypeVar("T", bound="LegacyKnowledgeBaseMutationResult") + + +@_attrs_define +class LegacyKnowledgeBaseMutationResult: + """ + Attributes: + id (UUID): + name (str): + organization (UUID): + status (str): + files (list[UUID]): + updated_at (datetime.datetime): + created_by (None | str): + last_error (None | str): + """ + + id: UUID + name: str + organization: UUID + status: str + files: list[UUID] + updated_at: datetime.datetime + created_by: None | str + last_error: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + organization = str(self.organization) + + status = self.status + + files = [] + for files_item_data in self.files: + files_item = str(files_item_data) + files.append(files_item) + + updated_at = self.updated_at.isoformat() + + created_by: None | str + created_by = self.created_by + + last_error: None | str + last_error = self.last_error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "organization": organization, + "status": status, + "files": files, + "updated_at": updated_at, + "created_by": created_by, + "last_error": last_error, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + organization = UUID(d.pop("organization")) + + status = d.pop("status") + + files = [] + _files = d.pop("files") + for files_item_data in _files: + files_item = UUID(files_item_data) + + files.append(files_item) + + updated_at = isoparse(d.pop("updated_at")) + + def _parse_created_by(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + created_by = _parse_created_by(d.pop("created_by")) + + def _parse_last_error(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + last_error = _parse_last_error(d.pop("last_error")) + + legacy_knowledge_base_mutation_result = cls( + id=id, + name=name, + organization=organization, + status=status, + files=files, + updated_at=updated_at, + created_by=created_by, + last_error=last_error, + ) + + legacy_knowledge_base_mutation_result.additional_properties = d + return legacy_knowledge_base_mutation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_option.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_option.py new file mode 100644 index 0000000..2cc7a20 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_option.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LegacyKnowledgeBaseOption") + + +@_attrs_define +class LegacyKnowledgeBaseOption: + """ + Attributes: + id (UUID): + name (str): + """ + + id: UUID + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + legacy_knowledge_base_option = cls( + id=id, + name=name, + ) + + legacy_knowledge_base_option.additional_properties = d + return legacy_knowledge_base_option + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_response.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_response.py new file mode 100644 index 0000000..91fcdfc --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_sdk_code_result import ( + LegacyKnowledgeBaseSdkCodeResult, + ) + + +T = TypeVar("T", bound="LegacyKnowledgeBaseSdkCodeResponse") + + +@_attrs_define +class LegacyKnowledgeBaseSdkCodeResponse: + """ + Attributes: + status (bool): + result (LegacyKnowledgeBaseSdkCodeResult): + """ + + status: bool + result: LegacyKnowledgeBaseSdkCodeResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_sdk_code_result import ( + LegacyKnowledgeBaseSdkCodeResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = LegacyKnowledgeBaseSdkCodeResult.from_dict(d.pop("result")) + + legacy_knowledge_base_sdk_code_response = cls( + status=status, + result=result, + ) + + legacy_knowledge_base_sdk_code_response.additional_properties = d + return legacy_knowledge_base_sdk_code_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_result.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_result.py new file mode 100644 index 0000000..33210a5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_sdk_code_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LegacyKnowledgeBaseSdkCodeResult") + + +@_attrs_define +class LegacyKnowledgeBaseSdkCodeResult: + """ + Attributes: + code (str): + """ + + code: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + code = self.code + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "code": code, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + code = d.pop("code") + + legacy_knowledge_base_sdk_code_result = cls( + code=code, + ) + + legacy_knowledge_base_sdk_code_result.additional_properties = d + return legacy_knowledge_base_sdk_code_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_column.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_column.py new file mode 100644 index 0000000..0fb6220 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_column.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LegacyKnowledgeBaseTableColumn") + + +@_attrs_define +class LegacyKnowledgeBaseTableColumn: + """ + Attributes: + id (str): + name (str): + """ + + id: str + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + legacy_knowledge_base_table_column = cls( + id=id, + name=name, + ) + + legacy_knowledge_base_table_column.additional_properties = d + return legacy_knowledge_base_table_column + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_response.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_response.py new file mode 100644 index 0000000..0947ee9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_table_result import ( + LegacyKnowledgeBaseTableResult, + ) + + +T = TypeVar("T", bound="LegacyKnowledgeBaseTableResponse") + + +@_attrs_define +class LegacyKnowledgeBaseTableResponse: + """ + Attributes: + status (bool): + result (LegacyKnowledgeBaseTableResult): + """ + + status: bool + result: LegacyKnowledgeBaseTableResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_table_result import ( + LegacyKnowledgeBaseTableResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = LegacyKnowledgeBaseTableResult.from_dict(d.pop("result")) + + legacy_knowledge_base_table_response = cls( + status=status, + result=result, + ) + + legacy_knowledge_base_table_response.additional_properties = d + return legacy_knowledge_base_table_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_result.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_result.py new file mode 100644 index 0000000..a6af731 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_result.py @@ -0,0 +1,119 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.legacy_knowledge_base_table_column import ( + LegacyKnowledgeBaseTableColumn, + ) + from ..models.legacy_knowledge_base_table_row import LegacyKnowledgeBaseTableRow + + +T = TypeVar("T", bound="LegacyKnowledgeBaseTableResult") + + +@_attrs_define +class LegacyKnowledgeBaseTableResult: + """ + Attributes: + column_config (list[LegacyKnowledgeBaseTableColumn] | Unset): + table_data (list[LegacyKnowledgeBaseTableRow] | Unset): + total_rows (int | Unset): + """ + + column_config: list[LegacyKnowledgeBaseTableColumn] | Unset = UNSET + table_data: list[LegacyKnowledgeBaseTableRow] | Unset = UNSET + total_rows: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_config: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.column_config, Unset): + column_config = [] + for column_config_item_data in self.column_config: + column_config_item = column_config_item_data.to_dict() + column_config.append(column_config_item) + + table_data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.table_data, Unset): + table_data = [] + for table_data_item_data in self.table_data: + table_data_item = table_data_item_data.to_dict() + table_data.append(table_data_item) + + total_rows = self.total_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if column_config is not UNSET: + field_dict["column_config"] = column_config + if table_data is not UNSET: + field_dict["table_data"] = table_data + if total_rows is not UNSET: + field_dict["total_rows"] = total_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.legacy_knowledge_base_table_column import ( + LegacyKnowledgeBaseTableColumn, + ) + from ..models.legacy_knowledge_base_table_row import LegacyKnowledgeBaseTableRow + + d = dict(src_dict) + _column_config = d.pop("column_config", UNSET) + column_config: list[LegacyKnowledgeBaseTableColumn] | Unset = UNSET + if _column_config is not UNSET: + column_config = [] + for column_config_item_data in _column_config: + column_config_item = LegacyKnowledgeBaseTableColumn.from_dict( + column_config_item_data + ) + + column_config.append(column_config_item) + + _table_data = d.pop("table_data", UNSET) + table_data: list[LegacyKnowledgeBaseTableRow] | Unset = UNSET + if _table_data is not UNSET: + table_data = [] + for table_data_item_data in _table_data: + table_data_item = LegacyKnowledgeBaseTableRow.from_dict( + table_data_item_data + ) + + table_data.append(table_data_item) + + total_rows = d.pop("total_rows", UNSET) + + legacy_knowledge_base_table_result = cls( + column_config=column_config, + table_data=table_data, + total_rows=total_rows, + ) + + legacy_knowledge_base_table_result.additional_properties = d + return legacy_knowledge_base_table_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_row.py b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_row.py new file mode 100644 index 0000000..7d38cf3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/legacy_knowledge_base_table_row.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LegacyKnowledgeBaseTableRow") + + +@_attrs_define +class LegacyKnowledgeBaseTableRow: + """ + Attributes: + id (UUID): + name (str): + files_uploaded (int): + status (str): + updated_at (datetime.datetime): + created_by (None | str): + error (None | str | Unset): + """ + + id: UUID + name: str + files_uploaded: int + status: str + updated_at: datetime.datetime + created_by: None | str + error: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + files_uploaded = self.files_uploaded + + status = self.status + + updated_at = self.updated_at.isoformat() + + created_by: None | str + created_by = self.created_by + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "files_uploaded": files_uploaded, + "status": status, + "updated_at": updated_at, + "created_by": created_by, + } + ) + if error is not UNSET: + field_dict["error"] = error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + files_uploaded = d.pop("files_uploaded") + + status = d.pop("status") + + updated_at = isoparse(d.pop("updated_at")) + + def _parse_created_by(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + created_by = _parse_created_by(d.pop("created_by")) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + legacy_knowledge_base_table_row = cls( + id=id, + name=name, + files_uploaded=files_uploaded, + status=status, + updated_at=updated_at, + created_by=created_by, + error=error, + ) + + legacy_knowledge_base_table_row.additional_properties = d + return legacy_knowledge_base_table_row + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_agent_definitions_agent_type.py b/python/fi/generated/openapi_client/models/list_agent_definitions_agent_type.py new file mode 100644 index 0000000..613cffa --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_agent_definitions_agent_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListAgentDefinitionsAgentType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_alert_logs_response_200.py b/python/fi/generated/openapi_client/models/list_alert_logs_response_200.py new file mode 100644 index 0000000..0c0445f --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_alert_logs_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_alert_monitor_log import UserAlertMonitorLog + + +T = TypeVar("T", bound="ListAlertLogsResponse200") + + +@_attrs_define +class ListAlertLogsResponse200: + """ + Attributes: + count (int): + results (list[UserAlertMonitorLog]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[UserAlertMonitorLog] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_alert_monitor_log import UserAlertMonitorLog + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = UserAlertMonitorLog.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_alert_logs_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_alert_logs_response_200.additional_properties = d + return list_alert_logs_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_alerts_response_200.py b/python/fi/generated/openapi_client/models/list_alerts_response_200.py new file mode 100644 index 0000000..11ffc7c --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_alerts_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_alert_monitor import UserAlertMonitor + + +T = TypeVar("T", bound="ListAlertsResponse200") + + +@_attrs_define +class ListAlertsResponse200: + """ + Attributes: + count (int): + results (list[UserAlertMonitor]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[UserAlertMonitor] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_alert_monitor import UserAlertMonitor + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = UserAlertMonitor.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_alerts_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_alerts_response_200.additional_properties = d + return list_alerts_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_all_alert_logs_response_200.py b/python/fi/generated/openapi_client/models/list_all_alert_logs_response_200.py new file mode 100644 index 0000000..be7cda3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_all_alert_logs_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_alert_monitor_log import UserAlertMonitorLog + + +T = TypeVar("T", bound="ListAllAlertLogsResponse200") + + +@_attrs_define +class ListAllAlertLogsResponse200: + """ + Attributes: + count (int): + results (list[UserAlertMonitorLog]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[UserAlertMonitorLog] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_alert_monitor_log import UserAlertMonitorLog + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = UserAlertMonitorLog.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_all_alert_logs_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_all_alert_logs_response_200.additional_properties = d + return list_all_alert_logs_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_annotation_queue_items_ordering.py b/python/fi/generated/openapi_client/models/list_annotation_queue_items_ordering.py new file mode 100644 index 0000000..e0195cc --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_annotation_queue_items_ordering.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListAnnotationQueueItemsOrdering(str, Enum): + CREATED_AT = "created_at" + VALUE_1 = "-created_at" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_annotation_queue_items_response_200.py b/python/fi/generated/openapi_client/models/list_annotation_queue_items_response_200.py new file mode 100644 index 0000000..1c5378b --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_annotation_queue_items_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_item import QueueItem + + +T = TypeVar("T", bound="ListAnnotationQueueItemsResponse200") + + +@_attrs_define +class ListAnnotationQueueItemsResponse200: + """ + Attributes: + count (int): + results (list[QueueItem]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[QueueItem] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_item import QueueItem + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = QueueItem.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_annotation_queue_items_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_annotation_queue_items_response_200.additional_properties = d + return list_annotation_queue_items_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_annotation_queues_response_200.py b/python/fi/generated/openapi_client/models/list_annotation_queues_response_200.py new file mode 100644 index 0000000..7fb6b5c --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_annotation_queues_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotation_queue import AnnotationQueue + + +T = TypeVar("T", bound="ListAnnotationQueuesResponse200") + + +@_attrs_define +class ListAnnotationQueuesResponse200: + """ + Attributes: + count (int): + results (list[AnnotationQueue]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[AnnotationQueue] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_queue import AnnotationQueue + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = AnnotationQueue.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_annotation_queues_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_annotation_queues_response_200.additional_properties = d + return list_annotation_queues_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_error_feed_issues_sort_by.py b/python/fi/generated/openapi_client/models/list_error_feed_issues_sort_by.py new file mode 100644 index 0000000..ddfb958 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_error_feed_issues_sort_by.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ListErrorFeedIssuesSortBy(str, Enum): + ERROR_COUNT = "error_count" + FIRST_SEEN = "first_seen" + LAST_SEEN = "last_seen" + UNIQUE_TRACES = "unique_traces" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_error_feed_issues_sort_dir.py b/python/fi/generated/openapi_client/models/list_error_feed_issues_sort_dir.py new file mode 100644 index 0000000..66dc487 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_error_feed_issues_sort_dir.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListErrorFeedIssuesSortDir(str, Enum): + ASC = "asc" + DESC = "desc" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_error_feed_issues_source.py b/python/fi/generated/openapi_client/models/list_error_feed_issues_source.py new file mode 100644 index 0000000..3b7e64d --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_error_feed_issues_source.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListErrorFeedIssuesSource(str, Enum): + EVAL = "eval" + SCANNER = "scanner" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_error_feed_issues_status.py b/python/fi/generated/openapi_client/models/list_error_feed_issues_status.py new file mode 100644 index 0000000..8b11204 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_error_feed_issues_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ListErrorFeedIssuesStatus(str, Enum): + ACKNOWLEDGED = "acknowledged" + ESCALATING = "escalating" + FOR_REVIEW = "for_review" + RESOLVED = "resolved" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_experiments_response_200.py b/python/fi/generated/openapi_client/models/list_experiments_response_200.py new file mode 100644 index 0000000..6d51ffb --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_experiments_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.experiment_list_v2 import ExperimentListV2 + + +T = TypeVar("T", bound="ListExperimentsResponse200") + + +@_attrs_define +class ListExperimentsResponse200: + """ + Attributes: + count (int): + results (list[ExperimentListV2]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[ExperimentListV2] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.experiment_list_v2 import ExperimentListV2 + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = ExperimentListV2.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_experiments_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_experiments_response_200.additional_properties = d + return list_experiments_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_organization_members_filter_status_item.py b/python/fi/generated/openapi_client/models/list_organization_members_filter_status_item.py new file mode 100644 index 0000000..d6773a0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_organization_members_filter_status_item.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ListOrganizationMembersFilterStatusItem(str, Enum): + ACTIVE = "Active" + DEACTIVATED = "Deactivated" + EXPIRED = "Expired" + PENDING = "Pending" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_organization_members_sort.py b/python/fi/generated/openapi_client/models/list_organization_members_sort.py new file mode 100644 index 0000000..f8984f1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_organization_members_sort.py @@ -0,0 +1,21 @@ +from enum import Enum + + +class ListOrganizationMembersSort(str, Enum): + CREATED_AT = "created_at" + DATE_JOINED = "date_joined" + EMAIL = "email" + NAME = "name" + ORG_LEVEL = "org_level" + STATUS = "status" + TYPE = "type" + VALUE_1 = "-name" + VALUE_11 = "-created_at" + VALUE_13 = "-org_level" + VALUE_3 = "-email" + VALUE_5 = "-status" + VALUE_7 = "-type" + VALUE_9 = "-date_joined" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_personas_response_200.py b/python/fi/generated/openapi_client/models/list_personas_response_200.py new file mode 100644 index 0000000..1abb70d --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_personas_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona_list import PersonaList + + +T = TypeVar("T", bound="ListPersonasResponse200") + + +@_attrs_define +class ListPersonasResponse200: + """ + Attributes: + count (int): + results (list[PersonaList]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PersonaList] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona_list import PersonaList + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PersonaList.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_personas_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_personas_response_200.additional_properties = d + return list_personas_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_run_tests_simulation_type.py b/python/fi/generated/openapi_client/models/list_run_tests_simulation_type.py new file mode 100644 index 0000000..b472352 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_run_tests_simulation_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ListRunTestsSimulationType(str, Enum): + AGENT_DEFINITION = "agent_definition" + PROMPT = "prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_trace_projects_response_200.py b/python/fi/generated/openapi_client/models/list_trace_projects_response_200.py new file mode 100644 index 0000000..14f2988 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_trace_projects_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.project import Project + + +T = TypeVar("T", bound="ListTraceProjectsResponse200") + + +@_attrs_define +class ListTraceProjectsResponse200: + """ + Attributes: + count (int): + results (list[Project]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Project] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.project import Project + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Project.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_trace_projects_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_trace_projects_response_200.additional_properties = d + return list_trace_projects_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_trace_properties_response_200.py b/python/fi/generated/openapi_client/models/list_trace_properties_response_200.py new file mode 100644 index 0000000..e6aa655 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_trace_properties_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="ListTracePropertiesResponse200") + + +@_attrs_define +class ListTracePropertiesResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_trace_properties_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_trace_properties_response_200.additional_properties = d + return list_trace_properties_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_trace_sessions_response_200.py b/python/fi/generated/openapi_client/models/list_trace_sessions_response_200.py new file mode 100644 index 0000000..fbb2bb6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_trace_sessions_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_session import TraceSession + + +T = TypeVar("T", bound="ListTraceSessionsResponse200") + + +@_attrs_define +class ListTraceSessionsResponse200: + """ + Attributes: + count (int): + results (list[TraceSession]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[TraceSession] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_session import TraceSession + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = TraceSession.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_trace_sessions_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_trace_sessions_response_200.additional_properties = d + return list_trace_sessions_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_traces_response_200.py b/python/fi/generated/openapi_client/models/list_traces_response_200.py new file mode 100644 index 0000000..1b474b5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_traces_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="ListTracesResponse200") + + +@_attrs_define +class ListTracesResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_traces_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_traces_response_200.additional_properties = d + return list_traces_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_voice_calls_response_200.py b/python/fi/generated/openapi_client/models/list_voice_calls_response_200.py new file mode 100644 index 0000000..e1b8f65 --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_voice_calls_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="ListVoiceCallsResponse200") + + +@_attrs_define +class ListVoiceCallsResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + list_voice_calls_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + list_voice_calls_response_200.additional_properties = d + return list_voice_calls_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/list_workspace_members_filter_status_item.py b/python/fi/generated/openapi_client/models/list_workspace_members_filter_status_item.py new file mode 100644 index 0000000..3e633cc --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_workspace_members_filter_status_item.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ListWorkspaceMembersFilterStatusItem(str, Enum): + ACTIVE = "Active" + EXPIRED = "Expired" + PENDING = "Pending" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/list_workspace_members_sort.py b/python/fi/generated/openapi_client/models/list_workspace_members_sort.py new file mode 100644 index 0000000..b24961e --- /dev/null +++ b/python/fi/generated/openapi_client/models/list_workspace_members_sort.py @@ -0,0 +1,21 @@ +from enum import Enum + + +class ListWorkspaceMembersSort(str, Enum): + CREATED_AT = "created_at" + DATE_JOINED = "date_joined" + EMAIL = "email" + NAME = "name" + STATUS = "status" + TYPE = "type" + VALUE_1 = "-name" + VALUE_11 = "-created_at" + VALUE_13 = "-ws_level" + VALUE_3 = "-email" + VALUE_5 = "-status" + VALUE_7 = "-type" + VALUE_9 = "-date_joined" + WS_LEVEL = "ws_level" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/local_file_dataset_create_started_response.py b/python/fi/generated/openapi_client/models/local_file_dataset_create_started_response.py new file mode 100644 index 0000000..8e7a406 --- /dev/null +++ b/python/fi/generated/openapi_client/models/local_file_dataset_create_started_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.local_file_dataset_create_started_result import ( + LocalFileDatasetCreateStartedResult, + ) + + +T = TypeVar("T", bound="LocalFileDatasetCreateStartedResponse") + + +@_attrs_define +class LocalFileDatasetCreateStartedResponse: + """ + Attributes: + status (bool): + result (LocalFileDatasetCreateStartedResult): + """ + + status: bool + result: LocalFileDatasetCreateStartedResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.local_file_dataset_create_started_result import ( + LocalFileDatasetCreateStartedResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = LocalFileDatasetCreateStartedResult.from_dict(d.pop("result")) + + local_file_dataset_create_started_response = cls( + status=status, + result=result, + ) + + local_file_dataset_create_started_response.additional_properties = d + return local_file_dataset_create_started_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/local_file_dataset_create_started_result.py b/python/fi/generated/openapi_client/models/local_file_dataset_create_started_result.py new file mode 100644 index 0000000..ac39947 --- /dev/null +++ b/python/fi/generated/openapi_client/models/local_file_dataset_create_started_result.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LocalFileDatasetCreateStartedResult") + + +@_attrs_define +class LocalFileDatasetCreateStartedResult: + """ + Attributes: + message (str): + dataset_id (UUID): + dataset_name (str): + processing_status (str): + estimated_rows (int): + estimated_columns (int): + dataset_model_type (None | str | Unset): + """ + + message: str + dataset_id: UUID + dataset_name: str + processing_status: str + estimated_rows: int + estimated_columns: int + dataset_model_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + processing_status = self.processing_status + + estimated_rows = self.estimated_rows + + estimated_columns = self.estimated_columns + + dataset_model_type: None | str | Unset + if isinstance(self.dataset_model_type, Unset): + dataset_model_type = UNSET + else: + dataset_model_type = self.dataset_model_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "dataset_id": dataset_id, + "dataset_name": dataset_name, + "processing_status": processing_status, + "estimated_rows": estimated_rows, + "estimated_columns": estimated_columns, + } + ) + if dataset_model_type is not UNSET: + field_dict["dataset_model_type"] = dataset_model_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + dataset_id = UUID(d.pop("dataset_id")) + + dataset_name = d.pop("dataset_name") + + processing_status = d.pop("processing_status") + + estimated_rows = d.pop("estimated_rows") + + estimated_columns = d.pop("estimated_columns") + + def _parse_dataset_model_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dataset_model_type = _parse_dataset_model_type( + d.pop("dataset_model_type", UNSET) + ) + + local_file_dataset_create_started_result = cls( + message=message, + dataset_id=dataset_id, + dataset_name=dataset_name, + processing_status=processing_status, + estimated_rows=estimated_rows, + estimated_columns=estimated_columns, + dataset_model_type=dataset_model_type, + ) + + local_file_dataset_create_started_result.additional_properties = d + return local_file_dataset_create_started_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/management_api_error_response.py b/python/fi/generated/openapi_client/models/management_api_error_response.py new file mode 100644 index 0000000..0d70f1b --- /dev/null +++ b/python/fi/generated/openapi_client/models/management_api_error_response.py @@ -0,0 +1,224 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.management_api_error_response_type import ManagementAPIErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.management_api_error_response_details import ( + ManagementAPIErrorResponseDetails, + ) + + +T = TypeVar("T", bound="ManagementAPIErrorResponse") + + +@_attrs_define +class ManagementAPIErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (ManagementAPIErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ManagementAPIErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: ManagementAPIErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ManagementAPIErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.management_api_error_response_details import ( + ManagementAPIErrorResponseDetails, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ManagementAPIErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ManagementAPIErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ManagementAPIErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ManagementAPIErrorResponseDetails.from_dict(_details) + + management_api_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + management_api_error_response.additional_properties = d + return management_api_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/management_api_error_response_details.py b/python/fi/generated/openapi_client/models/management_api_error_response_details.py new file mode 100644 index 0000000..9b3d913 --- /dev/null +++ b/python/fi/generated/openapi_client/models/management_api_error_response_details.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ManagementAPIErrorResponseDetails") + + +@_attrs_define +class ManagementAPIErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + management_api_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + management_api_error_response_details.additional_properties = ( + additional_properties + ) + return management_api_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/management_api_error_response_type.py b/python/fi/generated/openapi_client/models/management_api_error_response_type.py new file mode 100644 index 0000000..1b03389 --- /dev/null +++ b/python/fi/generated/openapi_client/models/management_api_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ManagementAPIErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/manual_dataset_create_request.py b/python/fi/generated/openapi_client/models/manual_dataset_create_request.py new file mode 100644 index 0000000..2348677 --- /dev/null +++ b/python/fi/generated/openapi_client/models/manual_dataset_create_request.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ManualDatasetCreateRequest") + + +@_attrs_define +class ManualDatasetCreateRequest: + """ + Attributes: + dataset_name (str): + number_of_rows (int | Unset): Default: 1. + number_of_columns (int | Unset): Default: 1. + """ + + dataset_name: str + number_of_rows: int | Unset = 1 + number_of_columns: int | Unset = 1 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_name = self.dataset_name + + number_of_rows = self.number_of_rows + + number_of_columns = self.number_of_columns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_name": dataset_name, + } + ) + if number_of_rows is not UNSET: + field_dict["number_of_rows"] = number_of_rows + if number_of_columns is not UNSET: + field_dict["number_of_columns"] = number_of_columns + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_name = d.pop("dataset_name") + + number_of_rows = d.pop("number_of_rows", UNSET) + + number_of_columns = d.pop("number_of_columns", UNSET) + + manual_dataset_create_request = cls( + dataset_name=dataset_name, + number_of_rows=number_of_rows, + number_of_columns=number_of_columns, + ) + + manual_dataset_create_request.additional_properties = d + return manual_dataset_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/manual_dataset_create_response.py b/python/fi/generated/openapi_client/models/manual_dataset_create_response.py new file mode 100644 index 0000000..0c2e92d --- /dev/null +++ b/python/fi/generated/openapi_client/models/manual_dataset_create_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.manual_dataset_create_result import ManualDatasetCreateResult + + +T = TypeVar("T", bound="ManualDatasetCreateResponse") + + +@_attrs_define +class ManualDatasetCreateResponse: + """ + Attributes: + status (bool): + result (ManualDatasetCreateResult): + """ + + status: bool + result: ManualDatasetCreateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.manual_dataset_create_result import ManualDatasetCreateResult + + d = dict(src_dict) + status = d.pop("status") + + result = ManualDatasetCreateResult.from_dict(d.pop("result")) + + manual_dataset_create_response = cls( + status=status, + result=result, + ) + + manual_dataset_create_response.additional_properties = d + return manual_dataset_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/manual_dataset_create_result.py b/python/fi/generated/openapi_client/models/manual_dataset_create_result.py new file mode 100644 index 0000000..266a0ef --- /dev/null +++ b/python/fi/generated/openapi_client/models/manual_dataset_create_result.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ManualDatasetCreateResult") + + +@_attrs_define +class ManualDatasetCreateResult: + """ + Attributes: + message (str): + dataset_id (UUID): + rows_created (int): + columns_created (int): + """ + + message: str + dataset_id: UUID + rows_created: int + columns_created: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + dataset_id = str(self.dataset_id) + + rows_created = self.rows_created + + columns_created = self.columns_created + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "dataset_id": dataset_id, + "rows_created": rows_created, + "columns_created": columns_created, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + dataset_id = UUID(d.pop("dataset_id")) + + rows_created = d.pop("rows_created") + + columns_created = d.pop("columns_created") + + manual_dataset_create_result = cls( + message=message, + dataset_id=dataset_id, + rows_created=rows_created, + columns_created=columns_created, + ) + + manual_dataset_create_result.additional_properties = d + return manual_dataset_create_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_list_item.py b/python/fi/generated/openapi_client/models/member_list_item.py new file mode 100644 index 0000000..1c99732 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_list_item.py @@ -0,0 +1,221 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.member_list_item_type import MemberListItemType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.member_workspace_access import MemberWorkspaceAccess + + +T = TypeVar("T", bound="MemberListItem") + + +@_attrs_define +class MemberListItem: + """ + Attributes: + id (UUID): + name (str): + email (str): + status (str): + created_at (str): + type_ (MemberListItemType): + org_level (int | None | Unset): + org_role (None | str | Unset): + ws_level (int | None | Unset): + ws_role (None | str | Unset): + workspaces (list[MemberWorkspaceAccess] | Unset): + auto_access (bool | Unset): + """ + + id: UUID + name: str + email: str + status: str + created_at: str + type_: MemberListItemType + org_level: int | None | Unset = UNSET + org_role: None | str | Unset = UNSET + ws_level: int | None | Unset = UNSET + ws_role: None | str | Unset = UNSET + workspaces: list[MemberWorkspaceAccess] | Unset = UNSET + auto_access: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + email = self.email + + status = self.status + + created_at = self.created_at + + type_ = self.type_.value + + org_level: int | None | Unset + if isinstance(self.org_level, Unset): + org_level = UNSET + else: + org_level = self.org_level + + org_role: None | str | Unset + if isinstance(self.org_role, Unset): + org_role = UNSET + else: + org_role = self.org_role + + ws_level: int | None | Unset + if isinstance(self.ws_level, Unset): + ws_level = UNSET + else: + ws_level = self.ws_level + + ws_role: None | str | Unset + if isinstance(self.ws_role, Unset): + ws_role = UNSET + else: + ws_role = self.ws_role + + workspaces: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.workspaces, Unset): + workspaces = [] + for workspaces_item_data in self.workspaces: + workspaces_item = workspaces_item_data.to_dict() + workspaces.append(workspaces_item) + + auto_access = self.auto_access + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "email": email, + "status": status, + "created_at": created_at, + "type": type_, + } + ) + if org_level is not UNSET: + field_dict["org_level"] = org_level + if org_role is not UNSET: + field_dict["org_role"] = org_role + if ws_level is not UNSET: + field_dict["ws_level"] = ws_level + if ws_role is not UNSET: + field_dict["ws_role"] = ws_role + if workspaces is not UNSET: + field_dict["workspaces"] = workspaces + if auto_access is not UNSET: + field_dict["auto_access"] = auto_access + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.member_workspace_access import MemberWorkspaceAccess + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + email = d.pop("email") + + status = d.pop("status") + + created_at = d.pop("created_at") + + type_ = MemberListItemType(d.pop("type")) + + def _parse_org_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + org_level = _parse_org_level(d.pop("org_level", UNSET)) + + def _parse_org_role(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + org_role = _parse_org_role(d.pop("org_role", UNSET)) + + def _parse_ws_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + ws_level = _parse_ws_level(d.pop("ws_level", UNSET)) + + def _parse_ws_role(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ws_role = _parse_ws_role(d.pop("ws_role", UNSET)) + + _workspaces = d.pop("workspaces", UNSET) + workspaces: list[MemberWorkspaceAccess] | Unset = UNSET + if _workspaces is not UNSET: + workspaces = [] + for workspaces_item_data in _workspaces: + workspaces_item = MemberWorkspaceAccess.from_dict(workspaces_item_data) + + workspaces.append(workspaces_item) + + auto_access = d.pop("auto_access", UNSET) + + member_list_item = cls( + id=id, + name=name, + email=email, + status=status, + created_at=created_at, + type_=type_, + org_level=org_level, + org_role=org_role, + ws_level=ws_level, + ws_role=ws_role, + workspaces=workspaces, + auto_access=auto_access, + ) + + member_list_item.additional_properties = d + return member_list_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_list_item_type.py b/python/fi/generated/openapi_client/models/member_list_item_type.py new file mode 100644 index 0000000..a598182 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_list_item_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class MemberListItemType(str, Enum): + INVITE = "invite" + MEMBER = "member" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/member_list_response.py b/python/fi/generated/openapi_client/models/member_list_response.py new file mode 100644 index 0000000..8620be5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_list_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.member_list_result import MemberListResult + + +T = TypeVar("T", bound="MemberListResponse") + + +@_attrs_define +class MemberListResponse: + """ + Attributes: + status (bool): + result (MemberListResult): + """ + + status: bool + result: MemberListResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.member_list_result import MemberListResult + + d = dict(src_dict) + status = d.pop("status") + + result = MemberListResult.from_dict(d.pop("result")) + + member_list_response = cls( + status=status, + result=result, + ) + + member_list_response.additional_properties = d + return member_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_list_result.py b/python/fi/generated/openapi_client/models/member_list_result.py new file mode 100644 index 0000000..15c6e1e --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_list_result.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.member_list_item import MemberListItem + + +T = TypeVar("T", bound="MemberListResult") + + +@_attrs_define +class MemberListResult: + """ + Attributes: + results (list[MemberListItem]): + total (int): + page (int): + limit (int): + """ + + results: list[MemberListItem] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.member_list_item import MemberListItem + + d = dict(src_dict) + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = MemberListItem.from_dict(results_item_data) + + results.append(results_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + member_list_result = cls( + results=results, + total=total, + page=page, + limit=limit, + ) + + member_list_result.additional_properties = d + return member_list_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_remove.py b/python/fi/generated/openapi_client/models/member_remove.py new file mode 100644 index 0000000..2500d3a --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_remove.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MemberRemove") + + +@_attrs_define +class MemberRemove: + """ + Attributes: + user_id (UUID): + """ + + user_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = str(self.user_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_id": user_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_id = UUID(d.pop("user_id")) + + member_remove = cls( + user_id=user_id, + ) + + member_remove.additional_properties = d + return member_remove + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_role_update.py b/python/fi/generated/openapi_client/models/member_role_update.py new file mode 100644 index 0000000..343fd27 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_role_update.py @@ -0,0 +1,158 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.member_role_update_org_level import MemberRoleUpdateOrgLevel +from ..models.member_role_update_ws_level import MemberRoleUpdateWsLevel +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workspace_access_input import WorkspaceAccessInput + + +T = TypeVar("T", bound="MemberRoleUpdate") + + +@_attrs_define +class MemberRoleUpdate: + """ + Attributes: + user_id (UUID): + org_level (MemberRoleUpdateOrgLevel | Unset): + ws_level (MemberRoleUpdateWsLevel | Unset): + workspace_id (None | Unset | UUID): Required when updating ws_level. + workspace_access (list[WorkspaceAccessInput] | Unset): List of {workspace_id, level} for explicit workspace + grants on demotion. + """ + + user_id: UUID + org_level: MemberRoleUpdateOrgLevel | Unset = UNSET + ws_level: MemberRoleUpdateWsLevel | Unset = UNSET + workspace_id: None | Unset | UUID = UNSET + workspace_access: list[WorkspaceAccessInput] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = str(self.user_id) + + org_level: int | Unset = UNSET + if not isinstance(self.org_level, Unset): + org_level = self.org_level.value + + ws_level: int | Unset = UNSET + if not isinstance(self.ws_level, Unset): + ws_level = self.ws_level.value + + workspace_id: None | str | Unset + if isinstance(self.workspace_id, Unset): + workspace_id = UNSET + elif isinstance(self.workspace_id, UUID): + workspace_id = str(self.workspace_id) + else: + workspace_id = self.workspace_id + + workspace_access: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.workspace_access, Unset): + workspace_access = [] + for workspace_access_item_data in self.workspace_access: + workspace_access_item = workspace_access_item_data.to_dict() + workspace_access.append(workspace_access_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_id": user_id, + } + ) + if org_level is not UNSET: + field_dict["org_level"] = org_level + if ws_level is not UNSET: + field_dict["ws_level"] = ws_level + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + if workspace_access is not UNSET: + field_dict["workspace_access"] = workspace_access + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.workspace_access_input import WorkspaceAccessInput + + d = dict(src_dict) + user_id = UUID(d.pop("user_id")) + + _org_level = d.pop("org_level", UNSET) + org_level: MemberRoleUpdateOrgLevel | Unset + if isinstance(_org_level, Unset): + org_level = UNSET + else: + org_level = MemberRoleUpdateOrgLevel(_org_level) + + _ws_level = d.pop("ws_level", UNSET) + ws_level: MemberRoleUpdateWsLevel | Unset + if isinstance(_ws_level, Unset): + ws_level = UNSET + else: + ws_level = MemberRoleUpdateWsLevel(_ws_level) + + def _parse_workspace_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + workspace_id_type_0 = UUID(data) + + return workspace_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + workspace_id = _parse_workspace_id(d.pop("workspace_id", UNSET)) + + _workspace_access = d.pop("workspace_access", UNSET) + workspace_access: list[WorkspaceAccessInput] | Unset = UNSET + if _workspace_access is not UNSET: + workspace_access = [] + for workspace_access_item_data in _workspace_access: + workspace_access_item = WorkspaceAccessInput.from_dict( + workspace_access_item_data + ) + + workspace_access.append(workspace_access_item) + + member_role_update = cls( + user_id=user_id, + org_level=org_level, + ws_level=ws_level, + workspace_id=workspace_id, + workspace_access=workspace_access, + ) + + member_role_update.additional_properties = d + return member_role_update + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_role_update_org_level.py b/python/fi/generated/openapi_client/models/member_role_update_org_level.py new file mode 100644 index 0000000..849c0b2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_role_update_org_level.py @@ -0,0 +1,11 @@ +from enum import IntEnum + + +class MemberRoleUpdateOrgLevel(IntEnum): + VALUE_15 = 15 + VALUE_8 = 8 + VALUE_3 = 3 + VALUE_1 = 1 + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/member_role_update_response.py b/python/fi/generated/openapi_client/models/member_role_update_response.py new file mode 100644 index 0000000..915f166 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_role_update_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.member_role_update_result import MemberRoleUpdateResult + + +T = TypeVar("T", bound="MemberRoleUpdateResponse") + + +@_attrs_define +class MemberRoleUpdateResponse: + """ + Attributes: + status (bool): + result (MemberRoleUpdateResult): + """ + + status: bool + result: MemberRoleUpdateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.member_role_update_result import MemberRoleUpdateResult + + d = dict(src_dict) + status = d.pop("status") + + result = MemberRoleUpdateResult.from_dict(d.pop("result")) + + member_role_update_response = cls( + status=status, + result=result, + ) + + member_role_update_response.additional_properties = d + return member_role_update_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_role_update_result.py b/python/fi/generated/openapi_client/models/member_role_update_result.py new file mode 100644 index 0000000..ce89af2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_role_update_result.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.member_role_update_result_changes import MemberRoleUpdateResultChanges + + +T = TypeVar("T", bound="MemberRoleUpdateResult") + + +@_attrs_define +class MemberRoleUpdateResult: + """ + Attributes: + message (str): + changes (MemberRoleUpdateResultChanges): + """ + + message: str + changes: MemberRoleUpdateResultChanges + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + changes = self.changes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "changes": changes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.member_role_update_result_changes import ( + MemberRoleUpdateResultChanges, + ) + + d = dict(src_dict) + message = d.pop("message") + + changes = MemberRoleUpdateResultChanges.from_dict(d.pop("changes")) + + member_role_update_result = cls( + message=message, + changes=changes, + ) + + member_role_update_result.additional_properties = d + return member_role_update_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_role_update_result_changes.py b/python/fi/generated/openapi_client/models/member_role_update_result_changes.py new file mode 100644 index 0000000..6ea8c45 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_role_update_result_changes.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MemberRoleUpdateResultChanges") + + +@_attrs_define +class MemberRoleUpdateResultChanges: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + member_role_update_result_changes = cls() + + member_role_update_result_changes.additional_properties = d + return member_role_update_result_changes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_role_update_ws_level.py b/python/fi/generated/openapi_client/models/member_role_update_ws_level.py new file mode 100644 index 0000000..7cdb176 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_role_update_ws_level.py @@ -0,0 +1,10 @@ +from enum import IntEnum + + +class MemberRoleUpdateWsLevel(IntEnum): + VALUE_8 = 8 + VALUE_3 = 3 + VALUE_1 = 1 + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/member_user_mutation_response.py b/python/fi/generated/openapi_client/models/member_user_mutation_response.py new file mode 100644 index 0000000..205df99 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_user_mutation_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.member_user_mutation_result import MemberUserMutationResult + + +T = TypeVar("T", bound="MemberUserMutationResponse") + + +@_attrs_define +class MemberUserMutationResponse: + """ + Attributes: + status (bool): + result (MemberUserMutationResult): + """ + + status: bool + result: MemberUserMutationResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.member_user_mutation_result import MemberUserMutationResult + + d = dict(src_dict) + status = d.pop("status") + + result = MemberUserMutationResult.from_dict(d.pop("result")) + + member_user_mutation_response = cls( + status=status, + result=result, + ) + + member_user_mutation_response.additional_properties = d + return member_user_mutation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_user_mutation_result.py b/python/fi/generated/openapi_client/models/member_user_mutation_result.py new file mode 100644 index 0000000..99c0610 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_user_mutation_result.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MemberUserMutationResult") + + +@_attrs_define +class MemberUserMutationResult: + """ + Attributes: + message (str): + user_id (UUID): + """ + + message: str + user_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + user_id = str(self.user_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "user_id": user_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + user_id = UUID(d.pop("user_id")) + + member_user_mutation_result = cls( + message=message, + user_id=user_id, + ) + + member_user_mutation_result.additional_properties = d + return member_user_mutation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/member_workspace_access.py b/python/fi/generated/openapi_client/models/member_workspace_access.py new file mode 100644 index 0000000..e0b8ff9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/member_workspace_access.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MemberWorkspaceAccess") + + +@_attrs_define +class MemberWorkspaceAccess: + """ + Attributes: + workspace_id (UUID): + workspace_name (str): + ws_level (int): + ws_role (str): + auto_access (bool | Unset): + """ + + workspace_id: UUID + workspace_name: str + ws_level: int + ws_role: str + auto_access: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workspace_id = str(self.workspace_id) + + workspace_name = self.workspace_name + + ws_level = self.ws_level + + ws_role = self.ws_role + + auto_access = self.auto_access + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + "workspace_name": workspace_name, + "ws_level": ws_level, + "ws_role": ws_role, + } + ) + if auto_access is not UNSET: + field_dict["auto_access"] = auto_access + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workspace_id = UUID(d.pop("workspace_id")) + + workspace_name = d.pop("workspace_name") + + ws_level = d.pop("ws_level") + + ws_role = d.pop("ws_role") + + auto_access = d.pop("auto_access", UNSET) + + member_workspace_access = cls( + workspace_id=workspace_id, + workspace_name=workspace_name, + ws_level=ws_level, + ws_role=ws_role, + auto_access=auto_access, + ) + + member_workspace_access.additional_properties = d + return member_workspace_access + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/merge_dataset_request.py b/python/fi/generated/openapi_client/models/merge_dataset_request.py new file mode 100644 index 0000000..59acb06 --- /dev/null +++ b/python/fi/generated/openapi_client/models/merge_dataset_request.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MergeDatasetRequest") + + +@_attrs_define +class MergeDatasetRequest: + """ + Attributes: + target_dataset_id (UUID): + row_ids (list[UUID] | Unset): + selected_all_rows (bool | Unset): Default: False. + """ + + target_dataset_id: UUID + row_ids: list[UUID] | Unset = UNSET + selected_all_rows: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + target_dataset_id = str(self.target_dataset_id) + + row_ids: list[str] | Unset = UNSET + if not isinstance(self.row_ids, Unset): + row_ids = [] + for row_ids_item_data in self.row_ids: + row_ids_item = str(row_ids_item_data) + row_ids.append(row_ids_item) + + selected_all_rows = self.selected_all_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "target_dataset_id": target_dataset_id, + } + ) + if row_ids is not UNSET: + field_dict["row_ids"] = row_ids + if selected_all_rows is not UNSET: + field_dict["selected_all_rows"] = selected_all_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + target_dataset_id = UUID(d.pop("target_dataset_id")) + + _row_ids = d.pop("row_ids", UNSET) + row_ids: list[UUID] | Unset = UNSET + if _row_ids is not UNSET: + row_ids = [] + for row_ids_item_data in _row_ids: + row_ids_item = UUID(row_ids_item_data) + + row_ids.append(row_ids_item) + + selected_all_rows = d.pop("selected_all_rows", UNSET) + + merge_dataset_request = cls( + target_dataset_id=target_dataset_id, + row_ids=row_ids, + selected_all_rows=selected_all_rows, + ) + + merge_dataset_request.additional_properties = d + return merge_dataset_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/merge_dataset_response.py b/python/fi/generated/openapi_client/models/merge_dataset_response.py new file mode 100644 index 0000000..9f8e8fd --- /dev/null +++ b/python/fi/generated/openapi_client/models/merge_dataset_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.merge_dataset_result import MergeDatasetResult + + +T = TypeVar("T", bound="MergeDatasetResponse") + + +@_attrs_define +class MergeDatasetResponse: + """ + Attributes: + status (bool): + result (MergeDatasetResult): + """ + + status: bool + result: MergeDatasetResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.merge_dataset_result import MergeDatasetResult + + d = dict(src_dict) + status = d.pop("status") + + result = MergeDatasetResult.from_dict(d.pop("result")) + + merge_dataset_response = cls( + status=status, + result=result, + ) + + merge_dataset_response.additional_properties = d + return merge_dataset_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/merge_dataset_result.py b/python/fi/generated/openapi_client/models/merge_dataset_result.py new file mode 100644 index 0000000..2c9e347 --- /dev/null +++ b/python/fi/generated/openapi_client/models/merge_dataset_result.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MergeDatasetResult") + + +@_attrs_define +class MergeDatasetResult: + """ + Attributes: + message (str): + rows_added (int): + new_columns_created (int): + columns_mapped (int): + """ + + message: str + rows_added: int + new_columns_created: int + columns_mapped: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + rows_added = self.rows_added + + new_columns_created = self.new_columns_created + + columns_mapped = self.columns_mapped + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "rows_added": rows_added, + "new_columns_created": new_columns_created, + "columns_mapped": columns_mapped, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + rows_added = d.pop("rows_added") + + new_columns_created = d.pop("new_columns_created") + + columns_mapped = d.pop("columns_mapped") + + merge_dataset_result = cls( + message=message, + rows_added=rows_added, + new_columns_created=new_columns_created, + columns_mapped=columns_mapped, + ) + + merge_dataset_result.additional_properties = d + return merge_dataset_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_annotation_queues_automation_rules_list_response_200.py b/python/fi/generated/openapi_client/models/model_hub_annotation_queues_automation_rules_list_response_200.py new file mode 100644 index 0000000..20387de --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_annotation_queues_automation_rules_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.automation_rule import AutomationRule + + +T = TypeVar("T", bound="ModelHubAnnotationQueuesAutomationRulesListResponse200") + + +@_attrs_define +class ModelHubAnnotationQueuesAutomationRulesListResponse200: + """ + Attributes: + count (int): + results (list[AutomationRule]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[AutomationRule] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.automation_rule import AutomationRule + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = AutomationRule.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_annotation_queues_automation_rules_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_annotation_queues_automation_rules_list_response_200.additional_properties = d + return model_hub_annotation_queues_automation_rules_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_annotation_queues_for_source_source_type.py b/python/fi/generated/openapi_client/models/model_hub_annotation_queues_for_source_source_type.py new file mode 100644 index 0000000..6fd738c --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_annotation_queues_for_source_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ModelHubAnnotationQueuesForSourceSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/model_hub_annotations_labels_list_type.py b/python/fi/generated/openapi_client/models/model_hub_annotations_labels_list_type.py new file mode 100644 index 0000000..6759769 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_annotations_labels_list_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ModelHubAnnotationsLabelsListType(str, Enum): + CATEGORICAL = "categorical" + NUMERIC = "numeric" + STAR = "star" + TEXT = "text" + THUMBS_UP_DOWN = "thumbs_up_down" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/model_hub_api_keys_list_response_200.py b/python/fi/generated/openapi_client/models/model_hub_api_keys_list_response_200.py new file mode 100644 index 0000000..3051792 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_api_keys_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_key import ApiKey + + +T = TypeVar("T", bound="ModelHubApiKeysListResponse200") + + +@_attrs_define +class ModelHubApiKeysListResponse200: + """ + Attributes: + count (int): + results (list[ApiKey]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[ApiKey] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_key import ApiKey + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = ApiKey.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_api_keys_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_api_keys_list_response_200.additional_properties = d + return model_hub_api_keys_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_develops_get_eval_structure_read_eval_type.py b/python/fi/generated/openapi_client/models/model_hub_develops_get_eval_structure_read_eval_type.py new file mode 100644 index 0000000..099737b --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_develops_get_eval_structure_read_eval_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ModelHubDevelopsGetEvalStructureReadEvalType(str, Enum): + PRESET = "preset" + PREVIOUSLY_CONFIGURED = "previously_configured" + USER = "user" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/model_hub_empty_request.py b/python/fi/generated/openapi_client/models/model_hub_empty_request.py new file mode 100644 index 0000000..21d53fd --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_empty_request.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ModelHubEmptyRequest") + + +@_attrs_define +class ModelHubEmptyRequest: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + model_hub_empty_request = cls() + + model_hub_empty_request.additional_properties = d + return model_hub_empty_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_error_response.py b/python/fi/generated/openapi_client/models/model_hub_error_response.py new file mode 100644 index 0000000..966a98a --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_error_response.py @@ -0,0 +1,222 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.model_hub_error_response_type import ModelHubErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.model_hub_error_response_details import ModelHubErrorResponseDetails + + +T = TypeVar("T", bound="ModelHubErrorResponse") + + +@_attrs_define +class ModelHubErrorResponse: + """ + Attributes: + status (bool | Unset): + type_ (ModelHubErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ModelHubErrorResponseDetails | Unset): + """ + + status: bool | Unset = UNSET + type_: ModelHubErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ModelHubErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.model_hub_error_response_details import ( + ModelHubErrorResponseDetails, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ModelHubErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ModelHubErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ModelHubErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ModelHubErrorResponseDetails.from_dict(_details) + + model_hub_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + model_hub_error_response.additional_properties = d + return model_hub_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_error_response_details.py b/python/fi/generated/openapi_client/models/model_hub_error_response_details.py new file mode 100644 index 0000000..c845240 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ModelHubErrorResponseDetails") + + +@_attrs_define +class ModelHubErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + model_hub_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + model_hub_error_response_details.additional_properties = additional_properties + return model_hub_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_error_response_type.py b/python/fi/generated/openapi_client/models/model_hub_error_response_type.py new file mode 100644 index 0000000..e9f9721 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ModelHubErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/model_hub_paginated_response.py b/python/fi/generated/openapi_client/models/model_hub_paginated_response.py new file mode 100644 index 0000000..f6c5884 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_paginated_response.py @@ -0,0 +1,131 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.model_hub_paginated_response_results_item import ( + ModelHubPaginatedResponseResultsItem, + ) + + +T = TypeVar("T", bound="ModelHubPaginatedResponse") + + +@_attrs_define +class ModelHubPaginatedResponse: + """ + Attributes: + count (int): + results (list[ModelHubPaginatedResponseResultsItem]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[ModelHubPaginatedResponseResultsItem] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.model_hub_paginated_response_results_item import ( + ModelHubPaginatedResponseResultsItem, + ) + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = ModelHubPaginatedResponseResultsItem.from_dict( + results_item_data + ) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_paginated_response = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_paginated_response.additional_properties = d + return model_hub_paginated_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_paginated_response_results_item.py b/python/fi/generated/openapi_client/models/model_hub_paginated_response_results_item.py new file mode 100644 index 0000000..4006da2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_paginated_response_results_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ModelHubPaginatedResponseResultsItem") + + +@_attrs_define +class ModelHubPaginatedResponseResultsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + model_hub_paginated_response_results_item = cls() + + model_hub_paginated_response_results_item.additional_properties = d + return model_hub_paginated_response_results_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_get_execution_details_response_200.py b/python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_get_execution_details_response_200.py new file mode 100644 index 0000000..2dbf0ca --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_get_execution_details_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_history_execution import PromptHistoryExecution + + +T = TypeVar("T", bound="ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200") + + +@_attrs_define +class ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse200: + """ + Attributes: + count (int): + results (list[PromptHistoryExecution]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PromptHistoryExecution] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_history_execution import PromptHistoryExecution + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PromptHistoryExecution.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_prompt_history_executions_get_execution_details_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_prompt_history_executions_get_execution_details_response_200.additional_properties = d + return model_hub_prompt_history_executions_get_execution_details_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_list_response_200.py b/python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_list_response_200.py new file mode 100644 index 0000000..991da16 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_prompt_history_executions_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_history_execution import PromptHistoryExecution + + +T = TypeVar("T", bound="ModelHubPromptHistoryExecutionsListResponse200") + + +@_attrs_define +class ModelHubPromptHistoryExecutionsListResponse200: + """ + Attributes: + count (int): + results (list[PromptHistoryExecution]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PromptHistoryExecution] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_history_execution import PromptHistoryExecution + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PromptHistoryExecution.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_prompt_history_executions_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_prompt_history_executions_list_response_200.additional_properties = d + return model_hub_prompt_history_executions_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_prompt_labels_get_by_name_response_200.py b/python/fi/generated/openapi_client/models/model_hub_prompt_labels_get_by_name_response_200.py new file mode 100644 index 0000000..ae88f06 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_prompt_labels_get_by_name_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_label import PromptLabel + + +T = TypeVar("T", bound="ModelHubPromptLabelsGetByNameResponse200") + + +@_attrs_define +class ModelHubPromptLabelsGetByNameResponse200: + """ + Attributes: + count (int): + results (list[PromptLabel]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PromptLabel] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_label import PromptLabel + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PromptLabel.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_prompt_labels_get_by_name_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_prompt_labels_get_by_name_response_200.additional_properties = d + return model_hub_prompt_labels_get_by_name_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_prompt_labels_list_response_200.py b/python/fi/generated/openapi_client/models/model_hub_prompt_labels_list_response_200.py new file mode 100644 index 0000000..c6fbeeb --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_prompt_labels_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_label import PromptLabel + + +T = TypeVar("T", bound="ModelHubPromptLabelsListResponse200") + + +@_attrs_define +class ModelHubPromptLabelsListResponse200: + """ + Attributes: + count (int): + results (list[PromptLabel]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PromptLabel] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_label import PromptLabel + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PromptLabel.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_prompt_labels_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_prompt_labels_list_response_200.additional_properties = d + return model_hub_prompt_labels_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_prompt_labels_template_labels_response_200.py b/python/fi/generated/openapi_client/models/model_hub_prompt_labels_template_labels_response_200.py new file mode 100644 index 0000000..d02ddfb --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_prompt_labels_template_labels_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_label import PromptLabel + + +T = TypeVar("T", bound="ModelHubPromptLabelsTemplateLabelsResponse200") + + +@_attrs_define +class ModelHubPromptLabelsTemplateLabelsResponse200: + """ + Attributes: + count (int): + results (list[PromptLabel]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PromptLabel] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_label import PromptLabel + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PromptLabel.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_prompt_labels_template_labels_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_prompt_labels_template_labels_response_200.additional_properties = d + return model_hub_prompt_labels_template_labels_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_prompt_templates_get_template_by_name_response_200.py b/python/fi/generated/openapi_client/models/model_hub_prompt_templates_get_template_by_name_response_200.py new file mode 100644 index 0000000..08dfc1d --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_prompt_templates_get_template_by_name_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_template import PromptTemplate + + +T = TypeVar("T", bound="ModelHubPromptTemplatesGetTemplateByNameResponse200") + + +@_attrs_define +class ModelHubPromptTemplatesGetTemplateByNameResponse200: + """ + Attributes: + count (int): + results (list[PromptTemplate]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PromptTemplate] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_template import PromptTemplate + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PromptTemplate.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_prompt_templates_get_template_by_name_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_prompt_templates_get_template_by_name_response_200.additional_properties = d + return model_hub_prompt_templates_get_template_by_name_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_prompt_templates_list_response_200.py b/python/fi/generated/openapi_client/models/model_hub_prompt_templates_list_response_200.py new file mode 100644 index 0000000..3b2563a --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_prompt_templates_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_template import PromptTemplate + + +T = TypeVar("T", bound="ModelHubPromptTemplatesListResponse200") + + +@_attrs_define +class ModelHubPromptTemplatesListResponse200: + """ + Attributes: + count (int): + results (list[PromptTemplate]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PromptTemplate] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_template import PromptTemplate + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PromptTemplate.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_prompt_templates_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_prompt_templates_list_response_200.additional_properties = d + return model_hub_prompt_templates_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_scores_for_source_source_type.py b/python/fi/generated/openapi_client/models/model_hub_scores_for_source_source_type.py new file mode 100644 index 0000000..12c9f3d --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_scores_for_source_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ModelHubScoresForSourceSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/model_hub_scores_list_response_200.py b/python/fi/generated/openapi_client/models/model_hub_scores_list_response_200.py new file mode 100644 index 0000000..c419297 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_scores_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.score import Score + + +T = TypeVar("T", bound="ModelHubScoresListResponse200") + + +@_attrs_define +class ModelHubScoresListResponse200: + """ + Attributes: + count (int): + results (list[Score]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Score] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.score import Score + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Score.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + model_hub_scores_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + model_hub_scores_list_response_200.additional_properties = d + return model_hub_scores_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_scores_list_source_type.py b/python/fi/generated/openapi_client/models/model_hub_scores_list_source_type.py new file mode 100644 index 0000000..56c6d69 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_scores_list_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ModelHubScoresListSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/model_hub_string_result_response.py b/python/fi/generated/openapi_client/models/model_hub_string_result_response.py new file mode 100644 index 0000000..d2c4a87 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_string_result_response.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ModelHubStringResultResponse") + + +@_attrs_define +class ModelHubStringResultResponse: + """ + Attributes: + status (bool): + result (str): + """ + + status: bool + result: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = d.pop("status") + + result = d.pop("result") + + model_hub_string_result_response = cls( + status=status, + result=result, + ) + + model_hub_string_result_response.additional_properties = d + return model_hub_string_result_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_text_error_response.py b/python/fi/generated/openapi_client/models/model_hub_text_error_response.py new file mode 100644 index 0000000..3f5b20f --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_text_error_response.py @@ -0,0 +1,224 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.model_hub_text_error_response_type import ModelHubTextErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.model_hub_text_error_response_details import ( + ModelHubTextErrorResponseDetails, + ) + + +T = TypeVar("T", bound="ModelHubTextErrorResponse") + + +@_attrs_define +class ModelHubTextErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (ModelHubTextErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ModelHubTextErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: ModelHubTextErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ModelHubTextErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.model_hub_text_error_response_details import ( + ModelHubTextErrorResponseDetails, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ModelHubTextErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ModelHubTextErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ModelHubTextErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ModelHubTextErrorResponseDetails.from_dict(_details) + + model_hub_text_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + model_hub_text_error_response.additional_properties = d + return model_hub_text_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_text_error_response_details.py b/python/fi/generated/openapi_client/models/model_hub_text_error_response_details.py new file mode 100644 index 0000000..d0f8641 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_text_error_response_details.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ModelHubTextErrorResponseDetails") + + +@_attrs_define +class ModelHubTextErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + model_hub_text_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + model_hub_text_error_response_details.additional_properties = ( + additional_properties + ) + return model_hub_text_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/model_hub_text_error_response_type.py b/python/fi/generated/openapi_client/models/model_hub_text_error_response_type.py new file mode 100644 index 0000000..c70b817 --- /dev/null +++ b/python/fi/generated/openapi_client/models/model_hub_text_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ModelHubTextErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_point.py b/python/fi/generated/openapi_client/models/observe_graph_data_point.py new file mode 100644 index 0000000..69f2c16 --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_point.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ObserveGraphDataPoint") + + +@_attrs_define +class ObserveGraphDataPoint: + """ + Attributes: + timestamp (str): + value (float | None): + primary_traffic (float | None | Unset): + """ + + timestamp: str + value: float | None + primary_traffic: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + timestamp = self.timestamp + + value: float | None + value = self.value + + primary_traffic: float | None | Unset + if isinstance(self.primary_traffic, Unset): + primary_traffic = UNSET + else: + primary_traffic = self.primary_traffic + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "timestamp": timestamp, + "value": value, + } + ) + if primary_traffic is not UNSET: + field_dict["primary_traffic"] = primary_traffic + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + timestamp = d.pop("timestamp") + + def _parse_value(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + value = _parse_value(d.pop("value")) + + def _parse_primary_traffic(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + primary_traffic = _parse_primary_traffic(d.pop("primary_traffic", UNSET)) + + observe_graph_data_point = cls( + timestamp=timestamp, + value=value, + primary_traffic=primary_traffic, + ) + + observe_graph_data_point.additional_properties = d + return observe_graph_data_point + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_request.py b/python/fi/generated/openapi_client/models/observe_graph_data_request.py new file mode 100644 index 0000000..539f83a --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_request.py @@ -0,0 +1,141 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.observe_graph_data_request_interval import ObserveGraphDataRequestInterval +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.observe_graph_data_request_filters_item import ( + ObserveGraphDataRequestFiltersItem, + ) + from ..models.observe_graph_data_request_req_data_config import ( + ObserveGraphDataRequestReqDataConfig, + ) + + +T = TypeVar("T", bound="ObserveGraphDataRequest") + + +@_attrs_define +class ObserveGraphDataRequest: + """ + Attributes: + project_id (UUID): + req_data_config (ObserveGraphDataRequestReqDataConfig): + filters (list[ObserveGraphDataRequestFiltersItem] | Unset): + interval (ObserveGraphDataRequestInterval | Unset): Default: ObserveGraphDataRequestInterval.DAY. + property_ (str | Unset): Default: 'average'. + """ + + project_id: UUID + req_data_config: ObserveGraphDataRequestReqDataConfig + filters: list[ObserveGraphDataRequestFiltersItem] | Unset = UNSET + interval: ObserveGraphDataRequestInterval | Unset = ( + ObserveGraphDataRequestInterval.DAY + ) + property_: str | Unset = "average" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project_id = str(self.project_id) + + req_data_config = self.req_data_config.to_dict() + + filters: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = [] + for filters_item_data in self.filters: + filters_item = filters_item_data.to_dict() + filters.append(filters_item) + + interval: str | Unset = UNSET + if not isinstance(self.interval, Unset): + interval = self.interval.value + + property_ = self.property_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "project_id": project_id, + "req_data_config": req_data_config, + } + ) + if filters is not UNSET: + field_dict["filters"] = filters + if interval is not UNSET: + field_dict["interval"] = interval + if property_ is not UNSET: + field_dict["property"] = property_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.observe_graph_data_request_filters_item import ( + ObserveGraphDataRequestFiltersItem, + ) + from ..models.observe_graph_data_request_req_data_config import ( + ObserveGraphDataRequestReqDataConfig, + ) + + d = dict(src_dict) + project_id = UUID(d.pop("project_id")) + + req_data_config = ObserveGraphDataRequestReqDataConfig.from_dict( + d.pop("req_data_config") + ) + + _filters = d.pop("filters", UNSET) + filters: list[ObserveGraphDataRequestFiltersItem] | Unset = UNSET + if _filters is not UNSET: + filters = [] + for filters_item_data in _filters: + filters_item = ObserveGraphDataRequestFiltersItem.from_dict( + filters_item_data + ) + + filters.append(filters_item) + + _interval = d.pop("interval", UNSET) + interval: ObserveGraphDataRequestInterval | Unset + if isinstance(_interval, Unset): + interval = UNSET + else: + interval = ObserveGraphDataRequestInterval(_interval) + + property_ = d.pop("property", UNSET) + + observe_graph_data_request = cls( + project_id=project_id, + req_data_config=req_data_config, + filters=filters, + interval=interval, + property_=property_, + ) + + observe_graph_data_request.additional_properties = d + return observe_graph_data_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item.py b/python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item.py new file mode 100644 index 0000000..d45715d --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.observe_graph_data_request_filters_item_filter_config import ( + ObserveGraphDataRequestFiltersItemFilterConfig, + ) + + +T = TypeVar("T", bound="ObserveGraphDataRequestFiltersItem") + + +@_attrs_define +class ObserveGraphDataRequestFiltersItem: + """ + Attributes: + column_id (str): Column or attribute id to filter on. + filter_config (ObserveGraphDataRequestFiltersItemFilterConfig): + display_name (str | Unset): Optional UI label for chips and saved views. + source (str | Unset): Optional source surface for mixed-source filters, for example traces, datasets, or + simulation. + output_type (str | Unset): Optional metric output type metadata used by eval and annotation filters. + """ + + column_id: str + filter_config: ObserveGraphDataRequestFiltersItemFilterConfig + display_name: str | Unset = UNSET + source: str | Unset = UNSET + output_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + filter_config = self.filter_config.to_dict() + + display_name = self.display_name + + source = self.source + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + "filter_config": filter_config, + } + ) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if source is not UNSET: + field_dict["source"] = source + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.observe_graph_data_request_filters_item_filter_config import ( + ObserveGraphDataRequestFiltersItemFilterConfig, + ) + + d = dict(src_dict) + column_id = d.pop("column_id") + + filter_config = ObserveGraphDataRequestFiltersItemFilterConfig.from_dict( + d.pop("filter_config") + ) + + display_name = d.pop("display_name", UNSET) + + source = d.pop("source", UNSET) + + output_type = d.pop("output_type", UNSET) + + observe_graph_data_request_filters_item = cls( + column_id=column_id, + filter_config=filter_config, + display_name=display_name, + source=source, + output_type=output_type, + ) + + return observe_graph_data_request_filters_item diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item_filter_config.py b/python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item_filter_config.py new file mode 100644 index 0000000..e086a07 --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_request_filters_item_filter_config.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ObserveGraphDataRequestFiltersItemFilterConfig") + + +@_attrs_define +class ObserveGraphDataRequestFiltersItemFilterConfig: + """ + Attributes: + filter_type (str): Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, + annotator, or array. + filter_op (str): Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, + not_in, between, not_between, is_null, or is_not_null. + filter_value (Any | Unset): Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + col_type (str | Unset): Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + """ + + filter_type: str + filter_op: str + filter_value: Any | Unset = UNSET + col_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + filter_type = self.filter_type + + filter_op = self.filter_op + + filter_value = self.filter_value + + col_type = self.col_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "filter_type": filter_type, + "filter_op": filter_op, + } + ) + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + if col_type is not UNSET: + field_dict["col_type"] = col_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + filter_type = d.pop("filter_type") + + filter_op = d.pop("filter_op") + + filter_value = d.pop("filter_value", UNSET) + + col_type = d.pop("col_type", UNSET) + + observe_graph_data_request_filters_item_filter_config = cls( + filter_type=filter_type, + filter_op=filter_op, + filter_value=filter_value, + col_type=col_type, + ) + + return observe_graph_data_request_filters_item_filter_config diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_request_interval.py b/python/fi/generated/openapi_client/models/observe_graph_data_request_interval.py new file mode 100644 index 0000000..dc1e580 --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_request_interval.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ObserveGraphDataRequestInterval(str, Enum): + DAY = "day" + HOUR = "hour" + MONTH = "month" + WEEK = "week" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config.py b/python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config.py new file mode 100644 index 0000000..158241b --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.observe_graph_data_request_req_data_config_type import ( + ObserveGraphDataRequestReqDataConfigType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ObserveGraphDataRequestReqDataConfig") + + +@_attrs_define +class ObserveGraphDataRequestReqDataConfig: + """ + Attributes: + id (str): + type_ (ObserveGraphDataRequestReqDataConfigType): + output_type (str | Unset): + eval_output_type (str | Unset): + choices (list[str] | Unset): + value (Any | Unset): + filter_op (str | Unset): + filter_value (Any | Unset): + """ + + id: str + type_: ObserveGraphDataRequestReqDataConfigType + output_type: str | Unset = UNSET + eval_output_type: str | Unset = UNSET + choices: list[str] | Unset = UNSET + value: Any | Unset = UNSET + filter_op: str | Unset = UNSET + filter_value: Any | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_ = self.type_.value + + output_type = self.output_type + + eval_output_type = self.eval_output_type + + choices: list[str] | Unset = UNSET + if not isinstance(self.choices, Unset): + choices = self.choices + + value = self.value + + filter_op = self.filter_op + + filter_value = self.filter_value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "id": id, + "type": type_, + } + ) + if output_type is not UNSET: + field_dict["output_type"] = output_type + if eval_output_type is not UNSET: + field_dict["eval_output_type"] = eval_output_type + if choices is not UNSET: + field_dict["choices"] = choices + if value is not UNSET: + field_dict["value"] = value + if filter_op is not UNSET: + field_dict["filter_op"] = filter_op + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + type_ = ObserveGraphDataRequestReqDataConfigType(d.pop("type")) + + output_type = d.pop("output_type", UNSET) + + eval_output_type = d.pop("eval_output_type", UNSET) + + choices = cast(list[str], d.pop("choices", UNSET)) + + value = d.pop("value", UNSET) + + filter_op = d.pop("filter_op", UNSET) + + filter_value = d.pop("filter_value", UNSET) + + observe_graph_data_request_req_data_config = cls( + id=id, + type_=type_, + output_type=output_type, + eval_output_type=eval_output_type, + choices=choices, + value=value, + filter_op=filter_op, + filter_value=filter_value, + ) + + return observe_graph_data_request_req_data_config diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config_type.py b/python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config_type.py new file mode 100644 index 0000000..d4c8a33 --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_request_req_data_config_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ObserveGraphDataRequestReqDataConfigType(str, Enum): + ANNOTATION = "ANNOTATION" + EVAL = "EVAL" + SYSTEM_METRIC = "SYSTEM_METRIC" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_response.py b/python/fi/generated/openapi_client/models/observe_graph_data_response.py new file mode 100644 index 0000000..cc180ba --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.observe_graph_data_result import ObserveGraphDataResult + + +T = TypeVar("T", bound="ObserveGraphDataResponse") + + +@_attrs_define +class ObserveGraphDataResponse: + """ + Attributes: + result (ObserveGraphDataResult): + status (bool | Unset): Default: True. + """ + + result: ObserveGraphDataResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.observe_graph_data_result import ObserveGraphDataResult + + d = dict(src_dict) + result = ObserveGraphDataResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + observe_graph_data_response = cls( + result=result, + status=status, + ) + + observe_graph_data_response.additional_properties = d + return observe_graph_data_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/observe_graph_data_result.py b/python/fi/generated/openapi_client/models/observe_graph_data_result.py new file mode 100644 index 0000000..2b651c6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/observe_graph_data_result.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.observe_graph_data_point import ObserveGraphDataPoint + + +T = TypeVar("T", bound="ObserveGraphDataResult") + + +@_attrs_define +class ObserveGraphDataResult: + """ + Attributes: + metric_name (str): + data (list[ObserveGraphDataPoint]): + """ + + metric_name: str + data: list[ObserveGraphDataPoint] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + metric_name = self.metric_name + + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "metric_name": metric_name, + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.observe_graph_data_point import ObserveGraphDataPoint + + d = dict(src_dict) + metric_name = d.pop("metric_name") + + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = ObserveGraphDataPoint.from_dict(data_item_data) + + data.append(data_item) + + observe_graph_data_result = cls( + metric_name=metric_name, + data=data, + ) + + observe_graph_data_result.additional_properties = d + return observe_graph_data_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/optimiser_analysis_refresh_response.py b/python/fi/generated/openapi_client/models/optimiser_analysis_refresh_response.py new file mode 100644 index 0000000..ae4d69b --- /dev/null +++ b/python/fi/generated/openapi_client/models/optimiser_analysis_refresh_response.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.optimiser_analysis_refresh_result import ( + OptimiserAnalysisRefreshResult, + ) + + +T = TypeVar("T", bound="OptimiserAnalysisRefreshResponse") + + +@_attrs_define +class OptimiserAnalysisRefreshResponse: + """ + Attributes: + result (OptimiserAnalysisRefreshResult): + status (bool | Unset): Default: True. + """ + + result: OptimiserAnalysisRefreshResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.optimiser_analysis_refresh_result import ( + OptimiserAnalysisRefreshResult, + ) + + d = dict(src_dict) + result = OptimiserAnalysisRefreshResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + optimiser_analysis_refresh_response = cls( + result=result, + status=status, + ) + + optimiser_analysis_refresh_response.additional_properties = d + return optimiser_analysis_refresh_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/optimiser_analysis_refresh_result.py b/python/fi/generated/openapi_client/models/optimiser_analysis_refresh_result.py new file mode 100644 index 0000000..4728e96 --- /dev/null +++ b/python/fi/generated/openapi_client/models/optimiser_analysis_refresh_result.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="OptimiserAnalysisRefreshResult") + + +@_attrs_define +class OptimiserAnalysisRefreshResult: + """ + Attributes: + message (str): + status (str): + """ + + message: str + status: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + status = d.pop("status") + + optimiser_analysis_refresh_result = cls( + message=message, + status=status, + ) + + optimiser_analysis_refresh_result.additional_properties = d + return optimiser_analysis_refresh_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/optimiser_analysis_response.py b/python/fi/generated/openapi_client/models/optimiser_analysis_response.py new file mode 100644 index 0000000..7bf51f0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/optimiser_analysis_response.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.optimiser_analysis_result_payload import ( + OptimiserAnalysisResultPayload, + ) + + +T = TypeVar("T", bound="OptimiserAnalysisResponse") + + +@_attrs_define +class OptimiserAnalysisResponse: + """ + Attributes: + result (OptimiserAnalysisResultPayload): + status (bool | Unset): Default: True. + """ + + result: OptimiserAnalysisResultPayload + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.optimiser_analysis_result_payload import ( + OptimiserAnalysisResultPayload, + ) + + d = dict(src_dict) + result = OptimiserAnalysisResultPayload.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + optimiser_analysis_response = cls( + result=result, + status=status, + ) + + optimiser_analysis_response.additional_properties = d + return optimiser_analysis_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload.py b/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload.py new file mode 100644 index 0000000..1ee4bd4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.optimiser_analysis_result_payload_response import ( + OptimiserAnalysisResultPayloadResponse, + ) + + +T = TypeVar("T", bound="OptimiserAnalysisResultPayload") + + +@_attrs_define +class OptimiserAnalysisResultPayload: + """ + Attributes: + response (OptimiserAnalysisResultPayloadResponse): + status (str): + last_updated (datetime.datetime | Unset): + message (str | Unset): + """ + + response: OptimiserAnalysisResultPayloadResponse + status: str + last_updated: datetime.datetime | Unset = UNSET + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + response = self.response.to_dict() + + status = self.status + + last_updated: str | Unset = UNSET + if not isinstance(self.last_updated, Unset): + last_updated = self.last_updated.isoformat() + + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "response": response, + "status": status, + } + ) + if last_updated is not UNSET: + field_dict["last_updated"] = last_updated + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.optimiser_analysis_result_payload_response import ( + OptimiserAnalysisResultPayloadResponse, + ) + + d = dict(src_dict) + response = OptimiserAnalysisResultPayloadResponse.from_dict(d.pop("response")) + + status = d.pop("status") + + _last_updated = d.pop("last_updated", UNSET) + last_updated: datetime.datetime | Unset + if isinstance(_last_updated, Unset): + last_updated = UNSET + else: + last_updated = isoparse(_last_updated) + + message = d.pop("message", UNSET) + + optimiser_analysis_result_payload = cls( + response=response, + status=status, + last_updated=last_updated, + message=message, + ) + + optimiser_analysis_result_payload.additional_properties = d + return optimiser_analysis_result_payload + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response.py b/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response.py new file mode 100644 index 0000000..33aa837 --- /dev/null +++ b/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.optimiser_analysis_result_payload_response_additional_property import ( + OptimiserAnalysisResultPayloadResponseAdditionalProperty, + ) + + +T = TypeVar("T", bound="OptimiserAnalysisResultPayloadResponse") + + +@_attrs_define +class OptimiserAnalysisResultPayloadResponse: + """ """ + + additional_properties: dict[ + str, OptimiserAnalysisResultPayloadResponseAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.optimiser_analysis_result_payload_response_additional_property import ( + OptimiserAnalysisResultPayloadResponseAdditionalProperty, + ) + + d = dict(src_dict) + optimiser_analysis_result_payload_response = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + OptimiserAnalysisResultPayloadResponseAdditionalProperty.from_dict( + prop_dict + ) + ) + + additional_properties[prop_name] = additional_property + + optimiser_analysis_result_payload_response.additional_properties = ( + additional_properties + ) + return optimiser_analysis_result_payload_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> OptimiserAnalysisResultPayloadResponseAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: OptimiserAnalysisResultPayloadResponseAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response_additional_property.py b/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response_additional_property.py new file mode 100644 index 0000000..2ba6fd5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/optimiser_analysis_result_payload_response_additional_property.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="OptimiserAnalysisResultPayloadResponseAdditionalProperty") + + +@_attrs_define +class OptimiserAnalysisResultPayloadResponseAdditionalProperty: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + optimiser_analysis_result_payload_response_additional_property = cls() + + optimiser_analysis_result_payload_response_additional_property.additional_properties = d + return optimiser_analysis_result_payload_response_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/organization.py b/python/fi/generated/openapi_client/models/organization.py new file mode 100644 index 0000000..3892013 --- /dev/null +++ b/python/fi/generated/openapi_client/models/organization.py @@ -0,0 +1,186 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Organization") + + +@_attrs_define +class Organization: + """ + Attributes: + name (str): + id (UUID | Unset): + created_at (datetime.datetime | Unset): + display_name (str | Unset): + is_new (bool | Unset): + ws_enabled (bool | Unset): + region (str | Unset): + require_2fa (bool | Unset): + require_2fa_grace_period_days (int | Unset): + require_2fa_enforced_at (datetime.datetime | None | Unset): + """ + + name: str + id: UUID | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + display_name: str | Unset = UNSET + is_new: bool | Unset = UNSET + ws_enabled: bool | Unset = UNSET + region: str | Unset = UNSET + require_2fa: bool | Unset = UNSET + require_2fa_grace_period_days: int | Unset = UNSET + require_2fa_enforced_at: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + display_name = self.display_name + + is_new = self.is_new + + ws_enabled = self.ws_enabled + + region = self.region + + require_2fa = self.require_2fa + + require_2fa_grace_period_days = self.require_2fa_grace_period_days + + require_2fa_enforced_at: None | str | Unset + if isinstance(self.require_2fa_enforced_at, Unset): + require_2fa_enforced_at = UNSET + elif isinstance(self.require_2fa_enforced_at, datetime.datetime): + require_2fa_enforced_at = self.require_2fa_enforced_at.isoformat() + else: + require_2fa_enforced_at = self.require_2fa_enforced_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if id is not UNSET: + field_dict["id"] = id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if display_name is not UNSET: + field_dict["display_name"] = display_name + if is_new is not UNSET: + field_dict["is_new"] = is_new + if ws_enabled is not UNSET: + field_dict["ws_enabled"] = ws_enabled + if region is not UNSET: + field_dict["region"] = region + if require_2fa is not UNSET: + field_dict["require_2fa"] = require_2fa + if require_2fa_grace_period_days is not UNSET: + field_dict["require_2fa_grace_period_days"] = require_2fa_grace_period_days + if require_2fa_enforced_at is not UNSET: + field_dict["require_2fa_enforced_at"] = require_2fa_enforced_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + display_name = d.pop("display_name", UNSET) + + is_new = d.pop("is_new", UNSET) + + ws_enabled = d.pop("ws_enabled", UNSET) + + region = d.pop("region", UNSET) + + require_2fa = d.pop("require_2fa", UNSET) + + require_2fa_grace_period_days = d.pop("require_2fa_grace_period_days", UNSET) + + def _parse_require_2fa_enforced_at( + data: object, + ) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + require_2fa_enforced_at_type_0 = isoparse(data) + + return require_2fa_enforced_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + require_2fa_enforced_at = _parse_require_2fa_enforced_at( + d.pop("require_2fa_enforced_at", UNSET) + ) + + organization = cls( + name=name, + id=id, + created_at=created_at, + display_name=display_name, + is_new=is_new, + ws_enabled=ws_enabled, + region=region, + require_2fa=require_2fa, + require_2fa_grace_period_days=require_2fa_grace_period_days, + require_2fa_enforced_at=require_2fa_enforced_at, + ) + + organization.additional_properties = d + return organization + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/overview_api_response.py b/python/fi/generated/openapi_client/models/overview_api_response.py new file mode 100644 index 0000000..ea3544f --- /dev/null +++ b/python/fi/generated/openapi_client/models/overview_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.overview_response import OverviewResponse + + +T = TypeVar("T", bound="OverviewApiResponse") + + +@_attrs_define +class OverviewApiResponse: + """ + Attributes: + result (OverviewResponse): + status (bool | Unset): Default: True. + """ + + result: OverviewResponse + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.overview_response import OverviewResponse + + d = dict(src_dict) + result = OverviewResponse.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + overview_api_response = cls( + result=result, + status=status, + ) + + overview_api_response.additional_properties = d + return overview_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/overview_response.py b/python/fi/generated/openapi_client/models/overview_response.py new file mode 100644 index 0000000..2c57ad1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/overview_response.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.events_over_time_point import EventsOverTimePoint + from ..models.pattern_summary import PatternSummary + from ..models.representative_trace import RepresentativeTrace + + +T = TypeVar("T", bound="OverviewResponse") + + +@_attrs_define +class OverviewResponse: + """ + Attributes: + events_over_time (list[EventsOverTimePoint]): + pattern_summary (PatternSummary): + representative_traces (list[RepresentativeTrace]): + """ + + events_over_time: list[EventsOverTimePoint] + pattern_summary: PatternSummary + representative_traces: list[RepresentativeTrace] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + events_over_time = [] + for events_over_time_item_data in self.events_over_time: + events_over_time_item = events_over_time_item_data.to_dict() + events_over_time.append(events_over_time_item) + + pattern_summary = self.pattern_summary.to_dict() + + representative_traces = [] + for representative_traces_item_data in self.representative_traces: + representative_traces_item = representative_traces_item_data.to_dict() + representative_traces.append(representative_traces_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "events_over_time": events_over_time, + "pattern_summary": pattern_summary, + "representative_traces": representative_traces, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.events_over_time_point import EventsOverTimePoint + from ..models.pattern_summary import PatternSummary + from ..models.representative_trace import RepresentativeTrace + + d = dict(src_dict) + events_over_time = [] + _events_over_time = d.pop("events_over_time") + for events_over_time_item_data in _events_over_time: + events_over_time_item = EventsOverTimePoint.from_dict( + events_over_time_item_data + ) + + events_over_time.append(events_over_time_item) + + pattern_summary = PatternSummary.from_dict(d.pop("pattern_summary")) + + representative_traces = [] + _representative_traces = d.pop("representative_traces") + for representative_traces_item_data in _representative_traces: + representative_traces_item = RepresentativeTrace.from_dict( + representative_traces_item_data + ) + + representative_traces.append(representative_traces_item) + + overview_response = cls( + events_over_time=events_over_time, + pattern_summary=pattern_summary, + representative_traces=representative_traces, + ) + + overview_response.additional_properties = d + return overview_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/pattern_insight.py b/python/fi/generated/openapi_client/models/pattern_insight.py new file mode 100644 index 0000000..a69dbb0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/pattern_insight.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PatternInsight") + + +@_attrs_define +class PatternInsight: + """ + Attributes: + value (str): + caption (str): + """ + + value: str + caption: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + caption = self.caption + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + "caption": caption, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + value = d.pop("value") + + caption = d.pop("caption") + + pattern_insight = cls( + value=value, + caption=caption, + ) + + pattern_insight.additional_properties = d + return pattern_insight + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/pattern_summary.py b/python/fi/generated/openapi_client/models/pattern_summary.py new file mode 100644 index 0000000..b561522 --- /dev/null +++ b/python/fi/generated/openapi_client/models/pattern_summary.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.key_moment import KeyMoment + from ..models.pattern_insight import PatternInsight + + +T = TypeVar("T", bound="PatternSummary") + + +@_attrs_define +class PatternSummary: + """ + Attributes: + insights (list[PatternInsight]): + key_moments (list[KeyMoment]): + """ + + insights: list[PatternInsight] + key_moments: list[KeyMoment] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + insights = [] + for insights_item_data in self.insights: + insights_item = insights_item_data.to_dict() + insights.append(insights_item) + + key_moments = [] + for key_moments_item_data in self.key_moments: + key_moments_item = key_moments_item_data.to_dict() + key_moments.append(key_moments_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "insights": insights, + "key_moments": key_moments, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.key_moment import KeyMoment + from ..models.pattern_insight import PatternInsight + + d = dict(src_dict) + insights = [] + _insights = d.pop("insights") + for insights_item_data in _insights: + insights_item = PatternInsight.from_dict(insights_item_data) + + insights.append(insights_item) + + key_moments = [] + _key_moments = d.pop("key_moments") + for key_moments_item_data in _key_moments: + key_moments_item = KeyMoment.from_dict(key_moments_item_data) + + key_moments.append(key_moments_item) + + pattern_summary = cls( + insights=insights, + key_moments=key_moments, + ) + + pattern_summary.additional_properties = d + return pattern_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/performance_summary.py b/python/fi/generated/openapi_client/models/performance_summary.py new file mode 100644 index 0000000..22e8296 --- /dev/null +++ b/python/fi/generated/openapi_client/models/performance_summary.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.performance_summary_test_run_performance_metrics import ( + PerformanceSummaryTestRunPerformanceMetrics, + ) + from ..models.performance_summary_top_performing_scenarios_item import ( + PerformanceSummaryTopPerformingScenariosItem, + ) + + +T = TypeVar("T", bound="PerformanceSummary") + + +@_attrs_define +class PerformanceSummary: + """ + Attributes: + test_run_performance_metrics (PerformanceSummaryTestRunPerformanceMetrics): Performance metrics including pass + rate, total test runs, and latest fail rate + top_performing_scenarios (list[PerformanceSummaryTopPerformingScenariosItem]): List of top performing scenarios + """ + + test_run_performance_metrics: PerformanceSummaryTestRunPerformanceMetrics + top_performing_scenarios: list[PerformanceSummaryTopPerformingScenariosItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + test_run_performance_metrics = self.test_run_performance_metrics.to_dict() + + top_performing_scenarios = [] + for top_performing_scenarios_item_data in self.top_performing_scenarios: + top_performing_scenarios_item = top_performing_scenarios_item_data.to_dict() + top_performing_scenarios.append(top_performing_scenarios_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "test_run_performance_metrics": test_run_performance_metrics, + "top_performing_scenarios": top_performing_scenarios, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.performance_summary_test_run_performance_metrics import ( + PerformanceSummaryTestRunPerformanceMetrics, + ) + from ..models.performance_summary_top_performing_scenarios_item import ( + PerformanceSummaryTopPerformingScenariosItem, + ) + + d = dict(src_dict) + test_run_performance_metrics = ( + PerformanceSummaryTestRunPerformanceMetrics.from_dict( + d.pop("test_run_performance_metrics") + ) + ) + + top_performing_scenarios = [] + _top_performing_scenarios = d.pop("top_performing_scenarios") + for top_performing_scenarios_item_data in _top_performing_scenarios: + top_performing_scenarios_item = ( + PerformanceSummaryTopPerformingScenariosItem.from_dict( + top_performing_scenarios_item_data + ) + ) + + top_performing_scenarios.append(top_performing_scenarios_item) + + performance_summary = cls( + test_run_performance_metrics=test_run_performance_metrics, + top_performing_scenarios=top_performing_scenarios, + ) + + performance_summary.additional_properties = d + return performance_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/performance_summary_test_run_performance_metrics.py b/python/fi/generated/openapi_client/models/performance_summary_test_run_performance_metrics.py new file mode 100644 index 0000000..edd6254 --- /dev/null +++ b/python/fi/generated/openapi_client/models/performance_summary_test_run_performance_metrics.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PerformanceSummaryTestRunPerformanceMetrics") + + +@_attrs_define +class PerformanceSummaryTestRunPerformanceMetrics: + """Performance metrics including pass rate, total test runs, and latest fail rate""" + + additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + performance_summary_test_run_performance_metrics = cls() + + performance_summary_test_run_performance_metrics.additional_properties = d + return performance_summary_test_run_performance_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> float: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: float) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/performance_summary_top_performing_scenarios_item.py b/python/fi/generated/openapi_client/models/performance_summary_top_performing_scenarios_item.py new file mode 100644 index 0000000..dd3c104 --- /dev/null +++ b/python/fi/generated/openapi_client/models/performance_summary_top_performing_scenarios_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PerformanceSummaryTopPerformingScenariosItem") + + +@_attrs_define +class PerformanceSummaryTopPerformingScenariosItem: + """List of top performing scenarios with their performance scores""" + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + performance_summary_top_performing_scenarios_item = cls() + + performance_summary_top_performing_scenarios_item.additional_properties = d + return performance_summary_top_performing_scenarios_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona.py b/python/fi/generated/openapi_client/models/persona.py new file mode 100644 index 0000000..c7e5eb0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona.py @@ -0,0 +1,715 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.persona_emoji_usage import PersonaEmojiUsage +from ..models.persona_persona_type import PersonaPersonaType +from ..models.persona_punctuation import PersonaPunctuation +from ..models.persona_regional_mix import PersonaRegionalMix +from ..models.persona_simulation_type import PersonaSimulationType +from ..models.persona_slang_usage import PersonaSlangUsage +from ..models.persona_tone import PersonaTone +from ..models.persona_typos_frequency import PersonaTyposFrequency +from ..models.persona_verbosity import PersonaVerbosity +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona_accent import PersonaAccent + from ..models.persona_age_group import PersonaAgeGroup + from ..models.persona_communication_style import PersonaCommunicationStyle + from ..models.persona_conversation_speed import PersonaConversationSpeed + from ..models.persona_custom_properties import PersonaCustomProperties + from ..models.persona_finished_speaking_sensitivity import ( + PersonaFinishedSpeakingSensitivity, + ) + from ..models.persona_gender import PersonaGender + from ..models.persona_interrupt_sensitivity import PersonaInterruptSensitivity + from ..models.persona_keywords import PersonaKeywords + from ..models.persona_languages import PersonaLanguages + from ..models.persona_location import PersonaLocation + from ..models.persona_metadata import PersonaMetadata + from ..models.persona_occupation import PersonaOccupation + from ..models.persona_personality import PersonaPersonality + + +T = TypeVar("T", bound="Persona") + + +@_attrs_define +class Persona: + """ + Attributes: + name (str): Name of the persona + id (UUID | Unset): + persona_type (PersonaPersonaType | Unset): Type of persona (system or workspace-level) + persona_type_display (str | Unset): + description (None | str | Unset): Description of the persona + gender (PersonaGender | Unset): List of genders for the persona (e.g., ['male'], ['female']) + age_group (PersonaAgeGroup | Unset): List of age groups for the persona (e.g., ['18-25'], ['25-32']) + occupation (PersonaOccupation | Unset): List of occupations/professions for the persona (e.g., ['Engineer'], + ['Teacher']) + location (PersonaLocation | Unset): List of locations for the persona (e.g., ['United States'], ['Canada']) + personality (PersonaPersonality | Unset): List of personality types for the persona (e.g., ['Friendly and + cooperative']) + communication_style (PersonaCommunicationStyle | Unset): List of communication styles for the persona (e.g., + ['Direct and concise']) + multilingual (bool | None | Unset): Whether the persona supports multiple languages + languages (PersonaLanguages | Unset): List of languages the persona speaks (e.g., ['English', 'Hindi']) + accent (PersonaAccent | Unset): List of accents for the persona (e.g., ['American'], ['Australian']) + conversation_speed (PersonaConversationSpeed | Unset): List of conversation speeds (e.g., ['1.0'], ['1.25']) + background_sound (bool | None | Unset): Whether background sound is enabled (null=not specified, True/False for + enabled/disabled) + finished_speaking_sensitivity (PersonaFinishedSpeakingSensitivity | Unset): List of sensitivities for detecting + when persona finished speaking (e.g., ['5'], ['6']) + interrupt_sensitivity (PersonaInterruptSensitivity | Unset): List of sensitivities for allowing interruptions + (e.g., ['5'], ['6']) + keywords (PersonaKeywords | Unset): List of keywords/tags describing the persona (e.g., ['Knowledgeable', + 'Patient', 'Helpful']) + metadata (PersonaMetadata | Unset): Additional metadata for the persona (speech clarity, base emotion, etc.) + additional_instruction (None | str | Unset): Additional instructions for how this persona should behave + is_default (bool | None | Unset): Whether this is a default/recommended persona + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + profession (list[str] | None | Unset): + language (list[str] | None | Unset): + custom_properties (PersonaCustomProperties | Unset): + simulation_type (PersonaSimulationType | Unset): Type of simulation for the persona + punctuation (PersonaPunctuation | Unset): Punctuation style for the persona + slang_usage (PersonaSlangUsage | Unset): Slang usage for the persona + typos_frequency (PersonaTyposFrequency | Unset): Typos frequency for the persona + regional_mix (PersonaRegionalMix | Unset): Regional mix for the persona + emoji_usage (PersonaEmojiUsage | Unset): Emoji usage for the persona + tone (PersonaTone | Unset): Tone for the persona + verbosity (PersonaVerbosity | Unset): Verbosity for the persona + """ + + name: str + id: UUID | Unset = UNSET + persona_type: PersonaPersonaType | Unset = UNSET + persona_type_display: str | Unset = UNSET + description: None | str | Unset = UNSET + gender: PersonaGender | Unset = UNSET + age_group: PersonaAgeGroup | Unset = UNSET + occupation: PersonaOccupation | Unset = UNSET + location: PersonaLocation | Unset = UNSET + personality: PersonaPersonality | Unset = UNSET + communication_style: PersonaCommunicationStyle | Unset = UNSET + multilingual: bool | None | Unset = UNSET + languages: PersonaLanguages | Unset = UNSET + accent: PersonaAccent | Unset = UNSET + conversation_speed: PersonaConversationSpeed | Unset = UNSET + background_sound: bool | None | Unset = UNSET + finished_speaking_sensitivity: PersonaFinishedSpeakingSensitivity | Unset = UNSET + interrupt_sensitivity: PersonaInterruptSensitivity | Unset = UNSET + keywords: PersonaKeywords | Unset = UNSET + metadata: PersonaMetadata | Unset = UNSET + additional_instruction: None | str | Unset = UNSET + is_default: bool | None | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + profession: list[str] | None | Unset = UNSET + language: list[str] | None | Unset = UNSET + custom_properties: PersonaCustomProperties | Unset = UNSET + simulation_type: PersonaSimulationType | Unset = UNSET + punctuation: PersonaPunctuation | Unset = UNSET + slang_usage: PersonaSlangUsage | Unset = UNSET + typos_frequency: PersonaTyposFrequency | Unset = UNSET + regional_mix: PersonaRegionalMix | Unset = UNSET + emoji_usage: PersonaEmojiUsage | Unset = UNSET + tone: PersonaTone | Unset = UNSET + verbosity: PersonaVerbosity | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + persona_type: str | Unset = UNSET + if not isinstance(self.persona_type, Unset): + persona_type = self.persona_type.value + + persona_type_display = self.persona_type_display + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + gender: dict[str, Any] | Unset = UNSET + if not isinstance(self.gender, Unset): + gender = self.gender.to_dict() + + age_group: dict[str, Any] | Unset = UNSET + if not isinstance(self.age_group, Unset): + age_group = self.age_group.to_dict() + + occupation: dict[str, Any] | Unset = UNSET + if not isinstance(self.occupation, Unset): + occupation = self.occupation.to_dict() + + location: dict[str, Any] | Unset = UNSET + if not isinstance(self.location, Unset): + location = self.location.to_dict() + + personality: dict[str, Any] | Unset = UNSET + if not isinstance(self.personality, Unset): + personality = self.personality.to_dict() + + communication_style: dict[str, Any] | Unset = UNSET + if not isinstance(self.communication_style, Unset): + communication_style = self.communication_style.to_dict() + + multilingual: bool | None | Unset + if isinstance(self.multilingual, Unset): + multilingual = UNSET + else: + multilingual = self.multilingual + + languages: dict[str, Any] | Unset = UNSET + if not isinstance(self.languages, Unset): + languages = self.languages.to_dict() + + accent: dict[str, Any] | Unset = UNSET + if not isinstance(self.accent, Unset): + accent = self.accent.to_dict() + + conversation_speed: dict[str, Any] | Unset = UNSET + if not isinstance(self.conversation_speed, Unset): + conversation_speed = self.conversation_speed.to_dict() + + background_sound: bool | None | Unset + if isinstance(self.background_sound, Unset): + background_sound = UNSET + else: + background_sound = self.background_sound + + finished_speaking_sensitivity: dict[str, Any] | Unset = UNSET + if not isinstance(self.finished_speaking_sensitivity, Unset): + finished_speaking_sensitivity = self.finished_speaking_sensitivity.to_dict() + + interrupt_sensitivity: dict[str, Any] | Unset = UNSET + if not isinstance(self.interrupt_sensitivity, Unset): + interrupt_sensitivity = self.interrupt_sensitivity.to_dict() + + keywords: dict[str, Any] | Unset = UNSET + if not isinstance(self.keywords, Unset): + keywords = self.keywords.to_dict() + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + additional_instruction: None | str | Unset + if isinstance(self.additional_instruction, Unset): + additional_instruction = UNSET + else: + additional_instruction = self.additional_instruction + + is_default: bool | None | Unset + if isinstance(self.is_default, Unset): + is_default = UNSET + else: + is_default = self.is_default + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + profession: list[str] | None | Unset + if isinstance(self.profession, Unset): + profession = UNSET + elif isinstance(self.profession, list): + profession = self.profession + + else: + profession = self.profession + + language: list[str] | None | Unset + if isinstance(self.language, Unset): + language = UNSET + elif isinstance(self.language, list): + language = self.language + + else: + language = self.language + + custom_properties: dict[str, Any] | Unset = UNSET + if not isinstance(self.custom_properties, Unset): + custom_properties = self.custom_properties.to_dict() + + simulation_type: str | Unset = UNSET + if not isinstance(self.simulation_type, Unset): + simulation_type = self.simulation_type.value + + punctuation: str | Unset = UNSET + if not isinstance(self.punctuation, Unset): + punctuation = self.punctuation.value + + slang_usage: str | Unset = UNSET + if not isinstance(self.slang_usage, Unset): + slang_usage = self.slang_usage.value + + typos_frequency: str | Unset = UNSET + if not isinstance(self.typos_frequency, Unset): + typos_frequency = self.typos_frequency.value + + regional_mix: str | Unset = UNSET + if not isinstance(self.regional_mix, Unset): + regional_mix = self.regional_mix.value + + emoji_usage: str | Unset = UNSET + if not isinstance(self.emoji_usage, Unset): + emoji_usage = self.emoji_usage.value + + tone: str | Unset = UNSET + if not isinstance(self.tone, Unset): + tone = self.tone.value + + verbosity: str | Unset = UNSET + if not isinstance(self.verbosity, Unset): + verbosity = self.verbosity.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if id is not UNSET: + field_dict["id"] = id + if persona_type is not UNSET: + field_dict["persona_type"] = persona_type + if persona_type_display is not UNSET: + field_dict["persona_type_display"] = persona_type_display + if description is not UNSET: + field_dict["description"] = description + if gender is not UNSET: + field_dict["gender"] = gender + if age_group is not UNSET: + field_dict["age_group"] = age_group + if occupation is not UNSET: + field_dict["occupation"] = occupation + if location is not UNSET: + field_dict["location"] = location + if personality is not UNSET: + field_dict["personality"] = personality + if communication_style is not UNSET: + field_dict["communication_style"] = communication_style + if multilingual is not UNSET: + field_dict["multilingual"] = multilingual + if languages is not UNSET: + field_dict["languages"] = languages + if accent is not UNSET: + field_dict["accent"] = accent + if conversation_speed is not UNSET: + field_dict["conversation_speed"] = conversation_speed + if background_sound is not UNSET: + field_dict["background_sound"] = background_sound + if finished_speaking_sensitivity is not UNSET: + field_dict["finished_speaking_sensitivity"] = finished_speaking_sensitivity + if interrupt_sensitivity is not UNSET: + field_dict["interrupt_sensitivity"] = interrupt_sensitivity + if keywords is not UNSET: + field_dict["keywords"] = keywords + if metadata is not UNSET: + field_dict["metadata"] = metadata + if additional_instruction is not UNSET: + field_dict["additional_instruction"] = additional_instruction + if is_default is not UNSET: + field_dict["is_default"] = is_default + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if profession is not UNSET: + field_dict["profession"] = profession + if language is not UNSET: + field_dict["language"] = language + if custom_properties is not UNSET: + field_dict["custom_properties"] = custom_properties + if simulation_type is not UNSET: + field_dict["simulation_type"] = simulation_type + if punctuation is not UNSET: + field_dict["punctuation"] = punctuation + if slang_usage is not UNSET: + field_dict["slang_usage"] = slang_usage + if typos_frequency is not UNSET: + field_dict["typos_frequency"] = typos_frequency + if regional_mix is not UNSET: + field_dict["regional_mix"] = regional_mix + if emoji_usage is not UNSET: + field_dict["emoji_usage"] = emoji_usage + if tone is not UNSET: + field_dict["tone"] = tone + if verbosity is not UNSET: + field_dict["verbosity"] = verbosity + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona_accent import PersonaAccent + from ..models.persona_age_group import PersonaAgeGroup + from ..models.persona_communication_style import PersonaCommunicationStyle + from ..models.persona_conversation_speed import PersonaConversationSpeed + from ..models.persona_custom_properties import PersonaCustomProperties + from ..models.persona_finished_speaking_sensitivity import ( + PersonaFinishedSpeakingSensitivity, + ) + from ..models.persona_gender import PersonaGender + from ..models.persona_interrupt_sensitivity import PersonaInterruptSensitivity + from ..models.persona_keywords import PersonaKeywords + from ..models.persona_languages import PersonaLanguages + from ..models.persona_location import PersonaLocation + from ..models.persona_metadata import PersonaMetadata + from ..models.persona_occupation import PersonaOccupation + from ..models.persona_personality import PersonaPersonality + + d = dict(src_dict) + name = d.pop("name") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _persona_type = d.pop("persona_type", UNSET) + persona_type: PersonaPersonaType | Unset + if isinstance(_persona_type, Unset): + persona_type = UNSET + else: + persona_type = PersonaPersonaType(_persona_type) + + persona_type_display = d.pop("persona_type_display", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + _gender = d.pop("gender", UNSET) + gender: PersonaGender | Unset + if isinstance(_gender, Unset): + gender = UNSET + else: + gender = PersonaGender.from_dict(_gender) + + _age_group = d.pop("age_group", UNSET) + age_group: PersonaAgeGroup | Unset + if isinstance(_age_group, Unset): + age_group = UNSET + else: + age_group = PersonaAgeGroup.from_dict(_age_group) + + _occupation = d.pop("occupation", UNSET) + occupation: PersonaOccupation | Unset + if isinstance(_occupation, Unset): + occupation = UNSET + else: + occupation = PersonaOccupation.from_dict(_occupation) + + _location = d.pop("location", UNSET) + location: PersonaLocation | Unset + if isinstance(_location, Unset): + location = UNSET + else: + location = PersonaLocation.from_dict(_location) + + _personality = d.pop("personality", UNSET) + personality: PersonaPersonality | Unset + if isinstance(_personality, Unset): + personality = UNSET + else: + personality = PersonaPersonality.from_dict(_personality) + + _communication_style = d.pop("communication_style", UNSET) + communication_style: PersonaCommunicationStyle | Unset + if isinstance(_communication_style, Unset): + communication_style = UNSET + else: + communication_style = PersonaCommunicationStyle.from_dict( + _communication_style + ) + + def _parse_multilingual(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + multilingual = _parse_multilingual(d.pop("multilingual", UNSET)) + + _languages = d.pop("languages", UNSET) + languages: PersonaLanguages | Unset + if isinstance(_languages, Unset): + languages = UNSET + else: + languages = PersonaLanguages.from_dict(_languages) + + _accent = d.pop("accent", UNSET) + accent: PersonaAccent | Unset + if isinstance(_accent, Unset): + accent = UNSET + else: + accent = PersonaAccent.from_dict(_accent) + + _conversation_speed = d.pop("conversation_speed", UNSET) + conversation_speed: PersonaConversationSpeed | Unset + if isinstance(_conversation_speed, Unset): + conversation_speed = UNSET + else: + conversation_speed = PersonaConversationSpeed.from_dict(_conversation_speed) + + def _parse_background_sound(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + background_sound = _parse_background_sound(d.pop("background_sound", UNSET)) + + _finished_speaking_sensitivity = d.pop("finished_speaking_sensitivity", UNSET) + finished_speaking_sensitivity: PersonaFinishedSpeakingSensitivity | Unset + if isinstance(_finished_speaking_sensitivity, Unset): + finished_speaking_sensitivity = UNSET + else: + finished_speaking_sensitivity = ( + PersonaFinishedSpeakingSensitivity.from_dict( + _finished_speaking_sensitivity + ) + ) + + _interrupt_sensitivity = d.pop("interrupt_sensitivity", UNSET) + interrupt_sensitivity: PersonaInterruptSensitivity | Unset + if isinstance(_interrupt_sensitivity, Unset): + interrupt_sensitivity = UNSET + else: + interrupt_sensitivity = PersonaInterruptSensitivity.from_dict( + _interrupt_sensitivity + ) + + _keywords = d.pop("keywords", UNSET) + keywords: PersonaKeywords | Unset + if isinstance(_keywords, Unset): + keywords = UNSET + else: + keywords = PersonaKeywords.from_dict(_keywords) + + _metadata = d.pop("metadata", UNSET) + metadata: PersonaMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = PersonaMetadata.from_dict(_metadata) + + def _parse_additional_instruction(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + additional_instruction = _parse_additional_instruction( + d.pop("additional_instruction", UNSET) + ) + + def _parse_is_default(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_default = _parse_is_default(d.pop("is_default", UNSET)) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + def _parse_profession(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + profession_type_0 = cast(list[str], data) + + return profession_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + profession = _parse_profession(d.pop("profession", UNSET)) + + def _parse_language(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + language_type_0 = cast(list[str], data) + + return language_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + language = _parse_language(d.pop("language", UNSET)) + + _custom_properties = d.pop("custom_properties", UNSET) + custom_properties: PersonaCustomProperties | Unset + if isinstance(_custom_properties, Unset): + custom_properties = UNSET + else: + custom_properties = PersonaCustomProperties.from_dict(_custom_properties) + + _simulation_type = d.pop("simulation_type", UNSET) + simulation_type: PersonaSimulationType | Unset + if isinstance(_simulation_type, Unset): + simulation_type = UNSET + else: + simulation_type = PersonaSimulationType(_simulation_type) + + _punctuation = d.pop("punctuation", UNSET) + punctuation: PersonaPunctuation | Unset + if isinstance(_punctuation, Unset): + punctuation = UNSET + else: + punctuation = PersonaPunctuation(_punctuation) + + _slang_usage = d.pop("slang_usage", UNSET) + slang_usage: PersonaSlangUsage | Unset + if isinstance(_slang_usage, Unset): + slang_usage = UNSET + else: + slang_usage = PersonaSlangUsage(_slang_usage) + + _typos_frequency = d.pop("typos_frequency", UNSET) + typos_frequency: PersonaTyposFrequency | Unset + if isinstance(_typos_frequency, Unset): + typos_frequency = UNSET + else: + typos_frequency = PersonaTyposFrequency(_typos_frequency) + + _regional_mix = d.pop("regional_mix", UNSET) + regional_mix: PersonaRegionalMix | Unset + if isinstance(_regional_mix, Unset): + regional_mix = UNSET + else: + regional_mix = PersonaRegionalMix(_regional_mix) + + _emoji_usage = d.pop("emoji_usage", UNSET) + emoji_usage: PersonaEmojiUsage | Unset + if isinstance(_emoji_usage, Unset): + emoji_usage = UNSET + else: + emoji_usage = PersonaEmojiUsage(_emoji_usage) + + _tone = d.pop("tone", UNSET) + tone: PersonaTone | Unset + if isinstance(_tone, Unset): + tone = UNSET + else: + tone = PersonaTone(_tone) + + _verbosity = d.pop("verbosity", UNSET) + verbosity: PersonaVerbosity | Unset + if isinstance(_verbosity, Unset): + verbosity = UNSET + else: + verbosity = PersonaVerbosity(_verbosity) + + persona = cls( + name=name, + id=id, + persona_type=persona_type, + persona_type_display=persona_type_display, + description=description, + gender=gender, + age_group=age_group, + occupation=occupation, + location=location, + personality=personality, + communication_style=communication_style, + multilingual=multilingual, + languages=languages, + accent=accent, + conversation_speed=conversation_speed, + background_sound=background_sound, + finished_speaking_sensitivity=finished_speaking_sensitivity, + interrupt_sensitivity=interrupt_sensitivity, + keywords=keywords, + metadata=metadata, + additional_instruction=additional_instruction, + is_default=is_default, + created_at=created_at, + updated_at=updated_at, + profession=profession, + language=language, + custom_properties=custom_properties, + simulation_type=simulation_type, + punctuation=punctuation, + slang_usage=slang_usage, + typos_frequency=typos_frequency, + regional_mix=regional_mix, + emoji_usage=emoji_usage, + tone=tone, + verbosity=verbosity, + ) + + persona.additional_properties = d + return persona + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_accent.py b/python/fi/generated/openapi_client/models/persona_accent.py new file mode 100644 index 0000000..126619e --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_accent.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaAccent") + + +@_attrs_define +class PersonaAccent: + """List of accents for the persona (e.g., ['American'], ['Australian'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_accent = cls() + + persona_accent.additional_properties = d + return persona_accent + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_age_group.py b/python/fi/generated/openapi_client/models/persona_age_group.py new file mode 100644 index 0000000..753f1b5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_age_group.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaAgeGroup") + + +@_attrs_define +class PersonaAgeGroup: + """List of age groups for the persona (e.g., ['18-25'], ['25-32'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_age_group = cls() + + persona_age_group.additional_properties = d + return persona_age_group + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_communication_style.py b/python/fi/generated/openapi_client/models/persona_communication_style.py new file mode 100644 index 0000000..7b9c675 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_communication_style.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaCommunicationStyle") + + +@_attrs_define +class PersonaCommunicationStyle: + """List of communication styles for the persona (e.g., ['Direct and concise'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_communication_style = cls() + + persona_communication_style.additional_properties = d + return persona_communication_style + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_conversation_speed.py b/python/fi/generated/openapi_client/models/persona_conversation_speed.py new file mode 100644 index 0000000..a6c5762 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_conversation_speed.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaConversationSpeed") + + +@_attrs_define +class PersonaConversationSpeed: + """List of conversation speeds (e.g., ['1.0'], ['1.25'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_conversation_speed = cls() + + persona_conversation_speed.additional_properties = d + return persona_conversation_speed + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_create.py b/python/fi/generated/openapi_client/models/persona_create.py new file mode 100644 index 0000000..420fcc0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_create.py @@ -0,0 +1,690 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona_create_custom_properties import PersonaCreateCustomProperties + + +T = TypeVar("T", bound="PersonaCreate") + + +@_attrs_define +class PersonaCreate: + """ + Attributes: + name (str): + description (str): + gender (list[str] | None | Unset): + age_group (list[str] | None | Unset): + location (list[str] | None | Unset): + profession (list[str] | None | Unset): + personality (list[str] | None | Unset): + communication_style (list[str] | None | Unset): + accent (list[str] | None | Unset): + multilingual (bool | Unset): Default: False. + language (list[str] | None | Unset): + conversation_speed (list[str] | None | Unset): + background_sound (bool | None | Unset): + finished_speaking_sensitivity (list[str] | None | Unset): + interrupt_sensitivity (list[str] | None | Unset): + keywords (list[str] | None | Unset): + custom_properties (PersonaCreateCustomProperties | Unset): + additional_instruction (None | str | Unset): Default: ''. + simulation_type (None | str | Unset): Default: 'voice'. + tone (None | str | Unset): Default: 'casual'. + punctuation (None | str | Unset): Default: 'clean'. + slang_usage (None | str | Unset): Default: 'light'. + typos_frequency (None | str | Unset): Default: 'rare'. + regional_mix (None | str | Unset): Default: 'light'. + emoji_usage (None | str | Unset): Default: 'light'. + verbosity (None | str | Unset): Default: 'balanced'. + """ + + name: str + description: str + gender: list[str] | None | Unset = UNSET + age_group: list[str] | None | Unset = UNSET + location: list[str] | None | Unset = UNSET + profession: list[str] | None | Unset = UNSET + personality: list[str] | None | Unset = UNSET + communication_style: list[str] | None | Unset = UNSET + accent: list[str] | None | Unset = UNSET + multilingual: bool | Unset = False + language: list[str] | None | Unset = UNSET + conversation_speed: list[str] | None | Unset = UNSET + background_sound: bool | None | Unset = UNSET + finished_speaking_sensitivity: list[str] | None | Unset = UNSET + interrupt_sensitivity: list[str] | None | Unset = UNSET + keywords: list[str] | None | Unset = UNSET + custom_properties: PersonaCreateCustomProperties | Unset = UNSET + additional_instruction: None | str | Unset = "" + simulation_type: None | str | Unset = "voice" + tone: None | str | Unset = "casual" + punctuation: None | str | Unset = "clean" + slang_usage: None | str | Unset = "light" + typos_frequency: None | str | Unset = "rare" + regional_mix: None | str | Unset = "light" + emoji_usage: None | str | Unset = "light" + verbosity: None | str | Unset = "balanced" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description = self.description + + gender: list[str] | None | Unset + if isinstance(self.gender, Unset): + gender = UNSET + elif isinstance(self.gender, list): + gender = self.gender + + else: + gender = self.gender + + age_group: list[str] | None | Unset + if isinstance(self.age_group, Unset): + age_group = UNSET + elif isinstance(self.age_group, list): + age_group = self.age_group + + else: + age_group = self.age_group + + location: list[str] | None | Unset + if isinstance(self.location, Unset): + location = UNSET + elif isinstance(self.location, list): + location = self.location + + else: + location = self.location + + profession: list[str] | None | Unset + if isinstance(self.profession, Unset): + profession = UNSET + elif isinstance(self.profession, list): + profession = self.profession + + else: + profession = self.profession + + personality: list[str] | None | Unset + if isinstance(self.personality, Unset): + personality = UNSET + elif isinstance(self.personality, list): + personality = self.personality + + else: + personality = self.personality + + communication_style: list[str] | None | Unset + if isinstance(self.communication_style, Unset): + communication_style = UNSET + elif isinstance(self.communication_style, list): + communication_style = self.communication_style + + else: + communication_style = self.communication_style + + accent: list[str] | None | Unset + if isinstance(self.accent, Unset): + accent = UNSET + elif isinstance(self.accent, list): + accent = self.accent + + else: + accent = self.accent + + multilingual = self.multilingual + + language: list[str] | None | Unset + if isinstance(self.language, Unset): + language = UNSET + elif isinstance(self.language, list): + language = self.language + + else: + language = self.language + + conversation_speed: list[str] | None | Unset + if isinstance(self.conversation_speed, Unset): + conversation_speed = UNSET + elif isinstance(self.conversation_speed, list): + conversation_speed = self.conversation_speed + + else: + conversation_speed = self.conversation_speed + + background_sound: bool | None | Unset + if isinstance(self.background_sound, Unset): + background_sound = UNSET + else: + background_sound = self.background_sound + + finished_speaking_sensitivity: list[str] | None | Unset + if isinstance(self.finished_speaking_sensitivity, Unset): + finished_speaking_sensitivity = UNSET + elif isinstance(self.finished_speaking_sensitivity, list): + finished_speaking_sensitivity = self.finished_speaking_sensitivity + + else: + finished_speaking_sensitivity = self.finished_speaking_sensitivity + + interrupt_sensitivity: list[str] | None | Unset + if isinstance(self.interrupt_sensitivity, Unset): + interrupt_sensitivity = UNSET + elif isinstance(self.interrupt_sensitivity, list): + interrupt_sensitivity = self.interrupt_sensitivity + + else: + interrupt_sensitivity = self.interrupt_sensitivity + + keywords: list[str] | None | Unset + if isinstance(self.keywords, Unset): + keywords = UNSET + elif isinstance(self.keywords, list): + keywords = self.keywords + + else: + keywords = self.keywords + + custom_properties: dict[str, Any] | Unset = UNSET + if not isinstance(self.custom_properties, Unset): + custom_properties = self.custom_properties.to_dict() + + additional_instruction: None | str | Unset + if isinstance(self.additional_instruction, Unset): + additional_instruction = UNSET + else: + additional_instruction = self.additional_instruction + + simulation_type: None | str | Unset + if isinstance(self.simulation_type, Unset): + simulation_type = UNSET + else: + simulation_type = self.simulation_type + + tone: None | str | Unset + if isinstance(self.tone, Unset): + tone = UNSET + else: + tone = self.tone + + punctuation: None | str | Unset + if isinstance(self.punctuation, Unset): + punctuation = UNSET + else: + punctuation = self.punctuation + + slang_usage: None | str | Unset + if isinstance(self.slang_usage, Unset): + slang_usage = UNSET + else: + slang_usage = self.slang_usage + + typos_frequency: None | str | Unset + if isinstance(self.typos_frequency, Unset): + typos_frequency = UNSET + else: + typos_frequency = self.typos_frequency + + regional_mix: None | str | Unset + if isinstance(self.regional_mix, Unset): + regional_mix = UNSET + else: + regional_mix = self.regional_mix + + emoji_usage: None | str | Unset + if isinstance(self.emoji_usage, Unset): + emoji_usage = UNSET + else: + emoji_usage = self.emoji_usage + + verbosity: None | str | Unset + if isinstance(self.verbosity, Unset): + verbosity = UNSET + else: + verbosity = self.verbosity + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "description": description, + } + ) + if gender is not UNSET: + field_dict["gender"] = gender + if age_group is not UNSET: + field_dict["age_group"] = age_group + if location is not UNSET: + field_dict["location"] = location + if profession is not UNSET: + field_dict["profession"] = profession + if personality is not UNSET: + field_dict["personality"] = personality + if communication_style is not UNSET: + field_dict["communication_style"] = communication_style + if accent is not UNSET: + field_dict["accent"] = accent + if multilingual is not UNSET: + field_dict["multilingual"] = multilingual + if language is not UNSET: + field_dict["language"] = language + if conversation_speed is not UNSET: + field_dict["conversation_speed"] = conversation_speed + if background_sound is not UNSET: + field_dict["background_sound"] = background_sound + if finished_speaking_sensitivity is not UNSET: + field_dict["finished_speaking_sensitivity"] = finished_speaking_sensitivity + if interrupt_sensitivity is not UNSET: + field_dict["interrupt_sensitivity"] = interrupt_sensitivity + if keywords is not UNSET: + field_dict["keywords"] = keywords + if custom_properties is not UNSET: + field_dict["custom_properties"] = custom_properties + if additional_instruction is not UNSET: + field_dict["additional_instruction"] = additional_instruction + if simulation_type is not UNSET: + field_dict["simulation_type"] = simulation_type + if tone is not UNSET: + field_dict["tone"] = tone + if punctuation is not UNSET: + field_dict["punctuation"] = punctuation + if slang_usage is not UNSET: + field_dict["slang_usage"] = slang_usage + if typos_frequency is not UNSET: + field_dict["typos_frequency"] = typos_frequency + if regional_mix is not UNSET: + field_dict["regional_mix"] = regional_mix + if emoji_usage is not UNSET: + field_dict["emoji_usage"] = emoji_usage + if verbosity is not UNSET: + field_dict["verbosity"] = verbosity + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona_create_custom_properties import ( + PersonaCreateCustomProperties, + ) + + d = dict(src_dict) + name = d.pop("name") + + description = d.pop("description") + + def _parse_gender(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + gender_type_0 = cast(list[str], data) + + return gender_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + gender = _parse_gender(d.pop("gender", UNSET)) + + def _parse_age_group(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + age_group_type_0 = cast(list[str], data) + + return age_group_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + age_group = _parse_age_group(d.pop("age_group", UNSET)) + + def _parse_location(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + location_type_0 = cast(list[str], data) + + return location_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_profession(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + profession_type_0 = cast(list[str], data) + + return profession_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + profession = _parse_profession(d.pop("profession", UNSET)) + + def _parse_personality(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + personality_type_0 = cast(list[str], data) + + return personality_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + personality = _parse_personality(d.pop("personality", UNSET)) + + def _parse_communication_style(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + communication_style_type_0 = cast(list[str], data) + + return communication_style_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + communication_style = _parse_communication_style( + d.pop("communication_style", UNSET) + ) + + def _parse_accent(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + accent_type_0 = cast(list[str], data) + + return accent_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + accent = _parse_accent(d.pop("accent", UNSET)) + + multilingual = d.pop("multilingual", UNSET) + + def _parse_language(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + language_type_0 = cast(list[str], data) + + return language_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + language = _parse_language(d.pop("language", UNSET)) + + def _parse_conversation_speed(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + conversation_speed_type_0 = cast(list[str], data) + + return conversation_speed_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + conversation_speed = _parse_conversation_speed( + d.pop("conversation_speed", UNSET) + ) + + def _parse_background_sound(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + background_sound = _parse_background_sound(d.pop("background_sound", UNSET)) + + def _parse_finished_speaking_sensitivity( + data: object, + ) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + finished_speaking_sensitivity_type_0 = cast(list[str], data) + + return finished_speaking_sensitivity_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + finished_speaking_sensitivity = _parse_finished_speaking_sensitivity( + d.pop("finished_speaking_sensitivity", UNSET) + ) + + def _parse_interrupt_sensitivity(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + interrupt_sensitivity_type_0 = cast(list[str], data) + + return interrupt_sensitivity_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + interrupt_sensitivity = _parse_interrupt_sensitivity( + d.pop("interrupt_sensitivity", UNSET) + ) + + def _parse_keywords(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + keywords_type_0 = cast(list[str], data) + + return keywords_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + keywords = _parse_keywords(d.pop("keywords", UNSET)) + + _custom_properties = d.pop("custom_properties", UNSET) + custom_properties: PersonaCreateCustomProperties | Unset + if isinstance(_custom_properties, Unset): + custom_properties = UNSET + else: + custom_properties = PersonaCreateCustomProperties.from_dict( + _custom_properties + ) + + def _parse_additional_instruction(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + additional_instruction = _parse_additional_instruction( + d.pop("additional_instruction", UNSET) + ) + + def _parse_simulation_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + simulation_type = _parse_simulation_type(d.pop("simulation_type", UNSET)) + + def _parse_tone(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tone = _parse_tone(d.pop("tone", UNSET)) + + def _parse_punctuation(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + punctuation = _parse_punctuation(d.pop("punctuation", UNSET)) + + def _parse_slang_usage(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + slang_usage = _parse_slang_usage(d.pop("slang_usage", UNSET)) + + def _parse_typos_frequency(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + typos_frequency = _parse_typos_frequency(d.pop("typos_frequency", UNSET)) + + def _parse_regional_mix(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + regional_mix = _parse_regional_mix(d.pop("regional_mix", UNSET)) + + def _parse_emoji_usage(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + emoji_usage = _parse_emoji_usage(d.pop("emoji_usage", UNSET)) + + def _parse_verbosity(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + verbosity = _parse_verbosity(d.pop("verbosity", UNSET)) + + persona_create = cls( + name=name, + description=description, + gender=gender, + age_group=age_group, + location=location, + profession=profession, + personality=personality, + communication_style=communication_style, + accent=accent, + multilingual=multilingual, + language=language, + conversation_speed=conversation_speed, + background_sound=background_sound, + finished_speaking_sensitivity=finished_speaking_sensitivity, + interrupt_sensitivity=interrupt_sensitivity, + keywords=keywords, + custom_properties=custom_properties, + additional_instruction=additional_instruction, + simulation_type=simulation_type, + tone=tone, + punctuation=punctuation, + slang_usage=slang_usage, + typos_frequency=typos_frequency, + regional_mix=regional_mix, + emoji_usage=emoji_usage, + verbosity=verbosity, + ) + + persona_create.additional_properties = d + return persona_create + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_create_custom_properties.py b/python/fi/generated/openapi_client/models/persona_create_custom_properties.py new file mode 100644 index 0000000..1232d2f --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_create_custom_properties.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaCreateCustomProperties") + + +@_attrs_define +class PersonaCreateCustomProperties: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_create_custom_properties = cls() + + persona_create_custom_properties.additional_properties = d + return persona_create_custom_properties + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_custom_properties.py b/python/fi/generated/openapi_client/models/persona_custom_properties.py new file mode 100644 index 0000000..af34c01 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_custom_properties.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaCustomProperties") + + +@_attrs_define +class PersonaCustomProperties: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_custom_properties = cls() + + persona_custom_properties.additional_properties = d + return persona_custom_properties + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_duplicate_request.py b/python/fi/generated/openapi_client/models/persona_duplicate_request.py new file mode 100644 index 0000000..e3310d5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_duplicate_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaDuplicateRequest") + + +@_attrs_define +class PersonaDuplicateRequest: + """ + Attributes: + name (str): + """ + + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + persona_duplicate_request = cls( + name=name, + ) + + persona_duplicate_request.additional_properties = d + return persona_duplicate_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_duplicate_response.py b/python/fi/generated/openapi_client/models/persona_duplicate_response.py new file mode 100644 index 0000000..058a909 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_duplicate_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona import Persona + + +T = TypeVar("T", bound="PersonaDuplicateResponse") + + +@_attrs_define +class PersonaDuplicateResponse: + """ + Attributes: + status (bool | Unset): Default: True. + result (Persona | Unset): + """ + + status: bool | Unset = True + result: Persona | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result: dict[str, Any] | Unset = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if result is not UNSET: + field_dict["result"] = result + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona import Persona + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _result = d.pop("result", UNSET) + result: Persona | Unset + if isinstance(_result, Unset): + result = UNSET + else: + result = Persona.from_dict(_result) + + persona_duplicate_response = cls( + status=status, + result=result, + ) + + persona_duplicate_response.additional_properties = d + return persona_duplicate_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_emoji_usage.py b/python/fi/generated/openapi_client/models/persona_emoji_usage.py new file mode 100644 index 0000000..8217145 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_emoji_usage.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaEmojiUsage(str, Enum): + HEAVY = "heavy" + LIGHT = "light" + NEVER = "never" + REGULAR = "regular" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_field_options.py b/python/fi/generated/openapi_client/models/persona_field_options.py new file mode 100644 index 0000000..82022b3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_field_options.py @@ -0,0 +1,196 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PersonaFieldOptions") + + +@_attrs_define +class PersonaFieldOptions: + """ + Attributes: + gender_choices (str | Unset): + age_group_choices (str | Unset): + location_choices (str | Unset): + profession_choices (str | Unset): + personality_choices (str | Unset): + communication_style_choices (str | Unset): + accent_choices (str | Unset): + language_choices (str | Unset): + conversation_speed_choices (str | Unset): + tone_choices (str | Unset): + verbosity_choices (str | Unset): + punctuation_choices (str | Unset): + emoji_usage_choices (str | Unset): + slang_usage_choices (str | Unset): + typos_frequency_choices (str | Unset): + regional_mix_choices (str | Unset): + """ + + gender_choices: str | Unset = UNSET + age_group_choices: str | Unset = UNSET + location_choices: str | Unset = UNSET + profession_choices: str | Unset = UNSET + personality_choices: str | Unset = UNSET + communication_style_choices: str | Unset = UNSET + accent_choices: str | Unset = UNSET + language_choices: str | Unset = UNSET + conversation_speed_choices: str | Unset = UNSET + tone_choices: str | Unset = UNSET + verbosity_choices: str | Unset = UNSET + punctuation_choices: str | Unset = UNSET + emoji_usage_choices: str | Unset = UNSET + slang_usage_choices: str | Unset = UNSET + typos_frequency_choices: str | Unset = UNSET + regional_mix_choices: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + gender_choices = self.gender_choices + + age_group_choices = self.age_group_choices + + location_choices = self.location_choices + + profession_choices = self.profession_choices + + personality_choices = self.personality_choices + + communication_style_choices = self.communication_style_choices + + accent_choices = self.accent_choices + + language_choices = self.language_choices + + conversation_speed_choices = self.conversation_speed_choices + + tone_choices = self.tone_choices + + verbosity_choices = self.verbosity_choices + + punctuation_choices = self.punctuation_choices + + emoji_usage_choices = self.emoji_usage_choices + + slang_usage_choices = self.slang_usage_choices + + typos_frequency_choices = self.typos_frequency_choices + + regional_mix_choices = self.regional_mix_choices + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if gender_choices is not UNSET: + field_dict["gender_choices"] = gender_choices + if age_group_choices is not UNSET: + field_dict["age_group_choices"] = age_group_choices + if location_choices is not UNSET: + field_dict["location_choices"] = location_choices + if profession_choices is not UNSET: + field_dict["profession_choices"] = profession_choices + if personality_choices is not UNSET: + field_dict["personality_choices"] = personality_choices + if communication_style_choices is not UNSET: + field_dict["communication_style_choices"] = communication_style_choices + if accent_choices is not UNSET: + field_dict["accent_choices"] = accent_choices + if language_choices is not UNSET: + field_dict["language_choices"] = language_choices + if conversation_speed_choices is not UNSET: + field_dict["conversation_speed_choices"] = conversation_speed_choices + if tone_choices is not UNSET: + field_dict["tone_choices"] = tone_choices + if verbosity_choices is not UNSET: + field_dict["verbosity_choices"] = verbosity_choices + if punctuation_choices is not UNSET: + field_dict["punctuation_choices"] = punctuation_choices + if emoji_usage_choices is not UNSET: + field_dict["emoji_usage_choices"] = emoji_usage_choices + if slang_usage_choices is not UNSET: + field_dict["slang_usage_choices"] = slang_usage_choices + if typos_frequency_choices is not UNSET: + field_dict["typos_frequency_choices"] = typos_frequency_choices + if regional_mix_choices is not UNSET: + field_dict["regional_mix_choices"] = regional_mix_choices + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + gender_choices = d.pop("gender_choices", UNSET) + + age_group_choices = d.pop("age_group_choices", UNSET) + + location_choices = d.pop("location_choices", UNSET) + + profession_choices = d.pop("profession_choices", UNSET) + + personality_choices = d.pop("personality_choices", UNSET) + + communication_style_choices = d.pop("communication_style_choices", UNSET) + + accent_choices = d.pop("accent_choices", UNSET) + + language_choices = d.pop("language_choices", UNSET) + + conversation_speed_choices = d.pop("conversation_speed_choices", UNSET) + + tone_choices = d.pop("tone_choices", UNSET) + + verbosity_choices = d.pop("verbosity_choices", UNSET) + + punctuation_choices = d.pop("punctuation_choices", UNSET) + + emoji_usage_choices = d.pop("emoji_usage_choices", UNSET) + + slang_usage_choices = d.pop("slang_usage_choices", UNSET) + + typos_frequency_choices = d.pop("typos_frequency_choices", UNSET) + + regional_mix_choices = d.pop("regional_mix_choices", UNSET) + + persona_field_options = cls( + gender_choices=gender_choices, + age_group_choices=age_group_choices, + location_choices=location_choices, + profession_choices=profession_choices, + personality_choices=personality_choices, + communication_style_choices=communication_style_choices, + accent_choices=accent_choices, + language_choices=language_choices, + conversation_speed_choices=conversation_speed_choices, + tone_choices=tone_choices, + verbosity_choices=verbosity_choices, + punctuation_choices=punctuation_choices, + emoji_usage_choices=emoji_usage_choices, + slang_usage_choices=slang_usage_choices, + typos_frequency_choices=typos_frequency_choices, + regional_mix_choices=regional_mix_choices, + ) + + persona_field_options.additional_properties = d + return persona_field_options + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_finished_speaking_sensitivity.py b/python/fi/generated/openapi_client/models/persona_finished_speaking_sensitivity.py new file mode 100644 index 0000000..429dfa7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_finished_speaking_sensitivity.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaFinishedSpeakingSensitivity") + + +@_attrs_define +class PersonaFinishedSpeakingSensitivity: + """List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_finished_speaking_sensitivity = cls() + + persona_finished_speaking_sensitivity.additional_properties = d + return persona_finished_speaking_sensitivity + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_gender.py b/python/fi/generated/openapi_client/models/persona_gender.py new file mode 100644 index 0000000..d8921cd --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_gender.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaGender") + + +@_attrs_define +class PersonaGender: + """List of genders for the persona (e.g., ['male'], ['female'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_gender = cls() + + persona_gender.additional_properties = d + return persona_gender + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_interrupt_sensitivity.py b/python/fi/generated/openapi_client/models/persona_interrupt_sensitivity.py new file mode 100644 index 0000000..aa11d76 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_interrupt_sensitivity.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaInterruptSensitivity") + + +@_attrs_define +class PersonaInterruptSensitivity: + """List of sensitivities for allowing interruptions (e.g., ['5'], ['6'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_interrupt_sensitivity = cls() + + persona_interrupt_sensitivity.additional_properties = d + return persona_interrupt_sensitivity + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_keywords.py b/python/fi/generated/openapi_client/models/persona_keywords.py new file mode 100644 index 0000000..adf8651 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_keywords.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaKeywords") + + +@_attrs_define +class PersonaKeywords: + """List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_keywords = cls() + + persona_keywords.additional_properties = d + return persona_keywords + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_languages.py b/python/fi/generated/openapi_client/models/persona_languages.py new file mode 100644 index 0000000..67d4253 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_languages.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaLanguages") + + +@_attrs_define +class PersonaLanguages: + """List of languages the persona speaks (e.g., ['English', 'Hindi'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_languages = cls() + + persona_languages.additional_properties = d + return persona_languages + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list.py b/python/fi/generated/openapi_client/models/persona_list.py new file mode 100644 index 0000000..a125a8b --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list.py @@ -0,0 +1,637 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.persona_list_emoji_usage import PersonaListEmojiUsage +from ..models.persona_list_persona_type import PersonaListPersonaType +from ..models.persona_list_punctuation import PersonaListPunctuation +from ..models.persona_list_regional_mix import PersonaListRegionalMix +from ..models.persona_list_slang_usage import PersonaListSlangUsage +from ..models.persona_list_tone import PersonaListTone +from ..models.persona_list_typos_frequency import PersonaListTyposFrequency +from ..models.persona_list_verbosity import PersonaListVerbosity +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona_list_accent import PersonaListAccent + from ..models.persona_list_age_group import PersonaListAgeGroup + from ..models.persona_list_communication_style import PersonaListCommunicationStyle + from ..models.persona_list_conversation_speed import PersonaListConversationSpeed + from ..models.persona_list_finished_speaking_sensitivity import ( + PersonaListFinishedSpeakingSensitivity, + ) + from ..models.persona_list_gender import PersonaListGender + from ..models.persona_list_interrupt_sensitivity import ( + PersonaListInterruptSensitivity, + ) + from ..models.persona_list_keywords import PersonaListKeywords + from ..models.persona_list_languages import PersonaListLanguages + from ..models.persona_list_location import PersonaListLocation + from ..models.persona_list_metadata import PersonaListMetadata + from ..models.persona_list_occupation import PersonaListOccupation + from ..models.persona_list_personality import PersonaListPersonality + + +T = TypeVar("T", bound="PersonaList") + + +@_attrs_define +class PersonaList: + """ + Attributes: + id (UUID | Unset): + persona_type (PersonaListPersonaType | Unset): Type of persona (system or workspace-level) + persona_type_display (str | Unset): + name (str | Unset): Name of the persona + description (None | str | Unset): Description of the persona + gender (PersonaListGender | Unset): List of genders for the persona (e.g., ['male'], ['female']) + age_group (PersonaListAgeGroup | Unset): List of age groups for the persona (e.g., ['18-25'], ['25-32']) + occupation (PersonaListOccupation | Unset): List of occupations/professions for the persona (e.g., ['Engineer'], + ['Teacher']) + location (PersonaListLocation | Unset): List of locations for the persona (e.g., ['United States'], ['Canada']) + personality (PersonaListPersonality | Unset): List of personality types for the persona (e.g., ['Friendly and + cooperative']) + communication_style (PersonaListCommunicationStyle | Unset): List of communication styles for the persona (e.g., + ['Direct and concise']) + multilingual (bool | None | Unset): Whether the persona supports multiple languages + languages (PersonaListLanguages | Unset): List of languages the persona speaks (e.g., ['English', 'Hindi']) + accent (PersonaListAccent | Unset): List of accents for the persona (e.g., ['American'], ['Australian']) + conversation_speed (PersonaListConversationSpeed | Unset): List of conversation speeds (e.g., ['1.0'], ['1.25']) + background_sound (bool | None | Unset): Whether background sound is enabled (null=not specified, True/False for + enabled/disabled) + finished_speaking_sensitivity (PersonaListFinishedSpeakingSensitivity | Unset): List of sensitivities for + detecting when persona finished speaking (e.g., ['5'], ['6']) + interrupt_sensitivity (PersonaListInterruptSensitivity | Unset): List of sensitivities for allowing + interruptions (e.g., ['5'], ['6']) + keywords (PersonaListKeywords | Unset): List of keywords/tags describing the persona (e.g., ['Knowledgeable', + 'Patient', 'Helpful']) + metadata (PersonaListMetadata | Unset): Additional metadata for the persona (speech clarity, base emotion, etc.) + additional_instruction (None | str | Unset): Additional instructions for how this persona should behave + is_default (bool | None | Unset): Whether this is a default/recommended persona + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + simulation_type (str | Unset): + punctuation (PersonaListPunctuation | Unset): Punctuation style for the persona + slang_usage (PersonaListSlangUsage | Unset): Slang usage for the persona + typos_frequency (PersonaListTyposFrequency | Unset): Typos frequency for the persona + regional_mix (PersonaListRegionalMix | Unset): Regional mix for the persona + emoji_usage (PersonaListEmojiUsage | Unset): Emoji usage for the persona + tone (PersonaListTone | Unset): Tone for the persona + verbosity (PersonaListVerbosity | Unset): Verbosity for the persona + """ + + id: UUID | Unset = UNSET + persona_type: PersonaListPersonaType | Unset = UNSET + persona_type_display: str | Unset = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + gender: PersonaListGender | Unset = UNSET + age_group: PersonaListAgeGroup | Unset = UNSET + occupation: PersonaListOccupation | Unset = UNSET + location: PersonaListLocation | Unset = UNSET + personality: PersonaListPersonality | Unset = UNSET + communication_style: PersonaListCommunicationStyle | Unset = UNSET + multilingual: bool | None | Unset = UNSET + languages: PersonaListLanguages | Unset = UNSET + accent: PersonaListAccent | Unset = UNSET + conversation_speed: PersonaListConversationSpeed | Unset = UNSET + background_sound: bool | None | Unset = UNSET + finished_speaking_sensitivity: PersonaListFinishedSpeakingSensitivity | Unset = ( + UNSET + ) + interrupt_sensitivity: PersonaListInterruptSensitivity | Unset = UNSET + keywords: PersonaListKeywords | Unset = UNSET + metadata: PersonaListMetadata | Unset = UNSET + additional_instruction: None | str | Unset = UNSET + is_default: bool | None | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + simulation_type: str | Unset = UNSET + punctuation: PersonaListPunctuation | Unset = UNSET + slang_usage: PersonaListSlangUsage | Unset = UNSET + typos_frequency: PersonaListTyposFrequency | Unset = UNSET + regional_mix: PersonaListRegionalMix | Unset = UNSET + emoji_usage: PersonaListEmojiUsage | Unset = UNSET + tone: PersonaListTone | Unset = UNSET + verbosity: PersonaListVerbosity | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + persona_type: str | Unset = UNSET + if not isinstance(self.persona_type, Unset): + persona_type = self.persona_type.value + + persona_type_display = self.persona_type_display + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + gender: dict[str, Any] | Unset = UNSET + if not isinstance(self.gender, Unset): + gender = self.gender.to_dict() + + age_group: dict[str, Any] | Unset = UNSET + if not isinstance(self.age_group, Unset): + age_group = self.age_group.to_dict() + + occupation: dict[str, Any] | Unset = UNSET + if not isinstance(self.occupation, Unset): + occupation = self.occupation.to_dict() + + location: dict[str, Any] | Unset = UNSET + if not isinstance(self.location, Unset): + location = self.location.to_dict() + + personality: dict[str, Any] | Unset = UNSET + if not isinstance(self.personality, Unset): + personality = self.personality.to_dict() + + communication_style: dict[str, Any] | Unset = UNSET + if not isinstance(self.communication_style, Unset): + communication_style = self.communication_style.to_dict() + + multilingual: bool | None | Unset + if isinstance(self.multilingual, Unset): + multilingual = UNSET + else: + multilingual = self.multilingual + + languages: dict[str, Any] | Unset = UNSET + if not isinstance(self.languages, Unset): + languages = self.languages.to_dict() + + accent: dict[str, Any] | Unset = UNSET + if not isinstance(self.accent, Unset): + accent = self.accent.to_dict() + + conversation_speed: dict[str, Any] | Unset = UNSET + if not isinstance(self.conversation_speed, Unset): + conversation_speed = self.conversation_speed.to_dict() + + background_sound: bool | None | Unset + if isinstance(self.background_sound, Unset): + background_sound = UNSET + else: + background_sound = self.background_sound + + finished_speaking_sensitivity: dict[str, Any] | Unset = UNSET + if not isinstance(self.finished_speaking_sensitivity, Unset): + finished_speaking_sensitivity = self.finished_speaking_sensitivity.to_dict() + + interrupt_sensitivity: dict[str, Any] | Unset = UNSET + if not isinstance(self.interrupt_sensitivity, Unset): + interrupt_sensitivity = self.interrupt_sensitivity.to_dict() + + keywords: dict[str, Any] | Unset = UNSET + if not isinstance(self.keywords, Unset): + keywords = self.keywords.to_dict() + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + additional_instruction: None | str | Unset + if isinstance(self.additional_instruction, Unset): + additional_instruction = UNSET + else: + additional_instruction = self.additional_instruction + + is_default: bool | None | Unset + if isinstance(self.is_default, Unset): + is_default = UNSET + else: + is_default = self.is_default + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + simulation_type = self.simulation_type + + punctuation: str | Unset = UNSET + if not isinstance(self.punctuation, Unset): + punctuation = self.punctuation.value + + slang_usage: str | Unset = UNSET + if not isinstance(self.slang_usage, Unset): + slang_usage = self.slang_usage.value + + typos_frequency: str | Unset = UNSET + if not isinstance(self.typos_frequency, Unset): + typos_frequency = self.typos_frequency.value + + regional_mix: str | Unset = UNSET + if not isinstance(self.regional_mix, Unset): + regional_mix = self.regional_mix.value + + emoji_usage: str | Unset = UNSET + if not isinstance(self.emoji_usage, Unset): + emoji_usage = self.emoji_usage.value + + tone: str | Unset = UNSET + if not isinstance(self.tone, Unset): + tone = self.tone.value + + verbosity: str | Unset = UNSET + if not isinstance(self.verbosity, Unset): + verbosity = self.verbosity.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if persona_type is not UNSET: + field_dict["persona_type"] = persona_type + if persona_type_display is not UNSET: + field_dict["persona_type_display"] = persona_type_display + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if gender is not UNSET: + field_dict["gender"] = gender + if age_group is not UNSET: + field_dict["age_group"] = age_group + if occupation is not UNSET: + field_dict["occupation"] = occupation + if location is not UNSET: + field_dict["location"] = location + if personality is not UNSET: + field_dict["personality"] = personality + if communication_style is not UNSET: + field_dict["communication_style"] = communication_style + if multilingual is not UNSET: + field_dict["multilingual"] = multilingual + if languages is not UNSET: + field_dict["languages"] = languages + if accent is not UNSET: + field_dict["accent"] = accent + if conversation_speed is not UNSET: + field_dict["conversation_speed"] = conversation_speed + if background_sound is not UNSET: + field_dict["background_sound"] = background_sound + if finished_speaking_sensitivity is not UNSET: + field_dict["finished_speaking_sensitivity"] = finished_speaking_sensitivity + if interrupt_sensitivity is not UNSET: + field_dict["interrupt_sensitivity"] = interrupt_sensitivity + if keywords is not UNSET: + field_dict["keywords"] = keywords + if metadata is not UNSET: + field_dict["metadata"] = metadata + if additional_instruction is not UNSET: + field_dict["additional_instruction"] = additional_instruction + if is_default is not UNSET: + field_dict["is_default"] = is_default + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if simulation_type is not UNSET: + field_dict["simulation_type"] = simulation_type + if punctuation is not UNSET: + field_dict["punctuation"] = punctuation + if slang_usage is not UNSET: + field_dict["slang_usage"] = slang_usage + if typos_frequency is not UNSET: + field_dict["typos_frequency"] = typos_frequency + if regional_mix is not UNSET: + field_dict["regional_mix"] = regional_mix + if emoji_usage is not UNSET: + field_dict["emoji_usage"] = emoji_usage + if tone is not UNSET: + field_dict["tone"] = tone + if verbosity is not UNSET: + field_dict["verbosity"] = verbosity + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona_list_accent import PersonaListAccent + from ..models.persona_list_age_group import PersonaListAgeGroup + from ..models.persona_list_communication_style import ( + PersonaListCommunicationStyle, + ) + from ..models.persona_list_conversation_speed import ( + PersonaListConversationSpeed, + ) + from ..models.persona_list_finished_speaking_sensitivity import ( + PersonaListFinishedSpeakingSensitivity, + ) + from ..models.persona_list_gender import PersonaListGender + from ..models.persona_list_interrupt_sensitivity import ( + PersonaListInterruptSensitivity, + ) + from ..models.persona_list_keywords import PersonaListKeywords + from ..models.persona_list_languages import PersonaListLanguages + from ..models.persona_list_location import PersonaListLocation + from ..models.persona_list_metadata import PersonaListMetadata + from ..models.persona_list_occupation import PersonaListOccupation + from ..models.persona_list_personality import PersonaListPersonality + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _persona_type = d.pop("persona_type", UNSET) + persona_type: PersonaListPersonaType | Unset + if isinstance(_persona_type, Unset): + persona_type = UNSET + else: + persona_type = PersonaListPersonaType(_persona_type) + + persona_type_display = d.pop("persona_type_display", UNSET) + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + _gender = d.pop("gender", UNSET) + gender: PersonaListGender | Unset + if isinstance(_gender, Unset): + gender = UNSET + else: + gender = PersonaListGender.from_dict(_gender) + + _age_group = d.pop("age_group", UNSET) + age_group: PersonaListAgeGroup | Unset + if isinstance(_age_group, Unset): + age_group = UNSET + else: + age_group = PersonaListAgeGroup.from_dict(_age_group) + + _occupation = d.pop("occupation", UNSET) + occupation: PersonaListOccupation | Unset + if isinstance(_occupation, Unset): + occupation = UNSET + else: + occupation = PersonaListOccupation.from_dict(_occupation) + + _location = d.pop("location", UNSET) + location: PersonaListLocation | Unset + if isinstance(_location, Unset): + location = UNSET + else: + location = PersonaListLocation.from_dict(_location) + + _personality = d.pop("personality", UNSET) + personality: PersonaListPersonality | Unset + if isinstance(_personality, Unset): + personality = UNSET + else: + personality = PersonaListPersonality.from_dict(_personality) + + _communication_style = d.pop("communication_style", UNSET) + communication_style: PersonaListCommunicationStyle | Unset + if isinstance(_communication_style, Unset): + communication_style = UNSET + else: + communication_style = PersonaListCommunicationStyle.from_dict( + _communication_style + ) + + def _parse_multilingual(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + multilingual = _parse_multilingual(d.pop("multilingual", UNSET)) + + _languages = d.pop("languages", UNSET) + languages: PersonaListLanguages | Unset + if isinstance(_languages, Unset): + languages = UNSET + else: + languages = PersonaListLanguages.from_dict(_languages) + + _accent = d.pop("accent", UNSET) + accent: PersonaListAccent | Unset + if isinstance(_accent, Unset): + accent = UNSET + else: + accent = PersonaListAccent.from_dict(_accent) + + _conversation_speed = d.pop("conversation_speed", UNSET) + conversation_speed: PersonaListConversationSpeed | Unset + if isinstance(_conversation_speed, Unset): + conversation_speed = UNSET + else: + conversation_speed = PersonaListConversationSpeed.from_dict( + _conversation_speed + ) + + def _parse_background_sound(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + background_sound = _parse_background_sound(d.pop("background_sound", UNSET)) + + _finished_speaking_sensitivity = d.pop("finished_speaking_sensitivity", UNSET) + finished_speaking_sensitivity: PersonaListFinishedSpeakingSensitivity | Unset + if isinstance(_finished_speaking_sensitivity, Unset): + finished_speaking_sensitivity = UNSET + else: + finished_speaking_sensitivity = ( + PersonaListFinishedSpeakingSensitivity.from_dict( + _finished_speaking_sensitivity + ) + ) + + _interrupt_sensitivity = d.pop("interrupt_sensitivity", UNSET) + interrupt_sensitivity: PersonaListInterruptSensitivity | Unset + if isinstance(_interrupt_sensitivity, Unset): + interrupt_sensitivity = UNSET + else: + interrupt_sensitivity = PersonaListInterruptSensitivity.from_dict( + _interrupt_sensitivity + ) + + _keywords = d.pop("keywords", UNSET) + keywords: PersonaListKeywords | Unset + if isinstance(_keywords, Unset): + keywords = UNSET + else: + keywords = PersonaListKeywords.from_dict(_keywords) + + _metadata = d.pop("metadata", UNSET) + metadata: PersonaListMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = PersonaListMetadata.from_dict(_metadata) + + def _parse_additional_instruction(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + additional_instruction = _parse_additional_instruction( + d.pop("additional_instruction", UNSET) + ) + + def _parse_is_default(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_default = _parse_is_default(d.pop("is_default", UNSET)) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + simulation_type = d.pop("simulation_type", UNSET) + + _punctuation = d.pop("punctuation", UNSET) + punctuation: PersonaListPunctuation | Unset + if isinstance(_punctuation, Unset): + punctuation = UNSET + else: + punctuation = PersonaListPunctuation(_punctuation) + + _slang_usage = d.pop("slang_usage", UNSET) + slang_usage: PersonaListSlangUsage | Unset + if isinstance(_slang_usage, Unset): + slang_usage = UNSET + else: + slang_usage = PersonaListSlangUsage(_slang_usage) + + _typos_frequency = d.pop("typos_frequency", UNSET) + typos_frequency: PersonaListTyposFrequency | Unset + if isinstance(_typos_frequency, Unset): + typos_frequency = UNSET + else: + typos_frequency = PersonaListTyposFrequency(_typos_frequency) + + _regional_mix = d.pop("regional_mix", UNSET) + regional_mix: PersonaListRegionalMix | Unset + if isinstance(_regional_mix, Unset): + regional_mix = UNSET + else: + regional_mix = PersonaListRegionalMix(_regional_mix) + + _emoji_usage = d.pop("emoji_usage", UNSET) + emoji_usage: PersonaListEmojiUsage | Unset + if isinstance(_emoji_usage, Unset): + emoji_usage = UNSET + else: + emoji_usage = PersonaListEmojiUsage(_emoji_usage) + + _tone = d.pop("tone", UNSET) + tone: PersonaListTone | Unset + if isinstance(_tone, Unset): + tone = UNSET + else: + tone = PersonaListTone(_tone) + + _verbosity = d.pop("verbosity", UNSET) + verbosity: PersonaListVerbosity | Unset + if isinstance(_verbosity, Unset): + verbosity = UNSET + else: + verbosity = PersonaListVerbosity(_verbosity) + + persona_list = cls( + id=id, + persona_type=persona_type, + persona_type_display=persona_type_display, + name=name, + description=description, + gender=gender, + age_group=age_group, + occupation=occupation, + location=location, + personality=personality, + communication_style=communication_style, + multilingual=multilingual, + languages=languages, + accent=accent, + conversation_speed=conversation_speed, + background_sound=background_sound, + finished_speaking_sensitivity=finished_speaking_sensitivity, + interrupt_sensitivity=interrupt_sensitivity, + keywords=keywords, + metadata=metadata, + additional_instruction=additional_instruction, + is_default=is_default, + created_at=created_at, + updated_at=updated_at, + simulation_type=simulation_type, + punctuation=punctuation, + slang_usage=slang_usage, + typos_frequency=typos_frequency, + regional_mix=regional_mix, + emoji_usage=emoji_usage, + tone=tone, + verbosity=verbosity, + ) + + persona_list.additional_properties = d + return persona_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_accent.py b/python/fi/generated/openapi_client/models/persona_list_accent.py new file mode 100644 index 0000000..d283011 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_accent.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListAccent") + + +@_attrs_define +class PersonaListAccent: + """List of accents for the persona (e.g., ['American'], ['Australian'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_accent = cls() + + persona_list_accent.additional_properties = d + return persona_list_accent + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_age_group.py b/python/fi/generated/openapi_client/models/persona_list_age_group.py new file mode 100644 index 0000000..d377605 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_age_group.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListAgeGroup") + + +@_attrs_define +class PersonaListAgeGroup: + """List of age groups for the persona (e.g., ['18-25'], ['25-32'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_age_group = cls() + + persona_list_age_group.additional_properties = d + return persona_list_age_group + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_communication_style.py b/python/fi/generated/openapi_client/models/persona_list_communication_style.py new file mode 100644 index 0000000..56f4806 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_communication_style.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListCommunicationStyle") + + +@_attrs_define +class PersonaListCommunicationStyle: + """List of communication styles for the persona (e.g., ['Direct and concise'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_communication_style = cls() + + persona_list_communication_style.additional_properties = d + return persona_list_communication_style + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_conversation_speed.py b/python/fi/generated/openapi_client/models/persona_list_conversation_speed.py new file mode 100644 index 0000000..84b1101 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_conversation_speed.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListConversationSpeed") + + +@_attrs_define +class PersonaListConversationSpeed: + """List of conversation speeds (e.g., ['1.0'], ['1.25'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_conversation_speed = cls() + + persona_list_conversation_speed.additional_properties = d + return persona_list_conversation_speed + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_emoji_usage.py b/python/fi/generated/openapi_client/models/persona_list_emoji_usage.py new file mode 100644 index 0000000..0f25657 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_emoji_usage.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaListEmojiUsage(str, Enum): + HEAVY = "heavy" + LIGHT = "light" + NEVER = "never" + REGULAR = "regular" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_list_finished_speaking_sensitivity.py b/python/fi/generated/openapi_client/models/persona_list_finished_speaking_sensitivity.py new file mode 100644 index 0000000..987b32e --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_finished_speaking_sensitivity.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListFinishedSpeakingSensitivity") + + +@_attrs_define +class PersonaListFinishedSpeakingSensitivity: + """List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_finished_speaking_sensitivity = cls() + + persona_list_finished_speaking_sensitivity.additional_properties = d + return persona_list_finished_speaking_sensitivity + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_gender.py b/python/fi/generated/openapi_client/models/persona_list_gender.py new file mode 100644 index 0000000..7b8de16 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_gender.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListGender") + + +@_attrs_define +class PersonaListGender: + """List of genders for the persona (e.g., ['male'], ['female'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_gender = cls() + + persona_list_gender.additional_properties = d + return persona_list_gender + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_interrupt_sensitivity.py b/python/fi/generated/openapi_client/models/persona_list_interrupt_sensitivity.py new file mode 100644 index 0000000..3d9d7a7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_interrupt_sensitivity.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListInterruptSensitivity") + + +@_attrs_define +class PersonaListInterruptSensitivity: + """List of sensitivities for allowing interruptions (e.g., ['5'], ['6'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_interrupt_sensitivity = cls() + + persona_list_interrupt_sensitivity.additional_properties = d + return persona_list_interrupt_sensitivity + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_keywords.py b/python/fi/generated/openapi_client/models/persona_list_keywords.py new file mode 100644 index 0000000..8888aa2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_keywords.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListKeywords") + + +@_attrs_define +class PersonaListKeywords: + """List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_keywords = cls() + + persona_list_keywords.additional_properties = d + return persona_list_keywords + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_languages.py b/python/fi/generated/openapi_client/models/persona_list_languages.py new file mode 100644 index 0000000..92d2b00 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_languages.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListLanguages") + + +@_attrs_define +class PersonaListLanguages: + """List of languages the persona speaks (e.g., ['English', 'Hindi'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_languages = cls() + + persona_list_languages.additional_properties = d + return persona_list_languages + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_location.py b/python/fi/generated/openapi_client/models/persona_list_location.py new file mode 100644 index 0000000..55c1a3b --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_location.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListLocation") + + +@_attrs_define +class PersonaListLocation: + """List of locations for the persona (e.g., ['United States'], ['Canada'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_location = cls() + + persona_list_location.additional_properties = d + return persona_list_location + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_metadata.py b/python/fi/generated/openapi_client/models/persona_list_metadata.py new file mode 100644 index 0000000..050d3b2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListMetadata") + + +@_attrs_define +class PersonaListMetadata: + """Additional metadata for the persona (speech clarity, base emotion, etc.)""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_metadata = cls() + + persona_list_metadata.additional_properties = d + return persona_list_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_occupation.py b/python/fi/generated/openapi_client/models/persona_list_occupation.py new file mode 100644 index 0000000..d92dcc2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_occupation.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListOccupation") + + +@_attrs_define +class PersonaListOccupation: + """List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_occupation = cls() + + persona_list_occupation.additional_properties = d + return persona_list_occupation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_persona_type.py b/python/fi/generated/openapi_client/models/persona_list_persona_type.py new file mode 100644 index 0000000..26c4449 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_persona_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PersonaListPersonaType(str, Enum): + SYSTEM = "system" + WORKSPACE = "workspace" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_list_personality.py b/python/fi/generated/openapi_client/models/persona_list_personality.py new file mode 100644 index 0000000..94b0947 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_personality.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaListPersonality") + + +@_attrs_define +class PersonaListPersonality: + """List of personality types for the persona (e.g., ['Friendly and cooperative'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_list_personality = cls() + + persona_list_personality.additional_properties = d + return persona_list_personality + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_list_punctuation.py b/python/fi/generated/openapi_client/models/persona_list_punctuation.py new file mode 100644 index 0000000..4c24d03 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_punctuation.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaListPunctuation(str, Enum): + CLEAN = "clean" + ERRATIC = "erratic" + EXPRESSIVE = "expressive" + MINIMAL = "minimal" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_list_regional_mix.py b/python/fi/generated/openapi_client/models/persona_list_regional_mix.py new file mode 100644 index 0000000..e17d61d --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_regional_mix.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaListRegionalMix(str, Enum): + HEAVY = "heavy" + LIGHT = "light" + MODERATE = "moderate" + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_list_slang_usage.py b/python/fi/generated/openapi_client/models/persona_list_slang_usage.py new file mode 100644 index 0000000..8f4d6b2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_slang_usage.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaListSlangUsage(str, Enum): + HEAVY = "heavy" + LIGHT = "light" + MODERATE = "moderate" + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_list_tone.py b/python/fi/generated/openapi_client/models/persona_list_tone.py new file mode 100644 index 0000000..de7e6bb --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_tone.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class PersonaListTone(str, Enum): + CASUAL = "casual" + FORMAL = "formal" + NEUTRAL = "neutral" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_list_typos_frequency.py b/python/fi/generated/openapi_client/models/persona_list_typos_frequency.py new file mode 100644 index 0000000..fb898df --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_typos_frequency.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaListTyposFrequency(str, Enum): + FREQUENT = "frequent" + NONE = "none" + OCCASIONAL = "occasional" + RARE = "rare" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_list_verbosity.py b/python/fi/generated/openapi_client/models/persona_list_verbosity.py new file mode 100644 index 0000000..d367bda --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_list_verbosity.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class PersonaListVerbosity(str, Enum): + BALANCED = "balanced" + BRIEF = "brief" + DETAILED = "detailed" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_location.py b/python/fi/generated/openapi_client/models/persona_location.py new file mode 100644 index 0000000..e3a7e08 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_location.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaLocation") + + +@_attrs_define +class PersonaLocation: + """List of locations for the persona (e.g., ['United States'], ['Canada'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_location = cls() + + persona_location.additional_properties = d + return persona_location + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_metadata.py b/python/fi/generated/openapi_client/models/persona_metadata.py new file mode 100644 index 0000000..8c3b3ec --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaMetadata") + + +@_attrs_define +class PersonaMetadata: + """Additional metadata for the persona (speech clarity, base emotion, etc.)""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_metadata = cls() + + persona_metadata.additional_properties = d + return persona_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_occupation.py b/python/fi/generated/openapi_client/models/persona_occupation.py new file mode 100644 index 0000000..9f74800 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_occupation.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaOccupation") + + +@_attrs_define +class PersonaOccupation: + """List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_occupation = cls() + + persona_occupation.additional_properties = d + return persona_occupation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_persona_type.py b/python/fi/generated/openapi_client/models/persona_persona_type.py new file mode 100644 index 0000000..46580e1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_persona_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PersonaPersonaType(str, Enum): + SYSTEM = "system" + WORKSPACE = "workspace" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_personality.py b/python/fi/generated/openapi_client/models/persona_personality.py new file mode 100644 index 0000000..190b926 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_personality.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonaPersonality") + + +@_attrs_define +class PersonaPersonality: + """List of personality types for the persona (e.g., ['Friendly and cooperative'])""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persona_personality = cls() + + persona_personality.additional_properties = d + return persona_personality + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/persona_punctuation.py b/python/fi/generated/openapi_client/models/persona_punctuation.py new file mode 100644 index 0000000..6a8747a --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_punctuation.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaPunctuation(str, Enum): + CLEAN = "clean" + ERRATIC = "erratic" + EXPRESSIVE = "expressive" + MINIMAL = "minimal" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_regional_mix.py b/python/fi/generated/openapi_client/models/persona_regional_mix.py new file mode 100644 index 0000000..9a9daa7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_regional_mix.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaRegionalMix(str, Enum): + HEAVY = "heavy" + LIGHT = "light" + MODERATE = "moderate" + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_simulation_type.py b/python/fi/generated/openapi_client/models/persona_simulation_type.py new file mode 100644 index 0000000..4c92e48 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_simulation_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PersonaSimulationType(str, Enum): + TEXT = "text" + VOICE = "voice" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_slang_usage.py b/python/fi/generated/openapi_client/models/persona_slang_usage.py new file mode 100644 index 0000000..36de079 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_slang_usage.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaSlangUsage(str, Enum): + HEAVY = "heavy" + LIGHT = "light" + MODERATE = "moderate" + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_tone.py b/python/fi/generated/openapi_client/models/persona_tone.py new file mode 100644 index 0000000..1434948 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_tone.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class PersonaTone(str, Enum): + CASUAL = "casual" + FORMAL = "formal" + NEUTRAL = "neutral" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_typos_frequency.py b/python/fi/generated/openapi_client/models/persona_typos_frequency.py new file mode 100644 index 0000000..22ffc13 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_typos_frequency.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class PersonaTyposFrequency(str, Enum): + FREQUENT = "frequent" + NONE = "none" + OCCASIONAL = "occasional" + RARE = "rare" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/persona_verbosity.py b/python/fi/generated/openapi_client/models/persona_verbosity.py new file mode 100644 index 0000000..4911063 --- /dev/null +++ b/python/fi/generated/openapi_client/models/persona_verbosity.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class PersonaVerbosity(str, Enum): + BALANCED = "balanced" + BRIEF = "brief" + DETAILED = "detailed" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_request.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_request.py new file mode 100644 index 0000000..0896be3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_request.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.preview_dataset_operation_request_config import ( + PreviewDatasetOperationRequestConfig, + ) + + +T = TypeVar("T", bound="PreviewDatasetOperationRequest") + + +@_attrs_define +class PreviewDatasetOperationRequest: + """ + Attributes: + column_id (UUID | Unset): + json_key (str | Unset): + labels (list[str] | Unset): + instruction (str | Unset): + language_model_id (str | Unset): + config (PreviewDatasetOperationRequestConfig | Unset): + code (str | Unset): + """ + + column_id: UUID | Unset = UNSET + json_key: str | Unset = UNSET + labels: list[str] | Unset = UNSET + instruction: str | Unset = UNSET + language_model_id: str | Unset = UNSET + config: PreviewDatasetOperationRequestConfig | Unset = UNSET + code: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id: str | Unset = UNSET + if not isinstance(self.column_id, Unset): + column_id = str(self.column_id) + + json_key = self.json_key + + labels: list[str] | Unset = UNSET + if not isinstance(self.labels, Unset): + labels = self.labels + + instruction = self.instruction + + language_model_id = self.language_model_id + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + code = self.code + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if column_id is not UNSET: + field_dict["column_id"] = column_id + if json_key is not UNSET: + field_dict["json_key"] = json_key + if labels is not UNSET: + field_dict["labels"] = labels + if instruction is not UNSET: + field_dict["instruction"] = instruction + if language_model_id is not UNSET: + field_dict["language_model_id"] = language_model_id + if config is not UNSET: + field_dict["config"] = config + if code is not UNSET: + field_dict["code"] = code + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.preview_dataset_operation_request_config import ( + PreviewDatasetOperationRequestConfig, + ) + + d = dict(src_dict) + _column_id = d.pop("column_id", UNSET) + column_id: UUID | Unset + if isinstance(_column_id, Unset): + column_id = UNSET + else: + column_id = UUID(_column_id) + + json_key = d.pop("json_key", UNSET) + + labels = cast(list[str], d.pop("labels", UNSET)) + + instruction = d.pop("instruction", UNSET) + + language_model_id = d.pop("language_model_id", UNSET) + + _config = d.pop("config", UNSET) + config: PreviewDatasetOperationRequestConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = PreviewDatasetOperationRequestConfig.from_dict(_config) + + code = d.pop("code", UNSET) + + preview_dataset_operation_request = cls( + column_id=column_id, + json_key=json_key, + labels=labels, + instruction=instruction, + language_model_id=language_model_id, + config=config, + code=code, + ) + + preview_dataset_operation_request.additional_properties = d + return preview_dataset_operation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_request_config.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_request_config.py new file mode 100644 index 0000000..733f8a8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PreviewDatasetOperationRequestConfig") + + +@_attrs_define +class PreviewDatasetOperationRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + preview_dataset_operation_request_config = cls() + + preview_dataset_operation_request_config.additional_properties = d + return preview_dataset_operation_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_response.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_response.py new file mode 100644 index 0000000..61ae72b --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.preview_dataset_operation_result import PreviewDatasetOperationResult + + +T = TypeVar("T", bound="PreviewDatasetOperationResponse") + + +@_attrs_define +class PreviewDatasetOperationResponse: + """ + Attributes: + status (bool): + result (PreviewDatasetOperationResult): + """ + + status: bool + result: PreviewDatasetOperationResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.preview_dataset_operation_result import ( + PreviewDatasetOperationResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = PreviewDatasetOperationResult.from_dict(d.pop("result")) + + preview_dataset_operation_response = cls( + status=status, + result=result, + ) + + preview_dataset_operation_response.additional_properties = d + return preview_dataset_operation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_result.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_result.py new file mode 100644 index 0000000..6c6d101 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_result.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.preview_dataset_operation_result_item import ( + PreviewDatasetOperationResultItem, + ) + + +T = TypeVar("T", bound="PreviewDatasetOperationResult") + + +@_attrs_define +class PreviewDatasetOperationResult: + """ + Attributes: + message (str): + preview_results (list[PreviewDatasetOperationResultItem]): + sample_size (int): + """ + + message: str + preview_results: list[PreviewDatasetOperationResultItem] + sample_size: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + preview_results = [] + for preview_results_item_data in self.preview_results: + preview_results_item = preview_results_item_data.to_dict() + preview_results.append(preview_results_item) + + sample_size = self.sample_size + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "preview_results": preview_results, + "sample_size": sample_size, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.preview_dataset_operation_result_item import ( + PreviewDatasetOperationResultItem, + ) + + d = dict(src_dict) + message = d.pop("message") + + preview_results = [] + _preview_results = d.pop("preview_results") + for preview_results_item_data in _preview_results: + preview_results_item = PreviewDatasetOperationResultItem.from_dict( + preview_results_item_data + ) + + preview_results.append(preview_results_item) + + sample_size = d.pop("sample_size") + + preview_dataset_operation_result = cls( + message=message, + preview_results=preview_results, + sample_size=sample_size, + ) + + preview_dataset_operation_result.additional_properties = d + return preview_dataset_operation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item.py new file mode 100644 index 0000000..dc8b199 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.preview_dataset_operation_result_item_details import ( + PreviewDatasetOperationResultItemDetails, + ) + from ..models.preview_dataset_operation_result_item_input import ( + PreviewDatasetOperationResultItemInput, + ) + from ..models.preview_dataset_operation_result_item_output import ( + PreviewDatasetOperationResultItemOutput, + ) + + +T = TypeVar("T", bound="PreviewDatasetOperationResultItem") + + +@_attrs_define +class PreviewDatasetOperationResultItem: + """ + Attributes: + row_id (UUID): + input_ (PreviewDatasetOperationResultItemInput | Unset): + output (PreviewDatasetOperationResultItemOutput | Unset): + details (PreviewDatasetOperationResultItemDetails | Unset): + """ + + row_id: UUID + input_: PreviewDatasetOperationResultItemInput | Unset = UNSET + output: PreviewDatasetOperationResultItemOutput | Unset = UNSET + details: PreviewDatasetOperationResultItemDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + row_id = str(self.row_id) + + input_: dict[str, Any] | Unset = UNSET + if not isinstance(self.input_, Unset): + input_ = self.input_.to_dict() + + output: dict[str, Any] | Unset = UNSET + if not isinstance(self.output, Unset): + output = self.output.to_dict() + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "row_id": row_id, + } + ) + if input_ is not UNSET: + field_dict["input"] = input_ + if output is not UNSET: + field_dict["output"] = output + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.preview_dataset_operation_result_item_details import ( + PreviewDatasetOperationResultItemDetails, + ) + from ..models.preview_dataset_operation_result_item_input import ( + PreviewDatasetOperationResultItemInput, + ) + from ..models.preview_dataset_operation_result_item_output import ( + PreviewDatasetOperationResultItemOutput, + ) + + d = dict(src_dict) + row_id = UUID(d.pop("row_id")) + + _input_ = d.pop("input", UNSET) + input_: PreviewDatasetOperationResultItemInput | Unset + if isinstance(_input_, Unset): + input_ = UNSET + else: + input_ = PreviewDatasetOperationResultItemInput.from_dict(_input_) + + _output = d.pop("output", UNSET) + output: PreviewDatasetOperationResultItemOutput | Unset + if isinstance(_output, Unset): + output = UNSET + else: + output = PreviewDatasetOperationResultItemOutput.from_dict(_output) + + _details = d.pop("details", UNSET) + details: PreviewDatasetOperationResultItemDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = PreviewDatasetOperationResultItemDetails.from_dict(_details) + + preview_dataset_operation_result_item = cls( + row_id=row_id, + input_=input_, + output=output, + details=details, + ) + + preview_dataset_operation_result_item.additional_properties = d + return preview_dataset_operation_result_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_details.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_details.py new file mode 100644 index 0000000..015fab2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_details.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PreviewDatasetOperationResultItemDetails") + + +@_attrs_define +class PreviewDatasetOperationResultItemDetails: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + preview_dataset_operation_result_item_details = cls() + + preview_dataset_operation_result_item_details.additional_properties = d + return preview_dataset_operation_result_item_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_input.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_input.py new file mode 100644 index 0000000..1e05d95 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_input.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PreviewDatasetOperationResultItemInput") + + +@_attrs_define +class PreviewDatasetOperationResultItemInput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + preview_dataset_operation_result_item_input = cls() + + preview_dataset_operation_result_item_input.additional_properties = d + return preview_dataset_operation_result_item_input + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_output.py b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_output.py new file mode 100644 index 0000000..6fc18bb --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_dataset_operation_result_item_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PreviewDatasetOperationResultItemOutput") + + +@_attrs_define +class PreviewDatasetOperationResultItemOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + preview_dataset_operation_result_item_output = cls() + + preview_dataset_operation_result_item_output.additional_properties = d + return preview_dataset_operation_result_item_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_run_eval_request.py b/python/fi/generated/openapi_client/models/preview_run_eval_request.py new file mode 100644 index 0000000..ed69905 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_run_eval_request.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.preview_run_eval_request_config import PreviewRunEvalRequestConfig + + +T = TypeVar("T", bound="PreviewRunEvalRequest") + + +@_attrs_define +class PreviewRunEvalRequest: + """ + Attributes: + config (PreviewRunEvalRequestConfig): + template_id (UUID): + model (str | Unset): + sdk_uuid (str | Unset): + source (str | Unset): + protect_flash (bool | Unset): Default: False. + """ + + config: PreviewRunEvalRequestConfig + template_id: UUID + model: str | Unset = UNSET + sdk_uuid: str | Unset = UNSET + source: str | Unset = UNSET + protect_flash: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + config = self.config.to_dict() + + template_id = str(self.template_id) + + model = self.model + + sdk_uuid = self.sdk_uuid + + source = self.source + + protect_flash = self.protect_flash + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "config": config, + "template_id": template_id, + } + ) + if model is not UNSET: + field_dict["model"] = model + if sdk_uuid is not UNSET: + field_dict["sdk_uuid"] = sdk_uuid + if source is not UNSET: + field_dict["source"] = source + if protect_flash is not UNSET: + field_dict["protect_flash"] = protect_flash + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.preview_run_eval_request_config import PreviewRunEvalRequestConfig + + d = dict(src_dict) + config = PreviewRunEvalRequestConfig.from_dict(d.pop("config")) + + template_id = UUID(d.pop("template_id")) + + model = d.pop("model", UNSET) + + sdk_uuid = d.pop("sdk_uuid", UNSET) + + source = d.pop("source", UNSET) + + protect_flash = d.pop("protect_flash", UNSET) + + preview_run_eval_request = cls( + config=config, + template_id=template_id, + model=model, + sdk_uuid=sdk_uuid, + source=source, + protect_flash=protect_flash, + ) + + preview_run_eval_request.additional_properties = d + return preview_run_eval_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_run_eval_request_config.py b/python/fi/generated/openapi_client/models/preview_run_eval_request_config.py new file mode 100644 index 0000000..7123d49 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_run_eval_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PreviewRunEvalRequestConfig") + + +@_attrs_define +class PreviewRunEvalRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + preview_run_eval_request_config = cls() + + preview_run_eval_request_config.additional_properties = d + return preview_run_eval_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/preview_run_prompt.py b/python/fi/generated/openapi_client/models/preview_run_prompt.py new file mode 100644 index 0000000..6689eb1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/preview_run_prompt.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_config import PromptConfig + + +T = TypeVar("T", bound="PreviewRunPrompt") + + +@_attrs_define +class PreviewRunPrompt: + """ + Attributes: + dataset_id (UUID): + name (str): + config (PromptConfig | Unset): + first_n_rows (int | Unset): + row_indices (list[int] | Unset): List of row indices to preview. Must contain at least one integer. + """ + + dataset_id: UUID + name: str + config: PromptConfig | Unset = UNSET + first_n_rows: int | Unset = UNSET + row_indices: list[int] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + name = self.name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + first_n_rows = self.first_n_rows + + row_indices: list[int] | Unset = UNSET + if not isinstance(self.row_indices, Unset): + row_indices = self.row_indices + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + "name": name, + } + ) + if config is not UNSET: + field_dict["config"] = config + if first_n_rows is not UNSET: + field_dict["first_n_rows"] = first_n_rows + if row_indices is not UNSET: + field_dict["row_indices"] = row_indices + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_config import PromptConfig + + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + name = d.pop("name") + + _config = d.pop("config", UNSET) + config: PromptConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = PromptConfig.from_dict(_config) + + first_n_rows = d.pop("first_n_rows", UNSET) + + row_indices = cast(list[int], d.pop("row_indices", UNSET)) + + preview_run_prompt = cls( + dataset_id=dataset_id, + name=name, + config=config, + first_n_rows=first_n_rows, + row_indices=row_indices, + ) + + preview_run_prompt.additional_properties = d + return preview_run_prompt + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/project.py b/python/fi/generated/openapi_client/models/project.py new file mode 100644 index 0000000..e3849ac --- /dev/null +++ b/python/fi/generated/openapi_client/models/project.py @@ -0,0 +1,271 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.project_model_type import ProjectModelType +from ..models.project_source import ProjectSource +from ..models.project_trace_type import ProjectTraceType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.project_config import ProjectConfig + from ..models.project_metadata import ProjectMetadata + from ..models.project_session_config import ProjectSessionConfig + from ..models.project_tags import ProjectTags + + +T = TypeVar("T", bound="Project") + + +@_attrs_define +class Project: + """ + Attributes: + model_type (ProjectModelType): + name (str): + trace_type (ProjectTraceType): + id (UUID | Unset): + metadata (ProjectMetadata | Unset): + organization (UUID | Unset): + workspace (None | Unset | UUID): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + config (ProjectConfig | Unset): Any valid JSON value. + source (ProjectSource | Unset): + session_config (ProjectSessionConfig | Unset): Any valid JSON value. + tags (ProjectTags | Unset): Any valid JSON value. + """ + + model_type: ProjectModelType + name: str + trace_type: ProjectTraceType + id: UUID | Unset = UNSET + metadata: ProjectMetadata | Unset = UNSET + organization: UUID | Unset = UNSET + workspace: None | Unset | UUID = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + config: ProjectConfig | Unset = UNSET + source: ProjectSource | Unset = UNSET + session_config: ProjectSessionConfig | Unset = UNSET + tags: ProjectTags | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + model_type = self.model_type.value + + name = self.name + + trace_type = self.trace_type.value + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + workspace: None | str | Unset + if isinstance(self.workspace, Unset): + workspace = UNSET + elif isinstance(self.workspace, UUID): + workspace = str(self.workspace) + else: + workspace = self.workspace + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + source: str | Unset = UNSET + if not isinstance(self.source, Unset): + source = self.source.value + + session_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.session_config, Unset): + session_config = self.session_config.to_dict() + + tags: dict[str, Any] | Unset = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "model_type": model_type, + "name": name, + "trace_type": trace_type, + } + ) + if id is not UNSET: + field_dict["id"] = id + if metadata is not UNSET: + field_dict["metadata"] = metadata + if organization is not UNSET: + field_dict["organization"] = organization + if workspace is not UNSET: + field_dict["workspace"] = workspace + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if config is not UNSET: + field_dict["config"] = config + if source is not UNSET: + field_dict["source"] = source + if session_config is not UNSET: + field_dict["session_config"] = session_config + if tags is not UNSET: + field_dict["tags"] = tags + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.project_config import ProjectConfig + from ..models.project_metadata import ProjectMetadata + from ..models.project_session_config import ProjectSessionConfig + from ..models.project_tags import ProjectTags + + d = dict(src_dict) + model_type = ProjectModelType(d.pop("model_type")) + + name = d.pop("name") + + trace_type = ProjectTraceType(d.pop("trace_type")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _metadata = d.pop("metadata", UNSET) + metadata: ProjectMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = ProjectMetadata.from_dict(_metadata) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + def _parse_workspace(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + workspace_type_0 = UUID(data) + + return workspace_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + workspace = _parse_workspace(d.pop("workspace", UNSET)) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _config = d.pop("config", UNSET) + config: ProjectConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = ProjectConfig.from_dict(_config) + + _source = d.pop("source", UNSET) + source: ProjectSource | Unset + if isinstance(_source, Unset): + source = UNSET + else: + source = ProjectSource(_source) + + _session_config = d.pop("session_config", UNSET) + session_config: ProjectSessionConfig | Unset + if isinstance(_session_config, Unset): + session_config = UNSET + else: + session_config = ProjectSessionConfig.from_dict(_session_config) + + _tags = d.pop("tags", UNSET) + tags: ProjectTags | Unset + if isinstance(_tags, Unset): + tags = UNSET + else: + tags = ProjectTags.from_dict(_tags) + + project = cls( + model_type=model_type, + name=name, + trace_type=trace_type, + id=id, + metadata=metadata, + organization=organization, + workspace=workspace, + created_at=created_at, + updated_at=updated_at, + config=config, + source=source, + session_config=session_config, + tags=tags, + ) + + project.additional_properties = d + return project + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/project_config.py b/python/fi/generated/openapi_client/models/project_config.py new file mode 100644 index 0000000..f3749d2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/project_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProjectConfig") + + +@_attrs_define +class ProjectConfig: + """Any valid JSON value.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + project_config = cls() + + project_config.additional_properties = d + return project_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/project_metadata.py b/python/fi/generated/openapi_client/models/project_metadata.py new file mode 100644 index 0000000..85fa018 --- /dev/null +++ b/python/fi/generated/openapi_client/models/project_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProjectMetadata") + + +@_attrs_define +class ProjectMetadata: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + project_metadata = cls() + + project_metadata.additional_properties = d + return project_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/project_model_type.py b/python/fi/generated/openapi_client/models/project_model_type.py new file mode 100644 index 0000000..ce0dda0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/project_model_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ProjectModelType(str, Enum): + BINARYCLASSIFICATION = "BinaryClassification" + GENERATIVEIMAGE = "GenerativeImage" + GENERATIVELLM = "GenerativeLLM" + GENERATIVEVIDEO = "GenerativeVideo" + MULTIMODAL = "MultiModal" + NUMERIC = "Numeric" + OBJECTDETECTION = "ObjectDetection" + RANKING = "Ranking" + REGRESSION = "Regression" + SCORECATEGORICAL = "ScoreCategorical" + SEGMENTATION = "Segmentation" + STT = "STT" + TTS = "TTS" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/project_session_config.py b/python/fi/generated/openapi_client/models/project_session_config.py new file mode 100644 index 0000000..d535bb9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/project_session_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProjectSessionConfig") + + +@_attrs_define +class ProjectSessionConfig: + """Any valid JSON value.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + project_session_config = cls() + + project_session_config.additional_properties = d + return project_session_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/project_source.py b/python/fi/generated/openapi_client/models/project_source.py new file mode 100644 index 0000000..59c7eff --- /dev/null +++ b/python/fi/generated/openapi_client/models/project_source.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ProjectSource(str, Enum): + DEMO = "demo" + PROTOTYPE = "prototype" + SIMULATOR = "simulator" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/project_tags.py b/python/fi/generated/openapi_client/models/project_tags.py new file mode 100644 index 0000000..7d738af --- /dev/null +++ b/python/fi/generated/openapi_client/models/project_tags.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProjectTags") + + +@_attrs_define +class ProjectTags: + """Any valid JSON value.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + project_tags = cls() + + project_tags.additional_properties = d + return project_tags + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/project_trace_type.py b/python/fi/generated/openapi_client/models/project_trace_type.py new file mode 100644 index 0000000..12c08f8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/project_trace_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ProjectTraceType(str, Enum): + EXPERIMENT = "experiment" + OBSERVE = "observe" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/prompt_config.py b/python/fi/generated/openapi_client/models/prompt_config.py new file mode 100644 index 0000000..37e1ff1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config.py @@ -0,0 +1,341 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.prompt_config_output_format import PromptConfigOutputFormat +from ..models.prompt_config_tool_choice import PromptConfigToolChoice +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_config_messages_item import PromptConfigMessagesItem + from ..models.prompt_config_response_format import PromptConfigResponseFormat + from ..models.prompt_config_run_prompt_config import PromptConfigRunPromptConfig + from ..models.prompt_config_tools_type_0_item import PromptConfigToolsType0Item + + +T = TypeVar("T", bound="PromptConfig") + + +@_attrs_define +class PromptConfig: + """ + Attributes: + model (str | Unset): + run_prompt_config (PromptConfigRunPromptConfig | Unset): + messages (list[PromptConfigMessagesItem] | Unset): List of messages with format [{'role': 'user/assistant', + 'content': 'text'}] + temperature (float | None | Unset): Controls the randomness. Value between 0 and 2. + frequency_penalty (float | None | Unset): Penalty for word repetition. Value between -2 and 2. + presence_penalty (float | None | Unset): Penalty for new word usage. Value between -2 and 2. + max_tokens (int | None | Unset): Maximum number of tokens to generate. Null = use provider default. + top_p (float | None | Unset): Controls diversity via nucleus sampling. Value between 0 and 1. + response_format (PromptConfigResponseFormat | Unset): JSON schema for response format if required. Can be a JSON + object or string. Defaults to None. + tool_choice (None | PromptConfigToolChoice | Unset): Tool selection mode: 'auto' or 'required'. + tools (list[PromptConfigToolsType0Item] | None | Unset): List of tools with tool properties if available. + output_format (PromptConfigOutputFormat | Unset): Output format type. + concurrency (int | None | Unset): Number of concurrent operations allowed. Maximum 10. + """ + + model: str | Unset = UNSET + run_prompt_config: PromptConfigRunPromptConfig | Unset = UNSET + messages: list[PromptConfigMessagesItem] | Unset = UNSET + temperature: float | None | Unset = UNSET + frequency_penalty: float | None | Unset = UNSET + presence_penalty: float | None | Unset = UNSET + max_tokens: int | None | Unset = UNSET + top_p: float | None | Unset = UNSET + response_format: PromptConfigResponseFormat | Unset = UNSET + tool_choice: None | PromptConfigToolChoice | Unset = UNSET + tools: list[PromptConfigToolsType0Item] | None | Unset = UNSET + output_format: PromptConfigOutputFormat | Unset = UNSET + concurrency: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + model = self.model + + run_prompt_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.run_prompt_config, Unset): + run_prompt_config = self.run_prompt_config.to_dict() + + messages: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.messages, Unset): + messages = [] + for messages_item_data in self.messages: + messages_item = messages_item_data.to_dict() + messages.append(messages_item) + + temperature: float | None | Unset + if isinstance(self.temperature, Unset): + temperature = UNSET + else: + temperature = self.temperature + + frequency_penalty: float | None | Unset + if isinstance(self.frequency_penalty, Unset): + frequency_penalty = UNSET + else: + frequency_penalty = self.frequency_penalty + + presence_penalty: float | None | Unset + if isinstance(self.presence_penalty, Unset): + presence_penalty = UNSET + else: + presence_penalty = self.presence_penalty + + max_tokens: int | None | Unset + if isinstance(self.max_tokens, Unset): + max_tokens = UNSET + else: + max_tokens = self.max_tokens + + top_p: float | None | Unset + if isinstance(self.top_p, Unset): + top_p = UNSET + else: + top_p = self.top_p + + response_format: dict[str, Any] | Unset = UNSET + if not isinstance(self.response_format, Unset): + response_format = self.response_format.to_dict() + + tool_choice: None | str | Unset + if isinstance(self.tool_choice, Unset): + tool_choice = UNSET + elif isinstance(self.tool_choice, PromptConfigToolChoice): + tool_choice = self.tool_choice.value + else: + tool_choice = self.tool_choice + + tools: list[dict[str, Any]] | None | Unset + if isinstance(self.tools, Unset): + tools = UNSET + elif isinstance(self.tools, list): + tools = [] + for tools_type_0_item_data in self.tools: + tools_type_0_item = tools_type_0_item_data.to_dict() + tools.append(tools_type_0_item) + + else: + tools = self.tools + + output_format: str | Unset = UNSET + if not isinstance(self.output_format, Unset): + output_format = self.output_format.value + + concurrency: int | None | Unset + if isinstance(self.concurrency, Unset): + concurrency = UNSET + else: + concurrency = self.concurrency + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if model is not UNSET: + field_dict["model"] = model + if run_prompt_config is not UNSET: + field_dict["run_prompt_config"] = run_prompt_config + if messages is not UNSET: + field_dict["messages"] = messages + if temperature is not UNSET: + field_dict["temperature"] = temperature + if frequency_penalty is not UNSET: + field_dict["frequency_penalty"] = frequency_penalty + if presence_penalty is not UNSET: + field_dict["presence_penalty"] = presence_penalty + if max_tokens is not UNSET: + field_dict["max_tokens"] = max_tokens + if top_p is not UNSET: + field_dict["top_p"] = top_p + if response_format is not UNSET: + field_dict["response_format"] = response_format + if tool_choice is not UNSET: + field_dict["tool_choice"] = tool_choice + if tools is not UNSET: + field_dict["tools"] = tools + if output_format is not UNSET: + field_dict["output_format"] = output_format + if concurrency is not UNSET: + field_dict["concurrency"] = concurrency + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_config_messages_item import PromptConfigMessagesItem + from ..models.prompt_config_response_format import PromptConfigResponseFormat + from ..models.prompt_config_run_prompt_config import PromptConfigRunPromptConfig + from ..models.prompt_config_tools_type_0_item import PromptConfigToolsType0Item + + d = dict(src_dict) + model = d.pop("model", UNSET) + + _run_prompt_config = d.pop("run_prompt_config", UNSET) + run_prompt_config: PromptConfigRunPromptConfig | Unset + if isinstance(_run_prompt_config, Unset): + run_prompt_config = UNSET + else: + run_prompt_config = PromptConfigRunPromptConfig.from_dict( + _run_prompt_config + ) + + _messages = d.pop("messages", UNSET) + messages: list[PromptConfigMessagesItem] | Unset = UNSET + if _messages is not UNSET: + messages = [] + for messages_item_data in _messages: + messages_item = PromptConfigMessagesItem.from_dict(messages_item_data) + + messages.append(messages_item) + + def _parse_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + temperature = _parse_temperature(d.pop("temperature", UNSET)) + + def _parse_frequency_penalty(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + frequency_penalty = _parse_frequency_penalty(d.pop("frequency_penalty", UNSET)) + + def _parse_presence_penalty(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + presence_penalty = _parse_presence_penalty(d.pop("presence_penalty", UNSET)) + + def _parse_max_tokens(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + max_tokens = _parse_max_tokens(d.pop("max_tokens", UNSET)) + + def _parse_top_p(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + top_p = _parse_top_p(d.pop("top_p", UNSET)) + + _response_format = d.pop("response_format", UNSET) + response_format: PromptConfigResponseFormat | Unset + if isinstance(_response_format, Unset): + response_format = UNSET + else: + response_format = PromptConfigResponseFormat.from_dict(_response_format) + + def _parse_tool_choice(data: object) -> None | PromptConfigToolChoice | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + tool_choice_type_1 = PromptConfigToolChoice(data) + + return tool_choice_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PromptConfigToolChoice | Unset, data) + + tool_choice = _parse_tool_choice(d.pop("tool_choice", UNSET)) + + def _parse_tools( + data: object, + ) -> list[PromptConfigToolsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + tools_type_0 = [] + _tools_type_0 = data + for tools_type_0_item_data in _tools_type_0: + tools_type_0_item = PromptConfigToolsType0Item.from_dict( + tools_type_0_item_data + ) + + tools_type_0.append(tools_type_0_item) + + return tools_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[PromptConfigToolsType0Item] | None | Unset, data) + + tools = _parse_tools(d.pop("tools", UNSET)) + + _output_format = d.pop("output_format", UNSET) + output_format: PromptConfigOutputFormat | Unset + if isinstance(_output_format, Unset): + output_format = UNSET + else: + output_format = PromptConfigOutputFormat(_output_format) + + def _parse_concurrency(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + concurrency = _parse_concurrency(d.pop("concurrency", UNSET)) + + prompt_config = cls( + model=model, + run_prompt_config=run_prompt_config, + messages=messages, + temperature=temperature, + frequency_penalty=frequency_penalty, + presence_penalty=presence_penalty, + max_tokens=max_tokens, + top_p=top_p, + response_format=response_format, + tool_choice=tool_choice, + tools=tools, + output_format=output_format, + concurrency=concurrency, + ) + + prompt_config.additional_properties = d + return prompt_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_entry.py b/python/fi/generated/openapi_client/models/prompt_config_entry.py new file mode 100644 index 0000000..6baaf2b --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_entry.py @@ -0,0 +1,345 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_config_entry_configuration import ( + PromptConfigEntryConfiguration, + ) + from ..models.prompt_config_entry_messages_item import PromptConfigEntryMessagesItem + from ..models.prompt_config_entry_model import PromptConfigEntryModel + from ..models.prompt_config_entry_model_params import PromptConfigEntryModelParams + + +T = TypeVar("T", bound="PromptConfigEntry") + + +@_attrs_define +class PromptConfigEntry: + """ + Attributes: + id (None | Unset | UUID): + name (str | Unset): + prompt_id (None | Unset | UUID): + prompt_version (None | Unset | UUID): + agent_id (None | Unset | UUID): + agent_version (None | Unset | UUID): + model (PromptConfigEntryModel | Unset): + model_params (PromptConfigEntryModelParams | Unset): + configuration (PromptConfigEntryConfiguration | Unset): + output_format (str | Unset): Default: 'string'. + messages (list[PromptConfigEntryMessagesItem] | Unset): + voice_input_column_id (None | Unset | UUID): + """ + + id: None | Unset | UUID = UNSET + name: str | Unset = UNSET + prompt_id: None | Unset | UUID = UNSET + prompt_version: None | Unset | UUID = UNSET + agent_id: None | Unset | UUID = UNSET + agent_version: None | Unset | UUID = UNSET + model: PromptConfigEntryModel | Unset = UNSET + model_params: PromptConfigEntryModelParams | Unset = UNSET + configuration: PromptConfigEntryConfiguration | Unset = UNSET + output_format: str | Unset = "string" + messages: list[PromptConfigEntryMessagesItem] | Unset = UNSET + voice_input_column_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: None | str | Unset + if isinstance(self.id, Unset): + id = UNSET + elif isinstance(self.id, UUID): + id = str(self.id) + else: + id = self.id + + name = self.name + + prompt_id: None | str | Unset + if isinstance(self.prompt_id, Unset): + prompt_id = UNSET + elif isinstance(self.prompt_id, UUID): + prompt_id = str(self.prompt_id) + else: + prompt_id = self.prompt_id + + prompt_version: None | str | Unset + if isinstance(self.prompt_version, Unset): + prompt_version = UNSET + elif isinstance(self.prompt_version, UUID): + prompt_version = str(self.prompt_version) + else: + prompt_version = self.prompt_version + + agent_id: None | str | Unset + if isinstance(self.agent_id, Unset): + agent_id = UNSET + elif isinstance(self.agent_id, UUID): + agent_id = str(self.agent_id) + else: + agent_id = self.agent_id + + agent_version: None | str | Unset + if isinstance(self.agent_version, Unset): + agent_version = UNSET + elif isinstance(self.agent_version, UUID): + agent_version = str(self.agent_version) + else: + agent_version = self.agent_version + + model: dict[str, Any] | Unset = UNSET + if not isinstance(self.model, Unset): + model = self.model.to_dict() + + model_params: dict[str, Any] | Unset = UNSET + if not isinstance(self.model_params, Unset): + model_params = self.model_params.to_dict() + + configuration: dict[str, Any] | Unset = UNSET + if not isinstance(self.configuration, Unset): + configuration = self.configuration.to_dict() + + output_format = self.output_format + + messages: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.messages, Unset): + messages = [] + for messages_item_data in self.messages: + messages_item = messages_item_data.to_dict() + messages.append(messages_item) + + voice_input_column_id: None | str | Unset + if isinstance(self.voice_input_column_id, Unset): + voice_input_column_id = UNSET + elif isinstance(self.voice_input_column_id, UUID): + voice_input_column_id = str(self.voice_input_column_id) + else: + voice_input_column_id = self.voice_input_column_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if prompt_id is not UNSET: + field_dict["prompt_id"] = prompt_id + if prompt_version is not UNSET: + field_dict["prompt_version"] = prompt_version + if agent_id is not UNSET: + field_dict["agent_id"] = agent_id + if agent_version is not UNSET: + field_dict["agent_version"] = agent_version + if model is not UNSET: + field_dict["model"] = model + if model_params is not UNSET: + field_dict["model_params"] = model_params + if configuration is not UNSET: + field_dict["configuration"] = configuration + if output_format is not UNSET: + field_dict["output_format"] = output_format + if messages is not UNSET: + field_dict["messages"] = messages + if voice_input_column_id is not UNSET: + field_dict["voice_input_column_id"] = voice_input_column_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_config_entry_configuration import ( + PromptConfigEntryConfiguration, + ) + from ..models.prompt_config_entry_messages_item import ( + PromptConfigEntryMessagesItem, + ) + from ..models.prompt_config_entry_model import PromptConfigEntryModel + from ..models.prompt_config_entry_model_params import ( + PromptConfigEntryModelParams, + ) + + d = dict(src_dict) + + def _parse_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + id_type_0 = UUID(data) + + return id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + id = _parse_id(d.pop("id", UNSET)) + + name = d.pop("name", UNSET) + + def _parse_prompt_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_id_type_0 = UUID(data) + + return prompt_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_id = _parse_prompt_id(d.pop("prompt_id", UNSET)) + + def _parse_prompt_version(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_version_type_0 = UUID(data) + + return prompt_version_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_version = _parse_prompt_version(d.pop("prompt_version", UNSET)) + + def _parse_agent_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_id_type_0 = UUID(data) + + return agent_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_id = _parse_agent_id(d.pop("agent_id", UNSET)) + + def _parse_agent_version(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_version_type_0 = UUID(data) + + return agent_version_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_version = _parse_agent_version(d.pop("agent_version", UNSET)) + + _model = d.pop("model", UNSET) + model: PromptConfigEntryModel | Unset + if isinstance(_model, Unset): + model = UNSET + else: + model = PromptConfigEntryModel.from_dict(_model) + + _model_params = d.pop("model_params", UNSET) + model_params: PromptConfigEntryModelParams | Unset + if isinstance(_model_params, Unset): + model_params = UNSET + else: + model_params = PromptConfigEntryModelParams.from_dict(_model_params) + + _configuration = d.pop("configuration", UNSET) + configuration: PromptConfigEntryConfiguration | Unset + if isinstance(_configuration, Unset): + configuration = UNSET + else: + configuration = PromptConfigEntryConfiguration.from_dict(_configuration) + + output_format = d.pop("output_format", UNSET) + + _messages = d.pop("messages", UNSET) + messages: list[PromptConfigEntryMessagesItem] | Unset = UNSET + if _messages is not UNSET: + messages = [] + for messages_item_data in _messages: + messages_item = PromptConfigEntryMessagesItem.from_dict( + messages_item_data + ) + + messages.append(messages_item) + + def _parse_voice_input_column_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + voice_input_column_id_type_0 = UUID(data) + + return voice_input_column_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + voice_input_column_id = _parse_voice_input_column_id( + d.pop("voice_input_column_id", UNSET) + ) + + prompt_config_entry = cls( + id=id, + name=name, + prompt_id=prompt_id, + prompt_version=prompt_version, + agent_id=agent_id, + agent_version=agent_version, + model=model, + model_params=model_params, + configuration=configuration, + output_format=output_format, + messages=messages, + voice_input_column_id=voice_input_column_id, + ) + + prompt_config_entry.additional_properties = d + return prompt_config_entry + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_entry_configuration.py b/python/fi/generated/openapi_client/models/prompt_config_entry_configuration.py new file mode 100644 index 0000000..18c5ee5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_entry_configuration.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigEntryConfiguration") + + +@_attrs_define +class PromptConfigEntryConfiguration: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_entry_configuration = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + prompt_config_entry_configuration.additional_properties = additional_properties + return prompt_config_entry_configuration + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_entry_messages_item.py b/python/fi/generated/openapi_client/models/prompt_config_entry_messages_item.py new file mode 100644 index 0000000..df06a9a --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_entry_messages_item.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigEntryMessagesItem") + + +@_attrs_define +class PromptConfigEntryMessagesItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_entry_messages_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + prompt_config_entry_messages_item.additional_properties = additional_properties + return prompt_config_entry_messages_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_entry_model.py b/python/fi/generated/openapi_client/models/prompt_config_entry_model.py new file mode 100644 index 0000000..5ba96ca --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_entry_model.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigEntryModel") + + +@_attrs_define +class PromptConfigEntryModel: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_entry_model = cls() + + prompt_config_entry_model.additional_properties = d + return prompt_config_entry_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_entry_model_params.py b/python/fi/generated/openapi_client/models/prompt_config_entry_model_params.py new file mode 100644 index 0000000..4283535 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_entry_model_params.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigEntryModelParams") + + +@_attrs_define +class PromptConfigEntryModelParams: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_entry_model_params = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + prompt_config_entry_model_params.additional_properties = additional_properties + return prompt_config_entry_model_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_messages_item.py b/python/fi/generated/openapi_client/models/prompt_config_messages_item.py new file mode 100644 index 0000000..ac30b6e --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_messages_item.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigMessagesItem") + + +@_attrs_define +class PromptConfigMessagesItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_messages_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + prompt_config_messages_item.additional_properties = additional_properties + return prompt_config_messages_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_output_format.py b/python/fi/generated/openapi_client/models/prompt_config_output_format.py new file mode 100644 index 0000000..fb6f28a --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_output_format.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class PromptConfigOutputFormat(str, Enum): + ARRAY = "array" + AUDIO = "audio" + IMAGE = "image" + NUMBER = "number" + OBJECT = "object" + STRING = "string" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/prompt_config_response_format.py b/python/fi/generated/openapi_client/models/prompt_config_response_format.py new file mode 100644 index 0000000..6063b80 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_response_format.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigResponseFormat") + + +@_attrs_define +class PromptConfigResponseFormat: + """JSON schema for response format if required. Can be a JSON object or string. Defaults to None.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_response_format = cls() + + prompt_config_response_format.additional_properties = d + return prompt_config_response_format + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_run_prompt_config.py b/python/fi/generated/openapi_client/models/prompt_config_run_prompt_config.py new file mode 100644 index 0000000..449a4d6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_run_prompt_config.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigRunPromptConfig") + + +@_attrs_define +class PromptConfigRunPromptConfig: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_run_prompt_config = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + prompt_config_run_prompt_config.additional_properties = additional_properties + return prompt_config_run_prompt_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_config_tool_choice.py b/python/fi/generated/openapi_client/models/prompt_config_tool_choice.py new file mode 100644 index 0000000..aed0c94 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_tool_choice.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PromptConfigToolChoice(str, Enum): + AUTO = "auto" + REQUIRED = "required" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/prompt_config_tools_type_0_item.py b/python/fi/generated/openapi_client/models/prompt_config_tools_type_0_item.py new file mode 100644 index 0000000..95047c7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_config_tools_type_0_item.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptConfigToolsType0Item") + + +@_attrs_define +class PromptConfigToolsType0Item: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_config_tools_type_0_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + prompt_config_tools_type_0_item.additional_properties = additional_properties + return prompt_config_tools_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_derived_variables_response.py b/python/fi/generated/openapi_client/models/prompt_derived_variables_response.py new file mode 100644 index 0000000..78a71b0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_derived_variables_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.prompt_derived_variables_result import PromptDerivedVariablesResult + + +T = TypeVar("T", bound="PromptDerivedVariablesResponse") + + +@_attrs_define +class PromptDerivedVariablesResponse: + """ + Attributes: + status (bool): + result (PromptDerivedVariablesResult): + """ + + status: bool + result: PromptDerivedVariablesResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_derived_variables_result import ( + PromptDerivedVariablesResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = PromptDerivedVariablesResult.from_dict(d.pop("result")) + + prompt_derived_variables_response = cls( + status=status, + result=result, + ) + + prompt_derived_variables_response.additional_properties = d + return prompt_derived_variables_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_derived_variables_result.py b/python/fi/generated/openapi_client/models/prompt_derived_variables_result.py new file mode 100644 index 0000000..be0cefd --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_derived_variables_result.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.prompt_derived_variables_result_derived_variables import ( + PromptDerivedVariablesResultDerivedVariables, + ) + + +T = TypeVar("T", bound="PromptDerivedVariablesResult") + + +@_attrs_define +class PromptDerivedVariablesResult: + """ + Attributes: + version (str): + derived_variables (PromptDerivedVariablesResultDerivedVariables): + """ + + version: str + derived_variables: PromptDerivedVariablesResultDerivedVariables + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + version = self.version + + derived_variables = self.derived_variables.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "version": version, + "derived_variables": derived_variables, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_derived_variables_result_derived_variables import ( + PromptDerivedVariablesResultDerivedVariables, + ) + + d = dict(src_dict) + version = d.pop("version") + + derived_variables = PromptDerivedVariablesResultDerivedVariables.from_dict( + d.pop("derived_variables") + ) + + prompt_derived_variables_result = cls( + version=version, + derived_variables=derived_variables, + ) + + prompt_derived_variables_result.additional_properties = d + return prompt_derived_variables_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_derived_variables_result_derived_variables.py b/python/fi/generated/openapi_client/models/prompt_derived_variables_result_derived_variables.py new file mode 100644 index 0000000..cb71961 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_derived_variables_result_derived_variables.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptDerivedVariablesResultDerivedVariables") + + +@_attrs_define +class PromptDerivedVariablesResultDerivedVariables: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_derived_variables_result_derived_variables = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + prompt_derived_variables_result_derived_variables.additional_properties = ( + additional_properties + ) + return prompt_derived_variables_result_derived_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_history_execution.py b/python/fi/generated/openapi_client/models/prompt_history_execution.py new file mode 100644 index 0000000..49354c6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_history_execution.py @@ -0,0 +1,366 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_history_execution_evaluation_configs import ( + PromptHistoryExecutionEvaluationConfigs, + ) + from ..models.prompt_history_execution_evaluation_results import ( + PromptHistoryExecutionEvaluationResults, + ) + from ..models.prompt_history_execution_metadata import ( + PromptHistoryExecutionMetadata, + ) + from ..models.prompt_history_execution_output import PromptHistoryExecutionOutput + from ..models.prompt_history_execution_placeholders import ( + PromptHistoryExecutionPlaceholders, + ) + + +T = TypeVar("T", bound="PromptHistoryExecution") + + +@_attrs_define +class PromptHistoryExecution: + """ + Attributes: + template_version (str): + id (UUID | Unset): + output (PromptHistoryExecutionOutput | Unset): + prompt_config_snapshot (str | Unset): + template_name (str | Unset): + original_template (None | Unset | UUID): + metadata (PromptHistoryExecutionMetadata | Unset): + variable_names (str | Unset): + evaluation_results (PromptHistoryExecutionEvaluationResults | Unset): + evaluation_configs (PromptHistoryExecutionEvaluationConfigs | Unset): + created_at (datetime.datetime | Unset): + is_default (bool | Unset): + commit_message (None | str | Unset): + updated_at (datetime.datetime | Unset): + is_draft (bool | Unset): + labels (str | Unset): + placeholders (PromptHistoryExecutionPlaceholders | Unset): + prompt_base_template (None | Unset | UUID): + """ + + template_version: str + id: UUID | Unset = UNSET + output: PromptHistoryExecutionOutput | Unset = UNSET + prompt_config_snapshot: str | Unset = UNSET + template_name: str | Unset = UNSET + original_template: None | Unset | UUID = UNSET + metadata: PromptHistoryExecutionMetadata | Unset = UNSET + variable_names: str | Unset = UNSET + evaluation_results: PromptHistoryExecutionEvaluationResults | Unset = UNSET + evaluation_configs: PromptHistoryExecutionEvaluationConfigs | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + is_default: bool | Unset = UNSET + commit_message: None | str | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + is_draft: bool | Unset = UNSET + labels: str | Unset = UNSET + placeholders: PromptHistoryExecutionPlaceholders | Unset = UNSET + prompt_base_template: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + template_version = self.template_version + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + output: dict[str, Any] | Unset = UNSET + if not isinstance(self.output, Unset): + output = self.output.to_dict() + + prompt_config_snapshot = self.prompt_config_snapshot + + template_name = self.template_name + + original_template: None | str | Unset + if isinstance(self.original_template, Unset): + original_template = UNSET + elif isinstance(self.original_template, UUID): + original_template = str(self.original_template) + else: + original_template = self.original_template + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + variable_names = self.variable_names + + evaluation_results: dict[str, Any] | Unset = UNSET + if not isinstance(self.evaluation_results, Unset): + evaluation_results = self.evaluation_results.to_dict() + + evaluation_configs: dict[str, Any] | Unset = UNSET + if not isinstance(self.evaluation_configs, Unset): + evaluation_configs = self.evaluation_configs.to_dict() + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + is_default = self.is_default + + commit_message: None | str | Unset + if isinstance(self.commit_message, Unset): + commit_message = UNSET + else: + commit_message = self.commit_message + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + is_draft = self.is_draft + + labels = self.labels + + placeholders: dict[str, Any] | Unset = UNSET + if not isinstance(self.placeholders, Unset): + placeholders = self.placeholders.to_dict() + + prompt_base_template: None | str | Unset + if isinstance(self.prompt_base_template, Unset): + prompt_base_template = UNSET + elif isinstance(self.prompt_base_template, UUID): + prompt_base_template = str(self.prompt_base_template) + else: + prompt_base_template = self.prompt_base_template + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "template_version": template_version, + } + ) + if id is not UNSET: + field_dict["id"] = id + if output is not UNSET: + field_dict["output"] = output + if prompt_config_snapshot is not UNSET: + field_dict["prompt_config_snapshot"] = prompt_config_snapshot + if template_name is not UNSET: + field_dict["template_name"] = template_name + if original_template is not UNSET: + field_dict["original_template"] = original_template + if metadata is not UNSET: + field_dict["metadata"] = metadata + if variable_names is not UNSET: + field_dict["variable_names"] = variable_names + if evaluation_results is not UNSET: + field_dict["evaluation_results"] = evaluation_results + if evaluation_configs is not UNSET: + field_dict["evaluation_configs"] = evaluation_configs + if created_at is not UNSET: + field_dict["created_at"] = created_at + if is_default is not UNSET: + field_dict["is_default"] = is_default + if commit_message is not UNSET: + field_dict["commit_message"] = commit_message + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if is_draft is not UNSET: + field_dict["is_draft"] = is_draft + if labels is not UNSET: + field_dict["labels"] = labels + if placeholders is not UNSET: + field_dict["placeholders"] = placeholders + if prompt_base_template is not UNSET: + field_dict["prompt_base_template"] = prompt_base_template + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_history_execution_evaluation_configs import ( + PromptHistoryExecutionEvaluationConfigs, + ) + from ..models.prompt_history_execution_evaluation_results import ( + PromptHistoryExecutionEvaluationResults, + ) + from ..models.prompt_history_execution_metadata import ( + PromptHistoryExecutionMetadata, + ) + from ..models.prompt_history_execution_output import ( + PromptHistoryExecutionOutput, + ) + from ..models.prompt_history_execution_placeholders import ( + PromptHistoryExecutionPlaceholders, + ) + + d = dict(src_dict) + template_version = d.pop("template_version") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _output = d.pop("output", UNSET) + output: PromptHistoryExecutionOutput | Unset + if isinstance(_output, Unset): + output = UNSET + else: + output = PromptHistoryExecutionOutput.from_dict(_output) + + prompt_config_snapshot = d.pop("prompt_config_snapshot", UNSET) + + template_name = d.pop("template_name", UNSET) + + def _parse_original_template(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + original_template_type_0 = UUID(data) + + return original_template_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + original_template = _parse_original_template(d.pop("original_template", UNSET)) + + _metadata = d.pop("metadata", UNSET) + metadata: PromptHistoryExecutionMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = PromptHistoryExecutionMetadata.from_dict(_metadata) + + variable_names = d.pop("variable_names", UNSET) + + _evaluation_results = d.pop("evaluation_results", UNSET) + evaluation_results: PromptHistoryExecutionEvaluationResults | Unset + if isinstance(_evaluation_results, Unset): + evaluation_results = UNSET + else: + evaluation_results = PromptHistoryExecutionEvaluationResults.from_dict( + _evaluation_results + ) + + _evaluation_configs = d.pop("evaluation_configs", UNSET) + evaluation_configs: PromptHistoryExecutionEvaluationConfigs | Unset + if isinstance(_evaluation_configs, Unset): + evaluation_configs = UNSET + else: + evaluation_configs = PromptHistoryExecutionEvaluationConfigs.from_dict( + _evaluation_configs + ) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + is_default = d.pop("is_default", UNSET) + + def _parse_commit_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + commit_message = _parse_commit_message(d.pop("commit_message", UNSET)) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + is_draft = d.pop("is_draft", UNSET) + + labels = d.pop("labels", UNSET) + + _placeholders = d.pop("placeholders", UNSET) + placeholders: PromptHistoryExecutionPlaceholders | Unset + if isinstance(_placeholders, Unset): + placeholders = UNSET + else: + placeholders = PromptHistoryExecutionPlaceholders.from_dict(_placeholders) + + def _parse_prompt_base_template(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_base_template_type_0 = UUID(data) + + return prompt_base_template_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_base_template = _parse_prompt_base_template( + d.pop("prompt_base_template", UNSET) + ) + + prompt_history_execution = cls( + template_version=template_version, + id=id, + output=output, + prompt_config_snapshot=prompt_config_snapshot, + template_name=template_name, + original_template=original_template, + metadata=metadata, + variable_names=variable_names, + evaluation_results=evaluation_results, + evaluation_configs=evaluation_configs, + created_at=created_at, + is_default=is_default, + commit_message=commit_message, + updated_at=updated_at, + is_draft=is_draft, + labels=labels, + placeholders=placeholders, + prompt_base_template=prompt_base_template, + ) + + prompt_history_execution.additional_properties = d + return prompt_history_execution + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_configs.py b/python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_configs.py new file mode 100644 index 0000000..15a7c47 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_configs.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptHistoryExecutionEvaluationConfigs") + + +@_attrs_define +class PromptHistoryExecutionEvaluationConfigs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_history_execution_evaluation_configs = cls() + + prompt_history_execution_evaluation_configs.additional_properties = d + return prompt_history_execution_evaluation_configs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_results.py b/python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_results.py new file mode 100644 index 0000000..0ee15e4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_history_execution_evaluation_results.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptHistoryExecutionEvaluationResults") + + +@_attrs_define +class PromptHistoryExecutionEvaluationResults: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_history_execution_evaluation_results = cls() + + prompt_history_execution_evaluation_results.additional_properties = d + return prompt_history_execution_evaluation_results + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_history_execution_metadata.py b/python/fi/generated/openapi_client/models/prompt_history_execution_metadata.py new file mode 100644 index 0000000..c23cfa4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_history_execution_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptHistoryExecutionMetadata") + + +@_attrs_define +class PromptHistoryExecutionMetadata: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_history_execution_metadata = cls() + + prompt_history_execution_metadata.additional_properties = d + return prompt_history_execution_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_history_execution_output.py b/python/fi/generated/openapi_client/models/prompt_history_execution_output.py new file mode 100644 index 0000000..7de3eca --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_history_execution_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptHistoryExecutionOutput") + + +@_attrs_define +class PromptHistoryExecutionOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_history_execution_output = cls() + + prompt_history_execution_output.additional_properties = d + return prompt_history_execution_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_history_execution_placeholders.py b/python/fi/generated/openapi_client/models/prompt_history_execution_placeholders.py new file mode 100644 index 0000000..8c9c566 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_history_execution_placeholders.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptHistoryExecutionPlaceholders") + + +@_attrs_define +class PromptHistoryExecutionPlaceholders: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_history_execution_placeholders = cls() + + prompt_history_execution_placeholders.additional_properties = d + return prompt_history_execution_placeholders + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_label.py b/python/fi/generated/openapi_client/models/prompt_label.py new file mode 100644 index 0000000..fcaffdb --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_label.py @@ -0,0 +1,161 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.prompt_label_type import PromptLabelType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_label_metadata import PromptLabelMetadata + + +T = TypeVar("T", bound="PromptLabel") + + +@_attrs_define +class PromptLabel: + """ + Attributes: + name (str): + type_ (PromptLabelType): + id (UUID | Unset): + organization (UUID | Unset): + metadata (PromptLabelMetadata | Unset): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + """ + + name: str + type_: PromptLabelType + id: UUID | Unset = UNSET + organization: UUID | Unset = UNSET + metadata: PromptLabelMetadata | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + type_ = self.type_.value + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "type": type_, + } + ) + if id is not UNSET: + field_dict["id"] = id + if organization is not UNSET: + field_dict["organization"] = organization + if metadata is not UNSET: + field_dict["metadata"] = metadata + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_label_metadata import PromptLabelMetadata + + d = dict(src_dict) + name = d.pop("name") + + type_ = PromptLabelType(d.pop("type")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + _metadata = d.pop("metadata", UNSET) + metadata: PromptLabelMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = PromptLabelMetadata.from_dict(_metadata) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + prompt_label = cls( + name=name, + type_=type_, + id=id, + organization=organization, + metadata=metadata, + created_at=created_at, + updated_at=updated_at, + ) + + prompt_label.additional_properties = d + return prompt_label + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_label_metadata.py b/python/fi/generated/openapi_client/models/prompt_label_metadata.py new file mode 100644 index 0000000..e6affcd --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_label_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptLabelMetadata") + + +@_attrs_define +class PromptLabelMetadata: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_label_metadata = cls() + + prompt_label_metadata.additional_properties = d + return prompt_label_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_label_type.py b/python/fi/generated/openapi_client/models/prompt_label_type.py new file mode 100644 index 0000000..87d0ac0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_label_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PromptLabelType(str, Enum): + CUSTOM = "custom" + SYSTEM = "system" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_list_response.py b/python/fi/generated/openapi_client/models/prompt_simulation_list_response.py new file mode 100644 index 0000000..496d249 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_list_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_simulation_list_result import PromptSimulationListResult + + +T = TypeVar("T", bound="PromptSimulationListResponse") + + +@_attrs_define +class PromptSimulationListResponse: + """ + Attributes: + result (PromptSimulationListResult): + status (bool | Unset): Default: True. + """ + + result: PromptSimulationListResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_simulation_list_result import PromptSimulationListResult + + d = dict(src_dict) + result = PromptSimulationListResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + prompt_simulation_list_response = cls( + result=result, + status=status, + ) + + prompt_simulation_list_response.additional_properties = d + return prompt_simulation_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_list_result.py b/python/fi/generated/openapi_client/models/prompt_simulation_list_result.py new file mode 100644 index 0000000..7b59332 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_list_result.py @@ -0,0 +1,130 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_simulation_template_summary import ( + PromptSimulationTemplateSummary, + ) + from ..models.run_test_response import RunTestResponse + + +T = TypeVar("T", bound="PromptSimulationListResult") + + +@_attrs_define +class PromptSimulationListResult: + """ + Attributes: + count (int | Unset): + page (int | Unset): + limit (int | Unset): + results (list[RunTestResponse] | Unset): + prompt_template (PromptSimulationTemplateSummary | Unset): + """ + + count: int | Unset = UNSET + page: int | Unset = UNSET + limit: int | Unset = UNSET + results: list[RunTestResponse] | Unset = UNSET + prompt_template: PromptSimulationTemplateSummary | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + page = self.page + + limit = self.limit + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + prompt_template: dict[str, Any] | Unset = UNSET + if not isinstance(self.prompt_template, Unset): + prompt_template = self.prompt_template.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict["count"] = count + if page is not UNSET: + field_dict["page"] = page + if limit is not UNSET: + field_dict["limit"] = limit + if results is not UNSET: + field_dict["results"] = results + if prompt_template is not UNSET: + field_dict["prompt_template"] = prompt_template + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_simulation_template_summary import ( + PromptSimulationTemplateSummary, + ) + from ..models.run_test_response import RunTestResponse + + d = dict(src_dict) + count = d.pop("count", UNSET) + + page = d.pop("page", UNSET) + + limit = d.pop("limit", UNSET) + + _results = d.pop("results", UNSET) + results: list[RunTestResponse] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = RunTestResponse.from_dict(results_item_data) + + results.append(results_item) + + _prompt_template = d.pop("prompt_template", UNSET) + prompt_template: PromptSimulationTemplateSummary | Unset + if isinstance(_prompt_template, Unset): + prompt_template = UNSET + else: + prompt_template = PromptSimulationTemplateSummary.from_dict( + _prompt_template + ) + + prompt_simulation_list_result = cls( + count=count, + page=page, + limit=limit, + results=results, + prompt_template=prompt_template, + ) + + prompt_simulation_list_result.additional_properties = d + return prompt_simulation_list_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_run_response.py b/python/fi/generated/openapi_client/models/prompt_simulation_run_response.py new file mode 100644 index 0000000..aaeec6e --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_run_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_response import RunTestResponse + + +T = TypeVar("T", bound="PromptSimulationRunResponse") + + +@_attrs_define +class PromptSimulationRunResponse: + """ + Attributes: + result (RunTestResponse): + status (bool | Unset): Default: True. + """ + + result: RunTestResponse + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_response import RunTestResponse + + d = dict(src_dict) + result = RunTestResponse.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + prompt_simulation_run_response = cls( + result=result, + status=status, + ) + + prompt_simulation_run_response.additional_properties = d + return prompt_simulation_run_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_scenario_item.py b/python/fi/generated/openapi_client/models/prompt_simulation_scenario_item.py new file mode 100644 index 0000000..9357d41 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_scenario_item.py @@ -0,0 +1,144 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PromptSimulationScenarioItem") + + +@_attrs_define +class PromptSimulationScenarioItem: + """ + Attributes: + id (UUID | Unset): + name (str | Unset): + description (str | Unset): + scenario_type (str | Unset): + dataset_id (None | Unset | UUID): + created_at (datetime.datetime | Unset): + """ + + id: UUID | Unset = UNSET + name: str | Unset = UNSET + description: str | Unset = UNSET + scenario_type: str | Unset = UNSET + dataset_id: None | Unset | UUID = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name = self.name + + description = self.description + + scenario_type = self.scenario_type + + dataset_id: None | str | Unset + if isinstance(self.dataset_id, Unset): + dataset_id = UNSET + elif isinstance(self.dataset_id, UUID): + dataset_id = str(self.dataset_id) + else: + dataset_id = self.dataset_id + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if scenario_type is not UNSET: + field_dict["scenario_type"] = scenario_type + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + name = d.pop("name", UNSET) + + description = d.pop("description", UNSET) + + scenario_type = d.pop("scenario_type", UNSET) + + def _parse_dataset_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + dataset_id_type_0 = UUID(data) + + return dataset_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + dataset_id = _parse_dataset_id(d.pop("dataset_id", UNSET)) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + prompt_simulation_scenario_item = cls( + id=id, + name=name, + description=description, + scenario_type=scenario_type, + dataset_id=dataset_id, + created_at=created_at, + ) + + prompt_simulation_scenario_item.additional_properties = d + return prompt_simulation_scenario_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_scenarios_response.py b/python/fi/generated/openapi_client/models/prompt_simulation_scenarios_response.py new file mode 100644 index 0000000..774e353 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_scenarios_response.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_simulation_scenarios_result import ( + PromptSimulationScenariosResult, + ) + + +T = TypeVar("T", bound="PromptSimulationScenariosResponse") + + +@_attrs_define +class PromptSimulationScenariosResponse: + """ + Attributes: + result (PromptSimulationScenariosResult): + status (bool | Unset): Default: True. + """ + + result: PromptSimulationScenariosResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_simulation_scenarios_result import ( + PromptSimulationScenariosResult, + ) + + d = dict(src_dict) + result = PromptSimulationScenariosResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + prompt_simulation_scenarios_response = cls( + result=result, + status=status, + ) + + prompt_simulation_scenarios_response.additional_properties = d + return prompt_simulation_scenarios_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_scenarios_result.py b/python/fi/generated/openapi_client/models/prompt_simulation_scenarios_result.py new file mode 100644 index 0000000..3539376 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_scenarios_result.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_simulation_scenario_item import PromptSimulationScenarioItem + + +T = TypeVar("T", bound="PromptSimulationScenariosResult") + + +@_attrs_define +class PromptSimulationScenariosResult: + """ + Attributes: + count (int | Unset): + page (int | Unset): + limit (int | Unset): + results (list[PromptSimulationScenarioItem] | Unset): + """ + + count: int | Unset = UNSET + page: int | Unset = UNSET + limit: int | Unset = UNSET + results: list[PromptSimulationScenarioItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + page = self.page + + limit = self.limit + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict["count"] = count + if page is not UNSET: + field_dict["page"] = page + if limit is not UNSET: + field_dict["limit"] = limit + if results is not UNSET: + field_dict["results"] = results + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_simulation_scenario_item import ( + PromptSimulationScenarioItem, + ) + + d = dict(src_dict) + count = d.pop("count", UNSET) + + page = d.pop("page", UNSET) + + limit = d.pop("limit", UNSET) + + _results = d.pop("results", UNSET) + results: list[PromptSimulationScenarioItem] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = PromptSimulationScenarioItem.from_dict(results_item_data) + + results.append(results_item) + + prompt_simulation_scenarios_result = cls( + count=count, + page=page, + limit=limit, + results=results, + ) + + prompt_simulation_scenarios_result.additional_properties = d + return prompt_simulation_scenarios_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_template_summary.py b/python/fi/generated/openapi_client/models/prompt_simulation_template_summary.py new file mode 100644 index 0000000..94d8d5a --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_template_summary.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PromptSimulationTemplateSummary") + + +@_attrs_define +class PromptSimulationTemplateSummary: + """ + Attributes: + id (UUID | Unset): + name (str | Unset): + """ + + id: UUID | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + name = d.pop("name", UNSET) + + prompt_simulation_template_summary = cls( + id=id, + name=name, + ) + + prompt_simulation_template_summary.additional_properties = d + return prompt_simulation_template_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_simulation_update_request.py b/python/fi/generated/openapi_client/models/prompt_simulation_update_request.py new file mode 100644 index 0000000..5ab88dc --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_simulation_update_request.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PromptSimulationUpdateRequest") + + +@_attrs_define +class PromptSimulationUpdateRequest: + """ + Attributes: + prompt_version_id (str | Unset): + scenario_ids (list[UUID] | Unset): + name (str | Unset): + description (str | Unset): + enable_tool_evaluation (bool | Unset): + """ + + prompt_version_id: str | Unset = UNSET + scenario_ids: list[UUID] | Unset = UNSET + name: str | Unset = UNSET + description: str | Unset = UNSET + enable_tool_evaluation: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + prompt_version_id = self.prompt_version_id + + scenario_ids: list[str] | Unset = UNSET + if not isinstance(self.scenario_ids, Unset): + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + name = self.name + + description = self.description + + enable_tool_evaluation = self.enable_tool_evaluation + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if prompt_version_id is not UNSET: + field_dict["prompt_version_id"] = prompt_version_id + if scenario_ids is not UNSET: + field_dict["scenario_ids"] = scenario_ids + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if enable_tool_evaluation is not UNSET: + field_dict["enable_tool_evaluation"] = enable_tool_evaluation + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_version_id = d.pop("prompt_version_id", UNSET) + + _scenario_ids = d.pop("scenario_ids", UNSET) + scenario_ids: list[UUID] | Unset = UNSET + if _scenario_ids is not UNSET: + scenario_ids = [] + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + name = d.pop("name", UNSET) + + description = d.pop("description", UNSET) + + enable_tool_evaluation = d.pop("enable_tool_evaluation", UNSET) + + prompt_simulation_update_request = cls( + prompt_version_id=prompt_version_id, + scenario_ids=scenario_ids, + name=name, + description=description, + enable_tool_evaluation=enable_tool_evaluation, + ) + + prompt_simulation_update_request.additional_properties = d + return prompt_simulation_update_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_template.py b/python/fi/generated/openapi_client/models/prompt_template.py new file mode 100644 index 0000000..dd7a087 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_template.py @@ -0,0 +1,230 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.prompt_template_placeholders import PromptTemplatePlaceholders + from ..models.prompt_template_variable_names import PromptTemplateVariableNames + + +T = TypeVar("T", bound="PromptTemplate") + + +@_attrs_define +class PromptTemplate: + """ + Attributes: + name (str): + id (UUID | Unset): + description (None | str | Unset): + variable_names (PromptTemplateVariableNames | Unset): + organization (None | Unset | UUID): + prompt_folder (None | Unset | UUID): + placeholders (PromptTemplatePlaceholders | Unset): + created_by (None | Unset | UUID): + """ + + name: str + id: UUID | Unset = UNSET + description: None | str | Unset = UNSET + variable_names: PromptTemplateVariableNames | Unset = UNSET + organization: None | Unset | UUID = UNSET + prompt_folder: None | Unset | UUID = UNSET + placeholders: PromptTemplatePlaceholders | Unset = UNSET + created_by: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + variable_names: dict[str, Any] | Unset = UNSET + if not isinstance(self.variable_names, Unset): + variable_names = self.variable_names.to_dict() + + organization: None | str | Unset + if isinstance(self.organization, Unset): + organization = UNSET + elif isinstance(self.organization, UUID): + organization = str(self.organization) + else: + organization = self.organization + + prompt_folder: None | str | Unset + if isinstance(self.prompt_folder, Unset): + prompt_folder = UNSET + elif isinstance(self.prompt_folder, UUID): + prompt_folder = str(self.prompt_folder) + else: + prompt_folder = self.prompt_folder + + placeholders: dict[str, Any] | Unset = UNSET + if not isinstance(self.placeholders, Unset): + placeholders = self.placeholders.to_dict() + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + elif isinstance(self.created_by, UUID): + created_by = str(self.created_by) + else: + created_by = self.created_by + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if id is not UNSET: + field_dict["id"] = id + if description is not UNSET: + field_dict["description"] = description + if variable_names is not UNSET: + field_dict["variable_names"] = variable_names + if organization is not UNSET: + field_dict["organization"] = organization + if prompt_folder is not UNSET: + field_dict["prompt_folder"] = prompt_folder + if placeholders is not UNSET: + field_dict["placeholders"] = placeholders + if created_by is not UNSET: + field_dict["created_by"] = created_by + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.prompt_template_placeholders import PromptTemplatePlaceholders + from ..models.prompt_template_variable_names import PromptTemplateVariableNames + + d = dict(src_dict) + name = d.pop("name") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + _variable_names = d.pop("variable_names", UNSET) + variable_names: PromptTemplateVariableNames | Unset + if isinstance(_variable_names, Unset): + variable_names = UNSET + else: + variable_names = PromptTemplateVariableNames.from_dict(_variable_names) + + def _parse_organization(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + organization_type_0 = UUID(data) + + return organization_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + organization = _parse_organization(d.pop("organization", UNSET)) + + def _parse_prompt_folder(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_folder_type_0 = UUID(data) + + return prompt_folder_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_folder = _parse_prompt_folder(d.pop("prompt_folder", UNSET)) + + _placeholders = d.pop("placeholders", UNSET) + placeholders: PromptTemplatePlaceholders | Unset + if isinstance(_placeholders, Unset): + placeholders = UNSET + else: + placeholders = PromptTemplatePlaceholders.from_dict(_placeholders) + + def _parse_created_by(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + created_by_type_0 = UUID(data) + + return created_by_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) + + prompt_template = cls( + name=name, + id=id, + description=description, + variable_names=variable_names, + organization=organization, + prompt_folder=prompt_folder, + placeholders=placeholders, + created_by=created_by, + ) + + prompt_template.additional_properties = d + return prompt_template + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_template_placeholders.py b/python/fi/generated/openapi_client/models/prompt_template_placeholders.py new file mode 100644 index 0000000..a4f6d18 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_template_placeholders.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptTemplatePlaceholders") + + +@_attrs_define +class PromptTemplatePlaceholders: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_template_placeholders = cls() + + prompt_template_placeholders.additional_properties = d + return prompt_template_placeholders + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/prompt_template_variable_names.py b/python/fi/generated/openapi_client/models/prompt_template_variable_names.py new file mode 100644 index 0000000..8372849 --- /dev/null +++ b/python/fi/generated/openapi_client/models/prompt_template_variable_names.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PromptTemplateVariableNames") + + +@_attrs_define +class PromptTemplateVariableNames: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompt_template_variable_names = cls() + + prompt_template_variable_names.additional_properties = d + return prompt_template_variable_names + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/provider_status_item.py b/python/fi/generated/openapi_client/models/provider_status_item.py new file mode 100644 index 0000000..cb88819 --- /dev/null +++ b/python/fi/generated/openapi_client/models/provider_status_item.py @@ -0,0 +1,158 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProviderStatusItem") + + +@_attrs_define +class ProviderStatusItem: + """ + Attributes: + provider (str): + display_name (str): + has_key (bool): + type_ (str): + masked_key (None | str | Unset): + logo_url (None | str | Unset): + id (None | Unset | UUID): + """ + + provider: str + display_name: str + has_key: bool + type_: str + masked_key: None | str | Unset = UNSET + logo_url: None | str | Unset = UNSET + id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + provider = self.provider + + display_name = self.display_name + + has_key = self.has_key + + type_ = self.type_ + + masked_key: None | str | Unset + if isinstance(self.masked_key, Unset): + masked_key = UNSET + else: + masked_key = self.masked_key + + logo_url: None | str | Unset + if isinstance(self.logo_url, Unset): + logo_url = UNSET + else: + logo_url = self.logo_url + + id: None | str | Unset + if isinstance(self.id, Unset): + id = UNSET + elif isinstance(self.id, UUID): + id = str(self.id) + else: + id = self.id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "provider": provider, + "display_name": display_name, + "has_key": has_key, + "type": type_, + } + ) + if masked_key is not UNSET: + field_dict["masked_key"] = masked_key + if logo_url is not UNSET: + field_dict["logo_url"] = logo_url + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + provider = d.pop("provider") + + display_name = d.pop("display_name") + + has_key = d.pop("has_key") + + type_ = d.pop("type") + + def _parse_masked_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + masked_key = _parse_masked_key(d.pop("masked_key", UNSET)) + + def _parse_logo_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + logo_url = _parse_logo_url(d.pop("logo_url", UNSET)) + + def _parse_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + id_type_0 = UUID(data) + + return id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + id = _parse_id(d.pop("id", UNSET)) + + provider_status_item = cls( + provider=provider, + display_name=display_name, + has_key=has_key, + type_=type_, + masked_key=masked_key, + logo_url=logo_url, + id=id, + ) + + provider_status_item.additional_properties = d + return provider_status_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/provider_status_response.py b/python/fi/generated/openapi_client/models/provider_status_response.py new file mode 100644 index 0000000..93313f5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/provider_status_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.provider_status_result import ProviderStatusResult + + +T = TypeVar("T", bound="ProviderStatusResponse") + + +@_attrs_define +class ProviderStatusResponse: + """ + Attributes: + status (bool): + result (ProviderStatusResult): + """ + + status: bool + result: ProviderStatusResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.provider_status_result import ProviderStatusResult + + d = dict(src_dict) + status = d.pop("status") + + result = ProviderStatusResult.from_dict(d.pop("result")) + + provider_status_response = cls( + status=status, + result=result, + ) + + provider_status_response.additional_properties = d + return provider_status_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/provider_status_result.py b/python/fi/generated/openapi_client/models/provider_status_result.py new file mode 100644 index 0000000..fc17328 --- /dev/null +++ b/python/fi/generated/openapi_client/models/provider_status_result.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.provider_status_item import ProviderStatusItem + + +T = TypeVar("T", bound="ProviderStatusResult") + + +@_attrs_define +class ProviderStatusResult: + """ + Attributes: + providers (list[ProviderStatusItem]): + """ + + providers: list[ProviderStatusItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + providers = [] + for providers_item_data in self.providers: + providers_item = providers_item_data.to_dict() + providers.append(providers_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "providers": providers, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.provider_status_item import ProviderStatusItem + + d = dict(src_dict) + providers = [] + _providers = d.pop("providers") + for providers_item_data in _providers: + providers_item = ProviderStatusItem.from_dict(providers_item_data) + + providers.append(providers_item) + + provider_status_result = cls( + providers=providers, + ) + + provider_status_result.additional_properties = d + return provider_status_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_add_items_response.py b/python/fi/generated/openapi_client/models/queue_add_items_response.py new file mode 100644 index 0000000..16914a4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_add_items_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_add_items_result import QueueAddItemsResult + + +T = TypeVar("T", bound="QueueAddItemsResponse") + + +@_attrs_define +class QueueAddItemsResponse: + """ + Attributes: + result (QueueAddItemsResult): + status (bool | Unset): Default: True. + """ + + result: QueueAddItemsResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_add_items_result import QueueAddItemsResult + + d = dict(src_dict) + result = QueueAddItemsResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_add_items_response = cls( + result=result, + status=status, + ) + + queue_add_items_response.additional_properties = d + return queue_add_items_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_add_items_result.py b/python/fi/generated/openapi_client/models/queue_add_items_result.py new file mode 100644 index 0000000..2342dd0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_add_items_result.py @@ -0,0 +1,96 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueAddItemsResult") + + +@_attrs_define +class QueueAddItemsResult: + """ + Attributes: + added (int): + duplicates (int): + errors (list[str]): + queue_status (str): + total_matching (int | Unset): + """ + + added: int + duplicates: int + errors: list[str] + queue_status: str + total_matching: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + added = self.added + + duplicates = self.duplicates + + errors = self.errors + + queue_status = self.queue_status + + total_matching = self.total_matching + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "added": added, + "duplicates": duplicates, + "errors": errors, + "queue_status": queue_status, + } + ) + if total_matching is not UNSET: + field_dict["total_matching"] = total_matching + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + added = d.pop("added") + + duplicates = d.pop("duplicates") + + errors = cast(list[str], d.pop("errors")) + + queue_status = d.pop("queue_status") + + total_matching = d.pop("total_matching", UNSET) + + queue_add_items_result = cls( + added=added, + duplicates=duplicates, + errors=errors, + queue_status=queue_status, + total_matching=total_matching, + ) + + queue_add_items_result.additional_properties = d + return queue_add_items_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_add_label_response.py b/python/fi/generated/openapi_client/models/queue_add_label_response.py new file mode 100644 index 0000000..09b9436 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_add_label_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_add_label_result import QueueAddLabelResult + + +T = TypeVar("T", bound="QueueAddLabelResponse") + + +@_attrs_define +class QueueAddLabelResponse: + """ + Attributes: + result (QueueAddLabelResult): + status (bool | Unset): Default: True. + """ + + result: QueueAddLabelResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_add_label_result import QueueAddLabelResult + + d = dict(src_dict) + result = QueueAddLabelResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_add_label_response = cls( + result=result, + status=status, + ) + + queue_add_label_response.additional_properties = d + return queue_add_label_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_add_label_result.py b/python/fi/generated/openapi_client/models/queue_add_label_result.py new file mode 100644 index 0000000..a4f842c --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_add_label_result.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_label_result import QueueLabelResult + + +T = TypeVar("T", bound="QueueAddLabelResult") + + +@_attrs_define +class QueueAddLabelResult: + """ + Attributes: + label (QueueLabelResult): + created (bool): + reopened_items (int): + queue_status (str): + """ + + label: QueueLabelResult + created: bool + reopened_items: int + queue_status: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label = self.label.to_dict() + + created = self.created + + reopened_items = self.reopened_items + + queue_status = self.queue_status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label": label, + "created": created, + "reopened_items": reopened_items, + "queue_status": queue_status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_label_result import QueueLabelResult + + d = dict(src_dict) + label = QueueLabelResult.from_dict(d.pop("label")) + + created = d.pop("created") + + reopened_items = d.pop("reopened_items") + + queue_status = d.pop("queue_status") + + queue_add_label_result = cls( + label=label, + created=created, + reopened_items=reopened_items, + queue_status=queue_status, + ) + + queue_add_label_result.additional_properties = d + return queue_add_label_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_agreement_annotator_pair.py b/python/fi/generated/openapi_client/models/queue_agreement_annotator_pair.py new file mode 100644 index 0000000..08b28b0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_agreement_annotator_pair.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAgreementAnnotatorPair") + + +@_attrs_define +class QueueAgreementAnnotatorPair: + """ + Attributes: + annotator_1_id (str): + annotator_2_id (str): + agreement_pct (float): + total_comparisons (int): + """ + + annotator_1_id: str + annotator_2_id: str + agreement_pct: float + total_comparisons: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + annotator_1_id = self.annotator_1_id + + annotator_2_id = self.annotator_2_id + + agreement_pct = self.agreement_pct + + total_comparisons = self.total_comparisons + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "annotator_1_id": annotator_1_id, + "annotator_2_id": annotator_2_id, + "agreement_pct": agreement_pct, + "total_comparisons": total_comparisons, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + annotator_1_id = d.pop("annotator_1_id") + + annotator_2_id = d.pop("annotator_2_id") + + agreement_pct = d.pop("agreement_pct") + + total_comparisons = d.pop("total_comparisons") + + queue_agreement_annotator_pair = cls( + annotator_1_id=annotator_1_id, + annotator_2_id=annotator_2_id, + agreement_pct=agreement_pct, + total_comparisons=total_comparisons, + ) + + queue_agreement_annotator_pair.additional_properties = d + return queue_agreement_annotator_pair + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_agreement_label.py b/python/fi/generated/openapi_client/models/queue_agreement_label.py new file mode 100644 index 0000000..f68d742 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_agreement_label.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAgreementLabel") + + +@_attrs_define +class QueueAgreementLabel: + """ + Attributes: + label_name (None | str): + label_type (None | str): + agreement_pct (float | None): + cohens_kappa (float | None): + disagreement_count (int): + disagreement_items (list[str]): + """ + + label_name: None | str + label_type: None | str + agreement_pct: float | None + cohens_kappa: float | None + disagreement_count: int + disagreement_items: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label_name: None | str + label_name = self.label_name + + label_type: None | str + label_type = self.label_type + + agreement_pct: float | None + agreement_pct = self.agreement_pct + + cohens_kappa: float | None + cohens_kappa = self.cohens_kappa + + disagreement_count = self.disagreement_count + + disagreement_items = self.disagreement_items + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label_name": label_name, + "label_type": label_type, + "agreement_pct": agreement_pct, + "cohens_kappa": cohens_kappa, + "disagreement_count": disagreement_count, + "disagreement_items": disagreement_items, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_label_name(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + label_name = _parse_label_name(d.pop("label_name")) + + def _parse_label_type(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + label_type = _parse_label_type(d.pop("label_type")) + + def _parse_agreement_pct(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + agreement_pct = _parse_agreement_pct(d.pop("agreement_pct")) + + def _parse_cohens_kappa(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cohens_kappa = _parse_cohens_kappa(d.pop("cohens_kappa")) + + disagreement_count = d.pop("disagreement_count") + + disagreement_items = cast(list[str], d.pop("disagreement_items")) + + queue_agreement_label = cls( + label_name=label_name, + label_type=label_type, + agreement_pct=agreement_pct, + cohens_kappa=cohens_kappa, + disagreement_count=disagreement_count, + disagreement_items=disagreement_items, + ) + + queue_agreement_label.additional_properties = d + return queue_agreement_label + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_agreement_response.py b/python/fi/generated/openapi_client/models/queue_agreement_response.py new file mode 100644 index 0000000..72569f6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_agreement_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_agreement_result import QueueAgreementResult + + +T = TypeVar("T", bound="QueueAgreementResponse") + + +@_attrs_define +class QueueAgreementResponse: + """ + Attributes: + result (QueueAgreementResult): + status (bool | Unset): Default: True. + """ + + result: QueueAgreementResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_agreement_result import QueueAgreementResult + + d = dict(src_dict) + result = QueueAgreementResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_agreement_response = cls( + result=result, + status=status, + ) + + queue_agreement_response.additional_properties = d + return queue_agreement_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_agreement_result.py b/python/fi/generated/openapi_client/models/queue_agreement_result.py new file mode 100644 index 0000000..fb0cbbd --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_agreement_result.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_agreement_annotator_pair import QueueAgreementAnnotatorPair + from ..models.queue_agreement_result_labels import QueueAgreementResultLabels + + +T = TypeVar("T", bound="QueueAgreementResult") + + +@_attrs_define +class QueueAgreementResult: + """ + Attributes: + overall_agreement (float | None): + labels (QueueAgreementResultLabels): + annotator_pairs (list[QueueAgreementAnnotatorPair]): + """ + + overall_agreement: float | None + labels: QueueAgreementResultLabels + annotator_pairs: list[QueueAgreementAnnotatorPair] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + overall_agreement: float | None + overall_agreement = self.overall_agreement + + labels = self.labels.to_dict() + + annotator_pairs = [] + for annotator_pairs_item_data in self.annotator_pairs: + annotator_pairs_item = annotator_pairs_item_data.to_dict() + annotator_pairs.append(annotator_pairs_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "overall_agreement": overall_agreement, + "labels": labels, + "annotator_pairs": annotator_pairs, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_agreement_annotator_pair import QueueAgreementAnnotatorPair + from ..models.queue_agreement_result_labels import QueueAgreementResultLabels + + d = dict(src_dict) + + def _parse_overall_agreement(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + overall_agreement = _parse_overall_agreement(d.pop("overall_agreement")) + + labels = QueueAgreementResultLabels.from_dict(d.pop("labels")) + + annotator_pairs = [] + _annotator_pairs = d.pop("annotator_pairs") + for annotator_pairs_item_data in _annotator_pairs: + annotator_pairs_item = QueueAgreementAnnotatorPair.from_dict( + annotator_pairs_item_data + ) + + annotator_pairs.append(annotator_pairs_item) + + queue_agreement_result = cls( + overall_agreement=overall_agreement, + labels=labels, + annotator_pairs=annotator_pairs, + ) + + queue_agreement_result.additional_properties = d + return queue_agreement_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_agreement_result_labels.py b/python/fi/generated/openapi_client/models/queue_agreement_result_labels.py new file mode 100644 index 0000000..1da967e --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_agreement_result_labels.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_agreement_label import QueueAgreementLabel + + +T = TypeVar("T", bound="QueueAgreementResultLabels") + + +@_attrs_define +class QueueAgreementResultLabels: + """ """ + + additional_properties: dict[str, QueueAgreementLabel] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_agreement_label import QueueAgreementLabel + + d = dict(src_dict) + queue_agreement_result_labels = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = QueueAgreementLabel.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + queue_agreement_result_labels.additional_properties = additional_properties + return queue_agreement_result_labels + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> QueueAgreementLabel: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: QueueAgreementLabel) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_annotator_performance.py b/python/fi/generated/openapi_client/models/queue_analytics_annotator_performance.py new file mode 100644 index 0000000..123521c --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_annotator_performance.py @@ -0,0 +1,135 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueAnalyticsAnnotatorPerformance") + + +@_attrs_define +class QueueAnalyticsAnnotatorPerformance: + """ + Attributes: + completed (int): + user_id (None | str | Unset): + name (None | str | Unset): + last_active (datetime.datetime | None | Unset): + """ + + completed: int + user_id: None | str | Unset = UNSET + name: None | str | Unset = UNSET + last_active: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + completed = self.completed + + user_id: None | str | Unset + if isinstance(self.user_id, Unset): + user_id = UNSET + else: + user_id = self.user_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + last_active: None | str | Unset + if isinstance(self.last_active, Unset): + last_active = UNSET + elif isinstance(self.last_active, datetime.datetime): + last_active = self.last_active.isoformat() + else: + last_active = self.last_active + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "completed": completed, + } + ) + if user_id is not UNSET: + field_dict["user_id"] = user_id + if name is not UNSET: + field_dict["name"] = name + if last_active is not UNSET: + field_dict["last_active"] = last_active + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + completed = d.pop("completed") + + def _parse_user_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_id = _parse_user_id(d.pop("user_id", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_last_active(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_active_type_0 = isoparse(data) + + return last_active_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_active = _parse_last_active(d.pop("last_active", UNSET)) + + queue_analytics_annotator_performance = cls( + completed=completed, + user_id=user_id, + name=name, + last_active=last_active, + ) + + queue_analytics_annotator_performance.additional_properties = d + return queue_analytics_annotator_performance + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_response.py b/python/fi/generated/openapi_client/models/queue_analytics_response.py new file mode 100644 index 0000000..332c1b7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_analytics_result import QueueAnalyticsResult + + +T = TypeVar("T", bound="QueueAnalyticsResponse") + + +@_attrs_define +class QueueAnalyticsResponse: + """ + Attributes: + result (QueueAnalyticsResult): + status (bool | Unset): Default: True. + """ + + result: QueueAnalyticsResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_analytics_result import QueueAnalyticsResult + + d = dict(src_dict) + result = QueueAnalyticsResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_analytics_response = cls( + result=result, + status=status, + ) + + queue_analytics_response.additional_properties = d + return queue_analytics_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_result.py b/python/fi/generated/openapi_client/models/queue_analytics_result.py new file mode 100644 index 0000000..0acf3ea --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_result.py @@ -0,0 +1,131 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_analytics_annotator_performance import ( + QueueAnalyticsAnnotatorPerformance, + ) + from ..models.queue_analytics_result_label_distribution import ( + QueueAnalyticsResultLabelDistribution, + ) + from ..models.queue_analytics_result_status_breakdown import ( + QueueAnalyticsResultStatusBreakdown, + ) + from ..models.queue_analytics_throughput import QueueAnalyticsThroughput + + +T = TypeVar("T", bound="QueueAnalyticsResult") + + +@_attrs_define +class QueueAnalyticsResult: + """ + Attributes: + throughput (QueueAnalyticsThroughput): + annotator_performance (list[QueueAnalyticsAnnotatorPerformance]): + label_distribution (QueueAnalyticsResultLabelDistribution): + status_breakdown (QueueAnalyticsResultStatusBreakdown): + total (int): + """ + + throughput: QueueAnalyticsThroughput + annotator_performance: list[QueueAnalyticsAnnotatorPerformance] + label_distribution: QueueAnalyticsResultLabelDistribution + status_breakdown: QueueAnalyticsResultStatusBreakdown + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + throughput = self.throughput.to_dict() + + annotator_performance = [] + for annotator_performance_item_data in self.annotator_performance: + annotator_performance_item = annotator_performance_item_data.to_dict() + annotator_performance.append(annotator_performance_item) + + label_distribution = self.label_distribution.to_dict() + + status_breakdown = self.status_breakdown.to_dict() + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "throughput": throughput, + "annotator_performance": annotator_performance, + "label_distribution": label_distribution, + "status_breakdown": status_breakdown, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_analytics_annotator_performance import ( + QueueAnalyticsAnnotatorPerformance, + ) + from ..models.queue_analytics_result_label_distribution import ( + QueueAnalyticsResultLabelDistribution, + ) + from ..models.queue_analytics_result_status_breakdown import ( + QueueAnalyticsResultStatusBreakdown, + ) + from ..models.queue_analytics_throughput import QueueAnalyticsThroughput + + d = dict(src_dict) + throughput = QueueAnalyticsThroughput.from_dict(d.pop("throughput")) + + annotator_performance = [] + _annotator_performance = d.pop("annotator_performance") + for annotator_performance_item_data in _annotator_performance: + annotator_performance_item = QueueAnalyticsAnnotatorPerformance.from_dict( + annotator_performance_item_data + ) + + annotator_performance.append(annotator_performance_item) + + label_distribution = QueueAnalyticsResultLabelDistribution.from_dict( + d.pop("label_distribution") + ) + + status_breakdown = QueueAnalyticsResultStatusBreakdown.from_dict( + d.pop("status_breakdown") + ) + + total = d.pop("total") + + queue_analytics_result = cls( + throughput=throughput, + annotator_performance=annotator_performance, + label_distribution=label_distribution, + status_breakdown=status_breakdown, + total=total, + ) + + queue_analytics_result.additional_properties = d + return queue_analytics_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution.py b/python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution.py new file mode 100644 index 0000000..858def3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_analytics_result_label_distribution_additional_property import ( + QueueAnalyticsResultLabelDistributionAdditionalProperty, + ) + + +T = TypeVar("T", bound="QueueAnalyticsResultLabelDistribution") + + +@_attrs_define +class QueueAnalyticsResultLabelDistribution: + """ """ + + additional_properties: dict[ + str, QueueAnalyticsResultLabelDistributionAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_analytics_result_label_distribution_additional_property import ( + QueueAnalyticsResultLabelDistributionAdditionalProperty, + ) + + d = dict(src_dict) + queue_analytics_result_label_distribution = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + QueueAnalyticsResultLabelDistributionAdditionalProperty.from_dict( + prop_dict + ) + ) + + additional_properties[prop_name] = additional_property + + queue_analytics_result_label_distribution.additional_properties = ( + additional_properties + ) + return queue_analytics_result_label_distribution + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> QueueAnalyticsResultLabelDistributionAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: QueueAnalyticsResultLabelDistributionAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution_additional_property.py b/python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution_additional_property.py new file mode 100644 index 0000000..609fcd1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_result_label_distribution_additional_property.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnalyticsResultLabelDistributionAdditionalProperty") + + +@_attrs_define +class QueueAnalyticsResultLabelDistributionAdditionalProperty: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_analytics_result_label_distribution_additional_property = cls() + + queue_analytics_result_label_distribution_additional_property.additional_properties = d + return queue_analytics_result_label_distribution_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_result_status_breakdown.py b/python/fi/generated/openapi_client/models/queue_analytics_result_status_breakdown.py new file mode 100644 index 0000000..24cd133 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_result_status_breakdown.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnalyticsResultStatusBreakdown") + + +@_attrs_define +class QueueAnalyticsResultStatusBreakdown: + """ """ + + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_analytics_result_status_breakdown = cls() + + queue_analytics_result_status_breakdown.additional_properties = d + return queue_analytics_result_status_breakdown + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_throughput.py b/python/fi/generated/openapi_client/models/queue_analytics_throughput.py new file mode 100644 index 0000000..34b1d34 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_throughput.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_analytics_throughput_daily import QueueAnalyticsThroughputDaily + + +T = TypeVar("T", bound="QueueAnalyticsThroughput") + + +@_attrs_define +class QueueAnalyticsThroughput: + """ + Attributes: + daily (list[QueueAnalyticsThroughputDaily]): + total_completed (int): + avg_per_day (float): + """ + + daily: list[QueueAnalyticsThroughputDaily] + total_completed: int + avg_per_day: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + daily = [] + for daily_item_data in self.daily: + daily_item = daily_item_data.to_dict() + daily.append(daily_item) + + total_completed = self.total_completed + + avg_per_day = self.avg_per_day + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "daily": daily, + "total_completed": total_completed, + "avg_per_day": avg_per_day, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_analytics_throughput_daily import ( + QueueAnalyticsThroughputDaily, + ) + + d = dict(src_dict) + daily = [] + _daily = d.pop("daily") + for daily_item_data in _daily: + daily_item = QueueAnalyticsThroughputDaily.from_dict(daily_item_data) + + daily.append(daily_item) + + total_completed = d.pop("total_completed") + + avg_per_day = d.pop("avg_per_day") + + queue_analytics_throughput = cls( + daily=daily, + total_completed=total_completed, + avg_per_day=avg_per_day, + ) + + queue_analytics_throughput.additional_properties = d + return queue_analytics_throughput + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_analytics_throughput_daily.py b/python/fi/generated/openapi_client/models/queue_analytics_throughput_daily.py new file mode 100644 index 0000000..84bf194 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_analytics_throughput_daily.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnalyticsThroughputDaily") + + +@_attrs_define +class QueueAnalyticsThroughputDaily: + """ + Attributes: + date (str): + count (int): + """ + + date: str + count: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + date = self.date + + count = self.count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "date": date, + "count": count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + date = d.pop("date") + + count = d.pop("count") + + queue_analytics_throughput_daily = cls( + date=date, + count=count, + ) + + queue_analytics_throughput_daily.additional_properties = d + return queue_analytics_throughput_daily + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_response.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_response.py new file mode 100644 index 0000000..4161605 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_annotate_detail_result import QueueAnnotateDetailResult + + +T = TypeVar("T", bound="QueueAnnotateDetailResponse") + + +@_attrs_define +class QueueAnnotateDetailResponse: + """ + Attributes: + result (QueueAnnotateDetailResult): + status (bool | Unset): Default: True. + """ + + result: QueueAnnotateDetailResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_annotate_detail_result import QueueAnnotateDetailResult + + d = dict(src_dict) + result = QueueAnnotateDetailResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_annotate_detail_response = cls( + result=result, + status=status, + ) + + queue_annotate_detail_response.additional_properties = d + return queue_annotate_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result.py new file mode 100644 index 0000000..fa98cc7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result.py @@ -0,0 +1,291 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_annotate_detail_result_annotations_item import ( + QueueAnnotateDetailResultAnnotationsItem, + ) + from ..models.queue_annotate_detail_result_item import QueueAnnotateDetailResultItem + from ..models.queue_annotate_detail_result_labels_item import ( + QueueAnnotateDetailResultLabelsItem, + ) + from ..models.queue_annotate_detail_result_progress import ( + QueueAnnotateDetailResultProgress, + ) + from ..models.queue_annotate_detail_result_queue import ( + QueueAnnotateDetailResultQueue, + ) + from ..models.queue_annotate_detail_result_review_comments_item import ( + QueueAnnotateDetailResultReviewCommentsItem, + ) + from ..models.queue_annotate_detail_result_review_threads_item import ( + QueueAnnotateDetailResultReviewThreadsItem, + ) + from ..models.queue_annotate_detail_result_span_notes_item import ( + QueueAnnotateDetailResultSpanNotesItem, + ) + + +T = TypeVar("T", bound="QueueAnnotateDetailResult") + + +@_attrs_define +class QueueAnnotateDetailResult: + """ + Attributes: + item (QueueAnnotateDetailResultItem): + queue (QueueAnnotateDetailResultQueue): + labels (list[QueueAnnotateDetailResultLabelsItem]): + annotations (list[QueueAnnotateDetailResultAnnotationsItem]): + review_comments (list[QueueAnnotateDetailResultReviewCommentsItem]): + review_threads (list[QueueAnnotateDetailResultReviewThreadsItem]): + existing_notes (str): + span_notes (list[QueueAnnotateDetailResultSpanNotesItem]): + progress (QueueAnnotateDetailResultProgress): + span_notes_source_id (None | str | Unset): + next_item_id (None | str | Unset): + prev_item_id (None | str | Unset): + """ + + item: QueueAnnotateDetailResultItem + queue: QueueAnnotateDetailResultQueue + labels: list[QueueAnnotateDetailResultLabelsItem] + annotations: list[QueueAnnotateDetailResultAnnotationsItem] + review_comments: list[QueueAnnotateDetailResultReviewCommentsItem] + review_threads: list[QueueAnnotateDetailResultReviewThreadsItem] + existing_notes: str + span_notes: list[QueueAnnotateDetailResultSpanNotesItem] + progress: QueueAnnotateDetailResultProgress + span_notes_source_id: None | str | Unset = UNSET + next_item_id: None | str | Unset = UNSET + prev_item_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + item = self.item.to_dict() + + queue = self.queue.to_dict() + + labels = [] + for labels_item_data in self.labels: + labels_item = labels_item_data.to_dict() + labels.append(labels_item) + + annotations = [] + for annotations_item_data in self.annotations: + annotations_item = annotations_item_data.to_dict() + annotations.append(annotations_item) + + review_comments = [] + for review_comments_item_data in self.review_comments: + review_comments_item = review_comments_item_data.to_dict() + review_comments.append(review_comments_item) + + review_threads = [] + for review_threads_item_data in self.review_threads: + review_threads_item = review_threads_item_data.to_dict() + review_threads.append(review_threads_item) + + existing_notes = self.existing_notes + + span_notes = [] + for span_notes_item_data in self.span_notes: + span_notes_item = span_notes_item_data.to_dict() + span_notes.append(span_notes_item) + + progress = self.progress.to_dict() + + span_notes_source_id: None | str | Unset + if isinstance(self.span_notes_source_id, Unset): + span_notes_source_id = UNSET + else: + span_notes_source_id = self.span_notes_source_id + + next_item_id: None | str | Unset + if isinstance(self.next_item_id, Unset): + next_item_id = UNSET + else: + next_item_id = self.next_item_id + + prev_item_id: None | str | Unset + if isinstance(self.prev_item_id, Unset): + prev_item_id = UNSET + else: + prev_item_id = self.prev_item_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "item": item, + "queue": queue, + "labels": labels, + "annotations": annotations, + "review_comments": review_comments, + "review_threads": review_threads, + "existing_notes": existing_notes, + "span_notes": span_notes, + "progress": progress, + } + ) + if span_notes_source_id is not UNSET: + field_dict["span_notes_source_id"] = span_notes_source_id + if next_item_id is not UNSET: + field_dict["next_item_id"] = next_item_id + if prev_item_id is not UNSET: + field_dict["prev_item_id"] = prev_item_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_annotate_detail_result_annotations_item import ( + QueueAnnotateDetailResultAnnotationsItem, + ) + from ..models.queue_annotate_detail_result_item import ( + QueueAnnotateDetailResultItem, + ) + from ..models.queue_annotate_detail_result_labels_item import ( + QueueAnnotateDetailResultLabelsItem, + ) + from ..models.queue_annotate_detail_result_progress import ( + QueueAnnotateDetailResultProgress, + ) + from ..models.queue_annotate_detail_result_queue import ( + QueueAnnotateDetailResultQueue, + ) + from ..models.queue_annotate_detail_result_review_comments_item import ( + QueueAnnotateDetailResultReviewCommentsItem, + ) + from ..models.queue_annotate_detail_result_review_threads_item import ( + QueueAnnotateDetailResultReviewThreadsItem, + ) + from ..models.queue_annotate_detail_result_span_notes_item import ( + QueueAnnotateDetailResultSpanNotesItem, + ) + + d = dict(src_dict) + item = QueueAnnotateDetailResultItem.from_dict(d.pop("item")) + + queue = QueueAnnotateDetailResultQueue.from_dict(d.pop("queue")) + + labels = [] + _labels = d.pop("labels") + for labels_item_data in _labels: + labels_item = QueueAnnotateDetailResultLabelsItem.from_dict( + labels_item_data + ) + + labels.append(labels_item) + + annotations = [] + _annotations = d.pop("annotations") + for annotations_item_data in _annotations: + annotations_item = QueueAnnotateDetailResultAnnotationsItem.from_dict( + annotations_item_data + ) + + annotations.append(annotations_item) + + review_comments = [] + _review_comments = d.pop("review_comments") + for review_comments_item_data in _review_comments: + review_comments_item = ( + QueueAnnotateDetailResultReviewCommentsItem.from_dict( + review_comments_item_data + ) + ) + + review_comments.append(review_comments_item) + + review_threads = [] + _review_threads = d.pop("review_threads") + for review_threads_item_data in _review_threads: + review_threads_item = QueueAnnotateDetailResultReviewThreadsItem.from_dict( + review_threads_item_data + ) + + review_threads.append(review_threads_item) + + existing_notes = d.pop("existing_notes") + + span_notes = [] + _span_notes = d.pop("span_notes") + for span_notes_item_data in _span_notes: + span_notes_item = QueueAnnotateDetailResultSpanNotesItem.from_dict( + span_notes_item_data + ) + + span_notes.append(span_notes_item) + + progress = QueueAnnotateDetailResultProgress.from_dict(d.pop("progress")) + + def _parse_span_notes_source_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + span_notes_source_id = _parse_span_notes_source_id( + d.pop("span_notes_source_id", UNSET) + ) + + def _parse_next_item_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_item_id = _parse_next_item_id(d.pop("next_item_id", UNSET)) + + def _parse_prev_item_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + prev_item_id = _parse_prev_item_id(d.pop("prev_item_id", UNSET)) + + queue_annotate_detail_result = cls( + item=item, + queue=queue, + labels=labels, + annotations=annotations, + review_comments=review_comments, + review_threads=review_threads, + existing_notes=existing_notes, + span_notes=span_notes, + progress=progress, + span_notes_source_id=span_notes_source_id, + next_item_id=next_item_id, + prev_item_id=prev_item_id, + ) + + queue_annotate_detail_result.additional_properties = d + return queue_annotate_detail_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_annotations_item.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_annotations_item.py new file mode 100644 index 0000000..7188234 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_annotations_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultAnnotationsItem") + + +@_attrs_define +class QueueAnnotateDetailResultAnnotationsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_annotations_item = cls() + + queue_annotate_detail_result_annotations_item.additional_properties = d + return queue_annotate_detail_result_annotations_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_item.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_item.py new file mode 100644 index 0000000..aab3279 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultItem") + + +@_attrs_define +class QueueAnnotateDetailResultItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_item = cls() + + queue_annotate_detail_result_item.additional_properties = d + return queue_annotate_detail_result_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_labels_item.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_labels_item.py new file mode 100644 index 0000000..c2feaf5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_labels_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultLabelsItem") + + +@_attrs_define +class QueueAnnotateDetailResultLabelsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_labels_item = cls() + + queue_annotate_detail_result_labels_item.additional_properties = d + return queue_annotate_detail_result_labels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_progress.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_progress.py new file mode 100644 index 0000000..60a872d --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_progress.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultProgress") + + +@_attrs_define +class QueueAnnotateDetailResultProgress: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_progress = cls() + + queue_annotate_detail_result_progress.additional_properties = d + return queue_annotate_detail_result_progress + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_queue.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_queue.py new file mode 100644 index 0000000..2fc9fe8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_queue.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultQueue") + + +@_attrs_define +class QueueAnnotateDetailResultQueue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_queue = cls() + + queue_annotate_detail_result_queue.additional_properties = d + return queue_annotate_detail_result_queue + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_comments_item.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_comments_item.py new file mode 100644 index 0000000..0ec265f --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_comments_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultReviewCommentsItem") + + +@_attrs_define +class QueueAnnotateDetailResultReviewCommentsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_review_comments_item = cls() + + queue_annotate_detail_result_review_comments_item.additional_properties = d + return queue_annotate_detail_result_review_comments_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_threads_item.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_threads_item.py new file mode 100644 index 0000000..cb1252e --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_review_threads_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultReviewThreadsItem") + + +@_attrs_define +class QueueAnnotateDetailResultReviewThreadsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_review_threads_item = cls() + + queue_annotate_detail_result_review_threads_item.additional_properties = d + return queue_annotate_detail_result_review_threads_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotate_detail_result_span_notes_item.py b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_span_notes_item.py new file mode 100644 index 0000000..8572aba --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotate_detail_result_span_notes_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAnnotateDetailResultSpanNotesItem") + + +@_attrs_define +class QueueAnnotateDetailResultSpanNotesItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_annotate_detail_result_span_notes_item = cls() + + queue_annotate_detail_result_span_notes_item.additional_properties = d + return queue_annotate_detail_result_span_notes_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_annotator_nested.py b/python/fi/generated/openapi_client/models/queue_annotator_nested.py new file mode 100644 index 0000000..a2915f3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_annotator_nested.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueAnnotatorNested") + + +@_attrs_define +class QueueAnnotatorNested: + """ + Attributes: + user_id (UUID): + id (UUID | Unset): + name (str | Unset): + email (str | Unset): + role (str | Unset): Default: 'annotator'. + roles (str | Unset): + """ + + user_id: UUID + id: UUID | Unset = UNSET + name: str | Unset = UNSET + email: str | Unset = UNSET + role: str | Unset = "annotator" + roles: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = str(self.user_id) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name = self.name + + email = self.email + + role = self.role + + roles = self.roles + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_id": user_id, + } + ) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if email is not UNSET: + field_dict["email"] = email + if role is not UNSET: + field_dict["role"] = role + if roles is not UNSET: + field_dict["roles"] = roles + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_id = UUID(d.pop("user_id")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + name = d.pop("name", UNSET) + + email = d.pop("email", UNSET) + + role = d.pop("role", UNSET) + + roles = d.pop("roles", UNSET) + + queue_annotator_nested = cls( + user_id=user_id, + id=id, + name=name, + email=email, + role=role, + roles=roles, + ) + + queue_annotator_nested.additional_properties = d + return queue_annotator_nested + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_assign_items_response.py b/python/fi/generated/openapi_client/models/queue_assign_items_response.py new file mode 100644 index 0000000..fe1b9f4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_assign_items_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_assign_items_result import QueueAssignItemsResult + + +T = TypeVar("T", bound="QueueAssignItemsResponse") + + +@_attrs_define +class QueueAssignItemsResponse: + """ + Attributes: + result (QueueAssignItemsResult): + status (bool | Unset): Default: True. + """ + + result: QueueAssignItemsResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_assign_items_result import QueueAssignItemsResult + + d = dict(src_dict) + result = QueueAssignItemsResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_assign_items_response = cls( + result=result, + status=status, + ) + + queue_assign_items_response.additional_properties = d + return queue_assign_items_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_assign_items_result.py b/python/fi/generated/openapi_client/models/queue_assign_items_result.py new file mode 100644 index 0000000..35061c1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_assign_items_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueAssignItemsResult") + + +@_attrs_define +class QueueAssignItemsResult: + """ + Attributes: + assigned (int): + """ + + assigned: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + assigned = self.assigned + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "assigned": assigned, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + assigned = d.pop("assigned") + + queue_assign_items_result = cls( + assigned=assigned, + ) + + queue_assign_items_result.additional_properties = d + return queue_assign_items_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_bulk_remove_items_response.py b/python/fi/generated/openapi_client/models/queue_bulk_remove_items_response.py new file mode 100644 index 0000000..a1d076d --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_bulk_remove_items_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_bulk_remove_items_result import QueueBulkRemoveItemsResult + + +T = TypeVar("T", bound="QueueBulkRemoveItemsResponse") + + +@_attrs_define +class QueueBulkRemoveItemsResponse: + """ + Attributes: + result (QueueBulkRemoveItemsResult): + status (bool | Unset): Default: True. + """ + + result: QueueBulkRemoveItemsResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_bulk_remove_items_result import QueueBulkRemoveItemsResult + + d = dict(src_dict) + result = QueueBulkRemoveItemsResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_bulk_remove_items_response = cls( + result=result, + status=status, + ) + + queue_bulk_remove_items_response.additional_properties = d + return queue_bulk_remove_items_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_bulk_remove_items_result.py b/python/fi/generated/openapi_client/models/queue_bulk_remove_items_result.py new file mode 100644 index 0000000..69f6fde --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_bulk_remove_items_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueBulkRemoveItemsResult") + + +@_attrs_define +class QueueBulkRemoveItemsResult: + """ + Attributes: + removed (int): + """ + + removed: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + removed = self.removed + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "removed": removed, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + removed = d.pop("removed") + + queue_bulk_remove_items_result = cls( + removed=removed, + ) + + queue_bulk_remove_items_result.additional_properties = d + return queue_bulk_remove_items_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_default_queue.py b/python/fi/generated/openapi_client/models/queue_default_queue.py new file mode 100644 index 0000000..012b563 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_default_queue.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueDefaultQueue") + + +@_attrs_define +class QueueDefaultQueue: + """ + Attributes: + id (UUID): + name (str): + status (str): + is_default (bool): + description (str | Unset): + instructions (str | Unset): + """ + + id: UUID + name: str + status: str + is_default: bool + description: str | Unset = UNSET + instructions: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + status = self.status + + is_default = self.is_default + + description = self.description + + instructions = self.instructions + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "status": status, + "is_default": is_default, + } + ) + if description is not UNSET: + field_dict["description"] = description + if instructions is not UNSET: + field_dict["instructions"] = instructions + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + status = d.pop("status") + + is_default = d.pop("is_default") + + description = d.pop("description", UNSET) + + instructions = d.pop("instructions", UNSET) + + queue_default_queue = cls( + id=id, + name=name, + status=status, + is_default=is_default, + description=description, + instructions=instructions, + ) + + queue_default_queue.additional_properties = d + return queue_default_queue + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_default_request.py b/python/fi/generated/openapi_client/models/queue_default_request.py new file mode 100644 index 0000000..0ba03cc --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_default_request.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueDefaultRequest") + + +@_attrs_define +class QueueDefaultRequest: + """ + Attributes: + project_id (UUID | Unset): + dataset_id (UUID | Unset): + agent_definition_id (UUID | Unset): + """ + + project_id: UUID | Unset = UNSET + dataset_id: UUID | Unset = UNSET + agent_definition_id: UUID | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project_id: str | Unset = UNSET + if not isinstance(self.project_id, Unset): + project_id = str(self.project_id) + + dataset_id: str | Unset = UNSET + if not isinstance(self.dataset_id, Unset): + dataset_id = str(self.dataset_id) + + agent_definition_id: str | Unset = UNSET + if not isinstance(self.agent_definition_id, Unset): + agent_definition_id = str(self.agent_definition_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if project_id is not UNSET: + field_dict["project_id"] = project_id + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if agent_definition_id is not UNSET: + field_dict["agent_definition_id"] = agent_definition_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _project_id = d.pop("project_id", UNSET) + project_id: UUID | Unset + if isinstance(_project_id, Unset): + project_id = UNSET + else: + project_id = UUID(_project_id) + + _dataset_id = d.pop("dataset_id", UNSET) + dataset_id: UUID | Unset + if isinstance(_dataset_id, Unset): + dataset_id = UNSET + else: + dataset_id = UUID(_dataset_id) + + _agent_definition_id = d.pop("agent_definition_id", UNSET) + agent_definition_id: UUID | Unset + if isinstance(_agent_definition_id, Unset): + agent_definition_id = UNSET + else: + agent_definition_id = UUID(_agent_definition_id) + + queue_default_request = cls( + project_id=project_id, + dataset_id=dataset_id, + agent_definition_id=agent_definition_id, + ) + + queue_default_request.additional_properties = d + return queue_default_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_default_response.py b/python/fi/generated/openapi_client/models/queue_default_response.py new file mode 100644 index 0000000..586f8d3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_default_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_default_result import QueueDefaultResult + + +T = TypeVar("T", bound="QueueDefaultResponse") + + +@_attrs_define +class QueueDefaultResponse: + """ + Attributes: + result (QueueDefaultResult): + status (bool | Unset): Default: True. + """ + + result: QueueDefaultResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_default_result import QueueDefaultResult + + d = dict(src_dict) + result = QueueDefaultResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_default_response = cls( + result=result, + status=status, + ) + + queue_default_response.additional_properties = d + return queue_default_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_default_result.py b/python/fi/generated/openapi_client/models/queue_default_result.py new file mode 100644 index 0000000..d7e1ccd --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_default_result.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.queue_default_result_action import QueueDefaultResultAction + +if TYPE_CHECKING: + from ..models.queue_default_queue import QueueDefaultQueue + from ..models.queue_label_result import QueueLabelResult + + +T = TypeVar("T", bound="QueueDefaultResult") + + +@_attrs_define +class QueueDefaultResult: + """ + Attributes: + queue (QueueDefaultQueue): + labels (list[QueueLabelResult]): + created (bool): + action (QueueDefaultResultAction): + """ + + queue: QueueDefaultQueue + labels: list[QueueLabelResult] + created: bool + action: QueueDefaultResultAction + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + queue = self.queue.to_dict() + + labels = [] + for labels_item_data in self.labels: + labels_item = labels_item_data.to_dict() + labels.append(labels_item) + + created = self.created + + action = self.action.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "queue": queue, + "labels": labels, + "created": created, + "action": action, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_default_queue import QueueDefaultQueue + from ..models.queue_label_result import QueueLabelResult + + d = dict(src_dict) + queue = QueueDefaultQueue.from_dict(d.pop("queue")) + + labels = [] + _labels = d.pop("labels") + for labels_item_data in _labels: + labels_item = QueueLabelResult.from_dict(labels_item_data) + + labels.append(labels_item) + + created = d.pop("created") + + action = QueueDefaultResultAction(d.pop("action")) + + queue_default_result = cls( + queue=queue, + labels=labels, + created=created, + action=action, + ) + + queue_default_result.additional_properties = d + return queue_default_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_default_result_action.py b/python/fi/generated/openapi_client/models/queue_default_result_action.py new file mode 100644 index 0000000..169f974 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_default_result_action.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class QueueDefaultResultAction(str, Enum): + CREATED = "created" + FETCHED = "fetched" + RESTORED = "restored" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/queue_discussion_response.py b/python/fi/generated/openapi_client/models/queue_discussion_response.py new file mode 100644 index 0000000..81e3403 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_discussion_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_discussion_result import QueueDiscussionResult + + +T = TypeVar("T", bound="QueueDiscussionResponse") + + +@_attrs_define +class QueueDiscussionResponse: + """ + Attributes: + result (QueueDiscussionResult): + status (bool | Unset): Default: True. + """ + + result: QueueDiscussionResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_discussion_result import QueueDiscussionResult + + d = dict(src_dict) + result = QueueDiscussionResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_discussion_response = cls( + result=result, + status=status, + ) + + queue_discussion_response.additional_properties = d + return queue_discussion_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_discussion_result.py b/python/fi/generated/openapi_client/models/queue_discussion_result.py new file mode 100644 index 0000000..434380b --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_discussion_result.py @@ -0,0 +1,145 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_discussion_result_comment import QueueDiscussionResultComment + from ..models.queue_discussion_result_review_comments_item import ( + QueueDiscussionResultReviewCommentsItem, + ) + from ..models.queue_discussion_result_review_threads_item import ( + QueueDiscussionResultReviewThreadsItem, + ) + from ..models.queue_discussion_result_thread import QueueDiscussionResultThread + + +T = TypeVar("T", bound="QueueDiscussionResult") + + +@_attrs_define +class QueueDiscussionResult: + """ + Attributes: + review_comments (list[QueueDiscussionResultReviewCommentsItem]): + review_threads (list[QueueDiscussionResultReviewThreadsItem]): + comment (QueueDiscussionResultComment | Unset): + thread (QueueDiscussionResultThread | Unset): + """ + + review_comments: list[QueueDiscussionResultReviewCommentsItem] + review_threads: list[QueueDiscussionResultReviewThreadsItem] + comment: QueueDiscussionResultComment | Unset = UNSET + thread: QueueDiscussionResultThread | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + review_comments = [] + for review_comments_item_data in self.review_comments: + review_comments_item = review_comments_item_data.to_dict() + review_comments.append(review_comments_item) + + review_threads = [] + for review_threads_item_data in self.review_threads: + review_threads_item = review_threads_item_data.to_dict() + review_threads.append(review_threads_item) + + comment: dict[str, Any] | Unset = UNSET + if not isinstance(self.comment, Unset): + comment = self.comment.to_dict() + + thread: dict[str, Any] | Unset = UNSET + if not isinstance(self.thread, Unset): + thread = self.thread.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "review_comments": review_comments, + "review_threads": review_threads, + } + ) + if comment is not UNSET: + field_dict["comment"] = comment + if thread is not UNSET: + field_dict["thread"] = thread + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_discussion_result_comment import ( + QueueDiscussionResultComment, + ) + from ..models.queue_discussion_result_review_comments_item import ( + QueueDiscussionResultReviewCommentsItem, + ) + from ..models.queue_discussion_result_review_threads_item import ( + QueueDiscussionResultReviewThreadsItem, + ) + from ..models.queue_discussion_result_thread import QueueDiscussionResultThread + + d = dict(src_dict) + review_comments = [] + _review_comments = d.pop("review_comments") + for review_comments_item_data in _review_comments: + review_comments_item = QueueDiscussionResultReviewCommentsItem.from_dict( + review_comments_item_data + ) + + review_comments.append(review_comments_item) + + review_threads = [] + _review_threads = d.pop("review_threads") + for review_threads_item_data in _review_threads: + review_threads_item = QueueDiscussionResultReviewThreadsItem.from_dict( + review_threads_item_data + ) + + review_threads.append(review_threads_item) + + _comment = d.pop("comment", UNSET) + comment: QueueDiscussionResultComment | Unset + if isinstance(_comment, Unset): + comment = UNSET + else: + comment = QueueDiscussionResultComment.from_dict(_comment) + + _thread = d.pop("thread", UNSET) + thread: QueueDiscussionResultThread | Unset + if isinstance(_thread, Unset): + thread = UNSET + else: + thread = QueueDiscussionResultThread.from_dict(_thread) + + queue_discussion_result = cls( + review_comments=review_comments, + review_threads=review_threads, + comment=comment, + thread=thread, + ) + + queue_discussion_result.additional_properties = d + return queue_discussion_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_discussion_result_comment.py b/python/fi/generated/openapi_client/models/queue_discussion_result_comment.py new file mode 100644 index 0000000..f75bc36 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_discussion_result_comment.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueDiscussionResultComment") + + +@_attrs_define +class QueueDiscussionResultComment: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_discussion_result_comment = cls() + + queue_discussion_result_comment.additional_properties = d + return queue_discussion_result_comment + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_discussion_result_review_comments_item.py b/python/fi/generated/openapi_client/models/queue_discussion_result_review_comments_item.py new file mode 100644 index 0000000..5a00721 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_discussion_result_review_comments_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueDiscussionResultReviewCommentsItem") + + +@_attrs_define +class QueueDiscussionResultReviewCommentsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_discussion_result_review_comments_item = cls() + + queue_discussion_result_review_comments_item.additional_properties = d + return queue_discussion_result_review_comments_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_discussion_result_review_threads_item.py b/python/fi/generated/openapi_client/models/queue_discussion_result_review_threads_item.py new file mode 100644 index 0000000..aeac573 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_discussion_result_review_threads_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueDiscussionResultReviewThreadsItem") + + +@_attrs_define +class QueueDiscussionResultReviewThreadsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_discussion_result_review_threads_item = cls() + + queue_discussion_result_review_threads_item.additional_properties = d + return queue_discussion_result_review_threads_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_discussion_result_thread.py b/python/fi/generated/openapi_client/models/queue_discussion_result_thread.py new file mode 100644 index 0000000..f25d838 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_discussion_result_thread.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueDiscussionResultThread") + + +@_attrs_define +class QueueDiscussionResultThread: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_discussion_result_thread = cls() + + queue_discussion_result_thread.additional_properties = d + return queue_discussion_result_thread + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_annotations_response.py b/python/fi/generated/openapi_client/models/queue_export_annotations_response.py new file mode 100644 index 0000000..7db0f52 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_annotations_response.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_export_annotations_response_result_item import ( + QueueExportAnnotationsResponseResultItem, + ) + + +T = TypeVar("T", bound="QueueExportAnnotationsResponse") + + +@_attrs_define +class QueueExportAnnotationsResponse: + """ + Attributes: + result (list[QueueExportAnnotationsResponseResultItem]): + status (bool | Unset): Default: True. + """ + + result: list[QueueExportAnnotationsResponseResultItem] + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_export_annotations_response_result_item import ( + QueueExportAnnotationsResponseResultItem, + ) + + d = dict(src_dict) + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = QueueExportAnnotationsResponseResultItem.from_dict( + result_item_data + ) + + result.append(result_item) + + status = d.pop("status", UNSET) + + queue_export_annotations_response = cls( + result=result, + status=status, + ) + + queue_export_annotations_response.additional_properties = d + return queue_export_annotations_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_annotations_response_result_item.py b/python/fi/generated/openapi_client/models/queue_export_annotations_response_result_item.py new file mode 100644 index 0000000..7d57a5b --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_annotations_response_result_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueExportAnnotationsResponseResultItem") + + +@_attrs_define +class QueueExportAnnotationsResponseResultItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_export_annotations_response_result_item = cls() + + queue_export_annotations_response_result_item.additional_properties = d + return queue_export_annotations_response_result_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_column_mapping.py b/python/fi/generated/openapi_client/models/queue_export_column_mapping.py new file mode 100644 index 0000000..7887f44 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_column_mapping.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueExportColumnMapping") + + +@_attrs_define +class QueueExportColumnMapping: + """ + Attributes: + field (str | Unset): + id (str | Unset): + column (str | Unset): + enabled (bool | Unset): Default: True. + """ + + field: str | Unset = UNSET + id: str | Unset = UNSET + column: str | Unset = UNSET + enabled: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field = self.field + + id = self.id + + column = self.column + + enabled = self.enabled + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if field is not UNSET: + field_dict["field"] = field + if id is not UNSET: + field_dict["id"] = id + if column is not UNSET: + field_dict["column"] = column + if enabled is not UNSET: + field_dict["enabled"] = enabled + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + field = d.pop("field", UNSET) + + id = d.pop("id", UNSET) + + column = d.pop("column", UNSET) + + enabled = d.pop("enabled", UNSET) + + queue_export_column_mapping = cls( + field=field, + id=id, + column=column, + enabled=enabled, + ) + + queue_export_column_mapping.additional_properties = d + return queue_export_column_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_default_mapping.py b/python/fi/generated/openapi_client/models/queue_export_default_mapping.py new file mode 100644 index 0000000..da8f5e2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_default_mapping.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueExportDefaultMapping") + + +@_attrs_define +class QueueExportDefaultMapping: + """ + Attributes: + field (str): + column (str): + enabled (bool): + """ + + field: str + column: str + enabled: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field = self.field + + column = self.column + + enabled = self.enabled + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "field": field, + "column": column, + "enabled": enabled, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + field = d.pop("field") + + column = d.pop("column") + + enabled = d.pop("enabled") + + queue_export_default_mapping = cls( + field=field, + column=column, + enabled=enabled, + ) + + queue_export_default_mapping.additional_properties = d + return queue_export_default_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_field.py b/python/fi/generated/openapi_client/models/queue_export_field.py new file mode 100644 index 0000000..1f2bad4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_field.py @@ -0,0 +1,176 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueExportField") + + +@_attrs_define +class QueueExportField: + """ + Attributes: + id (str): + label (str): + column (str): + data_type (str): + group (str): + default (bool): + path (str | Unset): + source_type (str | Unset): + kind (str | Unset): + label_id (UUID | Unset): + slot (int | Unset): + eval_key (str | Unset): + expand_fields (list[str] | Unset): + """ + + id: str + label: str + column: str + data_type: str + group: str + default: bool + path: str | Unset = UNSET + source_type: str | Unset = UNSET + kind: str | Unset = UNSET + label_id: UUID | Unset = UNSET + slot: int | Unset = UNSET + eval_key: str | Unset = UNSET + expand_fields: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + label = self.label + + column = self.column + + data_type = self.data_type + + group = self.group + + default = self.default + + path = self.path + + source_type = self.source_type + + kind = self.kind + + label_id: str | Unset = UNSET + if not isinstance(self.label_id, Unset): + label_id = str(self.label_id) + + slot = self.slot + + eval_key = self.eval_key + + expand_fields: list[str] | Unset = UNSET + if not isinstance(self.expand_fields, Unset): + expand_fields = self.expand_fields + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "label": label, + "column": column, + "data_type": data_type, + "group": group, + "default": default, + } + ) + if path is not UNSET: + field_dict["path"] = path + if source_type is not UNSET: + field_dict["source_type"] = source_type + if kind is not UNSET: + field_dict["kind"] = kind + if label_id is not UNSET: + field_dict["label_id"] = label_id + if slot is not UNSET: + field_dict["slot"] = slot + if eval_key is not UNSET: + field_dict["eval_key"] = eval_key + if expand_fields is not UNSET: + field_dict["expand_fields"] = expand_fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + label = d.pop("label") + + column = d.pop("column") + + data_type = d.pop("data_type") + + group = d.pop("group") + + default = d.pop("default") + + path = d.pop("path", UNSET) + + source_type = d.pop("source_type", UNSET) + + kind = d.pop("kind", UNSET) + + _label_id = d.pop("label_id", UNSET) + label_id: UUID | Unset + if isinstance(_label_id, Unset): + label_id = UNSET + else: + label_id = UUID(_label_id) + + slot = d.pop("slot", UNSET) + + eval_key = d.pop("eval_key", UNSET) + + expand_fields = cast(list[str], d.pop("expand_fields", UNSET)) + + queue_export_field = cls( + id=id, + label=label, + column=column, + data_type=data_type, + group=group, + default=default, + path=path, + source_type=source_type, + kind=kind, + label_id=label_id, + slot=slot, + eval_key=eval_key, + expand_fields=expand_fields, + ) + + queue_export_field.additional_properties = d + return queue_export_field + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_fields_response.py b/python/fi/generated/openapi_client/models/queue_export_fields_response.py new file mode 100644 index 0000000..bfa6e93 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_fields_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_export_fields_result import QueueExportFieldsResult + + +T = TypeVar("T", bound="QueueExportFieldsResponse") + + +@_attrs_define +class QueueExportFieldsResponse: + """ + Attributes: + result (QueueExportFieldsResult): + status (bool | Unset): Default: True. + """ + + result: QueueExportFieldsResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_export_fields_result import QueueExportFieldsResult + + d = dict(src_dict) + result = QueueExportFieldsResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_export_fields_response = cls( + result=result, + status=status, + ) + + queue_export_fields_response.additional_properties = d + return queue_export_fields_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_fields_result.py b/python/fi/generated/openapi_client/models/queue_export_fields_result.py new file mode 100644 index 0000000..2530dfa --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_fields_result.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_export_default_mapping import QueueExportDefaultMapping + from ..models.queue_export_field import QueueExportField + + +T = TypeVar("T", bound="QueueExportFieldsResult") + + +@_attrs_define +class QueueExportFieldsResult: + """ + Attributes: + fields (list[QueueExportField]): + default_mapping (list[QueueExportDefaultMapping]): + """ + + fields: list[QueueExportField] + default_mapping: list[QueueExportDefaultMapping] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + fields.append(fields_item) + + default_mapping = [] + for default_mapping_item_data in self.default_mapping: + default_mapping_item = default_mapping_item_data.to_dict() + default_mapping.append(default_mapping_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "fields": fields, + "default_mapping": default_mapping, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_export_default_mapping import QueueExportDefaultMapping + from ..models.queue_export_field import QueueExportField + + d = dict(src_dict) + fields = [] + _fields = d.pop("fields") + for fields_item_data in _fields: + fields_item = QueueExportField.from_dict(fields_item_data) + + fields.append(fields_item) + + default_mapping = [] + _default_mapping = d.pop("default_mapping") + for default_mapping_item_data in _default_mapping: + default_mapping_item = QueueExportDefaultMapping.from_dict( + default_mapping_item_data + ) + + default_mapping.append(default_mapping_item) + + queue_export_fields_result = cls( + fields=fields, + default_mapping=default_mapping, + ) + + queue_export_fields_result.additional_properties = d + return queue_export_fields_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_to_dataset_request.py b/python/fi/generated/openapi_client/models/queue_export_to_dataset_request.py new file mode 100644 index 0000000..f6602b5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_to_dataset_request.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_export_column_mapping import QueueExportColumnMapping + + +T = TypeVar("T", bound="QueueExportToDatasetRequest") + + +@_attrs_define +class QueueExportToDatasetRequest: + """ + Attributes: + dataset_id (UUID | Unset): + dataset_name (str | Unset): + status_filter (str | Unset): Default: 'completed'. + column_mapping (list[QueueExportColumnMapping] | Unset): + """ + + dataset_id: UUID | Unset = UNSET + dataset_name: str | Unset = UNSET + status_filter: str | Unset = "completed" + column_mapping: list[QueueExportColumnMapping] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id: str | Unset = UNSET + if not isinstance(self.dataset_id, Unset): + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + status_filter = self.status_filter + + column_mapping: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.column_mapping, Unset): + column_mapping = [] + for column_mapping_item_data in self.column_mapping: + column_mapping_item = column_mapping_item_data.to_dict() + column_mapping.append(column_mapping_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if dataset_name is not UNSET: + field_dict["dataset_name"] = dataset_name + if status_filter is not UNSET: + field_dict["status_filter"] = status_filter + if column_mapping is not UNSET: + field_dict["column_mapping"] = column_mapping + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_export_column_mapping import QueueExportColumnMapping + + d = dict(src_dict) + _dataset_id = d.pop("dataset_id", UNSET) + dataset_id: UUID | Unset + if isinstance(_dataset_id, Unset): + dataset_id = UNSET + else: + dataset_id = UUID(_dataset_id) + + dataset_name = d.pop("dataset_name", UNSET) + + status_filter = d.pop("status_filter", UNSET) + + _column_mapping = d.pop("column_mapping", UNSET) + column_mapping: list[QueueExportColumnMapping] | Unset = UNSET + if _column_mapping is not UNSET: + column_mapping = [] + for column_mapping_item_data in _column_mapping: + column_mapping_item = QueueExportColumnMapping.from_dict( + column_mapping_item_data + ) + + column_mapping.append(column_mapping_item) + + queue_export_to_dataset_request = cls( + dataset_id=dataset_id, + dataset_name=dataset_name, + status_filter=status_filter, + column_mapping=column_mapping, + ) + + queue_export_to_dataset_request.additional_properties = d + return queue_export_to_dataset_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_to_dataset_response.py b/python/fi/generated/openapi_client/models/queue_export_to_dataset_response.py new file mode 100644 index 0000000..bb247eb --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_to_dataset_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_export_to_dataset_result import QueueExportToDatasetResult + + +T = TypeVar("T", bound="QueueExportToDatasetResponse") + + +@_attrs_define +class QueueExportToDatasetResponse: + """ + Attributes: + result (QueueExportToDatasetResult): + status (bool | Unset): Default: True. + """ + + result: QueueExportToDatasetResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_export_to_dataset_result import QueueExportToDatasetResult + + d = dict(src_dict) + result = QueueExportToDatasetResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_export_to_dataset_response = cls( + result=result, + status=status, + ) + + queue_export_to_dataset_response.additional_properties = d + return queue_export_to_dataset_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_export_to_dataset_result.py b/python/fi/generated/openapi_client/models/queue_export_to_dataset_result.py new file mode 100644 index 0000000..d23709a --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_export_to_dataset_result.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueExportToDatasetResult") + + +@_attrs_define +class QueueExportToDatasetResult: + """ + Attributes: + dataset_id (UUID): + dataset_name (str): + rows_created (int): + columns (list[str]): + """ + + dataset_id: UUID + dataset_name: str + rows_created: int + columns: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + rows_created = self.rows_created + + columns = self.columns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + "dataset_name": dataset_name, + "rows_created": rows_created, + "columns": columns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + dataset_name = d.pop("dataset_name") + + rows_created = d.pop("rows_created") + + columns = cast(list[str], d.pop("columns")) + + queue_export_to_dataset_result = cls( + dataset_id=dataset_id, + dataset_name=dataset_name, + rows_created=rows_created, + columns=columns, + ) + + queue_export_to_dataset_result.additional_properties = d + return queue_export_to_dataset_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_entry.py b/python/fi/generated/openapi_client/models/queue_for_source_entry.py new file mode 100644 index 0000000..208cd33 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_entry.py @@ -0,0 +1,183 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_for_source_entry_existing_label_notes import ( + QueueForSourceEntryExistingLabelNotes, + ) + from ..models.queue_for_source_entry_existing_scores import ( + QueueForSourceEntryExistingScores, + ) + from ..models.queue_for_source_entry_span_notes_item import ( + QueueForSourceEntrySpanNotesItem, + ) + from ..models.queue_for_source_item import QueueForSourceItem + from ..models.queue_for_source_queue import QueueForSourceQueue + from ..models.queue_label_result import QueueLabelResult + + +T = TypeVar("T", bound="QueueForSourceEntry") + + +@_attrs_define +class QueueForSourceEntry: + """ + Attributes: + queue (QueueForSourceQueue): + item (QueueForSourceItem): + labels (list[QueueLabelResult]): + existing_scores (QueueForSourceEntryExistingScores): + existing_notes (str): + existing_label_notes (QueueForSourceEntryExistingLabelNotes): + span_notes (list[QueueForSourceEntrySpanNotesItem]): + span_notes_source_id (None | str | Unset): + """ + + queue: QueueForSourceQueue + item: QueueForSourceItem + labels: list[QueueLabelResult] + existing_scores: QueueForSourceEntryExistingScores + existing_notes: str + existing_label_notes: QueueForSourceEntryExistingLabelNotes + span_notes: list[QueueForSourceEntrySpanNotesItem] + span_notes_source_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + queue = self.queue.to_dict() + + item = self.item.to_dict() + + labels = [] + for labels_item_data in self.labels: + labels_item = labels_item_data.to_dict() + labels.append(labels_item) + + existing_scores = self.existing_scores.to_dict() + + existing_notes = self.existing_notes + + existing_label_notes = self.existing_label_notes.to_dict() + + span_notes = [] + for span_notes_item_data in self.span_notes: + span_notes_item = span_notes_item_data.to_dict() + span_notes.append(span_notes_item) + + span_notes_source_id: None | str | Unset + if isinstance(self.span_notes_source_id, Unset): + span_notes_source_id = UNSET + else: + span_notes_source_id = self.span_notes_source_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "queue": queue, + "item": item, + "labels": labels, + "existing_scores": existing_scores, + "existing_notes": existing_notes, + "existing_label_notes": existing_label_notes, + "span_notes": span_notes, + } + ) + if span_notes_source_id is not UNSET: + field_dict["span_notes_source_id"] = span_notes_source_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_for_source_entry_existing_label_notes import ( + QueueForSourceEntryExistingLabelNotes, + ) + from ..models.queue_for_source_entry_existing_scores import ( + QueueForSourceEntryExistingScores, + ) + from ..models.queue_for_source_entry_span_notes_item import ( + QueueForSourceEntrySpanNotesItem, + ) + from ..models.queue_for_source_item import QueueForSourceItem + from ..models.queue_for_source_queue import QueueForSourceQueue + from ..models.queue_label_result import QueueLabelResult + + d = dict(src_dict) + queue = QueueForSourceQueue.from_dict(d.pop("queue")) + + item = QueueForSourceItem.from_dict(d.pop("item")) + + labels = [] + _labels = d.pop("labels") + for labels_item_data in _labels: + labels_item = QueueLabelResult.from_dict(labels_item_data) + + labels.append(labels_item) + + existing_scores = QueueForSourceEntryExistingScores.from_dict( + d.pop("existing_scores") + ) + + existing_notes = d.pop("existing_notes") + + existing_label_notes = QueueForSourceEntryExistingLabelNotes.from_dict( + d.pop("existing_label_notes") + ) + + span_notes = [] + _span_notes = d.pop("span_notes") + for span_notes_item_data in _span_notes: + span_notes_item = QueueForSourceEntrySpanNotesItem.from_dict( + span_notes_item_data + ) + + span_notes.append(span_notes_item) + + def _parse_span_notes_source_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + span_notes_source_id = _parse_span_notes_source_id( + d.pop("span_notes_source_id", UNSET) + ) + + queue_for_source_entry = cls( + queue=queue, + item=item, + labels=labels, + existing_scores=existing_scores, + existing_notes=existing_notes, + existing_label_notes=existing_label_notes, + span_notes=span_notes, + span_notes_source_id=span_notes_source_id, + ) + + queue_for_source_entry.additional_properties = d + return queue_for_source_entry + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_label_notes.py b/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_label_notes.py new file mode 100644 index 0000000..12aa11b --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_label_notes.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueForSourceEntryExistingLabelNotes") + + +@_attrs_define +class QueueForSourceEntryExistingLabelNotes: + """ """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_for_source_entry_existing_label_notes = cls() + + queue_for_source_entry_existing_label_notes.additional_properties = d + return queue_for_source_entry_existing_label_notes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores.py b/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores.py new file mode 100644 index 0000000..325d427 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_for_source_entry_existing_scores_additional_property import ( + QueueForSourceEntryExistingScoresAdditionalProperty, + ) + + +T = TypeVar("T", bound="QueueForSourceEntryExistingScores") + + +@_attrs_define +class QueueForSourceEntryExistingScores: + """ """ + + additional_properties: dict[ + str, QueueForSourceEntryExistingScoresAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_for_source_entry_existing_scores_additional_property import ( + QueueForSourceEntryExistingScoresAdditionalProperty, + ) + + d = dict(src_dict) + queue_for_source_entry_existing_scores = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + QueueForSourceEntryExistingScoresAdditionalProperty.from_dict(prop_dict) + ) + + additional_properties[prop_name] = additional_property + + queue_for_source_entry_existing_scores.additional_properties = ( + additional_properties + ) + return queue_for_source_entry_existing_scores + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> QueueForSourceEntryExistingScoresAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: QueueForSourceEntryExistingScoresAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores_additional_property.py b/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores_additional_property.py new file mode 100644 index 0000000..e7fc9b1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_entry_existing_scores_additional_property.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueForSourceEntryExistingScoresAdditionalProperty") + + +@_attrs_define +class QueueForSourceEntryExistingScoresAdditionalProperty: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_for_source_entry_existing_scores_additional_property = cls() + + queue_for_source_entry_existing_scores_additional_property.additional_properties = d + return queue_for_source_entry_existing_scores_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_entry_span_notes_item.py b/python/fi/generated/openapi_client/models/queue_for_source_entry_span_notes_item.py new file mode 100644 index 0000000..f158da8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_entry_span_notes_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueForSourceEntrySpanNotesItem") + + +@_attrs_define +class QueueForSourceEntrySpanNotesItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_for_source_entry_span_notes_item = cls() + + queue_for_source_entry_span_notes_item.additional_properties = d + return queue_for_source_entry_span_notes_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_item.py b/python/fi/generated/openapi_client/models/queue_for_source_item.py new file mode 100644 index 0000000..04b2276 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueForSourceItem") + + +@_attrs_define +class QueueForSourceItem: + """ + Attributes: + id (UUID): + status (str): + source_type (str): + source_id (None | str): + """ + + id: UUID + status: str + source_type: str + source_id: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + status = self.status + + source_type = self.source_type + + source_id: None | str + source_id = self.source_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "status": status, + "source_type": source_type, + "source_id": source_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + status = d.pop("status") + + source_type = d.pop("source_type") + + def _parse_source_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + source_id = _parse_source_id(d.pop("source_id")) + + queue_for_source_item = cls( + id=id, + status=status, + source_type=source_type, + source_id=source_id, + ) + + queue_for_source_item.additional_properties = d + return queue_for_source_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_queue.py b/python/fi/generated/openapi_client/models/queue_for_source_queue.py new file mode 100644 index 0000000..0b3d70d --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_queue.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueForSourceQueue") + + +@_attrs_define +class QueueForSourceQueue: + """ + Attributes: + id (UUID): + name (str): + instructions (str): + is_default (bool): + """ + + id: UUID + name: str + instructions: str + is_default: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + instructions = self.instructions + + is_default = self.is_default + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "instructions": instructions, + "is_default": is_default, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + instructions = d.pop("instructions") + + is_default = d.pop("is_default") + + queue_for_source_queue = cls( + id=id, + name=name, + instructions=instructions, + is_default=is_default, + ) + + queue_for_source_queue.additional_properties = d + return queue_for_source_queue + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_for_source_response.py b/python/fi/generated/openapi_client/models/queue_for_source_response.py new file mode 100644 index 0000000..84c4716 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_for_source_response.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_for_source_entry import QueueForSourceEntry + + +T = TypeVar("T", bound="QueueForSourceResponse") + + +@_attrs_define +class QueueForSourceResponse: + """ + Attributes: + result (list[QueueForSourceEntry]): + status (bool | Unset): Default: True. + """ + + result: list[QueueForSourceEntry] + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_for_source_entry import QueueForSourceEntry + + d = dict(src_dict) + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = QueueForSourceEntry.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + queue_for_source_response = cls( + result=result, + status=status, + ) + + queue_for_source_response.additional_properties = d + return queue_for_source_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_hard_delete_request.py b/python/fi/generated/openapi_client/models/queue_hard_delete_request.py new file mode 100644 index 0000000..a435e15 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_hard_delete_request.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueHardDeleteRequest") + + +@_attrs_define +class QueueHardDeleteRequest: + """ + Attributes: + force (bool): + confirm_name (str): + """ + + force: bool + confirm_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + force = self.force + + confirm_name = self.confirm_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "force": force, + "confirm_name": confirm_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + force = d.pop("force") + + confirm_name = d.pop("confirm_name") + + queue_hard_delete_request = cls( + force=force, + confirm_name=confirm_name, + ) + + queue_hard_delete_request.additional_properties = d + return queue_hard_delete_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_hard_delete_response.py b/python/fi/generated/openapi_client/models/queue_hard_delete_response.py new file mode 100644 index 0000000..d096489 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_hard_delete_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_hard_delete_result import QueueHardDeleteResult + + +T = TypeVar("T", bound="QueueHardDeleteResponse") + + +@_attrs_define +class QueueHardDeleteResponse: + """ + Attributes: + result (QueueHardDeleteResult): + status (bool | Unset): Default: True. + """ + + result: QueueHardDeleteResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_hard_delete_result import QueueHardDeleteResult + + d = dict(src_dict) + result = QueueHardDeleteResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_hard_delete_response = cls( + result=result, + status=status, + ) + + queue_hard_delete_response.additional_properties = d + return queue_hard_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_hard_delete_result.py b/python/fi/generated/openapi_client/models/queue_hard_delete_result.py new file mode 100644 index 0000000..3ca422c --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_hard_delete_result.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueHardDeleteResult") + + +@_attrs_define +class QueueHardDeleteResult: + """ + Attributes: + deleted (bool): + queue_id (UUID): + hard_deleted (bool | Unset): + archived (bool | Unset): + """ + + deleted: bool + queue_id: UUID + hard_deleted: bool | Unset = UNSET + archived: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted = self.deleted + + queue_id = str(self.queue_id) + + hard_deleted = self.hard_deleted + + archived = self.archived + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "deleted": deleted, + "queue_id": queue_id, + } + ) + if hard_deleted is not UNSET: + field_dict["hard_deleted"] = hard_deleted + if archived is not UNSET: + field_dict["archived"] = archived + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted = d.pop("deleted") + + queue_id = UUID(d.pop("queue_id")) + + hard_deleted = d.pop("hard_deleted", UNSET) + + archived = d.pop("archived", UNSET) + + queue_hard_delete_result = cls( + deleted=deleted, + queue_id=queue_id, + hard_deleted=hard_deleted, + archived=archived, + ) + + queue_hard_delete_result.additional_properties = d + return queue_hard_delete_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_import_annotations_response.py b/python/fi/generated/openapi_client/models/queue_import_annotations_response.py new file mode 100644 index 0000000..a868701 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_import_annotations_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_import_annotations_result import QueueImportAnnotationsResult + + +T = TypeVar("T", bound="QueueImportAnnotationsResponse") + + +@_attrs_define +class QueueImportAnnotationsResponse: + """ + Attributes: + result (QueueImportAnnotationsResult): + status (bool | Unset): Default: True. + """ + + result: QueueImportAnnotationsResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_import_annotations_result import ( + QueueImportAnnotationsResult, + ) + + d = dict(src_dict) + result = QueueImportAnnotationsResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_import_annotations_response = cls( + result=result, + status=status, + ) + + queue_import_annotations_response.additional_properties = d + return queue_import_annotations_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_import_annotations_result.py b/python/fi/generated/openapi_client/models/queue_import_annotations_result.py new file mode 100644 index 0000000..4904bc1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_import_annotations_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueImportAnnotationsResult") + + +@_attrs_define +class QueueImportAnnotationsResult: + """ + Attributes: + imported (int): + """ + + imported: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + imported = self.imported + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "imported": imported, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + imported = d.pop("imported") + + queue_import_annotations_result = cls( + imported=imported, + ) + + queue_import_annotations_result.additional_properties = d + return queue_import_annotations_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_item.py b/python/fi/generated/openapi_client/models/queue_item.py new file mode 100644 index 0000000..fe54ba6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_item.py @@ -0,0 +1,438 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.queue_item_source_type import QueueItemSourceType +from ..models.queue_item_status import QueueItemStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_item_metadata import QueueItemMetadata + + +T = TypeVar("T", bound="QueueItem") + + +@_attrs_define +class QueueItem: + """ + Attributes: + source_type (QueueItemSourceType): + id (UUID | Unset): + queue (UUID | Unset): + source_id (str | Unset): + status (QueueItemStatus | Unset): + workflow_status (str | Unset): + workflow_status_label (str | Unset): + priority (int | Unset): + order (int | Unset): + metadata (QueueItemMetadata | Unset): + assigned_to (None | Unset | UUID): + assigned_to_name (str | Unset): + assigned_users (str | Unset): + reserved_by (None | Unset | UUID): + reserved_by_name (str | Unset): + reservation_expires_at (datetime.datetime | None | Unset): + review_status (None | str | Unset): + reviewed_by (None | Unset | UUID): + reviewed_by_name (str | Unset): + reviewed_at (datetime.datetime | None | Unset): + review_notes (None | str | Unset): + source_preview (str | Unset): + created_at (datetime.datetime | Unset): + """ + + source_type: QueueItemSourceType + id: UUID | Unset = UNSET + queue: UUID | Unset = UNSET + source_id: str | Unset = UNSET + status: QueueItemStatus | Unset = UNSET + workflow_status: str | Unset = UNSET + workflow_status_label: str | Unset = UNSET + priority: int | Unset = UNSET + order: int | Unset = UNSET + metadata: QueueItemMetadata | Unset = UNSET + assigned_to: None | Unset | UUID = UNSET + assigned_to_name: str | Unset = UNSET + assigned_users: str | Unset = UNSET + reserved_by: None | Unset | UUID = UNSET + reserved_by_name: str | Unset = UNSET + reservation_expires_at: datetime.datetime | None | Unset = UNSET + review_status: None | str | Unset = UNSET + reviewed_by: None | Unset | UUID = UNSET + reviewed_by_name: str | Unset = UNSET + reviewed_at: datetime.datetime | None | Unset = UNSET + review_notes: None | str | Unset = UNSET + source_preview: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_type = self.source_type.value + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + queue: str | Unset = UNSET + if not isinstance(self.queue, Unset): + queue = str(self.queue) + + source_id = self.source_id + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + workflow_status = self.workflow_status + + workflow_status_label = self.workflow_status_label + + priority = self.priority + + order = self.order + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + assigned_to: None | str | Unset + if isinstance(self.assigned_to, Unset): + assigned_to = UNSET + elif isinstance(self.assigned_to, UUID): + assigned_to = str(self.assigned_to) + else: + assigned_to = self.assigned_to + + assigned_to_name = self.assigned_to_name + + assigned_users = self.assigned_users + + reserved_by: None | str | Unset + if isinstance(self.reserved_by, Unset): + reserved_by = UNSET + elif isinstance(self.reserved_by, UUID): + reserved_by = str(self.reserved_by) + else: + reserved_by = self.reserved_by + + reserved_by_name = self.reserved_by_name + + reservation_expires_at: None | str | Unset + if isinstance(self.reservation_expires_at, Unset): + reservation_expires_at = UNSET + elif isinstance(self.reservation_expires_at, datetime.datetime): + reservation_expires_at = self.reservation_expires_at.isoformat() + else: + reservation_expires_at = self.reservation_expires_at + + review_status: None | str | Unset + if isinstance(self.review_status, Unset): + review_status = UNSET + else: + review_status = self.review_status + + reviewed_by: None | str | Unset + if isinstance(self.reviewed_by, Unset): + reviewed_by = UNSET + elif isinstance(self.reviewed_by, UUID): + reviewed_by = str(self.reviewed_by) + else: + reviewed_by = self.reviewed_by + + reviewed_by_name = self.reviewed_by_name + + reviewed_at: None | str | Unset + if isinstance(self.reviewed_at, Unset): + reviewed_at = UNSET + elif isinstance(self.reviewed_at, datetime.datetime): + reviewed_at = self.reviewed_at.isoformat() + else: + reviewed_at = self.reviewed_at + + review_notes: None | str | Unset + if isinstance(self.review_notes, Unset): + review_notes = UNSET + else: + review_notes = self.review_notes + + source_preview = self.source_preview + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source_type": source_type, + } + ) + if id is not UNSET: + field_dict["id"] = id + if queue is not UNSET: + field_dict["queue"] = queue + if source_id is not UNSET: + field_dict["source_id"] = source_id + if status is not UNSET: + field_dict["status"] = status + if workflow_status is not UNSET: + field_dict["workflow_status"] = workflow_status + if workflow_status_label is not UNSET: + field_dict["workflow_status_label"] = workflow_status_label + if priority is not UNSET: + field_dict["priority"] = priority + if order is not UNSET: + field_dict["order"] = order + if metadata is not UNSET: + field_dict["metadata"] = metadata + if assigned_to is not UNSET: + field_dict["assigned_to"] = assigned_to + if assigned_to_name is not UNSET: + field_dict["assigned_to_name"] = assigned_to_name + if assigned_users is not UNSET: + field_dict["assigned_users"] = assigned_users + if reserved_by is not UNSET: + field_dict["reserved_by"] = reserved_by + if reserved_by_name is not UNSET: + field_dict["reserved_by_name"] = reserved_by_name + if reservation_expires_at is not UNSET: + field_dict["reservation_expires_at"] = reservation_expires_at + if review_status is not UNSET: + field_dict["review_status"] = review_status + if reviewed_by is not UNSET: + field_dict["reviewed_by"] = reviewed_by + if reviewed_by_name is not UNSET: + field_dict["reviewed_by_name"] = reviewed_by_name + if reviewed_at is not UNSET: + field_dict["reviewed_at"] = reviewed_at + if review_notes is not UNSET: + field_dict["review_notes"] = review_notes + if source_preview is not UNSET: + field_dict["source_preview"] = source_preview + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_item_metadata import QueueItemMetadata + + d = dict(src_dict) + source_type = QueueItemSourceType(d.pop("source_type")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _queue = d.pop("queue", UNSET) + queue: UUID | Unset + if isinstance(_queue, Unset): + queue = UNSET + else: + queue = UUID(_queue) + + source_id = d.pop("source_id", UNSET) + + _status = d.pop("status", UNSET) + status: QueueItemStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = QueueItemStatus(_status) + + workflow_status = d.pop("workflow_status", UNSET) + + workflow_status_label = d.pop("workflow_status_label", UNSET) + + priority = d.pop("priority", UNSET) + + order = d.pop("order", UNSET) + + _metadata = d.pop("metadata", UNSET) + metadata: QueueItemMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = QueueItemMetadata.from_dict(_metadata) + + def _parse_assigned_to(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + assigned_to_type_0 = UUID(data) + + return assigned_to_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + assigned_to = _parse_assigned_to(d.pop("assigned_to", UNSET)) + + assigned_to_name = d.pop("assigned_to_name", UNSET) + + assigned_users = d.pop("assigned_users", UNSET) + + def _parse_reserved_by(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + reserved_by_type_0 = UUID(data) + + return reserved_by_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + reserved_by = _parse_reserved_by(d.pop("reserved_by", UNSET)) + + reserved_by_name = d.pop("reserved_by_name", UNSET) + + def _parse_reservation_expires_at( + data: object, + ) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + reservation_expires_at_type_0 = isoparse(data) + + return reservation_expires_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + reservation_expires_at = _parse_reservation_expires_at( + d.pop("reservation_expires_at", UNSET) + ) + + def _parse_review_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + review_status = _parse_review_status(d.pop("review_status", UNSET)) + + def _parse_reviewed_by(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + reviewed_by_type_0 = UUID(data) + + return reviewed_by_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + reviewed_by = _parse_reviewed_by(d.pop("reviewed_by", UNSET)) + + reviewed_by_name = d.pop("reviewed_by_name", UNSET) + + def _parse_reviewed_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + reviewed_at_type_0 = isoparse(data) + + return reviewed_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + reviewed_at = _parse_reviewed_at(d.pop("reviewed_at", UNSET)) + + def _parse_review_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + review_notes = _parse_review_notes(d.pop("review_notes", UNSET)) + + source_preview = d.pop("source_preview", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + queue_item = cls( + source_type=source_type, + id=id, + queue=queue, + source_id=source_id, + status=status, + workflow_status=workflow_status, + workflow_status_label=workflow_status_label, + priority=priority, + order=order, + metadata=metadata, + assigned_to=assigned_to, + assigned_to_name=assigned_to_name, + assigned_users=assigned_users, + reserved_by=reserved_by, + reserved_by_name=reserved_by_name, + reservation_expires_at=reservation_expires_at, + review_status=review_status, + reviewed_by=reviewed_by, + reviewed_by_name=reviewed_by_name, + reviewed_at=reviewed_at, + review_notes=review_notes, + source_preview=source_preview, + created_at=created_at, + ) + + queue_item.additional_properties = d + return queue_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_item_annotations_response.py b/python/fi/generated/openapi_client/models/queue_item_annotations_response.py new file mode 100644 index 0000000..c0ab645 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_item_annotations_response.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.score import Score + + +T = TypeVar("T", bound="QueueItemAnnotationsResponse") + + +@_attrs_define +class QueueItemAnnotationsResponse: + """ + Attributes: + result (list[Score]): + status (bool | Unset): Default: True. + """ + + result: list[Score] + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.score import Score + + d = dict(src_dict) + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = Score.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + queue_item_annotations_response = cls( + result=result, + status=status, + ) + + queue_item_annotations_response.additional_properties = d + return queue_item_annotations_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_item_metadata.py b/python/fi/generated/openapi_client/models/queue_item_metadata.py new file mode 100644 index 0000000..b55482b --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_item_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueItemMetadata") + + +@_attrs_define +class QueueItemMetadata: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_item_metadata = cls() + + queue_item_metadata.additional_properties = d + return queue_item_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_item_navigation_request.py b/python/fi/generated/openapi_client/models/queue_item_navigation_request.py new file mode 100644 index 0000000..d882a87 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_item_navigation_request.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueItemNavigationRequest") + + +@_attrs_define +class QueueItemNavigationRequest: + """ + Attributes: + exclude (list[str] | Unset): + exclude_review_status (str | Unset): + include_completed (bool | Unset): Default: False. + """ + + exclude: list[str] | Unset = UNSET + exclude_review_status: str | Unset = UNSET + include_completed: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + exclude: list[str] | Unset = UNSET + if not isinstance(self.exclude, Unset): + exclude = self.exclude + + exclude_review_status = self.exclude_review_status + + include_completed = self.include_completed + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if exclude is not UNSET: + field_dict["exclude"] = exclude + if exclude_review_status is not UNSET: + field_dict["exclude_review_status"] = exclude_review_status + if include_completed is not UNSET: + field_dict["include_completed"] = include_completed + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + exclude = cast(list[str], d.pop("exclude", UNSET)) + + exclude_review_status = d.pop("exclude_review_status", UNSET) + + include_completed = d.pop("include_completed", UNSET) + + queue_item_navigation_request = cls( + exclude=exclude, + exclude_review_status=exclude_review_status, + include_completed=include_completed, + ) + + queue_item_navigation_request.additional_properties = d + return queue_item_navigation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_item_source_type.py b/python/fi/generated/openapi_client/models/queue_item_source_type.py new file mode 100644 index 0000000..cc0dd61 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_item_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class QueueItemSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/queue_item_status.py b/python/fi/generated/openapi_client/models/queue_item_status.py new file mode 100644 index 0000000..21db091 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_item_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class QueueItemStatus(str, Enum): + COMPLETED = "completed" + IN_PROGRESS = "in_progress" + PENDING = "pending" + SKIPPED = "skipped" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/queue_label_nested.py b/python/fi/generated/openapi_client/models/queue_label_nested.py new file mode 100644 index 0000000..3d23493 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_label_nested.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueLabelNested") + + +@_attrs_define +class QueueLabelNested: + """ + Attributes: + label_id (UUID): + id (UUID | Unset): + name (str | Unset): + type_ (str | Unset): + required (bool | Unset): + order (int | Unset): + """ + + label_id: UUID + id: UUID | Unset = UNSET + name: str | Unset = UNSET + type_: str | Unset = UNSET + required: bool | Unset = UNSET + order: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label_id = str(self.label_id) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name = self.name + + type_ = self.type_ + + required = self.required + + order = self.order + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label_id": label_id, + } + ) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if type_ is not UNSET: + field_dict["type"] = type_ + if required is not UNSET: + field_dict["required"] = required + if order is not UNSET: + field_dict["order"] = order + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + label_id = UUID(d.pop("label_id")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + name = d.pop("name", UNSET) + + type_ = d.pop("type", UNSET) + + required = d.pop("required", UNSET) + + order = d.pop("order", UNSET) + + queue_label_nested = cls( + label_id=label_id, + id=id, + name=name, + type_=type_, + required=required, + order=order, + ) + + queue_label_nested.additional_properties = d + return queue_label_nested + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_label_request.py b/python/fi/generated/openapi_client/models/queue_label_request.py new file mode 100644 index 0000000..d3c3628 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_label_request.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueLabelRequest") + + +@_attrs_define +class QueueLabelRequest: + """ + Attributes: + label_id (UUID): + required (bool | Unset): Default: True. + """ + + label_id: UUID + required: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label_id = str(self.label_id) + + required = self.required + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label_id": label_id, + } + ) + if required is not UNSET: + field_dict["required"] = required + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + label_id = UUID(d.pop("label_id")) + + required = d.pop("required", UNSET) + + queue_label_request = cls( + label_id=label_id, + required=required, + ) + + queue_label_request.additional_properties = d + return queue_label_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_label_result.py b/python/fi/generated/openapi_client/models/queue_label_result.py new file mode 100644 index 0000000..f6a8c43 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_label_result.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_label_result_settings import QueueLabelResultSettings + + +T = TypeVar("T", bound="QueueLabelResult") + + +@_attrs_define +class QueueLabelResult: + """ + Attributes: + id (UUID): + name (str): + type_ (str): + settings (QueueLabelResultSettings): + allow_notes (bool): + required (bool): + order (int): + description (str | Unset): + """ + + id: UUID + name: str + type_: str + settings: QueueLabelResultSettings + allow_notes: bool + required: bool + order: int + description: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + type_ = self.type_ + + settings = self.settings.to_dict() + + allow_notes = self.allow_notes + + required = self.required + + order = self.order + + description = self.description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "type": type_, + "settings": settings, + "allow_notes": allow_notes, + "required": required, + "order": order, + } + ) + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_label_result_settings import QueueLabelResultSettings + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + type_ = d.pop("type") + + settings = QueueLabelResultSettings.from_dict(d.pop("settings")) + + allow_notes = d.pop("allow_notes") + + required = d.pop("required") + + order = d.pop("order") + + description = d.pop("description", UNSET) + + queue_label_result = cls( + id=id, + name=name, + type_=type_, + settings=settings, + allow_notes=allow_notes, + required=required, + order=order, + description=description, + ) + + queue_label_result.additional_properties = d + return queue_label_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_label_result_settings.py b/python/fi/generated/openapi_client/models/queue_label_result_settings.py new file mode 100644 index 0000000..ae21795 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_label_result_settings.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueLabelResultSettings") + + +@_attrs_define +class QueueLabelResultSettings: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_label_result_settings = cls() + + queue_label_result_settings.additional_properties = d + return queue_label_result_settings + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_navigation_response.py b/python/fi/generated/openapi_client/models/queue_navigation_response.py new file mode 100644 index 0000000..8b61a20 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_navigation_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_navigation_result import QueueNavigationResult + + +T = TypeVar("T", bound="QueueNavigationResponse") + + +@_attrs_define +class QueueNavigationResponse: + """ + Attributes: + result (QueueNavigationResult): + status (bool | Unset): Default: True. + """ + + result: QueueNavigationResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_navigation_result import QueueNavigationResult + + d = dict(src_dict) + result = QueueNavigationResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_navigation_response = cls( + result=result, + status=status, + ) + + queue_navigation_response.additional_properties = d + return queue_navigation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_navigation_result.py b/python/fi/generated/openapi_client/models/queue_navigation_result.py new file mode 100644 index 0000000..3ae57d0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_navigation_result.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_navigation_result_next_item import QueueNavigationResultNextItem + + +T = TypeVar("T", bound="QueueNavigationResult") + + +@_attrs_define +class QueueNavigationResult: + """ + Attributes: + next_item (QueueNavigationResultNextItem): + completed_item_id (UUID | Unset): + skipped_item_id (UUID | Unset): + """ + + next_item: QueueNavigationResultNextItem + completed_item_id: UUID | Unset = UNSET + skipped_item_id: UUID | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + next_item = self.next_item.to_dict() + + completed_item_id: str | Unset = UNSET + if not isinstance(self.completed_item_id, Unset): + completed_item_id = str(self.completed_item_id) + + skipped_item_id: str | Unset = UNSET + if not isinstance(self.skipped_item_id, Unset): + skipped_item_id = str(self.skipped_item_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "next_item": next_item, + } + ) + if completed_item_id is not UNSET: + field_dict["completed_item_id"] = completed_item_id + if skipped_item_id is not UNSET: + field_dict["skipped_item_id"] = skipped_item_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_navigation_result_next_item import ( + QueueNavigationResultNextItem, + ) + + d = dict(src_dict) + next_item = QueueNavigationResultNextItem.from_dict(d.pop("next_item")) + + _completed_item_id = d.pop("completed_item_id", UNSET) + completed_item_id: UUID | Unset + if isinstance(_completed_item_id, Unset): + completed_item_id = UNSET + else: + completed_item_id = UUID(_completed_item_id) + + _skipped_item_id = d.pop("skipped_item_id", UNSET) + skipped_item_id: UUID | Unset + if isinstance(_skipped_item_id, Unset): + skipped_item_id = UNSET + else: + skipped_item_id = UUID(_skipped_item_id) + + queue_navigation_result = cls( + next_item=next_item, + completed_item_id=completed_item_id, + skipped_item_id=skipped_item_id, + ) + + queue_navigation_result.additional_properties = d + return queue_navigation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_navigation_result_next_item.py b/python/fi/generated/openapi_client/models/queue_navigation_result_next_item.py new file mode 100644 index 0000000..8c9feff --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_navigation_result_next_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueNavigationResultNextItem") + + +@_attrs_define +class QueueNavigationResultNextItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_navigation_result_next_item = cls() + + queue_navigation_result_next_item.additional_properties = d + return queue_navigation_result_next_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_next_item_response.py b/python/fi/generated/openapi_client/models/queue_next_item_response.py new file mode 100644 index 0000000..04ce31a --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_next_item_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_next_item_result import QueueNextItemResult + + +T = TypeVar("T", bound="QueueNextItemResponse") + + +@_attrs_define +class QueueNextItemResponse: + """ + Attributes: + result (QueueNextItemResult): + status (bool | Unset): Default: True. + """ + + result: QueueNextItemResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_next_item_result import QueueNextItemResult + + d = dict(src_dict) + result = QueueNextItemResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_next_item_response = cls( + result=result, + status=status, + ) + + queue_next_item_response.additional_properties = d + return queue_next_item_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_next_item_result.py b/python/fi/generated/openapi_client/models/queue_next_item_result.py new file mode 100644 index 0000000..0ab5748 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_next_item_result.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_next_item_result_item import QueueNextItemResultItem + + +T = TypeVar("T", bound="QueueNextItemResult") + + +@_attrs_define +class QueueNextItemResult: + """ + Attributes: + item (QueueNextItemResultItem): + """ + + item: QueueNextItemResultItem + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + item = self.item.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "item": item, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_next_item_result_item import QueueNextItemResultItem + + d = dict(src_dict) + item = QueueNextItemResultItem.from_dict(d.pop("item")) + + queue_next_item_result = cls( + item=item, + ) + + queue_next_item_result.additional_properties = d + return queue_next_item_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_next_item_result_item.py b/python/fi/generated/openapi_client/models/queue_next_item_result_item.py new file mode 100644 index 0000000..263c10a --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_next_item_result_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueNextItemResultItem") + + +@_attrs_define +class QueueNextItemResultItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_next_item_result_item = cls() + + queue_next_item_result_item.additional_properties = d + return queue_next_item_result_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_progress_annotator_stat.py b/python/fi/generated/openapi_client/models/queue_progress_annotator_stat.py new file mode 100644 index 0000000..757a82d --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_progress_annotator_stat.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="QueueProgressAnnotatorStat") + + +@_attrs_define +class QueueProgressAnnotatorStat: + """ + Attributes: + user_id (UUID): + completed (int): + pending (int): + in_progress (int): + in_review (int): + annotations_count (int): + name (None | str | Unset): + """ + + user_id: UUID + completed: int + pending: int + in_progress: int + in_review: int + annotations_count: int + name: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = str(self.user_id) + + completed = self.completed + + pending = self.pending + + in_progress = self.in_progress + + in_review = self.in_review + + annotations_count = self.annotations_count + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_id": user_id, + "completed": completed, + "pending": pending, + "in_progress": in_progress, + "in_review": in_review, + "annotations_count": annotations_count, + } + ) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_id = UUID(d.pop("user_id")) + + completed = d.pop("completed") + + pending = d.pop("pending") + + in_progress = d.pop("in_progress") + + in_review = d.pop("in_review") + + annotations_count = d.pop("annotations_count") + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + queue_progress_annotator_stat = cls( + user_id=user_id, + completed=completed, + pending=pending, + in_progress=in_progress, + in_review=in_review, + annotations_count=annotations_count, + name=name, + ) + + queue_progress_annotator_stat.additional_properties = d + return queue_progress_annotator_stat + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_progress_response.py b/python/fi/generated/openapi_client/models/queue_progress_response.py new file mode 100644 index 0000000..57c50bd --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_progress_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_progress_result import QueueProgressResult + + +T = TypeVar("T", bound="QueueProgressResponse") + + +@_attrs_define +class QueueProgressResponse: + """ + Attributes: + result (QueueProgressResult): + status (bool | Unset): Default: True. + """ + + result: QueueProgressResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_progress_result import QueueProgressResult + + d = dict(src_dict) + result = QueueProgressResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_progress_response = cls( + result=result, + status=status, + ) + + queue_progress_response.additional_properties = d + return queue_progress_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_progress_result.py b/python/fi/generated/openapi_client/models/queue_progress_result.py new file mode 100644 index 0000000..5f49371 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_progress_result.py @@ -0,0 +1,143 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_progress_annotator_stat import QueueProgressAnnotatorStat + from ..models.queue_progress_user_progress import QueueProgressUserProgress + + +T = TypeVar("T", bound="QueueProgressResult") + + +@_attrs_define +class QueueProgressResult: + """ + Attributes: + total (int): + pending (int): + in_progress (int): + in_review (int): + completed (int): + skipped (int): + progress_pct (float): + annotator_stats (list[QueueProgressAnnotatorStat]): + user_progress (QueueProgressUserProgress): + """ + + total: int + pending: int + in_progress: int + in_review: int + completed: int + skipped: int + progress_pct: float + annotator_stats: list[QueueProgressAnnotatorStat] + user_progress: QueueProgressUserProgress + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total = self.total + + pending = self.pending + + in_progress = self.in_progress + + in_review = self.in_review + + completed = self.completed + + skipped = self.skipped + + progress_pct = self.progress_pct + + annotator_stats = [] + for annotator_stats_item_data in self.annotator_stats: + annotator_stats_item = annotator_stats_item_data.to_dict() + annotator_stats.append(annotator_stats_item) + + user_progress = self.user_progress.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "total": total, + "pending": pending, + "in_progress": in_progress, + "in_review": in_review, + "completed": completed, + "skipped": skipped, + "progress_pct": progress_pct, + "annotator_stats": annotator_stats, + "user_progress": user_progress, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_progress_annotator_stat import QueueProgressAnnotatorStat + from ..models.queue_progress_user_progress import QueueProgressUserProgress + + d = dict(src_dict) + total = d.pop("total") + + pending = d.pop("pending") + + in_progress = d.pop("in_progress") + + in_review = d.pop("in_review") + + completed = d.pop("completed") + + skipped = d.pop("skipped") + + progress_pct = d.pop("progress_pct") + + annotator_stats = [] + _annotator_stats = d.pop("annotator_stats") + for annotator_stats_item_data in _annotator_stats: + annotator_stats_item = QueueProgressAnnotatorStat.from_dict( + annotator_stats_item_data + ) + + annotator_stats.append(annotator_stats_item) + + user_progress = QueueProgressUserProgress.from_dict(d.pop("user_progress")) + + queue_progress_result = cls( + total=total, + pending=pending, + in_progress=in_progress, + in_review=in_review, + completed=completed, + skipped=skipped, + progress_pct=progress_pct, + annotator_stats=annotator_stats, + user_progress=user_progress, + ) + + queue_progress_result.additional_properties = d + return queue_progress_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_progress_user_progress.py b/python/fi/generated/openapi_client/models/queue_progress_user_progress.py new file mode 100644 index 0000000..a2aa40f --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_progress_user_progress.py @@ -0,0 +1,109 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueProgressUserProgress") + + +@_attrs_define +class QueueProgressUserProgress: + """ + Attributes: + total (int): + completed (int): + pending (int): + in_progress (int): + in_review (int): + skipped (int): + progress_pct (float): + """ + + total: int + completed: int + pending: int + in_progress: int + in_review: int + skipped: int + progress_pct: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total = self.total + + completed = self.completed + + pending = self.pending + + in_progress = self.in_progress + + in_review = self.in_review + + skipped = self.skipped + + progress_pct = self.progress_pct + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "total": total, + "completed": completed, + "pending": pending, + "in_progress": in_progress, + "in_review": in_review, + "skipped": skipped, + "progress_pct": progress_pct, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + total = d.pop("total") + + completed = d.pop("completed") + + pending = d.pop("pending") + + in_progress = d.pop("in_progress") + + in_review = d.pop("in_review") + + skipped = d.pop("skipped") + + progress_pct = d.pop("progress_pct") + + queue_progress_user_progress = cls( + total=total, + completed=completed, + pending=pending, + in_progress=in_progress, + in_review=in_review, + skipped=skipped, + progress_pct=progress_pct, + ) + + queue_progress_user_progress.additional_properties = d + return queue_progress_user_progress + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_release_reservation_response.py b/python/fi/generated/openapi_client/models/queue_release_reservation_response.py new file mode 100644 index 0000000..a9d16e3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_release_reservation_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_release_reservation_result import QueueReleaseReservationResult + + +T = TypeVar("T", bound="QueueReleaseReservationResponse") + + +@_attrs_define +class QueueReleaseReservationResponse: + """ + Attributes: + result (QueueReleaseReservationResult): + status (bool | Unset): Default: True. + """ + + result: QueueReleaseReservationResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_release_reservation_result import ( + QueueReleaseReservationResult, + ) + + d = dict(src_dict) + result = QueueReleaseReservationResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_release_reservation_response = cls( + result=result, + status=status, + ) + + queue_release_reservation_response.additional_properties = d + return queue_release_reservation_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_release_reservation_result.py b/python/fi/generated/openapi_client/models/queue_release_reservation_result.py new file mode 100644 index 0000000..b9cbd17 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_release_reservation_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueReleaseReservationResult") + + +@_attrs_define +class QueueReleaseReservationResult: + """ + Attributes: + released (bool): + """ + + released: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + released = self.released + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "released": released, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + released = d.pop("released") + + queue_release_reservation_result = cls( + released=released, + ) + + queue_release_reservation_result.additional_properties = d + return queue_release_reservation_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_remove_label_response.py b/python/fi/generated/openapi_client/models/queue_remove_label_response.py new file mode 100644 index 0000000..f33f369 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_remove_label_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_remove_label_result import QueueRemoveLabelResult + + +T = TypeVar("T", bound="QueueRemoveLabelResponse") + + +@_attrs_define +class QueueRemoveLabelResponse: + """ + Attributes: + result (QueueRemoveLabelResult): + status (bool | Unset): Default: True. + """ + + result: QueueRemoveLabelResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_remove_label_result import QueueRemoveLabelResult + + d = dict(src_dict) + result = QueueRemoveLabelResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_remove_label_response = cls( + result=result, + status=status, + ) + + queue_remove_label_response.additional_properties = d + return queue_remove_label_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_remove_label_result.py b/python/fi/generated/openapi_client/models/queue_remove_label_result.py new file mode 100644 index 0000000..80db823 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_remove_label_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueRemoveLabelResult") + + +@_attrs_define +class QueueRemoveLabelResult: + """ + Attributes: + removed (bool): + """ + + removed: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + removed = self.removed + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "removed": removed, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + removed = d.pop("removed") + + queue_remove_label_result = cls( + removed=removed, + ) + + queue_remove_label_result.additional_properties = d + return queue_remove_label_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_review_item_response.py b/python/fi/generated/openapi_client/models/queue_review_item_response.py new file mode 100644 index 0000000..826514d --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_review_item_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_review_item_result import QueueReviewItemResult + + +T = TypeVar("T", bound="QueueReviewItemResponse") + + +@_attrs_define +class QueueReviewItemResponse: + """ + Attributes: + result (QueueReviewItemResult): + status (bool | Unset): Default: True. + """ + + result: QueueReviewItemResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_review_item_result import QueueReviewItemResult + + d = dict(src_dict) + result = QueueReviewItemResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_review_item_response = cls( + result=result, + status=status, + ) + + queue_review_item_response.additional_properties = d + return queue_review_item_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_review_item_result.py b/python/fi/generated/openapi_client/models/queue_review_item_result.py new file mode 100644 index 0000000..2334cf3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_review_item_result.py @@ -0,0 +1,136 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.queue_review_item_result_next_item import ( + QueueReviewItemResultNextItem, + ) + from ..models.queue_review_item_result_review_comments_item import ( + QueueReviewItemResultReviewCommentsItem, + ) + from ..models.queue_review_item_result_review_threads_item import ( + QueueReviewItemResultReviewThreadsItem, + ) + + +T = TypeVar("T", bound="QueueReviewItemResult") + + +@_attrs_define +class QueueReviewItemResult: + """ + Attributes: + reviewed_item_id (UUID): + action (str): + next_item (QueueReviewItemResultNextItem): + review_comments (list[QueueReviewItemResultReviewCommentsItem]): + review_threads (list[QueueReviewItemResultReviewThreadsItem]): + """ + + reviewed_item_id: UUID + action: str + next_item: QueueReviewItemResultNextItem + review_comments: list[QueueReviewItemResultReviewCommentsItem] + review_threads: list[QueueReviewItemResultReviewThreadsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + reviewed_item_id = str(self.reviewed_item_id) + + action = self.action + + next_item = self.next_item.to_dict() + + review_comments = [] + for review_comments_item_data in self.review_comments: + review_comments_item = review_comments_item_data.to_dict() + review_comments.append(review_comments_item) + + review_threads = [] + for review_threads_item_data in self.review_threads: + review_threads_item = review_threads_item_data.to_dict() + review_threads.append(review_threads_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "reviewed_item_id": reviewed_item_id, + "action": action, + "next_item": next_item, + "review_comments": review_comments, + "review_threads": review_threads, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_review_item_result_next_item import ( + QueueReviewItemResultNextItem, + ) + from ..models.queue_review_item_result_review_comments_item import ( + QueueReviewItemResultReviewCommentsItem, + ) + from ..models.queue_review_item_result_review_threads_item import ( + QueueReviewItemResultReviewThreadsItem, + ) + + d = dict(src_dict) + reviewed_item_id = UUID(d.pop("reviewed_item_id")) + + action = d.pop("action") + + next_item = QueueReviewItemResultNextItem.from_dict(d.pop("next_item")) + + review_comments = [] + _review_comments = d.pop("review_comments") + for review_comments_item_data in _review_comments: + review_comments_item = QueueReviewItemResultReviewCommentsItem.from_dict( + review_comments_item_data + ) + + review_comments.append(review_comments_item) + + review_threads = [] + _review_threads = d.pop("review_threads") + for review_threads_item_data in _review_threads: + review_threads_item = QueueReviewItemResultReviewThreadsItem.from_dict( + review_threads_item_data + ) + + review_threads.append(review_threads_item) + + queue_review_item_result = cls( + reviewed_item_id=reviewed_item_id, + action=action, + next_item=next_item, + review_comments=review_comments, + review_threads=review_threads, + ) + + queue_review_item_result.additional_properties = d + return queue_review_item_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_review_item_result_next_item.py b/python/fi/generated/openapi_client/models/queue_review_item_result_next_item.py new file mode 100644 index 0000000..102da25 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_review_item_result_next_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueReviewItemResultNextItem") + + +@_attrs_define +class QueueReviewItemResultNextItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_review_item_result_next_item = cls() + + queue_review_item_result_next_item.additional_properties = d + return queue_review_item_result_next_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_review_item_result_review_comments_item.py b/python/fi/generated/openapi_client/models/queue_review_item_result_review_comments_item.py new file mode 100644 index 0000000..443510c --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_review_item_result_review_comments_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueReviewItemResultReviewCommentsItem") + + +@_attrs_define +class QueueReviewItemResultReviewCommentsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_review_item_result_review_comments_item = cls() + + queue_review_item_result_review_comments_item.additional_properties = d + return queue_review_item_result_review_comments_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_review_item_result_review_threads_item.py b/python/fi/generated/openapi_client/models/queue_review_item_result_review_threads_item.py new file mode 100644 index 0000000..4598d08 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_review_item_result_review_threads_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueReviewItemResultReviewThreadsItem") + + +@_attrs_define +class QueueReviewItemResultReviewThreadsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + queue_review_item_result_review_threads_item = cls() + + queue_review_item_result_review_threads_item.additional_properties = d + return queue_review_item_result_review_threads_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_status_request.py b/python/fi/generated/openapi_client/models/queue_status_request.py new file mode 100644 index 0000000..f65d32c --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_status_request.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.queue_status_request_status import QueueStatusRequestStatus + +T = TypeVar("T", bound="QueueStatusRequest") + + +@_attrs_define +class QueueStatusRequest: + """ + Attributes: + status (QueueStatusRequestStatus): + """ + + status: QueueStatusRequestStatus + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = QueueStatusRequestStatus(d.pop("status")) + + queue_status_request = cls( + status=status, + ) + + queue_status_request.additional_properties = d + return queue_status_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_status_request_status.py b/python/fi/generated/openapi_client/models/queue_status_request_status.py new file mode 100644 index 0000000..34e9793 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_status_request_status.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class QueueStatusRequestStatus(str, Enum): + ACTIVE = "active" + COMPLETED = "completed" + DRAFT = "draft" + PAUSED = "paused" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/queue_status_response.py b/python/fi/generated/openapi_client/models/queue_status_response.py new file mode 100644 index 0000000..a4a0f1b --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_status_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.annotation_queue import AnnotationQueue + + +T = TypeVar("T", bound="QueueStatusResponse") + + +@_attrs_define +class QueueStatusResponse: + """ + Attributes: + result (AnnotationQueue): + status (bool | Unset): Default: True. + """ + + result: AnnotationQueue + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.annotation_queue import AnnotationQueue + + d = dict(src_dict) + result = AnnotationQueue.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_status_response = cls( + result=result, + status=status, + ) + + queue_status_response.additional_properties = d + return queue_status_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_submit_annotations_response.py b/python/fi/generated/openapi_client/models/queue_submit_annotations_response.py new file mode 100644 index 0000000..8365185 --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_submit_annotations_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.queue_submit_annotations_result import QueueSubmitAnnotationsResult + + +T = TypeVar("T", bound="QueueSubmitAnnotationsResponse") + + +@_attrs_define +class QueueSubmitAnnotationsResponse: + """ + Attributes: + result (QueueSubmitAnnotationsResult): + status (bool | Unset): Default: True. + """ + + result: QueueSubmitAnnotationsResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.queue_submit_annotations_result import ( + QueueSubmitAnnotationsResult, + ) + + d = dict(src_dict) + result = QueueSubmitAnnotationsResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + queue_submit_annotations_response = cls( + result=result, + status=status, + ) + + queue_submit_annotations_response.additional_properties = d + return queue_submit_annotations_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/queue_submit_annotations_result.py b/python/fi/generated/openapi_client/models/queue_submit_annotations_result.py new file mode 100644 index 0000000..ba85d4e --- /dev/null +++ b/python/fi/generated/openapi_client/models/queue_submit_annotations_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="QueueSubmitAnnotationsResult") + + +@_attrs_define +class QueueSubmitAnnotationsResult: + """ + Attributes: + submitted (int): + """ + + submitted: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + submitted = self.submitted + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "submitted": submitted, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + submitted = d.pop("submitted") + + queue_submit_annotations_result = cls( + submitted=submitted, + ) + + queue_submit_annotations_result.additional_properties = d + return queue_submit_annotations_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/recommendation.py b/python/fi/generated/openapi_client/models/recommendation.py new file mode 100644 index 0000000..c7522af --- /dev/null +++ b/python/fi/generated/openapi_client/models/recommendation.py @@ -0,0 +1,135 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="Recommendation") + + +@_attrs_define +class Recommendation: + """ + Attributes: + id (str): + title (str): + description (str): + priority (str): + root_cause_link (int | None): + immediate_fix (None | str): + insights (None | str): + evidence (list[str]): + """ + + id: str + title: str + description: str + priority: str + root_cause_link: int | None + immediate_fix: None | str + insights: None | str + evidence: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + title = self.title + + description = self.description + + priority = self.priority + + root_cause_link: int | None + root_cause_link = self.root_cause_link + + immediate_fix: None | str + immediate_fix = self.immediate_fix + + insights: None | str + insights = self.insights + + evidence = self.evidence + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "title": title, + "description": description, + "priority": priority, + "root_cause_link": root_cause_link, + "immediate_fix": immediate_fix, + "insights": insights, + "evidence": evidence, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + title = d.pop("title") + + description = d.pop("description") + + priority = d.pop("priority") + + def _parse_root_cause_link(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + root_cause_link = _parse_root_cause_link(d.pop("root_cause_link")) + + def _parse_immediate_fix(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + immediate_fix = _parse_immediate_fix(d.pop("immediate_fix")) + + def _parse_insights(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + insights = _parse_insights(d.pop("insights")) + + evidence = cast(list[str], d.pop("evidence")) + + recommendation = cls( + id=id, + title=title, + description=description, + priority=priority, + root_cause_link=root_cause_link, + immediate_fix=immediate_fix, + insights=insights, + evidence=evidence, + ) + + recommendation.additional_properties = d + return recommendation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/representative_trace.py b/python/fi/generated/openapi_client/models/representative_trace.py new file mode 100644 index 0000000..babd28c --- /dev/null +++ b/python/fi/generated/openapi_client/models/representative_trace.py @@ -0,0 +1,192 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +if TYPE_CHECKING: + from ..models.agent_flow_graph import AgentFlowGraph + from ..models.representative_trace_recommendations_item import ( + RepresentativeTraceRecommendationsItem, + ) + from ..models.representative_trace_root_causes_item import ( + RepresentativeTraceRootCausesItem, + ) + from ..models.representative_trace_what_changed import ( + RepresentativeTraceWhatChanged, + ) + from ..models.trace_evidence import TraceEvidence + from ..models.trace_summary import TraceSummary + + +T = TypeVar("T", bound="RepresentativeTrace") + + +@_attrs_define +class RepresentativeTrace: + """ + Attributes: + id (str): + status (str): + timestamp (datetime.datetime | None): + summary (TraceSummary): + evidence (TraceEvidence): + agent_flow (AgentFlowGraph): + root_causes (list[RepresentativeTraceRootCausesItem]): + recommendations (list[RepresentativeTraceRecommendationsItem]): + what_changed (RepresentativeTraceWhatChanged): + """ + + id: str + status: str + timestamp: datetime.datetime | None + summary: TraceSummary + evidence: TraceEvidence + agent_flow: AgentFlowGraph + root_causes: list[RepresentativeTraceRootCausesItem] + recommendations: list[RepresentativeTraceRecommendationsItem] + what_changed: RepresentativeTraceWhatChanged + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + status = self.status + + timestamp: None | str + if isinstance(self.timestamp, datetime.datetime): + timestamp = self.timestamp.isoformat() + else: + timestamp = self.timestamp + + summary = self.summary.to_dict() + + evidence = self.evidence.to_dict() + + agent_flow = self.agent_flow.to_dict() + + root_causes = [] + for root_causes_item_data in self.root_causes: + root_causes_item = root_causes_item_data.to_dict() + root_causes.append(root_causes_item) + + recommendations = [] + for recommendations_item_data in self.recommendations: + recommendations_item = recommendations_item_data.to_dict() + recommendations.append(recommendations_item) + + what_changed = self.what_changed.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "status": status, + "timestamp": timestamp, + "summary": summary, + "evidence": evidence, + "agent_flow": agent_flow, + "root_causes": root_causes, + "recommendations": recommendations, + "what_changed": what_changed, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_flow_graph import AgentFlowGraph + from ..models.representative_trace_recommendations_item import ( + RepresentativeTraceRecommendationsItem, + ) + from ..models.representative_trace_root_causes_item import ( + RepresentativeTraceRootCausesItem, + ) + from ..models.representative_trace_what_changed import ( + RepresentativeTraceWhatChanged, + ) + from ..models.trace_evidence import TraceEvidence + from ..models.trace_summary import TraceSummary + + d = dict(src_dict) + id = d.pop("id") + + status = d.pop("status") + + def _parse_timestamp(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + timestamp_type_0 = isoparse(data) + + return timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + timestamp = _parse_timestamp(d.pop("timestamp")) + + summary = TraceSummary.from_dict(d.pop("summary")) + + evidence = TraceEvidence.from_dict(d.pop("evidence")) + + agent_flow = AgentFlowGraph.from_dict(d.pop("agent_flow")) + + root_causes = [] + _root_causes = d.pop("root_causes") + for root_causes_item_data in _root_causes: + root_causes_item = RepresentativeTraceRootCausesItem.from_dict( + root_causes_item_data + ) + + root_causes.append(root_causes_item) + + recommendations = [] + _recommendations = d.pop("recommendations") + for recommendations_item_data in _recommendations: + recommendations_item = RepresentativeTraceRecommendationsItem.from_dict( + recommendations_item_data + ) + + recommendations.append(recommendations_item) + + what_changed = RepresentativeTraceWhatChanged.from_dict(d.pop("what_changed")) + + representative_trace = cls( + id=id, + status=status, + timestamp=timestamp, + summary=summary, + evidence=evidence, + agent_flow=agent_flow, + root_causes=root_causes, + recommendations=recommendations, + what_changed=what_changed, + ) + + representative_trace.additional_properties = d + return representative_trace + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/representative_trace_recommendations_item.py b/python/fi/generated/openapi_client/models/representative_trace_recommendations_item.py new file mode 100644 index 0000000..a0c9ec5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/representative_trace_recommendations_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RepresentativeTraceRecommendationsItem") + + +@_attrs_define +class RepresentativeTraceRecommendationsItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + representative_trace_recommendations_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + representative_trace_recommendations_item.additional_properties = ( + additional_properties + ) + return representative_trace_recommendations_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/representative_trace_root_causes_item.py b/python/fi/generated/openapi_client/models/representative_trace_root_causes_item.py new file mode 100644 index 0000000..ff813d9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/representative_trace_root_causes_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RepresentativeTraceRootCausesItem") + + +@_attrs_define +class RepresentativeTraceRootCausesItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + representative_trace_root_causes_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + representative_trace_root_causes_item.additional_properties = ( + additional_properties + ) + return representative_trace_root_causes_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/representative_trace_what_changed.py b/python/fi/generated/openapi_client/models/representative_trace_what_changed.py new file mode 100644 index 0000000..11d1ff7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/representative_trace_what_changed.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RepresentativeTraceWhatChanged") + + +@_attrs_define +class RepresentativeTraceWhatChanged: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + representative_trace_what_changed = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + representative_trace_what_changed.additional_properties = additional_properties + return representative_trace_what_changed + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/rerun_calls_response.py b/python/fi/generated/openapi_client/models/rerun_calls_response.py new file mode 100644 index 0000000..cb1aafa --- /dev/null +++ b/python/fi/generated/openapi_client/models/rerun_calls_response.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.failed_rerun_item import FailedRerunItem + + +T = TypeVar("T", bound="RerunCallsResponse") + + +@_attrs_define +class RerunCallsResponse: + """ + Attributes: + message (str): + test_execution_id (UUID): + rerun_type (str): + total_processed (int): + successful_reruns (list[UUID]): + failed_reruns (list[FailedRerunItem]): + success_count (int): + failure_count (int): + """ + + message: str + test_execution_id: UUID + rerun_type: str + total_processed: int + successful_reruns: list[UUID] + failed_reruns: list[FailedRerunItem] + success_count: int + failure_count: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + test_execution_id = str(self.test_execution_id) + + rerun_type = self.rerun_type + + total_processed = self.total_processed + + successful_reruns = [] + for successful_reruns_item_data in self.successful_reruns: + successful_reruns_item = str(successful_reruns_item_data) + successful_reruns.append(successful_reruns_item) + + failed_reruns = [] + for failed_reruns_item_data in self.failed_reruns: + failed_reruns_item = failed_reruns_item_data.to_dict() + failed_reruns.append(failed_reruns_item) + + success_count = self.success_count + + failure_count = self.failure_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "test_execution_id": test_execution_id, + "rerun_type": rerun_type, + "total_processed": total_processed, + "successful_reruns": successful_reruns, + "failed_reruns": failed_reruns, + "success_count": success_count, + "failure_count": failure_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.failed_rerun_item import FailedRerunItem + + d = dict(src_dict) + message = d.pop("message") + + test_execution_id = UUID(d.pop("test_execution_id")) + + rerun_type = d.pop("rerun_type") + + total_processed = d.pop("total_processed") + + successful_reruns = [] + _successful_reruns = d.pop("successful_reruns") + for successful_reruns_item_data in _successful_reruns: + successful_reruns_item = UUID(successful_reruns_item_data) + + successful_reruns.append(successful_reruns_item) + + failed_reruns = [] + _failed_reruns = d.pop("failed_reruns") + for failed_reruns_item_data in _failed_reruns: + failed_reruns_item = FailedRerunItem.from_dict(failed_reruns_item_data) + + failed_reruns.append(failed_reruns_item) + + success_count = d.pop("success_count") + + failure_count = d.pop("failure_count") + + rerun_calls_response = cls( + message=message, + test_execution_id=test_execution_id, + rerun_type=rerun_type, + total_processed=total_processed, + successful_reruns=successful_reruns, + failed_reruns=failed_reruns, + success_count=success_count, + failure_count=failure_count, + ) + + rerun_calls_response.additional_properties = d + return rerun_calls_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/rerun_cell_entry.py b/python/fi/generated/openapi_client/models/rerun_cell_entry.py new file mode 100644 index 0000000..19d2593 --- /dev/null +++ b/python/fi/generated/openapi_client/models/rerun_cell_entry.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RerunCellEntry") + + +@_attrs_define +class RerunCellEntry: + """ + Attributes: + column_id (UUID): + row_id (UUID): + """ + + column_id: UUID + row_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id = str(self.column_id) + + row_id = str(self.row_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_id": column_id, + "row_id": row_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + column_id = UUID(d.pop("column_id")) + + row_id = UUID(d.pop("row_id")) + + rerun_cell_entry = cls( + column_id=column_id, + row_id=row_id, + ) + + rerun_cell_entry.additional_properties = d + return rerun_cell_entry + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/review_item_request.py b/python/fi/generated/openapi_client/models/review_item_request.py new file mode 100644 index 0000000..543108e --- /dev/null +++ b/python/fi/generated/openapi_client/models/review_item_request.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.review_item_request_action import ReviewItemRequestAction +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.review_label_comment_request import ReviewLabelCommentRequest + + +T = TypeVar("T", bound="ReviewItemRequest") + + +@_attrs_define +class ReviewItemRequest: + """ + Attributes: + action (ReviewItemRequestAction): + notes (str | Unset): + label_comments (list[ReviewLabelCommentRequest] | Unset): + """ + + action: ReviewItemRequestAction + notes: str | Unset = UNSET + label_comments: list[ReviewLabelCommentRequest] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action = self.action.value + + notes = self.notes + + label_comments: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.label_comments, Unset): + label_comments = [] + for label_comments_item_data in self.label_comments: + label_comments_item = label_comments_item_data.to_dict() + label_comments.append(label_comments_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "action": action, + } + ) + if notes is not UNSET: + field_dict["notes"] = notes + if label_comments is not UNSET: + field_dict["label_comments"] = label_comments + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.review_label_comment_request import ReviewLabelCommentRequest + + d = dict(src_dict) + action = ReviewItemRequestAction(d.pop("action")) + + notes = d.pop("notes", UNSET) + + _label_comments = d.pop("label_comments", UNSET) + label_comments: list[ReviewLabelCommentRequest] | Unset = UNSET + if _label_comments is not UNSET: + label_comments = [] + for label_comments_item_data in _label_comments: + label_comments_item = ReviewLabelCommentRequest.from_dict( + label_comments_item_data + ) + + label_comments.append(label_comments_item) + + review_item_request = cls( + action=action, + notes=notes, + label_comments=label_comments, + ) + + review_item_request.additional_properties = d + return review_item_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/review_item_request_action.py b/python/fi/generated/openapi_client/models/review_item_request_action.py new file mode 100644 index 0000000..aede5b1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/review_item_request_action.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ReviewItemRequestAction(str, Enum): + APPROVE = "approve" + COMMENT = "comment" + REJECT = "reject" + REQUEST_CHANGES = "request_changes" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/review_label_comment_request.py b/python/fi/generated/openapi_client/models/review_label_comment_request.py new file mode 100644 index 0000000..60c7d89 --- /dev/null +++ b/python/fi/generated/openapi_client/models/review_label_comment_request.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ReviewLabelCommentRequest") + + +@_attrs_define +class ReviewLabelCommentRequest: + """ + Attributes: + label_id (UUID | Unset): + target_annotator_id (UUID | Unset): + comment (str | Unset): + """ + + label_id: UUID | Unset = UNSET + target_annotator_id: UUID | Unset = UNSET + comment: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label_id: str | Unset = UNSET + if not isinstance(self.label_id, Unset): + label_id = str(self.label_id) + + target_annotator_id: str | Unset = UNSET + if not isinstance(self.target_annotator_id, Unset): + target_annotator_id = str(self.target_annotator_id) + + comment = self.comment + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if label_id is not UNSET: + field_dict["label_id"] = label_id + if target_annotator_id is not UNSET: + field_dict["target_annotator_id"] = target_annotator_id + if comment is not UNSET: + field_dict["comment"] = comment + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _label_id = d.pop("label_id", UNSET) + label_id: UUID | Unset + if isinstance(_label_id, Unset): + label_id = UNSET + else: + label_id = UUID(_label_id) + + _target_annotator_id = d.pop("target_annotator_id", UNSET) + target_annotator_id: UUID | Unset + if isinstance(_target_annotator_id, Unset): + target_annotator_id = UNSET + else: + target_annotator_id = UUID(_target_annotator_id) + + comment = d.pop("comment", UNSET) + + review_label_comment_request = cls( + label_id=label_id, + target_annotator_id=target_annotator_id, + comment=comment, + ) + + review_label_comment_request.additional_properties = d + return review_label_comment_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/root_cause.py b/python/fi/generated/openapi_client/models/root_cause.py new file mode 100644 index 0000000..73435df --- /dev/null +++ b/python/fi/generated/openapi_client/models/root_cause.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RootCause") + + +@_attrs_define +class RootCause: + """ + Attributes: + rank (int): + title (str): + description (str): + """ + + rank: int + title: str + description: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rank = self.rank + + title = self.title + + description = self.description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rank": rank, + "title": title, + "description": description, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rank = d.pop("rank") + + title = d.pop("title") + + description = d.pop("description") + + root_cause = cls( + rank=rank, + title=title, + description=description, + ) + + root_cause.additional_properties = d + return root_cause + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_new_evals_on_test_execution.py b/python/fi/generated/openapi_client/models/run_new_evals_on_test_execution.py new file mode 100644 index 0000000..92b25f7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_new_evals_on_test_execution.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunNewEvalsOnTestExecution") + + +@_attrs_define +class RunNewEvalsOnTestExecution: + """ + Attributes: + eval_config_ids (list[UUID]): List of SimulateEvalConfig IDs to run on the test executions + test_execution_ids (list[UUID] | Unset): List of specific test execution IDs to run evaluations on + select_all (bool | Unset): Whether to run evaluations on all test executions in the run test Default: False. + enable_tool_evaluation (bool | Unset): Whether to enable tool evaluation for this run (if not provided, uses the + run test's current setting) + """ + + eval_config_ids: list[UUID] + test_execution_ids: list[UUID] | Unset = UNSET + select_all: bool | Unset = False + enable_tool_evaluation: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_config_ids = [] + for eval_config_ids_item_data in self.eval_config_ids: + eval_config_ids_item = str(eval_config_ids_item_data) + eval_config_ids.append(eval_config_ids_item) + + test_execution_ids: list[str] | Unset = UNSET + if not isinstance(self.test_execution_ids, Unset): + test_execution_ids = [] + for test_execution_ids_item_data in self.test_execution_ids: + test_execution_ids_item = str(test_execution_ids_item_data) + test_execution_ids.append(test_execution_ids_item) + + select_all = self.select_all + + enable_tool_evaluation = self.enable_tool_evaluation + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_config_ids": eval_config_ids, + } + ) + if test_execution_ids is not UNSET: + field_dict["test_execution_ids"] = test_execution_ids + if select_all is not UNSET: + field_dict["select_all"] = select_all + if enable_tool_evaluation is not UNSET: + field_dict["enable_tool_evaluation"] = enable_tool_evaluation + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + eval_config_ids = [] + _eval_config_ids = d.pop("eval_config_ids") + for eval_config_ids_item_data in _eval_config_ids: + eval_config_ids_item = UUID(eval_config_ids_item_data) + + eval_config_ids.append(eval_config_ids_item) + + _test_execution_ids = d.pop("test_execution_ids", UNSET) + test_execution_ids: list[UUID] | Unset = UNSET + if _test_execution_ids is not UNSET: + test_execution_ids = [] + for test_execution_ids_item_data in _test_execution_ids: + test_execution_ids_item = UUID(test_execution_ids_item_data) + + test_execution_ids.append(test_execution_ids_item) + + select_all = d.pop("select_all", UNSET) + + enable_tool_evaluation = d.pop("enable_tool_evaluation", UNSET) + + run_new_evals_on_test_execution = cls( + eval_config_ids=eval_config_ids, + test_execution_ids=test_execution_ids, + select_all=select_all, + enable_tool_evaluation=enable_tool_evaluation, + ) + + run_new_evals_on_test_execution.additional_properties = d + return run_new_evals_on_test_execution + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_new_evals_response.py b/python/fi/generated/openapi_client/models/run_new_evals_response.py new file mode 100644 index 0000000..693a131 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_new_evals_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunNewEvalsResponse") + + +@_attrs_define +class RunNewEvalsResponse: + """ + Attributes: + message (str): + run_test_id (UUID): + call_execution_count (int): + """ + + message: str + run_test_id: UUID + call_execution_count: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + run_test_id = str(self.run_test_id) + + call_execution_count = self.call_execution_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "run_test_id": run_test_id, + "call_execution_count": call_execution_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + run_test_id = UUID(d.pop("run_test_id")) + + call_execution_count = d.pop("call_execution_count") + + run_new_evals_response = cls( + message=message, + run_test_id=run_test_id, + call_execution_count=call_execution_count, + ) + + run_new_evals_response.additional_properties = d + return run_new_evals_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_choice_option.py b/python/fi/generated/openapi_client/models/run_prompt_choice_option.py new file mode 100644 index 0000000..0f3d3b0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_choice_option.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_prompt_choice_option_value import RunPromptChoiceOptionValue + + +T = TypeVar("T", bound="RunPromptChoiceOption") + + +@_attrs_define +class RunPromptChoiceOption: + """ + Attributes: + value (RunPromptChoiceOptionValue): + label (str): + """ + + value: RunPromptChoiceOptionValue + label: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value.to_dict() + + label = self.label + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + "label": label, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_choice_option_value import RunPromptChoiceOptionValue + + d = dict(src_dict) + value = RunPromptChoiceOptionValue.from_dict(d.pop("value")) + + label = d.pop("label") + + run_prompt_choice_option = cls( + value=value, + label=label, + ) + + run_prompt_choice_option.additional_properties = d + return run_prompt_choice_option + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_choice_option_value.py b/python/fi/generated/openapi_client/models/run_prompt_choice_option_value.py new file mode 100644 index 0000000..c054db4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_choice_option_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptChoiceOptionValue") + + +@_attrs_define +class RunPromptChoiceOptionValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_choice_option_value = cls() + + run_prompt_choice_option_value.additional_properties = d + return run_prompt_choice_option_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_config_response.py b/python/fi/generated/openapi_client/models/run_prompt_column_config_response.py new file mode 100644 index 0000000..c8d1351 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_config_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_prompt_column_config_result import RunPromptColumnConfigResult + + +T = TypeVar("T", bound="RunPromptColumnConfigResponse") + + +@_attrs_define +class RunPromptColumnConfigResponse: + """ + Attributes: + status (bool): + result (RunPromptColumnConfigResult): + """ + + status: bool + result: RunPromptColumnConfigResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_column_config_result import RunPromptColumnConfigResult + + d = dict(src_dict) + status = d.pop("status") + + result = RunPromptColumnConfigResult.from_dict(d.pop("result")) + + run_prompt_column_config_response = cls( + status=status, + result=result, + ) + + run_prompt_column_config_response.additional_properties = d + return run_prompt_column_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_config_result.py b/python/fi/generated/openapi_client/models/run_prompt_column_config_result.py new file mode 100644 index 0000000..96b066e --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_config_result.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_prompt_column_config_result_config import ( + RunPromptColumnConfigResultConfig, + ) + + +T = TypeVar("T", bound="RunPromptColumnConfigResult") + + +@_attrs_define +class RunPromptColumnConfigResult: + """ + Attributes: + config (RunPromptColumnConfigResultConfig): + """ + + config: RunPromptColumnConfigResultConfig + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + config = self.config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "config": config, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_column_config_result_config import ( + RunPromptColumnConfigResultConfig, + ) + + d = dict(src_dict) + config = RunPromptColumnConfigResultConfig.from_dict(d.pop("config")) + + run_prompt_column_config_result = cls( + config=config, + ) + + run_prompt_column_config_result.additional_properties = d + return run_prompt_column_config_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_config_result_config.py b/python/fi/generated/openapi_client/models/run_prompt_column_config_result_config.py new file mode 100644 index 0000000..d36c109 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_config_result_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptColumnConfigResultConfig") + + +@_attrs_define +class RunPromptColumnConfigResultConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_column_config_result_config = cls() + + run_prompt_column_config_result_config.additional_properties = d + return run_prompt_column_config_result_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_preview_response.py b/python/fi/generated/openapi_client/models/run_prompt_column_preview_response.py new file mode 100644 index 0000000..fbb4deb --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_preview_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_prompt_column_preview_result import RunPromptColumnPreviewResult + + +T = TypeVar("T", bound="RunPromptColumnPreviewResponse") + + +@_attrs_define +class RunPromptColumnPreviewResponse: + """ + Attributes: + status (bool): + result (RunPromptColumnPreviewResult): + """ + + status: bool + result: RunPromptColumnPreviewResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_column_preview_result import ( + RunPromptColumnPreviewResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = RunPromptColumnPreviewResult.from_dict(d.pop("result")) + + run_prompt_column_preview_response = cls( + status=status, + result=result, + ) + + run_prompt_column_preview_response.additional_properties = d + return run_prompt_column_preview_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_preview_result.py b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result.py new file mode 100644 index 0000000..7e85ca2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_prompt_column_preview_result_cost import ( + RunPromptColumnPreviewResultCost, + ) + from ..models.run_prompt_column_preview_result_responses_item import ( + RunPromptColumnPreviewResultResponsesItem, + ) + from ..models.run_prompt_column_preview_result_token_usage import ( + RunPromptColumnPreviewResultTokenUsage, + ) + + +T = TypeVar("T", bound="RunPromptColumnPreviewResult") + + +@_attrs_define +class RunPromptColumnPreviewResult: + """ + Attributes: + responses (list[RunPromptColumnPreviewResultResponsesItem]): + token_usage (RunPromptColumnPreviewResultTokenUsage): + cost (RunPromptColumnPreviewResultCost): + """ + + responses: list[RunPromptColumnPreviewResultResponsesItem] + token_usage: RunPromptColumnPreviewResultTokenUsage + cost: RunPromptColumnPreviewResultCost + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + responses = [] + for responses_item_data in self.responses: + responses_item = responses_item_data.to_dict() + responses.append(responses_item) + + token_usage = self.token_usage.to_dict() + + cost = self.cost.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "responses": responses, + "token_usage": token_usage, + "cost": cost, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_column_preview_result_cost import ( + RunPromptColumnPreviewResultCost, + ) + from ..models.run_prompt_column_preview_result_responses_item import ( + RunPromptColumnPreviewResultResponsesItem, + ) + from ..models.run_prompt_column_preview_result_token_usage import ( + RunPromptColumnPreviewResultTokenUsage, + ) + + d = dict(src_dict) + responses = [] + _responses = d.pop("responses") + for responses_item_data in _responses: + responses_item = RunPromptColumnPreviewResultResponsesItem.from_dict( + responses_item_data + ) + + responses.append(responses_item) + + token_usage = RunPromptColumnPreviewResultTokenUsage.from_dict( + d.pop("token_usage") + ) + + cost = RunPromptColumnPreviewResultCost.from_dict(d.pop("cost")) + + run_prompt_column_preview_result = cls( + responses=responses, + token_usage=token_usage, + cost=cost, + ) + + run_prompt_column_preview_result.additional_properties = d + return run_prompt_column_preview_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_cost.py b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_cost.py new file mode 100644 index 0000000..4a6c498 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_cost.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptColumnPreviewResultCost") + + +@_attrs_define +class RunPromptColumnPreviewResultCost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_column_preview_result_cost = cls() + + run_prompt_column_preview_result_cost.additional_properties = d + return run_prompt_column_preview_result_cost + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_responses_item.py b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_responses_item.py new file mode 100644 index 0000000..61b68f7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_responses_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptColumnPreviewResultResponsesItem") + + +@_attrs_define +class RunPromptColumnPreviewResultResponsesItem: + """Response""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_column_preview_result_responses_item = cls() + + run_prompt_column_preview_result_responses_item.additional_properties = d + return run_prompt_column_preview_result_responses_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_token_usage.py b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_token_usage.py new file mode 100644 index 0000000..78bcb11 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_column_preview_result_token_usage.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptColumnPreviewResultTokenUsage") + + +@_attrs_define +class RunPromptColumnPreviewResultTokenUsage: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_column_preview_result_token_usage = cls() + + run_prompt_column_preview_result_token_usage.additional_properties = d + return run_prompt_column_preview_result_token_usage + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_options_response.py b/python/fi/generated/openapi_client/models/run_prompt_options_response.py new file mode 100644 index 0000000..baadfc1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_options_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_prompt_options_result import RunPromptOptionsResult + + +T = TypeVar("T", bound="RunPromptOptionsResponse") + + +@_attrs_define +class RunPromptOptionsResponse: + """ + Attributes: + status (bool): + result (RunPromptOptionsResult): + """ + + status: bool + result: RunPromptOptionsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_options_result import RunPromptOptionsResult + + d = dict(src_dict) + status = d.pop("status") + + result = RunPromptOptionsResult.from_dict(d.pop("result")) + + run_prompt_options_response = cls( + status=status, + result=result, + ) + + run_prompt_options_response.additional_properties = d + return run_prompt_options_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_options_result.py b/python/fi/generated/openapi_client/models/run_prompt_options_result.py new file mode 100644 index 0000000..7596f57 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_options_result.py @@ -0,0 +1,149 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_prompt_choice_option import RunPromptChoiceOption + from ..models.run_prompt_options_result_models_item import ( + RunPromptOptionsResultModelsItem, + ) + from ..models.run_prompt_options_result_tool_config import ( + RunPromptOptionsResultToolConfig, + ) + from ..models.run_prompt_tool_option import RunPromptToolOption + + +T = TypeVar("T", bound="RunPromptOptionsResult") + + +@_attrs_define +class RunPromptOptionsResult: + """ + Attributes: + models (list[RunPromptOptionsResultModelsItem]): + tool_config (RunPromptOptionsResultToolConfig): + available_tools (list[RunPromptToolOption]): + output_formats (list[RunPromptChoiceOption]): + tool_choices (list[RunPromptChoiceOption]): + """ + + models: list[RunPromptOptionsResultModelsItem] + tool_config: RunPromptOptionsResultToolConfig + available_tools: list[RunPromptToolOption] + output_formats: list[RunPromptChoiceOption] + tool_choices: list[RunPromptChoiceOption] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + models = [] + for models_item_data in self.models: + models_item = models_item_data.to_dict() + models.append(models_item) + + tool_config = self.tool_config.to_dict() + + available_tools = [] + for available_tools_item_data in self.available_tools: + available_tools_item = available_tools_item_data.to_dict() + available_tools.append(available_tools_item) + + output_formats = [] + for output_formats_item_data in self.output_formats: + output_formats_item = output_formats_item_data.to_dict() + output_formats.append(output_formats_item) + + tool_choices = [] + for tool_choices_item_data in self.tool_choices: + tool_choices_item = tool_choices_item_data.to_dict() + tool_choices.append(tool_choices_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "models": models, + "tool_config": tool_config, + "available_tools": available_tools, + "output_formats": output_formats, + "tool_choices": tool_choices, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_choice_option import RunPromptChoiceOption + from ..models.run_prompt_options_result_models_item import ( + RunPromptOptionsResultModelsItem, + ) + from ..models.run_prompt_options_result_tool_config import ( + RunPromptOptionsResultToolConfig, + ) + from ..models.run_prompt_tool_option import RunPromptToolOption + + d = dict(src_dict) + models = [] + _models = d.pop("models") + for models_item_data in _models: + models_item = RunPromptOptionsResultModelsItem.from_dict(models_item_data) + + models.append(models_item) + + tool_config = RunPromptOptionsResultToolConfig.from_dict(d.pop("tool_config")) + + available_tools = [] + _available_tools = d.pop("available_tools") + for available_tools_item_data in _available_tools: + available_tools_item = RunPromptToolOption.from_dict( + available_tools_item_data + ) + + available_tools.append(available_tools_item) + + output_formats = [] + _output_formats = d.pop("output_formats") + for output_formats_item_data in _output_formats: + output_formats_item = RunPromptChoiceOption.from_dict( + output_formats_item_data + ) + + output_formats.append(output_formats_item) + + tool_choices = [] + _tool_choices = d.pop("tool_choices") + for tool_choices_item_data in _tool_choices: + tool_choices_item = RunPromptChoiceOption.from_dict(tool_choices_item_data) + + tool_choices.append(tool_choices_item) + + run_prompt_options_result = cls( + models=models, + tool_config=tool_config, + available_tools=available_tools, + output_formats=output_formats, + tool_choices=tool_choices, + ) + + run_prompt_options_result.additional_properties = d + return run_prompt_options_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_options_result_models_item.py b/python/fi/generated/openapi_client/models/run_prompt_options_result_models_item.py new file mode 100644 index 0000000..051ce07 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_options_result_models_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptOptionsResultModelsItem") + + +@_attrs_define +class RunPromptOptionsResultModelsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_options_result_models_item = cls() + + run_prompt_options_result_models_item.additional_properties = d + return run_prompt_options_result_models_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_options_result_tool_config.py b/python/fi/generated/openapi_client/models/run_prompt_options_result_tool_config.py new file mode 100644 index 0000000..ac93362 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_options_result_tool_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptOptionsResultToolConfig") + + +@_attrs_define +class RunPromptOptionsResultToolConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_options_result_tool_config = cls() + + run_prompt_options_result_tool_config.additional_properties = d + return run_prompt_options_result_tool_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_tool_option.py b/python/fi/generated/openapi_client/models/run_prompt_tool_option.py new file mode 100644 index 0000000..cd54b50 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_tool_option.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_prompt_tool_option_config import RunPromptToolOptionConfig + + +T = TypeVar("T", bound="RunPromptToolOption") + + +@_attrs_define +class RunPromptToolOption: + """ + Attributes: + id (str): + name (str): + yaml_config (None | str | Unset): + config (RunPromptToolOptionConfig | Unset): + config_type (None | str | Unset): + description (None | str | Unset): + """ + + id: str + name: str + yaml_config: None | str | Unset = UNSET + config: RunPromptToolOptionConfig | Unset = UNSET + config_type: None | str | Unset = UNSET + description: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + yaml_config: None | str | Unset + if isinstance(self.yaml_config, Unset): + yaml_config = UNSET + else: + yaml_config = self.yaml_config + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + config_type: None | str | Unset + if isinstance(self.config_type, Unset): + config_type = UNSET + else: + config_type = self.config_type + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + if yaml_config is not UNSET: + field_dict["yaml_config"] = yaml_config + if config is not UNSET: + field_dict["config"] = config + if config_type is not UNSET: + field_dict["config_type"] = config_type + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_prompt_tool_option_config import RunPromptToolOptionConfig + + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + def _parse_yaml_config(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + yaml_config = _parse_yaml_config(d.pop("yaml_config", UNSET)) + + _config = d.pop("config", UNSET) + config: RunPromptToolOptionConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = RunPromptToolOptionConfig.from_dict(_config) + + def _parse_config_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + config_type = _parse_config_type(d.pop("config_type", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + run_prompt_tool_option = cls( + id=id, + name=name, + yaml_config=yaml_config, + config=config, + config_type=config_type, + description=description, + ) + + run_prompt_tool_option.additional_properties = d + return run_prompt_tool_option + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_prompt_tool_option_config.py b/python/fi/generated/openapi_client/models/run_prompt_tool_option_config.py new file mode 100644 index 0000000..ae697e2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_prompt_tool_option_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunPromptToolOptionConfig") + + +@_attrs_define +class RunPromptToolOptionConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_prompt_tool_option_config = cls() + + run_prompt_tool_option_config.additional_properties = d + return run_prompt_tool_option_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_analytics.py b/python/fi/generated/openapi_client/models/run_test_analytics.py new file mode 100644 index 0000000..ee5495a --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_analytics.py @@ -0,0 +1,167 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_analytics_evaluation_score_trends_item import ( + RunTestAnalyticsEvaluationScoreTrendsItem, + ) + from ..models.run_test_analytics_fail_rate_trends_item import ( + RunTestAnalyticsFailRateTrendsItem, + ) + from ..models.run_test_analytics_performance_comparison_item import ( + RunTestAnalyticsPerformanceComparisonItem, + ) + from ..models.run_test_analytics_run_test_info import RunTestAnalyticsRunTestInfo + from ..models.run_test_analytics_summary_stats import RunTestAnalyticsSummaryStats + + +T = TypeVar("T", bound="RunTestAnalytics") + + +@_attrs_define +class RunTestAnalytics: + """ + Attributes: + run_test_info (RunTestAnalyticsRunTestInfo): Run test metadata + fail_rate_trends (list[RunTestAnalyticsFailRateTrendsItem]): Fail-rate trend points + evaluation_score_trends (list[RunTestAnalyticsEvaluationScoreTrendsItem]): Evaluation score trend points + performance_comparison (list[RunTestAnalyticsPerformanceComparisonItem]): Per-execution performance rows + summary_stats (RunTestAnalyticsSummaryStats | Unset): Aggregate performance summary + """ + + run_test_info: RunTestAnalyticsRunTestInfo + fail_rate_trends: list[RunTestAnalyticsFailRateTrendsItem] + evaluation_score_trends: list[RunTestAnalyticsEvaluationScoreTrendsItem] + performance_comparison: list[RunTestAnalyticsPerformanceComparisonItem] + summary_stats: RunTestAnalyticsSummaryStats | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + run_test_info = self.run_test_info.to_dict() + + fail_rate_trends = [] + for fail_rate_trends_item_data in self.fail_rate_trends: + fail_rate_trends_item = fail_rate_trends_item_data.to_dict() + fail_rate_trends.append(fail_rate_trends_item) + + evaluation_score_trends = [] + for evaluation_score_trends_item_data in self.evaluation_score_trends: + evaluation_score_trends_item = evaluation_score_trends_item_data.to_dict() + evaluation_score_trends.append(evaluation_score_trends_item) + + performance_comparison = [] + for performance_comparison_item_data in self.performance_comparison: + performance_comparison_item = performance_comparison_item_data.to_dict() + performance_comparison.append(performance_comparison_item) + + summary_stats: dict[str, Any] | Unset = UNSET + if not isinstance(self.summary_stats, Unset): + summary_stats = self.summary_stats.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "run_test_info": run_test_info, + "fail_rate_trends": fail_rate_trends, + "evaluation_score_trends": evaluation_score_trends, + "performance_comparison": performance_comparison, + } + ) + if summary_stats is not UNSET: + field_dict["summary_stats"] = summary_stats + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_analytics_evaluation_score_trends_item import ( + RunTestAnalyticsEvaluationScoreTrendsItem, + ) + from ..models.run_test_analytics_fail_rate_trends_item import ( + RunTestAnalyticsFailRateTrendsItem, + ) + from ..models.run_test_analytics_performance_comparison_item import ( + RunTestAnalyticsPerformanceComparisonItem, + ) + from ..models.run_test_analytics_run_test_info import ( + RunTestAnalyticsRunTestInfo, + ) + from ..models.run_test_analytics_summary_stats import ( + RunTestAnalyticsSummaryStats, + ) + + d = dict(src_dict) + run_test_info = RunTestAnalyticsRunTestInfo.from_dict(d.pop("run_test_info")) + + fail_rate_trends = [] + _fail_rate_trends = d.pop("fail_rate_trends") + for fail_rate_trends_item_data in _fail_rate_trends: + fail_rate_trends_item = RunTestAnalyticsFailRateTrendsItem.from_dict( + fail_rate_trends_item_data + ) + + fail_rate_trends.append(fail_rate_trends_item) + + evaluation_score_trends = [] + _evaluation_score_trends = d.pop("evaluation_score_trends") + for evaluation_score_trends_item_data in _evaluation_score_trends: + evaluation_score_trends_item = ( + RunTestAnalyticsEvaluationScoreTrendsItem.from_dict( + evaluation_score_trends_item_data + ) + ) + + evaluation_score_trends.append(evaluation_score_trends_item) + + performance_comparison = [] + _performance_comparison = d.pop("performance_comparison") + for performance_comparison_item_data in _performance_comparison: + performance_comparison_item = ( + RunTestAnalyticsPerformanceComparisonItem.from_dict( + performance_comparison_item_data + ) + ) + + performance_comparison.append(performance_comparison_item) + + _summary_stats = d.pop("summary_stats", UNSET) + summary_stats: RunTestAnalyticsSummaryStats | Unset + if isinstance(_summary_stats, Unset): + summary_stats = UNSET + else: + summary_stats = RunTestAnalyticsSummaryStats.from_dict(_summary_stats) + + run_test_analytics = cls( + run_test_info=run_test_info, + fail_rate_trends=fail_rate_trends, + evaluation_score_trends=evaluation_score_trends, + performance_comparison=performance_comparison, + summary_stats=summary_stats, + ) + + run_test_analytics.additional_properties = d + return run_test_analytics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_analytics_evaluation_score_trends_item.py b/python/fi/generated/openapi_client/models/run_test_analytics_evaluation_score_trends_item.py new file mode 100644 index 0000000..4729e4a --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_analytics_evaluation_score_trends_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestAnalyticsEvaluationScoreTrendsItem") + + +@_attrs_define +class RunTestAnalyticsEvaluationScoreTrendsItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_analytics_evaluation_score_trends_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_analytics_evaluation_score_trends_item.additional_properties = ( + additional_properties + ) + return run_test_analytics_evaluation_score_trends_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_analytics_fail_rate_trends_item.py b/python/fi/generated/openapi_client/models/run_test_analytics_fail_rate_trends_item.py new file mode 100644 index 0000000..6f0eb25 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_analytics_fail_rate_trends_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestAnalyticsFailRateTrendsItem") + + +@_attrs_define +class RunTestAnalyticsFailRateTrendsItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_analytics_fail_rate_trends_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_analytics_fail_rate_trends_item.additional_properties = ( + additional_properties + ) + return run_test_analytics_fail_rate_trends_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_analytics_performance_comparison_item.py b/python/fi/generated/openapi_client/models/run_test_analytics_performance_comparison_item.py new file mode 100644 index 0000000..35e3087 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_analytics_performance_comparison_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestAnalyticsPerformanceComparisonItem") + + +@_attrs_define +class RunTestAnalyticsPerformanceComparisonItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_analytics_performance_comparison_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_analytics_performance_comparison_item.additional_properties = ( + additional_properties + ) + return run_test_analytics_performance_comparison_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_analytics_run_test_info.py b/python/fi/generated/openapi_client/models/run_test_analytics_run_test_info.py new file mode 100644 index 0000000..3851360 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_analytics_run_test_info.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestAnalyticsRunTestInfo") + + +@_attrs_define +class RunTestAnalyticsRunTestInfo: + """Run test metadata""" + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_analytics_run_test_info = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_analytics_run_test_info.additional_properties = additional_properties + return run_test_analytics_run_test_info + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_analytics_summary_stats.py b/python/fi/generated/openapi_client/models/run_test_analytics_summary_stats.py new file mode 100644 index 0000000..4acb514 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_analytics_summary_stats.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestAnalyticsSummaryStats") + + +@_attrs_define +class RunTestAnalyticsSummaryStats: + """Aggregate performance summary""" + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_analytics_summary_stats = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_analytics_summary_stats.additional_properties = additional_properties + return run_test_analytics_summary_stats + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_call_executions_response.py b/python/fi/generated/openapi_client/models/run_test_call_executions_response.py new file mode 100644 index 0000000..5947aaf --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_call_executions_response.py @@ -0,0 +1,152 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_call_executions_response_results_item import ( + RunTestCallExecutionsResponseResultsItem, + ) + + +T = TypeVar("T", bound="RunTestCallExecutionsResponse") + + +@_attrs_define +class RunTestCallExecutionsResponse: + """ + Attributes: + count (int | Unset): + next_ (None | str | Unset): + previous (None | str | Unset): + results (list[RunTestCallExecutionsResponseResultsItem] | Unset): + total_pages (int | Unset): + current_page (int | Unset): + """ + + count: int | Unset = UNSET + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + results: list[RunTestCallExecutionsResponseResultsItem] | Unset = UNSET + total_pages: int | Unset = UNSET + current_page: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + total_pages = self.total_pages + + current_page = self.current_page + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict["count"] = count + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + if results is not UNSET: + field_dict["results"] = results + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + if current_page is not UNSET: + field_dict["current_page"] = current_page + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_call_executions_response_results_item import ( + RunTestCallExecutionsResponseResultsItem, + ) + + d = dict(src_dict) + count = d.pop("count", UNSET) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + _results = d.pop("results", UNSET) + results: list[RunTestCallExecutionsResponseResultsItem] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = RunTestCallExecutionsResponseResultsItem.from_dict( + results_item_data + ) + + results.append(results_item) + + total_pages = d.pop("total_pages", UNSET) + + current_page = d.pop("current_page", UNSET) + + run_test_call_executions_response = cls( + count=count, + next_=next_, + previous=previous, + results=results, + total_pages=total_pages, + current_page=current_page, + ) + + run_test_call_executions_response.additional_properties = d + return run_test_call_executions_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_call_executions_response_results_item.py b/python/fi/generated/openapi_client/models/run_test_call_executions_response_results_item.py new file mode 100644 index 0000000..5301edb --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_call_executions_response_results_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestCallExecutionsResponseResultsItem") + + +@_attrs_define +class RunTestCallExecutionsResponseResultsItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_call_executions_response_results_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_call_executions_response_results_item.additional_properties = ( + additional_properties + ) + return run_test_call_executions_response_results_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_chat_execution_response.py b/python/fi/generated/openapi_client/models/run_test_chat_execution_response.py new file mode 100644 index 0000000..7b09aba --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_chat_execution_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_chat_execution_result import RunTestChatExecutionResult + + +T = TypeVar("T", bound="RunTestChatExecutionResponse") + + +@_attrs_define +class RunTestChatExecutionResponse: + """ + Attributes: + result (RunTestChatExecutionResult): + status (bool | Unset): Default: True. + """ + + result: RunTestChatExecutionResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_chat_execution_result import RunTestChatExecutionResult + + d = dict(src_dict) + result = RunTestChatExecutionResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + run_test_chat_execution_response = cls( + result=result, + status=status, + ) + + run_test_chat_execution_response.additional_properties = d + return run_test_chat_execution_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_chat_execution_result.py b/python/fi/generated/openapi_client/models/run_test_chat_execution_result.py new file mode 100644 index 0000000..6b91cd5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_chat_execution_result.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestChatExecutionResult") + + +@_attrs_define +class RunTestChatExecutionResult: + """ + Attributes: + message (str): + execution_id (UUID): + run_test_id (UUID): + status (str): + total_scenarios (list[UUID]): + """ + + message: str + execution_id: UUID + run_test_id: UUID + status: str + total_scenarios: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + execution_id = str(self.execution_id) + + run_test_id = str(self.run_test_id) + + status = self.status + + total_scenarios = [] + for total_scenarios_item_data in self.total_scenarios: + total_scenarios_item = str(total_scenarios_item_data) + total_scenarios.append(total_scenarios_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "execution_id": execution_id, + "run_test_id": run_test_id, + "status": status, + "total_scenarios": total_scenarios, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + execution_id = UUID(d.pop("execution_id")) + + run_test_id = UUID(d.pop("run_test_id")) + + status = d.pop("status") + + total_scenarios = [] + _total_scenarios = d.pop("total_scenarios") + for total_scenarios_item_data in _total_scenarios: + total_scenarios_item = UUID(total_scenarios_item_data) + + total_scenarios.append(total_scenarios_item) + + run_test_chat_execution_result = cls( + message=message, + execution_id=execution_id, + run_test_id=run_test_id, + status=status, + total_scenarios=total_scenarios, + ) + + run_test_chat_execution_result.additional_properties = d + return run_test_chat_execution_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_components_update.py b/python/fi/generated/openapi_client/models/run_test_components_update.py new file mode 100644 index 0000000..32be15d --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_components_update.py @@ -0,0 +1,131 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunTestComponentsUpdate") + + +@_attrs_define +class RunTestComponentsUpdate: + """ + Attributes: + agent_definition_id (UUID | Unset): + version (UUID | Unset): + simulator_agent_id (UUID | Unset): + scenarios (list[UUID] | Unset): + enable_tool_evaluation (bool | Unset): + """ + + agent_definition_id: UUID | Unset = UNSET + version: UUID | Unset = UNSET + simulator_agent_id: UUID | Unset = UNSET + scenarios: list[UUID] | Unset = UNSET + enable_tool_evaluation: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + agent_definition_id: str | Unset = UNSET + if not isinstance(self.agent_definition_id, Unset): + agent_definition_id = str(self.agent_definition_id) + + version: str | Unset = UNSET + if not isinstance(self.version, Unset): + version = str(self.version) + + simulator_agent_id: str | Unset = UNSET + if not isinstance(self.simulator_agent_id, Unset): + simulator_agent_id = str(self.simulator_agent_id) + + scenarios: list[str] | Unset = UNSET + if not isinstance(self.scenarios, Unset): + scenarios = [] + for scenarios_item_data in self.scenarios: + scenarios_item = str(scenarios_item_data) + scenarios.append(scenarios_item) + + enable_tool_evaluation = self.enable_tool_evaluation + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if agent_definition_id is not UNSET: + field_dict["agent_definition_id"] = agent_definition_id + if version is not UNSET: + field_dict["version"] = version + if simulator_agent_id is not UNSET: + field_dict["simulator_agent_id"] = simulator_agent_id + if scenarios is not UNSET: + field_dict["scenarios"] = scenarios + if enable_tool_evaluation is not UNSET: + field_dict["enable_tool_evaluation"] = enable_tool_evaluation + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _agent_definition_id = d.pop("agent_definition_id", UNSET) + agent_definition_id: UUID | Unset + if isinstance(_agent_definition_id, Unset): + agent_definition_id = UNSET + else: + agent_definition_id = UUID(_agent_definition_id) + + _version = d.pop("version", UNSET) + version: UUID | Unset + if isinstance(_version, Unset): + version = UNSET + else: + version = UUID(_version) + + _simulator_agent_id = d.pop("simulator_agent_id", UNSET) + simulator_agent_id: UUID | Unset + if isinstance(_simulator_agent_id, Unset): + simulator_agent_id = UNSET + else: + simulator_agent_id = UUID(_simulator_agent_id) + + _scenarios = d.pop("scenarios", UNSET) + scenarios: list[UUID] | Unset = UNSET + if _scenarios is not UNSET: + scenarios = [] + for scenarios_item_data in _scenarios: + scenarios_item = UUID(scenarios_item_data) + + scenarios.append(scenarios_item) + + enable_tool_evaluation = d.pop("enable_tool_evaluation", UNSET) + + run_test_components_update = cls( + agent_definition_id=agent_definition_id, + version=version, + simulator_agent_id=simulator_agent_id, + scenarios=scenarios, + enable_tool_evaluation=enable_tool_evaluation, + ) + + run_test_components_update.additional_properties = d + return run_test_components_update + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_error_response.py b/python/fi/generated/openapi_client/models/run_test_error_response.py new file mode 100644 index 0000000..212f397 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_error_response.py @@ -0,0 +1,220 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.run_test_error_response_type import RunTestErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_error_response_details import RunTestErrorResponseDetails + + +T = TypeVar("T", bound="RunTestErrorResponse") + + +@_attrs_define +class RunTestErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (RunTestErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (RunTestErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: RunTestErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: RunTestErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_error_response_details import RunTestErrorResponseDetails + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: RunTestErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = RunTestErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: RunTestErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = RunTestErrorResponseDetails.from_dict(_details) + + run_test_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + run_test_error_response.additional_properties = d + return run_test_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_error_response_details.py b/python/fi/generated/openapi_client/models/run_test_error_response_details.py new file mode 100644 index 0000000..8dea1e9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestErrorResponseDetails") + + +@_attrs_define +class RunTestErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_error_response_details.additional_properties = additional_properties + return run_test_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_error_response_type.py b/python/fi/generated/openapi_client/models/run_test_error_response_type.py new file mode 100644 index 0000000..2998728 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class RunTestErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/run_test_execution_response.py b/python/fi/generated/openapi_client/models/run_test_execution_response.py new file mode 100644 index 0000000..723510a --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_execution_response.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunTestExecutionResponse") + + +@_attrs_define +class RunTestExecutionResponse: + """ + Attributes: + message (str | Unset): + execution_id (UUID | Unset): + run_test_id (UUID | Unset): + status (str | Unset): + total_scenarios (int | Unset): + total_calls (int | Unset): + scenario_ids (list[UUID] | Unset): + """ + + message: str | Unset = UNSET + execution_id: UUID | Unset = UNSET + run_test_id: UUID | Unset = UNSET + status: str | Unset = UNSET + total_scenarios: int | Unset = UNSET + total_calls: int | Unset = UNSET + scenario_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + execution_id: str | Unset = UNSET + if not isinstance(self.execution_id, Unset): + execution_id = str(self.execution_id) + + run_test_id: str | Unset = UNSET + if not isinstance(self.run_test_id, Unset): + run_test_id = str(self.run_test_id) + + status = self.status + + total_scenarios = self.total_scenarios + + total_calls = self.total_calls + + scenario_ids: list[str] | Unset = UNSET + if not isinstance(self.scenario_ids, Unset): + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if execution_id is not UNSET: + field_dict["execution_id"] = execution_id + if run_test_id is not UNSET: + field_dict["run_test_id"] = run_test_id + if status is not UNSET: + field_dict["status"] = status + if total_scenarios is not UNSET: + field_dict["total_scenarios"] = total_scenarios + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if scenario_ids is not UNSET: + field_dict["scenario_ids"] = scenario_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + _execution_id = d.pop("execution_id", UNSET) + execution_id: UUID | Unset + if isinstance(_execution_id, Unset): + execution_id = UNSET + else: + execution_id = UUID(_execution_id) + + _run_test_id = d.pop("run_test_id", UNSET) + run_test_id: UUID | Unset + if isinstance(_run_test_id, Unset): + run_test_id = UNSET + else: + run_test_id = UUID(_run_test_id) + + status = d.pop("status", UNSET) + + total_scenarios = d.pop("total_scenarios", UNSET) + + total_calls = d.pop("total_calls", UNSET) + + _scenario_ids = d.pop("scenario_ids", UNSET) + scenario_ids: list[UUID] | Unset = UNSET + if _scenario_ids is not UNSET: + scenario_ids = [] + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + run_test_execution_response = cls( + message=message, + execution_id=execution_id, + run_test_id=run_test_id, + status=status, + total_scenarios=total_scenarios, + total_calls=total_calls, + scenario_ids=scenario_ids, + ) + + run_test_execution_response.additional_properties = d + return run_test_execution_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_kp_is_response.py b/python/fi/generated/openapi_client/models/run_test_kp_is_response.py new file mode 100644 index 0000000..7d5fbe3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_kp_is_response.py @@ -0,0 +1,338 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_kp_is_response_scenario_graphs import ( + RunTestKPIsResponseScenarioGraphs, + ) + + +T = TypeVar("T", bound="RunTestKPIsResponse") + + +@_attrs_define +class RunTestKPIsResponse: + """ + Attributes: + total_calls (int | Unset): + avg_score (float | Unset): + avg_response (float | Unset): + calls_attempted (int | Unset): + connected_calls (int | Unset): + calls_connected_percentage (float | Unset): + scenario_graphs (RunTestKPIsResponseScenarioGraphs | Unset): + agent_type (str | Unset): + is_inbound (bool | None | Unset): + avg_agent_latency (float | Unset): + avg_user_interruption_count (float | Unset): + avg_user_interruption_rate (float | Unset): + avg_user_wpm (float | Unset): + avg_bot_wpm (float | Unset): + avg_talk_ratio (float | Unset): + avg_ai_interruption_count (float | Unset): + avg_ai_interruption_rate (float | Unset): + avg_stop_time_after_interruption (float | Unset): + agent_talk_percentage (float | Unset): + customer_talk_percentage (float | Unset): + avg_total_tokens (float | Unset): + avg_input_tokens (float | Unset): + avg_output_tokens (float | Unset): + avg_chat_latency_ms (float | Unset): + avg_turn_count (float | Unset): + avg_csat_score (float | Unset): + failed_calls (int | Unset): + total_duration (float | Unset): + """ + + total_calls: int | Unset = UNSET + avg_score: float | Unset = UNSET + avg_response: float | Unset = UNSET + calls_attempted: int | Unset = UNSET + connected_calls: int | Unset = UNSET + calls_connected_percentage: float | Unset = UNSET + scenario_graphs: RunTestKPIsResponseScenarioGraphs | Unset = UNSET + agent_type: str | Unset = UNSET + is_inbound: bool | None | Unset = UNSET + avg_agent_latency: float | Unset = UNSET + avg_user_interruption_count: float | Unset = UNSET + avg_user_interruption_rate: float | Unset = UNSET + avg_user_wpm: float | Unset = UNSET + avg_bot_wpm: float | Unset = UNSET + avg_talk_ratio: float | Unset = UNSET + avg_ai_interruption_count: float | Unset = UNSET + avg_ai_interruption_rate: float | Unset = UNSET + avg_stop_time_after_interruption: float | Unset = UNSET + agent_talk_percentage: float | Unset = UNSET + customer_talk_percentage: float | Unset = UNSET + avg_total_tokens: float | Unset = UNSET + avg_input_tokens: float | Unset = UNSET + avg_output_tokens: float | Unset = UNSET + avg_chat_latency_ms: float | Unset = UNSET + avg_turn_count: float | Unset = UNSET + avg_csat_score: float | Unset = UNSET + failed_calls: int | Unset = UNSET + total_duration: float | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total_calls = self.total_calls + + avg_score = self.avg_score + + avg_response = self.avg_response + + calls_attempted = self.calls_attempted + + connected_calls = self.connected_calls + + calls_connected_percentage = self.calls_connected_percentage + + scenario_graphs: dict[str, Any] | Unset = UNSET + if not isinstance(self.scenario_graphs, Unset): + scenario_graphs = self.scenario_graphs.to_dict() + + agent_type = self.agent_type + + is_inbound: bool | None | Unset + if isinstance(self.is_inbound, Unset): + is_inbound = UNSET + else: + is_inbound = self.is_inbound + + avg_agent_latency = self.avg_agent_latency + + avg_user_interruption_count = self.avg_user_interruption_count + + avg_user_interruption_rate = self.avg_user_interruption_rate + + avg_user_wpm = self.avg_user_wpm + + avg_bot_wpm = self.avg_bot_wpm + + avg_talk_ratio = self.avg_talk_ratio + + avg_ai_interruption_count = self.avg_ai_interruption_count + + avg_ai_interruption_rate = self.avg_ai_interruption_rate + + avg_stop_time_after_interruption = self.avg_stop_time_after_interruption + + agent_talk_percentage = self.agent_talk_percentage + + customer_talk_percentage = self.customer_talk_percentage + + avg_total_tokens = self.avg_total_tokens + + avg_input_tokens = self.avg_input_tokens + + avg_output_tokens = self.avg_output_tokens + + avg_chat_latency_ms = self.avg_chat_latency_ms + + avg_turn_count = self.avg_turn_count + + avg_csat_score = self.avg_csat_score + + failed_calls = self.failed_calls + + total_duration = self.total_duration + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if avg_score is not UNSET: + field_dict["avg_score"] = avg_score + if avg_response is not UNSET: + field_dict["avg_response"] = avg_response + if calls_attempted is not UNSET: + field_dict["calls_attempted"] = calls_attempted + if connected_calls is not UNSET: + field_dict["connected_calls"] = connected_calls + if calls_connected_percentage is not UNSET: + field_dict["calls_connected_percentage"] = calls_connected_percentage + if scenario_graphs is not UNSET: + field_dict["scenario_graphs"] = scenario_graphs + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + if is_inbound is not UNSET: + field_dict["is_inbound"] = is_inbound + if avg_agent_latency is not UNSET: + field_dict["avg_agent_latency"] = avg_agent_latency + if avg_user_interruption_count is not UNSET: + field_dict["avg_user_interruption_count"] = avg_user_interruption_count + if avg_user_interruption_rate is not UNSET: + field_dict["avg_user_interruption_rate"] = avg_user_interruption_rate + if avg_user_wpm is not UNSET: + field_dict["avg_user_wpm"] = avg_user_wpm + if avg_bot_wpm is not UNSET: + field_dict["avg_bot_wpm"] = avg_bot_wpm + if avg_talk_ratio is not UNSET: + field_dict["avg_talk_ratio"] = avg_talk_ratio + if avg_ai_interruption_count is not UNSET: + field_dict["avg_ai_interruption_count"] = avg_ai_interruption_count + if avg_ai_interruption_rate is not UNSET: + field_dict["avg_ai_interruption_rate"] = avg_ai_interruption_rate + if avg_stop_time_after_interruption is not UNSET: + field_dict["avg_stop_time_after_interruption"] = ( + avg_stop_time_after_interruption + ) + if agent_talk_percentage is not UNSET: + field_dict["agent_talk_percentage"] = agent_talk_percentage + if customer_talk_percentage is not UNSET: + field_dict["customer_talk_percentage"] = customer_talk_percentage + if avg_total_tokens is not UNSET: + field_dict["avg_total_tokens"] = avg_total_tokens + if avg_input_tokens is not UNSET: + field_dict["avg_input_tokens"] = avg_input_tokens + if avg_output_tokens is not UNSET: + field_dict["avg_output_tokens"] = avg_output_tokens + if avg_chat_latency_ms is not UNSET: + field_dict["avg_chat_latency_ms"] = avg_chat_latency_ms + if avg_turn_count is not UNSET: + field_dict["avg_turn_count"] = avg_turn_count + if avg_csat_score is not UNSET: + field_dict["avg_csat_score"] = avg_csat_score + if failed_calls is not UNSET: + field_dict["failed_calls"] = failed_calls + if total_duration is not UNSET: + field_dict["total_duration"] = total_duration + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_kp_is_response_scenario_graphs import ( + RunTestKPIsResponseScenarioGraphs, + ) + + d = dict(src_dict) + total_calls = d.pop("total_calls", UNSET) + + avg_score = d.pop("avg_score", UNSET) + + avg_response = d.pop("avg_response", UNSET) + + calls_attempted = d.pop("calls_attempted", UNSET) + + connected_calls = d.pop("connected_calls", UNSET) + + calls_connected_percentage = d.pop("calls_connected_percentage", UNSET) + + _scenario_graphs = d.pop("scenario_graphs", UNSET) + scenario_graphs: RunTestKPIsResponseScenarioGraphs | Unset + if isinstance(_scenario_graphs, Unset): + scenario_graphs = UNSET + else: + scenario_graphs = RunTestKPIsResponseScenarioGraphs.from_dict( + _scenario_graphs + ) + + agent_type = d.pop("agent_type", UNSET) + + def _parse_is_inbound(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_inbound = _parse_is_inbound(d.pop("is_inbound", UNSET)) + + avg_agent_latency = d.pop("avg_agent_latency", UNSET) + + avg_user_interruption_count = d.pop("avg_user_interruption_count", UNSET) + + avg_user_interruption_rate = d.pop("avg_user_interruption_rate", UNSET) + + avg_user_wpm = d.pop("avg_user_wpm", UNSET) + + avg_bot_wpm = d.pop("avg_bot_wpm", UNSET) + + avg_talk_ratio = d.pop("avg_talk_ratio", UNSET) + + avg_ai_interruption_count = d.pop("avg_ai_interruption_count", UNSET) + + avg_ai_interruption_rate = d.pop("avg_ai_interruption_rate", UNSET) + + avg_stop_time_after_interruption = d.pop( + "avg_stop_time_after_interruption", UNSET + ) + + agent_talk_percentage = d.pop("agent_talk_percentage", UNSET) + + customer_talk_percentage = d.pop("customer_talk_percentage", UNSET) + + avg_total_tokens = d.pop("avg_total_tokens", UNSET) + + avg_input_tokens = d.pop("avg_input_tokens", UNSET) + + avg_output_tokens = d.pop("avg_output_tokens", UNSET) + + avg_chat_latency_ms = d.pop("avg_chat_latency_ms", UNSET) + + avg_turn_count = d.pop("avg_turn_count", UNSET) + + avg_csat_score = d.pop("avg_csat_score", UNSET) + + failed_calls = d.pop("failed_calls", UNSET) + + total_duration = d.pop("total_duration", UNSET) + + run_test_kp_is_response = cls( + total_calls=total_calls, + avg_score=avg_score, + avg_response=avg_response, + calls_attempted=calls_attempted, + connected_calls=connected_calls, + calls_connected_percentage=calls_connected_percentage, + scenario_graphs=scenario_graphs, + agent_type=agent_type, + is_inbound=is_inbound, + avg_agent_latency=avg_agent_latency, + avg_user_interruption_count=avg_user_interruption_count, + avg_user_interruption_rate=avg_user_interruption_rate, + avg_user_wpm=avg_user_wpm, + avg_bot_wpm=avg_bot_wpm, + avg_talk_ratio=avg_talk_ratio, + avg_ai_interruption_count=avg_ai_interruption_count, + avg_ai_interruption_rate=avg_ai_interruption_rate, + avg_stop_time_after_interruption=avg_stop_time_after_interruption, + agent_talk_percentage=agent_talk_percentage, + customer_talk_percentage=customer_talk_percentage, + avg_total_tokens=avg_total_tokens, + avg_input_tokens=avg_input_tokens, + avg_output_tokens=avg_output_tokens, + avg_chat_latency_ms=avg_chat_latency_ms, + avg_turn_count=avg_turn_count, + avg_csat_score=avg_csat_score, + failed_calls=failed_calls, + total_duration=total_duration, + ) + + run_test_kp_is_response.additional_properties = d + return run_test_kp_is_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs.py b/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs.py new file mode 100644 index 0000000..369d94d --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_test_kp_is_response_scenario_graphs_additional_property import ( + RunTestKPIsResponseScenarioGraphsAdditionalProperty, + ) + + +T = TypeVar("T", bound="RunTestKPIsResponseScenarioGraphs") + + +@_attrs_define +class RunTestKPIsResponseScenarioGraphs: + """ """ + + additional_properties: dict[ + str, RunTestKPIsResponseScenarioGraphsAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_kp_is_response_scenario_graphs_additional_property import ( + RunTestKPIsResponseScenarioGraphsAdditionalProperty, + ) + + d = dict(src_dict) + run_test_kp_is_response_scenario_graphs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + RunTestKPIsResponseScenarioGraphsAdditionalProperty.from_dict(prop_dict) + ) + + additional_properties[prop_name] = additional_property + + run_test_kp_is_response_scenario_graphs.additional_properties = ( + additional_properties + ) + return run_test_kp_is_response_scenario_graphs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> RunTestKPIsResponseScenarioGraphsAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: RunTestKPIsResponseScenarioGraphsAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property.py b/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property.py new file mode 100644 index 0000000..6711149 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.run_test_kp_is_response_scenario_graphs_additional_property_additional_property import ( + RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty, + ) + + +T = TypeVar("T", bound="RunTestKPIsResponseScenarioGraphsAdditionalProperty") + + +@_attrs_define +class RunTestKPIsResponseScenarioGraphsAdditionalProperty: + """ """ + + additional_properties: dict[ + str, RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_kp_is_response_scenario_graphs_additional_property_additional_property import ( + RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty, + ) + + d = dict(src_dict) + run_test_kp_is_response_scenario_graphs_additional_property = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty.from_dict( + prop_dict + ) + + additional_properties[prop_name] = additional_property + + run_test_kp_is_response_scenario_graphs_additional_property.additional_properties = additional_properties + return run_test_kp_is_response_scenario_graphs_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__( + self, key: str + ) -> RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, + key: str, + value: RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty, + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property_additional_property.py b/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property_additional_property.py new file mode 100644 index 0000000..28b1497 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_kp_is_response_scenario_graphs_additional_property_additional_property.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar( + "T", bound="RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty" +) + + +@_attrs_define +class RunTestKPIsResponseScenarioGraphsAdditionalPropertyAdditionalProperty: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_kp_is_response_scenario_graphs_additional_property_additional_property = cls() + + run_test_kp_is_response_scenario_graphs_additional_property_additional_property.additional_properties = d + return run_test_kp_is_response_scenario_graphs_additional_property_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_message_response.py b/python/fi/generated/openapi_client/models/run_test_message_response.py new file mode 100644 index 0000000..b2e0207 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_message_response.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunTestMessageResponse") + + +@_attrs_define +class RunTestMessageResponse: + """ + Attributes: + message (str | Unset): + """ + + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + run_test_message_response = cls( + message=message, + ) + + run_test_message_response.additional_properties = d + return run_test_message_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_name_response.py b/python/fi/generated/openapi_client/models/run_test_name_response.py new file mode 100644 index 0000000..5d2e203 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_name_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_name_result import RunTestNameResult + + +T = TypeVar("T", bound="RunTestNameResponse") + + +@_attrs_define +class RunTestNameResponse: + """ + Attributes: + result (RunTestNameResult): + status (bool | Unset): Default: True. + """ + + result: RunTestNameResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_name_result import RunTestNameResult + + d = dict(src_dict) + result = RunTestNameResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + run_test_name_response = cls( + result=result, + status=status, + ) + + run_test_name_response.additional_properties = d + return run_test_name_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_name_result.py b/python/fi/generated/openapi_client/models/run_test_name_result.py new file mode 100644 index 0000000..13d2825 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_name_result.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestNameResult") + + +@_attrs_define +class RunTestNameResult: + """ + Attributes: + run_test_id (UUID): + run_test_name (str): + """ + + run_test_id: UUID + run_test_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + run_test_id = str(self.run_test_id) + + run_test_name = self.run_test_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "run_test_id": run_test_id, + "run_test_name": run_test_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_id = UUID(d.pop("run_test_id")) + + run_test_name = d.pop("run_test_name") + + run_test_name_result = cls( + run_test_id=run_test_id, + run_test_name=run_test_name, + ) + + run_test_name_result.additional_properties = d + return run_test_name_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response.py b/python/fi/generated/openapi_client/models/run_test_response.py new file mode 100644 index 0000000..20ed9c3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response.py @@ -0,0 +1,639 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.run_test_response_source_type import RunTestResponseSourceType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_test_response_agent_definition_detail import ( + RunTestResponseAgentDefinitionDetail, + ) + from ..models.run_test_response_agent_version import RunTestResponseAgentVersion + from ..models.run_test_response_prompt_template_detail import ( + RunTestResponsePromptTemplateDetail, + ) + from ..models.run_test_response_prompt_version_detail import ( + RunTestResponsePromptVersionDetail, + ) + from ..models.run_test_response_scenarios_detail_item import ( + RunTestResponseScenariosDetailItem, + ) + from ..models.run_test_response_simulator_agent_detail import ( + RunTestResponseSimulatorAgentDetail, + ) + from ..models.simulate_eval_config_response import SimulateEvalConfigResponse + + +T = TypeVar("T", bound="RunTestResponse") + + +@_attrs_define +class RunTestResponse: + """ + Attributes: + id (UUID | Unset): + name (str | Unset): Name of the test run + description (None | str | Unset): Description of the test run + agent_definition (None | Unset | UUID): Agent definition for this test run + agent_version (RunTestResponseAgentVersion | Unset): + agent_definition_detail (RunTestResponseAgentDefinitionDetail | Unset): + source_type (RunTestResponseSourceType | Unset): Source type for the test run: agent_definition or prompt + source_type_display (None | str | Unset): + prompt_template (None | Unset | UUID): Prompt template for this test run (only for prompt source type) + prompt_template_detail (RunTestResponsePromptTemplateDetail | Unset): + prompt_version (None | Unset | UUID): Prompt version for this test run (only for prompt source type) + prompt_version_detail (RunTestResponsePromptVersionDetail | Unset): + scenarios (list[UUID] | Unset): Scenarios to run in this test + scenarios_detail (list[RunTestResponseScenariosDetailItem] | Unset): + dataset_row_ids (list[str] | Unset): IDs of dataset rows to run evaluations on + simulator_agent (None | Unset | UUID): Simulator agent for this test run (derived from scenarios) + simulator_agent_detail (RunTestResponseSimulatorAgentDetail | Unset): + simulate_eval_configs (list[UUID] | Unset): + simulate_eval_configs_detail (list[SimulateEvalConfigResponse] | Unset): + evals_detail (list[SimulateEvalConfigResponse] | Unset): + organization (UUID | Unset): Organization this test run belongs to + enable_tool_evaluation (bool | Unset): Enable automatic tool evaluation for this test run + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + last_run_at (datetime.datetime | None | Unset): + deleted (bool | Unset): + deleted_at (datetime.datetime | None | Unset): + """ + + id: UUID | Unset = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + agent_definition: None | Unset | UUID = UNSET + agent_version: RunTestResponseAgentVersion | Unset = UNSET + agent_definition_detail: RunTestResponseAgentDefinitionDetail | Unset = UNSET + source_type: RunTestResponseSourceType | Unset = UNSET + source_type_display: None | str | Unset = UNSET + prompt_template: None | Unset | UUID = UNSET + prompt_template_detail: RunTestResponsePromptTemplateDetail | Unset = UNSET + prompt_version: None | Unset | UUID = UNSET + prompt_version_detail: RunTestResponsePromptVersionDetail | Unset = UNSET + scenarios: list[UUID] | Unset = UNSET + scenarios_detail: list[RunTestResponseScenariosDetailItem] | Unset = UNSET + dataset_row_ids: list[str] | Unset = UNSET + simulator_agent: None | Unset | UUID = UNSET + simulator_agent_detail: RunTestResponseSimulatorAgentDetail | Unset = UNSET + simulate_eval_configs: list[UUID] | Unset = UNSET + simulate_eval_configs_detail: list[SimulateEvalConfigResponse] | Unset = UNSET + evals_detail: list[SimulateEvalConfigResponse] | Unset = UNSET + organization: UUID | Unset = UNSET + enable_tool_evaluation: bool | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + last_run_at: datetime.datetime | None | Unset = UNSET + deleted: bool | Unset = UNSET + deleted_at: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + agent_definition: None | str | Unset + if isinstance(self.agent_definition, Unset): + agent_definition = UNSET + elif isinstance(self.agent_definition, UUID): + agent_definition = str(self.agent_definition) + else: + agent_definition = self.agent_definition + + agent_version: dict[str, Any] | Unset = UNSET + if not isinstance(self.agent_version, Unset): + agent_version = self.agent_version.to_dict() + + agent_definition_detail: dict[str, Any] | Unset = UNSET + if not isinstance(self.agent_definition_detail, Unset): + agent_definition_detail = self.agent_definition_detail.to_dict() + + source_type: str | Unset = UNSET + if not isinstance(self.source_type, Unset): + source_type = self.source_type.value + + source_type_display: None | str | Unset + if isinstance(self.source_type_display, Unset): + source_type_display = UNSET + else: + source_type_display = self.source_type_display + + prompt_template: None | str | Unset + if isinstance(self.prompt_template, Unset): + prompt_template = UNSET + elif isinstance(self.prompt_template, UUID): + prompt_template = str(self.prompt_template) + else: + prompt_template = self.prompt_template + + prompt_template_detail: dict[str, Any] | Unset = UNSET + if not isinstance(self.prompt_template_detail, Unset): + prompt_template_detail = self.prompt_template_detail.to_dict() + + prompt_version: None | str | Unset + if isinstance(self.prompt_version, Unset): + prompt_version = UNSET + elif isinstance(self.prompt_version, UUID): + prompt_version = str(self.prompt_version) + else: + prompt_version = self.prompt_version + + prompt_version_detail: dict[str, Any] | Unset = UNSET + if not isinstance(self.prompt_version_detail, Unset): + prompt_version_detail = self.prompt_version_detail.to_dict() + + scenarios: list[str] | Unset = UNSET + if not isinstance(self.scenarios, Unset): + scenarios = [] + for scenarios_item_data in self.scenarios: + scenarios_item = str(scenarios_item_data) + scenarios.append(scenarios_item) + + scenarios_detail: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.scenarios_detail, Unset): + scenarios_detail = [] + for scenarios_detail_item_data in self.scenarios_detail: + scenarios_detail_item = scenarios_detail_item_data.to_dict() + scenarios_detail.append(scenarios_detail_item) + + dataset_row_ids: list[str] | Unset = UNSET + if not isinstance(self.dataset_row_ids, Unset): + dataset_row_ids = self.dataset_row_ids + + simulator_agent: None | str | Unset + if isinstance(self.simulator_agent, Unset): + simulator_agent = UNSET + elif isinstance(self.simulator_agent, UUID): + simulator_agent = str(self.simulator_agent) + else: + simulator_agent = self.simulator_agent + + simulator_agent_detail: dict[str, Any] | Unset = UNSET + if not isinstance(self.simulator_agent_detail, Unset): + simulator_agent_detail = self.simulator_agent_detail.to_dict() + + simulate_eval_configs: list[str] | Unset = UNSET + if not isinstance(self.simulate_eval_configs, Unset): + simulate_eval_configs = [] + for simulate_eval_configs_item_data in self.simulate_eval_configs: + simulate_eval_configs_item = str(simulate_eval_configs_item_data) + simulate_eval_configs.append(simulate_eval_configs_item) + + simulate_eval_configs_detail: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.simulate_eval_configs_detail, Unset): + simulate_eval_configs_detail = [] + for ( + simulate_eval_configs_detail_item_data + ) in self.simulate_eval_configs_detail: + simulate_eval_configs_detail_item = ( + simulate_eval_configs_detail_item_data.to_dict() + ) + simulate_eval_configs_detail.append(simulate_eval_configs_detail_item) + + evals_detail: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.evals_detail, Unset): + evals_detail = [] + for evals_detail_item_data in self.evals_detail: + evals_detail_item = evals_detail_item_data.to_dict() + evals_detail.append(evals_detail_item) + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + enable_tool_evaluation = self.enable_tool_evaluation + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + last_run_at: None | str | Unset + if isinstance(self.last_run_at, Unset): + last_run_at = UNSET + elif isinstance(self.last_run_at, datetime.datetime): + last_run_at = self.last_run_at.isoformat() + else: + last_run_at = self.last_run_at + + deleted = self.deleted + + deleted_at: None | str | Unset + if isinstance(self.deleted_at, Unset): + deleted_at = UNSET + elif isinstance(self.deleted_at, datetime.datetime): + deleted_at = self.deleted_at.isoformat() + else: + deleted_at = self.deleted_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if agent_definition is not UNSET: + field_dict["agent_definition"] = agent_definition + if agent_version is not UNSET: + field_dict["agent_version"] = agent_version + if agent_definition_detail is not UNSET: + field_dict["agent_definition_detail"] = agent_definition_detail + if source_type is not UNSET: + field_dict["source_type"] = source_type + if source_type_display is not UNSET: + field_dict["source_type_display"] = source_type_display + if prompt_template is not UNSET: + field_dict["prompt_template"] = prompt_template + if prompt_template_detail is not UNSET: + field_dict["prompt_template_detail"] = prompt_template_detail + if prompt_version is not UNSET: + field_dict["prompt_version"] = prompt_version + if prompt_version_detail is not UNSET: + field_dict["prompt_version_detail"] = prompt_version_detail + if scenarios is not UNSET: + field_dict["scenarios"] = scenarios + if scenarios_detail is not UNSET: + field_dict["scenarios_detail"] = scenarios_detail + if dataset_row_ids is not UNSET: + field_dict["dataset_row_ids"] = dataset_row_ids + if simulator_agent is not UNSET: + field_dict["simulator_agent"] = simulator_agent + if simulator_agent_detail is not UNSET: + field_dict["simulator_agent_detail"] = simulator_agent_detail + if simulate_eval_configs is not UNSET: + field_dict["simulate_eval_configs"] = simulate_eval_configs + if simulate_eval_configs_detail is not UNSET: + field_dict["simulate_eval_configs_detail"] = simulate_eval_configs_detail + if evals_detail is not UNSET: + field_dict["evals_detail"] = evals_detail + if organization is not UNSET: + field_dict["organization"] = organization + if enable_tool_evaluation is not UNSET: + field_dict["enable_tool_evaluation"] = enable_tool_evaluation + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if last_run_at is not UNSET: + field_dict["last_run_at"] = last_run_at + if deleted is not UNSET: + field_dict["deleted"] = deleted + if deleted_at is not UNSET: + field_dict["deleted_at"] = deleted_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_test_response_agent_definition_detail import ( + RunTestResponseAgentDefinitionDetail, + ) + from ..models.run_test_response_agent_version import RunTestResponseAgentVersion + from ..models.run_test_response_prompt_template_detail import ( + RunTestResponsePromptTemplateDetail, + ) + from ..models.run_test_response_prompt_version_detail import ( + RunTestResponsePromptVersionDetail, + ) + from ..models.run_test_response_scenarios_detail_item import ( + RunTestResponseScenariosDetailItem, + ) + from ..models.run_test_response_simulator_agent_detail import ( + RunTestResponseSimulatorAgentDetail, + ) + from ..models.simulate_eval_config_response import SimulateEvalConfigResponse + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_agent_definition(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_definition_type_0 = UUID(data) + + return agent_definition_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_definition = _parse_agent_definition(d.pop("agent_definition", UNSET)) + + _agent_version = d.pop("agent_version", UNSET) + agent_version: RunTestResponseAgentVersion | Unset + if isinstance(_agent_version, Unset): + agent_version = UNSET + else: + agent_version = RunTestResponseAgentVersion.from_dict(_agent_version) + + _agent_definition_detail = d.pop("agent_definition_detail", UNSET) + agent_definition_detail: RunTestResponseAgentDefinitionDetail | Unset + if isinstance(_agent_definition_detail, Unset): + agent_definition_detail = UNSET + else: + agent_definition_detail = RunTestResponseAgentDefinitionDetail.from_dict( + _agent_definition_detail + ) + + _source_type = d.pop("source_type", UNSET) + source_type: RunTestResponseSourceType | Unset + if isinstance(_source_type, Unset): + source_type = UNSET + else: + source_type = RunTestResponseSourceType(_source_type) + + def _parse_source_type_display(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source_type_display = _parse_source_type_display( + d.pop("source_type_display", UNSET) + ) + + def _parse_prompt_template(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_template_type_0 = UUID(data) + + return prompt_template_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_template = _parse_prompt_template(d.pop("prompt_template", UNSET)) + + _prompt_template_detail = d.pop("prompt_template_detail", UNSET) + prompt_template_detail: RunTestResponsePromptTemplateDetail | Unset + if isinstance(_prompt_template_detail, Unset): + prompt_template_detail = UNSET + else: + prompt_template_detail = RunTestResponsePromptTemplateDetail.from_dict( + _prompt_template_detail + ) + + def _parse_prompt_version(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_version_type_0 = UUID(data) + + return prompt_version_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_version = _parse_prompt_version(d.pop("prompt_version", UNSET)) + + _prompt_version_detail = d.pop("prompt_version_detail", UNSET) + prompt_version_detail: RunTestResponsePromptVersionDetail | Unset + if isinstance(_prompt_version_detail, Unset): + prompt_version_detail = UNSET + else: + prompt_version_detail = RunTestResponsePromptVersionDetail.from_dict( + _prompt_version_detail + ) + + _scenarios = d.pop("scenarios", UNSET) + scenarios: list[UUID] | Unset = UNSET + if _scenarios is not UNSET: + scenarios = [] + for scenarios_item_data in _scenarios: + scenarios_item = UUID(scenarios_item_data) + + scenarios.append(scenarios_item) + + _scenarios_detail = d.pop("scenarios_detail", UNSET) + scenarios_detail: list[RunTestResponseScenariosDetailItem] | Unset = UNSET + if _scenarios_detail is not UNSET: + scenarios_detail = [] + for scenarios_detail_item_data in _scenarios_detail: + scenarios_detail_item = RunTestResponseScenariosDetailItem.from_dict( + scenarios_detail_item_data + ) + + scenarios_detail.append(scenarios_detail_item) + + dataset_row_ids = cast(list[str], d.pop("dataset_row_ids", UNSET)) + + def _parse_simulator_agent(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + simulator_agent_type_0 = UUID(data) + + return simulator_agent_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + simulator_agent = _parse_simulator_agent(d.pop("simulator_agent", UNSET)) + + _simulator_agent_detail = d.pop("simulator_agent_detail", UNSET) + simulator_agent_detail: RunTestResponseSimulatorAgentDetail | Unset + if isinstance(_simulator_agent_detail, Unset): + simulator_agent_detail = UNSET + else: + simulator_agent_detail = RunTestResponseSimulatorAgentDetail.from_dict( + _simulator_agent_detail + ) + + _simulate_eval_configs = d.pop("simulate_eval_configs", UNSET) + simulate_eval_configs: list[UUID] | Unset = UNSET + if _simulate_eval_configs is not UNSET: + simulate_eval_configs = [] + for simulate_eval_configs_item_data in _simulate_eval_configs: + simulate_eval_configs_item = UUID(simulate_eval_configs_item_data) + + simulate_eval_configs.append(simulate_eval_configs_item) + + _simulate_eval_configs_detail = d.pop("simulate_eval_configs_detail", UNSET) + simulate_eval_configs_detail: list[SimulateEvalConfigResponse] | Unset = UNSET + if _simulate_eval_configs_detail is not UNSET: + simulate_eval_configs_detail = [] + for simulate_eval_configs_detail_item_data in _simulate_eval_configs_detail: + simulate_eval_configs_detail_item = ( + SimulateEvalConfigResponse.from_dict( + simulate_eval_configs_detail_item_data + ) + ) + + simulate_eval_configs_detail.append(simulate_eval_configs_detail_item) + + _evals_detail = d.pop("evals_detail", UNSET) + evals_detail: list[SimulateEvalConfigResponse] | Unset = UNSET + if _evals_detail is not UNSET: + evals_detail = [] + for evals_detail_item_data in _evals_detail: + evals_detail_item = SimulateEvalConfigResponse.from_dict( + evals_detail_item_data + ) + + evals_detail.append(evals_detail_item) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + enable_tool_evaluation = d.pop("enable_tool_evaluation", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + def _parse_last_run_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_run_at_type_0 = isoparse(data) + + return last_run_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_run_at = _parse_last_run_at(d.pop("last_run_at", UNSET)) + + deleted = d.pop("deleted", UNSET) + + def _parse_deleted_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + deleted_at_type_0 = isoparse(data) + + return deleted_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + deleted_at = _parse_deleted_at(d.pop("deleted_at", UNSET)) + + run_test_response = cls( + id=id, + name=name, + description=description, + agent_definition=agent_definition, + agent_version=agent_version, + agent_definition_detail=agent_definition_detail, + source_type=source_type, + source_type_display=source_type_display, + prompt_template=prompt_template, + prompt_template_detail=prompt_template_detail, + prompt_version=prompt_version, + prompt_version_detail=prompt_version_detail, + scenarios=scenarios, + scenarios_detail=scenarios_detail, + dataset_row_ids=dataset_row_ids, + simulator_agent=simulator_agent, + simulator_agent_detail=simulator_agent_detail, + simulate_eval_configs=simulate_eval_configs, + simulate_eval_configs_detail=simulate_eval_configs_detail, + evals_detail=evals_detail, + organization=organization, + enable_tool_evaluation=enable_tool_evaluation, + created_at=created_at, + updated_at=updated_at, + last_run_at=last_run_at, + deleted=deleted, + deleted_at=deleted_at, + ) + + run_test_response.additional_properties = d + return run_test_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response_agent_definition_detail.py b/python/fi/generated/openapi_client/models/run_test_response_agent_definition_detail.py new file mode 100644 index 0000000..579e9b8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response_agent_definition_detail.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestResponseAgentDefinitionDetail") + + +@_attrs_define +class RunTestResponseAgentDefinitionDetail: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_response_agent_definition_detail = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_response_agent_definition_detail.additional_properties = ( + additional_properties + ) + return run_test_response_agent_definition_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response_agent_version.py b/python/fi/generated/openapi_client/models/run_test_response_agent_version.py new file mode 100644 index 0000000..2c1c4c4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response_agent_version.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestResponseAgentVersion") + + +@_attrs_define +class RunTestResponseAgentVersion: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_response_agent_version = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_response_agent_version.additional_properties = additional_properties + return run_test_response_agent_version + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response_prompt_template_detail.py b/python/fi/generated/openapi_client/models/run_test_response_prompt_template_detail.py new file mode 100644 index 0000000..c6eea00 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response_prompt_template_detail.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestResponsePromptTemplateDetail") + + +@_attrs_define +class RunTestResponsePromptTemplateDetail: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_response_prompt_template_detail = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_response_prompt_template_detail.additional_properties = ( + additional_properties + ) + return run_test_response_prompt_template_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response_prompt_version_detail.py b/python/fi/generated/openapi_client/models/run_test_response_prompt_version_detail.py new file mode 100644 index 0000000..f66311b --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response_prompt_version_detail.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestResponsePromptVersionDetail") + + +@_attrs_define +class RunTestResponsePromptVersionDetail: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_response_prompt_version_detail = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_response_prompt_version_detail.additional_properties = ( + additional_properties + ) + return run_test_response_prompt_version_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response_scenarios_detail_item.py b/python/fi/generated/openapi_client/models/run_test_response_scenarios_detail_item.py new file mode 100644 index 0000000..f3221e3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response_scenarios_detail_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestResponseScenariosDetailItem") + + +@_attrs_define +class RunTestResponseScenariosDetailItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_response_scenarios_detail_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_response_scenarios_detail_item.additional_properties = ( + additional_properties + ) + return run_test_response_scenarios_detail_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response_simulator_agent_detail.py b/python/fi/generated/openapi_client/models/run_test_response_simulator_agent_detail.py new file mode 100644 index 0000000..d24461c --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response_simulator_agent_detail.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="RunTestResponseSimulatorAgentDetail") + + +@_attrs_define +class RunTestResponseSimulatorAgentDetail: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + run_test_response_simulator_agent_detail = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + run_test_response_simulator_agent_detail.additional_properties = ( + additional_properties + ) + return run_test_response_simulator_agent_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/run_test_response_source_type.py b/python/fi/generated/openapi_client/models/run_test_response_source_type.py new file mode 100644 index 0000000..f4734a4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_response_source_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RunTestResponseSourceType(str, Enum): + AGENT_DEFINITION = "agent_definition" + PROMPT = "prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/run_test_scenario_item_response.py b/python/fi/generated/openapi_client/models/run_test_scenario_item_response.py new file mode 100644 index 0000000..16f53f6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/run_test_scenario_item_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RunTestScenarioItemResponse") + + +@_attrs_define +class RunTestScenarioItemResponse: + """ + Attributes: + id (str | Unset): + name (str | Unset): + row_count (int | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + row_count: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + row_count = self.row_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if row_count is not UNSET: + field_dict["row_count"] = row_count + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + row_count = d.pop("row_count", UNSET) + + run_test_scenario_item_response = cls( + id=id, + name=name, + row_count=row_count, + ) + + run_test_scenario_item_response.additional_properties = d + return run_test_scenario_item_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_add_columns_request.py b/python/fi/generated/openapi_client/models/scenario_add_columns_request.py new file mode 100644 index 0000000..55b3839 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_add_columns_request.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.column_definition import ColumnDefinition + + +T = TypeVar("T", bound="ScenarioAddColumnsRequest") + + +@_attrs_define +class ScenarioAddColumnsRequest: + """ + Attributes: + columns (list[ColumnDefinition]): + """ + + columns: list[ColumnDefinition] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + columns = [] + for columns_item_data in self.columns: + columns_item = columns_item_data.to_dict() + columns.append(columns_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "columns": columns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.column_definition import ColumnDefinition + + d = dict(src_dict) + columns = [] + _columns = d.pop("columns") + for columns_item_data in _columns: + columns_item = ColumnDefinition.from_dict(columns_item_data) + + columns.append(columns_item) + + scenario_add_columns_request = cls( + columns=columns, + ) + + scenario_add_columns_request.additional_properties = d + return scenario_add_columns_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_add_columns_response.py b/python/fi/generated/openapi_client/models/scenario_add_columns_response.py new file mode 100644 index 0000000..69d0dd7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_add_columns_response.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScenarioAddColumnsResponse") + + +@_attrs_define +class ScenarioAddColumnsResponse: + """ + Attributes: + message (str | Unset): + scenario_id (UUID | Unset): + dataset_id (UUID | Unset): + columns (list[str] | Unset): + """ + + message: str | Unset = UNSET + scenario_id: UUID | Unset = UNSET + dataset_id: UUID | Unset = UNSET + columns: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + scenario_id: str | Unset = UNSET + if not isinstance(self.scenario_id, Unset): + scenario_id = str(self.scenario_id) + + dataset_id: str | Unset = UNSET + if not isinstance(self.dataset_id, Unset): + dataset_id = str(self.dataset_id) + + columns: list[str] | Unset = UNSET + if not isinstance(self.columns, Unset): + columns = self.columns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if scenario_id is not UNSET: + field_dict["scenario_id"] = scenario_id + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if columns is not UNSET: + field_dict["columns"] = columns + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + _scenario_id = d.pop("scenario_id", UNSET) + scenario_id: UUID | Unset + if isinstance(_scenario_id, Unset): + scenario_id = UNSET + else: + scenario_id = UUID(_scenario_id) + + _dataset_id = d.pop("dataset_id", UNSET) + dataset_id: UUID | Unset + if isinstance(_dataset_id, Unset): + dataset_id = UNSET + else: + dataset_id = UUID(_dataset_id) + + columns = cast(list[str], d.pop("columns", UNSET)) + + scenario_add_columns_response = cls( + message=message, + scenario_id=scenario_id, + dataset_id=dataset_id, + columns=columns, + ) + + scenario_add_columns_response.additional_properties = d + return scenario_add_columns_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_add_rows_request.py b/python/fi/generated/openapi_client/models/scenario_add_rows_request.py new file mode 100644 index 0000000..d153dd8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_add_rows_request.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScenarioAddRowsRequest") + + +@_attrs_define +class ScenarioAddRowsRequest: + """ + Attributes: + num_rows (int): + description (str | Unset): + """ + + num_rows: int + description: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + num_rows = self.num_rows + + description = self.description + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "num_rows": num_rows, + } + ) + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + num_rows = d.pop("num_rows") + + description = d.pop("description", UNSET) + + scenario_add_rows_request = cls( + num_rows=num_rows, + description=description, + ) + + scenario_add_rows_request.additional_properties = d + return scenario_add_rows_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_add_rows_response.py b/python/fi/generated/openapi_client/models/scenario_add_rows_response.py new file mode 100644 index 0000000..af15239 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_add_rows_response.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScenarioAddRowsResponse") + + +@_attrs_define +class ScenarioAddRowsResponse: + """ + Attributes: + message (str | Unset): + scenario_id (UUID | Unset): + dataset_id (UUID | Unset): + num_rows (int | Unset): + """ + + message: str | Unset = UNSET + scenario_id: UUID | Unset = UNSET + dataset_id: UUID | Unset = UNSET + num_rows: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + scenario_id: str | Unset = UNSET + if not isinstance(self.scenario_id, Unset): + scenario_id = str(self.scenario_id) + + dataset_id: str | Unset = UNSET + if not isinstance(self.dataset_id, Unset): + dataset_id = str(self.dataset_id) + + num_rows = self.num_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if scenario_id is not UNSET: + field_dict["scenario_id"] = scenario_id + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if num_rows is not UNSET: + field_dict["num_rows"] = num_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + _scenario_id = d.pop("scenario_id", UNSET) + scenario_id: UUID | Unset + if isinstance(_scenario_id, Unset): + scenario_id = UNSET + else: + scenario_id = UUID(_scenario_id) + + _dataset_id = d.pop("dataset_id", UNSET) + dataset_id: UUID | Unset + if isinstance(_dataset_id, Unset): + dataset_id = UNSET + else: + dataset_id = UUID(_dataset_id) + + num_rows = d.pop("num_rows", UNSET) + + scenario_add_rows_response = cls( + message=message, + scenario_id=scenario_id, + dataset_id=dataset_id, + num_rows=num_rows, + ) + + scenario_add_rows_response.additional_properties = d + return scenario_add_rows_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_create_request.py b/python/fi/generated/openapi_client/models/scenario_create_request.py new file mode 100644 index 0000000..3bcda66 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_create_request.py @@ -0,0 +1,468 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.scenario_create_request_kind import ScenarioCreateRequestKind +from ..models.scenario_create_request_source_type import ScenarioCreateRequestSourceType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.column_definition import ColumnDefinition + from ..models.scenario_create_request_graph import ScenarioCreateRequestGraph + + +T = TypeVar("T", bound="ScenarioCreateRequest") + + +@_attrs_define +class ScenarioCreateRequest: + """ + Attributes: + name (str): + description (str | Unset): + dataset_id (UUID | Unset): + kind (ScenarioCreateRequestKind | Unset): Default: ScenarioCreateRequestKind.DATASET. + script_url (None | str | Unset): + agent_definition_id (UUID | Unset): + agent_definition_version_id (None | Unset | UUID): + custom_instruction (str | Unset): + no_of_rows (int | Unset): Default: 20. + generate_graph (bool | Unset): Default: False. + graph (ScenarioCreateRequestGraph | Unset): + source_type (ScenarioCreateRequestSourceType | Unset): Default: + ScenarioCreateRequestSourceType.AGENT_DEFINITION. + prompt_template_id (None | Unset | UUID): + prompt_version_id (None | Unset | UUID): + add_persona_automatically (bool | Unset): Default: False. + personas (list[UUID] | Unset): + custom_columns (list[ColumnDefinition] | Unset): + agent_name (str | Unset): + agent_prompt (str | Unset): + voice_provider (str | Unset): Default: 'elevenlabs'. + voice_name (str | Unset): Default: 'marissa'. + model (str | Unset): Default: 'gpt-4'. + llm_temperature (float | Unset): Default: 0.7. + initial_message (str | Unset): + max_call_duration_in_minutes (int | Unset): Default: 30. + interrupt_sensitivity (float | Unset): Default: 0.5. + conversation_speed (float | Unset): Default: 1.0. + finished_speaking_sensitivity (float | Unset): Default: 0.5. + initial_message_delay (int | Unset): Default: 0. + """ + + name: str + description: str | Unset = UNSET + dataset_id: UUID | Unset = UNSET + kind: ScenarioCreateRequestKind | Unset = ScenarioCreateRequestKind.DATASET + script_url: None | str | Unset = UNSET + agent_definition_id: UUID | Unset = UNSET + agent_definition_version_id: None | Unset | UUID = UNSET + custom_instruction: str | Unset = UNSET + no_of_rows: int | Unset = 20 + generate_graph: bool | Unset = False + graph: ScenarioCreateRequestGraph | Unset = UNSET + source_type: ScenarioCreateRequestSourceType | Unset = ( + ScenarioCreateRequestSourceType.AGENT_DEFINITION + ) + prompt_template_id: None | Unset | UUID = UNSET + prompt_version_id: None | Unset | UUID = UNSET + add_persona_automatically: bool | Unset = False + personas: list[UUID] | Unset = UNSET + custom_columns: list[ColumnDefinition] | Unset = UNSET + agent_name: str | Unset = UNSET + agent_prompt: str | Unset = UNSET + voice_provider: str | Unset = "elevenlabs" + voice_name: str | Unset = "marissa" + model: str | Unset = "gpt-4" + llm_temperature: float | Unset = 0.7 + initial_message: str | Unset = UNSET + max_call_duration_in_minutes: int | Unset = 30 + interrupt_sensitivity: float | Unset = 0.5 + conversation_speed: float | Unset = 1.0 + finished_speaking_sensitivity: float | Unset = 0.5 + initial_message_delay: int | Unset = 0 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description = self.description + + dataset_id: str | Unset = UNSET + if not isinstance(self.dataset_id, Unset): + dataset_id = str(self.dataset_id) + + kind: str | Unset = UNSET + if not isinstance(self.kind, Unset): + kind = self.kind.value + + script_url: None | str | Unset + if isinstance(self.script_url, Unset): + script_url = UNSET + else: + script_url = self.script_url + + agent_definition_id: str | Unset = UNSET + if not isinstance(self.agent_definition_id, Unset): + agent_definition_id = str(self.agent_definition_id) + + agent_definition_version_id: None | str | Unset + if isinstance(self.agent_definition_version_id, Unset): + agent_definition_version_id = UNSET + elif isinstance(self.agent_definition_version_id, UUID): + agent_definition_version_id = str(self.agent_definition_version_id) + else: + agent_definition_version_id = self.agent_definition_version_id + + custom_instruction = self.custom_instruction + + no_of_rows = self.no_of_rows + + generate_graph = self.generate_graph + + graph: dict[str, Any] | Unset = UNSET + if not isinstance(self.graph, Unset): + graph = self.graph.to_dict() + + source_type: str | Unset = UNSET + if not isinstance(self.source_type, Unset): + source_type = self.source_type.value + + prompt_template_id: None | str | Unset + if isinstance(self.prompt_template_id, Unset): + prompt_template_id = UNSET + elif isinstance(self.prompt_template_id, UUID): + prompt_template_id = str(self.prompt_template_id) + else: + prompt_template_id = self.prompt_template_id + + prompt_version_id: None | str | Unset + if isinstance(self.prompt_version_id, Unset): + prompt_version_id = UNSET + elif isinstance(self.prompt_version_id, UUID): + prompt_version_id = str(self.prompt_version_id) + else: + prompt_version_id = self.prompt_version_id + + add_persona_automatically = self.add_persona_automatically + + personas: list[str] | Unset = UNSET + if not isinstance(self.personas, Unset): + personas = [] + for personas_item_data in self.personas: + personas_item = str(personas_item_data) + personas.append(personas_item) + + custom_columns: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.custom_columns, Unset): + custom_columns = [] + for custom_columns_item_data in self.custom_columns: + custom_columns_item = custom_columns_item_data.to_dict() + custom_columns.append(custom_columns_item) + + agent_name = self.agent_name + + agent_prompt = self.agent_prompt + + voice_provider = self.voice_provider + + voice_name = self.voice_name + + model = self.model + + llm_temperature = self.llm_temperature + + initial_message = self.initial_message + + max_call_duration_in_minutes = self.max_call_duration_in_minutes + + interrupt_sensitivity = self.interrupt_sensitivity + + conversation_speed = self.conversation_speed + + finished_speaking_sensitivity = self.finished_speaking_sensitivity + + initial_message_delay = self.initial_message_delay + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + } + ) + if description is not UNSET: + field_dict["description"] = description + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if kind is not UNSET: + field_dict["kind"] = kind + if script_url is not UNSET: + field_dict["script_url"] = script_url + if agent_definition_id is not UNSET: + field_dict["agent_definition_id"] = agent_definition_id + if agent_definition_version_id is not UNSET: + field_dict["agent_definition_version_id"] = agent_definition_version_id + if custom_instruction is not UNSET: + field_dict["custom_instruction"] = custom_instruction + if no_of_rows is not UNSET: + field_dict["no_of_rows"] = no_of_rows + if generate_graph is not UNSET: + field_dict["generate_graph"] = generate_graph + if graph is not UNSET: + field_dict["graph"] = graph + if source_type is not UNSET: + field_dict["source_type"] = source_type + if prompt_template_id is not UNSET: + field_dict["prompt_template_id"] = prompt_template_id + if prompt_version_id is not UNSET: + field_dict["prompt_version_id"] = prompt_version_id + if add_persona_automatically is not UNSET: + field_dict["add_persona_automatically"] = add_persona_automatically + if personas is not UNSET: + field_dict["personas"] = personas + if custom_columns is not UNSET: + field_dict["custom_columns"] = custom_columns + if agent_name is not UNSET: + field_dict["agent_name"] = agent_name + if agent_prompt is not UNSET: + field_dict["agent_prompt"] = agent_prompt + if voice_provider is not UNSET: + field_dict["voice_provider"] = voice_provider + if voice_name is not UNSET: + field_dict["voice_name"] = voice_name + if model is not UNSET: + field_dict["model"] = model + if llm_temperature is not UNSET: + field_dict["llm_temperature"] = llm_temperature + if initial_message is not UNSET: + field_dict["initial_message"] = initial_message + if max_call_duration_in_minutes is not UNSET: + field_dict["max_call_duration_in_minutes"] = max_call_duration_in_minutes + if interrupt_sensitivity is not UNSET: + field_dict["interrupt_sensitivity"] = interrupt_sensitivity + if conversation_speed is not UNSET: + field_dict["conversation_speed"] = conversation_speed + if finished_speaking_sensitivity is not UNSET: + field_dict["finished_speaking_sensitivity"] = finished_speaking_sensitivity + if initial_message_delay is not UNSET: + field_dict["initial_message_delay"] = initial_message_delay + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.column_definition import ColumnDefinition + from ..models.scenario_create_request_graph import ScenarioCreateRequestGraph + + d = dict(src_dict) + name = d.pop("name") + + description = d.pop("description", UNSET) + + _dataset_id = d.pop("dataset_id", UNSET) + dataset_id: UUID | Unset + if isinstance(_dataset_id, Unset): + dataset_id = UNSET + else: + dataset_id = UUID(_dataset_id) + + _kind = d.pop("kind", UNSET) + kind: ScenarioCreateRequestKind | Unset + if isinstance(_kind, Unset): + kind = UNSET + else: + kind = ScenarioCreateRequestKind(_kind) + + def _parse_script_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + script_url = _parse_script_url(d.pop("script_url", UNSET)) + + _agent_definition_id = d.pop("agent_definition_id", UNSET) + agent_definition_id: UUID | Unset + if isinstance(_agent_definition_id, Unset): + agent_definition_id = UNSET + else: + agent_definition_id = UUID(_agent_definition_id) + + def _parse_agent_definition_version_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + agent_definition_version_id_type_0 = UUID(data) + + return agent_definition_version_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + agent_definition_version_id = _parse_agent_definition_version_id( + d.pop("agent_definition_version_id", UNSET) + ) + + custom_instruction = d.pop("custom_instruction", UNSET) + + no_of_rows = d.pop("no_of_rows", UNSET) + + generate_graph = d.pop("generate_graph", UNSET) + + _graph = d.pop("graph", UNSET) + graph: ScenarioCreateRequestGraph | Unset + if isinstance(_graph, Unset): + graph = UNSET + else: + graph = ScenarioCreateRequestGraph.from_dict(_graph) + + _source_type = d.pop("source_type", UNSET) + source_type: ScenarioCreateRequestSourceType | Unset + if isinstance(_source_type, Unset): + source_type = UNSET + else: + source_type = ScenarioCreateRequestSourceType(_source_type) + + def _parse_prompt_template_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_template_id_type_0 = UUID(data) + + return prompt_template_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_template_id = _parse_prompt_template_id( + d.pop("prompt_template_id", UNSET) + ) + + def _parse_prompt_version_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_version_id_type_0 = UUID(data) + + return prompt_version_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_version_id = _parse_prompt_version_id(d.pop("prompt_version_id", UNSET)) + + add_persona_automatically = d.pop("add_persona_automatically", UNSET) + + _personas = d.pop("personas", UNSET) + personas: list[UUID] | Unset = UNSET + if _personas is not UNSET: + personas = [] + for personas_item_data in _personas: + personas_item = UUID(personas_item_data) + + personas.append(personas_item) + + _custom_columns = d.pop("custom_columns", UNSET) + custom_columns: list[ColumnDefinition] | Unset = UNSET + if _custom_columns is not UNSET: + custom_columns = [] + for custom_columns_item_data in _custom_columns: + custom_columns_item = ColumnDefinition.from_dict( + custom_columns_item_data + ) + + custom_columns.append(custom_columns_item) + + agent_name = d.pop("agent_name", UNSET) + + agent_prompt = d.pop("agent_prompt", UNSET) + + voice_provider = d.pop("voice_provider", UNSET) + + voice_name = d.pop("voice_name", UNSET) + + model = d.pop("model", UNSET) + + llm_temperature = d.pop("llm_temperature", UNSET) + + initial_message = d.pop("initial_message", UNSET) + + max_call_duration_in_minutes = d.pop("max_call_duration_in_minutes", UNSET) + + interrupt_sensitivity = d.pop("interrupt_sensitivity", UNSET) + + conversation_speed = d.pop("conversation_speed", UNSET) + + finished_speaking_sensitivity = d.pop("finished_speaking_sensitivity", UNSET) + + initial_message_delay = d.pop("initial_message_delay", UNSET) + + scenario_create_request = cls( + name=name, + description=description, + dataset_id=dataset_id, + kind=kind, + script_url=script_url, + agent_definition_id=agent_definition_id, + agent_definition_version_id=agent_definition_version_id, + custom_instruction=custom_instruction, + no_of_rows=no_of_rows, + generate_graph=generate_graph, + graph=graph, + source_type=source_type, + prompt_template_id=prompt_template_id, + prompt_version_id=prompt_version_id, + add_persona_automatically=add_persona_automatically, + personas=personas, + custom_columns=custom_columns, + agent_name=agent_name, + agent_prompt=agent_prompt, + voice_provider=voice_provider, + voice_name=voice_name, + model=model, + llm_temperature=llm_temperature, + initial_message=initial_message, + max_call_duration_in_minutes=max_call_duration_in_minutes, + interrupt_sensitivity=interrupt_sensitivity, + conversation_speed=conversation_speed, + finished_speaking_sensitivity=finished_speaking_sensitivity, + initial_message_delay=initial_message_delay, + ) + + scenario_create_request.additional_properties = d + return scenario_create_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_create_request_graph.py b/python/fi/generated/openapi_client/models/scenario_create_request_graph.py new file mode 100644 index 0000000..f0528a0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_create_request_graph.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScenarioCreateRequestGraph") + + +@_attrs_define +class ScenarioCreateRequestGraph: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + scenario_create_request_graph = cls() + + scenario_create_request_graph.additional_properties = d + return scenario_create_request_graph + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_create_request_kind.py b/python/fi/generated/openapi_client/models/scenario_create_request_kind.py new file mode 100644 index 0000000..ebe6afc --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_create_request_kind.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ScenarioCreateRequestKind(str, Enum): + DATASET = "dataset" + GRAPH = "graph" + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_create_request_source_type.py b/python/fi/generated/openapi_client/models/scenario_create_request_source_type.py new file mode 100644 index 0000000..ea85018 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_create_request_source_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ScenarioCreateRequestSourceType(str, Enum): + AGENT_DEFINITION = "agent_definition" + PROMPT = "prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_create_response.py b/python/fi/generated/openapi_client/models/scenario_create_response.py new file mode 100644 index 0000000..599cae2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_create_response.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.scenario_create_response_status import ScenarioCreateResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.scenario_response import ScenarioResponse + + +T = TypeVar("T", bound="ScenarioCreateResponse") + + +@_attrs_define +class ScenarioCreateResponse: + """ + Attributes: + message (str | Unset): + scenario (ScenarioResponse | Unset): + status (ScenarioCreateResponseStatus | Unset): + """ + + message: str | Unset = UNSET + scenario: ScenarioResponse | Unset = UNSET + status: ScenarioCreateResponseStatus | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + scenario: dict[str, Any] | Unset = UNSET + if not isinstance(self.scenario, Unset): + scenario = self.scenario.to_dict() + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if scenario is not UNSET: + field_dict["scenario"] = scenario + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.scenario_response import ScenarioResponse + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _scenario = d.pop("scenario", UNSET) + scenario: ScenarioResponse | Unset + if isinstance(_scenario, Unset): + scenario = UNSET + else: + scenario = ScenarioResponse.from_dict(_scenario) + + _status = d.pop("status", UNSET) + status: ScenarioCreateResponseStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = ScenarioCreateResponseStatus(_status) + + scenario_create_response = cls( + message=message, + scenario=scenario, + status=status, + ) + + scenario_create_response.additional_properties = d + return scenario_create_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_create_response_status.py b/python/fi/generated/openapi_client/models/scenario_create_response_status.py new file mode 100644 index 0000000..7c9154e --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_create_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ScenarioCreateResponseStatus(str, Enum): + PROCESSING = "processing" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_delete_response.py b/python/fi/generated/openapi_client/models/scenario_delete_response.py new file mode 100644 index 0000000..04072e3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_delete_response.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScenarioDeleteResponse") + + +@_attrs_define +class ScenarioDeleteResponse: + """ + Attributes: + message (str | Unset): + """ + + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + scenario_delete_response = cls( + message=message, + ) + + scenario_delete_response.additional_properties = d + return scenario_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_detail_response.py b/python/fi/generated/openapi_client/models/scenario_detail_response.py new file mode 100644 index 0000000..cf05e0c --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_detail_response.py @@ -0,0 +1,366 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.scenario_detail_response_scenario_type import ( + ScenarioDetailResponseScenarioType, +) +from ..models.scenario_detail_response_status import ScenarioDetailResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.scenario_detail_response_graph import ScenarioDetailResponseGraph + from ..models.scenario_prompt_item import ScenarioPromptItem + + +T = TypeVar("T", bound="ScenarioDetailResponse") + + +@_attrs_define +class ScenarioDetailResponse: + """ + Attributes: + id (UUID | Unset): + name (str | Unset): + description (None | str | Unset): + source (str | Unset): + scenario_type (ScenarioDetailResponseScenarioType | Unset): + dataset_id (None | Unset | UUID): + organization (UUID | Unset): + dataset (None | Unset | UUID): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + deleted (bool | Unset): + deleted_at (datetime.datetime | None | Unset): + status (ScenarioDetailResponseStatus | Unset): + agent_type (None | str | Unset): + graph (ScenarioDetailResponseGraph | Unset): + prompts (list[ScenarioPromptItem] | Unset): + dataset_rows (int | Unset): + """ + + id: UUID | Unset = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + source: str | Unset = UNSET + scenario_type: ScenarioDetailResponseScenarioType | Unset = UNSET + dataset_id: None | Unset | UUID = UNSET + organization: UUID | Unset = UNSET + dataset: None | Unset | UUID = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + deleted: bool | Unset = UNSET + deleted_at: datetime.datetime | None | Unset = UNSET + status: ScenarioDetailResponseStatus | Unset = UNSET + agent_type: None | str | Unset = UNSET + graph: ScenarioDetailResponseGraph | Unset = UNSET + prompts: list[ScenarioPromptItem] | Unset = UNSET + dataset_rows: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + source = self.source + + scenario_type: str | Unset = UNSET + if not isinstance(self.scenario_type, Unset): + scenario_type = self.scenario_type.value + + dataset_id: None | str | Unset + if isinstance(self.dataset_id, Unset): + dataset_id = UNSET + elif isinstance(self.dataset_id, UUID): + dataset_id = str(self.dataset_id) + else: + dataset_id = self.dataset_id + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + dataset: None | str | Unset + if isinstance(self.dataset, Unset): + dataset = UNSET + elif isinstance(self.dataset, UUID): + dataset = str(self.dataset) + else: + dataset = self.dataset + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + deleted = self.deleted + + deleted_at: None | str | Unset + if isinstance(self.deleted_at, Unset): + deleted_at = UNSET + elif isinstance(self.deleted_at, datetime.datetime): + deleted_at = self.deleted_at.isoformat() + else: + deleted_at = self.deleted_at + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + agent_type: None | str | Unset + if isinstance(self.agent_type, Unset): + agent_type = UNSET + else: + agent_type = self.agent_type + + graph: dict[str, Any] | Unset = UNSET + if not isinstance(self.graph, Unset): + graph = self.graph.to_dict() + + prompts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.prompts, Unset): + prompts = [] + for prompts_item_data in self.prompts: + prompts_item = prompts_item_data.to_dict() + prompts.append(prompts_item) + + dataset_rows = self.dataset_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if source is not UNSET: + field_dict["source"] = source + if scenario_type is not UNSET: + field_dict["scenario_type"] = scenario_type + if dataset_id is not UNSET: + field_dict["dataset_id"] = dataset_id + if organization is not UNSET: + field_dict["organization"] = organization + if dataset is not UNSET: + field_dict["dataset"] = dataset + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if deleted is not UNSET: + field_dict["deleted"] = deleted + if deleted_at is not UNSET: + field_dict["deleted_at"] = deleted_at + if status is not UNSET: + field_dict["status"] = status + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + if graph is not UNSET: + field_dict["graph"] = graph + if prompts is not UNSET: + field_dict["prompts"] = prompts + if dataset_rows is not UNSET: + field_dict["dataset_rows"] = dataset_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.scenario_detail_response_graph import ScenarioDetailResponseGraph + from ..models.scenario_prompt_item import ScenarioPromptItem + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + source = d.pop("source", UNSET) + + _scenario_type = d.pop("scenario_type", UNSET) + scenario_type: ScenarioDetailResponseScenarioType | Unset + if isinstance(_scenario_type, Unset): + scenario_type = UNSET + else: + scenario_type = ScenarioDetailResponseScenarioType(_scenario_type) + + def _parse_dataset_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + dataset_id_type_0 = UUID(data) + + return dataset_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + dataset_id = _parse_dataset_id(d.pop("dataset_id", UNSET)) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + def _parse_dataset(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + dataset_type_0 = UUID(data) + + return dataset_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + dataset = _parse_dataset(d.pop("dataset", UNSET)) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + deleted = d.pop("deleted", UNSET) + + def _parse_deleted_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + deleted_at_type_0 = isoparse(data) + + return deleted_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + deleted_at = _parse_deleted_at(d.pop("deleted_at", UNSET)) + + _status = d.pop("status", UNSET) + status: ScenarioDetailResponseStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = ScenarioDetailResponseStatus(_status) + + def _parse_agent_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + agent_type = _parse_agent_type(d.pop("agent_type", UNSET)) + + _graph = d.pop("graph", UNSET) + graph: ScenarioDetailResponseGraph | Unset + if isinstance(_graph, Unset): + graph = UNSET + else: + graph = ScenarioDetailResponseGraph.from_dict(_graph) + + _prompts = d.pop("prompts", UNSET) + prompts: list[ScenarioPromptItem] | Unset = UNSET + if _prompts is not UNSET: + prompts = [] + for prompts_item_data in _prompts: + prompts_item = ScenarioPromptItem.from_dict(prompts_item_data) + + prompts.append(prompts_item) + + dataset_rows = d.pop("dataset_rows", UNSET) + + scenario_detail_response = cls( + id=id, + name=name, + description=description, + source=source, + scenario_type=scenario_type, + dataset_id=dataset_id, + organization=organization, + dataset=dataset, + created_at=created_at, + updated_at=updated_at, + deleted=deleted, + deleted_at=deleted_at, + status=status, + agent_type=agent_type, + graph=graph, + prompts=prompts, + dataset_rows=dataset_rows, + ) + + scenario_detail_response.additional_properties = d + return scenario_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_detail_response_graph.py b/python/fi/generated/openapi_client/models/scenario_detail_response_graph.py new file mode 100644 index 0000000..483c860 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_detail_response_graph.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScenarioDetailResponseGraph") + + +@_attrs_define +class ScenarioDetailResponseGraph: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + scenario_detail_response_graph = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + scenario_detail_response_graph.additional_properties = additional_properties + return scenario_detail_response_graph + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_detail_response_scenario_type.py b/python/fi/generated/openapi_client/models/scenario_detail_response_scenario_type.py new file mode 100644 index 0000000..3c03690 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_detail_response_scenario_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ScenarioDetailResponseScenarioType(str, Enum): + DATASET = "dataset" + GRAPH = "graph" + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_detail_response_status.py b/python/fi/generated/openapi_client/models/scenario_detail_response_status.py new file mode 100644 index 0000000..a2f1ead --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_detail_response_status.py @@ -0,0 +1,24 @@ +from enum import Enum + + +class ScenarioDetailResponseStatus(str, Enum): + CANCELLED = "Cancelled" + COMPLETED = "Completed" + DELETING = "Deleting" + EDITING = "Editing" + ERROR = "Error" + EXPERIMENTEVALUATION = "ExperimentEvaluation" + FAILED = "Failed" + INACTIVE = "Inactive" + NOTSTARTED = "NotStarted" + OPTIMIZATIONEVALUATION = "OptimizationEvaluation" + PARTIALCOMPLETED = "PartialCompleted" + PARTIALEXTRACTED = "PartialExtracted" + PARTIALRUN = "PartialRun" + PROCESSING = "Processing" + QUEUED = "Queued" + RUNNING = "Running" + UPLOADING = "Uploading" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_edit_prompts_request.py b/python/fi/generated/openapi_client/models/scenario_edit_prompts_request.py new file mode 100644 index 0000000..0841f4f --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_edit_prompts_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScenarioEditPromptsRequest") + + +@_attrs_define +class ScenarioEditPromptsRequest: + """ + Attributes: + prompts (str): + """ + + prompts: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + prompts = self.prompts + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "prompts": prompts, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + prompts = d.pop("prompts") + + scenario_edit_prompts_request = cls( + prompts=prompts, + ) + + scenario_edit_prompts_request.additional_properties = d + return scenario_edit_prompts_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_edit_request.py b/python/fi/generated/openapi_client/models/scenario_edit_request.py new file mode 100644 index 0000000..c935ce1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_edit_request.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.scenario_edit_request_graph import ScenarioEditRequestGraph + + +T = TypeVar("T", bound="ScenarioEditRequest") + + +@_attrs_define +class ScenarioEditRequest: + """ + Attributes: + name (str | Unset): + description (str | Unset): + graph (ScenarioEditRequestGraph | Unset): + prompt (str | Unset): + """ + + name: str | Unset = UNSET + description: str | Unset = UNSET + graph: ScenarioEditRequestGraph | Unset = UNSET + prompt: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description = self.description + + graph: dict[str, Any] | Unset = UNSET + if not isinstance(self.graph, Unset): + graph = self.graph.to_dict() + + prompt = self.prompt + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if graph is not UNSET: + field_dict["graph"] = graph + if prompt is not UNSET: + field_dict["prompt"] = prompt + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.scenario_edit_request_graph import ScenarioEditRequestGraph + + d = dict(src_dict) + name = d.pop("name", UNSET) + + description = d.pop("description", UNSET) + + _graph = d.pop("graph", UNSET) + graph: ScenarioEditRequestGraph | Unset + if isinstance(_graph, Unset): + graph = UNSET + else: + graph = ScenarioEditRequestGraph.from_dict(_graph) + + prompt = d.pop("prompt", UNSET) + + scenario_edit_request = cls( + name=name, + description=description, + graph=graph, + prompt=prompt, + ) + + scenario_edit_request.additional_properties = d + return scenario_edit_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_edit_request_graph.py b/python/fi/generated/openapi_client/models/scenario_edit_request_graph.py new file mode 100644 index 0000000..c4d70d0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_edit_request_graph.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScenarioEditRequestGraph") + + +@_attrs_define +class ScenarioEditRequestGraph: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + scenario_edit_request_graph = cls() + + scenario_edit_request_graph.additional_properties = d + return scenario_edit_request_graph + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_edit_response.py b/python/fi/generated/openapi_client/models/scenario_edit_response.py new file mode 100644 index 0000000..b72c97b --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_edit_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.scenario_response import ScenarioResponse + + +T = TypeVar("T", bound="ScenarioEditResponse") + + +@_attrs_define +class ScenarioEditResponse: + """ + Attributes: + message (str | Unset): + scenario (ScenarioResponse | Unset): + """ + + message: str | Unset = UNSET + scenario: ScenarioResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + scenario: dict[str, Any] | Unset = UNSET + if not isinstance(self.scenario, Unset): + scenario = self.scenario.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if scenario is not UNSET: + field_dict["scenario"] = scenario + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.scenario_response import ScenarioResponse + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _scenario = d.pop("scenario", UNSET) + scenario: ScenarioResponse | Unset + if isinstance(_scenario, Unset): + scenario = UNSET + else: + scenario = ScenarioResponse.from_dict(_scenario) + + scenario_edit_response = cls( + message=message, + scenario=scenario, + ) + + scenario_edit_response.additional_properties = d + return scenario_edit_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_error_response.py b/python/fi/generated/openapi_client/models/scenario_error_response.py new file mode 100644 index 0000000..25b27c2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_error_response.py @@ -0,0 +1,222 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.scenario_error_response_type import ScenarioErrorResponseType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.scenario_error_response_details import ScenarioErrorResponseDetails + + +T = TypeVar("T", bound="ScenarioErrorResponse") + + +@_attrs_define +class ScenarioErrorResponse: + """ + Attributes: + status (bool | Unset): Default: False. + type_ (ScenarioErrorResponseType | Unset): + code (None | str | Unset): + detail (None | str | Unset): + result (None | str | Unset): + message (None | str | Unset): + error (None | str | Unset): + attr (None | str | Unset): + details (ScenarioErrorResponseDetails | Unset): + """ + + status: bool | Unset = False + type_: ScenarioErrorResponseType | Unset = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + error: None | str | Unset = UNSET + attr: None | str | Unset = UNSET + details: ScenarioErrorResponseDetails | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + detail: None | str | Unset + if isinstance(self.detail, Unset): + detail = UNSET + else: + detail = self.detail + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + error: None | str | Unset + if isinstance(self.error, Unset): + error = UNSET + else: + error = self.error + + attr: None | str | Unset + if isinstance(self.attr, Unset): + attr = UNSET + else: + attr = self.attr + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if type_ is not UNSET: + field_dict["type"] = type_ + if code is not UNSET: + field_dict["code"] = code + if detail is not UNSET: + field_dict["detail"] = detail + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if error is not UNSET: + field_dict["error"] = error + if attr is not UNSET: + field_dict["attr"] = attr + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.scenario_error_response_details import ( + ScenarioErrorResponseDetails, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _type_ = d.pop("type", UNSET) + type_: ScenarioErrorResponseType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = ScenarioErrorResponseType(_type_) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_detail(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detail = _parse_detail(d.pop("detail", UNSET)) + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_error(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error = _parse_error(d.pop("error", UNSET)) + + def _parse_attr(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + attr = _parse_attr(d.pop("attr", UNSET)) + + _details = d.pop("details", UNSET) + details: ScenarioErrorResponseDetails | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = ScenarioErrorResponseDetails.from_dict(_details) + + scenario_error_response = cls( + status=status, + type_=type_, + code=code, + detail=detail, + result=result, + message=message, + error=error, + attr=attr, + details=details, + ) + + scenario_error_response.additional_properties = d + return scenario_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_error_response_details.py b/python/fi/generated/openapi_client/models/scenario_error_response_details.py new file mode 100644 index 0000000..fabe36b --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_error_response_details.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScenarioErrorResponseDetails") + + +@_attrs_define +class ScenarioErrorResponseDetails: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + scenario_error_response_details = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + scenario_error_response_details.additional_properties = additional_properties + return scenario_error_response_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_error_response_type.py b/python/fi/generated/openapi_client/models/scenario_error_response_type.py new file mode 100644 index 0000000..fdf6d72 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_error_response_type.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class ScenarioErrorResponseType(str, Enum): + API_ERROR = "api_error" + AUTHENTICATION_ERROR = "authentication_error" + CLIENT_ERROR = "client_error" + CONFLICT = "conflict" + ENTITLEMENT_ERROR = "entitlement_error" + NOT_FOUND = "not_found" + PAYMENT_REQUIRED = "payment_required" + PERMISSION_ERROR = "permission_error" + RATE_LIMIT = "rate_limit" + SERVER_ERROR = "server_error" + SERVICE_UNAVAILABLE = "service_unavailable" + TIMEOUT = "timeout" + VALIDATION_ERROR = "validation_error" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_list_response.py b/python/fi/generated/openapi_client/models/scenario_list_response.py new file mode 100644 index 0000000..7027fd4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_list_response.py @@ -0,0 +1,128 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.scenario_response import ScenarioResponse + + +T = TypeVar("T", bound="ScenarioListResponse") + + +@_attrs_define +class ScenarioListResponse: + """ + Attributes: + count (int | Unset): + next_ (None | str | Unset): + previous (None | str | Unset): + results (list[ScenarioResponse] | Unset): + """ + + count: int | Unset = UNSET + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + results: list[ScenarioResponse] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict["count"] = count + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + if results is not UNSET: + field_dict["results"] = results + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.scenario_response import ScenarioResponse + + d = dict(src_dict) + count = d.pop("count", UNSET) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + _results = d.pop("results", UNSET) + results: list[ScenarioResponse] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = ScenarioResponse.from_dict(results_item_data) + + results.append(results_item) + + scenario_list_response = cls( + count=count, + next_=next_, + previous=previous, + results=results, + ) + + scenario_list_response.additional_properties = d + return scenario_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_prompt_item.py b/python/fi/generated/openapi_client/models/scenario_prompt_item.py new file mode 100644 index 0000000..d83ad6d --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_prompt_item.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.scenario_prompt_item_role import ScenarioPromptItemRole +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScenarioPromptItem") + + +@_attrs_define +class ScenarioPromptItem: + """ + Attributes: + role (ScenarioPromptItemRole | Unset): + content (str | Unset): + """ + + role: ScenarioPromptItemRole | Unset = UNSET + content: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + role: str | Unset = UNSET + if not isinstance(self.role, Unset): + role = self.role.value + + content = self.content + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if role is not UNSET: + field_dict["role"] = role + if content is not UNSET: + field_dict["content"] = content + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _role = d.pop("role", UNSET) + role: ScenarioPromptItemRole | Unset + if isinstance(_role, Unset): + role = UNSET + else: + role = ScenarioPromptItemRole(_role) + + content = d.pop("content", UNSET) + + scenario_prompt_item = cls( + role=role, + content=content, + ) + + scenario_prompt_item.additional_properties = d + return scenario_prompt_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_prompt_item_role.py b/python/fi/generated/openapi_client/models/scenario_prompt_item_role.py new file mode 100644 index 0000000..54cd52d --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_prompt_item_role.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ScenarioPromptItemRole(str, Enum): + ASSISTANT = "assistant" + SYSTEM = "system" + USER = "user" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_prompts_update_response.py b/python/fi/generated/openapi_client/models/scenario_prompts_update_response.py new file mode 100644 index 0000000..3091448 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_prompts_update_response.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScenarioPromptsUpdateResponse") + + +@_attrs_define +class ScenarioPromptsUpdateResponse: + """ + Attributes: + message (str | Unset): + prompts (str | Unset): + """ + + message: str | Unset = UNSET + prompts: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + prompts = self.prompts + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if prompts is not UNSET: + field_dict["prompts"] = prompts + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + prompts = d.pop("prompts", UNSET) + + scenario_prompts_update_response = cls( + message=message, + prompts=prompts, + ) + + scenario_prompts_update_response.additional_properties = d + return scenario_prompts_update_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_response.py b/python/fi/generated/openapi_client/models/scenario_response.py new file mode 100644 index 0000000..e4de23e --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_response.py @@ -0,0 +1,420 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.scenario_response_scenario_type import ScenarioResponseScenarioType +from ..models.scenario_response_source_type import ScenarioResponseSourceType +from ..models.scenario_response_status import ScenarioResponseStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ScenarioResponse") + + +@_attrs_define +class ScenarioResponse: + """ + Attributes: + name (str): Name of the scenario + source (str): Source content or reference for the scenario + id (UUID | Unset): + description (None | str | Unset): Optional description of the scenario + scenario_type (ScenarioResponseScenarioType | Unset): Type of scenario (graph, script, or dataset) + scenario_type_display (str | Unset): + source_type (ScenarioResponseSourceType | Unset): Source type for the scenario: agent_definition or prompt + source_type_display (str | Unset): + organization (UUID | Unset): Organization this scenario belongs to + dataset (None | Unset | UUID): Dataset associated with this scenario (only for dataset type scenarios) + dataset_rows (str | Unset): + dataset_column_config (str | Unset): + graph (str | Unset): + agent (str | Unset): + prompt_template (None | Unset | UUID): Prompt template associated with this scenario (only for prompt source + type) + prompt_template_detail (str | Unset): + prompt_version (None | Unset | UUID): Prompt version associated with this scenario (only for prompt source type) + prompt_version_detail (str | Unset): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + deleted (bool | Unset): + status (ScenarioResponseStatus | Unset): Status of the scenario + deleted_at (datetime.datetime | None | Unset): + agent_type (str | Unset): + """ + + name: str + source: str + id: UUID | Unset = UNSET + description: None | str | Unset = UNSET + scenario_type: ScenarioResponseScenarioType | Unset = UNSET + scenario_type_display: str | Unset = UNSET + source_type: ScenarioResponseSourceType | Unset = UNSET + source_type_display: str | Unset = UNSET + organization: UUID | Unset = UNSET + dataset: None | Unset | UUID = UNSET + dataset_rows: str | Unset = UNSET + dataset_column_config: str | Unset = UNSET + graph: str | Unset = UNSET + agent: str | Unset = UNSET + prompt_template: None | Unset | UUID = UNSET + prompt_template_detail: str | Unset = UNSET + prompt_version: None | Unset | UUID = UNSET + prompt_version_detail: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + deleted: bool | Unset = UNSET + status: ScenarioResponseStatus | Unset = UNSET + deleted_at: datetime.datetime | None | Unset = UNSET + agent_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + source = self.source + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + scenario_type: str | Unset = UNSET + if not isinstance(self.scenario_type, Unset): + scenario_type = self.scenario_type.value + + scenario_type_display = self.scenario_type_display + + source_type: str | Unset = UNSET + if not isinstance(self.source_type, Unset): + source_type = self.source_type.value + + source_type_display = self.source_type_display + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + dataset: None | str | Unset + if isinstance(self.dataset, Unset): + dataset = UNSET + elif isinstance(self.dataset, UUID): + dataset = str(self.dataset) + else: + dataset = self.dataset + + dataset_rows = self.dataset_rows + + dataset_column_config = self.dataset_column_config + + graph = self.graph + + agent = self.agent + + prompt_template: None | str | Unset + if isinstance(self.prompt_template, Unset): + prompt_template = UNSET + elif isinstance(self.prompt_template, UUID): + prompt_template = str(self.prompt_template) + else: + prompt_template = self.prompt_template + + prompt_template_detail = self.prompt_template_detail + + prompt_version: None | str | Unset + if isinstance(self.prompt_version, Unset): + prompt_version = UNSET + elif isinstance(self.prompt_version, UUID): + prompt_version = str(self.prompt_version) + else: + prompt_version = self.prompt_version + + prompt_version_detail = self.prompt_version_detail + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + deleted = self.deleted + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + deleted_at: None | str | Unset + if isinstance(self.deleted_at, Unset): + deleted_at = UNSET + elif isinstance(self.deleted_at, datetime.datetime): + deleted_at = self.deleted_at.isoformat() + else: + deleted_at = self.deleted_at + + agent_type = self.agent_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "source": source, + } + ) + if id is not UNSET: + field_dict["id"] = id + if description is not UNSET: + field_dict["description"] = description + if scenario_type is not UNSET: + field_dict["scenario_type"] = scenario_type + if scenario_type_display is not UNSET: + field_dict["scenario_type_display"] = scenario_type_display + if source_type is not UNSET: + field_dict["source_type"] = source_type + if source_type_display is not UNSET: + field_dict["source_type_display"] = source_type_display + if organization is not UNSET: + field_dict["organization"] = organization + if dataset is not UNSET: + field_dict["dataset"] = dataset + if dataset_rows is not UNSET: + field_dict["dataset_rows"] = dataset_rows + if dataset_column_config is not UNSET: + field_dict["dataset_column_config"] = dataset_column_config + if graph is not UNSET: + field_dict["graph"] = graph + if agent is not UNSET: + field_dict["agent"] = agent + if prompt_template is not UNSET: + field_dict["prompt_template"] = prompt_template + if prompt_template_detail is not UNSET: + field_dict["prompt_template_detail"] = prompt_template_detail + if prompt_version is not UNSET: + field_dict["prompt_version"] = prompt_version + if prompt_version_detail is not UNSET: + field_dict["prompt_version_detail"] = prompt_version_detail + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if deleted is not UNSET: + field_dict["deleted"] = deleted + if status is not UNSET: + field_dict["status"] = status + if deleted_at is not UNSET: + field_dict["deleted_at"] = deleted_at + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + source = d.pop("source") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + _scenario_type = d.pop("scenario_type", UNSET) + scenario_type: ScenarioResponseScenarioType | Unset + if isinstance(_scenario_type, Unset): + scenario_type = UNSET + else: + scenario_type = ScenarioResponseScenarioType(_scenario_type) + + scenario_type_display = d.pop("scenario_type_display", UNSET) + + _source_type = d.pop("source_type", UNSET) + source_type: ScenarioResponseSourceType | Unset + if isinstance(_source_type, Unset): + source_type = UNSET + else: + source_type = ScenarioResponseSourceType(_source_type) + + source_type_display = d.pop("source_type_display", UNSET) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + def _parse_dataset(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + dataset_type_0 = UUID(data) + + return dataset_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + dataset = _parse_dataset(d.pop("dataset", UNSET)) + + dataset_rows = d.pop("dataset_rows", UNSET) + + dataset_column_config = d.pop("dataset_column_config", UNSET) + + graph = d.pop("graph", UNSET) + + agent = d.pop("agent", UNSET) + + def _parse_prompt_template(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_template_type_0 = UUID(data) + + return prompt_template_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_template = _parse_prompt_template(d.pop("prompt_template", UNSET)) + + prompt_template_detail = d.pop("prompt_template_detail", UNSET) + + def _parse_prompt_version(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + prompt_version_type_0 = UUID(data) + + return prompt_version_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + prompt_version = _parse_prompt_version(d.pop("prompt_version", UNSET)) + + prompt_version_detail = d.pop("prompt_version_detail", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + deleted = d.pop("deleted", UNSET) + + _status = d.pop("status", UNSET) + status: ScenarioResponseStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = ScenarioResponseStatus(_status) + + def _parse_deleted_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + deleted_at_type_0 = isoparse(data) + + return deleted_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + deleted_at = _parse_deleted_at(d.pop("deleted_at", UNSET)) + + agent_type = d.pop("agent_type", UNSET) + + scenario_response = cls( + name=name, + source=source, + id=id, + description=description, + scenario_type=scenario_type, + scenario_type_display=scenario_type_display, + source_type=source_type, + source_type_display=source_type_display, + organization=organization, + dataset=dataset, + dataset_rows=dataset_rows, + dataset_column_config=dataset_column_config, + graph=graph, + agent=agent, + prompt_template=prompt_template, + prompt_template_detail=prompt_template_detail, + prompt_version=prompt_version, + prompt_version_detail=prompt_version_detail, + created_at=created_at, + updated_at=updated_at, + deleted=deleted, + status=status, + deleted_at=deleted_at, + agent_type=agent_type, + ) + + scenario_response.additional_properties = d + return scenario_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/scenario_response_scenario_type.py b/python/fi/generated/openapi_client/models/scenario_response_scenario_type.py new file mode 100644 index 0000000..5903c93 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_response_scenario_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ScenarioResponseScenarioType(str, Enum): + DATASET = "dataset" + GRAPH = "graph" + SCRIPT = "script" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_response_source_type.py b/python/fi/generated/openapi_client/models/scenario_response_source_type.py new file mode 100644 index 0000000..50e23c8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_response_source_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ScenarioResponseSourceType(str, Enum): + AGENT_DEFINITION = "agent_definition" + PROMPT = "prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/scenario_response_status.py b/python/fi/generated/openapi_client/models/scenario_response_status.py new file mode 100644 index 0000000..f397b9d --- /dev/null +++ b/python/fi/generated/openapi_client/models/scenario_response_status.py @@ -0,0 +1,24 @@ +from enum import Enum + + +class ScenarioResponseStatus(str, Enum): + CANCELLED = "Cancelled" + COMPLETED = "Completed" + DELETING = "Deleting" + EDITING = "Editing" + ERROR = "Error" + EXPERIMENTEVALUATION = "ExperimentEvaluation" + FAILED = "Failed" + INACTIVE = "Inactive" + NOTSTARTED = "NotStarted" + OPTIMIZATIONEVALUATION = "OptimizationEvaluation" + PARTIALCOMPLETED = "PartialCompleted" + PARTIALEXTRACTED = "PartialExtracted" + PARTIALRUN = "PartialRun" + PROCESSING = "Processing" + QUEUED = "Queued" + RUNNING = "Running" + UPLOADING = "Uploading" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/score.py b/python/fi/generated/openapi_client/models/score.py new file mode 100644 index 0000000..69f8fbe --- /dev/null +++ b/python/fi/generated/openapi_client/models/score.py @@ -0,0 +1,323 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.score_score_source import ScoreScoreSource +from ..models.score_source_type import ScoreSourceType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.score_label_settings import ScoreLabelSettings + from ..models.score_value import ScoreValue + + +T = TypeVar("T", bound="Score") + + +@_attrs_define +class Score: + """ + Attributes: + source_type (ScoreSourceType): + value (ScoreValue): + id (UUID | Unset): + source_id (str | Unset): + label_id (UUID | Unset): + label_name (str | Unset): + label_type (str | Unset): + label_settings (ScoreLabelSettings | Unset): + label_allow_notes (bool | Unset): + score_source (ScoreScoreSource | Unset): + notes (None | str | Unset): + annotator (None | Unset | UUID): + annotator_name (str | Unset): + annotator_email (str | Unset): + queue_item (None | Unset | UUID): + queue_id (str | Unset): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + """ + + source_type: ScoreSourceType + value: ScoreValue + id: UUID | Unset = UNSET + source_id: str | Unset = UNSET + label_id: UUID | Unset = UNSET + label_name: str | Unset = UNSET + label_type: str | Unset = UNSET + label_settings: ScoreLabelSettings | Unset = UNSET + label_allow_notes: bool | Unset = UNSET + score_source: ScoreScoreSource | Unset = UNSET + notes: None | str | Unset = UNSET + annotator: None | Unset | UUID = UNSET + annotator_name: str | Unset = UNSET + annotator_email: str | Unset = UNSET + queue_item: None | Unset | UUID = UNSET + queue_id: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source_type = self.source_type.value + + value = self.value.to_dict() + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + source_id = self.source_id + + label_id: str | Unset = UNSET + if not isinstance(self.label_id, Unset): + label_id = str(self.label_id) + + label_name = self.label_name + + label_type = self.label_type + + label_settings: dict[str, Any] | Unset = UNSET + if not isinstance(self.label_settings, Unset): + label_settings = self.label_settings.to_dict() + + label_allow_notes = self.label_allow_notes + + score_source: str | Unset = UNSET + if not isinstance(self.score_source, Unset): + score_source = self.score_source.value + + notes: None | str | Unset + if isinstance(self.notes, Unset): + notes = UNSET + else: + notes = self.notes + + annotator: None | str | Unset + if isinstance(self.annotator, Unset): + annotator = UNSET + elif isinstance(self.annotator, UUID): + annotator = str(self.annotator) + else: + annotator = self.annotator + + annotator_name = self.annotator_name + + annotator_email = self.annotator_email + + queue_item: None | str | Unset + if isinstance(self.queue_item, Unset): + queue_item = UNSET + elif isinstance(self.queue_item, UUID): + queue_item = str(self.queue_item) + else: + queue_item = self.queue_item + + queue_id = self.queue_id + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source_type": source_type, + "value": value, + } + ) + if id is not UNSET: + field_dict["id"] = id + if source_id is not UNSET: + field_dict["source_id"] = source_id + if label_id is not UNSET: + field_dict["label_id"] = label_id + if label_name is not UNSET: + field_dict["label_name"] = label_name + if label_type is not UNSET: + field_dict["label_type"] = label_type + if label_settings is not UNSET: + field_dict["label_settings"] = label_settings + if label_allow_notes is not UNSET: + field_dict["label_allow_notes"] = label_allow_notes + if score_source is not UNSET: + field_dict["score_source"] = score_source + if notes is not UNSET: + field_dict["notes"] = notes + if annotator is not UNSET: + field_dict["annotator"] = annotator + if annotator_name is not UNSET: + field_dict["annotator_name"] = annotator_name + if annotator_email is not UNSET: + field_dict["annotator_email"] = annotator_email + if queue_item is not UNSET: + field_dict["queue_item"] = queue_item + if queue_id is not UNSET: + field_dict["queue_id"] = queue_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.score_label_settings import ScoreLabelSettings + from ..models.score_value import ScoreValue + + d = dict(src_dict) + source_type = ScoreSourceType(d.pop("source_type")) + + value = ScoreValue.from_dict(d.pop("value")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + source_id = d.pop("source_id", UNSET) + + _label_id = d.pop("label_id", UNSET) + label_id: UUID | Unset + if isinstance(_label_id, Unset): + label_id = UNSET + else: + label_id = UUID(_label_id) + + label_name = d.pop("label_name", UNSET) + + label_type = d.pop("label_type", UNSET) + + _label_settings = d.pop("label_settings", UNSET) + label_settings: ScoreLabelSettings | Unset + if isinstance(_label_settings, Unset): + label_settings = UNSET + else: + label_settings = ScoreLabelSettings.from_dict(_label_settings) + + label_allow_notes = d.pop("label_allow_notes", UNSET) + + _score_source = d.pop("score_source", UNSET) + score_source: ScoreScoreSource | Unset + if isinstance(_score_source, Unset): + score_source = UNSET + else: + score_source = ScoreScoreSource(_score_source) + + def _parse_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + notes = _parse_notes(d.pop("notes", UNSET)) + + def _parse_annotator(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + annotator_type_0 = UUID(data) + + return annotator_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + annotator = _parse_annotator(d.pop("annotator", UNSET)) + + annotator_name = d.pop("annotator_name", UNSET) + + annotator_email = d.pop("annotator_email", UNSET) + + def _parse_queue_item(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + queue_item_type_0 = UUID(data) + + return queue_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + queue_item = _parse_queue_item(d.pop("queue_item", UNSET)) + + queue_id = d.pop("queue_id", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + score = cls( + source_type=source_type, + value=value, + id=id, + source_id=source_id, + label_id=label_id, + label_name=label_name, + label_type=label_type, + label_settings=label_settings, + label_allow_notes=label_allow_notes, + score_source=score_source, + notes=notes, + annotator=annotator, + annotator_name=annotator_name, + annotator_email=annotator_email, + queue_item=queue_item, + queue_id=queue_id, + created_at=created_at, + updated_at=updated_at, + ) + + score.additional_properties = d + return score + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_delete_response.py b/python/fi/generated/openapi_client/models/score_delete_response.py new file mode 100644 index 0000000..ca8ece1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_delete_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.score_delete_response_result import ScoreDeleteResponseResult + + +T = TypeVar("T", bound="ScoreDeleteResponse") + + +@_attrs_define +class ScoreDeleteResponse: + """ + Attributes: + result (ScoreDeleteResponseResult): + status (bool | Unset): Default: True. + """ + + result: ScoreDeleteResponseResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.score_delete_response_result import ScoreDeleteResponseResult + + d = dict(src_dict) + result = ScoreDeleteResponseResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + score_delete_response = cls( + result=result, + status=status, + ) + + score_delete_response.additional_properties = d + return score_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_delete_response_result.py b/python/fi/generated/openapi_client/models/score_delete_response_result.py new file mode 100644 index 0000000..daf202f --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_delete_response_result.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScoreDeleteResponseResult") + + +@_attrs_define +class ScoreDeleteResponseResult: + """ """ + + additional_properties: dict[str, bool] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + score_delete_response_result = cls() + + score_delete_response_result.additional_properties = d + return score_delete_response_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> bool: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: bool) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_for_source_response.py b/python/fi/generated/openapi_client/models/score_for_source_response.py new file mode 100644 index 0000000..b575207 --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_for_source_response.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.score import Score + from ..models.score_for_source_response_span_notes_item import ( + ScoreForSourceResponseSpanNotesItem, + ) + + +T = TypeVar("T", bound="ScoreForSourceResponse") + + +@_attrs_define +class ScoreForSourceResponse: + """ + Attributes: + result (list[Score]): + status (bool | Unset): Default: True. + span_notes (list[ScoreForSourceResponseSpanNotesItem] | Unset): + """ + + result: list[Score] + status: bool | Unset = True + span_notes: list[ScoreForSourceResponseSpanNotesItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + status = self.status + + span_notes: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.span_notes, Unset): + span_notes = [] + for span_notes_item_data in self.span_notes: + span_notes_item = span_notes_item_data.to_dict() + span_notes.append(span_notes_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + if span_notes is not UNSET: + field_dict["span_notes"] = span_notes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.score import Score + from ..models.score_for_source_response_span_notes_item import ( + ScoreForSourceResponseSpanNotesItem, + ) + + d = dict(src_dict) + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = Score.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + _span_notes = d.pop("span_notes", UNSET) + span_notes: list[ScoreForSourceResponseSpanNotesItem] | Unset = UNSET + if _span_notes is not UNSET: + span_notes = [] + for span_notes_item_data in _span_notes: + span_notes_item = ScoreForSourceResponseSpanNotesItem.from_dict( + span_notes_item_data + ) + + span_notes.append(span_notes_item) + + score_for_source_response = cls( + result=result, + status=status, + span_notes=span_notes, + ) + + score_for_source_response.additional_properties = d + return score_for_source_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_for_source_response_span_notes_item.py b/python/fi/generated/openapi_client/models/score_for_source_response_span_notes_item.py new file mode 100644 index 0000000..4489c3d --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_for_source_response_span_notes_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScoreForSourceResponseSpanNotesItem") + + +@_attrs_define +class ScoreForSourceResponseSpanNotesItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + score_for_source_response_span_notes_item = cls() + + score_for_source_response_span_notes_item.additional_properties = d + return score_for_source_response_span_notes_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_label_settings.py b/python/fi/generated/openapi_client/models/score_label_settings.py new file mode 100644 index 0000000..a2ec4ca --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_label_settings.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScoreLabelSettings") + + +@_attrs_define +class ScoreLabelSettings: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + score_label_settings = cls() + + score_label_settings.additional_properties = d + return score_label_settings + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_response.py b/python/fi/generated/openapi_client/models/score_response.py new file mode 100644 index 0000000..611a20a --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.score import Score + + +T = TypeVar("T", bound="ScoreResponse") + + +@_attrs_define +class ScoreResponse: + """ + Attributes: + result (Score): + status (bool | Unset): Default: True. + """ + + result: Score + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.score import Score + + d = dict(src_dict) + result = Score.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + score_response = cls( + result=result, + status=status, + ) + + score_response.additional_properties = d + return score_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_score_source.py b/python/fi/generated/openapi_client/models/score_score_source.py new file mode 100644 index 0000000..695a974 --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_score_source.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ScoreScoreSource(str, Enum): + API = "api" + AUTO = "auto" + HUMAN = "human" + IMPORTED = "imported" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/score_source_type.py b/python/fi/generated/openapi_client/models/score_source_type.py new file mode 100644 index 0000000..0835c4d --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_source_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ScoreSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + DATASET_ROW = "dataset_row" + OBSERVATION_SPAN = "observation_span" + PROTOTYPE_RUN = "prototype_run" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/score_trend.py b/python/fi/generated/openapi_client/models/score_trend.py new file mode 100644 index 0000000..78331cd --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_trend.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScoreTrend") + + +@_attrs_define +class ScoreTrend: + """ + Attributes: + label (str): + current (float): + prev (float): + sparkline (list[float]): + """ + + label: str + current: float + prev: float + sparkline: list[float] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label = self.label + + current = self.current + + prev = self.prev + + sparkline = self.sparkline + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label": label, + "current": current, + "prev": prev, + "sparkline": sparkline, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + label = d.pop("label") + + current = d.pop("current") + + prev = d.pop("prev") + + sparkline = cast(list[float], d.pop("sparkline")) + + score_trend = cls( + label=label, + current=current, + prev=prev, + sparkline=sparkline, + ) + + score_trend.additional_properties = d + return score_trend + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/score_value.py b/python/fi/generated/openapi_client/models/score_value.py new file mode 100644 index 0000000..9aaffa7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/score_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ScoreValue") + + +@_attrs_define +class ScoreValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + score_value = cls() + + score_value.additional_properties = d + return score_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_configure_evaluations_request.py b/python/fi/generated/openapi_client/models/sdk_configure_evaluations_request.py new file mode 100644 index 0000000..ba8b71c --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_configure_evaluations_request.py @@ -0,0 +1,117 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configure_evaluations import ConfigureEvaluations + from ..models.sdk_configure_evaluations_request_additional_property import ( + SDKConfigureEvaluationsRequestAdditionalProperty, + ) + + +T = TypeVar("T", bound="SDKConfigureEvaluationsRequest") + + +@_attrs_define +class SDKConfigureEvaluationsRequest: + """ + Attributes: + eval_config (ConfigureEvaluations): + platform (str): + custom_eval_name (None | str | Unset): + """ + + eval_config: ConfigureEvaluations + platform: str + custom_eval_name: None | str | Unset = UNSET + additional_properties: dict[ + str, SDKConfigureEvaluationsRequestAdditionalProperty + ] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_config = self.eval_config.to_dict() + + platform = self.platform + + custom_eval_name: None | str | Unset + if isinstance(self.custom_eval_name, Unset): + custom_eval_name = UNSET + else: + custom_eval_name = self.custom_eval_name + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + field_dict.update( + { + "eval_config": eval_config, + "platform": platform, + } + ) + if custom_eval_name is not UNSET: + field_dict["custom_eval_name"] = custom_eval_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configure_evaluations import ConfigureEvaluations + from ..models.sdk_configure_evaluations_request_additional_property import ( + SDKConfigureEvaluationsRequestAdditionalProperty, + ) + + d = dict(src_dict) + eval_config = ConfigureEvaluations.from_dict(d.pop("eval_config")) + + platform = d.pop("platform") + + def _parse_custom_eval_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + custom_eval_name = _parse_custom_eval_name(d.pop("custom_eval_name", UNSET)) + + sdk_configure_evaluations_request = cls( + eval_config=eval_config, + platform=platform, + custom_eval_name=custom_eval_name, + ) + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = ( + SDKConfigureEvaluationsRequestAdditionalProperty.from_dict(prop_dict) + ) + + additional_properties[prop_name] = additional_property + + sdk_configure_evaluations_request.additional_properties = additional_properties + return sdk_configure_evaluations_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> SDKConfigureEvaluationsRequestAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: SDKConfigureEvaluationsRequestAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_configure_evaluations_request_additional_property.py b/python/fi/generated/openapi_client/models/sdk_configure_evaluations_request_additional_property.py new file mode 100644 index 0000000..e8f1b94 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_configure_evaluations_request_additional_property.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKConfigureEvaluationsRequestAdditionalProperty") + + +@_attrs_define +class SDKConfigureEvaluationsRequestAdditionalProperty: + """Provider-specific credential fields accepted at top level.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_configure_evaluations_request_additional_property = cls() + + sdk_configure_evaluations_request_additional_property.additional_properties = d + return sdk_configure_evaluations_request_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_configure_evaluations_response.py b/python/fi/generated/openapi_client/models/sdk_configure_evaluations_response.py new file mode 100644 index 0000000..4509765 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_configure_evaluations_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_message_result import SDKMessageResult + + +T = TypeVar("T", bound="SDKConfigureEvaluationsResponse") + + +@_attrs_define +class SDKConfigureEvaluationsResponse: + """ + Attributes: + status (bool): + result (SDKMessageResult): + """ + + status: bool + result: SDKMessageResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_message_result import SDKMessageResult + + d = dict(src_dict) + status = d.pop("status") + + result = SDKMessageResult.from_dict(d.pop("result")) + + sdk_configure_evaluations_response = cls( + status=status, + result=result, + ) + + sdk_configure_evaluations_response.additional_properties = d + return sdk_configure_evaluations_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_error_response.py b/python/fi/generated/openapi_client/models/sdk_error_response.py new file mode 100644 index 0000000..eafd36c --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_error_response.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sdk_error_response_errors import SDKErrorResponseErrors + + +T = TypeVar("T", bound="SDKErrorResponse") + + +@_attrs_define +class SDKErrorResponse: + """ + Attributes: + status (bool): + result (None | str | Unset): + message (None | str | Unset): + errors (SDKErrorResponseErrors | Unset): + """ + + status: bool + result: None | str | Unset = UNSET + message: None | str | Unset = UNSET + errors: SDKErrorResponseErrors | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result: None | str | Unset + if isinstance(self.result, Unset): + result = UNSET + else: + result = self.result + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + errors: dict[str, Any] | Unset = UNSET + if not isinstance(self.errors, Unset): + errors = self.errors.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + } + ) + if result is not UNSET: + field_dict["result"] = result + if message is not UNSET: + field_dict["message"] = message + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_error_response_errors import SDKErrorResponseErrors + + d = dict(src_dict) + status = d.pop("status") + + def _parse_result(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + result = _parse_result(d.pop("result", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + _errors = d.pop("errors", UNSET) + errors: SDKErrorResponseErrors | Unset + if isinstance(_errors, Unset): + errors = UNSET + else: + errors = SDKErrorResponseErrors.from_dict(_errors) + + sdk_error_response = cls( + status=status, + result=result, + message=message, + errors=errors, + ) + + sdk_error_response.additional_properties = d + return sdk_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_error_response_errors.py b/python/fi/generated/openapi_client/models/sdk_error_response_errors.py new file mode 100644 index 0000000..73ee5f7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_error_response_errors.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKErrorResponseErrors") + + +@_attrs_define +class SDKErrorResponseErrors: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_error_response_errors = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + sdk_error_response_errors.additional_properties = additional_properties + return sdk_error_response_errors + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_eval_template.py b/python/fi/generated/openapi_client/models/sdk_eval_template.py new file mode 100644 index 0000000..afc9205 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_eval_template.py @@ -0,0 +1,223 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sdk_eval_template_choices import SDKEvalTemplateChoices + from ..models.sdk_eval_template_config import SDKEvalTemplateConfig + from ..models.sdk_eval_template_criteria import SDKEvalTemplateCriteria + from ..models.sdk_eval_template_eval_tags import SDKEvalTemplateEvalTags + + +T = TypeVar("T", bound="SDKEvalTemplate") + + +@_attrs_define +class SDKEvalTemplate: + """ + Attributes: + id (str): + name (str): + description (None | str): + organization (None | str): + owner (None | str): + eval_id (None | str): + eval_tags (SDKEvalTemplateEvalTags | Unset): + config (SDKEvalTemplateConfig | Unset): + criteria (SDKEvalTemplateCriteria | Unset): + choices (SDKEvalTemplateChoices | Unset): + multi_choice (bool | None | Unset): + """ + + id: str + name: str + description: None | str + organization: None | str + owner: None | str + eval_id: None | str + eval_tags: SDKEvalTemplateEvalTags | Unset = UNSET + config: SDKEvalTemplateConfig | Unset = UNSET + criteria: SDKEvalTemplateCriteria | Unset = UNSET + choices: SDKEvalTemplateChoices | Unset = UNSET + multi_choice: bool | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + description: None | str + description = self.description + + organization: None | str + organization = self.organization + + owner: None | str + owner = self.owner + + eval_id: None | str + eval_id = self.eval_id + + eval_tags: dict[str, Any] | Unset = UNSET + if not isinstance(self.eval_tags, Unset): + eval_tags = self.eval_tags.to_dict() + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + criteria: dict[str, Any] | Unset = UNSET + if not isinstance(self.criteria, Unset): + criteria = self.criteria.to_dict() + + choices: dict[str, Any] | Unset = UNSET + if not isinstance(self.choices, Unset): + choices = self.choices.to_dict() + + multi_choice: bool | None | Unset + if isinstance(self.multi_choice, Unset): + multi_choice = UNSET + else: + multi_choice = self.multi_choice + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "description": description, + "organization": organization, + "owner": owner, + "eval_id": eval_id, + } + ) + if eval_tags is not UNSET: + field_dict["eval_tags"] = eval_tags + if config is not UNSET: + field_dict["config"] = config + if criteria is not UNSET: + field_dict["criteria"] = criteria + if choices is not UNSET: + field_dict["choices"] = choices + if multi_choice is not UNSET: + field_dict["multi_choice"] = multi_choice + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_eval_template_choices import SDKEvalTemplateChoices + from ..models.sdk_eval_template_config import SDKEvalTemplateConfig + from ..models.sdk_eval_template_criteria import SDKEvalTemplateCriteria + from ..models.sdk_eval_template_eval_tags import SDKEvalTemplateEvalTags + + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + def _parse_description(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + description = _parse_description(d.pop("description")) + + def _parse_organization(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + organization = _parse_organization(d.pop("organization")) + + def _parse_owner(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + owner = _parse_owner(d.pop("owner")) + + def _parse_eval_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + eval_id = _parse_eval_id(d.pop("eval_id")) + + _eval_tags = d.pop("eval_tags", UNSET) + eval_tags: SDKEvalTemplateEvalTags | Unset + if isinstance(_eval_tags, Unset): + eval_tags = UNSET + else: + eval_tags = SDKEvalTemplateEvalTags.from_dict(_eval_tags) + + _config = d.pop("config", UNSET) + config: SDKEvalTemplateConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = SDKEvalTemplateConfig.from_dict(_config) + + _criteria = d.pop("criteria", UNSET) + criteria: SDKEvalTemplateCriteria | Unset + if isinstance(_criteria, Unset): + criteria = UNSET + else: + criteria = SDKEvalTemplateCriteria.from_dict(_criteria) + + _choices = d.pop("choices", UNSET) + choices: SDKEvalTemplateChoices | Unset + if isinstance(_choices, Unset): + choices = UNSET + else: + choices = SDKEvalTemplateChoices.from_dict(_choices) + + def _parse_multi_choice(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + multi_choice = _parse_multi_choice(d.pop("multi_choice", UNSET)) + + sdk_eval_template = cls( + id=id, + name=name, + description=description, + organization=organization, + owner=owner, + eval_id=eval_id, + eval_tags=eval_tags, + config=config, + criteria=criteria, + choices=choices, + multi_choice=multi_choice, + ) + + sdk_eval_template.additional_properties = d + return sdk_eval_template + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_eval_template_choices.py b/python/fi/generated/openapi_client/models/sdk_eval_template_choices.py new file mode 100644 index 0000000..70323cf --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_eval_template_choices.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKEvalTemplateChoices") + + +@_attrs_define +class SDKEvalTemplateChoices: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_eval_template_choices = cls() + + sdk_eval_template_choices.additional_properties = d + return sdk_eval_template_choices + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_eval_template_config.py b/python/fi/generated/openapi_client/models/sdk_eval_template_config.py new file mode 100644 index 0000000..96f37c2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_eval_template_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKEvalTemplateConfig") + + +@_attrs_define +class SDKEvalTemplateConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_eval_template_config = cls() + + sdk_eval_template_config.additional_properties = d + return sdk_eval_template_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_eval_template_criteria.py b/python/fi/generated/openapi_client/models/sdk_eval_template_criteria.py new file mode 100644 index 0000000..45402d4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_eval_template_criteria.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKEvalTemplateCriteria") + + +@_attrs_define +class SDKEvalTemplateCriteria: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_eval_template_criteria = cls() + + sdk_eval_template_criteria.additional_properties = d + return sdk_eval_template_criteria + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_eval_template_eval_tags.py b/python/fi/generated/openapi_client/models/sdk_eval_template_eval_tags.py new file mode 100644 index 0000000..7635fd7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_eval_template_eval_tags.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKEvalTemplateEvalTags") + + +@_attrs_define +class SDKEvalTemplateEvalTags: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_eval_template_eval_tags = cls() + + sdk_eval_template_eval_tags.additional_properties = d + return sdk_eval_template_eval_tags + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_eval_template_response.py b/python/fi/generated/openapi_client/models/sdk_eval_template_response.py new file mode 100644 index 0000000..212e76b --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_eval_template_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_eval_template import SDKEvalTemplate + + +T = TypeVar("T", bound="SDKEvalTemplateResponse") + + +@_attrs_define +class SDKEvalTemplateResponse: + """ + Attributes: + status (bool): + result (SDKEvalTemplate): + """ + + status: bool + result: SDKEvalTemplate + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_eval_template import SDKEvalTemplate + + d = dict(src_dict) + status = d.pop("status") + + result = SDKEvalTemplate.from_dict(d.pop("result")) + + sdk_eval_template_response = cls( + status=status, + result=result, + ) + + sdk_eval_template_response.additional_properties = d + return sdk_eval_template_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_get_evals_response.py b/python/fi/generated/openapi_client/models/sdk_get_evals_response.py new file mode 100644 index 0000000..672deaa --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_get_evals_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_eval_template import SDKEvalTemplate + + +T = TypeVar("T", bound="SDKGetEvalsResponse") + + +@_attrs_define +class SDKGetEvalsResponse: + """ + Attributes: + status (bool): + result (list[SDKEvalTemplate]): + """ + + status: bool + result: list[SDKEvalTemplate] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_eval_template import SDKEvalTemplate + + d = dict(src_dict) + status = d.pop("status") + + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = SDKEvalTemplate.from_dict(result_item_data) + + result.append(result_item) + + sdk_get_evals_response = cls( + status=status, + result=result, + ) + + sdk_get_evals_response.additional_properties = d + return sdk_get_evals_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_message_result.py b/python/fi/generated/openapi_client/models/sdk_message_result.py new file mode 100644 index 0000000..b38f3cb --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_message_result.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKMessageResult") + + +@_attrs_define +class SDKMessageResult: + """ + Attributes: + message (str): + """ + + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + sdk_message_result = cls( + message=message, + ) + + sdk_message_result.additional_properties = d + return sdk_message_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_analytics_response.py b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_response.py new file mode 100644 index 0000000..fa57950 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_simulation_analytics_result import SDKSimulationAnalyticsResult + + +T = TypeVar("T", bound="SDKSimulationAnalyticsResponse") + + +@_attrs_define +class SDKSimulationAnalyticsResponse: + """ + Attributes: + status (bool): + result (SDKSimulationAnalyticsResult): + """ + + status: bool + result: SDKSimulationAnalyticsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_simulation_analytics_result import ( + SDKSimulationAnalyticsResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = SDKSimulationAnalyticsResult.from_dict(d.pop("result")) + + sdk_simulation_analytics_response = cls( + status=status, + result=result, + ) + + sdk_simulation_analytics_response.additional_properties = d + return sdk_simulation_analytics_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result.py b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result.py new file mode 100644 index 0000000..0d949e9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result.py @@ -0,0 +1,212 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sdk_simulation_analytics_result_eval_averages import ( + SDKSimulationAnalyticsResultEvalAverages, + ) + from ..models.sdk_simulation_analytics_result_eval_explanation_summary import ( + SDKSimulationAnalyticsResultEvalExplanationSummary, + ) + from ..models.sdk_simulation_analytics_result_eval_results_item import ( + SDKSimulationAnalyticsResultEvalResultsItem, + ) + from ..models.sdk_simulation_analytics_result_system_summary import ( + SDKSimulationAnalyticsResultSystemSummary, + ) + + +T = TypeVar("T", bound="SDKSimulationAnalyticsResult") + + +@_attrs_define +class SDKSimulationAnalyticsResult: + """ + Attributes: + run_test_name (str): + eval_results (list[SDKSimulationAnalyticsResultEvalResultsItem]): + eval_averages (SDKSimulationAnalyticsResultEvalAverages): + system_summary (SDKSimulationAnalyticsResultSystemSummary): + execution_id (UUID | Unset): + status (str | Unset): + message (str | Unset): + eval_explanation_summary (SDKSimulationAnalyticsResultEvalExplanationSummary | Unset): + eval_explanation_summary_status (None | str | Unset): + """ + + run_test_name: str + eval_results: list[SDKSimulationAnalyticsResultEvalResultsItem] + eval_averages: SDKSimulationAnalyticsResultEvalAverages + system_summary: SDKSimulationAnalyticsResultSystemSummary + execution_id: UUID | Unset = UNSET + status: str | Unset = UNSET + message: str | Unset = UNSET + eval_explanation_summary: ( + SDKSimulationAnalyticsResultEvalExplanationSummary | Unset + ) = UNSET + eval_explanation_summary_status: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + run_test_name = self.run_test_name + + eval_results = [] + for eval_results_item_data in self.eval_results: + eval_results_item = eval_results_item_data.to_dict() + eval_results.append(eval_results_item) + + eval_averages = self.eval_averages.to_dict() + + system_summary = self.system_summary.to_dict() + + execution_id: str | Unset = UNSET + if not isinstance(self.execution_id, Unset): + execution_id = str(self.execution_id) + + status = self.status + + message = self.message + + eval_explanation_summary: dict[str, Any] | Unset = UNSET + if not isinstance(self.eval_explanation_summary, Unset): + eval_explanation_summary = self.eval_explanation_summary.to_dict() + + eval_explanation_summary_status: None | str | Unset + if isinstance(self.eval_explanation_summary_status, Unset): + eval_explanation_summary_status = UNSET + else: + eval_explanation_summary_status = self.eval_explanation_summary_status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "run_test_name": run_test_name, + "eval_results": eval_results, + "eval_averages": eval_averages, + "system_summary": system_summary, + } + ) + if execution_id is not UNSET: + field_dict["execution_id"] = execution_id + if status is not UNSET: + field_dict["status"] = status + if message is not UNSET: + field_dict["message"] = message + if eval_explanation_summary is not UNSET: + field_dict["eval_explanation_summary"] = eval_explanation_summary + if eval_explanation_summary_status is not UNSET: + field_dict["eval_explanation_summary_status"] = ( + eval_explanation_summary_status + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_simulation_analytics_result_eval_averages import ( + SDKSimulationAnalyticsResultEvalAverages, + ) + from ..models.sdk_simulation_analytics_result_eval_explanation_summary import ( + SDKSimulationAnalyticsResultEvalExplanationSummary, + ) + from ..models.sdk_simulation_analytics_result_eval_results_item import ( + SDKSimulationAnalyticsResultEvalResultsItem, + ) + from ..models.sdk_simulation_analytics_result_system_summary import ( + SDKSimulationAnalyticsResultSystemSummary, + ) + + d = dict(src_dict) + run_test_name = d.pop("run_test_name") + + eval_results = [] + _eval_results = d.pop("eval_results") + for eval_results_item_data in _eval_results: + eval_results_item = SDKSimulationAnalyticsResultEvalResultsItem.from_dict( + eval_results_item_data + ) + + eval_results.append(eval_results_item) + + eval_averages = SDKSimulationAnalyticsResultEvalAverages.from_dict( + d.pop("eval_averages") + ) + + system_summary = SDKSimulationAnalyticsResultSystemSummary.from_dict( + d.pop("system_summary") + ) + + _execution_id = d.pop("execution_id", UNSET) + execution_id: UUID | Unset + if isinstance(_execution_id, Unset): + execution_id = UNSET + else: + execution_id = UUID(_execution_id) + + status = d.pop("status", UNSET) + + message = d.pop("message", UNSET) + + _eval_explanation_summary = d.pop("eval_explanation_summary", UNSET) + eval_explanation_summary: ( + SDKSimulationAnalyticsResultEvalExplanationSummary | Unset + ) + if isinstance(_eval_explanation_summary, Unset): + eval_explanation_summary = UNSET + else: + eval_explanation_summary = ( + SDKSimulationAnalyticsResultEvalExplanationSummary.from_dict( + _eval_explanation_summary + ) + ) + + def _parse_eval_explanation_summary_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_explanation_summary_status = _parse_eval_explanation_summary_status( + d.pop("eval_explanation_summary_status", UNSET) + ) + + sdk_simulation_analytics_result = cls( + run_test_name=run_test_name, + eval_results=eval_results, + eval_averages=eval_averages, + system_summary=system_summary, + execution_id=execution_id, + status=status, + message=message, + eval_explanation_summary=eval_explanation_summary, + eval_explanation_summary_status=eval_explanation_summary_status, + ) + + sdk_simulation_analytics_result.additional_properties = d + return sdk_simulation_analytics_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_averages.py b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_averages.py new file mode 100644 index 0000000..7424679 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_averages.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationAnalyticsResultEvalAverages") + + +@_attrs_define +class SDKSimulationAnalyticsResultEvalAverages: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_analytics_result_eval_averages = cls() + + sdk_simulation_analytics_result_eval_averages.additional_properties = d + return sdk_simulation_analytics_result_eval_averages + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_explanation_summary.py b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_explanation_summary.py new file mode 100644 index 0000000..5277009 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_explanation_summary.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationAnalyticsResultEvalExplanationSummary") + + +@_attrs_define +class SDKSimulationAnalyticsResultEvalExplanationSummary: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_analytics_result_eval_explanation_summary = cls() + + sdk_simulation_analytics_result_eval_explanation_summary.additional_properties = d + return sdk_simulation_analytics_result_eval_explanation_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_results_item.py b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_results_item.py new file mode 100644 index 0000000..ca1208b --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_eval_results_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationAnalyticsResultEvalResultsItem") + + +@_attrs_define +class SDKSimulationAnalyticsResultEvalResultsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_analytics_result_eval_results_item = cls() + + sdk_simulation_analytics_result_eval_results_item.additional_properties = d + return sdk_simulation_analytics_result_eval_results_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_system_summary.py b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_system_summary.py new file mode 100644 index 0000000..e178705 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_analytics_result_system_summary.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationAnalyticsResultSystemSummary") + + +@_attrs_define +class SDKSimulationAnalyticsResultSystemSummary: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_analytics_result_system_summary = cls() + + sdk_simulation_analytics_result_system_summary.additional_properties = d + return sdk_simulation_analytics_result_system_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_metrics_response.py b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_response.py new file mode 100644 index 0000000..93c7a74 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_simulation_metrics_result import SDKSimulationMetricsResult + + +T = TypeVar("T", bound="SDKSimulationMetricsResponse") + + +@_attrs_define +class SDKSimulationMetricsResponse: + """ + Attributes: + status (bool): + result (SDKSimulationMetricsResult): + """ + + status: bool + result: SDKSimulationMetricsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_simulation_metrics_result import SDKSimulationMetricsResult + + d = dict(src_dict) + status = d.pop("status") + + result = SDKSimulationMetricsResult.from_dict(d.pop("result")) + + sdk_simulation_metrics_response = cls( + status=status, + result=result, + ) + + sdk_simulation_metrics_response.additional_properties = d + return sdk_simulation_metrics_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result.py b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result.py new file mode 100644 index 0000000..0716c5d --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result.py @@ -0,0 +1,371 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.execution_metrics import ExecutionMetrics + from ..models.sdk_simulation_metrics_result_chat_metrics import ( + SDKSimulationMetricsResultChatMetrics, + ) + from ..models.sdk_simulation_metrics_result_conversation import ( + SDKSimulationMetricsResultConversation, + ) + from ..models.sdk_simulation_metrics_result_cost import ( + SDKSimulationMetricsResultCost, + ) + from ..models.sdk_simulation_metrics_result_latency import ( + SDKSimulationMetricsResultLatency, + ) + from ..models.sdk_simulation_metrics_result_metrics import ( + SDKSimulationMetricsResultMetrics, + ) + + +T = TypeVar("T", bound="SDKSimulationMetricsResult") + + +@_attrs_define +class SDKSimulationMetricsResult: + """ + Attributes: + call_execution_id (UUID | Unset): + execution_id (UUID | Unset): + status (str | Unset): + duration_seconds (float | None | Unset): + started_at (datetime.datetime | None | Unset): + completed_at (datetime.datetime | None | Unset): + total_calls (int | Unset): + completed_calls (int | Unset): + failed_calls (int | Unset): + latency (SDKSimulationMetricsResultLatency | Unset): + cost (SDKSimulationMetricsResultCost | Unset): + conversation (SDKSimulationMetricsResultConversation | Unset): + chat_metrics (SDKSimulationMetricsResultChatMetrics | Unset): + metrics (SDKSimulationMetricsResultMetrics | Unset): + total_pages (int | Unset): + current_page (int | Unset): + count (int | Unset): + results (list[ExecutionMetrics] | Unset): + """ + + call_execution_id: UUID | Unset = UNSET + execution_id: UUID | Unset = UNSET + status: str | Unset = UNSET + duration_seconds: float | None | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + completed_at: datetime.datetime | None | Unset = UNSET + total_calls: int | Unset = UNSET + completed_calls: int | Unset = UNSET + failed_calls: int | Unset = UNSET + latency: SDKSimulationMetricsResultLatency | Unset = UNSET + cost: SDKSimulationMetricsResultCost | Unset = UNSET + conversation: SDKSimulationMetricsResultConversation | Unset = UNSET + chat_metrics: SDKSimulationMetricsResultChatMetrics | Unset = UNSET + metrics: SDKSimulationMetricsResultMetrics | Unset = UNSET + total_pages: int | Unset = UNSET + current_page: int | Unset = UNSET + count: int | Unset = UNSET + results: list[ExecutionMetrics] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id: str | Unset = UNSET + if not isinstance(self.call_execution_id, Unset): + call_execution_id = str(self.call_execution_id) + + execution_id: str | Unset = UNSET + if not isinstance(self.execution_id, Unset): + execution_id = str(self.execution_id) + + status = self.status + + duration_seconds: float | None | Unset + if isinstance(self.duration_seconds, Unset): + duration_seconds = UNSET + else: + duration_seconds = self.duration_seconds + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + elif isinstance(self.completed_at, datetime.datetime): + completed_at = self.completed_at.isoformat() + else: + completed_at = self.completed_at + + total_calls = self.total_calls + + completed_calls = self.completed_calls + + failed_calls = self.failed_calls + + latency: dict[str, Any] | Unset = UNSET + if not isinstance(self.latency, Unset): + latency = self.latency.to_dict() + + cost: dict[str, Any] | Unset = UNSET + if not isinstance(self.cost, Unset): + cost = self.cost.to_dict() + + conversation: dict[str, Any] | Unset = UNSET + if not isinstance(self.conversation, Unset): + conversation = self.conversation.to_dict() + + chat_metrics: dict[str, Any] | Unset = UNSET + if not isinstance(self.chat_metrics, Unset): + chat_metrics = self.chat_metrics.to_dict() + + metrics: dict[str, Any] | Unset = UNSET + if not isinstance(self.metrics, Unset): + metrics = self.metrics.to_dict() + + total_pages = self.total_pages + + current_page = self.current_page + + count = self.count + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if call_execution_id is not UNSET: + field_dict["call_execution_id"] = call_execution_id + if execution_id is not UNSET: + field_dict["execution_id"] = execution_id + if status is not UNSET: + field_dict["status"] = status + if duration_seconds is not UNSET: + field_dict["duration_seconds"] = duration_seconds + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if completed_calls is not UNSET: + field_dict["completed_calls"] = completed_calls + if failed_calls is not UNSET: + field_dict["failed_calls"] = failed_calls + if latency is not UNSET: + field_dict["latency"] = latency + if cost is not UNSET: + field_dict["cost"] = cost + if conversation is not UNSET: + field_dict["conversation"] = conversation + if chat_metrics is not UNSET: + field_dict["chat_metrics"] = chat_metrics + if metrics is not UNSET: + field_dict["metrics"] = metrics + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + if current_page is not UNSET: + field_dict["current_page"] = current_page + if count is not UNSET: + field_dict["count"] = count + if results is not UNSET: + field_dict["results"] = results + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.execution_metrics import ExecutionMetrics + from ..models.sdk_simulation_metrics_result_chat_metrics import ( + SDKSimulationMetricsResultChatMetrics, + ) + from ..models.sdk_simulation_metrics_result_conversation import ( + SDKSimulationMetricsResultConversation, + ) + from ..models.sdk_simulation_metrics_result_cost import ( + SDKSimulationMetricsResultCost, + ) + from ..models.sdk_simulation_metrics_result_latency import ( + SDKSimulationMetricsResultLatency, + ) + from ..models.sdk_simulation_metrics_result_metrics import ( + SDKSimulationMetricsResultMetrics, + ) + + d = dict(src_dict) + _call_execution_id = d.pop("call_execution_id", UNSET) + call_execution_id: UUID | Unset + if isinstance(_call_execution_id, Unset): + call_execution_id = UNSET + else: + call_execution_id = UUID(_call_execution_id) + + _execution_id = d.pop("execution_id", UNSET) + execution_id: UUID | Unset + if isinstance(_execution_id, Unset): + execution_id = UNSET + else: + execution_id = UUID(_execution_id) + + status = d.pop("status", UNSET) + + def _parse_duration_seconds(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + duration_seconds = _parse_duration_seconds(d.pop("duration_seconds", UNSET)) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_at_type_0 = isoparse(data) + + return completed_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + total_calls = d.pop("total_calls", UNSET) + + completed_calls = d.pop("completed_calls", UNSET) + + failed_calls = d.pop("failed_calls", UNSET) + + _latency = d.pop("latency", UNSET) + latency: SDKSimulationMetricsResultLatency | Unset + if isinstance(_latency, Unset): + latency = UNSET + else: + latency = SDKSimulationMetricsResultLatency.from_dict(_latency) + + _cost = d.pop("cost", UNSET) + cost: SDKSimulationMetricsResultCost | Unset + if isinstance(_cost, Unset): + cost = UNSET + else: + cost = SDKSimulationMetricsResultCost.from_dict(_cost) + + _conversation = d.pop("conversation", UNSET) + conversation: SDKSimulationMetricsResultConversation | Unset + if isinstance(_conversation, Unset): + conversation = UNSET + else: + conversation = SDKSimulationMetricsResultConversation.from_dict( + _conversation + ) + + _chat_metrics = d.pop("chat_metrics", UNSET) + chat_metrics: SDKSimulationMetricsResultChatMetrics | Unset + if isinstance(_chat_metrics, Unset): + chat_metrics = UNSET + else: + chat_metrics = SDKSimulationMetricsResultChatMetrics.from_dict( + _chat_metrics + ) + + _metrics = d.pop("metrics", UNSET) + metrics: SDKSimulationMetricsResultMetrics | Unset + if isinstance(_metrics, Unset): + metrics = UNSET + else: + metrics = SDKSimulationMetricsResultMetrics.from_dict(_metrics) + + total_pages = d.pop("total_pages", UNSET) + + current_page = d.pop("current_page", UNSET) + + count = d.pop("count", UNSET) + + _results = d.pop("results", UNSET) + results: list[ExecutionMetrics] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = ExecutionMetrics.from_dict(results_item_data) + + results.append(results_item) + + sdk_simulation_metrics_result = cls( + call_execution_id=call_execution_id, + execution_id=execution_id, + status=status, + duration_seconds=duration_seconds, + started_at=started_at, + completed_at=completed_at, + total_calls=total_calls, + completed_calls=completed_calls, + failed_calls=failed_calls, + latency=latency, + cost=cost, + conversation=conversation, + chat_metrics=chat_metrics, + metrics=metrics, + total_pages=total_pages, + current_page=current_page, + count=count, + results=results, + ) + + sdk_simulation_metrics_result.additional_properties = d + return sdk_simulation_metrics_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_chat_metrics.py b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_chat_metrics.py new file mode 100644 index 0000000..a5f0809 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_chat_metrics.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationMetricsResultChatMetrics") + + +@_attrs_define +class SDKSimulationMetricsResultChatMetrics: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_metrics_result_chat_metrics = cls() + + sdk_simulation_metrics_result_chat_metrics.additional_properties = d + return sdk_simulation_metrics_result_chat_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_conversation.py b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_conversation.py new file mode 100644 index 0000000..f53cf70 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_conversation.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationMetricsResultConversation") + + +@_attrs_define +class SDKSimulationMetricsResultConversation: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_metrics_result_conversation = cls() + + sdk_simulation_metrics_result_conversation.additional_properties = d + return sdk_simulation_metrics_result_conversation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_cost.py b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_cost.py new file mode 100644 index 0000000..35bf5a7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_cost.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationMetricsResultCost") + + +@_attrs_define +class SDKSimulationMetricsResultCost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_metrics_result_cost = cls() + + sdk_simulation_metrics_result_cost.additional_properties = d + return sdk_simulation_metrics_result_cost + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_latency.py b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_latency.py new file mode 100644 index 0000000..c1842a3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_latency.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationMetricsResultLatency") + + +@_attrs_define +class SDKSimulationMetricsResultLatency: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_metrics_result_latency = cls() + + sdk_simulation_metrics_result_latency.additional_properties = d + return sdk_simulation_metrics_result_latency + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_metrics.py b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_metrics.py new file mode 100644 index 0000000..250a5a5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_metrics_result_metrics.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationMetricsResultMetrics") + + +@_attrs_define +class SDKSimulationMetricsResultMetrics: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_metrics_result_metrics = cls() + + sdk_simulation_metrics_result_metrics.additional_properties = d + return sdk_simulation_metrics_result_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_response.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_response.py new file mode 100644 index 0000000..a54df21 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_simulation_runs_result import SDKSimulationRunsResult + + +T = TypeVar("T", bound="SDKSimulationRunsResponse") + + +@_attrs_define +class SDKSimulationRunsResponse: + """ + Attributes: + status (bool): + result (SDKSimulationRunsResult): + """ + + status: bool + result: SDKSimulationRunsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_simulation_runs_result import SDKSimulationRunsResult + + d = dict(src_dict) + status = d.pop("status") + + result = SDKSimulationRunsResult.from_dict(d.pop("result")) + + sdk_simulation_runs_response = cls( + status=status, + result=result, + ) + + sdk_simulation_runs_response.additional_properties = d + return sdk_simulation_runs_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_result.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result.py new file mode 100644 index 0000000..7ebbcaa --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result.py @@ -0,0 +1,487 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.execution_runs import ExecutionRuns + from ..models.sdk_simulation_runs_result_call_results import ( + SDKSimulationRunsResultCallResults, + ) + from ..models.sdk_simulation_runs_result_cost import SDKSimulationRunsResultCost + from ..models.sdk_simulation_runs_result_eval_explanation_summary import ( + SDKSimulationRunsResultEvalExplanationSummary, + ) + from ..models.sdk_simulation_runs_result_eval_outputs import ( + SDKSimulationRunsResultEvalOutputs, + ) + from ..models.sdk_simulation_runs_result_eval_results_item import ( + SDKSimulationRunsResultEvalResultsItem, + ) + from ..models.sdk_simulation_runs_result_latency import ( + SDKSimulationRunsResultLatency, + ) + + +T = TypeVar("T", bound="SDKSimulationRunsResult") + + +@_attrs_define +class SDKSimulationRunsResult: + """ + Attributes: + call_execution_id (UUID | Unset): + execution_id (UUID | Unset): + scenario_id (UUID | Unset): + scenario_name (str | Unset): + status (str | Unset): + started_at (datetime.datetime | None | Unset): + completed_at (datetime.datetime | None | Unset): + duration_seconds (float | None | Unset): + ended_reason (None | str | Unset): + call_summary (None | str | Unset): + total_calls (int | Unset): + completed_calls (int | Unset): + failed_calls (int | Unset): + eval_outputs (SDKSimulationRunsResultEvalOutputs | Unset): + eval_results (list[SDKSimulationRunsResultEvalResultsItem] | Unset): + latency (SDKSimulationRunsResultLatency | Unset): + cost (SDKSimulationRunsResultCost | Unset): + call_results (SDKSimulationRunsResultCallResults | Unset): + eval_explanation_summary (SDKSimulationRunsResultEvalExplanationSummary | Unset): + eval_explanation_summary_status (None | str | Unset): + total_pages (int | Unset): + current_page (int | Unset): + count (int | Unset): + results (list[ExecutionRuns] | Unset): + """ + + call_execution_id: UUID | Unset = UNSET + execution_id: UUID | Unset = UNSET + scenario_id: UUID | Unset = UNSET + scenario_name: str | Unset = UNSET + status: str | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + completed_at: datetime.datetime | None | Unset = UNSET + duration_seconds: float | None | Unset = UNSET + ended_reason: None | str | Unset = UNSET + call_summary: None | str | Unset = UNSET + total_calls: int | Unset = UNSET + completed_calls: int | Unset = UNSET + failed_calls: int | Unset = UNSET + eval_outputs: SDKSimulationRunsResultEvalOutputs | Unset = UNSET + eval_results: list[SDKSimulationRunsResultEvalResultsItem] | Unset = UNSET + latency: SDKSimulationRunsResultLatency | Unset = UNSET + cost: SDKSimulationRunsResultCost | Unset = UNSET + call_results: SDKSimulationRunsResultCallResults | Unset = UNSET + eval_explanation_summary: SDKSimulationRunsResultEvalExplanationSummary | Unset = ( + UNSET + ) + eval_explanation_summary_status: None | str | Unset = UNSET + total_pages: int | Unset = UNSET + current_page: int | Unset = UNSET + count: int | Unset = UNSET + results: list[ExecutionRuns] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id: str | Unset = UNSET + if not isinstance(self.call_execution_id, Unset): + call_execution_id = str(self.call_execution_id) + + execution_id: str | Unset = UNSET + if not isinstance(self.execution_id, Unset): + execution_id = str(self.execution_id) + + scenario_id: str | Unset = UNSET + if not isinstance(self.scenario_id, Unset): + scenario_id = str(self.scenario_id) + + scenario_name = self.scenario_name + + status = self.status + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + elif isinstance(self.completed_at, datetime.datetime): + completed_at = self.completed_at.isoformat() + else: + completed_at = self.completed_at + + duration_seconds: float | None | Unset + if isinstance(self.duration_seconds, Unset): + duration_seconds = UNSET + else: + duration_seconds = self.duration_seconds + + ended_reason: None | str | Unset + if isinstance(self.ended_reason, Unset): + ended_reason = UNSET + else: + ended_reason = self.ended_reason + + call_summary: None | str | Unset + if isinstance(self.call_summary, Unset): + call_summary = UNSET + else: + call_summary = self.call_summary + + total_calls = self.total_calls + + completed_calls = self.completed_calls + + failed_calls = self.failed_calls + + eval_outputs: dict[str, Any] | Unset = UNSET + if not isinstance(self.eval_outputs, Unset): + eval_outputs = self.eval_outputs.to_dict() + + eval_results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.eval_results, Unset): + eval_results = [] + for eval_results_item_data in self.eval_results: + eval_results_item = eval_results_item_data.to_dict() + eval_results.append(eval_results_item) + + latency: dict[str, Any] | Unset = UNSET + if not isinstance(self.latency, Unset): + latency = self.latency.to_dict() + + cost: dict[str, Any] | Unset = UNSET + if not isinstance(self.cost, Unset): + cost = self.cost.to_dict() + + call_results: dict[str, Any] | Unset = UNSET + if not isinstance(self.call_results, Unset): + call_results = self.call_results.to_dict() + + eval_explanation_summary: dict[str, Any] | Unset = UNSET + if not isinstance(self.eval_explanation_summary, Unset): + eval_explanation_summary = self.eval_explanation_summary.to_dict() + + eval_explanation_summary_status: None | str | Unset + if isinstance(self.eval_explanation_summary_status, Unset): + eval_explanation_summary_status = UNSET + else: + eval_explanation_summary_status = self.eval_explanation_summary_status + + total_pages = self.total_pages + + current_page = self.current_page + + count = self.count + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if call_execution_id is not UNSET: + field_dict["call_execution_id"] = call_execution_id + if execution_id is not UNSET: + field_dict["execution_id"] = execution_id + if scenario_id is not UNSET: + field_dict["scenario_id"] = scenario_id + if scenario_name is not UNSET: + field_dict["scenario_name"] = scenario_name + if status is not UNSET: + field_dict["status"] = status + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if duration_seconds is not UNSET: + field_dict["duration_seconds"] = duration_seconds + if ended_reason is not UNSET: + field_dict["ended_reason"] = ended_reason + if call_summary is not UNSET: + field_dict["call_summary"] = call_summary + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if completed_calls is not UNSET: + field_dict["completed_calls"] = completed_calls + if failed_calls is not UNSET: + field_dict["failed_calls"] = failed_calls + if eval_outputs is not UNSET: + field_dict["eval_outputs"] = eval_outputs + if eval_results is not UNSET: + field_dict["eval_results"] = eval_results + if latency is not UNSET: + field_dict["latency"] = latency + if cost is not UNSET: + field_dict["cost"] = cost + if call_results is not UNSET: + field_dict["call_results"] = call_results + if eval_explanation_summary is not UNSET: + field_dict["eval_explanation_summary"] = eval_explanation_summary + if eval_explanation_summary_status is not UNSET: + field_dict["eval_explanation_summary_status"] = ( + eval_explanation_summary_status + ) + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + if current_page is not UNSET: + field_dict["current_page"] = current_page + if count is not UNSET: + field_dict["count"] = count + if results is not UNSET: + field_dict["results"] = results + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.execution_runs import ExecutionRuns + from ..models.sdk_simulation_runs_result_call_results import ( + SDKSimulationRunsResultCallResults, + ) + from ..models.sdk_simulation_runs_result_cost import SDKSimulationRunsResultCost + from ..models.sdk_simulation_runs_result_eval_explanation_summary import ( + SDKSimulationRunsResultEvalExplanationSummary, + ) + from ..models.sdk_simulation_runs_result_eval_outputs import ( + SDKSimulationRunsResultEvalOutputs, + ) + from ..models.sdk_simulation_runs_result_eval_results_item import ( + SDKSimulationRunsResultEvalResultsItem, + ) + from ..models.sdk_simulation_runs_result_latency import ( + SDKSimulationRunsResultLatency, + ) + + d = dict(src_dict) + _call_execution_id = d.pop("call_execution_id", UNSET) + call_execution_id: UUID | Unset + if isinstance(_call_execution_id, Unset): + call_execution_id = UNSET + else: + call_execution_id = UUID(_call_execution_id) + + _execution_id = d.pop("execution_id", UNSET) + execution_id: UUID | Unset + if isinstance(_execution_id, Unset): + execution_id = UNSET + else: + execution_id = UUID(_execution_id) + + _scenario_id = d.pop("scenario_id", UNSET) + scenario_id: UUID | Unset + if isinstance(_scenario_id, Unset): + scenario_id = UNSET + else: + scenario_id = UUID(_scenario_id) + + scenario_name = d.pop("scenario_name", UNSET) + + status = d.pop("status", UNSET) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_at_type_0 = isoparse(data) + + return completed_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + def _parse_duration_seconds(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + duration_seconds = _parse_duration_seconds(d.pop("duration_seconds", UNSET)) + + def _parse_ended_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ended_reason = _parse_ended_reason(d.pop("ended_reason", UNSET)) + + def _parse_call_summary(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + call_summary = _parse_call_summary(d.pop("call_summary", UNSET)) + + total_calls = d.pop("total_calls", UNSET) + + completed_calls = d.pop("completed_calls", UNSET) + + failed_calls = d.pop("failed_calls", UNSET) + + _eval_outputs = d.pop("eval_outputs", UNSET) + eval_outputs: SDKSimulationRunsResultEvalOutputs | Unset + if isinstance(_eval_outputs, Unset): + eval_outputs = UNSET + else: + eval_outputs = SDKSimulationRunsResultEvalOutputs.from_dict(_eval_outputs) + + _eval_results = d.pop("eval_results", UNSET) + eval_results: list[SDKSimulationRunsResultEvalResultsItem] | Unset = UNSET + if _eval_results is not UNSET: + eval_results = [] + for eval_results_item_data in _eval_results: + eval_results_item = SDKSimulationRunsResultEvalResultsItem.from_dict( + eval_results_item_data + ) + + eval_results.append(eval_results_item) + + _latency = d.pop("latency", UNSET) + latency: SDKSimulationRunsResultLatency | Unset + if isinstance(_latency, Unset): + latency = UNSET + else: + latency = SDKSimulationRunsResultLatency.from_dict(_latency) + + _cost = d.pop("cost", UNSET) + cost: SDKSimulationRunsResultCost | Unset + if isinstance(_cost, Unset): + cost = UNSET + else: + cost = SDKSimulationRunsResultCost.from_dict(_cost) + + _call_results = d.pop("call_results", UNSET) + call_results: SDKSimulationRunsResultCallResults | Unset + if isinstance(_call_results, Unset): + call_results = UNSET + else: + call_results = SDKSimulationRunsResultCallResults.from_dict(_call_results) + + _eval_explanation_summary = d.pop("eval_explanation_summary", UNSET) + eval_explanation_summary: SDKSimulationRunsResultEvalExplanationSummary | Unset + if isinstance(_eval_explanation_summary, Unset): + eval_explanation_summary = UNSET + else: + eval_explanation_summary = ( + SDKSimulationRunsResultEvalExplanationSummary.from_dict( + _eval_explanation_summary + ) + ) + + def _parse_eval_explanation_summary_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_explanation_summary_status = _parse_eval_explanation_summary_status( + d.pop("eval_explanation_summary_status", UNSET) + ) + + total_pages = d.pop("total_pages", UNSET) + + current_page = d.pop("current_page", UNSET) + + count = d.pop("count", UNSET) + + _results = d.pop("results", UNSET) + results: list[ExecutionRuns] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = ExecutionRuns.from_dict(results_item_data) + + results.append(results_item) + + sdk_simulation_runs_result = cls( + call_execution_id=call_execution_id, + execution_id=execution_id, + scenario_id=scenario_id, + scenario_name=scenario_name, + status=status, + started_at=started_at, + completed_at=completed_at, + duration_seconds=duration_seconds, + ended_reason=ended_reason, + call_summary=call_summary, + total_calls=total_calls, + completed_calls=completed_calls, + failed_calls=failed_calls, + eval_outputs=eval_outputs, + eval_results=eval_results, + latency=latency, + cost=cost, + call_results=call_results, + eval_explanation_summary=eval_explanation_summary, + eval_explanation_summary_status=eval_explanation_summary_status, + total_pages=total_pages, + current_page=current_page, + count=count, + results=results, + ) + + sdk_simulation_runs_result.additional_properties = d + return sdk_simulation_runs_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_call_results.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_call_results.py new file mode 100644 index 0000000..2cc7523 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_call_results.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationRunsResultCallResults") + + +@_attrs_define +class SDKSimulationRunsResultCallResults: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_runs_result_call_results = cls() + + sdk_simulation_runs_result_call_results.additional_properties = d + return sdk_simulation_runs_result_call_results + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_cost.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_cost.py new file mode 100644 index 0000000..9e1dc31 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_cost.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationRunsResultCost") + + +@_attrs_define +class SDKSimulationRunsResultCost: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_runs_result_cost = cls() + + sdk_simulation_runs_result_cost.additional_properties = d + return sdk_simulation_runs_result_cost + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_explanation_summary.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_explanation_summary.py new file mode 100644 index 0000000..0ccb1e5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_explanation_summary.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationRunsResultEvalExplanationSummary") + + +@_attrs_define +class SDKSimulationRunsResultEvalExplanationSummary: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_runs_result_eval_explanation_summary = cls() + + sdk_simulation_runs_result_eval_explanation_summary.additional_properties = d + return sdk_simulation_runs_result_eval_explanation_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_outputs.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_outputs.py new file mode 100644 index 0000000..ef53b56 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_outputs.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationRunsResultEvalOutputs") + + +@_attrs_define +class SDKSimulationRunsResultEvalOutputs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_runs_result_eval_outputs = cls() + + sdk_simulation_runs_result_eval_outputs.additional_properties = d + return sdk_simulation_runs_result_eval_outputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_results_item.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_results_item.py new file mode 100644 index 0000000..bb2770f --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_eval_results_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationRunsResultEvalResultsItem") + + +@_attrs_define +class SDKSimulationRunsResultEvalResultsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_runs_result_eval_results_item = cls() + + sdk_simulation_runs_result_eval_results_item.additional_properties = d + return sdk_simulation_runs_result_eval_results_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_latency.py b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_latency.py new file mode 100644 index 0000000..904342c --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_simulation_runs_result_latency.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKSimulationRunsResultLatency") + + +@_attrs_define +class SDKSimulationRunsResultLatency: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_simulation_runs_result_latency = cls() + + sdk_simulation_runs_result_latency.additional_properties = d + return sdk_simulation_runs_result_latency + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_input.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_input.py new file mode 100644 index 0000000..3025380 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_input.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sdk_standalone_eval_input_additional_property import ( + SDKStandaloneEvalInputAdditionalProperty, + ) + + +T = TypeVar("T", bound="SDKStandaloneEvalInput") + + +@_attrs_define +class SDKStandaloneEvalInput: + """ + Attributes: + input_ (str | Unset): + max_tokens (int | Unset): + """ + + input_: str | Unset = UNSET + max_tokens: int | Unset = UNSET + additional_properties: dict[str, SDKStandaloneEvalInputAdditionalProperty] = ( + _attrs_field(init=False, factory=dict) + ) + + def to_dict(self) -> dict[str, Any]: + input_ = self.input_ + + max_tokens = self.max_tokens + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + if input_ is not UNSET: + field_dict["input"] = input_ + if max_tokens is not UNSET: + field_dict["max_tokens"] = max_tokens + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_standalone_eval_input_additional_property import ( + SDKStandaloneEvalInputAdditionalProperty, + ) + + d = dict(src_dict) + input_ = d.pop("input", UNSET) + + max_tokens = d.pop("max_tokens", UNSET) + + sdk_standalone_eval_input = cls( + input_=input_, + max_tokens=max_tokens, + ) + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = SDKStandaloneEvalInputAdditionalProperty.from_dict( + prop_dict + ) + + additional_properties[prop_name] = additional_property + + sdk_standalone_eval_input.additional_properties = additional_properties + return sdk_standalone_eval_input + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> SDKStandaloneEvalInputAdditionalProperty: + return self.additional_properties[key] + + def __setitem__( + self, key: str, value: SDKStandaloneEvalInputAdditionalProperty + ) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_input_additional_property.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_input_additional_property.py new file mode 100644 index 0000000..e008157 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_input_additional_property.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKStandaloneEvalInputAdditionalProperty") + + +@_attrs_define +class SDKStandaloneEvalInputAdditionalProperty: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_standalone_eval_input_additional_property = cls() + + sdk_standalone_eval_input_additional_property.additional_properties = d + return sdk_standalone_eval_input_additional_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_request.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_request.py new file mode 100644 index 0000000..a3b774b --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_request.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sdk_standalone_eval_input import SDKStandaloneEvalInput + from ..models.sdk_standalone_eval_request_config import ( + SDKStandaloneEvalRequestConfig, + ) + + +T = TypeVar("T", bound="SDKStandaloneEvalRequest") + + +@_attrs_define +class SDKStandaloneEvalRequest: + """ + Attributes: + inputs (list[SDKStandaloneEvalInput]): + config (SDKStandaloneEvalRequestConfig): + protect_flash (bool | Unset): Default: False. + """ + + inputs: list[SDKStandaloneEvalInput] + config: SDKStandaloneEvalRequestConfig + protect_flash: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + inputs = [] + for inputs_item_data in self.inputs: + inputs_item = inputs_item_data.to_dict() + inputs.append(inputs_item) + + config = self.config.to_dict() + + protect_flash = self.protect_flash + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "inputs": inputs, + "config": config, + } + ) + if protect_flash is not UNSET: + field_dict["protect_flash"] = protect_flash + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_standalone_eval_input import SDKStandaloneEvalInput + from ..models.sdk_standalone_eval_request_config import ( + SDKStandaloneEvalRequestConfig, + ) + + d = dict(src_dict) + inputs = [] + _inputs = d.pop("inputs") + for inputs_item_data in _inputs: + inputs_item = SDKStandaloneEvalInput.from_dict(inputs_item_data) + + inputs.append(inputs_item) + + config = SDKStandaloneEvalRequestConfig.from_dict(d.pop("config")) + + protect_flash = d.pop("protect_flash", UNSET) + + sdk_standalone_eval_request = cls( + inputs=inputs, + config=config, + protect_flash=protect_flash, + ) + + sdk_standalone_eval_request.additional_properties = d + return sdk_standalone_eval_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_request_config.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_request_config.py new file mode 100644 index 0000000..b39bdf3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_request_config.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKStandaloneEvalRequestConfig") + + +@_attrs_define +class SDKStandaloneEvalRequestConfig: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_standalone_eval_request_config = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + sdk_standalone_eval_request_config.additional_properties = additional_properties + return sdk_standalone_eval_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_response.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_response.py new file mode 100644 index 0000000..56fedcb --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_response.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_standalone_eval_result_item import SDKStandaloneEvalResultItem + + +T = TypeVar("T", bound="SDKStandaloneEvalResponse") + + +@_attrs_define +class SDKStandaloneEvalResponse: + """ + Attributes: + status (bool): + result (list[SDKStandaloneEvalResultItem]): + """ + + status: bool + result: list[SDKStandaloneEvalResultItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_standalone_eval_result_item import SDKStandaloneEvalResultItem + + d = dict(src_dict) + status = d.pop("status") + + result = [] + _result = d.pop("result") + for result_item_data in _result: + result_item = SDKStandaloneEvalResultItem.from_dict(result_item_data) + + result.append(result_item) + + sdk_standalone_eval_response = cls( + status=status, + result=result, + ) + + sdk_standalone_eval_response.additional_properties = d + return sdk_standalone_eval_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item.py new file mode 100644 index 0000000..dcb551e --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_standalone_eval_result_item_evaluations_item import ( + SDKStandaloneEvalResultItemEvaluationsItem, + ) + + +T = TypeVar("T", bound="SDKStandaloneEvalResultItem") + + +@_attrs_define +class SDKStandaloneEvalResultItem: + """ + Attributes: + evaluations (list[SDKStandaloneEvalResultItemEvaluationsItem]): + """ + + evaluations: list[SDKStandaloneEvalResultItemEvaluationsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + evaluations = [] + for evaluations_item_data in self.evaluations: + evaluations_item = evaluations_item_data.to_dict() + evaluations.append(evaluations_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "evaluations": evaluations, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_standalone_eval_result_item_evaluations_item import ( + SDKStandaloneEvalResultItemEvaluationsItem, + ) + + d = dict(src_dict) + evaluations = [] + _evaluations = d.pop("evaluations") + for evaluations_item_data in _evaluations: + evaluations_item = SDKStandaloneEvalResultItemEvaluationsItem.from_dict( + evaluations_item_data + ) + + evaluations.append(evaluations_item) + + sdk_standalone_eval_result_item = cls( + evaluations=evaluations, + ) + + sdk_standalone_eval_result_item.additional_properties = d + return sdk_standalone_eval_result_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item_evaluations_item.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item_evaluations_item.py new file mode 100644 index 0000000..a70e963 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_result_item_evaluations_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKStandaloneEvalResultItemEvaluationsItem") + + +@_attrs_define +class SDKStandaloneEvalResultItemEvaluationsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_standalone_eval_result_item_evaluations_item = cls() + + sdk_standalone_eval_result_item_evaluations_item.additional_properties = d + return sdk_standalone_eval_result_item_evaluations_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request.py new file mode 100644 index 0000000..eeacb45 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request.py @@ -0,0 +1,190 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sdk_standalone_eval_v2_request_config import ( + SDKStandaloneEvalV2RequestConfig, + ) + from ..models.sdk_standalone_eval_v2_request_inputs import ( + SDKStandaloneEvalV2RequestInputs, + ) + + +T = TypeVar("T", bound="SDKStandaloneEvalV2Request") + + +@_attrs_define +class SDKStandaloneEvalV2Request: + """ + Attributes: + eval_name (str): + inputs (SDKStandaloneEvalV2RequestInputs): + model (None | str | Unset): + span_id (None | str | Unset): + custom_eval_name (None | str | Unset): + trace_eval (bool | Unset): Default: False. + is_async (bool | Unset): Default: False. + error_localizer (bool | Unset): Default: False. + config (SDKStandaloneEvalV2RequestConfig | Unset): + """ + + eval_name: str + inputs: SDKStandaloneEvalV2RequestInputs + model: None | str | Unset = UNSET + span_id: None | str | Unset = UNSET + custom_eval_name: None | str | Unset = UNSET + trace_eval: bool | Unset = False + is_async: bool | Unset = False + error_localizer: bool | Unset = False + config: SDKStandaloneEvalV2RequestConfig | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_name = self.eval_name + + inputs = self.inputs.to_dict() + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + span_id: None | str | Unset + if isinstance(self.span_id, Unset): + span_id = UNSET + else: + span_id = self.span_id + + custom_eval_name: None | str | Unset + if isinstance(self.custom_eval_name, Unset): + custom_eval_name = UNSET + else: + custom_eval_name = self.custom_eval_name + + trace_eval = self.trace_eval + + is_async = self.is_async + + error_localizer = self.error_localizer + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_name": eval_name, + "inputs": inputs, + } + ) + if model is not UNSET: + field_dict["model"] = model + if span_id is not UNSET: + field_dict["span_id"] = span_id + if custom_eval_name is not UNSET: + field_dict["custom_eval_name"] = custom_eval_name + if trace_eval is not UNSET: + field_dict["trace_eval"] = trace_eval + if is_async is not UNSET: + field_dict["is_async"] = is_async + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if config is not UNSET: + field_dict["config"] = config + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_standalone_eval_v2_request_config import ( + SDKStandaloneEvalV2RequestConfig, + ) + from ..models.sdk_standalone_eval_v2_request_inputs import ( + SDKStandaloneEvalV2RequestInputs, + ) + + d = dict(src_dict) + eval_name = d.pop("eval_name") + + inputs = SDKStandaloneEvalV2RequestInputs.from_dict(d.pop("inputs")) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + def _parse_span_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + span_id = _parse_span_id(d.pop("span_id", UNSET)) + + def _parse_custom_eval_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + custom_eval_name = _parse_custom_eval_name(d.pop("custom_eval_name", UNSET)) + + trace_eval = d.pop("trace_eval", UNSET) + + is_async = d.pop("is_async", UNSET) + + error_localizer = d.pop("error_localizer", UNSET) + + _config = d.pop("config", UNSET) + config: SDKStandaloneEvalV2RequestConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = SDKStandaloneEvalV2RequestConfig.from_dict(_config) + + sdk_standalone_eval_v2_request = cls( + eval_name=eval_name, + inputs=inputs, + model=model, + span_id=span_id, + custom_eval_name=custom_eval_name, + trace_eval=trace_eval, + is_async=is_async, + error_localizer=error_localizer, + config=config, + ) + + sdk_standalone_eval_v2_request.additional_properties = d + return sdk_standalone_eval_v2_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_config.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_config.py new file mode 100644 index 0000000..f87428b --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_config.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKStandaloneEvalV2RequestConfig") + + +@_attrs_define +class SDKStandaloneEvalV2RequestConfig: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_standalone_eval_v2_request_config = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + sdk_standalone_eval_v2_request_config.additional_properties = ( + additional_properties + ) + return sdk_standalone_eval_v2_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_inputs.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_inputs.py new file mode 100644 index 0000000..d26af3d --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_request_inputs.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKStandaloneEvalV2RequestInputs") + + +@_attrs_define +class SDKStandaloneEvalV2RequestInputs: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_standalone_eval_v2_request_inputs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + sdk_standalone_eval_v2_request_inputs.additional_properties = ( + additional_properties + ) + return sdk_standalone_eval_v2_request_inputs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_response.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_response.py new file mode 100644 index 0000000..f6c3f15 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_standalone_eval_v2_result import SDKStandaloneEvalV2Result + + +T = TypeVar("T", bound="SDKStandaloneEvalV2Response") + + +@_attrs_define +class SDKStandaloneEvalV2Response: + """ + Attributes: + status (bool): + result (SDKStandaloneEvalV2Result): + """ + + status: bool + result: SDKStandaloneEvalV2Result + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_standalone_eval_v2_result import SDKStandaloneEvalV2Result + + d = dict(src_dict) + status = d.pop("status") + + result = SDKStandaloneEvalV2Result.from_dict(d.pop("result")) + + sdk_standalone_eval_v2_response = cls( + status=status, + result=result, + ) + + sdk_standalone_eval_v2_response.additional_properties = d + return sdk_standalone_eval_v2_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result.py new file mode 100644 index 0000000..b4f2132 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdk_standalone_eval_v2_result_result import ( + SDKStandaloneEvalV2ResultResult, + ) + + +T = TypeVar("T", bound="SDKStandaloneEvalV2Result") + + +@_attrs_define +class SDKStandaloneEvalV2Result: + """ + Attributes: + eval_status (str): + result (SDKStandaloneEvalV2ResultResult): + """ + + eval_status: str + result: SDKStandaloneEvalV2ResultResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_status = self.eval_status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_status": eval_status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdk_standalone_eval_v2_result_result import ( + SDKStandaloneEvalV2ResultResult, + ) + + d = dict(src_dict) + eval_status = d.pop("eval_status") + + result = SDKStandaloneEvalV2ResultResult.from_dict(d.pop("result")) + + sdk_standalone_eval_v2_result = cls( + eval_status=eval_status, + result=result, + ) + + sdk_standalone_eval_v2_result.additional_properties = d + return sdk_standalone_eval_v2_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result_result.py b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result_result.py new file mode 100644 index 0000000..f3e98fa --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdk_standalone_eval_v2_result_result.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKStandaloneEvalV2ResultResult") + + +@_attrs_define +class SDKStandaloneEvalV2ResultResult: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdk_standalone_eval_v2_result_result = cls() + + sdk_standalone_eval_v2_result_result.additional_properties = d + return sdk_standalone_eval_v2_result_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted.py b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted.py new file mode 100644 index 0000000..0a26590 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKCICDEvaluationRunAccepted") + + +@_attrs_define +class SDKCICDEvaluationRunAccepted: + """ + Attributes: + message (str): + project_name (str): + version (str): + evaluation_run_id (UUID): + """ + + message: str + project_name: str + version: str + evaluation_run_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + project_name = self.project_name + + version = self.version + + evaluation_run_id = str(self.evaluation_run_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "project_name": project_name, + "version": version, + "evaluation_run_id": evaluation_run_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + project_name = d.pop("project_name") + + version = d.pop("version") + + evaluation_run_id = UUID(d.pop("evaluation_run_id")) + + sdkcicd_evaluation_run_accepted = cls( + message=message, + project_name=project_name, + version=version, + evaluation_run_id=evaluation_run_id, + ) + + sdkcicd_evaluation_run_accepted.additional_properties = d + return sdkcicd_evaluation_run_accepted + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted_response.py b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted_response.py new file mode 100644 index 0000000..b684acf --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_accepted_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdkcicd_evaluation_run_accepted import SDKCICDEvaluationRunAccepted + + +T = TypeVar("T", bound="SDKCICDEvaluationRunAcceptedResponse") + + +@_attrs_define +class SDKCICDEvaluationRunAcceptedResponse: + """ + Attributes: + status (bool): + result (SDKCICDEvaluationRunAccepted): + """ + + status: bool + result: SDKCICDEvaluationRunAccepted + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdkcicd_evaluation_run_accepted import ( + SDKCICDEvaluationRunAccepted, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = SDKCICDEvaluationRunAccepted.from_dict(d.pop("result")) + + sdkcicd_evaluation_run_accepted_response = cls( + status=status, + result=result, + ) + + sdkcicd_evaluation_run_accepted_response.additional_properties = d + return sdkcicd_evaluation_run_accepted_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary.py b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary.py new file mode 100644 index 0000000..9f5cc4d --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdkcicd_evaluation_run_summary_results_summary import ( + SDKCICDEvaluationRunSummaryResultsSummary, + ) + + +T = TypeVar("T", bound="SDKCICDEvaluationRunSummary") + + +@_attrs_define +class SDKCICDEvaluationRunSummary: + """ + Attributes: + id (UUID): + project (str): + version (str): + results_summary (SDKCICDEvaluationRunSummaryResultsSummary): + """ + + id: UUID + project: str + version: str + results_summary: SDKCICDEvaluationRunSummaryResultsSummary + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + project = self.project + + version = self.version + + results_summary = self.results_summary.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "project": project, + "version": version, + "results_summary": results_summary, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdkcicd_evaluation_run_summary_results_summary import ( + SDKCICDEvaluationRunSummaryResultsSummary, + ) + + d = dict(src_dict) + id = UUID(d.pop("id")) + + project = d.pop("project") + + version = d.pop("version") + + results_summary = SDKCICDEvaluationRunSummaryResultsSummary.from_dict( + d.pop("results_summary") + ) + + sdkcicd_evaluation_run_summary = cls( + id=id, + project=project, + version=version, + results_summary=results_summary, + ) + + sdkcicd_evaluation_run_summary.additional_properties = d + return sdkcicd_evaluation_run_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary_results_summary.py b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary_results_summary.py new file mode 100644 index 0000000..6e1f327 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_run_summary_results_summary.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SDKCICDEvaluationRunSummaryResultsSummary") + + +@_attrs_define +class SDKCICDEvaluationRunSummaryResultsSummary: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + sdkcicd_evaluation_run_summary_results_summary = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + sdkcicd_evaluation_run_summary_results_summary.additional_properties = ( + additional_properties + ) + return sdkcicd_evaluation_run_summary_results_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_response.py b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_response.py new file mode 100644 index 0000000..b390498 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sdkcicd_evaluation_runs_result import SDKCICDEvaluationRunsResult + + +T = TypeVar("T", bound="SDKCICDEvaluationRunsResponse") + + +@_attrs_define +class SDKCICDEvaluationRunsResponse: + """ + Attributes: + status (bool): + result (SDKCICDEvaluationRunsResult): + """ + + status: bool + result: SDKCICDEvaluationRunsResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdkcicd_evaluation_runs_result import SDKCICDEvaluationRunsResult + + d = dict(src_dict) + status = d.pop("status") + + result = SDKCICDEvaluationRunsResult.from_dict(d.pop("result")) + + sdkcicd_evaluation_runs_response = cls( + status=status, + result=result, + ) + + sdkcicd_evaluation_runs_response.additional_properties = d + return sdkcicd_evaluation_runs_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result.py b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result.py new file mode 100644 index 0000000..ed9b630 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.sdkcicd_evaluation_runs_result_status import ( + SDKCICDEvaluationRunsResultStatus, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sdkcicd_evaluation_run_summary import SDKCICDEvaluationRunSummary + + +T = TypeVar("T", bound="SDKCICDEvaluationRunsResult") + + +@_attrs_define +class SDKCICDEvaluationRunsResult: + """ + Attributes: + message (str): + status (SDKCICDEvaluationRunsResultStatus): + evaluation_runs (list[SDKCICDEvaluationRunSummary] | Unset): + """ + + message: str + status: SDKCICDEvaluationRunsResultStatus + evaluation_runs: list[SDKCICDEvaluationRunSummary] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + status = self.status.value + + evaluation_runs: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.evaluation_runs, Unset): + evaluation_runs = [] + for evaluation_runs_item_data in self.evaluation_runs: + evaluation_runs_item = evaluation_runs_item_data.to_dict() + evaluation_runs.append(evaluation_runs_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "status": status, + } + ) + if evaluation_runs is not UNSET: + field_dict["evaluation_runs"] = evaluation_runs + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sdkcicd_evaluation_run_summary import SDKCICDEvaluationRunSummary + + d = dict(src_dict) + message = d.pop("message") + + status = SDKCICDEvaluationRunsResultStatus(d.pop("status")) + + _evaluation_runs = d.pop("evaluation_runs", UNSET) + evaluation_runs: list[SDKCICDEvaluationRunSummary] | Unset = UNSET + if _evaluation_runs is not UNSET: + evaluation_runs = [] + for evaluation_runs_item_data in _evaluation_runs: + evaluation_runs_item = SDKCICDEvaluationRunSummary.from_dict( + evaluation_runs_item_data + ) + + evaluation_runs.append(evaluation_runs_item) + + sdkcicd_evaluation_runs_result = cls( + message=message, + status=status, + evaluation_runs=evaluation_runs, + ) + + sdkcicd_evaluation_runs_result.additional_properties = d + return sdkcicd_evaluation_runs_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result_status.py b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result_status.py new file mode 100644 index 0000000..2d37109 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sdkcicd_evaluation_runs_result_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SDKCICDEvaluationRunsResultStatus(str, Enum): + COMPLETED = "completed" + PROCESSING = "processing" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/selection.py b/python/fi/generated/openapi_client/models/selection.py new file mode 100644 index 0000000..ee06a6e --- /dev/null +++ b/python/fi/generated/openapi_client/models/selection.py @@ -0,0 +1,138 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.selection_mode import SelectionMode +from ..models.selection_source_type import SelectionSourceType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.selection_filter_item import SelectionFilterItem + + +T = TypeVar("T", bound="Selection") + + +@_attrs_define +class Selection: + """ + Attributes: + mode (SelectionMode): + source_type (SelectionSourceType): + project_id (UUID): + filter_ (list[SelectionFilterItem] | Unset): + exclude_ids (list[str] | Unset): + remove_simulation_calls (bool | Unset): Default: False. + is_voice_call (bool | Unset): Default: False. + """ + + mode: SelectionMode + source_type: SelectionSourceType + project_id: UUID + filter_: list[SelectionFilterItem] | Unset = UNSET + exclude_ids: list[str] | Unset = UNSET + remove_simulation_calls: bool | Unset = False + is_voice_call: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mode = self.mode.value + + source_type = self.source_type.value + + project_id = str(self.project_id) + + filter_: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.filter_, Unset): + filter_ = [] + for filter_item_data in self.filter_: + filter_item = filter_item_data.to_dict() + filter_.append(filter_item) + + exclude_ids: list[str] | Unset = UNSET + if not isinstance(self.exclude_ids, Unset): + exclude_ids = self.exclude_ids + + remove_simulation_calls = self.remove_simulation_calls + + is_voice_call = self.is_voice_call + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mode": mode, + "source_type": source_type, + "project_id": project_id, + } + ) + if filter_ is not UNSET: + field_dict["filter"] = filter_ + if exclude_ids is not UNSET: + field_dict["exclude_ids"] = exclude_ids + if remove_simulation_calls is not UNSET: + field_dict["remove_simulation_calls"] = remove_simulation_calls + if is_voice_call is not UNSET: + field_dict["is_voice_call"] = is_voice_call + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.selection_filter_item import SelectionFilterItem + + d = dict(src_dict) + mode = SelectionMode(d.pop("mode")) + + source_type = SelectionSourceType(d.pop("source_type")) + + project_id = UUID(d.pop("project_id")) + + _filter_ = d.pop("filter", UNSET) + filter_: list[SelectionFilterItem] | Unset = UNSET + if _filter_ is not UNSET: + filter_ = [] + for filter_item_data in _filter_: + filter_item = SelectionFilterItem.from_dict(filter_item_data) + + filter_.append(filter_item) + + exclude_ids = cast(list[str], d.pop("exclude_ids", UNSET)) + + remove_simulation_calls = d.pop("remove_simulation_calls", UNSET) + + is_voice_call = d.pop("is_voice_call", UNSET) + + selection = cls( + mode=mode, + source_type=source_type, + project_id=project_id, + filter_=filter_, + exclude_ids=exclude_ids, + remove_simulation_calls=remove_simulation_calls, + is_voice_call=is_voice_call, + ) + + selection.additional_properties = d + return selection + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/selection_filter_item.py b/python/fi/generated/openapi_client/models/selection_filter_item.py new file mode 100644 index 0000000..083bd25 --- /dev/null +++ b/python/fi/generated/openapi_client/models/selection_filter_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.selection_filter_item_filter_config import ( + SelectionFilterItemFilterConfig, + ) + + +T = TypeVar("T", bound="SelectionFilterItem") + + +@_attrs_define +class SelectionFilterItem: + """ + Attributes: + column_id (str): Column or attribute id to filter on. + filter_config (SelectionFilterItemFilterConfig): + display_name (str | Unset): Optional UI label for chips and saved views. + source (str | Unset): Optional source surface for mixed-source filters, for example traces, datasets, or + simulation. + output_type (str | Unset): Optional metric output type metadata used by eval and annotation filters. + """ + + column_id: str + filter_config: SelectionFilterItemFilterConfig + display_name: str | Unset = UNSET + source: str | Unset = UNSET + output_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + filter_config = self.filter_config.to_dict() + + display_name = self.display_name + + source = self.source + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + "filter_config": filter_config, + } + ) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if source is not UNSET: + field_dict["source"] = source + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.selection_filter_item_filter_config import ( + SelectionFilterItemFilterConfig, + ) + + d = dict(src_dict) + column_id = d.pop("column_id") + + filter_config = SelectionFilterItemFilterConfig.from_dict( + d.pop("filter_config") + ) + + display_name = d.pop("display_name", UNSET) + + source = d.pop("source", UNSET) + + output_type = d.pop("output_type", UNSET) + + selection_filter_item = cls( + column_id=column_id, + filter_config=filter_config, + display_name=display_name, + source=source, + output_type=output_type, + ) + + return selection_filter_item diff --git a/python/fi/generated/openapi_client/models/selection_filter_item_filter_config.py b/python/fi/generated/openapi_client/models/selection_filter_item_filter_config.py new file mode 100644 index 0000000..373a9fd --- /dev/null +++ b/python/fi/generated/openapi_client/models/selection_filter_item_filter_config.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SelectionFilterItemFilterConfig") + + +@_attrs_define +class SelectionFilterItemFilterConfig: + """ + Attributes: + filter_type (str): Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, + annotator, or array. + filter_op (str): Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, + not_in, between, not_between, is_null, or is_not_null. + filter_value (Any | Unset): Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + col_type (str | Unset): Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + """ + + filter_type: str + filter_op: str + filter_value: Any | Unset = UNSET + col_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + filter_type = self.filter_type + + filter_op = self.filter_op + + filter_value = self.filter_value + + col_type = self.col_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "filter_type": filter_type, + "filter_op": filter_op, + } + ) + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + if col_type is not UNSET: + field_dict["col_type"] = col_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + filter_type = d.pop("filter_type") + + filter_op = d.pop("filter_op") + + filter_value = d.pop("filter_value", UNSET) + + col_type = d.pop("col_type", UNSET) + + selection_filter_item_filter_config = cls( + filter_type=filter_type, + filter_op=filter_op, + filter_value=filter_value, + col_type=col_type, + ) + + return selection_filter_item_filter_config diff --git a/python/fi/generated/openapi_client/models/selection_mode.py b/python/fi/generated/openapi_client/models/selection_mode.py new file mode 100644 index 0000000..0df5749 --- /dev/null +++ b/python/fi/generated/openapi_client/models/selection_mode.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class SelectionMode(str, Enum): + FILTER = "filter" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/selection_source_type.py b/python/fi/generated/openapi_client/models/selection_source_type.py new file mode 100644 index 0000000..c113b36 --- /dev/null +++ b/python/fi/generated/openapi_client/models/selection_source_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class SelectionSourceType(str, Enum): + CALL_EXECUTION = "call_execution" + OBSERVATION_SPAN = "observation_span" + TRACE = "trace" + TRACE_SESSION = "trace_session" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/send_chat_request.py b/python/fi/generated/openapi_client/models/send_chat_request.py new file mode 100644 index 0000000..e5e7348 --- /dev/null +++ b/python/fi/generated/openapi_client/models/send_chat_request.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.chat_message_contract import ChatMessageContract + from ..models.send_chat_request_metrics import SendChatRequestMetrics + + +T = TypeVar("T", bound="SendChatRequest") + + +@_attrs_define +class SendChatRequest: + """ + Attributes: + messages (list[ChatMessageContract] | None | Unset): + metrics (SendChatRequestMetrics | Unset): + initiate_chat (bool | Unset): Default: False. + """ + + messages: list[ChatMessageContract] | None | Unset = UNSET + metrics: SendChatRequestMetrics | Unset = UNSET + initiate_chat: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + messages: list[dict[str, Any]] | None | Unset + if isinstance(self.messages, Unset): + messages = UNSET + elif isinstance(self.messages, list): + messages = [] + for messages_type_0_item_data in self.messages: + messages_type_0_item = messages_type_0_item_data.to_dict() + messages.append(messages_type_0_item) + + else: + messages = self.messages + + metrics: dict[str, Any] | Unset = UNSET + if not isinstance(self.metrics, Unset): + metrics = self.metrics.to_dict() + + initiate_chat = self.initiate_chat + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if messages is not UNSET: + field_dict["messages"] = messages + if metrics is not UNSET: + field_dict["metrics"] = metrics + if initiate_chat is not UNSET: + field_dict["initiate_chat"] = initiate_chat + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.chat_message_contract import ChatMessageContract + from ..models.send_chat_request_metrics import SendChatRequestMetrics + + d = dict(src_dict) + + def _parse_messages(data: object) -> list[ChatMessageContract] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + messages_type_0 = [] + _messages_type_0 = data + for messages_type_0_item_data in _messages_type_0: + messages_type_0_item = ChatMessageContract.from_dict( + messages_type_0_item_data + ) + + messages_type_0.append(messages_type_0_item) + + return messages_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[ChatMessageContract] | None | Unset, data) + + messages = _parse_messages(d.pop("messages", UNSET)) + + _metrics = d.pop("metrics", UNSET) + metrics: SendChatRequestMetrics | Unset + if isinstance(_metrics, Unset): + metrics = UNSET + else: + metrics = SendChatRequestMetrics.from_dict(_metrics) + + initiate_chat = d.pop("initiate_chat", UNSET) + + send_chat_request = cls( + messages=messages, + metrics=metrics, + initiate_chat=initiate_chat, + ) + + send_chat_request.additional_properties = d + return send_chat_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/send_chat_request_metrics.py b/python/fi/generated/openapi_client/models/send_chat_request_metrics.py new file mode 100644 index 0000000..c9bd548 --- /dev/null +++ b/python/fi/generated/openapi_client/models/send_chat_request_metrics.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SendChatRequestMetrics") + + +@_attrs_define +class SendChatRequestMetrics: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + send_chat_request_metrics = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + send_chat_request_metrics.additional_properties = additional_properties + return send_chat_request_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/session_comparison_response.py b/python/fi/generated/openapi_client/models/session_comparison_response.py new file mode 100644 index 0000000..7afa212 --- /dev/null +++ b/python/fi/generated/openapi_client/models/session_comparison_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.session_comparison_result import SessionComparisonResult + + +T = TypeVar("T", bound="SessionComparisonResponse") + + +@_attrs_define +class SessionComparisonResponse: + """ + Attributes: + result (SessionComparisonResult): + status (bool | Unset): Default: True. + """ + + result: SessionComparisonResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.session_comparison_result import SessionComparisonResult + + d = dict(src_dict) + result = SessionComparisonResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + session_comparison_response = cls( + result=result, + status=status, + ) + + session_comparison_response.additional_properties = d + return session_comparison_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/session_comparison_result.py b/python/fi/generated/openapi_client/models/session_comparison_result.py new file mode 100644 index 0000000..c688659 --- /dev/null +++ b/python/fi/generated/openapi_client/models/session_comparison_result.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.session_comparison_result_comparison_metrics import ( + SessionComparisonResultComparisonMetrics, + ) + from ..models.session_comparison_result_comparison_recordings import ( + SessionComparisonResultComparisonRecordings, + ) + from ..models.session_comparison_result_comparison_transcripts import ( + SessionComparisonResultComparisonTranscripts, + ) + + +T = TypeVar("T", bound="SessionComparisonResult") + + +@_attrs_define +class SessionComparisonResult: + """ + Attributes: + comparison_metrics (SessionComparisonResultComparisonMetrics | Unset): + comparison_transcripts (SessionComparisonResultComparisonTranscripts | Unset): + comparison_recordings (SessionComparisonResultComparisonRecordings | Unset): + """ + + comparison_metrics: SessionComparisonResultComparisonMetrics | Unset = UNSET + comparison_transcripts: SessionComparisonResultComparisonTranscripts | Unset = UNSET + comparison_recordings: SessionComparisonResultComparisonRecordings | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comparison_metrics: dict[str, Any] | Unset = UNSET + if not isinstance(self.comparison_metrics, Unset): + comparison_metrics = self.comparison_metrics.to_dict() + + comparison_transcripts: dict[str, Any] | Unset = UNSET + if not isinstance(self.comparison_transcripts, Unset): + comparison_transcripts = self.comparison_transcripts.to_dict() + + comparison_recordings: dict[str, Any] | Unset = UNSET + if not isinstance(self.comparison_recordings, Unset): + comparison_recordings = self.comparison_recordings.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comparison_metrics is not UNSET: + field_dict["comparison_metrics"] = comparison_metrics + if comparison_transcripts is not UNSET: + field_dict["comparison_transcripts"] = comparison_transcripts + if comparison_recordings is not UNSET: + field_dict["comparison_recordings"] = comparison_recordings + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.session_comparison_result_comparison_metrics import ( + SessionComparisonResultComparisonMetrics, + ) + from ..models.session_comparison_result_comparison_recordings import ( + SessionComparisonResultComparisonRecordings, + ) + from ..models.session_comparison_result_comparison_transcripts import ( + SessionComparisonResultComparisonTranscripts, + ) + + d = dict(src_dict) + _comparison_metrics = d.pop("comparison_metrics", UNSET) + comparison_metrics: SessionComparisonResultComparisonMetrics | Unset + if isinstance(_comparison_metrics, Unset): + comparison_metrics = UNSET + else: + comparison_metrics = SessionComparisonResultComparisonMetrics.from_dict( + _comparison_metrics + ) + + _comparison_transcripts = d.pop("comparison_transcripts", UNSET) + comparison_transcripts: SessionComparisonResultComparisonTranscripts | Unset + if isinstance(_comparison_transcripts, Unset): + comparison_transcripts = UNSET + else: + comparison_transcripts = ( + SessionComparisonResultComparisonTranscripts.from_dict( + _comparison_transcripts + ) + ) + + _comparison_recordings = d.pop("comparison_recordings", UNSET) + comparison_recordings: SessionComparisonResultComparisonRecordings | Unset + if isinstance(_comparison_recordings, Unset): + comparison_recordings = UNSET + else: + comparison_recordings = ( + SessionComparisonResultComparisonRecordings.from_dict( + _comparison_recordings + ) + ) + + session_comparison_result = cls( + comparison_metrics=comparison_metrics, + comparison_transcripts=comparison_transcripts, + comparison_recordings=comparison_recordings, + ) + + session_comparison_result.additional_properties = d + return session_comparison_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/session_comparison_result_comparison_metrics.py b/python/fi/generated/openapi_client/models/session_comparison_result_comparison_metrics.py new file mode 100644 index 0000000..0aeb128 --- /dev/null +++ b/python/fi/generated/openapi_client/models/session_comparison_result_comparison_metrics.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SessionComparisonResultComparisonMetrics") + + +@_attrs_define +class SessionComparisonResultComparisonMetrics: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_comparison_result_comparison_metrics = cls() + + session_comparison_result_comparison_metrics.additional_properties = d + return session_comparison_result_comparison_metrics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/session_comparison_result_comparison_recordings.py b/python/fi/generated/openapi_client/models/session_comparison_result_comparison_recordings.py new file mode 100644 index 0000000..6fc9193 --- /dev/null +++ b/python/fi/generated/openapi_client/models/session_comparison_result_comparison_recordings.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SessionComparisonResultComparisonRecordings") + + +@_attrs_define +class SessionComparisonResultComparisonRecordings: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_comparison_result_comparison_recordings = cls() + + session_comparison_result_comparison_recordings.additional_properties = d + return session_comparison_result_comparison_recordings + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/session_comparison_result_comparison_transcripts.py b/python/fi/generated/openapi_client/models/session_comparison_result_comparison_transcripts.py new file mode 100644 index 0000000..47d48ee --- /dev/null +++ b/python/fi/generated/openapi_client/models/session_comparison_result_comparison_transcripts.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SessionComparisonResultComparisonTranscripts") + + +@_attrs_define +class SessionComparisonResultComparisonTranscripts: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_comparison_result_comparison_transcripts = cls() + + session_comparison_result_comparison_transcripts.additional_properties = d + return session_comparison_result_comparison_transcripts + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sidebar_ai_metadata.py b/python/fi/generated/openapi_client/models/sidebar_ai_metadata.py new file mode 100644 index 0000000..5ef1fa6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sidebar_ai_metadata.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SidebarAIMetadata") + + +@_attrs_define +class SidebarAIMetadata: + """ + Attributes: + model (None | str): + model_version (None | str): + project (None | str): + eval_score (float | None): + trace_id (None | str): + """ + + model: None | str + model_version: None | str + project: None | str + eval_score: float | None + trace_id: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + model: None | str + model = self.model + + model_version: None | str + model_version = self.model_version + + project: None | str + project = self.project + + eval_score: float | None + eval_score = self.eval_score + + trace_id: None | str + trace_id = self.trace_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "model": model, + "model_version": model_version, + "project": project, + "eval_score": eval_score, + "trace_id": trace_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_model(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + model = _parse_model(d.pop("model")) + + def _parse_model_version(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + model_version = _parse_model_version(d.pop("model_version")) + + def _parse_project(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + project = _parse_project(d.pop("project")) + + def _parse_eval_score(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + eval_score = _parse_eval_score(d.pop("eval_score")) + + def _parse_trace_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + trace_id = _parse_trace_id(d.pop("trace_id")) + + sidebar_ai_metadata = cls( + model=model, + model_version=model_version, + project=project, + eval_score=eval_score, + trace_id=trace_id, + ) + + sidebar_ai_metadata.additional_properties = d + return sidebar_ai_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/sidebar_timeline.py b/python/fi/generated/openapi_client/models/sidebar_timeline.py new file mode 100644 index 0000000..f145fe8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/sidebar_timeline.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +T = TypeVar("T", bound="SidebarTimeline") + + +@_attrs_define +class SidebarTimeline: + """ + Attributes: + first_seen (datetime.datetime | None): + last_seen (datetime.datetime | None): + age_days (int | None): + """ + + first_seen: datetime.datetime | None + last_seen: datetime.datetime | None + age_days: int | None + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + first_seen: None | str + if isinstance(self.first_seen, datetime.datetime): + first_seen = self.first_seen.isoformat() + else: + first_seen = self.first_seen + + last_seen: None | str + if isinstance(self.last_seen, datetime.datetime): + last_seen = self.last_seen.isoformat() + else: + last_seen = self.last_seen + + age_days: int | None + age_days = self.age_days + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "first_seen": first_seen, + "last_seen": last_seen, + "age_days": age_days, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_first_seen(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + first_seen_type_0 = isoparse(data) + + return first_seen_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + first_seen = _parse_first_seen(d.pop("first_seen")) + + def _parse_last_seen(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + last_seen_type_0 = isoparse(data) + + return last_seen_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + last_seen = _parse_last_seen(d.pop("last_seen")) + + def _parse_age_days(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + age_days = _parse_age_days(d.pop("age_days")) + + sidebar_timeline = cls( + first_seen=first_seen, + last_seen=last_seen, + age_days=age_days, + ) + + sidebar_timeline.additional_properties = d + return sidebar_timeline + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulate_api_personas_field_options_response_200.py b/python/fi/generated/openapi_client/models/simulate_api_personas_field_options_response_200.py new file mode 100644 index 0000000..ef02bea --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_api_personas_field_options_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona_field_options import PersonaFieldOptions + + +T = TypeVar("T", bound="SimulateApiPersonasFieldOptionsResponse200") + + +@_attrs_define +class SimulateApiPersonasFieldOptionsResponse200: + """ + Attributes: + count (int): + results (list[PersonaFieldOptions]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[PersonaFieldOptions] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona_field_options import PersonaFieldOptions + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = PersonaFieldOptions.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + simulate_api_personas_field_options_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + simulate_api_personas_field_options_response_200.additional_properties = d + return simulate_api_personas_field_options_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulate_api_personas_system_personas_response_200.py b/python/fi/generated/openapi_client/models/simulate_api_personas_system_personas_response_200.py new file mode 100644 index 0000000..e1bdbc2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_api_personas_system_personas_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona import Persona + + +T = TypeVar("T", bound="SimulateApiPersonasSystemPersonasResponse200") + + +@_attrs_define +class SimulateApiPersonasSystemPersonasResponse200: + """ + Attributes: + count (int): + results (list[Persona]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Persona] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona import Persona + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Persona.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + simulate_api_personas_system_personas_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + simulate_api_personas_system_personas_response_200.additional_properties = d + return simulate_api_personas_system_personas_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulate_api_personas_workspace_personas_response_200.py b/python/fi/generated/openapi_client/models/simulate_api_personas_workspace_personas_response_200.py new file mode 100644 index 0000000..c60e50d --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_api_personas_workspace_personas_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.persona import Persona + + +T = TypeVar("T", bound="SimulateApiPersonasWorkspacePersonasResponse200") + + +@_attrs_define +class SimulateApiPersonasWorkspacePersonasResponse200: + """ + Attributes: + count (int): + results (list[Persona]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Persona] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.persona import Persona + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Persona.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + simulate_api_personas_workspace_personas_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + simulate_api_personas_workspace_personas_response_200.additional_properties = d + return simulate_api_personas_workspace_personas_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulate_api_run_tests_list_simulation_type.py b/python/fi/generated/openapi_client/models/simulate_api_run_tests_list_simulation_type.py new file mode 100644 index 0000000..44bb467 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_api_run_tests_list_simulation_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SimulateApiRunTestsListSimulationType(str, Enum): + AGENT_DEFINITION = "agent_definition" + PROMPT = "prompt" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/simulate_eval_config_response.py b/python/fi/generated/openapi_client/models/simulate_eval_config_response.py new file mode 100644 index 0000000..72f4a20 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_eval_config_response.py @@ -0,0 +1,265 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.simulate_eval_config_response_config import ( + SimulateEvalConfigResponseConfig, + ) + from ..models.simulate_eval_config_response_filters_item import ( + SimulateEvalConfigResponseFiltersItem, + ) + from ..models.simulate_eval_config_response_mapping import ( + SimulateEvalConfigResponseMapping, + ) + + +T = TypeVar("T", bound="SimulateEvalConfigResponse") + + +@_attrs_define +class SimulateEvalConfigResponse: + """ + Attributes: + id (UUID | Unset): + name (None | str | Unset): + config (SimulateEvalConfigResponseConfig | Unset): + mapping (SimulateEvalConfigResponseMapping | Unset): + filters (list[SimulateEvalConfigResponseFiltersItem] | Unset): + error_localizer (bool | Unset): + model (None | str | Unset): + status (None | str | Unset): + eval_group (None | str | Unset): + template_id (None | Unset | UUID): + """ + + id: UUID | Unset = UNSET + name: None | str | Unset = UNSET + config: SimulateEvalConfigResponseConfig | Unset = UNSET + mapping: SimulateEvalConfigResponseMapping | Unset = UNSET + filters: list[SimulateEvalConfigResponseFiltersItem] | Unset = UNSET + error_localizer: bool | Unset = UNSET + model: None | str | Unset = UNSET + status: None | str | Unset = UNSET + eval_group: None | str | Unset = UNSET + template_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + config: dict[str, Any] | Unset = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() + + mapping: dict[str, Any] | Unset = UNSET + if not isinstance(self.mapping, Unset): + mapping = self.mapping.to_dict() + + filters: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = [] + for filters_item_data in self.filters: + filters_item = filters_item_data.to_dict() + filters.append(filters_item) + + error_localizer = self.error_localizer + + model: None | str | Unset + if isinstance(self.model, Unset): + model = UNSET + else: + model = self.model + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + else: + status = self.status + + eval_group: None | str | Unset + if isinstance(self.eval_group, Unset): + eval_group = UNSET + else: + eval_group = self.eval_group + + template_id: None | str | Unset + if isinstance(self.template_id, Unset): + template_id = UNSET + elif isinstance(self.template_id, UUID): + template_id = str(self.template_id) + else: + template_id = self.template_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if config is not UNSET: + field_dict["config"] = config + if mapping is not UNSET: + field_dict["mapping"] = mapping + if filters is not UNSET: + field_dict["filters"] = filters + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if model is not UNSET: + field_dict["model"] = model + if status is not UNSET: + field_dict["status"] = status + if eval_group is not UNSET: + field_dict["eval_group"] = eval_group + if template_id is not UNSET: + field_dict["template_id"] = template_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.simulate_eval_config_response_config import ( + SimulateEvalConfigResponseConfig, + ) + from ..models.simulate_eval_config_response_filters_item import ( + SimulateEvalConfigResponseFiltersItem, + ) + from ..models.simulate_eval_config_response_mapping import ( + SimulateEvalConfigResponseMapping, + ) + + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + _config = d.pop("config", UNSET) + config: SimulateEvalConfigResponseConfig | Unset + if isinstance(_config, Unset): + config = UNSET + else: + config = SimulateEvalConfigResponseConfig.from_dict(_config) + + _mapping = d.pop("mapping", UNSET) + mapping: SimulateEvalConfigResponseMapping | Unset + if isinstance(_mapping, Unset): + mapping = UNSET + else: + mapping = SimulateEvalConfigResponseMapping.from_dict(_mapping) + + _filters = d.pop("filters", UNSET) + filters: list[SimulateEvalConfigResponseFiltersItem] | Unset = UNSET + if _filters is not UNSET: + filters = [] + for filters_item_data in _filters: + filters_item = SimulateEvalConfigResponseFiltersItem.from_dict( + filters_item_data + ) + + filters.append(filters_item) + + error_localizer = d.pop("error_localizer", UNSET) + + def _parse_model(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + model = _parse_model(d.pop("model", UNSET)) + + def _parse_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_eval_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + eval_group = _parse_eval_group(d.pop("eval_group", UNSET)) + + def _parse_template_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + template_id_type_0 = UUID(data) + + return template_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + template_id = _parse_template_id(d.pop("template_id", UNSET)) + + simulate_eval_config_response = cls( + id=id, + name=name, + config=config, + mapping=mapping, + filters=filters, + error_localizer=error_localizer, + model=model, + status=status, + eval_group=eval_group, + template_id=template_id, + ) + + simulate_eval_config_response.additional_properties = d + return simulate_eval_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulate_eval_config_response_config.py b/python/fi/generated/openapi_client/models/simulate_eval_config_response_config.py new file mode 100644 index 0000000..8bacb7a --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_eval_config_response_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SimulateEvalConfigResponseConfig") + + +@_attrs_define +class SimulateEvalConfigResponseConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + simulate_eval_config_response_config = cls() + + simulate_eval_config_response_config.additional_properties = d + return simulate_eval_config_response_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item.py b/python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item.py new file mode 100644 index 0000000..49467ef --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.simulate_eval_config_response_filters_item_filter_config import ( + SimulateEvalConfigResponseFiltersItemFilterConfig, + ) + + +T = TypeVar("T", bound="SimulateEvalConfigResponseFiltersItem") + + +@_attrs_define +class SimulateEvalConfigResponseFiltersItem: + """ + Attributes: + column_id (str): Column or attribute id to filter on. + filter_config (SimulateEvalConfigResponseFiltersItemFilterConfig): + display_name (str | Unset): Optional UI label for chips and saved views. + source (str | Unset): Optional source surface for mixed-source filters, for example traces, datasets, or + simulation. + output_type (str | Unset): Optional metric output type metadata used by eval and annotation filters. + """ + + column_id: str + filter_config: SimulateEvalConfigResponseFiltersItemFilterConfig + display_name: str | Unset = UNSET + source: str | Unset = UNSET + output_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + filter_config = self.filter_config.to_dict() + + display_name = self.display_name + + source = self.source + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + "filter_config": filter_config, + } + ) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if source is not UNSET: + field_dict["source"] = source + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.simulate_eval_config_response_filters_item_filter_config import ( + SimulateEvalConfigResponseFiltersItemFilterConfig, + ) + + d = dict(src_dict) + column_id = d.pop("column_id") + + filter_config = SimulateEvalConfigResponseFiltersItemFilterConfig.from_dict( + d.pop("filter_config") + ) + + display_name = d.pop("display_name", UNSET) + + source = d.pop("source", UNSET) + + output_type = d.pop("output_type", UNSET) + + simulate_eval_config_response_filters_item = cls( + column_id=column_id, + filter_config=filter_config, + display_name=display_name, + source=source, + output_type=output_type, + ) + + return simulate_eval_config_response_filters_item diff --git a/python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item_filter_config.py b/python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item_filter_config.py new file mode 100644 index 0000000..2cdd8f6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_eval_config_response_filters_item_filter_config.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimulateEvalConfigResponseFiltersItemFilterConfig") + + +@_attrs_define +class SimulateEvalConfigResponseFiltersItemFilterConfig: + """ + Attributes: + filter_type (str): Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, + annotator, or array. + filter_op (str): Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, + not_in, between, not_between, is_null, or is_not_null. + filter_value (Any | Unset): Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + col_type (str | Unset): Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + """ + + filter_type: str + filter_op: str + filter_value: Any | Unset = UNSET + col_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + filter_type = self.filter_type + + filter_op = self.filter_op + + filter_value = self.filter_value + + col_type = self.col_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "filter_type": filter_type, + "filter_op": filter_op, + } + ) + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + if col_type is not UNSET: + field_dict["col_type"] = col_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + filter_type = d.pop("filter_type") + + filter_op = d.pop("filter_op") + + filter_value = d.pop("filter_value", UNSET) + + col_type = d.pop("col_type", UNSET) + + simulate_eval_config_response_filters_item_filter_config = cls( + filter_type=filter_type, + filter_op=filter_op, + filter_value=filter_value, + col_type=col_type, + ) + + return simulate_eval_config_response_filters_item_filter_config diff --git a/python/fi/generated/openapi_client/models/simulate_eval_config_response_mapping.py b/python/fi/generated/openapi_client/models/simulate_eval_config_response_mapping.py new file mode 100644 index 0000000..feb0543 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_eval_config_response_mapping.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SimulateEvalConfigResponseMapping") + + +@_attrs_define +class SimulateEvalConfigResponseMapping: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + simulate_eval_config_response_mapping = cls() + + simulate_eval_config_response_mapping.additional_properties = d + return simulate_eval_config_response_mapping + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulate_export_read_type.py b/python/fi/generated/openapi_client/models/simulate_export_read_type.py new file mode 100644 index 0000000..5c5cd55 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulate_export_read_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SimulateExportReadType(str, Enum): + RUNTEST = "runtest" + TESTEXECUTION = "testexecution" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/simulator_agent.py b/python/fi/generated/openapi_client/models/simulator_agent.py new file mode 100644 index 0000000..d419ded --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulator_agent.py @@ -0,0 +1,273 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimulatorAgent") + + +@_attrs_define +class SimulatorAgent: + """ + Attributes: + name (str): Name of the simulator agent + prompt (str): System prompt for the agent + voice_provider (str): Voice service provider + voice_name (str): Specific voice to use + model (str): LLM model to use + id (UUID | Unset): + interrupt_sensitivity (float | Unset): Sensitivity for interruption detection (0-1) + conversation_speed (float | Unset): Speed of conversation (0.1-3.0) + finished_speaking_sensitivity (float | Unset): Sensitivity for detecting when speaker has finished (0-1) + llm_temperature (float | Unset): Temperature setting for LLM (0-2) + max_call_duration_in_minutes (int | Unset): Maximum call duration in minutes (1-180) + initial_message_delay (int | Unset): Delay before initial message in seconds (0-60) + initial_message (str | Unset): Initial message to send when conversation starts + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + organization (UUID | Unset): Organization this simulator agent belongs to + deleted (bool | Unset): + deleted_at (datetime.datetime | None | Unset): + logo_url (str | Unset): + """ + + name: str + prompt: str + voice_provider: str + voice_name: str + model: str + id: UUID | Unset = UNSET + interrupt_sensitivity: float | Unset = UNSET + conversation_speed: float | Unset = UNSET + finished_speaking_sensitivity: float | Unset = UNSET + llm_temperature: float | Unset = UNSET + max_call_duration_in_minutes: int | Unset = UNSET + initial_message_delay: int | Unset = UNSET + initial_message: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + organization: UUID | Unset = UNSET + deleted: bool | Unset = UNSET + deleted_at: datetime.datetime | None | Unset = UNSET + logo_url: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + prompt = self.prompt + + voice_provider = self.voice_provider + + voice_name = self.voice_name + + model = self.model + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + interrupt_sensitivity = self.interrupt_sensitivity + + conversation_speed = self.conversation_speed + + finished_speaking_sensitivity = self.finished_speaking_sensitivity + + llm_temperature = self.llm_temperature + + max_call_duration_in_minutes = self.max_call_duration_in_minutes + + initial_message_delay = self.initial_message_delay + + initial_message = self.initial_message + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + organization: str | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = str(self.organization) + + deleted = self.deleted + + deleted_at: None | str | Unset + if isinstance(self.deleted_at, Unset): + deleted_at = UNSET + elif isinstance(self.deleted_at, datetime.datetime): + deleted_at = self.deleted_at.isoformat() + else: + deleted_at = self.deleted_at + + logo_url = self.logo_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "prompt": prompt, + "voice_provider": voice_provider, + "voice_name": voice_name, + "model": model, + } + ) + if id is not UNSET: + field_dict["id"] = id + if interrupt_sensitivity is not UNSET: + field_dict["interrupt_sensitivity"] = interrupt_sensitivity + if conversation_speed is not UNSET: + field_dict["conversation_speed"] = conversation_speed + if finished_speaking_sensitivity is not UNSET: + field_dict["finished_speaking_sensitivity"] = finished_speaking_sensitivity + if llm_temperature is not UNSET: + field_dict["llm_temperature"] = llm_temperature + if max_call_duration_in_minutes is not UNSET: + field_dict["max_call_duration_in_minutes"] = max_call_duration_in_minutes + if initial_message_delay is not UNSET: + field_dict["initial_message_delay"] = initial_message_delay + if initial_message is not UNSET: + field_dict["initial_message"] = initial_message + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if organization is not UNSET: + field_dict["organization"] = organization + if deleted is not UNSET: + field_dict["deleted"] = deleted + if deleted_at is not UNSET: + field_dict["deleted_at"] = deleted_at + if logo_url is not UNSET: + field_dict["logo_url"] = logo_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + prompt = d.pop("prompt") + + voice_provider = d.pop("voice_provider") + + voice_name = d.pop("voice_name") + + model = d.pop("model") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + interrupt_sensitivity = d.pop("interrupt_sensitivity", UNSET) + + conversation_speed = d.pop("conversation_speed", UNSET) + + finished_speaking_sensitivity = d.pop("finished_speaking_sensitivity", UNSET) + + llm_temperature = d.pop("llm_temperature", UNSET) + + max_call_duration_in_minutes = d.pop("max_call_duration_in_minutes", UNSET) + + initial_message_delay = d.pop("initial_message_delay", UNSET) + + initial_message = d.pop("initial_message", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _organization = d.pop("organization", UNSET) + organization: UUID | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = UUID(_organization) + + deleted = d.pop("deleted", UNSET) + + def _parse_deleted_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + deleted_at_type_0 = isoparse(data) + + return deleted_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + deleted_at = _parse_deleted_at(d.pop("deleted_at", UNSET)) + + logo_url = d.pop("logo_url", UNSET) + + simulator_agent = cls( + name=name, + prompt=prompt, + voice_provider=voice_provider, + voice_name=voice_name, + model=model, + id=id, + interrupt_sensitivity=interrupt_sensitivity, + conversation_speed=conversation_speed, + finished_speaking_sensitivity=finished_speaking_sensitivity, + llm_temperature=llm_temperature, + max_call_duration_in_minutes=max_call_duration_in_minutes, + initial_message_delay=initial_message_delay, + initial_message=initial_message, + created_at=created_at, + updated_at=updated_at, + organization=organization, + deleted=deleted, + deleted_at=deleted_at, + logo_url=logo_url, + ) + + simulator_agent.additional_properties = d + return simulator_agent + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulator_agent_delete_response.py b/python/fi/generated/openapi_client/models/simulator_agent_delete_response.py new file mode 100644 index 0000000..de65f66 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulator_agent_delete_response.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimulatorAgentDeleteResponse") + + +@_attrs_define +class SimulatorAgentDeleteResponse: + """ + Attributes: + message (str | Unset): + """ + + message: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + simulator_agent_delete_response = cls( + message=message, + ) + + simulator_agent_delete_response.additional_properties = d + return simulator_agent_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulator_agent_list_response.py b/python/fi/generated/openapi_client/models/simulator_agent_list_response.py new file mode 100644 index 0000000..0860ba6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulator_agent_list_response.py @@ -0,0 +1,146 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.simulator_agent import SimulatorAgent + + +T = TypeVar("T", bound="SimulatorAgentListResponse") + + +@_attrs_define +class SimulatorAgentListResponse: + """ + Attributes: + count (int | Unset): + next_ (None | str | Unset): + previous (None | str | Unset): + results (list[SimulatorAgent] | Unset): + total_pages (int | Unset): + current_page (int | Unset): + """ + + count: int | Unset = UNSET + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + results: list[SimulatorAgent] | Unset = UNSET + total_pages: int | Unset = UNSET + current_page: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + total_pages = self.total_pages + + current_page = self.current_page + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict["count"] = count + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + if results is not UNSET: + field_dict["results"] = results + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + if current_page is not UNSET: + field_dict["current_page"] = current_page + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.simulator_agent import SimulatorAgent + + d = dict(src_dict) + count = d.pop("count", UNSET) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + _results = d.pop("results", UNSET) + results: list[SimulatorAgent] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = SimulatorAgent.from_dict(results_item_data) + + results.append(results_item) + + total_pages = d.pop("total_pages", UNSET) + + current_page = d.pop("current_page", UNSET) + + simulator_agent_list_response = cls( + count=count, + next_=next_, + previous=previous, + results=results, + total_pages=total_pages, + current_page=current_page, + ) + + simulator_agent_list_response.additional_properties = d + return simulator_agent_list_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/simulator_agent_validation_error_response.py b/python/fi/generated/openapi_client/models/simulator_agent_validation_error_response.py new file mode 100644 index 0000000..6fa462e --- /dev/null +++ b/python/fi/generated/openapi_client/models/simulator_agent_validation_error_response.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SimulatorAgentValidationErrorResponse") + + +@_attrs_define +class SimulatorAgentValidationErrorResponse: + """ """ + + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + simulator_agent_validation_error_response = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = cast(list[str], prop_dict) + + additional_properties[prop_name] = additional_property + + simulator_agent_validation_error_response.additional_properties = ( + additional_properties + ) + return simulator_agent_validation_error_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> list[str]: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: list[str]) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/start_evals_process_request.py b/python/fi/generated/openapi_client/models/start_evals_process_request.py new file mode 100644 index 0000000..47ff1dc --- /dev/null +++ b/python/fi/generated/openapi_client/models/start_evals_process_request.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StartEvalsProcessRequest") + + +@_attrs_define +class StartEvalsProcessRequest: + """ + Attributes: + user_eval_ids (list[UUID]): + experiment_id (UUID | Unset): + failed_only (bool | Unset): Default: False. + """ + + user_eval_ids: list[UUID] + experiment_id: UUID | Unset = UNSET + failed_only: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_eval_ids = [] + for user_eval_ids_item_data in self.user_eval_ids: + user_eval_ids_item = str(user_eval_ids_item_data) + user_eval_ids.append(user_eval_ids_item) + + experiment_id: str | Unset = UNSET + if not isinstance(self.experiment_id, Unset): + experiment_id = str(self.experiment_id) + + failed_only = self.failed_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_eval_ids": user_eval_ids, + } + ) + if experiment_id is not UNSET: + field_dict["experiment_id"] = experiment_id + if failed_only is not UNSET: + field_dict["failed_only"] = failed_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_eval_ids = [] + _user_eval_ids = d.pop("user_eval_ids") + for user_eval_ids_item_data in _user_eval_ids: + user_eval_ids_item = UUID(user_eval_ids_item_data) + + user_eval_ids.append(user_eval_ids_item) + + _experiment_id = d.pop("experiment_id", UNSET) + experiment_id: UUID | Unset + if isinstance(_experiment_id, Unset): + experiment_id = UNSET + else: + experiment_id = UUID(_experiment_id) + + failed_only = d.pop("failed_only", UNSET) + + start_evals_process_request = cls( + user_eval_ids=user_eval_ids, + experiment_id=experiment_id, + failed_only=failed_only, + ) + + start_evals_process_request.additional_properties = d + return start_evals_process_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/stop_user_eval_request.py b/python/fi/generated/openapi_client/models/stop_user_eval_request.py new file mode 100644 index 0000000..c6160aa --- /dev/null +++ b/python/fi/generated/openapi_client/models/stop_user_eval_request.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StopUserEvalRequest") + + +@_attrs_define +class StopUserEvalRequest: + """ + Attributes: + experiment_id (UUID | Unset): + """ + + experiment_id: UUID | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_id: str | Unset = UNSET + if not isinstance(self.experiment_id, Unset): + experiment_id = str(self.experiment_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if experiment_id is not UNSET: + field_dict["experiment_id"] = experiment_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _experiment_id = d.pop("experiment_id", UNSET) + experiment_id: UUID | Unset + if isinstance(_experiment_id, Unset): + experiment_id = UNSET + else: + experiment_id = UUID(_experiment_id) + + stop_user_eval_request = cls( + experiment_id=experiment_id, + ) + + stop_user_eval_request.additional_properties = d + return stop_user_eval_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/submit_annotation_entry.py b/python/fi/generated/openapi_client/models/submit_annotation_entry.py new file mode 100644 index 0000000..7b3749c --- /dev/null +++ b/python/fi/generated/openapi_client/models/submit_annotation_entry.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.submit_annotation_entry_value import SubmitAnnotationEntryValue + + +T = TypeVar("T", bound="SubmitAnnotationEntry") + + +@_attrs_define +class SubmitAnnotationEntry: + """ + Attributes: + label_id (UUID): + value (SubmitAnnotationEntryValue): + notes (str | Unset): + """ + + label_id: UUID + value: SubmitAnnotationEntryValue + notes: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label_id = str(self.label_id) + + value = self.value.to_dict() + + notes = self.notes + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label_id": label_id, + "value": value, + } + ) + if notes is not UNSET: + field_dict["notes"] = notes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.submit_annotation_entry_value import SubmitAnnotationEntryValue + + d = dict(src_dict) + label_id = UUID(d.pop("label_id")) + + value = SubmitAnnotationEntryValue.from_dict(d.pop("value")) + + notes = d.pop("notes", UNSET) + + submit_annotation_entry = cls( + label_id=label_id, + value=value, + notes=notes, + ) + + submit_annotation_entry.additional_properties = d + return submit_annotation_entry + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/submit_annotation_entry_value.py b/python/fi/generated/openapi_client/models/submit_annotation_entry_value.py new file mode 100644 index 0000000..b694452 --- /dev/null +++ b/python/fi/generated/openapi_client/models/submit_annotation_entry_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SubmitAnnotationEntryValue") + + +@_attrs_define +class SubmitAnnotationEntryValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + submit_annotation_entry_value = cls() + + submit_annotation_entry_value.additional_properties = d + return submit_annotation_entry_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/submit_annotations.py b/python/fi/generated/openapi_client/models/submit_annotations.py new file mode 100644 index 0000000..d7c5c21 --- /dev/null +++ b/python/fi/generated/openapi_client/models/submit_annotations.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.submit_annotation_entry import SubmitAnnotationEntry + + +T = TypeVar("T", bound="SubmitAnnotations") + + +@_attrs_define +class SubmitAnnotations: + """ + Attributes: + annotations (list[SubmitAnnotationEntry]): + notes (str | Unset): Default: ''. + item_notes (None | str | Unset): + """ + + annotations: list[SubmitAnnotationEntry] + notes: str | Unset = "" + item_notes: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + annotations = [] + for annotations_item_data in self.annotations: + annotations_item = annotations_item_data.to_dict() + annotations.append(annotations_item) + + notes = self.notes + + item_notes: None | str | Unset + if isinstance(self.item_notes, Unset): + item_notes = UNSET + else: + item_notes = self.item_notes + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "annotations": annotations, + } + ) + if notes is not UNSET: + field_dict["notes"] = notes + if item_notes is not UNSET: + field_dict["item_notes"] = item_notes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.submit_annotation_entry import SubmitAnnotationEntry + + d = dict(src_dict) + annotations = [] + _annotations = d.pop("annotations") + for annotations_item_data in _annotations: + annotations_item = SubmitAnnotationEntry.from_dict(annotations_item_data) + + annotations.append(annotations_item) + + notes = d.pop("notes", UNSET) + + def _parse_item_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + item_notes = _parse_item_notes(d.pop("item_notes", UNSET)) + + submit_annotations = cls( + annotations=annotations, + notes=notes, + item_notes=item_notes, + ) + + submit_annotations.additional_properties = d + return submit_annotations + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/switch_workspace.py b/python/fi/generated/openapi_client/models/switch_workspace.py new file mode 100644 index 0000000..33ec18a --- /dev/null +++ b/python/fi/generated/openapi_client/models/switch_workspace.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SwitchWorkspace") + + +@_attrs_define +class SwitchWorkspace: + """ + Attributes: + new_workspace_id (UUID): + """ + + new_workspace_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + new_workspace_id = str(self.new_workspace_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "new_workspace_id": new_workspace_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + new_workspace_id = UUID(d.pop("new_workspace_id")) + + switch_workspace = cls( + new_workspace_id=new_workspace_id, + ) + + switch_workspace.additional_properties = d + return switch_workspace + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/switch_workspace_response.py b/python/fi/generated/openapi_client/models/switch_workspace_response.py new file mode 100644 index 0000000..999c504 --- /dev/null +++ b/python/fi/generated/openapi_client/models/switch_workspace_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.switch_workspace_result import SwitchWorkspaceResult + + +T = TypeVar("T", bound="SwitchWorkspaceResponse") + + +@_attrs_define +class SwitchWorkspaceResponse: + """ + Attributes: + status (bool): + result (SwitchWorkspaceResult): + """ + + status: bool + result: SwitchWorkspaceResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.switch_workspace_result import SwitchWorkspaceResult + + d = dict(src_dict) + status = d.pop("status") + + result = SwitchWorkspaceResult.from_dict(d.pop("result")) + + switch_workspace_response = cls( + status=status, + result=result, + ) + + switch_workspace_response.additional_properties = d + return switch_workspace_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/switch_workspace_result.py b/python/fi/generated/openapi_client/models/switch_workspace_result.py new file mode 100644 index 0000000..33f43ad --- /dev/null +++ b/python/fi/generated/openapi_client/models/switch_workspace_result.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.workspace_summary import WorkspaceSummary + + +T = TypeVar("T", bound="SwitchWorkspaceResult") + + +@_attrs_define +class SwitchWorkspaceResult: + """ + Attributes: + message (str): + workspace (WorkspaceSummary): + user_role (str): + access_type (str): + organization (str): + """ + + message: str + workspace: WorkspaceSummary + user_role: str + access_type: str + organization: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + workspace = self.workspace.to_dict() + + user_role = self.user_role + + access_type = self.access_type + + organization = self.organization + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "workspace": workspace, + "user_role": user_role, + "access_type": access_type, + "organization": organization, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.workspace_summary import WorkspaceSummary + + d = dict(src_dict) + message = d.pop("message") + + workspace = WorkspaceSummary.from_dict(d.pop("workspace")) + + user_role = d.pop("user_role") + + access_type = d.pop("access_type") + + organization = d.pop("organization") + + switch_workspace_result = cls( + message=message, + workspace=workspace, + user_role=user_role, + access_type=access_type, + organization=organization, + ) + + switch_workspace_result.additional_properties = d + return switch_workspace_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_data.py b/python/fi/generated/openapi_client/models/synthetic_data.py new file mode 100644 index 0000000..5196b39 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_data.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synthetic_data_dataset import SyntheticDataDataset + + +T = TypeVar("T", bound="SyntheticData") + + +@_attrs_define +class SyntheticData: + """ + Attributes: + num_rows (int): + columns (list[None | str]): + dataset (SyntheticDataDataset): + kb_id (UUID | Unset): + fill_existing_rows (bool | Unset): Default: False. + """ + + num_rows: int + columns: list[None | str] + dataset: SyntheticDataDataset + kb_id: UUID | Unset = UNSET + fill_existing_rows: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + num_rows = self.num_rows + + columns = [] + for columns_item_data in self.columns: + columns_item: None | str + columns_item = columns_item_data + columns.append(columns_item) + + dataset = self.dataset.to_dict() + + kb_id: str | Unset = UNSET + if not isinstance(self.kb_id, Unset): + kb_id = str(self.kb_id) + + fill_existing_rows = self.fill_existing_rows + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "num_rows": num_rows, + "columns": columns, + "dataset": dataset, + } + ) + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if fill_existing_rows is not UNSET: + field_dict["fill_existing_rows"] = fill_existing_rows + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_data_dataset import SyntheticDataDataset + + d = dict(src_dict) + num_rows = d.pop("num_rows") + + columns = [] + _columns = d.pop("columns") + for columns_item_data in _columns: + + def _parse_columns_item(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + columns_item = _parse_columns_item(columns_item_data) + + columns.append(columns_item) + + dataset = SyntheticDataDataset.from_dict(d.pop("dataset")) + + _kb_id = d.pop("kb_id", UNSET) + kb_id: UUID | Unset + if isinstance(_kb_id, Unset): + kb_id = UNSET + else: + kb_id = UUID(_kb_id) + + fill_existing_rows = d.pop("fill_existing_rows", UNSET) + + synthetic_data = cls( + num_rows=num_rows, + columns=columns, + dataset=dataset, + kb_id=kb_id, + fill_existing_rows=fill_existing_rows, + ) + + synthetic_data.additional_properties = d + return synthetic_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_data_dataset.py b/python/fi/generated/openapi_client/models/synthetic_data_dataset.py new file mode 100644 index 0000000..9baeb2d --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_data_dataset.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SyntheticDataDataset") + + +@_attrs_define +class SyntheticDataDataset: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + synthetic_data_dataset = cls() + + synthetic_data_dataset.additional_properties = d + return synthetic_data_dataset + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_config.py b/python/fi/generated/openapi_client/models/synthetic_dataset_config.py new file mode 100644 index 0000000..7b4dabc --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_config.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synthetic_dataset_config_dataset import SyntheticDatasetConfigDataset + + +T = TypeVar("T", bound="SyntheticDatasetConfig") + + +@_attrs_define +class SyntheticDatasetConfig: + """ + Attributes: + num_rows (int): + columns (list[None | str]): + dataset (SyntheticDatasetConfigDataset): + kb_id (None | Unset | UUID): + regenerate (bool | Unset): Default: False. + """ + + num_rows: int + columns: list[None | str] + dataset: SyntheticDatasetConfigDataset + kb_id: None | Unset | UUID = UNSET + regenerate: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + num_rows = self.num_rows + + columns = [] + for columns_item_data in self.columns: + columns_item: None | str + columns_item = columns_item_data + columns.append(columns_item) + + dataset = self.dataset.to_dict() + + kb_id: None | str | Unset + if isinstance(self.kb_id, Unset): + kb_id = UNSET + elif isinstance(self.kb_id, UUID): + kb_id = str(self.kb_id) + else: + kb_id = self.kb_id + + regenerate = self.regenerate + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "num_rows": num_rows, + "columns": columns, + "dataset": dataset, + } + ) + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if regenerate is not UNSET: + field_dict["regenerate"] = regenerate + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_config_dataset import ( + SyntheticDatasetConfigDataset, + ) + + d = dict(src_dict) + num_rows = d.pop("num_rows") + + columns = [] + _columns = d.pop("columns") + for columns_item_data in _columns: + + def _parse_columns_item(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + columns_item = _parse_columns_item(columns_item_data) + + columns.append(columns_item) + + dataset = SyntheticDatasetConfigDataset.from_dict(d.pop("dataset")) + + def _parse_kb_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + kb_id_type_0 = UUID(data) + + return kb_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + kb_id = _parse_kb_id(d.pop("kb_id", UNSET)) + + regenerate = d.pop("regenerate", UNSET) + + synthetic_dataset_config = cls( + num_rows=num_rows, + columns=columns, + dataset=dataset, + kb_id=kb_id, + regenerate=regenerate, + ) + + synthetic_dataset_config.additional_properties = d + return synthetic_dataset_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_config_dataset.py b/python/fi/generated/openapi_client/models/synthetic_dataset_config_dataset.py new file mode 100644 index 0000000..5641c73 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_config_dataset.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SyntheticDatasetConfigDataset") + + +@_attrs_define +class SyntheticDatasetConfigDataset: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + synthetic_dataset_config_dataset = cls() + + synthetic_dataset_config_dataset.additional_properties = d + return synthetic_dataset_config_dataset + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload.py b/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload.py new file mode 100644 index 0000000..10bcdb8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload.py @@ -0,0 +1,147 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synthetic_dataset_config_payload_columns_item import ( + SyntheticDatasetConfigPayloadColumnsItem, + ) + from ..models.synthetic_dataset_config_payload_dataset import ( + SyntheticDatasetConfigPayloadDataset, + ) + + +T = TypeVar("T", bound="SyntheticDatasetConfigPayload") + + +@_attrs_define +class SyntheticDatasetConfigPayload: + """ + Attributes: + num_rows (int | Unset): + columns (list[SyntheticDatasetConfigPayloadColumnsItem] | Unset): + dataset (SyntheticDatasetConfigPayloadDataset | Unset): + kb_id (None | Unset | UUID): + """ + + num_rows: int | Unset = UNSET + columns: list[SyntheticDatasetConfigPayloadColumnsItem] | Unset = UNSET + dataset: SyntheticDatasetConfigPayloadDataset | Unset = UNSET + kb_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + num_rows = self.num_rows + + columns: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.columns, Unset): + columns = [] + for columns_item_data in self.columns: + columns_item = columns_item_data.to_dict() + columns.append(columns_item) + + dataset: dict[str, Any] | Unset = UNSET + if not isinstance(self.dataset, Unset): + dataset = self.dataset.to_dict() + + kb_id: None | str | Unset + if isinstance(self.kb_id, Unset): + kb_id = UNSET + elif isinstance(self.kb_id, UUID): + kb_id = str(self.kb_id) + else: + kb_id = self.kb_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if num_rows is not UNSET: + field_dict["num_rows"] = num_rows + if columns is not UNSET: + field_dict["columns"] = columns + if dataset is not UNSET: + field_dict["dataset"] = dataset + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_config_payload_columns_item import ( + SyntheticDatasetConfigPayloadColumnsItem, + ) + from ..models.synthetic_dataset_config_payload_dataset import ( + SyntheticDatasetConfigPayloadDataset, + ) + + d = dict(src_dict) + num_rows = d.pop("num_rows", UNSET) + + _columns = d.pop("columns", UNSET) + columns: list[SyntheticDatasetConfigPayloadColumnsItem] | Unset = UNSET + if _columns is not UNSET: + columns = [] + for columns_item_data in _columns: + columns_item = SyntheticDatasetConfigPayloadColumnsItem.from_dict( + columns_item_data + ) + + columns.append(columns_item) + + _dataset = d.pop("dataset", UNSET) + dataset: SyntheticDatasetConfigPayloadDataset | Unset + if isinstance(_dataset, Unset): + dataset = UNSET + else: + dataset = SyntheticDatasetConfigPayloadDataset.from_dict(_dataset) + + def _parse_kb_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + kb_id_type_0 = UUID(data) + + return kb_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + kb_id = _parse_kb_id(d.pop("kb_id", UNSET)) + + synthetic_dataset_config_payload = cls( + num_rows=num_rows, + columns=columns, + dataset=dataset, + kb_id=kb_id, + ) + + synthetic_dataset_config_payload.additional_properties = d + return synthetic_dataset_config_payload + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_columns_item.py b/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_columns_item.py new file mode 100644 index 0000000..6f844b6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_columns_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SyntheticDatasetConfigPayloadColumnsItem") + + +@_attrs_define +class SyntheticDatasetConfigPayloadColumnsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + synthetic_dataset_config_payload_columns_item = cls() + + synthetic_dataset_config_payload_columns_item.additional_properties = d + return synthetic_dataset_config_payload_columns_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_dataset.py b/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_dataset.py new file mode 100644 index 0000000..0d0651b --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_config_payload_dataset.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SyntheticDatasetConfigPayloadDataset") + + +@_attrs_define +class SyntheticDatasetConfigPayloadDataset: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + synthetic_dataset_config_payload_dataset = cls() + + synthetic_dataset_config_payload_dataset.additional_properties = d + return synthetic_dataset_config_payload_dataset + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_config_response.py b/python/fi/generated/openapi_client/models/synthetic_dataset_config_response.py new file mode 100644 index 0000000..c68b99a --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_config_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.synthetic_dataset_config_result import SyntheticDatasetConfigResult + + +T = TypeVar("T", bound="SyntheticDatasetConfigResponse") + + +@_attrs_define +class SyntheticDatasetConfigResponse: + """ + Attributes: + status (bool): + result (SyntheticDatasetConfigResult): + """ + + status: bool + result: SyntheticDatasetConfigResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_config_result import ( + SyntheticDatasetConfigResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = SyntheticDatasetConfigResult.from_dict(d.pop("result")) + + synthetic_dataset_config_response = cls( + status=status, + result=result, + ) + + synthetic_dataset_config_response.additional_properties = d + return synthetic_dataset_config_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_config_result.py b/python/fi/generated/openapi_client/models/synthetic_dataset_config_result.py new file mode 100644 index 0000000..82bad43 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_config_result.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.synthetic_dataset_config_payload import SyntheticDatasetConfigPayload + + +T = TypeVar("T", bound="SyntheticDatasetConfigResult") + + +@_attrs_define +class SyntheticDatasetConfigResult: + """ + Attributes: + message (str): + data (SyntheticDatasetConfigPayload): + """ + + message: str + data: SyntheticDatasetConfigPayload + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_config_payload import ( + SyntheticDatasetConfigPayload, + ) + + d = dict(src_dict) + message = d.pop("message") + + data = SyntheticDatasetConfigPayload.from_dict(d.pop("data")) + + synthetic_dataset_config_result = cls( + message=message, + data=data, + ) + + synthetic_dataset_config_result.additional_properties = d + return synthetic_dataset_config_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_create_started_response.py b/python/fi/generated/openapi_client/models/synthetic_dataset_create_started_response.py new file mode 100644 index 0000000..c0e7238 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_create_started_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.synthetic_dataset_create_started_result import ( + SyntheticDatasetCreateStartedResult, + ) + + +T = TypeVar("T", bound="SyntheticDatasetCreateStartedResponse") + + +@_attrs_define +class SyntheticDatasetCreateStartedResponse: + """ + Attributes: + status (bool): + result (SyntheticDatasetCreateStartedResult): + """ + + status: bool + result: SyntheticDatasetCreateStartedResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_create_started_result import ( + SyntheticDatasetCreateStartedResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = SyntheticDatasetCreateStartedResult.from_dict(d.pop("result")) + + synthetic_dataset_create_started_response = cls( + status=status, + result=result, + ) + + synthetic_dataset_create_started_response.additional_properties = d + return synthetic_dataset_create_started_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_create_started_result.py b/python/fi/generated/openapi_client/models/synthetic_dataset_create_started_result.py new file mode 100644 index 0000000..559164d --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_create_started_result.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dataset import Dataset + + +T = TypeVar("T", bound="SyntheticDatasetCreateStartedResult") + + +@_attrs_define +class SyntheticDatasetCreateStartedResult: + """ + Attributes: + message (str): + data (Dataset): + """ + + message: str + data: Dataset + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dataset import Dataset + + d = dict(src_dict) + message = d.pop("message") + + data = Dataset.from_dict(d.pop("data")) + + synthetic_dataset_create_started_result = cls( + message=message, + data=data, + ) + + synthetic_dataset_create_started_result.additional_properties = d + return synthetic_dataset_create_started_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_creation.py b/python/fi/generated/openapi_client/models/synthetic_dataset_creation.py new file mode 100644 index 0000000..a035074 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_creation.py @@ -0,0 +1,121 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.synthetic_dataset_creation_dataset import ( + SyntheticDatasetCreationDataset, + ) + + +T = TypeVar("T", bound="SyntheticDatasetCreation") + + +@_attrs_define +class SyntheticDatasetCreation: + """ + Attributes: + num_rows (int): + columns (list[None | str]): + dataset (SyntheticDatasetCreationDataset): + kb_id (UUID | Unset): + """ + + num_rows: int + columns: list[None | str] + dataset: SyntheticDatasetCreationDataset + kb_id: UUID | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + num_rows = self.num_rows + + columns = [] + for columns_item_data in self.columns: + columns_item: None | str + columns_item = columns_item_data + columns.append(columns_item) + + dataset = self.dataset.to_dict() + + kb_id: str | Unset = UNSET + if not isinstance(self.kb_id, Unset): + kb_id = str(self.kb_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "num_rows": num_rows, + "columns": columns, + "dataset": dataset, + } + ) + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_creation_dataset import ( + SyntheticDatasetCreationDataset, + ) + + d = dict(src_dict) + num_rows = d.pop("num_rows") + + columns = [] + _columns = d.pop("columns") + for columns_item_data in _columns: + + def _parse_columns_item(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + columns_item = _parse_columns_item(columns_item_data) + + columns.append(columns_item) + + dataset = SyntheticDatasetCreationDataset.from_dict(d.pop("dataset")) + + _kb_id = d.pop("kb_id", UNSET) + kb_id: UUID | Unset + if isinstance(_kb_id, Unset): + kb_id = UNSET + else: + kb_id = UUID(_kb_id) + + synthetic_dataset_creation = cls( + num_rows=num_rows, + columns=columns, + dataset=dataset, + kb_id=kb_id, + ) + + synthetic_dataset_creation.additional_properties = d + return synthetic_dataset_creation + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_creation_dataset.py b/python/fi/generated/openapi_client/models/synthetic_dataset_creation_dataset.py new file mode 100644 index 0000000..3b32f63 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_creation_dataset.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SyntheticDatasetCreationDataset") + + +@_attrs_define +class SyntheticDatasetCreationDataset: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + synthetic_dataset_creation_dataset = cls() + + synthetic_dataset_creation_dataset.additional_properties = d + return synthetic_dataset_creation_dataset + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_update_data.py b/python/fi/generated/openapi_client/models/synthetic_dataset_update_data.py new file mode 100644 index 0000000..b630942 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_update_data.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SyntheticDatasetUpdateData") + + +@_attrs_define +class SyntheticDatasetUpdateData: + """ + Attributes: + dataset_id (UUID): + dataset_name (str): + num_rows (int | Unset): + num_columns (int | Unset): + """ + + dataset_id: UUID + dataset_name: str + num_rows: int | Unset = UNSET + num_columns: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dataset_id = str(self.dataset_id) + + dataset_name = self.dataset_name + + num_rows = self.num_rows + + num_columns = self.num_columns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataset_id": dataset_id, + "dataset_name": dataset_name, + } + ) + if num_rows is not UNSET: + field_dict["num_rows"] = num_rows + if num_columns is not UNSET: + field_dict["num_columns"] = num_columns + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dataset_id = UUID(d.pop("dataset_id")) + + dataset_name = d.pop("dataset_name") + + num_rows = d.pop("num_rows", UNSET) + + num_columns = d.pop("num_columns", UNSET) + + synthetic_dataset_update_data = cls( + dataset_id=dataset_id, + dataset_name=dataset_name, + num_rows=num_rows, + num_columns=num_columns, + ) + + synthetic_dataset_update_data.additional_properties = d + return synthetic_dataset_update_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_update_response.py b/python/fi/generated/openapi_client/models/synthetic_dataset_update_response.py new file mode 100644 index 0000000..3ce6d6e --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_update_response.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.synthetic_dataset_update_result import SyntheticDatasetUpdateResult + + +T = TypeVar("T", bound="SyntheticDatasetUpdateResponse") + + +@_attrs_define +class SyntheticDatasetUpdateResponse: + """ + Attributes: + status (bool): + result (SyntheticDatasetUpdateResult): + """ + + status: bool + result: SyntheticDatasetUpdateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_update_result import ( + SyntheticDatasetUpdateResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = SyntheticDatasetUpdateResult.from_dict(d.pop("result")) + + synthetic_dataset_update_response = cls( + status=status, + result=result, + ) + + synthetic_dataset_update_response.additional_properties = d + return synthetic_dataset_update_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/synthetic_dataset_update_result.py b/python/fi/generated/openapi_client/models/synthetic_dataset_update_result.py new file mode 100644 index 0000000..d174ca1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/synthetic_dataset_update_result.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.synthetic_dataset_update_data import SyntheticDatasetUpdateData + + +T = TypeVar("T", bound="SyntheticDatasetUpdateResult") + + +@_attrs_define +class SyntheticDatasetUpdateResult: + """ + Attributes: + message (str): + data (SyntheticDatasetUpdateData): + """ + + message: str + data: SyntheticDatasetUpdateData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.synthetic_dataset_update_data import SyntheticDatasetUpdateData + + d = dict(src_dict) + message = d.pop("message") + + data = SyntheticDatasetUpdateData.from_dict(d.pop("data")) + + synthetic_dataset_update_result = cls( + message=message, + data=data, + ) + + synthetic_dataset_update_result.additional_properties = d + return synthetic_dataset_update_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution.py b/python/fi/generated/openapi_client/models/test_execution.py new file mode 100644 index 0000000..19a3ef0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution.py @@ -0,0 +1,390 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.test_execution_status import TestExecutionStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_execution import CallExecution + from ..models.test_execution_execution_metadata import ( + TestExecutionExecutionMetadata, + ) + from ..models.test_execution_scenario_ids import TestExecutionScenarioIds + + +T = TypeVar("T", bound="TestExecution") + + +@_attrs_define +class TestExecution: + """ + Attributes: + run_test (UUID): The run test being executed + id (UUID | Unset): + run_test_name (str | Unset): + agent_definition_name (str | Unset): + status (TestExecutionStatus | Unset): Current status of the test execution + error_reason (None | str | Unset): + started_at (datetime.datetime | Unset): When the test execution started + completed_at (datetime.datetime | None | Unset): When the test execution completed + total_scenarios (int | Unset): Total number of scenarios in this execution + total_calls (int | Unset): Total number of calls to be made + completed_calls (int | Unset): Number of successfully completed calls + failed_calls (int | Unset): Number of failed calls + execution_metadata (TestExecutionExecutionMetadata | Unset): Additional metadata about the execution + duration_seconds (str | Unset): + success_rate (str | Unset): + calls (list[CallExecution] | Unset): + created_at (datetime.datetime | Unset): + scenario_ids (TestExecutionScenarioIds | Unset): List of scenario IDs that were executed in this run + simulator_agent_name (str | Unset): + simulator_agent_id (UUID | Unset): + agent_definition_used_name (str | Unset): + agent_definition_used_id (UUID | Unset): + calls_attempted (str | Unset): + calls_connected_percentage (str | Unset): + """ + + run_test: UUID + id: UUID | Unset = UNSET + run_test_name: str | Unset = UNSET + agent_definition_name: str | Unset = UNSET + status: TestExecutionStatus | Unset = UNSET + error_reason: None | str | Unset = UNSET + started_at: datetime.datetime | Unset = UNSET + completed_at: datetime.datetime | None | Unset = UNSET + total_scenarios: int | Unset = UNSET + total_calls: int | Unset = UNSET + completed_calls: int | Unset = UNSET + failed_calls: int | Unset = UNSET + execution_metadata: TestExecutionExecutionMetadata | Unset = UNSET + duration_seconds: str | Unset = UNSET + success_rate: str | Unset = UNSET + calls: list[CallExecution] | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + scenario_ids: TestExecutionScenarioIds | Unset = UNSET + simulator_agent_name: str | Unset = UNSET + simulator_agent_id: UUID | Unset = UNSET + agent_definition_used_name: str | Unset = UNSET + agent_definition_used_id: UUID | Unset = UNSET + calls_attempted: str | Unset = UNSET + calls_connected_percentage: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + run_test = str(self.run_test) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + run_test_name = self.run_test_name + + agent_definition_name = self.agent_definition_name + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status.value + + error_reason: None | str | Unset + if isinstance(self.error_reason, Unset): + error_reason = UNSET + else: + error_reason = self.error_reason + + started_at: str | Unset = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + elif isinstance(self.completed_at, datetime.datetime): + completed_at = self.completed_at.isoformat() + else: + completed_at = self.completed_at + + total_scenarios = self.total_scenarios + + total_calls = self.total_calls + + completed_calls = self.completed_calls + + failed_calls = self.failed_calls + + execution_metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.execution_metadata, Unset): + execution_metadata = self.execution_metadata.to_dict() + + duration_seconds = self.duration_seconds + + success_rate = self.success_rate + + calls: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.calls, Unset): + calls = [] + for calls_item_data in self.calls: + calls_item = calls_item_data.to_dict() + calls.append(calls_item) + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + scenario_ids: dict[str, Any] | Unset = UNSET + if not isinstance(self.scenario_ids, Unset): + scenario_ids = self.scenario_ids.to_dict() + + simulator_agent_name = self.simulator_agent_name + + simulator_agent_id: str | Unset = UNSET + if not isinstance(self.simulator_agent_id, Unset): + simulator_agent_id = str(self.simulator_agent_id) + + agent_definition_used_name = self.agent_definition_used_name + + agent_definition_used_id: str | Unset = UNSET + if not isinstance(self.agent_definition_used_id, Unset): + agent_definition_used_id = str(self.agent_definition_used_id) + + calls_attempted = self.calls_attempted + + calls_connected_percentage = self.calls_connected_percentage + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "run_test": run_test, + } + ) + if id is not UNSET: + field_dict["id"] = id + if run_test_name is not UNSET: + field_dict["run_test_name"] = run_test_name + if agent_definition_name is not UNSET: + field_dict["agent_definition_name"] = agent_definition_name + if status is not UNSET: + field_dict["status"] = status + if error_reason is not UNSET: + field_dict["error_reason"] = error_reason + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if total_scenarios is not UNSET: + field_dict["total_scenarios"] = total_scenarios + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if completed_calls is not UNSET: + field_dict["completed_calls"] = completed_calls + if failed_calls is not UNSET: + field_dict["failed_calls"] = failed_calls + if execution_metadata is not UNSET: + field_dict["execution_metadata"] = execution_metadata + if duration_seconds is not UNSET: + field_dict["duration_seconds"] = duration_seconds + if success_rate is not UNSET: + field_dict["success_rate"] = success_rate + if calls is not UNSET: + field_dict["calls"] = calls + if created_at is not UNSET: + field_dict["created_at"] = created_at + if scenario_ids is not UNSET: + field_dict["scenario_ids"] = scenario_ids + if simulator_agent_name is not UNSET: + field_dict["simulator_agent_name"] = simulator_agent_name + if simulator_agent_id is not UNSET: + field_dict["simulator_agent_id"] = simulator_agent_id + if agent_definition_used_name is not UNSET: + field_dict["agent_definition_used_name"] = agent_definition_used_name + if agent_definition_used_id is not UNSET: + field_dict["agent_definition_used_id"] = agent_definition_used_id + if calls_attempted is not UNSET: + field_dict["calls_attempted"] = calls_attempted + if calls_connected_percentage is not UNSET: + field_dict["calls_connected_percentage"] = calls_connected_percentage + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_execution import CallExecution + from ..models.test_execution_execution_metadata import ( + TestExecutionExecutionMetadata, + ) + from ..models.test_execution_scenario_ids import TestExecutionScenarioIds + + d = dict(src_dict) + run_test = UUID(d.pop("run_test")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + run_test_name = d.pop("run_test_name", UNSET) + + agent_definition_name = d.pop("agent_definition_name", UNSET) + + _status = d.pop("status", UNSET) + status: TestExecutionStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = TestExecutionStatus(_status) + + def _parse_error_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error_reason = _parse_error_reason(d.pop("error_reason", UNSET)) + + _started_at = d.pop("started_at", UNSET) + started_at: datetime.datetime | Unset + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + def _parse_completed_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_at_type_0 = isoparse(data) + + return completed_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + total_scenarios = d.pop("total_scenarios", UNSET) + + total_calls = d.pop("total_calls", UNSET) + + completed_calls = d.pop("completed_calls", UNSET) + + failed_calls = d.pop("failed_calls", UNSET) + + _execution_metadata = d.pop("execution_metadata", UNSET) + execution_metadata: TestExecutionExecutionMetadata | Unset + if isinstance(_execution_metadata, Unset): + execution_metadata = UNSET + else: + execution_metadata = TestExecutionExecutionMetadata.from_dict( + _execution_metadata + ) + + duration_seconds = d.pop("duration_seconds", UNSET) + + success_rate = d.pop("success_rate", UNSET) + + _calls = d.pop("calls", UNSET) + calls: list[CallExecution] | Unset = UNSET + if _calls is not UNSET: + calls = [] + for calls_item_data in _calls: + calls_item = CallExecution.from_dict(calls_item_data) + + calls.append(calls_item) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _scenario_ids = d.pop("scenario_ids", UNSET) + scenario_ids: TestExecutionScenarioIds | Unset + if isinstance(_scenario_ids, Unset): + scenario_ids = UNSET + else: + scenario_ids = TestExecutionScenarioIds.from_dict(_scenario_ids) + + simulator_agent_name = d.pop("simulator_agent_name", UNSET) + + _simulator_agent_id = d.pop("simulator_agent_id", UNSET) + simulator_agent_id: UUID | Unset + if isinstance(_simulator_agent_id, Unset): + simulator_agent_id = UNSET + else: + simulator_agent_id = UUID(_simulator_agent_id) + + agent_definition_used_name = d.pop("agent_definition_used_name", UNSET) + + _agent_definition_used_id = d.pop("agent_definition_used_id", UNSET) + agent_definition_used_id: UUID | Unset + if isinstance(_agent_definition_used_id, Unset): + agent_definition_used_id = UNSET + else: + agent_definition_used_id = UUID(_agent_definition_used_id) + + calls_attempted = d.pop("calls_attempted", UNSET) + + calls_connected_percentage = d.pop("calls_connected_percentage", UNSET) + + test_execution = cls( + run_test=run_test, + id=id, + run_test_name=run_test_name, + agent_definition_name=agent_definition_name, + status=status, + error_reason=error_reason, + started_at=started_at, + completed_at=completed_at, + total_scenarios=total_scenarios, + total_calls=total_calls, + completed_calls=completed_calls, + failed_calls=failed_calls, + execution_metadata=execution_metadata, + duration_seconds=duration_seconds, + success_rate=success_rate, + calls=calls, + created_at=created_at, + scenario_ids=scenario_ids, + simulator_agent_name=simulator_agent_name, + simulator_agent_id=simulator_agent_id, + agent_definition_used_name=agent_definition_used_name, + agent_definition_used_id=agent_definition_used_id, + calls_attempted=calls_attempted, + calls_connected_percentage=calls_connected_percentage, + ) + + test_execution.additional_properties = d + return test_execution + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_analytics.py b/python/fi/generated/openapi_client/models/test_execution_analytics.py new file mode 100644 index 0000000..dd187bb --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_analytics.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.test_execution_analytics_evaluation_categories_over_test_runs import ( + TestExecutionAnalyticsEvaluationCategoriesOverTestRuns, + ) + from ..models.test_execution_analytics_fail_rate_over_test_runs import ( + TestExecutionAnalyticsFailRateOverTestRuns, + ) + from ..models.test_execution_analytics_metadata import ( + TestExecutionAnalyticsMetadata, + ) + + +T = TypeVar("T", bound="TestExecutionAnalytics") + + +@_attrs_define +class TestExecutionAnalytics: + """ + Attributes: + fail_rate_over_test_runs (TestExecutionAnalyticsFailRateOverTestRuns): Fail rate data for scatter plot chart + evaluation_categories_over_test_runs (TestExecutionAnalyticsEvaluationCategoriesOverTestRuns): Evaluation + categories data for line graph chart + metadata (TestExecutionAnalyticsMetadata): Metadata about the analytics data + """ + + fail_rate_over_test_runs: TestExecutionAnalyticsFailRateOverTestRuns + evaluation_categories_over_test_runs: ( + TestExecutionAnalyticsEvaluationCategoriesOverTestRuns + ) + metadata: TestExecutionAnalyticsMetadata + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + fail_rate_over_test_runs = self.fail_rate_over_test_runs.to_dict() + + evaluation_categories_over_test_runs = ( + self.evaluation_categories_over_test_runs.to_dict() + ) + + metadata = self.metadata.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "fail_rate_over_test_runs": fail_rate_over_test_runs, + "evaluation_categories_over_test_runs": evaluation_categories_over_test_runs, + "metadata": metadata, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_execution_analytics_evaluation_categories_over_test_runs import ( + TestExecutionAnalyticsEvaluationCategoriesOverTestRuns, + ) + from ..models.test_execution_analytics_fail_rate_over_test_runs import ( + TestExecutionAnalyticsFailRateOverTestRuns, + ) + from ..models.test_execution_analytics_metadata import ( + TestExecutionAnalyticsMetadata, + ) + + d = dict(src_dict) + fail_rate_over_test_runs = TestExecutionAnalyticsFailRateOverTestRuns.from_dict( + d.pop("fail_rate_over_test_runs") + ) + + evaluation_categories_over_test_runs = ( + TestExecutionAnalyticsEvaluationCategoriesOverTestRuns.from_dict( + d.pop("evaluation_categories_over_test_runs") + ) + ) + + metadata = TestExecutionAnalyticsMetadata.from_dict(d.pop("metadata")) + + test_execution_analytics = cls( + fail_rate_over_test_runs=fail_rate_over_test_runs, + evaluation_categories_over_test_runs=evaluation_categories_over_test_runs, + metadata=metadata, + ) + + test_execution_analytics.additional_properties = d + return test_execution_analytics + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_analytics_evaluation_categories_over_test_runs.py b/python/fi/generated/openapi_client/models/test_execution_analytics_evaluation_categories_over_test_runs.py new file mode 100644 index 0000000..cdf54ae --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_analytics_evaluation_categories_over_test_runs.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionAnalyticsEvaluationCategoriesOverTestRuns") + + +@_attrs_define +class TestExecutionAnalyticsEvaluationCategoriesOverTestRuns: + """Evaluation categories data for line graph chart""" + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_analytics_evaluation_categories_over_test_runs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + test_execution_analytics_evaluation_categories_over_test_runs.additional_properties = additional_properties + return test_execution_analytics_evaluation_categories_over_test_runs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_analytics_fail_rate_over_test_runs.py b/python/fi/generated/openapi_client/models/test_execution_analytics_fail_rate_over_test_runs.py new file mode 100644 index 0000000..a0ae375 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_analytics_fail_rate_over_test_runs.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionAnalyticsFailRateOverTestRuns") + + +@_attrs_define +class TestExecutionAnalyticsFailRateOverTestRuns: + """Fail rate data for scatter plot chart""" + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_analytics_fail_rate_over_test_runs = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + test_execution_analytics_fail_rate_over_test_runs.additional_properties = ( + additional_properties + ) + return test_execution_analytics_fail_rate_over_test_runs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_analytics_metadata.py b/python/fi/generated/openapi_client/models/test_execution_analytics_metadata.py new file mode 100644 index 0000000..e666e9d --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_analytics_metadata.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionAnalyticsMetadata") + + +@_attrs_define +class TestExecutionAnalyticsMetadata: + """Metadata about the analytics data""" + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_analytics_metadata = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + test_execution_analytics_metadata.additional_properties = additional_properties + return test_execution_analytics_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_bulk_delete.py b/python/fi/generated/openapi_client/models/test_execution_bulk_delete.py new file mode 100644 index 0000000..4be2160 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_bulk_delete.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestExecutionBulkDelete") + + +@_attrs_define +class TestExecutionBulkDelete: + """ + Attributes: + test_execution_ids (list[UUID] | Unset): List of specific test execution IDs to delete + select_all (bool | Unset): Whether to delete all test executions in the run test Default: False. + """ + + test_execution_ids: list[UUID] | Unset = UNSET + select_all: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + test_execution_ids: list[str] | Unset = UNSET + if not isinstance(self.test_execution_ids, Unset): + test_execution_ids = [] + for test_execution_ids_item_data in self.test_execution_ids: + test_execution_ids_item = str(test_execution_ids_item_data) + test_execution_ids.append(test_execution_ids_item) + + select_all = self.select_all + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if test_execution_ids is not UNSET: + field_dict["test_execution_ids"] = test_execution_ids + if select_all is not UNSET: + field_dict["select_all"] = select_all + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _test_execution_ids = d.pop("test_execution_ids", UNSET) + test_execution_ids: list[UUID] | Unset = UNSET + if _test_execution_ids is not UNSET: + test_execution_ids = [] + for test_execution_ids_item_data in _test_execution_ids: + test_execution_ids_item = UUID(test_execution_ids_item_data) + + test_execution_ids.append(test_execution_ids_item) + + select_all = d.pop("select_all", UNSET) + + test_execution_bulk_delete = cls( + test_execution_ids=test_execution_ids, + select_all=select_all, + ) + + test_execution_bulk_delete.additional_properties = d + return test_execution_bulk_delete + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_bulk_delete_response.py b/python/fi/generated/openapi_client/models/test_execution_bulk_delete_response.py new file mode 100644 index 0000000..f45df56 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_bulk_delete_response.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestExecutionBulkDeleteResponse") + + +@_attrs_define +class TestExecutionBulkDeleteResponse: + """ + Attributes: + message (str | Unset): + run_test_id (UUID | Unset): + deleted_count (int | Unset): + deleted_ids (list[UUID] | Unset): + """ + + message: str | Unset = UNSET + run_test_id: UUID | Unset = UNSET + deleted_count: int | Unset = UNSET + deleted_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + run_test_id: str | Unset = UNSET + if not isinstance(self.run_test_id, Unset): + run_test_id = str(self.run_test_id) + + deleted_count = self.deleted_count + + deleted_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_ids, Unset): + deleted_ids = [] + for deleted_ids_item_data in self.deleted_ids: + deleted_ids_item = str(deleted_ids_item_data) + deleted_ids.append(deleted_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if run_test_id is not UNSET: + field_dict["run_test_id"] = run_test_id + if deleted_count is not UNSET: + field_dict["deleted_count"] = deleted_count + if deleted_ids is not UNSET: + field_dict["deleted_ids"] = deleted_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message", UNSET) + + _run_test_id = d.pop("run_test_id", UNSET) + run_test_id: UUID | Unset + if isinstance(_run_test_id, Unset): + run_test_id = UNSET + else: + run_test_id = UUID(_run_test_id) + + deleted_count = d.pop("deleted_count", UNSET) + + _deleted_ids = d.pop("deleted_ids", UNSET) + deleted_ids: list[UUID] | Unset = UNSET + if _deleted_ids is not UNSET: + deleted_ids = [] + for deleted_ids_item_data in _deleted_ids: + deleted_ids_item = UUID(deleted_ids_item_data) + + deleted_ids.append(deleted_ids_item) + + test_execution_bulk_delete_response = cls( + message=message, + run_test_id=run_test_id, + deleted_count=deleted_count, + deleted_ids=deleted_ids, + ) + + test_execution_bulk_delete_response.additional_properties = d + return test_execution_bulk_delete_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_chat_batch_response.py b/python/fi/generated/openapi_client/models/test_execution_chat_batch_response.py new file mode 100644 index 0000000..adf508c --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_chat_batch_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.test_execution_chat_batch_result import TestExecutionChatBatchResult + + +T = TypeVar("T", bound="TestExecutionChatBatchResponse") + + +@_attrs_define +class TestExecutionChatBatchResponse: + """ + Attributes: + result (TestExecutionChatBatchResult): + status (bool | Unset): Default: True. + """ + + result: TestExecutionChatBatchResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_execution_chat_batch_result import ( + TestExecutionChatBatchResult, + ) + + d = dict(src_dict) + result = TestExecutionChatBatchResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + test_execution_chat_batch_response = cls( + result=result, + status=status, + ) + + test_execution_chat_batch_response.additional_properties = d + return test_execution_chat_batch_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_chat_batch_result.py b/python/fi/generated/openapi_client/models/test_execution_chat_batch_result.py new file mode 100644 index 0000000..083f527 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_chat_batch_result.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionChatBatchResult") + + +@_attrs_define +class TestExecutionChatBatchResult: + """ + Attributes: + call_execution_ids (list[UUID]): + has_more (bool): + batched_scenarios (list[UUID]): + """ + + call_execution_ids: list[UUID] + has_more: bool + batched_scenarios: list[UUID] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_ids = [] + for call_execution_ids_item_data in self.call_execution_ids: + call_execution_ids_item = str(call_execution_ids_item_data) + call_execution_ids.append(call_execution_ids_item) + + has_more = self.has_more + + batched_scenarios = [] + for batched_scenarios_item_data in self.batched_scenarios: + batched_scenarios_item = str(batched_scenarios_item_data) + batched_scenarios.append(batched_scenarios_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "call_execution_ids": call_execution_ids, + "has_more": has_more, + "batched_scenarios": batched_scenarios, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + call_execution_ids = [] + _call_execution_ids = d.pop("call_execution_ids") + for call_execution_ids_item_data in _call_execution_ids: + call_execution_ids_item = UUID(call_execution_ids_item_data) + + call_execution_ids.append(call_execution_ids_item) + + has_more = d.pop("has_more") + + batched_scenarios = [] + _batched_scenarios = d.pop("batched_scenarios") + for batched_scenarios_item_data in _batched_scenarios: + batched_scenarios_item = UUID(batched_scenarios_item_data) + + batched_scenarios.append(batched_scenarios_item) + + test_execution_chat_batch_result = cls( + call_execution_ids=call_execution_ids, + has_more=has_more, + batched_scenarios=batched_scenarios, + ) + + test_execution_chat_batch_result.additional_properties = d + return test_execution_chat_batch_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_column_order.py b/python/fi/generated/openapi_client/models/test_execution_column_order.py new file mode 100644 index 0000000..2719bb8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_column_order.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.column_order import ColumnOrder + + +T = TypeVar("T", bound="TestExecutionColumnOrder") + + +@_attrs_define +class TestExecutionColumnOrder: + """ + Attributes: + column_order (list[ColumnOrder]): + """ + + column_order: list[ColumnOrder] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_order = [] + for column_order_item_data in self.column_order: + column_order_item = column_order_item_data.to_dict() + column_order.append(column_order_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_order": column_order, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.column_order import ColumnOrder + + d = dict(src_dict) + column_order = [] + _column_order = d.pop("column_order") + for column_order_item_data in _column_order: + column_order_item = ColumnOrder.from_dict(column_order_item_data) + + column_order.append(column_order_item) + + test_execution_column_order = cls( + column_order=column_order, + ) + + test_execution_column_order.additional_properties = d + return test_execution_column_order + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_column_order_response.py b/python/fi/generated/openapi_client/models/test_execution_column_order_response.py new file mode 100644 index 0000000..35eeecb --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_column_order_response.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.column_order import ColumnOrder + + +T = TypeVar("T", bound="TestExecutionColumnOrderResponse") + + +@_attrs_define +class TestExecutionColumnOrderResponse: + """ + Attributes: + message (str | Unset): + column_order (list[ColumnOrder] | Unset): + """ + + message: str | Unset = UNSET + column_order: list[ColumnOrder] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + column_order: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.column_order, Unset): + column_order = [] + for column_order_item_data in self.column_order: + column_order_item = column_order_item_data.to_dict() + column_order.append(column_order_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if column_order is not UNSET: + field_dict["column_order"] = column_order + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.column_order import ColumnOrder + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _column_order = d.pop("column_order", UNSET) + column_order: list[ColumnOrder] | Unset = UNSET + if _column_order is not UNSET: + column_order = [] + for column_order_item_data in _column_order: + column_order_item = ColumnOrder.from_dict(column_order_item_data) + + column_order.append(column_order_item) + + test_execution_column_order_response = cls( + message=message, + column_order=column_order, + ) + + test_execution_column_order_response.additional_properties = d + return test_execution_column_order_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_detail_response.py b/python/fi/generated/openapi_client/models/test_execution_detail_response.py new file mode 100644 index 0000000..d3f6c14 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_detail_response.py @@ -0,0 +1,222 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.test_execution_detail_response_column_order_item import ( + TestExecutionDetailResponseColumnOrderItem, + ) + from ..models.test_execution_detail_response_results_item import ( + TestExecutionDetailResponseResultsItem, + ) + + +T = TypeVar("T", bound="TestExecutionDetailResponse") + + +@_attrs_define +class TestExecutionDetailResponse: + """ + Attributes: + count (int | Unset): + next_ (None | str | Unset): + previous (None | str | Unset): + results (list[TestExecutionDetailResponseResultsItem] | Unset): Call execution rows may include dynamic + eval/scenario columns. + total_pages (int | Unset): + current_page (int | Unset): + column_order (list[TestExecutionDetailResponseColumnOrderItem] | Unset): + error_messages (list[str] | Unset): + status (str | Unset): + provider (str | Unset): + agent_type (str | Unset): + """ + + count: int | Unset = UNSET + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + results: list[TestExecutionDetailResponseResultsItem] | Unset = UNSET + total_pages: int | Unset = UNSET + current_page: int | Unset = UNSET + column_order: list[TestExecutionDetailResponseColumnOrderItem] | Unset = UNSET + error_messages: list[str] | Unset = UNSET + status: str | Unset = UNSET + provider: str | Unset = UNSET + agent_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + total_pages = self.total_pages + + current_page = self.current_page + + column_order: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.column_order, Unset): + column_order = [] + for column_order_item_data in self.column_order: + column_order_item = column_order_item_data.to_dict() + column_order.append(column_order_item) + + error_messages: list[str] | Unset = UNSET + if not isinstance(self.error_messages, Unset): + error_messages = self.error_messages + + status = self.status + + provider = self.provider + + agent_type = self.agent_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict["count"] = count + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + if results is not UNSET: + field_dict["results"] = results + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + if current_page is not UNSET: + field_dict["current_page"] = current_page + if column_order is not UNSET: + field_dict["column_order"] = column_order + if error_messages is not UNSET: + field_dict["error_messages"] = error_messages + if status is not UNSET: + field_dict["status"] = status + if provider is not UNSET: + field_dict["provider"] = provider + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_execution_detail_response_column_order_item import ( + TestExecutionDetailResponseColumnOrderItem, + ) + from ..models.test_execution_detail_response_results_item import ( + TestExecutionDetailResponseResultsItem, + ) + + d = dict(src_dict) + count = d.pop("count", UNSET) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + _results = d.pop("results", UNSET) + results: list[TestExecutionDetailResponseResultsItem] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = TestExecutionDetailResponseResultsItem.from_dict( + results_item_data + ) + + results.append(results_item) + + total_pages = d.pop("total_pages", UNSET) + + current_page = d.pop("current_page", UNSET) + + _column_order = d.pop("column_order", UNSET) + column_order: list[TestExecutionDetailResponseColumnOrderItem] | Unset = UNSET + if _column_order is not UNSET: + column_order = [] + for column_order_item_data in _column_order: + column_order_item = ( + TestExecutionDetailResponseColumnOrderItem.from_dict( + column_order_item_data + ) + ) + + column_order.append(column_order_item) + + error_messages = cast(list[str], d.pop("error_messages", UNSET)) + + status = d.pop("status", UNSET) + + provider = d.pop("provider", UNSET) + + agent_type = d.pop("agent_type", UNSET) + + test_execution_detail_response = cls( + count=count, + next_=next_, + previous=previous, + results=results, + total_pages=total_pages, + current_page=current_page, + column_order=column_order, + error_messages=error_messages, + status=status, + provider=provider, + agent_type=agent_type, + ) + + test_execution_detail_response.additional_properties = d + return test_execution_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_detail_response_column_order_item.py b/python/fi/generated/openapi_client/models/test_execution_detail_response_column_order_item.py new file mode 100644 index 0000000..6ce39f2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_detail_response_column_order_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionDetailResponseColumnOrderItem") + + +@_attrs_define +class TestExecutionDetailResponseColumnOrderItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_detail_response_column_order_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + test_execution_detail_response_column_order_item.additional_properties = ( + additional_properties + ) + return test_execution_detail_response_column_order_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_detail_response_results_item.py b/python/fi/generated/openapi_client/models/test_execution_detail_response_results_item.py new file mode 100644 index 0000000..23ec282 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_detail_response_results_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionDetailResponseResultsItem") + + +@_attrs_define +class TestExecutionDetailResponseResultsItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_detail_response_results_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + test_execution_detail_response_results_item.additional_properties = ( + additional_properties + ) + return test_execution_detail_response_results_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_execution_metadata.py b/python/fi/generated/openapi_client/models/test_execution_execution_metadata.py new file mode 100644 index 0000000..f8529fe --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_execution_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionExecutionMetadata") + + +@_attrs_define +class TestExecutionExecutionMetadata: + """Additional metadata about the execution""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_execution_metadata = cls() + + test_execution_execution_metadata.additional_properties = d + return test_execution_execution_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_item_response.py b/python/fi/generated/openapi_client/models/test_execution_item_response.py new file mode 100644 index 0000000..4d21f00 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_item_response.py @@ -0,0 +1,240 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestExecutionItemResponse") + + +@_attrs_define +class TestExecutionItemResponse: + """ + Attributes: + id (str | Unset): + status (str | Unset): + scenarios (str | Unset): + start_time (None | str | Unset): + duration (int | Unset): + error_reason (None | str | Unset): + success_rate (float | Unset): + avg_response_time (float | Unset): + calls (int | Unset): + calls_attempted (int | Unset): + connected_calls (int | Unset): + agent_version (str | Unset): + agent_definition (str | Unset): + calls_connected_percentage (float | Unset): + total_chats (int | Unset): + agent_type (str | Unset): + total_number_of_fagi_agent_turns (int | Unset): + source_type (str | Unset): + """ + + id: str | Unset = UNSET + status: str | Unset = UNSET + scenarios: str | Unset = UNSET + start_time: None | str | Unset = UNSET + duration: int | Unset = UNSET + error_reason: None | str | Unset = UNSET + success_rate: float | Unset = UNSET + avg_response_time: float | Unset = UNSET + calls: int | Unset = UNSET + calls_attempted: int | Unset = UNSET + connected_calls: int | Unset = UNSET + agent_version: str | Unset = UNSET + agent_definition: str | Unset = UNSET + calls_connected_percentage: float | Unset = UNSET + total_chats: int | Unset = UNSET + agent_type: str | Unset = UNSET + total_number_of_fagi_agent_turns: int | Unset = UNSET + source_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + status = self.status + + scenarios = self.scenarios + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + else: + start_time = self.start_time + + duration = self.duration + + error_reason: None | str | Unset + if isinstance(self.error_reason, Unset): + error_reason = UNSET + else: + error_reason = self.error_reason + + success_rate = self.success_rate + + avg_response_time = self.avg_response_time + + calls = self.calls + + calls_attempted = self.calls_attempted + + connected_calls = self.connected_calls + + agent_version = self.agent_version + + agent_definition = self.agent_definition + + calls_connected_percentage = self.calls_connected_percentage + + total_chats = self.total_chats + + agent_type = self.agent_type + + total_number_of_fagi_agent_turns = self.total_number_of_fagi_agent_turns + + source_type = self.source_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if status is not UNSET: + field_dict["status"] = status + if scenarios is not UNSET: + field_dict["scenarios"] = scenarios + if start_time is not UNSET: + field_dict["start_time"] = start_time + if duration is not UNSET: + field_dict["duration"] = duration + if error_reason is not UNSET: + field_dict["error_reason"] = error_reason + if success_rate is not UNSET: + field_dict["success_rate"] = success_rate + if avg_response_time is not UNSET: + field_dict["avg_response_time"] = avg_response_time + if calls is not UNSET: + field_dict["calls"] = calls + if calls_attempted is not UNSET: + field_dict["calls_attempted"] = calls_attempted + if connected_calls is not UNSET: + field_dict["connected_calls"] = connected_calls + if agent_version is not UNSET: + field_dict["agent_version"] = agent_version + if agent_definition is not UNSET: + field_dict["agent_definition"] = agent_definition + if calls_connected_percentage is not UNSET: + field_dict["calls_connected_percentage"] = calls_connected_percentage + if total_chats is not UNSET: + field_dict["total_chats"] = total_chats + if agent_type is not UNSET: + field_dict["agent_type"] = agent_type + if total_number_of_fagi_agent_turns is not UNSET: + field_dict["total_number_of_fagi_agent_turns"] = ( + total_number_of_fagi_agent_turns + ) + if source_type is not UNSET: + field_dict["source_type"] = source_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + status = d.pop("status", UNSET) + + scenarios = d.pop("scenarios", UNSET) + + def _parse_start_time(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + start_time = _parse_start_time(d.pop("start_time", UNSET)) + + duration = d.pop("duration", UNSET) + + def _parse_error_reason(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + error_reason = _parse_error_reason(d.pop("error_reason", UNSET)) + + success_rate = d.pop("success_rate", UNSET) + + avg_response_time = d.pop("avg_response_time", UNSET) + + calls = d.pop("calls", UNSET) + + calls_attempted = d.pop("calls_attempted", UNSET) + + connected_calls = d.pop("connected_calls", UNSET) + + agent_version = d.pop("agent_version", UNSET) + + agent_definition = d.pop("agent_definition", UNSET) + + calls_connected_percentage = d.pop("calls_connected_percentage", UNSET) + + total_chats = d.pop("total_chats", UNSET) + + agent_type = d.pop("agent_type", UNSET) + + total_number_of_fagi_agent_turns = d.pop( + "total_number_of_fagi_agent_turns", UNSET + ) + + source_type = d.pop("source_type", UNSET) + + test_execution_item_response = cls( + id=id, + status=status, + scenarios=scenarios, + start_time=start_time, + duration=duration, + error_reason=error_reason, + success_rate=success_rate, + avg_response_time=avg_response_time, + calls=calls, + calls_attempted=calls_attempted, + connected_calls=connected_calls, + agent_version=agent_version, + agent_definition=agent_definition, + calls_connected_percentage=calls_connected_percentage, + total_chats=total_chats, + agent_type=agent_type, + total_number_of_fagi_agent_turns=total_number_of_fagi_agent_turns, + source_type=source_type, + ) + + test_execution_item_response.additional_properties = d + return test_execution_item_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_rerun.py b/python/fi/generated/openapi_client/models/test_execution_rerun.py new file mode 100644 index 0000000..9d0013d --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_rerun.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.test_execution_rerun_rerun_type import TestExecutionRerunRerunType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TestExecutionRerun") + + +@_attrs_define +class TestExecutionRerun: + """ + Attributes: + rerun_type (TestExecutionRerunRerunType): Type of rerun: evaluation only or call plus evaluation + test_execution_ids (list[UUID] | Unset): List of specific test execution IDs to rerun + select_all (bool | Unset): Whether to rerun all test executions in the run test Default: False. + """ + + rerun_type: TestExecutionRerunRerunType + test_execution_ids: list[UUID] | Unset = UNSET + select_all: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rerun_type = self.rerun_type.value + + test_execution_ids: list[str] | Unset = UNSET + if not isinstance(self.test_execution_ids, Unset): + test_execution_ids = [] + for test_execution_ids_item_data in self.test_execution_ids: + test_execution_ids_item = str(test_execution_ids_item_data) + test_execution_ids.append(test_execution_ids_item) + + select_all = self.select_all + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rerun_type": rerun_type, + } + ) + if test_execution_ids is not UNSET: + field_dict["test_execution_ids"] = test_execution_ids + if select_all is not UNSET: + field_dict["select_all"] = select_all + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rerun_type = TestExecutionRerunRerunType(d.pop("rerun_type")) + + _test_execution_ids = d.pop("test_execution_ids", UNSET) + test_execution_ids: list[UUID] | Unset = UNSET + if _test_execution_ids is not UNSET: + test_execution_ids = [] + for test_execution_ids_item_data in _test_execution_ids: + test_execution_ids_item = UUID(test_execution_ids_item_data) + + test_execution_ids.append(test_execution_ids_item) + + select_all = d.pop("select_all", UNSET) + + test_execution_rerun = cls( + rerun_type=rerun_type, + test_execution_ids=test_execution_ids, + select_all=select_all, + ) + + test_execution_rerun.additional_properties = d + return test_execution_rerun + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_rerun_rerun_type.py b/python/fi/generated/openapi_client/models/test_execution_rerun_rerun_type.py new file mode 100644 index 0000000..534c0c1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_rerun_rerun_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TestExecutionRerunRerunType(str, Enum): + CALL_AND_EVAL = "call_and_eval" + EVAL_ONLY = "eval_only" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/test_execution_rerun_response.py b/python/fi/generated/openapi_client/models/test_execution_rerun_response.py new file mode 100644 index 0000000..3880244 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_rerun_response.py @@ -0,0 +1,141 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.test_execution_rerun_result import TestExecutionRerunResult + + +T = TypeVar("T", bound="TestExecutionRerunResponse") + + +@_attrs_define +class TestExecutionRerunResponse: + """ + Attributes: + message (str | Unset): + run_test_id (UUID | Unset): + rerun_type (str | Unset): + total_test_executions (int | Unset): + results (list[TestExecutionRerunResult] | Unset): + overall_success_count (int | Unset): + overall_failure_count (int | Unset): + """ + + message: str | Unset = UNSET + run_test_id: UUID | Unset = UNSET + rerun_type: str | Unset = UNSET + total_test_executions: int | Unset = UNSET + results: list[TestExecutionRerunResult] | Unset = UNSET + overall_success_count: int | Unset = UNSET + overall_failure_count: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + run_test_id: str | Unset = UNSET + if not isinstance(self.run_test_id, Unset): + run_test_id = str(self.run_test_id) + + rerun_type = self.rerun_type + + total_test_executions = self.total_test_executions + + results: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + overall_success_count = self.overall_success_count + + overall_failure_count = self.overall_failure_count + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message + if run_test_id is not UNSET: + field_dict["run_test_id"] = run_test_id + if rerun_type is not UNSET: + field_dict["rerun_type"] = rerun_type + if total_test_executions is not UNSET: + field_dict["total_test_executions"] = total_test_executions + if results is not UNSET: + field_dict["results"] = results + if overall_success_count is not UNSET: + field_dict["overall_success_count"] = overall_success_count + if overall_failure_count is not UNSET: + field_dict["overall_failure_count"] = overall_failure_count + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_execution_rerun_result import TestExecutionRerunResult + + d = dict(src_dict) + message = d.pop("message", UNSET) + + _run_test_id = d.pop("run_test_id", UNSET) + run_test_id: UUID | Unset + if isinstance(_run_test_id, Unset): + run_test_id = UNSET + else: + run_test_id = UUID(_run_test_id) + + rerun_type = d.pop("rerun_type", UNSET) + + total_test_executions = d.pop("total_test_executions", UNSET) + + _results = d.pop("results", UNSET) + results: list[TestExecutionRerunResult] | Unset = UNSET + if _results is not UNSET: + results = [] + for results_item_data in _results: + results_item = TestExecutionRerunResult.from_dict(results_item_data) + + results.append(results_item) + + overall_success_count = d.pop("overall_success_count", UNSET) + + overall_failure_count = d.pop("overall_failure_count", UNSET) + + test_execution_rerun_response = cls( + message=message, + run_test_id=run_test_id, + rerun_type=rerun_type, + total_test_executions=total_test_executions, + results=results, + overall_success_count=overall_success_count, + overall_failure_count=overall_failure_count, + ) + + test_execution_rerun_response.additional_properties = d + return test_execution_rerun_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_rerun_result.py b/python/fi/generated/openapi_client/models/test_execution_rerun_result.py new file mode 100644 index 0000000..5b765c5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_rerun_result.py @@ -0,0 +1,159 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.test_execution_rerun_result_failed_reruns_item import ( + TestExecutionRerunResultFailedRerunsItem, + ) + + +T = TypeVar("T", bound="TestExecutionRerunResult") + + +@_attrs_define +class TestExecutionRerunResult: + """ + Attributes: + test_execution_id (UUID | Unset): + success_count (int | Unset): + failure_count (int | Unset): + successful_reruns (list[UUID] | Unset): + failed_reruns (list[TestExecutionRerunResultFailedRerunsItem] | Unset): + skipped (bool | Unset): + reason (str | Unset): + """ + + test_execution_id: UUID | Unset = UNSET + success_count: int | Unset = UNSET + failure_count: int | Unset = UNSET + successful_reruns: list[UUID] | Unset = UNSET + failed_reruns: list[TestExecutionRerunResultFailedRerunsItem] | Unset = UNSET + skipped: bool | Unset = UNSET + reason: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + test_execution_id: str | Unset = UNSET + if not isinstance(self.test_execution_id, Unset): + test_execution_id = str(self.test_execution_id) + + success_count = self.success_count + + failure_count = self.failure_count + + successful_reruns: list[str] | Unset = UNSET + if not isinstance(self.successful_reruns, Unset): + successful_reruns = [] + for successful_reruns_item_data in self.successful_reruns: + successful_reruns_item = str(successful_reruns_item_data) + successful_reruns.append(successful_reruns_item) + + failed_reruns: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.failed_reruns, Unset): + failed_reruns = [] + for failed_reruns_item_data in self.failed_reruns: + failed_reruns_item = failed_reruns_item_data.to_dict() + failed_reruns.append(failed_reruns_item) + + skipped = self.skipped + + reason = self.reason + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if test_execution_id is not UNSET: + field_dict["test_execution_id"] = test_execution_id + if success_count is not UNSET: + field_dict["success_count"] = success_count + if failure_count is not UNSET: + field_dict["failure_count"] = failure_count + if successful_reruns is not UNSET: + field_dict["successful_reruns"] = successful_reruns + if failed_reruns is not UNSET: + field_dict["failed_reruns"] = failed_reruns + if skipped is not UNSET: + field_dict["skipped"] = skipped + if reason is not UNSET: + field_dict["reason"] = reason + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_execution_rerun_result_failed_reruns_item import ( + TestExecutionRerunResultFailedRerunsItem, + ) + + d = dict(src_dict) + _test_execution_id = d.pop("test_execution_id", UNSET) + test_execution_id: UUID | Unset + if isinstance(_test_execution_id, Unset): + test_execution_id = UNSET + else: + test_execution_id = UUID(_test_execution_id) + + success_count = d.pop("success_count", UNSET) + + failure_count = d.pop("failure_count", UNSET) + + _successful_reruns = d.pop("successful_reruns", UNSET) + successful_reruns: list[UUID] | Unset = UNSET + if _successful_reruns is not UNSET: + successful_reruns = [] + for successful_reruns_item_data in _successful_reruns: + successful_reruns_item = UUID(successful_reruns_item_data) + + successful_reruns.append(successful_reruns_item) + + _failed_reruns = d.pop("failed_reruns", UNSET) + failed_reruns: list[TestExecutionRerunResultFailedRerunsItem] | Unset = UNSET + if _failed_reruns is not UNSET: + failed_reruns = [] + for failed_reruns_item_data in _failed_reruns: + failed_reruns_item = TestExecutionRerunResultFailedRerunsItem.from_dict( + failed_reruns_item_data + ) + + failed_reruns.append(failed_reruns_item) + + skipped = d.pop("skipped", UNSET) + + reason = d.pop("reason", UNSET) + + test_execution_rerun_result = cls( + test_execution_id=test_execution_id, + success_count=success_count, + failure_count=failure_count, + successful_reruns=successful_reruns, + failed_reruns=failed_reruns, + skipped=skipped, + reason=reason, + ) + + test_execution_rerun_result.additional_properties = d + return test_execution_rerun_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_rerun_result_failed_reruns_item.py b/python/fi/generated/openapi_client/models/test_execution_rerun_result_failed_reruns_item.py new file mode 100644 index 0000000..ef319f1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_rerun_result_failed_reruns_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionRerunResultFailedRerunsItem") + + +@_attrs_define +class TestExecutionRerunResultFailedRerunsItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_rerun_result_failed_reruns_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + test_execution_rerun_result_failed_reruns_item.additional_properties = ( + additional_properties + ) + return test_execution_rerun_result_failed_reruns_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_scenario_ids.py b/python/fi/generated/openapi_client/models/test_execution_scenario_ids.py new file mode 100644 index 0000000..cb38332 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_scenario_ids.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionScenarioIds") + + +@_attrs_define +class TestExecutionScenarioIds: + """List of scenario IDs that were executed in this run""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_scenario_ids = cls() + + test_execution_scenario_ids.additional_properties = d + return test_execution_scenario_ids + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_status.py b/python/fi/generated/openapi_client/models/test_execution_status.py new file mode 100644 index 0000000..180b2ee --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_status.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class TestExecutionStatus(str, Enum): + CANCELLED = "cancelled" + CANCELLING = "cancelling" + COMPLETED = "completed" + EVALUATING = "evaluating" + FAILED = "failed" + PENDING = "pending" + RUNNING = "running" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/test_execution_status_summary.py b/python/fi/generated/openapi_client/models/test_execution_status_summary.py new file mode 100644 index 0000000..199d6b8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_status_summary.py @@ -0,0 +1,194 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +if TYPE_CHECKING: + from ..models.test_execution_status_summary_scenarios_item import ( + TestExecutionStatusSummaryScenariosItem, + ) + + +T = TypeVar("T", bound="TestExecutionStatusSummary") + + +@_attrs_define +class TestExecutionStatusSummary: + """ + Attributes: + run_test_id (str): + execution_id (str): + status (str): + total_scenarios (int): + total_calls (int): + completed_calls (int): + failed_calls (int): + success_rate (float): + start_time (datetime.datetime): + end_time (datetime.datetime | None): + scenarios (list[TestExecutionStatusSummaryScenariosItem]): + error (None | str): + """ + + run_test_id: str + execution_id: str + status: str + total_scenarios: int + total_calls: int + completed_calls: int + failed_calls: int + success_rate: float + start_time: datetime.datetime + end_time: datetime.datetime | None + scenarios: list[TestExecutionStatusSummaryScenariosItem] + error: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + run_test_id = self.run_test_id + + execution_id = self.execution_id + + status = self.status + + total_scenarios = self.total_scenarios + + total_calls = self.total_calls + + completed_calls = self.completed_calls + + failed_calls = self.failed_calls + + success_rate = self.success_rate + + start_time = self.start_time.isoformat() + + end_time: None | str + if isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + scenarios = [] + for scenarios_item_data in self.scenarios: + scenarios_item = scenarios_item_data.to_dict() + scenarios.append(scenarios_item) + + error: None | str + error = self.error + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "run_test_id": run_test_id, + "execution_id": execution_id, + "status": status, + "total_scenarios": total_scenarios, + "total_calls": total_calls, + "completed_calls": completed_calls, + "failed_calls": failed_calls, + "success_rate": success_rate, + "start_time": start_time, + "end_time": end_time, + "scenarios": scenarios, + "error": error, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_execution_status_summary_scenarios_item import ( + TestExecutionStatusSummaryScenariosItem, + ) + + d = dict(src_dict) + run_test_id = d.pop("run_test_id") + + execution_id = d.pop("execution_id") + + status = d.pop("status") + + total_scenarios = d.pop("total_scenarios") + + total_calls = d.pop("total_calls") + + completed_calls = d.pop("completed_calls") + + failed_calls = d.pop("failed_calls") + + success_rate = d.pop("success_rate") + + start_time = isoparse(d.pop("start_time")) + + def _parse_end_time(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = isoparse(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + end_time = _parse_end_time(d.pop("end_time")) + + scenarios = [] + _scenarios = d.pop("scenarios") + for scenarios_item_data in _scenarios: + scenarios_item = TestExecutionStatusSummaryScenariosItem.from_dict( + scenarios_item_data + ) + + scenarios.append(scenarios_item) + + def _parse_error(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + error = _parse_error(d.pop("error")) + + test_execution_status_summary = cls( + run_test_id=run_test_id, + execution_id=execution_id, + status=status, + total_scenarios=total_scenarios, + total_calls=total_calls, + completed_calls=completed_calls, + failed_calls=failed_calls, + success_rate=success_rate, + start_time=start_time, + end_time=end_time, + scenarios=scenarios, + error=error, + ) + + test_execution_status_summary.additional_properties = d + return test_execution_status_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_status_summary_scenarios_item.py b/python/fi/generated/openapi_client/models/test_execution_status_summary_scenarios_item.py new file mode 100644 index 0000000..d7e9ae3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_status_summary_scenarios_item.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TestExecutionStatusSummaryScenariosItem") + + +@_attrs_define +class TestExecutionStatusSummaryScenariosItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + test_execution_status_summary_scenarios_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + test_execution_status_summary_scenarios_item.additional_properties = ( + additional_properties + ) + return test_execution_status_summary_scenarios_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_transcript_call.py b/python/fi/generated/openapi_client/models/test_execution_transcript_call.py new file mode 100644 index 0000000..ff4e3dc --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_transcript_call.py @@ -0,0 +1,154 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.call_transcript import CallTranscript + + +T = TypeVar("T", bound="TestExecutionTranscriptCall") + + +@_attrs_define +class TestExecutionTranscriptCall: + """ + Attributes: + call_execution_id (UUID | Unset): + phone_number (None | str | Unset): + status (str | Unset): + transcripts (list[CallTranscript] | Unset): + total_transcripts (int | Unset): + scenario_name (None | str | Unset): + """ + + call_execution_id: UUID | Unset = UNSET + phone_number: None | str | Unset = UNSET + status: str | Unset = UNSET + transcripts: list[CallTranscript] | Unset = UNSET + total_transcripts: int | Unset = UNSET + scenario_name: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + call_execution_id: str | Unset = UNSET + if not isinstance(self.call_execution_id, Unset): + call_execution_id = str(self.call_execution_id) + + phone_number: None | str | Unset + if isinstance(self.phone_number, Unset): + phone_number = UNSET + else: + phone_number = self.phone_number + + status = self.status + + transcripts: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.transcripts, Unset): + transcripts = [] + for transcripts_item_data in self.transcripts: + transcripts_item = transcripts_item_data.to_dict() + transcripts.append(transcripts_item) + + total_transcripts = self.total_transcripts + + scenario_name: None | str | Unset + if isinstance(self.scenario_name, Unset): + scenario_name = UNSET + else: + scenario_name = self.scenario_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if call_execution_id is not UNSET: + field_dict["call_execution_id"] = call_execution_id + if phone_number is not UNSET: + field_dict["phone_number"] = phone_number + if status is not UNSET: + field_dict["status"] = status + if transcripts is not UNSET: + field_dict["transcripts"] = transcripts + if total_transcripts is not UNSET: + field_dict["total_transcripts"] = total_transcripts + if scenario_name is not UNSET: + field_dict["scenario_name"] = scenario_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.call_transcript import CallTranscript + + d = dict(src_dict) + _call_execution_id = d.pop("call_execution_id", UNSET) + call_execution_id: UUID | Unset + if isinstance(_call_execution_id, Unset): + call_execution_id = UNSET + else: + call_execution_id = UUID(_call_execution_id) + + def _parse_phone_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_number = _parse_phone_number(d.pop("phone_number", UNSET)) + + status = d.pop("status", UNSET) + + _transcripts = d.pop("transcripts", UNSET) + transcripts: list[CallTranscript] | Unset = UNSET + if _transcripts is not UNSET: + transcripts = [] + for transcripts_item_data in _transcripts: + transcripts_item = CallTranscript.from_dict(transcripts_item_data) + + transcripts.append(transcripts_item) + + total_transcripts = d.pop("total_transcripts", UNSET) + + def _parse_scenario_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scenario_name = _parse_scenario_name(d.pop("scenario_name", UNSET)) + + test_execution_transcript_call = cls( + call_execution_id=call_execution_id, + phone_number=phone_number, + status=status, + transcripts=transcripts, + total_transcripts=total_transcripts, + scenario_name=scenario_name, + ) + + test_execution_transcript_call.additional_properties = d + return test_execution_transcript_call + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/test_execution_transcripts_response.py b/python/fi/generated/openapi_client/models/test_execution_transcripts_response.py new file mode 100644 index 0000000..f5e97dd --- /dev/null +++ b/python/fi/generated/openapi_client/models/test_execution_transcripts_response.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.test_execution_transcript_call import TestExecutionTranscriptCall + + +T = TypeVar("T", bound="TestExecutionTranscriptsResponse") + + +@_attrs_define +class TestExecutionTranscriptsResponse: + """ + Attributes: + test_execution_id (UUID | Unset): + calls (list[TestExecutionTranscriptCall] | Unset): + total_calls (int | Unset): + total_transcripts (int | Unset): + """ + + test_execution_id: UUID | Unset = UNSET + calls: list[TestExecutionTranscriptCall] | Unset = UNSET + total_calls: int | Unset = UNSET + total_transcripts: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + test_execution_id: str | Unset = UNSET + if not isinstance(self.test_execution_id, Unset): + test_execution_id = str(self.test_execution_id) + + calls: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.calls, Unset): + calls = [] + for calls_item_data in self.calls: + calls_item = calls_item_data.to_dict() + calls.append(calls_item) + + total_calls = self.total_calls + + total_transcripts = self.total_transcripts + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if test_execution_id is not UNSET: + field_dict["test_execution_id"] = test_execution_id + if calls is not UNSET: + field_dict["calls"] = calls + if total_calls is not UNSET: + field_dict["total_calls"] = total_calls + if total_transcripts is not UNSET: + field_dict["total_transcripts"] = total_transcripts + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.test_execution_transcript_call import TestExecutionTranscriptCall + + d = dict(src_dict) + _test_execution_id = d.pop("test_execution_id", UNSET) + test_execution_id: UUID | Unset + if isinstance(_test_execution_id, Unset): + test_execution_id = UNSET + else: + test_execution_id = UUID(_test_execution_id) + + _calls = d.pop("calls", UNSET) + calls: list[TestExecutionTranscriptCall] | Unset = UNSET + if _calls is not UNSET: + calls = [] + for calls_item_data in _calls: + calls_item = TestExecutionTranscriptCall.from_dict(calls_item_data) + + calls.append(calls_item) + + total_calls = d.pop("total_calls", UNSET) + + total_transcripts = d.pop("total_transcripts", UNSET) + + test_execution_transcripts_response = cls( + test_execution_id=test_execution_id, + calls=calls, + total_calls=total_calls, + total_transcripts=total_transcripts, + ) + + test_execution_transcripts_response.additional_properties = d + return test_execution_transcripts_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace.py b/python/fi/generated/openapi_client/models/trace.py new file mode 100644 index 0000000..33e7bbe --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace.py @@ -0,0 +1,246 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_error import TraceError + from ..models.trace_input import TraceInput + from ..models.trace_metadata import TraceMetadata + from ..models.trace_output import TraceOutput + from ..models.trace_tags import TraceTags + + +T = TypeVar("T", bound="Trace") + + +@_attrs_define +class Trace: + """ + Attributes: + project (UUID): + id (UUID | Unset): + project_version (UUID | Unset): + name (None | str | Unset): + metadata (TraceMetadata | Unset): + input_ (TraceInput | Unset): + output (TraceOutput | Unset): + error (TraceError | Unset): + session (UUID | Unset): + external_id (None | str | Unset): + tags (TraceTags | Unset): + """ + + project: UUID + id: UUID | Unset = UNSET + project_version: UUID | Unset = UNSET + name: None | str | Unset = UNSET + metadata: TraceMetadata | Unset = UNSET + input_: TraceInput | Unset = UNSET + output: TraceOutput | Unset = UNSET + error: TraceError | Unset = UNSET + session: UUID | Unset = UNSET + external_id: None | str | Unset = UNSET + tags: TraceTags | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project = str(self.project) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + project_version: str | Unset = UNSET + if not isinstance(self.project_version, Unset): + project_version = str(self.project_version) + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + metadata: dict[str, Any] | Unset = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + input_: dict[str, Any] | Unset = UNSET + if not isinstance(self.input_, Unset): + input_ = self.input_.to_dict() + + output: dict[str, Any] | Unset = UNSET + if not isinstance(self.output, Unset): + output = self.output.to_dict() + + error: dict[str, Any] | Unset = UNSET + if not isinstance(self.error, Unset): + error = self.error.to_dict() + + session: str | Unset = UNSET + if not isinstance(self.session, Unset): + session = str(self.session) + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + tags: dict[str, Any] | Unset = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "project": project, + } + ) + if id is not UNSET: + field_dict["id"] = id + if project_version is not UNSET: + field_dict["project_version"] = project_version + if name is not UNSET: + field_dict["name"] = name + if metadata is not UNSET: + field_dict["metadata"] = metadata + if input_ is not UNSET: + field_dict["input"] = input_ + if output is not UNSET: + field_dict["output"] = output + if error is not UNSET: + field_dict["error"] = error + if session is not UNSET: + field_dict["session"] = session + if external_id is not UNSET: + field_dict["external_id"] = external_id + if tags is not UNSET: + field_dict["tags"] = tags + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_error import TraceError + from ..models.trace_input import TraceInput + from ..models.trace_metadata import TraceMetadata + from ..models.trace_output import TraceOutput + from ..models.trace_tags import TraceTags + + d = dict(src_dict) + project = UUID(d.pop("project")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _project_version = d.pop("project_version", UNSET) + project_version: UUID | Unset + if isinstance(_project_version, Unset): + project_version = UNSET + else: + project_version = UUID(_project_version) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + _metadata = d.pop("metadata", UNSET) + metadata: TraceMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = TraceMetadata.from_dict(_metadata) + + _input_ = d.pop("input", UNSET) + input_: TraceInput | Unset + if isinstance(_input_, Unset): + input_ = UNSET + else: + input_ = TraceInput.from_dict(_input_) + + _output = d.pop("output", UNSET) + output: TraceOutput | Unset + if isinstance(_output, Unset): + output = UNSET + else: + output = TraceOutput.from_dict(_output) + + _error = d.pop("error", UNSET) + error: TraceError | Unset + if isinstance(_error, Unset): + error = UNSET + else: + error = TraceError.from_dict(_error) + + _session = d.pop("session", UNSET) + session: UUID | Unset + if isinstance(_session, Unset): + session = UNSET + else: + session = UUID(_session) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _tags = d.pop("tags", UNSET) + tags: TraceTags | Unset + if isinstance(_tags, Unset): + tags = UNSET + else: + tags = TraceTags.from_dict(_tags) + + trace = cls( + project=project, + id=id, + project_version=project_version, + name=name, + metadata=metadata, + input_=input_, + output=output, + error=error, + session=session, + external_id=external_id, + tags=tags, + ) + + trace.additional_properties = d + return trace + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_annotation_note_response.py b/python/fi/generated/openapi_client/models/trace_annotation_note_response.py new file mode 100644 index 0000000..a41898c --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_annotation_note_response.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +T = TypeVar("T", bound="TraceAnnotationNoteResponse") + + +@_attrs_define +class TraceAnnotationNoteResponse: + """ + Attributes: + id (UUID): + notes (str): + created_by_annotator (str): + created_by_user (str): + created_by_user_id (UUID): + updated_at (datetime.datetime): + """ + + id: UUID + notes: str + created_by_annotator: str + created_by_user: str + created_by_user_id: UUID + updated_at: datetime.datetime + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + notes = self.notes + + created_by_annotator = self.created_by_annotator + + created_by_user = self.created_by_user + + created_by_user_id = str(self.created_by_user_id) + + updated_at = self.updated_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "notes": notes, + "created_by_annotator": created_by_annotator, + "created_by_user": created_by_user, + "created_by_user_id": created_by_user_id, + "updated_at": updated_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + notes = d.pop("notes") + + created_by_annotator = d.pop("created_by_annotator") + + created_by_user = d.pop("created_by_user") + + created_by_user_id = UUID(d.pop("created_by_user_id")) + + updated_at = isoparse(d.pop("updated_at")) + + trace_annotation_note_response = cls( + id=id, + notes=notes, + created_by_annotator=created_by_annotator, + created_by_user=created_by_user, + created_by_user_id=created_by_user_id, + updated_at=updated_at, + ) + + trace_annotation_note_response.additional_properties = d + return trace_annotation_note_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_annotation_value_response.py b/python/fi/generated/openapi_client/models/trace_annotation_value_response.py new file mode 100644 index 0000000..79b49e1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_annotation_value_response.py @@ -0,0 +1,232 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_annotation_value_response_annotation_value import ( + TraceAnnotationValueResponseAnnotationValue, + ) + from ..models.trace_annotation_value_response_settings import ( + TraceAnnotationValueResponseSettings, + ) + + +T = TypeVar("T", bound="TraceAnnotationValueResponse") + + +@_attrs_define +class TraceAnnotationValueResponse: + """ + Attributes: + id (UUID): + annotation_label_name (str): + annotation_value (TraceAnnotationValueResponseAnnotationValue): + annotation_label_id (UUID): + annotation_type (str): + annotator (None | str | Unset): + annotator_id (None | Unset | UUID): + updated_by (None | str | Unset): + updated_at (datetime.datetime | None | Unset): + settings (TraceAnnotationValueResponseSettings | Unset): + """ + + id: UUID + annotation_label_name: str + annotation_value: TraceAnnotationValueResponseAnnotationValue + annotation_label_id: UUID + annotation_type: str + annotator: None | str | Unset = UNSET + annotator_id: None | Unset | UUID = UNSET + updated_by: None | str | Unset = UNSET + updated_at: datetime.datetime | None | Unset = UNSET + settings: TraceAnnotationValueResponseSettings | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + annotation_label_name = self.annotation_label_name + + annotation_value = self.annotation_value.to_dict() + + annotation_label_id = str(self.annotation_label_id) + + annotation_type = self.annotation_type + + annotator: None | str | Unset + if isinstance(self.annotator, Unset): + annotator = UNSET + else: + annotator = self.annotator + + annotator_id: None | str | Unset + if isinstance(self.annotator_id, Unset): + annotator_id = UNSET + elif isinstance(self.annotator_id, UUID): + annotator_id = str(self.annotator_id) + else: + annotator_id = self.annotator_id + + updated_by: None | str | Unset + if isinstance(self.updated_by, Unset): + updated_by = UNSET + else: + updated_by = self.updated_by + + updated_at: None | str | Unset + if isinstance(self.updated_at, Unset): + updated_at = UNSET + elif isinstance(self.updated_at, datetime.datetime): + updated_at = self.updated_at.isoformat() + else: + updated_at = self.updated_at + + settings: dict[str, Any] | Unset = UNSET + if not isinstance(self.settings, Unset): + settings = self.settings.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "annotation_label_name": annotation_label_name, + "annotation_value": annotation_value, + "annotation_label_id": annotation_label_id, + "annotation_type": annotation_type, + } + ) + if annotator is not UNSET: + field_dict["annotator"] = annotator + if annotator_id is not UNSET: + field_dict["annotator_id"] = annotator_id + if updated_by is not UNSET: + field_dict["updated_by"] = updated_by + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if settings is not UNSET: + field_dict["settings"] = settings + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_annotation_value_response_annotation_value import ( + TraceAnnotationValueResponseAnnotationValue, + ) + from ..models.trace_annotation_value_response_settings import ( + TraceAnnotationValueResponseSettings, + ) + + d = dict(src_dict) + id = UUID(d.pop("id")) + + annotation_label_name = d.pop("annotation_label_name") + + annotation_value = TraceAnnotationValueResponseAnnotationValue.from_dict( + d.pop("annotation_value") + ) + + annotation_label_id = UUID(d.pop("annotation_label_id")) + + annotation_type = d.pop("annotation_type") + + def _parse_annotator(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + annotator = _parse_annotator(d.pop("annotator", UNSET)) + + def _parse_annotator_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + annotator_id_type_0 = UUID(data) + + return annotator_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + annotator_id = _parse_annotator_id(d.pop("annotator_id", UNSET)) + + def _parse_updated_by(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + updated_by = _parse_updated_by(d.pop("updated_by", UNSET)) + + def _parse_updated_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + updated_at_type_0 = isoparse(data) + + return updated_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + updated_at = _parse_updated_at(d.pop("updated_at", UNSET)) + + _settings = d.pop("settings", UNSET) + settings: TraceAnnotationValueResponseSettings | Unset + if isinstance(_settings, Unset): + settings = UNSET + else: + settings = TraceAnnotationValueResponseSettings.from_dict(_settings) + + trace_annotation_value_response = cls( + id=id, + annotation_label_name=annotation_label_name, + annotation_value=annotation_value, + annotation_label_id=annotation_label_id, + annotation_type=annotation_type, + annotator=annotator, + annotator_id=annotator_id, + updated_by=updated_by, + updated_at=updated_at, + settings=settings, + ) + + trace_annotation_value_response.additional_properties = d + return trace_annotation_value_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_annotation_value_response_annotation_value.py b/python/fi/generated/openapi_client/models/trace_annotation_value_response_annotation_value.py new file mode 100644 index 0000000..5a47ce3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_annotation_value_response_annotation_value.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceAnnotationValueResponseAnnotationValue") + + +@_attrs_define +class TraceAnnotationValueResponseAnnotationValue: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_annotation_value_response_annotation_value = cls() + + trace_annotation_value_response_annotation_value.additional_properties = d + return trace_annotation_value_response_annotation_value + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_annotation_value_response_settings.py b/python/fi/generated/openapi_client/models/trace_annotation_value_response_settings.py new file mode 100644 index 0000000..285f63b --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_annotation_value_response_settings.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceAnnotationValueResponseSettings") + + +@_attrs_define +class TraceAnnotationValueResponseSettings: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_annotation_value_response_settings = cls() + + trace_annotation_value_response_settings.additional_properties = d + return trace_annotation_value_response_settings + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_error.py b/python/fi/generated/openapi_client/models/trace_error.py new file mode 100644 index 0000000..496ccd9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_error.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceError") + + +@_attrs_define +class TraceError: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_error = cls() + + trace_error.additional_properties = d + return trace_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_evidence.py b/python/fi/generated/openapi_client/models/trace_evidence.py new file mode 100644 index 0000000..56ba1ca --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_evidence.py @@ -0,0 +1,122 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.trace_evidence_fail_reel_item import TraceEvidenceFailReelItem + from ..models.trace_evidence_pass_reel_item import TraceEvidencePassReelItem + + +T = TypeVar("T", bound="TraceEvidence") + + +@_attrs_define +class TraceEvidence: + """ + Attributes: + input_ (None | str): + output (None | str): + fail_reel (list[TraceEvidenceFailReelItem]): + pass_reel (list[TraceEvidencePassReelItem]): + """ + + input_: None | str + output: None | str + fail_reel: list[TraceEvidenceFailReelItem] + pass_reel: list[TraceEvidencePassReelItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + input_: None | str + input_ = self.input_ + + output: None | str + output = self.output + + fail_reel = [] + for fail_reel_item_data in self.fail_reel: + fail_reel_item = fail_reel_item_data.to_dict() + fail_reel.append(fail_reel_item) + + pass_reel = [] + for pass_reel_item_data in self.pass_reel: + pass_reel_item = pass_reel_item_data.to_dict() + pass_reel.append(pass_reel_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "input": input_, + "output": output, + "fail_reel": fail_reel, + "pass_reel": pass_reel, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_evidence_fail_reel_item import TraceEvidenceFailReelItem + from ..models.trace_evidence_pass_reel_item import TraceEvidencePassReelItem + + d = dict(src_dict) + + def _parse_input_(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + input_ = _parse_input_(d.pop("input")) + + def _parse_output(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + output = _parse_output(d.pop("output")) + + fail_reel = [] + _fail_reel = d.pop("fail_reel") + for fail_reel_item_data in _fail_reel: + fail_reel_item = TraceEvidenceFailReelItem.from_dict(fail_reel_item_data) + + fail_reel.append(fail_reel_item) + + pass_reel = [] + _pass_reel = d.pop("pass_reel") + for pass_reel_item_data in _pass_reel: + pass_reel_item = TraceEvidencePassReelItem.from_dict(pass_reel_item_data) + + pass_reel.append(pass_reel_item) + + trace_evidence = cls( + input_=input_, + output=output, + fail_reel=fail_reel, + pass_reel=pass_reel, + ) + + trace_evidence.additional_properties = d + return trace_evidence + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_evidence_fail_reel_item.py b/python/fi/generated/openapi_client/models/trace_evidence_fail_reel_item.py new file mode 100644 index 0000000..3d3a9cc --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_evidence_fail_reel_item.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceEvidenceFailReelItem") + + +@_attrs_define +class TraceEvidenceFailReelItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_evidence_fail_reel_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + trace_evidence_fail_reel_item.additional_properties = additional_properties + return trace_evidence_fail_reel_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_evidence_pass_reel_item.py b/python/fi/generated/openapi_client/models/trace_evidence_pass_reel_item.py new file mode 100644 index 0000000..01535ae --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_evidence_pass_reel_item.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceEvidencePassReelItem") + + +@_attrs_define +class TraceEvidencePassReelItem: + """ """ + + additional_properties: dict[str, None | str] = _attrs_field( + init=False, factory=dict + ) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_evidence_pass_reel_item = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + + def _parse_additional_property(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + additional_property = _parse_additional_property(prop_dict) + + additional_properties[prop_name] = additional_property + + trace_evidence_pass_reel_item.additional_properties = additional_properties + return trace_evidence_pass_reel_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> None | str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: None | str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_input.py b/python/fi/generated/openapi_client/models/trace_input.py new file mode 100644 index 0000000..6d38bfc --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_input.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceInput") + + +@_attrs_define +class TraceInput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_input = cls() + + trace_input.additional_properties = d + return trace_input + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_metadata.py b/python/fi/generated/openapi_client/models/trace_metadata.py new file mode 100644 index 0000000..20df51a --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_metadata.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceMetadata") + + +@_attrs_define +class TraceMetadata: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_metadata = cls() + + trace_metadata.additional_properties = d + return trace_metadata + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_output.py b/python/fi/generated/openapi_client/models/trace_output.py new file mode 100644 index 0000000..666c5f8 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_output.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceOutput") + + +@_attrs_define +class TraceOutput: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_output = cls() + + trace_output.additional_properties = d + return trace_output + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_preview.py b/python/fi/generated/openapi_client/models/trace_preview.py new file mode 100644 index 0000000..596558d --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_preview.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TracePreview") + + +@_attrs_define +class TracePreview: + """ + Attributes: + trace_id (str): + input_ (None | str): + output (None | str): + """ + + trace_id: str + input_: None | str + output: None | str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + trace_id = self.trace_id + + input_: None | str + input_ = self.input_ + + output: None | str + output = self.output + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "trace_id": trace_id, + "input": input_, + "output": output, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_id = d.pop("trace_id") + + def _parse_input_(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + input_ = _parse_input_(d.pop("input")) + + def _parse_output(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + output = _parse_output(d.pop("output")) + + trace_preview = cls( + trace_id=trace_id, + input_=input_, + output=output, + ) + + trace_preview.additional_properties = d + return trace_preview + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_session.py b/python/fi/generated/openapi_client/models/trace_session.py new file mode 100644 index 0000000..d4d2757 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_session.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TraceSession") + + +@_attrs_define +class TraceSession: + """ + Attributes: + project (UUID): + id (UUID | Unset): + bookmarked (bool | Unset): + name (None | str | Unset): + created_at (datetime.datetime | Unset): + """ + + project: UUID + id: UUID | Unset = UNSET + bookmarked: bool | Unset = UNSET + name: None | str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project = str(self.project) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + bookmarked = self.bookmarked + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "project": project, + } + ) + if id is not UNSET: + field_dict["id"] = id + if bookmarked is not UNSET: + field_dict["bookmarked"] = bookmarked + if name is not UNSET: + field_dict["name"] = name + if created_at is not UNSET: + field_dict["created_at"] = created_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + project = UUID(d.pop("project")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + bookmarked = d.pop("bookmarked", UNSET) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + trace_session = cls( + project=project, + id=id, + bookmarked=bookmarked, + name=name, + created_at=created_at, + ) + + trace_session.additional_properties = d + return trace_session + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_session_graph_data_request.py b/python/fi/generated/openapi_client/models/trace_session_graph_data_request.py new file mode 100644 index 0000000..7b863da --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_session_graph_data_request.py @@ -0,0 +1,143 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.trace_session_graph_data_request_interval import ( + TraceSessionGraphDataRequestInterval, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_session_graph_data_request_filters_item import ( + TraceSessionGraphDataRequestFiltersItem, + ) + from ..models.trace_session_graph_data_request_req_data_config import ( + TraceSessionGraphDataRequestReqDataConfig, + ) + + +T = TypeVar("T", bound="TraceSessionGraphDataRequest") + + +@_attrs_define +class TraceSessionGraphDataRequest: + """ + Attributes: + project_id (UUID): + req_data_config (TraceSessionGraphDataRequestReqDataConfig): + filters (list[TraceSessionGraphDataRequestFiltersItem] | Unset): + interval (TraceSessionGraphDataRequestInterval | Unset): Default: TraceSessionGraphDataRequestInterval.DAY. + property_ (str | Unset): Default: 'average'. + """ + + project_id: UUID + req_data_config: TraceSessionGraphDataRequestReqDataConfig + filters: list[TraceSessionGraphDataRequestFiltersItem] | Unset = UNSET + interval: TraceSessionGraphDataRequestInterval | Unset = ( + TraceSessionGraphDataRequestInterval.DAY + ) + property_: str | Unset = "average" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project_id = str(self.project_id) + + req_data_config = self.req_data_config.to_dict() + + filters: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = [] + for filters_item_data in self.filters: + filters_item = filters_item_data.to_dict() + filters.append(filters_item) + + interval: str | Unset = UNSET + if not isinstance(self.interval, Unset): + interval = self.interval.value + + property_ = self.property_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "project_id": project_id, + "req_data_config": req_data_config, + } + ) + if filters is not UNSET: + field_dict["filters"] = filters + if interval is not UNSET: + field_dict["interval"] = interval + if property_ is not UNSET: + field_dict["property"] = property_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_session_graph_data_request_filters_item import ( + TraceSessionGraphDataRequestFiltersItem, + ) + from ..models.trace_session_graph_data_request_req_data_config import ( + TraceSessionGraphDataRequestReqDataConfig, + ) + + d = dict(src_dict) + project_id = UUID(d.pop("project_id")) + + req_data_config = TraceSessionGraphDataRequestReqDataConfig.from_dict( + d.pop("req_data_config") + ) + + _filters = d.pop("filters", UNSET) + filters: list[TraceSessionGraphDataRequestFiltersItem] | Unset = UNSET + if _filters is not UNSET: + filters = [] + for filters_item_data in _filters: + filters_item = TraceSessionGraphDataRequestFiltersItem.from_dict( + filters_item_data + ) + + filters.append(filters_item) + + _interval = d.pop("interval", UNSET) + interval: TraceSessionGraphDataRequestInterval | Unset + if isinstance(_interval, Unset): + interval = UNSET + else: + interval = TraceSessionGraphDataRequestInterval(_interval) + + property_ = d.pop("property", UNSET) + + trace_session_graph_data_request = cls( + project_id=project_id, + req_data_config=req_data_config, + filters=filters, + interval=interval, + property_=property_, + ) + + trace_session_graph_data_request.additional_properties = d + return trace_session_graph_data_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item.py b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item.py new file mode 100644 index 0000000..0e627a2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_session_graph_data_request_filters_item_filter_config import ( + TraceSessionGraphDataRequestFiltersItemFilterConfig, + ) + + +T = TypeVar("T", bound="TraceSessionGraphDataRequestFiltersItem") + + +@_attrs_define +class TraceSessionGraphDataRequestFiltersItem: + """ + Attributes: + column_id (str): Column or attribute id to filter on. + filter_config (TraceSessionGraphDataRequestFiltersItemFilterConfig): + display_name (str | Unset): Optional UI label for chips and saved views. + source (str | Unset): Optional source surface for mixed-source filters, for example traces, datasets, or + simulation. + output_type (str | Unset): Optional metric output type metadata used by eval and annotation filters. + """ + + column_id: str + filter_config: TraceSessionGraphDataRequestFiltersItemFilterConfig + display_name: str | Unset = UNSET + source: str | Unset = UNSET + output_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + column_id = self.column_id + + filter_config = self.filter_config.to_dict() + + display_name = self.display_name + + source = self.source + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "column_id": column_id, + "filter_config": filter_config, + } + ) + if display_name is not UNSET: + field_dict["display_name"] = display_name + if source is not UNSET: + field_dict["source"] = source + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_session_graph_data_request_filters_item_filter_config import ( + TraceSessionGraphDataRequestFiltersItemFilterConfig, + ) + + d = dict(src_dict) + column_id = d.pop("column_id") + + filter_config = TraceSessionGraphDataRequestFiltersItemFilterConfig.from_dict( + d.pop("filter_config") + ) + + display_name = d.pop("display_name", UNSET) + + source = d.pop("source", UNSET) + + output_type = d.pop("output_type", UNSET) + + trace_session_graph_data_request_filters_item = cls( + column_id=column_id, + filter_config=filter_config, + display_name=display_name, + source=source, + output_type=output_type, + ) + + return trace_session_graph_data_request_filters_item diff --git a/python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item_filter_config.py b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item_filter_config.py new file mode 100644 index 0000000..11ce28e --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_filters_item_filter_config.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TraceSessionGraphDataRequestFiltersItemFilterConfig") + + +@_attrs_define +class TraceSessionGraphDataRequestFiltersItemFilterConfig: + """ + Attributes: + filter_type (str): Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, + annotator, or array. + filter_op (str): Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, + not_in, between, not_between, is_null, or is_not_null. + filter_value (Any | Unset): Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + col_type (str | Unset): Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + """ + + filter_type: str + filter_op: str + filter_value: Any | Unset = UNSET + col_type: str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + filter_type = self.filter_type + + filter_op = self.filter_op + + filter_value = self.filter_value + + col_type = self.col_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "filter_type": filter_type, + "filter_op": filter_op, + } + ) + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + if col_type is not UNSET: + field_dict["col_type"] = col_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + filter_type = d.pop("filter_type") + + filter_op = d.pop("filter_op") + + filter_value = d.pop("filter_value", UNSET) + + col_type = d.pop("col_type", UNSET) + + trace_session_graph_data_request_filters_item_filter_config = cls( + filter_type=filter_type, + filter_op=filter_op, + filter_value=filter_value, + col_type=col_type, + ) + + return trace_session_graph_data_request_filters_item_filter_config diff --git a/python/fi/generated/openapi_client/models/trace_session_graph_data_request_interval.py b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_interval.py new file mode 100644 index 0000000..ffe54b0 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_interval.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class TraceSessionGraphDataRequestInterval(str, Enum): + DAY = "day" + HOUR = "hour" + MONTH = "month" + WEEK = "week" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config.py b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config.py new file mode 100644 index 0000000..f79b4bc --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.trace_session_graph_data_request_req_data_config_type import ( + TraceSessionGraphDataRequestReqDataConfigType, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TraceSessionGraphDataRequestReqDataConfig") + + +@_attrs_define +class TraceSessionGraphDataRequestReqDataConfig: + """ + Attributes: + id (str): + type_ (TraceSessionGraphDataRequestReqDataConfigType): + output_type (str | Unset): + eval_output_type (str | Unset): + choices (list[str] | Unset): + value (Any | Unset): + filter_op (str | Unset): + filter_value (Any | Unset): + """ + + id: str + type_: TraceSessionGraphDataRequestReqDataConfigType + output_type: str | Unset = UNSET + eval_output_type: str | Unset = UNSET + choices: list[str] | Unset = UNSET + value: Any | Unset = UNSET + filter_op: str | Unset = UNSET + filter_value: Any | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_ = self.type_.value + + output_type = self.output_type + + eval_output_type = self.eval_output_type + + choices: list[str] | Unset = UNSET + if not isinstance(self.choices, Unset): + choices = self.choices + + value = self.value + + filter_op = self.filter_op + + filter_value = self.filter_value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "id": id, + "type": type_, + } + ) + if output_type is not UNSET: + field_dict["output_type"] = output_type + if eval_output_type is not UNSET: + field_dict["eval_output_type"] = eval_output_type + if choices is not UNSET: + field_dict["choices"] = choices + if value is not UNSET: + field_dict["value"] = value + if filter_op is not UNSET: + field_dict["filter_op"] = filter_op + if filter_value is not UNSET: + field_dict["filter_value"] = filter_value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + type_ = TraceSessionGraphDataRequestReqDataConfigType(d.pop("type")) + + output_type = d.pop("output_type", UNSET) + + eval_output_type = d.pop("eval_output_type", UNSET) + + choices = cast(list[str], d.pop("choices", UNSET)) + + value = d.pop("value", UNSET) + + filter_op = d.pop("filter_op", UNSET) + + filter_value = d.pop("filter_value", UNSET) + + trace_session_graph_data_request_req_data_config = cls( + id=id, + type_=type_, + output_type=output_type, + eval_output_type=eval_output_type, + choices=choices, + value=value, + filter_op=filter_op, + filter_value=filter_value, + ) + + return trace_session_graph_data_request_req_data_config diff --git a/python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config_type.py b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config_type.py new file mode 100644 index 0000000..f06ec04 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_session_graph_data_request_req_data_config_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class TraceSessionGraphDataRequestReqDataConfigType(str, Enum): + ANNOTATION = "ANNOTATION" + EVAL = "EVAL" + SYSTEM_METRIC = "SYSTEM_METRIC" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/trace_summary.py b/python/fi/generated/openapi_client/models/trace_summary.py new file mode 100644 index 0000000..176ef46 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_summary.py @@ -0,0 +1,138 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceSummary") + + +@_attrs_define +class TraceSummary: + """ + Attributes: + eval_score (float | None): + latency_ms (int | None): + turns (int | None): + model (None | str): + input_tokens (int | None): + output_tokens (int | None): + """ + + eval_score: float | None + latency_ms: int | None + turns: int | None + model: None | str + input_tokens: int | None + output_tokens: int | None + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + eval_score: float | None + eval_score = self.eval_score + + latency_ms: int | None + latency_ms = self.latency_ms + + turns: int | None + turns = self.turns + + model: None | str + model = self.model + + input_tokens: int | None + input_tokens = self.input_tokens + + output_tokens: int | None + output_tokens = self.output_tokens + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "eval_score": eval_score, + "latency_ms": latency_ms, + "turns": turns, + "model": model, + "input_tokens": input_tokens, + "output_tokens": output_tokens, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_eval_score(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + eval_score = _parse_eval_score(d.pop("eval_score")) + + def _parse_latency_ms(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + latency_ms = _parse_latency_ms(d.pop("latency_ms")) + + def _parse_turns(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + turns = _parse_turns(d.pop("turns")) + + def _parse_model(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + model = _parse_model(d.pop("model")) + + def _parse_input_tokens(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + input_tokens = _parse_input_tokens(d.pop("input_tokens")) + + def _parse_output_tokens(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + output_tokens = _parse_output_tokens(d.pop("output_tokens")) + + trace_summary = cls( + eval_score=eval_score, + latency_ms=latency_ms, + turns=turns, + model=model, + input_tokens=input_tokens, + output_tokens=output_tokens, + ) + + trace_summary.additional_properties = d + return trace_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_tags.py b/python/fi/generated/openapi_client/models/trace_tags.py new file mode 100644 index 0000000..1912c51 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_tags.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceTags") + + +@_attrs_define +class TraceTags: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + trace_tags = cls() + + trace_tags.additional_properties = d + return trace_tags + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trace_tags_update.py b/python/fi/generated/openapi_client/models/trace_tags_update.py new file mode 100644 index 0000000..96e271d --- /dev/null +++ b/python/fi/generated/openapi_client/models/trace_tags_update.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TraceTagsUpdate") + + +@_attrs_define +class TraceTagsUpdate: + """ + Attributes: + tags (list[str]): + """ + + tags: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + tags = self.tags + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "tags": tags, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + tags = cast(list[str], d.pop("tags")) + + trace_tags_update = cls( + tags=tags, + ) + + trace_tags_update.additional_properties = d + return trace_tags_update + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_agent_graph_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_agent_graph_response_200.py new file mode 100644 index 0000000..9e2ee7e --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_agent_graph_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="TracerTraceAgentGraphResponse200") + + +@_attrs_define +class TracerTraceAgentGraphResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_agent_graph_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_agent_graph_response_200.additional_properties = d + return tracer_trace_agent_graph_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_annotation_list_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_annotation_list_response_200.py new file mode 100644 index 0000000..50b4561 --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_annotation_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.get_trace_annotation import GetTraceAnnotation + + +T = TypeVar("T", bound="TracerTraceAnnotationListResponse200") + + +@_attrs_define +class TracerTraceAnnotationListResponse200: + """ + Attributes: + count (int): + results (list[GetTraceAnnotation]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[GetTraceAnnotation] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.get_trace_annotation import GetTraceAnnotation + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = GetTraceAnnotation.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_annotation_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_annotation_list_response_200.additional_properties = d + return tracer_trace_annotation_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_get_eval_names_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_get_eval_names_response_200.py new file mode 100644 index 0000000..762f7da --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_get_eval_names_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="TracerTraceGetEvalNamesResponse200") + + +@_attrs_define +class TracerTraceGetEvalNamesResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_get_eval_names_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_get_eval_names_response_200.additional_properties = d + return tracer_trace_get_eval_names_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_get_trace_export_data_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_get_trace_export_data_response_200.py new file mode 100644 index 0000000..ed6dab9 --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_get_trace_export_data_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="TracerTraceGetTraceExportDataResponse200") + + +@_attrs_define +class TracerTraceGetTraceExportDataResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_get_trace_export_data_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_get_trace_export_data_response_200.additional_properties = d + return tracer_trace_get_trace_export_data_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_observe_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_observe_response_200.py new file mode 100644 index 0000000..c5da417 --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_observe_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="TracerTraceGetTraceIdByIndexObserveResponse200") + + +@_attrs_define +class TracerTraceGetTraceIdByIndexObserveResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_get_trace_id_by_index_observe_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_get_trace_id_by_index_observe_response_200.additional_properties = d + return tracer_trace_get_trace_id_by_index_observe_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_response_200.py new file mode 100644 index 0000000..a982481 --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_get_trace_id_by_index_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="TracerTraceGetTraceIdByIndexResponse200") + + +@_attrs_define +class TracerTraceGetTraceIdByIndexResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_get_trace_id_by_index_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_get_trace_id_by_index_response_200.additional_properties = d + return tracer_trace_get_trace_id_by_index_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_list_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_list_response_200.py new file mode 100644 index 0000000..02592f3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="TracerTraceListResponse200") + + +@_attrs_define +class TracerTraceListResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_list_response_200.additional_properties = d + return tracer_trace_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_list_traces_of_session_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_list_traces_of_session_response_200.py new file mode 100644 index 0000000..aff4c21 --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_list_traces_of_session_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace import Trace + + +T = TypeVar("T", bound="TracerTraceListTracesOfSessionResponse200") + + +@_attrs_define +class TracerTraceListTracesOfSessionResponse200: + """ + Attributes: + count (int): + results (list[Trace]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[Trace] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace import Trace + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Trace.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_list_traces_of_session_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_list_traces_of_session_response_200.additional_properties = d + return tracer_trace_list_traces_of_session_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_session_get_session_filter_values_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_session_get_session_filter_values_response_200.py new file mode 100644 index 0000000..2f0826d --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_session_get_session_filter_values_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_session import TraceSession + + +T = TypeVar("T", bound="TracerTraceSessionGetSessionFilterValuesResponse200") + + +@_attrs_define +class TracerTraceSessionGetSessionFilterValuesResponse200: + """ + Attributes: + count (int): + results (list[TraceSession]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[TraceSession] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_session import TraceSession + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = TraceSession.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_session_get_session_filter_values_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_session_get_session_filter_values_response_200.additional_properties = d + return tracer_trace_session_get_session_filter_values_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_session_get_trace_session_export_data_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_session_get_trace_session_export_data_response_200.py new file mode 100644 index 0000000..0ea444b --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_session_get_trace_session_export_data_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_session import TraceSession + + +T = TypeVar("T", bound="TracerTraceSessionGetTraceSessionExportDataResponse200") + + +@_attrs_define +class TracerTraceSessionGetTraceSessionExportDataResponse200: + """ + Attributes: + count (int): + results (list[TraceSession]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[TraceSession] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_session import TraceSession + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = TraceSession.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_session_get_trace_session_export_data_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_session_get_trace_session_export_data_response_200.additional_properties = d + return tracer_trace_session_get_trace_session_export_data_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_trace_session_list_response_200.py b/python/fi/generated/openapi_client/models/tracer_trace_session_list_response_200.py new file mode 100644 index 0000000..c197e4d --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_trace_session_list_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trace_session import TraceSession + + +T = TypeVar("T", bound="TracerTraceSessionListResponse200") + + +@_attrs_define +class TracerTraceSessionListResponse200: + """ + Attributes: + count (int): + results (list[TraceSession]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[TraceSession] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trace_session import TraceSession + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = TraceSession.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_trace_session_list_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_trace_session_list_response_200.additional_properties = d + return tracer_trace_session_list_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/tracer_user_alerts_list_monitors_response_200.py b/python/fi/generated/openapi_client/models/tracer_user_alerts_list_monitors_response_200.py new file mode 100644 index 0000000..6b76152 --- /dev/null +++ b/python/fi/generated/openapi_client/models/tracer_user_alerts_list_monitors_response_200.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_alert_monitor import UserAlertMonitor + + +T = TypeVar("T", bound="TracerUserAlertsListMonitorsResponse200") + + +@_attrs_define +class TracerUserAlertsListMonitorsResponse200: + """ + Attributes: + count (int): + results (list[UserAlertMonitor]): + next_ (None | str | Unset): + previous (None | str | Unset): + """ + + count: int + results: list[UserAlertMonitor] + next_: None | str | Unset = UNSET + previous: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + next_: None | str | Unset + if isinstance(self.next_, Unset): + next_ = UNSET + else: + next_ = self.next_ + + previous: None | str | Unset + if isinstance(self.previous, Unset): + previous = UNSET + else: + previous = self.previous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "results": results, + } + ) + if next_ is not UNSET: + field_dict["next"] = next_ + if previous is not UNSET: + field_dict["previous"] = previous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_alert_monitor import UserAlertMonitor + + d = dict(src_dict) + count = d.pop("count") + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = UserAlertMonitor.from_dict(results_item_data) + + results.append(results_item) + + def _parse_next_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_ = _parse_next_(d.pop("next", UNSET)) + + def _parse_previous(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + previous = _parse_previous(d.pop("previous", UNSET)) + + tracer_user_alerts_list_monitors_response_200 = cls( + count=count, + results=results, + next_=next_, + previous=previous, + ) + + tracer_user_alerts_list_monitors_response_200.additional_properties = d + return tracer_user_alerts_list_monitors_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/traces_aggregates.py b/python/fi/generated/openapi_client/models/traces_aggregates.py new file mode 100644 index 0000000..327c423 --- /dev/null +++ b/python/fi/generated/openapi_client/models/traces_aggregates.py @@ -0,0 +1,109 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TracesAggregates") + + +@_attrs_define +class TracesAggregates: + """ + Attributes: + total_traces (int): + failing_traces (int): + passing_traces (int): + avg_score (float): + p50_latency (int): + p95_latency (int): + avg_turns (float): + """ + + total_traces: int + failing_traces: int + passing_traces: int + avg_score: float + p50_latency: int + p95_latency: int + avg_turns: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total_traces = self.total_traces + + failing_traces = self.failing_traces + + passing_traces = self.passing_traces + + avg_score = self.avg_score + + p50_latency = self.p50_latency + + p95_latency = self.p95_latency + + avg_turns = self.avg_turns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "total_traces": total_traces, + "failing_traces": failing_traces, + "passing_traces": passing_traces, + "avg_score": avg_score, + "p50_latency": p50_latency, + "p95_latency": p95_latency, + "avg_turns": avg_turns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + total_traces = d.pop("total_traces") + + failing_traces = d.pop("failing_traces") + + passing_traces = d.pop("passing_traces") + + avg_score = d.pop("avg_score") + + p50_latency = d.pop("p50_latency") + + p95_latency = d.pop("p95_latency") + + avg_turns = d.pop("avg_turns") + + traces_aggregates = cls( + total_traces=total_traces, + failing_traces=failing_traces, + passing_traces=passing_traces, + avg_score=avg_score, + p50_latency=p50_latency, + p95_latency=p95_latency, + avg_turns=avg_turns, + ) + + traces_aggregates.additional_properties = d + return traces_aggregates + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/traces_list_row.py b/python/fi/generated/openapi_client/models/traces_list_row.py new file mode 100644 index 0000000..9bb05db --- /dev/null +++ b/python/fi/generated/openapi_client/models/traces_list_row.py @@ -0,0 +1,172 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +T = TypeVar("T", bound="TracesListRow") + + +@_attrs_define +class TracesListRow: + """ + Attributes: + id (str): + input_ (None | str): + timestamp (datetime.datetime | None): + latency_ms (int | None): + tokens (int | None): + cost (float | None): + score (float | None): + turns (int | None): + """ + + id: str + input_: None | str + timestamp: datetime.datetime | None + latency_ms: int | None + tokens: int | None + cost: float | None + score: float | None + turns: int | None + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + input_: None | str + input_ = self.input_ + + timestamp: None | str + if isinstance(self.timestamp, datetime.datetime): + timestamp = self.timestamp.isoformat() + else: + timestamp = self.timestamp + + latency_ms: int | None + latency_ms = self.latency_ms + + tokens: int | None + tokens = self.tokens + + cost: float | None + cost = self.cost + + score: float | None + score = self.score + + turns: int | None + turns = self.turns + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "input": input_, + "timestamp": timestamp, + "latency_ms": latency_ms, + "tokens": tokens, + "cost": cost, + "score": score, + "turns": turns, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + def _parse_input_(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + input_ = _parse_input_(d.pop("input")) + + def _parse_timestamp(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + timestamp_type_0 = isoparse(data) + + return timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + timestamp = _parse_timestamp(d.pop("timestamp")) + + def _parse_latency_ms(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + latency_ms = _parse_latency_ms(d.pop("latency_ms")) + + def _parse_tokens(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + tokens = _parse_tokens(d.pop("tokens")) + + def _parse_cost(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cost = _parse_cost(d.pop("cost")) + + def _parse_score(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + score = _parse_score(d.pop("score")) + + def _parse_turns(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + turns = _parse_turns(d.pop("turns")) + + traces_list_row = cls( + id=id, + input_=input_, + timestamp=timestamp, + latency_ms=latency_ms, + tokens=tokens, + cost=cost, + score=score, + turns=turns, + ) + + traces_list_row.additional_properties = d + return traces_list_row + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/traces_tab_api_response.py b/python/fi/generated/openapi_client/models/traces_tab_api_response.py new file mode 100644 index 0000000..f79e1ea --- /dev/null +++ b/python/fi/generated/openapi_client/models/traces_tab_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.traces_tab_response import TracesTabResponse + + +T = TypeVar("T", bound="TracesTabApiResponse") + + +@_attrs_define +class TracesTabApiResponse: + """ + Attributes: + result (TracesTabResponse): + status (bool | Unset): Default: True. + """ + + result: TracesTabResponse + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.traces_tab_response import TracesTabResponse + + d = dict(src_dict) + result = TracesTabResponse.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + traces_tab_api_response = cls( + result=result, + status=status, + ) + + traces_tab_api_response.additional_properties = d + return traces_tab_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/traces_tab_response.py b/python/fi/generated/openapi_client/models/traces_tab_response.py new file mode 100644 index 0000000..6ade6d1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/traces_tab_response.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.traces_aggregates import TracesAggregates + from ..models.traces_list_row import TracesListRow + + +T = TypeVar("T", bound="TracesTabResponse") + + +@_attrs_define +class TracesTabResponse: + """ + Attributes: + aggregates (TracesAggregates): + traces (list[TracesListRow]): + total (int): + """ + + aggregates: TracesAggregates + traces: list[TracesListRow] + total: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aggregates = self.aggregates.to_dict() + + traces = [] + for traces_item_data in self.traces: + traces_item = traces_item_data.to_dict() + traces.append(traces_item) + + total = self.total + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "aggregates": aggregates, + "traces": traces, + "total": total, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.traces_aggregates import TracesAggregates + from ..models.traces_list_row import TracesListRow + + d = dict(src_dict) + aggregates = TracesAggregates.from_dict(d.pop("aggregates")) + + traces = [] + _traces = d.pop("traces") + for traces_item_data in _traces: + traces_item = TracesListRow.from_dict(traces_item_data) + + traces.append(traces_item) + + total = d.pop("total") + + traces_tab_response = cls( + aggregates=aggregates, + traces=traces, + total=total, + ) + + traces_tab_response.additional_properties = d + return traces_tab_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trend_metric.py b/python/fi/generated/openapi_client/models/trend_metric.py new file mode 100644 index 0000000..a6242c2 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trend_metric.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TrendMetric") + + +@_attrs_define +class TrendMetric: + """ + Attributes: + label (str): + value (str): + delta (float): + unit (str): + """ + + label: str + value: str + delta: float + unit: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + label = self.label + + value = self.value + + delta = self.delta + + unit = self.unit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label": label, + "value": value, + "delta": delta, + "unit": unit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + label = d.pop("label") + + value = d.pop("value") + + delta = d.pop("delta") + + unit = d.pop("unit") + + trend_metric = cls( + label=label, + value=value, + delta=delta, + unit=unit, + ) + + trend_metric.additional_properties = d + return trend_metric + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trend_point.py b/python/fi/generated/openapi_client/models/trend_point.py new file mode 100644 index 0000000..eab34ad --- /dev/null +++ b/python/fi/generated/openapi_client/models/trend_point.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +T = TypeVar("T", bound="TrendPoint") + + +@_attrs_define +class TrendPoint: + """ + Attributes: + timestamp (datetime.datetime): + value (int): + users (int): + """ + + timestamp: datetime.datetime + value: int + users: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + timestamp = self.timestamp.isoformat() + + value = self.value + + users = self.users + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "timestamp": timestamp, + "value": value, + "users": users, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + timestamp = isoparse(d.pop("timestamp")) + + value = d.pop("value") + + users = d.pop("users") + + trend_point = cls( + timestamp=timestamp, + value=value, + users=users, + ) + + trend_point.additional_properties = d + return trend_point + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trends_tab_api_response.py b/python/fi/generated/openapi_client/models/trends_tab_api_response.py new file mode 100644 index 0000000..0766ced --- /dev/null +++ b/python/fi/generated/openapi_client/models/trends_tab_api_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trends_tab_response import TrendsTabResponse + + +T = TypeVar("T", bound="TrendsTabApiResponse") + + +@_attrs_define +class TrendsTabApiResponse: + """ + Attributes: + result (TrendsTabResponse): + status (bool | Unset): Default: True. + """ + + result: TrendsTabResponse + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.trends_tab_response import TrendsTabResponse + + d = dict(src_dict) + result = TrendsTabResponse.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + trends_tab_api_response = cls( + result=result, + status=status, + ) + + trends_tab_api_response.additional_properties = d + return trends_tab_api_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/trends_tab_response.py b/python/fi/generated/openapi_client/models/trends_tab_response.py new file mode 100644 index 0000000..0c51e27 --- /dev/null +++ b/python/fi/generated/openapi_client/models/trends_tab_response.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.events_over_time_point import EventsOverTimePoint + from ..models.heatmap_cell import HeatmapCell + from ..models.score_trend import ScoreTrend + from ..models.trend_metric import TrendMetric + + +T = TypeVar("T", bound="TrendsTabResponse") + + +@_attrs_define +class TrendsTabResponse: + """ + Attributes: + metrics (list[TrendMetric]): + events_over_time (list[EventsOverTimePoint]): + score_trends (list[ScoreTrend]): + activity_heatmap (list[list[HeatmapCell]]): + """ + + metrics: list[TrendMetric] + events_over_time: list[EventsOverTimePoint] + score_trends: list[ScoreTrend] + activity_heatmap: list[list[HeatmapCell]] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + metrics = [] + for metrics_item_data in self.metrics: + metrics_item = metrics_item_data.to_dict() + metrics.append(metrics_item) + + events_over_time = [] + for events_over_time_item_data in self.events_over_time: + events_over_time_item = events_over_time_item_data.to_dict() + events_over_time.append(events_over_time_item) + + score_trends = [] + for score_trends_item_data in self.score_trends: + score_trends_item = score_trends_item_data.to_dict() + score_trends.append(score_trends_item) + + activity_heatmap = [] + for activity_heatmap_item_data in self.activity_heatmap: + activity_heatmap_item = [] + for activity_heatmap_item_item_data in activity_heatmap_item_data: + activity_heatmap_item_item = activity_heatmap_item_item_data.to_dict() + activity_heatmap_item.append(activity_heatmap_item_item) + + activity_heatmap.append(activity_heatmap_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "metrics": metrics, + "events_over_time": events_over_time, + "score_trends": score_trends, + "activity_heatmap": activity_heatmap, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.events_over_time_point import EventsOverTimePoint + from ..models.heatmap_cell import HeatmapCell + from ..models.score_trend import ScoreTrend + from ..models.trend_metric import TrendMetric + + d = dict(src_dict) + metrics = [] + _metrics = d.pop("metrics") + for metrics_item_data in _metrics: + metrics_item = TrendMetric.from_dict(metrics_item_data) + + metrics.append(metrics_item) + + events_over_time = [] + _events_over_time = d.pop("events_over_time") + for events_over_time_item_data in _events_over_time: + events_over_time_item = EventsOverTimePoint.from_dict( + events_over_time_item_data + ) + + events_over_time.append(events_over_time_item) + + score_trends = [] + _score_trends = d.pop("score_trends") + for score_trends_item_data in _score_trends: + score_trends_item = ScoreTrend.from_dict(score_trends_item_data) + + score_trends.append(score_trends_item) + + activity_heatmap = [] + _activity_heatmap = d.pop("activity_heatmap") + for activity_heatmap_item_data in _activity_heatmap: + activity_heatmap_item = [] + _activity_heatmap_item = activity_heatmap_item_data + for activity_heatmap_item_item_data in _activity_heatmap_item: + activity_heatmap_item_item = HeatmapCell.from_dict( + activity_heatmap_item_item_data + ) + + activity_heatmap_item.append(activity_heatmap_item_item) + + activity_heatmap.append(activity_heatmap_item) + + trends_tab_response = cls( + metrics=metrics, + events_over_time=events_over_time, + score_trends=score_trends, + activity_heatmap=activity_heatmap, + ) + + trends_tab_response.additional_properties = d + return trends_tab_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/update_run_test.py b/python/fi/generated/openapi_client/models/update_run_test.py new file mode 100644 index 0000000..29e8bc4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/update_run_test.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateRunTest") + + +@_attrs_define +class UpdateRunTest: + """ + Attributes: + name (str | Unset): + description (str | Unset): + agent_definition_id (UUID | Unset): + scenario_ids (list[UUID] | Unset): + dataset_row_ids (list[str] | Unset): + eval_config_ids (list[UUID] | Unset): + """ + + name: str | Unset = UNSET + description: str | Unset = UNSET + agent_definition_id: UUID | Unset = UNSET + scenario_ids: list[UUID] | Unset = UNSET + dataset_row_ids: list[str] | Unset = UNSET + eval_config_ids: list[UUID] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description = self.description + + agent_definition_id: str | Unset = UNSET + if not isinstance(self.agent_definition_id, Unset): + agent_definition_id = str(self.agent_definition_id) + + scenario_ids: list[str] | Unset = UNSET + if not isinstance(self.scenario_ids, Unset): + scenario_ids = [] + for scenario_ids_item_data in self.scenario_ids: + scenario_ids_item = str(scenario_ids_item_data) + scenario_ids.append(scenario_ids_item) + + dataset_row_ids: list[str] | Unset = UNSET + if not isinstance(self.dataset_row_ids, Unset): + dataset_row_ids = self.dataset_row_ids + + eval_config_ids: list[str] | Unset = UNSET + if not isinstance(self.eval_config_ids, Unset): + eval_config_ids = [] + for eval_config_ids_item_data in self.eval_config_ids: + eval_config_ids_item = str(eval_config_ids_item_data) + eval_config_ids.append(eval_config_ids_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if agent_definition_id is not UNSET: + field_dict["agent_definition_id"] = agent_definition_id + if scenario_ids is not UNSET: + field_dict["scenario_ids"] = scenario_ids + if dataset_row_ids is not UNSET: + field_dict["dataset_row_ids"] = dataset_row_ids + if eval_config_ids is not UNSET: + field_dict["eval_config_ids"] = eval_config_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + description = d.pop("description", UNSET) + + _agent_definition_id = d.pop("agent_definition_id", UNSET) + agent_definition_id: UUID | Unset + if isinstance(_agent_definition_id, Unset): + agent_definition_id = UNSET + else: + agent_definition_id = UUID(_agent_definition_id) + + _scenario_ids = d.pop("scenario_ids", UNSET) + scenario_ids: list[UUID] | Unset = UNSET + if _scenario_ids is not UNSET: + scenario_ids = [] + for scenario_ids_item_data in _scenario_ids: + scenario_ids_item = UUID(scenario_ids_item_data) + + scenario_ids.append(scenario_ids_item) + + dataset_row_ids = cast(list[str], d.pop("dataset_row_ids", UNSET)) + + _eval_config_ids = d.pop("eval_config_ids", UNSET) + eval_config_ids: list[UUID] | Unset = UNSET + if _eval_config_ids is not UNSET: + eval_config_ids = [] + for eval_config_ids_item_data in _eval_config_ids: + eval_config_ids_item = UUID(eval_config_ids_item_data) + + eval_config_ids.append(eval_config_ids_item) + + update_run_test = cls( + name=name, + description=description, + agent_definition_id=agent_definition_id, + scenario_ids=scenario_ids, + dataset_row_ids=dataset_row_ids, + eval_config_ids=eval_config_ids, + ) + + update_run_test.additional_properties = d + return update_run_test + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user.py b/python/fi/generated/openapi_client/models/user.py new file mode 100644 index 0000000..5bf836f --- /dev/null +++ b/python/fi/generated/openapi_client/models/user.py @@ -0,0 +1,192 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.user_organization_role import UserOrganizationRole +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.organization import Organization + from ..models.user_goals import UserGoals + + +T = TypeVar("T", bound="User") + + +@_attrs_define +class User: + """ + Attributes: + email (str): + name (str): + id (UUID | Unset): + organization_role (UserOrganizationRole | Unset): + organization (Organization | Unset): + created_at (datetime.datetime | Unset): + status (str | Unset): + role (None | str | Unset): User's job role (e.g., Data Scientist, ML Engineer, or custom role) + goals (UserGoals | Unset): List of user's goals for using the platform + """ + + email: str + name: str + id: UUID | Unset = UNSET + organization_role: UserOrganizationRole | Unset = UNSET + organization: Organization | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + status: str | Unset = UNSET + role: None | str | Unset = UNSET + goals: UserGoals | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + email = self.email + + name = self.name + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + organization_role: str | Unset = UNSET + if not isinstance(self.organization_role, Unset): + organization_role = self.organization_role.value + + organization: dict[str, Any] | Unset = UNSET + if not isinstance(self.organization, Unset): + organization = self.organization.to_dict() + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + status = self.status + + role: None | str | Unset + if isinstance(self.role, Unset): + role = UNSET + else: + role = self.role + + goals: dict[str, Any] | Unset = UNSET + if not isinstance(self.goals, Unset): + goals = self.goals.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "email": email, + "name": name, + } + ) + if id is not UNSET: + field_dict["id"] = id + if organization_role is not UNSET: + field_dict["organization_role"] = organization_role + if organization is not UNSET: + field_dict["organization"] = organization + if created_at is not UNSET: + field_dict["created_at"] = created_at + if status is not UNSET: + field_dict["status"] = status + if role is not UNSET: + field_dict["role"] = role + if goals is not UNSET: + field_dict["goals"] = goals + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.organization import Organization + from ..models.user_goals import UserGoals + + d = dict(src_dict) + email = d.pop("email") + + name = d.pop("name") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _organization_role = d.pop("organization_role", UNSET) + organization_role: UserOrganizationRole | Unset + if isinstance(_organization_role, Unset): + organization_role = UNSET + else: + organization_role = UserOrganizationRole(_organization_role) + + _organization = d.pop("organization", UNSET) + organization: Organization | Unset + if isinstance(_organization, Unset): + organization = UNSET + else: + organization = Organization.from_dict(_organization) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + status = d.pop("status", UNSET) + + def _parse_role(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + role = _parse_role(d.pop("role", UNSET)) + + _goals = d.pop("goals", UNSET) + goals: UserGoals | Unset + if isinstance(_goals, Unset): + goals = UNSET + else: + goals = UserGoals.from_dict(_goals) + + user = cls( + email=email, + name=name, + id=id, + organization_role=organization_role, + organization=organization, + created_at=created_at, + status=status, + role=role, + goals=goals, + ) + + user.additional_properties = d + return user + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor.py b/python/fi/generated/openapi_client/models/user_alert_monitor.py new file mode 100644 index 0000000..94c0c90 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor.py @@ -0,0 +1,539 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.user_alert_monitor_metric_type import UserAlertMonitorMetricType +from ..models.user_alert_monitor_threshold_operator import ( + UserAlertMonitorThresholdOperator, +) +from ..models.user_alert_monitor_threshold_type import UserAlertMonitorThresholdType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_alert_monitor_filters import UserAlertMonitorFilters + from ..models.user_alert_monitor_logs import UserAlertMonitorLogs + + +T = TypeVar("T", bound="UserAlertMonitor") + + +@_attrs_define +class UserAlertMonitor: + """ + Attributes: + project (UUID): + name (str): + metric_type (UserAlertMonitorMetricType): + threshold_operator (UserAlertMonitorThresholdOperator): + organization (UUID): + id (UUID | Unset): + metric_name (str | Unset): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): + deleted (bool | Unset): + deleted_at (datetime.datetime | None | Unset): + metric (None | str | Unset): Id of the evaluation template. + threshold_type (UserAlertMonitorThresholdType | Unset): Method to set the threshold for the monitor (Static or + Percentage change). + threshold_metric_value (None | str | Unset): For choice and pass/fail evals, the specific metric value to + monitor. + critical_threshold_value (float | None | Unset): + warning_threshold_value (float | None | Unset): + alert_frequency (int | Unset): Frequency of alert checks in minutes. + auto_threshold_time_window (int | Unset): For auto-thresholding. The time window in minutes to calculate the + historical mean + last_checked_at (datetime.datetime | None | Unset): The last time the monitor was checked for alerts. + notification_emails (list[str] | Unset): + slack_webhook_url (None | str | Unset): + slack_notes (None | str | Unset): + is_mute (bool | Unset): + filters (UserAlertMonitorFilters | Unset): + logs (list[UserAlertMonitorLogs] | None | Unset): + workspace (None | Unset | UUID): + created_by (None | Unset | UUID): + """ + + project: UUID + name: str + metric_type: UserAlertMonitorMetricType + threshold_operator: UserAlertMonitorThresholdOperator + organization: UUID + id: UUID | Unset = UNSET + metric_name: str | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET + deleted: bool | Unset = UNSET + deleted_at: datetime.datetime | None | Unset = UNSET + metric: None | str | Unset = UNSET + threshold_type: UserAlertMonitorThresholdType | Unset = UNSET + threshold_metric_value: None | str | Unset = UNSET + critical_threshold_value: float | None | Unset = UNSET + warning_threshold_value: float | None | Unset = UNSET + alert_frequency: int | Unset = UNSET + auto_threshold_time_window: int | Unset = UNSET + last_checked_at: datetime.datetime | None | Unset = UNSET + notification_emails: list[str] | Unset = UNSET + slack_webhook_url: None | str | Unset = UNSET + slack_notes: None | str | Unset = UNSET + is_mute: bool | Unset = UNSET + filters: UserAlertMonitorFilters | Unset = UNSET + logs: list[UserAlertMonitorLogs] | None | Unset = UNSET + workspace: None | Unset | UUID = UNSET + created_by: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + project = str(self.project) + + name = self.name + + metric_type = self.metric_type.value + + threshold_operator = self.threshold_operator.value + + organization = str(self.organization) + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + metric_name = self.metric_name + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + updated_at: str | Unset = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + deleted = self.deleted + + deleted_at: None | str | Unset + if isinstance(self.deleted_at, Unset): + deleted_at = UNSET + elif isinstance(self.deleted_at, datetime.datetime): + deleted_at = self.deleted_at.isoformat() + else: + deleted_at = self.deleted_at + + metric: None | str | Unset + if isinstance(self.metric, Unset): + metric = UNSET + else: + metric = self.metric + + threshold_type: str | Unset = UNSET + if not isinstance(self.threshold_type, Unset): + threshold_type = self.threshold_type.value + + threshold_metric_value: None | str | Unset + if isinstance(self.threshold_metric_value, Unset): + threshold_metric_value = UNSET + else: + threshold_metric_value = self.threshold_metric_value + + critical_threshold_value: float | None | Unset + if isinstance(self.critical_threshold_value, Unset): + critical_threshold_value = UNSET + else: + critical_threshold_value = self.critical_threshold_value + + warning_threshold_value: float | None | Unset + if isinstance(self.warning_threshold_value, Unset): + warning_threshold_value = UNSET + else: + warning_threshold_value = self.warning_threshold_value + + alert_frequency = self.alert_frequency + + auto_threshold_time_window = self.auto_threshold_time_window + + last_checked_at: None | str | Unset + if isinstance(self.last_checked_at, Unset): + last_checked_at = UNSET + elif isinstance(self.last_checked_at, datetime.datetime): + last_checked_at = self.last_checked_at.isoformat() + else: + last_checked_at = self.last_checked_at + + notification_emails: list[str] | Unset = UNSET + if not isinstance(self.notification_emails, Unset): + notification_emails = self.notification_emails + + slack_webhook_url: None | str | Unset + if isinstance(self.slack_webhook_url, Unset): + slack_webhook_url = UNSET + else: + slack_webhook_url = self.slack_webhook_url + + slack_notes: None | str | Unset + if isinstance(self.slack_notes, Unset): + slack_notes = UNSET + else: + slack_notes = self.slack_notes + + is_mute = self.is_mute + + filters: dict[str, Any] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + + logs: list[dict[str, Any]] | None | Unset + if isinstance(self.logs, Unset): + logs = UNSET + elif isinstance(self.logs, list): + logs = [] + for logs_type_0_item_data in self.logs: + logs_type_0_item = logs_type_0_item_data.to_dict() + logs.append(logs_type_0_item) + + else: + logs = self.logs + + workspace: None | str | Unset + if isinstance(self.workspace, Unset): + workspace = UNSET + elif isinstance(self.workspace, UUID): + workspace = str(self.workspace) + else: + workspace = self.workspace + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + elif isinstance(self.created_by, UUID): + created_by = str(self.created_by) + else: + created_by = self.created_by + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "project": project, + "name": name, + "metric_type": metric_type, + "threshold_operator": threshold_operator, + "organization": organization, + } + ) + if id is not UNSET: + field_dict["id"] = id + if metric_name is not UNSET: + field_dict["metric_name"] = metric_name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if deleted is not UNSET: + field_dict["deleted"] = deleted + if deleted_at is not UNSET: + field_dict["deleted_at"] = deleted_at + if metric is not UNSET: + field_dict["metric"] = metric + if threshold_type is not UNSET: + field_dict["threshold_type"] = threshold_type + if threshold_metric_value is not UNSET: + field_dict["threshold_metric_value"] = threshold_metric_value + if critical_threshold_value is not UNSET: + field_dict["critical_threshold_value"] = critical_threshold_value + if warning_threshold_value is not UNSET: + field_dict["warning_threshold_value"] = warning_threshold_value + if alert_frequency is not UNSET: + field_dict["alert_frequency"] = alert_frequency + if auto_threshold_time_window is not UNSET: + field_dict["auto_threshold_time_window"] = auto_threshold_time_window + if last_checked_at is not UNSET: + field_dict["last_checked_at"] = last_checked_at + if notification_emails is not UNSET: + field_dict["notification_emails"] = notification_emails + if slack_webhook_url is not UNSET: + field_dict["slack_webhook_url"] = slack_webhook_url + if slack_notes is not UNSET: + field_dict["slack_notes"] = slack_notes + if is_mute is not UNSET: + field_dict["is_mute"] = is_mute + if filters is not UNSET: + field_dict["filters"] = filters + if logs is not UNSET: + field_dict["logs"] = logs + if workspace is not UNSET: + field_dict["workspace"] = workspace + if created_by is not UNSET: + field_dict["created_by"] = created_by + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_alert_monitor_filters import UserAlertMonitorFilters + from ..models.user_alert_monitor_logs import UserAlertMonitorLogs + + d = dict(src_dict) + project = UUID(d.pop("project")) + + name = d.pop("name") + + metric_type = UserAlertMonitorMetricType(d.pop("metric_type")) + + threshold_operator = UserAlertMonitorThresholdOperator( + d.pop("threshold_operator") + ) + + organization = UUID(d.pop("organization")) + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + metric_name = d.pop("metric_name", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: datetime.datetime | Unset + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + deleted = d.pop("deleted", UNSET) + + def _parse_deleted_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + deleted_at_type_0 = isoparse(data) + + return deleted_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + deleted_at = _parse_deleted_at(d.pop("deleted_at", UNSET)) + + def _parse_metric(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + metric = _parse_metric(d.pop("metric", UNSET)) + + _threshold_type = d.pop("threshold_type", UNSET) + threshold_type: UserAlertMonitorThresholdType | Unset + if isinstance(_threshold_type, Unset): + threshold_type = UNSET + else: + threshold_type = UserAlertMonitorThresholdType(_threshold_type) + + def _parse_threshold_metric_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + threshold_metric_value = _parse_threshold_metric_value( + d.pop("threshold_metric_value", UNSET) + ) + + def _parse_critical_threshold_value(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + critical_threshold_value = _parse_critical_threshold_value( + d.pop("critical_threshold_value", UNSET) + ) + + def _parse_warning_threshold_value(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + warning_threshold_value = _parse_warning_threshold_value( + d.pop("warning_threshold_value", UNSET) + ) + + alert_frequency = d.pop("alert_frequency", UNSET) + + auto_threshold_time_window = d.pop("auto_threshold_time_window", UNSET) + + def _parse_last_checked_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_checked_at_type_0 = isoparse(data) + + return last_checked_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_checked_at = _parse_last_checked_at(d.pop("last_checked_at", UNSET)) + + notification_emails = cast(list[str], d.pop("notification_emails", UNSET)) + + def _parse_slack_webhook_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + slack_webhook_url = _parse_slack_webhook_url(d.pop("slack_webhook_url", UNSET)) + + def _parse_slack_notes(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + slack_notes = _parse_slack_notes(d.pop("slack_notes", UNSET)) + + is_mute = d.pop("is_mute", UNSET) + + _filters = d.pop("filters", UNSET) + filters: UserAlertMonitorFilters | Unset + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = UserAlertMonitorFilters.from_dict(_filters) + + def _parse_logs(data: object) -> list[UserAlertMonitorLogs] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + logs_type_0 = [] + _logs_type_0 = data + for logs_type_0_item_data in _logs_type_0: + logs_type_0_item = UserAlertMonitorLogs.from_dict( + logs_type_0_item_data + ) + + logs_type_0.append(logs_type_0_item) + + return logs_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UserAlertMonitorLogs] | None | Unset, data) + + logs = _parse_logs(d.pop("logs", UNSET)) + + def _parse_workspace(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + workspace_type_0 = UUID(data) + + return workspace_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + workspace = _parse_workspace(d.pop("workspace", UNSET)) + + def _parse_created_by(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + created_by_type_0 = UUID(data) + + return created_by_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) + + user_alert_monitor = cls( + project=project, + name=name, + metric_type=metric_type, + threshold_operator=threshold_operator, + organization=organization, + id=id, + metric_name=metric_name, + created_at=created_at, + updated_at=updated_at, + deleted=deleted, + deleted_at=deleted_at, + metric=metric, + threshold_type=threshold_type, + threshold_metric_value=threshold_metric_value, + critical_threshold_value=critical_threshold_value, + warning_threshold_value=warning_threshold_value, + alert_frequency=alert_frequency, + auto_threshold_time_window=auto_threshold_time_window, + last_checked_at=last_checked_at, + notification_emails=notification_emails, + slack_webhook_url=slack_webhook_url, + slack_notes=slack_notes, + is_mute=is_mute, + filters=filters, + logs=logs, + workspace=workspace, + created_by=created_by, + ) + + user_alert_monitor.additional_properties = d + return user_alert_monitor + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate.py b/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate.py new file mode 100644 index 0000000..3778878 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserAlertMonitorDuplicate") + + +@_attrs_define +class UserAlertMonitorDuplicate: + """ + Attributes: + id (UUID): + name (str): + """ + + id: UUID + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + user_alert_monitor_duplicate = cls( + id=id, + name=name, + ) + + user_alert_monitor_duplicate.additional_properties = d + return user_alert_monitor_duplicate + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_response.py b/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_response.py new file mode 100644 index 0000000..3852332 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_response.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_alert_monitor_duplicate_result import ( + UserAlertMonitorDuplicateResult, + ) + + +T = TypeVar("T", bound="UserAlertMonitorDuplicateResponse") + + +@_attrs_define +class UserAlertMonitorDuplicateResponse: + """ + Attributes: + result (UserAlertMonitorDuplicateResult): + status (bool | Unset): Default: True. + """ + + result: UserAlertMonitorDuplicateResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_alert_monitor_duplicate_result import ( + UserAlertMonitorDuplicateResult, + ) + + d = dict(src_dict) + result = UserAlertMonitorDuplicateResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + user_alert_monitor_duplicate_response = cls( + result=result, + status=status, + ) + + user_alert_monitor_duplicate_response.additional_properties = d + return user_alert_monitor_duplicate_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_result.py b/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_result.py new file mode 100644 index 0000000..1526d80 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_duplicate_result.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserAlertMonitorDuplicateResult") + + +@_attrs_define +class UserAlertMonitorDuplicateResult: + """ + Attributes: + id (UUID): + message (str): + """ + + id: UUID + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + message = d.pop("message") + + user_alert_monitor_duplicate_result = cls( + id=id, + message=message, + ) + + user_alert_monitor_duplicate_result.additional_properties = d + return user_alert_monitor_duplicate_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_filters.py b/python/fi/generated/openapi_client/models/user_alert_monitor_filters.py new file mode 100644 index 0000000..33c63b5 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_filters.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserAlertMonitorFilters") + + +@_attrs_define +class UserAlertMonitorFilters: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_alert_monitor_filters = cls() + + user_alert_monitor_filters.additional_properties = d + return user_alert_monitor_filters + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_log.py b/python/fi/generated/openapi_client/models/user_alert_monitor_log.py new file mode 100644 index 0000000..8e83a36 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_log.py @@ -0,0 +1,248 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.user_alert_monitor_log_type import UserAlertMonitorLogType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user import User + + +T = TypeVar("T", bound="UserAlertMonitorLog") + + +@_attrs_define +class UserAlertMonitorLog: + """ + Attributes: + type_ (UserAlertMonitorLogType): + message (str): + id (UUID | Unset): + resolved_by (User | Unset): + created_at (datetime.datetime | Unset): + resolved (bool | Unset): + resolved_at (datetime.datetime | None | Unset): + link (None | str | Unset): + time_window_start (datetime.datetime | None | Unset): + time_window_end (datetime.datetime | None | Unset): + """ + + type_: UserAlertMonitorLogType + message: str + id: UUID | Unset = UNSET + resolved_by: User | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + resolved: bool | Unset = UNSET + resolved_at: datetime.datetime | None | Unset = UNSET + link: None | str | Unset = UNSET + time_window_start: datetime.datetime | None | Unset = UNSET + time_window_end: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_ = self.type_.value + + message = self.message + + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + resolved_by: dict[str, Any] | Unset = UNSET + if not isinstance(self.resolved_by, Unset): + resolved_by = self.resolved_by.to_dict() + + created_at: str | Unset = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + + resolved = self.resolved + + resolved_at: None | str | Unset + if isinstance(self.resolved_at, Unset): + resolved_at = UNSET + elif isinstance(self.resolved_at, datetime.datetime): + resolved_at = self.resolved_at.isoformat() + else: + resolved_at = self.resolved_at + + link: None | str | Unset + if isinstance(self.link, Unset): + link = UNSET + else: + link = self.link + + time_window_start: None | str | Unset + if isinstance(self.time_window_start, Unset): + time_window_start = UNSET + elif isinstance(self.time_window_start, datetime.datetime): + time_window_start = self.time_window_start.isoformat() + else: + time_window_start = self.time_window_start + + time_window_end: None | str | Unset + if isinstance(self.time_window_end, Unset): + time_window_end = UNSET + elif isinstance(self.time_window_end, datetime.datetime): + time_window_end = self.time_window_end.isoformat() + else: + time_window_end = self.time_window_end + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "message": message, + } + ) + if id is not UNSET: + field_dict["id"] = id + if resolved_by is not UNSET: + field_dict["resolved_by"] = resolved_by + if created_at is not UNSET: + field_dict["created_at"] = created_at + if resolved is not UNSET: + field_dict["resolved"] = resolved + if resolved_at is not UNSET: + field_dict["resolved_at"] = resolved_at + if link is not UNSET: + field_dict["link"] = link + if time_window_start is not UNSET: + field_dict["time_window_start"] = time_window_start + if time_window_end is not UNSET: + field_dict["time_window_end"] = time_window_end + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user import User + + d = dict(src_dict) + type_ = UserAlertMonitorLogType(d.pop("type")) + + message = d.pop("message") + + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _resolved_by = d.pop("resolved_by", UNSET) + resolved_by: User | Unset + if isinstance(_resolved_by, Unset): + resolved_by = UNSET + else: + resolved_by = User.from_dict(_resolved_by) + + _created_at = d.pop("created_at", UNSET) + created_at: datetime.datetime | Unset + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + resolved = d.pop("resolved", UNSET) + + def _parse_resolved_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + resolved_at_type_0 = isoparse(data) + + return resolved_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + resolved_at = _parse_resolved_at(d.pop("resolved_at", UNSET)) + + def _parse_link(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + link = _parse_link(d.pop("link", UNSET)) + + def _parse_time_window_start(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + time_window_start_type_0 = isoparse(data) + + return time_window_start_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + time_window_start = _parse_time_window_start(d.pop("time_window_start", UNSET)) + + def _parse_time_window_end(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + time_window_end_type_0 = isoparse(data) + + return time_window_end_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + time_window_end = _parse_time_window_end(d.pop("time_window_end", UNSET)) + + user_alert_monitor_log = cls( + type_=type_, + message=message, + id=id, + resolved_by=resolved_by, + created_at=created_at, + resolved=resolved, + resolved_at=resolved_at, + link=link, + time_window_start=time_window_start, + time_window_end=time_window_end, + ) + + user_alert_monitor_log.additional_properties = d + return user_alert_monitor_log + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_log_type.py b/python/fi/generated/openapi_client/models/user_alert_monitor_log_type.py new file mode 100644 index 0000000..9631acd --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_log_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UserAlertMonitorLogType(str, Enum): + CRITICAL = "critical" + WARNING = "warning" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_logs.py b/python/fi/generated/openapi_client/models/user_alert_monitor_logs.py new file mode 100644 index 0000000..c02107f --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_logs.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserAlertMonitorLogs") + + +@_attrs_define +class UserAlertMonitorLogs: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_alert_monitor_logs = cls() + + user_alert_monitor_logs.additional_properties = d + return user_alert_monitor_logs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_metric_option.py b/python/fi/generated/openapi_client/models/user_alert_monitor_metric_option.py new file mode 100644 index 0000000..5a50855 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_metric_option.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UserAlertMonitorMetricOption") + + +@_attrs_define +class UserAlertMonitorMetricOption: + """ + Attributes: + id (str | Unset): + name (str | Unset): + metric_type (str | Unset): + output_type (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + metric_type: str | Unset = UNSET + output_type: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + metric_type = self.metric_type + + output_type = self.output_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if metric_type is not UNSET: + field_dict["metric_type"] = metric_type + if output_type is not UNSET: + field_dict["output_type"] = output_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + metric_type = d.pop("metric_type", UNSET) + + output_type = d.pop("output_type", UNSET) + + user_alert_monitor_metric_option = cls( + id=id, + name=name, + metric_type=metric_type, + output_type=output_type, + ) + + user_alert_monitor_metric_option.additional_properties = d + return user_alert_monitor_metric_option + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_metric_options_response.py b/python/fi/generated/openapi_client/models/user_alert_monitor_metric_options_response.py new file mode 100644 index 0000000..e5e362a --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_metric_options_response.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_alert_monitor_metric_option import UserAlertMonitorMetricOption + + +T = TypeVar("T", bound="UserAlertMonitorMetricOptionsResponse") + + +@_attrs_define +class UserAlertMonitorMetricOptionsResponse: + """ + Attributes: + status (bool | Unset): Default: True. + result (list[UserAlertMonitorMetricOption] | Unset): + """ + + status: bool | Unset = True + result: list[UserAlertMonitorMetricOption] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + result.append(result_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if result is not UNSET: + field_dict["result"] = result + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_alert_monitor_metric_option import ( + UserAlertMonitorMetricOption, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + _result = d.pop("result", UNSET) + result: list[UserAlertMonitorMetricOption] | Unset = UNSET + if _result is not UNSET: + result = [] + for result_item_data in _result: + result_item = UserAlertMonitorMetricOption.from_dict(result_item_data) + + result.append(result_item) + + user_alert_monitor_metric_options_response = cls( + status=status, + result=result, + ) + + user_alert_monitor_metric_options_response.additional_properties = d + return user_alert_monitor_metric_options_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_metric_type.py b/python/fi/generated/openapi_client/models/user_alert_monitor_metric_type.py new file mode 100644 index 0000000..d680964 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_metric_type.py @@ -0,0 +1,18 @@ +from enum import Enum + + +class UserAlertMonitorMetricType(str, Enum): + COUNT_OF_ERRORS = "count_of_errors" + DAILY_TOKENS_SPENT = "daily_tokens_spent" + ERROR_FREE_SESSION_RATES = "error_free_session_rates" + ERROR_RATES_FOR_FUNCTION_CALLING = "error_rates_for_function_calling" + EVALUATION_METRICS = "evaluation_metrics" + LLM_API_FAILURE_RATES = "llm_api_failure_rates" + LLM_RESPONSE_TIME = "llm_response_time" + MONTHLY_TOKENS_SPENT = "monthly_tokens_spent" + SERVICE_PROVIDER_ERROR_RATES = "service_provider_error_rates" + SPAN_RESPONSE_TIME = "span_response_time" + TOKEN_USAGE = "token_usage" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_threshold_operator.py b/python/fi/generated/openapi_client/models/user_alert_monitor_threshold_operator.py new file mode 100644 index 0000000..fe010ce --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_threshold_operator.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UserAlertMonitorThresholdOperator(str, Enum): + GREATER_THAN = "greater_than" + LESS_THAN = "less_than" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/user_alert_monitor_threshold_type.py b/python/fi/generated/openapi_client/models/user_alert_monitor_threshold_type.py new file mode 100644 index 0000000..3dcdb0f --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_alert_monitor_threshold_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class UserAlertMonitorThresholdType(str, Enum): + PERCENTAGE_CHANGE = "percentage_change" + STATIC = "static" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/user_code_example_response.py b/python/fi/generated/openapi_client/models/user_code_example_response.py new file mode 100644 index 0000000..6e4ac22 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_code_example_response.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UserCodeExampleResponse") + + +@_attrs_define +class UserCodeExampleResponse: + """ + Attributes: + result (str): + status (bool | Unset): Default: True. + """ + + result: str + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + result = d.pop("result") + + status = d.pop("status", UNSET) + + user_code_example_response = cls( + result=result, + status=status, + ) + + user_code_example_response.additional_properties = d + return user_code_example_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_eval_mutation_request.py b/python/fi/generated/openapi_client/models/user_eval_mutation_request.py new file mode 100644 index 0000000..2d5432b --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_eval_mutation_request.py @@ -0,0 +1,195 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_eval_mutation_request_composite_weight_overrides import ( + UserEvalMutationRequestCompositeWeightOverrides, + ) + from ..models.user_eval_mutation_request_config import UserEvalMutationRequestConfig + + +T = TypeVar("T", bound="UserEvalMutationRequest") + + +@_attrs_define +class UserEvalMutationRequest: + """ + Attributes: + name (str): + template_id (str): + config (UserEvalMutationRequestConfig): + kb_id (UUID | Unset): + error_localizer (bool | Unset): Default: False. + model (str | Unset): + eval_type (str | Unset): + run (bool | Unset): Default: False. + save_as_template (bool | Unset): Default: False. + experiment_id (UUID | Unset): + composite_weight_overrides (UserEvalMutationRequestCompositeWeightOverrides | Unset): + """ + + name: str + template_id: str + config: UserEvalMutationRequestConfig + kb_id: UUID | Unset = UNSET + error_localizer: bool | Unset = False + model: str | Unset = UNSET + eval_type: str | Unset = UNSET + run: bool | Unset = False + save_as_template: bool | Unset = False + experiment_id: UUID | Unset = UNSET + composite_weight_overrides: ( + UserEvalMutationRequestCompositeWeightOverrides | Unset + ) = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + template_id = self.template_id + + config = self.config.to_dict() + + kb_id: str | Unset = UNSET + if not isinstance(self.kb_id, Unset): + kb_id = str(self.kb_id) + + error_localizer = self.error_localizer + + model = self.model + + eval_type = self.eval_type + + run = self.run + + save_as_template = self.save_as_template + + experiment_id: str | Unset = UNSET + if not isinstance(self.experiment_id, Unset): + experiment_id = str(self.experiment_id) + + composite_weight_overrides: dict[str, Any] | Unset = UNSET + if not isinstance(self.composite_weight_overrides, Unset): + composite_weight_overrides = self.composite_weight_overrides.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "template_id": template_id, + "config": config, + } + ) + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if model is not UNSET: + field_dict["model"] = model + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if run is not UNSET: + field_dict["run"] = run + if save_as_template is not UNSET: + field_dict["save_as_template"] = save_as_template + if experiment_id is not UNSET: + field_dict["experiment_id"] = experiment_id + if composite_weight_overrides is not UNSET: + field_dict["composite_weight_overrides"] = composite_weight_overrides + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_eval_mutation_request_composite_weight_overrides import ( + UserEvalMutationRequestCompositeWeightOverrides, + ) + from ..models.user_eval_mutation_request_config import ( + UserEvalMutationRequestConfig, + ) + + d = dict(src_dict) + name = d.pop("name") + + template_id = d.pop("template_id") + + config = UserEvalMutationRequestConfig.from_dict(d.pop("config")) + + _kb_id = d.pop("kb_id", UNSET) + kb_id: UUID | Unset + if isinstance(_kb_id, Unset): + kb_id = UNSET + else: + kb_id = UUID(_kb_id) + + error_localizer = d.pop("error_localizer", UNSET) + + model = d.pop("model", UNSET) + + eval_type = d.pop("eval_type", UNSET) + + run = d.pop("run", UNSET) + + save_as_template = d.pop("save_as_template", UNSET) + + _experiment_id = d.pop("experiment_id", UNSET) + experiment_id: UUID | Unset + if isinstance(_experiment_id, Unset): + experiment_id = UNSET + else: + experiment_id = UUID(_experiment_id) + + _composite_weight_overrides = d.pop("composite_weight_overrides", UNSET) + composite_weight_overrides: ( + UserEvalMutationRequestCompositeWeightOverrides | Unset + ) + if isinstance(_composite_weight_overrides, Unset): + composite_weight_overrides = UNSET + else: + composite_weight_overrides = ( + UserEvalMutationRequestCompositeWeightOverrides.from_dict( + _composite_weight_overrides + ) + ) + + user_eval_mutation_request = cls( + name=name, + template_id=template_id, + config=config, + kb_id=kb_id, + error_localizer=error_localizer, + model=model, + eval_type=eval_type, + run=run, + save_as_template=save_as_template, + experiment_id=experiment_id, + composite_weight_overrides=composite_weight_overrides, + ) + + user_eval_mutation_request.additional_properties = d + return user_eval_mutation_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_eval_mutation_request_composite_weight_overrides.py b/python/fi/generated/openapi_client/models/user_eval_mutation_request_composite_weight_overrides.py new file mode 100644 index 0000000..de96577 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_eval_mutation_request_composite_weight_overrides.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserEvalMutationRequestCompositeWeightOverrides") + + +@_attrs_define +class UserEvalMutationRequestCompositeWeightOverrides: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_eval_mutation_request_composite_weight_overrides = cls() + + user_eval_mutation_request_composite_weight_overrides.additional_properties = d + return user_eval_mutation_request_composite_weight_overrides + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_eval_mutation_request_config.py b/python/fi/generated/openapi_client/models/user_eval_mutation_request_config.py new file mode 100644 index 0000000..18613e4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_eval_mutation_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserEvalMutationRequestConfig") + + +@_attrs_define +class UserEvalMutationRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_eval_mutation_request_config = cls() + + user_eval_mutation_request_config.additional_properties = d + return user_eval_mutation_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_eval_update_request.py b/python/fi/generated/openapi_client/models/user_eval_update_request.py new file mode 100644 index 0000000..2ba5134 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_eval_update_request.py @@ -0,0 +1,195 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_eval_update_request_composite_weight_overrides import ( + UserEvalUpdateRequestCompositeWeightOverrides, + ) + from ..models.user_eval_update_request_config import UserEvalUpdateRequestConfig + + +T = TypeVar("T", bound="UserEvalUpdateRequest") + + +@_attrs_define +class UserEvalUpdateRequest: + """ + Attributes: + config (UserEvalUpdateRequestConfig): + name (str | Unset): + template_id (str | Unset): + kb_id (UUID | Unset): + error_localizer (bool | Unset): Default: False. + model (str | Unset): + eval_type (str | Unset): + run (bool | Unset): Default: False. + save_as_template (bool | Unset): Default: False. + experiment_id (UUID | Unset): + composite_weight_overrides (UserEvalUpdateRequestCompositeWeightOverrides | Unset): + """ + + config: UserEvalUpdateRequestConfig + name: str | Unset = UNSET + template_id: str | Unset = UNSET + kb_id: UUID | Unset = UNSET + error_localizer: bool | Unset = False + model: str | Unset = UNSET + eval_type: str | Unset = UNSET + run: bool | Unset = False + save_as_template: bool | Unset = False + experiment_id: UUID | Unset = UNSET + composite_weight_overrides: ( + UserEvalUpdateRequestCompositeWeightOverrides | Unset + ) = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + config = self.config.to_dict() + + name = self.name + + template_id = self.template_id + + kb_id: str | Unset = UNSET + if not isinstance(self.kb_id, Unset): + kb_id = str(self.kb_id) + + error_localizer = self.error_localizer + + model = self.model + + eval_type = self.eval_type + + run = self.run + + save_as_template = self.save_as_template + + experiment_id: str | Unset = UNSET + if not isinstance(self.experiment_id, Unset): + experiment_id = str(self.experiment_id) + + composite_weight_overrides: dict[str, Any] | Unset = UNSET + if not isinstance(self.composite_weight_overrides, Unset): + composite_weight_overrides = self.composite_weight_overrides.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "config": config, + } + ) + if name is not UNSET: + field_dict["name"] = name + if template_id is not UNSET: + field_dict["template_id"] = template_id + if kb_id is not UNSET: + field_dict["kb_id"] = kb_id + if error_localizer is not UNSET: + field_dict["error_localizer"] = error_localizer + if model is not UNSET: + field_dict["model"] = model + if eval_type is not UNSET: + field_dict["eval_type"] = eval_type + if run is not UNSET: + field_dict["run"] = run + if save_as_template is not UNSET: + field_dict["save_as_template"] = save_as_template + if experiment_id is not UNSET: + field_dict["experiment_id"] = experiment_id + if composite_weight_overrides is not UNSET: + field_dict["composite_weight_overrides"] = composite_weight_overrides + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_eval_update_request_composite_weight_overrides import ( + UserEvalUpdateRequestCompositeWeightOverrides, + ) + from ..models.user_eval_update_request_config import UserEvalUpdateRequestConfig + + d = dict(src_dict) + config = UserEvalUpdateRequestConfig.from_dict(d.pop("config")) + + name = d.pop("name", UNSET) + + template_id = d.pop("template_id", UNSET) + + _kb_id = d.pop("kb_id", UNSET) + kb_id: UUID | Unset + if isinstance(_kb_id, Unset): + kb_id = UNSET + else: + kb_id = UUID(_kb_id) + + error_localizer = d.pop("error_localizer", UNSET) + + model = d.pop("model", UNSET) + + eval_type = d.pop("eval_type", UNSET) + + run = d.pop("run", UNSET) + + save_as_template = d.pop("save_as_template", UNSET) + + _experiment_id = d.pop("experiment_id", UNSET) + experiment_id: UUID | Unset + if isinstance(_experiment_id, Unset): + experiment_id = UNSET + else: + experiment_id = UUID(_experiment_id) + + _composite_weight_overrides = d.pop("composite_weight_overrides", UNSET) + composite_weight_overrides: ( + UserEvalUpdateRequestCompositeWeightOverrides | Unset + ) + if isinstance(_composite_weight_overrides, Unset): + composite_weight_overrides = UNSET + else: + composite_weight_overrides = ( + UserEvalUpdateRequestCompositeWeightOverrides.from_dict( + _composite_weight_overrides + ) + ) + + user_eval_update_request = cls( + config=config, + name=name, + template_id=template_id, + kb_id=kb_id, + error_localizer=error_localizer, + model=model, + eval_type=eval_type, + run=run, + save_as_template=save_as_template, + experiment_id=experiment_id, + composite_weight_overrides=composite_weight_overrides, + ) + + user_eval_update_request.additional_properties = d + return user_eval_update_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_eval_update_request_composite_weight_overrides.py b/python/fi/generated/openapi_client/models/user_eval_update_request_composite_weight_overrides.py new file mode 100644 index 0000000..cd5a4a6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_eval_update_request_composite_weight_overrides.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserEvalUpdateRequestCompositeWeightOverrides") + + +@_attrs_define +class UserEvalUpdateRequestCompositeWeightOverrides: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_eval_update_request_composite_weight_overrides = cls() + + user_eval_update_request_composite_weight_overrides.additional_properties = d + return user_eval_update_request_composite_weight_overrides + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_eval_update_request_config.py b/python/fi/generated/openapi_client/models/user_eval_update_request_config.py new file mode 100644 index 0000000..2e202c3 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_eval_update_request_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserEvalUpdateRequestConfig") + + +@_attrs_define +class UserEvalUpdateRequestConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_eval_update_request_config = cls() + + user_eval_update_request_config.additional_properties = d + return user_eval_update_request_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_goals.py b/python/fi/generated/openapi_client/models/user_goals.py new file mode 100644 index 0000000..acae31d --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_goals.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserGoals") + + +@_attrs_define +class UserGoals: + """List of user's goals for using the platform""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_goals = cls() + + user_goals.additional_properties = d + return user_goals + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_info_organization.py b/python/fi/generated/openapi_client/models/user_info_organization.py new file mode 100644 index 0000000..e353d4d --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_info_organization.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UserInfoOrganization") + + +@_attrs_define +class UserInfoOrganization: + """ + Attributes: + id (UUID): + name (str): + display_name (str): + ws_enabled (bool | Unset): + """ + + id: UUID + name: str + display_name: str + ws_enabled: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + display_name = self.display_name + + ws_enabled = self.ws_enabled + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "display_name": display_name, + } + ) + if ws_enabled is not UNSET: + field_dict["ws_enabled"] = ws_enabled + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + display_name = d.pop("display_name") + + ws_enabled = d.pop("ws_enabled", UNSET) + + user_info_organization = cls( + id=id, + name=name, + display_name=display_name, + ws_enabled=ws_enabled, + ) + + user_info_organization.additional_properties = d + return user_info_organization + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_info_response.py b/python/fi/generated/openapi_client/models/user_info_response.py new file mode 100644 index 0000000..d8d2731 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_info_response.py @@ -0,0 +1,367 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.user_info_organization import UserInfoOrganization + from ..models.user_info_two_factor_methods import UserInfoTwoFactorMethods + + +T = TypeVar("T", bound="UserInfoResponse") + + +@_attrs_define +class UserInfoResponse: + """ + Attributes: + id (UUID): + email (str): + name (None | str): + organization_role (None | str): + organization (UserInfoOrganization): + created_at (datetime.datetime): + status (str): + role (None | str): + remember_me (bool): + get_started_completed (bool): + onboarding_completed (bool): + ws_enabled (bool): + default_workspace_id (None | UUID): + default_workspace_name (None | str): + default_workspace_display_name (None | str): + default_workspace_role (None | str): + org_level (int | None): + ws_level (int | None): + effective_level (int | None): + goals (list[str] | Unset): + requires_org_setup (bool | Unset): + has_2fa_enabled (bool | Unset): + two_factor_methods (UserInfoTwoFactorMethods | Unset): + org_2fa_required (bool | Unset): + org_2fa_grace_ends_at (datetime.datetime | Unset): + """ + + id: UUID + email: str + name: None | str + organization_role: None | str + organization: UserInfoOrganization + created_at: datetime.datetime + status: str + role: None | str + remember_me: bool + get_started_completed: bool + onboarding_completed: bool + ws_enabled: bool + default_workspace_id: None | UUID + default_workspace_name: None | str + default_workspace_display_name: None | str + default_workspace_role: None | str + org_level: int | None + ws_level: int | None + effective_level: int | None + goals: list[str] | Unset = UNSET + requires_org_setup: bool | Unset = UNSET + has_2fa_enabled: bool | Unset = UNSET + two_factor_methods: UserInfoTwoFactorMethods | Unset = UNSET + org_2fa_required: bool | Unset = UNSET + org_2fa_grace_ends_at: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + email = self.email + + name: None | str + name = self.name + + organization_role: None | str + organization_role = self.organization_role + + organization = self.organization.to_dict() + + created_at = self.created_at.isoformat() + + status = self.status + + role: None | str + role = self.role + + remember_me = self.remember_me + + get_started_completed = self.get_started_completed + + onboarding_completed = self.onboarding_completed + + ws_enabled = self.ws_enabled + + default_workspace_id: None | str + if isinstance(self.default_workspace_id, UUID): + default_workspace_id = str(self.default_workspace_id) + else: + default_workspace_id = self.default_workspace_id + + default_workspace_name: None | str + default_workspace_name = self.default_workspace_name + + default_workspace_display_name: None | str + default_workspace_display_name = self.default_workspace_display_name + + default_workspace_role: None | str + default_workspace_role = self.default_workspace_role + + org_level: int | None + org_level = self.org_level + + ws_level: int | None + ws_level = self.ws_level + + effective_level: int | None + effective_level = self.effective_level + + goals: list[str] | Unset = UNSET + if not isinstance(self.goals, Unset): + goals = self.goals + + requires_org_setup = self.requires_org_setup + + has_2fa_enabled = self.has_2fa_enabled + + two_factor_methods: dict[str, Any] | Unset = UNSET + if not isinstance(self.two_factor_methods, Unset): + two_factor_methods = self.two_factor_methods.to_dict() + + org_2fa_required = self.org_2fa_required + + org_2fa_grace_ends_at: str | Unset = UNSET + if not isinstance(self.org_2fa_grace_ends_at, Unset): + org_2fa_grace_ends_at = self.org_2fa_grace_ends_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "email": email, + "name": name, + "organization_role": organization_role, + "organization": organization, + "created_at": created_at, + "status": status, + "role": role, + "remember_me": remember_me, + "get_started_completed": get_started_completed, + "onboarding_completed": onboarding_completed, + "ws_enabled": ws_enabled, + "default_workspace_id": default_workspace_id, + "default_workspace_name": default_workspace_name, + "default_workspace_display_name": default_workspace_display_name, + "default_workspace_role": default_workspace_role, + "org_level": org_level, + "ws_level": ws_level, + "effective_level": effective_level, + } + ) + if goals is not UNSET: + field_dict["goals"] = goals + if requires_org_setup is not UNSET: + field_dict["requires_org_setup"] = requires_org_setup + if has_2fa_enabled is not UNSET: + field_dict["has_2fa_enabled"] = has_2fa_enabled + if two_factor_methods is not UNSET: + field_dict["two_factor_methods"] = two_factor_methods + if org_2fa_required is not UNSET: + field_dict["org_2fa_required"] = org_2fa_required + if org_2fa_grace_ends_at is not UNSET: + field_dict["org_2fa_grace_ends_at"] = org_2fa_grace_ends_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_info_organization import UserInfoOrganization + from ..models.user_info_two_factor_methods import UserInfoTwoFactorMethods + + d = dict(src_dict) + id = UUID(d.pop("id")) + + email = d.pop("email") + + def _parse_name(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + name = _parse_name(d.pop("name")) + + def _parse_organization_role(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + organization_role = _parse_organization_role(d.pop("organization_role")) + + organization = UserInfoOrganization.from_dict(d.pop("organization")) + + created_at = isoparse(d.pop("created_at")) + + status = d.pop("status") + + def _parse_role(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + role = _parse_role(d.pop("role")) + + remember_me = d.pop("remember_me") + + get_started_completed = d.pop("get_started_completed") + + onboarding_completed = d.pop("onboarding_completed") + + ws_enabled = d.pop("ws_enabled") + + def _parse_default_workspace_id(data: object) -> None | UUID: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + default_workspace_id_type_0 = UUID(data) + + return default_workspace_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UUID, data) + + default_workspace_id = _parse_default_workspace_id( + d.pop("default_workspace_id") + ) + + def _parse_default_workspace_name(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + default_workspace_name = _parse_default_workspace_name( + d.pop("default_workspace_name") + ) + + def _parse_default_workspace_display_name(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + default_workspace_display_name = _parse_default_workspace_display_name( + d.pop("default_workspace_display_name") + ) + + def _parse_default_workspace_role(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + default_workspace_role = _parse_default_workspace_role( + d.pop("default_workspace_role") + ) + + def _parse_org_level(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + org_level = _parse_org_level(d.pop("org_level")) + + def _parse_ws_level(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + ws_level = _parse_ws_level(d.pop("ws_level")) + + def _parse_effective_level(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + effective_level = _parse_effective_level(d.pop("effective_level")) + + goals = cast(list[str], d.pop("goals", UNSET)) + + requires_org_setup = d.pop("requires_org_setup", UNSET) + + has_2fa_enabled = d.pop("has_2fa_enabled", UNSET) + + _two_factor_methods = d.pop("two_factor_methods", UNSET) + two_factor_methods: UserInfoTwoFactorMethods | Unset + if isinstance(_two_factor_methods, Unset): + two_factor_methods = UNSET + else: + two_factor_methods = UserInfoTwoFactorMethods.from_dict(_two_factor_methods) + + org_2fa_required = d.pop("org_2fa_required", UNSET) + + _org_2fa_grace_ends_at = d.pop("org_2fa_grace_ends_at", UNSET) + org_2fa_grace_ends_at: datetime.datetime | Unset + if isinstance(_org_2fa_grace_ends_at, Unset): + org_2fa_grace_ends_at = UNSET + else: + org_2fa_grace_ends_at = isoparse(_org_2fa_grace_ends_at) + + user_info_response = cls( + id=id, + email=email, + name=name, + organization_role=organization_role, + organization=organization, + created_at=created_at, + status=status, + role=role, + remember_me=remember_me, + get_started_completed=get_started_completed, + onboarding_completed=onboarding_completed, + ws_enabled=ws_enabled, + default_workspace_id=default_workspace_id, + default_workspace_name=default_workspace_name, + default_workspace_display_name=default_workspace_display_name, + default_workspace_role=default_workspace_role, + org_level=org_level, + ws_level=ws_level, + effective_level=effective_level, + goals=goals, + requires_org_setup=requires_org_setup, + has_2fa_enabled=has_2fa_enabled, + two_factor_methods=two_factor_methods, + org_2fa_required=org_2fa_required, + org_2fa_grace_ends_at=org_2fa_grace_ends_at, + ) + + user_info_response.additional_properties = d + return user_info_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_info_two_factor_methods.py b/python/fi/generated/openapi_client/models/user_info_two_factor_methods.py new file mode 100644 index 0000000..2a1fe36 --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_info_two_factor_methods.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserInfoTwoFactorMethods") + + +@_attrs_define +class UserInfoTwoFactorMethods: + """ + Attributes: + totp (bool): + passkey (bool): + """ + + totp: bool + passkey: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + totp = self.totp + + passkey = self.passkey + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "totp": totp, + "passkey": passkey, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + totp = d.pop("totp") + + passkey = d.pop("passkey") + + user_info_two_factor_methods = cls( + totp=totp, + passkey=passkey, + ) + + user_info_two_factor_methods.additional_properties = d + return user_info_two_factor_methods + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/user_organization_role.py b/python/fi/generated/openapi_client/models/user_organization_role.py new file mode 100644 index 0000000..ab8d3cd --- /dev/null +++ b/python/fi/generated/openapi_client/models/user_organization_role.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class UserOrganizationRole(str, Enum): + ADMIN = "Admin" + MEMBER = "Member" + OWNER = "Owner" + VIEWER = "Viewer" + WORKSPACE_ADMIN = "workspace_admin" + WORKSPACE_MEMBER = "workspace_member" + WORKSPACE_VIEWER = "workspace_viewer" + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/users_response.py b/python/fi/generated/openapi_client/models/users_response.py new file mode 100644 index 0000000..d8c23d1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/users_response.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.users_result import UsersResult + + +T = TypeVar("T", bound="UsersResponse") + + +@_attrs_define +class UsersResponse: + """ + Attributes: + result (UsersResult): + status (bool | Unset): Default: True. + """ + + result: UsersResult + status: bool | Unset = True + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + result = self.result.to_dict() + + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "result": result, + } + ) + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.users_result import UsersResult + + d = dict(src_dict) + result = UsersResult.from_dict(d.pop("result")) + + status = d.pop("status", UNSET) + + users_response = cls( + result=result, + status=status, + ) + + users_response.additional_properties = d + return users_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/users_result.py b/python/fi/generated/openapi_client/models/users_result.py new file mode 100644 index 0000000..8f48a2f --- /dev/null +++ b/python/fi/generated/openapi_client/models/users_result.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.users_result_table_item import UsersResultTableItem + + +T = TypeVar("T", bound="UsersResult") + + +@_attrs_define +class UsersResult: + """ + Attributes: + table (list[UsersResultTableItem]): + total_count (int): + total_pages (int): + """ + + table: list[UsersResultTableItem] + total_count: int + total_pages: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + table = [] + for table_item_data in self.table: + table_item = table_item_data.to_dict() + table.append(table_item) + + total_count = self.total_count + + total_pages = self.total_pages + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "table": table, + "total_count": total_count, + "total_pages": total_pages, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.users_result_table_item import UsersResultTableItem + + d = dict(src_dict) + table = [] + _table = d.pop("table") + for table_item_data in _table: + table_item = UsersResultTableItem.from_dict(table_item_data) + + table.append(table_item) + + total_count = d.pop("total_count") + + total_pages = d.pop("total_pages") + + users_result = cls( + table=table, + total_count=total_count, + total_pages=total_pages, + ) + + users_result.additional_properties = d + return users_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/users_result_table_item.py b/python/fi/generated/openapi_client/models/users_result_table_item.py new file mode 100644 index 0000000..d2dc03b --- /dev/null +++ b/python/fi/generated/openapi_client/models/users_result_table_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UsersResultTableItem") + + +@_attrs_define +class UsersResultTableItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + users_result_table_item = cls() + + users_result_table_item.additional_properties = d + return users_result_table_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/vector_db_column_request.py b/python/fi/generated/openapi_client/models/vector_db_column_request.py new file mode 100644 index 0000000..3062625 --- /dev/null +++ b/python/fi/generated/openapi_client/models/vector_db_column_request.py @@ -0,0 +1,216 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.vector_db_column_request_embedding_config import ( + VectorDBColumnRequestEmbeddingConfig, + ) + + +T = TypeVar("T", bound="VectorDBColumnRequest") + + +@_attrs_define +class VectorDBColumnRequest: + """ + Attributes: + column_id (UUID): + sub_type (str): + api_key (str): + new_column_name (str | Unset): + collection_name (str | Unset): + url (str | Unset): + search_type (str | Unset): + key (str | Unset): + limit (int | Unset): + index_name (str | Unset): + top_k (int | Unset): + namespace (str | Unset): + embedding_config (VectorDBColumnRequestEmbeddingConfig | Unset): + concurrency (int | Unset): Default: 5. + query_key (str | Unset): + vector_length (int | Unset): + """ + + column_id: UUID + sub_type: str + api_key: str + new_column_name: str | Unset = UNSET + collection_name: str | Unset = UNSET + url: str | Unset = UNSET + search_type: str | Unset = UNSET + key: str | Unset = UNSET + limit: int | Unset = UNSET + index_name: str | Unset = UNSET + top_k: int | Unset = UNSET + namespace: str | Unset = UNSET + embedding_config: VectorDBColumnRequestEmbeddingConfig | Unset = UNSET + concurrency: int | Unset = 5 + query_key: str | Unset = UNSET + vector_length: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + column_id = str(self.column_id) + + sub_type = self.sub_type + + api_key = self.api_key + + new_column_name = self.new_column_name + + collection_name = self.collection_name + + url = self.url + + search_type = self.search_type + + key = self.key + + limit = self.limit + + index_name = self.index_name + + top_k = self.top_k + + namespace = self.namespace + + embedding_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.embedding_config, Unset): + embedding_config = self.embedding_config.to_dict() + + concurrency = self.concurrency + + query_key = self.query_key + + vector_length = self.vector_length + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "column_id": column_id, + "sub_type": sub_type, + "api_key": api_key, + } + ) + if new_column_name is not UNSET: + field_dict["new_column_name"] = new_column_name + if collection_name is not UNSET: + field_dict["collection_name"] = collection_name + if url is not UNSET: + field_dict["url"] = url + if search_type is not UNSET: + field_dict["search_type"] = search_type + if key is not UNSET: + field_dict["key"] = key + if limit is not UNSET: + field_dict["limit"] = limit + if index_name is not UNSET: + field_dict["index_name"] = index_name + if top_k is not UNSET: + field_dict["top_k"] = top_k + if namespace is not UNSET: + field_dict["namespace"] = namespace + if embedding_config is not UNSET: + field_dict["embedding_config"] = embedding_config + if concurrency is not UNSET: + field_dict["concurrency"] = concurrency + if query_key is not UNSET: + field_dict["query_key"] = query_key + if vector_length is not UNSET: + field_dict["vector_length"] = vector_length + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.vector_db_column_request_embedding_config import ( + VectorDBColumnRequestEmbeddingConfig, + ) + + d = dict(src_dict) + column_id = UUID(d.pop("column_id")) + + sub_type = d.pop("sub_type") + + api_key = d.pop("api_key") + + new_column_name = d.pop("new_column_name", UNSET) + + collection_name = d.pop("collection_name", UNSET) + + url = d.pop("url", UNSET) + + search_type = d.pop("search_type", UNSET) + + key = d.pop("key", UNSET) + + limit = d.pop("limit", UNSET) + + index_name = d.pop("index_name", UNSET) + + top_k = d.pop("top_k", UNSET) + + namespace = d.pop("namespace", UNSET) + + _embedding_config = d.pop("embedding_config", UNSET) + embedding_config: VectorDBColumnRequestEmbeddingConfig | Unset + if isinstance(_embedding_config, Unset): + embedding_config = UNSET + else: + embedding_config = VectorDBColumnRequestEmbeddingConfig.from_dict( + _embedding_config + ) + + concurrency = d.pop("concurrency", UNSET) + + query_key = d.pop("query_key", UNSET) + + vector_length = d.pop("vector_length", UNSET) + + vector_db_column_request = cls( + column_id=column_id, + sub_type=sub_type, + api_key=api_key, + new_column_name=new_column_name, + collection_name=collection_name, + url=url, + search_type=search_type, + key=key, + limit=limit, + index_name=index_name, + top_k=top_k, + namespace=namespace, + embedding_config=embedding_config, + concurrency=concurrency, + query_key=query_key, + vector_length=vector_length, + ) + + vector_db_column_request.additional_properties = d + return vector_db_column_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/vector_db_column_request_embedding_config.py b/python/fi/generated/openapi_client/models/vector_db_column_request_embedding_config.py new file mode 100644 index 0000000..f97526e --- /dev/null +++ b/python/fi/generated/openapi_client/models/vector_db_column_request_embedding_config.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="VectorDBColumnRequestEmbeddingConfig") + + +@_attrs_define +class VectorDBColumnRequestEmbeddingConfig: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + vector_db_column_request_embedding_config = cls() + + vector_db_column_request_embedding_config.additional_properties = d + return vector_db_column_request_embedding_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_access_input.py b/python/fi/generated/openapi_client/models/workspace_access_input.py new file mode 100644 index 0000000..d340ba4 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_access_input.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workspace_access_input_level import WorkspaceAccessInputLevel +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkspaceAccessInput") + + +@_attrs_define +class WorkspaceAccessInput: + """List of {"workspace_id": "", "level": }. + + Attributes: + workspace_id (UUID): + level (WorkspaceAccessInputLevel | Unset): + """ + + workspace_id: UUID + level: WorkspaceAccessInputLevel | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workspace_id = str(self.workspace_id) + + level: int | Unset = UNSET + if not isinstance(self.level, Unset): + level = self.level.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspace_id": workspace_id, + } + ) + if level is not UNSET: + field_dict["level"] = level + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workspace_id = UUID(d.pop("workspace_id")) + + _level = d.pop("level", UNSET) + level: WorkspaceAccessInputLevel | Unset + if isinstance(_level, Unset): + level = UNSET + else: + level = WorkspaceAccessInputLevel(_level) + + workspace_access_input = cls( + workspace_id=workspace_id, + level=level, + ) + + workspace_access_input.additional_properties = d + return workspace_access_input + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_access_input_level.py b/python/fi/generated/openapi_client/models/workspace_access_input_level.py new file mode 100644 index 0000000..b2eb309 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_access_input_level.py @@ -0,0 +1,10 @@ +from enum import IntEnum + + +class WorkspaceAccessInputLevel(IntEnum): + VALUE_8 = 8 + VALUE_3 = 3 + VALUE_1 = 1 + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/workspace_admin_summary.py b/python/fi/generated/openapi_client/models/workspace_admin_summary.py new file mode 100644 index 0000000..804446b --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_admin_summary.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkspaceAdminSummary") + + +@_attrs_define +class WorkspaceAdminSummary: + """ + Attributes: + name (None | str): + id (UUID): + """ + + name: None | str + id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str + name = self.name + + id = str(self.id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "id": id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + name = _parse_name(d.pop("name")) + + id = UUID(d.pop("id")) + + workspace_admin_summary = cls( + name=name, + id=id, + ) + + workspace_admin_summary.additional_properties = d + return workspace_admin_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_list_item_response.py b/python/fi/generated/openapi_client/models/workspace_list_item_response.py new file mode 100644 index 0000000..bb67f59 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_list_item_response.py @@ -0,0 +1,176 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workspace_admin_summary import WorkspaceAdminSummary + + +T = TypeVar("T", bound="WorkspaceListItemResponse") + + +@_attrs_define +class WorkspaceListItemResponse: + """ + Attributes: + id (UUID): + name (str): + display_name (str): + admin_names (list[WorkspaceAdminSummary] | Unset): + start_data (str | Unset): + last_update_date (str | Unset): + invite_link (str | Unset): + user_ws_level (int | None | Unset): + user_ws_role (None | str | Unset): + """ + + id: UUID + name: str + display_name: str + admin_names: list[WorkspaceAdminSummary] | Unset = UNSET + start_data: str | Unset = UNSET + last_update_date: str | Unset = UNSET + invite_link: str | Unset = UNSET + user_ws_level: int | None | Unset = UNSET + user_ws_role: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + display_name = self.display_name + + admin_names: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.admin_names, Unset): + admin_names = [] + for admin_names_item_data in self.admin_names: + admin_names_item = admin_names_item_data.to_dict() + admin_names.append(admin_names_item) + + start_data = self.start_data + + last_update_date = self.last_update_date + + invite_link = self.invite_link + + user_ws_level: int | None | Unset + if isinstance(self.user_ws_level, Unset): + user_ws_level = UNSET + else: + user_ws_level = self.user_ws_level + + user_ws_role: None | str | Unset + if isinstance(self.user_ws_role, Unset): + user_ws_role = UNSET + else: + user_ws_role = self.user_ws_role + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "display_name": display_name, + } + ) + if admin_names is not UNSET: + field_dict["admin_names"] = admin_names + if start_data is not UNSET: + field_dict["start_data"] = start_data + if last_update_date is not UNSET: + field_dict["last_update_date"] = last_update_date + if invite_link is not UNSET: + field_dict["invite_link"] = invite_link + if user_ws_level is not UNSET: + field_dict["user_ws_level"] = user_ws_level + if user_ws_role is not UNSET: + field_dict["user_ws_role"] = user_ws_role + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.workspace_admin_summary import WorkspaceAdminSummary + + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + display_name = d.pop("display_name") + + _admin_names = d.pop("admin_names", UNSET) + admin_names: list[WorkspaceAdminSummary] | Unset = UNSET + if _admin_names is not UNSET: + admin_names = [] + for admin_names_item_data in _admin_names: + admin_names_item = WorkspaceAdminSummary.from_dict( + admin_names_item_data + ) + + admin_names.append(admin_names_item) + + start_data = d.pop("start_data", UNSET) + + last_update_date = d.pop("last_update_date", UNSET) + + invite_link = d.pop("invite_link", UNSET) + + def _parse_user_ws_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + user_ws_level = _parse_user_ws_level(d.pop("user_ws_level", UNSET)) + + def _parse_user_ws_role(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_ws_role = _parse_user_ws_role(d.pop("user_ws_role", UNSET)) + + workspace_list_item_response = cls( + id=id, + name=name, + display_name=display_name, + admin_names=admin_names, + start_data=start_data, + last_update_date=last_update_date, + invite_link=invite_link, + user_ws_level=user_ws_level, + user_ws_role=user_ws_role, + ) + + workspace_list_item_response.additional_properties = d + return workspace_list_item_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_list_paginated_response.py b/python/fi/generated/openapi_client/models/workspace_list_paginated_response.py new file mode 100644 index 0000000..bacc15b --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_list_paginated_response.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.workspace_list_item_response import WorkspaceListItemResponse + + +T = TypeVar("T", bound="WorkspaceListPaginatedResponse") + + +@_attrs_define +class WorkspaceListPaginatedResponse: + """ + Attributes: + count (int): + next_ (None | str): + previous (None | str): + results (list[WorkspaceListItemResponse]): + total_pages (int): + current_page (int): + """ + + count: int + next_: None | str + previous: None | str + results: list[WorkspaceListItemResponse] + total_pages: int + current_page: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + count = self.count + + next_: None | str + next_ = self.next_ + + previous: None | str + previous = self.previous + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + total_pages = self.total_pages + + current_page = self.current_page + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "count": count, + "next": next_, + "previous": previous, + "results": results, + "total_pages": total_pages, + "current_page": current_page, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.workspace_list_item_response import WorkspaceListItemResponse + + d = dict(src_dict) + count = d.pop("count") + + def _parse_next_(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + next_ = _parse_next_(d.pop("next")) + + def _parse_previous(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + previous = _parse_previous(d.pop("previous")) + + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = WorkspaceListItemResponse.from_dict(results_item_data) + + results.append(results_item) + + total_pages = d.pop("total_pages") + + current_page = d.pop("current_page") + + workspace_list_paginated_response = cls( + count=count, + next_=next_, + previous=previous, + results=results, + total_pages=total_pages, + current_page=current_page, + ) + + workspace_list_paginated_response.additional_properties = d + return workspace_list_paginated_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_member_remove.py b/python/fi/generated/openapi_client/models/workspace_member_remove.py new file mode 100644 index 0000000..a4307a6 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_member_remove.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkspaceMemberRemove") + + +@_attrs_define +class WorkspaceMemberRemove: + """ + Attributes: + user_id (UUID): + """ + + user_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = str(self.user_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_id": user_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_id = UUID(d.pop("user_id")) + + workspace_member_remove = cls( + user_id=user_id, + ) + + workspace_member_remove.additional_properties = d + return workspace_member_remove + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_member_role_update.py b/python/fi/generated/openapi_client/models/workspace_member_role_update.py new file mode 100644 index 0000000..8186717 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_member_role_update.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workspace_member_role_update_ws_level import ( + WorkspaceMemberRoleUpdateWsLevel, +) + +T = TypeVar("T", bound="WorkspaceMemberRoleUpdate") + + +@_attrs_define +class WorkspaceMemberRoleUpdate: + """ + Attributes: + user_id (UUID): + ws_level (WorkspaceMemberRoleUpdateWsLevel): + """ + + user_id: UUID + ws_level: WorkspaceMemberRoleUpdateWsLevel + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_id = str(self.user_id) + + ws_level = self.ws_level.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "user_id": user_id, + "ws_level": ws_level, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_id = UUID(d.pop("user_id")) + + ws_level = WorkspaceMemberRoleUpdateWsLevel(d.pop("ws_level")) + + workspace_member_role_update = cls( + user_id=user_id, + ws_level=ws_level, + ) + + workspace_member_role_update.additional_properties = d + return workspace_member_role_update + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_member_role_update_response.py b/python/fi/generated/openapi_client/models/workspace_member_role_update_response.py new file mode 100644 index 0000000..94fecd7 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_member_role_update_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.workspace_member_role_update_result import ( + WorkspaceMemberRoleUpdateResult, + ) + + +T = TypeVar("T", bound="WorkspaceMemberRoleUpdateResponse") + + +@_attrs_define +class WorkspaceMemberRoleUpdateResponse: + """ + Attributes: + status (bool): + result (WorkspaceMemberRoleUpdateResult): + """ + + status: bool + result: WorkspaceMemberRoleUpdateResult + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + result = self.result.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "result": result, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.workspace_member_role_update_result import ( + WorkspaceMemberRoleUpdateResult, + ) + + d = dict(src_dict) + status = d.pop("status") + + result = WorkspaceMemberRoleUpdateResult.from_dict(d.pop("result")) + + workspace_member_role_update_response = cls( + status=status, + result=result, + ) + + workspace_member_role_update_response.additional_properties = d + return workspace_member_role_update_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_member_role_update_result.py b/python/fi/generated/openapi_client/models/workspace_member_role_update_result.py new file mode 100644 index 0000000..d19ec47 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_member_role_update_result.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkspaceMemberRoleUpdateResult") + + +@_attrs_define +class WorkspaceMemberRoleUpdateResult: + """ + Attributes: + message (str): + user_id (UUID): + ws_level (int): + ws_role (str): + """ + + message: str + user_id: UUID + ws_level: int + ws_role: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + user_id = str(self.user_id) + + ws_level = self.ws_level + + ws_role = self.ws_role + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + "user_id": user_id, + "ws_level": ws_level, + "ws_role": ws_role, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + message = d.pop("message") + + user_id = UUID(d.pop("user_id")) + + ws_level = d.pop("ws_level") + + ws_role = d.pop("ws_role") + + workspace_member_role_update_result = cls( + message=message, + user_id=user_id, + ws_level=ws_level, + ws_role=ws_role, + ) + + workspace_member_role_update_result.additional_properties = d + return workspace_member_role_update_result + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/models/workspace_member_role_update_ws_level.py b/python/fi/generated/openapi_client/models/workspace_member_role_update_ws_level.py new file mode 100644 index 0000000..1023ec1 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_member_role_update_ws_level.py @@ -0,0 +1,10 @@ +from enum import IntEnum + + +class WorkspaceMemberRoleUpdateWsLevel(IntEnum): + VALUE_8 = 8 + VALUE_3 = 3 + VALUE_1 = 1 + + def __str__(self) -> str: + return str(self.value) diff --git a/python/fi/generated/openapi_client/models/workspace_summary.py b/python/fi/generated/openapi_client/models/workspace_summary.py new file mode 100644 index 0000000..aeda037 --- /dev/null +++ b/python/fi/generated/openapi_client/models/workspace_summary.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkspaceSummary") + + +@_attrs_define +class WorkspaceSummary: + """ + Attributes: + id (UUID): + name (str): + display_name (str): + description (str | Unset): + is_default (bool | Unset): + """ + + id: UUID + name: str + display_name: str + description: str | Unset = UNSET + is_default: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + name = self.name + + display_name = self.display_name + + description = self.description + + is_default = self.is_default + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "display_name": display_name, + } + ) + if description is not UNSET: + field_dict["description"] = description + if is_default is not UNSET: + field_dict["is_default"] = is_default + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + name = d.pop("name") + + display_name = d.pop("display_name") + + description = d.pop("description", UNSET) + + is_default = d.pop("is_default", UNSET) + + workspace_summary = cls( + id=id, + name=name, + display_name=display_name, + description=description, + is_default=is_default, + ) + + workspace_summary.additional_properties = d + return workspace_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/python/fi/generated/openapi_client/types.py b/python/fi/generated/openapi_client/types.py new file mode 100644 index 0000000..b64af09 --- /dev/null +++ b/python/fi/generated/openapi_client/types.py @@ -0,0 +1,54 @@ +"""Contains some shared types for properties""" + +from collections.abc import Mapping, MutableMapping +from http import HTTPStatus +from typing import IO, BinaryIO, Generic, Literal, TypeVar + +from attrs import define + + +class Unset: + def __bool__(self) -> Literal[False]: + return False + + +UNSET: Unset = Unset() + +# The types that `httpx.Client(files=)` can accept, copied from that library. +FileContent = IO[bytes] | bytes | str +FileTypes = ( + # (filename, file (or bytes), content_type) + tuple[str | None, FileContent, str | None] + # (filename, file (or bytes), content_type, headers) + | tuple[str | None, FileContent, str | None, Mapping[str, str]] +) +RequestFiles = list[tuple[str, FileTypes]] + + +@define +class File: + """Contains information for file uploads""" + + payload: BinaryIO + file_name: str | None = None + mime_type: str | None = None + + def to_tuple(self) -> FileTypes: + """Return a tuple representation that httpx will accept for multipart/form-data""" + return self.file_name, self.payload, self.mime_type + + +T = TypeVar("T") + + +@define +class Response(Generic[T]): + """A response from an endpoint""" + + status_code: HTTPStatus + content: bytes + headers: MutableMapping[str, str] + parsed: T | None + + +__all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] diff --git a/python/pyproject.toml b/python/pyproject.toml index 30940d1..a4cfcdc 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -23,6 +23,8 @@ python-dateutil = ">=2.9" pytz = ">=2024.1" requests = ">=2.32" requests-futures = ">=1.0" +httpx = ">=0.27" +attrs = ">=23.0" six = ">=1.16" tzdata = ">=2024.1" urllib3 = ">=2.2" diff --git a/python/tests/test_futureagi_client.py b/python/tests/test_futureagi_client.py new file mode 100644 index 0000000..d4abf29 --- /dev/null +++ b/python/tests/test_futureagi_client.py @@ -0,0 +1,110 @@ +import json + +import httpx + +from fi import FutureAGIClient + + +def _client_with_transport(handler): + client = FutureAGIClient( + api_key="api-key", + secret_key="secret-key", + base_url="http://api.test", + ) + client.generated_client.set_httpx_client( + httpx.Client( + base_url="http://api.test", + headers={ + "X-Api-Key": "api-key", + "X-Secret-Key": "secret-key", + }, + transport=httpx.MockTransport(handler), + ) + ) + return client + + +def test_futureagi_client_sends_auth_headers_and_query_params(): + requests = [] + + def handler(request): + requests.append(request) + assert request.headers["X-Api-Key"] == "api-key" + assert request.headers["X-Secret-Key"] == "secret-key" + assert request.url.path == "/model-hub/annotation-queues/" + assert request.url.params["limit"] == "10" + return httpx.Response(200, json={"count": 0, "results": []}) + + client = _client_with_transport(handler) + + assert client.annotation_queues.list(limit=10) == { + "count": 0, + "results": [], + } + assert len(requests) == 1 + + +def test_futureagi_client_wraps_discussion_comments(): + requests = [] + + def handler(request): + requests.append(request) + assert request.method == "POST" + assert request.url.path == ( + "/model-hub/annotation-queues/q1/items/" + "11111111-1111-1111-1111-111111111111/discussion/" + ) + assert json.loads(request.content) == { + "comment": "@reviewer please check this item", + "mentioned_user_ids": ["u1"], + } + return httpx.Response( + 200, + json={ + "status": True, + "result": {"review_comments": [], "review_threads": []}, + }, + ) + + client = _client_with_transport(handler) + + client.annotation_queues.discussion.comment( + "q1", + "11111111-1111-1111-1111-111111111111", + { + "comment": "@reviewer please check this item", + "mentioned_user_ids": ["u1"], + }, + ) + assert len(requests) == 1 + + +def test_futureagi_client_wraps_common_public_sdk_paths(): + requests = [] + expected = [ + ("GET", "/model-hub/develops/dataset-1/get-dataset-table/"), + ("GET", "/model-hub/experiments/v2/experiment-1/rows/"), + ("GET", "/simulate/run-tests/run-test-1/status/"), + ("GET", "/tracer/trace/list_voice_calls/"), + ("GET", "/accounts/user-info/"), + ("GET", "/tracer/user-alert-logs/alert-1/list/"), + ] + + def handler(request): + requests.append(request) + method, path = expected.pop(0) + assert request.method == method + assert request.url.path == path + return httpx.Response(200, json={"ok": True}) + + client = _client_with_transport(handler) + + client.datasets.get_table("dataset-1", limit=5) + client.experiments.rows("experiment-1", page=1) + client.simulations.run_tests.status("run-test-1") + client.tracing.voice_calls(project_id="project-1") + client.users.current() + client.alerts.logs_for_alert("alert-1") + + assert len(requests) == 6 + assert expected == [] diff --git a/scripts/build-sdk-openapi.sh b/scripts/build-sdk-openapi.sh new file mode 100755 index 0000000..5fe117d --- /dev/null +++ b/scripts/build-sdk-openapi.sh @@ -0,0 +1,202 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SOURCE_SWAGGER="${1:-"$ROOT_DIR/../future-agi/api_contracts/openapi/swagger.json"}" +OUT_DIR="${2:-"$ROOT_DIR/openapi/sdk/generated"}" +ALIASES_FILE="$ROOT_DIR/openapi/sdk/operation-aliases.json" +WRAPPER_MAP_FILE="$ROOT_DIR/openapi/sdk/wrapper-map.json" + +mkdir -p "$OUT_DIR" + +OPS_FILE="$OUT_DIR/futureagi-sdk.operations.txt" +CONVERTED="$OUT_DIR/futureagi-management.openapi.json" +FILTERED="$OUT_DIR/futureagi-sdk.filtered.openapi.json" +PRUNED="$OUT_DIR/futureagi-sdk.pruned.openapi.json" +PUBLIC_SPEC="$OUT_DIR/futureagi-sdk.openapi.json" + +SDK_PATH_PATTERN='^/(model-hub/(annotation-queues|annotations-labels|scores|develops|dataset/|datasets|experiments/v2|api-keys|default-provider|knowledge-base|prompt-templates|prompt-labels|prompt-history-executions|api/models_list|model-providers/get-model-details|eval-templates|delete-eval-template)|sdk/api/v1|simulate/(agent-definitions|run-tests|test-executions|call-executions|api/(call-executions|run-tests|test-executions|personas)|scenarios|simulator-agents|prompt-templates/.*/simulations|prompt-simulations/scenarios|export)|tracer/(bulk-annotation|get-annotation-labels|project/list_projects|trace/|trace-session|trace-annotation|users|user-alerts|user-alert-logs|feed/issues)|accounts/(user-info|organization/members|workspace/list|workspace/switch|workspace/.*/members))' + +jq -r --arg pattern "$SDK_PATH_PATTERN" ' + .paths + | to_entries[] + | select(.key | test($pattern)) + | .value + | to_entries[] + | select(.key | IN("get", "post", "put", "patch", "delete")) + | .value.operationId +' "$SOURCE_SWAGGER" | sort -u > "$OPS_FILE" + +OPERATIONS="$(paste -sd, "$OPS_FILE")" + +npx --yes swagger2openapi \ + --patch \ + --targetVersion 3.0.3 \ + --outfile "$CONVERTED" \ + "$SOURCE_SWAGGER" >/dev/null + +npx --yes @hey-api/openapi-ts \ + --input "$CONVERTED" \ + --output "$OUT_DIR/.tmp-filter-check" \ + --dry-run \ + --silent >/dev/null + +jq --arg pattern "$SDK_PATH_PATTERN" ' + .paths |= with_entries( + select(.key | test($pattern)) + | .value |= with_entries(select(.key | IN("get", "post", "put", "patch", "delete", "parameters"))) + ) + | .components.schemas |= with_entries(.) +' "$CONVERTED" > "$FILTERED" + +node "$ROOT_DIR/scripts/prune-openapi-components.mjs" "$FILTERED" "$PRUNED" + +TMP_FILE="$(mktemp)" +jq --slurpfile aliases "$ALIASES_FILE" ' + def fix_schema: + if type == "object" then + (if .type? == "file" then .type = "string" | .format = "binary" else . end) + | (if .type? == "object" and .nullable? == true then + del(.nullable) + else + . + end) + | (if .type? == "object" and (has("properties") | not) and (has("additionalProperties") | not) then + .additionalProperties = true + else + . + end) + | (if has("default") and ( + (has("$ref")) + or ((.type? == "object") and ((.default | type) == "object")) + or (.type? == "array") + or ((has("enum")) and (.default as $default | (.enum | index($default)) == null)) + ) then + del(.default) + else + . + end) + | (if has("default") and has("type") and ( + ((.type == "string") and ((.default | type) != "string")) + or ((.type == "integer" or .type == "number") and ((.default | type) != "number")) + or ((.type == "boolean") and ((.default | type) != "boolean")) + or ((.type == "array") and ((.default | type) != "array")) + or ((.type == "object") and ((.default | type) != "object")) + ) then + del(.default) + else + . + end) + | (if .type? == "object" and .nullable? == true and (has("properties") | not) then + del(.nullable) + else + . + end) + | (if has("responses") then + .responses |= with_entries( + if (.value | type) == "object" then + .value.description = ( + if ((.value.description // "") == "") then "Response" else .value.description end + ) + else + . + end + ) + else + . + end) + | with_entries(.value |= fix_schema) + elif type == "array" then + map(fix_schema) + else + . + end; + + def patch_operation($path; $method): + ($aliases[0][(($method | ascii_upcase) + " " + $path)] // null) as $alias + | if $alias == null then + . + else + .operationId = $alias.operationId + | .tags = [$alias.tag] + end; + + fix_schema + | (if .components.schemas.TestExecutionStatus? then + .components.schemas.TestExecutionStatusSummary = .components.schemas.TestExecutionStatus + | del(.components.schemas.TestExecutionStatus) + | walk( + if type == "object" and .["$ref"]? == "#/components/schemas/TestExecutionStatus" then + .["$ref"] = "#/components/schemas/TestExecutionStatusSummary" + else + . + end + ) + else + . + end) + | .info.title = "Future AGI Public SDK API" + | .info.version = "0.1.0" + | .servers = [{"url": "https://api.futureagi.com"}] + | .paths |= with_entries( + .key as $path + | .value |= with_entries( + if .key | IN("get", "post", "put", "patch", "delete") then + .key as $method + | .value |= patch_operation($path; $method) + else + . + end + ) + ) + | .tags = ( + [ + .paths[] + | to_entries[] + | select(.key | IN("get", "post", "put", "patch", "delete")) + | .value.tags[]? + ] + | unique + | map({name: .}) + ) +' "$PRUNED" > "$TMP_FILE" +mv "$TMP_FILE" "$PUBLIC_SPEC" +chmod 0644 "$PUBLIC_SPEC" + +rm -rf "$OUT_DIR/.tmp-filter-check" +rm -f "$CONVERTED" "$FILTERED" "$PRUNED" + +node - "$PUBLIC_SPEC" "$WRAPPER_MAP_FILE" <<'NODE' +const fs = require("fs"); + +const spec = JSON.parse(fs.readFileSync(process.argv[2], "utf8")); +const wrapperMap = JSON.parse(fs.readFileSync(process.argv[3], "utf8")); + +const operationIds = new Set(); +for (const pathItem of Object.values(spec.paths ?? {})) { + for (const [method, operation] of Object.entries(pathItem ?? {})) { + if (!["get", "post", "put", "patch", "delete"].includes(method)) { + continue; + } + if (operation?.operationId) { + operationIds.add(operation.operationId); + } + } +} + +const missing = []; +for (const [namespace, methods] of Object.entries(wrapperMap)) { + for (const [method, operationId] of Object.entries(methods ?? {})) { + if (!operationIds.has(operationId)) { + missing.push(`${namespace}.${method} -> ${operationId}`); + } + } +} + +if (missing.length > 0) { + console.error(`Wrapper map references missing operationIds:\n${missing.join("\n")}`); + process.exit(1); +} +NODE + +echo "Built $PUBLIC_SPEC with $(wc -l < "$OPS_FILE" | tr -d " ") operations." diff --git a/scripts/generate-go-java-sdk.sh b/scripts/generate-go-java-sdk.sh new file mode 100755 index 0000000..f4b1a6d --- /dev/null +++ b/scripts/generate-go-java-sdk.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SPEC="$ROOT_DIR/openapi/sdk/generated/futureagi-sdk.openapi.json" +GENERATOR_IMAGE="${OPENAPI_GENERATOR_IMAGE:-openapitools/openapi-generator-cli:v7.12.0}" + +"$ROOT_DIR/scripts/build-sdk-openapi.sh" + +docker run --rm "$GENERATOR_IMAGE" version >/dev/null + +rm -rf "$ROOT_DIR/go/futureagi" +docker run --rm \ + -u "$(id -u):$(id -g)" \ + -v "$ROOT_DIR:/local" \ + "$GENERATOR_IMAGE" generate \ + -i "/local/openapi/sdk/generated/futureagi-sdk.openapi.json" \ + -g go \ + -o "/local/go/futureagi" \ + --git-host github.com \ + --git-user-id future-agi \ + --git-repo-id futureagi-sdk/go \ + --global-property=apiTests=false,modelTests=false,modelDocs=false \ + --additional-properties=packageName=futureagi,packageVersion=0.1.0,enumClassPrefix=true,isGoSubmodule=true,hideGenerationTimestamp=true +rm -rf \ + "$ROOT_DIR/go/futureagi/.github" \ + "$ROOT_DIR/go/futureagi/.openapi-generator" \ + "$ROOT_DIR/go/futureagi/.openapi-generator-ignore" \ + "$ROOT_DIR/go/futureagi/.travis.yml" \ + "$ROOT_DIR/go/futureagi/git_push.sh" + +rm -rf "$ROOT_DIR/java/futureagi" +docker run --rm \ + -u "$(id -u):$(id -g)" \ + -v "$ROOT_DIR:/local" \ + "$GENERATOR_IMAGE" generate \ + -i "/local/openapi/sdk/generated/futureagi-sdk.openapi.json" \ + -g java \ + -o "/local/java/futureagi" \ + --git-host github.com \ + --git-user-id future-agi \ + --git-repo-id futureagi-sdk \ + --global-property=apiTests=false,modelTests=false,modelDocs=false \ + --additional-properties=artifactId=futureagi-sdk,artifactVersion=0.1.0,groupId=com.futureagi,invokerPackage=com.futureagi.sdk,apiPackage=com.futureagi.sdk.api,modelPackage=com.futureagi.sdk.model,library=native,serializationLibrary=jackson,dateLibrary=java8,enumClassPrefix=true,hideGenerationTimestamp=true,useRuntimeException=true +rm -rf \ + "$ROOT_DIR/java/futureagi/.github" \ + "$ROOT_DIR/java/futureagi/.openapi-generator" \ + "$ROOT_DIR/java/futureagi/.openapi-generator-ignore" \ + "$ROOT_DIR/java/futureagi/.travis.yml" \ + "$ROOT_DIR/java/futureagi/git_push.sh" + +echo "Generated Go and Java low-level SDK clients." diff --git a/scripts/generate-oss-sdk.sh b/scripts/generate-oss-sdk.sh new file mode 100755 index 0000000..b65dacd --- /dev/null +++ b/scripts/generate-oss-sdk.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SPEC="$ROOT_DIR/openapi/sdk/generated/futureagi-sdk.openapi.json" + +"$ROOT_DIR/scripts/build-sdk-openapi.sh" + +rm -rf "$ROOT_DIR/typescript/futureagi/src/generated/openapi" +npx --yes @hey-api/openapi-ts \ + -i "$SPEC" \ + -o "$ROOT_DIR/typescript/futureagi/src/generated/openapi" \ + -c @hey-api/client-fetch \ + -p @hey-api/typescript @hey-api/sdk \ + --silent + +rm -rf "$ROOT_DIR/python/fi/generated/openapi_client" +mkdir -p "$ROOT_DIR/python/fi/generated" +uvx --from openapi-python-client openapi-python-client generate \ + --path "$SPEC" \ + --meta none \ + --overwrite \ + --output-path "$ROOT_DIR/python/fi/generated/openapi_client" + +echo "Generated TypeScript and Python low-level SDK clients." diff --git a/scripts/prune-openapi-components.mjs b/scripts/prune-openapi-components.mjs new file mode 100644 index 0000000..c9cdff7 --- /dev/null +++ b/scripts/prune-openapi-components.mjs @@ -0,0 +1,72 @@ +#!/usr/bin/env node +import fs from "node:fs"; + +const [inputPath, outputPath = inputPath] = process.argv.slice(2); + +if (!inputPath) { + console.error("Usage: prune-openapi-components.mjs [output]"); + process.exit(1); +} + +const spec = JSON.parse(fs.readFileSync(inputPath, "utf8")); +const refs = new Set(); +const seen = new Set(); + +function collectRefs(value) { + if (!value || typeof value !== "object") { + return; + } + + if (typeof value.$ref === "string" && value.$ref.startsWith("#/components/")) { + refs.add(value.$ref); + } + + if (Array.isArray(value)) { + value.forEach(collectRefs); + return; + } + + Object.values(value).forEach(collectRefs); +} + +function getByRef(ref) { + const parts = ref + .replace(/^#\//, "") + .split("/") + .map((part) => part.replace(/~1/g, "/").replace(/~0/g, "~")); + return parts.reduce((current, part) => current?.[part], spec); +} + +collectRefs(spec.paths); + +while (refs.size > seen.size) { + for (const ref of [...refs]) { + if (seen.has(ref)) { + continue; + } + seen.add(ref); + collectRefs(getByRef(ref)); + } +} + +if (spec.components) { + for (const [section, values] of Object.entries(spec.components)) { + if (!values || typeof values !== "object") { + continue; + } + + if (section === "securitySchemes") { + continue; + } + + for (const name of Object.keys(values)) { + const escapedName = name.replace(/~/g, "~0").replace(/\//g, "~1"); + const ref = `#/components/${section}/${escapedName}`; + if (!seen.has(ref)) { + delete values[name]; + } + } + } +} + +fs.writeFileSync(outputPath, `${JSON.stringify(spec, null, 2)}\n`); diff --git a/typescript/futureagi/.dockerignore b/typescript/futureagi/.dockerignore index 84227d4..fb44fd6 100644 --- a/typescript/futureagi/.dockerignore +++ b/typescript/futureagi/.dockerignore @@ -4,3 +4,25 @@ coverage .npm *.log *.tsbuildinfo + +# === Python virtualenvs + caches (added by setup) === +.venv +.venv/ +.venv*/ +**/.venv +**/.venv/ +**/.venv*/ +venv +venv/ +**/venv +**/venv/ +__pycache__/ +**/__pycache__/ +*.pyc +*.pyo +.pytest_cache/ +**/.pytest_cache/ +.ruff_cache/ +**/.ruff_cache/ +.mypy_cache/ +**/.mypy_cache/ diff --git a/typescript/futureagi/README.md b/typescript/futureagi/README.md index 7a18749..8eada48 100644 --- a/typescript/futureagi/README.md +++ b/typescript/futureagi/README.md @@ -5,9 +5,9 @@ Use it to create and manage evaluation datasets, run prompt–template experiments, build knowledge-bases, and monitor the quality of your generative-AI models – all from code. -* **Website:** -* **API docs:** -* **NPM:** [`@future-agi/sdk`](https://www.npmjs.com/package/@future-agi/sdk) +- **Website:** +- **API docs:** +- **NPM:** [`@future-agi/sdk`](https://www.npmjs.com/package/@future-agi/sdk) --- @@ -27,17 +27,17 @@ generative-AI models – all from code. • 📊 **Datasets** – create, mutate, download & evaluate tabular datasets. • 📜 **Prompt templates** – full CRUD, versioning and execution of - templates (including OpenAI-style chat messages & variables). +templates (including OpenAI-style chat messages & variables). • 📚 **Knowledge-bases** – upload files, list and delete KB assets. • ⚙️ **Utilities** – bounded executors, helper constants and strong - TypeScript types for all request / response payloads. -• 🤝 **Modern build** – ships both **ESM (ES2020)** *and* - **CommonJS (ES2016)** bundles; works in Node 18+ and all modern bundlers. +TypeScript types for all request / response payloads. +• 🤝 **Modern build** – ships both **ESM (ES2020)** _and_ +**CommonJS (ES2016)** bundles; works in Node 18+ and all modern bundlers. ## Requirements -* Node.js **18 or later** (the SDK targets ES2020 for ESM builds). -* An **API key** and **Secret key** obtained from your Future AGI +- Node.js **18 or later** (the SDK targets ES2020 for ESM builds). +- An **API key** and **Secret key** obtained from your Future AGI account. ## Installation @@ -56,10 +56,10 @@ yarn add @future-agi/sdk The package automatically selects the build that matches your environment: -| Import style | Runtime requirement | File served | -| ------------------ | ------------------- | -------------------------- | -| `import … from` | ES modules (Node 14+, browsers) | `dist/esm/**` (ES2020) | -| `require('…')` | CommonJS (all Node versions) | `dist/src/**` (ES2016) | +| Import style | Runtime requirement | File served | +| --------------- | ------------------------------- | ---------------------- | +| `import … from` | ES modules (Node 14+, browsers) | `dist/esm/**` (ES2020) | +| `require('…')` | CommonJS (all Node versions) | `dist/src/**` (ES2016) | ## Authentication @@ -73,12 +73,12 @@ export FI_SECRET_KEY="YOUR_SECRET_KEY" …or pass them explicitly when creating a client: ```ts -import { Dataset } from '@future-agi/sdk'; +import { Dataset } from "@future-agi/sdk"; -const ds = await Dataset.open('my-dataset', { - fiApiKey: 'YOUR_API_KEY', - fiSecretKey: 'YOUR_SECRET_KEY', - createIfMissing: true +const ds = await Dataset.open("my-dataset", { + fiApiKey: "YOUR_API_KEY", + fiSecretKey: "YOUR_SECRET_KEY", + createIfMissing: true, }); ``` @@ -87,59 +87,59 @@ const ds = await Dataset.open('my-dataset', { ### 1. Create a dataset & add rows ```ts -import { Dataset, DataTypeChoices } from '@future-agi/sdk'; +import { Dataset, DataTypeChoices } from "@future-agi/sdk"; async function main() { // Open (or create) a dataset - const ds = await Dataset.open('translations', { createIfMissing: true }); + const ds = await Dataset.open("translations", { createIfMissing: true }); // Add two columns await ds.addColumns([ - { name: 'prompt', dataType: DataTypeChoices.TEXT }, - { name: 'answer', dataType: DataTypeChoices.TEXT } + { name: "prompt", dataType: DataTypeChoices.TEXT }, + { name: "answer", dataType: DataTypeChoices.TEXT }, ]); // Add a couple of rows await ds.addRows([ - { prompt: 'Translate “Hello World” to French', answer: 'Bonjour le monde' }, - { prompt: 'Translate “Good night” to German', answer: 'Gute Nacht' } + { prompt: "Translate “Hello World” to French", answer: "Bonjour le monde" }, + { prompt: "Translate “Good night” to German", answer: "Gute Nacht" }, ]); - console.log('Dataset ready:', ds.getConfig()); + console.log("Dataset ready:", ds.getConfig()); } ``` ### 2. Create & execute a prompt template ```ts -import { Prompt, MessageBase, ModelConfig } from '@future-agi/sdk'; +import { Prompt, MessageBase, ModelConfig } from "@future-agi/sdk"; const prompt = new Prompt(); await prompt.createNewVersion({ template: { - name: 'translator', + name: "translator", messages: [ - { role: 'system', content: 'You are a translator.' } as MessageBase, - { role: 'user', content: 'Translate {{text}} to French.' } as MessageBase + { role: "system", content: "You are a translator." } as MessageBase, + { role: "user", content: "Translate {{text}} to French." } as MessageBase, ], - variable_names: { text: 'string' }, - model_configuration: new ModelConfig({ model_name: 'gpt-3.5-turbo' }) - } + variable_names: { text: "string" }, + model_configuration: new ModelConfig({ model_name: "gpt-3.5-turbo" }), + }, }); // Run the template with variables -const result = await prompt.template?.run({ text: 'Good morning' }); +const result = await prompt.template?.run({ text: "Good morning" }); console.log(result); ``` ### 3. Build a knowledge base ```ts -import { KnowledgeBase } from '@future-agi/sdk'; +import { KnowledgeBase } from "@future-agi/sdk"; const kb = new KnowledgeBase(); -await kb.createKb('docs', ['./README.md', './whitepaper.pdf']); +await kb.createKb("docs", ["./README.md", "./whitepaper.pdf"]); const list = await kb.listKbs(); console.log(`You now have ${list.length} knowledge-bases!`); @@ -149,45 +149,72 @@ console.log(`You now have ${list.length} knowledge-bases!`); ```ts import { - Dataset, // datasets / evaluations - KnowledgeBase, // RAG knowledge-bases - Prompt, // prompt templates - constants, // misc constants - errors // rich error classes -} from '@future-agi/sdk'; + Dataset, // datasets / evaluations + KnowledgeBase, // RAG knowledge-bases + Prompt, // prompt templates + constants, // misc constants + errors, // rich error classes +} from "@future-agi/sdk"; ``` See the full **TypeDoc API reference** at . +### OpenAPI-backed client + +For API surfaces that are generated from the backend OpenAPI contract, use +the wrapper client instead of importing generated files directly: + +```ts +import { FutureAGIClient } from "@future-agi/sdk"; + +const client = new FutureAGIClient({ apiKey: "...", secretKey: "..." }); +const queues = await client.annotationQueues.list({ limit: 20 }); +const nextItem = await client.annotationQueues.items.next("queue-id"); + +const datasets = await client.datasets.list({ page: 1 }); +const experimentRows = await client.experiments.rows("experiment-id"); +const runTests = await client.simulations.runTests.list(); +const traceProjects = await client.tracing.projects(); +const me = await client.users.current(); +const alertOptions = await client.alerts.metricOptions({ + project_id: "project-id", +}); +``` + +The low-level generated code is regenerated with `scripts/generate-oss-sdk.sh`. +Public method names are controlled by `openapi/sdk/operation-aliases.json` and +`openapi/sdk/wrapper-map.json`. +Go and Java low-level clients are regenerated with `scripts/generate-go-java-sdk.sh`. + ## Error handling All SDK-specific failures extend `SDKException`. ```ts -import { SDKException } from '@future-agi/sdk/dist/src/utils/errors'; +import { SDKException } from "@future-agi/sdk/dist/src/utils/errors"; try { - await Dataset.open('missing-dataset'); + await Dataset.open("missing-dataset"); } catch (err) { if (err instanceof SDKException) { console.error(err.getErrorCode(), err.getMessage()); } else { - console.error('Unexpected error', err); + console.error("Unexpected error", err); } } ``` Common subclasses include: -* `InvalidAuthError` – wrong or missing credentials. -* `DatasetNotFoundError` – dataset name not found. -* `RateLimitError` – API quota exceeded. +- `InvalidAuthError` – wrong or missing credentials. +- `DatasetNotFoundError` – dataset name not found. +- `RateLimitError` – API quota exceeded. ## Contributing -1. Fork the repo and create your branch from `main`. -2. Run `pnpm i && pnpm test` to ensure the test-suite is green. +1. Fork the repo and create your branch from `main`. +2. Run `pnpm i && pnpm test` to ensure the test-suite is green. 3. Submit a pull-request – please include unit tests for new behaviour. See `CONTRIBUTING.md` at the project root for more details. @@ -195,4 +222,4 @@ See `CONTRIBUTING.md` at the project root for more details. ## License This project is distributed under a BSD-style license – see -[LICENSE.md](../../LICENSE.md) for the full text. \ No newline at end of file +[LICENSE.md](../../LICENSE.md) for the full text. diff --git a/typescript/futureagi/src/__tests__/futureagi-client.test.ts b/typescript/futureagi/src/__tests__/futureagi-client.test.ts new file mode 100644 index 0000000..da9607e --- /dev/null +++ b/typescript/futureagi/src/__tests__/futureagi-client.test.ts @@ -0,0 +1,106 @@ +import { FutureAGIClient } from "../futureagi-client"; + +describe("FutureAGIClient", () => { + it("sends auth headers and query params through the generated client", async () => { + const fetchMock = jest.fn(async (request: Request) => { + expect(request.headers.get("X-Api-Key")).toBe("api-key"); + expect(request.headers.get("X-Secret-Key")).toBe("secret-key"); + + const url = new URL(request.url); + expect(url.origin).toBe("http://api.test"); + expect(url.pathname).toBe("/model-hub/annotation-queues/"); + expect(url.searchParams.get("limit")).toBe("10"); + + return new Response(JSON.stringify({ count: 0, results: [] }), { + status: 200, + headers: { "Content-Type": "application/json" }, + }); + }); + + const client = new FutureAGIClient({ + apiKey: "api-key", + secretKey: "secret-key", + baseUrl: "http://api.test", + fetch: fetchMock as unknown as typeof fetch, + }); + + await expect(client.annotationQueues.list({ limit: 10 })).resolves.toEqual({ + count: 0, + results: [], + }); + expect(fetchMock).toHaveBeenCalledTimes(1); + }); + + it("wraps annotation discussion comments with clean method names", async () => { + const fetchMock = jest.fn(async (request: Request) => { + const url = new URL(request.url); + expect(request.method).toBe("POST"); + expect(url.pathname).toBe( + "/model-hub/annotation-queues/q1/items/i1/discussion/", + ); + await expect(request.json()).resolves.toEqual({ + comment: "@reviewer please check this item", + mentioned_user_ids: ["u1"], + }); + + return new Response( + JSON.stringify({ status: true, result: { threads: [], comments: [] } }), + { + status: 200, + headers: { "Content-Type": "application/json" }, + }, + ); + }); + + const client = new FutureAGIClient({ + apiKey: "api-key", + secretKey: "secret-key", + baseUrl: "http://api.test", + fetch: fetchMock as unknown as typeof fetch, + }); + + await client.annotationQueues.discussion.comment("q1", "i1", { + comment: "@reviewer please check this item", + mentioned_user_ids: ["u1"], + }); + expect(fetchMock).toHaveBeenCalledTimes(1); + }); + + it("wraps common dataset, experiment, simulation, tracing, user, and alert paths", async () => { + const expected = [ + ["GET", "/model-hub/develops/dataset-1/get-dataset-table/"], + ["GET", "/model-hub/experiments/v2/experiment-1/rows/"], + ["GET", "/simulate/run-tests/run-test-1/status/"], + ["GET", "/tracer/trace/list_voice_calls/"], + ["GET", "/accounts/user-info/"], + ["GET", "/tracer/user-alert-logs/alert-1/list/"], + ]; + const fetchMock = jest.fn(async (request: Request) => { + const [method, pathname] = expected.shift() ?? []; + const url = new URL(request.url); + expect(request.method).toBe(method); + expect(url.pathname).toBe(pathname); + return new Response(JSON.stringify({ ok: true }), { + status: 200, + headers: { "Content-Type": "application/json" }, + }); + }); + + const client = new FutureAGIClient({ + apiKey: "api-key", + secretKey: "secret-key", + baseUrl: "http://api.test", + fetch: fetchMock as unknown as typeof fetch, + }); + + await client.datasets.getTable("dataset-1", { limit: 5 }); + await client.experiments.rows("experiment-1", { page: 1 }); + await client.simulations.runTests.status("run-test-1"); + await client.tracing.voiceCalls({ project_id: "project-1" }); + await client.users.current(); + await client.alerts.logsForAlert("alert-1"); + + expect(fetchMock).toHaveBeenCalledTimes(6); + expect(expected).toHaveLength(0); + }); +}); diff --git a/typescript/futureagi/src/fetch-globals.d.ts b/typescript/futureagi/src/fetch-globals.d.ts new file mode 100644 index 0000000..2b99275 --- /dev/null +++ b/typescript/futureagi/src/fetch-globals.d.ts @@ -0,0 +1 @@ +/// diff --git a/typescript/futureagi/src/futureagi-client.ts b/typescript/futureagi/src/futureagi-client.ts new file mode 100644 index 0000000..58f09d5 --- /dev/null +++ b/typescript/futureagi/src/futureagi-client.ts @@ -0,0 +1,1099 @@ +import { API_KEY_ENVVAR_NAME, SECRET_KEY_ENVVAR_NAME } from "./utils/constants"; +import { createClient, type Client } from "./generated/openapi/client"; +import * as generatedSdk from "./generated/openapi/sdk.gen"; +import type * as generatedTypes from "./generated/openapi/types.gen"; + +type QueryOf = T extends { query?: infer TQuery } + ? NonNullable + : never; +type BodyOf = T extends { body: infer TBody } ? TBody : never; +type LooseQuery = Record; +type LooseBody = unknown; +type GeneratedOperation = (options: any) => TResult; + +export type FutureAGIClientOptions = { + apiKey?: string; + secretKey?: string; + fiApiKey?: string; + fiSecretKey?: string; + baseUrl?: string; + headers?: Record; + fetch?: typeof fetch; +}; + +const DEFAULT_BASE_URL = "https://api.futureagi.com"; + +function readEnv(name: string): string | undefined { + const maybeProcess = ( + globalThis as { process?: { env?: Record } } + ).process; + return maybeProcess?.env?.[name]; +} + +function requireAuth(options: FutureAGIClientOptions): { + apiKey: string; + secretKey: string; +} { + const apiKey = + options.apiKey ?? options.fiApiKey ?? readEnv(API_KEY_ENVVAR_NAME); + const secretKey = + options.secretKey ?? options.fiSecretKey ?? readEnv(SECRET_KEY_ENVVAR_NAME); + + if (!apiKey || !secretKey) { + throw new Error( + `FutureAGIClient requires credentials. Pass apiKey/secretKey or set ${API_KEY_ENVVAR_NAME} and ${SECRET_KEY_ENVVAR_NAME}.`, + ); + } + + return { apiKey, secretKey }; +} + +const dataOptions = (client: Client, options: T) => ({ + ...options, + client, + responseStyle: "data" as const, + throwOnError: true as const, +}); + +const callGenerated = ( + client: Client, + operation: GeneratedOperation, + options: Record = {}, +) => operation(dataOptions(client, options)); + +export class FutureAGIClient { + readonly annotationQueues: AnnotationQueuesClient; + readonly datasets: DatasetsClient; + readonly experiments: ExperimentsClient; + readonly simulations: SimulationsClient; + readonly tracing: TracingClient; + readonly users: UsersClient; + readonly alerts: AlertsClient; + readonly generated: typeof generatedSdk = generatedSdk; + readonly generatedClient: Client; + + constructor(options: FutureAGIClientOptions = {}) { + const { apiKey, secretKey } = requireAuth(options); + const baseUrl = + options.baseUrl ?? readEnv("FI_BASE_URL") ?? DEFAULT_BASE_URL; + + this.generatedClient = createClient({ + baseUrl, + fetch: options.fetch, + headers: { + "X-Api-Key": apiKey, + "X-Secret-Key": secretKey, + ...options.headers, + }, + responseStyle: "data", + throwOnError: true, + }); + this.annotationQueues = new AnnotationQueuesClient(this.generatedClient); + this.datasets = new DatasetsClient(this.generatedClient); + this.experiments = new ExperimentsClient(this.generatedClient); + this.simulations = new SimulationsClient(this.generatedClient); + this.tracing = new TracingClient(this.generatedClient); + this.users = new UsersClient(this.generatedClient); + this.alerts = new AlertsClient(this.generatedClient); + } +} + +export class AnnotationQueuesClient { + readonly items: AnnotationQueueItemsClient; + readonly discussion: AnnotationQueueDiscussionClient; + readonly review: AnnotationQueueReviewClient; + + constructor(private readonly client: Client) { + this.items = new AnnotationQueueItemsClient(client); + this.discussion = new AnnotationQueueDiscussionClient(client); + this.review = new AnnotationQueueReviewClient(client); + } + + list(query?: QueryOf) { + return generatedSdk.listAnnotationQueues( + dataOptions(this.client, { query }), + ); + } + + create(body: BodyOf) { + return generatedSdk.createAnnotationQueue( + dataOptions(this.client, { body }), + ); + } + + get(id: string) { + return generatedSdk.getAnnotationQueue( + dataOptions(this.client, { path: { id } }), + ); + } + + update(id: string, body: BodyOf) { + return generatedSdk.updateAnnotationQueue( + dataOptions(this.client, { path: { id }, body }), + ); + } + + archive(id: string) { + return generatedSdk.archiveAnnotationQueue( + dataOptions(this.client, { path: { id } }), + ); + } + + updateStatus( + id: string, + body: BodyOf, + ) { + return generatedSdk.updateAnnotationQueueStatus( + dataOptions(this.client, { path: { id }, body }), + ); + } + + progress(id: string) { + return generatedSdk.getAnnotationQueueProgress( + dataOptions(this.client, { path: { id } }), + ); + } + + analytics(id: string) { + return generatedSdk.getAnnotationQueueAnalytics( + dataOptions(this.client, { path: { id } }), + ); + } + + agreement(id: string) { + return generatedSdk.getAnnotationQueueAgreement( + dataOptions(this.client, { path: { id } }), + ); + } + + exportJson(id: string) { + return generatedSdk.exportAnnotationQueue( + dataOptions(this.client, { path: { id } }), + ); + } + + listExportFields(id: string) { + return generatedSdk.listAnnotationQueueExportFields( + dataOptions(this.client, { path: { id } }), + ); + } + + exportToDataset( + id: string, + body: BodyOf, + ) { + return generatedSdk.exportAnnotationQueueToDataset( + dataOptions(this.client, { path: { id }, body }), + ); + } + + addLabel( + id: string, + body: BodyOf, + ) { + return generatedSdk.addAnnotationQueueLabel( + dataOptions(this.client, { path: { id }, body }), + ); + } + + removeLabel( + id: string, + body: BodyOf, + ) { + return generatedSdk.removeAnnotationQueueLabel( + dataOptions(this.client, { path: { id }, body }), + ); + } +} + +export class AnnotationQueueItemsClient { + constructor(private readonly client: Client) {} + + list( + queueId: string, + query?: QueryOf, + ) { + return generatedSdk.listAnnotationQueueItems( + dataOptions(this.client, { path: { queue_id: queueId }, query }), + ); + } + + add( + queueId: string, + body: BodyOf, + ) { + return generatedSdk.addAnnotationQueueItems( + dataOptions(this.client, { path: { queue_id: queueId }, body }), + ); + } + + assign( + queueId: string, + body: BodyOf, + ) { + return generatedSdk.assignAnnotationQueueItems( + dataOptions(this.client, { path: { queue_id: queueId }, body }), + ); + } + + remove( + queueId: string, + body: BodyOf, + ) { + return generatedSdk.removeAnnotationQueueItems( + dataOptions(this.client, { path: { queue_id: queueId }, body }), + ); + } + + next( + queueId: string, + query?: QueryOf, + ) { + return generatedSdk.getNextAnnotationQueueItem( + dataOptions(this.client, { path: { queue_id: queueId }, query }), + ); + } + + getDetail( + queueId: string, + itemId: string, + query?: QueryOf, + ) { + return generatedSdk.getAnnotationQueueItemDetail( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + query, + }), + ); + } + + release( + queueId: string, + itemId: string, + body: BodyOf = {}, + ) { + return generatedSdk.releaseAnnotationQueueItem( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + body, + }), + ); + } + + complete( + queueId: string, + itemId: string, + body: BodyOf = {}, + ) { + return generatedSdk.completeAnnotationQueueItem( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + body, + }), + ); + } + + skip( + queueId: string, + itemId: string, + body: BodyOf = {}, + ) { + return generatedSdk.skipAnnotationQueueItem( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + body, + }), + ); + } + + listAnnotations(queueId: string, itemId: string) { + return generatedSdk.listAnnotationQueueItemAnnotations( + dataOptions(this.client, { path: { queue_id: queueId, id: itemId } }), + ); + } + + submitAnnotations( + queueId: string, + itemId: string, + body: BodyOf, + ) { + return generatedSdk.submitAnnotationQueueItemAnnotations( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + body, + }), + ); + } + + importAnnotations( + queueId: string, + itemId: string, + body: BodyOf, + ) { + return generatedSdk.importAnnotationQueueItemAnnotations( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + body, + }), + ); + } +} + +export class AnnotationQueueDiscussionClient { + constructor(private readonly client: Client) {} + + list(queueId: string, itemId: string) { + return generatedSdk.listAnnotationQueueItemDiscussion( + dataOptions(this.client, { path: { queue_id: queueId, id: itemId } }), + ); + } + + comment( + queueId: string, + itemId: string, + body: BodyOf, + ) { + return generatedSdk.createAnnotationQueueItemComment( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + body, + }), + ); + } + + resolveThread( + queueId: string, + itemId: string, + threadId: string, + body: BodyOf = {}, + ) { + return generatedSdk.resolveAnnotationQueueItemThread( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId, thread_id: threadId }, + body, + }), + ); + } + + reopenThread( + queueId: string, + itemId: string, + threadId: string, + body: BodyOf = {}, + ) { + return generatedSdk.reopenAnnotationQueueItemThread( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId, thread_id: threadId }, + body, + }), + ); + } + + react( + queueId: string, + itemId: string, + commentId: string, + body: BodyOf, + ) { + return generatedSdk.toggleAnnotationQueueItemCommentReaction( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId, comment_id: commentId }, + body, + }), + ); + } +} + +export class AnnotationQueueReviewClient { + constructor(private readonly client: Client) {} + + submit( + queueId: string, + itemId: string, + body: BodyOf, + ) { + return generatedSdk.reviewAnnotationQueueItem( + dataOptions(this.client, { + path: { queue_id: queueId, id: itemId }, + body, + }), + ); + } +} + +export class DatasetsClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listDatasets, { query }); + } + + listNames(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listDatasetNames, { query }); + } + + getTable(datasetId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getDatasetTable, { + path: { dataset_id: datasetId }, + query, + }); + } + + getRow(datasetId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.getDatasetRow, { + path: { dataset_id: datasetId }, + body, + }); + } + + getColumns(datasetId: string) { + return callGenerated(this.client, generatedSdk.getDatasetColumns, { + path: { dataset_id: datasetId }, + }); + } + + createEmpty(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createEmptyDataset, { body }); + } + + createManual(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createDatasetManually, { + body, + }); + } + + createFromFile(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createDatasetFromLocalFile, { + body, + }); + } + + addRows(datasetId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.addDatasetRows, { + path: { dataset_id: datasetId }, + body, + }); + } + + addColumns(datasetId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.addDatasetColumns, { + path: { dataset_id: datasetId }, + body, + }); + } + + updateCell(datasetId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updateDatasetCell, { + path: { dataset_id: datasetId }, + body, + }); + } + + deleteRow(datasetId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.deleteDatasetRow, { + path: { dataset_id: datasetId }, + query, + }); + } + + deleteColumn(datasetId: string, columnId: string) { + return callGenerated(this.client, generatedSdk.deleteDatasetColumn, { + path: { dataset_id: datasetId, column_id: columnId }, + }); + } + + download(datasetId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.downloadDataset, { + path: { dataset_id: datasetId }, + query, + }); + } + + jsonSchema(datasetId: string) { + return callGenerated(this.client, generatedSdk.getDatasetJsonSchema, { + path: { dataset_id: datasetId }, + }); + } + + evalStats(datasetId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getDatasetEvalStats, { + path: { dataset_id: datasetId }, + query, + }); + } + + annotationSummary(datasetId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getDatasetAnnotationSummary, { + path: { dataset_id: datasetId }, + query, + }); + } + + duplicate(datasetId: string, body?: LooseBody) { + return callGenerated(this.client, generatedSdk.duplicateDataset, { + path: { dataset_id: datasetId }, + body, + }); + } + + derivedVariables(datasetId: string) { + return callGenerated(this.client, generatedSdk.listDatasetDerivedVariables, { + path: { dataset_id: datasetId }, + }); + } + + baseColumns(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listDatasetBaseColumns, { + query, + }); + } +} + +export class ExperimentsClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listExperiments, { query }); + } + + create(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createExperiment, { body }); + } + + get(experimentId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getExperiment, { + path: { experiment_id: experimentId }, + query, + }); + } + + update(experimentId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updateExperiment, { + path: { experiment_id: experimentId }, + body, + }); + } + + delete(body: LooseBody) { + return callGenerated(this.client, generatedSdk.deleteExperiments, { body }); + } + + rows(experimentId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listExperimentRows, { + path: { experiment_id: experimentId }, + query, + }); + } + + row(experimentId: string, rowId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getExperimentRow, { + path: { experiment_id: experimentId, row_id: rowId }, + query, + }); + } + + stats(experimentId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getExperimentStats, { + path: { experiment_id: experimentId }, + query, + }); + } + + download(experimentId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.downloadExperiment, { + path: { experiment_id: experimentId }, + query, + }); + } + + rerun(body: LooseBody) { + return callGenerated(this.client, generatedSdk.rerunExperiment, { body }); + } + + stop(experimentId: string, body?: LooseBody) { + return callGenerated(this.client, generatedSdk.stopExperiment, { + path: { experiment_id: experimentId }, + body, + }); + } + + compare(experimentId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.compareExperiments, { + path: { experiment_id: experimentId }, + body, + }); + } + + comparisons(experimentId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listExperimentComparisons, { + path: { experiment_id: experimentId }, + query, + }); + } + + jsonSchema(experimentId: string) { + return callGenerated(this.client, generatedSdk.getExperimentJsonSchema, { + path: { experiment_id: experimentId }, + }); + } +} + +export class SimulationsClient { + readonly agentDefinitions: SimulationAgentDefinitionsClient; + readonly runTests: SimulationRunTestsClient; + readonly testExecutions: SimulationTestExecutionsClient; + readonly personas: SimulationPersonasClient; + readonly scenarios: SimulationScenariosClient; + + constructor(private readonly client: Client) { + this.agentDefinitions = new SimulationAgentDefinitionsClient(client); + this.runTests = new SimulationRunTestsClient(client); + this.testExecutions = new SimulationTestExecutionsClient(client); + this.personas = new SimulationPersonasClient(client); + this.scenarios = new SimulationScenariosClient(client); + } + + runs(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listSimulationRuns, { query }); + } + + metrics(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listSimulationMetrics, { + query, + }); + } + + analytics(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getSimulationAnalytics, { + query, + }); + } +} + +export class SimulationAgentDefinitionsClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listAgentDefinitions, { + query, + }); + } + + create(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createAgentDefinition, { + body, + }); + } + + get(agentId: string) { + return callGenerated(this.client, generatedSdk.getAgentDefinition, { + path: { agent_id: agentId }, + }); + } + + update(agentId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updateAgentDefinition, { + path: { agent_id: agentId }, + body, + }); + } + + delete(agentId: string) { + return callGenerated(this.client, generatedSdk.deleteAgentDefinition, { + path: { agent_id: agentId }, + }); + } +} + +export class SimulationRunTestsClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listRunTests, { query }); + } + + create(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createRunTest, { body }); + } + + get(runTestId: string) { + return callGenerated(this.client, generatedSdk.getRunTest, { + path: { run_test_id: runTestId }, + }); + } + + update(runTestId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updateRunTest, { + path: { run_test_id: runTestId }, + body, + }); + } + + delete(runTestId: string) { + return callGenerated(this.client, generatedSdk.deleteRunTest, { + path: { run_test_id: runTestId }, + }); + } + + execute(runTestId: string, body?: LooseBody) { + return callGenerated(this.client, generatedSdk.executeRunTest, { + path: { run_test_id: runTestId }, + body, + }); + } + + status(runTestId: string) { + return callGenerated(this.client, generatedSdk.getRunTestStatus, { + path: { run_test_id: runTestId }, + }); + } + + analytics(runTestId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getRunTestAnalytics, { + path: { run_test_id: runTestId }, + query, + }); + } + + executions(runTestId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listRunTestExecutions, { + path: { run_test_id: runTestId }, + query, + }); + } + + callExecutions(runTestId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listRunTestCallExecutions, { + path: { run_test_id: runTestId }, + query, + }); + } +} + +export class SimulationTestExecutionsClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listTestExecutions, { + query, + }); + } + + get(testExecutionId: string) { + return callGenerated(this.client, generatedSdk.getTestExecution, { + path: { test_execution_id: testExecutionId }, + }); + } + + analytics(testExecutionId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getTestExecutionAnalytics, { + path: { test_execution_id: testExecutionId }, + query, + }); + } + + transcripts(testExecutionId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getTestExecutionTranscripts, { + path: { test_execution_id: testExecutionId }, + query, + }); + } + + kpis(testExecutionId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getTestExecutionKpis, { + path: { test_execution_id: testExecutionId }, + query, + }); + } + + performanceSummary(testExecutionId: string, query?: LooseQuery) { + return callGenerated( + this.client, + generatedSdk.getTestExecutionPerformanceSummary, + { + path: { test_execution_id: testExecutionId }, + query, + }, + ); + } + + cancel(testExecutionId: string, body?: LooseBody) { + return callGenerated(this.client, generatedSdk.cancelTestExecution, { + path: { test_execution_id: testExecutionId }, + body, + }); + } +} + +export class SimulationPersonasClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listPersonas, { query }); + } + + create(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createPersona, { body }); + } + + get(id: string) { + return callGenerated(this.client, generatedSdk.getPersona, { + path: { id }, + }); + } + + update(id: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updatePersona, { + path: { id }, + body, + }); + } + + delete(id: string) { + return callGenerated(this.client, generatedSdk.deletePersona, { + path: { id }, + }); + } +} + +export class SimulationScenariosClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listScenarios, { query }); + } + + create(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createScenario, { body }); + } + + get(scenarioId: string) { + return callGenerated(this.client, generatedSdk.getScenario, { + path: { scenario_id: scenarioId }, + }); + } + + update(scenarioId: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updateScenario, { + path: { scenario_id: scenarioId }, + body, + }); + } + + delete(scenarioId: string) { + return callGenerated(this.client, generatedSdk.deleteScenario, { + path: { scenario_id: scenarioId }, + }); + } +} + +export class TracingClient { + constructor(private readonly client: Client) {} + + projects(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listTraceProjects, { query }); + } + + traces(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listTraces, { query }); + } + + getTrace(id: string) { + return callGenerated(this.client, generatedSdk.getTrace, { + path: { id }, + }); + } + + voiceCalls(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listVoiceCalls, { query }); + } + + voiceCallDetail(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getVoiceCallDetail, { + query, + }); + } + + properties(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listTraceProperties, { + query, + }); + } + + updateTags(id: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updateTraceTags, { + path: { id }, + body, + }); + } + + graphMethods(body: LooseBody) { + return callGenerated(this.client, generatedSdk.getTraceGraphMethods, { + body, + }); + } + + sessions(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listTraceSessions, { query }); + } + + getSession(id: string) { + return callGenerated(this.client, generatedSdk.getTraceSession, { + path: { id }, + }); + } + + sessionGraph(body: LooseBody) { + return callGenerated(this.client, generatedSdk.getTraceSessionGraphData, { + body, + }); + } + + users(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listTraceUsers, { query }); + } + + annotationLabels(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listTraceAnnotationLabels, { + query, + }); + } + + bulkAnnotation(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createBulkTraceAnnotation, { + body, + }); + } + + issues(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listErrorFeedIssues, { + query, + }); + } + + issue(clusterId: string) { + return callGenerated(this.client, generatedSdk.getErrorFeedIssue, { + path: { cluster_id: clusterId }, + }); + } + + issueStats(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getErrorFeedIssueStats, { + query, + }); + } +} + +export class UsersClient { + constructor(private readonly client: Client) {} + + current() { + return callGenerated(this.client, generatedSdk.getCurrentUser); + } + + organizationMembers(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listOrganizationMembers, { + query, + }); + } + + workspaces(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listWorkspaces, { query }); + } + + workspaceMembers(workspaceId: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listWorkspaceMembers, { + path: { workspace_id: workspaceId }, + query, + }); + } + + switchWorkspace(body: LooseBody) { + return callGenerated(this.client, generatedSdk.switchWorkspace, { body }); + } +} + +export class AlertsClient { + constructor(private readonly client: Client) {} + + list(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listAlerts, { query }); + } + + create(body: LooseBody) { + return callGenerated(this.client, generatedSdk.createAlert, { body }); + } + + get(id: string) { + return callGenerated(this.client, generatedSdk.getAlert, { + path: { id }, + }); + } + + update(id: string, body: LooseBody) { + return callGenerated(this.client, generatedSdk.updateAlert, { + path: { id }, + body, + }); + } + + delete(id: string) { + return callGenerated(this.client, generatedSdk.deleteAlert, { + path: { id }, + }); + } + + metricOptions(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listAlertMetricOptions, { + query, + }); + } + + previewGraph(body: LooseBody) { + return callGenerated(this.client, generatedSdk.previewAlertGraph, { body }); + } + + graph(id: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.getAlertGraph, { + path: { id }, + query, + }); + } + + details(id: string) { + return callGenerated(this.client, generatedSdk.getAlertDetails, { + path: { id }, + }); + } + + bulkMute(body: LooseBody) { + return callGenerated(this.client, generatedSdk.bulkMuteAlerts, { body }); + } + + logs(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listAlertLogs, { query }); + } + + allLogs(query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listAllAlertLogs, { query }); + } + + log(id: string) { + return callGenerated(this.client, generatedSdk.getAlertLog, { + path: { id }, + }); + } + + logsForAlert(id: string, query?: LooseQuery) { + return callGenerated(this.client, generatedSdk.listAlertLogsForAlert, { + path: { id }, + query, + }); + } + + resolveLogs(body: LooseBody) { + return callGenerated(this.client, generatedSdk.resolveAlertLogs, { body }); + } +} + +export { generatedSdk as futureAGIGeneratedSdk }; diff --git a/typescript/futureagi/src/generated/openapi/client.gen.ts b/typescript/futureagi/src/generated/openapi/client.gen.ts new file mode 100644 index 0000000..a049301 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/client.gen.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type ClientOptions, type Config, createClient, createConfig } from './client'; +import type { ClientOptions as ClientOptions2 } from './types.gen'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig({ baseUrl: 'https://api.futureagi.com' })); diff --git a/typescript/futureagi/src/generated/openapi/client/client.gen.ts b/typescript/futureagi/src/generated/openapi/client/client.gen.ts new file mode 100644 index 0000000..fc3f037 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/client/client.gen.ts @@ -0,0 +1,277 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { createSseClient } from '../core/serverSentEvents.gen'; +import type { HttpMethod } from '../core/types.gen'; +import { getValidRequestBody } from '../core/utils.gen'; +import type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen'; +import { + buildUrl, + createConfig, + createInterceptors, + getParseAs, + mergeConfigs, + mergeHeaders, + setAuthParams, +} from './utils.gen'; + +type ReqInit = Omit & { + body?: any; + headers: ReturnType; +}; + +export const createClient = (config: Config = {}): Client => { + let _config = mergeConfigs(createConfig(), config); + + const getConfig = (): Config => ({ ..._config }); + + const setConfig = (config: Config): Config => { + _config = mergeConfigs(_config, config); + return getConfig(); + }; + + const interceptors = createInterceptors(); + + const beforeRequest = async < + TData = unknown, + TResponseStyle extends 'data' | 'fields' = 'fields', + ThrowOnError extends boolean = boolean, + Url extends string = string, + >( + options: RequestOptions, + ) => { + const opts = { + ..._config, + ...options, + fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, + headers: mergeHeaders(_config.headers, options.headers), + serializedBody: undefined as string | undefined, + }; + + if (opts.security) { + await setAuthParams(opts); + } + + if (opts.requestValidator) { + await opts.requestValidator(opts); + } + + if (opts.body !== undefined && opts.bodySerializer) { + opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined; + } + + // remove Content-Type header if body is empty to avoid sending invalid requests + if (opts.body === undefined || opts.serializedBody === '') { + opts.headers.delete('Content-Type'); + } + + const resolvedOpts = opts as typeof opts & + ResolvedRequestOptions; + const url = buildUrl(resolvedOpts); + + return { opts: resolvedOpts, url }; + }; + + const request: Client['request'] = async (options) => { + const throwOnError = options.throwOnError ?? _config.throwOnError; + const responseStyle = options.responseStyle ?? _config.responseStyle; + + let request: Request | undefined; + let response: Response | undefined; + + try { + const { opts, url } = await beforeRequest(options); + const requestInit: ReqInit = { + redirect: 'follow', + ...opts, + body: getValidRequestBody(opts), + }; + + request = new Request(url, requestInit); + + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = opts.fetch!; + + response = await _fetch(request); + + for (const fn of interceptors.response.fns) { + if (fn) { + response = await fn(response, request, opts); + } + } + + const result = { + request, + response, + }; + + if (response.ok) { + const parseAs = + (opts.parseAs === 'auto' + ? getParseAs(response.headers.get('Content-Type')) + : opts.parseAs) ?? 'json'; + + if (response.status === 204 || response.headers.get('Content-Length') === '0') { + let emptyData: any; + switch (parseAs) { + case 'arrayBuffer': + case 'blob': + case 'text': + emptyData = await response[parseAs](); + break; + case 'formData': + emptyData = new FormData(); + break; + case 'stream': + emptyData = response.body; + break; + case 'json': + default: + emptyData = {}; + break; + } + return opts.responseStyle === 'data' + ? emptyData + : { + data: emptyData, + ...result, + }; + } + + let data: any; + switch (parseAs) { + case 'arrayBuffer': + case 'blob': + case 'formData': + case 'text': + data = await response[parseAs](); + break; + case 'json': { + // Some servers return 200 with no Content-Length and empty body. + // response.json() would throw; read as text and parse if non-empty. + const text = await response.text(); + data = text ? JSON.parse(text) : {}; + break; + } + case 'stream': + return opts.responseStyle === 'data' + ? response.body + : { + data: response.body, + ...result, + }; + } + + if (parseAs === 'json') { + if (opts.responseValidator) { + await opts.responseValidator(data); + } + + if (opts.responseTransformer) { + data = await opts.responseTransformer(data); + } + } + + return opts.responseStyle === 'data' + ? data + : { + data, + ...result, + }; + } + + const textError = await response.text(); + let jsonError: unknown; + + try { + jsonError = JSON.parse(textError); + } catch { + // noop + } + + throw jsonError ?? textError; + } catch (error) { + let finalError = error; + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = await fn(finalError, response, request, options as ResolvedRequestOptions); + } + } + + finalError = finalError || {}; + + if (throwOnError) { + throw finalError; + } + + // TODO: we probably want to return error and improve types + return responseStyle === 'data' + ? undefined + : { + error: finalError, + request, + response, + }; + } + }; + + const makeMethodFn = (method: Uppercase) => (options: RequestOptions) => + request({ ...options, method }); + + const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { + const { opts, url } = await beforeRequest(options); + return createSseClient({ + ...opts, + body: opts.body as BodyInit | null | undefined, + method, + onRequest: async (url, init) => { + let request = new Request(url, init); + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + return request; + }, + serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined, + url, + }); + }; + + const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options }); + + return { + buildUrl: _buildUrl, + connect: makeMethodFn('CONNECT'), + delete: makeMethodFn('DELETE'), + get: makeMethodFn('GET'), + getConfig, + head: makeMethodFn('HEAD'), + interceptors, + options: makeMethodFn('OPTIONS'), + patch: makeMethodFn('PATCH'), + post: makeMethodFn('POST'), + put: makeMethodFn('PUT'), + request, + setConfig, + sse: { + connect: makeSseFn('CONNECT'), + delete: makeSseFn('DELETE'), + get: makeSseFn('GET'), + head: makeSseFn('HEAD'), + options: makeSseFn('OPTIONS'), + patch: makeSseFn('PATCH'), + post: makeSseFn('POST'), + put: makeSseFn('PUT'), + trace: makeSseFn('TRACE'), + }, + trace: makeMethodFn('TRACE'), + } as Client; +}; diff --git a/typescript/futureagi/src/generated/openapi/client/index.ts b/typescript/futureagi/src/generated/openapi/client/index.ts new file mode 100644 index 0000000..b295ede --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/client/index.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type { Auth } from '../core/auth.gen'; +export type { QuerySerializerOptions } from '../core/bodySerializer.gen'; +export { + formDataBodySerializer, + jsonBodySerializer, + urlSearchParamsBodySerializer, +} from '../core/bodySerializer.gen'; +export { buildClientParams } from '../core/params.gen'; +export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen'; +export { createClient } from './client.gen'; +export type { + Client, + ClientOptions, + Config, + CreateClientConfig, + Options, + RequestOptions, + RequestResult, + ResolvedRequestOptions, + ResponseStyle, + TDataShape, +} from './types.gen'; +export { createConfig, mergeHeaders } from './utils.gen'; diff --git a/typescript/futureagi/src/generated/openapi/client/types.gen.ts b/typescript/futureagi/src/generated/openapi/client/types.gen.ts new file mode 100644 index 0000000..4b288a5 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/client/types.gen.ts @@ -0,0 +1,217 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth } from '../core/auth.gen'; +import type { + ServerSentEventsOptions, + ServerSentEventsResult, +} from '../core/serverSentEvents.gen'; +import type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen'; +import type { Middleware } from './utils.gen'; + +export type ResponseStyle = 'data' | 'fields'; + +export interface Config + extends Omit, CoreConfig { + /** + * Base URL for all requests made by this client. + */ + baseUrl?: T['baseUrl']; + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Please don't use the Fetch client for Next.js applications. The `next` + * options won't have any effect. + * + * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. + */ + next?: never; + /** + * Return the response data parsed in a specified format. By default, `auto` + * will infer the appropriate method from the `Content-Type` response header. + * You can override this behavior with any of the {@link Body} methods. + * Select `stream` if you don't want to parse response data at all. + * + * @default 'auto' + */ + parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text'; + /** + * Should we return only data or multiple fields (data, error, response, etc.)? + * + * @default 'fields' + */ + responseStyle?: ResponseStyle; + /** + * Throw an error instead of returning it in the response? + * + * @default false + */ + throwOnError?: T['throwOnError']; +} + +export interface RequestOptions< + TData = unknown, + TResponseStyle extends ResponseStyle = 'fields', + ThrowOnError extends boolean = boolean, + Url extends string = string, +> + extends + Config<{ + responseStyle: TResponseStyle; + throwOnError: ThrowOnError; + }>, + Pick< + ServerSentEventsOptions, + | 'onRequest' + | 'onSseError' + | 'onSseEvent' + | 'sseDefaultRetryDelay' + | 'sseMaxRetryAttempts' + | 'sseMaxRetryDelay' + > { + /** + * Any body that you want to add to your request. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} + */ + body?: unknown; + path?: Record; + query?: Record; + /** + * Security mechanism(s) to use for the request. + */ + security?: ReadonlyArray; + url: Url; +} + +export interface ResolvedRequestOptions< + TResponseStyle extends ResponseStyle = 'fields', + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends RequestOptions { + headers: Headers; + serializedBody?: string; +} + +export type RequestResult< + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = boolean, + TResponseStyle extends ResponseStyle = 'fields', +> = ThrowOnError extends true + ? Promise< + TResponseStyle extends 'data' + ? TData extends Record + ? TData[keyof TData] + : TData + : { + data: TData extends Record ? TData[keyof TData] : TData; + request: Request; + response: Response; + } + > + : Promise< + TResponseStyle extends 'data' + ? (TData extends Record ? TData[keyof TData] : TData) | undefined + : ( + | { + data: TData extends Record ? TData[keyof TData] : TData; + error: undefined; + } + | { + data: undefined; + error: TError extends Record ? TError[keyof TError] : TError; + } + ) & { + /** request may be undefined, because error may be from building the request object itself */ + request?: Request; + /** response may be undefined, because error may be from building the request object itself or from a network error */ + response?: Response; + } + >; + +export interface ClientOptions { + baseUrl?: string; + responseStyle?: ResponseStyle; + throwOnError?: boolean; +} + +type MethodFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'>, +) => RequestResult; + +type SseFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'>, +) => Promise>; + +type RequestFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'> & + Pick>, 'method'>, +) => RequestResult; + +type BuildUrlFn = < + TData extends { + body?: unknown; + path?: Record; + query?: Record; + url: string; + }, +>( + options: TData & Options, +) => string; + +export type Client = CoreClient & { + interceptors: Middleware; +}; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T>; + +export interface TDataShape { + body?: unknown; + headers?: unknown; + path?: unknown; + query?: unknown; + url: string; +} + +type OmitKeys = Pick>; + +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, + TResponseStyle extends ResponseStyle = 'fields', +> = OmitKeys< + RequestOptions, + 'body' | 'path' | 'query' | 'url' +> & + ([TData] extends [never] ? unknown : Omit); diff --git a/typescript/futureagi/src/generated/openapi/client/utils.gen.ts b/typescript/futureagi/src/generated/openapi/client/utils.gen.ts new file mode 100644 index 0000000..7800fe4 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/client/utils.gen.ts @@ -0,0 +1,316 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { getAuthToken } from '../core/auth.gen'; +import type { QuerySerializerOptions } from '../core/bodySerializer.gen'; +import { jsonBodySerializer } from '../core/bodySerializer.gen'; +import { + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from '../core/pathSerializer.gen'; +import { getUrl } from '../core/utils.gen'; +import type { Client, ClientOptions, Config, RequestOptions } from './types.gen'; + +export const createQuerySerializer = ({ + parameters = {}, + ...args +}: QuerySerializerOptions = {}) => { + const querySerializer = (queryParams: T) => { + const search: string[] = []; + if (queryParams && typeof queryParams === 'object') { + for (const name in queryParams) { + const value = queryParams[name]; + + if (value === undefined || value === null) { + continue; + } + + const options = parameters[name] || args; + + if (Array.isArray(value)) { + const serializedArray = serializeArrayParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: 'form', + value, + ...options.array, + }); + if (serializedArray) search.push(serializedArray); + } else if (typeof value === 'object') { + const serializedObject = serializeObjectParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: 'deepObject', + value: value as Record, + ...options.object, + }); + if (serializedObject) search.push(serializedObject); + } else { + const serializedPrimitive = serializePrimitiveParam({ + allowReserved: options.allowReserved, + name, + value: value as string, + }); + if (serializedPrimitive) search.push(serializedPrimitive); + } + } + } + return search.join('&'); + }; + return querySerializer; +}; + +/** + * Infers parseAs value from provided Content-Type header. + */ +export const getParseAs = (contentType: string | null): Exclude => { + if (!contentType) { + // If no Content-Type header is provided, the best we can do is return the raw response body, + // which is effectively the same as the 'stream' option. + return 'stream'; + } + + const cleanContent = contentType.split(';')[0]?.trim(); + + if (!cleanContent) { + return; + } + + if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) { + return 'json'; + } + + if (cleanContent === 'multipart/form-data') { + return 'formData'; + } + + if ( + ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type)) + ) { + return 'blob'; + } + + if (cleanContent.startsWith('text/')) { + return 'text'; + } + + return; +}; + +const checkForExistence = ( + options: Pick & { + headers: Headers; + }, + name?: string, +): boolean => { + if (!name) { + return false; + } + if ( + options.headers.has(name) || + options.query?.[name] || + options.headers.get('Cookie')?.includes(`${name}=`) + ) { + return true; + } + return false; +}; + +export async function setAuthParams( + options: Pick & { + headers: Headers; + }, +): Promise { + for (const auth of options.security ?? []) { + if (checkForExistence(options, auth.name)) { + continue; + } + + const token = await getAuthToken(auth, options.auth); + + if (!token) { + continue; + } + + const name = auth.name ?? 'Authorization'; + + switch (auth.in) { + case 'query': + if (!options.query) { + options.query = {}; + } + options.query[name] = token; + break; + case 'cookie': + options.headers.append('Cookie', `${name}=${token}`); + break; + case 'header': + default: + options.headers.set(name, token); + break; + } + } +} + +export const buildUrl: Client['buildUrl'] = (options) => + getUrl({ + baseUrl: options.baseUrl as string, + path: options.path, + query: options.query, + querySerializer: + typeof options.querySerializer === 'function' + ? options.querySerializer + : createQuerySerializer(options.querySerializer), + url: options.url, + }); + +export const mergeConfigs = (a: Config, b: Config): Config => { + const config = { ...a, ...b }; + if (config.baseUrl?.endsWith('/')) { + config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); + } + config.headers = mergeHeaders(a.headers, b.headers); + return config; +}; + +const headersEntries = (headers: Headers): Array<[string, string]> => { + const entries: Array<[string, string]> = []; + headers.forEach((value, key) => { + entries.push([key, value]); + }); + return entries; +}; + +export const mergeHeaders = ( + ...headers: Array['headers'] | undefined> +): Headers => { + const mergedHeaders = new Headers(); + for (const header of headers) { + if (!header) { + continue; + } + + const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header); + + for (const [key, value] of iterator) { + if (value === null) { + mergedHeaders.delete(key); + } else if (Array.isArray(value)) { + for (const v of value) { + mergedHeaders.append(key, v as string); + } + } else if (value !== undefined) { + // assume object headers are meant to be JSON stringified, i.e., their + // content value in OpenAPI specification is 'application/json' + mergedHeaders.set( + key, + typeof value === 'object' ? JSON.stringify(value) : (value as string), + ); + } + } + } + return mergedHeaders; +}; + +type ErrInterceptor = ( + error: Err, + /** response may be undefined due to a network error where no response object is produced */ + response: Res | undefined, + /** request may be undefined, because error may be from building the request object itself */ + request: Req | undefined, + options: Options, +) => Err | Promise; + +type ReqInterceptor = (request: Req, options: Options) => Req | Promise; + +type ResInterceptor = ( + response: Res, + request: Req, + options: Options, +) => Res | Promise; + +class Interceptors { + fns: Array = []; + + clear(): void { + this.fns = []; + } + + eject(id: number | Interceptor): void { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = null; + } + } + + exists(id: number | Interceptor): boolean { + const index = this.getInterceptorIndex(id); + return Boolean(this.fns[index]); + } + + getInterceptorIndex(id: number | Interceptor): number { + if (typeof id === 'number') { + return this.fns[id] ? id : -1; + } + return this.fns.indexOf(id); + } + + update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = fn; + return id; + } + return false; + } + + use(fn: Interceptor): number { + this.fns.push(fn); + return this.fns.length - 1; + } +} + +export interface Middleware { + error: Interceptors>; + request: Interceptors>; + response: Interceptors>; +} + +export const createInterceptors = (): Middleware< + Req, + Res, + Err, + Options +> => ({ + error: new Interceptors>(), + request: new Interceptors>(), + response: new Interceptors>(), +}); + +const defaultQuerySerializer = createQuerySerializer({ + allowReserved: false, + array: { + explode: true, + style: 'form', + }, + object: { + explode: true, + style: 'deepObject', + }, +}); + +const defaultHeaders = { + 'Content-Type': 'application/json', +}; + +export const createConfig = ( + override: Config & T> = {}, +): Config & T> => ({ + ...jsonBodySerializer, + headers: defaultHeaders, + parseAs: 'auto', + querySerializer: defaultQuerySerializer, + ...override, +}); diff --git a/typescript/futureagi/src/generated/openapi/core/auth.gen.ts b/typescript/futureagi/src/generated/openapi/core/auth.gen.ts new file mode 100644 index 0000000..3ebf994 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/auth.gen.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type AuthToken = string | undefined; + +export interface Auth { + /** + * Which part of the request do we use to send the auth? + * + * @default 'header' + */ + in?: 'header' | 'query' | 'cookie'; + /** + * Header or query parameter name. + * + * @default 'Authorization' + */ + name?: string; + scheme?: 'basic' | 'bearer'; + type: 'apiKey' | 'http'; +} + +export const getAuthToken = async ( + auth: Auth, + callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, +): Promise => { + const token = typeof callback === 'function' ? await callback(auth) : callback; + + if (!token) { + return; + } + + if (auth.scheme === 'bearer') { + return `Bearer ${token}`; + } + + if (auth.scheme === 'basic') { + return `Basic ${btoa(token)}`; + } + + return token; +}; diff --git a/typescript/futureagi/src/generated/openapi/core/bodySerializer.gen.ts b/typescript/futureagi/src/generated/openapi/core/bodySerializer.gen.ts new file mode 100644 index 0000000..67daca6 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/bodySerializer.gen.ts @@ -0,0 +1,82 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen'; + +export type QuerySerializer = (query: Record) => string; + +export type BodySerializer = (body: unknown) => unknown; + +type QuerySerializerOptionsObject = { + allowReserved?: boolean; + array?: Partial>; + object?: Partial>; +}; + +export type QuerySerializerOptions = QuerySerializerOptionsObject & { + /** + * Per-parameter serialization overrides. When provided, these settings + * override the global array/object settings for specific parameter names. + */ + parameters?: Record; +}; + +const serializeFormDataPair = (data: FormData, key: string, value: unknown): void => { + if (typeof value === 'string' || value instanceof Blob) { + data.append(key, value); + } else if (value instanceof Date) { + data.append(key, value.toISOString()); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +const serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => { + if (typeof value === 'string') { + data.append(key, value); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +export const formDataBodySerializer = { + bodySerializer: (body: unknown): FormData => { + const data = new FormData(); + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeFormDataPair(data, key, v)); + } else { + serializeFormDataPair(data, key, value); + } + }); + + return data; + }, +}; + +export const jsonBodySerializer = { + bodySerializer: (body: unknown): string => + JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)), +}; + +export const urlSearchParamsBodySerializer = { + bodySerializer: (body: unknown): string => { + const data = new URLSearchParams(); + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); + } else { + serializeUrlSearchParamsPair(data, key, value); + } + }); + + return data.toString(); + }, +}; diff --git a/typescript/futureagi/src/generated/openapi/core/params.gen.ts b/typescript/futureagi/src/generated/openapi/core/params.gen.ts new file mode 100644 index 0000000..7955601 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/params.gen.ts @@ -0,0 +1,169 @@ +// This file is auto-generated by @hey-api/openapi-ts + +type Slot = 'body' | 'headers' | 'path' | 'query'; + +export type Field = + | { + in: Exclude; + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If omitted, we use the same value as `key`. + */ + map?: string; + } + | { + in: Extract; + /** + * Key isn't required for bodies. + */ + key?: string; + map?: string; + } + | { + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If `in` is omitted, `map` aliases `key` to the transport layer. + */ + map: Slot; + }; + +export interface Fields { + allowExtra?: Partial>; + args?: ReadonlyArray; +} + +export type FieldsConfig = ReadonlyArray; + +const extraPrefixesMap: Record = { + $body_: 'body', + $headers_: 'headers', + $path_: 'path', + $query_: 'query', +}; +const extraPrefixes = Object.entries(extraPrefixesMap); + +type KeyMap = Map< + string, + | { + in: Slot; + map?: string; + } + | { + in?: never; + map: Slot; + } +>; + +const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { + if (!map) { + map = new Map(); + } + + for (const config of fields) { + if ('in' in config) { + if (config.key) { + map.set(config.key, { + in: config.in, + map: config.map, + }); + } + } else if ('key' in config) { + map.set(config.key, { + map: config.map, + }); + } else if (config.args) { + buildKeyMap(config.args, map); + } + } + + return map; +}; + +interface Params { + body: unknown; + headers: Record; + path: Record; + query: Record; +} + +const stripEmptySlots = (params: Params) => { + for (const [slot, value] of Object.entries(params)) { + if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) { + delete params[slot as Slot]; + } + } +}; + +export const buildClientParams = (args: ReadonlyArray, fields: FieldsConfig) => { + const params: Params = { + body: {}, + headers: {}, + path: {}, + query: {}, + }; + + const map = buildKeyMap(fields); + + let config: FieldsConfig[number] | undefined; + + for (const [index, arg] of args.entries()) { + if (fields[index]) { + config = fields[index]; + } + + if (!config) { + continue; + } + + if ('in' in config) { + if (config.key) { + const field = map.get(config.key)!; + const name = field.map || config.key; + if (field.in) { + (params[field.in] as Record)[name] = arg; + } + } else { + params.body = arg; + } + } else { + for (const [key, value] of Object.entries(arg ?? {})) { + const field = map.get(key); + + if (field) { + if (field.in) { + const name = field.map || key; + (params[field.in] as Record)[name] = value; + } else { + params[field.map] = value; + } + } else { + const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix)); + + if (extra) { + const [prefix, slot] = extra; + (params[slot] as Record)[key.slice(prefix.length)] = value; + } else if ('allowExtra' in config && config.allowExtra) { + for (const [slot, allowed] of Object.entries(config.allowExtra)) { + if (allowed) { + (params[slot as Slot] as Record)[key] = value; + break; + } + } + } + } + } + } + } + + stripEmptySlots(params); + + return params; +}; diff --git a/typescript/futureagi/src/generated/openapi/core/pathSerializer.gen.ts b/typescript/futureagi/src/generated/openapi/core/pathSerializer.gen.ts new file mode 100644 index 0000000..994b284 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/pathSerializer.gen.ts @@ -0,0 +1,171 @@ +// This file is auto-generated by @hey-api/openapi-ts + +interface SerializeOptions extends SerializePrimitiveOptions, SerializerOptions {} + +interface SerializePrimitiveOptions { + allowReserved?: boolean; + name: string; +} + +export interface SerializerOptions { + /** + * @default true + */ + explode: boolean; + style: T; +} + +export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; +export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; +type MatrixStyle = 'label' | 'matrix' | 'simple'; +export type ObjectStyle = 'form' | 'deepObject'; +type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; + +interface SerializePrimitiveParam extends SerializePrimitiveOptions { + value: string; +} + +export const separatorArrayExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case 'label': + return '.'; + case 'matrix': + return ';'; + case 'simple': + return ','; + default: + return '&'; + } +}; + +export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case 'form': + return ','; + case 'pipeDelimited': + return '|'; + case 'spaceDelimited': + return '%20'; + default: + return ','; + } +}; + +export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { + switch (style) { + case 'label': + return '.'; + case 'matrix': + return ';'; + case 'simple': + return ','; + default: + return '&'; + } +}; + +export const serializeArrayParam = ({ + allowReserved, + explode, + name, + style, + value, +}: SerializeOptions & { + value: unknown[]; +}) => { + if (!explode) { + const joinedValues = ( + allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) + ).join(separatorArrayNoExplode(style)); + switch (style) { + case 'label': + return `.${joinedValues}`; + case 'matrix': + return `;${name}=${joinedValues}`; + case 'simple': + return joinedValues; + default: + return `${name}=${joinedValues}`; + } + } + + const separator = separatorArrayExplode(style); + const joinedValues = value + .map((v) => { + if (style === 'label' || style === 'simple') { + return allowReserved ? v : encodeURIComponent(v as string); + } + + return serializePrimitiveParam({ + allowReserved, + name, + value: v as string, + }); + }) + .join(separator); + return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; +}; + +export const serializePrimitiveParam = ({ + allowReserved, + name, + value, +}: SerializePrimitiveParam) => { + if (value === undefined || value === null) { + return ''; + } + + if (typeof value === 'object') { + throw new Error( + 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.', + ); + } + + return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; +}; + +export const serializeObjectParam = ({ + allowReserved, + explode, + name, + style, + value, + valueOnly, +}: SerializeOptions & { + value: Record | Date; + valueOnly?: boolean; +}) => { + if (value instanceof Date) { + return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; + } + + if (style !== 'deepObject' && !explode) { + let values: string[] = []; + Object.entries(value).forEach(([key, v]) => { + values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)]; + }); + const joinedValues = values.join(','); + switch (style) { + case 'form': + return `${name}=${joinedValues}`; + case 'label': + return `.${joinedValues}`; + case 'matrix': + return `;${name}=${joinedValues}`; + default: + return joinedValues; + } + } + + const separator = separatorObjectExplode(style); + const joinedValues = Object.entries(value) + .map(([key, v]) => + serializePrimitiveParam({ + allowReserved, + name: style === 'deepObject' ? `${name}[${key}]` : key, + value: v as string, + }), + ) + .join(separator); + return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; +}; diff --git a/typescript/futureagi/src/generated/openapi/core/queryKeySerializer.gen.ts b/typescript/futureagi/src/generated/openapi/core/queryKeySerializer.gen.ts new file mode 100644 index 0000000..5000df6 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/queryKeySerializer.gen.ts @@ -0,0 +1,117 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * JSON-friendly union that mirrors what Pinia Colada can hash. + */ +export type JsonValue = + | null + | string + | number + | boolean + | JsonValue[] + | { [key: string]: JsonValue }; + +/** + * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. + */ +export const queryKeyJsonReplacer = (_key: string, value: unknown) => { + if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { + return undefined; + } + if (typeof value === 'bigint') { + return value.toString(); + } + if (value instanceof Date) { + return value.toISOString(); + } + return value; +}; + +/** + * Safely stringifies a value and parses it back into a JsonValue. + */ +export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { + try { + const json = JSON.stringify(input, queryKeyJsonReplacer); + if (json === undefined) { + return undefined; + } + return JSON.parse(json) as JsonValue; + } catch { + return undefined; + } +}; + +/** + * Detects plain objects (including objects with a null prototype). + */ +const isPlainObject = (value: unknown): value is Record => { + if (value === null || typeof value !== 'object') { + return false; + } + const prototype = Object.getPrototypeOf(value as object); + return prototype === Object.prototype || prototype === null; +}; + +/** + * Turns URLSearchParams into a sorted JSON object for deterministic keys. + */ +const serializeSearchParams = (params: URLSearchParams): JsonValue => { + const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b)); + const result: Record = {}; + + for (const [key, value] of entries) { + const existing = result[key]; + if (existing === undefined) { + result[key] = value; + continue; + } + + if (Array.isArray(existing)) { + (existing as string[]).push(value); + } else { + result[key] = [existing, value]; + } + } + + return result; +}; + +/** + * Normalizes any accepted value into a JSON-friendly shape for query keys. + */ +export const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => { + if (value === null) { + return null; + } + + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return value; + } + + if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { + return undefined; + } + + if (typeof value === 'bigint') { + return value.toString(); + } + + if (value instanceof Date) { + return value.toISOString(); + } + + if (Array.isArray(value)) { + return stringifyToJsonValue(value); + } + + if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) { + return serializeSearchParams(value); + } + + if (isPlainObject(value)) { + return stringifyToJsonValue(value); + } + + return undefined; +}; diff --git a/typescript/futureagi/src/generated/openapi/core/serverSentEvents.gen.ts b/typescript/futureagi/src/generated/openapi/core/serverSentEvents.gen.ts new file mode 100644 index 0000000..ddf3c4d --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/serverSentEvents.gen.ts @@ -0,0 +1,242 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Config } from './types.gen'; + +export type ServerSentEventsOptions = Omit & + Pick & { + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Implementing clients can call request interceptors inside this hook. + */ + onRequest?: (url: string, init: RequestInit) => Promise; + /** + * Callback invoked when a network or parsing error occurs during streaming. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param error The error that occurred. + */ + onSseError?: (error: unknown) => void; + /** + * Callback invoked when an event is streamed from the server. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param event Event streamed from the server. + * @returns Nothing (void). + */ + onSseEvent?: (event: StreamEvent) => void; + serializedBody?: RequestInit['body']; + /** + * Default retry delay in milliseconds. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 3000 + */ + sseDefaultRetryDelay?: number; + /** + * Maximum number of retry attempts before giving up. + */ + sseMaxRetryAttempts?: number; + /** + * Maximum retry delay in milliseconds. + * + * Applies only when exponential backoff is used. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 30000 + */ + sseMaxRetryDelay?: number; + /** + * Optional sleep function for retry backoff. + * + * Defaults to using `setTimeout`. + */ + sseSleepFn?: (ms: number) => Promise; + url: string; + }; + +export interface StreamEvent { + data: TData; + event?: string; + id?: string; + retry?: number; +} + +export type ServerSentEventsResult = { + stream: AsyncGenerator< + TData extends Record ? TData[keyof TData] : TData, + TReturn, + TNext + >; +}; + +export function createSseClient({ + onRequest, + onSseError, + onSseEvent, + responseTransformer, + responseValidator, + sseDefaultRetryDelay, + sseMaxRetryAttempts, + sseMaxRetryDelay, + sseSleepFn, + url, + ...options +}: ServerSentEventsOptions): ServerSentEventsResult { + let lastEventId: string | undefined; + + const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); + + const createStream = async function* () { + let retryDelay: number = sseDefaultRetryDelay ?? 3000; + let attempt = 0; + const signal = options.signal ?? new AbortController().signal; + + while (true) { + if (signal.aborted) break; + + attempt++; + + const headers = + options.headers instanceof Headers + ? options.headers + : new Headers(options.headers as Record | undefined); + + if (lastEventId !== undefined) { + headers.set('Last-Event-ID', lastEventId); + } + + try { + const requestInit: RequestInit = { + redirect: 'follow', + ...options, + body: options.serializedBody, + headers, + signal, + }; + let request = new Request(url, requestInit); + if (onRequest) { + request = await onRequest(url, requestInit); + } + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = options.fetch ?? globalThis.fetch; + const response = await _fetch(request); + + if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`); + + if (!response.body) throw new Error('No body in SSE response'); + + const reader = response.body.pipeThrough(new TextDecoderStream()).getReader(); + + let buffer = ''; + + const abortHandler = () => { + try { + reader.cancel(); + } catch { + // noop + } + }; + + signal.addEventListener('abort', abortHandler); + + try { + while (true) { + const { done, value } = await reader.read(); + if (done) break; + buffer += value; + buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings + + const chunks = buffer.split('\n\n'); + buffer = chunks.pop() ?? ''; + + for (const chunk of chunks) { + const lines = chunk.split('\n'); + const dataLines: Array = []; + let eventName: string | undefined; + + for (const line of lines) { + if (line.startsWith('data:')) { + dataLines.push(line.replace(/^data:\s*/, '')); + } else if (line.startsWith('event:')) { + eventName = line.replace(/^event:\s*/, ''); + } else if (line.startsWith('id:')) { + lastEventId = line.replace(/^id:\s*/, ''); + } else if (line.startsWith('retry:')) { + const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10); + if (!Number.isNaN(parsed)) { + retryDelay = parsed; + } + } + } + + let data: unknown; + let parsedJson = false; + + if (dataLines.length) { + const rawData = dataLines.join('\n'); + try { + data = JSON.parse(rawData); + parsedJson = true; + } catch { + data = rawData; + } + } + + if (parsedJson) { + if (responseValidator) { + await responseValidator(data); + } + + if (responseTransformer) { + data = await responseTransformer(data); + } + } + + onSseEvent?.({ + data, + event: eventName, + id: lastEventId, + retry: retryDelay, + }); + + if (dataLines.length) { + yield data as any; + } + } + } + } finally { + signal.removeEventListener('abort', abortHandler); + reader.releaseLock(); + } + + break; // exit loop on normal completion + } catch (error) { + // connection failed or aborted; retry after delay + onSseError?.(error); + + if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) { + break; // stop after firing error + } + + // exponential backoff: double retry each attempt, cap at 30s + const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000); + await sleep(backoff); + } + } + }; + + const stream = createStream(); + + return { stream }; +} diff --git a/typescript/futureagi/src/generated/openapi/core/types.gen.ts b/typescript/futureagi/src/generated/openapi/core/types.gen.ts new file mode 100644 index 0000000..9efe71d --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/types.gen.ts @@ -0,0 +1,104 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth, AuthToken } from './auth.gen'; +import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen'; + +export type HttpMethod = + | 'connect' + | 'delete' + | 'get' + | 'head' + | 'options' + | 'patch' + | 'post' + | 'put' + | 'trace'; + +export type Client< + RequestFn = never, + Config = unknown, + MethodFn = never, + BuildUrlFn = never, + SseFn = never, +> = { + /** + * Returns the final request URL. + */ + buildUrl: BuildUrlFn; + getConfig: () => Config; + request: RequestFn; + setConfig: (config: Config) => Config; +} & { + [K in HttpMethod]: MethodFn; +} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } }); + +export interface Config { + /** + * Auth token or a function returning auth token. The resolved value will be + * added to the request payload as defined by its `security` array. + */ + auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; + /** + * A function for serializing request body parameter. By default, + * {@link JSON.stringify()} will be used. + */ + bodySerializer?: BodySerializer | null; + /** + * An object containing any HTTP headers that you want to pre-populate your + * `Headers` object with. + * + * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} + */ + headers?: + | RequestInit['headers'] + | Record< + string, + string | number | boolean | (string | number | boolean)[] | null | undefined | unknown + >; + /** + * The request method. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} + */ + method?: Uppercase; + /** + * A function for serializing request query parameters. By default, arrays + * will be exploded in form style, objects will be exploded in deepObject + * style, and reserved characters are percent-encoded. + * + * This method will have no effect if the native `paramsSerializer()` Axios + * API function is used. + * + * {@link https://swagger.io/docs/specification/serialization/#query View examples} + */ + querySerializer?: QuerySerializer | QuerySerializerOptions; + /** + * A function validating request data. This is useful if you want to ensure + * the request conforms to the desired shape, so it can be safely sent to + * the server. + */ + requestValidator?: (data: unknown) => Promise; + /** + * A function transforming response data before it's returned. This is useful + * for post-processing data, e.g., converting ISO strings into Date objects. + */ + responseTransformer?: (data: unknown) => Promise; + /** + * A function validating response data. This is useful if you want to ensure + * the response conforms to the desired shape, so it can be safely passed to + * the transformers and returned to the user. + */ + responseValidator?: (data: unknown) => Promise; +} + +type IsExactlyNeverOrNeverUndefined = [T] extends [never] + ? true + : [T] extends [never | undefined] + ? [undefined] extends [T] + ? false + : true + : false; + +export type OmitNever> = { + [K in keyof T as IsExactlyNeverOrNeverUndefined extends true ? never : K]: T[K]; +}; diff --git a/typescript/futureagi/src/generated/openapi/core/utils.gen.ts b/typescript/futureagi/src/generated/openapi/core/utils.gen.ts new file mode 100644 index 0000000..9a4fec7 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/core/utils.gen.ts @@ -0,0 +1,140 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { BodySerializer, QuerySerializer } from './bodySerializer.gen'; +import { + type ArraySeparatorStyle, + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from './pathSerializer.gen'; + +export interface PathSerializer { + path: Record; + url: string; +} + +export const PATH_PARAM_RE = /\{[^{}]+\}/g; + +export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { + let url = _url; + const matches = _url.match(PATH_PARAM_RE); + if (matches) { + for (const match of matches) { + let explode = false; + let name = match.substring(1, match.length - 1); + let style: ArraySeparatorStyle = 'simple'; + + if (name.endsWith('*')) { + explode = true; + name = name.substring(0, name.length - 1); + } + + if (name.startsWith('.')) { + name = name.substring(1); + style = 'label'; + } else if (name.startsWith(';')) { + name = name.substring(1); + style = 'matrix'; + } + + const value = path[name]; + + if (value === undefined || value === null) { + continue; + } + + if (Array.isArray(value)) { + url = url.replace(match, serializeArrayParam({ explode, name, style, value })); + continue; + } + + if (typeof value === 'object') { + url = url.replace( + match, + serializeObjectParam({ + explode, + name, + style, + value: value as Record, + valueOnly: true, + }), + ); + continue; + } + + if (style === 'matrix') { + url = url.replace( + match, + `;${serializePrimitiveParam({ + name, + value: value as string, + })}`, + ); + continue; + } + + const replaceValue = encodeURIComponent( + style === 'label' ? `.${value as string}` : (value as string), + ); + url = url.replace(match, replaceValue); + } + } + return url; +}; + +export const getUrl = ({ + baseUrl, + path, + query, + querySerializer, + url: _url, +}: { + baseUrl?: string; + path?: Record; + query?: Record; + querySerializer: QuerySerializer; + url: string; +}) => { + const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; + let url = (baseUrl ?? '') + pathUrl; + if (path) { + url = defaultPathSerializer({ path, url }); + } + let search = query ? querySerializer(query) : ''; + if (search.startsWith('?')) { + search = search.substring(1); + } + if (search) { + url += `?${search}`; + } + return url; +}; + +export function getValidRequestBody(options: { + body?: unknown; + bodySerializer?: BodySerializer | null; + serializedBody?: unknown; +}) { + const hasBody = options.body !== undefined; + const isSerializedBody = hasBody && options.bodySerializer; + + if (isSerializedBody) { + if ('serializedBody' in options) { + const hasSerializedBody = + options.serializedBody !== undefined && options.serializedBody !== ''; + + return hasSerializedBody ? options.serializedBody : null; + } + + // not all clients implement a serializedBody property (i.e., client-axios) + return options.body !== '' ? options.body : null; + } + + // plain/text body + if (hasBody) { + return options.body; + } + + // no body was provided + return undefined; +} diff --git a/typescript/futureagi/src/generated/openapi/index.ts b/typescript/futureagi/src/generated/openapi/index.ts new file mode 100644 index 0000000..225fbb9 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/index.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export { accountsOrganizationMembersReactivateCreate, accountsOrganizationMembersRemoveDelete, accountsOrganizationMembersRoleCreate, accountsWorkspaceMembersRemoveDelete, accountsWorkspaceMembersRoleCreate, addAnnotationQueueItems, addAnnotationQueueLabel, addDatasetColumns, addDatasetRows, archiveAnnotationQueue, assignAnnotationQueueItems, bulkMuteAlerts, cancelTestExecution, compareExperiments, completeAnnotationQueueItem, createAgentDefinition, createAlert, createAnnotationQueue, createAnnotationQueueItemComment, createBulkTraceAnnotation, createDatasetFromLocalFile, createDatasetManually, createEmptyDataset, createExperiment, createPersona, createRunTest, createScenario, deleteAgentDefinition, deleteAlert, deleteDatasetColumn, deleteDatasetRow, deleteExperiments, deletePersona, deleteRunTest, deleteScenario, downloadDataset, downloadExperiment, duplicateDataset, executeRunTest, exportAnnotationQueue, exportAnnotationQueueToDataset, getAgentDefinition, getAlert, getAlertDetails, getAlertGraph, getAlertLog, getAnnotationQueue, getAnnotationQueueAgreement, getAnnotationQueueAnalytics, getAnnotationQueueItemDetail, getAnnotationQueueProgress, getCurrentUser, getDatasetAnnotationSummary, getDatasetColumns, getDatasetEvalStats, getDatasetJsonSchema, getDatasetRow, getDatasetTable, getErrorFeedIssue, getErrorFeedIssueStats, getExperiment, getExperimentJsonSchema, getExperimentRow, getExperimentStats, getNextAnnotationQueueItem, getPersona, getRunTest, getRunTestAnalytics, getRunTestStatus, getScenario, getSimulationAnalytics, getTestExecution, getTestExecutionAnalytics, getTestExecutionKpis, getTestExecutionPerformanceSummary, getTestExecutionTranscripts, getTrace, getTraceGraphMethods, getTraceSession, getTraceSessionGraphData, getVoiceCallDetail, importAnnotationQueueItemAnnotations, listAgentDefinitions, listAlertLogs, listAlertLogsForAlert, listAlertMetricOptions, listAlerts, listAllAlertLogs, listAnnotationQueueExportFields, listAnnotationQueueItemAnnotations, listAnnotationQueueItemDiscussion, listAnnotationQueueItems, listAnnotationQueues, listDatasetBaseColumns, listDatasetDerivedVariables, listDatasetNames, listDatasets, listErrorFeedIssues, listExperimentComparisons, listExperimentRows, listExperiments, listOrganizationMembers, listPersonas, listRunTestCallExecutions, listRunTestExecutions, listRunTests, listScenarios, listSimulationMetrics, listSimulationRuns, listTestExecutions, listTraceAnnotationLabels, listTraceProjects, listTraceProperties, listTraces, listTraceSessions, listTraceUsers, listVoiceCalls, listWorkspaceMembers, listWorkspaces, modelHubAnnotationQueuesAutomationRulesCreate, modelHubAnnotationQueuesAutomationRulesDelete, modelHubAnnotationQueuesAutomationRulesEvaluate, modelHubAnnotationQueuesAutomationRulesList, modelHubAnnotationQueuesAutomationRulesPartialUpdate, modelHubAnnotationQueuesAutomationRulesPreview, modelHubAnnotationQueuesAutomationRulesRead, modelHubAnnotationQueuesAutomationRulesUpdate, modelHubAnnotationQueuesForSource, modelHubAnnotationQueuesGetOrCreateDefault, modelHubAnnotationQueuesHardDelete, modelHubAnnotationQueuesItemsCreate, modelHubAnnotationQueuesItemsDelete, modelHubAnnotationQueuesItemsPartialUpdate, modelHubAnnotationQueuesItemsRead, modelHubAnnotationQueuesItemsUpdate, modelHubAnnotationQueuesRestore, modelHubAnnotationQueuesUpdate, modelHubAnnotationsLabelsCreate, modelHubAnnotationsLabelsDelete, modelHubAnnotationsLabelsList, modelHubAnnotationsLabelsPartialUpdate, modelHubAnnotationsLabelsRead, modelHubAnnotationsLabelsRestore, modelHubAnnotationsLabelsUpdate, modelHubApiKeysCreate, modelHubApiKeysDelete, modelHubApiKeysList, modelHubApiKeysPartialUpdate, modelHubApiKeysRead, modelHubApiKeysUpdate, modelHubApiModelsListList, modelHubDatasetRunPromptStatsList, modelHubDatasetsAddApiColumnCreate, modelHubDatasetsAddVectorDbColumnCreate, modelHubDatasetsClassifyColumnCreate, modelHubDatasetsCompareDatasetsAddEvalCreate, modelHubDatasetsCompareDatasetsCreate, modelHubDatasetsCompareDatasetsDownloadCreate, modelHubDatasetsCompareDatasetsStartEvalCreate, modelHubDatasetsCompareGetEvalsListCreate, modelHubDatasetsComparePreviewRunEvalCreate, modelHubDatasetsCompareStatsCreate, modelHubDatasetsConditionalColumnCreate, modelHubDatasetsDeleteCompareDelete, modelHubDatasetsDeleteCompareRead, modelHubDatasetsDuplicateRowsCreate, modelHubDatasetsExplanationSummaryRead, modelHubDatasetsExplanationSummaryRefreshCreate, modelHubDatasetsExtractEntitiesCreate, modelHubDatasetsGetCompareRowDelete, modelHubDatasetsGetCompareRowRead, modelHubDatasetsHuggingfaceDetailCreate, modelHubDatasetsHuggingfaceListCreate, modelHubDatasetsMergeCreate, modelHubDatasetsPreviewCreate, modelHubDeleteEvalTemplateCreate, modelHubDevelopsAddAsNewCreate, modelHubDevelopsAddEmptyColumnsCreate, modelHubDevelopsAddEmptyRowsCreate, modelHubDevelopsAddMultipleStaticColumnsCreate, modelHubDevelopsAddRowsFromExistingDatasetCreate, modelHubDevelopsAddRowsFromFileCreate, modelHubDevelopsAddRowsFromHuggingfaceCreate, modelHubDevelopsAddRowsSdkCreate, modelHubDevelopsAddRunPromptColumnCreate, modelHubDevelopsAddStaticColumnCreate, modelHubDevelopsAddSyntheticDataCreate, modelHubDevelopsAddUserEvalCreate, modelHubDevelopsCloneDatasetCreate, modelHubDevelopsCreateDatasetCreate, modelHubDevelopsCreateDatasetFromHuggingfaceCreate, modelHubDevelopsCreateSyntheticDatasetCreate, modelHubDevelopsDatasetCreationProgressRead, modelHubDevelopsDeleteDatasetDelete, modelHubDevelopsDeleteTemplateEvalDelete, modelHubDevelopsDeleteUserEvalDelete, modelHubDevelopsEditAndRunUserEvalCreate, modelHubDevelopsEditDatasetBehaviorUpdate, modelHubDevelopsEditRunPromptColumnCreate, modelHubDevelopsExtractJsonColumnCreate, modelHubDevelopsGetCellDataCreate, modelHubDevelopsGetDerivedDatasetsRead, modelHubDevelopsGetEvalsListList, modelHubDevelopsGetEvalStructureRead, modelHubDevelopsGetExperimentDatasetTableList, modelHubDevelopsGetFunctionListList, modelHubDevelopsGetHuggingfaceDatasetConfigCreate, modelHubDevelopsGetRowDiffCreate, modelHubDevelopsPreviewRunEvalCreate, modelHubDevelopsPreviewRunPromptColumnCreate, modelHubDevelopsProviderStatusList, modelHubDevelopsRetrieveRunPromptColumnConfigList, modelHubDevelopsRetrieveRunPromptOptionsList, modelHubDevelopsStartEvalsProcessCreate, modelHubDevelopsStopUserEvalCreate, modelHubDevelopsSyntheticConfigList, modelHubDevelopsUpdateColumnNameUpdate, modelHubDevelopsUpdateColumnTypeUpdate, modelHubDevelopsUpdateSyntheticConfigUpdate, modelHubEvalTemplatesBulkDeleteCreate, modelHubEvalTemplatesCompositeExecuteAdhocCreate, modelHubEvalTemplatesCompositeExecuteCreate, modelHubEvalTemplatesCompositeList, modelHubEvalTemplatesCompositePartialUpdate, modelHubEvalTemplatesCreateCompositeCreate, modelHubEvalTemplatesCreateV2Create, modelHubEvalTemplatesDetailList, modelHubEvalTemplatesFeedbackListList, modelHubEvalTemplatesGroundTruthConfigList, modelHubEvalTemplatesGroundTruthConfigUpdate, modelHubEvalTemplatesGroundTruthList, modelHubEvalTemplatesGroundTruthUploadCreate, modelHubEvalTemplatesListChartsCreate, modelHubEvalTemplatesListCreate, modelHubEvalTemplatesUpdateUpdate, modelHubEvalTemplatesUsageList, modelHubEvalTemplatesVersionsCreateCreate, modelHubEvalTemplatesVersionsList, modelHubEvalTemplatesVersionsRestoreCreate, modelHubEvalTemplatesVersionsSetDefaultUpdate, modelHubExperimentsV2DerivedVariablesList, modelHubExperimentsV2EvaluationsStatsList, modelHubExperimentsV2FeedbackCreate, modelHubExperimentsV2FeedbackGetFeedbackDetailsList, modelHubExperimentsV2FeedbackGetTemplateList, modelHubExperimentsV2FeedbackSubmitFeedbackCreate, modelHubExperimentsV2RerunCellsCreate, modelHubExperimentsV2RowDiffCreate, modelHubExperimentsV2SuggestNameRead, modelHubExperimentsV2ValidateNameList, modelHubKnowledgeBaseCreate, modelHubKnowledgeBaseDelete, modelHubKnowledgeBaseFilesCreate, modelHubKnowledgeBaseFilesDelete, modelHubKnowledgeBaseGetList, modelHubKnowledgeBaseList, modelHubKnowledgeBaseListList, modelHubKnowledgeBasePartialUpdate, modelHubPromptHistoryExecutionsGetExecutionDetails, modelHubPromptHistoryExecutionsList, modelHubPromptHistoryExecutionsRead, modelHubPromptLabelsAssignLabelById, modelHubPromptLabelsAssignMultipleLabels, modelHubPromptLabelsCreate, modelHubPromptLabelsCreateSystemLabels, modelHubPromptLabelsDelete, modelHubPromptLabelsGetByName, modelHubPromptLabelsList, modelHubPromptLabelsPartialUpdate, modelHubPromptLabelsRead, modelHubPromptLabelsRemoveLabelFromVersion, modelHubPromptLabelsSetDefault, modelHubPromptLabelsTemplateLabels, modelHubPromptLabelsUpdate, modelHubPromptTemplatesAddNewDraft, modelHubPromptTemplatesAnalyzePrompt, modelHubPromptTemplatesBulkDelete, modelHubPromptTemplatesCommit, modelHubPromptTemplatesCompareVersions, modelHubPromptTemplatesCreate, modelHubPromptTemplatesCreateDraft, modelHubPromptTemplatesDelete, modelHubPromptTemplatesDeleteEvaluationConfig, modelHubPromptTemplatesDerivedVariablesExtractCreate, modelHubPromptTemplatesDerivedVariablesList, modelHubPromptTemplatesDerivedVariablesPreviewCreate, modelHubPromptTemplatesDerivedVariablesSchemaList, modelHubPromptTemplatesGeneratePrompt, modelHubPromptTemplatesGenerateVariables, modelHubPromptTemplatesGetAllVariables, modelHubPromptTemplatesGetEvaluationConfigs, modelHubPromptTemplatesGetNextVersion, modelHubPromptTemplatesGetRunStatus, modelHubPromptTemplatesGetSdkCode, modelHubPromptTemplatesGetTemplateByName, modelHubPromptTemplatesImprovePrompt, modelHubPromptTemplatesList, modelHubPromptTemplatesPartialUpdate, modelHubPromptTemplatesRead, modelHubPromptTemplatesRetrieveEvaluations, modelHubPromptTemplatesRunEvalsOnMultipleVersions, modelHubPromptTemplatesRunTemplate, modelHubPromptTemplatesSaveName, modelHubPromptTemplatesSavePromptFolder, modelHubPromptTemplatesSetDefault, modelHubPromptTemplatesStopStreaming, modelHubPromptTemplatesUpdate, modelHubPromptTemplatesUpdateEvaluationConfigs, modelHubPromptTemplatesVersions, modelHubScoresBulkCreate, modelHubScoresCreate, modelHubScoresDelete, modelHubScoresForSource, modelHubScoresList, modelHubScoresPartialUpdate, modelHubScoresRead, modelHubScoresUpdate, type Options, previewAlertGraph, releaseAnnotationQueueItem, removeAnnotationQueueItems, removeAnnotationQueueLabel, reopenAnnotationQueueItemThread, rerunExperiment, resolveAlertLogs, resolveAnnotationQueueItemThread, reviewAnnotationQueueItem, sdkApiV1ConfigureEvaluationsCreate, sdkApiV1EvalCreate, sdkApiV1EvalRead, sdkApiV1EvaluatePipelineCreate, sdkApiV1EvaluatePipelineList, sdkApiV1GetEvalsList, sdkApiV1NewEvalCreate, sdkApiV1NewEvalList, simulateAgentDefinitionsDelete, simulateAgentDefinitionsVersionsActivateCreate, simulateAgentDefinitionsVersionsCallExecutionsList, simulateAgentDefinitionsVersionsCreateCreate, simulateAgentDefinitionsVersionsDeleteDelete, simulateAgentDefinitionsVersionsEvalSummaryList, simulateAgentDefinitionsVersionsList, simulateAgentDefinitionsVersionsRead, simulateAgentDefinitionsVersionsRestoreCreate, simulateApiCallExecutionsList, simulateApiPersonasDuplicate, simulateApiPersonasDuplicateCreate, simulateApiPersonasFieldOptions, simulateApiPersonasSystemPersonas, simulateApiPersonasUpdate, simulateApiPersonasWorkspacePersonas, simulateApiRunTestsList, simulateCallExecutionsBranchAnalysisCreate, simulateCallExecutionsBranchAnalysisList, simulateCallExecutionsChatSendMessageCreate, simulateCallExecutionsDeleteDelete, simulateCallExecutionsErrorLocalizerTasksList, simulateCallExecutionsLogsList, simulateCallExecutionsPartialUpdate, simulateCallExecutionsRead, simulateCallExecutionsSessionComparisonList, simulateCallExecutionsTranscriptsList, simulateExportRead, simulatePromptSimulationsScenariosList, simulatePromptTemplatesSimulationsCreate, simulatePromptTemplatesSimulationsDelete, simulatePromptTemplatesSimulationsExecuteCreate, simulatePromptTemplatesSimulationsList, simulatePromptTemplatesSimulationsPartialUpdate, simulatePromptTemplatesSimulationsRead, simulateRunTestsActiveList, simulateRunTestsChatExecuteCreate, simulateRunTestsComponentsPartialUpdate, simulateRunTestsDeleteDelete, simulateRunTestsDeleteTestExecutionsCreate, simulateRunTestsEvalConfigsCreate, simulateRunTestsEvalConfigsDelete, simulateRunTestsEvalConfigsGetStructureList, simulateRunTestsEvalConfigsUpdateCreate, simulateRunTestsEvalSummaryComparisonList, simulateRunTestsEvalSummaryList, simulateRunTestsGetIdByNameRead, simulateRunTestsRerunTestExecutionsCreate, simulateRunTestsRunNewEvalsCreate, simulateRunTestsScenariosList, simulateRunTestsSdkCodeList, simulateScenariosAddColumnsCreate, simulateScenariosAddRowsCreate, simulateScenariosGetColumnsList, simulateScenariosPromptsUpdate, simulateSimulatorAgentsCreateCreate, simulateSimulatorAgentsDeleteDelete, simulateSimulatorAgentsEditUpdate, simulateSimulatorAgentsList, simulateSimulatorAgentsRead, simulateTestExecutionsChatCallExecutionsBatchCreate, simulateTestExecutionsColumnOrderUpdate, simulateTestExecutionsDeleteDelete, simulateTestExecutionsEvalExplanationSummaryList, simulateTestExecutionsEvalExplanationSummaryRefreshCreate, simulateTestExecutionsOptimiserAnalysisList, simulateTestExecutionsOptimiserAnalysisRefreshCreate, simulateTestExecutionsRerunCallsCreate, skipAnnotationQueueItem, stopExperiment, submitAnnotationQueueItemAnnotations, switchWorkspace, toggleAnnotationQueueItemCommentReaction, tracerFeedIssuesCreateLinearIssueCreate, tracerFeedIssuesDeepAnalysisCreate, tracerFeedIssuesOverviewList, tracerFeedIssuesPartialUpdate, tracerFeedIssuesRootCauseList, tracerFeedIssuesSidebarList, tracerFeedIssuesTracesList, tracerFeedIssuesTrendsList, tracerTraceAgentGraph, tracerTraceAnnotationCreate, tracerTraceAnnotationDelete, tracerTraceAnnotationGetAnnotationValues, tracerTraceAnnotationList, tracerTraceAnnotationPartialUpdate, tracerTraceAnnotationRead, tracerTraceAnnotationUpdate, tracerTraceBulkCreate, tracerTraceCompareTraces, tracerTraceCreate, tracerTraceDelete, tracerTraceGetEvalNames, tracerTraceGetTraceExportData, tracerTraceGetTraceIdByIndex, tracerTraceGetTraceIdByIndexObserve, tracerTraceList, tracerTraceListTracesOfSession, tracerTracePartialUpdate, tracerTraceSessionCreate, tracerTraceSessionDelete, tracerTraceSessionEvalLogs, tracerTraceSessionGetSessionFilterValues, tracerTraceSessionGetTraceSessionExportData, tracerTraceSessionList, tracerTraceSessionPartialUpdate, tracerTraceSessionUpdate, tracerTraceUpdate, tracerUserAlertLogsCreate, tracerUserAlertLogsDelete, tracerUserAlertLogsPartialUpdate, tracerUserAlertLogsUpdate, tracerUserAlertsDuplicate, tracerUserAlertsListMonitors, tracerUserAlertsUpdate, tracerUsersGetCodeExampleList, updateAgentDefinition, updateAlert, updateAnnotationQueue, updateAnnotationQueueStatus, updateDatasetCell, updateExperiment, updatePersona, updateRunTest, updateScenario, updateTraceTags } from './sdk.gen'; +export type { AccountsErrorResponse, AccountsOrganizationMembersReactivateCreateData, AccountsOrganizationMembersReactivateCreateError, AccountsOrganizationMembersReactivateCreateErrors, AccountsOrganizationMembersReactivateCreateResponse, AccountsOrganizationMembersReactivateCreateResponses, AccountsOrganizationMembersRemoveDeleteData, AccountsOrganizationMembersRemoveDeleteError, AccountsOrganizationMembersRemoveDeleteErrors, AccountsOrganizationMembersRemoveDeleteResponse, AccountsOrganizationMembersRemoveDeleteResponses, AccountsOrganizationMembersRoleCreateData, AccountsOrganizationMembersRoleCreateError, AccountsOrganizationMembersRoleCreateErrors, AccountsOrganizationMembersRoleCreateResponse, AccountsOrganizationMembersRoleCreateResponses, AccountsWorkspaceMembersRemoveDeleteData, AccountsWorkspaceMembersRemoveDeleteError, AccountsWorkspaceMembersRemoveDeleteErrors, AccountsWorkspaceMembersRemoveDeleteResponse, AccountsWorkspaceMembersRemoveDeleteResponses, AccountsWorkspaceMembersRoleCreateData, AccountsWorkspaceMembersRoleCreateError, AccountsWorkspaceMembersRoleCreateErrors, AccountsWorkspaceMembersRoleCreateResponse, AccountsWorkspaceMembersRoleCreateResponses, AddAnnotationQueueItemsData, AddAnnotationQueueItemsError, AddAnnotationQueueItemsErrors, AddAnnotationQueueItemsResponse, AddAnnotationQueueItemsResponses, AddAnnotationQueueLabelData, AddAnnotationQueueLabelError, AddAnnotationQueueLabelErrors, AddAnnotationQueueLabelResponse, AddAnnotationQueueLabelResponses, AddApiColumnRequest, AddAsNewDatasetRequest, AddDatasetColumnsData, AddDatasetColumnsError, AddDatasetColumnsErrors, AddDatasetColumnsResponse, AddDatasetColumnsResponses, AddDatasetRowsData, AddDatasetRowsError, AddDatasetRowsErrors, AddDatasetRowsResponse, AddDatasetRowsResponses, AddEvalConfigsRequest, AddEvalConfigsResponse, AddEvalConfigsResponseWritable, AddItems, AddQueueItem, AddRowsFromFileRequest, AddRowsFromFileRequestWritable, AddRunPrompt, AgentDefinitionBulkDeleteRequest, AgentDefinitionBulkDeleteResponse, AgentDefinitionCreateRequest, AgentDefinitionCreateResponse, AgentDefinitionCreateResponseWritable, AgentDefinitionDeleteResponse, AgentDefinitionEditRequest, AgentDefinitionEditResponse, AgentDefinitionEditResponseWritable, AgentDefinitionListResponse, AgentDefinitionResponse, AgentFlowGraph, AgentVersionActivateResponse, AgentVersionActivateResponseWritable, AgentVersionCreateRequest, AgentVersionCreateResponse, AgentVersionCreateResponseWritable, AgentVersionDeleteResponse, AgentVersionListResponse, AgentVersionResponse, AgentVersionRestoreResponse, AgentVersionRestoreResponseWritable, AllActiveTests, AnnotationLabelResponse, AnnotationLabelRestoreResponse, AnnotationLabelRestoreResponseWritable, AnnotationQueue, AnnotationQueue2, AnnotationQueueWritable, AnnotationsLabels, AnnotationsLabels2, AnnotationsLabelsWritable, AnnotationSummaryHeader, AnnotationSummaryResponse, AnnotationSummaryResult, ApiErrorResponse, ApiErrorWithDetailsResponse, ApiKey, ApiKey2, ApiKeyWritable, ApiSelectionTooLargeDetail, ApiSelectionTooLargeError, ApiTextErrorResponse, ArchiveAnnotationQueueData, ArchiveAnnotationQueueError, ArchiveAnnotationQueueErrors, ArchiveAnnotationQueueResponse, ArchiveAnnotationQueueResponses, AssignAnnotationQueueItemsData, AssignAnnotationQueueItemsError, AssignAnnotationQueueItemsErrors, AssignAnnotationQueueItemsResponse, AssignAnnotationQueueItemsResponses, AssignItems, AutomationRule, AutomationRule2, AutomationRuleConditions, AutomationRuleEvaluateAcceptedResponse, AutomationRuleEvaluateResponse, AutomationRuleEvaluateResult, AutomationRuleScope, AutomationRuleWritable, BaseColumnsResponse, BaseColumnsResponseResult, BulkAnnotationAnnotationRequest, BulkAnnotationNoteRequest, BulkAnnotationRecordRequest, BulkAnnotationRequest, BulkAnnotationResponse, BulkAnnotationResponseResult, BulkCreateScoreItem, BulkCreateScores, BulkCreateScoresResponse, BulkCreateScoresResponseWritable, BulkCreateScoresResult, BulkCreateScoresResultWritable, BulkMuteAlertsData, BulkMuteAlertsError, BulkMuteAlertsErrors, BulkMuteAlertsResponse, BulkMuteAlertsResponses, BulkRemoveItems, CallBranchAnalysisResponse, CallBranchDeviationCreateResponse, CallExecution, CallExecutionDeleteResponse, CallExecutionDetail, CallExecutionDetailWritable, CallExecutionErrorLocalizerTasksResponse, CallExecutionErrorResponse, CallExecutionLogsResponse, CallExecutionRerun, CallExecutionStatusUpdate, CallExecutionWritable, CallLogEntryResponse, CallTranscript, CallTranscriptResponse, CallTranscriptResponseWritable, CallTranscriptWritable, CancelTestExecutionData, CancelTestExecutionError, CancelTestExecutionErrors, CancelTestExecutionResponse, CancelTestExecutionResponse2, CancelTestExecutionResponses, ChatMessageContract, ChatSdkCodeResponse, ChatSdkCodeResult, ChatSendMessageResponse, ChatSendMessageResult, ChatToolCall, ChatToolCallFunction, CicdEvaluationItem, CicdJob, ClassifyColumnRequest, ClientOptions, CloneDatasetRequest, Column, ColumnDefinition, ColumnOrder, ColumnTypeConversionResponse, ColumnTypeConversionResult, ColumnWritable, CompareDataset, CompareDataset2, CompareDatasetDeleteResponse, CompareDatasetDeleteResult, CompareDatasetMetadata, CompareDatasetResponse, CompareDatasetResult, CompareDatasetRowResponse, CompareDatasetRowResult, CompareDatasetStatsRequest, CompareDatasetStatsResponse, CompareEvalListResponse, CompareEvalListResult, CompareEvalsListRequest, CompareExperimentEvalRequest, CompareExperimentsData, CompareExperimentsError, CompareExperimentsErrors, CompareExperimentsResponse, CompareExperimentsResponses, ComparePreviewRunEvalRequest, CompareStartEvalsRequest, CompleteAnnotationQueueItemData, CompleteAnnotationQueueItemError, CompleteAnnotationQueueItemErrors, CompleteAnnotationQueueItemResponse, CompleteAnnotationQueueItemResponses, CompositeChildItem, CompositeChildResult, CompositeEvalAdhocExecuteRequest, CompositeEvalCreateRequest, CompositeEvalCreateResponse, CompositeEvalCreateResponseResult, CompositeEvalDetailResponse, CompositeEvalDetailResponseResult, CompositeEvalExecuteRequest, CompositeEvalExecuteResponse, CompositeEvalExecuteResponseResult, CompositeEvalUpdateRequest, ConditionalColumnRequest, ConfigureEvaluations, CoOccurringIssue, CreateAgentDefinitionData, CreateAgentDefinitionError, CreateAgentDefinitionErrors, CreateAgentDefinitionResponse, CreateAgentDefinitionResponses, CreateAlertData, CreateAlertError, CreateAlertErrors, CreateAlertResponse, CreateAlertResponses, CreateAnnotationQueueData, CreateAnnotationQueueError, CreateAnnotationQueueErrors, CreateAnnotationQueueItemCommentData, CreateAnnotationQueueItemCommentError, CreateAnnotationQueueItemCommentErrors, CreateAnnotationQueueItemCommentResponse, CreateAnnotationQueueItemCommentResponses, CreateAnnotationQueueResponse, CreateAnnotationQueueResponses, CreateBulkTraceAnnotationData, CreateBulkTraceAnnotationError, CreateBulkTraceAnnotationErrors, CreateBulkTraceAnnotationResponse, CreateBulkTraceAnnotationResponses, CreateDatasetFromExperimentRequest, CreateDatasetFromLocalFileData, CreateDatasetFromLocalFileError, CreateDatasetFromLocalFileErrors, CreateDatasetFromLocalFileRequest, CreateDatasetFromLocalFileRequestWritable, CreateDatasetFromLocalFileResponse, CreateDatasetFromLocalFileResponses, CreateDatasetManuallyData, CreateDatasetManuallyError, CreateDatasetManuallyErrors, CreateDatasetManuallyResponse, CreateDatasetManuallyResponses, CreateEmptyDatasetData, CreateEmptyDatasetError, CreateEmptyDatasetErrors, CreateEmptyDatasetRequest, CreateEmptyDatasetResponse, CreateEmptyDatasetResponses, CreateExperimentData, CreateExperimentError, CreateExperimentErrors, CreateExperimentResponse, CreateExperimentResponses, CreateLinearIssue, CreateLinearIssueResponse, CreateLinearIssueResult, CreatePersonaData, CreatePersonaError, CreatePersonaErrors, CreatePersonaResponse, CreatePersonaResponses, CreatePromptSimulationRequest, CreateRunTest, CreateRunTestData, CreateRunTestError, CreateRunTestErrors, CreateRunTestResponse, CreateRunTestResponses, CreateScenarioData, CreateScenarioError, CreateScenarioErrors, CreateScenarioResponse, CreateScenarioResponses, CreateScore, Dataset, DatasetAddColumnsRequest, DatasetAddEmptyColumnsRequest, DatasetAddEmptyRowsRequest, DatasetAddRowsFromExistingRequest, DatasetAddRowsRequest, DatasetBehaviorRequest, DatasetCellDataRequest, DatasetCellDataResponse, DatasetCellValue, DatasetColumnDetailItem, DatasetColumnDetailResponse, DatasetColumnDetailResult, DatasetColumnsMutationResponse, DatasetColumnsMutationResponseWritable, DatasetColumnsMutationResult, DatasetColumnsMutationResultWritable, DatasetCopyResponse, DatasetCopyResult, DatasetCreateStartedResponse, DatasetCreateStartedResult, DatasetCreationProgressResponse, DatasetCreationProgressResult, DatasetDerivedVariablesResponse, DatasetDerivedVariablesResult, DatasetEvalStatsItem, DatasetEvalStatsMetric, DatasetEvalStatsResponse, DatasetExplanationSummaryResponse, DatasetExplanationSummaryResponseResult, DatasetJsonSchemaResponse, DatasetListItem, DatasetListResponse, DatasetListResult, DatasetMultipleStaticColumnsRequest, DatasetNameItem, DatasetNamesResponse, DatasetNamesResult, DatasetRowDataRequest, DatasetRowDataResponse, DatasetRowDataResult, DatasetRowDiffRequest, DatasetRowDiffRequest2, DatasetRowNavigation, DatasetRowsImportedResponse, DatasetRowsImportedResult, DatasetRowsImportMessageResponse, DatasetRowsImportMessageResult, DatasetRunPromptStatsPrompt, DatasetRunPromptStatsResponse, DatasetRunPromptStatsResult, DatasetSdkRowsCode, DatasetSdkRowsRequest, DatasetSdkRowsResponse, DatasetSdkRowsResponseWritable, DatasetSdkRowsResult, DatasetSdkRowsResultWritable, DatasetStaticColumnRequest, DatasetTableMetadata, DatasetTableResponse, DatasetTableResult, DatasetUpdateCellValueRequest, DatasetUpdateColumnNameRequest, DatasetUpdateColumnTypeRequest, DatasetWritable, DeepAnalysisApiResponse, DeepAnalysisBody, DeepAnalysisDispatchApiResponse, DeepAnalysisDispatchResponse, DeepAnalysisResponse, DeleteAgentDefinitionData, DeleteAgentDefinitionError, DeleteAgentDefinitionErrors, DeleteAgentDefinitionResponse, DeleteAgentDefinitionResponses, DeleteAlertData, DeleteAlertError, DeleteAlertErrors, DeleteAlertResponse, DeleteAlertResponses, DeleteDatasetColumnData, DeleteDatasetColumnError, DeleteDatasetColumnErrors, DeleteDatasetColumnResponse, DeleteDatasetColumnResponses, DeleteDatasetRowData, DeleteDatasetRowError, DeleteDatasetRowErrors, DeleteDatasetRowResponse, DeleteDatasetRowResponses, DeleteEvalConfigResponse, DeleteEvalTemplate, DeleteExperimentsData, DeleteExperimentsError, DeleteExperimentsErrors, DeleteExperimentsResponse, DeleteExperimentsResponses, DeletePersonaData, DeletePersonaError, DeletePersonaErrors, DeletePersonaResponse, DeletePersonaResponses, DeleteRunTestData, DeleteRunTestError, DeleteRunTestErrors, DeleteRunTestResponse, DeleteRunTestResponses, DeleteScenarioData, DeleteScenarioError, DeleteScenarioErrors, DeleteScenarioResponse, DeleteScenarioResponses, DerivedVariableDetail, DerivedVariableDetailResponse, DerivedVariableExtractRequest, DerivedVariablePreviewRequest, DevelopDatasetMessageResponse, DiscussionCommentRequest, DiscussionReactionRequest, DiscussionThreadStatusRequest, DiscussionThreadStatusRequest2, DownloadDatasetData, DownloadDatasetError, DownloadDatasetErrors, DownloadDatasetResponse, DownloadDatasetResponses, DownloadExperimentData, DownloadExperimentError, DownloadExperimentErrors, DownloadExperimentResponse, DownloadExperimentResponses, DuplicateDatasetData, DuplicateDatasetError, DuplicateDatasetErrors, DuplicateDatasetRequest, DuplicateDatasetResponse, DuplicateDatasetResponse2, DuplicateDatasetResponses, DuplicateDatasetResult, DuplicateRowsRequest, DuplicateRowsResponse, DuplicateRowsResult, DynamicColumnCreateResponse, DynamicColumnCreateResult, DynamicColumnMessageResponse, DynamicColumnMessageResult, EditRunPromptColumn, EmptyRequest, EmptyRequest2, EmptyRequestWritable, ErrorLocalizerTaskResponse, ErrorName, ErrorResponse, EvalConfigDefinition, EvalConfigResponse, EvalConfigResponseWritable, EvalConfigStructure, EvalConfigStructureResponse, EvalConfigStructureResponseWritable, EvalConfigStructureResult, EvalConfigStructureResultWritable, EvalConfigStructureWritable, EvalConfigUpdateRequest, EvalConfigUpdateResponse, EvalErrorResponse, EvalExplanationCluster, EvalExplanationSummaryRefreshResponse, EvalExplanationSummaryRefreshResult, EvalExplanationSummaryResponse, EvalExplanationSummaryResponseWritable, EvalExplanationSummaryResult, EvalExplanationSummaryResultWritable, EvalFeedbackListItem, EvalFeedbackListResponse, EvalFeedbackListResponseResult, EvalFunctionListResponse, EvalFunctionListResult, EvalListFilters, EvalListRequest, EvalListResponse, EvalListResult, EvalMetricEntry, EvalPreviewResponse, EvalPreviewResult, EvalStructure, EvalStructureResponse, EvalStructureResult, EvalSummaryComparisonResponse, EvalSummaryResponse, EvalTemplateBulkDeleteRequest, EvalTemplateBulkDeleteResponse, EvalTemplateBulkDeleteResponseResult, EvalTemplateChartPoint, EvalTemplateCreateResponse, EvalTemplateCreateResponseResult, EvalTemplateCreateV2Request, EvalTemplateDetailResponse, EvalTemplateDetailResponseResult, EvalTemplateListChartsItem, EvalTemplateListChartsRequest, EvalTemplateListChartsResponse, EvalTemplateListChartsResponseResult, EvalTemplateListItem, EvalTemplateListResponse, EvalTemplateListResponseResult, EvalTemplateSummary, EvalTemplateUpdateResponse, EvalTemplateUpdateResponseResult, EvalTemplateUpdateV2Request, EvalTemplateVersionCreateRequest, EvalTemplateVersionItem, EvalTemplateVersionListResponse, EvalTemplateVersionListResponseResult, EvalTemplateVersionResponse, EvalTemplateVersionResponseResult, EvalTemplateVersionRestoreResponse, EvalTemplateVersionRestoreResponseResult, EvaluationResult, EvalUsageChartPoint, EvalUsageFeedback, EvalUsageLogItem, EvalUsageLogs, EvalUsageStats, EvalUsageStatsResponse, EvalUsageStatsResponseResult, EventsOverTimePoint, ExecutePromptSimulationRequest, ExecutePromptSimulationResponse, ExecutePromptSimulationResponseWritable, ExecutePromptSimulationResult, ExecutePromptSimulationResultWritable, ExecuteRunTest, ExecuteRunTestData, ExecuteRunTestError, ExecuteRunTestErrors, ExecuteRunTestResponse, ExecuteRunTestResponses, ExecutionMetrics, ExecutionMetricsWritable, ExecutionRuns, ExecutionRunsWritable, ExperimentComparisonColumnMetric, ExperimentComparisonDatasetMetric, ExperimentComparisonDetail, ExperimentComparisonDetailsResponse, ExperimentComparisonDetailsResult, ExperimentComparisonMetrics, ExperimentComparisonNormalizedMetrics, ExperimentComparisonRawMetrics, ExperimentComparisonWeights, ExperimentComparisonWeightsRequest, ExperimentComparisonWeightsRequest2, ExperimentCreateV2, ExperimentDatasetComparisonResponse, ExperimentDatasetComparisonResult, ExperimentDerivedVariablesResponse, ExperimentDerivedVariablesResult, ExperimentDetailV2, ExperimentDetailV2Writable, ExperimentEvaluationColumnStats, ExperimentEvaluationStatsResponse, ExperimentEvaluationStatsResult, ExperimentEvaluationTokenUsage, ExperimentFeedbackCreateResponse, ExperimentFeedbackCreateResult, ExperimentFeedbackDetailItem, ExperimentFeedbackDetailsResponse, ExperimentFeedbackDetailsResult, ExperimentFeedbackSubmitRequest, ExperimentFeedbackSubmitResponse, ExperimentFeedbackSubmitResult, ExperimentFeedbackTemplateResponse, ExperimentFeedbackTemplateResult, ExperimentJsonSchemaResponse, ExperimentListV2, ExperimentListV2Writable, ExperimentNameSuggestionResponse, ExperimentNameSuggestionResult, ExperimentNameValidationResponse, ExperimentNameValidationResult, ExperimentRerunCells, ExperimentRerunRequest, ExperimentRerunRequest2, ExperimentRowDiffCell, ExperimentRowDiffResponse, ExperimentStatsColumnConfig, ExperimentStatsMetadata, ExperimentStatsResponse, ExperimentStatsResult, ExperimentStopResponse, ExperimentStopResult, ExperimentStopWorkflowsCancelled, ExperimentStringResultResponse, ExperimentTableRowsColumnConfig, ExperimentTableRowsMetadata, ExperimentTableRowsResponse, ExperimentTableRowsResult, ExperimentUpdateV2, ExperimentV2DetailResponse, ExperimentV2DetailResponseWritable, ExperimentWorkflowResponse, ExperimentWorkflowResult, ExportAnnotationQueueData, ExportAnnotationQueueError, ExportAnnotationQueueErrors, ExportAnnotationQueueResponse, ExportAnnotationQueueResponses, ExportAnnotationQueueToDatasetData, ExportAnnotationQueueToDatasetError, ExportAnnotationQueueToDatasetErrors, ExportAnnotationQueueToDatasetResponse, ExportAnnotationQueueToDatasetResponses, ExtractEntitiesRequest, ExtractJsonColumnRequest, FailedRerunItem, Feedback, Feedback2, FeedbackWritable, FeedDetailApiResponse, FeedDetailCore, FeedListApiResponse, FeedListResponse, FeedListRow, FeedSidebar, FeedSidebarApiResponse, FeedStats, FeedStatsApiResponse, FeedUpdateBody, GetAgentDefinitionData, GetAgentDefinitionError, GetAgentDefinitionErrors, GetAgentDefinitionResponse, GetAgentDefinitionResponses, GetAlertData, GetAlertDetailsData, GetAlertDetailsError, GetAlertDetailsErrors, GetAlertDetailsResponse, GetAlertDetailsResponses, GetAlertError, GetAlertErrors, GetAlertGraphData, GetAlertGraphError, GetAlertGraphErrors, GetAlertGraphResponse, GetAlertGraphResponses, GetAlertLogData, GetAlertLogError, GetAlertLogErrors, GetAlertLogResponse, GetAlertLogResponses, GetAlertResponse, GetAlertResponses, GetAnnotationLabelsResponse, GetAnnotationQueueAgreementData, GetAnnotationQueueAgreementError, GetAnnotationQueueAgreementErrors, GetAnnotationQueueAgreementResponse, GetAnnotationQueueAgreementResponses, GetAnnotationQueueAnalyticsData, GetAnnotationQueueAnalyticsError, GetAnnotationQueueAnalyticsErrors, GetAnnotationQueueAnalyticsResponse, GetAnnotationQueueAnalyticsResponses, GetAnnotationQueueData, GetAnnotationQueueError, GetAnnotationQueueErrors, GetAnnotationQueueItemDetailData, GetAnnotationQueueItemDetailError, GetAnnotationQueueItemDetailErrors, GetAnnotationQueueItemDetailResponse, GetAnnotationQueueItemDetailResponses, GetAnnotationQueueProgressData, GetAnnotationQueueProgressError, GetAnnotationQueueProgressErrors, GetAnnotationQueueProgressResponse, GetAnnotationQueueProgressResponses, GetAnnotationQueueResponse, GetAnnotationQueueResponses, GetCurrentUserData, GetCurrentUserError, GetCurrentUserErrors, GetCurrentUserResponse, GetCurrentUserResponses, GetDatasetAnnotationSummaryData, GetDatasetAnnotationSummaryError, GetDatasetAnnotationSummaryErrors, GetDatasetAnnotationSummaryResponse, GetDatasetAnnotationSummaryResponses, GetDatasetColumnsData, GetDatasetColumnsError, GetDatasetColumnsErrors, GetDatasetColumnsResponse, GetDatasetColumnsResponses, GetDatasetEvalStatsData, GetDatasetEvalStatsError, GetDatasetEvalStatsErrors, GetDatasetEvalStatsResponse, GetDatasetEvalStatsResponses, GetDatasetJsonSchemaData, GetDatasetJsonSchemaError, GetDatasetJsonSchemaErrors, GetDatasetJsonSchemaResponse, GetDatasetJsonSchemaResponses, GetDatasetRowData, GetDatasetRowError, GetDatasetRowErrors, GetDatasetRowResponse, GetDatasetRowResponses, GetDatasetTableData, GetDatasetTableError, GetDatasetTableErrors, GetDatasetTableResponse, GetDatasetTableResponses, GetErrorFeedIssueData, GetErrorFeedIssueError, GetErrorFeedIssueErrors, GetErrorFeedIssueResponse, GetErrorFeedIssueResponses, GetErrorFeedIssueStatsData, GetErrorFeedIssueStatsError, GetErrorFeedIssueStatsErrors, GetErrorFeedIssueStatsResponse, GetErrorFeedIssueStatsResponses, GetExperimentData, GetExperimentError, GetExperimentErrors, GetExperimentJsonSchemaData, GetExperimentJsonSchemaError, GetExperimentJsonSchemaErrors, GetExperimentJsonSchemaResponse, GetExperimentJsonSchemaResponses, GetExperimentResponse, GetExperimentResponses, GetExperimentRowData, GetExperimentRowError, GetExperimentRowErrors, GetExperimentRowResponse, GetExperimentRowResponses, GetExperimentStatsData, GetExperimentStatsError, GetExperimentStatsErrors, GetExperimentStatsResponse, GetExperimentStatsResponses, GetNextAnnotationQueueItemData, GetNextAnnotationQueueItemError, GetNextAnnotationQueueItemErrors, GetNextAnnotationQueueItemResponse, GetNextAnnotationQueueItemResponses, GetPersonaData, GetPersonaError, GetPersonaErrors, GetPersonaResponse, GetPersonaResponses, GetRunTestAnalyticsData, GetRunTestAnalyticsError, GetRunTestAnalyticsErrors, GetRunTestAnalyticsResponse, GetRunTestAnalyticsResponses, GetRunTestData, GetRunTestError, GetRunTestErrors, GetRunTestResponse, GetRunTestResponses, GetRunTestStatusData, GetRunTestStatusError, GetRunTestStatusErrors, GetRunTestStatusResponse, GetRunTestStatusResponses, GetScenarioData, GetScenarioError, GetScenarioErrors, GetScenarioResponse, GetScenarioResponses, GetSimulationAnalyticsData, GetSimulationAnalyticsError, GetSimulationAnalyticsErrors, GetSimulationAnalyticsResponse, GetSimulationAnalyticsResponses, GetTestExecutionAnalyticsData, GetTestExecutionAnalyticsError, GetTestExecutionAnalyticsErrors, GetTestExecutionAnalyticsResponse, GetTestExecutionAnalyticsResponses, GetTestExecutionData, GetTestExecutionError, GetTestExecutionErrors, GetTestExecutionKpisData, GetTestExecutionKpisError, GetTestExecutionKpisErrors, GetTestExecutionKpisResponse, GetTestExecutionKpisResponses, GetTestExecutionPerformanceSummaryData, GetTestExecutionPerformanceSummaryError, GetTestExecutionPerformanceSummaryErrors, GetTestExecutionPerformanceSummaryResponse, GetTestExecutionPerformanceSummaryResponses, GetTestExecutionResponse, GetTestExecutionResponses, GetTestExecutionTranscriptsData, GetTestExecutionTranscriptsError, GetTestExecutionTranscriptsErrors, GetTestExecutionTranscriptsResponse, GetTestExecutionTranscriptsResponses, GetTraceAnnotation, GetTraceAnnotation2, GetTraceAnnotationValuesResponse, GetTraceAnnotationValuesResult, GetTraceData, GetTraceError, GetTraceErrors, GetTraceGraphMethodsData, GetTraceGraphMethodsError, GetTraceGraphMethodsErrors, GetTraceGraphMethodsResponse, GetTraceGraphMethodsResponses, GetTraceResponse, GetTraceResponses, GetTraceSessionData, GetTraceSessionError, GetTraceSessionErrors, GetTraceSessionGraphDataData, GetTraceSessionGraphDataError, GetTraceSessionGraphDataErrors, GetTraceSessionGraphDataResponse, GetTraceSessionGraphDataResponses, GetTraceSessionResponse, GetTraceSessionResponses, GetVoiceCallDetailData, GetVoiceCallDetailError, GetVoiceCallDetailErrors, GetVoiceCallDetailResponse, GetVoiceCallDetailResponses, GroundTruthConfig, GroundTruthConfigRequest, GroundTruthConfigResponse, GroundTruthConfigResponseResult, GroundTruthItem, GroundTruthListResponse, GroundTruthListResponseResult, GroundTruthUploadRequest, GroundTruthUploadRequestWritable, GroundTruthUploadResponse, GroundTruthUploadResponseResult, HeatmapCell, HuggingFaceAddRowsRequest, HuggingFaceDatasetConfigRequest, HuggingFaceDatasetConfigResponse, HuggingFaceDatasetConfigResult, HuggingFaceDatasetCreateRequest, HuggingFaceDatasetDetail, HuggingFaceDatasetDetailRequest, HuggingFaceDatasetDetailResponse, HuggingFaceDatasetDetailResponseResult, HuggingFaceDatasetListItem, HuggingFaceDatasetListRequest, HuggingFaceDatasetListResponse, HuggingFaceDatasetListResponseResult, ImportAnnotationEntry, ImportAnnotationQueueItemAnnotationsData, ImportAnnotationQueueItemAnnotationsError, ImportAnnotationQueueItemAnnotationsErrors, ImportAnnotationQueueItemAnnotationsResponse, ImportAnnotationQueueItemAnnotationsResponses, ImportAnnotations, JsonColumnSchemaEntry, KeyMoment, LegacyKnowledgeBaseCreateResponse, LegacyKnowledgeBaseCreateResult, LegacyKnowledgeBaseFileRow, LegacyKnowledgeBaseFilesRequest, LegacyKnowledgeBaseFilesResponse, LegacyKnowledgeBaseFilesResult, LegacyKnowledgeBaseListResponse, LegacyKnowledgeBaseListResult, LegacyKnowledgeBaseMutationRequest, LegacyKnowledgeBaseMutationRequest2, LegacyKnowledgeBaseMutationResponse, LegacyKnowledgeBaseMutationResult, LegacyKnowledgeBaseOption, LegacyKnowledgeBaseSdkCodeResponse, LegacyKnowledgeBaseSdkCodeResult, LegacyKnowledgeBaseTableColumn, LegacyKnowledgeBaseTableResponse, LegacyKnowledgeBaseTableResult, LegacyKnowledgeBaseTableRow, ListAgentDefinitionsData, ListAgentDefinitionsError, ListAgentDefinitionsErrors, ListAgentDefinitionsResponse, ListAgentDefinitionsResponses, ListAlertLogsData, ListAlertLogsError, ListAlertLogsErrors, ListAlertLogsForAlertData, ListAlertLogsForAlertError, ListAlertLogsForAlertErrors, ListAlertLogsForAlertResponse, ListAlertLogsForAlertResponses, ListAlertLogsResponse, ListAlertLogsResponses, ListAlertMetricOptionsData, ListAlertMetricOptionsError, ListAlertMetricOptionsErrors, ListAlertMetricOptionsResponse, ListAlertMetricOptionsResponses, ListAlertsData, ListAlertsError, ListAlertsErrors, ListAlertsResponse, ListAlertsResponses, ListAllAlertLogsData, ListAllAlertLogsError, ListAllAlertLogsErrors, ListAllAlertLogsResponse, ListAllAlertLogsResponses, ListAnnotationQueueExportFieldsData, ListAnnotationQueueExportFieldsError, ListAnnotationQueueExportFieldsErrors, ListAnnotationQueueExportFieldsResponse, ListAnnotationQueueExportFieldsResponses, ListAnnotationQueueItemAnnotationsData, ListAnnotationQueueItemAnnotationsError, ListAnnotationQueueItemAnnotationsErrors, ListAnnotationQueueItemAnnotationsResponse, ListAnnotationQueueItemAnnotationsResponses, ListAnnotationQueueItemDiscussionData, ListAnnotationQueueItemDiscussionError, ListAnnotationQueueItemDiscussionErrors, ListAnnotationQueueItemDiscussionResponse, ListAnnotationQueueItemDiscussionResponses, ListAnnotationQueueItemsData, ListAnnotationQueueItemsError, ListAnnotationQueueItemsErrors, ListAnnotationQueueItemsResponse, ListAnnotationQueueItemsResponses, ListAnnotationQueuesData, ListAnnotationQueuesError, ListAnnotationQueuesErrors, ListAnnotationQueuesResponse, ListAnnotationQueuesResponses, ListDatasetBaseColumnsData, ListDatasetBaseColumnsError, ListDatasetBaseColumnsErrors, ListDatasetBaseColumnsResponse, ListDatasetBaseColumnsResponses, ListDatasetDerivedVariablesData, ListDatasetDerivedVariablesError, ListDatasetDerivedVariablesErrors, ListDatasetDerivedVariablesResponse, ListDatasetDerivedVariablesResponses, ListDatasetNamesData, ListDatasetNamesError, ListDatasetNamesErrors, ListDatasetNamesResponse, ListDatasetNamesResponses, ListDatasetsData, ListDatasetsError, ListDatasetsErrors, ListDatasetsResponse, ListDatasetsResponses, ListErrorFeedIssuesData, ListErrorFeedIssuesError, ListErrorFeedIssuesErrors, ListErrorFeedIssuesResponse, ListErrorFeedIssuesResponses, ListExperimentComparisonsData, ListExperimentComparisonsError, ListExperimentComparisonsErrors, ListExperimentComparisonsResponse, ListExperimentComparisonsResponses, ListExperimentRowsData, ListExperimentRowsError, ListExperimentRowsErrors, ListExperimentRowsResponse, ListExperimentRowsResponses, ListExperimentsData, ListExperimentsError, ListExperimentsErrors, ListExperimentsResponse, ListExperimentsResponses, ListOrganizationMembersData, ListOrganizationMembersError, ListOrganizationMembersErrors, ListOrganizationMembersResponse, ListOrganizationMembersResponses, ListPersonasData, ListPersonasError, ListPersonasErrors, ListPersonasResponse, ListPersonasResponses, ListRunTestCallExecutionsData, ListRunTestCallExecutionsError, ListRunTestCallExecutionsErrors, ListRunTestCallExecutionsResponse, ListRunTestCallExecutionsResponses, ListRunTestExecutionsData, ListRunTestExecutionsError, ListRunTestExecutionsErrors, ListRunTestExecutionsResponse, ListRunTestExecutionsResponses, ListRunTestsData, ListRunTestsError, ListRunTestsErrors, ListRunTestsResponse, ListRunTestsResponses, ListScenariosData, ListScenariosError, ListScenariosErrors, ListScenariosResponse, ListScenariosResponses, ListSimulationMetricsData, ListSimulationMetricsError, ListSimulationMetricsErrors, ListSimulationMetricsResponse, ListSimulationMetricsResponses, ListSimulationRunsData, ListSimulationRunsError, ListSimulationRunsErrors, ListSimulationRunsResponse, ListSimulationRunsResponses, ListTestExecutionsData, ListTestExecutionsError, ListTestExecutionsErrors, ListTestExecutionsResponse, ListTestExecutionsResponses, ListTraceAnnotationLabelsData, ListTraceAnnotationLabelsError, ListTraceAnnotationLabelsErrors, ListTraceAnnotationLabelsResponse, ListTraceAnnotationLabelsResponses, ListTraceProjectsData, ListTraceProjectsError, ListTraceProjectsErrors, ListTraceProjectsResponse, ListTraceProjectsResponses, ListTracePropertiesData, ListTracePropertiesError, ListTracePropertiesErrors, ListTracePropertiesResponse, ListTracePropertiesResponses, ListTracesData, ListTracesError, ListTracesErrors, ListTraceSessionsData, ListTraceSessionsError, ListTraceSessionsErrors, ListTraceSessionsResponse, ListTraceSessionsResponses, ListTracesResponse, ListTracesResponses, ListTraceUsersData, ListTraceUsersError, ListTraceUsersErrors, ListTraceUsersResponse, ListTraceUsersResponses, ListVoiceCallsData, ListVoiceCallsError, ListVoiceCallsErrors, ListVoiceCallsResponse, ListVoiceCallsResponses, ListWorkspaceMembersData, ListWorkspaceMembersError, ListWorkspaceMembersErrors, ListWorkspaceMembersResponse, ListWorkspaceMembersResponses, ListWorkspacesData, ListWorkspacesError, ListWorkspacesErrors, ListWorkspacesResponse, ListWorkspacesResponses, LocalFileDatasetCreateStartedResponse, LocalFileDatasetCreateStartedResult, ManagementApiErrorResponse, ManualDatasetCreateRequest, ManualDatasetCreateResponse, ManualDatasetCreateResult, MemberListItem, MemberListResponse, MemberListResult, MemberRemove, MemberRemove2, MemberRoleUpdate, MemberRoleUpdateResponse, MemberRoleUpdateResult, MemberUserMutationResponse, MemberUserMutationResult, MemberWorkspaceAccess, MergeDatasetRequest, MergeDatasetResponse, MergeDatasetResult, ModelHubAnnotationQueuesAutomationRulesCreateData, ModelHubAnnotationQueuesAutomationRulesCreateError, ModelHubAnnotationQueuesAutomationRulesCreateErrors, ModelHubAnnotationQueuesAutomationRulesCreateResponse, ModelHubAnnotationQueuesAutomationRulesCreateResponses, ModelHubAnnotationQueuesAutomationRulesDeleteData, ModelHubAnnotationQueuesAutomationRulesDeleteError, ModelHubAnnotationQueuesAutomationRulesDeleteErrors, ModelHubAnnotationQueuesAutomationRulesDeleteResponse, ModelHubAnnotationQueuesAutomationRulesDeleteResponses, ModelHubAnnotationQueuesAutomationRulesEvaluateData, ModelHubAnnotationQueuesAutomationRulesEvaluateError, ModelHubAnnotationQueuesAutomationRulesEvaluateErrors, ModelHubAnnotationQueuesAutomationRulesEvaluateResponse, ModelHubAnnotationQueuesAutomationRulesEvaluateResponses, ModelHubAnnotationQueuesAutomationRulesListData, ModelHubAnnotationQueuesAutomationRulesListError, ModelHubAnnotationQueuesAutomationRulesListErrors, ModelHubAnnotationQueuesAutomationRulesListResponse, ModelHubAnnotationQueuesAutomationRulesListResponses, ModelHubAnnotationQueuesAutomationRulesPartialUpdateData, ModelHubAnnotationQueuesAutomationRulesPartialUpdateError, ModelHubAnnotationQueuesAutomationRulesPartialUpdateErrors, ModelHubAnnotationQueuesAutomationRulesPartialUpdateResponse, ModelHubAnnotationQueuesAutomationRulesPartialUpdateResponses, ModelHubAnnotationQueuesAutomationRulesPreviewData, ModelHubAnnotationQueuesAutomationRulesPreviewError, ModelHubAnnotationQueuesAutomationRulesPreviewErrors, ModelHubAnnotationQueuesAutomationRulesPreviewResponse, ModelHubAnnotationQueuesAutomationRulesPreviewResponses, ModelHubAnnotationQueuesAutomationRulesReadData, ModelHubAnnotationQueuesAutomationRulesReadError, ModelHubAnnotationQueuesAutomationRulesReadErrors, ModelHubAnnotationQueuesAutomationRulesReadResponse, ModelHubAnnotationQueuesAutomationRulesReadResponses, ModelHubAnnotationQueuesAutomationRulesUpdateData, ModelHubAnnotationQueuesAutomationRulesUpdateError, ModelHubAnnotationQueuesAutomationRulesUpdateErrors, ModelHubAnnotationQueuesAutomationRulesUpdateResponse, ModelHubAnnotationQueuesAutomationRulesUpdateResponses, ModelHubAnnotationQueuesForSourceData, ModelHubAnnotationQueuesForSourceError, ModelHubAnnotationQueuesForSourceErrors, ModelHubAnnotationQueuesForSourceResponse, ModelHubAnnotationQueuesForSourceResponses, ModelHubAnnotationQueuesGetOrCreateDefaultData, ModelHubAnnotationQueuesGetOrCreateDefaultError, ModelHubAnnotationQueuesGetOrCreateDefaultErrors, ModelHubAnnotationQueuesGetOrCreateDefaultResponse, ModelHubAnnotationQueuesGetOrCreateDefaultResponses, ModelHubAnnotationQueuesHardDeleteData, ModelHubAnnotationQueuesHardDeleteError, ModelHubAnnotationQueuesHardDeleteErrors, ModelHubAnnotationQueuesHardDeleteResponse, ModelHubAnnotationQueuesHardDeleteResponses, ModelHubAnnotationQueuesItemsCreateData, ModelHubAnnotationQueuesItemsCreateError, ModelHubAnnotationQueuesItemsCreateErrors, ModelHubAnnotationQueuesItemsCreateResponse, ModelHubAnnotationQueuesItemsCreateResponses, ModelHubAnnotationQueuesItemsDeleteData, ModelHubAnnotationQueuesItemsDeleteError, ModelHubAnnotationQueuesItemsDeleteErrors, ModelHubAnnotationQueuesItemsDeleteResponse, ModelHubAnnotationQueuesItemsDeleteResponses, ModelHubAnnotationQueuesItemsPartialUpdateData, ModelHubAnnotationQueuesItemsPartialUpdateError, ModelHubAnnotationQueuesItemsPartialUpdateErrors, ModelHubAnnotationQueuesItemsPartialUpdateResponse, ModelHubAnnotationQueuesItemsPartialUpdateResponses, ModelHubAnnotationQueuesItemsReadData, ModelHubAnnotationQueuesItemsReadError, ModelHubAnnotationQueuesItemsReadErrors, ModelHubAnnotationQueuesItemsReadResponse, ModelHubAnnotationQueuesItemsReadResponses, ModelHubAnnotationQueuesItemsUpdateData, ModelHubAnnotationQueuesItemsUpdateError, ModelHubAnnotationQueuesItemsUpdateErrors, ModelHubAnnotationQueuesItemsUpdateResponse, ModelHubAnnotationQueuesItemsUpdateResponses, ModelHubAnnotationQueuesRestoreData, ModelHubAnnotationQueuesRestoreError, ModelHubAnnotationQueuesRestoreErrors, ModelHubAnnotationQueuesRestoreResponse, ModelHubAnnotationQueuesRestoreResponses, ModelHubAnnotationQueuesUpdateData, ModelHubAnnotationQueuesUpdateError, ModelHubAnnotationQueuesUpdateErrors, ModelHubAnnotationQueuesUpdateResponse, ModelHubAnnotationQueuesUpdateResponses, ModelHubAnnotationsLabelsCreateData, ModelHubAnnotationsLabelsCreateError, ModelHubAnnotationsLabelsCreateErrors, ModelHubAnnotationsLabelsCreateResponse, ModelHubAnnotationsLabelsCreateResponses, ModelHubAnnotationsLabelsDeleteData, ModelHubAnnotationsLabelsDeleteError, ModelHubAnnotationsLabelsDeleteErrors, ModelHubAnnotationsLabelsDeleteResponse, ModelHubAnnotationsLabelsDeleteResponses, ModelHubAnnotationsLabelsListData, ModelHubAnnotationsLabelsListError, ModelHubAnnotationsLabelsListErrors, ModelHubAnnotationsLabelsListResponse, ModelHubAnnotationsLabelsListResponses, ModelHubAnnotationsLabelsPartialUpdateData, ModelHubAnnotationsLabelsPartialUpdateError, ModelHubAnnotationsLabelsPartialUpdateErrors, ModelHubAnnotationsLabelsPartialUpdateResponse, ModelHubAnnotationsLabelsPartialUpdateResponses, ModelHubAnnotationsLabelsReadData, ModelHubAnnotationsLabelsReadError, ModelHubAnnotationsLabelsReadErrors, ModelHubAnnotationsLabelsReadResponse, ModelHubAnnotationsLabelsReadResponses, ModelHubAnnotationsLabelsRestoreData, ModelHubAnnotationsLabelsRestoreError, ModelHubAnnotationsLabelsRestoreErrors, ModelHubAnnotationsLabelsRestoreResponse, ModelHubAnnotationsLabelsRestoreResponses, ModelHubAnnotationsLabelsUpdateData, ModelHubAnnotationsLabelsUpdateError, ModelHubAnnotationsLabelsUpdateErrors, ModelHubAnnotationsLabelsUpdateResponse, ModelHubAnnotationsLabelsUpdateResponses, ModelHubApiKeysCreateData, ModelHubApiKeysCreateError, ModelHubApiKeysCreateErrors, ModelHubApiKeysCreateResponse, ModelHubApiKeysCreateResponses, ModelHubApiKeysDeleteData, ModelHubApiKeysDeleteError, ModelHubApiKeysDeleteErrors, ModelHubApiKeysDeleteResponse, ModelHubApiKeysDeleteResponses, ModelHubApiKeysListData, ModelHubApiKeysListError, ModelHubApiKeysListErrors, ModelHubApiKeysListResponse, ModelHubApiKeysListResponses, ModelHubApiKeysPartialUpdateData, ModelHubApiKeysPartialUpdateError, ModelHubApiKeysPartialUpdateErrors, ModelHubApiKeysPartialUpdateResponse, ModelHubApiKeysPartialUpdateResponses, ModelHubApiKeysReadData, ModelHubApiKeysReadError, ModelHubApiKeysReadErrors, ModelHubApiKeysReadResponse, ModelHubApiKeysReadResponses, ModelHubApiKeysUpdateData, ModelHubApiKeysUpdateError, ModelHubApiKeysUpdateErrors, ModelHubApiKeysUpdateResponse, ModelHubApiKeysUpdateResponses, ModelHubApiModelsListListData, ModelHubApiModelsListListError, ModelHubApiModelsListListErrors, ModelHubApiModelsListListResponse, ModelHubApiModelsListListResponses, ModelHubDatasetRunPromptStatsListData, ModelHubDatasetRunPromptStatsListError, ModelHubDatasetRunPromptStatsListErrors, ModelHubDatasetRunPromptStatsListResponse, ModelHubDatasetRunPromptStatsListResponses, ModelHubDatasetsAddApiColumnCreateData, ModelHubDatasetsAddApiColumnCreateError, ModelHubDatasetsAddApiColumnCreateErrors, ModelHubDatasetsAddApiColumnCreateResponse, ModelHubDatasetsAddApiColumnCreateResponses, ModelHubDatasetsAddVectorDbColumnCreateData, ModelHubDatasetsAddVectorDbColumnCreateError, ModelHubDatasetsAddVectorDbColumnCreateErrors, ModelHubDatasetsAddVectorDbColumnCreateResponse, ModelHubDatasetsAddVectorDbColumnCreateResponses, ModelHubDatasetsClassifyColumnCreateData, ModelHubDatasetsClassifyColumnCreateError, ModelHubDatasetsClassifyColumnCreateErrors, ModelHubDatasetsClassifyColumnCreateResponse, ModelHubDatasetsClassifyColumnCreateResponses, ModelHubDatasetsCompareDatasetsAddEvalCreateData, ModelHubDatasetsCompareDatasetsAddEvalCreateError, ModelHubDatasetsCompareDatasetsAddEvalCreateErrors, ModelHubDatasetsCompareDatasetsAddEvalCreateResponse, ModelHubDatasetsCompareDatasetsAddEvalCreateResponses, ModelHubDatasetsCompareDatasetsCreateData, ModelHubDatasetsCompareDatasetsCreateError, ModelHubDatasetsCompareDatasetsCreateErrors, ModelHubDatasetsCompareDatasetsCreateResponse, ModelHubDatasetsCompareDatasetsCreateResponses, ModelHubDatasetsCompareDatasetsDownloadCreateData, ModelHubDatasetsCompareDatasetsDownloadCreateError, ModelHubDatasetsCompareDatasetsDownloadCreateErrors, ModelHubDatasetsCompareDatasetsDownloadCreateResponse, ModelHubDatasetsCompareDatasetsDownloadCreateResponses, ModelHubDatasetsCompareDatasetsStartEvalCreateData, ModelHubDatasetsCompareDatasetsStartEvalCreateError, ModelHubDatasetsCompareDatasetsStartEvalCreateErrors, ModelHubDatasetsCompareDatasetsStartEvalCreateResponse, ModelHubDatasetsCompareDatasetsStartEvalCreateResponses, ModelHubDatasetsCompareGetEvalsListCreateData, ModelHubDatasetsCompareGetEvalsListCreateError, ModelHubDatasetsCompareGetEvalsListCreateErrors, ModelHubDatasetsCompareGetEvalsListCreateResponse, ModelHubDatasetsCompareGetEvalsListCreateResponses, ModelHubDatasetsComparePreviewRunEvalCreateData, ModelHubDatasetsComparePreviewRunEvalCreateError, ModelHubDatasetsComparePreviewRunEvalCreateErrors, ModelHubDatasetsComparePreviewRunEvalCreateResponse, ModelHubDatasetsComparePreviewRunEvalCreateResponses, ModelHubDatasetsCompareStatsCreateData, ModelHubDatasetsCompareStatsCreateError, ModelHubDatasetsCompareStatsCreateErrors, ModelHubDatasetsCompareStatsCreateResponse, ModelHubDatasetsCompareStatsCreateResponses, ModelHubDatasetsConditionalColumnCreateData, ModelHubDatasetsConditionalColumnCreateError, ModelHubDatasetsConditionalColumnCreateErrors, ModelHubDatasetsConditionalColumnCreateResponse, ModelHubDatasetsConditionalColumnCreateResponses, ModelHubDatasetsDeleteCompareDeleteData, ModelHubDatasetsDeleteCompareDeleteError, ModelHubDatasetsDeleteCompareDeleteErrors, ModelHubDatasetsDeleteCompareDeleteResponse, ModelHubDatasetsDeleteCompareDeleteResponses, ModelHubDatasetsDeleteCompareReadData, ModelHubDatasetsDeleteCompareReadError, ModelHubDatasetsDeleteCompareReadErrors, ModelHubDatasetsDeleteCompareReadResponse, ModelHubDatasetsDeleteCompareReadResponses, ModelHubDatasetsDuplicateRowsCreateData, ModelHubDatasetsDuplicateRowsCreateError, ModelHubDatasetsDuplicateRowsCreateErrors, ModelHubDatasetsDuplicateRowsCreateResponse, ModelHubDatasetsDuplicateRowsCreateResponses, ModelHubDatasetsExplanationSummaryReadData, ModelHubDatasetsExplanationSummaryReadError, ModelHubDatasetsExplanationSummaryReadErrors, ModelHubDatasetsExplanationSummaryReadResponse, ModelHubDatasetsExplanationSummaryReadResponses, ModelHubDatasetsExplanationSummaryRefreshCreateData, ModelHubDatasetsExplanationSummaryRefreshCreateError, ModelHubDatasetsExplanationSummaryRefreshCreateErrors, ModelHubDatasetsExplanationSummaryRefreshCreateResponse, ModelHubDatasetsExplanationSummaryRefreshCreateResponses, ModelHubDatasetsExtractEntitiesCreateData, ModelHubDatasetsExtractEntitiesCreateError, ModelHubDatasetsExtractEntitiesCreateErrors, ModelHubDatasetsExtractEntitiesCreateResponse, ModelHubDatasetsExtractEntitiesCreateResponses, ModelHubDatasetsGetCompareRowDeleteData, ModelHubDatasetsGetCompareRowDeleteError, ModelHubDatasetsGetCompareRowDeleteErrors, ModelHubDatasetsGetCompareRowDeleteResponse, ModelHubDatasetsGetCompareRowDeleteResponses, ModelHubDatasetsGetCompareRowReadData, ModelHubDatasetsGetCompareRowReadError, ModelHubDatasetsGetCompareRowReadErrors, ModelHubDatasetsGetCompareRowReadResponse, ModelHubDatasetsGetCompareRowReadResponses, ModelHubDatasetsHuggingfaceDetailCreateData, ModelHubDatasetsHuggingfaceDetailCreateError, ModelHubDatasetsHuggingfaceDetailCreateErrors, ModelHubDatasetsHuggingfaceDetailCreateResponse, ModelHubDatasetsHuggingfaceDetailCreateResponses, ModelHubDatasetsHuggingfaceListCreateData, ModelHubDatasetsHuggingfaceListCreateError, ModelHubDatasetsHuggingfaceListCreateErrors, ModelHubDatasetsHuggingfaceListCreateResponse, ModelHubDatasetsHuggingfaceListCreateResponses, ModelHubDatasetsMergeCreateData, ModelHubDatasetsMergeCreateError, ModelHubDatasetsMergeCreateErrors, ModelHubDatasetsMergeCreateResponse, ModelHubDatasetsMergeCreateResponses, ModelHubDatasetsPreviewCreateData, ModelHubDatasetsPreviewCreateError, ModelHubDatasetsPreviewCreateErrors, ModelHubDatasetsPreviewCreateResponse, ModelHubDatasetsPreviewCreateResponses, ModelHubDeleteEvalTemplateCreateData, ModelHubDeleteEvalTemplateCreateError, ModelHubDeleteEvalTemplateCreateErrors, ModelHubDeleteEvalTemplateCreateResponse, ModelHubDeleteEvalTemplateCreateResponses, ModelHubDevelopsAddAsNewCreateData, ModelHubDevelopsAddAsNewCreateError, ModelHubDevelopsAddAsNewCreateErrors, ModelHubDevelopsAddAsNewCreateResponse, ModelHubDevelopsAddAsNewCreateResponses, ModelHubDevelopsAddEmptyColumnsCreateData, ModelHubDevelopsAddEmptyColumnsCreateError, ModelHubDevelopsAddEmptyColumnsCreateErrors, ModelHubDevelopsAddEmptyColumnsCreateResponse, ModelHubDevelopsAddEmptyColumnsCreateResponses, ModelHubDevelopsAddEmptyRowsCreateData, ModelHubDevelopsAddEmptyRowsCreateError, ModelHubDevelopsAddEmptyRowsCreateErrors, ModelHubDevelopsAddEmptyRowsCreateResponse, ModelHubDevelopsAddEmptyRowsCreateResponses, ModelHubDevelopsAddMultipleStaticColumnsCreateData, ModelHubDevelopsAddMultipleStaticColumnsCreateError, ModelHubDevelopsAddMultipleStaticColumnsCreateErrors, ModelHubDevelopsAddMultipleStaticColumnsCreateResponse, ModelHubDevelopsAddMultipleStaticColumnsCreateResponses, ModelHubDevelopsAddRowsFromExistingDatasetCreateData, ModelHubDevelopsAddRowsFromExistingDatasetCreateError, ModelHubDevelopsAddRowsFromExistingDatasetCreateErrors, ModelHubDevelopsAddRowsFromExistingDatasetCreateResponse, ModelHubDevelopsAddRowsFromExistingDatasetCreateResponses, ModelHubDevelopsAddRowsFromFileCreateData, ModelHubDevelopsAddRowsFromFileCreateError, ModelHubDevelopsAddRowsFromFileCreateErrors, ModelHubDevelopsAddRowsFromFileCreateResponse, ModelHubDevelopsAddRowsFromFileCreateResponses, ModelHubDevelopsAddRowsFromHuggingfaceCreateData, ModelHubDevelopsAddRowsFromHuggingfaceCreateError, ModelHubDevelopsAddRowsFromHuggingfaceCreateErrors, ModelHubDevelopsAddRowsFromHuggingfaceCreateResponse, ModelHubDevelopsAddRowsFromHuggingfaceCreateResponses, ModelHubDevelopsAddRowsSdkCreateData, ModelHubDevelopsAddRowsSdkCreateError, ModelHubDevelopsAddRowsSdkCreateErrors, ModelHubDevelopsAddRowsSdkCreateResponse, ModelHubDevelopsAddRowsSdkCreateResponses, ModelHubDevelopsAddRunPromptColumnCreateData, ModelHubDevelopsAddRunPromptColumnCreateError, ModelHubDevelopsAddRunPromptColumnCreateErrors, ModelHubDevelopsAddRunPromptColumnCreateResponse, ModelHubDevelopsAddRunPromptColumnCreateResponses, ModelHubDevelopsAddStaticColumnCreateData, ModelHubDevelopsAddStaticColumnCreateError, ModelHubDevelopsAddStaticColumnCreateErrors, ModelHubDevelopsAddStaticColumnCreateResponse, ModelHubDevelopsAddStaticColumnCreateResponses, ModelHubDevelopsAddSyntheticDataCreateData, ModelHubDevelopsAddSyntheticDataCreateError, ModelHubDevelopsAddSyntheticDataCreateErrors, ModelHubDevelopsAddSyntheticDataCreateResponse, ModelHubDevelopsAddSyntheticDataCreateResponses, ModelHubDevelopsAddUserEvalCreateData, ModelHubDevelopsAddUserEvalCreateError, ModelHubDevelopsAddUserEvalCreateErrors, ModelHubDevelopsAddUserEvalCreateResponse, ModelHubDevelopsAddUserEvalCreateResponses, ModelHubDevelopsCloneDatasetCreateData, ModelHubDevelopsCloneDatasetCreateError, ModelHubDevelopsCloneDatasetCreateErrors, ModelHubDevelopsCloneDatasetCreateResponse, ModelHubDevelopsCloneDatasetCreateResponses, ModelHubDevelopsCreateDatasetCreateData, ModelHubDevelopsCreateDatasetCreateError, ModelHubDevelopsCreateDatasetCreateErrors, ModelHubDevelopsCreateDatasetCreateResponse, ModelHubDevelopsCreateDatasetCreateResponses, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateData, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateError, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateErrors, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateResponse, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateResponses, ModelHubDevelopsCreateSyntheticDatasetCreateData, ModelHubDevelopsCreateSyntheticDatasetCreateError, ModelHubDevelopsCreateSyntheticDatasetCreateErrors, ModelHubDevelopsCreateSyntheticDatasetCreateResponse, ModelHubDevelopsCreateSyntheticDatasetCreateResponses, ModelHubDevelopsDatasetCreationProgressReadData, ModelHubDevelopsDatasetCreationProgressReadError, ModelHubDevelopsDatasetCreationProgressReadErrors, ModelHubDevelopsDatasetCreationProgressReadResponse, ModelHubDevelopsDatasetCreationProgressReadResponses, ModelHubDevelopsDeleteDatasetDeleteData, ModelHubDevelopsDeleteDatasetDeleteError, ModelHubDevelopsDeleteDatasetDeleteErrors, ModelHubDevelopsDeleteDatasetDeleteResponse, ModelHubDevelopsDeleteDatasetDeleteResponses, ModelHubDevelopsDeleteTemplateEvalDeleteData, ModelHubDevelopsDeleteTemplateEvalDeleteError, ModelHubDevelopsDeleteTemplateEvalDeleteErrors, ModelHubDevelopsDeleteTemplateEvalDeleteResponse, ModelHubDevelopsDeleteTemplateEvalDeleteResponses, ModelHubDevelopsDeleteUserEvalDeleteData, ModelHubDevelopsDeleteUserEvalDeleteError, ModelHubDevelopsDeleteUserEvalDeleteErrors, ModelHubDevelopsDeleteUserEvalDeleteResponse, ModelHubDevelopsDeleteUserEvalDeleteResponses, ModelHubDevelopsEditAndRunUserEvalCreateData, ModelHubDevelopsEditAndRunUserEvalCreateError, ModelHubDevelopsEditAndRunUserEvalCreateErrors, ModelHubDevelopsEditAndRunUserEvalCreateResponse, ModelHubDevelopsEditAndRunUserEvalCreateResponses, ModelHubDevelopsEditDatasetBehaviorUpdateData, ModelHubDevelopsEditDatasetBehaviorUpdateError, ModelHubDevelopsEditDatasetBehaviorUpdateErrors, ModelHubDevelopsEditDatasetBehaviorUpdateResponse, ModelHubDevelopsEditDatasetBehaviorUpdateResponses, ModelHubDevelopsEditRunPromptColumnCreateData, ModelHubDevelopsEditRunPromptColumnCreateError, ModelHubDevelopsEditRunPromptColumnCreateErrors, ModelHubDevelopsEditRunPromptColumnCreateResponse, ModelHubDevelopsEditRunPromptColumnCreateResponses, ModelHubDevelopsExtractJsonColumnCreateData, ModelHubDevelopsExtractJsonColumnCreateError, ModelHubDevelopsExtractJsonColumnCreateErrors, ModelHubDevelopsExtractJsonColumnCreateResponse, ModelHubDevelopsExtractJsonColumnCreateResponses, ModelHubDevelopsGetCellDataCreateData, ModelHubDevelopsGetCellDataCreateError, ModelHubDevelopsGetCellDataCreateErrors, ModelHubDevelopsGetCellDataCreateResponse, ModelHubDevelopsGetCellDataCreateResponses, ModelHubDevelopsGetDerivedDatasetsReadData, ModelHubDevelopsGetDerivedDatasetsReadError, ModelHubDevelopsGetDerivedDatasetsReadErrors, ModelHubDevelopsGetDerivedDatasetsReadResponse, ModelHubDevelopsGetDerivedDatasetsReadResponses, ModelHubDevelopsGetEvalsListListData, ModelHubDevelopsGetEvalsListListError, ModelHubDevelopsGetEvalsListListErrors, ModelHubDevelopsGetEvalsListListResponse, ModelHubDevelopsGetEvalsListListResponses, ModelHubDevelopsGetEvalStructureReadData, ModelHubDevelopsGetEvalStructureReadError, ModelHubDevelopsGetEvalStructureReadErrors, ModelHubDevelopsGetEvalStructureReadResponse, ModelHubDevelopsGetEvalStructureReadResponses, ModelHubDevelopsGetExperimentDatasetTableListData, ModelHubDevelopsGetExperimentDatasetTableListError, ModelHubDevelopsGetExperimentDatasetTableListErrors, ModelHubDevelopsGetExperimentDatasetTableListResponse, ModelHubDevelopsGetExperimentDatasetTableListResponses, ModelHubDevelopsGetFunctionListListData, ModelHubDevelopsGetFunctionListListError, ModelHubDevelopsGetFunctionListListErrors, ModelHubDevelopsGetFunctionListListResponse, ModelHubDevelopsGetFunctionListListResponses, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateData, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateError, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateErrors, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateResponse, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateResponses, ModelHubDevelopsGetRowDiffCreateData, ModelHubDevelopsGetRowDiffCreateError, ModelHubDevelopsGetRowDiffCreateErrors, ModelHubDevelopsGetRowDiffCreateResponse, ModelHubDevelopsGetRowDiffCreateResponses, ModelHubDevelopsPreviewRunEvalCreateData, ModelHubDevelopsPreviewRunEvalCreateError, ModelHubDevelopsPreviewRunEvalCreateErrors, ModelHubDevelopsPreviewRunEvalCreateResponse, ModelHubDevelopsPreviewRunEvalCreateResponses, ModelHubDevelopsPreviewRunPromptColumnCreateData, ModelHubDevelopsPreviewRunPromptColumnCreateError, ModelHubDevelopsPreviewRunPromptColumnCreateErrors, ModelHubDevelopsPreviewRunPromptColumnCreateResponse, ModelHubDevelopsPreviewRunPromptColumnCreateResponses, ModelHubDevelopsProviderStatusListData, ModelHubDevelopsProviderStatusListError, ModelHubDevelopsProviderStatusListErrors, ModelHubDevelopsProviderStatusListResponse, ModelHubDevelopsProviderStatusListResponses, ModelHubDevelopsRetrieveRunPromptColumnConfigListData, ModelHubDevelopsRetrieveRunPromptColumnConfigListError, ModelHubDevelopsRetrieveRunPromptColumnConfigListErrors, ModelHubDevelopsRetrieveRunPromptColumnConfigListResponse, ModelHubDevelopsRetrieveRunPromptColumnConfigListResponses, ModelHubDevelopsRetrieveRunPromptOptionsListData, ModelHubDevelopsRetrieveRunPromptOptionsListError, ModelHubDevelopsRetrieveRunPromptOptionsListErrors, ModelHubDevelopsRetrieveRunPromptOptionsListResponse, ModelHubDevelopsRetrieveRunPromptOptionsListResponses, ModelHubDevelopsStartEvalsProcessCreateData, ModelHubDevelopsStartEvalsProcessCreateError, ModelHubDevelopsStartEvalsProcessCreateErrors, ModelHubDevelopsStartEvalsProcessCreateResponse, ModelHubDevelopsStartEvalsProcessCreateResponses, ModelHubDevelopsStopUserEvalCreateData, ModelHubDevelopsStopUserEvalCreateError, ModelHubDevelopsStopUserEvalCreateErrors, ModelHubDevelopsStopUserEvalCreateResponse, ModelHubDevelopsStopUserEvalCreateResponses, ModelHubDevelopsSyntheticConfigListData, ModelHubDevelopsSyntheticConfigListError, ModelHubDevelopsSyntheticConfigListErrors, ModelHubDevelopsSyntheticConfigListResponse, ModelHubDevelopsSyntheticConfigListResponses, ModelHubDevelopsUpdateColumnNameUpdateData, ModelHubDevelopsUpdateColumnNameUpdateError, ModelHubDevelopsUpdateColumnNameUpdateErrors, ModelHubDevelopsUpdateColumnNameUpdateResponse, ModelHubDevelopsUpdateColumnNameUpdateResponses, ModelHubDevelopsUpdateColumnTypeUpdateData, ModelHubDevelopsUpdateColumnTypeUpdateError, ModelHubDevelopsUpdateColumnTypeUpdateErrors, ModelHubDevelopsUpdateColumnTypeUpdateResponse, ModelHubDevelopsUpdateColumnTypeUpdateResponses, ModelHubDevelopsUpdateSyntheticConfigUpdateData, ModelHubDevelopsUpdateSyntheticConfigUpdateError, ModelHubDevelopsUpdateSyntheticConfigUpdateErrors, ModelHubDevelopsUpdateSyntheticConfigUpdateResponse, ModelHubDevelopsUpdateSyntheticConfigUpdateResponses, ModelHubEmptyRequest, ModelHubEmptyRequest2, ModelHubEmptyRequestWritable, ModelHubErrorResponse, ModelHubEvalTemplatesBulkDeleteCreateData, ModelHubEvalTemplatesBulkDeleteCreateError, ModelHubEvalTemplatesBulkDeleteCreateErrors, ModelHubEvalTemplatesBulkDeleteCreateResponse, ModelHubEvalTemplatesBulkDeleteCreateResponses, ModelHubEvalTemplatesCompositeExecuteAdhocCreateData, ModelHubEvalTemplatesCompositeExecuteAdhocCreateError, ModelHubEvalTemplatesCompositeExecuteAdhocCreateErrors, ModelHubEvalTemplatesCompositeExecuteAdhocCreateResponse, ModelHubEvalTemplatesCompositeExecuteAdhocCreateResponses, ModelHubEvalTemplatesCompositeExecuteCreateData, ModelHubEvalTemplatesCompositeExecuteCreateError, ModelHubEvalTemplatesCompositeExecuteCreateErrors, ModelHubEvalTemplatesCompositeExecuteCreateResponse, ModelHubEvalTemplatesCompositeExecuteCreateResponses, ModelHubEvalTemplatesCompositeListData, ModelHubEvalTemplatesCompositeListError, ModelHubEvalTemplatesCompositeListErrors, ModelHubEvalTemplatesCompositeListResponse, ModelHubEvalTemplatesCompositeListResponses, ModelHubEvalTemplatesCompositePartialUpdateData, ModelHubEvalTemplatesCompositePartialUpdateError, ModelHubEvalTemplatesCompositePartialUpdateErrors, ModelHubEvalTemplatesCompositePartialUpdateResponse, ModelHubEvalTemplatesCompositePartialUpdateResponses, ModelHubEvalTemplatesCreateCompositeCreateData, ModelHubEvalTemplatesCreateCompositeCreateError, ModelHubEvalTemplatesCreateCompositeCreateErrors, ModelHubEvalTemplatesCreateCompositeCreateResponse, ModelHubEvalTemplatesCreateCompositeCreateResponses, ModelHubEvalTemplatesCreateV2CreateData, ModelHubEvalTemplatesCreateV2CreateError, ModelHubEvalTemplatesCreateV2CreateErrors, ModelHubEvalTemplatesCreateV2CreateResponse, ModelHubEvalTemplatesCreateV2CreateResponses, ModelHubEvalTemplatesDetailListData, ModelHubEvalTemplatesDetailListError, ModelHubEvalTemplatesDetailListErrors, ModelHubEvalTemplatesDetailListResponse, ModelHubEvalTemplatesDetailListResponses, ModelHubEvalTemplatesFeedbackListListData, ModelHubEvalTemplatesFeedbackListListError, ModelHubEvalTemplatesFeedbackListListErrors, ModelHubEvalTemplatesFeedbackListListResponse, ModelHubEvalTemplatesFeedbackListListResponses, ModelHubEvalTemplatesGroundTruthConfigListData, ModelHubEvalTemplatesGroundTruthConfigListError, ModelHubEvalTemplatesGroundTruthConfigListErrors, ModelHubEvalTemplatesGroundTruthConfigListResponse, ModelHubEvalTemplatesGroundTruthConfigListResponses, ModelHubEvalTemplatesGroundTruthConfigUpdateData, ModelHubEvalTemplatesGroundTruthConfigUpdateError, ModelHubEvalTemplatesGroundTruthConfigUpdateErrors, ModelHubEvalTemplatesGroundTruthConfigUpdateResponse, ModelHubEvalTemplatesGroundTruthConfigUpdateResponses, ModelHubEvalTemplatesGroundTruthListData, ModelHubEvalTemplatesGroundTruthListError, ModelHubEvalTemplatesGroundTruthListErrors, ModelHubEvalTemplatesGroundTruthListResponse, ModelHubEvalTemplatesGroundTruthListResponses, ModelHubEvalTemplatesGroundTruthUploadCreateData, ModelHubEvalTemplatesGroundTruthUploadCreateError, ModelHubEvalTemplatesGroundTruthUploadCreateErrors, ModelHubEvalTemplatesGroundTruthUploadCreateResponse, ModelHubEvalTemplatesGroundTruthUploadCreateResponses, ModelHubEvalTemplatesListChartsCreateData, ModelHubEvalTemplatesListChartsCreateError, ModelHubEvalTemplatesListChartsCreateErrors, ModelHubEvalTemplatesListChartsCreateResponse, ModelHubEvalTemplatesListChartsCreateResponses, ModelHubEvalTemplatesListCreateData, ModelHubEvalTemplatesListCreateError, ModelHubEvalTemplatesListCreateErrors, ModelHubEvalTemplatesListCreateResponse, ModelHubEvalTemplatesListCreateResponses, ModelHubEvalTemplatesUpdateUpdateData, ModelHubEvalTemplatesUpdateUpdateError, ModelHubEvalTemplatesUpdateUpdateErrors, ModelHubEvalTemplatesUpdateUpdateResponse, ModelHubEvalTemplatesUpdateUpdateResponses, ModelHubEvalTemplatesUsageListData, ModelHubEvalTemplatesUsageListError, ModelHubEvalTemplatesUsageListErrors, ModelHubEvalTemplatesUsageListResponse, ModelHubEvalTemplatesUsageListResponses, ModelHubEvalTemplatesVersionsCreateCreateData, ModelHubEvalTemplatesVersionsCreateCreateError, ModelHubEvalTemplatesVersionsCreateCreateErrors, ModelHubEvalTemplatesVersionsCreateCreateResponse, ModelHubEvalTemplatesVersionsCreateCreateResponses, ModelHubEvalTemplatesVersionsListData, ModelHubEvalTemplatesVersionsListError, ModelHubEvalTemplatesVersionsListErrors, ModelHubEvalTemplatesVersionsListResponse, ModelHubEvalTemplatesVersionsListResponses, ModelHubEvalTemplatesVersionsRestoreCreateData, ModelHubEvalTemplatesVersionsRestoreCreateError, ModelHubEvalTemplatesVersionsRestoreCreateErrors, ModelHubEvalTemplatesVersionsRestoreCreateResponse, ModelHubEvalTemplatesVersionsRestoreCreateResponses, ModelHubEvalTemplatesVersionsSetDefaultUpdateData, ModelHubEvalTemplatesVersionsSetDefaultUpdateError, ModelHubEvalTemplatesVersionsSetDefaultUpdateErrors, ModelHubEvalTemplatesVersionsSetDefaultUpdateResponse, ModelHubEvalTemplatesVersionsSetDefaultUpdateResponses, ModelHubExperimentsV2DerivedVariablesListData, ModelHubExperimentsV2DerivedVariablesListError, ModelHubExperimentsV2DerivedVariablesListErrors, ModelHubExperimentsV2DerivedVariablesListResponse, ModelHubExperimentsV2DerivedVariablesListResponses, ModelHubExperimentsV2EvaluationsStatsListData, ModelHubExperimentsV2EvaluationsStatsListError, ModelHubExperimentsV2EvaluationsStatsListErrors, ModelHubExperimentsV2EvaluationsStatsListResponse, ModelHubExperimentsV2EvaluationsStatsListResponses, ModelHubExperimentsV2FeedbackCreateData, ModelHubExperimentsV2FeedbackCreateError, ModelHubExperimentsV2FeedbackCreateErrors, ModelHubExperimentsV2FeedbackCreateResponse, ModelHubExperimentsV2FeedbackCreateResponses, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListData, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListError, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListErrors, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListResponse, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListResponses, ModelHubExperimentsV2FeedbackGetTemplateListData, ModelHubExperimentsV2FeedbackGetTemplateListError, ModelHubExperimentsV2FeedbackGetTemplateListErrors, ModelHubExperimentsV2FeedbackGetTemplateListResponse, ModelHubExperimentsV2FeedbackGetTemplateListResponses, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateData, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateError, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateErrors, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateResponse, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateResponses, ModelHubExperimentsV2RerunCellsCreateData, ModelHubExperimentsV2RerunCellsCreateError, ModelHubExperimentsV2RerunCellsCreateErrors, ModelHubExperimentsV2RerunCellsCreateResponse, ModelHubExperimentsV2RerunCellsCreateResponses, ModelHubExperimentsV2RowDiffCreateData, ModelHubExperimentsV2RowDiffCreateError, ModelHubExperimentsV2RowDiffCreateErrors, ModelHubExperimentsV2RowDiffCreateResponse, ModelHubExperimentsV2RowDiffCreateResponses, ModelHubExperimentsV2SuggestNameReadData, ModelHubExperimentsV2SuggestNameReadError, ModelHubExperimentsV2SuggestNameReadErrors, ModelHubExperimentsV2SuggestNameReadResponse, ModelHubExperimentsV2SuggestNameReadResponses, ModelHubExperimentsV2ValidateNameListData, ModelHubExperimentsV2ValidateNameListError, ModelHubExperimentsV2ValidateNameListErrors, ModelHubExperimentsV2ValidateNameListResponse, ModelHubExperimentsV2ValidateNameListResponses, ModelHubKnowledgeBaseCreateData, ModelHubKnowledgeBaseCreateError, ModelHubKnowledgeBaseCreateErrors, ModelHubKnowledgeBaseCreateResponse, ModelHubKnowledgeBaseCreateResponses, ModelHubKnowledgeBaseDeleteData, ModelHubKnowledgeBaseDeleteError, ModelHubKnowledgeBaseDeleteErrors, ModelHubKnowledgeBaseDeleteResponse, ModelHubKnowledgeBaseDeleteResponses, ModelHubKnowledgeBaseFilesCreateData, ModelHubKnowledgeBaseFilesCreateError, ModelHubKnowledgeBaseFilesCreateErrors, ModelHubKnowledgeBaseFilesCreateResponse, ModelHubKnowledgeBaseFilesCreateResponses, ModelHubKnowledgeBaseFilesDeleteData, ModelHubKnowledgeBaseFilesDeleteError, ModelHubKnowledgeBaseFilesDeleteErrors, ModelHubKnowledgeBaseFilesDeleteResponse, ModelHubKnowledgeBaseFilesDeleteResponses, ModelHubKnowledgeBaseGetListData, ModelHubKnowledgeBaseGetListError, ModelHubKnowledgeBaseGetListErrors, ModelHubKnowledgeBaseGetListResponse, ModelHubKnowledgeBaseGetListResponses, ModelHubKnowledgeBaseListData, ModelHubKnowledgeBaseListError, ModelHubKnowledgeBaseListErrors, ModelHubKnowledgeBaseListListData, ModelHubKnowledgeBaseListListError, ModelHubKnowledgeBaseListListErrors, ModelHubKnowledgeBaseListListResponse, ModelHubKnowledgeBaseListListResponses, ModelHubKnowledgeBaseListResponse, ModelHubKnowledgeBaseListResponses, ModelHubKnowledgeBasePartialUpdateData, ModelHubKnowledgeBasePartialUpdateError, ModelHubKnowledgeBasePartialUpdateErrors, ModelHubKnowledgeBasePartialUpdateResponse, ModelHubKnowledgeBasePartialUpdateResponses, ModelHubPaginatedResponse, ModelHubPromptHistoryExecutionsGetExecutionDetailsData, ModelHubPromptHistoryExecutionsGetExecutionDetailsError, ModelHubPromptHistoryExecutionsGetExecutionDetailsErrors, ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse, ModelHubPromptHistoryExecutionsGetExecutionDetailsResponses, ModelHubPromptHistoryExecutionsListData, ModelHubPromptHistoryExecutionsListError, ModelHubPromptHistoryExecutionsListErrors, ModelHubPromptHistoryExecutionsListResponse, ModelHubPromptHistoryExecutionsListResponses, ModelHubPromptHistoryExecutionsReadData, ModelHubPromptHistoryExecutionsReadError, ModelHubPromptHistoryExecutionsReadErrors, ModelHubPromptHistoryExecutionsReadResponse, ModelHubPromptHistoryExecutionsReadResponses, ModelHubPromptLabelsAssignLabelByIdData, ModelHubPromptLabelsAssignLabelByIdError, ModelHubPromptLabelsAssignLabelByIdErrors, ModelHubPromptLabelsAssignLabelByIdResponse, ModelHubPromptLabelsAssignLabelByIdResponses, ModelHubPromptLabelsAssignMultipleLabelsData, ModelHubPromptLabelsAssignMultipleLabelsError, ModelHubPromptLabelsAssignMultipleLabelsErrors, ModelHubPromptLabelsAssignMultipleLabelsResponse, ModelHubPromptLabelsAssignMultipleLabelsResponses, ModelHubPromptLabelsCreateData, ModelHubPromptLabelsCreateError, ModelHubPromptLabelsCreateErrors, ModelHubPromptLabelsCreateResponse, ModelHubPromptLabelsCreateResponses, ModelHubPromptLabelsCreateSystemLabelsData, ModelHubPromptLabelsCreateSystemLabelsError, ModelHubPromptLabelsCreateSystemLabelsErrors, ModelHubPromptLabelsCreateSystemLabelsResponse, ModelHubPromptLabelsCreateSystemLabelsResponses, ModelHubPromptLabelsDeleteData, ModelHubPromptLabelsDeleteError, ModelHubPromptLabelsDeleteErrors, ModelHubPromptLabelsDeleteResponse, ModelHubPromptLabelsDeleteResponses, ModelHubPromptLabelsGetByNameData, ModelHubPromptLabelsGetByNameError, ModelHubPromptLabelsGetByNameErrors, ModelHubPromptLabelsGetByNameResponse, ModelHubPromptLabelsGetByNameResponses, ModelHubPromptLabelsListData, ModelHubPromptLabelsListError, ModelHubPromptLabelsListErrors, ModelHubPromptLabelsListResponse, ModelHubPromptLabelsListResponses, ModelHubPromptLabelsPartialUpdateData, ModelHubPromptLabelsPartialUpdateError, ModelHubPromptLabelsPartialUpdateErrors, ModelHubPromptLabelsPartialUpdateResponse, ModelHubPromptLabelsPartialUpdateResponses, ModelHubPromptLabelsReadData, ModelHubPromptLabelsReadError, ModelHubPromptLabelsReadErrors, ModelHubPromptLabelsReadResponse, ModelHubPromptLabelsReadResponses, ModelHubPromptLabelsRemoveLabelFromVersionData, ModelHubPromptLabelsRemoveLabelFromVersionError, ModelHubPromptLabelsRemoveLabelFromVersionErrors, ModelHubPromptLabelsRemoveLabelFromVersionResponse, ModelHubPromptLabelsRemoveLabelFromVersionResponses, ModelHubPromptLabelsSetDefaultData, ModelHubPromptLabelsSetDefaultError, ModelHubPromptLabelsSetDefaultErrors, ModelHubPromptLabelsSetDefaultResponse, ModelHubPromptLabelsSetDefaultResponses, ModelHubPromptLabelsTemplateLabelsData, ModelHubPromptLabelsTemplateLabelsError, ModelHubPromptLabelsTemplateLabelsErrors, ModelHubPromptLabelsTemplateLabelsResponse, ModelHubPromptLabelsTemplateLabelsResponses, ModelHubPromptLabelsUpdateData, ModelHubPromptLabelsUpdateError, ModelHubPromptLabelsUpdateErrors, ModelHubPromptLabelsUpdateResponse, ModelHubPromptLabelsUpdateResponses, ModelHubPromptTemplatesAddNewDraftData, ModelHubPromptTemplatesAddNewDraftError, ModelHubPromptTemplatesAddNewDraftErrors, ModelHubPromptTemplatesAddNewDraftResponse, ModelHubPromptTemplatesAddNewDraftResponses, ModelHubPromptTemplatesAnalyzePromptData, ModelHubPromptTemplatesAnalyzePromptError, ModelHubPromptTemplatesAnalyzePromptErrors, ModelHubPromptTemplatesAnalyzePromptResponse, ModelHubPromptTemplatesAnalyzePromptResponses, ModelHubPromptTemplatesBulkDeleteData, ModelHubPromptTemplatesBulkDeleteError, ModelHubPromptTemplatesBulkDeleteErrors, ModelHubPromptTemplatesBulkDeleteResponse, ModelHubPromptTemplatesBulkDeleteResponses, ModelHubPromptTemplatesCommitData, ModelHubPromptTemplatesCommitError, ModelHubPromptTemplatesCommitErrors, ModelHubPromptTemplatesCommitResponse, ModelHubPromptTemplatesCommitResponses, ModelHubPromptTemplatesCompareVersionsData, ModelHubPromptTemplatesCompareVersionsError, ModelHubPromptTemplatesCompareVersionsErrors, ModelHubPromptTemplatesCompareVersionsResponse, ModelHubPromptTemplatesCompareVersionsResponses, ModelHubPromptTemplatesCreateData, ModelHubPromptTemplatesCreateDraftData, ModelHubPromptTemplatesCreateDraftError, ModelHubPromptTemplatesCreateDraftErrors, ModelHubPromptTemplatesCreateDraftResponse, ModelHubPromptTemplatesCreateDraftResponses, ModelHubPromptTemplatesCreateError, ModelHubPromptTemplatesCreateErrors, ModelHubPromptTemplatesCreateResponse, ModelHubPromptTemplatesCreateResponses, ModelHubPromptTemplatesDeleteData, ModelHubPromptTemplatesDeleteError, ModelHubPromptTemplatesDeleteErrors, ModelHubPromptTemplatesDeleteEvaluationConfigData, ModelHubPromptTemplatesDeleteEvaluationConfigError, ModelHubPromptTemplatesDeleteEvaluationConfigErrors, ModelHubPromptTemplatesDeleteEvaluationConfigResponse, ModelHubPromptTemplatesDeleteEvaluationConfigResponses, ModelHubPromptTemplatesDeleteResponse, ModelHubPromptTemplatesDeleteResponses, ModelHubPromptTemplatesDerivedVariablesExtractCreateData, ModelHubPromptTemplatesDerivedVariablesExtractCreateError, ModelHubPromptTemplatesDerivedVariablesExtractCreateErrors, ModelHubPromptTemplatesDerivedVariablesExtractCreateResponse, ModelHubPromptTemplatesDerivedVariablesExtractCreateResponses, ModelHubPromptTemplatesDerivedVariablesListData, ModelHubPromptTemplatesDerivedVariablesListError, ModelHubPromptTemplatesDerivedVariablesListErrors, ModelHubPromptTemplatesDerivedVariablesListResponse, ModelHubPromptTemplatesDerivedVariablesListResponses, ModelHubPromptTemplatesDerivedVariablesPreviewCreateData, ModelHubPromptTemplatesDerivedVariablesPreviewCreateError, ModelHubPromptTemplatesDerivedVariablesPreviewCreateErrors, ModelHubPromptTemplatesDerivedVariablesPreviewCreateResponse, ModelHubPromptTemplatesDerivedVariablesPreviewCreateResponses, ModelHubPromptTemplatesDerivedVariablesSchemaListData, ModelHubPromptTemplatesDerivedVariablesSchemaListError, ModelHubPromptTemplatesDerivedVariablesSchemaListErrors, ModelHubPromptTemplatesDerivedVariablesSchemaListResponse, ModelHubPromptTemplatesDerivedVariablesSchemaListResponses, ModelHubPromptTemplatesGeneratePromptData, ModelHubPromptTemplatesGeneratePromptError, ModelHubPromptTemplatesGeneratePromptErrors, ModelHubPromptTemplatesGeneratePromptResponse, ModelHubPromptTemplatesGeneratePromptResponses, ModelHubPromptTemplatesGenerateVariablesData, ModelHubPromptTemplatesGenerateVariablesError, ModelHubPromptTemplatesGenerateVariablesErrors, ModelHubPromptTemplatesGenerateVariablesResponse, ModelHubPromptTemplatesGenerateVariablesResponses, ModelHubPromptTemplatesGetAllVariablesData, ModelHubPromptTemplatesGetAllVariablesError, ModelHubPromptTemplatesGetAllVariablesErrors, ModelHubPromptTemplatesGetAllVariablesResponse, ModelHubPromptTemplatesGetAllVariablesResponses, ModelHubPromptTemplatesGetEvaluationConfigsData, ModelHubPromptTemplatesGetEvaluationConfigsError, ModelHubPromptTemplatesGetEvaluationConfigsErrors, ModelHubPromptTemplatesGetEvaluationConfigsResponse, ModelHubPromptTemplatesGetEvaluationConfigsResponses, ModelHubPromptTemplatesGetNextVersionData, ModelHubPromptTemplatesGetNextVersionError, ModelHubPromptTemplatesGetNextVersionErrors, ModelHubPromptTemplatesGetNextVersionResponse, ModelHubPromptTemplatesGetNextVersionResponses, ModelHubPromptTemplatesGetRunStatusData, ModelHubPromptTemplatesGetRunStatusError, ModelHubPromptTemplatesGetRunStatusErrors, ModelHubPromptTemplatesGetRunStatusResponse, ModelHubPromptTemplatesGetRunStatusResponses, ModelHubPromptTemplatesGetSdkCodeData, ModelHubPromptTemplatesGetSdkCodeError, ModelHubPromptTemplatesGetSdkCodeErrors, ModelHubPromptTemplatesGetSdkCodeResponse, ModelHubPromptTemplatesGetSdkCodeResponses, ModelHubPromptTemplatesGetTemplateByNameData, ModelHubPromptTemplatesGetTemplateByNameError, ModelHubPromptTemplatesGetTemplateByNameErrors, ModelHubPromptTemplatesGetTemplateByNameResponse, ModelHubPromptTemplatesGetTemplateByNameResponses, ModelHubPromptTemplatesImprovePromptData, ModelHubPromptTemplatesImprovePromptError, ModelHubPromptTemplatesImprovePromptErrors, ModelHubPromptTemplatesImprovePromptResponse, ModelHubPromptTemplatesImprovePromptResponses, ModelHubPromptTemplatesListData, ModelHubPromptTemplatesListError, ModelHubPromptTemplatesListErrors, ModelHubPromptTemplatesListResponse, ModelHubPromptTemplatesListResponses, ModelHubPromptTemplatesPartialUpdateData, ModelHubPromptTemplatesPartialUpdateError, ModelHubPromptTemplatesPartialUpdateErrors, ModelHubPromptTemplatesPartialUpdateResponse, ModelHubPromptTemplatesPartialUpdateResponses, ModelHubPromptTemplatesReadData, ModelHubPromptTemplatesReadError, ModelHubPromptTemplatesReadErrors, ModelHubPromptTemplatesReadResponse, ModelHubPromptTemplatesReadResponses, ModelHubPromptTemplatesRetrieveEvaluationsData, ModelHubPromptTemplatesRetrieveEvaluationsError, ModelHubPromptTemplatesRetrieveEvaluationsErrors, ModelHubPromptTemplatesRetrieveEvaluationsResponse, ModelHubPromptTemplatesRetrieveEvaluationsResponses, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsData, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsError, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsErrors, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsResponse, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsResponses, ModelHubPromptTemplatesRunTemplateData, ModelHubPromptTemplatesRunTemplateError, ModelHubPromptTemplatesRunTemplateErrors, ModelHubPromptTemplatesRunTemplateResponse, ModelHubPromptTemplatesRunTemplateResponses, ModelHubPromptTemplatesSaveNameData, ModelHubPromptTemplatesSaveNameError, ModelHubPromptTemplatesSaveNameErrors, ModelHubPromptTemplatesSaveNameResponse, ModelHubPromptTemplatesSaveNameResponses, ModelHubPromptTemplatesSavePromptFolderData, ModelHubPromptTemplatesSavePromptFolderError, ModelHubPromptTemplatesSavePromptFolderErrors, ModelHubPromptTemplatesSavePromptFolderResponse, ModelHubPromptTemplatesSavePromptFolderResponses, ModelHubPromptTemplatesSetDefaultData, ModelHubPromptTemplatesSetDefaultError, ModelHubPromptTemplatesSetDefaultErrors, ModelHubPromptTemplatesSetDefaultResponse, ModelHubPromptTemplatesSetDefaultResponses, ModelHubPromptTemplatesStopStreamingData, ModelHubPromptTemplatesStopStreamingError, ModelHubPromptTemplatesStopStreamingErrors, ModelHubPromptTemplatesStopStreamingResponse, ModelHubPromptTemplatesStopStreamingResponses, ModelHubPromptTemplatesUpdateData, ModelHubPromptTemplatesUpdateError, ModelHubPromptTemplatesUpdateErrors, ModelHubPromptTemplatesUpdateEvaluationConfigsData, ModelHubPromptTemplatesUpdateEvaluationConfigsError, ModelHubPromptTemplatesUpdateEvaluationConfigsErrors, ModelHubPromptTemplatesUpdateEvaluationConfigsResponse, ModelHubPromptTemplatesUpdateEvaluationConfigsResponses, ModelHubPromptTemplatesUpdateResponse, ModelHubPromptTemplatesUpdateResponses, ModelHubPromptTemplatesVersionsData, ModelHubPromptTemplatesVersionsError, ModelHubPromptTemplatesVersionsErrors, ModelHubPromptTemplatesVersionsResponse, ModelHubPromptTemplatesVersionsResponses, ModelHubScoresBulkCreateData, ModelHubScoresBulkCreateError, ModelHubScoresBulkCreateErrors, ModelHubScoresBulkCreateResponse, ModelHubScoresBulkCreateResponses, ModelHubScoresCreateData, ModelHubScoresCreateError, ModelHubScoresCreateErrors, ModelHubScoresCreateResponse, ModelHubScoresCreateResponses, ModelHubScoresDeleteData, ModelHubScoresDeleteError, ModelHubScoresDeleteErrors, ModelHubScoresDeleteResponse, ModelHubScoresDeleteResponses, ModelHubScoresForSourceData, ModelHubScoresForSourceError, ModelHubScoresForSourceErrors, ModelHubScoresForSourceResponse, ModelHubScoresForSourceResponses, ModelHubScoresListData, ModelHubScoresListError, ModelHubScoresListErrors, ModelHubScoresListResponse, ModelHubScoresListResponses, ModelHubScoresPartialUpdateData, ModelHubScoresPartialUpdateError, ModelHubScoresPartialUpdateErrors, ModelHubScoresPartialUpdateResponse, ModelHubScoresPartialUpdateResponses, ModelHubScoresReadData, ModelHubScoresReadError, ModelHubScoresReadErrors, ModelHubScoresReadResponse, ModelHubScoresReadResponses, ModelHubScoresUpdateData, ModelHubScoresUpdateError, ModelHubScoresUpdateErrors, ModelHubScoresUpdateResponse, ModelHubScoresUpdateResponses, ModelHubStringResultResponse, ModelHubTextErrorResponse, ObserveGraphDataPoint, ObserveGraphDataRequest, ObserveGraphDataRequest2, ObserveGraphDataResponse, ObserveGraphDataResult, OptimiserAnalysisRefreshResponse, OptimiserAnalysisRefreshResult, OptimiserAnalysisResponse, OptimiserAnalysisResultPayload, Organization, OrganizationWritable, OverviewApiResponse, OverviewResponse, PatternInsight, PatternSummary, PerformanceSummary, Persona, Persona2, PersonaCreate, PersonaDuplicateRequest, PersonaDuplicateRequest2, PersonaDuplicateResponse, PersonaDuplicateResponseWritable, PersonaFieldOptions, PersonaList, PersonaWritable, PreviewAlertGraphData, PreviewAlertGraphError, PreviewAlertGraphErrors, PreviewAlertGraphResponse, PreviewAlertGraphResponses, PreviewDatasetOperationRequest, PreviewDatasetOperationResponse, PreviewDatasetOperationResult, PreviewDatasetOperationResultItem, PreviewRunEvalRequest, PreviewRunPrompt, Project, ProjectWritable, PromptConfig, PromptConfigEntry, PromptDerivedVariablesResponse, PromptDerivedVariablesResult, PromptHistoryExecution, PromptHistoryExecutionWritable, PromptLabel, PromptLabel2, PromptLabelWritable, PromptSimulationListResponse, PromptSimulationListResponseWritable, PromptSimulationListResult, PromptSimulationListResultWritable, PromptSimulationRunResponse, PromptSimulationRunResponseWritable, PromptSimulationScenarioItem, PromptSimulationScenariosResponse, PromptSimulationScenariosResponseWritable, PromptSimulationScenariosResult, PromptSimulationTemplateSummary, PromptSimulationUpdateRequest, PromptTemplate, PromptTemplate2, PromptTemplateWritable, ProviderStatusItem, ProviderStatusResponse, ProviderStatusResult, QueueAddItemsResponse, QueueAddItemsResult, QueueAddLabelResponse, QueueAddLabelResult, QueueAgreementAnnotatorPair, QueueAgreementLabel, QueueAgreementResponse, QueueAgreementResult, QueueAnalyticsAnnotatorPerformance, QueueAnalyticsResponse, QueueAnalyticsResult, QueueAnalyticsThroughput, QueueAnalyticsThroughputDaily, QueueAnnotateDetailResponse, QueueAnnotateDetailResult, QueueAnnotatorNested, QueueAnnotatorNestedWritable, QueueAssignItemsResponse, QueueAssignItemsResult, QueueBulkRemoveItemsResponse, QueueBulkRemoveItemsResult, QueueDefaultQueue, QueueDefaultRequest, QueueDefaultResponse, QueueDefaultResult, QueueDiscussionResponse, QueueDiscussionResult, QueueExportAnnotationsResponse, QueueExportColumnMapping, QueueExportDefaultMapping, QueueExportField, QueueExportFieldsResponse, QueueExportFieldsResult, QueueExportToDatasetRequest, QueueExportToDatasetResponse, QueueExportToDatasetResult, QueueForSourceEntry, QueueForSourceItem, QueueForSourceQueue, QueueForSourceResponse, QueueHardDeleteRequest, QueueHardDeleteResponse, QueueHardDeleteResult, QueueImportAnnotationsResponse, QueueImportAnnotationsResult, QueueItem, QueueItem2, QueueItemAnnotationsResponse, QueueItemAnnotationsResponseWritable, QueueItemNavigationRequest, QueueItemNavigationRequest2, QueueItemWritable, QueueLabelNested, QueueLabelNestedWritable, QueueLabelRequest, QueueLabelRequest2, QueueLabelResult, QueueNavigationResponse, QueueNavigationResult, QueueNextItemResponse, QueueNextItemResult, QueueProgressAnnotatorStat, QueueProgressResponse, QueueProgressResult, QueueProgressUserProgress, QueueReleaseReservationResponse, QueueReleaseReservationResult, QueueRemoveLabelResponse, QueueRemoveLabelResult, QueueReviewItemResponse, QueueReviewItemResult, QueueStatusRequest, QueueStatusResponse, QueueStatusResponseWritable, QueueSubmitAnnotationsResponse, QueueSubmitAnnotationsResult, Recommendation, ReleaseAnnotationQueueItemData, ReleaseAnnotationQueueItemError, ReleaseAnnotationQueueItemErrors, ReleaseAnnotationQueueItemResponse, ReleaseAnnotationQueueItemResponses, RemoveAnnotationQueueItemsData, RemoveAnnotationQueueItemsError, RemoveAnnotationQueueItemsErrors, RemoveAnnotationQueueItemsResponse, RemoveAnnotationQueueItemsResponses, RemoveAnnotationQueueLabelData, RemoveAnnotationQueueLabelError, RemoveAnnotationQueueLabelErrors, RemoveAnnotationQueueLabelResponse, RemoveAnnotationQueueLabelResponses, ReopenAnnotationQueueItemThreadData, ReopenAnnotationQueueItemThreadError, ReopenAnnotationQueueItemThreadErrors, ReopenAnnotationQueueItemThreadResponse, ReopenAnnotationQueueItemThreadResponses, RepresentativeTrace, RerunCallsResponse, RerunCellEntry, RerunExperimentData, RerunExperimentError, RerunExperimentErrors, RerunExperimentResponse, RerunExperimentResponses, ResolveAlertLogsData, ResolveAlertLogsError, ResolveAlertLogsErrors, ResolveAlertLogsResponse, ResolveAlertLogsResponses, ResolveAnnotationQueueItemThreadData, ResolveAnnotationQueueItemThreadError, ResolveAnnotationQueueItemThreadErrors, ResolveAnnotationQueueItemThreadResponse, ResolveAnnotationQueueItemThreadResponses, ReviewAnnotationQueueItemData, ReviewAnnotationQueueItemError, ReviewAnnotationQueueItemErrors, ReviewAnnotationQueueItemResponse, ReviewAnnotationQueueItemResponses, ReviewItemRequest, ReviewLabelCommentRequest, RootCause, RunNewEvalsOnTestExecution, RunNewEvalsResponse, RunPromptChoiceOption, RunPromptColumnConfigResponse, RunPromptColumnConfigResult, RunPromptColumnPreviewResponse, RunPromptColumnPreviewResult, RunPromptOptionsResponse, RunPromptOptionsResult, RunPromptToolOption, RunTestAnalytics, RunTestCallExecutionsResponse, RunTestChatExecutionResponse, RunTestChatExecutionResult, RunTestComponentsUpdate, RunTestErrorResponse, RunTestExecutionResponse, RunTestKpisResponse, RunTestMessageResponse, RunTestNameResponse, RunTestNameResult, RunTestResponse, RunTestResponseWritable, RunTestScenarioItemResponse, ScenarioAddColumnsRequest, ScenarioAddColumnsResponse, ScenarioAddRowsRequest, ScenarioAddRowsResponse, ScenarioCreateRequest, ScenarioCreateResponse, ScenarioCreateResponseWritable, ScenarioDeleteResponse, ScenarioDetailResponse, ScenarioEditPromptsRequest, ScenarioEditRequest, ScenarioEditResponse, ScenarioEditResponseWritable, ScenarioErrorResponse, ScenarioListResponse, ScenarioListResponseWritable, ScenarioPromptItem, ScenarioPromptsUpdateResponse, ScenarioResponse, ScenarioResponseWritable, Score, Score2, ScoreDeleteResponse, ScoreForSourceResponse, ScoreForSourceResponseWritable, ScoreResponse, ScoreResponseWritable, ScoreTrend, ScoreWritable, SdkApiV1ConfigureEvaluationsCreateData, SdkApiV1ConfigureEvaluationsCreateError, SdkApiV1ConfigureEvaluationsCreateErrors, SdkApiV1ConfigureEvaluationsCreateResponse, SdkApiV1ConfigureEvaluationsCreateResponses, SdkApiV1EvalCreateData, SdkApiV1EvalCreateError, SdkApiV1EvalCreateErrors, SdkApiV1EvalCreateResponse, SdkApiV1EvalCreateResponses, SdkApiV1EvalReadData, SdkApiV1EvalReadError, SdkApiV1EvalReadErrors, SdkApiV1EvalReadResponse, SdkApiV1EvalReadResponses, SdkApiV1EvaluatePipelineCreateData, SdkApiV1EvaluatePipelineCreateError, SdkApiV1EvaluatePipelineCreateErrors, SdkApiV1EvaluatePipelineCreateResponse, SdkApiV1EvaluatePipelineCreateResponses, SdkApiV1EvaluatePipelineListData, SdkApiV1EvaluatePipelineListError, SdkApiV1EvaluatePipelineListErrors, SdkApiV1EvaluatePipelineListResponse, SdkApiV1EvaluatePipelineListResponses, SdkApiV1GetEvalsListData, SdkApiV1GetEvalsListError, SdkApiV1GetEvalsListErrors, SdkApiV1GetEvalsListResponse, SdkApiV1GetEvalsListResponses, SdkApiV1NewEvalCreateData, SdkApiV1NewEvalCreateError, SdkApiV1NewEvalCreateErrors, SdkApiV1NewEvalCreateResponse, SdkApiV1NewEvalCreateResponses, SdkApiV1NewEvalListData, SdkApiV1NewEvalListError, SdkApiV1NewEvalListErrors, SdkApiV1NewEvalListResponse, SdkApiV1NewEvalListResponses, SdkcicdEvaluationRunAccepted, SdkcicdEvaluationRunAcceptedResponse, SdkcicdEvaluationRunsResponse, SdkcicdEvaluationRunsResult, SdkcicdEvaluationRunSummary, SdkConfigureEvaluationsRequest, SdkConfigureEvaluationsResponse, SdkErrorResponse, SdkEvalTemplate, SdkEvalTemplateResponse, SdkGetEvalsResponse, SdkMessageResult, SdkSimulationAnalyticsResponse, SdkSimulationAnalyticsResult, SdkSimulationMetricsResponse, SdkSimulationMetricsResponseWritable, SdkSimulationMetricsResult, SdkSimulationMetricsResultWritable, SdkSimulationRunsResponse, SdkSimulationRunsResponseWritable, SdkSimulationRunsResult, SdkSimulationRunsResultWritable, SdkStandaloneEvalInput, SdkStandaloneEvalRequest, SdkStandaloneEvalResponse, SdkStandaloneEvalResultItem, SdkStandaloneEvalV2Request, SdkStandaloneEvalV2Response, SdkStandaloneEvalV2Result, Selection, SendChatRequest, SessionComparisonResponse, SessionComparisonResponseWritable, SessionComparisonResult, SidebarAiMetadata, SidebarTimeline, SimulateAgentDefinitionsDeleteData, SimulateAgentDefinitionsDeleteError, SimulateAgentDefinitionsDeleteErrors, SimulateAgentDefinitionsDeleteResponse, SimulateAgentDefinitionsDeleteResponses, SimulateAgentDefinitionsVersionsActivateCreateData, SimulateAgentDefinitionsVersionsActivateCreateError, SimulateAgentDefinitionsVersionsActivateCreateErrors, SimulateAgentDefinitionsVersionsActivateCreateResponse, SimulateAgentDefinitionsVersionsActivateCreateResponses, SimulateAgentDefinitionsVersionsCallExecutionsListData, SimulateAgentDefinitionsVersionsCallExecutionsListError, SimulateAgentDefinitionsVersionsCallExecutionsListErrors, SimulateAgentDefinitionsVersionsCallExecutionsListResponse, SimulateAgentDefinitionsVersionsCallExecutionsListResponses, SimulateAgentDefinitionsVersionsCreateCreateData, SimulateAgentDefinitionsVersionsCreateCreateError, SimulateAgentDefinitionsVersionsCreateCreateErrors, SimulateAgentDefinitionsVersionsCreateCreateResponse, SimulateAgentDefinitionsVersionsCreateCreateResponses, SimulateAgentDefinitionsVersionsDeleteDeleteData, SimulateAgentDefinitionsVersionsDeleteDeleteError, SimulateAgentDefinitionsVersionsDeleteDeleteErrors, SimulateAgentDefinitionsVersionsDeleteDeleteResponse, SimulateAgentDefinitionsVersionsDeleteDeleteResponses, SimulateAgentDefinitionsVersionsEvalSummaryListData, SimulateAgentDefinitionsVersionsEvalSummaryListError, SimulateAgentDefinitionsVersionsEvalSummaryListErrors, SimulateAgentDefinitionsVersionsEvalSummaryListResponse, SimulateAgentDefinitionsVersionsEvalSummaryListResponses, SimulateAgentDefinitionsVersionsListData, SimulateAgentDefinitionsVersionsListError, SimulateAgentDefinitionsVersionsListErrors, SimulateAgentDefinitionsVersionsListResponse, SimulateAgentDefinitionsVersionsListResponses, SimulateAgentDefinitionsVersionsReadData, SimulateAgentDefinitionsVersionsReadError, SimulateAgentDefinitionsVersionsReadErrors, SimulateAgentDefinitionsVersionsReadResponse, SimulateAgentDefinitionsVersionsReadResponses, SimulateAgentDefinitionsVersionsRestoreCreateData, SimulateAgentDefinitionsVersionsRestoreCreateError, SimulateAgentDefinitionsVersionsRestoreCreateErrors, SimulateAgentDefinitionsVersionsRestoreCreateResponse, SimulateAgentDefinitionsVersionsRestoreCreateResponses, SimulateApiCallExecutionsListData, SimulateApiCallExecutionsListError, SimulateApiCallExecutionsListErrors, SimulateApiCallExecutionsListResponse, SimulateApiCallExecutionsListResponses, SimulateApiPersonasDuplicateCreateData, SimulateApiPersonasDuplicateCreateError, SimulateApiPersonasDuplicateCreateErrors, SimulateApiPersonasDuplicateCreateResponse, SimulateApiPersonasDuplicateCreateResponses, SimulateApiPersonasDuplicateData, SimulateApiPersonasDuplicateError, SimulateApiPersonasDuplicateErrors, SimulateApiPersonasDuplicateResponse, SimulateApiPersonasDuplicateResponses, SimulateApiPersonasFieldOptionsData, SimulateApiPersonasFieldOptionsError, SimulateApiPersonasFieldOptionsErrors, SimulateApiPersonasFieldOptionsResponse, SimulateApiPersonasFieldOptionsResponses, SimulateApiPersonasSystemPersonasData, SimulateApiPersonasSystemPersonasError, SimulateApiPersonasSystemPersonasErrors, SimulateApiPersonasSystemPersonasResponse, SimulateApiPersonasSystemPersonasResponses, SimulateApiPersonasUpdateData, SimulateApiPersonasUpdateError, SimulateApiPersonasUpdateErrors, SimulateApiPersonasUpdateResponse, SimulateApiPersonasUpdateResponses, SimulateApiPersonasWorkspacePersonasData, SimulateApiPersonasWorkspacePersonasError, SimulateApiPersonasWorkspacePersonasErrors, SimulateApiPersonasWorkspacePersonasResponse, SimulateApiPersonasWorkspacePersonasResponses, SimulateApiRunTestsListData, SimulateApiRunTestsListError, SimulateApiRunTestsListErrors, SimulateApiRunTestsListResponse, SimulateApiRunTestsListResponses, SimulateCallExecutionsBranchAnalysisCreateData, SimulateCallExecutionsBranchAnalysisCreateError, SimulateCallExecutionsBranchAnalysisCreateErrors, SimulateCallExecutionsBranchAnalysisCreateResponse, SimulateCallExecutionsBranchAnalysisCreateResponses, SimulateCallExecutionsBranchAnalysisListData, SimulateCallExecutionsBranchAnalysisListError, SimulateCallExecutionsBranchAnalysisListErrors, SimulateCallExecutionsBranchAnalysisListResponse, SimulateCallExecutionsBranchAnalysisListResponses, SimulateCallExecutionsChatSendMessageCreateData, SimulateCallExecutionsChatSendMessageCreateError, SimulateCallExecutionsChatSendMessageCreateErrors, SimulateCallExecutionsChatSendMessageCreateResponse, SimulateCallExecutionsChatSendMessageCreateResponses, SimulateCallExecutionsDeleteDeleteData, SimulateCallExecutionsDeleteDeleteError, SimulateCallExecutionsDeleteDeleteErrors, SimulateCallExecutionsDeleteDeleteResponse, SimulateCallExecutionsDeleteDeleteResponses, SimulateCallExecutionsErrorLocalizerTasksListData, SimulateCallExecutionsErrorLocalizerTasksListError, SimulateCallExecutionsErrorLocalizerTasksListErrors, SimulateCallExecutionsErrorLocalizerTasksListResponse, SimulateCallExecutionsErrorLocalizerTasksListResponses, SimulateCallExecutionsLogsListData, SimulateCallExecutionsLogsListError, SimulateCallExecutionsLogsListErrors, SimulateCallExecutionsLogsListResponse, SimulateCallExecutionsLogsListResponses, SimulateCallExecutionsPartialUpdateData, SimulateCallExecutionsPartialUpdateError, SimulateCallExecutionsPartialUpdateErrors, SimulateCallExecutionsPartialUpdateResponse, SimulateCallExecutionsPartialUpdateResponses, SimulateCallExecutionsReadData, SimulateCallExecutionsReadError, SimulateCallExecutionsReadErrors, SimulateCallExecutionsReadResponse, SimulateCallExecutionsReadResponses, SimulateCallExecutionsSessionComparisonListData, SimulateCallExecutionsSessionComparisonListError, SimulateCallExecutionsSessionComparisonListErrors, SimulateCallExecutionsSessionComparisonListResponse, SimulateCallExecutionsSessionComparisonListResponses, SimulateCallExecutionsTranscriptsListData, SimulateCallExecutionsTranscriptsListError, SimulateCallExecutionsTranscriptsListErrors, SimulateCallExecutionsTranscriptsListResponse, SimulateCallExecutionsTranscriptsListResponses, SimulateEvalConfigResponse, SimulateEvalConfigResponseWritable, SimulateExportReadData, SimulateExportReadError, SimulateExportReadErrors, SimulateExportReadResponse, SimulateExportReadResponses, SimulatePromptSimulationsScenariosListData, SimulatePromptSimulationsScenariosListError, SimulatePromptSimulationsScenariosListErrors, SimulatePromptSimulationsScenariosListResponse, SimulatePromptSimulationsScenariosListResponses, SimulatePromptTemplatesSimulationsCreateData, SimulatePromptTemplatesSimulationsCreateError, SimulatePromptTemplatesSimulationsCreateErrors, SimulatePromptTemplatesSimulationsCreateResponse, SimulatePromptTemplatesSimulationsCreateResponses, SimulatePromptTemplatesSimulationsDeleteData, SimulatePromptTemplatesSimulationsDeleteError, SimulatePromptTemplatesSimulationsDeleteErrors, SimulatePromptTemplatesSimulationsDeleteResponse, SimulatePromptTemplatesSimulationsDeleteResponses, SimulatePromptTemplatesSimulationsExecuteCreateData, SimulatePromptTemplatesSimulationsExecuteCreateError, SimulatePromptTemplatesSimulationsExecuteCreateErrors, SimulatePromptTemplatesSimulationsExecuteCreateResponse, SimulatePromptTemplatesSimulationsExecuteCreateResponses, SimulatePromptTemplatesSimulationsListData, SimulatePromptTemplatesSimulationsListError, SimulatePromptTemplatesSimulationsListErrors, SimulatePromptTemplatesSimulationsListResponse, SimulatePromptTemplatesSimulationsListResponses, SimulatePromptTemplatesSimulationsPartialUpdateData, SimulatePromptTemplatesSimulationsPartialUpdateError, SimulatePromptTemplatesSimulationsPartialUpdateErrors, SimulatePromptTemplatesSimulationsPartialUpdateResponse, SimulatePromptTemplatesSimulationsPartialUpdateResponses, SimulatePromptTemplatesSimulationsReadData, SimulatePromptTemplatesSimulationsReadError, SimulatePromptTemplatesSimulationsReadErrors, SimulatePromptTemplatesSimulationsReadResponse, SimulatePromptTemplatesSimulationsReadResponses, SimulateRunTestsActiveListData, SimulateRunTestsActiveListError, SimulateRunTestsActiveListErrors, SimulateRunTestsActiveListResponse, SimulateRunTestsActiveListResponses, SimulateRunTestsChatExecuteCreateData, SimulateRunTestsChatExecuteCreateError, SimulateRunTestsChatExecuteCreateErrors, SimulateRunTestsChatExecuteCreateResponse, SimulateRunTestsChatExecuteCreateResponses, SimulateRunTestsComponentsPartialUpdateData, SimulateRunTestsComponentsPartialUpdateError, SimulateRunTestsComponentsPartialUpdateErrors, SimulateRunTestsComponentsPartialUpdateResponse, SimulateRunTestsComponentsPartialUpdateResponses, SimulateRunTestsDeleteDeleteData, SimulateRunTestsDeleteDeleteError, SimulateRunTestsDeleteDeleteErrors, SimulateRunTestsDeleteDeleteResponse, SimulateRunTestsDeleteDeleteResponses, SimulateRunTestsDeleteTestExecutionsCreateData, SimulateRunTestsDeleteTestExecutionsCreateError, SimulateRunTestsDeleteTestExecutionsCreateErrors, SimulateRunTestsDeleteTestExecutionsCreateResponse, SimulateRunTestsDeleteTestExecutionsCreateResponses, SimulateRunTestsEvalConfigsCreateData, SimulateRunTestsEvalConfigsCreateError, SimulateRunTestsEvalConfigsCreateErrors, SimulateRunTestsEvalConfigsCreateResponse, SimulateRunTestsEvalConfigsCreateResponses, SimulateRunTestsEvalConfigsDeleteData, SimulateRunTestsEvalConfigsDeleteError, SimulateRunTestsEvalConfigsDeleteErrors, SimulateRunTestsEvalConfigsDeleteResponse, SimulateRunTestsEvalConfigsDeleteResponses, SimulateRunTestsEvalConfigsGetStructureListData, SimulateRunTestsEvalConfigsGetStructureListError, SimulateRunTestsEvalConfigsGetStructureListErrors, SimulateRunTestsEvalConfigsGetStructureListResponse, SimulateRunTestsEvalConfigsGetStructureListResponses, SimulateRunTestsEvalConfigsUpdateCreateData, SimulateRunTestsEvalConfigsUpdateCreateError, SimulateRunTestsEvalConfigsUpdateCreateErrors, SimulateRunTestsEvalConfigsUpdateCreateResponse, SimulateRunTestsEvalConfigsUpdateCreateResponses, SimulateRunTestsEvalSummaryComparisonListData, SimulateRunTestsEvalSummaryComparisonListError, SimulateRunTestsEvalSummaryComparisonListErrors, SimulateRunTestsEvalSummaryComparisonListResponse, SimulateRunTestsEvalSummaryComparisonListResponses, SimulateRunTestsEvalSummaryListData, SimulateRunTestsEvalSummaryListError, SimulateRunTestsEvalSummaryListErrors, SimulateRunTestsEvalSummaryListResponse, SimulateRunTestsEvalSummaryListResponses, SimulateRunTestsGetIdByNameReadData, SimulateRunTestsGetIdByNameReadError, SimulateRunTestsGetIdByNameReadErrors, SimulateRunTestsGetIdByNameReadResponse, SimulateRunTestsGetIdByNameReadResponses, SimulateRunTestsRerunTestExecutionsCreateData, SimulateRunTestsRerunTestExecutionsCreateError, SimulateRunTestsRerunTestExecutionsCreateErrors, SimulateRunTestsRerunTestExecutionsCreateResponse, SimulateRunTestsRerunTestExecutionsCreateResponses, SimulateRunTestsRunNewEvalsCreateData, SimulateRunTestsRunNewEvalsCreateError, SimulateRunTestsRunNewEvalsCreateErrors, SimulateRunTestsRunNewEvalsCreateResponse, SimulateRunTestsRunNewEvalsCreateResponses, SimulateRunTestsScenariosListData, SimulateRunTestsScenariosListError, SimulateRunTestsScenariosListErrors, SimulateRunTestsScenariosListResponse, SimulateRunTestsScenariosListResponses, SimulateRunTestsSdkCodeListData, SimulateRunTestsSdkCodeListError, SimulateRunTestsSdkCodeListErrors, SimulateRunTestsSdkCodeListResponse, SimulateRunTestsSdkCodeListResponses, SimulateScenariosAddColumnsCreateData, SimulateScenariosAddColumnsCreateError, SimulateScenariosAddColumnsCreateErrors, SimulateScenariosAddColumnsCreateResponse, SimulateScenariosAddColumnsCreateResponses, SimulateScenariosAddRowsCreateData, SimulateScenariosAddRowsCreateError, SimulateScenariosAddRowsCreateErrors, SimulateScenariosAddRowsCreateResponse, SimulateScenariosAddRowsCreateResponses, SimulateScenariosGetColumnsListData, SimulateScenariosGetColumnsListError, SimulateScenariosGetColumnsListErrors, SimulateScenariosGetColumnsListResponse, SimulateScenariosGetColumnsListResponses, SimulateScenariosPromptsUpdateData, SimulateScenariosPromptsUpdateError, SimulateScenariosPromptsUpdateErrors, SimulateScenariosPromptsUpdateResponse, SimulateScenariosPromptsUpdateResponses, SimulateSimulatorAgentsCreateCreateData, SimulateSimulatorAgentsCreateCreateError, SimulateSimulatorAgentsCreateCreateErrors, SimulateSimulatorAgentsCreateCreateResponse, SimulateSimulatorAgentsCreateCreateResponses, SimulateSimulatorAgentsDeleteDeleteData, SimulateSimulatorAgentsDeleteDeleteError, SimulateSimulatorAgentsDeleteDeleteErrors, SimulateSimulatorAgentsDeleteDeleteResponse, SimulateSimulatorAgentsDeleteDeleteResponses, SimulateSimulatorAgentsEditUpdateData, SimulateSimulatorAgentsEditUpdateError, SimulateSimulatorAgentsEditUpdateErrors, SimulateSimulatorAgentsEditUpdateResponse, SimulateSimulatorAgentsEditUpdateResponses, SimulateSimulatorAgentsListData, SimulateSimulatorAgentsListError, SimulateSimulatorAgentsListErrors, SimulateSimulatorAgentsListResponse, SimulateSimulatorAgentsListResponses, SimulateSimulatorAgentsReadData, SimulateSimulatorAgentsReadError, SimulateSimulatorAgentsReadErrors, SimulateSimulatorAgentsReadResponse, SimulateSimulatorAgentsReadResponses, SimulateTestExecutionsChatCallExecutionsBatchCreateData, SimulateTestExecutionsChatCallExecutionsBatchCreateError, SimulateTestExecutionsChatCallExecutionsBatchCreateErrors, SimulateTestExecutionsChatCallExecutionsBatchCreateResponse, SimulateTestExecutionsChatCallExecutionsBatchCreateResponses, SimulateTestExecutionsColumnOrderUpdateData, SimulateTestExecutionsColumnOrderUpdateError, SimulateTestExecutionsColumnOrderUpdateErrors, SimulateTestExecutionsColumnOrderUpdateResponse, SimulateTestExecutionsColumnOrderUpdateResponses, SimulateTestExecutionsDeleteDeleteData, SimulateTestExecutionsDeleteDeleteError, SimulateTestExecutionsDeleteDeleteErrors, SimulateTestExecutionsDeleteDeleteResponse, SimulateTestExecutionsDeleteDeleteResponses, SimulateTestExecutionsEvalExplanationSummaryListData, SimulateTestExecutionsEvalExplanationSummaryListError, SimulateTestExecutionsEvalExplanationSummaryListErrors, SimulateTestExecutionsEvalExplanationSummaryListResponse, SimulateTestExecutionsEvalExplanationSummaryListResponses, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateData, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateError, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateErrors, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateResponse, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateResponses, SimulateTestExecutionsOptimiserAnalysisListData, SimulateTestExecutionsOptimiserAnalysisListError, SimulateTestExecutionsOptimiserAnalysisListErrors, SimulateTestExecutionsOptimiserAnalysisListResponse, SimulateTestExecutionsOptimiserAnalysisListResponses, SimulateTestExecutionsOptimiserAnalysisRefreshCreateData, SimulateTestExecutionsOptimiserAnalysisRefreshCreateError, SimulateTestExecutionsOptimiserAnalysisRefreshCreateErrors, SimulateTestExecutionsOptimiserAnalysisRefreshCreateResponse, SimulateTestExecutionsOptimiserAnalysisRefreshCreateResponses, SimulateTestExecutionsRerunCallsCreateData, SimulateTestExecutionsRerunCallsCreateError, SimulateTestExecutionsRerunCallsCreateErrors, SimulateTestExecutionsRerunCallsCreateResponse, SimulateTestExecutionsRerunCallsCreateResponses, SimulatorAgent, SimulatorAgent2, SimulatorAgentDeleteResponse, SimulatorAgentListResponse, SimulatorAgentListResponseWritable, SimulatorAgentValidationErrorResponse, SimulatorAgentValidationErrorResponseWritable, SimulatorAgentWritable, SkipAnnotationQueueItemData, SkipAnnotationQueueItemError, SkipAnnotationQueueItemErrors, SkipAnnotationQueueItemResponse, SkipAnnotationQueueItemResponses, StartEvalsProcessRequest, StopExperimentData, StopExperimentError, StopExperimentErrors, StopExperimentResponse, StopExperimentResponses, StopUserEvalRequest, SubmitAnnotationEntry, SubmitAnnotationQueueItemAnnotationsData, SubmitAnnotationQueueItemAnnotationsError, SubmitAnnotationQueueItemAnnotationsErrors, SubmitAnnotationQueueItemAnnotationsResponse, SubmitAnnotationQueueItemAnnotationsResponses, SubmitAnnotations, SwitchWorkspace, SwitchWorkspaceData, SwitchWorkspaceError, SwitchWorkspaceErrors, SwitchWorkspaceResponse, SwitchWorkspaceResponse2, SwitchWorkspaceResponses, SwitchWorkspaceResult, SyntheticData, SyntheticDatasetConfig, SyntheticDatasetConfigPayload, SyntheticDatasetConfigResponse, SyntheticDatasetConfigResult, SyntheticDatasetCreateStartedResponse, SyntheticDatasetCreateStartedResponseWritable, SyntheticDatasetCreateStartedResult, SyntheticDatasetCreateStartedResultWritable, SyntheticDatasetCreation, SyntheticDatasetUpdateData, SyntheticDatasetUpdateResponse, SyntheticDatasetUpdateResult, TestExecution, TestExecutionAnalytics, TestExecutionBulkDelete, TestExecutionBulkDeleteResponse, TestExecutionChatBatchResponse, TestExecutionChatBatchResult, TestExecutionColumnOrder, TestExecutionColumnOrderResponse, TestExecutionColumnOrderResponseWritable, TestExecutionDetailResponse, TestExecutionItemResponse, TestExecutionRerun, TestExecutionRerunResponse, TestExecutionRerunResult, TestExecutionStatusSummary, TestExecutionTranscriptCall, TestExecutionTranscriptCallWritable, TestExecutionTranscriptsResponse, TestExecutionTranscriptsResponseWritable, TestExecutionWritable, ToggleAnnotationQueueItemCommentReactionData, ToggleAnnotationQueueItemCommentReactionError, ToggleAnnotationQueueItemCommentReactionErrors, ToggleAnnotationQueueItemCommentReactionResponse, ToggleAnnotationQueueItemCommentReactionResponses, Trace, Trace2, TraceAnnotationNoteResponse, TraceAnnotationValueResponse, TraceEvidence, TracePreview, TracerFeedIssuesCreateLinearIssueCreateData, TracerFeedIssuesCreateLinearIssueCreateError, TracerFeedIssuesCreateLinearIssueCreateErrors, TracerFeedIssuesCreateLinearIssueCreateResponse, TracerFeedIssuesCreateLinearIssueCreateResponses, TracerFeedIssuesDeepAnalysisCreateData, TracerFeedIssuesDeepAnalysisCreateError, TracerFeedIssuesDeepAnalysisCreateErrors, TracerFeedIssuesDeepAnalysisCreateResponse, TracerFeedIssuesDeepAnalysisCreateResponses, TracerFeedIssuesOverviewListData, TracerFeedIssuesOverviewListError, TracerFeedIssuesOverviewListErrors, TracerFeedIssuesOverviewListResponse, TracerFeedIssuesOverviewListResponses, TracerFeedIssuesPartialUpdateData, TracerFeedIssuesPartialUpdateError, TracerFeedIssuesPartialUpdateErrors, TracerFeedIssuesPartialUpdateResponse, TracerFeedIssuesPartialUpdateResponses, TracerFeedIssuesRootCauseListData, TracerFeedIssuesRootCauseListError, TracerFeedIssuesRootCauseListErrors, TracerFeedIssuesRootCauseListResponse, TracerFeedIssuesRootCauseListResponses, TracerFeedIssuesSidebarListData, TracerFeedIssuesSidebarListError, TracerFeedIssuesSidebarListErrors, TracerFeedIssuesSidebarListResponse, TracerFeedIssuesSidebarListResponses, TracerFeedIssuesTracesListData, TracerFeedIssuesTracesListError, TracerFeedIssuesTracesListErrors, TracerFeedIssuesTracesListResponse, TracerFeedIssuesTracesListResponses, TracerFeedIssuesTrendsListData, TracerFeedIssuesTrendsListError, TracerFeedIssuesTrendsListErrors, TracerFeedIssuesTrendsListResponse, TracerFeedIssuesTrendsListResponses, TracerTraceAgentGraphData, TracerTraceAgentGraphError, TracerTraceAgentGraphErrors, TracerTraceAgentGraphResponse, TracerTraceAgentGraphResponses, TracerTraceAnnotationCreateData, TracerTraceAnnotationCreateError, TracerTraceAnnotationCreateErrors, TracerTraceAnnotationCreateResponse, TracerTraceAnnotationCreateResponses, TracerTraceAnnotationDeleteData, TracerTraceAnnotationDeleteError, TracerTraceAnnotationDeleteErrors, TracerTraceAnnotationDeleteResponse, TracerTraceAnnotationDeleteResponses, TracerTraceAnnotationGetAnnotationValuesData, TracerTraceAnnotationGetAnnotationValuesError, TracerTraceAnnotationGetAnnotationValuesErrors, TracerTraceAnnotationGetAnnotationValuesResponse, TracerTraceAnnotationGetAnnotationValuesResponses, TracerTraceAnnotationListData, TracerTraceAnnotationListError, TracerTraceAnnotationListErrors, TracerTraceAnnotationListResponse, TracerTraceAnnotationListResponses, TracerTraceAnnotationPartialUpdateData, TracerTraceAnnotationPartialUpdateError, TracerTraceAnnotationPartialUpdateErrors, TracerTraceAnnotationPartialUpdateResponse, TracerTraceAnnotationPartialUpdateResponses, TracerTraceAnnotationReadData, TracerTraceAnnotationReadError, TracerTraceAnnotationReadErrors, TracerTraceAnnotationReadResponse, TracerTraceAnnotationReadResponses, TracerTraceAnnotationUpdateData, TracerTraceAnnotationUpdateError, TracerTraceAnnotationUpdateErrors, TracerTraceAnnotationUpdateResponse, TracerTraceAnnotationUpdateResponses, TracerTraceBulkCreateData, TracerTraceBulkCreateError, TracerTraceBulkCreateErrors, TracerTraceBulkCreateResponse, TracerTraceBulkCreateResponses, TracerTraceCompareTracesData, TracerTraceCompareTracesError, TracerTraceCompareTracesErrors, TracerTraceCompareTracesResponse, TracerTraceCompareTracesResponses, TracerTraceCreateData, TracerTraceCreateError, TracerTraceCreateErrors, TracerTraceCreateResponse, TracerTraceCreateResponses, TracerTraceDeleteData, TracerTraceDeleteError, TracerTraceDeleteErrors, TracerTraceDeleteResponse, TracerTraceDeleteResponses, TracerTraceGetEvalNamesData, TracerTraceGetEvalNamesError, TracerTraceGetEvalNamesErrors, TracerTraceGetEvalNamesResponse, TracerTraceGetEvalNamesResponses, TracerTraceGetTraceExportDataData, TracerTraceGetTraceExportDataError, TracerTraceGetTraceExportDataErrors, TracerTraceGetTraceExportDataResponse, TracerTraceGetTraceExportDataResponses, TracerTraceGetTraceIdByIndexData, TracerTraceGetTraceIdByIndexError, TracerTraceGetTraceIdByIndexErrors, TracerTraceGetTraceIdByIndexObserveData, TracerTraceGetTraceIdByIndexObserveError, TracerTraceGetTraceIdByIndexObserveErrors, TracerTraceGetTraceIdByIndexObserveResponse, TracerTraceGetTraceIdByIndexObserveResponses, TracerTraceGetTraceIdByIndexResponse, TracerTraceGetTraceIdByIndexResponses, TracerTraceListData, TracerTraceListError, TracerTraceListErrors, TracerTraceListResponse, TracerTraceListResponses, TracerTraceListTracesOfSessionData, TracerTraceListTracesOfSessionError, TracerTraceListTracesOfSessionErrors, TracerTraceListTracesOfSessionResponse, TracerTraceListTracesOfSessionResponses, TracerTracePartialUpdateData, TracerTracePartialUpdateError, TracerTracePartialUpdateErrors, TracerTracePartialUpdateResponse, TracerTracePartialUpdateResponses, TracerTraceSessionCreateData, TracerTraceSessionCreateError, TracerTraceSessionCreateErrors, TracerTraceSessionCreateResponse, TracerTraceSessionCreateResponses, TracerTraceSessionDeleteData, TracerTraceSessionDeleteError, TracerTraceSessionDeleteErrors, TracerTraceSessionDeleteResponse, TracerTraceSessionDeleteResponses, TracerTraceSessionEvalLogsData, TracerTraceSessionEvalLogsError, TracerTraceSessionEvalLogsErrors, TracerTraceSessionEvalLogsResponse, TracerTraceSessionEvalLogsResponses, TracerTraceSessionGetSessionFilterValuesData, TracerTraceSessionGetSessionFilterValuesError, TracerTraceSessionGetSessionFilterValuesErrors, TracerTraceSessionGetSessionFilterValuesResponse, TracerTraceSessionGetSessionFilterValuesResponses, TracerTraceSessionGetTraceSessionExportDataData, TracerTraceSessionGetTraceSessionExportDataError, TracerTraceSessionGetTraceSessionExportDataErrors, TracerTraceSessionGetTraceSessionExportDataResponse, TracerTraceSessionGetTraceSessionExportDataResponses, TracerTraceSessionListData, TracerTraceSessionListError, TracerTraceSessionListErrors, TracerTraceSessionListResponse, TracerTraceSessionListResponses, TracerTraceSessionPartialUpdateData, TracerTraceSessionPartialUpdateError, TracerTraceSessionPartialUpdateErrors, TracerTraceSessionPartialUpdateResponse, TracerTraceSessionPartialUpdateResponses, TracerTraceSessionUpdateData, TracerTraceSessionUpdateError, TracerTraceSessionUpdateErrors, TracerTraceSessionUpdateResponse, TracerTraceSessionUpdateResponses, TracerTraceUpdateData, TracerTraceUpdateError, TracerTraceUpdateErrors, TracerTraceUpdateResponse, TracerTraceUpdateResponses, TracerUserAlertLogsCreateData, TracerUserAlertLogsCreateError, TracerUserAlertLogsCreateErrors, TracerUserAlertLogsCreateResponse, TracerUserAlertLogsCreateResponses, TracerUserAlertLogsDeleteData, TracerUserAlertLogsDeleteError, TracerUserAlertLogsDeleteErrors, TracerUserAlertLogsDeleteResponse, TracerUserAlertLogsDeleteResponses, TracerUserAlertLogsPartialUpdateData, TracerUserAlertLogsPartialUpdateError, TracerUserAlertLogsPartialUpdateErrors, TracerUserAlertLogsPartialUpdateResponse, TracerUserAlertLogsPartialUpdateResponses, TracerUserAlertLogsUpdateData, TracerUserAlertLogsUpdateError, TracerUserAlertLogsUpdateErrors, TracerUserAlertLogsUpdateResponse, TracerUserAlertLogsUpdateResponses, TracerUserAlertsDuplicateData, TracerUserAlertsDuplicateError, TracerUserAlertsDuplicateErrors, TracerUserAlertsDuplicateResponse, TracerUserAlertsDuplicateResponses, TracerUserAlertsListMonitorsData, TracerUserAlertsListMonitorsError, TracerUserAlertsListMonitorsErrors, TracerUserAlertsListMonitorsResponse, TracerUserAlertsListMonitorsResponses, TracerUserAlertsUpdateData, TracerUserAlertsUpdateError, TracerUserAlertsUpdateErrors, TracerUserAlertsUpdateResponse, TracerUserAlertsUpdateResponses, TracerUsersGetCodeExampleListData, TracerUsersGetCodeExampleListError, TracerUsersGetCodeExampleListErrors, TracerUsersGetCodeExampleListResponse, TracerUsersGetCodeExampleListResponses, TracesAggregates, TraceSession, TraceSession2, TraceSessionGraphDataRequest, TraceSessionWritable, TracesListRow, TracesTabApiResponse, TracesTabResponse, TraceSummary, TraceTagsUpdate, TraceWritable, TrendMetric, TrendPoint, TrendsTabApiResponse, TrendsTabResponse, UpdateAgentDefinitionData, UpdateAgentDefinitionError, UpdateAgentDefinitionErrors, UpdateAgentDefinitionResponse, UpdateAgentDefinitionResponses, UpdateAlertData, UpdateAlertError, UpdateAlertErrors, UpdateAlertResponse, UpdateAlertResponses, UpdateAnnotationQueueData, UpdateAnnotationQueueError, UpdateAnnotationQueueErrors, UpdateAnnotationQueueResponse, UpdateAnnotationQueueResponses, UpdateAnnotationQueueStatusData, UpdateAnnotationQueueStatusError, UpdateAnnotationQueueStatusErrors, UpdateAnnotationQueueStatusResponse, UpdateAnnotationQueueStatusResponses, UpdateDatasetCellData, UpdateDatasetCellError, UpdateDatasetCellErrors, UpdateDatasetCellResponse, UpdateDatasetCellResponses, UpdateExperimentData, UpdateExperimentError, UpdateExperimentErrors, UpdateExperimentResponse, UpdateExperimentResponses, UpdatePersonaData, UpdatePersonaError, UpdatePersonaErrors, UpdatePersonaResponse, UpdatePersonaResponses, UpdateRunTest, UpdateRunTestData, UpdateRunTestError, UpdateRunTestErrors, UpdateRunTestResponse, UpdateRunTestResponses, UpdateScenarioData, UpdateScenarioError, UpdateScenarioErrors, UpdateScenarioResponse, UpdateScenarioResponses, UpdateTraceTagsData, UpdateTraceTagsError, UpdateTraceTagsErrors, UpdateTraceTagsResponse, UpdateTraceTagsResponses, User, UserAlertMonitor, UserAlertMonitor2, UserAlertMonitorDuplicate, UserAlertMonitorDuplicateResponse, UserAlertMonitorDuplicateResult, UserAlertMonitorLog, UserAlertMonitorLog2, UserAlertMonitorLogWritable, UserAlertMonitorMetricOption, UserAlertMonitorMetricOptionsResponse, UserAlertMonitorMetricOptionsResponseWritable, UserAlertMonitorWritable, UserCodeExampleResponse, UserEvalMutationRequest, UserEvalMutationRequest2, UserEvalUpdateRequest, UserInfoOrganization, UserInfoResponse, UserInfoTwoFactorMethods, UsersResponse, UsersResult, UserWritable, VectorDbColumnRequest, WorkspaceAccessInput, WorkspaceAdminSummary, WorkspaceListItemResponse, WorkspaceListPaginatedResponse, WorkspaceMemberRemove, WorkspaceMemberRoleUpdate, WorkspaceMemberRoleUpdateResponse, WorkspaceMemberRoleUpdateResult, WorkspaceSummary } from './types.gen'; diff --git a/typescript/futureagi/src/generated/openapi/sdk.gen.ts b/typescript/futureagi/src/generated/openapi/sdk.gen.ts new file mode 100644 index 0000000..89a6324 --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/sdk.gen.ts @@ -0,0 +1,4910 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Client, Options as Options2, TDataShape } from './client'; +import { client } from './client.gen'; +import type { AccountsOrganizationMembersReactivateCreateData, AccountsOrganizationMembersReactivateCreateErrors, AccountsOrganizationMembersReactivateCreateResponses, AccountsOrganizationMembersRemoveDeleteData, AccountsOrganizationMembersRemoveDeleteErrors, AccountsOrganizationMembersRemoveDeleteResponses, AccountsOrganizationMembersRoleCreateData, AccountsOrganizationMembersRoleCreateErrors, AccountsOrganizationMembersRoleCreateResponses, AccountsWorkspaceMembersRemoveDeleteData, AccountsWorkspaceMembersRemoveDeleteErrors, AccountsWorkspaceMembersRemoveDeleteResponses, AccountsWorkspaceMembersRoleCreateData, AccountsWorkspaceMembersRoleCreateErrors, AccountsWorkspaceMembersRoleCreateResponses, AddAnnotationQueueItemsData, AddAnnotationQueueItemsErrors, AddAnnotationQueueItemsResponses, AddAnnotationQueueLabelData, AddAnnotationQueueLabelErrors, AddAnnotationQueueLabelResponses, AddDatasetColumnsData, AddDatasetColumnsErrors, AddDatasetColumnsResponses, AddDatasetRowsData, AddDatasetRowsErrors, AddDatasetRowsResponses, ArchiveAnnotationQueueData, ArchiveAnnotationQueueErrors, ArchiveAnnotationQueueResponses, AssignAnnotationQueueItemsData, AssignAnnotationQueueItemsErrors, AssignAnnotationQueueItemsResponses, BulkMuteAlertsData, BulkMuteAlertsErrors, BulkMuteAlertsResponses, CancelTestExecutionData, CancelTestExecutionErrors, CancelTestExecutionResponses, CompareExperimentsData, CompareExperimentsErrors, CompareExperimentsResponses, CompleteAnnotationQueueItemData, CompleteAnnotationQueueItemErrors, CompleteAnnotationQueueItemResponses, CreateAgentDefinitionData, CreateAgentDefinitionErrors, CreateAgentDefinitionResponses, CreateAlertData, CreateAlertErrors, CreateAlertResponses, CreateAnnotationQueueData, CreateAnnotationQueueErrors, CreateAnnotationQueueItemCommentData, CreateAnnotationQueueItemCommentErrors, CreateAnnotationQueueItemCommentResponses, CreateAnnotationQueueResponses, CreateBulkTraceAnnotationData, CreateBulkTraceAnnotationErrors, CreateBulkTraceAnnotationResponses, CreateDatasetFromLocalFileData, CreateDatasetFromLocalFileErrors, CreateDatasetFromLocalFileResponses, CreateDatasetManuallyData, CreateDatasetManuallyErrors, CreateDatasetManuallyResponses, CreateEmptyDatasetData, CreateEmptyDatasetErrors, CreateEmptyDatasetResponses, CreateExperimentData, CreateExperimentErrors, CreateExperimentResponses, CreatePersonaData, CreatePersonaErrors, CreatePersonaResponses, CreateRunTestData, CreateRunTestErrors, CreateRunTestResponses, CreateScenarioData, CreateScenarioErrors, CreateScenarioResponses, DeleteAgentDefinitionData, DeleteAgentDefinitionErrors, DeleteAgentDefinitionResponses, DeleteAlertData, DeleteAlertErrors, DeleteAlertResponses, DeleteDatasetColumnData, DeleteDatasetColumnErrors, DeleteDatasetColumnResponses, DeleteDatasetRowData, DeleteDatasetRowErrors, DeleteDatasetRowResponses, DeleteExperimentsData, DeleteExperimentsErrors, DeleteExperimentsResponses, DeletePersonaData, DeletePersonaErrors, DeletePersonaResponses, DeleteRunTestData, DeleteRunTestErrors, DeleteRunTestResponses, DeleteScenarioData, DeleteScenarioErrors, DeleteScenarioResponses, DownloadDatasetData, DownloadDatasetErrors, DownloadDatasetResponses, DownloadExperimentData, DownloadExperimentErrors, DownloadExperimentResponses, DuplicateDatasetData, DuplicateDatasetErrors, DuplicateDatasetResponses, ExecuteRunTestData, ExecuteRunTestErrors, ExecuteRunTestResponses, ExportAnnotationQueueData, ExportAnnotationQueueErrors, ExportAnnotationQueueResponses, ExportAnnotationQueueToDatasetData, ExportAnnotationQueueToDatasetErrors, ExportAnnotationQueueToDatasetResponses, GetAgentDefinitionData, GetAgentDefinitionErrors, GetAgentDefinitionResponses, GetAlertData, GetAlertDetailsData, GetAlertDetailsErrors, GetAlertDetailsResponses, GetAlertErrors, GetAlertGraphData, GetAlertGraphErrors, GetAlertGraphResponses, GetAlertLogData, GetAlertLogErrors, GetAlertLogResponses, GetAlertResponses, GetAnnotationQueueAgreementData, GetAnnotationQueueAgreementErrors, GetAnnotationQueueAgreementResponses, GetAnnotationQueueAnalyticsData, GetAnnotationQueueAnalyticsErrors, GetAnnotationQueueAnalyticsResponses, GetAnnotationQueueData, GetAnnotationQueueErrors, GetAnnotationQueueItemDetailData, GetAnnotationQueueItemDetailErrors, GetAnnotationQueueItemDetailResponses, GetAnnotationQueueProgressData, GetAnnotationQueueProgressErrors, GetAnnotationQueueProgressResponses, GetAnnotationQueueResponses, GetCurrentUserData, GetCurrentUserErrors, GetCurrentUserResponses, GetDatasetAnnotationSummaryData, GetDatasetAnnotationSummaryErrors, GetDatasetAnnotationSummaryResponses, GetDatasetColumnsData, GetDatasetColumnsErrors, GetDatasetColumnsResponses, GetDatasetEvalStatsData, GetDatasetEvalStatsErrors, GetDatasetEvalStatsResponses, GetDatasetJsonSchemaData, GetDatasetJsonSchemaErrors, GetDatasetJsonSchemaResponses, GetDatasetRowData, GetDatasetRowErrors, GetDatasetRowResponses, GetDatasetTableData, GetDatasetTableErrors, GetDatasetTableResponses, GetErrorFeedIssueData, GetErrorFeedIssueErrors, GetErrorFeedIssueResponses, GetErrorFeedIssueStatsData, GetErrorFeedIssueStatsErrors, GetErrorFeedIssueStatsResponses, GetExperimentData, GetExperimentErrors, GetExperimentJsonSchemaData, GetExperimentJsonSchemaErrors, GetExperimentJsonSchemaResponses, GetExperimentResponses, GetExperimentRowData, GetExperimentRowErrors, GetExperimentRowResponses, GetExperimentStatsData, GetExperimentStatsErrors, GetExperimentStatsResponses, GetNextAnnotationQueueItemData, GetNextAnnotationQueueItemErrors, GetNextAnnotationQueueItemResponses, GetPersonaData, GetPersonaErrors, GetPersonaResponses, GetRunTestAnalyticsData, GetRunTestAnalyticsErrors, GetRunTestAnalyticsResponses, GetRunTestData, GetRunTestErrors, GetRunTestResponses, GetRunTestStatusData, GetRunTestStatusErrors, GetRunTestStatusResponses, GetScenarioData, GetScenarioErrors, GetScenarioResponses, GetSimulationAnalyticsData, GetSimulationAnalyticsErrors, GetSimulationAnalyticsResponses, GetTestExecutionAnalyticsData, GetTestExecutionAnalyticsErrors, GetTestExecutionAnalyticsResponses, GetTestExecutionData, GetTestExecutionErrors, GetTestExecutionKpisData, GetTestExecutionKpisErrors, GetTestExecutionKpisResponses, GetTestExecutionPerformanceSummaryData, GetTestExecutionPerformanceSummaryErrors, GetTestExecutionPerformanceSummaryResponses, GetTestExecutionResponses, GetTestExecutionTranscriptsData, GetTestExecutionTranscriptsErrors, GetTestExecutionTranscriptsResponses, GetTraceData, GetTraceErrors, GetTraceGraphMethodsData, GetTraceGraphMethodsErrors, GetTraceGraphMethodsResponses, GetTraceResponses, GetTraceSessionData, GetTraceSessionErrors, GetTraceSessionGraphDataData, GetTraceSessionGraphDataErrors, GetTraceSessionGraphDataResponses, GetTraceSessionResponses, GetVoiceCallDetailData, GetVoiceCallDetailErrors, GetVoiceCallDetailResponses, ImportAnnotationQueueItemAnnotationsData, ImportAnnotationQueueItemAnnotationsErrors, ImportAnnotationQueueItemAnnotationsResponses, ListAgentDefinitionsData, ListAgentDefinitionsErrors, ListAgentDefinitionsResponses, ListAlertLogsData, ListAlertLogsErrors, ListAlertLogsForAlertData, ListAlertLogsForAlertErrors, ListAlertLogsForAlertResponses, ListAlertLogsResponses, ListAlertMetricOptionsData, ListAlertMetricOptionsErrors, ListAlertMetricOptionsResponses, ListAlertsData, ListAlertsErrors, ListAlertsResponses, ListAllAlertLogsData, ListAllAlertLogsErrors, ListAllAlertLogsResponses, ListAnnotationQueueExportFieldsData, ListAnnotationQueueExportFieldsErrors, ListAnnotationQueueExportFieldsResponses, ListAnnotationQueueItemAnnotationsData, ListAnnotationQueueItemAnnotationsErrors, ListAnnotationQueueItemAnnotationsResponses, ListAnnotationQueueItemDiscussionData, ListAnnotationQueueItemDiscussionErrors, ListAnnotationQueueItemDiscussionResponses, ListAnnotationQueueItemsData, ListAnnotationQueueItemsErrors, ListAnnotationQueueItemsResponses, ListAnnotationQueuesData, ListAnnotationQueuesErrors, ListAnnotationQueuesResponses, ListDatasetBaseColumnsData, ListDatasetBaseColumnsErrors, ListDatasetBaseColumnsResponses, ListDatasetDerivedVariablesData, ListDatasetDerivedVariablesErrors, ListDatasetDerivedVariablesResponses, ListDatasetNamesData, ListDatasetNamesErrors, ListDatasetNamesResponses, ListDatasetsData, ListDatasetsErrors, ListDatasetsResponses, ListErrorFeedIssuesData, ListErrorFeedIssuesErrors, ListErrorFeedIssuesResponses, ListExperimentComparisonsData, ListExperimentComparisonsErrors, ListExperimentComparisonsResponses, ListExperimentRowsData, ListExperimentRowsErrors, ListExperimentRowsResponses, ListExperimentsData, ListExperimentsErrors, ListExperimentsResponses, ListOrganizationMembersData, ListOrganizationMembersErrors, ListOrganizationMembersResponses, ListPersonasData, ListPersonasErrors, ListPersonasResponses, ListRunTestCallExecutionsData, ListRunTestCallExecutionsErrors, ListRunTestCallExecutionsResponses, ListRunTestExecutionsData, ListRunTestExecutionsErrors, ListRunTestExecutionsResponses, ListRunTestsData, ListRunTestsErrors, ListRunTestsResponses, ListScenariosData, ListScenariosErrors, ListScenariosResponses, ListSimulationMetricsData, ListSimulationMetricsErrors, ListSimulationMetricsResponses, ListSimulationRunsData, ListSimulationRunsErrors, ListSimulationRunsResponses, ListTestExecutionsData, ListTestExecutionsErrors, ListTestExecutionsResponses, ListTraceAnnotationLabelsData, ListTraceAnnotationLabelsErrors, ListTraceAnnotationLabelsResponses, ListTraceProjectsData, ListTraceProjectsErrors, ListTraceProjectsResponses, ListTracePropertiesData, ListTracePropertiesErrors, ListTracePropertiesResponses, ListTracesData, ListTracesErrors, ListTraceSessionsData, ListTraceSessionsErrors, ListTraceSessionsResponses, ListTracesResponses, ListTraceUsersData, ListTraceUsersErrors, ListTraceUsersResponses, ListVoiceCallsData, ListVoiceCallsErrors, ListVoiceCallsResponses, ListWorkspaceMembersData, ListWorkspaceMembersErrors, ListWorkspaceMembersResponses, ListWorkspacesData, ListWorkspacesErrors, ListWorkspacesResponses, ModelHubAnnotationQueuesAutomationRulesCreateData, ModelHubAnnotationQueuesAutomationRulesCreateErrors, ModelHubAnnotationQueuesAutomationRulesCreateResponses, ModelHubAnnotationQueuesAutomationRulesDeleteData, ModelHubAnnotationQueuesAutomationRulesDeleteErrors, ModelHubAnnotationQueuesAutomationRulesDeleteResponses, ModelHubAnnotationQueuesAutomationRulesEvaluateData, ModelHubAnnotationQueuesAutomationRulesEvaluateErrors, ModelHubAnnotationQueuesAutomationRulesEvaluateResponses, ModelHubAnnotationQueuesAutomationRulesListData, ModelHubAnnotationQueuesAutomationRulesListErrors, ModelHubAnnotationQueuesAutomationRulesListResponses, ModelHubAnnotationQueuesAutomationRulesPartialUpdateData, ModelHubAnnotationQueuesAutomationRulesPartialUpdateErrors, ModelHubAnnotationQueuesAutomationRulesPartialUpdateResponses, ModelHubAnnotationQueuesAutomationRulesPreviewData, ModelHubAnnotationQueuesAutomationRulesPreviewErrors, ModelHubAnnotationQueuesAutomationRulesPreviewResponses, ModelHubAnnotationQueuesAutomationRulesReadData, ModelHubAnnotationQueuesAutomationRulesReadErrors, ModelHubAnnotationQueuesAutomationRulesReadResponses, ModelHubAnnotationQueuesAutomationRulesUpdateData, ModelHubAnnotationQueuesAutomationRulesUpdateErrors, ModelHubAnnotationQueuesAutomationRulesUpdateResponses, ModelHubAnnotationQueuesForSourceData, ModelHubAnnotationQueuesForSourceErrors, ModelHubAnnotationQueuesForSourceResponses, ModelHubAnnotationQueuesGetOrCreateDefaultData, ModelHubAnnotationQueuesGetOrCreateDefaultErrors, ModelHubAnnotationQueuesGetOrCreateDefaultResponses, ModelHubAnnotationQueuesHardDeleteData, ModelHubAnnotationQueuesHardDeleteErrors, ModelHubAnnotationQueuesHardDeleteResponses, ModelHubAnnotationQueuesItemsCreateData, ModelHubAnnotationQueuesItemsCreateErrors, ModelHubAnnotationQueuesItemsCreateResponses, ModelHubAnnotationQueuesItemsDeleteData, ModelHubAnnotationQueuesItemsDeleteErrors, ModelHubAnnotationQueuesItemsDeleteResponses, ModelHubAnnotationQueuesItemsPartialUpdateData, ModelHubAnnotationQueuesItemsPartialUpdateErrors, ModelHubAnnotationQueuesItemsPartialUpdateResponses, ModelHubAnnotationQueuesItemsReadData, ModelHubAnnotationQueuesItemsReadErrors, ModelHubAnnotationQueuesItemsReadResponses, ModelHubAnnotationQueuesItemsUpdateData, ModelHubAnnotationQueuesItemsUpdateErrors, ModelHubAnnotationQueuesItemsUpdateResponses, ModelHubAnnotationQueuesRestoreData, ModelHubAnnotationQueuesRestoreErrors, ModelHubAnnotationQueuesRestoreResponses, ModelHubAnnotationQueuesUpdateData, ModelHubAnnotationQueuesUpdateErrors, ModelHubAnnotationQueuesUpdateResponses, ModelHubAnnotationsLabelsCreateData, ModelHubAnnotationsLabelsCreateErrors, ModelHubAnnotationsLabelsCreateResponses, ModelHubAnnotationsLabelsDeleteData, ModelHubAnnotationsLabelsDeleteErrors, ModelHubAnnotationsLabelsDeleteResponses, ModelHubAnnotationsLabelsListData, ModelHubAnnotationsLabelsListErrors, ModelHubAnnotationsLabelsListResponses, ModelHubAnnotationsLabelsPartialUpdateData, ModelHubAnnotationsLabelsPartialUpdateErrors, ModelHubAnnotationsLabelsPartialUpdateResponses, ModelHubAnnotationsLabelsReadData, ModelHubAnnotationsLabelsReadErrors, ModelHubAnnotationsLabelsReadResponses, ModelHubAnnotationsLabelsRestoreData, ModelHubAnnotationsLabelsRestoreErrors, ModelHubAnnotationsLabelsRestoreResponses, ModelHubAnnotationsLabelsUpdateData, ModelHubAnnotationsLabelsUpdateErrors, ModelHubAnnotationsLabelsUpdateResponses, ModelHubApiKeysCreateData, ModelHubApiKeysCreateErrors, ModelHubApiKeysCreateResponses, ModelHubApiKeysDeleteData, ModelHubApiKeysDeleteErrors, ModelHubApiKeysDeleteResponses, ModelHubApiKeysListData, ModelHubApiKeysListErrors, ModelHubApiKeysListResponses, ModelHubApiKeysPartialUpdateData, ModelHubApiKeysPartialUpdateErrors, ModelHubApiKeysPartialUpdateResponses, ModelHubApiKeysReadData, ModelHubApiKeysReadErrors, ModelHubApiKeysReadResponses, ModelHubApiKeysUpdateData, ModelHubApiKeysUpdateErrors, ModelHubApiKeysUpdateResponses, ModelHubApiModelsListListData, ModelHubApiModelsListListErrors, ModelHubApiModelsListListResponses, ModelHubDatasetRunPromptStatsListData, ModelHubDatasetRunPromptStatsListErrors, ModelHubDatasetRunPromptStatsListResponses, ModelHubDatasetsAddApiColumnCreateData, ModelHubDatasetsAddApiColumnCreateErrors, ModelHubDatasetsAddApiColumnCreateResponses, ModelHubDatasetsAddVectorDbColumnCreateData, ModelHubDatasetsAddVectorDbColumnCreateErrors, ModelHubDatasetsAddVectorDbColumnCreateResponses, ModelHubDatasetsClassifyColumnCreateData, ModelHubDatasetsClassifyColumnCreateErrors, ModelHubDatasetsClassifyColumnCreateResponses, ModelHubDatasetsCompareDatasetsAddEvalCreateData, ModelHubDatasetsCompareDatasetsAddEvalCreateErrors, ModelHubDatasetsCompareDatasetsAddEvalCreateResponses, ModelHubDatasetsCompareDatasetsCreateData, ModelHubDatasetsCompareDatasetsCreateErrors, ModelHubDatasetsCompareDatasetsCreateResponses, ModelHubDatasetsCompareDatasetsDownloadCreateData, ModelHubDatasetsCompareDatasetsDownloadCreateErrors, ModelHubDatasetsCompareDatasetsDownloadCreateResponses, ModelHubDatasetsCompareDatasetsStartEvalCreateData, ModelHubDatasetsCompareDatasetsStartEvalCreateErrors, ModelHubDatasetsCompareDatasetsStartEvalCreateResponses, ModelHubDatasetsCompareGetEvalsListCreateData, ModelHubDatasetsCompareGetEvalsListCreateErrors, ModelHubDatasetsCompareGetEvalsListCreateResponses, ModelHubDatasetsComparePreviewRunEvalCreateData, ModelHubDatasetsComparePreviewRunEvalCreateErrors, ModelHubDatasetsComparePreviewRunEvalCreateResponses, ModelHubDatasetsCompareStatsCreateData, ModelHubDatasetsCompareStatsCreateErrors, ModelHubDatasetsCompareStatsCreateResponses, ModelHubDatasetsConditionalColumnCreateData, ModelHubDatasetsConditionalColumnCreateErrors, ModelHubDatasetsConditionalColumnCreateResponses, ModelHubDatasetsDeleteCompareDeleteData, ModelHubDatasetsDeleteCompareDeleteErrors, ModelHubDatasetsDeleteCompareDeleteResponses, ModelHubDatasetsDeleteCompareReadData, ModelHubDatasetsDeleteCompareReadErrors, ModelHubDatasetsDeleteCompareReadResponses, ModelHubDatasetsDuplicateRowsCreateData, ModelHubDatasetsDuplicateRowsCreateErrors, ModelHubDatasetsDuplicateRowsCreateResponses, ModelHubDatasetsExplanationSummaryReadData, ModelHubDatasetsExplanationSummaryReadErrors, ModelHubDatasetsExplanationSummaryReadResponses, ModelHubDatasetsExplanationSummaryRefreshCreateData, ModelHubDatasetsExplanationSummaryRefreshCreateErrors, ModelHubDatasetsExplanationSummaryRefreshCreateResponses, ModelHubDatasetsExtractEntitiesCreateData, ModelHubDatasetsExtractEntitiesCreateErrors, ModelHubDatasetsExtractEntitiesCreateResponses, ModelHubDatasetsGetCompareRowDeleteData, ModelHubDatasetsGetCompareRowDeleteErrors, ModelHubDatasetsGetCompareRowDeleteResponses, ModelHubDatasetsGetCompareRowReadData, ModelHubDatasetsGetCompareRowReadErrors, ModelHubDatasetsGetCompareRowReadResponses, ModelHubDatasetsHuggingfaceDetailCreateData, ModelHubDatasetsHuggingfaceDetailCreateErrors, ModelHubDatasetsHuggingfaceDetailCreateResponses, ModelHubDatasetsHuggingfaceListCreateData, ModelHubDatasetsHuggingfaceListCreateErrors, ModelHubDatasetsHuggingfaceListCreateResponses, ModelHubDatasetsMergeCreateData, ModelHubDatasetsMergeCreateErrors, ModelHubDatasetsMergeCreateResponses, ModelHubDatasetsPreviewCreateData, ModelHubDatasetsPreviewCreateErrors, ModelHubDatasetsPreviewCreateResponses, ModelHubDeleteEvalTemplateCreateData, ModelHubDeleteEvalTemplateCreateErrors, ModelHubDeleteEvalTemplateCreateResponses, ModelHubDevelopsAddAsNewCreateData, ModelHubDevelopsAddAsNewCreateErrors, ModelHubDevelopsAddAsNewCreateResponses, ModelHubDevelopsAddEmptyColumnsCreateData, ModelHubDevelopsAddEmptyColumnsCreateErrors, ModelHubDevelopsAddEmptyColumnsCreateResponses, ModelHubDevelopsAddEmptyRowsCreateData, ModelHubDevelopsAddEmptyRowsCreateErrors, ModelHubDevelopsAddEmptyRowsCreateResponses, ModelHubDevelopsAddMultipleStaticColumnsCreateData, ModelHubDevelopsAddMultipleStaticColumnsCreateErrors, ModelHubDevelopsAddMultipleStaticColumnsCreateResponses, ModelHubDevelopsAddRowsFromExistingDatasetCreateData, ModelHubDevelopsAddRowsFromExistingDatasetCreateErrors, ModelHubDevelopsAddRowsFromExistingDatasetCreateResponses, ModelHubDevelopsAddRowsFromFileCreateData, ModelHubDevelopsAddRowsFromFileCreateErrors, ModelHubDevelopsAddRowsFromFileCreateResponses, ModelHubDevelopsAddRowsFromHuggingfaceCreateData, ModelHubDevelopsAddRowsFromHuggingfaceCreateErrors, ModelHubDevelopsAddRowsFromHuggingfaceCreateResponses, ModelHubDevelopsAddRowsSdkCreateData, ModelHubDevelopsAddRowsSdkCreateErrors, ModelHubDevelopsAddRowsSdkCreateResponses, ModelHubDevelopsAddRunPromptColumnCreateData, ModelHubDevelopsAddRunPromptColumnCreateErrors, ModelHubDevelopsAddRunPromptColumnCreateResponses, ModelHubDevelopsAddStaticColumnCreateData, ModelHubDevelopsAddStaticColumnCreateErrors, ModelHubDevelopsAddStaticColumnCreateResponses, ModelHubDevelopsAddSyntheticDataCreateData, ModelHubDevelopsAddSyntheticDataCreateErrors, ModelHubDevelopsAddSyntheticDataCreateResponses, ModelHubDevelopsAddUserEvalCreateData, ModelHubDevelopsAddUserEvalCreateErrors, ModelHubDevelopsAddUserEvalCreateResponses, ModelHubDevelopsCloneDatasetCreateData, ModelHubDevelopsCloneDatasetCreateErrors, ModelHubDevelopsCloneDatasetCreateResponses, ModelHubDevelopsCreateDatasetCreateData, ModelHubDevelopsCreateDatasetCreateErrors, ModelHubDevelopsCreateDatasetCreateResponses, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateData, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateErrors, ModelHubDevelopsCreateDatasetFromHuggingfaceCreateResponses, ModelHubDevelopsCreateSyntheticDatasetCreateData, ModelHubDevelopsCreateSyntheticDatasetCreateErrors, ModelHubDevelopsCreateSyntheticDatasetCreateResponses, ModelHubDevelopsDatasetCreationProgressReadData, ModelHubDevelopsDatasetCreationProgressReadErrors, ModelHubDevelopsDatasetCreationProgressReadResponses, ModelHubDevelopsDeleteDatasetDeleteData, ModelHubDevelopsDeleteDatasetDeleteErrors, ModelHubDevelopsDeleteDatasetDeleteResponses, ModelHubDevelopsDeleteTemplateEvalDeleteData, ModelHubDevelopsDeleteTemplateEvalDeleteErrors, ModelHubDevelopsDeleteTemplateEvalDeleteResponses, ModelHubDevelopsDeleteUserEvalDeleteData, ModelHubDevelopsDeleteUserEvalDeleteErrors, ModelHubDevelopsDeleteUserEvalDeleteResponses, ModelHubDevelopsEditAndRunUserEvalCreateData, ModelHubDevelopsEditAndRunUserEvalCreateErrors, ModelHubDevelopsEditAndRunUserEvalCreateResponses, ModelHubDevelopsEditDatasetBehaviorUpdateData, ModelHubDevelopsEditDatasetBehaviorUpdateErrors, ModelHubDevelopsEditDatasetBehaviorUpdateResponses, ModelHubDevelopsEditRunPromptColumnCreateData, ModelHubDevelopsEditRunPromptColumnCreateErrors, ModelHubDevelopsEditRunPromptColumnCreateResponses, ModelHubDevelopsExtractJsonColumnCreateData, ModelHubDevelopsExtractJsonColumnCreateErrors, ModelHubDevelopsExtractJsonColumnCreateResponses, ModelHubDevelopsGetCellDataCreateData, ModelHubDevelopsGetCellDataCreateErrors, ModelHubDevelopsGetCellDataCreateResponses, ModelHubDevelopsGetDerivedDatasetsReadData, ModelHubDevelopsGetDerivedDatasetsReadErrors, ModelHubDevelopsGetDerivedDatasetsReadResponses, ModelHubDevelopsGetEvalsListListData, ModelHubDevelopsGetEvalsListListErrors, ModelHubDevelopsGetEvalsListListResponses, ModelHubDevelopsGetEvalStructureReadData, ModelHubDevelopsGetEvalStructureReadErrors, ModelHubDevelopsGetEvalStructureReadResponses, ModelHubDevelopsGetExperimentDatasetTableListData, ModelHubDevelopsGetExperimentDatasetTableListErrors, ModelHubDevelopsGetExperimentDatasetTableListResponses, ModelHubDevelopsGetFunctionListListData, ModelHubDevelopsGetFunctionListListErrors, ModelHubDevelopsGetFunctionListListResponses, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateData, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateErrors, ModelHubDevelopsGetHuggingfaceDatasetConfigCreateResponses, ModelHubDevelopsGetRowDiffCreateData, ModelHubDevelopsGetRowDiffCreateErrors, ModelHubDevelopsGetRowDiffCreateResponses, ModelHubDevelopsPreviewRunEvalCreateData, ModelHubDevelopsPreviewRunEvalCreateErrors, ModelHubDevelopsPreviewRunEvalCreateResponses, ModelHubDevelopsPreviewRunPromptColumnCreateData, ModelHubDevelopsPreviewRunPromptColumnCreateErrors, ModelHubDevelopsPreviewRunPromptColumnCreateResponses, ModelHubDevelopsProviderStatusListData, ModelHubDevelopsProviderStatusListErrors, ModelHubDevelopsProviderStatusListResponses, ModelHubDevelopsRetrieveRunPromptColumnConfigListData, ModelHubDevelopsRetrieveRunPromptColumnConfigListErrors, ModelHubDevelopsRetrieveRunPromptColumnConfigListResponses, ModelHubDevelopsRetrieveRunPromptOptionsListData, ModelHubDevelopsRetrieveRunPromptOptionsListErrors, ModelHubDevelopsRetrieveRunPromptOptionsListResponses, ModelHubDevelopsStartEvalsProcessCreateData, ModelHubDevelopsStartEvalsProcessCreateErrors, ModelHubDevelopsStartEvalsProcessCreateResponses, ModelHubDevelopsStopUserEvalCreateData, ModelHubDevelopsStopUserEvalCreateErrors, ModelHubDevelopsStopUserEvalCreateResponses, ModelHubDevelopsSyntheticConfigListData, ModelHubDevelopsSyntheticConfigListErrors, ModelHubDevelopsSyntheticConfigListResponses, ModelHubDevelopsUpdateColumnNameUpdateData, ModelHubDevelopsUpdateColumnNameUpdateErrors, ModelHubDevelopsUpdateColumnNameUpdateResponses, ModelHubDevelopsUpdateColumnTypeUpdateData, ModelHubDevelopsUpdateColumnTypeUpdateErrors, ModelHubDevelopsUpdateColumnTypeUpdateResponses, ModelHubDevelopsUpdateSyntheticConfigUpdateData, ModelHubDevelopsUpdateSyntheticConfigUpdateErrors, ModelHubDevelopsUpdateSyntheticConfigUpdateResponses, ModelHubEvalTemplatesBulkDeleteCreateData, ModelHubEvalTemplatesBulkDeleteCreateErrors, ModelHubEvalTemplatesBulkDeleteCreateResponses, ModelHubEvalTemplatesCompositeExecuteAdhocCreateData, ModelHubEvalTemplatesCompositeExecuteAdhocCreateErrors, ModelHubEvalTemplatesCompositeExecuteAdhocCreateResponses, ModelHubEvalTemplatesCompositeExecuteCreateData, ModelHubEvalTemplatesCompositeExecuteCreateErrors, ModelHubEvalTemplatesCompositeExecuteCreateResponses, ModelHubEvalTemplatesCompositeListData, ModelHubEvalTemplatesCompositeListErrors, ModelHubEvalTemplatesCompositeListResponses, ModelHubEvalTemplatesCompositePartialUpdateData, ModelHubEvalTemplatesCompositePartialUpdateErrors, ModelHubEvalTemplatesCompositePartialUpdateResponses, ModelHubEvalTemplatesCreateCompositeCreateData, ModelHubEvalTemplatesCreateCompositeCreateErrors, ModelHubEvalTemplatesCreateCompositeCreateResponses, ModelHubEvalTemplatesCreateV2CreateData, ModelHubEvalTemplatesCreateV2CreateErrors, ModelHubEvalTemplatesCreateV2CreateResponses, ModelHubEvalTemplatesDetailListData, ModelHubEvalTemplatesDetailListErrors, ModelHubEvalTemplatesDetailListResponses, ModelHubEvalTemplatesFeedbackListListData, ModelHubEvalTemplatesFeedbackListListErrors, ModelHubEvalTemplatesFeedbackListListResponses, ModelHubEvalTemplatesGroundTruthConfigListData, ModelHubEvalTemplatesGroundTruthConfigListErrors, ModelHubEvalTemplatesGroundTruthConfigListResponses, ModelHubEvalTemplatesGroundTruthConfigUpdateData, ModelHubEvalTemplatesGroundTruthConfigUpdateErrors, ModelHubEvalTemplatesGroundTruthConfigUpdateResponses, ModelHubEvalTemplatesGroundTruthListData, ModelHubEvalTemplatesGroundTruthListErrors, ModelHubEvalTemplatesGroundTruthListResponses, ModelHubEvalTemplatesGroundTruthUploadCreateData, ModelHubEvalTemplatesGroundTruthUploadCreateErrors, ModelHubEvalTemplatesGroundTruthUploadCreateResponses, ModelHubEvalTemplatesListChartsCreateData, ModelHubEvalTemplatesListChartsCreateErrors, ModelHubEvalTemplatesListChartsCreateResponses, ModelHubEvalTemplatesListCreateData, ModelHubEvalTemplatesListCreateErrors, ModelHubEvalTemplatesListCreateResponses, ModelHubEvalTemplatesUpdateUpdateData, ModelHubEvalTemplatesUpdateUpdateErrors, ModelHubEvalTemplatesUpdateUpdateResponses, ModelHubEvalTemplatesUsageListData, ModelHubEvalTemplatesUsageListErrors, ModelHubEvalTemplatesUsageListResponses, ModelHubEvalTemplatesVersionsCreateCreateData, ModelHubEvalTemplatesVersionsCreateCreateErrors, ModelHubEvalTemplatesVersionsCreateCreateResponses, ModelHubEvalTemplatesVersionsListData, ModelHubEvalTemplatesVersionsListErrors, ModelHubEvalTemplatesVersionsListResponses, ModelHubEvalTemplatesVersionsRestoreCreateData, ModelHubEvalTemplatesVersionsRestoreCreateErrors, ModelHubEvalTemplatesVersionsRestoreCreateResponses, ModelHubEvalTemplatesVersionsSetDefaultUpdateData, ModelHubEvalTemplatesVersionsSetDefaultUpdateErrors, ModelHubEvalTemplatesVersionsSetDefaultUpdateResponses, ModelHubExperimentsV2DerivedVariablesListData, ModelHubExperimentsV2DerivedVariablesListErrors, ModelHubExperimentsV2DerivedVariablesListResponses, ModelHubExperimentsV2EvaluationsStatsListData, ModelHubExperimentsV2EvaluationsStatsListErrors, ModelHubExperimentsV2EvaluationsStatsListResponses, ModelHubExperimentsV2FeedbackCreateData, ModelHubExperimentsV2FeedbackCreateErrors, ModelHubExperimentsV2FeedbackCreateResponses, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListData, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListErrors, ModelHubExperimentsV2FeedbackGetFeedbackDetailsListResponses, ModelHubExperimentsV2FeedbackGetTemplateListData, ModelHubExperimentsV2FeedbackGetTemplateListErrors, ModelHubExperimentsV2FeedbackGetTemplateListResponses, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateData, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateErrors, ModelHubExperimentsV2FeedbackSubmitFeedbackCreateResponses, ModelHubExperimentsV2RerunCellsCreateData, ModelHubExperimentsV2RerunCellsCreateErrors, ModelHubExperimentsV2RerunCellsCreateResponses, ModelHubExperimentsV2RowDiffCreateData, ModelHubExperimentsV2RowDiffCreateErrors, ModelHubExperimentsV2RowDiffCreateResponses, ModelHubExperimentsV2SuggestNameReadData, ModelHubExperimentsV2SuggestNameReadErrors, ModelHubExperimentsV2SuggestNameReadResponses, ModelHubExperimentsV2ValidateNameListData, ModelHubExperimentsV2ValidateNameListErrors, ModelHubExperimentsV2ValidateNameListResponses, ModelHubKnowledgeBaseCreateData, ModelHubKnowledgeBaseCreateErrors, ModelHubKnowledgeBaseCreateResponses, ModelHubKnowledgeBaseDeleteData, ModelHubKnowledgeBaseDeleteErrors, ModelHubKnowledgeBaseDeleteResponses, ModelHubKnowledgeBaseFilesCreateData, ModelHubKnowledgeBaseFilesCreateErrors, ModelHubKnowledgeBaseFilesCreateResponses, ModelHubKnowledgeBaseFilesDeleteData, ModelHubKnowledgeBaseFilesDeleteErrors, ModelHubKnowledgeBaseFilesDeleteResponses, ModelHubKnowledgeBaseGetListData, ModelHubKnowledgeBaseGetListErrors, ModelHubKnowledgeBaseGetListResponses, ModelHubKnowledgeBaseListData, ModelHubKnowledgeBaseListErrors, ModelHubKnowledgeBaseListListData, ModelHubKnowledgeBaseListListErrors, ModelHubKnowledgeBaseListListResponses, ModelHubKnowledgeBaseListResponses, ModelHubKnowledgeBasePartialUpdateData, ModelHubKnowledgeBasePartialUpdateErrors, ModelHubKnowledgeBasePartialUpdateResponses, ModelHubPromptHistoryExecutionsGetExecutionDetailsData, ModelHubPromptHistoryExecutionsGetExecutionDetailsErrors, ModelHubPromptHistoryExecutionsGetExecutionDetailsResponses, ModelHubPromptHistoryExecutionsListData, ModelHubPromptHistoryExecutionsListErrors, ModelHubPromptHistoryExecutionsListResponses, ModelHubPromptHistoryExecutionsReadData, ModelHubPromptHistoryExecutionsReadErrors, ModelHubPromptHistoryExecutionsReadResponses, ModelHubPromptLabelsAssignLabelByIdData, ModelHubPromptLabelsAssignLabelByIdErrors, ModelHubPromptLabelsAssignLabelByIdResponses, ModelHubPromptLabelsAssignMultipleLabelsData, ModelHubPromptLabelsAssignMultipleLabelsErrors, ModelHubPromptLabelsAssignMultipleLabelsResponses, ModelHubPromptLabelsCreateData, ModelHubPromptLabelsCreateErrors, ModelHubPromptLabelsCreateResponses, ModelHubPromptLabelsCreateSystemLabelsData, ModelHubPromptLabelsCreateSystemLabelsErrors, ModelHubPromptLabelsCreateSystemLabelsResponses, ModelHubPromptLabelsDeleteData, ModelHubPromptLabelsDeleteErrors, ModelHubPromptLabelsDeleteResponses, ModelHubPromptLabelsGetByNameData, ModelHubPromptLabelsGetByNameErrors, ModelHubPromptLabelsGetByNameResponses, ModelHubPromptLabelsListData, ModelHubPromptLabelsListErrors, ModelHubPromptLabelsListResponses, ModelHubPromptLabelsPartialUpdateData, ModelHubPromptLabelsPartialUpdateErrors, ModelHubPromptLabelsPartialUpdateResponses, ModelHubPromptLabelsReadData, ModelHubPromptLabelsReadErrors, ModelHubPromptLabelsReadResponses, ModelHubPromptLabelsRemoveLabelFromVersionData, ModelHubPromptLabelsRemoveLabelFromVersionErrors, ModelHubPromptLabelsRemoveLabelFromVersionResponses, ModelHubPromptLabelsSetDefaultData, ModelHubPromptLabelsSetDefaultErrors, ModelHubPromptLabelsSetDefaultResponses, ModelHubPromptLabelsTemplateLabelsData, ModelHubPromptLabelsTemplateLabelsErrors, ModelHubPromptLabelsTemplateLabelsResponses, ModelHubPromptLabelsUpdateData, ModelHubPromptLabelsUpdateErrors, ModelHubPromptLabelsUpdateResponses, ModelHubPromptTemplatesAddNewDraftData, ModelHubPromptTemplatesAddNewDraftErrors, ModelHubPromptTemplatesAddNewDraftResponses, ModelHubPromptTemplatesAnalyzePromptData, ModelHubPromptTemplatesAnalyzePromptErrors, ModelHubPromptTemplatesAnalyzePromptResponses, ModelHubPromptTemplatesBulkDeleteData, ModelHubPromptTemplatesBulkDeleteErrors, ModelHubPromptTemplatesBulkDeleteResponses, ModelHubPromptTemplatesCommitData, ModelHubPromptTemplatesCommitErrors, ModelHubPromptTemplatesCommitResponses, ModelHubPromptTemplatesCompareVersionsData, ModelHubPromptTemplatesCompareVersionsErrors, ModelHubPromptTemplatesCompareVersionsResponses, ModelHubPromptTemplatesCreateData, ModelHubPromptTemplatesCreateDraftData, ModelHubPromptTemplatesCreateDraftErrors, ModelHubPromptTemplatesCreateDraftResponses, ModelHubPromptTemplatesCreateErrors, ModelHubPromptTemplatesCreateResponses, ModelHubPromptTemplatesDeleteData, ModelHubPromptTemplatesDeleteErrors, ModelHubPromptTemplatesDeleteEvaluationConfigData, ModelHubPromptTemplatesDeleteEvaluationConfigErrors, ModelHubPromptTemplatesDeleteEvaluationConfigResponses, ModelHubPromptTemplatesDeleteResponses, ModelHubPromptTemplatesDerivedVariablesExtractCreateData, ModelHubPromptTemplatesDerivedVariablesExtractCreateErrors, ModelHubPromptTemplatesDerivedVariablesExtractCreateResponses, ModelHubPromptTemplatesDerivedVariablesListData, ModelHubPromptTemplatesDerivedVariablesListErrors, ModelHubPromptTemplatesDerivedVariablesListResponses, ModelHubPromptTemplatesDerivedVariablesPreviewCreateData, ModelHubPromptTemplatesDerivedVariablesPreviewCreateErrors, ModelHubPromptTemplatesDerivedVariablesPreviewCreateResponses, ModelHubPromptTemplatesDerivedVariablesSchemaListData, ModelHubPromptTemplatesDerivedVariablesSchemaListErrors, ModelHubPromptTemplatesDerivedVariablesSchemaListResponses, ModelHubPromptTemplatesGeneratePromptData, ModelHubPromptTemplatesGeneratePromptErrors, ModelHubPromptTemplatesGeneratePromptResponses, ModelHubPromptTemplatesGenerateVariablesData, ModelHubPromptTemplatesGenerateVariablesErrors, ModelHubPromptTemplatesGenerateVariablesResponses, ModelHubPromptTemplatesGetAllVariablesData, ModelHubPromptTemplatesGetAllVariablesErrors, ModelHubPromptTemplatesGetAllVariablesResponses, ModelHubPromptTemplatesGetEvaluationConfigsData, ModelHubPromptTemplatesGetEvaluationConfigsErrors, ModelHubPromptTemplatesGetEvaluationConfigsResponses, ModelHubPromptTemplatesGetNextVersionData, ModelHubPromptTemplatesGetNextVersionErrors, ModelHubPromptTemplatesGetNextVersionResponses, ModelHubPromptTemplatesGetRunStatusData, ModelHubPromptTemplatesGetRunStatusErrors, ModelHubPromptTemplatesGetRunStatusResponses, ModelHubPromptTemplatesGetSdkCodeData, ModelHubPromptTemplatesGetSdkCodeErrors, ModelHubPromptTemplatesGetSdkCodeResponses, ModelHubPromptTemplatesGetTemplateByNameData, ModelHubPromptTemplatesGetTemplateByNameErrors, ModelHubPromptTemplatesGetTemplateByNameResponses, ModelHubPromptTemplatesImprovePromptData, ModelHubPromptTemplatesImprovePromptErrors, ModelHubPromptTemplatesImprovePromptResponses, ModelHubPromptTemplatesListData, ModelHubPromptTemplatesListErrors, ModelHubPromptTemplatesListResponses, ModelHubPromptTemplatesPartialUpdateData, ModelHubPromptTemplatesPartialUpdateErrors, ModelHubPromptTemplatesPartialUpdateResponses, ModelHubPromptTemplatesReadData, ModelHubPromptTemplatesReadErrors, ModelHubPromptTemplatesReadResponses, ModelHubPromptTemplatesRetrieveEvaluationsData, ModelHubPromptTemplatesRetrieveEvaluationsErrors, ModelHubPromptTemplatesRetrieveEvaluationsResponses, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsData, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsErrors, ModelHubPromptTemplatesRunEvalsOnMultipleVersionsResponses, ModelHubPromptTemplatesRunTemplateData, ModelHubPromptTemplatesRunTemplateErrors, ModelHubPromptTemplatesRunTemplateResponses, ModelHubPromptTemplatesSaveNameData, ModelHubPromptTemplatesSaveNameErrors, ModelHubPromptTemplatesSaveNameResponses, ModelHubPromptTemplatesSavePromptFolderData, ModelHubPromptTemplatesSavePromptFolderErrors, ModelHubPromptTemplatesSavePromptFolderResponses, ModelHubPromptTemplatesSetDefaultData, ModelHubPromptTemplatesSetDefaultErrors, ModelHubPromptTemplatesSetDefaultResponses, ModelHubPromptTemplatesStopStreamingData, ModelHubPromptTemplatesStopStreamingErrors, ModelHubPromptTemplatesStopStreamingResponses, ModelHubPromptTemplatesUpdateData, ModelHubPromptTemplatesUpdateErrors, ModelHubPromptTemplatesUpdateEvaluationConfigsData, ModelHubPromptTemplatesUpdateEvaluationConfigsErrors, ModelHubPromptTemplatesUpdateEvaluationConfigsResponses, ModelHubPromptTemplatesUpdateResponses, ModelHubPromptTemplatesVersionsData, ModelHubPromptTemplatesVersionsErrors, ModelHubPromptTemplatesVersionsResponses, ModelHubScoresBulkCreateData, ModelHubScoresBulkCreateErrors, ModelHubScoresBulkCreateResponses, ModelHubScoresCreateData, ModelHubScoresCreateErrors, ModelHubScoresCreateResponses, ModelHubScoresDeleteData, ModelHubScoresDeleteErrors, ModelHubScoresDeleteResponses, ModelHubScoresForSourceData, ModelHubScoresForSourceErrors, ModelHubScoresForSourceResponses, ModelHubScoresListData, ModelHubScoresListErrors, ModelHubScoresListResponses, ModelHubScoresPartialUpdateData, ModelHubScoresPartialUpdateErrors, ModelHubScoresPartialUpdateResponses, ModelHubScoresReadData, ModelHubScoresReadErrors, ModelHubScoresReadResponses, ModelHubScoresUpdateData, ModelHubScoresUpdateErrors, ModelHubScoresUpdateResponses, PreviewAlertGraphData, PreviewAlertGraphErrors, PreviewAlertGraphResponses, ReleaseAnnotationQueueItemData, ReleaseAnnotationQueueItemErrors, ReleaseAnnotationQueueItemResponses, RemoveAnnotationQueueItemsData, RemoveAnnotationQueueItemsErrors, RemoveAnnotationQueueItemsResponses, RemoveAnnotationQueueLabelData, RemoveAnnotationQueueLabelErrors, RemoveAnnotationQueueLabelResponses, ReopenAnnotationQueueItemThreadData, ReopenAnnotationQueueItemThreadErrors, ReopenAnnotationQueueItemThreadResponses, RerunExperimentData, RerunExperimentErrors, RerunExperimentResponses, ResolveAlertLogsData, ResolveAlertLogsErrors, ResolveAlertLogsResponses, ResolveAnnotationQueueItemThreadData, ResolveAnnotationQueueItemThreadErrors, ResolveAnnotationQueueItemThreadResponses, ReviewAnnotationQueueItemData, ReviewAnnotationQueueItemErrors, ReviewAnnotationQueueItemResponses, SdkApiV1ConfigureEvaluationsCreateData, SdkApiV1ConfigureEvaluationsCreateErrors, SdkApiV1ConfigureEvaluationsCreateResponses, SdkApiV1EvalCreateData, SdkApiV1EvalCreateErrors, SdkApiV1EvalCreateResponses, SdkApiV1EvalReadData, SdkApiV1EvalReadErrors, SdkApiV1EvalReadResponses, SdkApiV1EvaluatePipelineCreateData, SdkApiV1EvaluatePipelineCreateErrors, SdkApiV1EvaluatePipelineCreateResponses, SdkApiV1EvaluatePipelineListData, SdkApiV1EvaluatePipelineListErrors, SdkApiV1EvaluatePipelineListResponses, SdkApiV1GetEvalsListData, SdkApiV1GetEvalsListErrors, SdkApiV1GetEvalsListResponses, SdkApiV1NewEvalCreateData, SdkApiV1NewEvalCreateErrors, SdkApiV1NewEvalCreateResponses, SdkApiV1NewEvalListData, SdkApiV1NewEvalListErrors, SdkApiV1NewEvalListResponses, SimulateAgentDefinitionsDeleteData, SimulateAgentDefinitionsDeleteErrors, SimulateAgentDefinitionsDeleteResponses, SimulateAgentDefinitionsVersionsActivateCreateData, SimulateAgentDefinitionsVersionsActivateCreateErrors, SimulateAgentDefinitionsVersionsActivateCreateResponses, SimulateAgentDefinitionsVersionsCallExecutionsListData, SimulateAgentDefinitionsVersionsCallExecutionsListErrors, SimulateAgentDefinitionsVersionsCallExecutionsListResponses, SimulateAgentDefinitionsVersionsCreateCreateData, SimulateAgentDefinitionsVersionsCreateCreateErrors, SimulateAgentDefinitionsVersionsCreateCreateResponses, SimulateAgentDefinitionsVersionsDeleteDeleteData, SimulateAgentDefinitionsVersionsDeleteDeleteErrors, SimulateAgentDefinitionsVersionsDeleteDeleteResponses, SimulateAgentDefinitionsVersionsEvalSummaryListData, SimulateAgentDefinitionsVersionsEvalSummaryListErrors, SimulateAgentDefinitionsVersionsEvalSummaryListResponses, SimulateAgentDefinitionsVersionsListData, SimulateAgentDefinitionsVersionsListErrors, SimulateAgentDefinitionsVersionsListResponses, SimulateAgentDefinitionsVersionsReadData, SimulateAgentDefinitionsVersionsReadErrors, SimulateAgentDefinitionsVersionsReadResponses, SimulateAgentDefinitionsVersionsRestoreCreateData, SimulateAgentDefinitionsVersionsRestoreCreateErrors, SimulateAgentDefinitionsVersionsRestoreCreateResponses, SimulateApiCallExecutionsListData, SimulateApiCallExecutionsListErrors, SimulateApiCallExecutionsListResponses, SimulateApiPersonasDuplicateCreateData, SimulateApiPersonasDuplicateCreateErrors, SimulateApiPersonasDuplicateCreateResponses, SimulateApiPersonasDuplicateData, SimulateApiPersonasDuplicateErrors, SimulateApiPersonasDuplicateResponses, SimulateApiPersonasFieldOptionsData, SimulateApiPersonasFieldOptionsErrors, SimulateApiPersonasFieldOptionsResponses, SimulateApiPersonasSystemPersonasData, SimulateApiPersonasSystemPersonasErrors, SimulateApiPersonasSystemPersonasResponses, SimulateApiPersonasUpdateData, SimulateApiPersonasUpdateErrors, SimulateApiPersonasUpdateResponses, SimulateApiPersonasWorkspacePersonasData, SimulateApiPersonasWorkspacePersonasErrors, SimulateApiPersonasWorkspacePersonasResponses, SimulateApiRunTestsListData, SimulateApiRunTestsListErrors, SimulateApiRunTestsListResponses, SimulateCallExecutionsBranchAnalysisCreateData, SimulateCallExecutionsBranchAnalysisCreateErrors, SimulateCallExecutionsBranchAnalysisCreateResponses, SimulateCallExecutionsBranchAnalysisListData, SimulateCallExecutionsBranchAnalysisListErrors, SimulateCallExecutionsBranchAnalysisListResponses, SimulateCallExecutionsChatSendMessageCreateData, SimulateCallExecutionsChatSendMessageCreateErrors, SimulateCallExecutionsChatSendMessageCreateResponses, SimulateCallExecutionsDeleteDeleteData, SimulateCallExecutionsDeleteDeleteErrors, SimulateCallExecutionsDeleteDeleteResponses, SimulateCallExecutionsErrorLocalizerTasksListData, SimulateCallExecutionsErrorLocalizerTasksListErrors, SimulateCallExecutionsErrorLocalizerTasksListResponses, SimulateCallExecutionsLogsListData, SimulateCallExecutionsLogsListErrors, SimulateCallExecutionsLogsListResponses, SimulateCallExecutionsPartialUpdateData, SimulateCallExecutionsPartialUpdateErrors, SimulateCallExecutionsPartialUpdateResponses, SimulateCallExecutionsReadData, SimulateCallExecutionsReadErrors, SimulateCallExecutionsReadResponses, SimulateCallExecutionsSessionComparisonListData, SimulateCallExecutionsSessionComparisonListErrors, SimulateCallExecutionsSessionComparisonListResponses, SimulateCallExecutionsTranscriptsListData, SimulateCallExecutionsTranscriptsListErrors, SimulateCallExecutionsTranscriptsListResponses, SimulateExportReadData, SimulateExportReadErrors, SimulateExportReadResponses, SimulatePromptSimulationsScenariosListData, SimulatePromptSimulationsScenariosListErrors, SimulatePromptSimulationsScenariosListResponses, SimulatePromptTemplatesSimulationsCreateData, SimulatePromptTemplatesSimulationsCreateErrors, SimulatePromptTemplatesSimulationsCreateResponses, SimulatePromptTemplatesSimulationsDeleteData, SimulatePromptTemplatesSimulationsDeleteErrors, SimulatePromptTemplatesSimulationsDeleteResponses, SimulatePromptTemplatesSimulationsExecuteCreateData, SimulatePromptTemplatesSimulationsExecuteCreateErrors, SimulatePromptTemplatesSimulationsExecuteCreateResponses, SimulatePromptTemplatesSimulationsListData, SimulatePromptTemplatesSimulationsListErrors, SimulatePromptTemplatesSimulationsListResponses, SimulatePromptTemplatesSimulationsPartialUpdateData, SimulatePromptTemplatesSimulationsPartialUpdateErrors, SimulatePromptTemplatesSimulationsPartialUpdateResponses, SimulatePromptTemplatesSimulationsReadData, SimulatePromptTemplatesSimulationsReadErrors, SimulatePromptTemplatesSimulationsReadResponses, SimulateRunTestsActiveListData, SimulateRunTestsActiveListErrors, SimulateRunTestsActiveListResponses, SimulateRunTestsChatExecuteCreateData, SimulateRunTestsChatExecuteCreateErrors, SimulateRunTestsChatExecuteCreateResponses, SimulateRunTestsComponentsPartialUpdateData, SimulateRunTestsComponentsPartialUpdateErrors, SimulateRunTestsComponentsPartialUpdateResponses, SimulateRunTestsDeleteDeleteData, SimulateRunTestsDeleteDeleteErrors, SimulateRunTestsDeleteDeleteResponses, SimulateRunTestsDeleteTestExecutionsCreateData, SimulateRunTestsDeleteTestExecutionsCreateErrors, SimulateRunTestsDeleteTestExecutionsCreateResponses, SimulateRunTestsEvalConfigsCreateData, SimulateRunTestsEvalConfigsCreateErrors, SimulateRunTestsEvalConfigsCreateResponses, SimulateRunTestsEvalConfigsDeleteData, SimulateRunTestsEvalConfigsDeleteErrors, SimulateRunTestsEvalConfigsDeleteResponses, SimulateRunTestsEvalConfigsGetStructureListData, SimulateRunTestsEvalConfigsGetStructureListErrors, SimulateRunTestsEvalConfigsGetStructureListResponses, SimulateRunTestsEvalConfigsUpdateCreateData, SimulateRunTestsEvalConfigsUpdateCreateErrors, SimulateRunTestsEvalConfigsUpdateCreateResponses, SimulateRunTestsEvalSummaryComparisonListData, SimulateRunTestsEvalSummaryComparisonListErrors, SimulateRunTestsEvalSummaryComparisonListResponses, SimulateRunTestsEvalSummaryListData, SimulateRunTestsEvalSummaryListErrors, SimulateRunTestsEvalSummaryListResponses, SimulateRunTestsGetIdByNameReadData, SimulateRunTestsGetIdByNameReadErrors, SimulateRunTestsGetIdByNameReadResponses, SimulateRunTestsRerunTestExecutionsCreateData, SimulateRunTestsRerunTestExecutionsCreateErrors, SimulateRunTestsRerunTestExecutionsCreateResponses, SimulateRunTestsRunNewEvalsCreateData, SimulateRunTestsRunNewEvalsCreateErrors, SimulateRunTestsRunNewEvalsCreateResponses, SimulateRunTestsScenariosListData, SimulateRunTestsScenariosListErrors, SimulateRunTestsScenariosListResponses, SimulateRunTestsSdkCodeListData, SimulateRunTestsSdkCodeListErrors, SimulateRunTestsSdkCodeListResponses, SimulateScenariosAddColumnsCreateData, SimulateScenariosAddColumnsCreateErrors, SimulateScenariosAddColumnsCreateResponses, SimulateScenariosAddRowsCreateData, SimulateScenariosAddRowsCreateErrors, SimulateScenariosAddRowsCreateResponses, SimulateScenariosGetColumnsListData, SimulateScenariosGetColumnsListErrors, SimulateScenariosGetColumnsListResponses, SimulateScenariosPromptsUpdateData, SimulateScenariosPromptsUpdateErrors, SimulateScenariosPromptsUpdateResponses, SimulateSimulatorAgentsCreateCreateData, SimulateSimulatorAgentsCreateCreateErrors, SimulateSimulatorAgentsCreateCreateResponses, SimulateSimulatorAgentsDeleteDeleteData, SimulateSimulatorAgentsDeleteDeleteErrors, SimulateSimulatorAgentsDeleteDeleteResponses, SimulateSimulatorAgentsEditUpdateData, SimulateSimulatorAgentsEditUpdateErrors, SimulateSimulatorAgentsEditUpdateResponses, SimulateSimulatorAgentsListData, SimulateSimulatorAgentsListErrors, SimulateSimulatorAgentsListResponses, SimulateSimulatorAgentsReadData, SimulateSimulatorAgentsReadErrors, SimulateSimulatorAgentsReadResponses, SimulateTestExecutionsChatCallExecutionsBatchCreateData, SimulateTestExecutionsChatCallExecutionsBatchCreateErrors, SimulateTestExecutionsChatCallExecutionsBatchCreateResponses, SimulateTestExecutionsColumnOrderUpdateData, SimulateTestExecutionsColumnOrderUpdateErrors, SimulateTestExecutionsColumnOrderUpdateResponses, SimulateTestExecutionsDeleteDeleteData, SimulateTestExecutionsDeleteDeleteErrors, SimulateTestExecutionsDeleteDeleteResponses, SimulateTestExecutionsEvalExplanationSummaryListData, SimulateTestExecutionsEvalExplanationSummaryListErrors, SimulateTestExecutionsEvalExplanationSummaryListResponses, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateData, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateErrors, SimulateTestExecutionsEvalExplanationSummaryRefreshCreateResponses, SimulateTestExecutionsOptimiserAnalysisListData, SimulateTestExecutionsOptimiserAnalysisListErrors, SimulateTestExecutionsOptimiserAnalysisListResponses, SimulateTestExecutionsOptimiserAnalysisRefreshCreateData, SimulateTestExecutionsOptimiserAnalysisRefreshCreateErrors, SimulateTestExecutionsOptimiserAnalysisRefreshCreateResponses, SimulateTestExecutionsRerunCallsCreateData, SimulateTestExecutionsRerunCallsCreateErrors, SimulateTestExecutionsRerunCallsCreateResponses, SkipAnnotationQueueItemData, SkipAnnotationQueueItemErrors, SkipAnnotationQueueItemResponses, StopExperimentData, StopExperimentErrors, StopExperimentResponses, SubmitAnnotationQueueItemAnnotationsData, SubmitAnnotationQueueItemAnnotationsErrors, SubmitAnnotationQueueItemAnnotationsResponses, SwitchWorkspaceData, SwitchWorkspaceErrors, SwitchWorkspaceResponses, ToggleAnnotationQueueItemCommentReactionData, ToggleAnnotationQueueItemCommentReactionErrors, ToggleAnnotationQueueItemCommentReactionResponses, TracerFeedIssuesCreateLinearIssueCreateData, TracerFeedIssuesCreateLinearIssueCreateErrors, TracerFeedIssuesCreateLinearIssueCreateResponses, TracerFeedIssuesDeepAnalysisCreateData, TracerFeedIssuesDeepAnalysisCreateErrors, TracerFeedIssuesDeepAnalysisCreateResponses, TracerFeedIssuesOverviewListData, TracerFeedIssuesOverviewListErrors, TracerFeedIssuesOverviewListResponses, TracerFeedIssuesPartialUpdateData, TracerFeedIssuesPartialUpdateErrors, TracerFeedIssuesPartialUpdateResponses, TracerFeedIssuesRootCauseListData, TracerFeedIssuesRootCauseListErrors, TracerFeedIssuesRootCauseListResponses, TracerFeedIssuesSidebarListData, TracerFeedIssuesSidebarListErrors, TracerFeedIssuesSidebarListResponses, TracerFeedIssuesTracesListData, TracerFeedIssuesTracesListErrors, TracerFeedIssuesTracesListResponses, TracerFeedIssuesTrendsListData, TracerFeedIssuesTrendsListErrors, TracerFeedIssuesTrendsListResponses, TracerTraceAgentGraphData, TracerTraceAgentGraphErrors, TracerTraceAgentGraphResponses, TracerTraceAnnotationCreateData, TracerTraceAnnotationCreateErrors, TracerTraceAnnotationCreateResponses, TracerTraceAnnotationDeleteData, TracerTraceAnnotationDeleteErrors, TracerTraceAnnotationDeleteResponses, TracerTraceAnnotationGetAnnotationValuesData, TracerTraceAnnotationGetAnnotationValuesErrors, TracerTraceAnnotationGetAnnotationValuesResponses, TracerTraceAnnotationListData, TracerTraceAnnotationListErrors, TracerTraceAnnotationListResponses, TracerTraceAnnotationPartialUpdateData, TracerTraceAnnotationPartialUpdateErrors, TracerTraceAnnotationPartialUpdateResponses, TracerTraceAnnotationReadData, TracerTraceAnnotationReadErrors, TracerTraceAnnotationReadResponses, TracerTraceAnnotationUpdateData, TracerTraceAnnotationUpdateErrors, TracerTraceAnnotationUpdateResponses, TracerTraceBulkCreateData, TracerTraceBulkCreateErrors, TracerTraceBulkCreateResponses, TracerTraceCompareTracesData, TracerTraceCompareTracesErrors, TracerTraceCompareTracesResponses, TracerTraceCreateData, TracerTraceCreateErrors, TracerTraceCreateResponses, TracerTraceDeleteData, TracerTraceDeleteErrors, TracerTraceDeleteResponses, TracerTraceGetEvalNamesData, TracerTraceGetEvalNamesErrors, TracerTraceGetEvalNamesResponses, TracerTraceGetTraceExportDataData, TracerTraceGetTraceExportDataErrors, TracerTraceGetTraceExportDataResponses, TracerTraceGetTraceIdByIndexData, TracerTraceGetTraceIdByIndexErrors, TracerTraceGetTraceIdByIndexObserveData, TracerTraceGetTraceIdByIndexObserveErrors, TracerTraceGetTraceIdByIndexObserveResponses, TracerTraceGetTraceIdByIndexResponses, TracerTraceListData, TracerTraceListErrors, TracerTraceListResponses, TracerTraceListTracesOfSessionData, TracerTraceListTracesOfSessionErrors, TracerTraceListTracesOfSessionResponses, TracerTracePartialUpdateData, TracerTracePartialUpdateErrors, TracerTracePartialUpdateResponses, TracerTraceSessionCreateData, TracerTraceSessionCreateErrors, TracerTraceSessionCreateResponses, TracerTraceSessionDeleteData, TracerTraceSessionDeleteErrors, TracerTraceSessionDeleteResponses, TracerTraceSessionEvalLogsData, TracerTraceSessionEvalLogsErrors, TracerTraceSessionEvalLogsResponses, TracerTraceSessionGetSessionFilterValuesData, TracerTraceSessionGetSessionFilterValuesErrors, TracerTraceSessionGetSessionFilterValuesResponses, TracerTraceSessionGetTraceSessionExportDataData, TracerTraceSessionGetTraceSessionExportDataErrors, TracerTraceSessionGetTraceSessionExportDataResponses, TracerTraceSessionListData, TracerTraceSessionListErrors, TracerTraceSessionListResponses, TracerTraceSessionPartialUpdateData, TracerTraceSessionPartialUpdateErrors, TracerTraceSessionPartialUpdateResponses, TracerTraceSessionUpdateData, TracerTraceSessionUpdateErrors, TracerTraceSessionUpdateResponses, TracerTraceUpdateData, TracerTraceUpdateErrors, TracerTraceUpdateResponses, TracerUserAlertLogsCreateData, TracerUserAlertLogsCreateErrors, TracerUserAlertLogsCreateResponses, TracerUserAlertLogsDeleteData, TracerUserAlertLogsDeleteErrors, TracerUserAlertLogsDeleteResponses, TracerUserAlertLogsPartialUpdateData, TracerUserAlertLogsPartialUpdateErrors, TracerUserAlertLogsPartialUpdateResponses, TracerUserAlertLogsUpdateData, TracerUserAlertLogsUpdateErrors, TracerUserAlertLogsUpdateResponses, TracerUserAlertsDuplicateData, TracerUserAlertsDuplicateErrors, TracerUserAlertsDuplicateResponses, TracerUserAlertsListMonitorsData, TracerUserAlertsListMonitorsErrors, TracerUserAlertsListMonitorsResponses, TracerUserAlertsUpdateData, TracerUserAlertsUpdateErrors, TracerUserAlertsUpdateResponses, TracerUsersGetCodeExampleListData, TracerUsersGetCodeExampleListErrors, TracerUsersGetCodeExampleListResponses, UpdateAgentDefinitionData, UpdateAgentDefinitionErrors, UpdateAgentDefinitionResponses, UpdateAlertData, UpdateAlertErrors, UpdateAlertResponses, UpdateAnnotationQueueData, UpdateAnnotationQueueErrors, UpdateAnnotationQueueResponses, UpdateAnnotationQueueStatusData, UpdateAnnotationQueueStatusErrors, UpdateAnnotationQueueStatusResponses, UpdateDatasetCellData, UpdateDatasetCellErrors, UpdateDatasetCellResponses, UpdateExperimentData, UpdateExperimentErrors, UpdateExperimentResponses, UpdatePersonaData, UpdatePersonaErrors, UpdatePersonaResponses, UpdateRunTestData, UpdateRunTestErrors, UpdateRunTestResponses, UpdateScenarioData, UpdateScenarioErrors, UpdateScenarioResponses, UpdateTraceTagsData, UpdateTraceTagsErrors, UpdateTraceTagsResponses } from './types.gen'; + +export type Options = Options2 & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +/** + * GET /accounts/organization/members/ + * + * Returns UNION of active members + pending/expired invites. + * Status is derived at query time (Active / Pending / Expired). + */ +export const listOrganizationMembers = (options?: Options) => (options?.client ?? client).get({ + querySerializer: { parameters: { filter_status: { array: { explode: false } }, filter_role: { array: { explode: false } } } }, + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/organization/members/', + ...options +}); + +/** + * POST /accounts/organization/members/reactivate/ + * + * Re-activates a deactivated org membership and restores workspace + * memberships that were soft-deactivated during removal. If no prior + * workspace memberships exist, the user is added to the default workspace. + */ +export const accountsOrganizationMembersReactivateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/organization/members/reactivate/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * DELETE /accounts/organization/members/remove/ + * + * Soft-deactivates OrganizationMembership and cascades to workspace + * memberships. Signals handle Redis clear + audit log. + */ +export const accountsOrganizationMembersRemoveDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/organization/members/remove/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /accounts/organization/members/role/ + * + * Update a member's org level and/or workspace level. + */ +export const accountsOrganizationMembersRoleCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/organization/members/role/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const getCurrentUser = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/user-info/', + ...options +}); + +/** + * Get paginated list of workspaces + */ +export const listWorkspaces = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/workspace/list/', + ...options +}); + +/** + * Switch to a different workspace with proper validation + */ +export const switchWorkspace = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/workspace/switch/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /accounts/workspace//members/ + * + * Returns members of a specific workspace. + * Org Admin+ users who auto-access are included with derived WS Admin role. + */ +export const listWorkspaceMembers = (options: Options) => (options.client ?? client).get({ + querySerializer: { parameters: { filter_status: { array: { explode: false } }, filter_role: { array: { explode: false } } } }, + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/workspace/{workspace_id}/members/', + ...options +}); + +/** + * DELETE /accounts/workspace//members/remove/ + * + * Remove a member from a workspace only (keeps org membership). + */ +export const accountsWorkspaceMembersRemoveDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/workspace/{workspace_id}/members/remove/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /accounts/workspace//members/role/ + * + * Update a member's workspace role. + */ +export const accountsWorkspaceMembersRoleCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/accounts/workspace/{workspace_id}/members/role/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listAnnotationQueues = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/', + ...options +}); + +export const createAnnotationQueue = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Find annotation queues for a given source that the current user can annotate. + * Includes queues where: + * - The source is a queue item AND the user is an annotator in that queue + * (regardless of whether the item is explicitly assigned to them) + * + * Query params: + * - source_type, source_id (single source) + * - OR sources (JSON array of {source_type, source_id} objects for multi-source lookup) + */ +export const modelHubAnnotationQueuesForSource = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/for-source/', + ...options +}); + +/** + * Get or create the default annotation queue for a project, dataset, or agent definition. + * Default queues are open to all org members (no annotator restriction). + * + * Body params (one of): + * - project_id + * - dataset_id + * - agent_definition_id + */ +export const modelHubAnnotationQueuesGetOrCreateDefault = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/get-or-create-default/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Archive a queue (soft delete). + * + * ``BaseModel.delete()`` flips ``deleted=True`` instead of removing + * the row. Attached automation rules go dormant (the scheduler + * filters ``queue__deleted=False``), items stay invisible but + * recoverable, label bindings preserved. + * + * For truly destructive removal, use the ``hard-delete`` action + * below. + */ +export const archiveAnnotationQueue = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/', + ...options +}); + +export const getAnnotationQueue = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/', + ...options +}); + +export const updateAnnotationQueue = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Only managers of the queue may update queue settings. + */ +export const modelHubAnnotationQueuesUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Add a label to an annotation queue. + * Labels apply to all sources in the queue's project (for default queues). + * Queue items are created lazily when someone actually annotates. + */ +export const addAnnotationQueueLabel = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/add-label/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Calculate inter-annotator agreement metrics. + */ +export const getAnnotationQueueAgreement = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/agreement/', + ...options +}); + +/** + * Queue analytics: throughput, annotator performance, label distribution. + */ +export const getAnnotationQueueAnalytics = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/analytics/', + ...options +}); + +/** + * Return source/label/attribute fields available for dataset export. + */ +export const listAnnotationQueueExportFields = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/export-fields/', + ...options +}); + +/** + * Export queue items to a dataset using a user-editable column mapping. + */ +export const exportAnnotationQueueToDataset = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/export-to-dataset/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Export all items with their annotations. + */ +export const exportAnnotationQueue = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/export/', + ...options +}); + +/** + * Permanently remove a queue + everything attached. + * + * Hard delete cascades through the FK graph (rules, items, + * assignments, scores) via ``on_delete=CASCADE``. There is no + * recovery — callers must pass ``force=true`` AND the queue's + * exact name as ``confirm_name`` so the action can't fire from + * a typo'd request. + */ +export const modelHubAnnotationQueuesHardDelete = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/hard-delete/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const getAnnotationQueueProgress = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/progress/', + ...options +}); + +/** + * Remove a label from an annotation queue. + */ +export const removeAnnotationQueueLabel = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/remove-label/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationQueuesRestore = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/restore/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const updateAnnotationQueueStatus = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{id}/update-status/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationQueuesAutomationRulesList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/', + ...options +}); + +export const modelHubAnnotationQueuesAutomationRulesCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationQueuesAutomationRulesDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/', + ...options +}); + +export const modelHubAnnotationQueuesAutomationRulesRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/', + ...options +}); + +export const modelHubAnnotationQueuesAutomationRulesPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationQueuesAutomationRulesUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Trigger a manual rule run with a sync-or-async branch. + * + * Small runs (filter resolves to ≤ ``RULE_RUN_SYNC_THRESHOLD``) finish + * in the HTTP request and return 200 with the result — fast feedback + * for the common case. Large runs (mostly first-ever runs on backlogs + * or rules with wide filters) hand the work to a Temporal activity and + * return 202 immediately. The activity emails creator + queue managers + * on completion. + * + * The peek is a cheap dry-run (``[:cap+1]`` LIMIT, no COUNT(*)) — sub- + * 100ms even on 10M+ row trace tables — so this branch costs little + * even when it ends up taking the sync path. + */ +export const modelHubAnnotationQueuesAutomationRulesEvaluate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Preview how many items match a rule (dry run). + */ +export const modelHubAnnotationQueuesAutomationRulesPreview = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/', + ...options +}); + +export const listAnnotationQueueItems = (options: Options) => (options.client ?? client).get({ + querySerializer: { parameters: { status: { array: { explode: false } }, source_type: { array: { explode: false } } } }, + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/', + ...options +}); + +export const modelHubAnnotationQueuesItemsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const addAnnotationQueueItems = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/add-items/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Assign items to one or more annotators. + */ +export const assignAnnotationQueueItems = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/assign/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const removeAnnotationQueueItems = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/bulk-remove/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get the next or previous item in the queue. + * + * Query params: + * exclude: comma-separated item IDs to skip + * before: item ID — returns the item immediately before this one in order + * review_status: optional review status filter (for reviewer queues) + * exclude_review_status: optional review status to omit (for annotator queues) + * include_completed: when true, navigation can visit completed items too + */ +export const getNextAnnotationQueueItem = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/next-item/', + ...options +}); + +export const modelHubAnnotationQueuesItemsDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/', + ...options +}); + +export const modelHubAnnotationQueuesItemsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/', + ...options +}); + +export const modelHubAnnotationQueuesItemsPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationQueuesItemsUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get full annotation workspace data for an item. + */ +export const getAnnotationQueueItemDetail = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/', + ...options +}); + +/** + * List all annotations for a queue item (across all annotators). + */ +export const listAnnotationQueueItemAnnotations = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/', + ...options +}); + +/** + * Import annotations from external sources. + */ +export const importAnnotationQueueItemAnnotations = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Submit or update annotations for a queue item. + */ +export const submitAnnotationQueueItemAnnotations = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Mark item as completed and return next pending item. + */ +export const completeAnnotationQueueItem = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/complete/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * List or create non-blocking discussion comments for a queue item. + */ +export const listAnnotationQueueItemDiscussion = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/', + ...options +}); + +/** + * List or create non-blocking discussion comments for a queue item. + */ +export const createAnnotationQueueItemComment = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Toggle the current user's reaction on a discussion comment. + */ +export const toggleAnnotationQueueItemCommentReaction = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const reopenAnnotationQueueItemThread = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const resolveAnnotationQueueItemThread = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Release reservation on an item. + */ +export const releaseAnnotationQueueItem = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/release/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Approve, request changes, or leave reviewer feedback on an item. + */ +export const reviewAnnotationQueueItem = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/review/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Mark item as skipped and return next pending item. + */ +export const skipAnnotationQueueItem = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/skip/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationsLabelsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotations-labels/', + ...options +}); + +/** + * Custom create to provide clearer error responses in GM format. + */ +export const modelHubAnnotationsLabelsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotations-labels/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationsLabelsDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotations-labels/{id}/', + ...options +}); + +export const modelHubAnnotationsLabelsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotations-labels/{id}/', + ...options +}); + +export const modelHubAnnotationsLabelsPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotations-labels/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubAnnotationsLabelsUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotations-labels/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Restore a soft-deleted (archived) annotation label. + */ +export const modelHubAnnotationsLabelsRestore = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/annotations-labels/{id}/restore/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubApiKeysList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/api-keys/', + ...options +}); + +export const modelHubApiKeysCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/api-keys/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Soft-delete an API key. + * + * ApiKey inherits from BaseModel, so `instance.delete()` sets: + * - deleted=True + * - deleted_at= + * and excludes it from the default manager (`objects`) queries. + */ +export const modelHubApiKeysDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/api-keys/{id}/', + ...options +}); + +export const modelHubApiKeysRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/api-keys/{id}/', + ...options +}); + +export const modelHubApiKeysPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/api-keys/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubApiKeysUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/api-keys/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubApiModelsListList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/api/models_list/', + ...options +}); + +export const getDatasetColumns = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/dataset/columns/{dataset_id}/', + ...options +}); + +export const getDatasetAnnotationSummary = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/dataset/{dataset_id}/annotation-summary/', + ...options +}); + +export const getDatasetEvalStats = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/dataset/{dataset_id}/eval-stats/', + ...options +}); + +/** + * API endpoint to get JSON schemas and images metadata for columns in a dataset. + * Used by frontend for autocomplete suggestions when accessing JSON properties + * and for indexed access to images columns. + */ +export const getDatasetJsonSchema = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/dataset/{dataset_id}/json-schema/', + ...options +}); + +export const modelHubDatasetRunPromptStatsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/dataset/{dataset_id}/run-prompt-stats/', + ...options +}); + +export const modelHubDatasetsCompareGetEvalsListCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/compare/get-evals-list/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsComparePreviewRunEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/compare/preview-run-eval/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsDeleteCompareDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/delete-compare/{compare_id}/', + ...options +}); + +export const modelHubDatasetsDeleteCompareRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/delete-compare/{compare_id}/', + ...options +}); + +export const modelHubDatasetsExplanationSummaryRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/explanation-summary/{dataset_id}/', + ...options +}); + +export const modelHubDatasetsExplanationSummaryRefreshCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/explanation-summary/{dataset_id}/refresh/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listDatasetBaseColumns = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/get-base-columns/', + ...options +}); + +export const modelHubDatasetsGetCompareRowDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/', + ...options +}); + +export const modelHubDatasetsGetCompareRowRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/', + ...options +}); + +export const modelHubDatasetsHuggingfaceDetailCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/huggingface/detail/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsHuggingfaceListCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/huggingface/list/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsAddApiColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/add-api-column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsAddVectorDbColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/add_vector_db_column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsClassifyColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/classify-column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsCompareDatasetsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/compare-datasets/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsCompareDatasetsAddEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/compare-datasets/add-eval/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsCompareDatasetsDownloadCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/compare-datasets/download/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsCompareDatasetsStartEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/compare-datasets/start-eval/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsCompareStatsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/compare-stats/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsConditionalColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/conditional-column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get all derived variables from all run prompt columns in a dataset. + * + * This aggregates derived variables from run prompt columns that + * produce JSON outputs, making them available for use in other + * prompts, evals, and experiments. + * + * Path params: + * - dataset_id: UUID of the dataset + */ +export const listDatasetDerivedVariables = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/derived-variables/', + ...options +}); + +export const modelHubDatasetsDuplicateRowsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/duplicate-rows/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const duplicateDataset = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/duplicate/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsExtractEntitiesCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/extract-entities/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsMergeCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/merge/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDatasetsPreviewCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/datasets/{dataset_id}/preview/{operation_type}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDeleteEvalTemplateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/delete-eval-template/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddAsNewCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/add-as-new/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddRowsFromFileCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/add_rows_from_file/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddRowsSdkCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/add_rows_sdk/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddRunPromptColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/add_run_prompt_column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsCloneDatasetCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/clone-dataset/{dataset_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsCreateDatasetFromHuggingfaceCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/create-dataset-from-huggingface/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const createDatasetFromLocalFile = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/create-dataset-from-local-file/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const createDatasetManually = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/create-dataset-manually/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const createEmptyDataset = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/create-empty-dataset/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsCreateSyntheticDatasetCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/create-synthetic-dataset/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * API endpoint to check the progress of dataset creation from file upload + */ +export const modelHubDevelopsDatasetCreationProgressRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/dataset-creation-progress/{dataset_id}/', + ...options +}); + +export const modelHubDevelopsDeleteDatasetDelete = (options?: Options) => (options?.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/delete_dataset/', + ...options +}); + +export const modelHubDevelopsEditRunPromptColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/edit_run_prompt_column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsGetCellDataCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/get-cell-data/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listDatasetNames = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/get-datasets-names/', + ...options +}); + +export const listDatasets = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/get-datasets/', + ...options +}); + +export const modelHubDevelopsGetDerivedDatasetsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/get-derived-datasets/{dataset_id}/', + ...options +}); + +export const modelHubDevelopsGetHuggingfaceDatasetConfigCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/get-huggingface-dataset-config/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsGetRowDiffCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/get-row-diff/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsGetFunctionListList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/get_function_list/', + ...options +}); + +export const modelHubDevelopsPreviewRunPromptColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/preview_run_prompt_column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsProviderStatusList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/provider-status/', + ...options +}); + +export const modelHubDevelopsRetrieveRunPromptColumnConfigList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/retrieve_run_prompt_column_config/', + ...options +}); + +export const modelHubDevelopsRetrieveRunPromptOptionsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/retrieve_run_prompt_options/', + ...options +}); + +export const addDatasetColumns = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_columns/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddEmptyColumnsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_empty_columns/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddEmptyRowsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_empty_rows/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Add multiple static columns to a dataset at once. + * + * Expected request data: + * { + * "columns": [ + * { + * "new_column_name": "column1", + * "column_type": "string", + * "source": "OTHERS" # optional + * }, + * { + * "new_column_name": "column2", + * "column_type": "number", + * "source": "OTHERS" # optional + * } + * ] + * } + */ +export const modelHubDevelopsAddMultipleStaticColumnsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_multiple_static_columns/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const addDatasetRows = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_rows/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddRowsFromExistingDatasetCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddRowsFromHuggingfaceCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_rows_from_huggingface/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddStaticColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_static_column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddSyntheticDataCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_synthetic_data/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsAddUserEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/add_user_eval/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const deleteDatasetColumn = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/delete_column/{column_id}/', + ...options +}); + +export const deleteDatasetRow = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/delete_row/', + ...options +}); + +export const modelHubDevelopsDeleteTemplateEvalDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/', + ...options +}); + +export const modelHubDevelopsDeleteUserEvalDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/', + ...options +}); + +export const downloadDataset = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/download_dataset/', + ...options +}); + +export const modelHubDevelopsEditAndRunUserEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsEditDatasetBehaviorUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/edit_dataset_behavior/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsExtractJsonColumnCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/extract-json-column/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const getDatasetTable = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/get-dataset-table/', + ...options +}); + +export const getDatasetRow = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/get-row-data/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsGetEvalStructureRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/', + ...options +}); + +export const modelHubDevelopsGetEvalsListList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/get_evals_list/', + ...options +}); + +export const modelHubDevelopsPreviewRunEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/preview_run_eval/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsStartEvalsProcessCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/start_evals_process/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /develops//stop_user_eval// + * Stops a running evaluation by setting its status to Completed. + * + * Accepts optional experiment_id in the body. When present, the eval is + * looked up via source_id=experiment_id (experiment-scoped UserEvalMetric) + * and cells are updated across both base columns (source_id=eval_id) and + * per-EDT columns (source_id ending with `-sourceid-{eval_id}`). + */ +export const modelHubDevelopsStopUserEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsSyntheticConfigList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/synthetic-config/', + ...options +}); + +export const modelHubDevelopsUpdateSyntheticConfigUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/update-synthetic-config/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const updateDatasetCell = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/update_cell_value/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsUpdateColumnNameUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/update_column_name/{column_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsUpdateColumnTypeUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{dataset_id}/update_column_type/{column_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsCreateDatasetCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{exp_dataset_id}/create-dataset/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubDevelopsGetExperimentDatasetTableList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/', + ...options +}); + +/** + * POST /model-hub/eval-templates/bulk-delete/ + * + * Soft-delete multiple eval templates. Only user-owned templates can be deleted. + */ +export const modelHubEvalTemplatesBulkDeleteCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/bulk-delete/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /model-hub/eval-templates/composite/execute-adhoc/ + * + * Execute a composite eval configuration without persisting it. Used by + * the eval create page so users can test a composite (selected children + + * aggregation settings) before clicking Save. Builds an unsaved parent + * template and unsaved child links in memory and reuses + * `execute_composite_children_sync` so semantics match the persisted path. + */ +export const modelHubEvalTemplatesCompositeExecuteAdhocCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/composite/execute-adhoc/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /model-hub/eval-templates/create-composite/ + * + * Create a composite eval from a list of existing eval template IDs. + */ +export const modelHubEvalTemplatesCreateCompositeCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/create-composite/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /model-hub/eval-templates/create-v2/ + * + * Create a single eval template with the revamped schema. + * Supports the new scoring fields (pass_threshold, choice_scores, output_type_normalized). + */ +export const modelHubEvalTemplatesCreateV2Create = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/create-v2/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /model-hub/eval-templates/list-charts/ + * + * Returns 30-day chart data (run counts + error rates) for a list of template IDs. + * Uses ClickHouse for fast analytics. Called separately from the list API so the + * table renders instantly while charts load async. + */ +export const modelHubEvalTemplatesListChartsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/list-charts/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /model-hub/eval-templates/list/ + * + * Returns paginated eval template list with filtering, search, and 30-day metrics. + * All inputs and outputs are validated with Pydantic schemas. + */ +export const modelHubEvalTemplatesListCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/list/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /model-hub/eval-templates//composite/ + * + * Get composite eval detail with its children. + */ +export const modelHubEvalTemplatesCompositeList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/composite/', + ...options +}); + +/** + * PATCH — partial update of a composite eval. + * + * Supported fields (all optional): + * name, description, tags, + * aggregation_enabled, aggregation_function, + * child_template_ids (replaces the child list), + * child_weights (map of child_id -> weight). + */ +export const modelHubEvalTemplatesCompositePartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/composite/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /model-hub/eval-templates//composite/execute/ + * + * Execute all child evals in a composite and optionally aggregate results. + * Thin wrapper around `execute_composite_children_sync` — the same helper + * the dataset/experiment `CompositeEvaluationRunner` uses, so aggregation + * semantics stay consistent across surfaces. + */ +export const modelHubEvalTemplatesCompositeExecuteCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/composite/execute/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /model-hub/eval-templates//detail/ + * + * Fetch a single eval template with all revamped fields. + */ +export const modelHubEvalTemplatesDetailList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/detail/', + ...options +}); + +/** + * GET /model-hub/eval-templates//feedback-list/ + * + * Paginated feedback list with user info. + * Query params: page (0-based), page_size + */ +export const modelHubEvalTemplatesFeedbackListList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/feedback-list/', + ...options +}); + +/** + * GET/PUT /model-hub/eval-templates//ground-truth-config/ + * + * Manages ground truth configuration on the eval template's config JSONField. + */ +export const modelHubEvalTemplatesGroundTruthConfigList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/ground-truth-config/', + ...options +}); + +/** + * GET/PUT /model-hub/eval-templates//ground-truth-config/ + * + * Manages ground truth configuration on the eval template's config JSONField. + */ +export const modelHubEvalTemplatesGroundTruthConfigUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/ground-truth-config/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /model-hub/eval-templates//ground-truth/ + */ +export const modelHubEvalTemplatesGroundTruthList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/ground-truth/', + ...options +}); + +/** + * POST /model-hub/eval-templates//ground-truth/upload/ + * + * Supports two modes: + * 1. JSON body: { name, columns, data, ... } + * 2. Multipart file upload: file (CSV/XLS/XLSX/JSON) + name field + */ +export const modelHubEvalTemplatesGroundTruthUploadCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/ground-truth/upload/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * PUT /model-hub/eval-templates//update/ + * + * Update an eval template. Only user-owned templates can be updated. + */ +export const modelHubEvalTemplatesUpdateUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/update/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /model-hub/eval-templates//usage/ + * + * Returns usage stats, chart data, and paginated eval logs. + * Query params: page (0-based), page_size, period (30m|6h|1d|7d|30d|90d|180d|365d) + */ +export const modelHubEvalTemplatesUsageList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/usage/', + ...options +}); + +/** + * GET /model-hub/eval-templates//versions/ + * + * List all versions for an eval template. + */ +export const modelHubEvalTemplatesVersionsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/versions/', + ...options +}); + +/** + * POST /model-hub/eval-templates//versions/create/ + * + * Create a new version snapshot from the current template state. + */ +export const modelHubEvalTemplatesVersionsCreateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/versions/create/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /model-hub/eval-templates//versions//restore/ + * + * Restore a version by creating a new version with the old version's config. + * Does NOT modify the old version — creates a new one on top. + */ +export const modelHubEvalTemplatesVersionsRestoreCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/versions/{version_id}/restore/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * PUT /model-hub/eval-templates//versions//set-default/ + * + * Set a specific version as the default (active) version. + */ +export const modelHubEvalTemplatesVersionsSetDefaultUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const createExperiment = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * V2 delete: org-scoped, cancels workflows, cleans up columns & EDTs. + */ +export const deleteExperiments = (options?: Options) => (options?.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/delete/', + ...options +}); + +/** + * V2 experiment list with filtering, search, and pagination. + */ +export const listExperiments = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/list/', + ...options +}); + +/** + * V2 re-run: org-scoped, uses V2 Temporal workflow. + * + * No manual workflow cancel needed — Temporal's TERMINATE_IF_RUNNING ID + * reuse policy automatically cancels any running workflow with the same ID. + * Cell reset is handled by the workflow itself (cleanup + setup activities). + */ +export const rerunExperiment = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/re-run/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubExperimentsV2RowDiffCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/row-diff/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Generate a suggested experiment name for a dataset. + */ +export const modelHubExperimentsV2SuggestNameRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/suggest-name/{dataset_id}/', + ...options +}); + +/** + * Validate that an experiment name is unique within a dataset. + */ +export const modelHubExperimentsV2ValidateNameList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/validate-name/', + ...options +}); + +export const getExperiment = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/', + ...options +}); + +/** + * Update a V2 experiment with diff-based selective re-run. + * + * Editable fields: column_id, prompt_config, user_eval_metrics. + * Re-run triggers (determined by fingerprint diffs, not field presence): + * - prompt_config has new/modified entries → re-run those configs + ALL dependent evals + * - user_eval_metrics has new/modified entries → re-run only those evals + * - column_id changed → delete old base eval columns, re-run base evals + * - If FE sends unchanged data, diffs return empty → no re-run + */ +export const updateExperiment = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * V2 compare view: reads from experiment_datasets FK + snapshot_dataset. + */ +export const compareExperiments = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/compare-experiments/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listExperimentComparisons = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/comparisons/', + ...options +}); + +/** + * Get derived variables from run prompt columns in an experiment's snapshot dataset. + * Delegates to the existing get_dataset_derived_variables() service function. + */ +export const modelHubExperimentsV2DerivedVariablesList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/derived-variables/', + ...options +}); + +export const downloadExperiment = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/download/', + ...options +}); + +export const modelHubExperimentsV2EvaluationsStatsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/', + ...options +}); + +/** + * Create a feedback record scoped to an experiment. + */ +export const modelHubExperimentsV2FeedbackCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/feedback/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get previous feedback details for a metric+row in an experiment. + */ +export const modelHubExperimentsV2FeedbackGetFeedbackDetailsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/', + ...options +}); + +/** + * Get evaluation template details for rendering the feedback form. + */ +export const modelHubExperimentsV2FeedbackGetTemplateList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/feedback/get-template/', + ...options +}); + +/** + * Submit feedback action — triggers temporal eval rerun for experiments. + */ +export const modelHubExperimentsV2FeedbackSubmitFeedbackCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get JSON schemas and images metadata for columns in an experiment's snapshot dataset. + * Delegates to the shared get_json_column_schemas() function. + */ +export const getExperimentJsonSchema = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/json-schema/', + ...options +}); + +/** + * Rerun specific cells or columns in a V2 experiment. + * + * Accepts source_ids (EDT IDs for full column rerun) and/or + * cells ({source_id, row_id} pairs for individual cell rerun). + * Resets affected output cells and dependent eval cells to RUNNING, + * then starts a RerunCellsV2Workflow. + */ +export const modelHubExperimentsV2RerunCellsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/rerun-cells/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listExperimentRows = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/rows/', + ...options +}); + +export const getExperimentRow = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/rows/{row_id}/', + ...options +}); + +/** + * Stats view for V2 experiments that read from snapshot_dataset. + */ +export const getExperimentStats = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/stats/', + ...options +}); + +/** + * Stop a running V2 experiment. + * + * Cancels all Temporal workflows (main + reruns). DB cleanup (marking + * RUNNING cells as ERROR, columns/EDTs as FAILED, experiment as CANCELLED) + * is handled by each workflow's CancelledError handler via the + * stop_experiment_cleanup_activity. + */ +export const stopExperiment = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/experiments/v2/{experiment_id}/stop/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubKnowledgeBaseDelete = (options?: Options) => (options?.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/', + ...options +}); + +export const modelHubKnowledgeBaseList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/', + ...options +}); + +export const modelHubKnowledgeBasePartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubKnowledgeBaseCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubKnowledgeBaseFilesDelete = (options?: Options) => (options?.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/files/', + ...options +}); + +export const modelHubKnowledgeBaseFilesCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/files/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubKnowledgeBaseGetList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/get/', + ...options +}); + +export const modelHubKnowledgeBaseListList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/knowledge-base/list/', + ...options +}); + +export const modelHubPromptHistoryExecutionsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-history-executions/', + ...options +}); + +/** + * Get detailed information about a specific PromptVersion + */ +export const modelHubPromptHistoryExecutionsGetExecutionDetails = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-history-executions/execution-details/{execution_id}/', + ...options +}); + +export const modelHubPromptHistoryExecutionsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-history-executions/{id}/', + ...options +}); + +export const modelHubPromptLabelsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/', + ...options +}); + +export const modelHubPromptLabelsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptLabelsAssignMultipleLabels = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/assign-multiple-labels/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Create (idempotently) Production, Staging, Development system labels for the caller's org. + */ +export const modelHubPromptLabelsCreateSystemLabels = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/create-system-labels/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Fetch a prompt version by template name and either explicit version or label. + * + * Query params: + * - name: template name (required) + * - version: version name like v1 (optional) + * - label: label name like Production/Staging/Development or custom (optional) + */ +export const modelHubPromptLabelsGetByName = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/get-by-name/', + ...options +}); + +/** + * Detach label from a prompt version. + */ +export const modelHubPromptLabelsRemoveLabelFromVersion = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/remove/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Set default version for a template by name and version. + */ +export const modelHubPromptLabelsSetDefault = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/set-default/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * List versions with labels for a template by name or id. + */ +export const modelHubPromptLabelsTemplateLabels = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/template-labels/', + ...options +}); + +export const modelHubPromptLabelsDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/{id}/', + ...options +}); + +export const modelHubPromptLabelsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/{id}/', + ...options +}); + +export const modelHubPromptLabelsPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptLabelsUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Assign a label to a specific version by template name and version name. + */ +export const modelHubPromptLabelsAssignLabelById = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/', + ...options +}); + +export const modelHubPromptTemplatesCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesAnalyzePrompt = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/analyze-prompt/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Bulk delete prompt templates + */ +export const modelHubPromptTemplatesBulkDelete = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/bulk-delete/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Create a draft version of the PromptTemplate and return its details. + */ +export const modelHubPromptTemplatesCreateDraft = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/create-draft/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Preview derived variables from JSON content without saving. + * + * Useful for showing what variables would be extracted before running. + * + * Request body: + * - content: JSON string or object to analyze + * - column_name: Name for the variable prefix + */ +export const modelHubPromptTemplatesDerivedVariablesPreviewCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/derived-variables/preview/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesGeneratePrompt = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/generate-prompt/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Generate synthetic data for prompt variables using the SyntheticDataAgent. + * + * Expected payload: + * { + * "prompt_name": "string", + * "prompt_instructions": "list/array" , + * "variable_names": ["string"], + * "variable_count": "int", + * "generation_type": "prompt" + * } + */ +export const modelHubPromptTemplatesGenerateVariables = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/generate-variables/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Retrieve a prompt template by name. + * If no version is specified, returns the default version (is_default=True). + * If a version is specified, returns that specific version. + */ +export const modelHubPromptTemplatesGetTemplateByName = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/get-template-by-name/', + ...options +}); + +export const modelHubPromptTemplatesImprovePrompt = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/improve-prompt/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/', + ...options +}); + +/** + * Retrieve a prompt template with version history and execution data. + * Handles caching and error cases. + */ +export const modelHubPromptTemplatesRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/', + ...options +}); + +export const modelHubPromptTemplatesPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Create a new draft version of the PromptTemplate and return its details. + */ +export const modelHubPromptTemplatesAddNewDraft = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/add-new-draft/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get all variables from template and its executions + */ +export const modelHubPromptTemplatesGetAllVariables = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/all-variables/', + ...options +}); + +export const modelHubPromptTemplatesCommit = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/commit/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Compare different versions of the PromptTemplate. + */ +export const modelHubPromptTemplatesCompareVersions = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/compare-versions/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete an evaluation configuration by name from a PromptTemplate. + * + * This endpoint allows removing an evaluation configuration from a PromptTemplate + * based on its unique name. + */ +export const modelHubPromptTemplatesDeleteEvaluationConfig = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/delete-evaluation-config/', + ...options +}); + +/** + * Get the evaluation configurations for a specific prompt template. + */ +export const modelHubPromptTemplatesGetEvaluationConfigs = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/evaluation-configs/', + ...options +}); + +export const modelHubPromptTemplatesRetrieveEvaluations = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/evaluations/', + ...options +}); + +/** + * Get the next version of the PromptTemplate + */ +export const modelHubPromptTemplatesGetNextVersion = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/get-next-version/', + ...options +}); + +/** + * Get the current status and results of a template run + */ +export const modelHubPromptTemplatesGetRunStatus = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/get-run-status/', + ...options +}); + +/** + * Get the prompt code in the requested format. If no format is specified, returns all formats. + * Supported languages: python, typescript, curl, langchain, nodejs, go + */ +export const modelHubPromptTemplatesGetSdkCode = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/get-sdk-code/{language}/', + ...options +}); + +export const modelHubPromptTemplatesRunEvalsOnMultipleVersions = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Run a prompt template with the given configuration. + */ +export const modelHubPromptTemplatesRunTemplate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/run_template/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Save/update the name for a template. + */ +export const modelHubPromptTemplatesSaveName = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/save-name/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesSavePromptFolder = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/save-prompt-folder/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Set a specific version of a prompt template as default + */ +export const modelHubPromptTemplatesSetDefault = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/set_default/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesStopStreaming = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/stop-streaming/', + ...options +}); + +/** + * Add or update evaluation configurations for a PromptTemplate. + * + * This endpoint allows adding new evaluation configurations or updating + * existing ones in a PromptTemplate. If is_run is true, it will also + * run evaluations on specified versions (or latest version if none specified). + */ +export const modelHubPromptTemplatesUpdateEvaluationConfigs = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/update-evaluation-configs/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const modelHubPromptTemplatesVersions = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{id}/versions/', + ...options +}); + +/** + * Get all derived variables for a prompt template. + * + * Returns derived variables from JSON outputs across all versions. + * + * Query params: + * - version: Optional version filter + * - column_name: Optional column name filter + */ +export const modelHubPromptTemplatesDerivedVariablesList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{prompt_id}/derived-variables/', + ...options +}); + +/** + * Manually trigger extraction of derived variables from outputs. + * + * This is useful when you want to re-extract variables or extract from + * existing outputs that weren't processed. + * + * Request body: + * - version: Version to extract from + * - column_name: Name for the output column + * - output_index: Optional specific output index (default: 0) + * - response_format_type: Optional response format hint + */ +export const modelHubPromptTemplatesDerivedVariablesExtractCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get the schema for derived variables of a specific column. + * + * Returns detailed schema information including types and sample values. + * + * Path params: + * - prompt_id: UUID of the prompt template + * - column_name: Name of the column + * + * Query params: + * - version: Optional version filter + */ +export const modelHubPromptTemplatesDerivedVariablesSchemaList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/', + ...options +}); + +/** + * Universal Score CRUD. + * + * GET /model-hub/scores/?source_type=trace&source_id= + * POST /model-hub/scores/ (single score) + * POST /model-hub/scores/bulk/ (multiple scores on one source) + * DELETE /model-hub/scores// + */ +export const modelHubScoresList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/', + ...options +}); + +/** + * Create a single score. + */ +export const modelHubScoresCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Create multiple scores on a single source (e.g. from inline annotator). + */ +export const modelHubScoresBulkCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/bulk/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get all scores for a specific source. + * GET /model-hub/scores/for-source/?source_type=trace&source_id= + */ +export const modelHubScoresForSource = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/for-source/', + ...options +}); + +/** + * Soft-delete a score. + * + * Only the annotator who created the score or an org Owner/Admin may + * delete it. + */ +export const modelHubScoresDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/{id}/', + ...options +}); + +/** + * Universal Score CRUD. + * + * GET /model-hub/scores/?source_type=trace&source_id= + * POST /model-hub/scores/ (single score) + * POST /model-hub/scores/bulk/ (multiple scores on one source) + * DELETE /model-hub/scores// + */ +export const modelHubScoresRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/{id}/', + ...options +}); + +/** + * Universal Score CRUD. + * + * GET /model-hub/scores/?source_type=trace&source_id= + * POST /model-hub/scores/ (single score) + * POST /model-hub/scores/bulk/ (multiple scores on one source) + * DELETE /model-hub/scores// + */ +export const modelHubScoresPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Universal Score CRUD. + * + * GET /model-hub/scores/?source_type=trace&source_id= + * POST /model-hub/scores/ (single score) + * POST /model-hub/scores/bulk/ (multiple scores on one source) + * DELETE /model-hub/scores// + */ +export const modelHubScoresUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/model-hub/scores/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const sdkApiV1ConfigureEvaluationsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/configure-evaluations/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const sdkApiV1EvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/eval/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const sdkApiV1EvalRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/eval/{eval_id}/', + ...options +}); + +export const sdkApiV1EvaluatePipelineList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/evaluate-pipeline/', + ...options +}); + +export const sdkApiV1EvaluatePipelineCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/evaluate-pipeline/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const sdkApiV1GetEvalsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/get-evals/', + ...options +}); + +export const sdkApiV1NewEvalList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/new-eval/', + ...options +}); + +export const sdkApiV1NewEvalCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/new-eval/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /simulation/analytics/ + * + * Aggregated analytics view: eval scores (radar chart data), critical issues, + * FMA suggestions. Corresponds to the Analytics tab in the UI. + */ +export const getSimulationAnalytics = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/simulation/analytics/', + ...options +}); + +/** + * GET /simulation/metrics/ + * + * Aggregated system metrics: latency (by subsystem), cost, conversation metrics. + */ +export const listSimulationMetrics = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/simulation/metrics/', + ...options +}); + +/** + * GET /simulation/runs/ + * + * Run-level records with eval scores, scenario metadata, call details. + */ +export const listSimulationRuns = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/sdk/api/v1/simulation/runs/', + ...options +}); + +/** + * Bulk soft-delete agent definitions. + */ +export const simulateAgentDefinitionsDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get paginated list of agent definitions for the user's organization. + */ +export const listAgentDefinitions = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/', + ...options +}); + +/** + * Create a new agent definition with its first version. + */ +export const createAgentDefinition = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/create/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get details of a specific agent definition with version information. + */ +export const getAgentDefinition = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/', + ...options +}); + +/** + * Soft delete an agent definition. + */ +export const deleteAgentDefinition = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/delete/', + ...options +}); + +/** + * Update an existing agent definition. + */ +export const updateAgentDefinition = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/edit/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get all versions of a specific agent definition. + */ +export const simulateAgentDefinitionsVersionsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/', + ...options +}); + +/** + * Create a new version of an agent definition. + */ +export const simulateAgentDefinitionsVersionsCreateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/create/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get details of a specific agent version. + */ +export const simulateAgentDefinitionsVersionsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/', + ...options +}); + +/** + * Activate a specific agent version. + */ +export const simulateAgentDefinitionsVersionsActivateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get the call executions of an agent version. + */ +export const simulateAgentDefinitionsVersionsCallExecutionsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/', + ...options +}); + +/** + * Soft delete an agent version. + */ +export const simulateAgentDefinitionsVersionsDeleteDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/', + ...options +}); + +/** + * Get the eval summary of an agent version. + */ +export const simulateAgentDefinitionsVersionsEvalSummaryList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/', + ...options +}); + +/** + * Restore agent definition from a specific version. + */ +export const simulateAgentDefinitionsVersionsRestoreCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get paginated list of call executions for the user's organization + * Query Parameters: + * - search: search string to filter call executions by phone number or scenario name + * - status: filter by call status + * - test_execution_id: filter by specific test execution + * - limit: number of items per page (default: 10) + * - page: page number (default: 1) + */ +export const simulateApiCallExecutionsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/call-executions/', + ...options +}); + +/** + * List personas with pagination + */ +export const listPersonas = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/', + ...options +}); + +/** + * Create a new workspace-level persona + */ +export const createPersona = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Duplicate a persona by ID + */ +export const simulateApiPersonasDuplicateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/duplicate/{persona_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get field options/choices for persona creation + */ +export const simulateApiPersonasFieldOptions = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/field-options/', + ...options +}); + +/** + * Get only system-level personas + */ +export const simulateApiPersonasSystemPersonas = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/system/', + ...options +}); + +/** + * Get only workspace-level personas + */ +export const simulateApiPersonasWorkspacePersonas = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/workspace/', + ...options +}); + +/** + * Delete a persona (workspace-level only) + */ +export const deletePersona = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/{id}/', + ...options +}); + +/** + * Retrieve a specific persona + */ +export const getPersona = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/{id}/', + ...options +}); + +/** + * ViewSet for managing Personas. + */ +export const updatePersona = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Update a persona (workspace-level only) + */ +export const simulateApiPersonasUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Duplicate a persona (creates a workspace-level copy) + */ +export const simulateApiPersonasDuplicate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/personas/{id}/duplicate/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get paginated list of run tests for the user's organization + * Query Parameters: + * - search: search string to filter run tests by name + * - limit: number of items per page (default: 10) + * - page: page number (default: 1) + */ +export const simulateApiRunTestsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/run-tests/', + ...options +}); + +/** + * Get paginated list of test executions for the user's organization + * Query Parameters: + * - search: search string to filter test executions by run test name + * - status: filter by execution status + * - limit: number of items per page (default: 10) + * - page: page number (default: 1) + */ +export const listTestExecutions = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/api/test-executions/', + ...options +}); + +/** + * Get a specific call execution with all its details + */ +export const simulateCallExecutionsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/', + ...options +}); + +/** + * Update the status of a specific call execution + */ +export const simulateCallExecutionsPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Analyze a call execution against graph branches and identify deviations + */ +export const simulateCallExecutionsBranchAnalysisList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/branch-analysis/', + ...options +}); + +/** + * Create deviation nodes and edges for a call execution + */ +export const simulateCallExecutionsBranchAnalysisCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/branch-analysis/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Send a message to a chat execution + */ +export const simulateCallExecutionsChatSendMessageCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/chat/send-message/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a specific call execution + */ +export const simulateCallExecutionsDeleteDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/delete/', + ...options +}); + +/** + * Get error localizer tasks for a specific call execution + */ +export const simulateCallExecutionsErrorLocalizerTasksList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/error-localizer-tasks/', + ...options +}); + +/** + * Paginated API to retrieve stored log entries for a call execution. + */ +export const simulateCallExecutionsLogsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/logs/', + ...options +}); + +/** + * API View to compare session chat simulations + */ +export const simulateCallExecutionsSessionComparisonList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/session-comparison/', + ...options +}); + +/** + * Get transcripts for a specific call execution + */ +export const simulateCallExecutionsTranscriptsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/call-executions/{call_execution_id}/transcripts/', + ...options +}); + +/** + * Export data as CSV based on type parameter + * Query Parameters: + * - type: 'runtest' or 'testexecution' (required) + * - search: search string to filter call executions by phone number or scenario name + * - status: filter by call execution status + */ +export const simulateExportRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/export/{item_id}/', + ...options +}); + +/** + * Get list of scenarios available for prompt simulations. + * + * Query Parameters: + * - limit: number of items per page (default: 20) + * - page: page number (default: 1) + * - search: search string to filter scenarios by name + */ +export const simulatePromptSimulationsScenariosList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/prompt-simulations/scenarios/', + ...options +}); + +/** + * Get paginated list of simulation runs for a specific prompt template. + * + * Query Parameters: + * - limit: number of items per page (default: 10) + * - page: page number (default: 1) + * - version_id: filter by specific prompt version + */ +export const simulatePromptTemplatesSimulationsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/', + ...options +}); + +/** + * Create a new prompt-based simulation run. + * + * Request Body: + * - name: Name of the simulation run + * - description: Optional description + * - prompt_version_id: The prompt version to use + * - scenario_ids: List of scenario IDs to run + * - dataset_row_ids: Optional list of specific row IDs + * - evaluations_config: Optional evaluation configurations + * - enable_tool_evaluation: Optional boolean to enable tool evaluation + */ +export const simulatePromptTemplatesSimulationsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Soft delete a prompt simulation run. + */ +export const simulatePromptTemplatesSimulationsDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/', + ...options +}); + +/** + * Retrieve a specific prompt simulation run. + */ +export const simulatePromptTemplatesSimulationsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/', + ...options +}); + +/** + * Update a prompt simulation run (version, scenarios, etc.). + */ +export const simulatePromptTemplatesSimulationsPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Execute a prompt-based simulation run. + * + * Request Body (optional): + * - scenario_ids: List of specific scenario IDs to run (default: all scenarios) + * - select_all: If true, run all scenarios except ones in scenario_ids + */ +export const simulatePromptTemplatesSimulationsExecuteCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get paginated list of run tests for the user's organization + * Query Parameters: + * - search: search string to filter run tests by name + * - limit: number of items per page (default: 10) + * - page: page number (default: 1) + * - simulation_type: filter by source type (RunTest.SourceTypes values: + * 'agent_definition' or 'prompt') + * - prompt_template_id: filter by prompt template ID (used when + * simulation_type is 'prompt') + */ +export const listRunTests = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/', + ...options +}); + +/** + * Get all active tests + */ +export const simulateRunTestsActiveList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/active/', + ...options +}); + +/** + * Create a new RunTest + */ +export const createRunTest = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/create/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * API View to get the id of a run test by name + */ +export const simulateRunTestsGetIdByNameRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/get-id-by-name/{run_test_name}/', + ...options +}); + +/** + * Delete a specific RunTest (soft delete) + */ +export const deleteRunTest = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/', + ...options +}); + +/** + * Retrieve a specific RunTest + */ +export const getRunTest = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/', + ...options +}); + +/** + * Update a specific RunTest + */ +export const updateRunTest = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get analytics data for a specific run test across multiple test executions + */ +export const getRunTestAnalytics = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/analytics/', + ...options +}); + +/** + * Get all call executions for a specific run test with pagination and search + * Query Parameters: + * - search: search string to filter call executions by phone number or scenario name + * - status: filter by call execution status + * - limit: number of call executions per page (default: 10) + * - page: page number for call executions (default: 1) + */ +export const listRunTestCallExecutions = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/call-executions/', + ...options +}); + +/** + * Execute a test run + */ +export const simulateRunTestsChatExecuteCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/chat-execute/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Update components of a specific RunTest + */ +export const simulateRunTestsComponentsPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/components/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete multiple test executions within a run test. + */ +export const simulateRunTestsDeleteTestExecutionsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/delete-test-executions/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a specific run test + */ +export const simulateRunTestsDeleteDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/delete/', + ...options +}); + +/** + * Add evaluation configurations + * + * Adds evaluation configurations to a test run. Returns 201 with the created configs. + */ +export const simulateRunTestsEvalConfigsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/eval-configs/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete evaluation configuration + * + * Soft-deletes an evaluation configuration. Cannot delete the last remaining config in the test run. + */ +export const simulateRunTestsEvalConfigsDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/', + ...options +}); + +/** + * Get the structure of an evaluation config + */ +export const simulateRunTestsEvalConfigsGetStructureList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/', + ...options +}); + +/** + * Update evaluation configuration + * + * Updates an evaluation configuration and optionally triggers a rerun. When run=true, test_execution_id is required. + */ +export const simulateRunTestsEvalConfigsUpdateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Compare evaluation summaries + * + * Compares evaluation summary statistics across multiple test executions. + */ +export const simulateRunTestsEvalSummaryComparisonList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/eval-summary-comparison/', + ...options +}); + +/** + * Get evaluation summary + * + * Returns evaluation summary statistics for a test run, optionally scoped to a single execution. + */ +export const simulateRunTestsEvalSummaryList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/eval-summary/', + ...options +}); + +/** + * Execute a test run + */ +export const executeRunTest = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/execute/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get test execution data for a specific run test + * Query Parameters: + * - search: search string to filter test executions by status or scenario name + * - status: filter by execution status + * - limit: number of items per page (default: 10) + * - page: page number (default: 1) + */ +export const listRunTestExecutions = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/executions/', + ...options +}); + +/** + * Rerun multiple test executions (either evaluation only or call + evaluation). + * All call executions within each test execution are rerun. + */ +export const simulateRunTestsRerunTestExecutionsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/rerun-test-executions/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Run new evaluations on test executions + * + * Runs new evaluations on completed test executions. Either test_execution_ids or select_all=true must be provided. + */ +export const simulateRunTestsRunNewEvalsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/run-new-evals/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get paginated list of scenarios for a specific run test + * Query Parameters: + * - search: search string to filter scenarios by name + * - limit: number of items per page (default: 10) + * - page: page number (default: 1) + */ +export const simulateRunTestsScenariosList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/scenarios/', + ...options +}); + +/** + * Get the SDK code with placeholders filled + */ +export const simulateRunTestsSdkCodeList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/sdk-code/', + ...options +}); + +/** + * Get test execution status + */ +export const getRunTestStatus = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/run-tests/{run_test_id}/status/', + ...options +}); + +/** + * List scenarios + * + * Returns a paginated list of scenarios for the user's organization. + */ +export const listScenarios = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/', + ...options +}); + +/** + * Create scenario + * + * Creates a new scenario (dataset, script, or graph kind). Returns 202 with processing status. + */ +export const createScenario = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/create/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * List scenarios + * + * Returns a paginated list of scenarios for the user's organization. + */ +export const simulateScenariosGetColumnsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/get-columns/', + ...options +}); + +/** + * Get scenario detail + * + * Returns full detail of a specific scenario including graph data and prompts. + */ +export const getScenario = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/{scenario_id}/', + ...options +}); + +/** + * Add columns to scenario + * + * Adds new columns to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + */ +export const simulateScenariosAddColumnsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/{scenario_id}/add-columns/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Add rows to scenario + * + * Adds new rows to a scenario's dataset via Temporal workflow. Returns 202 Accepted. + */ +export const simulateScenariosAddRowsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/{scenario_id}/add-rows/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete scenario + * + * Soft-deletes a scenario by setting deleted=True. + */ +export const deleteScenario = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/{scenario_id}/delete/', + ...options +}); + +/** + * Edit scenario + * + * Updates scenario name, description, graph, or prompt. + */ +export const updateScenario = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/{scenario_id}/edit/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Edit scenario prompts + * + * Updates the simulator agent prompt for a scenario. + */ +export const simulateScenariosPromptsUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/scenarios/{scenario_id}/prompts/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * List simulator agents with pagination and search + */ +export const simulateSimulatorAgentsList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/simulator-agents/', + ...options +}); + +/** + * Create a new simulator agent + */ +export const simulateSimulatorAgentsCreateCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/simulator-agents/create/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get details of a specific simulator agent + */ +export const simulateSimulatorAgentsRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/simulator-agents/{agent_id}/', + ...options +}); + +/** + * Soft delete a simulator agent + */ +export const simulateSimulatorAgentsDeleteDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/simulator-agents/{agent_id}/delete/', + ...options +}); + +/** + * Edit an existing simulator agent + */ +export const simulateSimulatorAgentsEditUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/simulator-agents/{agent_id}/edit/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get a specific test execution with all its details and paginated call executions + * Query Parameters: + * - search: search string to filter call executions + * - page: page number for call executions (default: 1) + * - filters: JSON array of filter objects + * - row_groups: JSON array of column IDs to group by + * - group_keys: JSON array of group keys + */ +export const getTestExecution = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/', + ...options +}); + +/** + * Get analytics data for a specific test execution + */ +export const getTestExecutionAnalytics = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/analytics/', + ...options +}); + +/** + * Cancel a test execution + */ +export const cancelTestExecution = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/cancel/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Create a batch of CallExecution records for chat execution (exactly 10 per API call). + * + * This follows the same flow as inbound/outbound calls: + * 1. Resolve SimulatorAgent (scenario > run_test > fallback) + * 2. Extract base_prompt from SimulatorAgent + * 3. Handle dataset scenarios (create one CallExecution per row) + * 4. Enhance prompt with row data if applicable + * 5. Store proper metadata in CallExecution + * + * Returns exactly 10 CallExecution objects per API call. + * hasMore is true until ALL row_ids of ALL scenarios have CallExecution objects created. + */ +export const simulateTestExecutionsChatCallExecutionsBatchCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/chat/call-executions/batch/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Update column order for a test execution + */ +export const simulateTestExecutionsColumnOrderUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/column-order/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a specific test execution + */ +export const simulateTestExecutionsDeleteDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/delete/', + ...options +}); + +/** + * Fetch the evaluation explanation summary from the database. + * If not present, trigger async calculation and return empty response. + */ +export const simulateTestExecutionsEvalExplanationSummaryList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/eval-explanation-summary/', + ...options +}); + +/** + * Refresh the evaluation explanation summary by recalculating it. + * This endpoint triggers the summary calculation task again. + */ +export const simulateTestExecutionsEvalExplanationSummaryRefreshCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get combined KPI values for a specific run test + */ +export const getTestExecutionKpis = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/kpis/', + ...options +}); + +/** + * Fetch the agent optimiser analysis for a test execution. + * If not present or pending, returns status information. + */ +export const simulateTestExecutionsOptimiserAnalysisList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/optimiser-analysis/', + ...options +}); + +/** + * Trigger a new agent optimiser analysis run. + */ +export const simulateTestExecutionsOptimiserAnalysisRefreshCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get performance summary data for a specific test execution + */ +export const getTestExecutionPerformanceSummary = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/performance-summary/', + ...options +}); + +/** + * Rerun multiple call executions (either evaluation only or call + evaluation) + */ +export const simulateTestExecutionsRerunCallsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/rerun-calls/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get all transcripts for a test execution + */ +export const getTestExecutionTranscripts = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/simulate/test-executions/{test_execution_id}/transcripts/', + ...options +}); + +export const createBulkTraceAnnotation = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/bulk-annotation/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /tracer/feed/issues/ — paginated cluster list with filters/sort. + */ +export const listErrorFeedIssues = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/', + ...options +}); + +/** + * GET /tracer/feed/issues/stats/ — top stats bar totals. + */ +export const getErrorFeedIssueStats = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/stats/', + ...options +}); + +/** + * GET + PATCH /tracer/feed/issues/{cluster_id}/ + */ +export const getErrorFeedIssue = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/', + ...options +}); + +/** + * GET + PATCH /tracer/feed/issues/{cluster_id}/ + */ +export const tracerFeedIssuesPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /tracer/feed/issues/{cluster_id}/create-linear-issue/ + */ +export const tracerFeedIssuesCreateLinearIssueCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/create-linear-issue/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * POST /tracer/feed/issues/{cluster_id}/deep-analysis/ + */ +export const tracerFeedIssuesDeepAnalysisCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/deep-analysis/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * GET /tracer/feed/issues/{cluster_id}/overview/ + */ +export const tracerFeedIssuesOverviewList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/overview/', + ...options +}); + +/** + * GET /tracer/feed/issues/{cluster_id}/root-cause/?trace_id=X + * + * Read cached deep-analysis results for a single trace within the + * cluster. The frontend hits this on mount (to show existing results) + * and polls it after a POST to /deep-analysis/ until ``status`` flips + * from ``running`` to ``done`` or ``failed``. + */ +export const tracerFeedIssuesRootCauseList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/root-cause/', + ...options +}); + +/** + * GET /tracer/feed/issues/{cluster_id}/sidebar/ + * + * Accepts an optional ``?trace_id=`` query param. When present, the + * trace-level sections (AI Metadata + Evaluations) are computed for + * that trace instead of the cluster's latest, keeping the sidebar in + * sync with the Overview tab's trace selection. + */ +export const tracerFeedIssuesSidebarList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/sidebar/', + ...options +}); + +/** + * GET /tracer/feed/issues/{cluster_id}/traces/ + */ +export const tracerFeedIssuesTracesList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/traces/', + ...options +}); + +/** + * GET /tracer/feed/issues/{cluster_id}/trends/ + */ +export const tracerFeedIssuesTrendsList = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/feed/issues/{cluster_id}/trends/', + ...options +}); + +export const listTraceAnnotationLabels = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/get-annotation-labels/', + ...options +}); + +/** + * List projects filtered by organization ID. + * + * Volume counts come from ClickHouse (fast) instead of a PG + * JOIN on observation_spans (was 12+ seconds). + */ +export const listTraceProjects = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/project/list_projects/', + ...options +}); + +export const tracerTraceAnnotationList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-annotation/', + ...options +}); + +export const tracerTraceAnnotationCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-annotation/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerTraceAnnotationGetAnnotationValues = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-annotation/get_annotation_values/', + ...options +}); + +export const tracerTraceAnnotationDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-annotation/{id}/', + ...options +}); + +export const tracerTraceAnnotationRead = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-annotation/{id}/', + ...options +}); + +export const tracerTraceAnnotationPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-annotation/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerTraceAnnotationUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-annotation/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerTraceSessionList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/', + ...options +}); + +export const tracerTraceSessionCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return distinct values for a session-level column. + * Used by the filter panel's value picker for session-specific fields + * (session_id, user_id, first_message, etc.). + * + * Query params: + * project_id: required + * column: canonical session column name, e.g. "session_id" + * search: optional search substring + * page: page number (0-based), default 0 + * page_size: default 50 + */ +export const tracerTraceSessionGetSessionFilterValues = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/get_session_filter_values/', + ...options +}); + +/** + * Fetch time-series session metrics for the observe graph. + * + * Supports the same metric types as the trace graph endpoint: + * - SYSTEM_METRIC: latency, tokens, cost, error_rate, session_count, + * avg_duration, avg_traces_per_session — all aggregated at session level + * - EVAL: eval scores averaged across sessions + * - ANNOTATION: annotation scores averaged across sessions + * + * Response shape matches trace graph: {metric_name, data: [{timestamp, value, primary_traffic}]} + */ +export const getTraceSessionGraphData = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/get_session_graph_data/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Export traces filtered by project ID and project version ID with optimized queries. + */ +export const tracerTraceSessionGetTraceSessionExportData = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/get_trace_session_export_data/', + ...options +}); + +/** + * List traces filtered by project ID and project version ID with optimized queries. + */ +export const listTraceSessions = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/list_sessions/', + ...options +}); + +export const tracerTraceSessionDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/{id}/', + ...options +}); + +export const getTraceSession = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/{id}/', + ...options +}); + +export const tracerTraceSessionPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerTraceSessionUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Session-scoped eval log feed for TracesDrawer's "Evals" tab. + * + * Session-level eval results are walled off from span/trace surfaces + * by ``target_type='session'`` — this endpoint is the only place + * they appear. + * + * Query params: + * page (int, 0-indexed, default 0) + * page_size (int, default 25, max 100) + */ +export const tracerTraceSessionEvalLogs = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace-session/{id}/eval_logs/', + ...options +}); + +export const tracerTraceList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/', + ...options +}); + +export const tracerTraceCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return the aggregate agent graph for a project. + * + * Computes nodes (distinct span types/names) and edges (parent→child + * transitions) across all traces in the given time window. + */ +export const tracerTraceAgentGraph = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/agent_graph/', + ...options +}); + +export const tracerTraceBulkCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/bulk_create/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Compare traces across project versions with optimized queries. + */ +export const tracerTraceCompareTraces = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/compare_traces/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Fetch all evaluation template names. + */ +export const tracerTraceGetEvalNames = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/get_eval_names/', + ...options +}); + +/** + * Fetch data for the observe graph with optimized queries + */ +export const getTraceGraphMethods = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/get_graph_methods/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Fetch all properties for graphing. + */ +export const listTraceProperties = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/get_properties/', + ...options +}); + +/** + * Export traces filtered by project ID with optimized queries. + * Auto-detects voice/conversation projects and exports voice-specific fields. + */ +export const tracerTraceGetTraceExportData = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/get_trace_export_data/', + ...options +}); + +/** + * Get the previous and next trace id by index using efficient database queries. + */ +export const tracerTraceGetTraceIdByIndex = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/get_trace_id_by_index/', + ...options +}); + +/** + * Get the previous and next trace id by index. + */ +export const tracerTraceGetTraceIdByIndexObserve = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/get_trace_id_by_index_observe/', + ...options +}); + +/** + * List traces filtered by project ID and project version ID with optimized queries. + */ +export const listTraces = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/list_traces/', + ...options +}); + +/** + * List traces filtered by project ID with optimized queries. + */ +export const tracerTraceListTracesOfSession = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/list_traces_of_session/', + ...options +}); + +/** + * List voice/conversation traces for a project in an optimized way and + * return a response similar to the provided call object schema. + * + * Query params: + * - project_id (required) + * - page (1-based, optional, default 1) + * - page_size (optional, default 30) + */ +export const listVoiceCalls = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/list_voice_calls/', + ...options +}); + +/** + * Return the heavy / detail-only fields for a single voice call. + * + * Query params: + * - trace_id (required) — UUID of the voice call trace. + */ +export const getVoiceCallDetail = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/voice_call_detail/', + ...options +}); + +export const tracerTraceDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/{id}/', + ...options +}); + +/** + * Retrieve a trace by its ID. + */ +export const getTrace = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/{id}/', + ...options +}); + +export const tracerTracePartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerTraceUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Update tags for a trace. + */ +export const updateTraceTags = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/trace/{id}/tags/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listAlertLogs = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/', + ...options +}); + +export const tracerUserAlertLogsCreate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listAllAlertLogs = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/all/', + ...options +}); + +export const resolveAlertLogs = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/resolve/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerUserAlertLogsDelete = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/{id}/', + ...options +}); + +export const getAlertLog = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/{id}/', + ...options +}); + +export const tracerUserAlertLogsPartialUpdate = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerUserAlertLogsUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const listAlertLogsForAlert = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alert-logs/{id}/list/', + ...options +}); + +export const listAlerts = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/', + ...options +}); + +export const createAlert = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const bulkMuteAlerts = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/bulk-mute/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerUserAlertsDuplicate = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/duplicate/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerUserAlertsListMonitors = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/list_monitors/', + ...options +}); + +export const listAlertMetricOptions = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/metric-options/', + ...options +}); + +/** + * Returns time-series data for a temporary monitor's metric, suitable for graphing a preview. + * Accepts monitor configuration in the request body. + */ +export const previewAlertGraph = (options: Options) => (options.client ?? client).post({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/preview-graph/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const deleteAlert = (options: Options) => (options.client ?? client).delete({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/{id}/', + ...options +}); + +export const getAlert = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/{id}/', + ...options +}); + +export const updateAlert = (options: Options) => (options.client ?? client).patch({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const tracerUserAlertsUpdate = (options: Options) => (options.client ?? client).put({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/{id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +export const getAlertDetails = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/{id}/details/', + ...options +}); + +/** + * Returns time-series data for a monitor's metric, suitable for graphing. + * + * Accepts `start_date` and `end_date` query parameters (ISO 8601 format). + * If not provided, it defaults to the last 7 days. + */ +export const getAlertGraph = (options: Options) => (options.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/user-alerts/{id}/graph/', + ...options +}); + +/** + * List traces filtered by project ID with optimized queries. + */ +export const listTraceUsers = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/users/', + ...options +}); + +export const tracerUsersGetCodeExampleList = (options?: Options) => (options?.client ?? client).get({ + security: [{ name: 'X-Api-Key', type: 'apiKey' }, { name: 'X-Secret-Key', type: 'apiKey' }], + url: '/tracer/users/get_code_example/', + ...options +}); diff --git a/typescript/futureagi/src/generated/openapi/types.gen.ts b/typescript/futureagi/src/generated/openapi/types.gen.ts new file mode 100644 index 0000000..323baca --- /dev/null +++ b/typescript/futureagi/src/generated/openapi/types.gen.ts @@ -0,0 +1,36702 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type ClientOptions = { + baseUrl: 'https://api.futureagi.com' | (string & {}); +}; + +export type AccountsErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type ManagementApiErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +/** + * List of {"workspace_id": "", "level": }. + */ +export type WorkspaceAccessInput = { + /** + * Workspace id + */ + workspace_id: string; + /** + * Level + */ + level?: 8 | 3 | 1; +}; + +export type MemberWorkspaceAccess = { + /** + * Workspace id + */ + workspace_id: string; + /** + * Workspace name + */ + workspace_name: string; + /** + * Ws level + */ + ws_level: number; + /** + * Ws role + */ + ws_role: string; + /** + * Auto access + */ + auto_access?: boolean; +}; + +export type MemberListItem = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Email + */ + email: string; + /** + * Org level + */ + org_level?: number | null; + /** + * Org role + */ + org_role?: string | null; + /** + * Ws level + */ + ws_level?: number | null; + /** + * Ws role + */ + ws_role?: string | null; + workspaces?: Array; + /** + * Status + */ + status: string; + /** + * Created at + */ + created_at: string; + /** + * Type + */ + type: 'member' | 'invite'; + /** + * Auto access + */ + auto_access?: boolean; +}; + +export type MemberListResult = { + results: Array; + /** + * Total + */ + total: number; + /** + * Page + */ + page: number; + /** + * Limit + */ + limit: number; +}; + +export type MemberListResponse = { + /** + * Status + */ + status: boolean; + result: MemberListResult; +}; + +export type MemberRemove = { + /** + * User id + */ + user_id: string; +}; + +export type MemberUserMutationResult = { + /** + * Message + */ + message: string; + /** + * User id + */ + user_id: string; +}; + +export type MemberUserMutationResponse = { + /** + * Status + */ + status: boolean; + result: MemberUserMutationResult; +}; + +export type MemberRoleUpdate = { + /** + * User id + */ + user_id: string; + /** + * Org level + */ + org_level?: 15 | 8 | 3 | 1; + /** + * Ws level + */ + ws_level?: 8 | 3 | 1; + /** + * Workspace id + * + * Required when updating ws_level. + */ + workspace_id?: string | null; + /** + * List of {workspace_id, level} for explicit workspace grants on demotion. + */ + workspace_access?: Array; +}; + +export type MemberRoleUpdateResult = { + /** + * Message + */ + message: string; + /** + * Changes + */ + changes: { + [key: string]: unknown; + }; +}; + +export type MemberRoleUpdateResponse = { + /** + * Status + */ + status: boolean; + result: MemberRoleUpdateResult; +}; + +export type WorkspaceSummary = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Display name + */ + display_name: string; + /** + * Description + */ + description?: string; + /** + * Is default + */ + is_default?: boolean; +}; + +export type UserInfoOrganization = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Display name + */ + display_name: string; + /** + * Ws enabled + */ + ws_enabled?: boolean; +}; + +export type UserInfoTwoFactorMethods = { + /** + * Totp + */ + totp: boolean; + /** + * Passkey + */ + passkey: boolean; +}; + +export type UserInfoResponse = { + /** + * Id + */ + id: string; + /** + * Email + */ + email: string; + /** + * Name + */ + name: string | null; + /** + * Organization role + */ + organization_role: string | null; + organization: UserInfoOrganization; + /** + * Created at + */ + created_at: string; + /** + * Status + */ + status: string; + /** + * Role + */ + role: string | null; + goals?: Array; + /** + * Remember me + */ + remember_me: boolean; + /** + * Get started completed + */ + get_started_completed: boolean; + /** + * Onboarding completed + */ + onboarding_completed: boolean; + /** + * Ws enabled + */ + ws_enabled: boolean; + /** + * Requires org setup + */ + requires_org_setup?: boolean; + /** + * Default workspace id + */ + default_workspace_id: string | null; + /** + * Default workspace name + */ + default_workspace_name: string | null; + /** + * Default workspace display name + */ + default_workspace_display_name: string | null; + /** + * Default workspace role + */ + default_workspace_role: string | null; + /** + * Org level + */ + org_level: number | null; + /** + * Ws level + */ + ws_level: number | null; + /** + * Effective level + */ + effective_level: number | null; + /** + * Has 2fa enabled + */ + has_2fa_enabled?: boolean; + two_factor_methods?: UserInfoTwoFactorMethods; + /** + * Org 2fa required + */ + org_2fa_required?: boolean; + /** + * Org 2fa grace ends at + */ + org_2fa_grace_ends_at?: string; +}; + +export type WorkspaceAdminSummary = { + /** + * Name + */ + name: string | null; + /** + * Id + */ + id: string; +}; + +export type WorkspaceListItemResponse = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Display name + */ + display_name: string; + admin_names?: Array; + /** + * Start data + */ + start_data?: string; + /** + * Last update date + */ + last_update_date?: string; + /** + * Invite link + */ + invite_link?: string; + /** + * User ws level + */ + user_ws_level?: number | null; + /** + * User ws role + */ + user_ws_role?: string | null; +}; + +export type WorkspaceListPaginatedResponse = { + /** + * Count + */ + count: number; + /** + * Next + */ + next: string | null; + /** + * Previous + */ + previous: string | null; + results: Array; + /** + * Total pages + */ + total_pages: number; + /** + * Current page + */ + current_page: number; +}; + +export type SwitchWorkspace = { + /** + * New workspace id + */ + new_workspace_id: string; +}; + +export type SwitchWorkspaceResult = { + /** + * Message + */ + message: string; + workspace: WorkspaceSummary; + /** + * User role + */ + user_role: string; + /** + * Access type + */ + access_type: string; + /** + * Organization + */ + organization: string; +}; + +export type SwitchWorkspaceResponse = { + /** + * Status + */ + status: boolean; + result: SwitchWorkspaceResult; +}; + +export type WorkspaceMemberRemove = { + /** + * User id + */ + user_id: string; +}; + +export type WorkspaceMemberRoleUpdate = { + /** + * User id + */ + user_id: string; + /** + * Ws level + */ + ws_level: 8 | 3 | 1; +}; + +export type WorkspaceMemberRoleUpdateResult = { + /** + * Message + */ + message: string; + /** + * User id + */ + user_id: string; + /** + * Ws level + */ + ws_level: number; + /** + * Ws role + */ + ws_role: string; +}; + +export type WorkspaceMemberRoleUpdateResponse = { + /** + * Status + */ + status: boolean; + result: WorkspaceMemberRoleUpdateResult; +}; + +export type ApiTextErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type ModelHubErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type QueueLabelNested = { + /** + * Id + */ + readonly id?: string; + /** + * Label id + */ + label_id: string; + /** + * Name + */ + readonly name?: string; + /** + * Type + */ + readonly type?: string; + /** + * Required + */ + required?: boolean; + /** + * Order + */ + order?: number; +}; + +export type QueueAnnotatorNested = { + /** + * Id + */ + readonly id?: string; + /** + * User id + */ + user_id: string; + /** + * Name + */ + readonly name?: string; + /** + * Email + */ + readonly email?: string; + /** + * Role + */ + role?: string; + /** + * Roles + */ + readonly roles?: string; +}; + +export type AnnotationQueue = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Instructions + */ + instructions?: string | null; + /** + * Status + */ + readonly status?: 'draft' | 'active' | 'paused' | 'completed'; + /** + * Assignment strategy + */ + assignment_strategy?: 'manual' | 'round_robin' | 'load_balanced'; + /** + * Annotations required + */ + annotations_required?: number; + /** + * Reservation timeout minutes + */ + reservation_timeout_minutes?: number; + /** + * Requires review + */ + requires_review?: boolean; + /** + * Auto assign + * + * When enabled, all queue members can annotate any item without explicit assignment. + */ + auto_assign?: boolean; + /** + * Organization + */ + readonly organization?: string; + /** + * Project + */ + readonly project?: string | null; + /** + * Dataset + */ + readonly dataset?: string | null; + /** + * Agent definition + */ + readonly agent_definition?: string | null; + /** + * Is default + */ + readonly is_default?: boolean; + readonly labels?: Array; + readonly annotators?: Array; + label_ids?: Array; + annotator_ids?: Array; + /** + * Annotator roles + */ + annotator_roles?: { + [key: string]: { + [key: string]: unknown; + }; + }; + /** + * Label count + */ + readonly label_count?: number; + /** + * Annotator count + */ + readonly annotator_count?: number; + /** + * Item count + */ + readonly item_count?: number; + /** + * Completed count + */ + readonly completed_count?: number; + /** + * Created by + */ + readonly created_by?: string | null; + /** + * Created by name + */ + readonly created_by_name?: string; + /** + * Viewer role + */ + readonly viewer_role?: string; + /** + * Viewer roles + */ + readonly viewer_roles?: string; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type QueueForSourceQueue = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Instructions + */ + instructions: string; + /** + * Is default + */ + is_default: boolean; +}; + +export type QueueForSourceItem = { + /** + * Id + */ + id: string; + /** + * Status + */ + status: string; + /** + * Source type + */ + source_type: string; + /** + * Source id + */ + source_id: string | null; +}; + +export type QueueLabelResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Type + */ + type: string; + /** + * Settings + */ + settings: { + [key: string]: unknown; + }; + /** + * Description + */ + description?: string; + /** + * Allow notes + */ + allow_notes: boolean; + /** + * Required + */ + required: boolean; + /** + * Order + */ + order: number; +}; + +export type QueueForSourceEntry = { + queue: QueueForSourceQueue; + item: QueueForSourceItem; + labels: Array; + /** + * Existing scores + */ + existing_scores: { + [key: string]: { + [key: string]: unknown; + }; + }; + /** + * Existing notes + */ + existing_notes: string; + /** + * Existing label notes + */ + existing_label_notes: { + [key: string]: string; + }; + span_notes: Array<{ + [key: string]: unknown; + }>; + /** + * Span notes source id + */ + span_notes_source_id?: string | null; +}; + +export type QueueForSourceResponse = { + /** + * Status + */ + status?: boolean; + result: Array; +}; + +export type QueueDefaultRequest = { + /** + * Project id + */ + project_id?: string; + /** + * Dataset id + */ + dataset_id?: string; + /** + * Agent definition id + */ + agent_definition_id?: string; +}; + +export type QueueDefaultQueue = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string; + /** + * Instructions + */ + instructions?: string; + /** + * Status + */ + status: string; + /** + * Is default + */ + is_default: boolean; +}; + +export type QueueDefaultResult = { + queue: QueueDefaultQueue; + labels: Array; + /** + * Created + */ + created: boolean; + /** + * Action + */ + action: 'created' | 'restored' | 'fetched'; +}; + +export type QueueDefaultResponse = { + /** + * Status + */ + status?: boolean; + result: QueueDefaultResult; +}; + +export type QueueLabelRequest = { + /** + * Label id + */ + label_id: string; + /** + * Required + */ + required?: boolean; +}; + +export type QueueAddLabelResult = { + label: QueueLabelResult; + /** + * Created + */ + created: boolean; + /** + * Reopened items + */ + reopened_items: number; + /** + * Queue status + */ + queue_status: string; +}; + +export type QueueAddLabelResponse = { + /** + * Status + */ + status?: boolean; + result: QueueAddLabelResult; +}; + +export type QueueAgreementLabel = { + /** + * Label name + */ + label_name: string | null; + /** + * Label type + */ + label_type: string | null; + /** + * Agreement pct + */ + agreement_pct: number | null; + /** + * Cohens kappa + */ + cohens_kappa: number | null; + /** + * Disagreement count + */ + disagreement_count: number; + disagreement_items: Array; +}; + +export type QueueAgreementAnnotatorPair = { + /** + * Annotator 1 id + */ + annotator_1_id: string; + /** + * Annotator 2 id + */ + annotator_2_id: string; + /** + * Agreement pct + */ + agreement_pct: number; + /** + * Total comparisons + */ + total_comparisons: number; +}; + +export type QueueAgreementResult = { + /** + * Overall agreement + */ + overall_agreement: number | null; + /** + * Labels + */ + labels: { + [key: string]: QueueAgreementLabel; + }; + annotator_pairs: Array; +}; + +export type QueueAgreementResponse = { + /** + * Status + */ + status?: boolean; + result: QueueAgreementResult; +}; + +export type QueueAnalyticsThroughputDaily = { + /** + * Date + */ + date: string; + /** + * Count + */ + count: number; +}; + +export type QueueAnalyticsThroughput = { + daily: Array; + /** + * Total completed + */ + total_completed: number; + /** + * Avg per day + */ + avg_per_day: number; +}; + +export type QueueAnalyticsAnnotatorPerformance = { + /** + * User id + */ + user_id?: string | null; + /** + * Name + */ + name?: string | null; + /** + * Completed + */ + completed: number; + /** + * Last active + */ + last_active?: string | null; +}; + +export type QueueAnalyticsResult = { + throughput: QueueAnalyticsThroughput; + annotator_performance: Array; + /** + * Label distribution + */ + label_distribution: { + [key: string]: { + [key: string]: unknown; + }; + }; + /** + * Status breakdown + */ + status_breakdown: { + [key: string]: number; + }; + /** + * Total + */ + total: number; +}; + +export type QueueAnalyticsResponse = { + /** + * Status + */ + status?: boolean; + result: QueueAnalyticsResult; +}; + +export type QueueExportField = { + /** + * Id + */ + id: string; + /** + * Label + */ + label: string; + /** + * Column + */ + column: string; + /** + * Data type + */ + data_type: string; + /** + * Group + */ + group: string; + /** + * Default + */ + default: boolean; + /** + * Path + */ + path?: string; + /** + * Source type + */ + source_type?: string; + /** + * Kind + */ + kind?: string; + /** + * Label id + */ + label_id?: string; + /** + * Slot + */ + slot?: number; + /** + * Eval key + */ + eval_key?: string; + expand_fields?: Array; +}; + +export type QueueExportDefaultMapping = { + /** + * Field + */ + field: string; + /** + * Column + */ + column: string; + /** + * Enabled + */ + enabled: boolean; +}; + +export type QueueExportFieldsResult = { + fields: Array; + default_mapping: Array; +}; + +export type QueueExportFieldsResponse = { + /** + * Status + */ + status?: boolean; + result: QueueExportFieldsResult; +}; + +export type QueueExportColumnMapping = { + /** + * Field + */ + field?: string; + /** + * Id + */ + id?: string; + /** + * Column + */ + column?: string; + /** + * Enabled + */ + enabled?: boolean; +}; + +export type QueueExportToDatasetRequest = { + /** + * Dataset id + */ + dataset_id?: string; + /** + * Dataset name + */ + dataset_name?: string; + /** + * Status filter + */ + status_filter?: string; + column_mapping?: Array; +}; + +export type QueueExportToDatasetResult = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Dataset name + */ + dataset_name: string; + /** + * Rows created + */ + rows_created: number; + columns: Array; +}; + +export type QueueExportToDatasetResponse = { + /** + * Status + */ + status?: boolean; + result: QueueExportToDatasetResult; +}; + +export type QueueExportAnnotationsResponse = { + /** + * Status + */ + status?: boolean; + result: Array<{ + [key: string]: unknown; + }>; +}; + +export type QueueHardDeleteRequest = { + /** + * Force + */ + force: boolean; + /** + * Confirm name + */ + confirm_name: string; +}; + +export type QueueHardDeleteResult = { + /** + * Deleted + */ + deleted: boolean; + /** + * Hard deleted + */ + hard_deleted?: boolean; + /** + * Archived + */ + archived?: boolean; + /** + * Queue id + */ + queue_id: string; +}; + +export type QueueHardDeleteResponse = { + /** + * Status + */ + status?: boolean; + result: QueueHardDeleteResult; +}; + +export type QueueProgressAnnotatorStat = { + /** + * User id + */ + user_id: string; + /** + * Name + */ + name?: string | null; + /** + * Completed + */ + completed: number; + /** + * Pending + */ + pending: number; + /** + * In progress + */ + in_progress: number; + /** + * In review + */ + in_review: number; + /** + * Annotations count + */ + annotations_count: number; +}; + +export type QueueProgressUserProgress = { + /** + * Total + */ + total: number; + /** + * Completed + */ + completed: number; + /** + * Pending + */ + pending: number; + /** + * In progress + */ + in_progress: number; + /** + * In review + */ + in_review: number; + /** + * Skipped + */ + skipped: number; + /** + * Progress pct + */ + progress_pct: number; +}; + +export type QueueProgressResult = { + /** + * Total + */ + total: number; + /** + * Pending + */ + pending: number; + /** + * In progress + */ + in_progress: number; + /** + * In review + */ + in_review: number; + /** + * Completed + */ + completed: number; + /** + * Skipped + */ + skipped: number; + /** + * Progress pct + */ + progress_pct: number; + annotator_stats: Array; + user_progress: QueueProgressUserProgress; +}; + +export type QueueProgressResponse = { + /** + * Status + */ + status?: boolean; + result: QueueProgressResult; +}; + +export type QueueRemoveLabelResult = { + /** + * Removed + */ + removed: boolean; +}; + +export type QueueRemoveLabelResponse = { + /** + * Status + */ + status?: boolean; + result: QueueRemoveLabelResult; +}; + +export type EmptyRequest = { + [key: string]: never; +}; + +export type QueueStatusResponse = { + /** + * Status + */ + status?: boolean; + result: AnnotationQueue; +}; + +export type QueueStatusRequest = { + /** + * Status + */ + status: 'draft' | 'active' | 'paused' | 'completed'; +}; + +export type AutomationRuleScope = { + /** + * Dataset id + */ + dataset_id?: string; + /** + * Project id + */ + project_id?: string; + /** + * Is voice call + */ + is_voice_call?: boolean; + /** + * Remove simulation calls + */ + remove_simulation_calls?: boolean; +}; + +export type AutomationRuleConditions = { + /** + * Operator + */ + operator?: 'and'; + filter?: Array<{ + /** + * Column or attribute id to filter on. + */ + column_id: string; + /** + * Optional UI label for chips and saved views. + */ + display_name?: string; + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + */ + source?: string; + /** + * Optional metric output type metadata used by eval and annotation filters. + */ + output_type?: string; + filter_config: { + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + */ + filter_type: string; + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + */ + filter_op: string; + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + */ + filter_value?: unknown; + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + */ + col_type?: string; + }; + }>; + scope?: AutomationRuleScope; + /** + * Rules + */ + rules?: Array<{ + field: string; + op?: string; + /** + * Rule comparison value. Can be a scalar, list, object, boolean, or null depending on the operator. + */ + value?: unknown; + }>; +}; + +export type AutomationRule = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Queue + */ + readonly queue?: string; + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + conditions?: AutomationRuleConditions; + /** + * Enabled + */ + enabled?: boolean; + /** + * Trigger frequency + */ + trigger_frequency?: 'manual' | 'hourly' | 'daily' | 'weekly' | 'monthly'; + /** + * Organization + */ + readonly organization?: string; + /** + * Created by + */ + readonly created_by?: string | null; + /** + * Created by name + */ + readonly created_by_name?: string; + /** + * Last triggered at + */ + readonly last_triggered_at?: string | null; + /** + * Trigger count + */ + readonly trigger_count?: number; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type AutomationRuleEvaluateResult = { + /** + * Matched + */ + matched: number; + /** + * Added + */ + added: number; + /** + * Duplicates + */ + duplicates: number; + /** + * Truncated + */ + truncated?: boolean; + /** + * Error + */ + error?: string; +}; + +export type AutomationRuleEvaluateResponse = { + /** + * Status + */ + status?: boolean; + result: AutomationRuleEvaluateResult; +}; + +export type AutomationRuleEvaluateAcceptedResponse = { + /** + * Status + */ + status: string; + /** + * Workflow id + */ + workflow_id: string; + /** + * Message + */ + message: string; +}; + +export type QueueItem = { + /** + * Id + */ + readonly id?: string; + /** + * Queue + */ + readonly queue?: string; + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + /** + * Source id + */ + source_id?: string; + /** + * Status + */ + status?: 'pending' | 'in_progress' | 'completed' | 'skipped'; + /** + * Workflow status + */ + readonly workflow_status?: string; + /** + * Workflow status label + */ + readonly workflow_status_label?: string; + /** + * Priority + */ + priority?: number; + /** + * Order + */ + order?: number; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Assigned to + */ + assigned_to?: string | null; + /** + * Assigned to name + */ + readonly assigned_to_name?: string; + /** + * Assigned users + */ + readonly assigned_users?: string; + /** + * Reserved by + */ + reserved_by?: string | null; + /** + * Reserved by name + */ + readonly reserved_by_name?: string; + /** + * Reservation expires at + */ + reservation_expires_at?: string | null; + /** + * Review status + */ + review_status?: string | null; + /** + * Reviewed by + */ + reviewed_by?: string | null; + /** + * Reviewed by name + */ + readonly reviewed_by_name?: string; + /** + * Reviewed at + */ + reviewed_at?: string | null; + /** + * Review notes + */ + review_notes?: string | null; + /** + * Source preview + */ + readonly source_preview?: string; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type AddQueueItem = { + /** + * Source type + */ + source_type: 'call_execution' | 'dataset_row' | 'observation_span' | 'prototype_run' | 'trace' | 'trace_session'; + /** + * Source id + */ + source_id: string; +}; + +export type Selection = { + /** + * Mode + */ + mode: 'filter'; + /** + * Source type + */ + source_type: 'call_execution' | 'observation_span' | 'trace' | 'trace_session'; + /** + * Project id + */ + project_id: string; + filter?: Array<{ + /** + * Column or attribute id to filter on. + */ + column_id: string; + /** + * Optional UI label for chips and saved views. + */ + display_name?: string; + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + */ + source?: string; + /** + * Optional metric output type metadata used by eval and annotation filters. + */ + output_type?: string; + filter_config: { + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + */ + filter_type: string; + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + */ + filter_op: string; + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + */ + filter_value?: unknown; + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + */ + col_type?: string; + }; + }>; + exclude_ids?: Array; + /** + * Remove simulation calls + */ + remove_simulation_calls?: boolean; + /** + * Is voice call + */ + is_voice_call?: boolean; +}; + +export type AddItems = { + items?: Array; + selection?: Selection; +}; + +export type QueueAddItemsResult = { + /** + * Added + */ + added: number; + /** + * Duplicates + */ + duplicates: number; + errors: Array; + /** + * Queue status + */ + queue_status: string; + /** + * Total matching + */ + total_matching?: number; +}; + +export type QueueAddItemsResponse = { + /** + * Status + */ + status?: boolean; + result: QueueAddItemsResult; +}; + +export type ApiSelectionTooLargeDetail = { + /** + * Type + */ + type: 'selection_too_large'; + /** + * Message + */ + message: string; + /** + * Total matching + */ + total_matching: number; + /** + * Cap + */ + cap: number; +}; + +export type ApiSelectionTooLargeError = { + /** + * Status + */ + status?: boolean; + /** + * Result + */ + result?: string | null; + /** + * Type + */ + type?: 'selection_too_large'; + /** + * Code + */ + code?: string; + /** + * Detail + */ + detail?: string; + /** + * Message + */ + message: string; + error: ApiSelectionTooLargeDetail; +}; + +export type AssignItems = { + item_ids: Array; + user_ids?: Array; + /** + * Action + */ + action?: 'add' | 'set' | 'remove'; +}; + +export type QueueAssignItemsResult = { + /** + * Assigned + */ + assigned: number; +}; + +export type QueueAssignItemsResponse = { + /** + * Status + */ + status?: boolean; + result: QueueAssignItemsResult; +}; + +export type BulkRemoveItems = { + item_ids: Array; +}; + +export type QueueBulkRemoveItemsResult = { + /** + * Removed + */ + removed: number; +}; + +export type QueueBulkRemoveItemsResponse = { + /** + * Status + */ + status?: boolean; + result: QueueBulkRemoveItemsResult; +}; + +export type QueueNextItemResult = { + /** + * Item + */ + item: { + [key: string]: unknown; + }; +}; + +export type QueueNextItemResponse = { + /** + * Status + */ + status?: boolean; + result: QueueNextItemResult; +}; + +export type QueueAnnotateDetailResult = { + /** + * Item + */ + item: { + [key: string]: unknown; + }; + /** + * Queue + */ + queue: { + [key: string]: unknown; + }; + labels: Array<{ + [key: string]: unknown; + }>; + annotations: Array<{ + [key: string]: unknown; + }>; + review_comments: Array<{ + [key: string]: unknown; + }>; + review_threads: Array<{ + [key: string]: unknown; + }>; + /** + * Existing notes + */ + existing_notes: string; + span_notes: Array<{ + [key: string]: unknown; + }>; + /** + * Span notes source id + */ + span_notes_source_id?: string | null; + /** + * Progress + */ + progress: { + [key: string]: unknown; + }; + /** + * Next item id + */ + next_item_id?: string | null; + /** + * Prev item id + */ + prev_item_id?: string | null; +}; + +export type QueueAnnotateDetailResponse = { + /** + * Status + */ + status?: boolean; + result: QueueAnnotateDetailResult; +}; + +export type Score = { + /** + * Id + */ + readonly id?: string; + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + /** + * Source id + */ + readonly source_id?: string; + /** + * Label id + */ + readonly label_id?: string; + /** + * Label name + */ + readonly label_name?: string; + /** + * Label type + */ + readonly label_type?: string; + /** + * Label settings + */ + readonly label_settings?: { + [key: string]: unknown; + }; + /** + * Label allow notes + */ + readonly label_allow_notes?: boolean; + /** + * Value + */ + value: { + [key: string]: unknown; + }; + /** + * Score source + */ + score_source?: 'human' | 'api' | 'auto' | 'imported'; + /** + * Notes + */ + notes?: string | null; + /** + * Annotator + */ + readonly annotator?: string | null; + /** + * Annotator name + */ + readonly annotator_name?: string; + /** + * Annotator email + */ + readonly annotator_email?: string; + /** + * Queue item + */ + readonly queue_item?: string | null; + /** + * Queue id + */ + readonly queue_id?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; +}; + +export type QueueItemAnnotationsResponse = { + /** + * Status + */ + status?: boolean; + result: Array; +}; + +export type ImportAnnotationEntry = { + /** + * Label id + */ + label_id: string; + /** + * Value + */ + value: { + [key: string]: unknown; + }; + /** + * Notes + */ + notes?: string; + /** + * Score source + */ + score_source?: string; +}; + +export type ImportAnnotations = { + annotations: Array; + /** + * Annotator id + */ + annotator_id?: string; +}; + +export type QueueImportAnnotationsResult = { + /** + * Imported + */ + imported: number; +}; + +export type QueueImportAnnotationsResponse = { + /** + * Status + */ + status?: boolean; + result: QueueImportAnnotationsResult; +}; + +export type SubmitAnnotationEntry = { + /** + * Label id + */ + label_id: string; + /** + * Value + */ + value: { + [key: string]: unknown; + }; + /** + * Notes + */ + notes?: string; +}; + +export type SubmitAnnotations = { + annotations: Array; + /** + * Notes + */ + notes?: string; + /** + * Item notes + */ + item_notes?: string | null; +}; + +export type QueueSubmitAnnotationsResult = { + /** + * Submitted + */ + submitted: number; +}; + +export type QueueSubmitAnnotationsResponse = { + /** + * Status + */ + status?: boolean; + result: QueueSubmitAnnotationsResult; +}; + +export type QueueItemNavigationRequest = { + exclude?: Array; + /** + * Exclude review status + */ + exclude_review_status?: string; + /** + * Include completed + */ + include_completed?: boolean; +}; + +export type QueueNavigationResult = { + /** + * Completed item id + */ + completed_item_id?: string; + /** + * Skipped item id + */ + skipped_item_id?: string; + /** + * Next item + */ + next_item: { + [key: string]: unknown; + }; +}; + +export type QueueNavigationResponse = { + /** + * Status + */ + status?: boolean; + result: QueueNavigationResult; +}; + +export type QueueDiscussionResult = { + review_comments: Array<{ + [key: string]: unknown; + }>; + review_threads: Array<{ + [key: string]: unknown; + }>; + /** + * Comment + */ + comment?: { + [key: string]: unknown; + }; + /** + * Thread + */ + thread?: { + [key: string]: unknown; + }; +}; + +export type QueueDiscussionResponse = { + /** + * Status + */ + status?: boolean; + result: QueueDiscussionResult; +}; + +export type DiscussionCommentRequest = { + /** + * Comment + */ + comment?: string; + /** + * Label id + */ + label_id?: string; + /** + * Target annotator id + */ + target_annotator_id?: string; + /** + * Thread id + */ + thread_id?: string; + mentioned_user_ids?: Array; +}; + +export type DiscussionReactionRequest = { + /** + * Emoji + */ + emoji?: string; +}; + +export type DiscussionThreadStatusRequest = { + /** + * Comment + */ + comment?: string; +}; + +export type QueueReleaseReservationResult = { + /** + * Released + */ + released: boolean; +}; + +export type QueueReleaseReservationResponse = { + /** + * Status + */ + status?: boolean; + result: QueueReleaseReservationResult; +}; + +export type ReviewLabelCommentRequest = { + /** + * Label id + */ + label_id?: string; + /** + * Target annotator id + */ + target_annotator_id?: string; + /** + * Comment + */ + comment?: string; +}; + +export type ReviewItemRequest = { + /** + * Action + */ + action: 'approve' | 'request_changes' | 'reject' | 'comment'; + /** + * Notes + */ + notes?: string; + label_comments?: Array; +}; + +export type QueueReviewItemResult = { + /** + * Reviewed item id + */ + reviewed_item_id: string; + /** + * Action + */ + action: string; + /** + * Next item + */ + next_item: { + [key: string]: unknown; + }; + review_comments: Array<{ + [key: string]: unknown; + }>; + review_threads: Array<{ + [key: string]: unknown; + }>; +}; + +export type QueueReviewItemResponse = { + /** + * Status + */ + status?: boolean; + result: QueueReviewItemResult; +}; + +export type Organization = { + /** + * Id + */ + readonly id?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Name + */ + name: string; + /** + * Display name + */ + display_name?: string; + /** + * Is new + */ + is_new?: boolean; + /** + * Ws enabled + */ + ws_enabled?: boolean; + /** + * Region + */ + region?: string; + /** + * Require 2fa + */ + require_2fa?: boolean; + /** + * Require 2fa grace period days + */ + require_2fa_grace_period_days?: number; + /** + * Require 2fa enforced at + */ + require_2fa_enforced_at?: string | null; +}; + +export type User = { + /** + * Id + */ + readonly id?: string; + /** + * Email + */ + email: string; + /** + * Name + */ + name: string; + /** + * Organization role + */ + organization_role?: 'Owner' | 'Admin' | 'Member' | 'Viewer' | 'workspace_admin' | 'workspace_member' | 'workspace_viewer'; + organization?: Organization; + /** + * Created at + */ + readonly created_at?: string; + /** + * Status + */ + readonly status?: string; + /** + * Role + * + * User's job role (e.g., Data Scientist, ML Engineer, or custom role) + */ + role?: string | null; + /** + * Goals + * + * List of user's goals for using the platform + */ + goals?: { + [key: string]: unknown; + }; +}; + +export type AnnotationsLabels = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Type + */ + type: 'text' | 'numeric' | 'categorical' | 'star' | 'thumbs_up_down'; + /** + * Organization + */ + readonly organization?: string; + /** + * Settings + */ + settings?: { + [key: string]: unknown; + }; + /** + * Project + */ + project?: string; + /** + * Description + */ + description?: string | null; + /** + * Allow notes + */ + allow_notes?: boolean; + /** + * Created at + */ + readonly created_at?: string; + /** + * Trace annotations count + */ + readonly trace_annotations_count?: number; + /** + * Annotation count + */ + readonly annotation_count?: number; +}; + +export type AnnotationLabelRestoreResponse = { + /** + * Status + */ + status?: boolean; + result: AnnotationsLabels; +}; + +export type ApiKey = { + /** + * Id + */ + readonly id?: string; + /** + * Provider + */ + provider: string; + /** + * Key + */ + key?: string | null; + /** + * Organization + */ + readonly organization?: string | null; + /** + * Masked actual key + */ + readonly masked_actual_key?: string; + /** + * Config json + */ + config_json?: { + [key: string]: unknown; + }; +}; + +export type ModelHubPaginatedResponse = { + /** + * Count + */ + count: number; + /** + * Next + */ + next?: string | null; + /** + * Previous + */ + previous?: string | null; + results: Array<{ + [key: string]: unknown; + }>; +}; + +export type ModelHubEmptyRequest = { + [key: string]: unknown; +}; + +export type ModelHubStringResultResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: string; +}; + +export type DatasetColumnDetailItem = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Data type + */ + data_type?: string | null; +}; + +export type DatasetColumnDetailResult = { + columns: Array; +}; + +export type DatasetColumnDetailResponse = { + /** + * Status + */ + status: boolean; + result: DatasetColumnDetailResult; +}; + +export type AnnotationSummaryHeader = { + /** + * Dataset coverage + */ + dataset_coverage?: number | null; + /** + * Completion eta + */ + completion_eta?: number | null; + /** + * Overall agreement + */ + overall_agreement?: number | null; +}; + +export type AnnotationSummaryResult = { + labels?: Array<{ + [key: string]: unknown; + }>; + annotators?: Array<{ + [key: string]: unknown; + }>; + header?: AnnotationSummaryHeader; +}; + +export type AnnotationSummaryResponse = { + /** + * Status + */ + status?: boolean; + result: AnnotationSummaryResult; +}; + +export type DatasetEvalStatsMetric = { + /** + * Id + */ + id?: string; + /** + * Name + */ + name: string; + /** + * Total cells + */ + total_cells?: number | null; + /** + * Output + */ + output: { + [key: string]: unknown; + }; +}; + +export type DatasetEvalStatsItem = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Output type + */ + output_type: string; + result: Array; + /** + * Total pass rate + */ + total_pass_rate?: number | null; + /** + * Total avg + */ + total_avg?: { + [key: string]: unknown; + }; + /** + * Total choices avg + */ + total_choices_avg?: { + [key: string]: unknown; + }; + /** + * Is numeric eval + */ + is_numeric_eval?: boolean; + /** + * Is numeric eval percentage + */ + is_numeric_eval_percentage?: boolean; +}; + +export type DatasetEvalStatsResponse = { + /** + * Status + */ + status: boolean; + result: Array; +}; + +export type JsonColumnSchemaEntry = { + /** + * Name + */ + name: string; + keys?: Array; + /** + * Sample + */ + sample?: { + [key: string]: unknown; + }; + /** + * Max array count + */ + max_array_count?: number; + /** + * Max images count + */ + max_images_count?: number; +}; + +export type DatasetJsonSchemaResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: { + [key: string]: JsonColumnSchemaEntry; + }; +}; + +export type DatasetRunPromptStatsPrompt = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Input token + */ + input_token: number; + /** + * Output token + */ + output_token: number; + /** + * Total token + */ + total_token: number; +}; + +export type DatasetRunPromptStatsResult = { + /** + * Avg tokens + */ + avg_tokens: number; + /** + * Avg cost + */ + avg_cost: number; + /** + * Avg time + */ + avg_time: number; + prompts: Array; +}; + +export type DatasetRunPromptStatsResponse = { + /** + * Status + */ + status: boolean; + result: DatasetRunPromptStatsResult; +}; + +export type CompareEvalsListRequest = { + /** + * Search text + */ + search_text?: string; + /** + * Eval type + */ + eval_type: 'user'; + dataset_ids: Array; +}; + +export type CompareEvalListResult = { + evals: Array<{ + [key: string]: unknown; + }>; +}; + +export type CompareEvalListResponse = { + /** + * Status + */ + status: boolean; + result: CompareEvalListResult; +}; + +export type ComparePreviewRunEvalRequest = { + /** + * Config + */ + config: { + [key: string]: unknown; + }; + /** + * Model + */ + model?: string; + /** + * Template id + */ + template_id: string; + dataset_ids: Array; + /** + * Dataset info + */ + dataset_info?: { + [key: string]: unknown; + }; + /** + * Source + */ + source?: string; +}; + +export type EvalPreviewResult = { + responses: Array<{ + [key: string]: unknown; + }>; +}; + +export type EvalPreviewResponse = { + /** + * Status + */ + status: boolean; + result: EvalPreviewResult; +}; + +export type CompareDatasetRowResult = { + /** + * Prev row id + */ + prev_row_id?: string | null; + /** + * Next row id + */ + next_row_id?: string | null; + table: Array<{ + [key: string]: unknown; + }>; +}; + +export type CompareDatasetRowResponse = { + /** + * Status + */ + status: boolean; + result: CompareDatasetRowResult; +}; + +export type CompareDatasetDeleteResult = { + /** + * Message + */ + message: string; +}; + +export type CompareDatasetDeleteResponse = { + /** + * Status + */ + status: boolean; + result: CompareDatasetDeleteResult; +}; + +export type DatasetExplanationSummaryResponseResult = { + /** + * Response + */ + response: { + [key: string]: unknown; + }; + /** + * Last updated + */ + last_updated: string | null; + /** + * Status + */ + status: string; + /** + * Row count + */ + row_count: number; + /** + * Min rows required + */ + min_rows_required: number; +}; + +export type DatasetExplanationSummaryResponse = { + /** + * Status + */ + status: boolean; + result: DatasetExplanationSummaryResponseResult; +}; + +export type BaseColumnsResponseResult = { + base_columns: Array; +}; + +export type BaseColumnsResponse = { + /** + * Status + */ + status: boolean; + result: BaseColumnsResponseResult; +}; + +export type HuggingFaceDatasetDetailRequest = { + /** + * Dataset id + */ + dataset_id: string; +}; + +export type HuggingFaceDatasetDetail = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Downloads + */ + downloads: number; + /** + * Likes + */ + likes: number; + tags: Array; + /** + * Author + */ + author?: string | null; +}; + +export type HuggingFaceDatasetDetailResponseResult = { + /** + * Message + */ + message: string; + dataset: HuggingFaceDatasetDetail; +}; + +export type HuggingFaceDatasetDetailResponse = { + /** + * Status + */ + status: boolean; + result: HuggingFaceDatasetDetailResponseResult; +}; + +export type HuggingFaceDatasetListRequest = { + /** + * Search query + */ + search_query?: string; + /** + * Filter params + */ + filter_params?: { + [key: string]: unknown; + }; +}; + +export type HuggingFaceDatasetListItem = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Downloads + */ + downloads: number; + /** + * Likes + */ + likes: number; + /** + * Author + */ + author?: string | null; +}; + +export type HuggingFaceDatasetListResponseResult = { + /** + * Message + */ + message: string; + /** + * Total datasets + */ + total_datasets: number; + datasets: Array; +}; + +export type HuggingFaceDatasetListResponse = { + /** + * Status + */ + status: boolean; + result: HuggingFaceDatasetListResponseResult; +}; + +export type AddApiColumnRequest = { + /** + * Column name + */ + column_name: string; + /** + * Config + */ + config: { + [key: string]: unknown; + }; + /** + * Concurrency + */ + concurrency?: number; +}; + +export type DynamicColumnCreateResult = { + /** + * Message + */ + message: string; + /** + * New column id + */ + new_column_id: string; + /** + * New column name + */ + new_column_name: string; +}; + +export type DynamicColumnCreateResponse = { + /** + * Status + */ + status: boolean; + result: DynamicColumnCreateResult; +}; + +export type VectorDbColumnRequest = { + /** + * Column id + */ + column_id: string; + /** + * New column name + */ + new_column_name?: string; + /** + * Sub type + */ + sub_type: string; + /** + * Api key + */ + api_key: string; + /** + * Collection name + */ + collection_name?: string; + /** + * Url + */ + url?: string; + /** + * Search type + */ + search_type?: string; + /** + * Key + */ + key?: string; + /** + * Limit + */ + limit?: number; + /** + * Index name + */ + index_name?: string; + /** + * Top k + */ + top_k?: number; + /** + * Namespace + */ + namespace?: string; + /** + * Embedding config + */ + embedding_config?: { + [key: string]: unknown; + }; + /** + * Concurrency + */ + concurrency?: number; + /** + * Query key + */ + query_key?: string; + /** + * Vector length + */ + vector_length?: number; +}; + +export type ClassifyColumnRequest = { + /** + * Column id + */ + column_id: string; + labels: Array; + /** + * Language model id + */ + language_model_id?: string; + /** + * Concurrency + */ + concurrency?: number; + /** + * New column name + */ + new_column_name?: string; +}; + +export type CompareDataset = { + /** + * Compare id + */ + compare_id?: string | null; + /** + * Page size + */ + page_size?: number; + /** + * Current page index + */ + current_page_index?: number; + /** + * Base column name + */ + base_column_name: string; + /** + * Dataset info + */ + dataset_info?: { + [key: string]: unknown; + }; + common_column_names?: Array; + dataset_ids: Array; +}; + +export type CompareDatasetMetadata = { + /** + * Compare id + */ + compare_id: string; + /** + * Total rows + */ + total_rows: number; + /** + * Total pages + */ + total_pages: number; +}; + +export type CompareDatasetResult = { + metadata?: CompareDatasetMetadata; + column_config?: Array<{ + [key: string]: unknown; + }>; + table?: Array<{ + [key: string]: unknown; + }>; +}; + +export type CompareDatasetResponse = { + /** + * Status + */ + status: boolean; + result: CompareDatasetResult; +}; + +export type CompareExperimentEvalRequest = { + /** + * Name + */ + name: string; + /** + * Template id + */ + template_id: string; + /** + * Config + */ + config: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Model + */ + model?: string; + /** + * Eval type + */ + eval_type?: string; + /** + * Run + */ + run?: boolean; + /** + * Save as template + */ + save_as_template?: boolean; + /** + * Experiment id + */ + experiment_id?: string; + /** + * Composite weight overrides + */ + composite_weight_overrides?: { + [key: string]: unknown; + }; + dataset_ids?: Array; +}; + +export type DevelopDatasetMessageResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: string; +}; + +export type CompareStartEvalsRequest = { + user_eval_names: Array; + dataset_ids?: Array; +}; + +export type CompareDatasetStatsRequest = { + /** + * Base column name + */ + base_column_name: string; + dataset_ids: Array; + /** + * Stat type + */ + stat_type?: 'evaluation' | 'run_prompt'; +}; + +export type CompareDatasetStatsResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: { + [key: string]: Array<{ + [key: string]: unknown; + }>; + }; +}; + +export type ConditionalColumnRequest = { + config: Array<{ + [key: string]: unknown; + }>; + /** + * New column name + */ + new_column_name: string; + /** + * Concurrency + */ + concurrency?: number; +}; + +export type DerivedVariableDetail = { + paths?: Array; + /** + * Schema + */ + schema?: { + [key: string]: unknown; + }; + full_variables?: Array; + /** + * Raw sample + */ + raw_sample?: { + [key: string]: unknown; + }; + /** + * Is json + */ + is_json?: boolean; +}; + +export type DatasetDerivedVariablesResult = { + /** + * Derived variables + */ + derived_variables: { + [key: string]: DerivedVariableDetail; + }; +}; + +export type DatasetDerivedVariablesResponse = { + /** + * Status + */ + status: boolean; + result: DatasetDerivedVariablesResult; +}; + +export type DuplicateRowsRequest = { + row_ids?: Array; + /** + * Selected all rows + */ + selected_all_rows?: boolean; + /** + * Num copies + */ + num_copies?: number; +}; + +export type DuplicateRowsResult = { + /** + * Message + */ + message: string; + /** + * Source rows + */ + source_rows: number; + /** + * Copies per row + */ + copies_per_row: number; + /** + * Total new rows + */ + total_new_rows: number; + new_row_ids: Array; +}; + +export type DuplicateRowsResponse = { + /** + * Status + */ + status: boolean; + result: DuplicateRowsResult; +}; + +export type DuplicateDatasetRequest = { + row_ids?: Array; + /** + * Selected all rows + */ + selected_all_rows?: boolean; + /** + * Name + */ + name: string; +}; + +export type DuplicateDatasetResult = { + /** + * Message + */ + message: string; + /** + * New dataset id + */ + new_dataset_id: string; + /** + * New dataset name + */ + new_dataset_name: string; + /** + * Columns copied + */ + columns_copied: number; + /** + * Rows copied + */ + rows_copied: number; +}; + +export type DuplicateDatasetResponse = { + /** + * Status + */ + status: boolean; + result: DuplicateDatasetResult; +}; + +export type ExtractEntitiesRequest = { + /** + * Column id + */ + column_id: string; + /** + * Instruction + */ + instruction: string; + /** + * Language model id + */ + language_model_id?: string; + /** + * Concurrency + */ + concurrency?: number; + /** + * New column name + */ + new_column_name?: string; +}; + +export type DynamicColumnMessageResult = { + /** + * Message + */ + message: string; +}; + +export type DynamicColumnMessageResponse = { + /** + * Status + */ + status: boolean; + result: DynamicColumnMessageResult; +}; + +export type MergeDatasetRequest = { + row_ids?: Array; + /** + * Selected all rows + */ + selected_all_rows?: boolean; + /** + * Target dataset id + */ + target_dataset_id: string; +}; + +export type MergeDatasetResult = { + /** + * Message + */ + message: string; + /** + * Rows added + */ + rows_added: number; + /** + * New columns created + */ + new_columns_created: number; + /** + * Columns mapped + */ + columns_mapped: number; +}; + +export type MergeDatasetResponse = { + /** + * Status + */ + status: boolean; + result: MergeDatasetResult; +}; + +export type PreviewDatasetOperationRequest = { + /** + * Column id + */ + column_id?: string; + /** + * Json key + */ + json_key?: string; + labels?: Array; + /** + * Instruction + */ + instruction?: string; + /** + * Language model id + */ + language_model_id?: string; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Code + */ + code?: string; +}; + +export type PreviewDatasetOperationResultItem = { + /** + * Row id + */ + row_id: string; + /** + * Input + */ + input?: { + [key: string]: unknown; + }; + /** + * Output + */ + output?: { + [key: string]: unknown; + }; + /** + * Details + */ + details?: { + [key: string]: unknown; + }; +}; + +export type PreviewDatasetOperationResult = { + /** + * Message + */ + message: string; + preview_results: Array; + /** + * Sample size + */ + sample_size: number; +}; + +export type PreviewDatasetOperationResponse = { + /** + * Status + */ + status: boolean; + result: PreviewDatasetOperationResult; +}; + +export type DeleteEvalTemplate = { + /** + * Eval template id + */ + eval_template_id: string; +}; + +export type AddAsNewDatasetRequest = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Name + */ + name?: string; + /** + * Columns + */ + columns?: { + [key: string]: unknown; + }; +}; + +export type DatasetCopyResult = { + /** + * Message + */ + message: string; + /** + * Dataset id + */ + dataset_id: string; + /** + * Dataset name + */ + dataset_name: string; +}; + +export type DatasetCopyResponse = { + /** + * Status + */ + status: boolean; + result: DatasetCopyResult; +}; + +export type AddRowsFromFileRequest = { + /** + * File + */ + readonly file?: string; + /** + * Dataset id + */ + dataset_id: string; + /** + * Model type + */ + model_type?: string; +}; + +export type DatasetSdkRowsRequest = { + /** + * Dataset name + */ + dataset_name?: string; + /** + * Dataset id + */ + dataset_id?: string | null; +}; + +export type Dataset = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Organization + */ + organization: string; + /** + * Model type + */ + model_type?: 'Numeric' | 'ScoreCategorical' | 'Ranking' | 'BinaryClassification' | 'Regression' | 'ObjectDetection' | 'Segmentation' | 'GenerativeLLM' | 'GenerativeImage' | 'GenerativeVideo' | 'TTS' | 'STT' | 'MultiModal'; + /** + * Source + */ + source?: 'demo' | 'build' | 'sdk' | 'observe' | 'knowledge_base' | 'scenario' | 'experiment_snapshot' | 'graph'; + /** + * User + */ + user?: string | null; +}; + +export type DatasetSdkRowsCode = { + /** + * Python add row + */ + python_add_row: string; + /** + * Python add col + */ + python_add_col: string; + /** + * Typescript add col + */ + typescript_add_col: string; + /** + * Typescript add row + */ + typescript_add_row: string; + /** + * Curl add col + */ + curl_add_col: string; + /** + * Curl add row + */ + curl_add_row: string; +}; + +export type DatasetSdkRowsResult = { + /** + * Api keys + */ + api_keys: { + [key: string]: unknown; + }; + dataset: Dataset; + code: DatasetSdkRowsCode; +}; + +export type DatasetSdkRowsResponse = { + /** + * Status + */ + status: boolean; + result: DatasetSdkRowsResult; +}; + +export type PromptConfig = { + /** + * Model + */ + model?: string; + /** + * Run prompt config + */ + run_prompt_config?: { + [key: string]: string | null; + }; + /** + * List of messages with format [{'role': 'user/assistant', 'content': 'text'}] + */ + messages?: Array<{ + [key: string]: string | null; + }>; + /** + * Temperature + * + * Controls the randomness. Value between 0 and 2. + */ + temperature?: number | null; + /** + * Frequency penalty + * + * Penalty for word repetition. Value between -2 and 2. + */ + frequency_penalty?: number | null; + /** + * Presence penalty + * + * Penalty for new word usage. Value between -2 and 2. + */ + presence_penalty?: number | null; + /** + * Max tokens + * + * Maximum number of tokens to generate. Null = use provider default. + */ + max_tokens?: number | null; + /** + * Top p + * + * Controls diversity via nucleus sampling. Value between 0 and 1. + */ + top_p?: number | null; + /** + * Response format + * + * JSON schema for response format if required. Can be a JSON object or string. Defaults to None. + */ + response_format?: { + [key: string]: unknown; + }; + /** + * Tool choice + * + * Tool selection mode: 'auto' or 'required'. + */ + tool_choice?: 'auto' | 'required' | null; + /** + * List of tools with tool properties if available. + */ + tools?: Array<{ + [key: string]: string | null; + }> | null; + /** + * Output format + * + * Output format type. + */ + output_format?: 'array' | 'string' | 'number' | 'object' | 'audio' | 'image'; + /** + * Concurrency + * + * Number of concurrent operations allowed. Maximum 10. + */ + concurrency?: number | null; +}; + +export type AddRunPrompt = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Name + */ + name: string; + config?: PromptConfig; +}; + +export type CloneDatasetRequest = { + /** + * New dataset name + */ + new_dataset_name?: string; +}; + +export type HuggingFaceDatasetCreateRequest = { + /** + * Name + */ + name?: string; + /** + * Model type + */ + model_type?: string; + /** + * Num rows + */ + num_rows?: number; + /** + * Huggingface dataset name + */ + huggingface_dataset_name: string; + /** + * Huggingface dataset config + */ + huggingface_dataset_config?: string; + /** + * Huggingface dataset split + */ + huggingface_dataset_split: string; +}; + +export type DatasetCreateStartedResult = { + /** + * Message + */ + message: string; + /** + * Dataset id + */ + dataset_id: string; + /** + * Dataset name + */ + dataset_name: string; + /** + * Dataset model type + */ + dataset_model_type?: string | null; +}; + +export type DatasetCreateStartedResponse = { + /** + * Status + */ + status: boolean; + result: DatasetCreateStartedResult; +}; + +export type CreateDatasetFromLocalFileRequest = { + /** + * File + */ + readonly file?: string; + /** + * New dataset name + */ + new_dataset_name?: string; + /** + * Model type + */ + model_type?: string; + /** + * Source + */ + source?: string; +}; + +export type LocalFileDatasetCreateStartedResult = { + /** + * Message + */ + message: string; + /** + * Dataset id + */ + dataset_id: string; + /** + * Dataset name + */ + dataset_name: string; + /** + * Dataset model type + */ + dataset_model_type?: string | null; + /** + * Processing status + */ + processing_status: string; + /** + * Estimated rows + */ + estimated_rows: number; + /** + * Estimated columns + */ + estimated_columns: number; +}; + +export type LocalFileDatasetCreateStartedResponse = { + /** + * Status + */ + status: boolean; + result: LocalFileDatasetCreateStartedResult; +}; + +export type ManualDatasetCreateRequest = { + /** + * Dataset name + */ + dataset_name: string; + /** + * Number of rows + */ + number_of_rows?: number; + /** + * Number of columns + */ + number_of_columns?: number; +}; + +export type ManualDatasetCreateResult = { + /** + * Message + */ + message: string; + /** + * Dataset id + */ + dataset_id: string; + /** + * Rows created + */ + rows_created: number; + /** + * Columns created + */ + columns_created: number; +}; + +export type ManualDatasetCreateResponse = { + /** + * Status + */ + status: boolean; + result: ManualDatasetCreateResult; +}; + +export type CreateEmptyDatasetRequest = { + /** + * New dataset name + */ + new_dataset_name: string; + /** + * Model type + */ + model_type?: string; + /** + * Is sdk + */ + is_sdk?: boolean; + /** + * Row + */ + row?: number; +}; + +export type SyntheticDatasetCreation = { + /** + * Num rows + */ + num_rows: number; + columns: Array; + /** + * Dataset + */ + dataset: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string; +}; + +export type SyntheticDatasetCreateStartedResult = { + /** + * Message + */ + message: string; + data: Dataset; +}; + +export type SyntheticDatasetCreateStartedResponse = { + /** + * Status + */ + status: boolean; + result: SyntheticDatasetCreateStartedResult; +}; + +export type DatasetCreationProgressResult = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Dataset name + */ + dataset_name: string; + /** + * Processing status + */ + processing_status: string; + /** + * Is processing + */ + is_processing: boolean; + /** + * Is completed + */ + is_completed: boolean; + /** + * Is failed + */ + is_failed: boolean; + /** + * Original filename + */ + original_filename?: string | null; + /** + * Estimated rows + */ + estimated_rows?: number | null; + /** + * Estimated columns + */ + estimated_columns?: number | null; + /** + * Queued at + */ + queued_at?: string | null; + /** + * Started at + */ + started_at?: string | null; + /** + * Completed at + */ + completed_at?: string | null; + /** + * Failed at + */ + failed_at?: string | null; + /** + * Error message + */ + error_message?: string | null; +}; + +export type DatasetCreationProgressResponse = { + /** + * Status + */ + status: boolean; + result: DatasetCreationProgressResult; +}; + +export type EditRunPromptColumn = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Column id + */ + column_id: string; + /** + * Name + */ + name?: string | null; + config?: PromptConfig; +}; + +export type DatasetCellDataRequest = { + row_ids: Array; + column_ids: Array; +}; + +export type DatasetCellValue = { + /** + * Cell value + */ + cell_value?: { + [key: string]: unknown; + }; + /** + * Status + */ + status?: string | null; + /** + * Value infos + */ + value_infos?: { + [key: string]: unknown; + }; + /** + * Feedback info + */ + feedback_info?: { + [key: string]: unknown; + }; +}; + +export type DatasetCellDataResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: { + [key: string]: { + [key: string]: DatasetCellValue; + }; + }; +}; + +export type DatasetNameItem = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Name + */ + name: string; + /** + * Model type + */ + model_type?: string; +}; + +export type DatasetNamesResult = { + datasets: Array; +}; + +export type DatasetNamesResponse = { + /** + * Status + */ + status: boolean; + result: DatasetNamesResult; +}; + +export type DatasetListItem = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Number of datapoints + */ + number_of_datapoints: number; + /** + * Number of experiments + */ + number_of_experiments: number; + /** + * Number of optimisations + */ + number_of_optimisations: number; + /** + * Derived datasets + */ + derived_datasets: number; + /** + * Created at + */ + created_at: string; + /** + * Dataset type + */ + dataset_type: string; +}; + +export type DatasetListResult = { + datasets: Array; + /** + * Total pages + */ + total_pages: number; + /** + * Total count + */ + total_count: number; +}; + +export type DatasetListResponse = { + /** + * Status + */ + status: boolean; + result: DatasetListResult; +}; + +export type HuggingFaceDatasetConfigRequest = { + /** + * Dataset path + */ + dataset_path: string; +}; + +export type HuggingFaceDatasetConfigResult = { + /** + * Message + */ + message: string; + /** + * Dataset info + */ + dataset_info: { + [key: string]: unknown; + }; +}; + +export type HuggingFaceDatasetConfigResponse = { + /** + * Status + */ + status: boolean; + result: HuggingFaceDatasetConfigResult; +}; + +export type DatasetRowDiffRequest = { + /** + * Experiment id + */ + experiment_id: string; + column_ids: Array; + row_ids: Array; + compare_column_ids: Array; +}; + +export type ExperimentRowDiffCell = { + /** + * Cell value + */ + cell_value?: { + [key: string]: unknown; + }; + /** + * Cell diff value + */ + cell_diff_value?: { + [key: string]: unknown; + }; + /** + * Status + */ + status?: string; + /** + * Value infos + */ + value_infos?: { + [key: string]: unknown; + }; +}; + +export type ExperimentRowDiffResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: { + [key: string]: { + [key: string]: ExperimentRowDiffCell; + }; + }; +}; + +export type EvalFunctionListResult = { + functions: Array<{ + [key: string]: unknown; + }>; +}; + +export type EvalFunctionListResponse = { + /** + * Status + */ + status: boolean; + result: EvalFunctionListResult; +}; + +export type PreviewRunPrompt = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Name + */ + name: string; + config?: PromptConfig; + /** + * First n rows + */ + first_n_rows?: number; + /** + * List of row indices to preview. Must contain at least one integer. + */ + row_indices?: Array; +}; + +export type RunPromptColumnPreviewResult = { + responses: Array<{ + [key: string]: unknown; + }>; + /** + * Token usage + */ + token_usage: { + [key: string]: unknown; + }; + /** + * Cost + */ + cost: { + [key: string]: unknown; + }; +}; + +export type RunPromptColumnPreviewResponse = { + /** + * Status + */ + status: boolean; + result: RunPromptColumnPreviewResult; +}; + +export type ProviderStatusItem = { + /** + * Provider + */ + provider: string; + /** + * Display name + */ + display_name: string; + /** + * Has key + */ + has_key: boolean; + /** + * Masked key + */ + masked_key?: string | null; + /** + * Logo url + */ + logo_url?: string | null; + /** + * Type + */ + type: string; + /** + * Id + */ + id?: string | null; +}; + +export type ProviderStatusResult = { + providers: Array; +}; + +export type ProviderStatusResponse = { + /** + * Status + */ + status: boolean; + result: ProviderStatusResult; +}; + +export type RunPromptColumnConfigResult = { + /** + * Config + */ + config: { + [key: string]: unknown; + }; +}; + +export type RunPromptColumnConfigResponse = { + /** + * Status + */ + status: boolean; + result: RunPromptColumnConfigResult; +}; + +export type RunPromptToolOption = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Yaml config + */ + yaml_config?: string | null; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Config type + */ + config_type?: string | null; + /** + * Description + */ + description?: string | null; +}; + +export type RunPromptChoiceOption = { + /** + * Value + */ + value: { + [key: string]: unknown; + }; + /** + * Label + */ + label: string; +}; + +export type RunPromptOptionsResult = { + models: Array<{ + [key: string]: unknown; + }>; + /** + * Tool config + */ + tool_config: { + [key: string]: unknown; + }; + available_tools: Array; + output_formats: Array; + tool_choices: Array; +}; + +export type RunPromptOptionsResponse = { + /** + * Status + */ + status: boolean; + result: RunPromptOptionsResult; +}; + +export type DatasetAddColumnsRequest = { + new_columns_data: Array<{ + [key: string]: unknown; + }>; +}; + +export type Column = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Data type + */ + data_type: 'text' | 'boolean' | 'integer' | 'float' | 'json' | 'array' | 'image' | 'images' | 'datetime' | 'audio' | 'document' | 'others' | 'persona'; + /** + * Dataset + */ + dataset?: string | null; + /** + * Source + */ + source: 'evaluation' | 'evaluation_tags' | 'evaluation_reason' | 'run_prompt' | 'experiment' | 'optimisation' | 'experiment_evaluation' | 'experiment_evaluation_tags' | 'optimisation_evaluation' | 'annotation_label' | 'optimisation_evaluation_tags' | 'extracted_json' | 'classification' | 'extracted_entities' | 'api_call' | 'python_code' | 'vector_db' | 'conditional' | 'eval_playground' | 'OTHERS'; + /** + * Source id + */ + source_id?: string | null; +}; + +export type DatasetColumnsMutationResult = { + /** + * Message + */ + message: string; + data?: Array; +}; + +export type DatasetColumnsMutationResponse = { + /** + * Status + */ + status: boolean; + result: DatasetColumnsMutationResult; +}; + +export type DatasetAddEmptyColumnsRequest = { + /** + * Num cols + */ + num_cols?: number; +}; + +export type DatasetAddEmptyRowsRequest = { + /** + * Num rows + */ + num_rows?: number; +}; + +export type DatasetMultipleStaticColumnsRequest = { + columns: Array<{ + [key: string]: unknown; + }>; +}; + +export type DatasetAddRowsRequest = { + rows: Array<{ + [key: string]: unknown; + }>; +}; + +export type DatasetAddRowsFromExistingRequest = { + /** + * Source dataset id + */ + source_dataset_id: string; + /** + * Column mapping + */ + column_mapping: { + [key: string]: string; + }; +}; + +export type DatasetRowsImportedResult = { + /** + * Message + */ + message: string; + /** + * Rows added + */ + rows_added: number; +}; + +export type DatasetRowsImportedResponse = { + /** + * Status + */ + status: boolean; + result: DatasetRowsImportedResult; +}; + +export type HuggingFaceAddRowsRequest = { + /** + * Num rows + */ + num_rows?: number; + /** + * Huggingface dataset name + */ + huggingface_dataset_name: string; + /** + * Huggingface dataset config + */ + huggingface_dataset_config: string; + /** + * Huggingface dataset split + */ + huggingface_dataset_split: string; +}; + +export type DatasetRowsImportMessageResult = { + /** + * Message + */ + message: string; +}; + +export type DatasetRowsImportMessageResponse = { + /** + * Status + */ + status: boolean; + result: DatasetRowsImportMessageResult; +}; + +export type DatasetStaticColumnRequest = { + /** + * New column name + */ + new_column_name: string; + /** + * Column type + */ + column_type: string; + /** + * Source + */ + source?: string; +}; + +export type SyntheticData = { + /** + * Num rows + */ + num_rows: number; + columns: Array; + /** + * Dataset + */ + dataset: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string; + /** + * Fill existing rows + */ + fill_existing_rows?: boolean; +}; + +export type UserEvalMutationRequest = { + /** + * Name + */ + name: string; + /** + * Template id + */ + template_id: string; + /** + * Config + */ + config: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Model + */ + model?: string; + /** + * Eval type + */ + eval_type?: string; + /** + * Run + */ + run?: boolean; + /** + * Save as template + */ + save_as_template?: boolean; + /** + * Experiment id + */ + experiment_id?: string; + /** + * Composite weight overrides + */ + composite_weight_overrides?: { + [key: string]: unknown; + }; +}; + +export type UserEvalUpdateRequest = { + /** + * Name + */ + name?: string; + /** + * Template id + */ + template_id?: string; + /** + * Config + */ + config: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Model + */ + model?: string; + /** + * Eval type + */ + eval_type?: string; + /** + * Run + */ + run?: boolean; + /** + * Save as template + */ + save_as_template?: boolean; + /** + * Experiment id + */ + experiment_id?: string; + /** + * Composite weight overrides + */ + composite_weight_overrides?: { + [key: string]: unknown; + }; +}; + +export type DatasetBehaviorRequest = { + /** + * Dataset name + */ + dataset_name?: string; + column_order?: Array; + /** + * Column config + */ + column_config?: { + [key: string]: unknown; + }; + /** + * Dataset config + */ + dataset_config?: { + [key: string]: unknown; + }; +}; + +export type ExtractJsonColumnRequest = { + /** + * Column id + */ + column_id: string; + /** + * Json key + */ + json_key: string; + /** + * New column name + */ + new_column_name?: string; + /** + * Concurrency + */ + concurrency?: number; +}; + +export type DatasetTableMetadata = { + /** + * Dataset name + */ + dataset_name: string; + /** + * Total rows + */ + total_rows?: number; + /** + * Total pages + */ + total_pages?: number; + error_messages?: Array; + /** + * Status + */ + status?: string | null; +}; + +export type DatasetTableResult = { + metadata?: DatasetTableMetadata; + column_config: Array<{ + [key: string]: unknown; + }>; + table?: Array<{ + [key: string]: unknown; + }>; + /** + * Dataset config + */ + dataset_config?: { + [key: string]: unknown; + }; + /** + * Synthetic dataset + */ + synthetic_dataset?: boolean; + /** + * Synthetic dataset percentage + */ + synthetic_dataset_percentage?: number | null; + /** + * Synthetic regenerate + */ + synthetic_regenerate?: boolean; + /** + * Is processing data + */ + is_processing_data?: boolean; +}; + +export type DatasetTableResponse = { + /** + * Status + */ + status: boolean; + result: DatasetTableResult; +}; + +export type DatasetRowDataRequest = { + filters?: Array<{ + /** + * Column or attribute id to filter on. + */ + column_id: string; + /** + * Optional UI label for chips and saved views. + */ + display_name?: string; + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + */ + source?: string; + /** + * Optional metric output type metadata used by eval and annotation filters. + */ + output_type?: string; + filter_config: { + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + */ + filter_type: string; + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + */ + filter_op: string; + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + */ + filter_value?: unknown; + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + */ + col_type?: string; + }; + }>; + sort?: Array<{ + column_id: string; + type?: 'ascending' | 'descending'; + }>; + /** + * Row id + */ + row_id: string; +}; + +export type DatasetRowNavigation = { + row_id?: Array; +}; + +export type DatasetRowDataResult = { + next: DatasetRowNavigation; + /** + * Current + */ + current: { + [key: string]: unknown; + }; +}; + +export type DatasetRowDataResponse = { + /** + * Status + */ + status: boolean; + result: DatasetRowDataResult; +}; + +export type EvalStructure = { + /** + * Id + */ + id: string; + /** + * Template id + */ + template_id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string; + eval_tags?: Array; + /** + * Template name + */ + template_name?: string; + required_keys?: Array; + optional_keys?: Array; + variable_keys?: Array; + /** + * Run prompt column + */ + run_prompt_column?: boolean; + /** + * Mapping + */ + mapping?: { + [key: string]: unknown; + }; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Params + */ + params?: { + [key: string]: unknown; + }; + /** + * Function params schema + */ + function_params_schema?: { + [key: string]: unknown; + }; + /** + * Eval type id + */ + eval_type_id?: string; + /** + * Eval type + */ + eval_type?: string; + /** + * Reason column + */ + reason_column?: boolean; + /** + * Models + */ + models?: { + [key: string]: unknown; + }; + /** + * Selected model + */ + selected_model?: string; + /** + * Output + */ + output?: { + [key: string]: unknown; + }; + /** + * Config params desc + */ + config_params_desc?: { + [key: string]: unknown; + }; + /** + * Config params option + */ + config_params_option?: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string | null; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Choices + */ + choices?: { + [key: string]: unknown; + }; + /** + * Api key available + */ + api_key_available?: boolean; + /** + * Run config + */ + run_config?: { + [key: string]: unknown; + }; +}; + +export type EvalStructureResult = { + eval: EvalStructure; +}; + +export type EvalStructureResponse = { + /** + * Status + */ + status: boolean; + result: EvalStructureResult; +}; + +export type EvalListResult = { + evals: Array<{ + [key: string]: unknown; + }>; + eval_recommendations?: Array; +}; + +export type EvalListResponse = { + /** + * Status + */ + status: boolean; + result: EvalListResult; +}; + +export type PreviewRunEvalRequest = { + /** + * Config + */ + config: { + [key: string]: unknown; + }; + /** + * Template id + */ + template_id: string; + /** + * Model + */ + model?: string; + /** + * Sdk uuid + */ + sdk_uuid?: string; + /** + * Source + */ + source?: string; + /** + * Protect flash + */ + protect_flash?: boolean; +}; + +export type StartEvalsProcessRequest = { + user_eval_ids: Array; + /** + * Experiment id + */ + experiment_id?: string; + /** + * Failed only + */ + failed_only?: boolean; +}; + +export type StopUserEvalRequest = { + /** + * Experiment id + */ + experiment_id?: string; +}; + +export type SyntheticDatasetConfigPayload = { + /** + * Num rows + */ + num_rows?: number; + columns?: Array<{ + [key: string]: unknown; + }>; + /** + * Dataset + */ + dataset?: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string | null; +}; + +export type SyntheticDatasetConfigResult = { + /** + * Message + */ + message: string; + data: SyntheticDatasetConfigPayload; +}; + +export type SyntheticDatasetConfigResponse = { + /** + * Status + */ + status: boolean; + result: SyntheticDatasetConfigResult; +}; + +export type SyntheticDatasetConfig = { + /** + * Num rows + */ + num_rows: number; + columns: Array; + /** + * Dataset + */ + dataset: { + [key: string]: unknown; + }; + /** + * Kb id + */ + kb_id?: string | null; + /** + * Regenerate + */ + regenerate?: boolean; +}; + +export type SyntheticDatasetUpdateData = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Dataset name + */ + dataset_name: string; + /** + * Num rows + */ + num_rows?: number; + /** + * Num columns + */ + num_columns?: number; +}; + +export type SyntheticDatasetUpdateResult = { + /** + * Message + */ + message: string; + data: SyntheticDatasetUpdateData; +}; + +export type SyntheticDatasetUpdateResponse = { + /** + * Status + */ + status: boolean; + result: SyntheticDatasetUpdateResult; +}; + +export type DatasetUpdateCellValueRequest = { + /** + * Row id + */ + row_id: string; + /** + * Column id + */ + column_id: string; + /** + * New value + * + * New cell value. Accepts JSON primitives or multipart file uploads. + */ + new_value?: string | null; +}; + +export type DatasetUpdateColumnNameRequest = { + /** + * New column name + */ + new_column_name: string; +}; + +export type DatasetUpdateColumnTypeRequest = { + /** + * New column type + */ + new_column_type: string; + /** + * Preview + */ + preview?: boolean; + /** + * Force update + */ + force_update?: boolean; +}; + +export type ColumnTypeConversionResult = { + /** + * Message + */ + message?: string; + /** + * Column id + */ + column_id?: string; + /** + * New data type + */ + new_data_type?: string; + /** + * Status + */ + status?: string; + /** + * Invalid count + */ + invalid_count?: number; + invalid_values?: Array<{ + [key: string]: unknown; + }>; + /** + * Valid conversion samples + */ + valid_conversion_samples?: { + [key: string]: unknown; + }; +}; + +export type ColumnTypeConversionResponse = { + /** + * Status + */ + status: boolean; + result: ColumnTypeConversionResult; +}; + +export type CreateDatasetFromExperimentRequest = { + /** + * Name + */ + name?: string; + /** + * Model type + */ + model_type?: string; +}; + +export type EvalTemplateBulkDeleteRequest = { + template_ids: Array; +}; + +export type EvalTemplateBulkDeleteResponseResult = { + /** + * Deleted count + */ + deleted_count: number; +}; + +export type EvalTemplateBulkDeleteResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateBulkDeleteResponseResult; +}; + +export type CompositeEvalAdhocExecuteRequest = { + /** + * Mapping + */ + mapping: { + [key: string]: unknown; + }; + /** + * Model + */ + model?: string | null; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Input data types + */ + input_data_types?: { + [key: string]: unknown; + }; + /** + * Span context + */ + span_context?: { + [key: string]: unknown; + }; + /** + * Trace context + */ + trace_context?: { + [key: string]: unknown; + }; + /** + * Session context + */ + session_context?: { + [key: string]: unknown; + }; + /** + * Call context + */ + call_context?: { + [key: string]: unknown; + }; + /** + * Row context + */ + row_context?: { + [key: string]: unknown; + }; + child_template_ids: Array; + /** + * Aggregation enabled + */ + aggregation_enabled?: boolean; + /** + * Aggregation function + */ + aggregation_function?: 'weighted_avg' | 'avg' | 'min' | 'max' | 'pass_rate'; + /** + * Composite child axis + */ + composite_child_axis?: '' | 'pass_fail' | 'percentage' | 'choices' | 'code'; + /** + * Child weights + */ + child_weights?: { + [key: string]: unknown; + }; + /** + * Pass threshold + */ + pass_threshold?: number; +}; + +export type CompositeChildResult = { + /** + * Child id + */ + child_id: string; + /** + * Child name + */ + child_name: string; + /** + * Order + */ + order: number; + /** + * Score + */ + score?: number | null; + /** + * Output + */ + output?: { + [key: string]: unknown; + }; + /** + * Reason + */ + reason?: string | null; + /** + * Output type + */ + output_type?: string | null; + /** + * Status + */ + status: string; + /** + * Error + */ + error?: string | null; + /** + * Log id + */ + log_id?: string | null; + /** + * Weight + */ + weight?: number; + /** + * Error localizer result + */ + error_localizer_result?: { + [key: string]: unknown; + }; +}; + +export type CompositeEvalExecuteResponseResult = { + /** + * Composite id + */ + composite_id?: string | null; + /** + * Composite name + */ + composite_name: string; + /** + * Aggregation enabled + */ + aggregation_enabled: boolean; + /** + * Aggregation function + */ + aggregation_function?: string | null; + /** + * Aggregate score + */ + aggregate_score?: number | null; + /** + * Aggregate pass + */ + aggregate_pass?: boolean | null; + children: Array; + /** + * Summary + */ + summary?: string | null; + /** + * Error localizer results + */ + error_localizer_results?: { + [key: string]: unknown; + }; + /** + * Total children + */ + total_children: number; + /** + * Completed children + */ + completed_children: number; + /** + * Failed children + */ + failed_children: number; + /** + * Evaluation id + */ + evaluation_id?: string | null; +}; + +export type CompositeEvalExecuteResponse = { + /** + * Status + */ + status: boolean; + result: CompositeEvalExecuteResponseResult; +}; + +export type CompositeEvalCreateRequest = { + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + tags?: Array; + child_template_ids: Array; + /** + * Aggregation enabled + */ + aggregation_enabled?: boolean; + /** + * Aggregation function + */ + aggregation_function?: 'weighted_avg' | 'avg' | 'min' | 'max' | 'pass_rate'; + /** + * Child weights + */ + child_weights?: { + [key: string]: unknown; + }; + /** + * Composite child axis + */ + composite_child_axis?: '' | 'pass_fail' | 'percentage' | 'choices' | 'code'; +}; + +export type CompositeChildItem = { + /** + * Child id + */ + child_id: string; + /** + * Child name + */ + child_name: string; + /** + * Order + */ + order: number; + /** + * Eval type + */ + eval_type?: string; + /** + * Pinned version id + */ + pinned_version_id?: string | null; + /** + * Pinned version number + */ + pinned_version_number?: number | null; + /** + * Weight + */ + weight?: number; + required_keys?: Array; +}; + +export type CompositeEvalCreateResponseResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Template type + */ + template_type?: string; + /** + * Aggregation enabled + */ + aggregation_enabled: boolean; + /** + * Aggregation function + */ + aggregation_function: string; + /** + * Composite child axis + */ + composite_child_axis?: string; + children: Array; +}; + +export type CompositeEvalCreateResponse = { + /** + * Status + */ + status: boolean; + result: CompositeEvalCreateResponseResult; +}; + +export type EvalTemplateCreateV2Request = { + /** + * Name + */ + name?: string; + /** + * Is draft + */ + is_draft?: boolean; + /** + * Eval type + */ + eval_type?: 'llm' | 'code' | 'agent'; + /** + * Instructions + */ + instructions?: string; + /** + * Model + */ + model?: string; + /** + * Output type + */ + output_type?: 'pass_fail' | 'percentage' | 'deterministic'; + /** + * Pass threshold + */ + pass_threshold?: number; + /** + * Choice scores + */ + choice_scores?: { + [key: string]: unknown; + }; + /** + * Description + */ + description?: string | null; + tags?: Array; + /** + * Check internet + */ + check_internet?: boolean; + /** + * Code + */ + code?: string | null; + /** + * Code language + */ + code_language?: 'python' | 'javascript'; + messages?: Array<{ + [key: string]: unknown; + }> | null; + few_shot_examples?: Array<{ + [key: string]: unknown; + }> | null; + /** + * Mode + */ + mode?: 'auto' | 'agent' | 'quick'; + /** + * Tools + */ + tools?: { + [key: string]: unknown; + }; + knowledge_bases?: Array | null; + /** + * Data injection + */ + data_injection?: { + [key: string]: unknown; + }; + /** + * Summary + */ + summary?: { + [key: string]: unknown; + }; + /** + * Error localizer enabled + */ + error_localizer_enabled?: boolean; + /** + * Template format + */ + template_format?: 'mustache' | 'jinja'; +}; + +export type EvalTemplateCreateResponseResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Version + */ + version: string; +}; + +export type EvalTemplateCreateResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateCreateResponseResult; +}; + +export type EvalTemplateListChartsRequest = { + template_ids: Array; +}; + +export type EvalTemplateChartPoint = { + /** + * Timestamp + */ + timestamp: string; + /** + * Value + */ + value: number; +}; + +export type EvalTemplateListChartsItem = { + chart: Array; + error_rate: Array; + /** + * Run count + */ + run_count: number; +}; + +export type EvalTemplateListChartsResponseResult = { + /** + * Charts + */ + charts: { + [key: string]: EvalTemplateListChartsItem; + }; +}; + +export type EvalTemplateListChartsResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateListChartsResponseResult; +}; + +export type EvalListFilters = { + eval_type?: Array<'llm' | 'code' | 'agent'>; + output_type?: Array<'pass_fail' | 'percentage' | 'deterministic'>; + template_type?: Array<'single' | 'composite'>; + tags?: Array; + created_by?: Array; + names?: Array; +}; + +export type EvalListRequest = { + /** + * Page + */ + page?: number; + /** + * Page size + */ + page_size?: number; + /** + * Search + */ + search?: string | null; + /** + * Owner filter + */ + owner_filter?: 'all' | 'user' | 'system'; + filters?: EvalListFilters; + /** + * Sort by + */ + sort_by?: 'name' | 'updated_at' | 'created_at'; + /** + * Sort order + */ + sort_order?: 'asc' | 'desc'; +}; + +export type EvalTemplateListItem = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Template type + */ + template_type: string; + /** + * Eval type + */ + eval_type: string; + /** + * Output type + */ + output_type: string; + /** + * Owner + */ + owner: string; + /** + * Created by name + */ + created_by_name: string; + /** + * Version count + */ + version_count: number; + /** + * Current version + */ + current_version: string; + /** + * Last updated + */ + last_updated: string; + thirty_day_chart: Array; + thirty_day_error_rate: Array; + /** + * Thirty day run count + */ + thirty_day_run_count: number; + tags: Array; +}; + +export type EvalTemplateListResponseResult = { + items: Array; + /** + * Total + */ + total: number; + /** + * Page + */ + page: number; + /** + * Page size + */ + page_size: number; +}; + +export type EvalTemplateListResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateListResponseResult; +}; + +export type CompositeEvalDetailResponseResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Template type + */ + template_type?: string; + /** + * Aggregation enabled + */ + aggregation_enabled: boolean; + /** + * Aggregation function + */ + aggregation_function: string; + /** + * Composite child axis + */ + composite_child_axis?: string; + children: Array; + /** + * Description + */ + description?: string | null; + tags?: Array; + /** + * Created at + */ + created_at?: string; + /** + * Updated at + */ + updated_at?: string; + /** + * Version number + */ + version_number?: number | null; +}; + +export type CompositeEvalDetailResponse = { + /** + * Status + */ + status: boolean; + result: CompositeEvalDetailResponseResult; +}; + +export type CompositeEvalUpdateRequest = { + /** + * Name + */ + name?: string | null; + /** + * Description + */ + description?: string | null; + tags?: Array | null; + /** + * Aggregation enabled + */ + aggregation_enabled?: boolean | null; + /** + * Aggregation function + */ + aggregation_function?: 'weighted_avg' | 'avg' | 'min' | 'max' | 'pass_rate'; + child_template_ids?: Array | null; + /** + * Child weights + */ + child_weights?: { + [key: string]: unknown; + }; + /** + * Composite child axis + */ + composite_child_axis?: '' | 'pass_fail' | 'percentage' | 'choices' | 'code'; +}; + +export type CompositeEvalExecuteRequest = { + /** + * Mapping + */ + mapping: { + [key: string]: unknown; + }; + /** + * Model + */ + model?: string | null; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Input data types + */ + input_data_types?: { + [key: string]: unknown; + }; + /** + * Span context + */ + span_context?: { + [key: string]: unknown; + }; + /** + * Trace context + */ + trace_context?: { + [key: string]: unknown; + }; + /** + * Session context + */ + session_context?: { + [key: string]: unknown; + }; + /** + * Call context + */ + call_context?: { + [key: string]: unknown; + }; + /** + * Row context + */ + row_context?: { + [key: string]: unknown; + }; +}; + +export type EvalTemplateDetailResponseResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Template type + */ + template_type: string; + /** + * Eval type + */ + eval_type: string; + /** + * Instructions + */ + instructions?: string | null; + /** + * Model + */ + model?: string | null; + /** + * Output type + */ + output_type: string; + /** + * Pass threshold + */ + pass_threshold: number; + /** + * Choice scores + */ + choice_scores?: { + [key: string]: unknown; + }; + /** + * Choices + */ + choices?: { + [key: string]: unknown; + }; + /** + * Multi choice + */ + multi_choice: boolean; + /** + * Code + */ + code?: string | null; + /** + * Code language + */ + code_language?: string | null; + required_keys: Array; + /** + * Owner + */ + owner: string; + /** + * Created by name + */ + created_by_name: string; + /** + * Version count + */ + version_count: number; + /** + * Current version + */ + current_version: string; + tags: Array; + /** + * Check internet + */ + check_internet: boolean; + /** + * Error localizer enabled + */ + error_localizer_enabled: boolean; + /** + * Template format + */ + template_format: string; + /** + * Aggregation enabled + */ + aggregation_enabled: boolean; + /** + * Aggregation function + */ + aggregation_function: string; + /** + * Composite child axis + */ + composite_child_axis?: string; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Created at + */ + created_at: string; + /** + * Updated at + */ + updated_at: string; +}; + +export type EvalTemplateDetailResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateDetailResponseResult; +}; + +export type EvalFeedbackListItem = { + /** + * Id + */ + id: string; + /** + * Value + */ + value: string; + /** + * Explanation + */ + explanation: string; + /** + * Source + */ + source: string; + /** + * Source id + */ + source_id: string; + /** + * Action type + */ + action_type: string; + /** + * User name + */ + user_name: string; + /** + * Created at + */ + created_at: string; +}; + +export type EvalFeedbackListResponseResult = { + /** + * Template id + */ + template_id: string; + items: Array; + /** + * Total + */ + total: number; + /** + * Page + */ + page: number; + /** + * Page size + */ + page_size: number; +}; + +export type EvalFeedbackListResponse = { + /** + * Status + */ + status: boolean; + result: EvalFeedbackListResponseResult; +}; + +export type GroundTruthConfig = { + /** + * Enabled + */ + enabled?: boolean; + /** + * Ground truth id + */ + ground_truth_id?: string | null; + /** + * Mode + */ + mode?: string; + /** + * Max examples + */ + max_examples?: number; + /** + * Similarity threshold + */ + similarity_threshold?: number; + /** + * Injection format + */ + injection_format?: string; +}; + +export type GroundTruthConfigResponseResult = { + ground_truth: GroundTruthConfig; +}; + +export type GroundTruthConfigResponse = { + /** + * Status + */ + status: boolean; + result: GroundTruthConfigResponseResult; +}; + +export type GroundTruthConfigRequest = { + /** + * Enabled + */ + enabled?: boolean; + /** + * Ground truth id + */ + ground_truth_id?: string | null; + /** + * Mode + */ + mode?: 'auto' | 'manual' | 'disabled'; + /** + * Max examples + */ + max_examples?: number; + /** + * Similarity threshold + */ + similarity_threshold?: number; + /** + * Injection format + */ + injection_format?: 'structured' | 'conversational' | 'xml'; +}; + +export type GroundTruthItem = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string; + /** + * File name + */ + file_name?: string; + columns: Array; + /** + * Row count + */ + row_count: number; + /** + * Variable mapping + */ + variable_mapping?: { + [key: string]: unknown; + }; + /** + * Role mapping + */ + role_mapping?: { + [key: string]: unknown; + }; + /** + * Embedding status + */ + embedding_status?: string; + /** + * Embedded row count + */ + embedded_row_count?: number; + /** + * Storage type + */ + storage_type?: string; + /** + * Created at + */ + created_at?: string; +}; + +export type GroundTruthListResponseResult = { + /** + * Template id + */ + template_id: string; + items: Array; + /** + * Total + */ + total: number; +}; + +export type GroundTruthListResponse = { + /** + * Status + */ + status: boolean; + result: GroundTruthListResponseResult; +}; + +export type GroundTruthUploadRequest = { + /** + * File + */ + readonly file?: string; + /** + * Name + */ + name?: string; + /** + * Description + */ + description?: string; + /** + * File name + */ + file_name?: string; + columns?: Array; + data?: Array<{ + [key: string]: unknown; + }>; + /** + * Variable mapping + */ + variable_mapping?: { + [key: string]: unknown; + }; + /** + * Role mapping + */ + role_mapping?: { + [key: string]: unknown; + }; +}; + +export type GroundTruthUploadResponseResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Row count + */ + row_count: number; + columns: Array; + /** + * Embedding status + */ + embedding_status: string; +}; + +export type GroundTruthUploadResponse = { + /** + * Status + */ + status: boolean; + result: GroundTruthUploadResponseResult; +}; + +export type EvalTemplateUpdateV2Request = { + /** + * Name + */ + name?: string | null; + /** + * Eval type + */ + eval_type?: 'llm' | 'code' | 'agent'; + /** + * Instructions + */ + instructions?: string | null; + /** + * Model + */ + model?: string | null; + /** + * Output type + */ + output_type?: 'pass_fail' | 'percentage' | 'deterministic'; + /** + * Pass threshold + */ + pass_threshold?: number | null; + /** + * Choice scores + */ + choice_scores?: { + [key: string]: unknown; + }; + /** + * Multi choice + */ + multi_choice?: boolean | null; + /** + * Description + */ + description?: string | null; + tags?: Array | null; + /** + * Check internet + */ + check_internet?: boolean | null; + /** + * Code + */ + code?: string | null; + /** + * Code language + */ + code_language?: 'python' | 'javascript'; + messages?: Array<{ + [key: string]: unknown; + }> | null; + few_shot_examples?: Array<{ + [key: string]: unknown; + }> | null; + /** + * Mode + */ + mode?: 'auto' | 'agent' | 'quick'; + /** + * Tools + */ + tools?: { + [key: string]: unknown; + }; + knowledge_bases?: Array | null; + /** + * Data injection + */ + data_injection?: { + [key: string]: unknown; + }; + /** + * Summary + */ + summary?: { + [key: string]: unknown; + }; + /** + * Error localizer enabled + */ + error_localizer_enabled?: boolean | null; + /** + * Publish + */ + publish?: boolean | null; + /** + * Template format + */ + template_format?: 'mustache' | 'jinja'; +}; + +export type EvalTemplateUpdateResponseResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Updated + */ + updated: boolean; +}; + +export type EvalTemplateUpdateResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateUpdateResponseResult; +}; + +export type EvalUsageStats = { + /** + * Total runs + */ + total_runs: number; + /** + * Runs period + */ + runs_period: number; + /** + * Success count + */ + success_count: number; + /** + * Error count + */ + error_count: number; + /** + * Pass rate + */ + pass_rate: number; +}; + +export type EvalUsageChartPoint = { + /** + * Timestamp + */ + timestamp: string; + /** + * Calls + */ + calls?: number; + /** + * Avg latency ms + */ + avg_latency_ms?: number; + /** + * Avg score + */ + avg_score?: number | null; + /** + * Pass count + */ + pass_count?: number; + /** + * Fail count + */ + fail_count?: number; +}; + +export type EvalUsageFeedback = { + /** + * Id + */ + id: string; + /** + * Value + */ + value?: { + [key: string]: unknown; + }; + /** + * Explanation + */ + explanation?: string; + /** + * Action type + */ + action_type?: string; + /** + * Created at + */ + created_at?: string; + /** + * User + */ + user?: string; +}; + +export type EvalUsageLogItem = { + /** + * Id + */ + id: string; + /** + * Input + */ + input: string; + /** + * Result + */ + result?: string; + /** + * Score + */ + score?: number | null; + /** + * Reason + */ + reason?: string; + /** + * Status + */ + status: string; + /** + * Source + */ + source?: string; + /** + * Created at + */ + created_at: string; + /** + * Detail + */ + detail: { + [key: string]: unknown; + }; + feedback?: EvalUsageFeedback; + /** + * Composite + */ + composite?: boolean; + /** + * Aggregate pass + */ + aggregate_pass?: boolean | null; +}; + +export type EvalUsageLogs = { + items: Array; + /** + * Total + */ + total: number; + /** + * Page + */ + page: number; + /** + * Page size + */ + page_size: number; +}; + +export type EvalUsageStatsResponseResult = { + /** + * Template id + */ + template_id: string; + /** + * Is composite + */ + is_composite: boolean; + stats: EvalUsageStats; + chart: Array; + logs: EvalUsageLogs; +}; + +export type EvalUsageStatsResponse = { + /** + * Status + */ + status: boolean; + result: EvalUsageStatsResponseResult; +}; + +export type EvalTemplateVersionItem = { + /** + * Id + */ + id: string; + /** + * Version number + */ + version_number: number; + /** + * Is default + */ + is_default: boolean; + /** + * Criteria + */ + criteria?: string; + /** + * Model + */ + model?: string; + /** + * Config snapshot + */ + config_snapshot?: { + [key: string]: unknown; + }; + /** + * Created by name + */ + created_by_name?: string; + /** + * Created at + */ + created_at?: string; +}; + +export type EvalTemplateVersionListResponseResult = { + /** + * Template id + */ + template_id: string; + versions: Array; + /** + * Total + */ + total: number; +}; + +export type EvalTemplateVersionListResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateVersionListResponseResult; +}; + +export type EvalTemplateVersionCreateRequest = { + /** + * Criteria + */ + criteria?: string | null; + /** + * Model + */ + model?: string | null; + /** + * Config snapshot + */ + config_snapshot?: { + [key: string]: unknown; + }; +}; + +export type EvalTemplateVersionResponseResult = { + /** + * Id + */ + id: string; + /** + * Version number + */ + version_number: number; + /** + * Is default + */ + is_default: boolean; +}; + +export type EvalTemplateVersionResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateVersionResponseResult; +}; + +export type EvalTemplateVersionRestoreResponseResult = { + /** + * Id + */ + id: string; + /** + * Version number + */ + version_number: number; + /** + * Is default + */ + is_default: boolean; + /** + * Restored from + */ + restored_from: number; +}; + +export type EvalTemplateVersionRestoreResponse = { + /** + * Status + */ + status: boolean; + result: EvalTemplateVersionRestoreResponseResult; +}; + +export type ExperimentStringResultResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: string; +}; + +export type ExperimentRerunRequest = { + experiment_ids: Array; + /** + * Use temporal + */ + use_temporal?: boolean; + /** + * Max concurrent rows + */ + max_concurrent_rows?: number; +}; + +export type PromptConfigEntry = { + /** + * Id + */ + id?: string | null; + /** + * Name + */ + name?: string; + /** + * Prompt id + */ + prompt_id?: string | null; + /** + * Prompt version + */ + prompt_version?: string | null; + /** + * Agent id + */ + agent_id?: string | null; + /** + * Agent version + */ + agent_version?: string | null; + /** + * Model + */ + model?: { + [key: string]: unknown; + }; + /** + * Model params + */ + model_params?: { + [key: string]: string | null; + }; + /** + * Configuration + */ + configuration?: { + [key: string]: string | null; + }; + /** + * Output format + */ + output_format?: string; + messages?: Array<{ + [key: string]: string | null; + }>; + /** + * Voice input column id + */ + voice_input_column_id?: string | null; +}; + +export type EvalMetricEntry = { + /** + * Id + */ + id?: string | null; + /** + * Template id + */ + template_id: string; + /** + * Name + */ + name: string; + /** + * Config + */ + config: { + [key: string]: unknown; + }; + /** + * Model + */ + model?: string; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Kb id + */ + kb_id?: string | null; + /** + * Composite weight overrides + */ + composite_weight_overrides?: { + [key: string]: unknown; + }; +}; + +export type ExperimentCreateV2 = { + /** + * Name + */ + name: string; + /** + * Dataset id + */ + dataset_id: string; + /** + * Column id + */ + column_id?: string | null; + /** + * Experiment type + */ + experiment_type?: 'llm' | 'tts' | 'stt' | 'image'; + prompt_config: Array; + user_eval_metrics: Array; +}; + +export type ExperimentListV2 = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Status + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; + /** + * Experiment type + * + * Determines how the experiment executes: llm, tts, stt, or image. + */ + experiment_type?: 'llm' | 'tts' | 'stt' | 'image'; + /** + * Eval templates count + */ + readonly eval_templates_count?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Models count + */ + readonly models_count?: string; + /** + * Agents count + */ + readonly agents_count?: string; + /** + * Dataset + */ + dataset: string; +}; + +export type ExperimentNameSuggestionResult = { + /** + * Suggested name + */ + suggested_name: string; +}; + +export type ExperimentNameSuggestionResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentNameSuggestionResult; +}; + +export type ExperimentNameValidationResult = { + /** + * Is valid + */ + is_valid: boolean; + /** + * Message + */ + message?: string; +}; + +export type ExperimentNameValidationResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentNameValidationResult; +}; + +export type ExperimentDetailV2 = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Dataset id + */ + readonly dataset_id?: string; + /** + * Column id + */ + readonly column_id?: string | null; + /** + * Experiment type + * + * Determines how the experiment executes: llm, tts, stt, or image. + */ + experiment_type?: 'llm' | 'tts' | 'stt' | 'image'; + /** + * Status + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; + /** + * Snapshot dataset id + */ + readonly snapshot_dataset_id?: string | null; + /** + * Prompt configs + */ + readonly prompt_configs?: string; + /** + * Agent configs + */ + readonly agent_configs?: string; + /** + * User eval metrics + */ + readonly user_eval_metrics?: string; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type ExperimentV2DetailResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentDetailV2; +}; + +export type ExperimentUpdateV2 = { + /** + * Column id + */ + column_id?: string | null; + prompt_config?: Array; + user_eval_metrics?: Array; +}; + +export type ExperimentComparisonWeightsRequest = { + eval_template_ids?: Array; + /** + * Weights + */ + weights?: { + [key: string]: unknown; + }; +}; + +export type ExperimentComparisonColumnMetric = { + /** + * Column id + */ + column_id: string; + /** + * Column name + */ + column_name: string; + /** + * Avg completion tokens + */ + avg_completion_tokens: number; + /** + * Avg total tokens + */ + avg_total_tokens: number; + /** + * Avg response time + */ + avg_response_time: number; + /** + * Avg score + */ + avg_score?: { + [key: string]: unknown; + }; +}; + +export type ExperimentComparisonDatasetMetric = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Avg completion tokens + */ + avg_completion_tokens?: number | null; + /** + * Avg total tokens + */ + avg_total_tokens?: number | null; + /** + * Avg response time + */ + avg_response_time?: number | null; + /** + * Avg score + */ + avg_score?: number | null; + columns?: Array; + /** + * Normalized scores + */ + normalized_scores?: { + [key: string]: unknown; + }; + /** + * Overall rating + */ + overall_rating?: number | null; + /** + * Rank + */ + rank?: number | null; + /** + * Rank suffix + */ + rank_suffix?: string; + /** + * Total datasets + */ + total_datasets?: number; +}; + +export type ExperimentDatasetComparisonResult = { + /** + * Experiment id + */ + experiment_id: string; + /** + * Experiment name + */ + experiment_name: string; + /** + * Total datasets + */ + total_datasets: number; + /** + * Weights applied + */ + weights_applied?: { + [key: string]: unknown; + }; + dataset_comparisons: Array; +}; + +export type ExperimentDatasetComparisonResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentDatasetComparisonResult; +}; + +export type ExperimentComparisonRawMetrics = { + /** + * Avg completion tokens + */ + avg_completion_tokens?: number | null; + /** + * Avg total tokens + */ + avg_total_tokens?: number | null; + /** + * Avg response time + */ + avg_response_time?: number | null; + /** + * Avg score + */ + avg_score?: number | null; +}; + +export type ExperimentComparisonNormalizedMetrics = { + /** + * Completion tokens + */ + completion_tokens?: number | null; + /** + * Total tokens + */ + total_tokens?: number | null; + /** + * Response time + */ + response_time?: number | null; + /** + * Score + */ + score?: number | null; +}; + +export type ExperimentComparisonMetrics = { + raw: ExperimentComparisonRawMetrics; + normalized: ExperimentComparisonNormalizedMetrics; +}; + +export type ExperimentComparisonWeights = { + /** + * Response time + */ + response_time?: number | null; + /** + * Scores + */ + scores?: { + [key: string]: unknown; + }; + /** + * Total tokens + */ + total_tokens?: number | null; + /** + * Completion tokens + */ + completion_tokens?: number | null; +}; + +export type ExperimentComparisonDetail = { + /** + * Scores weight + */ + scores_weight?: { + [key: string]: unknown; + }; + /** + * Experiment dataset id + */ + experiment_dataset_id?: string | null; + /** + * Rank + */ + rank?: number | null; + /** + * Rank suffix + */ + rank_suffix?: string; + metrics: ExperimentComparisonMetrics; + weights: ExperimentComparisonWeights; + /** + * Overall rating + */ + overall_rating?: number | null; +}; + +export type ExperimentComparisonDetailsResult = { + /** + * Experiment id + */ + experiment_id: string; + /** + * Total comparisons + */ + total_comparisons: number; + comparisons: Array; +}; + +export type ExperimentComparisonDetailsResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentComparisonDetailsResult; +}; + +export type ExperimentDerivedVariablesResult = { + /** + * Version + */ + version?: string; + /** + * Derived variables + */ + derived_variables?: { + [key: string]: Array; + }; +}; + +export type ExperimentDerivedVariablesResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentDerivedVariablesResult; +}; + +export type ExperimentEvaluationTokenUsage = { + /** + * Avg completion tokens + */ + avg_completion_tokens: number; + /** + * Avg prompt tokens + */ + avg_prompt_tokens: number; + /** + * Avg total tokens + */ + avg_total_tokens: number; + /** + * Total tokens + */ + total_tokens: number; +}; + +export type ExperimentEvaluationColumnStats = { + /** + * Column name + */ + column_name: string; + /** + * Column id + */ + column_id: string; + /** + * Total rows + */ + total_rows: number; + /** + * Success rate + */ + success_rate: number; + /** + * Avg response time + */ + avg_response_time: number; + token_usage: ExperimentEvaluationTokenUsage; + /** + * Avg score + */ + avg_score?: { + [key: string]: unknown; + }; +}; + +export type ExperimentEvaluationStatsResult = { + /** + * Experiment id + */ + experiment_id: string; + /** + * Experiment name + */ + experiment_name: string; + /** + * Evaluation id + */ + evaluation_id: string; + /** + * Evaluation name + */ + evaluation_name: string; + /** + * Evaluation template id + */ + evaluation_template_id: string; + /** + * Dataset id + */ + dataset_id: string; + /** + * Dataset name + */ + dataset_name: string; + evaluation_columns: Array; +}; + +export type ExperimentEvaluationStatsResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentEvaluationStatsResult; +}; + +export type Feedback = { + /** + * Id + */ + readonly id?: string; + /** + * Source id + */ + source_id: string; + /** + * Source + */ + source: 'dataset' | 'prompt' | 'sdk' | 'trace' | 'experiment' | 'observe' | 'eval_playground'; + /** + * User eval metric + */ + user_eval_metric?: string | null; + /** + * Value + */ + value: string; + /** + * Explanation + */ + explanation?: string | null; + /** + * Row id + */ + row_id?: string | null; + /** + * Custom eval config id + */ + custom_eval_config_id?: string | null; + /** + * Feedback improvement + */ + feedback_improvement?: string | null; + /** + * Action type + */ + action_type?: string | null; +}; + +export type ExperimentFeedbackCreateResult = { + /** + * Id + */ + id: string; +}; + +export type ExperimentFeedbackCreateResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentFeedbackCreateResult; +}; + +export type ExperimentFeedbackDetailItem = { + /** + * Id + */ + id: string; + /** + * Value + */ + value?: { + [key: string]: unknown; + }; + /** + * Comment + */ + comment?: string | null; + /** + * Created at + */ + created_at: string; + /** + * Action type + */ + action_type?: string | null; +}; + +export type ExperimentFeedbackDetailsResult = { + feedback: Array; + /** + * Total count + */ + total_count: number; +}; + +export type ExperimentFeedbackDetailsResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentFeedbackDetailsResult; +}; + +export type ExperimentFeedbackTemplateResult = { + /** + * Output type + */ + output_type?: string | null; + /** + * Eval description + */ + eval_description?: string | null; + /** + * Eval name + */ + eval_name: string; + /** + * User eval name + */ + user_eval_name: string; + choices?: Array; + /** + * Multi choice + */ + multi_choice?: boolean; +}; + +export type ExperimentFeedbackTemplateResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentFeedbackTemplateResult; +}; + +export type ExperimentFeedbackSubmitRequest = { + /** + * Action type + */ + action_type: 'retune' | 'recalculate_row' | 'recalculate_dataset' | 'retune_recalculate'; + /** + * Feedback id + */ + feedback_id: string; + /** + * User eval metric id + */ + user_eval_metric_id: string; + /** + * Value + */ + value?: { + [key: string]: unknown; + }; + /** + * Explanation + */ + explanation?: string; +}; + +export type ExperimentFeedbackSubmitResult = { + /** + * Message + */ + message: string; + /** + * Action type + */ + action_type: string; + /** + * User eval metric id + */ + user_eval_metric_id: string; + /** + * Workflow id + */ + workflow_id?: string; +}; + +export type ExperimentFeedbackSubmitResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentFeedbackSubmitResult; +}; + +export type ExperimentJsonSchemaResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result: { + [key: string]: JsonColumnSchemaEntry; + }; +}; + +export type RerunCellEntry = { + /** + * Column id + */ + column_id: string; + /** + * Row id + */ + row_id: string; +}; + +export type ExperimentRerunCells = { + source_ids?: Array; + cells?: Array; + user_eval_metric_ids?: Array; + /** + * Failed only + */ + failed_only?: boolean; +}; + +export type ExperimentWorkflowResult = { + /** + * Message + */ + message: string; + /** + * Workflow id + */ + workflow_id?: string; +}; + +export type ExperimentWorkflowResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentWorkflowResult; +}; + +export type ExperimentTableRowsColumnConfig = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Origin type + */ + origin_type?: string; + /** + * Data type + */ + data_type?: string; + /** + * Status + */ + status?: string; + /** + * Group + */ + group?: { + [key: string]: unknown; + }; + /** + * Average score + */ + average_score?: { + [key: string]: unknown; + }; + /** + * Dataset id + */ + dataset_id?: string; + /** + * Choices map + */ + choices_map?: { + [key: string]: unknown; + }; + /** + * Is base column + */ + is_base_column?: boolean; + /** + * Output type + */ + output_type?: string | null; + /** + * Eval template id + */ + eval_template_id?: string | null; + /** + * Source id + */ + source_id?: string; + /** + * Is agent + */ + is_agent?: boolean; + /** + * Is final + */ + is_final?: boolean; +}; + +export type ExperimentTableRowsMetadata = { + /** + * Total rows + */ + total_rows?: number; + /** + * Dataset + */ + dataset?: string; + /** + * Dataset name + */ + dataset_name?: string; + /** + * Column + */ + column?: string | null; + /** + * Total pages + */ + total_pages?: number; + /** + * Description + */ + description?: { + [key: string]: string; + }; +}; + +export type ExperimentTableRowsResult = { + column_config: Array; + table?: Array<{ + [key: string]: unknown; + }>; + metadata?: ExperimentTableRowsMetadata; + /** + * Output format + */ + output_format?: string; + /** + * Status + */ + status?: string; + next_row_ids?: Array; +}; + +export type ExperimentTableRowsResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentTableRowsResult; +}; + +export type ExperimentStatsColumnConfig = { + /** + * Status + */ + status?: string; + /** + * Name + */ + name: string; + /** + * Reverse output + */ + reverse_output?: boolean; + /** + * Output type + */ + output_type?: string | null; + /** + * Eval template id + */ + eval_template_id?: string | null; +}; + +export type ExperimentStatsMetadata = { + /** + * Is winner chosen + */ + is_winner_chosen: boolean; +}; + +export type ExperimentStatsResult = { + column_config: Array; + table_data: Array<{ + [key: string]: unknown; + }>; + metadata: ExperimentStatsMetadata; +}; + +export type ExperimentStatsResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentStatsResult; +}; + +export type ExperimentStopWorkflowsCancelled = { + /** + * Main + */ + main: boolean; + /** + * Reruns + */ + reruns: boolean; +}; + +export type ExperimentStopResult = { + /** + * Message + */ + message: string; + /** + * Experiment id + */ + experiment_id: string; + workflows_cancelled: ExperimentStopWorkflowsCancelled; +}; + +export type ExperimentStopResponse = { + /** + * Status + */ + status: boolean; + result: ExperimentStopResult; +}; + +export type LegacyKnowledgeBaseSdkCodeResult = { + /** + * Code + */ + code: string; +}; + +export type LegacyKnowledgeBaseSdkCodeResponse = { + /** + * Status + */ + status: boolean; + result: LegacyKnowledgeBaseSdkCodeResult; +}; + +export type LegacyKnowledgeBaseMutationRequest = { + /** + * Name + */ + name?: string; + /** + * Kb id + */ + kb_id?: string; + files?: Array; +}; + +export type LegacyKnowledgeBaseCreateResult = { + /** + * Detail + */ + detail: string; + /** + * Kb id + */ + kb_id: string; + /** + * Kb name + */ + kb_name: string; + file_ids: Array; +}; + +export type LegacyKnowledgeBaseCreateResponse = { + /** + * Status + */ + status: boolean; + result: LegacyKnowledgeBaseCreateResult; +}; + +export type LegacyKnowledgeBaseMutationResult = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Organization + */ + organization: string; + /** + * Status + */ + status: string; + files: Array; + /** + * Updated at + */ + updated_at: string; + /** + * Created by + */ + created_by: string | null; + /** + * Last error + */ + last_error: string | null; +}; + +export type LegacyKnowledgeBaseMutationResponse = { + /** + * Status + */ + status: boolean; + result: LegacyKnowledgeBaseMutationResult; +}; + +export type LegacyKnowledgeBaseFilesRequest = { + /** + * Kb id + */ + kb_id: string; + /** + * Search + */ + search?: string | null; + sort?: Array<{ + [key: string]: unknown; + }>; + /** + * Page number + */ + page_number?: number; + /** + * Page size + */ + page_size?: number; +}; + +export type LegacyKnowledgeBaseFileRow = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * File size + */ + file_size: number; + /** + * Status + */ + status: string; + /** + * Updated + */ + updated: string; + /** + * Updated by + */ + updated_by: string | null; + /** + * Error + */ + error?: string | null; +}; + +export type LegacyKnowledgeBaseFilesResult = { + table_data: Array; + /** + * Last updated + */ + last_updated: string; + /** + * Status + */ + status: string; + /** + * Status count + */ + status_count: number; + /** + * Total rows + */ + total_rows: number; +}; + +export type LegacyKnowledgeBaseFilesResponse = { + /** + * Status + */ + status: boolean; + result: LegacyKnowledgeBaseFilesResult; +}; + +export type LegacyKnowledgeBaseTableColumn = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; +}; + +export type LegacyKnowledgeBaseTableRow = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Files uploaded + */ + files_uploaded: number; + /** + * Status + */ + status: string; + /** + * Error + */ + error?: string | null; + /** + * Updated at + */ + updated_at: string; + /** + * Created by + */ + created_by: string | null; +}; + +export type LegacyKnowledgeBaseTableResult = { + column_config?: Array; + table_data?: Array; + /** + * Total rows + */ + total_rows?: number; +}; + +export type LegacyKnowledgeBaseTableResponse = { + /** + * Status + */ + status: boolean; + result: LegacyKnowledgeBaseTableResult; +}; + +export type LegacyKnowledgeBaseOption = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; +}; + +export type LegacyKnowledgeBaseListResult = { + table_data: Array; +}; + +export type LegacyKnowledgeBaseListResponse = { + /** + * Status + */ + status: boolean; + result: LegacyKnowledgeBaseListResult; +}; + +export type PromptHistoryExecution = { + /** + * Id + */ + readonly id?: string; + /** + * Template version + */ + template_version: string; + /** + * Output + */ + readonly output?: { + [key: string]: unknown; + }; + /** + * Prompt config snapshot + */ + readonly prompt_config_snapshot?: string; + /** + * Template name + */ + readonly template_name?: string; + /** + * Original template + */ + original_template?: string | null; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Variable names + */ + readonly variable_names?: string; + /** + * Evaluation results + */ + evaluation_results?: { + [key: string]: unknown; + }; + /** + * Evaluation configs + */ + evaluation_configs?: { + [key: string]: unknown; + }; + /** + * Created at + */ + readonly created_at?: string; + /** + * Is default + */ + is_default?: boolean; + /** + * Commit message + */ + commit_message?: string | null; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Is draft + */ + is_draft?: boolean; + /** + * Labels + */ + readonly labels?: string; + /** + * Placeholders + */ + placeholders?: { + [key: string]: unknown; + }; + /** + * Prompt base template + */ + prompt_base_template?: string | null; +}; + +export type PromptLabel = { + /** + * Id + */ + readonly id?: string; + /** + * Organization + */ + readonly organization?: string; + /** + * Name + */ + name: string; + /** + * Type + */ + type: 'system' | 'custom'; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; +}; + +export type ModelHubTextErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type PromptTemplate = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Variable names + */ + variable_names?: { + [key: string]: unknown; + }; + /** + * Organization + */ + organization?: string | null; + /** + * Prompt folder + */ + prompt_folder?: string | null; + /** + * Placeholders + */ + placeholders?: { + [key: string]: unknown; + }; + /** + * Created by + */ + created_by?: string | null; +}; + +export type DerivedVariablePreviewRequest = { + /** + * Content + */ + content: { + [key: string]: unknown; + }; + /** + * Column name + */ + column_name?: string; +}; + +export type DerivedVariableDetailResponse = { + /** + * Status + */ + status: boolean; + result: DerivedVariableDetail; +}; + +export type PromptDerivedVariablesResult = { + /** + * Version + */ + version: string; + /** + * Derived variables + */ + derived_variables: { + [key: string]: Array; + }; +}; + +export type PromptDerivedVariablesResponse = { + /** + * Status + */ + status: boolean; + result: PromptDerivedVariablesResult; +}; + +export type DerivedVariableExtractRequest = { + /** + * Version + */ + version: string; + /** + * Column name + */ + column_name?: string; + /** + * Output index + */ + output_index?: number; + /** + * Response format type + */ + response_format_type?: string; +}; + +export type CreateScore = { + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + /** + * Source id + */ + source_id: string; + /** + * Label id + */ + label_id: string; + /** + * Value + */ + value: { + [key: string]: unknown; + }; + /** + * Notes + */ + notes?: string; + /** + * Score source + */ + score_source?: 'human' | 'api' | 'auto' | 'imported'; + /** + * Queue item id + */ + queue_item_id?: string | null; +}; + +export type ScoreResponse = { + /** + * Status + */ + status?: boolean; + result: Score; +}; + +export type BulkCreateScoreItem = { + /** + * Label id + */ + label_id: string; + /** + * Value + */ + value: { + [key: string]: unknown; + }; + /** + * Notes + */ + notes?: string; + /** + * Score source + */ + score_source?: 'human' | 'api' | 'auto' | 'imported'; +}; + +export type BulkCreateScores = { + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + /** + * Source id + */ + source_id: string; + scores: Array; + /** + * Notes + */ + notes?: string; + /** + * Span notes + */ + span_notes?: string | null; + /** + * Span notes source id + */ + span_notes_source_id?: string | null; + /** + * Queue item id + */ + queue_item_id?: string | null; +}; + +export type BulkCreateScoresResult = { + scores: Array; + errors: Array; +}; + +export type BulkCreateScoresResponse = { + /** + * Status + */ + status?: boolean; + result: BulkCreateScoresResult; +}; + +export type ScoreForSourceResponse = { + /** + * Status + */ + status?: boolean; + result: Array; + span_notes?: Array<{ + [key: string]: unknown; + }>; +}; + +export type ScoreDeleteResponse = { + /** + * Status + */ + status?: boolean; + /** + * Result + */ + result: { + [key: string]: boolean; + }; +}; + +export type ConfigureEvaluations = { + /** + * Eval templates + */ + eval_templates: string; + /** + * Inputs + */ + inputs: { + [key: string]: string | null; + }; + /** + * Model name + */ + model_name?: string | null; + /** + * Config + */ + config?: { + [key: string]: string | null; + }; +}; + +export type SdkConfigureEvaluationsRequest = { + eval_config: ConfigureEvaluations; + /** + * Platform + */ + platform: string; + /** + * Custom eval name + */ + custom_eval_name?: string | null; + [key: string]: { + [key: string]: unknown; + } | ConfigureEvaluations | string | string | null | undefined; +}; + +export type SdkMessageResult = { + /** + * Message + */ + message: string; +}; + +export type SdkConfigureEvaluationsResponse = { + /** + * Status + */ + status: boolean; + result: SdkMessageResult; +}; + +export type SdkErrorResponse = { + /** + * Status + */ + status: boolean; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Errors + */ + errors?: { + [key: string]: Array; + }; +}; + +export type SdkStandaloneEvalInput = { + /** + * Input + */ + input?: string; + /** + * Max tokens + */ + max_tokens?: number; + [key: string]: { + [key: string]: unknown; + } | string | number | undefined; +}; + +export type SdkStandaloneEvalRequest = { + inputs: Array; + /** + * Config + */ + config: { + [key: string]: string | null; + }; + /** + * Protect flash + */ + protect_flash?: boolean; +}; + +export type SdkStandaloneEvalResultItem = { + evaluations: Array<{ + [key: string]: unknown; + }>; +}; + +export type SdkStandaloneEvalResponse = { + /** + * Status + */ + status: boolean; + result: Array; +}; + +export type SdkEvalTemplate = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string | null; + /** + * Organization + */ + organization: string | null; + /** + * Owner + */ + owner: string | null; + /** + * Eval tags + */ + eval_tags?: { + [key: string]: unknown; + }; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Eval id + */ + eval_id: string | null; + /** + * Criteria + */ + criteria?: { + [key: string]: unknown; + }; + /** + * Choices + */ + choices?: { + [key: string]: unknown; + }; + /** + * Multi choice + */ + multi_choice?: boolean | null; +}; + +export type SdkEvalTemplateResponse = { + /** + * Status + */ + status: boolean; + result: SdkEvalTemplate; +}; + +export type SdkcicdEvaluationRunSummary = { + /** + * Id + */ + id: string; + /** + * Project + */ + project: string; + /** + * Version + */ + version: string; + /** + * Results summary + */ + results_summary: { + [key: string]: string | null; + }; +}; + +export type SdkcicdEvaluationRunsResult = { + /** + * Message + */ + message: string; + /** + * Status + */ + status: 'processing' | 'completed'; + evaluation_runs?: Array; +}; + +export type SdkcicdEvaluationRunsResponse = { + /** + * Status + */ + status: boolean; + result: SdkcicdEvaluationRunsResult; +}; + +export type CicdEvaluationItem = { + /** + * Eval template + */ + eval_template: string; + /** + * Inputs + */ + inputs: { + [key: string]: string | null; + }; + /** + * Model name + */ + model_name?: string | null; + /** + * Config + */ + config?: { + [key: string]: string | null; + }; +}; + +export type CicdJob = { + /** + * Project name + */ + project_name: string; + /** + * Version + */ + version: string; + eval_data: Array; +}; + +export type SdkcicdEvaluationRunAccepted = { + /** + * Message + */ + message: string; + /** + * Project name + */ + project_name: string; + /** + * Version + */ + version: string; + /** + * Evaluation run id + */ + evaluation_run_id: string; +}; + +export type SdkcicdEvaluationRunAcceptedResponse = { + /** + * Status + */ + status: boolean; + result: SdkcicdEvaluationRunAccepted; +}; + +export type SdkGetEvalsResponse = { + /** + * Status + */ + status: boolean; + result: Array; +}; + +export type SdkStandaloneEvalV2Result = { + /** + * Eval status + */ + eval_status: string; + /** + * Result + */ + result: { + [key: string]: unknown; + }; +}; + +export type SdkStandaloneEvalV2Response = { + /** + * Status + */ + status: boolean; + result: SdkStandaloneEvalV2Result; +}; + +export type SdkStandaloneEvalV2Request = { + /** + * Eval name + */ + eval_name: string; + /** + * Inputs + */ + inputs: { + [key: string]: string | null; + }; + /** + * Model + */ + model?: string | null; + /** + * Span id + */ + span_id?: string | null; + /** + * Custom eval name + */ + custom_eval_name?: string | null; + /** + * Trace eval + */ + trace_eval?: boolean; + /** + * Is async + */ + is_async?: boolean; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Config + */ + config?: { + [key: string]: string | null; + }; +}; + +export type SdkSimulationAnalyticsResult = { + /** + * Execution id + */ + execution_id?: string; + /** + * Run test name + */ + run_test_name: string; + /** + * Status + */ + status?: string; + /** + * Message + */ + message?: string; + eval_results: Array<{ + [key: string]: unknown; + }>; + /** + * Eval averages + */ + eval_averages: { + [key: string]: unknown; + }; + /** + * System summary + */ + system_summary: { + [key: string]: unknown; + }; + /** + * Eval explanation summary + */ + eval_explanation_summary?: { + [key: string]: unknown; + }; + /** + * Eval explanation summary status + */ + eval_explanation_summary_status?: string | null; +}; + +export type SdkSimulationAnalyticsResponse = { + /** + * Status + */ + status: boolean; + result: SdkSimulationAnalyticsResult; +}; + +export type ExecutionMetrics = { + /** + * Execution id + */ + execution_id: string; + /** + * Status + * + * Current status of the test execution + */ + readonly status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'cancelling' | 'evaluating'; + /** + * Started at + * + * When the test execution started + */ + readonly started_at?: string; + /** + * Completed at + * + * When the test execution completed + */ + readonly completed_at?: string | null; + /** + * Total calls + * + * Total number of calls to be made + */ + readonly total_calls?: number; + /** + * Completed calls + * + * Number of successfully completed calls + */ + readonly completed_calls?: number; + /** + * Failed calls + * + * Number of failed calls + */ + readonly failed_calls?: number; + /** + * Metrics + */ + readonly metrics?: string; +}; + +export type SdkSimulationMetricsResult = { + /** + * Call execution id + */ + call_execution_id?: string; + /** + * Execution id + */ + execution_id?: string; + /** + * Status + */ + status?: string; + /** + * Duration seconds + */ + duration_seconds?: number | null; + /** + * Started at + */ + started_at?: string | null; + /** + * Completed at + */ + completed_at?: string | null; + /** + * Total calls + */ + total_calls?: number; + /** + * Completed calls + */ + completed_calls?: number; + /** + * Failed calls + */ + failed_calls?: number; + /** + * Latency + */ + latency?: { + [key: string]: unknown; + }; + /** + * Cost + */ + cost?: { + [key: string]: unknown; + }; + /** + * Conversation + */ + conversation?: { + [key: string]: unknown; + }; + /** + * Chat metrics + */ + chat_metrics?: { + [key: string]: unknown; + }; + /** + * Metrics + */ + metrics?: { + [key: string]: unknown; + }; + /** + * Total pages + */ + total_pages?: number; + /** + * Current page + */ + current_page?: number; + /** + * Count + */ + count?: number; + results?: Array; +}; + +export type SdkSimulationMetricsResponse = { + /** + * Status + */ + status: boolean; + result: SdkSimulationMetricsResult; +}; + +export type ExecutionRuns = { + /** + * Execution id + */ + execution_id: string; + /** + * Status + * + * Current status of the test execution + */ + readonly status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'cancelling' | 'evaluating'; + /** + * Started at + * + * When the test execution started + */ + readonly started_at?: string; + /** + * Completed at + * + * When the test execution completed + */ + readonly completed_at?: string | null; + /** + * Total calls + * + * Total number of calls to be made + */ + readonly total_calls?: number; + /** + * Completed calls + * + * Number of successfully completed calls + */ + readonly completed_calls?: number; + /** + * Failed calls + * + * Number of failed calls + */ + readonly failed_calls?: number; + /** + * Eval results + */ + readonly eval_results?: string; +}; + +export type SdkSimulationRunsResult = { + /** + * Call execution id + */ + call_execution_id?: string; + /** + * Execution id + */ + execution_id?: string; + /** + * Scenario id + */ + scenario_id?: string; + /** + * Scenario name + */ + scenario_name?: string; + /** + * Status + */ + status?: string; + /** + * Started at + */ + started_at?: string | null; + /** + * Completed at + */ + completed_at?: string | null; + /** + * Duration seconds + */ + duration_seconds?: number | null; + /** + * Ended reason + */ + ended_reason?: string | null; + /** + * Call summary + */ + call_summary?: string | null; + /** + * Total calls + */ + total_calls?: number; + /** + * Completed calls + */ + completed_calls?: number; + /** + * Failed calls + */ + failed_calls?: number; + /** + * Eval outputs + */ + eval_outputs?: { + [key: string]: unknown; + }; + eval_results?: Array<{ + [key: string]: unknown; + }>; + /** + * Latency + */ + latency?: { + [key: string]: unknown; + }; + /** + * Cost + */ + cost?: { + [key: string]: unknown; + }; + /** + * Call results + */ + call_results?: { + [key: string]: unknown; + }; + /** + * Eval explanation summary + */ + eval_explanation_summary?: { + [key: string]: unknown; + }; + /** + * Eval explanation summary status + */ + eval_explanation_summary_status?: string | null; + /** + * Total pages + */ + total_pages?: number; + /** + * Current page + */ + current_page?: number; + /** + * Count + */ + count?: number; + results?: Array; +}; + +export type SdkSimulationRunsResponse = { + /** + * Status + */ + status: boolean; + result: SdkSimulationRunsResult; +}; + +export type AgentDefinitionListResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Agent name + * + * Name of the AI agent + */ + readonly agent_name?: string; + /** + * Agent type + */ + readonly agent_type?: 'voice' | 'text'; + /** + * Contact number + * + * Phone number associated with the AI agent + */ + readonly contact_number?: string | null; + /** + * Inbound + * + * Whether the agent handles inbound calls + */ + readonly inbound?: boolean; + /** + * Description + * + * Detailed description of the AI agent's purpose and capabilities + */ + readonly description?: string; + /** + * Assistant id + * + * External identifier for the assistant + */ + readonly assistant_id?: string | null; + /** + * Provider + * + * Provider of the AI agent + */ + readonly provider?: string | null; + /** + * Language + * + * Language of the agent + */ + readonly language?: 'ar' | 'bg' | 'zh' | 'cs' | 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'de' | 'el' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'ms' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'es' | 'sv' | 'tr' | 'uk' | 'vi'; + readonly languages?: Array<'ar' | 'bg' | 'zh' | 'cs' | 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'de' | 'el' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'ms' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'es' | 'sv' | 'tr' | 'uk' | 'vi'> | null; + /** + * Websocket url + * + * WebSocket URL for real-time communication with the agent + */ + readonly websocket_url?: string | null; + /** + * Websocket headers + * + * Headers to be sent to the websocket server + */ + readonly websocket_headers?: { + [key: string]: unknown; + }; + /** + * Workspace + */ + readonly workspace?: string | null; + /** + * Knowledge base + */ + readonly knowledge_base?: string | null; + /** + * Organization + * + * Organization this agent definition belongs to + */ + readonly organization?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Latest version + */ + readonly latest_version?: string; + /** + * Latest version id + */ + readonly latest_version_id?: string; + /** + * Model details + * + * Details of the model + */ + readonly model_details?: { + [key: string]: unknown; + }; + /** + * Model + * + * Model of the agent + */ + readonly model?: string | null; +}; + +export type ApiErrorWithDetailsResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type AgentDefinitionBulkDeleteRequest = { + /** + * List of agent definition UUIDs to delete. + */ + agent_ids: Array; +}; + +export type AgentDefinitionBulkDeleteResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Agents updated + */ + readonly agents_updated?: number; + /** + * Versions updated + */ + readonly versions_updated?: number; +}; + +export type AgentDefinitionCreateRequest = { + /** + * Agent name + */ + agent_name: string; + /** + * Agent type + * + * The type of agent. One of: voice, text. + */ + agent_type: 'voice' | 'text'; + /** + * Commit message + */ + commit_message: string; + /** + * Inbound + */ + inbound?: boolean; + /** + * Description + */ + description?: string; + /** + * Provider + */ + provider?: string | null; + /** + * Api key + */ + api_key?: string | null; + /** + * Assistant id + */ + assistant_id?: string | null; + /** + * Authentication method + */ + authentication_method?: 'api_key'; + /** + * Language + */ + language?: string | null; + languages?: Array | null; + /** + * Contact number + */ + contact_number?: string | null; + /** + * Knowledge base + */ + knowledge_base?: string | null; + /** + * Observability enabled + */ + observability_enabled?: boolean; + /** + * Model + */ + model?: string | null; + /** + * Model details + */ + model_details?: { + [key: string]: unknown; + }; + /** + * Websocket url + */ + websocket_url?: string | null; + /** + * Websocket headers + */ + websocket_headers?: { + [key: string]: unknown; + }; + /** + * Replay session id + */ + replay_session_id?: string | null; + /** + * Livekit url + */ + livekit_url?: string | null; + /** + * Livekit api key + */ + livekit_api_key?: string | null; + /** + * Livekit api secret + */ + livekit_api_secret?: string | null; + /** + * Livekit agent name + */ + livekit_agent_name?: string | null; + /** + * Livekit config json + */ + livekit_config_json?: { + [key: string]: unknown; + }; + /** + * Livekit max concurrency + */ + livekit_max_concurrency?: number | null; +}; + +export type AgentDefinitionResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Agent name + * + * Name of the AI agent + */ + readonly agent_name?: string; + /** + * Agent type + */ + readonly agent_type?: 'voice' | 'text'; + /** + * Contact number + * + * Phone number associated with the AI agent + */ + readonly contact_number?: string | null; + /** + * Inbound + * + * Whether the agent handles inbound calls + */ + readonly inbound?: boolean; + /** + * Description + * + * Detailed description of the AI agent's purpose and capabilities + */ + readonly description?: string; + /** + * Assistant id + * + * External identifier for the assistant + */ + readonly assistant_id?: string | null; + /** + * Provider + * + * Provider of the AI agent + */ + readonly provider?: string | null; + /** + * Language + * + * Language of the agent + */ + readonly language?: 'ar' | 'bg' | 'zh' | 'cs' | 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'de' | 'el' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'ms' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'es' | 'sv' | 'tr' | 'uk' | 'vi'; + readonly languages?: Array<'ar' | 'bg' | 'zh' | 'cs' | 'da' | 'nl' | 'en' | 'fi' | 'fr' | 'de' | 'el' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'ms' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'es' | 'sv' | 'tr' | 'uk' | 'vi'> | null; + /** + * Authentication method + */ + readonly authentication_method?: 'api_key'; + /** + * Websocket url + * + * WebSocket URL for real-time communication with the agent + */ + readonly websocket_url?: string | null; + /** + * Websocket headers + * + * Headers to be sent to the websocket server + */ + readonly websocket_headers?: { + [key: string]: unknown; + }; + /** + * Workspace + */ + readonly workspace?: string | null; + /** + * Knowledge base + */ + readonly knowledge_base?: string | null; + /** + * Organization + * + * Organization this agent definition belongs to + */ + readonly organization?: string; + /** + * Api key + * + * API key for the agent + */ + readonly api_key?: string | null; + /** + * Observability provider + */ + readonly observability_provider?: string | null; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Model + * + * Model of the agent + */ + readonly model?: string | null; + /** + * Model details + * + * Details of the model + */ + readonly model_details?: { + [key: string]: unknown; + }; + /** + * Livekit url + */ + readonly livekit_url?: string; + /** + * Livekit api key + */ + readonly livekit_api_key?: string; + /** + * Livekit agent name + */ + readonly livekit_agent_name?: string; + /** + * Livekit config json + */ + readonly livekit_config_json?: string; + /** + * Livekit max concurrency + */ + readonly livekit_max_concurrency?: string; +}; + +export type AgentDefinitionCreateResponse = { + /** + * Message + */ + readonly message?: string; + agent?: AgentDefinitionResponse; +}; + +export type AgentDefinitionDeleteResponse = { + /** + * Message + */ + readonly message?: string; +}; + +export type AgentDefinitionEditRequest = { + /** + * Agent name + */ + agent_name?: string; + /** + * Agent type + */ + agent_type?: 'voice' | 'text'; + /** + * Description + */ + description?: string | null; + /** + * Provider + */ + provider?: string | null; + /** + * Api key + */ + api_key?: string | null; + /** + * Assistant id + */ + assistant_id?: string | null; + /** + * Authentication method + */ + authentication_method?: 'api_key'; + /** + * Language + */ + language?: string | null; + languages?: Array | null; + /** + * Contact number + */ + contact_number?: string | null; + /** + * Inbound + */ + inbound?: boolean; + /** + * Knowledge base + */ + knowledge_base?: string | null; + /** + * Model + */ + model?: string | null; + /** + * Model details + */ + model_details?: { + [key: string]: unknown; + }; + /** + * Websocket url + */ + websocket_url?: string | null; + /** + * Websocket headers + */ + websocket_headers?: { + [key: string]: unknown; + }; + /** + * Livekit url + */ + livekit_url?: string | null; + /** + * Livekit api key + */ + livekit_api_key?: string | null; + /** + * Livekit api secret + */ + livekit_api_secret?: string | null; + /** + * Livekit agent name + */ + livekit_agent_name?: string | null; + /** + * Livekit config json + */ + livekit_config_json?: { + [key: string]: unknown; + }; + /** + * Livekit max concurrency + */ + livekit_max_concurrency?: number | null; +}; + +export type AgentDefinitionEditResponse = { + /** + * Message + */ + readonly message?: string; + agent?: AgentDefinitionResponse; +}; + +export type AgentVersionListResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Version number + * + * Version number of the agent + */ + readonly version_number?: number; + /** + * Version name + * + * Human-readable version name (e.g., 'v1.2.3') + */ + readonly version_name?: string | null; + /** + * Version name display + */ + readonly version_name_display?: string; + /** + * Status + * + * Current status of this version + */ + readonly status?: 'draft' | 'active' | 'archived' | 'deprecated'; + /** + * Status display + */ + readonly status_display?: string; + /** + * Score + * + * Performance score (0.0 to 10.0) + */ + readonly score?: string | null; + /** + * Test count + * + * Number of tests run for this version + */ + readonly test_count?: number; + /** + * Pass rate + * + * Test pass rate percentage + */ + readonly pass_rate?: string | null; + /** + * Description + * + * Description of changes in this version + */ + readonly description?: string; + /** + * Commit message + * + * Commit message for the agent version + */ + readonly commit_message?: string | null; + /** + * Is active + */ + readonly is_active?: string; + /** + * Is latest + */ + readonly is_latest?: string; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type AgentVersionCreateRequest = { + /** + * Agent name + */ + agent_name?: string; + /** + * Agent type + */ + agent_type?: 'voice' | 'text'; + /** + * Description + */ + description?: string | null; + /** + * Provider + */ + provider?: string | null; + /** + * Api key + */ + api_key?: string | null; + /** + * Assistant id + */ + assistant_id?: string | null; + /** + * Authentication method + */ + authentication_method?: 'api_key'; + /** + * Language + */ + language?: string | null; + languages?: Array | null; + /** + * Contact number + */ + contact_number?: string | null; + /** + * Inbound + */ + inbound?: boolean; + /** + * Knowledge base + */ + knowledge_base?: string | null; + /** + * Model + */ + model?: string | null; + /** + * Model details + */ + model_details?: { + [key: string]: unknown; + }; + /** + * Livekit url + */ + livekit_url?: string; + /** + * Livekit api key + */ + livekit_api_key?: string; + /** + * Livekit api secret + */ + livekit_api_secret?: string; + /** + * Livekit agent name + */ + livekit_agent_name?: string; + /** + * Livekit config json + */ + livekit_config_json?: { + [key: string]: unknown; + }; + /** + * Livekit max concurrency + */ + livekit_max_concurrency?: number; + /** + * Commit message + */ + commit_message?: string; + /** + * Observability enabled + */ + observability_enabled?: boolean; +}; + +export type AgentVersionResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Version number + * + * Version number of the agent + */ + readonly version_number?: number; + /** + * Version name + * + * Human-readable version name (e.g., 'v1.2.3') + */ + readonly version_name?: string | null; + /** + * Version name display + */ + readonly version_name_display?: string; + /** + * Status + * + * Current status of this version + */ + readonly status?: 'draft' | 'active' | 'archived' | 'deprecated'; + /** + * Status display + */ + readonly status_display?: string; + /** + * Score + * + * Performance score (0.0 to 10.0) + */ + readonly score?: string | null; + /** + * Test count + * + * Number of tests run for this version + */ + readonly test_count?: number; + /** + * Pass rate + * + * Test pass rate percentage + */ + readonly pass_rate?: string | null; + /** + * Description + * + * Description of changes in this version + */ + readonly description?: string; + /** + * Commit message + * + * Commit message for the agent version + */ + readonly commit_message?: string | null; + /** + * Release notes + * + * Detailed release notes for this version + */ + readonly release_notes?: string | null; + /** + * Agent definition + * + * Parent agent definition + */ + readonly agent_definition?: string; + /** + * Organization + * + * Organization this version belongs to + */ + readonly organization?: string; + /** + * Configuration snapshot + * + * Snapshot of agent configuration at this version + */ + readonly configuration_snapshot?: { + [key: string]: unknown; + }; + /** + * Is active + */ + readonly is_active?: string; + /** + * Is latest + */ + readonly is_latest?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; +}; + +export type AgentVersionCreateResponse = { + /** + * Message + */ + readonly message?: string; + version?: AgentVersionResponse; +}; + +export type AgentVersionActivateResponse = { + /** + * Message + */ + readonly message?: string; + version?: AgentVersionResponse; +}; + +export type CallExecution = { + /** + * Id + */ + readonly id?: string; + /** + * Phone number + * + * Phone number called (null for TEXT/chat simulations) + */ + phone_number?: string | null; + /** + * Service provider call id + */ + readonly service_provider_call_id?: string; + /** + * Status + * + * Current status of the call + */ + status?: 'pending' | 'queued' | 'ongoing' | 'completed' | 'failed' | 'analyzing' | 'cancelled'; + /** + * Started at + * + * When the call started + */ + started_at?: string | null; + /** + * Completed at + * + * When the call completed + */ + completed_at?: string | null; + /** + * Duration seconds + * + * Duration of the call in seconds + */ + duration_seconds?: number | null; + /** + * Recording url + * + * URL to the call recording + */ + recording_url?: string | null; + /** + * Cost cents + * + * Cost of the call in cents + */ + cost_cents?: number | null; + /** + * Call metadata + * + * Additional metadata about the call + */ + call_metadata?: { + [key: string]: unknown; + }; + /** + * Error message + * + * Error message if the call failed + */ + error_message?: string | null; + /** + * Scenario name + */ + readonly scenario_name?: string; + /** + * Transcripts + */ + readonly transcripts?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Provider call data + * + * Complete call data from the provider. Format: dict[provider_name, data] where provider_name must be from SupportedProviders + */ + provider_call_data?: { + [key: string]: unknown; + }; + /** + * Stereo recording url + * + * Stereo recording URL from Vapi + */ + stereo_recording_url?: string | null; + /** + * Ended reason + * + * Reason why the call ended + */ + ended_reason?: string | null; + /** + * Stt cost cents + * + * STT cost in cents + */ + stt_cost_cents?: number | null; + /** + * Llm cost cents + * + * LLM cost in cents + */ + llm_cost_cents?: number | null; + /** + * Tts cost cents + * + * TTS cost in cents + */ + tts_cost_cents?: number | null; + /** + * Overall score + * + * Overall call performance score + */ + overall_score?: number | null; + /** + * Response time ms + * + * Average response time in milliseconds + */ + response_time_ms?: number | null; + /** + * Response time seconds + */ + readonly response_time_seconds?: string; + /** + * Assistant id + * + * Assistant ID used for the call (system side) + */ + assistant_id?: string | null; + /** + * Customer number + * + * Customer phone number (E.164 format) + */ + customer_number?: string | null; + /** + * Call type + * + * Type of call (e.g., outboundPhoneCall) + */ + call_type?: string | null; + /** + * Ended at + * + * When the call ended + */ + ended_at?: string | null; + /** + * Analysis data + * + * Call analysis data from the service provider + */ + analysis_data?: { + [key: string]: unknown; + }; + /** + * Evaluation data + * + * Call evaluation data from the service provider + */ + evaluation_data?: { + [key: string]: unknown; + }; + /** + * Message count + * + * Number of messages in the call + */ + message_count?: number | null; + /** + * Transcript available + * + * Whether transcript is available + */ + transcript_available?: boolean; + /** + * Recording available + * + * Whether recording is available + */ + recording_available?: boolean; + /** + * Eval outputs + * + * Evaluation output + */ + eval_outputs?: { + [key: string]: unknown; + }; + /** + * Error localizer tasks + */ + readonly error_localizer_tasks?: string; + /** + * Call summary + * + * Call summary from the service + */ + call_summary?: string | null; + /** + * Agent version + */ + agent_version?: string | null; + /** + * Customer cost cents + * + * Total customer-reported cost in cents + */ + customer_cost_cents?: number | null; + /** + * System metrics + */ + readonly system_metrics?: string; + /** + * Cost breakdown + */ + readonly cost_breakdown?: string; + /** + * Customer call id + * + * Customer call ID if available + */ + customer_call_id?: string | null; + /** + * Simulation call type + * + * Type of simulation call + */ + simulation_call_type?: 'voice' | 'text'; + /** + * Processing skipped + */ + readonly processing_skipped?: string; + /** + * Processing skip reason + */ + readonly processing_skip_reason?: string; +}; + +export type AgentVersionDeleteResponse = { + /** + * Message + */ + readonly message?: string; +}; + +export type EvalTemplateSummary = { + /** + * Name + */ + name: string; + /** + * Id + */ + id: string; + /** + * Total cells + */ + total_cells: number; + /** + * Output + */ + output: { + [key: string]: unknown; + }; +}; + +export type EvalSummaryResponse = { + /** + * Status + */ + status?: boolean; + result: Array; +}; + +export type EvalErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type AgentVersionRestoreResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Agent + */ + readonly agent?: { + [key: string]: string | null; + }; + version?: AgentVersionResponse; +}; + +export type CallExecutionErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type PersonaList = { + /** + * Id + */ + readonly id?: string; + /** + * Persona type + * + * Type of persona (system or workspace-level) + */ + readonly persona_type?: 'system' | 'workspace'; + /** + * Persona type display + */ + readonly persona_type_display?: string; + /** + * Name + * + * Name of the persona + */ + readonly name?: string; + /** + * Description + * + * Description of the persona + */ + readonly description?: string | null; + /** + * Gender + * + * List of genders for the persona (e.g., ['male'], ['female']) + */ + readonly gender?: { + [key: string]: unknown; + }; + /** + * Age group + * + * List of age groups for the persona (e.g., ['18-25'], ['25-32']) + */ + readonly age_group?: { + [key: string]: unknown; + }; + /** + * Occupation + * + * List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher']) + */ + readonly occupation?: { + [key: string]: unknown; + }; + /** + * Location + * + * List of locations for the persona (e.g., ['United States'], ['Canada']) + */ + readonly location?: { + [key: string]: unknown; + }; + /** + * Personality + * + * List of personality types for the persona (e.g., ['Friendly and cooperative']) + */ + readonly personality?: { + [key: string]: unknown; + }; + /** + * Communication style + * + * List of communication styles for the persona (e.g., ['Direct and concise']) + */ + readonly communication_style?: { + [key: string]: unknown; + }; + /** + * Multilingual + * + * Whether the persona supports multiple languages + */ + readonly multilingual?: boolean | null; + /** + * Languages + * + * List of languages the persona speaks (e.g., ['English', 'Hindi']) + */ + readonly languages?: { + [key: string]: unknown; + }; + /** + * Accent + * + * List of accents for the persona (e.g., ['American'], ['Australian']) + */ + readonly accent?: { + [key: string]: unknown; + }; + /** + * Conversation speed + * + * List of conversation speeds (e.g., ['1.0'], ['1.25']) + */ + readonly conversation_speed?: { + [key: string]: unknown; + }; + /** + * Background sound + * + * Whether background sound is enabled (null=not specified, True/False for enabled/disabled) + */ + readonly background_sound?: boolean | null; + /** + * Finished speaking sensitivity + * + * List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6']) + */ + readonly finished_speaking_sensitivity?: { + [key: string]: unknown; + }; + /** + * Interrupt sensitivity + * + * List of sensitivities for allowing interruptions (e.g., ['5'], ['6']) + */ + readonly interrupt_sensitivity?: { + [key: string]: unknown; + }; + /** + * Keywords + * + * List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful']) + */ + readonly keywords?: { + [key: string]: unknown; + }; + /** + * Metadata + * + * Additional metadata for the persona (speech clarity, base emotion, etc.) + */ + readonly metadata?: { + [key: string]: unknown; + }; + /** + * Additional instruction + * + * Additional instructions for how this persona should behave + */ + readonly additional_instruction?: string | null; + /** + * Is default + * + * Whether this is a default/recommended persona + */ + readonly is_default?: boolean | null; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Simulation type + */ + readonly simulation_type?: string; + /** + * Punctuation + * + * Punctuation style for the persona + */ + readonly punctuation?: 'clean' | 'minimal' | 'expressive' | 'erratic'; + /** + * Slang usage + * + * Slang usage for the persona + */ + readonly slang_usage?: 'none' | 'moderate' | 'heavy' | 'light'; + /** + * Typos frequency + * + * Typos frequency for the persona + */ + readonly typos_frequency?: 'none' | 'rare' | 'occasional' | 'frequent'; + /** + * Regional mix + * + * Regional mix for the persona + */ + readonly regional_mix?: 'none' | 'moderate' | 'heavy' | 'light'; + /** + * Emoji usage + * + * Emoji usage for the persona + */ + readonly emoji_usage?: 'never' | 'light' | 'regular' | 'heavy'; + /** + * Tone + * + * Tone for the persona + */ + readonly tone?: 'formal' | 'casual' | 'neutral'; + /** + * Verbosity + * + * Verbosity for the persona + */ + readonly verbosity?: 'brief' | 'balanced' | 'detailed'; +}; + +export type PersonaCreate = { + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + gender?: Array | null; + age_group?: Array | null; + location?: Array | null; + profession?: Array | null; + personality?: Array | null; + communication_style?: Array | null; + accent?: Array | null; + /** + * Multilingual + */ + multilingual?: boolean; + language?: Array | null; + conversation_speed?: Array | null; + /** + * Background sound + */ + background_sound?: boolean | null; + finished_speaking_sensitivity?: Array | null; + interrupt_sensitivity?: Array | null; + keywords?: Array | null; + /** + * Custom properties + */ + custom_properties?: { + [key: string]: unknown; + }; + /** + * Additional instruction + */ + additional_instruction?: string | null; + /** + * Simulation type + */ + simulation_type?: string | null; + /** + * Tone + */ + tone?: string | null; + /** + * Punctuation + */ + punctuation?: string | null; + /** + * Slang usage + */ + slang_usage?: string | null; + /** + * Typos frequency + */ + typos_frequency?: string | null; + /** + * Regional mix + */ + regional_mix?: string | null; + /** + * Emoji usage + */ + emoji_usage?: string | null; + /** + * Verbosity + */ + verbosity?: string | null; +}; + +export type PersonaDuplicateRequest = { + /** + * Name + */ + name: string; +}; + +export type Persona = { + /** + * Id + */ + readonly id?: string; + /** + * Persona type + * + * Type of persona (system or workspace-level) + */ + readonly persona_type?: 'system' | 'workspace'; + /** + * Persona type display + */ + readonly persona_type_display?: string; + /** + * Name + * + * Name of the persona + */ + name: string; + /** + * Description + * + * Description of the persona + */ + description?: string | null; + /** + * Gender + * + * List of genders for the persona (e.g., ['male'], ['female']) + */ + gender?: { + [key: string]: unknown; + }; + /** + * Age group + * + * List of age groups for the persona (e.g., ['18-25'], ['25-32']) + */ + age_group?: { + [key: string]: unknown; + }; + /** + * Occupation + * + * List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher']) + */ + occupation?: { + [key: string]: unknown; + }; + /** + * Location + * + * List of locations for the persona (e.g., ['United States'], ['Canada']) + */ + location?: { + [key: string]: unknown; + }; + /** + * Personality + * + * List of personality types for the persona (e.g., ['Friendly and cooperative']) + */ + personality?: { + [key: string]: unknown; + }; + /** + * Communication style + * + * List of communication styles for the persona (e.g., ['Direct and concise']) + */ + communication_style?: { + [key: string]: unknown; + }; + /** + * Multilingual + * + * Whether the persona supports multiple languages + */ + multilingual?: boolean | null; + /** + * Languages + * + * List of languages the persona speaks (e.g., ['English', 'Hindi']) + */ + languages?: { + [key: string]: unknown; + }; + /** + * Accent + * + * List of accents for the persona (e.g., ['American'], ['Australian']) + */ + accent?: { + [key: string]: unknown; + }; + /** + * Conversation speed + * + * List of conversation speeds (e.g., ['1.0'], ['1.25']) + */ + conversation_speed?: { + [key: string]: unknown; + }; + /** + * Background sound + * + * Whether background sound is enabled (null=not specified, True/False for enabled/disabled) + */ + background_sound?: boolean | null; + /** + * Finished speaking sensitivity + * + * List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6']) + */ + finished_speaking_sensitivity?: { + [key: string]: unknown; + }; + /** + * Interrupt sensitivity + * + * List of sensitivities for allowing interruptions (e.g., ['5'], ['6']) + */ + interrupt_sensitivity?: { + [key: string]: unknown; + }; + /** + * Keywords + * + * List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful']) + */ + keywords?: { + [key: string]: unknown; + }; + /** + * Metadata + * + * Additional metadata for the persona (speech clarity, base emotion, etc.) + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Additional instruction + * + * Additional instructions for how this persona should behave + */ + additional_instruction?: string | null; + /** + * Is default + * + * Whether this is a default/recommended persona + */ + readonly is_default?: boolean | null; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + profession?: Array | null; + language?: Array | null; + /** + * Custom properties + */ + custom_properties?: { + [key: string]: unknown; + }; + /** + * Simulation type + * + * Type of simulation for the persona + */ + readonly simulation_type?: 'voice' | 'text'; + /** + * Punctuation + * + * Punctuation style for the persona + */ + punctuation?: 'clean' | 'minimal' | 'expressive' | 'erratic'; + /** + * Slang usage + * + * Slang usage for the persona + */ + slang_usage?: 'none' | 'moderate' | 'heavy' | 'light'; + /** + * Typos frequency + * + * Typos frequency for the persona + */ + typos_frequency?: 'none' | 'rare' | 'occasional' | 'frequent'; + /** + * Regional mix + * + * Regional mix for the persona + */ + regional_mix?: 'none' | 'moderate' | 'heavy' | 'light'; + /** + * Emoji usage + * + * Emoji usage for the persona + */ + emoji_usage?: 'never' | 'light' | 'regular' | 'heavy'; + /** + * Tone + * + * Tone for the persona + */ + tone?: 'formal' | 'casual' | 'neutral'; + /** + * Verbosity + * + * Verbosity for the persona + */ + verbosity?: 'brief' | 'balanced' | 'detailed'; +}; + +export type PersonaDuplicateResponse = { + /** + * Status + */ + status?: boolean; + result?: Persona; +}; + +export type PersonaFieldOptions = { + /** + * Gender choices + */ + readonly gender_choices?: string; + /** + * Age group choices + */ + readonly age_group_choices?: string; + /** + * Location choices + */ + readonly location_choices?: string; + /** + * Profession choices + */ + readonly profession_choices?: string; + /** + * Personality choices + */ + readonly personality_choices?: string; + /** + * Communication style choices + */ + readonly communication_style_choices?: string; + /** + * Accent choices + */ + readonly accent_choices?: string; + /** + * Language choices + */ + readonly language_choices?: string; + /** + * Conversation speed choices + */ + readonly conversation_speed_choices?: string; + /** + * Tone choices + */ + readonly tone_choices?: string; + /** + * Verbosity choices + */ + readonly verbosity_choices?: string; + /** + * Punctuation choices + */ + readonly punctuation_choices?: string; + /** + * Emoji usage choices + */ + readonly emoji_usage_choices?: string; + /** + * Slang usage choices + */ + readonly slang_usage_choices?: string; + /** + * Typos frequency choices + */ + readonly typos_frequency_choices?: string; + /** + * Regional mix choices + */ + readonly regional_mix_choices?: string; +}; + +export type SimulateEvalConfigResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + readonly name?: string | null; + /** + * Config + */ + readonly config?: { + [key: string]: unknown; + }; + /** + * Mapping + */ + readonly mapping?: { + [key: string]: unknown; + }; + readonly filters?: Array<{ + /** + * Column or attribute id to filter on. + */ + column_id: string; + /** + * Optional UI label for chips and saved views. + */ + display_name?: string; + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + */ + source?: string; + /** + * Optional metric output type metadata used by eval and annotation filters. + */ + output_type?: string; + filter_config: { + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + */ + filter_type: string; + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + */ + filter_op: string; + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + */ + filter_value?: unknown; + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + */ + col_type?: string; + }; + }>; + /** + * Error localizer + */ + readonly error_localizer?: boolean; + /** + * Model + */ + readonly model?: string | null; + /** + * Status + */ + readonly status?: string | null; + /** + * Eval group + */ + readonly eval_group?: string | null; + /** + * Template id + */ + readonly template_id?: string | null; +}; + +export type RunTestResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Name + * + * Name of the test run + */ + readonly name?: string; + /** + * Description + * + * Description of the test run + */ + readonly description?: string | null; + /** + * Agent definition + * + * Agent definition for this test run + */ + readonly agent_definition?: string | null; + /** + * Agent version + */ + readonly agent_version?: { + [key: string]: string | null; + }; + /** + * Agent definition detail + */ + readonly agent_definition_detail?: { + [key: string]: string | null; + }; + /** + * Source type + * + * Source type for the test run: agent_definition or prompt + */ + readonly source_type?: 'agent_definition' | 'prompt'; + /** + * Source type display + */ + readonly source_type_display?: string | null; + /** + * Prompt template + * + * Prompt template for this test run (only for prompt source type) + */ + readonly prompt_template?: string | null; + /** + * Prompt template detail + */ + readonly prompt_template_detail?: { + [key: string]: string | null; + }; + /** + * Prompt version + * + * Prompt version for this test run (only for prompt source type) + */ + readonly prompt_version?: string | null; + /** + * Prompt version detail + */ + readonly prompt_version_detail?: { + [key: string]: string | null; + }; + /** + * Scenarios to run in this test + */ + readonly scenarios?: Array; + readonly scenarios_detail?: Array<{ + [key: string]: string | null; + }>; + /** + * IDs of dataset rows to run evaluations on + */ + readonly dataset_row_ids?: Array; + /** + * Simulator agent + * + * Simulator agent for this test run (derived from scenarios) + */ + readonly simulator_agent?: string | null; + /** + * Simulator agent detail + */ + readonly simulator_agent_detail?: { + [key: string]: string | null; + }; + readonly simulate_eval_configs?: Array; + readonly simulate_eval_configs_detail?: Array; + readonly evals_detail?: Array; + /** + * Organization + * + * Organization this test run belongs to + */ + readonly organization?: string; + /** + * Enable tool evaluation + * + * Enable automatic tool evaluation for this test run + */ + readonly enable_tool_evaluation?: boolean; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Last run at + */ + readonly last_run_at?: string | null; + /** + * Deleted + */ + readonly deleted?: boolean; + /** + * Deleted at + */ + readonly deleted_at?: string | null; +}; + +export type RunTestErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type TestExecution = { + /** + * Id + */ + readonly id?: string; + /** + * Run test + * + * The run test being executed + */ + run_test: string; + /** + * Run test name + */ + readonly run_test_name?: string; + /** + * Agent definition name + */ + readonly agent_definition_name?: string; + /** + * Status + * + * Current status of the test execution + */ + status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'cancelling' | 'evaluating'; + /** + * Error reason + */ + error_reason?: string | null; + /** + * Started at + * + * When the test execution started + */ + started_at?: string; + /** + * Completed at + * + * When the test execution completed + */ + completed_at?: string | null; + /** + * Total scenarios + * + * Total number of scenarios in this execution + */ + total_scenarios?: number; + /** + * Total calls + * + * Total number of calls to be made + */ + total_calls?: number; + /** + * Completed calls + * + * Number of successfully completed calls + */ + completed_calls?: number; + /** + * Failed calls + * + * Number of failed calls + */ + failed_calls?: number; + /** + * Execution metadata + * + * Additional metadata about the execution + */ + execution_metadata?: { + [key: string]: unknown; + }; + /** + * Duration seconds + */ + readonly duration_seconds?: string; + /** + * Success rate + */ + readonly success_rate?: string; + readonly calls?: Array; + /** + * Created at + */ + readonly created_at?: string; + /** + * Scenario ids + * + * List of scenario IDs that were executed in this run + */ + scenario_ids?: { + [key: string]: unknown; + }; + /** + * Simulator agent name + */ + readonly simulator_agent_name?: string; + /** + * Simulator agent id + */ + readonly simulator_agent_id?: string; + /** + * Agent definition used name + */ + readonly agent_definition_used_name?: string; + /** + * Agent definition used id + */ + readonly agent_definition_used_id?: string; + /** + * Calls attempted + */ + readonly calls_attempted?: string; + /** + * Calls connected percentage + */ + readonly calls_connected_percentage?: string; +}; + +export type CallExecutionDetail = { + /** + * Id + */ + readonly id?: string; + /** + * Service provider call id + */ + readonly service_provider_call_id?: string; + /** + * Session id + */ + readonly session_id?: string; + /** + * Timestamp + */ + readonly timestamp?: string; + /** + * Call type + */ + readonly call_type?: string; + /** + * Status + * + * Current status of the call + */ + status?: 'pending' | 'queued' | 'ongoing' | 'completed' | 'failed' | 'analyzing' | 'cancelled'; + /** + * Duration + */ + readonly duration?: string; + /** + * Duration seconds + * + * Duration of the call in seconds + */ + duration_seconds?: number | null; + /** + * Start time + */ + readonly start_time?: string; + /** + * Transcript + */ + readonly transcript?: string; + /** + * Scenario + */ + readonly scenario?: string; + /** + * Overall score + */ + readonly overall_score?: string; + /** + * Response time + */ + readonly response_time?: string; + /** + * Response time ms + * + * Average response time in milliseconds + */ + response_time_ms?: number | null; + /** + * Audio url + */ + readonly audio_url?: string; + /** + * Customer name + */ + readonly customer_name?: string; + /** + * Eval outputs + */ + readonly eval_outputs?: string; + /** + * Eval metrics + */ + readonly eval_metrics?: string; + /** + * Scenario columns + */ + readonly scenario_columns?: string; + /** + * Ended reason + * + * Reason why the call ended + */ + ended_reason?: string | null; + /** + * Simulator agent name + */ + readonly simulator_agent_name?: string; + /** + * Simulator agent id + */ + readonly simulator_agent_id?: string; + /** + * Agent definition used name + */ + readonly agent_definition_used_name?: string; + /** + * Agent definition used id + */ + readonly agent_definition_used_id?: string; + /** + * Call summary + * + * Call summary from the service + */ + call_summary?: string | null; + /** + * Recordings + */ + readonly recordings?: string; + /** + * Scenario id + */ + readonly scenario_id?: string; + /** + * Avg agent latency + */ + readonly avg_agent_latency?: number; + /** + * Avg agent latency ms + * + * Average agent latency in milliseconds (time taken by agent to respond after user's pause) + */ + avg_agent_latency_ms?: number | null; + /** + * User interruption count + * + * Number of times user interrupted the AI + */ + user_interruption_count?: number | null; + /** + * User interruption rate + * + * Rate of user interruptions (interruptions per minute) + */ + user_interruption_rate?: number | null; + /** + * User wpm + * + * User's words per minute + */ + user_wpm?: number | null; + /** + * Bot wpm + * + * Bot's words per minute + */ + bot_wpm?: number | null; + /** + * Talk ratio + * + * Ratio of bot speaking time to user speaking time + */ + talk_ratio?: number | null; + /** + * Ai interruption count + * + * Number of times AI interrupted the user + */ + ai_interruption_count?: number | null; + /** + * Ai interruption rate + * + * Rate of AI interruptions (interruptions per minute) + */ + ai_interruption_rate?: number | null; + /** + * Avg stop time after interruption + */ + readonly avg_stop_time_after_interruption?: number; + /** + * Total tokens + */ + readonly total_tokens?: string; + /** + * Input tokens + */ + readonly input_tokens?: string; + /** + * Output tokens + */ + readonly output_tokens?: string; + /** + * Avg latency ms + */ + readonly avg_latency_ms?: string; + /** + * Turn count + */ + readonly turn_count?: string; + /** + * Agent talk percentage + */ + readonly agent_talk_percentage?: string; + /** + * Csat score + */ + readonly csat_score?: string; + /** + * Processing skipped + */ + readonly processing_skipped?: string; + /** + * Processing skip reason + */ + readonly processing_skip_reason?: string; + /** + * Rerun snapshots + */ + readonly rerun_snapshots?: string; + /** + * Is snapshot + */ + readonly is_snapshot?: string; + /** + * Snapshot timestamp + */ + readonly snapshot_timestamp?: string; + /** + * Rerun type + */ + readonly rerun_type?: string; + /** + * Original call execution id + */ + readonly original_call_execution_id?: string; + /** + * Tool outputs + * + * Tool evaluation output - separate from standard evaluations + */ + tool_outputs?: { + [key: string]: unknown; + }; + /** + * Cost cents + * + * Cost of the call in cents + */ + cost_cents?: number | null; + /** + * Customer cost cents + * + * Total customer-reported cost in cents + */ + customer_cost_cents?: number | null; + /** + * Customer cost breakdown + * + * Detailed cost breakdown from customer call data + */ + customer_cost_breakdown?: { + [key: string]: unknown; + }; + /** + * Customer latency metrics + * + * Latency metrics from customer call data + */ + customer_latency_metrics?: { + [key: string]: unknown; + }; + /** + * Customer call id + * + * Customer call ID if available + */ + customer_call_id?: string | null; + /** + * Simulation call type + * + * Type of simulation call + */ + simulation_call_type?: 'voice' | 'text'; + /** + * Provider + */ + readonly provider?: string; + /** + * Phone number + * + * Phone number called (null for TEXT/chat simulations) + */ + phone_number?: string | null; +}; + +export type CallExecutionStatusUpdate = { + /** + * Status + */ + status: 'pending' | 'queued' | 'ongoing' | 'completed' | 'failed' | 'analyzing' | 'cancelled'; + /** + * Ended reason + */ + ended_reason?: string | null; +}; + +export type CallBranchAnalysisResponse = { + /** + * Call execution id + */ + readonly call_execution_id?: string; + /** + * Scenario id + */ + readonly scenario_id?: string | null; + /** + * Scenario name + */ + readonly scenario_name?: string | null; + /** + * Analysis + */ + readonly analysis?: { + [key: string]: string | null; + }; + /** + * Analyzed at + */ + readonly analyzed_at?: string; +}; + +export type ErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type CallBranchDeviationCreateResponse = { + /** + * Call execution id + */ + readonly call_execution_id?: string; + /** + * Scenario graph id + */ + readonly scenario_graph_id?: string; + /** + * Deviation data + */ + readonly deviation_data?: { + [key: string]: string | null; + }; + /** + * Message + */ + readonly message?: string; +}; + +export type ChatToolCallFunction = { + /** + * Name + */ + name: string; + /** + * Arguments + */ + arguments: string; +}; + +export type ChatToolCall = { + /** + * Id + */ + id: string; + /** + * Type + */ + type: string; + function: ChatToolCallFunction; +}; + +export type ChatMessageContract = { + /** + * Role + */ + role: 'user' | 'assistant' | 'tool'; + /** + * Content + */ + content?: string | null; + /** + * Tool call id + */ + tool_call_id?: string | null; + /** + * Name + */ + name?: string | null; + /** + * Metadata + */ + metadata?: { + [key: string]: string | null; + }; + tool_calls?: Array | null; +}; + +export type SendChatRequest = { + messages?: Array | null; + /** + * Metrics + */ + metrics?: { + [key: string]: string | null; + }; + /** + * Initiate chat + */ + initiate_chat?: boolean; +}; + +export type ChatSendMessageResult = { + input_message?: Array | null; + output_message?: Array | null; + message_history: Array; + /** + * Chat ended + */ + chat_ended?: boolean; +}; + +export type ChatSendMessageResponse = { + /** + * Status + */ + status?: boolean; + result: ChatSendMessageResult; +}; + +export type CallExecutionDeleteResponse = { + /** + * Message + */ + readonly message?: string; +}; + +export type ErrorLocalizerTaskResponse = { + /** + * Task id + */ + readonly task_id?: string; + /** + * Eval config id + */ + readonly eval_config_id?: string | null; + /** + * Status + */ + readonly status?: string; + /** + * Eval result + */ + readonly eval_result?: { + [key: string]: unknown; + }; + /** + * Eval explanation + */ + readonly eval_explanation?: string | null; + /** + * Input data + */ + readonly input_data?: { + [key: string]: unknown; + }; + /** + * Input keys + */ + readonly input_keys?: { + [key: string]: unknown; + }; + /** + * Input types + */ + readonly input_types?: { + [key: string]: unknown; + }; + /** + * Rule prompt + */ + readonly rule_prompt?: string | null; + /** + * Error analysis + */ + readonly error_analysis?: { + [key: string]: unknown; + }; + /** + * Selected input key + */ + readonly selected_input_key?: string | null; + /** + * Error message + */ + readonly error_message?: string | null; + /** + * Created at + */ + readonly created_at?: string | null; + /** + * Updated at + */ + readonly updated_at?: string | null; + /** + * Eval template name + */ + readonly eval_template_name?: string | null; + /** + * Eval template id + */ + readonly eval_template_id?: string | null; +}; + +export type CallExecutionErrorLocalizerTasksResponse = { + /** + * Call execution id + */ + readonly call_execution_id?: string; + readonly error_localizer_tasks?: Array; + /** + * Total tasks + */ + readonly total_tasks?: number; +}; + +export type CallLogEntryResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Logged at + */ + readonly logged_at?: string | null; + /** + * Level + */ + readonly level?: string | null; + /** + * Severity text + */ + readonly severity_text?: string | null; + /** + * Category + */ + readonly category?: string | null; + /** + * Body + */ + readonly body?: string | null; + /** + * Attributes + */ + readonly attributes?: { + [key: string]: string | null; + }; + /** + * Payload + */ + readonly payload?: { + [key: string]: string | null; + }; +}; + +export type CallExecutionLogsResponse = { + readonly results?: Array; + /** + * Source + */ + readonly source?: string; + /** + * Ingestion pending + */ + readonly ingestion_pending?: boolean; +}; + +export type SessionComparisonResult = { + /** + * Comparison metrics + */ + readonly comparison_metrics?: { + [key: string]: unknown; + }; + /** + * Comparison transcripts + */ + readonly comparison_transcripts?: { + [key: string]: unknown; + }; + /** + * Comparison recordings + */ + readonly comparison_recordings?: { + [key: string]: unknown; + }; +}; + +export type SessionComparisonResponse = { + /** + * Status + */ + status?: boolean; + result: SessionComparisonResult; +}; + +export type CallTranscript = { + /** + * Id + */ + readonly id?: string; + /** + * Speaker role + * + * Role of the speaker (user or assistant) + */ + speaker_role?: 'user' | 'assistant' | 'system' | 'tool_calls' | 'tool_call_result' | 'unknown'; + /** + * Content + * + * Transcript content + */ + content: string; + /** + * Start time ms + * + * Start time of this transcript segment in milliseconds + */ + start_time_ms?: number; + /** + * Start time seconds + */ + readonly start_time_seconds?: string; + /** + * End time ms + * + * End time of this transcript segment in milliseconds + */ + end_time_ms?: number; + /** + * End time seconds + */ + readonly end_time_seconds?: string; + /** + * Confidence score + * + * Confidence score for this transcript segment + */ + confidence_score?: number; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type CallTranscriptResponse = { + /** + * Call execution id + */ + readonly call_execution_id?: string; + /** + * Phone number + */ + readonly phone_number?: string | null; + /** + * Status + */ + readonly status?: string; + readonly transcripts?: Array; + /** + * Total transcripts + */ + readonly total_transcripts?: number; +}; + +export type PromptSimulationScenarioItem = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + readonly name?: string; + /** + * Description + */ + readonly description?: string; + /** + * Scenario type + */ + readonly scenario_type?: string; + /** + * Dataset id + */ + readonly dataset_id?: string | null; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type PromptSimulationScenariosResult = { + /** + * Count + */ + readonly count?: number; + /** + * Page + */ + readonly page?: number; + /** + * Limit + */ + readonly limit?: number; + readonly results?: Array; +}; + +export type PromptSimulationScenariosResponse = { + /** + * Status + */ + status?: boolean; + result: PromptSimulationScenariosResult; +}; + +export type PromptSimulationTemplateSummary = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + readonly name?: string; +}; + +export type PromptSimulationListResult = { + /** + * Count + */ + readonly count?: number; + /** + * Page + */ + readonly page?: number; + /** + * Limit + */ + readonly limit?: number; + readonly results?: Array; + prompt_template?: PromptSimulationTemplateSummary; +}; + +export type PromptSimulationListResponse = { + /** + * Status + */ + status?: boolean; + result: PromptSimulationListResult; +}; + +export type EvalConfigDefinition = { + /** + * Template id + * + * UUID of the evaluation template to use. + */ + template_id: string; + /** + * Name + * + * Name for this evaluation configuration. Defaults to 'Eval-' if omitted. + */ + name?: string; + /** + * Config + * + * Template-specific configuration parameters. + */ + config?: { + [key: string]: unknown; + }; + /** + * Mapping + * + * Maps test execution data fields to the evaluation template's expected inputs. + */ + mapping?: { + [key: string]: unknown; + }; + /** + * Canonical filter list to restrict which test results are evaluated. + */ + filters?: Array<{ + /** + * Column or attribute id to filter on. + */ + column_id: string; + /** + * Optional UI label for chips and saved views. + */ + display_name?: string; + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + */ + source?: string; + /** + * Optional metric output type metadata used by eval and annotation filters. + */ + output_type?: string; + filter_config: { + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + */ + filter_type: string; + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + */ + filter_op: string; + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + */ + filter_value?: unknown; + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + */ + col_type?: string; + }; + }>; + /** + * Error localizer + * + * Enables granular error localization on evaluation failures. + */ + error_localizer?: boolean; + /** + * Model + * + * Model to use for running this evaluation. + */ + model?: string | null; + /** + * Kb id + * + * Knowledge base file to use for this evaluation. + */ + kb_id?: string | null; + /** + * Eval group + * + * Eval group that created this evaluation config. + */ + eval_group?: string | null; +}; + +export type CreatePromptSimulationRequest = { + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string; + /** + * Prompt version id + * + * Prompt version ID (UUID) or template_version string + */ + prompt_version_id: string; + scenario_ids: Array; + dataset_row_ids?: Array; + /** + * Evaluation configurations to create + */ + evaluations_config?: Array; + /** + * Enable tool evaluation + * + * Enable automatic tool evaluation for this simulation run + */ + enable_tool_evaluation?: boolean; +}; + +export type PromptSimulationRunResponse = { + /** + * Status + */ + status?: boolean; + result: RunTestResponse; +}; + +export type PromptSimulationUpdateRequest = { + /** + * Prompt version id + */ + prompt_version_id?: string; + scenario_ids?: Array; + /** + * Name + */ + name?: string; + /** + * Description + */ + description?: string; + /** + * Enable tool evaluation + */ + enable_tool_evaluation?: boolean; +}; + +export type ExecutePromptSimulationRequest = { + scenario_ids?: Array; + /** + * Select all + */ + select_all?: boolean; +}; + +export type ExecutePromptSimulationResult = { + /** + * Message + */ + readonly message?: string; + /** + * Execution id + */ + readonly execution_id?: string; + /** + * Run test id + */ + readonly run_test_id?: string; + /** + * Status + */ + readonly status?: string; + /** + * Total scenarios + */ + readonly total_scenarios?: number; + /** + * Total calls + */ + readonly total_calls?: number; + scenario_ids: Array; +}; + +export type ExecutePromptSimulationResponse = { + /** + * Status + */ + status?: boolean; + result: ExecutePromptSimulationResult; +}; + +export type AllActiveTests = { + /** + * Active tests + */ + active_tests: { + [key: string]: string | null; + }; + /** + * Total active + */ + total_active: number; +}; + +export type CreateRunTest = { + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string; + /** + * Agent definition id + */ + agent_definition_id: string; + scenario_ids: Array; + dataset_row_ids?: Array; + eval_config_ids?: Array; + /** + * Evaluation configurations to create + */ + evaluations_config?: Array; + /** + * Enable tool evaluation + * + * Enable automatic tool evaluation for this test run + */ + enable_tool_evaluation?: boolean; + /** + * Replay session id + * + * Optional replay session ID to mark as completed after run test creation + */ + replay_session_id?: string | null; + /** + * Agent version + * + * Optional agent version to bind to this test run + */ + agent_version?: string | null; +}; + +export type RunTestNameResult = { + /** + * Run test id + */ + run_test_id: string; + /** + * Run test name + */ + run_test_name: string; +}; + +export type RunTestNameResponse = { + /** + * Status + */ + status?: boolean; + result: RunTestNameResult; +}; + +export type UpdateRunTest = { + /** + * Name + */ + name?: string; + /** + * Description + */ + description?: string; + /** + * Agent definition id + */ + agent_definition_id?: string; + scenario_ids?: Array; + dataset_row_ids?: Array; + eval_config_ids?: Array; +}; + +export type RunTestMessageResponse = { + /** + * Message + */ + readonly message?: string; +}; + +export type RunTestAnalytics = { + /** + * Run test info + * + * Run test metadata + */ + run_test_info: { + [key: string]: string | null; + }; + /** + * Fail-rate trend points + */ + fail_rate_trends: Array<{ + [key: string]: string | null; + }>; + /** + * Evaluation score trend points + */ + evaluation_score_trends: Array<{ + [key: string]: string | null; + }>; + /** + * Per-execution performance rows + */ + performance_comparison: Array<{ + [key: string]: string | null; + }>; + /** + * Summary stats + * + * Aggregate performance summary + */ + summary_stats?: { + [key: string]: string | null; + }; +}; + +export type RunTestCallExecutionsResponse = { + /** + * Count + */ + readonly count?: number; + /** + * Next + */ + readonly next?: string | null; + /** + * Previous + */ + readonly previous?: string | null; + readonly results?: Array<{ + [key: string]: string | null; + }>; + /** + * Total pages + */ + readonly total_pages?: number; + /** + * Current page + */ + readonly current_page?: number; +}; + +export type RunTestChatExecutionResult = { + /** + * Message + */ + message: string; + /** + * Execution id + */ + execution_id: string; + /** + * Run test id + */ + run_test_id: string; + /** + * Status + */ + status: string; + total_scenarios: Array; +}; + +export type RunTestChatExecutionResponse = { + /** + * Status + */ + status?: boolean; + result: RunTestChatExecutionResult; +}; + +export type RunTestComponentsUpdate = { + /** + * Agent definition id + */ + agent_definition_id?: string; + /** + * Version + */ + version?: string; + /** + * Simulator agent id + */ + simulator_agent_id?: string; + scenarios?: Array; + /** + * Enable tool evaluation + */ + enable_tool_evaluation?: boolean; +}; + +export type TestExecutionBulkDelete = { + /** + * List of specific test execution IDs to delete + */ + test_execution_ids?: Array; + /** + * Select all + * + * Whether to delete all test executions in the run test + */ + select_all?: boolean; +}; + +export type TestExecutionBulkDeleteResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Run test id + */ + readonly run_test_id?: string; + /** + * Deleted count + */ + readonly deleted_count?: number; + readonly deleted_ids?: Array; +}; + +export type AddEvalConfigsRequest = { + /** + * Array of evaluation configuration objects to add. At least one required. + */ + evaluations_config: Array; +}; + +export type EvalConfigResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + name?: string | null; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Mapping + */ + mapping?: { + [key: string]: unknown; + }; + /** + * Filters + */ + filters?: { + [key: string]: unknown; + }; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Model + */ + model?: 'turing_large' | 'turing_small' | 'protect' | 'protect_flash' | 'turing_flash'; + /** + * Status + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; + /** + * Eval group + */ + readonly eval_group?: string; + /** + * Template id + */ + readonly template_id?: string; +}; + +export type AddEvalConfigsResponse = { + /** + * Message + */ + message: string; + created_eval_configs: Array; + /** + * Run test id + */ + run_test_id: string; + /** + * Non-fatal issues encountered while processing individual configs. + */ + warnings?: Array; +}; + +export type DeleteEvalConfigResponse = { + /** + * Message + */ + message: string; +}; + +export type EvalConfigStructure = { + /** + * Id + */ + readonly id?: string; + /** + * Template id + */ + readonly template_id?: string; + /** + * Name + */ + readonly name?: string; + /** + * Reason column + */ + readonly reason_column?: boolean; + /** + * Eval tags + */ + readonly eval_tags?: { + [key: string]: unknown; + }; + /** + * Description + */ + readonly description?: string; + required_keys: Array; + optional_keys: Array; + variable_keys: Array; + /** + * Run prompt column + */ + readonly run_prompt_column?: boolean; + /** + * Template name + */ + readonly template_name?: string; + /** + * Mapping + */ + readonly mapping?: { + [key: string]: string | null; + }; + /** + * Config + */ + readonly config?: { + [key: string]: string | null; + }; + /** + * Params + */ + readonly params?: { + [key: string]: unknown; + }; + /** + * Function params schema + */ + readonly function_params_schema?: { + [key: string]: unknown; + }; + /** + * Models + */ + readonly models?: { + [key: string]: unknown; + }; + /** + * Selected model + */ + readonly selected_model?: string | null; + /** + * Error localizer + */ + readonly error_localizer?: boolean; + /** + * Kb id + */ + readonly kb_id?: string | null; + /** + * Output + */ + readonly output?: { + [key: string]: unknown; + }; + /** + * Config params desc + */ + readonly config_params_desc?: { + [key: string]: string | null; + }; + /** + * Config params option + */ + readonly config_params_option?: { + [key: string]: string | null; + }; + /** + * Api key available + */ + readonly api_key_available?: boolean; +}; + +export type EvalConfigStructureResult = { + eval: EvalConfigStructure; +}; + +export type EvalConfigStructureResponse = { + /** + * Status + */ + status?: boolean; + result: EvalConfigStructureResult; +}; + +export type EvalConfigUpdateRequest = { + /** + * Config + * + * Updated evaluation configuration parameters. + */ + config?: { + [key: string]: unknown; + }; + /** + * Mapping + * + * Updated field mapping between test data and evaluation inputs. + */ + mapping?: { + [key: string]: unknown; + }; + /** + * Model + * + * Model to use for evaluations. + */ + model?: string | null; + /** + * Error localizer + * + * Enable granular error localization in evaluation results. + */ + error_localizer?: boolean; + /** + * Kb id + * + * UUID of a knowledge base to use for grounding. Pass null to clear. + */ + kb_id?: string | null; + /** + * Name + * + * Updated name for the evaluation configuration. + */ + name?: string; + /** + * Run + * + * When true, triggers an immediate rerun after updating. Defaults to false. + */ + run?: boolean; + /** + * Test execution id + * + * UUID of the test execution to rerun against. Required when run is true. + */ + test_execution_id?: string | null; +}; + +export type EvalConfigUpdateResponse = { + /** + * Message + */ + message: string; + /** + * Eval config id + */ + eval_config_id: string; + /** + * Run test id + */ + run_test_id: string; + /** + * Test execution id + */ + test_execution_id?: string | null; + /** + * Call execution count + */ + call_execution_count?: number | null; + /** + * Note + */ + note?: string | null; +}; + +export type EvalSummaryComparisonResponse = { + /** + * Status + */ + status?: boolean; + /** + * Result + */ + result: { + [key: string]: Array; + }; +}; + +export type ExecuteRunTest = { + scenario_ids?: Array; + /** + * Simulator id + */ + simulator_id?: string | null; + /** + * Select all + */ + select_all?: boolean; +}; + +export type RunTestExecutionResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Execution id + */ + readonly execution_id?: string; + /** + * Run test id + */ + readonly run_test_id?: string; + /** + * Status + */ + readonly status?: string; + /** + * Total scenarios + */ + readonly total_scenarios?: number; + /** + * Total calls + */ + readonly total_calls?: number; + readonly scenario_ids?: Array; +}; + +export type TestExecutionItemResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Status + */ + readonly status?: string; + /** + * Scenarios + */ + readonly scenarios?: string; + /** + * Start time + */ + readonly start_time?: string | null; + /** + * Duration + */ + readonly duration?: number; + /** + * Error reason + */ + readonly error_reason?: string | null; + /** + * Success rate + */ + readonly success_rate?: number; + /** + * Avg response time + */ + readonly avg_response_time?: number; + /** + * Calls + */ + readonly calls?: number; + /** + * Calls attempted + */ + readonly calls_attempted?: number; + /** + * Connected calls + */ + readonly connected_calls?: number; + /** + * Agent version + */ + readonly agent_version?: string; + /** + * Agent definition + */ + readonly agent_definition?: string; + /** + * Calls connected percentage + */ + readonly calls_connected_percentage?: number; + /** + * Total chats + */ + readonly total_chats?: number; + /** + * Agent type + */ + readonly agent_type?: string; + /** + * Total number of fagi agent turns + */ + readonly total_number_of_fagi_agent_turns?: number; + /** + * Source type + */ + readonly source_type?: string; +}; + +export type TestExecutionRerun = { + /** + * Rerun type + * + * Type of rerun: evaluation only or call plus evaluation + */ + rerun_type: 'eval_only' | 'call_and_eval'; + /** + * List of specific test execution IDs to rerun + */ + test_execution_ids?: Array; + /** + * Select all + * + * Whether to rerun all test executions in the run test + */ + select_all?: boolean; +}; + +export type TestExecutionRerunResult = { + /** + * Test execution id + */ + readonly test_execution_id?: string; + /** + * Success count + */ + readonly success_count?: number; + /** + * Failure count + */ + readonly failure_count?: number; + readonly successful_reruns?: Array; + readonly failed_reruns?: Array<{ + [key: string]: string | null; + }>; + /** + * Skipped + */ + readonly skipped?: boolean; + /** + * Reason + */ + readonly reason?: string; +}; + +export type TestExecutionRerunResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Run test id + */ + readonly run_test_id?: string; + /** + * Rerun type + */ + readonly rerun_type?: string; + /** + * Total test executions + */ + readonly total_test_executions?: number; + readonly results?: Array; + /** + * Overall success count + */ + readonly overall_success_count?: number; + /** + * Overall failure count + */ + readonly overall_failure_count?: number; +}; + +export type RunNewEvalsOnTestExecution = { + /** + * List of specific test execution IDs to run evaluations on + */ + test_execution_ids?: Array; + /** + * Select all + * + * Whether to run evaluations on all test executions in the run test + */ + select_all?: boolean; + /** + * List of SimulateEvalConfig IDs to run on the test executions + */ + eval_config_ids: Array; + /** + * Enable tool evaluation + * + * Whether to enable tool evaluation for this run (if not provided, uses the run test's current setting) + */ + enable_tool_evaluation?: boolean; +}; + +export type RunNewEvalsResponse = { + /** + * Message + */ + message: string; + /** + * Run test id + */ + run_test_id: string; + /** + * Call execution count + */ + call_execution_count: number; +}; + +export type RunTestScenarioItemResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + readonly name?: string; + /** + * Row count + */ + readonly row_count?: number; +}; + +export type ChatSdkCodeResult = { + /** + * Installation guide + */ + installation_guide: string; + /** + * Sdk code + */ + sdk_code: string; + /** + * Run test id + */ + run_test_id: string; + /** + * Run test name + */ + run_test_name: string; +}; + +export type ChatSdkCodeResponse = { + /** + * Status + */ + status?: boolean; + result: ChatSdkCodeResult; +}; + +export type ScenarioResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Name + * + * Name of the scenario + */ + name: string; + /** + * Description + * + * Optional description of the scenario + */ + description?: string | null; + /** + * Source + * + * Source content or reference for the scenario + */ + source: string; + /** + * Scenario type + * + * Type of scenario (graph, script, or dataset) + */ + scenario_type?: 'graph' | 'script' | 'dataset'; + /** + * Scenario type display + */ + readonly scenario_type_display?: string; + /** + * Source type + * + * Source type for the scenario: agent_definition or prompt + */ + source_type?: 'agent_definition' | 'prompt'; + /** + * Source type display + */ + readonly source_type_display?: string; + /** + * Organization + * + * Organization this scenario belongs to + */ + readonly organization?: string; + /** + * Dataset + * + * Dataset associated with this scenario (only for dataset type scenarios) + */ + dataset?: string | null; + /** + * Dataset rows + */ + readonly dataset_rows?: string; + /** + * Dataset column config + */ + readonly dataset_column_config?: string; + /** + * Graph + */ + readonly graph?: string; + /** + * Agent + */ + readonly agent?: string; + /** + * Prompt template + * + * Prompt template associated with this scenario (only for prompt source type) + */ + prompt_template?: string | null; + /** + * Prompt template detail + */ + readonly prompt_template_detail?: string; + /** + * Prompt version + * + * Prompt version associated with this scenario (only for prompt source type) + */ + prompt_version?: string | null; + /** + * Prompt version detail + */ + readonly prompt_version_detail?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Deleted + */ + readonly deleted?: boolean; + /** + * Status + * + * Status of the scenario + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; + /** + * Deleted at + */ + readonly deleted_at?: string | null; + /** + * Agent type + */ + readonly agent_type?: string; +}; + +export type ScenarioListResponse = { + /** + * Count + */ + readonly count?: number; + /** + * Next + */ + readonly next?: string | null; + /** + * Previous + */ + readonly previous?: string | null; + readonly results?: Array; +}; + +export type ScenarioErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type ColumnDefinition = { + /** + * Name + */ + name: string; + /** + * Data type + */ + data_type: 'text' | 'boolean' | 'integer' | 'float' | 'json' | 'array' | 'image' | 'images' | 'datetime' | 'audio' | 'document' | 'others' | 'persona'; + /** + * Description + */ + description: string; +}; + +export type ScenarioCreateRequest = { + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string; + /** + * Dataset id + */ + dataset_id?: string; + /** + * Kind + */ + kind?: 'graph' | 'script' | 'dataset'; + /** + * Script url + */ + script_url?: string | null; + /** + * Agent definition id + */ + agent_definition_id?: string; + /** + * Agent definition version id + */ + agent_definition_version_id?: string | null; + /** + * Custom instruction + */ + custom_instruction?: string; + /** + * No of rows + */ + no_of_rows?: number; + /** + * Generate graph + */ + generate_graph?: boolean; + /** + * Graph + */ + graph?: { + [key: string]: unknown; + }; + /** + * Source type + */ + source_type?: 'agent_definition' | 'prompt'; + /** + * Prompt template id + */ + prompt_template_id?: string | null; + /** + * Prompt version id + */ + prompt_version_id?: string | null; + /** + * Add persona automatically + */ + add_persona_automatically?: boolean; + personas?: Array; + custom_columns?: Array; + /** + * Agent name + */ + agent_name?: string; + /** + * Agent prompt + */ + agent_prompt?: string; + /** + * Voice provider + */ + voice_provider?: string; + /** + * Voice name + */ + voice_name?: string; + /** + * Model + */ + model?: string; + /** + * Llm temperature + */ + llm_temperature?: number; + /** + * Initial message + */ + initial_message?: string; + /** + * Max call duration in minutes + */ + max_call_duration_in_minutes?: number; + /** + * Interrupt sensitivity + */ + interrupt_sensitivity?: number; + /** + * Conversation speed + */ + conversation_speed?: number; + /** + * Finished speaking sensitivity + */ + finished_speaking_sensitivity?: number; + /** + * Initial message delay + */ + initial_message_delay?: number; +}; + +export type ScenarioCreateResponse = { + /** + * Message + */ + readonly message?: string; + scenario?: ScenarioResponse; + /** + * Status + */ + readonly status?: 'processing'; +}; + +export type ScenarioPromptItem = { + /** + * Role + */ + readonly role?: 'system' | 'user' | 'assistant'; + /** + * Content + */ + readonly content?: string; +}; + +export type ScenarioDetailResponse = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + readonly name?: string; + /** + * Description + */ + readonly description?: string | null; + /** + * Source + */ + readonly source?: string; + /** + * Scenario type + */ + readonly scenario_type?: 'graph' | 'script' | 'dataset'; + /** + * Dataset id + */ + readonly dataset_id?: string | null; + /** + * Organization + */ + readonly organization?: string; + /** + * Dataset + */ + readonly dataset?: string | null; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Deleted + */ + readonly deleted?: boolean; + /** + * Deleted at + */ + readonly deleted_at?: string | null; + /** + * Status + */ + readonly status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; + /** + * Agent type + */ + readonly agent_type?: string | null; + /** + * Graph + */ + readonly graph?: { + [key: string]: string | null; + }; + readonly prompts?: Array; + /** + * Dataset rows + */ + readonly dataset_rows?: number; +}; + +export type ScenarioAddColumnsRequest = { + columns: Array; +}; + +export type ScenarioAddColumnsResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Scenario id + */ + readonly scenario_id?: string; + /** + * Dataset id + */ + readonly dataset_id?: string; + readonly columns?: Array; +}; + +export type ScenarioAddRowsRequest = { + /** + * Num rows + */ + num_rows: number; + /** + * Description + */ + description?: string; +}; + +export type ScenarioAddRowsResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Scenario id + */ + readonly scenario_id?: string; + /** + * Dataset id + */ + readonly dataset_id?: string; + /** + * Num rows + */ + readonly num_rows?: number; +}; + +export type ScenarioDeleteResponse = { + /** + * Message + */ + readonly message?: string; +}; + +export type ScenarioEditRequest = { + /** + * Name + */ + name?: string; + /** + * Description + */ + description?: string; + /** + * Graph + */ + graph?: { + [key: string]: unknown; + }; + /** + * Prompt + */ + prompt?: string; +}; + +export type ScenarioEditResponse = { + /** + * Message + */ + readonly message?: string; + scenario?: ScenarioResponse; +}; + +export type ScenarioEditPromptsRequest = { + /** + * Prompts + */ + prompts: string; +}; + +export type ScenarioPromptsUpdateResponse = { + /** + * Message + */ + readonly message?: string; + /** + * Prompts + */ + readonly prompts?: string; +}; + +export type SimulatorAgent = { + /** + * Id + */ + readonly id?: string; + /** + * Name + * + * Name of the simulator agent + */ + name: string; + /** + * Prompt + * + * System prompt for the agent + */ + prompt: string; + /** + * Voice provider + * + * Voice service provider + */ + voice_provider: string; + /** + * Voice name + * + * Specific voice to use + */ + voice_name: string; + /** + * Interrupt sensitivity + * + * Sensitivity for interruption detection (0-1) + */ + interrupt_sensitivity?: number; + /** + * Conversation speed + * + * Speed of conversation (0.1-3.0) + */ + conversation_speed?: number; + /** + * Finished speaking sensitivity + * + * Sensitivity for detecting when speaker has finished (0-1) + */ + finished_speaking_sensitivity?: number; + /** + * Model + * + * LLM model to use + */ + model: string; + /** + * Llm temperature + * + * Temperature setting for LLM (0-2) + */ + llm_temperature?: number; + /** + * Max call duration in minutes + * + * Maximum call duration in minutes (1-180) + */ + max_call_duration_in_minutes?: number; + /** + * Initial message delay + * + * Delay before initial message in seconds (0-60) + */ + initial_message_delay?: number; + /** + * Initial message + * + * Initial message to send when conversation starts + */ + initial_message?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Organization + * + * Organization this simulator agent belongs to + */ + readonly organization?: string; + /** + * Deleted + */ + readonly deleted?: boolean; + /** + * Deleted at + */ + readonly deleted_at?: string | null; + /** + * Logo url + */ + readonly logo_url?: string; +}; + +export type SimulatorAgentListResponse = { + /** + * Count + */ + readonly count?: number; + /** + * Next + */ + readonly next?: string | null; + /** + * Previous + */ + readonly previous?: string | null; + readonly results?: Array; + /** + * Total pages + */ + readonly total_pages?: number; + /** + * Current page + */ + readonly current_page?: number; +}; + +export type SimulatorAgentValidationErrorResponse = { + [key: string]: Array; +}; + +export type SimulatorAgentDeleteResponse = { + /** + * Message + */ + readonly message?: string; +}; + +export type TestExecutionDetailResponse = { + /** + * Count + */ + readonly count?: number; + /** + * Next + */ + readonly next?: string | null; + /** + * Previous + */ + readonly previous?: string | null; + /** + * Call execution rows may include dynamic eval/scenario columns. + */ + readonly results?: Array<{ + [key: string]: string | null; + }>; + /** + * Total pages + */ + readonly total_pages?: number; + /** + * Current page + */ + readonly current_page?: number; + readonly column_order?: Array<{ + [key: string]: string | null; + }>; + readonly error_messages?: Array; + /** + * Status + */ + readonly status?: string; + /** + * Provider + */ + readonly provider?: string; + /** + * Agent type + */ + readonly agent_type?: string; +}; + +export type TestExecutionAnalytics = { + /** + * Fail rate over test runs + * + * Fail rate data for scatter plot chart + */ + fail_rate_over_test_runs: { + [key: string]: string | null; + }; + /** + * Evaluation categories over test runs + * + * Evaluation categories data for line graph chart + */ + evaluation_categories_over_test_runs: { + [key: string]: string | null; + }; + /** + * Metadata + * + * Metadata about the analytics data + */ + metadata: { + [key: string]: string | null; + }; +}; + +export type CancelTestExecutionResponse = { + /** + * Success + */ + success: boolean; + /** + * Message + */ + message: string; + /** + * Test execution id + */ + test_execution_id: string | null; +}; + +export type TestExecutionChatBatchResult = { + call_execution_ids: Array; + /** + * Has more + */ + has_more: boolean; + batched_scenarios: Array; +}; + +export type TestExecutionChatBatchResponse = { + /** + * Status + */ + status?: boolean; + result: TestExecutionChatBatchResult; +}; + +export type ColumnOrder = { + /** + * Column name + */ + column_name: string; + /** + * Id + */ + id: string; + /** + * Visible + */ + visible: boolean; +}; + +export type TestExecutionColumnOrder = { + column_order: Array; +}; + +export type TestExecutionColumnOrderResponse = { + /** + * Message + */ + readonly message?: string; + readonly column_order?: Array; +}; + +export type EvalExplanationCluster = { + /** + * Kind + */ + readonly kind?: string; + /** + * Confidence + */ + readonly confidence?: string; + /** + * Theme + */ + readonly theme?: string; + /** + * Guidance + */ + readonly guidance?: string; + /** + * Evidencesummary + */ + readonly evidenceSummary?: string; + /** + * Eval config id + */ + readonly eval_config_id?: string; + /** + * Eval template id + */ + readonly eval_template_id?: string; + /** + * Eval name + */ + readonly eval_name?: string; +}; + +export type EvalExplanationSummaryResult = { + /** + * Response + */ + response: { + [key: string]: Array; + }; + /** + * Last updated + */ + last_updated: string | null; + /** + * Status + */ + status: string; +}; + +export type EvalExplanationSummaryResponse = { + /** + * Status + */ + status?: boolean; + result: EvalExplanationSummaryResult; +}; + +export type EvalExplanationSummaryRefreshResult = { + /** + * Message + */ + message: string; +}; + +export type EvalExplanationSummaryRefreshResponse = { + /** + * Status + */ + status?: boolean; + result: EvalExplanationSummaryRefreshResult; +}; + +export type RunTestKpisResponse = { + /** + * Total calls + */ + readonly total_calls?: number; + /** + * Avg score + */ + readonly avg_score?: number; + /** + * Avg response + */ + readonly avg_response?: number; + /** + * Calls attempted + */ + readonly calls_attempted?: number; + /** + * Connected calls + */ + readonly connected_calls?: number; + /** + * Calls connected percentage + */ + readonly calls_connected_percentage?: number; + /** + * Scenario graphs + */ + readonly scenario_graphs?: { + [key: string]: { + [key: string]: { + [key: string]: unknown; + }; + }; + }; + /** + * Agent type + */ + readonly agent_type?: string; + /** + * Is inbound + */ + readonly is_inbound?: boolean | null; + /** + * Avg agent latency + */ + readonly avg_agent_latency?: number; + /** + * Avg user interruption count + */ + readonly avg_user_interruption_count?: number; + /** + * Avg user interruption rate + */ + readonly avg_user_interruption_rate?: number; + /** + * Avg user wpm + */ + readonly avg_user_wpm?: number; + /** + * Avg bot wpm + */ + readonly avg_bot_wpm?: number; + /** + * Avg talk ratio + */ + readonly avg_talk_ratio?: number; + /** + * Avg ai interruption count + */ + readonly avg_ai_interruption_count?: number; + /** + * Avg ai interruption rate + */ + readonly avg_ai_interruption_rate?: number; + /** + * Avg stop time after interruption + */ + readonly avg_stop_time_after_interruption?: number; + /** + * Agent talk percentage + */ + readonly agent_talk_percentage?: number; + /** + * Customer talk percentage + */ + readonly customer_talk_percentage?: number; + /** + * Avg total tokens + */ + readonly avg_total_tokens?: number; + /** + * Avg input tokens + */ + readonly avg_input_tokens?: number; + /** + * Avg output tokens + */ + readonly avg_output_tokens?: number; + /** + * Avg chat latency ms + */ + readonly avg_chat_latency_ms?: number; + /** + * Avg turn count + */ + readonly avg_turn_count?: number; + /** + * Avg csat score + */ + readonly avg_csat_score?: number; + /** + * Failed calls + */ + readonly failed_calls?: number; + /** + * Total duration + */ + readonly total_duration?: number; +}; + +export type OptimiserAnalysisResultPayload = { + /** + * Response + */ + response: { + [key: string]: { + [key: string]: unknown; + }; + }; + /** + * Status + */ + status: string; + /** + * Last updated + */ + last_updated?: string; + /** + * Message + */ + message?: string; +}; + +export type OptimiserAnalysisResponse = { + /** + * Status + */ + status?: boolean; + result: OptimiserAnalysisResultPayload; +}; + +export type OptimiserAnalysisRefreshResult = { + /** + * Message + */ + message: string; + /** + * Status + */ + status: string; +}; + +export type OptimiserAnalysisRefreshResponse = { + /** + * Status + */ + status?: boolean; + result: OptimiserAnalysisRefreshResult; +}; + +export type PerformanceSummary = { + /** + * Test run performance metrics + * + * Performance metrics including pass rate, total test runs, and latest fail rate + */ + test_run_performance_metrics: { + [key: string]: number; + }; + /** + * List of top performing scenarios + */ + top_performing_scenarios: Array<{ + [key: string]: string; + }>; +}; + +export type CallExecutionRerun = { + /** + * Rerun type + * + * Type of rerun: evaluation only or call plus evaluation + */ + rerun_type: 'eval_only' | 'call_and_eval'; + /** + * List of specific call execution IDs to rerun + */ + call_execution_ids?: Array; + /** + * Select all + * + * Whether to rerun all call executions in the test execution + */ + select_all?: boolean; +}; + +export type FailedRerunItem = { + /** + * Call execution id + */ + call_execution_id: string; + /** + * Error + */ + error: string; +}; + +export type RerunCallsResponse = { + /** + * Message + */ + message: string; + /** + * Test execution id + */ + test_execution_id: string; + /** + * Rerun type + */ + rerun_type: string; + /** + * Total processed + */ + total_processed: number; + successful_reruns: Array; + failed_reruns: Array; + /** + * Success count + */ + success_count: number; + /** + * Failure count + */ + failure_count: number; +}; + +export type TestExecutionTranscriptCall = { + /** + * Call execution id + */ + readonly call_execution_id?: string; + /** + * Phone number + */ + readonly phone_number?: string | null; + /** + * Status + */ + readonly status?: string; + readonly transcripts?: Array; + /** + * Total transcripts + */ + readonly total_transcripts?: number; + /** + * Scenario name + */ + readonly scenario_name?: string | null; +}; + +export type TestExecutionTranscriptsResponse = { + /** + * Test execution id + */ + readonly test_execution_id?: string; + readonly calls?: Array; + /** + * Total calls + */ + readonly total_calls?: number; + /** + * Total transcripts + */ + readonly total_transcripts?: number; +}; + +export type BulkAnnotationAnnotationRequest = { + /** + * Annotation label id + */ + annotation_label_id: string; + /** + * Value + */ + value?: string; + /** + * Value float + */ + value_float?: number; + /** + * Value bool + */ + value_bool?: boolean; + value_str_list?: Array; +}; + +export type BulkAnnotationNoteRequest = { + /** + * Text + */ + text: string; +}; + +export type BulkAnnotationRecordRequest = { + /** + * Observation span id + */ + observation_span_id: string; + annotations?: Array; + notes?: Array; +}; + +export type BulkAnnotationRequest = { + records: Array; +}; + +export type BulkAnnotationResponseResult = { + /** + * Message + */ + message: string; + /** + * Annotations created + */ + annotations_created: number; + /** + * Annotations updated + */ + annotations_updated: number; + /** + * Notes created + */ + notes_created: number; + /** + * Succeeded count + */ + succeeded_count: number; + /** + * Errors count + */ + errors_count: number; + /** + * Warnings count + */ + warnings_count: number; + warnings?: Array<{ + [key: string]: unknown; + }> | null; + errors?: Array<{ + [key: string]: unknown; + }> | null; +}; + +export type BulkAnnotationResponse = { + /** + * Status + */ + status?: boolean; + result: BulkAnnotationResponseResult; +}; + +export type ApiErrorResponse = { + /** + * Status + */ + status?: boolean; + /** + * Type + */ + type?: 'validation_error' | 'authentication_error' | 'payment_required' | 'entitlement_error' | 'permission_error' | 'not_found' | 'conflict' | 'client_error' | 'rate_limit' | 'server_error' | 'service_unavailable' | 'timeout' | 'api_error'; + /** + * Code + */ + code?: string | null; + /** + * Detail + */ + detail?: string | null; + /** + * Result + */ + result?: string | null; + /** + * Message + */ + message?: string | null; + /** + * Error + */ + error?: string | null; + /** + * Attr + */ + attr?: string | null; + /** + * Details + */ + details?: { + [key: string]: Array; + }; +}; + +export type ErrorName = { + /** + * Name + */ + name: string; + /** + * Type + */ + type: string; +}; + +export type TrendPoint = { + /** + * Timestamp + */ + timestamp: string; + /** + * Value + */ + value: number; + /** + * Users + */ + users: number; +}; + +export type FeedListRow = { + /** + * Cluster id + */ + cluster_id: string; + /** + * Source + */ + source: string; + error: ErrorName; + /** + * Status + */ + status: string; + /** + * Severity + */ + severity: string; + /** + * Occurrences + */ + occurrences: number; + /** + * Trace count + */ + trace_count: number; + /** + * Fix layer + */ + fix_layer: string | null; + /** + * Users affected + */ + users_affected: number; + /** + * Sessions + */ + sessions: number; + /** + * First seen + */ + first_seen: string | null; + /** + * Last seen + */ + last_seen: string | null; + trends: Array; + assignees: Array; + /** + * Model + */ + model: string | null; + /** + * Model version + */ + model_version: string | null; + /** + * Project + */ + project: string | null; + /** + * Project id + */ + project_id: string | null; + /** + * Environment + */ + environment: string | null; + /** + * Eval score + */ + eval_score: number | null; + /** + * Trace id + */ + trace_id: string | null; + /** + * External issue url + */ + external_issue_url: string | null; + /** + * External issue id + */ + external_issue_id: string | null; +}; + +export type FeedListResponse = { + data: Array; + /** + * Total + */ + total: number; + /** + * Limit + */ + limit: number; + /** + * Offset + */ + offset: number; +}; + +export type FeedListApiResponse = { + /** + * Status + */ + status?: boolean; + result: FeedListResponse; +}; + +export type FeedStats = { + /** + * Total errors + */ + total_errors: number; + /** + * Escalating + */ + escalating: number; + /** + * For review + */ + for_review: number; + /** + * Acknowledged + */ + acknowledged: number; + /** + * Resolved + */ + resolved: number; + /** + * Affected users + */ + affected_users: number; +}; + +export type FeedStatsApiResponse = { + /** + * Status + */ + status?: boolean; + result: FeedStats; +}; + +export type TracePreview = { + /** + * Trace id + */ + trace_id: string; + /** + * Input + */ + input: string | null; + /** + * Output + */ + output: string | null; +}; + +export type FeedDetailCore = { + row: FeedListRow; + /** + * Description + */ + description: string | null; + success_trace: TracePreview; + representative_trace: TracePreview; +}; + +export type FeedDetailApiResponse = { + /** + * Status + */ + status?: boolean; + result: FeedDetailCore; +}; + +export type FeedUpdateBody = { + /** + * Project id + */ + project_id?: string; + /** + * Status + */ + status?: 'escalating' | 'for_review' | 'acknowledged' | 'resolved'; + /** + * Severity + */ + severity?: 'critical' | 'high' | 'medium' | 'low'; + /** + * Assignee + */ + assignee?: string | null; +}; + +export type CreateLinearIssue = { + /** + * Team id + */ + team_id: string; + /** + * Title + */ + title?: string; + /** + * Description + */ + description?: string; + /** + * Priority + */ + priority?: number; +}; + +export type CreateLinearIssueResult = { + /** + * Already linked + */ + already_linked?: boolean; + /** + * Issue id + */ + issue_id?: string | null; + /** + * Issue url + */ + issue_url?: string | null; + /** + * Issue title + */ + issue_title?: string | null; +}; + +export type CreateLinearIssueResponse = { + /** + * Status + */ + status?: boolean; + result: CreateLinearIssueResult; +}; + +export type DeepAnalysisBody = { + /** + * Trace id + */ + trace_id: string; + /** + * Force + */ + force?: boolean; +}; + +export type DeepAnalysisDispatchResponse = { + /** + * Status + */ + status: string; + /** + * Trace id + */ + trace_id: string; +}; + +export type DeepAnalysisDispatchApiResponse = { + /** + * Status + */ + status?: boolean; + result: DeepAnalysisDispatchResponse; +}; + +export type EventsOverTimePoint = { + /** + * Date + */ + date: string; + /** + * Errors + */ + errors: number; + /** + * Passing + */ + passing: number; + /** + * Users + */ + users: number; +}; + +export type PatternInsight = { + /** + * Value + */ + value: string; + /** + * Caption + */ + caption: string; +}; + +export type KeyMoment = { + /** + * Kevinified + */ + kevinified: string; + /** + * Verbatim + */ + verbatim: string; +}; + +export type PatternSummary = { + insights: Array; + key_moments: Array; +}; + +export type TraceSummary = { + /** + * Eval score + */ + eval_score: number | null; + /** + * Latency ms + */ + latency_ms: number | null; + /** + * Turns + */ + turns: number | null; + /** + * Model + */ + model: string | null; + /** + * Input tokens + */ + input_tokens: number | null; + /** + * Output tokens + */ + output_tokens: number | null; +}; + +export type TraceEvidence = { + /** + * Input + */ + input: string | null; + /** + * Output + */ + output: string | null; + fail_reel: Array<{ + [key: string]: string | null; + }>; + pass_reel: Array<{ + [key: string]: string | null; + }>; +}; + +export type AgentFlowGraph = { + nodes: Array<{ + [key: string]: string | null; + }>; + edges: Array<{ + [key: string]: string | null; + }>; +}; + +export type RepresentativeTrace = { + /** + * Id + */ + id: string; + /** + * Status + */ + status: string; + /** + * Timestamp + */ + timestamp: string | null; + summary: TraceSummary; + evidence: TraceEvidence; + agent_flow: AgentFlowGraph; + root_causes: Array<{ + [key: string]: string | null; + }>; + recommendations: Array<{ + [key: string]: string | null; + }>; + /** + * What changed + */ + what_changed: { + [key: string]: string | null; + }; +}; + +export type OverviewResponse = { + events_over_time: Array; + pattern_summary: PatternSummary; + representative_traces: Array; +}; + +export type OverviewApiResponse = { + /** + * Status + */ + status?: boolean; + result: OverviewResponse; +}; + +export type RootCause = { + /** + * Rank + */ + rank: number; + /** + * Title + */ + title: string; + /** + * Description + */ + description: string; +}; + +export type Recommendation = { + /** + * Id + */ + id: string; + /** + * Title + */ + title: string; + /** + * Description + */ + description: string; + /** + * Priority + */ + priority: string; + /** + * Root cause link + */ + root_cause_link: number | null; + /** + * Immediate fix + */ + immediate_fix: string | null; + /** + * Insights + */ + insights: string | null; + evidence: Array; +}; + +export type DeepAnalysisResponse = { + /** + * Status + */ + status: string; + /** + * Trace id + */ + trace_id: string; + root_causes: Array; + recommendations: Array; + /** + * Immediate fix + */ + immediate_fix: string | null; +}; + +export type DeepAnalysisApiResponse = { + /** + * Status + */ + status?: boolean; + result: DeepAnalysisResponse; +}; + +export type SidebarTimeline = { + /** + * First seen + */ + first_seen: string | null; + /** + * Last seen + */ + last_seen: string | null; + /** + * Age days + */ + age_days: number | null; +}; + +export type SidebarAiMetadata = { + /** + * Model + */ + model: string | null; + /** + * Model version + */ + model_version: string | null; + /** + * Project + */ + project: string | null; + /** + * Eval score + */ + eval_score: number | null; + /** + * Trace id + */ + trace_id: string | null; +}; + +export type EvaluationResult = { + /** + * Label + */ + label: string; + /** + * Type + */ + type: string; + /** + * Result + */ + result: string; + /** + * Score + */ + score: number | null; + /** + * Value + */ + value: string | null; +}; + +export type CoOccurringIssue = { + /** + * Id + */ + id: string; + /** + * Title + */ + title: string; + /** + * Type + */ + type: string; + /** + * Co occurrence + */ + co_occurrence: number; + /** + * Count + */ + count: number; + /** + * Severity + */ + severity: string; +}; + +export type FeedSidebar = { + timeline: SidebarTimeline; + ai_metadata: SidebarAiMetadata; + evaluations: Array; + co_occurring_issues: Array; +}; + +export type FeedSidebarApiResponse = { + /** + * Status + */ + status?: boolean; + result: FeedSidebar; +}; + +export type TracesAggregates = { + /** + * Total traces + */ + total_traces: number; + /** + * Failing traces + */ + failing_traces: number; + /** + * Passing traces + */ + passing_traces: number; + /** + * Avg score + */ + avg_score: number; + /** + * P50 latency + */ + p50_latency: number; + /** + * P95 latency + */ + p95_latency: number; + /** + * Avg turns + */ + avg_turns: number; +}; + +export type TracesListRow = { + /** + * Id + */ + id: string; + /** + * Input + */ + input: string | null; + /** + * Timestamp + */ + timestamp: string | null; + /** + * Latency ms + */ + latency_ms: number | null; + /** + * Tokens + */ + tokens: number | null; + /** + * Cost + */ + cost: number | null; + /** + * Score + */ + score: number | null; + /** + * Turns + */ + turns: number | null; +}; + +export type TracesTabResponse = { + aggregates: TracesAggregates; + traces: Array; + /** + * Total + */ + total: number; +}; + +export type TracesTabApiResponse = { + /** + * Status + */ + status?: boolean; + result: TracesTabResponse; +}; + +export type TrendMetric = { + /** + * Label + */ + label: string; + /** + * Value + */ + value: string; + /** + * Delta + */ + delta: number; + /** + * Unit + */ + unit: string; +}; + +export type ScoreTrend = { + /** + * Label + */ + label: string; + /** + * Current + */ + current: number; + /** + * Prev + */ + prev: number; + sparkline: Array; +}; + +export type HeatmapCell = { + /** + * Day + */ + day: number; + /** + * Hour + */ + hour: number; + /** + * Value + */ + value: number; +}; + +export type TrendsTabResponse = { + metrics: Array; + events_over_time: Array; + score_trends: Array; + activity_heatmap: Array>; +}; + +export type TrendsTabApiResponse = { + /** + * Status + */ + status?: boolean; + result: TrendsTabResponse; +}; + +export type AnnotationLabelResponse = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Type + */ + type: string; + /** + * Description + */ + description?: string | null; + /** + * Settings + */ + settings?: { + [key: string]: unknown; + }; +}; + +export type GetAnnotationLabelsResponse = { + /** + * Status + */ + status?: boolean; + result: Array; +}; + +export type ObserveGraphDataRequest = { + /** + * Project id + */ + project_id: string; + filters?: Array<{ + /** + * Column or attribute id to filter on. + */ + column_id: string; + /** + * Optional UI label for chips and saved views. + */ + display_name?: string; + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + */ + source?: string; + /** + * Optional metric output type metadata used by eval and annotation filters. + */ + output_type?: string; + filter_config: { + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + */ + filter_type: string; + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + */ + filter_op: string; + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + */ + filter_value?: unknown; + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + */ + col_type?: string; + }; + }>; + /** + * Interval + */ + interval?: 'hour' | 'day' | 'week' | 'month'; + /** + * Property + */ + property?: string; + /** + * Req data config + */ + req_data_config: { + id: string; + type: 'SYSTEM_METRIC' | 'EVAL' | 'ANNOTATION'; + output_type?: string; + eval_output_type?: string; + choices?: Array; + value?: unknown; + filter_op?: string; + filter_value?: unknown; + }; +}; + +export type ObserveGraphDataPoint = { + /** + * Timestamp + */ + timestamp: string; + /** + * Value + */ + value: number | null; + /** + * Primary traffic + */ + primary_traffic?: number | null; +}; + +export type ObserveGraphDataResult = { + /** + * Metric name + */ + metric_name: string; + data: Array; +}; + +export type ObserveGraphDataResponse = { + /** + * Status + */ + status?: boolean; + result: ObserveGraphDataResult; +}; + +export type Project = { + /** + * Id + */ + readonly id?: string; + /** + * Model type + */ + model_type: 'Numeric' | 'ScoreCategorical' | 'Ranking' | 'BinaryClassification' | 'Regression' | 'ObjectDetection' | 'Segmentation' | 'GenerativeLLM' | 'GenerativeImage' | 'GenerativeVideo' | 'TTS' | 'STT' | 'MultiModal'; + /** + * Name + */ + name: string; + /** + * Trace type + */ + trace_type: 'experiment' | 'observe'; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Organization + */ + readonly organization?: string; + /** + * Workspace + */ + readonly workspace?: string | null; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Config + * + * Any valid JSON value. + */ + config?: { + [key: string]: unknown; + }; + /** + * Source + */ + source?: 'demo' | 'prototype' | 'simulator'; + /** + * Session config + * + * Any valid JSON value. + */ + session_config?: { + [key: string]: unknown; + }; + /** + * Tags + * + * Any valid JSON value. + */ + tags?: { + [key: string]: unknown; + }; +}; + +export type GetTraceAnnotation = { + /** + * Observation span id + */ + observation_span_id?: string | null; + /** + * Trace id + */ + trace_id?: string | null; + /** + * Annotators + * + * JSON-encoded UUID list. + */ + annotators?: string; + /** + * Exclude annotators + * + * JSON-encoded UUID list. + */ + exclude_annotators?: string; +}; + +export type TraceAnnotationValueResponse = { + /** + * Id + */ + id: string; + /** + * Annotation label name + */ + annotation_label_name: string; + /** + * Annotation value + */ + annotation_value: { + [key: string]: unknown; + }; + /** + * Annotation label id + */ + annotation_label_id: string; + /** + * Annotator + */ + annotator?: string | null; + /** + * Annotator id + */ + annotator_id?: string | null; + /** + * Updated by + */ + updated_by?: string | null; + /** + * Updated at + */ + updated_at?: string | null; + /** + * Annotation type + */ + annotation_type: string; + /** + * Settings + */ + settings?: { + [key: string]: unknown; + }; +}; + +export type TraceAnnotationNoteResponse = { + /** + * Id + */ + id: string; + /** + * Notes + */ + notes: string; + /** + * Created by annotator + */ + created_by_annotator: string; + /** + * Created by user + */ + created_by_user: string; + /** + * Created by user id + */ + created_by_user_id: string; + /** + * Updated at + */ + updated_at: string; +}; + +export type GetTraceAnnotationValuesResult = { + annotations: Array; + notes: Array; +}; + +export type GetTraceAnnotationValuesResponse = { + /** + * Status + */ + status?: boolean; + result: GetTraceAnnotationValuesResult; +}; + +export type TraceSession = { + /** + * Id + */ + readonly id?: string; + /** + * Project + */ + project: string; + /** + * Bookmarked + */ + bookmarked?: boolean; + /** + * Name + */ + name?: string | null; + /** + * Created at + */ + readonly created_at?: string; +}; + +export type TraceSessionGraphDataRequest = { + /** + * Project id + */ + project_id: string; + filters?: Array<{ + /** + * Column or attribute id to filter on. + */ + column_id: string; + /** + * Optional UI label for chips and saved views. + */ + display_name?: string; + /** + * Optional source surface for mixed-source filters, for example traces, datasets, or simulation. + */ + source?: string; + /** + * Optional metric output type metadata used by eval and annotation filters. + */ + output_type?: string; + filter_config: { + /** + * Canonical field type, for example text, number, boolean, datetime, categorical, thumbs, annotator, or array. + */ + filter_type: string; + /** + * Canonical operator from api_contracts/filter_contract.json, for example equals, not_equals, in, not_in, between, not_between, is_null, or is_not_null. + */ + filter_op: string; + /** + * Scalar, list, range tuple, boolean, or null depending on filter_op and filter_type. + */ + filter_value?: unknown; + /** + * Column family such as SYSTEM_METRIC, SPAN_ATTRIBUTE, EVAL_METRIC, ANNOTATION, or NORMAL. + */ + col_type?: string; + }; + }>; + /** + * Interval + */ + interval?: 'hour' | 'day' | 'week' | 'month'; + /** + * Property + */ + property?: string; + /** + * Req data config + */ + req_data_config: { + id: string; + type: 'SYSTEM_METRIC' | 'EVAL' | 'ANNOTATION'; + output_type?: string; + eval_output_type?: string; + choices?: Array; + value?: unknown; + filter_op?: string; + filter_value?: unknown; + }; +}; + +export type Trace = { + /** + * Id + */ + readonly id?: string; + /** + * Project + */ + project: string; + /** + * Project version + */ + project_version?: string; + /** + * Name + */ + name?: string | null; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Input + */ + input?: { + [key: string]: unknown; + }; + /** + * Output + */ + output?: { + [key: string]: unknown; + }; + /** + * Error + */ + error?: { + [key: string]: unknown; + }; + /** + * Session + */ + session?: string; + /** + * External id + */ + external_id?: string | null; + /** + * Tags + */ + tags?: { + [key: string]: unknown; + }; +}; + +export type TraceTagsUpdate = { + tags: Array; +}; + +export type UserAlertMonitorLog = { + /** + * Id + */ + readonly id?: string; + resolved_by?: User; + /** + * Created at + */ + readonly created_at?: string; + /** + * Type + */ + type: 'critical' | 'warning'; + /** + * Message + */ + message: string; + /** + * Resolved + */ + resolved?: boolean; + /** + * Resolved at + */ + resolved_at?: string | null; + /** + * Link + */ + link?: string | null; + /** + * Time window start + */ + time_window_start?: string | null; + /** + * Time window end + */ + time_window_end?: string | null; +}; + +export type UserAlertMonitor = { + /** + * Id + */ + readonly id?: string; + /** + * Project + */ + project: string; + /** + * Name + */ + name: string; + /** + * Metric name + */ + readonly metric_name?: string; + /** + * Created at + */ + readonly created_at?: string; + /** + * Updated at + */ + readonly updated_at?: string; + /** + * Deleted + */ + deleted?: boolean; + /** + * Deleted at + */ + deleted_at?: string | null; + /** + * Metric type + */ + metric_type: 'count_of_errors' | 'error_rates_for_function_calling' | 'error_free_session_rates' | 'service_provider_error_rates' | 'llm_api_failure_rates' | 'span_response_time' | 'llm_response_time' | 'token_usage' | 'daily_tokens_spent' | 'monthly_tokens_spent' | 'evaluation_metrics'; + /** + * Metric + * + * Id of the evaluation template. + */ + metric?: string | null; + /** + * Threshold operator + */ + threshold_operator: 'greater_than' | 'less_than'; + /** + * Threshold type + * + * Method to set the threshold for the monitor (Static or Percentage change). + */ + threshold_type?: 'static' | 'percentage_change'; + /** + * Threshold metric value + * + * For choice and pass/fail evals, the specific metric value to monitor. + */ + threshold_metric_value?: string | null; + /** + * Critical threshold value + */ + critical_threshold_value?: number | null; + /** + * Warning threshold value + */ + warning_threshold_value?: number | null; + /** + * Alert frequency + * + * Frequency of alert checks in minutes. + */ + alert_frequency?: number; + /** + * Auto threshold time window + * + * For auto-thresholding. The time window in minutes to calculate the historical mean + */ + auto_threshold_time_window?: number; + /** + * Last checked at + * + * The last time the monitor was checked for alerts. + */ + last_checked_at?: string | null; + notification_emails?: Array; + /** + * Slack webhook url + */ + slack_webhook_url?: string | null; + /** + * Slack notes + */ + slack_notes?: string | null; + /** + * Is mute + */ + is_mute?: boolean; + /** + * Filters + */ + filters?: { + [key: string]: unknown; + }; + logs?: Array<{ + [key: string]: unknown; + }> | null; + /** + * Organization + */ + organization: string; + /** + * Workspace + */ + workspace?: string | null; + /** + * Created by + */ + created_by?: string | null; +}; + +export type UserAlertMonitorDuplicate = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; +}; + +export type UserAlertMonitorDuplicateResult = { + /** + * Id + */ + id: string; + /** + * Message + */ + message: string; +}; + +export type UserAlertMonitorDuplicateResponse = { + /** + * Status + */ + status?: boolean; + result: UserAlertMonitorDuplicateResult; +}; + +export type UserAlertMonitorMetricOption = { + /** + * Id + */ + readonly id?: string; + /** + * Name + */ + readonly name?: string; + /** + * Metric type + */ + readonly metric_type?: string; + /** + * Output type + */ + readonly output_type?: string; +}; + +export type UserAlertMonitorMetricOptionsResponse = { + /** + * Status + */ + status?: boolean; + readonly result?: Array; +}; + +export type UsersResult = { + table: Array<{ + [key: string]: unknown; + }>; + /** + * Total count + */ + total_count: number; + /** + * Total pages + */ + total_pages: number; +}; + +export type UsersResponse = { + /** + * Status + */ + status?: boolean; + result: UsersResult; +}; + +export type UserCodeExampleResponse = { + /** + * Status + */ + status?: boolean; + /** + * Result + */ + result: string; +}; + +export type TestExecutionStatusSummary = { + /** + * Run test id + */ + run_test_id: string; + /** + * Execution id + */ + execution_id: string; + /** + * Status + */ + status: string; + /** + * Total scenarios + */ + total_scenarios: number; + /** + * Total calls + */ + total_calls: number; + /** + * Completed calls + */ + completed_calls: number; + /** + * Failed calls + */ + failed_calls: number; + /** + * Success rate + */ + success_rate: number; + /** + * Start time + */ + start_time: string; + /** + * End time + */ + end_time: string | null; + scenarios: Array<{ + [key: string]: string | null; + }>; + /** + * Error + */ + error: string | null; +}; + +export type QueueLabelNestedWritable = { + /** + * Label id + */ + label_id: string; + /** + * Required + */ + required?: boolean; + /** + * Order + */ + order?: number; +}; + +export type QueueAnnotatorNestedWritable = { + /** + * User id + */ + user_id: string; + /** + * Role + */ + role?: string; +}; + +export type AnnotationQueueWritable = { + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Instructions + */ + instructions?: string | null; + /** + * Assignment strategy + */ + assignment_strategy?: 'manual' | 'round_robin' | 'load_balanced'; + /** + * Annotations required + */ + annotations_required?: number; + /** + * Reservation timeout minutes + */ + reservation_timeout_minutes?: number; + /** + * Requires review + */ + requires_review?: boolean; + /** + * Auto assign + * + * When enabled, all queue members can annotate any item without explicit assignment. + */ + auto_assign?: boolean; + label_ids?: Array; + annotator_ids?: Array; + /** + * Annotator roles + */ + annotator_roles?: { + [key: string]: { + [key: string]: unknown; + }; + }; +}; + +export type EmptyRequestWritable = { + [key: string]: never; +}; + +export type QueueStatusResponseWritable = { + /** + * Status + */ + status?: boolean; + result: AnnotationQueueWritable; +}; + +export type AutomationRuleWritable = { + /** + * Name + */ + name: string; + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + conditions?: AutomationRuleConditions; + /** + * Enabled + */ + enabled?: boolean; + /** + * Trigger frequency + */ + trigger_frequency?: 'manual' | 'hourly' | 'daily' | 'weekly' | 'monthly'; +}; + +export type QueueItemWritable = { + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + /** + * Source id + */ + source_id?: string; + /** + * Status + */ + status?: 'pending' | 'in_progress' | 'completed' | 'skipped'; + /** + * Priority + */ + priority?: number; + /** + * Order + */ + order?: number; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Assigned to + */ + assigned_to?: string | null; + /** + * Reserved by + */ + reserved_by?: string | null; + /** + * Reservation expires at + */ + reservation_expires_at?: string | null; + /** + * Review status + */ + review_status?: string | null; + /** + * Reviewed by + */ + reviewed_by?: string | null; + /** + * Reviewed at + */ + reviewed_at?: string | null; + /** + * Review notes + */ + review_notes?: string | null; +}; + +export type ScoreWritable = { + /** + * Source type + */ + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + /** + * Value + */ + value: { + [key: string]: unknown; + }; + /** + * Score source + */ + score_source?: 'human' | 'api' | 'auto' | 'imported'; + /** + * Notes + */ + notes?: string | null; +}; + +export type QueueItemAnnotationsResponseWritable = { + /** + * Status + */ + status?: boolean; + result: Array; +}; + +export type OrganizationWritable = { + /** + * Name + */ + name: string; + /** + * Display name + */ + display_name?: string; + /** + * Is new + */ + is_new?: boolean; + /** + * Ws enabled + */ + ws_enabled?: boolean; + /** + * Region + */ + region?: string; + /** + * Require 2fa + */ + require_2fa?: boolean; + /** + * Require 2fa grace period days + */ + require_2fa_grace_period_days?: number; + /** + * Require 2fa enforced at + */ + require_2fa_enforced_at?: string | null; +}; + +export type UserWritable = { + /** + * Email + */ + email: string; + /** + * Name + */ + name: string; + /** + * Organization role + */ + organization_role?: 'Owner' | 'Admin' | 'Member' | 'Viewer' | 'workspace_admin' | 'workspace_member' | 'workspace_viewer'; + organization?: OrganizationWritable; + /** + * Role + * + * User's job role (e.g., Data Scientist, ML Engineer, or custom role) + */ + role?: string | null; + /** + * Goals + * + * List of user's goals for using the platform + */ + goals?: { + [key: string]: unknown; + }; +}; + +export type AnnotationsLabelsWritable = { + /** + * Name + */ + name: string; + /** + * Type + */ + type: 'text' | 'numeric' | 'categorical' | 'star' | 'thumbs_up_down'; + /** + * Settings + */ + settings?: { + [key: string]: unknown; + }; + /** + * Project + */ + project?: string; + /** + * Description + */ + description?: string | null; + /** + * Allow notes + */ + allow_notes?: boolean; +}; + +export type AnnotationLabelRestoreResponseWritable = { + /** + * Status + */ + status?: boolean; + result: AnnotationsLabelsWritable; +}; + +export type ApiKeyWritable = { + /** + * Provider + */ + provider: string; + /** + * Key + */ + key?: string | null; + /** + * Config json + */ + config_json?: { + [key: string]: unknown; + }; +}; + +export type ModelHubEmptyRequestWritable = { + [key: string]: unknown; +}; + +export type AddRowsFromFileRequestWritable = { + /** + * Dataset id + */ + dataset_id: string; + /** + * Model type + */ + model_type?: string; +}; + +export type DatasetWritable = { + /** + * Name + */ + name: string; + /** + * Organization + */ + organization: string; + /** + * Model type + */ + model_type?: 'Numeric' | 'ScoreCategorical' | 'Ranking' | 'BinaryClassification' | 'Regression' | 'ObjectDetection' | 'Segmentation' | 'GenerativeLLM' | 'GenerativeImage' | 'GenerativeVideo' | 'TTS' | 'STT' | 'MultiModal'; + /** + * Source + */ + source?: 'demo' | 'build' | 'sdk' | 'observe' | 'knowledge_base' | 'scenario' | 'experiment_snapshot' | 'graph'; + /** + * User + */ + user?: string | null; +}; + +export type DatasetSdkRowsResultWritable = { + /** + * Api keys + */ + api_keys: { + [key: string]: unknown; + }; + dataset: DatasetWritable; + code: DatasetSdkRowsCode; +}; + +export type DatasetSdkRowsResponseWritable = { + /** + * Status + */ + status: boolean; + result: DatasetSdkRowsResultWritable; +}; + +export type CreateDatasetFromLocalFileRequestWritable = { + /** + * New dataset name + */ + new_dataset_name?: string; + /** + * Model type + */ + model_type?: string; + /** + * Source + */ + source?: string; +}; + +export type SyntheticDatasetCreateStartedResultWritable = { + /** + * Message + */ + message: string; + data: DatasetWritable; +}; + +export type SyntheticDatasetCreateStartedResponseWritable = { + /** + * Status + */ + status: boolean; + result: SyntheticDatasetCreateStartedResultWritable; +}; + +export type ColumnWritable = { + /** + * Name + */ + name: string; + /** + * Data type + */ + data_type: 'text' | 'boolean' | 'integer' | 'float' | 'json' | 'array' | 'image' | 'images' | 'datetime' | 'audio' | 'document' | 'others' | 'persona'; + /** + * Dataset + */ + dataset?: string | null; + /** + * Source + */ + source: 'evaluation' | 'evaluation_tags' | 'evaluation_reason' | 'run_prompt' | 'experiment' | 'optimisation' | 'experiment_evaluation' | 'experiment_evaluation_tags' | 'optimisation_evaluation' | 'annotation_label' | 'optimisation_evaluation_tags' | 'extracted_json' | 'classification' | 'extracted_entities' | 'api_call' | 'python_code' | 'vector_db' | 'conditional' | 'eval_playground' | 'OTHERS'; + /** + * Source id + */ + source_id?: string | null; +}; + +export type DatasetColumnsMutationResultWritable = { + /** + * Message + */ + message: string; + data?: Array; +}; + +export type DatasetColumnsMutationResponseWritable = { + /** + * Status + */ + status: boolean; + result: DatasetColumnsMutationResultWritable; +}; + +export type GroundTruthUploadRequestWritable = { + /** + * Name + */ + name?: string; + /** + * Description + */ + description?: string; + /** + * File name + */ + file_name?: string; + columns?: Array; + data?: Array<{ + [key: string]: unknown; + }>; + /** + * Variable mapping + */ + variable_mapping?: { + [key: string]: unknown; + }; + /** + * Role mapping + */ + role_mapping?: { + [key: string]: unknown; + }; +}; + +export type ExperimentListV2Writable = { + /** + * Name + */ + name: string; + /** + * Status + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; + /** + * Experiment type + * + * Determines how the experiment executes: llm, tts, stt, or image. + */ + experiment_type?: 'llm' | 'tts' | 'stt' | 'image'; + /** + * Dataset + */ + dataset: string; +}; + +export type ExperimentDetailV2Writable = { + /** + * Name + */ + name: string; + /** + * Experiment type + * + * Determines how the experiment executes: llm, tts, stt, or image. + */ + experiment_type?: 'llm' | 'tts' | 'stt' | 'image'; + /** + * Status + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; +}; + +export type ExperimentV2DetailResponseWritable = { + /** + * Status + */ + status: boolean; + result: ExperimentDetailV2Writable; +}; + +export type FeedbackWritable = { + /** + * Source id + */ + source_id: string; + /** + * Source + */ + source: 'dataset' | 'prompt' | 'sdk' | 'trace' | 'experiment' | 'observe' | 'eval_playground'; + /** + * User eval metric + */ + user_eval_metric?: string | null; + /** + * Value + */ + value: string; + /** + * Explanation + */ + explanation?: string | null; + /** + * Row id + */ + row_id?: string | null; + /** + * Custom eval config id + */ + custom_eval_config_id?: string | null; + /** + * Feedback improvement + */ + feedback_improvement?: string | null; + /** + * Action type + */ + action_type?: string | null; +}; + +export type PromptHistoryExecutionWritable = { + /** + * Template version + */ + template_version: string; + /** + * Original template + */ + original_template?: string | null; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Evaluation results + */ + evaluation_results?: { + [key: string]: unknown; + }; + /** + * Evaluation configs + */ + evaluation_configs?: { + [key: string]: unknown; + }; + /** + * Is default + */ + is_default?: boolean; + /** + * Commit message + */ + commit_message?: string | null; + /** + * Is draft + */ + is_draft?: boolean; + /** + * Placeholders + */ + placeholders?: { + [key: string]: unknown; + }; + /** + * Prompt base template + */ + prompt_base_template?: string | null; +}; + +export type PromptLabelWritable = { + /** + * Name + */ + name: string; + /** + * Type + */ + type: 'system' | 'custom'; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; +}; + +export type PromptTemplateWritable = { + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Variable names + */ + variable_names?: { + [key: string]: unknown; + }; + /** + * Organization + */ + organization?: string | null; + /** + * Prompt folder + */ + prompt_folder?: string | null; + /** + * Placeholders + */ + placeholders?: { + [key: string]: unknown; + }; + /** + * Created by + */ + created_by?: string | null; +}; + +export type ScoreResponseWritable = { + /** + * Status + */ + status?: boolean; + result: ScoreWritable; +}; + +export type BulkCreateScoresResultWritable = { + scores: Array; + errors: Array; +}; + +export type BulkCreateScoresResponseWritable = { + /** + * Status + */ + status?: boolean; + result: BulkCreateScoresResultWritable; +}; + +export type ScoreForSourceResponseWritable = { + /** + * Status + */ + status?: boolean; + result: Array; + span_notes?: Array<{ + [key: string]: unknown; + }>; +}; + +export type ExecutionMetricsWritable = { + /** + * Execution id + */ + execution_id: string; +}; + +export type SdkSimulationMetricsResultWritable = { + /** + * Call execution id + */ + call_execution_id?: string; + /** + * Execution id + */ + execution_id?: string; + /** + * Status + */ + status?: string; + /** + * Duration seconds + */ + duration_seconds?: number | null; + /** + * Started at + */ + started_at?: string | null; + /** + * Completed at + */ + completed_at?: string | null; + /** + * Total calls + */ + total_calls?: number; + /** + * Completed calls + */ + completed_calls?: number; + /** + * Failed calls + */ + failed_calls?: number; + /** + * Latency + */ + latency?: { + [key: string]: unknown; + }; + /** + * Cost + */ + cost?: { + [key: string]: unknown; + }; + /** + * Conversation + */ + conversation?: { + [key: string]: unknown; + }; + /** + * Chat metrics + */ + chat_metrics?: { + [key: string]: unknown; + }; + /** + * Metrics + */ + metrics?: { + [key: string]: unknown; + }; + /** + * Total pages + */ + total_pages?: number; + /** + * Current page + */ + current_page?: number; + /** + * Count + */ + count?: number; + results?: Array; +}; + +export type SdkSimulationMetricsResponseWritable = { + /** + * Status + */ + status: boolean; + result: SdkSimulationMetricsResultWritable; +}; + +export type ExecutionRunsWritable = { + /** + * Execution id + */ + execution_id: string; +}; + +export type SdkSimulationRunsResultWritable = { + /** + * Call execution id + */ + call_execution_id?: string; + /** + * Execution id + */ + execution_id?: string; + /** + * Scenario id + */ + scenario_id?: string; + /** + * Scenario name + */ + scenario_name?: string; + /** + * Status + */ + status?: string; + /** + * Started at + */ + started_at?: string | null; + /** + * Completed at + */ + completed_at?: string | null; + /** + * Duration seconds + */ + duration_seconds?: number | null; + /** + * Ended reason + */ + ended_reason?: string | null; + /** + * Call summary + */ + call_summary?: string | null; + /** + * Total calls + */ + total_calls?: number; + /** + * Completed calls + */ + completed_calls?: number; + /** + * Failed calls + */ + failed_calls?: number; + /** + * Eval outputs + */ + eval_outputs?: { + [key: string]: unknown; + }; + eval_results?: Array<{ + [key: string]: unknown; + }>; + /** + * Latency + */ + latency?: { + [key: string]: unknown; + }; + /** + * Cost + */ + cost?: { + [key: string]: unknown; + }; + /** + * Call results + */ + call_results?: { + [key: string]: unknown; + }; + /** + * Eval explanation summary + */ + eval_explanation_summary?: { + [key: string]: unknown; + }; + /** + * Eval explanation summary status + */ + eval_explanation_summary_status?: string | null; + /** + * Total pages + */ + total_pages?: number; + /** + * Current page + */ + current_page?: number; + /** + * Count + */ + count?: number; + results?: Array; +}; + +export type SdkSimulationRunsResponseWritable = { + /** + * Status + */ + status: boolean; + result: SdkSimulationRunsResultWritable; +}; + +export type AgentDefinitionCreateResponseWritable = { + [key: string]: unknown; +}; + +export type AgentDefinitionEditResponseWritable = { + [key: string]: unknown; +}; + +export type AgentVersionCreateResponseWritable = { + [key: string]: unknown; +}; + +export type AgentVersionActivateResponseWritable = { + [key: string]: unknown; +}; + +export type CallExecutionWritable = { + /** + * Phone number + * + * Phone number called (null for TEXT/chat simulations) + */ + phone_number?: string | null; + /** + * Status + * + * Current status of the call + */ + status?: 'pending' | 'queued' | 'ongoing' | 'completed' | 'failed' | 'analyzing' | 'cancelled'; + /** + * Started at + * + * When the call started + */ + started_at?: string | null; + /** + * Completed at + * + * When the call completed + */ + completed_at?: string | null; + /** + * Duration seconds + * + * Duration of the call in seconds + */ + duration_seconds?: number | null; + /** + * Recording url + * + * URL to the call recording + */ + recording_url?: string | null; + /** + * Cost cents + * + * Cost of the call in cents + */ + cost_cents?: number | null; + /** + * Call metadata + * + * Additional metadata about the call + */ + call_metadata?: { + [key: string]: unknown; + }; + /** + * Error message + * + * Error message if the call failed + */ + error_message?: string | null; + /** + * Provider call data + * + * Complete call data from the provider. Format: dict[provider_name, data] where provider_name must be from SupportedProviders + */ + provider_call_data?: { + [key: string]: unknown; + }; + /** + * Stereo recording url + * + * Stereo recording URL from Vapi + */ + stereo_recording_url?: string | null; + /** + * Ended reason + * + * Reason why the call ended + */ + ended_reason?: string | null; + /** + * Stt cost cents + * + * STT cost in cents + */ + stt_cost_cents?: number | null; + /** + * Llm cost cents + * + * LLM cost in cents + */ + llm_cost_cents?: number | null; + /** + * Tts cost cents + * + * TTS cost in cents + */ + tts_cost_cents?: number | null; + /** + * Overall score + * + * Overall call performance score + */ + overall_score?: number | null; + /** + * Response time ms + * + * Average response time in milliseconds + */ + response_time_ms?: number | null; + /** + * Assistant id + * + * Assistant ID used for the call (system side) + */ + assistant_id?: string | null; + /** + * Customer number + * + * Customer phone number (E.164 format) + */ + customer_number?: string | null; + /** + * Call type + * + * Type of call (e.g., outboundPhoneCall) + */ + call_type?: string | null; + /** + * Ended at + * + * When the call ended + */ + ended_at?: string | null; + /** + * Analysis data + * + * Call analysis data from the service provider + */ + analysis_data?: { + [key: string]: unknown; + }; + /** + * Evaluation data + * + * Call evaluation data from the service provider + */ + evaluation_data?: { + [key: string]: unknown; + }; + /** + * Message count + * + * Number of messages in the call + */ + message_count?: number | null; + /** + * Transcript available + * + * Whether transcript is available + */ + transcript_available?: boolean; + /** + * Recording available + * + * Whether recording is available + */ + recording_available?: boolean; + /** + * Eval outputs + * + * Evaluation output + */ + eval_outputs?: { + [key: string]: unknown; + }; + /** + * Call summary + * + * Call summary from the service + */ + call_summary?: string | null; + /** + * Agent version + */ + agent_version?: string | null; + /** + * Customer cost cents + * + * Total customer-reported cost in cents + */ + customer_cost_cents?: number | null; + /** + * Customer call id + * + * Customer call ID if available + */ + customer_call_id?: string | null; + /** + * Simulation call type + * + * Type of simulation call + */ + simulation_call_type?: 'voice' | 'text'; +}; + +export type AgentVersionRestoreResponseWritable = { + [key: string]: unknown; +}; + +export type PersonaWritable = { + /** + * Name + * + * Name of the persona + */ + name: string; + /** + * Description + * + * Description of the persona + */ + description?: string | null; + /** + * Gender + * + * List of genders for the persona (e.g., ['male'], ['female']) + */ + gender?: { + [key: string]: unknown; + }; + /** + * Age group + * + * List of age groups for the persona (e.g., ['18-25'], ['25-32']) + */ + age_group?: { + [key: string]: unknown; + }; + /** + * Occupation + * + * List of occupations/professions for the persona (e.g., ['Engineer'], ['Teacher']) + */ + occupation?: { + [key: string]: unknown; + }; + /** + * Location + * + * List of locations for the persona (e.g., ['United States'], ['Canada']) + */ + location?: { + [key: string]: unknown; + }; + /** + * Personality + * + * List of personality types for the persona (e.g., ['Friendly and cooperative']) + */ + personality?: { + [key: string]: unknown; + }; + /** + * Communication style + * + * List of communication styles for the persona (e.g., ['Direct and concise']) + */ + communication_style?: { + [key: string]: unknown; + }; + /** + * Multilingual + * + * Whether the persona supports multiple languages + */ + multilingual?: boolean | null; + /** + * Languages + * + * List of languages the persona speaks (e.g., ['English', 'Hindi']) + */ + languages?: { + [key: string]: unknown; + }; + /** + * Accent + * + * List of accents for the persona (e.g., ['American'], ['Australian']) + */ + accent?: { + [key: string]: unknown; + }; + /** + * Conversation speed + * + * List of conversation speeds (e.g., ['1.0'], ['1.25']) + */ + conversation_speed?: { + [key: string]: unknown; + }; + /** + * Background sound + * + * Whether background sound is enabled (null=not specified, True/False for enabled/disabled) + */ + background_sound?: boolean | null; + /** + * Finished speaking sensitivity + * + * List of sensitivities for detecting when persona finished speaking (e.g., ['5'], ['6']) + */ + finished_speaking_sensitivity?: { + [key: string]: unknown; + }; + /** + * Interrupt sensitivity + * + * List of sensitivities for allowing interruptions (e.g., ['5'], ['6']) + */ + interrupt_sensitivity?: { + [key: string]: unknown; + }; + /** + * Keywords + * + * List of keywords/tags describing the persona (e.g., ['Knowledgeable', 'Patient', 'Helpful']) + */ + keywords?: { + [key: string]: unknown; + }; + /** + * Metadata + * + * Additional metadata for the persona (speech clarity, base emotion, etc.) + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Additional instruction + * + * Additional instructions for how this persona should behave + */ + additional_instruction?: string | null; + profession?: Array | null; + language?: Array | null; + /** + * Custom properties + */ + custom_properties?: { + [key: string]: unknown; + }; + /** + * Punctuation + * + * Punctuation style for the persona + */ + punctuation?: 'clean' | 'minimal' | 'expressive' | 'erratic'; + /** + * Slang usage + * + * Slang usage for the persona + */ + slang_usage?: 'none' | 'moderate' | 'heavy' | 'light'; + /** + * Typos frequency + * + * Typos frequency for the persona + */ + typos_frequency?: 'none' | 'rare' | 'occasional' | 'frequent'; + /** + * Regional mix + * + * Regional mix for the persona + */ + regional_mix?: 'none' | 'moderate' | 'heavy' | 'light'; + /** + * Emoji usage + * + * Emoji usage for the persona + */ + emoji_usage?: 'never' | 'light' | 'regular' | 'heavy'; + /** + * Tone + * + * Tone for the persona + */ + tone?: 'formal' | 'casual' | 'neutral'; + /** + * Verbosity + * + * Verbosity for the persona + */ + verbosity?: 'brief' | 'balanced' | 'detailed'; +}; + +export type PersonaDuplicateResponseWritable = { + /** + * Status + */ + status?: boolean; + result?: PersonaWritable; +}; + +export type SimulateEvalConfigResponseWritable = { + [key: string]: unknown; +}; + +export type RunTestResponseWritable = { + [key: string]: unknown; +}; + +export type TestExecutionWritable = { + /** + * Run test + * + * The run test being executed + */ + run_test: string; + /** + * Status + * + * Current status of the test execution + */ + status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'cancelling' | 'evaluating'; + /** + * Error reason + */ + error_reason?: string | null; + /** + * Started at + * + * When the test execution started + */ + started_at?: string; + /** + * Completed at + * + * When the test execution completed + */ + completed_at?: string | null; + /** + * Total scenarios + * + * Total number of scenarios in this execution + */ + total_scenarios?: number; + /** + * Total calls + * + * Total number of calls to be made + */ + total_calls?: number; + /** + * Completed calls + * + * Number of successfully completed calls + */ + completed_calls?: number; + /** + * Failed calls + * + * Number of failed calls + */ + failed_calls?: number; + /** + * Execution metadata + * + * Additional metadata about the execution + */ + execution_metadata?: { + [key: string]: unknown; + }; + /** + * Scenario ids + * + * List of scenario IDs that were executed in this run + */ + scenario_ids?: { + [key: string]: unknown; + }; +}; + +export type CallExecutionDetailWritable = { + /** + * Status + * + * Current status of the call + */ + status?: 'pending' | 'queued' | 'ongoing' | 'completed' | 'failed' | 'analyzing' | 'cancelled'; + /** + * Duration seconds + * + * Duration of the call in seconds + */ + duration_seconds?: number | null; + /** + * Response time ms + * + * Average response time in milliseconds + */ + response_time_ms?: number | null; + /** + * Ended reason + * + * Reason why the call ended + */ + ended_reason?: string | null; + /** + * Call summary + * + * Call summary from the service + */ + call_summary?: string | null; + /** + * Avg agent latency ms + * + * Average agent latency in milliseconds (time taken by agent to respond after user's pause) + */ + avg_agent_latency_ms?: number | null; + /** + * User interruption count + * + * Number of times user interrupted the AI + */ + user_interruption_count?: number | null; + /** + * User interruption rate + * + * Rate of user interruptions (interruptions per minute) + */ + user_interruption_rate?: number | null; + /** + * User wpm + * + * User's words per minute + */ + user_wpm?: number | null; + /** + * Bot wpm + * + * Bot's words per minute + */ + bot_wpm?: number | null; + /** + * Talk ratio + * + * Ratio of bot speaking time to user speaking time + */ + talk_ratio?: number | null; + /** + * Ai interruption count + * + * Number of times AI interrupted the user + */ + ai_interruption_count?: number | null; + /** + * Ai interruption rate + * + * Rate of AI interruptions (interruptions per minute) + */ + ai_interruption_rate?: number | null; + /** + * Tool outputs + * + * Tool evaluation output - separate from standard evaluations + */ + tool_outputs?: { + [key: string]: unknown; + }; + /** + * Cost cents + * + * Cost of the call in cents + */ + cost_cents?: number | null; + /** + * Customer cost cents + * + * Total customer-reported cost in cents + */ + customer_cost_cents?: number | null; + /** + * Customer cost breakdown + * + * Detailed cost breakdown from customer call data + */ + customer_cost_breakdown?: { + [key: string]: unknown; + }; + /** + * Customer latency metrics + * + * Latency metrics from customer call data + */ + customer_latency_metrics?: { + [key: string]: unknown; + }; + /** + * Customer call id + * + * Customer call ID if available + */ + customer_call_id?: string | null; + /** + * Simulation call type + * + * Type of simulation call + */ + simulation_call_type?: 'voice' | 'text'; + /** + * Phone number + * + * Phone number called (null for TEXT/chat simulations) + */ + phone_number?: string | null; +}; + +export type SessionComparisonResponseWritable = { + /** + * Status + */ + status?: boolean; +}; + +export type CallTranscriptWritable = { + /** + * Speaker role + * + * Role of the speaker (user or assistant) + */ + speaker_role?: 'user' | 'assistant' | 'system' | 'tool_calls' | 'tool_call_result' | 'unknown'; + /** + * Content + * + * Transcript content + */ + content: string; + /** + * Start time ms + * + * Start time of this transcript segment in milliseconds + */ + start_time_ms?: number; + /** + * End time ms + * + * End time of this transcript segment in milliseconds + */ + end_time_ms?: number; + /** + * Confidence score + * + * Confidence score for this transcript segment + */ + confidence_score?: number; +}; + +export type CallTranscriptResponseWritable = { + [key: string]: unknown; +}; + +export type PromptSimulationScenariosResponseWritable = { + /** + * Status + */ + status?: boolean; +}; + +export type PromptSimulationListResultWritable = { + [key: string]: unknown; +}; + +export type PromptSimulationListResponseWritable = { + /** + * Status + */ + status?: boolean; + result: PromptSimulationListResultWritable; +}; + +export type PromptSimulationRunResponseWritable = { + /** + * Status + */ + status?: boolean; + result: RunTestResponseWritable; +}; + +export type ExecutePromptSimulationResultWritable = { + scenario_ids: Array; +}; + +export type ExecutePromptSimulationResponseWritable = { + /** + * Status + */ + status?: boolean; + result: ExecutePromptSimulationResultWritable; +}; + +export type EvalConfigResponseWritable = { + /** + * Name + */ + name?: string | null; + /** + * Config + */ + config?: { + [key: string]: unknown; + }; + /** + * Mapping + */ + mapping?: { + [key: string]: unknown; + }; + /** + * Filters + */ + filters?: { + [key: string]: unknown; + }; + /** + * Error localizer + */ + error_localizer?: boolean; + /** + * Model + */ + model?: 'turing_large' | 'turing_small' | 'protect' | 'protect_flash' | 'turing_flash'; + /** + * Status + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; +}; + +export type AddEvalConfigsResponseWritable = { + /** + * Message + */ + message: string; + created_eval_configs: Array; + /** + * Run test id + */ + run_test_id: string; + /** + * Non-fatal issues encountered while processing individual configs. + */ + warnings?: Array; +}; + +export type EvalConfigStructureWritable = { + required_keys: Array; + optional_keys: Array; + variable_keys: Array; +}; + +export type EvalConfigStructureResultWritable = { + eval: EvalConfigStructureWritable; +}; + +export type EvalConfigStructureResponseWritable = { + /** + * Status + */ + status?: boolean; + result: EvalConfigStructureResultWritable; +}; + +export type ScenarioResponseWritable = { + /** + * Name + * + * Name of the scenario + */ + name: string; + /** + * Description + * + * Optional description of the scenario + */ + description?: string | null; + /** + * Source + * + * Source content or reference for the scenario + */ + source: string; + /** + * Scenario type + * + * Type of scenario (graph, script, or dataset) + */ + scenario_type?: 'graph' | 'script' | 'dataset'; + /** + * Source type + * + * Source type for the scenario: agent_definition or prompt + */ + source_type?: 'agent_definition' | 'prompt'; + /** + * Dataset + * + * Dataset associated with this scenario (only for dataset type scenarios) + */ + dataset?: string | null; + /** + * Prompt template + * + * Prompt template associated with this scenario (only for prompt source type) + */ + prompt_template?: string | null; + /** + * Prompt version + * + * Prompt version associated with this scenario (only for prompt source type) + */ + prompt_version?: string | null; + /** + * Status + * + * Status of the scenario + */ + status?: 'NotStarted' | 'Queued' | 'Running' | 'Completed' | 'Editing' | 'Inactive' | 'Failed' | 'PartialRun' | 'ExperimentEvaluation' | 'Uploading' | 'PartialExtracted' | 'Processing' | 'Deleting' | 'PartialCompleted' | 'OptimizationEvaluation' | 'Error' | 'Cancelled'; +}; + +export type ScenarioListResponseWritable = { + [key: string]: unknown; +}; + +export type ScenarioCreateResponseWritable = { + scenario?: ScenarioResponseWritable; +}; + +export type ScenarioEditResponseWritable = { + scenario?: ScenarioResponseWritable; +}; + +export type SimulatorAgentWritable = { + /** + * Name + * + * Name of the simulator agent + */ + name: string; + /** + * Prompt + * + * System prompt for the agent + */ + prompt: string; + /** + * Voice provider + * + * Voice service provider + */ + voice_provider: string; + /** + * Voice name + * + * Specific voice to use + */ + voice_name: string; + /** + * Interrupt sensitivity + * + * Sensitivity for interruption detection (0-1) + */ + interrupt_sensitivity?: number; + /** + * Conversation speed + * + * Speed of conversation (0.1-3.0) + */ + conversation_speed?: number; + /** + * Finished speaking sensitivity + * + * Sensitivity for detecting when speaker has finished (0-1) + */ + finished_speaking_sensitivity?: number; + /** + * Model + * + * LLM model to use + */ + model: string; + /** + * Llm temperature + * + * Temperature setting for LLM (0-2) + */ + llm_temperature?: number; + /** + * Max call duration in minutes + * + * Maximum call duration in minutes (1-180) + */ + max_call_duration_in_minutes?: number; + /** + * Initial message delay + * + * Delay before initial message in seconds (0-60) + */ + initial_message_delay?: number; + /** + * Initial message + * + * Initial message to send when conversation starts + */ + initial_message?: string; +}; + +export type SimulatorAgentListResponseWritable = { + [key: string]: unknown; +}; + +export type SimulatorAgentValidationErrorResponseWritable = { + [key: string]: Array; +}; + +export type TestExecutionColumnOrderResponseWritable = { + [key: string]: unknown; +}; + +export type EvalExplanationSummaryResultWritable = { + /** + * Response + */ + response: { + [key: string]: Array; + }; + /** + * Last updated + */ + last_updated: string | null; + /** + * Status + */ + status: string; +}; + +export type EvalExplanationSummaryResponseWritable = { + /** + * Status + */ + status?: boolean; + result: EvalExplanationSummaryResultWritable; +}; + +export type TestExecutionTranscriptCallWritable = { + [key: string]: unknown; +}; + +export type TestExecutionTranscriptsResponseWritable = { + [key: string]: unknown; +}; + +export type ProjectWritable = { + /** + * Model type + */ + model_type: 'Numeric' | 'ScoreCategorical' | 'Ranking' | 'BinaryClassification' | 'Regression' | 'ObjectDetection' | 'Segmentation' | 'GenerativeLLM' | 'GenerativeImage' | 'GenerativeVideo' | 'TTS' | 'STT' | 'MultiModal'; + /** + * Name + */ + name: string; + /** + * Trace type + */ + trace_type: 'experiment' | 'observe'; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Config + * + * Any valid JSON value. + */ + config?: { + [key: string]: unknown; + }; + /** + * Source + */ + source?: 'demo' | 'prototype' | 'simulator'; + /** + * Session config + * + * Any valid JSON value. + */ + session_config?: { + [key: string]: unknown; + }; + /** + * Tags + * + * Any valid JSON value. + */ + tags?: { + [key: string]: unknown; + }; +}; + +export type TraceSessionWritable = { + /** + * Project + */ + project: string; + /** + * Bookmarked + */ + bookmarked?: boolean; + /** + * Name + */ + name?: string | null; +}; + +export type TraceWritable = { + /** + * Project + */ + project: string; + /** + * Project version + */ + project_version?: string; + /** + * Name + */ + name?: string | null; + /** + * Metadata + */ + metadata?: { + [key: string]: unknown; + }; + /** + * Input + */ + input?: { + [key: string]: unknown; + }; + /** + * Output + */ + output?: { + [key: string]: unknown; + }; + /** + * Error + */ + error?: { + [key: string]: unknown; + }; + /** + * Session + */ + session?: string; + /** + * External id + */ + external_id?: string | null; + /** + * Tags + */ + tags?: { + [key: string]: unknown; + }; +}; + +export type UserAlertMonitorLogWritable = { + resolved_by?: UserWritable; + /** + * Type + */ + type: 'critical' | 'warning'; + /** + * Message + */ + message: string; + /** + * Resolved + */ + resolved?: boolean; + /** + * Resolved at + */ + resolved_at?: string | null; + /** + * Link + */ + link?: string | null; + /** + * Time window start + */ + time_window_start?: string | null; + /** + * Time window end + */ + time_window_end?: string | null; +}; + +export type UserAlertMonitorWritable = { + /** + * Project + */ + project: string; + /** + * Name + */ + name: string; + /** + * Deleted + */ + deleted?: boolean; + /** + * Deleted at + */ + deleted_at?: string | null; + /** + * Metric type + */ + metric_type: 'count_of_errors' | 'error_rates_for_function_calling' | 'error_free_session_rates' | 'service_provider_error_rates' | 'llm_api_failure_rates' | 'span_response_time' | 'llm_response_time' | 'token_usage' | 'daily_tokens_spent' | 'monthly_tokens_spent' | 'evaluation_metrics'; + /** + * Metric + * + * Id of the evaluation template. + */ + metric?: string | null; + /** + * Threshold operator + */ + threshold_operator: 'greater_than' | 'less_than'; + /** + * Threshold type + * + * Method to set the threshold for the monitor (Static or Percentage change). + */ + threshold_type?: 'static' | 'percentage_change'; + /** + * Threshold metric value + * + * For choice and pass/fail evals, the specific metric value to monitor. + */ + threshold_metric_value?: string | null; + /** + * Critical threshold value + */ + critical_threshold_value?: number | null; + /** + * Warning threshold value + */ + warning_threshold_value?: number | null; + /** + * Alert frequency + * + * Frequency of alert checks in minutes. + */ + alert_frequency?: number; + /** + * Auto threshold time window + * + * For auto-thresholding. The time window in minutes to calculate the historical mean + */ + auto_threshold_time_window?: number; + /** + * Last checked at + * + * The last time the monitor was checked for alerts. + */ + last_checked_at?: string | null; + notification_emails?: Array; + /** + * Slack webhook url + */ + slack_webhook_url?: string | null; + /** + * Slack notes + */ + slack_notes?: string | null; + /** + * Is mute + */ + is_mute?: boolean; + /** + * Filters + */ + filters?: { + [key: string]: unknown; + }; + logs?: Array<{ + [key: string]: unknown; + }> | null; + /** + * Organization + */ + organization: string; + /** + * Workspace + */ + workspace?: string | null; + /** + * Created by + */ + created_by?: string | null; +}; + +export type UserAlertMonitorMetricOptionsResponseWritable = { + /** + * Status + */ + status?: boolean; +}; + +export type AnnotationQueue2 = AnnotationQueueWritable; + +export type SimulatorAgent2 = SimulatorAgentWritable; + +export type MemberRemove2 = MemberRemove; + +export type QueueItemNavigationRequest2 = QueueItemNavigationRequest; + +export type ObserveGraphDataRequest2 = ObserveGraphDataRequest; + +export type UserAlertMonitorLog2 = UserAlertMonitorLogWritable; + +export type PromptLabel2 = PromptLabelWritable; + +export type PromptTemplate2 = PromptTemplateWritable; + +export type Score2 = ScoreWritable; + +export type DatasetRowDiffRequest2 = DatasetRowDiffRequest; + +export type CompareDataset2 = CompareDataset; + +export type PersonaDuplicateRequest2 = PersonaDuplicateRequest; + +export type ApiKey2 = ApiKeyWritable; + +export type UserAlertMonitor2 = UserAlertMonitorWritable; + +export type EmptyRequest2 = EmptyRequestWritable; + +export type LegacyKnowledgeBaseMutationRequest2 = LegacyKnowledgeBaseMutationRequest; + +export type AutomationRule2 = AutomationRuleWritable; + +export type QueueItem2 = QueueItemWritable; + +export type Feedback2 = FeedbackWritable; + +export type TraceSession2 = TraceSessionWritable; + +export type QueueLabelRequest2 = QueueLabelRequest; + +export type DiscussionThreadStatusRequest2 = DiscussionThreadStatusRequest; + +export type AnnotationsLabels2 = AnnotationsLabelsWritable; + +export type ModelHubEmptyRequest2 = ModelHubEmptyRequestWritable; + +export type UserEvalMutationRequest2 = UserEvalMutationRequest; + +export type ExperimentRerunRequest2 = ExperimentRerunRequest; + +export type ExperimentComparisonWeightsRequest2 = ExperimentComparisonWeightsRequest; + +export type Persona2 = PersonaWritable; + +export type GetTraceAnnotation2 = GetTraceAnnotation; + +export type Trace2 = TraceWritable; + +export type ListOrganizationMembersData = { + body?: never; + path?: never; + query?: { + page?: number; + limit?: number; + search?: string; + filter_status?: Array<'Active' | 'Pending' | 'Expired' | 'Deactivated'>; + filter_role?: Array; + sort?: 'name' | '-name' | 'email' | '-email' | 'status' | '-status' | 'type' | '-type' | 'date_joined' | '-date_joined' | 'created_at' | '-created_at' | 'org_level' | '-org_level'; + }; + url: '/accounts/organization/members/'; +}; + +export type ListOrganizationMembersErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListOrganizationMembersError = ListOrganizationMembersErrors[keyof ListOrganizationMembersErrors]; + +export type ListOrganizationMembersResponses = { + /** + * Response + */ + 200: MemberListResponse; +}; + +export type ListOrganizationMembersResponse = ListOrganizationMembersResponses[keyof ListOrganizationMembersResponses]; + +export type AccountsOrganizationMembersReactivateCreateData = { + body: MemberRemove2; + path?: never; + query?: never; + url: '/accounts/organization/members/reactivate/'; +}; + +export type AccountsOrganizationMembersReactivateCreateErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AccountsOrganizationMembersReactivateCreateError = AccountsOrganizationMembersReactivateCreateErrors[keyof AccountsOrganizationMembersReactivateCreateErrors]; + +export type AccountsOrganizationMembersReactivateCreateResponses = { + /** + * Response + */ + 200: MemberUserMutationResponse; +}; + +export type AccountsOrganizationMembersReactivateCreateResponse = AccountsOrganizationMembersReactivateCreateResponses[keyof AccountsOrganizationMembersReactivateCreateResponses]; + +export type AccountsOrganizationMembersRemoveDeleteData = { + body: MemberRemove2; + path?: never; + query?: never; + url: '/accounts/organization/members/remove/'; +}; + +export type AccountsOrganizationMembersRemoveDeleteErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AccountsOrganizationMembersRemoveDeleteError = AccountsOrganizationMembersRemoveDeleteErrors[keyof AccountsOrganizationMembersRemoveDeleteErrors]; + +export type AccountsOrganizationMembersRemoveDeleteResponses = { + /** + * Response + */ + 200: MemberUserMutationResponse; +}; + +export type AccountsOrganizationMembersRemoveDeleteResponse = AccountsOrganizationMembersRemoveDeleteResponses[keyof AccountsOrganizationMembersRemoveDeleteResponses]; + +export type AccountsOrganizationMembersRoleCreateData = { + body: MemberRoleUpdate; + path?: never; + query?: never; + url: '/accounts/organization/members/role/'; +}; + +export type AccountsOrganizationMembersRoleCreateErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AccountsOrganizationMembersRoleCreateError = AccountsOrganizationMembersRoleCreateErrors[keyof AccountsOrganizationMembersRoleCreateErrors]; + +export type AccountsOrganizationMembersRoleCreateResponses = { + /** + * Response + */ + 200: MemberRoleUpdateResponse; +}; + +export type AccountsOrganizationMembersRoleCreateResponse = AccountsOrganizationMembersRoleCreateResponses[keyof AccountsOrganizationMembersRoleCreateResponses]; + +export type GetCurrentUserData = { + body?: never; + path?: never; + query?: never; + url: '/accounts/user-info/'; +}; + +export type GetCurrentUserErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserErrors]; + +export type GetCurrentUserResponses = { + /** + * Response + */ + 200: UserInfoResponse; +}; + +export type GetCurrentUserResponse = GetCurrentUserResponses[keyof GetCurrentUserResponses]; + +export type ListWorkspacesData = { + body?: never; + path?: never; + query?: { + page?: number; + limit?: number; + search?: string; + sort?: string; + }; + url: '/accounts/workspace/list/'; +}; + +export type ListWorkspacesErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListWorkspacesError = ListWorkspacesErrors[keyof ListWorkspacesErrors]; + +export type ListWorkspacesResponses = { + /** + * Response + */ + 200: WorkspaceListPaginatedResponse; +}; + +export type ListWorkspacesResponse = ListWorkspacesResponses[keyof ListWorkspacesResponses]; + +export type SwitchWorkspaceData = { + body: SwitchWorkspace; + path?: never; + query?: never; + url: '/accounts/workspace/switch/'; +}; + +export type SwitchWorkspaceErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SwitchWorkspaceError = SwitchWorkspaceErrors[keyof SwitchWorkspaceErrors]; + +export type SwitchWorkspaceResponses = { + /** + * Response + */ + 200: SwitchWorkspaceResponse; +}; + +export type SwitchWorkspaceResponse2 = SwitchWorkspaceResponses[keyof SwitchWorkspaceResponses]; + +export type ListWorkspaceMembersData = { + body?: never; + path: { + workspace_id: string; + }; + query?: { + page?: number; + limit?: number; + search?: string; + filter_status?: Array<'Active' | 'Pending' | 'Expired'>; + filter_role?: Array; + sort?: 'name' | '-name' | 'email' | '-email' | 'status' | '-status' | 'type' | '-type' | 'date_joined' | '-date_joined' | 'created_at' | '-created_at' | 'ws_level' | '-ws_level'; + }; + url: '/accounts/workspace/{workspace_id}/members/'; +}; + +export type ListWorkspaceMembersErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListWorkspaceMembersError = ListWorkspaceMembersErrors[keyof ListWorkspaceMembersErrors]; + +export type ListWorkspaceMembersResponses = { + /** + * Response + */ + 200: MemberListResponse; +}; + +export type ListWorkspaceMembersResponse = ListWorkspaceMembersResponses[keyof ListWorkspaceMembersResponses]; + +export type AccountsWorkspaceMembersRemoveDeleteData = { + body: WorkspaceMemberRemove; + path: { + workspace_id: string; + }; + query?: never; + url: '/accounts/workspace/{workspace_id}/members/remove/'; +}; + +export type AccountsWorkspaceMembersRemoveDeleteErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AccountsWorkspaceMembersRemoveDeleteError = AccountsWorkspaceMembersRemoveDeleteErrors[keyof AccountsWorkspaceMembersRemoveDeleteErrors]; + +export type AccountsWorkspaceMembersRemoveDeleteResponses = { + /** + * Response + */ + 200: MemberUserMutationResponse; +}; + +export type AccountsWorkspaceMembersRemoveDeleteResponse = AccountsWorkspaceMembersRemoveDeleteResponses[keyof AccountsWorkspaceMembersRemoveDeleteResponses]; + +export type AccountsWorkspaceMembersRoleCreateData = { + body: WorkspaceMemberRoleUpdate; + path: { + workspace_id: string; + }; + query?: never; + url: '/accounts/workspace/{workspace_id}/members/role/'; +}; + +export type AccountsWorkspaceMembersRoleCreateErrors = { + /** + * Response + */ + 400: AccountsErrorResponse; + /** + * Response + */ + 401: AccountsErrorResponse; + /** + * Response + */ + 403: AccountsErrorResponse; + /** + * Response + */ + 404: AccountsErrorResponse; + /** + * Response + */ + 500: AccountsErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AccountsWorkspaceMembersRoleCreateError = AccountsWorkspaceMembersRoleCreateErrors[keyof AccountsWorkspaceMembersRoleCreateErrors]; + +export type AccountsWorkspaceMembersRoleCreateResponses = { + /** + * Response + */ + 200: WorkspaceMemberRoleUpdateResponse; +}; + +export type AccountsWorkspaceMembersRoleCreateResponse = AccountsWorkspaceMembersRoleCreateResponses[keyof AccountsWorkspaceMembersRoleCreateResponses]; + +export type ListAnnotationQueuesData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + status?: string; + search?: string; + include_counts?: boolean; + }; + url: '/model-hub/annotation-queues/'; +}; + +export type ListAnnotationQueuesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAnnotationQueuesError = ListAnnotationQueuesErrors[keyof ListAnnotationQueuesErrors]; + +export type ListAnnotationQueuesResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListAnnotationQueuesResponse = ListAnnotationQueuesResponses[keyof ListAnnotationQueuesResponses]; + +export type CreateAnnotationQueueData = { + body: AnnotationQueue2; + path?: never; + query?: never; + url: '/model-hub/annotation-queues/'; +}; + +export type CreateAnnotationQueueErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateAnnotationQueueError = CreateAnnotationQueueErrors[keyof CreateAnnotationQueueErrors]; + +export type CreateAnnotationQueueResponses = { + /** + * Response + */ + 201: AnnotationQueue; +}; + +export type CreateAnnotationQueueResponse = CreateAnnotationQueueResponses[keyof CreateAnnotationQueueResponses]; + +export type ModelHubAnnotationQueuesForSourceData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + source_type?: 'call_execution' | 'dataset_row' | 'observation_span' | 'prototype_run' | 'trace' | 'trace_session'; + source_id?: string; + sources?: string; + }; + url: '/model-hub/annotation-queues/for-source/'; +}; + +export type ModelHubAnnotationQueuesForSourceErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesForSourceError = ModelHubAnnotationQueuesForSourceErrors[keyof ModelHubAnnotationQueuesForSourceErrors]; + +export type ModelHubAnnotationQueuesForSourceResponses = { + /** + * Response + */ + 200: QueueForSourceResponse; +}; + +export type ModelHubAnnotationQueuesForSourceResponse = ModelHubAnnotationQueuesForSourceResponses[keyof ModelHubAnnotationQueuesForSourceResponses]; + +export type ModelHubAnnotationQueuesGetOrCreateDefaultData = { + body: QueueDefaultRequest; + path?: never; + query?: never; + url: '/model-hub/annotation-queues/get-or-create-default/'; +}; + +export type ModelHubAnnotationQueuesGetOrCreateDefaultErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesGetOrCreateDefaultError = ModelHubAnnotationQueuesGetOrCreateDefaultErrors[keyof ModelHubAnnotationQueuesGetOrCreateDefaultErrors]; + +export type ModelHubAnnotationQueuesGetOrCreateDefaultResponses = { + /** + * Response + */ + 200: QueueDefaultResponse; +}; + +export type ModelHubAnnotationQueuesGetOrCreateDefaultResponse = ModelHubAnnotationQueuesGetOrCreateDefaultResponses[keyof ModelHubAnnotationQueuesGetOrCreateDefaultResponses]; + +export type ArchiveAnnotationQueueData = { + body?: never; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/'; +}; + +export type ArchiveAnnotationQueueErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ArchiveAnnotationQueueError = ArchiveAnnotationQueueErrors[keyof ArchiveAnnotationQueueErrors]; + +export type ArchiveAnnotationQueueResponses = { + /** + * Response + */ + 204: void; +}; + +export type ArchiveAnnotationQueueResponse = ArchiveAnnotationQueueResponses[keyof ArchiveAnnotationQueueResponses]; + +export type GetAnnotationQueueData = { + body?: never; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/'; +}; + +export type GetAnnotationQueueErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAnnotationQueueError = GetAnnotationQueueErrors[keyof GetAnnotationQueueErrors]; + +export type GetAnnotationQueueResponses = { + /** + * Response + */ + 200: AnnotationQueue; +}; + +export type GetAnnotationQueueResponse = GetAnnotationQueueResponses[keyof GetAnnotationQueueResponses]; + +export type UpdateAnnotationQueueData = { + body: AnnotationQueue2; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/'; +}; + +export type UpdateAnnotationQueueErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateAnnotationQueueError = UpdateAnnotationQueueErrors[keyof UpdateAnnotationQueueErrors]; + +export type UpdateAnnotationQueueResponses = { + /** + * Response + */ + 200: AnnotationQueue; +}; + +export type UpdateAnnotationQueueResponse = UpdateAnnotationQueueResponses[keyof UpdateAnnotationQueueResponses]; + +export type ModelHubAnnotationQueuesUpdateData = { + body: AnnotationQueue2; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/'; +}; + +export type ModelHubAnnotationQueuesUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesUpdateError = ModelHubAnnotationQueuesUpdateErrors[keyof ModelHubAnnotationQueuesUpdateErrors]; + +export type ModelHubAnnotationQueuesUpdateResponses = { + /** + * Response + */ + 200: AnnotationQueue; +}; + +export type ModelHubAnnotationQueuesUpdateResponse = ModelHubAnnotationQueuesUpdateResponses[keyof ModelHubAnnotationQueuesUpdateResponses]; + +export type AddAnnotationQueueLabelData = { + body: QueueLabelRequest2; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/add-label/'; +}; + +export type AddAnnotationQueueLabelErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AddAnnotationQueueLabelError = AddAnnotationQueueLabelErrors[keyof AddAnnotationQueueLabelErrors]; + +export type AddAnnotationQueueLabelResponses = { + /** + * Response + */ + 200: QueueAddLabelResponse; +}; + +export type AddAnnotationQueueLabelResponse = AddAnnotationQueueLabelResponses[keyof AddAnnotationQueueLabelResponses]; + +export type GetAnnotationQueueAgreementData = { + body?: never; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/agreement/'; +}; + +export type GetAnnotationQueueAgreementErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAnnotationQueueAgreementError = GetAnnotationQueueAgreementErrors[keyof GetAnnotationQueueAgreementErrors]; + +export type GetAnnotationQueueAgreementResponses = { + /** + * Response + */ + 200: QueueAgreementResponse; +}; + +export type GetAnnotationQueueAgreementResponse = GetAnnotationQueueAgreementResponses[keyof GetAnnotationQueueAgreementResponses]; + +export type GetAnnotationQueueAnalyticsData = { + body?: never; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/analytics/'; +}; + +export type GetAnnotationQueueAnalyticsErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAnnotationQueueAnalyticsError = GetAnnotationQueueAnalyticsErrors[keyof GetAnnotationQueueAnalyticsErrors]; + +export type GetAnnotationQueueAnalyticsResponses = { + /** + * Response + */ + 200: QueueAnalyticsResponse; +}; + +export type GetAnnotationQueueAnalyticsResponse = GetAnnotationQueueAnalyticsResponses[keyof GetAnnotationQueueAnalyticsResponses]; + +export type ListAnnotationQueueExportFieldsData = { + body?: never; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/export-fields/'; +}; + +export type ListAnnotationQueueExportFieldsErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAnnotationQueueExportFieldsError = ListAnnotationQueueExportFieldsErrors[keyof ListAnnotationQueueExportFieldsErrors]; + +export type ListAnnotationQueueExportFieldsResponses = { + /** + * Response + */ + 200: QueueExportFieldsResponse; +}; + +export type ListAnnotationQueueExportFieldsResponse = ListAnnotationQueueExportFieldsResponses[keyof ListAnnotationQueueExportFieldsResponses]; + +export type ExportAnnotationQueueToDatasetData = { + body: QueueExportToDatasetRequest; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/export-to-dataset/'; +}; + +export type ExportAnnotationQueueToDatasetErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ExportAnnotationQueueToDatasetError = ExportAnnotationQueueToDatasetErrors[keyof ExportAnnotationQueueToDatasetErrors]; + +export type ExportAnnotationQueueToDatasetResponses = { + /** + * Response + */ + 200: QueueExportToDatasetResponse; +}; + +export type ExportAnnotationQueueToDatasetResponse = ExportAnnotationQueueToDatasetResponses[keyof ExportAnnotationQueueToDatasetResponses]; + +export type ExportAnnotationQueueData = { + body?: never; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: { + export_format?: 'json' | 'csv'; + status?: string; + }; + url: '/model-hub/annotation-queues/{id}/export/'; +}; + +export type ExportAnnotationQueueErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ExportAnnotationQueueError = ExportAnnotationQueueErrors[keyof ExportAnnotationQueueErrors]; + +export type ExportAnnotationQueueResponses = { + /** + * Response + */ + 200: QueueExportAnnotationsResponse; +}; + +export type ExportAnnotationQueueResponse = ExportAnnotationQueueResponses[keyof ExportAnnotationQueueResponses]; + +export type ModelHubAnnotationQueuesHardDeleteData = { + body: QueueHardDeleteRequest; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/hard-delete/'; +}; + +export type ModelHubAnnotationQueuesHardDeleteErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesHardDeleteError = ModelHubAnnotationQueuesHardDeleteErrors[keyof ModelHubAnnotationQueuesHardDeleteErrors]; + +export type ModelHubAnnotationQueuesHardDeleteResponses = { + /** + * Response + */ + 200: QueueHardDeleteResponse; +}; + +export type ModelHubAnnotationQueuesHardDeleteResponse = ModelHubAnnotationQueuesHardDeleteResponses[keyof ModelHubAnnotationQueuesHardDeleteResponses]; + +export type GetAnnotationQueueProgressData = { + body?: never; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/progress/'; +}; + +export type GetAnnotationQueueProgressErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAnnotationQueueProgressError = GetAnnotationQueueProgressErrors[keyof GetAnnotationQueueProgressErrors]; + +export type GetAnnotationQueueProgressResponses = { + /** + * Response + */ + 200: QueueProgressResponse; +}; + +export type GetAnnotationQueueProgressResponse = GetAnnotationQueueProgressResponses[keyof GetAnnotationQueueProgressResponses]; + +export type RemoveAnnotationQueueLabelData = { + body: QueueLabelRequest2; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/remove-label/'; +}; + +export type RemoveAnnotationQueueLabelErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type RemoveAnnotationQueueLabelError = RemoveAnnotationQueueLabelErrors[keyof RemoveAnnotationQueueLabelErrors]; + +export type RemoveAnnotationQueueLabelResponses = { + /** + * Response + */ + 200: QueueRemoveLabelResponse; +}; + +export type RemoveAnnotationQueueLabelResponse = RemoveAnnotationQueueLabelResponses[keyof RemoveAnnotationQueueLabelResponses]; + +export type ModelHubAnnotationQueuesRestoreData = { + body: EmptyRequest2; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/restore/'; +}; + +export type ModelHubAnnotationQueuesRestoreErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesRestoreError = ModelHubAnnotationQueuesRestoreErrors[keyof ModelHubAnnotationQueuesRestoreErrors]; + +export type ModelHubAnnotationQueuesRestoreResponses = { + /** + * Response + */ + 200: QueueStatusResponse; +}; + +export type ModelHubAnnotationQueuesRestoreResponse = ModelHubAnnotationQueuesRestoreResponses[keyof ModelHubAnnotationQueuesRestoreResponses]; + +export type UpdateAnnotationQueueStatusData = { + body: QueueStatusRequest; + path: { + /** + * A UUID string identifying this annotation queue. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{id}/update-status/'; +}; + +export type UpdateAnnotationQueueStatusErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateAnnotationQueueStatusError = UpdateAnnotationQueueStatusErrors[keyof UpdateAnnotationQueueStatusErrors]; + +export type UpdateAnnotationQueueStatusResponses = { + /** + * Response + */ + 200: QueueStatusResponse; +}; + +export type UpdateAnnotationQueueStatusResponse = UpdateAnnotationQueueStatusResponses[keyof UpdateAnnotationQueueStatusResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesListData = { + body?: never; + path: { + queue_id: string; + }; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesListError = ModelHubAnnotationQueuesAutomationRulesListErrors[keyof ModelHubAnnotationQueuesAutomationRulesListErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubAnnotationQueuesAutomationRulesListResponse = ModelHubAnnotationQueuesAutomationRulesListResponses[keyof ModelHubAnnotationQueuesAutomationRulesListResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesCreateData = { + body: AutomationRule2; + path: { + queue_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesCreateError = ModelHubAnnotationQueuesAutomationRulesCreateErrors[keyof ModelHubAnnotationQueuesAutomationRulesCreateErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesCreateResponses = { + /** + * Response + */ + 201: AutomationRule; +}; + +export type ModelHubAnnotationQueuesAutomationRulesCreateResponse = ModelHubAnnotationQueuesAutomationRulesCreateResponses[keyof ModelHubAnnotationQueuesAutomationRulesCreateResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesDeleteData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this automation rule. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesDeleteError = ModelHubAnnotationQueuesAutomationRulesDeleteErrors[keyof ModelHubAnnotationQueuesAutomationRulesDeleteErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubAnnotationQueuesAutomationRulesDeleteResponse = ModelHubAnnotationQueuesAutomationRulesDeleteResponses[keyof ModelHubAnnotationQueuesAutomationRulesDeleteResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesReadData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this automation rule. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesReadError = ModelHubAnnotationQueuesAutomationRulesReadErrors[keyof ModelHubAnnotationQueuesAutomationRulesReadErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesReadResponses = { + /** + * Response + */ + 200: AutomationRule; +}; + +export type ModelHubAnnotationQueuesAutomationRulesReadResponse = ModelHubAnnotationQueuesAutomationRulesReadResponses[keyof ModelHubAnnotationQueuesAutomationRulesReadResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesPartialUpdateData = { + body: AutomationRule2; + path: { + queue_id: string; + /** + * A UUID string identifying this automation rule. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesPartialUpdateError = ModelHubAnnotationQueuesAutomationRulesPartialUpdateErrors[keyof ModelHubAnnotationQueuesAutomationRulesPartialUpdateErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesPartialUpdateResponses = { + /** + * Response + */ + 200: AutomationRule; +}; + +export type ModelHubAnnotationQueuesAutomationRulesPartialUpdateResponse = ModelHubAnnotationQueuesAutomationRulesPartialUpdateResponses[keyof ModelHubAnnotationQueuesAutomationRulesPartialUpdateResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesUpdateData = { + body: AutomationRule2; + path: { + queue_id: string; + /** + * A UUID string identifying this automation rule. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesUpdateError = ModelHubAnnotationQueuesAutomationRulesUpdateErrors[keyof ModelHubAnnotationQueuesAutomationRulesUpdateErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesUpdateResponses = { + /** + * Response + */ + 200: AutomationRule; +}; + +export type ModelHubAnnotationQueuesAutomationRulesUpdateResponse = ModelHubAnnotationQueuesAutomationRulesUpdateResponses[keyof ModelHubAnnotationQueuesAutomationRulesUpdateResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesEvaluateData = { + body: EmptyRequest2; + path: { + queue_id: string; + /** + * A UUID string identifying this automation rule. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/evaluate/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesEvaluateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesEvaluateError = ModelHubAnnotationQueuesAutomationRulesEvaluateErrors[keyof ModelHubAnnotationQueuesAutomationRulesEvaluateErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesEvaluateResponses = { + /** + * Response + */ + 200: AutomationRuleEvaluateResponse; + /** + * Response + */ + 202: AutomationRuleEvaluateAcceptedResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesEvaluateResponse = ModelHubAnnotationQueuesAutomationRulesEvaluateResponses[keyof ModelHubAnnotationQueuesAutomationRulesEvaluateResponses]; + +export type ModelHubAnnotationQueuesAutomationRulesPreviewData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this automation rule. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/automation-rules/{id}/preview/'; +}; + +export type ModelHubAnnotationQueuesAutomationRulesPreviewErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesPreviewError = ModelHubAnnotationQueuesAutomationRulesPreviewErrors[keyof ModelHubAnnotationQueuesAutomationRulesPreviewErrors]; + +export type ModelHubAnnotationQueuesAutomationRulesPreviewResponses = { + /** + * Response + */ + 200: AutomationRuleEvaluateResponse; +}; + +export type ModelHubAnnotationQueuesAutomationRulesPreviewResponse = ModelHubAnnotationQueuesAutomationRulesPreviewResponses[keyof ModelHubAnnotationQueuesAutomationRulesPreviewResponses]; + +export type ListAnnotationQueueItemsData = { + body?: never; + path: { + queue_id: string; + }; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + status?: Array; + source_type?: Array; + assigned_to?: string; + review_status?: string; + ordering?: 'created_at' | '-created_at'; + }; + url: '/model-hub/annotation-queues/{queue_id}/items/'; +}; + +export type ListAnnotationQueueItemsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAnnotationQueueItemsError = ListAnnotationQueueItemsErrors[keyof ListAnnotationQueueItemsErrors]; + +export type ListAnnotationQueueItemsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListAnnotationQueueItemsResponse = ListAnnotationQueueItemsResponses[keyof ListAnnotationQueueItemsResponses]; + +export type ModelHubAnnotationQueuesItemsCreateData = { + body: QueueItem2; + path: { + queue_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/'; +}; + +export type ModelHubAnnotationQueuesItemsCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesItemsCreateError = ModelHubAnnotationQueuesItemsCreateErrors[keyof ModelHubAnnotationQueuesItemsCreateErrors]; + +export type ModelHubAnnotationQueuesItemsCreateResponses = { + /** + * Response + */ + 201: QueueItem; +}; + +export type ModelHubAnnotationQueuesItemsCreateResponse = ModelHubAnnotationQueuesItemsCreateResponses[keyof ModelHubAnnotationQueuesItemsCreateResponses]; + +export type AddAnnotationQueueItemsData = { + body: AddItems; + path: { + queue_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/add-items/'; +}; + +export type AddAnnotationQueueItemsErrors = { + /** + * Response + */ + 400: ApiSelectionTooLargeError; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AddAnnotationQueueItemsError = AddAnnotationQueueItemsErrors[keyof AddAnnotationQueueItemsErrors]; + +export type AddAnnotationQueueItemsResponses = { + /** + * Response + */ + 200: QueueAddItemsResponse; +}; + +export type AddAnnotationQueueItemsResponse = AddAnnotationQueueItemsResponses[keyof AddAnnotationQueueItemsResponses]; + +export type AssignAnnotationQueueItemsData = { + body: AssignItems; + path: { + queue_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/assign/'; +}; + +export type AssignAnnotationQueueItemsErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AssignAnnotationQueueItemsError = AssignAnnotationQueueItemsErrors[keyof AssignAnnotationQueueItemsErrors]; + +export type AssignAnnotationQueueItemsResponses = { + /** + * Response + */ + 200: QueueAssignItemsResponse; +}; + +export type AssignAnnotationQueueItemsResponse = AssignAnnotationQueueItemsResponses[keyof AssignAnnotationQueueItemsResponses]; + +export type RemoveAnnotationQueueItemsData = { + body: BulkRemoveItems; + path: { + queue_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/bulk-remove/'; +}; + +export type RemoveAnnotationQueueItemsErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type RemoveAnnotationQueueItemsError = RemoveAnnotationQueueItemsErrors[keyof RemoveAnnotationQueueItemsErrors]; + +export type RemoveAnnotationQueueItemsResponses = { + /** + * Response + */ + 200: QueueBulkRemoveItemsResponse; +}; + +export type RemoveAnnotationQueueItemsResponse = RemoveAnnotationQueueItemsResponses[keyof RemoveAnnotationQueueItemsResponses]; + +export type GetNextAnnotationQueueItemData = { + body?: never; + path: { + queue_id: string; + }; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + exclude?: string; + before?: string; + review_status?: string; + exclude_review_status?: string; + include_completed?: boolean; + view_mode?: string; + include_all_annotations?: boolean; + }; + url: '/model-hub/annotation-queues/{queue_id}/items/next-item/'; +}; + +export type GetNextAnnotationQueueItemErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetNextAnnotationQueueItemError = GetNextAnnotationQueueItemErrors[keyof GetNextAnnotationQueueItemErrors]; + +export type GetNextAnnotationQueueItemResponses = { + /** + * Response + */ + 200: QueueNextItemResponse; +}; + +export type GetNextAnnotationQueueItemResponse = GetNextAnnotationQueueItemResponses[keyof GetNextAnnotationQueueItemResponses]; + +export type ModelHubAnnotationQueuesItemsDeleteData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/'; +}; + +export type ModelHubAnnotationQueuesItemsDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesItemsDeleteError = ModelHubAnnotationQueuesItemsDeleteErrors[keyof ModelHubAnnotationQueuesItemsDeleteErrors]; + +export type ModelHubAnnotationQueuesItemsDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubAnnotationQueuesItemsDeleteResponse = ModelHubAnnotationQueuesItemsDeleteResponses[keyof ModelHubAnnotationQueuesItemsDeleteResponses]; + +export type ModelHubAnnotationQueuesItemsReadData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/'; +}; + +export type ModelHubAnnotationQueuesItemsReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesItemsReadError = ModelHubAnnotationQueuesItemsReadErrors[keyof ModelHubAnnotationQueuesItemsReadErrors]; + +export type ModelHubAnnotationQueuesItemsReadResponses = { + /** + * Response + */ + 200: QueueItem; +}; + +export type ModelHubAnnotationQueuesItemsReadResponse = ModelHubAnnotationQueuesItemsReadResponses[keyof ModelHubAnnotationQueuesItemsReadResponses]; + +export type ModelHubAnnotationQueuesItemsPartialUpdateData = { + body: QueueItem2; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/'; +}; + +export type ModelHubAnnotationQueuesItemsPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesItemsPartialUpdateError = ModelHubAnnotationQueuesItemsPartialUpdateErrors[keyof ModelHubAnnotationQueuesItemsPartialUpdateErrors]; + +export type ModelHubAnnotationQueuesItemsPartialUpdateResponses = { + /** + * Response + */ + 200: QueueItem; +}; + +export type ModelHubAnnotationQueuesItemsPartialUpdateResponse = ModelHubAnnotationQueuesItemsPartialUpdateResponses[keyof ModelHubAnnotationQueuesItemsPartialUpdateResponses]; + +export type ModelHubAnnotationQueuesItemsUpdateData = { + body: QueueItem2; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/'; +}; + +export type ModelHubAnnotationQueuesItemsUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationQueuesItemsUpdateError = ModelHubAnnotationQueuesItemsUpdateErrors[keyof ModelHubAnnotationQueuesItemsUpdateErrors]; + +export type ModelHubAnnotationQueuesItemsUpdateResponses = { + /** + * Response + */ + 200: QueueItem; +}; + +export type ModelHubAnnotationQueuesItemsUpdateResponse = ModelHubAnnotationQueuesItemsUpdateResponses[keyof ModelHubAnnotationQueuesItemsUpdateResponses]; + +export type GetAnnotationQueueItemDetailData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: { + annotator_id?: string; + include_completed?: boolean; + view_mode?: string; + review_status?: string; + exclude_review_status?: string; + include_all_annotations?: boolean; + reserve?: boolean; + }; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotate-detail/'; +}; + +export type GetAnnotationQueueItemDetailErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAnnotationQueueItemDetailError = GetAnnotationQueueItemDetailErrors[keyof GetAnnotationQueueItemDetailErrors]; + +export type GetAnnotationQueueItemDetailResponses = { + /** + * Response + */ + 200: QueueAnnotateDetailResponse; +}; + +export type GetAnnotationQueueItemDetailResponse = GetAnnotationQueueItemDetailResponses[keyof GetAnnotationQueueItemDetailResponses]; + +export type ListAnnotationQueueItemAnnotationsData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/'; +}; + +export type ListAnnotationQueueItemAnnotationsErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAnnotationQueueItemAnnotationsError = ListAnnotationQueueItemAnnotationsErrors[keyof ListAnnotationQueueItemAnnotationsErrors]; + +export type ListAnnotationQueueItemAnnotationsResponses = { + /** + * Response + */ + 200: QueueItemAnnotationsResponse; +}; + +export type ListAnnotationQueueItemAnnotationsResponse = ListAnnotationQueueItemAnnotationsResponses[keyof ListAnnotationQueueItemAnnotationsResponses]; + +export type ImportAnnotationQueueItemAnnotationsData = { + body: ImportAnnotations; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/import/'; +}; + +export type ImportAnnotationQueueItemAnnotationsErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ImportAnnotationQueueItemAnnotationsError = ImportAnnotationQueueItemAnnotationsErrors[keyof ImportAnnotationQueueItemAnnotationsErrors]; + +export type ImportAnnotationQueueItemAnnotationsResponses = { + /** + * Response + */ + 200: QueueImportAnnotationsResponse; +}; + +export type ImportAnnotationQueueItemAnnotationsResponse = ImportAnnotationQueueItemAnnotationsResponses[keyof ImportAnnotationQueueItemAnnotationsResponses]; + +export type SubmitAnnotationQueueItemAnnotationsData = { + body: SubmitAnnotations; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/annotations/submit/'; +}; + +export type SubmitAnnotationQueueItemAnnotationsErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SubmitAnnotationQueueItemAnnotationsError = SubmitAnnotationQueueItemAnnotationsErrors[keyof SubmitAnnotationQueueItemAnnotationsErrors]; + +export type SubmitAnnotationQueueItemAnnotationsResponses = { + /** + * Response + */ + 200: QueueSubmitAnnotationsResponse; +}; + +export type SubmitAnnotationQueueItemAnnotationsResponse = SubmitAnnotationQueueItemAnnotationsResponses[keyof SubmitAnnotationQueueItemAnnotationsResponses]; + +export type CompleteAnnotationQueueItemData = { + body: QueueItemNavigationRequest2; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/complete/'; +}; + +export type CompleteAnnotationQueueItemErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CompleteAnnotationQueueItemError = CompleteAnnotationQueueItemErrors[keyof CompleteAnnotationQueueItemErrors]; + +export type CompleteAnnotationQueueItemResponses = { + /** + * Response + */ + 200: QueueNavigationResponse; +}; + +export type CompleteAnnotationQueueItemResponse = CompleteAnnotationQueueItemResponses[keyof CompleteAnnotationQueueItemResponses]; + +export type ListAnnotationQueueItemDiscussionData = { + body?: never; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/'; +}; + +export type ListAnnotationQueueItemDiscussionErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAnnotationQueueItemDiscussionError = ListAnnotationQueueItemDiscussionErrors[keyof ListAnnotationQueueItemDiscussionErrors]; + +export type ListAnnotationQueueItemDiscussionResponses = { + /** + * Response + */ + 200: QueueDiscussionResponse; +}; + +export type ListAnnotationQueueItemDiscussionResponse = ListAnnotationQueueItemDiscussionResponses[keyof ListAnnotationQueueItemDiscussionResponses]; + +export type CreateAnnotationQueueItemCommentData = { + body: DiscussionCommentRequest; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/'; +}; + +export type CreateAnnotationQueueItemCommentErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateAnnotationQueueItemCommentError = CreateAnnotationQueueItemCommentErrors[keyof CreateAnnotationQueueItemCommentErrors]; + +export type CreateAnnotationQueueItemCommentResponses = { + /** + * Response + */ + 200: QueueDiscussionResponse; +}; + +export type CreateAnnotationQueueItemCommentResponse = CreateAnnotationQueueItemCommentResponses[keyof CreateAnnotationQueueItemCommentResponses]; + +export type ToggleAnnotationQueueItemCommentReactionData = { + body: DiscussionReactionRequest; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + comment_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/comments/{comment_id}/reaction/'; +}; + +export type ToggleAnnotationQueueItemCommentReactionErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ToggleAnnotationQueueItemCommentReactionError = ToggleAnnotationQueueItemCommentReactionErrors[keyof ToggleAnnotationQueueItemCommentReactionErrors]; + +export type ToggleAnnotationQueueItemCommentReactionResponses = { + /** + * Response + */ + 200: QueueDiscussionResponse; +}; + +export type ToggleAnnotationQueueItemCommentReactionResponse = ToggleAnnotationQueueItemCommentReactionResponses[keyof ToggleAnnotationQueueItemCommentReactionResponses]; + +export type ReopenAnnotationQueueItemThreadData = { + body: DiscussionThreadStatusRequest2; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + thread_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/reopen/'; +}; + +export type ReopenAnnotationQueueItemThreadErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ReopenAnnotationQueueItemThreadError = ReopenAnnotationQueueItemThreadErrors[keyof ReopenAnnotationQueueItemThreadErrors]; + +export type ReopenAnnotationQueueItemThreadResponses = { + /** + * Response + */ + 200: QueueDiscussionResponse; +}; + +export type ReopenAnnotationQueueItemThreadResponse = ReopenAnnotationQueueItemThreadResponses[keyof ReopenAnnotationQueueItemThreadResponses]; + +export type ResolveAnnotationQueueItemThreadData = { + body: DiscussionThreadStatusRequest2; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + thread_id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/discussion/{thread_id}/resolve/'; +}; + +export type ResolveAnnotationQueueItemThreadErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ResolveAnnotationQueueItemThreadError = ResolveAnnotationQueueItemThreadErrors[keyof ResolveAnnotationQueueItemThreadErrors]; + +export type ResolveAnnotationQueueItemThreadResponses = { + /** + * Response + */ + 200: QueueDiscussionResponse; +}; + +export type ResolveAnnotationQueueItemThreadResponse = ResolveAnnotationQueueItemThreadResponses[keyof ResolveAnnotationQueueItemThreadResponses]; + +export type ReleaseAnnotationQueueItemData = { + body: EmptyRequest2; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/release/'; +}; + +export type ReleaseAnnotationQueueItemErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ReleaseAnnotationQueueItemError = ReleaseAnnotationQueueItemErrors[keyof ReleaseAnnotationQueueItemErrors]; + +export type ReleaseAnnotationQueueItemResponses = { + /** + * Response + */ + 200: QueueReleaseReservationResponse; +}; + +export type ReleaseAnnotationQueueItemResponse = ReleaseAnnotationQueueItemResponses[keyof ReleaseAnnotationQueueItemResponses]; + +export type ReviewAnnotationQueueItemData = { + body: ReviewItemRequest; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/review/'; +}; + +export type ReviewAnnotationQueueItemErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ReviewAnnotationQueueItemError = ReviewAnnotationQueueItemErrors[keyof ReviewAnnotationQueueItemErrors]; + +export type ReviewAnnotationQueueItemResponses = { + /** + * Response + */ + 200: QueueReviewItemResponse; +}; + +export type ReviewAnnotationQueueItemResponse = ReviewAnnotationQueueItemResponses[keyof ReviewAnnotationQueueItemResponses]; + +export type SkipAnnotationQueueItemData = { + body: QueueItemNavigationRequest2; + path: { + queue_id: string; + /** + * A UUID string identifying this queue item. + */ + id: string; + }; + query?: never; + url: '/model-hub/annotation-queues/{queue_id}/items/{id}/skip/'; +}; + +export type SkipAnnotationQueueItemErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SkipAnnotationQueueItemError = SkipAnnotationQueueItemErrors[keyof SkipAnnotationQueueItemErrors]; + +export type SkipAnnotationQueueItemResponses = { + /** + * Response + */ + 200: QueueNavigationResponse; +}; + +export type SkipAnnotationQueueItemResponse = SkipAnnotationQueueItemResponses[keyof SkipAnnotationQueueItemResponses]; + +export type ModelHubAnnotationsLabelsListData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + dataset?: string; + project_id?: string; + type?: 'text' | 'numeric' | 'categorical' | 'star' | 'thumbs_up_down'; + search?: string; + include_usage_count?: boolean; + include_archived?: boolean; + }; + url: '/model-hub/annotations-labels/'; +}; + +export type ModelHubAnnotationsLabelsListErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationsLabelsListError = ModelHubAnnotationsLabelsListErrors[keyof ModelHubAnnotationsLabelsListErrors]; + +export type ModelHubAnnotationsLabelsListResponses = { + /** + * Response + */ + 200: Array; +}; + +export type ModelHubAnnotationsLabelsListResponse = ModelHubAnnotationsLabelsListResponses[keyof ModelHubAnnotationsLabelsListResponses]; + +export type ModelHubAnnotationsLabelsCreateData = { + body: AnnotationsLabels2; + path?: never; + query?: never; + url: '/model-hub/annotations-labels/'; +}; + +export type ModelHubAnnotationsLabelsCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationsLabelsCreateError = ModelHubAnnotationsLabelsCreateErrors[keyof ModelHubAnnotationsLabelsCreateErrors]; + +export type ModelHubAnnotationsLabelsCreateResponses = { + /** + * Response + */ + 201: AnnotationsLabels; +}; + +export type ModelHubAnnotationsLabelsCreateResponse = ModelHubAnnotationsLabelsCreateResponses[keyof ModelHubAnnotationsLabelsCreateResponses]; + +export type ModelHubAnnotationsLabelsDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/annotations-labels/{id}/'; +}; + +export type ModelHubAnnotationsLabelsDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationsLabelsDeleteError = ModelHubAnnotationsLabelsDeleteErrors[keyof ModelHubAnnotationsLabelsDeleteErrors]; + +export type ModelHubAnnotationsLabelsDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubAnnotationsLabelsDeleteResponse = ModelHubAnnotationsLabelsDeleteResponses[keyof ModelHubAnnotationsLabelsDeleteResponses]; + +export type ModelHubAnnotationsLabelsReadData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/annotations-labels/{id}/'; +}; + +export type ModelHubAnnotationsLabelsReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationsLabelsReadError = ModelHubAnnotationsLabelsReadErrors[keyof ModelHubAnnotationsLabelsReadErrors]; + +export type ModelHubAnnotationsLabelsReadResponses = { + /** + * Response + */ + 200: AnnotationsLabels; +}; + +export type ModelHubAnnotationsLabelsReadResponse = ModelHubAnnotationsLabelsReadResponses[keyof ModelHubAnnotationsLabelsReadResponses]; + +export type ModelHubAnnotationsLabelsPartialUpdateData = { + body: AnnotationsLabels2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/annotations-labels/{id}/'; +}; + +export type ModelHubAnnotationsLabelsPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationsLabelsPartialUpdateError = ModelHubAnnotationsLabelsPartialUpdateErrors[keyof ModelHubAnnotationsLabelsPartialUpdateErrors]; + +export type ModelHubAnnotationsLabelsPartialUpdateResponses = { + /** + * Response + */ + 200: AnnotationsLabels; +}; + +export type ModelHubAnnotationsLabelsPartialUpdateResponse = ModelHubAnnotationsLabelsPartialUpdateResponses[keyof ModelHubAnnotationsLabelsPartialUpdateResponses]; + +export type ModelHubAnnotationsLabelsUpdateData = { + body: AnnotationsLabels2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/annotations-labels/{id}/'; +}; + +export type ModelHubAnnotationsLabelsUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationsLabelsUpdateError = ModelHubAnnotationsLabelsUpdateErrors[keyof ModelHubAnnotationsLabelsUpdateErrors]; + +export type ModelHubAnnotationsLabelsUpdateResponses = { + /** + * Response + */ + 200: AnnotationsLabels; +}; + +export type ModelHubAnnotationsLabelsUpdateResponse = ModelHubAnnotationsLabelsUpdateResponses[keyof ModelHubAnnotationsLabelsUpdateResponses]; + +export type ModelHubAnnotationsLabelsRestoreData = { + body: EmptyRequest2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/annotations-labels/{id}/restore/'; +}; + +export type ModelHubAnnotationsLabelsRestoreErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubAnnotationsLabelsRestoreError = ModelHubAnnotationsLabelsRestoreErrors[keyof ModelHubAnnotationsLabelsRestoreErrors]; + +export type ModelHubAnnotationsLabelsRestoreResponses = { + /** + * Response + */ + 200: AnnotationLabelRestoreResponse; +}; + +export type ModelHubAnnotationsLabelsRestoreResponse = ModelHubAnnotationsLabelsRestoreResponses[keyof ModelHubAnnotationsLabelsRestoreResponses]; + +export type ModelHubApiKeysListData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/api-keys/'; +}; + +export type ModelHubApiKeysListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubApiKeysListError = ModelHubApiKeysListErrors[keyof ModelHubApiKeysListErrors]; + +export type ModelHubApiKeysListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubApiKeysListResponse = ModelHubApiKeysListResponses[keyof ModelHubApiKeysListResponses]; + +export type ModelHubApiKeysCreateData = { + body: ApiKey2; + path?: never; + query?: never; + url: '/model-hub/api-keys/'; +}; + +export type ModelHubApiKeysCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubApiKeysCreateError = ModelHubApiKeysCreateErrors[keyof ModelHubApiKeysCreateErrors]; + +export type ModelHubApiKeysCreateResponses = { + /** + * Response + */ + 201: ApiKey; +}; + +export type ModelHubApiKeysCreateResponse = ModelHubApiKeysCreateResponses[keyof ModelHubApiKeysCreateResponses]; + +export type ModelHubApiKeysDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/api-keys/{id}/'; +}; + +export type ModelHubApiKeysDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubApiKeysDeleteError = ModelHubApiKeysDeleteErrors[keyof ModelHubApiKeysDeleteErrors]; + +export type ModelHubApiKeysDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubApiKeysDeleteResponse = ModelHubApiKeysDeleteResponses[keyof ModelHubApiKeysDeleteResponses]; + +export type ModelHubApiKeysReadData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/api-keys/{id}/'; +}; + +export type ModelHubApiKeysReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubApiKeysReadError = ModelHubApiKeysReadErrors[keyof ModelHubApiKeysReadErrors]; + +export type ModelHubApiKeysReadResponses = { + /** + * Response + */ + 200: ApiKey; +}; + +export type ModelHubApiKeysReadResponse = ModelHubApiKeysReadResponses[keyof ModelHubApiKeysReadResponses]; + +export type ModelHubApiKeysPartialUpdateData = { + body: ApiKey2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/api-keys/{id}/'; +}; + +export type ModelHubApiKeysPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubApiKeysPartialUpdateError = ModelHubApiKeysPartialUpdateErrors[keyof ModelHubApiKeysPartialUpdateErrors]; + +export type ModelHubApiKeysPartialUpdateResponses = { + /** + * Response + */ + 200: ApiKey; +}; + +export type ModelHubApiKeysPartialUpdateResponse = ModelHubApiKeysPartialUpdateResponses[keyof ModelHubApiKeysPartialUpdateResponses]; + +export type ModelHubApiKeysUpdateData = { + body: ApiKey2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/api-keys/{id}/'; +}; + +export type ModelHubApiKeysUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubApiKeysUpdateError = ModelHubApiKeysUpdateErrors[keyof ModelHubApiKeysUpdateErrors]; + +export type ModelHubApiKeysUpdateResponses = { + /** + * Response + */ + 200: ApiKey; +}; + +export type ModelHubApiKeysUpdateResponse = ModelHubApiKeysUpdateResponses[keyof ModelHubApiKeysUpdateResponses]; + +export type ModelHubApiModelsListListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/api/models_list/'; +}; + +export type ModelHubApiModelsListListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubApiModelsListListError = ModelHubApiModelsListListErrors[keyof ModelHubApiModelsListListErrors]; + +export type ModelHubApiModelsListListResponses = { + /** + * Response + */ + 200: ModelHubPaginatedResponse; +}; + +export type ModelHubApiModelsListListResponse = ModelHubApiModelsListListResponses[keyof ModelHubApiModelsListListResponses]; + +export type GetDatasetColumnsData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/dataset/columns/{dataset_id}/'; +}; + +export type GetDatasetColumnsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetDatasetColumnsError = GetDatasetColumnsErrors[keyof GetDatasetColumnsErrors]; + +export type GetDatasetColumnsResponses = { + /** + * Response + */ + 200: DatasetColumnDetailResponse; +}; + +export type GetDatasetColumnsResponse = GetDatasetColumnsResponses[keyof GetDatasetColumnsResponses]; + +export type GetDatasetAnnotationSummaryData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/dataset/{dataset_id}/annotation-summary/'; +}; + +export type GetDatasetAnnotationSummaryErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetDatasetAnnotationSummaryError = GetDatasetAnnotationSummaryErrors[keyof GetDatasetAnnotationSummaryErrors]; + +export type GetDatasetAnnotationSummaryResponses = { + /** + * Response + */ + 200: AnnotationSummaryResponse; +}; + +export type GetDatasetAnnotationSummaryResponse = GetDatasetAnnotationSummaryResponses[keyof GetDatasetAnnotationSummaryResponses]; + +export type GetDatasetEvalStatsData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/dataset/{dataset_id}/eval-stats/'; +}; + +export type GetDatasetEvalStatsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetDatasetEvalStatsError = GetDatasetEvalStatsErrors[keyof GetDatasetEvalStatsErrors]; + +export type GetDatasetEvalStatsResponses = { + /** + * Response + */ + 200: DatasetEvalStatsResponse; +}; + +export type GetDatasetEvalStatsResponse = GetDatasetEvalStatsResponses[keyof GetDatasetEvalStatsResponses]; + +export type GetDatasetJsonSchemaData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/dataset/{dataset_id}/json-schema/'; +}; + +export type GetDatasetJsonSchemaErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetDatasetJsonSchemaError = GetDatasetJsonSchemaErrors[keyof GetDatasetJsonSchemaErrors]; + +export type GetDatasetJsonSchemaResponses = { + /** + * Response + */ + 200: DatasetJsonSchemaResponse; +}; + +export type GetDatasetJsonSchemaResponse = GetDatasetJsonSchemaResponses[keyof GetDatasetJsonSchemaResponses]; + +export type ModelHubDatasetRunPromptStatsListData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/dataset/{dataset_id}/run-prompt-stats/'; +}; + +export type ModelHubDatasetRunPromptStatsListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetRunPromptStatsListError = ModelHubDatasetRunPromptStatsListErrors[keyof ModelHubDatasetRunPromptStatsListErrors]; + +export type ModelHubDatasetRunPromptStatsListResponses = { + /** + * Response + */ + 200: DatasetRunPromptStatsResponse; +}; + +export type ModelHubDatasetRunPromptStatsListResponse = ModelHubDatasetRunPromptStatsListResponses[keyof ModelHubDatasetRunPromptStatsListResponses]; + +export type ModelHubDatasetsCompareGetEvalsListCreateData = { + body: CompareEvalsListRequest; + path?: never; + query?: never; + url: '/model-hub/datasets/compare/get-evals-list/'; +}; + +export type ModelHubDatasetsCompareGetEvalsListCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsCompareGetEvalsListCreateError = ModelHubDatasetsCompareGetEvalsListCreateErrors[keyof ModelHubDatasetsCompareGetEvalsListCreateErrors]; + +export type ModelHubDatasetsCompareGetEvalsListCreateResponses = { + /** + * Response + */ + 200: CompareEvalListResponse; +}; + +export type ModelHubDatasetsCompareGetEvalsListCreateResponse = ModelHubDatasetsCompareGetEvalsListCreateResponses[keyof ModelHubDatasetsCompareGetEvalsListCreateResponses]; + +export type ModelHubDatasetsComparePreviewRunEvalCreateData = { + body: ComparePreviewRunEvalRequest; + path?: never; + query?: never; + url: '/model-hub/datasets/compare/preview-run-eval/'; +}; + +export type ModelHubDatasetsComparePreviewRunEvalCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsComparePreviewRunEvalCreateError = ModelHubDatasetsComparePreviewRunEvalCreateErrors[keyof ModelHubDatasetsComparePreviewRunEvalCreateErrors]; + +export type ModelHubDatasetsComparePreviewRunEvalCreateResponses = { + /** + * Response + */ + 200: EvalPreviewResponse; +}; + +export type ModelHubDatasetsComparePreviewRunEvalCreateResponse = ModelHubDatasetsComparePreviewRunEvalCreateResponses[keyof ModelHubDatasetsComparePreviewRunEvalCreateResponses]; + +export type ModelHubDatasetsDeleteCompareDeleteData = { + body?: never; + path: { + compare_id: string; + }; + query?: never; + url: '/model-hub/datasets/delete-compare/{compare_id}/'; +}; + +export type ModelHubDatasetsDeleteCompareDeleteErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsDeleteCompareDeleteError = ModelHubDatasetsDeleteCompareDeleteErrors[keyof ModelHubDatasetsDeleteCompareDeleteErrors]; + +export type ModelHubDatasetsDeleteCompareDeleteResponses = { + /** + * Response + */ + 200: CompareDatasetDeleteResponse; +}; + +export type ModelHubDatasetsDeleteCompareDeleteResponse = ModelHubDatasetsDeleteCompareDeleteResponses[keyof ModelHubDatasetsDeleteCompareDeleteResponses]; + +export type ModelHubDatasetsDeleteCompareReadData = { + body?: never; + path: { + compare_id: string; + }; + query?: never; + url: '/model-hub/datasets/delete-compare/{compare_id}/'; +}; + +export type ModelHubDatasetsDeleteCompareReadErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsDeleteCompareReadError = ModelHubDatasetsDeleteCompareReadErrors[keyof ModelHubDatasetsDeleteCompareReadErrors]; + +export type ModelHubDatasetsDeleteCompareReadResponses = { + /** + * Response + */ + 200: CompareDatasetRowResponse; +}; + +export type ModelHubDatasetsDeleteCompareReadResponse = ModelHubDatasetsDeleteCompareReadResponses[keyof ModelHubDatasetsDeleteCompareReadResponses]; + +export type ModelHubDatasetsExplanationSummaryReadData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/explanation-summary/{dataset_id}/'; +}; + +export type ModelHubDatasetsExplanationSummaryReadErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsExplanationSummaryReadError = ModelHubDatasetsExplanationSummaryReadErrors[keyof ModelHubDatasetsExplanationSummaryReadErrors]; + +export type ModelHubDatasetsExplanationSummaryReadResponses = { + /** + * Response + */ + 200: DatasetExplanationSummaryResponse; +}; + +export type ModelHubDatasetsExplanationSummaryReadResponse = ModelHubDatasetsExplanationSummaryReadResponses[keyof ModelHubDatasetsExplanationSummaryReadResponses]; + +export type ModelHubDatasetsExplanationSummaryRefreshCreateData = { + body: ModelHubEmptyRequest2; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/explanation-summary/{dataset_id}/refresh/'; +}; + +export type ModelHubDatasetsExplanationSummaryRefreshCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsExplanationSummaryRefreshCreateError = ModelHubDatasetsExplanationSummaryRefreshCreateErrors[keyof ModelHubDatasetsExplanationSummaryRefreshCreateErrors]; + +export type ModelHubDatasetsExplanationSummaryRefreshCreateResponses = { + /** + * Response + */ + 200: DatasetExplanationSummaryResponse; +}; + +export type ModelHubDatasetsExplanationSummaryRefreshCreateResponse = ModelHubDatasetsExplanationSummaryRefreshCreateResponses[keyof ModelHubDatasetsExplanationSummaryRefreshCreateResponses]; + +export type ListDatasetBaseColumnsData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/datasets/get-base-columns/'; +}; + +export type ListDatasetBaseColumnsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListDatasetBaseColumnsError = ListDatasetBaseColumnsErrors[keyof ListDatasetBaseColumnsErrors]; + +export type ListDatasetBaseColumnsResponses = { + /** + * Response + */ + 200: BaseColumnsResponse; +}; + +export type ListDatasetBaseColumnsResponse = ListDatasetBaseColumnsResponses[keyof ListDatasetBaseColumnsResponses]; + +export type ModelHubDatasetsGetCompareRowDeleteData = { + body?: never; + path: { + compare_id: string; + row_id: string; + }; + query?: never; + url: '/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/'; +}; + +export type ModelHubDatasetsGetCompareRowDeleteErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsGetCompareRowDeleteError = ModelHubDatasetsGetCompareRowDeleteErrors[keyof ModelHubDatasetsGetCompareRowDeleteErrors]; + +export type ModelHubDatasetsGetCompareRowDeleteResponses = { + /** + * Response + */ + 200: CompareDatasetDeleteResponse; +}; + +export type ModelHubDatasetsGetCompareRowDeleteResponse = ModelHubDatasetsGetCompareRowDeleteResponses[keyof ModelHubDatasetsGetCompareRowDeleteResponses]; + +export type ModelHubDatasetsGetCompareRowReadData = { + body?: never; + path: { + compare_id: string; + row_id: string; + }; + query?: never; + url: '/model-hub/datasets/get-compare-row/{compare_id}/{row_id}/'; +}; + +export type ModelHubDatasetsGetCompareRowReadErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsGetCompareRowReadError = ModelHubDatasetsGetCompareRowReadErrors[keyof ModelHubDatasetsGetCompareRowReadErrors]; + +export type ModelHubDatasetsGetCompareRowReadResponses = { + /** + * Response + */ + 200: CompareDatasetRowResponse; +}; + +export type ModelHubDatasetsGetCompareRowReadResponse = ModelHubDatasetsGetCompareRowReadResponses[keyof ModelHubDatasetsGetCompareRowReadResponses]; + +export type ModelHubDatasetsHuggingfaceDetailCreateData = { + body: HuggingFaceDatasetDetailRequest; + path?: never; + query?: never; + url: '/model-hub/datasets/huggingface/detail/'; +}; + +export type ModelHubDatasetsHuggingfaceDetailCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsHuggingfaceDetailCreateError = ModelHubDatasetsHuggingfaceDetailCreateErrors[keyof ModelHubDatasetsHuggingfaceDetailCreateErrors]; + +export type ModelHubDatasetsHuggingfaceDetailCreateResponses = { + /** + * Response + */ + 200: HuggingFaceDatasetDetailResponse; +}; + +export type ModelHubDatasetsHuggingfaceDetailCreateResponse = ModelHubDatasetsHuggingfaceDetailCreateResponses[keyof ModelHubDatasetsHuggingfaceDetailCreateResponses]; + +export type ModelHubDatasetsHuggingfaceListCreateData = { + body: HuggingFaceDatasetListRequest; + path?: never; + query?: never; + url: '/model-hub/datasets/huggingface/list/'; +}; + +export type ModelHubDatasetsHuggingfaceListCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsHuggingfaceListCreateError = ModelHubDatasetsHuggingfaceListCreateErrors[keyof ModelHubDatasetsHuggingfaceListCreateErrors]; + +export type ModelHubDatasetsHuggingfaceListCreateResponses = { + /** + * Response + */ + 200: HuggingFaceDatasetListResponse; +}; + +export type ModelHubDatasetsHuggingfaceListCreateResponse = ModelHubDatasetsHuggingfaceListCreateResponses[keyof ModelHubDatasetsHuggingfaceListCreateResponses]; + +export type ModelHubDatasetsAddApiColumnCreateData = { + body: AddApiColumnRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/add-api-column/'; +}; + +export type ModelHubDatasetsAddApiColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsAddApiColumnCreateError = ModelHubDatasetsAddApiColumnCreateErrors[keyof ModelHubDatasetsAddApiColumnCreateErrors]; + +export type ModelHubDatasetsAddApiColumnCreateResponses = { + /** + * Response + */ + 200: DynamicColumnCreateResponse; +}; + +export type ModelHubDatasetsAddApiColumnCreateResponse = ModelHubDatasetsAddApiColumnCreateResponses[keyof ModelHubDatasetsAddApiColumnCreateResponses]; + +export type ModelHubDatasetsAddVectorDbColumnCreateData = { + body: VectorDbColumnRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/add_vector_db_column/'; +}; + +export type ModelHubDatasetsAddVectorDbColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsAddVectorDbColumnCreateError = ModelHubDatasetsAddVectorDbColumnCreateErrors[keyof ModelHubDatasetsAddVectorDbColumnCreateErrors]; + +export type ModelHubDatasetsAddVectorDbColumnCreateResponses = { + /** + * Response + */ + 200: DynamicColumnCreateResponse; +}; + +export type ModelHubDatasetsAddVectorDbColumnCreateResponse = ModelHubDatasetsAddVectorDbColumnCreateResponses[keyof ModelHubDatasetsAddVectorDbColumnCreateResponses]; + +export type ModelHubDatasetsClassifyColumnCreateData = { + body: ClassifyColumnRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/classify-column/'; +}; + +export type ModelHubDatasetsClassifyColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsClassifyColumnCreateError = ModelHubDatasetsClassifyColumnCreateErrors[keyof ModelHubDatasetsClassifyColumnCreateErrors]; + +export type ModelHubDatasetsClassifyColumnCreateResponses = { + /** + * Response + */ + 200: DynamicColumnCreateResponse; +}; + +export type ModelHubDatasetsClassifyColumnCreateResponse = ModelHubDatasetsClassifyColumnCreateResponses[keyof ModelHubDatasetsClassifyColumnCreateResponses]; + +export type ModelHubDatasetsCompareDatasetsCreateData = { + body: CompareDataset2; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/compare-datasets/'; +}; + +export type ModelHubDatasetsCompareDatasetsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsCompareDatasetsCreateError = ModelHubDatasetsCompareDatasetsCreateErrors[keyof ModelHubDatasetsCompareDatasetsCreateErrors]; + +export type ModelHubDatasetsCompareDatasetsCreateResponses = { + /** + * Response + */ + 200: CompareDatasetResponse; +}; + +export type ModelHubDatasetsCompareDatasetsCreateResponse = ModelHubDatasetsCompareDatasetsCreateResponses[keyof ModelHubDatasetsCompareDatasetsCreateResponses]; + +export type ModelHubDatasetsCompareDatasetsAddEvalCreateData = { + body: CompareExperimentEvalRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/compare-datasets/add-eval/'; +}; + +export type ModelHubDatasetsCompareDatasetsAddEvalCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsCompareDatasetsAddEvalCreateError = ModelHubDatasetsCompareDatasetsAddEvalCreateErrors[keyof ModelHubDatasetsCompareDatasetsAddEvalCreateErrors]; + +export type ModelHubDatasetsCompareDatasetsAddEvalCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDatasetsCompareDatasetsAddEvalCreateResponse = ModelHubDatasetsCompareDatasetsAddEvalCreateResponses[keyof ModelHubDatasetsCompareDatasetsAddEvalCreateResponses]; + +export type ModelHubDatasetsCompareDatasetsDownloadCreateData = { + body: CompareDataset2; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/compare-datasets/download/'; +}; + +export type ModelHubDatasetsCompareDatasetsDownloadCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsCompareDatasetsDownloadCreateError = ModelHubDatasetsCompareDatasetsDownloadCreateErrors[keyof ModelHubDatasetsCompareDatasetsDownloadCreateErrors]; + +export type ModelHubDatasetsCompareDatasetsDownloadCreateResponses = { + /** + * CSV export + */ + 200: Blob | File; +}; + +export type ModelHubDatasetsCompareDatasetsDownloadCreateResponse = ModelHubDatasetsCompareDatasetsDownloadCreateResponses[keyof ModelHubDatasetsCompareDatasetsDownloadCreateResponses]; + +export type ModelHubDatasetsCompareDatasetsStartEvalCreateData = { + body: CompareStartEvalsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/compare-datasets/start-eval/'; +}; + +export type ModelHubDatasetsCompareDatasetsStartEvalCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsCompareDatasetsStartEvalCreateError = ModelHubDatasetsCompareDatasetsStartEvalCreateErrors[keyof ModelHubDatasetsCompareDatasetsStartEvalCreateErrors]; + +export type ModelHubDatasetsCompareDatasetsStartEvalCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDatasetsCompareDatasetsStartEvalCreateResponse = ModelHubDatasetsCompareDatasetsStartEvalCreateResponses[keyof ModelHubDatasetsCompareDatasetsStartEvalCreateResponses]; + +export type ModelHubDatasetsCompareStatsCreateData = { + body: CompareDatasetStatsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/compare-stats/'; +}; + +export type ModelHubDatasetsCompareStatsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsCompareStatsCreateError = ModelHubDatasetsCompareStatsCreateErrors[keyof ModelHubDatasetsCompareStatsCreateErrors]; + +export type ModelHubDatasetsCompareStatsCreateResponses = { + /** + * Response + */ + 200: CompareDatasetStatsResponse; +}; + +export type ModelHubDatasetsCompareStatsCreateResponse = ModelHubDatasetsCompareStatsCreateResponses[keyof ModelHubDatasetsCompareStatsCreateResponses]; + +export type ModelHubDatasetsConditionalColumnCreateData = { + body: ConditionalColumnRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/conditional-column/'; +}; + +export type ModelHubDatasetsConditionalColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsConditionalColumnCreateError = ModelHubDatasetsConditionalColumnCreateErrors[keyof ModelHubDatasetsConditionalColumnCreateErrors]; + +export type ModelHubDatasetsConditionalColumnCreateResponses = { + /** + * Response + */ + 200: DynamicColumnCreateResponse; +}; + +export type ModelHubDatasetsConditionalColumnCreateResponse = ModelHubDatasetsConditionalColumnCreateResponses[keyof ModelHubDatasetsConditionalColumnCreateResponses]; + +export type ListDatasetDerivedVariablesData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/derived-variables/'; +}; + +export type ListDatasetDerivedVariablesErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListDatasetDerivedVariablesError = ListDatasetDerivedVariablesErrors[keyof ListDatasetDerivedVariablesErrors]; + +export type ListDatasetDerivedVariablesResponses = { + /** + * Response + */ + 200: DatasetDerivedVariablesResponse; +}; + +export type ListDatasetDerivedVariablesResponse = ListDatasetDerivedVariablesResponses[keyof ListDatasetDerivedVariablesResponses]; + +export type ModelHubDatasetsDuplicateRowsCreateData = { + body: DuplicateRowsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/duplicate-rows/'; +}; + +export type ModelHubDatasetsDuplicateRowsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsDuplicateRowsCreateError = ModelHubDatasetsDuplicateRowsCreateErrors[keyof ModelHubDatasetsDuplicateRowsCreateErrors]; + +export type ModelHubDatasetsDuplicateRowsCreateResponses = { + /** + * Response + */ + 200: DuplicateRowsResponse; +}; + +export type ModelHubDatasetsDuplicateRowsCreateResponse = ModelHubDatasetsDuplicateRowsCreateResponses[keyof ModelHubDatasetsDuplicateRowsCreateResponses]; + +export type DuplicateDatasetData = { + body: DuplicateDatasetRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/duplicate/'; +}; + +export type DuplicateDatasetErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DuplicateDatasetError = DuplicateDatasetErrors[keyof DuplicateDatasetErrors]; + +export type DuplicateDatasetResponses = { + /** + * Response + */ + 200: DuplicateDatasetResponse; +}; + +export type DuplicateDatasetResponse2 = DuplicateDatasetResponses[keyof DuplicateDatasetResponses]; + +export type ModelHubDatasetsExtractEntitiesCreateData = { + body: ExtractEntitiesRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/extract-entities/'; +}; + +export type ModelHubDatasetsExtractEntitiesCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsExtractEntitiesCreateError = ModelHubDatasetsExtractEntitiesCreateErrors[keyof ModelHubDatasetsExtractEntitiesCreateErrors]; + +export type ModelHubDatasetsExtractEntitiesCreateResponses = { + /** + * Response + */ + 200: DynamicColumnMessageResponse; +}; + +export type ModelHubDatasetsExtractEntitiesCreateResponse = ModelHubDatasetsExtractEntitiesCreateResponses[keyof ModelHubDatasetsExtractEntitiesCreateResponses]; + +export type ModelHubDatasetsMergeCreateData = { + body: MergeDatasetRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/merge/'; +}; + +export type ModelHubDatasetsMergeCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsMergeCreateError = ModelHubDatasetsMergeCreateErrors[keyof ModelHubDatasetsMergeCreateErrors]; + +export type ModelHubDatasetsMergeCreateResponses = { + /** + * Response + */ + 200: MergeDatasetResponse; +}; + +export type ModelHubDatasetsMergeCreateResponse = ModelHubDatasetsMergeCreateResponses[keyof ModelHubDatasetsMergeCreateResponses]; + +export type ModelHubDatasetsPreviewCreateData = { + body: PreviewDatasetOperationRequest; + path: { + dataset_id: string; + operation_type: string; + }; + query?: never; + url: '/model-hub/datasets/{dataset_id}/preview/{operation_type}/'; +}; + +export type ModelHubDatasetsPreviewCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDatasetsPreviewCreateError = ModelHubDatasetsPreviewCreateErrors[keyof ModelHubDatasetsPreviewCreateErrors]; + +export type ModelHubDatasetsPreviewCreateResponses = { + /** + * Response + */ + 200: PreviewDatasetOperationResponse; +}; + +export type ModelHubDatasetsPreviewCreateResponse = ModelHubDatasetsPreviewCreateResponses[keyof ModelHubDatasetsPreviewCreateResponses]; + +export type ModelHubDeleteEvalTemplateCreateData = { + body: DeleteEvalTemplate; + path?: never; + query?: never; + url: '/model-hub/delete-eval-template/'; +}; + +export type ModelHubDeleteEvalTemplateCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDeleteEvalTemplateCreateError = ModelHubDeleteEvalTemplateCreateErrors[keyof ModelHubDeleteEvalTemplateCreateErrors]; + +export type ModelHubDeleteEvalTemplateCreateResponses = { + /** + * Response + */ + 200: ModelHubStringResultResponse; +}; + +export type ModelHubDeleteEvalTemplateCreateResponse = ModelHubDeleteEvalTemplateCreateResponses[keyof ModelHubDeleteEvalTemplateCreateResponses]; + +export type ModelHubDevelopsAddAsNewCreateData = { + body: AddAsNewDatasetRequest; + path?: never; + query?: never; + url: '/model-hub/develops/add-as-new/'; +}; + +export type ModelHubDevelopsAddAsNewCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddAsNewCreateError = ModelHubDevelopsAddAsNewCreateErrors[keyof ModelHubDevelopsAddAsNewCreateErrors]; + +export type ModelHubDevelopsAddAsNewCreateResponses = { + /** + * Response + */ + 200: DatasetCopyResponse; +}; + +export type ModelHubDevelopsAddAsNewCreateResponse = ModelHubDevelopsAddAsNewCreateResponses[keyof ModelHubDevelopsAddAsNewCreateResponses]; + +export type ModelHubDevelopsAddRowsFromFileCreateData = { + body: AddRowsFromFileRequestWritable; + path?: never; + query?: never; + url: '/model-hub/develops/add_rows_from_file/'; +}; + +export type ModelHubDevelopsAddRowsFromFileCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddRowsFromFileCreateError = ModelHubDevelopsAddRowsFromFileCreateErrors[keyof ModelHubDevelopsAddRowsFromFileCreateErrors]; + +export type ModelHubDevelopsAddRowsFromFileCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsAddRowsFromFileCreateResponse = ModelHubDevelopsAddRowsFromFileCreateResponses[keyof ModelHubDevelopsAddRowsFromFileCreateResponses]; + +export type ModelHubDevelopsAddRowsSdkCreateData = { + body: DatasetSdkRowsRequest; + path?: never; + query?: never; + url: '/model-hub/develops/add_rows_sdk/'; +}; + +export type ModelHubDevelopsAddRowsSdkCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddRowsSdkCreateError = ModelHubDevelopsAddRowsSdkCreateErrors[keyof ModelHubDevelopsAddRowsSdkCreateErrors]; + +export type ModelHubDevelopsAddRowsSdkCreateResponses = { + /** + * Response + */ + 200: DatasetSdkRowsResponse; +}; + +export type ModelHubDevelopsAddRowsSdkCreateResponse = ModelHubDevelopsAddRowsSdkCreateResponses[keyof ModelHubDevelopsAddRowsSdkCreateResponses]; + +export type ModelHubDevelopsAddRunPromptColumnCreateData = { + body: AddRunPrompt; + path?: never; + query?: never; + url: '/model-hub/develops/add_run_prompt_column/'; +}; + +export type ModelHubDevelopsAddRunPromptColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddRunPromptColumnCreateError = ModelHubDevelopsAddRunPromptColumnCreateErrors[keyof ModelHubDevelopsAddRunPromptColumnCreateErrors]; + +export type ModelHubDevelopsAddRunPromptColumnCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsAddRunPromptColumnCreateResponse = ModelHubDevelopsAddRunPromptColumnCreateResponses[keyof ModelHubDevelopsAddRunPromptColumnCreateResponses]; + +export type ModelHubDevelopsCloneDatasetCreateData = { + body: CloneDatasetRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/clone-dataset/{dataset_id}/'; +}; + +export type ModelHubDevelopsCloneDatasetCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsCloneDatasetCreateError = ModelHubDevelopsCloneDatasetCreateErrors[keyof ModelHubDevelopsCloneDatasetCreateErrors]; + +export type ModelHubDevelopsCloneDatasetCreateResponses = { + /** + * Response + */ + 200: DatasetCopyResponse; +}; + +export type ModelHubDevelopsCloneDatasetCreateResponse = ModelHubDevelopsCloneDatasetCreateResponses[keyof ModelHubDevelopsCloneDatasetCreateResponses]; + +export type ModelHubDevelopsCreateDatasetFromHuggingfaceCreateData = { + body: HuggingFaceDatasetCreateRequest; + path?: never; + query?: never; + url: '/model-hub/develops/create-dataset-from-huggingface/'; +}; + +export type ModelHubDevelopsCreateDatasetFromHuggingfaceCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsCreateDatasetFromHuggingfaceCreateError = ModelHubDevelopsCreateDatasetFromHuggingfaceCreateErrors[keyof ModelHubDevelopsCreateDatasetFromHuggingfaceCreateErrors]; + +export type ModelHubDevelopsCreateDatasetFromHuggingfaceCreateResponses = { + /** + * Response + */ + 200: DatasetCreateStartedResponse; +}; + +export type ModelHubDevelopsCreateDatasetFromHuggingfaceCreateResponse = ModelHubDevelopsCreateDatasetFromHuggingfaceCreateResponses[keyof ModelHubDevelopsCreateDatasetFromHuggingfaceCreateResponses]; + +export type CreateDatasetFromLocalFileData = { + body: CreateDatasetFromLocalFileRequestWritable; + path?: never; + query?: never; + url: '/model-hub/develops/create-dataset-from-local-file/'; +}; + +export type CreateDatasetFromLocalFileErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateDatasetFromLocalFileError = CreateDatasetFromLocalFileErrors[keyof CreateDatasetFromLocalFileErrors]; + +export type CreateDatasetFromLocalFileResponses = { + /** + * Response + */ + 200: LocalFileDatasetCreateStartedResponse; +}; + +export type CreateDatasetFromLocalFileResponse = CreateDatasetFromLocalFileResponses[keyof CreateDatasetFromLocalFileResponses]; + +export type CreateDatasetManuallyData = { + body: ManualDatasetCreateRequest; + path?: never; + query?: never; + url: '/model-hub/develops/create-dataset-manually/'; +}; + +export type CreateDatasetManuallyErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateDatasetManuallyError = CreateDatasetManuallyErrors[keyof CreateDatasetManuallyErrors]; + +export type CreateDatasetManuallyResponses = { + /** + * Response + */ + 200: ManualDatasetCreateResponse; +}; + +export type CreateDatasetManuallyResponse = CreateDatasetManuallyResponses[keyof CreateDatasetManuallyResponses]; + +export type CreateEmptyDatasetData = { + body: CreateEmptyDatasetRequest; + path?: never; + query?: never; + url: '/model-hub/develops/create-empty-dataset/'; +}; + +export type CreateEmptyDatasetErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateEmptyDatasetError = CreateEmptyDatasetErrors[keyof CreateEmptyDatasetErrors]; + +export type CreateEmptyDatasetResponses = { + /** + * Response + */ + 200: DatasetCreateStartedResponse; +}; + +export type CreateEmptyDatasetResponse = CreateEmptyDatasetResponses[keyof CreateEmptyDatasetResponses]; + +export type ModelHubDevelopsCreateSyntheticDatasetCreateData = { + body: SyntheticDatasetCreation; + path?: never; + query?: never; + url: '/model-hub/develops/create-synthetic-dataset/'; +}; + +export type ModelHubDevelopsCreateSyntheticDatasetCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsCreateSyntheticDatasetCreateError = ModelHubDevelopsCreateSyntheticDatasetCreateErrors[keyof ModelHubDevelopsCreateSyntheticDatasetCreateErrors]; + +export type ModelHubDevelopsCreateSyntheticDatasetCreateResponses = { + /** + * Response + */ + 200: SyntheticDatasetCreateStartedResponse; +}; + +export type ModelHubDevelopsCreateSyntheticDatasetCreateResponse = ModelHubDevelopsCreateSyntheticDatasetCreateResponses[keyof ModelHubDevelopsCreateSyntheticDatasetCreateResponses]; + +export type ModelHubDevelopsDatasetCreationProgressReadData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/dataset-creation-progress/{dataset_id}/'; +}; + +export type ModelHubDevelopsDatasetCreationProgressReadErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsDatasetCreationProgressReadError = ModelHubDevelopsDatasetCreationProgressReadErrors[keyof ModelHubDevelopsDatasetCreationProgressReadErrors]; + +export type ModelHubDevelopsDatasetCreationProgressReadResponses = { + /** + * Response + */ + 200: DatasetCreationProgressResponse; +}; + +export type ModelHubDevelopsDatasetCreationProgressReadResponse = ModelHubDevelopsDatasetCreationProgressReadResponses[keyof ModelHubDevelopsDatasetCreationProgressReadResponses]; + +export type ModelHubDevelopsDeleteDatasetDeleteData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/develops/delete_dataset/'; +}; + +export type ModelHubDevelopsDeleteDatasetDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsDeleteDatasetDeleteError = ModelHubDevelopsDeleteDatasetDeleteErrors[keyof ModelHubDevelopsDeleteDatasetDeleteErrors]; + +export type ModelHubDevelopsDeleteDatasetDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubDevelopsDeleteDatasetDeleteResponse = ModelHubDevelopsDeleteDatasetDeleteResponses[keyof ModelHubDevelopsDeleteDatasetDeleteResponses]; + +export type ModelHubDevelopsEditRunPromptColumnCreateData = { + body: EditRunPromptColumn; + path?: never; + query?: never; + url: '/model-hub/develops/edit_run_prompt_column/'; +}; + +export type ModelHubDevelopsEditRunPromptColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsEditRunPromptColumnCreateError = ModelHubDevelopsEditRunPromptColumnCreateErrors[keyof ModelHubDevelopsEditRunPromptColumnCreateErrors]; + +export type ModelHubDevelopsEditRunPromptColumnCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsEditRunPromptColumnCreateResponse = ModelHubDevelopsEditRunPromptColumnCreateResponses[keyof ModelHubDevelopsEditRunPromptColumnCreateResponses]; + +export type ModelHubDevelopsGetCellDataCreateData = { + body: DatasetCellDataRequest; + path?: never; + query?: never; + url: '/model-hub/develops/get-cell-data/'; +}; + +export type ModelHubDevelopsGetCellDataCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetCellDataCreateError = ModelHubDevelopsGetCellDataCreateErrors[keyof ModelHubDevelopsGetCellDataCreateErrors]; + +export type ModelHubDevelopsGetCellDataCreateResponses = { + /** + * Response + */ + 200: DatasetCellDataResponse; +}; + +export type ModelHubDevelopsGetCellDataCreateResponse = ModelHubDevelopsGetCellDataCreateResponses[keyof ModelHubDevelopsGetCellDataCreateResponses]; + +export type ListDatasetNamesData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/develops/get-datasets-names/'; +}; + +export type ListDatasetNamesErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListDatasetNamesError = ListDatasetNamesErrors[keyof ListDatasetNamesErrors]; + +export type ListDatasetNamesResponses = { + /** + * Response + */ + 200: DatasetNamesResponse; +}; + +export type ListDatasetNamesResponse = ListDatasetNamesResponses[keyof ListDatasetNamesResponses]; + +export type ListDatasetsData = { + body?: never; + path?: never; + query?: { + search_text?: string; + page?: number; + page_size?: number; + sort?: string; + }; + url: '/model-hub/develops/get-datasets/'; +}; + +export type ListDatasetsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListDatasetsError = ListDatasetsErrors[keyof ListDatasetsErrors]; + +export type ListDatasetsResponses = { + /** + * Response + */ + 200: DatasetListResponse; +}; + +export type ListDatasetsResponse = ListDatasetsResponses[keyof ListDatasetsResponses]; + +export type ModelHubDevelopsGetDerivedDatasetsReadData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/get-derived-datasets/{dataset_id}/'; +}; + +export type ModelHubDevelopsGetDerivedDatasetsReadErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetDerivedDatasetsReadError = ModelHubDevelopsGetDerivedDatasetsReadErrors[keyof ModelHubDevelopsGetDerivedDatasetsReadErrors]; + +export type ModelHubDevelopsGetDerivedDatasetsReadResponses = { + /** + * Response + */ + 200: DatasetExplanationSummaryResponse; +}; + +export type ModelHubDevelopsGetDerivedDatasetsReadResponse = ModelHubDevelopsGetDerivedDatasetsReadResponses[keyof ModelHubDevelopsGetDerivedDatasetsReadResponses]; + +export type ModelHubDevelopsGetHuggingfaceDatasetConfigCreateData = { + body: HuggingFaceDatasetConfigRequest; + path?: never; + query?: never; + url: '/model-hub/develops/get-huggingface-dataset-config/'; +}; + +export type ModelHubDevelopsGetHuggingfaceDatasetConfigCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetHuggingfaceDatasetConfigCreateError = ModelHubDevelopsGetHuggingfaceDatasetConfigCreateErrors[keyof ModelHubDevelopsGetHuggingfaceDatasetConfigCreateErrors]; + +export type ModelHubDevelopsGetHuggingfaceDatasetConfigCreateResponses = { + /** + * Response + */ + 200: HuggingFaceDatasetConfigResponse; +}; + +export type ModelHubDevelopsGetHuggingfaceDatasetConfigCreateResponse = ModelHubDevelopsGetHuggingfaceDatasetConfigCreateResponses[keyof ModelHubDevelopsGetHuggingfaceDatasetConfigCreateResponses]; + +export type ModelHubDevelopsGetRowDiffCreateData = { + body: DatasetRowDiffRequest2; + path?: never; + query?: never; + url: '/model-hub/develops/get-row-diff/'; +}; + +export type ModelHubDevelopsGetRowDiffCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetRowDiffCreateError = ModelHubDevelopsGetRowDiffCreateErrors[keyof ModelHubDevelopsGetRowDiffCreateErrors]; + +export type ModelHubDevelopsGetRowDiffCreateResponses = { + /** + * Response + */ + 200: ExperimentRowDiffResponse; +}; + +export type ModelHubDevelopsGetRowDiffCreateResponse = ModelHubDevelopsGetRowDiffCreateResponses[keyof ModelHubDevelopsGetRowDiffCreateResponses]; + +export type ModelHubDevelopsGetFunctionListListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/develops/get_function_list/'; +}; + +export type ModelHubDevelopsGetFunctionListListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetFunctionListListError = ModelHubDevelopsGetFunctionListListErrors[keyof ModelHubDevelopsGetFunctionListListErrors]; + +export type ModelHubDevelopsGetFunctionListListResponses = { + /** + * Response + */ + 200: EvalFunctionListResponse; +}; + +export type ModelHubDevelopsGetFunctionListListResponse = ModelHubDevelopsGetFunctionListListResponses[keyof ModelHubDevelopsGetFunctionListListResponses]; + +export type ModelHubDevelopsPreviewRunPromptColumnCreateData = { + body: PreviewRunPrompt; + path?: never; + query?: never; + url: '/model-hub/develops/preview_run_prompt_column/'; +}; + +export type ModelHubDevelopsPreviewRunPromptColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsPreviewRunPromptColumnCreateError = ModelHubDevelopsPreviewRunPromptColumnCreateErrors[keyof ModelHubDevelopsPreviewRunPromptColumnCreateErrors]; + +export type ModelHubDevelopsPreviewRunPromptColumnCreateResponses = { + /** + * Response + */ + 200: RunPromptColumnPreviewResponse; +}; + +export type ModelHubDevelopsPreviewRunPromptColumnCreateResponse = ModelHubDevelopsPreviewRunPromptColumnCreateResponses[keyof ModelHubDevelopsPreviewRunPromptColumnCreateResponses]; + +export type ModelHubDevelopsProviderStatusListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/develops/provider-status/'; +}; + +export type ModelHubDevelopsProviderStatusListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsProviderStatusListError = ModelHubDevelopsProviderStatusListErrors[keyof ModelHubDevelopsProviderStatusListErrors]; + +export type ModelHubDevelopsProviderStatusListResponses = { + /** + * Response + */ + 200: ProviderStatusResponse; +}; + +export type ModelHubDevelopsProviderStatusListResponse = ModelHubDevelopsProviderStatusListResponses[keyof ModelHubDevelopsProviderStatusListResponses]; + +export type ModelHubDevelopsRetrieveRunPromptColumnConfigListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/develops/retrieve_run_prompt_column_config/'; +}; + +export type ModelHubDevelopsRetrieveRunPromptColumnConfigListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsRetrieveRunPromptColumnConfigListError = ModelHubDevelopsRetrieveRunPromptColumnConfigListErrors[keyof ModelHubDevelopsRetrieveRunPromptColumnConfigListErrors]; + +export type ModelHubDevelopsRetrieveRunPromptColumnConfigListResponses = { + /** + * Response + */ + 200: RunPromptColumnConfigResponse; +}; + +export type ModelHubDevelopsRetrieveRunPromptColumnConfigListResponse = ModelHubDevelopsRetrieveRunPromptColumnConfigListResponses[keyof ModelHubDevelopsRetrieveRunPromptColumnConfigListResponses]; + +export type ModelHubDevelopsRetrieveRunPromptOptionsListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/develops/retrieve_run_prompt_options/'; +}; + +export type ModelHubDevelopsRetrieveRunPromptOptionsListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsRetrieveRunPromptOptionsListError = ModelHubDevelopsRetrieveRunPromptOptionsListErrors[keyof ModelHubDevelopsRetrieveRunPromptOptionsListErrors]; + +export type ModelHubDevelopsRetrieveRunPromptOptionsListResponses = { + /** + * Response + */ + 200: RunPromptOptionsResponse; +}; + +export type ModelHubDevelopsRetrieveRunPromptOptionsListResponse = ModelHubDevelopsRetrieveRunPromptOptionsListResponses[keyof ModelHubDevelopsRetrieveRunPromptOptionsListResponses]; + +export type AddDatasetColumnsData = { + body: DatasetAddColumnsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_columns/'; +}; + +export type AddDatasetColumnsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AddDatasetColumnsError = AddDatasetColumnsErrors[keyof AddDatasetColumnsErrors]; + +export type AddDatasetColumnsResponses = { + /** + * Response + */ + 200: DatasetColumnsMutationResponse; +}; + +export type AddDatasetColumnsResponse = AddDatasetColumnsResponses[keyof AddDatasetColumnsResponses]; + +export type ModelHubDevelopsAddEmptyColumnsCreateData = { + body: DatasetAddEmptyColumnsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_empty_columns/'; +}; + +export type ModelHubDevelopsAddEmptyColumnsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddEmptyColumnsCreateError = ModelHubDevelopsAddEmptyColumnsCreateErrors[keyof ModelHubDevelopsAddEmptyColumnsCreateErrors]; + +export type ModelHubDevelopsAddEmptyColumnsCreateResponses = { + /** + * Response + */ + 200: DatasetColumnsMutationResponse; +}; + +export type ModelHubDevelopsAddEmptyColumnsCreateResponse = ModelHubDevelopsAddEmptyColumnsCreateResponses[keyof ModelHubDevelopsAddEmptyColumnsCreateResponses]; + +export type ModelHubDevelopsAddEmptyRowsCreateData = { + body: DatasetAddEmptyRowsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_empty_rows/'; +}; + +export type ModelHubDevelopsAddEmptyRowsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddEmptyRowsCreateError = ModelHubDevelopsAddEmptyRowsCreateErrors[keyof ModelHubDevelopsAddEmptyRowsCreateErrors]; + +export type ModelHubDevelopsAddEmptyRowsCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsAddEmptyRowsCreateResponse = ModelHubDevelopsAddEmptyRowsCreateResponses[keyof ModelHubDevelopsAddEmptyRowsCreateResponses]; + +export type ModelHubDevelopsAddMultipleStaticColumnsCreateData = { + body: DatasetMultipleStaticColumnsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_multiple_static_columns/'; +}; + +export type ModelHubDevelopsAddMultipleStaticColumnsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddMultipleStaticColumnsCreateError = ModelHubDevelopsAddMultipleStaticColumnsCreateErrors[keyof ModelHubDevelopsAddMultipleStaticColumnsCreateErrors]; + +export type ModelHubDevelopsAddMultipleStaticColumnsCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsAddMultipleStaticColumnsCreateResponse = ModelHubDevelopsAddMultipleStaticColumnsCreateResponses[keyof ModelHubDevelopsAddMultipleStaticColumnsCreateResponses]; + +export type AddDatasetRowsData = { + body: DatasetAddRowsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_rows/'; +}; + +export type AddDatasetRowsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type AddDatasetRowsError = AddDatasetRowsErrors[keyof AddDatasetRowsErrors]; + +export type AddDatasetRowsResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type AddDatasetRowsResponse = AddDatasetRowsResponses[keyof AddDatasetRowsResponses]; + +export type ModelHubDevelopsAddRowsFromExistingDatasetCreateData = { + body: DatasetAddRowsFromExistingRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_rows_from_existing_dataset/'; +}; + +export type ModelHubDevelopsAddRowsFromExistingDatasetCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddRowsFromExistingDatasetCreateError = ModelHubDevelopsAddRowsFromExistingDatasetCreateErrors[keyof ModelHubDevelopsAddRowsFromExistingDatasetCreateErrors]; + +export type ModelHubDevelopsAddRowsFromExistingDatasetCreateResponses = { + /** + * Response + */ + 200: DatasetRowsImportedResponse; +}; + +export type ModelHubDevelopsAddRowsFromExistingDatasetCreateResponse = ModelHubDevelopsAddRowsFromExistingDatasetCreateResponses[keyof ModelHubDevelopsAddRowsFromExistingDatasetCreateResponses]; + +export type ModelHubDevelopsAddRowsFromHuggingfaceCreateData = { + body: HuggingFaceAddRowsRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_rows_from_huggingface/'; +}; + +export type ModelHubDevelopsAddRowsFromHuggingfaceCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddRowsFromHuggingfaceCreateError = ModelHubDevelopsAddRowsFromHuggingfaceCreateErrors[keyof ModelHubDevelopsAddRowsFromHuggingfaceCreateErrors]; + +export type ModelHubDevelopsAddRowsFromHuggingfaceCreateResponses = { + /** + * Response + */ + 200: DatasetRowsImportMessageResponse; +}; + +export type ModelHubDevelopsAddRowsFromHuggingfaceCreateResponse = ModelHubDevelopsAddRowsFromHuggingfaceCreateResponses[keyof ModelHubDevelopsAddRowsFromHuggingfaceCreateResponses]; + +export type ModelHubDevelopsAddStaticColumnCreateData = { + body: DatasetStaticColumnRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_static_column/'; +}; + +export type ModelHubDevelopsAddStaticColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddStaticColumnCreateError = ModelHubDevelopsAddStaticColumnCreateErrors[keyof ModelHubDevelopsAddStaticColumnCreateErrors]; + +export type ModelHubDevelopsAddStaticColumnCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsAddStaticColumnCreateResponse = ModelHubDevelopsAddStaticColumnCreateResponses[keyof ModelHubDevelopsAddStaticColumnCreateResponses]; + +export type ModelHubDevelopsAddSyntheticDataCreateData = { + body: SyntheticData; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_synthetic_data/'; +}; + +export type ModelHubDevelopsAddSyntheticDataCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddSyntheticDataCreateError = ModelHubDevelopsAddSyntheticDataCreateErrors[keyof ModelHubDevelopsAddSyntheticDataCreateErrors]; + +export type ModelHubDevelopsAddSyntheticDataCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsAddSyntheticDataCreateResponse = ModelHubDevelopsAddSyntheticDataCreateResponses[keyof ModelHubDevelopsAddSyntheticDataCreateResponses]; + +export type ModelHubDevelopsAddUserEvalCreateData = { + body: UserEvalMutationRequest2; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/add_user_eval/'; +}; + +export type ModelHubDevelopsAddUserEvalCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsAddUserEvalCreateError = ModelHubDevelopsAddUserEvalCreateErrors[keyof ModelHubDevelopsAddUserEvalCreateErrors]; + +export type ModelHubDevelopsAddUserEvalCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsAddUserEvalCreateResponse = ModelHubDevelopsAddUserEvalCreateResponses[keyof ModelHubDevelopsAddUserEvalCreateResponses]; + +export type DeleteDatasetColumnData = { + body?: never; + path: { + dataset_id: string; + column_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/delete_column/{column_id}/'; +}; + +export type DeleteDatasetColumnErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeleteDatasetColumnError = DeleteDatasetColumnErrors[keyof DeleteDatasetColumnErrors]; + +export type DeleteDatasetColumnResponses = { + /** + * Response + */ + 204: void; +}; + +export type DeleteDatasetColumnResponse = DeleteDatasetColumnResponses[keyof DeleteDatasetColumnResponses]; + +export type DeleteDatasetRowData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/delete_row/'; +}; + +export type DeleteDatasetRowErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeleteDatasetRowError = DeleteDatasetRowErrors[keyof DeleteDatasetRowErrors]; + +export type DeleteDatasetRowResponses = { + /** + * Response + */ + 204: void; +}; + +export type DeleteDatasetRowResponse = DeleteDatasetRowResponses[keyof DeleteDatasetRowResponses]; + +export type ModelHubDevelopsDeleteTemplateEvalDeleteData = { + body?: never; + path: { + dataset_id: string; + eval_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/delete_template_eval/{eval_id}/'; +}; + +export type ModelHubDevelopsDeleteTemplateEvalDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsDeleteTemplateEvalDeleteError = ModelHubDevelopsDeleteTemplateEvalDeleteErrors[keyof ModelHubDevelopsDeleteTemplateEvalDeleteErrors]; + +export type ModelHubDevelopsDeleteTemplateEvalDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubDevelopsDeleteTemplateEvalDeleteResponse = ModelHubDevelopsDeleteTemplateEvalDeleteResponses[keyof ModelHubDevelopsDeleteTemplateEvalDeleteResponses]; + +export type ModelHubDevelopsDeleteUserEvalDeleteData = { + body?: never; + path: { + dataset_id: string; + eval_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/delete_user_eval/{eval_id}/'; +}; + +export type ModelHubDevelopsDeleteUserEvalDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsDeleteUserEvalDeleteError = ModelHubDevelopsDeleteUserEvalDeleteErrors[keyof ModelHubDevelopsDeleteUserEvalDeleteErrors]; + +export type ModelHubDevelopsDeleteUserEvalDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubDevelopsDeleteUserEvalDeleteResponse = ModelHubDevelopsDeleteUserEvalDeleteResponses[keyof ModelHubDevelopsDeleteUserEvalDeleteResponses]; + +export type DownloadDatasetData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/download_dataset/'; +}; + +export type DownloadDatasetErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DownloadDatasetError = DownloadDatasetErrors[keyof DownloadDatasetErrors]; + +export type DownloadDatasetResponses = { + /** + * CSV export + */ + 200: Blob | File; +}; + +export type DownloadDatasetResponse = DownloadDatasetResponses[keyof DownloadDatasetResponses]; + +export type ModelHubDevelopsEditAndRunUserEvalCreateData = { + body: UserEvalUpdateRequest; + path: { + dataset_id: string; + eval_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/edit_and_run_user_eval/{eval_id}/'; +}; + +export type ModelHubDevelopsEditAndRunUserEvalCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsEditAndRunUserEvalCreateError = ModelHubDevelopsEditAndRunUserEvalCreateErrors[keyof ModelHubDevelopsEditAndRunUserEvalCreateErrors]; + +export type ModelHubDevelopsEditAndRunUserEvalCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsEditAndRunUserEvalCreateResponse = ModelHubDevelopsEditAndRunUserEvalCreateResponses[keyof ModelHubDevelopsEditAndRunUserEvalCreateResponses]; + +export type ModelHubDevelopsEditDatasetBehaviorUpdateData = { + body: DatasetBehaviorRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/edit_dataset_behavior/'; +}; + +export type ModelHubDevelopsEditDatasetBehaviorUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsEditDatasetBehaviorUpdateError = ModelHubDevelopsEditDatasetBehaviorUpdateErrors[keyof ModelHubDevelopsEditDatasetBehaviorUpdateErrors]; + +export type ModelHubDevelopsEditDatasetBehaviorUpdateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsEditDatasetBehaviorUpdateResponse = ModelHubDevelopsEditDatasetBehaviorUpdateResponses[keyof ModelHubDevelopsEditDatasetBehaviorUpdateResponses]; + +export type ModelHubDevelopsExtractJsonColumnCreateData = { + body: ExtractJsonColumnRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/extract-json-column/'; +}; + +export type ModelHubDevelopsExtractJsonColumnCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsExtractJsonColumnCreateError = ModelHubDevelopsExtractJsonColumnCreateErrors[keyof ModelHubDevelopsExtractJsonColumnCreateErrors]; + +export type ModelHubDevelopsExtractJsonColumnCreateResponses = { + /** + * Response + */ + 200: DynamicColumnCreateResponse; +}; + +export type ModelHubDevelopsExtractJsonColumnCreateResponse = ModelHubDevelopsExtractJsonColumnCreateResponses[keyof ModelHubDevelopsExtractJsonColumnCreateResponses]; + +export type GetDatasetTableData = { + body?: never; + path: { + dataset_id: string; + }; + query?: { + filters?: string; + sort?: string; + search?: string; + page_size?: number; + current_page_index?: number; + column_config_only?: boolean; + }; + url: '/model-hub/develops/{dataset_id}/get-dataset-table/'; +}; + +export type GetDatasetTableErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetDatasetTableError = GetDatasetTableErrors[keyof GetDatasetTableErrors]; + +export type GetDatasetTableResponses = { + /** + * Response + */ + 200: DatasetTableResponse; +}; + +export type GetDatasetTableResponse = GetDatasetTableResponses[keyof GetDatasetTableResponses]; + +export type GetDatasetRowData = { + body: DatasetRowDataRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/get-row-data/'; +}; + +export type GetDatasetRowErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetDatasetRowError = GetDatasetRowErrors[keyof GetDatasetRowErrors]; + +export type GetDatasetRowResponses = { + /** + * Response + */ + 200: DatasetRowDataResponse; +}; + +export type GetDatasetRowResponse = GetDatasetRowResponses[keyof GetDatasetRowResponses]; + +export type ModelHubDevelopsGetEvalStructureReadData = { + body?: never; + path: { + dataset_id: string; + eval_id: string; + }; + query: { + eval_type: 'preset' | 'user' | 'previously_configured'; + }; + url: '/model-hub/develops/{dataset_id}/get_eval_structure/{eval_id}/'; +}; + +export type ModelHubDevelopsGetEvalStructureReadErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetEvalStructureReadError = ModelHubDevelopsGetEvalStructureReadErrors[keyof ModelHubDevelopsGetEvalStructureReadErrors]; + +export type ModelHubDevelopsGetEvalStructureReadResponses = { + /** + * Response + */ + 200: EvalStructureResponse; +}; + +export type ModelHubDevelopsGetEvalStructureReadResponse = ModelHubDevelopsGetEvalStructureReadResponses[keyof ModelHubDevelopsGetEvalStructureReadResponses]; + +export type ModelHubDevelopsGetEvalsListListData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/get_evals_list/'; +}; + +export type ModelHubDevelopsGetEvalsListListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetEvalsListListError = ModelHubDevelopsGetEvalsListListErrors[keyof ModelHubDevelopsGetEvalsListListErrors]; + +export type ModelHubDevelopsGetEvalsListListResponses = { + /** + * Response + */ + 200: EvalListResponse; +}; + +export type ModelHubDevelopsGetEvalsListListResponse = ModelHubDevelopsGetEvalsListListResponses[keyof ModelHubDevelopsGetEvalsListListResponses]; + +export type ModelHubDevelopsPreviewRunEvalCreateData = { + body: PreviewRunEvalRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/preview_run_eval/'; +}; + +export type ModelHubDevelopsPreviewRunEvalCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsPreviewRunEvalCreateError = ModelHubDevelopsPreviewRunEvalCreateErrors[keyof ModelHubDevelopsPreviewRunEvalCreateErrors]; + +export type ModelHubDevelopsPreviewRunEvalCreateResponses = { + /** + * Response + */ + 200: EvalPreviewResponse; +}; + +export type ModelHubDevelopsPreviewRunEvalCreateResponse = ModelHubDevelopsPreviewRunEvalCreateResponses[keyof ModelHubDevelopsPreviewRunEvalCreateResponses]; + +export type ModelHubDevelopsStartEvalsProcessCreateData = { + body: StartEvalsProcessRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/start_evals_process/'; +}; + +export type ModelHubDevelopsStartEvalsProcessCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsStartEvalsProcessCreateError = ModelHubDevelopsStartEvalsProcessCreateErrors[keyof ModelHubDevelopsStartEvalsProcessCreateErrors]; + +export type ModelHubDevelopsStartEvalsProcessCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsStartEvalsProcessCreateResponse = ModelHubDevelopsStartEvalsProcessCreateResponses[keyof ModelHubDevelopsStartEvalsProcessCreateResponses]; + +export type ModelHubDevelopsStopUserEvalCreateData = { + body: StopUserEvalRequest; + path: { + dataset_id: string; + eval_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/stop_user_eval/{eval_id}/'; +}; + +export type ModelHubDevelopsStopUserEvalCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsStopUserEvalCreateError = ModelHubDevelopsStopUserEvalCreateErrors[keyof ModelHubDevelopsStopUserEvalCreateErrors]; + +export type ModelHubDevelopsStopUserEvalCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsStopUserEvalCreateResponse = ModelHubDevelopsStopUserEvalCreateResponses[keyof ModelHubDevelopsStopUserEvalCreateResponses]; + +export type ModelHubDevelopsSyntheticConfigListData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/synthetic-config/'; +}; + +export type ModelHubDevelopsSyntheticConfigListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsSyntheticConfigListError = ModelHubDevelopsSyntheticConfigListErrors[keyof ModelHubDevelopsSyntheticConfigListErrors]; + +export type ModelHubDevelopsSyntheticConfigListResponses = { + /** + * Response + */ + 200: SyntheticDatasetConfigResponse; +}; + +export type ModelHubDevelopsSyntheticConfigListResponse = ModelHubDevelopsSyntheticConfigListResponses[keyof ModelHubDevelopsSyntheticConfigListResponses]; + +export type ModelHubDevelopsUpdateSyntheticConfigUpdateData = { + body: SyntheticDatasetConfig; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/update-synthetic-config/'; +}; + +export type ModelHubDevelopsUpdateSyntheticConfigUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsUpdateSyntheticConfigUpdateError = ModelHubDevelopsUpdateSyntheticConfigUpdateErrors[keyof ModelHubDevelopsUpdateSyntheticConfigUpdateErrors]; + +export type ModelHubDevelopsUpdateSyntheticConfigUpdateResponses = { + /** + * Response + */ + 200: SyntheticDatasetUpdateResponse; +}; + +export type ModelHubDevelopsUpdateSyntheticConfigUpdateResponse = ModelHubDevelopsUpdateSyntheticConfigUpdateResponses[keyof ModelHubDevelopsUpdateSyntheticConfigUpdateResponses]; + +export type UpdateDatasetCellData = { + body: DatasetUpdateCellValueRequest; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/update_cell_value/'; +}; + +export type UpdateDatasetCellErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateDatasetCellError = UpdateDatasetCellErrors[keyof UpdateDatasetCellErrors]; + +export type UpdateDatasetCellResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type UpdateDatasetCellResponse = UpdateDatasetCellResponses[keyof UpdateDatasetCellResponses]; + +export type ModelHubDevelopsUpdateColumnNameUpdateData = { + body: DatasetUpdateColumnNameRequest; + path: { + dataset_id: string; + column_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/update_column_name/{column_id}/'; +}; + +export type ModelHubDevelopsUpdateColumnNameUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsUpdateColumnNameUpdateError = ModelHubDevelopsUpdateColumnNameUpdateErrors[keyof ModelHubDevelopsUpdateColumnNameUpdateErrors]; + +export type ModelHubDevelopsUpdateColumnNameUpdateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsUpdateColumnNameUpdateResponse = ModelHubDevelopsUpdateColumnNameUpdateResponses[keyof ModelHubDevelopsUpdateColumnNameUpdateResponses]; + +export type ModelHubDevelopsUpdateColumnTypeUpdateData = { + body: DatasetUpdateColumnTypeRequest; + path: { + dataset_id: string; + column_id: string; + }; + query?: never; + url: '/model-hub/develops/{dataset_id}/update_column_type/{column_id}/'; +}; + +export type ModelHubDevelopsUpdateColumnTypeUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsUpdateColumnTypeUpdateError = ModelHubDevelopsUpdateColumnTypeUpdateErrors[keyof ModelHubDevelopsUpdateColumnTypeUpdateErrors]; + +export type ModelHubDevelopsUpdateColumnTypeUpdateResponses = { + /** + * Response + */ + 200: ColumnTypeConversionResponse; +}; + +export type ModelHubDevelopsUpdateColumnTypeUpdateResponse = ModelHubDevelopsUpdateColumnTypeUpdateResponses[keyof ModelHubDevelopsUpdateColumnTypeUpdateResponses]; + +export type ModelHubDevelopsCreateDatasetCreateData = { + body: CreateDatasetFromExperimentRequest; + path: { + exp_dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{exp_dataset_id}/create-dataset/'; +}; + +export type ModelHubDevelopsCreateDatasetCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsCreateDatasetCreateError = ModelHubDevelopsCreateDatasetCreateErrors[keyof ModelHubDevelopsCreateDatasetCreateErrors]; + +export type ModelHubDevelopsCreateDatasetCreateResponses = { + /** + * Response + */ + 200: DevelopDatasetMessageResponse; +}; + +export type ModelHubDevelopsCreateDatasetCreateResponse = ModelHubDevelopsCreateDatasetCreateResponses[keyof ModelHubDevelopsCreateDatasetCreateResponses]; + +export type ModelHubDevelopsGetExperimentDatasetTableListData = { + body?: never; + path: { + experiment_dataset_id: string; + }; + query?: never; + url: '/model-hub/develops/{experiment_dataset_id}/get-experiment-dataset-table/'; +}; + +export type ModelHubDevelopsGetExperimentDatasetTableListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubDevelopsGetExperimentDatasetTableListError = ModelHubDevelopsGetExperimentDatasetTableListErrors[keyof ModelHubDevelopsGetExperimentDatasetTableListErrors]; + +export type ModelHubDevelopsGetExperimentDatasetTableListResponses = { + /** + * Response + */ + 200: DatasetTableResponse; +}; + +export type ModelHubDevelopsGetExperimentDatasetTableListResponse = ModelHubDevelopsGetExperimentDatasetTableListResponses[keyof ModelHubDevelopsGetExperimentDatasetTableListResponses]; + +export type ModelHubEvalTemplatesBulkDeleteCreateData = { + body: EvalTemplateBulkDeleteRequest; + path?: never; + query?: never; + url: '/model-hub/eval-templates/bulk-delete/'; +}; + +export type ModelHubEvalTemplatesBulkDeleteCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesBulkDeleteCreateError = ModelHubEvalTemplatesBulkDeleteCreateErrors[keyof ModelHubEvalTemplatesBulkDeleteCreateErrors]; + +export type ModelHubEvalTemplatesBulkDeleteCreateResponses = { + /** + * Response + */ + 200: EvalTemplateBulkDeleteResponse; +}; + +export type ModelHubEvalTemplatesBulkDeleteCreateResponse = ModelHubEvalTemplatesBulkDeleteCreateResponses[keyof ModelHubEvalTemplatesBulkDeleteCreateResponses]; + +export type ModelHubEvalTemplatesCompositeExecuteAdhocCreateData = { + body: CompositeEvalAdhocExecuteRequest; + path?: never; + query?: never; + url: '/model-hub/eval-templates/composite/execute-adhoc/'; +}; + +export type ModelHubEvalTemplatesCompositeExecuteAdhocCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesCompositeExecuteAdhocCreateError = ModelHubEvalTemplatesCompositeExecuteAdhocCreateErrors[keyof ModelHubEvalTemplatesCompositeExecuteAdhocCreateErrors]; + +export type ModelHubEvalTemplatesCompositeExecuteAdhocCreateResponses = { + /** + * Response + */ + 200: CompositeEvalExecuteResponse; +}; + +export type ModelHubEvalTemplatesCompositeExecuteAdhocCreateResponse = ModelHubEvalTemplatesCompositeExecuteAdhocCreateResponses[keyof ModelHubEvalTemplatesCompositeExecuteAdhocCreateResponses]; + +export type ModelHubEvalTemplatesCreateCompositeCreateData = { + body: CompositeEvalCreateRequest; + path?: never; + query?: never; + url: '/model-hub/eval-templates/create-composite/'; +}; + +export type ModelHubEvalTemplatesCreateCompositeCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesCreateCompositeCreateError = ModelHubEvalTemplatesCreateCompositeCreateErrors[keyof ModelHubEvalTemplatesCreateCompositeCreateErrors]; + +export type ModelHubEvalTemplatesCreateCompositeCreateResponses = { + /** + * Response + */ + 200: CompositeEvalCreateResponse; +}; + +export type ModelHubEvalTemplatesCreateCompositeCreateResponse = ModelHubEvalTemplatesCreateCompositeCreateResponses[keyof ModelHubEvalTemplatesCreateCompositeCreateResponses]; + +export type ModelHubEvalTemplatesCreateV2CreateData = { + body: EvalTemplateCreateV2Request; + path?: never; + query?: never; + url: '/model-hub/eval-templates/create-v2/'; +}; + +export type ModelHubEvalTemplatesCreateV2CreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesCreateV2CreateError = ModelHubEvalTemplatesCreateV2CreateErrors[keyof ModelHubEvalTemplatesCreateV2CreateErrors]; + +export type ModelHubEvalTemplatesCreateV2CreateResponses = { + /** + * Response + */ + 200: EvalTemplateCreateResponse; +}; + +export type ModelHubEvalTemplatesCreateV2CreateResponse = ModelHubEvalTemplatesCreateV2CreateResponses[keyof ModelHubEvalTemplatesCreateV2CreateResponses]; + +export type ModelHubEvalTemplatesListChartsCreateData = { + body: EvalTemplateListChartsRequest; + path?: never; + query?: never; + url: '/model-hub/eval-templates/list-charts/'; +}; + +export type ModelHubEvalTemplatesListChartsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesListChartsCreateError = ModelHubEvalTemplatesListChartsCreateErrors[keyof ModelHubEvalTemplatesListChartsCreateErrors]; + +export type ModelHubEvalTemplatesListChartsCreateResponses = { + /** + * Response + */ + 200: EvalTemplateListChartsResponse; +}; + +export type ModelHubEvalTemplatesListChartsCreateResponse = ModelHubEvalTemplatesListChartsCreateResponses[keyof ModelHubEvalTemplatesListChartsCreateResponses]; + +export type ModelHubEvalTemplatesListCreateData = { + body: EvalListRequest; + path?: never; + query?: never; + url: '/model-hub/eval-templates/list/'; +}; + +export type ModelHubEvalTemplatesListCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesListCreateError = ModelHubEvalTemplatesListCreateErrors[keyof ModelHubEvalTemplatesListCreateErrors]; + +export type ModelHubEvalTemplatesListCreateResponses = { + /** + * Response + */ + 200: EvalTemplateListResponse; +}; + +export type ModelHubEvalTemplatesListCreateResponse = ModelHubEvalTemplatesListCreateResponses[keyof ModelHubEvalTemplatesListCreateResponses]; + +export type ModelHubEvalTemplatesCompositeListData = { + body?: never; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/composite/'; +}; + +export type ModelHubEvalTemplatesCompositeListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesCompositeListError = ModelHubEvalTemplatesCompositeListErrors[keyof ModelHubEvalTemplatesCompositeListErrors]; + +export type ModelHubEvalTemplatesCompositeListResponses = { + /** + * Response + */ + 200: CompositeEvalDetailResponse; +}; + +export type ModelHubEvalTemplatesCompositeListResponse = ModelHubEvalTemplatesCompositeListResponses[keyof ModelHubEvalTemplatesCompositeListResponses]; + +export type ModelHubEvalTemplatesCompositePartialUpdateData = { + body: CompositeEvalUpdateRequest; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/composite/'; +}; + +export type ModelHubEvalTemplatesCompositePartialUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesCompositePartialUpdateError = ModelHubEvalTemplatesCompositePartialUpdateErrors[keyof ModelHubEvalTemplatesCompositePartialUpdateErrors]; + +export type ModelHubEvalTemplatesCompositePartialUpdateResponses = { + /** + * Response + */ + 200: CompositeEvalDetailResponse; +}; + +export type ModelHubEvalTemplatesCompositePartialUpdateResponse = ModelHubEvalTemplatesCompositePartialUpdateResponses[keyof ModelHubEvalTemplatesCompositePartialUpdateResponses]; + +export type ModelHubEvalTemplatesCompositeExecuteCreateData = { + body: CompositeEvalExecuteRequest; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/composite/execute/'; +}; + +export type ModelHubEvalTemplatesCompositeExecuteCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesCompositeExecuteCreateError = ModelHubEvalTemplatesCompositeExecuteCreateErrors[keyof ModelHubEvalTemplatesCompositeExecuteCreateErrors]; + +export type ModelHubEvalTemplatesCompositeExecuteCreateResponses = { + /** + * Response + */ + 200: CompositeEvalExecuteResponse; +}; + +export type ModelHubEvalTemplatesCompositeExecuteCreateResponse = ModelHubEvalTemplatesCompositeExecuteCreateResponses[keyof ModelHubEvalTemplatesCompositeExecuteCreateResponses]; + +export type ModelHubEvalTemplatesDetailListData = { + body?: never; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/detail/'; +}; + +export type ModelHubEvalTemplatesDetailListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesDetailListError = ModelHubEvalTemplatesDetailListErrors[keyof ModelHubEvalTemplatesDetailListErrors]; + +export type ModelHubEvalTemplatesDetailListResponses = { + /** + * Response + */ + 200: EvalTemplateDetailResponse; +}; + +export type ModelHubEvalTemplatesDetailListResponse = ModelHubEvalTemplatesDetailListResponses[keyof ModelHubEvalTemplatesDetailListResponses]; + +export type ModelHubEvalTemplatesFeedbackListListData = { + body?: never; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/feedback-list/'; +}; + +export type ModelHubEvalTemplatesFeedbackListListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesFeedbackListListError = ModelHubEvalTemplatesFeedbackListListErrors[keyof ModelHubEvalTemplatesFeedbackListListErrors]; + +export type ModelHubEvalTemplatesFeedbackListListResponses = { + /** + * Response + */ + 200: EvalFeedbackListResponse; +}; + +export type ModelHubEvalTemplatesFeedbackListListResponse = ModelHubEvalTemplatesFeedbackListListResponses[keyof ModelHubEvalTemplatesFeedbackListListResponses]; + +export type ModelHubEvalTemplatesGroundTruthConfigListData = { + body?: never; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/ground-truth-config/'; +}; + +export type ModelHubEvalTemplatesGroundTruthConfigListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthConfigListError = ModelHubEvalTemplatesGroundTruthConfigListErrors[keyof ModelHubEvalTemplatesGroundTruthConfigListErrors]; + +export type ModelHubEvalTemplatesGroundTruthConfigListResponses = { + /** + * Response + */ + 200: GroundTruthConfigResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthConfigListResponse = ModelHubEvalTemplatesGroundTruthConfigListResponses[keyof ModelHubEvalTemplatesGroundTruthConfigListResponses]; + +export type ModelHubEvalTemplatesGroundTruthConfigUpdateData = { + body: GroundTruthConfigRequest; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/ground-truth-config/'; +}; + +export type ModelHubEvalTemplatesGroundTruthConfigUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthConfigUpdateError = ModelHubEvalTemplatesGroundTruthConfigUpdateErrors[keyof ModelHubEvalTemplatesGroundTruthConfigUpdateErrors]; + +export type ModelHubEvalTemplatesGroundTruthConfigUpdateResponses = { + /** + * Response + */ + 200: GroundTruthConfigResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthConfigUpdateResponse = ModelHubEvalTemplatesGroundTruthConfigUpdateResponses[keyof ModelHubEvalTemplatesGroundTruthConfigUpdateResponses]; + +export type ModelHubEvalTemplatesGroundTruthListData = { + body?: never; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/ground-truth/'; +}; + +export type ModelHubEvalTemplatesGroundTruthListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthListError = ModelHubEvalTemplatesGroundTruthListErrors[keyof ModelHubEvalTemplatesGroundTruthListErrors]; + +export type ModelHubEvalTemplatesGroundTruthListResponses = { + /** + * Response + */ + 200: GroundTruthListResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthListResponse = ModelHubEvalTemplatesGroundTruthListResponses[keyof ModelHubEvalTemplatesGroundTruthListResponses]; + +export type ModelHubEvalTemplatesGroundTruthUploadCreateData = { + body: GroundTruthUploadRequestWritable; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/ground-truth/upload/'; +}; + +export type ModelHubEvalTemplatesGroundTruthUploadCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthUploadCreateError = ModelHubEvalTemplatesGroundTruthUploadCreateErrors[keyof ModelHubEvalTemplatesGroundTruthUploadCreateErrors]; + +export type ModelHubEvalTemplatesGroundTruthUploadCreateResponses = { + /** + * Response + */ + 200: GroundTruthUploadResponse; +}; + +export type ModelHubEvalTemplatesGroundTruthUploadCreateResponse = ModelHubEvalTemplatesGroundTruthUploadCreateResponses[keyof ModelHubEvalTemplatesGroundTruthUploadCreateResponses]; + +export type ModelHubEvalTemplatesUpdateUpdateData = { + body: EvalTemplateUpdateV2Request; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/update/'; +}; + +export type ModelHubEvalTemplatesUpdateUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesUpdateUpdateError = ModelHubEvalTemplatesUpdateUpdateErrors[keyof ModelHubEvalTemplatesUpdateUpdateErrors]; + +export type ModelHubEvalTemplatesUpdateUpdateResponses = { + /** + * Response + */ + 200: EvalTemplateUpdateResponse; +}; + +export type ModelHubEvalTemplatesUpdateUpdateResponse = ModelHubEvalTemplatesUpdateUpdateResponses[keyof ModelHubEvalTemplatesUpdateUpdateResponses]; + +export type ModelHubEvalTemplatesUsageListData = { + body?: never; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/usage/'; +}; + +export type ModelHubEvalTemplatesUsageListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesUsageListError = ModelHubEvalTemplatesUsageListErrors[keyof ModelHubEvalTemplatesUsageListErrors]; + +export type ModelHubEvalTemplatesUsageListResponses = { + /** + * Response + */ + 200: EvalUsageStatsResponse; +}; + +export type ModelHubEvalTemplatesUsageListResponse = ModelHubEvalTemplatesUsageListResponses[keyof ModelHubEvalTemplatesUsageListResponses]; + +export type ModelHubEvalTemplatesVersionsListData = { + body?: never; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/versions/'; +}; + +export type ModelHubEvalTemplatesVersionsListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesVersionsListError = ModelHubEvalTemplatesVersionsListErrors[keyof ModelHubEvalTemplatesVersionsListErrors]; + +export type ModelHubEvalTemplatesVersionsListResponses = { + /** + * Response + */ + 200: EvalTemplateVersionListResponse; +}; + +export type ModelHubEvalTemplatesVersionsListResponse = ModelHubEvalTemplatesVersionsListResponses[keyof ModelHubEvalTemplatesVersionsListResponses]; + +export type ModelHubEvalTemplatesVersionsCreateCreateData = { + body: EvalTemplateVersionCreateRequest; + path: { + template_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/versions/create/'; +}; + +export type ModelHubEvalTemplatesVersionsCreateCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesVersionsCreateCreateError = ModelHubEvalTemplatesVersionsCreateCreateErrors[keyof ModelHubEvalTemplatesVersionsCreateCreateErrors]; + +export type ModelHubEvalTemplatesVersionsCreateCreateResponses = { + /** + * Response + */ + 200: EvalTemplateVersionResponse; +}; + +export type ModelHubEvalTemplatesVersionsCreateCreateResponse = ModelHubEvalTemplatesVersionsCreateCreateResponses[keyof ModelHubEvalTemplatesVersionsCreateCreateResponses]; + +export type ModelHubEvalTemplatesVersionsRestoreCreateData = { + body: ModelHubEmptyRequest2; + path: { + template_id: string; + version_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/versions/{version_id}/restore/'; +}; + +export type ModelHubEvalTemplatesVersionsRestoreCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesVersionsRestoreCreateError = ModelHubEvalTemplatesVersionsRestoreCreateErrors[keyof ModelHubEvalTemplatesVersionsRestoreCreateErrors]; + +export type ModelHubEvalTemplatesVersionsRestoreCreateResponses = { + /** + * Response + */ + 200: EvalTemplateVersionRestoreResponse; +}; + +export type ModelHubEvalTemplatesVersionsRestoreCreateResponse = ModelHubEvalTemplatesVersionsRestoreCreateResponses[keyof ModelHubEvalTemplatesVersionsRestoreCreateResponses]; + +export type ModelHubEvalTemplatesVersionsSetDefaultUpdateData = { + body: ModelHubEmptyRequest2; + path: { + template_id: string; + version_id: string; + }; + query?: never; + url: '/model-hub/eval-templates/{template_id}/versions/{version_id}/set-default/'; +}; + +export type ModelHubEvalTemplatesVersionsSetDefaultUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubEvalTemplatesVersionsSetDefaultUpdateError = ModelHubEvalTemplatesVersionsSetDefaultUpdateErrors[keyof ModelHubEvalTemplatesVersionsSetDefaultUpdateErrors]; + +export type ModelHubEvalTemplatesVersionsSetDefaultUpdateResponses = { + /** + * Response + */ + 200: EvalTemplateVersionResponse; +}; + +export type ModelHubEvalTemplatesVersionsSetDefaultUpdateResponse = ModelHubEvalTemplatesVersionsSetDefaultUpdateResponses[keyof ModelHubEvalTemplatesVersionsSetDefaultUpdateResponses]; + +export type CreateExperimentData = { + body: ExperimentCreateV2; + path?: never; + query?: never; + url: '/model-hub/experiments/v2/'; +}; + +export type CreateExperimentErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateExperimentError = CreateExperimentErrors[keyof CreateExperimentErrors]; + +export type CreateExperimentResponses = { + /** + * Response + */ + 200: ExperimentStringResultResponse; +}; + +export type CreateExperimentResponse = CreateExperimentResponses[keyof CreateExperimentResponses]; + +export type DeleteExperimentsData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/experiments/v2/delete/'; +}; + +export type DeleteExperimentsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeleteExperimentsError = DeleteExperimentsErrors[keyof DeleteExperimentsErrors]; + +export type DeleteExperimentsResponses = { + /** + * Response + */ + 204: void; +}; + +export type DeleteExperimentsResponse = DeleteExperimentsResponses[keyof DeleteExperimentsResponses]; + +export type ListExperimentsData = { + body?: never; + path?: never; + query?: { + created_at?: string; + status?: string; + dataset_id?: string; + /** + * A search term. + */ + search?: string; + /** + * Which field to use when ordering the results. + */ + ordering?: string; + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/experiments/v2/list/'; +}; + +export type ListExperimentsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListExperimentsError = ListExperimentsErrors[keyof ListExperimentsErrors]; + +export type ListExperimentsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListExperimentsResponse = ListExperimentsResponses[keyof ListExperimentsResponses]; + +export type RerunExperimentData = { + body: ExperimentRerunRequest2; + path?: never; + query?: never; + url: '/model-hub/experiments/v2/re-run/'; +}; + +export type RerunExperimentErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type RerunExperimentError = RerunExperimentErrors[keyof RerunExperimentErrors]; + +export type RerunExperimentResponses = { + /** + * Response + */ + 200: ExperimentStringResultResponse; +}; + +export type RerunExperimentResponse = RerunExperimentResponses[keyof RerunExperimentResponses]; + +export type ModelHubExperimentsV2RowDiffCreateData = { + body: DatasetRowDiffRequest2; + path?: never; + query?: never; + url: '/model-hub/experiments/v2/row-diff/'; +}; + +export type ModelHubExperimentsV2RowDiffCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2RowDiffCreateError = ModelHubExperimentsV2RowDiffCreateErrors[keyof ModelHubExperimentsV2RowDiffCreateErrors]; + +export type ModelHubExperimentsV2RowDiffCreateResponses = { + /** + * Response + */ + 200: ExperimentRowDiffResponse; +}; + +export type ModelHubExperimentsV2RowDiffCreateResponse = ModelHubExperimentsV2RowDiffCreateResponses[keyof ModelHubExperimentsV2RowDiffCreateResponses]; + +export type ModelHubExperimentsV2SuggestNameReadData = { + body?: never; + path: { + dataset_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/suggest-name/{dataset_id}/'; +}; + +export type ModelHubExperimentsV2SuggestNameReadErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2SuggestNameReadError = ModelHubExperimentsV2SuggestNameReadErrors[keyof ModelHubExperimentsV2SuggestNameReadErrors]; + +export type ModelHubExperimentsV2SuggestNameReadResponses = { + /** + * Response + */ + 200: ExperimentNameSuggestionResponse; +}; + +export type ModelHubExperimentsV2SuggestNameReadResponse = ModelHubExperimentsV2SuggestNameReadResponses[keyof ModelHubExperimentsV2SuggestNameReadResponses]; + +export type ModelHubExperimentsV2ValidateNameListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/experiments/v2/validate-name/'; +}; + +export type ModelHubExperimentsV2ValidateNameListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2ValidateNameListError = ModelHubExperimentsV2ValidateNameListErrors[keyof ModelHubExperimentsV2ValidateNameListErrors]; + +export type ModelHubExperimentsV2ValidateNameListResponses = { + /** + * Response + */ + 200: ExperimentNameValidationResponse; +}; + +export type ModelHubExperimentsV2ValidateNameListResponse = ModelHubExperimentsV2ValidateNameListResponses[keyof ModelHubExperimentsV2ValidateNameListResponses]; + +export type GetExperimentData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/'; +}; + +export type GetExperimentErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetExperimentError = GetExperimentErrors[keyof GetExperimentErrors]; + +export type GetExperimentResponses = { + /** + * Response + */ + 200: ExperimentV2DetailResponse; +}; + +export type GetExperimentResponse = GetExperimentResponses[keyof GetExperimentResponses]; + +export type UpdateExperimentData = { + body: ExperimentUpdateV2; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/'; +}; + +export type UpdateExperimentErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateExperimentError = UpdateExperimentErrors[keyof UpdateExperimentErrors]; + +export type UpdateExperimentResponses = { + /** + * Response + */ + 200: ExperimentV2DetailResponse; +}; + +export type UpdateExperimentResponse = UpdateExperimentResponses[keyof UpdateExperimentResponses]; + +export type CompareExperimentsData = { + body: ExperimentComparisonWeightsRequest2; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/compare-experiments/'; +}; + +export type CompareExperimentsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CompareExperimentsError = CompareExperimentsErrors[keyof CompareExperimentsErrors]; + +export type CompareExperimentsResponses = { + /** + * Response + */ + 200: ExperimentDatasetComparisonResponse; +}; + +export type CompareExperimentsResponse = CompareExperimentsResponses[keyof CompareExperimentsResponses]; + +export type ListExperimentComparisonsData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/comparisons/'; +}; + +export type ListExperimentComparisonsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListExperimentComparisonsError = ListExperimentComparisonsErrors[keyof ListExperimentComparisonsErrors]; + +export type ListExperimentComparisonsResponses = { + /** + * Response + */ + 200: ExperimentComparisonDetailsResponse; +}; + +export type ListExperimentComparisonsResponse = ListExperimentComparisonsResponses[keyof ListExperimentComparisonsResponses]; + +export type ModelHubExperimentsV2DerivedVariablesListData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/derived-variables/'; +}; + +export type ModelHubExperimentsV2DerivedVariablesListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2DerivedVariablesListError = ModelHubExperimentsV2DerivedVariablesListErrors[keyof ModelHubExperimentsV2DerivedVariablesListErrors]; + +export type ModelHubExperimentsV2DerivedVariablesListResponses = { + /** + * Response + */ + 200: ExperimentDerivedVariablesResponse; +}; + +export type ModelHubExperimentsV2DerivedVariablesListResponse = ModelHubExperimentsV2DerivedVariablesListResponses[keyof ModelHubExperimentsV2DerivedVariablesListResponses]; + +export type DownloadExperimentData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/download/'; +}; + +export type DownloadExperimentErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DownloadExperimentError = DownloadExperimentErrors[keyof DownloadExperimentErrors]; + +export type DownloadExperimentResponses = { + /** + * CSV file download. + */ + 200: Blob | File; +}; + +export type DownloadExperimentResponse = DownloadExperimentResponses[keyof DownloadExperimentResponses]; + +export type ModelHubExperimentsV2EvaluationsStatsListData = { + body?: never; + path: { + experiment_id: string; + evaluation_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/evaluations/{evaluation_id}/stats/'; +}; + +export type ModelHubExperimentsV2EvaluationsStatsListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2EvaluationsStatsListError = ModelHubExperimentsV2EvaluationsStatsListErrors[keyof ModelHubExperimentsV2EvaluationsStatsListErrors]; + +export type ModelHubExperimentsV2EvaluationsStatsListResponses = { + /** + * Response + */ + 200: ExperimentEvaluationStatsResponse; +}; + +export type ModelHubExperimentsV2EvaluationsStatsListResponse = ModelHubExperimentsV2EvaluationsStatsListResponses[keyof ModelHubExperimentsV2EvaluationsStatsListResponses]; + +export type ModelHubExperimentsV2FeedbackCreateData = { + body: Feedback2; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/feedback/'; +}; + +export type ModelHubExperimentsV2FeedbackCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2FeedbackCreateError = ModelHubExperimentsV2FeedbackCreateErrors[keyof ModelHubExperimentsV2FeedbackCreateErrors]; + +export type ModelHubExperimentsV2FeedbackCreateResponses = { + /** + * Response + */ + 200: ExperimentFeedbackCreateResponse; +}; + +export type ModelHubExperimentsV2FeedbackCreateResponse = ModelHubExperimentsV2FeedbackCreateResponses[keyof ModelHubExperimentsV2FeedbackCreateResponses]; + +export type ModelHubExperimentsV2FeedbackGetFeedbackDetailsListData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/feedback/get-feedback-details/'; +}; + +export type ModelHubExperimentsV2FeedbackGetFeedbackDetailsListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2FeedbackGetFeedbackDetailsListError = ModelHubExperimentsV2FeedbackGetFeedbackDetailsListErrors[keyof ModelHubExperimentsV2FeedbackGetFeedbackDetailsListErrors]; + +export type ModelHubExperimentsV2FeedbackGetFeedbackDetailsListResponses = { + /** + * Response + */ + 200: ExperimentFeedbackDetailsResponse; +}; + +export type ModelHubExperimentsV2FeedbackGetFeedbackDetailsListResponse = ModelHubExperimentsV2FeedbackGetFeedbackDetailsListResponses[keyof ModelHubExperimentsV2FeedbackGetFeedbackDetailsListResponses]; + +export type ModelHubExperimentsV2FeedbackGetTemplateListData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/feedback/get-template/'; +}; + +export type ModelHubExperimentsV2FeedbackGetTemplateListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2FeedbackGetTemplateListError = ModelHubExperimentsV2FeedbackGetTemplateListErrors[keyof ModelHubExperimentsV2FeedbackGetTemplateListErrors]; + +export type ModelHubExperimentsV2FeedbackGetTemplateListResponses = { + /** + * Response + */ + 200: ExperimentFeedbackTemplateResponse; +}; + +export type ModelHubExperimentsV2FeedbackGetTemplateListResponse = ModelHubExperimentsV2FeedbackGetTemplateListResponses[keyof ModelHubExperimentsV2FeedbackGetTemplateListResponses]; + +export type ModelHubExperimentsV2FeedbackSubmitFeedbackCreateData = { + body: ExperimentFeedbackSubmitRequest; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/feedback/submit-feedback/'; +}; + +export type ModelHubExperimentsV2FeedbackSubmitFeedbackCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2FeedbackSubmitFeedbackCreateError = ModelHubExperimentsV2FeedbackSubmitFeedbackCreateErrors[keyof ModelHubExperimentsV2FeedbackSubmitFeedbackCreateErrors]; + +export type ModelHubExperimentsV2FeedbackSubmitFeedbackCreateResponses = { + /** + * Response + */ + 200: ExperimentFeedbackSubmitResponse; +}; + +export type ModelHubExperimentsV2FeedbackSubmitFeedbackCreateResponse = ModelHubExperimentsV2FeedbackSubmitFeedbackCreateResponses[keyof ModelHubExperimentsV2FeedbackSubmitFeedbackCreateResponses]; + +export type GetExperimentJsonSchemaData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/json-schema/'; +}; + +export type GetExperimentJsonSchemaErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetExperimentJsonSchemaError = GetExperimentJsonSchemaErrors[keyof GetExperimentJsonSchemaErrors]; + +export type GetExperimentJsonSchemaResponses = { + /** + * Response + */ + 200: ExperimentJsonSchemaResponse; +}; + +export type GetExperimentJsonSchemaResponse = GetExperimentJsonSchemaResponses[keyof GetExperimentJsonSchemaResponses]; + +export type ModelHubExperimentsV2RerunCellsCreateData = { + body: ExperimentRerunCells; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/rerun-cells/'; +}; + +export type ModelHubExperimentsV2RerunCellsCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubExperimentsV2RerunCellsCreateError = ModelHubExperimentsV2RerunCellsCreateErrors[keyof ModelHubExperimentsV2RerunCellsCreateErrors]; + +export type ModelHubExperimentsV2RerunCellsCreateResponses = { + /** + * Response + */ + 200: ExperimentWorkflowResponse; +}; + +export type ModelHubExperimentsV2RerunCellsCreateResponse = ModelHubExperimentsV2RerunCellsCreateResponses[keyof ModelHubExperimentsV2RerunCellsCreateResponses]; + +export type ListExperimentRowsData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/rows/'; +}; + +export type ListExperimentRowsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListExperimentRowsError = ListExperimentRowsErrors[keyof ListExperimentRowsErrors]; + +export type ListExperimentRowsResponses = { + /** + * Response + */ + 200: ExperimentTableRowsResponse; +}; + +export type ListExperimentRowsResponse = ListExperimentRowsResponses[keyof ListExperimentRowsResponses]; + +export type GetExperimentRowData = { + body?: never; + path: { + experiment_id: string; + row_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/rows/{row_id}/'; +}; + +export type GetExperimentRowErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetExperimentRowError = GetExperimentRowErrors[keyof GetExperimentRowErrors]; + +export type GetExperimentRowResponses = { + /** + * Response + */ + 200: ExperimentTableRowsResponse; +}; + +export type GetExperimentRowResponse = GetExperimentRowResponses[keyof GetExperimentRowResponses]; + +export type GetExperimentStatsData = { + body?: never; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/stats/'; +}; + +export type GetExperimentStatsErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetExperimentStatsError = GetExperimentStatsErrors[keyof GetExperimentStatsErrors]; + +export type GetExperimentStatsResponses = { + /** + * Response + */ + 200: ExperimentStatsResponse; +}; + +export type GetExperimentStatsResponse = GetExperimentStatsResponses[keyof GetExperimentStatsResponses]; + +export type StopExperimentData = { + body: ModelHubEmptyRequest2; + path: { + experiment_id: string; + }; + query?: never; + url: '/model-hub/experiments/v2/{experiment_id}/stop/'; +}; + +export type StopExperimentErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type StopExperimentError = StopExperimentErrors[keyof StopExperimentErrors]; + +export type StopExperimentResponses = { + /** + * Response + */ + 200: ExperimentStopResponse; +}; + +export type StopExperimentResponse = StopExperimentResponses[keyof StopExperimentResponses]; + +export type ModelHubKnowledgeBaseDeleteData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/'; +}; + +export type ModelHubKnowledgeBaseDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBaseDeleteError = ModelHubKnowledgeBaseDeleteErrors[keyof ModelHubKnowledgeBaseDeleteErrors]; + +export type ModelHubKnowledgeBaseDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubKnowledgeBaseDeleteResponse = ModelHubKnowledgeBaseDeleteResponses[keyof ModelHubKnowledgeBaseDeleteResponses]; + +export type ModelHubKnowledgeBaseListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/'; +}; + +export type ModelHubKnowledgeBaseListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBaseListError = ModelHubKnowledgeBaseListErrors[keyof ModelHubKnowledgeBaseListErrors]; + +export type ModelHubKnowledgeBaseListResponses = { + /** + * Response + */ + 200: LegacyKnowledgeBaseSdkCodeResponse; +}; + +export type ModelHubKnowledgeBaseListResponse = ModelHubKnowledgeBaseListResponses[keyof ModelHubKnowledgeBaseListResponses]; + +export type ModelHubKnowledgeBasePartialUpdateData = { + body: LegacyKnowledgeBaseMutationRequest2; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/'; +}; + +export type ModelHubKnowledgeBasePartialUpdateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBasePartialUpdateError = ModelHubKnowledgeBasePartialUpdateErrors[keyof ModelHubKnowledgeBasePartialUpdateErrors]; + +export type ModelHubKnowledgeBasePartialUpdateResponses = { + /** + * Response + */ + 200: LegacyKnowledgeBaseMutationResponse; +}; + +export type ModelHubKnowledgeBasePartialUpdateResponse = ModelHubKnowledgeBasePartialUpdateResponses[keyof ModelHubKnowledgeBasePartialUpdateResponses]; + +export type ModelHubKnowledgeBaseCreateData = { + body: LegacyKnowledgeBaseMutationRequest2; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/'; +}; + +export type ModelHubKnowledgeBaseCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBaseCreateError = ModelHubKnowledgeBaseCreateErrors[keyof ModelHubKnowledgeBaseCreateErrors]; + +export type ModelHubKnowledgeBaseCreateResponses = { + /** + * Response + */ + 200: LegacyKnowledgeBaseCreateResponse; +}; + +export type ModelHubKnowledgeBaseCreateResponse = ModelHubKnowledgeBaseCreateResponses[keyof ModelHubKnowledgeBaseCreateResponses]; + +export type ModelHubKnowledgeBaseFilesDeleteData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/files/'; +}; + +export type ModelHubKnowledgeBaseFilesDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBaseFilesDeleteError = ModelHubKnowledgeBaseFilesDeleteErrors[keyof ModelHubKnowledgeBaseFilesDeleteErrors]; + +export type ModelHubKnowledgeBaseFilesDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubKnowledgeBaseFilesDeleteResponse = ModelHubKnowledgeBaseFilesDeleteResponses[keyof ModelHubKnowledgeBaseFilesDeleteResponses]; + +export type ModelHubKnowledgeBaseFilesCreateData = { + body: LegacyKnowledgeBaseFilesRequest; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/files/'; +}; + +export type ModelHubKnowledgeBaseFilesCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBaseFilesCreateError = ModelHubKnowledgeBaseFilesCreateErrors[keyof ModelHubKnowledgeBaseFilesCreateErrors]; + +export type ModelHubKnowledgeBaseFilesCreateResponses = { + /** + * Response + */ + 200: LegacyKnowledgeBaseFilesResponse; +}; + +export type ModelHubKnowledgeBaseFilesCreateResponse = ModelHubKnowledgeBaseFilesCreateResponses[keyof ModelHubKnowledgeBaseFilesCreateResponses]; + +export type ModelHubKnowledgeBaseGetListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/get/'; +}; + +export type ModelHubKnowledgeBaseGetListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBaseGetListError = ModelHubKnowledgeBaseGetListErrors[keyof ModelHubKnowledgeBaseGetListErrors]; + +export type ModelHubKnowledgeBaseGetListResponses = { + /** + * Response + */ + 200: LegacyKnowledgeBaseTableResponse; +}; + +export type ModelHubKnowledgeBaseGetListResponse = ModelHubKnowledgeBaseGetListResponses[keyof ModelHubKnowledgeBaseGetListResponses]; + +export type ModelHubKnowledgeBaseListListData = { + body?: never; + path?: never; + query?: never; + url: '/model-hub/knowledge-base/list/'; +}; + +export type ModelHubKnowledgeBaseListListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubKnowledgeBaseListListError = ModelHubKnowledgeBaseListListErrors[keyof ModelHubKnowledgeBaseListListErrors]; + +export type ModelHubKnowledgeBaseListListResponses = { + /** + * Response + */ + 200: LegacyKnowledgeBaseListResponse; +}; + +export type ModelHubKnowledgeBaseListListResponse = ModelHubKnowledgeBaseListListResponses[keyof ModelHubKnowledgeBaseListListResponses]; + +export type ModelHubPromptHistoryExecutionsListData = { + body?: never; + path?: never; + query?: { + template_name?: string; + template_version?: string; + created_at?: string; + /** + * A search term. + */ + search?: string; + /** + * Which field to use when ordering the results. + */ + ordering?: string; + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/prompt-history-executions/'; +}; + +export type ModelHubPromptHistoryExecutionsListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptHistoryExecutionsListError = ModelHubPromptHistoryExecutionsListErrors[keyof ModelHubPromptHistoryExecutionsListErrors]; + +export type ModelHubPromptHistoryExecutionsListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubPromptHistoryExecutionsListResponse = ModelHubPromptHistoryExecutionsListResponses[keyof ModelHubPromptHistoryExecutionsListResponses]; + +export type ModelHubPromptHistoryExecutionsGetExecutionDetailsData = { + body?: never; + path: { + execution_id: string; + }; + query?: { + template_name?: string; + template_version?: string; + created_at?: string; + /** + * A search term. + */ + search?: string; + /** + * Which field to use when ordering the results. + */ + ordering?: string; + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/prompt-history-executions/execution-details/{execution_id}/'; +}; + +export type ModelHubPromptHistoryExecutionsGetExecutionDetailsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptHistoryExecutionsGetExecutionDetailsError = ModelHubPromptHistoryExecutionsGetExecutionDetailsErrors[keyof ModelHubPromptHistoryExecutionsGetExecutionDetailsErrors]; + +export type ModelHubPromptHistoryExecutionsGetExecutionDetailsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubPromptHistoryExecutionsGetExecutionDetailsResponse = ModelHubPromptHistoryExecutionsGetExecutionDetailsResponses[keyof ModelHubPromptHistoryExecutionsGetExecutionDetailsResponses]; + +export type ModelHubPromptHistoryExecutionsReadData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt version. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-history-executions/{id}/'; +}; + +export type ModelHubPromptHistoryExecutionsReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptHistoryExecutionsReadError = ModelHubPromptHistoryExecutionsReadErrors[keyof ModelHubPromptHistoryExecutionsReadErrors]; + +export type ModelHubPromptHistoryExecutionsReadResponses = { + /** + * Response + */ + 200: PromptHistoryExecution; +}; + +export type ModelHubPromptHistoryExecutionsReadResponse = ModelHubPromptHistoryExecutionsReadResponses[keyof ModelHubPromptHistoryExecutionsReadResponses]; + +export type ModelHubPromptLabelsListData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/prompt-labels/'; +}; + +export type ModelHubPromptLabelsListErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsListError = ModelHubPromptLabelsListErrors[keyof ModelHubPromptLabelsListErrors]; + +export type ModelHubPromptLabelsListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubPromptLabelsListResponse = ModelHubPromptLabelsListResponses[keyof ModelHubPromptLabelsListResponses]; + +export type ModelHubPromptLabelsCreateData = { + body: PromptLabel2; + path?: never; + query?: never; + url: '/model-hub/prompt-labels/'; +}; + +export type ModelHubPromptLabelsCreateErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsCreateError = ModelHubPromptLabelsCreateErrors[keyof ModelHubPromptLabelsCreateErrors]; + +export type ModelHubPromptLabelsCreateResponses = { + /** + * Response + */ + 201: PromptLabel; +}; + +export type ModelHubPromptLabelsCreateResponse = ModelHubPromptLabelsCreateResponses[keyof ModelHubPromptLabelsCreateResponses]; + +export type ModelHubPromptLabelsAssignMultipleLabelsData = { + body: PromptLabel2; + path?: never; + query?: never; + url: '/model-hub/prompt-labels/assign-multiple-labels/'; +}; + +export type ModelHubPromptLabelsAssignMultipleLabelsErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsAssignMultipleLabelsError = ModelHubPromptLabelsAssignMultipleLabelsErrors[keyof ModelHubPromptLabelsAssignMultipleLabelsErrors]; + +export type ModelHubPromptLabelsAssignMultipleLabelsResponses = { + /** + * Response + */ + 201: PromptLabel; +}; + +export type ModelHubPromptLabelsAssignMultipleLabelsResponse = ModelHubPromptLabelsAssignMultipleLabelsResponses[keyof ModelHubPromptLabelsAssignMultipleLabelsResponses]; + +export type ModelHubPromptLabelsCreateSystemLabelsData = { + body: PromptLabel2; + path?: never; + query?: never; + url: '/model-hub/prompt-labels/create-system-labels/'; +}; + +export type ModelHubPromptLabelsCreateSystemLabelsErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsCreateSystemLabelsError = ModelHubPromptLabelsCreateSystemLabelsErrors[keyof ModelHubPromptLabelsCreateSystemLabelsErrors]; + +export type ModelHubPromptLabelsCreateSystemLabelsResponses = { + /** + * Response + */ + 201: PromptLabel; +}; + +export type ModelHubPromptLabelsCreateSystemLabelsResponse = ModelHubPromptLabelsCreateSystemLabelsResponses[keyof ModelHubPromptLabelsCreateSystemLabelsResponses]; + +export type ModelHubPromptLabelsGetByNameData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/prompt-labels/get-by-name/'; +}; + +export type ModelHubPromptLabelsGetByNameErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsGetByNameError = ModelHubPromptLabelsGetByNameErrors[keyof ModelHubPromptLabelsGetByNameErrors]; + +export type ModelHubPromptLabelsGetByNameResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubPromptLabelsGetByNameResponse = ModelHubPromptLabelsGetByNameResponses[keyof ModelHubPromptLabelsGetByNameResponses]; + +export type ModelHubPromptLabelsRemoveLabelFromVersionData = { + body: PromptLabel2; + path?: never; + query?: never; + url: '/model-hub/prompt-labels/remove/'; +}; + +export type ModelHubPromptLabelsRemoveLabelFromVersionErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsRemoveLabelFromVersionError = ModelHubPromptLabelsRemoveLabelFromVersionErrors[keyof ModelHubPromptLabelsRemoveLabelFromVersionErrors]; + +export type ModelHubPromptLabelsRemoveLabelFromVersionResponses = { + /** + * Response + */ + 201: PromptLabel; +}; + +export type ModelHubPromptLabelsRemoveLabelFromVersionResponse = ModelHubPromptLabelsRemoveLabelFromVersionResponses[keyof ModelHubPromptLabelsRemoveLabelFromVersionResponses]; + +export type ModelHubPromptLabelsSetDefaultData = { + body: PromptLabel2; + path?: never; + query?: never; + url: '/model-hub/prompt-labels/set-default/'; +}; + +export type ModelHubPromptLabelsSetDefaultErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsSetDefaultError = ModelHubPromptLabelsSetDefaultErrors[keyof ModelHubPromptLabelsSetDefaultErrors]; + +export type ModelHubPromptLabelsSetDefaultResponses = { + /** + * Response + */ + 201: PromptLabel; +}; + +export type ModelHubPromptLabelsSetDefaultResponse = ModelHubPromptLabelsSetDefaultResponses[keyof ModelHubPromptLabelsSetDefaultResponses]; + +export type ModelHubPromptLabelsTemplateLabelsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/prompt-labels/template-labels/'; +}; + +export type ModelHubPromptLabelsTemplateLabelsErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsTemplateLabelsError = ModelHubPromptLabelsTemplateLabelsErrors[keyof ModelHubPromptLabelsTemplateLabelsErrors]; + +export type ModelHubPromptLabelsTemplateLabelsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubPromptLabelsTemplateLabelsResponse = ModelHubPromptLabelsTemplateLabelsResponses[keyof ModelHubPromptLabelsTemplateLabelsResponses]; + +export type ModelHubPromptLabelsDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/prompt-labels/{id}/'; +}; + +export type ModelHubPromptLabelsDeleteErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsDeleteError = ModelHubPromptLabelsDeleteErrors[keyof ModelHubPromptLabelsDeleteErrors]; + +export type ModelHubPromptLabelsDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubPromptLabelsDeleteResponse = ModelHubPromptLabelsDeleteResponses[keyof ModelHubPromptLabelsDeleteResponses]; + +export type ModelHubPromptLabelsReadData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/prompt-labels/{id}/'; +}; + +export type ModelHubPromptLabelsReadErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsReadError = ModelHubPromptLabelsReadErrors[keyof ModelHubPromptLabelsReadErrors]; + +export type ModelHubPromptLabelsReadResponses = { + /** + * Response + */ + 200: PromptLabel; +}; + +export type ModelHubPromptLabelsReadResponse = ModelHubPromptLabelsReadResponses[keyof ModelHubPromptLabelsReadResponses]; + +export type ModelHubPromptLabelsPartialUpdateData = { + body: PromptLabel2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/prompt-labels/{id}/'; +}; + +export type ModelHubPromptLabelsPartialUpdateErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsPartialUpdateError = ModelHubPromptLabelsPartialUpdateErrors[keyof ModelHubPromptLabelsPartialUpdateErrors]; + +export type ModelHubPromptLabelsPartialUpdateResponses = { + /** + * Response + */ + 200: PromptLabel; +}; + +export type ModelHubPromptLabelsPartialUpdateResponse = ModelHubPromptLabelsPartialUpdateResponses[keyof ModelHubPromptLabelsPartialUpdateResponses]; + +export type ModelHubPromptLabelsUpdateData = { + body: PromptLabel2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/prompt-labels/{id}/'; +}; + +export type ModelHubPromptLabelsUpdateErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsUpdateError = ModelHubPromptLabelsUpdateErrors[keyof ModelHubPromptLabelsUpdateErrors]; + +export type ModelHubPromptLabelsUpdateResponses = { + /** + * Response + */ + 200: PromptLabel; +}; + +export type ModelHubPromptLabelsUpdateResponse = ModelHubPromptLabelsUpdateResponses[keyof ModelHubPromptLabelsUpdateResponses]; + +export type ModelHubPromptLabelsAssignLabelByIdData = { + body: PromptLabel2; + path: { + template_id: string; + label_id: string; + }; + query?: never; + url: '/model-hub/prompt-labels/{template_id}/{label_id}/assign-label-by-id/'; +}; + +export type ModelHubPromptLabelsAssignLabelByIdErrors = { + /** + * Response + */ + 400: ModelHubTextErrorResponse; + /** + * Response + */ + 403: ModelHubTextErrorResponse; + /** + * Response + */ + 404: ModelHubTextErrorResponse; + /** + * Response + */ + 409: ModelHubTextErrorResponse; + /** + * Response + */ + 500: ModelHubTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptLabelsAssignLabelByIdError = ModelHubPromptLabelsAssignLabelByIdErrors[keyof ModelHubPromptLabelsAssignLabelByIdErrors]; + +export type ModelHubPromptLabelsAssignLabelByIdResponses = { + /** + * Response + */ + 201: PromptLabel; +}; + +export type ModelHubPromptLabelsAssignLabelByIdResponse = ModelHubPromptLabelsAssignLabelByIdResponses[keyof ModelHubPromptLabelsAssignLabelByIdResponses]; + +export type ModelHubPromptTemplatesListData = { + body?: never; + path?: never; + query?: { + name?: string; + version?: string; + created_at?: string; + /** + * A search term. + */ + search?: string; + /** + * Which field to use when ordering the results. + */ + ordering?: string; + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/prompt-templates/'; +}; + +export type ModelHubPromptTemplatesListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesListError = ModelHubPromptTemplatesListErrors[keyof ModelHubPromptTemplatesListErrors]; + +export type ModelHubPromptTemplatesListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubPromptTemplatesListResponse = ModelHubPromptTemplatesListResponses[keyof ModelHubPromptTemplatesListResponses]; + +export type ModelHubPromptTemplatesCreateData = { + body: PromptTemplate2; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/'; +}; + +export type ModelHubPromptTemplatesCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesCreateError = ModelHubPromptTemplatesCreateErrors[keyof ModelHubPromptTemplatesCreateErrors]; + +export type ModelHubPromptTemplatesCreateResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesCreateResponse = ModelHubPromptTemplatesCreateResponses[keyof ModelHubPromptTemplatesCreateResponses]; + +export type ModelHubPromptTemplatesAnalyzePromptData = { + body: PromptTemplate2; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/analyze-prompt/'; +}; + +export type ModelHubPromptTemplatesAnalyzePromptErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesAnalyzePromptError = ModelHubPromptTemplatesAnalyzePromptErrors[keyof ModelHubPromptTemplatesAnalyzePromptErrors]; + +export type ModelHubPromptTemplatesAnalyzePromptResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesAnalyzePromptResponse = ModelHubPromptTemplatesAnalyzePromptResponses[keyof ModelHubPromptTemplatesAnalyzePromptResponses]; + +export type ModelHubPromptTemplatesBulkDeleteData = { + body: PromptTemplate2; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/bulk-delete/'; +}; + +export type ModelHubPromptTemplatesBulkDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesBulkDeleteError = ModelHubPromptTemplatesBulkDeleteErrors[keyof ModelHubPromptTemplatesBulkDeleteErrors]; + +export type ModelHubPromptTemplatesBulkDeleteResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesBulkDeleteResponse = ModelHubPromptTemplatesBulkDeleteResponses[keyof ModelHubPromptTemplatesBulkDeleteResponses]; + +export type ModelHubPromptTemplatesCreateDraftData = { + body: PromptTemplate2; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/create-draft/'; +}; + +export type ModelHubPromptTemplatesCreateDraftErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesCreateDraftError = ModelHubPromptTemplatesCreateDraftErrors[keyof ModelHubPromptTemplatesCreateDraftErrors]; + +export type ModelHubPromptTemplatesCreateDraftResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesCreateDraftResponse = ModelHubPromptTemplatesCreateDraftResponses[keyof ModelHubPromptTemplatesCreateDraftResponses]; + +export type ModelHubPromptTemplatesDerivedVariablesPreviewCreateData = { + body: DerivedVariablePreviewRequest; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/derived-variables/preview/'; +}; + +export type ModelHubPromptTemplatesDerivedVariablesPreviewCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesPreviewCreateError = ModelHubPromptTemplatesDerivedVariablesPreviewCreateErrors[keyof ModelHubPromptTemplatesDerivedVariablesPreviewCreateErrors]; + +export type ModelHubPromptTemplatesDerivedVariablesPreviewCreateResponses = { + /** + * Response + */ + 200: DerivedVariableDetailResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesPreviewCreateResponse = ModelHubPromptTemplatesDerivedVariablesPreviewCreateResponses[keyof ModelHubPromptTemplatesDerivedVariablesPreviewCreateResponses]; + +export type ModelHubPromptTemplatesGeneratePromptData = { + body: PromptTemplate2; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/generate-prompt/'; +}; + +export type ModelHubPromptTemplatesGeneratePromptErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGeneratePromptError = ModelHubPromptTemplatesGeneratePromptErrors[keyof ModelHubPromptTemplatesGeneratePromptErrors]; + +export type ModelHubPromptTemplatesGeneratePromptResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesGeneratePromptResponse = ModelHubPromptTemplatesGeneratePromptResponses[keyof ModelHubPromptTemplatesGeneratePromptResponses]; + +export type ModelHubPromptTemplatesGenerateVariablesData = { + body: PromptTemplate2; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/generate-variables/'; +}; + +export type ModelHubPromptTemplatesGenerateVariablesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGenerateVariablesError = ModelHubPromptTemplatesGenerateVariablesErrors[keyof ModelHubPromptTemplatesGenerateVariablesErrors]; + +export type ModelHubPromptTemplatesGenerateVariablesResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesGenerateVariablesResponse = ModelHubPromptTemplatesGenerateVariablesResponses[keyof ModelHubPromptTemplatesGenerateVariablesResponses]; + +export type ModelHubPromptTemplatesGetTemplateByNameData = { + body?: never; + path?: never; + query?: { + name?: string; + version?: string; + created_at?: string; + /** + * A search term. + */ + search?: string; + /** + * Which field to use when ordering the results. + */ + ordering?: string; + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/model-hub/prompt-templates/get-template-by-name/'; +}; + +export type ModelHubPromptTemplatesGetTemplateByNameErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGetTemplateByNameError = ModelHubPromptTemplatesGetTemplateByNameErrors[keyof ModelHubPromptTemplatesGetTemplateByNameErrors]; + +export type ModelHubPromptTemplatesGetTemplateByNameResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubPromptTemplatesGetTemplateByNameResponse = ModelHubPromptTemplatesGetTemplateByNameResponses[keyof ModelHubPromptTemplatesGetTemplateByNameResponses]; + +export type ModelHubPromptTemplatesImprovePromptData = { + body: PromptTemplate2; + path?: never; + query?: never; + url: '/model-hub/prompt-templates/improve-prompt/'; +}; + +export type ModelHubPromptTemplatesImprovePromptErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesImprovePromptError = ModelHubPromptTemplatesImprovePromptErrors[keyof ModelHubPromptTemplatesImprovePromptErrors]; + +export type ModelHubPromptTemplatesImprovePromptResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesImprovePromptResponse = ModelHubPromptTemplatesImprovePromptResponses[keyof ModelHubPromptTemplatesImprovePromptResponses]; + +export type ModelHubPromptTemplatesDeleteData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/'; +}; + +export type ModelHubPromptTemplatesDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesDeleteError = ModelHubPromptTemplatesDeleteErrors[keyof ModelHubPromptTemplatesDeleteErrors]; + +export type ModelHubPromptTemplatesDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubPromptTemplatesDeleteResponse = ModelHubPromptTemplatesDeleteResponses[keyof ModelHubPromptTemplatesDeleteResponses]; + +export type ModelHubPromptTemplatesReadData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/'; +}; + +export type ModelHubPromptTemplatesReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesReadError = ModelHubPromptTemplatesReadErrors[keyof ModelHubPromptTemplatesReadErrors]; + +export type ModelHubPromptTemplatesReadResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesReadResponse = ModelHubPromptTemplatesReadResponses[keyof ModelHubPromptTemplatesReadResponses]; + +export type ModelHubPromptTemplatesPartialUpdateData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/'; +}; + +export type ModelHubPromptTemplatesPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesPartialUpdateError = ModelHubPromptTemplatesPartialUpdateErrors[keyof ModelHubPromptTemplatesPartialUpdateErrors]; + +export type ModelHubPromptTemplatesPartialUpdateResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesPartialUpdateResponse = ModelHubPromptTemplatesPartialUpdateResponses[keyof ModelHubPromptTemplatesPartialUpdateResponses]; + +export type ModelHubPromptTemplatesUpdateData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/'; +}; + +export type ModelHubPromptTemplatesUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesUpdateError = ModelHubPromptTemplatesUpdateErrors[keyof ModelHubPromptTemplatesUpdateErrors]; + +export type ModelHubPromptTemplatesUpdateResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesUpdateResponse = ModelHubPromptTemplatesUpdateResponses[keyof ModelHubPromptTemplatesUpdateResponses]; + +export type ModelHubPromptTemplatesAddNewDraftData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/add-new-draft/'; +}; + +export type ModelHubPromptTemplatesAddNewDraftErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesAddNewDraftError = ModelHubPromptTemplatesAddNewDraftErrors[keyof ModelHubPromptTemplatesAddNewDraftErrors]; + +export type ModelHubPromptTemplatesAddNewDraftResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesAddNewDraftResponse = ModelHubPromptTemplatesAddNewDraftResponses[keyof ModelHubPromptTemplatesAddNewDraftResponses]; + +export type ModelHubPromptTemplatesGetAllVariablesData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/all-variables/'; +}; + +export type ModelHubPromptTemplatesGetAllVariablesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGetAllVariablesError = ModelHubPromptTemplatesGetAllVariablesErrors[keyof ModelHubPromptTemplatesGetAllVariablesErrors]; + +export type ModelHubPromptTemplatesGetAllVariablesResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesGetAllVariablesResponse = ModelHubPromptTemplatesGetAllVariablesResponses[keyof ModelHubPromptTemplatesGetAllVariablesResponses]; + +export type ModelHubPromptTemplatesCommitData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/commit/'; +}; + +export type ModelHubPromptTemplatesCommitErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesCommitError = ModelHubPromptTemplatesCommitErrors[keyof ModelHubPromptTemplatesCommitErrors]; + +export type ModelHubPromptTemplatesCommitResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesCommitResponse = ModelHubPromptTemplatesCommitResponses[keyof ModelHubPromptTemplatesCommitResponses]; + +export type ModelHubPromptTemplatesCompareVersionsData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/compare-versions/'; +}; + +export type ModelHubPromptTemplatesCompareVersionsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesCompareVersionsError = ModelHubPromptTemplatesCompareVersionsErrors[keyof ModelHubPromptTemplatesCompareVersionsErrors]; + +export type ModelHubPromptTemplatesCompareVersionsResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesCompareVersionsResponse = ModelHubPromptTemplatesCompareVersionsResponses[keyof ModelHubPromptTemplatesCompareVersionsResponses]; + +export type ModelHubPromptTemplatesDeleteEvaluationConfigData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/delete-evaluation-config/'; +}; + +export type ModelHubPromptTemplatesDeleteEvaluationConfigErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesDeleteEvaluationConfigError = ModelHubPromptTemplatesDeleteEvaluationConfigErrors[keyof ModelHubPromptTemplatesDeleteEvaluationConfigErrors]; + +export type ModelHubPromptTemplatesDeleteEvaluationConfigResponses = { + /** + * Response + */ + 204: void; +}; + +export type ModelHubPromptTemplatesDeleteEvaluationConfigResponse = ModelHubPromptTemplatesDeleteEvaluationConfigResponses[keyof ModelHubPromptTemplatesDeleteEvaluationConfigResponses]; + +export type ModelHubPromptTemplatesGetEvaluationConfigsData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/evaluation-configs/'; +}; + +export type ModelHubPromptTemplatesGetEvaluationConfigsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGetEvaluationConfigsError = ModelHubPromptTemplatesGetEvaluationConfigsErrors[keyof ModelHubPromptTemplatesGetEvaluationConfigsErrors]; + +export type ModelHubPromptTemplatesGetEvaluationConfigsResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesGetEvaluationConfigsResponse = ModelHubPromptTemplatesGetEvaluationConfigsResponses[keyof ModelHubPromptTemplatesGetEvaluationConfigsResponses]; + +export type ModelHubPromptTemplatesRetrieveEvaluationsData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/evaluations/'; +}; + +export type ModelHubPromptTemplatesRetrieveEvaluationsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesRetrieveEvaluationsError = ModelHubPromptTemplatesRetrieveEvaluationsErrors[keyof ModelHubPromptTemplatesRetrieveEvaluationsErrors]; + +export type ModelHubPromptTemplatesRetrieveEvaluationsResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesRetrieveEvaluationsResponse = ModelHubPromptTemplatesRetrieveEvaluationsResponses[keyof ModelHubPromptTemplatesRetrieveEvaluationsResponses]; + +export type ModelHubPromptTemplatesGetNextVersionData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/get-next-version/'; +}; + +export type ModelHubPromptTemplatesGetNextVersionErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGetNextVersionError = ModelHubPromptTemplatesGetNextVersionErrors[keyof ModelHubPromptTemplatesGetNextVersionErrors]; + +export type ModelHubPromptTemplatesGetNextVersionResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesGetNextVersionResponse = ModelHubPromptTemplatesGetNextVersionResponses[keyof ModelHubPromptTemplatesGetNextVersionResponses]; + +export type ModelHubPromptTemplatesGetRunStatusData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/get-run-status/'; +}; + +export type ModelHubPromptTemplatesGetRunStatusErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGetRunStatusError = ModelHubPromptTemplatesGetRunStatusErrors[keyof ModelHubPromptTemplatesGetRunStatusErrors]; + +export type ModelHubPromptTemplatesGetRunStatusResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesGetRunStatusResponse = ModelHubPromptTemplatesGetRunStatusResponses[keyof ModelHubPromptTemplatesGetRunStatusResponses]; + +export type ModelHubPromptTemplatesGetSdkCodeData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + language: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/get-sdk-code/{language}/'; +}; + +export type ModelHubPromptTemplatesGetSdkCodeErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesGetSdkCodeError = ModelHubPromptTemplatesGetSdkCodeErrors[keyof ModelHubPromptTemplatesGetSdkCodeErrors]; + +export type ModelHubPromptTemplatesGetSdkCodeResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesGetSdkCodeResponse = ModelHubPromptTemplatesGetSdkCodeResponses[keyof ModelHubPromptTemplatesGetSdkCodeResponses]; + +export type ModelHubPromptTemplatesRunEvalsOnMultipleVersionsData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/run-evals-on-multiple-versions/'; +}; + +export type ModelHubPromptTemplatesRunEvalsOnMultipleVersionsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesRunEvalsOnMultipleVersionsError = ModelHubPromptTemplatesRunEvalsOnMultipleVersionsErrors[keyof ModelHubPromptTemplatesRunEvalsOnMultipleVersionsErrors]; + +export type ModelHubPromptTemplatesRunEvalsOnMultipleVersionsResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesRunEvalsOnMultipleVersionsResponse = ModelHubPromptTemplatesRunEvalsOnMultipleVersionsResponses[keyof ModelHubPromptTemplatesRunEvalsOnMultipleVersionsResponses]; + +export type ModelHubPromptTemplatesRunTemplateData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/run_template/'; +}; + +export type ModelHubPromptTemplatesRunTemplateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesRunTemplateError = ModelHubPromptTemplatesRunTemplateErrors[keyof ModelHubPromptTemplatesRunTemplateErrors]; + +export type ModelHubPromptTemplatesRunTemplateResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesRunTemplateResponse = ModelHubPromptTemplatesRunTemplateResponses[keyof ModelHubPromptTemplatesRunTemplateResponses]; + +export type ModelHubPromptTemplatesSaveNameData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/save-name/'; +}; + +export type ModelHubPromptTemplatesSaveNameErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesSaveNameError = ModelHubPromptTemplatesSaveNameErrors[keyof ModelHubPromptTemplatesSaveNameErrors]; + +export type ModelHubPromptTemplatesSaveNameResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesSaveNameResponse = ModelHubPromptTemplatesSaveNameResponses[keyof ModelHubPromptTemplatesSaveNameResponses]; + +export type ModelHubPromptTemplatesSavePromptFolderData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/save-prompt-folder/'; +}; + +export type ModelHubPromptTemplatesSavePromptFolderErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesSavePromptFolderError = ModelHubPromptTemplatesSavePromptFolderErrors[keyof ModelHubPromptTemplatesSavePromptFolderErrors]; + +export type ModelHubPromptTemplatesSavePromptFolderResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesSavePromptFolderResponse = ModelHubPromptTemplatesSavePromptFolderResponses[keyof ModelHubPromptTemplatesSavePromptFolderResponses]; + +export type ModelHubPromptTemplatesSetDefaultData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/set_default/'; +}; + +export type ModelHubPromptTemplatesSetDefaultErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesSetDefaultError = ModelHubPromptTemplatesSetDefaultErrors[keyof ModelHubPromptTemplatesSetDefaultErrors]; + +export type ModelHubPromptTemplatesSetDefaultResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesSetDefaultResponse = ModelHubPromptTemplatesSetDefaultResponses[keyof ModelHubPromptTemplatesSetDefaultResponses]; + +export type ModelHubPromptTemplatesStopStreamingData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/stop-streaming/'; +}; + +export type ModelHubPromptTemplatesStopStreamingErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesStopStreamingError = ModelHubPromptTemplatesStopStreamingErrors[keyof ModelHubPromptTemplatesStopStreamingErrors]; + +export type ModelHubPromptTemplatesStopStreamingResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesStopStreamingResponse = ModelHubPromptTemplatesStopStreamingResponses[keyof ModelHubPromptTemplatesStopStreamingResponses]; + +export type ModelHubPromptTemplatesUpdateEvaluationConfigsData = { + body: PromptTemplate2; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/update-evaluation-configs/'; +}; + +export type ModelHubPromptTemplatesUpdateEvaluationConfigsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesUpdateEvaluationConfigsError = ModelHubPromptTemplatesUpdateEvaluationConfigsErrors[keyof ModelHubPromptTemplatesUpdateEvaluationConfigsErrors]; + +export type ModelHubPromptTemplatesUpdateEvaluationConfigsResponses = { + /** + * Response + */ + 201: PromptTemplate; +}; + +export type ModelHubPromptTemplatesUpdateEvaluationConfigsResponse = ModelHubPromptTemplatesUpdateEvaluationConfigsResponses[keyof ModelHubPromptTemplatesUpdateEvaluationConfigsResponses]; + +export type ModelHubPromptTemplatesVersionsData = { + body?: never; + path: { + /** + * A UUID string identifying this prompt template. + */ + id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{id}/versions/'; +}; + +export type ModelHubPromptTemplatesVersionsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesVersionsError = ModelHubPromptTemplatesVersionsErrors[keyof ModelHubPromptTemplatesVersionsErrors]; + +export type ModelHubPromptTemplatesVersionsResponses = { + /** + * Response + */ + 200: PromptTemplate; +}; + +export type ModelHubPromptTemplatesVersionsResponse = ModelHubPromptTemplatesVersionsResponses[keyof ModelHubPromptTemplatesVersionsResponses]; + +export type ModelHubPromptTemplatesDerivedVariablesListData = { + body?: never; + path: { + prompt_id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{prompt_id}/derived-variables/'; +}; + +export type ModelHubPromptTemplatesDerivedVariablesListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesListError = ModelHubPromptTemplatesDerivedVariablesListErrors[keyof ModelHubPromptTemplatesDerivedVariablesListErrors]; + +export type ModelHubPromptTemplatesDerivedVariablesListResponses = { + /** + * Response + */ + 200: PromptDerivedVariablesResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesListResponse = ModelHubPromptTemplatesDerivedVariablesListResponses[keyof ModelHubPromptTemplatesDerivedVariablesListResponses]; + +export type ModelHubPromptTemplatesDerivedVariablesExtractCreateData = { + body: DerivedVariableExtractRequest; + path: { + prompt_id: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/'; +}; + +export type ModelHubPromptTemplatesDerivedVariablesExtractCreateErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesExtractCreateError = ModelHubPromptTemplatesDerivedVariablesExtractCreateErrors[keyof ModelHubPromptTemplatesDerivedVariablesExtractCreateErrors]; + +export type ModelHubPromptTemplatesDerivedVariablesExtractCreateResponses = { + /** + * Response + */ + 200: DerivedVariableDetailResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesExtractCreateResponse = ModelHubPromptTemplatesDerivedVariablesExtractCreateResponses[keyof ModelHubPromptTemplatesDerivedVariablesExtractCreateResponses]; + +export type ModelHubPromptTemplatesDerivedVariablesSchemaListData = { + body?: never; + path: { + prompt_id: string; + column_name: string; + }; + query?: never; + url: '/model-hub/prompt-templates/{prompt_id}/derived-variables/{column_name}/schema/'; +}; + +export type ModelHubPromptTemplatesDerivedVariablesSchemaListErrors = { + /** + * Response + */ + 400: ModelHubErrorResponse; + /** + * Response + */ + 403: ModelHubErrorResponse; + /** + * Response + */ + 404: ModelHubErrorResponse; + /** + * Response + */ + 409: ModelHubErrorResponse; + /** + * Response + */ + 500: ModelHubErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesSchemaListError = ModelHubPromptTemplatesDerivedVariablesSchemaListErrors[keyof ModelHubPromptTemplatesDerivedVariablesSchemaListErrors]; + +export type ModelHubPromptTemplatesDerivedVariablesSchemaListResponses = { + /** + * Response + */ + 200: DerivedVariableDetailResponse; +}; + +export type ModelHubPromptTemplatesDerivedVariablesSchemaListResponse = ModelHubPromptTemplatesDerivedVariablesSchemaListResponses[keyof ModelHubPromptTemplatesDerivedVariablesSchemaListResponses]; + +export type ModelHubScoresListData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + source_type?: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + source_id?: string; + label_id?: string; + annotator_id?: string; + }; + url: '/model-hub/scores/'; +}; + +export type ModelHubScoresListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresListError = ModelHubScoresListErrors[keyof ModelHubScoresListErrors]; + +export type ModelHubScoresListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ModelHubScoresListResponse = ModelHubScoresListResponses[keyof ModelHubScoresListResponses]; + +export type ModelHubScoresCreateData = { + body: CreateScore; + path?: never; + query?: never; + url: '/model-hub/scores/'; +}; + +export type ModelHubScoresCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresCreateError = ModelHubScoresCreateErrors[keyof ModelHubScoresCreateErrors]; + +export type ModelHubScoresCreateResponses = { + /** + * Response + */ + 200: ScoreResponse; +}; + +export type ModelHubScoresCreateResponse = ModelHubScoresCreateResponses[keyof ModelHubScoresCreateResponses]; + +export type ModelHubScoresBulkCreateData = { + body: BulkCreateScores; + path?: never; + query?: never; + url: '/model-hub/scores/bulk/'; +}; + +export type ModelHubScoresBulkCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresBulkCreateError = ModelHubScoresBulkCreateErrors[keyof ModelHubScoresBulkCreateErrors]; + +export type ModelHubScoresBulkCreateResponses = { + /** + * Response + */ + 200: BulkCreateScoresResponse; +}; + +export type ModelHubScoresBulkCreateResponse = ModelHubScoresBulkCreateResponses[keyof ModelHubScoresBulkCreateResponses]; + +export type ModelHubScoresForSourceData = { + body?: never; + path?: never; + query: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + source_type: 'dataset_row' | 'trace' | 'observation_span' | 'prototype_run' | 'call_execution' | 'trace_session'; + source_id: string; + }; + url: '/model-hub/scores/for-source/'; +}; + +export type ModelHubScoresForSourceErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresForSourceError = ModelHubScoresForSourceErrors[keyof ModelHubScoresForSourceErrors]; + +export type ModelHubScoresForSourceResponses = { + /** + * Response + */ + 200: ScoreForSourceResponse; +}; + +export type ModelHubScoresForSourceResponse = ModelHubScoresForSourceResponses[keyof ModelHubScoresForSourceResponses]; + +export type ModelHubScoresDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/scores/{id}/'; +}; + +export type ModelHubScoresDeleteErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 403: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 409: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresDeleteError = ModelHubScoresDeleteErrors[keyof ModelHubScoresDeleteErrors]; + +export type ModelHubScoresDeleteResponses = { + /** + * Response + */ + 200: ScoreDeleteResponse; +}; + +export type ModelHubScoresDeleteResponse = ModelHubScoresDeleteResponses[keyof ModelHubScoresDeleteResponses]; + +export type ModelHubScoresReadData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/model-hub/scores/{id}/'; +}; + +export type ModelHubScoresReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresReadError = ModelHubScoresReadErrors[keyof ModelHubScoresReadErrors]; + +export type ModelHubScoresReadResponses = { + /** + * Response + */ + 200: Score; +}; + +export type ModelHubScoresReadResponse = ModelHubScoresReadResponses[keyof ModelHubScoresReadResponses]; + +export type ModelHubScoresPartialUpdateData = { + body: Score2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/scores/{id}/'; +}; + +export type ModelHubScoresPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresPartialUpdateError = ModelHubScoresPartialUpdateErrors[keyof ModelHubScoresPartialUpdateErrors]; + +export type ModelHubScoresPartialUpdateResponses = { + /** + * Response + */ + 200: Score; +}; + +export type ModelHubScoresPartialUpdateResponse = ModelHubScoresPartialUpdateResponses[keyof ModelHubScoresPartialUpdateResponses]; + +export type ModelHubScoresUpdateData = { + body: Score2; + path: { + id: string; + }; + query?: never; + url: '/model-hub/scores/{id}/'; +}; + +export type ModelHubScoresUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ModelHubScoresUpdateError = ModelHubScoresUpdateErrors[keyof ModelHubScoresUpdateErrors]; + +export type ModelHubScoresUpdateResponses = { + /** + * Response + */ + 200: Score; +}; + +export type ModelHubScoresUpdateResponse = ModelHubScoresUpdateResponses[keyof ModelHubScoresUpdateResponses]; + +export type SdkApiV1ConfigureEvaluationsCreateData = { + body: SdkConfigureEvaluationsRequest; + path?: never; + query?: never; + url: '/sdk/api/v1/configure-evaluations/'; +}; + +export type SdkApiV1ConfigureEvaluationsCreateErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1ConfigureEvaluationsCreateError = SdkApiV1ConfigureEvaluationsCreateErrors[keyof SdkApiV1ConfigureEvaluationsCreateErrors]; + +export type SdkApiV1ConfigureEvaluationsCreateResponses = { + /** + * Response + */ + 200: SdkConfigureEvaluationsResponse; +}; + +export type SdkApiV1ConfigureEvaluationsCreateResponse = SdkApiV1ConfigureEvaluationsCreateResponses[keyof SdkApiV1ConfigureEvaluationsCreateResponses]; + +export type SdkApiV1EvalCreateData = { + body: SdkStandaloneEvalRequest; + path?: never; + query?: never; + url: '/sdk/api/v1/eval/'; +}; + +export type SdkApiV1EvalCreateErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1EvalCreateError = SdkApiV1EvalCreateErrors[keyof SdkApiV1EvalCreateErrors]; + +export type SdkApiV1EvalCreateResponses = { + /** + * Response + */ + 200: SdkStandaloneEvalResponse; +}; + +export type SdkApiV1EvalCreateResponse = SdkApiV1EvalCreateResponses[keyof SdkApiV1EvalCreateResponses]; + +export type SdkApiV1EvalReadData = { + body?: never; + path: { + eval_id: string; + }; + query?: never; + url: '/sdk/api/v1/eval/{eval_id}/'; +}; + +export type SdkApiV1EvalReadErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1EvalReadError = SdkApiV1EvalReadErrors[keyof SdkApiV1EvalReadErrors]; + +export type SdkApiV1EvalReadResponses = { + /** + * Response + */ + 200: SdkEvalTemplateResponse; +}; + +export type SdkApiV1EvalReadResponse = SdkApiV1EvalReadResponses[keyof SdkApiV1EvalReadResponses]; + +export type SdkApiV1EvaluatePipelineListData = { + body?: never; + path?: never; + query: { + project_name: string; + versions: string; + }; + url: '/sdk/api/v1/evaluate-pipeline/'; +}; + +export type SdkApiV1EvaluatePipelineListErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1EvaluatePipelineListError = SdkApiV1EvaluatePipelineListErrors[keyof SdkApiV1EvaluatePipelineListErrors]; + +export type SdkApiV1EvaluatePipelineListResponses = { + /** + * Response + */ + 200: SdkcicdEvaluationRunsResponse; +}; + +export type SdkApiV1EvaluatePipelineListResponse = SdkApiV1EvaluatePipelineListResponses[keyof SdkApiV1EvaluatePipelineListResponses]; + +export type SdkApiV1EvaluatePipelineCreateData = { + body: CicdJob; + path?: never; + query?: never; + url: '/sdk/api/v1/evaluate-pipeline/'; +}; + +export type SdkApiV1EvaluatePipelineCreateErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1EvaluatePipelineCreateError = SdkApiV1EvaluatePipelineCreateErrors[keyof SdkApiV1EvaluatePipelineCreateErrors]; + +export type SdkApiV1EvaluatePipelineCreateResponses = { + /** + * Response + */ + 200: SdkcicdEvaluationRunAcceptedResponse; +}; + +export type SdkApiV1EvaluatePipelineCreateResponse = SdkApiV1EvaluatePipelineCreateResponses[keyof SdkApiV1EvaluatePipelineCreateResponses]; + +export type SdkApiV1GetEvalsListData = { + body?: never; + path?: never; + query?: never; + url: '/sdk/api/v1/get-evals/'; +}; + +export type SdkApiV1GetEvalsListErrors = { + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1GetEvalsListError = SdkApiV1GetEvalsListErrors[keyof SdkApiV1GetEvalsListErrors]; + +export type SdkApiV1GetEvalsListResponses = { + /** + * Response + */ + 200: SdkGetEvalsResponse; +}; + +export type SdkApiV1GetEvalsListResponse = SdkApiV1GetEvalsListResponses[keyof SdkApiV1GetEvalsListResponses]; + +export type SdkApiV1NewEvalListData = { + body?: never; + path?: never; + query: { + eval_id: string; + }; + url: '/sdk/api/v1/new-eval/'; +}; + +export type SdkApiV1NewEvalListErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1NewEvalListError = SdkApiV1NewEvalListErrors[keyof SdkApiV1NewEvalListErrors]; + +export type SdkApiV1NewEvalListResponses = { + /** + * Response + */ + 200: SdkStandaloneEvalV2Response; +}; + +export type SdkApiV1NewEvalListResponse = SdkApiV1NewEvalListResponses[keyof SdkApiV1NewEvalListResponses]; + +export type SdkApiV1NewEvalCreateData = { + body: SdkStandaloneEvalV2Request; + path?: never; + query?: never; + url: '/sdk/api/v1/new-eval/'; +}; + +export type SdkApiV1NewEvalCreateErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SdkApiV1NewEvalCreateError = SdkApiV1NewEvalCreateErrors[keyof SdkApiV1NewEvalCreateErrors]; + +export type SdkApiV1NewEvalCreateResponses = { + /** + * Response + */ + 200: SdkStandaloneEvalResponse; +}; + +export type SdkApiV1NewEvalCreateResponse = SdkApiV1NewEvalCreateResponses[keyof SdkApiV1NewEvalCreateResponses]; + +export type GetSimulationAnalyticsData = { + body?: never; + path?: never; + query?: { + run_test_name?: string; + execution_id?: string; + eval_name?: string; + summary?: boolean; + }; + url: '/sdk/api/v1/simulation/analytics/'; +}; + +export type GetSimulationAnalyticsErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 404: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetSimulationAnalyticsError = GetSimulationAnalyticsErrors[keyof GetSimulationAnalyticsErrors]; + +export type GetSimulationAnalyticsResponses = { + /** + * Response + */ + 200: SdkSimulationAnalyticsResponse; +}; + +export type GetSimulationAnalyticsResponse = GetSimulationAnalyticsResponses[keyof GetSimulationAnalyticsResponses]; + +export type ListSimulationMetricsData = { + body?: never; + path?: never; + query?: { + run_test_name?: string; + execution_id?: string; + call_execution_id?: string; + }; + url: '/sdk/api/v1/simulation/metrics/'; +}; + +export type ListSimulationMetricsErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 404: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListSimulationMetricsError = ListSimulationMetricsErrors[keyof ListSimulationMetricsErrors]; + +export type ListSimulationMetricsResponses = { + /** + * Response + */ + 200: SdkSimulationMetricsResponse; +}; + +export type ListSimulationMetricsResponse = ListSimulationMetricsResponses[keyof ListSimulationMetricsResponses]; + +export type ListSimulationRunsData = { + body?: never; + path?: never; + query?: { + run_test_name?: string; + execution_id?: string; + call_execution_id?: string; + eval_name?: string; + summary?: boolean; + }; + url: '/sdk/api/v1/simulation/runs/'; +}; + +export type ListSimulationRunsErrors = { + /** + * Response + */ + 400: SdkErrorResponse; + /** + * Response + */ + 404: SdkErrorResponse; + /** + * Response + */ + 500: SdkErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListSimulationRunsError = ListSimulationRunsErrors[keyof ListSimulationRunsErrors]; + +export type ListSimulationRunsResponses = { + /** + * Response + */ + 200: SdkSimulationRunsResponse; +}; + +export type ListSimulationRunsResponse = ListSimulationRunsResponses[keyof ListSimulationRunsResponses]; + +export type SimulateAgentDefinitionsDeleteData = { + body: AgentDefinitionBulkDeleteRequest; + path?: never; + query?: never; + url: '/simulate/agent-definitions/'; +}; + +export type SimulateAgentDefinitionsDeleteErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsDeleteError = SimulateAgentDefinitionsDeleteErrors[keyof SimulateAgentDefinitionsDeleteErrors]; + +export type SimulateAgentDefinitionsDeleteResponses = { + /** + * Response + */ + 200: AgentDefinitionBulkDeleteResponse; +}; + +export type SimulateAgentDefinitionsDeleteResponse = SimulateAgentDefinitionsDeleteResponses[keyof SimulateAgentDefinitionsDeleteResponses]; + +export type ListAgentDefinitionsData = { + body?: never; + path?: never; + query?: { + search?: string; + agent_type?: 'voice' | 'text'; + agent_definition_id?: string; + page?: number; + limit?: number; + }; + url: '/simulate/agent-definitions/'; +}; + +export type ListAgentDefinitionsErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAgentDefinitionsError = ListAgentDefinitionsErrors[keyof ListAgentDefinitionsErrors]; + +export type ListAgentDefinitionsResponses = { + /** + * Response + */ + 200: Array; +}; + +export type ListAgentDefinitionsResponse = ListAgentDefinitionsResponses[keyof ListAgentDefinitionsResponses]; + +export type CreateAgentDefinitionData = { + body: AgentDefinitionCreateRequest; + path?: never; + query?: never; + url: '/simulate/agent-definitions/create/'; +}; + +export type CreateAgentDefinitionErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateAgentDefinitionError = CreateAgentDefinitionErrors[keyof CreateAgentDefinitionErrors]; + +export type CreateAgentDefinitionResponses = { + /** + * Response + */ + 201: AgentDefinitionCreateResponse; +}; + +export type CreateAgentDefinitionResponse = CreateAgentDefinitionResponses[keyof CreateAgentDefinitionResponses]; + +export type GetAgentDefinitionData = { + body?: never; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/'; +}; + +export type GetAgentDefinitionErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAgentDefinitionError = GetAgentDefinitionErrors[keyof GetAgentDefinitionErrors]; + +export type GetAgentDefinitionResponses = { + /** + * Response + */ + 200: AgentDefinitionResponse; +}; + +export type GetAgentDefinitionResponse = GetAgentDefinitionResponses[keyof GetAgentDefinitionResponses]; + +export type DeleteAgentDefinitionData = { + body?: never; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/delete/'; +}; + +export type DeleteAgentDefinitionErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeleteAgentDefinitionError = DeleteAgentDefinitionErrors[keyof DeleteAgentDefinitionErrors]; + +export type DeleteAgentDefinitionResponses = { + /** + * Response + */ + 200: AgentDefinitionDeleteResponse; +}; + +export type DeleteAgentDefinitionResponse = DeleteAgentDefinitionResponses[keyof DeleteAgentDefinitionResponses]; + +export type UpdateAgentDefinitionData = { + body: AgentDefinitionEditRequest; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/edit/'; +}; + +export type UpdateAgentDefinitionErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateAgentDefinitionError = UpdateAgentDefinitionErrors[keyof UpdateAgentDefinitionErrors]; + +export type UpdateAgentDefinitionResponses = { + /** + * Response + */ + 200: AgentDefinitionEditResponse; +}; + +export type UpdateAgentDefinitionResponse = UpdateAgentDefinitionResponses[keyof UpdateAgentDefinitionResponses]; + +export type SimulateAgentDefinitionsVersionsListData = { + body?: never; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/'; +}; + +export type SimulateAgentDefinitionsVersionsListErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsListError = SimulateAgentDefinitionsVersionsListErrors[keyof SimulateAgentDefinitionsVersionsListErrors]; + +export type SimulateAgentDefinitionsVersionsListResponses = { + /** + * Response + */ + 200: Array; +}; + +export type SimulateAgentDefinitionsVersionsListResponse = SimulateAgentDefinitionsVersionsListResponses[keyof SimulateAgentDefinitionsVersionsListResponses]; + +export type SimulateAgentDefinitionsVersionsCreateCreateData = { + body: AgentVersionCreateRequest; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/create/'; +}; + +export type SimulateAgentDefinitionsVersionsCreateCreateErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsCreateCreateError = SimulateAgentDefinitionsVersionsCreateCreateErrors[keyof SimulateAgentDefinitionsVersionsCreateCreateErrors]; + +export type SimulateAgentDefinitionsVersionsCreateCreateResponses = { + /** + * Response + */ + 201: AgentVersionCreateResponse; +}; + +export type SimulateAgentDefinitionsVersionsCreateCreateResponse = SimulateAgentDefinitionsVersionsCreateCreateResponses[keyof SimulateAgentDefinitionsVersionsCreateCreateResponses]; + +export type SimulateAgentDefinitionsVersionsReadData = { + body?: never; + path: { + agent_id: string; + version_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/'; +}; + +export type SimulateAgentDefinitionsVersionsReadErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsReadError = SimulateAgentDefinitionsVersionsReadErrors[keyof SimulateAgentDefinitionsVersionsReadErrors]; + +export type SimulateAgentDefinitionsVersionsReadResponses = { + /** + * Response + */ + 200: AgentVersionResponse; +}; + +export type SimulateAgentDefinitionsVersionsReadResponse = SimulateAgentDefinitionsVersionsReadResponses[keyof SimulateAgentDefinitionsVersionsReadResponses]; + +export type SimulateAgentDefinitionsVersionsActivateCreateData = { + body: EmptyRequest2; + path: { + agent_id: string; + version_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/activate/'; +}; + +export type SimulateAgentDefinitionsVersionsActivateCreateErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsActivateCreateError = SimulateAgentDefinitionsVersionsActivateCreateErrors[keyof SimulateAgentDefinitionsVersionsActivateCreateErrors]; + +export type SimulateAgentDefinitionsVersionsActivateCreateResponses = { + /** + * Response + */ + 200: AgentVersionActivateResponse; +}; + +export type SimulateAgentDefinitionsVersionsActivateCreateResponse = SimulateAgentDefinitionsVersionsActivateCreateResponses[keyof SimulateAgentDefinitionsVersionsActivateCreateResponses]; + +export type SimulateAgentDefinitionsVersionsCallExecutionsListData = { + body?: never; + path: { + agent_id: string; + version_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/call-executions/'; +}; + +export type SimulateAgentDefinitionsVersionsCallExecutionsListErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsCallExecutionsListError = SimulateAgentDefinitionsVersionsCallExecutionsListErrors[keyof SimulateAgentDefinitionsVersionsCallExecutionsListErrors]; + +export type SimulateAgentDefinitionsVersionsCallExecutionsListResponses = { + /** + * Response + */ + 200: Array; +}; + +export type SimulateAgentDefinitionsVersionsCallExecutionsListResponse = SimulateAgentDefinitionsVersionsCallExecutionsListResponses[keyof SimulateAgentDefinitionsVersionsCallExecutionsListResponses]; + +export type SimulateAgentDefinitionsVersionsDeleteDeleteData = { + body?: never; + path: { + agent_id: string; + version_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/delete/'; +}; + +export type SimulateAgentDefinitionsVersionsDeleteDeleteErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsDeleteDeleteError = SimulateAgentDefinitionsVersionsDeleteDeleteErrors[keyof SimulateAgentDefinitionsVersionsDeleteDeleteErrors]; + +export type SimulateAgentDefinitionsVersionsDeleteDeleteResponses = { + /** + * Response + */ + 200: AgentVersionDeleteResponse; +}; + +export type SimulateAgentDefinitionsVersionsDeleteDeleteResponse = SimulateAgentDefinitionsVersionsDeleteDeleteResponses[keyof SimulateAgentDefinitionsVersionsDeleteDeleteResponses]; + +export type SimulateAgentDefinitionsVersionsEvalSummaryListData = { + body?: never; + path: { + agent_id: string; + version_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/eval-summary/'; +}; + +export type SimulateAgentDefinitionsVersionsEvalSummaryListErrors = { + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsEvalSummaryListError = SimulateAgentDefinitionsVersionsEvalSummaryListErrors[keyof SimulateAgentDefinitionsVersionsEvalSummaryListErrors]; + +export type SimulateAgentDefinitionsVersionsEvalSummaryListResponses = { + /** + * Response + */ + 200: EvalSummaryResponse; +}; + +export type SimulateAgentDefinitionsVersionsEvalSummaryListResponse = SimulateAgentDefinitionsVersionsEvalSummaryListResponses[keyof SimulateAgentDefinitionsVersionsEvalSummaryListResponses]; + +export type SimulateAgentDefinitionsVersionsRestoreCreateData = { + body: EmptyRequest2; + path: { + agent_id: string; + version_id: string; + }; + query?: never; + url: '/simulate/agent-definitions/{agent_id}/versions/{version_id}/restore/'; +}; + +export type SimulateAgentDefinitionsVersionsRestoreCreateErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateAgentDefinitionsVersionsRestoreCreateError = SimulateAgentDefinitionsVersionsRestoreCreateErrors[keyof SimulateAgentDefinitionsVersionsRestoreCreateErrors]; + +export type SimulateAgentDefinitionsVersionsRestoreCreateResponses = { + /** + * Response + */ + 200: AgentVersionRestoreResponse; +}; + +export type SimulateAgentDefinitionsVersionsRestoreCreateResponse = SimulateAgentDefinitionsVersionsRestoreCreateResponses[keyof SimulateAgentDefinitionsVersionsRestoreCreateResponses]; + +export type SimulateApiCallExecutionsListData = { + body?: never; + path?: never; + query?: { + search?: string; + status?: string; + test_execution_id?: string; + page?: number; + limit?: number; + }; + url: '/simulate/api/call-executions/'; +}; + +export type SimulateApiCallExecutionsListErrors = { + /** + * Response + */ + 404: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiCallExecutionsListError = SimulateApiCallExecutionsListErrors[keyof SimulateApiCallExecutionsListErrors]; + +export type SimulateApiCallExecutionsListResponses = { + /** + * Response + */ + 200: Array; +}; + +export type SimulateApiCallExecutionsListResponse = SimulateApiCallExecutionsListResponses[keyof SimulateApiCallExecutionsListResponses]; + +export type ListPersonasData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/simulate/api/personas/'; +}; + +export type ListPersonasErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListPersonasError = ListPersonasErrors[keyof ListPersonasErrors]; + +export type ListPersonasResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListPersonasResponse = ListPersonasResponses[keyof ListPersonasResponses]; + +export type CreatePersonaData = { + body: PersonaCreate; + path?: never; + query?: never; + url: '/simulate/api/personas/'; +}; + +export type CreatePersonaErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreatePersonaError = CreatePersonaErrors[keyof CreatePersonaErrors]; + +export type CreatePersonaResponses = { + /** + * Response + */ + 201: PersonaCreate; +}; + +export type CreatePersonaResponse = CreatePersonaResponses[keyof CreatePersonaResponses]; + +export type SimulateApiPersonasDuplicateCreateData = { + body: PersonaDuplicateRequest2; + path: { + persona_id: string; + }; + query?: never; + url: '/simulate/api/personas/duplicate/{persona_id}/'; +}; + +export type SimulateApiPersonasDuplicateCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiPersonasDuplicateCreateError = SimulateApiPersonasDuplicateCreateErrors[keyof SimulateApiPersonasDuplicateCreateErrors]; + +export type SimulateApiPersonasDuplicateCreateResponses = { + /** + * Response + */ + 201: PersonaDuplicateResponse; +}; + +export type SimulateApiPersonasDuplicateCreateResponse = SimulateApiPersonasDuplicateCreateResponses[keyof SimulateApiPersonasDuplicateCreateResponses]; + +export type SimulateApiPersonasFieldOptionsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/simulate/api/personas/field-options/'; +}; + +export type SimulateApiPersonasFieldOptionsErrors = { + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiPersonasFieldOptionsError = SimulateApiPersonasFieldOptionsErrors[keyof SimulateApiPersonasFieldOptionsErrors]; + +export type SimulateApiPersonasFieldOptionsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type SimulateApiPersonasFieldOptionsResponse = SimulateApiPersonasFieldOptionsResponses[keyof SimulateApiPersonasFieldOptionsResponses]; + +export type SimulateApiPersonasSystemPersonasData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/simulate/api/personas/system/'; +}; + +export type SimulateApiPersonasSystemPersonasErrors = { + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiPersonasSystemPersonasError = SimulateApiPersonasSystemPersonasErrors[keyof SimulateApiPersonasSystemPersonasErrors]; + +export type SimulateApiPersonasSystemPersonasResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type SimulateApiPersonasSystemPersonasResponse = SimulateApiPersonasSystemPersonasResponses[keyof SimulateApiPersonasSystemPersonasResponses]; + +export type SimulateApiPersonasWorkspacePersonasData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/simulate/api/personas/workspace/'; +}; + +export type SimulateApiPersonasWorkspacePersonasErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiPersonasWorkspacePersonasError = SimulateApiPersonasWorkspacePersonasErrors[keyof SimulateApiPersonasWorkspacePersonasErrors]; + +export type SimulateApiPersonasWorkspacePersonasResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type SimulateApiPersonasWorkspacePersonasResponse = SimulateApiPersonasWorkspacePersonasResponses[keyof SimulateApiPersonasWorkspacePersonasResponses]; + +export type DeletePersonaData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/simulate/api/personas/{id}/'; +}; + +export type DeletePersonaErrors = { + /** + * Response + */ + 403: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeletePersonaError = DeletePersonaErrors[keyof DeletePersonaErrors]; + +export type DeletePersonaResponses = { + /** + * Response + */ + 204: void; +}; + +export type DeletePersonaResponse = DeletePersonaResponses[keyof DeletePersonaResponses]; + +export type GetPersonaData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/simulate/api/personas/{id}/'; +}; + +export type GetPersonaErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetPersonaError = GetPersonaErrors[keyof GetPersonaErrors]; + +export type GetPersonaResponses = { + /** + * Response + */ + 200: Persona; +}; + +export type GetPersonaResponse = GetPersonaResponses[keyof GetPersonaResponses]; + +export type UpdatePersonaData = { + body: Persona2; + path: { + id: string; + }; + query?: never; + url: '/simulate/api/personas/{id}/'; +}; + +export type UpdatePersonaErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 403: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdatePersonaError = UpdatePersonaErrors[keyof UpdatePersonaErrors]; + +export type UpdatePersonaResponses = { + /** + * Response + */ + 200: Persona; +}; + +export type UpdatePersonaResponse = UpdatePersonaResponses[keyof UpdatePersonaResponses]; + +export type SimulateApiPersonasUpdateData = { + body: Persona2; + path: { + id: string; + }; + query?: never; + url: '/simulate/api/personas/{id}/'; +}; + +export type SimulateApiPersonasUpdateErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 403: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiPersonasUpdateError = SimulateApiPersonasUpdateErrors[keyof SimulateApiPersonasUpdateErrors]; + +export type SimulateApiPersonasUpdateResponses = { + /** + * Response + */ + 200: Persona; +}; + +export type SimulateApiPersonasUpdateResponse = SimulateApiPersonasUpdateResponses[keyof SimulateApiPersonasUpdateResponses]; + +export type SimulateApiPersonasDuplicateData = { + body: PersonaDuplicateRequest2; + path: { + id: string; + }; + query?: never; + url: '/simulate/api/personas/{id}/duplicate/'; +}; + +export type SimulateApiPersonasDuplicateErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiPersonasDuplicateError = SimulateApiPersonasDuplicateErrors[keyof SimulateApiPersonasDuplicateErrors]; + +export type SimulateApiPersonasDuplicateResponses = { + /** + * Response + */ + 201: PersonaDuplicateResponse; +}; + +export type SimulateApiPersonasDuplicateResponse = SimulateApiPersonasDuplicateResponses[keyof SimulateApiPersonasDuplicateResponses]; + +export type SimulateApiRunTestsListData = { + body?: never; + path?: never; + query?: { + search?: string; + simulation_type?: 'agent_definition' | 'prompt'; + prompt_template_id?: string; + page?: number; + limit?: number; + }; + url: '/simulate/api/run-tests/'; +}; + +export type SimulateApiRunTestsListErrors = { + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateApiRunTestsListError = SimulateApiRunTestsListErrors[keyof SimulateApiRunTestsListErrors]; + +export type SimulateApiRunTestsListResponses = { + /** + * Response + */ + 200: Array; +}; + +export type SimulateApiRunTestsListResponse = SimulateApiRunTestsListResponses[keyof SimulateApiRunTestsListResponses]; + +export type ListTestExecutionsData = { + body?: never; + path?: never; + query?: never; + url: '/simulate/api/test-executions/'; +}; + +export type ListTestExecutionsErrors = { + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListTestExecutionsError = ListTestExecutionsErrors[keyof ListTestExecutionsErrors]; + +export type ListTestExecutionsResponses = { + /** + * Response + */ + 200: Array; +}; + +export type ListTestExecutionsResponse = ListTestExecutionsResponses[keyof ListTestExecutionsResponses]; + +export type SimulateCallExecutionsReadData = { + body?: never; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/'; +}; + +export type SimulateCallExecutionsReadErrors = { + /** + * Response + */ + 404: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsReadError = SimulateCallExecutionsReadErrors[keyof SimulateCallExecutionsReadErrors]; + +export type SimulateCallExecutionsReadResponses = { + /** + * Response + */ + 200: CallExecutionDetail; +}; + +export type SimulateCallExecutionsReadResponse = SimulateCallExecutionsReadResponses[keyof SimulateCallExecutionsReadResponses]; + +export type SimulateCallExecutionsPartialUpdateData = { + body: CallExecutionStatusUpdate; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/'; +}; + +export type SimulateCallExecutionsPartialUpdateErrors = { + /** + * Response + */ + 400: CallExecutionErrorResponse; + /** + * Response + */ + 404: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsPartialUpdateError = SimulateCallExecutionsPartialUpdateErrors[keyof SimulateCallExecutionsPartialUpdateErrors]; + +export type SimulateCallExecutionsPartialUpdateResponses = { + /** + * Response + */ + 200: CallExecution; +}; + +export type SimulateCallExecutionsPartialUpdateResponse = SimulateCallExecutionsPartialUpdateResponses[keyof SimulateCallExecutionsPartialUpdateResponses]; + +export type SimulateCallExecutionsBranchAnalysisListData = { + body?: never; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/branch-analysis/'; +}; + +export type SimulateCallExecutionsBranchAnalysisListErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsBranchAnalysisListError = SimulateCallExecutionsBranchAnalysisListErrors[keyof SimulateCallExecutionsBranchAnalysisListErrors]; + +export type SimulateCallExecutionsBranchAnalysisListResponses = { + /** + * Response + */ + 200: CallBranchAnalysisResponse; +}; + +export type SimulateCallExecutionsBranchAnalysisListResponse = SimulateCallExecutionsBranchAnalysisListResponses[keyof SimulateCallExecutionsBranchAnalysisListResponses]; + +export type SimulateCallExecutionsBranchAnalysisCreateData = { + body: EmptyRequest2; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/branch-analysis/'; +}; + +export type SimulateCallExecutionsBranchAnalysisCreateErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsBranchAnalysisCreateError = SimulateCallExecutionsBranchAnalysisCreateErrors[keyof SimulateCallExecutionsBranchAnalysisCreateErrors]; + +export type SimulateCallExecutionsBranchAnalysisCreateResponses = { + /** + * Response + */ + 200: CallBranchDeviationCreateResponse; +}; + +export type SimulateCallExecutionsBranchAnalysisCreateResponse = SimulateCallExecutionsBranchAnalysisCreateResponses[keyof SimulateCallExecutionsBranchAnalysisCreateResponses]; + +export type SimulateCallExecutionsChatSendMessageCreateData = { + body: SendChatRequest; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/chat/send-message/'; +}; + +export type SimulateCallExecutionsChatSendMessageCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsChatSendMessageCreateError = SimulateCallExecutionsChatSendMessageCreateErrors[keyof SimulateCallExecutionsChatSendMessageCreateErrors]; + +export type SimulateCallExecutionsChatSendMessageCreateResponses = { + /** + * Response + */ + 200: ChatSendMessageResponse; +}; + +export type SimulateCallExecutionsChatSendMessageCreateResponse = SimulateCallExecutionsChatSendMessageCreateResponses[keyof SimulateCallExecutionsChatSendMessageCreateResponses]; + +export type SimulateCallExecutionsDeleteDeleteData = { + body?: never; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/delete/'; +}; + +export type SimulateCallExecutionsDeleteDeleteErrors = { + /** + * Response + */ + 404: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsDeleteDeleteError = SimulateCallExecutionsDeleteDeleteErrors[keyof SimulateCallExecutionsDeleteDeleteErrors]; + +export type SimulateCallExecutionsDeleteDeleteResponses = { + /** + * Response + */ + 204: CallExecutionDeleteResponse; +}; + +export type SimulateCallExecutionsDeleteDeleteResponse = SimulateCallExecutionsDeleteDeleteResponses[keyof SimulateCallExecutionsDeleteDeleteResponses]; + +export type SimulateCallExecutionsErrorLocalizerTasksListData = { + body?: never; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/error-localizer-tasks/'; +}; + +export type SimulateCallExecutionsErrorLocalizerTasksListErrors = { + /** + * Response + */ + 404: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsErrorLocalizerTasksListError = SimulateCallExecutionsErrorLocalizerTasksListErrors[keyof SimulateCallExecutionsErrorLocalizerTasksListErrors]; + +export type SimulateCallExecutionsErrorLocalizerTasksListResponses = { + /** + * Response + */ + 200: CallExecutionErrorLocalizerTasksResponse; +}; + +export type SimulateCallExecutionsErrorLocalizerTasksListResponse = SimulateCallExecutionsErrorLocalizerTasksListResponses[keyof SimulateCallExecutionsErrorLocalizerTasksListResponses]; + +export type SimulateCallExecutionsLogsListData = { + body?: never; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/logs/'; +}; + +export type SimulateCallExecutionsLogsListErrors = { + /** + * Response + */ + 404: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsLogsListError = SimulateCallExecutionsLogsListErrors[keyof SimulateCallExecutionsLogsListErrors]; + +export type SimulateCallExecutionsLogsListResponses = { + /** + * Response + */ + 200: CallExecutionLogsResponse; +}; + +export type SimulateCallExecutionsLogsListResponse = SimulateCallExecutionsLogsListResponses[keyof SimulateCallExecutionsLogsListResponses]; + +export type SimulateCallExecutionsSessionComparisonListData = { + body?: never; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/session-comparison/'; +}; + +export type SimulateCallExecutionsSessionComparisonListErrors = { + /** + * Response + */ + 400: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsSessionComparisonListError = SimulateCallExecutionsSessionComparisonListErrors[keyof SimulateCallExecutionsSessionComparisonListErrors]; + +export type SimulateCallExecutionsSessionComparisonListResponses = { + /** + * Response + */ + 200: SessionComparisonResponse; +}; + +export type SimulateCallExecutionsSessionComparisonListResponse = SimulateCallExecutionsSessionComparisonListResponses[keyof SimulateCallExecutionsSessionComparisonListResponses]; + +export type SimulateCallExecutionsTranscriptsListData = { + body?: never; + path: { + call_execution_id: string; + }; + query?: never; + url: '/simulate/call-executions/{call_execution_id}/transcripts/'; +}; + +export type SimulateCallExecutionsTranscriptsListErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateCallExecutionsTranscriptsListError = SimulateCallExecutionsTranscriptsListErrors[keyof SimulateCallExecutionsTranscriptsListErrors]; + +export type SimulateCallExecutionsTranscriptsListResponses = { + /** + * Response + */ + 200: CallTranscriptResponse; +}; + +export type SimulateCallExecutionsTranscriptsListResponse = SimulateCallExecutionsTranscriptsListResponses[keyof SimulateCallExecutionsTranscriptsListResponses]; + +export type SimulateExportReadData = { + body?: never; + path: { + item_id: string; + }; + query: { + /** + * Export source type. + */ + type: 'runtest' | 'testexecution'; + /** + * Optional call-execution search term. + */ + search?: string; + /** + * Optional call-execution status filter. + */ + status?: string; + }; + url: '/simulate/export/{item_id}/'; +}; + +export type SimulateExportReadErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateExportReadError = SimulateExportReadErrors[keyof SimulateExportReadErrors]; + +export type SimulateExportReadResponses = { + /** + * CSV export + */ + 200: Blob | File; +}; + +export type SimulateExportReadResponse = SimulateExportReadResponses[keyof SimulateExportReadResponses]; + +export type SimulatePromptSimulationsScenariosListData = { + body?: never; + path?: never; + query?: never; + url: '/simulate/prompt-simulations/scenarios/'; +}; + +export type SimulatePromptSimulationsScenariosListErrors = { + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulatePromptSimulationsScenariosListError = SimulatePromptSimulationsScenariosListErrors[keyof SimulatePromptSimulationsScenariosListErrors]; + +export type SimulatePromptSimulationsScenariosListResponses = { + /** + * Response + */ + 200: PromptSimulationScenariosResponse; +}; + +export type SimulatePromptSimulationsScenariosListResponse = SimulatePromptSimulationsScenariosListResponses[keyof SimulatePromptSimulationsScenariosListResponses]; + +export type SimulatePromptTemplatesSimulationsListData = { + body?: never; + path: { + prompt_template_id: string; + }; + query?: never; + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/'; +}; + +export type SimulatePromptTemplatesSimulationsListErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulatePromptTemplatesSimulationsListError = SimulatePromptTemplatesSimulationsListErrors[keyof SimulatePromptTemplatesSimulationsListErrors]; + +export type SimulatePromptTemplatesSimulationsListResponses = { + /** + * Response + */ + 200: PromptSimulationListResponse; +}; + +export type SimulatePromptTemplatesSimulationsListResponse = SimulatePromptTemplatesSimulationsListResponses[keyof SimulatePromptTemplatesSimulationsListResponses]; + +export type SimulatePromptTemplatesSimulationsCreateData = { + body: CreatePromptSimulationRequest; + path: { + prompt_template_id: string; + }; + query?: never; + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/'; +}; + +export type SimulatePromptTemplatesSimulationsCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulatePromptTemplatesSimulationsCreateError = SimulatePromptTemplatesSimulationsCreateErrors[keyof SimulatePromptTemplatesSimulationsCreateErrors]; + +export type SimulatePromptTemplatesSimulationsCreateResponses = { + /** + * Response + */ + 201: PromptSimulationRunResponse; +}; + +export type SimulatePromptTemplatesSimulationsCreateResponse = SimulatePromptTemplatesSimulationsCreateResponses[keyof SimulatePromptTemplatesSimulationsCreateResponses]; + +export type SimulatePromptTemplatesSimulationsDeleteData = { + body?: never; + path: { + prompt_template_id: string; + run_test_id: string; + }; + query?: never; + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/'; +}; + +export type SimulatePromptTemplatesSimulationsDeleteErrors = { + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulatePromptTemplatesSimulationsDeleteError = SimulatePromptTemplatesSimulationsDeleteErrors[keyof SimulatePromptTemplatesSimulationsDeleteErrors]; + +export type SimulatePromptTemplatesSimulationsDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type SimulatePromptTemplatesSimulationsDeleteResponse = SimulatePromptTemplatesSimulationsDeleteResponses[keyof SimulatePromptTemplatesSimulationsDeleteResponses]; + +export type SimulatePromptTemplatesSimulationsReadData = { + body?: never; + path: { + prompt_template_id: string; + run_test_id: string; + }; + query?: never; + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/'; +}; + +export type SimulatePromptTemplatesSimulationsReadErrors = { + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulatePromptTemplatesSimulationsReadError = SimulatePromptTemplatesSimulationsReadErrors[keyof SimulatePromptTemplatesSimulationsReadErrors]; + +export type SimulatePromptTemplatesSimulationsReadResponses = { + /** + * Response + */ + 200: PromptSimulationRunResponse; +}; + +export type SimulatePromptTemplatesSimulationsReadResponse = SimulatePromptTemplatesSimulationsReadResponses[keyof SimulatePromptTemplatesSimulationsReadResponses]; + +export type SimulatePromptTemplatesSimulationsPartialUpdateData = { + body: PromptSimulationUpdateRequest; + path: { + prompt_template_id: string; + run_test_id: string; + }; + query?: never; + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/'; +}; + +export type SimulatePromptTemplatesSimulationsPartialUpdateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulatePromptTemplatesSimulationsPartialUpdateError = SimulatePromptTemplatesSimulationsPartialUpdateErrors[keyof SimulatePromptTemplatesSimulationsPartialUpdateErrors]; + +export type SimulatePromptTemplatesSimulationsPartialUpdateResponses = { + /** + * Response + */ + 200: PromptSimulationRunResponse; +}; + +export type SimulatePromptTemplatesSimulationsPartialUpdateResponse = SimulatePromptTemplatesSimulationsPartialUpdateResponses[keyof SimulatePromptTemplatesSimulationsPartialUpdateResponses]; + +export type SimulatePromptTemplatesSimulationsExecuteCreateData = { + body: ExecutePromptSimulationRequest; + path: { + prompt_template_id: string; + run_test_id: string; + }; + query?: never; + url: '/simulate/prompt-templates/{prompt_template_id}/simulations/{run_test_id}/execute/'; +}; + +export type SimulatePromptTemplatesSimulationsExecuteCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulatePromptTemplatesSimulationsExecuteCreateError = SimulatePromptTemplatesSimulationsExecuteCreateErrors[keyof SimulatePromptTemplatesSimulationsExecuteCreateErrors]; + +export type SimulatePromptTemplatesSimulationsExecuteCreateResponses = { + /** + * Response + */ + 200: ExecutePromptSimulationResponse; +}; + +export type SimulatePromptTemplatesSimulationsExecuteCreateResponse = SimulatePromptTemplatesSimulationsExecuteCreateResponses[keyof SimulatePromptTemplatesSimulationsExecuteCreateResponses]; + +export type ListRunTestsData = { + body?: never; + path?: never; + query?: { + search?: string; + simulation_type?: 'agent_definition' | 'prompt'; + prompt_template_id?: string; + page?: number; + limit?: number; + }; + url: '/simulate/run-tests/'; +}; + +export type ListRunTestsErrors = { + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListRunTestsError = ListRunTestsErrors[keyof ListRunTestsErrors]; + +export type ListRunTestsResponses = { + /** + * Response + */ + 200: Array; +}; + +export type ListRunTestsResponse = ListRunTestsResponses[keyof ListRunTestsResponses]; + +export type SimulateRunTestsActiveListData = { + body?: never; + path?: never; + query?: never; + url: '/simulate/run-tests/active/'; +}; + +export type SimulateRunTestsActiveListErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsActiveListError = SimulateRunTestsActiveListErrors[keyof SimulateRunTestsActiveListErrors]; + +export type SimulateRunTestsActiveListResponses = { + /** + * Response + */ + 200: AllActiveTests; +}; + +export type SimulateRunTestsActiveListResponse = SimulateRunTestsActiveListResponses[keyof SimulateRunTestsActiveListResponses]; + +export type CreateRunTestData = { + body: CreateRunTest; + path?: never; + query?: never; + url: '/simulate/run-tests/create/'; +}; + +export type CreateRunTestErrors = { + /** + * Response + */ + 400: RunTestErrorResponse; + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateRunTestError = CreateRunTestErrors[keyof CreateRunTestErrors]; + +export type CreateRunTestResponses = { + /** + * Response + */ + 201: RunTestResponse; +}; + +export type CreateRunTestResponse = CreateRunTestResponses[keyof CreateRunTestResponses]; + +export type SimulateRunTestsGetIdByNameReadData = { + body?: never; + path: { + run_test_name: string; + }; + query?: never; + url: '/simulate/run-tests/get-id-by-name/{run_test_name}/'; +}; + +export type SimulateRunTestsGetIdByNameReadErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsGetIdByNameReadError = SimulateRunTestsGetIdByNameReadErrors[keyof SimulateRunTestsGetIdByNameReadErrors]; + +export type SimulateRunTestsGetIdByNameReadResponses = { + /** + * Response + */ + 200: RunTestNameResponse; +}; + +export type SimulateRunTestsGetIdByNameReadResponse = SimulateRunTestsGetIdByNameReadResponses[keyof SimulateRunTestsGetIdByNameReadResponses]; + +export type DeleteRunTestData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/'; +}; + +export type DeleteRunTestErrors = { + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeleteRunTestError = DeleteRunTestErrors[keyof DeleteRunTestErrors]; + +export type DeleteRunTestResponses = { + /** + * Response + */ + 200: RunTestMessageResponse; +}; + +export type DeleteRunTestResponse = DeleteRunTestResponses[keyof DeleteRunTestResponses]; + +export type GetRunTestData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/'; +}; + +export type GetRunTestErrors = { + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetRunTestError = GetRunTestErrors[keyof GetRunTestErrors]; + +export type GetRunTestResponses = { + /** + * Response + */ + 200: RunTestResponse; +}; + +export type GetRunTestResponse = GetRunTestResponses[keyof GetRunTestResponses]; + +export type UpdateRunTestData = { + body: UpdateRunTest; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/'; +}; + +export type UpdateRunTestErrors = { + /** + * Response + */ + 400: RunTestErrorResponse; + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateRunTestError = UpdateRunTestErrors[keyof UpdateRunTestErrors]; + +export type UpdateRunTestResponses = { + /** + * Response + */ + 200: RunTestResponse; +}; + +export type UpdateRunTestResponse = UpdateRunTestResponses[keyof UpdateRunTestResponses]; + +export type GetRunTestAnalyticsData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/analytics/'; +}; + +export type GetRunTestAnalyticsErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetRunTestAnalyticsError = GetRunTestAnalyticsErrors[keyof GetRunTestAnalyticsErrors]; + +export type GetRunTestAnalyticsResponses = { + /** + * Response + */ + 200: RunTestAnalytics; +}; + +export type GetRunTestAnalyticsResponse = GetRunTestAnalyticsResponses[keyof GetRunTestAnalyticsResponses]; + +export type ListRunTestCallExecutionsData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/call-executions/'; +}; + +export type ListRunTestCallExecutionsErrors = { + /** + * Response + */ + 404: CallExecutionErrorResponse; + /** + * Response + */ + 500: CallExecutionErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListRunTestCallExecutionsError = ListRunTestCallExecutionsErrors[keyof ListRunTestCallExecutionsErrors]; + +export type ListRunTestCallExecutionsResponses = { + /** + * Response + */ + 200: RunTestCallExecutionsResponse; +}; + +export type ListRunTestCallExecutionsResponse = ListRunTestCallExecutionsResponses[keyof ListRunTestCallExecutionsResponses]; + +export type SimulateRunTestsChatExecuteCreateData = { + body: EmptyRequest2; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/chat-execute/'; +}; + +export type SimulateRunTestsChatExecuteCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsChatExecuteCreateError = SimulateRunTestsChatExecuteCreateErrors[keyof SimulateRunTestsChatExecuteCreateErrors]; + +export type SimulateRunTestsChatExecuteCreateResponses = { + /** + * Response + */ + 200: RunTestChatExecutionResponse; +}; + +export type SimulateRunTestsChatExecuteCreateResponse = SimulateRunTestsChatExecuteCreateResponses[keyof SimulateRunTestsChatExecuteCreateResponses]; + +export type SimulateRunTestsComponentsPartialUpdateData = { + body: RunTestComponentsUpdate; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/components/'; +}; + +export type SimulateRunTestsComponentsPartialUpdateErrors = { + /** + * Response + */ + 400: RunTestErrorResponse; + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsComponentsPartialUpdateError = SimulateRunTestsComponentsPartialUpdateErrors[keyof SimulateRunTestsComponentsPartialUpdateErrors]; + +export type SimulateRunTestsComponentsPartialUpdateResponses = { + /** + * Response + */ + 200: RunTestResponse; +}; + +export type SimulateRunTestsComponentsPartialUpdateResponse = SimulateRunTestsComponentsPartialUpdateResponses[keyof SimulateRunTestsComponentsPartialUpdateResponses]; + +export type SimulateRunTestsDeleteTestExecutionsCreateData = { + body: TestExecutionBulkDelete; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/delete-test-executions/'; +}; + +export type SimulateRunTestsDeleteTestExecutionsCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsDeleteTestExecutionsCreateError = SimulateRunTestsDeleteTestExecutionsCreateErrors[keyof SimulateRunTestsDeleteTestExecutionsCreateErrors]; + +export type SimulateRunTestsDeleteTestExecutionsCreateResponses = { + /** + * Response + */ + 200: TestExecutionBulkDeleteResponse; +}; + +export type SimulateRunTestsDeleteTestExecutionsCreateResponse = SimulateRunTestsDeleteTestExecutionsCreateResponses[keyof SimulateRunTestsDeleteTestExecutionsCreateResponses]; + +export type SimulateRunTestsDeleteDeleteData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/delete/'; +}; + +export type SimulateRunTestsDeleteDeleteErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsDeleteDeleteError = SimulateRunTestsDeleteDeleteErrors[keyof SimulateRunTestsDeleteDeleteErrors]; + +export type SimulateRunTestsDeleteDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type SimulateRunTestsDeleteDeleteResponse = SimulateRunTestsDeleteDeleteResponses[keyof SimulateRunTestsDeleteDeleteResponses]; + +export type SimulateRunTestsEvalConfigsCreateData = { + body: AddEvalConfigsRequest; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/eval-configs/'; +}; + +export type SimulateRunTestsEvalConfigsCreateErrors = { + /** + * Response + */ + 400: EvalErrorResponse; + /** + * Unauthorized + */ + 401: unknown; + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsEvalConfigsCreateError = SimulateRunTestsEvalConfigsCreateErrors[keyof SimulateRunTestsEvalConfigsCreateErrors]; + +export type SimulateRunTestsEvalConfigsCreateResponses = { + /** + * Response + */ + 201: AddEvalConfigsResponse; +}; + +export type SimulateRunTestsEvalConfigsCreateResponse = SimulateRunTestsEvalConfigsCreateResponses[keyof SimulateRunTestsEvalConfigsCreateResponses]; + +export type SimulateRunTestsEvalConfigsDeleteData = { + body?: never; + path: { + run_test_id: string; + eval_config_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/'; +}; + +export type SimulateRunTestsEvalConfigsDeleteErrors = { + /** + * Response + */ + 400: EvalErrorResponse; + /** + * Unauthorized + */ + 401: unknown; + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsEvalConfigsDeleteError = SimulateRunTestsEvalConfigsDeleteErrors[keyof SimulateRunTestsEvalConfigsDeleteErrors]; + +export type SimulateRunTestsEvalConfigsDeleteResponses = { + /** + * Response + */ + 200: DeleteEvalConfigResponse; +}; + +export type SimulateRunTestsEvalConfigsDeleteResponse = SimulateRunTestsEvalConfigsDeleteResponses[keyof SimulateRunTestsEvalConfigsDeleteResponses]; + +export type SimulateRunTestsEvalConfigsGetStructureListData = { + body?: never; + path: { + run_test_id: string; + eval_config_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/get-structure/'; +}; + +export type SimulateRunTestsEvalConfigsGetStructureListErrors = { + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsEvalConfigsGetStructureListError = SimulateRunTestsEvalConfigsGetStructureListErrors[keyof SimulateRunTestsEvalConfigsGetStructureListErrors]; + +export type SimulateRunTestsEvalConfigsGetStructureListResponses = { + /** + * Response + */ + 200: EvalConfigStructureResponse; +}; + +export type SimulateRunTestsEvalConfigsGetStructureListResponse = SimulateRunTestsEvalConfigsGetStructureListResponses[keyof SimulateRunTestsEvalConfigsGetStructureListResponses]; + +export type SimulateRunTestsEvalConfigsUpdateCreateData = { + body: EvalConfigUpdateRequest; + path: { + run_test_id: string; + eval_config_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/eval-configs/{eval_config_id}/update/'; +}; + +export type SimulateRunTestsEvalConfigsUpdateCreateErrors = { + /** + * Response + */ + 400: EvalErrorResponse; + /** + * Unauthorized + */ + 401: unknown; + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsEvalConfigsUpdateCreateError = SimulateRunTestsEvalConfigsUpdateCreateErrors[keyof SimulateRunTestsEvalConfigsUpdateCreateErrors]; + +export type SimulateRunTestsEvalConfigsUpdateCreateResponses = { + /** + * Response + */ + 200: EvalConfigUpdateResponse; +}; + +export type SimulateRunTestsEvalConfigsUpdateCreateResponse = SimulateRunTestsEvalConfigsUpdateCreateResponses[keyof SimulateRunTestsEvalConfigsUpdateCreateResponses]; + +export type SimulateRunTestsEvalSummaryComparisonListData = { + body?: never; + path: { + run_test_id: string; + }; + query: { + /** + * JSON-encoded array of test execution UUIDs to compare. Example: ["uuid1","uuid2"]. Must be URL-encoded. + */ + execution_ids: string; + }; + url: '/simulate/run-tests/{run_test_id}/eval-summary-comparison/'; +}; + +export type SimulateRunTestsEvalSummaryComparisonListErrors = { + /** + * Response + */ + 400: EvalErrorResponse; + /** + * Unauthorized + */ + 401: unknown; + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsEvalSummaryComparisonListError = SimulateRunTestsEvalSummaryComparisonListErrors[keyof SimulateRunTestsEvalSummaryComparisonListErrors]; + +export type SimulateRunTestsEvalSummaryComparisonListResponses = { + /** + * Response + */ + 200: EvalSummaryComparisonResponse; +}; + +export type SimulateRunTestsEvalSummaryComparisonListResponse = SimulateRunTestsEvalSummaryComparisonListResponses[keyof SimulateRunTestsEvalSummaryComparisonListResponses]; + +export type SimulateRunTestsEvalSummaryListData = { + body?: never; + path: { + run_test_id: string; + }; + query?: { + /** + * UUID of a specific test execution to scope the summary to. If omitted, aggregates across all executions. + */ + execution_id?: string; + }; + url: '/simulate/run-tests/{run_test_id}/eval-summary/'; +}; + +export type SimulateRunTestsEvalSummaryListErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsEvalSummaryListError = SimulateRunTestsEvalSummaryListErrors[keyof SimulateRunTestsEvalSummaryListErrors]; + +export type SimulateRunTestsEvalSummaryListResponses = { + /** + * Response + */ + 200: EvalSummaryResponse; +}; + +export type SimulateRunTestsEvalSummaryListResponse = SimulateRunTestsEvalSummaryListResponses[keyof SimulateRunTestsEvalSummaryListResponses]; + +export type ExecuteRunTestData = { + body: ExecuteRunTest; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/execute/'; +}; + +export type ExecuteRunTestErrors = { + /** + * Response + */ + 400: RunTestErrorResponse; + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ExecuteRunTestError = ExecuteRunTestErrors[keyof ExecuteRunTestErrors]; + +export type ExecuteRunTestResponses = { + /** + * Response + */ + 200: RunTestExecutionResponse; +}; + +export type ExecuteRunTestResponse = ExecuteRunTestResponses[keyof ExecuteRunTestResponses]; + +export type ListRunTestExecutionsData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/executions/'; +}; + +export type ListRunTestExecutionsErrors = { + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListRunTestExecutionsError = ListRunTestExecutionsErrors[keyof ListRunTestExecutionsErrors]; + +export type ListRunTestExecutionsResponses = { + /** + * Response + */ + 200: Array; +}; + +export type ListRunTestExecutionsResponse = ListRunTestExecutionsResponses[keyof ListRunTestExecutionsResponses]; + +export type SimulateRunTestsRerunTestExecutionsCreateData = { + body: TestExecutionRerun; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/rerun-test-executions/'; +}; + +export type SimulateRunTestsRerunTestExecutionsCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsRerunTestExecutionsCreateError = SimulateRunTestsRerunTestExecutionsCreateErrors[keyof SimulateRunTestsRerunTestExecutionsCreateErrors]; + +export type SimulateRunTestsRerunTestExecutionsCreateResponses = { + /** + * Response + */ + 200: TestExecutionRerunResponse; +}; + +export type SimulateRunTestsRerunTestExecutionsCreateResponse = SimulateRunTestsRerunTestExecutionsCreateResponses[keyof SimulateRunTestsRerunTestExecutionsCreateResponses]; + +export type SimulateRunTestsRunNewEvalsCreateData = { + body: RunNewEvalsOnTestExecution; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/run-new-evals/'; +}; + +export type SimulateRunTestsRunNewEvalsCreateErrors = { + /** + * Response + */ + 400: EvalErrorResponse; + /** + * Unauthorized + */ + 401: unknown; + /** + * Response + */ + 404: EvalErrorResponse; + /** + * Response + */ + 500: EvalErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsRunNewEvalsCreateError = SimulateRunTestsRunNewEvalsCreateErrors[keyof SimulateRunTestsRunNewEvalsCreateErrors]; + +export type SimulateRunTestsRunNewEvalsCreateResponses = { + /** + * Response + */ + 200: RunNewEvalsResponse; +}; + +export type SimulateRunTestsRunNewEvalsCreateResponse = SimulateRunTestsRunNewEvalsCreateResponses[keyof SimulateRunTestsRunNewEvalsCreateResponses]; + +export type SimulateRunTestsScenariosListData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/scenarios/'; +}; + +export type SimulateRunTestsScenariosListErrors = { + /** + * Response + */ + 404: RunTestErrorResponse; + /** + * Response + */ + 500: RunTestErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsScenariosListError = SimulateRunTestsScenariosListErrors[keyof SimulateRunTestsScenariosListErrors]; + +export type SimulateRunTestsScenariosListResponses = { + /** + * Response + */ + 200: Array; +}; + +export type SimulateRunTestsScenariosListResponse = SimulateRunTestsScenariosListResponses[keyof SimulateRunTestsScenariosListResponses]; + +export type SimulateRunTestsSdkCodeListData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/sdk-code/'; +}; + +export type SimulateRunTestsSdkCodeListErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateRunTestsSdkCodeListError = SimulateRunTestsSdkCodeListErrors[keyof SimulateRunTestsSdkCodeListErrors]; + +export type SimulateRunTestsSdkCodeListResponses = { + /** + * Response + */ + 200: ChatSdkCodeResponse; +}; + +export type SimulateRunTestsSdkCodeListResponse = SimulateRunTestsSdkCodeListResponses[keyof SimulateRunTestsSdkCodeListResponses]; + +export type GetRunTestStatusData = { + body?: never; + path: { + run_test_id: string; + }; + query?: never; + url: '/simulate/run-tests/{run_test_id}/status/'; +}; + +export type GetRunTestStatusErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetRunTestStatusError = GetRunTestStatusErrors[keyof GetRunTestStatusErrors]; + +export type GetRunTestStatusResponses = { + /** + * Response + */ + 200: TestExecutionStatusSummary; +}; + +export type GetRunTestStatusResponse = GetRunTestStatusResponses[keyof GetRunTestStatusResponses]; + +export type ListScenariosData = { + body?: never; + path?: never; + query?: { + search?: string; + agent_definition_id?: string; + agent_type?: string; + page?: number; + limit?: number; + }; + url: '/simulate/scenarios/'; +}; + +export type ListScenariosErrors = { + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListScenariosError = ListScenariosErrors[keyof ListScenariosErrors]; + +export type ListScenariosResponses = { + /** + * Response + */ + 200: ScenarioListResponse; +}; + +export type ListScenariosResponse = ListScenariosResponses[keyof ListScenariosResponses]; + +export type CreateScenarioData = { + body: ScenarioCreateRequest; + path?: never; + query?: never; + url: '/simulate/scenarios/create/'; +}; + +export type CreateScenarioErrors = { + /** + * Response + */ + 400: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateScenarioError = CreateScenarioErrors[keyof CreateScenarioErrors]; + +export type CreateScenarioResponses = { + /** + * Response + */ + 202: ScenarioCreateResponse; +}; + +export type CreateScenarioResponse = CreateScenarioResponses[keyof CreateScenarioResponses]; + +export type SimulateScenariosGetColumnsListData = { + body?: never; + path?: never; + query?: { + search?: string; + agent_definition_id?: string; + agent_type?: string; + page?: number; + limit?: number; + }; + url: '/simulate/scenarios/get-columns/'; +}; + +export type SimulateScenariosGetColumnsListErrors = { + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateScenariosGetColumnsListError = SimulateScenariosGetColumnsListErrors[keyof SimulateScenariosGetColumnsListErrors]; + +export type SimulateScenariosGetColumnsListResponses = { + /** + * Response + */ + 200: ScenarioListResponse; +}; + +export type SimulateScenariosGetColumnsListResponse = SimulateScenariosGetColumnsListResponses[keyof SimulateScenariosGetColumnsListResponses]; + +export type GetScenarioData = { + body?: never; + path: { + scenario_id: string; + }; + query?: never; + url: '/simulate/scenarios/{scenario_id}/'; +}; + +export type GetScenarioErrors = { + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetScenarioError = GetScenarioErrors[keyof GetScenarioErrors]; + +export type GetScenarioResponses = { + /** + * Response + */ + 200: ScenarioDetailResponse; +}; + +export type GetScenarioResponse = GetScenarioResponses[keyof GetScenarioResponses]; + +export type SimulateScenariosAddColumnsCreateData = { + body: ScenarioAddColumnsRequest; + path: { + scenario_id: string; + }; + query?: never; + url: '/simulate/scenarios/{scenario_id}/add-columns/'; +}; + +export type SimulateScenariosAddColumnsCreateErrors = { + /** + * Response + */ + 400: ScenarioErrorResponse; + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateScenariosAddColumnsCreateError = SimulateScenariosAddColumnsCreateErrors[keyof SimulateScenariosAddColumnsCreateErrors]; + +export type SimulateScenariosAddColumnsCreateResponses = { + /** + * Response + */ + 202: ScenarioAddColumnsResponse; +}; + +export type SimulateScenariosAddColumnsCreateResponse = SimulateScenariosAddColumnsCreateResponses[keyof SimulateScenariosAddColumnsCreateResponses]; + +export type SimulateScenariosAddRowsCreateData = { + body: ScenarioAddRowsRequest; + path: { + scenario_id: string; + }; + query?: never; + url: '/simulate/scenarios/{scenario_id}/add-rows/'; +}; + +export type SimulateScenariosAddRowsCreateErrors = { + /** + * Response + */ + 400: ScenarioErrorResponse; + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateScenariosAddRowsCreateError = SimulateScenariosAddRowsCreateErrors[keyof SimulateScenariosAddRowsCreateErrors]; + +export type SimulateScenariosAddRowsCreateResponses = { + /** + * Response + */ + 202: ScenarioAddRowsResponse; +}; + +export type SimulateScenariosAddRowsCreateResponse = SimulateScenariosAddRowsCreateResponses[keyof SimulateScenariosAddRowsCreateResponses]; + +export type DeleteScenarioData = { + body?: never; + path: { + scenario_id: string; + }; + query?: never; + url: '/simulate/scenarios/{scenario_id}/delete/'; +}; + +export type DeleteScenarioErrors = { + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeleteScenarioError = DeleteScenarioErrors[keyof DeleteScenarioErrors]; + +export type DeleteScenarioResponses = { + /** + * Response + */ + 200: ScenarioDeleteResponse; +}; + +export type DeleteScenarioResponse = DeleteScenarioResponses[keyof DeleteScenarioResponses]; + +export type UpdateScenarioData = { + body: ScenarioEditRequest; + path: { + scenario_id: string; + }; + query?: never; + url: '/simulate/scenarios/{scenario_id}/edit/'; +}; + +export type UpdateScenarioErrors = { + /** + * Response + */ + 400: ScenarioErrorResponse; + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateScenarioError = UpdateScenarioErrors[keyof UpdateScenarioErrors]; + +export type UpdateScenarioResponses = { + /** + * Response + */ + 200: ScenarioEditResponse; +}; + +export type UpdateScenarioResponse = UpdateScenarioResponses[keyof UpdateScenarioResponses]; + +export type SimulateScenariosPromptsUpdateData = { + body: ScenarioEditPromptsRequest; + path: { + scenario_id: string; + }; + query?: never; + url: '/simulate/scenarios/{scenario_id}/prompts/'; +}; + +export type SimulateScenariosPromptsUpdateErrors = { + /** + * Response + */ + 400: ScenarioErrorResponse; + /** + * Response + */ + 404: ScenarioErrorResponse; + /** + * Response + */ + 500: ScenarioErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateScenariosPromptsUpdateError = SimulateScenariosPromptsUpdateErrors[keyof SimulateScenariosPromptsUpdateErrors]; + +export type SimulateScenariosPromptsUpdateResponses = { + /** + * Response + */ + 200: ScenarioPromptsUpdateResponse; +}; + +export type SimulateScenariosPromptsUpdateResponse = SimulateScenariosPromptsUpdateResponses[keyof SimulateScenariosPromptsUpdateResponses]; + +export type SimulateSimulatorAgentsListData = { + body?: never; + path?: never; + query?: never; + url: '/simulate/simulator-agents/'; +}; + +export type SimulateSimulatorAgentsListErrors = { + /** + * Response + */ + 400: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateSimulatorAgentsListError = SimulateSimulatorAgentsListErrors[keyof SimulateSimulatorAgentsListErrors]; + +export type SimulateSimulatorAgentsListResponses = { + /** + * Response + */ + 200: SimulatorAgentListResponse; +}; + +export type SimulateSimulatorAgentsListResponse = SimulateSimulatorAgentsListResponses[keyof SimulateSimulatorAgentsListResponses]; + +export type SimulateSimulatorAgentsCreateCreateData = { + body: SimulatorAgent2; + path?: never; + query?: never; + url: '/simulate/simulator-agents/create/'; +}; + +export type SimulateSimulatorAgentsCreateCreateErrors = { + /** + * Response + */ + 400: SimulatorAgentValidationErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateSimulatorAgentsCreateCreateError = SimulateSimulatorAgentsCreateCreateErrors[keyof SimulateSimulatorAgentsCreateCreateErrors]; + +export type SimulateSimulatorAgentsCreateCreateResponses = { + /** + * Response + */ + 201: SimulatorAgent; +}; + +export type SimulateSimulatorAgentsCreateCreateResponse = SimulateSimulatorAgentsCreateCreateResponses[keyof SimulateSimulatorAgentsCreateCreateResponses]; + +export type SimulateSimulatorAgentsReadData = { + body?: never; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/simulator-agents/{agent_id}/'; +}; + +export type SimulateSimulatorAgentsReadErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateSimulatorAgentsReadError = SimulateSimulatorAgentsReadErrors[keyof SimulateSimulatorAgentsReadErrors]; + +export type SimulateSimulatorAgentsReadResponses = { + /** + * Response + */ + 200: SimulatorAgent; +}; + +export type SimulateSimulatorAgentsReadResponse = SimulateSimulatorAgentsReadResponses[keyof SimulateSimulatorAgentsReadResponses]; + +export type SimulateSimulatorAgentsDeleteDeleteData = { + body?: never; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/simulator-agents/{agent_id}/delete/'; +}; + +export type SimulateSimulatorAgentsDeleteDeleteErrors = { + /** + * Response + */ + 404: ApiErrorWithDetailsResponse; + /** + * Response + */ + 500: ApiErrorWithDetailsResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateSimulatorAgentsDeleteDeleteError = SimulateSimulatorAgentsDeleteDeleteErrors[keyof SimulateSimulatorAgentsDeleteDeleteErrors]; + +export type SimulateSimulatorAgentsDeleteDeleteResponses = { + /** + * Response + */ + 200: SimulatorAgentDeleteResponse; +}; + +export type SimulateSimulatorAgentsDeleteDeleteResponse = SimulateSimulatorAgentsDeleteDeleteResponses[keyof SimulateSimulatorAgentsDeleteDeleteResponses]; + +export type SimulateSimulatorAgentsEditUpdateData = { + body: SimulatorAgent2; + path: { + agent_id: string; + }; + query?: never; + url: '/simulate/simulator-agents/{agent_id}/edit/'; +}; + +export type SimulateSimulatorAgentsEditUpdateErrors = { + /** + * Response + */ + 400: SimulatorAgentValidationErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateSimulatorAgentsEditUpdateError = SimulateSimulatorAgentsEditUpdateErrors[keyof SimulateSimulatorAgentsEditUpdateErrors]; + +export type SimulateSimulatorAgentsEditUpdateResponses = { + /** + * Response + */ + 200: SimulatorAgent; +}; + +export type SimulateSimulatorAgentsEditUpdateResponse = SimulateSimulatorAgentsEditUpdateResponses[keyof SimulateSimulatorAgentsEditUpdateResponses]; + +export type GetTestExecutionData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: { + search?: string; + filters?: string; + row_groups?: string; + group_keys?: string; + page?: number; + limit?: number; + }; + url: '/simulate/test-executions/{test_execution_id}/'; +}; + +export type GetTestExecutionErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTestExecutionError = GetTestExecutionErrors[keyof GetTestExecutionErrors]; + +export type GetTestExecutionResponses = { + /** + * Response + */ + 200: TestExecutionDetailResponse; +}; + +export type GetTestExecutionResponse = GetTestExecutionResponses[keyof GetTestExecutionResponses]; + +export type GetTestExecutionAnalyticsData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/analytics/'; +}; + +export type GetTestExecutionAnalyticsErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTestExecutionAnalyticsError = GetTestExecutionAnalyticsErrors[keyof GetTestExecutionAnalyticsErrors]; + +export type GetTestExecutionAnalyticsResponses = { + /** + * Response + */ + 200: TestExecutionAnalytics; +}; + +export type GetTestExecutionAnalyticsResponse = GetTestExecutionAnalyticsResponses[keyof GetTestExecutionAnalyticsResponses]; + +export type CancelTestExecutionData = { + body: EmptyRequest2; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/cancel/'; +}; + +export type CancelTestExecutionErrors = { + /** + * Response + */ + 400: ErrorResponse; + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CancelTestExecutionError = CancelTestExecutionErrors[keyof CancelTestExecutionErrors]; + +export type CancelTestExecutionResponses = { + /** + * Response + */ + 200: CancelTestExecutionResponse; +}; + +export type CancelTestExecutionResponse2 = CancelTestExecutionResponses[keyof CancelTestExecutionResponses]; + +export type SimulateTestExecutionsChatCallExecutionsBatchCreateData = { + body: EmptyRequest2; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/chat/call-executions/batch/'; +}; + +export type SimulateTestExecutionsChatCallExecutionsBatchCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsChatCallExecutionsBatchCreateError = SimulateTestExecutionsChatCallExecutionsBatchCreateErrors[keyof SimulateTestExecutionsChatCallExecutionsBatchCreateErrors]; + +export type SimulateTestExecutionsChatCallExecutionsBatchCreateResponses = { + /** + * Response + */ + 200: TestExecutionChatBatchResponse; +}; + +export type SimulateTestExecutionsChatCallExecutionsBatchCreateResponse = SimulateTestExecutionsChatCallExecutionsBatchCreateResponses[keyof SimulateTestExecutionsChatCallExecutionsBatchCreateResponses]; + +export type SimulateTestExecutionsColumnOrderUpdateData = { + body: TestExecutionColumnOrder; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/column-order/'; +}; + +export type SimulateTestExecutionsColumnOrderUpdateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsColumnOrderUpdateError = SimulateTestExecutionsColumnOrderUpdateErrors[keyof SimulateTestExecutionsColumnOrderUpdateErrors]; + +export type SimulateTestExecutionsColumnOrderUpdateResponses = { + /** + * Response + */ + 200: TestExecutionColumnOrderResponse; +}; + +export type SimulateTestExecutionsColumnOrderUpdateResponse = SimulateTestExecutionsColumnOrderUpdateResponses[keyof SimulateTestExecutionsColumnOrderUpdateResponses]; + +export type SimulateTestExecutionsDeleteDeleteData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/delete/'; +}; + +export type SimulateTestExecutionsDeleteDeleteErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsDeleteDeleteError = SimulateTestExecutionsDeleteDeleteErrors[keyof SimulateTestExecutionsDeleteDeleteErrors]; + +export type SimulateTestExecutionsDeleteDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type SimulateTestExecutionsDeleteDeleteResponse = SimulateTestExecutionsDeleteDeleteResponses[keyof SimulateTestExecutionsDeleteDeleteResponses]; + +export type SimulateTestExecutionsEvalExplanationSummaryListData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/eval-explanation-summary/'; +}; + +export type SimulateTestExecutionsEvalExplanationSummaryListErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsEvalExplanationSummaryListError = SimulateTestExecutionsEvalExplanationSummaryListErrors[keyof SimulateTestExecutionsEvalExplanationSummaryListErrors]; + +export type SimulateTestExecutionsEvalExplanationSummaryListResponses = { + /** + * Response + */ + 200: EvalExplanationSummaryResponse; +}; + +export type SimulateTestExecutionsEvalExplanationSummaryListResponse = SimulateTestExecutionsEvalExplanationSummaryListResponses[keyof SimulateTestExecutionsEvalExplanationSummaryListResponses]; + +export type SimulateTestExecutionsEvalExplanationSummaryRefreshCreateData = { + body: EmptyRequest2; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/eval-explanation-summary/refresh/'; +}; + +export type SimulateTestExecutionsEvalExplanationSummaryRefreshCreateErrors = { + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsEvalExplanationSummaryRefreshCreateError = SimulateTestExecutionsEvalExplanationSummaryRefreshCreateErrors[keyof SimulateTestExecutionsEvalExplanationSummaryRefreshCreateErrors]; + +export type SimulateTestExecutionsEvalExplanationSummaryRefreshCreateResponses = { + /** + * Response + */ + 200: EvalExplanationSummaryRefreshResponse; +}; + +export type SimulateTestExecutionsEvalExplanationSummaryRefreshCreateResponse = SimulateTestExecutionsEvalExplanationSummaryRefreshCreateResponses[keyof SimulateTestExecutionsEvalExplanationSummaryRefreshCreateResponses]; + +export type GetTestExecutionKpisData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/kpis/'; +}; + +export type GetTestExecutionKpisErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTestExecutionKpisError = GetTestExecutionKpisErrors[keyof GetTestExecutionKpisErrors]; + +export type GetTestExecutionKpisResponses = { + /** + * Response + */ + 200: RunTestKpisResponse; +}; + +export type GetTestExecutionKpisResponse = GetTestExecutionKpisResponses[keyof GetTestExecutionKpisResponses]; + +export type SimulateTestExecutionsOptimiserAnalysisListData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/optimiser-analysis/'; +}; + +export type SimulateTestExecutionsOptimiserAnalysisListErrors = { + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsOptimiserAnalysisListError = SimulateTestExecutionsOptimiserAnalysisListErrors[keyof SimulateTestExecutionsOptimiserAnalysisListErrors]; + +export type SimulateTestExecutionsOptimiserAnalysisListResponses = { + /** + * Response + */ + 200: OptimiserAnalysisResponse; +}; + +export type SimulateTestExecutionsOptimiserAnalysisListResponse = SimulateTestExecutionsOptimiserAnalysisListResponses[keyof SimulateTestExecutionsOptimiserAnalysisListResponses]; + +export type SimulateTestExecutionsOptimiserAnalysisRefreshCreateData = { + body: EmptyRequest2; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/optimiser-analysis/refresh/'; +}; + +export type SimulateTestExecutionsOptimiserAnalysisRefreshCreateErrors = { + /** + * Response + */ + 400: ApiTextErrorResponse; + /** + * Response + */ + 404: ApiTextErrorResponse; + /** + * Response + */ + 500: ApiTextErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsOptimiserAnalysisRefreshCreateError = SimulateTestExecutionsOptimiserAnalysisRefreshCreateErrors[keyof SimulateTestExecutionsOptimiserAnalysisRefreshCreateErrors]; + +export type SimulateTestExecutionsOptimiserAnalysisRefreshCreateResponses = { + /** + * Response + */ + 200: OptimiserAnalysisRefreshResponse; +}; + +export type SimulateTestExecutionsOptimiserAnalysisRefreshCreateResponse = SimulateTestExecutionsOptimiserAnalysisRefreshCreateResponses[keyof SimulateTestExecutionsOptimiserAnalysisRefreshCreateResponses]; + +export type GetTestExecutionPerformanceSummaryData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/performance-summary/'; +}; + +export type GetTestExecutionPerformanceSummaryErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTestExecutionPerformanceSummaryError = GetTestExecutionPerformanceSummaryErrors[keyof GetTestExecutionPerformanceSummaryErrors]; + +export type GetTestExecutionPerformanceSummaryResponses = { + /** + * Response + */ + 200: PerformanceSummary; +}; + +export type GetTestExecutionPerformanceSummaryResponse = GetTestExecutionPerformanceSummaryResponses[keyof GetTestExecutionPerformanceSummaryResponses]; + +export type SimulateTestExecutionsRerunCallsCreateData = { + body: CallExecutionRerun; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/rerun-calls/'; +}; + +export type SimulateTestExecutionsRerunCallsCreateErrors = { + /** + * Response + */ + 400: ErrorResponse; + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type SimulateTestExecutionsRerunCallsCreateError = SimulateTestExecutionsRerunCallsCreateErrors[keyof SimulateTestExecutionsRerunCallsCreateErrors]; + +export type SimulateTestExecutionsRerunCallsCreateResponses = { + /** + * Response + */ + 200: RerunCallsResponse; +}; + +export type SimulateTestExecutionsRerunCallsCreateResponse = SimulateTestExecutionsRerunCallsCreateResponses[keyof SimulateTestExecutionsRerunCallsCreateResponses]; + +export type GetTestExecutionTranscriptsData = { + body?: never; + path: { + test_execution_id: string; + }; + query?: never; + url: '/simulate/test-executions/{test_execution_id}/transcripts/'; +}; + +export type GetTestExecutionTranscriptsErrors = { + /** + * Response + */ + 404: ErrorResponse; + /** + * Response + */ + 500: ErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTestExecutionTranscriptsError = GetTestExecutionTranscriptsErrors[keyof GetTestExecutionTranscriptsErrors]; + +export type GetTestExecutionTranscriptsResponses = { + /** + * Response + */ + 200: TestExecutionTranscriptsResponse; +}; + +export type GetTestExecutionTranscriptsResponse = GetTestExecutionTranscriptsResponses[keyof GetTestExecutionTranscriptsResponses]; + +export type CreateBulkTraceAnnotationData = { + body: BulkAnnotationRequest; + path?: never; + query?: never; + url: '/tracer/bulk-annotation/'; +}; + +export type CreateBulkTraceAnnotationErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateBulkTraceAnnotationError = CreateBulkTraceAnnotationErrors[keyof CreateBulkTraceAnnotationErrors]; + +export type CreateBulkTraceAnnotationResponses = { + /** + * Response + */ + 200: BulkAnnotationResponse; +}; + +export type CreateBulkTraceAnnotationResponse = CreateBulkTraceAnnotationResponses[keyof CreateBulkTraceAnnotationResponses]; + +export type ListErrorFeedIssuesData = { + body?: never; + path?: never; + query?: { + project_id?: string; + search?: string; + status?: 'escalating' | 'for_review' | 'acknowledged' | 'resolved'; + fix_layer?: string; + source?: 'scanner' | 'eval'; + issue_group?: string; + time_range_days?: number; + sort_by?: 'last_seen' | 'first_seen' | 'error_count' | 'unique_traces'; + sort_dir?: 'asc' | 'desc'; + limit?: number; + offset?: number; + }; + url: '/tracer/feed/issues/'; +}; + +export type ListErrorFeedIssuesErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListErrorFeedIssuesError = ListErrorFeedIssuesErrors[keyof ListErrorFeedIssuesErrors]; + +export type ListErrorFeedIssuesResponses = { + /** + * Response + */ + 200: FeedListApiResponse; +}; + +export type ListErrorFeedIssuesResponse = ListErrorFeedIssuesResponses[keyof ListErrorFeedIssuesResponses]; + +export type GetErrorFeedIssueStatsData = { + body?: never; + path?: never; + query?: { + project_id?: string; + time_range_days?: number; + }; + url: '/tracer/feed/issues/stats/'; +}; + +export type GetErrorFeedIssueStatsErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetErrorFeedIssueStatsError = GetErrorFeedIssueStatsErrors[keyof GetErrorFeedIssueStatsErrors]; + +export type GetErrorFeedIssueStatsResponses = { + /** + * Response + */ + 200: FeedStatsApiResponse; +}; + +export type GetErrorFeedIssueStatsResponse = GetErrorFeedIssueStatsResponses[keyof GetErrorFeedIssueStatsResponses]; + +export type GetErrorFeedIssueData = { + body?: never; + path: { + cluster_id: string; + }; + query?: { + project_id?: string; + }; + url: '/tracer/feed/issues/{cluster_id}/'; +}; + +export type GetErrorFeedIssueErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetErrorFeedIssueError = GetErrorFeedIssueErrors[keyof GetErrorFeedIssueErrors]; + +export type GetErrorFeedIssueResponses = { + /** + * Response + */ + 200: FeedDetailApiResponse; +}; + +export type GetErrorFeedIssueResponse = GetErrorFeedIssueResponses[keyof GetErrorFeedIssueResponses]; + +export type TracerFeedIssuesPartialUpdateData = { + body: FeedUpdateBody; + path: { + cluster_id: string; + }; + query?: never; + url: '/tracer/feed/issues/{cluster_id}/'; +}; + +export type TracerFeedIssuesPartialUpdateErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesPartialUpdateError = TracerFeedIssuesPartialUpdateErrors[keyof TracerFeedIssuesPartialUpdateErrors]; + +export type TracerFeedIssuesPartialUpdateResponses = { + /** + * Response + */ + 200: FeedDetailApiResponse; +}; + +export type TracerFeedIssuesPartialUpdateResponse = TracerFeedIssuesPartialUpdateResponses[keyof TracerFeedIssuesPartialUpdateResponses]; + +export type TracerFeedIssuesCreateLinearIssueCreateData = { + body: CreateLinearIssue; + path: { + cluster_id: string; + }; + query?: never; + url: '/tracer/feed/issues/{cluster_id}/create-linear-issue/'; +}; + +export type TracerFeedIssuesCreateLinearIssueCreateErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesCreateLinearIssueCreateError = TracerFeedIssuesCreateLinearIssueCreateErrors[keyof TracerFeedIssuesCreateLinearIssueCreateErrors]; + +export type TracerFeedIssuesCreateLinearIssueCreateResponses = { + /** + * Response + */ + 200: CreateLinearIssueResponse; +}; + +export type TracerFeedIssuesCreateLinearIssueCreateResponse = TracerFeedIssuesCreateLinearIssueCreateResponses[keyof TracerFeedIssuesCreateLinearIssueCreateResponses]; + +export type TracerFeedIssuesDeepAnalysisCreateData = { + body: DeepAnalysisBody; + path: { + cluster_id: string; + }; + query?: never; + url: '/tracer/feed/issues/{cluster_id}/deep-analysis/'; +}; + +export type TracerFeedIssuesDeepAnalysisCreateErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesDeepAnalysisCreateError = TracerFeedIssuesDeepAnalysisCreateErrors[keyof TracerFeedIssuesDeepAnalysisCreateErrors]; + +export type TracerFeedIssuesDeepAnalysisCreateResponses = { + /** + * Response + */ + 200: DeepAnalysisDispatchApiResponse; +}; + +export type TracerFeedIssuesDeepAnalysisCreateResponse = TracerFeedIssuesDeepAnalysisCreateResponses[keyof TracerFeedIssuesDeepAnalysisCreateResponses]; + +export type TracerFeedIssuesOverviewListData = { + body?: never; + path: { + cluster_id: string; + }; + query?: never; + url: '/tracer/feed/issues/{cluster_id}/overview/'; +}; + +export type TracerFeedIssuesOverviewListErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesOverviewListError = TracerFeedIssuesOverviewListErrors[keyof TracerFeedIssuesOverviewListErrors]; + +export type TracerFeedIssuesOverviewListResponses = { + /** + * Response + */ + 200: OverviewApiResponse; +}; + +export type TracerFeedIssuesOverviewListResponse = TracerFeedIssuesOverviewListResponses[keyof TracerFeedIssuesOverviewListResponses]; + +export type TracerFeedIssuesRootCauseListData = { + body?: never; + path: { + cluster_id: string; + }; + query: { + trace_id: string; + }; + url: '/tracer/feed/issues/{cluster_id}/root-cause/'; +}; + +export type TracerFeedIssuesRootCauseListErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesRootCauseListError = TracerFeedIssuesRootCauseListErrors[keyof TracerFeedIssuesRootCauseListErrors]; + +export type TracerFeedIssuesRootCauseListResponses = { + /** + * Response + */ + 200: DeepAnalysisApiResponse; +}; + +export type TracerFeedIssuesRootCauseListResponse = TracerFeedIssuesRootCauseListResponses[keyof TracerFeedIssuesRootCauseListResponses]; + +export type TracerFeedIssuesSidebarListData = { + body?: never; + path: { + cluster_id: string; + }; + query?: { + trace_id?: string; + }; + url: '/tracer/feed/issues/{cluster_id}/sidebar/'; +}; + +export type TracerFeedIssuesSidebarListErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesSidebarListError = TracerFeedIssuesSidebarListErrors[keyof TracerFeedIssuesSidebarListErrors]; + +export type TracerFeedIssuesSidebarListResponses = { + /** + * Response + */ + 200: FeedSidebarApiResponse; +}; + +export type TracerFeedIssuesSidebarListResponse = TracerFeedIssuesSidebarListResponses[keyof TracerFeedIssuesSidebarListResponses]; + +export type TracerFeedIssuesTracesListData = { + body?: never; + path: { + cluster_id: string; + }; + query?: { + limit?: number; + offset?: number; + }; + url: '/tracer/feed/issues/{cluster_id}/traces/'; +}; + +export type TracerFeedIssuesTracesListErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesTracesListError = TracerFeedIssuesTracesListErrors[keyof TracerFeedIssuesTracesListErrors]; + +export type TracerFeedIssuesTracesListResponses = { + /** + * Response + */ + 200: TracesTabApiResponse; +}; + +export type TracerFeedIssuesTracesListResponse = TracerFeedIssuesTracesListResponses[keyof TracerFeedIssuesTracesListResponses]; + +export type TracerFeedIssuesTrendsListData = { + body?: never; + path: { + cluster_id: string; + }; + query?: { + days?: number; + }; + url: '/tracer/feed/issues/{cluster_id}/trends/'; +}; + +export type TracerFeedIssuesTrendsListErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 403: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerFeedIssuesTrendsListError = TracerFeedIssuesTrendsListErrors[keyof TracerFeedIssuesTrendsListErrors]; + +export type TracerFeedIssuesTrendsListResponses = { + /** + * Response + */ + 200: TrendsTabApiResponse; +}; + +export type TracerFeedIssuesTrendsListResponse = TracerFeedIssuesTrendsListResponses[keyof TracerFeedIssuesTrendsListResponses]; + +export type ListTraceAnnotationLabelsData = { + body?: never; + path?: never; + query?: { + project_id?: string; + }; + url: '/tracer/get-annotation-labels/'; +}; + +export type ListTraceAnnotationLabelsErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListTraceAnnotationLabelsError = ListTraceAnnotationLabelsErrors[keyof ListTraceAnnotationLabelsErrors]; + +export type ListTraceAnnotationLabelsResponses = { + /** + * Response + */ + 200: GetAnnotationLabelsResponse; +}; + +export type ListTraceAnnotationLabelsResponse = ListTraceAnnotationLabelsResponses[keyof ListTraceAnnotationLabelsResponses]; + +export type ListTraceProjectsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/project/list_projects/'; +}; + +export type ListTraceProjectsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListTraceProjectsError = ListTraceProjectsErrors[keyof ListTraceProjectsErrors]; + +export type ListTraceProjectsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListTraceProjectsResponse = ListTraceProjectsResponses[keyof ListTraceProjectsResponses]; + +export type TracerTraceAnnotationListData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace-annotation/'; +}; + +export type TracerTraceAnnotationListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAnnotationListError = TracerTraceAnnotationListErrors[keyof TracerTraceAnnotationListErrors]; + +export type TracerTraceAnnotationListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceAnnotationListResponse = TracerTraceAnnotationListResponses[keyof TracerTraceAnnotationListResponses]; + +export type TracerTraceAnnotationCreateData = { + body: GetTraceAnnotation2; + path?: never; + query?: never; + url: '/tracer/trace-annotation/'; +}; + +export type TracerTraceAnnotationCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAnnotationCreateError = TracerTraceAnnotationCreateErrors[keyof TracerTraceAnnotationCreateErrors]; + +export type TracerTraceAnnotationCreateResponses = { + /** + * Response + */ + 201: GetTraceAnnotation; +}; + +export type TracerTraceAnnotationCreateResponse = TracerTraceAnnotationCreateResponses[keyof TracerTraceAnnotationCreateResponses]; + +export type TracerTraceAnnotationGetAnnotationValuesData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + observation_span_id?: string; + trace_id?: string; + annotators?: string; + exclude_annotators?: string; + }; + url: '/tracer/trace-annotation/get_annotation_values/'; +}; + +export type TracerTraceAnnotationGetAnnotationValuesErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAnnotationGetAnnotationValuesError = TracerTraceAnnotationGetAnnotationValuesErrors[keyof TracerTraceAnnotationGetAnnotationValuesErrors]; + +export type TracerTraceAnnotationGetAnnotationValuesResponses = { + /** + * Response + */ + 200: GetTraceAnnotationValuesResponse; +}; + +export type TracerTraceAnnotationGetAnnotationValuesResponse = TracerTraceAnnotationGetAnnotationValuesResponses[keyof TracerTraceAnnotationGetAnnotationValuesResponses]; + +export type TracerTraceAnnotationDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-annotation/{id}/'; +}; + +export type TracerTraceAnnotationDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAnnotationDeleteError = TracerTraceAnnotationDeleteErrors[keyof TracerTraceAnnotationDeleteErrors]; + +export type TracerTraceAnnotationDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type TracerTraceAnnotationDeleteResponse = TracerTraceAnnotationDeleteResponses[keyof TracerTraceAnnotationDeleteResponses]; + +export type TracerTraceAnnotationReadData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-annotation/{id}/'; +}; + +export type TracerTraceAnnotationReadErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAnnotationReadError = TracerTraceAnnotationReadErrors[keyof TracerTraceAnnotationReadErrors]; + +export type TracerTraceAnnotationReadResponses = { + /** + * Response + */ + 200: GetTraceAnnotation; +}; + +export type TracerTraceAnnotationReadResponse = TracerTraceAnnotationReadResponses[keyof TracerTraceAnnotationReadResponses]; + +export type TracerTraceAnnotationPartialUpdateData = { + body: GetTraceAnnotation2; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-annotation/{id}/'; +}; + +export type TracerTraceAnnotationPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAnnotationPartialUpdateError = TracerTraceAnnotationPartialUpdateErrors[keyof TracerTraceAnnotationPartialUpdateErrors]; + +export type TracerTraceAnnotationPartialUpdateResponses = { + /** + * Response + */ + 200: GetTraceAnnotation; +}; + +export type TracerTraceAnnotationPartialUpdateResponse = TracerTraceAnnotationPartialUpdateResponses[keyof TracerTraceAnnotationPartialUpdateResponses]; + +export type TracerTraceAnnotationUpdateData = { + body: GetTraceAnnotation2; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-annotation/{id}/'; +}; + +export type TracerTraceAnnotationUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAnnotationUpdateError = TracerTraceAnnotationUpdateErrors[keyof TracerTraceAnnotationUpdateErrors]; + +export type TracerTraceAnnotationUpdateResponses = { + /** + * Response + */ + 200: GetTraceAnnotation; +}; + +export type TracerTraceAnnotationUpdateResponse = TracerTraceAnnotationUpdateResponses[keyof TracerTraceAnnotationUpdateResponses]; + +export type TracerTraceSessionListData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace-session/'; +}; + +export type TracerTraceSessionListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionListError = TracerTraceSessionListErrors[keyof TracerTraceSessionListErrors]; + +export type TracerTraceSessionListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceSessionListResponse = TracerTraceSessionListResponses[keyof TracerTraceSessionListResponses]; + +export type TracerTraceSessionCreateData = { + body: TraceSession2; + path?: never; + query?: never; + url: '/tracer/trace-session/'; +}; + +export type TracerTraceSessionCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionCreateError = TracerTraceSessionCreateErrors[keyof TracerTraceSessionCreateErrors]; + +export type TracerTraceSessionCreateResponses = { + /** + * Response + */ + 201: TraceSession; +}; + +export type TracerTraceSessionCreateResponse = TracerTraceSessionCreateResponses[keyof TracerTraceSessionCreateResponses]; + +export type TracerTraceSessionGetSessionFilterValuesData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace-session/get_session_filter_values/'; +}; + +export type TracerTraceSessionGetSessionFilterValuesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionGetSessionFilterValuesError = TracerTraceSessionGetSessionFilterValuesErrors[keyof TracerTraceSessionGetSessionFilterValuesErrors]; + +export type TracerTraceSessionGetSessionFilterValuesResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceSessionGetSessionFilterValuesResponse = TracerTraceSessionGetSessionFilterValuesResponses[keyof TracerTraceSessionGetSessionFilterValuesResponses]; + +export type GetTraceSessionGraphDataData = { + body: TraceSessionGraphDataRequest; + path?: never; + query?: never; + url: '/tracer/trace-session/get_session_graph_data/'; +}; + +export type GetTraceSessionGraphDataErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTraceSessionGraphDataError = GetTraceSessionGraphDataErrors[keyof GetTraceSessionGraphDataErrors]; + +export type GetTraceSessionGraphDataResponses = { + /** + * Response + */ + 201: TraceSessionGraphDataRequest; +}; + +export type GetTraceSessionGraphDataResponse = GetTraceSessionGraphDataResponses[keyof GetTraceSessionGraphDataResponses]; + +export type TracerTraceSessionGetTraceSessionExportDataData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace-session/get_trace_session_export_data/'; +}; + +export type TracerTraceSessionGetTraceSessionExportDataErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionGetTraceSessionExportDataError = TracerTraceSessionGetTraceSessionExportDataErrors[keyof TracerTraceSessionGetTraceSessionExportDataErrors]; + +export type TracerTraceSessionGetTraceSessionExportDataResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceSessionGetTraceSessionExportDataResponse = TracerTraceSessionGetTraceSessionExportDataResponses[keyof TracerTraceSessionGetTraceSessionExportDataResponses]; + +export type ListTraceSessionsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + project_id?: string; + user_id?: string; + bookmarked?: boolean; + filters?: string; + sort_params?: string; + page_number?: number; + page_size?: number; + interval?: string; + }; + url: '/tracer/trace-session/list_sessions/'; +}; + +export type ListTraceSessionsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListTraceSessionsError = ListTraceSessionsErrors[keyof ListTraceSessionsErrors]; + +export type ListTraceSessionsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListTraceSessionsResponse = ListTraceSessionsResponses[keyof ListTraceSessionsResponses]; + +export type TracerTraceSessionDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-session/{id}/'; +}; + +export type TracerTraceSessionDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionDeleteError = TracerTraceSessionDeleteErrors[keyof TracerTraceSessionDeleteErrors]; + +export type TracerTraceSessionDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type TracerTraceSessionDeleteResponse = TracerTraceSessionDeleteResponses[keyof TracerTraceSessionDeleteResponses]; + +export type GetTraceSessionData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-session/{id}/'; +}; + +export type GetTraceSessionErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTraceSessionError = GetTraceSessionErrors[keyof GetTraceSessionErrors]; + +export type GetTraceSessionResponses = { + /** + * Response + */ + 200: TraceSession; +}; + +export type GetTraceSessionResponse = GetTraceSessionResponses[keyof GetTraceSessionResponses]; + +export type TracerTraceSessionPartialUpdateData = { + body: TraceSession2; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-session/{id}/'; +}; + +export type TracerTraceSessionPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionPartialUpdateError = TracerTraceSessionPartialUpdateErrors[keyof TracerTraceSessionPartialUpdateErrors]; + +export type TracerTraceSessionPartialUpdateResponses = { + /** + * Response + */ + 200: TraceSession; +}; + +export type TracerTraceSessionPartialUpdateResponse = TracerTraceSessionPartialUpdateResponses[keyof TracerTraceSessionPartialUpdateResponses]; + +export type TracerTraceSessionUpdateData = { + body: TraceSession2; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-session/{id}/'; +}; + +export type TracerTraceSessionUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionUpdateError = TracerTraceSessionUpdateErrors[keyof TracerTraceSessionUpdateErrors]; + +export type TracerTraceSessionUpdateResponses = { + /** + * Response + */ + 200: TraceSession; +}; + +export type TracerTraceSessionUpdateResponse = TracerTraceSessionUpdateResponses[keyof TracerTraceSessionUpdateResponses]; + +export type TracerTraceSessionEvalLogsData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace-session/{id}/eval_logs/'; +}; + +export type TracerTraceSessionEvalLogsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceSessionEvalLogsError = TracerTraceSessionEvalLogsErrors[keyof TracerTraceSessionEvalLogsErrors]; + +export type TracerTraceSessionEvalLogsResponses = { + /** + * Response + */ + 200: TraceSession; +}; + +export type TracerTraceSessionEvalLogsResponse = TracerTraceSessionEvalLogsResponses[keyof TracerTraceSessionEvalLogsResponses]; + +export type TracerTraceListData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace/'; +}; + +export type TracerTraceListErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceListError = TracerTraceListErrors[keyof TracerTraceListErrors]; + +export type TracerTraceListResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceListResponse = TracerTraceListResponses[keyof TracerTraceListResponses]; + +export type TracerTraceCreateData = { + body: Trace2; + path?: never; + query?: never; + url: '/tracer/trace/'; +}; + +export type TracerTraceCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceCreateError = TracerTraceCreateErrors[keyof TracerTraceCreateErrors]; + +export type TracerTraceCreateResponses = { + /** + * Response + */ + 201: Trace; +}; + +export type TracerTraceCreateResponse = TracerTraceCreateResponses[keyof TracerTraceCreateResponses]; + +export type TracerTraceAgentGraphData = { + body?: never; + path?: never; + query: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + project_id: string; + filters?: string; + }; + url: '/tracer/trace/agent_graph/'; +}; + +export type TracerTraceAgentGraphErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceAgentGraphError = TracerTraceAgentGraphErrors[keyof TracerTraceAgentGraphErrors]; + +export type TracerTraceAgentGraphResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceAgentGraphResponse = TracerTraceAgentGraphResponses[keyof TracerTraceAgentGraphResponses]; + +export type TracerTraceBulkCreateData = { + body: Trace2; + path?: never; + query?: never; + url: '/tracer/trace/bulk_create/'; +}; + +export type TracerTraceBulkCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceBulkCreateError = TracerTraceBulkCreateErrors[keyof TracerTraceBulkCreateErrors]; + +export type TracerTraceBulkCreateResponses = { + /** + * Response + */ + 201: Trace; +}; + +export type TracerTraceBulkCreateResponse = TracerTraceBulkCreateResponses[keyof TracerTraceBulkCreateResponses]; + +export type TracerTraceCompareTracesData = { + body: Trace2; + path?: never; + query?: never; + url: '/tracer/trace/compare_traces/'; +}; + +export type TracerTraceCompareTracesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceCompareTracesError = TracerTraceCompareTracesErrors[keyof TracerTraceCompareTracesErrors]; + +export type TracerTraceCompareTracesResponses = { + /** + * Response + */ + 201: Trace; +}; + +export type TracerTraceCompareTracesResponse = TracerTraceCompareTracesResponses[keyof TracerTraceCompareTracesResponses]; + +export type TracerTraceGetEvalNamesData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace/get_eval_names/'; +}; + +export type TracerTraceGetEvalNamesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceGetEvalNamesError = TracerTraceGetEvalNamesErrors[keyof TracerTraceGetEvalNamesErrors]; + +export type TracerTraceGetEvalNamesResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceGetEvalNamesResponse = TracerTraceGetEvalNamesResponses[keyof TracerTraceGetEvalNamesResponses]; + +export type GetTraceGraphMethodsData = { + body: ObserveGraphDataRequest2; + path?: never; + query?: never; + url: '/tracer/trace/get_graph_methods/'; +}; + +export type GetTraceGraphMethodsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTraceGraphMethodsError = GetTraceGraphMethodsErrors[keyof GetTraceGraphMethodsErrors]; + +export type GetTraceGraphMethodsResponses = { + /** + * Response + */ + 200: ObserveGraphDataResponse; +}; + +export type GetTraceGraphMethodsResponse = GetTraceGraphMethodsResponses[keyof GetTraceGraphMethodsResponses]; + +export type ListTracePropertiesData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace/get_properties/'; +}; + +export type ListTracePropertiesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListTracePropertiesError = ListTracePropertiesErrors[keyof ListTracePropertiesErrors]; + +export type ListTracePropertiesResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListTracePropertiesResponse = ListTracePropertiesResponses[keyof ListTracePropertiesResponses]; + +export type TracerTraceGetTraceExportDataData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace/get_trace_export_data/'; +}; + +export type TracerTraceGetTraceExportDataErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceGetTraceExportDataError = TracerTraceGetTraceExportDataErrors[keyof TracerTraceGetTraceExportDataErrors]; + +export type TracerTraceGetTraceExportDataResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceGetTraceExportDataResponse = TracerTraceGetTraceExportDataResponses[keyof TracerTraceGetTraceExportDataResponses]; + +export type TracerTraceGetTraceIdByIndexData = { + body?: never; + path?: never; + query: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + trace_id: string; + project_version_id: string; + filters?: string; + }; + url: '/tracer/trace/get_trace_id_by_index/'; +}; + +export type TracerTraceGetTraceIdByIndexErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceGetTraceIdByIndexError = TracerTraceGetTraceIdByIndexErrors[keyof TracerTraceGetTraceIdByIndexErrors]; + +export type TracerTraceGetTraceIdByIndexResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceGetTraceIdByIndexResponse = TracerTraceGetTraceIdByIndexResponses[keyof TracerTraceGetTraceIdByIndexResponses]; + +export type TracerTraceGetTraceIdByIndexObserveData = { + body?: never; + path?: never; + query: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + trace_id: string; + project_id: string; + filters?: string; + }; + url: '/tracer/trace/get_trace_id_by_index_observe/'; +}; + +export type TracerTraceGetTraceIdByIndexObserveErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceGetTraceIdByIndexObserveError = TracerTraceGetTraceIdByIndexObserveErrors[keyof TracerTraceGetTraceIdByIndexObserveErrors]; + +export type TracerTraceGetTraceIdByIndexObserveResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceGetTraceIdByIndexObserveResponse = TracerTraceGetTraceIdByIndexObserveResponses[keyof TracerTraceGetTraceIdByIndexObserveResponses]; + +export type ListTracesData = { + body?: never; + path?: never; + query: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + project_version_id: string; + trace_ids?: string; + filters?: string; + sort_params?: string; + page_number?: number; + page_size?: number; + }; + url: '/tracer/trace/list_traces/'; +}; + +export type ListTracesErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListTracesError = ListTracesErrors[keyof ListTracesErrors]; + +export type ListTracesResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListTracesResponse = ListTracesResponses[keyof ListTracesResponses]; + +export type TracerTraceListTracesOfSessionData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + project_id?: string; + project_version_id?: string; + session_id?: string; + filters?: string; + page_number?: number; + page_size?: number; + interval?: string; + }; + url: '/tracer/trace/list_traces_of_session/'; +}; + +export type TracerTraceListTracesOfSessionErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceListTracesOfSessionError = TracerTraceListTracesOfSessionErrors[keyof TracerTraceListTracesOfSessionErrors]; + +export type TracerTraceListTracesOfSessionResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerTraceListTracesOfSessionResponse = TracerTraceListTracesOfSessionResponses[keyof TracerTraceListTracesOfSessionResponses]; + +export type ListVoiceCallsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace/list_voice_calls/'; +}; + +export type ListVoiceCallsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListVoiceCallsError = ListVoiceCallsErrors[keyof ListVoiceCallsErrors]; + +export type ListVoiceCallsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListVoiceCallsResponse = ListVoiceCallsResponses[keyof ListVoiceCallsResponses]; + +export type GetVoiceCallDetailData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/trace/voice_call_detail/'; +}; + +export type GetVoiceCallDetailErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetVoiceCallDetailError = GetVoiceCallDetailErrors[keyof GetVoiceCallDetailErrors]; + +export type GetVoiceCallDetailResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type GetVoiceCallDetailResponse = GetVoiceCallDetailResponses[keyof GetVoiceCallDetailResponses]; + +export type TracerTraceDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace/{id}/'; +}; + +export type TracerTraceDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceDeleteError = TracerTraceDeleteErrors[keyof TracerTraceDeleteErrors]; + +export type TracerTraceDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type TracerTraceDeleteResponse = TracerTraceDeleteResponses[keyof TracerTraceDeleteResponses]; + +export type GetTraceData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace/{id}/'; +}; + +export type GetTraceErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetTraceError = GetTraceErrors[keyof GetTraceErrors]; + +export type GetTraceResponses = { + /** + * Response + */ + 200: Trace; +}; + +export type GetTraceResponse = GetTraceResponses[keyof GetTraceResponses]; + +export type TracerTracePartialUpdateData = { + body: Trace2; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace/{id}/'; +}; + +export type TracerTracePartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTracePartialUpdateError = TracerTracePartialUpdateErrors[keyof TracerTracePartialUpdateErrors]; + +export type TracerTracePartialUpdateResponses = { + /** + * Response + */ + 200: Trace; +}; + +export type TracerTracePartialUpdateResponse = TracerTracePartialUpdateResponses[keyof TracerTracePartialUpdateResponses]; + +export type TracerTraceUpdateData = { + body: Trace2; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace/{id}/'; +}; + +export type TracerTraceUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerTraceUpdateError = TracerTraceUpdateErrors[keyof TracerTraceUpdateErrors]; + +export type TracerTraceUpdateResponses = { + /** + * Response + */ + 200: Trace; +}; + +export type TracerTraceUpdateResponse = TracerTraceUpdateResponses[keyof TracerTraceUpdateResponses]; + +export type UpdateTraceTagsData = { + body: TraceTagsUpdate; + path: { + id: string; + }; + query?: never; + url: '/tracer/trace/{id}/tags/'; +}; + +export type UpdateTraceTagsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateTraceTagsError = UpdateTraceTagsErrors[keyof UpdateTraceTagsErrors]; + +export type UpdateTraceTagsResponses = { + /** + * Response + */ + 200: TraceTagsUpdate; +}; + +export type UpdateTraceTagsResponse = UpdateTraceTagsResponses[keyof UpdateTraceTagsResponses]; + +export type ListAlertLogsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/user-alert-logs/'; +}; + +export type ListAlertLogsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAlertLogsError = ListAlertLogsErrors[keyof ListAlertLogsErrors]; + +export type ListAlertLogsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListAlertLogsResponse = ListAlertLogsResponses[keyof ListAlertLogsResponses]; + +export type TracerUserAlertLogsCreateData = { + body: UserAlertMonitorLog2; + path?: never; + query?: never; + url: '/tracer/user-alert-logs/'; +}; + +export type TracerUserAlertLogsCreateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUserAlertLogsCreateError = TracerUserAlertLogsCreateErrors[keyof TracerUserAlertLogsCreateErrors]; + +export type TracerUserAlertLogsCreateResponses = { + /** + * Response + */ + 201: UserAlertMonitorLog; +}; + +export type TracerUserAlertLogsCreateResponse = TracerUserAlertLogsCreateResponses[keyof TracerUserAlertLogsCreateResponses]; + +export type ListAllAlertLogsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/user-alert-logs/all/'; +}; + +export type ListAllAlertLogsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAllAlertLogsError = ListAllAlertLogsErrors[keyof ListAllAlertLogsErrors]; + +export type ListAllAlertLogsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListAllAlertLogsResponse = ListAllAlertLogsResponses[keyof ListAllAlertLogsResponses]; + +export type ResolveAlertLogsData = { + body: UserAlertMonitorLog2; + path?: never; + query?: never; + url: '/tracer/user-alert-logs/resolve/'; +}; + +export type ResolveAlertLogsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ResolveAlertLogsError = ResolveAlertLogsErrors[keyof ResolveAlertLogsErrors]; + +export type ResolveAlertLogsResponses = { + /** + * Response + */ + 201: UserAlertMonitorLog; +}; + +export type ResolveAlertLogsResponse = ResolveAlertLogsResponses[keyof ResolveAlertLogsResponses]; + +export type TracerUserAlertLogsDeleteData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alert-logs/{id}/'; +}; + +export type TracerUserAlertLogsDeleteErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUserAlertLogsDeleteError = TracerUserAlertLogsDeleteErrors[keyof TracerUserAlertLogsDeleteErrors]; + +export type TracerUserAlertLogsDeleteResponses = { + /** + * Response + */ + 204: void; +}; + +export type TracerUserAlertLogsDeleteResponse = TracerUserAlertLogsDeleteResponses[keyof TracerUserAlertLogsDeleteResponses]; + +export type GetAlertLogData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alert-logs/{id}/'; +}; + +export type GetAlertLogErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAlertLogError = GetAlertLogErrors[keyof GetAlertLogErrors]; + +export type GetAlertLogResponses = { + /** + * Response + */ + 200: UserAlertMonitorLog; +}; + +export type GetAlertLogResponse = GetAlertLogResponses[keyof GetAlertLogResponses]; + +export type TracerUserAlertLogsPartialUpdateData = { + body: UserAlertMonitorLog2; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alert-logs/{id}/'; +}; + +export type TracerUserAlertLogsPartialUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUserAlertLogsPartialUpdateError = TracerUserAlertLogsPartialUpdateErrors[keyof TracerUserAlertLogsPartialUpdateErrors]; + +export type TracerUserAlertLogsPartialUpdateResponses = { + /** + * Response + */ + 200: UserAlertMonitorLog; +}; + +export type TracerUserAlertLogsPartialUpdateResponse = TracerUserAlertLogsPartialUpdateResponses[keyof TracerUserAlertLogsPartialUpdateResponses]; + +export type TracerUserAlertLogsUpdateData = { + body: UserAlertMonitorLog2; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alert-logs/{id}/'; +}; + +export type TracerUserAlertLogsUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUserAlertLogsUpdateError = TracerUserAlertLogsUpdateErrors[keyof TracerUserAlertLogsUpdateErrors]; + +export type TracerUserAlertLogsUpdateResponses = { + /** + * Response + */ + 200: UserAlertMonitorLog; +}; + +export type TracerUserAlertLogsUpdateResponse = TracerUserAlertLogsUpdateResponses[keyof TracerUserAlertLogsUpdateResponses]; + +export type ListAlertLogsForAlertData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alert-logs/{id}/list/'; +}; + +export type ListAlertLogsForAlertErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAlertLogsForAlertError = ListAlertLogsForAlertErrors[keyof ListAlertLogsForAlertErrors]; + +export type ListAlertLogsForAlertResponses = { + /** + * Response + */ + 200: UserAlertMonitorLog; +}; + +export type ListAlertLogsForAlertResponse = ListAlertLogsForAlertResponses[keyof ListAlertLogsForAlertResponses]; + +export type ListAlertsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/user-alerts/'; +}; + +export type ListAlertsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAlertsError = ListAlertsErrors[keyof ListAlertsErrors]; + +export type ListAlertsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type ListAlertsResponse = ListAlertsResponses[keyof ListAlertsResponses]; + +export type CreateAlertData = { + body: UserAlertMonitor2; + path?: never; + query?: never; + url: '/tracer/user-alerts/'; +}; + +export type CreateAlertErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type CreateAlertError = CreateAlertErrors[keyof CreateAlertErrors]; + +export type CreateAlertResponses = { + /** + * Response + */ + 201: UserAlertMonitor; +}; + +export type CreateAlertResponse = CreateAlertResponses[keyof CreateAlertResponses]; + +export type BulkMuteAlertsData = { + body: UserAlertMonitor2; + path?: never; + query?: never; + url: '/tracer/user-alerts/bulk-mute/'; +}; + +export type BulkMuteAlertsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type BulkMuteAlertsError = BulkMuteAlertsErrors[keyof BulkMuteAlertsErrors]; + +export type BulkMuteAlertsResponses = { + /** + * Response + */ + 201: UserAlertMonitor; +}; + +export type BulkMuteAlertsResponse = BulkMuteAlertsResponses[keyof BulkMuteAlertsResponses]; + +export type TracerUserAlertsDuplicateData = { + body: UserAlertMonitorDuplicate; + path?: never; + query?: never; + url: '/tracer/user-alerts/duplicate/'; +}; + +export type TracerUserAlertsDuplicateErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUserAlertsDuplicateError = TracerUserAlertsDuplicateErrors[keyof TracerUserAlertsDuplicateErrors]; + +export type TracerUserAlertsDuplicateResponses = { + /** + * Response + */ + 200: UserAlertMonitorDuplicateResponse; +}; + +export type TracerUserAlertsDuplicateResponse = TracerUserAlertsDuplicateResponses[keyof TracerUserAlertsDuplicateResponses]; + +export type TracerUserAlertsListMonitorsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/user-alerts/list_monitors/'; +}; + +export type TracerUserAlertsListMonitorsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUserAlertsListMonitorsError = TracerUserAlertsListMonitorsErrors[keyof TracerUserAlertsListMonitorsErrors]; + +export type TracerUserAlertsListMonitorsResponses = { + /** + * Response + */ + 200: { + count: number; + next?: string | null; + previous?: string | null; + results: Array; + }; +}; + +export type TracerUserAlertsListMonitorsResponse = TracerUserAlertsListMonitorsResponses[keyof TracerUserAlertsListMonitorsResponses]; + +export type ListAlertMetricOptionsData = { + body?: never; + path?: never; + query?: { + /** + * A page number within the paginated result set. + */ + page?: number; + /** + * Number of results to return per page. + */ + limit?: number; + }; + url: '/tracer/user-alerts/metric-options/'; +}; + +export type ListAlertMetricOptionsErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 404: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListAlertMetricOptionsError = ListAlertMetricOptionsErrors[keyof ListAlertMetricOptionsErrors]; + +export type ListAlertMetricOptionsResponses = { + /** + * Response + */ + 200: UserAlertMonitorMetricOptionsResponse; +}; + +export type ListAlertMetricOptionsResponse = ListAlertMetricOptionsResponses[keyof ListAlertMetricOptionsResponses]; + +export type PreviewAlertGraphData = { + body: UserAlertMonitor2; + path?: never; + query?: never; + url: '/tracer/user-alerts/preview-graph/'; +}; + +export type PreviewAlertGraphErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type PreviewAlertGraphError = PreviewAlertGraphErrors[keyof PreviewAlertGraphErrors]; + +export type PreviewAlertGraphResponses = { + /** + * Response + */ + 201: UserAlertMonitor; +}; + +export type PreviewAlertGraphResponse = PreviewAlertGraphResponses[keyof PreviewAlertGraphResponses]; + +export type DeleteAlertData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alerts/{id}/'; +}; + +export type DeleteAlertErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type DeleteAlertError = DeleteAlertErrors[keyof DeleteAlertErrors]; + +export type DeleteAlertResponses = { + /** + * Response + */ + 204: void; +}; + +export type DeleteAlertResponse = DeleteAlertResponses[keyof DeleteAlertResponses]; + +export type GetAlertData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alerts/{id}/'; +}; + +export type GetAlertErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAlertError = GetAlertErrors[keyof GetAlertErrors]; + +export type GetAlertResponses = { + /** + * Response + */ + 200: UserAlertMonitor; +}; + +export type GetAlertResponse = GetAlertResponses[keyof GetAlertResponses]; + +export type UpdateAlertData = { + body: UserAlertMonitor2; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alerts/{id}/'; +}; + +export type UpdateAlertErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type UpdateAlertError = UpdateAlertErrors[keyof UpdateAlertErrors]; + +export type UpdateAlertResponses = { + /** + * Response + */ + 200: UserAlertMonitor; +}; + +export type UpdateAlertResponse = UpdateAlertResponses[keyof UpdateAlertResponses]; + +export type TracerUserAlertsUpdateData = { + body: UserAlertMonitor2; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alerts/{id}/'; +}; + +export type TracerUserAlertsUpdateErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUserAlertsUpdateError = TracerUserAlertsUpdateErrors[keyof TracerUserAlertsUpdateErrors]; + +export type TracerUserAlertsUpdateResponses = { + /** + * Response + */ + 200: UserAlertMonitor; +}; + +export type TracerUserAlertsUpdateResponse = TracerUserAlertsUpdateResponses[keyof TracerUserAlertsUpdateResponses]; + +export type GetAlertDetailsData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alerts/{id}/details/'; +}; + +export type GetAlertDetailsErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAlertDetailsError = GetAlertDetailsErrors[keyof GetAlertDetailsErrors]; + +export type GetAlertDetailsResponses = { + /** + * Response + */ + 200: UserAlertMonitor; +}; + +export type GetAlertDetailsResponse = GetAlertDetailsResponses[keyof GetAlertDetailsResponses]; + +export type GetAlertGraphData = { + body?: never; + path: { + id: string; + }; + query?: never; + url: '/tracer/user-alerts/{id}/graph/'; +}; + +export type GetAlertGraphErrors = { + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type GetAlertGraphError = GetAlertGraphErrors[keyof GetAlertGraphErrors]; + +export type GetAlertGraphResponses = { + /** + * Response + */ + 200: UserAlertMonitor; +}; + +export type GetAlertGraphResponse = GetAlertGraphResponses[keyof GetAlertGraphResponses]; + +export type ListTraceUsersData = { + body?: never; + path?: never; + query?: { + project_id?: string; + search?: string; + page_size?: number; + current_page_index?: number; + sort_params?: string; + filters?: string; + }; + url: '/tracer/users/'; +}; + +export type ListTraceUsersErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type ListTraceUsersError = ListTraceUsersErrors[keyof ListTraceUsersErrors]; + +export type ListTraceUsersResponses = { + /** + * Response + */ + 200: UsersResponse; +}; + +export type ListTraceUsersResponse = ListTraceUsersResponses[keyof ListTraceUsersResponses]; + +export type TracerUsersGetCodeExampleListData = { + body?: never; + path?: never; + query?: never; + url: '/tracer/users/get_code_example/'; +}; + +export type TracerUsersGetCodeExampleListErrors = { + /** + * Response + */ + 400: ApiErrorResponse; + /** + * Response + */ + 500: ApiErrorResponse; + /** + * Default error response + */ + default: ManagementApiErrorResponse; +}; + +export type TracerUsersGetCodeExampleListError = TracerUsersGetCodeExampleListErrors[keyof TracerUsersGetCodeExampleListErrors]; + +export type TracerUsersGetCodeExampleListResponses = { + /** + * Response + */ + 200: UserCodeExampleResponse; +}; + +export type TracerUsersGetCodeExampleListResponse = TracerUsersGetCodeExampleListResponses[keyof TracerUsersGetCodeExampleListResponses]; diff --git a/typescript/futureagi/src/index.ts b/typescript/futureagi/src/index.ts index 70ad681..c898c7a 100644 --- a/typescript/futureagi/src/index.ts +++ b/typescript/futureagi/src/index.ts @@ -5,3 +5,4 @@ export * from './prompt'; export * from './annotations'; export * from './queues'; export * from './utils'; +export * from './futureagi-client'; From 81ca342d84df429f9e508749145ddbe7c1fa8784 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Thu, 4 Jun 2026 02:28:49 +0530 Subject: [PATCH 11/15] Add eval and simulation SDK compliance coverage --- openapi/sdk/wrapper-map.json | 42 +- python/fi/futureagi_client.py | 259 ++++++- python/tests/test_futureagi_client.py | 48 ++ python/tests/test_live_smoke.py | 69 +- tests/compliance/python/adapter.py | 397 +++++++++- .../src/__tests__/futureagi-client.test.ts | 63 ++ typescript/futureagi/src/futureagi-client.ts | 383 +++++++++- .../futureagi/tests/compliance/adapter.ts | 678 ++++++++++++++---- typescript/futureagi/tests/live/smoke.ts | 134 +++- 9 files changed, 1863 insertions(+), 210 deletions(-) diff --git a/openapi/sdk/wrapper-map.json b/openapi/sdk/wrapper-map.json index e9746f0..529b4c3 100644 --- a/openapi/sdk/wrapper-map.json +++ b/openapi/sdk/wrapper-map.json @@ -61,6 +61,36 @@ "derivedVariables": "listDatasetDerivedVariables", "baseColumns": "listDatasetBaseColumns" }, + "evals": { + "listTemplates": "model-hub_eval-templates_list_create", + "createTemplate": "model-hub_eval-templates_create-v2_create", + "getTemplate": "model-hub_eval-templates_detail_list", + "updateTemplate": "model-hub_eval-templates_update_update", + "deleteTemplate": "model-hub_delete-eval-template_create", + "bulkDeleteTemplates": "model-hub_eval-templates_bulk-delete_create", + "templateUsage": "model-hub_eval-templates_usage_list", + "templateVersions": "model-hub_eval-templates_versions_list", + "createTemplateVersion": "model-hub_eval-templates_versions_create_create", + "restoreTemplateVersion": "model-hub_eval-templates_versions_restore_create", + "setDefaultTemplateVersion": "model-hub_eval-templates_versions_set-default_update", + "listSdkEvals": "sdk_api_v1_get-evals_list", + "configure": "sdk_api_v1_configure-evaluations_create", + "run": "sdk_api_v1_eval_create", + "getRun": "sdk_api_v1_eval_read", + "runV2": "sdk_api_v1_new-eval_create", + "getRunV2": "sdk_api_v1_new-eval_list", + "listPipelines": "sdk_api_v1_evaluate-pipeline_list", + "evaluatePipeline": "sdk_api_v1_evaluate-pipeline_create", + "datasetEvals": "model-hub_develops_get_evals_list_list", + "datasetEvalStructure": "model-hub_develops_get_eval_structure_read", + "previewDatasetEval": "model-hub_develops_preview_run_eval_create", + "startDatasetEvals": "model-hub_develops_start_evals_process_create", + "addDatasetUserEval": "model-hub_develops_add_user_eval_create", + "editAndRunDatasetUserEval": "model-hub_develops_edit_and_run_user_eval_create", + "stopDatasetUserEval": "model-hub_develops_stop_user_eval_create", + "deleteDatasetUserEval": "model-hub_develops_delete_user_eval_delete", + "deleteDatasetTemplateEval": "model-hub_develops_delete_template_eval_delete" + }, "experiments": { "list": "listExperiments", "create": "createExperiment", @@ -90,6 +120,7 @@ "delete": "deleteAgentDefinition" }, "simulationRunTests": { + "active": "simulate_run-tests_active_list", "list": "listRunTests", "create": "createRunTest", "get": "getRunTest", @@ -99,7 +130,16 @@ "status": "getRunTestStatus", "analytics": "getRunTestAnalytics", "executions": "listRunTestExecutions", - "callExecutions": "listRunTestCallExecutions" + "callExecutions": "listRunTestCallExecutions", + "addEvalConfigs": "simulate_run-tests_eval-configs_create", + "deleteEvalConfig": "simulate_run-tests_eval-configs_delete", + "evalConfigStructure": "simulate_run-tests_eval-configs_get-structure_list", + "updateEvalConfig": "simulate_run-tests_eval-configs_update_create", + "evalSummary": "simulate_run-tests_eval-summary_list", + "evalSummaryComparison": "simulate_run-tests_eval-summary-comparison_list", + "runNewEvals": "simulate_run-tests_run-new-evals_create", + "scenarios": "simulate_run-tests_scenarios_list", + "sdkCode": "simulate_run-tests_sdk-code_list" }, "simulationTestExecutions": { "list": "listTestExecutions", diff --git a/python/fi/futureagi_client.py b/python/fi/futureagi_client.py index 33ba70b..946b38f 100644 --- a/python/fi/futureagi_client.py +++ b/python/fi/futureagi_client.py @@ -164,6 +164,7 @@ def __init__( ) self.annotation_queues = AnnotationQueuesClient(self.generated_client) self.datasets = DatasetsClient(self.generated_client) + self.evals = EvalsClient(self.generated_client) self.experiments = ExperimentsClient(self.generated_client) self.simulations = SimulationsClient(self.generated_client) self.tracing = TracingClient(self.generated_client) @@ -520,7 +521,9 @@ def submit( class DatasetsClient(BaseGeneratedClient): def list(self, **query: Any) -> Any: - return self._raw_request("GET", "/model-hub/develops/get-datasets/", query=query) + return self._raw_request( + "GET", "/model-hub/develops/get-datasets/", query=query + ) def list_names(self, **query: Any) -> Any: return self._raw_request( @@ -723,6 +726,174 @@ def json_schema(self, experiment_id: str | UUID) -> Any: ) +class EvalsClient(BaseGeneratedClient): + def list_templates(self, body: Any) -> Any: + return self._raw_request("POST", "/model-hub/eval-templates/list/", body=body) + + def create_template(self, body: Any) -> Any: + return self._raw_request( + "POST", "/model-hub/eval-templates/create-v2/", body=body + ) + + def get_template(self, template_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/eval-templates/{_quote(template_id)}/detail/" + ) + + def update_template(self, template_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "PUT", + f"/model-hub/eval-templates/{_quote(template_id)}/update/", + body=body, + ) + + def delete_template(self, body: Any) -> Any: + return self._raw_request("POST", "/model-hub/delete-eval-template/", body=body) + + def bulk_delete_templates(self, body: Any) -> Any: + return self._raw_request( + "POST", "/model-hub/eval-templates/bulk-delete/", body=body + ) + + def template_usage(self, template_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/eval-templates/{_quote(template_id)}/usage/" + ) + + def template_versions(self, template_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/eval-templates/{_quote(template_id)}/versions/" + ) + + def create_template_version(self, template_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/eval-templates/{_quote(template_id)}/versions/create/", + body=body, + ) + + def restore_template_version( + self, + template_id: str | UUID, + version_id: str | UUID, + body: Any | None = None, + ) -> Any: + return self._raw_request( + "POST", + f"/model-hub/eval-templates/{_quote(template_id)}/versions/{_quote(version_id)}/restore/", + body=body or {}, + ) + + def set_default_template_version( + self, + template_id: str | UUID, + version_id: str | UUID, + body: Any | None = None, + ) -> Any: + return self._raw_request( + "PUT", + f"/model-hub/eval-templates/{_quote(template_id)}/versions/{_quote(version_id)}/set-default/", + body=body or {}, + ) + + def list_sdk_evals(self) -> Any: + return self._raw_request("GET", "/sdk/api/v1/get-evals/") + + def configure(self, body: Any) -> Any: + return self._raw_request( + "POST", "/sdk/api/v1/configure-evaluations/", body=body + ) + + def run(self, body: Any) -> Any: + return self._raw_request("POST", "/sdk/api/v1/eval/", body=body) + + def get_run(self, eval_id: str | UUID) -> Any: + return self._raw_request("GET", f"/sdk/api/v1/eval/{_quote(eval_id)}/") + + def run_v2(self, body: Any) -> Any: + return self._raw_request("POST", "/sdk/api/v1/new-eval/", body=body) + + def get_run_v2(self, eval_id: str | UUID) -> Any: + return self._raw_request( + "GET", "/sdk/api/v1/new-eval/", query={"eval_id": eval_id} + ) + + def list_pipelines(self, **query: Any) -> Any: + return self._raw_request("GET", "/sdk/api/v1/evaluate-pipeline/", query=query) + + def evaluate_pipeline(self, body: Any) -> Any: + return self._raw_request("POST", "/sdk/api/v1/evaluate-pipeline/", body=body) + + def dataset_evals(self, dataset_id: str | UUID) -> Any: + return self._raw_request( + "GET", f"/model-hub/develops/{_quote(dataset_id)}/get_evals_list/" + ) + + def dataset_eval_structure( + self, dataset_id: str | UUID, eval_id: str | UUID, **query: Any + ) -> Any: + return self._raw_request( + "GET", + f"/model-hub/develops/{_quote(dataset_id)}/get_eval_structure/{_quote(eval_id)}/", + query=query, + ) + + def preview_dataset_eval(self, dataset_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/preview_run_eval/", + body=body, + ) + + def start_dataset_evals(self, dataset_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/start_evals_process/", + body=body, + ) + + def add_dataset_user_eval(self, dataset_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/add_user_eval/", + body=body, + ) + + def edit_and_run_dataset_user_eval( + self, dataset_id: str | UUID, eval_id: str | UUID, body: Any + ) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/edit_and_run_user_eval/{_quote(eval_id)}/", + body=body, + ) + + def stop_dataset_user_eval( + self, dataset_id: str | UUID, eval_id: str | UUID, body: Any | None = None + ) -> Any: + return self._raw_request( + "POST", + f"/model-hub/develops/{_quote(dataset_id)}/stop_user_eval/{_quote(eval_id)}/", + body=body or {}, + ) + + def delete_dataset_user_eval( + self, dataset_id: str | UUID, eval_id: str | UUID + ) -> Any: + return self._raw_request( + "DELETE", + f"/model-hub/develops/{_quote(dataset_id)}/delete_user_eval/{_quote(eval_id)}/", + ) + + def delete_dataset_template_eval( + self, dataset_id: str | UUID, eval_id: str | UUID + ) -> Any: + return self._raw_request( + "DELETE", + f"/model-hub/develops/{_quote(dataset_id)}/delete_template_eval/{_quote(eval_id)}/", + ) + + class SimulationsClient(BaseGeneratedClient): def __init__(self, client: GeneratedOpenAPIClient) -> None: super().__init__(client) @@ -770,6 +941,9 @@ def delete(self, agent_id: str | UUID) -> Any: class SimulationRunTestsClient(BaseGeneratedClient): + def active(self) -> Any: + return self._raw_request("GET", "/simulate/run-tests/active/") + def list(self, **query: Any) -> Any: return self._raw_request("GET", "/simulate/run-tests/", query=query) @@ -820,6 +994,73 @@ def call_executions(self, run_test_id: str | UUID, **query: Any) -> Any: query=query, ) + def add_eval_configs(self, run_test_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/simulate/run-tests/{_quote(run_test_id)}/eval-configs/", + body=body, + ) + + def delete_eval_config( + self, run_test_id: str | UUID, eval_config_id: str | UUID + ) -> Any: + return self._raw_request( + "DELETE", + f"/simulate/run-tests/{_quote(run_test_id)}/eval-configs/{_quote(eval_config_id)}/", + ) + + def eval_config_structure( + self, run_test_id: str | UUID, eval_config_id: str | UUID + ) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/eval-configs/{_quote(eval_config_id)}/get-structure/", + ) + + def update_eval_config( + self, run_test_id: str | UUID, eval_config_id: str | UUID, body: Any + ) -> Any: + return self._raw_request( + "POST", + f"/simulate/run-tests/{_quote(run_test_id)}/eval-configs/{_quote(eval_config_id)}/update/", + body=body, + ) + + def eval_summary(self, run_test_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/eval-summary/", + query=query, + ) + + def eval_summary_comparison(self, run_test_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/eval-summary-comparison/", + query=query, + ) + + def run_new_evals(self, run_test_id: str | UUID, body: Any) -> Any: + return self._raw_request( + "POST", + f"/simulate/run-tests/{_quote(run_test_id)}/run-new-evals/", + body=body, + ) + + def scenarios(self, run_test_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/scenarios/", + query=query, + ) + + def sdk_code(self, run_test_id: str | UUID, **query: Any) -> Any: + return self._raw_request( + "GET", + f"/simulate/run-tests/{_quote(run_test_id)}/sdk-code/", + query=query, + ) + class SimulationTestExecutionsClient(BaseGeneratedClient): def list(self, **query: Any) -> Any: @@ -936,13 +1177,13 @@ def graph_methods(self, body: Any) -> Any: return self._raw_request("POST", "/tracer/trace/get_graph_methods/", body=body) def sessions(self, **query: Any) -> Any: - return self._raw_request("GET", "/tracer/trace-session/list_sessions/", query=query) - - def get_session(self, session_id: str | UUID) -> Any: return self._raw_request( - "GET", f"/tracer/trace-session/{_quote(session_id)}/" + "GET", "/tracer/trace-session/list_sessions/", query=query ) + def get_session(self, session_id: str | UUID) -> Any: + return self._raw_request("GET", f"/tracer/trace-session/{_quote(session_id)}/") + def session_graph(self, body: Any) -> Any: return self._raw_request( "POST", "/tracer/trace-session/get_session_graph_data/", body=body @@ -1005,10 +1246,14 @@ def delete(self, alert_id: str | UUID) -> Any: return self._raw_request("DELETE", f"/tracer/user-alerts/{_quote(alert_id)}/") def metric_options(self, **query: Any) -> Any: - return self._raw_request("GET", "/tracer/user-alerts/metric-options/", query=query) + return self._raw_request( + "GET", "/tracer/user-alerts/metric-options/", query=query + ) def preview_graph(self, body: Any) -> Any: - return self._raw_request("POST", "/tracer/user-alerts/preview-graph/", body=body) + return self._raw_request( + "POST", "/tracer/user-alerts/preview-graph/", body=body + ) def graph(self, alert_id: str | UUID, **query: Any) -> Any: return self._raw_request( diff --git a/python/tests/test_futureagi_client.py b/python/tests/test_futureagi_client.py index d4abf29..5f028e2 100644 --- a/python/tests/test_futureagi_client.py +++ b/python/tests/test_futureagi_client.py @@ -108,3 +108,51 @@ def handler(request): assert len(requests) == 6 assert expected == [] + + +def test_futureagi_client_wraps_eval_and_simulation_eval_paths(): + requests = [] + expected = [ + ("POST", "/model-hub/eval-templates/list/"), + ("POST", "/model-hub/eval-templates/create-v2/"), + ("GET", "/model-hub/eval-templates/eval-template-1/detail/"), + ("PUT", "/model-hub/eval-templates/eval-template-1/update/"), + ("GET", "/model-hub/eval-templates/eval-template-1/versions/"), + ("POST", "/sdk/api/v1/new-eval/"), + ("GET", "/sdk/api/v1/new-eval/"), + ("POST", "/simulate/run-tests/run-test-1/eval-configs/"), + ( + "GET", + "/simulate/run-tests/run-test-1/eval-configs/eval-config-1/get-structure/", + ), + ("GET", "/simulate/run-tests/run-test-1/eval-summary/"), + ("POST", "/simulate/run-tests/run-test-1/run-new-evals/"), + ] + + def handler(request): + requests.append(request) + method, path = expected.pop(0) + assert request.method == method + assert request.url.path == path + return httpx.Response(200, json={"ok": True}) + + client = _client_with_transport(handler) + + client.evals.list_templates({"filters": {}}) + client.evals.create_template({"name": "Faithfulness"}) + client.evals.get_template("eval-template-1") + client.evals.update_template("eval-template-1", {"name": "Faithfulness v2"}) + client.evals.template_versions("eval-template-1") + client.evals.run_v2({"eval_id": "run-1", "data": []}) + client.evals.get_run_v2("11111111-1111-1111-1111-111111111111") + client.simulations.run_tests.add_eval_configs( + "run-test-1", {"eval_configs": [{"eval_id": "eval-template-1"}]} + ) + client.simulations.run_tests.eval_config_structure("run-test-1", "eval-config-1") + client.simulations.run_tests.eval_summary("run-test-1", test_execution_id="te-1") + client.simulations.run_tests.run_new_evals( + "run-test-1", {"test_execution_ids": ["te-1"], "eval_config_ids": ["cfg-1"]} + ) + + assert len(requests) == 11 + assert expected == [] diff --git a/python/tests/test_live_smoke.py b/python/tests/test_live_smoke.py index 7909186..34c421c 100644 --- a/python/tests/test_live_smoke.py +++ b/python/tests/test_live_smoke.py @@ -9,6 +9,7 @@ from fi.api.types import HttpMethod, RequestConfig from fi.datasets import Dataset, DatasetConfig from fi.datasets.types import DataTypeChoices +from fi.futureagi_client import FutureAGIClient from fi.kb import KnowledgeBase from fi.queues import AnnotationQueue from fi.utils.types import ModelTypes @@ -19,7 +20,9 @@ def _live_options(): secret_key = os.environ.get("FI_SECRET_KEY") base_url = os.environ.get("FI_BASE_URL") if not api_key or not secret_key or not base_url: - pytest.skip("FI_API_KEY, FI_SECRET_KEY, and FI_BASE_URL are required for live SDK smoke tests") + pytest.skip( + "FI_API_KEY, FI_SECRET_KEY, and FI_BASE_URL are required for live SDK smoke tests" + ) return { "fi_api_key": api_key, "fi_secret_key": secret_key, @@ -41,6 +44,29 @@ def _first_dataset_name(client: APIKeyAuth, base_url: str) -> str | None: return datasets[0]["name"] if datasets else None +def _items_count(payload: object, *keys: str) -> int: + if isinstance(payload, list): + return len(payload) + if not isinstance(payload, dict): + return 0 + + candidates: list[object] = [payload] + result = payload.get("result") + if isinstance(result, dict): + candidates.append(result) + + for candidate in candidates: + if not isinstance(candidate, dict): + continue + for key in keys: + value = candidate.get(key) + if isinstance(value, list): + return len(value) + if isinstance(value, dict): + return len(value) + return 0 + + def test_live_read_surfaces_against_real_backend(): opts = _live_options() base_url = opts["fi_base_url"] @@ -59,7 +85,9 @@ def test_live_read_surfaces_against_real_backend(): assert isinstance(queue.list_labels(), list) assert isinstance(queue.list_queues(), list) - dataset_name = os.environ.get("FI_LIVE_DATASET_NAME") or _first_dataset_name(raw, base_url) + dataset_name = os.environ.get("FI_LIVE_DATASET_NAME") or _first_dataset_name( + raw, base_url + ) if dataset_name: dataset = Dataset.get_dataset_config(dataset_name, **opts) config = dataset.get_config() @@ -67,6 +95,39 @@ def test_live_read_surfaces_against_real_backend(): assert config.name == dataset_name +def test_live_futureagi_client_read_surfaces_against_real_backend(): + opts = _live_options() + + with FutureAGIClient( + api_key=opts["fi_api_key"], + secret_key=opts["fi_secret_key"], + base_url=opts["fi_base_url"], + timeout=opts["timeout"], + ) as client: + current_user = client.users.current() + workspaces = client.users.workspaces(limit=5) + datasets = client.datasets.list_names( + search_text=os.environ.get("FI_LIVE_DATASET_NAME", "sdk-live-dataset") + ) + sdk_evals = client.evals.list_sdk_evals() + simulation_run_tests = client.simulations.run_tests.list(limit=5) + active_run_tests = client.simulations.run_tests.active() + trace_projects = client.tracing.projects(limit=5) + trace_labels = client.tracing.annotation_labels() + + assert isinstance(current_user, dict) + assert isinstance(workspaces, dict | list) + assert isinstance(datasets, dict | list) + assert isinstance(sdk_evals, dict | list) + assert isinstance(simulation_run_tests, dict | list) + assert isinstance(active_run_tests, dict | list) + assert isinstance(trace_projects, dict | list) + assert isinstance(trace_labels, dict | list) + assert _items_count(workspaces, "workspaces", "data", "items") >= 0 + assert _items_count(datasets, "datasets", "data", "items") >= 0 + assert _items_count(trace_projects, "projects", "data", "items") >= 0 + + def test_live_knowledge_base_write_flow_against_real_backend(): if os.environ.get("FI_LIVE_KB_WRITE") != "1": pytest.skip("Set FI_LIVE_KB_WRITE=1 to run the mutating KB live smoke test") @@ -91,7 +152,9 @@ def test_live_knowledge_base_write_flow_against_real_backend(): def test_live_dataset_write_flow_against_real_backend(): if os.environ.get("FI_LIVE_DATASET_WRITE") != "1": - pytest.skip("Set FI_LIVE_DATASET_WRITE=1 to run the mutating dataset live smoke test") + pytest.skip( + "Set FI_LIVE_DATASET_WRITE=1 to run the mutating dataset live smoke test" + ) opts = _live_options() dataset = Dataset( diff --git a/tests/compliance/python/adapter.py b/tests/compliance/python/adapter.py index ebcabb5..931f67b 100644 --- a/tests/compliance/python/adapter.py +++ b/tests/compliance/python/adapter.py @@ -10,6 +10,7 @@ import pandas as pd +from fi import FutureAGIClient from fi.annotations import Annotation from fi.api.auth import APIKeyAuth from fi.api.apikeys import ProviderAPIKeyClient @@ -63,6 +64,10 @@ def do_GET(self) -> None: # noqa: N802 "knowledge_base_lifecycle", "prompt_lifecycle", "provider_api_key_lifecycle", + "futureagi_client_basic", + "evals_lifecycle", + "simulation_lifecycle", + "tracing_lifecycle", ], } ) @@ -106,6 +111,22 @@ def do_POST(self) -> None: # noqa: N802 self._handle_raw_request(payload) return + if parsed.path == "/futureagi/basic": + self._handle_futureagi_basic(payload) + return + + if parsed.path == "/evals/lifecycle": + self._handle_evals_lifecycle(payload) + return + + if parsed.path == "/simulation/lifecycle": + self._handle_simulation_lifecycle(payload) + return + + if parsed.path == "/tracing/lifecycle": + self._handle_tracing_lifecycle(payload) + return + if parsed.path == "/annotation/log": self._handle_annotation_log(payload) return @@ -172,11 +193,274 @@ def _handle_raw_request(self, payload: dict[str, Any]) -> None: timeout=payload.get("timeout") or STATE.timeout, ) ) - STATE.calls.append({"operation": "raw-request", "path": path, "method": method.value}) + STATE.calls.append( + {"operation": "raw-request", "path": path, "method": method.value} + ) self._write_json(_response_payload(response)) except Exception as exc: self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_futureagi_basic(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + with _futureagi_client() as client: + current_user = client.users.current() + workspaces = client.users.workspaces(limit=payload.get("limit") or 5) + datasets = client.datasets.list(limit=payload.get("limit") or 5) + simulation_run_tests = client.simulations.run_tests.list( + limit=payload.get("limit") or 5 + ) + trace_projects = client.tracing.projects( + limit=payload.get("limit") or 5 + ) + STATE.calls.append({"operation": "futureagi/basic"}) + self._write_json( + { + "success": True, + "result": { + "current_user": _jsonable(current_user), + "workspaces": _jsonable(workspaces), + "datasets": _jsonable(datasets), + "simulation_run_tests": _jsonable(simulation_run_tests), + "trace_projects": _jsonable(trace_projects), + }, + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_evals_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + template_payload = payload.get("template") or {} + template_id = _required(payload, "template_id") + version_id = _required(payload, "version_id") + dataset_id = _required(payload, "dataset_id") + eval_id = _required(payload, "eval_id") + sdk_eval_id = _required(payload, "sdk_eval_id") + with _futureagi_client() as client: + listed = client.evals.list_templates(payload.get("list_body") or {}) + created = client.evals.create_template(template_payload) + fetched = client.evals.get_template(template_id) + updated = client.evals.update_template( + template_id, payload.get("template_update") or template_payload + ) + usage = client.evals.template_usage(template_id) + versions = client.evals.template_versions(template_id) + created_version = client.evals.create_template_version( + template_id, payload.get("version") or {} + ) + restored = client.evals.restore_template_version( + template_id, version_id + ) + defaulted = client.evals.set_default_template_version( + template_id, version_id + ) + sdk_evals = client.evals.list_sdk_evals() + configured = client.evals.configure(payload.get("configure") or {}) + sdk_run = client.evals.run_v2(payload.get("run") or {}) + sdk_result = client.evals.get_run_v2(sdk_eval_id) + dataset_evals = client.evals.dataset_evals(dataset_id) + structure = client.evals.dataset_eval_structure( + dataset_id, + eval_id, + **(payload.get("eval_structure_query") or {"eval_type": "preset"}), + ) + preview = client.evals.preview_dataset_eval( + dataset_id, payload.get("preview") or {} + ) + started = client.evals.start_dataset_evals( + dataset_id, payload.get("start") or {} + ) + delete_result = client.evals.delete_template( + payload.get("delete") or {"eval_id": template_id} + ) + STATE.calls.append( + {"operation": "evals/lifecycle", "template_id": template_id} + ) + self._write_json( + { + "success": True, + "result": _jsonable( + { + "listed": listed, + "created": created, + "fetched": fetched, + "updated": updated, + "usage": usage, + "versions": versions, + "created_version": created_version, + "restored": restored, + "defaulted": defaulted, + "sdk_evals": sdk_evals, + "configured": configured, + "sdk_run": sdk_run, + "sdk_result": sdk_result, + "dataset_evals": dataset_evals, + "structure": structure, + "preview": preview, + "started": started, + "delete": delete_result, + } + ), + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_simulation_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + agent_id = _required(payload, "agent_id") + persona_id = _required(payload, "persona_id") + scenario_id = _required(payload, "scenario_id") + run_test_id = _required(payload, "run_test_id") + eval_config_id = _required(payload, "eval_config_id") + test_execution_id = _required(payload, "test_execution_id") + run_test_name = (payload.get("run_test") or {}).get( + "name" + ) or "SDK run test" + with _futureagi_client() as client: + persona = client.simulations.personas.create( + payload.get("persona") or {} + ) + scenario = client.simulations.scenarios.create( + payload.get("scenario") or {} + ) + agent = client.simulations.agent_definitions.create( + payload.get("agent") or {} + ) + run_test = client.simulations.run_tests.create( + payload.get("run_test") or {} + ) + runs = client.simulations.runs(limit=5, run_test_name=run_test_name) + metrics = client.simulations.metrics( + limit=5, run_test_name=run_test_name + ) + analytics = client.simulations.analytics(run_test_name=run_test_name) + fetched_run_test = client.simulations.run_tests.get(run_test_id) + eval_configs = client.simulations.run_tests.add_eval_configs( + run_test_id, payload.get("eval_configs") or {} + ) + eval_structure = client.simulations.run_tests.eval_config_structure( + run_test_id, eval_config_id + ) + eval_summary = client.simulations.run_tests.eval_summary( + run_test_id, test_execution_id=test_execution_id + ) + new_evals = client.simulations.run_tests.run_new_evals( + run_test_id, payload.get("run_new_evals") or {} + ) + executed = client.simulations.run_tests.execute( + run_test_id, payload.get("execute") or {} + ) + status = client.simulations.run_tests.status(run_test_id) + executions = client.simulations.run_tests.executions(run_test_id) + test_execution = client.simulations.test_executions.get( + test_execution_id + ) + canceled = client.simulations.test_executions.cancel( + test_execution_id, payload.get("cancel") or {} + ) + deleted_run_test = client.simulations.run_tests.delete(run_test_id) + deleted_agent = client.simulations.agent_definitions.delete(agent_id) + deleted_scenario = client.simulations.scenarios.delete(scenario_id) + deleted_persona = client.simulations.personas.delete(persona_id) + STATE.calls.append( + {"operation": "simulation/lifecycle", "run_test_id": run_test_id} + ) + self._write_json( + { + "success": True, + "result": _jsonable( + { + "runs": runs, + "metrics": metrics, + "analytics": analytics, + "persona": persona, + "scenario": scenario, + "agent": agent, + "run_test": run_test, + "fetched_run_test": fetched_run_test, + "eval_configs": eval_configs, + "eval_structure": eval_structure, + "eval_summary": eval_summary, + "new_evals": new_evals, + "executed": executed, + "status": status, + "executions": executions, + "test_execution": test_execution, + "canceled": canceled, + "deleted_run_test": deleted_run_test, + "deleted_agent": deleted_agent, + "deleted_scenario": deleted_scenario, + "deleted_persona": deleted_persona, + } + ), + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + + def _handle_tracing_lifecycle(self, payload: dict[str, Any]) -> None: + try: + _ensure_initialized() + project_id = _required(payload, "project_id") + trace_id = _required(payload, "trace_id") + session_id = _required(payload, "session_id") + cluster_id = _required(payload, "cluster_id") + with _futureagi_client() as client: + projects = client.tracing.projects(limit=5) + traces = client.tracing.traces(project_id=project_id, limit=5) + trace = client.tracing.get_trace(trace_id) + properties = client.tracing.properties(project_id=project_id) + updated_tags = client.tracing.update_tags( + trace_id, payload.get("tags") or {} + ) + graph_methods = client.tracing.graph_methods( + payload.get("graph_methods") or {} + ) + sessions = client.tracing.sessions(project_id=project_id, limit=5) + session = client.tracing.get_session(session_id) + session_graph = client.tracing.session_graph( + payload.get("session_graph") or {} + ) + users = client.tracing.users(project_id=project_id, limit=5) + labels = client.tracing.annotation_labels(project_id=project_id) + bulk_annotation = client.tracing.bulk_annotation( + payload.get("bulk_annotation") or {} + ) + issues = client.tracing.issues(project_id=project_id, limit=5) + issue = client.tracing.issue(cluster_id) + issue_stats = client.tracing.issue_stats(project_id=project_id) + STATE.calls.append({"operation": "tracing/lifecycle", "trace_id": trace_id}) + self._write_json( + { + "success": True, + "result": _jsonable( + { + "projects": projects, + "traces": traces, + "trace": trace, + "properties": properties, + "updated_tags": updated_tags, + "graph_methods": graph_methods, + "sessions": sessions, + "session": session, + "session_graph": session_graph, + "users": users, + "labels": labels, + "bulk_annotation": bulk_annotation, + "issues": issues, + "issue": issue, + "issue_stats": issue_stats, + } + ), + } + ) + except Exception as exc: + self._write_json({"success": False, "error": str(exc)}, status=500) + def _handle_annotation_score_lifecycle(self, payload: dict[str, Any]) -> None: try: _ensure_initialized() @@ -207,7 +491,9 @@ def _handle_annotation_score_lifecycle(self, payload: dict[str, Any]) -> None: source_id=source_id, timeout=payload.get("timeout") or STATE.timeout, ) - STATE.calls.append({"operation": "annotation-score/lifecycle", "source_id": source_id}) + STATE.calls.append( + {"operation": "annotation-score/lifecycle", "source_id": source_id} + ) self._write_json( { "success": True, @@ -245,7 +531,9 @@ def _handle_provider_api_key_lifecycle(self, payload: dict[str, Any]) -> None: fi_secret_key=STATE.secret_key, fi_base_url=STATE.base_url, ) - STATE.calls.append({"operation": "provider-api-key/lifecycle", "provider": provider.value}) + STATE.calls.append( + {"operation": "provider-api-key/lifecycle", "provider": provider.value} + ) self._write_json( { "success": True, @@ -276,7 +564,9 @@ def _handle_annotation_metadata(self, payload: dict[str, Any]) -> None: name=payload.get("project_name"), timeout=payload.get("timeout") or STATE.timeout, ) - STATE.calls.append({"operation": "annotation/metadata", "labels": len(labels)}) + STATE.calls.append( + {"operation": "annotation/metadata", "labels": len(labels)} + ) self._write_json( { "success": True, @@ -310,7 +600,9 @@ def _handle_annotation_queue_management(self, payload: dict[str, Any]) -> None: timeout=payload.get("timeout") or STATE.timeout, ) labels = client.list_labels(timeout=payload.get("timeout") or STATE.timeout) - fetched_label = client.get_label(label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) + fetched_label = client.get_label( + label_id=label.id, timeout=payload.get("timeout") or STATE.timeout + ) queue = client.create( name=_required(queue_payload, "name"), description=queue_payload.get("description"), @@ -324,17 +616,30 @@ def _handle_annotation_queue_management(self, payload: dict[str, Any]) -> None: search=queue.name, timeout=payload.get("timeout") or STATE.timeout, ) - fetched_queue = client.get(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + fetched_queue = client.get( + queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout + ) updated_queue = client.update( queue_id=queue.id, description=queue_payload.get("updated_description"), timeout=payload.get("timeout") or STATE.timeout, ) - activated_queue = client.activate(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) - add_label = client.add_label(queue_id=queue.id, label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) + activated_queue = client.activate( + queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout + ) + add_label = client.add_label( + queue_id=queue.id, + label_id=label.id, + timeout=payload.get("timeout") or STATE.timeout, + ) added_items = client.add_items( queue_id=queue.id, - items=[{"source_type": _required(item_payload, "source_type"), "source_id": _required(item_payload, "source_id")}], + items=[ + { + "source_type": _required(item_payload, "source_type"), + "source_id": _required(item_payload, "source_id"), + } + ], timeout=payload.get("timeout") or STATE.timeout, ) items = client.list_items( @@ -362,25 +667,45 @@ def _handle_annotation_queue_management(self, payload: dict[str, Any]) -> None: item_id=item_id, timeout=payload.get("timeout") or STATE.timeout, ) - skipped = client.skip_item(queue_id=queue.id, item_id=item_id, timeout=payload.get("timeout") or STATE.timeout) + skipped = client.skip_item( + queue_id=queue.id, + item_id=item_id, + timeout=payload.get("timeout") or STATE.timeout, + ) removed_items = client.remove_items( queue_id=queue.id, item_ids=[item_id], timeout=payload.get("timeout") or STATE.timeout, ) - remove_label = client.remove_label(queue_id=queue.id, label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) - analytics = client.get_analytics(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) - agreement = client.get_agreement(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) + remove_label = client.remove_label( + queue_id=queue.id, + label_id=label.id, + timeout=payload.get("timeout") or STATE.timeout, + ) + analytics = client.get_analytics( + queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout + ) + agreement = client.get_agreement( + queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout + ) export_to_dataset = client.export_to_dataset( queue_id=queue.id, dataset_name=payload.get("dataset_name"), status_filter=payload.get("status_filter"), timeout=payload.get("timeout") or STATE.timeout, ) - completed_queue = client.complete_queue(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) - deleted_label = client.delete_label(label_id=label.id, timeout=payload.get("timeout") or STATE.timeout) - deleted_queue = client.delete(queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout) - STATE.calls.append({"operation": "annotation-queue/management", "queue_id": queue.id}) + completed_queue = client.complete_queue( + queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout + ) + deleted_label = client.delete_label( + label_id=label.id, timeout=payload.get("timeout") or STATE.timeout + ) + deleted_queue = client.delete( + queue_id=queue.id, timeout=payload.get("timeout") or STATE.timeout + ) + STATE.calls.append( + {"operation": "annotation-queue/management", "queue_id": queue.id} + ) self._write_json( { "success": True, @@ -447,7 +772,12 @@ def _handle_dataset_lifecycle(self, payload: dict[str, Any]) -> None: ] ) dataset.add_rows(rows) - STATE.calls.append({"operation": "dataset/lifecycle", "dataset_id": str(dataset.dataset_config.id)}) + STATE.calls.append( + { + "operation": "dataset/lifecycle", + "dataset_id": str(dataset.dataset_config.id), + } + ) self._write_json( { "success": True, @@ -483,7 +813,14 @@ def _handle_dataset_management(self, payload: dict[str, Any]) -> None: prompt_column_name=_required(payload, "lookup_column"), ) dataset.delete() - STATE.calls.append({"operation": "dataset/management", "dataset_id": str(dataset.dataset_config) if dataset.dataset_config else None}) + STATE.calls.append( + { + "operation": "dataset/management", + "dataset_id": str(dataset.dataset_config) + if dataset.dataset_config + else None, + } + ) self._write_json( { "success": True, @@ -510,7 +847,9 @@ def _handle_knowledge_base_lifecycle(self, payload: dict[str, Any]) -> None: updated_name = payload.get("updated_name") or name client.create_kb(name=name) client.update_kb(kb_name=name, new_name=updated_name) - client.delete_files_from_kb(file_names=payload.get("file_names") or [], kb_name=updated_name) + client.delete_files_from_kb( + file_names=payload.get("file_names") or [], kb_name=updated_name + ) client.delete_kb(kb_names=updated_name) STATE.calls.append({"operation": "knowledge-base/lifecycle", "name": name}) self._write_json({"success": True, "result": {"deleted": True}}) @@ -555,7 +894,9 @@ def _handle_prompt_lifecycle(self, payload: dict[str, Any]) -> None: fi_base_url=STATE.base_url, ) prompt.delete() - STATE.calls.append({"operation": "prompt/lifecycle", "template": payload.get("name")}) + STATE.calls.append( + {"operation": "prompt/lifecycle", "template": payload.get("name")} + ) self._write_json( { "success": True, @@ -654,7 +995,9 @@ def _handle_annotation_queue_lifecycle(self, payload: dict[str, Any]) -> None: status="completed", timeout=payload.get("timeout") or STATE.timeout, ) - STATE.calls.append({"operation": "annotation-queue/lifecycle", "queue_id": queue.id}) + STATE.calls.append( + {"operation": "annotation-queue/lifecycle", "queue_id": queue.id} + ) self._write_json( { "success": True, @@ -695,6 +1038,16 @@ def _ensure_initialized() -> None: raise RuntimeError("adapter is not initialized") +def _futureagi_client() -> FutureAGIClient: + _ensure_initialized() + return FutureAGIClient( + api_key=STATE.api_key, + secret_key=STATE.secret_key, + base_url=STATE.base_url, + timeout=STATE.timeout, + ) + + def _required(payload: dict[str, Any], key: str) -> str: value = payload.get(key) if not value: diff --git a/typescript/futureagi/src/__tests__/futureagi-client.test.ts b/typescript/futureagi/src/__tests__/futureagi-client.test.ts index da9607e..2b80ff6 100644 --- a/typescript/futureagi/src/__tests__/futureagi-client.test.ts +++ b/typescript/futureagi/src/__tests__/futureagi-client.test.ts @@ -103,4 +103,67 @@ describe("FutureAGIClient", () => { expect(fetchMock).toHaveBeenCalledTimes(6); expect(expected).toHaveLength(0); }); + + it("wraps eval and simulation eval configuration paths", async () => { + const expected = [ + ["POST", "/model-hub/eval-templates/list/"], + ["POST", "/model-hub/eval-templates/create-v2/"], + ["GET", "/model-hub/eval-templates/eval-template-1/detail/"], + ["PUT", "/model-hub/eval-templates/eval-template-1/update/"], + ["GET", "/model-hub/eval-templates/eval-template-1/versions/"], + ["POST", "/sdk/api/v1/new-eval/"], + ["GET", "/sdk/api/v1/new-eval/"], + ["POST", "/simulate/run-tests/run-test-1/eval-configs/"], + [ + "GET", + "/simulate/run-tests/run-test-1/eval-configs/eval-config-1/get-structure/", + ], + ["GET", "/simulate/run-tests/run-test-1/eval-summary/"], + ["POST", "/simulate/run-tests/run-test-1/run-new-evals/"], + ]; + const fetchMock = jest.fn(async (request: Request) => { + const [method, pathname] = expected.shift() ?? []; + const url = new URL(request.url); + expect(request.method).toBe(method); + expect(url.pathname).toBe(pathname); + return new Response(JSON.stringify({ ok: true }), { + status: 200, + headers: { "Content-Type": "application/json" }, + }); + }); + + const client = new FutureAGIClient({ + apiKey: "api-key", + secretKey: "secret-key", + baseUrl: "http://api.test", + fetch: fetchMock as unknown as typeof fetch, + }); + + await client.evals.listTemplates({ filters: {} } as any); + await client.evals.createTemplate({ name: "Faithfulness" } as any); + await client.evals.getTemplate("eval-template-1"); + await client.evals.updateTemplate("eval-template-1", { + name: "Faithfulness v2", + } as any); + await client.evals.templateVersions("eval-template-1"); + await client.evals.runV2({ eval_id: "run-1", data: [] } as any); + await client.evals.getRunV2("11111111-1111-1111-1111-111111111111"); + await client.simulations.runTests.addEvalConfigs("run-test-1", { + eval_configs: [{ eval_id: "eval-template-1" }], + } as any); + await client.simulations.runTests.evalConfigStructure( + "run-test-1", + "eval-config-1", + ); + await client.simulations.runTests.evalSummary("run-test-1", { + test_execution_id: "te-1", + }); + await client.simulations.runTests.runNewEvals("run-test-1", { + test_execution_ids: ["te-1"], + eval_config_ids: ["cfg-1"], + } as any); + + expect(fetchMock).toHaveBeenCalledTimes(11); + expect(expected).toHaveLength(0); + }); }); diff --git a/typescript/futureagi/src/futureagi-client.ts b/typescript/futureagi/src/futureagi-client.ts index 58f09d5..b73de28 100644 --- a/typescript/futureagi/src/futureagi-client.ts +++ b/typescript/futureagi/src/futureagi-client.ts @@ -64,6 +64,7 @@ const callGenerated = ( export class FutureAGIClient { readonly annotationQueues: AnnotationQueuesClient; readonly datasets: DatasetsClient; + readonly evals: EvalsClient; readonly experiments: ExperimentsClient; readonly simulations: SimulationsClient; readonly tracing: TracingClient; @@ -90,6 +91,7 @@ export class FutureAGIClient { }); this.annotationQueues = new AnnotationQueuesClient(this.generatedClient); this.datasets = new DatasetsClient(this.generatedClient); + this.evals = new EvalsClient(this.generatedClient); this.experiments = new ExperimentsClient(this.generatedClient); this.simulations = new SimulationsClient(this.generatedClient); this.tracing = new TracingClient(this.generatedClient); @@ -453,7 +455,9 @@ export class DatasetsClient { } createEmpty(body: LooseBody) { - return callGenerated(this.client, generatedSdk.createEmptyDataset, { body }); + return callGenerated(this.client, generatedSdk.createEmptyDataset, { + body, + }); } createManual(body: LooseBody) { @@ -523,10 +527,14 @@ export class DatasetsClient { } annotationSummary(datasetId: string, query?: LooseQuery) { - return callGenerated(this.client, generatedSdk.getDatasetAnnotationSummary, { - path: { dataset_id: datasetId }, - query, - }); + return callGenerated( + this.client, + generatedSdk.getDatasetAnnotationSummary, + { + path: { dataset_id: datasetId }, + query, + }, + ); } duplicate(datasetId: string, body?: LooseBody) { @@ -537,9 +545,13 @@ export class DatasetsClient { } derivedVariables(datasetId: string) { - return callGenerated(this.client, generatedSdk.listDatasetDerivedVariables, { - path: { dataset_id: datasetId }, - }); + return callGenerated( + this.client, + generatedSdk.listDatasetDerivedVariables, + { + path: { dataset_id: datasetId }, + }, + ); } baseColumns(query?: LooseQuery) { @@ -638,6 +650,242 @@ export class ExperimentsClient { } } +export class EvalsClient { + constructor(private readonly client: Client) {} + + listTemplates( + body: BodyOf, + ) { + return generatedSdk.modelHubEvalTemplatesListCreate( + dataOptions(this.client, { body }), + ); + } + + createTemplate( + body: BodyOf, + ) { + return generatedSdk.modelHubEvalTemplatesCreateV2Create( + dataOptions(this.client, { body }), + ); + } + + getTemplate(templateId: string) { + return generatedSdk.modelHubEvalTemplatesDetailList( + dataOptions(this.client, { path: { template_id: templateId } }), + ); + } + + updateTemplate( + templateId: string, + body: BodyOf, + ) { + return generatedSdk.modelHubEvalTemplatesUpdateUpdate( + dataOptions(this.client, { path: { template_id: templateId }, body }), + ); + } + + deleteTemplate( + body: BodyOf, + ) { + return generatedSdk.modelHubDeleteEvalTemplateCreate( + dataOptions(this.client, { body }), + ); + } + + bulkDeleteTemplates( + body: BodyOf, + ) { + return generatedSdk.modelHubEvalTemplatesBulkDeleteCreate( + dataOptions(this.client, { body }), + ); + } + + templateUsage(templateId: string) { + return generatedSdk.modelHubEvalTemplatesUsageList( + dataOptions(this.client, { path: { template_id: templateId } }), + ); + } + + templateVersions(templateId: string) { + return generatedSdk.modelHubEvalTemplatesVersionsList( + dataOptions(this.client, { path: { template_id: templateId } }), + ); + } + + createTemplateVersion( + templateId: string, + body: BodyOf, + ) { + return generatedSdk.modelHubEvalTemplatesVersionsCreateCreate( + dataOptions(this.client, { path: { template_id: templateId }, body }), + ); + } + + restoreTemplateVersion( + templateId: string, + versionId: string, + body: BodyOf = {}, + ) { + return generatedSdk.modelHubEvalTemplatesVersionsRestoreCreate( + dataOptions(this.client, { + path: { template_id: templateId, version_id: versionId }, + body, + }), + ); + } + + setDefaultTemplateVersion( + templateId: string, + versionId: string, + body: BodyOf = {}, + ) { + return generatedSdk.modelHubEvalTemplatesVersionsSetDefaultUpdate( + dataOptions(this.client, { + path: { template_id: templateId, version_id: versionId }, + body, + }), + ); + } + + listSdkEvals() { + return generatedSdk.sdkApiV1GetEvalsList(dataOptions(this.client, {})); + } + + configure( + body: BodyOf, + ) { + return generatedSdk.sdkApiV1ConfigureEvaluationsCreate( + dataOptions(this.client, { body }), + ); + } + + run(body: BodyOf) { + return generatedSdk.sdkApiV1EvalCreate(dataOptions(this.client, { body })); + } + + getRun(evalId: string) { + return generatedSdk.sdkApiV1EvalRead( + dataOptions(this.client, { path: { eval_id: evalId } }), + ); + } + + runV2(body: BodyOf) { + return generatedSdk.sdkApiV1NewEvalCreate( + dataOptions(this.client, { body }), + ); + } + + getRunV2(evalId: string) { + return generatedSdk.sdkApiV1NewEvalList( + dataOptions(this.client, { query: { eval_id: evalId } }), + ); + } + + listPipelines( + query: QueryOf, + ) { + return generatedSdk.sdkApiV1EvaluatePipelineList( + dataOptions(this.client, { query }), + ); + } + + evaluatePipeline( + body: BodyOf, + ) { + return generatedSdk.sdkApiV1EvaluatePipelineCreate( + dataOptions(this.client, { body }), + ); + } + + datasetEvals(datasetId: string) { + return generatedSdk.modelHubDevelopsGetEvalsListList( + dataOptions(this.client, { path: { dataset_id: datasetId } }), + ); + } + + datasetEvalStructure( + datasetId: string, + evalId: string, + query: QueryOf, + ) { + return generatedSdk.modelHubDevelopsGetEvalStructureRead( + dataOptions(this.client, { + path: { dataset_id: datasetId, eval_id: evalId }, + query, + }), + ); + } + + previewDatasetEval( + datasetId: string, + body: BodyOf, + ) { + return generatedSdk.modelHubDevelopsPreviewRunEvalCreate( + dataOptions(this.client, { path: { dataset_id: datasetId }, body }), + ); + } + + startDatasetEvals( + datasetId: string, + body: BodyOf, + ) { + return generatedSdk.modelHubDevelopsStartEvalsProcessCreate( + dataOptions(this.client, { path: { dataset_id: datasetId }, body }), + ); + } + + addDatasetUserEval( + datasetId: string, + body: BodyOf, + ) { + return generatedSdk.modelHubDevelopsAddUserEvalCreate( + dataOptions(this.client, { path: { dataset_id: datasetId }, body }), + ); + } + + editAndRunDatasetUserEval( + datasetId: string, + evalId: string, + body: BodyOf, + ) { + return generatedSdk.modelHubDevelopsEditAndRunUserEvalCreate( + dataOptions(this.client, { + path: { dataset_id: datasetId, eval_id: evalId }, + body, + }), + ); + } + + stopDatasetUserEval( + datasetId: string, + evalId: string, + body: BodyOf = {}, + ) { + return generatedSdk.modelHubDevelopsStopUserEvalCreate( + dataOptions(this.client, { + path: { dataset_id: datasetId, eval_id: evalId }, + body, + }), + ); + } + + deleteDatasetUserEval(datasetId: string, evalId: string) { + return generatedSdk.modelHubDevelopsDeleteUserEvalDelete( + dataOptions(this.client, { + path: { dataset_id: datasetId, eval_id: evalId }, + }), + ); + } + + deleteDatasetTemplateEval(datasetId: string, evalId: string) { + return generatedSdk.modelHubDevelopsDeleteTemplateEvalDelete( + dataOptions(this.client, { + path: { dataset_id: datasetId, eval_id: evalId }, + }), + ); + } +} + export class SimulationsClient { readonly agentDefinitions: SimulationAgentDefinitionsClient; readonly runTests: SimulationRunTestsClient; @@ -654,7 +902,9 @@ export class SimulationsClient { } runs(query?: LooseQuery) { - return callGenerated(this.client, generatedSdk.listSimulationRuns, { query }); + return callGenerated(this.client, generatedSdk.listSimulationRuns, { + query, + }); } metrics(query?: LooseQuery) { @@ -708,6 +958,10 @@ export class SimulationAgentDefinitionsClient { export class SimulationRunTestsClient { constructor(private readonly client: Client) {} + active() { + return callGenerated(this.client, generatedSdk.simulateRunTestsActiveList); + } + list(query?: LooseQuery) { return callGenerated(this.client, generatedSdk.listRunTests, { query }); } @@ -768,6 +1022,97 @@ export class SimulationRunTestsClient { query, }); } + + addEvalConfigs( + runTestId: string, + body: BodyOf, + ) { + return generatedSdk.simulateRunTestsEvalConfigsCreate( + dataOptions(this.client, { path: { run_test_id: runTestId }, body }), + ); + } + + deleteEvalConfig(runTestId: string, evalConfigId: string) { + return generatedSdk.simulateRunTestsEvalConfigsDelete( + dataOptions(this.client, { + path: { run_test_id: runTestId, eval_config_id: evalConfigId }, + }), + ); + } + + evalConfigStructure(runTestId: string, evalConfigId: string) { + return generatedSdk.simulateRunTestsEvalConfigsGetStructureList( + dataOptions(this.client, { + path: { run_test_id: runTestId, eval_config_id: evalConfigId }, + }), + ); + } + + updateEvalConfig( + runTestId: string, + evalConfigId: string, + body: BodyOf, + ) { + return generatedSdk.simulateRunTestsEvalConfigsUpdateCreate( + dataOptions(this.client, { + path: { run_test_id: runTestId, eval_config_id: evalConfigId }, + body, + }), + ); + } + + evalSummary(runTestId: string, query?: LooseQuery) { + return callGenerated( + this.client, + generatedSdk.simulateRunTestsEvalSummaryList, + { + path: { run_test_id: runTestId }, + query, + }, + ); + } + + evalSummaryComparison(runTestId: string, query?: LooseQuery) { + return callGenerated( + this.client, + generatedSdk.simulateRunTestsEvalSummaryComparisonList, + { + path: { run_test_id: runTestId }, + query, + }, + ); + } + + runNewEvals( + runTestId: string, + body: BodyOf, + ) { + return generatedSdk.simulateRunTestsRunNewEvalsCreate( + dataOptions(this.client, { path: { run_test_id: runTestId }, body }), + ); + } + + scenarios(runTestId: string, query?: LooseQuery) { + return callGenerated( + this.client, + generatedSdk.simulateRunTestsScenariosList, + { + path: { run_test_id: runTestId }, + query, + }, + ); + } + + sdkCode(runTestId: string, query?: LooseQuery) { + return callGenerated( + this.client, + generatedSdk.simulateRunTestsSdkCodeList, + { + path: { run_test_id: runTestId }, + query, + }, + ); + } } export class SimulationTestExecutionsClient { @@ -793,10 +1138,14 @@ export class SimulationTestExecutionsClient { } transcripts(testExecutionId: string, query?: LooseQuery) { - return callGenerated(this.client, generatedSdk.getTestExecutionTranscripts, { - path: { test_execution_id: testExecutionId }, - query, - }); + return callGenerated( + this.client, + generatedSdk.getTestExecutionTranscripts, + { + path: { test_execution_id: testExecutionId }, + query, + }, + ); } kpis(testExecutionId: string, query?: LooseQuery) { @@ -891,7 +1240,9 @@ export class TracingClient { constructor(private readonly client: Client) {} projects(query?: LooseQuery) { - return callGenerated(this.client, generatedSdk.listTraceProjects, { query }); + return callGenerated(this.client, generatedSdk.listTraceProjects, { + query, + }); } traces(query?: LooseQuery) { @@ -934,7 +1285,9 @@ export class TracingClient { } sessions(query?: LooseQuery) { - return callGenerated(this.client, generatedSdk.listTraceSessions, { query }); + return callGenerated(this.client, generatedSdk.listTraceSessions, { + query, + }); } getSession(id: string) { diff --git a/typescript/futureagi/tests/compliance/adapter.ts b/typescript/futureagi/tests/compliance/adapter.ts index 5eadb64..5b68488 100644 --- a/typescript/futureagi/tests/compliance/adapter.ts +++ b/typescript/futureagi/tests/compliance/adapter.ts @@ -1,11 +1,12 @@ -import http from 'node:http'; -import { URL } from 'node:url'; +import http from "node:http"; +import { URL } from "node:url"; import { Annotation, AnnotationQueue, APIKeyAuth, DataTypeChoices, Dataset, + FutureAGIClient, HttpMethod, KnowledgeBase, ModelConfig, @@ -15,8 +16,8 @@ import { PromptTemplate, ProviderAPIKeyClient, UserMessage, -} from '../../src'; -import type { RequestConfig } from '../../src'; +} from "../../src"; +import type { RequestConfig } from "../../src"; type JsonRecord = Record; @@ -31,35 +32,39 @@ interface AdapterState { const state: AdapterState = { calls: [] }; const capabilities = [ - 'auth_api_key', - 'raw_request', - 'annotation_bulk_log', - 'annotation_metadata_lifecycle', - 'annotation_queue_lifecycle', - 'annotation_queue_management_lifecycle', - 'annotation_score_lifecycle', - 'dataset_lifecycle', - 'dataset_management_lifecycle', - 'knowledge_base_lifecycle', - 'prompt_lifecycle', - 'provider_api_key_lifecycle', + "auth_api_key", + "raw_request", + "annotation_bulk_log", + "annotation_metadata_lifecycle", + "annotation_queue_lifecycle", + "annotation_queue_management_lifecycle", + "annotation_score_lifecycle", + "dataset_lifecycle", + "dataset_management_lifecycle", + "knowledge_base_lifecycle", + "prompt_lifecycle", + "provider_api_key_lifecycle", + "futureagi_client_basic", + "evals_lifecycle", + "simulation_lifecycle", + "tracing_lifecycle", ]; const server = http.createServer(async (req, res) => { - const url = new URL(req.url ?? '/', 'http://127.0.0.1'); + const url = new URL(req.url ?? "/", "http://127.0.0.1"); try { - if (req.method === 'GET' && url.pathname === '/health') { + if (req.method === "GET" && url.pathname === "/health") { writeJson(res, 200, { - sdk_name: 'futureagi-sdk-typescript', - sdk_version: process.env.npm_package_version ?? '0.1.2', - adapter_version: '0.1.0', - language: 'typescript', + sdk_name: "futureagi-sdk-typescript", + sdk_version: process.env.npm_package_version ?? "0.1.2", + adapter_version: "0.1.0", + language: "typescript", capabilities, }); return; } - if (req.method === 'GET' && url.pathname === '/state') { + if (req.method === "GET" && url.pathname === "/state") { writeJson(res, 200, { initialized: state.baseUrl != null, base_url: state.baseUrl, @@ -70,7 +75,7 @@ const server = http.createServer(async (req, res) => { const payload = await readJson(req); - if (req.method === 'POST' && url.pathname === '/reset') { + if (req.method === "POST" && url.pathname === "/reset") { state.apiKey = undefined; state.secretKey = undefined; state.baseUrl = undefined; @@ -80,37 +85,44 @@ const server = http.createServer(async (req, res) => { return; } - if (req.method === 'POST' && url.pathname === '/init') { - state.apiKey = required(payload, 'api_key'); - state.secretKey = required(payload, 'secret_key'); - state.baseUrl = String(required(payload, 'base_url')).replace(/\/$/, ''); + if (req.method === "POST" && url.pathname === "/init") { + state.apiKey = required(payload, "api_key"); + state.secretKey = required(payload, "secret_key"); + state.baseUrl = String(required(payload, "base_url")).replace(/\/$/, ""); state.timeout = Number(payload.timeout ?? 30); - state.calls.push({ operation: 'init', base_url: state.baseUrl }); + state.calls.push({ operation: "init", base_url: state.baseUrl }); writeJson(res, 200, { success: true }); return; } - const handlers: Record Promise> = { - '/raw-request': handleRawRequest, - '/annotation/log': handleAnnotationLog, - '/annotation/metadata': handleAnnotationMetadata, - '/annotation-queue/lifecycle': handleAnnotationQueueLifecycle, - '/annotation-queue/management': handleAnnotationQueueManagement, - '/annotation-score/lifecycle': handleAnnotationScoreLifecycle, - '/dataset/lifecycle': handleDatasetLifecycle, - '/dataset/management': handleDatasetManagement, - '/knowledge-base/lifecycle': handleKnowledgeBaseLifecycle, - '/prompt/lifecycle': handlePromptLifecycle, - '/provider-api-key/lifecycle': handleProviderApiKeyLifecycle, + const handlers: Record< + string, + (payload: JsonRecord) => Promise + > = { + "/raw-request": handleRawRequest, + "/futureagi/basic": handleFutureagiBasic, + "/evals/lifecycle": handleEvalsLifecycle, + "/simulation/lifecycle": handleSimulationLifecycle, + "/tracing/lifecycle": handleTracingLifecycle, + "/annotation/log": handleAnnotationLog, + "/annotation/metadata": handleAnnotationMetadata, + "/annotation-queue/lifecycle": handleAnnotationQueueLifecycle, + "/annotation-queue/management": handleAnnotationQueueManagement, + "/annotation-score/lifecycle": handleAnnotationScoreLifecycle, + "/dataset/lifecycle": handleDatasetLifecycle, + "/dataset/management": handleDatasetManagement, + "/knowledge-base/lifecycle": handleKnowledgeBaseLifecycle, + "/prompt/lifecycle": handlePromptLifecycle, + "/provider-api-key/lifecycle": handleProviderApiKeyLifecycle, }; const handler = handlers[url.pathname]; - if (req.method === 'POST' && handler) { + if (req.method === "POST" && handler) { writeJson(res, 200, await handler(payload)); return; } - writeJson(res, 404, { error: 'not found' }); + writeJson(res, 404, { error: "not found" }); } catch (error: any) { writeJson(res, 500, { success: false, @@ -120,15 +132,22 @@ const server = http.createServer(async (req, res) => { }); const port = Number(process.env.PORT ?? 8080); -server.listen(port, '0.0.0.0', () => { - console.log(`futureagi-sdk TypeScript compliance adapter listening on :${port}`); +server.listen(port, "0.0.0.0", () => { + console.log( + `futureagi-sdk TypeScript compliance adapter listening on :${port}`, + ); }); async function handleRawRequest(payload: JsonRecord): Promise { ensureInitialized(); const client = new APIKeyAuth(authOptions()); - const path = String(required(payload, 'path')).replace(/^\//, ''); - const method = HttpMethod[String(required(payload, 'method')).toUpperCase() as keyof typeof HttpMethod]; + const path = String(required(payload, "path")).replace(/^\//, ""); + const method = + HttpMethod[ + String( + required(payload, "method"), + ).toUpperCase() as keyof typeof HttpMethod + ]; const response = await client.request({ method, url: `${state.baseUrl}/${path}`, @@ -138,27 +157,299 @@ async function handleRawRequest(payload: JsonRecord): Promise { timeout: payload.timeout ?? state.timeout, } as RequestConfig); await client.close(); - state.calls.push({ operation: 'raw-request', path, method }); + state.calls.push({ operation: "raw-request", path, method }); return responsePayload(response); } +async function handleFutureagiBasic(payload: JsonRecord): Promise { + ensureInitialized(); + const client = futureagiClient(); + const limit = payload.limit ?? 5; + const currentUser = await client.users.current(); + const workspaces = await client.users.workspaces({ limit }); + const datasets = await client.datasets.list({ limit }); + const simulationRunTests = await client.simulations.runTests.list({ limit }); + const traceProjects = await client.tracing.projects({ limit }); + state.calls.push({ operation: "futureagi/basic" }); + return { + success: true, + result: { + current_user: currentUser, + workspaces, + datasets, + simulation_run_tests: simulationRunTests, + trace_projects: traceProjects, + }, + }; +} + +async function handleEvalsLifecycle(payload: JsonRecord): Promise { + ensureInitialized(); + const client = futureagiClient(); + const templateId = required(payload, "template_id"); + const versionId = required(payload, "version_id"); + const datasetId = required(payload, "dataset_id"); + const evalId = required(payload, "eval_id"); + const sdkEvalId = required(payload, "sdk_eval_id"); + const listed = await client.evals.listTemplates(payload.list_body ?? {}); + const created = await client.evals.createTemplate(payload.template ?? {}); + const fetched = await client.evals.getTemplate(templateId); + const updated = await client.evals.updateTemplate( + templateId, + payload.template_update ?? payload.template ?? {}, + ); + const usage = await client.evals.templateUsage(templateId); + const versions = await client.evals.templateVersions(templateId); + const createdVersion = await client.evals.createTemplateVersion( + templateId, + payload.version ?? {}, + ); + const restored = await client.evals.restoreTemplateVersion( + templateId, + versionId, + ); + const defaulted = await client.evals.setDefaultTemplateVersion( + templateId, + versionId, + ); + const sdkEvals = await client.evals.listSdkEvals(); + const configured = await client.evals.configure(payload.configure ?? {}); + const sdkRun = await client.evals.runV2(payload.run ?? {}); + const sdkResult = await client.evals.getRunV2(sdkEvalId); + const datasetEvals = await client.evals.datasetEvals(datasetId); + const structure = await client.evals.datasetEvalStructure( + datasetId, + evalId, + payload.eval_structure_query ?? { eval_type: "preset" }, + ); + const preview = await client.evals.previewDatasetEval( + datasetId, + payload.preview ?? {}, + ); + const started = await client.evals.startDatasetEvals( + datasetId, + payload.start ?? {}, + ); + const deleteResult = await client.evals.deleteTemplate( + payload.delete ?? { eval_id: templateId }, + ); + state.calls.push({ operation: "evals/lifecycle", template_id: templateId }); + return { + success: true, + result: { + listed, + created, + fetched, + updated, + usage, + versions, + created_version: createdVersion, + restored, + defaulted, + sdk_evals: sdkEvals, + configured, + sdk_run: sdkRun, + sdk_result: sdkResult, + dataset_evals: datasetEvals, + structure, + preview, + started, + delete: deleteResult, + }, + }; +} + +async function handleSimulationLifecycle( + payload: JsonRecord, +): Promise { + ensureInitialized(); + const client = futureagiClient(); + const agentId = required(payload, "agent_id"); + const personaId = required(payload, "persona_id"); + const scenarioId = required(payload, "scenario_id"); + const runTestId = required(payload, "run_test_id"); + const evalConfigId = required(payload, "eval_config_id"); + const testExecutionId = required(payload, "test_execution_id"); + const runTestName = + typeof payload.run_test === "object" && + payload.run_test !== null && + "name" in payload.run_test + ? String((payload.run_test as JsonRecord).name) + : "SDK run test"; + const persona = await client.simulations.personas.create( + payload.persona ?? {}, + ); + const scenario = await client.simulations.scenarios.create( + payload.scenario ?? {}, + ); + const agent = await client.simulations.agentDefinitions.create( + payload.agent ?? {}, + ); + const runTest = await client.simulations.runTests.create( + payload.run_test ?? {}, + ); + const runs = await client.simulations.runs({ + limit: 5, + run_test_name: runTestName, + }); + const metrics = await client.simulations.metrics({ + limit: 5, + run_test_name: runTestName, + }); + const analytics = await client.simulations.analytics({ + run_test_name: runTestName, + }); + const fetchedRunTest = await client.simulations.runTests.get(runTestId); + const evalConfigs = await client.simulations.runTests.addEvalConfigs( + runTestId, + payload.eval_configs ?? {}, + ); + const evalStructure = await client.simulations.runTests.evalConfigStructure( + runTestId, + evalConfigId, + ); + const evalSummary = await client.simulations.runTests.evalSummary(runTestId, { + test_execution_id: testExecutionId, + }); + const newEvals = await client.simulations.runTests.runNewEvals( + runTestId, + payload.run_new_evals ?? {}, + ); + const executed = await client.simulations.runTests.execute( + runTestId, + payload.execute ?? {}, + ); + const status = await client.simulations.runTests.status(runTestId); + const executions = await client.simulations.runTests.executions(runTestId); + const testExecution = + await client.simulations.testExecutions.get(testExecutionId); + const canceled = await client.simulations.testExecutions.cancel( + testExecutionId, + payload.cancel ?? {}, + ); + const deletedRunTest = await client.simulations.runTests.delete(runTestId); + const deletedAgent = + await client.simulations.agentDefinitions.delete(agentId); + const deletedScenario = await client.simulations.scenarios.delete(scenarioId); + const deletedPersona = await client.simulations.personas.delete(personaId); + state.calls.push({ + operation: "simulation/lifecycle", + run_test_id: runTestId, + }); + return { + success: true, + result: { + runs, + metrics, + analytics, + persona, + scenario, + agent, + run_test: runTest, + fetched_run_test: fetchedRunTest, + eval_configs: evalConfigs, + eval_structure: evalStructure, + eval_summary: evalSummary, + new_evals: newEvals, + executed, + status, + executions, + test_execution: testExecution, + canceled, + deleted_run_test: deletedRunTest, + deleted_agent: deletedAgent, + deleted_scenario: deletedScenario, + deleted_persona: deletedPersona, + }, + }; +} + +async function handleTracingLifecycle( + payload: JsonRecord, +): Promise { + ensureInitialized(); + const client = futureagiClient(); + const projectId = required(payload, "project_id"); + const traceId = required(payload, "trace_id"); + const sessionId = required(payload, "session_id"); + const clusterId = required(payload, "cluster_id"); + const projects = await client.tracing.projects({ limit: 5 }); + const traces = await client.tracing.traces({ + project_id: projectId, + limit: 5, + }); + const trace = await client.tracing.getTrace(traceId); + const properties = await client.tracing.properties({ project_id: projectId }); + const updatedTags = await client.tracing.updateTags( + traceId, + payload.tags ?? {}, + ); + const graphMethods = await client.tracing.graphMethods( + payload.graph_methods ?? {}, + ); + const sessions = await client.tracing.sessions({ + project_id: projectId, + limit: 5, + }); + const session = await client.tracing.getSession(sessionId); + const sessionGraph = await client.tracing.sessionGraph( + payload.session_graph ?? {}, + ); + const users = await client.tracing.users({ project_id: projectId, limit: 5 }); + const labels = await client.tracing.annotationLabels({ + project_id: projectId, + }); + const bulkAnnotation = await client.tracing.bulkAnnotation( + payload.bulk_annotation ?? {}, + ); + const issues = await client.tracing.issues({ + project_id: projectId, + limit: 5, + }); + const issue = await client.tracing.issue(clusterId); + const issueStats = await client.tracing.issueStats({ project_id: projectId }); + state.calls.push({ operation: "tracing/lifecycle", trace_id: traceId }); + return { + success: true, + result: { + projects, + traces, + trace, + properties, + updated_tags: updatedTags, + graph_methods: graphMethods, + sessions, + session, + session_graph: sessionGraph, + users, + labels, + bulk_annotation: bulkAnnotation, + issues, + issue, + issue_stats: issueStats, + }, + }; +} + async function handleAnnotationLog(payload: JsonRecord): Promise { ensureInitialized(); const client = new Annotation(authOptions()); const records = payload.records; if (!Array.isArray(records)) { - throw new Error('records must be a list'); + throw new Error("records must be a list"); } const result = await client.logAnnotations(records, { projectName: payload.project_name, timeout: payload.timeout ?? state.timeout, }); await client.close(); - state.calls.push({ operation: 'annotation/log', count: records.length }); + state.calls.push({ operation: "annotation/log", count: records.length }); return { success: true, result }; } -async function handleAnnotationMetadata(payload: JsonRecord): Promise { +async function handleAnnotationMetadata( + payload: JsonRecord, +): Promise { ensureInitialized(); const client = new Annotation(authOptions()); const labels = await client.getLabels({ @@ -171,51 +462,77 @@ async function handleAnnotationMetadata(payload: JsonRecord): Promise { +async function handleAnnotationQueueLifecycle( + payload: JsonRecord, +): Promise { ensureInitialized(); const client = new AnnotationQueue(authOptions()); const queuePayload = payload.queue ?? {}; const itemPayload = payload.item ?? {}; const queue = await client.create({ - name: required(queuePayload, 'name'), + name: required(queuePayload, "name"), description: queuePayload.description, requiresReview: queuePayload.requires_review, annotationsRequired: queuePayload.annotations_required, }); - const addLabel = await client.addLabel({ queueId: queue.id, labelId: required(payload, 'label_id') }); + const addLabel = await client.addLabel({ + queueId: queue.id, + labelId: required(payload, "label_id"), + }); const addedItems = await client.addItems(queue.id, [ { - sourceType: required(itemPayload, 'source_type'), - sourceId: required(itemPayload, 'source_id'), + sourceType: required(itemPayload, "source_type"), + sourceId: required(itemPayload, "source_id"), }, ]); - const itemId = required(itemPayload, 'id'); + const itemId = required(itemPayload, "id"); const annotations = annotationInputs(payload.annotations ?? []); - const submitted = await client.submitAnnotations(queue.id, itemId, annotations, { notes: payload.notes }); + const submitted = await client.submitAnnotations( + queue.id, + itemId, + annotations, + { notes: payload.notes }, + ); const completed = await client.completeItem(queue.id, itemId); const progress = await client.getProgress(queue.id); - const exported = await client.export(queue.id, { format: 'json', status: 'completed' }); + const exported = await client.export(queue.id, { + format: "json", + status: "completed", + }); await client.close(); - state.calls.push({ operation: 'annotation-queue/lifecycle', queue_id: queue.id }); + state.calls.push({ + operation: "annotation-queue/lifecycle", + queue_id: queue.id, + }); return { success: true, - result: { queue, add_label: addLabel, added_items: addedItems, submitted, completed, progress, exported }, + result: { + queue, + add_label: addLabel, + added_items: addedItems, + submitted, + completed, + progress, + exported, + }, }; } -async function handleAnnotationScoreLifecycle(payload: JsonRecord): Promise { +async function handleAnnotationScoreLifecycle( + payload: JsonRecord, +): Promise { ensureInitialized(); const client = new AnnotationQueue(authOptions()); - const sourceType = required(payload, 'source_type'); - const sourceId = required(payload, 'source_id'); + const sourceType = required(payload, "source_type"); + const sourceId = required(payload, "source_id"); const created = await client.createScore({ sourceType, sourceId, - labelId: required(payload, 'label_id'), + labelId: required(payload, "label_id"), value: payload.value, notes: payload.notes, }); @@ -226,11 +543,16 @@ async function handleAnnotationScoreLifecycle(payload: JsonRecord): Promise { +async function handleAnnotationQueueManagement( + payload: JsonRecord, +): Promise { ensureInitialized(); const client = new AnnotationQueue(authOptions()); const labelPayload = payload.label ?? {}; @@ -239,41 +561,60 @@ async function handleAnnotationQueueManagement(payload: JsonRecord): Promise { +async function handleDatasetLifecycle( + payload: JsonRecord, +): Promise { ensureInitialized(); const columns = payload.columns; const rows = payload.rows; if (!Array.isArray(columns) || columns.length === 0) { - throw new Error('columns must be a non-empty list'); + throw new Error("columns must be a non-empty list"); } if (!Array.isArray(rows) || rows.length === 0) { - throw new Error('rows must be a non-empty list'); + throw new Error("rows must be a non-empty list"); } const dataset = new Dataset({ ...authOptions(), datasetConfig: { - name: required(payload, 'name'), - model_type: ModelTypes[String(required(payload, 'model_type')) as keyof typeof ModelTypes], + name: required(payload, "name"), + model_type: + ModelTypes[ + String(required(payload, "model_type")) as keyof typeof ModelTypes + ], }, }); await dataset.create(); - await dataset.addColumns(columns.map((column) => ({ - name: required(column, 'name'), - data_type: DataTypeChoices[String(required(column, 'data_type')) as keyof typeof DataTypeChoices], - }))); + await dataset.addColumns( + columns.map((column) => ({ + name: required(column, "name"), + data_type: + DataTypeChoices[ + String(required(column, "data_type")) as keyof typeof DataTypeChoices + ], + })), + ); await dataset.addRows(rows); await dataset.close(); const datasetConfig = dataset.getConfig(); - state.calls.push({ operation: 'dataset/lifecycle', dataset_id: datasetConfig.id }); + state.calls.push({ + operation: "dataset/lifecycle", + dataset_id: datasetConfig.id, + }); return { success: true, result: { @@ -352,39 +709,57 @@ async function handleDatasetLifecycle(payload: JsonRecord): Promise }; } -async function handleDatasetManagement(payload: JsonRecord): Promise { +async function handleDatasetManagement( + payload: JsonRecord, +): Promise { ensureInitialized(); - const datasetConfig = await Dataset.getDatasetConfig(required(payload, 'name'), authOptions()); + const datasetConfig = await Dataset.getDatasetConfig( + required(payload, "name"), + authOptions(), + ); const dataset = new Dataset({ ...authOptions(), datasetConfig }); - const columnId = await dataset.getColumnId(required(payload, 'lookup_column')); + const columnId = await dataset.getColumnId( + required(payload, "lookup_column"), + ); await dataset.addRunPrompt({ - name: required(payload, 'run_prompt_name'), - model: required(payload, 'model'), + name: required(payload, "run_prompt_name"), + model: required(payload, "model"), messages: payload.messages ?? [], }); const evalStats = await dataset.getEvalStats(); await dataset.addOptimization({ - optimizationName: required(payload, 'optimization_name'), - promptColumnName: required(payload, 'lookup_column'), + optimizationName: required(payload, "optimization_name"), + promptColumnName: required(payload, "lookup_column"), }); await dataset.delete(); await dataset.close(); - state.calls.push({ operation: 'dataset/management', dataset_id: datasetConfig.id }); - return { success: true, result: { column_id: columnId, eval_stats: evalStats, deleted: true } }; + state.calls.push({ + operation: "dataset/management", + dataset_id: datasetConfig.id, + }); + return { + success: true, + result: { column_id: columnId, eval_stats: evalStats, deleted: true }, + }; } -async function handleKnowledgeBaseLifecycle(payload: JsonRecord): Promise { +async function handleKnowledgeBaseLifecycle( + payload: JsonRecord, +): Promise { ensureInitialized(); const client = new KnowledgeBase(undefined, authOptions()); - const name = required(payload, 'name'); + const name = required(payload, "name"); const updatedName = payload.updated_name ?? name; await client.createKb(name); await client.updateKb({ kbName: name, newName: updatedName }); const listed = await client.listKbs(updatedName); - await client.deleteFilesFromKb({ kbName: updatedName, fileNames: payload.file_names ?? [] }); + await client.deleteFilesFromKb({ + kbName: updatedName, + fileNames: payload.file_names ?? [], + }); await client.deleteKb({ kbNames: updatedName }); await client.close(); - state.calls.push({ operation: 'knowledge-base/lifecycle', name }); + state.calls.push({ operation: "knowledge-base/lifecycle", name }); return { success: true, result: { listed, deleted: true } }; } @@ -392,29 +767,37 @@ async function handlePromptLifecycle(payload: JsonRecord): Promise { ensureInitialized(); const prompt = new Prompt( new PromptTemplate({ - name: required(payload, 'name'), - messages: [new UserMessage(required(payload, 'message'))], - model_configuration: new ModelConfig({ model_name: required(payload, 'model') }), + name: required(payload, "name"), + messages: [new UserMessage(required(payload, "message"))], + model_configuration: new ModelConfig({ + model_name: required(payload, "model"), + }), }), authOptions(), ); - await prompt.generate(required(payload, 'generate_requirements')); - await prompt.improve(required(payload, 'improve_requirements')); + await prompt.generate(required(payload, "generate_requirements")); + await prompt.improve(required(payload, "improve_requirements")); const compiled = prompt.compile(payload.variables ?? {}); await prompt.create({ label: payload.label }); - await prompt.commitCurrentVersion(payload.commit_message ?? '', Boolean(payload.set_default)); - const fetchedTemplate = await Prompt.getTemplateByName(required(payload, 'name'), { - ...authOptions(), - label: payload.label, - }); + await prompt.commitCurrentVersion( + payload.commit_message ?? "", + Boolean(payload.set_default), + ); + const fetchedTemplate = await Prompt.getTemplateByName( + required(payload, "name"), + { + ...authOptions(), + label: payload.label, + }, + ); const labels = await prompt.labels().list(); const templateLabels = await Prompt.getTemplateLabels({ ...authOptions(), - template_name: required(payload, 'name'), + template_name: required(payload, "name"), }); await prompt.delete(); await prompt.close(); - state.calls.push({ operation: 'prompt/lifecycle', template: payload.name }); + state.calls.push({ operation: "prompt/lifecycle", template: payload.name }); return { success: true, result: { @@ -427,25 +810,37 @@ async function handlePromptLifecycle(payload: JsonRecord): Promise { }; } -async function handleProviderApiKeyLifecycle(payload: JsonRecord): Promise { +async function handleProviderApiKeyLifecycle( + payload: JsonRecord, +): Promise { ensureInitialized(); - const provider = ModelProvider[String(required(payload, 'provider')) as keyof typeof ModelProvider]; - await ProviderAPIKeyClient.setApiKey({ provider, key: required(payload, 'provider_key') }, authOptions()); + const provider = + ModelProvider[ + String(required(payload, "provider")) as keyof typeof ModelProvider + ]; + await ProviderAPIKeyClient.setApiKey( + { provider, key: required(payload, "provider_key") }, + authOptions(), + ); const listed = await ProviderAPIKeyClient.listApiKeys(authOptions()); const fetched = await ProviderAPIKeyClient.getApiKey(provider, authOptions()); - state.calls.push({ operation: 'provider-api-key/lifecycle', provider }); + state.calls.push({ operation: "provider-api-key/lifecycle", provider }); return { success: true, result: { listed, fetched } }; } -function annotationInputs(items: JsonRecord[]): Array<{ labelId: string; value: any; scoreSource?: string }> { +function annotationInputs( + items: JsonRecord[], +): Array<{ labelId: string; value: any; scoreSource?: string }> { return items.map((item) => ({ - labelId: required(item, 'label_id'), + labelId: required(item, "label_id"), value: item.value, scoreSource: item.score_source, })); } -function scoreInputs(items: JsonRecord[]): Array<{ labelId: string; value: any; scoreSource?: string }> { +function scoreInputs( + items: JsonRecord[], +): Array<{ labelId: string; value: any; scoreSource?: string }> { return annotationInputs(items); } @@ -458,22 +853,31 @@ function authOptions() { }; } +function futureagiClient(): FutureAGIClient { + ensureInitialized(); + return new FutureAGIClient({ + apiKey: state.apiKey, + secretKey: state.secretKey, + baseUrl: state.baseUrl, + }); +} + function ensureInitialized(): void { if (!state.apiKey || !state.secretKey || !state.baseUrl) { - throw new Error('adapter is not initialized'); + throw new Error("adapter is not initialized"); } } function required(source: JsonRecord, key: string): any { const value = source[key]; - if (value === undefined || value === null || value === '') { + if (value === undefined || value === null || value === "") { throw new Error(`missing required field: ${key}`); } return value; } function responsePayload(response: any): JsonRecord { - if (response && typeof response === 'object' && 'data' in response) { + if (response && typeof response === "object" && "data" in response) { return { success: true, status_code: response.status, body: response.data }; } return { success: true, body: response }; @@ -482,15 +886,15 @@ function responsePayload(response: any): JsonRecord { function readJson(req: http.IncomingMessage): Promise { return new Promise((resolve, reject) => { const chunks: Buffer[] = []; - req.on('data', (chunk) => chunks.push(Buffer.from(chunk))); - req.on('error', reject); - req.on('end', () => { + req.on("data", (chunk) => chunks.push(Buffer.from(chunk))); + req.on("error", reject); + req.on("end", () => { if (chunks.length === 0) { resolve({}); return; } try { - resolve(JSON.parse(Buffer.concat(chunks).toString('utf8'))); + resolve(JSON.parse(Buffer.concat(chunks).toString("utf8"))); } catch (error) { reject(error); } @@ -498,11 +902,15 @@ function readJson(req: http.IncomingMessage): Promise { }); } -function writeJson(res: http.ServerResponse, status: number, payload: JsonRecord): void { +function writeJson( + res: http.ServerResponse, + status: number, + payload: JsonRecord, +): void { const body = Buffer.from(JSON.stringify(payload)); res.writeHead(status, { - 'content-type': 'application/json', - 'content-length': body.length, + "content-type": "application/json", + "content-length": body.length, }); res.end(body); } diff --git a/typescript/futureagi/tests/live/smoke.ts b/typescript/futureagi/tests/live/smoke.ts index f7e14e8..f6693f8 100644 --- a/typescript/futureagi/tests/live/smoke.ts +++ b/typescript/futureagi/tests/live/smoke.ts @@ -3,9 +3,10 @@ import { AnnotationQueue, APIKeyAuth, Dataset, + FutureAGIClient, HttpMethod, -} from '../../src'; -import type { RequestConfig } from '../../src'; +} from "../../src"; +import type { RequestConfig } from "../../src"; function requiredEnv(name: string): string { const value = process.env[name]; @@ -15,31 +16,65 @@ function requiredEnv(name: string): string { return value; } -async function firstDatasetName(client: APIKeyAuth, baseUrl: string): Promise { - const response = await client.request({ +async function firstDatasetName( + client: APIKeyAuth, + baseUrl: string, +): Promise { + const response = (await client.request({ method: HttpMethod.GET, url: `${baseUrl}/model-hub/develops/get-datasets-names/`, timeout: 20_000, - } as RequestConfig) as any; + } as RequestConfig)) as any; const datasets = response?.data?.result?.datasets ?? []; return datasets[0]?.name; } +function itemsCount(payload: unknown, keys: string[]): number { + if (Array.isArray(payload)) { + return payload.length; + } + if (!payload || typeof payload !== "object") { + return 0; + } + + const root = payload as Record; + const result = root.result; + const candidates = [ + root, + result && typeof result === "object" + ? (result as Record) + : undefined, + ].filter(Boolean) as Record[]; + + for (const candidate of candidates) { + for (const key of keys) { + const value = candidate[key]; + if (Array.isArray(value)) { + return value.length; + } + if (value && typeof value === "object") { + return Object.keys(value).length; + } + } + } + return 0; +} + async function main(): Promise { - const baseUrl = requiredEnv('FI_BASE_URL').replace(/\/$/, ''); + const baseUrl = requiredEnv("FI_BASE_URL").replace(/\/$/, ""); const auth = { - fiApiKey: requiredEnv('FI_API_KEY'), - fiSecretKey: requiredEnv('FI_SECRET_KEY'), + fiApiKey: requiredEnv("FI_API_KEY"), + fiSecretKey: requiredEnv("FI_SECRET_KEY"), fiBaseUrl: baseUrl, timeout: Number(process.env.FI_LIVE_TIMEOUT ?? 20) * 1000, }; const raw = new APIKeyAuth(auth); - const health = await raw.request({ + const health = (await raw.request({ method: HttpMethod.GET, url: `${baseUrl}/health/`, timeout: 10_000, - } as RequestConfig) as any; + } as RequestConfig)) as any; if (health.status !== 200) { throw new Error(`health check failed with ${health.status}`); } @@ -52,42 +87,87 @@ async function main(): Promise { const queueLabels = await queue.listLabels(); const queues = await queue.list(); - const datasetName = process.env.FI_LIVE_DATASET_NAME ?? await firstDatasetName(raw, baseUrl); + const datasetName = + process.env.FI_LIVE_DATASET_NAME ?? (await firstDatasetName(raw, baseUrl)); let datasetId: string | undefined; if (datasetName) { const dataset = await Dataset.getDatasetConfig(datasetName, auth); datasetId = dataset.id; } + const futureagi = new FutureAGIClient({ + apiKey: auth.fiApiKey, + secretKey: auth.fiSecretKey, + baseUrl, + }); + const currentUser = await futureagi.users.current(); + const workspaces = await futureagi.users.workspaces({ limit: 5 }); + const futureagiDatasets = await futureagi.datasets.listNames({ + search_text: process.env.FI_LIVE_DATASET_NAME ?? "sdk-live-dataset", + }); + const sdkEvals = await futureagi.evals.listSdkEvals(); + const simulationRunTests = await futureagi.simulations.runTests.list({ + limit: 5, + }); + const activeRunTests = await futureagi.simulations.runTests.active(); + const traceProjects = await futureagi.tracing.projects({ limit: 5 }); + const traceLabels = await futureagi.tracing.annotationLabels(); + const routeStatuses: Record = {}; - for (const path of ['sdk/api/v1/log/model/', 'log/model/']) { + for (const path of ["sdk/api/v1/log/model/", "log/model/"]) { const response = await fetch(`${baseUrl}/${path}`, { - method: 'POST', + method: "POST", headers: { - 'Content-Type': 'application/json', - 'X-Api-Key': auth.fiApiKey, - 'X-Secret-Key': auth.fiSecretKey, + "Content-Type": "application/json", + "X-Api-Key": auth.fiApiKey, + "X-Secret-Key": auth.fiSecretKey, }, - body: '{}', + body: "{}", signal: AbortSignal.timeout(10_000), }); routeStatuses[path] = response.status; } if (Object.values(routeStatuses).some((status) => status !== 404)) { - throw new Error(`model logging route status changed: ${JSON.stringify(routeStatuses)}`); + throw new Error( + `model logging route status changed: ${JSON.stringify(routeStatuses)}`, + ); } await Promise.all([raw.close(), annotation.close(), queue.close()]); - console.log(JSON.stringify({ - ok: true, - labels: labels.length, - projects: projects.length, - queue_labels: queueLabels.length, - queues: queues.length, - dataset_id_present: Boolean(datasetId), - model_log_route_statuses: routeStatuses, - }, null, 2)); + console.log( + JSON.stringify( + { + ok: true, + labels: labels.length, + projects: projects.length, + queue_labels: queueLabels.length, + queues: queues.length, + dataset_id_present: Boolean(datasetId), + futureagi_client: { + current_user_seen: Boolean(currentUser), + workspaces: itemsCount(workspaces, ["workspaces", "data", "items"]), + datasets: itemsCount(futureagiDatasets, [ + "datasets", + "data", + "items", + ]), + sdk_evals_seen: Boolean(sdkEvals), + simulation_run_tests_seen: Boolean(simulationRunTests), + active_run_tests_seen: Boolean(activeRunTests), + trace_projects: itemsCount(traceProjects, [ + "projects", + "data", + "items", + ]), + trace_labels_seen: Boolean(traceLabels), + }, + model_log_route_statuses: routeStatuses, + }, + null, + 2, + ), + ); } main().catch((error) => { From 28eb9bd7fba4505caf8c9d61358377d7ccdd52cc Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Thu, 4 Jun 2026 02:54:29 +0530 Subject: [PATCH 12/15] Add SDK CI gates and release workflow --- .github/workflows/release-sdks.yml | 287 +++++++++++++++++++++++++++ .github/workflows/sdk-compliance.yml | 63 +++++- scripts/generate-go-java-sdk.sh | 3 +- scripts/generate-oss-sdk.sh | 3 +- 4 files changed, 343 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/release-sdks.yml diff --git a/.github/workflows/release-sdks.yml b/.github/workflows/release-sdks.yml new file mode 100644 index 0000000..348ca48 --- /dev/null +++ b/.github/workflows/release-sdks.yml @@ -0,0 +1,287 @@ +name: Release SDKs + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: write + id-token: write + packages: write + +concurrency: + group: release-sdks-${{ github.ref }} + cancel-in-progress: false + +jobs: + package-checks: + name: Package checks + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + cache-dependency-path: python/pyproject.toml + + - name: Install Python SDK + run: | + python -m pip install --upgrade pip + python -m pip install -e ./python pytest build + + - name: Run Python tests + run: PYTHONPATH=python pytest -q python/tests + + - name: Build Python package + run: python -m build python + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 8.15.0 + run_install: false + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: pnpm + cache-dependency-path: typescript/futureagi/pnpm-lock.yaml + + - name: Install TypeScript SDK + working-directory: typescript/futureagi + run: pnpm install --frozen-lockfile --ignore-scripts + + - name: Type check TypeScript SDK + working-directory: typescript/futureagi + run: pnpm run typecheck + + - name: Run TypeScript tests + working-directory: typescript/futureagi + run: pnpm test -- --runInBand + + - name: Build TypeScript SDK + working-directory: typescript/futureagi + run: pnpm run build + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.22" + cache-dependency-path: go/futureagi/go.sum + + - name: Test Go SDK + working-directory: go/futureagi + run: go test ./... + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17" + cache: maven + cache-dependency-path: java/futureagi/pom.xml + + - name: Build Java SDK + run: mvn -B -f java/futureagi/pom.xml -DskipTests package + + python-compliance: + name: Python SDK compliance + uses: future-agi/futureagi-sdk-test-harness/.github/workflows/test-sdk.yml@main + with: + adapter-dockerfile: tests/compliance/python/Dockerfile + adapter-context: "." + report-name: futureagi-sdk-python-release-compliance-report + + typescript-compliance: + name: TypeScript SDK compliance + uses: future-agi/futureagi-sdk-test-harness/.github/workflows/test-sdk.yml@main + with: + adapter-dockerfile: typescript/futureagi/tests/compliance/Dockerfile + adapter-context: "." + report-name: futureagi-sdk-typescript-release-compliance-report + + publish-python: + name: Publish Python SDK + needs: + - package-checks + - python-compliance + - typescript-compliance + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Build Python package + run: | + python -m pip install --upgrade pip build + python -m build python + + - name: Publish Python package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: python/dist + skip-existing: true + + publish-typescript: + name: Publish TypeScript SDK + needs: + - package-checks + - python-compliance + - typescript-compliance + runs-on: ubuntu-latest + timeout-minutes: 10 + defaults: + run: + working-directory: typescript/futureagi + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 8.15.0 + run_install: false + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: pnpm + cache-dependency-path: typescript/futureagi/pnpm-lock.yaml + registry-url: https://registry.npmjs.org + + - name: Install TypeScript SDK + run: pnpm install --frozen-lockfile --ignore-scripts + + - name: Build TypeScript SDK + run: pnpm run build + + - name: Check npm package version + id: npm-version + run: | + PACKAGE_NAME="$(node -p "require('./package.json').name")" + PACKAGE_VERSION="$(node -p "require('./package.json').version")" + if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version >/dev/null 2>&1; then + echo "exists=true" >> "$GITHUB_OUTPUT" + echo "${PACKAGE_NAME}@${PACKAGE_VERSION} already exists on npm; skipping publish." + else + echo "exists=false" >> "$GITHUB_OUTPUT" + fi + + - name: Require npm token + if: steps.npm-version.outputs.exists != 'true' + run: | + if [ -z "${NODE_AUTH_TOKEN}" ]; then + echo "::error::NPM_TOKEN is required to publish a new TypeScript SDK version." + exit 1 + fi + + - name: Publish TypeScript package to npm + if: steps.npm-version.outputs.exists != 'true' + run: pnpm publish --access public --provenance --no-git-checks + + release-go: + name: Release Go SDK module tag + needs: + - package-checks + - python-compliance + - typescript-compliance + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Resolve Go SDK version + id: go-version + run: | + VERSION="$(sed -n 's/.*packageVersion=\([^,]*\).*/\1/p' scripts/generate-go-java-sdk.sh | head -n 1)" + if [ -z "${VERSION}" ]; then + echo "::error::Could not resolve Go SDK packageVersion from scripts/generate-go-java-sdk.sh." + exit 1 + fi + TAG="go/futureagi/v${VERSION}" + echo "tag=${TAG}" >> "$GITHUB_OUTPUT" + + - name: Push Go module tag + run: | + TAG="${{ steps.go-version.outputs.tag }}" + git fetch --tags origin + if git rev-parse "${TAG}" >/dev/null 2>&1; then + echo "${TAG} already exists; skipping Go module release." + exit 0 + fi + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git tag "${TAG}" "${GITHUB_SHA}" + git push origin "${TAG}" + + publish-java: + name: Publish Java SDK + needs: + - package-checks + - python-compliance + - typescript-compliance + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + GITHUB_TOKEN: ${{ github.token }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17" + cache: maven + cache-dependency-path: java/futureagi/pom.xml + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN + + - name: Check Java package version + id: java-version + run: | + VERSION="$(sed -n 's:.*\([^<]*\).*:\1:p' java/futureagi/pom.xml | head -n 1)" + if [ -z "${VERSION}" ]; then + echo "::error::Could not resolve Java SDK version from java/futureagi/pom.xml." + exit 1 + fi + PACKAGE_NAME="com.futureagi.futureagi-sdk" + EXISTING="$( + gh api "/orgs/future-agi/packages/maven/${PACKAGE_NAME}/versions" \ + --jq ".[] | select(.name == \"${VERSION}\") | .name" 2>/dev/null | head -n 1 || true + )" + if [ "${EXISTING}" = "${VERSION}" ]; then + echo "exists=true" >> "$GITHUB_OUTPUT" + echo "${PACKAGE_NAME}:${VERSION} already exists in GitHub Packages; skipping publish." + else + echo "exists=false" >> "$GITHUB_OUTPUT" + fi + + - name: Publish Java package to GitHub Packages + if: steps.java-version.outputs.exists != 'true' + run: > + mvn -B -f java/futureagi/pom.xml -DskipTests deploy + -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/future-agi/futureagi-sdk diff --git a/.github/workflows/sdk-compliance.yml b/.github/workflows/sdk-compliance.yml index b39c46e..22b37b3 100644 --- a/.github/workflows/sdk-compliance.yml +++ b/.github/workflows/sdk-compliance.yml @@ -2,9 +2,16 @@ name: SDK Compliance on: pull_request: + branches: + - dev + - main paths: - ".github/workflows/sdk-compliance.yml" + - "go/futureagi/**" + - "java/futureagi/**" - "python/**" + - "openapi/sdk/**" + - "scripts/**" - "typescript/futureagi/**" - "tests/compliance/**" push: @@ -13,7 +20,11 @@ on: - main paths: - ".github/workflows/sdk-compliance.yml" + - "go/futureagi/**" + - "java/futureagi/**" - "python/**" + - "openapi/sdk/**" + - "scripts/**" - "typescript/futureagi/**" - "tests/compliance/**" workflow_dispatch: @@ -67,29 +78,30 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 8.15.0 + run_install: false + - name: Set up Node uses: actions/setup-node@v4 with: node-version: "20" - cache: npm - cache-dependency-path: typescript/futureagi/package-lock.json - - - name: Enable pnpm for package scripts - run: | - corepack enable - corepack prepare pnpm@8.15.0 --activate + cache: pnpm + cache-dependency-path: typescript/futureagi/pnpm-lock.yaml - name: Install TypeScript SDK - run: npm ci --ignore-scripts + run: pnpm install --frozen-lockfile --ignore-scripts - name: Type check - run: npm run typecheck + run: pnpm run typecheck - name: Run TypeScript tests - run: npm test -- --runInBand + run: pnpm test -- --runInBand - name: Build TypeScript SDK - run: npm run build + run: pnpm run build typescript-compliance: name: TypeScript SDK compliance @@ -99,3 +111,32 @@ jobs: adapter-dockerfile: typescript/futureagi/tests/compliance/Dockerfile adapter-context: "." report-name: futureagi-sdk-typescript-compliance-report + + generated-sdk-builds: + name: Generated Go and Java SDK builds + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.22" + cache-dependency-path: go/futureagi/go.sum + + - name: Test Go SDK + working-directory: go/futureagi + run: go test ./... + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17" + cache: maven + cache-dependency-path: java/futureagi/pom.xml + + - name: Build Java SDK + run: mvn -B -f java/futureagi/pom.xml -DskipTests package diff --git a/scripts/generate-go-java-sdk.sh b/scripts/generate-go-java-sdk.sh index f4b1a6d..5240e42 100755 --- a/scripts/generate-go-java-sdk.sh +++ b/scripts/generate-go-java-sdk.sh @@ -3,9 +3,10 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" SPEC="$ROOT_DIR/openapi/sdk/generated/futureagi-sdk.openapi.json" +SOURCE_SWAGGER="${1:-"${SOURCE_SWAGGER:-"$ROOT_DIR/../future-agi/api_contracts/openapi/swagger.json"}"}" GENERATOR_IMAGE="${OPENAPI_GENERATOR_IMAGE:-openapitools/openapi-generator-cli:v7.12.0}" -"$ROOT_DIR/scripts/build-sdk-openapi.sh" +"$ROOT_DIR/scripts/build-sdk-openapi.sh" "$SOURCE_SWAGGER" docker run --rm "$GENERATOR_IMAGE" version >/dev/null diff --git a/scripts/generate-oss-sdk.sh b/scripts/generate-oss-sdk.sh index b65dacd..90280f7 100755 --- a/scripts/generate-oss-sdk.sh +++ b/scripts/generate-oss-sdk.sh @@ -3,8 +3,9 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" SPEC="$ROOT_DIR/openapi/sdk/generated/futureagi-sdk.openapi.json" +SOURCE_SWAGGER="${1:-"${SOURCE_SWAGGER:-"$ROOT_DIR/../future-agi/api_contracts/openapi/swagger.json"}"}" -"$ROOT_DIR/scripts/build-sdk-openapi.sh" +"$ROOT_DIR/scripts/build-sdk-openapi.sh" "$SOURCE_SWAGGER" rm -rf "$ROOT_DIR/typescript/futureagi/src/generated/openapi" npx --yes @hey-api/openapi-ts \ From fbfc514bfb5fbbb14a8c71888875408ee6dc3a77 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Thu, 4 Jun 2026 03:02:59 +0530 Subject: [PATCH 13/15] Fix TypeScript SDK CI pnpm setup --- .github/workflows/release-sdks.yml | 6 +++--- .github/workflows/sdk-compliance.yml | 4 ++-- typescript/futureagi/package.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-sdks.yml b/.github/workflows/release-sdks.yml index 348ca48..63564eb 100644 --- a/.github/workflows/release-sdks.yml +++ b/.github/workflows/release-sdks.yml @@ -45,7 +45,7 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v4 with: - version: 8.15.0 + version: 10.12.1 run_install: false - name: Set up Node @@ -65,7 +65,7 @@ jobs: - name: Run TypeScript tests working-directory: typescript/futureagi - run: pnpm test -- --runInBand + run: pnpm test --runInBand - name: Build TypeScript SDK working-directory: typescript/futureagi @@ -156,7 +156,7 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v4 with: - version: 8.15.0 + version: 10.12.1 run_install: false - name: Set up Node diff --git a/.github/workflows/sdk-compliance.yml b/.github/workflows/sdk-compliance.yml index 22b37b3..105c100 100644 --- a/.github/workflows/sdk-compliance.yml +++ b/.github/workflows/sdk-compliance.yml @@ -81,7 +81,7 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v4 with: - version: 8.15.0 + version: 10.12.1 run_install: false - name: Set up Node @@ -98,7 +98,7 @@ jobs: run: pnpm run typecheck - name: Run TypeScript tests - run: pnpm test -- --runInBand + run: pnpm test --runInBand - name: Build TypeScript SDK run: pnpm run build diff --git a/typescript/futureagi/package.json b/typescript/futureagi/package.json index 8a97925..22df6ac 100644 --- a/typescript/futureagi/package.json +++ b/typescript/futureagi/package.json @@ -56,9 +56,9 @@ "homepage": "https://github.com/futureagi/futureagi#readme", "engines": { "node": ">=18.0.0", - "pnpm": ">=8.0.0" + "pnpm": ">=9.0.0" }, - "packageManager": "pnpm@8.15.0", + "packageManager": "pnpm@10.12.1", "devDependencies": { "@types/jest": "^29.5.0", "@types/node": "^20.0.0", From 0b7ca13b298efd72574397cfdf8adad8fb757c66 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Thu, 4 Jun 2026 03:06:08 +0530 Subject: [PATCH 14/15] Fix TypeScript SDK clean install --- .github/workflows/release-sdks.yml | 4 ++-- .github/workflows/sdk-compliance.yml | 6 +++--- typescript/futureagi/package.json | 2 ++ typescript/pnpm-lock.yaml | 6 ++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-sdks.yml b/.github/workflows/release-sdks.yml index 63564eb..8a3ed80 100644 --- a/.github/workflows/release-sdks.yml +++ b/.github/workflows/release-sdks.yml @@ -53,7 +53,7 @@ jobs: with: node-version: "20" cache: pnpm - cache-dependency-path: typescript/futureagi/pnpm-lock.yaml + cache-dependency-path: typescript/pnpm-lock.yaml - name: Install TypeScript SDK working-directory: typescript/futureagi @@ -164,7 +164,7 @@ jobs: with: node-version: "20" cache: pnpm - cache-dependency-path: typescript/futureagi/pnpm-lock.yaml + cache-dependency-path: typescript/pnpm-lock.yaml registry-url: https://registry.npmjs.org - name: Install TypeScript SDK diff --git a/.github/workflows/sdk-compliance.yml b/.github/workflows/sdk-compliance.yml index 105c100..aedf6f3 100644 --- a/.github/workflows/sdk-compliance.yml +++ b/.github/workflows/sdk-compliance.yml @@ -12,7 +12,7 @@ on: - "python/**" - "openapi/sdk/**" - "scripts/**" - - "typescript/futureagi/**" + - "typescript/**" - "tests/compliance/**" push: branches: @@ -25,7 +25,7 @@ on: - "python/**" - "openapi/sdk/**" - "scripts/**" - - "typescript/futureagi/**" + - "typescript/**" - "tests/compliance/**" workflow_dispatch: @@ -89,7 +89,7 @@ jobs: with: node-version: "20" cache: pnpm - cache-dependency-path: typescript/futureagi/pnpm-lock.yaml + cache-dependency-path: typescript/pnpm-lock.yaml - name: Install TypeScript SDK run: pnpm install --frozen-lockfile --ignore-scripts diff --git a/typescript/futureagi/package.json b/typescript/futureagi/package.json index 22df6ac..96a456f 100644 --- a/typescript/futureagi/package.json +++ b/typescript/futureagi/package.json @@ -60,6 +60,7 @@ }, "packageManager": "pnpm@10.12.1", "devDependencies": { + "@jest/globals": "^29.7.0", "@types/jest": "^29.5.0", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^7.0.0", @@ -78,6 +79,7 @@ "dependencies": { "@types/uuid": "^10.0.0", "axios": "^1.6.0", + "form-data": "^4.0.3", "uuid": "^11.1.0", "winston": "^3.11.0" }, diff --git a/typescript/pnpm-lock.yaml b/typescript/pnpm-lock.yaml index 4d7ebbd..e8fa24f 100644 --- a/typescript/pnpm-lock.yaml +++ b/typescript/pnpm-lock.yaml @@ -84,6 +84,9 @@ importers: axios: specifier: ^1.6.0 version: 1.10.0 + form-data: + specifier: ^4.0.3 + version: 4.0.3 uuid: specifier: ^11.1.0 version: 11.1.0 @@ -91,6 +94,9 @@ importers: specifier: ^3.11.0 version: 3.17.0 devDependencies: + '@jest/globals': + specifier: ^29.7.0 + version: 29.7.0 '@types/jest': specifier: ^29.5.0 version: 29.5.14 From 33bbcc11fb4da373e377946e7e61612b8c76ac0f Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Thu, 4 Jun 2026 03:33:21 +0530 Subject: [PATCH 15/15] Run SDK compliance on all protected branch PRs --- .github/workflows/sdk-compliance.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/sdk-compliance.yml b/.github/workflows/sdk-compliance.yml index aedf6f3..4e02237 100644 --- a/.github/workflows/sdk-compliance.yml +++ b/.github/workflows/sdk-compliance.yml @@ -5,28 +5,10 @@ on: branches: - dev - main - paths: - - ".github/workflows/sdk-compliance.yml" - - "go/futureagi/**" - - "java/futureagi/**" - - "python/**" - - "openapi/sdk/**" - - "scripts/**" - - "typescript/**" - - "tests/compliance/**" push: branches: - dev - main - paths: - - ".github/workflows/sdk-compliance.yml" - - "go/futureagi/**" - - "java/futureagi/**" - - "python/**" - - "openapi/sdk/**" - - "scripts/**" - - "typescript/**" - - "tests/compliance/**" workflow_dispatch: permissions: